diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/av_helpers.c mplayer-1.0~rc4.dfsg1+svn34540/av_helpers.c --- mplayer-1.0~rc4.dfsg1+svn33713/av_helpers.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/av_helpers.c 2011-12-24 10:55:49.000000000 +0000 @@ -0,0 +1,115 @@ +/* + * Generic libav* helpers + * + * 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 "libavcodec/avcodec.h" +#include "libavformat/avformat.h" +#include "mp_msg.h" +#include "av_helpers.h" + +int avcodec_initialized; +int avformat_initialized; + +static void mp_msp_av_log_callback(void *ptr, int level, const char *fmt, + va_list vl) +{ + static int print_prefix=1; + AVClass *avc= ptr ? *(AVClass **)ptr : NULL; + int type= MSGT_FIXME; + int mp_level; + + switch(level){ + case AV_LOG_VERBOSE: mp_level = MSGL_V ; break; + case AV_LOG_DEBUG: mp_level= MSGL_V ; break; + case AV_LOG_INFO : mp_level= MSGL_INFO; break; + case AV_LOG_ERROR: mp_level= MSGL_ERR ; break; + default : mp_level= level > AV_LOG_DEBUG ? MSGL_DBG2 : MSGL_ERR; break; + } + + if (ptr && !avc) + mp_msg(MSGT_DECVIDEO, MSGL_ERR, "libav* called av_log with context containing a broken AVClass!\n"); + if (avc) { + if(!strcmp(avc->class_name, "AVCodecContext")){ + AVCodecContext *s= ptr; + if(s->codec){ + if(s->codec->type == AVMEDIA_TYPE_AUDIO){ + if(s->codec->decode) + type= MSGT_DECAUDIO; + }else if(s->codec->type == AVMEDIA_TYPE_VIDEO){ + if(s->codec->decode) + type= MSGT_DECVIDEO; + } + //FIXME subtitles, encoders (what msgt for them? there is no appropriate ...) + } + }else if(!strcmp(avc->class_name, "AVFormatContext")){ + AVFormatContext *s= ptr; + if(s->iformat) + type= MSGT_DEMUXER; + else if(s->oformat) + type= MSGT_MUXER; + } + } + + if (!mp_msg_test(type, mp_level)) return; + + if(print_prefix && avc) { + mp_msg(type, mp_level, "[%s @ %p]", avc->item_name(ptr), avc); + } + + print_prefix= strchr(fmt, '\n') != NULL; + mp_msg_va(type, mp_level, fmt, vl); +} + +static void show_av_version(int type, const char *name, + int header_ver, int ver, const char *conf) +{ +#ifdef CONFIG_FFMPEG_SO +#define FFMPEG_TYPE "external" +#else +#define FFMPEG_TYPE "internal" +#endif + mp_msg(type, MSGL_INFO, "%s version %d.%d.%d (" FFMPEG_TYPE ")\n", + name, ver >> 16, (ver >> 8) & 0xFF, ver & 0xFF); + if (header_ver != ver) + mp_msg(type, MSGL_INFO, "Mismatching header version %d.%d.%d\n", + header_ver >> 16, (header_ver >> 8) & 0xFF, header_ver & 0xFF); + mp_msg(type, MSGL_V, "Configuration: %s\n", conf); +} + +void init_avcodec(void) +{ + if (!avcodec_initialized) { + show_av_version(MSGT_DECVIDEO, "libavcodec", LIBAVCODEC_VERSION_INT, + avcodec_version(), avcodec_configuration()); + avcodec_register_all(); + avcodec_initialized = 1; + av_log_set_callback(mp_msp_av_log_callback); + } +} + +void init_avformat(void) +{ + if (!avformat_initialized) { + show_av_version(MSGT_DEMUX, "libavformat", LIBAVFORMAT_VERSION_INT, + avformat_version(), avformat_configuration()); + av_register_all(); + avformat_initialized = 1; + av_log_set_callback(mp_msp_av_log_callback); + } +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/av_helpers.h mplayer-1.0~rc4.dfsg1+svn34540/av_helpers.h --- mplayer-1.0~rc4.dfsg1+svn33713/av_helpers.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/av_helpers.h 2011-08-11 18:17:26.000000000 +0000 @@ -0,0 +1,27 @@ +/* + * Generic libav* helpers + * + * 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_AV_HELPERS_H +#define MPLAYER_AV_HELPERS_H + +void init_avcodec(void); +void init_avformat(void); + +#endif /* MPLAYER_AV_HELPERS_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/cfg-common.h mplayer-1.0~rc4.dfsg1+svn34540/cfg-common.h --- mplayer-1.0~rc4.dfsg1+svn33713/cfg-common.h 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/cfg-common.h 2011-10-25 20:18:35.000000000 +0000 @@ -34,6 +34,7 @@ #include "libmpdemux/mf.h" #include "libpostproc/postprocess.h" #include "sub/sub.h" +#include "sub/unrar_exec.h" #include "osdep/priority.h" #include "stream/cdd.h" #include "stream/network.h" @@ -304,7 +305,7 @@ #ifdef CONFIG_ICONV {"msgcharset", &mp_msg_charset, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, #endif - {"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, + {"include", cfg_include, CONF_TYPE_FUNC_PARAM_IMMEDIATE, CONF_NOSAVE, 0, 0, NULL}, #ifdef CONFIG_PRIORITY {"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif @@ -589,6 +590,11 @@ {"utf8", &sub_utf8, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noutf8", &sub_utf8, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"forcedsubsonly", &forced_subs_only, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, + {"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL}, +#ifdef CONFIG_UNRAR_EXEC + {"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL}, +#endif // specify IFO file for VOBSUB subtitle {"ifo", &spudec_ifo, CONF_TYPE_STRING, 0, 0, 0, NULL}, // enable Closed Captioning display diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/cfg-mplayer.h mplayer-1.0~rc4.dfsg1+svn34540/cfg-mplayer.h --- mplayer-1.0~rc4.dfsg1+svn33713/cfg-mplayer.h 2011-06-07 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/cfg-mplayer.h 2011-12-11 14:54:56.000000000 +0000 @@ -35,7 +35,6 @@ #include "libvo/vo_fbdev.h" #include "libvo/vo_zr.h" #include "mp_fifo.h" -#include "sub/unrar_exec.h" const m_option_t vd_conf[]={ @@ -256,13 +255,6 @@ {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL}, #endif /* CONFIG_MENU */ - // these should be moved to -common, and supported in MEncoder - {"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, - {"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL}, -#ifdef CONFIG_UNRAR_EXEC - {"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL}, -#endif - {"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, {"framedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 1, NULL}, @@ -300,8 +292,8 @@ {"lircconf", &lirc_configfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, #endif - {"gui", "The -gui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1}, - {"nogui", "The -nogui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1}, + {"gui", "The -gui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, PRIV_NO_EXIT}, + {"nogui", "The -nogui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, PRIV_NO_EXIT}, #ifdef CONFIG_GUI {"skin", &skinName, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, @@ -309,7 +301,7 @@ {"noenqueue", &enqueue, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"guiwid", "-guiwid has been removed, use -gui-wid instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"gui-wid", &guiWinID, CONF_TYPE_INT, 0, 0, 0, NULL}, - {"gui-include", cfg_gui_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, + {"gui-include", cfg_gui_include, CONF_TYPE_FUNC_PARAM, CONF_NOCFG|CONF_NOSAVE, 0, 0, NULL}, #endif {"noloop", &mpctx_s.loop_times, CONF_TYPE_FLAG, 0, 0, -1, NULL}, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/Changelog mplayer-1.0~rc4.dfsg1+svn34540/Changelog --- mplayer-1.0~rc4.dfsg1+svn33713/Changelog 2011-05-25 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/Changelog 2011-12-11 14:43:16.000000000 +0000 @@ -8,13 +8,23 @@ Demuxers: * experimental support for using binary Quicktime codecs with -demuxer lavf. + * correct runtime and average bitrate for VBR (variable bitrate) MP3 Filters: * delogo: allow to change the rectangle based on the time. + * lavfi: libavfilter filter graphs (experimental). Other: + * support adding noise at output resolution with -vo gl:noise-strength=8 * experimental support for PGS (BluRay-compatible), DVB and XSUB subtitles. * experimental af_cmdline slave command to change e.g. audio equalizer options at runtime. + * vo x11: don't hide or show cursor any more if attached to an existing window (-wid) + + GUI: + * all skin messages available as slave commands (gui ) + + Ports: + * Wine (see DOCS/tech/crosscompile.txt) MEncoder: * -force-key-frames option to set explicit seek points. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/codec-cfg.c mplayer-1.0~rc4.dfsg1+svn34540/codec-cfg.c --- mplayer-1.0~rc4.dfsg1+svn33713/codec-cfg.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/codec-cfg.c 2012-01-05 20:32:10.000000000 +0000 @@ -162,68 +162,74 @@ // note: due to parser deficiencies/simplicity, if one format // name matches the beginning of another, the longer one _must_ // come first in this list. - {"YV12", IMGFMT_YV12}, - {"I420", IMGFMT_I420}, - {"IYUV", IMGFMT_IYUV}, - {"NV12", IMGFMT_NV12}, - {"NV21", IMGFMT_NV21}, - {"YVU9", IMGFMT_YVU9}, - {"IF09", IMGFMT_IF09}, - {"444P16LE", IMGFMT_444P16_LE}, - {"444P16BE", IMGFMT_444P16_BE}, - {"422P16LE", IMGFMT_422P16_LE}, - {"422P16BE", IMGFMT_422P16_BE}, - {"420P16LE", IMGFMT_420P16_LE}, - {"420P16BE", IMGFMT_420P16_BE}, - {"444P16", IMGFMT_444P16}, - {"422P16", IMGFMT_422P16}, - {"422P10", IMGFMT_422P10}, - {"420P16", IMGFMT_420P16}, - {"420P10", IMGFMT_420P10}, - {"420P9", IMGFMT_420P9}, - {"420A", IMGFMT_420A}, - {"444P", IMGFMT_444P}, - {"422P", IMGFMT_422P}, - {"411P", IMGFMT_411P}, - {"440P", IMGFMT_440P}, - {"Y800", IMGFMT_Y800}, - {"Y8", IMGFMT_Y8}, - - {"YUY2", IMGFMT_YUY2}, - {"UYVY", IMGFMT_UYVY}, - {"YVYU", IMGFMT_YVYU}, - - {"RGB48LE", IMGFMT_RGB48LE}, - {"RGB48BE", IMGFMT_RGB48BE}, - {"RGB4", IMGFMT_RGB4}, - {"RGB8", IMGFMT_RGB8}, - {"RGB15", IMGFMT_RGB15}, - {"RGB16", IMGFMT_RGB16}, - {"RGB24", IMGFMT_RGB24}, - {"RGB32", IMGFMT_RGB32}, - {"BGR4", IMGFMT_BGR4}, - {"BGR8", IMGFMT_BGR8}, - {"BGR15", IMGFMT_BGR15}, - {"BGR16", IMGFMT_BGR16}, - {"BGR24", IMGFMT_BGR24}, - {"BGR32", IMGFMT_BGR32}, - {"RGB1", IMGFMT_RGB1}, - {"BGR1", IMGFMT_BGR1}, - - {"MPES", IMGFMT_MPEGPES}, - {"ZRMJPEGNI", IMGFMT_ZRMJPEGNI}, - {"ZRMJPEGIT", IMGFMT_ZRMJPEGIT}, - {"ZRMJPEGIB", IMGFMT_ZRMJPEGIB}, - - {"IDCT_MPEG2",IMGFMT_XVMC_IDCT_MPEG2}, - {"MOCO_MPEG2",IMGFMT_XVMC_MOCO_MPEG2}, - - {"VDPAU_MPEG1",IMGFMT_VDPAU_MPEG1}, - {"VDPAU_MPEG2",IMGFMT_VDPAU_MPEG2}, - {"VDPAU_H264",IMGFMT_VDPAU_H264}, - {"VDPAU_WMV3",IMGFMT_VDPAU_WMV3}, - {"VDPAU_VC1",IMGFMT_VDPAU_VC1}, - {"VDPAU_MPEG4",IMGFMT_VDPAU_MPEG4}, + {"YV12", IMGFMT_YV12}, + {"I420", IMGFMT_I420}, + {"IYUV", IMGFMT_IYUV}, + {"NV12", IMGFMT_NV12}, + {"NV21", IMGFMT_NV21}, + {"YVU9", IMGFMT_YVU9}, + {"IF09", IMGFMT_IF09}, + {"444P16LE", IMGFMT_444P16_LE}, + {"444P16BE", IMGFMT_444P16_BE}, + {"444P10LE", IMGFMT_444P10_LE}, + {"444P10BE", IMGFMT_444P10_BE}, + {"422P16LE", IMGFMT_422P16_LE}, + {"422P16BE", IMGFMT_422P16_BE}, + {"420P16LE", IMGFMT_420P16_LE}, + {"420P16BE", IMGFMT_420P16_BE}, + {"444P16", IMGFMT_444P16}, + {"444P10", IMGFMT_444P10}, + {"444P9", IMGFMT_444P9}, + {"422P16", IMGFMT_422P16}, + {"422P10", IMGFMT_422P10}, + {"422P9", IMGFMT_422P9}, + {"420P16", IMGFMT_420P16}, + {"420P10", IMGFMT_420P10}, + {"420P9", IMGFMT_420P9}, + {"420A", IMGFMT_420A}, + {"444P", IMGFMT_444P}, + {"422P", IMGFMT_422P}, + {"411P", IMGFMT_411P}, + {"440P", IMGFMT_440P}, + {"Y800", IMGFMT_Y800}, + {"Y8", IMGFMT_Y8}, + + {"YUY2", IMGFMT_YUY2}, + {"UYVY", IMGFMT_UYVY}, + {"YVYU", IMGFMT_YVYU}, + + {"RGB48LE", IMGFMT_RGB48LE}, + {"RGB48BE", IMGFMT_RGB48BE}, + {"RGB4", IMGFMT_RGB4}, + {"RGB8", IMGFMT_RGB8}, + {"RGB15", IMGFMT_RGB15}, + {"RGB16", IMGFMT_RGB16}, + {"RGB24", IMGFMT_RGB24}, + {"RGB32", IMGFMT_RGB32}, + {"BGR4", IMGFMT_BGR4}, + {"BGR8", IMGFMT_BGR8}, + {"BGR15", IMGFMT_BGR15}, + {"BGR16", IMGFMT_BGR16}, + {"BGR24", IMGFMT_BGR24}, + {"BGR32", IMGFMT_BGR32}, + {"RGB1", IMGFMT_RGB1}, + {"BGR1", IMGFMT_BGR1}, + {"GBR24P", IMGFMT_GBR24P}, + + {"MPES", IMGFMT_MPEGPES}, + {"ZRMJPEGNI", IMGFMT_ZRMJPEGNI}, + {"ZRMJPEGIT", IMGFMT_ZRMJPEGIT}, + {"ZRMJPEGIB", IMGFMT_ZRMJPEGIB}, + + {"IDCT_MPEG2", IMGFMT_XVMC_IDCT_MPEG2}, + {"MOCO_MPEG2", IMGFMT_XVMC_MOCO_MPEG2}, + + {"VDPAU_MPEG1", IMGFMT_VDPAU_MPEG1}, + {"VDPAU_MPEG2", IMGFMT_VDPAU_MPEG2}, + {"VDPAU_H264", IMGFMT_VDPAU_H264}, + {"VDPAU_WMV3", IMGFMT_VDPAU_WMV3}, + {"VDPAU_VC1", IMGFMT_VDPAU_VC1}, + {"VDPAU_MPEG4", IMGFMT_VDPAU_MPEG4}, {NULL, 0} }; @@ -555,10 +561,10 @@ #endif } - mp_msg(MSGT_CODECCFG,MSGL_V,MSGTR_ReadingFile, cfgfile); + mp_msg(MSGT_CODECCFG, MSGL_V, "Reading optional codecs config file %s: ", cfgfile); if ((fp = fopen(cfgfile, "r")) == NULL) { - mp_msg(MSGT_CODECCFG,MSGL_V,MSGTR_CantOpenFileError, cfgfile, strerror(errno)); + mp_msg(MSGT_CODECCFG, MSGL_V, "%s\n", strerror(errno)); return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/command.c mplayer-1.0~rc4.dfsg1+svn34540/command.c --- mplayer-1.0~rc4.dfsg1+svn33713/command.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/command.c 2011-12-31 12:20:08.000000000 +0000 @@ -28,6 +28,7 @@ #include "libmpdemux/demuxer.h" #include "libmpdemux/stheader.h" #include "codec-cfg.h" +#include "mp_msg.h" #include "mplayer.h" #include "sub/sub.h" #include "m_option.h" @@ -214,7 +215,7 @@ } -/// \defgroup Properties +/// \defgroup properties Properties ///@{ /// \defgroup GeneralProperties General properties @@ -514,6 +515,17 @@ return M_PROPERTY_OK; } +/// Number of titles in file +static int mp_property_titles(m_option_t *prop, int action, void *arg, + MPContext *mpctx) +{ + if (!mpctx->demuxer) + return M_PROPERTY_UNAVAILABLE; + if (mpctx->demuxer->num_titles == 0) + stream_control(mpctx->demuxer->stream, STREAM_CTRL_GET_NUM_TITLES, &mpctx->demuxer->num_titles); + return m_property_int_ro(prop, action, arg, mpctx->demuxer->num_titles); +} + /// Number of chapters in file static int mp_property_chapters(m_option_t *prop, int action, void *arg, MPContext *mpctx) @@ -1075,7 +1087,7 @@ case M_PROPERTY_STEP_DOWN: #ifdef CONFIG_GUI if (use_gui) - guiGetEvent(guiIEvent, (char *) MP_CMD_VO_FULLSCREEN); + gui(GUI_RUN_COMMAND, (void *) MP_CMD_VO_FULLSCREEN); else #endif if (vo_config_count) @@ -2141,6 +2153,8 @@ M_OPT_MIN, 0, 0, NULL }, { "chapter", mp_property_chapter, CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, + { "titles", mp_property_titles, CONF_TYPE_INT, + 0, 0, 0, NULL }, { "chapters", mp_property_chapters, CONF_TYPE_INT, 0, 0, 0, NULL }, { "angle", mp_property_angle, CONF_TYPE_INT, @@ -2495,6 +2509,7 @@ } return "UNKNOWN"; } +///@} static void remove_subtitle_range(MPContext *mpctx, int start, int count) { @@ -2558,7 +2573,7 @@ static void overlay_add(char *file, int id, int x, int y, unsigned col) { FILE *f; - unsigned w, h, bpp, maxval; + int w, h, bpp, maxval; uint8_t *data; struct mp_eosd_image *img; @@ -2801,10 +2816,10 @@ int i = 0; if (n > 0) for (i = 0; i < n; i++) - uiNext(); + gui(GUI_RUN_COMMAND, (void *)MP_CMD_PLAY_TREE_STEP); else for (i = 0; i < -1 * n; i++) - uiPrev(); + gui(GUI_RUN_COMMAND, (void *)-MP_CMD_PLAY_TREE_STEP); } else #endif { @@ -2966,7 +2981,7 @@ #ifdef CONFIG_GUI // playtree_iter isn't used by the GUI if (use_gui) - uiStop(); + gui(GUI_RUN_COMMAND, (void *)MP_CMD_STOP); else #endif // Go back to the starting point. @@ -3509,6 +3524,11 @@ break; default: +#ifdef CONFIG_GUI + if (use_gui && cmd->id == MP_CMD_GUI) + gui(GUI_RUN_MESSAGE, cmd->args[0].v.s); + else +#endif mp_msg(MSGT_CPLAYER, MSGL_V, "Received unknown cmd %s\n", cmd->name); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/configure mplayer-1.0~rc4.dfsg1+svn34540/configure --- mplayer-1.0~rc4.dfsg1+svn33713/configure 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/configure 2012-01-05 15:41:59.000000000 +0000 @@ -31,34 +31,34 @@ # # _feature : should have a value of yes/no/auto # def_feature : '#define ... 1' or '#undef ...' for conditional compilation -# _ld_feature : '-L/path/dir -lfeature' GCC options +# ld_feature : '-L/path/dir -lfeature' GCC options # ############################################################################# - if test -e ffmpeg/.svn ; then +if test -e ffmpeg/.svn ; then echo "You have an outdated FFmpeg SVN checkout in ffmpeg/, please (re)move or replace it" exit 1 - fi +fi - if test -e ffmpeg/mp_auto_pull ; then +if test -e ffmpeg/mp_auto_pull ; then if ! (cd ffmpeg && git pull --rebase --ff-only) ; then - echo "git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling" - exit 1 + echo "git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling" + exit 1 fi - fi +fi - if ! test -e ffmpeg ; then +if ! test -e ffmpeg ; then echo "No FFmpeg checkout, press enter to download one with git or CTRL+C to abort" read tmp if ! git clone --depth 1 git://git.videolan.org/ffmpeg.git ffmpeg ; then - rm -rf ffmpeg - echo "Failed to get a FFmpeg checkout" - exit 1 + rm -rf ffmpeg + echo "Failed to get a FFmpeg checkout" + exit 1 fi touch ffmpeg/mp_auto_pull - fi +fi -# Prevent locale nonsense from breaking basic text processing utils +# Prevent locale nonsense from breaking basic text processing utilities export LC_ALL=C # Store the configure line that was used @@ -72,9 +72,9 @@ echo >> "$TMPLOG" cat "$source" >> "$TMPLOG" echo >> "$TMPLOG" - echo "$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS $source $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@" >> "$TMPLOG" + echo "$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS $source $extra_cflags $ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@" >> "$TMPLOG" rm -f "$TMPEXE" - $_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS "$source" $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1 + $_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS "$source" $extra_cflags $ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1 TMPRES="$?" echo >> "$TMPLOG" echo >> "$TMPLOG" @@ -89,6 +89,22 @@ compile_check $TMPCPP $@ -lstdc++ } +cpp_condition_check() { + inc="" + if test -n "$1" ; then + inc="#include <$1>" + fi + cat > $TMPC << EOF +$inc +#if !($2) +#error condition not true: $2 +#endif +int main(void) { return 0; } +EOF + shift 2 + compile_check $TMPC $@ +} + cflag_check() { cat > $TMPC << EOF int main(void) { return 0; } @@ -152,7 +168,7 @@ } # The following checks are special and should only be used with broken and -# non-selfsufficient headers that do not include all of their dependencies. +# non-self-sufficient headers that do not include all of their dependencies. header_check_broken() { cat > $TMPC << EOF @@ -192,7 +208,7 @@ "$TMPEXE" >> "$TMPLOG" 2>&1 } -# Display error message, flushes tempfile, exit +# Display error message, flush temporary file, exit. die () { echo echo "Error: $@" >&2 @@ -208,7 +224,6 @@ } aix() { issystem "AIX"; } amigaos() { issystem "AmigaOS"; } -beos() { issystem "BEOS"; } bsdos() { issystem "BSD/OS"; } cygwin() { issystem "CYGWIN"; } darwin() { issystem "Darwin"; } @@ -225,7 +240,8 @@ os2() { issystem "OS/2"; } qnx() { issystem "QNX"; } sunos() { issystem "SunOS"; } -win32() { cygwin || mingw32; } +wine() { issystem "Wine"; } +win32() { cygwin || mingw32 || wine; } # arch test boolean functions # x86/x86pc is used by QNX @@ -249,7 +265,7 @@ ppc() { case "$host_arch" in - ppc|ppc64|powerpc|powerpc64) return 0;; + ppc*|powerpc*) return 0;; *) return 1;; esac } @@ -399,6 +415,7 @@ --disable-libnut disable libnut [autodetect] --disable-ffmpeg_a disable static FFmpeg [autodetect] --disable-ffmpeg_so disable shared FFmpeg [autodetect] + --enable-vf-lavfi enable libavfilter wrapper [disabled] --disable-libavcodec_mpegaudio_hp disable high precision audio decoding in libavcodec [enabled] --disable-tremor-internal disable internal Tremor [enabled] @@ -429,7 +446,7 @@ --enable-musepack enable libmpcdec support (deprecated in favour of libavcodec) [disabled] --disable-libopencore_amrnb disable libopencore_amr narrowband [autodetect] --disable-libopencore_amrwb disable libopencore_amr wideband [autodetect] - --disable-libopenjpeg disable OpenJPEG (JPEG2000) input/output support [autodetect] + --disable-libopenjpeg disable OpenJPEG (JPEG 2000) input/output support [autodetect] --disable-crystalhd disable CrystalHD support [autodetect] --disable-decoder=DECODER disable specified FFmpeg decoder --enable-decoder=DECODER enable specified FFmpeg decoder @@ -561,6 +578,7 @@ --enable-armvfp enable ARM VFP (ARM) [autodetect] --enable-vfpv3 enable ARM VFPV3 (ARM) [autodetect] --enable-neon enable NEON (ARM) [autodetect] + --enable-thumb enable THUMB (ARM) [autodetect] --enable-iwmmxt enable iWMMXt (ARM) [autodetect] --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable] --enable-hardcoded-tables put tables in binary instead of calculating them at startup [disable] @@ -613,6 +631,7 @@ _armvfp=auto vfpv3=auto neon=auto +armthumb=auto _iwmmxt=auto _mtrr=auto _altivec=auto @@ -630,6 +649,7 @@ _prefix="/usr/local" ffmpeg_a=auto ffmpeg_so=auto +_vf_lavfi=no _libavcodec_mpegaudio_hp=yes _libopencore_amrnb=auto _libopencore_amrwb=auto @@ -651,6 +671,9 @@ libavmuxers=$(echo $libavmuxers_all | sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s/RTP_MUXER// -e s/RTSP_MUXER// -e s/SAP_MUXER//) libavprotocols_all=$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]') libavprotocols=$libavprotocols_all +libavprotocols=$(echo $libavprotocols | sed -e s/HTTPS_PROTOCOL// -e s/TLS_PROTOCOL//) +libavfilters_all=$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' ffmpeg/libavfilter/allfilters.c | tr '[a-z]' '[A-Z]') +libavfilters=$(echo $libavfilters_all | sed -e 's/ LIB[A-Z0-9_]*_FILTER//g' -e 's/ FREI0R[A-Z0-9_]*_FILTER//g' -e 's/ OCV_FILTER//g' -e 's/ MP_FILTER//g') _mencoder=yes _mplayer=yes _x11=auto @@ -845,7 +868,7 @@ def_stream_cache="#define CONFIG_STREAM_CACHE 1" def_priority="#undef CONFIG_PRIORITY" def_pthread_cache="#undef PTHREAD_CACHE" -need_shmem=yes +shmem=no for ac_option do case "$ac_option" in --help|-help|-h) @@ -959,10 +982,10 @@ ;; --enable-static) - _ld_static='-static' + ld_static='-static' ;; --disable-static) - _ld_static='' + ld_static='' ;; --enable-profile) _profile='-p' @@ -1253,10 +1276,14 @@ --disable-demuxer=*) libavdemuxers=$(echo $libavdemuxers | sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;; --enable-muxer=*) libavmuxers="$libavmuxers $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;; --disable-muxer=*) libavmuxers=$(echo $libavmuxers | sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;; + --enable-filter=*) libavfilters="$libavfilters $(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')" ;; + --disable-filter=*) libavfilters=$(echo $libavfilters | sed "s/$(echo $ac_option | cut -d '=' -f 2 | tr '[a-z]' '[A-Z]')//g") ;; --enable-ffmpeg_a) ffmpeg_a=yes ;; --disable-ffmpeg_a) ffmpeg_a=no ;; --enable-ffmpeg_so) ffmpeg_so=yes ;; --disable-ffmpeg_so) ffmpeg_so=no ;; + --enable-vf-lavfi) _vf_lavfi=yes ;; + --disable-vf-lavfi) _vf_lavfi=no ;; --enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp=yes ;; --disable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp=no ;; @@ -1410,10 +1437,12 @@ --disable-vfpv3) vfpv3=no ;; --enable-neon) neon=yes ;; --disable-neon) neon=no ;; + --enable-thumb) armthumb=yes ;; + --disable-thumb) armthumb=no ;; --enable-iwmmxt) _iwmmxt=yes ;; --disable-iwmmxt) _iwmmxt=no ;; --enable-mmx) _mmx=yes ;; - --disable-mmx) # 3Dnow! and MMX2 require MMX + --disable-mmx) # 3DNow! and MMX2 require MMX _3dnow=no _3dnowext=no _mmx=no _mmxext=no ;; *) @@ -1436,10 +1465,7 @@ # OS name system_name=$(uname -s 2>&1) case "$system_name" in - Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS) - ;; - Haiku) - system_name=BeOS + Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD/OS|Darwin|SunOS|QNX|GNU|MorphOS|AIX|AmigaOS|Haiku) ;; IRIX*) system_name=IRIX @@ -1466,25 +1492,10 @@ # host's CPU/instruction set - host_arch=$(uname -p 2>&1) - case "$host_arch" in - i386|sparc|ppc|alpha|arm|mips|vax) - ;; - powerpc) # Darwin returns 'powerpc' - host_arch=ppc - ;; - *) # uname -p on Linux returns 'unknown' for the processor type, - # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)' - - # Maybe uname -m (machine hardware name) returns something we - # recognize. - - # x86/x86pc is used by QNX - case "$(uname -m 2>&1)" in - x86_64|amd64|i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;; + case "$(uname -m 2>&1)" in + x86_64|amd64|i[3-9]86*|i86pc|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;; ia64) host_arch=ia64 ;; - macppc|ppc) host_arch=ppc ;; - ppc64) host_arch=ppc64 ;; + macppc|ppc*|Power*) host_arch=ppc ;; alpha) host_arch=alpha ;; sparc) host_arch=sparc ;; sparc64) host_arch=sparc64 ;; @@ -1497,8 +1508,6 @@ vax) host_arch=vax ;; xtensa*) host_arch=xtensa ;; *) host_arch=UNKNOWN ;; - esac - ;; esac else # if test -z "$_target" system_name=$(echo $_target | cut -d '-' -f 2) @@ -1515,6 +1524,7 @@ morphos) system_name=MorphOS ;; amigaos) system_name=AmigaOS ;; mingw32*) system_name=MINGW32 ;; + wine) system_name=Wine ;; esac # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed host_arch=$(echo $_target | cut -d '-' -f 1) @@ -1524,17 +1534,9 @@ fi extra_cflags="-I. -Iffmpeg $extra_cflags" +extra_ldflags="-lm $extra_ldflags" _timer=timer-linux.c _getch=getch2.c -if freebsd ; then - extra_ldflags="$extra_ldflags -L/usr/local/lib" - extra_cflags="$extra_cflags -I/usr/local/include" -fi - -if netbsd || dragonfly ; then - extra_ldflags="$extra_ldflags -L/usr/pkg/lib" - extra_cflags="$extra_cflags -I/usr/pkg/include" -fi if darwin; then extra_cflags="-mdynamic-no-pic $extra_cflags" @@ -1568,7 +1570,7 @@ if mingw32 ; then _getch=getch2-win.c - need_shmem=no + shmem=yes fi if amigaos ; then @@ -1586,12 +1588,16 @@ if os2 ; then _exesuf=".exe" _getch=getch2-os2.c - need_shmem=no + shmem=yes _priority=yes def_dos_paths="#define HAVE_DOS_PATHS 1" def_priority="#define CONFIG_PRIORITY 1" fi +if wine ; then + extra_cflags="-fno-pic -UWIN32 -U_WIN32 -U__WIN32 -U__WIN32__ -DWINE_NOWINSOCK -Dstricmp=strcasecmp $extra_cflags" +fi + for tmpdir in "$TMPDIR" "$TEMPDIR" "/tmp" ; do test "$tmpdir" && break done @@ -1631,7 +1637,7 @@ cc_version="v. ?.??, bad" cc_fail=yes ;; - 10.1|11.0|11.1) + 10.1|11.1|12.0) cc_version="$cc_version, ok" ;; *) @@ -1661,8 +1667,7 @@ echores "$cc_version" break fi - cc_name_tmp=$($_cc -v 2>&1 | head -n 1 | cut -d ' ' -f 1) - if test "$cc_name_tmp" = "clang"; then + if $_cc -v 2>&1 | grep -q "clang"; then echocheck "$_cc version" cc_vendor=clang cc_version=$($_cc -dumpversion 2>&1) @@ -1687,15 +1692,20 @@ cflag_check "" || die "Compiler is not functioning correctly. Check your installation and custom CFLAGS $CFLAGS ." echo "yes" -if test -z "$_target" && x86 ; then +if test -z "$_target" ; then cat > $TMPC << EOF int main(void) { int test[(int)sizeof(char *)-7]; return 0; } EOF +if x86 ; then cc_check && host_arch=x86_64 || host_arch=i386 fi +if ppc ; then + cc_check && host_arch=ppc64 || host_arch=ppc +fi +fi echo "Detected operating system: $system_name" echo "Detected host architecture: $host_arch" @@ -1732,20 +1742,20 @@ test -z "$_nm" && _nm=nm fi -# XXX: this should be ok.. +# XXX: this should be OK.. _cpuinfo="echo" if test "$_runtime_cpudetection" = no ; then # Cygwin has /proc/cpuinfo, but only supports Intel CPUs -# FIXME: Remove the cygwin check once AMD CPUs are supported +# FIXME: Remove the Cygwin check once AMD CPUs are supported if test -r /proc/cpuinfo && ! cygwin; then # Linux with /proc mounted, extract CPU information from it _cpuinfo="cat /proc/cpuinfo" elif test -r /compat/linux/proc/cpuinfo && ! x86 ; then # FreeBSD with Linux emulation /proc mounted, # extract CPU information from it - # Don't use it on x86 though, it never reports 3Dnow + # Don't use it on x86 though, it never reports 3DNow! _cpuinfo="cat /compat/linux/proc/cpuinfo" elif darwin && ! x86 ; then # use hostinfo on Darwin @@ -1760,11 +1770,6 @@ _cpuinfo="./cpuinfo$_exesuf" fi -if [ "$cc_vendor" = "gnu" ] && [ "$_cc_major" = 2 ] ; then - test $_win32dll = auto && _win32dll=no - ass_internal=no -fi - if x86 ; then # gather more CPU information pname=$($_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -n 1) @@ -1777,14 +1782,13 @@ pparam=$(echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \ -e s/xmm/sse/ -e s/kni/sse/) + # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag. + pparam=$(echo $pparam | sed -e 's/sse/sse mmxext/') for ext in $pparam ; do eval test \"\$_$ext\" = auto 2>/dev/null && eval _$ext=kernel_check done - # SSE implies MMX2, but not all SSE processors report the mmxext CPU flag. - test $_sse = kernel_check && _mmxext=kernel_check - echocheck "CPU vendor" echores "$pvendor ($pfamily:$pmodel:$pstepping)" @@ -1841,9 +1845,9 @@ echores "$_mtrr" if test "$_gcc3_ext" != ""; then - # if we had to disable sse/sse2 because the active kernel does not + # If we had to disable SSE/SSE2 because the active kernel does not # support this instruction set extension, we also have to tell - # gcc3 to not generate sse/sse2 instructions for normal C code + # gcc3 to not generate SSE/SSE2 instructions for normal C code. cflag_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext" fi @@ -1902,7 +1906,7 @@ fi ;; 15) iproc=686 - # k8 cpu-type only supported in gcc >= 3.4.0, but that will be + # k8 CPU type only supported in gcc >= 3.4.0, but that will be # caught and remedied in the optimization tests below. proc=k8 ;; @@ -2112,6 +2116,8 @@ subarch='x86_64' def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1' def_av_fast_unaligned='#define AV_HAVE_FAST_UNALIGNED 1' + def_local_aligned_8='#define HAVE_LOCAL_ALIGNED_8 1' + def_local_aligned_16='#define HAVE_LOCAL_ALIGNED_16 1' def_fast_64bit='#define HAVE_FAST_64BIT 1' iproc='x86_64' @@ -2161,7 +2167,7 @@ if test "$proc" = "k8"; then cflag_check -march=$proc $cpuopt=$proc || proc=athlon-xp fi - # This will fail if gcc version < 3.3, which is ok because earlier + # This will fail if gcc version < 3.3, which is OK because earlier # versions don't really support 64-bit on amd64. # Is this a valid assumption? -Corey if test "$proc" = "athlon-xp"; then @@ -2249,7 +2255,7 @@ iproc='sh4' ;; - ppc|ppc64|powerpc|powerpc64) + ppc*|powerpc*) arch='ppc' def_dcbzl='#define HAVE_DCBZL 0' def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1' @@ -2258,7 +2264,7 @@ def_local_aligned_16='#define HAVE_LOCAL_ALIGNED_16 1' iproc='ppc' - if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then + if test "$host_arch" = "ppc64" ; then subarch='ppc64' def_fast_64bit='#define HAVE_FAST_64BIT 1' fi @@ -2539,17 +2545,6 @@ cflag_check -pipe -I. && _pipe="-pipe" && echores "yes" || echores "no" -echocheck "compiler support of named assembler arguments" -_named_asm_args=yes -def_named_asm_args="#define NAMED_ASM_ARGS 1" -if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 \ - -o "$_cc_major" -eq 3 -a "$_cc_minor" = 0 ; then - _named_asm_args=no - def_named_asm_args="#undef NAMED_ASM_ARGS" -fi -echores $_named_asm_args - - if darwin && test "$cc_vendor" = "gnu" ; then echocheck "GCC support of -mstackrealign" # GCC 4.2 and some earlier Apple versions support this flag on x86. Since @@ -2587,7 +2582,8 @@ CFLAGS="-O2 $_march $_mcpu $_pipe" else CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" - WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror-implicit-function-declaration" + WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls" + WARN_CFLAGS="-Werror-implicit-function-declaration" extra_ldflags="$extra_ldflags -ffast-math" fi else @@ -2679,24 +2675,19 @@ echocheck "PIC" def_pic='#define CONFIG_PIC 0' pic=no -cat > $TMPC << EOF -int main(void) { -#if !(defined(__PIC__) || defined(__pic__) || defined(PIC)) -#error PIC not enabled -#endif - return 0; -} -EOF -cc_check && pic=yes && extra_cflags="$extra_cflags -DPIC" && - def_pic='#define CONFIG_PIC 0' +cpp_condition_check '' 'defined(__PIC__) || defined(__pic__) || defined(PIC)' && + pic=yes && extra_cflags="$extra_cflags -DPIC" && def_pic='#define CONFIG_PIC 1' echores $pic def_bswap='#define HAVE_BSWAP 0' def_ebx_available='#define HAVE_EBX_AVAILABLE 0' -def_ten_operands='#define HAVE_TEN_OPERANDS 0' def_xmm_clobbers='#define HAVE_XMM_CLOBBERS 0' +if x86_64 ; then +inline_asm_check '"mov (%eax), %eax"' || die "Your binutils version is too old to compile for 64-bit" +fi + if x86 ; then echocheck ".align is a power of two" @@ -2712,21 +2703,6 @@ echores $_asmalign_pot -echocheck "10 assembler operands" -ten_operands=no -cat > $TMPC << EOF -int main(void) { - int x=0; - __asm__ volatile( - "" - :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x) - ); - return 0; -} -EOF -cc_check && ten_operands=yes && def_ten_operands='#define HAVE_TEN_OPERANDS 1' -echores $ten_operands - echocheck "ebx availability" ebx_available=no cat > $TMPC << EOF @@ -2751,7 +2727,7 @@ if test -z "$YASMFLAGS" ; then if darwin ; then x86_64 && objformat="macho64" || objformat="macho" - elif win32 ; then + elif win32 && ! wine ; then objformat="win32" elif os2 ; then _yasm=nasm @@ -2803,14 +2779,17 @@ echocheck "xmm clobbers" -inline_asm_check '"":::"%xxxmm0"' && +inline_asm_check '"":::"%xmm0"' && def_xmm_clobbers='#define HAVE_XMM_CLOBBERS 1' && xmm_clobbers=yes || xmm_clobbers=no echores "$xmm_clobbers" +else + _yasm='' + def_yasm='#define HAVE_YASM 0' + have_yasm="no" fi #if x86 - #FIXME: This should happen before the check for CFLAGS.. def_altivec_h='#define HAVE_ALTIVEC_H 0' if ppc && ( test "$_altivec" = yes || test "$_runtime_cpudetection" = yes ) ; then @@ -2879,11 +2858,6 @@ fi if arm ; then - echocheck "ARM pld instruction" - pld=no - inline_asm_check '"pld [r0]"' && pld=yes - echores "$pld" - echocheck "ARMv5TE (Enhanced DSP Extensions)" if test $_armv5te = "auto" ; then _armv5te=no @@ -2921,6 +2895,16 @@ fi echores "$vfpv3" + echocheck "softfloat ABI" + softfloat=yes + cpp_condition_check '' 'defined(__ARM_PCS_VFP) || (!defined(__ARM_PCS) && !defined(__SOFTFP__))' && softfloat=no + if test $softfloat = "yes" ; then + def_vfp_args='#define HAVE_VFP_ARGS 0' + else + def_vfp_args='#define HAVE_VFP_ARGS 1' + fi + echores "$softfloat" + echocheck "ARM NEON" if test $neon = "auto" ; then neon=no @@ -2928,6 +2912,19 @@ fi echores "$neon" + echocheck "ARM THUMB" + if test $armthumb = "auto" ; then + armthumb=no + fi + if test $armthumb = "yes" ; then + extra_cflags="$extra_cflags -mthumb" + def_armthumb='#define CONFIG_THUMB 1' + else + extra_cflags="$extra_cflags -marm" + def_armthumb='#define CONFIG_THUMB 0' + fi + echores "$armthumb" + echocheck "iWMMXt (Intel XScale SIMD instructions)" if test $_iwmmxt = "auto" ; then _iwmmxt=no @@ -2936,7 +2933,7 @@ echores "$_iwmmxt" fi -cpuexts_all='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV FAST_CLZ PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP VFPV3 NEON IWMMXT MMI VIS MVI' +cpuexts_all='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV FAST_CLZ ARMV5TE ARMV6 ARMV6T2 ARMVFP VFPV3 NEON IWMMXT MMI VIS MVI' test "$_altivec" = yes && cpuexts="ALTIVEC $cpuexts" test "$_mmx" = yes && cpuexts="MMX $cpuexts" test "$_mmxext" = yes && cpuexts="MMX2 $cpuexts" @@ -2948,7 +2945,6 @@ test "$_cmov" = yes && cpuexts="CMOV $cpuexts" test "$_fast_cmov" = yes && cpuexts="FAST_CMOV $cpuexts" test "$_fast_clz" = yes && cpuexts="FAST_CLZ $cpuexts" -test "$pld" = yes && cpuexts="PLD $cpuexts" test "$_armv5te" = yes && cpuexts="ARMV5TE $cpuexts" test "$_armv6" = yes && cpuexts="ARMV6 $cpuexts" test "$_armv6t2" = yes && cpuexts="ARMV6T2 $cpuexts" @@ -2990,24 +2986,6 @@ ###################### -echocheck "-lposix" -if cflag_check -lposix ; then - extra_ldflags="$extra_ldflags -lposix" - echores "yes" -else - echores "no" -fi - -echocheck "-lm" -if cflag_check -lm ; then - _ld_lm="-lm" - echores "yes" -else - _ld_lm="" - echores "no" -fi - - echocheck "langinfo" if test "$_langinfo" = auto ; then _langinfo=no @@ -3129,19 +3107,10 @@ echores "$_kstat" -echocheck "posix4" -# required for nanosleep on some systems -_posix4=no -statement_check time.h 'nanosleep(0, 0)' -lposix4 && _posix4=yes -if test "$_posix4" = yes ; then - extra_ldflags="$extra_ldflags -lposix4" -fi -echores "$_posix4" - -for func in exp2 exp2f llrint llrintf log2 log2f lrint lrintf round roundf truncf; do +for func in cbrtf exp2 exp2f llrint llrintf log2 log2f lrint lrintf round roundf trunc truncf; do echocheck $func eval _$func=no -statement_check math.h "${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _$func=yes +statement_check math.h "${func}(2.0)" -D_ISOC99_SOURCE && eval _$func=yes if eval test "x\$_$func" = "xyes"; then eval def_$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\"" echores yes @@ -3176,27 +3145,26 @@ echocheck "socklib" # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl): -# for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind): cat > $TMPC << EOF #include #include int main(void) { gethostbyname(0); socket(AF_INET, SOCK_STREAM, 0); return 0; } EOF _socklib=no -for _ld_tmp in "" "-lsocket -lbind" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do - cc_check $_ld_tmp && _ld_sock="$_ld_tmp" && _socklib=yes && break +for ld_tmp in "" "-lsocket -ldnet" "-lsocket -lnsl" "-lnsl" "-lsocket" ; do + cc_check $ld_tmp && ld_sock="$ld_tmp" && _socklib=yes && break done test $_socklib = yes && test $_winsock2_h = auto && _winsock2_h=no if test $_winsock2_h = auto ; then _winsock2_h=no - statement_check winsock2.h 'gethostbyname(0)' -lws2_32 && _ld_sock="-lws2_32" && _winsock2_h=yes + statement_check winsock2.h 'gethostbyname(0)' -lws2_32 && ld_sock="-lws2_32" && _winsock2_h=yes fi -test "$_ld_sock" && res_comment="using $_ld_sock" +test "$ld_sock" && res_comment="using $ld_sock" echores "$_socklib" if test $_winsock2_h = yes ; then - _ld_sock="-lws2_32" + ld_sock="-lws2_32" def_winsock2_h='#define HAVE_WINSOCK2_H 1' cc_check_winsock2_h='-DHAVE_WINSOCK2_H=1' else @@ -3325,11 +3293,11 @@ echocheck "inet_pton()" def_inet_pton='#define HAVE_INET_PTON 0' inet_pton=no -for _ld_tmp in "$_ld_sock" "$_ld_sock -lresolv" ; do - statement_check arpa/inet.h 'inet_pton(0, 0, 0)' $_ld_tmp && inet_pton=yes && break +for ld_tmp in "$ld_sock" "$ld_sock -lresolv" ; do + statement_check arpa/inet.h 'inet_pton(0, 0, 0)' $ld_tmp && inet_pton=yes && break done if test $inet_pton = yes ; then - test "$_ld_tmp" && res_comment="using $_ld_tmp" + test "$ld_tmp" && res_comment="using $ld_tmp" def_inet_pton='#define HAVE_INET_PTON 1' fi echores "$inet_pton" @@ -3338,11 +3306,11 @@ echocheck "inet_aton()" def_inet_aton='#define HAVE_INET_ATON 0' inet_aton=no -for _ld_tmp in "$_ld_sock" "$_ld_sock -lresolv" ; do - statement_check arpa/inet.h 'inet_aton(0, 0)' $_ld_tmp && inet_aton=yes && break +for ld_tmp in "$ld_sock" "$ld_sock -lresolv" ; do + statement_check arpa/inet.h 'inet_aton(0, 0)' $ld_tmp && inet_aton=yes && break done if test $inet_aton = yes ; then - test "$_ld_tmp" && res_comment="using $_ld_tmp" + test "$ld_tmp" && res_comment="using $ld_tmp" def_inet_aton='#define HAVE_INET_ATON 1' fi echores "$inet_aton" @@ -3363,7 +3331,7 @@ echocheck "closesocket()" _closesocket=no -statement_check winsock2.h 'closesocket(~0)' $_ld_sock && _closesocket=yes +statement_check winsock2.h 'closesocket(~0)' $ld_sock && _closesocket=yes if test "$_closesocket" = yes ; then def_closesocket='#define HAVE_CLOSESOCKET 1' else @@ -3379,7 +3347,7 @@ def_network='#define CONFIG_NETWORK 1' def_networking='#define CONFIG_NETWORKING 1' def_rtpdec='#define CONFIG_RTPDEC 1' - extra_ldflags="$extra_ldflags $_ld_sock" + extra_ldflags="$extra_ldflags $ld_sock" inputmodules="networking $inputmodules" else noinputmodules="networking $noinputmodules" @@ -3405,7 +3373,7 @@ int main(void) { struct sockaddr_in6 six; socket(AF_INET6, SOCK_STREAM, AF_INET6); return 0; } EOF _inet6=no - if cc_check $_ld_sock ; then + if cc_check $ld_sock ; then _inet6=yes fi fi @@ -3552,7 +3520,7 @@ else def_mmap='#define HAVE_MMAP 0' def_mman_h='#define HAVE_SYS_MMAN_H 0' - os2 && need_mmap=yes + os2 && mmap=no fi echores "$_mman" @@ -3566,8 +3534,8 @@ echocheck "dynamic loader" _dl=no -for _ld_tmp in "" -ldl; do - statement_check dlfcn.h 'dlopen("", 0)' $_ld_tmp && _ld_dl="$_ld_tmp" && _dl=yes && break +for ld_tmp in "" -ldl; do + statement_check dlfcn.h 'dlopen("", 0)' $ld_tmp && ld_dl="$ld_tmp" && _dl=yes && break done if test "$_dl" = yes ; then def_dl='#define HAVE_LIBDL 1' @@ -3590,6 +3558,8 @@ def_threads='#define HAVE_THREADS 0' +def_pthreads='#define HAVE_PTHREADS 0' +def_w32threads='#define HAVE_W32THREADS 0' echocheck "pthread" if linux ; then @@ -3605,14 +3575,14 @@ EOF _pthreads=no if ! hpux ; then - for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do + for ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do # for crosscompilation, we cannot execute the program, be happy if we can link statically - cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break + cc_check $THREAD_CFLAGS $ld_tmp && (tmp_run || test "$ld_static") && ld_pthread="$ld_tmp" && _pthreads=yes && break done fi fi if test "$_pthreads" = yes ; then - test $_ld_pthread && res_comment="using $_ld_pthread" + test $ld_pthread && res_comment="using $ld_pthread" def_pthreads='#define HAVE_PTHREADS 1' def_threads='#define HAVE_THREADS 1' extra_cflags="$extra_cflags $THREAD_CFLAGS" @@ -3642,7 +3612,7 @@ _w32threads=no mingw32 && _w32threads=yes fi -test "$_w32threads" = yes && def_threads='#define HAVE_THREADS 1' +test "$_w32threads" = yes && def_threads='#define HAVE_THREADS 1' && def_w32threads='#define HAVE_W32THREADS 1' echores "$_w32threads" echocheck "rpath" @@ -3689,8 +3659,8 @@ } EOF _iconv=no - for _ld_tmp in "" "-liconv" "-liconv $_ld_dl" ; do - cc_check $_ld_lm $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" && + for ld_tmp in "" "-liconv" "-liconv $ld_dl" ; do + cc_check $ld_tmp && extra_ldflags="$extra_ldflags $ld_tmp" && _iconv=yes && break done fi @@ -3812,14 +3782,14 @@ echocheck "termcap" if test "$_termcap" = auto ; then _termcap=no - for _ld_tmp in "-lncurses" "-ltinfo" "-ltermcap"; do - statement_check term.h 'tgetent(0, 0)' $_ld_tmp && - extra_ldflags="$extra_ldflags $_ld_tmp" && _termcap=yes && break + for ld_tmp in "-lncurses" "-ltinfo" "-ltermcap"; do + statement_check term.h 'tgetent(0, 0)' $ld_tmp && + extra_ldflags="$extra_ldflags $ld_tmp" && _termcap=yes && break done fi if test "$_termcap" = yes ; then def_termcap='#define HAVE_TERMCAP 1' - test $_ld_tmp && res_comment="using $_ld_tmp" + test $ld_tmp && res_comment="using $ld_tmp" else def_termcap='#undef HAVE_TERMCAP' fi @@ -3863,50 +3833,26 @@ echocheck "strsep()" -_strsep=no -statement_check string.h 'char *s = "Hello, world!"; strsep(&s, ",")' && _strsep=yes -if test "$_strsep" = yes ; then - def_strsep='#define HAVE_STRSEP 1' - need_strsep=no -else - def_strsep='#undef HAVE_STRSEP' - need_strsep=yes -fi -echores "$_strsep" +strsep=yes +def_strsep='#define HAVE_STRSEP 1' +statement_check string.h 'char *s = "Hello, world!"; strsep(&s, ",")' || + { strsep=no ; def_strsep='#undef HAVE_STRSEP' ; } +echores "$strsep" echocheck "vsscanf()" +vsscanf=yes +def_vsscanf='#define HAVE_VSSCANF 1' cat > $TMPC << EOF #define _ISOC99_SOURCE #include #include -int main(void) { va_list ap = { 0 }; vsscanf("foo", "bar", ap); return 0; } +int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; } EOF -_vsscanf=no -cc_check && _vsscanf=yes -if test "$_vsscanf" = yes ; then - def_vsscanf='#define HAVE_VSSCANF 1' - need_vsscanf=no -else - def_vsscanf='#undef HAVE_VSSCANF' - need_vsscanf=yes -fi -echores "$_vsscanf" +cc_check || { vsscanf=no ; def_vsscanf='#undef HAVE_VSSCANF' ; } +echores "$vsscanf" -echocheck "swab()" -_swab=no -define_statement_check "_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' || - statement_check "string.h" 'int a, b; swab(&a, &b, 0)' && _swab=yes -if test "$_swab" = yes ; then - def_swab='#define HAVE_SWAB 1' - need_swab=no -else - def_swab='#undef HAVE_SWAB' - need_swab=yes -fi -echores "$_swab" - echocheck "POSIX select()" cat > $TMPC << EOF #include @@ -3935,45 +3881,30 @@ echocheck "gettimeofday()" -_gettimeofday=no -statement_check sys/time.h 'struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz)' && _gettimeofday=yes -if test "$_gettimeofday" = yes ; then - def_gettimeofday='#define HAVE_GETTIMEOFDAY 1' - need_gettimeofday=no -else - def_gettimeofday='#undef HAVE_GETTIMEOFDAY' - need_gettimeofday=yes -fi -echores "$_gettimeofday" +gettimeofday=yes +def_gettimeofday='#define HAVE_GETTIMEOFDAY 1' +statement_check sys/time.h 'struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz)' || + { gettimeofday=no ; def_gettimeofday='#undef HAVE_GETTIMEOFDAY' ; } +echores "$gettimeofday" echocheck "glob()" -_glob=no -statement_check glob.h 'glob("filename", 0, 0, 0)' && _glob=yes -need_glob=no -if test "$_glob" = yes ; then - def_glob='#define HAVE_GLOB 1' -else - def_glob='#undef HAVE_GLOB' - # HACK! need_glob currently enables compilation of a - # win32-specific glob()-replacement. - # Other OS neither need it nor can they use it (mf:// is disabled for them). - win32 && need_glob=yes -fi -echores "$_glob" +# glob_win disables a Windows-specific glob() replacement. +glob=yes +glob_win=yes +def_glob='#define HAVE_GLOB 1' +statement_check glob.h 'glob("filename", 0, 0, 0)' || + { glob=no ; def_glob='#undef HAVE_GLOB' ; + mingw32 && glob_win=no ; } +echores "$glob" echocheck "setenv()" -_setenv=no -statement_check stdlib.h 'setenv("", "", 0)' && _setenv=yes -if test "$_setenv" = yes ; then - def_setenv='#define HAVE_SETENV 1' - need_setenv=no -else - def_setenv='#undef HAVE_SETENV' - need_setenv=yes -fi -echores "$_setenv" +setenv=yes +def_setenv='#define HAVE_SETENV 1' +statement_check stdlib.h 'setenv("", "", 0)' || + { setenv=no ; def_setenv='#undef HAVE_SETENV' ; } +echores "$setenv" echocheck "setmode()" @@ -3999,7 +3930,7 @@ echocheck "sys/sysinfo.h" _sys_sysinfo=no -statement_check sys/sysinfo.h 'struct sysinfo s_info; sysinfo(&s_info)' && _sys_sysinfo=yes +statement_check sys/sysinfo.h 'struct sysinfo s_info; s_info.mem_unit=0; sysinfo(&s_info)' && _sys_sysinfo=yes if test "$_sys_sysinfo" = yes ; then def_sys_sysinfo_h='#define HAVE_SYS_SYSINFO_H 1' else @@ -4084,7 +4015,7 @@ echocheck "pkg-config" _pkg_config=pkg-config if $($_pkg_config --version > /dev/null 2>&1); then - if test "$_ld_static"; then + if test "$ld_static"; then _pkg_config="$_pkg_config --static" fi echores "yes" @@ -4100,9 +4031,9 @@ fi if test "$_smb" = auto; then _smb=no - for _ld_tmp in "-lsmbclient" "-lsmbclient $_ld_dl" "-lsmbclient $_ld_dl -lnsl" "-lsmbclient $_ld_dl -lssl -lnsl" ; do - statement_check libsmbclient.h 'smbc_opendir("smb://")' $_ld_tmp && - extra_ldflags="$extra_ldflags $_ld_tmp" && _smb=yes && break + for ld_tmp in "-lsmbclient" "-lsmbclient $ld_dl" "-lsmbclient $ld_dl -lnsl" "-lsmbclient $ld_dl -lssl -lnsl" ; do + statement_check libsmbclient.h 'smbc_opendir("smb://")' $ld_tmp && + extra_ldflags="$extra_ldflags $ld_tmp" && _smb=yes && break done fi @@ -4257,9 +4188,9 @@ #endif int main(void) { DirectFBInit(0, 0); return 0; } EOF - for _inc_tmp in "" -I/usr/local/include/directfb -I/usr/include/directfb -I/usr/local/include; do - cc_check $_inc_tmp -ldirectfb && - _directfb=yes && extra_cflags="$extra_cflags $_inc_tmp" && break + for inc_tmp in "" -I/usr/local/include/directfb -I/usr/include/directfb -I/usr/local/include; do + cc_check $inc_tmp -ldirectfb && + _directfb=yes && extra_cflags="$extra_cflags $inc_tmp" && break done fi if test "$_directfb" = yes ; then @@ -4303,12 +4234,12 @@ -L/usr/X11/lib -L/usr/lib32 -L/usr/openwin/lib -L/usr/local/lib64 -L/usr/X11R6/lib64 \ -L/usr/lib ; do if netbsd; then - _ld_tmp="$I -lXext -lX11 $_ld_pthread -Wl,-R$(echo $I | sed s/^-L//)" + ld_tmp="$I -lXext -lX11 $ld_pthread -Wl,-R$(echo $I | sed s/^-L//)" else - _ld_tmp="$I -lXext -lX11 $_ld_pthread" + ld_tmp="$I -lXext -lX11 $ld_pthread" fi - statement_check X11/Xutil.h 'XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)' $_ld_tmp && - libs_mplayer="$libs_mplayer $_ld_tmp" && _x11=yes && break + statement_check X11/Xutil.h 'XCreateWindow(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)' $ld_tmp && + libs_mplayer="$libs_mplayer $ld_tmp" && _x11=yes && break done fi if test "$_x11" = yes ; then @@ -4394,8 +4325,8 @@ XvMCCreateContext(0, 0, 0, 0, 0, 0, 0); return 0; } EOF - for _ld_tmp in $_xvmclib XvMCNVIDIA XvMCW I810XvMC ; do - cc_check -lXvMC -l$_ld_tmp && _xvmc=yes && _xvmclib="$_ld_tmp" && break + for ld_tmp in $_xvmclib XvMCNVIDIA XvMCW I810XvMC ; do + cc_check -lXvMC -l$ld_tmp && _xvmc=yes && _xvmclib="$ld_tmp" && break done fi if test "$_xvmc" = yes ; then @@ -4449,7 +4380,7 @@ # Note: the -lXxf86vm library is the VideoMode extension and though it's not # needed for DGA, AFAIK every distribution packages together with DGA stuffs # named 'X extensions' or something similar. -# This check may be useful for future mplayer versions (to change resolution) +# This check may be useful for future MPlayer versions (to change resolution) # If you run into problems, remove '-lXxf86vm'. echocheck "Xxf86vm" if test "$_vm" = auto && test "$_x11" = yes ; then @@ -4585,7 +4516,7 @@ #test "$_vidix_drivers" || _vidix_drivers="cyberblade ivtv mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome" test "$_vidix_drivers" || _vidix_drivers="cyberblade mach64 mga mga_crtc2 nvidia pm2 pm3 radeon rage128 s3 sh_veu sis unichrome" - # some vidix drivers are architecture and os specific, discard them elsewhere + # some VIDIX drivers are architecture and os-specific, discard them elsewhere x86 || _vidix_drivers=$(echo $_vidix_drivers | sed -e s/cyberblade// -e s/sis// -e s/unichrome// -e s/s3//) (test $host_arch = "sh" && linux) || _vidix_drivers=$(echo $_vidix_drivers | sed s/sh_veu//) @@ -4676,8 +4607,8 @@ return 0; } EOF _aa=no - for _ld_tmp in "-laa" ; do - cc_check $_ld_tmp && libs_mplayer="$libs_mplayer $_ld_tmp" && _aa=yes && break + for ld_tmp in "-laa" ; do + cc_check $ld_tmp && libs_mplayer="$libs_mplayer $ld_tmp" && _aa=yes && break done fi if test "$_aa" = yes ; then @@ -4722,7 +4653,7 @@ echocheck "SVGAlib" if test "$_svga" = auto ; then _svga=no - header_check vga.h -lvga $_ld_lm && _svga=yes + header_check vga.h -lvga && _svga=yes fi if test "$_svga" = yes ; then def_svga='#define CONFIG_SVGALIB 1' @@ -4766,9 +4697,9 @@ #include int main(void) {return 0;} EOF - for _inc_tmp in "" "-I/usr/src/DVB/include" ; do - cc_check $_inc_tmp && _dvb=yes && - extra_cflags="$extra_cflags $_inc_tmp" && break + for inc_tmp in "" "-I/usr/src/DVB/include" ; do + cc_check $inc_tmp && _dvb=yes && + extra_cflags="$extra_cflags $inc_tmp" && break done fi echores "$_dvb" @@ -4849,7 +4780,7 @@ if test "$_png" = auto ; then _png=no if irix ; then - # Don't check for -lpng on irix since it has its own libpng + # Don't check for -lpng on IRIX since it has its own libpng # incompatible with the GNU libpng res_comment="disabled on irix (not GNU libpng)" else @@ -4863,7 +4794,7 @@ return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver); } EOF - cc_check -lpng -lz $_ld_lm && _png=yes + cc_check -lpng -lz && _png=yes fi fi echores "$_png" @@ -4877,7 +4808,7 @@ echocheck "MNG support" if test "$_mng" = auto ; then _mng=no - return_statement_check libmng.h 'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' -lmng -lz $_ld_lm && _mng=yes + return_statement_check libmng.h 'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' -lmng -lz && _mng=yes fi echores "$_mng" if test "$_mng" = yes ; then @@ -4892,7 +4823,7 @@ echocheck "JPEG support" if test "$_jpeg" = auto ; then _jpeg=no - header_check_broken stdio.h jpeglib.h -ljpeg $_ld_lm && _jpeg=yes + header_check_broken stdio.h jpeglib.h -ljpeg && _jpeg=yes fi echores "$_jpeg" @@ -4906,10 +4837,10 @@ fi -echocheck "OpenJPEG (JPEG2000) support" +echocheck "OpenJPEG (JPEG 2000) support" if test "$libopenjpeg" = auto ; then libopenjpeg=no - define_statement_check OPJ_STATIC openjpeg.h 'opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params)' -lopenjpeg $_ld_lm && libopenjpeg=yes + define_statement_check OPJ_STATIC openjpeg.h 'opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params);opj_decode_with_info(0,0,0)' -lopenjpeg && libopenjpeg=yes fi echores "$libopenjpeg" if test "$libopenjpeg" = yes ; then @@ -4937,9 +4868,9 @@ echocheck "GIF support" -# This is to appease people who want to force gif support. +# This is to appease people who want to force GIF support. # If it is forced to yes, then we still do checks to determine -# which gif library to use. +# which GIF library to use. if test "$_gif" = yes ; then _force_gif=yes _gif=auto @@ -4947,8 +4878,8 @@ if test "$_gif" = auto ; then _gif=no - for _ld_gif in "-lungif" "-lgif" ; do - statement_check gif_lib.h 'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _gif=yes && break + for ld_gif in "-lungif" "-lgif" ; do + statement_check gif_lib.h 'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $ld_gif && _gif=yes && break done fi @@ -4963,7 +4894,7 @@ # --Joey if test "$_force_gif" = yes && test "$_gif" = no ; then _gif=yes - _ld_gif="-lgif" + ld_gif="-lgif" fi if test "$_gif" = yes ; then @@ -4972,7 +4903,7 @@ vomodules="gif89a $vomodules" res_comment="old version, some encoding functions disabled" def_gif_4='#undef CONFIG_GIF_4' - extra_ldflags="$extra_ldflags $_ld_gif" + extra_ldflags="$extra_ldflags $ld_gif" cat > $TMPC << EOF #include @@ -4987,7 +4918,7 @@ return 0; } EOF - if cc_check "$_ld_gif" ; then + if cc_check "$ld_gif" ; then def_gif_4='#define CONFIG_GIF_4 1' res_comment="" fi @@ -5013,7 +4944,7 @@ return 0; } EOF - if cc_check "$_ld_gif" ; then + if cc_check "$ld_gif" ; then def_gif_tvt_hack='#undef CONFIG_GIF_TVT_HACK' echores "disabled" else @@ -5044,14 +4975,12 @@ echocheck "SDL" -_inc_tmp="" -_ld_tmp="" +inc_tmp="" +ld_tmp="" def_sdl_sdl_h="#undef CONFIG_SDL_SDL_H" if test -z "$_sdlconfig" ; then if ( sdl-config --version ) >>"$TMPLOG" 2>&1 ; then _sdlconfig="sdl-config" - elif ( sdl11-config --version ) >>"$TMPLOG" 2>&1 ; then - _sdlconfig="sdl11-config" else _sdlconfig=false fi @@ -5073,8 +5002,8 @@ } EOF _sdl=no - for _ld_tmp in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do - if cc_check -DCONFIG_SDL_SDL_H $_inc_tmp $_ld_tmp ; then + for ld_tmp in "-lSDL" "-lSDL -lpthread" "-lSDL -lwinmm -lgdi32" "-lSDL -lwinmm -lgdi32 -ldxguid" ; do + if cc_check -DCONFIG_SDL_SDL_H $inc_tmp $ld_tmp ; then _sdl=yes def_sdl_sdl_h="#define CONFIG_SDL_SDL_H 1" break @@ -5083,28 +5012,28 @@ if test "$_sdl" = no && "$_sdlconfig" --version >>"$TMPLOG" 2>&1 ; then res_comment="using $_sdlconfig" if cygwin ; then - _inc_tmp="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)" - _ld_tmp="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)" + inc_tmp="$($_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/)" + ld_tmp="$($_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/)" elif mingw32 ; then - _inc_tmp=$($_sdlconfig --cflags | sed s/-Dmain=SDL_main//) - _ld_tmp=$($_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//) + inc_tmp=$($_sdlconfig --cflags | sed s/-Dmain=SDL_main//) + ld_tmp=$($_sdlconfig --libs | sed -e s/-mwindows// -e s/-lmingw32//) else - _inc_tmp="$($_sdlconfig --cflags)" - _ld_tmp="$($_sdlconfig --libs)" + inc_tmp="$($_sdlconfig --cflags)" + ld_tmp="$($_sdlconfig --libs)" fi - if cc_check $_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then + if cc_check $inc_tmp $ld_tmp >>"$TMPLOG" 2>&1 ; then _sdl=yes - elif cc_check $_inc_tmp $_ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then - # HACK for BeOS/Haiku SDL - _ld_tmp="$_ld_tmp -lstdc++" + elif cc_check $inc_tmp $ld_tmp -lstdc++ >>"$TMPLOG" 2>&1 ; then + # HACK for Haiku SDL + ld_tmp="$ld_tmp -lstdc++" _sdl=yes fi fi fi if test "$_sdl" = yes ; then def_sdl='#define CONFIG_SDL 1' - extra_cflags="$extra_cflags $_inc_tmp" - libs_mplayer="$libs_mplayer $_ld_tmp" + extra_cflags="$extra_cflags $inc_tmp" + libs_mplayer="$libs_mplayer $ld_tmp" vomodules="sdl $vomodules" aomodules="sdl $aomodules" else @@ -5135,6 +5064,10 @@ // we allow SDL hacking our main() only on OSX #undef main #endif +#elif defined(GL_EGL_X11) +#include +#include +#include #else #include #include @@ -5146,22 +5079,32 @@ wglCreateContext(dc); #elif defined(GL_SDL) SDL_GL_SwapBuffers(); +#elif defined(GL_EGL_X11) + EGLDisplay eglDisplay = EGL_NO_DISPLAY; + eglInitialize(eglDisplay, NULL, NULL); #else glXCreateContext(NULL, NULL, NULL, True); #endif +#ifndef GL_EGL_X11 glFinish(); +#endif return 0; } EOF _gl=no - for _ld_tmp in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do - if cc_check $_ld_tmp $_ld_lm ; then + for ld_tmp in "" -lGL "-lGL -lXdamage" "-lGL $ld_pthread" ; do + if cc_check $ld_tmp ; then _gl=yes _gl_x11=yes - libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl" + libs_mplayer="$libs_mplayer $ld_tmp $ld_dl" break fi done + if cc_check -DGL_EGL_X11 -lEGL ; then + _gl=yes + _gl_egl_x11=yes + libs_mplayer="$libs_mplayer -lEGL $ld_dl" + fi if cc_check -DGL_WIN32 -lopengl32 ; then _gl=yes _gl_win32=yes @@ -5194,6 +5137,10 @@ def_gl_x11='#define CONFIG_GL_X11 1' res_comment="$res_comment x11" fi + if test "$_gl_egl_x11" = yes ; then + def_gl_egl_x11='#define CONFIG_GL_EGL_X11 1' + res_comment="$res_comment egl_x11" + fi if test "$_gl_sdl" = yes ; then def_gl_sdl='#define CONFIG_GL_SDL 1' res_comment="$res_comment sdl" @@ -5203,6 +5150,7 @@ def_gl='#undef CONFIG_GL' def_gl_win32='#undef CONFIG_GL_WIN32' def_gl_x11='#undef CONFIG_GL_X11' + def_gl_egl_x11='#undef CONFIG_GL_EGL_X11' def_gl_sdl='#undef CONFIG_GL_SDL' novomodules="opengl $novomodules" fi @@ -5300,9 +5248,9 @@ echocheck "DXR2" if test "$_dxr2" = auto; then _dxr2=no - for _inc_tmp in "" -I/usr/local/include/dxr2 -I/usr/include/dxr2; do - header_check dxr2ioctl.h $_inc_tmp && _dxr2=yes && - extra_cflags="$extra_cflags $_inc_tmp" && break + for inc_tmp in "" -I/usr/local/include/dxr2 -I/usr/include/dxr2; do + header_check dxr2ioctl.h $inc_tmp && _dxr2=yes && + extra_cflags="$extra_cflags $inc_tmp" && break done fi if test "$_dxr2" = yes; then @@ -5404,16 +5352,9 @@ if test "$_ossaudio" = yes ; then def_ossaudio='#define CONFIG_OSS_AUDIO 1' aomodules="oss $aomodules" - cat > $TMPC << EOF -#include <$_soundcard_header> -#ifdef OPEN_SOUND_SYSTEM -int main(void) { return 0; } -#else -#error Not the real thing -#endif -EOF _real_ossaudio=no - cc_check && _real_ossaudio=yes + cpp_condition_check "$_soundcard_header" OPEN_SOUND_SYSTEM && + _real_ossaudio=yes if test "$_real_ossaudio" = yes; then def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"' elif netbsd || openbsd ; then @@ -5481,7 +5422,7 @@ echocheck "NAS" if test "$_nas" = auto ; then _nas=no - header_check audio/audiolib.h $_ld_lm -laudio -lXt && _nas=yes + header_check audio/audiolib.h -laudio -lXt && _nas=yes fi if test "$_nas" = yes ; then def_nas='#define CONFIG_NAS 1' @@ -5565,105 +5506,19 @@ fi echores "$_openal" + echocheck "ALSA audio" -if test "$_alloca" != yes ; then +if test "$_alloca" = yes && test "$_alsa" = auto ; then _alsa=no - res_comment="alloca missing" + header_check alsa/asoundlib.h -lasound $ld_dl $ld_pthread && _alsa=yes fi -if test "$_alsa" != no ; then - _alsa=no - cat > $TMPC << EOF -#include -#if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5)) -#error "alsa version != 0.5.x" -#endif -int main(void) { return 0; } -EOF - cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='0.5.x' - - cat > $TMPC << EOF -#include -#if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9)) -#error "alsa version != 0.9.x" -#endif -int main(void) { return 0; } -EOF - cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='0.9.x-sys' - cat > $TMPC << EOF -#include -#if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9)) -#error "alsa version != 0.9.x" -#endif -int main(void) { return 0; } -EOF - cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='0.9.x-alsa' - - cat > $TMPC << EOF -#include -#if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0)) -#error "alsa version != 1.0.x" -#endif -int main(void) { return 0; } -EOF - cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='1.0.x-sys' - cat > $TMPC << EOF -#include -#if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0)) -#error "alsa version != 1.0.x" -#endif -int main(void) { return 0; } -EOF - cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='1.0.x-alsa' -fi -def_alsa='#undef CONFIG_ALSA' -def_alsa5='#undef CONFIG_ALSA5' -def_alsa9='#undef CONFIG_ALSA9' -def_alsa1x='#undef CONFIG_ALSA1X' -def_sys_asoundlib_h='#undef HAVE_SYS_ASOUNDLIB_H' -def_alsa_asoundlib_h='#undef HAVE_ALSA_ASOUNDLIB_H' -if test "$_alsaver" ; then - _alsa=yes - if test "$_alsaver" = '0.5.x' ; then - _alsa5=yes - aomodules="alsa5 $aomodules" - def_alsa5='#define CONFIG_ALSA5 1' - def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' - res_comment="using alsa 0.5.x and sys/asoundlib.h" - elif test "$_alsaver" = '0.9.x-sys' ; then - _alsa9=yes - aomodules="alsa $aomodules" - def_alsa='#define CONFIG_ALSA 1' - def_alsa9='#define CONFIG_ALSA9 1' - def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' - res_comment="using alsa 0.9.x and sys/asoundlib.h" - elif test "$_alsaver" = '0.9.x-alsa' ; then - _alsa9=yes - aomodules="alsa $aomodules" - def_alsa='#define CONFIG_ALSA 1' - def_alsa9='#define CONFIG_ALSA9 1' - def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1' - res_comment="using alsa 0.9.x and alsa/asoundlib.h" - elif test "$_alsaver" = '1.0.x-sys' ; then - _alsa1x=yes - aomodules="alsa $aomodules" - def_alsa='#define CONFIG_ALSA 1' - def_alsa1x="#define CONFIG_ALSA1X 1" - def_alsa_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' - res_comment="using alsa 1.0.x and sys/asoundlib.h" - elif test "$_alsaver" = '1.0.x-alsa' ; then - _alsa1x=yes - aomodules="alsa $aomodules" - def_alsa='#define CONFIG_ALSA 1' - def_alsa1x="#define CONFIG_ALSA1X 1" - def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1' - res_comment="using alsa 1.0.x and alsa/asoundlib.h" - else - _alsa=no - res_comment="unknown version" - fi - extra_ldflags="$extra_ldflags -lasound $_ld_dl $_ld_pthread" +if test "$_alsa" = yes ; then + aomodules="alsa $aomodules" + def_alsa='#define CONFIG_ALSA 1' + extra_ldflags="$extra_ldflags -lasound $ld_dl $ld_pthread" else noaomodules="alsa $noaomodules" + def_alsa='#undef CONFIG_ALSA' fi echores "$_alsa" @@ -5788,9 +5643,8 @@ default_cdrom_device="/dev/rcd0c" elif sunos ; then default_cdrom_device="/vol/dev/aliases/cdrom0" - # Modern Solaris versions use HAL instead of the vold daemon, the volfs - # file system and the volfs service. - test -r "/cdrom/cdrom0" && default_cdrom_device="/cdrom/cdrom0" + # Solaris 10 and newer use HAL instead of the vold daemon. + test $(uname -r | sed 's/^5\.//') -gt 10 && default_cdrom_device="/cdrom/cdrom0" elif amigaos ; then default_cdrom_device="a1ide.device:2" else @@ -5830,7 +5684,7 @@ echocheck "Blu-ray support" if test "$_bluray" = auto ; then _bluray=no - statement_check libbluray/bluray.h 'bd_get_title_info(0, 0)' -lbluray && _bluray=yes + statement_check libbluray/bluray.h 'bd_get_title_info(0, 0, 0)' -lbluray && _bluray=yes fi if test "$_bluray" = yes ; then def_bluray='#define CONFIG_LIBBLURAY 1' @@ -5859,7 +5713,7 @@ if test "$_dl" = yes; then _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null) _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null) - if header_check dvdread/dvd_reader.h $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then + if header_check dvdread/dvd_reader.h $_dvdreadcflags $_dvdreadlibs $ld_dl ; then _dvdread=yes extra_cflags="$extra_cflags $_dvdreadcflags" extra_ldflags="$extra_ldflags $_dvdreadlibs" @@ -5891,7 +5745,7 @@ hpux && test "$_hpux_scsi_h" = no && _libdvdcss_internal=no fi if test "$_libdvdcss_internal" = yes ; then - if linux || netbsd || openbsd || bsdos ; then + if linux || netbsd || openbsd || bsdos || wine ; then def_dvd_linux='#define HAVE_LINUX_DVD_STRUCT 1' openbsd && def_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1' elif freebsd || dragonfly ; then @@ -5901,8 +5755,6 @@ extra_ldflags="$extra_ldflags -framework IOKit -framework Carbon" elif cygwin ; then cflags_libdvdcss="-DSYS_CYGWIN -DWIN32" - elif beos ; then - cflags_libdvdcss="-DSYS_BEOS" elif os2 ; then cflags_libdvdcss="-DSYS_OS2" fi @@ -5915,30 +5767,8 @@ echores "$_libdvdcss_internal" -echocheck "cdparanoia" -if test "$_cdparanoia" = auto ; then - cat > $TMPC < -#include -// This need a better test. How ? -int main(void) { void *test = cdda_verbose_set; return test == (void *)1; } -EOF - _cdparanoia=no - for _inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do - cc_check $_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && - _cdparanoia=yes && extra_cflags="$extra_cflags $_inc_tmp" && break - done -fi -if test "$_cdparanoia" = yes ; then - _cdda='yes' - extra_ldflags="$extra_ldflags -lcdda_interface -lcdda_paranoia" - openbsd && extra_ldflags="$extra_ldflags -lutil" -fi -echores "$_cdparanoia" - - echocheck "libcdio" -if test "$_libcdio" = auto && test "$_cdparanoia" = no ; then +if test "$_libcdio" = auto ; then cat > $TMPC << EOF #include #include @@ -5951,32 +5781,48 @@ } EOF _libcdio=no - for _ld_tmp in "" "-lwinmm" ; do - _ld_tmp="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp" - cc_check $_ld_tmp $_ld_lm && _libcdio=yes && - extra_ldflags="$extra_ldflags $_ld_tmp" && break + for ld_tmp in "" "-lwinmm" ; do + ld_tmp="-lcdio_cdda -lcdio -lcdio_paranoia $ld_tmp" + cc_check $ld_tmp && _libcdio=yes && + extra_ldflags="$extra_ldflags $ld_tmp" && break done if test "$_libcdio" = no && $_pkg_config --exists libcdio_paranoia ; then - _inc_tmp=$($_pkg_config --cflags libcdio_paranoia) - _ld_tmp=$($_pkg_config --libs libcdio_paranoia) - cc_check $_inc_tmp $_ld_tmp $_ld_lm && _libcdio=yes && - extra_ldflags="$extra_ldflags $_ld_tmp" && extra_cflags="$extra_cflags $_inc_tmp" + inc_tmp=$($_pkg_config --cflags libcdio_paranoia) + ld_tmp=$($_pkg_config --libs libcdio_paranoia) + cc_check $inc_tmp $ld_tmp && _libcdio=yes && + extra_ldflags="$extra_ldflags $ld_tmp" && extra_cflags="$extra_cflags $inc_tmp" fi fi -if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then +if test "$_libcdio" = yes ; then _cdda='yes' + _cdparanoia=no def_libcdio='#define CONFIG_LIBCDIO 1' def_havelibcdio='yes' else _libcdio=no - if test "$_cdparanoia" = yes ; then - res_comment="using cdparanoia" - fi def_libcdio='#undef CONFIG_LIBCDIO' def_havelibcdio='no' fi echores "$_libcdio" +echocheck "cdparanoia" +if test "$_cdparanoia" = auto ; then + _cdparanoia=no + for inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do + statement_check_broken cdda_interface.h cdda_paranoia.h 'paranoia_cachemodel_size(NULL, 0)' $inc_tmp -lcdda_interface -lcdda_paranoia && + _cdparanoia=yes && extra_cflags="$extra_cflags $inc_tmp" && break + done +fi +if test "$_cdparanoia" = yes ; then + _cdda='yes' + extra_ldflags="$extra_ldflags -lcdda_interface -lcdda_paranoia" + openbsd && extra_ldflags="$extra_ldflags -lutil" +elif test "$_libcdio" = yes ; then + res_comment='using libcdio' +fi +echores "$_cdparanoia" + + if test "$_cdda" = yes ; then test $_cddb = auto && test $networking = yes && _cddb=yes def_cdparanoia='#define CONFIG_CDDA 1' @@ -6053,27 +5899,27 @@ #include #include #if FC_VERSION < 20402 -#error At least version 2.4.2 of fontconfig required +#error At least version 2.4.2 of Fontconfig required #endif int main(void) { int err = FcInit(); if (err == FcFalse) { - printf("Couldn't initialize fontconfig lib\n"); + printf("Could not initialize Fontconfig library.\n"); exit(err); } return 0; } EOF _fontconfig=no - for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do - _ld_tmp="-lfontconfig $_ld_tmp" - cc_check $_ld_tmp && _fontconfig=yes && extra_ldflags="$extra_ldflags $_ld_tmp" && break + for ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do + ld_tmp="-lfontconfig $ld_tmp" + cc_check $ld_tmp && _fontconfig=yes && extra_ldflags="$extra_ldflags $ld_tmp" && break done if test "$_fontconfig" = no && $_pkg_config --exists fontconfig ; then - _inc_tmp=$($_pkg_config --cflags fontconfig) - _ld_tmp=$($_pkg_config --libs fontconfig) - cc_check $_inc_tmp $_ld_tmp && _fontconfig=yes && - extra_ldflags="$extra_ldflags $_ld_tmp" && extra_cflags="$extra_cflags $_inc_tmp" + inc_tmp=$($_pkg_config --cflags fontconfig) + ld_tmp=$($_pkg_config --libs fontconfig) + cc_check $inc_tmp $ld_tmp && _fontconfig=yes && + extra_ldflags="$extra_ldflags $ld_tmp" && extra_cflags="$extra_cflags $inc_tmp" fi fi if test "$_fontconfig" = yes ; then @@ -6084,12 +5930,43 @@ echores "$_fontconfig" +echocheck "fribidi with charsets" +if test "$_fribidi" = auto ; then + cat > $TMPC << EOF +#include +#include +FriBidiParType test; +int main(void) { + if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) + exit(1); + return 0; +} +EOF + _fribidi=no + cc_check -lfribidi && _fribidi=yes && extra_ldflags="$extra_ldflags -lfribidi" + if $_pkg_config --exists fribidi > /dev/null 2>&1 && + test "$_fribidi" = no ; then + inc_tmp="$($_pkg_config --cflags fribidi)" + ld_tmp="$($_pkg_config --libs fribidi)" + cc_check $inc_tmp $ld_tmp && _fribidi=yes && + extra_cflags="$extra_cflags $inc_tmp" && + extra_ldflags="$extra_ldflags $ld_tmp" + fi +fi +if test "$_fribidi" = yes ; then + def_fribidi='#define CONFIG_FRIBIDI 1' +else + def_fribidi='#undef CONFIG_FRIBIDI' +fi +echores "$_fribidi" + + echocheck "SSA/ASS support" # libass depends on FreeType if test "$_freetype" = no ; then _ass=no ass_internal=no - res_comment="FreeType support needed" + res_comment="FreeType and FriBiDi support needed" fi if test "$_ass" = auto ; then @@ -6106,7 +5983,7 @@ if test "$_ass" = no ; then res_comment="FreeType >= 2.2.1 needed" elif test "$ass_internal" != yes ; then - cat > $TMPC << EOF + cat > $TMPC << EOF #include int main(void) { #if !defined(LIBASS_VERSION) || LIBASS_VERSION < 0x00910000 @@ -6140,46 +6017,10 @@ echores "$_ass" -echocheck "fribidi with charsets" -_inc_tmp="" -_ld_tmp="" -if test "$_fribidi" = auto ; then - cat > $TMPC << EOF -#include -/* workaround for fribidi 0.10.4 and below */ -#define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8 -#include -int main(void) { - if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) - exit(1); - return 0; -} -EOF - _fribidi=no - _inc_tmp="" - _ld_tmp="-lfribidi" - cc_check $_inc_tmp $_ld_tmp && _fribidi=yes - if $_pkg_config --exists fribidi > /dev/null 2>&1 && - test "$_fribidi" = no ; then - _inc_tmp="$($_pkg_config --cflags)" - _ld_tmp="$($_pkg_config --libs)" - cc_check $_inc_tmp $_ld_tmp && _fribidi=yes - fi -fi -if test "$_fribidi" = yes ; then - def_fribidi='#define CONFIG_FRIBIDI 1' - extra_cflags="$extra_cflags $_inc_tmp" - extra_ldflags="$extra_ldflags $_ld_tmp" -else - def_fribidi='#undef CONFIG_FRIBIDI' -fi -echores "$_fribidi" - - echocheck "ENCA" if test "$_enca" = auto ; then _enca=no - statement_check enca.h 'enca_get_languages(NULL)' -lenca $_ld_lm && _enca=yes + statement_check enca.h 'enca_get_languages(NULL)' -lenca && _enca=yes fi if test "$_enca" = yes ; then def_enca='#define CONFIG_ENCA 1' @@ -6200,8 +6041,8 @@ mplayer_encoders="$mplayer_encoders PNG_ENCODER" else def_zlib='#define CONFIG_ZLIB 0' - libavdecoders=$(echo $libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/ZLIB_DECODER// -e s/DXA_DECODER// -e s/TSCC_DECODER//) - libavencoders=$(echo $libavencoders | sed -e s/FLASHSV_ENCODER// -e s/FLASHSV2_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// -e s/ZLIB_ENCODER//) + libavdecoders=$(echo $libavdecoders | sed -e s/FLASHSV_DECODER// -e s/FLASHSV2_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/ZLIB_DECODER// -e s/DXA_DECODER// -e s/TSCC_DECODER//) + libavencoders=$(echo $libavencoders | sed -e s/FLASHSV_ENCODER// -e s/FLASHSV2_DECODER// -e s/FLASHSV2_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// -e s/ZLIB_ENCODER//) fi echores "$_zlib" @@ -6275,7 +6116,7 @@ echocheck "Twolame" if test "$_twolame" = auto ; then _twolame=no - statement_check twolame.h 'twolame_init()' -ltwolame $_ld_lm && _twolame=yes + statement_check twolame.h 'twolame_init()' -ltwolame && _twolame=yes fi if test "$_twolame" = yes ; then def_twolame='#define CONFIG_TWOLAME 1' @@ -6293,7 +6134,7 @@ if test "$_twolame" = yes ; then res_comment="disabled by twolame" else - statement_check toolame.h 'toolame_init()' -ltoolame $_ld_lm && _toolame=yes + statement_check toolame.h 'toolame_init()' -ltoolame && _toolame=yes fi fi if test "$_toolame" = yes ; then @@ -6314,12 +6155,12 @@ _libvorbis=no elif test "$_tremor" = auto; then _tremor=no - statement_check tremor/ivorbiscodec.h 'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec $_ld_lm && _tremor=yes && _libvorbis=no + statement_check tremor/ivorbiscodec.h 'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec && _tremor=yes && _libvorbis=no fi if test "$_libvorbis" = auto; then _libvorbis=no for vorbislibs in '-lvorbis -logg' '-lvorbis -lvorbisenc -logg' ; do - statement_check vorbis/vorbisenc.h 'vorbis_encode_ctl(0, 0, 0)' $vorbislibs $_ld_lm && _libvorbis=yes && break + statement_check vorbis/vorbisenc.h 'vorbis_encode_ctl(0, 0, 0)' $vorbislibs && _libvorbis=yes && break done fi if test "$_tremor_internal" = yes ; then @@ -6360,7 +6201,7 @@ #include int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; } EOF - cc_check -lspeex $_ld_lm && _speex=yes + cc_check -lspeex && _speex=yes fi if test "$_speex" = yes ; then def_speex='#define CONFIG_SPEEX 1' @@ -6392,65 +6233,23 @@ echocheck "OggTheora support" if test "$_theora" = auto ; then _theora=no - cat > $TMPC << EOF -#include -#include -int main(void) { - /* Theora is in flux, make sure that all interface routines and datatypes - * exist and work the way we expect it, so we don't break MPlayer. */ - ogg_packet op; - theora_comment tc; - theora_info inf; - theora_state st; - yuv_buffer yuv; - int r; - double t; - - theora_info_init(&inf); - theora_comment_init(&tc); - - return 0; - - /* we don't want to execute this kind of nonsense; just for making sure - * that compilation works... */ - memset(&op, 0, sizeof(op)); - r = theora_decode_header(&inf, &tc, &op); - r = theora_decode_init(&st, &inf); - t = theora_granule_time(&st, op.granulepos); - r = theora_decode_packetin(&st, &op); - r = theora_decode_YUVout(&st, &yuv); - theora_clear(&st); - - return 0; -} -EOF - _ld_theora=$($_pkg_config --silence-errors --libs theora) - _inc_theora=$($_pkg_config --silence-errors --cflags theora) - cc_check $_inc_theora $_ld_theora && extra_ldflags="$extra_ldflags $_ld_theora" && - extra_cflags="$extra_cflags $_inc_theora" && _theora=yes + ld_theora="-ltheoradec -logg" + statement_check theora/theoradec.h 'th_info_init(NULL)' $ld_theora && + extra_ldflags="$extra_ldflags $ld_theora" && _theora=yes if test _theora = no; then - _ld_theora="-ltheora -logg" - cc_check $_ld_theora && extra_ldflags="$extra_ldflags $_ld_theora" && _theora=yes - fi - if test "$_theora" = no && test "$_tremor_internal" = yes; then - _ld_theora=$($_pkg_config --silence-errors --libs theora) - _inc_theora=$($_pkg_config --silence-errors --cflags theora) - cc_check tremor/bitwise.c $_inc_theora $_ld_theora && - extra_ldflags="$extra_ldflags $_ld_theora" && - extra_cflags="$extra_cflags $_inc_theora" && _theora=yes - if test _theora = no; then - _ld_theora="-ltheora -logg" - cc_check tremor/bitwise.c $_ld_theora && - extra_ldflags="$extra_ldflags $_ld_theora" && _theora=yes - fi + ld_theora=$($_pkg_config --silence-errors --libs theoradec) + inc_theora=$($_pkg_config --silence-errors --cflags theoradec) + statement_check theora/theoradec.h 'th_info_init(NULL)' $inc_theora $ld_theora && + extra_ldflags="$extra_ldflags $ld_theora" && + extra_cflags="$extra_cflags $inc_theora" && _theora=yes fi fi if test "$_theora" = yes ; then def_theora='#define CONFIG_OGGTHEORA 1' codecmodules="libtheora $codecmodules" # when --enable-theora is forced, we'd better provide a probably sane - # $_ld_theora than nothing - test -z "$_ld_theora" && extra_ldflags="$extra_ldflags -ltheora -logg" + # $ld_theora than nothing + test -z "$ld_theora" && extra_ldflags="$extra_ldflags -ltheoradec -logg" else def_theora='#undef CONFIG_OGGTHEORA' nocodecmodules="libtheora $nocodecmodules" @@ -6544,9 +6343,9 @@ echocheck "libdca support" if test "$_libdca" = auto ; then _libdca=no - for _ld_dca in -ldca -ldts ; do - statement_check_broken stdint.h dts.h 'dts_init(0)' $_ld_dca $_ld_lm && - extra_ldflags="$extra_ldflags $_ld_dca" && _libdca=yes && break + for ld_dca in -ldca -ldts ; do + statement_check_broken stdint.h dts.h 'dts_init(0)' $ld_dca && + extra_ldflags="$extra_ldflags $ld_dca" && _libdca=yes && break done fi if test "$_libdca" = yes ; then @@ -6572,7 +6371,7 @@ return 0; } EOF - cc_check -lmpcdec $_ld_lm && _musepack=yes + cc_check -lmpcdec && _musepack=yes fi if test "$_musepack" = yes ; then def_musepack='#define CONFIG_MUSEPACK 1' @@ -6586,15 +6385,15 @@ echocheck "FAAC support" -if test "$_faac" = auto ; then +if test "$_faac" = auto && test "$_mencoder" = yes ; then cat > $TMPC < #include int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; } EOF _faac=no - for _ld_faac in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do - cc_check $_ld_faac $_ld_lm && libs_mencoder="$libs_mencoder $_ld_faac" && _faac=yes && break + for ld_faac in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do + cc_check $ld_faac && libs_mencoder="$libs_mencoder $ld_faac" && _faac=yes && break done fi if test "$_faac" = yes ; then @@ -6602,7 +6401,7 @@ test "$_faac_lavc" = auto && _faac_lavc=yes if test "$_faac_lavc" = yes ; then def_faac_lavc="#define CONFIG_LIBFAAC 1" - libs_mplayer="$libs_mplayer $_ld_faac" + libs_mplayer="$libs_mplayer $ld_faac" libavencoders="$libavencoders LIBFAAC_ENCODER" fi codecmodules="faac $codecmodules" @@ -6627,7 +6426,7 @@ int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; } EOF - cc_check -lfaad $_ld_lm && _faad=yes + cc_check -lfaad && _faad=yes fi def_faad='#undef CONFIG_FAAD' @@ -6670,16 +6469,16 @@ EOF _libbs2b=no if $_pkg_config --exists libbs2b ; then - _inc_tmp=$($_pkg_config --cflags libbs2b) - _ld_tmp=$($_pkg_config --libs libbs2b) - cc_check $_inc_tmp $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" && - extra_cflags="$extra_cflags $_inc_tmp" && _libbs2b=yes + inc_tmp=$($_pkg_config --cflags libbs2b) + ld_tmp=$($_pkg_config --libs libbs2b) + cc_check $inc_tmp $ld_tmp && extra_ldflags="$extra_ldflags $ld_tmp" && + extra_cflags="$extra_cflags $inc_tmp" && _libbs2b=yes else - for _inc_tmp in "" -I/usr/include/bs2b -I/usr/local/include \ + for inc_tmp in "" -I/usr/include/bs2b -I/usr/local/include \ -I/usr/local/include/bs2b ; do - if cc_check $_inc_tmp $_ld_lm -lbs2b ; then + if cc_check $inc_tmp -lbs2b ; then extra_ldflags="$extra_ldflags -lbs2b" - extra_cflags="$extra_cflags $_inc_tmp" + extra_cflags="$extra_cflags $inc_tmp" _libbs2b=yes break fi @@ -6820,13 +6619,14 @@ _live=no for I in $extra_cflags "-I$_libdir/live" "-I/usr/lib/live" "-I/usr/lib64/live" "-I/usr/local/live" "-I/usr/local/lib/live" ; do - _livelibdir=$(echo $I| sed s/-I//) && - cxx_check $I/liveMedia/include $I/UsageEnvironment/include $I/BasicUsageEnvironment/include $I/groupsock/include $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a $_livelibdir/UsageEnvironment/libUsageEnvironment.a $_livelibdir/groupsock/libgroupsock.a $_ld_sock && + _livelibdir=$(echo $I| sed s/-I//) + test -e "$_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a" && + cxx_check $I/liveMedia/include $I/UsageEnvironment/include $I/BasicUsageEnvironment/include $I/groupsock/include $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a $_livelibdir/UsageEnvironment/libUsageEnvironment.a $_livelibdir/groupsock/libgroupsock.a $ld_sock && extra_ldflags="$_livelibdir/liveMedia/libliveMedia.a \ $_livelibdir/UsageEnvironment/libUsageEnvironment.a \ $_livelibdir/BasicUsageEnvironment/libBasicUsageEnvironment.a \ $_livelibdir/groupsock/libgroupsock.a \ - $extra_ldflags -lstdc++ $_ld_sock" \ + $extra_ldflags -lstdc++ $ld_sock" \ extra_cxxflags="-I$_livelibdir/liveMedia/include \ -I$_livelibdir/UsageEnvironment/include \ -I$_livelibdir/BasicUsageEnvironment/include \ @@ -6834,7 +6634,7 @@ _live=yes && break done if test "$_live" != yes ; then - ld_tmp="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++" + ld_tmp="-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment -lstdc++" if cxx_check -I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock $ld_tmp; then _live_dist=yes fi @@ -6863,11 +6663,11 @@ statement_check librtmp/rtmp.h 'RTMP_Socket(NULL)' -lrtmp && _librtmp=yes && extra_ldflags="$extra_ldflags -lrtmp" if test "$_librtmp" != yes && $_pkg_config --exists librtmp ; then - _inc_tmp=$($_pkg_config --cflags librtmp) - _ld_tmp=$($_pkg_config --libs librtmp) - cc_check $_inc_tmp $_ld_tmp && _librtmp=yes && - extra_ldflags="$extra_ldflags $_ld_tmp" && - extra_cflags="$extra_cflags $_inc_tmp" + inc_tmp=$($_pkg_config --cflags librtmp) + ld_tmp=$($_pkg_config --libs librtmp) + cc_check $inc_tmp $ld_tmp && _librtmp=yes && + extra_ldflags="$extra_ldflags $ld_tmp" && + extra_cflags="$extra_cflags $inc_tmp" fi fi if test "$_librtmp" = yes && test "$networking" = yes; then @@ -6888,15 +6688,15 @@ die "MPlayer will not compile without libavutil in the source tree." ffmpeg=no if test "$ffmpeg_a" = auto ; then - test -d ffmpeg/libavutil && ffmpeg_a=yes && ffmpeg=yes && extra_cflags="$extra_cflags -DFF_API_MAX_STREAMS=0" + test -d ffmpeg/libavutil && ffmpeg_a=yes && ffmpeg=yes elif test "$ffmpeg_so" = auto ; then ffmpeg_so=no if $_pkg_config --exists libavutil ; then inc_ffmpeg=$($_pkg_config --cflags libpostproc libswscale libavformat libavcodec libavutil) - _ld_tmp=$($_pkg_config --libs libpostproc libswscale libavformat libavcodec libavutil) - header_check libavutil/avutil.h $inc_ffmpeg $_ld_tmp && - extra_ldflags="$extra_ldflags $_ld_tmp" && ffmpeg_so=yes && ffmpeg=yes - elif header_check libavutil/avutil.h -lpostproc -lswscale -lavformat -lavcodec -lavutil $_ld_lm ; then + ld_tmp=$($_pkg_config --libs libpostproc libswscale libavformat libavcodec libavutil) + header_check libavutil/avutil.h $inc_ffmpeg $ld_tmp && + extra_ldflags="$extra_ldflags $ld_tmp" && ffmpeg_so=yes && ffmpeg=yes + elif header_check libavutil/avutil.h -lpostproc -lswscale -lavformat -lavcodec -lavutil ; then extra_ldflags="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil" ffmpeg_so=yes ffmpeg=yes @@ -6919,6 +6719,7 @@ def_ffmpeg_so='#undef CONFIG_FFMPEG_SO' nocodecmodules="ffmpeg $nocodecmodules" fi +test "$_vf_lavfi" = yes && def_vf_lavfi='#define CONFIG_VF_LAVFI 1'|| libavfilters='' test "$_libavcodec_mpegaudio_hp" = yes && def_libavcodec_mpegaudio_hp='#define CONFIG_MPEGAUDIO_HP 1' && mak_libavcodec_mpegaudio_hp='CONFIG_MPEGAUDIO_HP = yes' @@ -6970,10 +6771,11 @@ fi echores "$_libopencore_amrwb" + echocheck "libdv-0.9.5+" if test "$_libdv" = auto ; then _libdv=no - statement_check libdv/dv.h 'dv_encoder_new(1, 1, 1)' -ldv $_ld_pthread $_ld_lm && _libdv=yes + statement_check libdv/dv.h 'dv_encoder_new(1, 1, 1)' -ldv $ld_pthread && _libdv=yes fi if test "$_libdv" = yes ; then def_libdv='#define CONFIG_LIBDV095 1' @@ -6988,7 +6790,7 @@ echocheck "CrystalHD" if test "$crystalhd" = auto ; then crystalhd=no - statement_check_broken libcrystalhd/bc_dts_types.h libcrystalhd/libcrystalhd_if.h 'DtsCrystalHDVersion(0, 0)' -lcrystalhd $_ld_lm && crystalhd=yes + statement_check_broken libcrystalhd/bc_dts_types.h libcrystalhd/libcrystalhd_if.h 'DtsCrystalHDVersion(0, 0)' -lcrystalhd && crystalhd=yes fi if test "$crystalhd" = yes ; then @@ -7005,9 +6807,9 @@ echocheck "Xvid" if test "$_xvid" = auto ; then _xvid=no - for _ld_tmp in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do - statement_check xvid.h 'xvid_global(0, 0, 0, 0)' $_ld_tmp && - extra_ldflags="$extra_ldflags $_ld_tmp" && _xvid=yes && break + for ld_tmp in "-lxvidcore" "-lxvidcore $ld_pthread" ; do + statement_check xvid.h 'xvid_global(0, 0, 0, 0)' $ld_tmp && + extra_ldflags="$extra_ldflags $ld_tmp" && _xvid=yes && break done fi @@ -7035,18 +6837,18 @@ echocheck "x264" -if test "$_x264" = auto ; then +if test "$_x264" = auto && test "$_mencoder" = yes ; then cat > $TMPC << EOF #include #include -#if !(X264_BUILD >= 115) +#if !(X264_BUILD >= 118) #error We do not support old versions of x264. Get the latest from git. #endif int main(void) { x264_encoder_open((void*)0); return 0; } EOF _x264=no - for _ld_x264 in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do - cc_check $_ld_x264 && libs_mencoder="$libs_mencoder $_ld_x264" && _x264=yes && break + for ld_x264 in "-lx264 $ld_pthread" "-lx264 $ld_pthread" ; do + cc_check $ld_x264 && libs_mencoder="$libs_mencoder $ld_x264" && _x264=yes && break done fi @@ -7056,7 +6858,7 @@ test "$_x264_lavc" = auto && _x264_lavc=yes if test "$_x264_lavc" = yes ; then def_x264_lavc='#define CONFIG_LIBX264 1' - libs_mplayer="$libs_mplayer $_ld_x264" + libs_mplayer="$libs_mplayer $ld_x264" libavencoders="$libavencoders LIBX264_ENCODER" fi else @@ -7090,12 +6892,12 @@ } EOF if $_pkg_config --exists dirac ; then - _inc_dirac=$($_pkg_config --silence-errors --cflags dirac) - _ld_dirac=$($_pkg_config --silence-errors --libs dirac) - cc_check $_inc_dirac $_ld_dirac && + inc_dirac=$($_pkg_config --silence-errors --cflags dirac) + ld_dirac=$($_pkg_config --silence-errors --libs dirac) + cc_check $inc_dirac $ld_dirac && _libdirac_lavc=yes && - extra_cflags="$extra_cflags $_inc_dirac" && - extra_ldflags="$extra_ldflags $_ld_dirac" + extra_cflags="$extra_cflags $inc_dirac" && + extra_ldflags="$extra_ldflags $ld_dirac" fi fi fi @@ -7122,12 +6924,12 @@ int main(void) { schro_init(); return SCHRO_ENCODER_RATE_CONTROL_CONSTANT_QUALITY; } EOF if $_pkg_config --exists schroedinger-1.0 ; then - _inc_schroedinger=$($_pkg_config --silence-errors --cflags schroedinger-1.0) - _ld_schroedinger=$($_pkg_config --silence-errors --libs schroedinger-1.0) - cc_check $_inc_schroedinger $_ld_schroedinger && + inc_schroedinger=$($_pkg_config --silence-errors --cflags schroedinger-1.0) + ld_schroedinger=$($_pkg_config --silence-errors --libs schroedinger-1.0) + cc_check $inc_schroedinger $ld_schroedinger && _libschroedinger_lavc=yes && - extra_cflags="$extra_cflags $_inc_schroedinger" && - extra_ldflags="$extra_ldflags $_ld_schroedinger" + extra_cflags="$extra_cflags $inc_schroedinger" && + extra_ldflags="$extra_ldflags $ld_schroedinger" fi fi fi @@ -7209,29 +7011,27 @@ fi echores "$_zr" -# mencoder requires (optional) those libs: libmp3lame -if test "$_mencoder" != no ; then echocheck "libmp3lame" def_mp3lame='#undef CONFIG_MP3LAME' def_mp3lame_lavc="#define CONFIG_LIBMP3LAME 0" def_mp3lame_preset='#undef CONFIG_MP3LAME_PRESET' def_mp3lame_preset_medium='#undef CONFIG_MP3LAME_PRESET_MEDIUM' -if test "$_mp3lame" = auto ; then +if test "$_mp3lame" = auto && test "$_mencoder" = yes; then _mp3lame=no - statement_check lame/lame.h 'lame_set_VBR_quality(NULL, 0)' -lmp3lame $_ld_lm && + statement_check lame/lame.h 'lame_set_VBR_quality(NULL, 0)' -lmp3lame && _mp3lame=yes && _mp3lame_lavc=yes fi if test "$_mp3lame" = yes ; then def_mp3lame="#define CONFIG_MP3LAME 1" - _ld_mp3lame=-lmp3lame - libs_mencoder="$libs_mencoder $_ld_mp3lame" - statement_check lame/lame.h 'lame_set_preset(NULL, STANDARD_FAST)' $_ld_mp3lame $_ld_lm && def_mp3lame_preset="#define CONFIG_MP3LAME_PRESET 1" - statement_check lame/lame.h 'lame_set_preset(NULL, MEDIUM_FAST)' $_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium="#define CONFIG_MP3LAME_PRESET_MEDIUM 1" + ld_mp3lame=-lmp3lame + libs_mencoder="$libs_mencoder $ld_mp3lame" + statement_check lame/lame.h 'lame_set_preset(NULL, STANDARD_FAST)' $ld_mp3lame && def_mp3lame_preset="#define CONFIG_MP3LAME_PRESET 1" + statement_check lame/lame.h 'lame_set_preset(NULL, MEDIUM_FAST)' $ld_mp3lame && def_mp3lame_preset_medium="#define CONFIG_MP3LAME_PRESET_MEDIUM 1" if test "$_mp3lame_lavc" = yes ; then def_mp3lame_lavc="#define CONFIG_LIBMP3LAME 1" libavencoders="$libavencoders LIBMP3LAME_ENCODER" - libs_mplayer="$libs_mplayer $_ld_mp3lame" + libs_mplayer="$libs_mplayer $ld_mp3lame" fi else _mp3lame_lavc=no @@ -7239,16 +7039,13 @@ res_comment="in FFmpeg: $_mp3lame_lavc" echores "$_mp3lame" -fi # test "$_mencoder" != no echocheck "mencoder" -if test "$_mencoder" = yes ; then - def_muxers='#define CONFIG_MUXERS 1' -else +if test "$_mencoder" = no ; then # mpeg1video for vf_lavc, snow for vf_uspp / vf_mcdeint, libavencoders="$mplayer_encoders MPEG1VIDEO_ENCODER SNOW_ENCODER" - libavmuxers="" - def_muxers='#define CONFIG_MUXERS 0' + # needed for codec id -> tag conversion + libavmuxers="AVI_MUXER" fi echores "$_mencoder" @@ -7412,7 +7209,7 @@ if test "$_radio" = yes ; then def_radio='#define CONFIG_RADIO 1' inputmodules="radio $inputmodules" - if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then + if test "$_alsa" != yes -a "$_ossaudio" != yes ; then _radio_capture=no fi if test "$_radio_capture" = yes ; then @@ -7505,7 +7302,7 @@ echocheck "ftp" -if test "$_ftp" = "auto" && test "$networking" = "yes" && ! beos ; then +if test "$_ftp" = "auto" && test "$networking" = "yes" ; then _ftp=yes fi if test "$_ftp" = yes ; then @@ -7760,13 +7557,13 @@ # Dynamic linking flags # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly) -_ld_dl_dynamic='' -freebsd || netbsd || openbsd || dragonfly || bsdos && _ld_dl_dynamic='-rdynamic' +ld_dl_dynamic='' +freebsd || netbsd || openbsd || dragonfly || bsdos && ld_dl_dynamic='-rdynamic' if test "$_real" = yes || test "$_xanim" = yes && ! win32 && ! qnx && ! darwin && ! os2 && ! sunos; then - _ld_dl_dynamic='-rdynamic' + ld_dl_dynamic='-rdynamic' fi -extra_ldflags="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic" +extra_ldflags="$extra_ldflags $ld_pthread $ld_dl $ld_dl_dynamic" bsdos && extra_ldflags="$extra_ldflags -ldvd" (netbsd || openbsd) && x86_32 && extra_ldflags="$extra_ldflags -li386" @@ -7814,7 +7611,7 @@ echores "$_lircc" if arm; then -# Detect maemo development platform libraries availability (http://www.maemo.org), +# Detect Maemo development platform libraries availability (http://www.maemo.org), # they are used when run on Nokia 770|8x0 echocheck "maemo (Nokia 770|8x0)" if test "$_maemo" = auto ; then @@ -7841,23 +7638,23 @@ fi # linker paths should be the same for mencoder and mplayer -_ld_tmp="" +ld_tmp="" for I in $libs_mplayer ; do _tmp=$(echo $I | sed -e 's/^-L.*$//') if test -z "$_tmp" ; then extra_ldflags="$extra_ldflags $I" else - _ld_tmp="$_ld_tmp $I" + ld_tmp="$ld_tmp $I" fi done -libs_mplayer=$_ld_tmp +libs_mplayer=$ld_tmp ############################################################################# CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE" -CXXFLAGS=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS" +CXXFLAGS=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" # 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 @@ -7879,7 +7676,7 @@ _dvdnav=no _dvdnavdir=$($_dvdnavconfig --cflags) _dvdnavlibs=$($_dvdnavconfig --libs) - statement_check_broken stdint.h dvdnav/dvdnav.h 'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes + statement_check_broken stdint.h dvdnav/dvdnav.h 'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $ld_dl $ld_pthread && _dvdnav=yes fi if test "$_dvdnav" = yes ; then def_dvdnav='#define CONFIG_DVDNAV 1' @@ -7900,6 +7697,187 @@ # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check). # Read dvdnav comment above. + +# XML documentation tests +echocheck "XML catalogs" +for try_catalog in \ + /etc/sgml/catalog \ + /usr/share/xml/docbook/*/catalog.xml \ + /opt/local/share/xml/docbook-xml/*/catalog.xml \ + /opt/local/share/xml/docbook/*/catalog.xml \ + /usr/share/sgml/docbook/*/*catalog \ + /usr/share/apps/ksgmltools2/customization/en/catalog \ + /usr/share/sgml/catalog \ + /usr/local/share/sgml/catalog \ + /usr/lib/sgml/catalog \ + /usr/local/lib/sgml/catalog \ + /usr/share/docbook-xml42/catalog.xml \ + /usr/share/sgml/docbook/xmlcatalog; do + if test -f "$try_catalog"; then + catalog=$try_catalog + break + fi +done + +if test -n "$catalog"; then + echores "SGML catalog" + catalog_opts=--catalogs +else + echores "No SGML catalog found." +fi + +echocheck "XML chunked stylesheet" +for try_chunk_xsl in \ + /usr/share/xml/docbook/*/html/chunk.xsl \ + /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \ + /usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl \ + /usr/local/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \ + /usr/local/share/sgml/docbook/yelp/docbook/html/chunk.xsl \ + /usr/share/docbook-xsl/html/chunk.xsl \ + /usr/share/sgml/docbook/xsl-stylesheets*/html/chunk.xsl \ + /usr/share/xml/docbook/stylesheet/nwalsh/current/html/chunk.xsl \ + /opt/local/share/xsl/docbook-xsl/html/chunk.xsl; do + if test -f "$try_chunk_xsl"; then + chunk_xsl=$try_chunk_xsl + break + fi +done + +if test -z "$chunk_xsl"; then + chunk_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl + echores "not found, using default" + fake_chunk_xsl=yes +else + echores "chunk.xsl" +fi + +echocheck "XML monolithic stylesheet" +for try_docbook_xsl in \ + /usr/share/xml/docbook/*/html/docbook.xsl \ + /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \ + /usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl \ + /usr/local/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \ + /usr/local/share/sgml/docbook/yelp/docbook/html/docbook.xsl \ + /usr/share/docbook-xsl/html/docbook.xsl \ + /usr/share/sgml/docbook/xsl-stylesheets*/html/docbook.xsl \ + /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl \ + /opt/local/share/xsl/docbook-xsl/html/docbook.xsl; do + if test -f "$try_docbook_xsl"; then + docbook_xsl=$try_docbook_xsl + break + fi +done + +if test -z "$docbook_xsl"; then + docbook_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl + echores "not found, using default" +else + echores "docbook.xsl" +fi + +cat > DOCS/xml/html-chunk.xsl << EOF + + + + + + + + +EOF + +cat > DOCS/xml/html-single.xsl << EOF + + + + + + + + +EOF + +echocheck "XML DTD" +#FIXME: This should prefer higher version numbers, not the other way around .. +for try_dtd in \ + /usr/share/xml/docbook/*/dtd/4*/docbookx.dtd \ + /usr/share/xml/docbook/*/docbookx.dtd \ + /usr/share/sgml/docbook/*/docbookx.dtd \ + /usr/share/sgml/docbook/dtd/*/docbookx.dtd \ + /usr/share/sgml/docbook/dtd/xml/*/docbookx.dtd \ + /usr/share/docbook-xml*/docbookx.dtd \ + /opt/local/share/xml/docbook*/*/docbookx.dtd \ + /usr/share/apps/ksgmltools2/docbook/*/docbookx.dtd; do + if test -f "$try_dtd"; then + dtd=$try_dtd + break + fi +done + +if test -z "$dtd"; then + dtd=/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd + echores "not found, using default" +else + echores "docbookx.dtd" +fi + +for lang in $language_doc; do + cat > DOCS/xml/$lang/main.xml << EOF + + + + + + + + + + + + +]> + +&documentation.xml; +&install.xml; +&usage.xml; +&video.xml; +&ports.xml; +&mencoder.xml; +&encoding-guide.xml; +&faq.xml; +&bugreports.xml; +&skin.xml; + +EOF + +done + +echocheck "valid XSLT processor" +if xsltproc --version > /dev/null 2>&1; then + if test -z "$fake_chunk_xsl"; then + echores "xsltproc" + xsltcommand="xsltproc $catalog_opts -o \$\$1 \$\$2 \$\$3" + else + echores "Found xsltproc but no stylesheets on your system." + echores "xsltproc is unusable without stylesheets." + fi +else + echores "xsltproc not found" +fi + +############################################################################# + mak_enable () { list=$(echo $1 | tr '[a-z]' '[A-Z]') item=$(echo $2 | tr '[a-z]' '[A-Z]') @@ -7927,6 +7905,10 @@ MAN_LANGS = $language_man MAN_LANG_ALL = $man_lang_all +CATALOG = $catalog +XMLLINT_COMMAND = xmllint --noout --noent --postvalid $catalog_opts \$* +XSLT_COMMAND = $xsltcommand + prefix = \$(DESTDIR)$_prefix BINDIR = \$(DESTDIR)$_bindir DATADIR = \$(DESTDIR)$_datadir @@ -7956,7 +7938,7 @@ CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper CFLAGS_TREMOR_LOW = $cflags_tremor_low -EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs +EXTRALIBS = $extra_ldflags $ld_static $extra_libs EXTRALIBS_MPLAYER = $libs_mplayer EXTRALIBS_MENCODER = $libs_mencoder @@ -7975,21 +7957,20 @@ MENCODER = $_mencoder MPLAYER = $_mplayer -NEED_GETTIMEOFDAY = $need_gettimeofday -NEED_GLOB = $need_glob -NEED_MMAP = $need_mmap -NEED_SETENV = $need_setenv -NEED_SHMEM = $need_shmem -NEED_STRSEP = $need_strsep -NEED_SWAB = $need_swab -NEED_VSSCANF = $need_vsscanf +# operating system features which have local fallbacks +GETTIMEOFDAY = $gettimeofday +GLOB = $glob +GLOB_WIN = $glob_win +MMAP = $mmap +SETENV = $setenv +SHMEM = $shmem +STRSEP = $strsep +VSSCANF = $vsscanf # features 3DFX = $_3dfx AA = $_aa -ALSA1X = $_alsa1x -ALSA9 = $_alsa9 -ALSA5 = $_alsa5 +ALSA = $_alsa APPLE_IR = $_apple_ir APPLE_REMOTE = $_apple_remote ARTS = $_arts @@ -8025,6 +8006,7 @@ GL = $_gl GL_WIN32 = $_gl_win32 GL_X11 = $_gl_x11 +GL_EGL_X11 = $_gl_egl_x11 GL_SDL = $_gl_sdl MATRIXVIEW = $matrixview GUI = $_gui @@ -8149,11 +8131,19 @@ FFMPEG = $ffmpeg FFMPEG_A = $ffmpeg_a +CONFIG_AVCODEC = $ffmpeg_a +CONFIG_AVFILTER = $ffmpeg_a +CONFIG_AVFORMAT = $ffmpeg_a +CONFIG_AVUTIL = $ffmpeg_a +CONFIG_POSTPROC = $ffmpeg_a +CONFIG_SWSCALE = $ffmpeg_a + ASFLAGS = \$(CFLAGS) AS_DEPFLAGS= $DEPFLAGS HOSTCC = \$(HOST_CC) HOSTCFLAGS = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -O3 HOSTLIBS = -lm +AS_O = -o \$@ CC_O = -o \$@ LD = gcc RANLIB = $_ranlib @@ -8162,11 +8152,16 @@ YASMFLAGS = $YASMFLAGS CONFIG_STATIC = yes -SRC_PATH = ../ +SRC_PATH = . LIBPREF = lib LIBSUF = .a -LIBNAME = \$(LIBPREF)\$(NAME)\$(LIBSUF) FULLNAME = \$(NAME)\$(BUILDSUF) +LIBNAME = \$(LIBPREF)\$(FULLNAME)\$(LIBSUF) + +# These are not necessary for building, since we do not use shared libraries, +# but without them target names clash, causing Make warnings by the boatload. +SLIBNAME = \$(SLIBPREF)\$(FULLNAME)\$(SLIBSUF) +SLIBNAME_WITH_MAJOR = \$(SLIBNAME)-42 # Some FFmpeg codecs depend on these. Enable them unconditionally for now. CONFIG_AANDCT = yes @@ -8174,6 +8169,7 @@ CONFIG_DWT = yes CONFIG_FFT = yes CONFIG_GOLOMB = yes +CONFIG_H264CHROMA = yes CONFIG_H264DSP = yes CONFIG_H264PRED= yes CONFIG_HUFFMAN = yes @@ -8195,9 +8191,10 @@ CONFIG_ENCODERS = yes CONFIG_GPL = yes CONFIG_MLIB = $_mlib -CONFIG_MUXERS = $_mencoder -CONFIG_POSTPROC = yes +CONFIG_MUXERS = yes +CONFIG_NETWORK = $networking CONFIG_RTPDEC = $networking +CONFIG_VF_LAVFI = $_vf_lavfi CONFIG_VDPAU = $_vdpau CONFIG_XVMC = $_xvmc CONFIG_ZLIB = $_zlib @@ -8216,6 +8213,7 @@ $(echo $libavprotocols | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/') $(echo $libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/') $(echo $libavhwaccels | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/') +$(echo $libavfilters | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/') EOF ############################################################################# @@ -8254,8 +8252,8 @@ */ #define CONFIG_FAKE_MONO 1 -/* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */ -#define MAX_OUTBURST 65536 +/* set up max. outburst. use 131072 for TrueHD SPDIF pass-through */ +#define MAX_OUTBURST 131072 /* set up audio OUTBURST. Do not change this! */ #define OUTBURST 512 @@ -8278,7 +8276,7 @@ /* definitions needed by included libraries */ #define HAVE_INTTYPES_H 1 -/* libmpeg2 + FFmpeg */ +/* libmpeg2 */ $def_fast_inttypes /* libdvdcss */ #define HAVE_ERRNO_H 1 @@ -8298,13 +8296,11 @@ /* system headers */ $def_alloca_h -$def_alsa_asoundlib_h $def_altivec_h $def_malloc_h $def_mman_h $def_mman_has_map_failed $def_soundcard_h -$def_sys_asoundlib_h $def_sys_soundcard_h $def_sys_sysinfo_h $def_sys_videoio_h @@ -8327,7 +8323,6 @@ $def_setmode $def_shm $def_strsep -$def_swab $def_sysi86 $def_sysi86_iv $def_termcap @@ -8348,7 +8343,6 @@ $def_macosx_finder $def_maemo $def_memalign_hack -$def_named_asm_args $def_priority $def_quicktime $def_restrict_keyword @@ -8372,9 +8366,11 @@ /* CPU stuff */ #define __CPU__ $iproc +$def_armthumb +$def_bigendian $def_ebx_available +$def_vfp_args $def_words_endian -$def_bigendian $(ff_config_enable "$arch_all" "$arch" "#" "ARCH") $(ff_config_enable "$subarch_all" "$subarch" "#" "ARCH") $(ff_config_enable "$cpuexts_all" "$cpuexts" "#" "HAVE") @@ -8452,9 +8448,6 @@ /* Audio output drivers */ $def_alsa -$def_alsa1x -$def_alsa5 -$def_alsa9 $def_arts $def_coreaudio $def_dart @@ -8554,6 +8547,7 @@ $def_gl $def_gl_win32 $def_gl_x11 +$def_gl_egl_x11 $def_gl_sdl $def_matrixview $def_ivtv @@ -8613,13 +8607,14 @@ #define CONFIG_DECODERS 1 #define CONFIG_ENCODERS 1 #define CONFIG_DEMUXERS 1 -$def_muxers +#define CONFIG_MUXERS 1 $def_rtpdec $def_arpa_inet_h $def_bswap $def_bzlib $def_dcbzl +$def_cbrtf $def_exp2 $def_exp2f $def_fast_64bit @@ -8646,20 +8641,29 @@ $def_pthreads $def_round $def_roundf -$def_ten_operands $def_threads +$def_trunc $def_truncf +$def_vf_lavfi +$def_w32threads $def_xform_asm $def_xmm_clobbers $def_yasm #define CONFIG_AUDIO_FLOAT 0 +#define CONFIG_AVCODEC 1 +#define CONFIG_AVSERVER 0 #define CONFIG_FASTDIV 0 #define CONFIG_FFSERVER 0 +#define CONFIG_GNUTLS 0 #define CONFIG_GPL 1 #define CONFIG_GRAY 0 +#define CONFIG_LIBMODPLUG 0 #define CONFIG_LIBVORBIS 0 +#define CONFIG_OPENSSL 0 #define CONFIG_POWERPC_PERF 0 +/* For now prefer speed over avoiding potential invalid reads */ +#define CONFIG_SAFE_BITSTREAM_READER 0 #define CONFIG_SHARED 0 #define CONFIG_SMALL 0 #define CONFIG_SWSCALE_ALPHA 1 @@ -8671,14 +8675,15 @@ #define HAVE_INLINE_ASM 1 #define HAVE_ISATTY 0 #define HAVE_LDBRX 0 +#define HAVE_LOCALTIME_R 0 #define HAVE_MAPVIEWOFFILE 0 +#define HAVE_OS2THREADS 0 #define HAVE_PPC4XX 0 #define HAVE_STRERROR_R 0 +#define HAVE_STRPTIME 0 #define HAVE_SYMVER_ASM_LABEL 0 #define HAVE_SYMVER_GNU_ASM 0 #define HAVE_SYS_SELECT_H 0 -#define HAVE_TRUNC 1 -#define HAVE_VFP_ARGS 1 #define HAVE_VIRTUALALLOC 0 /* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */ @@ -8687,6 +8692,7 @@ #define CONFIG_DWT 1 #define CONFIG_FFT 1 #define CONFIG_GOLOMB 1 +#define CONFIG_H264CHROMA 1 #define CONFIG_H264DSP 1 #define CONFIG_H264PRED 1 #define CONFIG_HUFFMAN 1 @@ -8729,6 +8735,7 @@ $(ff_config_enable "$libavprotocols_all" "$libavprotocols" "#") $(ff_config_enable "$libavbsfs_all" "$libavbsfs" "#") $(ff_config_enable "$libavhwaccels_all" "$libavhwaccels" "#") +$(ff_config_enable "$libavfilters_all" "$libavfilters" "#") #endif /* MPLAYER_CONFIG_H */ EOF @@ -8768,12 +8775,16 @@ # Create a config.mak for FFmpeg that includes MPlayer's config.mak. cat > ffmpeg/config.mak << EOF -include ../../config.mak +ifndef FFMPEG_CONFIG_MAK +FFMPEG_CONFIG_MAK = 1 +include ../config.mak +endif # FFMPEG_CONFIG_MAK EOF cat > ffmpeg/config.h << EOF #include "../config.h" EOF +touch ffmpeg/.config ############################################################################# @@ -8816,7 +8827,7 @@ if test "$_mtrr" = yes ; then - echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$language_doc/video.html#mtrr)" + echo "Please check MTRR settings at /proc/mtrr (see DOCS/HTML/$language_doc/video.html#mtrr)" echo fi diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/Copyright mplayer-1.0~rc4.dfsg1+svn34540/Copyright --- mplayer-1.0~rc4.dfsg1+svn33713/Copyright 2011-01-03 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/Copyright 2011-09-20 19:15:36.000000000 +0000 @@ -15,7 +15,7 @@ Name: FFmpeg Version: Subversion HEAD URL: http://www.ffmpeg.org -Directory: libavcodec, libavformat, libavutil, libpostproc +Directory: ffmpeg Copyright: Many, see individual files for copyright notices. License: GNU Lesser General Public License, some parts GNU General Public License, GNU General Public License when combined Binary files /tmp/IdL3NxjnEN/mplayer-1.0~rc4.dfsg1+svn33713/core and /tmp/6FvlH9y3Ai/mplayer-1.0~rc4.dfsg1+svn34540/core differ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/cpudetect.c mplayer-1.0~rc4.dfsg1+svn34540/cpudetect.c --- mplayer-1.0~rc4.dfsg1+svn33713/cpudetect.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/cpudetect.c 2011-11-03 13:24:46.000000000 +0000 @@ -16,6 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "libavutil/x86_cpu.h" #include "config.h" #include "cpudetect.h" #include "mp_msg.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/cpudetect.h mplayer-1.0~rc4.dfsg1+svn34540/cpudetect.h --- mplayer-1.0~rc4.dfsg1+svn33713/cpudetect.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/cpudetect.h 2011-11-03 13:24:46.000000000 +0000 @@ -19,15 +19,11 @@ #ifndef MPLAYER_CPUDETECT_H #define MPLAYER_CPUDETECT_H -#include "config.h" - #define CPUTYPE_I386 3 #define CPUTYPE_I486 4 #define CPUTYPE_I586 5 #define CPUTYPE_I686 6 -#include "libavutil/x86_cpu.h" - typedef struct cpucaps_s { int cpuType; int cpuModel; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/cpuinfo.c mplayer-1.0~rc4.dfsg1+svn34540/cpuinfo.c --- mplayer-1.0~rc4.dfsg1+svn33713/cpuinfo.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/cpuinfo.c 2011-08-11 17:45:43.000000000 +0000 @@ -32,10 +32,6 @@ #define sleep(t) Sleep(1000*t); #endif -#ifdef __BEOS__ -#define usleep(t) snooze(t) -#endif - #ifdef M_UNIX typedef long long int64_t; #define MISSING_USLEEP diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/debian/all-lang-config-mak.sh mplayer-1.0~rc4.dfsg1+svn34540/debian/all-lang-config-mak.sh --- mplayer-1.0~rc4.dfsg1+svn33713/debian/all-lang-config-mak.sh 2011-08-17 17:04:23.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/debian/all-lang-config-mak.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/sh - -# hack to avoid having to configure mplayer just for building the -# xml documentation - -doc_lang_all=`echo DOCS/xml/??/ DOCS/xml/??_??/ | sed -e "s:DOCS/xml/\(..\)/:\1:g" -e "s:DOCS/xml/\(.._..\)/:\1:g"` - -echo "DOC_LANG_ALL = ${doc_lang_all}" -echo "DOC_LANGS = ${doc_lang_all}" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/debian/changelog mplayer-1.0~rc4.dfsg1+svn34540/debian/changelog --- mplayer-1.0~rc4.dfsg1+svn33713/debian/changelog 2011-11-13 00:53:07.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/debian/changelog 2012-01-12 21:34:34.000000000 +0000 @@ -1,8 +1,46 @@ -mplayer (2:1.0~rc4.dfsg1+svn33713-5build1) precise; urgency=low +mplayer (2:1.0~rc4.dfsg1+svn34540-1) unstable; urgency=low - * Rebuild for libx264-118. + * New upstream snapshot + * upload to unstable + + -- Reinhard Tartler Thu, 12 Jan 2012 22:23:28 +0100 + +mplayer (2:1.0~rc4.dfsg1+svn34492-3) experimental; urgency=low + + * Build against external libmpeg2 + * drop 51_FTBFS_arm.patch again + + -- Reinhard Tartler Mon, 09 Jan 2012 22:23:38 +0100 + +mplayer (2:1.0~rc4.dfsg1+svn34492-2) experimental; urgency=low + + * no longer build depend on libcdparanoia-dev on the Hurd + * Fix FTBFS on the hurd. + Thanks to Samuel Thibault (Closes: #654974) + * Fix FTBFS on arm + + -- Reinhard Tartler Sun, 08 Jan 2012 14:25:45 +0100 - -- Colin Watson Sun, 13 Nov 2011 00:53:01 +0000 +mplayer (2:1.0~rc4.dfsg1+svn34492-1) experimental; urgency=low + + [ Rico Tzschichholz ] + * New upstream snapshot, Closes: #650339, #643621, #481807 + * Imported Upstream version 1.0~rc4+svn34492 + * Bump standards version + * Bump dependency on libav >= 4:0.8~, Closes: #653887 + * Fix build-indep + + [ Reinhard Tartler ] + * Build mplayer-gui again, Closes: #568514 + * Drop debian/all-lang-config-mak.sh, no longer needed + * include .dfsg1 in version number + * remove get-orig-source target + * no longer prune compiler flags from the environment + * No longer advertise nor build 3fdx, mga and dxr3 backends, + Closes: #496106, #442181, #533546 + * beautify mplayer version identification string + + -- Reinhard Tartler Fri, 06 Jan 2012 16:26:01 +0100 mplayer (2:1.0~rc4.dfsg1+svn33713-5) unstable; urgency=low @@ -74,6 +112,12 @@ -- Reinhard Tartler Sat, 25 Jun 2011 09:05:54 +0200 +mplayer (2:1.0~rc4+svn33713-1) experimental; urgency=low + + * New upstream snapshot + + -- Reinhard Tartler Sat, 25 Jun 2011 09:05:54 +0200 + mplayer (2:1.0~rc4.dfsg1-2) unstable; urgency=low [ Fabian Greffrath ] diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/debian/control mplayer-1.0~rc4.dfsg1+svn34540/debian/control --- mplayer-1.0~rc4.dfsg1+svn33713/debian/control 2011-10-29 08:20:35.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/debian/control 2012-01-12 21:22:22.000000000 +0000 @@ -6,7 +6,7 @@ A Mennucc1 , Reinhard Tartler , Andres Mejia -Standards-Version: 3.9.1 +Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/git/pkg-multimedia/mplayer.git Vcs-Browser: http://git.debian.org/?p=pkg-multimedia/mplayer.git;a=summary Homepage: http://www.mplayerhq.hu/ @@ -18,13 +18,13 @@ libaa1-dev, libasound2-dev [linux-any], libaudio-dev, - libavcodec-dev (>= 4:0.7~), - libavdevice-dev (>= 4:0.7~), - libavformat-dev (>= 4:0.7~), - libavutil-dev (>= 4:0.7~), + libavcodec-dev (>= 4:0.8~), + libavdevice-dev (>= 4:0.8~), + libavformat-dev (>= 4:0.8~), + libavutil-dev (>= 4:0.8~), libbluray-dev, libcaca-dev, - libcdparanoia-dev | libcdparanoia0-dev, + libcdparanoia-dev [!hurd-i386] | libcdparanoia0-dev [!hurd-i386], libdirectfb-dev, libdts-dev, libdvdnav-dev, @@ -37,6 +37,7 @@ libfribidi-dev, libgif-dev, libgl1-mesa-dev, + libgtk2.0-dev, libjack-dev, libjpeg-dev, liblircclient-dev, @@ -44,17 +45,18 @@ liblzo2-dev, libmp3lame-dev, libmpcdec-dev, + libmpeg2-4-dev, libncurses5-dev, libopenal-dev, libpng12-dev | libpng-dev, - libpostproc-dev (>= 4:0.7~), + libpostproc-dev (>= 4:0.8~), libpulse-dev, libschroedinger-dev, libsdl1.2-dev | libsdl1.1-dev, libsmbclient-dev, libspeex-dev, libsvga1-dev [i386 amd64], - libswscale-dev (>= 4:0.7~), + libswscale-dev (>= 4:0.8~), libtheora-dev (>= 1.0~beta1), libvdpau-dev [i386 amd64], libvorbis-dev, @@ -75,6 +77,33 @@ yasm, zlib1g-dev +Package: mplayer-gui +Architecture: any +Suggests: + bzip2, + fontconfig, + mplayer-doc, + ttf-freefont +Depends: + mplayer, + mplayer-skin, + ${misc:Depends}, + ${shlibs:Depends} +Replaces: + mplayer (<< 2:1.0~rc3+svn20090426-2), + mplayer-doc (<< 2:1.0~rc3+svn20090426-2) +Description: movie player for Unix-like systems + MPlayer plays most MPEG, VOB, AVI, Ogg/OGM, VIVO, + ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM, RoQ, PVA files, + supported by many native, XAnim, RealPlayer, and Win32 DLL codecs. It can + also play VideoCD, SVCD, DVD, 3ivx, RealMedia, and DivX movies. + . + Another big feature of MPlayer is the wide range of supported output + drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, + DirectFB, but also SDL. + . + This package includes the gui variant of mplayer. + Package: mencoder Architecture: any Suggests: @@ -115,7 +144,8 @@ mplayer-doc (<< 2:1.0~rc3+svn20090426-2), mplayer-nogui (<< 2:1.0~rc3+svn20090426-2), mplayer2 -Conflicts: mplayer2 +Conflicts: + mplayer2 Description: movie player for Unix-like systems MPlayer plays most MPEG, VOB, AVI, Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM, RoQ, PVA files, @@ -124,12 +154,7 @@ . Another big feature of MPlayer is the wide range of supported output drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, - DirectFB, but also SDL (plus all its drivers) and some - low level card-specific drivers (for Matrox, 3Dfx and Radeon, Mach64 - and Permedia3). Most of them support software or hardware scaling, - therefore allowing fullscreen display. MPlayer is also able - to use some hardware MPEG decoder boards, such as the DVB - and DXR3/Hollywood+. + DirectFB, but also SDL. . Not all of the upstream code is distributed in the source tarball. See the README.Debian and copyright files for details. @@ -143,8 +168,10 @@ ${misc:Depends} Recommends: ffmpeg-dbg -Replaces: mplayer2-dbg -Conflicts: mplayer2-dbg +Replaces: + mplayer2-dbg +Conflicts: + mplayer2-dbg Description: debugging symbols for MPlayer This package contains the debugging symbols for MPlayer, a movie player for Unix-like systems. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/debian/patches/50_Hurd_PATH_MAX.patch mplayer-1.0~rc4.dfsg1+svn34540/debian/patches/50_Hurd_PATH_MAX.patch --- mplayer-1.0~rc4.dfsg1+svn33713/debian/patches/50_Hurd_PATH_MAX.patch 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/debian/patches/50_Hurd_PATH_MAX.patch 2012-01-12 21:22:22.000000000 +0000 @@ -0,0 +1,274 @@ +Author: Samuel Thibault +Description: fix FTBFS on the Hurd +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=654974 + +--- a/libmenu/menu_filesel.c ++++ b/libmenu/menu_filesel.c +@@ -16,6 +16,9 @@ + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + ++#ifdef __GNU__ ++#define _GNU_SOURCE ++#endif + #include + #include + #include +@@ -418,7 +421,11 @@ static void clos(menu_t* menu) { + static int open_fs(menu_t* menu, char* args) { + char *path = mpriv->path; + int r = 0; ++#ifdef __GNU__ ++ char *wd, *b = NULL; ++#else + char wd[PATH_MAX+1], b[PATH_MAX+1]; ++#endif + args = NULL; // Warning kill + + menu->draw = menu_list_draw; +@@ -447,7 +454,11 @@ static int open_fs(menu_t* menu, char* a + } + } + ++#ifdef __GNU__ ++ wd = get_current_dir_name(); ++#else + getcwd(wd,PATH_MAX); ++#endif + if (!path || path[0] == '\0') { + #if 0 + char *slash = NULL; +@@ -466,13 +477,24 @@ static int open_fs(menu_t* menu, char* a + path = wd; + } + if (path[0] != '/') { ++#ifdef __GNU__ ++ if(path[strlen(path)-1] != '/') ++ asprintf(&b,"%s/%s/",wd,path); ++ else ++ asprintf(&b,"%s/%s",wd,path); ++#else + if(path[strlen(path)-1] != '/') + snprintf(b,sizeof(b),"%s/%s/",wd,path); + else + snprintf(b,sizeof(b),"%s/%s",wd,path); ++#endif + path = b; + } else if (path[strlen(path)-1]!='/') { ++#ifdef __GNU__ ++ asprintf(&b,"%s/",path); ++#else + sprintf(b,"%s/",path); ++#endif + path = b; + } + if (menu_chroot && menu_chroot[0] == '/') { +@@ -483,13 +505,22 @@ static int open_fs(menu_t* menu, char* a + if (menu_chroot[l] == '/') + path = menu_chroot; + else { ++#ifdef __GNU__ ++ asprintf(&b,"%s/",menu_chroot); ++#else + sprintf(b,"%s/",menu_chroot); ++#endif + path = b; + } + } + } + r = open_dir(menu,path); + ++#ifdef __GNU__ ++ free(wd); ++ free(b); ++#endif ++ + return r; + } + +--- a/libmpdemux/mf.c ++++ b/libmpdemux/mf.c +@@ -16,6 +16,9 @@ + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + ++#ifdef __GNU__ ++#define _GNU_SOURCE ++#endif + #include + #include + #include +@@ -64,8 +67,13 @@ mf_t* open_mf(char * filename){ + FILE *lst_f=fopen(filename + 1,"r"); + if ( lst_f ) + { ++#ifdef __GNU__ ++ fname=NULL; ++ while ( getline( &fname, 0, lst_f ) >= 0 ) ++#else + fname=malloc(PATH_MAX); + while ( fgets( fname,PATH_MAX,lst_f ) ) ++#endif + { + /* remove spaces from end of fname */ + char *t=fname + strlen( fname ) - 1; +@@ -80,6 +88,10 @@ mf_t* open_mf(char * filename){ + mf->names[mf->nr_of_files]=strdup( fname ); + mf->nr_of_files++; + } ++#ifdef __GNU__ ++ free( fname ); ++ fname=NULL; ++#endif + } + fclose( lst_f ); + +--- a/stream/stream_bd.c ++++ b/stream/stream_bd.c +@@ -19,6 +19,10 @@ + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + ++#ifdef __GNU__ ++#define _GNU_SOURCE ++#endif ++ + #include + #include + #include +@@ -145,7 +149,11 @@ static void id2str(const uint8_t *id, in + static int find_vuk(struct bd_priv *bd, const uint8_t discid[20]) + { + char line[1024]; ++#ifdef __GNU__ ++ char *filename; ++#else + char filename[PATH_MAX]; ++#endif + const char *home; + int vukfound = 0; + stream_t *file; +@@ -153,13 +161,23 @@ static int find_vuk(struct bd_priv *bd, + + // look up discid in KEYDB.cfg to get VUK + home = getenv("HOME"); ++#ifdef __GNU__ ++ asprintf(&filename, "%s/.dvdcss/KEYDB.cfg", home); ++#else + snprintf(filename, sizeof(filename), "%s/.dvdcss/KEYDB.cfg", home); ++#endif + file = open_stream(filename, NULL, NULL); + if (!file) { + mp_msg(MSGT_OPEN,MSGL_ERR, + "Cannot open VUK database file %s\n", filename); ++#ifdef __GNU__ ++ free(filename); ++#endif + return 0; + } ++#ifdef __GNU__ ++ free(filename); ++#endif + id2str(discid, 20, idstr); + while (stream_read_line(file, line, sizeof(line), 0)) { + char *vst; +@@ -204,23 +222,40 @@ static int bd_get_uks(struct bd_priv *bd + struct AVAES *a; + struct AVSHA *asha; + stream_t *file; ++#ifdef __GNU__ ++ char *filename; ++#else + char filename[PATH_MAX]; ++#endif + uint8_t discid[20]; + char idstr[ID_STR_LEN]; + ++#ifdef __GNU__ ++ asprintf(&filename, BD_UKF_PATH, bd->device); ++#else + snprintf(filename, sizeof(filename), BD_UKF_PATH, bd->device); ++#endif + file = open_stream(filename, NULL, NULL); + if (!file) { + mp_msg(MSGT_OPEN, MSGL_ERR, + "Cannot open file %s to get UK and DiscID\n", filename); ++#ifdef __GNU__ ++ free(filename); ++#endif + return 0; + } + file_size = file->end_pos; + if (file_size <= 0 || file_size > 10 * 1024* 1024) { + mp_msg(MSGT_OPEN, MSGL_ERR, "File %s too large\n", filename); + free_stream(file); ++#ifdef __GNU__ ++ free(filename); ++#endif + return 0; + } ++#ifdef __GNU__ ++ free(filename); ++#endif + buf = av_malloc(file_size); + stream_read(file, buf, file_size); + free_stream(file); +@@ -411,15 +446,29 @@ static void get_clipinf(struct bd_priv * + { + int i; + int langmap_offset, index_offset, end_offset; ++#ifdef __GNU__ ++ char *filename; ++#else + char filename[PATH_MAX]; ++#endif + stream_t *file; + ++#ifdef __GNU__ ++ asprintf(&filename, BD_CLIPINF_PATH, bd->device, bd->title); ++#else + snprintf(filename, sizeof(filename), BD_CLIPINF_PATH, bd->device, bd->title); ++#endif + file = open_stream(filename, NULL, NULL); + if (!file) { + mp_msg(MSGT_OPEN, MSGL_ERR, "Cannot open clipinf %s\n", filename); ++#ifdef __GNU__ ++ free(filename); ++#endif + return; + } ++#ifdef __GNU__ ++ free(filename); ++#endif + if (stream_read_qword(file) != AV_RB64("HDMV0200")) { + mp_msg(MSGT_OPEN, MSGL_ERR, "Unknown clipinf format\n"); + return; +@@ -453,7 +502,11 @@ static void get_clipinf(struct bd_priv * + + static int bd_stream_open(stream_t *s, int mode, void* opts, int* file_format) + { ++#ifdef __GNU__ ++ char *filename; ++#else + char filename[PATH_MAX]; ++#endif + + struct stream_priv_s* p = opts; + struct bd_priv *bd = calloc(1, sizeof(*bd)); +@@ -489,9 +542,16 @@ static int bd_stream_open(stream_t *s, i + // set up AES key from uk + av_aes_init(bd->aeseed, bd->uks.keys[0].u8, 128, 0); + ++#ifdef __GNU__ ++ asprintf(&filename, BD_M2TS_PATH, bd->device, bd->title); ++#else + snprintf(filename, sizeof(filename), BD_M2TS_PATH, bd->device, bd->title); ++#endif + mp_msg(MSGT_OPEN, MSGL_STATUS, "Opening %s\n", filename); + bd->title_file = open_stream(filename, NULL, NULL); ++#ifdef __GNU__ ++ free(filename); ++#endif + if (!bd->title_file) + return STREAM_ERROR; + s->end_pos = bd->title_file->end_pos; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/debian/patches/series mplayer-1.0~rc4.dfsg1+svn34540/debian/patches/series --- mplayer-1.0~rc4.dfsg1+svn33713/debian/patches/series 2011-08-17 17:04:23.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/debian/patches/series 2012-01-12 21:22:22.000000000 +0000 @@ -1 +1,2 @@ 23mplayer-debug-printf.patch +50_Hurd_PATH_MAX.patch diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/debian/README.source mplayer-1.0~rc4.dfsg1+svn34540/debian/README.source --- mplayer-1.0~rc4.dfsg1+svn33713/debian/README.source 2011-08-17 17:04:23.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/debian/README.source 2012-01-12 21:22:22.000000000 +0000 @@ -1,3 +1,13 @@ + +The source tarball for daily snapshots is now downloaded from launchpad: +https://launchpad.net/~motumedia/+archive/mplayer-daily/+packages + +The tarballs are generated from SVN via a cronjob, and contain a copy of +Libav instead of FFmpeg. When updating to new upstream version, make +sure that you rename the tarball to mach the debian versioning scheme. + + -- Reinhard Tartler , Thu, 12 Jan 2012 22:17:07 +0100 + The sources of this mplayer package have some parts removed! * In particular, the internal libdvdcss library was deleted, so the mplayer diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/debian/rules mplayer-1.0~rc4.dfsg1+svn34540/debian/rules --- mplayer-1.0~rc4.dfsg1+svn33713/debian/rules 2011-10-29 10:42:14.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/debian/rules 2012-01-12 21:22:22.000000000 +0000 @@ -28,14 +28,12 @@ SVN_VERSION := $(shell echo $(UPSTREAM_VERSION) | sed -nr 's/^[0-9.:-~]+\+svn([0-9]+)$$/\1/p') -#UPSTREAMSOURCE := upstream SVN repository -UPSTREAMSOURCE := http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2 - DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) +DEB_VENDOR ?= $(shell dpkg-vendor --query Vendor) # XXX enable-menu is frowned upon by upstream @@ -46,8 +44,9 @@ --enable-menu \ --disable-arts \ --language=all \ - --disable-libdvdcss-internal \ --disable-dvdread-internal \ + --disable-libdvdcss-internal \ + --disable-libmpeg2-internal \ --disable-ffmpeg_a \ $(archconf) @@ -89,24 +88,22 @@ endif ifeq (linux,$(DEB_HOST_ARCH_OS)) - CONFIGURE_FLAGS += --enable-mga --enable-3dfx --enable-tdfxfb --enable-joystick + CONFIGURE_FLAGS += --enable-joystick sound_backend := alsa else sound_backend := oss endif -# See http://wiki.debian.org/Teams/Dpkg/DebianRules; #465282 and -# https://wiki.ubuntu.com/DistCompilerFlags -CLEAN_ENV=env -u CFLAGS -u CPPFLAGS -u LDFLAGS -u FFLAGS -u CXXFLAGS - build: build-arch build-indep ####### build-arch build-arch: dh_testdir dh_prep -a + echo "svn r$(SVN_VERSION) ($(DEB_VENDOR)), built with gcc" > VERSION $(MAKE) -f debian/rules debian/mplayer/usr/bin/mplayer $(MAKE) -f debian/rules debian/mencoder/usr/bin/mencoder + $(MAKE) -f debian/rules debian/mplayer-gui/usr/bin/gmplayer # build non-gui version # & mencoder @@ -125,15 +122,26 @@ sed -e "s/@SOUND_BACKEND@/$(sound_backend)/" -i \ $(CURDIR)/debian/mplayer/etc/mplayer/mplayer.conf +# build gui version +debian/mplayer-gui/usr/bin/gmplayer: + dh_testdir + $(CLEAN_ENV) \ + ./configure $(CONFIGURE_FLAGS) --enable-gui + $(CLEAN_ENV) \ + $(MAKE) $(NUMJOBS) mplayer + install -D -m 755 mplayer $(CURDIR)/debian/mplayer-gui/usr/bin/gmplayer + install -D -m 644 etc/mplayer.desktop \ + $(CURDIR)/debian/mplayer-gui/usr/share/applications/mplayer.desktop + install -D -m 644 etc/mplayer.png \ + $(CURDIR)/debian/mplayer-gui/usr/share/pixmaps/mplayer.png + # binaries already installed via build rules as we have to build several flavors install-arch: build-arch ###### build-indep DOCS/HTML/en/index.html: - sh debian/all-lang-config-mak.sh > config.mak - cd DOCS/xml && ./configure - $(MAKE) -C DOCS/xml html-chunked + $(MAKE) html-chunked build-indep: dh_testdir @@ -152,9 +160,8 @@ clean: dh_testdir dh_testroot - [ ! -f config.mak ] || ( $(MAKE) -C DOCS/xml releaseclean && $(MAKE) distclean ) - dh_clean - ! test -d .git || quilt pop -a || test $$? = 2 + dh_clean VERSION + -test -f config.mak && $(MAKE) distclean # Build architecture-independent packages binary-indep: install-indep @@ -183,10 +190,6 @@ binary: binary-indep binary-arch -get-orig-source: - dh_testdir - sh debian/get-orig-source.sh -d $(SVN_VERSION) - PHONY += build clean binary-indep binary-arch binary-common binary PHONY += install binary binary-arch binary-indep clean checkroot get-orig-source PHONY += autocontrol fix-orig-source copy-orig-from-svn download-and-unpack-orig diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/cs/mplayer.1 mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/cs/mplayer.1 --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/cs/mplayer.1 2011-06-07 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/cs/mplayer.1 2011-11-09 01:22:02.000000000 +0000 @@ -2548,10 +2548,6 @@ .PD 1 . .TP -.B "alsa5\ \ " -Zvukové rozhraní ALSA 0.5. -. -.TP .B "oss\ \ \ \ " Rozhraní OSS. .PD 0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/de/mplayer.1 mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/de/mplayer.1 --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/de/mplayer.1 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/de/mplayer.1 2011-11-09 01:22:02.000000000 +0000 @@ -2978,10 +2978,6 @@ .PD 1 . .TP -.B "alsa5\ \ " -ALSA 0.5 Audioausgabetreiber. -. -.TP .B "oss\ \ \ \ " OSS Audioausgabetreiber. .PD 0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/en/mplayer.1 mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/en/mplayer.1 --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/en/mplayer.1 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/en/mplayer.1 2011-12-23 22:34:42.000000000 +0000 @@ -1,4 +1,4 @@ -.\" $Revision: 33689 $ +.\" $Revision: 34463 $ .\" MPlayer (C) 2000-2010 MPlayer Team .\" This man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann . @@ -3026,10 +3026,6 @@ .PD 1 . .TP -.B "alsa5\ \ " -ALSA 0.5 audio output driver -. -.TP .B "oss\ \ \ \ " OSS audio output driver .PD 0 @@ -3602,8 +3598,9 @@ do not know the screen resolution like fbdev, x11 and TV-out. . .TP -.B \-stop\-xscreensaver (X11 only) -Turns off xscreensaver at startup and turns it on again on exit. +.B \-(no)stop\-xscreensaver (X11 only) +Turns off xscreensaver at startup and turns it on again on exit +(default: enabled). If your screensaver supports neither the XSS nor XResetScreenSaver API please use \-heartbeat\-cmd instead. . @@ -4122,6 +4119,19 @@ Use glxinfo or a similar tool to display the supported OpenGL extensions. .PD 0 .RSs +.IPs backend= +Select the backend/OpenGL implementation to use (default: -1). +.RSss +-1: Autoselect +.br +0: Win32/WGL +.br +1: X11/GLX +.br +2: SDL +.br +3: X11/EGL (highly experimental) +.RE .IPs (no)ati\-hack ATI drivers may give a corrupted image when PBOs are used (when using \-dr or force\-pbo). @@ -4234,39 +4244,45 @@ Select the scaling function to use for luminance scaling. Only valid for yuv modes 2, 3, 4 and 6. .RSss -0: Use simple linear filtering (default). -.br -1: Use bicubic B-spline filtering (better quality). +.IPs 0 +Use simple linear filtering (default). +.IPs 1 +Use bicubic B-spline filtering (better quality). Needs one additional texture unit. Older cards will not be able to handle this for chroma at least in fullscreen mode. -.br -2: Use cubic filtering in horizontal, linear filtering in vertical direction. +.IPs 2 +Use cubic filtering in horizontal, linear filtering in vertical direction. Works on a few more cards than method 1. -.br -3: Same as 1 but does not use a lookup texture. +.IPs 3 +Same as 1 but does not use a lookup texture. Might be faster on some cards. -.br -4: Use experimental unsharp masking with 3x3 support and a default strength of 0.5 (see filter-strength). -.br -5: Use experimental unsharp masking with 5x5 support and a default strength of 0.5 (see filter-strength). +.IPs 4 +Use experimental unsharp masking with 3x3 support and a default strength of 0.5 (see filter-strength). +.IPs 5 +Use experimental unsharp masking with 5x5 support and a default strength of 0.5 (see filter-strength). .RE .IPs cscale= Select the scaling function to use for chrominance scaling. For details see lscale. .IPs filter-strength= Set the effect strength for the lscale/cscale filters that support it. +.IPs noise-strength= +Set how much noise to add. 0 to disable (default), 1.0 for level suitable +for dithering to 6 bit. .IPs stereo= Select a method for stereo display. -You may have to use -aspect to fix the aspect value. +You may have to use \-aspect to fix the aspect value. +Add 32 to swap left and right side. Experimental, do not expect too much from it. .RSss -0: Normal 2D display -.br -1: left-right split input to full-color red-cyan stereo. -.br -2: left-right split input to full-color red-cyan stereo. -.br -3: left-right split input to quadbuffered stereo. +.IPs 0 +normal 2D display +.IPs 1 +Convert side by side input to full-color red-cyan stereo. +.IPs 2 +Convert side by side input to full-color green-magenta stereo. +.IPs 3 +Convert side by side input to quadbuffered stereo. Only supported by very few OpenGL cards. .RE .RE @@ -5149,6 +5165,9 @@ .REss .IPs vstats Prints some statistics and stores them in ./vstats_*.log. +.IPs wait_keyframe +Wait for a keyframe before displaying anything. +Avoids broken frames at startup or after seeking with some formats. .RE . .TP @@ -6985,6 +7004,26 @@ FFmpeg deinterlacing filter, same as \-vf pp=fd . .TP +.B lavfi=filtergraph +FFmpeg libavfilter wrapper. +\fIfiltergraph\fR defines a whole libavfilter graph with one input and one output. +See http://www.ffmpeg.org/\:libavfilter.html#SEC4 for details. +.sp 1 +As a special case, if \fIfiltergraph\fR is \fB$\fIword\fR then the value of +the \fIword\fR environment variable is used; this is necessary if commas are +present in the graph description, as mplayer uses them as a delimiter +between filters. +.sp 1 +.I NOTE: +This filter is considered experimental, it may interact strangely with other +filters. +.sp 1 +.I EXAMPLE: +.br +overlay="movie=$small_video, scale=160:120 [ca]; [in] [ca] overlay=16:8" +mplayer -vf lavfi='$overlay' $big_video +. +.TP .B kerndeint[=thresh[:map[:order[:sharp[:twoway]]]]] Donald Graft's adaptive kernel deinterlacer. Deinterlaces parts of a video if a configurable threshold is exceeded. @@ -7841,6 +7880,14 @@ .RS side by side crosseye (right eye left, left eye right) .RE +.B sbs2l or side_by_side_half_width_left_first +.RS +side by side with half width resolution (left eye left, right eye right) +.RE +.B sbs2r or side_by_side_half_width_right_first +.RS +side by side with half width resolution (right eye left, left eye right) +.RE .B abl or above_below_left_first .RS above-below (left eye above, right eye below) @@ -10759,7 +10806,7 @@ A higher b_bias produces more B-frames (default: 0). . .TP -.B (no)b_pyramid +.B b_pyramid= Allows B-frames to be used as references for predicting other frames. For example, consider 3 consecutive B-frames: I0 B1 B2 B3 P4. Without this option, B-frames follow the same pattern as MPEG-[124]. @@ -10774,6 +10821,17 @@ may not always help. Requires bframes >= 2. Disadvantage: increases decoding delay to 2 frames. +.PD 0 +.RSs +.IPs normal +Allow B-frames as references as described above (not Blu-ray compatible). +.IPs strict +Disallow P-frames referencing B-frames. Gives worse compression, but is +required for Blu-ray compatibility. +.IPs "none\ " +Disable using B-frames as references. +.RE +.PD 1 . .TP .B (no)deblock diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/es/mplayer.1 mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/es/mplayer.1 --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/es/mplayer.1 2011-06-07 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/es/mplayer.1 2011-11-09 01:22:02.000000000 +0000 @@ -2398,10 +2398,6 @@ .PD 1 . .TP -.B "alsa5\ \ " -Controlador de salida de audio ALSA 0.5. -. -.TP .B "oss\ \ \ \ " Controlador de salida de audio OSS. .PD 0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/fr/mplayer.1 mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/fr/mplayer.1 --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/fr/mplayer.1 2011-06-07 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/fr/mplayer.1 2011-11-09 01:22:02.000000000 +0000 @@ -2864,9 +2864,6 @@ .PD 1 . .TP -.B "alsa5\ \ " -Pilote de sortie audio ALSA 0.5 -.TP .B "oss\ \ \ \ " Pilote de sortie audio OSS. .PD 0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/hu/mplayer.1 mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/hu/mplayer.1 --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/hu/mplayer.1 2011-06-07 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/hu/mplayer.1 2011-11-09 01:22:02.000000000 +0000 @@ -2819,10 +2819,6 @@ .PD 1 . .TP -.B "alsa5\ \ " -ALSA 0.5 audió kimeneti meghajtó -. -.TP .B "oss\ \ \ \ " OSS audió kimeneti meghajtó .PD 0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/it/mplayer.1 mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/it/mplayer.1 --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/it/mplayer.1 2011-06-07 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/it/mplayer.1 2011-11-09 01:22:02.000000000 +0000 @@ -65,7 +65,12 @@ . .br .B mplayer -[dvd|dvdnav]://[titolo|[titolo_iniziale]\-titolo_finale][/dispositivo] +[br]://[titolo][/device] +[opzioni] +. +.br +.B mplayer +[dvd|dvdnav]://[titolo|[titolo_iniziale]\-titolo_finale][/device] [opzioni] . .br @@ -154,14 +159,14 @@ architetture di CPU, controlla la documentazione). Visualizza la maggior parte dei file del tipo MPEG/\:VOB, AVI, ASF/\:WMA/\:WMV, RM, QT/\:MOV/\:MP4, Ogg/\:OGM, MKV, VIVO, FLI, NuppelVideo, -yuv4mpeg, FILM e RoQ, supportato da molti codec nativi o binari. -Puoi guardare VCD, SVCD, DVD, 3ivx, DivX 3/4/5, WMV ed addirittura filmati -con codifica H.264. +yuv4mpeg, FILM e RoQ, supportati da molti codec nativi o binari. +Puoi guardare VCD, SVCD, DVD, Blu\-ray, 3ivx, DivX 3/4/5, WMV e addirittura +filmati con codifica H.264. .PP MPlayer supporta un'ampia gamma di driver di uscita video ed audio. -Funziona con X11, XV, DGA, OpenGL, SVGAlib, fbdev, AAlib, libcaca, DirectFB, +Funziona con X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib, libcaca, DirectFB, Quartz, Mac OS X CoreVideo, ma puoi anche usare GGI, SDL (e tutti i loro driver), -VESA (su ogni scheda compatibile VESA, anche senza X11), qualche driver a basso +VESA (su ogni scheda compatibile VESA, anche senza X11), qualche driver di basso livello specifico per alcune schede video (per Matrox, 3dfx e ATI) e qualche scheda di decodifica MPEG hardware come la Siemens DVB, Hauppauge PVR (IVTV), DXR2 e DXR3/\:Hollywood+. @@ -171,7 +176,7 @@ MPlayer ha un visualizzatore su schermo (On Screen Display, OSD) per fornire informazioni sullo stato, grandi e bei sottotitoli sfumati con antialias ed un riscontro visuale dei comandi da tastiera. -Sono supportati font europei/\:ISO8859\-1,2 (Ungherese, Inglese, Ceco, etc), +Sono supportati font europei/\:ISO8859\-1,2 (Ungherese, Inglese, Ceco, ecc.), Cirillici e Coreani insieme a 12 formati di sottotitoli (MicroDVD, SubRip, OGM, SubViewer, Sami, VPlayer, RT, SSA, AQTitle, JACOsub, PJS ed il nostro: MPsub) oltre ai sottotitoli dei DVD (flussi SPU, VOBsub e Closed Captions). @@ -189,14 +194,12 @@ .PP .B gmplayer è MPlayer con una interfaccia utente grafica. -Ha le stesse opzioni di MPlayer, tuttavia alcune potrebbero non funzionare -correttamente a causa di conflitti con la configurazione fatta via GUI (salvata -in gui.conf). -In particolare alcune opzioni potrebbero venire sovrascritte da opzioni nel file -gui.conf mentre altre potrebbero venire salvate definitivamente in gui.conf. +Oltre ad alcune opzioni proprie (salvate in gui.conf), ha le stesse opzioni di MPlayer, +tuttavia alcune saranno salvate in gui.conf affinché possano essere selezionate in modo +indipendente da MPlayer (vedi FILE DI CONFIGURAZIONE DELL'INTERFACCIA GRAFICA più avanti). .PP -Esempi di utilizzo per farti partire rapidamente possono essere trovati alla -fine di questa pagina di manuale. +Per farti iniziare rapidamente puoi trovare degli esempi di utilizzo alla fine +di questa pagina di manuale. .PP .B Controlla anche la documentazione in formato HTML! .PP @@ -223,17 +226,17 @@ .B Controlli da tastiera .PD 0 .RS -.IPs "<\- e \->" +.IPs "SINISTRA e DESTRA" Ricerca indietro/\:avanti di 10 secondi. -.IPs "su e giù" +.IPs "SU e GIÙ" Ricerca avanti/\:indietro di 1 minuto. -.IPs "pagina su e pagina giù" +.IPs "PGSU e PGGIÙ" Ricerca avanti/\:indietro di 10 minuti. .IPs "[ e ]" Aumenta/\:diminuisce la velocità di riproduzione del 10%. .IPs "{ e }" Dimezza/\:raddoppia la velocità di riproduzione. -.IPs "backspace" +.IPs "BACKSPACE" Ripristina la velocità di riproduzione iniziale. .IPs "< e >" Va indietro/\:avanti nella playlist. @@ -260,11 +263,13 @@ Diminuisce/\:aumenta il volume. .IPs "9 e 0" Diminuisce/\:aumenta il volume. +.IPs "( and )" +Regola il bilanciamento audio a favore del canale sinistro/\:destro. .IPs "m\ \ \ \ " Suono muto. .IPs "_ (solo MPEG-TS, AVI e libavformat)" Passa attraverso tutte le tracce video disponibili. -.IPs "# (solo DVD, MPEG, Matroska, AVI e libavformat)" +.IPs "# (solo DVD, Blu-ray, MPEG, Matroska, AVI e libavformat)" Passa attraverso tutte le tracce audio disponibili. .IPs "TAB (solo MPEG-TS e libavformat)" Passa attraverso tutti i programmi disponibili. @@ -278,11 +283,11 @@ Cambia lo stato dell'OSD: nessuno / posizione / posizione + tempo / posizione + tempo + tempo totale. .IPs "d\ \ \ \ " -Cambia lo stato dello scarto frame: nessuno / salta visualizzazione / salta decodifica +Cambia lo stato dello scarto frame: nessuno / salta visualizzazione / salta decodifica (vedi \-framedrop e \-hardframedrop). .IPs "v\ \ \ \ " Cambia la visibilità dei sottotitoli. -.IPs "j\ \ \ \ " +.IPs "j e J" Passa attraverso le lingue possibili dei sottotitoli. .IPs "y e g" Va avanti/\:indietro nella lista dei sottotitoli. @@ -292,6 +297,8 @@ Cambia l'allineamento dei sottotitoli: in alto / al centro / in basso. .IPs "x e z" Regola il ritardo dei sottotitoli di +/\- 0.1 secondi. +.IPs "c (solo \-capture)" +Avvia/interrompe la cattura del flusso primario. .IPs "r e t" Regola la posizione dei sottotitoli più su/più giù. .IPs "i (solo modalità \-edlout)" @@ -302,6 +309,8 @@ Inizia/\:smette di salvare istantanee. .IPs "I\ \ \ \ " Mostra il nome del file sull'OSD. +.IPs "P\ \ \ \ " +Mostra la barra di avanzamento, il tempo trascorso e la durata totale sull'OSD. .IPs "! e @" Va all'inizio del capitolo precedente/\:successivo. .IPs "D (solo \-vo xvmc, \-vo vdpau, \-vf yadif, \-vf kerndeint)" @@ -313,9 +322,9 @@ .PP .RS (I seguenti tasti sono validi solo quando si usa un dispositivo di uscita -con accelerazione hardware (xv, (x)vidix, (x)mga, etc), il filtro +con accelerazione hardware (xv, (x)vidix, (x)mga, ecc.), il filtro software di equalizzazione (\-vf eq oppure \-vf eq2) oppure quello di -tonalità (\-vf hue).) +tonalità (\-vf hue)). .RE .PP .PD 0 @@ -333,7 +342,7 @@ .PP .RS (I seguenti tasti sono validi solo quando si utilizza il driver di uscita -video quartz oppure corevideo.) +video quartz oppure corevideo). .RE .PP .PD 0 @@ -352,13 +361,13 @@ .PD 1 .PP .RS -(I seguenti tasti sono validi solo se utilizzi il driver di uscita video sdl.) +(I seguenti tasti sono validi solo se utilizzi il driver di uscita video sdl). .RE .PP .PD 0 .RS .IPs "c\ \ \ \ " -Passa attraverso le modalità a schermo pieno disponibili. +Passa attraverso le modalità a schermo intero disponibili. .IPs "n\ \ \ \ " Ripristina la modalità di default. .RE @@ -366,7 +375,7 @@ .PP .RS (I seguenti tasti sono validi solo se utilizzi una tastiera con tasti -multimediali.) +multimediali). .RE .PP .PD 0 @@ -382,7 +391,7 @@ .PP .RS (I seguenti tasti sono validi solo se MPlayer è stato compilato col supporto -di ingresso TV o DVB e hanno precedenza su quelli definiti precedentemente.) +di ingresso TV o DVB e hanno precedenza su quelli definiti precedentemente). .RE .PP .PD 0 @@ -398,7 +407,7 @@ .PP .RS (I seguenti tasti sono validi solo se MPlayer è stato compilato col supporto -dvdnav: vengono usati per navigare nei menu) +dvdnav: vengono usati per navigare nei menu). .RE .PP .PD 0 @@ -423,10 +432,8 @@ .PP .RS . -(I seguenti tasti sono validi solo se MPlayer è stato compilato col supporto -per televideo (teletext): vengono usati per controllare il televideo della TV, -i cui dati possono arrivare sia da una sorgente TV analogica che da un flusso -MPEG.) +(I seguenti tasti vengono usati per controllare il televideo della TV (teletext), +i cui dati possono arrivare sia da una sorgente TV analogica sia da un flusso MPEG). .RE .PP .PD 0 @@ -473,7 +480,8 @@ .\" -------------------------------------------------------------------------- . .SH "USO" -Ogni opzione 'flag' ha una controparte 'noflag', p.es.\& l'opposto dell'opzione \-fs è \-nofs. +Ogni opzione 'flag' ha una controparte 'noflag', p.es.\& l'opposto dell'opzione +\-fs è \-nofs. .PP Se una opzione è marcata come '(solo XXX)' allora funzionerà solo in combinazione con l'opzione XXX oppure se XXX è stato compilato nell'eseguibile @@ -510,8 +518,12 @@ Il file di configurazione per MEncoder è 'mencoder.conf' nella tua directory di configurazione (p.es.\& /etc/\:mplayer o /usr/\:local/\:etc/\:mplayer), quello specifico dell'utente è '~/\:.mplayer/\:mencoder.conf'. -Le opzioni del file utente hanno precedenza sulle opzioni globali e le opzioni -della linea di comando hanno precedenza su quelle specificate in entrambi i file. +Le opzioni specifiche dell'utente hanno precedenza sulle opzioni globali (nel +caso di +.BR gmplayer , +quelle del file gui.conf hanno la precedenza su quelle dell'utente) e le +opzioni della linea di comando hanno precedenza su quelle specificate in +entrambi i file. La sintassi del file di configurazione è 'option=', tutto quello che viene dopo un '#' è considerato un commento. Le opzioni che si attivano senza valori possono essere abilitate impostandole @@ -570,6 +582,131 @@ subpos=96 spuaa=20 .fi +.PP +.I "FILE DI CONFIGURAZIONE DELL'INTERFACCIA GRAFICA" +.sp 1 +Le opzioni specifiche della GUI sono (tra parentesi i nomi di quelle di MPlayer): +ao_alsa_device +.RB ( alsa:device= ") (solo ALSA)," +ao_alsa_mixer +.RB ( mixer ") (solo ALSA)," +ao_alsa_mixer_channel +.RB ( mixer-channel ") (solo ALSA)," +ao_esd_device +.RB ( esd: ") (solo ESD)," +ao_extra_stereo +.RB ( "af extrastereo" ") (default: 1.0)," +ao_extra_stereo_coefficient +.RB ( "af extrastereo=" ")," +ao_oss_device +.RB ( oss: ") (solo OSS)," +ao_oss_mixer +.RB ( mixer ") (solo OSS)," +ao_oss_mixer_channel +.RB ( mixer-channel ") (solo OSS)," +ao_sdl_subdriver +.RB ( sdl: ") (solo SDL), +ao_surround (non utilizzata), +ao_volnorm +.RB ( "af volnorm" ")," +autosync (abilita/disabilita), +autosync_size +.RB ( autosync ")," +cache (abilita/disabilita), +cache_size +.RB ( cache ")," +enable_audio_equ +.RB ( "af equalizer" ")," +equ_band_00 ... equ_band_59, +.RB ( "af equalizer=" ")," +equ_channel_1 ... equ_channel_6 +.RB ( "af channels=" ")," +gui_main_pos_x, +gui_main_pos_y, +gui_save_pos (sì/no), +gui_video_out_pos_x, +gui_video_out_pos_y, +load_fullscreen (sì/no), +playbar (abilita/disabilita), +show_videowin (sì/no), +vf_lavc +.RB ( "vf lavc" ") (solo DXR3)," +vf_pp +.RB ( "vf pp" ")," +vo_dxr3_device (non utilizzata) (solo DXR3). +.sp 1 +Le opzioni di MPlayer salvate in gui.conf (nomi delle opzioni +della GUI, tra parentesi i nomi di quelle di MPlayer) sono: +a_afm +.RB ( afm ), +ao_driver +.RB ( ao ), +ass_bottom_margin +.RB ( ass-bottom-margin ") (solo ASS)," +ass_enabled +.RB ( ass ") (solo ASS)," +ass_top_margin +.RB ( ass-top-margin ") (solo ASS)," +ass_use_margins +.RB ( ass-use-margins ") (solo ASS)," +cdrom_device +.RB ( cdrom-device ), +dvd_device +.RB ( dvd-device ), +font_autoscale +.RB ( subfont-autoscale ") (solo FreeType)," +font_blur +.RB ( subfont-blur ") (solo FreeType)," +font_encoding +.RB ( subfont-encoding ") (solo FreeType)," +font_factor +.RB ( ffactor ), +font_name +.RB ( font ), +font_osd_scale +.RB ( subfont-osd-scale ") (solo FreeType)," +font_outline +.RB ( subfont-outline ") (solo FreeType)," +font_text_scale +.RB ( subfont-text-scale ") (solo FreeType)," +gui_skin +.RB ( skin ), +osd_level +.RB ( osdlevel ), +softvol +.RB ( softvol ), +stopxscreensaver +.RB ( stop-xscreensaver ), +sub_auto_load +.RB ( autosub ), +sub_cp +.RB ( subcp ") (solo iconv)," +sub_overlap +.RB ( overlapsub ), +sub_pos +.RB ( subpos ), +sub_unicode +.RB ( unicode ), +v_flip +.RB ( flip ), +v_framedrop +.RB ( framedrop ), +v_idx +.RB ( idx ), +v_ni +.RB ( ni ), +v_vfm +.RB ( vfm ), +vf_autoq +.RB ( autoq ), +vo_direct_render +.RB ( panscan ), +vo_doublebuffering +.RB ( dr ), +vo_driver +.RB ( vo ), +vo_panscan +.RB ( double ). . .\" -------------------------------------------------------------------------- .\" Profili @@ -629,18 +766,22 @@ .fi . .\" -------------------------------------------------------------------------- -.\" Opzioni generali +.\" Opzioni .\" -------------------------------------------------------------------------- . .SH "OPZIONI GENERALI" . .TP +.B \-codecpath +Specifica una directory per i codec binari. +. +.TP .B \-codecs\-file (vedi anche \-afm, \-ac, \-vfm, \-vc) -Sovrascrive il percorso di ricerca standard ed utilizza il file specificato -al posto di quello integrato nel programma. +Sovrascrive il percorso di ricerca standard e utilizza il file specificato +al posto di quello integrato nel programma (codecs.conf). . .TP -.B \-include +.B \-include (vedi anche \-gui-include) Specifica un file di configurazione da interpretare dopo quelli di default. . .TP @@ -716,7 +857,7 @@ Non interpreta i file di configurazione selezionati. .br .I NOTA: -Se si specificano le opzioni \-include o \-use\-filedir\-conf sulla riga +Se si specificano le opzioni \-include o \-use\-filedir\-conf sulla riga di comando, esse vengono rispettate. .sp 1 Le opzioni disponibili sono: @@ -737,8 +878,8 @@ .B "\-quiet\ " Rende l'emissione su console meno prolissa, in particolare disattiva la scrittura della linea di stato (cioè A: 0.7 V: 0.6 A-V: 0.068 ...) -Particolarmente utile su terminali lenti oppure che non funzionano correttamente -e non gestiscono in modo giusto il ritorno carrello (cioè \\r). +Particolarmente utile su terminali lenti oppure che non funzionano +correttamente e non gestiscono in modo giusto il ritorno carrello (cioè \\r). .TP .B \-priority (solo Windows e OS/2) Seleziona la priorità del processo MPlayer in accordo con le priorità @@ -781,9 +922,6 @@ riga comando. . . -.\" -------------------------------------------------------------------------- -.\" Opzioni di riproduzione -.\" -------------------------------------------------------------------------- . .SH "OPZIONI DI RIPRODUZIONE (SOLO MPLAYER)" . @@ -797,10 +935,10 @@ . .TP .B \-autosync -Regola gradualmente la sincronizzazione A/V basandosi sulla misura del +Regola gradualmente la sincronizzazione A/V basandosi sulla misurazione del ritardo dell'audio. Specificando \-autosync 0, il valore di default, la temporizzazione dei frame -sarà basata interamente sulla misura del ritardo dell'audio. +sarà basata interamente sulla misurazione del ritardo dell'audio. L'opzione \-autosync 1 si comporta nello stesso modo, ma viene cambiato leggermente l'algoritmo di correzione A/V. Un filmato con una velocità (framerate) irregolare che viene visualizzato @@ -875,7 +1013,36 @@ un blocco da saltare. Questo fornisce un punto di partenza dal quale l'utente può successivamente ottimizzare tali comandi EDL. -Vedi http://www.mplayerhq.hu/\:DOCS/\:HTML/\:en/\:edl.html per dettagli. +Vedi http://www.mplayerhq.hu/\:DOCS/\:HTML/\:it/\:edl.html per i dettagli. +. +.TP +.B \-edl-backward-delay +Quando si utilizza EDL durante la riproduzione e si torna indietro nel filmato, +è possibile finire nel mezzo di una scrittura EDL. +In questo caso MPlayer cercherà più indietro della posizione iniziale della +scrittura EDL e salterà immediatamente la scena specificata nella scrittura stessa. +Per evitare questo comportamento, MPlayer passa a un determinato intervallo +di tempo prima dell'inizio della scrittura EDL. +Questo parametro permette di specificare in secondi questo intervallo +(default: 2 secondi). +. +.TP +.B \-edl-start-pts +Regola le posizioni nelle scritture EDL in base al tempo iniziale di +riproduzione del file. +Alcuni formati, in particolare MPEG TS, iniziano solitamente con valori PTS +diversi da zero e quando producono un file EDL con l'opzione \-edlout le +scritture EDL contengono valori assoluti che sono corretti solo per questo +specifico file. +Se ricodificato in un formato differente, questo file EDL non sarà più valido. +Specificando \-edl-start-pts adatterà automaticamente le posizioni EDL in base +al tempo di inizio: quando si crea il file EDL sottrae il tempo iniziale da +ogni scrittura EDL, quando si riproduce con un file EDL aggiunge il tempo +d'inizio del file ad ogni posizione EDL. +. +.TP +.B \-noedl-start-pts +Disabilita la regolazione delle posizioni EDL. . .TP .B \-enqueue (solo GUI) @@ -905,6 +1072,11 @@ Non funziona come opzione nel file di configurazione. . .TP +.B \-gui-include (vedi anche \-include) (solo GUI) +Specifica un file di configurazione per la GUI da utilizzare dopo quello di +default (gui.conf). +. +.TP .B \-h, \-help, \-\-help Visualizza un breve elenco delle opzioni. . @@ -944,14 +1116,14 @@ .B \-identify Scorciatoia per \-msglevel identify=4. Visualizza i parametri del file in un formato facile da interpretare. -Stampa anche informazioni dettagliate sui sottotitoli, le tracce audio ed i +Stampa anche informazioni dettagliate sui sottotitoli, le tracce audio e i vari ID. In alcuni casi puoi avere più informazioni utilizzando \-msglevel identify=6. -Per esempio, per un DVD verranno mostrati i capitoli e la lunghezza di ogni -titolo, così come l'ID del disco. +Per esempio, per un DVD o un Blu\-ray verranno mostrati i capitoli e la durata +di ogni titolo, così come l'ID del disco. Usala con \-frames 0 per eliminare tutte le emissioni su console. -Lo script di appoggio TOOLS/\:midentify.sh toglie il resto delle stampe di MPlayer -e (si spera) corregge per la shell (shellescapes) i nomi dei file. +Lo script di appoggio TOOLS/\:midentify.sh toglie il resto delle stampe di +MPlayer e (si spera) corregge per la shell (shellescapes) i nomi dei file. . .TP .B \-idle (vedi anche \-slave) @@ -959,6 +1131,11 @@ non c'è alcun file da riprodurre. Principalmente utile in modalità slave quando MPlayer può esser controllato attraverso comandi di input. +.br +Per +.B gmplayer +\-idle è il default, \-noidle chiuderà la GUI dopo che tutti i file saranno +stati riprodotti. . .TP .B \-input @@ -967,7 +1144,7 @@ I percorsi sono relativi a ~/.mplayer/. .br .I NOTA: -L'autorepeat (autoripetizione) è attualmente supportata solo dai joysticks. +L'autorepeat (autoripetizione) è attualmente supportata solo dai joystick. .sp 1 I comandi disponibili sono: .sp 1 @@ -1007,13 +1184,14 @@ .B \-key\-fifo\-size <2\-65000> Specifica la dimensione del FIFO che memorizza gli eventi della tastiera (default: 7). -Un FIFO di dimensione n può bufferizzare (n-1) eventi. -Se è troppo piccolo alcuni eventi potrebbero venir persi (portando ad -effetti di 'bottoni del mouse ignorati' o simili). +Un FIFO di dimensione n può bufferizzare (n\-1) eventi. +Se è troppo piccolo alcuni eventi potrebbero venir persi. Se è troppo grande, MPlayer potrebbe sembrare bloccato mentre elabora gli eventi bufferizzati. Per avere lo stesso comportamento presentato prima dell'introduzione di questa opzione devi impostarla a 2 per Linux e a 1024 per Windows. +Per un valore basso è necessario disabilitare il doppio click impostando +\-doubleclick\-time a 0 in modo da non contendersi i normali eventi per il buffer. . .TP .B \-lircconf (solo LIRC) @@ -1044,7 +1222,7 @@ .PD 0 .RSs .IPs "\-menu\-chroot=/home" -Restringe il menu di selezione /\:home and downward (per es.\& non sarà +Restringe il menu di selezione a /\:home e sottostanti (per es.\& non sarà possibile alcun accesso a /, ma a /home/nome_utente sì). .RE .PD 1 @@ -1064,10 +1242,10 @@ . .TP .B \-mouse\-movements -Permette ad MPlayer di ricevere eventi del puntatore riportati dal driver di +Permette a MPlayer di ricevere eventi del puntatore riportati dal driver di uscita video. Necessario per selezionare i bottoni nei menu dei DVD. -Gestita solo per uscite video basate su X11 (x11, xv, xvmc, etc.) e per gl, +Gestita solo per uscite video basate su X11 (x11, xv, xvmc, ecc.) e per gl, gl2, direct3d e corevideo. . .TP @@ -1099,8 +1277,8 @@ . .TP .B \-rtc (solo RTC) -Abilita l'utilizzo di Linux RTC (realtime clock, orologio in tempo reale \- /dev/\:rtc) -per la gestione delle temporizzazioni. +Abilita l'utilizzo di Linux RTC (realtime clock, orologio in tempo reale +\- /dev/\:rtc) per la gestione delle temporizzazioni. Questo risveglia il processo ogni 1/1024 di secondo per controllare il tempo corrente. Inutile con kernel Linux moderni configurati come desktop, visto che essi @@ -1122,15 +1300,15 @@ . .TP .B \-playlist -Riproduce i file seguendo la playlist specificata (formato ASX, Winamp, +Riproduce i file secondo la playlist specificata (formato ASX, Winamp, SMIL oppure un-file-per-linea) .br .I NOTA: -Questa opzione è considerata un file perciò le opzione trovate +Questa opzione è considerata un file perciò le opzioni trovate successivamente ad essa verranno applicate solo agli elementi di questa playlist. .br -FIXME: Questo deve essere chiarito e documentato completamente. +FIXME: Questo deve essere chiarito e documentato in modo esauriente. . .TP .B \-rtc\-device @@ -1143,21 +1321,19 @@ .TP .B \-skin (solo GUI) Carica la skin dalla directory specificata come parametro sotto le directory -di default delle skin, /usr/\:local/\:share/\:mplayer/\:skins/ e -~/.mplayer/\:skins/. +di default delle skin, ~/.mplayer/\:skins/ e /usr/\:local/\:share/\:mplayer/\:skins/\:. .sp 1 .I ESEMPIO: .PD 0 .RSs .IPs "\-skin fittyfene" -Prova prima in /usr/\:local/\:share/\:mplayer/\:skins/\:fittyfene -e poi in ~/.mplayer/\:skins/\:fittyfene. +Prova prima in ~/.mplayer/\:skins/\:fittyfene e poi in /usr/\:local/\:share/\:mplayer/\:skins/\:fittyfene. .RE .PD 1 . .TP .B \-slave (vedi anche \-input) -Questa opzione attiva la modalità slave (schiavo o servo) nella quale MPlayer +Attiva la modalità slave (schiavo o servo) nella quale MPlayer funziona come riproduttore asservito (backend) di altri programmi. Invece di intercettare gli eventi della tastiera, MPlayer leggerà i comandi separati dal carattere di nuova linea (newline, \\n) da stdin. @@ -1167,7 +1343,7 @@ DOCS/tech/slave.txt per la loro descrizione. Tra l'altro questa opzione non è indicata per disabilitare altri input, per es.\& attraverso la finestra del video, per far ciò usa altri metodi come -\-input nodefault\-binds:conf=/dev/null. +\-input nodefault\-bindings:conf=/dev/null. . .TP .B \-softsleep @@ -1184,10 +1360,36 @@ Visto che MPlayer può posizionarsi solo sui fotogrammi chiave questo posizionamento potrebbe essere inesatto. . +.TP +.B \-udp\-ip +Imposta l'indirizzo di destinazione dei datagrammi inviati dall'opzione +\-udp\-master. +Impostandola a un indirizzo broadcast permette a più slave di avere lo stesso +indirizzo per la sincronizzazione al master (default: 127.0.0.1). +. +.TP +.B \-udp\-master +Invia un datagramma a \-udp\-ip su \-udp\-port appena prima di riprodurre ogni frame. +Il datagramma indica la posizione del master nel file. +. +.TP +.B \-udp\-port +Imposta la porta di destinazione dei datagrammi inviati dall'opzione +\-udp\-master e la porta su cui ascolta \-udp\-slave (default: 23867). +. +.TP +.B \-udp\-seek\-threshold +Quando il master effettua la ricerca, lo slave deve decidere se cercare +anch'esso o mettersi in pari facendo la codifica dei frame senza pause tra i frame. +Se il master è distante più di secondi dallo slave, lo slave effettua la +ricerca; altrimenti "corre" per raggiungere o aspettare il master. +Questa opzione andrebbe quasi sempre lasciata alla sua impostazione predefinita +di 1 secondo. +. +.TP +.B \-udp\-slave +Ascolta su \-udp\-port e verifica la posizione del master. . -.\" -------------------------------------------------------------------------- -.\" Opzioni Demuxer /\:Flusso (Stream) -.\" -------------------------------------------------------------------------- . .SH "OPZIONI DEMUXER/FLUSSO (STREAM)" . @@ -1198,6 +1400,7 @@ è un valore in decimale da 0 a 1, dove 0 indica nessuna compressione e 1 (che è il default) indica compressione completa (rende i passaggi forti / rumorosi più silenziosi e viceversa). +Sono accettati anche valori superiori a 2 ma sono puramente sperimentali. Questa opzione ha effetto solo se il flusso AC-3 contiene le informazioni necessarie per il rapporto di compressione. . @@ -1225,8 +1428,8 @@ .B \-alang (vedi anche \-aid) Specifica una lista di priorità dei linguaggi audio da utilizzare. Formati contenitore diversi utilizzano diversi codici. -I DVD utilizzano i codici a due lettere ISO 639\-1, Matroska, MPEG-TS e NUT -usano i codici a tre lettere ISO 639\-2 mentre OGM usa un identificatore libero. +I DVD utilizzano i codici a due lettere ISO 639-1, Matroska, MPEG-TS e NUT +usano i codici a tre lettere ISO 639-2 mentre OGM usa un identificatore libero. MPlayer stampa i linguaggi disponibili se viene lanciato in modalità verbosa (\-v). .sp 1 @@ -1243,8 +1446,9 @@ . .TP .B \-audio\-demuxer <[+]nome> (solo \-audiofile) -Forza il nome del demuxer audio, come indicato da \-audio\-demuxer help. +Forza il tipo di demuxer audio per \-audiofile. Usa un '+' prima del nome per forzarlo, il che eviterà alcuni controlli! +Fornisci il nome del demuxer come indicato da \-audio\-demuxer help. Per retrocompatibilità accetta anche l'ID del demuxer come definito in libmpdemux/\:demuxer.h. \-audio\-demuxer audio o \-audio\-demuxer 17 forza il formato MP3. @@ -1275,6 +1479,22 @@ del flusso più rapido. . .TP +.B \-bluray\-angle (solo Blu\-ray) +Alcuni dischi Blu\-ray contengono scene che possono essere visualizzate da +angolazioni diverse. +Qui puoi dire a MPlayer quale angolo usare (default: 1). +. +.TP +.B \-bluray\-chapter (solo Blu\-ray) +Dice a MPlayer da quale capitolo del Blu\-ray iniziare la riproduzione +dell'attuale titolo (default: 1). +. +.TP +.B \-bluray\-device (solo Blu\-ray) +Specifica la posizione del disco Blu\-ray. Deve essere una directory con una +struttura Blu\-ray. +. +.TP .B \-cache Questa opzione specifica quanta memoria (in KBytes) deve essere usata quando si precarica un file oppure un URL. @@ -1297,13 +1517,25 @@ ricerca sul flusso (default: 50). . .TP +.B \-capture (solo MPlayer) +Permette la cattura del flusso primario (non di tracce audio aggiuntive o altri +tipi di flussi) nel file specificato da \-dumpfile o di default in \"stream.dump\". +Se viene fornita questa opzione, la cattura può essere avviata e interrotta +premendo il tasto assegnato alla funzione (vedi la sezione CONTROLLI +INTERATTIVI). +Come per \-dumpstream, questo probabilmente non produrrà risultati utili se non +per flussi MPEG. +Nota che, a causa delle latenze della cache, i dati acquisiti possono iniziare +e terminare con un certo ritardo rispetto a ciò che è visualizzato. +. +.TP .B \-cdda (solo CDDA) Questa opzione può essere usata per regolare la lettura di CD Audio da parte di MPlayer. .sp 1 Le opzioni disponibili sono: .RSs .IPs speed= -Regola la velocità di rotazione del CD +Regola la velocità di rotazione del CD. .IPs paranoia=<0\-2> Regola il livello di paranoia. Valori diversi da 0 sembrano rovinare la riproduzione di tutto tranne la @@ -1316,9 +1548,9 @@ 2: controllo e verifica completa dei dati .REss .IPs generic-dev= -Usa il dispositivo SCSI generico specificato +Usa il dispositivo SCSI generico specificato. .IPs sector-size= -Dimensione di una lettura atomica +Dimensione di una lettura atomica. .IPs overlap= Forza la ricerca di sovrapposizione minima (minimum overlap search) durante la verifica a settori. @@ -1382,7 +1614,7 @@ . .TP .B \-cookies\-file (solo rete) -Legge i cookie HTTP da (default: ~/.mozilla/ e ~./.netscape/) +Legge i cookie HTTP da (default: ~/.mozilla/ e ~/.netscape/) e salta la lettura dalle posizioni di default. Il file viene considerato in formato Netscape. . @@ -1405,14 +1637,15 @@ Durante la codifica, questa opzione impedisce a MEncoder di trasferire i tempi di avvio originari al nuovo file; l'opzione \-audio\-delay non viene influenzata. -Nota che MEncoder alcune volte rettifica automaticamente i tempi di avvio per +Nota che MEncoder alcune volte rettifica automaticamente i tempi di inizio per compensare ritardi di decodifica anticipata, perciò non usare questa opzione per la codifica senza prima provarla. . .TP .B \-demuxer <[+]nome> -Forza il nome del demuxer audio, come indicato da \-demuxer help. +Forza il nome del demuxer audio. Usa un '+' prima del nome per forzarlo, il che eviterà alcuni controlli! +Fornisci il nome del demuxer come indicato da \-demuxer help. Per retrocompatibilità accetta anche l'ID del demuxer come definito in libmpdemux/\:demuxer.h. . @@ -1426,7 +1659,7 @@ .TP .B \-dumpfile (solo MPlayer) Specifica su quale file MPlayer deve scrivere i flussi (dump). -Dovrebbe essere usata con \-dumpaudio / \-dumpvideo / \-dumpstream. +Dovrebbe essere usata con \-dumpaudio / \-dumpvideo / \-dumpstream / \-capture. . .TP .B \-dumpstream (solo MPlayer) @@ -1455,7 +1688,7 @@ Il default è ~/.mplayer/\:channels.conf.{sat,ter,cbl,atsc} (basato sul tipo di scheda) oppure ~/.mplayer/\:channels.conf come ultima risorsa. -.IPs timeout=<1\-30> +.IPs timeout=<1\-240> Massimo numero di secondi da aspettare durante il tentativo di sintonizzare una frequenza, prima di abbandonare (default:30). .RE @@ -1491,9 +1724,9 @@ .B \-edl Abilita le azioni della lista di decisione di modifica (edit decision list, EDL) durante la riproduzione. -Il video viene saltato e l'audio viene riprodotto o meno in maniera dipendente dai valori presenti nel -file specificato. -Vedi http://www.mplayerhq.hu/\:DOCS/\:HTML/\:en/\:edl.html per dettagli su come +Il video viene saltato e l'audio viene riprodotto o meno in maniera dipendente +dai valori presenti nel file specificato. +Vedi http://www.mplayerhq.hu/\:DOCS/\:HTML/\:it/\:edl.html per dettagli su come utilizzare le EDL. . .TP @@ -1501,10 +1734,11 @@ Si ferma al tempo oppure alla posizione in byte specificata. .br .I NOTA: -La posizione in byte è abilitata solo per MEncoder e non sarà precisa, in quanto -ci si può fermare solo alla fine di un fotogramma. -Se usata insieme con l'opzione \-ss, il tempo indicato da \-endpos sarà spostato -in avanti il numero secondi specificati da \-ss. +La posizione in byte può non essere precisa, in quanto ci si può fermare solo +alla fine di un fotogramma. +Se usata insieme con l'opzione \-ss, il tempo indicato da \-endpos sarà +spostato in avanti del numero di secondi specificati da \-ss, altrimenti di una +posizione in byte. .sp 1 .I ESEMPIO: .PD 0 @@ -1515,7 +1749,9 @@ Si ferma a 1 ora e 10 minuti. .IPs "\-ss 10 \-endpos 56" Si ferma a 1 minuto e 6 secondi. -.IPs "\-endpos 100mb" +.IPs "mplayer \-endpos 100mb" +Ferma la riproduzione dopo aver letto 100MB del file. +.IPs "mencoder \-endpos 100mb" Codifica solo 100 MB. .RE .PD 1 @@ -1523,14 +1759,14 @@ .TP .B \-forceidx Forza la ricostruzione dell'indice. -Utile per file con indici rovinati (mancata sincronizzazione A/V, etc). +Utile per file con indici rovinati (mancata sincronizzazione A/V, ecc.). Verrà abilitato il posizionamento in file dove non era possibile effettuarlo. Puoi sistemare l'indice in maniera permanente utilizzando MEncoder (controlla la documentazione). .br .I NOTA: Questa opzione funziona solo se il mezzo di trasporto sottostante supporta il -posizionamento (cioè non con stdin, pipe, etc). +posizionamento (cioè non con stdin, pipe, ecc.). . .TP .B \-fps @@ -1551,6 +1787,35 @@ riposizionare all'inizio per trovare la posizione esatta del frame. . .TP +.B \-http-header-fields +Imposta dei campi HTTP personalizzati quando si accede ad un flusso HTTP. +.sp 1 +.I ESEMPIO: +.PD 0 +.RSs +.IPs +mplayer \-http\-header\-fields 'Campo1: valore1','Campo2: valore2' http://localhost:1234 +.br +Genererà la seguente richiesta HTTP: +.RSss +.br +GET / HTTP/1.0 +.br +Host: localhost:1234 +.br +User-Agent: MPlayer +.br +Icy-MetaData: 1 +.br +Campo1: valore1 +.br +Campo2: valore2 +.br +Connection: close +.REss +.RE +. +.TP .B \-idx (vedi anche \-forceidx) Ricostruisce l'indice dei file quando non li trova, permettendo il posizionamento (seek). @@ -1559,12 +1824,12 @@ .br .I NOTA: Questa opzione funziona solo se il mezzo di trasporto sottostante supporta il -posizionamento (cioè non con stdin, pipe, etc). +posizionamento (cioè non con stdin, pipe, ecc.). . .TP .B \-noidx Evita la ricostruzione dell'indice del file. -MEncoder salta la scrittura dell'indice, usando questa opzione. +MEncoder salta la scrittura dell'indice usando questa opzione. . .TP .B \-ipv4\-only\-proxy (solo rete) @@ -1586,6 +1851,9 @@ .TP .B \-mc Massima correzione della sincronizzazione A-V per fotogramma (in secondi). +.br +Per MEncoder, \-mc 0 andrebbe sempre usato con \-noskip altrimenti causerà +quasi sicuramente una desincronizzazione A-V. . .TP .B \-mf @@ -1632,6 +1900,7 @@ .TP .B \-prefer\-ipv4 (solo rete) Utilizza IPv4 per le connessioni di rete. +Passa automaticamente a IPv6 se necessario. . .TP .B \-prefer\-ipv6 (solo rete IPv6) @@ -1653,7 +1922,7 @@ driver V4L2. Le schede Hauppauge WinTV PVR\-150/250/350/500 e tutte quelle basate su IVTV sono conosciute come schede di cattura PVR. -Attenzione che solamente il kernel Linux 2.6.18 o maggiore è capace di gestire +Attenzione che solamente il kernel Linux 2.6.18 o superiore è capace di gestire il flusso MPEG attraverso lo strato V4L2. Per la cattura hardware di un flusso MPEG e la visione attraverso MPlayer/MEncoder, usa 'pvr://' come URL del filmato. @@ -1680,18 +1949,11 @@ Specifica la frequenza di codifica audio in kpbs (default: 384). .IPs amode= Specifica la modalità di codifica audio. -I Preset disponibili sono: -.RSss -stereo (default) -.br -joint_stereo -.br -dual -.br -mono +I preset disponibili sono 'stereo', 'joint_stereo', 'dual' e 'mono' (default: +stereo). .REss .IPs vbitrate= -Specify average video bitrate encoding in Mbps (default: 6). +Specifica la frequenza media di codifica video in Mbps (default: 6). .IPs vmode= Specifica la modalità di codifica video: .RSss @@ -1700,7 +1962,7 @@ cbr: Constant BitRate (frequenza costante) .REss .IPs vpeak= -Specifica il picco di frequenza dell codifica video in Mbps +Specifica il picco di frequenza della codifica video in Mbps (utile solo per codifica VBR, default: 9.6). .IPs fmt= Seleziona un formato MPEG per la codifica: @@ -1726,11 +1988,12 @@ Per ascoltare la radio con MPlayer usa 'radio://' (se non viene fornita l'opzione channels) o 'radio://' (se viene fornita l'opzione channels) come URL del filmato. +Puoi vedere la gamma di frequenze consentite eseguendo MPlayer con '\-v'. Per avviare il sottosistema di cattura, usa 'radio:///capture'. Se la parola chiave capture non viene fornita, puoi ascoltare la radio usando solo l'entrata line-in. Usare capture per ascoltare non è consigliato, a causa di problemi di -sincronizzazione, che rendono spiacevole l'attività. +sincronizzazione che rendono spiacevole l'attività. .sp 1 Le opzioni disponibili sono: .RSs @@ -1747,7 +2010,7 @@ frequenza massima permessa (default: 108.00) .IPs channels=\-,\-,... Imposta la lista dei canali. -Usa _ per gli spazi nei nomi (o divertiti con il quoting ;-). +Usa _ per gli spazi nei nomi (o divertiti con le virgolette ;-). I nomi dei canali verranno scritti usando l'OSD e i comandi slave radio_step_channel e radio_set_channel saranno utilizzabili per un controllo remoto (dai un'occhiata a LIRC). @@ -1761,14 +2024,14 @@ Senza tale nome la cattura sarà disabilitata anche se la parola chiave 'capture' appare nell'URL. Per i dispositivi ALSA deve essere usato nella forma hw=.. -Se il nome contiene un '=', il modulo userà ALSA per la cattura, se no OSS. +Se il nome contiene un '=', il modulo userà ALSA per la cattura, altrimenti OSS. .IPs "arate= (solo acquisizione radio)" Frequenza in campioni per secondo (default: 44100). .br .I NOTA: Quando usi la cattura audio, imposta anche l'opzione \-rawaudio rate= con lo stesso valore di arate. -Se hai problemi colla velocità audio (va troppo veloce), prova la riproduzione +Se hai problemi con la velocità audio (va troppo veloce), prova la riproduzione con valori di frequenza differenti (per es.\& 48000,44100,32000,...). .IPs "achannels= (solo acquisizione radio)" Numero di canali audio da catturare. @@ -1790,11 +2053,11 @@ .IPs channels= numero di canali .IPs rate= -campionamento in valori per secondo +frequenza in campioni per secondo .IPs samplesize= dimensione in byte di un campionamento .IPs bitrate= -bitrate per il file grezzo +bitrate per i file grezzi .IPs format= fourcc (codice del formato) in esadecimale .RE @@ -1827,7 +2090,7 @@ .REss .sp 1 .RS -.I ESEMPI: +.I ESEMPIO: .RE .PD 0 .RSs @@ -1839,6 +2102,10 @@ .PD 1 . .TP +.B \-referrer (solo rete) +Specifica un percorso o un URL al quale far riferimento per le richieste HTTP. +. +.TP .B \-rtsp\-port Utilizzato con URL del tipo 'rtsp://' per forzare il numero di porta del client. Questa opzione può essere utile se sei dietro a un router e vuoi inoltrare il @@ -1855,10 +2122,16 @@ . .TP .B \-rtsp\-stream\-over\-tcp (solo LIVE555 e NEMESI) -Utilizzato con URL del tipo 'rtsp://' per specificare che i pacchetti RTP o RTCP -devono essere fatti passare su TCP (utilizzando la stessa connessione di RTSP). -Questa opzione può essere utile se hai una connessione internet che non gestisce -in maniera corretta i pacchetti UDP (vedi http://www.live555.com/\:mplayer/). +Utilizzato con URL del tipo 'rtsp://' per specificare che i pacchetti RTP o +RTCP devono essere fatti passare su TCP (utilizzando la stessa connessione di +RTSP). +Questa opzione può essere utile se hai una connessione internet che non +gestisce in maniera corretta i pacchetti UDP (vedi http://www.live555.com/\:mplayer/). +. +.TP +.B \-rtsp\-stream\-over\-http (solo LIVE555) +Utilizzato con URL del tipo 'http://' per specificare che i pacchetti RTP o +RTCP devono essere fatti passare su HTTP. . .TP .B \-saveidx @@ -1884,8 +2157,8 @@ Seleziona la frequenza di campionamento di uscita da usare (ovviamente le schede audio hanno dei limiti sui valori che possono utilizzare). Se la frequenza di campionamento selezionata è diversa da quella del media -corrente il filtro audio lavcresample verrà inserito nella struttura dei -filtri audio per compensare la differenza. +corrente i filtri audio resample o lavcresample verranno inseriti nella +struttura dei filtri audio per compensare la differenza. Il tipo di ricampionamento può essere controllato dall'opzione \-af\-adv. Il default è un ricampionamento veloce che può causare distorsioni. . @@ -1925,8 +2198,8 @@ .B \-tv (solo TV/\:PVR) Questa opzione regola varie proprietà del modulo di cattura TV. Per guardare la TV con MPlayer usa 'tv://' o 'tv://' -o anche 'tv:// (cerca channel_name sotto l'opzione channels più giù) -come URL del film. +o anche 'tv:// (cerca channel_name sotto l'opzione channels più +avanti) come URL del film. Puoi anche usare tv:///' per avviare la riproduzione di un film da un ingresso composito o S-Video (vedi l'opzione input per i dettagli). .sp 1 @@ -1937,7 +2210,7 @@ .IPs "automute=<0\-255> (solo v4l e v4l2)" Se la potenza del segnale riportata dal dispositivo è minore di questo valore, l'audio ed il video verranno disattivati. -Nella maggior parte dei casi automute=100 sarà sufficente. +Nella maggior parte dei casi automute=100 sarà sufficiente. Il valore di default è 0 (automute disabilitato). .IPs driver= Vedi \-tv driver=help per una lista dei driver di ingresso TV compilati. @@ -1987,7 +2260,7 @@ Se è un intero maggiore di 1000, verrà trattato come fosse una frequenza (in kHz) invece che un nome di canale della tabella frequenze. .br -Usa _ per gli spazi nei nomi (o divertiti con il quoting ;-). +Usa _ per gli spazi nei nomi (o divertiti con le virgolette ;-). I nomi dei canali verranno scritti usando l'OSD e i comandi slave tv_step_channel, tv_set_channel e tv_last_channel saranno utilizzabili per un controllo remoto (dai un'occhiata a LIRC). @@ -2000,10 +2273,9 @@ .I ESEMPIO: tv://1, tv://TV1, tv_set_channel 1, tv_set_channel TV1 .IPs [brightness|contrast|hue|saturation]=<\-100\-100> -Regola l'equalizzazione dell'immagine sulla scheda -(luminosità|contrasto|tonalità|saturazione). +Regola l'equalizzazione dell'immagine sulla scheda. .IPs audiorate= -Seleziona il bitrate di cattura audio. +Imposta la frequenza di campionamento dell'audio in ingresso. .IPs forceaudio Cattura l'audio anche se non c'è nessuna sorgente audio riportata da v4l. .IPs "alsa\ " @@ -2022,17 +2294,16 @@ .IPs forcechan=<1\-2> Per default, il conteggio dei canali audio da registrare è determinato automaticamente interrogando la modalità audio della scheda TV. -Questa opzione permette di forzare la registrazione stereo/\:mono indipendentemente -dall'opzione amode e dai valori riportati da v4l. -Può essere usato per la risoluzione problemi quando la scheda TV non è capace -di riportare il modo audio corrente. +Questa opzione permette di forzare la registrazione stereo/\:mono +indipendentemente dall'opzione amode e dai valori riportati da v4l. +Può essere usato per la risoluzione dei problemi quando la scheda TV non è +capace di riportare il modo audio corrente. .IPs adevice= Seleziona un dispositivo audio. deve essere /dev/\:xxx per OSS e un ID hardware per ALSA. -Devi sostituire ogni ':' in '.' quando specifichi l'ID hardware per ALSA. -Vedi la documentazione per \-ao alsa per trovare come specificare l'ID hardware. +Devi sostituire ogni ':' con un '.' quando specifichi l'ID hardware per ALSA. .IPs audioid= -Sceglie una uscita audio della scheda di cattura, se ne ha più di una. +Sceglie un'uscita audio della scheda di cattura, se ne ha più di una. .IPs "[volume|bass|treble|balance]=<0\-65535> (v4l1)" .IPs "[volume|bass|treble|balance]=<0\-100> (v4l2)" Queste opzioni regolano i parametri del mixer sulla scheda di cattura @@ -2045,7 +2316,7 @@ al valore voluto e disabilita il controllo automatico. Un valore di 0 abilita il controllo automatico. Se questa opzione viene omessa, il controllo del guadagno non viene modificato. -.IPs immediatemode= +.IPs immediatemode= Il valore 0 indica di catturare e bufferizzare audio e video insieme (default per MEncoder). Il valore 1 (default per MPlayer) indica di effettuare solo la cattura @@ -2058,7 +2329,7 @@ determinerà automaticamente dal valore di decimation (vedi sotto). .IPs decimation=<1|2|4> Sceglie la dimensione dell'immagine che verrà creata dall'hardware -di compressione MJPEG. +di compressione MJPEG: .RSss 1: dimensione completa 704x576 PAL @@ -2094,7 +2365,7 @@ Specifica la lingua di default per il televideo (default: 0), che verrà usata come lingua principale fino alla ricezione di un pacchetto di tipo 28. Utile quando il sistema televideo usa un set di caratteri non latino, ma i -codici di lingua per qualche ragion non vengono trasmessi via televideo con +codici di lingua per qualche ragione non vengono trasmessi via televideo con pacchetti di tipo 28. Imposta l'opzione a \-1 per ottenere la lista dei codici di lingua utilizzabili. .IPs "hidden_video_renderer (solo dshow)" @@ -2122,7 +2393,7 @@ .TP .B \-tvscan (solo TV e MPlayer) Imposta lo scanner dei canali TV. -MPlayer emetterà anche dei valori per l'opzione "\-tv channels=", includendo +MPlayer emetterà anche dei valori per l'opzione "-tv channels=", includendo canali esistenti e appena trovati. .sp 1 Le sotto opzioni disponibili sono: @@ -2156,14 +2427,11 @@ primo programma (se presente) con il flusso video prescelto. . .TP -.B \-vivo (CODICE DI DEBUG) +.B \-vivo (CODICE DI DEBUG) Forza i parametri audio per il demuxer VIVO (per scopi di debug). FIXME: Da documentare. . . -.\" -------------------------------------------------------------------------- -.\" Opzioni OSD /\: Sottotitoli -.\" -------------------------------------------------------------------------- . .SH "OPZIONI OSD/SOTTOTITOLI" .I NOTA: @@ -2255,8 +2523,8 @@ . .TP .B \-ass\-use\-margins -Abilita/disabilita il posizionamento dei sottotitoli nei bordi neri, quando -questi sono disponibili. +Abilita il posizionamento dei sottotitoli nei bordi neri, quando questi sono +disponibili. . .TP .B \-dumpjacosub (solo MPlayer) @@ -2302,14 +2570,15 @@ . .TP .B \-embeddedfonts (solo FreeType) -Abilita l'estrazione di font embedded in file Matroska (default: disabilitato). +Abilita l'estrazione di font incorporati nei file Matroska (default: +disabilitato). Questi font possono essere usati per renderizzare sottotitoli SSA/ASS (opzione \-ass). I file dei font vengono creati nella directory ~/.mplayer/\:fonts . .br .I NOTA: -Con FontConfig 2.4.2 o superiore, i font embedded sono aperti direttamente dalla -memoria, e questa opzione viene abilitata di default. +Con FontConfig 2.4.2 o superiore, i font embedded sono aperti direttamente +dalla memoria, e questa opzione viene abilitata di default. . .TP .B \-ffactor @@ -2395,6 +2664,24 @@ Imposta la durata dei messaggi OSD in millisecondi (default: 1000). . .TP +.B \-osd\-fractions <0\-2> +Imposta come visualizzare le frazioni di secondo del timestamp corrente +sull'OSD: +.PD 0 +.RSs +.IPs 0 +Non visualizza le frazioni (default). +.IPs 1 +Mostra i primi due decimali. +.IPs 2 +Mostra un conteggio approssimato dei frame all'interno del secondo corrente, +il risultato non è accurato. +Per fps (fotogrammi al secondo) variabili, questa approssimazione è nota +per essere ben distante da un corretto conteggio dei frame. +.RE +.PD 1 +. +.TP .B \-osdlevel <0\-3> (solo MPlayer) Specifica in quale modalità deve partire l'OSD. .PD 0 @@ -2419,22 +2706,22 @@ .TP .B \-sid (vedi anche \-slang, \-vobsubid) Visualizza il flusso dei sottotitoli nel linguaggio specificato da (0\-31). -MPlayer stampa gli ID disponibili se eseguito in -modalità verbosa (\-v). +MPlayer stampa gli ID disponibili se eseguito in modalità verbosa (\-v). Se non riesci a selezionare un sottotitolo di un DVD, prova anche \-vobsubid. . .TP .B \-nosub -Disabilita qualsiasi sottotitolo selezionato automaticamente (cosa che per +Disabilita qualsiasi sottotitolo interno selezionato automaticamente (cosa che per es.\& il demuxer Matroska/mkv implementa). +Usa \-noautosub per disabilitare il caricamento di file di sottotitoli esterni. . .TP .B \-slang (vedi anche \-sid) Specifica una lista di priorità dei linguaggi dei sottotitoli da usare. Formati contenitore diversi (avi, mov, ...) utilizzano diversi codici dei linguaggi. -I DVD utilizzano i codici a due lettere ISO 639\-1, Matroska utilizza invece -il codice a tre lettere ISO 639\-2 mentre il formato OGM utilizza un identificatore +I DVD utilizzano i codici a due lettere ISO 639-1, Matroska utilizza invece +il codice a tre lettere ISO 639-2 mentre il formato OGM utilizza un identificatore con formato libero. MPlayer stampa i linguaggi disponibili se eseguito in modalità verbosa (\-v). @@ -2510,14 +2797,15 @@ .TP .B \-sub\-bg\-color <0\-255> Specifica il valore del colore per i sottotitoli e per lo sfondo dell'OSD. -Attualmente i sottotitoli sono a scala di grigi e perciò questo valore +Attualmente i sottotitoli sono in scala di grigi e perciò questo valore è equivalente all'intensità del colore. 255 indica bianco e 0 nero. . .TP .B \-sub\-demuxer <[+]nome> (solo \-subfile) (CODICE BETA) -Forza il nome del demuxer, come indicato da \-sub\-demuxer help. +Forza il tipo di demuxer dei sottotitoli per \-subfile. Usa un '+' prima del nome per forzarlo, il che eviterà alcuni controlli! +Fornisci il nome del demuxer come indicato da \-sub\-demuxer help. Per retrocompatibilità accetta anche l'ID del demuxer come definito in subreader.h. . @@ -2527,11 +2815,12 @@ .PD 0 .RSs .IPs 0 -Corrispondenza esatta +Corrispondenza esatta (default). .IPs 1 Carica tutti i sottotitoli che contengono il nome del file. .IPs 2 -Carica tutti i sottotitoli nella directory corrente. +Carica tutti i sottotitoli nella directory corrente e in quelle definite da +\-sub\-paths. .RE .PD 1 . @@ -2557,8 +2846,8 @@ .PD 1 . .TP -.B "\-subcc \ " -Visualizza i sottotitoli Close Caption (CC) dei DVD. +.B "\-subcc <1\-4>\ " +Visualizza i sottotitoli Close Caption (CC) dei DVD dal canale specificato. Questi .B non sono i sottotitoli dei VOB, sono sottotitoli speciali in ASCII per @@ -2603,6 +2892,28 @@ .PD 1 . .TP +.B \-sub\-paths +Specifica i percorsi extra per i sottotitoli da cercare nella directory del +filmato. +.sp 1 +.I ESEMPIO: +Supponendo che venga riprodotto /percorso/\:del/\:filmato/\:film.avi e \-sub\-paths +sub,subtitles,/tmp/subs è specificato, MPlayer cerca i file dei sottotitoli in +queste directory: +.RSs +/percorso/\:del/\:filmato/ +.br +/percorso/\:del/\:filmato/\:sub/ +.br +/percorso/\:del/\:filmato/\:subtitles/ +.br +/tmp/\:subs/ +.br +~/.mplayer/\:sub/ +.RE +.PD 1 +. +.TP .B \-subdelay Ritarda i sottotitoli di secondi. Può essere negativo. @@ -2610,11 +2921,10 @@ .TP .B \-subfile (CODICE BETA) Attualmente inutile. -E' lo stesso che \-audiofile, ma per il flusso dei sottotitoli (OggDS?). +È lo stesso che \-audiofile, ma per il flusso dei sottotitoli (OggDS?). . .TP -.B \-subfont (solo FreeType) -.B \-subfont (solo FreeType) +.B \-subfont (solo FreeType) Seleziona il font per i sottotitoli (vedi \-font). Se \-subfont non è specificato, viene usato \-font. . @@ -2722,15 +3032,12 @@ Specifica l'ID del sottotitolo VOBsub. . . -.\" -------------------------------------------------------------------------- -.\" Opzioni di uscita audio -.\" -------------------------------------------------------------------------- . .SH "OPZIONI DI USCITA AUDIO (SOLO MPLAYER)" . .TP .B \-abs (solo \-ao oss) (OBSOLETO) -Sovrascrive la ricerca della dimensione del buffer del driver/\:scheda. +Sovrascrive il rilevamento della dimensione del buffer del driver/\:scheda. . .TP .B \-format (vedi anche il filtro audio format) @@ -2774,7 +3081,7 @@ Un valore di 200 ti permette di regolare il volume fino ad un massimo di due volte il valore corrente. Con valori sotto a 100 il volume iniziale (che è 100%) sarà sopra al -massimo, che, p.es.\&, l'OSD non riuscirà a visualizzare correttamente. +massimo, per cui, ad esempio, l'OSD non riuscirà a visualizzarlo correttamente. . .TP .B \-volstep <0\-100> @@ -2788,14 +3095,11 @@ Un valore di -1 (default) non modifica il volume. . . -.\" -------------------------------------------------------------------------- -.\" Driver di uscita audio -.\" -------------------------------------------------------------------------- . .SH "DRIVER DI USCITA AUDIO (SOLO MPLAYER)" I driver di uscita audio sono interfacce verso le varie possibilità di uscita audio. -La sintassi è +La sintassi è: . .TP .B \-ao @@ -2837,10 +3141,6 @@ .PD 1 . .TP -.B "alsa5\ \ " -driver di uscita audio ALSA 0.5 -. -.TP .B "oss\ \ \ \ " driver di uscita audio OSS .PD 0 @@ -2906,6 +3206,14 @@ .TP .B coreaudio (solo Mac OS X) driver di uscita audio nativo per Mac OS X +.PD 0 +.RSs +.IPs device_id= +ID del dispositivo di uscita da usare (0 = dispositivo di default) +.IPs help +Elenca tutti dispositivi di uscita disponibili con i rispettivi ID. +.RE +.PD 1 . .TP .B "openal\ " @@ -2983,9 +3291,9 @@ .PD 0 .RSs .IPs (no)share -Apre Dart in modalità condivisa o esclusiva. +Apre DART in modalità condivisa o esclusiva. .IPs bufsize= -Imposta la dimenzione del buffer a in campioni (default: 2048). +Imposta la dimensione del buffer a in campioni (default: 2048). .RE .PD 1 . @@ -3038,7 +3346,7 @@ Prova a scrivere il file più velocemente che in tempo reale (realtime). Assicurati che l'uscita non venga troncata (solitamente con un messaggio "Troppi pacchetti video nel buffer!"). -E' normale che tu ottenga un messaggio +È normale che tu ottenga un messaggio "Il tuo sistema è troppo LENTO per questa riproduzione!". .RE .PD 1 @@ -3048,9 +3356,6 @@ driver di uscita audio plugin . . -.\" -------------------------------------------------------------------------- -.\" Opzioni di uscita video -.\" -------------------------------------------------------------------------- . .SH "OPZIONI DI USCITA VIDEO (SOLO MPLAYER)" . @@ -3253,6 +3558,11 @@ .PD 1 . .TP +.B \-gamma <\-100\-100> +Regola la gamma del segnale video (default: 0). +Non è supportato da tutti i driver di uscita video. +. +.TP .B \-geometry x[%][:y[%]] o [WxH][+x+y] Regola dove viene visualizzata l'uscita sullo schermo inizialmente. I valori di x ed y sono in pixel misurati dall'angolo alto a sinistra @@ -3260,7 +3570,10 @@ comunque se viene aggiunto il segno di percentuale ad un argomento, il valore viene convertito in una percentuale della dimensione dello schermo in quella direzione. -Supporta anche il formato dell'opzione standard di X \-geometry. +Supporta anche il formato dell'opzione standard di X \-geometry, nel quale ++10-50 significa "posiziona 10 pixel dal bordo sinistro e 50 pixel dal bordo in +basso", mentre "--20+-10" significa "posiziona 20 pixel oltre la destra e 10 +pixel oltre il bordo in alto". Se viene specificata una finestra esterna utilizzando l'opzione \-wid allora le coordinate x ed y sono relative all'angolo in alto a sinistra della finestra stessa piuttosto che dello schermo. @@ -3417,8 +3730,9 @@ non conoscono la risoluzione dello schermo come fbdev, x11 e TV-out. . .TP -.B \-stop\-xscreensaver (solo X11) +.B \-(no)stop\-xscreensaver (solo X11) Disattiva il salvaschermo di X alla partenza e lo riattiva all'uscita. +(default: abilitato). Se il tuo salvaschermo non gestisce né la API XSS né XResetScreenSaver, perfavore usa al suo posto \-heartbeat\-cmd. . @@ -3451,8 +3765,8 @@ Utile per 'incastrare' MPlayer in un browser (p.es.\& con l'estensione plugger). Quest'opzione riempie completamente la finestra indicata, quindi rapporto di -aspetto, panscan, etc non vengono più gestite da MPlayer, ma devono esser -gestire dall'applicazione che ha creato la finestra. +aspetto, panscan, ecc. non vengono più gestite da MPlayer, ma devono essere +gestite dall'applicazione che ha creato la finestra. . .TP .B \-xineramascreen <\-2\-...> @@ -3661,9 +3975,9 @@ Utilizza la funzione sleep mentre aspetta che finisca la visualizzazione (non consigliato in Linux) (default: nosleep). .IPs ck=cur|use|set -E' lo stesso che \-vo xv:ck (vedi \-vo xv). +È lo stesso che \-vo xv:ck (vedi \-vo xv). .IPs ck-method=man|bg|auto -E' lo stesso che \-vo xv:ck-method (vedi \-vo xv). +È lo stesso che \-vo xv:ck-method (vedi \-vo xv). .RE .PD 1 . @@ -3694,7 +4008,7 @@ Deinterlacciamento temporale adattivo al movimento. Può portare desincronizzazione A/V con hardware video lento e/o alte risoluzioni. -E' il default se si usa "D" per deinterlacciare. +È il default se si usa "D" per deinterlacciare. .IPs 4 Deinterlacciamento temporale adattivo al movimento, con interpolazione spaziale legata ai bordi. @@ -3732,7 +4046,7 @@ .IPs hqscaling .RSss .IPs 0 -Utilizza la scalatura di default di VDPAU (default). +Utilizza la scalatura predefinita di VDPAU (default). .IPs 1\-9 Applica la scalatura VDPAU ad alta qualità (serve hardware abbastanza potente). .RE @@ -3741,7 +4055,41 @@ (default). Usa noforce\-mixer per permettere la visualizzazione dello spazio colore BGRA. (Se viene usato il formato immagine BGRA, disabilita tutte le opzioni sopra e -l'equalizzatore hardware.) +l'equalizzatore hardware). +.RE +.PD 1 +. +.TP +.B xvmc (solo X11 con decodificatore FFmpeg MPEG-1/2) +Driver di uscita video che utilizza l'etensione XvMC (X Video Motion Compensation) +di XFree86 4.x per velocizzare la decodifica MPEG-1/2 e VCR2. +.PD 0 +.RSs +.IPs adaptor= +Seleziona un adattatore XVideo specifico (controlla i risultati di xvinfo). +.IPs port= +Seleziona una porta XVideo specifica. +.IPs (no)benchmark +Disabilita la visualizzazione delle immagini. +Necessario per effettuare dei test corretti su driver che cambiano buffer delle +immagini solo sul retrace del monitor (nVidia). +Il default è di non disabilitare la visualizzazione delle immagini (nobenchmark). +.IPs (no)bobdeint +Un deinterlacciatore molto semplice. +Potrebbe non risultare migliore di \-vf tfields=1, ma è l'unico per xvmc +(default: nobobdeint). +.IPs (no)queue +Mette in coda i fotogrammi da visualizzare per permettere un lavoro +dell'hardware video più parallelo. +Può aggiungere una piccola (non notabile) e costante desincronizzazione A/V +(default: noqueue). +.IPs (no)sleep +Utilizza la funzione sleep mentre aspetta che finisca la renderizzazione (non +raccomandato con Linux) (default: nosleep). +.IPs ck=cur|use|set +Equivale a \-vo xv:ck (vedi \-vo xv). +.IPs ck-method=man|bg|auto +Equivale a \-vo xv:ck-method (vedi \-vo xv). .RE .PD 1 . @@ -3960,11 +4308,11 @@ Studiato per funzionare anche con l'implementazione OpenGl più basilare, ma usa pure estensioni recenti e nuove, che permettono di usare più spazi colore e il rendering diretto. -Per una velocità ottimale prova ad usare qualcosa simile a +Per una velocità ottimale prova ad aggiungere le opzioni .br -\-vo gl:yuv=2:rectangle=2:force\-pbo:ati\-hack \-dr \-noslices +\-dr \-noslices .br -Questa parte di codice implementa pochi controlli percio' se una +Questa parte di codice implementa pochi controlli perciò se una caratteristica non funziona potrebbe non essere supportata dalla tua scheda o dalla tua implementazione OpenGL anche se non viene visualizzato nemmeno un messaggio di errore. @@ -4094,29 +4442,59 @@ della luminanza. Valida solo per modalità yuv 2, 3, 4 e 6. .RSss -0: Usa un filtraggio lineare semplice (default). -.br -1: Usa un filtraggio bicubico B-spline (migliore qualità). +.IPs 0 +Usa un filtraggio lineare semplice (default). +.IPs 1 +Usa un filtraggio bicubico B-spline (migliore qualità). Richiede un'unità supplementare di texture. Schede video vecchie non saranno in grado di gestire questo per la crominanza, perlomeno in modalità a schermo intero. -.br -2: Usa un filtraggio cubico in direzione orizzontale, un filtraggio lineare su +.IPs 2 +Usa un filtraggio cubico in direzione orizzontale, un filtraggio lineare su quella verticale. Funziona su meno schede che il metodo 1. -.br -3: Uguale a 1, ma non usa una texture supplementare. +.IPs 3 +Uguale a 1, ma non usa una texture supplementare. Potrebbe essere più veloce su alcune schede. -.br -4: Usa una maschera sperimentale di eliminazione particolari (unsharp) con -dimensione 3x3 e valore 0.5. -.br -5: Usa una maschera sperimentale di eliminazione particolari (unsharp) con -dimensione 5x5 e valore 0.5. +.IPs 4 +Usa una maschera sperimentale di eliminazione particolari (unsharp) con +dimensione 3x3 e valore 0.5 (vedi filter-strength). +.IPs 5 +Usa una maschera sperimentale di eliminazione particolari (unsharp) con +dimensione 5x5 e valore 0.5 (vedi filter-strength). .RE .IPs cscale= Seleziona la funzione di ridimensionamento da usare per il ridimensionamento della crominanza. +Per i dettagli vedi lscale. +.IPs filter-strength= +Imposta l'intensità dell'effetto per i filtri lscale/cscale che la supportano. +.IPs noise-strength= +Imposta la quantità di rumore da aggiungere. 0 per disabilitare (default), 1.0 +per il livello adatto per il dithering a 6 bit. +.IPs stereo= +Seleziona un metodo per la visione stereo. +Potrebbe essere necessario usare \-aspect per aggiustare il valore delle +proporzioni. +Sperimentale, non aspettarti troppo. +.RSss +.IPs 0 +visualizzazione 2D normale +.IPs 1 +conversione ingresso fianco a fianco in video a colori stereo rosso-ciano +.IPs 2 +conversione ingresso fianco a fianco in video a colori stereo verde-magenta +.IPs 3 +conversione ingresso fianco a fianco in buffer stereo quadruplo. +Supportato solo da pochissime schede OpenGL. +.RE +.RE +.sp 1 +.RS +Le opzioni seguenti sono utili solo se scrivete un vostro programma di frammentazione. +.RE +.sp 1 +.RSs .IPs customprog= Carica un programma personalizzato di frammentazione da . Vedi TOOLS/edgedect.fp come esempio. @@ -4218,8 +4596,6 @@ .TP .B "aa\ \ \ \ \ " Driver di uscita video ASCII art che funziona su una console di testo. -Puoi avere una lista ed una spiegazione delle sotto opzioni disponibili -eseguendo 'mplayer \-vo aa:help'. .br .I NOTA: Il driver non gestisce correttamente \-aspect. @@ -4242,7 +4618,7 @@ .IPs Seleziona esplicitamente il driver del dispositivo Blinkenlights da usare. -E' qualcosa del tipo arcade:host=localhost:2323 oppure hdl:file=nome1,file=nome2. +È qualcosa del tipo arcade:host=localhost:2323 oppure hdl:file=nome1,file=nome2. Devi specificare un sottodispositivo. .RE .PD 1 @@ -4347,12 +4723,12 @@ .PD 1 . .TP -.B s3fb (solo Linux) (vedi anche \-vf yuv2 e \-dr) +.B s3fb (solo Linux) (vedi anche \-dr) Driver di uscita video specifico per S3 Virge. Questo driver supporta la conversione e la scalatura YUV della scheda, il doppio buffering e il direct rendering. -Usa \-vf yuy2 per ottenere la renderizzazione YUY2 accellerata hardware, che su -questa scheda è decisamente più veloce di YV12. +Usa \-vf format=yuy2 per ottenere la renderizzazione YUY2 accellerata hardware, +che su questa scheda è decisamente più veloce di YV12. .PD 0 .RSs .IPs @@ -4523,7 +4899,9 @@ formato YUV 4:2:0 e le memorizza in un file (default: ./stream.yuv). Il formato è lo stesso utilizzato da mjpegtools, perciò questo è utile se vuoi elaborare il video con la suite mjpegtools. -Supporta gli spazi colore YV12, RGB (24 bpp) e BGR (24 bpp). +Supporta il formato YV12. +Se il tuo file ha un formato differente ed è interlacciato, assicurati di usare +-vf scale=::1 affinché la conversione utilizzi la modalità interlacciata. Può combinarlo con l'opzione \-fixed\-vo per concatenare file con le stesse dimensioni e la stessa frequenza (fps). .PD 0 @@ -4640,6 +5018,9 @@ 0 indica nessuna compressione, 9 invece è il massimo. .IPs outdir= Specifica la directory dove salvare i file PNG (default: ./). +.IPs prefix= +Specifica il prefisso da usare per i nomi dei file PNG (default: nessun +prefisso). .IPs alpha (default: noalpha) Crea file PNG con un canale alpha. Nota che MPlayer solitamente non gestisce l'alpha, quindi questa opzione sarà @@ -4648,6 +5029,26 @@ .PD 1 . .TP +.B "mng\ \ \ \ " +Crea un file MNG animato da un video utilizzando immagini 24 bpp RGB con +compressione senza perdita di qualità. +.PD 0 +.RSs +.IPs output= +Specifica il nome del file in uscita (default: out.mng). +.REss +.PD 1 +.RS +.sp 1 +.I ESEMPIO: +.RE +.PD 0 +.RSs +mplayer video.mkv \-vo mng:output=test.mng +.RE +.PD 1 +. +.TP .B "tga\ \ \ \ " Scrive ogni fotogramma in un file Targa (TGA) nella directory corrente. Il nome del file viene creato dal numero del fotogramma riempito con zeri iniziali. @@ -4665,9 +5066,6 @@ .PD 1 . . -.\" -------------------------------------------------------------------------- -.\" Opzioni decodifica /\: filtraggio -.\" -------------------------------------------------------------------------- . .SH "OPZIONI DI DECODIFICA/FILTRAGGIO" . @@ -4720,7 +5118,7 @@ .br 3: Non utilizza l'inserimento automatico dei filtri e nessuna ottimizzazione. .I Attenzione: -E' possibile inchiodare MPlayer utilizzando questo valore. +È possibile inchiodare MPlayer utilizzando questo valore. .br 4: Utilizza l'inserimento automatico dei filtri come l'opzione 0 suddetta, ma utilizza la gestione in virgola mobile quando possibile. @@ -5236,10 +5634,6 @@ . . . -.\" -------------------------------------------------------------------------- -.\" Filtri Audio -.\" -------------------------------------------------------------------------- -. .SH "FILTRI AUDIO" I filtri audio ti permettono di modificare il flusso audio e le sue proprietà. @@ -5418,7 +5812,7 @@ Migliora l'ascolto attraverso le cuffie rendendo simile l'audio a quello degli altroparlanti, permettendo a ciascun orecchio di sentire entrambi i canali e percepire la differenza di distanza e l'effetto di allontanamento dalla testa. -E' applicabile solo all'audio a 2 canali. +È applicabile solo all'audio a 2 canali. .PD 0 .RSs .IPs fcut=<300\-1000> @@ -5587,6 +5981,8 @@ complessivo del livello del suono e lo stampa quando MPlayer termina. Questo volume stimato può essere usato per regolare il livello del suono in MEncoder in modo da utilizzare la massima gamma dinamica. +Attualmente questa caratteristica funziona solo con dati decimali, +usa, ad esempio, i parametri \-af\-adv force=5 o \-af. .br .I NOTA Questo filtro non è rientrante e può perciò essere utilizzato solo @@ -5638,7 +6034,7 @@ .IPs Quanta parte del canale di ingresso i è miscelata nel canale di uscita j (0\-1). Così all'inizio hai n numeri che dicono cosa fare col primo canale di ingresso, -poi n numeri che agiscono sul secondo canale di ingresso, etc. +poi n numeri che agiscono sul secondo canale di ingresso, ecc. Se non è specificato alcun numero per alcuni canali di ingresso, viene usato 0. .RE .sp 1 @@ -5741,7 +6137,7 @@ .B delay[=ch1:ch2:...] Ritarda il suono dei vari altoparlanti in modo che il suono dai diversi canali arrivi alla posizione di ascolto contemporaneamente. -E' utile solo se hai più di 2 altoparlanti. +È utile solo se hai più di 2 altoparlanti. .PD 0 .RSs .IPs ch1,ch2,... @@ -5975,9 +6371,6 @@ I volumi vengono scritti in dB e compatibili col filtro audio volume. . . -.\" -------------------------------------------------------------------------- -.\" Filtri video -.\" -------------------------------------------------------------------------- . .SH "FILTRI VIDEO" I filtri video ti permettono di modificare il flusso video e le sue @@ -6326,11 +6719,6 @@ .RE . .TP -.B "yuy2\ \ \ " -Forza una conversione software da YV12/\:I420/\:422P a YUY2. -Utile per schede video/\:driver con un supporto lento per YV12 ma veloce per YUY2. -. -.TP .B "yvu9\ \ \ " Forza una conversione software dallo spazio colore YVU9 a YV12. Deprecato a favore della scalatura via software. @@ -6340,21 +6728,11 @@ Limita (clamp) i valori dei colori YUV alla gamma CCIR 601 senza effettuare una reale conversione. . .TP -.B rgb2bgr[=swap] -Conversione dello spazio colore RGB 24/32 <\-> BGR 24/32. -.PD 0 -.RSs -.IPs "swap\ " -Effettua anche lo scambio R <-> B. -.RE -.PD 1 -. -.TP .B palette Conversione dello spazio colore RGB/BGR 8 \-> 15/16/24/32bpp utilizzando una palette (tavolozza). . .TP -.B format[=fourcc] +.B format[=fourcc[:outfourcc]] Limita lo spazio colore del filtro successivo senza effettuare nessuna conversione. Da utilizzare con il filtro di scalatura per ottenere una conversione effettiva. .br @@ -6363,7 +6741,18 @@ .PD 0 .RSs .IPs -nome del formato tipo rgb15, bgr24, yv12, etc (default: yuy2) +nome del formato tipo rgb15, bgr24, yv12, ecc. (default: yuy2) +.IPs +Nome del formato che va sostituito per l'uscita. +Se non è compatibile al 100% con il valore di andrà in crash. +.br +Esempi validi: +.br +format=rgb24:bgr24 format=yuyv:yuy2 +.br +Esempi non validi (causano crash): +.br +format=rgb24:yv12 .RE .PD 1 . @@ -6379,7 +6768,7 @@ .PD 0 .RSs .IPs -nome del formato tipo rgb15, bgr24, yv12, etc (default: yv12) +nome del formato tipo rgb15, bgr24, yv12, ecc. (default: yv12) .RE .PD 1 . @@ -6986,7 +7375,7 @@ rovinare l'interlacciamento. Mentre il deinterlacciamento (con il filtro di post elaborazione) rimuove l'interlacciamento in modo permanente (attraverso un ammorbidimento, una -media, etc) il deinterleave divide i fotogrammi in due campi (chiamati +media, ecc.) il deinterleave divide i fotogrammi in due campi (chiamati mezze immagini), così li puoi processare (filtrare) in modo indipendente e poi effettuare il re-interleave per riottenere l'immagine interlacciata. .PD 0 @@ -7104,7 +7493,7 @@ Come ivtc, pullup è 'stateless', nel senso che non si blocca su un modello da seguire, ma invece guarda avanti ai campi (field) successivi in modo da identificare delle corrispondenze e ricreare i fotogrammi progressivi. -E' ancora sotto sviluppo ma si crede che sia abbastanza preciso. +È ancora sotto sviluppo ma si crede che sia abbastanza preciso. .RSs .IPs "jl, jr, jt, e jb" @@ -7149,7 +7538,7 @@ .TP .B filmdint[=opzioni] Filtro di inversione del telecine, simile al filtro pullup sopra. -E' progettato per gestire qualsiasi modello di pulldown, inclusa una +È progettato per gestire qualsiasi modello di pulldown, inclusa una combinazione di soft ed hard telecine ed un limitato supporto per filmati che sono stati rallentati o velocizzati dal loro framerate originale per la TV. @@ -7182,7 +7571,7 @@ framerate differente da quello originale. .IPs luma_only= Se n è diverso da 0 il piano croma è copiato cosi com'è. -E' utile per materiale dalla TV con campionamento YV12, dove si ignora uno dei +È utile per materiale dalla TV con campionamento YV12, dove si ignora uno dei campi (field) del croma. .IPs mmx2= Nel caso di x86, se n=1 utilizza funzioni ottimizzate per MMX2, @@ -7669,7 +8058,7 @@ Se ometti un parametro oppure utilizzi un valore minore di 0 allora viene usato il valore di default. Puoi anche fermarti quando sei soddisfatto (... \-vf tile=10:5 ...). -E' probabilmente una buona idea mettere il filtro scale prima del +È probabilmente una buona idea mettere il filtro scale prima del filtro tile :-) .sp 1 I parametri sono: @@ -7709,6 +8098,10 @@ Spessore del bordo 'fuzzy' del rettangolo (aggiunto a w e h). Quando è \-1 un rettangolo verde viene disegnato sullo schermo per riuscire a trovare più facilmente i parametri x,y,w,h giusti. +.IPs file= +Puoi specificare un file di testo da cui caricare le coordinate. +Ogni riga deve avere un timestamp (in secondi e in ordine crescente) e le +coordinate "x:y:w:h:t" (t può essere omessa). .RE .PD 1 . @@ -7815,17 +8208,58 @@ .RSs .IPs Massima variazione che il filtro applicherà su ogni pixel. -E' anche la soglia per determinare le regioni quasi piane (default: 1.2). +È anche la soglia per determinare le regioni quasi piane (default: 1.2). .IPs Raggio della zona circostante a cui adattare il gradiente. Raggi più ampi generano gradienti più sfumati, ma impediranno al filtro di modificare pixel in regioni più dettagliate (default: 16). .RE . +.TP +.B fixpts[=opzioni] +iAggiusta il presentation timestamps (PTS) dei fotogrammi. +Il PTS passato al filtro successivo viene rilasciato in modo predefinito, le +seguenti opzioni possono modificare questo comportamento: +.RSs +.IPs print +Stampa il PTS in entrata. +.IPs fps= +Specifica un valore di fotogrammi al secondo. +.IPs start= +Specifica un valore iniziale per il PTS. +.IPs autostart= +Utilizza il dato numero +.IR (n) +di PTS in entrata come il PTS iniziale. +Tutti i PTS precedenti sono mantenuti, per cui impostando un valore alto o \-1 +mantiene intatto il PTS. +.IPs autofps= +Utilizza il dato numero +.IR (n) +di PTS in entrata al termine dell'autostart per determinare la frequenza dei +fotogrammi. +.RE +.sp 1 +.RS +.I ESEMPIO: +.RE +.PD 0 +.RSs +.IPs "\-vf fixpts=fps=24000/1001,ass,fixpts" +Genera una nuova sequenza di PTS, la utilizza per i sottotitoli ASS e quindi la +rilascia. +Generare una nuova sequenza è utile quando il timestamp vengono azzerati +durante il programma; questo è frequente con i DVD. +Il rilascio può essere necessario per evitare di confondere i codificatori. +.RE +.PD 1 +.sp 1 +.RS +.I NOTA: +Utilizzare questo filtro con qualsiasi tipo di posizionamento (seek) (inclusi +-ss e EDL), può causare comportamenti inattesi e bizzarri. +.RE . -.\" -------------------------------------------------------------------------- -.\" Opzioni generali di codifica -.\" -------------------------------------------------------------------------- . .SH "OPZIONI GENERALI DI CODIFICA (SOLO MENCODER)" . @@ -7897,7 +8331,7 @@ .I NOTA: Usare questa opzione porterà una probabile desincronizzazione Audio-Video. Non usarla. -E' mantenuta solo per retrocompatibilità e possibilmente verrà rimossa +È mantenuta solo per retrocompatibilità e possibilmente verrà rimossa in una delle prossime versioni. . .TP @@ -8063,10 +8497,26 @@ .B \-vobsuboutindex Specifica l'indice dei sottotitoli nei file di uscita (default: 0). . +.TP +.B \-force\-key\-frames ,,... +Forza i fotogrammi chiave ai timestamp specificati, più precisamente al primo +fotogramma dopo ogni tempo specificato. +.sp 1 +Può essere utilizzata per garantire che un punto di posizionamento sia presente +a un dato punto di un capitolo o qualsiasi altra posizione designata nel file +di uscita. +.sp 1 +I timestamp vanno specificati in ordine crescente. +.sp 1 +Giacché MEncoder non invia i timestamp con la catena di filtri, per far +funzionare questa opzione ci sarà la probabile necessità di usare il filtro +fixpts. +.sp 1 +Non tutti i codec gestiscono fotogrammi chiave forzati. +Attualmente il supporto è implementato soltanto nei seguenti codificatori: +lavc, x264, xvid. +. . -.\" -------------------------------------------------------------------------- -.\" Opzioni specifiche di codifica -.\" -------------------------------------------------------------------------- . .SH "OPZIONI SPECIFICHE DI CODIFICA (SOLO MENCODER)" Puoi specificare opzioni specifiche dei codec di codifica usando la @@ -8502,7 +8952,7 @@ Valore minimo del moltiplicatore di Lagrange del livello di macroblocchi per il controllo della frequenza (default: 2.0). Questo parametro influenza le opzioni di quantizzazione adattiva come qprd, -lumi_mask, ecc.. +lumi_mask, ecc. .RE . .TP @@ -8529,14 +8979,6 @@ buon valore (default: 31). . .TP -.B mbqmin=<1\-31> -obsoleto, utilizza vqmin -. -.TP -.B mbqmax=<1\-31> -obsoleto, utilizza vqmax -. -.TP .B vqdiff=<1\-31> valore massimo di differenza di quantizzazione tra fotogrammi consecutivi I o P (default: 3) @@ -8713,7 +9155,7 @@ vengono divise per due, il che aumenta la velocità di un fattore di quattro. Entrambe le dimensioni del fotogramma completamente ridimensionato devono essere numeri pari, così brd_scale=1 richiede che la dimensione originaria sia un -multiplo di quattro, brd_scale=2 richiede multipli di otto, etc. +multiplo di quattro, brd_scale=2 richiede multipli di otto, ecc. In altre parole, le dimensioni del fotogramma originario devono essere ambedue divisibili per 2^(brd_scale+1) senza resto. . @@ -8824,7 +9266,7 @@ .B autoaspect Uguale all'opzione aspect, ma calcola l'aspetto automaticamente, tenendo in considerazione tutte le varie operazioni (taglia, espandi, -riscala, etc) fatte nella catena dei filtri. +riscala, ecc.) fatte nella catena dei filtri. Non rallenta assolutamente la codifica perciò puoi lasciarlo sempre attivo. . @@ -8994,7 +9436,7 @@ .IPs qComp qcomp dalla linea di comando .IPs "isI, isP, isB" -E' 1 se il tipo di immagine è I/P/B altrimenti 0. +È 1 se il tipo di immagine è I/P/B altrimenti 0. .IPs "Pi,E\ " Vedi sul tuo libro preferito di matematica. .RE @@ -9530,7 +9972,7 @@ La ricerca del movimento è un processo iterativo. Utilizzare un diamante piccolo non limita la ricerca a trovare solo piccoli vettori di movimenti. -E' semplicemente molto più facile fermarsi prima di trovare il vettore +È semplicemente molto più facile fermarsi prima di trovare il vettore veramente migliore, specialmente in presenza di disturbo. Diamanti più grandi permettono una ricerca più ampia del vettore migliore, sono perciò più lenti ma si ottiene una qualità migliore. @@ -9940,7 +10382,7 @@ Sfortunatamente ha un grosso impatto sulla dimensione del file e ogni tanto l'alto bitrate che viene usato previene l'ottenimento di immagini di migliore qualità dato un certo bitrate fisso. -E' meglio provare con e senza questa opzione e vedere se vale la pena attivarla +È meglio provare con e senza questa opzione e vedere se vale la pena attivarla o meno. . .TP @@ -10196,7 +10638,7 @@ Un CBR (Constant Bit Rate, bitrate costante) è difficile da ottenere. A seconda del materiale video il bitrate può essere variabile e difficile da prevedere. -E' per questo che Xvid utilizza un periodo medio per il quale garantisce una +È per questo che Xvid utilizza un periodo medio per il quale garantisce una certa quantità di bit (meno una piccola variazione). Questa impostazione esprime il "numero di fotogrammi" per i quali Xvid media il bitrate e cerca di ottenere un flusso a velocità costante. @@ -10344,7 +10786,7 @@ .PD 0 .RSs .IPs vga11 -E' il PAR solito per materiale da PC. +È il PAR solito per materiale da PC. I pixel sono quadrati. .IPs pal43 PAR standard PAL in formato 4:3. @@ -10389,7 +10831,7 @@ .B (no)autoaspect Uguale all'opzione aspect, ma calcola automaticamente l'aspetto, tenendo in considerazione tutte le varie operazioni (taglia, espandi, -riscala, etc) fatte nella catena dei filtri. +riscala, ecc.) fatte nella catena dei filtri. . .TP .B "psnr\ \ \ " @@ -10406,7 +10848,7 @@ . .PP .sp 1 -L'opzione che segue è disponibile solo in Xvid 1.1.x. +Le opzioni che seguono sono disponibili solo in Xvid 1.1.x e successivi. . .TP .B bvhq=<0|1> @@ -10449,6 +10891,8 @@ il valore del parametro di quantizzazione (QP) di H.264 è in scala logaritmica. La mappatura è approssimativamente H264QP = 12 + 6*log2(MPEGQP). Per esempio MPEG a QP=2 è equivalente ad H.264 con QP=18. +Generalmente questa opzione andrebbe evitata usando invece crf, giacché darà +risultati visivi migliori per la stessa dimensione. . .TP .B crf=<1.0\-50.0> @@ -10456,6 +10900,7 @@ La scala è simile a QP. Come la modalità basata sul bitrate, questa permette ad ogni fotogramma di usare un QP diverso basandosi sulla complessità del fotogramma stesso. +Questa opzione dovrebbe usata al posto di qp. . .TP .B pass=<1\-3> @@ -10498,32 +10943,93 @@ I passi successivi sono ABR e si deve specificare il bitrate. .REss . +. .TP -.B turbo=<0\-2> -Modalità primo passo veloce. -Durante il primo passaggio di una codifica a 2 o 3 passaggi, è possibile -guadagnare velocità disabilitando alcune opzioni con un impatto basso o nullo -sulla qualità di uscita dell'ultimo passaggio. +.B profile= +Vincola le opzioni a essere compatibili con un profilo H.264. .PD 0 .RSs -.IPs 0 -disabilitato (default) -.IPs 1 -Riduce subq, frameref e disabilita alcune modalità di analisi di partizioni -dei macroblocchi inter. -.IPs 2 -Riduce subq e frameref a 1, usa una ricerca di movimento a diamante e -disabilita tutte le modalità di analisi di partizione. +.IPs baseline +no8x8dct bframes=0 nocabac cqm=flat weightp=0 nointerlaced qp>0 +.IPs main +no8x8dct cqm=flat qp>0 +.IPs high +qp>0 (default) .RE -.RS -Il livello 1 può aumentare fino al doppio la velocità del primo passaggio, -senza differenze nel PSNR complessivo dell'ultimo passo, rispetto a un -primo passo a piena qualità. +.PD 1 +. +.TP +.B preset= +Utilizza un preset per selezionare le impostazioni di codifica. +.PD 0 +.RSs +.IPs ultrafast +no8x8dct aq_mode=0 b_adapt=0 bframes=0 nodeblock nombtree me=dia +nomixed_refs partitions=none ref=1 scenecut=0 subq=0 trellis=0 +noweight_b weightp=0 +.IPs superfast +nombtree me=dia nomixed_refs partitions=i8x8,i4x4 ref=1 subq=1 trellis=0 +weightp=0 +.IPs veryfast +nombtree nomixed_refs ref=1 subq=2 trellis=0 weightp=0 +.IPs faster +nomixed_refs rc_lookahead=20 ref=5 subq=4 weightp=1 +.IPs fast +rc_lookahead=30 ref=2 subq=6 +.IPs medium +Default settings apply. +.IPs slow +b_adapt=2 direct=auto me=umh rc_lookahead=50 ref=5 subq=8 +.IPs slower +b_adapt=2 direct=auto me=umh partitions=all rc_lookahead=60 ref=8 subq=9 +trellis=2 +.IPs veryslow +b_adapt=2 b_frames=8 direct=auto me=umh me_range=24 partitions=all ref=16 +subq=10 trellis=2 rc_lookahead=60 +.IPs placebo +bframes=16 b_adapt=2 direct=auto nofast_pskip me=tesa me_range=24 +partitions=all rc_lookahead=60 ref=16 subq=10 trellis=2 +.RE +.PD 1 +. +.TP +.B tune= +Regola le impostazioni per un particolare tipo di sorgente o situazione. +Le esplicite impostazioni dell'utente prevalgono su tutte le regolazioni. +Le regolazioni multiple sono separate da virgola ma puà essere usato solo un +modello psicoacustico (psy) alla volta. +.PD 0 +.RSs +.IPs "film (regolazione psy)" +deblock=-1,-1 psy-rd=,0.15 +.IPs "animation (regolazione psy)" +b_frames={+2} deblock=1,1 psy-rd=0.4: aq_strength=0.6 +ref={double if >1 else 1} +.IPs "grain (regolazione psy)" +aq_strength=0.5 nodct_decimate deadzone_inter=6 deadzone_intra=6 +deblock=-2,-2 ipratio=1.1 pbratio=1.1 psy-rd=,0.25 qcomp=0.8 +.IPs "stillimage (regolazione psy)" +aq_strength=1.2 deblock=-3,-3 psy-rd=2.0,0.7 +.IPs "psnr (regolazione psy)" +aq_mode=0 nopsy +.IPs "ssim (regolazione psy)" +aq_mode=2 nopsy +.IPs fastdecode +nocabac nodeblock noweight_b weightp=0 +.IPs zerolatency +bframes=0 force_cfr rc_lookahead=0 sync_lookahead=0 sliced_threads +.RE +.PD 1 +. +.TP +.B slow_firstpass +Disabilita le seguenti opzioni veloci con pass=1: +no_8x8dct me=dia partitions=none ref=1 subq={2 if >2 altrimenti invariato} +trellis=0 fast_pskip. +Queste impostazioni migliorano significativamente la velocità di codifica pur +avendo poco o alcun impatto sulla qualità dell'ultimo passo. .br -Il livello 2 può aumentare di 4 volte la velocità del primo passaggio, con -una differenza di circa +/\- 0.05dB nel PSNR complessivo dell'ultimo passo, -rispetto a un primo passo a piena qualità. -.REss +Questa opzione è implicita usando preset=placebo. . .TP .B keyint= @@ -10564,7 +11070,7 @@ .B frameref=<1\-16> Numero di fotogrammi precedenti utilizzati come predittori nei fotogrammi B e P (default: 3). -E' efficace con alcuni anime o cartoni animati, ma su filmati ripresi dal vivo +È efficace con alcuni anime o cartoni animati, ma su filmati ripresi dal vivo i miglioramenti calano rapidamente dopo circa 6 fotogrammi di riferimento. Non ha effetto sulla velocità di decodifica ma incrementa la memoria necessaria alla decodifica. @@ -10587,7 +11093,7 @@ Un valore maggiore di b_bias produce più fotogrammi di tipo B (default: 0). . .TP -.B (no)b_pyramid +.B b_pyramid= Permette ai fotogrammi B di essere usati come riferimento per predire altri fotogrammi. Per esempio considera 3 fotogrammi B consecutivi: I0 B1 B2 B3 P4. @@ -10604,6 +11110,18 @@ Questo genera una compressione leggermente migliore senza perdite di velocità. Necessita di bframes >= 2. Svantaggi: incrementa il ritardo di decodifica a 2 fotogrammi. +.PD 0 +.RSs +.IPs normal +Permette i fotogrammi B come riferimenti, come descritto prima (non compatibile +con Blu-ray). +.IPs strict +Non permette che i fotogrammi P vengano usati come riferimento per i fotogrammi +B. Peggiora la compressione ma è necessario per la compatibilità con Blu-ray. +.IPs "none\ " +Disabilita l'uso dei fotogrammi B come riferimento. +.RE +.PD 1 . .TP .B (no)deblock @@ -10754,6 +11272,20 @@ .RE . .TP +.B weightp +Modalità previsione ponderata dei fotogrammi P (default: 2). +.PD 0 +.RSs +.IPs 0 +disabled (più veloce) +.IPs 1 +blind mode (qualità leggermente migliore) +.IPs 2 +smart mode (migliore) +.RE +.PD 1 +. +.TP .B (no)weight_b Utilizza la previsione ponderata nei fotogrammi B. Senza questa opzione, i macroblocchi predetti in maniera bidirezionale danno @@ -10919,6 +11451,11 @@ .PD 1 . .TP +.B (no)psy +Abilita le ottimizzazioni psychovisual che compromettono PSNR e SSIM ma +dovrebbero vedersi meglio (default: abilitato). +. +.TP .B deadzone_inter=<0\-32> Imposta la dimensione della zona morta di quantizzazione di luminanza inter per quantizzazione non trellis (default: 21). @@ -11062,6 +11599,37 @@ appropriato numero di thread. . .TP +.B (no)sliced_threads +Usa il threading basato su porzioni (default: disabilitato). +Al contrario del threading normale, questa opzione non aggiunge latenza di +codifica ma è leggermente più lento e meno efficace per la compressione. +. +.TP +.B slice_max_size=<0 or positive integer> +Dimensione massima in byte della porzione (default: 0). +Un valore pari a zero disabilita il massimo. +. +.TP +.B slice_max_mbs=<0 or positive integer> +Dimensione massima in in numero di macroblocchi (default: 0). +Un valore pari a zero disabilita il massimo. +. +.TP +.B slices=<0 or positive integer> +Numero massimo di porzioni per frame (default: 0). +Un valore pari a zero disabilita il massimo. +. +.TP +.B sync_lookahead=<0\-250> +Adjusts the size of the threaded lookahead buffer (default: 0). +0 or 'auto' tells x264 to automatically determine buffer size. +. +.TP +.B (no)deterministic +Con la codifica multithread utilizza solo ottimizzazioni deterministiche +(default: abilitato). +. +.TP .B (no)global_header Fa in modo che SPS e PPS appaiano solo una volta, all'inizio del flusso di bit (default: disabilitato). @@ -11074,6 +11642,64 @@ Tratta il contenuto video come se fosse interlacciato. . .TP +.B (no)constrained_intra +Abilita la previsione intra forzata (default: disabilitato). +Riduce significativamente la compressione ma è necessaria per lo strato di base +delle codifiche SVC. +. +.TP +.B (no)aud +Accesso in scrittura dei delimitatori di unità al flusso (default: +disabilitato). Attivalo solo se il formato del contenitore di destinazione +richiede l'accesso ai delimitatori di unità. +. +.TP +.B overscan= +Include le informazioni VUI overscan nel flusso (default: disabilitato). +Vedi doc/vui.txt nel codice sorgente di x264 per ulteriori informazioni. +. +.TP +.B videoformat= +Include le informazioni VUI del formato del video nel flusso (default: +disabilitato). +Si tratta di impostazioni puramente informative per descrivere la fonte +originale. +Vedi doc/vui.txt nel codice sorgente di x264 per ulteriori informazioni. +. +.TP +.B (no)fullrange +Include le informazioni VUI complete nel flusso (default: disabilitato). +Utilizzare questa opzione se il video sorgente non ha una portata limitata. +Vedi doc/vui.txt nel codice sorgente di x264 per ulteriori informazioni. +. +.TP +.B colorprim= +Include le informazioni sui colori primari (default: disabilitato). +Può essere usato per la correzione del colore. +Vedi doc/vui.txt nel codice sorgente di x264 per ulteriori informazioni. +. +.TP +.B transfer= +Include nel flusso le informazioni VUI sulle caratteristiche di trasferimento +(default: disabilitato). +Può essere usato per la correzione del colore. +Vedi doc/vui.txt nel codice sorgente di x264 per ulteriori informazioni. +. +.TP +.B colormatrix= +Include i coefficienti VUI matrix nel flusso (default: disabilitato). +Può essere usato per la correzione del colore. +Vedi doc/vui.txt nel codice sorgente di x264 per ulteriori informazioni. +. +.TP +.B chromaloc=<0-5> +Include nel flusso le informazioni VUI sulla posizione dei campioni di +crominanza (default: disabilitato). +Utilizzare questa opzione per garantire l'allineamento dei piani di crominanza e +luminanza dopo conversioni di spazio colore. +Vedi doc/vui.txt nel codice sorgente di x264 per ulteriori informazioni. +. +.TP .B log=<\-1\-3> Seleziona la quantità di informazioni di log stampate a video. .PD 0 @@ -11117,6 +11743,11 @@ aperta una nuova finestra, nella quale x264 tenterà di presentare una indicazione di come viene codificato ogni fotogramma. Ogni tipo di blocco sul filmato visualizzato sarà colorato come segue: +. +.TP +.B dump_yuv= +Salva i fotogrammi YUV nel file specificato. +Per scopi di debug. .PD 0 .RSs .IPs rosso/rosa @@ -11617,16 +12248,12 @@ .SS GUI: . .TP -.B CHARSET -FIXME: Da documentare. -. -.TP .B DISPLAY -FIXME: Da documentare. +Il nome del display al quale la GUI deve connettersi. . .TP .B HOME -FIXME: Da documentare. +La directory home dell'utente. . .SS libavformat: . @@ -11687,24 +12314,24 @@ file di configurazione della GUI . .TP +~/.mplayer/\:gui.history +directory della cronologia della GUI +. +.TP ~/.mplayer/\:gui.pl playlist della GUI . .TP +~/.mplayer/\:gui.url +elenco URL della GUI +. +.TP ~/.mplayer/\:font/ directory dei font (devono esserci un file font.desc e alcuni file con estensione .RAW.) . .TP ~/.mplayer/\:DVDkeys/ chiavi CSS salvate -. -.TP -Supponendo che venga riprodotto /percorso/\:del/\:filmato.avi, MPlayer cerca i -file sub (sottotitoli) in questo ordine: -.RS -/percorso/\:del/\:filmato.sub -.br -~/.mplayer/\:sub/\:filmato.sub .RE .PD 1 . @@ -11716,6 +12343,13 @@ .SH ESEMPI DELL'UTILIZZO DI MPLAYER . .PP +.B Riproduzione veloce di Blu\-ray: +.nf +mplayer br:////percordo/del/disco +mplayer br:// \-bluray\-device /percorso/del/disco +.fi +. +.PP .B Riproduzione veloce di DVD: .nf mplayer dvd://1 @@ -11834,7 +12468,7 @@ .PP .B inversione a scacchiera col filtro geq: .nf -mplayer \-vf geq='128+(p(X\,Y)\-128)*(0.5-gt(mod(X/SW\,128)\,64))*(0.5-gt(mod(Y/SH\,128)\,64))*4' +mplayer \-vf geq='128+(p(X\\,Y)\-128)*(0.5\-gt(mod(X/SW\\,128)\\,64))*(0.5\-gt(mod(Y/SH\\,128)\\,64))*4' .fi . . @@ -11902,7 +12536,7 @@ Molti errori sono il risultato di una configurazione errata oppure di parametri sbagliati. La sezione della documentazione riguardante il reporting dei bug -(http://www.mplayerhq.hu/\:DOCS/\:HTML/\:en/\:bugreports.html) +(http://www.mplayerhq.hu/\:DOCS/\:HTML/\:it/\:bugreports.html) spiega come creare dei 'bug report' utili. . . @@ -11919,15 +12553,16 @@ .PP Questa pagina di manuale (versione inglese) è stata scritta principalmente da Gabucino, Jonas Jermann e Diego Biurrun. -E' mantenuta da Diego Biurrun. +È mantenuta da Diego Biurrun. La traduzione iniziale in italiano è stata fatta da Daniele Forghieri, ed è -attualmente mantenuta da Daniele Forghieri con il grande aiuto di PaulTT. +attualmente mantenuta da Daniele Forghieri con il grande aiuto di PaulTT e il +contributo di skizzhg. Per sapere chi devi offendere per qualche traduzione errata controlla i log del CVS ;). .PP -Per favore spedisci qualsiasi messaggio riguardante questa documentazione -alla mailing list MPlayer-DOCS per quello che riguarda l'originale inglese ed -alla mailing list MPlayer-translations per tutto quello che riguarda le varie -versioni tradotte. +Puoi spedire qualsiasi messaggio riguardante questa documentazione alla mailing +list MPlayer-DOCS per quello che riguarda l'originale inglese ed alla mailing +list MPlayer-translations per tutto quello che riguarda le varie versioni +tradotte. .\" end of file diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/pl/mplayer.1 mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/pl/mplayer.1 --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/pl/mplayer.1 2011-06-07 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/pl/mplayer.1 2011-11-09 01:22:02.000000000 +0000 @@ -1870,10 +1870,6 @@ .PD 1 . .TP -.B "alsa5\ \ " -sterownik ALSA 0.5 -. -.TP .B "oss\ \ \ \ " sterownik OSS .PD 0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/ru/mplayer.1 mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/ru/mplayer.1 --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/ru/mplayer.1 2011-06-07 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/ru/mplayer.1 2011-11-09 01:22:02.000000000 +0000 @@ -2663,10 +2663,6 @@ .PD 1 . .TP -.B "alsa5\ \ " -Драйвер вывода звука ALSA 0.5 -. -.TP .B "oss\ \ \ \ " Драйвер вывода звука OSS .PD 0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/zh_CN/mplayer.1 mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/zh_CN/mplayer.1 --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/man/zh_CN/mplayer.1 2011-06-13 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/man/zh_CN/mplayer.1 2011-12-24 13:31:49.000000000 +0000 @@ -1,6 +1,6 @@ -.\" sync with en/mplayer.1 rev. 33564 +.\" sync with en/mplayer.1 rev. 34463 .\" This man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann -.\" translation by JRaSH, currently fixed up to (10016) +.\" translation by JRaSH . .\" -------------------------------------------------------------------------- .\" Macro definitions @@ -497,8 +497,10 @@ MEncoder 的配置文件是“mencoder.conf”,位于配置目录中\ (例如:/etc/\:mplayer 或者 /usr/\:local/\:etc/\:mplayer),\ 各个用户专用的配置文件是“~/\:.mplayer/\:mencoder.conf”。\ -各个用户专用的选项重定义系统范围选项的内容,\ -而命令行选项则重定义以上两者的内容。\ +各个用户专用的选项覆盖系统范围定义的选项(当使用 +.BR gmplayer +时,gui.conf 的选项覆盖各个用户专用的选项),而命令行中指定的\ +选项覆盖其它所有选项。\ 配置文件的语法是“选项=<参数值>”,\ 任何“#”后面的内容都认为是注释。\ 无需参数值既可使用的选项可把参数值设为“yes”或“1”或“true”,\ @@ -1659,13 +1661,13 @@ 了解使用该选项的详情。 . .TP -.B \-endpos <[[hh:]mm:]ss[.ms]|size[b|kb|mb]>(另见 \-ss 和 \-sb) +.B \-endpos <[[hh:]mm:]ss[.ms]|大小[b|kb|mb]>(另见 \-ss 和 \-sb) 停止在所给时间或字节数表示的位置。 .br .I 注意: 字节数表示的位置可能不精确,因为只能停在帧数据块的边界上。\ -当与 \-ss 选项组合使用时,\-endpos 的时间会向前平移 \-ss 指定\ -的秒数。 +当与 \-ss 选项组合使用时,如非以字节数指定位置,\-endpos 的时间\ +会向前平移 \-ss 所指定的秒数。 .sp 1 .I 示例: .PD 0 @@ -1676,7 +1678,9 @@ 停在 1 小时 10 分处。 .IPs "\-ss 10 \-endpos 56" 1 分 6 秒后停止。 -.IPs "\-endpos 100mb" +.IPs "mplayer \-endpos 100mb" +读取输入文件的 100MB 数据后停止播放。 +.IPs "mencoder \-endpos 100mb" 只编码 100 MB 的数据。 .RE .PD 1 @@ -3022,10 +3026,6 @@ .PD 1 . .TP -.B "alsa5\ \ " -ALSA 0.5 音频输出驱动 -. -.TP .B "oss\ \ \ \ " OSS 音频输出驱动 .PD 0 @@ -3598,8 +3598,9 @@ 不知道屏幕分辨率的情况。 . .TP -.B \-stop\-xscreensaver(仅用于 X11) -启动时关闭 xscreensaver,退出时再将其打开。\ +.B \-(no)stop\-xscreensaver(仅用于 X11) +启动时关闭 xscreensaver,并在退出时重新将其开启\ +(默认值:启用)。\ 如果屏保程序不支持 XSS 或 XResetScreenSaver 的 API,\ 请改用 \-heartbeat\-cmd 选项。 . @@ -4118,6 +4119,19 @@ 可使用 glxinfo 或类似的工具显示已支持的 OpenGL 扩展功能。 .PD 0 .RSs +.IPs backend= +选择要使用的后端/OpenGL的实现方式(默认值:-1)。 +.RSss +-1:自动选择 +.br +0:Win32/WGL +.br +1:X11/GLX +.br +2:SDL +.br +3:X11/EGL(高度处于实验阶段) +.RE .IPs (no)ati\-hack 当使用了 PBO 时(当使用了 \-dr 或强制使用 \-pbo 时),\ AIT 驱动可能输出损坏的图像。\ @@ -4230,39 +4244,45 @@ 选择用于亮度调整的调节函数。\ 仅对 yuv 模式 2、3、4 和 6 有效。 .RSss -0:使用简单线性过滤方式(默认值)。 -.br -1:使用双立方次 B 曲线过滤方式(质量更好)。\ +.IPs 0 +使用简单线性过滤方式(默认值)。 +.IPs 1 +使用双立方次 B 曲线过滤方式(质量更好)。\ 需要一个额外的纹理处理单元。\ 较老的显卡至少在全屏模式下无法在色度方面执行该模式。 -.br -2:在水平方向使用立方次过滤,在垂直方向使用线性过滤。\ +.IPs 2 +在水平方向使用立方次过滤,在垂直方向使用线性过滤。\ 比起方式 1 适用于更多的显卡。 -.br -3:与 1 相同,但将纹理用于查阅操作。\ +.IPs 3 +与 1 相同,但将纹理用于查阅操作。\ 可能在一些显卡上运行较快。 -.br -4:使用实验性的非锐化的蔽码,支持 3x3 模式并具有默认强化值 0.5。(参见 filter-strength) -.br -5:使用实验性的非锐化的蔽码,支持 5x5 模式并具有默认强化值 0.5。(参见 filter-strength) +.IPs 4 +使用实验性的非锐化的蔽码,支持 3x3 模式并具有默认强化值 0.5。(参见 filter-strength) +.IPs 2 +使用实验性的非锐化的蔽码,支持 5x5 模式并具有默认强化值 0.5。(参见 filter-strength) .RE .IPs cscale= 选择用于色度缩放的缩放函数。\ 详情参见 lscale。 .IPs filter-strength=<值> 设置支持强度设置的 lscale/cscale 过滤器的效果强度。 +.IPs noise-strength=<值> +设置添加多强的噪声信号。0 用于禁止添加信号(默认值),1.0 用于产生适用于\ +抖动降级为 6 比特精度的信号等级。 .IPs stereo=<值> 选择用于立体显示的方式。\ -可能需要使用 -aspect 以修正宽高比的数值。\ +可能需要使用 \-aspect 以修正宽高比的数值。\ +数值加 32 可以实现左右画面对换。 实验性的选项,勿对其期望太高。 .RSss -0:标准 2D 显示 -.br -1:左右分割的输入信号,产生全色彩的红蓝立体图像。 -.br -2:左右分割的输入信号,产生全色彩的红蓝立体图像。 -.br -3:左右分割的输入信号,产生四重缓冲的立体图像。\ +.IPs 0 +标准 2D 显示 +.IPs 1 +将画面并行排列的输入信号转换为全色彩的红蓝立体图像。 +.IPs 2 +将画面并行排列的输入信号转换为全色彩的红蓝立体图像。 +.IPs 3 +将画面并行排列的输入信号转换为四重缓冲的立体图像。\ 只有少数 OpenGL 显卡支持 .RE .RE @@ -4788,8 +4808,8 @@ 的 24 位 RGB 图像。 .PD 0 .RSs -.IPs <输出文件> -指定输出文件名(必须指定)。 +.IPs output=<输出文件> +指定输出文件名(默认值:out.mng)。 .REss .PD 1 .RS @@ -4798,7 +4818,7 @@ .RE .PD 0 .RSs -mplayer video.mkv \-vo mng:output.mng +mplayer video.mkv \-vo mng:output=test.mng .RE .PD 1 . @@ -5145,6 +5165,9 @@ .REss .IPs vstats 打印一些统计信息并将其保存至 ./vstats_*.log 中。 +.IPs wait_keyframe +显示任何内容前等待关键帧出现。\ +防止有些格式下开始播放或定位后帧画面损坏。 .RE . .TP @@ -6981,6 +7004,26 @@ FFmpeg 的解除隔行扫描过滤器,与 \-vf pp=fd 相同 . .TP +.B lavfi=filtergraph +包装 FFmpeg libavfilter 接口的过滤器。\ +\fIfiltergraph\fR 定义的是具有单个输入和单个输出的 libavfilter 流程图。\ +参见 http://www.ffmpeg.org/\:libavfilter.html#SEC4 以了解详细信息。 +.sp 1 +有一种特殊情况,如果 \fIfiltergraph\fR 为 \fB$\fIword\fR,那么将\ +使用环境变量 \fIword\fR 的值;当逗号出现在流程图的描述中时,\ +这是有必要的,因为 mplayer 使用这些符号作为过滤器之间的\ +分隔符。 +.sp 1 +.I 注意: +一般认为该过滤器只用于实验,因为其与其它过滤器交换\ +可能不正常。 +.sp 1 +.I 示例: +.br +overlay="movie=$small_video, scale=160:120 [ca]; [in] [ca] overlay=16:8" +mplayer -vf lavfi='$overlay' $big_video +. +.TP .B kerndeint[=阈值[:映射[:次序[:锐化[:双向]]]]] Donald Graft 的自适应的内核级解除隔行扫描过滤器。\ 当超过配置中的阈值时,解除视频中的隔行扫描部分。 @@ -7837,6 +7880,14 @@ .RS 由左而右交换左右眼图像地排列(右眼图像在左,左眼图像在右) .RE +.B sbs2l 或 side_by_side_half_width_left_first +.RS +平行排列,分辨率方面宽度减半(左眼图像在左,右眼图像在右) +.RE +.B sbs2r 或 side_by_side_half_width_right_first +.RS +平行排列,分辨率方面宽度减半(右眼图像在左,左眼图像在右) +.RE .B abl 或 above_below_left_first .RS 由上而下排列(左眼图像在上,右眼图像在下) @@ -7905,6 +7956,14 @@ 黄/蓝立体彩色图像(黄色图层通过左眼图像,蓝色图层\ 通过右眼图像) .RE +.B irl 或 interleave_rows_left_first +.RS +像素行交错排列(左眼图像占据最高一行,右眼图像从其下一行开始) +.RE +.B irr 或 interleave_rows_right_first +.RS +像素行交错排列(右眼图像占据最高一行,左眼图像从其下一行开始) +.RE .B ml 或 mono_left .RS 单眼图像输出(只输出左眼图像) @@ -7914,6 +7973,13 @@ 单眼图像输出(只输出右眼图像) .RE .RE +.I 注意: +无论使用哪一种像素行交错排列的输出格式\ +在行交错的 3D 显示终端上显示全屏画面,\ +都需在视频未具有正确的高度时使用“scale”\ +过滤器将其缩放至准确的高度。典型的情况是,\ +高度为 1080 行(所以要使用诸如“-vf scale=1440:1080,stereo3d=sbsl:irl”\ +以处理 720p 平行排列方式编码的影片)。 .RE .PD 1 . @@ -10740,7 +10806,7 @@ b_bias 值越高产生的 B 帧越多(默认值:0)。 . .TP -.B (no)b_pyramid +.B b_pyramid= 允许 B 帧作用预测其它帧的参照帧。\ 例如,考虑 3 个连续的 B 帧:IO B1 B2 B3 P4。\ 不用这个选项的话,B 帧的样式与 MPEG-[124] 中的一样。\ @@ -10755,6 +10821,17 @@ 并且可能不能总是起作用。\ 要求 bframes >= 2。\ 缺点:将解码延迟量增加至 2 帧。 +.PD 0 +.RSs +.IPs normal +允许 B 帧以如上所述的方式作为引用帧使用(与蓝光标准不兼容)。 +.IPs strict +不允许 P 帧引用 B 帧。压缩率下降,但要与蓝光标准兼容时\ +必须使用。 +.IPs "none\ " +禁止使用 B 帧作为引用帧。 +.RE +.PD 1 . .TP .B (no)deblock @@ -12156,7 +12233,7 @@ MPlayer 为 (C) 2000\-2011 MPlayer 团队所有 .PP 本(英文)手册主要由 Gabucino、Jonas Jermann 和 Diego Biurrun 编写,\ -由 Diego Biurrun 维护。中文版由 JRaSH 翻译。\ +由 Diego Biurrun 维护。中文版由 JRaSH 翻译。\ 有关本手册的事宜,请发送邮件至 MPlayer-DOCS 邮件列表。\ 与翻译相关的邮件归属于 MPlayer-translations 邮件列表。 .\" end of file diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/crosscompile.txt mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/crosscompile.txt --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/crosscompile.txt 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/crosscompile.txt 2011-10-17 10:47:28.000000000 +0000 @@ -0,0 +1,52 @@ +Due to a lack of Windows developers, it is a good idea to allow Linux +developers to do at least some basic check of their code. +This HOWTO explains how to set up cross-compilation. + + +MinGW under Debian +================== + +First, you need to install the "mingw32" package and get a MPlayer SVN +checkout. + +Next, you need quite a lot of dependencies. Since this is for testing and +not actually use, the easiest way is to use this package: +http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2 +NOTE that this is likely to be quite out-dated and might include packages +with security issues, so do not use it to build binaries for real use. + +After extracting this package into the MPlayer source-tree, +you only need to run the included linux-mingw.sh to configure (it just runs +./configure --host-cc=cc --target=i686-mingw32msvc --cc=i586-mingw32msvc-cc +--windres=i586-mingw32msvc-windres --ranlib=i586-mingw32msvc-ranlib +--extra-cflags="-I$PWD/osdep/mingw32" +--extra-ldflags="-L$PWD/osdep/mingw32" +--with-freetype-config="$PWD/osdep/mingw32/ftconf") and then run make. + +You should be able to run the generated binary with Wine, if you want to. + +The steps as command-lines: + +sudo apt-get install mingw32 +svn co svn://svn.mplayerhq.hu/mplayer/trunk MPlayer-mingw +cd MPlayer-mingw +wget http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2 +tar -xjf mpl_mingw32.tar.bz2 +sh linux-mingw.sh +make + + +Wine +==== + +First, you need to install the "Wine" package and get a MPlayer SVN +checkout. + +You don't need any dependencies other than those you already have for +your Linux build, because the Wine and Linux build will use them together. + +Configure with + + ./configure --target=i686-wine --cc="winegcc -m32" --windres=wrc --enable-gui + +and add any options you normally use for your Linux build, then run make. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/Doxyfile mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/Doxyfile --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/Doxyfile 2011-05-05 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/Doxyfile 2011-09-07 15:46:58.000000000 +0000 @@ -248,7 +248,7 @@ # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. -DISTRIBUTE_GROUP_DOC = NO +DISTRIBUTE_GROUP_DOC = YES # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/MAINTAINERS mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/MAINTAINERS --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/MAINTAINERS 2011-01-30 13:57:30.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/MAINTAINERS 2011-11-09 01:22:02.000000000 +0000 @@ -201,7 +201,6 @@ * w32_common.c - Reimar Döffinger libao2 drivers: - * ao_alsa5.c - None * ao_alsa.c - Clemens Ladisch * ao_arts.c - None * ao_coreaudio.c - None diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/mingw-crosscompile.txt mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/mingw-crosscompile.txt --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/mingw-crosscompile.txt 2011-01-07 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/mingw-crosscompile.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -Due to a lack of Windows developers, it is a good idea to allow Linux -developers to do at least some basic check of their code. -This HOWTO explains how to set up MinGW cross-compilation under Debian. - -First, you need to install the "mingw32" package and get a MPlayer SVN -checkout. - -Next, you need quite a lot of dependencies. Since this is for testing and -not actually use, the easiest way is to use this package: -http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2 -NOTE that this is likely to be quite out-dated and might include packages -with security issues, so do not use it to build binaries for real use. - -After extracting this package into the MPlayer source-tree, -you only need to run the included linux-mingw.sh to configure (it just runs -./configure --host-cc=cc --target=i686-mingw32msvc --cc=i586-mingw32msvc-cc ---windres=i586-mingw32msvc-windres --ranlib=i586-mingw32msvc-ranlib ---extra-cflags="-I$PWD/osdep/mingw32" ---extra-ldflags="-L$PWD/osdep/mingw32" ---with-freetype-config="$PWD/osdep/mingw32/ftconf") and then run make. - -You should be able to run the generated binary with Wine, if you want to. - -The steps as command-lines: - -sudo apt-get install mingw32 -svn co svn://svn.mplayerhq.hu/mplayer/trunk MPlayer-mingw -cd MPlayer-mingw -wget http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2 -tar -xjf mpl_mingw32.tar.bz2 -sh linux-mingw.sh -make diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/release-howto.txt mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/release-howto.txt --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/release-howto.txt 2010-10-28 15:40:21.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/release-howto.txt 2011-11-07 19:54:38.000000000 +0000 @@ -18,8 +18,7 @@ - check out FFmpeg subdirs - remove obsolete DOCS translations, help files -- build the HTML docs from XML sources, then clean up: - make html-chunked; make releaseclean +- build the HTML docs from XML sources, then clean up release the tree: cd .. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/slave.txt mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/slave.txt --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/slave.txt 2010-12-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/slave.txt 2011-12-31 12:20:08.000000000 +0000 @@ -181,6 +181,10 @@ get_video_resolution Print out the video resolution of the current file. +gui + Send GUI skin message . (See the skin documentation on GUI + messages for details.) + screenshot Take a screenshot. Requires the screenshot filter to be loaded. 0 Take a single screenshot. @@ -526,6 +530,7 @@ stream_end pos 0 X end pos in stream stream_length pos 0 X (end - start) stream_time_pos time 0 X present position in stream (in seconds) +titles int X number of titles chapter int 0 X X X select chapter chapters int X number of chapters angle int 0 X X X select angle diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/translations.txt mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/translations.txt --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/tech/translations.txt 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/tech/translations.txt 2011-11-07 19:54:40.000000000 +0000 @@ -135,4 +135,11 @@ ~~~~~~~~~~~~~~~~~~ If you make changes to the XML documentation, doublecheck that the -documentation still builds by running 'make' in the DOCS/xml/ subdirectory. +documentation still builds by running 'make doc'. + +Place XML files in a new subdirectory named after the language code you are +translating for. main.xml is autogenerated, do not translate it. + +In each translated file after the tag place a note like +, where XXX is the revision of corresponding +English file (see comment at the top of file). diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/configure mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/configure --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/configure 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/configure 1970-01-01 00:00:00.000000000 +0000 @@ -1,184 +0,0 @@ -#!/bin/sh - -# Script to check for catalogs, stylesheets, XSL processors and all -# the other stuff necessary to convert the XML documentation. - -echo "Searching for XML catalogs..." -for try_catalog in \ - /etc/sgml/catalog \ - /usr/share/xml/docbook/*/catalog.xml \ - /opt/local/share/xml/docbook-xml/*/catalog.xml \ - /opt/local/share/xml/docbook/*/catalog.xml \ - /usr/share/sgml/docbook/*/*catalog \ - /usr/share/apps/ksgmltools2/customization/en/catalog \ - /usr/share/sgml/catalog \ - /usr/local/share/sgml/catalog \ - /usr/lib/sgml/catalog \ - /usr/local/lib/sgml/catalog \ - /usr/share/docbook-xml42/catalog.xml \ - /usr/share/sgml/docbook/xmlcatalog -do - if test -f "$try_catalog"; then - catalog=$try_catalog - break - fi -done - -if test -n "$catalog"; then - echo "Found SGML catalog at $catalog" - catalog_opts=--catalogs -else - echo "No SGML catalog found." -fi - - - -echo "Searching for stylesheets..." -echo "Searching for html/chunk.xsl..." -for try_chunk_xsl in \ - /usr/share/xml/docbook/*/html/chunk.xsl \ - /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \ - /usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl \ - /usr/local/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \ - /usr/local/share/sgml/docbook/yelp/docbook/html/chunk.xsl \ - /usr/share/docbook-xsl/html/chunk.xsl \ - /usr/share/sgml/docbook/xsl-stylesheets*/html/chunk.xsl \ - /usr/share/xml/docbook/stylesheet/nwalsh/current/html/chunk.xsl \ - /opt/local/share/xsl/docbook-xsl/html/chunk.xsl \ - -do - if test -f "$try_chunk_xsl"; then - chunk_xsl=$try_chunk_xsl - break - fi -done - -if test -z "$chunk_xsl"; then - chunk_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl - echo "Not found. Using default ($chunk_xsl)" - fake_chunk_xsl=yes -else - echo "Found chunk.xsl at $chunk_xsl" -fi - -echo "Searching for html/docbook.xsl..." -for try_docbook_xsl in \ - /usr/share/xml/docbook/*/html/docbook.xsl \ - /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \ - /usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl \ - /usr/local/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \ - /usr/local/share/sgml/docbook/yelp/docbook/html/docbook.xsl \ - /usr/share/docbook-xsl/html/docbook.xsl \ - /usr/share/sgml/docbook/xsl-stylesheets*/html/docbook.xsl \ - /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl \ - /opt/local/share/xsl/docbook-xsl/html/docbook.xsl \ - -do - if test -f "$try_docbook_xsl"; then - docbook_xsl=$try_docbook_xsl - break - fi -done - -if test -z "$docbook_xsl"; then - docbook_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl - echo "Not found. Using default ($docbook_xsl)" -else - echo "Found docbook.xsl at $docbook_xsl" -fi - -cat > html-chunk.xsl << EOF - - - - - - - - -EOF - - -cat > html-single.xsl << EOF - - - - - - - - -EOF - -echo "Searching for DTD..." -#FIXME: This should prefer higher version numbers, not the other way around .. -for try_dtd in \ - /usr/share/xml/docbook/*/dtd/4*/docbookx.dtd \ - /usr/share/xml/docbook/*/docbookx.dtd \ - /usr/share/sgml/docbook/*/docbookx.dtd \ - /usr/share/sgml/docbook/dtd/*/docbookx.dtd \ - /usr/share/sgml/docbook/dtd/xml/*/docbookx.dtd \ - /usr/share/docbook-xml*/docbookx.dtd \ - /opt/local/share/xml/docbook*/*/docbookx.dtd \ - /usr/share/apps/ksgmltools2/docbook/*/docbookx.dtd -do - if test -f "$try_dtd"; then - dtd=$try_dtd - break - fi -done - -if test -z "$dtd"; then - dtd=/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd - echo "Not found. Using default ($dtd)." -else - echo "Found docbookx.dtd at $dtd" -fi - -for lang in `grep 'DOC_LANGS =' ../../config.mak|cut -d= -f2`; do - cat > $lang/main.xml << EOF - - -' >> $lang/main.xml - done - - cat >> $lang/main.xml << EOF -]> - -&documentation.xml; - -EOF - -done - -echo "Looking for a valid XSLT processor..." -if xsltproc --version > /dev/null 2>&1; then - if test -z "$fake_chunk_xsl"; then - echo "Found xsltproc. If it works, it's probably the best choice." - xsltcommand="xsltproc $catalog_opts -o \$\$1 \$\$2 \$\$3" - else - echo "Found xsltproc but no stylesheets on your system." - echo "xsltproc is unusable without stylesheets." - fi -fi - - -cat > xml.mak << EOF -CATALOG = $catalog -XMLLINT_COMMAND = xmllint --noout --noent --postvalid $catalog_opts \$* -XSLT_COMMAND = $xsltcommand -EOF diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/cs/documentation.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/cs/documentation.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/cs/documentation.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/cs/documentation.xml 2011-11-07 19:54:29.000000000 +0000 @@ -164,21 +164,9 @@ - MPlayer a MEncoder mohou být distribuovány za podmínek stanovených v GNU General Public License Version 2. - -&install.xml; - -&usage.xml; -&video.xml; -&ports.xml; -&mencoder.xml; -&encoding-guide.xml; -&faq.xml; -&bugreports.xml; -&skin.xml; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/cs/encoding-guide.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/cs/encoding-guide.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/cs/encoding-guide.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/cs/encoding-guide.xml 2011-07-23 19:33:08.000000000 +0000 @@ -4189,19 +4189,19 @@ Velmi vysoká kvalita - + 6 0 Vysoká kvalita - + 13 -0.89 Rychlé enkódování - + 17 -1.48 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/cs/skin.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/cs/skin.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/cs/skin.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/cs/skin.xml 2011-12-08 17:11:52.000000000 +0000 @@ -837,39 +837,32 @@ -Ovládání přehrávání: - evNext + evNone - Skočí na následující stopu v playlistu. + Prázdná zpráva, nemá žádný efekt (možná s výjimkou Subversion verzí :-)). +Ovládání přehrávání: - evPause + evPlay - Tvoří přepínač společně s evPlaySwitchToPause. Ty mohou - být použity k vytvoření tradičního play/pauza tlačítka. Obě zprávy by měly - být přiřazeny tlačítkům umístěným na stejné pozici v okně. Tato zpráva - pozastaví přehrávání a zobrazen bude obrázek pro - evPlaySwitchToPause talčítko (pro indikaci, že tlačítko - může být stisknuto pro obnovení přehrávání). + Zahájí přehrávání. - evPlay + evStop - Zahájí přehrávání. + Zastaví přehrávání. + - evPlaySwitchToPause + evPause - Protiklad evPauseSwitchToPlay. Tato zpráva zahájí přehrávání - a zobrazí obrázek pro tlačítko evPauseSwitchToPlay - (pro indikaci, že tlačítko může být stisknuto pro pozastavení přehrávání). @@ -881,253 +874,236 @@ - evStop + evNext - Zastaví přehrávání. + Skočí na následující stopu v playlistu. - - -Převíjení: - evBackward10sec + evLoad - Převine zpět o 10 sekund. + Otevře soubor (otevřením okna prohlížeče souborů, kde si soubor vyberete). - evBackward1min + evLoadPlay - Převine zpět o 1 minutu. + Stejné jako evLoad, ale navíc se okamžitě spustí přehrávání + otevřeného souboru. - evBackward10min + evLoadAudioFile - Převine zpět o 10 minut. + Otevře soubor se zvukem (pomocí prohlížeče souborů) - evForward10sec + evLoadSubtitle - Převine vpřed o 10 sekund. + Otevře soubor s titulky (pomocí prohlížeče souborů) - evForward1min + evDropSubtitle - Převine vpřed o 1 minutu. + Vypne aktuálně použité titulky. - evForward10min + evPlaylist - Převine vpřed o 10 minut. + Otevře/zavře okno playlistu. - evSetMoviePosition + evPlayVCD - Převine na danou pozici (může být přiřazeno potenciometru; použije se - relativní hodnota (0-100%) potenciometru). + Zkusí otevřít disk v zadané CD-ROM mechanice. - - -Ovládání videa: - evHalfSize - - Nastaví velikost okna filmu na poloviční velikost. - - - - evDoubleSize - - Nastaví velikost okna filmu na dvojnásobnou velikost. - - - - evFullScreen + evPlayDVD - Přepíná do celoobrazovkového režimu a zpět. + Zkusí otevřít disk v zadané DVD-ROM mechanice. + - evNormalSize + evLoadURL - Nastaví velikost okna na normální velikost. + Zobrazí dialogové okno pro volbu URL. - - -Ovládání zvuku: - evDecAudioBufDelay + evPlaySwitchToPause - Sníží zpoždění vyrovnávací paměti zvuku. + Protiklad evPauseSwitchToPlay. Tato zpráva zahájí přehrávání + a zobrazí obrázek pro tlačítko evPauseSwitchToPlay + (pro indikaci, že tlačítko může být stisknuto pro pozastavení přehrávání). - evDecBalance + evPauseSwitchToPlay - Sníží hodnotu stereováhy. + Tvoří přepínač společně s evPlaySwitchToPause. Ty mohou + být použity k vytvoření tradičního play/pauza tlačítka. Obě zprávy by měly + být přiřazeny tlačítkům umístěným na stejné pozici v okně. Tato zpráva + pozastaví přehrávání a zobrazen bude obrázek pro + evPlaySwitchToPause talčítko (pro indikaci, že tlačítko + může být stisknuto pro obnovení přehrávání). + +Převíjení: - evDecVolume + evBackward10sec - Sníží hlasitost. + Převine zpět o 10 sekund. - evIncAudioBufDelay + evBackward1min - Zvýší zpoždění vyrovnávací paměti zvuku. + Převine zpět o 1 minutu. - evIncBalance + evBackward10min - Zvýší hodnotu stereováhy. + Převine zpět o 10 minut. - evIncVolume + evForward10sec - Zvýší hlasitost. + Převine vpřed o 10 sekund. - evMute + evForward1min - Vypne/zapne zvuk. + Převine vpřed o 1 minutu. - evSetBalance + evForward10min - Nastaví stereováhu (může být sdruženo s potenciometrem; použije se - relativní hodnota potenciometru (0-100%)). + Převine vpřed o 10 minut. - evSetVolume + evSetMoviePosition - Nastaví hlasitost (může být sdruženo s potenciometrem; použije se - relativní hodnota potenciometru (0-100%)). + Převine na danou pozici (může být přiřazeno potenciometru; použije se + relativní hodnota (0-100%) potenciometru). -Různé: +Ovládání videa: - evAbout + evHalfSize - Otevře okno o aplikaci. + Nastaví velikost okna filmu na poloviční velikost. - - evDropSubtitle + evDoubleSize - Vypne aktuálně použité titulky. + Nastaví velikost okna filmu na dvojnásobnou velikost. - - evEqualizer + evFullScreen - Zapne/vypne ekvalizér. + Přepíná do celoobrazovkového režimu a zpět. - - evExit + evNormalSize - Ukončí program. + Nastaví velikost okna na normální velikost. - - evIconify - - Minimalizuje okno. - - - - - evLoad + evSetAspect - Otevře soubor (otevřením okna prohlížeče souborů, kde si soubor vyberete). + + +Ovládání zvuku: - evLoadPlay + evDecVolume - Stejné jako evLoad, ale navíc se okamžitě spustí přehrávání - otevřeného souboru. + Sníží hlasitost. - evLoadSubtitle + evIncVolume - Otevře soubor s titulky (pomocí prohlížeče souborů) + Zvýší hlasitost. - evLoadAudioFile + evSetVolume - Otevře soubor se zvukem (pomocí prohlížeče souborů) + Nastaví hlasitost (může být sdruženo s potenciometrem; použije se + relativní hodnota potenciometru (0-100%)). - evNone + evMute - Prázdná zpráva, nemá žádný efekt (možná s výjimkou Subversion verzí :-)). + Vypne/zapne zvuk. - evPlaylist + evSetBalance - Otevře/zavře okno playlistu. + Nastaví stereováhu (může být sdruženo s potenciometrem; použije se + relativní hodnota potenciometru (0-100%)). - evPlayDVD + evEqualizer - Zkusí otevřít disk v zadané DVD-ROM mechanice. + Zapne/vypne ekvalizér. + + +Různé: - evPlayVCD + evAbout - Zkusí otevřít disk v zadané CD-ROM mechanice. + Otevře okno o aplikaci. @@ -1139,23 +1115,23 @@ - evSetAspect + evSkinBrowser - Nastaví poměr stran zobrazovaného obrázku. + Otevře okno voliče skinů. - evSetURL + evIconify - Zobrazí dialogové okno pro volbu URL. + Minimalizuje okno. - evSkinBrowser + evExit - Otevře okno voliče skinů. + Ukončí program. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/de/documentation.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/de/documentation.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/de/documentation.xml 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/de/documentation.xml 2011-11-07 19:54:33.000000000 +0000 @@ -21,203 +21,196 @@ 2010 MPlayer-Team - - License - 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. - - - - - - Wie diese Dokumentation gelesen werden soll - - - Wenn du zum ersten Mal installierst: Lies in jedem Fall alles von hier bis zum - Ende des Installationsabschnitts, und folge den Links, die du findest. Wenn Fragen - bleiben, gehe zurück zum Inhaltsverzeichnis und suche nach - dem Thema, lies die oder versuche, die Dateien zu greppen. - Die meisten Fragen sollten irgendwo hier beantwortet werden, und nach dem Rest wurde - vermutlich auf den - Mailing-Listen gefragt. - - - - - - - Einführung - - - MPlayer ist ein Movie-Player für Linux (der auch auf vielen - anderen Unices und nicht-x86-Architekturen läuft, siehe - ). Er spielt die meisten Dateien in den Formaten MPEG, VOB, AVI, - OGG/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM, RoQ, PVA, - Matroska-Dateien, unterstützt von vielen eingebauten, XAnim-, RealPlayer und Win32-DLL-Codecs. - Es können auch VideoCDs, SVCDs, DVDs, 3ivx-, RealMedia-, Sorenson-, Theora- - und MPEG-4 (DivX) - Filme angeschaut werden. - - Ein weiteres großes Feature von MPlayer ist die Fülle an - unterstützten Ausgabetreibern. Er funktioniert mit X11, Xv, DGA, OpenGL, SVGAlib, - fb-dev, AAlib, libcaca und DirectFB, du kannst ihn aber auch mit GGI und SDL (und damit - allen von SDL unterstützen Treibern), sowie mit einigen kartenspezifischen Low-Level-Treibern - (für Matrox, 3Dfx und Radeon, Mach64, Permedia3) benutzen! Die meisten von ihnen unterstützen - Software- oder Hardwareskalierung, so dass die Vollbildwiedergabe kein Problem ist. - MPlayer unterstützt die Wiedergabe mittels einiger - Hardware-MPEG-Decoderkarten wie der DVB, DXR2 und DXR3/Hollywood+ benutzen. - Und was ist mit diesen schönen, großen, kantengeglätteten und schattierten Untertiteln - (14 unterstützte Typen) mit Europäischen/ISO 8859-1,2 - (Ungarisch, Englisch, Tschechisch usw.), Kryllisch und Koreanische Schriftarten, und - On-Screen-Display (OSD)? - - - - Der Player ist superstabil bei der Wiedergabe von beschädigten MPEG-Dateien (nützlich - für manche VCDs) und spielt schlechte AVI-Dateien ab, die mit dem berühmten - Windows Media Player nicht abgespielt werden können. Selbst AVI-Dateien ohne Index-Abschnitt - sind abspielbar, und du kannst den Index mit der Option - temporär neu generieren, oder permanent mit MEncoder, - was Spulen ermöglicht! Wie du siehst, sind Stabilität und Qualität die - wichtigsten Dinge, die Geschwindigkeit ist jedoch auch erstaunlich. Es gibt - außerdem ein mächtiges Filtersystem für die Manipulation von Video und Ton. - - - - MEncoder (MPlayers Movie - Encoder) ist ein einfacher Film-Encoder, der so ausgelegt ist, von - MPlayer-abspielbaren Formaten - (AVI/ASF/OGG/DVD/VCD/VOB/MPG/MOV/VIV/FLI/RM/NUV/NET/PVA) - in andere MPlayer-abspielbare Formate (siehe unten) - zu encodieren. Er kann mit verschiedenen Codecs encodieren, zum Beispiel - MPEG-4 (DivX4) (ein oder zwei Durchläufe), - libavcodec, und - PCM/MP3/VBR MP3-Audio. - - - - - <application>MEncoder</application> Features - - - Encodierung zu der weitreichenden Menge Dateiformate und Decoder von - MPlayer - - - - - Encodierung zu allen Codecs von FFmpegs - libavcodec - - - - - Videoencodierung von V4L-kompatiblen TV-Empfängern - - - - - Encodierung/Multiplexing von interleaved AVI-Dateien mit ordentlichem Index - - - - - Erstellung von Dateien aus externen Audiostreams - - - - - Encodierung in 1, 2 oder 3 Durchläufen - - - - - VBR-MP3-Audio - - VBR-MP3-Audio wird von Windows-Playern nicht immer sauber wiedergegeben! - - - - - - PCM-Audio - - - - - Streamkopien - - - - - Input-A/V-Synchronisation (PTS-basiert, kann mit der Option - deaktiviert werden) - - - - - fps-Korrektur mit der Option (nützlich bei Encodierung von - 30000/1001 fps VOB zu 24000/1001 fps AVI) - - - - - Benutzung unseres sehr mächtigen Filtersystems (abschneiden, expandieren, spiegeln, - nachbearbeiten, rotieren, skalieren, rgb/yuv-Konvertierung) - - - - - Kann DVD/VOBsub- UND Textuntertitel in die - Ausgabedatei encodieren - - - - - Kann DVD-Untertitel in das VOBsub-Format rippen - - - - - - Geplante Features - - - Noch breiteres Feld an verfügbaren En-/Decodierungsformaten/-codecs - (erstellen von VOB-Dateien mit DivX4/Indeo5/VIVO-Streams :). - - - - - - - MPlayer und MEncoder können - weitergegeben werden unter den Bedingungen der GNU General Public License Version 2. - - - - -&install.xml; - -&usage.xml; -&video.xml; -&ports.xml; -&mencoder.xml; -&encoding-guide.xml; -&faq.xml; -&bugreports.xml; -&skin.xml; + + License + + 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. + + + + + + + Wie diese Dokumentation gelesen werden soll + + + Wenn du zum ersten Mal installierst: Lies in jedem Fall alles von hier bis zum + Ende des Installationsabschnitts, und folge den Links, die du findest. Wenn Fragen + bleiben, gehe zurück zum Inhaltsverzeichnis und suche nach + dem Thema, lies die oder versuche, die Dateien zu greppen. + Die meisten Fragen sollten irgendwo hier beantwortet werden, und nach dem Rest wurde + vermutlich auf den + Mailing-Listen gefragt. + + + + + + + Einführung + + + MPlayer ist ein Movie-Player für Linux (der auch auf vielen + anderen Unices und nicht-x86-Architekturen läuft, siehe + ). Er spielt die meisten Dateien in den Formaten MPEG, VOB, AVI, + OGG/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM, RoQ, PVA, + Matroska-Dateien, unterstützt von vielen eingebauten, XAnim-, RealPlayer und Win32-DLL-Codecs. + Es können auch VideoCDs, SVCDs, DVDs, 3ivx-, RealMedia-, Sorenson-, Theora- + und MPEG-4 (DivX) - Filme angeschaut werden. + + Ein weiteres großes Feature von MPlayer ist die Fülle an + unterstützten Ausgabetreibern. Er funktioniert mit X11, Xv, DGA, OpenGL, SVGAlib, + fb-dev, AAlib, libcaca und DirectFB, du kannst ihn aber auch mit GGI und SDL (und damit + allen von SDL unterstützen Treibern), sowie mit einigen kartenspezifischen Low-Level-Treibern + (für Matrox, 3Dfx und Radeon, Mach64, Permedia3) benutzen! Die meisten von ihnen unterstützen + Software- oder Hardwareskalierung, so dass die Vollbildwiedergabe kein Problem ist. + MPlayer unterstützt die Wiedergabe mittels einiger + Hardware-MPEG-Decoderkarten wie der DVB, DXR2 und DXR3/Hollywood+ benutzen. + Und was ist mit diesen schönen, großen, kantengeglätteten und schattierten Untertiteln + (14 unterstützte Typen) mit Europäischen/ISO 8859-1,2 + (Ungarisch, Englisch, Tschechisch usw.), Kryllisch und Koreanische Schriftarten, und + On-Screen-Display (OSD)? + + + + Der Player ist superstabil bei der Wiedergabe von beschädigten MPEG-Dateien (nützlich + für manche VCDs) und spielt schlechte AVI-Dateien ab, die mit dem berühmten + Windows Media Player nicht abgespielt werden können. Selbst AVI-Dateien ohne Index-Abschnitt + sind abspielbar, und du kannst den Index mit der Option + temporär neu generieren, oder permanent mit MEncoder, + was Spulen ermöglicht! Wie du siehst, sind Stabilität und Qualität die + wichtigsten Dinge, die Geschwindigkeit ist jedoch auch erstaunlich. Es gibt + außerdem ein mächtiges Filtersystem für die Manipulation von Video und Ton. + + + + MEncoder (MPlayers Movie + Encoder) ist ein einfacher Film-Encoder, der so ausgelegt ist, von + MPlayer-abspielbaren Formaten + (AVI/ASF/OGG/DVD/VCD/VOB/MPG/MOV/VIV/FLI/RM/NUV/NET/PVA) + in andere MPlayer-abspielbare Formate (siehe unten) + zu encodieren. Er kann mit verschiedenen Codecs encodieren, zum Beispiel + MPEG-4 (DivX4) (ein oder zwei Durchläufe), + libavcodec, und + PCM/MP3/VBR MP3-Audio. + + + + <application>MEncoder</application> Features + + + Encodierung zu der weitreichenden Menge Dateiformate und Decoder von + MPlayer + + + + + Encodierung zu allen Codecs von FFmpegs + libavcodec + + + + + Videoencodierung von V4L-kompatiblen TV-Empfängern + + + + + Encodierung/Multiplexing von interleaved AVI-Dateien mit ordentlichem Index + + + + + Erstellung von Dateien aus externen Audiostreams + + + + + Encodierung in 1, 2 oder 3 Durchläufen + + + + + VBR-MP3-Audio + + VBR-MP3-Audio wird von Windows-Playern nicht immer sauber wiedergegeben! + + + + + + PCM-Audio + + + + + Streamkopien + + + + + Input-A/V-Synchronisation (PTS-basiert, kann mit der Option + deaktiviert werden) + + + + + fps-Korrektur mit der Option (nützlich bei Encodierung von + 30000/1001 fps VOB zu 24000/1001 fps AVI) + + + + + Benutzung unseres sehr mächtigen Filtersystems (abschneiden, expandieren, spiegeln, + nachbearbeiten, rotieren, skalieren, rgb/yuv-Konvertierung) + + + + + Kann DVD/VOBsub- UND Textuntertitel in die + Ausgabedatei encodieren + + + + + Kann DVD-Untertitel in das VOBsub-Format rippen + + + + + + Geplante Features + + + Noch breiteres Feld an verfügbaren En-/Decodierungsformaten/-codecs + (erstellen von VOB-Dateien mit DivX4/Indeo5/VIVO-Streams :). + + + + + + MPlayer und MEncoder können + weitergegeben werden unter den Bedingungen der GNU General Public License Version 2. + + + diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/de/encoding-guide.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/de/encoding-guide.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/de/encoding-guide.xml 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/de/encoding-guide.xml 2011-07-23 19:33:08.000000000 +0000 @@ -4578,19 +4578,19 @@ Sehr hohe Qualität - + 6fps 0dB Hohe Qualität - + 13fps -0.89dB Schnell - + 17fps -1.48dB diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/de/install.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/de/install.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/de/install.xml 2011-01-03 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/de/install.xml 2011-06-24 12:35:20.000000000 +0000 @@ -235,18 +235,21 @@ - Da MPlayer kein Skin enthält, musst du eins - herunterladen, um die GUI benutzen zu können. Siehe + Da MPlayer kein Skin mitbringt, musst du zumindest eines + herunterladen, um die GUI benutzen zu können. Siehe dazu Skins auf der Download-Seite. - Sie sollten in das normale systemweite Verzeichnis - ($PREFIX/share/mplayer/skins) oder nach - $HOME/.mplayer/skins installiert werden. - MPlayer schaut nach Voreinstellung in diesen Verzeichnissen - nach einem Verzeichnis mit dem Namen default, - du kannst aber die Option - oder die Konfigurationsdateianweisung - skin=newskin nutzen, um ein Skin im Verzeichnis - */skins/newskin zu benutzen. + Ein Skin sollte in das normale systemweite Verzeichnis + $PREFIX/share/mplayer/skins oder in das + benutzerspezifische $HOME/.mplayer/skins + installiert werden und liegt dann dort als Unterverzeichnis. + MPlayer sucht standardmäßig zuerst in dem + benutzerspezifischen und dann in dem systemweiten Verzeichnis nach einem + Unterverzeichnis mit dem Namen default + (das einfach ein Link auf das Lieblingsskin sein kann), um das Skin zu laden. + Du kannst aber auch die Option + oder die Konfigurationsdateianweisung skin=meinskin benutzen, + um ein anderes Skin aus den skins-Verzeichnissen + zu verwenden. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/de/skin.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/de/skin.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/de/skin.xml 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/de/skin.xml 2011-12-31 12:38:52.000000000 +0000 @@ -129,7 +129,7 @@ - Im Unterfenster erscheint der Film. + Im Unterfenster erscheint das Video. Es kann eine festgelegte Grafik anzeigen, wenn kein Film geladen ist (es ist ziemlich langweilig, ein leeres Fenster vor sich zu haben :-)) Beachte: Transparenz ist hier @@ -614,35 +614,35 @@ $1 - Abspieldauer im hh:mm:ss-Format + bisherige Laufzeit im hh:mm:ss-Format $2 - Abspieldauer im mmmm:ss-Format + bisherige Laufzeit im mmmm:ss-Format $3 - Abspieldauer im hh-Format (Stunden) + bisherige Laufzeit im hh-Format (Stunden) $4 - Abspieldauer im mm-Format (Minuten) + bisherige Laufzeit im mm-Format (Minuten) $5 - Abspieldauer im ss-Format (Sekunden) + bisherige Laufzeit im ss-Format (Sekunden) $6 - Filmlänge im hh:mm:ss-Format + Gesamtlaufzeit im hh:mm:ss-Format $7 - Filmlänge im mmmm:ss-Format + Gesamtlaufzeit im mmmm:ss-Format $8 - Abspieldauer im h:mm:ss-Format + bisherige Laufzeit im h:mm:ss-Format $v @@ -673,7 +673,7 @@ $t - Track-Nummer (in der Playliste) + Track-Nummer (DVD, VCD, CD oder Wiedergabeliste) $o @@ -691,7 +691,7 @@ $T Buchstabe entsprechend dem Streamtyp (Datei: f, - Video-CD: v, DVD: d, URL: u) + CD: a, Video-CD: v, DVD: d, URL: u) @@ -714,11 +714,11 @@ $x - Filmbreite + Videobreite $y - Filmhöhe + Videohöhe $C @@ -870,7 +870,7 @@ Zeichens (hier mit char bezeichnet) innerhalb der Grafik fest (0,0 steht für die obere linke Ecke). width und height sind die Maße des - Zeichens in Pixel. Das Zeichen kann in UTF-8-Kodierung angegeben werden. + Zeichens in Pixel. Das Zeichen char wird in UTF-8-Kodierung angegeben. @@ -907,13 +907,14 @@ BuchstabeSymbol - lPlay + pPlay sStop ePause nKein Sound mMono-Sound tStereo-Sound fStream ist eine Datei + aStream ist eine CD vStream ist eine Video-CD dStream ist eine DVD uStream ist eine URL @@ -931,28 +932,16 @@ - Playback-Kontrolle: - evNext + evNone - Springe zum nächsten Track in der Playliste. + + Inhaltslose Nachricht, die nichts bewirkt. + - - evPause - - Formt einen Schalter zusammen mit evPlaySwitchToPause. - Sie können dazu benutzt werden, einen gebräuchlichen Play/Pause-Button - zu bekommen. Beide Nachrichten sollten den Buttons zugewiesen werden, die - an genau derselben Position innerhalb des Fensters dargestellt werden. - Diese Nachricht pausiert das Abspielen und die Grafik für den - evPlaySwitchToPause-Button wird gezeigt - (um anzudeuten, dass der Button zum Fortsetzen des Abspielens gedrückt - werden kann). - - - + Playback-Kontrolle: evPlay @@ -965,15 +954,17 @@ - evPlaySwitchToPause + evStop - - Das Gegenteil von evPauseSwitchToPlay. Diese Nachricht - startet das Abspielen und die Grafik für den - evPauseSwitchToPlay-Button wird angezeigt - (um anzudeuten, dass der Button zum Pausieren des Abspielvorgangs gedrückt - werden kann). - + Stoppe das Abspielen. + + + + + + evPause + + Halte das Abspielen an. @@ -987,192 +978,192 @@ - evStop + evNext - Stoppe das Abspielen. + Springe zum nächsten Track in der Playliste. - - - Springen: - evBackward10sec + evLoad - Springe 10 Sekunden rückwärts. + Lade eine Datei (durch Öffnen des Datei-Browser-Fensters, + in dem du die Datei wählen kannst). - evBackward1min + evLoadPlay - Springe 1 Minute rückwärts. + Macht dasselbe wie evLoad, es startet jedoch + das Abspielen nach dem Laden der Datei automatisch. - evBackward10min - - Springe 10 Minuten rückwärts. - - - - - evForward10sec + evLoadAudioFile - Springe 10 Sekunden vorwärts. + Lädt eine Audio-Datei (mit dem Dateiwähler) - evForward1min + evLoadSubtitle - Springe 1 Minute vorwärts. + Lädt eine Untertiteldatei (mit dem Dateiwähler) - evForward10min + evDropSubtitle - Springe 10 Minuten vorwärts. + Deaktiviert den aktuell verwendeten Untertitel. - evSetMoviePosition + evPlaylist - Springe zu Position (kann von einem Potentiometer genutzt werden; - mit dem relativen Wert (0-100%) des Potentiometers). + Öffne/schließe das Playlisten-Fenster. - - - Video-Kontrolle: - evHalfSize + evPlayCD - Setze das Filmfenster auf halbe Größe. + Versucht die CD im angegebenen CD-ROM-Laufwerk zu öffnen. + - evDoubleSize + evPlayVCD - Setze das Filmfenster auf doppelte Größe. + Versucht die VCD im angegebenen CD-ROM-Laufwerk zu öffnen. + - evFullScreen + evPlayDVD - Schalte Vollbildmodus an/aus. + Versucht die DVD im angegebenen DVD-ROM-Laufwerk zu öffnen. + - evNormalSize + evLoadURL - Setze das Filmfenster auf normale Größe. + Zeigt das URL-Dialog-Fenster. - - - Audio-Kontrolle: - evDecAudioBufDelay + evPlaySwitchToPause - Verringere die Verzögerung des Audiopuffers. + Das Gegenteil von evPauseSwitchToPlay. Diese Nachricht + startet das Abspielen und die Grafik für den + evPauseSwitchToPlay-Button wird angezeigt + (um anzudeuten, dass der Button zum Pausieren des Abspielvorgangs gedrückt + werden kann). - evDecBalance + evPauseSwitchToPlay - Verringere die Balance. + Formt einen Schalter zusammen mit evPlaySwitchToPause. + Sie können dazu benutzt werden, einen gebräuchlichen Play/Pause-Button + zu bekommen. Beide Nachrichten sollten den Buttons zugewiesen werden, die + an genau derselben Position innerhalb des Fensters dargestellt werden. + Diese Nachricht pausiert das Abspielen und die Grafik für den + evPlaySwitchToPause-Button wird gezeigt + (um anzudeuten, dass der Button zum Fortsetzen des Abspielens gedrückt + werden kann). + + Springen: - evDecVolume - - Verringere die Lautstärke. - - - - - evIncAudioBufDelay + evBackward10sec - Erhöhe die Verzögerung des Audiopuffers. + Springe 10 Sekunden rückwärts. - evIncBalance + evBackward1min - Erhöhe die Balance. + Springe 1 Minute rückwärts. - evIncVolume + evBackward10min + + Springe 10 Minuten rückwärts. + + + + + evForward10sec - Erhöhe die Lautstärke. + Springe 10 Sekunden vorwärts. - evMute + evForward1min - Schalte den Ton an/aus. + Springe 1 Minute vorwärts. - evSetBalance + evForward10min - Setze die Balance (kann von einem Potentiometer genutzt werden; - mit dem relativen Wert (0-100%) des Potentiometers). + Springe 10 Minuten vorwärts. - evSetVolume + evSetMoviePosition - Setze die Lautstärke(kann von einem Potentiometer genutzt werden; + Springe zu Position (kann von einem Potentiometer genutzt werden; mit dem relativen Wert (0-100%) des Potentiometers). @@ -1180,122 +1171,113 @@ - Verschiedenes: + Video-Kontrolle: - evAbout + evHalfSize - Öffne das About-Fenster. + Setze das Videofenster auf halbe Größe. - - evDropSubtitle + evDoubleSize - Deaktiviert den aktuell verwendeten Untertitel. + Setze das Videofenster auf doppelte Größe. - - evEqualizer + evFullScreen - Schaltet den Equalizer an/aus. + Schalte Vollbildmodus an/aus. - - evExit + evNormalSize - Schließe das Programm. + Setze das Videofenster auf normale Größe. - - evIconify - - - Minimiere das Fenster zu einem Symbol. - - - - - - evLoad + evSetAspect - Lade eine Datei (durch Öffnen des Datei-Browser-Fensters, - in dem du die Datei wählen kannst). + Setze das Videofenster auf das Originalverhältnis. + + + Audio-Kontrolle: - evLoadPlay - - - Macht dasselbe wie evLoad, es startet jedoch - das Abspielen nach dem Laden der Datei automatisch. - - + evDecVolume + + Verringere die Lautstärke. + - evLoadSubtitle + evIncVolume - Lädt eine Untertiteldatei (mit dem Dateiwähler) + Erhöhe die Lautstärke. - evLoadAudioFile + evSetVolume - Lädt eine Audio-Datei (mit dem Dateiwähler) + Setze die Lautstärke(kann von einem Potentiometer genutzt werden; + mit dem relativen Wert (0-100%) des Potentiometers). - evNone + evMute - Inhaltslose Nachricht, die nichts bewirkt. + Schalte den Ton an/aus. - evPlaylist + evSetBalance - Öffne/schließe das Playlisten-Fenster. + Setze die Balance (kann von einem Potentiometer genutzt werden; + mit dem relativen Wert (0-100%) des Potentiometers). - evPlayDVD + evEqualizer - Versucht die DVD im angegebenen DVD-ROM-Laufwerk zu öffnen. + Schaltet den Equalizer an/aus. + + + Verschiedenes: - evPlayVCD + evAbout - Versucht die VCD im angegebenen CD-ROM-Laufwerk zu öffnen. + Öffne das About-Fenster. @@ -1310,28 +1292,28 @@ - evSetAspect + evSkinBrowser - Setzt das angezeigte Grafikseitenverhältnis. + Öffne das Skin-Browser-Fenster. - evSetURL + evIconify - Zeigt das URL-Dialog-Fenster. + Minimiere das Fenster zu einem Symbol. - evSkinBrowser + evExit - Öffne das Skin-Browser-Fenster. + Schließe das Programm. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/bugreports.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/bugreports.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/bugreports.xml 2011-02-05 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/bugreports.xml 2011-11-16 09:54:29.000000000 +0000 @@ -1,5 +1,5 @@ - + How to report bugs @@ -209,7 +209,7 @@ -If you prefer, you can use our brand-new +If you prefer, you can use our Bugzilla instead. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/documentation.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/documentation.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/documentation.xml 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/documentation.xml 2011-11-07 19:54:29.000000000 +0000 @@ -1,5 +1,5 @@ - + <application>MPlayer</application> - The Movie Player @@ -155,21 +155,9 @@ - MPlayer and MEncoder can be distributed under the terms of the GNU General Public License Version 2. - -&install.xml; - -&usage.xml; -&video.xml; -&ports.xml; -&mencoder.xml; -&encoding-guide.xml; -&faq.xml; -&bugreports.xml; -&skin.xml; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/encoding-guide.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/encoding-guide.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/encoding-guide.xml 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/encoding-guide.xml 2011-07-23 19:33:08.000000000 +0000 @@ -1,5 +1,5 @@ - + Encoding with <application>MEncoder</application> @@ -4332,19 +4332,19 @@ Very high quality - + 6fps 0dB High quality - + 13fps -0.89dB Fast - + 17fps -1.48dB diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/faq.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/faq.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/faq.xml 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/faq.xml 2011-11-07 19:54:45.000000000 +0000 @@ -1,5 +1,5 @@ - + Frequently Asked Questions @@ -152,53 +152,6 @@ /usr/include/X11 symlinks exist. - - - -Building on Mac OS 10.3 leads to several link errors. - - - -The link error you're experiencing most likely looks like this: - -ld: Undefined symbols: -_LLCStyleInfoCheckForOpenTypeTables referenced from QuartzCore expected to be defined in ApplicationServices -_LLCStyleInfoGetUserRunFeatures referenced from QuartzCore expected to be defined in ApplicationServices - -This problem is the result of Apple developers using 10.4 to compile -their software and distributing the binaries to 10.3 users via -Software Update. -The undefined symbols are present in Mac OS 10.4, -but not 10.3. -One solution can be to downgrade to QuickTime 7.0.1. -Here is a better solution. - - -Get an -older copy of the frameworks. -This will give you a compressed file that contains the QuickTime -7.0.1 Framework and a 10.3.9 QuartzCore Framework. - - -Uncompress the files somewhere that is not in your System folder. -(i.e. do not install these frameworks into your -/System/Library/Frameworks! -Using this older copy is only meant to get around link errors!) -gunzip < CompatFrameworks.tgz | tar xvf - -In config.mak, you should append --F/path/to/where/you/extracted -to the OPTFLAGS variable. -If you use X-Code, you can just select these -frameworks instead of the system ones. - - -The resulting MPlayer binary will actually -use the framework that is installed on your system via dynamic links that -are resolved at run-time. -(You can verify this using otool -l). - - - diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/install.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/install.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/install.xml 2011-01-03 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/install.xml 2011-06-24 12:35:20.000000000 +0000 @@ -1,5 +1,5 @@ - + Installation @@ -194,17 +194,20 @@ As MPlayer doesn't have a skin included, you -have to download one if you want to use the GUI. See the download page. -It should be extracted to the usual system-wide directory ($PREFIX/share/mplayer/skins), or to $HOME/.mplayer/skins. -MPlayer by default looks in these directories -for a directory named default, but -you can use the -option, or the skin=newskin config file directive to use -the skin in the */skins/newskin -directory. +A skin should be extracted to the usual system-wide directory $PREFIX/share/mplayer/skins or to the user +specific directory $HOME/.mplayer/skins +and resides as a subdirectory there. +MPlayer by default first looks in the user specific +directory, then the system-wide directory for a subdirectory named +default (which +simply can be a link to your favourite skin) to load the skin, but +you can use the +option, or the skin=myskin config file directive to use +a different skin from the skins +directories. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/skin.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/skin.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/en/skin.xml 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/en/skin.xml 2011-12-31 12:38:52.000000000 +0000 @@ -1,5 +1,5 @@ - + <application>MPlayer</application> skin format @@ -73,7 +73,7 @@ - The subwindow is where the movie appears. It + The subwindow is where the video appears. It can display a specified image if there is no movie loaded (it is quite boring to have an empty window :-)) Note: transparency is not allowed here. @@ -502,35 +502,35 @@ $1 - play time in hh:mm:ss format + elapsed time in hh:mm:ss format $2 - play time in mmmm:ss format + elapsed time in mmmm:ss format $3 - play time in hh format (hours) + elapsed time in hh format (hours) $4 - play time in mm format (minutes) + elapsed time in mm format (minutes) $5 - play time in ss format (seconds) + elapsed time in ss format (seconds) $6 - movie length in hh:mm:ss format + running time in hh:mm:ss format $7 - movie length in mmmm:ss format + running time in mmmm:ss format $8 - play time in h:mm:ss format + elapsed time in h:mm:ss format $v @@ -559,7 +559,7 @@ $t - track number (in playlist) + track number (DVD, VCD, CD or playlist) $o @@ -577,7 +577,7 @@ $T a character according to the stream type (file: f, - Video CD: v, DVD: d, + CD: a, Video CD: v, DVD: d, URL: u) @@ -595,11 +595,11 @@ $x - movie width + video width $y - movie height + video height $C @@ -737,8 +737,8 @@ Here X and Y specify the position of the char character in the image (0,0 is the upper left corner). width and height are -the dimensions of the character in pixels. The character may be in UTF-8 -encoding. +the dimensions of the character in pixels. The character char +shall be in UTF-8 encoding. @@ -777,13 +777,14 @@ CharacterSymbol - lplay + pplay sstop epause nno sound mmono sound tstereo sound fstream is a file + astream is a CD vstream is a Video CD dstream is a DVD ustream is a URL @@ -806,39 +807,33 @@ -Playback control: - evNext + evNone - Jump to next track in the playlist. + Empty message, it has no effect. +Playback control: - evPause + evPlay - Forms a switch together with evPlaySwitchToPause. They can - be used to have a common play/pause button. Both messages should be assigned - to buttons displayed at the very same position in the window. This message - pauses playing and the image for the evPlaySwitchToPause - button is displayed (to indicate that the button can be pressed to continue - playing). + Start playing. - evPlay + evStop - Start playing. + Stop playing. + - evPlaySwitchToPause + evPause - The opposite of evPauseSwitchToPlay. This message starts - playing and the image for the evPauseSwitchToPlay button - is displayed (to indicate that the button can be pressed to pause playing). + Pause playing. @@ -850,253 +845,244 @@ - evStop + evNext - Stop playing. + Jump to next track in the playlist. - - -Seeking: - evBackward10sec + evLoad - Seek backward 10 seconds. + Load a file (by opening a file browser window, where you can choose a file). - evBackward1min + evLoadPlay - Seek backward 1 minute. + Does the same as evLoad, but it automatically starts + playing after the file is loaded. - evBackward10min + evLoadAudioFile - Seek backward 10 minutes. + Loads an audio file (with the file selector). - evForward10sec + evLoadSubtitle - Seek forward 10 seconds. + Loads a subtitle file (with the file selector). - evForward1min + evDropSubtitle - Seek forward 1 minute. + Disables the currently used subtitle. - evForward10min + evPlaylist - Seek forward 10 minutes. + Open/close the playlist window. - evSetMoviePosition + evPlayCD - Seek to position (can be used by a potmeter; the - relative value (0-100%) of the potmeter is used). + Tries to open the disc in the given CD-ROM drive. - - -Video control: - - evHalfSize - - Set the movie window to half size. - - - evDoubleSize + evPlayVCD - Set the movie window to double size. + Tries to open the disc in the given CD-ROM drive. + - evFullScreen + evPlayDVD - Switch fullscreen mode on/off. + Tries to open the disc in the given DVD-ROM drive. + - evNormalSize + evLoadURL - Set the movie window to its normal size. + Displays the URL dialog window. - - -Audio control: - evDecAudioBufDelay + evPlaySwitchToPause - Decrease audio buffer delay. + The opposite of evPauseSwitchToPlay. This message starts + playing and the image for the evPauseSwitchToPlay button + is displayed (to indicate that the button can be pressed to pause playing). - evDecBalance + evPauseSwitchToPlay - Decrease balance. + Forms a switch together with evPlaySwitchToPause. They can + be used to have a common play/pause button. Both messages should be assigned + to buttons displayed at the very same position in the window. This message + pauses playing and the image for the evPlaySwitchToPause + button is displayed (to indicate that the button can be pressed to continue + playing). + +Seeking: - evDecVolume + evBackward10sec - Decrease volume. + Seek backward 10 seconds. - evIncAudioBufDelay + evBackward1min - Increase audio buffer delay. + Seek backward 1 minute. - evIncBalance + evBackward10min - Increase balance. + Seek backward 10 minutes. - evIncVolume + evForward10sec - Increase volume. + Seek forward 10 seconds. - evMute + evForward1min - Mute/unmute the sound. + Seek forward 1 minute. - evSetBalance + evForward10min - Set balance (can be used by a potmeter; the - relative value (0-100%) of the potmeter is used). + Seek forward 10 minutes. - evSetVolume + evSetMoviePosition - Set volume (can be used by a potmeter; the relative - value (0-100%) of the potmeter is used). + Seek to position (can be used by a potmeter; the + relative value (0-100%) of the potmeter is used). -Miscellaneous: - - evAbout - - Open the about window. - - - +Video control: - evDropSubtitle + evHalfSize - Disables the currently used subtitle. + Set the video window to half size. - - evEqualizer + evDoubleSize - Turn the equalizer on/off. + Set the video window to double size. - - evExit + evFullScreen - Quit the program. + Switch fullscreen mode on/off. - - evIconify + evNormalSize - Iconify the window. + Set the video window to its normal size. - - evLoad + evSetAspect - Load a file (by opening a file browser window, where you can choose a file). + Set the video window to its original aspect ratio. + + +Audio control: - evLoadPlay + evDecVolume - Does the same as evLoad, but it automatically starts - playing after the file is loaded. + Decrease volume. - evLoadSubtitle + evIncVolume - Loads a subtitle file (with the file selector). + Increase volume. - evLoadAudioFile + evSetVolume - Loads an audio file (with the file selector). + Set volume (can be used by a potmeter; the relative + value (0-100%) of the potmeter is used). - evNone + evMute - Empty message, it has no effect. + Mute/unmute the sound. - evPlaylist + evSetBalance - Open/close the playlist window. + Set balance (can be used by a potmeter; the + relative value (0-100%) of the potmeter is used). - evPlayDVD + evEqualizer - Tries to open the disc in the given DVD-ROM drive. + Turn the equalizer on/off. + + +Miscellaneous: - evPlayVCD + evAbout - Tries to open the disc in the given CD-ROM drive. + Open the about window. @@ -1108,23 +1094,23 @@ - evSetAspect + evSkinBrowser - Sets displayed image aspect. + Open the skin browser window. - evSetURL + evIconify - Displays the URL dialog window. + Iconify the window. - evSkinBrowser + evExit - Open the skin browser window. + Quit the program. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/es/documentation.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/es/documentation.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/es/documentation.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/es/documentation.xml 2011-11-07 19:54:29.000000000 +0000 @@ -172,7 +172,6 @@ - MPlayer y MEncoder pueden ser distribuidos bajo los términos de la Licencia GNU General Public @@ -180,12 +179,3 @@ - -&install.xml; -&usage.xml; -&video.xml; -&ports.xml; -&mencoder.xml; -&faq.xml; -&bugreports.xml; -&skin.xml; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/es/encoding-guide.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/es/encoding-guide.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/es/encoding-guide.xml 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/es/encoding-guide.xml 2011-11-07 13:13:20.000000000 +0000 @@ -1,5552 +1,752 @@ - + -Encoding with <application>MEncoder</application> +Codificando con <application>MEncoder</application> -Making a high quality MPEG-4 ("DivX") - rip of a DVD movie +Haciendo un MPEG4 ("DivX") de alta calidad al ripear una película en DVD -One frequently asked question is "How do I make the highest quality rip -for a given size?". Another question is "How do I make the highest -quality DVD rip possible? I do not care about file size, I just want the best -quality." - - - -The latter question is perhaps at least somewhat wrongly posed. After all, if -you do not care about file size, why not simply copy the entire MPEG-2 video -stream from the the DVD? Sure, your AVI will end up being 5GB, give -or take, but if you want the best quality and do not care about size, -this is certainly your best option. - - - -In fact, the reason you want to transcode a DVD into MPEG-4 is -specifically because you do care about -file size. + Ripear un título de DVD en un archivo MPEG4 (DivX) de alta calidad + involucra algunas consideraciones. Más abajo encontrará un ejemplo + del proceso cuando el objetivo no es conseguir un tamaño determinado + para el archivo (sino quizá ajustar el resultado en 2GB). + libavcodec será usado para el + video, y el audio será copiado como esté sin cambios. + +Recortando -It is difficult to offer a cookbook recipe on how to create a very high -quality DVD rip. There are several factors to consider, and you should -understand these details or else you are likely to end up disappointed -with your results. Below we will investigate some of these issues, and -then have a look at an example. We assume you are using -libavcodec to encode the video, -although the theory applies to other codecs as well. + Reproduzca el DVD y ejecute el filtro de detección de recorte + () en él. Esto le dará un rectángulo de + recorte para usar en la codificación. La razón para el recorte es que muchas + películas no están en las relaciones de aspecto estándar (16/9 o 4/3), o, + por cualquier razón, la imagen no se ajusta bien dentro del marco de imagen. + Además querrá recortar las bandas negras durante el ripeo. También mejora la + calidad de la imagen porque el filo de las bandas negras consume un montón + de bits. Un aspecto común es 2.35, el que se llama cinemascope. La mayoría + de las películas de blockbuster tienen esta razón de aspecto. + + + + +Nivel de calidad + + A continuación debe elegir el nivel de calidad deseado. Cuando no necesite + ajustar el tamaño resultante en un CD o en lo que sea, usar una cuantización + constante, AKA calidad constante es una buena elección. De este modo cada + marco de imagen toma tantos bits como necesite para mantener el nivel de + calidad deseado, pero sin necesitar múltiples pasadas en la codificación. + Con + libavcodec, obtendrá una calidad + constante usando + . + debe darle un archivo por debajo de los 2GB + de tamaño, dependiendo principalmente de la duración de la película y del + ruido en el video (a más ruido, más difícil de comprimir será). + + + +Archivos más grandes de 2GB + + Si el archivo resultante codificado con calidad constante es más grande + de 2GB, deberá crear un índice para poder luego verlos correctamente. + Puede + + + + reproducir el archivo con para crear un + índice sobre la marcha o bien + + + usar para escribir un índice a un archivo + una sola vez y luego para usarlo cuando + reproduzca el archivo. + + + + Si esto le incomoda, quizá quiera mantener el tamaño por debajo de los 2GB. + + + + Hay tres maneras de evitar esto. Puede intentar codificar de nuevo + usando y ver si tiene el tamaño de + archivo y la calidad de imagen aceptables. También peude usar + codificación en 2 pasadas. + Como va a copiar la pista de audio como está y conoce por eso + su tasa de bits, y además sabe la duración de la película, puede + calcular la tasa de bits de video requerida para dar a la opción + + sin usar + codificación en 3 pasadas. + + + + La tercera y posiblemente la mejor opción puede ser rebajar ligeramente + la resolución. El rebajado suaviza ligeramente y la pérdida de detalle + es visualmente menos dañina que el ver bloques y otros artifactos + causados por la compresión MPEG. Escalar a un tamaño menor también reduce + de manera efectiva el ruido en la imagen, lo que es aún mejor, ya que + el ruido es más dificil de comprimir. + + + +Desentrelazado + + Si la película está entrelazada, puede que quiera desentrelazarla como + parte del ripeo. Es debatible si debe desentrelazarse en esta etaba. El + beneficio es que al desentrelazar mientras convierte a MPEG4 ocasiona + una mejor compresión, y luego es más fácil de ver con menos CPU en + monitores de ordenador ya que no es necesario el desentrelazado en + ese momento. + + + + Desentrelazar durante la etapa de ripeo es una buena idea dependiendo + del DVD. Si el DVD está hecho desde una película, y tiene 24 fps, + puede desentrelazar durante el ripeo. Si, sin embargo, el original + es un video a 50/60 fps, convertirlo en un video desentrelazado + a 23.976/25 fps puede perder información. Si decide desentrelazar, puede + experimentar con distintos filtros de desentrelazado después. Vea + http://www.wieser-web.de/MPlayer/ + para ejemplos. Un buen punto de partida es . + + + + Si está haciendo las dos cosas, recortando y desentrelazando, desentrelace + antes de recortar. Actualmente, no es necesario + si el desplazamiento de recorte es vertical y múltiplo de 2 pixels. Sin + embargo con algunos otros filtros, como dering, deberá siempre hacer el recorte + lo último, es un buen hábito poner el filtro de recortado el último. + + + +Inversión de telecine + + Si está ripeando un DVD PAL, con 25 fps, no necesita pensar en + los fps. Use directamente 25 fps. Los DVDs NTSC por otro lado están + a 29.97 fps (a menudo rondan los 30 fps, pero no tiene por qué). + Si la película fue grabada desde TV, no necesita de nuevo tocar + los fps. Pero si la película fue grabada desde una película, y por + lo tanto a (exactamente) 24 fps, debe ser convertida a 29.97 fps + cuando haga el DVD. Esta conversión donde se añaden 12 campos a + cada 24 marcos de imagen de la película se llama telecine. Para más + información acerca de telecine, vea una + + búsqueda en Google de "telecine field 23.976". + + + + En caso de que tenga un DVD telecine, puede que quiera hacer inversión + del telecine, lo que significa convertir la película a 23.976 fps + (29.97*4/5). De otro modo las panorámicas de cámara irán a trompicones + y muy mal. Puede usar para ello. Cualquier + cosas que esté en películas y necesite telecine inverso, no se + mostrará en TV. + + + +Escalado y razón de aspecto + + Para mejor calidad, no escale la película durante el ripeo. El + escalado a tamaño menor obviamente pierde detalle, y el escalado + a mayor tamaño causa artefactos y hace el archivo mayor en tamaño. Los + pixels en las películas DVD no son cuadrados, por eso las películas + en DVD incluyen información acerca de la razón de aspecto correcta. Es + posible almacenar la razón de aspecto en la cabecera del archivo + de salida MPEG4. La mayoría de los reproductores de video ignoran + esta información pero MPlayer la usará. + Si solo va a usar MPlayer para ver el + archivo ripeado, no necesitará escalar la película, solo pase + a + MEncoder y las cosas funcionarán + bien automágicamente. Si debe escalar la película, tenga + cuidado con el tamaño dado especialmente si está recortándola. + + +Sumando todo esto -If this seems to be too much for you, you should probably use one of the -many fine frontends that are listed in the -MEncoder section -of our related projects page. -That way, you should be able to achieve high quality rips without too much -thinking, because most of those tools are designed to take clever decisions -for you. - - - + Con todo lo mencionado más arriba en mente, se puede usar una órden + de codificación como la siguiente - -Preparing to encode: Identifying source material and framerate - - -Before you even think about encoding a movie, you need to take -several preliminary steps. - + +mencoder dvd://1 -aid 128 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vqscale=3:vhq:v4mv:trell:autoaspect \ + -ofps 23.976 -vf crop=720:364:0:56 -o Harry_Potter_2.avi + - -The first and most important step before you encode should be -determining what type of content you are dealing with. -If your source material comes from DVD or broadcast/cable/satellite -TV, it will be stored in one of two formats: NTSC for North -America and Japan, PAL for Europe, etc. -It is important to realize, however, that this is just the formatting for -presentation on a television, and often does -not correspond to the -original format of the movie. -Experience shows that NTSC material is a lot more difficult to encode, -because there more elements to identify in the source. -In order to produce a suitable encode, you need to know the original -format. -Failure to take this into account will result in various flaws in your -encode, including ugly combing (interlacing) artifacts and duplicated -or even lost frames. -Besides being ugly, the artifacts also harm coding efficiency: -You will get worse quality per unit bitrate. + Aquí indica el título de DVD a ripear. + La opción indica el uso de la pista 128, + y para copiarla como está. Puede usar + MPlayer para encontrar los valores + correctos para las opciones. - - -Identifying source framerate - -Here is a list of common types of source material, where you are -likely to find them, and their properties: + Las opciones para + mejoran la calidad frente a la tasa de bits, pero + hacen que la codificacion dure más. Especialmente + ralentiza la codificación pero incrementa la calidad visiblemente. Si quiere + desentrelazar, añada un filtro a , + por ejemplo (en ese orden). + Si no necesita invertir el telecine, quite . + - - - Standard Film: Produced for - theatrical display at 24fps. - - - PAL video: Recorded with a PAL - video camera at 50 fields per second. - A field consists of just the odd- or even-numbered lines of a - frame. - Television was designed to refresh these in alternation as a - cheap form of analog compression. - The human eye supposedly compensates for this, but once you - understand interlacing you will learn to see it on TV too and - never enjoy TV again. - Two fields do not make a - complete frame, because they are captured 1/50 of a second apart - in time, and thus they do not line up unless there is no motion. - - - NTSC Video: Recorded with an - NTSC video camera at 60000/1001 fields per second, or 60 fields per - second in the pre-color era. - Otherwise similar to PAL. - - - Animation: Usually drawn at - 24fps, but also comes in mixed-framerate varieties. - - - Computer Graphics (CG): Can be - any framerate, but some are more common than others; 24 and - 30 frames per second are typical for NTSC, and 25fps is typical - for PAL. - - - Old Film: Various lower - framerates. - - - - + - -Identifying source material + +Cómo tratar con telecine y entrelazado con DVDs NTSC + +Introducción -Movies consisting of frames are referred to as progressive, -while those consisting of independent fields are called -either interlaced or video - though this latter term is -ambiguous. - + Le sugiero que visite esta página si no entiende mucho lo que está + escrito en este documento: + http://www.divx.com/support/guides/guide.php?gid=10 + Esta URL enlaza a una descripción de lo que es telecine inteligible y + razonablemente comprensible. + -To further complicate matters, some movies will be a mix of -several of the above. + Por razones técnicas pertinentes a las limitaciones de reciente + hardware de televisión, todos los videos que están pensados para ser + reproducidos en una televisión NTSC deben tener 59.94 campos por segundo. + Las películas hechas-para-TV y los espectáculos son grabados + directamente a 24 o 23.976 marcos por segundo. Cuando una película + para cine DVD es masterizada, el video es entonces convertido para la + televisión usando un proceso llamado telecine. -The most important distinction to make between all of these -formats is that some are frame-based, while others are -field-based. -Whenever a movie is prepared -for display on television (including DVD), it is converted to a -field-based format. -The various methods by which this can be done are collectively -referred to as "telecine", of which the infamous NTSC -"3:2 pulldown" is one variety. -Unless the original material was also field-based (and the same -fieldrate), you are getting the movie in a format other than the -original. + En un DVD, el video nunca se almacena como 59.94 campos por segundo. + Para video que es originalmente a 59.94, cada par de campos es + combinado para formar un marco de imagen, resultando en 29.97 marcos + por segundo. Los reproductores de DVD por hardware entonces leen un + indicador embebido en el flujo de video para determinar si son las + líneas pares o las impares las que deben formar el primer campo. - -There are several common types of pulldown: - - PAL 2:2 pulldown: The nicest of - them all. - Each frame is shown for the duration of two fields, by extracting the - even and odd lines and showing them in alternation. - If the original material is 24fps, this process speeds up the - movie by 4%. - - - PAL 2:2:2:2:2:2:2:2:2:2:2:3 pulldown: - Every 12th frame is shown for the duration of three fields, instead of - just two. - This avoids the 4% speedup issue, but makes the process much - more difficult to reverse. - It is usually seen in musical productions where adjusting the - speed by 4% would seriously damage the musical score. - - - NTSC 3:2 telecine: Frames are - shown alternately for the duration of 3 fields or 2 fields. - This gives a fieldrate 2.5 times the original framerate. - The result is also slowed down very slightly from 60 fields per - second to 60000/1001 fields per second to maintain NTSC fieldrate. - - - NTSC 2:2 pulldown: Used for - showing 30fps material on NTSC. - Nice, just like 2:2 PAL pulldown. - - - -There are also methods for converting between NTSC and PAL video, -but such topics are beyond the scope of this guide. -If you encounter such a movie and want to encode it, your best -bet is to find a copy in the original format. -Conversion between these two formats is highly destructive and -cannot be reversed cleanly, so your encode will greatly suffer -if it is made from a converted source. + Normalmente, 23.976 marcos de imagen por segundo se mantienen así + cuando son codificados en un DVD, y el reproductor de DVD debe + realizar el telecine sobre la marcha. Algunas veces, sin embargo, + el video es pasado por el proceso de telecine antes + de ser almacenado en el DVD; incluso aunque tenga originalmente + 23.976 marcos de imagen por segundo, se hace que tenga 59.94 campos + por segundo, y es almacenado en disco como 29.97 marcos de imagen + por segundo. -When video is stored on DVD, consecutive pairs of fields are -grouped as a frame, even though they are not intended to be shown -at the same moment in time. -The MPEG-2 standard used on DVD and digital TV provides a -way both to encode the original progressive frames and to store -the number of fields for which a frame should be shown in the -header of that frame. -If this method has been used, the movie will often be described -as "soft-telecined", since the process only directs the -DVD player to apply pulldown to the movie rather than altering -the movie itself. -This case is highly preferable since it can easily be reversed -(actually ignored) by the encoder, and since it preserves maximal -quality. -However, many DVD and broadcast production studios do not use -proper encoding techniques but instead produce movies with -"hard telecine", where fields are actually duplicated in the -encoded MPEG-2. + Cuando se observan como marcos individuales formados por 59.94 campos + por segundo de video, telecine o viceversa, el entrelazado es claramente + visible en cuanto hay movimiento, porque un campo (digamos, las líneas + numeradas pares) representa un momento en el tiempo 1/59.94 de un + segundo después de otro. Al reproducir video entrelazado en un + ordenador se ve mal porque el monitor tiene una resolución mayor + y porque el video es mostrado marco-tras-marco en lugar de + campo-tras-campo. -The procedures for dealing with these cases will be covered -later in this guide. -For now, we leave you with some guides to identifying which type -of material you are dealing with: +Notas: - - -NTSC regions: - - If MPlayer prints that the framerate - has changed to 24000/1001 when watching your movie, and never changes - back, it is almost certainly progressive content that has been - "soft telecined". - - - If MPlayer shows the framerate - switching back and forth between 24000/1001 and 30000/1001, and you see - "combing" at times, then there are several possibilities. - The 24000/1001 fps segments are almost certainly progressive - content, "soft telecined", but the 30000/1001 fps parts could be - either hard-telecined 24000/1001 fps content or 60000/1001 fields per second - NTSC video. - Use the same guidelines as the following two cases to determine which. - - - If MPlayer never shows the framerate - changing, and every single frame with motion appears combed, your - movie is NTSC video at 60000/1001 fields per second. - - - If MPlayer never shows the framerate - changing, and two frames out of every five appear combed, your - movie is "hard telecined" 24000/1001fps content. - - - -PAL regions: - If you never see any combing, your movie is 2:2 pulldown. - + Esta sección solo se aplica a DVDs NTSC, y no a PAL. + - If you see combing alternating in and out every half second, - then your movie is 2:2:2:2:2:2:2:2:2:2:2:3 pulldown. - + El ejemplo MEncoder que hay a lo largo del + documento no está comprendido para + uso normal. Símplemente tiene lo mínimo requerido para codificar la + categoría de video pertinente. Cómo hacer ripeados de DVD buenos o + ajuste fino de libavcodec + para máxima calidad no es el objetivo de este documento. + - If you always see combing during motion, then your movie is PAL - video at 50 fields per second. - + Hay un montón de notas a pie de página específicas en esta guia, enlazadas + como esto: + [1] + -Hint: - - MPlayer can slow down movie playback - with the -speed option or play it frame-by-frame. - Try using 0.2 to watch the movie very - slowly or press the "." key repeatedly to play one frame at - a time and identify the pattern, if you cannot see it at full speed. - - - - - - - - -Constant quantizer vs. multipass - - -It is possible to encode your movie at a wide range of qualities. -With modern video encoders and a bit of pre-codec compression -(downscaling and denoising), it is possible to achieve very good -quality at 700 MB, for a 90-110 minute widescreen movie. -Furthermore, all but the longest movies can be encoded with near-perfect -quality at 1400 MB. - + +Cómo decir el tipo de video que tiene + +Progresivo -There are three approaches to encoding the video: constant bitrate -(CBR), constant quantizer, and multipass (ABR, or average bitrate). + Video progresivo fue grabado originalmente a 23.976 fps, y almacenado + en el DVD sin alteración. -The complexity of the frames of a movie, and thus the number of bits -required to compress them, can vary greatly from one scene to another. -Modern video encoders can adjust to these needs as they go and vary -the bitrate. -In simple modes such as CBR, however, the encoders do not know the -bitrate needs of future scenes and so cannot exceed the requested -average bitrate for long stretches of time. -More advanced modes, such as multipass encode, can take into account -the statistics from previous passes; this fixes the problem mentioned -above. - + Cuando reproduce un DVD progresivo en MPlayer, + MPlayer mostrará la siguiente línea tan pronto + como comience la película: -Note: - -Most codecs which support ABR encode only support two pass encode -while some others such as x264, -Xvid -and libavcodec support -multipass, which slightly improves quality at each pass, -yet this improvement is no longer measurable nor noticeable after the -4th or so pass. -Therefore, in this section, two pass and multipass will be used -interchangeably. - - + demux_mpg: 24fps progressive NTSC content detected, switching framerate. - -In each of these modes, the video codec (such as -libavcodec) -breaks the video frame into 16x16 pixel macroblocks and then applies a -quantizer to each macroblock. The lower the quantizer, the better the -quality and higher the bitrate. -The method the movie encoder uses to determine -which quantizer to use for a given macroblock varies and is highly -tunable. (This is an extreme over-simplification of the actual -process, but the basic concept is useful to understand.) + Desde este punto de vista, demux_mpg nunca debe decir que encuentra + "contenido a 30fps NTSC." -When you specify a constant bitrate, the video codec will encode the video, -discarding -detail as much as necessary and as little as possible in order to remain -lower than the given bitrate. If you truly do not care about file size, -you could as well use CBR and specify a bitrate of infinity. (In -practice, this means a value high enough so that it poses no limit, like -10000Kbit.) With no real restriction on bitrate, the result is that -the codec will use the lowest -possible quantizer for each macroblock (as specified by - for -libavcodec, which is 2 by default). -As soon as you specify a -low enough bitrate that the codec -is forced to use a higher quantizer, then you are almost certainly ruining -the quality of your video. -In order to avoid that, you should probably downscale your video, according -to the method described later on in this guide. -In general, you should avoid CBR altogether if you care about quality. - + Cuando vea video progresivo, nunca debe ver ningún entrelazado. Tenga + cuidado, sin embargo, porque algunas veces hay un poco de telecine + mezclado, donde no se lo espera. He encontrado DVDs de espectáculos de + TV que tienen un segundo de telecine en cada cambio de escena, o + en lugares aleatorios incluso. Una vez vi un DVD que tenía el primer + campo progresivo, y el segundo campo era telecine. Si quiere + realmente saberlo, puede escanear la película + entera: - -With constant quantizer, the codec uses the same quantizer, as -specified by the option (for -libavcodec), on every macroblock. -If you want the highest quality rip possible, again ignoring bitrate, -you can use . -This will yield the same bitrate and PSNR (peak signal-to-noise ratio) -as CBR with -=infinity and the default -of 2. - + mplayer dvd://1 -nosound -vo null -benchmark - -The problem with constant quantizing is that it uses the given quantizer -whether the macroblock needs it or not. That is, it might be possible -to use a higher quantizer on a macroblock without sacrificing visual -quality. Why waste the bits on an unnecessarily low quantizer? Your -CPU has as many cycles as there is time, but there is only so many bits -on your hard disk. + Usando hace que + MPlayer reproduzca la película tan rápido + como pueda; tenga en cuenta, dependiendo de su hardware, puede tardar + bastante. Cada vez que demux_mpg informa de un cambio de tasa de bits, + la línea inmediatamente por encima le dirá el tiempo en el que el + cambio ha ocurrido. -With a two pass encode, the first pass will rip the movie as though it -were CBR, but it will keep a log of properties for each frame. This -data is then used during the second pass in order to make intelligent -decisions about which quantizers to use. During fast action or high -detail scenes, higher quantizers will likely be used, and during -slow moving or low detail scenes, lower quantizers will be used. -Normally, the amount of motion is much more important than the -amount of detail. + Algunas veces el video progresivo es referido como "soft-telecine" + porque está pensado para ser procesado en telecine por el reproductor de DVD. + + +Telecine -If you use , then you are wasting bits. If you -use , then you are not getting the highest -quality rip. Suppose you rip a DVD at , and -the result is 1800Kbit. If you do a two pass encode with -, the resulting video will have -higher quality for the -same bitrate. + Video con telecine fue grabado originalmente a 23.976 fps, pero fue + pasado por proceso de telecine antes de ser + escrito en el DVD. -Since you are now convinced that two pass is the way to go, the real -question now is what bitrate to use? The answer is that there is no -single answer. Ideally you want to choose a bitrate that yields the -best balance between quality and file size. This is going to vary -depending on the source video. + MPlayer no (nunca) informa de cambios + en la tasa de bits cuando reproduce video con telecine. -If size does not matter, a good starting point for a very high quality -rip is about 2000Kbit plus or minus 200Kbit. -For fast action or high detail source video, or if you just have a very -critical eye, you might decide on 2400 or 2600. -For some DVDs, you might not notice a difference at 1400Kbit. It is a -good idea to experiment with scenes at different bitrates to get a feel. + Al ver video con telecine, verá artefactos de entrelazado, que parecen + "parpadear": repetidamente aparecen y desaparecen. + Puede verlo de cerca con + + + mplayer dvd://1 -speed 0.1 + + + Busque una parte con movimiento. + + + Localice un patrón de búsqueda-entrelazada y búsqueda-progresiva + en marcos de imagen. Si el patrón que ve es PPPII,PPPII,PPPII,... + entonces el video es con telecine. Si ve algún otro patrón, entonces + el video puede que esté con telecine usando algún método no estándar + y MEncoder no puede convertirlo sin pérdidas + en progresivo. Si no ve ningún patrón, entonces lo más seguro es que + sea entrelazado. + + -If you aim at a certain size, you will have to somehow calculate the bitrate. -But before that, you need to know how much space you should reserve for the -audio track(s), so you should -rip those first. -You can compute the bitrate with the following equation: -bitrate = (target_size_in_Mbytes - sound_size_in_Mbytes) * -1024 * 1024 / length_in_secs * 8 / 1000 -For instance, to squeeze a two-hour movie onto a 702MB CD, with 60MB -of audio track, the video bitrate will have to be: -(702 - 60) * 1024 * 1024 / (120*60) * 8 / 1000 -= 740kbps + Algunas veces el video telecine es referido como "hard-telecine". - - - - - -Constraints for efficient encoding + + +Entrelazado -Due to the nature of MPEG-type compression, there are various -constraints you should follow for maximal quality. -MPEG splits the video up into 16x16 squares called macroblocks, -each composed of 4 8x8 blocks of luma (intensity) information and two -half-resolution 8x8 chroma (color) blocks (one for red-cyan axis and -the other for the blue-yellow axis). -Even if your movie width and height are not multiples of 16, the -encoder will use enough 16x16 macroblocks to cover the whole picture -area, and the extra space will go to waste. -So in the interests of maximizing quality at a fixed file size, it is -a bad idea to use dimensions that are not multiples of 16. + El video entrelazado fue originalmente grabado a 59.94 campos por segundo, + y almacenado en el DVD como 29.97 marcos por segundo. El entreñazado + es el resultado de combinar pares de campos en marcos, porque en cada + marco de imagen, cada campo ocupa 1/59.94 segundos. -Most DVDs also have some degree of black borders at the edges. Leaving -these in place will hurt quality a lot -in several ways. + Como en el video en telecine, MPlayer nunca + debe informar de ningún cambio en la tasa de bits mientras reproduce + contenido entrelazado. - - - - MPEG-type compression is highly dependent on frequency domain - transformations, in particular the Discrete Cosine Transform (DCT), - which is similar to the Fourier transform. This sort of encoding is - efficient for representing patterns and smooth transitions, but it - has a hard time with sharp edges. In order to encode them it must - use many more bits, or else an artifact known as ringing will - appear. - - - - The frequency transform (DCT) takes place separately on each - macroblock (actually each block), so this problem only applies when - the sharp edge is inside a block. If your black borders begin - exactly at multiple-of-16 pixel boundaries, this is not a problem. - However, the black borders on DVDs rarely come nicely aligned, so - in practice you will always need to crop to avoid this penalty. - - - - -In addition to frequency domain transforms, MPEG-type compression uses -motion vectors to represent the change from one frame to the next. -Motion vectors naturally work much less efficiently for new content -coming in from the edges of the picture, because it is not present in -the previous frame. As long as the picture extends all the way to the -edge of the encoded region, motion vectors have no problem with -content moving out the edges of the picture. However, in the presence -of black borders, there can be trouble: + Cuando ve video entrelazado de cerca con , + puede ver que cada marco simple es entrelazado. + - - - - For each macroblock, MPEG-type compression stores a vector - identifying which part of the previous frame should be copied into - this macroblock as a base for predicting the next frame. Only the - remaining differences need to be encoded. If a macroblock spans the - edge of the picture and contains part of the black border, then - motion vectors from other parts of the picture will overwrite the - black border. This means that lots of bits must be spent either - re-blackening the border that was overwritten, or (more likely) a - motion vector will not be used at all and all the changes in this - macroblock will have to be coded explicitly. Either way, encoding - efficiency is greatly reduced. - - - - Again, this problem only applies if black borders do not line up on - multiple-of-16 boundaries. - - - - - - Finally, suppose we have a macroblock in the interior of the - picture, and an object is moving into this block from near the edge - of the image. MPEG-type coding cannot say "copy the part that is - inside the picture but not the black border." So the black border - will get copied inside too, and lots of bits will have to be spent - encoding the part of the picture that is supposed to be there. - - - - If the picture runs all the way to the edge of the encoded area, - MPEG has special optimizations to repeatedly copy the pixels at the - edge of the picture when a motion vector comes from outside the - encoded area. This feature becomes useless when the movie has black - borders. Unlike problems 1 and 2, aligning the borders at multiples - of 16 does not help here. - - - - - Despite the borders being entirely black and never changing, there - is at least a minimal amount of overhead involved in having more - macroblocks. - - - + +Mezcla progresiva y telecine -For all of these reasons, it is recommended to fully crop black -borders. Further, if there is an area of noise/distortion at the edge -of the picture, cropping this will improve encoding efficiency as -well. Videophile purists who want to preserve the original as close as -possible may object to this cropping, but unless you plan to encode at -constant quantizer, the quality you gain from cropping will -considerably exceed the amount of information lost at the edges. + Todo video "mezcla progresivo y telecine" originalmente es a + 23.976 marcos por segundo, pero algunas partes de él terminan siendo en + telecine. - - - - - -Cropping and Scaling -Recall from the previous section that the final picture size you -encode should be a multiple of 16 (in both width and height). -This can be achieved by cropping, scaling, or a combination of both. + Cuando MPlayer reproduce esta categoria, + (a menudo de forma repetida) cambia entre "30fps NTSC" y + "24fps progresivo NTSC". Consulte la parte de abajo de + la salida de MPlayer para ver estos + mensajes. -When cropping, there are a few guidelines that must be followed to -avoid damaging your movie. -The normal YUV format, 4:2:0, stores chroma (color) information -subsampled, i.e. chroma is only sampled half as often in each -direction as luma (intensity) information. -Observe this diagram, where L indicates luma sampling points and C -chroma. - - - - - - - - - - - - - - - - - - - - - L - L - L - L - L - L - L - L - - - C - C - C - C - - - L - L - L - L - L - L - L - L - - - L - L - L - L - L - L - L - L - - - C - C - C - C - - - L - L - L - L - L - L - L - L - - - - - - -As you can see, rows and columns of the image naturally come in pairs. -Thus your crop offsets and dimensions must be -even numbers. -If they are not, the chroma will no longer line up correctly with the -luma. -In theory, it is possible to crop with odd offsets, but it requires -resampling the chroma which is potentially a lossy operation and not -supported by the crop filter. + Deberá consultar las secciones de "30fps NTSC" para + asegurarse de que es telecine, y no simplemente entrelazado. + + +Mezcla de progresivo y entrelazado -Further, interlaced video is sampled as follows: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Top field - Bottom field - - - L - L - L - L - L - L - L - L - - - - - - - - - - - C - C - C - C - - - - - - - - - - - - - - - - - - - L - L - L - L - L - L - L - L - - - L - L - L - L - L - L - L - L - - - - - - - - - - - - - - - - - - - C - C - C - C - - - - - - - - - - - L - L - L - L - L - L - L - L - - - L - L - L - L - L - L - L - L - - - - - - - - - - - C - C - C - C - - - - - - - - - - - - - - - - - - - L - L - L - L - L - L - L - L - - - L - L - L - L - L - L - L - L - - - - - - - - - - - - - - - - - - - C - C - C - C - - - - - - - - - - - L - L - L - L - L - L - L - L - - - - - - -As you can see, the pattern does not repeat until after 4 lines. -So for interlaced video, your y-offset and height for cropping must -be multiples of 4. + En el contenido "mezcla de progresivo y entrelazado", el + video progresivo y entrelazado se colocan juntos. -Native DVD resolution is 720x480 for NTSC, and 720x576 for PAL, but -there is an aspect flag that specifies whether it is full-screen (4:3) or -wide-screen (16:9). Many (if not most) widescreen DVDs are not strictly -16:9, and will be either 1.85:1 or 2.35:1 (cinescope). This means that -there will be black bands in the video that will need to be cropped out. + Esta categoría es similar a "mezcla progresivo y telecine", + hasta que examine las secciones de 30fps y vea que no tiene el patrón + de telecine. + - -MPlayer provides a crop detection filter that -will determine the crop rectangle (). -Run MPlayer with - and it will print out the crop -settings to remove the borders. -You should let the movie run long enough that the whole picture -area is used, in order to get accurate crop values. - + + +Cómo codificar cada categoría -Then, test the values you get with MPlayer, -using the command line which was printed by -, and adjust the rectangle as needed. -The filter can help by allowing you to -interactively position the crop rectangle over your movie. -Remember to follow the above divisibility guidelines so that you -do not misalign the chroma planes. + Como dije antes al principio, las líneas de ejemplo de + MEncoder de más abajo no + son para ser usadas; solo son para demostrar los parámetros mínimos para codificar + en cada categoría. + +Progresivo -In certain cases, scaling may be undesirable. -Scaling in the vertical direction is difficult with interlaced -video, and if you wish to preserve the interlacing, you should -usually refrain from scaling. -If you will not be scaling but you still want to use multiple-of-16 -dimensions, you will have to overcrop. -Do not undercrop, since black borders are very bad for encoding! + El video progresivo no requiere un filtrado especial para codificarlo. El + único parámetro que seguramente necesita usar es . + Si no lo hace, MEncoder intentará codificar a + 29.97 fps y marcos duplicados. -Because MPEG-4 uses 16x16 macroblocks, you will want to make sure that each -dimension of the video you are encoding is a multiple of 16 or else you -will be degrading quality, especially at lower bitrates. You can do this -by rounding the width and height of the crop rectangle down to the nearest -multiple of 16. -As stated earlier, when cropping, you will want to increase the Y offset by -half the difference of the old and the new height so that the resulting -video is taken from the center of the frame. And because of the way DVD -video is sampled, make sure the offset is an even number. (In fact, as a -rule, never use odd values for any parameter when you are cropping and -scaling video.) If you are not comfortable throwing a few extra pixels -away, you might prefer to scale the video instead. We will look -at this in our example below. -You can actually let the filter do all of the -above for you, as it has an optional parameter that -is equal to 16 by default. + mencoder dvd://1 -nosound -ovc lavc -ofps 23.976 + + +Telecine -Also, be careful about "half black" pixels at the edges. Make sure you -crop these out too, or else you will be wasting bits there that -are better spent elsewhere. + Telecine puede ser invertido para obtener el contenido 23.976 original, + usando un proceso llamado telecine-inverso. + MPlayer contiene dos filtros para + conseguir esto: y . Puede leer + la página de manual para ver las diferencias, pero para DVDs nunca he tenido + problemas con . Note que + siempre deberá hacer telecine-inverso + antes de cualquier reescalado; a menos que realmente sepa lo que está haciendo, + telecine-inverso antes de recortar también + [1]. De nuevo, + necesitará también. -After all is said and done, you will probably end up with video whose pixels -are not quite 1.85:1 or 2.35:1, but rather something close to that. You -could calculate the new aspect ratio manually, but -MEncoder offers an option for libavcodec called -that will do this for you. Absolutely do not scale this video up in order to -square the pixels unless you like to waste your hard disk space. Scaling -should be done on playback, and the player will use the aspect stored in -the AVI to determine the correct resolution. -Unfortunately, not all players enforce this auto-scaling information, -therefore you may still want to rescale. + mencoder dvd://1 -nosound -vf ivtc=1 -ovc lavc -ofps 23.976 - - - - - -Choosing resolution and bitrate + + +Entrelazado -If you will not be encoding in constant quantizer mode, you need to -select a bitrate. -The concept of bitrate is quite simple. -It is the (average) number of bits that will be consumed to store your -movie, per second. -Normally bitrate is measured in kilobits (1000 bits) per second. -The size of your movie on disk is the bitrate times the length of the -movie in time, plus a small amount of "overhead" (see the section on -the AVI container -for instance). -Other parameters such as scaling, cropping, etc. will -not alter the file size unless you -change the bitrate as well! + Para la mayor parte de los casos prácticos no es posible obtener un + video progresivo completo de un contenido entrelazado. La única manera + de hacerlo sin perder la mitad de la resolución vertical es doblar la + tasa de imágenes por segundo e intentar "adivinar" como se + obtienen las correspondientes líneas para cada campo (esto ocasiona + problemas - vea el método 3). - -Bitrate does not scale proportionally -to resolution. -That is to say, a 320x240 file at 200 kbit/sec will not be the same -quality as the same movie at 640x480 and 800 kbit/sec! -There are two reasons for this: - Perceptual: You notice MPEG - artifacts more if they are scaled up bigger! - Artifacts appear on the scale of blocks (8x8). - Your eye will not see errors in 4800 small blocks as easily as it - sees errors in 1200 large blocks (assuming you will be scaling both - to fullscreen). - - - Theoretical: When you scale down - an image but still use the same size (8x8) blocks for the frequency - space transform, you move more data to the high frequency bands. - Roughly speaking, each pixel contains more of the detail than it - did before. - So even though your scaled-down picture contains 1/4 the information - in the spacial directions, it could still contain a large portion - of the information in the frequency domain (assuming that the high - frequencies were underutilized in the original 640x480 image). - + + Codifique el video en formato entrelazado. Normalmente, el entrelazado + permite al codificador comprimir bien, pero + libavcodec tiene dos + parámetros específicos para jugar con video entrelazado un poco mejor: + y . Además, es + altamente recomendable usar + [2] porque codifica + los macrobloques como no entrelazados en lugares donde no hay movimiento. + Note que NO es necesario aquí. + + mencoder dvd://1 -nosound -ovc lavc -lavcopts ildct:ilme:mbd=2 + + + Use un filtro de desentrelazado antes de codificar. Hay varios + filtros disponibles para elegir, cada uno con sus ventajas y sus + desventajas. Consulte para ver + qué hay disponible (grep "deint"), y busque en las + + listas de correo MPlayer para encontrar + discusiones acerca de varios filtros. De nuevo, la tasa de bits por segundo + no cambia, nada de . Además, el desentrelazado debe + hacerse después del recortado + [1] y antes del escalado. + + mencoder dvd://1 -nosound -vf pp=lb -ovc lavc + + + Desafortunadamente, esta opción tiene fallos con + MEncoder; funcionará bien con + MEncoder G2, pero todavía no está disponible. + Puede experimentar cuelgues del sistema. De todos modos, el propósito + de es crear una tasa de bits completa por + campo, que haga que la tasa completa sea de 59.94. La ventaja de esta + aproximación es que no hay pérdida de datos; sin embargo, como cada marco + viene solo con un campo, las líneas que faltan tienen que se interpoladas + de alguna manera. No hay buenos métodos para generar estos datos + que faltan, y el resultado será un poco similar al que se obtiene cuando + se usan algunos filtros de desentrelazado. La generación de las líneas + que faltan crean otros problemas, símplemente porque se dobla la cantidad + de datos. Por eso, tasas de bits más altas para la codificación son + requeridas para mantener la calidad, y se usa más potencia de CPU para + la codificación y la decodificación. tfields tiene varias opciones + distintas para crear las líneas que faltan en cada marco. Si usa + este método, refiérase al manual, y elija la opción que mejor se ajuste + para su material. Note que cuando use + tiene que especificar + y para doblar la tasa de bits de su fuente + original. + + mencoder dvd://1 -nosound -vf tfields=2 -ovc lavc -fps 59.94 -ofps 59.94 + + + Si planea subescalar dramáticamente, puede codificar solo uno de los + dos campos. Por supuesto, perderá la mitad de la resolución vertical, + pero si planea subescalar a al menos 1/2 del original, la pérdida no + importa mucho. El resultado será un archivo progresivo de 29.97 marcos + por segundo. El procedimiento es usar , entonces + recortar [1] y + escalar apropiadamente. Recuerde que tiene que ajustar la escala para + compensar la resolución vertical que está siendo perdida. + mencoder dvd://1 -nosound -vf field=0 -ovc lavc + - + + +Mezcla de progresivo y telecine -Past guides have recommended choosing a bitrate and resolution based -on a "bits per pixel" approach, but this is usually not valid due to -the above reasons. -A better estimate seems to be that bitrates scale proportional to the -square root of resolution, so that 320x240 and 400 kbit/sec would be -comparable to 640x480 at 800 kbit/sec. -However this has not been verified with theoretical or empirical -rigor. -Further, given that movies vary greatly with regard to noise, detail, -degree of motion, etc., it is futile to make general recommendations -for bits per length-of-diagonal (the analog of bits per pixel, -using the square root). - - -So far we have discussed the difficulty of choosing a bitrate and -resolution. + Para mezclar video progresivo y telecine en un video completamente + progresivo, las partes en telecine tienen que pasar por el proceso + de telecine-inverso. Hay dos filtros que realizan esto nativamente, pero + una solución mejor casi siempre es usar dos filtros conjuntamente + (lea más adelante para más detalles). - - -Computing the resolution - - -The following steps will guide you in computing the resolution of your -encode without distorting the video too much, by taking into account several -types of information about the source video. -First, you should compute the encoded aspect ratio: -ARc = (Wc x (ARa / PRdvd )) / Hc - -where: - Wc and Hc are the width and height of the cropped video, - - - ARa is the displayed aspect ratio, which usually is 4/3 or 16/9, - + Actualmente el método más fiable para tratar este tipo de video + es, en lugar de hacer telecine-inverso con las partes en telecine, + pasar a telecine las partes que no lo son y luego hacer telecine-inverso + del video completo. ¿Suena confuso? softpulldown es un filtro que + hadce que el video se haga completamente en telecine. Si se sigue + softpulldown con alguno de entre o + , el resultado final será completamente progresivo. + El recortado y el escalado debe hacerse después de las operaciones de + telecine-inverso, y es necesario. + + mencoder dvd://1 -nosound -vf softpulldown,ivtc=1 -ovc lavc -ofps 23.976 + + - PRdvd is the pixel ratio of the DVD which is equal to 1.25=(720/576) for PAL - DVDs and 1.5=(720/480) for NTSC DVDs. - - - + está diseñado para hacer telecine-inverso + con material en telecine mientras que deja el video progresivo como + datos aislados. Pullup no funciona muy bien con el + MEncoder actual, realmente está hecho + para ser usado con MEncoder G2 (cuando esté + listo). Funciona bien sin , pero + se necesita para prevenir salida con saltos. + Con , algunas veces falla. Los problemas vienen + de mantener la sincronización entre el audio y el video: elimina + marcos antes de enviarlos a la cadena de filtros, en lugar de después. + Como resultado, algunas veces pierde los + datos que necesita. + - -Then, you can compute the X and Y resolution, according to a certain -Compression Quality (CQ) factor: -ResY = INT(SQRT( 1000*Bitrate/25/ARc/CQ )/16) * 16 -and -ResX = INT( ResY * ARc / 16) * 16 - + + Si MEncoder descarta demasiados marcos de + imagen en una fila, se carga los buffers y + causa el fallo del programa. + - -Okay, but what is the CQ? -The CQ represents the number of bits per pixel and per frame of the encode. -Roughly speaking, the greater the CQ, the less the likelihood to see -encoding artifacts. -However, if you have a target size for your movie (1 or 2 CDs for instance), -there is a limited total number of bits that you can spend; therefore it is -necessary to find a good tradeoff between compressibility and quality. - + + Incluso si MEncoder solo descarta un marco, + sigue sin verse bien, y puede resultar en + una secuencia incorrecta de marcos de imagen. Incluso si no causa + un fallo del sistema, es capaz de hacer decisión + de correcciones sobre como reensamblar los marcos progresivos, y + hacer coincidir campos juntos de manera incorrecta o descargar + algunos campos para compensar. + + - -The CQ depends on the bitrate, the video codec efficiency and the -movie resolution. -In order to raise the CQ, typically you would downscale the movie given that the -bitrate is computed in function of the target size and the length of the -movie, which are constant. -With MPEG-4 ASP codecs such as Xvid -and libavcodec, a CQ below 0.18 -usually results in a pretty blocky picture, because there -are not enough bits to code the information of each macroblock. (MPEG4, like -many other codecs, groups pixels by blocks of several pixels to compress the -image; if there are not enough bits, the edges of those blocks are -visible.) -It is therefore wise to take a CQ ranging from 0.20 to 0.22 for a 1 CD rip, -and 0.26-0.28 for 2 CDs rip with standard encoding options. -More advanced encoding options such as those listed here for -libavcodec -and -Xvid -should make it possible to get the same quality with CQ ranging from -0.18 to 0.20 for a 1 CD rip, and 0.24 to 0.26 for a 2 CD rip. -With MPEG-4 AVC codecs such as x264, -you can use a CQ ranging from 0.14 to 0.16 with standard encoding options, -and should be able to go as low as 0.10 to 0.12 with -x264's advanced encoding settings. - + + Recientemente he usado yo mismo, pero + esto es lo que dice D Richard Felker III: - -Please take note that the CQ is just an indicative figure, as depending on -the encoded content, a CQ of 0.18 may look just fine for a Bergman, contrary -to a movie such as The Matrix, which contains many high-motion scenes. -On the other hand, it is worthless to raise CQ higher than 0.30 as you would -be wasting bits without any noticeable quality gain. -Also note that as mentioned earlier in this guide, low resolution videos -need a bigger CQ (compared to, for instance, DVD resolution) to look good. - +
Está bien, pero IMO (en mi opinión) intenta + densentrelazar en lugar de hacer inversión del telecine + demasiado a menudo (muy similar a los reproductores de sobremesa + de DVD y TVs progresivas) que causan parpadeos que afean y + otros artefactos. Si está haciendo uso de esto, necesita por lo + menos perder algún tiempo haciendo un ajuste fino de las opciones + y viendo la salida para asegurarse de que no está haciendolo mal. +
+
+
-
- - - - -Filtering - - -Learning how to use MEncoder's video filters -is essential to producing good encodes. -All video processing is performed through the filters -- cropping, -scaling, color adjustment, noise removal, sharpening, deinterlacing, -telecine, inverse telecine, and deblocking, just to name a few. -Along with the vast number of supported input formats, the variety of -filters available in MEncoder is one of its -main advantages over other similar programs. - - - -Filters are loaded in a chain using the -vf option: - --vf filter1=options,filter2=options,... - -Most filters take several numeric options separated by colons, but -the syntax for options varies from filter to filter, so read the man -page for details on the filters you wish to use. - - - -Filters operate on the video in the order they are loaded. -For example, the following chain: - --vf crop=688:464:12:4,scale=640:464 - -will first crop the 688x464 region of the picture with upper-left -corner at (12,4), and then scale the result down to 640x464. - - - -Certain filters need to be loaded at or near the beginning of the -filter chain, in order to take advantage of information from the -video decoder that will be lost or invalidated by other filters. -The principal examples are (postprocessing, only -when it is performing deblock or dering operations), - (another postprocessor to remove MPEG artifacts), - (inverse telecine), and - (for converting soft telecine to hard telecine). - - - -In general, you want to do as little filtering as possible to the movie -in order to remain close to the original DVD source. Cropping is often -necessary (as described above), but avoid to scale the video. Although -scaling down is sometimes preferred to using higher quantizers, we want -to avoid both these things: remember that we decided from the start to -trade bits for quality. - - - -Also, do not adjust gamma, contrast, brightness, etc. What looks good -on your display may not look good on others. These adjustments should -be done on playback only. - - - -One thing you might want to do, however, is pass the video through a -very light denoise filter, such as . -Again, it is a matter of putting those bits to better use: why waste them -encoding noise when you can just add that noise back in during playback? -Increasing the parameters for will further -improve compressibility, but if you increase the values too much, you -risk degrading the image visibly. The suggested values above -() are quite conservative; you should feel free to -experiment with higher values and observe the results for yourself. - - - - - - -Interlacing and Telecine - - -Almost all movies are shot at 24 fps. Because NTSC is 30000/1001 fps, some -processing must be done to this 24 fps video to make it run at the correct -NTSC framerate. The process is called 3:2 pulldown, commonly referred to -as telecine (because pulldown is often applied during the telecine -process), and, naively described, it works by slowing the film down to -24000/1001 fps, and repeating every fourth frame. - - - -No special processing, however, is done to the video for PAL DVDs, which -run at 25 fps. (Technically, PAL can be telecined, called 2:2 pulldown, -but this does not become an issue in practice.) The 24 fps film is simply -played back at 25 fps. The result is that the movie runs slightly faster, -but unless you are an alien, you probably will not notice the difference. -Most PAL DVDs have pitch-corrected audio, so when they are played back at -25 fps things will sound right, even though the audio track (and hence the -whole movie) has a running time that is 4% less than NTSC DVDs. - - - -Because the video in a PAL DVD has not been altered, you need not worry -much about framerate. The source is 25 fps, and your rip will be 25 -fps. However, if you are ripping an NTSC DVD movie, you may need to -apply inverse telecine. - - - -For movies shot at 24 fps, the video on the NTSC DVD is either telecined -30000/1001, or else it is progressive 24000/1001 fps and intended to be -telecined on-the-fly by a DVD player. On the other hand, TV series are usually -only interlaced, not telecined. This is not a hard rule: some TV series -are interlaced (such as Buffy the Vampire Slayer) whereas some are a -mixture of progressive and interlaced (such as Angel, or 24). - - - -It is highly recommended that you read the section on -How to deal with telecine and interlacing in NTSC DVDs -to learn how to handle the different possibilities. - - - -However, if you are mostly just ripping movies, likely you are either -dealing with 24 fps progressive or telecined video, in which case you can -use the filter . - - - - - - -Encoding interlaced video - - -If the movie you want to encode is interlaced (NTSC video or -PAL video), you will need to choose whether you want to -deinterlace or not. -While deinterlacing will make your movie usable on progressive -scan displays such a computer monitors and projectors, it comes -at a cost: The fieldrate of 50 or 60000/1001 fields per second -is halved to 25 or 30000/1001 frames per second, and roughly half of -the information in your movie will be lost during scenes with -significant motion. - - - -Therefore, if you are encoding for high quality archival purposes, -it is recommended not to deinterlace. -You can always deinterlace the movie at playback time when -displaying it on progressive scan devices. -The power of currently available computers forces players to use a -deinterlacing filter, which results in a slight degradation in -image quality. -But future players will be able to mimic the interlaced display of -a TV, deinterlacing to full fieldrate and interpolating 50 or -60000/1001 entire frames per second from the interlaced video. - + +Mezcla de progresivo y entrelazado -Special care must be taken when working with interlaced video: + Hay dos opciones para tratar esta categoría, cada una con sus + compromisos. Debe decidir si se quiere basar en la duración + o localización de cada tipo. - - - Crop height and y-offset must be multiples of 4. - - - Any vertical scaling must be performed in interlaced mode. - + - Postprocessing and denoising filters may not work as expected - unless you take special care to operate them a field at a time, - and they may damage the video if used incorrectly. - - - - -With these things in mind, here is our first example: - -mencoder capture.avi -mc 0 -oac lavc -ovc lavc -lavcopts \ - vcodec=mpeg2video:vbitrate=6000:ilme:ildct:acodec=mp2:abitrate=224 - -Note the and options. - - - - - - -Notes on Audio/Video synchronization - - -MEncoder's audio/video synchronization -algorithms were designed with the intention of recovering files with -broken sync. -However, in some cases they can cause unnecessary skipping and duplication of -frames, and possibly slight A/V desync, when used with proper input -(of course, A/V sync issues apply only if you process or copy the -audio track while transcoding the video, which is strongly encouraged). -Therefore, you may have to switch to basic A/V sync with -the option, or put this in your -~/.mplayer/mencoder config file, as long as -you are only working with good sources (DVD, TV capture, high quality -MPEG-4 rips, etc) and not broken ASF/RM/MOV files. - - - -If you want to further guard against strange frame skips and -duplication, you can use both and -. -This will prevent all A/V sync, and copy frames -one-to-one, so you cannot use it if you will be using any filters that -unpredictably add or drop frames, or if your input file has variable -framerate! -Therefore, using is not in general recommended. - - - -The so-called "three-pass" audio encoding which -MEncoder supports has been reported to cause A/V -desync. -This will definitely happen if it is used in conjunction with certain -filters, therefore, it is now recommended not to -use three-pass audio mode. -This feature is only left for compatibility purposes and for expert -users who understand when it is safe to use and when it is not. -If you have never heard of three-pass mode before, forget that we -even mentioned it! - - - -There have also been reports of A/V desync when encoding from stdin -with MEncoder. -Do not do this! Always use a file or CD/DVD/etc device as input. - - - - - - -Choosing the video codec + Trátelo como progresivo. Las partes entrelazadas parecen entrelazadas, + y algunos campos entrelazados son descartados, resultando en un + poco dispares y con saltos. Puede usar un filtro de postprocesado + si quiere, pero degradará ligeramente las partes progresivas. + - -Which video codec is best to choose depends on several factors, -like size, quality, streamability, usability and popularity, some of -which widely depend on personal taste and technical constraints. - - - - Compression efficiency: - It is quite easy to understand that most newer-generation codecs are - made to increase quality and compression. - Therefore, the authors of this guide and many other people suggest that - you cannot go wrong - - Be careful, however: Decoding DVD-resolution MPEG-4 AVC videos - requires a fast machine (i.e. a Pentium 4 over 1.5GHz or a Pentium M - over 1GHz). - - when choosing MPEG-4 AVC codecs like - x264 instead of MPEG-4 ASP codecs - such as libavcodec MPEG-4 or - Xvid. - (Advanced codec developers may be interested in reading Michael - Niedermayer's opinion on - "why MPEG4-ASP sucks".) - Likewise, you should get better quality using MPEG-4 ASP than you - would with MPEG-2 codecs. + Definitivamente esta opción no debe ser usada si quiere eventualmente + mostrar el video en un dispositivo entrelazado (con una tarjeta de TV, + por ejemplo). Si tiene marcos entrelazados en un video de 23.976 marcos + por segundo, deben ponerse en telecine junto con los marcos + progresivos. La mitad de los "marcos" entrelazados serán mostrados + en duración de tres campos (3/59.94 segundos), resultando en un + efecto de parpadeo "con salto atrás en el tiempo" lo que hace + que se vea bastante mal. Si quiere intentarlo, + debe usar un filtro de desentrelazado + como o . - However, newer codecs which are in heavy development can suffer from - bugs which have not yet been noticed and which can ruin an encode. - This is simply the tradeoff for using bleeding-edge technology. + También puede ser una mala idea para una pantalla progresiva. + Descartará pares de campos consecutivos entrelazados, resultando + en una discontinuidad que puede ser más visible que con el segundo + método, el cual muestra algunos marcos progresivos dos veces. El + video entrelazado a 29.97 marcos por segundo ya se ve realmente con + saltitos porque debe ser mostrado a 59.94 campos por segundo, lo que + hace que los marcos duplicados no estén durante mucho tiempo en pantalla. - What is more, beginning to use a new codec requires that you spend some - time becoming familiar with its options, so that you know what - to adjust to achieve a desired picture quality. + En cualquier caso, es mejor considerar su contenido y cómo quiere + mostrarlo. Si su video es 90% progresivo y no tiene intención de + mostrarlo en una TV, debería usar una aproximación progresiva. Si + es solo la mitad progresivo, probablemente querrá codificarlo como + está si todo está entrelazado. - + - Hardware compatibility: - It usually takes a long time for standalone video players to begin to - include support for the latest video codecs. - As a result, most only support MPEG-1 (like VCD, XVCD and KVCD), MPEG-2 - (like DVD, SVCD and KVCD) and MPEG-4 ASP (like DivX, - libavcodec's LMP4 and - Xvid) - (Beware: Usually, not all MPEG-4 ASP features are supported). - Please refer to the technical specs of your player (if they are available), - or google around for more information. - + Trátelo como entrelazado. Algunas características de las partes + progresivas serán tratadas por duplicado, resultando en una imagen + a saltos. De nuevo, los filtros de desentrelazado pueden degradar + ligeramente las partes progresivas. + + + + - + + + +Notas a pie de página + + + Acerca del recortado: - Best quality per encoding time: - Codecs that have been around for some time (such as - libavcodec MPEG-4 and - Xvid) are usually heavily - optimized with all kinds of smart algorithms and SIMD assembly code. - That is why they tend to yield the best quality per encoding time ratio. - However, they may have some very advanced options that, if enabled, - will make the encode really slow for marginal gains. + Los datos de video de los DVDs son almacenados en un formato llamado + YUV 4:2:0. En video YUV, la luminancia ("brillo") y la + crominancia ("color") se almacenan por separado. Debido + a que el ojo humano es menos sensible al color que al brillo, en una + imagen YUV 4:2:0 hay solo un pixel de crominancia por cada cuatro de + luminancia (dos por lado) teniendo el pixel de crominancia común. + Debe recortar YUV progresivo 4:2:0 a resoluciones pares, e incluso usar + desplazamientos pares. Por ejemplo, + es CORRECTO pero no lo es. + - If you are after blazing speed you should stick around the default - settings of the video codec (although you should still try the other - options which are mentioned in other sections of this guide). + Cuando esté tratando con YUV 4:2:0 entrelazado, la situación es un + poco más complicada. En lugar de cada cuatro pixels de luminancia en + el marco compartiendo uno de crominancia, cada + cuatro de luminancia en cada campo comparten un + pixel de crominancia. Cuando los campos son entrelazados para formar + un marco, cada scanline es un pixel de alta. Ahora, en lugar de cada + cuatro pixels de luminancia en un cuadrado, hay dos pixels lado-a-lado, + y los otros dos pixels están lado-a-lado dos scanlines más abajo. Los dos + pixels de luminancia en la scanline intermedia son del otro campo, y + por eso comparten un pixel distinto de crominancia con dos pixels de + luminancia dos scanlines más allá. Toda esta confusión hace necesario + tener dimensiones y desplazamientos de recorte vertical en múltiplos + de cuatro. El horizontal puede quedarse igual. - You may also consider choosing a codec which can do multi-threaded - processing, though this is only useful for users of machines with - several CPUs. - libavcodec MPEG-4 does - allow that, but speed gains are limited, and there is a slight - negative effect on picture quality. - Xvid's multi-threaded encoding, - activated by the option, can be used to - boost encoding speed — by about 40-60% in typical cases — - with little if any picture degradation. - x264 also allows multi-threaded - encoding, which currently speeds up encoding by 94% per CPU core while - lowering PSNR between 0.005dB and 0.01dB on a typical setup. + Para video en telecine, recomiendo que se recorte después de hacer + la inversión del telecine. Una vez que el video es progresivo solo + necesita recortar con números pares. Si realmente quiere ganar algo + de velocidad más que lo que el primer recortado puede ofrecer, debe + recortar verticalmente en múltiplos de cuatro o bien usar el filtro + de telecine-inverso con los datos apropiados. - - - Personal taste: - This is where it gets almost irrational: For the same reason that some - hung on to DivX 3 for years when newer codecs were already doing wonders, - some folks will prefer Xvid - or libavcodec MPEG-4 over - x264. + Para video entrelazado (no telecine), siempre debe recortar + verticalmente por múltiplos de cuatro a menos que use + antes de recortar. + + + + Acerca de los parámetros de codificado y la calidad: - You should make your own judgement; do not take advice from people who - swear by one codec. - Take a few sample clips from raw sources and compare different - encoding options and codecs to find one that suits you best. - The best codec is the one you master, and the one that looks - best to your eyes on your display - - The same encode may not look the same on someone else's monitor or - when played back by a different decoder, so future-proof your encodes by - playing them back on different setups. - ! + Solo porque yo recomiendo aquí no significa que + deba ser usado siempre. Junto con , + es una de las dos opciones de + libavcodec que pueden + incrementar la calidad, y siempre debe usar al menos estos dos + a menos que la pérdida de velocidad sea prohibitiva (e.g. codificación + en tiempo real). Hay muchas otras opciones para + libavcodec que incrementan + la calidad de la codificación (e incrementa la velocidad de la codificación) + pero eso queda más allá del objeto de este documento. - - - - -Please refer to the section -selecting codecs and container formats -to get a list of supported codecs. - - - - - - -Audio - - -Audio is a much simpler problem to solve: if you care about quality, just -leave it as is. -Even AC-3 5.1 streams are at most 448Kbit/s, and they are worth every bit. -You might be tempted to transcode the audio to high quality Vorbis, but -just because you do not have an A/V receiver for AC-3 pass-through today -does not mean you will not have one tomorrow. Future-proof your DVD rips by -preserving the AC-3 stream. -You can keep the AC-3 stream either by copying it directly into the video -stream during the encoding. -You can also extract the AC-3 stream in order to mux it into containers such -as NUT or Matroska. - -mplayer source_file.vob -aid 129 -dumpaudio -dumpfile sound.ac3 - -will dump into the file sound.ac3 the -audio track number 129 from the file -source_file.vob (NB: DVD VOB files -usually use a different audio numbering, -which means that the VOB audio track 129 is the 2nd audio track of the file). - - - -But sometimes you truly have no choice but to further compress the -sound so that more bits can be spent on the video. -Most people choose to compress audio with either MP3 or Vorbis audio codecs. -While the latter is a very space-efficient codec, MP3 is better supported -by hardware players, although this trend is changing. - - - -Do not use when encoding -a file with audio, even if you will be encoding and muxing audio -separately later. -Though it may work in ideal cases, using is -likely to hide some problems in your encoding command line setting. -In other words, having a soundtrack during your encode assures you that, -provided you do not see messages such as -Too many audio packets in the buffer, you will be able -to get proper sync. - - - -You need to have MEncoder process the sound. -You can for example copy the original soundtrack during the encode with - or convert it to a "light" 4 kHz mono WAV -PCM with . -Otherwise, in some cases, it will generate a video file that will not sync -with the audio. -Such cases are when the number of video frames in the source file does -not match up to the total length of audio frames or whenever there -are discontinuities/splices where there are missing or extra audio frames. -The correct way to handle this kind of problem is to insert silence or -cut audio at these points. -However MPlayer cannot do that, so if you -demux the AC-3 audio and encode it with a separate app (or dump it to PCM with -MPlayer), the splices will be left incorrect -and the only way to correct them is to drop/duplicate video frames at the -splice. -As long as MEncoder sees the audio when it is -encoding the video, it can do this dropping/duping (which is usually OK -since it takes place at full black/scene change), but if -MEncoder cannot see the audio, it will just -process all frames as-is and they will not fit the final audio stream when -you for example merge your audio and video track into a Matroska file. - - - -First of all, you will have to convert the DVD sound into a WAV file that the -audio codec can use as input. -For example: - -mplayer source_file.vob -ao pcm:file=destination_sound.wav \ - -vc dummy -aid 1 -vo null - -will dump the second audio track from the file -source_file.vob into the file -destination_sound.wav. -You may want to normalize the sound before encoding, as DVD audio tracks -are commonly recorded at low volumes. -You can use the tool normalize for instance, -which is available in most distributions. -If you are using Windows, a tool such as BeSweet -can do the same job. -You will compress in either Vorbis or MP3. -For example: -oggenc -q1 destination_sound.wav -will encode destination_sound.wav with -the encoding quality 1, which is roughly equivalent to 80Kb/s, and -is the minimum quality at which you should encode if you care about -quality. -Please note that MEncoder currently cannot -mux Vorbis audio tracks -into the output file because it only supports AVI and MPEG -containers as an output, each of which may lead to audio/video -playback synchronization problems with some players when the AVI file -contain VBR audio streams such as Vorbis. -Do not worry, this document will show you how you can do that with third -party programs. - - - - - - -Muxing - - -Now that you have encoded your video, you will most likely want -to mux it with one or more audio tracks into a movie container, such -as AVI, MPEG, Matroska or NUT. -MEncoder is currently only able to natively output -audio and video into MPEG and AVI container formats. -for example: - -mencoder -oac copy -ovc copy -o output_movie.avi \ - -audiofile input_audio.mp2 input_video.avi - -This would merge the video file input_video.avi -and the audio file input_audio.mp2 -into the AVI file output_movie.avi. -This command works with MPEG-1 layer I, II and III (more commonly known -as MP3) audio, WAV and a few other audio formats too. - - - -MEncoder features experimental support for -libavformat, which is a -library from the FFmpeg project that supports muxing and demuxing -a variety of containers. -For example: - -mencoder -oac copy -ovc copy -o output_movie.asf -audiofile input_audio.mp2 \ - input_video.avi -of lavf -lavfopts format=asf - -This will do the same thing as the previous example, except that -the output container will be ASF. -Please note that this support is highly experimental (but getting -better every day), and will only work if you compiled -MPlayer with the support for -libavformat enabled (which -means that a pre-packaged binary version will not work in most cases). - - - - -Improving muxing and A/V sync reliability - - -You may experience some serious A/V sync problems while trying to mux -your video and some audio tracks, where no matter how you adjust the -audio delay, you will never get proper sync. -That may happen when you use some video filters that will drop or -duplicate some frames, like the inverse telecine filters. -It is strongly encouraged to append the video -filter at the end of the filter chain to avoid this kind of problem. - - - -Without , if MEncoder -wants to duplicate a frame, it relies on the muxer to put a mark on the -container so that the last frame will be displayed again to maintain -sync while writing no actual frame. -With , MEncoder -will instead just push the last frame displayed again into the filter -chain. -This means that the encoder receives the exact -same frame twice, and compresses it. -This will result in a slightly bigger file, but will not cause problems -when demuxing or remuxing into other container formats. - - - -You may also have no choice but to use with -container formats that are not too tightly linked with -MEncoder such as the ones supported through -libavformat, which may not -support frame duplication at the container level. - - - - - -Limitations of the AVI container - - -Although it is the most widely-supported container format after MPEG-1, -AVI also has some major drawbacks. -Perhaps the most obvious is the overhead. -For each chunk of the AVI file, 24 bytes are wasted on headers and index. -This translates into a little over 5 MB per hour, or 1-2.5% -overhead for a 700 MB movie. This may not seem like much, but it could -mean the difference between being able to use 700 kbit/sec video or -714 kbit/sec, and every bit of quality counts. - - - -In addition this gross inefficiency, AVI also has the following major -limitations: - - - - - Only fixed-fps content can be stored. This is particularly limiting - if the original material you want to encode is mixed content, for - example a mix of NTSC video and film material. - Actually there are hacks that can be used to store mixed-framerate - content in AVI, but they increase the (already huge) overhead - fivefold or more and so are not practical. - - - Audio in AVI files must be either constant-bitrate (CBR) or - constant-framesize (i.e. all frames decode to the same number of - samples). - Unfortunately, the most efficient codec, Vorbis, does not meet - either of these requirements. - Therefore, if you plan to store your movie in AVI, you will have to - use a less efficient codec such as MP3 or AC-3. - - - - -Having said all that, MEncoder does not -currently support variable-fps output or Vorbis encoding. -Therefore, you may not see these as limitations if -MEncoder is the -only tool you will be using to produce your encodes. -However, it is possible to use MEncoder -only for video encoding, and then use external tools to encode -audio and mux it into another container format. - - - - - -Muxing into the Matroska container - - -Matroska is a free, open standard container format, aiming -to offer a lot of advanced features, which older containers -like AVI cannot handle. -For example, Matroska supports variable bitrate audio content -(VBR), variable framerates (VFR), chapters, file attachments, -error detection code (EDC) and modern A/V Codecs like "Advanced Audio -Coding" (AAC), "Vorbis" or "MPEG-4 AVC" (H.264), next to nothing -handled by AVI. - - - -The tools required to create Matroska files are collectively called -mkvtoolnix, and are available for most -Unix platforms as well as Windows. -Because Matroska is an open standard you may find other -tools that suit you better, but since mkvtoolnix is the most -common, and is supported by the Matroska team itself, we will -only cover its usage. - - - -Probably the easiest way to get started with Matroska is to use -MMG, the graphical frontend shipped with -mkvtoolnix, and follow the -guide to mkvmerge GUI (mmg) - - - -You may also mux audio and video files using the command line: - -mkvmerge -o output.mkv input_video.avi input_audio1.mp3 input_audio2.ac3 - -This would merge the video file input_video.avi -and the two audio files input_audio1.mp3 -and input_audio2.ac3 into the Matroska -file output.mkv. -Matroska, as mentioned earlier, is able to do much more than that, like -multiple audio tracks (including fine-tuning of audio/video -synchronization), chapters, subtitles, splitting, etc... -Please refer to the documentation of those applications for -more details. - - - - - - - - - - -How to deal with telecine and interlacing within NTSC DVDs - - -Introduction - - -What is telecine? - -If you do not understand much of what is written in this document, read the -Wikipedia entry on telecine. -It is an understandable and reasonably comprehensive -description of what telecine is. - - - -A note about the numbers. - -Many documents, including the article linked above, refer to the fields -per second value of NTSC video as 59.94 and the corresponding frames -per second values as 29.97 (for telecined and interlaced) and 23.976 -(for progressive). For simplicity, some documents even round these -numbers to 60, 30, and 24. - - - -Strictly speaking, all those numbers are approximations. Black and -white NTSC video was exactly 60 fields per second, but 60000/1001 -was later chosen to accommodate color data while remaining compatible -with contemporary black and white televisions. Digital NTSC video -(such as on a DVD) is also 60000/1001 fields per second. From this, -interlaced and telecined video are derived to be 30000/1001 frames -per second; progressive video is 24000/1001 frames per second. - - - -Older versions of the MEncoder documentation -and many archived mailing list posts refer to 59.94, 29.97, and 23.976. -All MEncoder documentation has been updated -to use the fractional values, and you should use them too. - - - - is incorrect. - should be used instead. - - - -How telecine is used. - -All video intended to be displayed on an NTSC -television set must be 60000/1001 fields per second. Made-for-TV movies -and shows are often filmed directly at 60000/1001 fields per second, but -the majority of cinema is filmed at 24 or 24000/1001 frames per -second. When cinematic movie DVDs are mastered, the video is then -converted for television using a process called telecine. - - - -On a DVD, the video is never actually stored as 60000/1001 fields per -second. For video that was originally 60000/1001, each pair of fields is -combined to form a frame, resulting in 30000/1001 frames per -second. Hardware DVD players then read a flag embedded in the video -stream to determine whether the odd- or even-numbered lines should -form the first field. - - - -Usually, 24000/1001 frames per second content stays as it is when -encoded for a DVD, and the DVD player must perform telecining -on-the-fly. Sometimes, however, the video is telecined -before being stored on the DVD; even though it -was originally 24000/1001 frames per second, it becomes 60000/1001 fields per -second. When it is stored on the DVD, pairs of fields are combined to form -30000/1001 frames per second. - - - -When looking at individual frames formed from 60000/1001 fields per -second video, telecined or otherwise, interlacing is clearly visible -wherever there is any motion, because one field (say, the -even-numbered lines) represents a moment in time 1/(60000/1001) -seconds later than the other. Playing interlaced video on a computer -looks ugly both because the monitor is higher resolution and because -the video is shown frame-after-frame instead of field-after-field. - - - -Notes: - - This section only applies to NTSC DVDs, and not PAL. - - - The example MEncoder lines throughout the - document are not intended for - actual use. They are simply the bare minimum required to encode the - pertaining video category. How to make good DVD rips or fine-tune - libavcodec for maximal - quality is not within the scope of this section; refer to other - sections within the MEncoder encoding - guide. - - - There are a couple footnotes specific to this guide, linked like this: - [1] - - - - - - - -How to tell what type of video you have - - -Progressive - - -Progressive video was originally filmed at 24000/1001 fps, and stored -on the DVD without alteration. - - - -When you play a progressive DVD in MPlayer, -MPlayer will print the following line as -soon as the movie begins to play: - -demux_mpg: 24000/1001 fps progressive NTSC content detected, switching framerate. - -From this point forward, demux_mpg should never say it finds -"30000/1001 fps NTSC content." - - - -When you watch progressive video, you should never see any -interlacing. Beware, however, because sometimes there is a tiny bit -of telecine mixed in where you would not expect. I have encountered TV -show DVDs that have one second of telecine at every scene change, or -at seemingly random places. I once watched a DVD that had a -progressive first half, and the second half was telecined. If you -want to be really thorough, you can scan the -entire movie: -mplayer dvd://1 -nosound -vo null -benchmark -Using makes -MPlayer play the movie as quickly as it -possibly can; still, depending on your hardware, it can take a -while. Every time demux_mpg reports a framerate change, the line -immediately above will show you the time at which the change -occurred. - - - -Sometimes progressive video on DVDs is referred to as -"soft-telecine" because it is intended to -be telecined by the DVD player. - - - - - -Telecined - - -Telecined video was originally filmed at 24000/1001, but was telecined -before it was written to the DVD. - - - -MPlayer does not (ever) report any -framerate changes when it plays telecined video. - - - -Watching a telecined video, you will see interlacing artifacts that -seem to "blink": they repeatedly appear and disappear. -You can look closely at this by - -mplayer dvd://1 - - Seek to a part with motion. - - - Use the . key to step forward one frame at a time. - - - Look at the pattern of interlaced-looking and progressive-looking - frames. If the pattern you see is PPPII,PPPII,PPPII,... then the - video is telecined. If you see some other pattern, then the video - may have been telecined using some non-standard method; - MEncoder cannot losslessly convert - non-standard telecine to progressive. If you do not see any - pattern at all, then it is most likely interlaced. - - - - - -Sometimes telecined video on DVDs is referred to as -"hard-telecine". Since hard-telecine is already 60000/1001 fields -per second, the DVD player plays the video without any manipulation. - - - -Another way to tell if your source is telecined or not is to play -the source with the and -command line options to see how matches frames. -If the source is telecined, you should see on the console a 3:2 pattern -with 0+.1.+2 and 0++1 -alternating. -This technique has the advantage that you do not need to watch the -source to identify it, which could be useful if you wish to automate -the encoding procedure, or to carry out said procedure remotely via -a slow connection. - - - - - -Interlaced - - -Interlaced video was originally filmed at 60000/1001 fields per second, -and stored on the DVD as 30000/1001 frames per second. The interlacing effect -(often called "combing") is a result of combining pairs of -fields into frames. Each field is supposed to be 1/(60000/1001) seconds apart, -and when they are displayed simultaneously the difference is apparent. - - - -As with telecined video, MPlayer should -not ever report any framerate changes when playing interlaced content. - - - -When you view an interlaced video closely by frame-stepping with the -. key, you will see that every single frame is interlaced. - - - - - -Mixed progressive and telecine - - -All of a "mixed progressive and telecine" video was originally -24000/1001 frames per second, but some parts of it ended up being telecined. - - - -When MPlayer plays this category, it will -(often repeatedly) switch back and forth between "30000/1001 fps NTSC" -and "24000/1001 fps progressive NTSC". Watch the bottom of -MPlayer's output to see these messages. - - - -You should check the "30000/1001 fps NTSC" sections to make sure -they are actually telecine, and not just interlaced. - - - - - -Mixed progressive and interlaced - - -In "mixed progressive and interlaced" content, progressive -and interlaced video have been spliced together. - - - -This category looks just like "mixed progressive and telecine", -until you examine the 30000/1001 fps sections and see that they do not have the -telecine pattern. - - - - - - - -How to encode each category - -As I mentioned in the beginning, example MEncoder -lines below are not meant to actually be used; -they only demonstrate the minimum parameters to properly encode each category. - - - - -Progressive - -Progressive video requires no special filtering to encode. The only -parameter you need to be sure to use is . -Otherwise, MEncoder -will try to encode at 30000/1001 fps and will duplicate frames. - - - -mencoder dvd://1 -oac copy -ovc lavc -ofps 24000/1001 - - - -It is often the case, however, that a video that looks progressive -actually has very short parts of telecine mixed in. Unless you are -sure, it is safest to treat the video as -mixed progressive and telecine. -The performance loss is small -[3]. - - - - - -Telecined - - -Telecine can be reversed to retrieve the original 24000/1001 content, -using a process called inverse-telecine. -MPlayer contains several filters to -accomplish this; the best filter, , is described -in the mixed -progressive and telecine section. - - - - - -Interlaced - - -For most practical cases it is not possible to retrieve a complete -progressive video from interlaced content. The only way to do so -without losing half of the vertical resolution is to double the -framerate and try to "guess" what ought to make up the -corresponding lines for each field (this has drawbacks - see method 3). - - - - - Encode the video in interlaced form. Normally, interlacing wreaks - havoc with the encoder's ability to compress well, but - libavcodec has two - parameters specifically for dealing with storing interlaced video a - bit better: and . Also, - using is strongly recommended - [2] because it - will encode macroblocks as non-interlaced in places where there is - no motion. Note that is NOT needed here. - mencoder dvd://1 -oac copy -ovc lavc -lavcopts ildct:ilme:mbd=2 - - - Use a deinterlacing filter before encoding. There are several of - these filters available to choose from, each with its own advantages - and disadvantages. Consult and - to see what is available - (grep for "deint"), read Michael Niedermayer's - Deinterlacing filters comparison, - and search the - - MPlayer mailing lists to find many discussions about the - various filters. - Again, the framerate is not changing, so no - . Also, deinterlacing should be done after - cropping [1] and - before scaling. - mencoder dvd://1 -oac copy -vf yadif -ovc lavc - - - Unfortunately, this option is buggy with - MEncoder; it ought to work well with - MEncoder G2, but that is not here yet. You - might experience crashes. Anyway, the purpose of is to create a full frame out of each field, which - makes the framerate 60000/1001. The advantage of this approach is that no - data is ever lost; however, since each frame comes from only one - field, the missing lines have to be interpolated somehow. There are - no very good methods of generating the missing data, and so the - result will look a bit similar to when using some deinterlacing - filters. Generating the missing lines creates other issues, as well, - simply because the amount of data doubles. So, higher encoding - bitrates are required to maintain quality, and more CPU power is - used for both encoding and decoding. tfields has several different - options for how to create the missing lines of each frame. If you - use this method, then Reference the manual, and chose whichever - option looks best for your material. Note that when using - you - have to specify both - and to be twice the - framerate of your original source. - -mencoder dvd://1 -oac copy -vf tfields=2 -ovc lavc \ - -fps 60000/1001 -ofps 60000/1001 - - - If you plan on downscaling dramatically, you can extract and encode - only one of the two fields. Of course, you will lose half the vertical - resolution, but if you plan on downscaling to at most 1/2 of the - original, the loss will not matter much. The result will be a - progressive 30000/1001 frames per second file. The procedure is to use - , then crop - [1] and scale - appropriately. Remember that you will have to adjust the scale to - compensate for the vertical resolution being halved. - mencoder dvd://1 -oac copy -vf field=0 -ovc lavc - - - - - - -Mixed progressive and telecine - - -In order to turn mixed progressive and telecine video into entirely -progressive video, the telecined parts have to be -inverse-telecined. There are three ways to accomplish this, -described below. Note that you should -always inverse-telecine before any -rescaling; unless you really know what you are doing, -inverse-telecine before cropping, too -[1]. - is needed here because the output video -will be 24000/1001 frames per second. - - - - - is designed to inverse-telecine - telecined material while leaving progressive data alone. In order to - work properly, must - be followed by the filter or - else MEncoder will crash. - is, however, the cleanest and most - accurate method available for encoding both telecine and - "mixed progressive and telecine". - -mencoder dvd://1 -oac copy -vf pullup,softskip - -ovc lavc -ofps 24000/1001 - - - is similar to - : both filters attempt to match a pair of - fields to form a complete frame. will - deinterlace individual fields that it cannot match, however, whereas - will simply drop them. Also, the two filters - have separate detection code, and may tend to match fields a - bit less often. Which filter works better may depend on the input - video and personal taste; feel free to experiment with fine-tuning - the filters' options if you encounter problems with either one (see - the man page for details). For most well-mastered input video, - however, both filters work quite well, so either one is a safe choice - to start with. - -mencoder dvd://1 -oac copy -vf filmdint -ovc lavc -ofps 24000/1001 - - - An older method - is to, rather than inverse-telecine the telecined parts, telecine - the non-telecined parts and then inverse-telecine the whole - video. Sound confusing? softpulldown is a filter that goes through - a video and makes the entire file telecined. If we follow - softpulldown with either or - , the final result will be entirely - progressive. is needed. - -mencoder dvd://1 -oac copy -vf softpulldown,ivtc=1 -ovc lavc -ofps 24000/1001 - - - - - - - - -Mixed progressive and interlaced - - -There are two options for dealing with this category, each of -which is a compromise. You should decide based on the -duration/location of each type. - - - - - - Treat it as progressive. The interlaced parts will look interlaced, - and some of the interlaced fields will have to be dropped, resulting - in a bit of uneven jumpiness. You can use a postprocessing filter if - you want to, but it may slightly degrade the progressive parts. - - - - This option should definitely not be used if you want to eventually - display the video on an interlaced device (with a TV card, for - example). If you have interlaced frames in a 24000/1001 frames per - second video, they will be telecined along with the progressive - frames. Half of the interlaced "frames" will be displayed for three - fields' duration (3/(60000/1001) seconds), resulting in a flicking - "jump back in time" effect that looks quite bad. If you - even attempt this, you must use a - deinterlacing filter like or - . - - - - It may also be a bad idea for progressive display, too. It will drop - pairs of consecutive interlaced fields, resulting in a discontinuity - that can be more visible than with the second method, which shows - some progressive frames twice. 30000/1001 frames per second interlaced - video is already a bit choppy because it really should be shown at - 60000/1001 fields per second, so the duplicate frames do not stand out as - much. - - - - Either way, it is best to consider your content and how you intend to - display it. If your video is 90% progressive and you never intend to - show it on a TV, you should favor a progressive approach. If it is - only half progressive, you probably want to encode it as if it is all - interlaced. - - - - - Treat it as interlaced. Some frames of the progressive parts will - need to be duplicated, resulting in uneven jumpiness. Again, - deinterlacing filters may slightly degrade the progressive parts. - - - - - - - - -Footnotes - - - - - About cropping: - - Video data on DVDs are stored in a format called YUV 4:2:0. In YUV - video, luma ("brightness") and chroma ("color") - are stored separately. Because the human eye is somewhat less - sensitive to color than it is to brightness, in a YUV 4:2:0 picture - there is only one chroma pixel for every four luma pixels. In a - progressive picture, each square of four luma pixels (two on each - side) has one common chroma pixel. You must crop progressive YUV - 4:2:0 to even resolutions, and use even offsets. For example, - is OK but - is not. - - - - - When you are dealing with interlaced YUV 4:2:0, the situation is a - bit more complicated. Instead of every four luma pixels in the - frame sharing a chroma pixel, every four luma - pixels in each field share a chroma - pixel. When fields are interlaced to form a frame, each scanline is - one pixel high. Now, instead of all four luma pixels being in a - square, there are two pixels side-by-side, and the other two pixels - are side-by-side two scanlines down. The two luma pixels in the - intermediate scanline are from the other field, and so share a - different chroma pixel with two luma pixels two scanlines away. All - this confusion makes it necessary to have vertical crop dimensions - and offsets be multiples of four. Horizontal can stay even. - - - - For telecined video, I recommend that cropping take place after - inverse telecining. Once the video is progressive you only need to - crop by even numbers. If you really want to gain the slight speedup - that cropping first may offer, you must crop vertically by multiples - of four or else the inverse-telecine filter will not have proper data. - - - - For interlaced (not telecined) video, you must always crop - vertically by multiples of four unless you use before cropping. - - - - - About encoding parameters and quality: - - Just because I recommend here does not mean it - should not be used elsewhere. Along with , - is one of the two - libavcodec options that - increases quality the most, and you should always use at least those - two unless the drop in encoding speed is prohibitive (e.g. realtime - encoding). There are many other options to - libavcodec that increase - encoding quality (and decrease encoding speed) but that is beyond - the scope of this document. - - - - - About the performance of pullup: - - It is safe to use (along with ) on progressive video, and is usually a good idea unless - the source has been definitively verified to be entirely progressive. - The performance loss is small for most cases. On a bare-minimum encode, - causes MEncoder to - be 50% slower. Adding sound processing and advanced overshadows that difference, bringing the performance - decrease of using down to 2%. - - - - - - - - - - - -Encoding with the <systemitem class="library">libavcodec</systemitem> - codec family - - -libavcodec -provides simple encoding to a lot of interesting video and audio formats. -You can encode to the following codecs (more or less up to date): - - - - - -<systemitem class="library">libavcodec</systemitem>'s - video codecs - - - - - - Video codec nameDescription - - - - mjpeg - Motion JPEG - - - ljpeg - lossless JPEG - - - jpegls - JPEG LS - - - targa - Targa image - - - gif - GIF image - - - bmp - BMP image - - - png - PNG image - - - h261 - H.261 - - - h263 - H.263 - - - h263p - H.263+ - - - mpeg4 - ISO standard MPEG-4 (DivX, Xvid compatible) - - - msmpeg4 - pre-standard MPEG-4 variant by MS, v3 (AKA DivX3) - - - msmpeg4v2 - pre-standard MPEG-4 by MS, v2 (used in old ASF files) - - - wmv1 - Windows Media Video, version 1 (AKA WMV7) - - - wmv2 - Windows Media Video, version 2 (AKA WMV8) - - - rv10 - RealVideo 1.0 - - - rv20 - RealVideo 2.0 - - - mpeg1video - MPEG-1 video - - - mpeg2video - MPEG-2 video - - - huffyuv - lossless compression - - - ffvhuff - FFmpeg modified huffyuv lossless - - - asv1 - ASUS Video v1 - - - asv2 - ASUS Video v2 - - - ffv1 - FFmpeg's lossless video codec - - - svq1 - Sorenson video 1 - - - flv - Sorenson H.263 used in Flash Video - - - flashsv - Flash Screen Video - - - dvvideo - Sony Digital Video - - - snow - FFmpeg's experimental wavelet-based codec - - - zmbv - Zip Motion Blocks Video - - - dnxhd - AVID DNxHD - - - - - -The first column contains the codec names that should be passed after the -vcodec config, -like: - - - -An example with MJPEG compression: - -mencoder dvd://2 -o title2.avi -ovc lavc -lavcopts vcodec=mjpeg -oac copy - - - - - - - -<systemitem class="library">libavcodec</systemitem>'s - audio codecs - - - - - -Audio codec nameDescription - - - - ac3 - Dolby Digital (AC-3) - - - adpcm_* - Adaptive PCM formats - see supplementary table - - - flac - Free Lossless Audio Codec (FLAC) - - - g726 - G.726 ADPCM - - - libfaac - Advanced Audio Coding (AAC) - using FAAC - - - libgsm - ETSI GSM 06.10 full rate - - - libgsm_ms - Microsoft GSM - - - libmp3lame - MPEG-1 audio layer 3 (MP3) - using LAME - - - mp2 - MPEG-1 audio layer 2 (MP2) - - - pcm_* - PCM formats - see supplementary table - - - roq_dpcm - Id Software RoQ DPCM - - - sonic - experimental FFmpeg lossy codec - - - sonicls - experimental FFmpeg lossless codec - - - vorbis - Vorbis - - - wmav1 - Windows Media Audio v1 - - - wmav2 - Windows Media Audio v2 - - - - - -The first column contains the codec names that should be passed after the -acodec option, like: - - - -An example with AC-3 compression: - -mencoder dvd://2 -o title2.avi -oac lavc -lavcopts acodec=ac3 -ovc copy - - - - -Contrary to libavcodec's video -codecs, its audio codecs do not make a wise usage of the bits they are -given as they lack some minimal psychoacoustic model (if at all) -which most other codec implementations feature. -However, note that all these audio codecs are very fast and work -out-of-the-box everywhere MEncoder has been -compiled with libavcodec (which -is the case most of time), and do not depend on external libraries. - - - -PCM/ADPCM format supplementary table - - - - - -PCM/ADPCM codec nameDescription - - - - pcm_s32le - signed 32-bit little-endian - - - pcm_s32be - signed 32-bit big-endian - - - pcm_u32le - unsigned 32-bit little-endian - - - pcm_u32be - unsigned 32-bit big-endian - - - pcm_s24le - signed 24-bit little-endian - - - pcm_s24be - signed 24-bit big-endian - - - pcm_u24le - unsigned 24-bit little-endian - - - pcm_u24be - unsigned 24-bit big-endian - - - pcm_s16le - signed 16-bit little-endian - - - pcm_s16be - signed 16-bit big-endian - - - pcm_u16le - unsigned 16-bit little-endian - - - pcm_u16be - unsigned 16-bit big-endian - - - pcm_s8 - signed 8-bit - - - pcm_u8 - unsigned 8-bit - - - pcm_alaw - G.711 A-LAW - - - pcm_mulaw - G.711 μ-LAW - - - pcm_s24daud - signed 24-bit D-Cinema Audio format - - - pcm_zork - Activision Zork Nemesis - - - adpcm_ima_qt - Apple QuickTime - - - adpcm_ima_wav - Microsoft/IBM WAVE - - - adpcm_ima_dk3 - Duck DK3 - - - adpcm_ima_dk4 - Duck DK4 - - - adpcm_ima_ws - Westwood Studios - - - adpcm_ima_smjpeg - SDL Motion JPEG - - - adpcm_ms - Microsoft - - - adpcm_4xm - 4X Technologies - - - adpcm_xa - Phillips Yellow Book CD-ROM eXtended Architecture - - - adpcm_ea - Electronic Arts - - - adpcm_ct - Creative 16->4-bit - - - adpcm_swf - Adobe Shockwave Flash - - - adpcm_yamaha - Yamaha - - - adpcm_sbpro_4 - Creative VOC SoundBlaster Pro 8->4-bit - - - adpcm_sbpro_3 - Creative VOC SoundBlaster Pro 8->2.6-bit - - - adpcm_sbpro_2 - Creative VOC SoundBlaster Pro 8->2-bit - - - adpcm_thp - Nintendo GameCube FMV THP - - - adpcm_adx - Sega/CRI ADX - - - - - - - - - - - - -Encoding options of libavcodec - - -Ideally, you would probably want to be able to just tell the encoder to switch -into "high quality" mode and move on. -That would probably be nice, but unfortunately hard to implement as different -encoding options yield different quality results depending on the source -material. That is because compression depends on the visual properties of the -video in question. -For example, Anime and live action have very different properties and -thus require different options to obtain optimum encoding. -The good news is that some options should never be left out, like -, , and . -See below for a detailed description of common encoding options. - - - -Options to adjust: - - vmax_b_frames: 1 or 2 is good, depending on - the movie. - Note that if you need to have your encode be decodable by DivX5, you - need to activate closed GOP support, using - libavcodec's - option, but you need to deactivate scene detection, which - is not a good idea as it will hurt encode efficiency a bit. - - - vb_strategy=1: helps in high-motion scenes. - On some videos, vmax_b_frames may hurt quality, but vmax_b_frames=2 along - with vb_strategy=1 helps. - - - dia: motion search range. Bigger is better - and slower. - Negative values are a completely different scale. - Good values are -1 for a fast encode, or 2-4 for slower. - - - predia: motion search pre-pass. - Not as important as dia. Good values are 1 (default) to 4. Requires preme=2 - to really be useful. - - - cmp, subcmp, precmp: Comparison function for - motion estimation. - Experiment with values of 0 (default), 2 (hadamard), 3 (dct), and 6 (rate - distortion). - 0 is fastest, and sufficient for precmp. - For cmp and subcmp, 2 is good for Anime, and 3 is good for live action. - 6 may or may not be slightly better, but is slow. - - - last_pred: Number of motion predictors to - take from the previous frame. - 1-3 or so help at little speed cost. - Higher values are slow for no extra gain. - - - cbp, mv0: Controls the selection of - macroblocks. Small speed cost for small quality gain. - - - qprd: adaptive quantization based on the - macroblock's complexity. - May help or hurt depending on the video and other options. - This can cause artifacts unless you set vqmax to some reasonably small value - (6 is good, maybe as low as 4); vqmin=1 should also help. - - - qns: very slow, especially when combined - with qprd. - This option will make the encoder minimize noise due to compression - artifacts instead of making the encoded video strictly match the source. - Do not use this unless you have already tweaked everything else as far as it - will go and the results still are not good enough. - - - vqcomp: Tweak ratecontrol. - What values are good depends on the movie. - You can safely leave this alone if you want. - Reducing vqcomp puts more bits on low-complexity scenes, increasing it puts - them on high-complexity scenes (default: 0.5, range: 0-1. recommended range: - 0.5-0.7). - - - vlelim, vcelim: Sets the single coefficient - elimination threshold for luminance and chroma planes. - These are encoded separately in all MPEG-like algorithms. - The idea behind these options is to use some good heuristics to determine - when the change in a block is less than the threshold you specify, and in - such a case, to just encode the block as "no change". - This saves bits and perhaps speeds up encoding. vlelim=-4 and vcelim=9 - seem to be good for live movies, but seem not to help with Anime; - when encoding animation, you should probably leave them unchanged. - - - qpel: Quarter pixel motion estimation. - MPEG-4 uses half pixel precision for its motion search by default, - therefore this option comes with an overhead as more information will be - stored in the encoded file. - The compression gain/loss depends on the movie, but it is usually not very - effective on Anime. - qpel always incurs a significant cost in CPU decode time (+25% in - practice). - - - psnr: does not affect the actual encoding, - but writes a log file giving the type/size/quality of each frame, and - prints a summary of PSNR (Peak Signal to Noise Ratio) at the end. - - - - -Options not recommended to play with: - - vme: The default is best. - - - lumi_mask, dark_mask: Psychovisual adaptive - quantization. - You do not want to play with those options if you care about quality. - Reasonable values may be effective in your case, but be warned this is very - subjective. - - - scplx_mask: Tries to prevent blocky - artifacts, but postprocessing is better. - - - - - - - -Encoding setting examples - - -The following settings are examples of different encoding -option combinations that affect the speed vs quality tradeoff -at the same target bitrate. - - - -All the encoding settings were tested on a 720x448 @30000/1001 fps -video sample, the target bitrate was 900kbps, and the machine was an -AMD-64 3400+ at 2400 MHz in 64 bits mode. -Each encoding setting features the measured encoding speed (in -frames per second) and the PSNR loss (in dB) compared to the "very -high quality" setting. -Please understand that depending on your source, your machine type -and development advancements, you may get very different results. - - - - - - - - Description - Encoding options - speed (in fps) - Relative PSNR loss (in dB) - - - - - Very high quality - - 6fps - 0dB - - - High quality - - 15fps - -0.5dB - - - Fast - - 42fps - -0.74dB - - - Realtime - - 54fps - -1.21dB - - - - - - - - - - -Custom inter/intra matrices - - -With this feature of -libavcodec -you are able to set custom inter (I-frames/keyframes) and intra -(P-frames/predicted frames) matrices. It is supported by many of the codecs: -mpeg1video and mpeg2video -are reported as working. - - - -A typical usage of this feature is to set the matrices preferred by the -KVCD specifications. - - - -The KVCD "Notch" Quantization Matrix: - - - -Intra: - - 8 9 12 22 26 27 29 34 - 9 10 14 26 27 29 34 37 -12 14 18 27 29 34 37 38 -22 26 27 31 36 37 38 40 -26 27 29 36 39 38 40 48 -27 29 34 37 38 40 48 58 -29 34 37 38 40 48 58 69 -34 37 38 40 48 58 69 79 - - -Inter: - -16 18 20 22 24 26 28 30 -18 20 22 24 26 28 30 32 -20 22 24 26 28 30 32 34 -22 24 26 30 32 32 34 36 -24 26 28 32 34 34 36 38 -26 28 30 32 34 36 38 40 -28 30 32 34 36 38 42 42 -30 32 34 36 38 40 42 44 - - - - -Usage: - -mencoder input.avi -o output.avi -oac copy -ovc lavc \ - -lavcopts inter_matrix=...:intra_matrix=... - - - - - -mencoder input.avi -ovc lavc -lavcopts \ -vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,\ -12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27,\ -29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79\ -:inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,\ -28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,\ -36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44 -oac copy -o svcd.mpg - - - - - - - -Example - - -So, you have just bought your shiny new copy of Harry Potter and the Chamber -of Secrets (widescreen edition, of course), and you want to rip this DVD -so that you can add it to your Home Theatre PC. This is a region 1 DVD, -so it is NTSC. The example below will still apply to PAL, except you will -omit (because the output framerate is the -same as the input framerate), and of course the crop dimensions will be -different. - - - -After running , we follow the process -detailed in the section How to deal -with telecine and interlacing in NTSC DVDs and discover that it is -24000/1001 fps progressive video, which means that we need not use an inverse -telecine filter, such as or -. - - - -Next, we want to determine the appropriate crop rectangle, so we use the -cropdetect filter: -mplayer dvd://1 -vf cropdetect -Make sure you seek to a fully filled frame (such as a bright scene, -past the opening credits and logos), and -you will see in MPlayer's console output: -crop area: X: 0..719 Y: 57..419 (-vf crop=720:362:0:58) -We then play the movie back with this filter to test its correctness: -mplayer dvd://1 -vf crop=720:362:0:58 -And we see that it looks perfectly fine. Next, we ensure the width and -height are a multiple of 16. The width is fine, however the height is -not. Since we did not fail 7th grade math, we know that the nearest -multiple of 16 lower than 362 is 352. - - - -We could just use , but it would be nice -to take a little off the top and a little off the bottom so that we -retain the center. We have shrunk the height by 10 pixels, but we do not -want to increase the y-offset by 5-pixels since that is an odd number and -will adversely affect quality. Instead, we will increase the y-offset by -4 pixels: -mplayer dvd://1 -vf crop=720:352:0:62 -Another reason to shave pixels from both the top and the bottom is that we -ensure we have eliminated any half-black pixels if they exist. Note that if -your video is telecined, make sure the filter (or -whichever inverse telecine filter you decide to use) appears in the filter -chain before you crop. If it is interlaced, deinterlace before cropping. -(If you choose to preserve the interlaced video, then make sure your -vertical crop offset is a multiple of 4.) - - - -If you are really concerned about losing those 10 pixels, you might -prefer instead to scale the dimensions down to the nearest multiple of 16. -The filter chain would look like: --vf crop=720:362:0:58,scale=720:352 -Scaling the video down like this will mean that some small amount of -detail is lost, though it probably will not be perceptible. Scaling up will -result in lower quality (unless you increase the bitrate). Cropping -discards those pixels altogether. It is a tradeoff that you will want to -consider for each circumstance. For example, if the DVD video was made -for television, you might want to avoid vertical scaling, since the line -sampling corresponds to the way the content was originally recorded. - - - -On inspection, we see that our movie has a fair bit of action and high -amounts of detail, so we pick 2400Kbit for our bitrate. - - - -We are now ready to do the two pass encode. Pass one: - -mencoder dvd://1 -ofps 24000/1001 -oac copy -o Harry_Potter_2.avi -ovc lavc \ - -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:autoaspect:vpass=1 \ - -vf pullup,softskip,crop=720:352:0:62,hqdn3d=2:1:2 - -And pass two is the same, except that we specify : - -mencoder dvd://1 -ofps 24000/1001 -oac copy -o Harry_Potter_2.avi -ovc lavc \ - -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:autoaspect:vpass=2 \ - -vf pullup,softskip,crop=720:352:0:62,hqdn3d=2:1:2 - - - - -The options will greatly increase the -quality at the expense of encoding time. There is little reason to leave -these options out when the primary goal is quality. The options - select a comparison function that -yields higher quality than the defaults. You might try experimenting with -this parameter (refer to the man page for the possible values) as -different functions can have a large impact on quality depending on the -source material. For example, if you find -libavcodec produces too much -blocky artifacts, you could try selecting the experimental NSSE as -comparison function via . - - - -For this movie, the resulting AVI will be 138 minutes long and nearly -3GB. And because you said that file size does not matter, this is a -perfectly acceptable size. However, if you had wanted it smaller, you -could try a lower bitrate. Increasing bitrates have diminishing -returns, so while we might clearly see an improvement from 1800Kbit to -2000Kbit, it might not be so noticeable above 2000Kbit. Feel -free to experiment until you are happy. - - - -Because we passed the source video through a denoise filter, you may want -to add some of it back during playback. This, along with the - post-processing filter, drastically improves the -perception of quality and helps eliminate blocky artifacts in the video. -With MPlayer's option, -you can vary the amount of post-processing done by the spp filter -depending on available CPU. Also, at this point, you may want to apply -gamma and/or color correction to best suit your display. For example: - -mplayer Harry_Potter_2.avi -vf spp,noise=9ah:5ah,eq2=1.2 -autoq 3 - - - - - - - - - - -Encoding with the <systemitem class="library">Xvid</systemitem> - codec - - -Xvid is a free library for -encoding MPEG-4 ASP video streams. -Before starting to encode, you need to -set up MEncoder to support it. - - - -This guide mainly aims at featuring the same kind of information -as x264's encoding guide. -Therefore, please begin by reading -the first part -of that guide. - - - - - -What options should I use to get the best results? - - -Please begin by reviewing the -Xvid section of -MPlayer's man page. -This section is intended to be a supplement to the man page. - - - -The Xvid default settings are already a good tradeoff between -speed and quality, therefore you can safely stick to them if -the following section puzzles you. - - - - - - -Encoding options of <systemitem class="library">Xvid</systemitem> - - - - vhq - This setting affects the macroblock decision algorithm, where the - higher the setting, the wiser the decision. - The default setting may be safely used for every encode, while - higher settings always help PSNR but are significantly slower. - Please note that a better PSNR does not necessarily mean - that the picture will look better, but tells you that it is - closer to the original. - Turning it off will noticeably speed up encoding; if speed is - critical for you, the tradeoff may be worth it. - - - bvhq - This does the same job as vhq, but does it on B-frames. - It has a negligible impact on speed, and slightly improves quality - (around +0.1dB PSNR). - - - max_bframes - A higher number of consecutive allowed B-frames usually improves - compressibility, although it may also lead to more blocking artifacts. - The default setting is a good tradeoff between compressibility and - quality, but you may increase it up to 3 if you are bitrate-starved. - You may also decrease it to 1 or 0 if you are aiming at perfect - quality, though in that case you should make sure your - target bitrate is high enough to ensure that the encoder does not - have to increase quantizers to reach it. - - - bf_threshold - This controls the B-frame sensitivity of the encoder, where a higher - value leads to more B-frames being used (and vice versa). - This setting is to be used together with ; - if you are bitrate-starved, you should increase both - and , - while you may increase and reduce - so that the encoder may use more - B-frames in places that only really - need them. - A low number of and a high value of - is probably not a wise choice as it - will force the encoder to put B-frames in places that would not - benefit from them, therefore reducing visual quality. - However, if you need to be compatible with standalone players that - only support old DivX profiles (which only supports up to 1 - consecutive B-frame), this would be your only way to - increase compressibility through using B-frames. - - - trellis - Optimizes the quantization process to get an optimal tradeoff - between PSNR and bitrate, which allows significant bit saving. - These bits will in return be spent elsewhere on the video, - raising overall visual quality. - You should always leave it on as its impact on quality is huge. - Even if you are looking for speed, do not disable it until you - have turned down and all other more - CPU-hungry options to the minimum. - - - hq_ac - Activates a better coefficient cost estimation method, which slightly - reduces file size by around 0.15 to 0.19% (which corresponds to less - than 0.01dB PSNR increase), while having a negligible impact on speed. - It is therefore recommended to always leave it on. - - - cartoon - Designed to better encode cartoon content, and has no impact on - speed as it just tunes the mode decision heuristics for this type - of content. - - - - me_quality - This setting is to control the precision of the motion estimation. - The higher , the more - precise the estimation of the original motion will be, and the - better the resulting clip will capture the original motion. - - - The default setting is best in all cases; - thus it is not recommended to turn it down unless you are - really looking for speed, as all the bits saved by a good motion - estimation would be spent elsewhere, raising overall quality. - Therefore, do not go any lower than 5, and even that only as a last - resort. - - - - chroma_me - Improves motion estimation by also taking the chroma (color) - information into account, whereas - alone only uses luma (grayscale). - This slows down encoding by 5-10% but improves visual quality - quite a bit by reducing blocking effects and reduces file size by - around 1.3%. - If you are looking for speed, you should disable this option before - starting to consider reducing . - - - chroma_opt - Is intended to increase chroma image quality around pure - white/black edges, rather than improving compression. - This can help to reduce the "red stairs" effect. - - - lumi_mask - Tries to give less bitrate to part of the picture that the - human eye cannot see very well, which should allow the encoder - to spend the saved bits on more important parts of the picture. - The quality of the encode yielded by this option highly depends - on personal preferences and on the type and monitor settings - used to watch it (typically, it will not look as good if it is - bright or if it is a TFT monitor). - - - - qpel - Raise the number of candidate motion vectors by increasing - the precision of the motion estimation from halfpel to - quarterpel. - The idea is to find better motion vectors which will in return - reduce bitrate (hence increasing quality). - However, motion vectors with quarterpel precision require a - few extra bits to code, but the candidate vectors do not always - give (much) better results. - Quite often, the codec still spends bits on the extra precision, - but little or no extra quality is gained in return. - Unfortunately, there is no way to foresee the possible gains of - , so you need to actually encode with and - without it to know for sure. - - - can be almost double encoding time, and - requires as much as 25% more processing power to decode. - It is not supported by all standalone players. - - - - gmc - Tries to save bits on panning scenes by using a single motion - vector for the whole frame. - This almost always raises PSNR, but significantly slows down - encoding (as well as decoding). - Therefore, you should only use it when you have turned - to the maximum. - Xvid's GMC is more - sophisticated than DivX's, but is only supported by few - standalone players. - - - - - - - -Encoding profiles - - -Xvid supports encoding profiles through the option, -which are used to impose restrictions on the properties of the Xvid video -stream such that it will be playable on anything which supports the -chosen profile. -The restrictions relate to resolutions, bitrates and certain MPEG-4 -features. -The following table shows what each profile supports. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Simple - Advanced Simple - DivX - - - Profile name - 0 - 1 - 2 - 3 - 0 - 1 - 2 - 3 - 4 - 5 - Handheld - Portable NTSC - Portable PAL - Home Theater NTSC - Home Theater PAL - HDTV - - - Width [pixels] - 176 - 176 - 352 - 352 - 176 - 176 - 352 - 352 - 352 - 720 - 176 - 352 - 352 - 720 - 720 - 1280 - - - Height [pixels] - 144 - 144 - 288 - 288 - 144 - 144 - 288 - 288 - 576 - 576 - 144 - 240 - 288 - 480 - 576 - 720 - - - Frame rate [fps] - 15 - 15 - 15 - 15 - 30 - 30 - 15 - 30 - 30 - 30 - 15 - 30 - 25 - 30 - 25 - 30 - - - Max average bitrate [kbps] - 64 - 64 - 128 - 384 - 128 - 128 - 384 - 768 - 3000 - 8000 - 537.6 - 4854 - 4854 - 4854 - 4854 - 9708.4 - - - Peak average bitrate over 3 secs [kbps] - - - - - - - - - - - 800 - 8000 - 8000 - 8000 - 8000 - 16000 - - - Max. B-frames - 0 - 0 - 0 - 0 - - - - - - - 0 - 1 - 1 - 1 - 1 - 2 - - - MPEG quantization - - - - - X - X - X - X - X - X - - - - - - - - - Adaptive quantization - - - - - X - X - X - X - X - X - X - X - X - X - X - X - - - Interlaced encoding - - - - - X - X - X - X - X - X - - - - X - X - X - - - Quarterpixel - - - - - X - X - X - X - X - X - - - - - - - - - Global motion compensation - - - - - X - X - X - X - X - X - - - - - - - - - - - - - - - -Encoding setting examples - - -The following settings are examples of different encoding -option combinations that affect the speed vs quality tradeoff -at the same target bitrate. - - - -All the encoding settings were tested on a 720x448 @30000/1001 fps -video sample, the target bitrate was 900kbps, and the machine was an -AMD-64 3400+ at 2400 MHz in 64 bits mode. -Each encoding setting features the measured encoding speed (in -frames per second) and the PSNR loss (in dB) compared to the "very -high quality" setting. -Please understand that depending on your source, your machine type -and development advancements, you may get very different results. - - - - - -DescriptionEncoding optionsspeed (in fps)Relative PSNR loss (in dB) - - - - Very high quality - - 16fps - 0dB - - - High quality - - 18fps - -0.1dB - - - Fast - - 28fps - -0.69dB - - - Realtime - - 38fps - -1.48dB - - - - - - - - - - - - -Encoding with the - <systemitem class="library">x264</systemitem> codec - - -x264 is a free library for -encoding H.264/AVC video streams. -Before starting to encode, you need to -set up MEncoder to support it. - - - - - -Encoding options of x264 - - -Please begin by reviewing the -x264 section of -MPlayer's man page. -This section is intended to be a supplement to the man page. -Here you will find quick hints about which options are most -likely to interest most people. The man page is more terse, -but also more exhaustive, and it sometimes offers much better -technical detail. - - - - -Introduction - - -This guide considers two major categories of encoding options: - - - - - Options which mainly trade off encoding time vs. quality - - - Options which may be useful for fulfilling various personal - preferences and special requirements - - - - -Ultimately, only you can decide which options are best for your -purposes. The decision for the first class of options is the simplest: -you only have to decide whether you think the quality differences -justify the speed differences. For the second class of options, -preferences may be far more subjective, and more factors may be -involved. Note that some of the "personal preferences and special -requirements" options can still have large impacts on speed or quality, -but that is not what they are primarily useful for. A couple of the -"personal preference" options may even cause changes that look better -to some people, but look worse to others. - - - -Before continuing, you need to understand that this guide uses only one -quality metric: global PSNR. -For a brief explanation of what PSNR is, see -the Wikipedia article on PSNR. -Global PSNR is the last PSNR number reported when you include -the option in . -Any time you read a claim about PSNR, one of the assumptions -behind the claim is that equal bitrates are used. - - - -Nearly all of this guide's comments assume you are using two pass. -When comparing options, there are two major reasons for using -two pass encoding. -First, using two pass often gains around 1dB PSNR, which is a -very big difference. -Secondly, testing options by doing direct quality comparisons -with one pass encodes introduces a major confounding -factor: bitrate often varies significantly with each encode. -It is not always easy to tell whether quality changes are due -mainly to changed options, or if they mostly reflect essentially -random differences in the achieved bitrate. - - - - - -Options which primarily affect speed and quality - - - - - subq: - Of the options which allow you to trade off speed for quality, - and (see below) are usually - by far the most important. - If you are interested in tweaking either speed or quality, these - are the first options you should consider. - On the speed dimension, the and - options interact with each other fairly - strongly. - Experience shows that, with one reference frame, - (the default setting) takes about 35% more time than - . - With 6 reference frames, the penalty grows to over 60%. - 's effect on PSNR seems fairly constant - regardless of the number of reference frames. - Typically, achieves 0.2-0.5 dB higher global - PSNR in comparison . - This is usually enough to be visible. - - - is slower and yields better quality at a reasonable - cost. - In comparison to , it usually gains 0.1-0.4 dB - global PSNR with speed costs varying from 25%-100%. - Unlike other levels of , the behavior of - does not depend much on - and . Instead, the effectiveness of depends mostly upon the number of B-frames used. In normal - usage, this means has a large impact on both speed - and quality in complex, high motion scenes, but it may not have much effect - in low-motion scenes. Note that it is still recommended to always set - to something other than zero (see below). - - - is the slowest, highest quality mode. - In comparison to , it usually gains 0.01-0.05 dB - global PSNR with speed costs varying from 15%-33%. - Since the tradeoff encoding time vs. quality is quite low, you should - only use it if you are after every bit saving and if encoding time is - not an issue. - - - - - frameref: - is set to 1 by default, but this - should not be taken to imply that it is reasonable to set it to 1. - Merely raising to 2 gains around - 0.15dB PSNR with a 5-10% speed penalty; this seems like a good tradeoff. - gains around 0.25dB PSNR over - , which should be a visible difference. - is around 15% slower than - . - Unfortunately, diminishing returns set in rapidly. - can be expected to gain only - 0.05-0.1 dB over at an additional - 15% speed penalty. - Above , the quality gains are - usually very small (although you should keep in mind throughout - this whole discussion that it can vary quite a lot depending on your source). - In a fairly typical case, - will improve global PSNR by a tiny 0.02dB over - , at a speed cost of 15%-20%. - At such high values, the only really - good thing that can be said is that increasing it even further will - almost certainly never harm - PSNR, but the additional quality benefits are barely even - measurable, let alone perceptible. - - Note: - - Raising to unnecessarily high values - can and - usually does - hurt coding efficiency if you turn CABAC off. - With CABAC on (the default behavior), the possibility of setting - "too high" currently seems too remote - to even worry about, and in the future, optimizations may remove - the possibility altogether. - - - If you care about speed, a reasonable compromise is to use low - and values on - the first pass, and then raise them on the second pass. - Typically, this has a negligible negative effect on the final - quality: You will probably lose well under 0.1dB PSNR, which - should be much too small of a difference to see. - However, different values of can - occasionally affect frame type decision. - Most likely, these are rare outlying cases, but if you want to - be pretty sure, consider whether your video has either - fullscreen repetitive flashing patterns or very large temporary - occlusions which might force an I-frame. - Adjust the first-pass so it is large - enough to contain the duration of the flashing cycle (or occlusion). - For example, if the scene flashes back and forth between two images - over a duration of three frames, set the first pass - to 3 or higher. - This issue is probably extremely rare in live action video material, - but it does sometimes come up in video game captures. - - - - - me: - This option is for choosing the motion estimation search method. - Altering this option provides a straightforward quality-vs-speed - tradeoff. is only a few percent faster than - the default search, at a cost of under 0.1dB global PSNR. The - default setting () is a reasonable tradeoff - between speed and quality. gains a little under - 0.1dB global PSNR, with a speed penalty that varies depending on - . At high values of - (e.g. 12 or so), - is about 40% slower than the default . With - , the speed penalty incurred drops to - 25%-30%. - - - uses an exhaustive search that is too slow for - practical use. - - - - partitions=all: - This option enables the use of 8x4, 4x8 and 4x4 subpartitions in - predicted macroblocks (in addition to the default partitions). - Enabling it results in a fairly consistent - 10%-15% loss of speed. This option is rather useless in source - containing only low motion, however in some high-motion source, - particularly source with lots of small moving objects, gains of - about 0.1dB can be expected. - - - - bframes: - If you are used to encoding with other codecs, you may have found - that B-frames are not always useful. - In H.264, this has changed: there are new techniques and block - types that are possible in B-frames. - Usually, even a naive B-frame choice algorithm can have a - significant PSNR benefit. - It is interesting to note that using B-frames usually speeds up - the second pass somewhat, and may also speed up a single - pass encode if adaptive B-frame decision is turned off. - - - With adaptive B-frame decision turned off - ('s ), - the optimal value for this setting is usually no more than - , or else high-motion scenes can suffer. - With adaptive B-frame decision on (the default behavior), it is - safe to use higher values; the encoder will reduce the use of - B-frames in scenes where they would hurt compression. - The encoder rarely chooses to use more than 3 or 4 B-frames; - setting this option any higher will have little effect. - - - - - b_adapt: - Note: This is on by default. - - - With this option enabled, the encoder will use a reasonably fast - decision process to reduce the number of B-frames used in scenes that - might not benefit from them as much. - You can use to tweak how B-frame-happy - the encoder is. - The speed penalty of adaptive B-frames is currently rather modest, - but so is the potential quality gain. - It usually does not hurt, however. - Note that this only affects speed and frame type decision on the - first pass. - and have no - effect on subsequent passes. - - - - b_pyramid: - You might as well enable this option if you are using >=2 B-frames; - as the man page says, you get a little quality improvement at no - speed cost. - Note that these videos cannot be read by libavcodec-based decoders - older than about March 5, 2005. - - - - weight_b: - In typical cases, there is not much gain with this option. - However, in crossfades or fade-to-black scenes, weighted - prediction gives rather large bitrate savings. - In MPEG-4 ASP, a fade-to-black is usually best coded as a series - of expensive I-frames; using weighted prediction in B-frames - makes it possible to turn at least some of these into much smaller - B-frames. - Encoding time cost is minimal, as no extra decisions need to be made. - Also, contrary to what some people seem to guess, the decoder - CPU requirements are not much affected by weighted prediction, - all else being equal. - - - Unfortunately, the current adaptive B-frame decision algorithm - has a strong tendency to avoid B-frames during fades. - Until this changes, it may be a good idea to add - to your x264encopts, if you expect - fades to have a large effect in your particular video - clip. - - - - - threads: - This option allows to spawn threads to encode in parallel on multiple CPUs. - You can manually select the number of threads to be created or, better, set - and let - x264 detect how many CPUs are - available and pick an appropriate number of threads. - If you have a multi-processor machine, you should really consider using it - as it can to increase encoding speed linearly with the number of CPU cores - (about 94% per CPU core), with very little quality reduction (about 0.005dB - for dual processor, about 0.01dB for a quad processor machine). - - - - - - - -Options pertaining to miscellaneous preferences - - - - - Two pass encoding: - Above, it was suggested to always use two pass encoding, but there - are still reasons for not using it. For instance, if you are capturing - live TV and encoding in realtime, you are forced to use single-pass. - Also, one pass is obviously faster than two passes; if you use the - exact same set of options on both passes, two pass encoding is almost - twice as slow. - - - Still, there are very good reasons for using two pass encoding. For - one thing, single pass ratecontrol is not psychic, and it often makes - unreasonable choices because it cannot see the big picture. For example, - suppose you have a two minute long video consisting of two distinct - halves. The first half is a very high-motion scene lasting 60 seconds - which, in isolation, requires about 2500kbps in order to look decent. - Immediately following it is a much less demanding 60-second scene - that looks good at 300kbps. Suppose you ask for 1400kbps on the theory - that this is enough to accommodate both scenes. Single pass ratecontrol - will make a couple of "mistakes" in such a case. First of all, it - will target 1400kbps in both segments. The first segment may end up - heavily overquantized, causing it to look unacceptably and unreasonably - blocky. The second segment will be heavily underquantized; it may look - perfect, but the bitrate cost of that perfection will be completely - unreasonable. What is even harder to avoid is the problem at the - transition between the two scenes. The first seconds of the low motion - half will be hugely over-quantized, because the ratecontrol is still - expecting the kind of bitrate requirements it met in the first half - of the video. This "error period" of heavily over-quantized low motion - will look jarringly bad, and will actually use less than the 300kbps - it would have taken to make it look decent. There are ways to - mitigate the pitfalls of single-pass encoding, but they may tend to - increase bitrate misprediction. - - - Multipass ratecontrol can offer huge advantages over a single pass. - Using the statistics gathered from the first pass encode, the encoder - can estimate, with reasonable accuracy, the "cost" (in bits) of - encoding any given frame, at any given quantizer. This allows for - a much more rational, better planned allocation of bits between the - expensive (high-motion) and cheap (low-motion) scenes. See - below for some ideas on how to tweak this - allocation to your liking. - - - Moreover, two passes need not take twice as long as one pass. You can - tweak the options in the first pass for higher speed and lower quality. - If you choose your options well, you can get a very fast first pass. - The resulting quality in the second pass will be slightly lower because size - prediction is less accurate, but the quality difference is normally much - too small to be visible. Try, for example, adding - to the first pass - . Then, on the second pass, use slower, - higher-quality options: - - - - - Three pass encoding? - x264 offers the ability to make an arbitrary number of consecutive - passes. If you specify on the first pass, - then use on a subsequent pass, the subsequent - pass will both read the statistics from the previous pass, and write - its own statistics. An additional pass following this one will have - a very good base from which to make highly accurate predictions of - frame sizes at a chosen quantizer. In practice, the overall quality - gain from this is usually close to zero, and quite possibly a third - pass will result in slightly worse global PSNR than the pass before - it. In typical usage, three passes help if you get either bad bitrate - prediction or bad looking scene transitions when using only two passes. - This is somewhat likely to happen on extremely short clips. There are - also a few special cases in which three (or more) passes are handy - for advanced users, but for brevity, this guide omits discussing those - special cases. - - - qcomp: - trades off the number of bits allocated - to "expensive" high-motion versus "cheap" low-motion frames. At - one extreme, aims for true constant - bitrate. Typically this would make high-motion scenes look completely - awful, while low-motion scenes would probably look absolutely - perfect, but would also use many times more bitrate than they - would need in order to look merely excellent. At the other extreme, - achieves nearly constant quantization parameter - (QP). Constant QP does not look bad, but most people think it is more - reasonable to shave some bitrate off of the extremely expensive scenes - (where the loss of quality is not as noticeable) and reallocate it to - the scenes that are easier to encode at excellent quality. - is set to 0.6 by default, which may be slightly - low for many peoples' taste (0.7-0.8 are also commonly used). - - - keyint: - is solely for trading off file seekability against - coding efficiency. By default, is set to 250. In - 25fps material, this guarantees the ability to seek to within 10 seconds - precision. If you think it would be important and useful to be able to - seek within 5 seconds of precision, set ; - this will hurt quality/bitrate slightly. If you care only about quality - and not about seekability, you can set it to much higher values - (understanding that there are diminishing returns which may become - vanishingly low, or even zero). The video stream will still have seekable - points as long as there are some scene changes. - - - - deblock: - This topic is going to be a bit controversial. - - - H.264 defines a simple deblocking procedure on I-blocks that uses - pre-set strengths and thresholds depending on the QP of the block - in question. - By default, high QP blocks are filtered heavily, and low QP blocks - are not deblocked at all. - The pre-set strengths defined by the standard are well-chosen and - the odds are very good that they are PSNR-optimal for whatever - video you are trying to encode. - The allow you to specify offsets to the preset - deblocking thresholds. - - - Many people seem to think it is a good idea to lower the deblocking - filter strength by large amounts (say, -3). - This is however almost never a good idea, and in most cases, - people who are doing this do not understand very well how - deblocking works by default. - - - The first and most important thing to know about the in-loop - deblocking filter is that the default thresholds are almost always - PSNR-optimal. - In the rare cases that they are not optimal, the ideal offset is - plus or minus 1. - Adjusting deblocking parameters by a larger amount is almost - guaranteed to hurt PSNR. - Strengthening the filter will smear more details; weakening the - filter will increase the appearance of blockiness. - - - It is definitely a bad idea to lower the deblocking thresholds if - your source is mainly low in spacial complexity (i.e., not a lot - of detail or noise). - The in-loop filter does a rather excellent job of concealing - the artifacts that occur. - If the source is high in spacial complexity, however, artifacts - are less noticeable. - This is because the ringing tends to look like detail or noise. - Human visual perception easily notices when detail is removed, - but it does not so easily notice when the noise is wrongly - represented. - When it comes to subjective quality, noise and detail are somewhat - interchangeable. - By lowering the deblocking filter strength, you are most likely - increasing error by adding ringing artifacts, but the eye does - not notice because it confuses the artifacts with detail. - - - This still does not justify - lowering the deblocking filter strength, however. - You can generally get better quality noise from postprocessing. - If your H.264 encodes look too blurry or smeared, try playing with - when you play your encoded movie. - should conceal most mild - artifacts. - It will almost certainly look better than the results you - would have gotten just by fiddling with the deblocking filter. - - - - - - - - - -Encoding setting examples - - -The following settings are examples of different encoding -option combinations that affect the speed vs quality tradeoff -at the same target bitrate. - - - -All the encoding settings were tested on a 720x448 @30000/1001 fps -video sample, the target bitrate was 900kbps, and the machine was an -AMD-64 3400+ at 2400 MHz in 64 bits mode. -Each encoding setting features the measured encoding speed (in -frames per second) and the PSNR loss (in dB) compared to the "very -high quality" setting. -Please understand that depending on your source, your machine type -and development advancements, you may get very different results. - - - - - - - Description - Encoding options - speed (in fps) - Relative PSNR loss (in dB) - - - - - Very high quality - - 6fps - 0dB - - - High quality - - 13fps - -0.89dB - - - Fast - - 17fps - -1.48dB - - - - - - - - - - - - - - Encoding with the <systemitem class="library">Video For Windows</systemitem> - codec family - - - -Video for Windows provides simple encoding by means of binary video codecs. -You can encode with the following codecs (if you have more, please tell us!) - - - -Note that support for this is very experimental and some codecs may not work -correctly. Some codecs will only work in certain colorspaces, try - and -if a codec fails or gives wrong output. - - - - - -Video for Windows supported codecs - - - - - - - Video codec file name - Description (FourCC) - md5sum - Comment - - - - - aslcodec_vfw.dll - Alparysoft lossless codec vfw (ASLC) - 608af234a6ea4d90cdc7246af5f3f29a - - - - avimszh.dll - AVImszh (MSZH) - 253118fe1eedea04a95ed6e5f4c28878 - needs - - - avizlib.dll - AVIzlib (ZLIB) - 2f1cc76bbcf6d77d40d0e23392fa8eda - - - - divx.dll - DivX4Windows-VFW - acf35b2fc004a89c829531555d73f1e6 - - - - huffyuv.dll - HuffYUV (lossless) (HFYU) - b74695b50230be4a6ef2c4293a58ac3b - - - - iccvid.dll - Cinepak Video (cvid) - cb3b7ee47ba7dbb3d23d34e274895133 - - - - icmw_32.dll - Motion Wavelets (MWV1) - c9618a8fc73ce219ba918e3e09e227f2 - - - - jp2avi.dll - ImagePower MJPEG2000 (IPJ2) - d860a11766da0d0ea064672c6833768b - - - - m3jp2k32.dll - Morgan MJPEG2000 (MJ2C) - f3c174edcbaef7cb947d6357cdfde7ff - - - - m3jpeg32.dll - Morgan Motion JPEG Codec (MJPEG) - 1cd13fff5960aa2aae43790242c323b1 - - - - mpg4c32.dll - Microsoft MPEG-4 v1/v2 - b5791ea23f33010d37ab8314681f1256 - - - - tsccvid.dll - TechSmith Camtasia Screen Codec (TSCC) - 8230d8560c41d444f249802a2700d1d5 - shareware error on windows - - - vp31vfw.dll - On2 Open Source VP3 Codec (VP31) - 845f3590ea489e2e45e876ab107ee7d2 - - - - vp4vfw.dll - On2 VP4 Personal Codec (VP40) - fc5480a482ccc594c2898dcc4188b58f - - - - vp6vfw.dll - On2 VP6 Personal Codec (VP60) - 04d635a364243013898fd09484f913fb - - - - vp7vfw.dll - On2 VP7 Personal Codec (VP70) - cb4cc3d4ea7c94a35f1d81c3d750bc8d - - - - ViVD2.dll - SoftMedia ViVD V2 codec VfW (GXVE) - a7b4bf5cac630bb9262c3f80d8a773a1 - - - - msulvc06.DLL - MSU Lossless codec (MSUD) - 294bf9288f2f127bb86f00bfcc9ccdda - - Decodable by Window Media Player, - not MPlayer (yet). - - - - camcodec.dll - CamStudio lossless video codec (CSCD) - 0efe97ce08bb0e40162ab15ef3b45615 - sf.net/projects/camstudio - - - - - -The first column contains the codec names that should be passed after the -codec parameter, -like: -The FourCC code used by each codec is given in the parentheses. - - - - -An example to convert an ISO DVD trailer to a VP6 flash video file -using compdata bitrate settings: - -mencoder -dvd-device zeiram.iso dvd://7 -o trailer.flv \ --ovc vfw -xvfwopts codec=vp6vfw.dll:compdata=onepass.mcf -oac mp3lame \ --lameopts cbr:br=64 -af lavcresample=22050 -vf yadif,scale=320:240,flip \ --of lavf - - - - - - -Using vfw2menc to create a codec settings file. - - -To encode with the Video for Windows codecs, you will need to set bitrate -and other options. This is known to work on x86 on both *NIX and Windows. - - -First you must build the vfw2menc program. -It is located in the TOOLS subdirectory -of the MPlayer source tree. -To build on Linux, this can be done using Wine: -winegcc vfw2menc.c -o vfw2menc -lwinmm -lole32 - -To build on Windows in MinGW or -Cygwin use: -gcc vfw2menc.c -o vfw2menc.exe -lwinmm -lole32 - -To build on MSVC you will need getopt. -Getopt can be found in the original vfw2menc -archive available at: -The MPlayer on win32 project. - - - -Below is an example with the VP6 codec. - -vfw2menc -f VP62 -d vp6vfw.dll -s firstpass.mcf - -This will open the VP6 codec dialog window. -Repeat this step for the second pass -and use . - - - -Windows users can use - to have -the codec dialog display before encoding starts. - - - - - - - - - -Using <application>MEncoder</application> to create -<application>QuickTime</application>-compatible files - - - -Why would one want to produce <application>QuickTime</application>-compatible Files? - - - There are several reasons why producing - QuickTime-compatible files can be desirable. - - - - You want any computer illiterate to be able to watch your encode on - any major platform (Windows, Mac OS X, Unices …). - - - QuickTime is able to take advantage of more - hardware and software acceleration features of Mac OS X than - platform-independent players like MPlayer - or VLC. - That means that your encodes have a chance to be played smoothly by older - G4-powered machines. - - - QuickTime 7 supports the next-generation codec H.264, - which yields significantly better picture quality than previous codec - generations (MPEG-2, MPEG-4 …). - - - - - -<application>QuickTime</application> 7 limitations - - - QuickTime 7 supports H.264 video and AAC audio, - but it does not support them muxed in the AVI container format. - However, you can use MEncoder to encode - the video and audio, and then use an external program such as - mp4creator (part of the - MPEG4IP suite) - to remux the video and audio tracks into an MP4 container. - - - - QuickTime's support for H.264 is limited, - so you will need to drop some advanced features. - If you encode your video with features that - QuickTime 7 does not support, - QuickTime-based players will show you a pretty - white screen instead of your expected video. - - - - - B-frames: - QuickTime 7 supports a maximum of 1 B-frame, i.e. - . This means that - and will have no - effect, since they require to be greater than 1. - - - Macroblocks: - QuickTime 7 does not support 8x8 DCT macroblocks. - This option () is off by default, so just be sure - not to explicitly enable it. This also means that the - option will have no effect, since it requires . - - - Aspect ratio: - QuickTime 7 does not support SAR (sample - aspect ratio) information in MPEG-4 files; it assumes that SAR=1. Read - the section on scaling - for a workaround. QuickTime X no longer has this - limitation. - - - - - - -Cropping - - Suppose you want to rip your freshly bought copy of "The Chronicles of - Narnia". Your DVD is region 1, - which means it is NTSC. The example below would still apply to PAL, - except you would omit and use slightly - different and dimensions. - - - - After running , you follow the process - detailed in the section How to deal - with telecine and interlacing in NTSC DVDs and discover that it is - 24000/1001 fps progressive video. This simplifies the process somewhat, - since you do not need to use an inverse telecine filter such as - or a deinterlacing filter such as - . - - - - Next, you need to crop out the black bars from the top and bottom of the - video, as detailed in this - previous section. - - - - - -Scaling - - - The next step is truly heartbreaking. - QuickTime 7 does not support MPEG-4 videos - with a sample aspect ratio other than 1, so you will need to upscale - (which wastes a lot of disk space) or downscale (which loses some - details of the source) the video to square pixels. - Either way you do it, this is highly inefficient, but simply cannot - be avoided if you want your video to be playable by - QuickTime 7. - MEncoder can apply the appropriate upscaling - or downscaling by specifying respectively - or . - This will scale your video to the correct width for the cropped height, - rounded to the closest multiple of 16 for optimal compression. - Remember that if you are cropping, you should crop first, then scale: - - -vf crop=720:352:0:62,scale=-10:-1 - - - - - -A/V sync - - - Because you will be remuxing into a different container, you should - always use the option to ensure that duplicated - frames are actually duplicated in the video output. Without this option, - MEncoder will simply put a marker in the video - stream that a frame was duplicated, and rely on the client software to - show the same frame twice. Unfortunately, this "soft duplication" does - not survive remuxing, so the audio would slowly lose sync with the video. - - - - The final filter chain looks like this: - -vf crop=720:352:0:62,scale=-10:-1,harddup - - - - - -Bitrate - - - As always, the selection of bitrate is a matter of the technical properties - of the source, as explained - here, as - well as a matter of taste. - This movie has a fair bit of action and lots of detail, but H.264 video - looks good at much lower bitrates than XviD or other MPEG-4 codecs. - After much experimentation, the author of this guide chose to encode - this movie at 900kbps, and thought that it looked very good. - You may decrease bitrate if you need to save more space, or increase - it if you need to improve quality. - - - - - -Encoding example - - - You are now ready to encode the video. Since you care about - quality, of course you will be doing a two-pass encode. To shave off - some encoding time, you can specify the option - on the first pass; this reduces and - to 1. To save some disk space, you can - use the option to strip off the first few seconds - of the video. (I found that this particular movie has 32 seconds of - credits and logos.) can be 0 or 1. - The other options are documented in Encoding with - the x264 codec and - the man page. - - mencoder dvd://1 -o /dev/null -ss 32 -ovc x264 \ --x264encopts pass=1:turbo:bitrate=900:bframes=1:\ -me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 \ --vf crop=720:352:0:62,scale=-10:-1,harddup \ --oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 \ --ofps 24000/1001 - - If you have a multi-processor machine, don't miss the opportunity to - dramatically speed-up encoding by enabling - - x264's multi-threading mode - by adding to your - command-line. - - - - The second pass is the same, except that you specify the output file - and set . - - mencoder dvd://1 -o narnia.avi -ss 32 -ovc x264 \ --x264encopts pass=2:turbo:bitrate=900:frameref=5:bframes=1:\ -me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 \ --vf crop=720:352:0:62,scale=-10:-1,harddup \ --oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 \ --ofps 24000/1001 - - - - The resulting AVI should play perfectly in - MPlayer, but of course - QuickTime can not play it because it does - not support H.264 muxed in AVI. - So the next step is to remux the video into an MP4 container. - - - - -Remuxing as MP4 - - - There are several ways to remux AVI files to MP4. You can use - mp4creator, which is part of the - MPEG4IP suite. - - - - First, demux the AVI into separate audio and video streams using - MPlayer. - - mplayer narnia.avi -dumpaudio -dumpfile narnia.aac -mplayer narnia.avi -dumpvideo -dumpfile narnia.h264 - - The file names are important; mp4creator - requires that AAC audio streams be named .aac - and H.264 video streams be named .h264. - - - - Now use mp4creator to create a new - MP4 file out of the audio and video streams. - - mp4creator -create=narnia.aac narnia.mp4 -mp4creator -create=narnia.h264 -rate=23.976 narnia.mp4 - - Unlike the encoding step, you must specify the framerate as a - decimal (such as 23.976), not a fraction (such as 24000/1001). - - - - This narnia.mp4 file should now be playable - with any QuickTime 7 application, such as - QuickTime Player or - iTunes. If you are planning to view the - video in a web browser with the QuickTime - plugin, you should also hint the movie so that the - QuickTime plugin can start playing it - while it is still downloading. mp4creator - can create these hint tracks: - - mp4creator -hint=1 narnia.mp4 -mp4creator -hint=2 narnia.mp4 -mp4creator -optimize narnia.mp4 - - You can check the final result to ensure that the hint tracks were - created successfully: - - mp4creator -list narnia.mp4 - - You should see a list of tracks: 1 audio, 1 video, and 2 hint tracks. - -Track Type Info -1 audio MPEG-4 AAC LC, 8548.714 secs, 190 kbps, 48000 Hz -2 video H264 Main@5.1, 8549.132 secs, 899 kbps, 848x352 @ 23.976001 fps -3 hint Payload mpeg4-generic for track 1 -4 hint Payload H264 for track 2 - - - - - - -Adding metadata tags - - - If you want to add tags to your video that show up in iTunes, you can use - AtomicParsley. - - AtomicParsley narnia.mp4 --metaEnema --title "The Chronicles of Narnia" --year 2005 --stik Movie --freefree --overWrite + + - The option removes any existing metadata - (mp4creator inserts its name in the - "encoding tool" tag), and reclaims the - space from the deleted metadata. - The option sets the type of video (such as Movie - or TV Show), which iTunes uses to group related video files. - The option overwrites the original file; - without it, AtomicParsley creates a new - auto-named file in the same directory and leaves the original file - untouched. - + - - - - - -Using <application>MEncoder</application> - to create VCD/SVCD/DVD-compliant files - - -Format Constraints - - -MEncoder is capable of creating VCD, SCVD -and DVD format MPEG files using the -libavcodec library. -These files can then be used in conjunction with -vcdimager -or -dvdauthor -to create discs that will play on a standard set-top player. - - - -The DVD, SVCD, and VCD formats are subject to heavy constraints. -Only a small selection of encoded picture sizes and aspect ratios are -available. -If your movie does not already meet these requirements, you may have -to scale, crop or add black borders to the picture to make it -compliant. - - - - -Format Constraints - - - - - - Format - Resolution - V. Codec - V. Bitrate - Sample Rate - A. Codec - A. Bitrate - FPS - Aspect - - - - - NTSC DVD - 720x480, 704x480, 352x480, 352x240 - MPEG-2 - 9800 kbps - 48000 Hz - AC-3,PCM - 1536 kbps (max) - 30000/1001, 24000/1001 - 4:3, 16:9 (only for 720x480) - - - NTSC DVD - 352x240 - These resolutions are rarely used for DVDs because - they are fairly low quality. - MPEG-1 - 1856 kbps - 48000 Hz - AC-3,PCM - 1536 kbps (max) - 30000/1001, 24000/1001 - 4:3, 16:9 - - - NTSC SVCD - 480x480 - MPEG-2 - 2600 kbps - 44100 Hz - MP2 - 384 kbps (max) - 30000/1001 - 4:3 - - - NTSC VCD - 352x240 - MPEG-1 - 1150 kbps - 44100 Hz - MP2 - 224 kbps - 24000/1001, 30000/1001 - 4:3 - - - PAL DVD - 720x576, 704x576, 352x576, 352x288 - MPEG-2 - 9800 kbps - 48000 Hz - MP2,AC-3,PCM - 1536 kbps (max) - 25 - 4:3, 16:9 (only for 720x576) - - - PAL DVD - 352x288 - MPEG-1 - 1856 kbps - 48000 Hz - MP2,AC-3,PCM - 1536 kbps (max) - 25 - 4:3, 16:9 - - - PAL SVCD - 480x576 - MPEG-2 - 2600 kbps - 44100 Hz - MP2 - 384 kbps (max) - 25 - 4:3 - - - PAL VCD - 352x288 - MPEG-1 - 1152 kbps - 44100 Hz - MP2 - 224 kbps - 25 - 4:3 - - - - - - -If your movie has 2.35:1 aspect (most recent action movies), you will -have to add black borders or crop the movie down to 16:9 to make a DVD or VCD. -If you add black borders, try to align them at 16-pixel boundaries in -order to minimize the impact on encoding performance. -Thankfully DVD has sufficiently excessive bitrate that you do not have -to worry too much about encoding efficiency, but SVCD and VCD are -highly bitrate-starved and require effort to obtain acceptable quality. - - - - - -GOP Size Constraints - - -DVD, VCD, and SVCD also constrain you to relatively low -GOP (Group of Pictures) sizes. -For 30 fps material the largest allowed GOP size is 18. -For 25 or 24 fps, the maximum is 15. -The GOP size is set using the option. - - - - - -Bitrate Constraints - - -VCD video is required to be CBR at 1152 kbps. -This highly limiting constraint also comes along with an extremely low vbv -buffer size of 327 kilobits. -SVCD allows varying video bitrates up to 2500 kbps, and a somewhat less -restrictive vbv buffer size of 917 kilobits is allowed. -DVD video bitrates may range anywhere up to 9800 kbps (though typical -bitrates are about half that), and the vbv buffer size is 1835 kilobits. - - - - - - - -Output Options - - -MEncoder has options to control the output -format. -Using these options we can instruct it to create the correct type of -file. - - - -The options for VCD and SVCD are called xvcd and xsvcd, because they -are extended formats. -They are not strictly compliant, mainly because the output does not -contain scan offsets. -If you need to generate an SVCD image, you should pass the output file to -vcdimager. - - - -VCD: --of mpeg -mpegopts format=xvcd - - - -SVCD: --of mpeg -mpegopts format=xsvcd - - - -DVD (with timestamps on every frame, if possible): --of mpeg -mpegopts format=dvd:tsaf - - - -DVD with NTSC Pullup: --of mpeg -mpegopts format=dvd:tsaf:telecine -ofps 24000/1001 -This allows 24000/1001 fps progressive content to be encoded at 30000/1001 -fps whilst maintaining DVD-compliance. - - - - -Aspect Ratio - - -The aspect argument of is used to encode -the aspect ratio of the file. -During playback the aspect ratio is used to restore the video to the -correct size. - - - -16:9 or "Widescreen" --lavcopts aspect=16/9 - - - -4:3 or "Fullscreen" --lavcopts aspect=4/3 - - - -2.35:1 or "Cinemascope" NTSC --vf scale=720:368,expand=720:480 -lavcopts aspect=16/9 -To calculate the correct scaling size, use the expanded NTSC width of -854/2.35 = 368 - - - -2.35:1 or "Cinemascope" PAL --vf scale=720:432,expand=720:576 -lavcopts aspect=16/9 -To calculate the correct scaling size, use the expanded PAL width of -1024/2.35 = 432 - - - - - -Maintaining A/V sync - - -In order to maintain audio/video synchronization throughout the encode, -MEncoder has to drop or duplicate frames. -This works rather well when muxing into an AVI file, but is almost -guaranteed to fail to maintain A/V sync with other muxers such as MPEG. -This is why it is necessary to append the - video filter at the end of the filter chain -to avoid this kind of problem. -You can find more technical information about -in the section -Improving muxing and A/V sync reliability -or in the manual page. - - - - - -Sample Rate Conversion - - -If the audio sample rate in the original file is not the same as -required by the target format, sample rate conversion is required. -This is achieved using the option and -the audio filter together. - - - -DVD: --srate 48000 -af lavcresample=48000 - - - -VCD and SVCD: --srate 44100 -af lavcresample=44100 - - - - - - - -Using libavcodec for VCD/SVCD/DVD Encoding - - -Introduction - - -libavcodec can be used to -create VCD/SVCD/DVD compliant video by using the appropriate options. - - - - - -lavcopts - - -This is a list of fields in that you may -be required to change in order to make a complaint movie for VCD, SVCD, -or DVD: - - - - - acodec: - for VCD, SVCD, or PAL DVD; - is most commonly used for DVD. - PCM audio may also be used for DVD, but this is mostly a big waste of - space. - Note that MP3 audio is not compliant for any of these formats, but - players often have no problem playing it anyway. - - - abitrate: - 224 for VCD; up to 384 for SVCD; up to 1536 for DVD, but commonly - used values range from 192 kbps for stereo to 384 kbps for 5.1 channel - sound. - - - vcodec: - for VCD; - for SVCD; - is usually used for DVD but you may also use - for CIF resolutions. - - - keyint: - Used to set the GOP size. - 18 for 30fps material, or 15 for 25/24 fps material. - Commercial producers seem to prefer keyframe intervals of 12. - It is possible to make this much larger and still retain compatibility - with most players. - A of 25 should never cause any problems. - - - vrc_buf_size: - 327 for VCD, 917 for SVCD, and 1835 for DVD. - - - vrc_minrate: - 1152, for VCD. May be left alone for SVCD and DVD. - - - vrc_maxrate: - 1152 for VCD; 2500 for SVCD; 9800 for DVD. - For SVCD and DVD, you might wish to use lower values depending on your - own personal preferences and requirements. - - - vbitrate: - 1152 for VCD; - up to 2500 for SVCD; - up to 9800 for DVD. - For the latter two formats, vbitrate should be set based on personal - preference. - For instance, if you insist on fitting 20 or so hours on a DVD, you - could use vbitrate=400. - The resulting video quality would probably be quite bad. - If you are trying to squeeze out the maximum possible quality on a DVD, - use vbitrate=9800, but be warned that this could constrain you to less - than an hour of video on a single-layer DVD. - - - vstrict: - =0 should be used to create DVDs. - Without this option, MEncoder creates a - stream that cannot be correctly decoded by some standalone DVD - players. - - - - - - -Examples - - -This is a typical minimum set of for -encoding video: - - -VCD: - --lavcopts vcodec=mpeg1video:vrc_buf_size=327:vrc_minrate=1152:\ -vrc_maxrate=1152:vbitrate=1152:keyint=15:acodec=mp2 - - - - -SVCD: - --lavcopts vcodec=mpeg2video:vrc_buf_size=917:vrc_maxrate=2500:vbitrate=1800:\ -keyint=15:acodec=mp2 - - - - -DVD: - --lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\ -keyint=15:vstrict=0:acodec=ac3 - - - - - - -Advanced Options - - -For higher quality encoding, you may also wish to add quality-enhancing -options to lavcopts, such as , -, and others. -Note that and , while often -useful with MPEG-4, are not usable with MPEG-1 or MPEG-2. -Also, if you are trying to make a very high quality DVD encode, it may -be useful to add to lavcopts. -Doing so may help reduce the appearance of blocks in flat-colored areas. -Putting it all together, this is an example of a set of lavcopts for a -higher quality DVD: - - - - --lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:\ -keyint=15:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:\ -vqmin=1:lmin=1:dc=10:vstrict=0 - - - - - - - - -Encoding Audio - - -VCD and SVCD support MPEG-1 layer II audio, using one of -toolame, -twolame, -or libavcodec's MP2 encoder. -The libavcodec MP2 is far from being as good as the other two libraries, -however it should always be available to use. -VCD only supports constant bitrate audio (CBR) whereas SVCD supports -variable bitrate (VBR), too. -Be careful when using VBR because some bad standalone players might not -support it too well. - - - -For DVD audio, libavcodec's -AC-3 codec is used. - - - - -toolame - - -For VCD and SVCD: --oac toolame -toolameopts br=224 - - - - - -twolame - - -For VCD and SVCD: --oac twolame -twolameopts br=224 - - - - - -libavcodec - - -For DVD with 2 channel sound: --oac lavc -lavcopts acodec=ac3:abitrate=192 - - - -For DVD with 5.1 channel sound: --channels 6 -oac lavc -lavcopts acodec=ac3:abitrate=384 - - - -For VCD and SVCD: --oac lavc -lavcopts acodec=mp2:abitrate=224 - - - - - - - -Putting it all Together - - -This section shows some complete commands for creating VCD/SVCD/DVD -compliant videos. - - - - -PAL DVD - - - -mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \ - -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \ - -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\ -keyint=15:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 \ - -o movie.mpg movie.avi - - - - - - -NTSC DVD - - - -mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \ - -vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 \ - -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\ -keyint=18:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 30000/1001 \ - -o movie.mpg movie.avi - - - - - - -PAL AVI Containing AC-3 Audio to DVD - - -If the source already has AC-3 audio, use -oac copy instead of re-encoding it. - -mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \ - -vf scale=720:576,harddup -ofps 25 \ - -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\ -keyint=15:vstrict=0:aspect=16/9 -o movie.mpg movie.avi - - - - - - -NTSC AVI Containing AC-3 Audio to DVD - - -If the source already has AC-3 audio, and is NTSC @ 24000/1001 fps: - -mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf:telecine \ - -vf scale=720:480,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:\ - vrc_maxrate=9800:vbitrate=5000:keyint=15:vstrict=0:aspect=16/9 -ofps 24000/1001 \ - -o movie.mpg movie.avi - - - - - - -PAL SVCD - - - -mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \ - scale=480:576,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ - vcodec=mpeg2video:mbd=2:keyint=15:vrc_buf_size=917:vrc_minrate=600:\ -vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224:aspect=16/9 -ofps 25 \ - -o movie.mpg movie.avi - - - - - - -NTSC SVCD - - - -mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \ - scale=480:480,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ - vcodec=mpeg2video:mbd=2:keyint=18:vrc_buf_size=917:vrc_minrate=600:\ -vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224:aspect=16/9 -ofps 30000/1001 \ - -o movie.mpg movie.avi - - - - - - -PAL VCD - - - -mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \ - scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ - vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:\ -vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224:aspect=16/9 -ofps 25 \ - -o movie.mpg movie.avi - - - - - - -NTSC VCD - - - -mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \ - scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts \ - vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:\ -vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224:aspect=16/9 -ofps 30000/1001 \ - -o movie.mpg movie.avi - - - - -
diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/es/faq.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/es/faq.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/es/faq.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/es/faq.xml 2011-11-07 19:54:43.000000000 +0000 @@ -70,6 +70,8 @@ + + Compilación @@ -84,47 +86,6 @@ -La compilación se detiene con un mensaje de error similar a este: - - cfft.c: In function`passf2': - cfft.c:556: unable to find a register to spill in class `FLOAT_REGS' - cfft.c:556: this is the insn: - (insn 235 233 246 (set (subreg:SF (reg/v:DI 29 rmm0 [110]) 0) - (minus:SF (mem:SF (plus:SI (mult:SI (reg:SI 1 edx [112]) - (const_int 8 [0x8])) - (reg/v/f:SI 3 ebx [62])) [4 S4 A32]) - (reg:SF 8 st(0) [132]))) 533 {*fop_sf_1_nosse} (insn_list - 232 (nil)) (expr_list:REG_DEAD (reg:SF 8 st(0) [132]) - (nil))) - cfft.c:556: confused by earlier errors, bailing out - - - -Este es un problema conocido de gcc 3.2, actualice -a 3.3 para solucionar el problema. Alternativamente puede usar -una biblioteca FAAD externa como se describe en la sección AAC. - - - - - -La compilación se detiene con un mensaje de error similar a este: - - En el archivo incluído en mplayer.c:34: - mw.h: En función `mplMainDraw': - mw.h:209: Error interno del compilador en print_rtl_and_abort, at flow.c:6458 - Por favor envíe un informe de error completo, - con código preprocesado si es necesario. - - - -Este es un problema conocido de gcc 3.0.4, actualice -a 3.1 para solucionar el problema. - - - - - Configure termina con este texto, y ¡MPlayer no compila! Su gcc no soporta ni un i386 para '-march' and '-mcpu' @@ -137,31 +98,6 @@ -La salida de SDL no funciona o no compila. El problema es ... - - -Se ha comprobado que funciona con SDL 1.2.x y puede funcionar en SDL 1.1.7+. -No funciona con versiones anteriores. Si -decide usar esas versiones que no funcionan, haga lo que le de la gana. - - - - - -Sigo teniendo problemas compilando con soporte para SDL, gcc dice algo -acerca de referencia no definida a `SDL_EnableKeyRepeat'. ¿Ahora qué? - - -¿Dónde ha instalado la biblioteca SDL? Si la ha instalado en -/usr/local (por defecto) entonces edite -el archivo de primer nivel config.mak y añada --L/usr/local/lib después de X_LIBS=. -Ahora escriba make. ¡Ya lo tiene! - - - - - Tengo una Matrox G200/G400/G450/G550, ¿cómo puedo compilar/usar el controlador mga_vid? @@ -171,20 +107,6 @@ -Hmm, extraño. Cuando cargo el módulo del kernel mga_vid.o, -encuentro esto en los historiales: -Advertencia: cargando mga_vid.o puede corromper el kernel: no hay licencia - - -Los últimos modutils del kernel requieren una bandera indicando la -licencia (principalmente para evitar a hackers del kernel hacer -ingeniería inversa de controladores de código cerrado). -Actualice su kernel, modutils y MPlayer. - - - - - Durante 'make', MPlayer se queja de algunas bibliotecas de X11. No lo entiendo, ¡yo TENGO X instalado!? @@ -203,64 +125,10 @@ Filesystem Hierarchy Standard. - - - -No puedo compilar SVGAlib. Estoy usando kernel 2.3/2.4 ... - - -Debe editar los Makefile.cfg de SVGAlib y dejar como comentario -BACKGROUND = y. - - - - - -He compilado MPlayer con soporte libdvdcss/libdivxdecore, -pero cuanto intento iniciarlo, me dice: - -error cargando bibliotecas compartidas: lib*.so.0: no se puede cargar el archivo objeto compartido: No se encuentra el archivo o directorio - -He comprobado el archivo y ESTÁ en /usr/local/lib ... - - -Añada /usr/local/lib a -/etc/ld.so.conf y ejecute ldconfig. - - - - - -Compilando MEncoder, da segfaults al linkar! - - -Este es un problema del linkador. Actualizar binutils puede ayudar (2.11.92.* -o posterior deben ir bien). Ya que no es un problema nuestro, ¡por favor -no nos informe de él! - - - - -MPlayer muere con segmentation fault durante -la comprobación pthread! - - -chmod 644 /usr/lib/libc.so - - - - - -¡Me gustaria compilar MPlayer en Minix! - - -A mí también. :) - - - + + Preguntas generales @@ -288,18 +156,6 @@ -Tengo problemas reproduciendo archivos con el codec .... ¿Puedo usarlo? - - -Compruebe el estado del codec, -si no contiene su codec, lea el -COMO importar codecs Win32 -y contacte con nosotros. - - - - - Cuando inicio la reproducción, obtenego este mensaje pero todo parece ir bien: Linux RTC init: ioctl (rtc_pie_on): Permiso denegado @@ -312,31 +168,6 @@ -Hay un cronómetro en la esquina superior izquierda. ¿Cómo puedo quitarlo? - - -Pulse o y pruebe la opción . - - - - - -Las opciones o no funcionan con el -controlador x11 () ... - - -Sí funciona, pero debe especificar un escalado por software (muy lento) con la -opción . Mejor use soporte XF86VidMode: Debe especificar -la opción y la opción , y ya está. -Asegúrese de tener los modelines correctos en su archivo XF86Config, -e intente que el controlador DGA y el -controlador SDL DGA funcionen para usted. -Es mucho más rápido. Si SDL DGA funciona, úselo, será incluso más rápido. - - - - - ¿Qué significan los números de la línea de estado? @@ -371,21 +202,6 @@ -¿Por qué está la CPU usada a cero (0%) para algunos archivos? - - -No esta a cero, pero es recojido del codec osea que no se puede medir -por separado. Debería intentar reproducir el archivo usando y -luego y observar la diferencia para ver la velocidad de video_out. - - -Está usando Direct Rendering, en este caso el codec renderiza por sí mismo sobre la memoria -de video. En este caso, el porcentaje descifrado contiene también el porcentaje reproducido. - - - - - Hay mensajes de error archivo no encontrado /usr/local/lib/codecs/ ... @@ -397,41 +213,6 @@ -Umm, ¿qué es "IdegCounter"? - - -Una combinación de una palabra en Húngaro y una Inglesa. "Ideg" en Húngaro -quiere decir lo mismo que "nervio" en Español, y es pronunciado algo parecido a -"ydaegh". Al principio fue usado para medir el nivel de Nervios de A'rpi, después -de la (umm) "misteriosa" desaparición de codigo CVS ;) - - - - - -¿Y qué es "Faszom(C)ounter"? - - -"Fasz" es una palabra Húngara que no quieres saber, las otras están -conectadas a las mentes pervertidas de los desarrolladores de -MPlayer. - - - - - -LIRC no funciona, ¿por qué? ... - - -¿Está seguro que está usando mplayer en lugar de -mplayer_lirc? Toma nota que solia ser mplayer_lirc -por bastante tiempo, version 0.60 incluida, pero esto fue cambiado recientemente a -mplayer. - - - - - Los subtitulos son muy bonitos, los mas bonitos que jamás he visto, ¡pero retrasan la reproducción! Sé que es poco probable ... @@ -444,42 +225,6 @@ -¡Las funciones de pantalla (OSD) parpadean! - - -Está usando el controlador vo con un solo buffer (x11,xv). Con xv, use la opción -. Pruebe también . - - - - - -¡La barra the tareas de Icewm sigue cubriendo la pelicula cuande se usa la funcion pantalla completa! - - -Esto ya no deberia ocurrir, si aún sigue use la opción de capa -y comuníquelo a la lista de correo -mplayer-users. - - - - - -No puedo acceder al menú del GUI. Intento dar al botón derecho, ¡pero no puedo -acceder a ningún objeto del menú! - - -¿Está usando FVWM? Intente la siguiente: - -Start -> Settings -> Configuration -> Base Configuration -Cambie Use Applications position hints -a Yes - - - - - - ¿Cómo puedo hacer que MPlayer funcione en segundo plano? @@ -567,22 +312,6 @@ -... funciona con xine/avifile/... pero no con -MPlayer. - - -MPlayer no es xine/avifile/.... -Aunque estos reproductores tienen algún código en común, el grupo de codecs (DLL), -sincronización, demultiplexores etc es diferente y no debería ser -comparado. Si tiene un archivo que MPlayer falla en -reproducir correctamente pero que funciona con otro reproductor, por favor lea la -guía para reportar errores y suba el archivo -a nuestro servidor FTP. - - - - - Audio se sale de sincronizacion mientras reproduzco un archivo AVI. @@ -593,36 +322,6 @@ -MPlayer sale con algun error cuando uso l3codeca.acm. - - -Compruebe la salidaldd /usr/local/bin/mplayer. Si contiene -libc.so.6 => /lib/libc.so.6 (0x4???????) -donde "?" es cualquier número entonces está bien, el error no es de ahí. Si es: -libc.so.6 => /lib/libc.so.6 (0x00??????) -hay un problema con su kernel/libc. Quizas esté usando algún parche de seguridad -(por ejemplo el parche de Solar Designer's OpenWall) que fuerza la carga de -librerías a direcciones bajas. Al ser un DLL non-relocable,l3codeca.acm -debe ser cargado a 0x00400000, no podemos -cambiar esto. Debería usar un kernel sin parchear, o use la opción - de MPlayer para dejar de -usar l3codeca.acm. - - - - - -Mi ordenador reproduce MS DivX AVIs con resoluciones ~ 640x300 y sonido mp3 en estéreo -demasiado lento. Cuando uso la opción todo va bien (pero sin sonido). - - -Su ordenador es demasiado lento o su tarjeta de sonido está estropeada. Consulte la -documentación de la misma para ver si hay forma de mejorar el rendimiento. - - - - - MPlayer falla con MPlayer interrupted by signal 4 in module: decode_video. @@ -647,21 +346,6 @@ -Me salió esto reproduciendo archivos MPEG: Can't find codec for video format 0x10000001! - - -Tiene una version vieja de codecs.conf en -~/.mplayer/, -/etc/, -/usr/local/etc/ o similar. Bórrelo, -ya no sigue siendo necesario. -O tiene la opción o -algo parecido en su archivo(s) de configuración. - - - - - Cuando empiezo MPlayer bajo KDE solo recibo una pantalla negra y nada pasa. Aproximadamente un minuto después la imagen empieza a salir. @@ -677,20 +361,6 @@ -Tengo un AVI que produce una pantalla gris cuando intento reproducirlo con -y una verde con . - - -No es un archivo DivX, sino un MS MPEG4v3. -Si tiene una version antigua de codecs.conf en -~/.mplayer/, -/etc/, -/usr/local/etc/ o similar, bórrela. - - - - - Cuando reproduzco esta pelicula sale el video-audio fuera de sincronizacion y/o MPlayer falla con el siguiente mensaje: DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer! @@ -719,16 +389,6 @@ -Tengo un archivo MJPEG que funciona con otros reproductores pero solo muestra imagen negra en -MPlayer - - -Use otro codec para reproducir el archivo, pruebe . - - - - - Cuando intento recibir de mi sintonizador, funciona, pero los colores son extraños. Con otras aplicaciones funciona bien. @@ -752,20 +412,6 @@ -¡Todos los archivos WMV (o otros..) que reproduzco crean un ventana verde/gris y solo -hay sonido! MPlayer dice: -Detected video codec: [null] drv:0 (NULL codec (no decoding)) - - -Si tiene una versión antigua de codecs.conf en -~/.mplayer/, -/etc/, -/usr/local/etc/ o similar, bórrela. - - - - - Recibo valores de porcentaje muy extraños (demasiado grandes) mientras reproduzco archivos en mi portátil. @@ -800,19 +446,13 @@ Pruebe . - - - -¿Cómo puedo reproducir archivos de audio MPEG Layer 2 (mp2)? - - -Debe usar . - - + + Problemas del manejador de video/audio (vo/ao) + No tengo sonido cuando reproduzco un video y me sale un error parecido a este: @@ -830,121 +470,13 @@ para hacer que MPlayer use ARTS o ESD. - - - -¿Que pasa con el controlador DGA? ¡No los puedo encontrar! - - -./configure autodetecta tu controlador DGA. Si -no detecta DGA, entonces hay un problema con la instalación de X. Pruebe -./configure --enable-dga y lea la sección -DGA. Si no, pruebe el controlador DGA de SDL -con la opción . - - - - - -Vale, encuentra un controlador DGA, pero se queja sobre sus permisos. -¡Ayúdenme! - - -¡Solo funciona ejecutandolo siendo root! Es una limitacion de DGA. Necesita volverse root -(su -), e intentalo otra vez. Otra solución es hacer -MPlayer SUID root, ¡pero no es recomendable! - - chown root /usr/local/bin/mplayer - chmod 755 /usr/local/bin/mplayer - chmod +s /usr/local/bin/mplayer - - -¡Esto un gran riesgo de seguridad! Nunca -lo haga en un servidor o en un ordenador del que no tiene control completo porque -otros usuarios pueden conseguir privilegios root por SUID root -MPlayer. -Ha sido advertido. - - - - - - -Cuando uso Xvideo, mi Voodoo 3/Banshee dice: - -X Error of failed request: BadAccess (attempt to access private resource denied) - Major opcode of failed request: 147 (MIT-SHM) - Minor opcode of failed request: 1 (X_ShmAttach) - Serial number of failed request: 26 - Current serial number in output stream:27 - - - -El controlador tdfx en XFree86 4.0.2/4.0.3 tiene este error. -Está arreglado en -bugfix #621 -del CVS log XFree86 4.1.0 CVS. Osea que actualice a XFree86 4.1.0 o posterior. -Otras opciones son, descargar (por lo menos) DRI version 0.6 de la -pagina DRI, o usar CVS DRI. - - - - - -La salida de OpenGL ( no funciona (se cuelga/ventana negra/errores -X11/...). - - -Su controlador OpenGL no soporta cambios dinámicos de textura (glTexSubImage). -No es conocido que funcione con la porqueria binaria de nVidia. Se sabe que funciona con -Utah-GLX/DRI y tarjetas Matrox G400. También con DRI y tarjetas Radeon. No funcionará -con DRI y otras tarjetas. Tampoco funcionará con tarjetas 3DFX porque tienen un -tamaño de textura limitado a 256x256. - - - - - -Yo tengo una tarjeta TNT/TNT2 de nVidia, y tengo una banda con colores extraña, ¡justo -debajo de la pelicula! ¿De quién es la culpa de esto? - - -Esto es un error del controlador X binario de nVidia. Estos errores ocuren SOLO con las tarjetas -TNT/TNT2, y no podemos hacer nada sobre ello. Para resolver el problema, descargue -la última versión del controlador binario de nVidia. Si todavia sigue mal, ¡quejese a nVidia! - - - - - -Tengo una tarjeta XYZ de nVidia, y cuando aprieto el raton en la ventanilla del GUI para -mostrar el panel del GUI, un cuadrado negro aparece donde hice clic. Tengo el -controldor más reciente. - - -Si, nVidia corregió el error previo (arriba), e introdujo uno nuevo. -Vamos a felicitarlos. ÚLTIMAS NOTICIAS: Según nVidia, -esto ya esta resuelto. - - - - - -¡Oh que cruel es el mundo ...! ¡SDL solo tiene x11 de destino, -pero no xv! - - -Pruebe x11 otra vez. Ahora pruebe . ¿Ve la diferencia? No?! Vale, aquí viene la aclaración: -La salida x11 de SDL usa xv cuando lo puede conseguir, no se tiene -que precupar de ello ... Nota: Con SDL puede forzar/desactivar Xv usando - y - - + + Reproducción DVD + ¿Qué pasa con navegación DVD? @@ -960,29 +492,6 @@ -Mientras reproduzco un DVD, he encontrado este error: -mplayer: ifo_read.c:1143: ifoRead_C_ADT_internal: Assertion nfo_length / sizeof(cell_adr_t) >= c_adt->nr_of_vobs' failed. - - -Esto es un error conocido de libdvdread 0.9.1/0.9.2. Use libmpdvdkit2, -que esta presente en la fuente de MPlayer, y es usado por defecto. - - - - - -¿Puedo compilar libdvdread y libdvdcss en me querido SPARC bajo Solaris? - - -Quién sabe ... Se ha oido que sí funciona, osea que por favor pruébelo y denos información. Véase la -documentacién de libdvdread y su página web también. Nosotros no somos los autores -de libdvdread. Use libmpdvdkit2, que esta presente -en la fuente de MPlayer, y es usado por defecto. - - - - - ¿Qué pasa con subtítulos? ¿Puede MPlayer reproducirlos? @@ -1002,7 +511,7 @@ -¿Necesito ser (setuid) root/setuid fibmap_mplayer para poder reproducir un DVD? +¿Necesito ser (setuid) root/setuid para poder reproducir un DVD? No. Sin embargo debe tener los permisos adecuados @@ -1012,19 +521,6 @@ -¿De donde puedo obtener los paquetes libdvdread y libdvdcss? - - -No necesita obtenerlos. Use libmpdvdkit2, -que está presente en la fuente de MPlayer, -y es usado por defecto. Puede obtener los paquetes mencionados -de la página de -Ogle. - - - - - ¿Es posible reproducir/codificar solo unos capítulos seleccionados? @@ -1044,8 +540,11 @@ + + Solicitando prestaciones + Si MPlayer esta pausado e intento buscar o @@ -1082,8 +581,11 @@ + + Codificando + ¿Como puedo codificar? @@ -1149,15 +651,6 @@ -¡Al empezar MEncoder produce un fallo de segmentación! - - -Descargue la última version de DivX4Linux. - - - - - ¿Cómo puedo codificar solo capítulos seleccionados de un DVD? diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/es/mencoder.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/es/mencoder.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/es/mencoder.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/es/mencoder.xml 2011-11-07 13:13:20.000000000 +0000 @@ -1,7 +1,7 @@ -Codificando con <application>MEncoder</application> +Codificación básica con <application>MEncoder</application> Para una lista completa de las opciones de MEncoder @@ -232,87 +232,6 @@ - -Codificando con la familia de codecs de -<systemitem class="library">libavcodec</systemitem> - - -libavcodec -provee un montón de interesantes formatos de video y audio (actualmente sus codecs -de audio no están soportados). Puede codificar con los siguientes codecs -(más o menos actualizado): - - - - -Nombre del codecDescripción - - -mjpeg - Motion JPEG - -ljpeg - Lossless JPEG - -h263 - H263 - -h263p - H263 Plus - -mpeg4 - ISO estándar MPEG-4 (compatible con DivX 5, XVID) - -msmpeg4 - pre-standard MPEG-4 variant by MS, v3 (aka DivX3) - -msmpeg4v2 - pre-standard MPEG-4 by MS, v2 (usado en archivos asf antiguos) - -wmv1 - Windows Media Video, version 1 (aka WMV7) - -wmv2 - Windows Media Video, version 2 (aka WMV8) - -rv10 - un codec RealVideo antiguo - -mpeg1video - MPEG1 video - -mpeg2video - MPEG2 video - -huffyuv - compresión sin pérdidas - -asv1 - ASUS Video v1 - -asv2 - ASUS Video v2 - -ffv1 - codec de video si pérdidas de FFmpeg - - - - - -La primera columna contiene los nombres de los codecs que deben pasarse -después de la configuración vcodec, como: - - - - - -Un ejemplo, con compresión MJPEG: -mencoder dvd://2 -o título2.avi -ovc lavc -lavcopts vcodec=mjpeg -oac copy - - - - Codificando desde múltiples archivos de imágenes de entrada (JPEGs, PNGs o TGAs) @@ -511,816 +430,4 @@ -Matrices inter/intra personalizadas - - -Con ésta característica de -libavcodec puede -personalizar las matrices inter (marcos-I/marcos clave) e intra (marcos-P/marcos -de predicción). Está soportado por muchos codecs: -mpeg1video y mpeg2video -se ha informado que funcionan. - - - -Un uso normal de esta característica es establecer las matrices preferidas -por las especificaciones KVCD. - - - -La Matriz de Cuantización de KVCD "Notch" - - - -Intra: - - 8 9 12 22 26 27 29 34 - 9 10 14 26 27 29 34 37 -12 14 18 27 29 34 37 38 -22 26 27 31 36 37 38 40 -26 27 29 36 39 38 40 48 -27 29 34 37 38 40 48 58 -29 34 37 38 40 48 58 69 -34 37 38 40 48 58 69 79 - - -Inter: - -16 18 20 22 24 26 28 30 -18 20 22 24 26 28 30 32 -20 22 24 26 28 30 32 34 -22 24 26 30 32 32 34 36 -24 26 28 32 34 34 36 38 -26 28 30 32 34 36 38 40 -28 30 32 34 36 38 42 42 -30 32 34 36 38 40 42 44 - - - - -Uso: - -$ mencoder input.avi -o output.avi -oac copy -ovc lavc -lavcopts inter_matrix=...:intra_matrix=... - - - - - -$ mencoder input.avi -ovc lavc -lavcopts -vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37, -12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27, -29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79 -:inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26, -28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34, -36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44 -oac copy -o svcd.mpg - - - - - -Haciendo un MPEG4 ("DivX") de alta calidad al ripear una película en DVD - - - Ripear un título de DVD en un archivo MPEG4 (DivX) de alta calidad - involucra algunas consideraciones. Más abajo encontrará un ejemplo - del proceso cuando el objetivo no es conseguir un tamaño determinado - para el archivo (sino quizá ajustar el resultado en 2GB). - libavcodec será usado para el - video, y el audio será copiado como esté sin cambios. - - - -Recortando - - Reproduzca el DVD y ejecute el filtro de detección de recorte - () en él. Esto le dará un rectángulo de - recorte para usar en la codificación. La razón para el recorte es que muchas - películas no están en las relaciones de aspecto estándar (16/9 o 4/3), o, - por cualquier razón, la imagen no se ajusta bien dentro del marco de imagen. - Además querrá recortar las bandas negras durante el ripeo. También mejora la - calidad de la imagen porque el filo de las bandas negras consume un montón - de bits. Un aspecto común es 2.35, el que se llama cinemascope. La mayoría - de las películas de blockbuster tienen esta razón de aspecto. - - - - -Nivel de calidad - - A continuación debe elegir el nivel de calidad deseado. Cuando no necesite - ajustar el tamaño resultante en un CD o en lo que sea, usar una cuantización - constante, AKA calidad constante es una buena elección. De este modo cada - marco de imagen toma tantos bits como necesite para mantener el nivel de - calidad deseado, pero sin necesitar múltiples pasadas en la codificación. - Con - libavcodec, obtendrá una calidad - constante usando - . - debe darle un archivo por debajo de los 2GB - de tamaño, dependiendo principalmente de la duración de la película y del - ruido en el video (a más ruido, más difícil de comprimir será). - - - -Archivos más grandes de 2GB - - Si el archivo resultante codificado con calidad constante es más grande - de 2GB, deberá crear un índice para poder luego verlos correctamente. - Puede - - - - reproducir el archivo con para crear un - índice sobre la marcha o bien - - - usar para escribir un índice a un archivo - una sola vez y luego para usarlo cuando - reproduzca el archivo. - - - - Si esto le incomoda, quizá quiera mantener el tamaño por debajo de los 2GB. - - - - Hay tres maneras de evitar esto. Puede intentar codificar de nuevo - usando y ver si tiene el tamaño de - archivo y la calidad de imagen aceptables. También peude usar - codificación en 2 pasadas. - Como va a copiar la pista de audio como está y conoce por eso - su tasa de bits, y además sabe la duración de la película, puede - calcular la tasa de bits de video requerida para dar a la opción - - sin usar - codificación en 3 pasadas. - - - - La tercera y posiblemente la mejor opción puede ser rebajar ligeramente - la resolución. El rebajado suaviza ligeramente y la pérdida de detalle - es visualmente menos dañina que el ver bloques y otros artifactos - causados por la compresión MPEG. Escalar a un tamaño menor también reduce - de manera efectiva el ruido en la imagen, lo que es aún mejor, ya que - el ruido es más dificil de comprimir. - - - -Desentrelazado - - Si la película está entrelazada, puede que quiera desentrelazarla como - parte del ripeo. Es debatible si debe desentrelazarse en esta etaba. El - beneficio es que al desentrelazar mientras convierte a MPEG4 ocasiona - una mejor compresión, y luego es más fácil de ver con menos CPU en - monitores de ordenador ya que no es necesario el desentrelazado en - ese momento. - - - - Desentrelazar durante la etapa de ripeo es una buena idea dependiendo - del DVD. Si el DVD está hecho desde una película, y tiene 24 fps, - puede desentrelazar durante el ripeo. Si, sin embargo, el original - es un video a 50/60 fps, convertirlo en un video desentrelazado - a 23.976/25 fps puede perder información. Si decide desentrelazar, puede - experimentar con distintos filtros de desentrelazado después. Vea - http://www.wieser-web.de/MPlayer/ - para ejemplos. Un buen punto de partida es . - - - - Si está haciendo las dos cosas, recortando y desentrelazando, desentrelace - antes de recortar. Actualmente, no es necesario - si el desplazamiento de recorte es vertical y múltiplo de 2 pixels. Sin - embargo con algunos otros filtros, como dering, deberá siempre hacer el recorte - lo último, es un buen hábito poner el filtro de recortado el último. - - - -Inversión de telecine - - Si está ripeando un DVD PAL, con 25 fps, no necesita pensar en - los fps. Use directamente 25 fps. Los DVDs NTSC por otro lado están - a 29.97 fps (a menudo rondan los 30 fps, pero no tiene por qué). - Si la película fue grabada desde TV, no necesita de nuevo tocar - los fps. Pero si la película fue grabada desde una película, y por - lo tanto a (exactamente) 24 fps, debe ser convertida a 29.97 fps - cuando haga el DVD. Esta conversión donde se añaden 12 campos a - cada 24 marcos de imagen de la película se llama telecine. Para más - información acerca de telecine, vea una - - búsqueda en Google de "telecine field 23.976". - - - - En caso de que tenga un DVD telecine, puede que quiera hacer inversión - del telecine, lo que significa convertir la película a 23.976 fps - (29.97*4/5). De otro modo las panorámicas de cámara irán a trompicones - y muy mal. Puede usar para ello. Cualquier - cosas que esté en películas y necesite telecine inverso, no se - mostrará en TV. - - - -Escalado y razón de aspecto - - Para mejor calidad, no escale la película durante el ripeo. El - escalado a tamaño menor obviamente pierde detalle, y el escalado - a mayor tamaño causa artefactos y hace el archivo mayor en tamaño. Los - pixels en las películas DVD no son cuadrados, por eso las películas - en DVD incluyen información acerca de la razón de aspecto correcta. Es - posible almacenar la razón de aspecto en la cabecera del archivo - de salida MPEG4. La mayoría de los reproductores de video ignoran - esta información pero MPlayer la usará. - Si solo va a usar MPlayer para ver el - archivo ripeado, no necesitará escalar la película, solo pase - a - MEncoder y las cosas funcionarán - bien automágicamente. Si debe escalar la película, tenga - cuidado con el tamaño dado especialmente si está recortándola. - - - - -Sumando todo esto - - Con todo lo mencionado más arriba en mente, se puede usar una órden - de codificación como la siguiente - - -mencoder dvd://1 -aid 128 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vqscale=3:vhq:v4mv:trell:autoaspect \ - -ofps 23.976 -vf crop=720:364:0:56 -o Harry_Potter_2.avi - - - Aquí indica el título de DVD a ripear. - La opción indica el uso de la pista 128, - y para copiarla como está. Puede usar - MPlayer para encontrar los valores - correctos para las opciones. - - - - Las opciones para - mejoran la calidad frente a la tasa de bits, pero - hacen que la codificacion dure más. Especialmente - ralentiza la codificación pero incrementa la calidad visiblemente. Si quiere - desentrelazar, añada un filtro a , - por ejemplo (en ese orden). - Si no necesita invertir el telecine, quite . - - - - - - -Cómo tratar con telecine y entrelazado con DVDs NTSC - - -Introducción - - Le sugiero que visite esta página si no entiende mucho lo que está - escrito en este documento: - http://www.divx.com/support/guides/guide.php?gid=10 - Esta URL enlaza a una descripción de lo que es telecine inteligible y - razonablemente comprensible. - - - - Por razones técnicas pertinentes a las limitaciones de reciente - hardware de televisión, todos los videos que están pensados para ser - reproducidos en una televisión NTSC deben tener 59.94 campos por segundo. - Las películas hechas-para-TV y los espectáculos son grabados - directamente a 24 o 23.976 marcos por segundo. Cuando una película - para cine DVD es masterizada, el video es entonces convertido para la - televisión usando un proceso llamado telecine. - - - - En un DVD, el video nunca se almacena como 59.94 campos por segundo. - Para video que es originalmente a 59.94, cada par de campos es - combinado para formar un marco de imagen, resultando en 29.97 marcos - por segundo. Los reproductores de DVD por hardware entonces leen un - indicador embebido en el flujo de video para determinar si son las - líneas pares o las impares las que deben formar el primer campo. - - - - Normalmente, 23.976 marcos de imagen por segundo se mantienen así - cuando son codificados en un DVD, y el reproductor de DVD debe - realizar el telecine sobre la marcha. Algunas veces, sin embargo, - el video es pasado por el proceso de telecine antes - de ser almacenado en el DVD; incluso aunque tenga originalmente - 23.976 marcos de imagen por segundo, se hace que tenga 59.94 campos - por segundo, y es almacenado en disco como 29.97 marcos de imagen - por segundo. - - - - Cuando se observan como marcos individuales formados por 59.94 campos - por segundo de video, telecine o viceversa, el entrelazado es claramente - visible en cuanto hay movimiento, porque un campo (digamos, las líneas - numeradas pares) representa un momento en el tiempo 1/59.94 de un - segundo después de otro. Al reproducir video entrelazado en un - ordenador se ve mal porque el monitor tiene una resolución mayor - y porque el video es mostrado marco-tras-marco en lugar de - campo-tras-campo. - - - -Notas: - - - - Esta sección solo se aplica a DVDs NTSC, y no a PAL. - - - El ejemplo MEncoder que hay a lo largo del - documento no está comprendido para - uso normal. Símplemente tiene lo mínimo requerido para codificar la - categoría de video pertinente. Cómo hacer ripeados de DVD buenos o - ajuste fino de libavcodec - para máxima calidad no es el objetivo de este documento. - - - Hay un montón de notas a pie de página específicas en esta guia, enlazadas - como esto: - [1] - - - - -Cómo decir el tipo de video que tiene - - -Progresivo - - Video progresivo fue grabado originalmente a 23.976 fps, y almacenado - en el DVD sin alteración. - - - - Cuando reproduce un DVD progresivo en MPlayer, - MPlayer mostrará la siguiente línea tan pronto - como comience la película: - - demux_mpg: 24fps progressive NTSC content detected, switching framerate. - - Desde este punto de vista, demux_mpg nunca debe decir que encuentra - "contenido a 30fps NTSC." - - - - Cuando vea video progresivo, nunca debe ver ningún entrelazado. Tenga - cuidado, sin embargo, porque algunas veces hay un poco de telecine - mezclado, donde no se lo espera. He encontrado DVDs de espectáculos de - TV que tienen un segundo de telecine en cada cambio de escena, o - en lugares aleatorios incluso. Una vez vi un DVD que tenía el primer - campo progresivo, y el segundo campo era telecine. Si quiere - realmente saberlo, puede escanear la película - entera: - - mplayer dvd://1 -nosound -vo null -benchmark - - Usando hace que - MPlayer reproduzca la película tan rápido - como pueda; tenga en cuenta, dependiendo de su hardware, puede tardar - bastante. Cada vez que demux_mpg informa de un cambio de tasa de bits, - la línea inmediatamente por encima le dirá el tiempo en el que el - cambio ha ocurrido. - - - - Algunas veces el video progresivo es referido como "soft-telecine" - porque está pensado para ser procesado en telecine por el reproductor de DVD. - - - - -Telecine - - Video con telecine fue grabado originalmente a 23.976 fps, pero fue - pasado por proceso de telecine antes de ser - escrito en el DVD. - - - - MPlayer no (nunca) informa de cambios - en la tasa de bits cuando reproduce video con telecine. - - - - Al ver video con telecine, verá artefactos de entrelazado, que parecen - "parpadear": repetidamente aparecen y desaparecen. - Puede verlo de cerca con - - - mplayer dvd://1 -speed 0.1 - - - Busque una parte con movimiento. - - - Localice un patrón de búsqueda-entrelazada y búsqueda-progresiva - en marcos de imagen. Si el patrón que ve es PPPII,PPPII,PPPII,... - entonces el video es con telecine. Si ve algún otro patrón, entonces - el video puede que esté con telecine usando algún método no estándar - y MEncoder no puede convertirlo sin pérdidas - en progresivo. Si no ve ningún patrón, entonces lo más seguro es que - sea entrelazado. - - - - - - Algunas veces el video telecine es referido como "hard-telecine". - - - - -Entrelazado - - El video entrelazado fue originalmente grabado a 59.94 campos por segundo, - y almacenado en el DVD como 29.97 marcos por segundo. El entreñazado - es el resultado de combinar pares de campos en marcos, porque en cada - marco de imagen, cada campo ocupa 1/59.94 segundos. - - - - Como en el video en telecine, MPlayer nunca - debe informar de ningún cambio en la tasa de bits mientras reproduce - contenido entrelazado. - - - - Cuando ve video entrelazado de cerca con , - puede ver que cada marco simple es entrelazado. - - - - -Mezcla progresiva y telecine - - Todo video "mezcla progresivo y telecine" originalmente es a - 23.976 marcos por segundo, pero algunas partes de él terminan siendo en - telecine. - - - - Cuando MPlayer reproduce esta categoria, - (a menudo de forma repetida) cambia entre "30fps NTSC" y - "24fps progresivo NTSC". Consulte la parte de abajo de - la salida de MPlayer para ver estos - mensajes. - - - - Deberá consultar las secciones de "30fps NTSC" para - asegurarse de que es telecine, y no simplemente entrelazado. - - - - -Mezcla de progresivo y entrelazado - - En el contenido "mezcla de progresivo y entrelazado", el - video progresivo y entrelazado se colocan juntos. - - - - Esta categoría es similar a "mezcla progresivo y telecine", - hasta que examine las secciones de 30fps y vea que no tiene el patrón - de telecine. - - - - - - -Cómo codificar cada categoría - - Como dije antes al principio, las líneas de ejemplo de - MEncoder de más abajo no - son para ser usadas; solo son para demostrar los parámetros mínimos para codificar - en cada categoría. - - - -Progresivo - - El video progresivo no requiere un filtrado especial para codificarlo. El - único parámetro que seguramente necesita usar es . - Si no lo hace, MEncoder intentará codificar a - 29.97 fps y marcos duplicados. - - - - mencoder dvd://1 -nosound -ovc lavc -ofps 23.976 - - - - -Telecine - - Telecine puede ser invertido para obtener el contenido 23.976 original, - usando un proceso llamado telecine-inverso. - MPlayer contiene dos filtros para - conseguir esto: y . Puede leer - la página de manual para ver las diferencias, pero para DVDs nunca he tenido - problemas con . Note que - siempre deberá hacer telecine-inverso - antes de cualquier reescalado; a menos que realmente sepa lo que está haciendo, - telecine-inverso antes de recortar también - [1]. De nuevo, - necesitará también. - - - - mencoder dvd://1 -nosound -vf ivtc=1 -ovc lavc -ofps 23.976 - - - - -Entrelazado - - Para la mayor parte de los casos prácticos no es posible obtener un - video progresivo completo de un contenido entrelazado. La única manera - de hacerlo sin perder la mitad de la resolución vertical es doblar la - tasa de imágenes por segundo e intentar "adivinar" como se - obtienen las correspondientes líneas para cada campo (esto ocasiona - problemas - vea el método 3). - - - - - - Codifique el video en formato entrelazado. Normalmente, el entrelazado - permite al codificador comprimir bien, pero - libavcodec tiene dos - parámetros específicos para jugar con video entrelazado un poco mejor: - y . Además, es - altamente recomendable usar - [2] porque codifica - los macrobloques como no entrelazados en lugares donde no hay movimiento. - Note que NO es necesario aquí. - - mencoder dvd://1 -nosound -ovc lavc -lavcopts ildct:ilme:mbd=2 - - - Use un filtro de desentrelazado antes de codificar. Hay varios - filtros disponibles para elegir, cada uno con sus ventajas y sus - desventajas. Consulte para ver - qué hay disponible (grep "deint"), y busque en las - - listas de correo MPlayer para encontrar - discusiones acerca de varios filtros. De nuevo, la tasa de bits por segundo - no cambia, nada de . Además, el desentrelazado debe - hacerse después del recortado - [1] y antes del escalado. - - mencoder dvd://1 -nosound -vf pp=lb -ovc lavc - - - Desafortunadamente, esta opción tiene fallos con - MEncoder; funcionará bien con - MEncoder G2, pero todavía no está disponible. - Puede experimentar cuelgues del sistema. De todos modos, el propósito - de es crear una tasa de bits completa por - campo, que haga que la tasa completa sea de 59.94. La ventaja de esta - aproximación es que no hay pérdida de datos; sin embargo, como cada marco - viene solo con un campo, las líneas que faltan tienen que se interpoladas - de alguna manera. No hay buenos métodos para generar estos datos - que faltan, y el resultado será un poco similar al que se obtiene cuando - se usan algunos filtros de desentrelazado. La generación de las líneas - que faltan crean otros problemas, símplemente porque se dobla la cantidad - de datos. Por eso, tasas de bits más altas para la codificación son - requeridas para mantener la calidad, y se usa más potencia de CPU para - la codificación y la decodificación. tfields tiene varias opciones - distintas para crear las líneas que faltan en cada marco. Si usa - este método, refiérase al manual, y elija la opción que mejor se ajuste - para su material. Note que cuando use - tiene que especificar - y para doblar la tasa de bits de su fuente - original. - - mencoder dvd://1 -nosound -vf tfields=2 -ovc lavc -fps 59.94 -ofps 59.94 - - - Si planea subescalar dramáticamente, puede codificar solo uno de los - dos campos. Por supuesto, perderá la mitad de la resolución vertical, - pero si planea subescalar a al menos 1/2 del original, la pérdida no - importa mucho. El resultado será un archivo progresivo de 29.97 marcos - por segundo. El procedimiento es usar , entonces - recortar [1] y - escalar apropiadamente. Recuerde que tiene que ajustar la escala para - compensar la resolución vertical que está siendo perdida. - mencoder dvd://1 -nosound -vf field=0 -ovc lavc - - - - - -Mezcla de progresivo y telecine - - Para mezclar video progresivo y telecine en un video completamente - progresivo, las partes en telecine tienen que pasar por el proceso - de telecine-inverso. Hay dos filtros que realizan esto nativamente, pero - una solución mejor casi siempre es usar dos filtros conjuntamente - (lea más adelante para más detalles). - - - - - Actualmente el método más fiable para tratar este tipo de video - es, en lugar de hacer telecine-inverso con las partes en telecine, - pasar a telecine las partes que no lo son y luego hacer telecine-inverso - del video completo. ¿Suena confuso? softpulldown es un filtro que - hadce que el video se haga completamente en telecine. Si se sigue - softpulldown con alguno de entre o - , el resultado final será completamente progresivo. - El recortado y el escalado debe hacerse después de las operaciones de - telecine-inverso, y es necesario. - - mencoder dvd://1 -nosound -vf softpulldown,ivtc=1 -ovc lavc -ofps 23.976 - - - - está diseñado para hacer telecine-inverso - con material en telecine mientras que deja el video progresivo como - datos aislados. Pullup no funciona muy bien con el - MEncoder actual, realmente está hecho - para ser usado con MEncoder G2 (cuando esté - listo). Funciona bien sin , pero - se necesita para prevenir salida con saltos. - Con , algunas veces falla. Los problemas vienen - de mantener la sincronización entre el audio y el video: elimina - marcos antes de enviarlos a la cadena de filtros, en lugar de después. - Como resultado, algunas veces pierde los - datos que necesita. - - - - Si MEncoder descarta demasiados marcos de - imagen en una fila, se carga los buffers y - causa el fallo del programa. - - - - Incluso si MEncoder solo descarta un marco, - sigue sin verse bien, y puede resultar en - una secuencia incorrecta de marcos de imagen. Incluso si no causa - un fallo del sistema, es capaz de hacer decisión - de correcciones sobre como reensamblar los marcos progresivos, y - hacer coincidir campos juntos de manera incorrecta o descargar - algunos campos para compensar. - - - - - Recientemente he usado yo mismo, pero - esto es lo que dice D Richard Felker III: - -
Está bien, pero IMO (en mi opinión) intenta - densentrelazar en lugar de hacer inversión del telecine - demasiado a menudo (muy similar a los reproductores de sobremesa - de DVD y TVs progresivas) que causan parpadeos que afean y - otros artefactos. Si está haciendo uso de esto, necesita por lo - menos perder algún tiempo haciendo un ajuste fino de las opciones - y viendo la salida para asegurarse de que no está haciendolo mal. -
-
-
-
- - -Mezcla de progresivo y entrelazado - - Hay dos opciones para tratar esta categoría, cada una con sus - compromisos. Debe decidir si se quiere basar en la duración - o localización de cada tipo. - - - - - Trátelo como progresivo. Las partes entrelazadas parecen entrelazadas, - y algunos campos entrelazados son descartados, resultando en un - poco dispares y con saltos. Puede usar un filtro de postprocesado - si quiere, pero degradará ligeramente las partes progresivas. - - - - Definitivamente esta opción no debe ser usada si quiere eventualmente - mostrar el video en un dispositivo entrelazado (con una tarjeta de TV, - por ejemplo). Si tiene marcos entrelazados en un video de 23.976 marcos - por segundo, deben ponerse en telecine junto con los marcos - progresivos. La mitad de los "marcos" entrelazados serán mostrados - en duración de tres campos (3/59.94 segundos), resultando en un - efecto de parpadeo "con salto atrás en el tiempo" lo que hace - que se vea bastante mal. Si quiere intentarlo, - debe usar un filtro de desentrelazado - como o . - - - - También puede ser una mala idea para una pantalla progresiva. - Descartará pares de campos consecutivos entrelazados, resultando - en una discontinuidad que puede ser más visible que con el segundo - método, el cual muestra algunos marcos progresivos dos veces. El - video entrelazado a 29.97 marcos por segundo ya se ve realmente con - saltitos porque debe ser mostrado a 59.94 campos por segundo, lo que - hace que los marcos duplicados no estén durante mucho tiempo en pantalla. - - - - En cualquier caso, es mejor considerar su contenido y cómo quiere - mostrarlo. Si su video es 90% progresivo y no tiene intención de - mostrarlo en una TV, debería usar una aproximación progresiva. Si - es solo la mitad progresivo, probablemente querrá codificarlo como - está si todo está entrelazado. - - - - - Trátelo como entrelazado. Algunas características de las partes - progresivas serán tratadas por duplicado, resultando en una imagen - a saltos. De nuevo, los filtros de desentrelazado pueden degradar - ligeramente las partes progresivas. - - - - - -
- - -Notas a pie de página - - - Acerca del recortado: - - Los datos de video de los DVDs son almacenados en un formato llamado - YUV 4:2:0. En video YUV, la luminancia ("brillo") y la - crominancia ("color") se almacenan por separado. Debido - a que el ojo humano es menos sensible al color que al brillo, en una - imagen YUV 4:2:0 hay solo un pixel de crominancia por cada cuatro de - luminancia (dos por lado) teniendo el pixel de crominancia común. - Debe recortar YUV progresivo 4:2:0 a resoluciones pares, e incluso usar - desplazamientos pares. Por ejemplo, - es CORRECTO pero no lo es. - - - - - Cuando esté tratando con YUV 4:2:0 entrelazado, la situación es un - poco más complicada. En lugar de cada cuatro pixels de luminancia en - el marco compartiendo uno de crominancia, cada - cuatro de luminancia en cada campo comparten un - pixel de crominancia. Cuando los campos son entrelazados para formar - un marco, cada scanline es un pixel de alta. Ahora, en lugar de cada - cuatro pixels de luminancia en un cuadrado, hay dos pixels lado-a-lado, - y los otros dos pixels están lado-a-lado dos scanlines más abajo. Los dos - pixels de luminancia en la scanline intermedia son del otro campo, y - por eso comparten un pixel distinto de crominancia con dos pixels de - luminancia dos scanlines más allá. Toda esta confusión hace necesario - tener dimensiones y desplazamientos de recorte vertical en múltiplos - de cuatro. El horizontal puede quedarse igual. - - - - Para video en telecine, recomiendo que se recorte después de hacer - la inversión del telecine. Una vez que el video es progresivo solo - necesita recortar con números pares. Si realmente quiere ganar algo - de velocidad más que lo que el primer recortado puede ofrecer, debe - recortar verticalmente en múltiplos de cuatro o bien usar el filtro - de telecine-inverso con los datos apropiados. - - - - Para video entrelazado (no telecine), siempre debe recortar - verticalmente por múltiplos de cuatro a menos que use - antes de recortar. - - - - - Acerca de los parámetros de codificado y la calidad: - - Solo porque yo recomiendo aquí no significa que - deba ser usado siempre. Junto con , - es una de las dos opciones de - libavcodec que pueden - incrementar la calidad, y siempre debe usar al menos estos dos - a menos que la pérdida de velocidad sea prohibitiva (e.g. codificación - en tiempo real). Hay muchas otras opciones para - libavcodec que incrementan - la calidad de la codificación (e incrementa la velocidad de la codificación) - pero eso queda más allá del objeto de este documento. - - - - - - - - -
-
diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/es/skin.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/es/skin.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/es/skin.xml 2011-03-03 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/es/skin.xml 2011-12-08 17:11:52.000000000 +0000 @@ -803,40 +803,32 @@
-Control de reproducción: - evNext + evNone -Salta a la siguiente pista en la lista de reproducción. +Mensaje vacío, no tiene efecto (excepto quizá en las versiones CVS :-)). +Control de reproducción: - evPause + evPlay -Forma un cambio junto con evPlaySwitchToPause. Puede ser -usado para tener un botón normal de play/pausa. Ambos mensajes deben ser asignados -a botones que se muestren exactamente en la misma posición en la ventana. Este mensaje -pausa la reproducción y la imagen para el botón evPlaySwitchToPause -es mostrada (para indicar que el botón puede ser pulsado de nuevo para continuar -la reproducción). +Inicia la reproducción. - evPlay + evStop -Inicia la reproducción. +Detiene la reproducción. + - evPlaySwitchToPause + evPause -Lo contrario a evPauseSwitchToPlay. Este mensaje inicia -la reproducción y la imagen para el botón evPauseSwitchToPlay -es mostrada (para indicar que el botón puede ser pulsado de nuevo para -volver a pausar la reproducción). @@ -848,247 +840,236 @@ - evStop + evNext -Detiene la reproducción. +Salta a la siguiente pista en la lista de reproducción. -
- -Búsqueda: - evBackward10sec + evLoad -Busca 10 segundos hacia atrás. +Carga un archivo (abriendo una ventana del navegador de archivos, para que pueda elegir uno). - evBackward1min + evLoadPlay -Busca 1 minuto hacia atrás. +Hace lo mismo que evLoad, pero inicia automáticamente la reproducción +después de cargar el archivo. - evBackward10min + evLoadAudioFile -Busca 10 minutos hacia atrás. +Carga un archivo de audio (con el selector de archivos) - evForward10sec + evLoadSubtitle -Busca 10 segundos hacia adelante. +Carga un archivo de subtítulos (con el selector de archivos) - evForward1min + evDropSubtitle -Busca 1 minuto hacia adelante. +Desactiva el uso de subtítulos actual. - evForward10min + evPlaylist -Busca 10 minutos hacia adelante. +Abre/cierra la ventana de lista de reproducción. - evSetMoviePosition + evPlayVCD -Busca la posición (puede ser usado por un potmetro; el -valor relativo (0-100%) del potmetro será el que se use). +Intenta abrir el disco en la unidad de CD-ROM dada. - - -Control de video: - - evDoubleSize - -Establece doble tamaño para la ventana de la película. - - - evFullScreen + evPlayDVD -Cambia el modo pantalla completa activado/desactivado. +Intenta abrir el disco en la unidad de DVD-ROM dada. + - evNormalSize + evLoadURL -Establece la ventana de video a tu tamaño normal +Muestra la ventana de diálogo para URL. - - -Control de audio: - evDecAudioBufDelay + evPlaySwitchToPause -Decrementa el retardo en el buffer de audio. +Lo contrario a evPauseSwitchToPlay. Este mensaje inicia +la reproducción y la imagen para el botón evPauseSwitchToPlay +es mostrada (para indicar que el botón puede ser pulsado de nuevo para +volver a pausar la reproducción). - evDecBalance + evPauseSwitchToPlay -Decrementa el balance. +Forma un cambio junto con evPlaySwitchToPause. Puede ser +usado para tener un botón normal de play/pausa. Ambos mensajes deben ser asignados +a botones que se muestren exactamente en la misma posición en la ventana. Este mensaje +pausa la reproducción y la imagen para el botón evPlaySwitchToPause +es mostrada (para indicar que el botón puede ser pulsado de nuevo para continuar +la reproducción). + +Búsqueda: - evDecVolume + evBackward10sec -Decrementa el volumen. +Busca 10 segundos hacia atrás. - evIncAudioBufDelay + evBackward1min -Incrementa el retardo en el buffer de audio. +Busca 1 minuto hacia atrás. - evIncBalance + evBackward10min -Incrementa el balance. +Busca 10 minutos hacia atrás. - evIncVolume + evForward10sec -Incrementa el volumen. +Busca 10 segundos hacia adelante. - evMute + evForward1min -Silencia/activa el sonido. +Busca 1 minuto hacia adelante. - evSetBalance + evForward10min -Establece el balance (puede ser usado por un potmetro; el -valor relativo (0-100%) del potmetro será el que se use). +Busca 10 minutos hacia adelante. - evSetVolume + evSetMoviePosition -Establece el volumen (puede ser usado por un potmetro; el +Busca la posición (puede ser usado por un potmetro; el valor relativo (0-100%) del potmetro será el que se use). -Miscelánea: - - evAbout - -Abre la ventana de acerca de. - - - +Control de video: - evDropSubtitle + evHalfSize -Desactiva el uso de subtítulos actual. - - evEqualizer + evDoubleSize -Activa/desactiva el ecualizador. +Establece doble tamaño para la ventana de la película. - - evExit + evFullScreen -Sale del programa. +Cambia el modo pantalla completa activado/desactivado. - - evIconify + evNormalSize -Iconifica la ventana. +Establece la ventana de video a tu tamaño normal - - evLoad + evSetAspect -Carga un archivo (abriendo una ventana del navegador de archivos, para que pueda elegir uno). + + +Control de audio: - evLoadPlay + evDecVolume -Hace lo mismo que evLoad, pero inicia automáticamente la reproducción -después de cargar el archivo. +Decrementa el volumen. - evLoadSubtitle + evIncVolume -Carga un archivo de subtítulos (con el selector de archivos) +Incrementa el volumen. - evLoadAudioFile + evSetVolume -Carga un archivo de audio (con el selector de archivos) +Establece el volumen (puede ser usado por un potmetro; el +valor relativo (0-100%) del potmetro será el que se use). - evNone + evMute -Mensaje vacío, no tiene efecto (excepto quizá en las versiones CVS :-)). +Silencia/activa el sonido. - evPlaylist + evSetBalance -Abre/cierra la ventana de lista de reproducción. +Establece el balance (puede ser usado por un potmetro; el +valor relativo (0-100%) del potmetro será el que se use). - evPlayDVD + evEqualizer -Intenta abrir el disco en la unidad de DVD-ROM dada. +Activa/desactiva el ecualizador. + + +Miscelánea: - evPlayVCD + evAbout -Intenta abrir el disco en la unidad de CD-ROM dada. +Abre la ventana de acerca de. @@ -1100,23 +1081,23 @@ - evSetAspect + evSkinBrowser -Establece el aspecto de la imagen mostrada. +Abre la ventana del navegador de skins. - evSetURL + evIconify -Muestra la ventana de diálogo para URL. +Iconifica la ventana. - evSkinBrowser + evExit -Abre la ventana del navegador de skins. +Sale del programa. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/fr/documentation.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/fr/documentation.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/fr/documentation.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/fr/documentation.xml 2011-11-07 19:54:29.000000000 +0000 @@ -163,21 +163,9 @@ - MPlayer et MEncoder peuvent être distribués selon les termes de la GNU General Public License Version 2. - -&install.xml; - -&usage.xml; -&video.xml; -&ports.xml; -&mencoder.xml; -&encoding-guide.xml; -&faq.xml; -&bugreports.xml; -&skin.xml; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/fr/encoding-guide.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/fr/encoding-guide.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/fr/encoding-guide.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/fr/encoding-guide.xml 2011-07-23 19:33:08.000000000 +0000 @@ -4206,19 +4206,19 @@ Très haute qualité - + 6 0dB Haute qualité - + 13 -0.89dB Rapide - + 17 -1.48dB diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/fr/skin.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/fr/skin.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/fr/skin.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/fr/skin.xml 2011-12-08 17:11:52.000000000 +0000 @@ -781,38 +781,32 @@ -Contrôle de lecture: - evNext + evNone -Saute à la prochaine piste dans la playlist. +Message vide, sans effet. (à part peut-être dans les versions CVS :-)). +Contrôle de lecture: - evPause + evPlay -Associé à la commande evPlaySwitchToPause. Ils s'utilisent pour -avoir un bouton play/pause commun. Les deux messages peuvent être assignés aux -boutons affichés exactement à la même position dans la fenêtre. Ces messages mettent -la lecture en pause et le bouton evPlaySwitchToPause s'affiche -(pour indiquer que le bouton peut être pressé pour continuer la lecture). +Commence la lecture. - evPlay + evStop -Commence la lecture. +Stoppe la lecture. + - evPlaySwitchToPause + evPause -Le contraire de evPauseSwitchToPlay. Ce message démarre la -lecture et l'image associée au bouton evPauseSwitchToPlay -s'affiche (pour indiquer que le bouton peut être pressé pour mettre en pause la lecture). @@ -824,254 +818,236 @@ - evStop + evNext -Stoppe la lecture. +Saute à la prochaine piste dans la playlist. - - -Déplacement dans le flux: - evBackward10sec + evLoad -Recule de 10 secondes. +Charge un fichier (en ouvrant un mini navigateur de fichiers, où vous pouvez +choisir un fichier). - evBackward1min + evLoadPlay -Recule de 1 minute. +Fait la même chose que evLoad, mais démarre la lecture +automatiquement après le chargement du fichier. - evBackward10min + evLoadAudioFile -Recule de 10 minutes. +Charge un fichier audio (avec un sélecteur de fichier) - evForward10sec + evLoadSubtitle -Avance de 10 secondes. +Charge un fichier de sous-titres (avec un sélecteur de fichier) - evForward1min + evDropSubtitle -Avance de 1 minute. +Désactive le sous-titre actuellement utilisé. - evForward10min + evPlaylist -Avance de 10 minutes. +Ouvre/ferme la playlist. - evSetMoviePosition + evPlayVCD -Se place à la position (utilisable avec un podomètre; utilise la valeur relative -(0-100%) du podomètre). +Essaie d'ouvrir le disque dans le lecteur CD-ROM indiqué. - - -Contrôle vidéo: - evHalfSize - -Réduit de moitié la taille de la fenêtre vidéo. - - - - evDoubleSize - -Double la taille de la fenêtre vidéo. - - - - evFullScreen + evPlayDVD -Passe en mode plein écran. +Essaie d'ouvrir le disque dans le lecteur DVD-ROM indiqué. + - evNormalSize + evLoadURL -Met la vidéo à sa taille réelle. +Ouvre la fenêtre de saisie d'URL. - - -Contrôle audio: - evDecAudioBufDelay + evPlaySwitchToPause -Diminue le délai du tampon audio. +Le contraire de evPauseSwitchToPlay. Ce message démarre la +lecture et l'image associée au bouton evPauseSwitchToPlay +s'affiche (pour indiquer que le bouton peut être pressé pour mettre en pause la lecture). - evDecBalance + evPauseSwitchToPlay -Diminue la balance. +Associé à la commande evPlaySwitchToPause. Ils s'utilisent pour +avoir un bouton play/pause commun. Les deux messages peuvent être assignés aux +boutons affichés exactement à la même position dans la fenêtre. Ces messages mettent +la lecture en pause et le bouton evPlaySwitchToPause s'affiche +(pour indiquer que le bouton peut être pressé pour continuer la lecture). + +Déplacement dans le flux: - evDecVolume + evBackward10sec -Diminue le volume. +Recule de 10 secondes. - evIncAudioBufDelay + evBackward1min -Augmente le délai du tampon audio. +Recule de 1 minute. - evIncBalance + evBackward10min -Augmente la balance. +Recule de 10 minutes. - evIncVolume + evForward10sec -Augmente le volume. +Avance de 10 secondes. - evMute + evForward1min -Active/désactive le son. +Avance de 1 minute. - evSetBalance + evForward10min -Fixe la balance (utilisable avec un podomètre; utilise la valeur relative (0-100%) -du podomètre). +Avance de 10 minutes. - evSetVolume + evSetMoviePosition -Fixe le volume (utilisable avec un podomètre; utilise la valeur relative (0-100%) -du podomètre). +Se place à la position (utilisable avec un podomètre; utilise la valeur relative +(0-100%) du podomètre). -Divers: - - evAbout - -Ouvre la fenêtre 'A Propos'. - - - +Contrôle vidéo: - evDropSubtitle + evHalfSize -Désactive le sous-titre actuellement utilisé. - +Réduit de moitié la taille de la fenêtre vidéo. + - - evEqualizer + evDoubleSize -Active/désactive l'équalizer. +Double la taille de la fenêtre vidéo. - - evExit + evFullScreen -Quitte le programme. +Passe en mode plein écran. - - evIconify + evNormalSize -Iconifie la fenêtre. +Met la vidéo à sa taille réelle. - - evLoad + evSetAspect -Charge un fichier (en ouvrant un mini navigateur de fichiers, où vous pouvez -choisir un fichier). + + +Contrôle audio: - evLoadPlay + evDecVolume -Fait la même chose que evLoad, mais démarre la lecture -automatiquement après le chargement du fichier. +Diminue le volume. - evLoadSubtitle + evIncVolume -Charge un fichier de sous-titres (avec un sélecteur de fichier) +Augmente le volume. - evLoadAudioFile + evSetVolume -Charge un fichier audio (avec un sélecteur de fichier) +Fixe le volume (utilisable avec un podomètre; utilise la valeur relative (0-100%) +du podomètre). - evNone + evMute -Message vide, sans effet. (à part peut-être dans les versions CVS :-)). +Active/désactive le son. - evPlaylist + evSetBalance -Ouvre/ferme la playlist. +Fixe la balance (utilisable avec un podomètre; utilise la valeur relative (0-100%) +du podomètre). - evPlayDVD + evEqualizer -Essaie d'ouvrir le disque dans le lecteur DVD-ROM indiqué. +Active/désactive l'équalizer. + + +Divers: - evPlayVCD + evAbout -Essaie d'ouvrir le disque dans le lecteur CD-ROM indiqué. +Ouvre la fenêtre 'A Propos'. @@ -1083,23 +1059,23 @@ - evSetAspect + evSkinBrowser -Fixe l'aspect de l'image. +Ouvre le navigateur de skins. - evSetURL + evIconify -Ouvre la fenêtre de saisie d'URL. +Iconifie la fenêtre. - evSkinBrowser + evExit -Ouvre le navigateur de skins. +Quitte le programme. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/hu/documentation.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/hu/documentation.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/hu/documentation.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/hu/documentation.xml 2011-11-07 19:54:29.000000000 +0000 @@ -160,21 +160,9 @@ - Az MPlayer és MEncoder a GNU General Public License v2 értelmében terjeszthető. - -&install.xml; - -&usage.xml; -&video.xml; -&ports.xml; -&mencoder.xml; -&encoding-guide.xml; -&faq.xml; -&bugreports.xml; -&skin.xml; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/hu/encoding-guide.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/hu/encoding-guide.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/hu/encoding-guide.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/hu/encoding-guide.xml 2011-07-23 19:33:08.000000000 +0000 @@ -4294,19 +4294,19 @@ Nagyon jó minőség - + 6fps 0dB Jó minőség - + 13fps -0.89dB Gyors - + 17fps -1.48dB diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/hu/skin.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/hu/skin.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/hu/skin.xml 2011-03-03 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/hu/skin.xml 2011-12-08 17:11:52.000000000 +0000 @@ -810,39 +810,32 @@ -Lejátszás vezérlése: - evNext + evNone - ugrás a következő sávra a lejátszási listában. + Üres üzenet, nincs hatása (kivéve talán a Subversion verziót :-)). +Lejátszás vezérlése: - evPause + evPlay - Párt alkot az evPlaySwitchToPause-val. Egy általános - lejátszás/szünet gomb készítéséhez használhatóak fel. Mind a két üzenetet - egy olyan gombhoz kell hozzárendelni, ami teljesen ugyan ott jelenik meg az - ablakban. Ez az üzenet megállítja a lejátszást és megjelenteti az - evPlaySwitchToPause gombhoz tartozó képet (jelezve - ezzel, hogy a gombot meg lehet nyomni a lejátszás folytatásához). + Lejátszás elindítása. - evPlay + evStop - Lejátszás elindítása. + Lejátszás megállítása. + - evPlaySwitchToPause + evPause - Az evPauseSwitchToPlay ellentéte. Ez az üzenet elkezdi a - lejátszást és megjelenteti az evPauseSwitchToPlay gomb - képét (jelezve ezzel, hogy a gombot meg lehet nyomni a lejátszás megállításához). @@ -854,253 +847,236 @@ - evStop + evNext - Lejátszás megállítása. + ugrás a következő sávra a lejátszási listában. - - -Seeking: - evBackward10sec + evLoad - Visszalépés 10 másodperccel. + Fájl betöltése (a fájl böngésző ablak megnyitásával, ahol kiválaszthatod a fájlt). - evBackward1min + evLoadPlay - Visszalépés 1 perccel. + Ugyan azt csinálja, mint az evLoad, de automatikusan elkezdi + lejátszani a fájlt, miután betöltötte. - evBackward10min + evLoadAudioFile - Visszalépés 10 perccel. + Audió fájl betöltése (a fájl választóval) - evForward10sec + evLoadSubtitle - Előrelépés 10 másodperccel. + Felirat fájl betöltése (a fájl választóval) - evForward1min + evDropSubtitle - Előrelépés 1 perccel. + Aktuálisan használt felirat letiltása. - evForward10min + evPlaylist - Előrelépés 10 perccel. + Lejátszási lista ablak megnyitása/becsukása. - evSetMoviePosition + evPlayVCD - Ugrás a pozícióhoz (potméter tudja használni; a - potméter relatív értékét (0-100%) használja). + Megpróbálja megnyitni az adott CD-ROM meghajtóban lévő lemezt. - - -Videó vezérlés: - - evHalfSize - - Film ablak méretének felezése. - - - - evDoubleSize - - Film ablak méretének duplázása. - - - evFullScreen + evPlayDVD - Teljes képernyős mód be-/kikapcsolása. + Megpróbálja megnyitni az adott DVD-ROM meghajtóban lévő lemezt. + - evNormalSize + evLoadURL - Film ablak normál méretének beállítása. + Megjeleníti az URL dialógus ablakot. - - -Audió vezérlés: - evDecAudioBufDelay + evPlaySwitchToPause - Audió buffer késleltetésének csökkentése. + Az evPauseSwitchToPlay ellentéte. Ez az üzenet elkezdi a + lejátszást és megjelenteti az evPauseSwitchToPlay gomb + képét (jelezve ezzel, hogy a gombot meg lehet nyomni a lejátszás megállításához). - evDecBalance + evPauseSwitchToPlay - Balansz csökkentése. + Párt alkot az evPlaySwitchToPause-val. Egy általános + lejátszás/szünet gomb készítéséhez használhatóak fel. Mind a két üzenetet + egy olyan gombhoz kell hozzárendelni, ami teljesen ugyan ott jelenik meg az + ablakban. Ez az üzenet megállítja a lejátszást és megjelenteti az + evPlaySwitchToPause gombhoz tartozó képet (jelezve + ezzel, hogy a gombot meg lehet nyomni a lejátszás folytatásához). + +Seeking: - evDecVolume + evBackward10sec - Hangerő csökkentése. + Visszalépés 10 másodperccel. - evIncAudioBufDelay + evBackward1min - Audió buffer késleltetésének növelése. + Visszalépés 1 perccel. - evIncBalance + evBackward10min - Balansz növelése. + Visszalépés 10 perccel. - evIncVolume + evForward10sec - Hangerő növelése. + Előrelépés 10 másodperccel. - evMute + evForward1min - Hang ki-/bekapcsolása. + Előrelépés 1 perccel. - evSetBalance + evForward10min - Balansz beállítása (potméter tudja használni; a - potméter relatív értékét (0-100%) használja). + Előrelépés 10 perccel. - evSetVolume + evSetMoviePosition - Hangerő beállítása (potméter tudja használni; a + Ugrás a pozícióhoz (potméter tudja használni; a potméter relatív értékét (0-100%) használja). -Vegyes: - - evAbout - - Programinformációs ablak megnyitása. - - - +Videó vezérlés: - evDropSubtitle + evHalfSize - Aktuálisan használt felirat letiltása. + Film ablak méretének felezése. - - evEqualizer + evDoubleSize - Equalizer be-/kikapcsolása. + Film ablak méretének duplázása. - - evExit + evFullScreen - Kilépés a programból. + Teljes képernyős mód be-/kikapcsolása. - - evIconify + evNormalSize - Ablak összecsukása kis méretűvé. + Film ablak normál méretének beállítása. - - evLoad + evSetAspect - Fájl betöltése (a fájl böngésző ablak megnyitásával, ahol kiválaszthatod a fájlt). + + +Audió vezérlés: - evLoadPlay + evDecVolume - Ugyan azt csinálja, mint az evLoad, de automatikusan elkezdi - lejátszani a fájlt, miután betöltötte. + Hangerő csökkentése. - evLoadSubtitle + evIncVolume - Felirat fájl betöltése (a fájl választóval) + Hangerő növelése. - evLoadAudioFile + evSetVolume - Audió fájl betöltése (a fájl választóval) + Hangerő beállítása (potméter tudja használni; a + potméter relatív értékét (0-100%) használja). - evNone + evMute - Üres üzenet, nincs hatása (kivéve talán a Subversion verziót :-)). + Hang ki-/bekapcsolása. - evPlaylist + evSetBalance - Lejátszási lista ablak megnyitása/becsukása. + Balansz beállítása (potméter tudja használni; a + potméter relatív értékét (0-100%) használja). - evPlayDVD + evEqualizer - Megpróbálja megnyitni az adott DVD-ROM meghajtóban lévő lemezt. + Equalizer be-/kikapcsolása. + + +Vegyes: - evPlayVCD + evAbout - Megpróbálja megnyitni az adott CD-ROM meghajtóban lévő lemezt. + Programinformációs ablak megnyitása. @@ -1112,23 +1088,23 @@ - evSetAspect + evSkinBrowser - Beállítja a megjelenített kép arányát. + Megnyitja a skin böngésző ablakot. - evSetURL + evIconify - Megjeleníti az URL dialógus ablakot. + Ablak összecsukása kis méretűvé. - evSkinBrowser + evExit - Megnyitja a skin böngésző ablakot. + Kilépés a programból. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/it/documentation.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/it/documentation.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/it/documentation.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/it/documentation.xml 2011-11-07 19:54:29.000000000 +0000 @@ -160,21 +160,9 @@ - MPlayer e MEncoder possono esser distribuiti nei termini della GNU General Public License Version 2. - -&install.xml; - -&usage.xml; -&video.xml; -&ports.xml; -&mencoder.xml; -&encoding-guide.xml; -&faq.xml; -&bugreports.xml; -&skin.xml; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/it/encoding-guide.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/it/encoding-guide.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/it/encoding-guide.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/it/encoding-guide.xml 2011-07-23 19:33:08.000000000 +0000 @@ -4135,19 +4135,19 @@ Very high quality - + 6fps 0dB High quality - + 13fps -0.89dB Fast - + 17fps -1.48dB diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/it/skin.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/it/skin.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/it/skin.xml 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/it/skin.xml 2011-12-31 12:38:52.000000000 +0000 @@ -1,5 +1,5 @@ - + <application>MPlayer</application> skin format @@ -73,7 +73,7 @@ - The subwindow is where the movie appears. It + The subwindow is where the video appears. It can display a specified image if there is no movie loaded (it is quite boring to have an empty window :-)) Note: transparency is not allowed here. @@ -502,35 +502,35 @@ $1 - play time in hh:mm:ss format + elapsed time in hh:mm:ss format $2 - play time in mmmm:ss format + elapsed time in mmmm:ss format $3 - play time in hh format (hours) + elapsed time in hh format (hours) $4 - play time in mm format (minutes) + elapsed time in mm format (minutes) $5 - play time in ss format (seconds) + elapsed time in ss format (seconds) $6 - movie length in hh:mm:ss format + running time in hh:mm:ss format $7 - movie length in mmmm:ss format + running time in mmmm:ss format $8 - play time in h:mm:ss format + elapsed time in h:mm:ss format $v @@ -559,7 +559,7 @@ $t - track number (in playlist) + track number (DVD, VCD, CD or playlist) $o @@ -577,7 +577,7 @@ $T a character according to the stream type (file: f, - Video CD: v, DVD: d, + CD: a, Video CD: v, DVD: d, URL: u) @@ -595,11 +595,11 @@ $x - movie width + video width $y - movie height + video height $C @@ -737,8 +737,8 @@ Here X and Y specify the position of the char character in the image (0,0 is the upper left corner). width and height are -the dimensions of the character in pixels. The character may be in UTF-8 -encoding. +the dimensions of the character in pixels. The character char +shall be in UTF-8 encoding. @@ -777,13 +777,14 @@ CharacterSymbol - lplay + pplay sstop epause nno sound mmono sound tstereo sound fstream is a file + astream is a CD vstream is a Video CD dstream is a DVD ustream is a URL @@ -806,39 +807,33 @@ -Playback control: - evNext + evNone - Jump to next track in the playlist. + Empty message, it has no effect. +Playback control: - evPause + evPlay - Forms a switch together with evPlaySwitchToPause. They can - be used to have a common play/pause button. Both messages should be assigned - to buttons displayed at the very same position in the window. This message - pauses playing and the image for the evPlaySwitchToPause - button is displayed (to indicate that the button can be pressed to continue - playing). + Start playing. - evPlay + evStop - Start playing. + Stop playing. + - evPlaySwitchToPause + evPause - The opposite of evPauseSwitchToPlay. This message starts - playing and the image for the evPauseSwitchToPlay button - is displayed (to indicate that the button can be pressed to pause playing). + Pause playing. @@ -850,253 +845,244 @@ - evStop + evNext - Stop playing. + Jump to next track in the playlist. - - -Seeking: - evBackward10sec + evLoad - Seek backward 10 seconds. + Load a file (by opening a file browser window, where you can choose a file). - evBackward1min + evLoadPlay - Seek backward 1 minute. + Does the same as evLoad, but it automatically starts + playing after the file is loaded. - evBackward10min + evLoadAudioFile - Seek backward 10 minutes. + Loads an audio file (with the file selector). - evForward10sec + evLoadSubtitle - Seek forward 10 seconds. + Loads a subtitle file (with the file selector). - evForward1min + evDropSubtitle - Seek forward 1 minute. + Disables the currently used subtitle. - evForward10min + evPlaylist - Seek forward 10 minutes. + Open/close the playlist window. - evSetMoviePosition + evPlayCD - Seek to position (can be used by a potmeter; the - relative value (0-100%) of the potmeter is used). + Tries to open the disc in the given CD-ROM drive. - - -Video control: - - evHalfSize - - Set the movie window to half size. - - - evDoubleSize + evPlayVCD - Set the movie window to double size. + Tries to open the disc in the given CD-ROM drive. + - evFullScreen + evPlayDVD - Switch fullscreen mode on/off. + Tries to open the disc in the given DVD-ROM drive. + - evNormalSize + evLoadURL - Set the movie window to its normal size. + Displays the URL dialog window. - - -Audio control: - evDecAudioBufDelay + evPlaySwitchToPause - Decrease audio buffer delay. + The opposite of evPauseSwitchToPlay. This message starts + playing and the image for the evPauseSwitchToPlay button + is displayed (to indicate that the button can be pressed to pause playing). - evDecBalance + evPauseSwitchToPlay - Decrease balance. + Forms a switch together with evPlaySwitchToPause. They can + be used to have a common play/pause button. Both messages should be assigned + to buttons displayed at the very same position in the window. This message + pauses playing and the image for the evPlaySwitchToPause + button is displayed (to indicate that the button can be pressed to continue + playing). + +Seeking: - evDecVolume + evBackward10sec - Decrease volume. + Seek backward 10 seconds. - evIncAudioBufDelay + evBackward1min - Increase audio buffer delay. + Seek backward 1 minute. - evIncBalance + evBackward10min - Increase balance. + Seek backward 10 minutes. - evIncVolume + evForward10sec - Increase volume. + Seek forward 10 seconds. - evMute + evForward1min - Mute/unmute the sound. + Seek forward 1 minute. - evSetBalance + evForward10min - Set balance (can be used by a potmeter; the - relative value (0-100%) of the potmeter is used). + Seek forward 10 minutes. - evSetVolume + evSetMoviePosition - Set volume (can be used by a potmeter; the relative - value (0-100%) of the potmeter is used). + Seek to position (can be used by a potmeter; the + relative value (0-100%) of the potmeter is used). -Miscellaneous: - - evAbout - - Open the about window. - - - +Video control: - evDropSubtitle + evHalfSize - Disables the currently used subtitle. + Set the video window to half size. - - evEqualizer + evDoubleSize - Turn the equalizer on/off. + Set the video window to double size. - - evExit + evFullScreen - Quit the program. + Switch fullscreen mode on/off. - - evIconify + evNormalSize - Iconify the window. + Set the video window to its normal size. - - evLoad + evSetAspect - Load a file (by opening a file browser window, where you can choose a file). + Set the video window to its original aspect ratio. + + +Audio control: - evLoadPlay + evDecVolume - Does the same as evLoad, but it automatically starts - playing after the file is loaded. + Decrease volume. - evLoadSubtitle + evIncVolume - Loads a subtitle file (with the file selector). + Increase volume. - evLoadAudioFile + evSetVolume - Loads an audio file (with the file selector). + Set volume (can be used by a potmeter; the relative + value (0-100%) of the potmeter is used). - evNone + evMute - Empty message, it has no effect. + Mute/unmute the sound. - evPlaylist + evSetBalance - Open/close the playlist window. + Set balance (can be used by a potmeter; the + relative value (0-100%) of the potmeter is used). - evPlayDVD + evEqualizer - Tries to open the disc in the given DVD-ROM drive. + Turn the equalizer on/off. + + +Miscellaneous: - evPlayVCD + evAbout - Tries to open the disc in the given CD-ROM drive. + Open the about window. @@ -1108,23 +1094,23 @@ - evSetAspect + evSkinBrowser - Sets displayed image aspect. + Open the skin browser window. - evSetURL + evIconify - Displays the URL dialog window. + Iconify the window. - evSkinBrowser + evExit - Open the skin browser window. + Quit the program. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/Makefile mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/Makefile 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -# Makefile for generating the HTML documentation - -include ../../config.mak -include xml.mak - -# Generated HTML files go here. -HTML = ../HTML - -MAIN_XML_ALL = $(foreach lang,$(DOC_LANG_ALL),$(lang)/main.xml) -CONFIGURE_GENERATED = html-chunk.xsl html-single.xsl xml.mak - -all: html-chunked html-single - -html-chunked: $(addprefix html-chunked-,$(DOC_LANGS)) -html-single: $(addprefix html-single-,$(DOC_LANGS)) - -xmllint: $(addprefix xmllint-,$(DOC_LANGS)) - -$(CONFIGURE_GENERATED) $(MAIN_XML_ALL): - ./configure - -define lang-def -html-chunked-$(lang): $(HTML)/$(lang)/dummy.html -html-single-$(lang): $(HTML)/$(lang)/MPlayer.html -$(HTML)/$(lang)/dummy.html $(HTML)/$(lang)/MPlayer.html: $(lang)/main.xml $(wildcard $(lang)/*.xml) html-common.xsl $(HTML)/$(lang)/default.css - -$(HTML)/$(lang)/default.css: - mkdir -p $$(@D) - cp -f default.css $$(@D) - -$(HTML)/$(lang)/dummy.html: - SGML_CATALOG_FILES=$(CATALOG) $(XSLT_COMMAND) $$@ html-chunk.xsl $$< - -$(HTML)/$(lang)/MPlayer.html: - SGML_CATALOG_FILES=$(CATALOG) $(XSLT_COMMAND) $$@ html-single.xsl $$< - -xmllint-$(lang): - SGML_CATALOG_FILES=$(CATALOG) $(XMLLINT_COMMAND) $(lang)/main.xml -endef - -$(foreach lang, $(DOC_LANG_ALL),$(eval $(lang-def))) - -clean: - -rm -rf $(HTML) - -# Remove generated files but keep the HTML (for release tarballs). -releaseclean: - -rm -f $(CONFIGURE_GENERATED) - -rm -f $(MAIN_XML_ALL) - -distclean: clean releaseclean - -.PHONY: all html-chunked html-single xmllint -.PHONY: html-chunked-* html-single-* xmllint-* *clean diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/pl/documentation.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/pl/documentation.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/pl/documentation.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/pl/documentation.xml 2011-11-07 19:54:29.000000000 +0000 @@ -178,21 +178,9 @@ - MPlayer i MEncoder mogą być rozprowadzane zgodnie z warunkami GNU General Public License Version 2. - -&install.xml; - -&usage.xml; -&video.xml; -&ports.xml; -&mencoder.xml; -&encoding-guide.xml; -&faq.xml; -&bugreports.xml; -&skin.xml; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/pl/encoding-guide.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/pl/encoding-guide.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/pl/encoding-guide.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/pl/encoding-guide.xml 2011-07-23 19:33:08.000000000 +0000 @@ -4297,19 +4297,19 @@ Very high quality - + 6fps 0dB High quality - + 13fps -0.89dB Fast - + 17fps -1.48dB diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/pl/skin.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/pl/skin.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/pl/skin.xml 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/pl/skin.xml 2011-12-08 17:11:52.000000000 +0000 @@ -790,40 +790,32 @@ -Kontrola odtwarzania : - evNext + evNone -Przejdź do następnej pozycji na liście odtwarzania. +Sygnał pusty - nic nie robi (może za wyjątkiem wersji z Subversion:-)). +Kontrola odtwarzania : - evPause + evPlay - Tworzy przełącznik razem z evPlaySwitchToPause. - Mogą być użyte do utworzenia wspólnego przycisku odtwarzania/pauzy. - Oba sygnały powinny być powiązane z przyciskami wyświetlonymi na tej samej - pozycji w oknie. Sygnał ten wstrzymuje odtwarzanie i wyświetla obrazek dla - przycisku evPlaySwitchToPause (aby zaznaczyć, - że przycisk ten może być użyty do kontynuowania odtwarzania). +Rozpocznij odtwarzanie. - evPlay + evStop -Rozpocznij odtwarzanie. +Zatrzymaj odtwarzanie. + - evPlaySwitchToPause + evPause -Przeciwieństwo evPauseSwitchToPlay. Ten sygnał zaczyna -odtwarzanie oraz wyświetla obrazek dla przycisku -evPauseSwitchToPlay (aby zaznaczyć, że przycisk ten może być -użyty ponownie do wstrzymania odtwarzania). @@ -835,254 +827,238 @@ - evStop + evNext -Zatrzymaj odtwarzanie. +Przejdź do następnej pozycji na liście odtwarzania. - - -Przewijanie: - evBackward10sec + evLoad -Przewiń do tyłu o 10 sekund. +Wczytaj plik (poprzez otwarcie okna przeglądarki plików, gdzie możesz wybrać +plik). - evBackward1min + evLoadPlay -Przewiń do tyłu o 1 minutę. +Tto samo co evLoad, ale zacznij automatycznie odtwarzać +zaraz po wyborze pliku. - evBackward10min + evLoadAudioFile -Przewiń do tyłu o 10 minut. +Wczytaj plik dźwiękowy (z przeglądarki plików). - evForward10sec + evLoadSubtitle -Przewiń do przodu o 10 sekund. +Wczytaj plik z napisami (z przeglądarki plików). - evForward1min + evDropSubtitle -Przewiń do przodu o 1 minutę. +Wyłącz aktualnie używane napisy. - evForward10min + evPlaylist -Przewiń do przodu o 10 minut.. +Otwórz/zamknij okno listy odtwarzania. - evSetMoviePosition + evPlayVCD -Przewiń do pozycji (może być wykorzystane przez suwak; -użyte są względne wartości (0-100%) suwaka). +Spróbuj odczytać płytę ze wskazanego czytnika CD. - - -Kontrola video: - - evHalfSize - -Ustawia okno filmu na połowę rozmiaru. - - - - evDoubleSize - -Ustaw podwójny rozmiar okna z filmem. - - - evFullScreen + evPlayDVD -Włącz/wyłącz tryb pełnoekranowy. +Spróbuj odczytać płytę ze wskazanego czytnika DVD. + - evNormalSize + evLoadURL -Ustaw typowy rozmiar okna z filmem. +Wyświetl okienko dialogowe URL. - - -Kontrola dźwięku: - evDecAudioBufDelay + evPlaySwitchToPause -Zmniejsz opóźnienie bufora dźwięku. +Przeciwieństwo evPauseSwitchToPlay. Ten sygnał zaczyna +odtwarzanie oraz wyświetla obrazek dla przycisku +evPauseSwitchToPlay (aby zaznaczyć, że przycisk ten może być +użyty ponownie do wstrzymania odtwarzania). - evDecBalance + evPauseSwitchToPlay -Zmniejsz balans. + Tworzy przełącznik razem z evPlaySwitchToPause. + Mogą być użyte do utworzenia wspólnego przycisku odtwarzania/pauzy. + Oba sygnały powinny być powiązane z przyciskami wyświetlonymi na tej samej + pozycji w oknie. Sygnał ten wstrzymuje odtwarzanie i wyświetla obrazek dla + przycisku evPlaySwitchToPause (aby zaznaczyć, + że przycisk ten może być użyty do kontynuowania odtwarzania). + +Przewijanie: - evDecVolume + evBackward10sec -Zmniejsz głośność +Przewiń do tyłu o 10 sekund. - evIncAudioBufDelay + evBackward1min -Zwiększ opóźnienie bufora dźwięku. +Przewiń do tyłu o 1 minutę. - evIncBalance + evBackward10min -Zwiększ balans. +Przewiń do tyłu o 10 minut. - evIncVolume + evForward10sec -Zwiększ głośność. +Przewiń do przodu o 10 sekund. - evMute + evForward1min -Wycisz/przywróć dźwięk. +Przewiń do przodu o 1 minutę. - evSetBalance + evForward10min -Ustawi balans (może być używane przez suwak; -używana jest wartość względna (0-100%)). +Przewiń do przodu o 10 minut.. - evSetVolume + evSetMoviePosition -Ustaw głośność (może być używane przez suwak; -używana jest wartość względna (0-100%)). +Przewiń do pozycji (może być wykorzystane przez suwak; +użyte są względne wartości (0-100%) suwaka). -Różne: +Kontrola video: - evAbout + evHalfSize -Otwórz okno "o programie". +Ustawia okno filmu na połowę rozmiaru. - - evDropSubtitle + evDoubleSize -Wyłącz aktualnie używane napisy. +Ustaw podwójny rozmiar okna z filmem. - - evEqualizer + evFullScreen -Włącz/wyłącz korektor. +Włącz/wyłącz tryb pełnoekranowy. - - evExit + evNormalSize -Wyłącz program. +Ustaw typowy rozmiar okna z filmem. - - evIconify - -Minimalizuj okno. - - - - - evLoad + evSetAspect -Wczytaj plik (poprzez otwarcie okna przeglądarki plików, gdzie możesz wybrać -plik). + + +Kontrola dźwięku: - evLoadPlay + evDecVolume -Tto samo co evLoad, ale zacznij automatycznie odtwarzać -zaraz po wyborze pliku. +Zmniejsz głośność - evLoadSubtitle + evIncVolume -Wczytaj plik z napisami (z przeglądarki plików). +Zwiększ głośność. - evLoadAudioFile + evSetVolume -Wczytaj plik dźwiękowy (z przeglądarki plików). +Ustaw głośność (może być używane przez suwak; +używana jest wartość względna (0-100%)). - evNone + evMute -Sygnał pusty - nic nie robi (może za wyjątkiem wersji z Subversion:-)). +Wycisz/przywróć dźwięk. - evPlaylist + evSetBalance -Otwórz/zamknij okno listy odtwarzania. +Ustawi balans (może być używane przez suwak; +używana jest wartość względna (0-100%)). - evPlayDVD + evEqualizer -Spróbuj odczytać płytę ze wskazanego czytnika DVD. +Włącz/wyłącz korektor. + + +Różne: - evPlayVCD + evAbout -Spróbuj odczytać płytę ze wskazanego czytnika CD. +Otwórz okno "o programie". @@ -1094,23 +1070,23 @@ - evSetAspect + evSkinBrowser -Ustaw proporcje obrazu. +Otwórz okno przeglądarki skórek. - evSetURL + evIconify -Wyświetl okienko dialogowe URL. +Minimalizuj okno. - evSkinBrowser + evExit -Otwórz okno przeglądarki skórek. +Wyłącz program. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/README mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/README --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/README 2010-10-26 08:15:56.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/README 2011-11-07 19:54:40.000000000 +0000 @@ -23,14 +23,6 @@ Building the documentation ~~~~~~~~~~~~~~~~~~~~~~~~~~ -Before trying to build the documentation, run - - make help - -to see all available build targets and make your choice. If something goes -wrong, check the Configuration section of the toplevel Makefile and adjust -the variables. - The documentation and its translations reside in subdirectories. When building the documentation, the generated HTML files are placed in subdirectories of the 'HTML' directory. @@ -41,19 +33,6 @@ when running 'make distclean' or 'make clean'. -Adding new translations -~~~~~~~~~~~~~~~~~~~~~~~ - -1) Create a new subdirectory and copy the XML files there. main.xml must not be - copied, it is autogenerated. - -2) In each translated file after the tag you must put a note - like , where 2 is the revision of corresponding - English file (see comment at the top of file). - -That's all, in theory. - - A few words about SGML catalog files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/ru/documentation.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/ru/documentation.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/ru/documentation.xml 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/ru/documentation.xml 2011-11-07 19:54:29.000000000 +0000 @@ -165,21 +165,9 @@ - MPlayer и MEncoder могут распространяться в соответствии с GNU General Public License Version 2. - -&install.xml; - -&usage.xml; -&video.xml; -&ports.xml; -&mencoder.xml; -&encoding-guide.xml; -&faq.xml; -&bugreports.xml; -&skin.xml; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/ru/encoding-guide.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/ru/encoding-guide.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/ru/encoding-guide.xml 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/ru/encoding-guide.xml 2011-07-23 19:33:08.000000000 +0000 @@ -4474,19 +4474,19 @@ Очень высокое качество - + 6fps 0дБ Высокое качество - + 13fps -0.89дБ Быстро - + 17fps -1.48дБ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/ru/skin.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/ru/skin.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/ru/skin.xml 2011-03-03 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/ru/skin.xml 2011-12-08 17:11:52.000000000 +0000 @@ -839,40 +839,32 @@ -Управление воспроизведением: - evNext + evNone - Переход к следующему элементу списка воспроизведения. + Пустое сообщение, не имеет действий (за исключением, возможно, Subversion версий :-)). +Управление воспроизведением: - evPause + evPlay - Вместе с evPlaySwitchToPause формирует переключатель паузы. - Может быть использовано для общей кнопки воспроизведение/пауза. Оба сообщения - должны быть назначены кнопкам, находящимся практически в одной точке окна. - Это сообщение ставит воспроизведение на паузу и показывает изображение кнопки с - назначенным сообщением evPlaySwitchToPause - (чтобы показать, что кнопка может быть нажата для продолжения воспроизведения). + Старт воспроизведения. - evPlay + evStop - Старт воспроизведения. + Останавливает воспроизведение. + - evPlaySwitchToPause + evPause - Противоположность evPauseSwitchToPlay. Это сообщение - запускает воспроизведение и показывает изображение кнопки с - назначенным сообщением evPauseSwitchToPlay - (чтобы показать, что кнопка может быть нажата для включения паузы). @@ -884,253 +876,237 @@ - evStop + evNext - Останавливает воспроизведение. + Переход к следующему элементу списка воспроизведения. - - -Перемещение: - evBackward10sec + evLoad - Перемещение назад на 10 секунд. + Открывает файл (открывая окно навигации, в котором вы можете выбрать файл). - evBackward1min + evLoadPlay - Перемещение назад на 1 минуту. + Делает то же, что и evLoad, но запускает вопроизведение файла + автоматически после его загрузки. - evBackward10min + evLoadAudioFile - Перемещение назад на 10 минут. + Загружает звуковой файл (с диалогом выбора файла). - evForward10sec + evLoadSubtitle - Перемещение вперед на 10 секунд. + Загружает файл с субтитрами (с диалогом выбора файла). - evForward1min + evDropSubtitle - Перемещение вперед на 1 минуту. + Отключает субтитры, использующиеся в данный момент. - evForward10min + evPlaylist - Перемещение вперед на 10 минут. + Открывае/закрывает окно со списком воспроизведения. - evSetMoviePosition + evPlayVCD - Перемещается к позиции (может использоваться ползунком; - используется относительное (0-100%) положение ползунка). + Пытается открыть диск в указанном устройстве CD-ROM. - - -Управление видео: - - evHalfSize - - Установить половинный размер окна. - - - - evDoubleSize - - Установить двойной размер окна. - - - evFullScreen + evPlayDVD - Включить/выключить полноэкранный режим. + Пытается открыть диск в указанном устройстве DVD-ROM. + - evNormalSize + evLoadURL - Установить нормальный размер окна. + Отображает диалог ввода URL. - - -Управление звуком: - evDecAudioBufDelay + evPlaySwitchToPause - Уменьшить задержку буфера звука. + Противоположность evPauseSwitchToPlay. Это сообщение + запускает воспроизведение и показывает изображение кнопки с + назначенным сообщением evPauseSwitchToPlay + (чтобы показать, что кнопка может быть нажата для включения паузы). - evDecBalance + evPauseSwitchToPlay - Уменьшить баланс. + Вместе с evPlaySwitchToPause формирует переключатель паузы. + Может быть использовано для общей кнопки воспроизведение/пауза. Оба сообщения + должны быть назначены кнопкам, находящимся практически в одной точке окна. + Это сообщение ставит воспроизведение на паузу и показывает изображение кнопки с + назначенным сообщением evPlaySwitchToPause + (чтобы показать, что кнопка может быть нажата для продолжения воспроизведения). + +Перемещение: - evDecVolume + evBackward10sec - Уменьшить громкость. + Перемещение назад на 10 секунд. - evIncAudioBufDelay + evBackward1min - Увеличить задержку буфера звука. + Перемещение назад на 1 минуту. - evIncBalance + evBackward10min - Увеличить баланс. + Перемещение назад на 10 минут. - evIncVolume + evForward10sec - Увеличить громкость. + Перемещение вперед на 10 секунд. - evMute + evForward1min - Выключить/включить звук. + Перемещение вперед на 1 минуту. - evSetBalance + evForward10min - Установить баланс (может использоваться ползунком; - используется относительное (0-100%) значение ползунка), + Перемещение вперед на 10 минут. - evSetVolume + evSetMoviePosition - Установить громкость (может использоваться ползунком; - используется относительное (0-100%) значение ползунка), + Перемещается к позиции (может использоваться ползунком; + используется относительное (0-100%) положение ползунка). -Разное: - - evAbout - - Открыть окно 'О программе'. - - - +Управление видео: - evDropSubtitle + evHalfSize - Отключает субтитры, использующиеся в данный момент. + Установить половинный размер окна. - - evEqualizer + evDoubleSize - Включает/выключает эквалайзер. + Установить двойной размер окна. - - evExit + evFullScreen - Выход из программы. + Включить/выключить полноэкранный режим. - - evIconify + evNormalSize - Сворачивает окно в иконку. + Установить нормальный размер окна. - - evLoad + evSetAspect - Открывает файл (открывая окно навигации, в котором вы можете выбрать файл). + + +Управление звуком: - evLoadPlay + evDecVolume - Делает то же, что и evLoad, но запускает вопроизведение файла - автоматически после его загрузки. + Уменьшить громкость. - evLoadSubtitle + evIncVolume - Загружает файл с субтитрами (с диалогом выбора файла). + Увеличить громкость. - evLoadAudioFile + evSetVolume - Загружает звуковой файл (с диалогом выбора файла). + Установить громкость (может использоваться ползунком; + используется относительное (0-100%) значение ползунка), - evNone + evMute - Пустое сообщение, не имеет действий (за исключением, возможно, Subversion версий :-)). + Выключить/включить звук. - evPlaylist + evSetBalance - Открывае/закрывает окно со списком воспроизведения. + Установить баланс (может использоваться ползунком; + используется относительное (0-100%) значение ползунка), - evPlayDVD + evEqualizer - Пытается открыть диск в указанном устройстве DVD-ROM. + Включает/выключает эквалайзер. + + +Разное: - evPlayVCD + evAbout - Пытается открыть диск в указанном устройстве CD-ROM. + Открыть окно 'О программе'. @@ -1142,23 +1118,23 @@ - evSetAspect + evSkinBrowser - Включает показ пропорций изображения. + Открывает окно навигации по скинам. - evSetURL + evIconify - Отображает диалог ввода URL. + Сворачивает окно в иконку. - evSkinBrowser + evExit - Открывает окно навигации по скинам. + Выход из программы. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/zh_CN/documentation.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/zh_CN/documentation.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/zh_CN/documentation.xml 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/zh_CN/documentation.xml 2011-11-07 19:54:29.000000000 +0000 @@ -167,21 +167,9 @@ - MPlayerMEncoder 可以在遵循GNU通用公用协议第2版的前提下被发布。 - -&install.xml; - -&usage.xml; -&video.xml; -&ports.xml; -&mencoder.xml; -&encoding-guide.xml; -&faq.xml; -&bugreports.xml; -&skin.xml; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/zh_CN/encoding-guide.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/zh_CN/encoding-guide.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/zh_CN/encoding-guide.xml 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/zh_CN/encoding-guide.xml 2011-07-23 19:33:08.000000000 +0000 @@ -1,5 +1,5 @@ - + Encoding with <application>MEncoder</application> @@ -4332,19 +4332,19 @@ Very high quality - + 6fps 0dB High quality - + 13fps -0.89dB Fast - + 17fps -1.48dB diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/zh_CN/faq.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/zh_CN/faq.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/zh_CN/faq.xml 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/zh_CN/faq.xml 2011-11-07 19:54:45.000000000 +0000 @@ -1,5 +1,5 @@ - + Frequently Asked Questions @@ -152,53 +152,6 @@ /usr/include/X11 symlinks exist. - - - -Building on Mac OS 10.3 leads to several link errors. - - - -The link error you're experiencing most likely looks like this: - -ld: Undefined symbols: -_LLCStyleInfoCheckForOpenTypeTables referenced from QuartzCore expected to be defined in ApplicationServices -_LLCStyleInfoGetUserRunFeatures referenced from QuartzCore expected to be defined in ApplicationServices - -This problem is the result of Apple developers using 10.4 to compile -their software and distributing the binaries to 10.3 users via -Software Update. -The undefined symbols are present in Mac OS 10.4, -but not 10.3. -One solution can be to downgrade to QuickTime 7.0.1. -Here is a better solution. - - -Get an -older copy of the frameworks. -This will give you a compressed file that contains the QuickTime -7.0.1 Framework and a 10.3.9 QuartzCore Framework. - - -Uncompress the files somewhere that is not in your System folder. -(i.e. do not install these frameworks into your -/System/Library/Frameworks! -Using this older copy is only meant to get around link errors!) -gunzip < CompatFrameworks.tgz | tar xvf - -In config.mak, you should append --F/path/to/where/you/extracted -to the OPTFLAGS variable. -If you use X-Code, you can just select these -frameworks instead of the system ones. - - -The resulting MPlayer binary will actually -use the framework that is installed on your system via dynamic links that -are resolved at run-time. -(You can verify this using otool -l). - - - diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/zh_CN/install.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/zh_CN/install.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/zh_CN/install.xml 2011-01-03 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/zh_CN/install.xml 2011-06-24 12:35:20.000000000 +0000 @@ -1,5 +1,5 @@ - + Installation @@ -194,17 +194,20 @@ As MPlayer doesn't have a skin included, you -have to download one if you want to use the GUI. See the download page. -It should be extracted to the usual system-wide directory ($PREFIX/share/mplayer/skins), or to $HOME/.mplayer/skins. -MPlayer by default looks in these directories -for a directory named default, but -you can use the -option, or the skin=newskin config file directive to use -the skin in the */skins/newskin -directory. +A skin should be extracted to the usual system-wide directory $PREFIX/share/mplayer/skins or to the user +specific directory $HOME/.mplayer/skins +and resides as a subdirectory there. +MPlayer by default first looks in the user specific +directory, then the system-wide directory for a subdirectory named +default (which +simply can be a link to your favourite skin) to load the skin, but +you can use the +option, or the skin=myskin config file directive to use +a different skin from the skins +directories. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/zh_CN/skin.xml mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/zh_CN/skin.xml --- mplayer-1.0~rc4.dfsg1+svn33713/DOCS/xml/zh_CN/skin.xml 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/DOCS/xml/zh_CN/skin.xml 2011-12-31 12:38:52.000000000 +0000 @@ -1,5 +1,5 @@ - + <application>MPlayer</application> skin format @@ -73,7 +73,7 @@ - The subwindow is where the movie appears. It + The subwindow is where the video appears. It can display a specified image if there is no movie loaded (it is quite boring to have an empty window :-)) Note: transparency is not allowed here. @@ -502,35 +502,35 @@ $1 - play time in hh:mm:ss format + elapsed time in hh:mm:ss format $2 - play time in mmmm:ss format + elapsed time in mmmm:ss format $3 - play time in hh format (hours) + elapsed time in hh format (hours) $4 - play time in mm format (minutes) + elapsed time in mm format (minutes) $5 - play time in ss format (seconds) + elapsed time in ss format (seconds) $6 - movie length in hh:mm:ss format + running time in hh:mm:ss format $7 - movie length in mmmm:ss format + running time in mmmm:ss format $8 - play time in h:mm:ss format + elapsed time in h:mm:ss format $v @@ -559,7 +559,7 @@ $t - track number (in playlist) + track number (DVD, VCD, CD or playlist) $o @@ -577,7 +577,7 @@ $T a character according to the stream type (file: f, - Video CD: v, DVD: d, + CD: a, Video CD: v, DVD: d, URL: u) @@ -595,11 +595,11 @@ $x - movie width + video width $y - movie height + video height $C @@ -737,8 +737,8 @@ Here X and Y specify the position of the char character in the image (0,0 is the upper left corner). width and height are -the dimensions of the character in pixels. The character may be in UTF-8 -encoding. +the dimensions of the character in pixels. The character char +shall be in UTF-8 encoding. @@ -777,13 +777,14 @@ CharacterSymbol - lplay + pplay sstop epause nno sound mmono sound tstereo sound fstream is a file + astream is a CD vstream is a Video CD dstream is a DVD ustream is a URL @@ -806,39 +807,33 @@ -Playback control: - evNext + evNone - Jump to next track in the playlist. + Empty message, it has no effect. +Playback control: - evPause + evPlay - Forms a switch together with evPlaySwitchToPause. They can - be used to have a common play/pause button. Both messages should be assigned - to buttons displayed at the very same position in the window. This message - pauses playing and the image for the evPlaySwitchToPause - button is displayed (to indicate that the button can be pressed to continue - playing). + Start playing. - evPlay + evStop - Start playing. + Stop playing. + - evPlaySwitchToPause + evPause - The opposite of evPauseSwitchToPlay. This message starts - playing and the image for the evPauseSwitchToPlay button - is displayed (to indicate that the button can be pressed to pause playing). + Pause playing. @@ -850,253 +845,244 @@ - evStop + evNext - Stop playing. + Jump to next track in the playlist. - - -Seeking: - evBackward10sec + evLoad - Seek backward 10 seconds. + Load a file (by opening a file browser window, where you can choose a file). - evBackward1min + evLoadPlay - Seek backward 1 minute. + Does the same as evLoad, but it automatically starts + playing after the file is loaded. - evBackward10min + evLoadAudioFile - Seek backward 10 minutes. + Loads an audio file (with the file selector). - evForward10sec + evLoadSubtitle - Seek forward 10 seconds. + Loads a subtitle file (with the file selector). - evForward1min + evDropSubtitle - Seek forward 1 minute. + Disables the currently used subtitle. - evForward10min + evPlaylist - Seek forward 10 minutes. + Open/close the playlist window. - evSetMoviePosition + evPlayCD - Seek to position (can be used by a potmeter; the - relative value (0-100%) of the potmeter is used). + Tries to open the disc in the given CD-ROM drive. - - -Video control: - - evHalfSize - - Set the movie window to half size. - - - evDoubleSize + evPlayVCD - Set the movie window to double size. + Tries to open the disc in the given CD-ROM drive. + - evFullScreen + evPlayDVD - Switch fullscreen mode on/off. + Tries to open the disc in the given DVD-ROM drive. + - evNormalSize + evLoadURL - Set the movie window to its normal size. + Displays the URL dialog window. - - -Audio control: - evDecAudioBufDelay + evPlaySwitchToPause - Decrease audio buffer delay. + The opposite of evPauseSwitchToPlay. This message starts + playing and the image for the evPauseSwitchToPlay button + is displayed (to indicate that the button can be pressed to pause playing). - evDecBalance + evPauseSwitchToPlay - Decrease balance. + Forms a switch together with evPlaySwitchToPause. They can + be used to have a common play/pause button. Both messages should be assigned + to buttons displayed at the very same position in the window. This message + pauses playing and the image for the evPlaySwitchToPause + button is displayed (to indicate that the button can be pressed to continue + playing). + +Seeking: - evDecVolume + evBackward10sec - Decrease volume. + Seek backward 10 seconds. - evIncAudioBufDelay + evBackward1min - Increase audio buffer delay. + Seek backward 1 minute. - evIncBalance + evBackward10min - Increase balance. + Seek backward 10 minutes. - evIncVolume + evForward10sec - Increase volume. + Seek forward 10 seconds. - evMute + evForward1min - Mute/unmute the sound. + Seek forward 1 minute. - evSetBalance + evForward10min - Set balance (can be used by a potmeter; the - relative value (0-100%) of the potmeter is used). + Seek forward 10 minutes. - evSetVolume + evSetMoviePosition - Set volume (can be used by a potmeter; the relative - value (0-100%) of the potmeter is used). + Seek to position (can be used by a potmeter; the + relative value (0-100%) of the potmeter is used). -Miscellaneous: - - evAbout - - Open the about window. - - - +Video control: - evDropSubtitle + evHalfSize - Disables the currently used subtitle. + Set the video window to half size. - - evEqualizer + evDoubleSize - Turn the equalizer on/off. + Set the video window to double size. - - evExit + evFullScreen - Quit the program. + Switch fullscreen mode on/off. - - evIconify + evNormalSize - Iconify the window. + Set the video window to its normal size. - - evLoad + evSetAspect - Load a file (by opening a file browser window, where you can choose a file). + Set the video window to its original aspect ratio. + + +Audio control: - evLoadPlay + evDecVolume - Does the same as evLoad, but it automatically starts - playing after the file is loaded. + Decrease volume. - evLoadSubtitle + evIncVolume - Loads a subtitle file (with the file selector). + Increase volume. - evLoadAudioFile + evSetVolume - Loads an audio file (with the file selector). + Set volume (can be used by a potmeter; the relative + value (0-100%) of the potmeter is used). - evNone + evMute - Empty message, it has no effect. + Mute/unmute the sound. - evPlaylist + evSetBalance - Open/close the playlist window. + Set balance (can be used by a potmeter; the + relative value (0-100%) of the potmeter is used). - evPlayDVD + evEqualizer - Tries to open the disc in the given DVD-ROM drive. + Turn the equalizer on/off. + + +Miscellaneous: - evPlayVCD + evAbout - Tries to open the disc in the given CD-ROM drive. + Open the about window. @@ -1108,23 +1094,23 @@ - evSetAspect + evSkinBrowser - Sets displayed image aspect. + Open the skin browser window. - evSetURL + evIconify - Displays the URL dialog window. + Iconify the window. - evSkinBrowser + evExit - Open the skin browser window. + Quit the program. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/etc/codecs.conf mplayer-1.0~rc4.dfsg1+svn34540/etc/codecs.conf --- mplayer-1.0~rc4.dfsg1+svn33713/etc/codecs.conf 2011-05-13 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/etc/codecs.conf 2012-01-06 00:18:56.000000000 +0000 @@ -3,7 +3,7 @@ ; Before editing this file, please read DOCS/tech/codecs.conf.txt ! ;============================================================================= -release 20110311 +release 20111012 ;============================================================================= ; VIDEO CODECS @@ -17,6 +17,14 @@ dll anm out BGR8 +videocodec ffansi + info "FFmpeg ASCII/ANSI art" + status working + fourcc TXT4 ; internal MPlayer FourCC + driver ffmpeg + dll ansi + out BGR8 + videocodec ffbinkvideo info "FFmpeg Bink Video" status working @@ -37,6 +45,22 @@ dll cdgraphics out BGR8 +videocodec ffeacmv + info "FFmpeg EA CMV" + status working + fourcc MVIf ; internal MPlayer FourCC + driver ffmpeg + dll eacmv + out BGR8 + +videocodec ffeamad + info "FFmpeg EA MAD" + status working + fourcc MADk ; internal MPlayer FourCC + driver ffmpeg + dll eamad + out YV12 + videocodec ffmvi1 info "FFmpeg Motion Pixels" status working @@ -54,6 +78,14 @@ dll mdec out YV12 +videocodec ffmmvideo + info "FFmpeg American Laser Games MM Video" + status working + fourcc "MMV " ; internal MPlayer FourCC + driver ffmpeg + dll mmvideo + out BGR8 + videocodec ffsiff info "FFmpeg Beam Software SIFF" status working @@ -162,6 +194,22 @@ dll "r210" out RGB48BE,RGB48LE +videocodec ffy41p + info "FFmpeg Y41P - packed 4:1:1" + status working + fourcc Y41P + driver ffmpeg + dll y41p + out 411P + +videocodec ffv410 + info "FFmpeg v410 - packed 4:4:4 10-bit" + status working + fourcc v410 + driver ffmpeg + dll v410 + out 444P10 + videocodec ffr10k info "FFmpeg R10k - 10-bit RGB" status working @@ -170,6 +218,30 @@ dll "r10k" out RGB48BE,RGB48LE +videocodec ffavrp + info "FFmpeg Avid 1:1 10-bit RGB Packer" + status working + fourcc AVrp + driver ffmpeg + dll avrp + out RGB48BE,RGB48LE + +videocodec ffv308 + info "FFmpeg Quicktime v308 packed 4:4:4" + status working + fourcc v308 + driver ffmpeg + dll v308 + out 444P + +videocodec ffyuv4 + info "FFmpeg libquicktime yuv4 packed 4:2:0" + status working + fourcc yuv4 + driver ffmpeg + dll yuv4 + out YV12 + videocodec blackmagic info "Blackmagic 10-bit" status working @@ -179,6 +251,14 @@ dll "BMDCodecLib.dll" out BGR32,RGB32 +videocodec qtsheer + info "QuickTime sheervideo" + status buggy + fourcc Shr0 + driver qtvideo + dll "SheerVideo Pro.qtx" + out BGR24,BGR16,YUY2 + ; MPEG-1/2 decoding: videocodec ffmpeg1 @@ -190,6 +270,7 @@ fourcc VCR2 fourcc MPEG fourcc m1v1 + fourcc "m1v " driver ffmpeg dll "mpeg1video" out YV12,I420,IYUV @@ -209,6 +290,7 @@ fourcc hdv1,hdv2,hdv3 fourcc hdv4,hdv5,hdv6 fourcc hdv7,hdv8,hdv9 + fourcc hdva,xdhd,xdh2 fourcc xdv1,xdv2,xdv3 fourcc xdv4,xdv5,xdv6 fourcc xdv7,xdv8,xdv9 @@ -251,6 +333,7 @@ fourcc hdv1,hdv2,hdv3 fourcc hdv4,hdv5,hdv6 fourcc hdv7,hdv8,hdv9 + fourcc hdva,xdhd,xdh2 fourcc xdv1,xdv2,xdv3 fourcc xdv4,xdv5,xdv6 fourcc xdv7,xdv8,xdv9 @@ -264,6 +347,7 @@ fourcc AVmp fourcc mp2v,mpgv fourcc m2v1,m1v1 + fourcc "m1v " fourcc LMP2 ; Lead mpeg2 in avi fourcc slif ; SoftLab MPEG-2 I-frames Codec fourcc EM2V ; Etymonix MPEG-2 I-frame Video Codec @@ -292,6 +376,7 @@ fourcc hdv1,hdv2,hdv3 fourcc hdv4,hdv5,hdv6 fourcc hdv7,hdv8,hdv9 + fourcc hdva,xdhd,xdh2 fourcc xdv1,xdv2,xdv3 fourcc xdv4,xdv5,xdv6 fourcc xdv7,xdv8,xdv9 @@ -305,6 +390,7 @@ fourcc AVmp fourcc mp2v,mpgv fourcc m2v1,m1v1 + fourcc "m1v " fourcc LMP2 ; Lead mpeg2 in avi driver libmpeg2 ; dll "libmpeg2" @@ -327,6 +413,7 @@ fourcc hdv1,hdv2,hdv3 fourcc hdv4,hdv5,hdv6 fourcc hdv7,hdv8,hdv9 + fourcc hdva,xdhd,xdh2 fourcc xdv1,xdv2,xdv3 fourcc xdv4,xdv5,xdv6 fourcc xdv7,xdv8,xdv9 @@ -340,6 +427,7 @@ fourcc AVmp fourcc mp2v,mpgv fourcc m2v1,m1v1 + fourcc "m1v " fourcc LMP2 ; Lead mpeg2 in avi driver ffmpeg dll "mpegvideo_xvmc" @@ -373,6 +461,7 @@ fourcc mp2v,mpgv fourcc LMP2 ; Lead mpeg2 in avi fourcc m2v1,m1v1 + fourcc "m1v " driver ffmpeg dll "mpegvideo_vdpau" out VDPAU_MPEG1 @@ -391,6 +480,7 @@ fourcc hdv1,hdv2,hdv3 fourcc hdv4,hdv5,hdv6 fourcc hdv7,hdv8,hdv9 + fourcc hdva,xdhd,xdh2 fourcc xdv1,xdv2,xdv3 fourcc xdv4,xdv5,xdv6 fourcc xdv7,xdv8,xdv9 @@ -423,6 +513,7 @@ fourcc hdv1,hdv2,hdv3 fourcc hdv4,hdv5,hdv6 fourcc hdv7,hdv8,hdv9 + fourcc hdva,xdhd,xdh2 fourcc xdv1,xdv2,xdv3 fourcc xdv4,xdv5,xdv6 fourcc xdv7,xdv8,xdv9 @@ -436,6 +527,7 @@ fourcc AVmp fourcc mp2v,mpgv fourcc m2v1,m1v1 + fourcc "m1v " fourcc PIM1 ; Pinnacle hardware-MPEG-1 fourcc PIM2 ; Pinnacle hardware-MPEG-2 fourcc LMP2 ; Lead mpeg2 in avi @@ -447,7 +539,9 @@ videocodec ffnuv info "NuppelVideo" status working - fourcc NUV1 ; NUV1 is an internal MPlayer FOURCC + fourcc NUV1 ; internal MPlayer FOURCC + ; note that RJPG is _not_ equivalent, + ; these are slightly different formats fourcc RJPG driver ffmpeg dll nuv @@ -929,6 +1023,14 @@ dll flashsv out BGR24 +videocodec fffsv2 + info "FFmpeg Flash Screen 2 video" + status untested + fourcc FSV2 + driver ffmpeg + dll flashsv2 + out BGR24 + videocodec ffdivx info "FFmpeg DivX ;-) (MSMPEG-4 v3)" status working @@ -940,8 +1042,8 @@ fourcc DIVF,divf ; divx4.12 fourcc AP41 div3 ; AngelPotion stuff fourcc COL1,col1,COL0,col0 ; Cool codec (based on mpg4ds32.ax) - fourcc 3IVD,3ivd ; divxdoctored files (3ivx.com) - fourcc DVX3 + fourcc 3IVD,3ivd,3VID,3vid ; divxdoctored files (3ivx.com) + fourcc DVX3,DVX1 driver ffmpeg dll msmpeg4 out YV12,I420,IYUV @@ -1006,13 +1108,20 @@ dll wmv3 out YV12,I420,IYUV +videocodec ffwvp2 + info "FFmpeg WVP2" + status working + fourcc WVP2 + driver ffmpeg + dll vc1image + out YV12,I420,IYUV + videocodec ffwmvp info "FFmpeg WVC1" - comment "requires demuxer lavf" - status buggy + status working fourcc wmvp,WMVP driver ffmpeg - dll wmv3 + dll wmv3image out YV12,I420,IYUV videocodec ffwmv3vdpau @@ -1066,13 +1175,19 @@ fourcc avc1,AVC1 fourcc davc,DAVC fourcc vvvc ; only one sample using this fourcc - fourcc ai55,ai15 ; flip4mac avc intra - fourcc ai1q,ai5q ; flip4mac avc intra - fourcc ai12 ;AVC Intra 100 / 1080 + fourcc ai1p,ai1q,ai12,ai13 + fourcc ai15,ai16 + fourcc ai5p,ai5q,ai52,ai53 + fourcc ai55,ai56 + fourcc x3eV + fourcc Q264 format 0x10000005 driver ffmpeg dll h264 out YV12,I420,IYUV,420P10,420P9 + out 422P,422P10 + out 444P,444P9,444P10 + out GBR24P videocodec ffh264vdpau info "FFmpeg H.264 (VDPAU)" @@ -1081,8 +1196,12 @@ fourcc X264,x264 fourcc avc1,AVC1 fourcc davc,DAVC - fourcc ai55,ai15 ; flip4mac avc intra - fourcc ai1q,ai5q ; flip4mac avc intra + fourcc ai1p,ai1q,ai12,ai13 + fourcc ai15,ai16 + fourcc ai5p,ai5q,ai52,ai53 + fourcc ai55,ai56 + fourcc x3eV + fourcc Q264 format 0x10000005 driver ffmpeg dll h264_vdpau @@ -1096,8 +1215,11 @@ fourcc avc1,AVC1 fourcc davc,DAVC fourcc vvvc ; only one sample using this fourcc - fourcc ai55,ai15 ; flip4mac avc intra - fourcc ai1q,ai5q ; flip4mac avc intra + fourcc ai1p,ai1q,ai12,ai13 + fourcc ai15,ai16 + fourcc ai5p,ai5q,ai52,ai53 + fourcc ai55,ai56 + fourcc x3eV format 0x10000005 driver ffmpeg dll h264_crystalhd @@ -1112,8 +1234,11 @@ fourcc avc1 AVC1,AVC1 fourcc davc,DAVC fourcc VSSH - fourcc ai55,ai15 ; flip4mac avc intra - fourcc ai1q,ai5q ; flip4mac avc intra + fourcc ai1p,ai1q,ai12,ai13 + fourcc ai15,ai16 + fourcc ai5p,ai5q,ai52,ai53 + fourcc ai55,ai56 + fourcc x3eV format 0x10000005 driver dshow dll "CoreAVCDecoder.ax" @@ -1158,6 +1283,8 @@ fourcc EPHV,SN40,WAWV fourcc uldx,ULDX,VSPX fourcc SIPP ; Samsung SHR-6040 + fourcc DreX,DM4V,LMP4,DP02 + fourcc QMP4 driver ffmpeg dll mpeg4 ;opendivx out YV12,I420,IYUV @@ -1191,6 +1318,8 @@ fourcc EPHV,SN40,WAWV fourcc uldx,ULDX,VSPX fourcc SIPP ; Samsung SHR-6040 + fourcc DreX,DM4V,LMP4,DP02 + fourcc QMP4 driver ffmpeg dll mpeg4_vdpau out VDPAU_MPEG4 @@ -1236,6 +1365,14 @@ dll mpeg4 out YV12,I420,IYUV flip +videocodec ffdirac + info "FFmpeg Dirac" + status working + fourcc drac + driver ffmpeg + dll dirac + out 422P,YV12,444P + videocodec fflibschroedinger info "Dirac (through FFmpeg libschroedinger)" status working @@ -1278,6 +1415,8 @@ fourcc uldx,ULDX,VSPX format 0x10000004 ; mpeg 4 es fourcc SIPP ; Samsung SHR-6040 + fourcc DreX,DM4V,LMP4,DP02 + fourcc QMP4 driver xvid out YV12 out I420 @@ -1472,7 +1611,7 @@ videocodec gotomeeting info "GoToMeeting codec" status working - fourcc G2M2,G2M3 + fourcc G2M2,G2M3,G2M4 driver dmo dll "G2M.dll" guid 0x23F891A4, 0x572B, 0x474A, 0x86, 0xDA, 0x66, 0xCD, 0xD3, 0xD1, 0xAC, 0x2E @@ -1512,7 +1651,7 @@ videocodec ffmjpeg info "FFmpeg MJPEG" status working - fourcc MJPG,mjpg + fourcc MJPG,mjpg,mJPG fourcc AVRn,AVDJ ; AVID fourcc ADJV ; Avid Motion JPEG fourcc jpeg ; MOV Photo-JPEG @@ -1521,7 +1660,7 @@ fourcc ijpg,IJPG ; -mf type=jpeg fourcc JPEG ; SGI's AVI Photo-JPEG fourcc JPGL ; lossless JPEG (pegasus codec) - fourcc LJPG ; lossless JPEG + fourcc LJPG,Ljpg ; lossless JPEG fourcc dmb1 ; MJPEG by Matrox Rainbow Runner fourcc MJLS ; JPEG-LS custom FOURCC for avi - encoder fourcc MMJP,QIVG @@ -1529,8 +1668,10 @@ fourcc SLMJ ; SL M-JPEG fourcc MVJP ; Midvid JPEG Video Codec fourcc IJLV ; Intel JPEG Library Video Codec + fourcc CJPG ; Creative MJPG fourcc avi1,avi2 - fourcc MTSJ,ZJPG + fourcc MTSJ,ZJPG,MJPx,FLJP + fourcc FMJP,SJPG driver ffmpeg dll mjpeg out 444P @@ -1538,7 +1679,7 @@ out 440P out YUY2 ; queried (conversion from yuv422p) out YV12,I420,IYUV - out BGR32 ; lossless JPEG + out BGR24 ; lossless JPEG out RGB24 ; JPEG-LS out Y800 @@ -1638,6 +1779,20 @@ driver ffmpeg dll "libopenjpeg" out RGB24,RGB32,BGR32,Y8,Y800 + out 420P16,420P10,420P9 + out 422P16,422P10,422P9 + out 444P16,444P10,444P9 + +videocodec ffj2k + info "FFmpeg JPEG 2000" + status working + fourcc MJ2C + fourcc MJP2 + fourcc mjp2 + fourcc LJ2K,LJ2C + driver ffmpeg + dll "j2k" + out RGB24,Y800 videocodec m3jpeg2k info "Morgan MJPEG2000" @@ -1695,7 +1850,7 @@ status working fourcc FRWU driver ffmpeg - dll "FRWU" + dll frwu out UYVY videocodec frwuvfw @@ -1775,7 +1930,7 @@ fourcc viv1 h263 fourcc s263,S263 fourcc T263 - fourcc D263 ; DEC H263 + fourcc D263,d263 ; DEC H263 fourcc L263 ; Lead H263 fourcc ILVR ; ITU H263+ fourcc VX1K ; Agora Labs VX1000S H263 @@ -1905,6 +2060,14 @@ dll "vid_iv32.xa" out YVU9 +videocodec ffindeo4 + info "FFmpeg Indeo 4" + status working + fourcc IV41 + driver ffmpeg + dll indeo4 + out YVU9 + videocodec ffindeo5 info "FFmpeg Indeo 5" status working @@ -1918,7 +2081,7 @@ videocodec ffdv info "FFmpeg DV" status working - fourcc CDVC,cdvc + fourcc CDVC,cdvc,CDV2,CDVP fourcc CDVH,cdvh ; Canopus DVCPRO HD fourcc CDV5 ; Canopus SD50 fourcc DVSD,dvsd ; PAL @@ -1926,6 +2089,7 @@ fourcc "dvcp" ; PAL DV in .mov fourcc "dvc " ; NTSC DV in .mov fourcc "dvp " + fourcc "dv " fourcc dvpp ; DVCPRO - PAL fourcc dv50 ; DVCPRO 50 fourcc dv5n ; DVCPRO 50 NTSC in .mov @@ -1933,8 +2097,9 @@ fourcc AVdv,AVd1 fourcc dvhq,dvhp fourcc dvh5,dvh6,dvh3 - fourcc dvhd,dvsl,dv25 - fourcc dvs1,dvh1 + fourcc dvhd,dvsl,dv25,dc25 + fourcc dvs1,dvh1,dvis,PDVC + fourcc IPDV,ipdv driver ffmpeg dll dvvideo out 411P,422P,YV12 @@ -2195,6 +2360,45 @@ dll "lagarith.dll" out BGR32,BGR24 flip +videocodec ffutvideo + info "FFmpeg Ut Video" + status working + fourcc ULRA,ULRG,ULY2,ULY0 + driver ffmpeg + dll utvideo + out YV12,422P,RGB24,RGB32 + +videocodec utvideovfw + info "UTVideo Codec" + comment "http://umezawa.dyndns.info/wordpress/" + status working + fourcc ULRA,ULRG,ULY2,ULY0 + driver vfw + dll "utv_vcm.dll" ; requires utv_core.dll + out BGR32,BGR24 flip + out RGB32,RGB24 flip + out YV12,UYVY,YUY2 flip + +videocodec utvideodmo + info "UTVideo Codec" + comment "http://umezawa.dyndns.info/wordpress/" + status buggy ; input format not accepted + fourcc ULRA,ULRG,ULY2,ULY0 + driver dmo + dll "utv_dmo.dll" ; requires utv_core.dll + guid 0x30594c55, 0xe991, 0x460d, 0x84, 0x0b, 0xc1, 0xc6, 0x49, 0x74, 0x57, 0xef + out YV12,UYVY,YUY2 + out RGB32,RGB24 + out BGR32,BGR24 + +videocodec ffvble + info "FFmpeg VBLE lossless codec" + status working + fourcc VBLE + driver ffmpeg + dll vble + out YV12 + videocodec psiv info "Infinite Video PSI_V" status working @@ -2600,6 +2804,14 @@ dll "amv" out YV12 +videocodec ffmxpeg + info "FFmpeg MxPEG" + status working + fourcc MXPG ; internal MPlayer FourCC + driver ffmpeg + dll mxpeg + out YV12 + videocodec ffsp5x info "SP5x codec - used by Aiptek MegaCam" status working @@ -2649,6 +2861,15 @@ dll "bw10.dll" ;requires vtaccess.dll out YV12,YUY2,I420 +videocodec csmscreen + info "csmscreen AVI lossless video codec" + comment "requires Esdll.dll" + status working + fourcc CSM0 + driver vfw + dll "csmx.dll" ; b6cfb690fe5997da0f07506c8982334f *CSMX.dll + out BGR32,BGR24,BGR16 flip + videocodec matchware info "matchware screen capture codec" status working @@ -3044,6 +3265,30 @@ dll "AppleProResDecoder.qtx" out YUY2 +videocodec ffprores + info "FFmpeg Apple ProRes" + status working + fourcc apch + fourcc apcn + fourcc apcs + fourcc apco + fourcc ap4h + driver ffmpeg + dll prores + out 422P10,444P10 + +videocodec ffproreslgpl + info "Libav ProRes" + status working + fourcc apch + fourcc apcn + fourcc apcs + fourcc apco + fourcc ap4h + driver ffmpeg + dll prores_lgpl + out 422P10,444P10 + ; VSS codecs (http://vsofts.com/solutions.html): videocodec vsslight @@ -3143,6 +3388,15 @@ dll "qpeg32.dll" out BGR8 flip +videocodec ffqpeg + info "FFmpeg Q-team QPEG" + status working + fourcc Q1.0,QPEG + fourcc Q1.1,qpeq + driver ffmpeg + dll "qpeg" + out BGR8 + videocodec rricm info "rricm" status crashing @@ -3195,6 +3449,14 @@ dll "fraps" out BGR24,YV12,I420 +videocodec ffxtor + info "FFmpeg Dxtory" + status working + fourcc xtor + driver ffmpeg + dll dxtory + out YV12 + videocodec ffjv info "FFmpeg Bitmap Brothers JV" status working @@ -3276,6 +3538,14 @@ dll txd out BGR32 +videocodec fftmv + info "FFmpeg 8088flex TMV" + status working + fourcc tmv8 ; internal MPlayer FourCC + driver ffmpeg + dll tmv + out BGR8 + videocodec xan info "XAN Video" status working @@ -3324,6 +3594,14 @@ dll "vqavideo" out BGR8 +videocodec ffbmvvideo + info "FFmpeg Discoworld II BMV Video" + status working + fourcc BMVV ; internal MPlayer FourCC + driver ffmpeg + dll bmv_video + out BGR8 + videocodec ffc93 info "FFmpeg C93 Video" status buggy @@ -3332,14 +3610,38 @@ dll c93 out BGR8 +videocodec ffdfa + info "FFmpeg Chronomaster DFA" + status working + fourcc CDFA ; internal MPlayer FourCC + driver ffmpeg + dll dfa + out BGR8 + videocodec ffeatgv info "FFmpeg Electronic Arts TGV" status working - fourcc fVGT + fourcc fVGT ; internal MPlayer FourCC driver ffmpeg dll eatgv out BGR8 +videocodec ffescape124 + info "FFmpeg Escape 124" + status buggy + fourcc E124 ; internal MPlayer FourCC + driver ffmpeg + dll escape124 + out BGR15 + +videocodec ffescape130 + info "FFmpeg Escape 130" + status working + fourcc E130 ; internal MPlayer FourCC + driver ffmpeg + dll escape130 + out YV12 + ; raw formats: (now RGB formats are autodetected) ; these raw codecs are used mostly by TV input @@ -3500,6 +3802,7 @@ fourcc uyv1 UYVY fourcc 2Vu1 UYVY fourcc VDTZ UYVY + fourcc auv2 UYVY out UYVY videocodec raw444P @@ -3509,6 +3812,7 @@ format 0x0 0x50343434 format 0x20776172 0x50343434 fourcc 444p,444P + fourcc YV24 444P out 444P videocodec raw422P @@ -3520,6 +3824,7 @@ fourcc 422p,422P fourcc P422 422P fourcc Y42B 422P + fourcc YV16 422P out 422P videocodec rawyv12 @@ -3588,6 +3893,16 @@ ;lavc raw codecs +videocodec ffrawnv12 + info "RAW NV12" + status buggy + format 0x0 + format 0x20776172 + fourcc nv12,NV12 + driver ffmpeg + dll rawvideo + out NV12 + videocodec ffrawyuy2 info "RAW YUY2" status working @@ -3625,8 +3940,9 @@ fourcc uyv1,UYV1 fourcc 2Vu1,2vu1,2VU1 fourcc 2Vuy,2vuy,2VUY - fourcc AV1x,AVup - fourcc VDTZ + fourcc AV1x,AVup,AVUI + fourcc VDTZ,auv2 + fourcc cyuv driver ffmpeg dll rawvideo out UYVY @@ -3637,6 +3953,7 @@ format 0x0 format 0x20776172 fourcc 444p,444P + fourcc YV24 driver ffmpeg dll rawvideo out 444P @@ -3649,6 +3966,7 @@ fourcc 422p,422P fourcc P422,p422 fourcc Y42B,y42b + fourcc YV16,yv16 driver ffmpeg dll rawvideo out 422P @@ -3684,6 +4002,14 @@ dll rawvideo out YVU9 +videocodec ffrawy41b + info "RAW Y41B" + status working + fourcc Y41B + driver ffmpeg + dll rawvideo + out 411P + videocodec ffrawy800 info "RAW Y8/Y800" status working @@ -4001,6 +4327,13 @@ driver ffmpeg dll adpcm_ima_amv +audiocodec ffadpcmimasmjpeg + info "FFmpeg SMJPEG IMA ADPCM audio" + status working + fourcc APCM + driver ffmpeg + dll adpcm_ima_smjpeg + audiocodec ffadpcmimaqt info "FFmpeg QT IMA ADPCM audio" status working @@ -4063,6 +4396,27 @@ driver ffmpeg dll adpcm_ima_dk3 +audiocodec ffadpcmimaiss + info "FFmpeg Funcom IMA ISS ADPCM" + status working + fourcc AISS ; internal MPlayer FourCC + driver ffmpeg + dll adpcm_ima_iss + +audiocodec ffadpcmimaeasead + info "FFmpeg ADPCM IMA Electronic Arts SEAD" + status working + fourcc SEAD ; internal MPlayer FourCC + driver ffmpeg + dll adpcm_ima_ea_sead + +audiocodec ffadpcmimaeaeacs + info "FFmpeg ADPCM IMA Electronic Arts EACS" + status working + fourcc EACS ; internal MPlayer FourCC + driver ffmpeg + dll adpcm_ima_ea_eacs + audiocodec dk3adpcm info "Duck DK3 ADPCM (rogue format number)" status working @@ -4098,6 +4452,13 @@ driver ffmpeg dll "binkaudio_rdft" +audiocodec ffbmvaudio + info "FFmpeg Discoworld II BMV Audio" + status working + fourcc BMVA ; internal MPlayer FourCC + driver ffmpeg + dll bmv_audio + audiocodec ffdsicinaudio info "FFmpeg Delphine CIN audio" status working @@ -4199,6 +4560,7 @@ info "FFmpeg AAC in LATM" status working fourcc MP4L ; internal MPlayer FourCC + format 0x1602 driver ffmpeg dll aac_latm @@ -4211,6 +4573,7 @@ fourcc "AACP" ; Used in NSV for AACPlus fourcc raac,racp format 0xff + format 0x1600 format 0x706D format 0x4143 ; aac in asf format 0xA106 ; aac in avi not yet working @@ -4290,7 +4653,8 @@ audiocodec ffnellymoser info "FFmpeg Nellymoser Audio" status working - fourcc "NELL" ; internal MPlayer FourCC + fourcc "NELL" ; former internal MPlayer FourCC + fourcc nmos driver ffmpeg dll "nellymoser" @@ -4369,6 +4733,13 @@ driver ffmpeg dll "pcm_s24daud" +audiocodec ffpcms16leplanar + info "FFmpeg PCM 16-bit little-endian planar" + status working + fourcc 16PL ; internal MPlayer FourCC + driver ffmpeg + dll pcm_s16le_planar + audiocodec ffwmav1 info "DivX audio v1 (FFmpeg)" status untested @@ -4470,7 +4841,7 @@ ; in libmpdemux/demuxer.c audiocodec ffmp3float info "FFmpeg MPEG layer-3 audio" - comment "integer only" + comment "floating point decoder" status working format 0x55 format 0x5500736d ; "ms\0\x55" older mp3 fcc (MOV files) @@ -4514,7 +4885,7 @@ ; in libmpdemux/demuxer.c audiocodec ffmp2float info "FFmpeg MPEG layer-1 and layer-2 audio" - comment "integer only" + comment "floating point decoder" status working format 0x50 format 0x5000736d ; "ms\0\x50" older mp2 fcc (MOV files) @@ -4672,6 +5043,7 @@ info "FFmpeg E-AC-3" status working fourcc EAC3 + fourcc ec-3 ; eac3 in mp4 driver ffmpeg dll eac3 @@ -4692,6 +5064,10 @@ audiocodec ffdca info "FFmpeg DTS" status working + fourcc "dts " + fourcc "DTS " + fourcc dtsb ;from vlc + fourcc dtsc ;from ffmpeg format 0x2001 format 0x86 driver ffmpeg @@ -4733,14 +5109,24 @@ status working fourcc samr format 0x57 ;amr in avi + format 0x38 ; amrnb in avi one sample driver ffmpeg dll "amrnb" +audiocodec ffamrwb + info "AMR Wideband" + status working + fourcc sawb + format 0x58 ;amrwb in avi + driver ffmpeg + dll "amrwb" + audiocodec libopencoreamrnb info "AMR Narrowband" status working fourcc samr format 0x57 ;amr in avi + format 0x38 ; amrnb in avi one sample driver ffmpeg dll "libopencore_amrnb" @@ -4842,6 +5228,13 @@ format 0x2001 driver hwac3 +audiocodec ffvmdaudio + info "FFmpeg Sierra VMD audio" + status working + fourcc VMDA ; intermal MPlayer FourCC + driver ffmpeg + dll "vmdaudio" + audiocodec ffvorbis info "FFmpeg Vorbis" status working @@ -4886,6 +5279,7 @@ status working comment "Speex driver using libspeex" fourcc 'spx ' + fourcc spex format 0xA109 driver speex dll "speex" @@ -4914,6 +5308,13 @@ driver ffmpeg dll "g722" +audiocodec ffg7231 + info "G.723.1 Audio" + status working + fourcc 7231 ; internal MPlayer FourCC + driver ffmpeg + dll "g723_1" + audiocodec ffg726 info "Sharp G.726 Audio" status working @@ -4928,6 +5329,13 @@ driver acm dll "scg726.acm" +audiocodec ffg729 + info "FFmpeg G.729" + status working + fourcc G729 ; internal MPlayer FourCC + driver ffmpeg + dll "g729" + audiocodec atrac3 info "Sony ATRAC3" status buggy @@ -5024,6 +5432,27 @@ driver vqf dll "tvqdec.dll" +audiocodec ff8svxraw + info "FFmpeg 8SVX raw" + status working + fourcc 8raw ; internal MPlayer FourCC + driver ffmpeg + dll 8svx_raw + +audiocodec ff8svxexp + info "FFmpeg 8SVX exponential" + status working + fourcc 8exp ; internal MPlayer FourCC + driver ffmpeg + dll 8svx_exp + +audiocodec ff8svxfib + info "FFmpeg 8SVX fibonacci" + status working + fourcc 8fib ; internal MPlayer FourCC + driver ffmpeg + dll 8svx_fib + audiocodec hwmpa info "MPEG audio pass-through for hardware MPEG decoders" status working @@ -5050,3 +5479,70 @@ format 0x216 driver acm dll "dvacm.acm" + +audiocodec spdifaac + info "libavformat/spdifenc AAC pass-through decoder" + status working + comment "for AAC hardware decoders" + fourcc MP4A + dll aac + driver spdif + +audiocodec spdifac3 + info "libavformat/spdifenc AC-3 pass-through decoder" + status working + comment "for AC-3 hardware decoders" + format 0x2000 ; AC-3 + format 0x332D6361 ; AC-3 in MP4 + fourcc dnet ; AC-3 + dll ac3 + driver spdif + +audiocodec spdifeac3 + info "libavformat/spdifenc E-AC-3 pass-through decoder" + status working + comment "for E-AC-3 hardware decoders" + fourcc EAC3 ; E-AC-3 + dll eac3 + driver spdif + +audiocodec spdifdts + info "libavformat/spdifenc DTS pass-through decoder" + status working + comment "needs -channels 8" + format 0x2001 + format 0x86 + dll dca + driver spdif + +audiocodec spdifmpa + info "libavformat/spdifenc MPEG AUDIO BC pass-through decoder" + status working + comment "for MPEG AUDIO BC hardware decoders" + format 0x50 ; layer-1 && layer-2 + format 0x55 ; layer-3 + format 0x5500736d ; "ms\0\x55" older MP3 fcc (MOV files) + format 0x5000736d ; "ms\0\x50" older MP2 fcc (MOV files) + fourcc ".mp3" ; CBR/VBR MP3 (MOV files) + fourcc ".mp2" ; MP2 (MOV files) + fourcc ".mp1" ; MP1 (MOV files) + fourcc "MP3 " ; used in .nsv files + fourcc "LAME" ; used in mythtv .nuv files + dll mpa + driver spdif + +audiocodec spdifthd + info "libavformat/spdifenc Dolby TrueHD pass-through decoder" + status working + comment "needs -channels 8" + fourcc TRHD ; internal MPlayer FourCC + dll thd + driver spdif + +audiocodec ffwavesynth + info "FFmpeg wave synthesizer" + status working + fourcc "FFWS" ; internal MPlayer FourCC + driver ffmpeg + dll "wavesynth" + diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/avconv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/avconv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/avconv.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/avconv.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4514 @@ +/* + * avconv main + * Copyright (c) 2000-2011 The libav developers. + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "libavformat/avformat.h" +#include "libavdevice/avdevice.h" +#include "libswscale/swscale.h" +#include "libavutil/opt.h" +#include "libavcodec/audioconvert.h" +#include "libavutil/audioconvert.h" +#include "libavutil/parseutils.h" +#include "libavutil/samplefmt.h" +#include "libavutil/colorspace.h" +#include "libavutil/fifo.h" +#include "libavutil/intreadwrite.h" +#include "libavutil/dict.h" +#include "libavutil/mathematics.h" +#include "libavutil/pixdesc.h" +#include "libavutil/avstring.h" +#include "libavutil/libm.h" +#include "libavutil/imgutils.h" +#include "libavformat/os_support.h" + +#if CONFIG_AVFILTER +# include "libavfilter/avfilter.h" +# include "libavfilter/avfiltergraph.h" +# include "libavfilter/buffersrc.h" +# include "libavfilter/vsrc_buffer.h" +#endif + +#if HAVE_SYS_RESOURCE_H +#include +#include +#include +#elif HAVE_GETPROCESSTIMES +#include +#endif +#if HAVE_GETPROCESSMEMORYINFO +#include +#include +#endif + +#if HAVE_SYS_SELECT_H +#include +#endif + +#include + +#include "cmdutils.h" + +#include "libavutil/avassert.h" + +#define VSYNC_AUTO -1 +#define VSYNC_PASSTHROUGH 0 +#define VSYNC_CFR 1 +#define VSYNC_VFR 2 + +const char program_name[] = "avconv"; +const int program_birth_year = 2000; + +/* select an input stream for an output stream */ +typedef struct StreamMap { + int disabled; /** 1 is this mapping is disabled by a negative map */ + int file_index; + int stream_index; + int sync_file_index; + int sync_stream_index; +} StreamMap; + +/** + * select an input file for an output file + */ +typedef struct MetadataMap { + int file; ///< file index + char type; ///< type of metadata to copy -- (g)lobal, (s)tream, (c)hapter or (p)rogram + int index; ///< stream/chapter/program number +} MetadataMap; + +static const OptionDef options[]; + +static int video_discard = 0; +static int same_quant = 0; +static int do_deinterlace = 0; +static int intra_dc_precision = 8; +static int qp_hist = 0; + +static int file_overwrite = 0; +static int do_benchmark = 0; +static int do_hex_dump = 0; +static int do_pkt_dump = 0; +static int do_pass = 0; +static char *pass_logfilename_prefix = NULL; +static int video_sync_method = VSYNC_AUTO; +static int audio_sync_method = 0; +static float audio_drift_threshold = 0.1; +static int copy_ts = 0; +static int copy_tb = 1; +static int opt_shortest = 0; +static char *vstats_filename; +static FILE *vstats_file; + +static int audio_volume = 256; + +static int exit_on_error = 0; +static int using_stdin = 0; +static int64_t video_size = 0; +static int64_t audio_size = 0; +static int64_t extra_size = 0; +static int nb_frames_dup = 0; +static int nb_frames_drop = 0; +static int input_sync; + +static float dts_delta_threshold = 10; + +static int print_stats = 1; + +static uint8_t *audio_buf; +static uint8_t *audio_out; +static unsigned int allocated_audio_out_size, allocated_audio_buf_size; + +#define DEFAULT_PASS_LOGFILENAME_PREFIX "av2pass" + +typedef struct FrameBuffer { + uint8_t *base[4]; + uint8_t *data[4]; + int linesize[4]; + + int h, w; + enum PixelFormat pix_fmt; + + int refcount; + struct InputStream *ist; + struct FrameBuffer *next; +} FrameBuffer; + +typedef struct InputStream { + int file_index; + AVStream *st; + int discard; /* true if stream data should be discarded */ + int decoding_needed; /* true if the packets must be decoded in 'raw_fifo' */ + AVCodec *dec; + AVFrame *decoded_frame; + AVFrame *filtered_frame; + + int64_t start; /* time when read started */ + int64_t next_pts; /* synthetic pts for cases where pkt.pts + is not defined */ + int64_t pts; /* current pts */ + PtsCorrectionContext pts_ctx; + double ts_scale; + int is_start; /* is 1 at the start and after a discontinuity */ + int showed_multi_packet_warning; + AVDictionary *opts; + + /* a pool of free buffers for decoded data */ + FrameBuffer *buffer_pool; +} InputStream; + +typedef struct InputFile { + AVFormatContext *ctx; + int eof_reached; /* true if eof reached */ + int ist_index; /* index of first stream in ist_table */ + int buffer_size; /* current total buffer size */ + int64_t ts_offset; + int nb_streams; /* number of stream that avconv is aware of; may be different + from ctx.nb_streams if new streams appear during av_read_frame() */ + int rate_emu; +} InputFile; + +typedef struct OutputStream { + int file_index; /* file index */ + int index; /* stream index in the output file */ + int source_index; /* InputStream index */ + AVStream *st; /* stream in the output file */ + int encoding_needed; /* true if encoding needed for this stream */ + int frame_number; + /* input pts and corresponding output pts + for A/V sync */ + // double sync_ipts; /* dts from the AVPacket of the demuxer in second units */ + struct InputStream *sync_ist; /* input stream to sync against */ + int64_t sync_opts; /* output frame counter, could be changed to some true timestamp */ // FIXME look at frame_number + AVBitStreamFilterContext *bitstream_filters; + AVCodec *enc; + int64_t max_frames; + + /* video only */ + int video_resample; + AVFrame pict_tmp; /* temporary image for resampling */ + struct SwsContext *img_resample_ctx; /* for image resampling */ + int resample_height; + int resample_width; + int resample_pix_fmt; + AVRational frame_rate; + int force_fps; + int top_field_first; + + float frame_aspect_ratio; + + /* forced key frames */ + int64_t *forced_kf_pts; + int forced_kf_count; + int forced_kf_index; + + /* audio only */ + int audio_resample; + ReSampleContext *resample; /* for audio resampling */ + int resample_sample_fmt; + int resample_channels; + int resample_sample_rate; + int reformat_pair; + AVAudioConvert *reformat_ctx; + AVFifoBuffer *fifo; /* for compression: one audio fifo per codec */ + FILE *logfile; + +#if CONFIG_AVFILTER + AVFilterContext *output_video_filter; + AVFilterContext *input_video_filter; + AVFilterBufferRef *picref; + char *avfilter; + AVFilterGraph *graph; +#endif + + int64_t sws_flags; + AVDictionary *opts; + int is_past_recording_time; + int stream_copy; + const char *attachment_filename; + int copy_initial_nonkeyframes; +} OutputStream; + + +typedef struct OutputFile { + AVFormatContext *ctx; + AVDictionary *opts; + int ost_index; /* index of the first stream in output_streams */ + int64_t recording_time; /* desired length of the resulting file in microseconds */ + int64_t start_time; /* start time in microseconds */ + uint64_t limit_filesize; +} OutputFile; + +static InputStream *input_streams = NULL; +static int nb_input_streams = 0; +static InputFile *input_files = NULL; +static int nb_input_files = 0; + +static OutputStream *output_streams = NULL; +static int nb_output_streams = 0; +static OutputFile *output_files = NULL; +static int nb_output_files = 0; + +typedef struct OptionsContext { + /* input/output options */ + int64_t start_time; + const char *format; + + SpecifierOpt *codec_names; + int nb_codec_names; + SpecifierOpt *audio_channels; + int nb_audio_channels; + SpecifierOpt *audio_sample_rate; + int nb_audio_sample_rate; + SpecifierOpt *frame_rates; + int nb_frame_rates; + SpecifierOpt *frame_sizes; + int nb_frame_sizes; + SpecifierOpt *frame_pix_fmts; + int nb_frame_pix_fmts; + + /* input options */ + int64_t input_ts_offset; + int rate_emu; + + SpecifierOpt *ts_scale; + int nb_ts_scale; + SpecifierOpt *dump_attachment; + int nb_dump_attachment; + + /* output options */ + StreamMap *stream_maps; + int nb_stream_maps; + /* first item specifies output metadata, second is input */ + MetadataMap (*meta_data_maps)[2]; + int nb_meta_data_maps; + int metadata_global_manual; + int metadata_streams_manual; + int metadata_chapters_manual; + const char **attachments; + int nb_attachments; + + int chapters_input_file; + + int64_t recording_time; + uint64_t limit_filesize; + float mux_preload; + float mux_max_delay; + + int video_disable; + int audio_disable; + int subtitle_disable; + int data_disable; + + /* indexed by output file stream index */ + int *streamid_map; + int nb_streamid_map; + + SpecifierOpt *metadata; + int nb_metadata; + SpecifierOpt *max_frames; + int nb_max_frames; + SpecifierOpt *bitstream_filters; + int nb_bitstream_filters; + SpecifierOpt *codec_tags; + int nb_codec_tags; + SpecifierOpt *sample_fmts; + int nb_sample_fmts; + SpecifierOpt *qscale; + int nb_qscale; + SpecifierOpt *forced_key_frames; + int nb_forced_key_frames; + SpecifierOpt *force_fps; + int nb_force_fps; + SpecifierOpt *frame_aspect_ratios; + int nb_frame_aspect_ratios; + SpecifierOpt *rc_overrides; + int nb_rc_overrides; + SpecifierOpt *intra_matrices; + int nb_intra_matrices; + SpecifierOpt *inter_matrices; + int nb_inter_matrices; + SpecifierOpt *top_field_first; + int nb_top_field_first; + SpecifierOpt *metadata_map; + int nb_metadata_map; + SpecifierOpt *presets; + int nb_presets; + SpecifierOpt *copy_initial_nonkeyframes; + int nb_copy_initial_nonkeyframes; +#if CONFIG_AVFILTER + SpecifierOpt *filters; + int nb_filters; +#endif +} OptionsContext; + +#define MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st)\ +{\ + int i, ret;\ + for (i = 0; i < o->nb_ ## name; i++) {\ + char *spec = o->name[i].specifier;\ + if ((ret = check_stream_specifier(fmtctx, st, spec)) > 0)\ + outvar = o->name[i].u.type;\ + else if (ret < 0)\ + exit_program(1);\ + }\ +} + +static void reset_options(OptionsContext *o) +{ + const OptionDef *po = options; + + /* all OPT_SPEC and OPT_STRING can be freed in generic way */ + while (po->name) { + void *dst = (uint8_t*)o + po->u.off; + + if (po->flags & OPT_SPEC) { + SpecifierOpt **so = dst; + int i, *count = (int*)(so + 1); + for (i = 0; i < *count; i++) { + av_freep(&(*so)[i].specifier); + if (po->flags & OPT_STRING) + av_freep(&(*so)[i].u.str); + } + av_freep(so); + *count = 0; + } else if (po->flags & OPT_OFFSET && po->flags & OPT_STRING) + av_freep(dst); + po++; + } + + av_freep(&o->stream_maps); + av_freep(&o->meta_data_maps); + av_freep(&o->streamid_map); + + memset(o, 0, sizeof(*o)); + + o->mux_max_delay = 0.7; + o->recording_time = INT64_MAX; + o->limit_filesize = UINT64_MAX; + o->chapters_input_file = INT_MAX; + + uninit_opts(); + init_opts(); +} + +static int alloc_buffer(InputStream *ist, FrameBuffer **pbuf) +{ + AVCodecContext *s = ist->st->codec; + FrameBuffer *buf = av_mallocz(sizeof(*buf)); + int ret; + const int pixel_size = av_pix_fmt_descriptors[s->pix_fmt].comp[0].step_minus1+1; + int h_chroma_shift, v_chroma_shift; + int edge = 32; // XXX should be avcodec_get_edge_width(), but that fails on svq1 + int w = s->width, h = s->height; + + if (!buf) + return AVERROR(ENOMEM); + + if (!(s->flags & CODEC_FLAG_EMU_EDGE)) { + w += 2*edge; + h += 2*edge; + } + + avcodec_align_dimensions(s, &w, &h); + if ((ret = av_image_alloc(buf->base, buf->linesize, w, h, + s->pix_fmt, 32)) < 0) { + av_freep(&buf); + return ret; + } + /* XXX this shouldn't be needed, but some tests break without this line + * those decoders are buggy and need to be fixed. + * the following tests fail: + * bethsoft-vid, cdgraphics, ansi, aasc, fraps-v1, qtrle-1bit + */ + memset(buf->base[0], 128, ret); + + avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift); + for (int i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) { + const int h_shift = i==0 ? 0 : h_chroma_shift; + const int v_shift = i==0 ? 0 : v_chroma_shift; + if (s->flags & CODEC_FLAG_EMU_EDGE) + buf->data[i] = buf->base[i]; + else + buf->data[i] = buf->base[i] + + FFALIGN((buf->linesize[i]*edge >> v_shift) + + (pixel_size*edge >> h_shift), 32); + } + buf->w = s->width; + buf->h = s->height; + buf->pix_fmt = s->pix_fmt; + buf->ist = ist; + + *pbuf = buf; + return 0; +} + +static void free_buffer_pool(InputStream *ist) +{ + FrameBuffer *buf = ist->buffer_pool; + while (buf) { + ist->buffer_pool = buf->next; + av_freep(&buf->base[0]); + av_free(buf); + buf = ist->buffer_pool; + } +} + +static void unref_buffer(InputStream *ist, FrameBuffer *buf) +{ + av_assert0(buf->refcount); + buf->refcount--; + if (!buf->refcount) { + buf->next = ist->buffer_pool; + ist->buffer_pool = buf; + } +} + +static int codec_get_buffer(AVCodecContext *s, AVFrame *frame) +{ + InputStream *ist = s->opaque; + FrameBuffer *buf; + int ret, i; + + if (!ist->buffer_pool && (ret = alloc_buffer(ist, &ist->buffer_pool)) < 0) + return ret; + + buf = ist->buffer_pool; + ist->buffer_pool = buf->next; + buf->next = NULL; + if (buf->w != s->width || buf->h != s->height || buf->pix_fmt != s->pix_fmt) { + av_freep(&buf->base[0]); + av_free(buf); + if ((ret = alloc_buffer(ist, &buf)) < 0) + return ret; + } + buf->refcount++; + + frame->opaque = buf; + frame->type = FF_BUFFER_TYPE_USER; + frame->extended_data = frame->data; + frame->pkt_pts = s->pkt ? s->pkt->pts : AV_NOPTS_VALUE; + + for (i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) { + frame->base[i] = buf->base[i]; // XXX h264.c uses base though it shouldn't + frame->data[i] = buf->data[i]; + frame->linesize[i] = buf->linesize[i]; + } + + return 0; +} + +static void codec_release_buffer(AVCodecContext *s, AVFrame *frame) +{ + InputStream *ist = s->opaque; + FrameBuffer *buf = frame->opaque; + int i; + + for (i = 0; i < FF_ARRAY_ELEMS(frame->data); i++) + frame->data[i] = NULL; + + unref_buffer(ist, buf); +} + +static void filter_release_buffer(AVFilterBuffer *fb) +{ + FrameBuffer *buf = fb->priv; + av_free(fb); + unref_buffer(buf->ist, buf); +} + +#if CONFIG_AVFILTER + +static int configure_video_filters(InputStream *ist, OutputStream *ost) +{ + AVFilterContext *last_filter, *filter; + /** filter graph containing all filters including input & output */ + AVCodecContext *codec = ost->st->codec; + AVCodecContext *icodec = ist->st->codec; + FFSinkContext ffsink_ctx = { .pix_fmt = codec->pix_fmt }; + AVRational sample_aspect_ratio; + char args[255]; + int ret; + + ost->graph = avfilter_graph_alloc(); + + if (ist->st->sample_aspect_ratio.num) { + sample_aspect_ratio = ist->st->sample_aspect_ratio; + } else + sample_aspect_ratio = ist->st->codec->sample_aspect_ratio; + + snprintf(args, 255, "%d:%d:%d:%d:%d:%d:%d", ist->st->codec->width, + ist->st->codec->height, ist->st->codec->pix_fmt, 1, AV_TIME_BASE, + sample_aspect_ratio.num, sample_aspect_ratio.den); + + ret = avfilter_graph_create_filter(&ost->input_video_filter, avfilter_get_by_name("buffer"), + "src", args, NULL, ost->graph); + if (ret < 0) + return ret; + ret = avfilter_graph_create_filter(&ost->output_video_filter, &ffsink, + "out", NULL, &ffsink_ctx, ost->graph); + if (ret < 0) + return ret; + last_filter = ost->input_video_filter; + + if (codec->width != icodec->width || codec->height != icodec->height) { + snprintf(args, 255, "%d:%d:flags=0x%X", + codec->width, + codec->height, + (unsigned)ost->sws_flags); + if ((ret = avfilter_graph_create_filter(&filter, avfilter_get_by_name("scale"), + NULL, args, NULL, ost->graph)) < 0) + return ret; + if ((ret = avfilter_link(last_filter, 0, filter, 0)) < 0) + return ret; + last_filter = filter; + } + + snprintf(args, sizeof(args), "flags=0x%X", (unsigned)ost->sws_flags); + ost->graph->scale_sws_opts = av_strdup(args); + + if (ost->avfilter) { + AVFilterInOut *outputs = av_malloc(sizeof(AVFilterInOut)); + AVFilterInOut *inputs = av_malloc(sizeof(AVFilterInOut)); + + outputs->name = av_strdup("in"); + outputs->filter_ctx = last_filter; + outputs->pad_idx = 0; + outputs->next = NULL; + + inputs->name = av_strdup("out"); + inputs->filter_ctx = ost->output_video_filter; + inputs->pad_idx = 0; + inputs->next = NULL; + + if ((ret = avfilter_graph_parse(ost->graph, ost->avfilter, inputs, outputs, NULL)) < 0) + return ret; + } else { + if ((ret = avfilter_link(last_filter, 0, ost->output_video_filter, 0)) < 0) + return ret; + } + + if ((ret = avfilter_graph_config(ost->graph, NULL)) < 0) + return ret; + + codec->width = ost->output_video_filter->inputs[0]->w; + codec->height = ost->output_video_filter->inputs[0]->h; + codec->sample_aspect_ratio = ost->st->sample_aspect_ratio = + ost->frame_aspect_ratio ? // overridden by the -aspect cli option + av_d2q(ost->frame_aspect_ratio * codec->height/codec->width, 255) : + ost->output_video_filter->inputs[0]->sample_aspect_ratio; + + return 0; +} +#endif /* CONFIG_AVFILTER */ + +static void term_exit(void) +{ + av_log(NULL, AV_LOG_QUIET, ""); +} + +static volatile int received_sigterm = 0; +static volatile int received_nb_signals = 0; + +static void +sigterm_handler(int sig) +{ + received_sigterm = sig; + received_nb_signals++; + term_exit(); +} + +static void term_init(void) +{ + signal(SIGINT , sigterm_handler); /* Interrupt (ANSI). */ + signal(SIGTERM, sigterm_handler); /* Termination (ANSI). */ +#ifdef SIGXCPU + signal(SIGXCPU, sigterm_handler); +#endif +} + +static int decode_interrupt_cb(void *ctx) +{ + return received_nb_signals > 1; +} + +static const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL }; + +void exit_program(int ret) +{ + int i; + + /* close files */ + for (i = 0; i < nb_output_files; i++) { + AVFormatContext *s = output_files[i].ctx; + if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb) + avio_close(s->pb); + avformat_free_context(s); + av_dict_free(&output_files[i].opts); + } + for (i = 0; i < nb_output_streams; i++) { + AVBitStreamFilterContext *bsfc = output_streams[i].bitstream_filters; + while (bsfc) { + AVBitStreamFilterContext *next = bsfc->next; + av_bitstream_filter_close(bsfc); + bsfc = next; + } + output_streams[i].bitstream_filters = NULL; + +#if CONFIG_AVFILTER + av_freep(&output_streams[i].avfilter); +#endif + } + for (i = 0; i < nb_input_files; i++) { + avformat_close_input(&input_files[i].ctx); + } + for (i = 0; i < nb_input_streams; i++) { + av_freep(&input_streams[i].decoded_frame); + av_freep(&input_streams[i].filtered_frame); + av_dict_free(&input_streams[i].opts); + free_buffer_pool(&input_streams[i]); + } + + if (vstats_file) + fclose(vstats_file); + av_free(vstats_filename); + + av_freep(&input_streams); + av_freep(&input_files); + av_freep(&output_streams); + av_freep(&output_files); + + uninit_opts(); + av_free(audio_buf); + av_free(audio_out); + allocated_audio_buf_size = allocated_audio_out_size = 0; + +#if CONFIG_AVFILTER + avfilter_uninit(); +#endif + avformat_network_deinit(); + + if (received_sigterm) { + av_log(NULL, AV_LOG_INFO, "Received signal %d: terminating.\n", + (int) received_sigterm); + exit (255); + } + + exit(ret); +} + +static void assert_avoptions(AVDictionary *m) +{ + AVDictionaryEntry *t; + if ((t = av_dict_get(m, "", NULL, AV_DICT_IGNORE_SUFFIX))) { + av_log(NULL, AV_LOG_FATAL, "Option %s not found.\n", t->key); + exit_program(1); + } +} + +static void assert_codec_experimental(AVCodecContext *c, int encoder) +{ + const char *codec_string = encoder ? "encoder" : "decoder"; + AVCodec *codec; + if (c->codec->capabilities & CODEC_CAP_EXPERIMENTAL && + c->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) { + av_log(NULL, AV_LOG_FATAL, "%s '%s' is experimental and might produce bad " + "results.\nAdd '-strict experimental' if you want to use it.\n", + codec_string, c->codec->name); + codec = encoder ? avcodec_find_encoder(c->codec->id) : avcodec_find_decoder(c->codec->id); + if (!(codec->capabilities & CODEC_CAP_EXPERIMENTAL)) + av_log(NULL, AV_LOG_FATAL, "Or use the non experimental %s '%s'.\n", + codec_string, codec->name); + exit_program(1); + } +} + +static void choose_sample_fmt(AVStream *st, AVCodec *codec) +{ + if (codec && codec->sample_fmts) { + const enum AVSampleFormat *p = codec->sample_fmts; + for (; *p != -1; p++) { + if (*p == st->codec->sample_fmt) + break; + } + if (*p == -1) { + av_log(NULL, AV_LOG_WARNING, + "Incompatible sample format '%s' for codec '%s', auto-selecting format '%s'\n", + av_get_sample_fmt_name(st->codec->sample_fmt), + codec->name, + av_get_sample_fmt_name(codec->sample_fmts[0])); + st->codec->sample_fmt = codec->sample_fmts[0]; + } + } +} + +/** + * Update the requested input sample format based on the output sample format. + * This is currently only used to request float output from decoders which + * support multiple sample formats, one of which is AV_SAMPLE_FMT_FLT. + * Ideally this will be removed in the future when decoders do not do format + * conversion and only output in their native format. + */ +static void update_sample_fmt(AVCodecContext *dec, AVCodec *dec_codec, + AVCodecContext *enc) +{ + /* if sample formats match or a decoder sample format has already been + requested, just return */ + if (enc->sample_fmt == dec->sample_fmt || + dec->request_sample_fmt > AV_SAMPLE_FMT_NONE) + return; + + /* if decoder supports more than one output format */ + if (dec_codec && dec_codec->sample_fmts && + dec_codec->sample_fmts[0] != AV_SAMPLE_FMT_NONE && + dec_codec->sample_fmts[1] != AV_SAMPLE_FMT_NONE) { + const enum AVSampleFormat *p; + int min_dec = -1, min_inc = -1; + + /* find a matching sample format in the encoder */ + for (p = dec_codec->sample_fmts; *p != AV_SAMPLE_FMT_NONE; p++) { + if (*p == enc->sample_fmt) { + dec->request_sample_fmt = *p; + return; + } else if (*p > enc->sample_fmt) { + min_inc = FFMIN(min_inc, *p - enc->sample_fmt); + } else + min_dec = FFMIN(min_dec, enc->sample_fmt - *p); + } + + /* if none match, provide the one that matches quality closest */ + dec->request_sample_fmt = min_inc > 0 ? enc->sample_fmt + min_inc : + enc->sample_fmt - min_dec; + } +} + +static void choose_sample_rate(AVStream *st, AVCodec *codec) +{ + if (codec && codec->supported_samplerates) { + const int *p = codec->supported_samplerates; + int best = 0; + int best_dist = INT_MAX; + for (; *p; p++) { + int dist = abs(st->codec->sample_rate - *p); + if (dist < best_dist) { + best_dist = dist; + best = *p; + } + } + if (best_dist) { + av_log(st->codec, AV_LOG_WARNING, "Requested sampling rate unsupported using closest supported (%d)\n", best); + } + st->codec->sample_rate = best; + } +} + +static void choose_pixel_fmt(AVStream *st, AVCodec *codec) +{ + if (codec && codec->pix_fmts) { + const enum PixelFormat *p = codec->pix_fmts; + if (st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) { + if (st->codec->codec_id == CODEC_ID_MJPEG) { + p = (const enum PixelFormat[]) { PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE }; + } else if (st->codec->codec_id == CODEC_ID_LJPEG) { + p = (const enum PixelFormat[]) { PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P, PIX_FMT_YUV420P, + PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_BGRA, PIX_FMT_NONE }; + } + } + for (; *p != PIX_FMT_NONE; p++) { + if (*p == st->codec->pix_fmt) + break; + } + if (*p == PIX_FMT_NONE) { + if (st->codec->pix_fmt != PIX_FMT_NONE) + av_log(NULL, AV_LOG_WARNING, + "Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'\n", + av_pix_fmt_descriptors[st->codec->pix_fmt].name, + codec->name, + av_pix_fmt_descriptors[codec->pix_fmts[0]].name); + st->codec->pix_fmt = codec->pix_fmts[0]; + } + } +} + +static double +get_sync_ipts(const OutputStream *ost) +{ + const InputStream *ist = ost->sync_ist; + OutputFile *of = &output_files[ost->file_index]; + return (double)(ist->pts - of->start_time) / AV_TIME_BASE; +} + +static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) +{ + AVBitStreamFilterContext *bsfc = ost->bitstream_filters; + AVCodecContext *avctx = ost->st->codec; + int ret; + + while (bsfc) { + AVPacket new_pkt = *pkt; + int a = av_bitstream_filter_filter(bsfc, avctx, NULL, + &new_pkt.data, &new_pkt.size, + pkt->data, pkt->size, + pkt->flags & AV_PKT_FLAG_KEY); + if (a > 0) { + av_free_packet(pkt); + new_pkt.destruct = av_destruct_packet; + } else if (a < 0) { + av_log(NULL, AV_LOG_ERROR, "%s failed for stream %d, codec %s", + bsfc->filter->name, pkt->stream_index, + avctx->codec ? avctx->codec->name : "copy"); + print_error("", a); + if (exit_on_error) + exit_program(1); + } + *pkt = new_pkt; + + bsfc = bsfc->next; + } + + ret = av_interleaved_write_frame(s, pkt); + if (ret < 0) { + print_error("av_interleaved_write_frame()", ret); + exit_program(1); + } + ost->frame_number++; +} + +static void generate_silence(uint8_t* buf, enum AVSampleFormat sample_fmt, size_t size) +{ + int fill_char = 0x00; + if (sample_fmt == AV_SAMPLE_FMT_U8) + fill_char = 0x80; + memset(buf, fill_char, size); +} + +static void do_audio_out(AVFormatContext *s, OutputStream *ost, + InputStream *ist, AVFrame *decoded_frame) +{ + uint8_t *buftmp; + int64_t audio_out_size, audio_buf_size; + + int size_out, frame_bytes, ret, resample_changed; + AVCodecContext *enc = ost->st->codec; + AVCodecContext *dec = ist->st->codec; + int osize = av_get_bytes_per_sample(enc->sample_fmt); + int isize = av_get_bytes_per_sample(dec->sample_fmt); + const int coded_bps = av_get_bits_per_sample(enc->codec->id); + uint8_t *buf = decoded_frame->data[0]; + int size = decoded_frame->nb_samples * dec->channels * isize; + int64_t allocated_for_size = size; + +need_realloc: + audio_buf_size = (allocated_for_size + isize * dec->channels - 1) / (isize * dec->channels); + audio_buf_size = (audio_buf_size * enc->sample_rate + dec->sample_rate) / dec->sample_rate; + audio_buf_size = audio_buf_size * 2 + 10000; // safety factors for the deprecated resampling API + audio_buf_size = FFMAX(audio_buf_size, enc->frame_size); + audio_buf_size *= osize * enc->channels; + + audio_out_size = FFMAX(audio_buf_size, enc->frame_size * osize * enc->channels); + if (coded_bps > 8 * osize) + audio_out_size = audio_out_size * coded_bps / (8*osize); + audio_out_size += FF_MIN_BUFFER_SIZE; + + if (audio_out_size > INT_MAX || audio_buf_size > INT_MAX) { + av_log(NULL, AV_LOG_FATAL, "Buffer sizes too large\n"); + exit_program(1); + } + + av_fast_malloc(&audio_buf, &allocated_audio_buf_size, audio_buf_size); + av_fast_malloc(&audio_out, &allocated_audio_out_size, audio_out_size); + if (!audio_buf || !audio_out) { + av_log(NULL, AV_LOG_FATAL, "Out of memory in do_audio_out\n"); + exit_program(1); + } + + if (enc->channels != dec->channels || enc->sample_rate != dec->sample_rate) + ost->audio_resample = 1; + + resample_changed = ost->resample_sample_fmt != dec->sample_fmt || + ost->resample_channels != dec->channels || + ost->resample_sample_rate != dec->sample_rate; + + if ((ost->audio_resample && !ost->resample) || resample_changed) { + if (resample_changed) { + av_log(NULL, AV_LOG_INFO, "Input stream #%d:%d frame changed from rate:%d fmt:%s ch:%d to rate:%d fmt:%s ch:%d\n", + ist->file_index, ist->st->index, + ost->resample_sample_rate, av_get_sample_fmt_name(ost->resample_sample_fmt), ost->resample_channels, + dec->sample_rate, av_get_sample_fmt_name(dec->sample_fmt), dec->channels); + ost->resample_sample_fmt = dec->sample_fmt; + ost->resample_channels = dec->channels; + ost->resample_sample_rate = dec->sample_rate; + if (ost->resample) + audio_resample_close(ost->resample); + } + /* if audio_sync_method is >1 the resampler is needed for audio drift compensation */ + if (audio_sync_method <= 1 && + ost->resample_sample_fmt == enc->sample_fmt && + ost->resample_channels == enc->channels && + ost->resample_sample_rate == enc->sample_rate) { + ost->resample = NULL; + ost->audio_resample = 0; + } else if (ost->audio_resample) { + if (dec->sample_fmt != AV_SAMPLE_FMT_S16) + av_log(NULL, AV_LOG_WARNING, "Using s16 intermediate sample format for resampling\n"); + ost->resample = av_audio_resample_init(enc->channels, dec->channels, + enc->sample_rate, dec->sample_rate, + enc->sample_fmt, dec->sample_fmt, + 16, 10, 0, 0.8); + if (!ost->resample) { + av_log(NULL, AV_LOG_FATAL, "Can not resample %d channels @ %d Hz to %d channels @ %d Hz\n", + dec->channels, dec->sample_rate, + enc->channels, enc->sample_rate); + exit_program(1); + } + } + } + +#define MAKE_SFMT_PAIR(a,b) ((a)+AV_SAMPLE_FMT_NB*(b)) + if (!ost->audio_resample && dec->sample_fmt != enc->sample_fmt && + MAKE_SFMT_PAIR(enc->sample_fmt,dec->sample_fmt) != ost->reformat_pair) { + if (ost->reformat_ctx) + av_audio_convert_free(ost->reformat_ctx); + ost->reformat_ctx = av_audio_convert_alloc(enc->sample_fmt, 1, + dec->sample_fmt, 1, NULL, 0); + if (!ost->reformat_ctx) { + av_log(NULL, AV_LOG_FATAL, "Cannot convert %s sample format to %s sample format\n", + av_get_sample_fmt_name(dec->sample_fmt), + av_get_sample_fmt_name(enc->sample_fmt)); + exit_program(1); + } + ost->reformat_pair = MAKE_SFMT_PAIR(enc->sample_fmt,dec->sample_fmt); + } + + if (audio_sync_method) { + double delta = get_sync_ipts(ost) * enc->sample_rate - ost->sync_opts - + av_fifo_size(ost->fifo) / (enc->channels * osize); + int idelta = delta * dec->sample_rate / enc->sample_rate; + int byte_delta = idelta * isize * dec->channels; + + // FIXME resample delay + if (fabs(delta) > 50) { + if (ist->is_start || fabs(delta) > audio_drift_threshold*enc->sample_rate) { + if (byte_delta < 0) { + byte_delta = FFMAX(byte_delta, -size); + size += byte_delta; + buf -= byte_delta; + av_log(NULL, AV_LOG_VERBOSE, "discarding %d audio samples\n", + -byte_delta / (isize * dec->channels)); + if (!size) + return; + ist->is_start = 0; + } else { + static uint8_t *input_tmp = NULL; + input_tmp = av_realloc(input_tmp, byte_delta + size); + + if (byte_delta > allocated_for_size - size) { + allocated_for_size = byte_delta + (int64_t)size; + goto need_realloc; + } + ist->is_start = 0; + + generate_silence(input_tmp, dec->sample_fmt, byte_delta); + memcpy(input_tmp + byte_delta, buf, size); + buf = input_tmp; + size += byte_delta; + av_log(NULL, AV_LOG_VERBOSE, "adding %d audio samples of silence\n", idelta); + } + } else if (audio_sync_method > 1) { + int comp = av_clip(delta, -audio_sync_method, audio_sync_method); + av_assert0(ost->audio_resample); + av_log(NULL, AV_LOG_VERBOSE, "compensating audio timestamp drift:%f compensation:%d in:%d\n", + delta, comp, enc->sample_rate); +// fprintf(stderr, "drift:%f len:%d opts:%"PRId64" ipts:%"PRId64" fifo:%d\n", delta, -1, ost->sync_opts, (int64_t)(get_sync_ipts(ost) * enc->sample_rate), av_fifo_size(ost->fifo)/(ost->st->codec->channels * 2)); + av_resample_compensate(*(struct AVResampleContext**)ost->resample, comp, enc->sample_rate); + } + } + } else + ost->sync_opts = lrintf(get_sync_ipts(ost) * enc->sample_rate) - + av_fifo_size(ost->fifo) / (enc->channels * osize); // FIXME wrong + + if (ost->audio_resample) { + buftmp = audio_buf; + size_out = audio_resample(ost->resample, + (short *)buftmp, (short *)buf, + size / (dec->channels * isize)); + size_out = size_out * enc->channels * osize; + } else { + buftmp = buf; + size_out = size; + } + + if (!ost->audio_resample && dec->sample_fmt != enc->sample_fmt) { + const void *ibuf[6] = { buftmp }; + void *obuf[6] = { audio_buf }; + int istride[6] = { isize }; + int ostride[6] = { osize }; + int len = size_out / istride[0]; + if (av_audio_convert(ost->reformat_ctx, obuf, ostride, ibuf, istride, len) < 0) { + printf("av_audio_convert() failed\n"); + if (exit_on_error) + exit_program(1); + return; + } + buftmp = audio_buf; + size_out = len * osize; + } + + /* now encode as many frames as possible */ + if (enc->frame_size > 1) { + /* output resampled raw samples */ + if (av_fifo_realloc2(ost->fifo, av_fifo_size(ost->fifo) + size_out) < 0) { + av_log(NULL, AV_LOG_FATAL, "av_fifo_realloc2() failed\n"); + exit_program(1); + } + av_fifo_generic_write(ost->fifo, buftmp, size_out, NULL); + + frame_bytes = enc->frame_size * osize * enc->channels; + + while (av_fifo_size(ost->fifo) >= frame_bytes) { + AVPacket pkt; + av_init_packet(&pkt); + + av_fifo_generic_read(ost->fifo, audio_buf, frame_bytes, NULL); + + // FIXME pass ost->sync_opts as AVFrame.pts in avcodec_encode_audio() + + ret = avcodec_encode_audio(enc, audio_out, audio_out_size, + (short *)audio_buf); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, "Audio encoding failed\n"); + exit_program(1); + } + audio_size += ret; + pkt.stream_index = ost->index; + pkt.data = audio_out; + pkt.size = ret; + if (enc->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE) + pkt.pts = av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base); + pkt.flags |= AV_PKT_FLAG_KEY; + write_frame(s, &pkt, ost); + + ost->sync_opts += enc->frame_size; + } + } else { + AVPacket pkt; + av_init_packet(&pkt); + + ost->sync_opts += size_out / (osize * enc->channels); + + /* output a pcm frame */ + /* determine the size of the coded buffer */ + size_out /= osize; + if (coded_bps) + size_out = size_out * coded_bps / 8; + + if (size_out > audio_out_size) { + av_log(NULL, AV_LOG_FATAL, "Internal error, buffer size too small\n"); + exit_program(1); + } + + // FIXME pass ost->sync_opts as AVFrame.pts in avcodec_encode_audio() + ret = avcodec_encode_audio(enc, audio_out, size_out, + (short *)buftmp); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, "Audio encoding failed\n"); + exit_program(1); + } + audio_size += ret; + pkt.stream_index = ost->index; + pkt.data = audio_out; + pkt.size = ret; + if (enc->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE) + pkt.pts = av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base); + pkt.flags |= AV_PKT_FLAG_KEY; + write_frame(s, &pkt, ost); + } +} + +static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void **bufp) +{ + AVCodecContext *dec; + AVPicture *picture2; + AVPicture picture_tmp; + uint8_t *buf = 0; + + dec = ist->st->codec; + + /* deinterlace : must be done before any resize */ + if (do_deinterlace) { + int size; + + /* create temporary picture */ + size = avpicture_get_size(dec->pix_fmt, dec->width, dec->height); + buf = av_malloc(size); + if (!buf) + return; + + picture2 = &picture_tmp; + avpicture_fill(picture2, buf, dec->pix_fmt, dec->width, dec->height); + + if (avpicture_deinterlace(picture2, picture, + dec->pix_fmt, dec->width, dec->height) < 0) { + /* if error, do not deinterlace */ + av_log(NULL, AV_LOG_WARNING, "Deinterlacing failed\n"); + av_free(buf); + buf = NULL; + picture2 = picture; + } + } else { + picture2 = picture; + } + + if (picture != picture2) + *picture = *picture2; + *bufp = buf; +} + +static void do_subtitle_out(AVFormatContext *s, + OutputStream *ost, + InputStream *ist, + AVSubtitle *sub, + int64_t pts) +{ + static uint8_t *subtitle_out = NULL; + int subtitle_out_max_size = 1024 * 1024; + int subtitle_out_size, nb, i; + AVCodecContext *enc; + AVPacket pkt; + + if (pts == AV_NOPTS_VALUE) { + av_log(NULL, AV_LOG_ERROR, "Subtitle packets must have a pts\n"); + if (exit_on_error) + exit_program(1); + return; + } + + enc = ost->st->codec; + + if (!subtitle_out) { + subtitle_out = av_malloc(subtitle_out_max_size); + } + + /* Note: DVB subtitle need one packet to draw them and one other + packet to clear them */ + /* XXX: signal it in the codec context ? */ + if (enc->codec_id == CODEC_ID_DVB_SUBTITLE) + nb = 2; + else + nb = 1; + + for (i = 0; i < nb; i++) { + sub->pts = av_rescale_q(pts, ist->st->time_base, AV_TIME_BASE_Q); + // start_display_time is required to be 0 + sub->pts += av_rescale_q(sub->start_display_time, (AVRational){ 1, 1000 }, AV_TIME_BASE_Q); + sub->end_display_time -= sub->start_display_time; + sub->start_display_time = 0; + subtitle_out_size = avcodec_encode_subtitle(enc, subtitle_out, + subtitle_out_max_size, sub); + if (subtitle_out_size < 0) { + av_log(NULL, AV_LOG_FATAL, "Subtitle encoding failed\n"); + exit_program(1); + } + + av_init_packet(&pkt); + pkt.stream_index = ost->index; + pkt.data = subtitle_out; + pkt.size = subtitle_out_size; + pkt.pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->st->time_base); + if (enc->codec_id == CODEC_ID_DVB_SUBTITLE) { + /* XXX: the pts correction is handled here. Maybe handling + it in the codec would be better */ + if (i == 0) + pkt.pts += 90 * sub->start_display_time; + else + pkt.pts += 90 * sub->end_display_time; + } + write_frame(s, &pkt, ost); + } +} + +static int bit_buffer_size = 1024 * 256; +static uint8_t *bit_buffer = NULL; + +#if !CONFIG_AVFILTER +static void do_video_resample(OutputStream *ost, + InputStream *ist, + AVFrame *in_picture, + AVFrame **out_picture) +{ + int resample_changed = 0; + AVCodecContext *dec = ist->st->codec; + *out_picture = in_picture; + + resample_changed = ost->resample_width != dec->width || + ost->resample_height != dec->height || + ost->resample_pix_fmt != dec->pix_fmt; + + if (resample_changed) { + av_log(NULL, AV_LOG_INFO, + "Input stream #%d:%d frame changed from size:%dx%d fmt:%s to size:%dx%d fmt:%s\n", + ist->file_index, ist->st->index, + ost->resample_width, ost->resample_height, av_get_pix_fmt_name(ost->resample_pix_fmt), + dec->width , dec->height , av_get_pix_fmt_name(dec->pix_fmt)); + if (!ost->video_resample) + ost->video_resample = 1; + } + + if (ost->video_resample) { + *out_picture = &ost->pict_tmp; + if (resample_changed) { + /* initialize a new scaler context */ + sws_freeContext(ost->img_resample_ctx); + ost->img_resample_ctx = sws_getContext( + ist->st->codec->width, + ist->st->codec->height, + ist->st->codec->pix_fmt, + ost->st->codec->width, + ost->st->codec->height, + ost->st->codec->pix_fmt, + ost->sws_flags, NULL, NULL, NULL); + if (ost->img_resample_ctx == NULL) { + av_log(NULL, AV_LOG_FATAL, "Cannot get resampling context\n"); + exit_program(1); + } + } + sws_scale(ost->img_resample_ctx, in_picture->data, in_picture->linesize, + 0, ost->resample_height, (*out_picture)->data, (*out_picture)->linesize); + } + if (resample_changed) { + ost->resample_width = dec->width; + ost->resample_height = dec->height; + ost->resample_pix_fmt = dec->pix_fmt; + } +} +#endif + + +static void do_video_out(AVFormatContext *s, + OutputStream *ost, + InputStream *ist, + AVFrame *in_picture, + int *frame_size, float quality) +{ + int nb_frames, i, ret, format_video_sync; + AVFrame *final_picture; + AVCodecContext *enc; + double sync_ipts; + + enc = ost->st->codec; + + sync_ipts = get_sync_ipts(ost) / av_q2d(enc->time_base); + + /* by default, we output a single frame */ + nb_frames = 1; + + *frame_size = 0; + + format_video_sync = video_sync_method; + if (format_video_sync == VSYNC_AUTO) + format_video_sync = (s->oformat->flags & AVFMT_NOTIMESTAMPS) ? VSYNC_PASSTHROUGH : + (s->oformat->flags & AVFMT_VARIABLE_FPS) ? VSYNC_VFR : VSYNC_CFR; + + if (format_video_sync != VSYNC_PASSTHROUGH) { + double vdelta = sync_ipts - ost->sync_opts; + // FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c + if (vdelta < -1.1) + nb_frames = 0; + else if (format_video_sync == VSYNC_VFR) { + if (vdelta <= -0.6) { + nb_frames = 0; + } else if (vdelta > 0.6) + ost->sync_opts = lrintf(sync_ipts); + } else if (vdelta > 1.1) + nb_frames = lrintf(vdelta); +//fprintf(stderr, "vdelta:%f, ost->sync_opts:%"PRId64", ost->sync_ipts:%f nb_frames:%d\n", vdelta, ost->sync_opts, get_sync_ipts(ost), nb_frames); + if (nb_frames == 0) { + ++nb_frames_drop; + av_log(NULL, AV_LOG_VERBOSE, "*** drop!\n"); + } else if (nb_frames > 1) { + nb_frames_dup += nb_frames - 1; + av_log(NULL, AV_LOG_VERBOSE, "*** %d dup!\n", nb_frames - 1); + } + } else + ost->sync_opts = lrintf(sync_ipts); + + nb_frames = FFMIN(nb_frames, ost->max_frames - ost->frame_number); + if (nb_frames <= 0) + return; + +#if !CONFIG_AVFILTER + do_video_resample(ost, ist, in_picture, &final_picture); +#else + final_picture = in_picture; +#endif + + /* duplicates frame if needed */ + for (i = 0; i < nb_frames; i++) { + AVPacket pkt; + av_init_packet(&pkt); + pkt.stream_index = ost->index; + + if (s->oformat->flags & AVFMT_RAWPICTURE && + enc->codec->id == CODEC_ID_RAWVIDEO) { + /* raw pictures are written as AVPicture structure to + avoid any copies. We support temporarily the older + method. */ + enc->coded_frame->interlaced_frame = in_picture->interlaced_frame; + enc->coded_frame->top_field_first = in_picture->top_field_first; + pkt.data = (uint8_t *)final_picture; + pkt.size = sizeof(AVPicture); + pkt.pts = av_rescale_q(ost->sync_opts, enc->time_base, ost->st->time_base); + pkt.flags |= AV_PKT_FLAG_KEY; + + write_frame(s, &pkt, ost); + } else { + AVFrame big_picture; + + big_picture = *final_picture; + /* better than nothing: use input picture interlaced + settings */ + big_picture.interlaced_frame = in_picture->interlaced_frame; + if (ost->st->codec->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME)) { + if (ost->top_field_first == -1) + big_picture.top_field_first = in_picture->top_field_first; + else + big_picture.top_field_first = !!ost->top_field_first; + } + + /* handles same_quant here. This is not correct because it may + not be a global option */ + big_picture.quality = quality; + if (!enc->me_threshold) + big_picture.pict_type = 0; +// big_picture.pts = AV_NOPTS_VALUE; + big_picture.pts = ost->sync_opts; +// big_picture.pts= av_rescale(ost->sync_opts, AV_TIME_BASE*(int64_t)enc->time_base.num, enc->time_base.den); +// av_log(NULL, AV_LOG_DEBUG, "%"PRId64" -> encoder\n", ost->sync_opts); + if (ost->forced_kf_index < ost->forced_kf_count && + big_picture.pts >= ost->forced_kf_pts[ost->forced_kf_index]) { + big_picture.pict_type = AV_PICTURE_TYPE_I; + ost->forced_kf_index++; + } + ret = avcodec_encode_video(enc, + bit_buffer, bit_buffer_size, + &big_picture); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, "Video encoding failed\n"); + exit_program(1); + } + + if (ret > 0) { + pkt.data = bit_buffer; + pkt.size = ret; + if (enc->coded_frame->pts != AV_NOPTS_VALUE) + pkt.pts = av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base); +/*av_log(NULL, AV_LOG_DEBUG, "encoder -> %"PRId64"/%"PRId64"\n", + pkt.pts != AV_NOPTS_VALUE ? av_rescale(pkt.pts, enc->time_base.den, AV_TIME_BASE*(int64_t)enc->time_base.num) : -1, + pkt.dts != AV_NOPTS_VALUE ? av_rescale(pkt.dts, enc->time_base.den, AV_TIME_BASE*(int64_t)enc->time_base.num) : -1);*/ + + if (enc->coded_frame->key_frame) + pkt.flags |= AV_PKT_FLAG_KEY; + write_frame(s, &pkt, ost); + *frame_size = ret; + video_size += ret; + // fprintf(stderr,"\nFrame: %3d size: %5d type: %d", + // enc->frame_number-1, ret, enc->pict_type); + /* if two pass, output log */ + if (ost->logfile && enc->stats_out) { + fprintf(ost->logfile, "%s", enc->stats_out); + } + } + } + ost->sync_opts++; + } +} + +static double psnr(double d) +{ + return -10.0 * log(d) / log(10.0); +} + +static void do_video_stats(AVFormatContext *os, OutputStream *ost, + int frame_size) +{ + AVCodecContext *enc; + int frame_number; + double ti1, bitrate, avg_bitrate; + + /* this is executed just the first time do_video_stats is called */ + if (!vstats_file) { + vstats_file = fopen(vstats_filename, "w"); + if (!vstats_file) { + perror("fopen"); + exit_program(1); + } + } + + enc = ost->st->codec; + if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { + frame_number = ost->frame_number; + fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality / (float)FF_QP2LAMBDA); + if (enc->flags&CODEC_FLAG_PSNR) + fprintf(vstats_file, "PSNR= %6.2f ", psnr(enc->coded_frame->error[0] / (enc->width * enc->height * 255.0 * 255.0))); + + fprintf(vstats_file,"f_size= %6d ", frame_size); + /* compute pts value */ + ti1 = ost->sync_opts * av_q2d(enc->time_base); + if (ti1 < 0.01) + ti1 = 0.01; + + bitrate = (frame_size * 8) / av_q2d(enc->time_base) / 1000.0; + avg_bitrate = (double)(video_size * 8) / ti1 / 1000.0; + fprintf(vstats_file, "s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ", + (double)video_size / 1024, ti1, bitrate, avg_bitrate); + fprintf(vstats_file, "type= %c\n", av_get_picture_type_char(enc->coded_frame->pict_type)); + } +} + +static void print_report(OutputFile *output_files, + OutputStream *ost_table, int nb_ostreams, + int is_last_report, int64_t timer_start) +{ + char buf[1024]; + OutputStream *ost; + AVFormatContext *oc; + int64_t total_size; + AVCodecContext *enc; + int frame_number, vid, i; + double bitrate, ti1, pts; + static int64_t last_time = -1; + static int qp_histogram[52]; + + if (!print_stats && !is_last_report) + return; + + if (!is_last_report) { + int64_t cur_time; + /* display the report every 0.5 seconds */ + cur_time = av_gettime(); + if (last_time == -1) { + last_time = cur_time; + return; + } + if ((cur_time - last_time) < 500000) + return; + last_time = cur_time; + } + + + oc = output_files[0].ctx; + + total_size = avio_size(oc->pb); + if (total_size < 0) // FIXME improve avio_size() so it works with non seekable output too + total_size = avio_tell(oc->pb); + + buf[0] = '\0'; + ti1 = 1e10; + vid = 0; + for (i = 0; i < nb_ostreams; i++) { + float q = -1; + ost = &ost_table[i]; + enc = ost->st->codec; + if (!ost->stream_copy && enc->coded_frame) + q = enc->coded_frame->quality / (float)FF_QP2LAMBDA; + if (vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { + snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ", q); + } + if (!vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { + float t = (av_gettime() - timer_start) / 1000000.0; + + frame_number = ost->frame_number; + snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "frame=%5d fps=%3d q=%3.1f ", + frame_number, (t > 1) ? (int)(frame_number / t + 0.5) : 0, q); + if (is_last_report) + snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "L"); + if (qp_hist) { + int j; + int qp = lrintf(q); + if (qp >= 0 && qp < FF_ARRAY_ELEMS(qp_histogram)) + qp_histogram[qp]++; + for (j = 0; j < 32; j++) + snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%X", (int)lrintf(log(qp_histogram[j] + 1) / log(2))); + } + if (enc->flags&CODEC_FLAG_PSNR) { + int j; + double error, error_sum = 0; + double scale, scale_sum = 0; + char type[3] = { 'Y','U','V' }; + snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "PSNR="); + for (j = 0; j < 3; j++) { + if (is_last_report) { + error = enc->error[j]; + scale = enc->width * enc->height * 255.0 * 255.0 * frame_number; + } else { + error = enc->coded_frame->error[j]; + scale = enc->width * enc->height * 255.0 * 255.0; + } + if (j) + scale /= 4; + error_sum += error; + scale_sum += scale; + snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%c:%2.2f ", type[j], psnr(error / scale)); + } + snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "*:%2.2f ", psnr(error_sum / scale_sum)); + } + vid = 1; + } + /* compute min output value */ + pts = (double)ost->st->pts.val * av_q2d(ost->st->time_base); + if ((pts < ti1) && (pts > 0)) + ti1 = pts; + } + if (ti1 < 0.01) + ti1 = 0.01; + + bitrate = (double)(total_size * 8) / ti1 / 1000.0; + + snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), + "size=%8.0fkB time=%0.2f bitrate=%6.1fkbits/s", + (double)total_size / 1024, ti1, bitrate); + + if (nb_frames_dup || nb_frames_drop) + snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " dup=%d drop=%d", + nb_frames_dup, nb_frames_drop); + + av_log(NULL, AV_LOG_INFO, "%s \r", buf); + + fflush(stderr); + + if (is_last_report) { + int64_t raw= audio_size + video_size + extra_size; + av_log(NULL, AV_LOG_INFO, "\n"); + av_log(NULL, AV_LOG_INFO, "video:%1.0fkB audio:%1.0fkB global headers:%1.0fkB muxing overhead %f%%\n", + video_size / 1024.0, + audio_size / 1024.0, + extra_size / 1024.0, + 100.0 * (total_size - raw) / raw + ); + } +} + +static void flush_encoders(OutputStream *ost_table, int nb_ostreams) +{ + int i, ret; + + for (i = 0; i < nb_ostreams; i++) { + OutputStream *ost = &ost_table[i]; + AVCodecContext *enc = ost->st->codec; + AVFormatContext *os = output_files[ost->file_index].ctx; + + if (!ost->encoding_needed) + continue; + + if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <= 1) + continue; + if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == CODEC_ID_RAWVIDEO) + continue; + + for (;;) { + AVPacket pkt; + int fifo_bytes; + av_init_packet(&pkt); + pkt.stream_index = ost->index; + + switch (ost->st->codec->codec_type) { + case AVMEDIA_TYPE_AUDIO: + fifo_bytes = av_fifo_size(ost->fifo); + ret = 0; + /* encode any samples remaining in fifo */ + if (fifo_bytes > 0) { + int osize = av_get_bytes_per_sample(enc->sample_fmt); + int fs_tmp = enc->frame_size; + + av_fifo_generic_read(ost->fifo, audio_buf, fifo_bytes, NULL); + if (enc->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) { + enc->frame_size = fifo_bytes / (osize * enc->channels); + } else { /* pad */ + int frame_bytes = enc->frame_size*osize*enc->channels; + if (allocated_audio_buf_size < frame_bytes) + exit_program(1); + generate_silence(audio_buf+fifo_bytes, enc->sample_fmt, frame_bytes - fifo_bytes); + } + + ret = avcodec_encode_audio(enc, bit_buffer, bit_buffer_size, (short *)audio_buf); + pkt.duration = av_rescale((int64_t)enc->frame_size*ost->st->time_base.den, + ost->st->time_base.num, enc->sample_rate); + enc->frame_size = fs_tmp; + } + if (ret <= 0) { + ret = avcodec_encode_audio(enc, bit_buffer, bit_buffer_size, NULL); + } + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, "Audio encoding failed\n"); + exit_program(1); + } + audio_size += ret; + pkt.flags |= AV_PKT_FLAG_KEY; + break; + case AVMEDIA_TYPE_VIDEO: + ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, NULL); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, "Video encoding failed\n"); + exit_program(1); + } + video_size += ret; + if (enc->coded_frame && enc->coded_frame->key_frame) + pkt.flags |= AV_PKT_FLAG_KEY; + if (ost->logfile && enc->stats_out) { + fprintf(ost->logfile, "%s", enc->stats_out); + } + break; + default: + ret = -1; + } + + if (ret <= 0) + break; + pkt.data = bit_buffer; + pkt.size = ret; + if (enc->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE) + pkt.pts = av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base); + write_frame(os, &pkt, ost); + } + } +} + +/* + * Check whether a packet from ist should be written into ost at this time + */ +static int check_output_constraints(InputStream *ist, OutputStream *ost) +{ + OutputFile *of = &output_files[ost->file_index]; + int ist_index = ist - input_streams; + + if (ost->source_index != ist_index) + return 0; + + if (of->start_time && ist->pts < of->start_time) + return 0; + + if (of->recording_time != INT64_MAX && + av_compare_ts(ist->pts, AV_TIME_BASE_Q, of->recording_time + of->start_time, + (AVRational){ 1, 1000000 }) >= 0) { + ost->is_past_recording_time = 1; + return 0; + } + + return 1; +} + +static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *pkt) +{ + OutputFile *of = &output_files[ost->file_index]; + int64_t ost_tb_start_time = av_rescale_q(of->start_time, AV_TIME_BASE_Q, ost->st->time_base); + AVPacket opkt; + + av_init_packet(&opkt); + + if ((!ost->frame_number && !(pkt->flags & AV_PKT_FLAG_KEY)) && + !ost->copy_initial_nonkeyframes) + return; + + /* force the input stream PTS */ + if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) + audio_size += pkt->size; + else if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { + video_size += pkt->size; + ost->sync_opts++; + } + + opkt.stream_index = ost->index; + if (pkt->pts != AV_NOPTS_VALUE) + opkt.pts = av_rescale_q(pkt->pts, ist->st->time_base, ost->st->time_base) - ost_tb_start_time; + else + opkt.pts = AV_NOPTS_VALUE; + + if (pkt->dts == AV_NOPTS_VALUE) + opkt.dts = av_rescale_q(ist->pts, AV_TIME_BASE_Q, ost->st->time_base); + else + opkt.dts = av_rescale_q(pkt->dts, ist->st->time_base, ost->st->time_base); + opkt.dts -= ost_tb_start_time; + + opkt.duration = av_rescale_q(pkt->duration, ist->st->time_base, ost->st->time_base); + opkt.flags = pkt->flags; + + // FIXME remove the following 2 lines they shall be replaced by the bitstream filters + if ( ost->st->codec->codec_id != CODEC_ID_H264 + && ost->st->codec->codec_id != CODEC_ID_MPEG1VIDEO + && ost->st->codec->codec_id != CODEC_ID_MPEG2VIDEO + ) { + if (av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, pkt->data, pkt->size, pkt->flags & AV_PKT_FLAG_KEY)) + opkt.destruct = av_destruct_packet; + } else { + opkt.data = pkt->data; + opkt.size = pkt->size; + } + + write_frame(of->ctx, &opkt, ost); + ost->st->codec->frame_number++; + av_free_packet(&opkt); +} + +static void rate_emu_sleep(InputStream *ist) +{ + if (input_files[ist->file_index].rate_emu) { + int64_t pts = av_rescale(ist->pts, 1000000, AV_TIME_BASE); + int64_t now = av_gettime() - ist->start; + if (pts > now) + usleep(pts - now); + } +} + +static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) +{ + AVFrame *decoded_frame; + AVCodecContext *avctx = ist->st->codec; + int bps = av_get_bytes_per_sample(ist->st->codec->sample_fmt); + int i, ret; + + if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame())) + return AVERROR(ENOMEM); + else + avcodec_get_frame_defaults(ist->decoded_frame); + decoded_frame = ist->decoded_frame; + + ret = avcodec_decode_audio4(avctx, decoded_frame, got_output, pkt); + if (ret < 0) { + return ret; + } + + if (!*got_output) { + /* no audio frame */ + return ret; + } + + /* if the decoder provides a pts, use it instead of the last packet pts. + the decoder could be delaying output by a packet or more. */ + if (decoded_frame->pts != AV_NOPTS_VALUE) + ist->next_pts = decoded_frame->pts; + + /* increment next_pts to use for the case where the input stream does not + have timestamps or there are multiple frames in the packet */ + ist->next_pts += ((int64_t)AV_TIME_BASE * decoded_frame->nb_samples) / + avctx->sample_rate; + + // preprocess audio (volume) + if (audio_volume != 256) { + int decoded_data_size = decoded_frame->nb_samples * avctx->channels * bps; + void *samples = decoded_frame->data[0]; + switch (avctx->sample_fmt) { + case AV_SAMPLE_FMT_U8: + { + uint8_t *volp = samples; + for (i = 0; i < (decoded_data_size / sizeof(*volp)); i++) { + int v = (((*volp - 128) * audio_volume + 128) >> 8) + 128; + *volp++ = av_clip_uint8(v); + } + break; + } + case AV_SAMPLE_FMT_S16: + { + int16_t *volp = samples; + for (i = 0; i < (decoded_data_size / sizeof(*volp)); i++) { + int v = ((*volp) * audio_volume + 128) >> 8; + *volp++ = av_clip_int16(v); + } + break; + } + case AV_SAMPLE_FMT_S32: + { + int32_t *volp = samples; + for (i = 0; i < (decoded_data_size / sizeof(*volp)); i++) { + int64_t v = (((int64_t)*volp * audio_volume + 128) >> 8); + *volp++ = av_clipl_int32(v); + } + break; + } + case AV_SAMPLE_FMT_FLT: + { + float *volp = samples; + float scale = audio_volume / 256.f; + for (i = 0; i < (decoded_data_size / sizeof(*volp)); i++) { + *volp++ *= scale; + } + break; + } + case AV_SAMPLE_FMT_DBL: + { + double *volp = samples; + double scale = audio_volume / 256.; + for (i = 0; i < (decoded_data_size / sizeof(*volp)); i++) { + *volp++ *= scale; + } + break; + } + default: + av_log(NULL, AV_LOG_FATAL, + "Audio volume adjustment on sample format %s is not supported.\n", + av_get_sample_fmt_name(ist->st->codec->sample_fmt)); + exit_program(1); + } + } + + rate_emu_sleep(ist); + + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = &output_streams[i]; + + if (!check_output_constraints(ist, ost) || !ost->encoding_needed) + continue; + do_audio_out(output_files[ost->file_index].ctx, ost, ist, decoded_frame); + } + + return ret; +} + +static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_t *pkt_pts) +{ + AVFrame *decoded_frame, *filtered_frame = NULL; + void *buffer_to_free = NULL; + int i, ret = 0; + float quality; +#if CONFIG_AVFILTER + int frame_available = 1; +#endif + + if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame())) + return AVERROR(ENOMEM); + else + avcodec_get_frame_defaults(ist->decoded_frame); + decoded_frame = ist->decoded_frame; + pkt->pts = *pkt_pts; + pkt->dts = ist->pts; + *pkt_pts = AV_NOPTS_VALUE; + + ret = avcodec_decode_video2(ist->st->codec, + decoded_frame, got_output, pkt); + if (ret < 0) + return ret; + + quality = same_quant ? decoded_frame->quality : 0; + if (!*got_output) { + /* no picture yet */ + return ret; + } + ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts, + decoded_frame->pkt_dts); + if (pkt->duration) + ist->next_pts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q); + else if (ist->st->codec->time_base.num != 0) { + int ticks = ist->st->parser ? ist->st->parser->repeat_pict + 1 : + ist->st->codec->ticks_per_frame; + ist->next_pts += ((int64_t)AV_TIME_BASE * + ist->st->codec->time_base.num * ticks) / + ist->st->codec->time_base.den; + } + pkt->size = 0; + pre_process_video_frame(ist, (AVPicture *)decoded_frame, &buffer_to_free); + + rate_emu_sleep(ist); + + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = &output_streams[i]; + int frame_size, resample_changed; + + if (!check_output_constraints(ist, ost) || !ost->encoding_needed) + continue; + +#if CONFIG_AVFILTER + resample_changed = ost->resample_width != decoded_frame->width || + ost->resample_height != decoded_frame->height || + ost->resample_pix_fmt != decoded_frame->format; + if (resample_changed) { + av_log(NULL, AV_LOG_INFO, + "Input stream #%d:%d frame changed from size:%dx%d fmt:%s to size:%dx%d fmt:%s\n", + ist->file_index, ist->st->index, + ost->resample_width, ost->resample_height, av_get_pix_fmt_name(ost->resample_pix_fmt), + decoded_frame->width, decoded_frame->height, av_get_pix_fmt_name(decoded_frame->format)); + + avfilter_graph_free(&ost->graph); + if (configure_video_filters(ist, ost)) { + av_log(NULL, AV_LOG_FATAL, "Error reinitializing filters!\n"); + exit_program(1); + } + + ost->resample_width = decoded_frame->width; + ost->resample_height = decoded_frame->height; + ost->resample_pix_fmt = decoded_frame->format; + } + + if (ist->st->sample_aspect_ratio.num) + decoded_frame->sample_aspect_ratio = ist->st->sample_aspect_ratio; + if (ist->st->codec->codec->capabilities & CODEC_CAP_DR1) { + FrameBuffer *buf = decoded_frame->opaque; + AVFilterBufferRef *fb = avfilter_get_video_buffer_ref_from_arrays( + decoded_frame->data, decoded_frame->linesize, + AV_PERM_READ | AV_PERM_PRESERVE, + ist->st->codec->width, ist->st->codec->height, + ist->st->codec->pix_fmt); + + avfilter_copy_frame_props(fb, decoded_frame); + fb->pts = ist->pts; + fb->buf->priv = buf; + fb->buf->free = filter_release_buffer; + + buf->refcount++; + av_buffersrc_buffer(ost->input_video_filter, fb); + } else + av_vsrc_buffer_add_frame(ost->input_video_filter, decoded_frame, + ist->pts, decoded_frame->sample_aspect_ratio); + + if (!ist->filtered_frame && !(ist->filtered_frame = avcodec_alloc_frame())) { + av_free(buffer_to_free); + return AVERROR(ENOMEM); + } else + avcodec_get_frame_defaults(ist->filtered_frame); + filtered_frame = ist->filtered_frame; + + frame_available = avfilter_poll_frame(ost->output_video_filter->inputs[0]); + while (frame_available) { + AVRational ist_pts_tb; + if (ost->output_video_filter) + get_filtered_video_frame(ost->output_video_filter, filtered_frame, &ost->picref, &ist_pts_tb); + if (ost->picref) + ist->pts = av_rescale_q(ost->picref->pts, ist_pts_tb, AV_TIME_BASE_Q); + if (ost->picref->video && !ost->frame_aspect_ratio) + ost->st->codec->sample_aspect_ratio = ost->picref->video->pixel_aspect; +#else + filtered_frame = decoded_frame; +#endif + + do_video_out(output_files[ost->file_index].ctx, ost, ist, filtered_frame, &frame_size, + same_quant ? quality : ost->st->codec->global_quality); + if (vstats_filename && frame_size) + do_video_stats(output_files[ost->file_index].ctx, ost, frame_size); +#if CONFIG_AVFILTER + frame_available = ost->output_video_filter && avfilter_poll_frame(ost->output_video_filter->inputs[0]); + if (ost->picref) + avfilter_unref_buffer(ost->picref); + } +#endif + } + + av_free(buffer_to_free); + return ret; +} + +static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output) +{ + AVSubtitle subtitle; + int i, ret = avcodec_decode_subtitle2(ist->st->codec, + &subtitle, got_output, pkt); + if (ret < 0) + return ret; + if (!*got_output) + return ret; + + rate_emu_sleep(ist); + + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = &output_streams[i]; + + if (!check_output_constraints(ist, ost) || !ost->encoding_needed) + continue; + + do_subtitle_out(output_files[ost->file_index].ctx, ost, ist, &subtitle, pkt->pts); + } + + avsubtitle_free(&subtitle); + return ret; +} + +/* pkt = NULL means EOF (needed to flush decoder buffers) */ +static int output_packet(InputStream *ist, + OutputStream *ost_table, int nb_ostreams, + const AVPacket *pkt) +{ + int i; + int got_output; + int64_t pkt_pts = AV_NOPTS_VALUE; + AVPacket avpkt; + + if (ist->next_pts == AV_NOPTS_VALUE) + ist->next_pts = ist->pts; + + if (pkt == NULL) { + /* EOF handling */ + av_init_packet(&avpkt); + avpkt.data = NULL; + avpkt.size = 0; + goto handle_eof; + } else { + avpkt = *pkt; + } + + if (pkt->dts != AV_NOPTS_VALUE) + ist->next_pts = ist->pts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q); + if (pkt->pts != AV_NOPTS_VALUE) + pkt_pts = av_rescale_q(pkt->pts, ist->st->time_base, AV_TIME_BASE_Q); + + // while we have more to decode or while the decoder did output something on EOF + while (ist->decoding_needed && (avpkt.size > 0 || (!pkt && got_output))) { + int ret = 0; + handle_eof: + + ist->pts = ist->next_pts; + + if (avpkt.size && avpkt.size != pkt->size) { + av_log(NULL, ist->showed_multi_packet_warning ? AV_LOG_VERBOSE : AV_LOG_WARNING, + "Multiple frames in a packet from stream %d\n", pkt->stream_index); + ist->showed_multi_packet_warning = 1; + } + + switch (ist->st->codec->codec_type) { + case AVMEDIA_TYPE_AUDIO: + ret = transcode_audio (ist, &avpkt, &got_output); + break; + case AVMEDIA_TYPE_VIDEO: + ret = transcode_video (ist, &avpkt, &got_output, &pkt_pts); + break; + case AVMEDIA_TYPE_SUBTITLE: + ret = transcode_subtitles(ist, &avpkt, &got_output); + break; + default: + return -1; + } + + if (ret < 0) + return ret; + // touch data and size only if not EOF + if (pkt) { + avpkt.data += ret; + avpkt.size -= ret; + } + if (!got_output) { + continue; + } + } + + /* handle stream copy */ + if (!ist->decoding_needed) { + rate_emu_sleep(ist); + ist->pts = ist->next_pts; + switch (ist->st->codec->codec_type) { + case AVMEDIA_TYPE_AUDIO: + ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) / + ist->st->codec->sample_rate; + break; + case AVMEDIA_TYPE_VIDEO: + if (ist->st->codec->time_base.num != 0) { + int ticks = ist->st->parser ? ist->st->parser->repeat_pict + 1 : ist->st->codec->ticks_per_frame; + ist->next_pts += ((int64_t)AV_TIME_BASE * + ist->st->codec->time_base.num * ticks) / + ist->st->codec->time_base.den; + } + break; + } + } + for (i = 0; pkt && i < nb_ostreams; i++) { + OutputStream *ost = &ost_table[i]; + + if (!check_output_constraints(ist, ost) || ost->encoding_needed) + continue; + + do_streamcopy(ist, ost, pkt); + } + + return 0; +} + +static void print_sdp(OutputFile *output_files, int n) +{ + char sdp[2048]; + int i; + AVFormatContext **avc = av_malloc(sizeof(*avc) * n); + + if (!avc) + exit_program(1); + for (i = 0; i < n; i++) + avc[i] = output_files[i].ctx; + + av_sdp_create(avc, n, sdp, sizeof(sdp)); + printf("SDP:\n%s\n", sdp); + fflush(stdout); + av_freep(&avc); +} + +static int init_input_stream(int ist_index, OutputStream *output_streams, int nb_output_streams, + char *error, int error_len) +{ + int i; + InputStream *ist = &input_streams[ist_index]; + if (ist->decoding_needed) { + AVCodec *codec = ist->dec; + if (!codec) { + snprintf(error, error_len, "Decoder (codec id %d) not found for input stream #%d:%d", + ist->st->codec->codec_id, ist->file_index, ist->st->index); + return AVERROR(EINVAL); + } + + /* update requested sample format for the decoder based on the + corresponding encoder sample format */ + for (i = 0; i < nb_output_streams; i++) { + OutputStream *ost = &output_streams[i]; + if (ost->source_index == ist_index) { + update_sample_fmt(ist->st->codec, codec, ost->st->codec); + break; + } + } + + if (codec->type == AVMEDIA_TYPE_VIDEO && codec->capabilities & CODEC_CAP_DR1) { + ist->st->codec->get_buffer = codec_get_buffer; + ist->st->codec->release_buffer = codec_release_buffer; + ist->st->codec->opaque = ist; + } + + if (avcodec_open2(ist->st->codec, codec, &ist->opts) < 0) { + snprintf(error, error_len, "Error while opening decoder for input stream #%d:%d", + ist->file_index, ist->st->index); + return AVERROR(EINVAL); + } + assert_codec_experimental(ist->st->codec, 0); + assert_avoptions(ist->opts); + } + + ist->pts = ist->st->avg_frame_rate.num ? - ist->st->codec->has_b_frames * AV_TIME_BASE / av_q2d(ist->st->avg_frame_rate) : 0; + ist->next_pts = AV_NOPTS_VALUE; + init_pts_correction(&ist->pts_ctx); + ist->is_start = 1; + + return 0; +} + +static int transcode_init(OutputFile *output_files, + int nb_output_files, + InputFile *input_files, + int nb_input_files) +{ + int ret = 0, i, j, k; + AVFormatContext *oc; + AVCodecContext *codec, *icodec; + OutputStream *ost; + InputStream *ist; + char error[1024]; + int want_sdp = 1; + + /* init framerate emulation */ + for (i = 0; i < nb_input_files; i++) { + InputFile *ifile = &input_files[i]; + if (ifile->rate_emu) + for (j = 0; j < ifile->nb_streams; j++) + input_streams[j + ifile->ist_index].start = av_gettime(); + } + + /* output stream init */ + for (i = 0; i < nb_output_files; i++) { + oc = output_files[i].ctx; + if (!oc->nb_streams && !(oc->oformat->flags & AVFMT_NOSTREAMS)) { + av_dump_format(oc, i, oc->filename, 1); + av_log(NULL, AV_LOG_ERROR, "Output file #%d does not contain any stream\n", i); + return AVERROR(EINVAL); + } + } + + /* for each output stream, we compute the right encoding parameters */ + for (i = 0; i < nb_output_streams; i++) { + ost = &output_streams[i]; + oc = output_files[ost->file_index].ctx; + ist = &input_streams[ost->source_index]; + + if (ost->attachment_filename) + continue; + + codec = ost->st->codec; + icodec = ist->st->codec; + + ost->st->disposition = ist->st->disposition; + codec->bits_per_raw_sample = icodec->bits_per_raw_sample; + codec->chroma_sample_location = icodec->chroma_sample_location; + + if (ost->stream_copy) { + uint64_t extra_size = (uint64_t)icodec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE; + + if (extra_size > INT_MAX) { + return AVERROR(EINVAL); + } + + /* if stream_copy is selected, no need to decode or encode */ + codec->codec_id = icodec->codec_id; + codec->codec_type = icodec->codec_type; + + if (!codec->codec_tag) { + if (!oc->oformat->codec_tag || + av_codec_get_id (oc->oformat->codec_tag, icodec->codec_tag) == codec->codec_id || + av_codec_get_tag(oc->oformat->codec_tag, icodec->codec_id) <= 0) + codec->codec_tag = icodec->codec_tag; + } + + codec->bit_rate = icodec->bit_rate; + codec->rc_max_rate = icodec->rc_max_rate; + codec->rc_buffer_size = icodec->rc_buffer_size; + codec->field_order = icodec->field_order; + codec->extradata = av_mallocz(extra_size); + if (!codec->extradata) { + return AVERROR(ENOMEM); + } + memcpy(codec->extradata, icodec->extradata, icodec->extradata_size); + codec->extradata_size = icodec->extradata_size; + if (!copy_tb) { + codec->time_base = icodec->time_base; + codec->time_base.num *= icodec->ticks_per_frame; + av_reduce(&codec->time_base.num, &codec->time_base.den, + codec->time_base.num, codec->time_base.den, INT_MAX); + } else + codec->time_base = ist->st->time_base; + + switch (codec->codec_type) { + case AVMEDIA_TYPE_AUDIO: + if (audio_volume != 256) { + av_log(NULL, AV_LOG_FATAL, "-acodec copy and -vol are incompatible (frames are not decoded)\n"); + exit_program(1); + } + codec->channel_layout = icodec->channel_layout; + codec->sample_rate = icodec->sample_rate; + codec->channels = icodec->channels; + codec->frame_size = icodec->frame_size; + codec->audio_service_type = icodec->audio_service_type; + codec->block_align = icodec->block_align; + break; + case AVMEDIA_TYPE_VIDEO: + codec->pix_fmt = icodec->pix_fmt; + codec->width = icodec->width; + codec->height = icodec->height; + codec->has_b_frames = icodec->has_b_frames; + if (!codec->sample_aspect_ratio.num) { + codec->sample_aspect_ratio = + ost->st->sample_aspect_ratio = + ist->st->sample_aspect_ratio.num ? ist->st->sample_aspect_ratio : + ist->st->codec->sample_aspect_ratio.num ? + ist->st->codec->sample_aspect_ratio : (AVRational){0, 1}; + } + break; + case AVMEDIA_TYPE_SUBTITLE: + codec->width = icodec->width; + codec->height = icodec->height; + break; + case AVMEDIA_TYPE_DATA: + case AVMEDIA_TYPE_ATTACHMENT: + break; + default: + abort(); + } + } else { + if (!ost->enc) + ost->enc = avcodec_find_encoder(ost->st->codec->codec_id); + + ist->decoding_needed = 1; + ost->encoding_needed = 1; + + switch (codec->codec_type) { + case AVMEDIA_TYPE_AUDIO: + ost->fifo = av_fifo_alloc(1024); + if (!ost->fifo) { + return AVERROR(ENOMEM); + } + ost->reformat_pair = MAKE_SFMT_PAIR(AV_SAMPLE_FMT_NONE,AV_SAMPLE_FMT_NONE); + + if (!codec->sample_rate) + codec->sample_rate = icodec->sample_rate; + choose_sample_rate(ost->st, ost->enc); + codec->time_base = (AVRational){ 1, codec->sample_rate }; + + if (codec->sample_fmt == AV_SAMPLE_FMT_NONE) + codec->sample_fmt = icodec->sample_fmt; + choose_sample_fmt(ost->st, ost->enc); + + if (!codec->channels) + codec->channels = icodec->channels; + codec->channel_layout = icodec->channel_layout; + if (av_get_channel_layout_nb_channels(codec->channel_layout) != codec->channels) + codec->channel_layout = 0; + + ost->audio_resample = codec-> sample_rate != icodec->sample_rate || audio_sync_method > 1; + icodec->request_channels = codec-> channels; + ost->resample_sample_fmt = icodec->sample_fmt; + ost->resample_sample_rate = icodec->sample_rate; + ost->resample_channels = icodec->channels; + break; + case AVMEDIA_TYPE_VIDEO: + if (codec->pix_fmt == PIX_FMT_NONE) + codec->pix_fmt = icodec->pix_fmt; + choose_pixel_fmt(ost->st, ost->enc); + + if (ost->st->codec->pix_fmt == PIX_FMT_NONE) { + av_log(NULL, AV_LOG_FATAL, "Video pixel format is unknown, stream cannot be encoded\n"); + exit_program(1); + } + + if (!codec->width || !codec->height) { + codec->width = icodec->width; + codec->height = icodec->height; + } + + ost->video_resample = codec->width != icodec->width || + codec->height != icodec->height || + codec->pix_fmt != icodec->pix_fmt; + if (ost->video_resample) { +#if !CONFIG_AVFILTER + avcodec_get_frame_defaults(&ost->pict_tmp); + if (avpicture_alloc((AVPicture*)&ost->pict_tmp, codec->pix_fmt, + codec->width, codec->height)) { + av_log(NULL, AV_LOG_FATAL, "Cannot allocate temp picture, check pix fmt\n"); + exit_program(1); + } + ost->img_resample_ctx = sws_getContext( + icodec->width, + icodec->height, + icodec->pix_fmt, + codec->width, + codec->height, + codec->pix_fmt, + ost->sws_flags, NULL, NULL, NULL); + if (ost->img_resample_ctx == NULL) { + av_log(NULL, AV_LOG_FATAL, "Cannot get resampling context\n"); + exit_program(1); + } +#endif + codec->bits_per_raw_sample = 0; + } + + ost->resample_height = icodec->height; + ost->resample_width = icodec->width; + ost->resample_pix_fmt = icodec->pix_fmt; + + if (!ost->frame_rate.num) + ost->frame_rate = ist->st->r_frame_rate.num ? ist->st->r_frame_rate : (AVRational) { 25, 1 }; + if (ost->enc && ost->enc->supported_framerates && !ost->force_fps) { + int idx = av_find_nearest_q_idx(ost->frame_rate, ost->enc->supported_framerates); + ost->frame_rate = ost->enc->supported_framerates[idx]; + } + codec->time_base = (AVRational){ost->frame_rate.den, ost->frame_rate.num}; + +#if CONFIG_AVFILTER + if (configure_video_filters(ist, ost)) { + av_log(NULL, AV_LOG_FATAL, "Error opening filters!\n"); + exit(1); + } +#endif + break; + case AVMEDIA_TYPE_SUBTITLE: + break; + default: + abort(); + break; + } + /* two pass mode */ + if ((codec->flags & (CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2))) { + char logfilename[1024]; + FILE *f; + + snprintf(logfilename, sizeof(logfilename), "%s-%d.log", + pass_logfilename_prefix ? pass_logfilename_prefix : DEFAULT_PASS_LOGFILENAME_PREFIX, + i); + if (codec->flags & CODEC_FLAG_PASS1) { + f = fopen(logfilename, "wb"); + if (!f) { + av_log(NULL, AV_LOG_FATAL, "Cannot write log file '%s' for pass-1 encoding: %s\n", + logfilename, strerror(errno)); + exit_program(1); + } + ost->logfile = f; + } else { + char *logbuffer; + size_t logbuffer_size; + if (cmdutils_read_file(logfilename, &logbuffer, &logbuffer_size) < 0) { + av_log(NULL, AV_LOG_FATAL, "Error reading log file '%s' for pass-2 encoding\n", + logfilename); + exit_program(1); + } + codec->stats_in = logbuffer; + } + } + } + if (codec->codec_type == AVMEDIA_TYPE_VIDEO) { + int size = codec->width * codec->height; + bit_buffer_size = FFMAX(bit_buffer_size, 6 * size + 200); + } + } + + if (!bit_buffer) + bit_buffer = av_malloc(bit_buffer_size); + if (!bit_buffer) { + av_log(NULL, AV_LOG_ERROR, "Cannot allocate %d bytes output buffer\n", + bit_buffer_size); + return AVERROR(ENOMEM); + } + + /* open each encoder */ + for (i = 0; i < nb_output_streams; i++) { + ost = &output_streams[i]; + if (ost->encoding_needed) { + AVCodec *codec = ost->enc; + AVCodecContext *dec = input_streams[ost->source_index].st->codec; + if (!codec) { + snprintf(error, sizeof(error), "Encoder (codec id %d) not found for output stream #%d:%d", + ost->st->codec->codec_id, ost->file_index, ost->index); + ret = AVERROR(EINVAL); + goto dump_format; + } + if (dec->subtitle_header) { + ost->st->codec->subtitle_header = av_malloc(dec->subtitle_header_size); + if (!ost->st->codec->subtitle_header) { + ret = AVERROR(ENOMEM); + goto dump_format; + } + memcpy(ost->st->codec->subtitle_header, dec->subtitle_header, dec->subtitle_header_size); + ost->st->codec->subtitle_header_size = dec->subtitle_header_size; + } + if (avcodec_open2(ost->st->codec, codec, &ost->opts) < 0) { + snprintf(error, sizeof(error), "Error while opening encoder for output stream #%d:%d - maybe incorrect parameters such as bit_rate, rate, width or height", + ost->file_index, ost->index); + ret = AVERROR(EINVAL); + goto dump_format; + } + assert_codec_experimental(ost->st->codec, 1); + assert_avoptions(ost->opts); + if (ost->st->codec->bit_rate && ost->st->codec->bit_rate < 1000) + av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low." + "It takes bits/s as argument, not kbits/s\n"); + extra_size += ost->st->codec->extradata_size; + + if (ost->st->codec->me_threshold) + input_streams[ost->source_index].st->codec->debug |= FF_DEBUG_MV; + } + } + + /* init input streams */ + for (i = 0; i < nb_input_streams; i++) + if ((ret = init_input_stream(i, output_streams, nb_output_streams, error, sizeof(error))) < 0) + goto dump_format; + + /* discard unused programs */ + for (i = 0; i < nb_input_files; i++) { + InputFile *ifile = &input_files[i]; + for (j = 0; j < ifile->ctx->nb_programs; j++) { + AVProgram *p = ifile->ctx->programs[j]; + int discard = AVDISCARD_ALL; + + for (k = 0; k < p->nb_stream_indexes; k++) + if (!input_streams[ifile->ist_index + p->stream_index[k]].discard) { + discard = AVDISCARD_DEFAULT; + break; + } + p->discard = discard; + } + } + + /* open files and write file headers */ + for (i = 0; i < nb_output_files; i++) { + oc = output_files[i].ctx; + oc->interrupt_callback = int_cb; + if (avformat_write_header(oc, &output_files[i].opts) < 0) { + snprintf(error, sizeof(error), "Could not write header for output file #%d (incorrect codec parameters ?)", i); + ret = AVERROR(EINVAL); + goto dump_format; + } + assert_avoptions(output_files[i].opts); + if (strcmp(oc->oformat->name, "rtp")) { + want_sdp = 0; + } + } + + dump_format: + /* dump the file output parameters - cannot be done before in case + of stream copy */ + for (i = 0; i < nb_output_files; i++) { + av_dump_format(output_files[i].ctx, i, output_files[i].ctx->filename, 1); + } + + /* dump the stream mapping */ + av_log(NULL, AV_LOG_INFO, "Stream mapping:\n"); + for (i = 0; i < nb_output_streams; i++) { + ost = &output_streams[i]; + + if (ost->attachment_filename) { + /* an attached file */ + av_log(NULL, AV_LOG_INFO, " File %s -> Stream #%d:%d\n", + ost->attachment_filename, ost->file_index, ost->index); + continue; + } + av_log(NULL, AV_LOG_INFO, " Stream #%d:%d -> #%d:%d", + input_streams[ost->source_index].file_index, + input_streams[ost->source_index].st->index, + ost->file_index, + ost->index); + if (ost->sync_ist != &input_streams[ost->source_index]) + av_log(NULL, AV_LOG_INFO, " [sync #%d:%d]", + ost->sync_ist->file_index, + ost->sync_ist->st->index); + if (ost->stream_copy) + av_log(NULL, AV_LOG_INFO, " (copy)"); + else + av_log(NULL, AV_LOG_INFO, " (%s -> %s)", input_streams[ost->source_index].dec ? + input_streams[ost->source_index].dec->name : "?", + ost->enc ? ost->enc->name : "?"); + av_log(NULL, AV_LOG_INFO, "\n"); + } + + if (ret) { + av_log(NULL, AV_LOG_ERROR, "%s\n", error); + return ret; + } + + if (want_sdp) { + print_sdp(output_files, nb_output_files); + } + + return 0; +} + +/* + * The following code is the main loop of the file converter + */ +static int transcode(OutputFile *output_files, + int nb_output_files, + InputFile *input_files, + int nb_input_files) +{ + int ret, i; + AVFormatContext *is, *os; + OutputStream *ost; + InputStream *ist; + uint8_t *no_packet; + int no_packet_count = 0; + int64_t timer_start; + + if (!(no_packet = av_mallocz(nb_input_files))) + exit_program(1); + + ret = transcode_init(output_files, nb_output_files, input_files, nb_input_files); + if (ret < 0) + goto fail; + + av_log(NULL, AV_LOG_INFO, "Press ctrl-c to stop encoding\n"); + term_init(); + + timer_start = av_gettime(); + + for (; received_sigterm == 0;) { + int file_index, ist_index; + AVPacket pkt; + int64_t ipts_min; + double opts_min; + + ipts_min = INT64_MAX; + opts_min = 1e100; + + /* select the stream that we must read now by looking at the + smallest output pts */ + file_index = -1; + for (i = 0; i < nb_output_streams; i++) { + OutputFile *of; + int64_t ipts; + double opts; + ost = &output_streams[i]; + of = &output_files[ost->file_index]; + os = output_files[ost->file_index].ctx; + ist = &input_streams[ost->source_index]; + if (ost->is_past_recording_time || no_packet[ist->file_index] || + (os->pb && avio_tell(os->pb) >= of->limit_filesize)) + continue; + opts = ost->st->pts.val * av_q2d(ost->st->time_base); + ipts = ist->pts; + if (!input_files[ist->file_index].eof_reached) { + if (ipts < ipts_min) { + ipts_min = ipts; + if (input_sync) + file_index = ist->file_index; + } + if (opts < opts_min) { + opts_min = opts; + if (!input_sync) file_index = ist->file_index; + } + } + if (ost->frame_number >= ost->max_frames) { + int j; + for (j = 0; j < of->ctx->nb_streams; j++) + output_streams[of->ost_index + j].is_past_recording_time = 1; + continue; + } + } + /* if none, if is finished */ + if (file_index < 0) { + if (no_packet_count) { + no_packet_count = 0; + memset(no_packet, 0, nb_input_files); + usleep(10000); + continue; + } + break; + } + + /* read a frame from it and output it in the fifo */ + is = input_files[file_index].ctx; + ret = av_read_frame(is, &pkt); + if (ret == AVERROR(EAGAIN)) { + no_packet[file_index] = 1; + no_packet_count++; + continue; + } + if (ret < 0) { + input_files[file_index].eof_reached = 1; + if (opt_shortest) + break; + else + continue; + } + + no_packet_count = 0; + memset(no_packet, 0, nb_input_files); + + if (do_pkt_dump) { + av_pkt_dump_log2(NULL, AV_LOG_DEBUG, &pkt, do_hex_dump, + is->streams[pkt.stream_index]); + } + /* the following test is needed in case new streams appear + dynamically in stream : we ignore them */ + if (pkt.stream_index >= input_files[file_index].nb_streams) + goto discard_packet; + ist_index = input_files[file_index].ist_index + pkt.stream_index; + ist = &input_streams[ist_index]; + if (ist->discard) + goto discard_packet; + + if (pkt.dts != AV_NOPTS_VALUE) + pkt.dts += av_rescale_q(input_files[ist->file_index].ts_offset, AV_TIME_BASE_Q, ist->st->time_base); + if (pkt.pts != AV_NOPTS_VALUE) + pkt.pts += av_rescale_q(input_files[ist->file_index].ts_offset, AV_TIME_BASE_Q, ist->st->time_base); + + if (pkt.pts != AV_NOPTS_VALUE) + pkt.pts *= ist->ts_scale; + if (pkt.dts != AV_NOPTS_VALUE) + pkt.dts *= ist->ts_scale; + + //fprintf(stderr, "next:%"PRId64" dts:%"PRId64" off:%"PRId64" %d\n", + // ist->next_pts, + // pkt.dts, input_files[ist->file_index].ts_offset, + // ist->st->codec->codec_type); + if (pkt.dts != AV_NOPTS_VALUE && ist->next_pts != AV_NOPTS_VALUE + && (is->iformat->flags & AVFMT_TS_DISCONT)) { + int64_t pkt_dts = av_rescale_q(pkt.dts, ist->st->time_base, AV_TIME_BASE_Q); + int64_t delta = pkt_dts - ist->next_pts; + if ((FFABS(delta) > 1LL * dts_delta_threshold * AV_TIME_BASE || pkt_dts + 1 < ist->pts) && !copy_ts) { + input_files[ist->file_index].ts_offset -= delta; + av_log(NULL, AV_LOG_DEBUG, + "timestamp discontinuity %"PRId64", new offset= %"PRId64"\n", + delta, input_files[ist->file_index].ts_offset); + pkt.dts-= av_rescale_q(delta, AV_TIME_BASE_Q, ist->st->time_base); + if (pkt.pts != AV_NOPTS_VALUE) + pkt.pts-= av_rescale_q(delta, AV_TIME_BASE_Q, ist->st->time_base); + } + } + + // fprintf(stderr,"read #%d.%d size=%d\n", ist->file_index, ist->st->index, pkt.size); + if (output_packet(ist, output_streams, nb_output_streams, &pkt) < 0) { + + av_log(NULL, AV_LOG_ERROR, "Error while decoding stream #%d:%d\n", + ist->file_index, ist->st->index); + if (exit_on_error) + exit_program(1); + av_free_packet(&pkt); + continue; + } + + discard_packet: + av_free_packet(&pkt); + + /* dump report by using the output first video and audio streams */ + print_report(output_files, output_streams, nb_output_streams, 0, timer_start); + } + + /* at the end of stream, we must flush the decoder buffers */ + for (i = 0; i < nb_input_streams; i++) { + ist = &input_streams[i]; + if (ist->decoding_needed) { + output_packet(ist, output_streams, nb_output_streams, NULL); + } + } + flush_encoders(output_streams, nb_output_streams); + + term_exit(); + + /* write the trailer if needed and close file */ + for (i = 0; i < nb_output_files; i++) { + os = output_files[i].ctx; + av_write_trailer(os); + } + + /* dump report by using the first video and audio streams */ + print_report(output_files, output_streams, nb_output_streams, 1, timer_start); + + /* close each encoder */ + for (i = 0; i < nb_output_streams; i++) { + ost = &output_streams[i]; + if (ost->encoding_needed) { + av_freep(&ost->st->codec->stats_in); + avcodec_close(ost->st->codec); + } +#if CONFIG_AVFILTER + avfilter_graph_free(&ost->graph); +#endif + } + + /* close each decoder */ + for (i = 0; i < nb_input_streams; i++) { + ist = &input_streams[i]; + if (ist->decoding_needed) { + avcodec_close(ist->st->codec); + } + } + + /* finished ! */ + ret = 0; + + fail: + av_freep(&bit_buffer); + av_freep(&no_packet); + + if (output_streams) { + for (i = 0; i < nb_output_streams; i++) { + ost = &output_streams[i]; + if (ost) { + if (ost->stream_copy) + av_freep(&ost->st->codec->extradata); + if (ost->logfile) { + fclose(ost->logfile); + ost->logfile = NULL; + } + av_fifo_free(ost->fifo); /* works even if fifo is not + initialized but set to zero */ + av_freep(&ost->st->codec->subtitle_header); + av_free(ost->pict_tmp.data[0]); + av_free(ost->forced_kf_pts); + if (ost->video_resample) + sws_freeContext(ost->img_resample_ctx); + if (ost->resample) + audio_resample_close(ost->resample); + if (ost->reformat_ctx) + av_audio_convert_free(ost->reformat_ctx); + av_dict_free(&ost->opts); + } + } + } + return ret; +} + +static double parse_frame_aspect_ratio(const char *arg) +{ + int x = 0, y = 0; + double ar = 0; + const char *p; + char *end; + + p = strchr(arg, ':'); + if (p) { + x = strtol(arg, &end, 10); + if (end == p) + y = strtol(end + 1, &end, 10); + if (x > 0 && y > 0) + ar = (double)x / (double)y; + } else + ar = strtod(arg, NULL); + + if (!ar) { + av_log(NULL, AV_LOG_FATAL, "Incorrect aspect ratio specification.\n"); + exit_program(1); + } + return ar; +} + +static int opt_audio_codec(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "codec:a", arg, options); +} + +static int opt_video_codec(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "codec:v", arg, options); +} + +static int opt_subtitle_codec(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "codec:s", arg, options); +} + +static int opt_data_codec(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "codec:d", arg, options); +} + +static int opt_map(OptionsContext *o, const char *opt, const char *arg) +{ + StreamMap *m = NULL; + int i, negative = 0, file_idx; + int sync_file_idx = -1, sync_stream_idx; + char *p, *sync; + char *map; + + if (*arg == '-') { + negative = 1; + arg++; + } + map = av_strdup(arg); + + /* parse sync stream first, just pick first matching stream */ + if (sync = strchr(map, ',')) { + *sync = 0; + sync_file_idx = strtol(sync + 1, &sync, 0); + if (sync_file_idx >= nb_input_files || sync_file_idx < 0) { + av_log(NULL, AV_LOG_FATAL, "Invalid sync file index: %d.\n", sync_file_idx); + exit_program(1); + } + if (*sync) + sync++; + for (i = 0; i < input_files[sync_file_idx].nb_streams; i++) + if (check_stream_specifier(input_files[sync_file_idx].ctx, + input_files[sync_file_idx].ctx->streams[i], sync) == 1) { + sync_stream_idx = i; + break; + } + if (i == input_files[sync_file_idx].nb_streams) { + av_log(NULL, AV_LOG_FATAL, "Sync stream specification in map %s does not " + "match any streams.\n", arg); + exit_program(1); + } + } + + + file_idx = strtol(map, &p, 0); + if (file_idx >= nb_input_files || file_idx < 0) { + av_log(NULL, AV_LOG_FATAL, "Invalid input file index: %d.\n", file_idx); + exit_program(1); + } + if (negative) + /* disable some already defined maps */ + for (i = 0; i < o->nb_stream_maps; i++) { + m = &o->stream_maps[i]; + if (file_idx == m->file_index && + check_stream_specifier(input_files[m->file_index].ctx, + input_files[m->file_index].ctx->streams[m->stream_index], + *p == ':' ? p + 1 : p) > 0) + m->disabled = 1; + } + else + for (i = 0; i < input_files[file_idx].nb_streams; i++) { + if (check_stream_specifier(input_files[file_idx].ctx, input_files[file_idx].ctx->streams[i], + *p == ':' ? p + 1 : p) <= 0) + continue; + o->stream_maps = grow_array(o->stream_maps, sizeof(*o->stream_maps), + &o->nb_stream_maps, o->nb_stream_maps + 1); + m = &o->stream_maps[o->nb_stream_maps - 1]; + + m->file_index = file_idx; + m->stream_index = i; + + if (sync_file_idx >= 0) { + m->sync_file_index = sync_file_idx; + m->sync_stream_index = sync_stream_idx; + } else { + m->sync_file_index = file_idx; + m->sync_stream_index = i; + } + } + + if (!m) { + av_log(NULL, AV_LOG_FATAL, "Stream map '%s' matches no streams.\n", arg); + exit_program(1); + } + + av_freep(&map); + return 0; +} + +static int opt_attach(OptionsContext *o, const char *opt, const char *arg) +{ + o->attachments = grow_array(o->attachments, sizeof(*o->attachments), + &o->nb_attachments, o->nb_attachments + 1); + o->attachments[o->nb_attachments - 1] = arg; + return 0; +} + +/** + * Parse a metadata specifier in arg. + * @param type metadata type is written here -- g(lobal)/s(tream)/c(hapter)/p(rogram) + * @param index for type c/p, chapter/program index is written here + * @param stream_spec for type s, the stream specifier is written here + */ +static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec) +{ + if (*arg) { + *type = *arg; + switch (*arg) { + case 'g': + break; + case 's': + if (*(++arg) && *arg != ':') { + av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg); + exit_program(1); + } + *stream_spec = *arg == ':' ? arg + 1 : ""; + break; + case 'c': + case 'p': + if (*(++arg) == ':') + *index = strtol(++arg, NULL, 0); + break; + default: + av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg); + exit_program(1); + } + } else + *type = 'g'; +} + +static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o) +{ + AVDictionary **meta_in = NULL; + AVDictionary **meta_out; + int i, ret = 0; + char type_in, type_out; + const char *istream_spec = NULL, *ostream_spec = NULL; + int idx_in = 0, idx_out = 0; + + parse_meta_type(inspec, &type_in, &idx_in, &istream_spec); + parse_meta_type(outspec, &type_out, &idx_out, &ostream_spec); + + if (type_in == 'g' || type_out == 'g') + o->metadata_global_manual = 1; + if (type_in == 's' || type_out == 's') + o->metadata_streams_manual = 1; + if (type_in == 'c' || type_out == 'c') + o->metadata_chapters_manual = 1; + +#define METADATA_CHECK_INDEX(index, nb_elems, desc)\ + if ((index) < 0 || (index) >= (nb_elems)) {\ + av_log(NULL, AV_LOG_FATAL, "Invalid %s index %d while processing metadata maps.\n",\ + (desc), (index));\ + exit_program(1);\ + } + +#define SET_DICT(type, meta, context, index)\ + switch (type) {\ + case 'g':\ + meta = &context->metadata;\ + break;\ + case 'c':\ + METADATA_CHECK_INDEX(index, context->nb_chapters, "chapter")\ + meta = &context->chapters[index]->metadata;\ + break;\ + case 'p':\ + METADATA_CHECK_INDEX(index, context->nb_programs, "program")\ + meta = &context->programs[index]->metadata;\ + break;\ + }\ + + SET_DICT(type_in, meta_in, ic, idx_in); + SET_DICT(type_out, meta_out, oc, idx_out); + + /* for input streams choose first matching stream */ + if (type_in == 's') { + for (i = 0; i < ic->nb_streams; i++) { + if ((ret = check_stream_specifier(ic, ic->streams[i], istream_spec)) > 0) { + meta_in = &ic->streams[i]->metadata; + break; + } else if (ret < 0) + exit_program(1); + } + if (!meta_in) { + av_log(NULL, AV_LOG_FATAL, "Stream specifier %s does not match any streams.\n", istream_spec); + exit_program(1); + } + } + + if (type_out == 's') { + for (i = 0; i < oc->nb_streams; i++) { + if ((ret = check_stream_specifier(oc, oc->streams[i], ostream_spec)) > 0) { + meta_out = &oc->streams[i]->metadata; + av_dict_copy(meta_out, *meta_in, AV_DICT_DONT_OVERWRITE); + } else if (ret < 0) + exit_program(1); + } + } else + av_dict_copy(meta_out, *meta_in, AV_DICT_DONT_OVERWRITE); + + return 0; +} + +static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder) +{ + const char *codec_string = encoder ? "encoder" : "decoder"; + AVCodec *codec; + + codec = encoder ? + avcodec_find_encoder_by_name(name) : + avcodec_find_decoder_by_name(name); + if (!codec) { + av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name); + exit_program(1); + } + if (codec->type != type) { + av_log(NULL, AV_LOG_FATAL, "Invalid %s type '%s'\n", codec_string, name); + exit_program(1); + } + return codec; +} + +static AVCodec *choose_decoder(OptionsContext *o, AVFormatContext *s, AVStream *st) +{ + char *codec_name = NULL; + + MATCH_PER_STREAM_OPT(codec_names, str, codec_name, s, st); + if (codec_name) { + AVCodec *codec = find_codec_or_die(codec_name, st->codec->codec_type, 0); + st->codec->codec_id = codec->id; + return codec; + } else + return avcodec_find_decoder(st->codec->codec_id); +} + +/** + * Add all the streams from the given input file to the global + * list of input streams. + */ +static void add_input_streams(OptionsContext *o, AVFormatContext *ic) +{ + int i; + + for (i = 0; i < ic->nb_streams; i++) { + AVStream *st = ic->streams[i]; + AVCodecContext *dec = st->codec; + InputStream *ist; + + input_streams = grow_array(input_streams, sizeof(*input_streams), &nb_input_streams, nb_input_streams + 1); + ist = &input_streams[nb_input_streams - 1]; + ist->st = st; + ist->file_index = nb_input_files; + ist->discard = 1; + ist->opts = filter_codec_opts(codec_opts, ist->st->codec->codec_id, ic, st); + + ist->ts_scale = 1.0; + MATCH_PER_STREAM_OPT(ts_scale, dbl, ist->ts_scale, ic, st); + + ist->dec = choose_decoder(o, ic, st); + + switch (dec->codec_type) { + case AVMEDIA_TYPE_AUDIO: + if (o->audio_disable) + st->discard = AVDISCARD_ALL; + break; + case AVMEDIA_TYPE_VIDEO: + if (dec->lowres) { + dec->flags |= CODEC_FLAG_EMU_EDGE; + dec->height >>= dec->lowres; + dec->width >>= dec->lowres; + } + + if (o->video_disable) + st->discard = AVDISCARD_ALL; + else if (video_discard) + st->discard = video_discard; + break; + case AVMEDIA_TYPE_DATA: + break; + case AVMEDIA_TYPE_SUBTITLE: + if (o->subtitle_disable) + st->discard = AVDISCARD_ALL; + break; + case AVMEDIA_TYPE_ATTACHMENT: + case AVMEDIA_TYPE_UNKNOWN: + break; + default: + abort(); + } + } +} + +static void assert_file_overwrite(const char *filename) +{ + if (!file_overwrite && + (strchr(filename, ':') == NULL || filename[1] == ':' || + av_strstart(filename, "file:", NULL))) { + if (avio_check(filename, 0) == 0) { + if (!using_stdin) { + fprintf(stderr,"File '%s' already exists. Overwrite ? [y/N] ", filename); + fflush(stderr); + if (!read_yesno()) { + fprintf(stderr, "Not overwriting - exiting\n"); + exit_program(1); + } + } + else { + fprintf(stderr,"File '%s' already exists. Exiting.\n", filename); + exit_program(1); + } + } + } +} + +static void dump_attachment(AVStream *st, const char *filename) +{ + int ret; + AVIOContext *out = NULL; + AVDictionaryEntry *e; + + if (!st->codec->extradata_size) { + av_log(NULL, AV_LOG_WARNING, "No extradata to dump in stream #%d:%d.\n", + nb_input_files - 1, st->index); + return; + } + if (!*filename && (e = av_dict_get(st->metadata, "filename", NULL, 0))) + filename = e->value; + if (!*filename) { + av_log(NULL, AV_LOG_FATAL, "No filename specified and no 'filename' tag" + "in stream #%d:%d.\n", nb_input_files - 1, st->index); + exit_program(1); + } + + assert_file_overwrite(filename); + + if ((ret = avio_open2(&out, filename, AVIO_FLAG_WRITE, &int_cb, NULL)) < 0) { + av_log(NULL, AV_LOG_FATAL, "Could not open file %s for writing.\n", + filename); + exit_program(1); + } + + avio_write(out, st->codec->extradata, st->codec->extradata_size); + avio_flush(out); + avio_close(out); +} + +static int opt_input_file(OptionsContext *o, const char *opt, const char *filename) +{ + AVFormatContext *ic; + AVInputFormat *file_iformat = NULL; + int err, i, ret; + int64_t timestamp; + uint8_t buf[128]; + AVDictionary **opts; + int orig_nb_streams; // number of streams before avformat_find_stream_info + + if (o->format) { + if (!(file_iformat = av_find_input_format(o->format))) { + av_log(NULL, AV_LOG_FATAL, "Unknown input format: '%s'\n", o->format); + exit_program(1); + } + } + + if (!strcmp(filename, "-")) + filename = "pipe:"; + + using_stdin |= !strncmp(filename, "pipe:", 5) || + !strcmp(filename, "/dev/stdin"); + + /* get default parameters from command line */ + ic = avformat_alloc_context(); + if (!ic) { + print_error(filename, AVERROR(ENOMEM)); + exit_program(1); + } + if (o->nb_audio_sample_rate) { + snprintf(buf, sizeof(buf), "%d", o->audio_sample_rate[o->nb_audio_sample_rate - 1].u.i); + av_dict_set(&format_opts, "sample_rate", buf, 0); + } + if (o->nb_audio_channels) { + snprintf(buf, sizeof(buf), "%d", o->audio_channels[o->nb_audio_channels - 1].u.i); + av_dict_set(&format_opts, "channels", buf, 0); + } + if (o->nb_frame_rates) { + av_dict_set(&format_opts, "framerate", o->frame_rates[o->nb_frame_rates - 1].u.str, 0); + } + if (o->nb_frame_sizes) { + av_dict_set(&format_opts, "video_size", o->frame_sizes[o->nb_frame_sizes - 1].u.str, 0); + } + if (o->nb_frame_pix_fmts) + av_dict_set(&format_opts, "pixel_format", o->frame_pix_fmts[o->nb_frame_pix_fmts - 1].u.str, 0); + + ic->flags |= AVFMT_FLAG_NONBLOCK; + ic->interrupt_callback = int_cb; + + /* open the input file with generic libav function */ + err = avformat_open_input(&ic, filename, file_iformat, &format_opts); + if (err < 0) { + print_error(filename, err); + exit_program(1); + } + assert_avoptions(format_opts); + + /* apply forced codec ids */ + for (i = 0; i < ic->nb_streams; i++) + choose_decoder(o, ic, ic->streams[i]); + + /* Set AVCodecContext options for avformat_find_stream_info */ + opts = setup_find_stream_info_opts(ic, codec_opts); + orig_nb_streams = ic->nb_streams; + + /* If not enough info to get the stream parameters, we decode the + first frames to get it. (used in mpeg case for example) */ + ret = avformat_find_stream_info(ic, opts); + if (ret < 0) { + av_log(NULL, AV_LOG_FATAL, "%s: could not find codec parameters\n", filename); + avformat_close_input(&ic); + exit_program(1); + } + + timestamp = o->start_time; + /* add the stream start time */ + if (ic->start_time != AV_NOPTS_VALUE) + timestamp += ic->start_time; + + /* if seeking requested, we execute it */ + if (o->start_time != 0) { + ret = av_seek_frame(ic, -1, timestamp, AVSEEK_FLAG_BACKWARD); + if (ret < 0) { + av_log(NULL, AV_LOG_WARNING, "%s: could not seek to position %0.3f\n", + filename, (double)timestamp / AV_TIME_BASE); + } + } + + /* update the current parameters so that they match the one of the input stream */ + add_input_streams(o, ic); + + /* dump the file content */ + av_dump_format(ic, nb_input_files, filename, 0); + + input_files = grow_array(input_files, sizeof(*input_files), &nb_input_files, nb_input_files + 1); + input_files[nb_input_files - 1].ctx = ic; + input_files[nb_input_files - 1].ist_index = nb_input_streams - ic->nb_streams; + input_files[nb_input_files - 1].ts_offset = o->input_ts_offset - (copy_ts ? 0 : timestamp); + input_files[nb_input_files - 1].nb_streams = ic->nb_streams; + input_files[nb_input_files - 1].rate_emu = o->rate_emu; + + for (i = 0; i < o->nb_dump_attachment; i++) { + int j; + + for (j = 0; j < ic->nb_streams; j++) { + AVStream *st = ic->streams[j]; + + if (check_stream_specifier(ic, st, o->dump_attachment[i].specifier) == 1) + dump_attachment(st, o->dump_attachment[i].u.str); + } + } + + for (i = 0; i < orig_nb_streams; i++) + av_dict_free(&opts[i]); + av_freep(&opts); + + reset_options(o); + return 0; +} + +static void parse_forced_key_frames(char *kf, OutputStream *ost, + AVCodecContext *avctx) +{ + char *p; + int n = 1, i; + int64_t t; + + for (p = kf; *p; p++) + if (*p == ',') + n++; + ost->forced_kf_count = n; + ost->forced_kf_pts = av_malloc(sizeof(*ost->forced_kf_pts) * n); + if (!ost->forced_kf_pts) { + av_log(NULL, AV_LOG_FATAL, "Could not allocate forced key frames array.\n"); + exit_program(1); + } + for (i = 0; i < n; i++) { + p = i ? strchr(p, ',') + 1 : kf; + t = parse_time_or_die("force_key_frames", p, 1); + ost->forced_kf_pts[i] = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base); + } +} + +static uint8_t *get_line(AVIOContext *s) +{ + AVIOContext *line; + uint8_t *buf; + char c; + + if (avio_open_dyn_buf(&line) < 0) { + av_log(NULL, AV_LOG_FATAL, "Could not alloc buffer for reading preset.\n"); + exit_program(1); + } + + while ((c = avio_r8(s)) && c != '\n') + avio_w8(line, c); + avio_w8(line, 0); + avio_close_dyn_buf(line, &buf); + + return buf; +} + +static int get_preset_file_2(const char *preset_name, const char *codec_name, AVIOContext **s) +{ + int i, ret = 1; + char filename[1000]; + const char *base[3] = { getenv("AVCONV_DATADIR"), + getenv("HOME"), + AVCONV_DATADIR, + }; + + for (i = 0; i < FF_ARRAY_ELEMS(base) && ret; i++) { + if (!base[i]) + continue; + if (codec_name) { + snprintf(filename, sizeof(filename), "%s%s/%s-%s.avpreset", base[i], + i != 1 ? "" : "/.avconv", codec_name, preset_name); + ret = avio_open2(s, filename, AVIO_FLAG_READ, &int_cb, NULL); + } + if (ret) { + snprintf(filename, sizeof(filename), "%s%s/%s.avpreset", base[i], + i != 1 ? "" : "/.avconv", preset_name); + ret = avio_open2(s, filename, AVIO_FLAG_READ, &int_cb, NULL); + } + } + return ret; +} + +static void choose_encoder(OptionsContext *o, AVFormatContext *s, OutputStream *ost) +{ + char *codec_name = NULL; + + MATCH_PER_STREAM_OPT(codec_names, str, codec_name, s, ost->st); + if (!codec_name) { + ost->st->codec->codec_id = av_guess_codec(s->oformat, NULL, s->filename, + NULL, ost->st->codec->codec_type); + ost->enc = avcodec_find_encoder(ost->st->codec->codec_id); + } else if (!strcmp(codec_name, "copy")) + ost->stream_copy = 1; + else { + ost->enc = find_codec_or_die(codec_name, ost->st->codec->codec_type, 1); + ost->st->codec->codec_id = ost->enc->id; + } +} + +static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, enum AVMediaType type) +{ + OutputStream *ost; + AVStream *st = avformat_new_stream(oc, NULL); + int idx = oc->nb_streams - 1, ret = 0; + char *bsf = NULL, *next, *codec_tag = NULL; + AVBitStreamFilterContext *bsfc, *bsfc_prev = NULL; + double qscale = -1; + char *buf = NULL, *arg = NULL, *preset = NULL; + AVIOContext *s = NULL; + + if (!st) { + av_log(NULL, AV_LOG_FATAL, "Could not alloc stream.\n"); + exit_program(1); + } + + if (oc->nb_streams - 1 < o->nb_streamid_map) + st->id = o->streamid_map[oc->nb_streams - 1]; + + output_streams = grow_array(output_streams, sizeof(*output_streams), &nb_output_streams, + nb_output_streams + 1); + ost = &output_streams[nb_output_streams - 1]; + ost->file_index = nb_output_files; + ost->index = idx; + ost->st = st; + st->codec->codec_type = type; + choose_encoder(o, oc, ost); + if (ost->enc) { + ost->opts = filter_codec_opts(codec_opts, ost->enc->id, oc, st); + } + + avcodec_get_context_defaults3(st->codec, ost->enc); + st->codec->codec_type = type; // XXX hack, avcodec_get_context_defaults2() sets type to unknown for stream copy + + MATCH_PER_STREAM_OPT(presets, str, preset, oc, st); + if (preset && (!(ret = get_preset_file_2(preset, ost->enc->name, &s)))) { + do { + buf = get_line(s); + if (!buf[0] || buf[0] == '#') { + av_free(buf); + continue; + } + if (!(arg = strchr(buf, '='))) { + av_log(NULL, AV_LOG_FATAL, "Invalid line found in the preset file.\n"); + exit_program(1); + } + *arg++ = 0; + av_dict_set(&ost->opts, buf, arg, AV_DICT_DONT_OVERWRITE); + av_free(buf); + } while (!s->eof_reached); + avio_close(s); + } + if (ret) { + av_log(NULL, AV_LOG_FATAL, + "Preset %s specified for stream %d:%d, but could not be opened.\n", + preset, ost->file_index, ost->index); + exit_program(1); + } + + ost->max_frames = INT64_MAX; + MATCH_PER_STREAM_OPT(max_frames, i64, ost->max_frames, oc, st); + + MATCH_PER_STREAM_OPT(bitstream_filters, str, bsf, oc, st); + while (bsf) { + if (next = strchr(bsf, ',')) + *next++ = 0; + if (!(bsfc = av_bitstream_filter_init(bsf))) { + av_log(NULL, AV_LOG_FATAL, "Unknown bitstream filter %s\n", bsf); + exit_program(1); + } + if (bsfc_prev) + bsfc_prev->next = bsfc; + else + ost->bitstream_filters = bsfc; + + bsfc_prev = bsfc; + bsf = next; + } + + MATCH_PER_STREAM_OPT(codec_tags, str, codec_tag, oc, st); + if (codec_tag) { + uint32_t tag = strtol(codec_tag, &next, 0); + if (*next) + tag = AV_RL32(codec_tag); + st->codec->codec_tag = tag; + } + + MATCH_PER_STREAM_OPT(qscale, dbl, qscale, oc, st); + if (qscale >= 0 || same_quant) { + st->codec->flags |= CODEC_FLAG_QSCALE; + st->codec->global_quality = FF_QP2LAMBDA * qscale; + } + + if (oc->oformat->flags & AVFMT_GLOBALHEADER) + st->codec->flags |= CODEC_FLAG_GLOBAL_HEADER; + + av_opt_get_int(sws_opts, "sws_flags", 0, &ost->sws_flags); + return ost; +} + +static void parse_matrix_coeffs(uint16_t *dest, const char *str) +{ + int i; + const char *p = str; + for (i = 0;; i++) { + dest[i] = atoi(p); + if (i == 63) + break; + p = strchr(p, ','); + if (!p) { + av_log(NULL, AV_LOG_FATAL, "Syntax error in matrix \"%s\" at coeff %d\n", str, i); + exit_program(1); + } + p++; + } +} + +static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc) +{ + AVStream *st; + OutputStream *ost; + AVCodecContext *video_enc; + + ost = new_output_stream(o, oc, AVMEDIA_TYPE_VIDEO); + st = ost->st; + video_enc = st->codec; + + if (!ost->stream_copy) { + const char *p = NULL; + char *forced_key_frames = NULL, *frame_rate = NULL, *frame_size = NULL; + char *frame_aspect_ratio = NULL, *frame_pix_fmt = NULL; + char *intra_matrix = NULL, *inter_matrix = NULL, *filters = NULL; + int i; + + MATCH_PER_STREAM_OPT(frame_rates, str, frame_rate, oc, st); + if (frame_rate && av_parse_video_rate(&ost->frame_rate, frame_rate) < 0) { + av_log(NULL, AV_LOG_FATAL, "Invalid framerate value: %s\n", frame_rate); + exit_program(1); + } + + MATCH_PER_STREAM_OPT(frame_sizes, str, frame_size, oc, st); + if (frame_size && av_parse_video_size(&video_enc->width, &video_enc->height, frame_size) < 0) { + av_log(NULL, AV_LOG_FATAL, "Invalid frame size: %s.\n", frame_size); + exit_program(1); + } + + MATCH_PER_STREAM_OPT(frame_aspect_ratios, str, frame_aspect_ratio, oc, st); + if (frame_aspect_ratio) + ost->frame_aspect_ratio = parse_frame_aspect_ratio(frame_aspect_ratio); + + MATCH_PER_STREAM_OPT(frame_pix_fmts, str, frame_pix_fmt, oc, st); + if (frame_pix_fmt && (video_enc->pix_fmt = av_get_pix_fmt(frame_pix_fmt)) == PIX_FMT_NONE) { + av_log(NULL, AV_LOG_FATAL, "Unknown pixel format requested: %s.\n", frame_pix_fmt); + exit_program(1); + } + st->sample_aspect_ratio = video_enc->sample_aspect_ratio; + + MATCH_PER_STREAM_OPT(intra_matrices, str, intra_matrix, oc, st); + if (intra_matrix) { + if (!(video_enc->intra_matrix = av_mallocz(sizeof(*video_enc->intra_matrix) * 64))) { + av_log(NULL, AV_LOG_FATAL, "Could not allocate memory for intra matrix.\n"); + exit_program(1); + } + parse_matrix_coeffs(video_enc->intra_matrix, intra_matrix); + } + MATCH_PER_STREAM_OPT(inter_matrices, str, inter_matrix, oc, st); + if (inter_matrix) { + if (!(video_enc->inter_matrix = av_mallocz(sizeof(*video_enc->inter_matrix) * 64))) { + av_log(NULL, AV_LOG_FATAL, "Could not allocate memory for inter matrix.\n"); + exit_program(1); + } + parse_matrix_coeffs(video_enc->inter_matrix, inter_matrix); + } + + MATCH_PER_STREAM_OPT(rc_overrides, str, p, oc, st); + for (i = 0; p; i++) { + int start, end, q; + int e = sscanf(p, "%d,%d,%d", &start, &end, &q); + if (e != 3) { + av_log(NULL, AV_LOG_FATAL, "error parsing rc_override\n"); + exit_program(1); + } + video_enc->rc_override = + av_realloc(video_enc->rc_override, + sizeof(RcOverride) * (i + 1)); + video_enc->rc_override[i].start_frame = start; + video_enc->rc_override[i].end_frame = end; + if (q > 0) { + video_enc->rc_override[i].qscale = q; + video_enc->rc_override[i].quality_factor = 1.0; + } + else { + video_enc->rc_override[i].qscale = 0; + video_enc->rc_override[i].quality_factor = -q/100.0; + } + p = strchr(p, '/'); + if (p) p++; + } + video_enc->rc_override_count = i; + if (!video_enc->rc_initial_buffer_occupancy) + video_enc->rc_initial_buffer_occupancy = video_enc->rc_buffer_size * 3 / 4; + video_enc->intra_dc_precision = intra_dc_precision - 8; + + /* two pass mode */ + if (do_pass) { + if (do_pass == 1) { + video_enc->flags |= CODEC_FLAG_PASS1; + } else { + video_enc->flags |= CODEC_FLAG_PASS2; + } + } + + MATCH_PER_STREAM_OPT(forced_key_frames, str, forced_key_frames, oc, st); + if (forced_key_frames) + parse_forced_key_frames(forced_key_frames, ost, video_enc); + + MATCH_PER_STREAM_OPT(force_fps, i, ost->force_fps, oc, st); + + ost->top_field_first = -1; + MATCH_PER_STREAM_OPT(top_field_first, i, ost->top_field_first, oc, st); + +#if CONFIG_AVFILTER + MATCH_PER_STREAM_OPT(filters, str, filters, oc, st); + if (filters) + ost->avfilter = av_strdup(filters); +#endif + } else { + MATCH_PER_STREAM_OPT(copy_initial_nonkeyframes, i, ost->copy_initial_nonkeyframes, oc ,st); + } + + return ost; +} + +static OutputStream *new_audio_stream(OptionsContext *o, AVFormatContext *oc) +{ + AVStream *st; + OutputStream *ost; + AVCodecContext *audio_enc; + + ost = new_output_stream(o, oc, AVMEDIA_TYPE_AUDIO); + st = ost->st; + + audio_enc = st->codec; + audio_enc->codec_type = AVMEDIA_TYPE_AUDIO; + + if (!ost->stream_copy) { + char *sample_fmt = NULL; + + MATCH_PER_STREAM_OPT(audio_channels, i, audio_enc->channels, oc, st); + + MATCH_PER_STREAM_OPT(sample_fmts, str, sample_fmt, oc, st); + if (sample_fmt && + (audio_enc->sample_fmt = av_get_sample_fmt(sample_fmt)) == AV_SAMPLE_FMT_NONE) { + av_log(NULL, AV_LOG_FATAL, "Invalid sample format '%s'\n", sample_fmt); + exit_program(1); + } + + MATCH_PER_STREAM_OPT(audio_sample_rate, i, audio_enc->sample_rate, oc, st); + } + + return ost; +} + +static OutputStream *new_data_stream(OptionsContext *o, AVFormatContext *oc) +{ + OutputStream *ost; + + ost = new_output_stream(o, oc, AVMEDIA_TYPE_DATA); + if (!ost->stream_copy) { + av_log(NULL, AV_LOG_FATAL, "Data stream encoding not supported yet (only streamcopy)\n"); + exit_program(1); + } + + return ost; +} + +static OutputStream *new_attachment_stream(OptionsContext *o, AVFormatContext *oc) +{ + OutputStream *ost = new_output_stream(o, oc, AVMEDIA_TYPE_ATTACHMENT); + ost->stream_copy = 1; + return ost; +} + +static OutputStream *new_subtitle_stream(OptionsContext *o, AVFormatContext *oc) +{ + AVStream *st; + OutputStream *ost; + AVCodecContext *subtitle_enc; + + ost = new_output_stream(o, oc, AVMEDIA_TYPE_SUBTITLE); + st = ost->st; + subtitle_enc = st->codec; + + subtitle_enc->codec_type = AVMEDIA_TYPE_SUBTITLE; + + return ost; +} + +/* arg format is "output-stream-index:streamid-value". */ +static int opt_streamid(OptionsContext *o, const char *opt, const char *arg) +{ + int idx; + char *p; + char idx_str[16]; + + av_strlcpy(idx_str, arg, sizeof(idx_str)); + p = strchr(idx_str, ':'); + if (!p) { + av_log(NULL, AV_LOG_FATAL, + "Invalid value '%s' for option '%s', required syntax is 'index:value'\n", + arg, opt); + exit_program(1); + } + *p++ = '\0'; + idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, INT_MAX); + o->streamid_map = grow_array(o->streamid_map, sizeof(*o->streamid_map), &o->nb_streamid_map, idx+1); + o->streamid_map[idx] = parse_number_or_die(opt, p, OPT_INT, 0, INT_MAX); + return 0; +} + +static int copy_chapters(InputFile *ifile, OutputFile *ofile, int copy_metadata) +{ + AVFormatContext *is = ifile->ctx; + AVFormatContext *os = ofile->ctx; + int i; + + for (i = 0; i < is->nb_chapters; i++) { + AVChapter *in_ch = is->chapters[i], *out_ch; + int64_t ts_off = av_rescale_q(ofile->start_time - ifile->ts_offset, + AV_TIME_BASE_Q, in_ch->time_base); + int64_t rt = (ofile->recording_time == INT64_MAX) ? INT64_MAX : + av_rescale_q(ofile->recording_time, AV_TIME_BASE_Q, in_ch->time_base); + + + if (in_ch->end < ts_off) + continue; + if (rt != INT64_MAX && in_ch->start > rt + ts_off) + break; + + out_ch = av_mallocz(sizeof(AVChapter)); + if (!out_ch) + return AVERROR(ENOMEM); + + out_ch->id = in_ch->id; + out_ch->time_base = in_ch->time_base; + out_ch->start = FFMAX(0, in_ch->start - ts_off); + out_ch->end = FFMIN(rt, in_ch->end - ts_off); + + if (copy_metadata) + av_dict_copy(&out_ch->metadata, in_ch->metadata, 0); + + os->nb_chapters++; + os->chapters = av_realloc(os->chapters, sizeof(AVChapter) * os->nb_chapters); + if (!os->chapters) + return AVERROR(ENOMEM); + os->chapters[os->nb_chapters - 1] = out_ch; + } + return 0; +} + +static void opt_output_file(void *optctx, const char *filename) +{ + OptionsContext *o = optctx; + AVFormatContext *oc; + int i, err; + AVOutputFormat *file_oformat; + OutputStream *ost; + InputStream *ist; + + if (!strcmp(filename, "-")) + filename = "pipe:"; + + oc = avformat_alloc_context(); + if (!oc) { + print_error(filename, AVERROR(ENOMEM)); + exit_program(1); + } + + if (o->format) { + file_oformat = av_guess_format(o->format, NULL, NULL); + if (!file_oformat) { + av_log(NULL, AV_LOG_FATAL, "Requested output format '%s' is not a suitable output format\n", o->format); + exit_program(1); + } + } else { + file_oformat = av_guess_format(NULL, filename, NULL); + if (!file_oformat) { + av_log(NULL, AV_LOG_FATAL, "Unable to find a suitable output format for '%s'\n", + filename); + exit_program(1); + } + } + + oc->oformat = file_oformat; + oc->interrupt_callback = int_cb; + av_strlcpy(oc->filename, filename, sizeof(oc->filename)); + + if (!o->nb_stream_maps) { + /* pick the "best" stream of each type */ +#define NEW_STREAM(type, index)\ + if (index >= 0) {\ + ost = new_ ## type ## _stream(o, oc);\ + ost->source_index = index;\ + ost->sync_ist = &input_streams[index];\ + input_streams[index].discard = 0;\ + } + + /* video: highest resolution */ + if (!o->video_disable && oc->oformat->video_codec != CODEC_ID_NONE) { + int area = 0, idx = -1; + for (i = 0; i < nb_input_streams; i++) { + ist = &input_streams[i]; + if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && + ist->st->codec->width * ist->st->codec->height > area) { + area = ist->st->codec->width * ist->st->codec->height; + idx = i; + } + } + NEW_STREAM(video, idx); + } + + /* audio: most channels */ + if (!o->audio_disable && oc->oformat->audio_codec != CODEC_ID_NONE) { + int channels = 0, idx = -1; + for (i = 0; i < nb_input_streams; i++) { + ist = &input_streams[i]; + if (ist->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && + ist->st->codec->channels > channels) { + channels = ist->st->codec->channels; + idx = i; + } + } + NEW_STREAM(audio, idx); + } + + /* subtitles: pick first */ + if (!o->subtitle_disable && oc->oformat->subtitle_codec != CODEC_ID_NONE) { + for (i = 0; i < nb_input_streams; i++) + if (input_streams[i].st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) { + NEW_STREAM(subtitle, i); + break; + } + } + /* do something with data? */ + } else { + for (i = 0; i < o->nb_stream_maps; i++) { + StreamMap *map = &o->stream_maps[i]; + + if (map->disabled) + continue; + + ist = &input_streams[input_files[map->file_index].ist_index + map->stream_index]; + switch (ist->st->codec->codec_type) { + case AVMEDIA_TYPE_VIDEO: ost = new_video_stream(o, oc); break; + case AVMEDIA_TYPE_AUDIO: ost = new_audio_stream(o, oc); break; + case AVMEDIA_TYPE_SUBTITLE: ost = new_subtitle_stream(o, oc); break; + case AVMEDIA_TYPE_DATA: ost = new_data_stream(o, oc); break; + case AVMEDIA_TYPE_ATTACHMENT: ost = new_attachment_stream(o, oc); break; + default: + av_log(NULL, AV_LOG_FATAL, "Cannot map stream #%d:%d - unsupported type.\n", + map->file_index, map->stream_index); + exit_program(1); + } + + ost->source_index = input_files[map->file_index].ist_index + map->stream_index; + ost->sync_ist = &input_streams[input_files[map->sync_file_index].ist_index + + map->sync_stream_index]; + ist->discard = 0; + } + } + + /* handle attached files */ + for (i = 0; i < o->nb_attachments; i++) { + AVIOContext *pb; + uint8_t *attachment; + const char *p; + int64_t len; + + if ((err = avio_open2(&pb, o->attachments[i], AVIO_FLAG_READ, &int_cb, NULL)) < 0) { + av_log(NULL, AV_LOG_FATAL, "Could not open attachment file %s.\n", + o->attachments[i]); + exit_program(1); + } + if ((len = avio_size(pb)) <= 0) { + av_log(NULL, AV_LOG_FATAL, "Could not get size of the attachment %s.\n", + o->attachments[i]); + exit_program(1); + } + if (!(attachment = av_malloc(len))) { + av_log(NULL, AV_LOG_FATAL, "Attachment %s too large to fit into memory.\n", + o->attachments[i]); + exit_program(1); + } + avio_read(pb, attachment, len); + + ost = new_attachment_stream(o, oc); + ost->stream_copy = 0; + ost->source_index = -1; + ost->attachment_filename = o->attachments[i]; + ost->st->codec->extradata = attachment; + ost->st->codec->extradata_size = len; + + p = strrchr(o->attachments[i], '/'); + av_dict_set(&ost->st->metadata, "filename", (p && *p) ? p + 1 : o->attachments[i], AV_DICT_DONT_OVERWRITE); + avio_close(pb); + } + + output_files = grow_array(output_files, sizeof(*output_files), &nb_output_files, nb_output_files + 1); + output_files[nb_output_files - 1].ctx = oc; + output_files[nb_output_files - 1].ost_index = nb_output_streams - oc->nb_streams; + output_files[nb_output_files - 1].recording_time = o->recording_time; + output_files[nb_output_files - 1].start_time = o->start_time; + output_files[nb_output_files - 1].limit_filesize = o->limit_filesize; + av_dict_copy(&output_files[nb_output_files - 1].opts, format_opts, 0); + + /* check filename in case of an image number is expected */ + if (oc->oformat->flags & AVFMT_NEEDNUMBER) { + if (!av_filename_number_test(oc->filename)) { + print_error(oc->filename, AVERROR(EINVAL)); + exit_program(1); + } + } + + if (!(oc->oformat->flags & AVFMT_NOFILE)) { + /* test if it already exists to avoid losing precious files */ + assert_file_overwrite(filename); + + /* open the file */ + if ((err = avio_open2(&oc->pb, filename, AVIO_FLAG_WRITE, + &oc->interrupt_callback, + &output_files[nb_output_files - 1].opts)) < 0) { + print_error(filename, err); + exit_program(1); + } + } + + if (o->mux_preload) { + uint8_t buf[64]; + snprintf(buf, sizeof(buf), "%d", (int)(o->mux_preload*AV_TIME_BASE)); + av_dict_set(&output_files[nb_output_files - 1].opts, "preload", buf, 0); + } + oc->max_delay = (int)(o->mux_max_delay * AV_TIME_BASE); + oc->flags |= AVFMT_FLAG_NONBLOCK; + + /* copy metadata */ + for (i = 0; i < o->nb_metadata_map; i++) { + char *p; + int in_file_index = strtol(o->metadata_map[i].u.str, &p, 0); + + if (in_file_index < 0) + continue; + if (in_file_index >= nb_input_files) { + av_log(NULL, AV_LOG_FATAL, "Invalid input file index %d while processing metadata maps\n", in_file_index); + exit_program(1); + } + copy_metadata(o->metadata_map[i].specifier, *p ? p + 1 : p, oc, input_files[in_file_index].ctx, o); + } + + /* copy chapters */ + if (o->chapters_input_file >= nb_input_files) { + if (o->chapters_input_file == INT_MAX) { + /* copy chapters from the first input file that has them*/ + o->chapters_input_file = -1; + for (i = 0; i < nb_input_files; i++) + if (input_files[i].ctx->nb_chapters) { + o->chapters_input_file = i; + break; + } + } else { + av_log(NULL, AV_LOG_FATAL, "Invalid input file index %d in chapter mapping.\n", + o->chapters_input_file); + exit_program(1); + } + } + if (o->chapters_input_file >= 0) + copy_chapters(&input_files[o->chapters_input_file], &output_files[nb_output_files - 1], + !o->metadata_chapters_manual); + + /* copy global metadata by default */ + if (!o->metadata_global_manual && nb_input_files) + av_dict_copy(&oc->metadata, input_files[0].ctx->metadata, + AV_DICT_DONT_OVERWRITE); + if (!o->metadata_streams_manual) + for (i = output_files[nb_output_files - 1].ost_index; i < nb_output_streams; i++) { + InputStream *ist; + if (output_streams[i].source_index < 0) /* this is true e.g. for attached files */ + continue; + ist = &input_streams[output_streams[i].source_index]; + av_dict_copy(&output_streams[i].st->metadata, ist->st->metadata, AV_DICT_DONT_OVERWRITE); + } + + /* process manually set metadata */ + for (i = 0; i < o->nb_metadata; i++) { + AVDictionary **m; + char type, *val; + const char *stream_spec; + int index = 0, j, ret; + + val = strchr(o->metadata[i].u.str, '='); + if (!val) { + av_log(NULL, AV_LOG_FATAL, "No '=' character in metadata string %s.\n", + o->metadata[i].u.str); + exit_program(1); + } + *val++ = 0; + + parse_meta_type(o->metadata[i].specifier, &type, &index, &stream_spec); + if (type == 's') { + for (j = 0; j < oc->nb_streams; j++) { + if ((ret = check_stream_specifier(oc, oc->streams[j], stream_spec)) > 0) { + av_dict_set(&oc->streams[j]->metadata, o->metadata[i].u.str, *val ? val : NULL, 0); + } else if (ret < 0) + exit_program(1); + } + printf("ret %d, stream_spec %s\n", ret, stream_spec); + } + else { + switch (type) { + case 'g': + m = &oc->metadata; + break; + case 'c': + if (index < 0 || index >= oc->nb_chapters) { + av_log(NULL, AV_LOG_FATAL, "Invalid chapter index %d in metadata specifier.\n", index); + exit_program(1); + } + m = &oc->chapters[index]->metadata; + break; + default: + av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", o->metadata[i].specifier); + exit_program(1); + } + av_dict_set(m, o->metadata[i].u.str, *val ? val : NULL, 0); + } + } + + reset_options(o); +} + +/* same option as mencoder */ +static int opt_pass(const char *opt, const char *arg) +{ + do_pass = parse_number_or_die(opt, arg, OPT_INT, 1, 2); + return 0; +} + +static int64_t getutime(void) +{ +#if HAVE_GETRUSAGE + struct rusage rusage; + + getrusage(RUSAGE_SELF, &rusage); + return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec; +#elif HAVE_GETPROCESSTIMES + HANDLE proc; + FILETIME c, e, k, u; + proc = GetCurrentProcess(); + GetProcessTimes(proc, &c, &e, &k, &u); + return ((int64_t) u.dwHighDateTime << 32 | u.dwLowDateTime) / 10; +#else + return av_gettime(); +#endif +} + +static int64_t getmaxrss(void) +{ +#if HAVE_GETRUSAGE && HAVE_STRUCT_RUSAGE_RU_MAXRSS + struct rusage rusage; + getrusage(RUSAGE_SELF, &rusage); + return (int64_t)rusage.ru_maxrss * 1024; +#elif HAVE_GETPROCESSMEMORYINFO + HANDLE proc; + PROCESS_MEMORY_COUNTERS memcounters; + proc = GetCurrentProcess(); + memcounters.cb = sizeof(memcounters); + GetProcessMemoryInfo(proc, &memcounters, sizeof(memcounters)); + return memcounters.PeakPagefileUsage; +#else + return 0; +#endif +} + +static int opt_audio_qscale(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "q:a", arg, options); +} + +static void show_usage(void) +{ + printf("Hyper fast Audio and Video encoder\n"); + printf("usage: %s [options] [[infile options] -i infile]... {[outfile options] outfile}...\n", program_name); + printf("\n"); +} + +static void show_help(void) +{ + int flags = AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM; + av_log_set_callback(log_callback_help); + show_usage(); + show_help_options(options, "Main options:\n", + OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE | OPT_GRAB, 0); + show_help_options(options, "\nAdvanced options:\n", + OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE | OPT_GRAB, + OPT_EXPERT); + show_help_options(options, "\nVideo options:\n", + OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB, + OPT_VIDEO); + show_help_options(options, "\nAdvanced Video options:\n", + OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB, + OPT_VIDEO | OPT_EXPERT); + show_help_options(options, "\nAudio options:\n", + OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB, + OPT_AUDIO); + show_help_options(options, "\nAdvanced Audio options:\n", + OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB, + OPT_AUDIO | OPT_EXPERT); + show_help_options(options, "\nSubtitle options:\n", + OPT_SUBTITLE | OPT_GRAB, + OPT_SUBTITLE); + show_help_options(options, "\nAudio/Video grab options:\n", + OPT_GRAB, + OPT_GRAB); + printf("\n"); + show_help_children(avcodec_get_class(), flags); + show_help_children(avformat_get_class(), flags); + show_help_children(sws_get_class(), flags); +} + +static int opt_target(OptionsContext *o, const char *opt, const char *arg) +{ + enum { PAL, NTSC, FILM, UNKNOWN } norm = UNKNOWN; + static const char *const frame_rates[] = { "25", "30000/1001", "24000/1001" }; + + if (!strncmp(arg, "pal-", 4)) { + norm = PAL; + arg += 4; + } else if (!strncmp(arg, "ntsc-", 5)) { + norm = NTSC; + arg += 5; + } else if (!strncmp(arg, "film-", 5)) { + norm = FILM; + arg += 5; + } else { + /* Try to determine PAL/NTSC by peeking in the input files */ + if (nb_input_files) { + int i, j, fr; + for (j = 0; j < nb_input_files; j++) { + for (i = 0; i < input_files[j].nb_streams; i++) { + AVCodecContext *c = input_files[j].ctx->streams[i]->codec; + if (c->codec_type != AVMEDIA_TYPE_VIDEO) + continue; + fr = c->time_base.den * 1000 / c->time_base.num; + if (fr == 25000) { + norm = PAL; + break; + } else if ((fr == 29970) || (fr == 23976)) { + norm = NTSC; + break; + } + } + if (norm != UNKNOWN) + break; + } + } + if (norm != UNKNOWN) + av_log(NULL, AV_LOG_INFO, "Assuming %s for target.\n", norm == PAL ? "PAL" : "NTSC"); + } + + if (norm == UNKNOWN) { + av_log(NULL, AV_LOG_FATAL, "Could not determine norm (PAL/NTSC/NTSC-Film) for target.\n"); + av_log(NULL, AV_LOG_FATAL, "Please prefix target with \"pal-\", \"ntsc-\" or \"film-\",\n"); + av_log(NULL, AV_LOG_FATAL, "or set a framerate with \"-r xxx\".\n"); + exit_program(1); + } + + if (!strcmp(arg, "vcd")) { + opt_video_codec(o, "c:v", "mpeg1video"); + opt_audio_codec(o, "c:a", "mp2"); + parse_option(o, "f", "vcd", options); + + parse_option(o, "s", norm == PAL ? "352x288" : "352x240", options); + parse_option(o, "r", frame_rates[norm], options); + opt_default("g", norm == PAL ? "15" : "18"); + + opt_default("b", "1150000"); + opt_default("maxrate", "1150000"); + opt_default("minrate", "1150000"); + opt_default("bufsize", "327680"); // 40*1024*8; + + opt_default("b:a", "224000"); + parse_option(o, "ar", "44100", options); + parse_option(o, "ac", "2", options); + + opt_default("packetsize", "2324"); + opt_default("muxrate", "1411200"); // 2352 * 75 * 8; + + /* We have to offset the PTS, so that it is consistent with the SCR. + SCR starts at 36000, but the first two packs contain only padding + and the first pack from the other stream, respectively, may also have + been written before. + So the real data starts at SCR 36000+3*1200. */ + o->mux_preload = (36000 + 3 * 1200) / 90000.0; // 0.44 + } else if (!strcmp(arg, "svcd")) { + + opt_video_codec(o, "c:v", "mpeg2video"); + opt_audio_codec(o, "c:a", "mp2"); + parse_option(o, "f", "svcd", options); + + parse_option(o, "s", norm == PAL ? "480x576" : "480x480", options); + parse_option(o, "r", frame_rates[norm], options); + opt_default("g", norm == PAL ? "15" : "18"); + + opt_default("b", "2040000"); + opt_default("maxrate", "2516000"); + opt_default("minrate", "0"); // 1145000; + opt_default("bufsize", "1835008"); // 224*1024*8; + opt_default("flags", "+scan_offset"); + + + opt_default("b:a", "224000"); + parse_option(o, "ar", "44100", options); + + opt_default("packetsize", "2324"); + + } else if (!strcmp(arg, "dvd")) { + + opt_video_codec(o, "c:v", "mpeg2video"); + opt_audio_codec(o, "c:a", "ac3"); + parse_option(o, "f", "dvd", options); + + parse_option(o, "s", norm == PAL ? "720x576" : "720x480", options); + parse_option(o, "r", frame_rates[norm], options); + opt_default("g", norm == PAL ? "15" : "18"); + + opt_default("b", "6000000"); + opt_default("maxrate", "9000000"); + opt_default("minrate", "0"); // 1500000; + opt_default("bufsize", "1835008"); // 224*1024*8; + + opt_default("packetsize", "2048"); // from www.mpucoder.com: DVD sectors contain 2048 bytes of data, this is also the size of one pack. + opt_default("muxrate", "10080000"); // from mplex project: data_rate = 1260000. mux_rate = data_rate * 8 + + opt_default("b:a", "448000"); + parse_option(o, "ar", "48000", options); + + } else if (!strncmp(arg, "dv", 2)) { + + parse_option(o, "f", "dv", options); + + parse_option(o, "s", norm == PAL ? "720x576" : "720x480", options); + parse_option(o, "pix_fmt", !strncmp(arg, "dv50", 4) ? "yuv422p" : + norm == PAL ? "yuv420p" : "yuv411p", options); + parse_option(o, "r", frame_rates[norm], options); + + parse_option(o, "ar", "48000", options); + parse_option(o, "ac", "2", options); + + } else { + av_log(NULL, AV_LOG_ERROR, "Unknown target: %s\n", arg); + return AVERROR(EINVAL); + } + return 0; +} + +static int opt_vstats_file(const char *opt, const char *arg) +{ + av_free (vstats_filename); + vstats_filename = av_strdup (arg); + return 0; +} + +static int opt_vstats(const char *opt, const char *arg) +{ + char filename[40]; + time_t today2 = time(NULL); + struct tm *today = localtime(&today2); + + snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min, + today->tm_sec); + return opt_vstats_file(opt, filename); +} + +static int opt_video_frames(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "frames:v", arg, options); +} + +static int opt_audio_frames(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "frames:a", arg, options); +} + +static int opt_data_frames(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "frames:d", arg, options); +} + +static int opt_video_tag(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "tag:v", arg, options); +} + +static int opt_audio_tag(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "tag:a", arg, options); +} + +static int opt_subtitle_tag(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "tag:s", arg, options); +} + +static int opt_video_filters(OptionsContext *o, const char *opt, const char *arg) +{ + return parse_option(o, "filter:v", arg, options); +} + +static int opt_vsync(const char *opt, const char *arg) +{ + if (!av_strcasecmp(arg, "cfr")) video_sync_method = VSYNC_CFR; + else if (!av_strcasecmp(arg, "vfr")) video_sync_method = VSYNC_VFR; + else if (!av_strcasecmp(arg, "passthrough")) video_sync_method = VSYNC_PASSTHROUGH; + + if (video_sync_method == VSYNC_AUTO) + video_sync_method = parse_number_or_die("vsync", arg, OPT_INT, VSYNC_AUTO, VSYNC_VFR); + return 0; +} + +#define OFFSET(x) offsetof(OptionsContext, x) +static const OptionDef options[] = { + /* main options */ +#include "cmdutils_common_opts.h" + { "f", HAS_ARG | OPT_STRING | OPT_OFFSET, {.off = OFFSET(format)}, "force format", "fmt" }, + { "i", HAS_ARG | OPT_FUNC2, {(void*)opt_input_file}, "input file name", "filename" }, + { "y", OPT_BOOL, {(void*)&file_overwrite}, "overwrite output files" }, + { "c", HAS_ARG | OPT_STRING | OPT_SPEC, {.off = OFFSET(codec_names)}, "codec name", "codec" }, + { "codec", HAS_ARG | OPT_STRING | OPT_SPEC, {.off = OFFSET(codec_names)}, "codec name", "codec" }, + { "pre", HAS_ARG | OPT_STRING | OPT_SPEC, {.off = OFFSET(presets)}, "preset name", "preset" }, + { "map", HAS_ARG | OPT_EXPERT | OPT_FUNC2, {(void*)opt_map}, "set input stream mapping", "[-]input_file_id[:stream_specifier][,sync_file_id[:stream_specifier]]" }, + { "map_metadata", HAS_ARG | OPT_STRING | OPT_SPEC, {.off = OFFSET(metadata_map)}, "set metadata information of outfile from infile", + "outfile[,metadata]:infile[,metadata]" }, + { "map_chapters", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_OFFSET, {.off = OFFSET(chapters_input_file)}, "set chapters mapping", "input_file_index" }, + { "t", HAS_ARG | OPT_TIME | OPT_OFFSET, {.off = OFFSET(recording_time)}, "record or transcode \"duration\" seconds of audio/video", "duration" }, + { "fs", HAS_ARG | OPT_INT64 | OPT_OFFSET, {.off = OFFSET(limit_filesize)}, "set the limit file size in bytes", "limit_size" }, // + { "ss", HAS_ARG | OPT_TIME | OPT_OFFSET, {.off = OFFSET(start_time)}, "set the start time offset", "time_off" }, + { "itsoffset", HAS_ARG | OPT_TIME | OPT_OFFSET, {.off = OFFSET(input_ts_offset)}, "set the input ts offset", "time_off" }, + { "itsscale", HAS_ARG | OPT_DOUBLE | OPT_SPEC, {.off = OFFSET(ts_scale)}, "set the input ts scale", "scale" }, + { "metadata", HAS_ARG | OPT_STRING | OPT_SPEC, {.off = OFFSET(metadata)}, "add metadata", "string=string" }, + { "dframes", HAS_ARG | OPT_FUNC2, {(void*)opt_data_frames}, "set the number of data frames to record", "number" }, + { "benchmark", OPT_BOOL | OPT_EXPERT, {(void*)&do_benchmark}, + "add timings for benchmarking" }, + { "timelimit", HAS_ARG, {(void*)opt_timelimit}, "set max runtime in seconds", "limit" }, + { "dump", OPT_BOOL | OPT_EXPERT, {(void*)&do_pkt_dump}, + "dump each input packet" }, + { "hex", OPT_BOOL | OPT_EXPERT, {(void*)&do_hex_dump}, + "when dumping packets, also dump the payload" }, + { "re", OPT_BOOL | OPT_EXPERT | OPT_OFFSET, {.off = OFFSET(rate_emu)}, "read input at native frame rate", "" }, + { "target", HAS_ARG | OPT_FUNC2, {(void*)opt_target}, "specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\", \"dv50\", \"pal-vcd\", \"ntsc-svcd\", ...)", "type" }, + { "vsync", HAS_ARG | OPT_EXPERT, {(void*)opt_vsync}, "video sync method", "" }, + { "async", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&audio_sync_method}, "audio sync method", "" }, + { "adrift_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT, {(void*)&audio_drift_threshold}, "audio drift threshold", "threshold" }, + { "copyts", OPT_BOOL | OPT_EXPERT, {(void*)©_ts}, "copy timestamps" }, + { "copytb", OPT_BOOL | OPT_EXPERT, {(void*)©_tb}, "copy input stream time base when stream copying" }, + { "shortest", OPT_BOOL | OPT_EXPERT, {(void*)&opt_shortest}, "finish encoding within shortest input" }, // + { "dts_delta_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT, {(void*)&dts_delta_threshold}, "timestamp discontinuity delta threshold", "threshold" }, + { "xerror", OPT_BOOL, {(void*)&exit_on_error}, "exit on error", "error" }, + { "copyinkf", OPT_BOOL | OPT_EXPERT | OPT_SPEC, {.off = OFFSET(copy_initial_nonkeyframes)}, "copy initial non-keyframes" }, + { "frames", OPT_INT64 | HAS_ARG | OPT_SPEC, {.off = OFFSET(max_frames)}, "set the number of frames to record", "number" }, + { "tag", OPT_STRING | HAS_ARG | OPT_SPEC, {.off = OFFSET(codec_tags)}, "force codec tag/fourcc", "fourcc/tag" }, + { "q", HAS_ARG | OPT_EXPERT | OPT_DOUBLE | OPT_SPEC, {.off = OFFSET(qscale)}, "use fixed quality scale (VBR)", "q" }, + { "qscale", HAS_ARG | OPT_EXPERT | OPT_DOUBLE | OPT_SPEC, {.off = OFFSET(qscale)}, "use fixed quality scale (VBR)", "q" }, +#if CONFIG_AVFILTER + { "filter", HAS_ARG | OPT_STRING | OPT_SPEC, {.off = OFFSET(filters)}, "set stream filterchain", "filter_list" }, +#endif + { "stats", OPT_BOOL, {&print_stats}, "print progress report during encoding", }, + { "attach", HAS_ARG | OPT_FUNC2, {(void*)opt_attach}, "add an attachment to the output file", "filename" }, + { "dump_attachment", HAS_ARG | OPT_STRING | OPT_SPEC, {.off = OFFSET(dump_attachment)}, "extract an attachment into a file", "filename" }, + + /* video options */ + { "vframes", HAS_ARG | OPT_VIDEO | OPT_FUNC2, {(void*)opt_video_frames}, "set the number of video frames to record", "number" }, + { "r", HAS_ARG | OPT_VIDEO | OPT_STRING | OPT_SPEC, {.off = OFFSET(frame_rates)}, "set frame rate (Hz value, fraction or abbreviation)", "rate" }, + { "s", HAS_ARG | OPT_VIDEO | OPT_STRING | OPT_SPEC, {.off = OFFSET(frame_sizes)}, "set frame size (WxH or abbreviation)", "size" }, + { "aspect", HAS_ARG | OPT_VIDEO | OPT_STRING | OPT_SPEC, {.off = OFFSET(frame_aspect_ratios)}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" }, + { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_STRING | OPT_SPEC, {.off = OFFSET(frame_pix_fmts)}, "set pixel format", "format" }, + { "vn", OPT_BOOL | OPT_VIDEO | OPT_OFFSET, {.off = OFFSET(video_disable)}, "disable video" }, + { "vdt", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&video_discard}, "discard threshold", "n" }, + { "rc_override", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_STRING | OPT_SPEC, {.off = OFFSET(rc_overrides)}, "rate control override for specific intervals", "override" }, + { "vcodec", HAS_ARG | OPT_VIDEO | OPT_FUNC2, {(void*)opt_video_codec}, "force video codec ('copy' to copy stream)", "codec" }, + { "same_quant", OPT_BOOL | OPT_VIDEO, {(void*)&same_quant}, + "use same quantizer as source (implies VBR)" }, + { "pass", HAS_ARG | OPT_VIDEO, {(void*)opt_pass}, "select the pass number (1 or 2)", "n" }, + { "passlogfile", HAS_ARG | OPT_STRING | OPT_VIDEO, {(void*)&pass_logfilename_prefix}, "select two pass log file name prefix", "prefix" }, + { "deinterlace", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, {(void*)&do_deinterlace}, + "deinterlace pictures" }, + { "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" }, +#if CONFIG_AVFILTER + { "vf", HAS_ARG | OPT_VIDEO | OPT_FUNC2, {(void*)opt_video_filters}, "video filters", "filter list" }, +#endif + { "intra_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_STRING | OPT_SPEC, {.off = OFFSET(intra_matrices)}, "specify intra matrix coeffs", "matrix" }, + { "inter_matrix", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_STRING | OPT_SPEC, {.off = OFFSET(inter_matrices)}, "specify inter matrix coeffs", "matrix" }, + { "top", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_INT| OPT_SPEC, {.off = OFFSET(top_field_first)}, "top=1/bottom=0/auto=-1 field first", "" }, + { "dc", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&intra_dc_precision}, "intra_dc_precision", "precision" }, + { "vtag", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_FUNC2, {(void*)opt_video_tag}, "force video tag/fourcc", "fourcc/tag" }, + { "qphist", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, { (void *)&qp_hist }, "show QP histogram" }, + { "force_fps", OPT_BOOL | OPT_EXPERT | OPT_VIDEO | OPT_SPEC, {.off = OFFSET(force_fps)}, "force the selected framerate, disable the best supported framerate selection" }, + { "streamid", HAS_ARG | OPT_EXPERT | OPT_FUNC2, {(void*)opt_streamid}, "set the value of an outfile streamid", "streamIndex:value" }, + { "force_key_frames", OPT_STRING | HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_SPEC, {.off = OFFSET(forced_key_frames)}, "force key frames at specified timestamps", "timestamps" }, + + /* audio options */ + { "aframes", HAS_ARG | OPT_AUDIO | OPT_FUNC2, {(void*)opt_audio_frames}, "set the number of audio frames to record", "number" }, + { "aq", HAS_ARG | OPT_AUDIO | OPT_FUNC2, {(void*)opt_audio_qscale}, "set audio quality (codec-specific)", "quality", }, + { "ar", HAS_ARG | OPT_AUDIO | OPT_INT | OPT_SPEC, {.off = OFFSET(audio_sample_rate)}, "set audio sampling rate (in Hz)", "rate" }, + { "ac", HAS_ARG | OPT_AUDIO | OPT_INT | OPT_SPEC, {.off = OFFSET(audio_channels)}, "set number of audio channels", "channels" }, + { "an", OPT_BOOL | OPT_AUDIO | OPT_OFFSET, {.off = OFFSET(audio_disable)}, "disable audio" }, + { "acodec", HAS_ARG | OPT_AUDIO | OPT_FUNC2, {(void*)opt_audio_codec}, "force audio codec ('copy' to copy stream)", "codec" }, + { "atag", HAS_ARG | OPT_EXPERT | OPT_AUDIO | OPT_FUNC2, {(void*)opt_audio_tag}, "force audio tag/fourcc", "fourcc/tag" }, + { "vol", OPT_INT | HAS_ARG | OPT_AUDIO, {(void*)&audio_volume}, "change audio volume (256=normal)" , "volume" }, // + { "sample_fmt", HAS_ARG | OPT_EXPERT | OPT_AUDIO | OPT_SPEC | OPT_STRING, {.off = OFFSET(sample_fmts)}, "set sample format", "format" }, + + /* subtitle options */ + { "sn", OPT_BOOL | OPT_SUBTITLE | OPT_OFFSET, {.off = OFFSET(subtitle_disable)}, "disable subtitle" }, + { "scodec", HAS_ARG | OPT_SUBTITLE | OPT_FUNC2, {(void*)opt_subtitle_codec}, "force subtitle codec ('copy' to copy stream)", "codec" }, + { "stag", HAS_ARG | OPT_EXPERT | OPT_SUBTITLE | OPT_FUNC2, {(void*)opt_subtitle_tag}, "force subtitle tag/fourcc", "fourcc/tag" }, + + /* grab options */ + { "isync", OPT_BOOL | OPT_EXPERT | OPT_GRAB, {(void*)&input_sync}, "sync read on input", "" }, + + /* muxer options */ + { "muxdelay", OPT_FLOAT | HAS_ARG | OPT_EXPERT | OPT_OFFSET, {.off = OFFSET(mux_max_delay)}, "set the maximum demux-decode delay", "seconds" }, + { "muxpreload", OPT_FLOAT | HAS_ARG | OPT_EXPERT | OPT_OFFSET, {.off = OFFSET(mux_preload)}, "set the initial demux-decode delay", "seconds" }, + + { "bsf", HAS_ARG | OPT_STRING | OPT_SPEC, {.off = OFFSET(bitstream_filters)}, "A comma-separated list of bitstream filters", "bitstream_filters" }, + + /* data codec support */ + { "dcodec", HAS_ARG | OPT_DATA | OPT_FUNC2, {(void*)opt_data_codec}, "force data codec ('copy' to copy stream)", "codec" }, + + { "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" }, + { NULL, }, +}; + +int main(int argc, char **argv) +{ + OptionsContext o = { 0 }; + int64_t ti; + + reset_options(&o); + + av_log_set_flags(AV_LOG_SKIP_REPEATED); + parse_loglevel(argc, argv, options); + + avcodec_register_all(); +#if CONFIG_AVDEVICE + avdevice_register_all(); +#endif +#if CONFIG_AVFILTER + avfilter_register_all(); +#endif + av_register_all(); + avformat_network_init(); + + show_banner(); + + /* parse options */ + parse_options(&o, argc, argv, options, opt_output_file); + + if (nb_output_files <= 0 && nb_input_files == 0) { + show_usage(); + av_log(NULL, AV_LOG_WARNING, "Use -h to get full help or, even better, run 'man %s'\n", program_name); + exit_program(1); + } + + /* file converter / grab */ + if (nb_output_files <= 0) { + fprintf(stderr, "At least one output file must be specified\n"); + exit_program(1); + } + + if (nb_input_files == 0) { + av_log(NULL, AV_LOG_FATAL, "At least one input file must be specified\n"); + exit_program(1); + } + + ti = getutime(); + if (transcode(output_files, nb_output_files, input_files, nb_input_files) < 0) + exit_program(1); + ti = getutime() - ti; + if (do_benchmark) { + int maxrss = getmaxrss() / 1024; + printf("bench: utime=%0.3fs maxrss=%ikB\n", ti / 1000000.0, maxrss); + } + + exit_program(0); + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/avplay.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/avplay.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/avplay.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/avplay.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,3126 @@ +/* + * avplay : Simple Media Player based on the Libav libraries + * Copyright (c) 2003 Fabrice Bellard + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" +#include +#include +#include +#include "libavutil/avstring.h" +#include "libavutil/colorspace.h" +#include "libavutil/mathematics.h" +#include "libavutil/pixdesc.h" +#include "libavutil/imgutils.h" +#include "libavutil/dict.h" +#include "libavutil/parseutils.h" +#include "libavutil/samplefmt.h" +#include "libavformat/avformat.h" +#include "libavdevice/avdevice.h" +#include "libswscale/swscale.h" +#include "libavcodec/audioconvert.h" +#include "libavutil/opt.h" +#include "libavcodec/avfft.h" + +#if CONFIG_AVFILTER +# include "libavfilter/avfilter.h" +# include "libavfilter/avfiltergraph.h" +#endif + +#include "cmdutils.h" + +#include +#include + +#ifdef __MINGW32__ +#undef main /* We don't want SDL to override our main() */ +#endif + +#include +#include + +const char program_name[] = "avplay"; +const int program_birth_year = 2003; + +#define MAX_QUEUE_SIZE (15 * 1024 * 1024) +#define MIN_AUDIOQ_SIZE (20 * 16 * 1024) +#define MIN_FRAMES 5 + +/* SDL audio buffer size, in samples. Should be small to have precise + A/V sync as SDL does not have hardware buffer fullness info. */ +#define SDL_AUDIO_BUFFER_SIZE 1024 + +/* no AV sync correction is done if below the AV sync threshold */ +#define AV_SYNC_THRESHOLD 0.01 +/* no AV correction is done if too big error */ +#define AV_NOSYNC_THRESHOLD 10.0 + +#define FRAME_SKIP_FACTOR 0.05 + +/* maximum audio speed change to get correct sync */ +#define SAMPLE_CORRECTION_PERCENT_MAX 10 + +/* we use about AUDIO_DIFF_AVG_NB A-V differences to make the average */ +#define AUDIO_DIFF_AVG_NB 20 + +/* NOTE: the size must be big enough to compensate the hardware audio buffersize size */ +#define SAMPLE_ARRAY_SIZE (2 * 65536) + +static int sws_flags = SWS_BICUBIC; + +typedef struct PacketQueue { + AVPacketList *first_pkt, *last_pkt; + int nb_packets; + int size; + int abort_request; + SDL_mutex *mutex; + SDL_cond *cond; +} PacketQueue; + +#define VIDEO_PICTURE_QUEUE_SIZE 2 +#define SUBPICTURE_QUEUE_SIZE 4 + +typedef struct VideoPicture { + double pts; ///< presentation time stamp for this picture + double target_clock; ///< av_gettime() time at which this should be displayed ideally + int64_t pos; ///< byte position in file + SDL_Overlay *bmp; + int width, height; /* source height & width */ + int allocated; + int reallocate; + enum PixelFormat pix_fmt; + +#if CONFIG_AVFILTER + AVFilterBufferRef *picref; +#endif +} VideoPicture; + +typedef struct SubPicture { + double pts; /* presentation time stamp for this picture */ + AVSubtitle sub; +} SubPicture; + +enum { + AV_SYNC_AUDIO_MASTER, /* default choice */ + AV_SYNC_VIDEO_MASTER, + AV_SYNC_EXTERNAL_CLOCK, /* synchronize to an external clock */ +}; + +typedef struct VideoState { + SDL_Thread *parse_tid; + SDL_Thread *video_tid; + SDL_Thread *refresh_tid; + AVInputFormat *iformat; + int no_background; + int abort_request; + int paused; + int last_paused; + int seek_req; + int seek_flags; + int64_t seek_pos; + int64_t seek_rel; + int read_pause_return; + AVFormatContext *ic; + int dtg_active_format; + + int audio_stream; + + int av_sync_type; + double external_clock; /* external clock base */ + int64_t external_clock_time; + + double audio_clock; + double audio_diff_cum; /* used for AV difference average computation */ + double audio_diff_avg_coef; + double audio_diff_threshold; + int audio_diff_avg_count; + AVStream *audio_st; + PacketQueue audioq; + int audio_hw_buf_size; + uint8_t silence_buf[SDL_AUDIO_BUFFER_SIZE]; + uint8_t *audio_buf; + uint8_t *audio_buf1; + unsigned int audio_buf_size; /* in bytes */ + int audio_buf_index; /* in bytes */ + AVPacket audio_pkt_temp; + AVPacket audio_pkt; + enum AVSampleFormat audio_src_fmt; + AVAudioConvert *reformat_ctx; + AVFrame *frame; + + int show_audio; /* if true, display audio samples */ + int16_t sample_array[SAMPLE_ARRAY_SIZE]; + int sample_array_index; + int last_i_start; + RDFTContext *rdft; + int rdft_bits; + FFTSample *rdft_data; + int xpos; + + SDL_Thread *subtitle_tid; + int subtitle_stream; + int subtitle_stream_changed; + AVStream *subtitle_st; + PacketQueue subtitleq; + SubPicture subpq[SUBPICTURE_QUEUE_SIZE]; + int subpq_size, subpq_rindex, subpq_windex; + SDL_mutex *subpq_mutex; + SDL_cond *subpq_cond; + + double frame_timer; + double frame_last_pts; + double frame_last_delay; + double video_clock; ///< pts of last decoded frame / predicted pts of next decoded frame + int video_stream; + AVStream *video_st; + PacketQueue videoq; + double video_current_pts; ///< current displayed pts (different from video_clock if frame fifos are used) + double video_current_pts_drift; ///< video_current_pts - time (av_gettime) at which we updated video_current_pts - used to have running video pts + int64_t video_current_pos; ///< current displayed file pos + VideoPicture pictq[VIDEO_PICTURE_QUEUE_SIZE]; + int pictq_size, pictq_rindex, pictq_windex; + SDL_mutex *pictq_mutex; + SDL_cond *pictq_cond; +#if !CONFIG_AVFILTER + struct SwsContext *img_convert_ctx; +#endif + + // QETimer *video_timer; + char filename[1024]; + int width, height, xleft, ytop; + + PtsCorrectionContext pts_ctx; + +#if CONFIG_AVFILTER + AVFilterContext *out_video_filter; ///< the last filter in the video chain +#endif + + float skip_frames; + float skip_frames_index; + int refresh; +} VideoState; + +static void show_help(void); + +/* options specified by the user */ +static AVInputFormat *file_iformat; +static const char *input_filename; +static const char *window_title; +static int fs_screen_width; +static int fs_screen_height; +static int screen_width = 0; +static int screen_height = 0; +static int audio_disable; +static int video_disable; +static int wanted_stream[AVMEDIA_TYPE_NB] = { + [AVMEDIA_TYPE_AUDIO] = -1, + [AVMEDIA_TYPE_VIDEO] = -1, + [AVMEDIA_TYPE_SUBTITLE] = -1, +}; +static int seek_by_bytes = -1; +static int display_disable; +static int show_status = 1; +static int av_sync_type = AV_SYNC_AUDIO_MASTER; +static int64_t start_time = AV_NOPTS_VALUE; +static int64_t duration = AV_NOPTS_VALUE; +static int debug = 0; +static int debug_mv = 0; +static int step = 0; +static int thread_count = 1; +static int workaround_bugs = 1; +static int fast = 0; +static int genpts = 0; +static int lowres = 0; +static int idct = FF_IDCT_AUTO; +static enum AVDiscard skip_frame = AVDISCARD_DEFAULT; +static enum AVDiscard skip_idct = AVDISCARD_DEFAULT; +static enum AVDiscard skip_loop_filter = AVDISCARD_DEFAULT; +static int error_recognition = FF_ER_CAREFUL; +static int error_concealment = 3; +static int decoder_reorder_pts = -1; +static int autoexit; +static int exit_on_keydown; +static int exit_on_mousedown; +static int loop = 1; +static int framedrop = 1; + +static int rdftspeed = 20; +#if CONFIG_AVFILTER +static char *vfilters = NULL; +#endif + +/* current context */ +static int is_full_screen; +static VideoState *cur_stream; +static int64_t audio_callback_time; + +static AVPacket flush_pkt; + +#define FF_ALLOC_EVENT (SDL_USEREVENT) +#define FF_REFRESH_EVENT (SDL_USEREVENT + 1) +#define FF_QUIT_EVENT (SDL_USEREVENT + 2) + +static SDL_Surface *screen; + +void exit_program(int ret) +{ + exit(ret); +} + +static int packet_queue_put(PacketQueue *q, AVPacket *pkt); + +/* packet queue handling */ +static void packet_queue_init(PacketQueue *q) +{ + memset(q, 0, sizeof(PacketQueue)); + q->mutex = SDL_CreateMutex(); + q->cond = SDL_CreateCond(); + packet_queue_put(q, &flush_pkt); +} + +static void packet_queue_flush(PacketQueue *q) +{ + AVPacketList *pkt, *pkt1; + + SDL_LockMutex(q->mutex); + for (pkt = q->first_pkt; pkt != NULL; pkt = pkt1) { + pkt1 = pkt->next; + av_free_packet(&pkt->pkt); + av_freep(&pkt); + } + q->last_pkt = NULL; + q->first_pkt = NULL; + q->nb_packets = 0; + q->size = 0; + SDL_UnlockMutex(q->mutex); +} + +static void packet_queue_end(PacketQueue *q) +{ + packet_queue_flush(q); + SDL_DestroyMutex(q->mutex); + SDL_DestroyCond(q->cond); +} + +static int packet_queue_put(PacketQueue *q, AVPacket *pkt) +{ + AVPacketList *pkt1; + + /* duplicate the packet */ + if (pkt != &flush_pkt && av_dup_packet(pkt) < 0) + return -1; + + pkt1 = av_malloc(sizeof(AVPacketList)); + if (!pkt1) + return -1; + pkt1->pkt = *pkt; + pkt1->next = NULL; + + + SDL_LockMutex(q->mutex); + + if (!q->last_pkt) + + q->first_pkt = pkt1; + else + q->last_pkt->next = pkt1; + q->last_pkt = pkt1; + q->nb_packets++; + q->size += pkt1->pkt.size + sizeof(*pkt1); + /* XXX: should duplicate packet data in DV case */ + SDL_CondSignal(q->cond); + + SDL_UnlockMutex(q->mutex); + return 0; +} + +static void packet_queue_abort(PacketQueue *q) +{ + SDL_LockMutex(q->mutex); + + q->abort_request = 1; + + SDL_CondSignal(q->cond); + + SDL_UnlockMutex(q->mutex); +} + +/* return < 0 if aborted, 0 if no packet and > 0 if packet. */ +static int packet_queue_get(PacketQueue *q, AVPacket *pkt, int block) +{ + AVPacketList *pkt1; + int ret; + + SDL_LockMutex(q->mutex); + + for (;;) { + if (q->abort_request) { + ret = -1; + break; + } + + pkt1 = q->first_pkt; + if (pkt1) { + q->first_pkt = pkt1->next; + if (!q->first_pkt) + q->last_pkt = NULL; + q->nb_packets--; + q->size -= pkt1->pkt.size + sizeof(*pkt1); + *pkt = pkt1->pkt; + av_free(pkt1); + ret = 1; + break; + } else if (!block) { + ret = 0; + break; + } else { + SDL_CondWait(q->cond, q->mutex); + } + } + SDL_UnlockMutex(q->mutex); + return ret; +} + +static inline void fill_rectangle(SDL_Surface *screen, + int x, int y, int w, int h, int color) +{ + SDL_Rect rect; + rect.x = x; + rect.y = y; + rect.w = w; + rect.h = h; + SDL_FillRect(screen, &rect, color); +} + +#define ALPHA_BLEND(a, oldp, newp, s)\ +((((oldp << s) * (255 - (a))) + (newp * (a))) / (255 << s)) + +#define RGBA_IN(r, g, b, a, s)\ +{\ + unsigned int v = ((const uint32_t *)(s))[0];\ + a = (v >> 24) & 0xff;\ + r = (v >> 16) & 0xff;\ + g = (v >> 8) & 0xff;\ + b = v & 0xff;\ +} + +#define YUVA_IN(y, u, v, a, s, pal)\ +{\ + unsigned int val = ((const uint32_t *)(pal))[*(const uint8_t*)(s)];\ + a = (val >> 24) & 0xff;\ + y = (val >> 16) & 0xff;\ + u = (val >> 8) & 0xff;\ + v = val & 0xff;\ +} + +#define YUVA_OUT(d, y, u, v, a)\ +{\ + ((uint32_t *)(d))[0] = (a << 24) | (y << 16) | (u << 8) | v;\ +} + + +#define BPP 1 + +static void blend_subrect(AVPicture *dst, const AVSubtitleRect *rect, int imgw, int imgh) +{ + int wrap, wrap3, width2, skip2; + int y, u, v, a, u1, v1, a1, w, h; + uint8_t *lum, *cb, *cr; + const uint8_t *p; + const uint32_t *pal; + int dstx, dsty, dstw, dsth; + + dstw = av_clip(rect->w, 0, imgw); + dsth = av_clip(rect->h, 0, imgh); + dstx = av_clip(rect->x, 0, imgw - dstw); + dsty = av_clip(rect->y, 0, imgh - dsth); + lum = dst->data[0] + dsty * dst->linesize[0]; + cb = dst->data[1] + (dsty >> 1) * dst->linesize[1]; + cr = dst->data[2] + (dsty >> 1) * dst->linesize[2]; + + width2 = ((dstw + 1) >> 1) + (dstx & ~dstw & 1); + skip2 = dstx >> 1; + wrap = dst->linesize[0]; + wrap3 = rect->pict.linesize[0]; + p = rect->pict.data[0]; + pal = (const uint32_t *)rect->pict.data[1]; /* Now in YCrCb! */ + + if (dsty & 1) { + lum += dstx; + cb += skip2; + cr += skip2; + + if (dstx & 1) { + YUVA_IN(y, u, v, a, p, pal); + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + cb[0] = ALPHA_BLEND(a >> 2, cb[0], u, 0); + cr[0] = ALPHA_BLEND(a >> 2, cr[0], v, 0); + cb++; + cr++; + lum++; + p += BPP; + } + for (w = dstw - (dstx & 1); w >= 2; w -= 2) { + YUVA_IN(y, u, v, a, p, pal); + u1 = u; + v1 = v; + a1 = a; + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + + YUVA_IN(y, u, v, a, p + BPP, pal); + u1 += u; + v1 += v; + a1 += a; + lum[1] = ALPHA_BLEND(a, lum[1], y, 0); + cb[0] = ALPHA_BLEND(a1 >> 2, cb[0], u1, 1); + cr[0] = ALPHA_BLEND(a1 >> 2, cr[0], v1, 1); + cb++; + cr++; + p += 2 * BPP; + lum += 2; + } + if (w) { + YUVA_IN(y, u, v, a, p, pal); + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + cb[0] = ALPHA_BLEND(a >> 2, cb[0], u, 0); + cr[0] = ALPHA_BLEND(a >> 2, cr[0], v, 0); + p++; + lum++; + } + p += wrap3 - dstw * BPP; + lum += wrap - dstw - dstx; + cb += dst->linesize[1] - width2 - skip2; + cr += dst->linesize[2] - width2 - skip2; + } + for (h = dsth - (dsty & 1); h >= 2; h -= 2) { + lum += dstx; + cb += skip2; + cr += skip2; + + if (dstx & 1) { + YUVA_IN(y, u, v, a, p, pal); + u1 = u; + v1 = v; + a1 = a; + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + p += wrap3; + lum += wrap; + YUVA_IN(y, u, v, a, p, pal); + u1 += u; + v1 += v; + a1 += a; + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + cb[0] = ALPHA_BLEND(a1 >> 2, cb[0], u1, 1); + cr[0] = ALPHA_BLEND(a1 >> 2, cr[0], v1, 1); + cb++; + cr++; + p += -wrap3 + BPP; + lum += -wrap + 1; + } + for (w = dstw - (dstx & 1); w >= 2; w -= 2) { + YUVA_IN(y, u, v, a, p, pal); + u1 = u; + v1 = v; + a1 = a; + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + + YUVA_IN(y, u, v, a, p + BPP, pal); + u1 += u; + v1 += v; + a1 += a; + lum[1] = ALPHA_BLEND(a, lum[1], y, 0); + p += wrap3; + lum += wrap; + + YUVA_IN(y, u, v, a, p, pal); + u1 += u; + v1 += v; + a1 += a; + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + + YUVA_IN(y, u, v, a, p + BPP, pal); + u1 += u; + v1 += v; + a1 += a; + lum[1] = ALPHA_BLEND(a, lum[1], y, 0); + + cb[0] = ALPHA_BLEND(a1 >> 2, cb[0], u1, 2); + cr[0] = ALPHA_BLEND(a1 >> 2, cr[0], v1, 2); + + cb++; + cr++; + p += -wrap3 + 2 * BPP; + lum += -wrap + 2; + } + if (w) { + YUVA_IN(y, u, v, a, p, pal); + u1 = u; + v1 = v; + a1 = a; + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + p += wrap3; + lum += wrap; + YUVA_IN(y, u, v, a, p, pal); + u1 += u; + v1 += v; + a1 += a; + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + cb[0] = ALPHA_BLEND(a1 >> 2, cb[0], u1, 1); + cr[0] = ALPHA_BLEND(a1 >> 2, cr[0], v1, 1); + cb++; + cr++; + p += -wrap3 + BPP; + lum += -wrap + 1; + } + p += wrap3 + (wrap3 - dstw * BPP); + lum += wrap + (wrap - dstw - dstx); + cb += dst->linesize[1] - width2 - skip2; + cr += dst->linesize[2] - width2 - skip2; + } + /* handle odd height */ + if (h) { + lum += dstx; + cb += skip2; + cr += skip2; + + if (dstx & 1) { + YUVA_IN(y, u, v, a, p, pal); + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + cb[0] = ALPHA_BLEND(a >> 2, cb[0], u, 0); + cr[0] = ALPHA_BLEND(a >> 2, cr[0], v, 0); + cb++; + cr++; + lum++; + p += BPP; + } + for (w = dstw - (dstx & 1); w >= 2; w -= 2) { + YUVA_IN(y, u, v, a, p, pal); + u1 = u; + v1 = v; + a1 = a; + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + + YUVA_IN(y, u, v, a, p + BPP, pal); + u1 += u; + v1 += v; + a1 += a; + lum[1] = ALPHA_BLEND(a, lum[1], y, 0); + cb[0] = ALPHA_BLEND(a1 >> 2, cb[0], u, 1); + cr[0] = ALPHA_BLEND(a1 >> 2, cr[0], v, 1); + cb++; + cr++; + p += 2 * BPP; + lum += 2; + } + if (w) { + YUVA_IN(y, u, v, a, p, pal); + lum[0] = ALPHA_BLEND(a, lum[0], y, 0); + cb[0] = ALPHA_BLEND(a >> 2, cb[0], u, 0); + cr[0] = ALPHA_BLEND(a >> 2, cr[0], v, 0); + } + } +} + +static void free_subpicture(SubPicture *sp) +{ + avsubtitle_free(&sp->sub); +} + +static void video_image_display(VideoState *is) +{ + VideoPicture *vp; + SubPicture *sp; + AVPicture pict; + float aspect_ratio; + int width, height, x, y; + SDL_Rect rect; + int i; + + vp = &is->pictq[is->pictq_rindex]; + if (vp->bmp) { +#if CONFIG_AVFILTER + if (vp->picref->video->pixel_aspect.num == 0) + aspect_ratio = 0; + else + aspect_ratio = av_q2d(vp->picref->video->pixel_aspect); +#else + + /* XXX: use variable in the frame */ + if (is->video_st->sample_aspect_ratio.num) + aspect_ratio = av_q2d(is->video_st->sample_aspect_ratio); + else if (is->video_st->codec->sample_aspect_ratio.num) + aspect_ratio = av_q2d(is->video_st->codec->sample_aspect_ratio); + else + aspect_ratio = 0; +#endif + if (aspect_ratio <= 0.0) + aspect_ratio = 1.0; + aspect_ratio *= (float)vp->width / (float)vp->height; + + if (is->subtitle_st) + { + if (is->subpq_size > 0) + { + sp = &is->subpq[is->subpq_rindex]; + + if (vp->pts >= sp->pts + ((float) sp->sub.start_display_time / 1000)) + { + SDL_LockYUVOverlay (vp->bmp); + + pict.data[0] = vp->bmp->pixels[0]; + pict.data[1] = vp->bmp->pixels[2]; + pict.data[2] = vp->bmp->pixels[1]; + + pict.linesize[0] = vp->bmp->pitches[0]; + pict.linesize[1] = vp->bmp->pitches[2]; + pict.linesize[2] = vp->bmp->pitches[1]; + + for (i = 0; i < sp->sub.num_rects; i++) + blend_subrect(&pict, sp->sub.rects[i], + vp->bmp->w, vp->bmp->h); + + SDL_UnlockYUVOverlay (vp->bmp); + } + } + } + + + /* XXX: we suppose the screen has a 1.0 pixel ratio */ + height = is->height; + width = ((int)rint(height * aspect_ratio)) & ~1; + if (width > is->width) { + width = is->width; + height = ((int)rint(width / aspect_ratio)) & ~1; + } + x = (is->width - width) / 2; + y = (is->height - height) / 2; + is->no_background = 0; + rect.x = is->xleft + x; + rect.y = is->ytop + y; + rect.w = width; + rect.h = height; + SDL_DisplayYUVOverlay(vp->bmp, &rect); + } +} + +/* get the current audio output buffer size, in samples. With SDL, we + cannot have a precise information */ +static int audio_write_get_buf_size(VideoState *is) +{ + return is->audio_buf_size - is->audio_buf_index; +} + +static inline int compute_mod(int a, int b) +{ + a = a % b; + if (a >= 0) + return a; + else + return a + b; +} + +static void video_audio_display(VideoState *s) +{ + int i, i_start, x, y1, y, ys, delay, n, nb_display_channels; + int ch, channels, h, h2, bgcolor, fgcolor; + int16_t time_diff; + int rdft_bits, nb_freq; + + for (rdft_bits = 1; (1 << rdft_bits) < 2 * s->height; rdft_bits++) + ; + nb_freq = 1 << (rdft_bits - 1); + + /* compute display index : center on currently output samples */ + channels = s->audio_st->codec->channels; + nb_display_channels = channels; + if (!s->paused) { + int data_used = s->show_audio == 1 ? s->width : (2 * nb_freq); + n = 2 * channels; + delay = audio_write_get_buf_size(s); + delay /= n; + + /* to be more precise, we take into account the time spent since + the last buffer computation */ + if (audio_callback_time) { + time_diff = av_gettime() - audio_callback_time; + delay -= (time_diff * s->audio_st->codec->sample_rate) / 1000000; + } + + delay += 2 * data_used; + if (delay < data_used) + delay = data_used; + + i_start= x = compute_mod(s->sample_array_index - delay * channels, SAMPLE_ARRAY_SIZE); + if (s->show_audio == 1) { + h = INT_MIN; + for (i = 0; i < 1000; i += channels) { + int idx = (SAMPLE_ARRAY_SIZE + x - i) % SAMPLE_ARRAY_SIZE; + int a = s->sample_array[idx]; + int b = s->sample_array[(idx + 4 * channels) % SAMPLE_ARRAY_SIZE]; + int c = s->sample_array[(idx + 5 * channels) % SAMPLE_ARRAY_SIZE]; + int d = s->sample_array[(idx + 9 * channels) % SAMPLE_ARRAY_SIZE]; + int score = a - d; + if (h < score && (b ^ c) < 0) { + h = score; + i_start = idx; + } + } + } + + s->last_i_start = i_start; + } else { + i_start = s->last_i_start; + } + + bgcolor = SDL_MapRGB(screen->format, 0x00, 0x00, 0x00); + if (s->show_audio == 1) { + fill_rectangle(screen, + s->xleft, s->ytop, s->width, s->height, + bgcolor); + + fgcolor = SDL_MapRGB(screen->format, 0xff, 0xff, 0xff); + + /* total height for one channel */ + h = s->height / nb_display_channels; + /* graph height / 2 */ + h2 = (h * 9) / 20; + for (ch = 0; ch < nb_display_channels; ch++) { + i = i_start + ch; + y1 = s->ytop + ch * h + (h / 2); /* position of center line */ + for (x = 0; x < s->width; x++) { + y = (s->sample_array[i] * h2) >> 15; + if (y < 0) { + y = -y; + ys = y1 - y; + } else { + ys = y1; + } + fill_rectangle(screen, + s->xleft + x, ys, 1, y, + fgcolor); + i += channels; + if (i >= SAMPLE_ARRAY_SIZE) + i -= SAMPLE_ARRAY_SIZE; + } + } + + fgcolor = SDL_MapRGB(screen->format, 0x00, 0x00, 0xff); + + for (ch = 1; ch < nb_display_channels; ch++) { + y = s->ytop + ch * h; + fill_rectangle(screen, + s->xleft, y, s->width, 1, + fgcolor); + } + SDL_UpdateRect(screen, s->xleft, s->ytop, s->width, s->height); + } else { + nb_display_channels= FFMIN(nb_display_channels, 2); + if (rdft_bits != s->rdft_bits) { + av_rdft_end(s->rdft); + av_free(s->rdft_data); + s->rdft = av_rdft_init(rdft_bits, DFT_R2C); + s->rdft_bits = rdft_bits; + s->rdft_data = av_malloc(4 * nb_freq * sizeof(*s->rdft_data)); + } + { + FFTSample *data[2]; + for (ch = 0; ch < nb_display_channels; ch++) { + data[ch] = s->rdft_data + 2 * nb_freq * ch; + i = i_start + ch; + for (x = 0; x < 2 * nb_freq; x++) { + double w = (x-nb_freq) * (1.0 / nb_freq); + data[ch][x] = s->sample_array[i] * (1.0 - w * w); + i += channels; + if (i >= SAMPLE_ARRAY_SIZE) + i -= SAMPLE_ARRAY_SIZE; + } + av_rdft_calc(s->rdft, data[ch]); + } + // least efficient way to do this, we should of course directly access it but its more than fast enough + for (y = 0; y < s->height; y++) { + double w = 1 / sqrt(nb_freq); + int a = sqrt(w * sqrt(data[0][2 * y + 0] * data[0][2 * y + 0] + data[0][2 * y + 1] * data[0][2 * y + 1])); + int b = (nb_display_channels == 2 ) ? sqrt(w * sqrt(data[1][2 * y + 0] * data[1][2 * y + 0] + + data[1][2 * y + 1] * data[1][2 * y + 1])) : a; + a = FFMIN(a, 255); + b = FFMIN(b, 255); + fgcolor = SDL_MapRGB(screen->format, a, b, (a + b) / 2); + + fill_rectangle(screen, + s->xpos, s->height-y, 1, 1, + fgcolor); + } + } + SDL_UpdateRect(screen, s->xpos, s->ytop, 1, s->height); + s->xpos++; + if (s->xpos >= s->width) + s->xpos= s->xleft; + } +} + +static int video_open(VideoState *is) +{ + int flags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL; + int w,h; + + if (is_full_screen) flags |= SDL_FULLSCREEN; + else flags |= SDL_RESIZABLE; + + if (is_full_screen && fs_screen_width) { + w = fs_screen_width; + h = fs_screen_height; + } else if (!is_full_screen && screen_width) { + w = screen_width; + h = screen_height; +#if CONFIG_AVFILTER + } else if (is->out_video_filter && is->out_video_filter->inputs[0]) { + w = is->out_video_filter->inputs[0]->w; + h = is->out_video_filter->inputs[0]->h; +#else + } else if (is->video_st && is->video_st->codec->width) { + w = is->video_st->codec->width; + h = is->video_st->codec->height; +#endif + } else { + w = 640; + h = 480; + } + if (screen && is->width == screen->w && screen->w == w + && is->height== screen->h && screen->h == h) + return 0; + +#if defined(__APPLE__) && !SDL_VERSION_ATLEAST(1, 2, 14) + /* setting bits_per_pixel = 0 or 32 causes blank video on OS X and older SDL */ + screen = SDL_SetVideoMode(w, h, 24, flags); +#else + screen = SDL_SetVideoMode(w, h, 0, flags); +#endif + if (!screen) { + fprintf(stderr, "SDL: could not set video mode - exiting\n"); + return -1; + } + if (!window_title) + window_title = input_filename; + SDL_WM_SetCaption(window_title, window_title); + + is->width = screen->w; + is->height = screen->h; + + return 0; +} + +/* display the current picture, if any */ +static void video_display(VideoState *is) +{ + if (!screen) + video_open(cur_stream); + if (is->audio_st && is->show_audio) + video_audio_display(is); + else if (is->video_st) + video_image_display(is); +} + +static int refresh_thread(void *opaque) +{ + VideoState *is= opaque; + while (!is->abort_request) { + SDL_Event event; + event.type = FF_REFRESH_EVENT; + event.user.data1 = opaque; + if (!is->refresh) { + is->refresh = 1; + SDL_PushEvent(&event); + } + usleep(is->audio_st && is->show_audio ? rdftspeed * 1000 : 5000); // FIXME ideally we should wait the correct time but SDLs event passing is so slow it would be silly + } + return 0; +} + +/* get the current audio clock value */ +static double get_audio_clock(VideoState *is) +{ + double pts; + int hw_buf_size, bytes_per_sec; + pts = is->audio_clock; + hw_buf_size = audio_write_get_buf_size(is); + bytes_per_sec = 0; + if (is->audio_st) { + bytes_per_sec = is->audio_st->codec->sample_rate * + 2 * is->audio_st->codec->channels; + } + if (bytes_per_sec) + pts -= (double)hw_buf_size / bytes_per_sec; + return pts; +} + +/* get the current video clock value */ +static double get_video_clock(VideoState *is) +{ + if (is->paused) { + return is->video_current_pts; + } else { + return is->video_current_pts_drift + av_gettime() / 1000000.0; + } +} + +/* get the current external clock value */ +static double get_external_clock(VideoState *is) +{ + int64_t ti; + ti = av_gettime(); + return is->external_clock + ((ti - is->external_clock_time) * 1e-6); +} + +/* get the current master clock value */ +static double get_master_clock(VideoState *is) +{ + double val; + + if (is->av_sync_type == AV_SYNC_VIDEO_MASTER) { + if (is->video_st) + val = get_video_clock(is); + else + val = get_audio_clock(is); + } else if (is->av_sync_type == AV_SYNC_AUDIO_MASTER) { + if (is->audio_st) + val = get_audio_clock(is); + else + val = get_video_clock(is); + } else { + val = get_external_clock(is); + } + return val; +} + +/* seek in the stream */ +static void stream_seek(VideoState *is, int64_t pos, int64_t rel, int seek_by_bytes) +{ + if (!is->seek_req) { + is->seek_pos = pos; + is->seek_rel = rel; + is->seek_flags &= ~AVSEEK_FLAG_BYTE; + if (seek_by_bytes) + is->seek_flags |= AVSEEK_FLAG_BYTE; + is->seek_req = 1; + } +} + +/* pause or resume the video */ +static void stream_pause(VideoState *is) +{ + if (is->paused) { + is->frame_timer += av_gettime() / 1000000.0 + is->video_current_pts_drift - is->video_current_pts; + if (is->read_pause_return != AVERROR(ENOSYS)) { + is->video_current_pts = is->video_current_pts_drift + av_gettime() / 1000000.0; + } + is->video_current_pts_drift = is->video_current_pts - av_gettime() / 1000000.0; + } + is->paused = !is->paused; +} + +static double compute_target_time(double frame_current_pts, VideoState *is) +{ + double delay, sync_threshold, diff; + + /* compute nominal delay */ + delay = frame_current_pts - is->frame_last_pts; + if (delay <= 0 || delay >= 10.0) { + /* if incorrect delay, use previous one */ + delay = is->frame_last_delay; + } else { + is->frame_last_delay = delay; + } + is->frame_last_pts = frame_current_pts; + + /* update delay to follow master synchronisation source */ + if (((is->av_sync_type == AV_SYNC_AUDIO_MASTER && is->audio_st) || + is->av_sync_type == AV_SYNC_EXTERNAL_CLOCK)) { + /* if video is slave, we try to correct big delays by + duplicating or deleting a frame */ + diff = get_video_clock(is) - get_master_clock(is); + + /* skip or repeat frame. We take into account the + delay to compute the threshold. I still don't know + if it is the best guess */ + sync_threshold = FFMAX(AV_SYNC_THRESHOLD, delay); + if (fabs(diff) < AV_NOSYNC_THRESHOLD) { + if (diff <= -sync_threshold) + delay = 0; + else if (diff >= sync_threshold) + delay = 2 * delay; + } + } + is->frame_timer += delay; + + av_dlog(NULL, "video: delay=%0.3f pts=%0.3f A-V=%f\n", + delay, frame_current_pts, -diff); + + return is->frame_timer; +} + +/* called to display each frame */ +static void video_refresh_timer(void *opaque) +{ + VideoState *is = opaque; + VideoPicture *vp; + + SubPicture *sp, *sp2; + + if (is->video_st) { +retry: + if (is->pictq_size == 0) { + // nothing to do, no picture to display in the que + } else { + double time = av_gettime() / 1000000.0; + double next_target; + /* dequeue the picture */ + vp = &is->pictq[is->pictq_rindex]; + + if (time < vp->target_clock) + return; + /* update current video pts */ + is->video_current_pts = vp->pts; + is->video_current_pts_drift = is->video_current_pts - time; + is->video_current_pos = vp->pos; + if (is->pictq_size > 1) { + VideoPicture *nextvp = &is->pictq[(is->pictq_rindex + 1) % VIDEO_PICTURE_QUEUE_SIZE]; + assert(nextvp->target_clock >= vp->target_clock); + next_target= nextvp->target_clock; + } else { + next_target = vp->target_clock + is->video_clock - vp->pts; // FIXME pass durations cleanly + } + if (framedrop && time > next_target) { + is->skip_frames *= 1.0 + FRAME_SKIP_FACTOR; + if (is->pictq_size > 1 || time > next_target + 0.5) { + /* update queue size and signal for next picture */ + if (++is->pictq_rindex == VIDEO_PICTURE_QUEUE_SIZE) + is->pictq_rindex = 0; + + SDL_LockMutex(is->pictq_mutex); + is->pictq_size--; + SDL_CondSignal(is->pictq_cond); + SDL_UnlockMutex(is->pictq_mutex); + goto retry; + } + } + + if (is->subtitle_st) { + if (is->subtitle_stream_changed) { + SDL_LockMutex(is->subpq_mutex); + + while (is->subpq_size) { + free_subpicture(&is->subpq[is->subpq_rindex]); + + /* update queue size and signal for next picture */ + if (++is->subpq_rindex == SUBPICTURE_QUEUE_SIZE) + is->subpq_rindex = 0; + + is->subpq_size--; + } + is->subtitle_stream_changed = 0; + + SDL_CondSignal(is->subpq_cond); + SDL_UnlockMutex(is->subpq_mutex); + } else { + if (is->subpq_size > 0) { + sp = &is->subpq[is->subpq_rindex]; + + if (is->subpq_size > 1) + sp2 = &is->subpq[(is->subpq_rindex + 1) % SUBPICTURE_QUEUE_SIZE]; + else + sp2 = NULL; + + if ((is->video_current_pts > (sp->pts + ((float) sp->sub.end_display_time / 1000))) + || (sp2 && is->video_current_pts > (sp2->pts + ((float) sp2->sub.start_display_time / 1000)))) + { + free_subpicture(sp); + + /* update queue size and signal for next picture */ + if (++is->subpq_rindex == SUBPICTURE_QUEUE_SIZE) + is->subpq_rindex = 0; + + SDL_LockMutex(is->subpq_mutex); + is->subpq_size--; + SDL_CondSignal(is->subpq_cond); + SDL_UnlockMutex(is->subpq_mutex); + } + } + } + } + + /* display picture */ + if (!display_disable) + video_display(is); + + /* update queue size and signal for next picture */ + if (++is->pictq_rindex == VIDEO_PICTURE_QUEUE_SIZE) + is->pictq_rindex = 0; + + SDL_LockMutex(is->pictq_mutex); + is->pictq_size--; + SDL_CondSignal(is->pictq_cond); + SDL_UnlockMutex(is->pictq_mutex); + } + } else if (is->audio_st) { + /* draw the next audio frame */ + + /* if only audio stream, then display the audio bars (better + than nothing, just to test the implementation */ + + /* display picture */ + if (!display_disable) + video_display(is); + } + if (show_status) { + static int64_t last_time; + int64_t cur_time; + int aqsize, vqsize, sqsize; + double av_diff; + + cur_time = av_gettime(); + if (!last_time || (cur_time - last_time) >= 30000) { + aqsize = 0; + vqsize = 0; + sqsize = 0; + if (is->audio_st) + aqsize = is->audioq.size; + if (is->video_st) + vqsize = is->videoq.size; + if (is->subtitle_st) + sqsize = is->subtitleq.size; + av_diff = 0; + if (is->audio_st && is->video_st) + av_diff = get_audio_clock(is) - get_video_clock(is); + printf("%7.2f A-V:%7.3f s:%3.1f aq=%5dKB vq=%5dKB sq=%5dB f=%"PRId64"/%"PRId64" \r", + get_master_clock(is), av_diff, FFMAX(is->skip_frames - 1, 0), aqsize / 1024, + vqsize / 1024, sqsize, is->pts_ctx.num_faulty_dts, is->pts_ctx.num_faulty_pts); + fflush(stdout); + last_time = cur_time; + } + } +} + +static void stream_close(VideoState *is) +{ + VideoPicture *vp; + int i; + /* XXX: use a special url_shutdown call to abort parse cleanly */ + is->abort_request = 1; + SDL_WaitThread(is->parse_tid, NULL); + SDL_WaitThread(is->refresh_tid, NULL); + + /* free all pictures */ + for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) { + vp = &is->pictq[i]; +#if CONFIG_AVFILTER + if (vp->picref) { + avfilter_unref_buffer(vp->picref); + vp->picref = NULL; + } +#endif + if (vp->bmp) { + SDL_FreeYUVOverlay(vp->bmp); + vp->bmp = NULL; + } + } + SDL_DestroyMutex(is->pictq_mutex); + SDL_DestroyCond(is->pictq_cond); + SDL_DestroyMutex(is->subpq_mutex); + SDL_DestroyCond(is->subpq_cond); +#if !CONFIG_AVFILTER + if (is->img_convert_ctx) + sws_freeContext(is->img_convert_ctx); +#endif + av_free(is); +} + +static void do_exit(void) +{ + if (cur_stream) { + stream_close(cur_stream); + cur_stream = NULL; + } + uninit_opts(); +#if CONFIG_AVFILTER + avfilter_uninit(); +#endif + avformat_network_deinit(); + if (show_status) + printf("\n"); + SDL_Quit(); + av_log(NULL, AV_LOG_QUIET, ""); + exit(0); +} + +/* allocate a picture (needs to do that in main thread to avoid + potential locking problems */ +static void alloc_picture(void *opaque) +{ + VideoState *is = opaque; + VideoPicture *vp; + + vp = &is->pictq[is->pictq_windex]; + + if (vp->bmp) + SDL_FreeYUVOverlay(vp->bmp); + +#if CONFIG_AVFILTER + if (vp->picref) + avfilter_unref_buffer(vp->picref); + vp->picref = NULL; + + vp->width = is->out_video_filter->inputs[0]->w; + vp->height = is->out_video_filter->inputs[0]->h; + vp->pix_fmt = is->out_video_filter->inputs[0]->format; +#else + vp->width = is->video_st->codec->width; + vp->height = is->video_st->codec->height; + vp->pix_fmt = is->video_st->codec->pix_fmt; +#endif + + vp->bmp = SDL_CreateYUVOverlay(vp->width, vp->height, + SDL_YV12_OVERLAY, + screen); + if (!vp->bmp || vp->bmp->pitches[0] < vp->width) { + /* SDL allocates a buffer smaller than requested if the video + * overlay hardware is unable to support the requested size. */ + fprintf(stderr, "Error: the video system does not support an image\n" + "size of %dx%d pixels. Try using -lowres or -vf \"scale=w:h\"\n" + "to reduce the image size.\n", vp->width, vp->height ); + do_exit(); + } + + SDL_LockMutex(is->pictq_mutex); + vp->allocated = 1; + SDL_CondSignal(is->pictq_cond); + SDL_UnlockMutex(is->pictq_mutex); +} + +/** + * + * @param pts the dts of the pkt / pts of the frame and guessed if not known + */ +static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t pos) +{ + VideoPicture *vp; +#if CONFIG_AVFILTER + AVPicture pict_src; +#else + int dst_pix_fmt = PIX_FMT_YUV420P; +#endif + /* wait until we have space to put a new picture */ + SDL_LockMutex(is->pictq_mutex); + + if (is->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE && !is->refresh) + is->skip_frames = FFMAX(1.0 - FRAME_SKIP_FACTOR, is->skip_frames * (1.0 - FRAME_SKIP_FACTOR)); + + while (is->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE && + !is->videoq.abort_request) { + SDL_CondWait(is->pictq_cond, is->pictq_mutex); + } + SDL_UnlockMutex(is->pictq_mutex); + + if (is->videoq.abort_request) + return -1; + + vp = &is->pictq[is->pictq_windex]; + + /* alloc or resize hardware picture buffer */ + if (!vp->bmp || vp->reallocate || +#if CONFIG_AVFILTER + vp->width != is->out_video_filter->inputs[0]->w || + vp->height != is->out_video_filter->inputs[0]->h) { +#else + vp->width != is->video_st->codec->width || + vp->height != is->video_st->codec->height) { +#endif + SDL_Event event; + + vp->allocated = 0; + vp->reallocate = 0; + + /* the allocation must be done in the main thread to avoid + locking problems */ + event.type = FF_ALLOC_EVENT; + event.user.data1 = is; + SDL_PushEvent(&event); + + /* wait until the picture is allocated */ + SDL_LockMutex(is->pictq_mutex); + while (!vp->allocated && !is->videoq.abort_request) { + SDL_CondWait(is->pictq_cond, is->pictq_mutex); + } + SDL_UnlockMutex(is->pictq_mutex); + + if (is->videoq.abort_request) + return -1; + } + + /* if the frame is not skipped, then display it */ + if (vp->bmp) { + AVPicture pict; +#if CONFIG_AVFILTER + if (vp->picref) + avfilter_unref_buffer(vp->picref); + vp->picref = src_frame->opaque; +#endif + + /* get a pointer on the bitmap */ + SDL_LockYUVOverlay (vp->bmp); + + memset(&pict, 0, sizeof(AVPicture)); + pict.data[0] = vp->bmp->pixels[0]; + pict.data[1] = vp->bmp->pixels[2]; + pict.data[2] = vp->bmp->pixels[1]; + + pict.linesize[0] = vp->bmp->pitches[0]; + pict.linesize[1] = vp->bmp->pitches[2]; + pict.linesize[2] = vp->bmp->pitches[1]; + +#if CONFIG_AVFILTER + pict_src.data[0] = src_frame->data[0]; + pict_src.data[1] = src_frame->data[1]; + pict_src.data[2] = src_frame->data[2]; + + pict_src.linesize[0] = src_frame->linesize[0]; + pict_src.linesize[1] = src_frame->linesize[1]; + pict_src.linesize[2] = src_frame->linesize[2]; + + // FIXME use direct rendering + av_picture_copy(&pict, &pict_src, + vp->pix_fmt, vp->width, vp->height); +#else + sws_flags = av_get_int(sws_opts, "sws_flags", NULL); + is->img_convert_ctx = sws_getCachedContext(is->img_convert_ctx, + vp->width, vp->height, vp->pix_fmt, vp->width, vp->height, + dst_pix_fmt, sws_flags, NULL, NULL, NULL); + if (is->img_convert_ctx == NULL) { + fprintf(stderr, "Cannot initialize the conversion context\n"); + exit(1); + } + sws_scale(is->img_convert_ctx, src_frame->data, src_frame->linesize, + 0, vp->height, pict.data, pict.linesize); +#endif + /* update the bitmap content */ + SDL_UnlockYUVOverlay(vp->bmp); + + vp->pts = pts; + vp->pos = pos; + + /* now we can update the picture count */ + if (++is->pictq_windex == VIDEO_PICTURE_QUEUE_SIZE) + is->pictq_windex = 0; + SDL_LockMutex(is->pictq_mutex); + vp->target_clock = compute_target_time(vp->pts, is); + + is->pictq_size++; + SDL_UnlockMutex(is->pictq_mutex); + } + return 0; +} + +/** + * compute the exact PTS for the picture if it is omitted in the stream + * @param pts1 the dts of the pkt / pts of the frame + */ +static int output_picture2(VideoState *is, AVFrame *src_frame, double pts1, int64_t pos) +{ + double frame_delay, pts; + + pts = pts1; + + if (pts != 0) { + /* update video clock with pts, if present */ + is->video_clock = pts; + } else { + pts = is->video_clock; + } + /* update video clock for next frame */ + frame_delay = av_q2d(is->video_st->codec->time_base); + /* for MPEG2, the frame can be repeated, so we update the + clock accordingly */ + frame_delay += src_frame->repeat_pict * (frame_delay * 0.5); + is->video_clock += frame_delay; + + return queue_picture(is, src_frame, pts, pos); +} + +static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacket *pkt) +{ + int got_picture, i; + + if (packet_queue_get(&is->videoq, pkt, 1) < 0) + return -1; + + if (pkt->data == flush_pkt.data) { + avcodec_flush_buffers(is->video_st->codec); + + SDL_LockMutex(is->pictq_mutex); + // Make sure there are no long delay timers (ideally we should just flush the que but thats harder) + for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) { + is->pictq[i].target_clock= 0; + } + while (is->pictq_size && !is->videoq.abort_request) { + SDL_CondWait(is->pictq_cond, is->pictq_mutex); + } + is->video_current_pos = -1; + SDL_UnlockMutex(is->pictq_mutex); + + init_pts_correction(&is->pts_ctx); + is->frame_last_pts = AV_NOPTS_VALUE; + is->frame_last_delay = 0; + is->frame_timer = (double)av_gettime() / 1000000.0; + is->skip_frames = 1; + is->skip_frames_index = 0; + return 0; + } + + avcodec_decode_video2(is->video_st->codec, frame, &got_picture, pkt); + + if (got_picture) { + if (decoder_reorder_pts == -1) { + *pts = guess_correct_pts(&is->pts_ctx, frame->pkt_pts, frame->pkt_dts); + } else if (decoder_reorder_pts) { + *pts = frame->pkt_pts; + } else { + *pts = frame->pkt_dts; + } + + if (*pts == AV_NOPTS_VALUE) { + *pts = 0; + } + + is->skip_frames_index += 1; + if (is->skip_frames_index >= is->skip_frames) { + is->skip_frames_index -= FFMAX(is->skip_frames, 1.0); + return 1; + } + + } + return 0; +} + +#if CONFIG_AVFILTER +typedef struct { + VideoState *is; + AVFrame *frame; + int use_dr1; +} FilterPriv; + +static int input_get_buffer(AVCodecContext *codec, AVFrame *pic) +{ + AVFilterContext *ctx = codec->opaque; + AVFilterBufferRef *ref; + int perms = AV_PERM_WRITE; + int i, w, h, stride[4]; + unsigned edge; + int pixel_size; + + if (codec->codec->capabilities & CODEC_CAP_NEG_LINESIZES) + perms |= AV_PERM_NEG_LINESIZES; + + if (pic->buffer_hints & FF_BUFFER_HINTS_VALID) { + if (pic->buffer_hints & FF_BUFFER_HINTS_READABLE) perms |= AV_PERM_READ; + if (pic->buffer_hints & FF_BUFFER_HINTS_PRESERVE) perms |= AV_PERM_PRESERVE; + if (pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE) perms |= AV_PERM_REUSE2; + } + if (pic->reference) perms |= AV_PERM_READ | AV_PERM_PRESERVE; + + w = codec->width; + h = codec->height; + avcodec_align_dimensions2(codec, &w, &h, stride); + edge = codec->flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width(); + w += edge << 1; + h += edge << 1; + + if (!(ref = avfilter_get_video_buffer(ctx->outputs[0], perms, w, h))) + return -1; + + pixel_size = av_pix_fmt_descriptors[ref->format].comp[0].step_minus1 + 1; + ref->video->w = codec->width; + ref->video->h = codec->height; + for (i = 0; i < 4; i ++) { + unsigned hshift = (i == 1 || i == 2) ? av_pix_fmt_descriptors[ref->format].log2_chroma_w : 0; + unsigned vshift = (i == 1 || i == 2) ? av_pix_fmt_descriptors[ref->format].log2_chroma_h : 0; + + if (ref->data[i]) { + ref->data[i] += ((edge * pixel_size) >> hshift) + ((edge * ref->linesize[i]) >> vshift); + } + pic->data[i] = ref->data[i]; + pic->linesize[i] = ref->linesize[i]; + } + pic->opaque = ref; + pic->type = FF_BUFFER_TYPE_USER; + pic->reordered_opaque = codec->reordered_opaque; + if (codec->pkt) pic->pkt_pts = codec->pkt->pts; + else pic->pkt_pts = AV_NOPTS_VALUE; + return 0; +} + +static void input_release_buffer(AVCodecContext *codec, AVFrame *pic) +{ + memset(pic->data, 0, sizeof(pic->data)); + avfilter_unref_buffer(pic->opaque); +} + +static int input_reget_buffer(AVCodecContext *codec, AVFrame *pic) +{ + AVFilterBufferRef *ref = pic->opaque; + + if (pic->data[0] == NULL) { + pic->buffer_hints |= FF_BUFFER_HINTS_READABLE; + return codec->get_buffer(codec, pic); + } + + if ((codec->width != ref->video->w) || (codec->height != ref->video->h) || + (codec->pix_fmt != ref->format)) { + av_log(codec, AV_LOG_ERROR, "Picture properties changed.\n"); + return -1; + } + + pic->reordered_opaque = codec->reordered_opaque; + if (codec->pkt) pic->pkt_pts = codec->pkt->pts; + else pic->pkt_pts = AV_NOPTS_VALUE; + return 0; +} + +static int input_init(AVFilterContext *ctx, const char *args, void *opaque) +{ + FilterPriv *priv = ctx->priv; + AVCodecContext *codec; + if (!opaque) return -1; + + priv->is = opaque; + codec = priv->is->video_st->codec; + codec->opaque = ctx; + if (codec->codec->capabilities & CODEC_CAP_DR1) { + priv->use_dr1 = 1; + codec->get_buffer = input_get_buffer; + codec->release_buffer = input_release_buffer; + codec->reget_buffer = input_reget_buffer; + codec->thread_safe_callbacks = 1; + } + + priv->frame = avcodec_alloc_frame(); + + return 0; +} + +static void input_uninit(AVFilterContext *ctx) +{ + FilterPriv *priv = ctx->priv; + av_free(priv->frame); +} + +static int input_request_frame(AVFilterLink *link) +{ + FilterPriv *priv = link->src->priv; + AVFilterBufferRef *picref; + int64_t pts = 0; + AVPacket pkt; + int ret; + + while (!(ret = get_video_frame(priv->is, priv->frame, &pts, &pkt))) + av_free_packet(&pkt); + if (ret < 0) + return -1; + + if (priv->use_dr1) { + picref = avfilter_ref_buffer(priv->frame->opaque, ~0); + } else { + picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, link->w, link->h); + av_image_copy(picref->data, picref->linesize, + priv->frame->data, priv->frame->linesize, + picref->format, link->w, link->h); + } + av_free_packet(&pkt); + + avfilter_copy_frame_props(picref, priv->frame); + picref->pts = pts; + + avfilter_start_frame(link, picref); + avfilter_draw_slice(link, 0, link->h, 1); + avfilter_end_frame(link); + + return 0; +} + +static int input_query_formats(AVFilterContext *ctx) +{ + FilterPriv *priv = ctx->priv; + enum PixelFormat pix_fmts[] = { + priv->is->video_st->codec->pix_fmt, PIX_FMT_NONE + }; + + avfilter_set_common_formats(ctx, avfilter_make_format_list(pix_fmts)); + return 0; +} + +static int input_config_props(AVFilterLink *link) +{ + FilterPriv *priv = link->src->priv; + AVCodecContext *c = priv->is->video_st->codec; + + link->w = c->width; + link->h = c->height; + link->time_base = priv->is->video_st->time_base; + + return 0; +} + +static AVFilter input_filter = +{ + .name = "avplay_input", + + .priv_size = sizeof(FilterPriv), + + .init = input_init, + .uninit = input_uninit, + + .query_formats = input_query_formats, + + .inputs = (AVFilterPad[]) {{ .name = NULL }}, + .outputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .request_frame = input_request_frame, + .config_props = input_config_props, }, + { .name = NULL }}, +}; + +static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const char *vfilters) +{ + char sws_flags_str[128]; + int ret; + FFSinkContext ffsink_ctx = { .pix_fmt = PIX_FMT_YUV420P }; + AVFilterContext *filt_src = NULL, *filt_out = NULL; + snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags); + graph->scale_sws_opts = av_strdup(sws_flags_str); + + if ((ret = avfilter_graph_create_filter(&filt_src, &input_filter, "src", + NULL, is, graph)) < 0) + return ret; + if ((ret = avfilter_graph_create_filter(&filt_out, &ffsink, "out", + NULL, &ffsink_ctx, graph)) < 0) + return ret; + + if (vfilters) { + AVFilterInOut *outputs = av_malloc(sizeof(AVFilterInOut)); + AVFilterInOut *inputs = av_malloc(sizeof(AVFilterInOut)); + + outputs->name = av_strdup("in"); + outputs->filter_ctx = filt_src; + outputs->pad_idx = 0; + outputs->next = NULL; + + inputs->name = av_strdup("out"); + inputs->filter_ctx = filt_out; + inputs->pad_idx = 0; + inputs->next = NULL; + + if ((ret = avfilter_graph_parse(graph, vfilters, inputs, outputs, NULL)) < 0) + return ret; + av_freep(&vfilters); + } else { + if ((ret = avfilter_link(filt_src, 0, filt_out, 0)) < 0) + return ret; + } + + if ((ret = avfilter_graph_config(graph, NULL)) < 0) + return ret; + + is->out_video_filter = filt_out; + + return ret; +} + +#endif /* CONFIG_AVFILTER */ + +static int video_thread(void *arg) +{ + VideoState *is = arg; + AVFrame *frame = avcodec_alloc_frame(); + int64_t pts_int; + double pts; + int ret; + +#if CONFIG_AVFILTER + AVFilterGraph *graph = avfilter_graph_alloc(); + AVFilterContext *filt_out = NULL; + int64_t pos; + int last_w = is->video_st->codec->width; + int last_h = is->video_st->codec->height; + + if ((ret = configure_video_filters(graph, is, vfilters)) < 0) + goto the_end; + filt_out = is->out_video_filter; +#endif + + for (;;) { +#if !CONFIG_AVFILTER + AVPacket pkt; +#else + AVFilterBufferRef *picref; + AVRational tb; +#endif + while (is->paused && !is->videoq.abort_request) + SDL_Delay(10); +#if CONFIG_AVFILTER + if ( last_w != is->video_st->codec->width + || last_h != is->video_st->codec->height) { + av_dlog(NULL, "Changing size %dx%d -> %dx%d\n", last_w, last_h, + is->video_st->codec->width, is->video_st->codec->height); + avfilter_graph_free(&graph); + graph = avfilter_graph_alloc(); + if ((ret = configure_video_filters(graph, is, vfilters)) < 0) + goto the_end; + filt_out = is->out_video_filter; + last_w = is->video_st->codec->width; + last_h = is->video_st->codec->height; + } + ret = get_filtered_video_frame(filt_out, frame, &picref, &tb); + if (picref) { + pts_int = picref->pts; + pos = picref->pos; + frame->opaque = picref; + } + + if (av_cmp_q(tb, is->video_st->time_base)) { + av_unused int64_t pts1 = pts_int; + pts_int = av_rescale_q(pts_int, tb, is->video_st->time_base); + av_dlog(NULL, "video_thread(): " + "tb:%d/%d pts:%"PRId64" -> tb:%d/%d pts:%"PRId64"\n", + tb.num, tb.den, pts1, + is->video_st->time_base.num, is->video_st->time_base.den, pts_int); + } +#else + ret = get_video_frame(is, frame, &pts_int, &pkt); +#endif + + if (ret < 0) + goto the_end; + + if (!ret) + continue; + + pts = pts_int * av_q2d(is->video_st->time_base); + +#if CONFIG_AVFILTER + ret = output_picture2(is, frame, pts, pos); +#else + ret = output_picture2(is, frame, pts, pkt.pos); + av_free_packet(&pkt); +#endif + if (ret < 0) + goto the_end; + + if (step) + if (cur_stream) + stream_pause(cur_stream); + } + the_end: +#if CONFIG_AVFILTER + avfilter_graph_free(&graph); +#endif + av_free(frame); + return 0; +} + +static int subtitle_thread(void *arg) +{ + VideoState *is = arg; + SubPicture *sp; + AVPacket pkt1, *pkt = &pkt1; + int got_subtitle; + double pts; + int i, j; + int r, g, b, y, u, v, a; + + for (;;) { + while (is->paused && !is->subtitleq.abort_request) { + SDL_Delay(10); + } + if (packet_queue_get(&is->subtitleq, pkt, 1) < 0) + break; + + if (pkt->data == flush_pkt.data) { + avcodec_flush_buffers(is->subtitle_st->codec); + continue; + } + SDL_LockMutex(is->subpq_mutex); + while (is->subpq_size >= SUBPICTURE_QUEUE_SIZE && + !is->subtitleq.abort_request) { + SDL_CondWait(is->subpq_cond, is->subpq_mutex); + } + SDL_UnlockMutex(is->subpq_mutex); + + if (is->subtitleq.abort_request) + return 0; + + sp = &is->subpq[is->subpq_windex]; + + /* NOTE: ipts is the PTS of the _first_ picture beginning in + this packet, if any */ + pts = 0; + if (pkt->pts != AV_NOPTS_VALUE) + pts = av_q2d(is->subtitle_st->time_base) * pkt->pts; + + avcodec_decode_subtitle2(is->subtitle_st->codec, &sp->sub, + &got_subtitle, pkt); + + if (got_subtitle && sp->sub.format == 0) { + sp->pts = pts; + + for (i = 0; i < sp->sub.num_rects; i++) + { + for (j = 0; j < sp->sub.rects[i]->nb_colors; j++) + { + RGBA_IN(r, g, b, a, (uint32_t*)sp->sub.rects[i]->pict.data[1] + j); + y = RGB_TO_Y_CCIR(r, g, b); + u = RGB_TO_U_CCIR(r, g, b, 0); + v = RGB_TO_V_CCIR(r, g, b, 0); + YUVA_OUT((uint32_t*)sp->sub.rects[i]->pict.data[1] + j, y, u, v, a); + } + } + + /* now we can update the picture count */ + if (++is->subpq_windex == SUBPICTURE_QUEUE_SIZE) + is->subpq_windex = 0; + SDL_LockMutex(is->subpq_mutex); + is->subpq_size++; + SDL_UnlockMutex(is->subpq_mutex); + } + av_free_packet(pkt); + } + return 0; +} + +/* copy samples for viewing in editor window */ +static void update_sample_display(VideoState *is, short *samples, int samples_size) +{ + int size, len; + + size = samples_size / sizeof(short); + while (size > 0) { + len = SAMPLE_ARRAY_SIZE - is->sample_array_index; + if (len > size) + len = size; + memcpy(is->sample_array + is->sample_array_index, samples, len * sizeof(short)); + samples += len; + is->sample_array_index += len; + if (is->sample_array_index >= SAMPLE_ARRAY_SIZE) + is->sample_array_index = 0; + size -= len; + } +} + +/* return the new audio buffer size (samples can be added or deleted + to get better sync if video or external master clock) */ +static int synchronize_audio(VideoState *is, short *samples, + int samples_size1, double pts) +{ + int n, samples_size; + double ref_clock; + + n = 2 * is->audio_st->codec->channels; + samples_size = samples_size1; + + /* if not master, then we try to remove or add samples to correct the clock */ + if (((is->av_sync_type == AV_SYNC_VIDEO_MASTER && is->video_st) || + is->av_sync_type == AV_SYNC_EXTERNAL_CLOCK)) { + double diff, avg_diff; + int wanted_size, min_size, max_size, nb_samples; + + ref_clock = get_master_clock(is); + diff = get_audio_clock(is) - ref_clock; + + if (diff < AV_NOSYNC_THRESHOLD) { + is->audio_diff_cum = diff + is->audio_diff_avg_coef * is->audio_diff_cum; + if (is->audio_diff_avg_count < AUDIO_DIFF_AVG_NB) { + /* not enough measures to have a correct estimate */ + is->audio_diff_avg_count++; + } else { + /* estimate the A-V difference */ + avg_diff = is->audio_diff_cum * (1.0 - is->audio_diff_avg_coef); + + if (fabs(avg_diff) >= is->audio_diff_threshold) { + wanted_size = samples_size + ((int)(diff * is->audio_st->codec->sample_rate) * n); + nb_samples = samples_size / n; + + min_size = ((nb_samples * (100 - SAMPLE_CORRECTION_PERCENT_MAX)) / 100) * n; + max_size = ((nb_samples * (100 + SAMPLE_CORRECTION_PERCENT_MAX)) / 100) * n; + if (wanted_size < min_size) + wanted_size = min_size; + else if (wanted_size > max_size) + wanted_size = max_size; + + /* add or remove samples to correction the synchro */ + if (wanted_size < samples_size) { + /* remove samples */ + samples_size = wanted_size; + } else if (wanted_size > samples_size) { + uint8_t *samples_end, *q; + int nb; + + /* add samples */ + nb = (samples_size - wanted_size); + samples_end = (uint8_t *)samples + samples_size - n; + q = samples_end + n; + while (nb > 0) { + memcpy(q, samples_end, n); + q += n; + nb -= n; + } + samples_size = wanted_size; + } + } + av_dlog(NULL, "diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f\n", + diff, avg_diff, samples_size - samples_size1, + is->audio_clock, is->video_clock, is->audio_diff_threshold); + } + } else { + /* too big difference : may be initial PTS errors, so + reset A-V filter */ + is->audio_diff_avg_count = 0; + is->audio_diff_cum = 0; + } + } + + return samples_size; +} + +/* decode one audio frame and returns its uncompressed size */ +static int audio_decode_frame(VideoState *is, double *pts_ptr) +{ + AVPacket *pkt_temp = &is->audio_pkt_temp; + AVPacket *pkt = &is->audio_pkt; + AVCodecContext *dec = is->audio_st->codec; + int n, len1, data_size, got_frame; + double pts; + int new_packet = 0; + int flush_complete = 0; + + for (;;) { + /* NOTE: the audio packet can contain several frames */ + while (pkt_temp->size > 0 || (!pkt_temp->data && new_packet)) { + if (!is->frame) { + if (!(is->frame = avcodec_alloc_frame())) + return AVERROR(ENOMEM); + } else + avcodec_get_frame_defaults(is->frame); + + if (flush_complete) + break; + new_packet = 0; + len1 = avcodec_decode_audio4(dec, is->frame, &got_frame, pkt_temp); + if (len1 < 0) { + /* if error, we skip the frame */ + pkt_temp->size = 0; + break; + } + + pkt_temp->data += len1; + pkt_temp->size -= len1; + + if (!got_frame) { + /* stop sending empty packets if the decoder is finished */ + if (!pkt_temp->data && dec->codec->capabilities & CODEC_CAP_DELAY) + flush_complete = 1; + continue; + } + data_size = av_samples_get_buffer_size(NULL, dec->channels, + is->frame->nb_samples, + dec->sample_fmt, 1); + + if (dec->sample_fmt != is->audio_src_fmt) { + if (is->reformat_ctx) + av_audio_convert_free(is->reformat_ctx); + is->reformat_ctx= av_audio_convert_alloc(AV_SAMPLE_FMT_S16, 1, + dec->sample_fmt, 1, NULL, 0); + if (!is->reformat_ctx) { + fprintf(stderr, "Cannot convert %s sample format to %s sample format\n", + av_get_sample_fmt_name(dec->sample_fmt), + av_get_sample_fmt_name(AV_SAMPLE_FMT_S16)); + break; + } + is->audio_src_fmt= dec->sample_fmt; + } + + if (is->reformat_ctx) { + const void *ibuf[6] = { is->frame->data[0] }; + void *obuf[6]; + int istride[6] = { av_get_bytes_per_sample(dec->sample_fmt) }; + int ostride[6] = { 2 }; + int len= data_size/istride[0]; + obuf[0] = av_realloc(is->audio_buf1, FFALIGN(len * ostride[0], 32)); + if (!obuf[0]) { + return AVERROR(ENOMEM); + } + is->audio_buf1 = obuf[0]; + if (av_audio_convert(is->reformat_ctx, obuf, ostride, ibuf, istride, len) < 0) { + printf("av_audio_convert() failed\n"); + break; + } + is->audio_buf = is->audio_buf1; + /* FIXME: existing code assume that data_size equals framesize*channels*2 + remove this legacy cruft */ + data_size = len * 2; + } else { + is->audio_buf = is->frame->data[0]; + } + + /* if no pts, then compute it */ + pts = is->audio_clock; + *pts_ptr = pts; + n = 2 * dec->channels; + is->audio_clock += (double)data_size / + (double)(n * dec->sample_rate); +#ifdef DEBUG + { + static double last_clock; + printf("audio: delay=%0.3f clock=%0.3f pts=%0.3f\n", + is->audio_clock - last_clock, + is->audio_clock, pts); + last_clock = is->audio_clock; + } +#endif + return data_size; + } + + /* free the current packet */ + if (pkt->data) + av_free_packet(pkt); + memset(pkt_temp, 0, sizeof(*pkt_temp)); + + if (is->paused || is->audioq.abort_request) { + return -1; + } + + /* read next packet */ + if ((new_packet = packet_queue_get(&is->audioq, pkt, 1)) < 0) + return -1; + + if (pkt->data == flush_pkt.data) + avcodec_flush_buffers(dec); + + *pkt_temp = *pkt; + + /* if update the audio clock with the pts */ + if (pkt->pts != AV_NOPTS_VALUE) { + is->audio_clock = av_q2d(is->audio_st->time_base)*pkt->pts; + } + } +} + +/* prepare a new audio buffer */ +static void sdl_audio_callback(void *opaque, Uint8 *stream, int len) +{ + VideoState *is = opaque; + int audio_size, len1; + double pts; + + audio_callback_time = av_gettime(); + + while (len > 0) { + if (is->audio_buf_index >= is->audio_buf_size) { + audio_size = audio_decode_frame(is, &pts); + if (audio_size < 0) { + /* if error, just output silence */ + is->audio_buf = is->silence_buf; + is->audio_buf_size = sizeof(is->silence_buf); + } else { + if (is->show_audio) + update_sample_display(is, (int16_t *)is->audio_buf, audio_size); + audio_size = synchronize_audio(is, (int16_t *)is->audio_buf, audio_size, + pts); + is->audio_buf_size = audio_size; + } + is->audio_buf_index = 0; + } + len1 = is->audio_buf_size - is->audio_buf_index; + if (len1 > len) + len1 = len; + memcpy(stream, (uint8_t *)is->audio_buf + is->audio_buf_index, len1); + len -= len1; + stream += len1; + is->audio_buf_index += len1; + } +} + +/* open a given stream. Return 0 if OK */ +static int stream_component_open(VideoState *is, int stream_index) +{ + AVFormatContext *ic = is->ic; + AVCodecContext *avctx; + AVCodec *codec; + SDL_AudioSpec wanted_spec, spec; + AVDictionary *opts; + AVDictionaryEntry *t = NULL; + + if (stream_index < 0 || stream_index >= ic->nb_streams) + return -1; + avctx = ic->streams[stream_index]->codec; + + opts = filter_codec_opts(codec_opts, avctx->codec_id, ic, ic->streams[stream_index]); + + codec = avcodec_find_decoder(avctx->codec_id); + avctx->debug_mv = debug_mv; + avctx->debug = debug; + avctx->workaround_bugs = workaround_bugs; + avctx->lowres = lowres; + avctx->idct_algo = idct; + avctx->skip_frame = skip_frame; + avctx->skip_idct = skip_idct; + avctx->skip_loop_filter = skip_loop_filter; + avctx->error_recognition = error_recognition; + avctx->error_concealment = error_concealment; + avctx->thread_count = thread_count; + + if (lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE; + if (fast) avctx->flags2 |= CODEC_FLAG2_FAST; + + if (!codec || + avcodec_open2(avctx, codec, &opts) < 0) + return -1; + if ((t = av_dict_get(opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { + av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key); + return AVERROR_OPTION_NOT_FOUND; + } + + /* prepare audio output */ + if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) { + wanted_spec.freq = avctx->sample_rate; + wanted_spec.format = AUDIO_S16SYS; + wanted_spec.channels = avctx->channels; + wanted_spec.silence = 0; + wanted_spec.samples = SDL_AUDIO_BUFFER_SIZE; + wanted_spec.callback = sdl_audio_callback; + wanted_spec.userdata = is; + if (SDL_OpenAudio(&wanted_spec, &spec) < 0) { + fprintf(stderr, "SDL_OpenAudio: %s\n", SDL_GetError()); + return -1; + } + is->audio_hw_buf_size = spec.size; + is->audio_src_fmt = AV_SAMPLE_FMT_S16; + } + + ic->streams[stream_index]->discard = AVDISCARD_DEFAULT; + switch (avctx->codec_type) { + case AVMEDIA_TYPE_AUDIO: + is->audio_stream = stream_index; + is->audio_st = ic->streams[stream_index]; + is->audio_buf_size = 0; + is->audio_buf_index = 0; + + /* init averaging filter */ + is->audio_diff_avg_coef = exp(log(0.01) / AUDIO_DIFF_AVG_NB); + is->audio_diff_avg_count = 0; + /* since we do not have a precise anough audio fifo fullness, + we correct audio sync only if larger than this threshold */ + is->audio_diff_threshold = 2.0 * SDL_AUDIO_BUFFER_SIZE / avctx->sample_rate; + + memset(&is->audio_pkt, 0, sizeof(is->audio_pkt)); + packet_queue_init(&is->audioq); + SDL_PauseAudio(0); + break; + case AVMEDIA_TYPE_VIDEO: + is->video_stream = stream_index; + is->video_st = ic->streams[stream_index]; + + packet_queue_init(&is->videoq); + is->video_tid = SDL_CreateThread(video_thread, is); + break; + case AVMEDIA_TYPE_SUBTITLE: + is->subtitle_stream = stream_index; + is->subtitle_st = ic->streams[stream_index]; + packet_queue_init(&is->subtitleq); + + is->subtitle_tid = SDL_CreateThread(subtitle_thread, is); + break; + default: + break; + } + return 0; +} + +static void stream_component_close(VideoState *is, int stream_index) +{ + AVFormatContext *ic = is->ic; + AVCodecContext *avctx; + + if (stream_index < 0 || stream_index >= ic->nb_streams) + return; + avctx = ic->streams[stream_index]->codec; + + switch (avctx->codec_type) { + case AVMEDIA_TYPE_AUDIO: + packet_queue_abort(&is->audioq); + + SDL_CloseAudio(); + + packet_queue_end(&is->audioq); + av_free_packet(&is->audio_pkt); + if (is->reformat_ctx) + av_audio_convert_free(is->reformat_ctx); + is->reformat_ctx = NULL; + av_freep(&is->audio_buf1); + is->audio_buf = NULL; + av_freep(&is->frame); + + if (is->rdft) { + av_rdft_end(is->rdft); + av_freep(&is->rdft_data); + is->rdft = NULL; + is->rdft_bits = 0; + } + break; + case AVMEDIA_TYPE_VIDEO: + packet_queue_abort(&is->videoq); + + /* note: we also signal this mutex to make sure we deblock the + video thread in all cases */ + SDL_LockMutex(is->pictq_mutex); + SDL_CondSignal(is->pictq_cond); + SDL_UnlockMutex(is->pictq_mutex); + + SDL_WaitThread(is->video_tid, NULL); + + packet_queue_end(&is->videoq); + break; + case AVMEDIA_TYPE_SUBTITLE: + packet_queue_abort(&is->subtitleq); + + /* note: we also signal this mutex to make sure we deblock the + video thread in all cases */ + SDL_LockMutex(is->subpq_mutex); + is->subtitle_stream_changed = 1; + + SDL_CondSignal(is->subpq_cond); + SDL_UnlockMutex(is->subpq_mutex); + + SDL_WaitThread(is->subtitle_tid, NULL); + + packet_queue_end(&is->subtitleq); + break; + default: + break; + } + + ic->streams[stream_index]->discard = AVDISCARD_ALL; + avcodec_close(avctx); + switch (avctx->codec_type) { + case AVMEDIA_TYPE_AUDIO: + is->audio_st = NULL; + is->audio_stream = -1; + break; + case AVMEDIA_TYPE_VIDEO: + is->video_st = NULL; + is->video_stream = -1; + break; + case AVMEDIA_TYPE_SUBTITLE: + is->subtitle_st = NULL; + is->subtitle_stream = -1; + break; + default: + break; + } +} + +/* since we have only one decoding thread, we can use a global + variable instead of a thread local variable */ +static VideoState *global_video_state; + +static int decode_interrupt_cb(void *ctx) +{ + return global_video_state && global_video_state->abort_request; +} + +/* this thread gets the stream from the disk or the network */ +static int decode_thread(void *arg) +{ + VideoState *is = arg; + AVFormatContext *ic = NULL; + int err, i, ret; + int st_index[AVMEDIA_TYPE_NB]; + AVPacket pkt1, *pkt = &pkt1; + int eof = 0; + int pkt_in_play_range = 0; + AVDictionaryEntry *t; + AVDictionary **opts; + int orig_nb_streams; + + memset(st_index, -1, sizeof(st_index)); + is->video_stream = -1; + is->audio_stream = -1; + is->subtitle_stream = -1; + + global_video_state = is; + + ic = avformat_alloc_context(); + ic->interrupt_callback.callback = decode_interrupt_cb; + err = avformat_open_input(&ic, is->filename, is->iformat, &format_opts); + if (err < 0) { + print_error(is->filename, err); + ret = -1; + goto fail; + } + if ((t = av_dict_get(format_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { + av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key); + ret = AVERROR_OPTION_NOT_FOUND; + goto fail; + } + is->ic = ic; + + if (genpts) + ic->flags |= AVFMT_FLAG_GENPTS; + + opts = setup_find_stream_info_opts(ic, codec_opts); + orig_nb_streams = ic->nb_streams; + + err = avformat_find_stream_info(ic, opts); + if (err < 0) { + fprintf(stderr, "%s: could not find codec parameters\n", is->filename); + ret = -1; + goto fail; + } + for (i = 0; i < orig_nb_streams; i++) + av_dict_free(&opts[i]); + av_freep(&opts); + + if (ic->pb) + ic->pb->eof_reached = 0; // FIXME hack, avplay maybe should not use url_feof() to test for the end + + if (seek_by_bytes < 0) + seek_by_bytes = !!(ic->iformat->flags & AVFMT_TS_DISCONT); + + /* if seeking requested, we execute it */ + if (start_time != AV_NOPTS_VALUE) { + int64_t timestamp; + + timestamp = start_time; + /* add the stream start time */ + if (ic->start_time != AV_NOPTS_VALUE) + timestamp += ic->start_time; + ret = avformat_seek_file(ic, -1, INT64_MIN, timestamp, INT64_MAX, 0); + if (ret < 0) { + fprintf(stderr, "%s: could not seek to position %0.3f\n", + is->filename, (double)timestamp / AV_TIME_BASE); + } + } + + for (i = 0; i < ic->nb_streams; i++) + ic->streams[i]->discard = AVDISCARD_ALL; + if (!video_disable) + st_index[AVMEDIA_TYPE_VIDEO] = + av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, + wanted_stream[AVMEDIA_TYPE_VIDEO], -1, NULL, 0); + if (!audio_disable) + st_index[AVMEDIA_TYPE_AUDIO] = + av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, + wanted_stream[AVMEDIA_TYPE_AUDIO], + st_index[AVMEDIA_TYPE_VIDEO], + NULL, 0); + if (!video_disable) + st_index[AVMEDIA_TYPE_SUBTITLE] = + av_find_best_stream(ic, AVMEDIA_TYPE_SUBTITLE, + wanted_stream[AVMEDIA_TYPE_SUBTITLE], + (st_index[AVMEDIA_TYPE_AUDIO] >= 0 ? + st_index[AVMEDIA_TYPE_AUDIO] : + st_index[AVMEDIA_TYPE_VIDEO]), + NULL, 0); + if (show_status) { + av_dump_format(ic, 0, is->filename, 0); + } + + /* open the streams */ + if (st_index[AVMEDIA_TYPE_AUDIO] >= 0) { + stream_component_open(is, st_index[AVMEDIA_TYPE_AUDIO]); + } + + ret = -1; + if (st_index[AVMEDIA_TYPE_VIDEO] >= 0) { + ret = stream_component_open(is, st_index[AVMEDIA_TYPE_VIDEO]); + } + is->refresh_tid = SDL_CreateThread(refresh_thread, is); + if (ret < 0) { + if (!display_disable) + is->show_audio = 2; + } + + if (st_index[AVMEDIA_TYPE_SUBTITLE] >= 0) { + stream_component_open(is, st_index[AVMEDIA_TYPE_SUBTITLE]); + } + + if (is->video_stream < 0 && is->audio_stream < 0) { + fprintf(stderr, "%s: could not open codecs\n", is->filename); + ret = -1; + goto fail; + } + + for (;;) { + if (is->abort_request) + break; + if (is->paused != is->last_paused) { + is->last_paused = is->paused; + if (is->paused) + is->read_pause_return = av_read_pause(ic); + else + av_read_play(ic); + } +#if CONFIG_RTSP_DEMUXER + if (is->paused && !strcmp(ic->iformat->name, "rtsp")) { + /* wait 10 ms to avoid trying to get another packet */ + /* XXX: horrible */ + SDL_Delay(10); + continue; + } +#endif + if (is->seek_req) { + int64_t seek_target = is->seek_pos; + int64_t seek_min = is->seek_rel > 0 ? seek_target - is->seek_rel + 2: INT64_MIN; + int64_t seek_max = is->seek_rel < 0 ? seek_target - is->seek_rel - 2: INT64_MAX; +// FIXME the +-2 is due to rounding being not done in the correct direction in generation +// of the seek_pos/seek_rel variables + + ret = avformat_seek_file(is->ic, -1, seek_min, seek_target, seek_max, is->seek_flags); + if (ret < 0) { + fprintf(stderr, "%s: error while seeking\n", is->ic->filename); + } else { + if (is->audio_stream >= 0) { + packet_queue_flush(&is->audioq); + packet_queue_put(&is->audioq, &flush_pkt); + } + if (is->subtitle_stream >= 0) { + packet_queue_flush(&is->subtitleq); + packet_queue_put(&is->subtitleq, &flush_pkt); + } + if (is->video_stream >= 0) { + packet_queue_flush(&is->videoq); + packet_queue_put(&is->videoq, &flush_pkt); + } + } + is->seek_req = 0; + eof = 0; + } + + /* if the queue are full, no need to read more */ + if ( is->audioq.size + is->videoq.size + is->subtitleq.size > MAX_QUEUE_SIZE + || ( (is->audioq .size > MIN_AUDIOQ_SIZE || is->audio_stream < 0) + && (is->videoq .nb_packets > MIN_FRAMES || is->video_stream < 0) + && (is->subtitleq.nb_packets > MIN_FRAMES || is->subtitle_stream < 0))) { + /* wait 10 ms */ + SDL_Delay(10); + continue; + } + if (eof) { + if (is->video_stream >= 0) { + av_init_packet(pkt); + pkt->data = NULL; + pkt->size = 0; + pkt->stream_index = is->video_stream; + packet_queue_put(&is->videoq, pkt); + } + if (is->audio_stream >= 0 && + is->audio_st->codec->codec->capabilities & CODEC_CAP_DELAY) { + av_init_packet(pkt); + pkt->data = NULL; + pkt->size = 0; + pkt->stream_index = is->audio_stream; + packet_queue_put(&is->audioq, pkt); + } + SDL_Delay(10); + if (is->audioq.size + is->videoq.size + is->subtitleq.size == 0) { + if (loop != 1 && (!loop || --loop)) { + stream_seek(cur_stream, start_time != AV_NOPTS_VALUE ? start_time : 0, 0, 0); + } else if (autoexit) { + ret = AVERROR_EOF; + goto fail; + } + } + continue; + } + ret = av_read_frame(ic, pkt); + if (ret < 0) { + if (ret == AVERROR_EOF || (ic->pb && ic->pb->eof_reached)) + eof = 1; + if (ic->pb && ic->pb->error) + break; + SDL_Delay(100); /* wait for user event */ + continue; + } + /* check if packet is in play range specified by user, then queue, otherwise discard */ + pkt_in_play_range = duration == AV_NOPTS_VALUE || + (pkt->pts - ic->streams[pkt->stream_index]->start_time) * + av_q2d(ic->streams[pkt->stream_index]->time_base) - + (double)(start_time != AV_NOPTS_VALUE ? start_time : 0) / 1000000 + <= ((double)duration / 1000000); + if (pkt->stream_index == is->audio_stream && pkt_in_play_range) { + packet_queue_put(&is->audioq, pkt); + } else if (pkt->stream_index == is->video_stream && pkt_in_play_range) { + packet_queue_put(&is->videoq, pkt); + } else if (pkt->stream_index == is->subtitle_stream && pkt_in_play_range) { + packet_queue_put(&is->subtitleq, pkt); + } else { + av_free_packet(pkt); + } + } + /* wait until the end */ + while (!is->abort_request) { + SDL_Delay(100); + } + + ret = 0; + fail: + /* disable interrupting */ + global_video_state = NULL; + + /* close each stream */ + if (is->audio_stream >= 0) + stream_component_close(is, is->audio_stream); + if (is->video_stream >= 0) + stream_component_close(is, is->video_stream); + if (is->subtitle_stream >= 0) + stream_component_close(is, is->subtitle_stream); + if (is->ic) { + avformat_close_input(&is->ic); + } + + if (ret != 0) { + SDL_Event event; + + event.type = FF_QUIT_EVENT; + event.user.data1 = is; + SDL_PushEvent(&event); + } + return 0; +} + +static VideoState *stream_open(const char *filename, AVInputFormat *iformat) +{ + VideoState *is; + + is = av_mallocz(sizeof(VideoState)); + if (!is) + return NULL; + av_strlcpy(is->filename, filename, sizeof(is->filename)); + is->iformat = iformat; + is->ytop = 0; + is->xleft = 0; + + /* start video display */ + is->pictq_mutex = SDL_CreateMutex(); + is->pictq_cond = SDL_CreateCond(); + + is->subpq_mutex = SDL_CreateMutex(); + is->subpq_cond = SDL_CreateCond(); + + is->av_sync_type = av_sync_type; + is->parse_tid = SDL_CreateThread(decode_thread, is); + if (!is->parse_tid) { + av_free(is); + return NULL; + } + return is; +} + +static void stream_cycle_channel(VideoState *is, int codec_type) +{ + AVFormatContext *ic = is->ic; + int start_index, stream_index; + AVStream *st; + + if (codec_type == AVMEDIA_TYPE_VIDEO) + start_index = is->video_stream; + else if (codec_type == AVMEDIA_TYPE_AUDIO) + start_index = is->audio_stream; + else + start_index = is->subtitle_stream; + if (start_index < (codec_type == AVMEDIA_TYPE_SUBTITLE ? -1 : 0)) + return; + stream_index = start_index; + for (;;) { + if (++stream_index >= is->ic->nb_streams) + { + if (codec_type == AVMEDIA_TYPE_SUBTITLE) + { + stream_index = -1; + goto the_end; + } else + stream_index = 0; + } + if (stream_index == start_index) + return; + st = ic->streams[stream_index]; + if (st->codec->codec_type == codec_type) { + /* check that parameters are OK */ + switch (codec_type) { + case AVMEDIA_TYPE_AUDIO: + if (st->codec->sample_rate != 0 && + st->codec->channels != 0) + goto the_end; + break; + case AVMEDIA_TYPE_VIDEO: + case AVMEDIA_TYPE_SUBTITLE: + goto the_end; + default: + break; + } + } + } + the_end: + stream_component_close(is, start_index); + stream_component_open(is, stream_index); +} + + +static void toggle_full_screen(void) +{ + is_full_screen = !is_full_screen; +#if defined(__APPLE__) && SDL_VERSION_ATLEAST(1, 2, 14) + /* OSX needs to empty the picture_queue */ + for (int i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) { + cur_stream->pictq[i].reallocate = 1; + } +#endif + video_open(cur_stream); +} + +static void toggle_pause(void) +{ + if (cur_stream) + stream_pause(cur_stream); + step = 0; +} + +static void step_to_next_frame(void) +{ + if (cur_stream) { + /* if the stream is paused unpause it, then step */ + if (cur_stream->paused) + stream_pause(cur_stream); + } + step = 1; +} + +static void toggle_audio_display(void) +{ + if (cur_stream) { + int bgcolor = SDL_MapRGB(screen->format, 0x00, 0x00, 0x00); + cur_stream->show_audio = (cur_stream->show_audio + 1) % 3; + fill_rectangle(screen, + cur_stream->xleft, cur_stream->ytop, cur_stream->width, cur_stream->height, + bgcolor); + SDL_UpdateRect(screen, cur_stream->xleft, cur_stream->ytop, cur_stream->width, cur_stream->height); + } +} + +/* handle an event sent by the GUI */ +static void event_loop(void) +{ + SDL_Event event; + double incr, pos, frac; + + for (;;) { + double x; + SDL_WaitEvent(&event); + switch (event.type) { + case SDL_KEYDOWN: + if (exit_on_keydown) { + do_exit(); + break; + } + switch (event.key.keysym.sym) { + case SDLK_ESCAPE: + case SDLK_q: + do_exit(); + break; + case SDLK_f: + toggle_full_screen(); + break; + case SDLK_p: + case SDLK_SPACE: + toggle_pause(); + break; + case SDLK_s: // S: Step to next frame + step_to_next_frame(); + break; + case SDLK_a: + if (cur_stream) + stream_cycle_channel(cur_stream, AVMEDIA_TYPE_AUDIO); + break; + case SDLK_v: + if (cur_stream) + stream_cycle_channel(cur_stream, AVMEDIA_TYPE_VIDEO); + break; + case SDLK_t: + if (cur_stream) + stream_cycle_channel(cur_stream, AVMEDIA_TYPE_SUBTITLE); + break; + case SDLK_w: + toggle_audio_display(); + break; + case SDLK_LEFT: + incr = -10.0; + goto do_seek; + case SDLK_RIGHT: + incr = 10.0; + goto do_seek; + case SDLK_UP: + incr = 60.0; + goto do_seek; + case SDLK_DOWN: + incr = -60.0; + do_seek: + if (cur_stream) { + if (seek_by_bytes) { + if (cur_stream->video_stream >= 0 && cur_stream->video_current_pos >= 0) { + pos = cur_stream->video_current_pos; + } else if (cur_stream->audio_stream >= 0 && cur_stream->audio_pkt.pos >= 0) { + pos = cur_stream->audio_pkt.pos; + } else + pos = avio_tell(cur_stream->ic->pb); + if (cur_stream->ic->bit_rate) + incr *= cur_stream->ic->bit_rate / 8.0; + else + incr *= 180000.0; + pos += incr; + stream_seek(cur_stream, pos, incr, 1); + } else { + pos = get_master_clock(cur_stream); + pos += incr; + stream_seek(cur_stream, (int64_t)(pos * AV_TIME_BASE), (int64_t)(incr * AV_TIME_BASE), 0); + } + } + break; + default: + break; + } + break; + case SDL_MOUSEBUTTONDOWN: + if (exit_on_mousedown) { + do_exit(); + break; + } + case SDL_MOUSEMOTION: + if (event.type == SDL_MOUSEBUTTONDOWN) { + x = event.button.x; + } else { + if (event.motion.state != SDL_PRESSED) + break; + x = event.motion.x; + } + if (cur_stream) { + if (seek_by_bytes || cur_stream->ic->duration <= 0) { + uint64_t size = avio_size(cur_stream->ic->pb); + stream_seek(cur_stream, size*x/cur_stream->width, 0, 1); + } else { + int64_t ts; + int ns, hh, mm, ss; + int tns, thh, tmm, tss; + tns = cur_stream->ic->duration / 1000000LL; + thh = tns / 3600; + tmm = (tns % 3600) / 60; + tss = (tns % 60); + frac = x / cur_stream->width; + ns = frac * tns; + hh = ns / 3600; + mm = (ns % 3600) / 60; + ss = (ns % 60); + fprintf(stderr, "Seek to %2.0f%% (%2d:%02d:%02d) of total duration (%2d:%02d:%02d) \n", frac*100, + hh, mm, ss, thh, tmm, tss); + ts = frac * cur_stream->ic->duration; + if (cur_stream->ic->start_time != AV_NOPTS_VALUE) + ts += cur_stream->ic->start_time; + stream_seek(cur_stream, ts, 0, 0); + } + } + break; + case SDL_VIDEORESIZE: + if (cur_stream) { + screen = SDL_SetVideoMode(event.resize.w, event.resize.h, 0, + SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL); + screen_width = cur_stream->width = event.resize.w; + screen_height = cur_stream->height = event.resize.h; + } + break; + case SDL_QUIT: + case FF_QUIT_EVENT: + do_exit(); + break; + case FF_ALLOC_EVENT: + video_open(event.user.data1); + alloc_picture(event.user.data1); + break; + case FF_REFRESH_EVENT: + video_refresh_timer(event.user.data1); + cur_stream->refresh = 0; + break; + default: + break; + } + } +} + +static int opt_frame_size(const char *opt, const char *arg) +{ + av_log(NULL, AV_LOG_ERROR, + "Option '%s' has been removed, use private format options instead\n", opt); + return AVERROR(EINVAL); +} + +static int opt_width(const char *opt, const char *arg) +{ + screen_width = parse_number_or_die(opt, arg, OPT_INT64, 1, INT_MAX); + return 0; +} + +static int opt_height(const char *opt, const char *arg) +{ + screen_height = parse_number_or_die(opt, arg, OPT_INT64, 1, INT_MAX); + return 0; +} + +static int opt_format(const char *opt, const char *arg) +{ + file_iformat = av_find_input_format(arg); + if (!file_iformat) { + fprintf(stderr, "Unknown input format: %s\n", arg); + return AVERROR(EINVAL); + } + return 0; +} + +static int opt_frame_pix_fmt(const char *opt, const char *arg) +{ + av_log(NULL, AV_LOG_ERROR, + "Option '%s' has been removed, use private format options instead\n", opt); + return AVERROR(EINVAL); +} + +static int opt_sync(const char *opt, const char *arg) +{ + if (!strcmp(arg, "audio")) + av_sync_type = AV_SYNC_AUDIO_MASTER; + else if (!strcmp(arg, "video")) + av_sync_type = AV_SYNC_VIDEO_MASTER; + else if (!strcmp(arg, "ext")) + av_sync_type = AV_SYNC_EXTERNAL_CLOCK; + else { + fprintf(stderr, "Unknown value for %s: %s\n", opt, arg); + exit(1); + } + return 0; +} + +static int opt_seek(const char *opt, const char *arg) +{ + start_time = parse_time_or_die(opt, arg, 1); + return 0; +} + +static int opt_duration(const char *opt, const char *arg) +{ + duration = parse_time_or_die(opt, arg, 1); + return 0; +} + +static int opt_debug(const char *opt, const char *arg) +{ + av_log_set_level(99); + debug = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX); + return 0; +} + +static int opt_vismv(const char *opt, const char *arg) +{ + debug_mv = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX); + return 0; +} + +static int opt_thread_count(const char *opt, const char *arg) +{ + thread_count = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX); +#if !HAVE_THREADS + fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n"); +#endif + return 0; +} + +static const OptionDef options[] = { +#include "cmdutils_common_opts.h" + { "x", HAS_ARG, { (void*)opt_width }, "force displayed width", "width" }, + { "y", HAS_ARG, { (void*)opt_height }, "force displayed height", "height" }, + { "s", HAS_ARG | OPT_VIDEO, { (void*)opt_frame_size }, "set frame size (WxH or abbreviation)", "size" }, + { "fs", OPT_BOOL, { (void*)&is_full_screen }, "force full screen" }, + { "an", OPT_BOOL, { (void*)&audio_disable }, "disable audio" }, + { "vn", OPT_BOOL, { (void*)&video_disable }, "disable video" }, + { "ast", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&wanted_stream[AVMEDIA_TYPE_AUDIO] }, "select desired audio stream", "stream_number" }, + { "vst", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&wanted_stream[AVMEDIA_TYPE_VIDEO] }, "select desired video stream", "stream_number" }, + { "sst", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&wanted_stream[AVMEDIA_TYPE_SUBTITLE] }, "select desired subtitle stream", "stream_number" }, + { "ss", HAS_ARG, { (void*)&opt_seek }, "seek to a given position in seconds", "pos" }, + { "t", HAS_ARG, { (void*)&opt_duration }, "play \"duration\" seconds of audio/video", "duration" }, + { "bytes", OPT_INT | HAS_ARG, { (void*)&seek_by_bytes }, "seek by bytes 0=off 1=on -1=auto", "val" }, + { "nodisp", OPT_BOOL, { (void*)&display_disable }, "disable graphical display" }, + { "f", HAS_ARG, { (void*)opt_format }, "force format", "fmt" }, + { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, { (void*)opt_frame_pix_fmt }, "set pixel format", "format" }, + { "stats", OPT_BOOL | OPT_EXPERT, { (void*)&show_status }, "show status", "" }, + { "debug", HAS_ARG | OPT_EXPERT, { (void*)opt_debug }, "print specific debug info", "" }, + { "bug", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&workaround_bugs }, "workaround bugs", "" }, + { "vismv", HAS_ARG | OPT_EXPERT, { (void*)opt_vismv }, "visualize motion vectors", "" }, + { "fast", OPT_BOOL | OPT_EXPERT, { (void*)&fast }, "non spec compliant optimizations", "" }, + { "genpts", OPT_BOOL | OPT_EXPERT, { (void*)&genpts }, "generate pts", "" }, + { "drp", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&decoder_reorder_pts }, "let decoder reorder pts 0=off 1=on -1=auto", ""}, + { "lowres", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&lowres }, "", "" }, + { "skiploop", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&skip_loop_filter }, "", "" }, + { "skipframe", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&skip_frame }, "", "" }, + { "skipidct", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&skip_idct }, "", "" }, + { "idct", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&idct }, "set idct algo", "algo" }, + { "er", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&error_recognition }, "set error detection threshold (0-4)", "threshold" }, + { "ec", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&error_concealment }, "set error concealment options", "bit_mask" }, + { "sync", HAS_ARG | OPT_EXPERT, { (void*)opt_sync }, "set audio-video sync. type (type=audio/video/ext)", "type" }, + { "threads", HAS_ARG | OPT_EXPERT, { (void*)opt_thread_count }, "thread count", "count" }, + { "autoexit", OPT_BOOL | OPT_EXPERT, { (void*)&autoexit }, "exit at the end", "" }, + { "exitonkeydown", OPT_BOOL | OPT_EXPERT, { (void*)&exit_on_keydown }, "exit on key down", "" }, + { "exitonmousedown", OPT_BOOL | OPT_EXPERT, { (void*)&exit_on_mousedown }, "exit on mouse down", "" }, + { "loop", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&loop }, "set number of times the playback shall be looped", "loop count" }, + { "framedrop", OPT_BOOL | OPT_EXPERT, { (void*)&framedrop }, "drop frames when cpu is too slow", "" }, + { "window_title", OPT_STRING | HAS_ARG, { (void*)&window_title }, "set window title", "window title" }, +#if CONFIG_AVFILTER + { "vf", OPT_STRING | HAS_ARG, { (void*)&vfilters }, "video filters", "filter list" }, +#endif + { "rdftspeed", OPT_INT | HAS_ARG| OPT_AUDIO | OPT_EXPERT, { (void*)&rdftspeed }, "rdft speed", "msecs" }, + { "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, { (void*)opt_default }, "generic catch all option", "" }, + { "i", 0, { NULL }, "avconv compatibility dummy option", ""}, + { NULL, }, +}; + +static void show_usage(void) +{ + printf("Simple media player\n"); + printf("usage: %s [options] input_file\n", program_name); + printf("\n"); +} + +static void show_help(void) +{ + av_log_set_callback(log_callback_help); + show_usage(); + show_help_options(options, "Main options:\n", + OPT_EXPERT, 0); + show_help_options(options, "\nAdvanced options:\n", + OPT_EXPERT, OPT_EXPERT); + printf("\n"); + show_help_children(avcodec_get_class(), AV_OPT_FLAG_DECODING_PARAM); + show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM); +#if !CONFIG_AVFILTER + show_help_children(sws_get_class(), AV_OPT_FLAG_ENCODING_PARAM); +#endif + printf("\nWhile playing:\n" + "q, ESC quit\n" + "f toggle full screen\n" + "p, SPC pause\n" + "a cycle audio channel\n" + "v cycle video channel\n" + "t cycle subtitle channel\n" + "w show audio waves\n" + "s activate frame-step mode\n" + "left/right seek backward/forward 10 seconds\n" + "down/up seek backward/forward 1 minute\n" + "mouse click seek to percentage in file corresponding to fraction of width\n" + ); +} + +static void opt_input_file(void *optctx, const char *filename) +{ + if (input_filename) { + fprintf(stderr, "Argument '%s' provided as input filename, but '%s' was already specified.\n", + filename, input_filename); + exit(1); + } + if (!strcmp(filename, "-")) + filename = "pipe:"; + input_filename = filename; +} + +/* Called from the main */ +int main(int argc, char **argv) +{ + int flags; + + av_log_set_flags(AV_LOG_SKIP_REPEATED); + parse_loglevel(argc, argv, options); + + /* register all codecs, demux and protocols */ + avcodec_register_all(); +#if CONFIG_AVDEVICE + avdevice_register_all(); +#endif +#if CONFIG_AVFILTER + avfilter_register_all(); +#endif + av_register_all(); + avformat_network_init(); + + init_opts(); + + show_banner(); + + parse_options(NULL, argc, argv, options, opt_input_file); + + if (!input_filename) { + show_usage(); + fprintf(stderr, "An input file must be specified\n"); + fprintf(stderr, "Use -h to get full help or, even better, run 'man %s'\n", program_name); + exit(1); + } + + if (display_disable) { + video_disable = 1; + } + flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER; +#if !defined(__MINGW32__) && !defined(__APPLE__) + flags |= SDL_INIT_EVENTTHREAD; /* Not supported on Windows or Mac OS X */ +#endif + if (SDL_Init (flags)) { + fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError()); + exit(1); + } + + if (!display_disable) { +#if HAVE_SDL_VIDEO_SIZE + const SDL_VideoInfo *vi = SDL_GetVideoInfo(); + fs_screen_width = vi->current_w; + fs_screen_height = vi->current_h; +#endif + } + + SDL_EventState(SDL_ACTIVEEVENT, SDL_IGNORE); + SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE); + SDL_EventState(SDL_USEREVENT, SDL_IGNORE); + + av_init_packet(&flush_pkt); + flush_pkt.data = "FLUSH"; + + cur_stream = stream_open(input_filename, file_iformat); + + event_loop(); + + /* never returns */ + + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/avprobe.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/avprobe.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/avprobe.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/avprobe.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,423 @@ +/* + * avprobe : Simple Media Prober based on the Libav libraries + * Copyright (c) 2007-2010 Stefano Sabatini + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" + +#include "libavformat/avformat.h" +#include "libavcodec/avcodec.h" +#include "libavutil/opt.h" +#include "libavutil/pixdesc.h" +#include "libavutil/dict.h" +#include "libavdevice/avdevice.h" +#include "cmdutils.h" + +const char program_name[] = "avprobe"; +const int program_birth_year = 2007; + +static int do_show_format = 0; +static int do_show_packets = 0; +static int do_show_streams = 0; + +static int show_value_unit = 0; +static int use_value_prefix = 0; +static int use_byte_value_binary_prefix = 0; +static int use_value_sexagesimal_format = 0; + +/* globals */ +static const OptionDef options[]; + +/* AVprobe context */ +static const char *input_filename; +static AVInputFormat *iformat = NULL; + +static const char *binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" }; +static const char *decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P" }; + +static const char *unit_second_str = "s" ; +static const char *unit_hertz_str = "Hz" ; +static const char *unit_byte_str = "byte" ; +static const char *unit_bit_per_second_str = "bit/s"; + +void exit_program(int ret) +{ + exit(ret); +} + +static char *value_string(char *buf, int buf_size, double val, const char *unit) +{ + if (unit == unit_second_str && use_value_sexagesimal_format) { + double secs; + int hours, mins; + secs = val; + mins = (int)secs / 60; + secs = secs - mins * 60; + hours = mins / 60; + mins %= 60; + snprintf(buf, buf_size, "%d:%02d:%09.6f", hours, mins, secs); + } else if (use_value_prefix) { + const char *prefix_string; + int index; + + if (unit == unit_byte_str && use_byte_value_binary_prefix) { + index = (int) (log(val)/log(2)) / 10; + index = av_clip(index, 0, FF_ARRAY_ELEMS(binary_unit_prefixes) -1); + val /= pow(2, index*10); + prefix_string = binary_unit_prefixes[index]; + } else { + index = (int) (log10(val)) / 3; + index = av_clip(index, 0, FF_ARRAY_ELEMS(decimal_unit_prefixes) -1); + val /= pow(10, index*3); + prefix_string = decimal_unit_prefixes[index]; + } + + snprintf(buf, buf_size, "%.3f %s%s", val, prefix_string, show_value_unit ? unit : ""); + } else { + snprintf(buf, buf_size, "%f %s", val, show_value_unit ? unit : ""); + } + + return buf; +} + +static char *time_value_string(char *buf, int buf_size, int64_t val, const AVRational *time_base) +{ + if (val == AV_NOPTS_VALUE) { + snprintf(buf, buf_size, "N/A"); + } else { + value_string(buf, buf_size, val * av_q2d(*time_base), unit_second_str); + } + + return buf; +} + +static char *ts_value_string (char *buf, int buf_size, int64_t ts) +{ + if (ts == AV_NOPTS_VALUE) { + snprintf(buf, buf_size, "N/A"); + } else { + snprintf(buf, buf_size, "%"PRId64, ts); + } + + return buf; +} + +static const char *media_type_string(enum AVMediaType media_type) +{ + switch (media_type) { + case AVMEDIA_TYPE_VIDEO: return "video"; + case AVMEDIA_TYPE_AUDIO: return "audio"; + case AVMEDIA_TYPE_DATA: return "data"; + case AVMEDIA_TYPE_SUBTITLE: return "subtitle"; + case AVMEDIA_TYPE_ATTACHMENT: return "attachment"; + default: return "unknown"; + } +} + +static void show_packet(AVFormatContext *fmt_ctx, AVPacket *pkt) +{ + char val_str[128]; + AVStream *st = fmt_ctx->streams[pkt->stream_index]; + + printf("[PACKET]\n"); + printf("codec_type=%s\n" , media_type_string(st->codec->codec_type)); + printf("stream_index=%d\n" , pkt->stream_index); + printf("pts=%s\n" , ts_value_string (val_str, sizeof(val_str), pkt->pts)); + printf("pts_time=%s\n" , time_value_string(val_str, sizeof(val_str), pkt->pts, &st->time_base)); + printf("dts=%s\n" , ts_value_string (val_str, sizeof(val_str), pkt->dts)); + printf("dts_time=%s\n" , time_value_string(val_str, sizeof(val_str), pkt->dts, &st->time_base)); + printf("duration=%s\n" , ts_value_string (val_str, sizeof(val_str), pkt->duration)); + printf("duration_time=%s\n", time_value_string(val_str, sizeof(val_str), pkt->duration, &st->time_base)); + printf("size=%s\n" , value_string (val_str, sizeof(val_str), pkt->size, unit_byte_str)); + printf("pos=%"PRId64"\n" , pkt->pos); + printf("flags=%c\n" , pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_'); + printf("[/PACKET]\n"); +} + +static void show_packets(AVFormatContext *fmt_ctx) +{ + AVPacket pkt; + + av_init_packet(&pkt); + + while (!av_read_frame(fmt_ctx, &pkt)) + show_packet(fmt_ctx, &pkt); +} + +static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) +{ + AVStream *stream = fmt_ctx->streams[stream_idx]; + AVCodecContext *dec_ctx; + AVCodec *dec; + char val_str[128]; + AVDictionaryEntry *tag = NULL; + AVRational display_aspect_ratio; + + printf("[STREAM]\n"); + + printf("index=%d\n", stream->index); + + if ((dec_ctx = stream->codec)) { + if ((dec = dec_ctx->codec)) { + printf("codec_name=%s\n", dec->name); + printf("codec_long_name=%s\n", dec->long_name); + } else { + printf("codec_name=unknown\n"); + } + + printf("codec_type=%s\n", media_type_string(dec_ctx->codec_type)); + printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den); + + /* print AVI/FourCC tag */ + av_get_codec_tag_string(val_str, sizeof(val_str), dec_ctx->codec_tag); + printf("codec_tag_string=%s\n", val_str); + printf("codec_tag=0x%04x\n", dec_ctx->codec_tag); + + switch (dec_ctx->codec_type) { + case AVMEDIA_TYPE_VIDEO: + printf("width=%d\n", dec_ctx->width); + printf("height=%d\n", dec_ctx->height); + printf("has_b_frames=%d\n", dec_ctx->has_b_frames); + if (dec_ctx->sample_aspect_ratio.num) { + printf("sample_aspect_ratio=%d:%d\n", dec_ctx->sample_aspect_ratio.num, + dec_ctx->sample_aspect_ratio.den); + av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, + dec_ctx->width * dec_ctx->sample_aspect_ratio.num, + dec_ctx->height * dec_ctx->sample_aspect_ratio.den, + 1024*1024); + printf("display_aspect_ratio=%d:%d\n", display_aspect_ratio.num, + display_aspect_ratio.den); + } + printf("pix_fmt=%s\n", dec_ctx->pix_fmt != PIX_FMT_NONE ? + av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown"); + printf("level=%d\n", dec_ctx->level); + break; + + case AVMEDIA_TYPE_AUDIO: + printf("sample_rate=%s\n", value_string(val_str, sizeof(val_str), + dec_ctx->sample_rate, + unit_hertz_str)); + printf("channels=%d\n", dec_ctx->channels); + printf("bits_per_sample=%d\n", av_get_bits_per_sample(dec_ctx->codec_id)); + break; + } + } else { + printf("codec_type=unknown\n"); + } + + if (fmt_ctx->iformat->flags & AVFMT_SHOW_IDS) + printf("id=0x%x\n", stream->id); + printf("r_frame_rate=%d/%d\n", stream->r_frame_rate.num, stream->r_frame_rate.den); + printf("avg_frame_rate=%d/%d\n", stream->avg_frame_rate.num, stream->avg_frame_rate.den); + printf("time_base=%d/%d\n", stream->time_base.num, stream->time_base.den); + printf("start_time=%s\n", time_value_string(val_str, sizeof(val_str), stream->start_time, + &stream->time_base)); + printf("duration=%s\n", time_value_string(val_str, sizeof(val_str), stream->duration, + &stream->time_base)); + if (stream->nb_frames) + printf("nb_frames=%"PRId64"\n", stream->nb_frames); + + while ((tag = av_dict_get(stream->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) + printf("TAG:%s=%s\n", tag->key, tag->value); + + printf("[/STREAM]\n"); +} + +static void show_format(AVFormatContext *fmt_ctx) +{ + AVDictionaryEntry *tag = NULL; + char val_str[128]; + + printf("[FORMAT]\n"); + + printf("filename=%s\n", fmt_ctx->filename); + printf("nb_streams=%d\n", fmt_ctx->nb_streams); + printf("format_name=%s\n", fmt_ctx->iformat->name); + printf("format_long_name=%s\n", fmt_ctx->iformat->long_name); + printf("start_time=%s\n", time_value_string(val_str, sizeof(val_str), fmt_ctx->start_time, + &AV_TIME_BASE_Q)); + printf("duration=%s\n", time_value_string(val_str, sizeof(val_str), fmt_ctx->duration, + &AV_TIME_BASE_Q)); + printf("size=%s\n", value_string(val_str, sizeof(val_str), fmt_ctx->file_size, + unit_byte_str)); + printf("bit_rate=%s\n", value_string(val_str, sizeof(val_str), fmt_ctx->bit_rate, + unit_bit_per_second_str)); + + while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) + printf("TAG:%s=%s\n", tag->key, tag->value); + + printf("[/FORMAT]\n"); +} + +static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename) +{ + int err, i; + AVFormatContext *fmt_ctx = NULL; + AVDictionaryEntry *t; + + if ((err = avformat_open_input(&fmt_ctx, filename, iformat, &format_opts)) < 0) { + print_error(filename, err); + return err; + } + if ((t = av_dict_get(format_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { + av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key); + return AVERROR_OPTION_NOT_FOUND; + } + + + /* fill the streams in the format context */ + if ((err = avformat_find_stream_info(fmt_ctx, NULL)) < 0) { + print_error(filename, err); + return err; + } + + av_dump_format(fmt_ctx, 0, filename, 0); + + /* bind a decoder to each input stream */ + for (i = 0; i < fmt_ctx->nb_streams; i++) { + AVStream *stream = fmt_ctx->streams[i]; + AVCodec *codec; + + if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) { + fprintf(stderr, "Unsupported codec with id %d for input stream %d\n", + stream->codec->codec_id, stream->index); + } else if (avcodec_open2(stream->codec, codec, NULL) < 0) { + fprintf(stderr, "Error while opening codec for input stream %d\n", + stream->index); + } + } + + *fmt_ctx_ptr = fmt_ctx; + return 0; +} + +static int probe_file(const char *filename) +{ + AVFormatContext *fmt_ctx; + int ret, i; + + if ((ret = open_input_file(&fmt_ctx, filename))) + return ret; + + if (do_show_packets) + show_packets(fmt_ctx); + + if (do_show_streams) + for (i = 0; i < fmt_ctx->nb_streams; i++) + show_stream(fmt_ctx, i); + + if (do_show_format) + show_format(fmt_ctx); + + avformat_close_input(&fmt_ctx); + return 0; +} + +static void show_usage(void) +{ + printf("Simple multimedia streams analyzer\n"); + printf("usage: %s [OPTIONS] [INPUT_FILE]\n", program_name); + printf("\n"); +} + +static int opt_format(const char *opt, const char *arg) +{ + iformat = av_find_input_format(arg); + if (!iformat) { + fprintf(stderr, "Unknown input format: %s\n", arg); + return AVERROR(EINVAL); + } + return 0; +} + +static void opt_input_file(void *optctx, const char *arg) +{ + if (input_filename) { + fprintf(stderr, "Argument '%s' provided as input filename, but '%s' was already specified.\n", + arg, input_filename); + exit(1); + } + if (!strcmp(arg, "-")) + arg = "pipe:"; + input_filename = arg; +} + +static void show_help(void) +{ + av_log_set_callback(log_callback_help); + show_usage(); + show_help_options(options, "Main options:\n", 0, 0); + printf("\n"); + show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM); +} + +static void opt_pretty(void) +{ + show_value_unit = 1; + use_value_prefix = 1; + use_byte_value_binary_prefix = 1; + use_value_sexagesimal_format = 1; +} + +static const OptionDef options[] = { +#include "cmdutils_common_opts.h" + { "f", HAS_ARG, {(void*)opt_format}, "force format", "format" }, + { "unit", OPT_BOOL, {(void*)&show_value_unit}, "show unit of the displayed values" }, + { "prefix", OPT_BOOL, {(void*)&use_value_prefix}, "use SI prefixes for the displayed values" }, + { "byte_binary_prefix", OPT_BOOL, {(void*)&use_byte_value_binary_prefix}, + "use binary prefixes for byte units" }, + { "sexagesimal", OPT_BOOL, {(void*)&use_value_sexagesimal_format}, + "use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units" }, + { "pretty", 0, {(void*)&opt_pretty}, + "prettify the format of displayed values, make it more human readable" }, + { "show_format", OPT_BOOL, {(void*)&do_show_format} , "show format/container info" }, + { "show_packets", OPT_BOOL, {(void*)&do_show_packets}, "show packets info" }, + { "show_streams", OPT_BOOL, {(void*)&do_show_streams}, "show streams info" }, + { "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" }, + { NULL, }, +}; + +int main(int argc, char **argv) +{ + int ret; + + parse_loglevel(argc, argv, options); + av_register_all(); + avformat_network_init(); + init_opts(); +#if CONFIG_AVDEVICE + avdevice_register_all(); +#endif + + show_banner(); + parse_options(NULL, argc, argv, options, opt_input_file); + + if (!input_filename) { + show_usage(); + fprintf(stderr, "You have to specify one input file.\n"); + fprintf(stderr, "Use -h to get full help or, even better, run 'man %s'.\n", program_name); + exit(1); + } + + ret = probe_file(input_filename); + + avformat_network_deinit(); + + return ret; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/avserver.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/avserver.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/avserver.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/avserver.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4748 @@ +/* + * Multiple format streaming server + * Copyright (c) 2000, 2001, 2002 Fabrice Bellard + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" +#if !HAVE_CLOSESOCKET +#define closesocket close +#endif +#include +#include +#include "libavformat/avformat.h" +#include "libavformat/ffm.h" +#include "libavformat/network.h" +#include "libavformat/os_support.h" +#include "libavformat/rtpdec.h" +#include "libavformat/rtsp.h" +// XXX for ffio_open_dyn_packet_buffer, to be removed +#include "libavformat/avio_internal.h" +#include "libavutil/avstring.h" +#include "libavutil/lfg.h" +#include "libavutil/dict.h" +#include "libavutil/mathematics.h" +#include "libavutil/random_seed.h" +#include "libavutil/parseutils.h" +#include "libavutil/opt.h" +#include +#include +#include +#include +#if HAVE_POLL_H +#include +#endif +#include +#include +#include +#include +#include +#if HAVE_DLFCN_H +#include +#endif + +#include "cmdutils.h" + +const char program_name[] = "avserver"; +const int program_birth_year = 2000; + +static const OptionDef options[]; + +enum HTTPState { + HTTPSTATE_WAIT_REQUEST, + HTTPSTATE_SEND_HEADER, + HTTPSTATE_SEND_DATA_HEADER, + HTTPSTATE_SEND_DATA, /* sending TCP or UDP data */ + HTTPSTATE_SEND_DATA_TRAILER, + HTTPSTATE_RECEIVE_DATA, + HTTPSTATE_WAIT_FEED, /* wait for data from the feed */ + HTTPSTATE_READY, + + RTSPSTATE_WAIT_REQUEST, + RTSPSTATE_SEND_REPLY, + RTSPSTATE_SEND_PACKET, +}; + +static const char *http_state[] = { + "HTTP_WAIT_REQUEST", + "HTTP_SEND_HEADER", + + "SEND_DATA_HEADER", + "SEND_DATA", + "SEND_DATA_TRAILER", + "RECEIVE_DATA", + "WAIT_FEED", + "READY", + + "RTSP_WAIT_REQUEST", + "RTSP_SEND_REPLY", + "RTSP_SEND_PACKET", +}; + +#define MAX_STREAMS 20 + +#define IOBUFFER_INIT_SIZE 8192 + +/* timeouts are in ms */ +#define HTTP_REQUEST_TIMEOUT (15 * 1000) +#define RTSP_REQUEST_TIMEOUT (3600 * 24 * 1000) + +#define SYNC_TIMEOUT (10 * 1000) + +typedef struct RTSPActionServerSetup { + uint32_t ipaddr; + char transport_option[512]; +} RTSPActionServerSetup; + +typedef struct { + int64_t count1, count2; + int64_t time1, time2; +} DataRateData; + +/* context associated with one connection */ +typedef struct HTTPContext { + enum HTTPState state; + int fd; /* socket file descriptor */ + struct sockaddr_in from_addr; /* origin */ + struct pollfd *poll_entry; /* used when polling */ + int64_t timeout; + uint8_t *buffer_ptr, *buffer_end; + int http_error; + int post; + int chunked_encoding; + int chunk_size; /* 0 if it needs to be read */ + struct HTTPContext *next; + int got_key_frame; /* stream 0 => 1, stream 1 => 2, stream 2=> 4 */ + int64_t data_count; + /* feed input */ + int feed_fd; + /* input format handling */ + AVFormatContext *fmt_in; + int64_t start_time; /* In milliseconds - this wraps fairly often */ + int64_t first_pts; /* initial pts value */ + int64_t cur_pts; /* current pts value from the stream in us */ + int64_t cur_frame_duration; /* duration of the current frame in us */ + int cur_frame_bytes; /* output frame size, needed to compute + the time at which we send each + packet */ + int pts_stream_index; /* stream we choose as clock reference */ + int64_t cur_clock; /* current clock reference value in us */ + /* output format handling */ + struct FFStream *stream; + /* -1 is invalid stream */ + int feed_streams[MAX_STREAMS]; /* index of streams in the feed */ + int switch_feed_streams[MAX_STREAMS]; /* index of streams in the feed */ + int switch_pending; + AVFormatContext fmt_ctx; /* instance of FFStream for one user */ + int last_packet_sent; /* true if last data packet was sent */ + int suppress_log; + DataRateData datarate; + int wmp_client_id; + char protocol[16]; + char method[16]; + char url[128]; + int buffer_size; + uint8_t *buffer; + int is_packetized; /* if true, the stream is packetized */ + int packet_stream_index; /* current stream for output in state machine */ + + /* RTSP state specific */ + uint8_t *pb_buffer; /* XXX: use that in all the code */ + AVIOContext *pb; + int seq; /* RTSP sequence number */ + + /* RTP state specific */ + enum RTSPLowerTransport rtp_protocol; + char session_id[32]; /* session id */ + AVFormatContext *rtp_ctx[MAX_STREAMS]; + + /* RTP/UDP specific */ + URLContext *rtp_handles[MAX_STREAMS]; + + /* RTP/TCP specific */ + struct HTTPContext *rtsp_c; + uint8_t *packet_buffer, *packet_buffer_ptr, *packet_buffer_end; +} HTTPContext; + +/* each generated stream is described here */ +enum StreamType { + STREAM_TYPE_LIVE, + STREAM_TYPE_STATUS, + STREAM_TYPE_REDIRECT, +}; + +enum IPAddressAction { + IP_ALLOW = 1, + IP_DENY, +}; + +typedef struct IPAddressACL { + struct IPAddressACL *next; + enum IPAddressAction action; + /* These are in host order */ + struct in_addr first; + struct in_addr last; +} IPAddressACL; + +/* description of each stream of the avserver.conf file */ +typedef struct FFStream { + enum StreamType stream_type; + char filename[1024]; /* stream filename */ + struct FFStream *feed; /* feed we are using (can be null if + coming from file) */ + AVDictionary *in_opts; /* input parameters */ + AVInputFormat *ifmt; /* if non NULL, force input format */ + AVOutputFormat *fmt; + IPAddressACL *acl; + char dynamic_acl[1024]; + int nb_streams; + int prebuffer; /* Number of millseconds early to start */ + int64_t max_time; /* Number of milliseconds to run */ + int send_on_key; + AVStream *streams[MAX_STREAMS]; + int feed_streams[MAX_STREAMS]; /* index of streams in the feed */ + char feed_filename[1024]; /* file name of the feed storage, or + input file name for a stream */ + char author[512]; + char title[512]; + char copyright[512]; + char comment[512]; + pid_t pid; /* of avconv process */ + time_t pid_start; /* of avconv process */ + char **child_argv; + struct FFStream *next; + unsigned bandwidth; /* bandwidth, in kbits/s */ + /* RTSP options */ + char *rtsp_option; + /* multicast specific */ + int is_multicast; + struct in_addr multicast_ip; + int multicast_port; /* first port used for multicast */ + int multicast_ttl; + int loop; /* if true, send the stream in loops (only meaningful if file) */ + + /* feed specific */ + int feed_opened; /* true if someone is writing to the feed */ + int is_feed; /* true if it is a feed */ + int readonly; /* True if writing is prohibited to the file */ + int truncate; /* True if feeder connection truncate the feed file */ + int conns_served; + int64_t bytes_served; + int64_t feed_max_size; /* maximum storage size, zero means unlimited */ + int64_t feed_write_index; /* current write position in feed (it wraps around) */ + int64_t feed_size; /* current size of feed */ + struct FFStream *next_feed; +} FFStream; + +typedef struct FeedData { + long long data_count; + float avg_frame_size; /* frame size averaged over last frames with exponential mean */ +} FeedData; + +static struct sockaddr_in my_http_addr; +static struct sockaddr_in my_rtsp_addr; + +static char logfilename[1024]; +static HTTPContext *first_http_ctx; +static FFStream *first_feed; /* contains only feeds */ +static FFStream *first_stream; /* contains all streams, including feeds */ + +static void new_connection(int server_fd, int is_rtsp); +static void close_connection(HTTPContext *c); + +/* HTTP handling */ +static int handle_connection(HTTPContext *c); +static int http_parse_request(HTTPContext *c); +static int http_send_data(HTTPContext *c); +static void compute_status(HTTPContext *c); +static int open_input_stream(HTTPContext *c, const char *info); +static int http_start_receive_data(HTTPContext *c); +static int http_receive_data(HTTPContext *c); + +/* RTSP handling */ +static int rtsp_parse_request(HTTPContext *c); +static void rtsp_cmd_describe(HTTPContext *c, const char *url); +static void rtsp_cmd_options(HTTPContext *c, const char *url); +static void rtsp_cmd_setup(HTTPContext *c, const char *url, RTSPMessageHeader *h); +static void rtsp_cmd_play(HTTPContext *c, const char *url, RTSPMessageHeader *h); +static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPMessageHeader *h); +static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPMessageHeader *h); + +/* SDP handling */ +static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, + struct in_addr my_ip); + +/* RTP handling */ +static HTTPContext *rtp_new_connection(struct sockaddr_in *from_addr, + FFStream *stream, const char *session_id, + enum RTSPLowerTransport rtp_protocol); +static int rtp_new_av_stream(HTTPContext *c, + int stream_index, struct sockaddr_in *dest_addr, + HTTPContext *rtsp_c); + +static const char *my_program_name; +static const char *my_program_dir; + +static const char *config_filename = "/etc/avserver.conf"; + +static int avserver_debug; +static int avserver_daemon; +static int no_launch; +static int need_to_start_children; + +/* maximum number of simultaneous HTTP connections */ +static unsigned int nb_max_http_connections = 2000; +static unsigned int nb_max_connections = 5; +static unsigned int nb_connections; + +static uint64_t max_bandwidth = 1000; +static uint64_t current_bandwidth; + +static int64_t cur_time; // Making this global saves on passing it around everywhere + +static AVLFG random_state; + +static FILE *logfile = NULL; + +void exit_program(int ret) +{ + exit(ret); +} + +/* FIXME: make avserver work with IPv6 */ +/* resolve host with also IP address parsing */ +static int resolve_host(struct in_addr *sin_addr, const char *hostname) +{ + + if (!ff_inet_aton(hostname, sin_addr)) { +#if HAVE_GETADDRINFO + struct addrinfo *ai, *cur; + struct addrinfo hints; + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET; + if (getaddrinfo(hostname, NULL, &hints, &ai)) + return -1; + /* getaddrinfo returns a linked list of addrinfo structs. + * Even if we set ai_family = AF_INET above, make sure + * that the returned one actually is of the correct type. */ + for (cur = ai; cur; cur = cur->ai_next) { + if (cur->ai_family == AF_INET) { + *sin_addr = ((struct sockaddr_in *)cur->ai_addr)->sin_addr; + freeaddrinfo(ai); + return 0; + } + } + freeaddrinfo(ai); + return -1; +#else + struct hostent *hp; + hp = gethostbyname(hostname); + if (!hp) + return -1; + memcpy(sin_addr, hp->h_addr_list[0], sizeof(struct in_addr)); +#endif + } + return 0; +} + +static char *ctime1(char *buf2) +{ + time_t ti; + char *p; + + ti = time(NULL); + p = ctime(&ti); + strcpy(buf2, p); + p = buf2 + strlen(p) - 1; + if (*p == '\n') + *p = '\0'; + return buf2; +} + +static void http_vlog(const char *fmt, va_list vargs) +{ + static int print_prefix = 1; + if (logfile) { + if (print_prefix) { + char buf[32]; + ctime1(buf); + fprintf(logfile, "%s ", buf); + } + print_prefix = strstr(fmt, "\n") != NULL; + vfprintf(logfile, fmt, vargs); + fflush(logfile); + } +} + +#ifdef __GNUC__ +__attribute__ ((format (printf, 1, 2))) +#endif +static void http_log(const char *fmt, ...) +{ + va_list vargs; + va_start(vargs, fmt); + http_vlog(fmt, vargs); + va_end(vargs); +} + +static void http_av_log(void *ptr, int level, const char *fmt, va_list vargs) +{ + static int print_prefix = 1; + AVClass *avc = ptr ? *(AVClass**)ptr : NULL; + if (level > av_log_get_level()) + return; + if (print_prefix && avc) + http_log("[%s @ %p]", avc->item_name(ptr), ptr); + print_prefix = strstr(fmt, "\n") != NULL; + http_vlog(fmt, vargs); +} + +static void log_connection(HTTPContext *c) +{ + if (c->suppress_log) + return; + + http_log("%s - - [%s] \"%s %s\" %d %"PRId64"\n", + inet_ntoa(c->from_addr.sin_addr), c->method, c->url, + c->protocol, (c->http_error ? c->http_error : 200), c->data_count); +} + +static void update_datarate(DataRateData *drd, int64_t count) +{ + if (!drd->time1 && !drd->count1) { + drd->time1 = drd->time2 = cur_time; + drd->count1 = drd->count2 = count; + } else if (cur_time - drd->time2 > 5000) { + drd->time1 = drd->time2; + drd->count1 = drd->count2; + drd->time2 = cur_time; + drd->count2 = count; + } +} + +/* In bytes per second */ +static int compute_datarate(DataRateData *drd, int64_t count) +{ + if (cur_time == drd->time1) + return 0; + + return ((count - drd->count1) * 1000) / (cur_time - drd->time1); +} + + +static void start_children(FFStream *feed) +{ + if (no_launch) + return; + + for (; feed; feed = feed->next) { + if (feed->child_argv && !feed->pid) { + feed->pid_start = time(0); + + feed->pid = fork(); + + if (feed->pid < 0) { + http_log("Unable to create children\n"); + exit(1); + } + if (!feed->pid) { + /* In child */ + char pathname[1024]; + char *slash; + int i; + + av_strlcpy(pathname, my_program_name, sizeof(pathname)); + + slash = strrchr(pathname, '/'); + if (!slash) + slash = pathname; + else + slash++; + strcpy(slash, "avconv"); + + http_log("Launch command line: "); + http_log("%s ", pathname); + for (i = 1; feed->child_argv[i] && feed->child_argv[i][0]; i++) + http_log("%s ", feed->child_argv[i]); + http_log("\n"); + + for (i = 3; i < 256; i++) + close(i); + + if (!avserver_debug) { + i = open("/dev/null", O_RDWR); + if (i != -1) { + dup2(i, 0); + dup2(i, 1); + dup2(i, 2); + close(i); + } + } + + /* This is needed to make relative pathnames work */ + chdir(my_program_dir); + + signal(SIGPIPE, SIG_DFL); + + execvp(pathname, feed->child_argv); + + _exit(1); + } + } + } +} + +/* open a listening socket */ +static int socket_open_listen(struct sockaddr_in *my_addr) +{ + int server_fd, tmp; + + server_fd = socket(AF_INET,SOCK_STREAM,0); + if (server_fd < 0) { + perror ("socket"); + return -1; + } + + tmp = 1; + setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp)); + + my_addr->sin_family = AF_INET; + if (bind (server_fd, (struct sockaddr *) my_addr, sizeof (*my_addr)) < 0) { + char bindmsg[32]; + snprintf(bindmsg, sizeof(bindmsg), "bind(port %d)", ntohs(my_addr->sin_port)); + perror (bindmsg); + closesocket(server_fd); + return -1; + } + + if (listen (server_fd, 5) < 0) { + perror ("listen"); + closesocket(server_fd); + return -1; + } + ff_socket_nonblock(server_fd, 1); + + return server_fd; +} + +/* start all multicast streams */ +static void start_multicast(void) +{ + FFStream *stream; + char session_id[32]; + HTTPContext *rtp_c; + struct sockaddr_in dest_addr; + int default_port, stream_index; + + default_port = 6000; + for(stream = first_stream; stream != NULL; stream = stream->next) { + if (stream->is_multicast) { + /* open the RTP connection */ + snprintf(session_id, sizeof(session_id), "%08x%08x", + av_lfg_get(&random_state), av_lfg_get(&random_state)); + + /* choose a port if none given */ + if (stream->multicast_port == 0) { + stream->multicast_port = default_port; + default_port += 100; + } + + dest_addr.sin_family = AF_INET; + dest_addr.sin_addr = stream->multicast_ip; + dest_addr.sin_port = htons(stream->multicast_port); + + rtp_c = rtp_new_connection(&dest_addr, stream, session_id, + RTSP_LOWER_TRANSPORT_UDP_MULTICAST); + if (!rtp_c) + continue; + + if (open_input_stream(rtp_c, "") < 0) { + http_log("Could not open input stream for stream '%s'\n", + stream->filename); + continue; + } + + /* open each RTP stream */ + for(stream_index = 0; stream_index < stream->nb_streams; + stream_index++) { + dest_addr.sin_port = htons(stream->multicast_port + + 2 * stream_index); + if (rtp_new_av_stream(rtp_c, stream_index, &dest_addr, NULL) < 0) { + http_log("Could not open output stream '%s/streamid=%d'\n", + stream->filename, stream_index); + exit(1); + } + } + + /* change state to send data */ + rtp_c->state = HTTPSTATE_SEND_DATA; + } + } +} + +/* main loop of the http server */ +static int http_server(void) +{ + int server_fd = 0, rtsp_server_fd = 0; + int ret, delay, delay1; + struct pollfd *poll_table, *poll_entry; + HTTPContext *c, *c_next; + + if(!(poll_table = av_mallocz((nb_max_http_connections + 2)*sizeof(*poll_table)))) { + http_log("Impossible to allocate a poll table handling %d connections.\n", nb_max_http_connections); + return -1; + } + + if (my_http_addr.sin_port) { + server_fd = socket_open_listen(&my_http_addr); + if (server_fd < 0) + return -1; + } + + if (my_rtsp_addr.sin_port) { + rtsp_server_fd = socket_open_listen(&my_rtsp_addr); + if (rtsp_server_fd < 0) + return -1; + } + + if (!rtsp_server_fd && !server_fd) { + http_log("HTTP and RTSP disabled.\n"); + return -1; + } + + http_log("AVserver started.\n"); + + start_children(first_feed); + + start_multicast(); + + for(;;) { + poll_entry = poll_table; + if (server_fd) { + poll_entry->fd = server_fd; + poll_entry->events = POLLIN; + poll_entry++; + } + if (rtsp_server_fd) { + poll_entry->fd = rtsp_server_fd; + poll_entry->events = POLLIN; + poll_entry++; + } + + /* wait for events on each HTTP handle */ + c = first_http_ctx; + delay = 1000; + while (c != NULL) { + int fd; + fd = c->fd; + switch(c->state) { + case HTTPSTATE_SEND_HEADER: + case RTSPSTATE_SEND_REPLY: + case RTSPSTATE_SEND_PACKET: + c->poll_entry = poll_entry; + poll_entry->fd = fd; + poll_entry->events = POLLOUT; + poll_entry++; + break; + case HTTPSTATE_SEND_DATA_HEADER: + case HTTPSTATE_SEND_DATA: + case HTTPSTATE_SEND_DATA_TRAILER: + if (!c->is_packetized) { + /* for TCP, we output as much as we can (may need to put a limit) */ + c->poll_entry = poll_entry; + poll_entry->fd = fd; + poll_entry->events = POLLOUT; + poll_entry++; + } else { + /* when avserver is doing the timing, we work by + looking at which packet need to be sent every + 10 ms */ + delay1 = 10; /* one tick wait XXX: 10 ms assumed */ + if (delay1 < delay) + delay = delay1; + } + break; + case HTTPSTATE_WAIT_REQUEST: + case HTTPSTATE_RECEIVE_DATA: + case HTTPSTATE_WAIT_FEED: + case RTSPSTATE_WAIT_REQUEST: + /* need to catch errors */ + c->poll_entry = poll_entry; + poll_entry->fd = fd; + poll_entry->events = POLLIN;/* Maybe this will work */ + poll_entry++; + break; + default: + c->poll_entry = NULL; + break; + } + c = c->next; + } + + /* wait for an event on one connection. We poll at least every + second to handle timeouts */ + do { + ret = poll(poll_table, poll_entry - poll_table, delay); + if (ret < 0 && ff_neterrno() != AVERROR(EAGAIN) && + ff_neterrno() != AVERROR(EINTR)) + return -1; + } while (ret < 0); + + cur_time = av_gettime() / 1000; + + if (need_to_start_children) { + need_to_start_children = 0; + start_children(first_feed); + } + + /* now handle the events */ + for(c = first_http_ctx; c != NULL; c = c_next) { + c_next = c->next; + if (handle_connection(c) < 0) { + /* close and free the connection */ + log_connection(c); + close_connection(c); + } + } + + poll_entry = poll_table; + if (server_fd) { + /* new HTTP connection request ? */ + if (poll_entry->revents & POLLIN) + new_connection(server_fd, 0); + poll_entry++; + } + if (rtsp_server_fd) { + /* new RTSP connection request ? */ + if (poll_entry->revents & POLLIN) + new_connection(rtsp_server_fd, 1); + } + } +} + +/* start waiting for a new HTTP/RTSP request */ +static void start_wait_request(HTTPContext *c, int is_rtsp) +{ + c->buffer_ptr = c->buffer; + c->buffer_end = c->buffer + c->buffer_size - 1; /* leave room for '\0' */ + + if (is_rtsp) { + c->timeout = cur_time + RTSP_REQUEST_TIMEOUT; + c->state = RTSPSTATE_WAIT_REQUEST; + } else { + c->timeout = cur_time + HTTP_REQUEST_TIMEOUT; + c->state = HTTPSTATE_WAIT_REQUEST; + } +} + +static void http_send_too_busy_reply(int fd) +{ + char buffer[300]; + int len = snprintf(buffer, sizeof(buffer), + "HTTP/1.0 503 Server too busy\r\n" + "Content-type: text/html\r\n" + "\r\n" + "Too busy\r\n" + "

The server is too busy to serve your request at this time.

\r\n" + "

The number of current connections is %d, and this exceeds the limit of %d.

\r\n" + "\r\n", + nb_connections, nb_max_connections); + send(fd, buffer, len, 0); +} + + +static void new_connection(int server_fd, int is_rtsp) +{ + struct sockaddr_in from_addr; + int fd, len; + HTTPContext *c = NULL; + + len = sizeof(from_addr); + fd = accept(server_fd, (struct sockaddr *)&from_addr, + &len); + if (fd < 0) { + http_log("error during accept %s\n", strerror(errno)); + return; + } + ff_socket_nonblock(fd, 1); + + if (nb_connections >= nb_max_connections) { + http_send_too_busy_reply(fd); + goto fail; + } + + /* add a new connection */ + c = av_mallocz(sizeof(HTTPContext)); + if (!c) + goto fail; + + c->fd = fd; + c->poll_entry = NULL; + c->from_addr = from_addr; + c->buffer_size = IOBUFFER_INIT_SIZE; + c->buffer = av_malloc(c->buffer_size); + if (!c->buffer) + goto fail; + + c->next = first_http_ctx; + first_http_ctx = c; + nb_connections++; + + start_wait_request(c, is_rtsp); + + return; + + fail: + if (c) { + av_free(c->buffer); + av_free(c); + } + closesocket(fd); +} + +static void close_connection(HTTPContext *c) +{ + HTTPContext **cp, *c1; + int i, nb_streams; + AVFormatContext *ctx; + URLContext *h; + AVStream *st; + + /* remove connection from list */ + cp = &first_http_ctx; + while ((*cp) != NULL) { + c1 = *cp; + if (c1 == c) + *cp = c->next; + else + cp = &c1->next; + } + + /* remove references, if any (XXX: do it faster) */ + for(c1 = first_http_ctx; c1 != NULL; c1 = c1->next) { + if (c1->rtsp_c == c) + c1->rtsp_c = NULL; + } + + /* remove connection associated resources */ + if (c->fd >= 0) + closesocket(c->fd); + if (c->fmt_in) { + /* close each frame parser */ + for(i=0;ifmt_in->nb_streams;i++) { + st = c->fmt_in->streams[i]; + if (st->codec->codec) + avcodec_close(st->codec); + } + avformat_close_input(&c->fmt_in); + } + + /* free RTP output streams if any */ + nb_streams = 0; + if (c->stream) + nb_streams = c->stream->nb_streams; + + for(i=0;irtp_ctx[i]; + if (ctx) { + av_write_trailer(ctx); + av_dict_free(&ctx->metadata); + av_free(ctx->streams[0]); + av_free(ctx); + } + h = c->rtp_handles[i]; + if (h) + url_close(h); + } + + ctx = &c->fmt_ctx; + + if (!c->last_packet_sent && c->state == HTTPSTATE_SEND_DATA_TRAILER) { + if (ctx->oformat) { + /* prepare header */ + if (avio_open_dyn_buf(&ctx->pb) >= 0) { + av_write_trailer(ctx); + av_freep(&c->pb_buffer); + avio_close_dyn_buf(ctx->pb, &c->pb_buffer); + } + } + } + + for(i=0; inb_streams; i++) + av_free(ctx->streams[i]); + + if (c->stream && !c->post && c->stream->stream_type == STREAM_TYPE_LIVE) + current_bandwidth -= c->stream->bandwidth; + + /* signal that there is no feed if we are the feeder socket */ + if (c->state == HTTPSTATE_RECEIVE_DATA && c->stream) { + c->stream->feed_opened = 0; + close(c->feed_fd); + } + + av_freep(&c->pb_buffer); + av_freep(&c->packet_buffer); + av_free(c->buffer); + av_free(c); + nb_connections--; +} + +static int handle_connection(HTTPContext *c) +{ + int len, ret; + + switch(c->state) { + case HTTPSTATE_WAIT_REQUEST: + case RTSPSTATE_WAIT_REQUEST: + /* timeout ? */ + if ((c->timeout - cur_time) < 0) + return -1; + if (c->poll_entry->revents & (POLLERR | POLLHUP)) + return -1; + + /* no need to read if no events */ + if (!(c->poll_entry->revents & POLLIN)) + return 0; + /* read the data */ + read_loop: + len = recv(c->fd, c->buffer_ptr, 1, 0); + if (len < 0) { + if (ff_neterrno() != AVERROR(EAGAIN) && + ff_neterrno() != AVERROR(EINTR)) + return -1; + } else if (len == 0) { + return -1; + } else { + /* search for end of request. */ + uint8_t *ptr; + c->buffer_ptr += len; + ptr = c->buffer_ptr; + if ((ptr >= c->buffer + 2 && !memcmp(ptr-2, "\n\n", 2)) || + (ptr >= c->buffer + 4 && !memcmp(ptr-4, "\r\n\r\n", 4))) { + /* request found : parse it and reply */ + if (c->state == HTTPSTATE_WAIT_REQUEST) { + ret = http_parse_request(c); + } else { + ret = rtsp_parse_request(c); + } + if (ret < 0) + return -1; + } else if (ptr >= c->buffer_end) { + /* request too long: cannot do anything */ + return -1; + } else goto read_loop; + } + break; + + case HTTPSTATE_SEND_HEADER: + if (c->poll_entry->revents & (POLLERR | POLLHUP)) + return -1; + + /* no need to write if no events */ + if (!(c->poll_entry->revents & POLLOUT)) + return 0; + len = send(c->fd, c->buffer_ptr, c->buffer_end - c->buffer_ptr, 0); + if (len < 0) { + if (ff_neterrno() != AVERROR(EAGAIN) && + ff_neterrno() != AVERROR(EINTR)) { + /* error : close connection */ + av_freep(&c->pb_buffer); + return -1; + } + } else { + c->buffer_ptr += len; + if (c->stream) + c->stream->bytes_served += len; + c->data_count += len; + if (c->buffer_ptr >= c->buffer_end) { + av_freep(&c->pb_buffer); + /* if error, exit */ + if (c->http_error) + return -1; + /* all the buffer was sent : synchronize to the incoming stream */ + c->state = HTTPSTATE_SEND_DATA_HEADER; + c->buffer_ptr = c->buffer_end = c->buffer; + } + } + break; + + case HTTPSTATE_SEND_DATA: + case HTTPSTATE_SEND_DATA_HEADER: + case HTTPSTATE_SEND_DATA_TRAILER: + /* for packetized output, we consider we can always write (the + input streams sets the speed). It may be better to verify + that we do not rely too much on the kernel queues */ + if (!c->is_packetized) { + if (c->poll_entry->revents & (POLLERR | POLLHUP)) + return -1; + + /* no need to read if no events */ + if (!(c->poll_entry->revents & POLLOUT)) + return 0; + } + if (http_send_data(c) < 0) + return -1; + /* close connection if trailer sent */ + if (c->state == HTTPSTATE_SEND_DATA_TRAILER) + return -1; + break; + case HTTPSTATE_RECEIVE_DATA: + /* no need to read if no events */ + if (c->poll_entry->revents & (POLLERR | POLLHUP)) + return -1; + if (!(c->poll_entry->revents & POLLIN)) + return 0; + if (http_receive_data(c) < 0) + return -1; + break; + case HTTPSTATE_WAIT_FEED: + /* no need to read if no events */ + if (c->poll_entry->revents & (POLLIN | POLLERR | POLLHUP)) + return -1; + + /* nothing to do, we'll be waken up by incoming feed packets */ + break; + + case RTSPSTATE_SEND_REPLY: + if (c->poll_entry->revents & (POLLERR | POLLHUP)) { + av_freep(&c->pb_buffer); + return -1; + } + /* no need to write if no events */ + if (!(c->poll_entry->revents & POLLOUT)) + return 0; + len = send(c->fd, c->buffer_ptr, c->buffer_end - c->buffer_ptr, 0); + if (len < 0) { + if (ff_neterrno() != AVERROR(EAGAIN) && + ff_neterrno() != AVERROR(EINTR)) { + /* error : close connection */ + av_freep(&c->pb_buffer); + return -1; + } + } else { + c->buffer_ptr += len; + c->data_count += len; + if (c->buffer_ptr >= c->buffer_end) { + /* all the buffer was sent : wait for a new request */ + av_freep(&c->pb_buffer); + start_wait_request(c, 1); + } + } + break; + case RTSPSTATE_SEND_PACKET: + if (c->poll_entry->revents & (POLLERR | POLLHUP)) { + av_freep(&c->packet_buffer); + return -1; + } + /* no need to write if no events */ + if (!(c->poll_entry->revents & POLLOUT)) + return 0; + len = send(c->fd, c->packet_buffer_ptr, + c->packet_buffer_end - c->packet_buffer_ptr, 0); + if (len < 0) { + if (ff_neterrno() != AVERROR(EAGAIN) && + ff_neterrno() != AVERROR(EINTR)) { + /* error : close connection */ + av_freep(&c->packet_buffer); + return -1; + } + } else { + c->packet_buffer_ptr += len; + if (c->packet_buffer_ptr >= c->packet_buffer_end) { + /* all the buffer was sent : wait for a new request */ + av_freep(&c->packet_buffer); + c->state = RTSPSTATE_WAIT_REQUEST; + } + } + break; + case HTTPSTATE_READY: + /* nothing to do */ + break; + default: + return -1; + } + return 0; +} + +static int extract_rates(char *rates, int ratelen, const char *request) +{ + const char *p; + + for (p = request; *p && *p != '\r' && *p != '\n'; ) { + if (av_strncasecmp(p, "Pragma:", 7) == 0) { + const char *q = p + 7; + + while (*q && *q != '\n' && isspace(*q)) + q++; + + if (av_strncasecmp(q, "stream-switch-entry=", 20) == 0) { + int stream_no; + int rate_no; + + q += 20; + + memset(rates, 0xff, ratelen); + + while (1) { + while (*q && *q != '\n' && *q != ':') + q++; + + if (sscanf(q, ":%d:%d", &stream_no, &rate_no) != 2) + break; + + stream_no--; + if (stream_no < ratelen && stream_no >= 0) + rates[stream_no] = rate_no; + + while (*q && *q != '\n' && !isspace(*q)) + q++; + } + + return 1; + } + } + p = strchr(p, '\n'); + if (!p) + break; + + p++; + } + + return 0; +} + +static int find_stream_in_feed(FFStream *feed, AVCodecContext *codec, int bit_rate) +{ + int i; + int best_bitrate = 100000000; + int best = -1; + + for (i = 0; i < feed->nb_streams; i++) { + AVCodecContext *feed_codec = feed->streams[i]->codec; + + if (feed_codec->codec_id != codec->codec_id || + feed_codec->sample_rate != codec->sample_rate || + feed_codec->width != codec->width || + feed_codec->height != codec->height) + continue; + + /* Potential stream */ + + /* We want the fastest stream less than bit_rate, or the slowest + * faster than bit_rate + */ + + if (feed_codec->bit_rate <= bit_rate) { + if (best_bitrate > bit_rate || feed_codec->bit_rate > best_bitrate) { + best_bitrate = feed_codec->bit_rate; + best = i; + } + } else { + if (feed_codec->bit_rate < best_bitrate) { + best_bitrate = feed_codec->bit_rate; + best = i; + } + } + } + + return best; +} + +static int modify_current_stream(HTTPContext *c, char *rates) +{ + int i; + FFStream *req = c->stream; + int action_required = 0; + + /* Not much we can do for a feed */ + if (!req->feed) + return 0; + + for (i = 0; i < req->nb_streams; i++) { + AVCodecContext *codec = req->streams[i]->codec; + + switch(rates[i]) { + case 0: + c->switch_feed_streams[i] = req->feed_streams[i]; + break; + case 1: + c->switch_feed_streams[i] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 2); + break; + case 2: + /* Wants off or slow */ + c->switch_feed_streams[i] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 4); +#ifdef WANTS_OFF + /* This doesn't work well when it turns off the only stream! */ + c->switch_feed_streams[i] = -2; + c->feed_streams[i] = -2; +#endif + break; + } + + if (c->switch_feed_streams[i] >= 0 && c->switch_feed_streams[i] != c->feed_streams[i]) + action_required = 1; + } + + return action_required; +} + +/* XXX: factorize in utils.c ? */ +/* XXX: take care with different space meaning */ +static void skip_spaces(const char **pp) +{ + const char *p; + p = *pp; + while (*p == ' ' || *p == '\t') + p++; + *pp = p; +} + +static void get_word(char *buf, int buf_size, const char **pp) +{ + const char *p; + char *q; + + p = *pp; + skip_spaces(&p); + q = buf; + while (!isspace(*p) && *p != '\0') { + if ((q - buf) < buf_size - 1) + *q++ = *p; + p++; + } + if (buf_size > 0) + *q = '\0'; + *pp = p; +} + +static void get_arg(char *buf, int buf_size, const char **pp) +{ + const char *p; + char *q; + int quote; + + p = *pp; + while (isspace(*p)) p++; + q = buf; + quote = 0; + if (*p == '\"' || *p == '\'') + quote = *p++; + for(;;) { + if (quote) { + if (*p == quote) + break; + } else { + if (isspace(*p)) + break; + } + if (*p == '\0') + break; + if ((q - buf) < buf_size - 1) + *q++ = *p; + p++; + } + *q = '\0'; + if (quote && *p == quote) + p++; + *pp = p; +} + +static void parse_acl_row(FFStream *stream, FFStream* feed, IPAddressACL *ext_acl, + const char *p, const char *filename, int line_num) +{ + char arg[1024]; + IPAddressACL acl; + int errors = 0; + + get_arg(arg, sizeof(arg), &p); + if (av_strcasecmp(arg, "allow") == 0) + acl.action = IP_ALLOW; + else if (av_strcasecmp(arg, "deny") == 0) + acl.action = IP_DENY; + else { + fprintf(stderr, "%s:%d: ACL action '%s' is not ALLOW or DENY\n", + filename, line_num, arg); + errors++; + } + + get_arg(arg, sizeof(arg), &p); + + if (resolve_host(&acl.first, arg) != 0) { + fprintf(stderr, "%s:%d: ACL refers to invalid host or ip address '%s'\n", + filename, line_num, arg); + errors++; + } else + acl.last = acl.first; + + get_arg(arg, sizeof(arg), &p); + + if (arg[0]) { + if (resolve_host(&acl.last, arg) != 0) { + fprintf(stderr, "%s:%d: ACL refers to invalid host or ip address '%s'\n", + filename, line_num, arg); + errors++; + } + } + + if (!errors) { + IPAddressACL *nacl = av_mallocz(sizeof(*nacl)); + IPAddressACL **naclp = 0; + + acl.next = 0; + *nacl = acl; + + if (stream) + naclp = &stream->acl; + else if (feed) + naclp = &feed->acl; + else if (ext_acl) + naclp = &ext_acl; + else { + fprintf(stderr, "%s:%d: ACL found not in or \n", + filename, line_num); + errors++; + } + + if (naclp) { + while (*naclp) + naclp = &(*naclp)->next; + + *naclp = nacl; + } + } +} + + +static IPAddressACL* parse_dynamic_acl(FFStream *stream, HTTPContext *c) +{ + FILE* f; + char line[1024]; + char cmd[1024]; + IPAddressACL *acl = NULL; + int line_num = 0; + const char *p; + + f = fopen(stream->dynamic_acl, "r"); + if (!f) { + perror(stream->dynamic_acl); + return NULL; + } + + acl = av_mallocz(sizeof(IPAddressACL)); + + /* Build ACL */ + for(;;) { + if (fgets(line, sizeof(line), f) == NULL) + break; + line_num++; + p = line; + while (isspace(*p)) + p++; + if (*p == '\0' || *p == '#') + continue; + get_arg(cmd, sizeof(cmd), &p); + + if (!av_strcasecmp(cmd, "ACL")) + parse_acl_row(NULL, NULL, acl, p, stream->dynamic_acl, line_num); + } + fclose(f); + return acl; +} + + +static void free_acl_list(IPAddressACL *in_acl) +{ + IPAddressACL *pacl,*pacl2; + + pacl = in_acl; + while(pacl) { + pacl2 = pacl; + pacl = pacl->next; + av_freep(pacl2); + } +} + +static int validate_acl_list(IPAddressACL *in_acl, HTTPContext *c) +{ + enum IPAddressAction last_action = IP_DENY; + IPAddressACL *acl; + struct in_addr *src = &c->from_addr.sin_addr; + unsigned long src_addr = src->s_addr; + + for (acl = in_acl; acl; acl = acl->next) { + if (src_addr >= acl->first.s_addr && src_addr <= acl->last.s_addr) + return (acl->action == IP_ALLOW) ? 1 : 0; + last_action = acl->action; + } + + /* Nothing matched, so return not the last action */ + return (last_action == IP_DENY) ? 1 : 0; +} + +static int validate_acl(FFStream *stream, HTTPContext *c) +{ + int ret = 0; + IPAddressACL *acl; + + + /* if stream->acl is null validate_acl_list will return 1 */ + ret = validate_acl_list(stream->acl, c); + + if (stream->dynamic_acl[0]) { + acl = parse_dynamic_acl(stream, c); + + ret = validate_acl_list(acl, c); + + free_acl_list(acl); + } + + return ret; +} + +/* compute the real filename of a file by matching it without its + extensions to all the stream filenames */ +static void compute_real_filename(char *filename, int max_size) +{ + char file1[1024]; + char file2[1024]; + char *p; + FFStream *stream; + + /* compute filename by matching without the file extensions */ + av_strlcpy(file1, filename, sizeof(file1)); + p = strrchr(file1, '.'); + if (p) + *p = '\0'; + for(stream = first_stream; stream != NULL; stream = stream->next) { + av_strlcpy(file2, stream->filename, sizeof(file2)); + p = strrchr(file2, '.'); + if (p) + *p = '\0'; + if (!strcmp(file1, file2)) { + av_strlcpy(filename, stream->filename, max_size); + break; + } + } +} + +enum RedirType { + REDIR_NONE, + REDIR_ASX, + REDIR_RAM, + REDIR_ASF, + REDIR_RTSP, + REDIR_SDP, +}; + +/* parse http request and prepare header */ +static int http_parse_request(HTTPContext *c) +{ + char *p; + enum RedirType redir_type; + char cmd[32]; + char info[1024], filename[1024]; + char url[1024], *q; + char protocol[32]; + char msg[1024]; + const char *mime_type; + FFStream *stream; + int i; + char ratebuf[32]; + char *useragent = 0; + + p = c->buffer; + get_word(cmd, sizeof(cmd), (const char **)&p); + av_strlcpy(c->method, cmd, sizeof(c->method)); + + if (!strcmp(cmd, "GET")) + c->post = 0; + else if (!strcmp(cmd, "POST")) + c->post = 1; + else + return -1; + + get_word(url, sizeof(url), (const char **)&p); + av_strlcpy(c->url, url, sizeof(c->url)); + + get_word(protocol, sizeof(protocol), (const char **)&p); + if (strcmp(protocol, "HTTP/1.0") && strcmp(protocol, "HTTP/1.1")) + return -1; + + av_strlcpy(c->protocol, protocol, sizeof(c->protocol)); + + if (avserver_debug) + http_log("%s - - New connection: %s %s\n", inet_ntoa(c->from_addr.sin_addr), cmd, url); + + /* find the filename and the optional info string in the request */ + p = strchr(url, '?'); + if (p) { + av_strlcpy(info, p, sizeof(info)); + *p = '\0'; + } else + info[0] = '\0'; + + av_strlcpy(filename, url + ((*url == '/') ? 1 : 0), sizeof(filename)-1); + + for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) { + if (av_strncasecmp(p, "User-Agent:", 11) == 0) { + useragent = p + 11; + if (*useragent && *useragent != '\n' && isspace(*useragent)) + useragent++; + break; + } + p = strchr(p, '\n'); + if (!p) + break; + + p++; + } + + redir_type = REDIR_NONE; + if (av_match_ext(filename, "asx")) { + redir_type = REDIR_ASX; + filename[strlen(filename)-1] = 'f'; + } else if (av_match_ext(filename, "asf") && + (!useragent || av_strncasecmp(useragent, "NSPlayer", 8) != 0)) { + /* if this isn't WMP or lookalike, return the redirector file */ + redir_type = REDIR_ASF; + } else if (av_match_ext(filename, "rpm,ram")) { + redir_type = REDIR_RAM; + strcpy(filename + strlen(filename)-2, "m"); + } else if (av_match_ext(filename, "rtsp")) { + redir_type = REDIR_RTSP; + compute_real_filename(filename, sizeof(filename) - 1); + } else if (av_match_ext(filename, "sdp")) { + redir_type = REDIR_SDP; + compute_real_filename(filename, sizeof(filename) - 1); + } + + // "redirect" / request to index.html + if (!strlen(filename)) + av_strlcpy(filename, "index.html", sizeof(filename) - 1); + + stream = first_stream; + while (stream != NULL) { + if (!strcmp(stream->filename, filename) && validate_acl(stream, c)) + break; + stream = stream->next; + } + if (stream == NULL) { + snprintf(msg, sizeof(msg), "File '%s' not found", url); + http_log("File '%s' not found\n", url); + goto send_error; + } + + c->stream = stream; + memcpy(c->feed_streams, stream->feed_streams, sizeof(c->feed_streams)); + memset(c->switch_feed_streams, -1, sizeof(c->switch_feed_streams)); + + if (stream->stream_type == STREAM_TYPE_REDIRECT) { + c->http_error = 301; + q = c->buffer; + q += snprintf(q, c->buffer_size, + "HTTP/1.0 301 Moved\r\n" + "Location: %s\r\n" + "Content-type: text/html\r\n" + "\r\n" + "Moved\r\n" + "You should be redirected.\r\n" + "\r\n", stream->feed_filename, stream->feed_filename); + /* prepare output buffer */ + c->buffer_ptr = c->buffer; + c->buffer_end = q; + c->state = HTTPSTATE_SEND_HEADER; + return 0; + } + + /* If this is WMP, get the rate information */ + if (extract_rates(ratebuf, sizeof(ratebuf), c->buffer)) { + if (modify_current_stream(c, ratebuf)) { + for (i = 0; i < FF_ARRAY_ELEMS(c->feed_streams); i++) { + if (c->switch_feed_streams[i] >= 0) + c->switch_feed_streams[i] = -1; + } + } + } + + if (c->post == 0 && stream->stream_type == STREAM_TYPE_LIVE) + current_bandwidth += stream->bandwidth; + + /* If already streaming this feed, do not let start another feeder. */ + if (stream->feed_opened) { + snprintf(msg, sizeof(msg), "This feed is already being received."); + http_log("Feed '%s' already being received\n", stream->feed_filename); + goto send_error; + } + + if (c->post == 0 && max_bandwidth < current_bandwidth) { + c->http_error = 503; + q = c->buffer; + q += snprintf(q, c->buffer_size, + "HTTP/1.0 503 Server too busy\r\n" + "Content-type: text/html\r\n" + "\r\n" + "Too busy\r\n" + "

The server is too busy to serve your request at this time.

\r\n" + "

The bandwidth being served (including your stream) is %"PRIu64"kbit/sec, " + "and this exceeds the limit of %"PRIu64"kbit/sec.

\r\n" + "\r\n", current_bandwidth, max_bandwidth); + /* prepare output buffer */ + c->buffer_ptr = c->buffer; + c->buffer_end = q; + c->state = HTTPSTATE_SEND_HEADER; + return 0; + } + + if (redir_type != REDIR_NONE) { + char *hostinfo = 0; + + for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) { + if (av_strncasecmp(p, "Host:", 5) == 0) { + hostinfo = p + 5; + break; + } + p = strchr(p, '\n'); + if (!p) + break; + + p++; + } + + if (hostinfo) { + char *eoh; + char hostbuf[260]; + + while (isspace(*hostinfo)) + hostinfo++; + + eoh = strchr(hostinfo, '\n'); + if (eoh) { + if (eoh[-1] == '\r') + eoh--; + + if (eoh - hostinfo < sizeof(hostbuf) - 1) { + memcpy(hostbuf, hostinfo, eoh - hostinfo); + hostbuf[eoh - hostinfo] = 0; + + c->http_error = 200; + q = c->buffer; + switch(redir_type) { + case REDIR_ASX: + q += snprintf(q, c->buffer_size, + "HTTP/1.0 200 ASX Follows\r\n" + "Content-type: video/x-ms-asf\r\n" + "\r\n" + "\r\n" + //"\r\n" + "\r\n" + "\r\n", hostbuf, filename, info); + break; + case REDIR_RAM: + q += snprintf(q, c->buffer_size, + "HTTP/1.0 200 RAM Follows\r\n" + "Content-type: audio/x-pn-realaudio\r\n" + "\r\n" + "# Autogenerated by avserver\r\n" + "http://%s/%s%s\r\n", hostbuf, filename, info); + break; + case REDIR_ASF: + q += snprintf(q, c->buffer_size, + "HTTP/1.0 200 ASF Redirect follows\r\n" + "Content-type: video/x-ms-asf\r\n" + "\r\n" + "[Reference]\r\n" + "Ref1=http://%s/%s%s\r\n", hostbuf, filename, info); + break; + case REDIR_RTSP: + { + char hostname[256], *p; + /* extract only hostname */ + av_strlcpy(hostname, hostbuf, sizeof(hostname)); + p = strrchr(hostname, ':'); + if (p) + *p = '\0'; + q += snprintf(q, c->buffer_size, + "HTTP/1.0 200 RTSP Redirect follows\r\n" + /* XXX: incorrect mime type ? */ + "Content-type: application/x-rtsp\r\n" + "\r\n" + "rtsp://%s:%d/%s\r\n", hostname, ntohs(my_rtsp_addr.sin_port), filename); + } + break; + case REDIR_SDP: + { + uint8_t *sdp_data; + int sdp_data_size, len; + struct sockaddr_in my_addr; + + q += snprintf(q, c->buffer_size, + "HTTP/1.0 200 OK\r\n" + "Content-type: application/sdp\r\n" + "\r\n"); + + len = sizeof(my_addr); + getsockname(c->fd, (struct sockaddr *)&my_addr, &len); + + /* XXX: should use a dynamic buffer */ + sdp_data_size = prepare_sdp_description(stream, + &sdp_data, + my_addr.sin_addr); + if (sdp_data_size > 0) { + memcpy(q, sdp_data, sdp_data_size); + q += sdp_data_size; + *q = '\0'; + av_free(sdp_data); + } + } + break; + default: + abort(); + break; + } + + /* prepare output buffer */ + c->buffer_ptr = c->buffer; + c->buffer_end = q; + c->state = HTTPSTATE_SEND_HEADER; + return 0; + } + } + } + + snprintf(msg, sizeof(msg), "ASX/RAM file not handled"); + goto send_error; + } + + stream->conns_served++; + + /* XXX: add there authenticate and IP match */ + + if (c->post) { + /* if post, it means a feed is being sent */ + if (!stream->is_feed) { + /* However it might be a status report from WMP! Let us log the + * data as it might come in handy one day. */ + char *logline = 0; + int client_id = 0; + + for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) { + if (av_strncasecmp(p, "Pragma: log-line=", 17) == 0) { + logline = p; + break; + } + if (av_strncasecmp(p, "Pragma: client-id=", 18) == 0) + client_id = strtol(p + 18, 0, 10); + p = strchr(p, '\n'); + if (!p) + break; + + p++; + } + + if (logline) { + char *eol = strchr(logline, '\n'); + + logline += 17; + + if (eol) { + if (eol[-1] == '\r') + eol--; + http_log("%.*s\n", (int) (eol - logline), logline); + c->suppress_log = 1; + } + } + +#ifdef DEBUG + http_log("\nGot request:\n%s\n", c->buffer); +#endif + + if (client_id && extract_rates(ratebuf, sizeof(ratebuf), c->buffer)) { + HTTPContext *wmpc; + + /* Now we have to find the client_id */ + for (wmpc = first_http_ctx; wmpc; wmpc = wmpc->next) { + if (wmpc->wmp_client_id == client_id) + break; + } + + if (wmpc && modify_current_stream(wmpc, ratebuf)) + wmpc->switch_pending = 1; + } + + snprintf(msg, sizeof(msg), "POST command not handled"); + c->stream = 0; + goto send_error; + } + if (http_start_receive_data(c) < 0) { + snprintf(msg, sizeof(msg), "could not open feed"); + goto send_error; + } + c->http_error = 0; + c->state = HTTPSTATE_RECEIVE_DATA; + return 0; + } + +#ifdef DEBUG + if (strcmp(stream->filename + strlen(stream->filename) - 4, ".asf") == 0) + http_log("\nGot request:\n%s\n", c->buffer); +#endif + + if (c->stream->stream_type == STREAM_TYPE_STATUS) + goto send_status; + + /* open input stream */ + if (open_input_stream(c, info) < 0) { + snprintf(msg, sizeof(msg), "Input stream corresponding to '%s' not found", url); + goto send_error; + } + + /* prepare http header */ + q = c->buffer; + q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "HTTP/1.0 200 OK\r\n"); + mime_type = c->stream->fmt->mime_type; + if (!mime_type) + mime_type = "application/x-octet-stream"; + q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Pragma: no-cache\r\n"); + + /* for asf, we need extra headers */ + if (!strcmp(c->stream->fmt->name,"asf_stream")) { + /* Need to allocate a client id */ + + c->wmp_client_id = av_lfg_get(&random_state); + + q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Server: Cougar 4.1.0.3923\r\nCache-Control: no-cache\r\nPragma: client-id=%d\r\nPragma: features=\"broadcast\"\r\n", c->wmp_client_id); + } + q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Content-Type: %s\r\n", mime_type); + q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "\r\n"); + + /* prepare output buffer */ + c->http_error = 0; + c->buffer_ptr = c->buffer; + c->buffer_end = q; + c->state = HTTPSTATE_SEND_HEADER; + return 0; + send_error: + c->http_error = 404; + q = c->buffer; + q += snprintf(q, c->buffer_size, + "HTTP/1.0 404 Not Found\r\n" + "Content-type: text/html\r\n" + "\r\n" + "\n" + "404 Not Found\n" + "%s\n" + "\n", msg); + /* prepare output buffer */ + c->buffer_ptr = c->buffer; + c->buffer_end = q; + c->state = HTTPSTATE_SEND_HEADER; + return 0; + send_status: + compute_status(c); + c->http_error = 200; /* horrible : we use this value to avoid + going to the send data state */ + c->state = HTTPSTATE_SEND_HEADER; + return 0; +} + +static void fmt_bytecount(AVIOContext *pb, int64_t count) +{ + static const char *suffix = " kMGTP"; + const char *s; + + for (s = suffix; count >= 100000 && s[1]; count /= 1000, s++); + + avio_printf(pb, "%"PRId64"%c", count, *s); +} + +static void compute_status(HTTPContext *c) +{ + HTTPContext *c1; + FFStream *stream; + char *p; + time_t ti; + int i, len; + AVIOContext *pb; + + if (avio_open_dyn_buf(&pb) < 0) { + /* XXX: return an error ? */ + c->buffer_ptr = c->buffer; + c->buffer_end = c->buffer; + return; + } + + avio_printf(pb, "HTTP/1.0 200 OK\r\n"); + avio_printf(pb, "Content-type: %s\r\n", "text/html"); + avio_printf(pb, "Pragma: no-cache\r\n"); + avio_printf(pb, "\r\n"); + + avio_printf(pb, "%s Status\n", program_name); + if (c->stream->feed_filename[0]) + avio_printf(pb, "\n", c->stream->feed_filename); + avio_printf(pb, "\n"); + avio_printf(pb, "

%s Status

\n", program_name); + /* format status */ + avio_printf(pb, "

Available Streams

\n"); + avio_printf(pb, "\n"); + avio_printf(pb, "
PathServed
Conns

bytes
FormatBit rate
kbits/s
Video
kbits/s

Codec
Audio
kbits/s

Codec
Feed\n"); + stream = first_stream; + while (stream != NULL) { + char sfilename[1024]; + char *eosf; + + if (stream->feed != stream) { + av_strlcpy(sfilename, stream->filename, sizeof(sfilename) - 10); + eosf = sfilename + strlen(sfilename); + if (eosf - sfilename >= 4) { + if (strcmp(eosf - 4, ".asf") == 0) + strcpy(eosf - 4, ".asx"); + else if (strcmp(eosf - 3, ".rm") == 0) + strcpy(eosf - 3, ".ram"); + else if (stream->fmt && !strcmp(stream->fmt->name, "rtp")) { + /* generate a sample RTSP director if + unicast. Generate an SDP redirector if + multicast */ + eosf = strrchr(sfilename, '.'); + if (!eosf) + eosf = sfilename + strlen(sfilename); + if (stream->is_multicast) + strcpy(eosf, ".sdp"); + else + strcpy(eosf, ".rtsp"); + } + } + + avio_printf(pb, "
%s ", + sfilename, stream->filename); + avio_printf(pb, " %d ", + stream->conns_served); + fmt_bytecount(pb, stream->bytes_served); + switch(stream->stream_type) { + case STREAM_TYPE_LIVE: { + int audio_bit_rate = 0; + int video_bit_rate = 0; + const char *audio_codec_name = ""; + const char *video_codec_name = ""; + const char *audio_codec_name_extra = ""; + const char *video_codec_name_extra = ""; + + for(i=0;inb_streams;i++) { + AVStream *st = stream->streams[i]; + AVCodec *codec = avcodec_find_encoder(st->codec->codec_id); + switch(st->codec->codec_type) { + case AVMEDIA_TYPE_AUDIO: + audio_bit_rate += st->codec->bit_rate; + if (codec) { + if (*audio_codec_name) + audio_codec_name_extra = "..."; + audio_codec_name = codec->name; + } + break; + case AVMEDIA_TYPE_VIDEO: + video_bit_rate += st->codec->bit_rate; + if (codec) { + if (*video_codec_name) + video_codec_name_extra = "..."; + video_codec_name = codec->name; + } + break; + case AVMEDIA_TYPE_DATA: + video_bit_rate += st->codec->bit_rate; + break; + default: + abort(); + } + } + avio_printf(pb, " %s %d %d %s %s %d %s %s", + stream->fmt->name, + stream->bandwidth, + video_bit_rate / 1000, video_codec_name, video_codec_name_extra, + audio_bit_rate / 1000, audio_codec_name, audio_codec_name_extra); + if (stream->feed) + avio_printf(pb, "%s", stream->feed->filename); + else + avio_printf(pb, "%s", stream->feed_filename); + avio_printf(pb, "\n"); + } + break; + default: + avio_printf(pb, " - - - - \n"); + break; + } + } + stream = stream->next; + } + avio_printf(pb, "
\n"); + + stream = first_stream; + while (stream != NULL) { + if (stream->feed == stream) { + avio_printf(pb, "

Feed %s

", stream->filename); + if (stream->pid) { + avio_printf(pb, "Running as pid %d.\n", stream->pid); + +#if defined(linux) && !defined(CONFIG_NOCUTILS) + { + FILE *pid_stat; + char ps_cmd[64]; + + /* This is somewhat linux specific I guess */ + snprintf(ps_cmd, sizeof(ps_cmd), + "ps -o \"%%cpu,cputime\" --no-headers %d", + stream->pid); + + pid_stat = popen(ps_cmd, "r"); + if (pid_stat) { + char cpuperc[10]; + char cpuused[64]; + + if (fscanf(pid_stat, "%10s %64s", cpuperc, + cpuused) == 2) { + avio_printf(pb, "Currently using %s%% of the cpu. Total time used %s.\n", + cpuperc, cpuused); + } + fclose(pid_stat); + } + } +#endif + + avio_printf(pb, "

"); + } + avio_printf(pb, "
Streamtypekbits/scodecParameters\n"); + + for (i = 0; i < stream->nb_streams; i++) { + AVStream *st = stream->streams[i]; + AVCodec *codec = avcodec_find_encoder(st->codec->codec_id); + const char *type = "unknown"; + char parameters[64]; + + parameters[0] = 0; + + switch(st->codec->codec_type) { + case AVMEDIA_TYPE_AUDIO: + type = "audio"; + snprintf(parameters, sizeof(parameters), "%d channel(s), %d Hz", st->codec->channels, st->codec->sample_rate); + break; + case AVMEDIA_TYPE_VIDEO: + type = "video"; + snprintf(parameters, sizeof(parameters), "%dx%d, q=%d-%d, fps=%d", st->codec->width, st->codec->height, + st->codec->qmin, st->codec->qmax, st->codec->time_base.den / st->codec->time_base.num); + break; + default: + abort(); + } + avio_printf(pb, "
%d%s%d%s%s\n", + i, type, st->codec->bit_rate/1000, codec ? codec->name : "", parameters); + } + avio_printf(pb, "
\n"); + + } + stream = stream->next; + } + + /* connection status */ + avio_printf(pb, "

Connection Status

\n"); + + avio_printf(pb, "Number of connections: %d / %d
\n", + nb_connections, nb_max_connections); + + avio_printf(pb, "Bandwidth in use: %"PRIu64"k / %"PRIu64"k
\n", + current_bandwidth, max_bandwidth); + + avio_printf(pb, "\n"); + avio_printf(pb, "
#FileIPProtoStateTarget bits/secActual bits/secBytes transferred\n"); + c1 = first_http_ctx; + i = 0; + while (c1 != NULL) { + int bitrate; + int j; + + bitrate = 0; + if (c1->stream) { + for (j = 0; j < c1->stream->nb_streams; j++) { + if (!c1->stream->feed) + bitrate += c1->stream->streams[j]->codec->bit_rate; + else if (c1->feed_streams[j] >= 0) + bitrate += c1->stream->feed->streams[c1->feed_streams[j]]->codec->bit_rate; + } + } + + i++; + p = inet_ntoa(c1->from_addr.sin_addr); + avio_printf(pb, "
%d%s%s%s%s%s", + i, + c1->stream ? c1->stream->filename : "", + c1->state == HTTPSTATE_RECEIVE_DATA ? "(input)" : "", + p, + c1->protocol, + http_state[c1->state]); + fmt_bytecount(pb, bitrate); + avio_printf(pb, ""); + fmt_bytecount(pb, compute_datarate(&c1->datarate, c1->data_count) * 8); + avio_printf(pb, ""); + fmt_bytecount(pb, c1->data_count); + avio_printf(pb, "\n"); + c1 = c1->next; + } + avio_printf(pb, "
\n"); + + /* date */ + ti = time(NULL); + p = ctime(&ti); + avio_printf(pb, "
Generated at %s", p); + avio_printf(pb, "\n\n"); + + len = avio_close_dyn_buf(pb, &c->pb_buffer); + c->buffer_ptr = c->pb_buffer; + c->buffer_end = c->pb_buffer + len; +} + +/* check if the parser needs to be opened for stream i */ +static void open_parser(AVFormatContext *s, int i) +{ + AVStream *st = s->streams[i]; + AVCodec *codec; + + if (!st->codec->codec) { + codec = avcodec_find_decoder(st->codec->codec_id); + if (codec && (codec->capabilities & CODEC_CAP_PARSE_ONLY)) { + st->codec->parse_only = 1; + if (avcodec_open2(st->codec, codec, NULL) < 0) + st->codec->parse_only = 0; + } + } +} + +static int open_input_stream(HTTPContext *c, const char *info) +{ + char buf[128]; + char input_filename[1024]; + AVFormatContext *s = NULL; + int i, ret; + int64_t stream_pos; + + /* find file name */ + if (c->stream->feed) { + strcpy(input_filename, c->stream->feed->feed_filename); + /* compute position (absolute time) */ + if (av_find_info_tag(buf, sizeof(buf), "date", info)) { + if ((ret = av_parse_time(&stream_pos, buf, 0)) < 0) + return ret; + } else if (av_find_info_tag(buf, sizeof(buf), "buffer", info)) { + int prebuffer = strtol(buf, 0, 10); + stream_pos = av_gettime() - prebuffer * (int64_t)1000000; + } else + stream_pos = av_gettime() - c->stream->prebuffer * (int64_t)1000; + } else { + strcpy(input_filename, c->stream->feed_filename); + /* compute position (relative time) */ + if (av_find_info_tag(buf, sizeof(buf), "date", info)) { + if ((ret = av_parse_time(&stream_pos, buf, 1)) < 0) + return ret; + } else + stream_pos = 0; + } + if (input_filename[0] == '\0') + return -1; + + /* open stream */ + if ((ret = avformat_open_input(&s, input_filename, c->stream->ifmt, &c->stream->in_opts)) < 0) { + http_log("could not open %s: %d\n", input_filename, ret); + return -1; + } + s->flags |= AVFMT_FLAG_GENPTS; + c->fmt_in = s; + if (strcmp(s->iformat->name, "ffm") && avformat_find_stream_info(c->fmt_in, NULL) < 0) { + http_log("Could not find stream info '%s'\n", input_filename); + avformat_close_input(&s); + return -1; + } + + /* open each parser */ + for(i=0;inb_streams;i++) + open_parser(s, i); + + /* choose stream as clock source (we favorize video stream if + present) for packet sending */ + c->pts_stream_index = 0; + for(i=0;istream->nb_streams;i++) { + if (c->pts_stream_index == 0 && + c->stream->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) { + c->pts_stream_index = i; + } + } + + if (c->fmt_in->iformat->read_seek) + av_seek_frame(c->fmt_in, -1, stream_pos, 0); + /* set the start time (needed for maxtime and RTP packet timing) */ + c->start_time = cur_time; + c->first_pts = AV_NOPTS_VALUE; + return 0; +} + +/* return the server clock (in us) */ +static int64_t get_server_clock(HTTPContext *c) +{ + /* compute current pts value from system time */ + return (cur_time - c->start_time) * 1000; +} + +/* return the estimated time at which the current packet must be sent + (in us) */ +static int64_t get_packet_send_clock(HTTPContext *c) +{ + int bytes_left, bytes_sent, frame_bytes; + + frame_bytes = c->cur_frame_bytes; + if (frame_bytes <= 0) + return c->cur_pts; + else { + bytes_left = c->buffer_end - c->buffer_ptr; + bytes_sent = frame_bytes - bytes_left; + return c->cur_pts + (c->cur_frame_duration * bytes_sent) / frame_bytes; + } +} + + +static int http_prepare_data(HTTPContext *c) +{ + int i, len, ret; + AVFormatContext *ctx; + + av_freep(&c->pb_buffer); + switch(c->state) { + case HTTPSTATE_SEND_DATA_HEADER: + memset(&c->fmt_ctx, 0, sizeof(c->fmt_ctx)); + av_dict_set(&c->fmt_ctx.metadata, "author" , c->stream->author , 0); + av_dict_set(&c->fmt_ctx.metadata, "comment" , c->stream->comment , 0); + av_dict_set(&c->fmt_ctx.metadata, "copyright", c->stream->copyright, 0); + av_dict_set(&c->fmt_ctx.metadata, "title" , c->stream->title , 0); + + c->fmt_ctx.streams = av_mallocz(sizeof(AVStream *) * c->stream->nb_streams); + + for(i=0;istream->nb_streams;i++) { + AVStream *src; + c->fmt_ctx.streams[i] = av_mallocz(sizeof(AVStream)); + /* if file or feed, then just take streams from FFStream struct */ + if (!c->stream->feed || + c->stream->feed == c->stream) + src = c->stream->streams[i]; + else + src = c->stream->feed->streams[c->stream->feed_streams[i]]; + + *(c->fmt_ctx.streams[i]) = *src; + c->fmt_ctx.streams[i]->priv_data = 0; + c->fmt_ctx.streams[i]->codec->frame_number = 0; /* XXX: should be done in + AVStream, not in codec */ + } + /* set output format parameters */ + c->fmt_ctx.oformat = c->stream->fmt; + c->fmt_ctx.nb_streams = c->stream->nb_streams; + + c->got_key_frame = 0; + + /* prepare header and save header data in a stream */ + if (avio_open_dyn_buf(&c->fmt_ctx.pb) < 0) { + /* XXX: potential leak */ + return -1; + } + c->fmt_ctx.pb->seekable = 0; + + /* + * HACK to avoid mpeg ps muxer to spit many underflow errors + * Default value from Libav + * Try to set it use configuration option + */ + c->fmt_ctx.preload = (int)(0.5*AV_TIME_BASE); + c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE); + + if (avformat_write_header(&c->fmt_ctx, NULL) < 0) { + http_log("Error writing output header\n"); + return -1; + } + av_dict_free(&c->fmt_ctx.metadata); + + len = avio_close_dyn_buf(c->fmt_ctx.pb, &c->pb_buffer); + c->buffer_ptr = c->pb_buffer; + c->buffer_end = c->pb_buffer + len; + + c->state = HTTPSTATE_SEND_DATA; + c->last_packet_sent = 0; + break; + case HTTPSTATE_SEND_DATA: + /* find a new packet */ + /* read a packet from the input stream */ + if (c->stream->feed) + ffm_set_write_index(c->fmt_in, + c->stream->feed->feed_write_index, + c->stream->feed->feed_size); + + if (c->stream->max_time && + c->stream->max_time + c->start_time - cur_time < 0) + /* We have timed out */ + c->state = HTTPSTATE_SEND_DATA_TRAILER; + else { + AVPacket pkt; + redo: + ret = av_read_frame(c->fmt_in, &pkt); + if (ret < 0) { + if (c->stream->feed) { + /* if coming from feed, it means we reached the end of the + ffm file, so must wait for more data */ + c->state = HTTPSTATE_WAIT_FEED; + return 1; /* state changed */ + } else if (ret == AVERROR(EAGAIN)) { + /* input not ready, come back later */ + return 0; + } else { + if (c->stream->loop) { + avformat_close_input(&c->fmt_in); + if (open_input_stream(c, "") < 0) + goto no_loop; + goto redo; + } else { + no_loop: + /* must send trailer now because eof or error */ + c->state = HTTPSTATE_SEND_DATA_TRAILER; + } + } + } else { + int source_index = pkt.stream_index; + /* update first pts if needed */ + if (c->first_pts == AV_NOPTS_VALUE) { + c->first_pts = av_rescale_q(pkt.dts, c->fmt_in->streams[pkt.stream_index]->time_base, AV_TIME_BASE_Q); + c->start_time = cur_time; + } + /* send it to the appropriate stream */ + if (c->stream->feed) { + /* if coming from a feed, select the right stream */ + if (c->switch_pending) { + c->switch_pending = 0; + for(i=0;istream->nb_streams;i++) { + if (c->switch_feed_streams[i] == pkt.stream_index) + if (pkt.flags & AV_PKT_FLAG_KEY) + c->switch_feed_streams[i] = -1; + if (c->switch_feed_streams[i] >= 0) + c->switch_pending = 1; + } + } + for(i=0;istream->nb_streams;i++) { + if (c->stream->feed_streams[i] == pkt.stream_index) { + AVStream *st = c->fmt_in->streams[source_index]; + pkt.stream_index = i; + if (pkt.flags & AV_PKT_FLAG_KEY && + (st->codec->codec_type == AVMEDIA_TYPE_VIDEO || + c->stream->nb_streams == 1)) + c->got_key_frame = 1; + if (!c->stream->send_on_key || c->got_key_frame) + goto send_it; + } + } + } else { + AVCodecContext *codec; + AVStream *ist, *ost; + send_it: + ist = c->fmt_in->streams[source_index]; + /* specific handling for RTP: we use several + output stream (one for each RTP + connection). XXX: need more abstract handling */ + if (c->is_packetized) { + /* compute send time and duration */ + c->cur_pts = av_rescale_q(pkt.dts, ist->time_base, AV_TIME_BASE_Q); + c->cur_pts -= c->first_pts; + c->cur_frame_duration = av_rescale_q(pkt.duration, ist->time_base, AV_TIME_BASE_Q); + /* find RTP context */ + c->packet_stream_index = pkt.stream_index; + ctx = c->rtp_ctx[c->packet_stream_index]; + if(!ctx) { + av_free_packet(&pkt); + break; + } + codec = ctx->streams[0]->codec; + /* only one stream per RTP connection */ + pkt.stream_index = 0; + } else { + ctx = &c->fmt_ctx; + /* Fudge here */ + codec = ctx->streams[pkt.stream_index]->codec; + } + + if (c->is_packetized) { + int max_packet_size; + if (c->rtp_protocol == RTSP_LOWER_TRANSPORT_TCP) + max_packet_size = RTSP_TCP_MAX_PACKET_SIZE; + else + max_packet_size = url_get_max_packet_size(c->rtp_handles[c->packet_stream_index]); + ret = ffio_open_dyn_packet_buf(&ctx->pb, max_packet_size); + } else { + ret = avio_open_dyn_buf(&ctx->pb); + } + if (ret < 0) { + /* XXX: potential leak */ + return -1; + } + ost = ctx->streams[pkt.stream_index]; + + ctx->pb->seekable = 0; + if (pkt.dts != AV_NOPTS_VALUE) + pkt.dts = av_rescale_q(pkt.dts, ist->time_base, ost->time_base); + if (pkt.pts != AV_NOPTS_VALUE) + pkt.pts = av_rescale_q(pkt.pts, ist->time_base, ost->time_base); + pkt.duration = av_rescale_q(pkt.duration, ist->time_base, ost->time_base); + if (av_write_frame(ctx, &pkt) < 0) { + http_log("Error writing frame to output\n"); + c->state = HTTPSTATE_SEND_DATA_TRAILER; + } + + len = avio_close_dyn_buf(ctx->pb, &c->pb_buffer); + c->cur_frame_bytes = len; + c->buffer_ptr = c->pb_buffer; + c->buffer_end = c->pb_buffer + len; + + codec->frame_number++; + if (len == 0) { + av_free_packet(&pkt); + goto redo; + } + } + av_free_packet(&pkt); + } + } + break; + default: + case HTTPSTATE_SEND_DATA_TRAILER: + /* last packet test ? */ + if (c->last_packet_sent || c->is_packetized) + return -1; + ctx = &c->fmt_ctx; + /* prepare header */ + if (avio_open_dyn_buf(&ctx->pb) < 0) { + /* XXX: potential leak */ + return -1; + } + c->fmt_ctx.pb->seekable = 0; + av_write_trailer(ctx); + len = avio_close_dyn_buf(ctx->pb, &c->pb_buffer); + c->buffer_ptr = c->pb_buffer; + c->buffer_end = c->pb_buffer + len; + + c->last_packet_sent = 1; + break; + } + return 0; +} + +/* should convert the format at the same time */ +/* send data starting at c->buffer_ptr to the output connection + (either UDP or TCP connection) */ +static int http_send_data(HTTPContext *c) +{ + int len, ret; + + for(;;) { + if (c->buffer_ptr >= c->buffer_end) { + ret = http_prepare_data(c); + if (ret < 0) + return -1; + else if (ret != 0) + /* state change requested */ + break; + } else { + if (c->is_packetized) { + /* RTP data output */ + len = c->buffer_end - c->buffer_ptr; + if (len < 4) { + /* fail safe - should never happen */ + fail1: + c->buffer_ptr = c->buffer_end; + return 0; + } + len = (c->buffer_ptr[0] << 24) | + (c->buffer_ptr[1] << 16) | + (c->buffer_ptr[2] << 8) | + (c->buffer_ptr[3]); + if (len > (c->buffer_end - c->buffer_ptr)) + goto fail1; + if ((get_packet_send_clock(c) - get_server_clock(c)) > 0) { + /* nothing to send yet: we can wait */ + return 0; + } + + c->data_count += len; + update_datarate(&c->datarate, c->data_count); + if (c->stream) + c->stream->bytes_served += len; + + if (c->rtp_protocol == RTSP_LOWER_TRANSPORT_TCP) { + /* RTP packets are sent inside the RTSP TCP connection */ + AVIOContext *pb; + int interleaved_index, size; + uint8_t header[4]; + HTTPContext *rtsp_c; + + rtsp_c = c->rtsp_c; + /* if no RTSP connection left, error */ + if (!rtsp_c) + return -1; + /* if already sending something, then wait. */ + if (rtsp_c->state != RTSPSTATE_WAIT_REQUEST) + break; + if (avio_open_dyn_buf(&pb) < 0) + goto fail1; + interleaved_index = c->packet_stream_index * 2; + /* RTCP packets are sent at odd indexes */ + if (c->buffer_ptr[1] == 200) + interleaved_index++; + /* write RTSP TCP header */ + header[0] = '$'; + header[1] = interleaved_index; + header[2] = len >> 8; + header[3] = len; + avio_write(pb, header, 4); + /* write RTP packet data */ + c->buffer_ptr += 4; + avio_write(pb, c->buffer_ptr, len); + size = avio_close_dyn_buf(pb, &c->packet_buffer); + /* prepare asynchronous TCP sending */ + rtsp_c->packet_buffer_ptr = c->packet_buffer; + rtsp_c->packet_buffer_end = c->packet_buffer + size; + c->buffer_ptr += len; + + /* send everything we can NOW */ + len = send(rtsp_c->fd, rtsp_c->packet_buffer_ptr, + rtsp_c->packet_buffer_end - rtsp_c->packet_buffer_ptr, 0); + if (len > 0) + rtsp_c->packet_buffer_ptr += len; + if (rtsp_c->packet_buffer_ptr < rtsp_c->packet_buffer_end) { + /* if we could not send all the data, we will + send it later, so a new state is needed to + "lock" the RTSP TCP connection */ + rtsp_c->state = RTSPSTATE_SEND_PACKET; + break; + } else + /* all data has been sent */ + av_freep(&c->packet_buffer); + } else { + /* send RTP packet directly in UDP */ + c->buffer_ptr += 4; + url_write(c->rtp_handles[c->packet_stream_index], + c->buffer_ptr, len); + c->buffer_ptr += len; + /* here we continue as we can send several packets per 10 ms slot */ + } + } else { + /* TCP data output */ + len = send(c->fd, c->buffer_ptr, c->buffer_end - c->buffer_ptr, 0); + if (len < 0) { + if (ff_neterrno() != AVERROR(EAGAIN) && + ff_neterrno() != AVERROR(EINTR)) + /* error : close connection */ + return -1; + else + return 0; + } else + c->buffer_ptr += len; + + c->data_count += len; + update_datarate(&c->datarate, c->data_count); + if (c->stream) + c->stream->bytes_served += len; + break; + } + } + } /* for(;;) */ + return 0; +} + +static int http_start_receive_data(HTTPContext *c) +{ + int fd; + + if (c->stream->feed_opened) + return -1; + + /* Don't permit writing to this one */ + if (c->stream->readonly) + return -1; + + /* open feed */ + fd = open(c->stream->feed_filename, O_RDWR); + if (fd < 0) { + http_log("Error opening feeder file: %s\n", strerror(errno)); + return -1; + } + c->feed_fd = fd; + + if (c->stream->truncate) { + /* truncate feed file */ + ffm_write_write_index(c->feed_fd, FFM_PACKET_SIZE); + ftruncate(c->feed_fd, FFM_PACKET_SIZE); + http_log("Truncating feed file '%s'\n", c->stream->feed_filename); + } else { + if ((c->stream->feed_write_index = ffm_read_write_index(fd)) < 0) { + http_log("Error reading write index from feed file: %s\n", strerror(errno)); + return -1; + } + } + + c->stream->feed_write_index = FFMAX(ffm_read_write_index(fd), FFM_PACKET_SIZE); + c->stream->feed_size = lseek(fd, 0, SEEK_END); + lseek(fd, 0, SEEK_SET); + + /* init buffer input */ + c->buffer_ptr = c->buffer; + c->buffer_end = c->buffer + FFM_PACKET_SIZE; + c->stream->feed_opened = 1; + c->chunked_encoding = !!av_stristr(c->buffer, "Transfer-Encoding: chunked"); + return 0; +} + +static int http_receive_data(HTTPContext *c) +{ + HTTPContext *c1; + int len, loop_run = 0; + + while (c->chunked_encoding && !c->chunk_size && + c->buffer_end > c->buffer_ptr) { + /* read chunk header, if present */ + len = recv(c->fd, c->buffer_ptr, 1, 0); + + if (len < 0) { + if (ff_neterrno() != AVERROR(EAGAIN) && + ff_neterrno() != AVERROR(EINTR)) + /* error : close connection */ + goto fail; + return 0; + } else if (len == 0) { + /* end of connection : close it */ + goto fail; + } else if (c->buffer_ptr - c->buffer >= 2 && + !memcmp(c->buffer_ptr - 1, "\r\n", 2)) { + c->chunk_size = strtol(c->buffer, 0, 16); + if (c->chunk_size == 0) // end of stream + goto fail; + c->buffer_ptr = c->buffer; + break; + } else if (++loop_run > 10) { + /* no chunk header, abort */ + goto fail; + } else { + c->buffer_ptr++; + } + } + + if (c->buffer_end > c->buffer_ptr) { + len = recv(c->fd, c->buffer_ptr, + FFMIN(c->chunk_size, c->buffer_end - c->buffer_ptr), 0); + if (len < 0) { + if (ff_neterrno() != AVERROR(EAGAIN) && + ff_neterrno() != AVERROR(EINTR)) + /* error : close connection */ + goto fail; + } else if (len == 0) + /* end of connection : close it */ + goto fail; + else { + c->chunk_size -= len; + c->buffer_ptr += len; + c->data_count += len; + update_datarate(&c->datarate, c->data_count); + } + } + + if (c->buffer_ptr - c->buffer >= 2 && c->data_count > FFM_PACKET_SIZE) { + if (c->buffer[0] != 'f' || + c->buffer[1] != 'm') { + http_log("Feed stream has become desynchronized -- disconnecting\n"); + goto fail; + } + } + + if (c->buffer_ptr >= c->buffer_end) { + FFStream *feed = c->stream; + /* a packet has been received : write it in the store, except + if header */ + if (c->data_count > FFM_PACKET_SIZE) { + + // printf("writing pos=0x%"PRIx64" size=0x%"PRIx64"\n", feed->feed_write_index, feed->feed_size); + /* XXX: use llseek or url_seek */ + lseek(c->feed_fd, feed->feed_write_index, SEEK_SET); + if (write(c->feed_fd, c->buffer, FFM_PACKET_SIZE) < 0) { + http_log("Error writing to feed file: %s\n", strerror(errno)); + goto fail; + } + + feed->feed_write_index += FFM_PACKET_SIZE; + /* update file size */ + if (feed->feed_write_index > c->stream->feed_size) + feed->feed_size = feed->feed_write_index; + + /* handle wrap around if max file size reached */ + if (c->stream->feed_max_size && feed->feed_write_index >= c->stream->feed_max_size) + feed->feed_write_index = FFM_PACKET_SIZE; + + /* write index */ + if (ffm_write_write_index(c->feed_fd, feed->feed_write_index) < 0) { + http_log("Error writing index to feed file: %s\n", strerror(errno)); + goto fail; + } + + /* wake up any waiting connections */ + for(c1 = first_http_ctx; c1 != NULL; c1 = c1->next) { + if (c1->state == HTTPSTATE_WAIT_FEED && + c1->stream->feed == c->stream->feed) + c1->state = HTTPSTATE_SEND_DATA; + } + } else { + /* We have a header in our hands that contains useful data */ + AVFormatContext *s = avformat_alloc_context(); + AVIOContext *pb; + AVInputFormat *fmt_in; + int i; + + if (!s) + goto fail; + + /* use feed output format name to find corresponding input format */ + fmt_in = av_find_input_format(feed->fmt->name); + if (!fmt_in) + goto fail; + + pb = avio_alloc_context(c->buffer, c->buffer_end - c->buffer, + 0, NULL, NULL, NULL, NULL); + pb->seekable = 0; + + s->pb = pb; + if (avformat_open_input(&s, c->stream->feed_filename, fmt_in, NULL) < 0) { + av_free(pb); + goto fail; + } + + /* Now we have the actual streams */ + if (s->nb_streams != feed->nb_streams) { + avformat_close_input(&s); + av_free(pb); + http_log("Feed '%s' stream number does not match registered feed\n", + c->stream->feed_filename); + goto fail; + } + + for (i = 0; i < s->nb_streams; i++) { + AVStream *fst = feed->streams[i]; + AVStream *st = s->streams[i]; + avcodec_copy_context(fst->codec, st->codec); + } + + avformat_close_input(&s); + av_free(pb); + } + c->buffer_ptr = c->buffer; + } + + return 0; + fail: + c->stream->feed_opened = 0; + close(c->feed_fd); + /* wake up any waiting connections to stop waiting for feed */ + for(c1 = first_http_ctx; c1 != NULL; c1 = c1->next) { + if (c1->state == HTTPSTATE_WAIT_FEED && + c1->stream->feed == c->stream->feed) + c1->state = HTTPSTATE_SEND_DATA_TRAILER; + } + return -1; +} + +/********************************************************************/ +/* RTSP handling */ + +static void rtsp_reply_header(HTTPContext *c, enum RTSPStatusCode error_number) +{ + const char *str; + time_t ti; + struct tm *tm; + char buf2[32]; + + switch(error_number) { + case RTSP_STATUS_OK: + str = "OK"; + break; + case RTSP_STATUS_METHOD: + str = "Method Not Allowed"; + break; + case RTSP_STATUS_BANDWIDTH: + str = "Not Enough Bandwidth"; + break; + case RTSP_STATUS_SESSION: + str = "Session Not Found"; + break; + case RTSP_STATUS_STATE: + str = "Method Not Valid in This State"; + break; + case RTSP_STATUS_AGGREGATE: + str = "Aggregate operation not allowed"; + break; + case RTSP_STATUS_ONLY_AGGREGATE: + str = "Only aggregate operation allowed"; + break; + case RTSP_STATUS_TRANSPORT: + str = "Unsupported transport"; + break; + case RTSP_STATUS_INTERNAL: + str = "Internal Server Error"; + break; + case RTSP_STATUS_SERVICE: + str = "Service Unavailable"; + break; + case RTSP_STATUS_VERSION: + str = "RTSP Version not supported"; + break; + default: + str = "Unknown Error"; + break; + } + + avio_printf(c->pb, "RTSP/1.0 %d %s\r\n", error_number, str); + avio_printf(c->pb, "CSeq: %d\r\n", c->seq); + + /* output GMT time */ + ti = time(NULL); + tm = gmtime(&ti); + strftime(buf2, sizeof(buf2), "%a, %d %b %Y %H:%M:%S", tm); + avio_printf(c->pb, "Date: %s GMT\r\n", buf2); +} + +static void rtsp_reply_error(HTTPContext *c, enum RTSPStatusCode error_number) +{ + rtsp_reply_header(c, error_number); + avio_printf(c->pb, "\r\n"); +} + +static int rtsp_parse_request(HTTPContext *c) +{ + const char *p, *p1, *p2; + char cmd[32]; + char url[1024]; + char protocol[32]; + char line[1024]; + int len; + RTSPMessageHeader header1, *header = &header1; + + c->buffer_ptr[0] = '\0'; + p = c->buffer; + + get_word(cmd, sizeof(cmd), &p); + get_word(url, sizeof(url), &p); + get_word(protocol, sizeof(protocol), &p); + + av_strlcpy(c->method, cmd, sizeof(c->method)); + av_strlcpy(c->url, url, sizeof(c->url)); + av_strlcpy(c->protocol, protocol, sizeof(c->protocol)); + + if (avio_open_dyn_buf(&c->pb) < 0) { + /* XXX: cannot do more */ + c->pb = NULL; /* safety */ + return -1; + } + + /* check version name */ + if (strcmp(protocol, "RTSP/1.0") != 0) { + rtsp_reply_error(c, RTSP_STATUS_VERSION); + goto the_end; + } + + /* parse each header line */ + memset(header, 0, sizeof(*header)); + /* skip to next line */ + while (*p != '\n' && *p != '\0') + p++; + if (*p == '\n') + p++; + while (*p != '\0') { + p1 = memchr(p, '\n', (char *)c->buffer_ptr - p); + if (!p1) + break; + p2 = p1; + if (p2 > p && p2[-1] == '\r') + p2--; + /* skip empty line */ + if (p2 == p) + break; + len = p2 - p; + if (len > sizeof(line) - 1) + len = sizeof(line) - 1; + memcpy(line, p, len); + line[len] = '\0'; + ff_rtsp_parse_line(header, line, NULL, NULL); + p = p1 + 1; + } + + /* handle sequence number */ + c->seq = header->seq; + + if (!strcmp(cmd, "DESCRIBE")) + rtsp_cmd_describe(c, url); + else if (!strcmp(cmd, "OPTIONS")) + rtsp_cmd_options(c, url); + else if (!strcmp(cmd, "SETUP")) + rtsp_cmd_setup(c, url, header); + else if (!strcmp(cmd, "PLAY")) + rtsp_cmd_play(c, url, header); + else if (!strcmp(cmd, "PAUSE")) + rtsp_cmd_pause(c, url, header); + else if (!strcmp(cmd, "TEARDOWN")) + rtsp_cmd_teardown(c, url, header); + else + rtsp_reply_error(c, RTSP_STATUS_METHOD); + + the_end: + len = avio_close_dyn_buf(c->pb, &c->pb_buffer); + c->pb = NULL; /* safety */ + if (len < 0) { + /* XXX: cannot do more */ + return -1; + } + c->buffer_ptr = c->pb_buffer; + c->buffer_end = c->pb_buffer + len; + c->state = RTSPSTATE_SEND_REPLY; + return 0; +} + +static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, + struct in_addr my_ip) +{ + AVFormatContext *avc; + AVStream *avs = NULL; + int i; + + avc = avformat_alloc_context(); + if (avc == NULL) { + return -1; + } + av_dict_set(&avc->metadata, "title", + stream->title[0] ? stream->title : "No Title", 0); + avc->nb_streams = stream->nb_streams; + if (stream->is_multicast) { + snprintf(avc->filename, 1024, "rtp://%s:%d?multicast=1?ttl=%d", + inet_ntoa(stream->multicast_ip), + stream->multicast_port, stream->multicast_ttl); + } else { + snprintf(avc->filename, 1024, "rtp://0.0.0.0"); + } + + if (avc->nb_streams >= INT_MAX/sizeof(*avc->streams) || + !(avc->streams = av_malloc(avc->nb_streams * sizeof(*avc->streams)))) + goto sdp_done; + if (avc->nb_streams >= INT_MAX/sizeof(*avs) || + !(avs = av_malloc(avc->nb_streams * sizeof(*avs)))) + goto sdp_done; + + for(i = 0; i < stream->nb_streams; i++) { + avc->streams[i] = &avs[i]; + avc->streams[i]->codec = stream->streams[i]->codec; + } + *pbuffer = av_mallocz(2048); + av_sdp_create(&avc, 1, *pbuffer, 2048); + + sdp_done: + av_free(avc->streams); + av_dict_free(&avc->metadata); + av_free(avc); + av_free(avs); + + return strlen(*pbuffer); +} + +static void rtsp_cmd_options(HTTPContext *c, const char *url) +{ +// rtsp_reply_header(c, RTSP_STATUS_OK); + avio_printf(c->pb, "RTSP/1.0 %d %s\r\n", RTSP_STATUS_OK, "OK"); + avio_printf(c->pb, "CSeq: %d\r\n", c->seq); + avio_printf(c->pb, "Public: %s\r\n", "OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE"); + avio_printf(c->pb, "\r\n"); +} + +static void rtsp_cmd_describe(HTTPContext *c, const char *url) +{ + FFStream *stream; + char path1[1024]; + const char *path; + uint8_t *content; + int content_length, len; + struct sockaddr_in my_addr; + + /* find which url is asked */ + av_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); + path = path1; + if (*path == '/') + path++; + + for(stream = first_stream; stream != NULL; stream = stream->next) { + if (!stream->is_feed && + stream->fmt && !strcmp(stream->fmt->name, "rtp") && + !strcmp(path, stream->filename)) { + goto found; + } + } + /* no stream found */ + rtsp_reply_error(c, RTSP_STATUS_SERVICE); /* XXX: right error ? */ + return; + + found: + /* prepare the media description in sdp format */ + + /* get the host IP */ + len = sizeof(my_addr); + getsockname(c->fd, (struct sockaddr *)&my_addr, &len); + content_length = prepare_sdp_description(stream, &content, my_addr.sin_addr); + if (content_length < 0) { + rtsp_reply_error(c, RTSP_STATUS_INTERNAL); + return; + } + rtsp_reply_header(c, RTSP_STATUS_OK); + avio_printf(c->pb, "Content-Base: %s/\r\n", url); + avio_printf(c->pb, "Content-Type: application/sdp\r\n"); + avio_printf(c->pb, "Content-Length: %d\r\n", content_length); + avio_printf(c->pb, "\r\n"); + avio_write(c->pb, content, content_length); + av_free(content); +} + +static HTTPContext *find_rtp_session(const char *session_id) +{ + HTTPContext *c; + + if (session_id[0] == '\0') + return NULL; + + for(c = first_http_ctx; c != NULL; c = c->next) { + if (!strcmp(c->session_id, session_id)) + return c; + } + return NULL; +} + +static RTSPTransportField *find_transport(RTSPMessageHeader *h, enum RTSPLowerTransport lower_transport) +{ + RTSPTransportField *th; + int i; + + for(i=0;inb_transports;i++) { + th = &h->transports[i]; + if (th->lower_transport == lower_transport) + return th; + } + return NULL; +} + +static void rtsp_cmd_setup(HTTPContext *c, const char *url, + RTSPMessageHeader *h) +{ + FFStream *stream; + int stream_index, rtp_port, rtcp_port; + char buf[1024]; + char path1[1024]; + const char *path; + HTTPContext *rtp_c; + RTSPTransportField *th; + struct sockaddr_in dest_addr; + RTSPActionServerSetup setup; + + /* find which url is asked */ + av_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); + path = path1; + if (*path == '/') + path++; + + /* now check each stream */ + for(stream = first_stream; stream != NULL; stream = stream->next) { + if (!stream->is_feed && + stream->fmt && !strcmp(stream->fmt->name, "rtp")) { + /* accept aggregate filenames only if single stream */ + if (!strcmp(path, stream->filename)) { + if (stream->nb_streams != 1) { + rtsp_reply_error(c, RTSP_STATUS_AGGREGATE); + return; + } + stream_index = 0; + goto found; + } + + for(stream_index = 0; stream_index < stream->nb_streams; + stream_index++) { + snprintf(buf, sizeof(buf), "%s/streamid=%d", + stream->filename, stream_index); + if (!strcmp(path, buf)) + goto found; + } + } + } + /* no stream found */ + rtsp_reply_error(c, RTSP_STATUS_SERVICE); /* XXX: right error ? */ + return; + found: + + /* generate session id if needed */ + if (h->session_id[0] == '\0') + snprintf(h->session_id, sizeof(h->session_id), "%08x%08x", + av_lfg_get(&random_state), av_lfg_get(&random_state)); + + /* find rtp session, and create it if none found */ + rtp_c = find_rtp_session(h->session_id); + if (!rtp_c) { + /* always prefer UDP */ + th = find_transport(h, RTSP_LOWER_TRANSPORT_UDP); + if (!th) { + th = find_transport(h, RTSP_LOWER_TRANSPORT_TCP); + if (!th) { + rtsp_reply_error(c, RTSP_STATUS_TRANSPORT); + return; + } + } + + rtp_c = rtp_new_connection(&c->from_addr, stream, h->session_id, + th->lower_transport); + if (!rtp_c) { + rtsp_reply_error(c, RTSP_STATUS_BANDWIDTH); + return; + } + + /* open input stream */ + if (open_input_stream(rtp_c, "") < 0) { + rtsp_reply_error(c, RTSP_STATUS_INTERNAL); + return; + } + } + + /* test if stream is OK (test needed because several SETUP needs + to be done for a given file) */ + if (rtp_c->stream != stream) { + rtsp_reply_error(c, RTSP_STATUS_SERVICE); + return; + } + + /* test if stream is already set up */ + if (rtp_c->rtp_ctx[stream_index]) { + rtsp_reply_error(c, RTSP_STATUS_STATE); + return; + } + + /* check transport */ + th = find_transport(h, rtp_c->rtp_protocol); + if (!th || (th->lower_transport == RTSP_LOWER_TRANSPORT_UDP && + th->client_port_min <= 0)) { + rtsp_reply_error(c, RTSP_STATUS_TRANSPORT); + return; + } + + /* setup default options */ + setup.transport_option[0] = '\0'; + dest_addr = rtp_c->from_addr; + dest_addr.sin_port = htons(th->client_port_min); + + /* setup stream */ + if (rtp_new_av_stream(rtp_c, stream_index, &dest_addr, c) < 0) { + rtsp_reply_error(c, RTSP_STATUS_TRANSPORT); + return; + } + + /* now everything is OK, so we can send the connection parameters */ + rtsp_reply_header(c, RTSP_STATUS_OK); + /* session ID */ + avio_printf(c->pb, "Session: %s\r\n", rtp_c->session_id); + + switch(rtp_c->rtp_protocol) { + case RTSP_LOWER_TRANSPORT_UDP: + rtp_port = ff_rtp_get_local_rtp_port(rtp_c->rtp_handles[stream_index]); + rtcp_port = ff_rtp_get_local_rtcp_port(rtp_c->rtp_handles[stream_index]); + avio_printf(c->pb, "Transport: RTP/AVP/UDP;unicast;" + "client_port=%d-%d;server_port=%d-%d", + th->client_port_min, th->client_port_max, + rtp_port, rtcp_port); + break; + case RTSP_LOWER_TRANSPORT_TCP: + avio_printf(c->pb, "Transport: RTP/AVP/TCP;interleaved=%d-%d", + stream_index * 2, stream_index * 2 + 1); + break; + default: + break; + } + if (setup.transport_option[0] != '\0') + avio_printf(c->pb, ";%s", setup.transport_option); + avio_printf(c->pb, "\r\n"); + + + avio_printf(c->pb, "\r\n"); +} + + +/* find an rtp connection by using the session ID. Check consistency + with filename */ +static HTTPContext *find_rtp_session_with_url(const char *url, + const char *session_id) +{ + HTTPContext *rtp_c; + char path1[1024]; + const char *path; + char buf[1024]; + int s, len; + + rtp_c = find_rtp_session(session_id); + if (!rtp_c) + return NULL; + + /* find which url is asked */ + av_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); + path = path1; + if (*path == '/') + path++; + if(!strcmp(path, rtp_c->stream->filename)) return rtp_c; + for(s=0; sstream->nb_streams; ++s) { + snprintf(buf, sizeof(buf), "%s/streamid=%d", + rtp_c->stream->filename, s); + if(!strncmp(path, buf, sizeof(buf))) { + // XXX: Should we reply with RTSP_STATUS_ONLY_AGGREGATE if nb_streams>1? + return rtp_c; + } + } + len = strlen(path); + if (len > 0 && path[len - 1] == '/' && + !strncmp(path, rtp_c->stream->filename, len - 1)) + return rtp_c; + return NULL; +} + +static void rtsp_cmd_play(HTTPContext *c, const char *url, RTSPMessageHeader *h) +{ + HTTPContext *rtp_c; + + rtp_c = find_rtp_session_with_url(url, h->session_id); + if (!rtp_c) { + rtsp_reply_error(c, RTSP_STATUS_SESSION); + return; + } + + if (rtp_c->state != HTTPSTATE_SEND_DATA && + rtp_c->state != HTTPSTATE_WAIT_FEED && + rtp_c->state != HTTPSTATE_READY) { + rtsp_reply_error(c, RTSP_STATUS_STATE); + return; + } + + rtp_c->state = HTTPSTATE_SEND_DATA; + + /* now everything is OK, so we can send the connection parameters */ + rtsp_reply_header(c, RTSP_STATUS_OK); + /* session ID */ + avio_printf(c->pb, "Session: %s\r\n", rtp_c->session_id); + avio_printf(c->pb, "\r\n"); +} + +static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPMessageHeader *h) +{ + HTTPContext *rtp_c; + + rtp_c = find_rtp_session_with_url(url, h->session_id); + if (!rtp_c) { + rtsp_reply_error(c, RTSP_STATUS_SESSION); + return; + } + + if (rtp_c->state != HTTPSTATE_SEND_DATA && + rtp_c->state != HTTPSTATE_WAIT_FEED) { + rtsp_reply_error(c, RTSP_STATUS_STATE); + return; + } + + rtp_c->state = HTTPSTATE_READY; + rtp_c->first_pts = AV_NOPTS_VALUE; + /* now everything is OK, so we can send the connection parameters */ + rtsp_reply_header(c, RTSP_STATUS_OK); + /* session ID */ + avio_printf(c->pb, "Session: %s\r\n", rtp_c->session_id); + avio_printf(c->pb, "\r\n"); +} + +static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPMessageHeader *h) +{ + HTTPContext *rtp_c; + + rtp_c = find_rtp_session_with_url(url, h->session_id); + if (!rtp_c) { + rtsp_reply_error(c, RTSP_STATUS_SESSION); + return; + } + + /* now everything is OK, so we can send the connection parameters */ + rtsp_reply_header(c, RTSP_STATUS_OK); + /* session ID */ + avio_printf(c->pb, "Session: %s\r\n", rtp_c->session_id); + avio_printf(c->pb, "\r\n"); + + /* abort the session */ + close_connection(rtp_c); +} + + +/********************************************************************/ +/* RTP handling */ + +static HTTPContext *rtp_new_connection(struct sockaddr_in *from_addr, + FFStream *stream, const char *session_id, + enum RTSPLowerTransport rtp_protocol) +{ + HTTPContext *c = NULL; + const char *proto_str; + + /* XXX: should output a warning page when coming + close to the connection limit */ + if (nb_connections >= nb_max_connections) + goto fail; + + /* add a new connection */ + c = av_mallocz(sizeof(HTTPContext)); + if (!c) + goto fail; + + c->fd = -1; + c->poll_entry = NULL; + c->from_addr = *from_addr; + c->buffer_size = IOBUFFER_INIT_SIZE; + c->buffer = av_malloc(c->buffer_size); + if (!c->buffer) + goto fail; + nb_connections++; + c->stream = stream; + av_strlcpy(c->session_id, session_id, sizeof(c->session_id)); + c->state = HTTPSTATE_READY; + c->is_packetized = 1; + c->rtp_protocol = rtp_protocol; + + /* protocol is shown in statistics */ + switch(c->rtp_protocol) { + case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: + proto_str = "MCAST"; + break; + case RTSP_LOWER_TRANSPORT_UDP: + proto_str = "UDP"; + break; + case RTSP_LOWER_TRANSPORT_TCP: + proto_str = "TCP"; + break; + default: + proto_str = "???"; + break; + } + av_strlcpy(c->protocol, "RTP/", sizeof(c->protocol)); + av_strlcat(c->protocol, proto_str, sizeof(c->protocol)); + + current_bandwidth += stream->bandwidth; + + c->next = first_http_ctx; + first_http_ctx = c; + return c; + + fail: + if (c) { + av_free(c->buffer); + av_free(c); + } + return NULL; +} + +/* add a new RTP stream in an RTP connection (used in RTSP SETUP + command). If RTP/TCP protocol is used, TCP connection 'rtsp_c' is + used. */ +static int rtp_new_av_stream(HTTPContext *c, + int stream_index, struct sockaddr_in *dest_addr, + HTTPContext *rtsp_c) +{ + AVFormatContext *ctx; + AVStream *st; + char *ipaddr; + URLContext *h = NULL; + uint8_t *dummy_buf; + int max_packet_size; + + /* now we can open the relevant output stream */ + ctx = avformat_alloc_context(); + if (!ctx) + return -1; + ctx->oformat = av_guess_format("rtp", NULL, NULL); + + st = av_mallocz(sizeof(AVStream)); + if (!st) + goto fail; + ctx->nb_streams = 1; + ctx->streams = av_mallocz(sizeof(AVStream *) * ctx->nb_streams); + if (!ctx->streams) + goto fail; + ctx->streams[0] = st; + + if (!c->stream->feed || + c->stream->feed == c->stream) + memcpy(st, c->stream->streams[stream_index], sizeof(AVStream)); + else + memcpy(st, + c->stream->feed->streams[c->stream->feed_streams[stream_index]], + sizeof(AVStream)); + st->priv_data = NULL; + + /* build destination RTP address */ + ipaddr = inet_ntoa(dest_addr->sin_addr); + + switch(c->rtp_protocol) { + case RTSP_LOWER_TRANSPORT_UDP: + case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: + /* RTP/UDP case */ + + /* XXX: also pass as parameter to function ? */ + if (c->stream->is_multicast) { + int ttl; + ttl = c->stream->multicast_ttl; + if (!ttl) + ttl = 16; + snprintf(ctx->filename, sizeof(ctx->filename), + "rtp://%s:%d?multicast=1&ttl=%d", + ipaddr, ntohs(dest_addr->sin_port), ttl); + } else { + snprintf(ctx->filename, sizeof(ctx->filename), + "rtp://%s:%d", ipaddr, ntohs(dest_addr->sin_port)); + } + + if (url_open(&h, ctx->filename, AVIO_FLAG_WRITE) < 0) + goto fail; + c->rtp_handles[stream_index] = h; + max_packet_size = url_get_max_packet_size(h); + break; + case RTSP_LOWER_TRANSPORT_TCP: + /* RTP/TCP case */ + c->rtsp_c = rtsp_c; + max_packet_size = RTSP_TCP_MAX_PACKET_SIZE; + break; + default: + goto fail; + } + + http_log("%s:%d - - \"PLAY %s/streamid=%d %s\"\n", + ipaddr, ntohs(dest_addr->sin_port), + c->stream->filename, stream_index, c->protocol); + + /* normally, no packets should be output here, but the packet size may be checked */ + if (ffio_open_dyn_packet_buf(&ctx->pb, max_packet_size) < 0) { + /* XXX: close stream */ + goto fail; + } + if (avformat_write_header(ctx, NULL) < 0) { + fail: + if (h) + url_close(h); + av_free(ctx); + return -1; + } + avio_close_dyn_buf(ctx->pb, &dummy_buf); + av_free(dummy_buf); + + c->rtp_ctx[stream_index] = ctx; + return 0; +} + +/********************************************************************/ +/* avserver initialization */ + +static AVStream *add_av_stream1(FFStream *stream, AVCodecContext *codec, int copy) +{ + AVStream *fst; + + fst = av_mallocz(sizeof(AVStream)); + if (!fst) + return NULL; + if (copy) { + fst->codec = avcodec_alloc_context3(NULL); + memcpy(fst->codec, codec, sizeof(AVCodecContext)); + if (codec->extradata_size) { + fst->codec->extradata = av_malloc(codec->extradata_size); + memcpy(fst->codec->extradata, codec->extradata, + codec->extradata_size); + } + } else { + /* live streams must use the actual feed's codec since it may be + * updated later to carry extradata needed by the streams. + */ + fst->codec = codec; + } + fst->priv_data = av_mallocz(sizeof(FeedData)); + fst->index = stream->nb_streams; + av_set_pts_info(fst, 33, 1, 90000); + fst->sample_aspect_ratio = codec->sample_aspect_ratio; + stream->streams[stream->nb_streams++] = fst; + return fst; +} + +/* return the stream number in the feed */ +static int add_av_stream(FFStream *feed, AVStream *st) +{ + AVStream *fst; + AVCodecContext *av, *av1; + int i; + + av = st->codec; + for(i=0;inb_streams;i++) { + st = feed->streams[i]; + av1 = st->codec; + if (av1->codec_id == av->codec_id && + av1->codec_type == av->codec_type && + av1->bit_rate == av->bit_rate) { + + switch(av->codec_type) { + case AVMEDIA_TYPE_AUDIO: + if (av1->channels == av->channels && + av1->sample_rate == av->sample_rate) + return i; + break; + case AVMEDIA_TYPE_VIDEO: + if (av1->width == av->width && + av1->height == av->height && + av1->time_base.den == av->time_base.den && + av1->time_base.num == av->time_base.num && + av1->gop_size == av->gop_size) + return i; + break; + default: + abort(); + } + } + } + + fst = add_av_stream1(feed, av, 0); + if (!fst) + return -1; + return feed->nb_streams - 1; +} + +static void remove_stream(FFStream *stream) +{ + FFStream **ps; + ps = &first_stream; + while (*ps != NULL) { + if (*ps == stream) + *ps = (*ps)->next; + else + ps = &(*ps)->next; + } +} + +/* specific mpeg4 handling : we extract the raw parameters */ +static void extract_mpeg4_header(AVFormatContext *infile) +{ + int mpeg4_count, i, size; + AVPacket pkt; + AVStream *st; + const uint8_t *p; + + mpeg4_count = 0; + for(i=0;inb_streams;i++) { + st = infile->streams[i]; + if (st->codec->codec_id == CODEC_ID_MPEG4 && + st->codec->extradata_size == 0) { + mpeg4_count++; + } + } + if (!mpeg4_count) + return; + + printf("MPEG4 without extra data: trying to find header in %s\n", infile->filename); + while (mpeg4_count > 0) { + if (av_read_packet(infile, &pkt) < 0) + break; + st = infile->streams[pkt.stream_index]; + if (st->codec->codec_id == CODEC_ID_MPEG4 && + st->codec->extradata_size == 0) { + av_freep(&st->codec->extradata); + /* fill extradata with the header */ + /* XXX: we make hard suppositions here ! */ + p = pkt.data; + while (p < pkt.data + pkt.size - 4) { + /* stop when vop header is found */ + if (p[0] == 0x00 && p[1] == 0x00 && + p[2] == 0x01 && p[3] == 0xb6) { + size = p - pkt.data; + // av_hex_dump_log(infile, AV_LOG_DEBUG, pkt.data, size); + st->codec->extradata = av_malloc(size); + st->codec->extradata_size = size; + memcpy(st->codec->extradata, pkt.data, size); + break; + } + p++; + } + mpeg4_count--; + } + av_free_packet(&pkt); + } +} + +/* compute the needed AVStream for each file */ +static void build_file_streams(void) +{ + FFStream *stream, *stream_next; + int i, ret; + + /* gather all streams */ + for(stream = first_stream; stream != NULL; stream = stream_next) { + AVFormatContext *infile = NULL; + stream_next = stream->next; + if (stream->stream_type == STREAM_TYPE_LIVE && + !stream->feed) { + /* the stream comes from a file */ + /* try to open the file */ + /* open stream */ + if (stream->fmt && !strcmp(stream->fmt->name, "rtp")) { + /* specific case : if transport stream output to RTP, + we use a raw transport stream reader */ + av_dict_set(&stream->in_opts, "mpeg2ts_compute_pcr", "1", 0); + } + + http_log("Opening file '%s'\n", stream->feed_filename); + if ((ret = avformat_open_input(&infile, stream->feed_filename, stream->ifmt, &stream->in_opts)) < 0) { + http_log("Could not open '%s': %d\n", stream->feed_filename, ret); + /* remove stream (no need to spend more time on it) */ + fail: + remove_stream(stream); + } else { + /* find all the AVStreams inside and reference them in + 'stream' */ + if (avformat_find_stream_info(infile, NULL) < 0) { + http_log("Could not find codec parameters from '%s'\n", + stream->feed_filename); + avformat_close_input(&infile); + goto fail; + } + extract_mpeg4_header(infile); + + for(i=0;inb_streams;i++) + add_av_stream1(stream, infile->streams[i]->codec, 1); + + avformat_close_input(&infile); + } + } + } +} + +/* compute the needed AVStream for each feed */ +static void build_feed_streams(void) +{ + FFStream *stream, *feed; + int i; + + /* gather all streams */ + for(stream = first_stream; stream != NULL; stream = stream->next) { + feed = stream->feed; + if (feed) { + if (stream->is_feed) { + for(i=0;inb_streams;i++) + stream->feed_streams[i] = i; + } else { + /* we handle a stream coming from a feed */ + for(i=0;inb_streams;i++) + stream->feed_streams[i] = add_av_stream(feed, stream->streams[i]); + } + } + } + + /* create feed files if needed */ + for(feed = first_feed; feed != NULL; feed = feed->next_feed) { + int fd; + + if (avio_check(feed->feed_filename, AVIO_FLAG_READ) > 0) { + /* See if it matches */ + AVFormatContext *s = NULL; + int matches = 0; + + if (avformat_open_input(&s, feed->feed_filename, NULL, NULL) >= 0) { + /* Now see if it matches */ + if (s->nb_streams == feed->nb_streams) { + matches = 1; + for(i=0;inb_streams;i++) { + AVStream *sf, *ss; + sf = feed->streams[i]; + ss = s->streams[i]; + + if (sf->index != ss->index || + sf->id != ss->id) { + http_log("Index & Id do not match for stream %d (%s)\n", + i, feed->feed_filename); + matches = 0; + } else { + AVCodecContext *ccf, *ccs; + + ccf = sf->codec; + ccs = ss->codec; +#define CHECK_CODEC(x) (ccf->x != ccs->x) + + if (CHECK_CODEC(codec_id) || CHECK_CODEC(codec_type)) { + http_log("Codecs do not match for stream %d\n", i); + matches = 0; + } else if (CHECK_CODEC(bit_rate) || CHECK_CODEC(flags)) { + http_log("Codec bitrates do not match for stream %d\n", i); + matches = 0; + } else if (ccf->codec_type == AVMEDIA_TYPE_VIDEO) { + if (CHECK_CODEC(time_base.den) || + CHECK_CODEC(time_base.num) || + CHECK_CODEC(width) || + CHECK_CODEC(height)) { + http_log("Codec width, height and framerate do not match for stream %d\n", i); + matches = 0; + } + } else if (ccf->codec_type == AVMEDIA_TYPE_AUDIO) { + if (CHECK_CODEC(sample_rate) || + CHECK_CODEC(channels) || + CHECK_CODEC(frame_size)) { + http_log("Codec sample_rate, channels, frame_size do not match for stream %d\n", i); + matches = 0; + } + } else { + http_log("Unknown codec type\n"); + matches = 0; + } + } + if (!matches) + break; + } + } else + http_log("Deleting feed file '%s' as stream counts differ (%d != %d)\n", + feed->feed_filename, s->nb_streams, feed->nb_streams); + + avformat_close_input(&s); + } else + http_log("Deleting feed file '%s' as it appears to be corrupt\n", + feed->feed_filename); + + if (!matches) { + if (feed->readonly) { + http_log("Unable to delete feed file '%s' as it is marked readonly\n", + feed->feed_filename); + exit(1); + } + unlink(feed->feed_filename); + } + } + if (avio_check(feed->feed_filename, AVIO_FLAG_WRITE) <= 0) { + AVFormatContext s1 = {0}, *s = &s1; + + if (feed->readonly) { + http_log("Unable to create feed file '%s' as it is marked readonly\n", + feed->feed_filename); + exit(1); + } + + /* only write the header of the ffm file */ + if (avio_open(&s->pb, feed->feed_filename, AVIO_FLAG_WRITE) < 0) { + http_log("Could not open output feed file '%s'\n", + feed->feed_filename); + exit(1); + } + s->oformat = feed->fmt; + s->nb_streams = feed->nb_streams; + s->streams = feed->streams; + if (avformat_write_header(s, NULL) < 0) { + http_log("Container doesn't supports the required parameters\n"); + exit(1); + } + /* XXX: need better api */ + av_freep(&s->priv_data); + avio_close(s->pb); + } + /* get feed size and write index */ + fd = open(feed->feed_filename, O_RDONLY); + if (fd < 0) { + http_log("Could not open output feed file '%s'\n", + feed->feed_filename); + exit(1); + } + + feed->feed_write_index = FFMAX(ffm_read_write_index(fd), FFM_PACKET_SIZE); + feed->feed_size = lseek(fd, 0, SEEK_END); + /* ensure that we do not wrap before the end of file */ + if (feed->feed_max_size && feed->feed_max_size < feed->feed_size) + feed->feed_max_size = feed->feed_size; + + close(fd); + } +} + +/* compute the bandwidth used by each stream */ +static void compute_bandwidth(void) +{ + unsigned bandwidth; + int i; + FFStream *stream; + + for(stream = first_stream; stream != NULL; stream = stream->next) { + bandwidth = 0; + for(i=0;inb_streams;i++) { + AVStream *st = stream->streams[i]; + switch(st->codec->codec_type) { + case AVMEDIA_TYPE_AUDIO: + case AVMEDIA_TYPE_VIDEO: + bandwidth += st->codec->bit_rate; + break; + default: + break; + } + } + stream->bandwidth = (bandwidth + 999) / 1000; + } +} + +/* add a codec and set the default parameters */ +static void add_codec(FFStream *stream, AVCodecContext *av) +{ + AVStream *st; + + /* compute default parameters */ + switch(av->codec_type) { + case AVMEDIA_TYPE_AUDIO: + if (av->bit_rate == 0) + av->bit_rate = 64000; + if (av->sample_rate == 0) + av->sample_rate = 22050; + if (av->channels == 0) + av->channels = 1; + break; + case AVMEDIA_TYPE_VIDEO: + if (av->bit_rate == 0) + av->bit_rate = 64000; + if (av->time_base.num == 0){ + av->time_base.den = 5; + av->time_base.num = 1; + } + if (av->width == 0 || av->height == 0) { + av->width = 160; + av->height = 128; + } + /* Bitrate tolerance is less for streaming */ + if (av->bit_rate_tolerance == 0) + av->bit_rate_tolerance = FFMAX(av->bit_rate / 4, + (int64_t)av->bit_rate*av->time_base.num/av->time_base.den); + if (av->qmin == 0) + av->qmin = 3; + if (av->qmax == 0) + av->qmax = 31; + if (av->max_qdiff == 0) + av->max_qdiff = 3; + av->qcompress = 0.5; + av->qblur = 0.5; + + if (!av->nsse_weight) + av->nsse_weight = 8; + + av->frame_skip_cmp = FF_CMP_DCTMAX; + if (!av->me_method) + av->me_method = ME_EPZS; + av->rc_buffer_aggressivity = 1.0; + + if (!av->rc_eq) + av->rc_eq = "tex^qComp"; + if (!av->i_quant_factor) + av->i_quant_factor = -0.8; + if (!av->b_quant_factor) + av->b_quant_factor = 1.25; + if (!av->b_quant_offset) + av->b_quant_offset = 1.25; + if (!av->rc_max_rate) + av->rc_max_rate = av->bit_rate * 2; + + if (av->rc_max_rate && !av->rc_buffer_size) { + av->rc_buffer_size = av->rc_max_rate; + } + + + break; + default: + abort(); + } + + st = av_mallocz(sizeof(AVStream)); + if (!st) + return; + st->codec = avcodec_alloc_context3(NULL); + stream->streams[stream->nb_streams++] = st; + memcpy(st->codec, av, sizeof(AVCodecContext)); +} + +static enum CodecID opt_audio_codec(const char *arg) +{ + AVCodec *p= avcodec_find_encoder_by_name(arg); + + if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO) + return CODEC_ID_NONE; + + return p->id; +} + +static enum CodecID opt_video_codec(const char *arg) +{ + AVCodec *p= avcodec_find_encoder_by_name(arg); + + if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO) + return CODEC_ID_NONE; + + return p->id; +} + +/* simplistic plugin support */ + +#if HAVE_DLOPEN +static void load_module(const char *filename) +{ + void *dll; + void (*init_func)(void); + dll = dlopen(filename, RTLD_NOW); + if (!dll) { + fprintf(stderr, "Could not load module '%s' - %s\n", + filename, dlerror()); + return; + } + + init_func = dlsym(dll, "avserver_module_init"); + if (!init_func) { + fprintf(stderr, + "%s: init function 'avserver_module_init()' not found\n", + filename); + dlclose(dll); + } + + init_func(); +} +#endif + +static int avserver_opt_default(const char *opt, const char *arg, + AVCodecContext *avctx, int type) +{ + int ret = 0; + const AVOption *o = av_opt_find(avctx, opt, NULL, type, 0); + if(o) + ret = av_opt_set(avctx, opt, arg, 0); + return ret; +} + +static int avserver_opt_preset(const char *arg, + AVCodecContext *avctx, int type, + enum CodecID *audio_id, enum CodecID *video_id) +{ + FILE *f=NULL; + char filename[1000], tmp[1000], tmp2[1000], line[1000]; + int ret = 0; + AVCodec *codec = avcodec_find_encoder(avctx->codec_id); + + if (!(f = get_preset_file(filename, sizeof(filename), arg, 0, + codec ? codec->name : NULL))) { + fprintf(stderr, "File for preset '%s' not found\n", arg); + return 1; + } + + while(!feof(f)){ + int e= fscanf(f, "%999[^\n]\n", line) - 1; + if(line[0] == '#' && !e) + continue; + e|= sscanf(line, "%999[^=]=%999[^\n]\n", tmp, tmp2) - 2; + if(e){ + fprintf(stderr, "%s: Invalid syntax: '%s'\n", filename, line); + ret = 1; + break; + } + if(!strcmp(tmp, "acodec")){ + *audio_id = opt_audio_codec(tmp2); + }else if(!strcmp(tmp, "vcodec")){ + *video_id = opt_video_codec(tmp2); + }else if(!strcmp(tmp, "scodec")){ + /* opt_subtitle_codec(tmp2); */ + }else if(avserver_opt_default(tmp, tmp2, avctx, type) < 0){ + fprintf(stderr, "%s: Invalid option or argument: '%s', parsed as '%s' = '%s'\n", filename, line, tmp, tmp2); + ret = 1; + break; + } + } + + fclose(f); + + return ret; +} + +static AVOutputFormat *avserver_guess_format(const char *short_name, const char *filename, + const char *mime_type) +{ + AVOutputFormat *fmt = av_guess_format(short_name, filename, mime_type); + + if (fmt) { + AVOutputFormat *stream_fmt; + char stream_format_name[64]; + + snprintf(stream_format_name, sizeof(stream_format_name), "%s_stream", fmt->name); + stream_fmt = av_guess_format(stream_format_name, NULL, NULL); + + if (stream_fmt) + fmt = stream_fmt; + } + + return fmt; +} + +static void report_config_error(const char *filename, int line_num, int *errors, const char *fmt, ...) +{ + va_list vl; + va_start(vl, fmt); + fprintf(stderr, "%s:%d: ", filename, line_num); + vfprintf(stderr, fmt, vl); + va_end(vl); + + (*errors)++; +} + +static int parse_ffconfig(const char *filename) +{ + FILE *f; + char line[1024]; + char cmd[64]; + char arg[1024]; + const char *p; + int val, errors, line_num; + FFStream **last_stream, *stream, *redirect; + FFStream **last_feed, *feed, *s; + AVCodecContext audio_enc, video_enc; + enum CodecID audio_id, video_id; + + f = fopen(filename, "r"); + if (!f) { + perror(filename); + return -1; + } + + errors = 0; + line_num = 0; + first_stream = NULL; + last_stream = &first_stream; + first_feed = NULL; + last_feed = &first_feed; + stream = NULL; + feed = NULL; + redirect = NULL; + audio_id = CODEC_ID_NONE; + video_id = CODEC_ID_NONE; + +#define ERROR(...) report_config_error(filename, line_num, &errors, __VA_ARGS__) + for(;;) { + if (fgets(line, sizeof(line), f) == NULL) + break; + line_num++; + p = line; + while (isspace(*p)) + p++; + if (*p == '\0' || *p == '#') + continue; + + get_arg(cmd, sizeof(cmd), &p); + + if (!av_strcasecmp(cmd, "Port")) { + get_arg(arg, sizeof(arg), &p); + val = atoi(arg); + if (val < 1 || val > 65536) { + ERROR("Invalid_port: %s\n", arg); + } + my_http_addr.sin_port = htons(val); + } else if (!av_strcasecmp(cmd, "BindAddress")) { + get_arg(arg, sizeof(arg), &p); + if (resolve_host(&my_http_addr.sin_addr, arg) != 0) { + ERROR("%s:%d: Invalid host/IP address: %s\n", arg); + } + } else if (!av_strcasecmp(cmd, "NoDaemon")) { + avserver_daemon = 0; + } else if (!av_strcasecmp(cmd, "RTSPPort")) { + get_arg(arg, sizeof(arg), &p); + val = atoi(arg); + if (val < 1 || val > 65536) { + ERROR("%s:%d: Invalid port: %s\n", arg); + } + my_rtsp_addr.sin_port = htons(atoi(arg)); + } else if (!av_strcasecmp(cmd, "RTSPBindAddress")) { + get_arg(arg, sizeof(arg), &p); + if (resolve_host(&my_rtsp_addr.sin_addr, arg) != 0) { + ERROR("Invalid host/IP address: %s\n", arg); + } + } else if (!av_strcasecmp(cmd, "MaxHTTPConnections")) { + get_arg(arg, sizeof(arg), &p); + val = atoi(arg); + if (val < 1 || val > 65536) { + ERROR("Invalid MaxHTTPConnections: %s\n", arg); + } + nb_max_http_connections = val; + } else if (!av_strcasecmp(cmd, "MaxClients")) { + get_arg(arg, sizeof(arg), &p); + val = atoi(arg); + if (val < 1 || val > nb_max_http_connections) { + ERROR("Invalid MaxClients: %s\n", arg); + } else { + nb_max_connections = val; + } + } else if (!av_strcasecmp(cmd, "MaxBandwidth")) { + int64_t llval; + get_arg(arg, sizeof(arg), &p); + llval = atoll(arg); + if (llval < 10 || llval > 10000000) { + ERROR("Invalid MaxBandwidth: %s\n", arg); + } else + max_bandwidth = llval; + } else if (!av_strcasecmp(cmd, "CustomLog")) { + if (!avserver_debug) + get_arg(logfilename, sizeof(logfilename), &p); + } else if (!av_strcasecmp(cmd, "filename, sizeof(feed->filename), &p); + q = strrchr(feed->filename, '>'); + if (*q) + *q = '\0'; + + for (s = first_feed; s; s = s->next) { + if (!strcmp(feed->filename, s->filename)) { + ERROR("Feed '%s' already registered\n", s->filename); + } + } + + feed->fmt = av_guess_format("ffm", NULL, NULL); + /* defaut feed file */ + snprintf(feed->feed_filename, sizeof(feed->feed_filename), + "/tmp/%s.ffm", feed->filename); + feed->feed_max_size = 5 * 1024 * 1024; + feed->is_feed = 1; + feed->feed = feed; /* self feeding :-) */ + + /* add in stream list */ + *last_stream = feed; + last_stream = &feed->next; + /* add in feed list */ + *last_feed = feed; + last_feed = &feed->next_feed; + } + } else if (!av_strcasecmp(cmd, "Launch")) { + if (feed) { + int i; + + feed->child_argv = av_mallocz(64 * sizeof(char *)); + + for (i = 0; i < 62; i++) { + get_arg(arg, sizeof(arg), &p); + if (!arg[0]) + break; + + feed->child_argv[i] = av_strdup(arg); + } + + feed->child_argv[i] = av_malloc(30 + strlen(feed->filename)); + + snprintf(feed->child_argv[i], 30+strlen(feed->filename), + "http://%s:%d/%s", + (my_http_addr.sin_addr.s_addr == INADDR_ANY) ? "127.0.0.1" : + inet_ntoa(my_http_addr.sin_addr), + ntohs(my_http_addr.sin_port), feed->filename); + } + } else if (!av_strcasecmp(cmd, "ReadOnlyFile")) { + if (feed) { + get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p); + feed->readonly = 1; + } else if (stream) { + get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p); + } + } else if (!av_strcasecmp(cmd, "File")) { + if (feed) { + get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p); + } else if (stream) + get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p); + } else if (!av_strcasecmp(cmd, "Truncate")) { + if (feed) { + get_arg(arg, sizeof(arg), &p); + feed->truncate = strtod(arg, NULL); + } + } else if (!av_strcasecmp(cmd, "FileMaxSize")) { + if (feed) { + char *p1; + double fsize; + + get_arg(arg, sizeof(arg), &p); + p1 = arg; + fsize = strtod(p1, &p1); + switch(toupper(*p1)) { + case 'K': + fsize *= 1024; + break; + case 'M': + fsize *= 1024 * 1024; + break; + case 'G': + fsize *= 1024 * 1024 * 1024; + break; + } + feed->feed_max_size = (int64_t)fsize; + if (feed->feed_max_size < FFM_PACKET_SIZE*4) { + ERROR("Feed max file size is too small, must be at least %d\n", FFM_PACKET_SIZE*4); + } + } + } else if (!av_strcasecmp(cmd, "
")) { + if (!feed) { + ERROR("No corresponding for \n"); + } + feed = NULL; + } else if (!av_strcasecmp(cmd, "filename, sizeof(stream->filename), &p); + q = strrchr(stream->filename, '>'); + if (*q) + *q = '\0'; + + for (s = first_stream; s; s = s->next) { + if (!strcmp(stream->filename, s->filename)) { + ERROR("Stream '%s' already registered\n", s->filename); + } + } + + stream->fmt = avserver_guess_format(NULL, stream->filename, NULL); + avcodec_get_context_defaults3(&video_enc, NULL); + avcodec_get_context_defaults3(&audio_enc, NULL); + audio_id = CODEC_ID_NONE; + video_id = CODEC_ID_NONE; + if (stream->fmt) { + audio_id = stream->fmt->audio_codec; + video_id = stream->fmt->video_codec; + } + + *last_stream = stream; + last_stream = &stream->next; + } + } else if (!av_strcasecmp(cmd, "Feed")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + FFStream *sfeed; + + sfeed = first_feed; + while (sfeed != NULL) { + if (!strcmp(sfeed->filename, arg)) + break; + sfeed = sfeed->next_feed; + } + if (!sfeed) + ERROR("feed '%s' not defined\n", arg); + else + stream->feed = sfeed; + } + } else if (!av_strcasecmp(cmd, "Format")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + if (!strcmp(arg, "status")) { + stream->stream_type = STREAM_TYPE_STATUS; + stream->fmt = NULL; + } else { + stream->stream_type = STREAM_TYPE_LIVE; + /* jpeg cannot be used here, so use single frame jpeg */ + if (!strcmp(arg, "jpeg")) + strcpy(arg, "mjpeg"); + stream->fmt = avserver_guess_format(arg, NULL, NULL); + if (!stream->fmt) { + ERROR("Unknown Format: %s\n", arg); + } + } + if (stream->fmt) { + audio_id = stream->fmt->audio_codec; + video_id = stream->fmt->video_codec; + } + } + } else if (!av_strcasecmp(cmd, "InputFormat")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + stream->ifmt = av_find_input_format(arg); + if (!stream->ifmt) { + ERROR("Unknown input format: %s\n", arg); + } + } + } else if (!av_strcasecmp(cmd, "FaviconURL")) { + if (stream && stream->stream_type == STREAM_TYPE_STATUS) { + get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p); + } else { + ERROR("FaviconURL only permitted for status streams\n"); + } + } else if (!av_strcasecmp(cmd, "Author")) { + if (stream) + get_arg(stream->author, sizeof(stream->author), &p); + } else if (!av_strcasecmp(cmd, "Comment")) { + if (stream) + get_arg(stream->comment, sizeof(stream->comment), &p); + } else if (!av_strcasecmp(cmd, "Copyright")) { + if (stream) + get_arg(stream->copyright, sizeof(stream->copyright), &p); + } else if (!av_strcasecmp(cmd, "Title")) { + if (stream) + get_arg(stream->title, sizeof(stream->title), &p); + } else if (!av_strcasecmp(cmd, "Preroll")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + stream->prebuffer = atof(arg) * 1000; + } else if (!av_strcasecmp(cmd, "StartSendOnKey")) { + if (stream) + stream->send_on_key = 1; + } else if (!av_strcasecmp(cmd, "AudioCodec")) { + get_arg(arg, sizeof(arg), &p); + audio_id = opt_audio_codec(arg); + if (audio_id == CODEC_ID_NONE) { + ERROR("Unknown AudioCodec: %s\n", arg); + } + } else if (!av_strcasecmp(cmd, "VideoCodec")) { + get_arg(arg, sizeof(arg), &p); + video_id = opt_video_codec(arg); + if (video_id == CODEC_ID_NONE) { + ERROR("Unknown VideoCodec: %s\n", arg); + } + } else if (!av_strcasecmp(cmd, "MaxTime")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + stream->max_time = atof(arg) * 1000; + } else if (!av_strcasecmp(cmd, "AudioBitRate")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + audio_enc.bit_rate = lrintf(atof(arg) * 1000); + } else if (!av_strcasecmp(cmd, "AudioChannels")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + audio_enc.channels = atoi(arg); + } else if (!av_strcasecmp(cmd, "AudioSampleRate")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + audio_enc.sample_rate = atoi(arg); + } else if (!av_strcasecmp(cmd, "AudioQuality")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { +// audio_enc.quality = atof(arg) * 1000; + } + } else if (!av_strcasecmp(cmd, "VideoBitRateRange")) { + if (stream) { + int minrate, maxrate; + + get_arg(arg, sizeof(arg), &p); + + if (sscanf(arg, "%d-%d", &minrate, &maxrate) == 2) { + video_enc.rc_min_rate = minrate * 1000; + video_enc.rc_max_rate = maxrate * 1000; + } else { + ERROR("Incorrect format for VideoBitRateRange -- should be -: %s\n", arg); + } + } + } else if (!av_strcasecmp(cmd, "Debug")) { + if (stream) { + get_arg(arg, sizeof(arg), &p); + video_enc.debug = strtol(arg,0,0); + } + } else if (!av_strcasecmp(cmd, "Strict")) { + if (stream) { + get_arg(arg, sizeof(arg), &p); + video_enc.strict_std_compliance = atoi(arg); + } + } else if (!av_strcasecmp(cmd, "VideoBufferSize")) { + if (stream) { + get_arg(arg, sizeof(arg), &p); + video_enc.rc_buffer_size = atoi(arg) * 8*1024; + } + } else if (!av_strcasecmp(cmd, "VideoBitRateTolerance")) { + if (stream) { + get_arg(arg, sizeof(arg), &p); + video_enc.bit_rate_tolerance = atoi(arg) * 1000; + } + } else if (!av_strcasecmp(cmd, "VideoBitRate")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + video_enc.bit_rate = atoi(arg) * 1000; + } + } else if (!av_strcasecmp(cmd, "VideoSize")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + av_parse_video_size(&video_enc.width, &video_enc.height, arg); + if ((video_enc.width % 16) != 0 || + (video_enc.height % 16) != 0) { + ERROR("Image size must be a multiple of 16\n"); + } + } + } else if (!av_strcasecmp(cmd, "VideoFrameRate")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + AVRational frame_rate; + if (av_parse_video_rate(&frame_rate, arg) < 0) { + ERROR("Incorrect frame rate: %s\n", arg); + } else { + video_enc.time_base.num = frame_rate.den; + video_enc.time_base.den = frame_rate.num; + } + } + } else if (!av_strcasecmp(cmd, "VideoGopSize")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + video_enc.gop_size = atoi(arg); + } else if (!av_strcasecmp(cmd, "VideoIntraOnly")) { + if (stream) + video_enc.gop_size = 1; + } else if (!av_strcasecmp(cmd, "VideoHighQuality")) { + if (stream) + video_enc.mb_decision = FF_MB_DECISION_BITS; + } else if (!av_strcasecmp(cmd, "Video4MotionVector")) { + if (stream) { + video_enc.mb_decision = FF_MB_DECISION_BITS; //FIXME remove + video_enc.flags |= CODEC_FLAG_4MV; + } + } else if (!av_strcasecmp(cmd, "AVOptionVideo") || + !av_strcasecmp(cmd, "AVOptionAudio")) { + char arg2[1024]; + AVCodecContext *avctx; + int type; + get_arg(arg, sizeof(arg), &p); + get_arg(arg2, sizeof(arg2), &p); + if (!av_strcasecmp(cmd, "AVOptionVideo")) { + avctx = &video_enc; + type = AV_OPT_FLAG_VIDEO_PARAM; + } else { + avctx = &audio_enc; + type = AV_OPT_FLAG_AUDIO_PARAM; + } + if (avserver_opt_default(arg, arg2, avctx, type|AV_OPT_FLAG_ENCODING_PARAM)) { + ERROR("AVOption error: %s %s\n", arg, arg2); + } + } else if (!av_strcasecmp(cmd, "AVPresetVideo") || + !av_strcasecmp(cmd, "AVPresetAudio")) { + AVCodecContext *avctx; + int type; + get_arg(arg, sizeof(arg), &p); + if (!av_strcasecmp(cmd, "AVPresetVideo")) { + avctx = &video_enc; + video_enc.codec_id = video_id; + type = AV_OPT_FLAG_VIDEO_PARAM; + } else { + avctx = &audio_enc; + audio_enc.codec_id = audio_id; + type = AV_OPT_FLAG_AUDIO_PARAM; + } + if (avserver_opt_preset(arg, avctx, type|AV_OPT_FLAG_ENCODING_PARAM, &audio_id, &video_id)) { + ERROR("AVPreset error: %s\n", arg); + } + } else if (!av_strcasecmp(cmd, "VideoTag")) { + get_arg(arg, sizeof(arg), &p); + if ((strlen(arg) == 4) && stream) + video_enc.codec_tag = MKTAG(arg[0], arg[1], arg[2], arg[3]); + } else if (!av_strcasecmp(cmd, "BitExact")) { + if (stream) + video_enc.flags |= CODEC_FLAG_BITEXACT; + } else if (!av_strcasecmp(cmd, "DctFastint")) { + if (stream) + video_enc.dct_algo = FF_DCT_FASTINT; + } else if (!av_strcasecmp(cmd, "IdctSimple")) { + if (stream) + video_enc.idct_algo = FF_IDCT_SIMPLE; + } else if (!av_strcasecmp(cmd, "Qscale")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + video_enc.flags |= CODEC_FLAG_QSCALE; + video_enc.global_quality = FF_QP2LAMBDA * atoi(arg); + } + } else if (!av_strcasecmp(cmd, "VideoQDiff")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + video_enc.max_qdiff = atoi(arg); + if (video_enc.max_qdiff < 1 || video_enc.max_qdiff > 31) { + ERROR("VideoQDiff out of range\n"); + } + } + } else if (!av_strcasecmp(cmd, "VideoQMax")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + video_enc.qmax = atoi(arg); + if (video_enc.qmax < 1 || video_enc.qmax > 31) { + ERROR("VideoQMax out of range\n"); + } + } + } else if (!av_strcasecmp(cmd, "VideoQMin")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + video_enc.qmin = atoi(arg); + if (video_enc.qmin < 1 || video_enc.qmin > 31) { + ERROR("VideoQMin out of range\n"); + } + } + } else if (!av_strcasecmp(cmd, "LumaElim")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + video_enc.luma_elim_threshold = atoi(arg); + } else if (!av_strcasecmp(cmd, "ChromaElim")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + video_enc.chroma_elim_threshold = atoi(arg); + } else if (!av_strcasecmp(cmd, "LumiMask")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + video_enc.lumi_masking = atof(arg); + } else if (!av_strcasecmp(cmd, "DarkMask")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + video_enc.dark_masking = atof(arg); + } else if (!av_strcasecmp(cmd, "NoVideo")) { + video_id = CODEC_ID_NONE; + } else if (!av_strcasecmp(cmd, "NoAudio")) { + audio_id = CODEC_ID_NONE; + } else if (!av_strcasecmp(cmd, "ACL")) { + parse_acl_row(stream, feed, NULL, p, filename, line_num); + } else if (!av_strcasecmp(cmd, "DynamicACL")) { + if (stream) { + get_arg(stream->dynamic_acl, sizeof(stream->dynamic_acl), &p); + } + } else if (!av_strcasecmp(cmd, "RTSPOption")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + av_freep(&stream->rtsp_option); + stream->rtsp_option = av_strdup(arg); + } + } else if (!av_strcasecmp(cmd, "MulticastAddress")) { + get_arg(arg, sizeof(arg), &p); + if (stream) { + if (resolve_host(&stream->multicast_ip, arg) != 0) { + ERROR("Invalid host/IP address: %s\n", arg); + } + stream->is_multicast = 1; + stream->loop = 1; /* default is looping */ + } + } else if (!av_strcasecmp(cmd, "MulticastPort")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + stream->multicast_port = atoi(arg); + } else if (!av_strcasecmp(cmd, "MulticastTTL")) { + get_arg(arg, sizeof(arg), &p); + if (stream) + stream->multicast_ttl = atoi(arg); + } else if (!av_strcasecmp(cmd, "NoLoop")) { + if (stream) + stream->loop = 0; + } else if (!av_strcasecmp(cmd, "
")) { + if (!stream) { + ERROR("No corresponding for \n"); + } else { + if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) { + if (audio_id != CODEC_ID_NONE) { + audio_enc.codec_type = AVMEDIA_TYPE_AUDIO; + audio_enc.codec_id = audio_id; + add_codec(stream, &audio_enc); + } + if (video_id != CODEC_ID_NONE) { + video_enc.codec_type = AVMEDIA_TYPE_VIDEO; + video_enc.codec_id = video_id; + add_codec(stream, &video_enc); + } + } + stream = NULL; + } + } else if (!av_strcasecmp(cmd, "next; + + get_arg(redirect->filename, sizeof(redirect->filename), &p); + q = strrchr(redirect->filename, '>'); + if (*q) + *q = '\0'; + redirect->stream_type = STREAM_TYPE_REDIRECT; + } + } else if (!av_strcasecmp(cmd, "URL")) { + if (redirect) + get_arg(redirect->feed_filename, sizeof(redirect->feed_filename), &p); + } else if (!av_strcasecmp(cmd, "")) { + if (!redirect) { + ERROR("No corresponding for \n"); + } else { + if (!redirect->feed_filename[0]) { + ERROR("No URL found for \n"); + } + redirect = NULL; + } + } else if (!av_strcasecmp(cmd, "LoadModule")) { + get_arg(arg, sizeof(arg), &p); +#if HAVE_DLOPEN + load_module(arg); +#else + ERROR("Module support not compiled into this version: '%s'\n", arg); +#endif + } else { + ERROR("Incorrect keyword: '%s'\n", cmd); + } + } +#undef ERROR + + fclose(f); + if (errors) + return -1; + else + return 0; +} + +static void handle_child_exit(int sig) +{ + pid_t pid; + int status; + + while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { + FFStream *feed; + + for (feed = first_feed; feed; feed = feed->next) { + if (feed->pid == pid) { + int uptime = time(0) - feed->pid_start; + + feed->pid = 0; + fprintf(stderr, "%s: Pid %d exited with status %d after %d seconds\n", feed->filename, pid, status, uptime); + + if (uptime < 30) + /* Turn off any more restarts */ + feed->child_argv = 0; + } + } + } + + need_to_start_children = 1; +} + +static void opt_debug(void) +{ + avserver_debug = 1; + avserver_daemon = 0; + logfilename[0] = '-'; +} + +static void show_help(void) +{ + printf("usage: avserver [options]\n" + "Hyper fast multi format Audio/Video streaming server\n"); + printf("\n"); + show_help_options(options, "Main options:\n", 0, 0); +} + +static const OptionDef options[] = { +#include "cmdutils_common_opts.h" + { "n", OPT_BOOL, {(void *)&no_launch }, "enable no-launch mode" }, + { "d", 0, {(void*)opt_debug}, "enable debug mode" }, + { "f", HAS_ARG | OPT_STRING, {(void*)&config_filename }, "use configfile instead of /etc/avserver.conf", "configfile" }, + { NULL }, +}; + +int main(int argc, char **argv) +{ + struct sigaction sigact; + + parse_loglevel(argc, argv, options); + av_register_all(); + avformat_network_init(); + + show_banner(); + + my_program_name = argv[0]; + my_program_dir = getcwd(0, 0); + avserver_daemon = 1; + + parse_options(NULL, argc, argv, options, NULL); + + unsetenv("http_proxy"); /* Kill the http_proxy */ + + av_lfg_init(&random_state, av_get_random_seed()); + + memset(&sigact, 0, sizeof(sigact)); + sigact.sa_handler = handle_child_exit; + sigact.sa_flags = SA_NOCLDSTOP | SA_RESTART; + sigaction(SIGCHLD, &sigact, 0); + + if (parse_ffconfig(config_filename) < 0) { + fprintf(stderr, "Incorrect config file - exiting.\n"); + exit(1); + } + + /* open log file if needed */ + if (logfilename[0] != '\0') { + if (!strcmp(logfilename, "-")) + logfile = stdout; + else + logfile = fopen(logfilename, "a"); + av_log_set_callback(http_av_log); + } + + build_file_streams(); + + build_feed_streams(); + + compute_bandwidth(); + + /* put the process in background and detach it from its TTY */ + if (avserver_daemon) { + int pid; + + pid = fork(); + if (pid < 0) { + perror("fork"); + exit(1); + } else if (pid > 0) { + /* parent : exit */ + exit(0); + } else { + /* child */ + setsid(); + close(0); + open("/dev/null", O_RDWR); + if (strcmp(logfilename, "-") != 0) { + close(1); + dup(0); + } + close(2); + dup(0); + } + } + + /* signal init */ + signal(SIGPIPE, SIG_IGN); + + if (avserver_daemon) + chdir("/"); + + if (http_server() < 0) { + http_log("Could not start server\n"); + exit(1); + } + + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/Changelog mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/Changelog --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/Changelog 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/Changelog 2012-01-11 00:34:30.000000000 +0000 @@ -2,27 +2,145 @@ releases are sorted from youngest to oldest. +version : + +- Automatic thread count based on detection number of (available) CPU cores + + +version 0.8_beta1: + +- BWF muxer +- Flash Screen Video 2 decoder +- ffplay/ffprobe/ffserver renamed to avplay/avprobe/avserver +- ffmpeg deprecated, added avconv, which is almost the same for now, except +for a few incompatible changes in the options, which will hopefully make them +easier to use. The changes are: + * The options placement is now strictly enforced! While in theory the + options for ffmpeg should be given in [input options] -i INPUT [output + options] OUTPUT order, in practice it was possible to give output options + before the -i and it mostly worked. Except when it didn't - the behavior was + a bit inconsistent. In avconv, it is not possible to mix input and output + options. All non-global options are reset after an input or output filename. + * All per-file options are now truly per-file - they apply only to the next + input or output file and specifying different values for different files + will now work properly (notably -ss and -t options). + * All per-stream options are now truly per-stream - it is possible to + specify which stream(s) should a given option apply to. See the Stream + specifiers section in the avconv manual for details. + * In ffmpeg some options (like -newvideo/-newaudio/...) are irregular in the + sense that they're specified after the output filename instead of before, + like all other options. In avconv this irregularity is removed, all options + apply to the next input or output file. + * -newvideo/-newaudio/-newsubtitle options were removed. Not only were they + irregular and highly confusing, they were also redundant. In avconv the -map + option will create new streams in the output file and map input streams to + them. E.g. avconv -i INPUT -map 0 OUTPUT will create an output stream for + each stream in the first input file. + * The -map option now has slightly different and more powerful syntax: + + Colons (':') are used to separate file index/stream type/stream index + instead of dots. Comma (',') is used to separate the sync stream instead + of colon.. This is done for consistency with other options. + + It's possible to specify stream type. E.g. -map 0:a:2 creates an + output stream from the third input audio stream. + + Omitting the stream index now maps all the streams of the given type, + not just the first. E.g. -map 0:s creates output streams for all the + subtitle streams in the first input file. + + Since -map can now match multiple streams, negative mappings were + introduced. Negative mappings disable some streams from an already + defined map. E.g. '-map 0 -map -0:a:1' means 'create output streams for + all the stream in the first input file, except for the second audio + stream'. + * There is a new option -c (or -codec) for choosing the decoder/encoder to + use, which allows to precisely specify target stream(s) consistently with + other options. E.g. -c:v lib264 sets the codec for all video streams, -c:a:0 + libvorbis sets the codec for the first audio stream and -c copy copies all + the streams without reencoding. Old -vcodec/-acodec/-scodec options are now + aliases to -c:v/a/s + * It is now possible to precisely specify which stream should an AVOption + apply to. E.g. -b:v:0 2M sets the bitrate for the first video stream, while + -b:a 128k sets the bitrate for all audio streams. Note that the old -ab 128k + syntax is deprecated and will stop working soon. + * -map_chapters now takes only an input file index and applies to the next + output file. This is consistent with how all the other options work. + * -map_metadata now takes only an input metadata specifier and applies to + the next output file. Output metadata specifier is now part of the option + name, similarly to the AVOptions/map/codec feature above. + * -metadata can now be used to set metadata on streams and chapters, e.g. + -metadata:s:1 language=eng sets the language of the first stream to 'eng'. + This made -vlang/-alang/-slang options redundant, so they were removed. + * -qscale option now uses stream specifiers and applies to all streams, not + just video. I.e. plain -qscale number would now apply to all streams. To get + the old behavior, use -qscale:v. Also there is now a shortcut -q for -qscale + and -aq is now an alias for -q:a. + * -vbsf/-absf/-sbsf options were removed and replaced by a -bsf option which + uses stream specifiers. Use -bsf:v/a/s instead of the old options. + * -itsscale option now uses stream specifiers, so its argument is only the + scale parameter. + * -intra option was removed, use -g 0 for the same effect. + * -psnr option was removed, use -flags +psnr for the same effect. + * -vf option is now an alias to the new -filter option, which uses stream specifiers. + * -vframes/-aframes/-dframes options are now aliases to the new -frames option. + * -vtag/-atag/-stag options are now aliases to the new -tag option. +- XMV demuxer +- Windows Media Image decoder +- LATM muxer/demuxer +- showinfo filter +- split filter +- libcdio-paranoia input device for audio CD grabbing +- select filter +- Apple ProRes decoder +- CELT in Ogg demuxing +- VC-1 interlaced decoding +- lut, lutrgb, and lutyuv filters +- boxblur filter +- Ut Video decoder +- Speex encoding via libspeex +- 4:2:2 H.264 decoding support +- 4:2:2 and 4:4:4 H.264 encoding with libx264 +- Pulseaudio input device +- replacement Indeo 3 decoder +- TLS/SSL and HTTPS protocol support +- AVOptions API rewritten and documented +- most of CODEC_FLAG2_*, some CODEC_FLAG_* and many codec-specific fields in + AVCodecContext deprecated. Codec private options should be used instead. +- Properly working defaults in libx264 wrapper, support for native presets. +- Encrypted OMA files support +- Discworld II BMV decoding support +- VBLE Decoder +- OS X Video Decoder Acceleration (VDA) support +- CRI ADX audio format muxer and demuxer +- Playstation Portable PMP format demuxer +- PCM format support in OMA demuxer +- CLJR encoder +- Dxtory capture format decoder +- v410 QuickTime uncompressed 4:4:4 10-bit encoder and decoder +- OpenMG Audio muxer +- Simple segmenting muxer +- Indeo 4 decoder +- SMJPEG demuxer + + version 0.7: - E-AC-3 audio encoder - ac3enc: add channel coupling support -- floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders. -- H264/MPEG frame-level multi-threading -- All av_metadata_* functions renamed to av_dict_* and moved to libavutil +- floating-point sample format support for (E-)AC-3, DCA, AAC, Vorbis decoders +- H.264/MPEG frame-level multithreading +- av_metadata_* functions renamed to av_dict_* and moved to libavutil - 4:4:4 H.264 decoding support - 10-bit H.264 optimizations for x86 -- Bump libswscale for recently reported ABI break +- bump libswscale for recently reported ABI break version 0.7_beta2: -- VP8 frame-multithreading +- VP8 frame-level multithreading - NEON optimizations for VP8 -- Lots of deprecated API cruft removed -- fft and imdct optimizations for AVX (Sandy Bridge) processors +- removed a lot of deprecated API cruft +- FFT and IMDCT optimizations for AVX (Sandy Bridge) processors - DPX image encoder - SMPTE 302M AES3 audio decoder -- Remove support for quitting ffmpeg with 'q', ctrl+c should be used. +- ffmpeg no longer quits after the 'q' key is pressed; use 'ctrl+c' instead - 9bit and 10bit per sample support in the H.264 decoder @@ -75,10 +193,10 @@ - demuxer for receiving raw rtp:// URLs without an SDP description - single stream LATM/LOAS decoder - setpts filter added -- Win64 support for optimized asm functions +- Win64 support for optimized x86 assembly functions - MJPEG/AVI1 to JPEG/JFIF bitstream filter - ASS subtitle encoder and decoder -- IEC 61937 encapsulation for E-AC3, TrueHD, DTS-HD (for HDMI passthrough) +- IEC 61937 encapsulation for E-AC-3, TrueHD, DTS-HD (for HDMI passthrough) - overlay filter added - rename aspect filter to setdar, and pixelaspect to setsar - IEC 61937 demuxer diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/cmdutils.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/cmdutils.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/cmdutils.c 2011-06-17 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/cmdutils.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,6 +35,7 @@ #include "libswscale/swscale.h" #include "libpostproc/postprocess.h" #include "libavutil/avstring.h" +#include "libavutil/mathematics.h" #include "libavutil/parseutils.h" #include "libavutil/pixdesc.h" #include "libavutil/eval.h" @@ -49,97 +50,75 @@ #include #endif -const char **opt_names; -const char **opt_values; -static int opt_name_count; -AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; -AVFormatContext *avformat_opts; struct SwsContext *sws_opts; -AVDictionary *format_opts, *video_opts, *audio_opts, *sub_opts; +AVDictionary *format_opts, *codec_opts; static const int this_year = 2011; void init_opts(void) { - int i; - for (i = 0; i < AVMEDIA_TYPE_NB; i++) - avcodec_opts[i] = avcodec_alloc_context2(i); - avformat_opts = avformat_alloc_context(); #if CONFIG_SWSCALE - sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, SWS_BICUBIC, NULL, NULL, NULL); + sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, SWS_BICUBIC, + NULL, NULL, NULL); #endif } void uninit_opts(void) { - int i; - for (i = 0; i < AVMEDIA_TYPE_NB; i++) - av_freep(&avcodec_opts[i]); - av_freep(&avformat_opts->key); - av_freep(&avformat_opts); #if CONFIG_SWSCALE sws_freeContext(sws_opts); sws_opts = NULL; #endif - for (i = 0; i < opt_name_count; i++) { - //opt_values are only stored for codec-specific options in which case - //both the name and value are dup'd - if (opt_values[i]) { - av_freep(&opt_names[i]); - av_freep(&opt_values[i]); - } - } - av_freep(&opt_names); - av_freep(&opt_values); - opt_name_count = 0; av_dict_free(&format_opts); - av_dict_free(&video_opts); - av_dict_free(&audio_opts); - av_dict_free(&sub_opts); + av_dict_free(&codec_opts); } -void log_callback_help(void* ptr, int level, const char* fmt, va_list vl) +void log_callback_help(void *ptr, int level, const char *fmt, va_list vl) { vfprintf(stdout, fmt, vl); } -double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max) +double parse_number_or_die(const char *context, const char *numstr, int type, + double min, double max) { char *tail; const char *error; double d = av_strtod(numstr, &tail); if (*tail) - error= "Expected number for %s but found: %s\n"; + error = "Expected number for %s but found: %s\n"; else if (d < min || d > max) - error= "The value for %s was %s which is not within %f - %f\n"; - else if(type == OPT_INT64 && (int64_t)d != d) - error= "Expected int64 for %s but found %s\n"; + error = "The value for %s was %s which is not within %f - %f\n"; + else if (type == OPT_INT64 && (int64_t)d != d) + error = "Expected int64 for %s but found %s\n"; else if (type == OPT_INT && (int)d != d) - error= "Expected int for %s but found %s\n"; + error = "Expected int for %s but found %s\n"; else return d; - fprintf(stderr, error, context, numstr, min, max); - exit(1); + av_log(NULL, AV_LOG_FATAL, error, context, numstr, min, max); + exit_program(1); + return 0; } -int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration) +int64_t parse_time_or_die(const char *context, const char *timestr, + int is_duration) { int64_t us; if (av_parse_time(&us, timestr, is_duration) < 0) { - fprintf(stderr, "Invalid %s specification for %s: %s\n", - is_duration ? "duration" : "date", context, timestr); - exit(1); + av_log(NULL, AV_LOG_FATAL, "Invalid %s specification for %s: %s\n", + is_duration ? "duration" : "date", context, timestr); + exit_program(1); } return us; } -void show_help_options(const OptionDef *options, const char *msg, int mask, int value) +void show_help_options(const OptionDef *options, const char *msg, int mask, + int value) { const OptionDef *po; int first; first = 1; - for(po = options; po->name != NULL; po++) { + for (po = options; po->name != NULL; po++) { char buf[64]; if ((po->flags & mask) == value) { if (first) { @@ -156,9 +135,23 @@ } } -static const OptionDef* find_option(const OptionDef *po, const char *name){ +void show_help_children(const AVClass *class, int flags) +{ + const AVClass *child = NULL; + av_opt_show2(&class, NULL, flags, 0); + printf("\n"); + + while (child = av_opt_child_class_next(class, child)) + show_help_children(child, flags); +} + +static const OptionDef *find_option(const OptionDef *po, const char *name) +{ + const char *p = strchr(name, ':'); + int len = p ? p - name : strlen(name); + while (po->name != NULL) { - if (!strcmp(name, po->name)) + if (!strncmp(name, po->name, len) && strlen(po->name) == len) break; po++; } @@ -200,8 +193,8 @@ buffsize += WideCharToMultiByte(CP_UTF8, 0, argv_w[i], -1, NULL, 0, NULL, NULL); - win32_argv_utf8 = av_mallocz(sizeof(char*) * (win32_argc + 1) + buffsize); - argstr_flat = (char*)win32_argv_utf8 + sizeof(char*) * (win32_argc + 1); + win32_argv_utf8 = av_mallocz(sizeof(char *) * (win32_argc + 1) + buffsize); + argstr_flat = (char *)win32_argv_utf8 + sizeof(char *) * (win32_argc + 1); if (win32_argv_utf8 == NULL) { LocalFree(argv_w); return; @@ -226,12 +219,84 @@ } #endif /* WIN32 && !__MINGW32CE__ */ -void parse_options(int argc, char **argv, const OptionDef *options, - void (* parse_arg_function)(const char*)) +int parse_option(void *optctx, const char *opt, const char *arg, + const OptionDef *options) { - const char *opt, *arg; - int optindex, handleoptions=1; const OptionDef *po; + int bool_val = 1; + int *dstcount; + void *dst; + + po = find_option(options, opt); + if (!po->name && opt[0] == 'n' && opt[1] == 'o') { + /* handle 'no' bool option */ + po = find_option(options, opt + 2); + if (!(po->name && (po->flags & OPT_BOOL))) + goto unknown_opt; + bool_val = 0; + } + if (!po->name) + po = find_option(options, "default"); + if (!po->name) { +unknown_opt: + av_log(NULL, AV_LOG_ERROR, "Unrecognized option '%s'\n", opt); + return AVERROR(EINVAL); + } + if (po->flags & HAS_ARG && !arg) { + av_log(NULL, AV_LOG_ERROR, "Missing argument for option '%s'\n", opt); + return AVERROR(EINVAL); + } + + /* new-style options contain an offset into optctx, old-style address of + * a global var*/ + dst = po->flags & (OPT_OFFSET | OPT_SPEC) ? (uint8_t *)optctx + po->u.off + : po->u.dst_ptr; + + if (po->flags & OPT_SPEC) { + SpecifierOpt **so = dst; + char *p = strchr(opt, ':'); + + dstcount = (int *)(so + 1); + *so = grow_array(*so, sizeof(**so), dstcount, *dstcount + 1); + (*so)[*dstcount - 1].specifier = av_strdup(p ? p + 1 : ""); + dst = &(*so)[*dstcount - 1].u; + } + + if (po->flags & OPT_STRING) { + char *str; + str = av_strdup(arg); + *(char **)dst = str; + } else if (po->flags & OPT_BOOL) { + *(int *)dst = bool_val; + } else if (po->flags & OPT_INT) { + *(int *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX); + } else if (po->flags & OPT_INT64) { + *(int64_t *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX); + } else if (po->flags & OPT_TIME) { + *(int64_t *)dst = parse_time_or_die(opt, arg, 1); + } else if (po->flags & OPT_FLOAT) { + *(float *)dst = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY); + } else if (po->flags & OPT_DOUBLE) { + *(double *)dst = parse_number_or_die(opt, arg, OPT_DOUBLE, -INFINITY, INFINITY); + } else if (po->u.func_arg) { + int ret = po->flags & OPT_FUNC2 ? po->u.func2_arg(optctx, opt, arg) + : po->u.func_arg(opt, arg); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, + "Failed to set value '%s' for option '%s'\n", arg, opt); + return ret; + } + } + if (po->flags & OPT_EXIT) + exit_program(0); + return !!(po->flags & HAS_ARG); +} + +void parse_options(void *optctx, int argc, char **argv, const OptionDef *options, + void (*parse_arg_function)(void *, const char*)) +{ + const char *opt; + int optindex, handleoptions = 1, ret; /* perform system-dependent conversions for arguments list */ prepare_app_arguments(&argc, &argv); @@ -242,159 +307,96 @@ opt = argv[optindex++]; if (handleoptions && opt[0] == '-' && opt[1] != '\0') { - int bool_val = 1; if (opt[1] == '-' && opt[2] == '\0') { handleoptions = 0; continue; } opt++; - po= find_option(options, opt); - if (!po->name && opt[0] == 'n' && opt[1] == 'o') { - /* handle 'no' bool option */ - po = find_option(options, opt + 2); - if (!(po->name && (po->flags & OPT_BOOL))) - goto unknown_opt; - bool_val = 0; - } - if (!po->name) - po= find_option(options, "default"); - if (!po->name) { -unknown_opt: - fprintf(stderr, "%s: unrecognized option '%s'\n", argv[0], opt); - exit(1); - } - arg = NULL; - if (po->flags & HAS_ARG) { - arg = argv[optindex++]; - if (!arg) { - fprintf(stderr, "%s: missing argument for option '%s'\n", argv[0], opt); - exit(1); - } - } - if (po->flags & OPT_STRING) { - char *str; - str = av_strdup(arg); - *po->u.str_arg = str; - } else if (po->flags & OPT_BOOL) { - *po->u.int_arg = bool_val; - } else if (po->flags & OPT_INT) { - *po->u.int_arg = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX); - } else if (po->flags & OPT_INT64) { - *po->u.int64_arg = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX); - } else if (po->flags & OPT_FLOAT) { - *po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY); - } else if (po->u.func_arg) { - if (po->u.func_arg(opt, arg) < 0) { - fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt); - exit(1); - } - } - if(po->flags & OPT_EXIT) - exit(0); + + if ((ret = parse_option(optctx, opt, argv[optindex], options)) < 0) + exit_program(1); + optindex += ret; } else { if (parse_arg_function) - parse_arg_function(opt); + parse_arg_function(optctx, opt); } } } -#define FLAGS (o->type == FF_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0 -#define SET_PREFIXED_OPTS(ch, flag, output) \ - if (opt[0] == ch && avcodec_opts[0] && (o = av_opt_find(avcodec_opts[0], opt+1, NULL, flag, 0)))\ - av_dict_set(&output, opt+1, arg, FLAGS); -static int opt_default2(const char *opt, const char *arg) +/* + * Return index of option opt in argv or 0 if not found. + */ +static int locate_option(int argc, char **argv, const OptionDef *options, + const char *optname) +{ + const OptionDef *po; + int i; + + for (i = 1; i < argc; i++) { + const char *cur_opt = argv[i]; + + if (*cur_opt++ != '-') + continue; + + po = find_option(options, cur_opt); + if (!po->name && cur_opt[0] == 'n' && cur_opt[1] == 'o') + po = find_option(options, cur_opt + 2); + + if ((!po->name && !strcmp(cur_opt, optname)) || + (po->name && !strcmp(optname, po->name))) + return i; + + if (!po || po->flags & HAS_ARG) + i++; + } + return 0; +} + +void parse_loglevel(int argc, char **argv, const OptionDef *options) +{ + int idx = locate_option(argc, argv, options, "loglevel"); + if (!idx) + idx = locate_option(argc, argv, options, "v"); + if (idx && argv[idx + 1]) + opt_loglevel("loglevel", argv[idx + 1]); +} + +#define FLAGS (o->type == AV_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0 +int opt_default(const char *opt, const char *arg) { const AVOption *o; - if ((o = av_opt_find(avcodec_opts[0], opt, NULL, 0, AV_OPT_SEARCH_CHILDREN))) { - if (o->flags & AV_OPT_FLAG_VIDEO_PARAM) - av_dict_set(&video_opts, opt, arg, FLAGS); - if (o->flags & AV_OPT_FLAG_AUDIO_PARAM) - av_dict_set(&audio_opts, opt, arg, FLAGS); - if (o->flags & AV_OPT_FLAG_SUBTITLE_PARAM) - av_dict_set(&sub_opts, opt, arg, FLAGS); - } else if ((o = av_opt_find(avformat_opts, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN))) + char opt_stripped[128]; + const char *p; + const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(), *sc = sws_get_class(); + + if (!(p = strchr(opt, ':'))) + p = opt + strlen(opt); + av_strlcpy(opt_stripped, opt, FFMIN(sizeof(opt_stripped), p - opt + 1)); + + if ((o = av_opt_find(&cc, opt_stripped, NULL, 0, + AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) || + ((opt[0] == 'v' || opt[0] == 'a' || opt[0] == 's') && + (o = av_opt_find(&cc, opt + 1, NULL, 0, AV_OPT_SEARCH_FAKE_OBJ)))) + av_dict_set(&codec_opts, opt, arg, FLAGS); + else if ((o = av_opt_find(&fc, opt, NULL, 0, + AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) av_dict_set(&format_opts, opt, arg, FLAGS); - else if ((o = av_opt_find(sws_opts, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN))) { + else if ((o = av_opt_find(&sc, opt, NULL, 0, + AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { // XXX we only support sws_flags, not arbitrary sws options - int ret = av_set_string3(sws_opts, opt, arg, 1, NULL); + int ret = av_opt_set(sws_opts, opt, arg, 0); if (ret < 0) { av_log(NULL, AV_LOG_ERROR, "Error setting option %s.\n", opt); return ret; } } - if (!o) { - SET_PREFIXED_OPTS('v', AV_OPT_FLAG_VIDEO_PARAM, video_opts) - SET_PREFIXED_OPTS('a', AV_OPT_FLAG_AUDIO_PARAM, audio_opts) - SET_PREFIXED_OPTS('s', AV_OPT_FLAG_SUBTITLE_PARAM, sub_opts) - } - if (o) return 0; - fprintf(stderr, "Unrecognized option '%s'\n", opt); + av_log(NULL, AV_LOG_ERROR, "Unrecognized option '%s'\n", opt); return AVERROR_OPTION_NOT_FOUND; } -int opt_default(const char *opt, const char *arg){ - int type; - int ret= 0; - const AVOption *o= NULL; - int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0}; - - for(type=0; *avcodec_opts && type= 0; type++){ - const AVOption *o2 = av_opt_find(avcodec_opts[0], opt, NULL, opt_types[type], 0); - if(o2) - ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o); - } - if(!o && avformat_opts) - ret = av_set_string3(avformat_opts, opt, arg, 1, &o); - if(!o && sws_opts) - ret = av_set_string3(sws_opts, opt, arg, 1, &o); - if(!o){ - if (opt[0] == 'a' && avcodec_opts[AVMEDIA_TYPE_AUDIO]) - ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o); - else if(opt[0] == 'v' && avcodec_opts[AVMEDIA_TYPE_VIDEO]) - ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o); - else if(opt[0] == 's' && avcodec_opts[AVMEDIA_TYPE_SUBTITLE]) - ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o); - } - if (o && ret < 0) { - fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt); - exit(1); - } - if (!o) { - AVCodec *p = NULL; - AVOutputFormat *oformat = NULL; - while ((p=av_codec_next(p))){ - const AVClass *c = p->priv_class; - if(c && av_opt_find(&c, opt, NULL, 0, 0)) - break; - } - if (!p) { - while ((oformat = av_oformat_next(oformat))) { - const AVClass *c = oformat->priv_class; - if (c && av_opt_find(&c, opt, NULL, 0, 0)) - break; - } - } - } - - if ((ret = opt_default2(opt, arg)) < 0) - return ret; - -// av_log(NULL, AV_LOG_ERROR, "%s:%s: %f 0x%0X\n", opt, arg, av_get_double(avcodec_opts, opt, NULL), (int)av_get_int(avcodec_opts, opt, NULL)); - - //FIXME we should always use avcodec_opts, ... for storing options so there will not be any need to keep track of what i set over this - opt_values= av_realloc(opt_values, sizeof(void*)*(opt_name_count+1)); - opt_values[opt_name_count]= o ? NULL : av_strdup(arg); - opt_names= av_realloc(opt_names, sizeof(void*)*(opt_name_count+1)); - opt_names[opt_name_count++]= o ? o->name : av_strdup(opt); - - if ((*avcodec_opts && avcodec_opts[0]->debug) || (avformat_opts && avformat_opts->debug)) - av_log_set_level(AV_LOG_DEBUG); - return 0; -} - int opt_loglevel(const char *opt, const char *arg) { const struct { const char *name; int level; } log_levels[] = { @@ -420,11 +422,11 @@ level = strtol(arg, &tail, 10); if (*tail) { - fprintf(stderr, "Invalid loglevel \"%s\". " - "Possible levels are numbers or:\n", arg); + av_log(NULL, AV_LOG_FATAL, "Invalid loglevel \"%s\". " + "Possible levels are numbers or:\n", arg); for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++) - fprintf(stderr, "\"%s\"\n", log_levels[i].name); - exit(1); + av_log(NULL, AV_LOG_FATAL, "\"%s\"\n", log_levels[i].name); + exit_program(1); } av_log_set_level(level); return 0; @@ -438,43 +440,11 @@ if (setrlimit(RLIMIT_CPU, &rl)) perror("setrlimit"); #else - fprintf(stderr, "Warning: -%s not implemented on this OS\n", opt); + av_log(NULL, AV_LOG_WARNING, "-%s not implemented on this OS\n", opt); #endif return 0; } -void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec) -{ - int i; - void *priv_ctx=NULL; - if(!strcmp("AVCodecContext", (*(AVClass**)ctx)->class_name)){ - AVCodecContext *avctx= ctx; - if(codec && codec->priv_class && avctx->priv_data){ - priv_ctx= avctx->priv_data; - } - } else if (!strcmp("AVFormatContext", (*(AVClass**)ctx)->class_name)) { - AVFormatContext *avctx = ctx; - if (avctx->oformat && avctx->oformat->priv_class) { - priv_ctx = avctx->priv_data; - } - } - - for(i=0; iflags & flags) == flags)) - av_set_string3(ctx, opt_names[i], str, 1, NULL); - /* We need to use a differnt system to pass options to the private context because - it is not known which codec and thus context kind that will be when parsing options - we thus use opt_values directly instead of opts_ctx */ - if(!str && priv_ctx && av_get_string(priv_ctx, opt_names[i], &opt, buf, sizeof(buf))){ - av_set_string3(priv_ctx, opt_names[i], opt_values[i], 1, NULL); - } - } -} - void print_error(const char *filename, int err) { char errbuf[128]; @@ -482,7 +452,7 @@ if (av_strerror(err, errbuf, sizeof(errbuf)) < 0) errbuf_ptr = strerror(AVUNERROR(err)); - fprintf(stderr, "%s: %s\n", filename, errbuf_ptr); + av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr); } static int warned_cfg = 0; @@ -491,58 +461,60 @@ #define SHOW_VERSION 2 #define SHOW_CONFIG 4 -#define PRINT_LIB_INFO(outstream,libname,LIBNAME,flags) \ +#define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ if (CONFIG_##LIBNAME) { \ const char *indent = flags & INDENT? " " : ""; \ if (flags & SHOW_VERSION) { \ unsigned int version = libname##_version(); \ - fprintf(outstream, "%slib%-9s %2d.%3d.%2d / %2d.%3d.%2d\n", \ - indent, #libname, \ - LIB##LIBNAME##_VERSION_MAJOR, \ - LIB##LIBNAME##_VERSION_MINOR, \ - LIB##LIBNAME##_VERSION_MICRO, \ - version >> 16, version >> 8 & 0xff, version & 0xff); \ + av_log(NULL, level, "%slib%-9s %2d.%3d.%2d / %2d.%3d.%2d\n",\ + indent, #libname, \ + LIB##LIBNAME##_VERSION_MAJOR, \ + LIB##LIBNAME##_VERSION_MINOR, \ + LIB##LIBNAME##_VERSION_MICRO, \ + version >> 16, version >> 8 & 0xff, version & 0xff); \ } \ if (flags & SHOW_CONFIG) { \ const char *cfg = libname##_configuration(); \ if (strcmp(LIBAV_CONFIGURATION, cfg)) { \ if (!warned_cfg) { \ - fprintf(outstream, \ + av_log(NULL, level, \ "%sWARNING: library configuration mismatch\n", \ indent); \ warned_cfg = 1; \ } \ - fprintf(stderr, "%s%-11s configuration: %s\n", \ + av_log(NULL, level, "%s%-11s configuration: %s\n", \ indent, #libname, cfg); \ } \ } \ } \ -static void print_all_libs_info(FILE* outstream, int flags) +static void print_all_libs_info(int flags, int level) { - PRINT_LIB_INFO(outstream, avutil, AVUTIL, flags); - PRINT_LIB_INFO(outstream, avcodec, AVCODEC, flags); - PRINT_LIB_INFO(outstream, avformat, AVFORMAT, flags); - PRINT_LIB_INFO(outstream, avdevice, AVDEVICE, flags); - PRINT_LIB_INFO(outstream, avfilter, AVFILTER, flags); - PRINT_LIB_INFO(outstream, swscale, SWSCALE, flags); - PRINT_LIB_INFO(outstream, postproc, POSTPROC, flags); + PRINT_LIB_INFO(avutil, AVUTIL, flags, level); + PRINT_LIB_INFO(avcodec, AVCODEC, flags, level); + PRINT_LIB_INFO(avformat, AVFORMAT, flags, level); + PRINT_LIB_INFO(avdevice, AVDEVICE, flags, level); + PRINT_LIB_INFO(avfilter, AVFILTER, flags, level); + PRINT_LIB_INFO(swscale, SWSCALE, flags, level); + PRINT_LIB_INFO(postproc, POSTPROC, flags, level); } void show_banner(void) { - fprintf(stderr, "%s version " LIBAV_VERSION ", Copyright (c) %d-%d the Libav developers\n", - program_name, program_birth_year, this_year); - fprintf(stderr, " built on %s %s with %s %s\n", - __DATE__, __TIME__, CC_TYPE, CC_VERSION); - fprintf(stderr, " configuration: " LIBAV_CONFIGURATION "\n"); - print_all_libs_info(stderr, INDENT|SHOW_CONFIG); - print_all_libs_info(stderr, INDENT|SHOW_VERSION); + av_log(NULL, AV_LOG_INFO, + "%s version " LIBAV_VERSION ", Copyright (c) %d-%d the Libav developers\n", + program_name, program_birth_year, this_year); + av_log(NULL, AV_LOG_INFO, " built on %s %s with %s %s\n", + __DATE__, __TIME__, CC_TYPE, CC_VERSION); + av_log(NULL, AV_LOG_VERBOSE, " configuration: " LIBAV_CONFIGURATION "\n"); + print_all_libs_info(INDENT|SHOW_CONFIG, AV_LOG_VERBOSE); + print_all_libs_info(INDENT|SHOW_VERSION, AV_LOG_VERBOSE); } void show_version(void) { + av_log_set_callback(log_callback_help); printf("%s " LIBAV_VERSION "\n", program_name); - print_all_libs_info(stdout, SHOW_VERSION); + print_all_libs_info(SHOW_VERSION, AV_LOG_INFO); } void show_license(void) @@ -616,93 +588,92 @@ void show_formats(void) { - AVInputFormat *ifmt=NULL; - AVOutputFormat *ofmt=NULL; + AVInputFormat *ifmt = NULL; + AVOutputFormat *ofmt = NULL; const char *last_name; - printf( - "File formats:\n" - " D. = Demuxing supported\n" - " .E = Muxing supported\n" - " --\n"); - last_name= "000"; - for(;;){ - int decode=0; - int encode=0; - const char *name=NULL; - const char *long_name=NULL; - - while((ofmt= av_oformat_next(ofmt))) { - if((name == NULL || strcmp(ofmt->name, name)<0) && - strcmp(ofmt->name, last_name)>0){ - name= ofmt->name; - long_name= ofmt->long_name; - encode=1; + printf("File formats:\n" + " D. = Demuxing supported\n" + " .E = Muxing supported\n" + " --\n"); + last_name = "000"; + for (;;) { + int decode = 0; + int encode = 0; + const char *name = NULL; + const char *long_name = NULL; + + while ((ofmt = av_oformat_next(ofmt))) { + if ((name == NULL || strcmp(ofmt->name, name) < 0) && + strcmp(ofmt->name, last_name) > 0) { + name = ofmt->name; + long_name = ofmt->long_name; + encode = 1; } } - while((ifmt= av_iformat_next(ifmt))) { - if((name == NULL || strcmp(ifmt->name, name)<0) && - strcmp(ifmt->name, last_name)>0){ - name= ifmt->name; - long_name= ifmt->long_name; - encode=0; + while ((ifmt = av_iformat_next(ifmt))) { + if ((name == NULL || strcmp(ifmt->name, name) < 0) && + strcmp(ifmt->name, last_name) > 0) { + name = ifmt->name; + long_name = ifmt->long_name; + encode = 0; } - if(name && strcmp(ifmt->name, name)==0) - decode=1; + if (name && strcmp(ifmt->name, name) == 0) + decode = 1; } - if(name==NULL) + if (name == NULL) break; - last_name= name; + last_name = name; - printf( - " %s%s %-15s %s\n", - decode ? "D":" ", - encode ? "E":" ", - name, + printf(" %s%s %-15s %s\n", + decode ? "D" : " ", + encode ? "E" : " ", + name, long_name ? long_name:" "); } } void show_codecs(void) { - AVCodec *p=NULL, *p2; + AVCodec *p = NULL, *p2; const char *last_name; - printf( - "Codecs:\n" - " D..... = Decoding supported\n" - " .E.... = Encoding supported\n" - " ..V... = Video codec\n" - " ..A... = Audio codec\n" - " ..S... = Subtitle codec\n" - " ...S.. = Supports draw_horiz_band\n" - " ....D. = Supports direct rendering method 1\n" - " .....T = Supports weird frame truncation\n" - " ------\n"); + printf("Codecs:\n" + " D..... = Decoding supported\n" + " .E.... = Encoding supported\n" + " ..V... = Video codec\n" + " ..A... = Audio codec\n" + " ..S... = Subtitle codec\n" + " ...S.. = Supports draw_horiz_band\n" + " ....D. = Supports direct rendering method 1\n" + " .....T = Supports weird frame truncation\n" + " ------\n"); last_name= "000"; - for(;;){ - int decode=0; - int encode=0; - int cap=0; + for (;;) { + int decode = 0; + int encode = 0; + int cap = 0; const char *type_str; - p2=NULL; - while((p= av_codec_next(p))) { - if((p2==NULL || strcmp(p->name, p2->name)<0) && - strcmp(p->name, last_name)>0){ - p2= p; - decode= encode= cap=0; + p2 = NULL; + while ((p = av_codec_next(p))) { + if ((p2 == NULL || strcmp(p->name, p2->name) < 0) && + strcmp(p->name, last_name) > 0) { + p2 = p; + decode = encode = cap = 0; } - if(p2 && strcmp(p->name, p2->name)==0){ - if(p->decode) decode=1; - if(p->encode) encode=1; + if (p2 && strcmp(p->name, p2->name) == 0) { + if (p->decode) + decode = 1; + if (p->encode) + encode = 1; cap |= p->capabilities; } } - if(p2==NULL) + if (p2 == NULL) break; - last_name= p2->name; + last_name = p2->name; - switch(p2->type) { + switch (p2->type) { case AVMEDIA_TYPE_VIDEO: type_str = "V"; break; @@ -716,35 +687,35 @@ type_str = "?"; break; } - printf( - " %s%s%s%s%s%s %-15s %s", - decode ? "D": (/*p2->decoder ? "d":*/" "), - encode ? "E":" ", - type_str, - cap & CODEC_CAP_DRAW_HORIZ_BAND ? "S":" ", - cap & CODEC_CAP_DR1 ? "D":" ", - cap & CODEC_CAP_TRUNCATED ? "T":" ", - p2->name, - p2->long_name ? p2->long_name : ""); - /* if(p2->decoder && decode==0) - printf(" use %s for decoding", p2->decoder->name);*/ + printf(" %s%s%s%s%s%s %-15s %s", + decode ? "D" : (/* p2->decoder ? "d" : */ " "), + encode ? "E" : " ", + type_str, + cap & CODEC_CAP_DRAW_HORIZ_BAND ? "S" : " ", + cap & CODEC_CAP_DR1 ? "D" : " ", + cap & CODEC_CAP_TRUNCATED ? "T" : " ", + p2->name, + p2->long_name ? p2->long_name : ""); +#if 0 + if (p2->decoder && decode == 0) + printf(" use %s for decoding", p2->decoder->name); +#endif printf("\n"); } printf("\n"); - printf( -"Note, the names of encoders and decoders do not always match, so there are\n" -"several cases where the above table shows encoder only or decoder only entries\n" -"even though both encoding and decoding are supported. For example, the h263\n" -"decoder corresponds to the h263 and h263p encoders, for file formats it is even\n" -"worse.\n"); + printf("Note, the names of encoders and decoders do not always match, so there are\n" + "several cases where the above table shows encoder only or decoder only entries\n" + "even though both encoding and decoding are supported. For example, the h263\n" + "decoder corresponds to the h263 and h263p encoders, for file formats it is even\n" + "worse.\n"); } void show_bsfs(void) { - AVBitStreamFilter *bsf=NULL; + AVBitStreamFilter *bsf = NULL; printf("Bitstream filters:\n"); - while((bsf = av_bitstream_filter_next(bsf))) + while ((bsf = av_bitstream_filter_next(bsf))) printf("%s\n", bsf->name); printf("\n"); } @@ -778,15 +749,14 @@ { enum PixelFormat pix_fmt; - printf( - "Pixel formats:\n" - "I.... = Supported Input format for conversion\n" - ".O... = Supported Output format for conversion\n" - "..H.. = Hardware accelerated format\n" - "...P. = Paletted format\n" - "....B = Bitstream format\n" - "FLAGS NAME NB_COMPONENTS BITS_PER_PIXEL\n" - "-----\n"); + printf("Pixel formats:\n" + "I.... = Supported Input format for conversion\n" + ".O... = Supported Output format for conversion\n" + "..H.. = Hardware accelerated format\n" + "...P. = Paletted format\n" + "....B = Bitstream format\n" + "FLAGS NAME NB_COMPONENTS BITS_PER_PIXEL\n" + "-----\n"); #if !CONFIG_SWSCALE # define sws_isSupportedInput(x) 0 @@ -807,6 +777,15 @@ } } +int show_sample_fmts(const char *opt, const char *arg) +{ + int i; + char fmt_str[128]; + for (i = -1; i < AV_SAMPLE_FMT_NB; i++) + printf("%s\n", av_get_sample_fmt_string(fmt_str, sizeof(fmt_str), i)); + return 0; +} + int read_yesno(void) { int c = getchar(); @@ -818,12 +797,14 @@ return yesno; } -int read_file(const char *filename, char **bufptr, size_t *size) +int cmdutils_read_file(const char *filename, char **bufptr, size_t *size) { + int ret; FILE *f = fopen(filename, "rb"); if (!f) { - fprintf(stderr, "Cannot read file '%s': %s\n", filename, strerror(errno)); + av_log(NULL, AV_LOG_ERROR, "Cannot read file '%s': %s\n", filename, + strerror(errno)); return AVERROR(errno); } fseek(f, 0, SEEK_END); @@ -831,15 +812,26 @@ fseek(f, 0, SEEK_SET); *bufptr = av_malloc(*size + 1); if (!*bufptr) { - fprintf(stderr, "Could not allocate file buffer\n"); + av_log(NULL, AV_LOG_ERROR, "Could not allocate file buffer\n"); fclose(f); return AVERROR(ENOMEM); } - fread(*bufptr, 1, *size, f); - (*bufptr)[*size++] = '\0'; + ret = fread(*bufptr, 1, *size, f); + if (ret < *size) { + av_free(*bufptr); + if (ferror(f)) { + av_log(NULL, AV_LOG_ERROR, "Error while reading file '%s': %s\n", + filename, strerror(errno)); + ret = AVERROR(errno); + } else + ret = AVERROR_EOF; + } else { + ret = 0; + (*bufptr)[*size++] = '\0'; + } fclose(f); - return 0; + return ret; } void init_pts_correction(PtsCorrectionContext *ctx) @@ -848,7 +840,8 @@ ctx->last_pts = ctx->last_dts = INT64_MIN; } -int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t reordered_pts, int64_t dts) +int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t reordered_pts, + int64_t dts) { int64_t pts = AV_NOPTS_VALUE; @@ -861,7 +854,7 @@ ctx->last_pts = reordered_pts; } if ((ctx->num_faulty_pts<=ctx->num_faulty_dts || dts == AV_NOPTS_VALUE) - && reordered_pts != AV_NOPTS_VALUE) + && reordered_pts != AV_NOPTS_VALUE) pts = reordered_pts; else pts = dts; @@ -870,14 +863,14 @@ } FILE *get_preset_file(char *filename, size_t filename_size, - const char *preset_name, int is_path, const char *codec_name) + const char *preset_name, int is_path, + const char *codec_name) { FILE *f = NULL; int i; - const char *base[3]= { getenv("FFMPEG_DATADIR"), - getenv("HOME"), - FFMPEG_DATADIR, - }; + const char *base[3] = { getenv("AVCONV_DATADIR"), + getenv("HOME"), + AVCONV_DATADIR, }; if (is_path) { av_strlcpy(filename, preset_name, filename_size); @@ -886,11 +879,14 @@ for (i = 0; i < 3 && !f; i++) { if (!base[i]) continue; - snprintf(filename, filename_size, "%s%s/%s.ffpreset", base[i], i != 1 ? "" : "/.ffmpeg", preset_name); + snprintf(filename, filename_size, "%s%s/%s.ffpreset", base[i], + i != 1 ? "" : "/.avconv", preset_name); f = fopen(filename, "r"); if (!f && codec_name) { snprintf(filename, filename_size, - "%s%s/%s-%s.ffpreset", base[i], i != 1 ? "" : "/.ffmpeg", codec_name, preset_name); + "%s%s/%s-%s.ffpreset", + base[i], i != 1 ? "" : "/.avconv", codec_name, + preset_name); f = fopen(filename, "r"); } } @@ -899,6 +895,136 @@ return f; } +int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec) +{ + if (*spec <= '9' && *spec >= '0') /* opt:index */ + return strtol(spec, NULL, 0) == st->index; + else if (*spec == 'v' || *spec == 'a' || *spec == 's' || *spec == 'd' || + *spec == 't') { /* opt:[vasdt] */ + enum AVMediaType type; + + switch (*spec++) { + case 'v': type = AVMEDIA_TYPE_VIDEO; break; + case 'a': type = AVMEDIA_TYPE_AUDIO; break; + case 's': type = AVMEDIA_TYPE_SUBTITLE; break; + case 'd': type = AVMEDIA_TYPE_DATA; break; + case 't': type = AVMEDIA_TYPE_ATTACHMENT; break; + } + if (type != st->codec->codec_type) + return 0; + if (*spec++ == ':') { /* possibly followed by :index */ + int i, index = strtol(spec, NULL, 0); + for (i = 0; i < s->nb_streams; i++) + if (s->streams[i]->codec->codec_type == type && index-- == 0) + return i == st->index; + return 0; + } + return 1; + } else if (*spec == 'p' && *(spec + 1) == ':') { + int prog_id, i, j; + char *endptr; + spec += 2; + prog_id = strtol(spec, &endptr, 0); + for (i = 0; i < s->nb_programs; i++) { + if (s->programs[i]->id != prog_id) + continue; + + if (*endptr++ == ':') { + int stream_idx = strtol(endptr, NULL, 0); + return stream_idx >= 0 && + stream_idx < s->programs[i]->nb_stream_indexes && + st->index == s->programs[i]->stream_index[stream_idx]; + } + + for (j = 0; j < s->programs[i]->nb_stream_indexes; j++) + if (st->index == s->programs[i]->stream_index[j]) + return 1; + } + return 0; + } else if (!*spec) /* empty specifier, matches everything */ + return 1; + + av_log(s, AV_LOG_ERROR, "Invalid stream specifier: %s.\n", spec); + return AVERROR(EINVAL); +} + +AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, + AVFormatContext *s, AVStream *st) +{ + AVDictionary *ret = NULL; + AVDictionaryEntry *t = NULL; + AVCodec *codec = s->oformat ? avcodec_find_encoder(codec_id) + : avcodec_find_decoder(codec_id); + int flags = s->oformat ? AV_OPT_FLAG_ENCODING_PARAM + : AV_OPT_FLAG_DECODING_PARAM; + char prefix = 0; + const AVClass *cc = avcodec_get_class(); + + if (!codec) + return NULL; + + switch (codec->type) { + case AVMEDIA_TYPE_VIDEO: + prefix = 'v'; + flags |= AV_OPT_FLAG_VIDEO_PARAM; + break; + case AVMEDIA_TYPE_AUDIO: + prefix = 'a'; + flags |= AV_OPT_FLAG_AUDIO_PARAM; + break; + case AVMEDIA_TYPE_SUBTITLE: + prefix = 's'; + flags |= AV_OPT_FLAG_SUBTITLE_PARAM; + break; + } + + while (t = av_dict_get(opts, "", t, AV_DICT_IGNORE_SUFFIX)) { + char *p = strchr(t->key, ':'); + + /* check stream specification in opt name */ + if (p) + switch (check_stream_specifier(s, st, p + 1)) { + case 1: *p = 0; break; + case 0: continue; + default: return NULL; + } + + if (av_opt_find(&cc, t->key, NULL, flags, AV_OPT_SEARCH_FAKE_OBJ) || + (codec && codec->priv_class && + av_opt_find(&codec->priv_class, t->key, NULL, flags, + AV_OPT_SEARCH_FAKE_OBJ))) + av_dict_set(&ret, t->key, t->value, 0); + else if (t->key[0] == prefix && + av_opt_find(&cc, t->key + 1, NULL, flags, + AV_OPT_SEARCH_FAKE_OBJ)) + av_dict_set(&ret, t->key + 1, t->value, 0); + + if (p) + *p = ':'; + } + return ret; +} + +AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, + AVDictionary *codec_opts) +{ + int i; + AVDictionary **opts; + + if (!s->nb_streams) + return NULL; + opts = av_mallocz(s->nb_streams * sizeof(*opts)); + if (!opts) { + av_log(NULL, AV_LOG_ERROR, + "Could not alloc memory for stream options.\n"); + return NULL; + } + for (i = 0; i < s->nb_streams; i++) + opts[i] = filter_codec_opts(codec_opts, s->streams[i]->codec->codec_id, + s, s->streams[i]); + return opts; +} + #if CONFIG_AVFILTER static int ffsink_init(AVFilterContext *ctx, const char *args, void *opaque) @@ -954,12 +1080,32 @@ memcpy(frame->data, picref->data, sizeof(frame->data)); memcpy(frame->linesize, picref->linesize, sizeof(frame->linesize)); - frame->interlaced_frame = picref->video->interlaced; - frame->top_field_first = picref->video->top_field_first; - frame->key_frame = picref->video->key_frame; - frame->pict_type = picref->video->pict_type; + frame->interlaced_frame = picref->video->interlaced; + frame->top_field_first = picref->video->top_field_first; + frame->key_frame = picref->video->key_frame; + frame->pict_type = picref->video->pict_type; + frame->sample_aspect_ratio = picref->video->pixel_aspect; return 1; } #endif /* CONFIG_AVFILTER */ + +void *grow_array(void *array, int elem_size, int *size, int new_size) +{ + if (new_size >= INT_MAX / elem_size) { + av_log(NULL, AV_LOG_ERROR, "Array too big.\n"); + exit_program(1); + } + if (*size < new_size) { + uint8_t *tmp = av_realloc(array, new_size*elem_size); + if (!tmp) { + av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n"); + exit_program(1); + } + memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size); + *size = new_size; + return tmp; + } + return array; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/cmdutils_common_opts.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/cmdutils_common_opts.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/cmdutils_common_opts.h 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/cmdutils_common_opts.h 2012-01-11 00:34:30.000000000 +0000 @@ -10,4 +10,6 @@ { "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" }, { "filters", OPT_EXIT, {(void*)show_filters }, "show available filters" }, { "pix_fmts" , OPT_EXIT, {(void*)show_pix_fmts }, "show available pixel formats" }, + { "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" }, { "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" }, + { "v", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" }, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/cmdutils.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/cmdutils.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/cmdutils.h 2011-06-17 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/cmdutils.h 2012-01-11 00:34:30.000000000 +0000 @@ -39,11 +39,10 @@ */ extern const int program_birth_year; -extern const char **opt_names; extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; extern AVFormatContext *avformat_opts; extern struct SwsContext *sws_opts; -extern AVDictionary *format_opts, *video_opts, *audio_opts, *sub_opts; +extern AVDictionary *format_opts, *codec_opts; /** * Initialize the cmdutils option system, in particular @@ -84,7 +83,7 @@ * parsed or the corresponding value is invalid. * * @param context the context of the value to be set (e.g. the - * corresponding commandline option name) + * corresponding command line option name) * @param numstr the string to be parsed * @param type the type (OPT_INT64 or OPT_FLOAT) as which the * string should be parsed @@ -99,7 +98,7 @@ * the string cannot be correctly parsed. * * @param context the context of the value to be set (e.g. the - * corresponding commandline option name) + * corresponding command line option name) * @param timestr the string to be parsed * @param is_duration a flag which tells how to interpret timestr, if * not zero timestr is interpreted as a duration, otherwise as a @@ -109,6 +108,17 @@ */ int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration); +typedef struct SpecifierOpt { + char *specifier; /**< stream/chapter/program/... specifier */ + union { + uint8_t *str; + int i; + int64_t i64; + float f; + double dbl; + } u; +} SpecifierOpt; + typedef struct { const char *name; int flags; @@ -125,12 +135,18 @@ #define OPT_INT64 0x0400 #define OPT_EXIT 0x0800 #define OPT_DATA 0x1000 +#define OPT_FUNC2 0x2000 +#define OPT_OFFSET 0x4000 /* option is specified as an offset in a passed optctx */ +#define OPT_SPEC 0x8000 /* option is to be stored in an array of SpecifierOpt. + Implies OPT_OFFSET. Next element after the offset is + an int containing element count in the array. */ +#define OPT_TIME 0x10000 +#define OPT_DOUBLE 0x20000 union { - int *int_arg; - char **str_arg; - float *float_arg; + void *dst_ptr; int (*func_arg)(const char *, const char *); - int64_t *int64_arg; + int (*func2_arg)(void *, const char *, const char *); + size_t off; } u; const char *help; const char *argname; @@ -139,17 +155,71 @@ void show_help_options(const OptionDef *options, const char *msg, int mask, int value); /** + * Show help for all options with given flags in class and all its + * children. + */ +void show_help_children(const AVClass *class, int flags); + +/** * Parse the command line arguments. + * + * @param optctx an opaque options context * @param options Array with the definitions required to interpret every * option of the form: -option_name [argument] * @param parse_arg_function Name of the function called to process every * argument without a leading option name flag. NULL if such arguments do * not have to be processed. */ -void parse_options(int argc, char **argv, const OptionDef *options, - void (* parse_arg_function)(const char*)); +void parse_options(void *optctx, int argc, char **argv, const OptionDef *options, + void (* parse_arg_function)(void *optctx, const char*)); + +/** + * Parse one given option. + * + * @return on success 1 if arg was consumed, 0 otherwise; negative number on error + */ +int parse_option(void *optctx, const char *opt, const char *arg, const OptionDef *options); + +/** + * Find the '-loglevel' option in the command line args and apply it. + */ +void parse_loglevel(int argc, char **argv, const OptionDef *options); + +/** + * Check if the given stream matches a stream specifier. + * + * @param s Corresponding format context. + * @param st Stream from s to be checked. + * @param spec A stream specifier of the [v|a|s|d]:[\] form. + * + * @return 1 if the stream matches, 0 if it doesn't, <0 on error + */ +int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec); + +/** + * Filter out options for given codec. + * + * Create a new options dictionary containing only the options from + * opts which apply to the codec with ID codec_id. + * + * @param s Corresponding format context. + * @param st A stream from s for which the options should be filtered. + * @return a pointer to the created dictionary + */ +AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, AVFormatContext *s, AVStream *st); -void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec); +/** + * Setup AVCodecContext options for avformat_find_stream_info(). + * + * Create an array of dictionaries, one dictionary for each stream + * contained in s. + * Each dictionary will contain the options from codec_opts which can + * be applied to the corresponding stream codec context. + * + * @return pointer to the created array of dictionaries, NULL if it + * cannot be created + */ +AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *codec_opts); /** * Print an error message to stderr, indicating filename and a human @@ -219,6 +289,12 @@ void show_pix_fmts(void); /** + * Print a listing containing all the sample formats supported by the + * program. + */ +int show_sample_fmts(const char *opt, const char *arg); + +/** * Return a positive value if a line read from standard input * starts with [yY], otherwise return 0. */ @@ -233,7 +309,7 @@ * @return 0 in case of success, a negative value corresponding to an * AVERROR error code in case of failure. */ -int read_file(const char *filename, char **bufptr, size_t *size); +int cmdutils_read_file(const char *filename, char **bufptr, size_t *size); typedef struct { int64_t num_faulty_pts; /// Number of incorrect PTS values so far @@ -264,7 +340,7 @@ * * If is_path is non-zero, look for the file in the path preset_name. * Otherwise search for a file named arg.ffpreset in the directories - * $FFMPEG_DATADIR (if set), $HOME/.ffmpeg, and in the datadir defined + * $AVCONV_DATADIR (if set), $HOME/.avconv, and in the datadir defined * at configuration time, in that order. If no such file is found and * codec_name is defined, then search for a file named * codec_name-preset_name.ffpreset in the above-mentioned directories. @@ -294,4 +370,20 @@ int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame, AVFilterBufferRef **picref, AVRational *pts_tb); +/** + * Do all the necessary cleanup and abort. + * This function is implemented in the avtools, not cmdutils. + */ +void exit_program(int ret); + +/** + * Realloc array to hold new_size elements of elem_size. + * Calls exit_program() on failure. + * + * @param elem_size size in bytes of each element + * @param size new element count will be written here + * @return reallocated array + */ +void *grow_array(void *array, int elem_size, int *size, int new_size); + #endif /* LIBAV_CMDUTILS_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/common.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/common.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/common.mak 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/common.mak 2012-01-11 00:34:30.000000000 +0000 @@ -5,83 +5,46 @@ # first so "all" becomes default target all: all-yes -ifndef SUBDIR - -ifndef V -Q = @ -ECHO = printf "$(1)\t%s\n" $(2) -BRIEF = CC AS YASM AR LD HOSTCC -SILENT = DEPCC YASMDEP RM RANLIB -MSG = $@ -M = @$(call ECHO,$(TAG),$@); -$(foreach VAR,$(BRIEF), \ - $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR)))) -$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR)))) -$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL)) -endif - -IFLAGS := -I. -I$(SRC_PATH) -CPPFLAGS := $(IFLAGS) $(CPPFLAGS) -CFLAGS += $(ECFLAGS) -YASMFLAGS += $(IFLAGS) -Pconfig.asm - -HOSTCFLAGS += $(IFLAGS) - -%.o: %.c - $(CCDEP) - $(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $< - -%.o: %.S - $(ASDEP) - $(AS) $(CPPFLAGS) $(ASFLAGS) $(AS_DEPFLAGS) -c -o $@ $< - -%.ho: %.h - $(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $< - -%.ver: %.v - $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@ - -%.c %.h: TAG = GEN - -# Dummy rule to stop make trying to rebuild removed or renamed headers -%.h: - @: - -# Disable suffix rules. Most of the builtin rules are suffix rules, -# so this saves some time on slow systems. -.SUFFIXES: - -endif - OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes) OBJS += $(OBJS-yes) FFLIBS := $(FFLIBS-yes) $(FFLIBS) TESTPROGS += $(TESTPROGS-yes) -FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS) -FFLDFLAGS := $(addprefix -Llib,$(ALLFFLIBS)) $(LDFLAGS) +FFEXTRALIBS := $(FFLIBS:%=-l%$(BUILDSUF)) $(EXTRALIBS) -EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES))) -OBJS := $(addprefix $(SUBDIR),$(sort $(OBJS))) -TESTOBJS := $(addprefix $(SUBDIR),$(TESTOBJS) $(TESTPROGS:%=%-test.o)) -TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS))) -HOSTOBJS := $(addprefix $(SUBDIR),$(addsuffix .o,$(HOSTPROGS))) -HOSTPROGS := $(addprefix $(SUBDIR),$(addsuffix $(HOSTEXESUF),$(HOSTPROGS))) +EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF)) +OBJS := $(sort $(OBJS:%=$(SUBDIR)%)) +TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o) +TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF)) +HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o) +HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF)) +TOOLS += $(TOOLS-yes) +TOOLOBJS := $(TOOLS:%=tools/%.o) +TOOLS := $(TOOLS:%=tools/%$(EXESUF)) DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME)) ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h)) -SKIPHEADERS += $(addprefix $(ARCH)/,$(ARCH_HEADERS)) -SKIPHEADERS := $(addprefix $(SUBDIR),$(SKIPHEADERS-) $(SKIPHEADERS)) +SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-) +SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%) checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho)) +alltools: $(TOOLS) + $(HOSTOBJS): %.o: %.c $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $< $(HOSTPROGS): %$(HOSTEXESUF): %.o $(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS) +$(OBJS): | $(sort $(dir $(OBJS))) +$(HOSTOBJS): | $(sort $(dir $(HOSTOBJS))) +$(TESTOBJS): | $(sort $(dir $(TESTOBJS))) +$(TOOLOBJS): | tools + +OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOSTOBJS) $(TESTOBJS)) + CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver DISTCLEANSUFFIXES = *.pc LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/configure mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/configure --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/configure 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/configure 2012-01-11 00:34:30.000000000 +0000 @@ -65,7 +65,7 @@ --disable-logging do not log configure debug information --prefix=PREFIX install in PREFIX [$prefix] --bindir=DIR install binaries in DIR [PREFIX/bin] - --datadir=DIR install data files in DIR [PREFIX/share/ffmpeg] + --datadir=DIR install data files in DIR [PREFIX/share/avconv] --libdir=DIR install libs in DIR [PREFIX/lib] --shlibdir=DIR install shared libs in DIR [PREFIX/lib] --incdir=DIR install includes in DIR [PREFIX/include] @@ -81,9 +81,10 @@ and binaries will be unredistributable [no] --disable-doc do not build documentation --disable-ffmpeg disable ffmpeg build - --disable-ffplay disable ffplay build - --disable-ffprobe disable ffprobe build - --disable-ffserver disable ffserver build + --disable-avconv disable avconv build + --disable-avplay disable avplay build + --disable-avprobe disable avprobe build + --disable-avserver disable avserver build --disable-avdevice disable libavdevice build --disable-avcodec disable libavcodec build --disable-avformat disable libavformat build @@ -91,7 +92,7 @@ --disable-postproc disable libpostproc build --disable-avfilter disable video filter support [no] --disable-pthreads disable pthreads [auto] - --enable-w32threads use Win32 threads [no] + --disable-w32threads disable Win32 threads [auto] --enable-x11grab enable X11 grabbing [no] --disable-network disable network support [no] --enable-gray enable full grayscale support (slower color) @@ -107,10 +108,14 @@ --disable-mdct disable MDCT code --disable-rdft disable RDFT code --enable-vaapi enable VAAPI code + --enable-vda enable VDA code --enable-vdpau enable VDPAU code --disable-dxva2 disable DXVA2 code --enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary) --enable-hardcoded-tables use hardcoded tables instead of runtime generation + --disable-safe-bitstream-reader + disable buffer boundary checking in bitreaders + (faster, but may crash) --enable-memalign-hack emulate memalign, interferes with memory debuggers --disable-everything disable all components listed below --disable-encoder=NAME disable encoder NAME @@ -161,9 +166,11 @@ --enable-avisynth enable reading of AVISynth script files [no] --enable-bzlib enable bzlib [autodetect] --enable-frei0r enable frei0r video filtering + --enable-gnutls enable gnutls [no] --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no] --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no] --enable-libopencv enable video filtering via libopencv [no] + --enable-libcdio enable audio CD grabbing with libcdio --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 and libraw1394 [no] --enable-libdirac enable Dirac support via libdirac [no] @@ -174,9 +181,10 @@ --enable-libnut enable NUT (de)muxing via libnut, native (de)muxer exists [no] --enable-libopenjpeg enable JPEG 2000 decoding via OpenJPEG [no] + --enable-libpulse enable Pulseaudio input via libpulse [no] --enable-librtmp enable RTMP[E] support via librtmp [no] --enable-libschroedinger enable Dirac support via libschroedinger [no] - --enable-libspeex enable Speex decoding via libspeex [no] + --enable-libspeex enable Speex support via libspeex [no] --enable-libtheora enable Theora encoding via libtheora [no] --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no] --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no] @@ -188,6 +196,7 @@ --enable-libxvid enable Xvid encoding via xvidcore, native MPEG-4/Xvid encoder exists [no] --enable-mlib enable Sun medialib [no] + --enable-openssl enable openssl [no] --enable-zlib enable zlib [autodetect] Advanced options (experts only): @@ -875,9 +884,9 @@ } cp_if_changed(){ - cmp -s "$1" "$2" && - echo "$2 is unchanged" || - cp -f "$1" "$2" + cmp -s "$1" "$2" && echo "$2 is unchanged" && return + mkdir -p "$(dirname $2)" + cp -f "$1" "$2" } # CONFIG_LIST contains configurable options, while HAVE_LIST is for @@ -897,8 +906,17 @@ protocols " +PROGRAM_LIST=" + avconv + avplay + avprobe + avserver + ffmpeg +" + CONFIG_LIST=" $COMPONENT_LIST + $PROGRAM_LIST aandct ac3dsp avcodec @@ -912,19 +930,18 @@ dwt dxva2 fastdiv - ffmpeg - ffplay - ffprobe - ffserver fft frei0r + gnutls golomb gpl gray + h264chroma h264dsp h264pred hardcoded_tables huffman + libcdio libdc1394 libdirac libfaac @@ -936,6 +953,7 @@ libopencore_amrwb libopencv libopenjpeg + libpulse librtmp libschroedinger libspeex @@ -955,11 +973,13 @@ mpegaudiodsp network nonfree + openssl pic postproc rdft rtpdec runtime_cpudetect + safe_bitstream_reader shared sinewin small @@ -967,7 +987,9 @@ static swscale swscale_alpha + thumb vaapi + vda vdpau version3 x11grab @@ -1037,17 +1059,17 @@ alsa_asoundlib_h altivec_h arpa_inet_h + asm_mod_y attribute_may_alias attribute_packed - bswap closesocket cmov dcbzl dev_bktr_ioctl_bt848_h dev_bktr_ioctl_meteor_h dev_ic_bt8xx_h - dev_video_meteor_ioctl_meteor_h dev_video_bktr_ioctl_bt848_h + dev_video_meteor_ioctl_meteor_h dlfcn_h dlopen dos_paths @@ -1062,11 +1084,11 @@ fork getaddrinfo gethrtime + GetProcessAffinityMask GetProcessMemoryInfo GetProcessTimes getrusage gnu_as - struct_rusage_ru_maxrss ibm_asm inet_aton inline_asm @@ -1092,34 +1114,39 @@ memalign mkstemp mmap - pld + poll_h posix_memalign round roundf + sched_getaffinity sdl sdl_video_size setmode + setrlimit sndio_h socklen_t soundcard_h - poll_h - setrlimit strerror_r + strptime strtok_r struct_addrinfo struct_ipv6_mreq + struct_rusage_ru_maxrss struct_sockaddr_in6 struct_sockaddr_sa_len struct_sockaddr_storage + struct_v4l2_frmivalenum_discrete symver - symver_gnu_asm symver_asm_label + symver_gnu_asm + sysconf + sysctl sys_mman_h + sys_param_h sys_resource_h sys_select_h sys_soundcard_h sys_videoio_h - ten_operands threads trunc truncf @@ -1229,8 +1256,8 @@ fast_clz_if_any="alpha armv5te avr32 mips ppc x86" fast_unaligned_if_any="armv6 ppc x86" -need_memalign="altivec neon sse" inline_asm_deps="!tms470" +need_memalign="altivec neon sse" symver_if_any="symver_asm_label symver_gnu_asm" @@ -1270,6 +1297,7 @@ flac_encoder_select="golomb lpc" flashsv_decoder_select="zlib" flashsv_encoder_select="zlib" +flashsv2_decoder_select="zlib" flv_decoder_select="h263_decoder" flv_encoder_select="h263_encoder" fraps_decoder_select="huffman" @@ -1279,10 +1307,11 @@ h263_vaapi_hwaccel_select="vaapi h263_decoder" h263i_decoder_select="h263_decoder" h263p_encoder_select="h263_encoder" -h264_decoder_select="golomb h264dsp h264pred" +h264_decoder_select="golomb h264chroma h264dsp h264pred" h264_dxva2_hwaccel_deps="dxva2api_h" h264_dxva2_hwaccel_select="dxva2 h264_decoder" -h264_vaapi_hwaccel_select="vaapi" +h264_vaapi_hwaccel_select="vaapi h264_decoder" +h264_vda_hwaccel_select="vda h264_decoder" h264_vdpau_decoder_select="vdpau h264_decoder" imc_decoder_select="fft mdct sinewin" jpegls_decoder_select="golomb" @@ -1292,28 +1321,30 @@ mjpeg_encoder_select="aandct" mlp_decoder_select="mlp_parser" mp1_decoder_select="mpegaudiodsp" -mp2_decoder_select="mpegaudiodsp" -mp3adu_decoder_select="mpegaudiodsp" -mp3_decoder_select="mpegaudiodsp" -mp3on4_decoder_select="mpegaudiodsp" mp1float_decoder_select="mpegaudiodsp" +mp2_decoder_select="mpegaudiodsp" mp2float_decoder_select="mpegaudiodsp" +mp3_decoder_select="mpegaudiodsp" +mp3adu_decoder_select="mpegaudiodsp" mp3adufloat_decoder_select="mpegaudiodsp" mp3float_decoder_select="mpegaudiodsp" +mp3on4_decoder_select="mpegaudiodsp" mp3on4float_decoder_select="mpegaudiodsp" -mpeg1video_encoder_select="aandct" -mpeg2video_encoder_select="aandct" -mpeg4_decoder_select="h263_decoder mpeg4video_parser" -mpeg4_encoder_select="h263_encoder" +mpc7_decoder_select="mpegaudiodsp" +mpc8_decoder_select="mpegaudiodsp" mpeg_vdpau_decoder_select="vdpau mpegvideo_decoder" +mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h" +mpeg_xvmc_decoder_select="mpegvideo_decoder" mpeg1_vdpau_decoder_select="vdpau mpeg1video_decoder" +mpeg1video_encoder_select="aandct" mpeg2_dxva2_hwaccel_deps="dxva2api_h" mpeg2_dxva2_hwaccel_select="dxva2 mpeg2video_decoder" mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder" +mpeg2video_encoder_select="aandct" +mpeg4_decoder_select="h263_decoder mpeg4video_parser" +mpeg4_encoder_select="h263_encoder" mpeg4_vaapi_hwaccel_select="vaapi mpeg4_decoder" mpeg4_vdpau_decoder_select="vdpau mpeg4_decoder" -mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h" -mpeg_xvmc_decoder_select="mpegvideo_decoder" msmpeg4v1_decoder_select="h263_decoder" msmpeg4v1_encoder_select="h263_encoder" msmpeg4v2_decoder_select="h263_decoder" @@ -1331,14 +1362,14 @@ rv10_encoder_select="h263_encoder" rv20_decoder_select="h263_decoder" rv20_encoder_select="h263_encoder" -rv30_decoder_select="golomb h264pred" -rv40_decoder_select="golomb h264pred" +rv30_decoder_select="golomb h264chroma h264pred" +rv40_decoder_select="golomb h264chroma h264pred" shorten_decoder_select="golomb" sipr_decoder_select="lsp" snow_decoder_select="dwt" snow_encoder_select="aandct dwt" svq1_encoder_select="aandct" -svq3_decoder_select="golomb h264dsp h264pred" +svq3_decoder_select="golomb h264chroma h264dsp h264pred" svq3_decoder_suggest="zlib" theora_decoder_select="vp3_decoder" tiff_decoder_suggest="zlib" @@ -1346,11 +1377,12 @@ truehd_decoder_select="mlp_decoder" tscc_decoder_select="zlib" twinvq_decoder_select="mdct lsp sinewin" -vc1_decoder_select="h263_decoder" +vc1_decoder_select="h263_decoder h264chroma" vc1_dxva2_hwaccel_deps="dxva2api_h DXVA_PictureParameters_wDecodedPictureIndex" vc1_dxva2_hwaccel_select="dxva2 vc1_decoder" vc1_vaapi_hwaccel_select="vaapi vc1_decoder" vc1_vdpau_decoder_select="vdpau vc1_decoder" +vc1image_decoder_select="vc1_decoder" vorbis_decoder_select="mdct" vorbis_encoder_select="mdct" vp6_decoder_select="huffman" @@ -1371,16 +1403,18 @@ wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel" wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel" wmv3_vdpau_decoder_select="vc1_vdpau_decoder" +wmv3image_decoder_select="wmv3_decoder" zlib_decoder_select="zlib" zlib_encoder_select="zlib" zmbv_decoder_select="zlib" zmbv_encoder_select="zlib" vaapi_deps="va_va_h" +vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads" vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h" # parsers -h264_parser_select="golomb h264dsp h264pred" +h264_parser_select="golomb h264chroma h264dsp h264pred" # external libraries libdirac_decoder_deps="libdirac !libschroedinger" @@ -1398,6 +1432,7 @@ libschroedinger_decoder_deps="libschroedinger" libschroedinger_encoder_deps="libschroedinger" libspeex_decoder_deps="libspeex" +libspeex_encoder_deps="libspeex" libtheora_encoder_deps="libtheora" libvo_aacenc_encoder_deps="libvo_aacenc" libvo_amrwbenc_encoder_deps="libvo_amrwbenc" @@ -1446,9 +1481,11 @@ dv1394_indev_deps="dv1394 dv_demuxer" fbdev_indev_deps="linux_fb_h" jack_indev_deps="jack_jack_h" +libcdio_indev_deps="libcdio" libdc1394_indev_deps="libdc1394" oss_indev_deps_any="soundcard_h sys_soundcard_h" oss_outdev_deps_any="soundcard_h sys_soundcard_h" +pulse_indev_deps="libpulse" sndio_indev_deps="sndio_h" sndio_outdev_deps="sndio_h" v4l_indev_deps="linux_videodev_h" @@ -1460,18 +1497,25 @@ # protocols gopher_protocol_deps="network" +httpproxy_protocol_deps="network" +httpproxy_protocol_select="tcp_protocol" http_protocol_deps="network" http_protocol_select="tcp_protocol" +https_protocol_select="tls_protocol" mmsh_protocol_select="http_protocol" mmst_protocol_deps="network" rtmp_protocol_select="tcp_protocol" rtp_protocol_select="udp_protocol" tcp_protocol_deps="network" +tls_protocol_deps_any="openssl gnutls" +tls_protocol_select="tcp_protocol" udp_protocol_deps="network" # filters blackframe_filter_deps="gpl" +boxblur_filter_deps="gpl" cropdetect_filter_deps="gpl" +delogo_filter_deps="gpl" drawtext_filter_deps="libfreetype" frei0r_filter_deps="frei0r dlopen strtok_r" frei0r_src_filter_deps="frei0r dlopen strtok_r" @@ -1486,13 +1530,13 @@ postproc_deps="gpl" # programs +avconv_deps="avcodec avformat swscale" +avplay_deps="avcodec avformat swscale sdl" +avplay_select="rdft" +avprobe_deps="avcodec avformat" +avserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer" +avserver_extralibs='$ldl' ffmpeg_deps="avcodec avformat swscale" -ffmpeg_select="buffer_filter" -ffplay_deps="avcodec avformat swscale sdl" -ffplay_select="rdft" -ffprobe_deps="avcodec avformat" -ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer" -ffserver_extralibs='$ldl' doc_deps="texi2html" @@ -1506,18 +1550,15 @@ dep=${v%=*} tests=${v#*=} for name in ${tests}; do - eval ${name}_test_deps="'${dep}$suf1 ${dep}$suf2'" + append ${name}_test_deps ${dep}$suf1 ${dep}$suf2 done done } -set_ne_test_deps(){ - eval ${1}_be_test_deps="bigendian" - eval ${1}_le_test_deps="!bigendian" -} +mxf_d10_test_deps="avfilter" +seek_lavf_mxf_d10_test_deps="mxf_d10_test" test_deps _encoder _decoder \ - adpcm_g726=g726 \ adpcm_ima_qt \ adpcm_ima_wav \ adpcm_ms \ @@ -1528,11 +1569,12 @@ asv2 \ bmp \ dnxhd="dnxhd_1080i dnxhd_720p dnxhd_720p_rd" \ - dvvideo="dv dv50" \ + dvvideo="dv dv_411 dv50" \ ffv1 \ flac \ flashsv \ flv \ + adpcm_g726=g726 \ gif \ h261 \ h263="h263 h263p" \ @@ -1541,8 +1583,10 @@ mjpeg="jpg mjpeg ljpeg" \ mp2 \ mpeg1video="mpeg mpeg1b" \ - mpeg2video="mpeg2 mpeg2thread" \ - mpeg4="mpeg4 mpeg4adv mpeg4nr mpeg4thread error rc" \ + mpeg2video="mpeg2 mpeg2_422 mpeg2_idct_int mpeg2_ilace mpeg2_ivlc_qprd" \ + mpeg2video="mpeg2thread mpeg2thread_ilace" \ + mpeg4="mpeg4 mpeg4_adap mpeg4_qpel mpeg4_qprd mpeg4adv mpeg4nr" \ + mpeg4="mpeg4thread error rc" \ msmpeg4v3=msmpeg4 \ msmpeg4v2 \ pbm=pbmpipe \ @@ -1578,7 +1622,7 @@ mmf \ mov \ pcm_mulaw=mulaw \ - mxf \ + mxf="mxf mxf_d10" \ nut \ ogg \ rawvideo=pixfmt \ @@ -1592,15 +1636,6 @@ ac3_fixed_test_deps="ac3_fixed_encoder ac3_decoder rm_muxer rm_demuxer" mpg_test_deps="mpeg1system_muxer mpegps_demuxer" -set_ne_test_deps pixdesc -set_ne_test_deps pixfmts_copy -set_ne_test_deps pixfmts_crop -set_ne_test_deps pixfmts_hflip -set_ne_test_deps pixfmts_null -set_ne_test_deps pixfmts_pad -set_ne_test_deps pixfmts_scale -set_ne_test_deps pixfmts_vflip - # default parameters logfile="config.log" @@ -1608,7 +1643,7 @@ # installation paths prefix_default="/usr/local" bindir_default='${prefix}/bin' -datadir_default='${prefix}/share/ffmpeg' +datadir_default='${prefix}/share/avconv' incdir_default='${prefix}/include' libdir_default='${prefix}/lib' mandir_default='${prefix}/share/man' @@ -1625,9 +1660,9 @@ pkg_config_default=pkg-config ranlib="ranlib" yasmexe="yasm" -nogas=":" nm_opts='-g' +nogas=":" # machine arch_default=$(uname -m) @@ -1638,30 +1673,29 @@ host_os=$target_os_default # configurable options +enable $PROGRAM_LIST + enable avcodec enable avdevice enable avfilter enable avformat enable avutil +enable postproc +enable swscale + enable asm enable debug enable doc enable fastdiv -enable ffmpeg -enable ffplay -enable ffprobe -enable ffserver enable network enable optimizations -enable postproc -enable protocols +enable safe_bitstream_reader enable static -enable swscale enable swscale_alpha # build settings SHFLAGS='-shared -Wl,-soname,$$(@F)' -FFSERVERLDFLAGS=-Wl,-E +AVSERVERLDFLAGS=-Wl,-E LIBPREF="lib" LIBSUF=".a" FULLNAME='$(NAME)$(BUILDSUF)' @@ -1672,7 +1706,10 @@ SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)' SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)' LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"' +SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)' +SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' +AS_O='-o $@' CC_O='-o $@' host_cflags='-D_ISOC99_SOURCE -O3 -g' @@ -1687,11 +1724,9 @@ # find source path if test -f configure; then - source_path="$(pwd)" - disable source_path_used + source_path=. else source_path=$(cd $(dirname "$0"); pwd) - enable source_path_used echo "$source_path" | grep -q '[[:blank:]]' && die "Out of tree builds are impossible with whitespace in source path." test -e "$source_path/config.h" && @@ -1724,6 +1759,20 @@ PROTOCOL_LIST=$(find_things protocol PROTOCOL libavformat/allformats.c) FILTER_LIST=$(find_things filter FILTER libavfilter/allfilters.c) +ALL_COMPONENTS=" + $BSF_LIST + $DECODER_LIST + $DEMUXER_LIST + $ENCODER_LIST + $FILTER_LIST + $HWACCEL_LIST + $INDEV_LIST + $MUXER_LIST + $OUTDEV_LIST + $PARSER_LIST + $PROTOCOL_LIST +" + find_tests(){ map "echo ${2}\${v}_test" $(ls "$source_path"/tests/ref/$1 | grep -v '[^-a-z0-9_]') } @@ -1734,6 +1783,8 @@ LAVFI_TESTS=$(find_tests lavfi) SEEK_TESTS=$(find_tests seek seek_) +ALL_TESTS="$ACODEC_TESTS $VCODEC_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS" + pcm_test_deps=$(map 'echo ${v%_*}_decoder $v' $(filter pcm_* $ENCODER_LIST)) for n in $COMPONENT_LIST; do @@ -1742,7 +1793,7 @@ eval ${n}_if_any="\$$v" done -enable $ARCH_EXT_LIST $ACODEC_TESTS $VCODEC_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS +enable $ARCH_EXT_LIST $ALL_TESTS die_unknown(){ echo "Unknown option \"$1\"." @@ -1875,14 +1926,14 @@ trap 'rm -f -- $TMPFILES' EXIT -tmpfile TMPC .c -tmpfile TMPE $EXESUF -tmpfile TMPH .h -tmpfile TMPO .o -tmpfile TMPS .S -tmpfile TMPV .ver -tmpfile TMPSH .sh tmpfile TMPASM .asm +tmpfile TMPC .c +tmpfile TMPE $EXESUF +tmpfile TMPH .h +tmpfile TMPO .o +tmpfile TMPS .S +tmpfile TMPSH .sh +tmpfile TMPV .ver unset -f mktemp @@ -1901,9 +1952,9 @@ die "Sanity test failed." fi +filter_asflags=echo filter_cflags=echo filter_cppflags=echo -filter_asflags=echo if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then cc_type=llvm_gcc @@ -2027,6 +2078,7 @@ cc_ident=$($cc -V 2>&1 | head -n1 | cut -d' ' -f 2-) DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)' DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1' + add_ldflags -xc99 speed_cflags='-O5' size_cflags='-O5 -xspace' filter_cflags=suncc_flags @@ -2117,7 +2169,7 @@ gcc|llvm_gcc) check_native(){ $cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return - sed -n "/$1=/{ + sed -n "/cc1.*$1=/{ s/.*$1=\\([^ ]*\\).*/\\1/ p q @@ -2232,7 +2284,7 @@ disable cmov ;; # targets that do support conditional mov (cmov) - i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2|amdfam10|barcelona|atom) + i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx|core2|amdfam10|barcelona|atom) cpuflags="-march=$cpu" enable cmov enable fast_cmov @@ -2269,7 +2321,7 @@ case $cpu in cortex-a*) subarch=armv7a ;; cortex-r*) subarch=armv7r ;; - cortex-m*) subarch=armv7m ;; + cortex-m*) enable thumb; subarch=armv7m ;; arm11*) subarch=armv6 ;; arm[79]*e*|arm9[24]6*|arm96*|arm102[26]) subarch=armv5te ;; armv4*|arm7*|arm9[24]*) subarch=armv4 ;; @@ -2366,11 +2418,17 @@ host_libs= ;; sunos) - FFSERVERLDFLAGS="" + AVSERVERLDFLAGS="" SHFLAGS='-shared -Wl,-h,$$(@F)' enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS" network_extralibs="-lsocket -lnsl" add_cppflags -D__EXTENSIONS__ + # When using suncc to build, the Solaris linker will mark + # an executable with each instruction set encountered by + # the Solaris assembler. As our libraries contain their own + # guards for processor-specific code, instead suppress + # generation of the HWCAPS ELF section on Solaris x86 only. + enabled_all suncc x86 && echo "hwcap_1 = OVERRIDE;" > mapfile && add_ldflags -Wl,-M,mapfile nm_opts='-P -g' ;; netbsd) @@ -2411,7 +2469,7 @@ SLIBSUF=".dylib" SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)' SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)' - FFSERVERLDFLAGS=-Wl,-bind_at_load + AVSERVERLDFLAGS=-Wl,-bind_at_load objformat="macho" enabled x86_64 && objformat="macho64" enabled_any pic shared || @@ -2435,12 +2493,11 @@ SLIBSUF=".dll" SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)' - SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)' - SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \ - install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"; \ - install -d "$(LIBDIR)"; \ - install -m 644 $(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) "$(LIBDIR)/lib$(SLIBNAME:$(SLIBSUF)=.dll.a)"' - SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"' + SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)' + SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)' + SLIB_INSTALL_LINKS= + SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)' + SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)' SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base' objformat="win32" dlltool="${cross_prefix}dlltool" @@ -2484,7 +2541,7 @@ add_cppflags -D_GNU_SOURCE add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf' - FFSERVERLDFLAGS="" + AVSERVERLDFLAGS="" LIBSUF="_s.a" SLIBPREF="" SLIBSUF=".dll" @@ -2498,14 +2555,14 @@ emxexp -o $(OBJS) >> $(SUBDIR)$(NAME).def' SLIB_EXTRA_CMD='emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(NAME).def; \ emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib $(SUBDIR)$(NAME).def;' - SLIB_INSTALL_EXTRA_CMD='install -m 644 $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"' - SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib' + SLIB_INSTALL_EXTRA_LIB='$(LIBPREF)$(NAME)_dll.a $(LIBPREF)$(NAME)_dll.lib' enable dos_paths ;; gnu/kfreebsd) add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE ;; gnu) + add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 ;; qnx) add_cppflags -D_QNX_SOURCE @@ -2514,7 +2571,14 @@ symbian) SLIBSUF=".dll" enable dos_paths - add_cflags --include=$sysinclude/gcce/gcce.h + add_cflags --include=$sysinclude/gcce/gcce.h -fvisibility=default + add_cppflags -D__GCCE__ -D__SYMBIAN32__ -DSYMBIAN_OE_POSIX_SIGNALS + add_ldflags -Wl,--target1-abs,--no-undefined \ + -Wl,-Ttext,0x80000,-Tdata,0x1000000 -shared \ + -Wl,--entry=_E32Startup -Wl,-u,_E32Startup + add_extralibs -l:eexe.lib -l:usrt2_2.lib -l:dfpaeabi.dso \ + -l:drtaeabi.dso -l:scppnwdl.dso -lsupc++ -lgcc \ + -l:libc.dso -l:libm.dso -l:euser.dso -l:libcrt0.lib ;; none) ;; @@ -2540,18 +2604,18 @@ exit 1; fi -disabled static && LIBNAME="" - die_license_disabled() { enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; } } +die_license_disabled gpl libcdio die_license_disabled gpl libx264 die_license_disabled gpl libxavs die_license_disabled gpl libxvid die_license_disabled gpl x11grab die_license_disabled nonfree libfaac +die_license_disabled nonfree openssl die_license_disabled version3 libopencore_amrnb die_license_disabled version3 libopencore_amrwb @@ -2607,7 +2671,7 @@ elif enabled arm; then - check_cflags -marm + enabled thumb && check_cflags -mthumb || check_cflags -marm nogas=die if check_cpp_condition stddef.h "defined __ARM_PCS_VFP"; then @@ -2623,9 +2687,6 @@ warn "Compiler does not indicate floating-point ABI, guessing $fpabi." fi - # We have to check if pld is a nop and disable it. - check_asm pld '"pld [r0]"' - enabled armv5te && check_asm armv5te '"qadd r0, r0, r0"' enabled armv6 && check_asm armv6 '"sadd16 r0, r0, r0"' enabled armv6t2 && check_asm armv6t2 '"movt r0, #0"' @@ -2634,6 +2695,8 @@ enabled neon && check_asm neon '"vadd.i16 q0, q0, q0"' enabled vfpv3 && check_asm vfpv3 '"vmov.f32 s0, #1.0"' + check_asm asm_mod_y '"vmul.i32 d0, d0, %y0" :: "x"(0)' + enabled_all armv6t2 shared !pic && enable_pic elif enabled mips; then @@ -2702,24 +2765,10 @@ # check whether xmm clobbers are supported check_asm xmm_clobbers '"":::"%xmm0"' - # check whether more than 10 operands are supported - check_cc <=0.9.1"; } } enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 && - { check_cpp_condition x264.h "X264_BUILD >= 115" || - die "ERROR: libx264 version must be >= 0.115."; } + { check_cpp_condition x264.h "X264_BUILD >= 118" || + die "ERROR: libx264 version must be >= 0.118."; } enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib +enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || + check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || + check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || + die "ERROR: openssl not found"; } # libdc1394 check if enabled libdc1394; then @@ -2929,6 +2994,8 @@ check_header linux/fb.h check_header linux/videodev.h check_header linux/videodev2.h +check_struct linux/videodev2.h "struct v4l2_frmivalenum" discrete + check_header sys/videoio.h check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extralibs" @@ -2955,6 +3022,9 @@ enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio +enabled libcdio && + check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open "-lcdio_paranoia -lcdio_cdda -lcdio" + enabled x11grab && check_header X11/Xlib.h && check_header X11/extensions/XShm.h && @@ -2963,6 +3033,11 @@ check_func XShmCreateImage -lX11 -lXext && check_func XFixesGetCursorImage -lX11 -lXext -lXfixes +# check for VDA header +if ! disabled vda && check_header VideoDecodeAcceleration/VDADecoder.h; then + enable vda && add_extralibs -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore +fi + if ! disabled vdpau && enabled vdpau_vdpau_h; then check_cpp_condition \ vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" || @@ -2977,6 +3052,7 @@ check_cflags -Wall check_cflags -Wno-parentheses check_cflags -Wno-switch +check_cflags -Wno-format-zero-length check_cflags -Wdisabled-optimization check_cflags -Wpointer-arith check_cflags -Wredundant-decls @@ -2986,11 +3062,12 @@ check_cflags -Wtype-limits check_cflags -Wundef check_cflags -Wmissing-prototypes +check_cflags -Wstrict-prototypes enabled extra_warnings && check_cflags -Winline # add some linker flags check_ldflags -Wl,--warn-common -check_ldflags -Wl,-rpath-link,libpostproc -Wl,-rpath-link,libswscale -Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice -Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec -Wl,-rpath-link,libavutil +check_ldflags -Wl,-rpath-link=libpostproc:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic echo "X{};" > $TMPV @@ -3052,6 +3129,7 @@ check_cflags -fno-tree-vectorize check_cflags -Werror=implicit-function-declaration check_cflags -Werror=missing-prototypes + check_cflags -Werror=declaration-after-statement elif enabled llvm_gcc; then check_cflags -mllvm -stack-alignment=16 elif enabled clang; then @@ -3063,6 +3141,8 @@ add_cflags -W${armcc_opt},--diag_suppress=1207 add_cflags -W${armcc_opt},--diag_suppress=1293 # assignment in condition add_cflags -W${armcc_opt},--diag_suppress=3343 # hardfp compat + add_cflags -W${armcc_opt},--diag_suppress=167 # pointer sign + add_cflags -W${armcc_opt},--diag_suppress=513 # pointer sign elif enabled tms470; then add_cflags -pds=824 -pds=837 elif enabled pathscale; then @@ -3074,22 +3154,8 @@ check_deps $CONFIG_LIST \ $CONFIG_EXTRA \ $HAVE_LIST \ - $DECODER_LIST \ - $ENCODER_LIST \ - $HWACCEL_LIST \ - $PARSER_LIST \ - $BSF_LIST \ - $DEMUXER_LIST \ - $MUXER_LIST \ - $FILTER_LIST \ - $INDEV_LIST \ - $OUTDEV_LIST \ - $PROTOCOL_LIST \ - $ACODEC_TESTS \ - $VCODEC_TESTS \ - $LAVF_TESTS \ - $LAVFI_TESTS \ - $SEEK_TESTS \ + $ALL_COMPONENTS \ + $ALL_TESTS \ enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; } @@ -3121,7 +3187,6 @@ echo "CMOV is fast ${fast_cmov-no}" echo "EBX available ${ebx_available-no}" echo "EBP available ${ebp_available-no}" - echo "10 operands supported ${ten_operands-no}" fi if enabled arm; then echo "ARMv5TE enabled ${armv5te-no}" @@ -3151,10 +3216,16 @@ echo "new filter support ${avfilter-no}" echo "network support ${network-no}" echo "threading support ${thread_type-no}" +echo "safe bitstream reader ${safe_bitstream_reader-no}" echo "SDL support ${sdl-no}" echo "Sun medialib support ${mlib-no}" +echo "libdxva2 enabled ${dxva2-no}" +echo "libva enabled ${vaapi-no}" +echo "libvdpau enabled ${vdpau-no}" echo "AVISynth enabled ${avisynth-no}" echo "frei0r enabled ${frei0r-no}" +echo "gnutls enabled ${gnutls-no}" +echo "libcdio support ${libcdio-no}" echo "libdc1394 support ${libdc1394-no}" echo "libdirac enabled ${libdirac-no}" echo "libfaac enabled ${libfaac-no}" @@ -3165,11 +3236,11 @@ echo "libopencore-amrwb support ${libopencore_amrwb-no}" echo "libopencv support ${libopencv-no}" echo "libopenjpeg enabled ${libopenjpeg-no}" +echo "libpulse enabled ${libpulse-no}" echo "librtmp enabled ${librtmp-no}" echo "libschroedinger enabled ${libschroedinger-no}" echo "libspeex enabled ${libspeex-no}" echo "libtheora enabled ${libtheora-no}" -echo "libva enabled ${vaapi-no}" echo "libvo-aacenc support ${libvo_aacenc-no}" echo "libvo-amrwbenc support ${libvo_amrwbenc-no}" echo "libvorbis enabled ${libvorbis-no}" @@ -3177,6 +3248,7 @@ echo "libx264 enabled ${libx264-no}" echo "libxavs enabled ${libxavs-no}" echo "libxvid enabled ${libxvid-no}" +echo "openssl enabled ${openssl-no}" echo "zlib enabled ${zlib-no}" echo "bzlib enabled ${bzlib-no}" echo @@ -3203,51 +3275,12 @@ echo "Creating config.mak and config.h..." -# build tree in object directory if source path is different from current one -if enabled source_path_used; then - DIRS=" - doc - libavcodec - libavcodec/$arch - libavdevice - libavfilter - libavfilter/$arch - libavformat - libavutil - libavutil/$arch - libpostproc - libswscale - libswscale/$arch - tests - tools - " - FILES=" - Makefile - common.mak - subdir.mak - doc/Makefile - doc/texi2pod.pl - libavcodec/Makefile - libavcodec/${arch}/Makefile - libavdevice/Makefile - libavfilter/Makefile - libavfilter/${arch}/Makefile - libavformat/Makefile - libavutil/Makefile - libpostproc/Makefile - libswscale/Makefile - tests/Makefile - " - map 'mkdir -p $v' $DIRS; - map 'test -f "$source_path/$v" && $ln_s "$source_path/$v" $v' $FILES -fi +test -e Makefile || $ln_s "$source_path/Makefile" . config_files="$TMPH config.mak" cat > config.mak <> config.mak } -get_version LIBSWSCALE libswscale/swscale.h -get_version LIBPOSTPROC libpostproc/postprocess.h get_version LIBAVCODEC libavcodec/version.h get_version LIBAVDEVICE libavdevice/avdevice.h +get_version LIBAVFILTER libavfilter/avfilter.h get_version LIBAVFORMAT libavformat/version.h get_version LIBAVUTIL libavutil/avutil.h -get_version LIBAVFILTER libavfilter/avfilter.h +get_version LIBPOSTPROC libpostproc/postprocess.h +get_version LIBSWSCALE libswscale/swscale.h cat > $TMPH <>config.mak <> $TMPH -echo "endif # LIBAV_CONFIG_MAK" >> config.mak # Do not overwrite an unchanged config.h to avoid superfluous rebuilds. cp_if_changed $TMPH config.h @@ -3422,6 +3446,7 @@ libs=$4 requires=$5 enabled ${name#lib} || return 0 +mkdir -p $name cat < $name/$name.pc prefix=$prefix exec_prefix=\${prefix} @@ -3459,5 +3484,5 @@ pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION" pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION" pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" -pkgconfig_generate libpostproc "Libav post processing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION" +pkgconfig_generate libpostproc "Libav postprocessing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION" pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/APIchanges mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/APIchanges --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/APIchanges 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/APIchanges 2012-01-11 00:34:30.000000000 +0000 @@ -13,20 +13,157 @@ API changes, most recent first: -2011-06-xx - xxxxxxx - lavf 53.2.0 - avformat.h +2011-01-03 - b73ec05 - lavu 51.21.0 + Add av_popcount64 + +2011-12-25 - lavfi 2.14.0 + e1d9dbf Add a new installed header - buffersrc.h + It contains a new function av_buffersrc_buffer() that allows passing + frames to the 'buffer' filter, but unlike av_vsrc_buffer_add_frame() + it allows for direct rendering. + 1c9e340 Add avfilter_copy_frame_props() for copying properties from + AVFrame to AVFilterBufferRef. + +2011-12-25 - lavc 53.31.0 + Add the following new fields to AVFrame: + b58dbb5 sample_aspect_ratio + 3a2ddf7 width, height + 8a4a5f6 format + +2011-12-18 - 8400b12 - lavc 53.28.1 + Deprecate AVFrame.age. The field is unused. + +2011-12-12 - 5266045 - lavf 53.17.0 + Add avformat_close_input(). + Deprecate av_close_input_file() and av_close_input_stream(). + +2011-12-02 - 0eea212 - lavc 53.25.0 + Add nb_samples and extended_data fields to AVFrame. + Deprecate AVCODEC_MAX_AUDIO_FRAME_SIZE. + Deprecate avcodec_decode_audio3() in favor of avcodec_decode_audio4(). + avcodec_decode_audio4() writes output samples to an AVFrame, which allows + audio decoders to use get_buffer(). + +2011-12-04 - 560f773 - lavc 53.24.0 + Change AVFrame.data[4]/base[4]/linesize[4]/error[4] to [8] at next major bump. + Change AVPicture.data[4]/linesize[4] to [8] at next major bump. + Change AVCodecContext.error[4] to [8] at next major bump. + Add AV_NUM_DATA_POINTERS to simplify the bump transition. + +2011-11-23 - bbb46f3 - lavu 51.18.0 + Add av_samples_get_buffer_size(), av_samples_fill_arrays(), and + av_samples_alloc(), to samplefmt.h. + +2011-11-23 - 8889cc4 - lavu 51.17.0 + Add planar sample formats and av_sample_fmt_is_planar() to samplefmt.h. + +2011-11-19 - f3a29b7 - lavc 53.21.0 + Move some AVCodecContext fields to a new private struct, AVCodecInternal, + which is accessed from a new field, AVCodecContext.internal. + - fields moved: + AVCodecContext.internal_buffer --> AVCodecInternal.buffer + AVCodecContext.internal_buffer_count --> AVCodecInternal.buffer_count + AVCodecContext.is_copy --> AVCodecInternal.is_copy + +2011-11-16 - 6270671 - lavu 51.16.0 + Add av_timegm() + +2011-11-13 - lavf 53.15.0 + New interrupt callback API, allowing per-AVFormatContext/AVIOContext + interrupt callbacks. + 6aa0b98 Add AVIOInterruptCB struct and the interrupt_callback field to + AVFormatContext. + 1dee0ac Add avio_open2() with additional parameters. Those are + an interrupt callback and an options AVDictionary. + This will allow passing AVOptions to protocols after lavf + 54.0. + +2011-11-06 - ba04ecf - lavu 51.14.0 + Add av_strcasecmp() and av_strncasecmp() to avstring.h. + +2011-11-06 - 07b172f - lavu 51.13.0 + Add av_toupper()/av_tolower() + +2011-11-05 - b6d08f4 - lavf 53.13.0 + Add avformat_network_init()/avformat_network_uninit() + +2011-10-27 - 512557b - lavc 53.15.0 + Remove avcodec_parse_frame. + Deprecate AVCodecContext.parse_only and CODEC_CAP_PARSE_ONLY. + +2011-10-19 - 569129a - lavf 53.10.0 + Add avformat_new_stream(). Deprecate av_new_stream(). + +2011-10-13 - b631fba - lavf 53.9.0 + Add AVFMT_NO_BYTE_SEEK AVInputFormat flag. + +2011-10-12 - lavu 51.12.0 + AVOptions API rewrite. + + - 145f741 FF_OPT_TYPE* renamed to AV_OPT_TYPE_* + - new setting/getting functions with slightly different semantics: + dac66da av_set_string3 -> av_opt_set + av_set_double -> av_opt_set_double + av_set_q -> av_opt_set_q + av_set_int -> av_opt_set_int + + 41d9d51 av_get_string -> av_opt_get + av_get_double -> av_opt_get_double + av_get_q -> av_opt_get_q + av_get_int -> av_opt_get_int + + - 8c5dcaa trivial rename av_next_option -> av_opt_next + - 641c7af new functions - av_opt_child_next, av_opt_child_class_next + and av_opt_find2() + +2011-09-03 - fb4ca26 - lavc 53.10.0 + lavf 53.6.0 + lsws 2.1.0 + Add {avcodec,avformat,sws}_get_class(). + +2011-09-03 - c11fb82 - lavu 51.10.0 + Add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find() function. + +2011-08-26 - lavu 51.9.0 + - f2011ed Add av_fifo_peek2(), deprecate av_fifo_peek(). + - add41de..abc78a5 Do not include intfloat_readwrite.h, + mathematics.h, rational.h, pixfmt.h, or log.h from avutil.h. + +2011-08-16 - 48f9e45 - lavf 53.4.0 + Add avformat_query_codec(). + +2011-08-16 - bca06e7 - lavc 53.8.0 + Add avcodec_get_type(). + +2011-08-06 - 2f63440 - lavf 53.4.0 + Add error_recognition to AVFormatContext. + +2011-08-02 - 9d39cbf - lavc 53.7.1 + Add AV_PKT_FLAG_CORRUPT AVPacket flag. + +2011-07-10 - a67c061 - lavf 53.3.0 + Add avformat_find_stream_info(), deprecate av_find_stream_info(). + +2011-07-10 - 0b950fe - lavc 53.6.0 + Add avcodec_open2(), deprecate avcodec_open(). + +2011-06-23 - 67e9ae1 - lavu 51.8.0 - attributes.h + Add av_printf_format(). + +2011-06-16 - 05e84c9, 25de595 - lavf 53.2.0 - avformat.h Add avformat_open_input and avformat_write_header(). Deprecate av_open_input_stream, av_open_input_file, AVFormatParameters and av_write_header. -2011-06-xx - xxxxxxx - lavu 51.7.0 - opt.h +2011-06-16 - 7e83e1c, dc59ec5 - lavu 51.7.0 - opt.h Add av_opt_set_dict() and av_opt_find(). Deprecate av_find_opt(). Add AV_DICT_APPEND flag. -2011-06-xx - xxxxxxx - lavu 51.6.0 - opt.h +2011-06-10 - cb7c11c - lavu 51.6.0 - opt.h Add av_opt_flag_is_set(). -2011-06-xx - xxxxxxx - lavu 51.5.0 - AVMetadata +2011-06-08 - d9f80ea - lavu 51.5.0 - AVMetadata Move AVMetadata from lavf to lavu and rename it to AVDictionary -- new installed header dict.h. All av_metadata_* functions renamed to av_dict_*. @@ -35,7 +172,7 @@ Add av_get_bytes_per_sample() in libavutil/samplefmt.h. Deprecate av_get_bits_per_sample_fmt(). -2011-06-xx - xxxxxxx - lavu 51.3.0 - opt.h +2011-06-05 - b39b062 - lavu 51.3.0 - opt.h Add av_opt_free convenience function. 2011-05-28 - 0420bd7 - lavu 51.2.0 - pixdesc.h diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avconv.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avconv.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avconv.texi 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avconv.texi 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,1059 @@ +\input texinfo @c -*- texinfo -*- + +@settitle avconv Documentation +@titlepage +@center @titlefont{avconv Documentation} +@end titlepage + +@top + +@contents + +@chapter Synopsis + +The generic syntax is: + +@example +@c man begin SYNOPSIS +avconv [global options] [[infile options][@option{-i} @var{infile}]]... @{[outfile options] @var{outfile}@}... +@c man end +@end example + +@chapter Description +@c man begin DESCRIPTION + +avconv is a very fast video and audio converter that can also grab from +a live audio/video source. It can also convert between arbitrary sample +rates and resize video on the fly with a high quality polyphase filter. + +avconv reads from an arbitrary number of input "files" (which can be regular +files, pipes, network streams, grabbing devices, etc.), specified by the +@code{-i} option, and writes to an arbitrary number of output "files", which are +specified by a plain output filename. Anything found on the command line which +cannot be interpreted as an option is considered to be an output filename. + +Each input or output file can in principle contain any number of streams of +different types (video/audio/subtitle/attachment/data). Allowed number and/or +types of streams can be limited by the container format. Selecting, which +streams from which inputs go into output, is done either automatically or with +the @code{-map} option (see the Stream selection chapter). + +To refer to input files in options, you must use their indices (0-based). E.g. +the first input file is @code{0}, the second is @code{1} etc. Similarly, streams +within a file are referred to by their indices. E.g. @code{2:3} refers to the +fourth stream in the third input file. See also the Stream specifiers chapter. + +As a general rule, options are applied to the next specified +file. Therefore, order is important, and you can have the same +option on the command line multiple times. Each occurrence is +then applied to the next input or output file. +Exceptions from this rule are the global options (e.g. verbosity level), +which should be specified first. + +Do not mix input and output files -- first specify all input files, then all +output files. Also do not mix options which belong to different files. All +options apply ONLY to the next input or output file and are reset between files. + +@itemize +@item +To set the video bitrate of the output file to 64kbit/s: +@example +avconv -i input.avi -b 64k output.avi +@end example + +@item +To force the frame rate of the output file to 24 fps: +@example +avconv -i input.avi -r 24 output.avi +@end example + +@item +To force the frame rate of the input file (valid for raw formats only) +to 1 fps and the frame rate of the output file to 24 fps: +@example +avconv -r 1 -i input.m2v -r 24 output.avi +@end example +@end itemize + +The format option may be needed for raw input files. + +@c man end DESCRIPTION + +@chapter Stream selection +@c man begin STREAM SELECTION + +By default avconv tries to pick the "best" stream of each type present in input +files and add them to each output file. For video, this means the highest +resolution, for audio the highest channel count. For subtitle it's simply the +first subtitle stream. + +You can disable some of those defaults by using @code{-vn/-an/-sn} options. For +full manual control, use the @code{-map} option, which disables the defaults just +described. + +@c man end STREAM SELECTION + +@chapter Options +@c man begin OPTIONS + +@include avtools-common-opts.texi + +@section Main options + +@table @option + +@item -f @var{fmt} (@emph{input/output}) +Force input or output file format. The format is normally autodetected for input +files and guessed from file extension for output files, so this option is not +needed in most cases. + +@item -i @var{filename} (@emph{input}) +input file name + +@item -y (@emph{global}) +Overwrite output files without asking. + +@item -c[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream}) +@itemx -codec[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream}) +Select an encoder (when used before an output file) or a decoder (when used +before an input file) for one or more streams. @var{codec} is the name of a +decoder/encoder or a special value @code{copy} (output only) to indicate that +the stream is not to be reencoded. + +For example +@example +avconv -i INPUT -map 0 -c:v libx264 -c:a copy OUTPUT +@end example +encodes all video streams with libx264 and copies all audio streams. + +For each stream, the last matching @code{c} option is applied, so +@example +avconv -i INPUT -map 0 -c copy -c:v:1 libx264 -c:a:137 libvorbis OUTPUT +@end example +will copy all the streams except the second video, which will be encoded with +libx264, and the 138th audio, which will be encoded with libvorbis. + +@item -t @var{duration} (@emph{output}) +Stop writing the output after its duration reaches @var{duration}. +@var{duration} may be a number in seconds, or in @code{hh:mm:ss[.xxx]} form. + +@item -fs @var{limit_size} (@emph{output}) +Set the file size limit. + +@item -ss @var{position} (@emph{input/output}) +When used as an input option (before @code{-i}), seeks in this input file to +@var{position}. When used as an output option (before an output filename), +decodes but discards input until the timestamps reach @var{position}. This is +slower, but more accurate. + +@var{position} may be either in seconds or in @code{hh:mm:ss[.xxx]} form. + +@item -itsoffset @var{offset} (@emph{input}) +Set the input time offset in seconds. +@code{[-]hh:mm:ss[.xxx]} syntax is also supported. +The offset is added to the timestamps of the input files. +Specifying a positive offset means that the corresponding +streams are delayed by @var{offset} seconds. + +@item -metadata[:metadata_specifier] @var{key}=@var{value} (@emph{output,per-metadata}) +Set a metadata key/value pair. + +An optional @var{metadata_specifier} may be given to set metadata +on streams or chapters. See @code{-map_metadata} documentation for +details. + +This option overrides metadata set with @code{-map_metadata}. It is +also possible to delete metadata by using an empty value. + +For example, for setting the title in the output file: +@example +avconv -i in.avi -metadata title="my title" out.flv +@end example + +To set the language of the first audio stream: +@example +avconv -i INPUT -metadata:s:a:0 language=eng OUTPUT +@end example + +@item -target @var{type} (@emph{output}) +Specify target file type (@code{vcd}, @code{svcd}, @code{dvd}, @code{dv}, +@code{dv50}). @var{type} may be prefixed with @code{pal-}, @code{ntsc-} or +@code{film-} to use the corresponding standard. All the format options +(bitrate, codecs, buffer sizes) are then set automatically. You can just type: + +@example +avconv -i myfile.avi -target vcd /tmp/vcd.mpg +@end example + +Nevertheless you can specify additional options as long as you know +they do not conflict with the standard, as in: + +@example +avconv -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg +@end example + +@item -dframes @var{number} (@emph{output}) +Set the number of data frames to record. This is an alias for @code{-frames:d}. + +@item -frames[:@var{stream_specifier}] @var{framecount} (@emph{output,per-stream}) +Stop writing to the stream after @var{framecount} frames. + +@item -q[:@var{stream_specifier}] @var{q} (@emph{output,per-stream}) +@itemx -qscale[:@var{stream_specifier}] @var{q} (@emph{output,per-stream}) +Use fixed quality scale (VBR). The meaning of @var{q} is +codec-dependent. + +@item -filter[:@var{stream_specifier}] @var{filter_graph} (@emph{output,per-stream}) +@var{filter_graph} is a description of the filter graph to apply to +the stream. Use @code{-filters} to show all the available filters +(including also sources and sinks). +@item -pre[:@var{stream_specifier}] @var{preset_name} (@emph{output,per-stream}) +Specify the preset for matching stream(s). + +@item -stats (@emph{global}) +Print encoding progress/statistics. On by default. + +@item -attach @var{filename} (@emph{output}) +Add an attachment to the output file. This is supported by a few formats +like Matroska for e.g. fonts used in rendering subtitles. Attachments +are implemented as a specific type of stream, so this option will add +a new stream to the file. It is then possible to use per-stream options +on this stream in the usual way. Attachment streams created with this +option will be created after all the other streams (i.e. those created +with @code{-map} or automatic mappings). + +Note that for Matroska you also have to set the mimetype metadata tag: +@example +avconv -i INPUT -attach DejaVuSans.ttf -metadata:s:2 mimetype=application/x-truetype-font out.mkv +@end example +(assuming that the attachment stream will be third in the output file). + +@item -dump_attachment[:@var{stream_specifier}] @var{filename} (@emph{input,per-stream}) +Extract the matching attachment stream into a file named @var{filename}. If +@var{filename} is empty, then the value of the @code{filename} metadata tag +will be used. + +E.g. to extract the first attachment to a file named 'out.ttf': +@example +avconv -dump_attachment:t:0 out.ttf INPUT +@end example +To extract all attachments to files determined by the @code{filename} tag: +@example +avconv -dump_attachment:t "" INPUT +@end example + +Technical note -- attachments are implemented as codec extradata, so this +option can actually be used to extract extradata from any stream, not just +attachments. + +@end table + +@section Video Options + +@table @option +@item -vframes @var{number} (@emph{output}) +Set the number of video frames to record. This is an alias for @code{-frames:v}. +@item -r[:@var{stream_specifier}] @var{fps} (@emph{input/output,per-stream}) +Set frame rate (Hz value, fraction or abbreviation), (default = 25). +@item -s[:@var{stream_specifier}] @var{size} (@emph{input/output,per-stream}) +Set frame size. The format is @samp{wxh} (default - same as source). +The following abbreviations are recognized: +@table @samp +@item sqcif +128x96 +@item qcif +176x144 +@item cif +352x288 +@item 4cif +704x576 +@item 16cif +1408x1152 +@item qqvga +160x120 +@item qvga +320x240 +@item vga +640x480 +@item svga +800x600 +@item xga +1024x768 +@item uxga +1600x1200 +@item qxga +2048x1536 +@item sxga +1280x1024 +@item qsxga +2560x2048 +@item hsxga +5120x4096 +@item wvga +852x480 +@item wxga +1366x768 +@item wsxga +1600x1024 +@item wuxga +1920x1200 +@item woxga +2560x1600 +@item wqsxga +3200x2048 +@item wquxga +3840x2400 +@item whsxga +6400x4096 +@item whuxga +7680x4800 +@item cga +320x200 +@item ega +640x350 +@item hd480 +852x480 +@item hd720 +1280x720 +@item hd1080 +1920x1080 +@end table + +@item -aspect[:@var{stream_specifier}] @var{aspect} (@emph{output,per-stream}) +Set the video display aspect ratio specified by @var{aspect}. + +@var{aspect} can be a floating point number string, or a string of the +form @var{num}:@var{den}, where @var{num} and @var{den} are the +numerator and denominator of the aspect ratio. For example "4:3", +"16:9", "1.3333", and "1.7777" are valid argument values. + +@item -vn (@emph{output}) +Disable video recording. +@item -bt @var{tolerance} +Set video bitrate tolerance (in bits, default 4000k). +Has a minimum value of: (target_bitrate/target_framerate). +In 1-pass mode, bitrate tolerance specifies how far ratecontrol is +willing to deviate from the target average bitrate value. This is +not related to min/max bitrate. Lowering tolerance too much has +an adverse effect on quality. +@item -maxrate @var{bitrate} +Set max video bitrate (in bit/s). +Requires -bufsize to be set. +@item -minrate @var{bitrate} +Set min video bitrate (in bit/s). +Most useful in setting up a CBR encode: +@example +avconv -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v +@end example +It is of little use elsewise. +@item -bufsize @var{size} +Set video buffer verifier buffer size (in bits). +@item -vcodec @var{codec} (@emph{output}) +Set the video codec. This is an alias for @code{-codec:v}. +@item -same_quant +Use same quantizer as source (implies VBR). + +Note that this is NOT SAME QUALITY. Do not use this option unless you know you +need it. + +@item -pass @var{n} +Select the pass number (1 or 2). It is used to do two-pass +video encoding. The statistics of the video are recorded in the first +pass into a log file (see also the option -passlogfile), +and in the second pass that log file is used to generate the video +at the exact requested bitrate. +On pass 1, you may just deactivate audio and set output to null, +examples for Windows and Unix: +@example +avconv -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y NUL +avconv -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y /dev/null +@end example + +@item -passlogfile @var{prefix} (@emph{global}) +Set two-pass log file name prefix to @var{prefix}, the default file name +prefix is ``av2pass''. The complete file name will be +@file{PREFIX-N.log}, where N is a number specific to the output +stream. + +@item -vf @var{filter_graph} (@emph{output}) +@var{filter_graph} is a description of the filter graph to apply to +the input video. +Use the option "-filters" to show all the available filters (including +also sources and sinks). This is an alias for @code{-filter:v}. + +@end table + +@section Advanced Video Options + +@table @option +@item -pix_fmt[:@var{stream_specifier}] @var{format} (@emph{input/output,per-stream}) +Set pixel format. Use @code{-pix_fmts} to show all the supported +pixel formats. +@item -sws_flags @var{flags} (@emph{input/output}) +Set SwScaler flags. +@item -g @var{gop_size} +Set the group of pictures size. +@item -vdt @var{n} +Discard threshold. +@item -qmin @var{q} +minimum video quantizer scale (VBR) +@item -qmax @var{q} +maximum video quantizer scale (VBR) +@item -qdiff @var{q} +maximum difference between the quantizer scales (VBR) +@item -qblur @var{blur} +video quantizer scale blur (VBR) (range 0.0 - 1.0) +@item -qcomp @var{compression} +video quantizer scale compression (VBR) (default 0.5). +Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0-1.0 + +@item -lmin @var{lambda} +minimum video lagrange factor (VBR) +@item -lmax @var{lambda} +max video lagrange factor (VBR) +@item -mblmin @var{lambda} +minimum macroblock quantizer scale (VBR) +@item -mblmax @var{lambda} +maximum macroblock quantizer scale (VBR) + +These four options (lmin, lmax, mblmin, mblmax) use 'lambda' units, +but you may use the QP2LAMBDA constant to easily convert from 'q' units: +@example +avconv -i src.ext -lmax 21*QP2LAMBDA dst.ext +@end example + +@item -rc_init_cplx @var{complexity} +initial complexity for single pass encoding +@item -b_qfactor @var{factor} +qp factor between P- and B-frames +@item -i_qfactor @var{factor} +qp factor between P- and I-frames +@item -b_qoffset @var{offset} +qp offset between P- and B-frames +@item -i_qoffset @var{offset} +qp offset between P- and I-frames +@item -rc_eq @var{equation} +Set rate control equation (see section "Expression Evaluation") +(default = @code{tex^qComp}). + +When computing the rate control equation expression, besides the +standard functions defined in the section "Expression Evaluation", the +following functions are available: +@table @var +@item bits2qp(bits) +@item qp2bits(qp) +@end table + +and the following constants are available: +@table @var +@item iTex +@item pTex +@item tex +@item mv +@item fCode +@item iCount +@item mcVar +@item var +@item isI +@item isP +@item isB +@item avgQP +@item qComp +@item avgIITex +@item avgPITex +@item avgPPTex +@item avgBPTex +@item avgTex +@end table + +@item -rc_override[:@var{stream_specifier}] @var{override} (@emph{output,per-stream}) +rate control override for specific intervals +@item -me_method @var{method} +Set motion estimation method to @var{method}. +Available methods are (from lowest to best quality): +@table @samp +@item zero +Try just the (0, 0) vector. +@item phods +@item log +@item x1 +@item hex +@item umh +@item epzs +(default method) +@item full +exhaustive search (slow and marginally better than epzs) +@end table + +@item -er @var{n} +Set error resilience to @var{n}. +@table @samp +@item 1 +FF_ER_CAREFUL (default) +@item 2 +FF_ER_COMPLIANT +@item 3 +FF_ER_AGGRESSIVE +@item 4 +FF_ER_VERY_AGGRESSIVE +@end table + +@item -ec @var{bit_mask} +Set error concealment to @var{bit_mask}. @var{bit_mask} is a bit mask of +the following values: +@table @samp +@item 1 +FF_EC_GUESS_MVS (default = enabled) +@item 2 +FF_EC_DEBLOCK (default = enabled) +@end table + +@item -bf @var{frames} +Use 'frames' B-frames (supported for MPEG-1, MPEG-2 and MPEG-4). +@item -mbd @var{mode} +macroblock decision +@table @samp +@item 0 +FF_MB_DECISION_SIMPLE: Use mb_cmp (cannot change it yet in avconv). +@item 1 +FF_MB_DECISION_BITS: Choose the one which needs the fewest bits. +@item 2 +FF_MB_DECISION_RD: rate distortion +@end table + +@item -bug @var{param} +Work around encoder bugs that are not auto-detected. +@item -strict @var{strictness} +How strictly to follow the standards. + +@item -deinterlace +Deinterlace pictures. +@item -vstats +Dump video coding statistics to @file{vstats_HHMMSS.log}. +@item -vstats_file @var{file} +Dump video coding statistics to @var{file}. +@item -top[:@var{stream_specifier}] @var{n} (@emph{output,per-stream}) +top=1/bottom=0/auto=-1 field first +@item -dc @var{precision} +Intra_dc_precision. +@item -vtag @var{fourcc/tag} (@emph{output}) +Force video tag/fourcc. This is an alias for @code{-tag:v}. +@item -qphist (@emph{global}) +Show QP histogram. +@item -force_key_frames[:@var{stream_specifier}] @var{time}[,@var{time}...] (@emph{output,per-stream}) +Force key frames at the specified timestamps, more precisely at the first +frames after each specified time. +This option can be useful to ensure that a seek point is present at a +chapter mark or any other designated place in the output file. +The timestamps must be specified in ascending order. + +@item -copyinkf[:@var{stream_specifier}] (@emph{output,per-stream}) +When doing stream copy, copy also non-key frames found at the +beginning. +@end table + +@section Audio Options + +@table @option +@item -aframes @var{number} (@emph{output}) +Set the number of audio frames to record. This is an alias for @code{-frames:a}. +@item -ar[:@var{stream_specifier}] @var{freq} (@emph{input/output,per-stream}) +Set the audio sampling frequency. For output streams it is set by +default to the frequency of the corresponding input stream. For input +streams this option only makes sense for audio grabbing devices and raw +demuxers and is mapped to the corresponding demuxer options. +@item -aq @var{q} (@emph{output}) +Set the audio quality (codec-specific, VBR). This is an alias for -q:a. +@item -ac[:@var{stream_specifier}] @var{channels} (@emph{input/output,per-stream}) +Set the number of audio channels. For output streams it is set by +default to the number of input audio channels. For input streams +this option only makes sense for audio grabbing devices and raw demuxers +and is mapped to the corresponding demuxer options. +@item -an (@emph{output}) +Disable audio recording. +@item -acodec @var{codec} (@emph{input/output}) +Set the audio codec. This is an alias for @code{-codec:a}. +@item -sample_fmt[:@var{stream_specifier}] @var{sample_fmt} (@emph{output,per-stream}) +Set the audio sample format. Use @code{-sample_fmts} to get a list +of supported sample formats. +@end table + +@section Advanced Audio options: + +@table @option +@item -atag @var{fourcc/tag} (@emph{output}) +Force audio tag/fourcc. This is an alias for @code{-tag:a}. +@item -audio_service_type @var{type} +Set the type of service that the audio stream contains. +@table @option +@item ma +Main Audio Service (default) +@item ef +Effects +@item vi +Visually Impaired +@item hi +Hearing Impaired +@item di +Dialogue +@item co +Commentary +@item em +Emergency +@item vo +Voice Over +@item ka +Karaoke +@end table +@end table + +@section Subtitle options: + +@table @option +@item -scodec @var{codec} (@emph{input/output}) +Set the subtitle codec. This is an alias for @code{-codec:s}. +@item -sn (@emph{output}) +Disable subtitle recording. +@end table + +@section Audio/Video grab options + +@table @option +@item -isync (@emph{global}) +Synchronize read on input. +@end table + +@section Advanced options + +@table @option +@item -map [-]@var{input_file_id}[:@var{stream_specifier}][,@var{sync_file_id}[:@var{stream_specifier}]] (@emph{output}) + +Designate one or more input streams as a source for the output file. Each input +stream is identified by the input file index @var{input_file_id} and +the input stream index @var{input_stream_id} within the input +file. Both indices start at 0. If specified, +@var{sync_file_id}:@var{stream_specifier} sets which input stream +is used as a presentation sync reference. + +The first @code{-map} option on the command line specifies the +source for output stream 0, the second @code{-map} option specifies +the source for output stream 1, etc. + +A @code{-} character before the stream identifier creates a "negative" mapping. +It disables matching streams from already created mappings. + +For example, to map ALL streams from the first input file to output +@example +avconv -i INPUT -map 0 output +@end example + +For example, if you have two audio streams in the first input file, +these streams are identified by "0:0" and "0:1". You can use +@code{-map} to select which streams to place in an output file. For +example: +@example +avconv -i INPUT -map 0:1 out.wav +@end example +will map the input stream in @file{INPUT} identified by "0:1" to +the (single) output stream in @file{out.wav}. + +For example, to select the stream with index 2 from input file +@file{a.mov} (specified by the identifier "0:2"), and stream with +index 6 from input @file{b.mov} (specified by the identifier "1:6"), +and copy them to the output file @file{out.mov}: +@example +avconv -i a.mov -i b.mov -c copy -map 0:2 -map 1:6 out.mov +@end example + +To select all video and the third audio stream from an input file: +@example +avconv -i INPUT -map 0:v -map 0:a:2 OUTPUT +@end example + +To map all the streams except the second audio, use negative mappings +@example +avconv -i INPUT -map 0 -map -0:a:1 OUTPUT +@end example + +Note that using this option disables the default mappings for this output file. + +@item -map_metadata[:@var{metadata_spec_out}] @var{infile}[:@var{metadata_spec_in}] (@emph{output,per-metadata}) +Set metadata information of the next output file from @var{infile}. Note that +those are file indices (zero-based), not filenames. +Optional @var{metadata_spec_in/out} parameters specify, which metadata to copy. +A metadata specifier can have the following forms: +@table @option +@item @var{g} +global metadata, i.e. metadata that applies to the whole file + +@item @var{s}[:@var{stream_spec}] +per-stream metadata. @var{stream_spec} is a stream specifier as described +in the @ref{Stream specifiers} chapter. In an input metadata specifier, the first +matching stream is copied from. In an output metadata specifier, all matching +streams are copied to. + +@item @var{c}:@var{chapter_index} +per-chapter metadata. @var{chapter_index} is the zero-based chapter index. + +@item @var{p}:@var{program_index} +per-program metadata. @var{program_index} is the zero-based program index. +@end table +If metadata specifier is omitted, it defaults to global. + +By default, global metadata is copied from the first input file, +per-stream and per-chapter metadata is copied along with streams/chapters. These +default mappings are disabled by creating any mapping of the relevant type. A negative +file index can be used to create a dummy mapping that just disables automatic copying. + +For example to copy metadata from the first stream of the input file to global metadata +of the output file: +@example +avconv -i in.ogg -map_metadata 0:s:0 out.mp3 +@end example + +To do the reverse, i.e. copy global metadata to all audio streams: +@example +avconv -i in.mkv -map_metadata:s:a 0:g out.mkv +@end example +Note that simple @code{0} would work as well in this example, since global +metadata is assumed by default. + +@item -map_chapters @var{input_file_index} (@emph{output}) +Copy chapters from input file with index @var{input_file_index} to the next +output file. If no chapter mapping is specified, then chapters are copied from +the first input file with at least one chapter. Use a negative file index to +disable any chapter copying. +@item -debug +Print specific debug info. +@item -benchmark (@emph{global}) +Show benchmarking information at the end of an encode. +Shows CPU time used and maximum memory consumption. +Maximum memory consumption is not supported on all systems, +it will usually display as 0 if not supported. +@item -timelimit @var{duration} (@emph{global}) +Exit after avconv has been running for @var{duration} seconds. +@item -dump (@emph{global}) +Dump each input packet to stderr. +@item -hex (@emph{global}) +When dumping packets, also dump the payload. +@item -ps @var{size} +Set RTP payload size in bytes. +@item -re (@emph{input}) +Read input at native frame rate. Mainly used to simulate a grab device. +@item -threads @var{count} +Thread count. +@item -vsync @var{parameter} +Video sync method. + +@table @option +@item passthrough +Each frame is passed with its timestamp from the demuxer to the muxer. +@item cfr +Frames will be duplicated and dropped to achieve exactly the requested +constant framerate. +@item vfr +Frames are passed through with their timestamp or dropped so as to +prevent 2 frames from having the same timestamp. +@item auto +Chooses between 1 and 2 depending on muxer capabilities. This is the +default method. +@end table + +With -map you can select from which stream the timestamps should be +taken. You can leave either video or audio unchanged and sync the +remaining stream(s) to the unchanged one. + +@item -async @var{samples_per_second} +Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps, +the parameter is the maximum samples per second by which the audio is changed. +-async 1 is a special case where only the start of the audio stream is corrected +without any later correction. +@item -copyts +Copy timestamps from input to output. +@item -copytb +Copy input stream time base from input to output when stream copying. +@item -shortest +Finish encoding when the shortest input stream ends. +@item -dts_delta_threshold +Timestamp discontinuity delta threshold. +@item -muxdelay @var{seconds} (@emph{input}) +Set the maximum demux-decode delay. +@item -muxpreload @var{seconds} (@emph{input}) +Set the initial demux-decode delay. +@item -streamid @var{output-stream-index}:@var{new-value} (@emph{output}) +Assign a new stream-id value to an output stream. This option should be +specified prior to the output filename to which it applies. +For the situation where multiple output files exist, a streamid +may be reassigned to a different value. + +For example, to set the stream 0 PID to 33 and the stream 1 PID to 36 for +an output mpegts file: +@example +avconv -i infile -streamid 0:33 -streamid 1:36 out.ts +@end example + +@item -bsf[:@var{stream_specifier}] @var{bitstream_filters} (@emph{output,per-stream}) +Set bitstream filters for matching streams. @var{bistream_filters} is +a comma-separated list of bitstream filters. Use the @code{-bsfs} option +to get the list of bitstream filters. +@example +avconv -i h264.mp4 -c:v copy -vbsf h264_mp4toannexb -an out.h264 +@end example +@example +avconv -i file.mov -an -vn -sbsf mov2textsub -c:s copy -f rawvideo sub.txt +@end example + +@item -tag[:@var{stream_specifier}] @var{codec_tag} (@emph{output,per-stream}) +Force a tag/fourcc for matching streams. +@end table +@c man end OPTIONS + +@chapter Tips +@c man begin TIPS + +@itemize +@item +For streaming at very low bitrate application, use a low frame rate +and a small GOP size. This is especially true for RealVideo where +the Linux player does not seem to be very fast, so it can miss +frames. An example is: + +@example +avconv -g 3 -r 3 -t 10 -b 50k -s qcif -f rv10 /tmp/b.rm +@end example + +@item +The parameter 'q' which is displayed while encoding is the current +quantizer. The value 1 indicates that a very good quality could +be achieved. The value 31 indicates the worst quality. If q=31 appears +too often, it means that the encoder cannot compress enough to meet +your bitrate. You must either increase the bitrate, decrease the +frame rate or decrease the frame size. + +@item +If your computer is not fast enough, you can speed up the +compression at the expense of the compression ratio. You can use +'-me zero' to speed up motion estimation, and '-intra' to disable +motion estimation completely (you have only I-frames, which means it +is about as good as JPEG compression). + +@item +To have very low audio bitrates, reduce the sampling frequency +(down to 22050 Hz for MPEG audio, 22050 or 11025 for AC-3). + +@item +To have a constant quality (but a variable bitrate), use the option +'-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst +quality). + +@end itemize +@c man end TIPS + +@chapter Examples +@c man begin EXAMPLES + +@section Preset files + +A preset file contains a sequence of @var{option=value} pairs, one for +each line, specifying a sequence of options which can be specified also on +the command line. Lines starting with the hash ('#') character are ignored and +are used to provide comments. Empty lines are also ignored. Check the +@file{presets} directory in the Libav source tree for examples. + +Preset files are specified with the @code{pre} option, this option takes a +preset name as input. Avconv searches for a file named @var{preset_name}.avpreset in +the directories @file{$AVCONV_DATADIR} (if set), and @file{$HOME/.avconv}, and in +the data directory defined at configuration time (usually @file{$PREFIX/share/avconv}) +in that order. For example, if the argument is @code{libx264-max}, it will +search for the file @file{libx264-max.avpreset}. + +@section Video and Audio grabbing + +If you specify the input format and device then avconv can grab video +and audio directly. + +@example +avconv -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg +@end example + +Note that you must activate the right video source and channel before +launching avconv with any TV viewer such as +@uref{http://linux.bytesex.org/xawtv/, xawtv} by Gerd Knorr. You also +have to set the audio recording levels correctly with a +standard mixer. + +@section X11 grabbing + +Grab the X11 display with avconv via + +@example +avconv -f x11grab -s cif -r 25 -i :0.0 /tmp/out.mpg +@end example + +0.0 is display.screen number of your X11 server, same as +the DISPLAY environment variable. + +@example +avconv -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg +@end example + +0.0 is display.screen number of your X11 server, same as the DISPLAY environment +variable. 10 is the x-offset and 20 the y-offset for the grabbing. + +@section Video and Audio file format conversion + +Any supported file format and protocol can serve as input to avconv: + +Examples: +@itemize +@item +You can use YUV files as input: + +@example +avconv -i /tmp/test%d.Y /tmp/out.mpg +@end example + +It will use the files: +@example +/tmp/test0.Y, /tmp/test0.U, /tmp/test0.V, +/tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc... +@end example + +The Y files use twice the resolution of the U and V files. They are +raw files, without header. They can be generated by all decent video +decoders. You must specify the size of the image with the @option{-s} option +if avconv cannot guess it. + +@item +You can input from a raw YUV420P file: + +@example +avconv -i /tmp/test.yuv /tmp/out.avi +@end example + +test.yuv is a file containing raw YUV planar data. Each frame is composed +of the Y plane followed by the U and V planes at half vertical and +horizontal resolution. + +@item +You can output to a raw YUV420P file: + +@example +avconv -i mydivx.avi hugefile.yuv +@end example + +@item +You can set several input files and output files: + +@example +avconv -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg +@end example + +Converts the audio file a.wav and the raw YUV video file a.yuv +to MPEG file a.mpg. + +@item +You can also do audio and video conversions at the same time: + +@example +avconv -i /tmp/a.wav -ar 22050 /tmp/a.mp2 +@end example + +Converts a.wav to MPEG audio at 22050 Hz sample rate. + +@item +You can encode to several formats at the same time and define a +mapping from input stream to output streams: + +@example +avconv -i /tmp/a.wav -map 0:a -b 64k /tmp/a.mp2 -map 0:a -b 128k /tmp/b.mp2 +@end example + +Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. '-map +file:index' specifies which input stream is used for each output +stream, in the order of the definition of output streams. + +@item +You can transcode decrypted VOBs: + +@example +avconv -i snatch_1.vob -f avi -c:v mpeg4 -b:v 800k -g 300 -bf 2 -c:a libmp3lame -b:a 128k snatch.avi +@end example + +This is a typical DVD ripping example; the input is a VOB file, the +output an AVI file with MPEG-4 video and MP3 audio. Note that in this +command we use B-frames so the MPEG-4 stream is DivX5 compatible, and +GOP size is 300 which means one intra frame every 10 seconds for 29.97fps +input video. Furthermore, the audio stream is MP3-encoded so you need +to enable LAME support by passing @code{--enable-libmp3lame} to configure. +The mapping is particularly useful for DVD transcoding +to get the desired audio language. + +NOTE: To see the supported input formats, use @code{avconv -formats}. + +@item +You can extract images from a video, or create a video from many images: + +For extracting images from a video: +@example +avconv -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg +@end example + +This will extract one video frame per second from the video and will +output them in files named @file{foo-001.jpeg}, @file{foo-002.jpeg}, +etc. Images will be rescaled to fit the new WxH values. + +If you want to extract just a limited number of frames, you can use the +above command in combination with the -vframes or -t option, or in +combination with -ss to start extracting from a certain point in time. + +For creating a video from many images: +@example +avconv -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi +@end example + +The syntax @code{foo-%03d.jpeg} specifies to use a decimal number +composed of three digits padded with zeroes to express the sequence +number. It is the same syntax supported by the C printf function, but +only formats accepting a normal integer are suitable. + +@item +You can put many streams of the same type in the output: + +@example +avconv -i test1.avi -i test2.avi -map 0.3 -map 0.2 -map 0.1 -map 0.0 -c copy test12.nut +@end example + +The resulting output file @file{test12.avi} will contain first four streams from +the input file in reverse order. + +@end itemize +@c man end EXAMPLES + +@include eval.texi +@include encoders.texi +@include demuxers.texi +@include muxers.texi +@include indevs.texi +@include outdevs.texi +@include protocols.texi +@include bitstream_filters.texi +@include filters.texi +@include metadata.texi + +@ignore + +@setfilename avconv +@settitle avconv video converter + +@c man begin SEEALSO +avplay(1), avprobe(1) and the Libav HTML documentation +@c man end + +@c man begin AUTHORS +The Libav developers +@c man end + +@end ignore + +@bye diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avplay.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avplay.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avplay.texi 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avplay.texi 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,184 @@ +\input texinfo @c -*- texinfo -*- + +@settitle avplay Documentation +@titlepage +@center @titlefont{avplay Documentation} +@end titlepage + +@top + +@contents + +@chapter Synopsis + +@example +@c man begin SYNOPSIS +avplay [options] @file{input_file} +@c man end +@end example + +@chapter Description +@c man begin DESCRIPTION + +AVplay is a very simple and portable media player using the Libav +libraries and the SDL library. It is mostly used as a testbed for the +various Libav APIs. +@c man end + +@chapter Options +@c man begin OPTIONS + +@include avtools-common-opts.texi + +@section Main options + +@table @option +@item -x @var{width} +Force displayed width. +@item -y @var{height} +Force displayed height. +@item -s @var{size} +This option has been removed. Use private format options for specifying the +input video size. For example with the rawvideo demuxer you need to specify the +option @var{video_size}. +@item -an +Disable audio. +@item -vn +Disable video. +@item -ss @var{pos} +Seek to a given position in seconds. +@item -t @var{duration} +play seconds of audio/video +@item -bytes +Seek by bytes. +@item -nodisp +Disable graphical display. +@item -f @var{fmt} +Force format. +@item -window_title @var{title} +Set window title (default is the input filename). +@item -loop @var{number} +Loops movie playback times. 0 means forever. +@item -vf @var{filter_graph} +@var{filter_graph} is a description of the filter graph to apply to +the input video. +Use the option "-filters" to show all the available filters (including +also sources and sinks). + +@end table + +@section Advanced options +@table @option +@item -pix_fmt @var{format} +This option has been removed. Use private options for specifying the +input pixel format. For example with the rawvideo demuxer you need to specify +the option @var{pixel_format}. +@item -stats +Show the stream duration, the codec parameters, the current position in +the stream and the audio/video synchronisation drift. +@item -debug +Print specific debug info. +@item -bug +Work around bugs. +@item -vismv +Visualize motion vectors. +@item -fast +Non-spec-compliant optimizations. +@item -genpts +Generate pts. +@item -rtp_tcp +Force RTP/TCP protocol usage instead of RTP/UDP. It is only meaningful +if you are streaming with the RTSP protocol. +@item -sync @var{type} +Set the master clock to audio (@code{type=audio}), video +(@code{type=video}) or external (@code{type=ext}). Default is audio. The +master clock is used to control audio-video synchronization. Most media +players use audio as master clock, but in some cases (streaming or high +quality broadcast) it is necessary to change that. This option is mainly +used for debugging purposes. +@item -threads @var{count} +Set the thread count. +@item -ast @var{audio_stream_number} +Select the desired audio stream number, counting from 0. The number +refers to the list of all the input audio streams. If it is greater +than the number of audio streams minus one, then the last one is +selected, if it is negative the audio playback is disabled. +@item -vst @var{video_stream_number} +Select the desired video stream number, counting from 0. The number +refers to the list of all the input video streams. If it is greater +than the number of video streams minus one, then the last one is +selected, if it is negative the video playback is disabled. +@item -sst @var{subtitle_stream_number} +Select the desired subtitle stream number, counting from 0. The number +refers to the list of all the input subtitle streams. If it is greater +than the number of subtitle streams minus one, then the last one is +selected, if it is negative the subtitle rendering is disabled. +@item -autoexit +Exit when video is done playing. +@item -exitonkeydown +Exit if any key is pressed. +@item -exitonmousedown +Exit if any mouse button is pressed. +@end table + +@section While playing + +@table @key +@item q, ESC +Quit. + +@item f +Toggle full screen. + +@item p, SPC +Pause. + +@item a +Cycle audio channel. + +@item v +Cycle video channel. + +@item t +Cycle subtitle channel. + +@item w +Show audio waves. + +@item left/right +Seek backward/forward 10 seconds. + +@item down/up +Seek backward/forward 1 minute. + +@item mouse click +Seek to percentage in file corresponding to fraction of width. + +@end table + +@c man end + +@include eval.texi +@include demuxers.texi +@include muxers.texi +@include indevs.texi +@include outdevs.texi +@include protocols.texi +@include filters.texi + +@ignore + +@setfilename avplay +@settitle AVplay media player + +@c man begin SEEALSO +avconv(1), avprobe(1) and the Libav HTML documentation +@c man end + +@c man begin AUTHORS +The Libav developers +@c man end + +@end ignore + +@bye diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avprobe.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avprobe.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avprobe.texi 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avprobe.texi 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,134 @@ +\input texinfo @c -*- texinfo -*- + +@settitle avprobe Documentation +@titlepage +@center @titlefont{avprobe Documentation} +@end titlepage + +@top + +@contents + +@chapter Synopsis + +The generic syntax is: + +@example +@c man begin SYNOPSIS +avprobe [options] [@file{input_file}] +@c man end +@end example + +@chapter Description +@c man begin DESCRIPTION + +avprobe gathers information from multimedia streams and prints it in +human- and machine-readable fashion. + +For example it can be used to check the format of the container used +by a multimedia stream and the format and type of each media stream +contained in it. + +If a filename is specified in input, avprobe will try to open and +probe the file content. If the file cannot be opened or recognized as +a multimedia file, a positive exit code is returned. + +avprobe may be employed both as a standalone application or in +combination with a textual filter, which may perform more +sophisticated processing, e.g. statistical processing or plotting. + +Options are used to list some of the formats supported by avprobe or +for specifying which information to display, and for setting how +avprobe will show it. + +avprobe output is designed to be easily parsable by a textual filter, +and consists of one or more sections of the form: +@example +[SECTION] +key1=val1 +... +keyN=valN +[/SECTION] +@end example + +Metadata tags stored in the container or in the streams are recognized +and printed in the corresponding "FORMAT" or "STREAM" section, and +are prefixed by the string "TAG:". + +@c man end + +@chapter Options +@c man begin OPTIONS + +@include avtools-common-opts.texi + +@section Main options + +@table @option + +@item -f @var{format} +Force format to use. + +@item -unit +Show the unit of the displayed values. + +@item -prefix +Use SI prefixes for the displayed values. +Unless the "-byte_binary_prefix" option is used all the prefixes +are decimal. + +@item -byte_binary_prefix +Force the use of binary prefixes for byte values. + +@item -sexagesimal +Use sexagesimal format HH:MM:SS.MICROSECONDS for time values. + +@item -pretty +Prettify the format of the displayed values, it corresponds to the +options "-unit -prefix -byte_binary_prefix -sexagesimal". + +@item -show_format +Show information about the container format of the input multimedia +stream. + +All the container format information is printed within a section with +name "FORMAT". + +@item -show_packets +Show information about each packet contained in the input multimedia +stream. + +The information for each single packet is printed within a dedicated +section with name "PACKET". + +@item -show_streams +Show information about each media stream contained in the input +multimedia stream. + +Each media stream information is printed within a dedicated section +with name "STREAM". + +@end table +@c man end + +@include demuxers.texi +@include muxers.texi +@include protocols.texi +@include indevs.texi + +@ignore + +@setfilename avprobe +@settitle avprobe media prober + +@c man begin SEEALSO +avconv(1), avplay(1) and the Libav HTML documentation +@c man end + +@c man begin AUTHORS +The Libav developers +@c man end + +@end ignore + +@bye diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avserver.conf mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avserver.conf --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avserver.conf 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avserver.conf 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,377 @@ +# Port on which the server is listening. You must select a different +# port from your standard HTTP web server if it is running on the same +# computer. +Port 8090 + +# Address on which the server is bound. Only useful if you have +# several network interfaces. +BindAddress 0.0.0.0 + +# Number of simultaneous HTTP connections that can be handled. It has +# to be defined *before* the MaxClients parameter, since it defines the +# MaxClients maximum limit. +MaxHTTPConnections 2000 + +# Number of simultaneous requests that can be handled. Since AVServer +# is very fast, it is more likely that you will want to leave this high +# and use MaxBandwidth, below. +MaxClients 1000 + +# This the maximum amount of kbit/sec that you are prepared to +# consume when streaming to clients. +MaxBandwidth 1000 + +# Access log file (uses standard Apache log file format) +# '-' is the standard output. +CustomLog - + +# Suppress that if you want to launch avserver as a daemon. +NoDaemon + + +################################################################## +# Definition of the live feeds. Each live feed contains one video +# and/or audio sequence coming from an ffmpeg encoder or another +# avserver. This sequence may be encoded simultaneously with several +# codecs at several resolutions. + + + +# You must use 'ffmpeg' to send a live feed to avserver. In this +# example, you can type: +# +# ffmpeg http://localhost:8090/feed1.ffm + +# avserver can also do time shifting. It means that it can stream any +# previously recorded live stream. The request should contain: +# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify +# a path where the feed is stored on disk. You also specify the +# maximum size of the feed, where zero means unlimited. Default: +# File=/tmp/feed_name.ffm FileMaxSize=5M +File /tmp/feed1.ffm +FileMaxSize 200K + +# You could specify +# ReadOnlyFile /saved/specialvideo.ffm +# This marks the file as readonly and it will not be deleted or updated. + +# Specify launch in order to start ffmpeg automatically. +# First ffmpeg must be defined with an appropriate path if needed, +# after that options can follow, but avoid adding the http:// field +#Launch ffmpeg + +# Only allow connections from localhost to the feed. +ACL allow 127.0.0.1 + + + + +################################################################## +# Now you can define each stream which will be generated from the +# original audio and video stream. Each format has a filename (here +# 'test1.mpg'). AVServer will send this stream when answering a +# request containing this filename. + + + +# coming from live feed 'feed1' +Feed feed1.ffm + +# Format of the stream : you can choose among: +# mpeg : MPEG-1 multiplexed video and audio +# mpegvideo : only MPEG-1 video +# mp2 : MPEG-2 audio (use AudioCodec to select layer 2 and 3 codec) +# ogg : Ogg format (Vorbis audio codec) +# rm : RealNetworks-compatible stream. Multiplexed audio and video. +# ra : RealNetworks-compatible stream. Audio only. +# mpjpeg : Multipart JPEG (works with Netscape without any plugin) +# jpeg : Generate a single JPEG image. +# asf : ASF compatible streaming (Windows Media Player format). +# swf : Macromedia Flash compatible stream +# avi : AVI format (MPEG-4 video, MPEG audio sound) +Format mpeg + +# Bitrate for the audio stream. Codecs usually support only a few +# different bitrates. +AudioBitRate 32 + +# Number of audio channels: 1 = mono, 2 = stereo +AudioChannels 1 + +# Sampling frequency for audio. When using low bitrates, you should +# lower this frequency to 22050 or 11025. The supported frequencies +# depend on the selected audio codec. +AudioSampleRate 44100 + +# Bitrate for the video stream +VideoBitRate 64 + +# Ratecontrol buffer size +VideoBufferSize 40 + +# Number of frames per second +VideoFrameRate 3 + +# Size of the video frame: WxH (default: 160x128) +# The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga, +# qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga, +# wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720, +# hd1080 +VideoSize 160x128 + +# Transmit only intra frames (useful for low bitrates, but kills frame rate). +#VideoIntraOnly + +# If non-intra only, an intra frame is transmitted every VideoGopSize +# frames. Video synchronization can only begin at an intra frame. +VideoGopSize 12 + +# More MPEG-4 parameters +# VideoHighQuality +# Video4MotionVector + +# Choose your codecs: +#AudioCodec mp2 +#VideoCodec mpeg1video + +# Suppress audio +#NoAudio + +# Suppress video +#NoVideo + +#VideoQMin 3 +#VideoQMax 31 + +# Set this to the number of seconds backwards in time to start. Note that +# most players will buffer 5-10 seconds of video, and also you need to allow +# for a keyframe to appear in the data stream. +#Preroll 15 + +# ACL: + +# You can allow ranges of addresses (or single addresses) +#ACL ALLOW + +# You can deny ranges of addresses (or single addresses) +#ACL DENY + +# You can repeat the ACL allow/deny as often as you like. It is on a per +# stream basis. The first match defines the action. If there are no matches, +# then the default is the inverse of the last ACL statement. +# +# Thus 'ACL allow localhost' only allows access from localhost. +# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and +# allow everybody else. + + + + +################################################################## +# Example streams + + +# Multipart JPEG + +# +#Feed feed1.ffm +#Format mpjpeg +#VideoFrameRate 2 +#VideoIntraOnly +#NoAudio +#Strict -1 +# + + +# Single JPEG + +# +#Feed feed1.ffm +#Format jpeg +#VideoFrameRate 2 +#VideoIntraOnly +##VideoSize 352x240 +#NoAudio +#Strict -1 +# + + +# Flash + +# +#Feed feed1.ffm +#Format swf +#VideoFrameRate 2 +#VideoIntraOnly +#NoAudio +# + + +# ASF compatible + + +Feed feed1.ffm +Format asf +VideoFrameRate 15 +VideoSize 352x240 +VideoBitRate 256 +VideoBufferSize 40 +VideoGopSize 30 +AudioBitRate 64 +StartSendOnKey + + + +# MP3 audio + +# +#Feed feed1.ffm +#Format mp2 +#AudioCodec mp3 +#AudioBitRate 64 +#AudioChannels 1 +#AudioSampleRate 44100 +#NoVideo +# + + +# Ogg Vorbis audio + +# +#Feed feed1.ffm +#Title "Stream title" +#AudioBitRate 64 +#AudioChannels 2 +#AudioSampleRate 44100 +#NoVideo +# + + +# Real with audio only at 32 kbits + +# +#Feed feed1.ffm +#Format rm +#AudioBitRate 32 +#NoVideo +#NoAudio +# + + +# Real with audio and video at 64 kbits + +# +#Feed feed1.ffm +#Format rm +#AudioBitRate 32 +#VideoBitRate 128 +#VideoFrameRate 25 +#VideoGopSize 25 +#NoAudio +# + + +################################################################## +# A stream coming from a file: you only need to set the input +# filename and optionally a new format. Supported conversions: +# AVI -> ASF + +# +#File "/usr/local/httpd/htdocs/tlive.rm" +#NoAudio +# + +# +#File "/usr/local/httpd/htdocs/test.asf" +#NoAudio +#Author "Me" +#Copyright "Super MegaCorp" +#Title "Test stream from disk" +#Comment "Test comment" +# + + +################################################################## +# RTSP examples +# +# You can access this stream with the RTSP URL: +# rtsp://localhost:5454/test1-rtsp.mpg +# +# A non-standard RTSP redirector is also created. Its URL is: +# http://localhost:8090/test1-rtsp.rtsp + +# +#Format rtp +#File "/usr/local/httpd/htdocs/test1.mpg" +# + + +# Transcode an incoming live feed to another live feed, +# using libx264 and video presets + +# +#Format rtp +#Feed feed1.ffm +#VideoCodec libx264 +#VideoFrameRate 24 +#VideoBitRate 100 +#VideoSize 480x272 +#AVPresetVideo default +#AVPresetVideo baseline +#AVOptionVideo flags +global_header +# +#AudioCodec libfaac +#AudioBitRate 32 +#AudioChannels 2 +#AudioSampleRate 22050 +#AVOptionAudio flags +global_header +# + +################################################################## +# SDP/multicast examples +# +# If you want to send your stream in multicast, you must set the +# multicast address with MulticastAddress. The port and the TTL can +# also be set. +# +# An SDP file is automatically generated by avserver by adding the +# 'sdp' extension to the stream name (here +# http://localhost:8090/test1-sdp.sdp). You should usually give this +# file to your player to play the stream. +# +# The 'NoLoop' option can be used to avoid looping when the stream is +# terminated. + +# +#Format rtp +#File "/usr/local/httpd/htdocs/test1.mpg" +#MulticastAddress 224.124.0.1 +#MulticastPort 5000 +#MulticastTTL 16 +#NoLoop +# + + +################################################################## +# Special streams + +# Server status + + +Format status + +# Only allow local people to get the status +ACL allow localhost +ACL allow 192.168.0.0 192.168.255.255 + +#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico + + + +# Redirect index.html to the appropriate site + + +URL http://www.libav.org/ + + + diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avserver.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avserver.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avserver.texi 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avserver.texi 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,282 @@ +\input texinfo @c -*- texinfo -*- + +@settitle avserver Documentation +@titlepage +@center @titlefont{avserver Documentation} +@end titlepage + +@top + +@contents + +@chapter Synopsys + +The generic syntax is: + +@example +@c man begin SYNOPSIS +avserver [options] +@c man end +@end example + +@chapter Description +@c man begin DESCRIPTION + +WARNING: avserver is unmaintained, largely broken and in need of a +complete rewrite. It probably won't work for you. Use at your own +risk. + +avserver is a streaming server for both audio and video. It supports +several live feeds, streaming from files and time shifting on live feeds +(you can seek to positions in the past on each live feed, provided you +specify a big enough feed storage in avserver.conf). + +avserver runs in daemon mode by default; that is, it puts itself in +the background and detaches from its TTY, unless it is launched in +debug mode or a NoDaemon option is specified in the configuration +file. + +This documentation covers only the streaming aspects of avserver / +avconv. All questions about parameters for avconv, codec questions, +etc. are not covered here. Read @file{avconv.html} for more +information. + +@section How does it work? + +avserver receives prerecorded files or FFM streams from some avconv +instance as input, then streams them over RTP/RTSP/HTTP. + +An avserver instance will listen on some port as specified in the +configuration file. You can launch one or more instances of avconv and +send one or more FFM streams to the port where avserver is expecting +to receive them. Alternately, you can make avserver launch such avconv +instances at startup. + +Input streams are called feeds, and each one is specified by a +section in the configuration file. + +For each feed you can have different output streams in various +formats, each one specified by a section in the configuration +file. + +@section Status stream + +avserver supports an HTTP interface which exposes the current status +of the server. + +Simply point your browser to the address of the special status stream +specified in the configuration file. + +For example if you have: +@example + +Format status + +# Only allow local people to get the status +ACL allow localhost +ACL allow 192.168.0.0 192.168.255.255 + +@end example + +then the server will post a page with the status information when +the special stream @file{status.html} is requested. + +@section What can this do? + +When properly configured and running, you can capture video and audio in real +time from a suitable capture card, and stream it out over the Internet to +either Windows Media Player or RealAudio player (with some restrictions). + +It can also stream from files, though that is currently broken. Very often, a +web server can be used to serve up the files just as well. + +It can stream prerecorded video from .ffm files, though it is somewhat tricky +to make it work correctly. + +@section What do I need? + +I use Linux on a 900 MHz Duron with a cheapo Bt848 based TV capture card. I'm +using stock Linux 2.4.17 with the stock drivers. [Actually that isn't true, +I needed some special drivers for my motherboard-based sound card.] + +I understand that FreeBSD systems work just fine as well. + +@section How do I make it work? + +First, build the kit. It *really* helps to have installed LAME first. Then when +you run the avserver ./configure, make sure that you have the +@code{--enable-libmp3lame} flag turned on. + +LAME is important as it allows for streaming audio to Windows Media Player. +Don't ask why the other audio types do not work. + +As a simple test, just run the following two command lines where INPUTFILE +is some file which you can decode with avconv: + +@example +./avserver -f doc/avserver.conf & +./avconv -i INPUTFILE http://localhost:8090/feed1.ffm +@end example + +At this point you should be able to go to your Windows machine and fire up +Windows Media Player (WMP). Go to Open URL and enter + +@example + http://:8090/test.asf +@end example + +You should (after a short delay) see video and hear audio. + +WARNING: trying to stream test1.mpg doesn't work with WMP as it tries to +transfer the entire file before starting to play. +The same is true of AVI files. + +@section What happens next? + +You should edit the avserver.conf file to suit your needs (in terms of +frame rates etc). Then install avserver and avconv, write a script to start +them up, and off you go. + +@section Troubleshooting + +@subsection I don't hear any audio, but video is fine. + +Maybe you didn't install LAME, or got your ./configure statement wrong. Check +the avconv output to see if a line referring to MP3 is present. If not, then +your configuration was incorrect. If it is, then maybe your wiring is not +set up correctly. Maybe the sound card is not getting data from the right +input source. Maybe you have a really awful audio interface (like I do) +that only captures in stereo and also requires that one channel be flipped. +If you are one of these people, then export 'AUDIO_FLIP_LEFT=1' before +starting avconv. + +@subsection The audio and video lose sync after a while. + +Yes, they do. + +@subsection After a long while, the video update rate goes way down in WMP. + +Yes, it does. Who knows why? + +@subsection WMP 6.4 behaves differently to WMP 7. + +Yes, it does. Any thoughts on this would be gratefully received. These +differences extend to embedding WMP into a web page. [There are two +object IDs that you can use: The old one, which does not play well, and +the new one, which does (both tested on the same system). However, +I suspect that the new one is not available unless you have installed WMP 7]. + +@section What else can it do? + +You can replay video from .ffm files that was recorded earlier. +However, there are a number of caveats, including the fact that the +avserver parameters must match the original parameters used to record the +file. If they do not, then avserver deletes the file before recording into it. +(Now that I write this, it seems broken). + +You can fiddle with many of the codec choices and encoding parameters, and +there are a bunch more parameters that you cannot control. Post a message +to the mailing list if there are some 'must have' parameters. Look in +avserver.conf for a list of the currently available controls. + +It will automatically generate the ASX or RAM files that are often used +in browsers. These files are actually redirections to the underlying ASF +or RM file. The reason for this is that the browser often fetches the +entire file before starting up the external viewer. The redirection files +are very small and can be transferred quickly. [The stream itself is +often 'infinite' and thus the browser tries to download it and never +finishes.] + +@section Tips + +* When you connect to a live stream, most players (WMP, RA, etc) want to +buffer a certain number of seconds of material so that they can display the +signal continuously. However, avserver (by default) starts sending data +in realtime. This means that there is a pause of a few seconds while the +buffering is being done by the player. The good news is that this can be +cured by adding a '?buffer=5' to the end of the URL. This means that the +stream should start 5 seconds in the past -- and so the first 5 seconds +of the stream are sent as fast as the network will allow. It will then +slow down to real time. This noticeably improves the startup experience. + +You can also add a 'Preroll 15' statement into the avserver.conf that will +add the 15 second prebuffering on all requests that do not otherwise +specify a time. In addition, avserver will skip frames until a key_frame +is found. This further reduces the startup delay by not transferring data +that will be discarded. + +* You may want to adjust the MaxBandwidth in the avserver.conf to limit +the amount of bandwidth consumed by live streams. + +@section Why does the ?buffer / Preroll stop working after a time? + +It turns out that (on my machine at least) the number of frames successfully +grabbed is marginally less than the number that ought to be grabbed. This +means that the timestamp in the encoded data stream gets behind realtime. +This means that if you say 'Preroll 10', then when the stream gets 10 +or more seconds behind, there is no Preroll left. + +Fixing this requires a change in the internals of how timestamps are +handled. + +@section Does the @code{?date=} stuff work. + +Yes (subject to the limitation outlined above). Also note that whenever you +start avserver, it deletes the ffm file (if any parameters have changed), +thus wiping out what you had recorded before. + +The format of the @code{?date=xxxxxx} is fairly flexible. You should use one +of the following formats (the 'T' is literal): + +@example +* YYYY-MM-DDTHH:MM:SS (localtime) +* YYYY-MM-DDTHH:MM:SSZ (UTC) +@end example + +You can omit the YYYY-MM-DD, and then it refers to the current day. However +note that @samp{?date=16:00:00} refers to 16:00 on the current day -- this +may be in the future and so is unlikely to be useful. + +You use this by adding the ?date= to the end of the URL for the stream. +For example: @samp{http://localhost:8080/test.asf?date=2002-07-26T23:05:00}. +@c man end + +@chapter Options +@c man begin OPTIONS + +@include avtools-common-opts.texi + +@section Main options + +@table @option +@item -f @var{configfile} +Use @file{configfile} instead of @file{/etc/avserver.conf}. +@item -n +Enable no-launch mode. This option disables all the Launch directives +within the various sections. Since avserver will not launch +any avconv instances, you will have to launch them manually. +@item -d +Enable debug mode. This option increases log verbosity, directs log +messages to stdout and causes avserver to run in the foreground +rather than as a daemon. +@end table +@c man end + +@ignore + +@setfilename avserver +@settitle avserver video server + +@c man begin SEEALSO + +avconv(1), avplay(1), avprobe(1), the @file{avserver.conf} +example and the Libav HTML documentation +@c man end + +@c man begin AUTHORS +The Libav developers +@c man end + +@end ignore + +@bye diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avtools-common-opts.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avtools-common-opts.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/avtools-common-opts.texi 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/avtools-common-opts.texi 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,158 @@ +All the numerical options, if not specified otherwise, accept in input +a string representing a number, which may contain one of the +International System number postfixes, for example 'K', 'M', 'G'. +If 'i' is appended after the postfix, powers of 2 are used instead of +powers of 10. The 'B' postfix multiplies the value for 8, and can be +appended after another postfix or used alone. This allows using for +example 'KB', 'MiB', 'G' and 'B' as postfix. + +Options which do not take arguments are boolean options, and set the +corresponding value to true. They can be set to false by prefixing +with "no" the option name, for example using "-nofoo" in the +command line will set to false the boolean option with name "foo". + +@anchor{Stream specifiers} +@section Stream specifiers +Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers +are used to precisely specify which stream(s) does a given option belong to. + +A stream specifier is a string generally appended to the option name and +separated from it by a colon. E.g. @code{-codec:a:1 ac3} option contains +@code{a:1} stream specifer, which matches the second audio stream. Therefore it +would select the ac3 codec for the second audio stream. + +A stream specifier can match several stream, the option is then applied to all +of them. E.g. the stream specifier in @code{-b:a 128k} matches all audio +streams. + +An empty stream specifier matches all streams, for example @code{-codec copy} +or @code{-codec: copy} would copy all the streams without reencoding. + +Possible forms of stream specifiers are: +@table @option +@item @var{stream_index} +Matches the stream with this index. E.g. @code{-threads:1 4} would set the +thread count for the second stream to 4. +@item @var{stream_type}[:@var{stream_index}] +@var{stream_type} is one of: 'v' for video, 'a' for audio, 's' for subtitle, +'d' for data and 't' for attachments. If @var{stream_index} is given, then +matches stream number @var{stream_index} of this type. Otherwise matches all +streams of this type. +@item p:@var{program_id}[:@var{stream_index}] +If @var{stream_index} is given, then matches stream number @var{stream_index} in +program with id @var{program_id}. Otherwise matches all streams in this program. +@end table +@section Generic options + +These options are shared amongst the av* tools. + +@table @option + +@item -L +Show license. + +@item -h, -?, -help, --help +Show help. + +@item -version +Show version. + +@item -formats +Show available formats. + +The fields preceding the format names have the following meanings: +@table @samp +@item D +Decoding available +@item E +Encoding available +@end table + +@item -codecs +Show available codecs. + +The fields preceding the codec names have the following meanings: +@table @samp +@item D +Decoding available +@item E +Encoding available +@item V/A/S +Video/audio/subtitle codec +@item S +Codec supports slices +@item D +Codec supports direct rendering +@item T +Codec can handle input truncated at random locations instead of only at frame boundaries +@end table + +@item -bsfs +Show available bitstream filters. + +@item -protocols +Show available protocols. + +@item -filters +Show available libavfilter filters. + +@item -pix_fmts +Show available pixel formats. + +@item -sample_fmts +Show available sample formats. + +@item -loglevel @var{loglevel} | -v @var{loglevel} +Set the logging level used by the library. +@var{loglevel} is a number or a string containing one of the following values: +@table @samp +@item quiet +@item panic +@item fatal +@item error +@item warning +@item info +@item verbose +@item debug +@end table + +By default the program logs to stderr, if coloring is supported by the +terminal, colors are used to mark errors and warnings. Log coloring +can be disabled setting the environment variable +@env{FFMPEG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting +the environment variable @env{FFMPEG_FORCE_COLOR}. +The use of the environment variable @env{NO_COLOR} is deprecated and +will be dropped in a following Libav version. + +@end table + +@section AVOptions + +These options are provided directly by the libavformat, libavdevice and +libavcodec libraries. To see the list of available AVOptions, use the +@option{-help} option. They are separated into two categories: +@table @option +@item generic +These options can be set for any container, codec or device. Generic options +are listed under AVFormatContext options for containers/devices and under +AVCodecContext options for codecs. +@item private +These options are specific to the given container, device or codec. Private +options are listed under their corresponding containers/devices/codecs. +@end table + +For example to write an ID3v2.3 header instead of a default ID3v2.4 to +an MP3 file, use the @option{id3v2_version} private option of the MP3 +muxer: +@example +avconv -i input.flac -id3v2_version 3 out.mp3 +@end example + +All codec AVOptions are obviously per-stream, so the chapter on stream +specifiers applies to them + +Note @option{-nooption} syntax cannot be used for boolean AVOptions, +use @option{-option 0}/@option{-option 1}. + +Note2 old undocumented way of specifying per-stream AVOptions by prepending +v/a/s to the options name is now obsolete and will be removed soon. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/bitstream_filters.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/bitstream_filters.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/bitstream_filters.texi 2011-03-19 06:37:12.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/bitstream_filters.texi 2012-01-11 00:34:30.000000000 +0000 @@ -34,7 +34,7 @@ e.g. by @example -ffmpeg -i ../some_mjpeg.avi -vcodec copy frames_%d.jpg +avconv -i ../some_mjpeg.avi -c:v copy frames_%d.jpg @end example Unfortunately, these chunks are incomplete JPEG images, because @@ -57,9 +57,9 @@ produce fully qualified JPEG images. @example -ffmpeg -i mjpeg-movie.avi -vcodec copy -vbsf mjpeg2jpeg frame_%d.jpg +avconv -i mjpeg-movie.avi -c:v copy -vbsf mjpeg2jpeg frame_%d.jpg exiftran -i -9 frame*.jpg -ffmpeg -i frame_%d.jpg -vcodec copy rotated.avi +avconv -i frame_%d.jpg -c:v copy rotated.avi @end example @section mjpega_dump_header diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/demuxers.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/demuxers.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/demuxers.texi 2011-04-22 04:56:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/demuxers.texi 2012-01-11 00:34:30.000000000 +0000 @@ -49,19 +49,19 @@ The size, the pixel format, and the format of each image must be the same for all the files in the sequence. -The following example shows how to use @file{ffmpeg} for creating a +The following example shows how to use @command{avconv} for creating a video from the images in the file sequence @file{img-001.jpeg}, @file{img-002.jpeg}, ..., assuming an input framerate of 10 frames per second: @example -ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi +avconv -i 'img-%03d.jpeg' -r 10 out.mkv @end example Note that the pattern must not necessarily contain "%d" or "%0@var{N}d", for example to convert a single image file @file{img.jpeg} you can employ the command: @example -ffmpeg -f image2 -i img.jpeg img.png +avconv -i img.jpeg img.png @end example @section applehttp @@ -70,7 +70,7 @@ This demuxer presents all AVStreams from all variant streams. The id field is set to the bitrate variant index number. By setting -the discard flags on AVStreams (by pressing 'a' or 'v' in ffplay), +the discard flags on AVStreams (by pressing 'a' or 'v' in avplay), the caller can decide which variant streams to actually receive. The total bitrate of the variant that the stream belongs to is available in a metadata key named "variant_bitrate". diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/developer.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/developer.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/developer.texi 2011-05-05 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/developer.texi 2012-01-11 00:34:30.000000000 +0000 @@ -17,7 +17,7 @@ decoding). Look at @file{libavcodec/apiexample.c} to see how to use it. @item libavformat is the library containing the file format handling (mux and -demux code for several formats). Look at @file{ffplay.c} to use it in a +demux code for several formats). Look at @file{avplay.c} to use it in a player. See @file{libavformat/output-example.c} to use it to generate audio or video streams. @@ -31,68 +31,88 @@ You can use Libav in your commercial program, but you must abide to the license, LGPL or GPL depending on the specific features used, please refer -to @url{http://libav.org/legal.html} for a quick checklist and to -@url{http://git.libav.org/?p=libav.git;a=blob;f=COPYING.GPLv2}, -@url{http://git.libav.org/?p=libav.git;a=blob;f=COPYING.GPLv3}, -@url{http://git.libav.org/?p=libav.git;a=blob;f=COPYING.LGPLv2.1}, -@url{http://git.libav.org/?p=libav.git;a=blob;f=COPYING.LGPLv3} for the -exact text of the licenses. +to @uref{http://libav.org/legal.html, our legal page} for a quick checklist and to +the following links for the exact text of each license: +@uref{http://git.libav.org/?p=libav.git;a=blob;f=COPYING.GPLv2, GPL version 2}, +@uref{http://git.libav.org/?p=libav.git;a=blob;f=COPYING.GPLv3, GPL version 3}, +@uref{http://git.libav.org/?p=libav.git;a=blob;f=COPYING.LGPLv2.1, LGPL version 2.1}, +@uref{http://git.libav.org/?p=libav.git;a=blob;f=COPYING.LGPLv3, LGPL version 3}. Any modification to the source code can be suggested for inclusion. -The best way to proceed is to send your patches to the Libav mailing list. +The best way to proceed is to send your patches to the +@uref{https://lists.libav.org/mailman/listinfo/libav-devel, libav-devel} +mailing list. @anchor{Coding Rules} @section Coding Rules -Libav is programmed in the ISO C90 language with a few additional -features from ISO C99, namely: +@subsection Code formatting conventions +The code is written in K&R C style. That means the following: @itemize @bullet @item -the @samp{inline} keyword; +The control statements are formatted by putting space between the statement +and parenthesis in the following way: +@example +for (i = 0; i < filter->input_count; i++) @{ +@end example @item -@samp{//} comments; +The case statement is always located at the same level as the switch itself: +@example +switch (link->init_state) @{ +case AVLINK_INIT: + continue; +case AVLINK_STARTINIT: + av_log(filter, AV_LOG_INFO, "circular filter chain detected"); + return 0; +@end example @item -designated struct initializers (@samp{struct s x = @{ .i = 17 @};}) +Braces in function declarations are written on the new line: +@example +const char *avfilter_configuration(void) +@{ + return LIBAV_CONFIGURATION; +@} +@end example @item -compound literals (@samp{x = (struct s) @{ 17, 23 @};}) +In case of a single-statement if, no curly braces are required: +@example +if (!pic || !picref) + goto fail; +@end example +@item +Do not put spaces immediately inside parentheses. @samp{if (ret)} is +a valid style; @samp{if ( ret )} is not. @end itemize -These features are supported by all compilers we care about, so we will not -accept patches to remove their use unless they absolutely do not impair -clarity and performance. - -All code must compile with GCC 2.95 and GCC 3.3. Currently, Libav also -compiles with several other compilers, such as the Compaq ccc compiler -or Sun Studio 9, and we would like to keep it that way unless it would -be exceedingly involved. To ensure compatibility, please do not use any -additional C99 features or GCC extensions. Especially watch out for: +There are the following guidelines regarding the indentation in files: @itemize @bullet @item -mixing statements and declarations; -@item -@samp{long long} (use @samp{int64_t} instead); -@item -@samp{__attribute__} not protected by @samp{#ifdef __GNUC__} or similar; -@item -GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}). -@end itemize - Indent size is 4. -The presentation is one inspired by 'indent -i4 -kr -nut'. +@item The TAB character is forbidden outside of Makefiles as is any form of trailing whitespace. Commits containing either will be rejected by the git repository. +@item +You should try to limit your code lines to 80 characters; however, do so if +and only if this improves readability. +@end itemize +The presentation is one inspired by 'indent -i4 -kr -nut'. The main priority in Libav is simplicity and small code size in order to minimize the bug count. -Comments: Use the JavaDoc/Doxygen -format (see examples below) so that code documentation +@subsection Comments +Use the JavaDoc/Doxygen format (see examples below) so that code documentation can be generated automatically. All nontrivial functions should have a comment above them explaining what the function does, even if it is just one sentence. All structures and their member variables should be documented, too. + +Avoid Qt-style and similar Doxygen syntax with @code{!} in it, i.e. replace +@code{//!} with @code{///} and similar. Also @@ syntax should be employed +for markup commands, i.e. use @code{@@param} and not @code{\param}. + @example /** - * @@file mpeg.c + * @@file * MPEG codec. * @@author ... */ @@ -120,11 +140,97 @@ ... @end example +@subsection C language features + +Libav is programmed in the ISO C90 language with a few additional +features from ISO C99, namely: +@itemize @bullet +@item +the @samp{inline} keyword; +@item +@samp{//} comments; +@item +designated struct initializers (@samp{struct s x = @{ .i = 17 @};}) +@item +compound literals (@samp{x = (struct s) @{ 17, 23 @};}) +@end itemize + +These features are supported by all compilers we care about, so we will not +accept patches to remove their use unless they absolutely do not impair +clarity and performance. + +All code must compile with recent versions of GCC and a number of other +currently supported compilers. To ensure compatibility, please do not use +additional C99 features or GCC extensions. Especially watch out for: +@itemize @bullet +@item +mixing statements and declarations; +@item +@samp{long long} (use @samp{int64_t} instead); +@item +@samp{__attribute__} not protected by @samp{#ifdef __GNUC__} or similar; +@item +GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}). +@end itemize + +@subsection Naming conventions +All names are using underscores (_), not CamelCase. For example, +@samp{avfilter_get_video_buffer} is a valid function name and +@samp{AVFilterGetVideo} is not. The only exception from this are structure +names; they should always be in the CamelCase + +There are following conventions for naming variables and functions: +@itemize @bullet +@item +For local variables no prefix is required. +@item +For variables and functions declared as @code{static} no prefixes are required. +@item +For variables and functions used internally by the library, @code{ff_} prefix +should be used. +For example, @samp{ff_w64_demuxer}. +@item +For variables and functions used internally across multiple libraries, use +@code{avpriv_}. For example, @samp{avpriv_aac_parse_header}. +@item +For exported names, each library has its own prefixes. Just check the existing +code and name accordingly. +@end itemize + +@subsection Miscellanous conventions +@itemize @bullet +@item fprintf and printf are forbidden in libavformat and libavcodec, please use av_log() instead. - +@item Casts should be used only when necessary. Unneeded parentheses should also be avoided if they don't make the code easier to understand. +@end itemize + +@subsection Editor configuration +In order to configure Vim to follow Libav formatting conventions, paste +the following snippet into your @file{.vimrc}: +@example +" indentation rules for libav: 4 spaces, no tabs +set expandtab +set shiftwidth=4 +set softtabstop=4 +" allow tabs in Makefiles +autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=8 +" Trailing whitespace and tabs are forbidden, so highlight them. +highlight ForbiddenWhitespace ctermbg=red guibg=red +match ForbiddenWhitespace /\s\+$\|\t/ +" Do not highlight spaces at the end of line while typing on that line. +autocmd InsertEnter * match ForbiddenWhitespace /\t\|\s\+\%#\@@ h3 { + margin-top: 0; +} + +.directory p { + margin: 0px; + white-space: nowrap; +} + +.directory div { + display: none; + margin: 0px; +} + +.directory img { + vertical-align: -30%; +} + +/* these are for tree view when not used as main index */ + +.directory-alt { + font-size: 100%; + font-weight: bold; +} + +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +.directory-alt > h3 { + margin-top: 0; +} + +.directory-alt p { + margin: 0px; + white-space: nowrap; +} + +.directory-alt div { + display: none; + margin: 0px; +} + +.directory-alt img { + vertical-align: -30%; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; +} + +address { + font-style: normal; + color: #2A612A; +} + +table.doxtable { + border-collapse:collapse; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D682D; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #377F37; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; +} + +table.fieldtable { + width: 100%; + margin-bottom: 10px; + border: 1px solid #A8D9A8; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8D9A8; + border-bottom: 1px solid #A8D9A8; + vertical-align: top; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8D9A8; + width: 100%; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2F2E2; + font-size: 90%; + color: #255525; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8D9A8; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + height:30px; + line-height:30px; + color:#8ACC8A; + border:solid 1px #C2E4C2; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#367C36; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; +} + +.navpath li.navelem a:hover +{ + color:#68BD68; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#367C36; + font-size: 8pt; +} + + +div.summary +{ + margin-top: 12px; + text-align: center; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + margin-left: 5px; + font-size: 8pt; + padding-left: 5px; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.headertitle +{ + padding: 5px 5px 5px 7px; +} + +dl +{ + padding: 0 0 0 10px; +} + +dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug +{ + border-left:4px solid; + padding: 0 0 0 6px; +} + +dl.note +{ + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + border-color: #00D000; +} + +dl.deprecated +{ + border-color: #505050; +} + +dl.todo +{ + border-color: #00C0E0; +} + +dl.test +{ + border-color: #3030E0; +} + +dl.bug +{ + border-color: #C08050; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #53B453; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90CE90; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#337533; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } + pre.fragment + { + overflow: visible; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + } +} + +/* tabs */ + +.tabs, .tabs2, .tabs3 { + z-index: 101; +} + +.tablist { + margin: auto; + display: table; +} + +.tablist li { + float: left; + display: table-cell; + list-style: none; + margin:0 4px; +} + +.tablist a { + display: block; + padding: 0 0.3em; + color: #285D28; + text-decoration: none; + outline: none; +} + +.tabs3 .tablist a { + padding-left: 10px; +} + + +/* libav.org stylesheet */ + +a { + color: #2D6198; +} + +a:visited { + color: #884488; +} + +h1 a, h2 a, h3 a { + text-decoration: inherit; + color: inherit; +} + +#body { + margin: 0 1em; +} + +body { + background-color: #313131; + margin: 0; +} + +.center { + margin-left: auto; + margin-right: auto; + text-align: center; +} + +#container { + background-color: white; + color: #202020; + margin-left: 1em; + margin-right: 1em; +} + +h1 { + background-color: #7BB37B; + border: 1px solid #6A996A; + color: #151515; + font-size: 1.2em; + padding-bottom: 0.2em; + padding-left: 0.4em; + padding-top: 0.2em; +} + +h2 { + color: #313131; + font-size: 1.2em; +} + +h3 { + color: #313131; + font-size: 0.8em; + margin-bottom: -8px; +} + +img { + border: 0; +} + +.tabs { + margin-top: 12px; + border-top: 1px solid #5C665C; +} + +.tabs, .tabs2, .tabs3, .tabs4 { + background-color: #738073; + border-bottom: 1px solid #5C665C; + border-left: 1px solid #5C665C; + border-right: 1px solid #5C665C; + position: relative; + text-align: center; +} + +.tabs a, +.tabs2 a, +.tabs3 a, +.tabs4 a { + color: white; + padding: 0.3em; + text-decoration: none; +} + + +.tabs ul, +.tabs2 ul, +.tabs3 ul, +.tabs4 ul { + padding: 0; +} + +.tabs li.current a, +.tabs2 li.current a, +.tabs3 li.current a, +.tabs4 li.current a { + background-color: #414141; + color: white; + text-decoration: none; +} + +.tabs a:hover, +.tabs2 a:hover, +.tabs3 a:hover, +.tabs4 a:hover { + background-color: #313131 !important; + color: white; + text-decoration: none; +} + +p { + margin-left: 1em; + margin-right: 1em; +} + +table { + margin-left: 2em; +} + +pre { + margin-left: 2em; +} + +#proj_desc { + font-size: 1.2em; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/doxy/footer.html mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/doxy/footer.html --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/doxy/footer.html 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/doxy/footer.html 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,10 @@ + + + + + + + + diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/doxy/header.html mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/doxy/header.html --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/doxy/header.html 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/doxy/header.html 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,14 @@ + + + + + +$projectname: $title +$title + + + +
+ +
+
diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/encoders.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/encoders.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/encoders.texi 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/encoders.texi 2012-01-11 00:34:30.000000000 +0000 @@ -320,10 +320,10 @@ Not Indicated (default) @item 1 @itemx on -Dolby Surround EX On +Dolby Surround EX Off @item 2 @itemx off -Dolby Surround EX Off +Dolby Surround EX On @end table @item -dheadphone_mode @var{mode} @@ -337,10 +337,10 @@ Not Indicated (default) @item 1 @itemx on -Dolby Headphone On +Dolby Headphone Off @item 2 @itemx off -Dolby Headphone Off +Dolby Headphone On @end table @item -ad_conv_type @var{type} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/eval.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/eval.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/eval.texi 2011-04-11 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/eval.texi 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,7 @@ @chapter Expression Evaluation @c man begin EXPRESSION EVALUATION -When evaluating an arithemetic expression, Libav uses an internal +When evaluating an arithmetic expression, Libav uses an internal formula evaluator, implemented through the @file{libavutil/eval.h} interface. @@ -53,7 +53,7 @@ @item ld(var) Allow to load the value of the internal variable with number -@var{var}, which was previosly stored with st(@var{var}, @var{expr}). +@var{var}, which was previously stored with st(@var{var}, @var{expr}). The function returns the loaded value. @item while(cond, expr) @@ -72,6 +72,13 @@ @item trunc(expr) Round the value of expression @var{expr} towards zero to the nearest integer. For example, "trunc(-1.5)" is "-1.0". + +@item sqrt(expr) +Compute the square root of @var{expr}. This is equivalent to +"(@var{expr})^.5". + +@item not(expr) +Return 1.0 if @var{expr} is zero, 0.0 otherwise. @end table Note that: @@ -89,11 +96,6 @@ A*B + not(A)*C @end example -When A evaluates to either 1 or 0, that is the same as -@example -A*B + eq(A,0)*C -@end example - In your C code, you can extend the list of unary and binary functions, and define recognized constants, so that they are available for your expressions. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/faq.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/faq.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/faq.texi 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/faq.texi 2012-01-11 00:34:30.000000000 +0000 @@ -11,22 +11,6 @@ @chapter General Questions -@section When will the next Libav version be released? / Why are Libav releases so few and far between? - -Like most open source projects Libav suffers from a certain lack of -manpower. For this reason the developers have to prioritize the work -they do and putting out releases is not at the top of the list, fixing -bugs and reviewing patches takes precedence. Please don't complain or -request more timely and/or frequent releases unless you are willing to -help out creating them. - -@section I have a problem with an old version of Libav; where should I report it? -Nowhere. We do not support old Libav versions in any way, we simply lack -the time, motivation and manpower to do so. If you have a problem with an -old version of Libav, upgrade to the latest git snapshot. If you -still experience the problem, then you can report it according to the -guidelines in @url{http://libav.org/bugreports.html}. - @section Why doesn't Libav support feature [xyz]? Because no one has taken on that task yet. Libav development is @@ -40,34 +24,10 @@ Moreover Libav strives to support all codecs natively. A DLL loader is not conducive to that goal. -@section My bug report/mail to libav-devel/user has not received any replies. - -Likely reasons -@itemize -@item We are busy and haven't had time yet to read your report or -investigate the issue. -@item You didn't follow @url{http://libav.org/bugreports.html}. -@item You didn't use git master. -@item You reported a segmentation fault without gdb output. -@item You describe a problem but not how to reproduce it. -@item It's unclear if you use ffmpeg as command line tool or use -libav* from another application. -@item You speak about a video having problems on playback but -not what you use to play it. -@item We have no faint clue what you are talking about besides -that it is related to Libav. -@end itemize - -@section Is there a forum for Libav? I do not like mailing lists. - -You may view our mailing lists with a more forum-alike look here: -@url{http://dir.gmane.org/gmane.comp.video.ffmpeg.user}, -but, if you post, please remember that our mailing list rules still apply there. - -@section I cannot read this file although this format seems to be supported by ffmpeg. +@section I cannot read this file although this format seems to be supported by avconv. -Even if ffmpeg can read the container format, it may not support all its -codecs. Please consult the supported codec list in the ffmpeg +Even if avconv can read the container format, it may not support all its +codecs. Please consult the supported codec list in the avconv documentation. @section Which codecs are supported by Windows? @@ -121,11 +81,6 @@ @chapter Usage -@section ffmpeg does not work; what is wrong? - -Try a @code{make distclean} in the ffmpeg source directory before the build. If this does not help see -(@url{http://libav.org/bugreports.html}). - @section How do I encode single pictures into movies? First, rename your pictures to follow a numerical sequence. @@ -133,7 +88,7 @@ Then you may run: @example - ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg + avconv -f image2 -i img%d.jpg /tmp/a.mpg @end example Notice that @samp{%d} is replaced by the image number. @@ -156,17 +111,17 @@ Then run: @example - ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg + avconv -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg @end example -The same logic is used for any image format that ffmpeg reads. +The same logic is used for any image format that avconv reads. @section How do I encode movie to single pictures? Use: @example - ffmpeg -i movie.mpg movie%d.jpg + avconv -i movie.mpg movie%d.jpg @end example The @file{movie.mpg} used as input will be converted to @@ -174,15 +129,15 @@ Instead of relying on file format self-recognition, you may also use @table @option -@item -vcodec ppm -@item -vcodec png -@item -vcodec mjpeg +@item -c:v ppm +@item -c:v png +@item -c:v mjpeg @end table to force the encoding. Applying that to the previous example: @example - ffmpeg -i movie.mpg -f image2 -vcodec mjpeg menu%d.jpg + avconv -i movie.mpg -f image2 -c:v mjpeg menu%d.jpg @end example Beware that there is no "jpeg" codec. Use "mjpeg" instead. @@ -204,56 +159,18 @@ @section Why can I not change the framerate? Some codecs, like MPEG-1/2, only allow a small number of fixed framerates. -Choose a different codec with the -vcodec command line option. +Choose a different codec with the -c:v command line option. -@section How do I encode Xvid or DivX video with ffmpeg? +@section How do I encode Xvid or DivX video with avconv? Both Xvid and DivX (version 4+) are implementations of the ISO MPEG-4 standard (note that there are many other coding formats that use this -same standard). Thus, use '-vcodec mpeg4' to encode in these formats. The +same standard). Thus, use '-c:v mpeg4' to encode in these formats. The default fourcc stored in an MPEG-4-coded file will be 'FMP4'. If you want a different fourcc, use the '-vtag' option. E.g., '-vtag xvid' will force the fourcc 'xvid' to be stored as the video fourcc rather than the default. -@section How do I encode videos which play on the iPod? - -@table @option -@item needed stuff --acodec libfaac -vcodec mpeg4 width<=320 height<=240 -@item working stuff -mv4, title -@item non-working stuff -B-frames -@item example command line -ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 320x180 -metadata title=X output.mp4 -@end table - -@section How do I encode videos which play on the PSP? - -@table @option -@item needed stuff --acodec libfaac -vcodec mpeg4 width*height<=76800 width%16=0 height%16=0 -ar 24000 -r 30000/1001 or 15000/1001 -f psp -@item working stuff -mv4, title -@item non-working stuff -B-frames -@item example command line -ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -ar 24000 -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp output.mp4 -@item needed stuff for H.264 --acodec libfaac -vcodec libx264 width*height<=76800 width%16=0? height%16=0? -ar 48000 -coder 1 -r 30000/1001 or 15000/1001 -f psp -@item working stuff for H.264 -title, loop filter -@item non-working stuff for H.264 -CAVLC -@item example command line -ffmpeg -i input -acodec libfaac -ab 128k -vcodec libx264 -b 1200k -ar 48000 -mbd 2 -coder 1 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp -flags loop -trellis 2 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 output.mp4 -@item higher resolution for newer PSP firmwares, width<=480, height<=272 --vcodec libx264 -level 21 -coder 1 -f psp -@item example command line -ffmpeg -i input -acodec libfaac -ab 128k -ac 2 -ar 48000 -vcodec libx264 -level 21 -b 640k -coder 1 -f psp -flags +loop -trellis 2 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -g 250 -s 480x272 output.mp4 -@end table - @section Which are good parameters for encoding high quality MPEG-4? '-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2', @@ -265,7 +182,7 @@ but beware the '-g 100' might cause problems with some decoders. Things to try: '-bf 2', '-flags qprd', '-flags mv0', '-flags skiprd. -@section Interlaced video looks very bad when encoded with ffmpeg, what is wrong? +@section Interlaced video looks very bad when encoded with avconv, what is wrong? You should use '-flags +ilme+ildct' and maybe '-flags +alt' for interlaced material, and try '-top 0/1' if the result looks really messed-up. @@ -280,12 +197,13 @@ @example DirectShowSource("C:\path to your file\yourfile.asf") @end example -... and then feed that text file to ffmpeg: +... and then feed that text file to avconv: @example - ffmpeg -i input.avs + avconv -i input.avs @end example -For ANY other help on Avisynth, please visit @url{http://www.avisynth.org/}. +For ANY other help on Avisynth, please visit the +@uref{http://www.avisynth.org/, Avisynth homepage}. @section How can I join video files? @@ -298,13 +216,13 @@ format of choice. @example -ffmpeg -i input1.avi -sameq intermediate1.mpg -ffmpeg -i input2.avi -sameq intermediate2.mpg +avconv -i input1.avi -same_quant intermediate1.mpg +avconv -i input2.avi -same_quant intermediate2.mpg cat intermediate1.mpg intermediate2.mpg > intermediate_all.mpg -ffmpeg -i intermediate_all.mpg -sameq output.avi +avconv -i intermediate_all.mpg -same_quant output.avi @end example -Notice that you should either use @code{-sameq} or set a reasonably high +Notice that you should either use @code{-same_quant} or set a reasonably high bitrate for your intermediate and output files, if you want to preserve video quality. @@ -314,10 +232,10 @@ @example mkfifo intermediate1.mpg mkfifo intermediate2.mpg -ffmpeg -i input1.avi -sameq -y intermediate1.mpg < /dev/null & -ffmpeg -i input2.avi -sameq -y intermediate2.mpg < /dev/null & +avconv -i input1.avi -same_quant -y intermediate1.mpg < /dev/null & +avconv -i input2.avi -same_quant -y intermediate2.mpg < /dev/null & cat intermediate1.mpg intermediate2.mpg |\ -ffmpeg -f mpeg -i - -sameq -vcodec mpeg4 -acodec libmp3lame output.avi +avconv -f mpeg -i - -same_quant -c:v mpeg4 -acodec libmp3lame output.avi @end example Similarly, the yuv4mpegpipe format, and the raw video, raw audio codecs also @@ -336,35 +254,37 @@ mkfifo temp2.v mkfifo all.a mkfifo all.v -ffmpeg -i input1.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - > temp1.a < /dev/null & -ffmpeg -i input2.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - > temp2.a < /dev/null & -ffmpeg -i input1.flv -an -f yuv4mpegpipe - > temp1.v < /dev/null & -@{ ffmpeg -i input2.flv -an -f yuv4mpegpipe - < /dev/null | tail -n +2 > temp2.v ; @} & +avconv -i input1.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - > temp1.a < /dev/null & +avconv -i input2.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - > temp2.a < /dev/null & +avconv -i input1.flv -an -f yuv4mpegpipe - > temp1.v < /dev/null & +@{ avconv -i input2.flv -an -f yuv4mpegpipe - < /dev/null | tail -n +2 > temp2.v ; @} & cat temp1.a temp2.a > all.a & cat temp1.v temp2.v > all.v & -ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \ +avconv -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \ -f yuv4mpegpipe -i all.v \ - -sameq -y output.flv + -same_quant -y output.flv rm temp[12].[av] all.[av] @end example -@section The ffmpeg program does not respect the -maxrate setting, some frames are bigger than maxrate/fps. - -Read the MPEG spec about video buffer verifier. +@section -profile option fails when encoding H.264 video with AAC audio -@section I want CBR, but no matter what I do frame sizes differ. +@command{avconv} prints an error like -You do not understand what CBR is, please read the MPEG spec. -Read about video buffer verifier and constant bitrate. -The one sentence summary is that there is a buffer and the input rate is -constant, the output can vary as needed. - -@section How do I check if a stream is CBR? +@example +Undefined constant or missing '(' in 'baseline' +Unable to parse option value "baseline" +Error setting option profile to value baseline. +@end example -To quote the MPEG-2 spec: -"There is no way to tell that a bitstream is constant bitrate without -examining all of the vbv_delay values and making complicated computations." +Short answer: write @option{-profile:v} instead of @option{-profile}. +Long answer: this happens because the @option{-profile} option can apply to both +video and audio. Specifically the AAC encoder also defines some profiles, none +of which are named @var{baseline}. + +The solution is to apply the @option{-profile} option to the video stream only +by using @url{http://libav.org/avconv.html#Stream-specifiers-1, Stream specifiers}. +Appending @code{:v} to it will do exactly that. @chapter Development @@ -398,7 +318,7 @@ We strongly recommend you to move over from MSVC++ to MinGW tools. -@section Can I use Libav or libavcodec under Windows? +@section Can I use Libav under Windows? Yes, but the Cygwin or MinGW tools @emph{must} be used to compile Libav. Read the @emph{Windows} section in the Libav documentation to find more @@ -408,12 +328,12 @@ No. These tools are too bloated and they complicate the build. -@section Why not rewrite ffmpeg in object-oriented C++? +@section Why not rewrite Libav in object-oriented C++? Libav is already organized in a highly modular manner and does not need to be rewritten in a formal object language. Further, many of the developers favor straight C; it works for them. For more arguments on this matter, -read "Programming Religion" at (@url{http://www.tux.org/lkml/#s15}). +read @uref{http://www.tux.org/lkml/#s15, "Programming Religion"}. @section I do not like the LGPL, can I contribute code under the GPL instead? @@ -421,15 +341,7 @@ 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. -@section I want to compile xyz.c alone but my compiler produced many errors. - -Common code is in its own files in libav* and is used by the individual -codecs. They will not work without the common parts, you have to compile -the whole libav*. If you wish, disable some parts with configure switches. -You can also try to hack it and remove more, but if you had problems fixing -the compilation failure then you are probably not qualified for this. - -@section I'm using libavcodec from within my C++ application but the linker complains about missing symbols which seem to be available. +@section I'm using Libav from within my C++ application but the linker complains about missing symbols which seem to be available. Libav is a pure C project, so to use the libraries within your C++ application you need to explicitly state that you are using a C library. You can do this by @@ -437,39 +349,26 @@ See @url{http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3} +@section I'm using libavutil from within my C++ application but the compiler complains about 'UINT64_C' was not declared in this scope + +Libav is a pure C project using C99 math features, in order to enable C++ +to use them you have to append -D__STDC_CONSTANT_MACROS to your CXXFLAGS + @section I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat? You have to implement a URLProtocol, see @file{libavformat/file.c} in Libav and @file{libmpdemux/demux_lavf.c} in MPlayer sources. -@section I get "No compatible shell script interpreter found." in MSys. - -The standard MSys bash (2.04) is broken. You need to install 2.05 or later. - -@section I get "./configure: line : pr: command not found" in MSys. - -The standard MSys install doesn't come with pr. You need to get it from the coreutils package. - -@section Where can I find libav* headers for Pascal/Delphi? - -see @url{http://www.iversenit.dk/dev/ffmpeg-headers/} - -@section Where is the documentation about ffv1, msmpeg4, asv1, 4xm? - -see @url{http://www.ffmpeg.org/~michael/} - -@section How do I feed H.263-RTP (and other codecs in RTP) to libavcodec? +@section Why is @code{make fate} not running all tests? -Even if peculiar since it is network oriented, RTP is a container like any -other. You have to @emph{demux} RTP before feeding the payload to libavcodec. -In this specific case please look at RFC 4629 to see how it should be done. +Make sure you have the fate-suite samples and the @code{SAMPLES} Make variable +or @code{FATE_SAMPLES} environment variable or the @code{--samples} +@command{configure} option is set to the right path. -@section AVStream.r_frame_rate is wrong, it is much larger than the framerate. +@section Why is @code{make fate} not finding the samples? -r_frame_rate is NOT the average framerate, it is the smallest framerate -that can accurately represent all timestamps. So no, it is not -wrong if it is larger than the average! -For example, if you have mixed 25 and 30 fps content, then r_frame_rate -will be 150. +Do you happen to have a @code{~} character in the samples path to indicate a +home directory? The value is used in ways where the shell cannot expand it, +causing FATE to not find files. Just replace @code{~} by the full path. @bye diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/fate.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/fate.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/fate.texi 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/fate.texi 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,135 @@ +\input texinfo @c -*- texinfo -*- + +@settitle FATE Automated Testing Environment +@titlepage +@center @titlefont{FATE Automated Testing Environment} +@end titlepage + +@top + +@contents + +@chapter Introduction + +FATE provides a regression testsuite embedded within the Libav build system. +It can be run locally and optionally configured to send reports to a web +aggregator and viewer @url{http://fate.libav.org}. + +It is advised to run FATE before submitting patches to the current codebase +and provide new tests when submitting patches to add additional features. + +@chapter Running FATE + +@section Samples and References +In order to run, FATE needs a large amount of data (samples and references) +that is provided separately from the actual source distribution. + +To inform the build system about the testsuite location, pass +@option{--samples=} to @command{configure} or set the +@var{SAMPLES} Make variable or the @var{FATE_SAMPLES} environment variable +to a suitable value. + +The dataset is available through @command{rsync}, is possible to fetch +the current sample using the straight rsync command or through a specific +@ref{Makefile target}. + +@example +# rsync -aL rsync://fate-suite.libav.org/fate-suite/ fate-suite +@end example + +@example +# make fate-rsync SAMPLES=fate-suite +@end example + + +@chapter Manual Run +FATE regression test can be run through @command{make}. +Specific Makefile targets and Makefile variables are available: + +@anchor{Makefile target} +@section FATE Makefile targets +@table @option +@item fate-list +List all fate/regression test targets. +@item fate-rsync +Shortcut to download the fate test samples to the specified testsuite location. +@item fate +Run the FATE test suite (requires the fate-suite dataset). +@end table + +@section Fate Makefile variables +@table @option +@item V +Verbosity level, can be set to 0, 1 or 2. +@table @option + @item 0 + show just the test arguments + @item 1 + show just the command used in the test + @item 2 + show everything +@end table +@item SAMPLES +Specify or override the path to the FATE samples at make time, it has a +meaning only while running the regression tests. +@item THREADS +Specify how many threads to use while running regression tests, it is +quite useful to detect thread-related regressions. +@end table + +@example + make V=1 SAMPLES=/var/fate/samples THREADS=2 fate +@end example + +@chapter Automated Tests +In order to automatically testing specific configurations, e.g. multiple +compilers, @command{tests/fate.sh} is provided. + +This shell script builds Libav, runs the regression tests and prepares a +report that can be sent to @url{fate.libav.org} or directly examined locally. + +@section Testing Profiles +The configuration file passed to @command{fate.sh} is shell scripts as well. + +It must provide at least a @var{slot} identifier, the @var{repo} from +which fetch the sources, the @var{samples} directory, a @var{workdir} with +enough space to build and run all the tests. +Optional submit command @var{fate_recv} and a @var{comment} to describe +the testing profile are available. + +Additional optional parameter to tune the Libav building and reporting process +can be passed. + +@example +slot= # some unique identifier +repo=git://git.libav.org/libav.git # the source repository +samples=/path/to/fate/samples +workdir= # directory in which to do all the work +fate_recv="ssh -T fate@@fate.libav.org" # command to submit report +comment= # optional description + +# the following are optional and map to configure options +arch= +cpu= +cross_prefix= +cc= +target_os= +sysroot= +target_exec= +target_path= +extra_cflags= +extra_ldflags= +extra_libs= +extra_conf= # extra configure options not covered above + +#make= # name of GNU make if not 'make' +makeopts= # extra options passed to 'make' +#tar= # command to create a tar archive from its arguments on + # stdout, defaults to 'tar c' +@end example + +@section Submitting Reports +In order to send reports you need to create an @command{ssh} key and send it +to @email{root@@libav.org}. +The current server fingerprint is @var{a4:99:d7:d3:1c:92:0d:56:d6:d5:61:be:01:ae:7d:e6} + diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/fate.txt mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/fate.txt --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/fate.txt 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/fate.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -FATE Automated Testing Environment - -FATE provides a regression testsuite that can be run locally or configured -to send reports to fate.libav.org. -In order to run, it needs a large amount of data (samples and references) -that is provided separately from the actual source distribution. - -Use the following command to get the fate test samples - -# rsync -aL rsync://fate-suite.libav.org:/fate-suite/ fate-suite - -To inform the build system about the testsuite location, pass -`--samples=` to configure or set the SAMPLES Make -variable or the FATE_SAMPLES environment variable to a suitable value. - -For information on how to set up FATE to send results to the official Libav -testing framework, please refer to the following wiki page: -http://wiki.multimedia.cx/index.php?title=FATE - -FATE Makefile targets: - -fate-list - Will list all fate/regression test targets. - -fate - Run the FATE test suite (requires the fate-suite dataset). - -Fate Makefile variables: - -V - Verbosity level, can be set to 0, 1 or 2. - * 0: show just the test arguments - * 1: show just the command used in the test - * 2: show everything - -SAMPLES - Specify or override the path to the FATE samples at make time, it has a - meaning only while running the regression tests. - -THREADS - Specify how many threads to use while running regression tests, it is - quite useful to detect thread-related regressions. - -Example: - make V=1 SAMPLES=/var/fate/samples THREADS=2 fate diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/ffmpeg.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/ffmpeg.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/ffmpeg.texi 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/ffmpeg.texi 2012-01-11 00:34:30.000000000 +0000 @@ -68,7 +68,7 @@ @chapter Options @c man begin OPTIONS -@include fftools-common-opts.texi +@include avtools-common-opts.texi @section Main options @@ -159,14 +159,12 @@ @section Video Options @table @option -@item -b @var{bitrate} -Set the video bitrate in bit/s (default = 200 kb/s). @item -vframes @var{number} Set the number of video frames to record. @item -r @var{fps} Set frame rate (Hz value, fraction or abbreviation), (default = 25). @item -s @var{size} -Set frame size. The format is @samp{wxh} (ffserver default = 160x128, ffmpeg default = same as source). +Set frame size. The format is @samp{wxh} (avserver default = 160x128, ffmpeg default = same as source). The following abbreviations are recognized: @table @samp @item sqcif @@ -471,7 +469,7 @@ @item 3 FF_ER_AGGRESSIVE @item 4 -FF_ER_VERY_AGGRESSIVE +FF_ER_EXPLODE @end table @item -ec @var{bit_mask} @@ -551,19 +549,17 @@ @item -aframes @var{number} Set the number of audio frames to record. @item -ar @var{freq} -Set the audio sampling frequency. For input streams it is set by -default to 44100 Hz, for output streams it is set by default to the -frequency of the input stream. If the input file has audio streams -with different frequencies, the behaviour is undefined. -@item -ab @var{bitrate} -Set the audio bitrate in bit/s (default = 64k). +Set the audio sampling frequency. For output streams it is set by +default to the frequency of the corresponding input stream. For input +streams this option only makes sense for audio grabbing devices and raw +demuxers and is mapped to the corresponding demuxer options. @item -aq @var{q} Set the audio quality (codec-specific, VBR). @item -ac @var{channels} -Set the number of audio channels. For input streams it is set by -default to 1, for output streams it is set by default to the same -number of audio channels in input. If the input file has audio streams -with different channel count, the behaviour is undefined. +Set the number of audio channels. For output streams it is set by +default to the number of input audio channels. For input streams +this option only makes sense for audio grabbing devices and raw demuxers +and is mapped to the corresponding demuxer options. @item -an Disable audio recording. @item -acodec @var{codec} @@ -730,10 +726,12 @@ Read input at native frame rate. Mainly used to simulate a grab device. @item -loop_input Loop over the input stream. Currently it works only for image -streams. This option is used for automatic FFserver testing. +streams. This option is used for automatic AVserver testing. +This option is deprecated, use -loop. @item -loop_output @var{number_of_times} Repeatedly loop output for formats that support looping such as animated GIF (0 will loop the output infinitely). +This option is deprecated, use -loop. @item -threads @var{count} Thread count. @item -vsync @var{parameter} @@ -793,7 +791,7 @@ one for each line, specifying a sequence of options which would be awkward to specify on the command line. Lines starting with the hash ('#') character are ignored and are used to provide comments. Check -the @file{ffpresets} directory in the Libav source tree for examples. +the @file{presets} directory in the Libav source tree for examples. Preset files are specified with the @code{vpre}, @code{apre}, @code{spre}, and @code{fpre} options. The @code{fpre} option takes the @@ -808,8 +806,8 @@ following rules: First ffmpeg searches for a file named @var{arg}.ffpreset in the -directories @file{$FFMPEG_DATADIR} (if set), and @file{$HOME/.ffmpeg}, and in -the datadir defined at configuration time (usually @file{PREFIX/share/ffmpeg}) +directories @file{$AVCONV_DATADIR} (if set), and @file{$HOME/.avconv}, and in +the datadir defined at configuration time (usually @file{PREFIX/share/avconv}) in that order. For example, if the argument is @code{libx264-max}, it will search for the file @file{libx264-max.ffpreset}. @@ -880,8 +878,8 @@ @end example Note that you must activate the right video source and channel before -launching ffmpeg with any TV viewer such as xawtv -(@url{http://linux.bytesex.org/xawtv/}) by Gerd Knorr. You also +launching ffmpeg with any TV viewer such as +@uref{http://linux.bytesex.org/xawtv/, xawtv} by Gerd Knorr. You also have to set the audio recording levels correctly with a standard mixer. @@ -900,8 +898,34 @@ ffmpeg -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg @end example -0.0 is display.screen number of your X11 server, same as the DISPLAY environment -variable. 10 is the x-offset and 20 the y-offset for the grabbing. +10 is the x-offset and 20 the y-offset for the grabbing. + +@example +ffmpeg -f x11grab -follow_mouse centered -s cif -r 25 -i :0.0 /tmp/out.mpg +@end example + +The grabbing region follows the mouse pointer, which stays at the center of +region. + +@example +ffmpeg -f x11grab -follow_mouse 100 -s cif -r 25 -i :0.0 /tmp/out.mpg +@end example + +Only follows when mouse pointer reaches within 100 pixels to the edge of +region. + +@example +ffmpeg -f x11grab -show_region 1 -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg +@end example + +The grabbing region will be indicated on screen. + +@example +ffmpeg -f x11grab -follow_mouse centered -show_region 1 -s cif -r 25 -i :0.0 /tmp/out.mpg +@end example + +The grabbing region indication will follow the mouse pointer. + @section Video and Audio file format conversion @@ -1055,7 +1079,7 @@ @settitle ffmpeg video converter @c man begin SEEALSO -ffplay(1), ffprobe(1), ffserver(1) and the Libav HTML documentation +avplay(1), avprobe(1), avserver(1) and the Libav HTML documentation @c man end @c man begin AUTHORS diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/ffplay.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/ffplay.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/ffplay.texi 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/ffplay.texi 1970-01-01 00:00:00.000000000 +0000 @@ -1,181 +0,0 @@ -\input texinfo @c -*- texinfo -*- - -@settitle ffplay Documentation -@titlepage -@center @titlefont{ffplay Documentation} -@end titlepage - -@top - -@contents - -@chapter Synopsis - -@example -@c man begin SYNOPSIS -ffplay [options] @file{input_file} -@c man end -@end example - -@chapter Description -@c man begin DESCRIPTION - -FFplay is a very simple and portable media player using the Libav -libraries and the SDL library. It is mostly used as a testbed for the -various Libav APIs. -@c man end - -@chapter Options -@c man begin OPTIONS - -@include fftools-common-opts.texi - -@section Main options - -@table @option -@item -x @var{width} -Force displayed width. -@item -y @var{height} -Force displayed height. -@item -s @var{size} -Set frame size (WxH or abbreviation), needed for videos which don't -contain a header with the frame size like raw YUV. -@item -an -Disable audio. -@item -vn -Disable video. -@item -ss @var{pos} -Seek to a given position in seconds. -@item -t @var{duration} -play seconds of audio/video -@item -bytes -Seek by bytes. -@item -nodisp -Disable graphical display. -@item -f @var{fmt} -Force format. -@item -window_title @var{title} -Set window title (default is the input filename). -@item -loop @var{number} -Loops movie playback times. 0 means forever. -@item -vf @var{filter_graph} -@var{filter_graph} is a description of the filter graph to apply to -the input video. -Use the option "-filters" to show all the available filters (including -also sources and sinks). - -@end table - -@section Advanced options -@table @option -@item -pix_fmt @var{format} -Set pixel format. -@item -stats -Show the stream duration, the codec parameters, the current position in -the stream and the audio/video synchronisation drift. -@item -debug -Print specific debug info. -@item -bug -Work around bugs. -@item -vismv -Visualize motion vectors. -@item -fast -Non-spec-compliant optimizations. -@item -genpts -Generate pts. -@item -rtp_tcp -Force RTP/TCP protocol usage instead of RTP/UDP. It is only meaningful -if you are streaming with the RTSP protocol. -@item -sync @var{type} -Set the master clock to audio (@code{type=audio}), video -(@code{type=video}) or external (@code{type=ext}). Default is audio. The -master clock is used to control audio-video synchronization. Most media -players use audio as master clock, but in some cases (streaming or high -quality broadcast) it is necessary to change that. This option is mainly -used for debugging purposes. -@item -threads @var{count} -Set the thread count. -@item -ast @var{audio_stream_number} -Select the desired audio stream number, counting from 0. The number -refers to the list of all the input audio streams. If it is greater -than the number of audio streams minus one, then the last one is -selected, if it is negative the audio playback is disabled. -@item -vst @var{video_stream_number} -Select the desired video stream number, counting from 0. The number -refers to the list of all the input video streams. If it is greater -than the number of video streams minus one, then the last one is -selected, if it is negative the video playback is disabled. -@item -sst @var{subtitle_stream_number} -Select the desired subtitle stream number, counting from 0. The number -refers to the list of all the input subtitle streams. If it is greater -than the number of subtitle streams minus one, then the last one is -selected, if it is negative the subtitle rendering is disabled. -@item -autoexit -Exit when video is done playing. -@item -exitonkeydown -Exit if any key is pressed. -@item -exitonmousedown -Exit if any mouse button is pressed. -@end table - -@section While playing - -@table @key -@item q, ESC -Quit. - -@item f -Toggle full screen. - -@item p, SPC -Pause. - -@item a -Cycle audio channel. - -@item v -Cycle video channel. - -@item t -Cycle subtitle channel. - -@item w -Show audio waves. - -@item left/right -Seek backward/forward 10 seconds. - -@item down/up -Seek backward/forward 1 minute. - -@item mouse click -Seek to percentage in file corresponding to fraction of width. - -@end table - -@c man end - -@include eval.texi -@include demuxers.texi -@include muxers.texi -@include indevs.texi -@include outdevs.texi -@include protocols.texi -@include filters.texi - -@ignore - -@setfilename ffplay -@settitle FFplay media player - -@c man begin SEEALSO -ffmpeg(1), ffprobe(1), ffserver(1) and the Libav HTML documentation -@c man end - -@c man begin AUTHORS -The Libav developers -@c man end - -@end ignore - -@bye diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/ffprobe.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/ffprobe.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/ffprobe.texi 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/ffprobe.texi 1970-01-01 00:00:00.000000000 +0000 @@ -1,134 +0,0 @@ -\input texinfo @c -*- texinfo -*- - -@settitle ffprobe Documentation -@titlepage -@center @titlefont{ffprobe Documentation} -@end titlepage - -@top - -@contents - -@chapter Synopsis - -The generic syntax is: - -@example -@c man begin SYNOPSIS -ffprobe [options] [@file{input_file}] -@c man end -@end example - -@chapter Description -@c man begin DESCRIPTION - -ffprobe gathers information from multimedia streams and prints it in -human- and machine-readable fashion. - -For example it can be used to check the format of the container used -by a multimedia stream and the format and type of each media stream -contained in it. - -If a filename is specified in input, ffprobe will try to open and -probe the file content. If the file cannot be opened or recognized as -a multimedia file, a positive exit code is returned. - -ffprobe may be employed both as a standalone application or in -combination with a textual filter, which may perform more -sophisticated processing, e.g. statistical processing or plotting. - -Options are used to list some of the formats supported by ffprobe or -for specifying which information to display, and for setting how -ffprobe will show it. - -ffprobe output is designed to be easily parsable by a textual filter, -and consists of one or more sections of the form: -@example -[SECTION] -key1=val1 -... -keyN=valN -[/SECTION] -@end example - -Metadata tags stored in the container or in the streams are recognized -and printed in the corresponding "FORMAT" or "STREAM" section, and -are prefixed by the string "TAG:". - -@c man end - -@chapter Options -@c man begin OPTIONS - -@include fftools-common-opts.texi - -@section Main options - -@table @option - -@item -f @var{format} -Force format to use. - -@item -unit -Show the unit of the displayed values. - -@item -prefix -Use SI prefixes for the displayed values. -Unless the "-byte_binary_prefix" option is used all the prefixes -are decimal. - -@item -byte_binary_prefix -Force the use of binary prefixes for byte values. - -@item -sexagesimal -Use sexagesimal format HH:MM:SS.MICROSECONDS for time values. - -@item -pretty -Prettify the format of the displayed values, it corresponds to the -options "-unit -prefix -byte_binary_prefix -sexagesimal". - -@item -show_format -Show information about the container format of the input multimedia -stream. - -All the container format information is printed within a section with -name "FORMAT". - -@item -show_packets -Show information about each packet contained in the input multimedia -stream. - -The information for each single packet is printed within a dedicated -section with name "PACKET". - -@item -show_streams -Show information about each media stream contained in the input -multimedia stream. - -Each media stream information is printed within a dedicated section -with name "STREAM". - -@end table -@c man end - -@include demuxers.texi -@include muxers.texi -@include protocols.texi -@include indevs.texi - -@ignore - -@setfilename ffprobe -@settitle ffprobe media prober - -@c man begin SEEALSO -ffmpeg(1), ffplay(1), ffserver(1) and the Libav HTML documentation -@c man end - -@c man begin AUTHORS -The Libav developers -@c man end - -@end ignore - -@bye diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/ffserver.conf mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/ffserver.conf --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/ffserver.conf 2011-03-15 03:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/ffserver.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,377 +0,0 @@ -# Port on which the server is listening. You must select a different -# port from your standard HTTP web server if it is running on the same -# computer. -Port 8090 - -# Address on which the server is bound. Only useful if you have -# several network interfaces. -BindAddress 0.0.0.0 - -# Number of simultaneous HTTP connections that can be handled. It has -# to be defined *before* the MaxClients parameter, since it defines the -# MaxClients maximum limit. -MaxHTTPConnections 2000 - -# Number of simultaneous requests that can be handled. Since FFServer -# is very fast, it is more likely that you will want to leave this high -# and use MaxBandwidth, below. -MaxClients 1000 - -# This the maximum amount of kbit/sec that you are prepared to -# consume when streaming to clients. -MaxBandwidth 1000 - -# Access log file (uses standard Apache log file format) -# '-' is the standard output. -CustomLog - - -# Suppress that if you want to launch ffserver as a daemon. -NoDaemon - - -################################################################## -# Definition of the live feeds. Each live feed contains one video -# and/or audio sequence coming from an ffmpeg encoder or another -# ffserver. This sequence may be encoded simultaneously with several -# codecs at several resolutions. - - - -# You must use 'ffmpeg' to send a live feed to ffserver. In this -# example, you can type: -# -# ffmpeg http://localhost:8090/feed1.ffm - -# ffserver can also do time shifting. It means that it can stream any -# previously recorded live stream. The request should contain: -# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify -# a path where the feed is stored on disk. You also specify the -# maximum size of the feed, where zero means unlimited. Default: -# File=/tmp/feed_name.ffm FileMaxSize=5M -File /tmp/feed1.ffm -FileMaxSize 200K - -# You could specify -# ReadOnlyFile /saved/specialvideo.ffm -# This marks the file as readonly and it will not be deleted or updated. - -# Specify launch in order to start ffmpeg automatically. -# First ffmpeg must be defined with an appropriate path if needed, -# after that options can follow, but avoid adding the http:// field -#Launch ffmpeg - -# Only allow connections from localhost to the feed. -ACL allow 127.0.0.1 - - - - -################################################################## -# Now you can define each stream which will be generated from the -# original audio and video stream. Each format has a filename (here -# 'test1.mpg'). FFServer will send this stream when answering a -# request containing this filename. - - - -# coming from live feed 'feed1' -Feed feed1.ffm - -# Format of the stream : you can choose among: -# mpeg : MPEG-1 multiplexed video and audio -# mpegvideo : only MPEG-1 video -# mp2 : MPEG-2 audio (use AudioCodec to select layer 2 and 3 codec) -# ogg : Ogg format (Vorbis audio codec) -# rm : RealNetworks-compatible stream. Multiplexed audio and video. -# ra : RealNetworks-compatible stream. Audio only. -# mpjpeg : Multipart JPEG (works with Netscape without any plugin) -# jpeg : Generate a single JPEG image. -# asf : ASF compatible streaming (Windows Media Player format). -# swf : Macromedia Flash compatible stream -# avi : AVI format (MPEG-4 video, MPEG audio sound) -Format mpeg - -# Bitrate for the audio stream. Codecs usually support only a few -# different bitrates. -AudioBitRate 32 - -# Number of audio channels: 1 = mono, 2 = stereo -AudioChannels 1 - -# Sampling frequency for audio. When using low bitrates, you should -# lower this frequency to 22050 or 11025. The supported frequencies -# depend on the selected audio codec. -AudioSampleRate 44100 - -# Bitrate for the video stream -VideoBitRate 64 - -# Ratecontrol buffer size -VideoBufferSize 40 - -# Number of frames per second -VideoFrameRate 3 - -# Size of the video frame: WxH (default: 160x128) -# The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga, -# qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga, -# wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720, -# hd1080 -VideoSize 160x128 - -# Transmit only intra frames (useful for low bitrates, but kills frame rate). -#VideoIntraOnly - -# If non-intra only, an intra frame is transmitted every VideoGopSize -# frames. Video synchronization can only begin at an intra frame. -VideoGopSize 12 - -# More MPEG-4 parameters -# VideoHighQuality -# Video4MotionVector - -# Choose your codecs: -#AudioCodec mp2 -#VideoCodec mpeg1video - -# Suppress audio -#NoAudio - -# Suppress video -#NoVideo - -#VideoQMin 3 -#VideoQMax 31 - -# Set this to the number of seconds backwards in time to start. Note that -# most players will buffer 5-10 seconds of video, and also you need to allow -# for a keyframe to appear in the data stream. -#Preroll 15 - -# ACL: - -# You can allow ranges of addresses (or single addresses) -#ACL ALLOW - -# You can deny ranges of addresses (or single addresses) -#ACL DENY - -# You can repeat the ACL allow/deny as often as you like. It is on a per -# stream basis. The first match defines the action. If there are no matches, -# then the default is the inverse of the last ACL statement. -# -# Thus 'ACL allow localhost' only allows access from localhost. -# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and -# allow everybody else. - - - - -################################################################## -# Example streams - - -# Multipart JPEG - -# -#Feed feed1.ffm -#Format mpjpeg -#VideoFrameRate 2 -#VideoIntraOnly -#NoAudio -#Strict -1 -# - - -# Single JPEG - -# -#Feed feed1.ffm -#Format jpeg -#VideoFrameRate 2 -#VideoIntraOnly -##VideoSize 352x240 -#NoAudio -#Strict -1 -# - - -# Flash - -# -#Feed feed1.ffm -#Format swf -#VideoFrameRate 2 -#VideoIntraOnly -#NoAudio -# - - -# ASF compatible - - -Feed feed1.ffm -Format asf -VideoFrameRate 15 -VideoSize 352x240 -VideoBitRate 256 -VideoBufferSize 40 -VideoGopSize 30 -AudioBitRate 64 -StartSendOnKey - - - -# MP3 audio - -# -#Feed feed1.ffm -#Format mp2 -#AudioCodec mp3 -#AudioBitRate 64 -#AudioChannels 1 -#AudioSampleRate 44100 -#NoVideo -# - - -# Ogg Vorbis audio - -# -#Feed feed1.ffm -#Title "Stream title" -#AudioBitRate 64 -#AudioChannels 2 -#AudioSampleRate 44100 -#NoVideo -# - - -# Real with audio only at 32 kbits - -# -#Feed feed1.ffm -#Format rm -#AudioBitRate 32 -#NoVideo -#NoAudio -# - - -# Real with audio and video at 64 kbits - -# -#Feed feed1.ffm -#Format rm -#AudioBitRate 32 -#VideoBitRate 128 -#VideoFrameRate 25 -#VideoGopSize 25 -#NoAudio -# - - -################################################################## -# A stream coming from a file: you only need to set the input -# filename and optionally a new format. Supported conversions: -# AVI -> ASF - -# -#File "/usr/local/httpd/htdocs/tlive.rm" -#NoAudio -# - -# -#File "/usr/local/httpd/htdocs/test.asf" -#NoAudio -#Author "Me" -#Copyright "Super MegaCorp" -#Title "Test stream from disk" -#Comment "Test comment" -# - - -################################################################## -# RTSP examples -# -# You can access this stream with the RTSP URL: -# rtsp://localhost:5454/test1-rtsp.mpg -# -# A non-standard RTSP redirector is also created. Its URL is: -# http://localhost:8090/test1-rtsp.rtsp - -# -#Format rtp -#File "/usr/local/httpd/htdocs/test1.mpg" -# - - -# Transcode an incoming live feed to another live feed, -# using libx264 and video presets - -# -#Format rtp -#Feed feed1.ffm -#VideoCodec libx264 -#VideoFrameRate 24 -#VideoBitRate 100 -#VideoSize 480x272 -#AVPresetVideo default -#AVPresetVideo baseline -#AVOptionVideo flags +global_header -# -#AudioCodec libfaac -#AudioBitRate 32 -#AudioChannels 2 -#AudioSampleRate 22050 -#AVOptionAudio flags +global_header -# - -################################################################## -# SDP/multicast examples -# -# If you want to send your stream in multicast, you must set the -# multicast address with MulticastAddress. The port and the TTL can -# also be set. -# -# An SDP file is automatically generated by ffserver by adding the -# 'sdp' extension to the stream name (here -# http://localhost:8090/test1-sdp.sdp). You should usually give this -# file to your player to play the stream. -# -# The 'NoLoop' option can be used to avoid looping when the stream is -# terminated. - -# -#Format rtp -#File "/usr/local/httpd/htdocs/test1.mpg" -#MulticastAddress 224.124.0.1 -#MulticastPort 5000 -#MulticastTTL 16 -#NoLoop -# - - -################################################################## -# Special streams - -# Server status - - -Format status - -# Only allow local people to get the status -ACL allow localhost -ACL allow 192.168.0.0 192.168.255.255 - -#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico - - - -# Redirect index.html to the appropriate site - - -URL http://www.libav.org/ - - - diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/ffserver.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/ffserver.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/ffserver.texi 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/ffserver.texi 1970-01-01 00:00:00.000000000 +0000 @@ -1,278 +0,0 @@ -\input texinfo @c -*- texinfo -*- - -@settitle ffserver Documentation -@titlepage -@center @titlefont{ffserver Documentation} -@end titlepage - -@top - -@contents - -@chapter Synopsys - -The generic syntax is: - -@example -@c man begin SYNOPSIS -ffserver [options] -@c man end -@end example - -@chapter Description -@c man begin DESCRIPTION - -ffserver is a streaming server for both audio and video. It supports -several live feeds, streaming from files and time shifting on live feeds -(you can seek to positions in the past on each live feed, provided you -specify a big enough feed storage in ffserver.conf). - -ffserver runs in daemon mode by default; that is, it puts itself in -the background and detaches from its TTY, unless it is launched in -debug mode or a NoDaemon option is specified in the configuration -file. - -This documentation covers only the streaming aspects of ffserver / -ffmpeg. All questions about parameters for ffmpeg, codec questions, -etc. are not covered here. Read @file{ffmpeg-doc.html} for more -information. - -@section How does it work? - -ffserver receives prerecorded files or FFM streams from some ffmpeg -instance as input, then streams them over RTP/RTSP/HTTP. - -An ffserver instance will listen on some port as specified in the -configuration file. You can launch one or more instances of ffmpeg and -send one or more FFM streams to the port where ffserver is expecting -to receive them. Alternately, you can make ffserver launch such ffmpeg -instances at startup. - -Input streams are called feeds, and each one is specified by a -section in the configuration file. - -For each feed you can have different output streams in various -formats, each one specified by a section in the configuration -file. - -@section Status stream - -ffserver supports an HTTP interface which exposes the current status -of the server. - -Simply point your browser to the address of the special status stream -specified in the configuration file. - -For example if you have: -@example - -Format status - -# Only allow local people to get the status -ACL allow localhost -ACL allow 192.168.0.0 192.168.255.255 - -@end example - -then the server will post a page with the status information when -the special stream @file{status.html} is requested. - -@section What can this do? - -When properly configured and running, you can capture video and audio in real -time from a suitable capture card, and stream it out over the Internet to -either Windows Media Player or RealAudio player (with some restrictions). - -It can also stream from files, though that is currently broken. Very often, a -web server can be used to serve up the files just as well. - -It can stream prerecorded video from .ffm files, though it is somewhat tricky -to make it work correctly. - -@section What do I need? - -I use Linux on a 900 MHz Duron with a cheapo Bt848 based TV capture card. I'm -using stock Linux 2.4.17 with the stock drivers. [Actually that isn't true, -I needed some special drivers for my motherboard-based sound card.] - -I understand that FreeBSD systems work just fine as well. - -@section How do I make it work? - -First, build the kit. It *really* helps to have installed LAME first. Then when -you run the ffserver ./configure, make sure that you have the -@code{--enable-libmp3lame} flag turned on. - -LAME is important as it allows for streaming audio to Windows Media Player. -Don't ask why the other audio types do not work. - -As a simple test, just run the following two command lines where INPUTFILE -is some file which you can decode with ffmpeg: - -@example -./ffserver -f doc/ffserver.conf & -./ffmpeg -i INPUTFILE http://localhost:8090/feed1.ffm -@end example - -At this point you should be able to go to your Windows machine and fire up -Windows Media Player (WMP). Go to Open URL and enter - -@example - http://:8090/test.asf -@end example - -You should (after a short delay) see video and hear audio. - -WARNING: trying to stream test1.mpg doesn't work with WMP as it tries to -transfer the entire file before starting to play. -The same is true of AVI files. - -@section What happens next? - -You should edit the ffserver.conf file to suit your needs (in terms of -frame rates etc). Then install ffserver and ffmpeg, write a script to start -them up, and off you go. - -@section Troubleshooting - -@subsection I don't hear any audio, but video is fine. - -Maybe you didn't install LAME, or got your ./configure statement wrong. Check -the ffmpeg output to see if a line referring to MP3 is present. If not, then -your configuration was incorrect. If it is, then maybe your wiring is not -set up correctly. Maybe the sound card is not getting data from the right -input source. Maybe you have a really awful audio interface (like I do) -that only captures in stereo and also requires that one channel be flipped. -If you are one of these people, then export 'AUDIO_FLIP_LEFT=1' before -starting ffmpeg. - -@subsection The audio and video loose sync after a while. - -Yes, they do. - -@subsection After a long while, the video update rate goes way down in WMP. - -Yes, it does. Who knows why? - -@subsection WMP 6.4 behaves differently to WMP 7. - -Yes, it does. Any thoughts on this would be gratefully received. These -differences extend to embedding WMP into a web page. [There are two -object IDs that you can use: The old one, which does not play well, and -the new one, which does (both tested on the same system). However, -I suspect that the new one is not available unless you have installed WMP 7]. - -@section What else can it do? - -You can replay video from .ffm files that was recorded earlier. -However, there are a number of caveats, including the fact that the -ffserver parameters must match the original parameters used to record the -file. If they do not, then ffserver deletes the file before recording into it. -(Now that I write this, it seems broken). - -You can fiddle with many of the codec choices and encoding parameters, and -there are a bunch more parameters that you cannot control. Post a message -to the mailing list if there are some 'must have' parameters. Look in -ffserver.conf for a list of the currently available controls. - -It will automatically generate the ASX or RAM files that are often used -in browsers. These files are actually redirections to the underlying ASF -or RM file. The reason for this is that the browser often fetches the -entire file before starting up the external viewer. The redirection files -are very small and can be transferred quickly. [The stream itself is -often 'infinite' and thus the browser tries to download it and never -finishes.] - -@section Tips - -* When you connect to a live stream, most players (WMP, RA, etc) want to -buffer a certain number of seconds of material so that they can display the -signal continuously. However, ffserver (by default) starts sending data -in realtime. This means that there is a pause of a few seconds while the -buffering is being done by the player. The good news is that this can be -cured by adding a '?buffer=5' to the end of the URL. This means that the -stream should start 5 seconds in the past -- and so the first 5 seconds -of the stream are sent as fast as the network will allow. It will then -slow down to real time. This noticeably improves the startup experience. - -You can also add a 'Preroll 15' statement into the ffserver.conf that will -add the 15 second prebuffering on all requests that do not otherwise -specify a time. In addition, ffserver will skip frames until a key_frame -is found. This further reduces the startup delay by not transferring data -that will be discarded. - -* You may want to adjust the MaxBandwidth in the ffserver.conf to limit -the amount of bandwidth consumed by live streams. - -@section Why does the ?buffer / Preroll stop working after a time? - -It turns out that (on my machine at least) the number of frames successfully -grabbed is marginally less than the number that ought to be grabbed. This -means that the timestamp in the encoded data stream gets behind realtime. -This means that if you say 'Preroll 10', then when the stream gets 10 -or more seconds behind, there is no Preroll left. - -Fixing this requires a change in the internals of how timestamps are -handled. - -@section Does the @code{?date=} stuff work. - -Yes (subject to the limitation outlined above). Also note that whenever you -start ffserver, it deletes the ffm file (if any parameters have changed), -thus wiping out what you had recorded before. - -The format of the @code{?date=xxxxxx} is fairly flexible. You should use one -of the following formats (the 'T' is literal): - -@example -* YYYY-MM-DDTHH:MM:SS (localtime) -* YYYY-MM-DDTHH:MM:SSZ (UTC) -@end example - -You can omit the YYYY-MM-DD, and then it refers to the current day. However -note that @samp{?date=16:00:00} refers to 16:00 on the current day -- this -may be in the future and so is unlikely to be useful. - -You use this by adding the ?date= to the end of the URL for the stream. -For example: @samp{http://localhost:8080/test.asf?date=2002-07-26T23:05:00}. -@c man end - -@chapter Options -@c man begin OPTIONS - -@include fftools-common-opts.texi - -@section Main options - -@table @option -@item -f @var{configfile} -Use @file{configfile} instead of @file{/etc/ffserver.conf}. -@item -n -Enable no-launch mode. This option disables all the Launch directives -within the various sections. Since ffserver will not launch -any ffmpeg instances, you will have to launch them manually. -@item -d -Enable debug mode. This option increases log verbosity, directs log -messages to stdout and causes ffserver to run in the foreground -rather than as a daemon. -@end table -@c man end - -@ignore - -@setfilename ffserver -@settitle ffserver video server - -@c man begin SEEALSO - -ffmpeg(1), ffplay(1), ffprobe(1), the @file{ffmpeg/doc/ffserver.conf} -example and the Libav HTML documentation -@c man end - -@c man begin AUTHORS -The Libav developers -@c man end - -@end ignore - -@bye diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/fftools-common-opts.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/fftools-common-opts.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/fftools-common-opts.texi 2011-03-19 06:37:12.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/fftools-common-opts.texi 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -All the numerical options, if not specified otherwise, accept in input -a string representing a number, which may contain one of the -International System number postfixes, for example 'K', 'M', 'G'. -If 'i' is appended after the postfix, powers of 2 are used instead of -powers of 10. The 'B' postfix multiplies the value for 8, and can be -appended after another postfix or used alone. This allows using for -example 'KB', 'MiB', 'G' and 'B' as postfix. - -Options which do not take arguments are boolean options, and set the -corresponding value to true. They can be set to false by prefixing -with "no" the option name, for example using "-nofoo" in the -commandline will set to false the boolean option with name "foo". - -@section Generic options - -These options are shared amongst the ff* tools. - -@table @option - -@item -L -Show license. - -@item -h, -?, -help, --help -Show help. - -@item -version -Show version. - -@item -formats -Show available formats. - -The fields preceding the format names have the following meanings: -@table @samp -@item D -Decoding available -@item E -Encoding available -@end table - -@item -codecs -Show available codecs. - -The fields preceding the codec names have the following meanings: -@table @samp -@item D -Decoding available -@item E -Encoding available -@item V/A/S -Video/audio/subtitle codec -@item S -Codec supports slices -@item D -Codec supports direct rendering -@item T -Codec can handle input truncated at random locations instead of only at frame boundaries -@end table - -@item -bsfs -Show available bitstream filters. - -@item -protocols -Show available protocols. - -@item -filters -Show available libavfilter filters. - -@item -pix_fmts -Show available pixel formats. - -@item -loglevel @var{loglevel} -Set the logging level used by the library. -@var{loglevel} is a number or a string containing one of the following values: -@table @samp -@item quiet -@item panic -@item fatal -@item error -@item warning -@item info -@item verbose -@item debug -@end table - -By default the program logs to stderr, if coloring is supported by the -terminal, colors are used to mark errors and warnings. Log coloring -can be disabled setting the environment variable -@env{FFMPEG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting -the environment variable @env{FFMPEG_FORCE_COLOR}. -The use of the environment variable @env{NO_COLOR} is deprecated and -will be dropped in a following Libav version. - -@end table diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/filters.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/filters.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/filters.texi 2011-05-09 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/filters.texi 2012-01-11 00:34:30.000000000 +0000 @@ -17,8 +17,8 @@ @section Filtergraph syntax A filtergraph can be represented using a textual representation, which -is recognized by the @code{-vf} and @code{-af} options of the ff* -tools, and by the @code{av_parse_graph()} function defined in +is recognized by the @code{-vf} and @code{-af} options in @command{avconv} +and @command{avplay}, and by the @code{av_parse_graph()} function defined in @file{libavfilter/avfiltergraph}. A filterchain consists of a sequence of connected filters, each one @@ -183,6 +183,66 @@ @var{threshold} is the threshold below which a pixel value is considered black, and defaults to 32. +@section boxblur + +Apply boxblur algorithm to the input video. + +This filter accepts the parameters: +@var{luma_power}:@var{luma_radius}:@var{chroma_radius}:@var{chroma_power}:@var{alpha_radius}:@var{alpha_power} + +Chroma and alpha parameters are optional, if not specified they default +to the corresponding values set for @var{luma_radius} and +@var{luma_power}. + +@var{luma_radius}, @var{chroma_radius}, and @var{alpha_radius} represent +the radius in pixels of the box used for blurring the corresponding +input plane. They are expressions, and can contain the following +constants: +@table @option +@item w, h +the input width and height in pixels + +@item cw, ch +the input chroma image width and height in pixels + +@item hsub, vsub +horizontal and vertical chroma subsample values. For example for the +pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} is 1. +@end table + +The radius must be a non-negative number, and must not be greater than +the value of the expression @code{min(w,h)/2} for the luma and alpha planes, +and of @code{min(cw,ch)/2} for the chroma planes. + +@var{luma_power}, @var{chroma_power}, and @var{alpha_power} represent +how many times the boxblur filter is applied to the corresponding +plane. + +Some examples follow: + +@itemize + +@item +Apply a boxblur filter with luma, chroma, and alpha radius +set to 2: +@example +boxblur=2:1 +@end example + +@item +Set luma radius to 2, alpha and chroma radius to 0 +@example +boxblur=2:1:0:0:0:0 +@end example + +@item +Set luma and chroma radius to a fraction of the video dimension +@example +boxblur=min(h\,w)/10:1:min(cw\,ch)/10:1 +@end example + +@end itemize + @section copy Copy the input source unchanged to the output. Mainly useful for @@ -204,13 +264,13 @@ each new frame. @item in_w, in_h -the input width and heigth +the input width and height @item iw, ih same as @var{in_w} and @var{in_h} @item out_w, out_h -the output (cropped) width and heigth +the output (cropped) width and height @item ow, oh same as @var{out_w} and @var{out_h} @@ -321,6 +381,58 @@ playback. @end table +@section delogo + +Suppress a TV station logo by a simple interpolation of the surrounding +pixels. Just set a rectangle covering the logo and watch it disappear +(and sometimes something even uglier appear - your mileage may vary). + +The filter accepts parameters as a string of the form +"@var{x}:@var{y}:@var{w}:@var{h}:@var{band}", or as a list of +@var{key}=@var{value} pairs, separated by ":". + +The description of the accepted parameters follows. + +@table @option + +@item x, y +Specify the top left corner coordinates of the logo. They must be +specified. + +@item w, h +Specify the width and height of the logo to clear. They must be +specified. + +@item band, t +Specify the thickness of the fuzzy edge of the rectangle (added to +@var{w} and @var{h}). The default value is 4. + +@item show +When set to 1, a green rectangle is drawn on the screen to simplify +finding the right @var{x}, @var{y}, @var{w}, @var{h} parameters, and +@var{band} is set to 4. The default value is 0. + +@end table + +Some examples follow. + +@itemize + +@item +Set a rectangle covering the area with top left corner coordinates 0,0 +and size 100x77, setting a band of size 10: +@example +delogo=0:0:100:77:10 +@end example + +@item +As the previous example, but use named options: +@example +delogo=x=0:y=0:w=100:h=77:band=10 +@end example + +@end itemize + @section drawbox Draw a colored box on the input image. @@ -358,7 +470,7 @@ Draw text string or text from specified file on top of video using the libfreetype library. -To enable compilation of this filter you need to configure FFmpeg with +To enable compilation of this filter you need to configure Libav with @code{--enable-libfreetype}. The filter also recognizes strftime() sequences in the provided text @@ -393,6 +505,32 @@ @item x, y The offsets where text will be drawn within the video frame. Relative to the top/left border of the output image. +They accept expressions similar to the @ref{overlay} filter: +@table @option + +@item x, y +the computed values for @var{x} and @var{y}. They are evaluated for +each new frame. + +@item main_w, main_h +main input width and height + +@item W, H +same as @var{main_w} and @var{main_h} + +@item text_w, text_h +rendered text width and height + +@item w, h +same as @var{text_w} and @var{text_h} + +@item n +the number of frames processed, starting from 0 + +@item t +timestamp expressed in seconds, NAN if the input timestamp is unknown + +@end table The default value of @var{x} and @var{y} is 0. @@ -550,7 +688,7 @@ For example: @example -./ffmpeg -i in.vob -vf "fieldorder=bff" out.dv +./avconv -i in.vob -vf "fieldorder=bff" out.dv @end example @section fifo @@ -668,10 +806,9 @@ Flip the input video horizontally. -For example to horizontally flip the video in input with -@file{ffmpeg}: +For example to horizontally flip the input video with @command{avconv}: @example -ffmpeg -i in.avi -vf "hflip" out.avi +avconv -i in.avi -vf "hflip" out.avi @end example @section hqdn3d @@ -701,7 +838,124 @@ @var{luma_tmp}*@var{chroma_spatial}/@var{luma_spatial} @end table -@section noformat +@section lut, lutrgb, lutyuv + +Compute a look-up table for binding each pixel component input value +to an output value, and apply it to input video. + +@var{lutyuv} applies a lookup table to a YUV input video, @var{lutrgb} +to an RGB input video. + +These filters accept in input a ":"-separated list of options, which +specify the expressions used for computing the lookup table for the +corresponding pixel component values. + +The @var{lut} filter requires either YUV or RGB pixel formats in +input, and accepts the options: +@table @option +@var{c0} (first pixel component) +@var{c1} (second pixel component) +@var{c2} (third pixel component) +@var{c3} (fourth pixel component, corresponds to the alpha component) +@end table + +The exact component associated to each option depends on the format in +input. + +The @var{lutrgb} filter requires RGB pixel formats in input, and +accepts the options: +@table @option +@var{r} (red component) +@var{g} (green component) +@var{b} (blue component) +@var{a} (alpha component) +@end table + +The @var{lutyuv} filter requires YUV pixel formats in input, and +accepts the options: +@table @option +@var{y} (Y/luminance component) +@var{u} (U/Cb component) +@var{v} (V/Cr component) +@var{a} (alpha component) +@end table + +The expressions can contain the following constants and functions: + +@table @option +@item E, PI, PHI +the corresponding mathematical approximated values for e +(euler number), pi (greek PI), PHI (golden ratio) + +@item w, h +the input width and height + +@item val +input value for the pixel component + +@item clipval +the input value clipped in the @var{minval}-@var{maxval} range + +@item maxval +maximum value for the pixel component + +@item minval +minimum value for the pixel component + +@item negval +the negated value for the pixel component value clipped in the +@var{minval}-@var{maxval} range , it corresponds to the expression +"maxval-clipval+minval" + +@item clip(val) +the computed value in @var{val} clipped in the +@var{minval}-@var{maxval} range + +@item gammaval(gamma) +the computed gamma correction value of the pixel component value +clipped in the @var{minval}-@var{maxval} range, corresponds to the +expression +"pow((clipval-minval)/(maxval-minval)\,@var{gamma})*(maxval-minval)+minval" + +@end table + +All expressions default to "val". + +Some examples follow: +@example +# negate input video +lutrgb="r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val" +lutyuv="y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val" + +# the above is the same as +lutrgb="r=negval:g=negval:b=negval" +lutyuv="y=negval:u=negval:v=negval" + +# negate luminance +lutyuv=negval + +# remove chroma components, turns the video into a graytone image +lutyuv="u=128:v=128" + +# apply a luma burning effect +lutyuv="y=2*val" + +# remove green and blue components +lutrgb="g=0:b=0" + +# set a constant alpha channel value on input +format=rgba,lutrgb=a="maxval-minval/2" + +# correct luminance gamma by a 0.5 factor +lutyuv=y=gammaval(0.5) +@end example + +@section negate + +Negate input video. + +This filter accepts an integer in input, if non-zero it negates the +alpha component (if available). The default value in input is 0. Force libavfilter not to use any of the specified pixel formats for the input to the next filter. @@ -738,7 +992,7 @@ filter. If not specified the default values are assumed. Refer to the official libopencv documentation for more precise -informations: +information: @url{http://opencv.willowgarage.com/documentation/c/image_filtering.html} Follows the list of supported libopencv filters. @@ -754,7 +1008,7 @@ @var{struct_el} represents a structuring element, and has the syntax: @var{cols}x@var{rows}+@var{anchor_x}x@var{anchor_y}/@var{shape} -@var{cols} and @var{rows} represent the number of colums and rows of +@var{cols} and @var{rows} represent the number of columns and rows of the structuring element, @var{anchor_x} and @var{anchor_y} the anchor point, and @var{shape} the shape for the structuring element, and can be one of the values "rect", "cross", "ellipse", "custom". @@ -796,8 +1050,7 @@ This filter corresponds to the libopencv function @code{cvErode}. The filter accepts the parameters: @var{struct_el}:@var{nb_iterations}, -with the same meaning and use of those of the dilate filter -(@pxref{dilate}). +with the same syntax and semantics as the @ref{dilate} filter. @subsection smooth @@ -821,6 +1074,7 @@ These parameters correspond to the parameters assigned to the libopencv function @code{cvSmooth}. +@anchor{overlay} @section overlay Overlay one video on top of another. @@ -876,7 +1130,7 @@ color=red@.3:WxH [over]; [in][over] overlay [out] @end example -You can chain togheter more overlays but the efficiency of such +You can chain together more overlays but the efficiency of such approach is yet to be tested. @section pad @@ -896,13 +1150,13 @@ (euler number), pi (greek PI), phi (golden ratio) @item in_w, in_h -the input video width and heigth +the input video width and height @item iw, ih same as @var{in_w} and @var{in_h} @item out_w, out_h -the output width and heigth, that is the size of the padded area as +the output width and height, that is the size of the padded area as specified by the @var{width} and @var{height} expressions @item ow, oh @@ -930,7 +1184,7 @@ is used for the output. The @var{width} expression can reference the value set by the -@var{height} expression, and viceversa. +@var{height} expression, and vice versa. The default value of @var{width} and @var{height} is 0. @@ -940,7 +1194,7 @@ with respect to the top/left border of the output image. The @var{x} expression can reference the value set by the @var{y} -expression, and viceversa. +expression, and vice versa. The default value of @var{x} and @var{y} is 0. @@ -1003,20 +1257,23 @@ (euler number), pi (greek PI), phi (golden ratio) @item in_w, in_h -the input width and heigth +the input width and height @item iw, ih same as @var{in_w} and @var{in_h} @item out_w, out_h -the output (cropped) width and heigth +the output (cropped) width and height @item ow, oh same as @var{out_w} and @var{out_h} -@item a +@item dar, a input display aspect ratio, same as @var{iw} / @var{ih} +@item sar +input sample aspect ratio + @item hsub, vsub horizontal and vertical chroma subsample values. For example for the pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} is 1. @@ -1065,6 +1322,122 @@ scale='min(500\, iw*3/2):-1' @end example +@section select +Select frames to pass in output. + +It accepts in input an expression, which is evaluated for each input +frame. If the expression is evaluated to a non-zero value, the frame +is selected and passed to the output, otherwise it is discarded. + +The expression can contain the following constants: + +@table @option +@item PI +Greek PI + +@item PHI +golden ratio + +@item E +Euler number + +@item n +the sequential number of the filtered frame, starting from 0 + +@item selected_n +the sequential number of the selected frame, starting from 0 + +@item prev_selected_n +the sequential number of the last selected frame, NAN if undefined + +@item TB +timebase of the input timestamps + +@item pts +the PTS (Presentation TimeStamp) of the filtered video frame, +expressed in @var{TB} units, NAN if undefined + +@item t +the PTS (Presentation TimeStamp) of the filtered video frame, +expressed in seconds, NAN if undefined + +@item prev_pts +the PTS of the previously filtered video frame, NAN if undefined + +@item prev_selected_pts +the PTS of the last previously filtered video frame, NAN if undefined + +@item prev_selected_t +the PTS of the last previously selected video frame, NAN if undefined + +@item start_pts +the PTS of the first video frame in the video, NAN if undefined + +@item start_t +the time of the first video frame in the video, NAN if undefined + +@item pict_type +the type of the filtered frame, can assume one of the following +values: +@table @option +@item I +@item P +@item B +@item S +@item SI +@item SP +@item BI +@end table + +@item interlace_type +the frame interlace type, can assume one of the following values: +@table @option +@item PROGRESSIVE +the frame is progressive (not interlaced) +@item TOPFIRST +the frame is top-field-first +@item BOTTOMFIRST +the frame is bottom-field-first +@end table + +@item key +1 if the filtered frame is a key-frame, 0 otherwise + +@item pos +the position in the file of the filtered frame, -1 if the information +is not available (e.g. for synthetic video) +@end table + +The default value of the select expression is "1". + +Some examples follow: + +@example +# select all frames in input +select + +# the above is the same as: +select=1 + +# skip all frames: +select=0 + +# select only I-frames +select='eq(pict_type\,I)' + +# select one frame every 100 +select='not(mod(n\,100))' + +# select only frames contained in the 10-20 time interval +select='gte(t\,10)*lte(t\,20)' + +# select only I frames contained in the 10-20 time interval +select='gte(t\,10)*lte(t\,20)*eq(pict_type\,I)' + +# select frames with a minimum distance of 10 seconds +select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)' +@end example + @anchor{setdar} @section setdar @@ -1093,7 +1466,7 @@ setdar=1.77777 @end example -See also the "setsar" filter documentation (@pxref{setsar}). +See also the @ref{setsar} filter documentation. @section setpts @@ -1211,13 +1584,72 @@ settb=AVTB @end example +@section showinfo + +Show a line containing various information for each input video frame. +The input video is not modified. + +The shown line contains a sequence of key/value pairs of the form +@var{key}:@var{value}. + +A description of each shown parameter follows: + +@table @option +@item n +sequential number of the input frame, starting from 0 + +@item pts +Presentation TimeStamp of the input frame, expressed as a number of +time base units. The time base unit depends on the filter input pad. + +@item pts_time +Presentation TimeStamp of the input frame, expressed as a number of +seconds + +@item pos +position of the frame in the input stream, -1 if this information in +unavailable and/or meaningless (for example in case of synthetic video) + +@item fmt +pixel format name + +@item sar +sample aspect ratio of the input frame, expressed in the form +@var{num}/@var{den} + +@item s +size of the input frame, expressed in the form +@var{width}x@var{height} + +@item i +interlaced mode ("P" for "progressive", "T" for top field first, "B" +for bottom field first) + +@item iskey +1 if the frame is a key frame, 0 otherwise + +@item type +picture type of the input frame ("I" for an I-frame, "P" for a +P-frame, "B" for a B-frame, "?" for unknown type). +Check also the documentation of the @code{AVPictureType} enum and of +the @code{av_get_picture_type_char} function defined in +@file{libavutil/avutil.h}. + +@item checksum +Adler-32 checksum of all the planes of the input frame + +@item plane_checksum +Adler-32 checksum of each plane of the input frame, expressed in the form +"[@var{c0} @var{c1} @var{c2} @var{c3}]" +@end table + @section slicify Pass the images of input video on to next video filter as multiple slices. @example -./ffmpeg -i in.avi -vf "slicify=32" out.avi +./avconv -i in.avi -vf "slicify=32" out.avi @end example The filter accepts the slice height as parameter. If the parameter is @@ -1276,7 +1708,7 @@ Negative values for the amount will blur the input video, while positive values will sharpen. All parameters are optional and default to the -equivalent of the string '5:5:1.0:0:0:0.0'. +equivalent of the string '5:5:1.0:5:5:0.0'. @table @option @@ -1294,11 +1726,11 @@ @item chroma_msize_x Set the chroma matrix horizontal size. It can be an integer between 3 -and 13, default value is 0. +and 13, default value is 5. @item chroma_msize_y Set the chroma matrix vertical size. It can be an integer between 3 -and 13, default value is 0. +and 13, default value is 5. @item luma_amount Set the chroma effect strength. It can be a float number between -2.0 @@ -1313,8 +1745,8 @@ # Strong blur of both luma and chroma parameters unsharp=7:7:-2:7:7:-2 -# Use the default values with @command{ffmpeg} -./ffmpeg -i in.avi -vf "unsharp" out.mp4 +# Use the default values with @command{avconv} +./avconv -i in.avi -vf "unsharp" out.mp4 @end example @section vflip @@ -1322,7 +1754,7 @@ Flip the input video vertically. @example -./ffmpeg -i in.avi -vf "vflip" out.avi +./avconv -i in.avi -vf "vflip" out.avi @end example @section yadif @@ -1330,7 +1762,7 @@ Deinterlace the input video ("yadif" means "yet another deinterlacing filter"). -It accepts the optional parameters: @var{mode}:@var{parity}. +It accepts the optional parameters: @var{mode}:@var{parity}:@var{auto}. @var{mode} specifies the interlacing mode to adopt, accepts one of the following values: @@ -1353,9 +1785,9 @@ @table @option @item 0 -assume bottom field first -@item 1 assume top field first +@item 1 +assume bottom field first @item -1 enable automatic detection @end table @@ -1364,6 +1796,18 @@ If interlacing is unknown or decoder does not export this information, top field first will be assumed. +@var{auto} specifies if deinterlacer should trust the interlaced flag +and only deinterlace frames marked as interlaced + +@table @option +@item 0 +deinterlace all frames +@item 1 +only deinterlace frames marked as interlaced +@end table + +Default value is 0. + @c man end VIDEO FILTERS @chapter Video Sources @@ -1381,7 +1825,7 @@ It accepts the following parameters: @var{width}:@var{height}:@var{pix_fmt_string}:@var{timebase_num}:@var{timebase_den}:@var{sample_aspect_ratio_num}:@var{sample_aspect_ratio.den} -All the parameters need to be explicitely defined. +All the parameters need to be explicitly defined. Follows the list of the accepted parameters. @@ -1437,7 +1881,7 @@ @item frame_size Specify the size of the sourced video, it may be a string of the form -@var{width}x@var{heigth}, or the name of a size abbreviation. The +@var{width}x@var{height}, or the name of a size abbreviation. The default value is "320x240". @item frame_rate @@ -1547,8 +1991,7 @@ the form @var{num}/@var{den} or a frame rate abbreviation. @var{src_name} is the name to the frei0r source to load. For more information regarding frei0r and how to set the parameters read the -section "frei0r" (@pxref{frei0r}) in the description of the video -filters. +section @ref{frei0r} in the description of the video filters. Some examples follow: @example @@ -1557,6 +2000,56 @@ frei0r_src=200x200:10:partik0l=1234 [overlay]; [in][overlay] overlay @end example +@section rgbtestsrc, testsrc + +The @code{rgbtestsrc} source generates an RGB test pattern useful for +detecting RGB vs BGR issues. You should see a red, green and blue +stripe from top to bottom. + +The @code{testsrc} source generates a test video pattern, showing a +color pattern, a scrolling gradient and a timestamp. This is mainly +intended for testing purposes. + +Both sources accept an optional sequence of @var{key}=@var{value} pairs, +separated by ":". The description of the accepted options follows. + +@table @option + +@item size, s +Specify the size of the sourced video, it may be a string of the form +@var{width}x@var{height}, or the name of a size abbreviation. The +default value is "320x240". + +@item rate, r +Specify the frame rate of the sourced video, as the number of frames +generated per second. It has to be a string in the format +@var{frame_rate_num}/@var{frame_rate_den}, an integer number, a float +number or a valid video frame rate abbreviation. The default value is +"25". + +@item sar +Set the sample aspect ratio of the sourced video. + +@item duration +Set the video duration of the sourced video. The accepted syntax is: +@example +[-]HH[:MM[:SS[.m...]]] +[-]S+[.m...] +@end example +See also the function @code{av_parse_time()}. + +If not specified, or the expressed duration is negative, the video is +supposed to be generated forever. +@end table + +For example the following: +@example +testsrc=duration=5.3:size=qcif:rate=10 +@end example + +will generate a video with a duration of 5.3 seconds, with size +176x144 and a framerate of 10 frames per second. + @c man end VIDEO SOURCES @chapter Video Sinks diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/general.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/general.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/general.texi 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/general.texi 2012-01-11 00:34:30.000000000 +0000 @@ -9,26 +9,81 @@ @contents -@chapter external libraries +@chapter External libraries Libav can be hooked up with a number of external libraries to add support for more formats. None of them are used by default, their use has to be explicitly requested by passing the appropriate flags to @file{./configure}. -@section OpenCORE AMR +@section OpenCORE and VisualOn libraries -Libav can make use of the OpenCORE libraries for AMR-NB -decoding/encoding and AMR-WB decoding. +Spun off Google Android sources, OpenCore and VisualOn libraries provide +encoders for a number of audio codecs. -Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the instructions for -installing the libraries. Then pass @code{--enable-libopencore-amrnb} and/or -@code{--enable-libopencore-amrwb} to configure to enable the libraries. - -Note that OpenCORE is under the Apache License 2.0 (see -@url{http://www.apache.org/licenses/LICENSE-2.0} for details), which is +@float NOTE +OpenCORE and VisualOn libraries are under the Apache License 2.0 +(see @url{http://www.apache.org/licenses/LICENSE-2.0} for details), which is incompatible with the LGPL version 2.1 and GPL version 2. You have to upgrade Libav's license to LGPL version 3 (or if you have enabled GPL components, GPL version 3) to use it. +@end float + +@subsection OpenCORE AMR + +Libav can make use of the OpenCORE libraries for AMR-NB +decoding/encoding and AMR-WB decoding. + +Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the +instructions for installing the libraries. +Then pass @code{--enable-libopencore-amrnb} and/or +@code{--enable-libopencore-amrwb} to configure to enable them. + +@subsection VisualOn AAC encoder library + +Libav can make use of the VisualOn AACenc library for AAC encoding. + +Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the +instructions for installing the library. +Then pass @code{--enable-libvo-aacenc} to configure to enable it. + +@subsection VisualOn AMR-WB encoder library + +Libav can make use of the VisualOn AMR-WBenc library for AMR-WB encoding. + +Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the +instructions for installing the library. +Then pass @code{--enable-libvo-amrwbenc} to configure to enable it. + +@section LAME + +Libav can make use of the LAME library for MP3 encoding. + +Go to @url{http://lame.sourceforge.net/} and follow the +instructions for installing the library. +Then pass @code{--enable-libmp3lame} to configure to enable it. + +@section libvpx + +Libav can make use of the libvpx library for VP8 encoding. + +Go to @url{http://www.webmproject.org/} and follow the instructions for +installing the library. Then pass @code{--enable-libvpx} to configure to +enable it. + +@section x264 + +Libav can make use of the x264 library for H.264 encoding. + +Go to @url{http://www.videolan.org/developers/x264.html} and follow the +instructions for installing the library. Then pass @code{--enable-libx264} to +configure to enable it. + +@float NOTE +x264 is under the GNU Public License Version 2 or later +(see @url{http://www.gnu.org/licenses/old-licenses/gpl-2.0.html} for +details), you must upgrade Libav's license to GPL in order to use it. +@end float + @chapter Supported File Formats and Codecs @@ -66,6 +121,10 @@ @tab Used in Z and Z95 games. @item Brute Force & Ignorance @tab @tab X @tab Used in the game Flash Traffic: City of Angels. +@item BWF @tab X @tab X +@item CRI ADX @tab X @tab X + @tab Audio-only format used in console video games. +@item Discworld II BMV @tab @tab X @item Interplay C93 @tab @tab X @tab Used in the game Cyberia from Interplay. @item Delphine Software International CIN @tab @tab X @@ -90,7 +149,7 @@ @item Electronic Arts cdata @tab @tab X @item Electronic Arts Multimedia @tab @tab X @tab Used in various EA games; files have extensions like WVE and UV2. -@item FFM (FFserver live feed) @tab X @tab X +@item FFM (AVserver live feed) @tab X @tab X @item Flash (SWF) @tab X @tab X @item Flash 9 (AVM2) @tab X @tab X @tab Only embedded audio is decoded. @@ -117,6 +176,7 @@ @tab A format generated by IndigoVision 8000 video server. @item IVF (On2) @tab X @tab X @tab A format used by libvpx +@item LATM @tab X @tab X @item LMLM4 @tab @tab X @tab Used by Linux Media Labs MPEG-4 PCI boards @item LXF @tab @tab X @@ -162,6 +222,7 @@ @item NUT @tab X @tab X @tab NUT Open Container Format @item Ogg @tab X @tab X +@item Playstation Portable PMP @tab @tab X @item TechnoTrend PVA @tab @tab X @tab Used by TechnoTrend DVB PCI boards. @item QCP @tab @tab X @@ -235,7 +296,9 @@ @tab Used in Sierra CD-ROM games. @item Smacker @tab @tab X @tab Multimedia format used by many games. -@item Sony OpenMG (OMA) @tab @tab X +@item SMJPEG @tab @tab X + @tab Used in certain Loki game ports. +@item Sony OpenMG (OMA) @tab X @tab X @tab Audio format used in Sony Sonic Stage and Sony Vegas. @item Sony PlayStation STR @tab @tab X @item Sony Wave64 (W64) @tab @tab X @@ -258,6 +321,8 @@ @tab Multimedia format used in Westwood Studios games. @item Westwood Studios VQA @tab @tab X @tab Multimedia format used in Westwood Studios games. +@item XMV @tab @tab X + @tab Microsoft video container used in Xbox games. @item xWMA @tab @tab X @tab Microsoft audio container used by XAudio 2. @item YUV4MPEG pipe @tab X @tab X @@ -337,6 +402,7 @@ @tab Used in Chinese MP3 players. @item ANSI/ASCII art @tab @tab X @item Apple MJPEG-B @tab @tab X +@item Apple ProRes @tab @tab X @item Apple QuickDraw @tab @tab X @tab fourcc: qdrw @item Asus v1 @tab X @tab X @@ -371,8 +437,9 @@ @tab AVS1-P2, JiZhun profile, encoding through external library libxavs @item Delphine Software International CIN video @tab @tab X @tab Codec used in Delphine Software International games. +@item Discworld II BMV Video @tab @tab X @item Cinepak @tab @tab X -@item Cirrus Logic AccuPak @tab @tab X +@item Cirrus Logic AccuPak @tab X @tab X @tab fourcc: CLJR @item Creative YUV (CYUV) @tab @tab X @item DFA @tab @tab X @@ -387,6 +454,7 @@ @item Duck TrueMotion 2.0 @tab @tab X @tab fourcc: TM20 @item DV (Digital Video) @tab X @tab X +@item Dxtory capture format @tab @tab X @item Feeble Files/ScummVM DXA @tab @tab X @tab Codec originally used in Feeble Files game. @item Electronic Arts CMV video @tab @tab X @@ -400,6 +468,7 @@ @tab experimental lossless codec (fourcc: FFV1) @item Flash Screen Video v1 @tab X @tab X @tab fourcc: FSV1 +@item Flash Screen Video v2 @tab @tab X @item Flash Video (FLV) @tab X @tab X @tab Sorenson H.263 used in Flash @item Fraps @tab @tab X @@ -418,12 +487,13 @@ @item id RoQ video @tab X @tab X @tab Used in Quake III, Jedi Knight 2, other computer games. @item IFF ILBM @tab @tab X - @tab IFF interlaved bitmap + @tab IFF interleaved bitmap @item IFF ByteRun1 @tab @tab X @tab IFF run length encoded bitmap @item Intel H.263 @tab @tab X @item Intel Indeo 2 @tab @tab X @item Intel Indeo 3 @tab @tab X +@item Intel Indeo 4 @tab @tab X @item Intel Indeo 5 @tab @tab X @item Interplay C93 @tab @tab X @tab Used in the game Cyberia from Interplay. @@ -510,10 +580,14 @@ @tab encoding supported through external library libtheora @item Tiertex Limited SEQ video @tab @tab X @tab Codec used in DOS CD-ROM FlashBack game. -@item V210 Quicktime Uncompressed 4:2:2 10-bit @tab X @tab X +@item Ut Video @tab @tab X +@item v210 QuickTime uncompressed 4:2:2 10-bit @tab X @tab X +@item v410 QuickTime uncompressed 4:4:4 10-bit @tab X @tab X +@item VBLE Lossless Codec @tab @tab X @item VMware Screen Codec / VMware Video @tab @tab X @tab Codec used in videos captured by VMware. @item Westwood Studios VQA (Vector Quantized Animation) video @tab @tab X +@item Windows Media Image @tab @tab X @item Windows Media Video 7 @tab X @tab X @item Windows Media Video 8 @tab X @tab X @item Windows Media Video 9 @tab @tab X @@ -600,6 +674,7 @@ @tab Used in Bink and Smacker files in many games. @item Delphine Software International CIN audio @tab @tab X @tab Codec used in Delphine Software International games. +@item Discworld II BMV Audio @tab @tab X @item COOK @tab @tab X @tab All versions except 5.1 are supported. @item DCA (DTS Coherent Acoustics) @tab @tab X @@ -658,7 +733,7 @@ @item PCM unsigned 24-bit little-endian @tab X @tab X @item PCM unsigned 32-bit big-endian @tab X @tab X @item PCM unsigned 32-bit little-endian @tab X @tab X -@item PCM Zork @tab X @tab X +@item PCM Zork @tab @tab X @item QCELP / PureVoice @tab @tab X @item QDesign Music Codec 2 @tab @tab X @tab There are still some distortions. @@ -674,7 +749,7 @@ @tab Used in Sierra VMD files. @item Smacker audio @tab @tab X @item SMPTE 302M AES3 audio @tab @tab X -@item Speex @tab @tab E +@item Speex @tab E @tab E @tab supported through external library libspeex @item True Audio (TTA) @tab @tab X @item TrueHD @tab @tab X @@ -739,6 +814,7 @@ @item JACK @tab X @tab @item LIBDC1394 @tab X @tab @item OSS @tab X @tab X +@item Pulseaudio @tab X @tab @item Video4Linux @tab X @tab @item Video4Linux2 @tab X @tab @item VfW capture @tab X @tab @@ -747,336 +823,4 @@ @code{X} means that input/output is supported. - -@chapter Platform Specific information - -@section DOS - -Using a cross-compiler is preferred for various reasons. - -@section OS/2 - -For information about compiling Libav on OS/2 see -@url{http://www.edm2.com/index.php/FFmpeg}. - -@section Unix-like - -Some parts of Libav cannot be built with version 2.15 of the GNU -assembler which is still provided by a few AMD64 distributions. To -make sure your compiler really uses the required version of gas -after a binutils upgrade, run: - -@example -$(gcc -print-prog-name=as) --version -@end example - -If not, then you should install a different compiler that has no -hard-coded path to gas. In the worst case pass @code{--disable-asm} -to configure. - -@subsection BSD - -BSD make will not build Libav, you need to install and use GNU Make -(@file{gmake}). - -@subsection (Open)Solaris - -GNU Make is required to build Libav, so you have to invoke (@file{gmake}), -standard Solaris Make will not work. When building with a non-c99 front-end -(gcc, generic suncc) add either @code{--extra-libs=/usr/lib/values-xpg6.o} -or @code{--extra-libs=/usr/lib/64/values-xpg6.o} to the configure options -since the libc is not c99-compliant by default. The probes performed by -configure may raise an exception leading to the death of configure itself -due to a bug in the system shell. Simply invoke a different shell such as -bash directly to work around this: - -@example -bash ./configure -@end example - -@subsection Darwin (MacOS X, iPhone) - -MacOS X on PowerPC or ARM (iPhone) requires a preprocessor from -@url{http://github.com/yuvi/gas-preprocessor} to build the optimized -assembler functions. Just download the Perl script and put it somewhere -in your PATH, Libav's configure will pick it up automatically. - -@section Windows - -@subsection Native Windows compilation - -Libav can be built to run natively on Windows using the MinGW tools. Install -the latest versions of MSYS and MinGW from @url{http://www.mingw.org/}. -You can find detailed installation -instructions in the download section and the FAQ. - -Libav does not build out-of-the-box with the packages the automated MinGW -installer provides. It also requires coreutils to be installed and many other -packages updated to the latest version. The minimum version for some packages -are listed below: - -@itemize -@item bash 3.1 -@item msys-make 3.81-2 (note: not mingw32-make) -@item w32api 3.13 -@item mingw-runtime 3.15 -@end itemize - -Libav automatically passes @code{-fno-common} to the compiler to work around -a GCC bug (see @url{http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216}). - -Notes: - -@itemize - -@item Building natively using MSYS can be sped up by disabling implicit rules -in the Makefile by calling @code{make -r} instead of plain @code{make}. This -speed up is close to non-existent for normal one-off builds and is only -noticeable when running make for a second time (for example in -@code{make install}). - -@item In order to compile FFplay, you must have the MinGW development library -of SDL. Get it from @url{http://www.libsdl.org}. -Edit the @file{bin/sdl-config} script so that it points to the correct prefix -where SDL was installed. Verify that @file{sdl-config} can be launched from -the MSYS command line. - -@item By using @code{./configure --enable-shared} when configuring Libav, -you can build libavutil, libavcodec and libavformat as DLLs. - -@end itemize - -@subsection Microsoft Visual C++ compatibility - -As stated in the FAQ, Libav will not compile under MSVC++. However, if you -want to use the libav* libraries in your own applications, you can still -compile those applications using MSVC++. But the libav* libraries you link -to @emph{must} be built with MinGW. However, you will not be able to debug -inside the libav* libraries, since MSVC++ does not recognize the debug -symbols generated by GCC. -We strongly recommend you to move over from MSVC++ to MinGW tools. - -This description of how to use the Libav libraries with MSVC++ is based on -Microsoft Visual C++ 2005 Express Edition. If you have a different version, -you might have to modify the procedures slightly. - -@subsubsection Using static libraries - -Assuming you have just built and installed Libav in @file{/usr/local}. - -@enumerate - -@item Create a new console application ("File / New / Project") and then -select "Win32 Console Application". On the appropriate page of the -Application Wizard, uncheck the "Precompiled headers" option. - -@item Write the source code for your application, or, for testing, just -copy the code from an existing sample application into the source file -that MSVC++ has already created for you. For example, you can copy -@file{libavformat/output-example.c} from the Libav distribution. - -@item Open the "Project / Properties" dialog box. In the "Configuration" -combo box, select "All Configurations" so that the changes you make will -affect both debug and release builds. In the tree view on the left hand -side, select "C/C++ / General", then edit the "Additional Include -Directories" setting to contain the path where the Libav includes were -installed (i.e. @file{c:\msys\1.0\local\include}). -Do not add MinGW's include directory here, or the include files will -conflict with MSVC's. - -@item Still in the "Project / Properties" dialog box, select -"Linker / General" from the tree view and edit the -"Additional Library Directories" setting to contain the @file{lib} -directory where Libav was installed (i.e. @file{c:\msys\1.0\local\lib}), -the directory where MinGW libs are installed (i.e. @file{c:\mingw\lib}), -and the directory where MinGW's GCC libs are installed -(i.e. @file{C:\mingw\lib\gcc\mingw32\4.2.1-sjlj}). Then select -"Linker / Input" from the tree view, and add the files @file{libavformat.a}, -@file{libavcodec.a}, @file{libavutil.a}, @file{libmingwex.a}, -@file{libgcc.a}, and any other libraries you used (i.e. @file{libz.a}) -to the end of "Additional Dependencies". - -@item Now, select "C/C++ / Code Generation" from the tree view. Select -"Debug" in the "Configuration" combo box. Make sure that "Runtime -Library" is set to "Multi-threaded Debug DLL". Then, select "Release" in -the "Configuration" combo box and make sure that "Runtime Library" is -set to "Multi-threaded DLL". - -@item Click "OK" to close the "Project / Properties" dialog box. - -@item MSVC++ lacks some C99 header files that are fundamental for Libav. -Get msinttypes from @url{http://code.google.com/p/msinttypes/downloads/list} -and install it in MSVC++'s include directory -(i.e. @file{C:\Program Files\Microsoft Visual Studio 8\VC\include}). - -@item MSVC++ also does not understand the @code{inline} keyword used by -Libav, so you must add this line before @code{#include}ing libav*: -@example -#define inline _inline -@end example - -@item Build your application, everything should work. - -@end enumerate - -@subsubsection Using shared libraries - -This is how to create DLL and LIB files that are compatible with MSVC++: - -@enumerate - -@item Add a call to @file{vcvars32.bat} (which sets up the environment -variables for the Visual C++ tools) as the first line of @file{msys.bat}. -The standard location for @file{vcvars32.bat} is -@file{C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat}, -and the standard location for @file{msys.bat} is @file{C:\msys\1.0\msys.bat}. -If this corresponds to your setup, add the following line as the first line -of @file{msys.bat}: - -@example -call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" -@end example - -Alternatively, you may start the @file{Visual Studio 2005 Command Prompt}, -and run @file{c:\msys\1.0\msys.bat} from there. - -@item Within the MSYS shell, run @code{lib.exe}. If you get a help message -from @file{Microsoft (R) Library Manager}, this means your environment -variables are set up correctly, the @file{Microsoft (R) Library Manager} -is on the path and will be used by Libav to create -MSVC++-compatible import libraries. - -@item Build Libav with - -@example -./configure --enable-shared --enable-memalign-hack -make -make install -@end example - -Your install path (@file{/usr/local/} by default) should now have the -necessary DLL and LIB files under the @file{bin} directory. - -@end enumerate - -To use those files with MSVC++, do the same as you would do with -the static libraries, as described above. But in Step 4, -you should only need to add the directory where the LIB files are installed -(i.e. @file{c:\msys\usr\local\bin}). This is not a typo, the LIB files are -installed in the @file{bin} directory. And instead of adding the static -libraries (@file{libxxx.a} files) you should add the MSVC import libraries -(@file{avcodec.lib}, @file{avformat.lib}, and -@file{avutil.lib}). Note that you should not use the GCC import -libraries (@file{libxxx.dll.a} files), as these will give you undefined -reference errors. There should be no need for @file{libmingwex.a}, -@file{libgcc.a}, and @file{wsock32.lib}, nor any other external library -statically linked into the DLLs. The @file{bin} directory contains a bunch -of DLL files, but the ones that are actually used to run your application -are the ones with a major version number in their filenames -(i.e. @file{avcodec-51.dll}). - -Libav headers do not declare global data for Windows DLLs through the usual -dllexport/dllimport interface. Such data will be exported properly while -building, but to use them in your MSVC++ code you will have to edit the -appropriate headers and mark the data as dllimport. For example, in -libavutil/pixdesc.h you should have: -@example -extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[]; -@end example - -Note that using import libraries created by dlltool requires -the linker optimization option to be set to -"References: Keep Unreferenced Data (/OPT:NOREF)", otherwise -the resulting binaries will fail during runtime. This isn't -required when using import libraries generated by lib.exe. - -@subsection Cross compilation for Windows with Linux - -You must use the MinGW cross compilation tools available at -@url{http://www.mingw.org/}. - -Then configure Libav with the following options: -@example -./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc- -@end example -(you can change the cross-prefix according to the prefix chosen for the -MinGW tools). - -Then you can easily test Libav with Wine -(@url{http://www.winehq.com/}). - -@subsection Compilation under Cygwin - -Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack -llrint() in its C library. - -Install your Cygwin with all the "Base" packages, plus the -following "Devel" ones: -@example -binutils, gcc4-core, make, git, mingw-runtime, texi2html -@end example - -And the following "Utils" one: -@example -diffutils -@end example - -Then run - -@example -./configure --enable-static --disable-shared -@end example - -to make a static build. - -The current @code{gcc4-core} package is buggy and needs this flag to build -shared libraries: - -@example -./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions -@end example - -If you want to build Libav with additional libraries, download Cygwin -"Devel" packages for Ogg and Vorbis from any Cygwin packages repository: -@example -libogg-devel, libvorbis-devel -@end example - -These library packages are only available from Cygwin Ports -(@url{http://sourceware.org/cygwinports/}) : - -@example -yasm, libSDL-devel, libdirac-devel, libfaac-devel, libgsm-devel, -libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel, -libxvidcore-devel -@end example - -The recommendation for libnut and x264 is to build them from source by -yourself, as they evolve too quickly for Cygwin Ports to be up to date. - -Cygwin 1.7.x has IPv6 support. You can add IPv6 to Cygwin 1.5.x by means -of the @code{libgetaddrinfo-devel} package, available at Cygwin Ports. - -@subsection Crosscompilation for Windows under Cygwin - -With Cygwin you can create Windows binaries that do not need the cygwin1.dll. - -Just install your Cygwin as explained before, plus these additional -"Devel" packages: -@example -gcc-mingw-core, mingw-runtime, mingw-zlib -@end example - -and add some special flags to your configure invocation. - -For a static build run -@example -./configure --target-os=mingw32 --enable-memalign-hack --enable-static --disable-shared --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin -@end example - -and for a build with shared libraries -@example -./configure --target-os=mingw32 --enable-memalign-hack --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin -@end example - @bye diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/git-howto.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/git-howto.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/git-howto.texi 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/git-howto.texi 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,344 @@ +\input texinfo @c -*- texinfo -*- + +@settitle Using git to develop Libav + +@titlepage +@center @titlefont{Using git to develop Libav} +@end titlepage + +@top + +@contents + +@chapter Introduction + +This document aims in giving some quick references on a set of useful git +commands. You should always use the extensive and detailed documentation +provided directly by git: + +@example +git --help +man git +@end example + +shows you the available subcommands, + +@example +git --help +man git- +@end example + +shows information about the subcommand . + +Additional information could be found on the +@url{http://gitref.org, Git Reference} website + +For more information about the Git project, visit the + +@url{http://git-scm.com/, Git website} + +Consult these resources whenever you have problems, they are quite exhaustive. + +What follows now is a basic introduction to Git and some Libav-specific +guidelines to ease the contribution to the project + +@chapter Basics Usage + +@section Get GIT + +You can get git from @url{http://git-scm.com/} +Most distribution and operating system provide a package for it. + + +@section Cloning the source tree + +@example +git clone git://git.libav.org/libav.git +@end example + +This will put the Libav sources into the directory @var{}. + +@example +git clone git@@git.libav.org:libav.git +@end example + +This will put the Libav sources into the directory @var{} and let +you push back your changes to the remote repository. + + +@section Updating the source tree to the latest revision + +@example +git pull (--rebase) +@end example + +pulls in the latest changes from the tracked branch. The tracked branch +can be remote. By default the master branch tracks the branch master in +the remote origin. + +@float IMPORTANT +Since merge commits are forbidden @command{--rebase} (see below) is recommended. +@end float + +@section Rebasing your local branches + +@example +git pull --rebase +@end example + +fetches the changes from the main repository and replays your local commits +over it. This is required to keep all your local changes at the top of +Libav's master tree. The master tree will reject pushes with merge commits. + + +@section Adding/removing files/directories + +@example +git add [-A] +git rm [-r] +@end example + +GIT needs to get notified of all changes you make to your working +directory that makes files appear or disappear. +Line moves across files are automatically tracked. + + +@section Showing modifications + +@example +git diff +@end example + +will show all local modifications in your working directory as unified diff. + + +@section Inspecting the changelog + +@example +git log +@end example + +You may also use the graphical tools like gitview or gitk or the web +interface available at http://git.libav.org/ + +@section Checking source tree status + +@example +git status +@end example + +detects all the changes you made and lists what actions will be taken in case +of a commit (additions, modifications, deletions, etc.). + + +@section Committing + +@example +git diff --check +@end example + +to double check your changes before committing them to avoid trouble later +on. All experienced developers do this on each and every commit, no matter +how small. +Every one of them has been saved from looking like a fool by this many times. +It's very easy for stray debug output or cosmetic modifications to slip in, +please avoid problems through this extra level of scrutiny. + +For cosmetics-only commits you should get (almost) empty output from + +@example +git diff -w -b +@end example + +Also check the output of + +@example +git status +@end example + +to make sure you don't have untracked files or deletions. + +@example +git add [-i|-p|-A] +@end example + +Make sure you have told git your name and email address + +@example +git config --global user.name "My Name" +git config --global user.email my@@email.invalid +@end example + +Use @var{--global} to set the global configuration for all your git checkouts. + +Git will select the changes to the files for commit. Optionally you can use +the interactive or the patch mode to select hunk by hunk what should be +added to the commit. + + +@example +git commit +@end example + +Git will commit the selected changes to your current local branch. + +You will be prompted for a log message in an editor, which is either +set in your personal configuration file through + +@example +git config --global core.editor +@end example + +or set by one of the following environment variables: +@var{GIT_EDITOR}, @var{VISUAL} or @var{EDITOR}. + +Log messages should be concise but descriptive. Explain why you made a change, +what you did will be obvious from the changes themselves most of the time. +Saying just "bug fix" or "10l" is bad. Remember that people of varying skill +levels look at and educate themselves while reading through your code. Don't +include filenames in log messages, Git provides that information. + +Possibly make the commit message have a terse, descriptive first line, an +empty line and then a full description. The first line will be used to name +the patch by git format-patch. + +@section Preparing a patchset + +@example +git format-patch [-o directory] +@end example + +will generate a set of patches for each commit between @var{} and +current @var{HEAD}. E.g. + +@example +git format-patch origin/master +@end example + +will generate patches for all commits on current branch which are not +present in upstream. +A useful shortcut is also + +@example +git format-patch -n +@end example + +which will generate patches from last @var{n} commits. +By default the patches are created in the current directory. + +@section Sending patches for review + +@example +git send-email +@end example + +will send the patches created by @command{git format-patch} or directly +generates them. All the email fields can be configured in the global/local +configuration or overridden by command line. +Note that this tool must often be installed separately (e.g. @var{git-email} +package on Debian-based distros). + + +@section Renaming/moving/copying files or contents of files + +Git automatically tracks such changes, making those normal commits. + +@example +mv/cp path/file otherpath/otherfile +git add [-A] . +git commit +@end example + + +@chapter Libav specific + +@section Reverting broken commits + +@example +git reset +@end example + +@command{git reset} will uncommit the changes till @var{} rewriting +the current branch history. + +@example +git commit --amend +@end example + +allows to amend the last commit details quickly. + +@example +git rebase -i origin/master +@end example + +will replay local commits over the main repository allowing to edit, merge +or remove some of them in the process. + +@float NOTE +@command{git reset}, @command{git commit --amend} and @command{git rebase} +rewrite history, so you should use them ONLY on your local or topic branches. +The main repository will reject those changes. +@end float + +@example +git revert +@end example + +@command{git revert} will generate a revert commit. This will not make the +faulty commit disappear from the history. + +@section Pushing changes to remote trees + +@example +git push +@end example + +Will push the changes to the default remote (@var{origin}). +Git will prevent you from pushing changes if the local and remote trees are +out of sync. Refer to and to sync the local tree. + +@example +git remote add +@end example + +Will add additional remote with a name reference, it is useful if you want +to push your local branch for review on a remote host. + +@example +git push +@end example + +Will push the changes to the @var{} repository. +Omitting @var{} makes @command{git push} update all the remote +branches matching the local ones. + +@section Finding a specific svn revision + +Since version 1.7.1 git supports @var{:/foo} syntax for specifying commits +based on a regular expression. see man gitrevisions + +@example +git show :/'as revision 23456' +@end example + +will show the svn changeset @var{r23456}. With older git versions searching in +the @command{git log} output is the easiest option (especially if a pager with +search capabilities is used). +This commit can be checked out with + +@example +git checkout -b svn_23456 :/'as revision 23456' +@end example + +or for git < 1.7.1 with + +@example +git checkout -b svn_23456 $SHA1 +@end example + +where @var{$SHA1} is the commit hash from the @command{git log} output. + +@chapter Server Issues + +Contact the project admins @email{git@@libav.org} if you have technical +problems with the GIT server. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/git-howto.txt mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/git-howto.txt --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/git-howto.txt 2011-04-11 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/git-howto.txt 2012-01-11 00:34:30.000000000 +0000 @@ -205,8 +205,19 @@ git format-patch [-o directory] - will generate a set of patches out of the current branch starting from - commit. By default the patches are created in the current directory. + will generate a set of patches for each commit between and + current HEAD. E.g. + + git format-patch origin/master + + will generate patches for all commits on current branch which are not + present in upstream. + A useful shortcut is also + + git format-patch -n + + which will generate patches from last n commits. + By default the patches are created in the current directory. 11. Sending patches for review @@ -215,6 +226,8 @@ will send the patches created by git format-patch or directly generates them. All the email fields can be configured in the global/local configuration or overridden by command line. + Note that this tool must often be installed separately (e.g. git-email + package on Debian-based distros). 12. Pushing changes to remote trees diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/indevs.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/indevs.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/indevs.texi 2011-03-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/indevs.texi 2012-01-11 00:34:30.000000000 +0000 @@ -42,10 +42,10 @@ To see the list of cards currently recognized by your system check the files @file{/proc/asound/cards} and @file{/proc/asound/devices}. -For example to capture with @file{ffmpeg} from an ALSA device with +For example to capture with @command{avconv} from an ALSA device with card id 0, you may run the command: @example -ffmpeg -f alsa -i hw:0 alsaout.wav +avconv -f alsa -i hw:0 alsaout.wav @end example For more information see: @@ -72,14 +72,14 @@ Documentation/fb/framebuffer.txt included in the Linux source tree. To record from the framebuffer device @file{/dev/fb0} with -@file{ffmpeg}: +@command{avconv}: @example -ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi +avconv -f fbdev -r 10 -i /dev/fb0 out.avi @end example You can take a single screenshot image with the command: @example -ffmpeg -f fbdev -vframes 1 -r 1 -i /dev/fb0 screenshot.jpeg +avconv -f fbdev -frames:v 1 -r 1 -i /dev/fb0 screenshot.jpeg @end example See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1). @@ -109,10 +109,10 @@ @file{jack_lsp}. Follows an example which shows how to capture a JACK readable client -with @file{ffmpeg}. +with @command{avconv}. @example -# Create a JACK writable client with name "ffmpeg". -$ ffmpeg -f jack -i ffmpeg -y out.wav +# Create a JACK writable client with name "libav". +$ avconv -f jack -i libav -y out.wav # Start the sample jack_metro readable client. $ jack_metro -b 120 -d 0.2 -f 4000 @@ -123,11 +123,11 @@ system:capture_2 system:playback_1 system:playback_2 -ffmpeg:input_1 +libav:input_1 metro:120_bpm -# Connect metro to the ffmpeg writable client. -$ jack_connect metro:120_bpm ffmpeg:input_1 +# Connect metro to the avconv writable client. +$ jack_connect metro:120_bpm libav:input_1 @end example For more information read: @@ -145,15 +145,98 @@ representing the OSS input device, and is usually set to @file{/dev/dsp}. -For example to grab from @file{/dev/dsp} using @file{ffmpeg} use the +For example to grab from @file{/dev/dsp} using @command{avconv} use the command: @example -ffmpeg -f oss -i /dev/dsp /tmp/oss.wav +avconv -f oss -i /dev/dsp /tmp/oss.wav @end example For more information about OSS see: @url{http://manuals.opensound.com/usersguide/dsp.html} +@section pulse + +pulseaudio input device. + +To enable this input device during configuration you need libpulse-simple +installed in your system. + +The filename to provide to the input device is a source device or the +string "default" + +To list the pulse source devices and their properties you can invoke +the command @file{pactl list sources}. + +@example +avconv -f pulse -i default /tmp/pulse.wav +@end example + +@subsection @var{server} AVOption + +The syntax is: +@example +-server @var{server name} +@end example + +Connects to a specific server. + +@subsection @var{name} AVOption + +The syntax is: +@example +-name @var{application name} +@end example + +Specify the application name pulse will use when showing active clients, +by default it is "libav" + +@subsection @var{stream_name} AVOption + +The syntax is: +@example +-stream_name @var{stream name} +@end example + +Specify the stream name pulse will use when showing active streams, +by default it is "record" + +@subsection @var{sample_rate} AVOption + +The syntax is: +@example +-sample_rate @var{samplerate} +@end example + +Specify the samplerate in Hz, by default 48kHz is used. + +@subsection @var{channels} AVOption + +The syntax is: +@example +-channels @var{N} +@end example + +Specify the channels in use, by default 2 (stereo) is set. + +@subsection @var{frame_size} AVOption + +The syntax is: +@example +-frame_size @var{bytes} +@end example + +Specify the number of byte per frame, by default it is set to 1024. + +@subsection @var{fragment_size} AVOption + +The syntax is: +@example +-fragment_size @var{bytes} +@end example + +Specify the minimal buffering fragment in pulseaudio, it will affect the +audio latency. By default it is unset. + @section sndio sndio input device. @@ -165,10 +248,10 @@ representing the sndio input device, and is usually set to @file{/dev/audio0}. -For example to grab from @file{/dev/audio0} using @file{ffmpeg} use the +For example to grab from @file{/dev/audio0} using @command{avconv} use the command: @example -ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav +avconv -f sndio -i /dev/audio0 /tmp/oss.wav @end example @section video4linux and video4linux2 @@ -184,7 +267,7 @@ Video4Linux and Video4Linux2 devices only support a limited set of @var{width}x@var{height} sizes and framerates. You can check which are supported for example with the command @file{dov4l} for Video4Linux -devices and the command @file{v4l-info} for Video4Linux2 devices. +devices and using @command{-list_formats all} for Video4Linux2 devices. If the size for the device is set to 0x0, the input device will try to autodetect the size to use. @@ -199,15 +282,15 @@ @example # Grab and show the input of a video4linux device, frame rate is set # to the default of 25/1. -ffplay -s 320x240 -f video4linux /dev/video0 +avplay -s 320x240 -f video4linux /dev/video0 # Grab and show the input of a video4linux2 device, autoadjust size. -ffplay -f video4linux2 /dev/video0 +avplay -f video4linux2 /dev/video0 # Grab and record the input of a video4linux2 device, autoadjust size, # frame rate value defaults to 0/0 so it is read from the video4linux2 # driver. -ffmpeg -f video4linux2 -i /dev/video0 out.mpeg +avconv -f video4linux2 -i /dev/video0 out.mpeg @end example @section vfwcap @@ -243,12 +326,51 @@ Use the @file{dpyinfo} program for getting basic information about the properties of your X11 display (e.g. grep for "name" or "dimensions"). -For example to grab from @file{:0.0} using @file{ffmpeg}: +For example to grab from @file{:0.0} using @command{avconv}: @example -ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg +avconv -f x11grab -r 25 -s cif -i :0.0 out.mpg # Grab at position 10,20. -ffmpeg -f x11grab -25 -s cif -i :0.0+10,20 out.mpg +avconv -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg +@end example + +@subsection @var{follow_mouse} AVOption + +The syntax is: +@example +-follow_mouse centered|@var{PIXELS} +@end example + +When it is specified with "centered", the grabbing region follows the mouse +pointer and keeps the pointer at the center of region; otherwise, the region +follows only when the mouse pointer reaches within @var{PIXELS} (greater than +zero) to the edge of region. + +For example: +@example +avconv -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg + +# Follows only when the mouse pointer reaches within 100 pixels to edge +avconv -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg +@end example + +@subsection @var{show_region} AVOption + +The syntax is: +@example +-show_region 1 +@end example + +If @var{show_region} AVOption is specified with @var{1}, then the grabbing +region will be indicated on screen. With this option, it's easy to know what is +being grabbed if only a portion of the screen is grabbed. + +For example: +@example +avconv -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg + +# With follow_mouse +avconv -f x11grab -follow_mouse centered -show_region 1 -r 25 -s cif -i :0.0 out.mpg @end example @c man end INPUT DEVICES diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/issue_tracker.txt mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/issue_tracker.txt --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/issue_tracker.txt 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/issue_tracker.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,228 +0,0 @@ -Libav's bug/patch/feature request tracker manual -================================================ - -NOTE: This is a draft. - -Overview: ---------- -Libav uses Roundup for tracking issues, new issues and changes to -existing issues can be done through a web interface and through email. -It is possible to subscribe to individual issues by adding yourself to the -nosy list or to subscribe to the ffmpeg-issues mailing list which receives -a mail for every change to every issue. Replies to such mails will also -be properly added to the respective issue. -(the above does all work already after light testing) -The subscription URL for the ffmpeg-issues list is: -http://live.polito/mailman/listinfo/ffmpeg-issues -The URL of the webinterface of the tracker is: -http(s)://roundup.libav.org/ -Note the URLs in this document are obfuscated, you must append the top level -domain for non-profit organizations to the tracker, and of Italy to the -mailing list. - -Email Interface: ----------------- -There is a mailing list to which all new issues and changes to existing issues -are sent. You can subscribe through -http://live.polito/mailman/listinfo/ffmpeg-issues -Replies to messages there will have their text added to the specific issues. -Attachments will be added as if they had been uploaded via the web interface. -You can change the status, substatus, topic, ... by changing the subject in -your reply like: -Re: [issue94] register_avcodec and allcodecs.h [type=patch;status=open;substatus=approved] -Roundup will then change things as you requested and remove the [...] from -the subject before forwarding the mail to the mailing list. - - -NOTE: issue = (bug report || patch || feature request) - -Type: ------ -bug - An error, flaw, mistake, failure, or fault in ffmpeg or libav* that - prevents it from behaving as intended. - -feature request - Request of support for encoding or decoding of a new codec, container - or variant. - Request of support for more, less or plain different output or behavior - where the current implementation cannot be considered wrong. - -patch - A patch as generated by diff which conforms to the patch submission and - development policy. - - -Priority: ---------- -critical - Bugs and patches which deal with data loss and security issues. - No feature request can be critical. - -important - Bugs which make Libav unusable for a significant number of users, and - patches fixing them. - Examples here might be completely broken MPEG-4 decoding or a build issue - on Linux. - While broken 4xm decoding or a broken OS/2 build would not be important, - the separation to normal is somewhat fuzzy. - For feature requests this priority would be used for things many people - want. - -normal - - -minor - Bugs and patches about things like spelling errors, "mp2" instead of - "mp3" being shown and such. - Feature requests about things few people want or which do not make a big - difference. - -wish - Something that is desirable to have but that there is no urgency at - all to implement, e.g. something completely cosmetic like a website - restyle or a personalized doxy template or the Libav logo. - This priority is not valid for bugs. - - -Status: -------- -new - initial state - -open - intermediate states - -closed - final state - - -Type/Status/Substatus: ----------- -*/new/new - Initial state of new bugs, patches and feature requests submitted by - users. - -*/open/open - Issues which have been briefly looked at and which did not look outright - invalid. - This implicates that no real more detailed state applies yet. Conversely, - the more detailed states below implicate that the issue has been briefly - looked at. - -*/closed/duplicate - Bugs, patches or feature requests which are duplicates. - Note that patches dealing with the same thing in a different way are not - duplicates. - Note, if you mark something as duplicate, do not forget setting the - superseder so bug reports are properly linked. - -*/closed/invalid - Bugs caused by user errors, random ineligible or otherwise nonsense stuff. - -*/closed/needs_more_info - Issues for which some information has been requested by the developers, - but which has not been provided by anyone within reasonable time. - -bug/open/reproduced - Bugs which have been reproduced. - -bug/open/analyzed - Bugs which have been analyzed and where it is understood what causes them - and which exact chain of events triggers them. This analysis should be - available as a message in the bug report. - Note, do not change the status to analyzed without also providing a clear - and understandable analysis. - This state implicates that the bug either has been reproduced or that - reproduction is not needed as the bug is already understood. - -bug/open/needs_more_info - Bug reports which are incomplete and or where more information is needed - from the submitter or another person who can provide it. - This state implicates that the bug has not been analyzed or reproduced. - Note, the idea behind needs_more_info is to offload work from the - developers to the users whenever possible. - -bug/closed/fixed - Bugs which have to the best of our knowledge been fixed. - -bug/closed/wont_fix - Bugs which we will not fix. Possible reasons include legality, high - complexity for the sake of supporting obscure corner cases, speed loss - for similarly esoteric purposes, et cetera. - This also means that we would reject a patch. - If we are just too lazy to fix a bug then the correct state is open - and unassigned. Closed means that the case is closed which is not - the case if we are just waiting for a patch. - -bug/closed/works_for_me - Bugs for which sufficient information was provided to reproduce but - reproduction failed - that is the code seems to work correctly to the - best of our knowledge. - -patch/open/approved - Patches which have been reviewed and approved by a developer. - Such patches can be applied anytime by any other developer after some - reasonable testing (compile + regression tests + does the patch do - what the author claimed). - -patch/open/needs_changes - Patches which have been reviewed and need changes to be accepted. - -patch/closed/applied - Patches which have been applied. - -patch/closed/rejected - Patches which have been rejected. - -feature_request/open/needs_more_info - Feature requests where it is not clear what exactly is wanted - (these also could be closed as invalid ...). - -feature_request/closed/implemented - Feature requests which have been implemented. - -feature_request/closed/wont_implement - Feature requests which will not be implemented. The reasons here could - be legal, philosophical or others. - -Note, please do not use type-status-substatus combinations other than the -above without asking on libav-devel first! - -Note2, if you provide the requested info do not forget to remove the -needs_more_info substate. - -Topic: ------- -A topic is a tag you should add to your issue in order to make grouping them -easier. - -avcodec - issues in libavcodec/* - -avformat - issues in libavformat/* - -avutil - issues in libavutil/* - -regression test - issues in tests/* - -ffmpeg - issues in or related to ffmpeg.c - -ffplay - issues in or related to ffplay.c - -ffserver - issues in or related to ffserver.c - -build system - issues in or related to configure/Makefile - -regression - bugs which were working in a past revision - -roundup - issues related to our issue tracker diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/libavfilter.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/libavfilter.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/libavfilter.texi 2011-03-19 06:37:12.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/libavfilter.texi 2012-01-11 00:34:30.000000000 +0000 @@ -14,18 +14,6 @@ Libavfilter is the filtering API of Libav. It is the substitute of the now deprecated 'vhooks' and started as a Google Summer of Code project. -Integrating libavfilter into the main Libav repository is a work in -progress. If you wish to try the unfinished development code of -libavfilter then check it out from the libavfilter repository into -some directory of your choice by: - -@example - svn checkout svn://svn.libav.org/soc/libavfilter -@end example - -And then read the README file in the top directory to learn how to -integrate it into ffmpeg and ffplay. - But note that there may still be serious bugs in the code and its API and ABI should not be considered stable yet! @@ -48,15 +36,14 @@ overlaying it on top. You can use the following command to achieve this: @example -./ffmpeg -i in.avi -s 240x320 -vf "[in] split [T1], fifo, [T2] overlay= 0:240 [out]; [T1] fifo, crop=0:0:-1:240, vflip [T2] +./avconv -i input -vf "[in] split [T1], fifo, [T2] overlay=0:H/2 [out]; [T1] fifo, crop=iw:ih/2:0:ih/2, vflip [T2]" output @end example -where input_video.avi has a vertical resolution of 480 pixels. The -result will be that in output the top half of the video is mirrored +The result will be that in output the top half of the video is mirrored onto the bottom half. Video filters are loaded using the @var{-vf} option passed to -ffmpeg or to ffplay. Filters in the same linear chain are separated by +avconv or to avplay. Filters in the same linear chain are separated by commas. In our example, @var{split, fifo, overlay} are in one linear chain, and @var{fifo, crop, vflip} are in another. The points where the linear chains join are labeled by names enclosed in square diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/Makefile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/Makefile 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/Makefile 2012-01-11 00:34:30.000000000 +0000 @@ -1,8 +1,15 @@ MANPAGES = $(PROGS-yes:%=doc/%.1) PODPAGES = $(PROGS-yes:%=doc/%.pod) -HTMLPAGES = $(PROGS-yes:%=doc/%.html) +HTMLPAGES = $(PROGS-yes:%=doc/%.html) \ + doc/developer.html \ + doc/faq.html \ + doc/fate.html \ + doc/general.html \ + doc/git-howto.html \ + doc/libavfilter.html \ + doc/platform.html \ -DOCS = $(addprefix doc/, developer.html faq.html general.html libavfilter.html) $(HTMLPAGES) $(MANPAGES) $(PODPAGES) +DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES) all-$(CONFIG_DOC): documentation @@ -11,19 +18,22 @@ TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d) doc/%.html: TAG = HTML -doc/%.html: doc/%.texi $(SRC_PATH_BARE)/doc/t2h.init +doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(Q)$(TEXIDEP) - $(M)texi2html -monolithic --init-file $(SRC_PATH_BARE)/doc/t2h.init --output $@ $< + $(M)texi2html -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $< doc/%.pod: TAG = POD doc/%.pod: doc/%.texi $(Q)$(TEXIDEP) - $(M)doc/texi2pod.pl $< $@ + $(M)$(SRC_PATH)/doc/texi2pod.pl $< $@ doc/%.1: TAG = MAN doc/%.1: doc/%.pod $(M)pod2man --section=1 --center=" " --release=" " $< > $@ +$(DOCS): | doc +OBJDIRS += doc + install-progs-$(CONFIG_DOC): install-man install-man: $(MANPAGES) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/muxers.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/muxers.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/muxers.texi 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/muxers.texi 2012-01-11 00:34:30.000000000 +0000 @@ -35,23 +35,23 @@ For example to compute the CRC of the input, and store it in the file @file{out.crc}: @example -ffmpeg -i INPUT -f crc out.crc +avconv -i INPUT -f crc out.crc @end example You can print the CRC to stdout with the command: @example -ffmpeg -i INPUT -f crc - +avconv -i INPUT -f crc - @end example -You can select the output format of each frame with @file{ffmpeg} by +You can select the output format of each frame with @command{avconv} by specifying the audio and video codec and format. For example to compute the CRC of the input audio converted to PCM unsigned 8-bit and the input video converted to MPEG-2 video, use the command: @example -ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f crc - +avconv -i INPUT -c:a pcm_u8 -c:v mpeg2video -f crc - @end example -See also the @code{framecrc} muxer (@pxref{framecrc}). +See also the @ref{framecrc} muxer. @anchor{framecrc} @section framecrc @@ -71,25 +71,26 @@ For example to compute the CRC of each decoded frame in the input, and store it in the file @file{out.crc}: @example -ffmpeg -i INPUT -f framecrc out.crc +avconv -i INPUT -f framecrc out.crc @end example You can print the CRC of each decoded frame to stdout with the command: @example -ffmpeg -i INPUT -f framecrc - +avconv -i INPUT -f framecrc - @end example -You can select the output format of each frame with @file{ffmpeg} by +You can select the output format of each frame with @command{avconv} by specifying the audio and video codec and format. For example, to compute the CRC of each decoded input audio frame converted to PCM unsigned 8-bit and of each decoded input video frame converted to MPEG-2 video, use the command: @example -ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f framecrc - +avconv -i INPUT -c:a pcm_u8 -c:v mpeg2video -f framecrc - @end example -See also the @code{crc} muxer (@pxref{crc}). +See also the @ref{crc} muxer. +@anchor{image2} @section image2 Image file muxer. @@ -119,26 +120,26 @@ form @file{img%-1.jpg}, @file{img%-2.jpg}, ..., @file{img%-10.jpg}, etc. -The following example shows how to use @file{ffmpeg} for creating a +The following example shows how to use @command{avconv} for creating a sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ..., taking one image every second from the input video: @example -ffmpeg -i in.avi -r 1 -f image2 'img-%03d.jpeg' +avconv -i in.avi -vsync 1 -r 1 -f image2 'img-%03d.jpeg' @end example -Note that with @file{ffmpeg}, if the format is not specified with the +Note that with @command{avconv}, if the format is not specified with the @code{-f} option and the output filename specifies an image file format, the image2 muxer is automatically selected, so the previous command can be written as: @example -ffmpeg -i in.avi -r 1 'img-%03d.jpeg' +avconv -i in.avi -vsync 1 -r 1 'img-%03d.jpeg' @end example Note also that the pattern must not necessarily contain "%d" or "%0@var{N}d", for example to create a single image file @file{img.jpeg} from the input video you can employ the command: @example -ffmpeg -i in.avi -f image2 -vframes 1 img.jpeg +avconv -i in.avi -f image2 -frames:v 1 img.jpeg @end example @section mpegts @@ -171,7 +172,7 @@ @code{service_name} is "Service01". @example -ffmpeg -i file.mpg -acodec copy -vcodec copy \ +avconv -i file.mpg -c copy \ -mpegts_original_network_id 0x1122 \ -mpegts_transport_stream_id 0x3344 \ -mpegts_service_id 0x5566 \ @@ -189,19 +190,19 @@ This muxer does not generate any output file, it is mainly useful for testing or benchmarking purposes. -For example to benchmark decoding with @file{ffmpeg} you can use the +For example to benchmark decoding with @command{avconv} you can use the command: @example -ffmpeg -benchmark -i INPUT -f null out.null +avconv -benchmark -i INPUT -f null out.null @end example Note that the above command does not read or write the @file{out.null} -file, but specifying the output file is required by the @file{ffmpeg} +file, but specifying the output file is required by the @command{avconv} syntax. Alternatively you can write the command as: @example -ffmpeg -benchmark -i INPUT -f null - +avconv -benchmark -i INPUT -f null - @end example @section matroska @@ -264,7 +265,38 @@ For example a 3D WebM clip can be created using the following command line: @example -ffmpeg -i sample_left_right_clip.mpg -an -vcodec libvpx -metadata STEREO_MODE=left_right -y stereo_clip.webm +avconv -i sample_left_right_clip.mpg -an -c:v libvpx -metadata STEREO_MODE=left_right -y stereo_clip.webm @end example +@section segment + +Basic stream segmenter. + +The segmenter muxer outputs streams to a number of separate files of nearly +fixed duration. Output filename pattern can be set in a fashion similar to +@ref{image2}. + +Every segment starts with a video keyframe, if a video stream is present. +The segment muxer works best with a single constant frame rate video. + +Optionally it can generate a flat list of the created segments, one segment +per line. + +@table @option +@item segment_format @var{format} +Override the inner container format, by default it is guessed by the filename +extension. +@item segment_time @var{t} +Set segment duration to @var{t} seconds. +@item segment_list @var{name} +Generate also a listfile named @var{name}. +@item segment_list_size @var{size} +Overwrite the listfile once it reaches @var{size} entries. +@end table + +@example +avconv -i in.mkv -c copy -map 0 -f segment -list out.list out%03d.nut +@end example + + @c man end MUXERS diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/platform.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/platform.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/platform.texi 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/platform.texi 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,359 @@ +\input texinfo @c -*- texinfo -*- + +@settitle Platform Specific information +@titlepage +@center @titlefont{Platform Specific information} +@end titlepage + +@top + +@contents + +@chapter Unix-like + +Some parts of Libav cannot be built with version 2.15 of the GNU +assembler which is still provided by a few AMD64 distributions. To +make sure your compiler really uses the required version of gas +after a binutils upgrade, run: + +@example +$(gcc -print-prog-name=as) --version +@end example + +If not, then you should install a different compiler that has no +hard-coded path to gas. In the worst case pass @code{--disable-asm} +to configure. + +@section BSD + +BSD make will not build Libav, you need to install and use GNU Make +(@file{gmake}). + +@section (Open)Solaris + +GNU Make is required to build Libav, so you have to invoke (@file{gmake}), +standard Solaris Make will not work. When building with a non-c99 front-end +(gcc, generic suncc) add either @code{--extra-libs=/usr/lib/values-xpg6.o} +or @code{--extra-libs=/usr/lib/64/values-xpg6.o} to the configure options +since the libc is not c99-compliant by default. The probes performed by +configure may raise an exception leading to the death of configure itself +due to a bug in the system shell. Simply invoke a different shell such as +bash directly to work around this: + +@example +bash ./configure +@end example + +@anchor{Darwin} +@section Darwin (OSX, iPhone) + +The toolchain provided with Xcode is sufficient to build the basic +unacelerated code. + +OSX on PowerPC or ARM (iPhone) requires a preprocessor from +@url{http://github.com/yuvi/gas-preprocessor} to build the optimized +assembler functions. Just download the Perl script and put it somewhere +in your PATH, Libav's configure will pick it up automatically. + +OSX on amd64 and x86 requires @command{yasm} to build most of the +optimized assembler functions @url{http://mxcl.github.com/homebrew/, Homebrew}, +@url{http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml, Gentoo Prefix} +or @url{http://www.macports.org, MacPorts} can easily provide it. + + +@chapter DOS + +Using a cross-compiler is preferred for various reasons. +@url{http://www.delorie.com/howto/djgpp/linux-x-djgpp.html} + + +@chapter OS/2 + +For information about compiling Libav on OS/2 see +@url{http://www.edm2.com/index.php/FFmpeg}. + + +@chapter Windows + +@section Native Windows compilation + +Libav can be built to run natively on Windows using the MinGW tools. Install +the latest versions of MSYS and MinGW from @url{http://www.mingw.org/}. +You can find detailed installation +instructions in the download section and the FAQ. + +Libav does not build out-of-the-box with the packages the automated MinGW +installer provides. It also requires coreutils to be installed and many other +packages updated to the latest version. The minimum version for some packages +are listed below: + +@itemize +@item bash 3.1 +@item msys-make 3.81-2 (note: not mingw32-make) +@item w32api 3.13 +@item mingw-runtime 3.15 +@end itemize + +Libav automatically passes @code{-fno-common} to the compiler to work around +a GCC bug (see @url{http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216}). + +Notes: + +@itemize + +@item Building natively using MSYS can be sped up by disabling implicit rules +in the Makefile by calling @code{make -r} instead of plain @code{make}. This +speed up is close to non-existent for normal one-off builds and is only +noticeable when running make for a second time (for example in +@code{make install}). + +@item In order to compile AVplay, you must have the MinGW development library +of @uref{http://www.libsdl.org/, SDL}. +Edit the @file{bin/sdl-config} script so that it points to the correct prefix +where SDL was installed. Verify that @file{sdl-config} can be launched from +the MSYS command line. + +@item By using @code{./configure --enable-shared} when configuring Libav, +you can build libavutil, libavcodec and libavformat as DLLs. + +@end itemize + +@section Microsoft Visual C++ compatibility + +As stated in the FAQ, Libav will not compile under MSVC++. However, if you +want to use the libav* libraries in your own applications, you can still +compile those applications using MSVC++. But the libav* libraries you link +to @emph{must} be built with MinGW. However, you will not be able to debug +inside the libav* libraries, since MSVC++ does not recognize the debug +symbols generated by GCC. +We strongly recommend you to move over from MSVC++ to MinGW tools. + +This description of how to use the Libav libraries with MSVC++ is based on +Microsoft Visual C++ 2005 Express Edition. If you have a different version, +you might have to modify the procedures slightly. + +@subsection Using static libraries + +Assuming you have just built and installed Libav in @file{/usr/local}. + +@enumerate + +@item Create a new console application ("File / New / Project") and then +select "Win32 Console Application". On the appropriate page of the +Application Wizard, uncheck the "Precompiled headers" option. + +@item Write the source code for your application, or, for testing, just +copy the code from an existing sample application into the source file +that MSVC++ has already created for you. For example, you can copy +@file{libavformat/output-example.c} from the Libav distribution. + +@item Open the "Project / Properties" dialog box. In the "Configuration" +combo box, select "All Configurations" so that the changes you make will +affect both debug and release builds. In the tree view on the left hand +side, select "C/C++ / General", then edit the "Additional Include +Directories" setting to contain the path where the Libav includes were +installed (i.e. @file{c:\msys\1.0\local\include}). +Do not add MinGW's include directory here, or the include files will +conflict with MSVC's. + +@item Still in the "Project / Properties" dialog box, select +"Linker / General" from the tree view and edit the +"Additional Library Directories" setting to contain the @file{lib} +directory where Libav was installed (i.e. @file{c:\msys\1.0\local\lib}), +the directory where MinGW libs are installed (i.e. @file{c:\mingw\lib}), +and the directory where MinGW's GCC libs are installed +(i.e. @file{C:\mingw\lib\gcc\mingw32\4.2.1-sjlj}). Then select +"Linker / Input" from the tree view, and add the files @file{libavformat.a}, +@file{libavcodec.a}, @file{libavutil.a}, @file{libmingwex.a}, +@file{libgcc.a}, and any other libraries you used (i.e. @file{libz.a}) +to the end of "Additional Dependencies". + +@item Now, select "C/C++ / Code Generation" from the tree view. Select +"Debug" in the "Configuration" combo box. Make sure that "Runtime +Library" is set to "Multi-threaded Debug DLL". Then, select "Release" in +the "Configuration" combo box and make sure that "Runtime Library" is +set to "Multi-threaded DLL". + +@item Click "OK" to close the "Project / Properties" dialog box. + +@item MSVC++ lacks some C99 header files that are fundamental for Libav. +Get msinttypes from @url{http://code.google.com/p/msinttypes/downloads/list} +and install it in MSVC++'s include directory +(i.e. @file{C:\Program Files\Microsoft Visual Studio 8\VC\include}). + +@item MSVC++ also does not understand the @code{inline} keyword used by +Libav, so you must add this line before @code{#include}ing libav*: +@example +#define inline _inline +@end example + +@item Build your application, everything should work. + +@end enumerate + +@subsection Using shared libraries + +This is how to create DLL and LIB files that are compatible with MSVC++: + +Within the MSYS shell, build Libav with + +@example +./configure --enable-shared +make +make install +@end example + +Your install path (@file{/usr/local/} by default) should now have the +necessary DLL and LIB files under the @file{bin} directory. + +Alternatively, build the libraries with a cross compiler, according to +the instructions below in @ref{Cross compilation for Windows with Linux}. + +To use those files with MSVC++, do the same as you would do with +the static libraries, as described above. But in Step 4, +you should only need to add the directory where the LIB files are installed +(i.e. @file{c:\msys\usr\local\bin}). This is not a typo, the LIB files are +installed in the @file{bin} directory. And instead of adding the static +libraries (@file{libxxx.a} files) you should add the MSVC import libraries +(@file{avcodec.lib}, @file{avformat.lib}, and +@file{avutil.lib}). Note that you should not use the GCC import +libraries (@file{libxxx.dll.a} files), as these will give you undefined +reference errors. There should be no need for @file{libmingwex.a}, +@file{libgcc.a}, and @file{wsock32.lib}, nor any other external library +statically linked into the DLLs. + +Libav headers do not declare global data for Windows DLLs through the usual +dllexport/dllimport interface. Such data will be exported properly while +building, but to use them in your MSVC++ code you will have to edit the +appropriate headers and mark the data as dllimport. For example, in +libavutil/pixdesc.h you should have: +@example +extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[]; +@end example + +Note that using import libraries created by dlltool requires +the linker optimization option to be set to +"References: Keep Unreferenced Data (@code{/OPT:NOREF})", otherwise +the resulting binaries will fail during runtime. This isn't +required when using import libraries generated by lib.exe. +This issue is reported upstream at +@url{http://sourceware.org/bugzilla/show_bug.cgi?id=12633}. + +To create import libraries that work with the @code{/OPT:REF} option +(which is enabled by default in Release mode), follow these steps: + +@enumerate + +@item Open @file{Visual Studio 2005 Command Prompt}. + +Alternatively, in a normal command line prompt, call @file{vcvars32.bat} +which sets up the environment variables for the Visual C++ tools +(the standard location for this file is +@file{C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat}). + +@item Enter the @file{bin} directory where the created LIB and DLL files +are stored. + +@item Generate new import libraries with @file{lib.exe}: + +@example +lib /machine:i386 /def:..\lib\avcodec-53.def /out:avcodec.lib +lib /machine:i386 /def:..\lib\avdevice-53.def /out:avdevice.lib +lib /machine:i386 /def:..\lib\avfilter-2.def /out:avfilter.lib +lib /machine:i386 /def:..\lib\avformat-53.def /out:avformat.lib +lib /machine:i386 /def:..\lib\avutil-51.def /out:avutil.lib +lib /machine:i386 /def:..\lib\swscale-2.def /out:swscale.lib +@end example + +@end enumerate + +@anchor{Cross compilation for Windows with Linux} +@section Cross compilation for Windows with Linux + +You must use the MinGW cross compilation tools available at +@url{http://www.mingw.org/}. + +Then configure Libav with the following options: +@example +./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc- +@end example +(you can change the cross-prefix according to the prefix chosen for the +MinGW tools). + +Then you can easily test Libav with @uref{http://www.winehq.com/, Wine}. + +@section Compilation under Cygwin + +Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack +llrint() in its C library. + +Install your Cygwin with all the "Base" packages, plus the +following "Devel" ones: +@example +binutils, gcc4-core, make, git, mingw-runtime, texi2html +@end example + +And the following "Utils" one: +@example +diffutils +@end example + +Then run + +@example +./configure +@end example + +to make a static build. + +The current @code{gcc4-core} package is buggy and needs this flag to build +shared libraries: + +@example +./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions +@end example + +If you want to build Libav with additional libraries, download Cygwin +"Devel" packages for Ogg and Vorbis from any Cygwin packages repository: +@example +libogg-devel, libvorbis-devel +@end example + +These library packages are only available from +@uref{http://sourceware.org/cygwinports/, Cygwin Ports}: + +@example +yasm, libSDL-devel, libdirac-devel, libfaac-devel, libgsm-devel, +libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel, +libxvidcore-devel +@end example + +The recommendation for libnut and x264 is to build them from source by +yourself, as they evolve too quickly for Cygwin Ports to be up to date. + +Cygwin 1.7.x has IPv6 support. You can add IPv6 to Cygwin 1.5.x by means +of the @code{libgetaddrinfo-devel} package, available at Cygwin Ports. + +@section Crosscompilation for Windows under Cygwin + +With Cygwin you can create Windows binaries that do not need the cygwin1.dll. + +Just install your Cygwin as explained before, plus these additional +"Devel" packages: +@example +gcc-mingw-core, mingw-runtime, mingw-zlib +@end example + +and add some special flags to your configure invocation. + +For a static build run +@example +./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin +@end example + +and for a build with shared libraries +@example +./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin +@end example + +@bye diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/protocols.texi mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/protocols.texi --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/protocols.texi 2011-04-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/protocols.texi 2012-01-11 00:34:30.000000000 +0000 @@ -52,10 +52,10 @@ protocol. For example to read a sequence of files @file{split1.mpeg}, -@file{split2.mpeg}, @file{split3.mpeg} with @file{ffplay} use the +@file{split2.mpeg}, @file{split3.mpeg} with @file{avplay} use the command: @example -ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg +avplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg @end example Note that you may need to escape the character "|" which is special for @@ -67,10 +67,10 @@ Allow to read from or read to a file. -For example to read from a file @file{input.mpeg} with @file{ffmpeg} +For example to read from a file @file{input.mpeg} with @command{avconv} use the command: @example -ffmpeg -i file:input.mpeg output.mpeg +avconv -i file:input.mpeg output.mpeg @end example The ff* tools default to the file protocol, that is a resource @@ -109,10 +109,10 @@ Some examples follow. @example # Write the MD5 hash of the encoded AVI file to the file output.avi.md5. -ffmpeg -i input.flv -f avi -y md5:output.avi.md5 +avconv -i input.flv -f avi -y md5:output.avi.md5 # Write the MD5 hash of the encoded AVI file to stdout. -ffmpeg -i input.flv -f avi -y md5: +avconv -i input.flv -f avi -y md5: @end example Note that some formats (typically MOV) require the output protocol to @@ -134,18 +134,18 @@ is not specified, by default the stdout file descriptor will be used for writing, stdin for reading. -For example to read from stdin with @file{ffmpeg}: +For example to read from stdin with @command{avconv}: @example -cat test.wav | ffmpeg -i pipe:0 +cat test.wav | avconv -i pipe:0 # ...this is the same as... -cat test.wav | ffmpeg -i pipe: +cat test.wav | avconv -i pipe: @end example -For writing to stdout with @file{ffmpeg}: +For writing to stdout with @command{avconv}: @example -ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi +avconv -i test.wav -f avi pipe:1 | cat > test.avi # ...this is the same as... -ffmpeg -i test.wav -f avi pipe: | cat > test.avi +avconv -i test.wav -f avi pipe: | cat > test.avi @end example Note that some formats (typically MOV), require the output protocol to @@ -155,8 +155,8 @@ Real-Time Messaging Protocol. -The Real-Time Messaging Protocol (RTMP) is used for streaming multime‐ -dia content across a TCP/IP network. +The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia +content across a TCP/IP network. The required syntax is: @example @@ -183,10 +183,10 @@ @end table -For example to read with @file{ffplay} a multimedia resource named +For example to read with @file{avplay} a multimedia resource named "sample" from the application "vod" from an RTMP server "myserver": @example -ffplay rtmp://myserver/vod/sample +avplay rtmp://myserver/vod/sample @end example @section rtmp, rtmpe, rtmps, rtmpt, rtmpte @@ -195,7 +195,7 @@ librtmp. Requires the presence of the librtmp headers and library during -configuration. You need to explicitely configure the build with +configuration. You need to explicitly configure the build with "--enable-librtmp". If enabled this will replace the native RTMP protocol. @@ -219,14 +219,14 @@ See the librtmp manual page (man 3 librtmp) for more information. For example, to stream a file in real-time to an RTMP server using -@file{ffmpeg}: +@command{avconv}: @example -ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream +avconv -re -i myfile -f flv rtmp://myserver/live/mystream @end example -To play the same stream using @file{ffplay}: +To play the same stream using @file{avplay}: @example -ffplay "rtmp://myserver/live/mystream live=1" +avplay "rtmp://myserver/live/mystream live=1" @end example @section rtp @@ -242,16 +242,19 @@ The muxer can be used to send a stream using RTSP ANNOUNCE to a server supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's -RTSP server, @url{http://github.com/revmischa/rtsp-server}). +@uref{http://github.com/revmischa/rtsp-server, RTSP server}). The required syntax for a RTSP url is: @example -rtsp://@var{hostname}[:@var{port}]/@var{path}[?@var{options}] +rtsp://@var{hostname}[:@var{port}]/@var{path} @end example -@var{options} is a @code{&}-separated list. The following options +The following options (set on the @command{avconv}/@file{avplay} command +line, or set in code via @code{AVOption}s or in @code{avformat_open_input}), are supported: +Flags for @code{rtsp_transport}: + @table @option @item udp @@ -261,27 +264,31 @@ Use TCP (interleaving within the RTSP control channel) as lower transport protocol. -@item multicast +@item udp_multicast Use UDP multicast as lower transport protocol. @item http Use HTTP tunneling as lower transport protocol, which is useful for passing proxies. - -@item filter_src -Accept packets only from negotiated peer address and port. @end table Multiple lower transport protocols may be specified, in that case they are tried one at a time (if the setup of one fails, the next one is tried). For the muxer, only the @code{tcp} and @code{udp} options are supported. +Flags for @code{rtsp_flags}: + +@table @option +@item filter_src +Accept packets only from negotiated peer address and port. +@end table + When receiving data over UDP, the demuxer tries to reorder received packets (since they may arrive out of order, or packets may get lost totally). In order for this to be enabled, a maximum delay must be specified in the @code{max_delay} field of AVFormatContext. -When watching multi-bitrate Real-RTSP streams with @file{ffplay}, the +When watching multi-bitrate Real-RTSP streams with @file{avplay}, the streams to display can be chosen with @code{-vst} @var{n} and @code{-ast} @var{n} for video and audio respectively, and can be switched on the fly by pressing @code{v} and @code{a}. @@ -291,19 +298,19 @@ To watch a stream over UDP, with a max reordering delay of 0.5 seconds: @example -ffplay -max_delay 500000 rtsp://server/video.mp4?udp +avplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4 @end example To watch a stream tunneled over HTTP: @example -ffplay rtsp://server/video.mp4?http +avplay -rtsp_transport http rtsp://server/video.mp4 @end example To send a stream in realtime to a RTSP server, for others to watch: @example -ffmpeg -re -i @var{input} -f rtsp -muxdelay 0.1 rtsp://server/live.sdp +avconv -re -i @var{input} -f rtsp -muxdelay 0.1 rtsp://server/live.sdp @end example @section sap @@ -355,19 +362,19 @@ To broadcast a stream on the local subnet, for watching in VLC: @example -ffmpeg -re -i @var{input} -f sap sap://224.0.0.255?same_port=1 +avconv -re -i @var{input} -f sap sap://224.0.0.255?same_port=1 @end example -Similarly, for watching in ffplay: +Similarly, for watching in avplay: @example -ffmpeg -re -i @var{input} -f sap sap://224.0.0.255 +avconv -re -i @var{input} -f sap sap://224.0.0.255 @end example -And for watching in ffplay, over IPv6: +And for watching in avplay, over IPv6: @example -ffmpeg -re -i @var{input} -f sap sap://[ff0e::1:2:3:4] +avconv -re -i @var{input} -f sap sap://[ff0e::1:2:3:4] @end example @subsection Demuxer @@ -389,13 +396,13 @@ To play back the first stream announced on the normal SAP multicast address: @example -ffplay sap:// +avplay sap:// @end example To play back the first stream announced on one the default IPv6 SAP multicast address: @example -ffplay sap://[ff0e::2:7ffe] +avplay sap://[ff0e::2:7ffe] @end example @section tcp @@ -413,8 +420,8 @@ Listen for an incoming connection @example -ffmpeg -i @var{input} -f @var{format} tcp://@var{hostname}:@var{port}?listen -ffplay tcp://@var{hostname}:@var{port} +avconv -i @var{input} -f @var{format} tcp://@var{hostname}:@var{port}?listen +avplay tcp://@var{hostname}:@var{port} @end example @end table @@ -439,6 +446,11 @@ @item localport=@var{port} override the local UDP port to bind with +@item localaddr=@var{addr} +Choose the local IP address. This is useful e.g. if sending multicast +and the host has multiple interfaces, where the user can choose +which interface to send on by specifying the IP address of that interface. + @item pkt_size=@var{size} set the size in bytes of UDP packets @@ -460,21 +472,21 @@ the specified peer address/port. @end table -Some usage examples of the udp protocol with @file{ffmpeg} follow. +Some usage examples of the udp protocol with @command{avconv} follow. To stream over UDP to a remote endpoint: @example -ffmpeg -i @var{input} -f @var{format} udp://@var{hostname}:@var{port} +avconv -i @var{input} -f @var{format} udp://@var{hostname}:@var{port} @end example To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer: @example -ffmpeg -i @var{input} -f mpegts udp://@var{hostname}:@var{port}?pkt_size=188&buffer_size=65535 +avconv -i @var{input} -f mpegts udp://@var{hostname}:@var{port}?pkt_size=188&buffer_size=65535 @end example To receive over UDP from a remote endpoint: @example -ffmpeg -i udp://[@var{multicast-address}]:@var{port} +avconv -i udp://[@var{multicast-address}]:@var{port} @end example @c man end PROTOCOLS diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/RELEASE_NOTES mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/RELEASE_NOTES --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/RELEASE_NOTES 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/RELEASE_NOTES 2012-01-11 00:34:30.000000000 +0000 @@ -1,22 +1,32 @@ Release Notes ============= -* 0.7 "The Big Bump" June, 2011 +* 0.8 "Forbidden Fruit" General notes ------------- -This release enables frame-based multithreaded decoding for a number of codecs, -including VP8, H.263 and H.264. Additionally, there has been a major cleanup of -both internal and external APIs. For this reason, the major versions of all -libraries have been bumped. On the one hand, this means that 0.7 can be installed -side-by-side with previous releases, on the other hand, in order to benefit -from the new features, applications need to be recompiled. - -Other important changes are additions of decoders including, but not limited to, -AMR-WB, single stream LATM/LOAS, G.722 ADPCM, a native VP8 decoder -and HE-AACv2. Additionally, many new de/muxers such as WebM in Matroska, Apple -HTTP Live Streaming, SAP, IEC 61937 (S/PDIF) have been added. +This release continues the API cleanups that have begun with the +previous release. While it is binary compatible with 0.7, many parts of +the public API were deprecated and will be removed in the git master and +later releases. Note that a couple of header includes have been cleaned +up, which may require code changes in your applications. In particular, +the header "libavutil/mathematics.h" is no longer included from +"libavcodec/avcodec.h". Please consult the doc/APIchanges file to see +intended replacements for the deprecated APIs. + +Furthermore, our work on the 'ffmpeg' command-line tool has resulted in +major revisions to its interface. In order to not break existing scripts +and applications, we have chosen to introduce a new tool called +'avconv', and keep the traditional 'ffmpeg' frontend for end-user's +convenience. Please see the Changelog file for details how 'avconv' +differs from 'ffmpeg'. + +Additionally, this release introduces a number of new interesting codecs +such as the Apple Prores, Flash Screen Video 2 and Windows Media Image, +and muxers such as LATM or CELT in Ogg, among many others. Moreover, our +H.264 decoder has been improved to decode 4:2:2 material and our libx264 +wrapper now allows to produce 4:2:2 and 4:4:4 video. See the Changelog file for a list of significant changes. @@ -30,23 +40,14 @@ API changes ----------- -Please see the file doc/APIchanges for programmer-centric information. Note that a -lot of long-time deprecated APIs have been removed. Also, a number of additional -APIs have been deprecated and are scheduled for removal in the next release. +A number of additional APIs have been introduced and some existing +functions have been deprecated and are scheduled for removal in the next +release. Please see the file doc/APIchanges for details along with +similar programmer-centric information. + Other notable changes --------------------- -- many ARM NEON optimizations -- libswscale cleanup started, optimizations should become easier in the future -- nonfree libfaad support for AAC decoding removed -- 4:4:4 H.264 decoding -- 9/10bit H.264 decoding -- Win64 Assembler support -- native MMSH/MMST support -- Windows TV demuxing -- native AMR-WB decoding -- native GSM-MS decoding -- SMPTE 302M decoding -- AVS encoding +Please see the Changelog file for a more detailed list of changes. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/soc.txt mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/soc.txt --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/soc.txt 2011-03-19 06:37:12.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/soc.txt 2012-01-11 00:34:30.000000000 +0000 @@ -18,7 +18,7 @@ easy reviewable that again leads us to: * use of a revision control system like git * separation of cosmetic from non-cosmetic changes (this is almost entirely - ignored by mentors and students in soc 2006 which might lead to a suprise + ignored by mentors and students in soc 2006 which might lead to a surprise when the code will be reviewed at the end before a possible inclusion in Libav, individual changes were generally not reviewable due to cosmetics). * frequent commits, so that comments can be provided early diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/t2h.init mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/t2h.init --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/t2h.init 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/t2h.init 2012-01-11 00:34:30.000000000 +0000 @@ -1,15 +1,161 @@ # no horiz rules between sections -$end_section = \&FFMPEG_end_section; -sub FFMPEG_end_section($$) +$end_section = \&Libav_end_section; +sub Libav_end_section($$) { } -$print_page_foot = \&FFMPEG_print_page_foot; -sub FFMPEG_print_page_foot($$) +$EXTRA_HEAD = +' + +'; + +$CSS_LINES = < + + +EOT + +my $LIBAV_NAVBAR = $ENV{"LIBAV_NAVBAR"} || ''; + +$AFTER_BODY_OPEN = +'
' . +"\n$LIBAV_NAVBAR\n" . +'
'; + +$PRE_BODY_CLOSE = '
'; + +$SMALL_RULE = ''; +$BODYTEXT = ''; + +$print_page_foot = \&Libav_print_page_foot; +sub Libav_print_page_foot($$) { my $fh = shift; - print $fh "$SMALL_RULE\n"; + print $fh '\n"; +} + +$float = \&Libav_float; + +sub Libav_float($$$$) +{ + my $text = shift; + my $float = shift; + my $caption = shift; + my $shortcaption = shift; + + my $label = ''; + if (exists($float->{'id'})) + { + $label = &$anchor($float->{'id'}); + } + my $class = ''; + my $subject = ''; + + if ($caption =~ /NOTE/) + { + $class = "note"; + } + elsif ($caption =~ /IMPORTANT/) + { + $class = "important"; + } + + return '
' . "$label\n" . $text . '
'; +} + +$print_page_head = \&Libav_print_page_head; +sub Libav_print_page_head($$) +{ + my $fh = shift; + my $longtitle = "$Texi2HTML::THISDOC{'title_no_texi'}"; + $longtitle .= ": $Texi2HTML::NO_TEXI{'This'}" if exists $Texi2HTML::NO_TEXI{'This'}; + my $description = $DOCUMENT_DESCRIPTION; + $description = $longtitle if (!defined($description)); + $description = "" if + ($description ne ''); + $description = $Texi2HTML::THISDOC{'documentdescription'} if (defined($Texi2HTML::THISDOC{'documentdescription'})); + my $encoding = ''; + $encoding = "" if (defined($ENCODING) and ($ENCODING ne '')); + $longtitle =~ s/Documentation.*//g; + $longtitle = "Libav documentation : " . $longtitle; + + print $fh < +$Texi2HTML::THISDOC{'copying'} + + +$longtitle + +$description + + + + +$encoding +$CSS_LINES +$EXTRA_HEAD + + + +$AFTER_BODY_OPEN +EOT } # no navigation elements diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/texi2pod.pl mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/texi2pod.pl --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/texi2pod.pl 2011-03-27 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/texi2pod.pl 2012-01-11 00:34:30.000000000 +0000 @@ -352,6 +352,7 @@ s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g; s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g; s/;\s+\@pxref\{(?:[^\}]*)\}//g; + s/\@ref\{([^\}]*)\}/$1/g; s/\@noindent\s*//g; s/\@refill//g; s/\@gol//g; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/TODO mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/TODO --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/doc/TODO 2011-02-19 06:53:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/doc/TODO 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -ffmpeg TODO list: ----------------- - -Fabrice's TODO list: (unordered) -------------------- -Short term: - -- use AVFMTCTX_DISCARD_PKT in ffplay so that DV has a chance to work -- add RTSP regression test (both client and server) -- make ffserver allocate AVFormatContext -- clean up (incompatible change, for 0.5.0): - * AVStream -> AVComponent - * AVFormatContext -> AVInputStream/AVOutputStream - * suppress rate_emu from AVCodecContext -- add new float/integer audio filterting and conversion : suppress - CODEC_ID_PCM_xxc and use CODEC_ID_RAWAUDIO. -- fix telecine and frame rate conversion - -Long term (ask me if you want to help): - -- commit new imgconvert API and new PIX_FMT_xxx alpha formats -- commit new LGPL'ed float and integer-only AC3 decoder -- add WMA integer-only decoder -- add new MPEG4-AAC audio decoder (both integer-only and float version) - -Michael's TODO list: (unordered) (if anyone wanna help with sth, just ask) -------------------- -- optimize H264 CABAC -- more optimizations -- simper rate control - -Philip'a TODO list: (alphabetically ordered) (please help) ------------------- -- Add a multi-ffm filetype so that feeds can be recorded into multiple files rather - than one big file. -- Authenticated users support -- where the authentication is in the URL -- Change ASF files so that the embedded timestamp in the frames is right rather - than being an offset from the start of the stream -- Make ffm files more resilient to changes in the codec structures so that you - can play old ffm files. - -Baptiste's TODO list: ------------------ -- mov edit list support (AVEditList) -- YUV 10 bit per component support "2vuy" -- mxf muxer -- mpeg2 non linear quantizer - -unassigned TODO: (unordered) ---------------- -- use AVFrame for audio codecs too -- rework aviobuf.c buffering strategy and fix url_fskip -- generate optimal huffman tables for mjpeg encoding -- fix ffserver regression tests -- support xvids motion estimation -- support x264s motion estimation -- support x264s rate control -- SNOW: non translational motion compensation -- SNOW: more optimal quantization -- SNOW: 4x4 block support -- SNOW: 1/8 pel motion compensation support -- SNOW: iterative motion estimation based on subsampled images -- SNOW: try B frames and MCTF and see how their PSNR/bitrate/complexity behaves -- SNOW: try to use the wavelet transformed MC-ed reference frame as context for the entropy coder -- SNOW: think about/analyize how to make snow use multiple cpus/threads -- SNOW: finish spec -- FLAC: lossy encoding (viterbi and naive scalar quantization) -- libavfilter -- JPEG2000 decoder & encoder -- MPEG4 GMC encoding support -- macroblock based pixel format (better cache locality, somewhat complex, one paper claimed it faster for high res) -- regression tests for codecs which do not have an encoder (I+P-frame bitstream in the 'master' branch) -- add support for using mplayers video filters to ffmpeg -- H264 encoder -- per MB ratecontrol (so VCD and such do work better) -- write a script which iteratively changes all functions between always_inline and noinline and benchmarks the result to find the best set of inlined functions -- convert all the non SIMD asm into small asm vs. C testcases and submit them to the gcc devels so they can improve gcc -- generic audio mixing API -- extract PES packetizer from PS muxer and use it for new TS muxer -- implement automatic AVBistreamFilter activation -- make cabac encoder use bytestream (see http://trac.videolan.org/x264/changeset/?format=diff&new=651) -- merge imdct and windowing, the current code does considerable amounts of redundant work diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/Doxyfile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/Doxyfile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/Doxyfile 2011-03-19 06:37:12.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/Doxyfile 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -# Doxyfile 1.5.6 +# Doxyfile 1.7.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project @@ -33,6 +33,12 @@ PROJECT_NUMBER = +# With the PROJECT_LOGO tag one can specify an logo or icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will +# copy the logo to the output directory. +PROJECT_LOGO = + # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location @@ -54,11 +60,11 @@ # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, -# and Ukrainian. +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English @@ -155,13 +161,6 @@ MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. @@ -214,6 +213,18 @@ OPTIMIZE_OUTPUT_VHDL = NO +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and @@ -268,6 +279,22 @@ TYPEDEF_HIDES_STRUCT = NO +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- @@ -366,6 +393,12 @@ SHOW_INCLUDE_FILES = YES +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. @@ -385,6 +418,16 @@ SORT_BRIEF_DOCS = NO +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. @@ -459,7 +502,8 @@ SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES @@ -474,6 +518,15 @@ FILE_VERSION_FILTER = +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- @@ -577,7 +630,8 @@ # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = *.git *.d +EXCLUDE_PATTERNS = *.git \ + *.d # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -591,14 +645,15 @@ # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = libavcodec/ \ + libavformat/ # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = *-example.c # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude @@ -618,14 +673,17 @@ # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. @@ -675,7 +733,8 @@ # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. +# link to the source code. +# Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES @@ -707,7 +766,7 @@ # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) -COLS_IN_ALPHA_INDEX = 5 +COLS_IN_ALPHA_INDEX = 2 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. @@ -741,13 +800,13 @@ # each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = doc/doxy/header.html # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = doc/doxy/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to @@ -756,7 +815,38 @@ # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = doc/doxy/doxy_stylesheet.css + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 120 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to @@ -764,12 +854,13 @@ HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). -GENERATE_HTMLHELP = NO +HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 @@ -779,6 +870,8 @@ # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. GENERATE_DOCSET = NO @@ -796,13 +889,22 @@ DOCSET_BUNDLE_ID = org.doxygen.Project -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. -HTML_DYNAMIC_SECTIONS = NO +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You @@ -841,6 +943,76 @@ TOC_EXPAND = NO +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. @@ -854,27 +1026,30 @@ # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. -# If the tag value is set to FRAME, a side panel will be generated +# If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values -# for this tag are: HIERARCHIES, which will generate the Groups, Directories, -# and Class Hiererachy pages using a tree view instead of an ordered list; -# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which -# disables this behavior completely. For backwards compatibility with previous -# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE -# respectively. +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need @@ -883,6 +1058,34 @@ FORMULA_FONTSIZE = 10 +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = NO + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvances is that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- @@ -900,6 +1103,9 @@ # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. LATEX_CMD_NAME = latex @@ -959,6 +1165,13 @@ LATEX_HIDE_INDICES = NO +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- @@ -1095,8 +1308,10 @@ PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. @@ -1158,16 +1373,23 @@ # undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = __attribute__(x)="" "RENAME(x)=x ## _TMPL" "DEF(x)=x ## _TMPL" \ - HAVE_AV_CONFIG_H HAVE_MMX HAVE_MMX2 HAVE_AMD3DNOW \ +PREDEFINED = "__attribute__(x)=" \ + "RENAME(x)=x ## _TMPL" \ + "DEF(x)=x ## _TMPL" \ + HAVE_AV_CONFIG_H \ + HAVE_MMX \ + HAVE_MMX2 \ + HAVE_AMD3DNOW \ + "DECLARE_ALIGNED(a,t,n)=t n" \ + "offsetof(x,y)=0x42" # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -#EXPAND_AS_DEFINED = FF_COMMON_FRAME -EXPAND_AS_DEFINED = declare_idct(idct, table, idct_row_head, idct_row, idct_row_tail, idct_row_mid) +EXPAND_AS_DEFINED = declare_idct \ + READ_PAR_DATA \ # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone @@ -1185,9 +1407,11 @@ # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: -# TAGFILES = file1 file2 ... +# +# TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... +# +# TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. @@ -1255,6 +1479,14 @@ HAVE_DOT = NO +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + # By default doxygen will write a font called FreeSans.ttf to the output # directory and reference it in all dot files that doxygen generates. This # font does not include all possible unicode characters however, so when you need @@ -1266,6 +1498,11 @@ DOT_FONTNAME = FreeSans +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + # By default doxygen will tell dot to use the output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot @@ -1383,10 +1620,10 @@ MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is enabled by default, which results in a transparent -# background. Warning: Depending on the platform used, enabling this option -# may lead to badly anti-aliased labels on the edges of a graph (i.e. they -# become hard to read). +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). DOT_TRANSPARENT = YES @@ -1408,12 +1645,3 @@ # the various graphs. DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffmpeg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffmpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffmpeg.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffmpeg.c 2012-01-11 00:34:30.000000000 +0000 @@ -40,6 +40,7 @@ #include "libavutil/fifo.h" #include "libavutil/intreadwrite.h" #include "libavutil/dict.h" +#include "libavutil/mathematics.h" #include "libavutil/pixdesc.h" #include "libavutil/avstring.h" #include "libavutil/libm.h" @@ -77,56 +78,50 @@ const int program_birth_year = 2000; /* select an input stream for an output stream */ -typedef struct AVStreamMap { +typedef struct StreamMap { int file_index; int stream_index; int sync_file_index; int sync_stream_index; -} AVStreamMap; +} StreamMap; /** * select an input file for an output file */ -typedef struct AVMetaDataMap { - int file; //< file index - char type; //< type of metadata to copy -- (g)lobal, (s)tream, (c)hapter or (p)rogram - int index; //< stream/chapter/program number -} AVMetaDataMap; +typedef struct MetadataMap { + int file; ///< file index + char type; ///< type of metadata to copy -- (g)lobal, (s)tream, (c)hapter or (p)rogram + int index; ///< stream/chapter/program number +} MetadataMap; -typedef struct AVChapterMap { +typedef struct ChapterMap { int in_file; int out_file; -} AVChapterMap; +} ChapterMap; static const OptionDef options[]; #define MAX_FILES 100 -#define MAX_STREAMS 1024 /* arbitrary sanity check value */ - -#define FFM_PACKET_SIZE 4096 //XXX a duplicate of the line in ffm.h static const char *last_asked_format = NULL; -static int64_t input_files_ts_offset[MAX_FILES]; -static double *input_files_ts_scale[MAX_FILES] = {NULL}; -static AVCodec **input_codecs = NULL; -static int nb_input_codecs = 0; -static int nb_input_files_ts_scale[MAX_FILES] = {0}; +static double *ts_scale; +static int nb_ts_scale; static AVFormatContext *output_files[MAX_FILES]; static AVDictionary *output_opts[MAX_FILES]; static int nb_output_files = 0; -static AVStreamMap *stream_maps = NULL; +static StreamMap *stream_maps = NULL; static int nb_stream_maps; /* first item specifies output metadata, second is input */ -static AVMetaDataMap (*meta_data_maps)[2] = NULL; +static MetadataMap (*meta_data_maps)[2] = NULL; static int nb_meta_data_maps; static int metadata_global_autocopy = 1; static int metadata_streams_autocopy = 1; static int metadata_chapters_autocopy = 1; -static AVChapterMap *chapter_maps = NULL; +static ChapterMap *chapter_maps = NULL; static int nb_chapter_maps; /* indexed by output file stream index */ @@ -163,7 +158,6 @@ static int intra_only = 0; static int audio_sample_rate = 0; -static int64_t channel_layout = 0; #define QSCALE_NONE -99999 static float audio_qscale = QSCALE_NONE; static int audio_disable = 0; @@ -186,7 +180,6 @@ static int64_t recording_time = INT64_MAX; static int64_t start_time = 0; -static int64_t recording_timestamp = 0; static int64_t input_ts_offset = 0; static int file_overwrite = 0; static AVDictionary *metadata; @@ -245,19 +238,19 @@ #define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass" -struct AVInputStream; +struct InputStream; -typedef struct AVOutputStream { +typedef struct OutputStream { int file_index; /* file index */ int index; /* stream index in the output file */ - int source_index; /* AVInputStream index */ + int source_index; /* InputStream index */ AVStream *st; /* stream in the output file */ int encoding_needed; /* true if encoding needed for this stream */ int frame_number; /* input pts and corresponding output pts for A/V sync */ //double sync_ipts; /* dts from the AVPacket of the demuxer in second units */ - struct AVInputStream *sync_ist; /* input stream to sync against */ + struct InputStream *sync_ist; /* input stream to sync against */ int64_t sync_opts; /* output frame counter, could be changed to some true timestamp */ //FIXME look at frame_number AVBitStreamFilterContext *bitstream_filters; AVCodec *enc; @@ -298,47 +291,48 @@ #endif int sws_flags; -} AVOutputStream; + AVDictionary *opts; +} OutputStream; -static AVOutputStream **output_streams_for_file[MAX_FILES] = { NULL }; +static OutputStream **output_streams_for_file[MAX_FILES] = { NULL }; static int nb_output_streams_for_file[MAX_FILES] = { 0 }; -typedef struct AVInputStream { +typedef struct InputStream { int file_index; AVStream *st; int discard; /* true if stream data should be discarded */ int decoding_needed; /* true if the packets must be decoded in 'raw_fifo' */ - int64_t sample_index; /* current sample */ + AVCodec *dec; int64_t start; /* time when read started */ int64_t next_pts; /* synthetic pts for cases where pkt.pts is not defined */ int64_t pts; /* current pts */ PtsCorrectionContext pts_ctx; + double ts_scale; int is_start; /* is 1 at the start and after a discontinuity */ int showed_multi_packet_warning; int is_past_recording_time; -#if CONFIG_AVFILTER - AVFrame *filter_frame; - int has_filter_frame; -#endif -} AVInputStream; + AVDictionary *opts; +} InputStream; -typedef struct AVInputFile { +typedef struct InputFile { AVFormatContext *ctx; int eof_reached; /* true if eof reached */ int ist_index; /* index of first stream in ist_table */ int buffer_size; /* current total buffer size */ -} AVInputFile; + int64_t ts_offset; + int nb_streams; /* nb streams we are aware of */ +} InputFile; -static AVInputStream *input_streams = NULL; +static InputStream *input_streams = NULL; static int nb_input_streams = 0; -static AVInputFile *input_files = NULL; +static InputFile *input_files = NULL; static int nb_input_files = 0; #if CONFIG_AVFILTER -static int configure_video_filters(AVInputStream *ist, AVOutputStream *ost) +static int configure_video_filters(InputStream *ist, OutputStream *ost) { AVFilterContext *last_filter, *filter; /** filter graph containing all filters including input & output */ @@ -452,7 +446,7 @@ return received_nb_signals > 1; } -static int ffmpeg_exit(int ret) +void exit_program(int ret) { int i; @@ -467,8 +461,9 @@ } for(i=0;ikey); - ffmpeg_exit(1); + exit_program(1); } } -/* similar to ff_dynarray_add() and av_fast_realloc() */ -static void *grow_array(void *array, int elem_size, int *size, int new_size) +static void assert_codec_experimental(AVCodecContext *c, int encoder) { - if (new_size >= INT_MAX / elem_size) { - fprintf(stderr, "Array too big.\n"); - ffmpeg_exit(1); - } - if (*size < new_size) { - uint8_t *tmp = av_realloc(array, new_size*elem_size); - if (!tmp) { - fprintf(stderr, "Could not alloc buffer.\n"); - ffmpeg_exit(1); - } - memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size); - *size = new_size; - return tmp; + const char *codec_string = encoder ? "encoder" : "decoder"; + AVCodec *codec; + if (c->codec->capabilities & CODEC_CAP_EXPERIMENTAL && + c->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) { + av_log(NULL, AV_LOG_ERROR, "%s '%s' is experimental and might produce bad " + "results.\nAdd '-strict experimental' if you want to use it.\n", + codec_string, c->codec->name); + codec = encoder ? avcodec_find_encoder(c->codec->id) : avcodec_find_decoder(c->codec->id); + if (!(codec->capabilities & CODEC_CAP_EXPERIMENTAL)) + av_log(NULL, AV_LOG_ERROR, "Or use the non experimental %s '%s'.\n", + codec_string, codec->name); + exit_program(1); } - return array; } static void choose_sample_fmt(AVStream *st, AVCodec *codec) @@ -646,10 +637,16 @@ } } -static AVOutputStream *new_output_stream(AVFormatContext *oc, int file_idx) +static OutputStream *new_output_stream(AVFormatContext *oc, int file_idx, AVCodec *codec) { - int idx = oc->nb_streams - 1; - AVOutputStream *ost; + OutputStream *ost; + AVStream *st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0); + int idx = oc->nb_streams - 1; + + if (!st) { + av_log(NULL, AV_LOG_ERROR, "Could not alloc stream.\n"); + exit_program(1); + } output_streams_for_file[file_idx] = grow_array(output_streams_for_file[file_idx], @@ -657,49 +654,47 @@ &nb_output_streams_for_file[file_idx], oc->nb_streams); ost = output_streams_for_file[file_idx][idx] = - av_mallocz(sizeof(AVOutputStream)); + av_mallocz(sizeof(OutputStream)); if (!ost) { fprintf(stderr, "Could not alloc output stream\n"); - ffmpeg_exit(1); + exit_program(1); } ost->file_index = file_idx; ost->index = idx; + ost->st = st; + ost->enc = codec; + if (codec) + ost->opts = filter_codec_opts(codec_opts, codec->id, oc, st); + + avcodec_get_context_defaults3(st->codec, codec); ost->sws_flags = av_get_int(sws_opts, "sws_flags", NULL); return ost; } -static int read_ffserver_streams(AVFormatContext *s, const char *filename) +static int read_avserver_streams(AVFormatContext *s, const char *filename) { int i, err; AVFormatContext *ic = NULL; - int nopts = 0; err = avformat_open_input(&ic, filename, NULL, NULL); if (err < 0) return err; /* copy stream format */ - s->nb_streams = 0; - s->streams = av_mallocz(sizeof(AVStream *) * ic->nb_streams); for(i=0;inb_streams;i++) { AVStream *st; + OutputStream *ost; AVCodec *codec; - s->nb_streams++; + codec = avcodec_find_encoder(ic->streams[i]->codec->codec_id); + ost = new_output_stream(s, nb_output_files, codec); + st = ost->st; // FIXME: a more elegant solution is needed - st = av_mallocz(sizeof(AVStream)); memcpy(st, ic->streams[i], sizeof(AVStream)); st->info = NULL; - st->codec = avcodec_alloc_context(); - if (!st->codec) { - print_error(filename, AVERROR(ENOMEM)); - ffmpeg_exit(1); - } avcodec_copy_context(st->codec, ic->streams[i]->codec); - s->streams[i] = st; - codec = avcodec_find_encoder(st->codec->codec_id); if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { if (audio_stream_copy) { st->stream_copy = 1; @@ -711,24 +706,16 @@ } else choose_pixel_fmt(st, codec); } - - if(st->codec->flags & CODEC_FLAG_BITEXACT) - nopts = 1; - - new_output_stream(s, nb_output_files); } - if (!nopts) - s->timestamp = av_gettime(); - av_close_input_file(ic); return 0; } static double -get_sync_ipts(const AVOutputStream *ost) +get_sync_ipts(const OutputStream *ost) { - const AVInputStream *ist = ost->sync_ist; + const InputStream *ist = ost->sync_ist; return (double)(ist->pts - start_time)/AV_TIME_BASE; } @@ -750,7 +737,7 @@ avctx->codec ? avctx->codec->name : "copy"); print_error("", a); if (exit_on_error) - ffmpeg_exit(1); + exit_program(1); } *pkt= new_pkt; @@ -760,15 +747,15 @@ ret= av_interleaved_write_frame(s, pkt); if(ret < 0){ print_error("av_interleaved_write_frame()", ret); - ffmpeg_exit(1); + exit_program(1); } } #define MAX_AUDIO_PACKET_SIZE (128 * 1024) static void do_audio_out(AVFormatContext *s, - AVOutputStream *ost, - AVInputStream *ist, + OutputStream *ost, + InputStream *ist, unsigned char *buf, int size) { uint8_t *buftmp; @@ -796,14 +783,14 @@ if(audio_out_size > INT_MAX || audio_buf_size > INT_MAX){ fprintf(stderr, "Buffer sizes too large\n"); - ffmpeg_exit(1); + exit_program(1); } av_fast_malloc(&audio_buf, &allocated_audio_buf_size, audio_buf_size); av_fast_malloc(&audio_out, &allocated_audio_out_size, audio_out_size); if (!audio_buf || !audio_out){ fprintf(stderr, "Out of memory in do_audio_out\n"); - ffmpeg_exit(1); + exit_program(1); } if (enc->channels != dec->channels || enc->sample_rate != dec->sample_rate) @@ -843,7 +830,7 @@ fprintf(stderr, "Can not resample %d channels @ %d Hz to %d channels @ %d Hz\n", dec->channels, dec->sample_rate, enc->channels, enc->sample_rate); - ffmpeg_exit(1); + exit_program(1); } } } @@ -859,7 +846,7 @@ fprintf(stderr, "Cannot convert %s sample format to %s sample format\n", av_get_sample_fmt_name(dec->sample_fmt), av_get_sample_fmt_name(enc->sample_fmt)); - ffmpeg_exit(1); + exit_program(1); } ost->reformat_pair=MAKE_SFMT_PAIR(enc->sample_fmt,dec->sample_fmt); } @@ -932,7 +919,7 @@ if (av_audio_convert(ost->reformat_ctx, obuf, ostride, ibuf, istride, len)<0) { printf("av_audio_convert() failed\n"); if (exit_on_error) - ffmpeg_exit(1); + exit_program(1); return; } buftmp = audio_buf; @@ -944,7 +931,7 @@ /* output resampled raw samples */ if (av_fifo_realloc2(ost->fifo, av_fifo_size(ost->fifo) + size_out) < 0) { fprintf(stderr, "av_fifo_realloc2() failed\n"); - ffmpeg_exit(1); + exit_program(1); } av_fifo_generic_write(ost->fifo, buftmp, size_out, NULL); @@ -962,7 +949,7 @@ (short *)audio_buf); if (ret < 0) { fprintf(stderr, "Audio encoding failed\n"); - ffmpeg_exit(1); + exit_program(1); } audio_size += ret; pkt.stream_index= ost->index; @@ -989,7 +976,7 @@ if(size_out > audio_out_size){ fprintf(stderr, "Internal error, buffer size too small\n"); - ffmpeg_exit(1); + exit_program(1); } //FIXME pass ost->sync_opts as AVFrame.pts in avcodec_encode_audio() @@ -997,7 +984,7 @@ (short *)buftmp); if (ret < 0) { fprintf(stderr, "Audio encoding failed\n"); - ffmpeg_exit(1); + exit_program(1); } audio_size += ret; pkt.stream_index= ost->index; @@ -1010,7 +997,7 @@ } } -static void pre_process_video_frame(AVInputStream *ist, AVPicture *picture, void **bufp) +static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void **bufp) { AVCodecContext *dec; AVPicture *picture2; @@ -1053,8 +1040,8 @@ #define AV_DELAY_MAX 0.100 static void do_subtitle_out(AVFormatContext *s, - AVOutputStream *ost, - AVInputStream *ist, + OutputStream *ost, + InputStream *ist, AVSubtitle *sub, int64_t pts) { @@ -1067,7 +1054,7 @@ if (pts == AV_NOPTS_VALUE) { fprintf(stderr, "Subtitle packets must have a pts\n"); if (exit_on_error) - ffmpeg_exit(1); + exit_program(1); return; } @@ -1095,7 +1082,7 @@ subtitle_out_max_size, sub); if (subtitle_out_size < 0) { fprintf(stderr, "Subtitle encoding failed\n"); - ffmpeg_exit(1); + exit_program(1); } av_init_packet(&pkt); @@ -1119,10 +1106,10 @@ static uint8_t *bit_buffer= NULL; static void do_video_out(AVFormatContext *s, - AVOutputStream *ost, - AVInputStream *ist, + OutputStream *ost, + InputStream *ist, AVFrame *in_picture, - int *frame_size) + int *frame_size, float quality) { int nb_frames, i, ret, resample_changed; AVFrame *final_picture, *formatted_picture; @@ -1182,7 +1169,7 @@ ost->resample_width, ost->resample_height, av_get_pix_fmt_name(ost->resample_pix_fmt), dec->width , dec->height , av_get_pix_fmt_name(dec->pix_fmt)); if(!ost->video_resample) - ffmpeg_exit(1); + exit_program(1); } #if !CONFIG_AVFILTER @@ -1201,7 +1188,7 @@ ost->sws_flags, NULL, NULL, NULL); if (ost->img_resample_ctx == NULL) { fprintf(stderr, "Cannot get resampling context\n"); - ffmpeg_exit(1); + exit_program(1); } } sws_scale(ost->img_resample_ctx, formatted_picture->data, formatted_picture->linesize, @@ -1244,7 +1231,7 @@ /* handles sameq here. This is not correct because it may not be a global option */ - big_picture.quality = same_quality ? ist->st->quality : ost->st->quality; + big_picture.quality = quality; if(!me_threshold) big_picture.pict_type = 0; // big_picture.pts = AV_NOPTS_VALUE; @@ -1261,7 +1248,7 @@ &big_picture); if (ret < 0) { fprintf(stderr, "Video encoding failed\n"); - ffmpeg_exit(1); + exit_program(1); } if(ret>0){ @@ -1295,7 +1282,7 @@ return -10.0*log(d)/log(10.0); } -static void do_video_stats(AVFormatContext *os, AVOutputStream *ost, +static void do_video_stats(AVFormatContext *os, OutputStream *ost, int frame_size) { AVCodecContext *enc; @@ -1307,7 +1294,7 @@ vstats_file = fopen(vstats_filename, "w"); if (!vstats_file) { perror("fopen"); - ffmpeg_exit(1); + exit_program(1); } } @@ -1333,11 +1320,11 @@ } static void print_report(AVFormatContext **output_files, - AVOutputStream **ost_table, int nb_ostreams, + OutputStream **ost_table, int nb_ostreams, int is_last_report) { char buf[1024]; - AVOutputStream *ost; + OutputStream *ost; AVFormatContext *oc; int64_t total_size; AVCodecContext *enc; @@ -1463,12 +1450,12 @@ } /* pkt = NULL means EOF (needed to flush decoder buffers) */ -static int output_packet(AVInputStream *ist, int ist_index, - AVOutputStream **ost_table, int nb_ostreams, +static int output_packet(InputStream *ist, int ist_index, + OutputStream **ost_table, int nb_ostreams, const AVPacket *pkt) { AVFormatContext *os; - AVOutputStream *ost; + OutputStream *ost; int ret, i; int got_output; AVFrame picture; @@ -1479,6 +1466,7 @@ #if CONFIG_AVFILTER int frame_available; #endif + float quality; AVPacket avpkt; int bps = av_get_bytes_per_sample(ist->st->codec->sample_fmt); @@ -1534,7 +1522,7 @@ ret = avcodec_decode_audio3(ist->st->codec, samples, &decoded_data_size, &avpkt); if (ret < 0) - goto fail_decode; + return ret; avpkt.data += ret; avpkt.size -= ret; data_size = ret; @@ -1559,9 +1547,9 @@ ret = avcodec_decode_video2(ist->st->codec, &picture, &got_output, &avpkt); - ist->st->quality= picture.quality; + quality = same_quality ? picture.quality : 0; if (ret < 0) - goto fail_decode; + return ret; if (!got_output) { /* no picture yet */ goto discard_packet; @@ -1581,7 +1569,7 @@ ret = avcodec_decode_subtitle2(ist->st->codec, &subtitle, &got_output, &avpkt); if (ret < 0) - goto fail_decode; + return ret; if (!got_output) { goto discard_packet; } @@ -1589,7 +1577,7 @@ avpkt.size = 0; break; default: - goto fail_decode; + return -1; } } else { switch(ist->st->codec->codec_type) { @@ -1671,7 +1659,7 @@ os = output_files[ost->file_index]; /* set the input output pts pairs */ - //ost->sync_ipts = (double)(ist->pts + input_files_ts_offset[ist->file_index] - start_time)/ AV_TIME_BASE; + //ost->sync_ipts = (double)(ist->pts + input_files[ist->file_index].ts_offset - start_time)/ AV_TIME_BASE; if (ost->encoding_needed) { av_assert0(ist->decoding_needed); @@ -1684,7 +1672,8 @@ if (ost->picref->video && !ost->frame_aspect_ratio) ost->st->codec->sample_aspect_ratio = ost->picref->video->pixel_aspect; #endif - do_video_out(os, ost, ist, &picture, &frame_size); + do_video_out(os, ost, ist, &picture, &frame_size, + same_quality ? quality : ost->st->codec->global_quality); if (vstats_filename && frame_size) do_video_stats(os, ost, frame_size); break; @@ -1801,7 +1790,7 @@ ret = 0; /* encode any samples remaining in fifo */ if (fifo_bytes > 0) { - int osize = av_get_bits_per_sample_fmt(enc->sample_fmt) >> 3; + int osize = av_get_bytes_per_sample(enc->sample_fmt); int fs_tmp = enc->frame_size; av_fifo_generic_read(ost->fifo, audio_buf, fifo_bytes, NULL); @@ -1810,7 +1799,7 @@ } else { /* pad */ int frame_bytes = enc->frame_size*osize*enc->channels; if (allocated_audio_buf_size < frame_bytes) - ffmpeg_exit(1); + exit_program(1); generate_silence(audio_buf+fifo_bytes, enc->sample_fmt, frame_bytes - fifo_bytes); } @@ -1824,7 +1813,7 @@ } if (ret < 0) { fprintf(stderr, "Audio encoding failed\n"); - ffmpeg_exit(1); + exit_program(1); } audio_size += ret; pkt.flags |= AV_PKT_FLAG_KEY; @@ -1833,7 +1822,7 @@ ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, NULL); if (ret < 0) { fprintf(stderr, "Video encoding failed\n"); - ffmpeg_exit(1); + exit_program(1); } video_size += ret; if(enc->coded_frame && enc->coded_frame->key_frame) @@ -1860,8 +1849,6 @@ } return 0; - fail_decode: - return -1; } static void print_sdp(AVFormatContext **avc, int n) @@ -1881,7 +1868,7 @@ for (i = 0; i < is->nb_chapters; i++) { AVChapter *in_ch = is->chapters[i], *out_ch; - int64_t ts_off = av_rescale_q(start_time - input_files_ts_offset[infile], + int64_t ts_off = av_rescale_q(start_time - input_files[infile].ts_offset, AV_TIME_BASE_Q, in_ch->time_base); int64_t rt = (recording_time == INT64_MAX) ? INT64_MAX : av_rescale_q(recording_time, AV_TIME_BASE_Q, in_ch->time_base); @@ -1913,7 +1900,7 @@ return 0; } -static void parse_forced_key_frames(char *kf, AVOutputStream *ost, +static void parse_forced_key_frames(char *kf, OutputStream *ost, AVCodecContext *avctx) { char *p; @@ -1927,7 +1914,7 @@ ost->forced_kf_pts = av_malloc(sizeof(*ost->forced_kf_pts) * n); if (!ost->forced_kf_pts) { av_log(NULL, AV_LOG_FATAL, "Could not allocate forced key frames array.\n"); - ffmpeg_exit(1); + exit_program(1); } for (i = 0; i < n; i++) { p = i ? strchr(p, ',') + 1 : kf; @@ -1941,15 +1928,15 @@ */ static int transcode(AVFormatContext **output_files, int nb_output_files, - AVInputFile *input_files, + InputFile *input_files, int nb_input_files, - AVStreamMap *stream_maps, int nb_stream_maps) + StreamMap *stream_maps, int nb_stream_maps) { int ret = 0, i, j, k, n, nb_ostreams = 0; AVFormatContext *is, *os; AVCodecContext *codec, *icodec; - AVOutputStream *ost, **ost_table = NULL; - AVInputStream *ist; + OutputStream *ost, **ost_table = NULL; + InputStream *ist; char error[1024]; int want_sdp = 1; uint8_t no_packet[MAX_FILES]={0}; @@ -1983,7 +1970,7 @@ int si = stream_maps[i].stream_index; if (fi < 0 || fi > nb_input_files - 1 || - si < 0 || si > input_files[fi].ctx->nb_streams - 1) { + si < 0 || si > input_files[fi].nb_streams - 1) { fprintf(stderr,"Could not find input stream #%d.%d\n", fi, si); ret = AVERROR(EINVAL); goto fail; @@ -1991,14 +1978,14 @@ fi = stream_maps[i].sync_file_index; si = stream_maps[i].sync_stream_index; if (fi < 0 || fi > nb_input_files - 1 || - si < 0 || si > input_files[fi].ctx->nb_streams - 1) { + si < 0 || si > input_files[fi].nb_streams - 1) { fprintf(stderr,"Could not find sync stream #%d.%d\n", fi, si); ret = AVERROR(EINVAL); goto fail; } } - ost_table = av_mallocz(sizeof(AVOutputStream *) * nb_ostreams); + ost_table = av_mallocz(sizeof(OutputStream *) * nb_ostreams); if (!ost_table) goto fail; n = 0; @@ -2007,7 +1994,6 @@ for(i=0;inb_streams;i++,n++) { int found; ost = ost_table[n] = output_streams_for_file[k][i]; - ost->st = os->streams[i]; if (nb_stream_maps > 0) { ost->source_index = input_files[stream_maps[n].file_index].ist_index + stream_maps[n].stream_index; @@ -2019,7 +2005,7 @@ fprintf(stderr, "Codec type mismatch for mapping #%d.%d -> #%d.%d\n", stream_maps[n].file_index, stream_maps[n].stream_index, ost->file_index, ost->index); - ffmpeg_exit(1); + exit_program(1); } } else { @@ -2069,7 +2055,7 @@ av_dump_format(output_files[i], i, output_files[i]->filename, 1); fprintf(stderr, "Could not find input stream matching output stream #%d.%d\n", ost->file_index, ost->index); - ffmpeg_exit(1); + exit_program(1); } } } @@ -2134,7 +2120,7 @@ case AVMEDIA_TYPE_AUDIO: if(audio_volume != 256) { fprintf(stderr,"-acodec copy and -vol are incompatible (frames are not decoded)\n"); - ffmpeg_exit(1); + exit_program(1); } codec->channel_layout = icodec->channel_layout; codec->sample_rate = icodec->sample_rate; @@ -2185,8 +2171,12 @@ } choose_sample_rate(ost->st, ost->enc); codec->time_base = (AVRational){1, codec->sample_rate}; + if (codec->sample_fmt == AV_SAMPLE_FMT_NONE) + codec->sample_fmt = icodec->sample_fmt; + choose_sample_fmt(ost->st, ost->enc); if (!codec->channels) codec->channels = icodec->channels; + codec->channel_layout = icodec->channel_layout; if (av_get_channel_layout_nb_channels(codec->channel_layout) != codec->channels) codec->channel_layout = 0; ost->audio_resample = codec->sample_rate != icodec->sample_rate || audio_sync_method > 1; @@ -2204,8 +2194,14 @@ if (ost->st->codec->pix_fmt == PIX_FMT_NONE) { fprintf(stderr, "Video pixel format is unknown, stream cannot be encoded\n"); - ffmpeg_exit(1); + exit_program(1); + } + + if (!codec->width || !codec->height) { + codec->width = icodec->width; + codec->height = icodec->height; } + ost->video_resample = codec->width != icodec->width || codec->height != icodec->height || codec->pix_fmt != icodec->pix_fmt; @@ -2213,29 +2209,26 @@ #if !CONFIG_AVFILTER avcodec_get_frame_defaults(&ost->pict_tmp); if(avpicture_alloc((AVPicture*)&ost->pict_tmp, codec->pix_fmt, - codec->width, codec->height)) { + codec->width, codec->height)) { fprintf(stderr, "Cannot allocate temp picture, check pix fmt\n"); - ffmpeg_exit(1); + exit_program(1); } ost->img_resample_ctx = sws_getContext( icodec->width, icodec->height, - icodec->pix_fmt, - codec->width, - codec->height, - codec->pix_fmt, - ost->sws_flags, NULL, NULL, NULL); + icodec->pix_fmt, + codec->width, + codec->height, + codec->pix_fmt, + ost->sws_flags, NULL, NULL, NULL); if (ost->img_resample_ctx == NULL) { fprintf(stderr, "Cannot get resampling context\n"); - ffmpeg_exit(1); + exit_program(1); } #endif codec->bits_per_raw_sample= 0; } - if (!codec->width || !codec->height) { - codec->width = icodec->width; - codec->height = icodec->height; - } + ost->resample_height = icodec->height; ost->resample_width = icodec->width; ost->resample_pix_fmt= icodec->pix_fmt; @@ -2278,15 +2271,15 @@ f = fopen(logfilename, "wb"); if (!f) { fprintf(stderr, "Cannot write log file '%s' for pass-1 encoding: %s\n", logfilename, strerror(errno)); - ffmpeg_exit(1); + exit_program(1); } ost->logfile = f; } else { char *logbuffer; size_t logbuffer_size; - if (read_file(logfilename, &logbuffer, &logbuffer_size) < 0) { + if (cmdutils_read_file(logfilename, &logbuffer, &logbuffer_size) < 0) { fprintf(stderr, "Error reading log file '%s' for pass-2 encoding\n", logfilename); - ffmpeg_exit(1); + exit_program(1); } codec->stats_in = logbuffer; } @@ -2328,12 +2321,17 @@ memcpy(ost->st->codec->subtitle_header, dec->subtitle_header, dec->subtitle_header_size); ost->st->codec->subtitle_header_size = dec->subtitle_header_size; } - if (avcodec_open(ost->st->codec, codec) < 0) { + if (avcodec_open2(ost->st->codec, codec, &ost->opts) < 0) { snprintf(error, sizeof(error), "Error while opening encoder for output stream #%d.%d - maybe incorrect parameters such as bit_rate, rate, width or height", ost->file_index, ost->index); ret = AVERROR(EINVAL); goto dump_format; } + assert_codec_experimental(ost->st->codec, 1); + assert_avoptions(ost->opts); + if (ost->st->codec->bit_rate && ost->st->codec->bit_rate < 1000) + av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low." + "It takes bits/s as argument, not kbits/s\n"); extra_size += ost->st->codec->extradata_size; } } @@ -2342,7 +2340,7 @@ for (i = 0; i < nb_input_streams; i++) { ist = &input_streams[i]; if (ist->decoding_needed) { - AVCodec *codec = i < nb_input_codecs ? input_codecs[i] : NULL; + AVCodec *codec = ist->dec; if (!codec) codec = avcodec_find_decoder(ist->st->codec->codec_id); if (!codec) { @@ -2362,14 +2360,14 @@ } } - if (avcodec_open(ist->st->codec, codec) < 0) { + if (avcodec_open2(ist->st->codec, codec, &ist->opts) < 0) { snprintf(error, sizeof(error), "Error while opening decoder for input stream #%d.%d", ist->file_index, ist->st->index); ret = AVERROR(EINVAL); goto dump_format; } - //if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) - // ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD; + assert_codec_experimental(ist->st->codec, 0); + assert_avoptions(ost->opts); } } @@ -2409,7 +2407,7 @@ files[1] = input_files[in_file_index].ctx; for (j = 0; j < 2; j++) { - AVMetaDataMap *map = &meta_data_maps[i][j]; + MetadataMap *map = &meta_data_maps[i][j]; switch (map->type) { case 'g': @@ -2604,7 +2602,7 @@ } /* the following test is needed in case new streams appear dynamically in stream : we ignore them */ - if (pkt.stream_index >= input_files[file_index].ctx->nb_streams) + if (pkt.stream_index >= input_files[file_index].nb_streams) goto discard_packet; ist_index = input_files[file_index].ist_index + pkt.stream_index; ist = &input_streams[ist_index]; @@ -2612,27 +2610,27 @@ goto discard_packet; if (pkt.dts != AV_NOPTS_VALUE) - pkt.dts += av_rescale_q(input_files_ts_offset[ist->file_index], AV_TIME_BASE_Q, ist->st->time_base); + pkt.dts += av_rescale_q(input_files[ist->file_index].ts_offset, AV_TIME_BASE_Q, ist->st->time_base); if (pkt.pts != AV_NOPTS_VALUE) - pkt.pts += av_rescale_q(input_files_ts_offset[ist->file_index], AV_TIME_BASE_Q, ist->st->time_base); + pkt.pts += av_rescale_q(input_files[ist->file_index].ts_offset, AV_TIME_BASE_Q, ist->st->time_base); - if (pkt.stream_index < nb_input_files_ts_scale[file_index] - && input_files_ts_scale[file_index][pkt.stream_index]){ + if (ist->ts_scale) { if(pkt.pts != AV_NOPTS_VALUE) - pkt.pts *= input_files_ts_scale[file_index][pkt.stream_index]; + pkt.pts *= ist->ts_scale; if(pkt.dts != AV_NOPTS_VALUE) - pkt.dts *= input_files_ts_scale[file_index][pkt.stream_index]; + pkt.dts *= ist->ts_scale; } -// fprintf(stderr, "next:%"PRId64" dts:%"PRId64" off:%"PRId64" %d\n", ist->next_pts, pkt.dts, input_files_ts_offset[ist->file_index], ist->st->codec->codec_type); +// fprintf(stderr, "next:%"PRId64" dts:%"PRId64" off:%"PRId64" %d\n", ist->next_pts, pkt.dts, input_files[ist->file_index].ts_offset, ist->st->codec->codec_type); if (pkt.dts != AV_NOPTS_VALUE && ist->next_pts != AV_NOPTS_VALUE && (is->iformat->flags & AVFMT_TS_DISCONT)) { int64_t pkt_dts= av_rescale_q(pkt.dts, ist->st->time_base, AV_TIME_BASE_Q); int64_t delta= pkt_dts - ist->next_pts; if((FFABS(delta) > 1LL*dts_delta_threshold*AV_TIME_BASE || pkt_dts+1pts)&& !copy_ts){ - input_files_ts_offset[ist->file_index]-= delta; + input_files[ist->file_index].ts_offset -= delta; if (verbose > 2) - fprintf(stderr, "timestamp discontinuity %"PRId64", new offset= %"PRId64"\n", delta, input_files_ts_offset[ist->file_index]); + fprintf(stderr, "timestamp discontinuity %"PRId64", new offset= %"PRId64"\n", + delta, input_files[ist->file_index].ts_offset); pkt.dts-= av_rescale_q(delta, AV_TIME_BASE_Q, ist->st->time_base); if(pkt.pts != AV_NOPTS_VALUE) pkt.pts-= av_rescale_q(delta, AV_TIME_BASE_Q, ist->st->time_base); @@ -2653,7 +2651,7 @@ fprintf(stderr, "Error while decoding stream #%d.%d\n", ist->file_index, ist->st->index); if (exit_on_error) - ffmpeg_exit(1); + exit_program(1); av_free_packet(&pkt); goto redo; } @@ -2731,6 +2729,7 @@ audio_resample_close(ost->resample); if (ost->reformat_ctx) av_audio_convert_free(ost->reformat_ctx); + av_dict_free(&ost->opts); av_free(ost); } } @@ -2767,23 +2766,11 @@ { if (av_parse_video_rate(&frame_rate, arg) < 0) { fprintf(stderr, "Incorrect value for %s: %s\n", opt, arg); - ffmpeg_exit(1); + exit_program(1); } return 0; } -static int opt_bitrate(const char *opt, const char *arg) -{ - int codec_type = opt[0]=='a' ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO; - - opt_default(opt, arg); - - if (av_get_int(avcodec_opts[codec_type], "b", NULL) < 1000) - fprintf(stderr, "WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s\n"); - - return 0; -} - static int opt_frame_crop(const char *opt, const char *arg) { fprintf(stderr, "Option '%s' has been removed, use the crop filter instead\n", opt); @@ -2814,7 +2801,7 @@ } } else { show_pix_fmts(); - ffmpeg_exit(0); + exit_program(0); } return 0; } @@ -2850,7 +2837,7 @@ if(!mid){ fprintf(stderr, "Missing =\n"); - ffmpeg_exit(1); + exit_program(1); } *mid++= 0; @@ -2898,7 +2885,7 @@ char fmt_str[128]; for (i = -1; i < AV_SAMPLE_FMT_NB; i++) printf("%s\n", av_get_sample_fmt_string(fmt_str, sizeof(fmt_str), i)); - ffmpeg_exit(0); + exit_program(0); } return 0; } @@ -2981,7 +2968,7 @@ static int opt_map(const char *opt, const char *arg) { - AVStreamMap *m; + StreamMap *m; char *p; stream_maps = grow_array(stream_maps, sizeof(*stream_maps), &nb_stream_maps, nb_stream_maps + 1); @@ -3020,7 +3007,7 @@ break; default: fprintf(stderr, "Invalid metadata type %c.\n", *arg); - ffmpeg_exit(1); + exit_program(1); } } else *type = 'g'; @@ -3028,7 +3015,7 @@ static int opt_map_metadata(const char *opt, const char *arg) { - AVMetaDataMap *m, *m1; + MetadataMap *m, *m1; char *p; meta_data_maps = grow_array(meta_data_maps, sizeof(*meta_data_maps), @@ -3063,7 +3050,7 @@ static int opt_map_chapters(const char *opt, const char *arg) { - AVChapterMap *c; + ChapterMap *c; char *p; chapter_maps = grow_array(chapter_maps, sizeof(*chapter_maps), &nb_chapter_maps, @@ -3088,11 +3075,8 @@ p++; scale= strtod(p, &p); - if(stream >= MAX_STREAMS) - ffmpeg_exit(1); - - input_files_ts_scale[nb_input_files] = grow_array(input_files_ts_scale[nb_input_files], sizeof(*input_files_ts_scale[nb_input_files]), &nb_input_files_ts_scale[nb_input_files], stream + 1); - input_files_ts_scale[nb_input_files][stream]= scale; + ts_scale = grow_array(ts_scale, sizeof(*ts_scale), &nb_ts_scale, stream + 1); + ts_scale[stream] = scale; return 0; } @@ -3110,7 +3094,14 @@ static int opt_recording_timestamp(const char *opt, const char *arg) { - recording_timestamp = parse_time_or_die(opt, arg, 0) / 1000000; + char buf[128]; + int64_t recording_timestamp = parse_time_or_die(opt, arg, 0) / 1E6; + struct tm time = *gmtime((time_t*)&recording_timestamp); + strftime(buf, sizeof(buf), "creation_time=%FT%T%z", &time); + opt_metadata("metadata", buf); + + av_log(NULL, AV_LOG_WARNING, "%s is deprecated, set the 'creation_time' metadata " + "tag instead.\n", opt); return 0; } @@ -3120,7 +3111,7 @@ return 0; } -static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict) +static enum CodecID find_codec_or_die(const char *name, int type, int encoder) { const char *codec_string = encoder ? "encoder" : "decoder"; AVCodec *codec; @@ -3132,24 +3123,11 @@ avcodec_find_decoder_by_name(name); if(!codec) { fprintf(stderr, "Unknown %s '%s'\n", codec_string, name); - ffmpeg_exit(1); + exit_program(1); } if(codec->type != type) { fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name); - ffmpeg_exit(1); - } - if(codec->capabilities & CODEC_CAP_EXPERIMENTAL && - strict > FF_COMPLIANCE_EXPERIMENTAL) { - fprintf(stderr, "%s '%s' is experimental and might produce bad " - "results.\nAdd '-strict experimental' if you want to use it.\n", - codec_string, codec->name); - codec = encoder ? - avcodec_find_encoder(codec->id) : - avcodec_find_decoder(codec->id); - if (!(codec->capabilities & CODEC_CAP_EXPERIMENTAL)) - fprintf(stderr, "Or use the non experimental %s '%s'.\n", - codec_string, codec->name); - ffmpeg_exit(1); + exit_program(1); } return codec->id; } @@ -3161,11 +3139,13 @@ int err, i, ret, rfps, rfps_base; int64_t timestamp; uint8_t buf[128]; + AVDictionary **opts; + int orig_nb_streams; // number of streams before avformat_find_stream_info if (last_asked_format) { if (!(file_iformat = av_find_input_format(last_asked_format))) { fprintf(stderr, "Unknown input format: '%s'\n", last_asked_format); - ffmpeg_exit(1); + exit_program(1); } last_asked_format = NULL; } @@ -3180,7 +3160,7 @@ ic = avformat_alloc_context(); if (!ic) { print_error(filename, AVERROR(ENOMEM)); - ffmpeg_exit(1); + exit_program(1); } if (audio_sample_rate) { snprintf(buf, sizeof(buf), "%d", audio_sample_rate); @@ -3202,21 +3182,18 @@ av_dict_set(&format_opts, "pixel_format", av_get_pix_fmt_name(frame_pix_fmt), 0); ic->video_codec_id = - find_codec_or_die(video_codec_name , AVMEDIA_TYPE_VIDEO , 0, - avcodec_opts[AVMEDIA_TYPE_VIDEO ]->strict_std_compliance); + find_codec_or_die(video_codec_name , AVMEDIA_TYPE_VIDEO , 0); ic->audio_codec_id = - find_codec_or_die(audio_codec_name , AVMEDIA_TYPE_AUDIO , 0, - avcodec_opts[AVMEDIA_TYPE_AUDIO ]->strict_std_compliance); + find_codec_or_die(audio_codec_name , AVMEDIA_TYPE_AUDIO , 0); ic->subtitle_codec_id= - find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0, - avcodec_opts[AVMEDIA_TYPE_SUBTITLE]->strict_std_compliance); + find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0); ic->flags |= AVFMT_FLAG_NONBLOCK; /* open the input file with generic libav function */ err = avformat_open_input(&ic, filename, file_iformat, &format_opts); if (err < 0) { print_error(filename, err); - ffmpeg_exit(1); + exit_program(1); } assert_avoptions(format_opts); @@ -3239,37 +3216,27 @@ } if(!found){ fprintf(stderr, "Specified program id not found\n"); - ffmpeg_exit(1); + exit_program(1); } opt_programid=0; } - ic->loop_input = loop_input; - - /* Set AVCodecContext options so they will be seen by av_find_stream_info() */ - for (i = 0; i < ic->nb_streams; i++) { - AVCodecContext *dec = ic->streams[i]->codec; - switch (dec->codec_type) { - case AVMEDIA_TYPE_AUDIO: - set_context_opts(dec, avcodec_opts[AVMEDIA_TYPE_AUDIO], - AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM, - NULL); - break; - case AVMEDIA_TYPE_VIDEO: - set_context_opts(dec, avcodec_opts[AVMEDIA_TYPE_VIDEO], - AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM, - NULL); - break; - } + if (loop_input) { + av_log(NULL, AV_LOG_WARNING, "-loop_input is deprecated, use -loop 1\n"); + ic->loop_input = loop_input; } + /* Set AVCodecContext options for avformat_find_stream_info */ + opts = setup_find_stream_info_opts(ic, codec_opts); + orig_nb_streams = ic->nb_streams; + /* If not enough info to get the stream parameters, we decode the first frames to get it. (used in mpeg case for example) */ - ret = av_find_stream_info(ic); + ret = avformat_find_stream_info(ic, opts); if (ret < 0 && verbose >= 0) { fprintf(stderr, "%s: could not find codec parameters\n", filename); av_close_input_file(ic); - ffmpeg_exit(1); + exit_program(1); } timestamp = start_time; @@ -3292,29 +3259,28 @@ for(i=0;inb_streams;i++) { AVStream *st = ic->streams[i]; AVCodecContext *dec = st->codec; - AVInputStream *ist; + InputStream *ist; dec->thread_count = thread_count; - input_codecs = grow_array(input_codecs, sizeof(*input_codecs), &nb_input_codecs, nb_input_codecs + 1); input_streams = grow_array(input_streams, sizeof(*input_streams), &nb_input_streams, nb_input_streams + 1); ist = &input_streams[nb_input_streams - 1]; ist->st = st; ist->file_index = nb_input_files; ist->discard = 1; + ist->opts = filter_codec_opts(codec_opts, ist->st->codec->codec_id, ic, st); + + if (i < nb_ts_scale) + ist->ts_scale = ts_scale[i]; switch (dec->codec_type) { case AVMEDIA_TYPE_AUDIO: - input_codecs[nb_input_codecs-1] = avcodec_find_decoder_by_name(audio_codec_name); - set_context_opts(dec, avcodec_opts[AVMEDIA_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM, input_codecs[nb_input_codecs-1]); - channel_layout = dec->channel_layout; - audio_sample_fmt = dec->sample_fmt; + ist->dec = avcodec_find_decoder_by_name(audio_codec_name); if(audio_disable) st->discard= AVDISCARD_ALL; break; case AVMEDIA_TYPE_VIDEO: - input_codecs[nb_input_codecs-1] = avcodec_find_decoder_by_name(video_codec_name); - set_context_opts(dec, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM, input_codecs[nb_input_codecs-1]); + ist->dec = avcodec_find_decoder_by_name(video_codec_name); rfps = ic->streams[i]->r_frame_rate.num; rfps_base = ic->streams[i]->r_frame_rate.den; if (dec->lowres) { @@ -3342,7 +3308,7 @@ case AVMEDIA_TYPE_DATA: break; case AVMEDIA_TYPE_SUBTITLE: - input_codecs[nb_input_codecs-1] = avcodec_find_decoder_by_name(subtitle_codec_name); + ist->dec = avcodec_find_decoder_by_name(subtitle_codec_name); if(subtitle_disable) st->discard = AVDISCARD_ALL; break; @@ -3354,7 +3320,6 @@ } } - input_files_ts_offset[nb_input_files] = input_ts_offset - (copy_ts ? 0 : timestamp); /* dump the file content */ if (verbose >= 0) av_dump_format(ic, nb_input_files, filename, 0); @@ -3362,6 +3327,8 @@ input_files = grow_array(input_files, sizeof(*input_files), &nb_input_files, nb_input_files + 1); input_files[nb_input_files - 1].ctx = ic; input_files[nb_input_files - 1].ist_index = nb_input_streams - ic->nb_streams; + input_files[nb_input_files - 1].ts_offset = input_ts_offset - (copy_ts ? 0 : timestamp); + input_files[nb_input_files - 1].nb_streams = ic->nb_streams; frame_rate = (AVRational){0, 0}; frame_pix_fmt = PIX_FMT_NONE; @@ -3369,7 +3336,13 @@ frame_width = 0; audio_sample_rate = 0; audio_channels = 0; - + audio_sample_fmt = AV_SAMPLE_FMT_NONE; + av_freep(&ts_scale); + nb_ts_scale = 0; + + for (i = 0; i < orig_nb_streams; i++) + av_dict_free(&opts[i]); + av_freep(&opts); av_freep(&video_codec_name); av_freep(&audio_codec_name); av_freep(&subtitle_codec_name); @@ -3424,29 +3397,24 @@ static void new_video_stream(AVFormatContext *oc, int file_idx) { AVStream *st; - AVOutputStream *ost; + OutputStream *ost; AVCodecContext *video_enc; enum CodecID codec_id = CODEC_ID_NONE; AVCodec *codec= NULL; - st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0); - if (!st) { - fprintf(stderr, "Could not alloc stream\n"); - ffmpeg_exit(1); - } - ost = new_output_stream(oc, file_idx); - if(!video_stream_copy){ if (video_codec_name) { - codec_id = find_codec_or_die(video_codec_name, AVMEDIA_TYPE_VIDEO, 1, - avcodec_opts[AVMEDIA_TYPE_VIDEO]->strict_std_compliance); + codec_id = find_codec_or_die(video_codec_name, AVMEDIA_TYPE_VIDEO, 1); codec = avcodec_find_encoder_by_name(video_codec_name); - ost->enc = codec; } else { codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO); codec = avcodec_find_encoder(codec_id); } + } + ost = new_output_stream(oc, file_idx, codec); + st = ost->st; + if (!video_stream_copy) { ost->frame_aspect_ratio = frame_aspect_ratio; frame_aspect_ratio = 0; #if CONFIG_AVFILTER @@ -3455,7 +3423,6 @@ #endif } - avcodec_get_context_defaults3(st->codec, codec); ost->bitstream_filters = video_bitstream_filters; video_bitstream_filters= NULL; @@ -3468,12 +3435,11 @@ if(oc->oformat->flags & AVFMT_GLOBALHEADER) { video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; - avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags|= CODEC_FLAG_GLOBAL_HEADER; } + video_enc->codec_type = AVMEDIA_TYPE_VIDEO; if (video_stream_copy) { st->stream_copy = 1; - video_enc->codec_type = AVMEDIA_TYPE_VIDEO; video_enc->sample_aspect_ratio = st->sample_aspect_ratio = av_d2q(frame_aspect_ratio*frame_height/frame_width, 255); } else { @@ -3483,7 +3449,6 @@ if (frame_rate.num) ost->frame_rate = frame_rate; video_enc->codec_id = codec_id; - set_context_opts(video_enc, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM, codec); video_enc->width = frame_width; video_enc->height = frame_height; @@ -3494,8 +3459,7 @@ video_enc->gop_size = 0; if (video_qscale || same_quality) { video_enc->flags |= CODEC_FLAG_QSCALE; - video_enc->global_quality= - st->quality = FF_QP2LAMBDA * video_qscale; + video_enc->global_quality = FF_QP2LAMBDA * video_qscale; } if(intra_matrix) @@ -3509,7 +3473,7 @@ int e=sscanf(p, "%d,%d,%d", &start, &end, &q); if(e!=3){ fprintf(stderr, "error parsing rc_override\n"); - ffmpeg_exit(1); + exit_program(1); } video_enc->rc_override= av_realloc(video_enc->rc_override, @@ -3564,31 +3528,22 @@ static void new_audio_stream(AVFormatContext *oc, int file_idx) { AVStream *st; - AVOutputStream *ost; + OutputStream *ost; AVCodec *codec= NULL; AVCodecContext *audio_enc; enum CodecID codec_id = CODEC_ID_NONE; - st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0); - if (!st) { - fprintf(stderr, "Could not alloc stream\n"); - ffmpeg_exit(1); - } - ost = new_output_stream(oc, file_idx); - if(!audio_stream_copy){ if (audio_codec_name) { - codec_id = find_codec_or_die(audio_codec_name, AVMEDIA_TYPE_AUDIO, 1, - avcodec_opts[AVMEDIA_TYPE_AUDIO]->strict_std_compliance); + codec_id = find_codec_or_die(audio_codec_name, AVMEDIA_TYPE_AUDIO, 1); codec = avcodec_find_encoder_by_name(audio_codec_name); - ost->enc = codec; } else { codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_AUDIO); codec = avcodec_find_encoder(codec_id); } } - - avcodec_get_context_defaults3(st->codec, codec); + ost = new_output_stream(oc, file_idx, codec); + st = ost->st; ost->bitstream_filters = audio_bitstream_filters; audio_bitstream_filters= NULL; @@ -3603,25 +3558,22 @@ if (oc->oformat->flags & AVFMT_GLOBALHEADER) { audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; - avcodec_opts[AVMEDIA_TYPE_AUDIO]->flags|= CODEC_FLAG_GLOBAL_HEADER; } if (audio_stream_copy) { st->stream_copy = 1; } else { audio_enc->codec_id = codec_id; - set_context_opts(audio_enc, avcodec_opts[AVMEDIA_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM, codec); if (audio_qscale > QSCALE_NONE) { audio_enc->flags |= CODEC_FLAG_QSCALE; - audio_enc->global_quality = st->quality = FF_QP2LAMBDA * audio_qscale; + audio_enc->global_quality = FF_QP2LAMBDA * audio_qscale; } if (audio_channels) audio_enc->channels = audio_channels; - audio_enc->sample_fmt = audio_sample_fmt; + if (audio_sample_fmt != AV_SAMPLE_FMT_NONE) + audio_enc->sample_fmt = audio_sample_fmt; if (audio_sample_rate) audio_enc->sample_rate = audio_sample_rate; - audio_enc->channel_layout = channel_layout; - choose_sample_fmt(st, codec); } if (audio_language) { av_dict_set(&st->metadata, "language", audio_language, 0); @@ -3637,21 +3589,16 @@ static void new_data_stream(AVFormatContext *oc, int file_idx) { AVStream *st; - AVCodec *codec=NULL; + OutputStream *ost; AVCodecContext *data_enc; - st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0); - if (!st) { - fprintf(stderr, "Could not alloc stream\n"); - ffmpeg_exit(1); - } - new_output_stream(oc, file_idx); + ost = new_output_stream(oc, file_idx, NULL); + st = ost->st; data_enc = st->codec; if (!data_stream_copy) { fprintf(stderr, "Data stream encoding not supported yet (only streamcopy)\n"); - ffmpeg_exit(1); + exit_program(1); } - avcodec_get_context_defaults3(st->codec, codec); data_enc->codec_type = AVMEDIA_TYPE_DATA; @@ -3660,7 +3607,6 @@ if (oc->oformat->flags & AVFMT_GLOBALHEADER) { data_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; - avcodec_opts[AVMEDIA_TYPE_DATA]->flags |= CODEC_FLAG_GLOBAL_HEADER; } if (data_stream_copy) { st->stream_copy = 1; @@ -3674,30 +3620,23 @@ static void new_subtitle_stream(AVFormatContext *oc, int file_idx) { AVStream *st; - AVOutputStream *ost; + OutputStream *ost; AVCodec *codec=NULL; AVCodecContext *subtitle_enc; enum CodecID codec_id = CODEC_ID_NONE; - st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0); - if (!st) { - fprintf(stderr, "Could not alloc stream\n"); - ffmpeg_exit(1); - } - ost = new_output_stream(oc, file_idx); - subtitle_enc = st->codec; if(!subtitle_stream_copy){ if (subtitle_codec_name) { - codec_id = find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 1, - avcodec_opts[AVMEDIA_TYPE_SUBTITLE]->strict_std_compliance); + codec_id = find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 1); codec = avcodec_find_encoder_by_name(subtitle_codec_name); - ost->enc = codec; } else { codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_SUBTITLE); codec = avcodec_find_encoder(codec_id); } } - avcodec_get_context_defaults3(st->codec, codec); + ost = new_output_stream(oc, file_idx, codec); + st = ost->st; + subtitle_enc = st->codec; ost->bitstream_filters = subtitle_bitstream_filters; subtitle_bitstream_filters= NULL; @@ -3709,13 +3648,11 @@ if (oc->oformat->flags & AVFMT_GLOBALHEADER) { subtitle_enc->flags |= CODEC_FLAG_GLOBAL_HEADER; - avcodec_opts[AVMEDIA_TYPE_SUBTITLE]->flags |= CODEC_FLAG_GLOBAL_HEADER; } if (subtitle_stream_copy) { st->stream_copy = 1; } else { subtitle_enc->codec_id = codec_id; - set_context_opts(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], subtitle_enc, AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM, codec); } if (subtitle_language) { @@ -3734,7 +3671,7 @@ int file_idx = nb_output_files - 1; if (nb_output_files <= 0) { fprintf(stderr, "At least one output file must be specified\n"); - ffmpeg_exit(1); + exit_program(1); } oc = output_files[file_idx]; @@ -3759,16 +3696,16 @@ fprintf(stderr, "Invalid value '%s' for option '%s', required syntax is 'index:value'\n", arg, opt); - ffmpeg_exit(1); + exit_program(1); } *p++ = '\0'; - idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, MAX_STREAMS-1); + idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, INT_MAX); streamid_map = grow_array(streamid_map, sizeof(*streamid_map), &nb_streamid_map, idx+1); streamid_map[idx] = parse_number_or_die(opt, p, OPT_INT, 0, INT_MAX); return 0; } -static void opt_output_file(const char *filename) +static void opt_output_file(void *optctx, const char *filename) { AVFormatContext *oc; int err, use_video, use_audio, use_subtitle, use_data; @@ -3781,14 +3718,14 @@ oc = avformat_alloc_context(); if (!oc) { print_error(filename, AVERROR(ENOMEM)); - ffmpeg_exit(1); + exit_program(1); } if (last_asked_format) { file_oformat = av_guess_format(last_asked_format, NULL, NULL); if (!file_oformat) { fprintf(stderr, "Requested output format '%s' is not a suitable output format\n", last_asked_format); - ffmpeg_exit(1); + exit_program(1); } last_asked_format = NULL; } else { @@ -3796,7 +3733,7 @@ if (!file_oformat) { fprintf(stderr, "Unable to find a suitable output format for '%s'\n", filename); - ffmpeg_exit(1); + exit_program(1); } } @@ -3805,12 +3742,12 @@ if (!strcmp(file_oformat->name, "ffm") && av_strstart(filename, "http:", NULL)) { - /* special case for files sent to ffserver: we get the stream - parameters from ffserver */ - int err = read_ffserver_streams(oc, filename); + /* special case for files sent to avserver: we get the stream + parameters from avserver */ + int err = read_avserver_streams(oc, filename); if (err < 0) { print_error(filename, err); - ffmpeg_exit(1); + exit_program(1); } } else { use_video = file_oformat->video_codec != CODEC_ID_NONE || video_stream_copy || video_codec_name; @@ -3818,23 +3755,20 @@ use_subtitle = file_oformat->subtitle_codec != CODEC_ID_NONE || subtitle_stream_copy || subtitle_codec_name; use_data = data_stream_copy || data_codec_name; /* XXX once generic data codec will be available add a ->data_codec reference and use it here */ - /* disable if no corresponding type found and at least one - input file */ - if (nb_input_files > 0) { - check_inputs(&input_has_video, - &input_has_audio, - &input_has_subtitle, - &input_has_data); - - if (!input_has_video) - use_video = 0; - if (!input_has_audio) - use_audio = 0; - if (!input_has_subtitle) - use_subtitle = 0; - if (!input_has_data) - use_data = 0; - } + /* disable if no corresponding type found */ + check_inputs(&input_has_video, + &input_has_audio, + &input_has_subtitle, + &input_has_data); + + if (!input_has_video) + use_video = 0; + if (!input_has_audio) + use_audio = 0; + if (!input_has_subtitle) + use_subtitle = 0; + if (!input_has_data) + use_data = 0; /* manual disable */ if (audio_disable) use_audio = 0; @@ -3847,8 +3781,6 @@ if (use_subtitle) new_subtitle_stream(oc, nb_output_files); if (use_data) new_data_stream(oc, nb_output_files); - oc->timestamp = recording_timestamp; - av_dict_copy(&oc->metadata, metadata, 0); av_dict_free(&metadata); } @@ -3860,12 +3792,12 @@ if (oc->oformat->flags & AVFMT_NEEDNUMBER) { if (!av_filename_number_test(oc->filename)) { print_error(oc->filename, AVERROR(EINVAL)); - ffmpeg_exit(1); + exit_program(1); } } if (!(oc->oformat->flags & AVFMT_NOFILE)) { - /* test if it already exists to avoid loosing precious files */ + /* test if it already exists to avoid losing precious files */ if (!file_overwrite && (strchr(filename, ':') == NULL || filename[1] == ':' || @@ -3876,12 +3808,12 @@ fflush(stderr); if (!read_yesno()) { fprintf(stderr, "Not overwriting - exiting\n"); - ffmpeg_exit(1); + exit_program(1); } } else { fprintf(stderr,"File '%s' already exists. Exiting.\n", filename); - ffmpeg_exit(1); + exit_program(1); } } } @@ -3889,13 +3821,16 @@ /* open the file */ if ((err = avio_open(&oc->pb, filename, AVIO_FLAG_WRITE)) < 0) { print_error(filename, err); - ffmpeg_exit(1); + exit_program(1); } } oc->preload= (int)(mux_preload*AV_TIME_BASE); oc->max_delay= (int)(mux_max_delay*AV_TIME_BASE); - oc->loop_output = loop_output; + if (loop_output >= 0) { + av_log(NULL, AV_LOG_WARNING, "-loop_output is deprecated, use -loop\n"); + oc->loop_output = loop_output; + } oc->flags |= AVFMT_FLAG_NONBLOCK; frame_rate = (AVRational){0, 0}; @@ -3903,6 +3838,7 @@ frame_height = 0; audio_sample_rate = 0; audio_channels = 0; + audio_sample_fmt = AV_SAMPLE_FMT_NONE; av_freep(&forced_key_frames); uninit_opts(); @@ -3963,7 +3899,7 @@ p = strchr(p, ','); if(!p) { fprintf(stderr, "Syntax error in matrix \"%s\" at coeff %d\n", str, i); - ffmpeg_exit(1); + exit_program(1); } p++; } @@ -3993,6 +3929,7 @@ AVCodec *c; AVOutputFormat *oformat = NULL; AVInputFormat *iformat = NULL; + const AVClass *class; av_log_set_callback(log_callback_help); show_usage(); @@ -4020,7 +3957,8 @@ OPT_GRAB, OPT_GRAB); printf("\n"); - av_opt_show2(avcodec_opts[0], NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0); + class = avcodec_get_class(); + av_opt_show2(&class, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0); printf("\n"); /* individual codec options */ @@ -4032,7 +3970,8 @@ } } - av_opt_show2(avformat_opts, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0); + class = avformat_get_class(); + av_opt_show2(&class, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0); printf("\n"); /* individual muxer options */ @@ -4051,7 +3990,8 @@ } } - av_opt_show2(sws_opts, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0); + class = sws_get_class(); + av_opt_show2(&class, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0); } static int opt_target(const char *opt, const char *arg) @@ -4107,7 +4047,7 @@ fprintf(stderr, "Could not determine norm (PAL/NTSC/NTSC-Film) for target.\n"); fprintf(stderr, "Please prefix target with \"pal-\", \"ntsc-\" or \"film-\",\n"); fprintf(stderr, "or set a framerate with \"-r xxx\".\n"); - ffmpeg_exit(1); + exit_program(1); } if(!strcmp(arg, "vcd")) { @@ -4224,7 +4164,7 @@ if(!bsfc){ fprintf(stderr, "Unknown bitstream filter %s\n", arg); - ffmpeg_exit(1); + exit_program(1); } bsfp= *opt == 'v' ? &video_bitstream_filters : @@ -4248,7 +4188,7 @@ if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) { fprintf(stderr, "File for preset '%s' not found\n", arg); - ffmpeg_exit(1); + exit_program(1); } while(!feof(f)){ @@ -4258,7 +4198,7 @@ e|= sscanf(line, "%999[^=]=%999[^\n]\n", tmp, tmp2) - 2; if(e){ fprintf(stderr, "%s: Invalid syntax: '%s'\n", filename, line); - ffmpeg_exit(1); + exit_program(1); } if(!strcmp(tmp, "acodec")){ opt_audio_codec(tmp, tmp2); @@ -4270,7 +4210,7 @@ opt_data_codec(tmp, tmp2); }else if(opt_default(tmp, tmp2) < 0){ fprintf(stderr, "%s: Invalid option or argument: '%s', parsed as '%s' = '%s'\n", filename, line, tmp, tmp2); - ffmpeg_exit(1); + exit_program(1); } } @@ -4307,8 +4247,8 @@ { "hex", OPT_BOOL | OPT_EXPERT, {(void*)&do_hex_dump}, "when dumping packets, also dump the payload" }, { "re", OPT_BOOL | OPT_EXPERT, {(void*)&rate_emu}, "read input at native frame rate", "" }, - { "loop_input", OPT_BOOL | OPT_EXPERT, {(void*)&loop_input}, "loop (current only works with images)" }, - { "loop_output", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&loop_output}, "number of times to loop output in formats that support looping (0 loops forever)", "" }, + { "loop_input", OPT_BOOL | OPT_EXPERT, {(void*)&loop_input}, "deprecated, use -loop" }, + { "loop_output", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&loop_output}, "deprecated, use -loop", "" }, { "v", HAS_ARG, {(void*)opt_verbose}, "set ffmpeg verbosity level", "number" }, { "target", HAS_ARG, {(void*)opt_target}, "specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\", \"dv50\", \"pal-vcd\", \"ntsc-svcd\", ...)", "type" }, { "threads", HAS_ARG | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" }, @@ -4324,8 +4264,6 @@ { "copyinkf", OPT_BOOL | OPT_EXPERT, {(void*)©_initial_nonkeyframes}, "copy initial non-keyframes" }, /* video options */ - { "b", HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, - { "vb", HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, { "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[AVMEDIA_TYPE_VIDEO]}, "set the number of video frames to record", "number" }, { "r", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_rate}, "set frame rate (Hz value, fraction or abbreviation)", "rate" }, { "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" }, @@ -4372,7 +4310,6 @@ { "force_key_frames", OPT_STRING | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void *)&forced_key_frames}, "force key frames at specified timestamps", "timestamps" }, /* audio options */ - { "ab", HAS_ARG | OPT_AUDIO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" }, { "aframes", OPT_INT | HAS_ARG | OPT_AUDIO, {(void*)&max_frames[AVMEDIA_TYPE_AUDIO]}, "set the number of audio frames to record", "number" }, { "aq", OPT_FLOAT | HAS_ARG | OPT_AUDIO, {(void*)&audio_qscale}, "set audio quality (codec-specific)", "quality", }, { "ar", HAS_ARG | OPT_AUDIO, {(void*)opt_audio_rate}, "set audio sampling rate (in Hz)", "rate" }, @@ -4421,6 +4358,7 @@ int64_t ti; av_log_set_flags(AV_LOG_SKIP_REPEATED); + parse_loglevel(argc, argv, options); avcodec_register_all(); #if CONFIG_AVDEVICE @@ -4430,6 +4368,7 @@ avfilter_register_all(); #endif av_register_all(); + avformat_network_init(); avio_set_interrupt_cb(decode_interrupt_cb); @@ -4437,35 +4376,40 @@ show_banner(); + av_log(NULL, AV_LOG_WARNING, "This program is not developed anymore and is only " + "provided for compatibility. Use avconv instead " + "(see Changelog for the list of incompatible changes).\n"); + /* parse options */ - parse_options(argc, argv, options, opt_output_file); + parse_options(NULL, argc, argv, options, opt_output_file); if(nb_output_files <= 0 && nb_input_files == 0) { show_usage(); fprintf(stderr, "Use -h to get full help or, even better, run 'man ffmpeg'\n"); - ffmpeg_exit(1); + exit_program(1); } /* file converter / grab */ if (nb_output_files <= 0) { fprintf(stderr, "At least one output file must be specified\n"); - ffmpeg_exit(1); + exit_program(1); } if (nb_input_files == 0) { fprintf(stderr, "At least one input file must be specified\n"); - ffmpeg_exit(1); + exit_program(1); } ti = getutime(); if (transcode(output_files, nb_output_files, input_files, nb_input_files, stream_maps, nb_stream_maps) < 0) - ffmpeg_exit(1); + exit_program(1); ti = getutime() - ti; if (do_benchmark) { int maxrss = getmaxrss() / 1024; printf("bench: utime=%0.3fs maxrss=%ikB\n", ti / 1000000.0, maxrss); } - return ffmpeg_exit(0); + exit_program(0); + return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffplay.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffplay.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffplay.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffplay.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,3085 +0,0 @@ -/* - * ffplay : Simple Media Player based on the Libav libraries - * Copyright (c) 2003 Fabrice Bellard - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" -#include -#include -#include -#include "libavutil/avstring.h" -#include "libavutil/colorspace.h" -#include "libavutil/pixdesc.h" -#include "libavutil/imgutils.h" -#include "libavutil/dict.h" -#include "libavutil/parseutils.h" -#include "libavutil/samplefmt.h" -#include "libavformat/avformat.h" -#include "libavdevice/avdevice.h" -#include "libswscale/swscale.h" -#include "libavcodec/audioconvert.h" -#include "libavutil/opt.h" -#include "libavcodec/avfft.h" - -#if CONFIG_AVFILTER -# include "libavfilter/avfilter.h" -# include "libavfilter/avfiltergraph.h" -#endif - -#include "cmdutils.h" - -#include -#include - -#ifdef __MINGW32__ -#undef main /* We don't want SDL to override our main() */ -#endif - -#include -#include - -const char program_name[] = "ffplay"; -const int program_birth_year = 2003; - -#define MAX_QUEUE_SIZE (15 * 1024 * 1024) -#define MIN_AUDIOQ_SIZE (20 * 16 * 1024) -#define MIN_FRAMES 5 - -/* SDL audio buffer size, in samples. Should be small to have precise - A/V sync as SDL does not have hardware buffer fullness info. */ -#define SDL_AUDIO_BUFFER_SIZE 1024 - -/* no AV sync correction is done if below the AV sync threshold */ -#define AV_SYNC_THRESHOLD 0.01 -/* no AV correction is done if too big error */ -#define AV_NOSYNC_THRESHOLD 10.0 - -#define FRAME_SKIP_FACTOR 0.05 - -/* maximum audio speed change to get correct sync */ -#define SAMPLE_CORRECTION_PERCENT_MAX 10 - -/* we use about AUDIO_DIFF_AVG_NB A-V differences to make the average */ -#define AUDIO_DIFF_AVG_NB 20 - -/* NOTE: the size must be big enough to compensate the hardware audio buffersize size */ -#define SAMPLE_ARRAY_SIZE (2*65536) - -static int sws_flags = SWS_BICUBIC; - -typedef struct PacketQueue { - AVPacketList *first_pkt, *last_pkt; - int nb_packets; - int size; - int abort_request; - SDL_mutex *mutex; - SDL_cond *cond; -} PacketQueue; - -#define VIDEO_PICTURE_QUEUE_SIZE 2 -#define SUBPICTURE_QUEUE_SIZE 4 - -typedef struct VideoPicture { - double pts; ///mutex = SDL_CreateMutex(); - q->cond = SDL_CreateCond(); - packet_queue_put(q, &flush_pkt); -} - -static void packet_queue_flush(PacketQueue *q) -{ - AVPacketList *pkt, *pkt1; - - SDL_LockMutex(q->mutex); - for(pkt = q->first_pkt; pkt != NULL; pkt = pkt1) { - pkt1 = pkt->next; - av_free_packet(&pkt->pkt); - av_freep(&pkt); - } - q->last_pkt = NULL; - q->first_pkt = NULL; - q->nb_packets = 0; - q->size = 0; - SDL_UnlockMutex(q->mutex); -} - -static void packet_queue_end(PacketQueue *q) -{ - packet_queue_flush(q); - SDL_DestroyMutex(q->mutex); - SDL_DestroyCond(q->cond); -} - -static int packet_queue_put(PacketQueue *q, AVPacket *pkt) -{ - AVPacketList *pkt1; - - /* duplicate the packet */ - if (pkt!=&flush_pkt && av_dup_packet(pkt) < 0) - return -1; - - pkt1 = av_malloc(sizeof(AVPacketList)); - if (!pkt1) - return -1; - pkt1->pkt = *pkt; - pkt1->next = NULL; - - - SDL_LockMutex(q->mutex); - - if (!q->last_pkt) - - q->first_pkt = pkt1; - else - q->last_pkt->next = pkt1; - q->last_pkt = pkt1; - q->nb_packets++; - q->size += pkt1->pkt.size + sizeof(*pkt1); - /* XXX: should duplicate packet data in DV case */ - SDL_CondSignal(q->cond); - - SDL_UnlockMutex(q->mutex); - return 0; -} - -static void packet_queue_abort(PacketQueue *q) -{ - SDL_LockMutex(q->mutex); - - q->abort_request = 1; - - SDL_CondSignal(q->cond); - - SDL_UnlockMutex(q->mutex); -} - -/* return < 0 if aborted, 0 if no packet and > 0 if packet. */ -static int packet_queue_get(PacketQueue *q, AVPacket *pkt, int block) -{ - AVPacketList *pkt1; - int ret; - - SDL_LockMutex(q->mutex); - - for(;;) { - if (q->abort_request) { - ret = -1; - break; - } - - pkt1 = q->first_pkt; - if (pkt1) { - q->first_pkt = pkt1->next; - if (!q->first_pkt) - q->last_pkt = NULL; - q->nb_packets--; - q->size -= pkt1->pkt.size + sizeof(*pkt1); - *pkt = pkt1->pkt; - av_free(pkt1); - ret = 1; - break; - } else if (!block) { - ret = 0; - break; - } else { - SDL_CondWait(q->cond, q->mutex); - } - } - SDL_UnlockMutex(q->mutex); - return ret; -} - -static inline void fill_rectangle(SDL_Surface *screen, - int x, int y, int w, int h, int color) -{ - SDL_Rect rect; - rect.x = x; - rect.y = y; - rect.w = w; - rect.h = h; - SDL_FillRect(screen, &rect, color); -} - -#define ALPHA_BLEND(a, oldp, newp, s)\ -((((oldp << s) * (255 - (a))) + (newp * (a))) / (255 << s)) - -#define RGBA_IN(r, g, b, a, s)\ -{\ - unsigned int v = ((const uint32_t *)(s))[0];\ - a = (v >> 24) & 0xff;\ - r = (v >> 16) & 0xff;\ - g = (v >> 8) & 0xff;\ - b = v & 0xff;\ -} - -#define YUVA_IN(y, u, v, a, s, pal)\ -{\ - unsigned int val = ((const uint32_t *)(pal))[*(const uint8_t*)(s)];\ - a = (val >> 24) & 0xff;\ - y = (val >> 16) & 0xff;\ - u = (val >> 8) & 0xff;\ - v = val & 0xff;\ -} - -#define YUVA_OUT(d, y, u, v, a)\ -{\ - ((uint32_t *)(d))[0] = (a << 24) | (y << 16) | (u << 8) | v;\ -} - - -#define BPP 1 - -static void blend_subrect(AVPicture *dst, const AVSubtitleRect *rect, int imgw, int imgh) -{ - int wrap, wrap3, width2, skip2; - int y, u, v, a, u1, v1, a1, w, h; - uint8_t *lum, *cb, *cr; - const uint8_t *p; - const uint32_t *pal; - int dstx, dsty, dstw, dsth; - - dstw = av_clip(rect->w, 0, imgw); - dsth = av_clip(rect->h, 0, imgh); - dstx = av_clip(rect->x, 0, imgw - dstw); - dsty = av_clip(rect->y, 0, imgh - dsth); - lum = dst->data[0] + dsty * dst->linesize[0]; - cb = dst->data[1] + (dsty >> 1) * dst->linesize[1]; - cr = dst->data[2] + (dsty >> 1) * dst->linesize[2]; - - width2 = ((dstw + 1) >> 1) + (dstx & ~dstw & 1); - skip2 = dstx >> 1; - wrap = dst->linesize[0]; - wrap3 = rect->pict.linesize[0]; - p = rect->pict.data[0]; - pal = (const uint32_t *)rect->pict.data[1]; /* Now in YCrCb! */ - - if (dsty & 1) { - lum += dstx; - cb += skip2; - cr += skip2; - - if (dstx & 1) { - YUVA_IN(y, u, v, a, p, pal); - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - cb[0] = ALPHA_BLEND(a >> 2, cb[0], u, 0); - cr[0] = ALPHA_BLEND(a >> 2, cr[0], v, 0); - cb++; - cr++; - lum++; - p += BPP; - } - for(w = dstw - (dstx & 1); w >= 2; w -= 2) { - YUVA_IN(y, u, v, a, p, pal); - u1 = u; - v1 = v; - a1 = a; - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - - YUVA_IN(y, u, v, a, p + BPP, pal); - u1 += u; - v1 += v; - a1 += a; - lum[1] = ALPHA_BLEND(a, lum[1], y, 0); - cb[0] = ALPHA_BLEND(a1 >> 2, cb[0], u1, 1); - cr[0] = ALPHA_BLEND(a1 >> 2, cr[0], v1, 1); - cb++; - cr++; - p += 2 * BPP; - lum += 2; - } - if (w) { - YUVA_IN(y, u, v, a, p, pal); - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - cb[0] = ALPHA_BLEND(a >> 2, cb[0], u, 0); - cr[0] = ALPHA_BLEND(a >> 2, cr[0], v, 0); - p++; - lum++; - } - p += wrap3 - dstw * BPP; - lum += wrap - dstw - dstx; - cb += dst->linesize[1] - width2 - skip2; - cr += dst->linesize[2] - width2 - skip2; - } - for(h = dsth - (dsty & 1); h >= 2; h -= 2) { - lum += dstx; - cb += skip2; - cr += skip2; - - if (dstx & 1) { - YUVA_IN(y, u, v, a, p, pal); - u1 = u; - v1 = v; - a1 = a; - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - p += wrap3; - lum += wrap; - YUVA_IN(y, u, v, a, p, pal); - u1 += u; - v1 += v; - a1 += a; - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - cb[0] = ALPHA_BLEND(a1 >> 2, cb[0], u1, 1); - cr[0] = ALPHA_BLEND(a1 >> 2, cr[0], v1, 1); - cb++; - cr++; - p += -wrap3 + BPP; - lum += -wrap + 1; - } - for(w = dstw - (dstx & 1); w >= 2; w -= 2) { - YUVA_IN(y, u, v, a, p, pal); - u1 = u; - v1 = v; - a1 = a; - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - - YUVA_IN(y, u, v, a, p + BPP, pal); - u1 += u; - v1 += v; - a1 += a; - lum[1] = ALPHA_BLEND(a, lum[1], y, 0); - p += wrap3; - lum += wrap; - - YUVA_IN(y, u, v, a, p, pal); - u1 += u; - v1 += v; - a1 += a; - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - - YUVA_IN(y, u, v, a, p + BPP, pal); - u1 += u; - v1 += v; - a1 += a; - lum[1] = ALPHA_BLEND(a, lum[1], y, 0); - - cb[0] = ALPHA_BLEND(a1 >> 2, cb[0], u1, 2); - cr[0] = ALPHA_BLEND(a1 >> 2, cr[0], v1, 2); - - cb++; - cr++; - p += -wrap3 + 2 * BPP; - lum += -wrap + 2; - } - if (w) { - YUVA_IN(y, u, v, a, p, pal); - u1 = u; - v1 = v; - a1 = a; - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - p += wrap3; - lum += wrap; - YUVA_IN(y, u, v, a, p, pal); - u1 += u; - v1 += v; - a1 += a; - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - cb[0] = ALPHA_BLEND(a1 >> 2, cb[0], u1, 1); - cr[0] = ALPHA_BLEND(a1 >> 2, cr[0], v1, 1); - cb++; - cr++; - p += -wrap3 + BPP; - lum += -wrap + 1; - } - p += wrap3 + (wrap3 - dstw * BPP); - lum += wrap + (wrap - dstw - dstx); - cb += dst->linesize[1] - width2 - skip2; - cr += dst->linesize[2] - width2 - skip2; - } - /* handle odd height */ - if (h) { - lum += dstx; - cb += skip2; - cr += skip2; - - if (dstx & 1) { - YUVA_IN(y, u, v, a, p, pal); - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - cb[0] = ALPHA_BLEND(a >> 2, cb[0], u, 0); - cr[0] = ALPHA_BLEND(a >> 2, cr[0], v, 0); - cb++; - cr++; - lum++; - p += BPP; - } - for(w = dstw - (dstx & 1); w >= 2; w -= 2) { - YUVA_IN(y, u, v, a, p, pal); - u1 = u; - v1 = v; - a1 = a; - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - - YUVA_IN(y, u, v, a, p + BPP, pal); - u1 += u; - v1 += v; - a1 += a; - lum[1] = ALPHA_BLEND(a, lum[1], y, 0); - cb[0] = ALPHA_BLEND(a1 >> 2, cb[0], u, 1); - cr[0] = ALPHA_BLEND(a1 >> 2, cr[0], v, 1); - cb++; - cr++; - p += 2 * BPP; - lum += 2; - } - if (w) { - YUVA_IN(y, u, v, a, p, pal); - lum[0] = ALPHA_BLEND(a, lum[0], y, 0); - cb[0] = ALPHA_BLEND(a >> 2, cb[0], u, 0); - cr[0] = ALPHA_BLEND(a >> 2, cr[0], v, 0); - } - } -} - -static void free_subpicture(SubPicture *sp) -{ - avsubtitle_free(&sp->sub); -} - -static void video_image_display(VideoState *is) -{ - VideoPicture *vp; - SubPicture *sp; - AVPicture pict; - float aspect_ratio; - int width, height, x, y; - SDL_Rect rect; - int i; - - vp = &is->pictq[is->pictq_rindex]; - if (vp->bmp) { -#if CONFIG_AVFILTER - if (vp->picref->video->pixel_aspect.num == 0) - aspect_ratio = 0; - else - aspect_ratio = av_q2d(vp->picref->video->pixel_aspect); -#else - - /* XXX: use variable in the frame */ - if (is->video_st->sample_aspect_ratio.num) - aspect_ratio = av_q2d(is->video_st->sample_aspect_ratio); - else if (is->video_st->codec->sample_aspect_ratio.num) - aspect_ratio = av_q2d(is->video_st->codec->sample_aspect_ratio); - else - aspect_ratio = 0; -#endif - if (aspect_ratio <= 0.0) - aspect_ratio = 1.0; - aspect_ratio *= (float)vp->width / (float)vp->height; - - if (is->subtitle_st) - { - if (is->subpq_size > 0) - { - sp = &is->subpq[is->subpq_rindex]; - - if (vp->pts >= sp->pts + ((float) sp->sub.start_display_time / 1000)) - { - SDL_LockYUVOverlay (vp->bmp); - - pict.data[0] = vp->bmp->pixels[0]; - pict.data[1] = vp->bmp->pixels[2]; - pict.data[2] = vp->bmp->pixels[1]; - - pict.linesize[0] = vp->bmp->pitches[0]; - pict.linesize[1] = vp->bmp->pitches[2]; - pict.linesize[2] = vp->bmp->pitches[1]; - - for (i = 0; i < sp->sub.num_rects; i++) - blend_subrect(&pict, sp->sub.rects[i], - vp->bmp->w, vp->bmp->h); - - SDL_UnlockYUVOverlay (vp->bmp); - } - } - } - - - /* XXX: we suppose the screen has a 1.0 pixel ratio */ - height = is->height; - width = ((int)rint(height * aspect_ratio)) & ~1; - if (width > is->width) { - width = is->width; - height = ((int)rint(width / aspect_ratio)) & ~1; - } - x = (is->width - width) / 2; - y = (is->height - height) / 2; - is->no_background = 0; - rect.x = is->xleft + x; - rect.y = is->ytop + y; - rect.w = width; - rect.h = height; - SDL_DisplayYUVOverlay(vp->bmp, &rect); - } -} - -/* get the current audio output buffer size, in samples. With SDL, we - cannot have a precise information */ -static int audio_write_get_buf_size(VideoState *is) -{ - return is->audio_buf_size - is->audio_buf_index; -} - -static inline int compute_mod(int a, int b) -{ - a = a % b; - if (a >= 0) - return a; - else - return a + b; -} - -static void video_audio_display(VideoState *s) -{ - int i, i_start, x, y1, y, ys, delay, n, nb_display_channels; - int ch, channels, h, h2, bgcolor, fgcolor; - int16_t time_diff; - int rdft_bits, nb_freq; - - for(rdft_bits=1; (1<height; rdft_bits++) - ; - nb_freq= 1<<(rdft_bits-1); - - /* compute display index : center on currently output samples */ - channels = s->audio_st->codec->channels; - nb_display_channels = channels; - if (!s->paused) { - int data_used= s->show_audio==1 ? s->width : (2*nb_freq); - n = 2 * channels; - delay = audio_write_get_buf_size(s); - delay /= n; - - /* to be more precise, we take into account the time spent since - the last buffer computation */ - if (audio_callback_time) { - time_diff = av_gettime() - audio_callback_time; - delay -= (time_diff * s->audio_st->codec->sample_rate) / 1000000; - } - - delay += 2*data_used; - if (delay < data_used) - delay = data_used; - - i_start= x = compute_mod(s->sample_array_index - delay * channels, SAMPLE_ARRAY_SIZE); - if(s->show_audio==1){ - h= INT_MIN; - for(i=0; i<1000; i+=channels){ - int idx= (SAMPLE_ARRAY_SIZE + x - i) % SAMPLE_ARRAY_SIZE; - int a= s->sample_array[idx]; - int b= s->sample_array[(idx + 4*channels)%SAMPLE_ARRAY_SIZE]; - int c= s->sample_array[(idx + 5*channels)%SAMPLE_ARRAY_SIZE]; - int d= s->sample_array[(idx + 9*channels)%SAMPLE_ARRAY_SIZE]; - int score= a-d; - if(hlast_i_start = i_start; - } else { - i_start = s->last_i_start; - } - - bgcolor = SDL_MapRGB(screen->format, 0x00, 0x00, 0x00); - if(s->show_audio==1){ - fill_rectangle(screen, - s->xleft, s->ytop, s->width, s->height, - bgcolor); - - fgcolor = SDL_MapRGB(screen->format, 0xff, 0xff, 0xff); - - /* total height for one channel */ - h = s->height / nb_display_channels; - /* graph height / 2 */ - h2 = (h * 9) / 20; - for(ch = 0;ch < nb_display_channels; ch++) { - i = i_start + ch; - y1 = s->ytop + ch * h + (h / 2); /* position of center line */ - for(x = 0; x < s->width; x++) { - y = (s->sample_array[i] * h2) >> 15; - if (y < 0) { - y = -y; - ys = y1 - y; - } else { - ys = y1; - } - fill_rectangle(screen, - s->xleft + x, ys, 1, y, - fgcolor); - i += channels; - if (i >= SAMPLE_ARRAY_SIZE) - i -= SAMPLE_ARRAY_SIZE; - } - } - - fgcolor = SDL_MapRGB(screen->format, 0x00, 0x00, 0xff); - - for(ch = 1;ch < nb_display_channels; ch++) { - y = s->ytop + ch * h; - fill_rectangle(screen, - s->xleft, y, s->width, 1, - fgcolor); - } - SDL_UpdateRect(screen, s->xleft, s->ytop, s->width, s->height); - }else{ - nb_display_channels= FFMIN(nb_display_channels, 2); - if(rdft_bits != s->rdft_bits){ - av_rdft_end(s->rdft); - av_free(s->rdft_data); - s->rdft = av_rdft_init(rdft_bits, DFT_R2C); - s->rdft_bits= rdft_bits; - s->rdft_data= av_malloc(4*nb_freq*sizeof(*s->rdft_data)); - } - { - FFTSample *data[2]; - for(ch = 0;ch < nb_display_channels; ch++) { - data[ch] = s->rdft_data + 2*nb_freq*ch; - i = i_start + ch; - for(x = 0; x < 2*nb_freq; x++) { - double w= (x-nb_freq)*(1.0/nb_freq); - data[ch][x]= s->sample_array[i]*(1.0-w*w); - i += channels; - if (i >= SAMPLE_ARRAY_SIZE) - i -= SAMPLE_ARRAY_SIZE; - } - av_rdft_calc(s->rdft, data[ch]); - } - //least efficient way to do this, we should of course directly access it but its more than fast enough - for(y=0; yheight; y++){ - double w= 1/sqrt(nb_freq); - int a= sqrt(w*sqrt(data[0][2*y+0]*data[0][2*y+0] + data[0][2*y+1]*data[0][2*y+1])); - int b= (nb_display_channels == 2 ) ? sqrt(w*sqrt(data[1][2*y+0]*data[1][2*y+0] - + data[1][2*y+1]*data[1][2*y+1])) : a; - a= FFMIN(a,255); - b= FFMIN(b,255); - fgcolor = SDL_MapRGB(screen->format, a, b, (a+b)/2); - - fill_rectangle(screen, - s->xpos, s->height-y, 1, 1, - fgcolor); - } - } - SDL_UpdateRect(screen, s->xpos, s->ytop, 1, s->height); - s->xpos++; - if(s->xpos >= s->width) - s->xpos= s->xleft; - } -} - -static int video_open(VideoState *is){ - int flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL; - int w,h; - - if(is_full_screen) flags |= SDL_FULLSCREEN; - else flags |= SDL_RESIZABLE; - - if (is_full_screen && fs_screen_width) { - w = fs_screen_width; - h = fs_screen_height; - } else if(!is_full_screen && screen_width){ - w = screen_width; - h = screen_height; -#if CONFIG_AVFILTER - }else if (is->out_video_filter && is->out_video_filter->inputs[0]){ - w = is->out_video_filter->inputs[0]->w; - h = is->out_video_filter->inputs[0]->h; -#else - }else if (is->video_st && is->video_st->codec->width){ - w = is->video_st->codec->width; - h = is->video_st->codec->height; -#endif - } else { - w = 640; - h = 480; - } - if(screen && is->width == screen->w && screen->w == w - && is->height== screen->h && screen->h == h) - return 0; - -#ifndef __APPLE__ - screen = SDL_SetVideoMode(w, h, 0, flags); -#else - /* setting bits_per_pixel = 0 or 32 causes blank video on OS X */ - screen = SDL_SetVideoMode(w, h, 24, flags); -#endif - if (!screen) { - fprintf(stderr, "SDL: could not set video mode - exiting\n"); - return -1; - } - if (!window_title) - window_title = input_filename; - SDL_WM_SetCaption(window_title, window_title); - - is->width = screen->w; - is->height = screen->h; - - return 0; -} - -/* display the current picture, if any */ -static void video_display(VideoState *is) -{ - if(!screen) - video_open(cur_stream); - if (is->audio_st && is->show_audio) - video_audio_display(is); - else if (is->video_st) - video_image_display(is); -} - -static int refresh_thread(void *opaque) -{ - VideoState *is= opaque; - while(!is->abort_request){ - SDL_Event event; - event.type = FF_REFRESH_EVENT; - event.user.data1 = opaque; - if(!is->refresh){ - is->refresh=1; - SDL_PushEvent(&event); - } - usleep(is->audio_st && is->show_audio ? rdftspeed*1000 : 5000); //FIXME ideally we should wait the correct time but SDLs event passing is so slow it would be silly - } - return 0; -} - -/* get the current audio clock value */ -static double get_audio_clock(VideoState *is) -{ - double pts; - int hw_buf_size, bytes_per_sec; - pts = is->audio_clock; - hw_buf_size = audio_write_get_buf_size(is); - bytes_per_sec = 0; - if (is->audio_st) { - bytes_per_sec = is->audio_st->codec->sample_rate * - 2 * is->audio_st->codec->channels; - } - if (bytes_per_sec) - pts -= (double)hw_buf_size / bytes_per_sec; - return pts; -} - -/* get the current video clock value */ -static double get_video_clock(VideoState *is) -{ - if (is->paused) { - return is->video_current_pts; - } else { - return is->video_current_pts_drift + av_gettime() / 1000000.0; - } -} - -/* get the current external clock value */ -static double get_external_clock(VideoState *is) -{ - int64_t ti; - ti = av_gettime(); - return is->external_clock + ((ti - is->external_clock_time) * 1e-6); -} - -/* get the current master clock value */ -static double get_master_clock(VideoState *is) -{ - double val; - - if (is->av_sync_type == AV_SYNC_VIDEO_MASTER) { - if (is->video_st) - val = get_video_clock(is); - else - val = get_audio_clock(is); - } else if (is->av_sync_type == AV_SYNC_AUDIO_MASTER) { - if (is->audio_st) - val = get_audio_clock(is); - else - val = get_video_clock(is); - } else { - val = get_external_clock(is); - } - return val; -} - -/* seek in the stream */ -static void stream_seek(VideoState *is, int64_t pos, int64_t rel, int seek_by_bytes) -{ - if (!is->seek_req) { - is->seek_pos = pos; - is->seek_rel = rel; - is->seek_flags &= ~AVSEEK_FLAG_BYTE; - if (seek_by_bytes) - is->seek_flags |= AVSEEK_FLAG_BYTE; - is->seek_req = 1; - } -} - -/* pause or resume the video */ -static void stream_pause(VideoState *is) -{ - if (is->paused) { - is->frame_timer += av_gettime() / 1000000.0 + is->video_current_pts_drift - is->video_current_pts; - if(is->read_pause_return != AVERROR(ENOSYS)){ - is->video_current_pts = is->video_current_pts_drift + av_gettime() / 1000000.0; - } - is->video_current_pts_drift = is->video_current_pts - av_gettime() / 1000000.0; - } - is->paused = !is->paused; -} - -static double compute_target_time(double frame_current_pts, VideoState *is) -{ - double delay, sync_threshold, diff; - - /* compute nominal delay */ - delay = frame_current_pts - is->frame_last_pts; - if (delay <= 0 || delay >= 10.0) { - /* if incorrect delay, use previous one */ - delay = is->frame_last_delay; - } else { - is->frame_last_delay = delay; - } - is->frame_last_pts = frame_current_pts; - - /* update delay to follow master synchronisation source */ - if (((is->av_sync_type == AV_SYNC_AUDIO_MASTER && is->audio_st) || - is->av_sync_type == AV_SYNC_EXTERNAL_CLOCK)) { - /* if video is slave, we try to correct big delays by - duplicating or deleting a frame */ - diff = get_video_clock(is) - get_master_clock(is); - - /* skip or repeat frame. We take into account the - delay to compute the threshold. I still don't know - if it is the best guess */ - sync_threshold = FFMAX(AV_SYNC_THRESHOLD, delay); - if (fabs(diff) < AV_NOSYNC_THRESHOLD) { - if (diff <= -sync_threshold) - delay = 0; - else if (diff >= sync_threshold) - delay = 2 * delay; - } - } - is->frame_timer += delay; - - av_dlog(NULL, "video: delay=%0.3f pts=%0.3f A-V=%f\n", - delay, frame_current_pts, -diff); - - return is->frame_timer; -} - -/* called to display each frame */ -static void video_refresh_timer(void *opaque) -{ - VideoState *is = opaque; - VideoPicture *vp; - - SubPicture *sp, *sp2; - - if (is->video_st) { -retry: - if (is->pictq_size == 0) { - //nothing to do, no picture to display in the que - } else { - double time= av_gettime()/1000000.0; - double next_target; - /* dequeue the picture */ - vp = &is->pictq[is->pictq_rindex]; - - if(time < vp->target_clock) - return; - /* update current video pts */ - is->video_current_pts = vp->pts; - is->video_current_pts_drift = is->video_current_pts - time; - is->video_current_pos = vp->pos; - if(is->pictq_size > 1){ - VideoPicture *nextvp= &is->pictq[(is->pictq_rindex+1)%VIDEO_PICTURE_QUEUE_SIZE]; - assert(nextvp->target_clock >= vp->target_clock); - next_target= nextvp->target_clock; - }else{ - next_target= vp->target_clock + is->video_clock - vp->pts; //FIXME pass durations cleanly - } - if(framedrop && time > next_target){ - is->skip_frames *= 1.0 + FRAME_SKIP_FACTOR; - if(is->pictq_size > 1 || time > next_target + 0.5){ - /* update queue size and signal for next picture */ - if (++is->pictq_rindex == VIDEO_PICTURE_QUEUE_SIZE) - is->pictq_rindex = 0; - - SDL_LockMutex(is->pictq_mutex); - is->pictq_size--; - SDL_CondSignal(is->pictq_cond); - SDL_UnlockMutex(is->pictq_mutex); - goto retry; - } - } - - if(is->subtitle_st) { - if (is->subtitle_stream_changed) { - SDL_LockMutex(is->subpq_mutex); - - while (is->subpq_size) { - free_subpicture(&is->subpq[is->subpq_rindex]); - - /* update queue size and signal for next picture */ - if (++is->subpq_rindex == SUBPICTURE_QUEUE_SIZE) - is->subpq_rindex = 0; - - is->subpq_size--; - } - is->subtitle_stream_changed = 0; - - SDL_CondSignal(is->subpq_cond); - SDL_UnlockMutex(is->subpq_mutex); - } else { - if (is->subpq_size > 0) { - sp = &is->subpq[is->subpq_rindex]; - - if (is->subpq_size > 1) - sp2 = &is->subpq[(is->subpq_rindex + 1) % SUBPICTURE_QUEUE_SIZE]; - else - sp2 = NULL; - - if ((is->video_current_pts > (sp->pts + ((float) sp->sub.end_display_time / 1000))) - || (sp2 && is->video_current_pts > (sp2->pts + ((float) sp2->sub.start_display_time / 1000)))) - { - free_subpicture(sp); - - /* update queue size and signal for next picture */ - if (++is->subpq_rindex == SUBPICTURE_QUEUE_SIZE) - is->subpq_rindex = 0; - - SDL_LockMutex(is->subpq_mutex); - is->subpq_size--; - SDL_CondSignal(is->subpq_cond); - SDL_UnlockMutex(is->subpq_mutex); - } - } - } - } - - /* display picture */ - if (!display_disable) - video_display(is); - - /* update queue size and signal for next picture */ - if (++is->pictq_rindex == VIDEO_PICTURE_QUEUE_SIZE) - is->pictq_rindex = 0; - - SDL_LockMutex(is->pictq_mutex); - is->pictq_size--; - SDL_CondSignal(is->pictq_cond); - SDL_UnlockMutex(is->pictq_mutex); - } - } else if (is->audio_st) { - /* draw the next audio frame */ - - /* if only audio stream, then display the audio bars (better - than nothing, just to test the implementation */ - - /* display picture */ - if (!display_disable) - video_display(is); - } - if (show_status) { - static int64_t last_time; - int64_t cur_time; - int aqsize, vqsize, sqsize; - double av_diff; - - cur_time = av_gettime(); - if (!last_time || (cur_time - last_time) >= 30000) { - aqsize = 0; - vqsize = 0; - sqsize = 0; - if (is->audio_st) - aqsize = is->audioq.size; - if (is->video_st) - vqsize = is->videoq.size; - if (is->subtitle_st) - sqsize = is->subtitleq.size; - av_diff = 0; - if (is->audio_st && is->video_st) - av_diff = get_audio_clock(is) - get_video_clock(is); - printf("%7.2f A-V:%7.3f s:%3.1f aq=%5dKB vq=%5dKB sq=%5dB f=%"PRId64"/%"PRId64" \r", - get_master_clock(is), av_diff, FFMAX(is->skip_frames-1, 0), aqsize / 1024, vqsize / 1024, sqsize, is->pts_ctx.num_faulty_dts, is->pts_ctx.num_faulty_pts); - fflush(stdout); - last_time = cur_time; - } - } -} - -static void stream_close(VideoState *is) -{ - VideoPicture *vp; - int i; - /* XXX: use a special url_shutdown call to abort parse cleanly */ - is->abort_request = 1; - SDL_WaitThread(is->parse_tid, NULL); - SDL_WaitThread(is->refresh_tid, NULL); - - /* free all pictures */ - for(i=0;ipictq[i]; -#if CONFIG_AVFILTER - if (vp->picref) { - avfilter_unref_buffer(vp->picref); - vp->picref = NULL; - } -#endif - if (vp->bmp) { - SDL_FreeYUVOverlay(vp->bmp); - vp->bmp = NULL; - } - } - SDL_DestroyMutex(is->pictq_mutex); - SDL_DestroyCond(is->pictq_cond); - SDL_DestroyMutex(is->subpq_mutex); - SDL_DestroyCond(is->subpq_cond); -#if !CONFIG_AVFILTER - if (is->img_convert_ctx) - sws_freeContext(is->img_convert_ctx); -#endif - av_free(is); -} - -static void do_exit(void) -{ - if (cur_stream) { - stream_close(cur_stream); - cur_stream = NULL; - } - uninit_opts(); -#if CONFIG_AVFILTER - avfilter_uninit(); -#endif - if (show_status) - printf("\n"); - SDL_Quit(); - av_log(NULL, AV_LOG_QUIET, ""); - exit(0); -} - -/* allocate a picture (needs to do that in main thread to avoid - potential locking problems */ -static void alloc_picture(void *opaque) -{ - VideoState *is = opaque; - VideoPicture *vp; - - vp = &is->pictq[is->pictq_windex]; - - if (vp->bmp) - SDL_FreeYUVOverlay(vp->bmp); - -#if CONFIG_AVFILTER - if (vp->picref) - avfilter_unref_buffer(vp->picref); - vp->picref = NULL; - - vp->width = is->out_video_filter->inputs[0]->w; - vp->height = is->out_video_filter->inputs[0]->h; - vp->pix_fmt = is->out_video_filter->inputs[0]->format; -#else - vp->width = is->video_st->codec->width; - vp->height = is->video_st->codec->height; - vp->pix_fmt = is->video_st->codec->pix_fmt; -#endif - - vp->bmp = SDL_CreateYUVOverlay(vp->width, vp->height, - SDL_YV12_OVERLAY, - screen); - if (!vp->bmp || vp->bmp->pitches[0] < vp->width) { - /* SDL allocates a buffer smaller than requested if the video - * overlay hardware is unable to support the requested size. */ - fprintf(stderr, "Error: the video system does not support an image\n" - "size of %dx%d pixels. Try using -lowres or -vf \"scale=w:h\"\n" - "to reduce the image size.\n", vp->width, vp->height ); - do_exit(); - } - - SDL_LockMutex(is->pictq_mutex); - vp->allocated = 1; - SDL_CondSignal(is->pictq_cond); - SDL_UnlockMutex(is->pictq_mutex); -} - -/** - * - * @param pts the dts of the pkt / pts of the frame and guessed if not known - */ -static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t pos) -{ - VideoPicture *vp; - int dst_pix_fmt; -#if CONFIG_AVFILTER - AVPicture pict_src; -#endif - /* wait until we have space to put a new picture */ - SDL_LockMutex(is->pictq_mutex); - - if(is->pictq_size>=VIDEO_PICTURE_QUEUE_SIZE && !is->refresh) - is->skip_frames= FFMAX(1.0 - FRAME_SKIP_FACTOR, is->skip_frames * (1.0-FRAME_SKIP_FACTOR)); - - while (is->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE && - !is->videoq.abort_request) { - SDL_CondWait(is->pictq_cond, is->pictq_mutex); - } - SDL_UnlockMutex(is->pictq_mutex); - - if (is->videoq.abort_request) - return -1; - - vp = &is->pictq[is->pictq_windex]; - - /* alloc or resize hardware picture buffer */ - if (!vp->bmp || -#if CONFIG_AVFILTER - vp->width != is->out_video_filter->inputs[0]->w || - vp->height != is->out_video_filter->inputs[0]->h) { -#else - vp->width != is->video_st->codec->width || - vp->height != is->video_st->codec->height) { -#endif - SDL_Event event; - - vp->allocated = 0; - - /* the allocation must be done in the main thread to avoid - locking problems */ - event.type = FF_ALLOC_EVENT; - event.user.data1 = is; - SDL_PushEvent(&event); - - /* wait until the picture is allocated */ - SDL_LockMutex(is->pictq_mutex); - while (!vp->allocated && !is->videoq.abort_request) { - SDL_CondWait(is->pictq_cond, is->pictq_mutex); - } - SDL_UnlockMutex(is->pictq_mutex); - - if (is->videoq.abort_request) - return -1; - } - - /* if the frame is not skipped, then display it */ - if (vp->bmp) { - AVPicture pict; -#if CONFIG_AVFILTER - if(vp->picref) - avfilter_unref_buffer(vp->picref); - vp->picref = src_frame->opaque; -#endif - - /* get a pointer on the bitmap */ - SDL_LockYUVOverlay (vp->bmp); - - dst_pix_fmt = PIX_FMT_YUV420P; - memset(&pict,0,sizeof(AVPicture)); - pict.data[0] = vp->bmp->pixels[0]; - pict.data[1] = vp->bmp->pixels[2]; - pict.data[2] = vp->bmp->pixels[1]; - - pict.linesize[0] = vp->bmp->pitches[0]; - pict.linesize[1] = vp->bmp->pitches[2]; - pict.linesize[2] = vp->bmp->pitches[1]; - -#if CONFIG_AVFILTER - pict_src.data[0] = src_frame->data[0]; - pict_src.data[1] = src_frame->data[1]; - pict_src.data[2] = src_frame->data[2]; - - pict_src.linesize[0] = src_frame->linesize[0]; - pict_src.linesize[1] = src_frame->linesize[1]; - pict_src.linesize[2] = src_frame->linesize[2]; - - //FIXME use direct rendering - av_picture_copy(&pict, &pict_src, - vp->pix_fmt, vp->width, vp->height); -#else - sws_flags = av_get_int(sws_opts, "sws_flags", NULL); - is->img_convert_ctx = sws_getCachedContext(is->img_convert_ctx, - vp->width, vp->height, vp->pix_fmt, vp->width, vp->height, - dst_pix_fmt, sws_flags, NULL, NULL, NULL); - if (is->img_convert_ctx == NULL) { - fprintf(stderr, "Cannot initialize the conversion context\n"); - exit(1); - } - sws_scale(is->img_convert_ctx, src_frame->data, src_frame->linesize, - 0, vp->height, pict.data, pict.linesize); -#endif - /* update the bitmap content */ - SDL_UnlockYUVOverlay(vp->bmp); - - vp->pts = pts; - vp->pos = pos; - - /* now we can update the picture count */ - if (++is->pictq_windex == VIDEO_PICTURE_QUEUE_SIZE) - is->pictq_windex = 0; - SDL_LockMutex(is->pictq_mutex); - vp->target_clock= compute_target_time(vp->pts, is); - - is->pictq_size++; - SDL_UnlockMutex(is->pictq_mutex); - } - return 0; -} - -/** - * compute the exact PTS for the picture if it is omitted in the stream - * @param pts1 the dts of the pkt / pts of the frame - */ -static int output_picture2(VideoState *is, AVFrame *src_frame, double pts1, int64_t pos) -{ - double frame_delay, pts; - - pts = pts1; - - if (pts != 0) { - /* update video clock with pts, if present */ - is->video_clock = pts; - } else { - pts = is->video_clock; - } - /* update video clock for next frame */ - frame_delay = av_q2d(is->video_st->codec->time_base); - /* for MPEG2, the frame can be repeated, so we update the - clock accordingly */ - frame_delay += src_frame->repeat_pict * (frame_delay * 0.5); - is->video_clock += frame_delay; - - return queue_picture(is, src_frame, pts, pos); -} - -static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacket *pkt) -{ - int len1, got_picture, i; - - if (packet_queue_get(&is->videoq, pkt, 1) < 0) - return -1; - - if (pkt->data == flush_pkt.data) { - avcodec_flush_buffers(is->video_st->codec); - - SDL_LockMutex(is->pictq_mutex); - //Make sure there are no long delay timers (ideally we should just flush the que but thats harder) - for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) { - is->pictq[i].target_clock= 0; - } - while (is->pictq_size && !is->videoq.abort_request) { - SDL_CondWait(is->pictq_cond, is->pictq_mutex); - } - is->video_current_pos = -1; - SDL_UnlockMutex(is->pictq_mutex); - - init_pts_correction(&is->pts_ctx); - is->frame_last_pts = AV_NOPTS_VALUE; - is->frame_last_delay = 0; - is->frame_timer = (double)av_gettime() / 1000000.0; - is->skip_frames = 1; - is->skip_frames_index = 0; - return 0; - } - - len1 = avcodec_decode_video2(is->video_st->codec, - frame, &got_picture, - pkt); - - if (got_picture) { - if (decoder_reorder_pts == -1) { - *pts = guess_correct_pts(&is->pts_ctx, frame->pkt_pts, frame->pkt_dts); - } else if (decoder_reorder_pts) { - *pts = frame->pkt_pts; - } else { - *pts = frame->pkt_dts; - } - - if (*pts == AV_NOPTS_VALUE) { - *pts = 0; - } - - is->skip_frames_index += 1; - if(is->skip_frames_index >= is->skip_frames){ - is->skip_frames_index -= FFMAX(is->skip_frames, 1.0); - return 1; - } - - } - return 0; -} - -#if CONFIG_AVFILTER -typedef struct { - VideoState *is; - AVFrame *frame; - int use_dr1; -} FilterPriv; - -static int input_get_buffer(AVCodecContext *codec, AVFrame *pic) -{ - AVFilterContext *ctx = codec->opaque; - AVFilterBufferRef *ref; - int perms = AV_PERM_WRITE; - int i, w, h, stride[4]; - unsigned edge; - int pixel_size; - - if (codec->codec->capabilities & CODEC_CAP_NEG_LINESIZES) - perms |= AV_PERM_NEG_LINESIZES; - - if(pic->buffer_hints & FF_BUFFER_HINTS_VALID) { - if(pic->buffer_hints & FF_BUFFER_HINTS_READABLE) perms |= AV_PERM_READ; - if(pic->buffer_hints & FF_BUFFER_HINTS_PRESERVE) perms |= AV_PERM_PRESERVE; - if(pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE) perms |= AV_PERM_REUSE2; - } - if(pic->reference) perms |= AV_PERM_READ | AV_PERM_PRESERVE; - - w = codec->width; - h = codec->height; - avcodec_align_dimensions2(codec, &w, &h, stride); - edge = codec->flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width(); - w += edge << 1; - h += edge << 1; - - if(!(ref = avfilter_get_video_buffer(ctx->outputs[0], perms, w, h))) - return -1; - - pixel_size = av_pix_fmt_descriptors[ref->format].comp[0].step_minus1+1; - ref->video->w = codec->width; - ref->video->h = codec->height; - for(i = 0; i < 4; i ++) { - unsigned hshift = (i == 1 || i == 2) ? av_pix_fmt_descriptors[ref->format].log2_chroma_w : 0; - unsigned vshift = (i == 1 || i == 2) ? av_pix_fmt_descriptors[ref->format].log2_chroma_h : 0; - - if (ref->data[i]) { - ref->data[i] += ((edge * pixel_size) >> hshift) + ((edge * ref->linesize[i]) >> vshift); - } - pic->data[i] = ref->data[i]; - pic->linesize[i] = ref->linesize[i]; - } - pic->opaque = ref; - pic->age = INT_MAX; - pic->type = FF_BUFFER_TYPE_USER; - pic->reordered_opaque = codec->reordered_opaque; - if(codec->pkt) pic->pkt_pts = codec->pkt->pts; - else pic->pkt_pts = AV_NOPTS_VALUE; - return 0; -} - -static void input_release_buffer(AVCodecContext *codec, AVFrame *pic) -{ - memset(pic->data, 0, sizeof(pic->data)); - avfilter_unref_buffer(pic->opaque); -} - -static int input_reget_buffer(AVCodecContext *codec, AVFrame *pic) -{ - AVFilterBufferRef *ref = pic->opaque; - - if (pic->data[0] == NULL) { - pic->buffer_hints |= FF_BUFFER_HINTS_READABLE; - return codec->get_buffer(codec, pic); - } - - if ((codec->width != ref->video->w) || (codec->height != ref->video->h) || - (codec->pix_fmt != ref->format)) { - av_log(codec, AV_LOG_ERROR, "Picture properties changed.\n"); - return -1; - } - - pic->reordered_opaque = codec->reordered_opaque; - if(codec->pkt) pic->pkt_pts = codec->pkt->pts; - else pic->pkt_pts = AV_NOPTS_VALUE; - return 0; -} - -static int input_init(AVFilterContext *ctx, const char *args, void *opaque) -{ - FilterPriv *priv = ctx->priv; - AVCodecContext *codec; - if(!opaque) return -1; - - priv->is = opaque; - codec = priv->is->video_st->codec; - codec->opaque = ctx; - if(codec->codec->capabilities & CODEC_CAP_DR1) { - priv->use_dr1 = 1; - codec->get_buffer = input_get_buffer; - codec->release_buffer = input_release_buffer; - codec->reget_buffer = input_reget_buffer; - codec->thread_safe_callbacks = 1; - } - - priv->frame = avcodec_alloc_frame(); - - return 0; -} - -static void input_uninit(AVFilterContext *ctx) -{ - FilterPriv *priv = ctx->priv; - av_free(priv->frame); -} - -static int input_request_frame(AVFilterLink *link) -{ - FilterPriv *priv = link->src->priv; - AVFilterBufferRef *picref; - int64_t pts = 0; - AVPacket pkt; - int ret; - - while (!(ret = get_video_frame(priv->is, priv->frame, &pts, &pkt))) - av_free_packet(&pkt); - if (ret < 0) - return -1; - - if(priv->use_dr1) { - picref = avfilter_ref_buffer(priv->frame->opaque, ~0); - } else { - picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, link->w, link->h); - av_image_copy(picref->data, picref->linesize, - priv->frame->data, priv->frame->linesize, - picref->format, link->w, link->h); - } - av_free_packet(&pkt); - - picref->pts = pts; - picref->pos = pkt.pos; - picref->video->pixel_aspect = priv->is->video_st->codec->sample_aspect_ratio; - avfilter_start_frame(link, picref); - avfilter_draw_slice(link, 0, link->h, 1); - avfilter_end_frame(link); - - return 0; -} - -static int input_query_formats(AVFilterContext *ctx) -{ - FilterPriv *priv = ctx->priv; - enum PixelFormat pix_fmts[] = { - priv->is->video_st->codec->pix_fmt, PIX_FMT_NONE - }; - - avfilter_set_common_formats(ctx, avfilter_make_format_list(pix_fmts)); - return 0; -} - -static int input_config_props(AVFilterLink *link) -{ - FilterPriv *priv = link->src->priv; - AVCodecContext *c = priv->is->video_st->codec; - - link->w = c->width; - link->h = c->height; - link->time_base = priv->is->video_st->time_base; - - return 0; -} - -static AVFilter input_filter = -{ - .name = "ffplay_input", - - .priv_size = sizeof(FilterPriv), - - .init = input_init, - .uninit = input_uninit, - - .query_formats = input_query_formats, - - .inputs = (AVFilterPad[]) {{ .name = NULL }}, - .outputs = (AVFilterPad[]) {{ .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .request_frame = input_request_frame, - .config_props = input_config_props, }, - { .name = NULL }}, -}; - -static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const char *vfilters) -{ - char sws_flags_str[128]; - int ret; - FFSinkContext ffsink_ctx = { .pix_fmt = PIX_FMT_YUV420P }; - AVFilterContext *filt_src = NULL, *filt_out = NULL; - snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags); - graph->scale_sws_opts = av_strdup(sws_flags_str); - - if ((ret = avfilter_graph_create_filter(&filt_src, &input_filter, "src", - NULL, is, graph)) < 0) - goto the_end; - if ((ret = avfilter_graph_create_filter(&filt_out, &ffsink, "out", - NULL, &ffsink_ctx, graph)) < 0) - goto the_end; - - if(vfilters) { - AVFilterInOut *outputs = av_malloc(sizeof(AVFilterInOut)); - AVFilterInOut *inputs = av_malloc(sizeof(AVFilterInOut)); - - outputs->name = av_strdup("in"); - outputs->filter_ctx = filt_src; - outputs->pad_idx = 0; - outputs->next = NULL; - - inputs->name = av_strdup("out"); - inputs->filter_ctx = filt_out; - inputs->pad_idx = 0; - inputs->next = NULL; - - if ((ret = avfilter_graph_parse(graph, vfilters, inputs, outputs, NULL)) < 0) - goto the_end; - av_freep(&vfilters); - } else { - if ((ret = avfilter_link(filt_src, 0, filt_out, 0)) < 0) - goto the_end; - } - - if ((ret = avfilter_graph_config(graph, NULL)) < 0) - goto the_end; - - is->out_video_filter = filt_out; -the_end: - return ret; -} - -#endif /* CONFIG_AVFILTER */ - -static int video_thread(void *arg) -{ - VideoState *is = arg; - AVFrame *frame= avcodec_alloc_frame(); - int64_t pts_int; - double pts; - int ret; - -#if CONFIG_AVFILTER - AVFilterGraph *graph = avfilter_graph_alloc(); - AVFilterContext *filt_out = NULL; - int64_t pos; - - if ((ret = configure_video_filters(graph, is, vfilters)) < 0) - goto the_end; - filt_out = is->out_video_filter; -#endif - - for(;;) { -#if !CONFIG_AVFILTER - AVPacket pkt; -#else - AVFilterBufferRef *picref; - AVRational tb; -#endif - while (is->paused && !is->videoq.abort_request) - SDL_Delay(10); -#if CONFIG_AVFILTER - ret = get_filtered_video_frame(filt_out, frame, &picref, &tb); - if (picref) { - pts_int = picref->pts; - pos = picref->pos; - frame->opaque = picref; - } - - if (av_cmp_q(tb, is->video_st->time_base)) { - av_unused int64_t pts1 = pts_int; - pts_int = av_rescale_q(pts_int, tb, is->video_st->time_base); - av_dlog(NULL, "video_thread(): " - "tb:%d/%d pts:%"PRId64" -> tb:%d/%d pts:%"PRId64"\n", - tb.num, tb.den, pts1, - is->video_st->time_base.num, is->video_st->time_base.den, pts_int); - } -#else - ret = get_video_frame(is, frame, &pts_int, &pkt); -#endif - - if (ret < 0) goto the_end; - - if (!ret) - continue; - - pts = pts_int*av_q2d(is->video_st->time_base); - -#if CONFIG_AVFILTER - ret = output_picture2(is, frame, pts, pos); -#else - ret = output_picture2(is, frame, pts, pkt.pos); - av_free_packet(&pkt); -#endif - if (ret < 0) - goto the_end; - - if (step) - if (cur_stream) - stream_pause(cur_stream); - } - the_end: -#if CONFIG_AVFILTER - avfilter_graph_free(&graph); -#endif - av_free(frame); - return 0; -} - -static int subtitle_thread(void *arg) -{ - VideoState *is = arg; - SubPicture *sp; - AVPacket pkt1, *pkt = &pkt1; - int len1, got_subtitle; - double pts; - int i, j; - int r, g, b, y, u, v, a; - - for(;;) { - while (is->paused && !is->subtitleq.abort_request) { - SDL_Delay(10); - } - if (packet_queue_get(&is->subtitleq, pkt, 1) < 0) - break; - - if(pkt->data == flush_pkt.data){ - avcodec_flush_buffers(is->subtitle_st->codec); - continue; - } - SDL_LockMutex(is->subpq_mutex); - while (is->subpq_size >= SUBPICTURE_QUEUE_SIZE && - !is->subtitleq.abort_request) { - SDL_CondWait(is->subpq_cond, is->subpq_mutex); - } - SDL_UnlockMutex(is->subpq_mutex); - - if (is->subtitleq.abort_request) - goto the_end; - - sp = &is->subpq[is->subpq_windex]; - - /* NOTE: ipts is the PTS of the _first_ picture beginning in - this packet, if any */ - pts = 0; - if (pkt->pts != AV_NOPTS_VALUE) - pts = av_q2d(is->subtitle_st->time_base)*pkt->pts; - - len1 = avcodec_decode_subtitle2(is->subtitle_st->codec, - &sp->sub, &got_subtitle, - pkt); - if (got_subtitle && sp->sub.format == 0) { - sp->pts = pts; - - for (i = 0; i < sp->sub.num_rects; i++) - { - for (j = 0; j < sp->sub.rects[i]->nb_colors; j++) - { - RGBA_IN(r, g, b, a, (uint32_t*)sp->sub.rects[i]->pict.data[1] + j); - y = RGB_TO_Y_CCIR(r, g, b); - u = RGB_TO_U_CCIR(r, g, b, 0); - v = RGB_TO_V_CCIR(r, g, b, 0); - YUVA_OUT((uint32_t*)sp->sub.rects[i]->pict.data[1] + j, y, u, v, a); - } - } - - /* now we can update the picture count */ - if (++is->subpq_windex == SUBPICTURE_QUEUE_SIZE) - is->subpq_windex = 0; - SDL_LockMutex(is->subpq_mutex); - is->subpq_size++; - SDL_UnlockMutex(is->subpq_mutex); - } - av_free_packet(pkt); - } - the_end: - return 0; -} - -/* copy samples for viewing in editor window */ -static void update_sample_display(VideoState *is, short *samples, int samples_size) -{ - int size, len, channels; - - channels = is->audio_st->codec->channels; - - size = samples_size / sizeof(short); - while (size > 0) { - len = SAMPLE_ARRAY_SIZE - is->sample_array_index; - if (len > size) - len = size; - memcpy(is->sample_array + is->sample_array_index, samples, len * sizeof(short)); - samples += len; - is->sample_array_index += len; - if (is->sample_array_index >= SAMPLE_ARRAY_SIZE) - is->sample_array_index = 0; - size -= len; - } -} - -/* return the new audio buffer size (samples can be added or deleted - to get better sync if video or external master clock) */ -static int synchronize_audio(VideoState *is, short *samples, - int samples_size1, double pts) -{ - int n, samples_size; - double ref_clock; - - n = 2 * is->audio_st->codec->channels; - samples_size = samples_size1; - - /* if not master, then we try to remove or add samples to correct the clock */ - if (((is->av_sync_type == AV_SYNC_VIDEO_MASTER && is->video_st) || - is->av_sync_type == AV_SYNC_EXTERNAL_CLOCK)) { - double diff, avg_diff; - int wanted_size, min_size, max_size, nb_samples; - - ref_clock = get_master_clock(is); - diff = get_audio_clock(is) - ref_clock; - - if (diff < AV_NOSYNC_THRESHOLD) { - is->audio_diff_cum = diff + is->audio_diff_avg_coef * is->audio_diff_cum; - if (is->audio_diff_avg_count < AUDIO_DIFF_AVG_NB) { - /* not enough measures to have a correct estimate */ - is->audio_diff_avg_count++; - } else { - /* estimate the A-V difference */ - avg_diff = is->audio_diff_cum * (1.0 - is->audio_diff_avg_coef); - - if (fabs(avg_diff) >= is->audio_diff_threshold) { - wanted_size = samples_size + ((int)(diff * is->audio_st->codec->sample_rate) * n); - nb_samples = samples_size / n; - - min_size = ((nb_samples * (100 - SAMPLE_CORRECTION_PERCENT_MAX)) / 100) * n; - max_size = ((nb_samples * (100 + SAMPLE_CORRECTION_PERCENT_MAX)) / 100) * n; - if (wanted_size < min_size) - wanted_size = min_size; - else if (wanted_size > max_size) - wanted_size = max_size; - - /* add or remove samples to correction the synchro */ - if (wanted_size < samples_size) { - /* remove samples */ - samples_size = wanted_size; - } else if (wanted_size > samples_size) { - uint8_t *samples_end, *q; - int nb; - - /* add samples */ - nb = (samples_size - wanted_size); - samples_end = (uint8_t *)samples + samples_size - n; - q = samples_end + n; - while (nb > 0) { - memcpy(q, samples_end, n); - q += n; - nb -= n; - } - samples_size = wanted_size; - } - } - av_dlog(NULL, "diff=%f adiff=%f sample_diff=%d apts=%0.3f vpts=%0.3f %f\n", - diff, avg_diff, samples_size - samples_size1, - is->audio_clock, is->video_clock, is->audio_diff_threshold); - } - } else { - /* too big difference : may be initial PTS errors, so - reset A-V filter */ - is->audio_diff_avg_count = 0; - is->audio_diff_cum = 0; - } - } - - return samples_size; -} - -/* decode one audio frame and returns its uncompressed size */ -static int audio_decode_frame(VideoState *is, double *pts_ptr) -{ - AVPacket *pkt_temp = &is->audio_pkt_temp; - AVPacket *pkt = &is->audio_pkt; - AVCodecContext *dec= is->audio_st->codec; - int n, len1, data_size; - double pts; - - for(;;) { - /* NOTE: the audio packet can contain several frames */ - while (pkt_temp->size > 0) { - data_size = sizeof(is->audio_buf1); - len1 = avcodec_decode_audio3(dec, - (int16_t *)is->audio_buf1, &data_size, - pkt_temp); - if (len1 < 0) { - /* if error, we skip the frame */ - pkt_temp->size = 0; - break; - } - - pkt_temp->data += len1; - pkt_temp->size -= len1; - if (data_size <= 0) - continue; - - if (dec->sample_fmt != is->audio_src_fmt) { - if (is->reformat_ctx) - av_audio_convert_free(is->reformat_ctx); - is->reformat_ctx= av_audio_convert_alloc(AV_SAMPLE_FMT_S16, 1, - dec->sample_fmt, 1, NULL, 0); - if (!is->reformat_ctx) { - fprintf(stderr, "Cannot convert %s sample format to %s sample format\n", - av_get_sample_fmt_name(dec->sample_fmt), - av_get_sample_fmt_name(AV_SAMPLE_FMT_S16)); - break; - } - is->audio_src_fmt= dec->sample_fmt; - } - - if (is->reformat_ctx) { - const void *ibuf[6]= {is->audio_buf1}; - void *obuf[6]= {is->audio_buf2}; - int istride[6]= {av_get_bytes_per_sample(dec->sample_fmt)}; - int ostride[6]= {2}; - int len= data_size/istride[0]; - if (av_audio_convert(is->reformat_ctx, obuf, ostride, ibuf, istride, len)<0) { - printf("av_audio_convert() failed\n"); - break; - } - is->audio_buf= is->audio_buf2; - /* FIXME: existing code assume that data_size equals framesize*channels*2 - remove this legacy cruft */ - data_size= len*2; - }else{ - is->audio_buf= is->audio_buf1; - } - - /* if no pts, then compute it */ - pts = is->audio_clock; - *pts_ptr = pts; - n = 2 * dec->channels; - is->audio_clock += (double)data_size / - (double)(n * dec->sample_rate); -#ifdef DEBUG - { - static double last_clock; - printf("audio: delay=%0.3f clock=%0.3f pts=%0.3f\n", - is->audio_clock - last_clock, - is->audio_clock, pts); - last_clock = is->audio_clock; - } -#endif - return data_size; - } - - /* free the current packet */ - if (pkt->data) - av_free_packet(pkt); - - if (is->paused || is->audioq.abort_request) { - return -1; - } - - /* read next packet */ - if (packet_queue_get(&is->audioq, pkt, 1) < 0) - return -1; - if(pkt->data == flush_pkt.data){ - avcodec_flush_buffers(dec); - continue; - } - - pkt_temp->data = pkt->data; - pkt_temp->size = pkt->size; - - /* if update the audio clock with the pts */ - if (pkt->pts != AV_NOPTS_VALUE) { - is->audio_clock = av_q2d(is->audio_st->time_base)*pkt->pts; - } - } -} - -/* prepare a new audio buffer */ -static void sdl_audio_callback(void *opaque, Uint8 *stream, int len) -{ - VideoState *is = opaque; - int audio_size, len1; - double pts; - - audio_callback_time = av_gettime(); - - while (len > 0) { - if (is->audio_buf_index >= is->audio_buf_size) { - audio_size = audio_decode_frame(is, &pts); - if (audio_size < 0) { - /* if error, just output silence */ - is->audio_buf = is->audio_buf1; - is->audio_buf_size = 1024; - memset(is->audio_buf, 0, is->audio_buf_size); - } else { - if (is->show_audio) - update_sample_display(is, (int16_t *)is->audio_buf, audio_size); - audio_size = synchronize_audio(is, (int16_t *)is->audio_buf, audio_size, - pts); - is->audio_buf_size = audio_size; - } - is->audio_buf_index = 0; - } - len1 = is->audio_buf_size - is->audio_buf_index; - if (len1 > len) - len1 = len; - memcpy(stream, (uint8_t *)is->audio_buf + is->audio_buf_index, len1); - len -= len1; - stream += len1; - is->audio_buf_index += len1; - } -} - -/* open a given stream. Return 0 if OK */ -static int stream_component_open(VideoState *is, int stream_index) -{ - AVFormatContext *ic = is->ic; - AVCodecContext *avctx; - AVCodec *codec; - SDL_AudioSpec wanted_spec, spec; - - if (stream_index < 0 || stream_index >= ic->nb_streams) - return -1; - avctx = ic->streams[stream_index]->codec; - - /* prepare audio output */ - if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) { - if (avctx->channels > 0) { - avctx->request_channels = FFMIN(2, avctx->channels); - } else { - avctx->request_channels = 2; - } - } - - codec = avcodec_find_decoder(avctx->codec_id); - avctx->debug_mv = debug_mv; - avctx->debug = debug; - avctx->workaround_bugs = workaround_bugs; - avctx->lowres = lowres; - if(lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE; - avctx->idct_algo= idct; - if(fast) avctx->flags2 |= CODEC_FLAG2_FAST; - avctx->skip_frame= skip_frame; - avctx->skip_idct= skip_idct; - avctx->skip_loop_filter= skip_loop_filter; - avctx->error_recognition= error_recognition; - avctx->error_concealment= error_concealment; - avctx->thread_count= thread_count; - - set_context_opts(avctx, avcodec_opts[avctx->codec_type], 0, codec); - - if (!codec || - avcodec_open(avctx, codec) < 0) - return -1; - - /* prepare audio output */ - if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) { - wanted_spec.freq = avctx->sample_rate; - wanted_spec.format = AUDIO_S16SYS; - wanted_spec.channels = avctx->channels; - wanted_spec.silence = 0; - wanted_spec.samples = SDL_AUDIO_BUFFER_SIZE; - wanted_spec.callback = sdl_audio_callback; - wanted_spec.userdata = is; - if (SDL_OpenAudio(&wanted_spec, &spec) < 0) { - fprintf(stderr, "SDL_OpenAudio: %s\n", SDL_GetError()); - return -1; - } - is->audio_hw_buf_size = spec.size; - is->audio_src_fmt= AV_SAMPLE_FMT_S16; - } - - ic->streams[stream_index]->discard = AVDISCARD_DEFAULT; - switch(avctx->codec_type) { - case AVMEDIA_TYPE_AUDIO: - is->audio_stream = stream_index; - is->audio_st = ic->streams[stream_index]; - is->audio_buf_size = 0; - is->audio_buf_index = 0; - - /* init averaging filter */ - is->audio_diff_avg_coef = exp(log(0.01) / AUDIO_DIFF_AVG_NB); - is->audio_diff_avg_count = 0; - /* since we do not have a precise anough audio fifo fullness, - we correct audio sync only if larger than this threshold */ - is->audio_diff_threshold = 2.0 * SDL_AUDIO_BUFFER_SIZE / avctx->sample_rate; - - memset(&is->audio_pkt, 0, sizeof(is->audio_pkt)); - packet_queue_init(&is->audioq); - SDL_PauseAudio(0); - break; - case AVMEDIA_TYPE_VIDEO: - is->video_stream = stream_index; - is->video_st = ic->streams[stream_index]; - - packet_queue_init(&is->videoq); - is->video_tid = SDL_CreateThread(video_thread, is); - break; - case AVMEDIA_TYPE_SUBTITLE: - is->subtitle_stream = stream_index; - is->subtitle_st = ic->streams[stream_index]; - packet_queue_init(&is->subtitleq); - - is->subtitle_tid = SDL_CreateThread(subtitle_thread, is); - break; - default: - break; - } - return 0; -} - -static void stream_component_close(VideoState *is, int stream_index) -{ - AVFormatContext *ic = is->ic; - AVCodecContext *avctx; - - if (stream_index < 0 || stream_index >= ic->nb_streams) - return; - avctx = ic->streams[stream_index]->codec; - - switch(avctx->codec_type) { - case AVMEDIA_TYPE_AUDIO: - packet_queue_abort(&is->audioq); - - SDL_CloseAudio(); - - packet_queue_end(&is->audioq); - if (is->reformat_ctx) - av_audio_convert_free(is->reformat_ctx); - is->reformat_ctx = NULL; - break; - case AVMEDIA_TYPE_VIDEO: - packet_queue_abort(&is->videoq); - - /* note: we also signal this mutex to make sure we deblock the - video thread in all cases */ - SDL_LockMutex(is->pictq_mutex); - SDL_CondSignal(is->pictq_cond); - SDL_UnlockMutex(is->pictq_mutex); - - SDL_WaitThread(is->video_tid, NULL); - - packet_queue_end(&is->videoq); - break; - case AVMEDIA_TYPE_SUBTITLE: - packet_queue_abort(&is->subtitleq); - - /* note: we also signal this mutex to make sure we deblock the - video thread in all cases */ - SDL_LockMutex(is->subpq_mutex); - is->subtitle_stream_changed = 1; - - SDL_CondSignal(is->subpq_cond); - SDL_UnlockMutex(is->subpq_mutex); - - SDL_WaitThread(is->subtitle_tid, NULL); - - packet_queue_end(&is->subtitleq); - break; - default: - break; - } - - ic->streams[stream_index]->discard = AVDISCARD_ALL; - avcodec_close(avctx); - switch(avctx->codec_type) { - case AVMEDIA_TYPE_AUDIO: - is->audio_st = NULL; - is->audio_stream = -1; - break; - case AVMEDIA_TYPE_VIDEO: - is->video_st = NULL; - is->video_stream = -1; - break; - case AVMEDIA_TYPE_SUBTITLE: - is->subtitle_st = NULL; - is->subtitle_stream = -1; - break; - default: - break; - } -} - -/* since we have only one decoding thread, we can use a global - variable instead of a thread local variable */ -static VideoState *global_video_state; - -static int decode_interrupt_cb(void) -{ - return (global_video_state && global_video_state->abort_request); -} - -/* this thread gets the stream from the disk or the network */ -static int decode_thread(void *arg) -{ - VideoState *is = arg; - AVFormatContext *ic = NULL; - int err, i, ret; - int st_index[AVMEDIA_TYPE_NB]; - AVPacket pkt1, *pkt = &pkt1; - int eof=0; - int pkt_in_play_range = 0; - AVDictionaryEntry *t; - - memset(st_index, -1, sizeof(st_index)); - is->video_stream = -1; - is->audio_stream = -1; - is->subtitle_stream = -1; - - global_video_state = is; - avio_set_interrupt_cb(decode_interrupt_cb); - - err = avformat_open_input(&ic, is->filename, is->iformat, &format_opts); - if (err < 0) { - print_error(is->filename, err); - ret = -1; - goto fail; - } - if ((t = av_dict_get(format_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { - av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key); - ret = AVERROR_OPTION_NOT_FOUND; - goto fail; - } - is->ic = ic; - - if(genpts) - ic->flags |= AVFMT_FLAG_GENPTS; - - /* Set AVCodecContext options so they will be seen by av_find_stream_info() */ - for (i = 0; i < ic->nb_streams; i++) { - AVCodecContext *dec = ic->streams[i]->codec; - switch (dec->codec_type) { - case AVMEDIA_TYPE_AUDIO: - set_context_opts(dec, avcodec_opts[AVMEDIA_TYPE_AUDIO], - AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM, - NULL); - break; - case AVMEDIA_TYPE_VIDEO: - set_context_opts(dec, avcodec_opts[AVMEDIA_TYPE_VIDEO], - AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM, - NULL); - break; - } - } - - err = av_find_stream_info(ic); - if (err < 0) { - fprintf(stderr, "%s: could not find codec parameters\n", is->filename); - ret = -1; - goto fail; - } - if(ic->pb) - ic->pb->eof_reached= 0; //FIXME hack, ffplay maybe should not use url_feof() to test for the end - - if(seek_by_bytes<0) - seek_by_bytes= !!(ic->iformat->flags & AVFMT_TS_DISCONT); - - /* if seeking requested, we execute it */ - if (start_time != AV_NOPTS_VALUE) { - int64_t timestamp; - - timestamp = start_time; - /* add the stream start time */ - if (ic->start_time != AV_NOPTS_VALUE) - timestamp += ic->start_time; - ret = avformat_seek_file(ic, -1, INT64_MIN, timestamp, INT64_MAX, 0); - if (ret < 0) { - fprintf(stderr, "%s: could not seek to position %0.3f\n", - is->filename, (double)timestamp / AV_TIME_BASE); - } - } - - for (i = 0; i < ic->nb_streams; i++) - ic->streams[i]->discard = AVDISCARD_ALL; - if (!video_disable) - st_index[AVMEDIA_TYPE_VIDEO] = - av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, - wanted_stream[AVMEDIA_TYPE_VIDEO], -1, NULL, 0); - if (!audio_disable) - st_index[AVMEDIA_TYPE_AUDIO] = - av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, - wanted_stream[AVMEDIA_TYPE_AUDIO], - st_index[AVMEDIA_TYPE_VIDEO], - NULL, 0); - if (!video_disable) - st_index[AVMEDIA_TYPE_SUBTITLE] = - av_find_best_stream(ic, AVMEDIA_TYPE_SUBTITLE, - wanted_stream[AVMEDIA_TYPE_SUBTITLE], - (st_index[AVMEDIA_TYPE_AUDIO] >= 0 ? - st_index[AVMEDIA_TYPE_AUDIO] : - st_index[AVMEDIA_TYPE_VIDEO]), - NULL, 0); - if (show_status) { - av_dump_format(ic, 0, is->filename, 0); - } - - /* open the streams */ - if (st_index[AVMEDIA_TYPE_AUDIO] >= 0) { - stream_component_open(is, st_index[AVMEDIA_TYPE_AUDIO]); - } - - ret=-1; - if (st_index[AVMEDIA_TYPE_VIDEO] >= 0) { - ret= stream_component_open(is, st_index[AVMEDIA_TYPE_VIDEO]); - } - is->refresh_tid = SDL_CreateThread(refresh_thread, is); - if(ret<0) { - if (!display_disable) - is->show_audio = 2; - } - - if (st_index[AVMEDIA_TYPE_SUBTITLE] >= 0) { - stream_component_open(is, st_index[AVMEDIA_TYPE_SUBTITLE]); - } - - if (is->video_stream < 0 && is->audio_stream < 0) { - fprintf(stderr, "%s: could not open codecs\n", is->filename); - ret = -1; - goto fail; - } - - for(;;) { - if (is->abort_request) - break; - if (is->paused != is->last_paused) { - is->last_paused = is->paused; - if (is->paused) - is->read_pause_return= av_read_pause(ic); - else - av_read_play(ic); - } -#if CONFIG_RTSP_DEMUXER - if (is->paused && !strcmp(ic->iformat->name, "rtsp")) { - /* wait 10 ms to avoid trying to get another packet */ - /* XXX: horrible */ - SDL_Delay(10); - continue; - } -#endif - if (is->seek_req) { - int64_t seek_target= is->seek_pos; - int64_t seek_min= is->seek_rel > 0 ? seek_target - is->seek_rel + 2: INT64_MIN; - int64_t seek_max= is->seek_rel < 0 ? seek_target - is->seek_rel - 2: INT64_MAX; -//FIXME the +-2 is due to rounding being not done in the correct direction in generation -// of the seek_pos/seek_rel variables - - ret = avformat_seek_file(is->ic, -1, seek_min, seek_target, seek_max, is->seek_flags); - if (ret < 0) { - fprintf(stderr, "%s: error while seeking\n", is->ic->filename); - }else{ - if (is->audio_stream >= 0) { - packet_queue_flush(&is->audioq); - packet_queue_put(&is->audioq, &flush_pkt); - } - if (is->subtitle_stream >= 0) { - packet_queue_flush(&is->subtitleq); - packet_queue_put(&is->subtitleq, &flush_pkt); - } - if (is->video_stream >= 0) { - packet_queue_flush(&is->videoq); - packet_queue_put(&is->videoq, &flush_pkt); - } - } - is->seek_req = 0; - eof= 0; - } - - /* if the queue are full, no need to read more */ - if ( is->audioq.size + is->videoq.size + is->subtitleq.size > MAX_QUEUE_SIZE - || ( (is->audioq .size > MIN_AUDIOQ_SIZE || is->audio_stream<0) - && (is->videoq .nb_packets > MIN_FRAMES || is->video_stream<0) - && (is->subtitleq.nb_packets > MIN_FRAMES || is->subtitle_stream<0))) { - /* wait 10 ms */ - SDL_Delay(10); - continue; - } - if(eof) { - if(is->video_stream >= 0){ - av_init_packet(pkt); - pkt->data=NULL; - pkt->size=0; - pkt->stream_index= is->video_stream; - packet_queue_put(&is->videoq, pkt); - } - SDL_Delay(10); - if(is->audioq.size + is->videoq.size + is->subtitleq.size ==0){ - if(loop!=1 && (!loop || --loop)){ - stream_seek(cur_stream, start_time != AV_NOPTS_VALUE ? start_time : 0, 0, 0); - }else if(autoexit){ - ret=AVERROR_EOF; - goto fail; - } - } - continue; - } - ret = av_read_frame(ic, pkt); - if (ret < 0) { - if (ret == AVERROR_EOF || (ic->pb && ic->pb->eof_reached)) - eof=1; - if (ic->pb && ic->pb->error) - break; - SDL_Delay(100); /* wait for user event */ - continue; - } - /* check if packet is in play range specified by user, then queue, otherwise discard */ - pkt_in_play_range = duration == AV_NOPTS_VALUE || - (pkt->pts - ic->streams[pkt->stream_index]->start_time) * - av_q2d(ic->streams[pkt->stream_index]->time_base) - - (double)(start_time != AV_NOPTS_VALUE ? start_time : 0)/1000000 - <= ((double)duration/1000000); - if (pkt->stream_index == is->audio_stream && pkt_in_play_range) { - packet_queue_put(&is->audioq, pkt); - } else if (pkt->stream_index == is->video_stream && pkt_in_play_range) { - packet_queue_put(&is->videoq, pkt); - } else if (pkt->stream_index == is->subtitle_stream && pkt_in_play_range) { - packet_queue_put(&is->subtitleq, pkt); - } else { - av_free_packet(pkt); - } - } - /* wait until the end */ - while (!is->abort_request) { - SDL_Delay(100); - } - - ret = 0; - fail: - /* disable interrupting */ - global_video_state = NULL; - - /* close each stream */ - if (is->audio_stream >= 0) - stream_component_close(is, is->audio_stream); - if (is->video_stream >= 0) - stream_component_close(is, is->video_stream); - if (is->subtitle_stream >= 0) - stream_component_close(is, is->subtitle_stream); - if (is->ic) { - av_close_input_file(is->ic); - is->ic = NULL; /* safety */ - } - avio_set_interrupt_cb(NULL); - - if (ret != 0) { - SDL_Event event; - - event.type = FF_QUIT_EVENT; - event.user.data1 = is; - SDL_PushEvent(&event); - } - return 0; -} - -static VideoState *stream_open(const char *filename, AVInputFormat *iformat) -{ - VideoState *is; - - is = av_mallocz(sizeof(VideoState)); - if (!is) - return NULL; - av_strlcpy(is->filename, filename, sizeof(is->filename)); - is->iformat = iformat; - is->ytop = 0; - is->xleft = 0; - - /* start video display */ - is->pictq_mutex = SDL_CreateMutex(); - is->pictq_cond = SDL_CreateCond(); - - is->subpq_mutex = SDL_CreateMutex(); - is->subpq_cond = SDL_CreateCond(); - - is->av_sync_type = av_sync_type; - is->parse_tid = SDL_CreateThread(decode_thread, is); - if (!is->parse_tid) { - av_free(is); - return NULL; - } - return is; -} - -static void stream_cycle_channel(VideoState *is, int codec_type) -{ - AVFormatContext *ic = is->ic; - int start_index, stream_index; - AVStream *st; - - if (codec_type == AVMEDIA_TYPE_VIDEO) - start_index = is->video_stream; - else if (codec_type == AVMEDIA_TYPE_AUDIO) - start_index = is->audio_stream; - else - start_index = is->subtitle_stream; - if (start_index < (codec_type == AVMEDIA_TYPE_SUBTITLE ? -1 : 0)) - return; - stream_index = start_index; - for(;;) { - if (++stream_index >= is->ic->nb_streams) - { - if (codec_type == AVMEDIA_TYPE_SUBTITLE) - { - stream_index = -1; - goto the_end; - } else - stream_index = 0; - } - if (stream_index == start_index) - return; - st = ic->streams[stream_index]; - if (st->codec->codec_type == codec_type) { - /* check that parameters are OK */ - switch(codec_type) { - case AVMEDIA_TYPE_AUDIO: - if (st->codec->sample_rate != 0 && - st->codec->channels != 0) - goto the_end; - break; - case AVMEDIA_TYPE_VIDEO: - case AVMEDIA_TYPE_SUBTITLE: - goto the_end; - default: - break; - } - } - } - the_end: - stream_component_close(is, start_index); - stream_component_open(is, stream_index); -} - - -static void toggle_full_screen(void) -{ - is_full_screen = !is_full_screen; - video_open(cur_stream); -} - -static void toggle_pause(void) -{ - if (cur_stream) - stream_pause(cur_stream); - step = 0; -} - -static void step_to_next_frame(void) -{ - if (cur_stream) { - /* if the stream is paused unpause it, then step */ - if (cur_stream->paused) - stream_pause(cur_stream); - } - step = 1; -} - -static void toggle_audio_display(void) -{ - if (cur_stream) { - int bgcolor = SDL_MapRGB(screen->format, 0x00, 0x00, 0x00); - cur_stream->show_audio = (cur_stream->show_audio + 1) % 3; - fill_rectangle(screen, - cur_stream->xleft, cur_stream->ytop, cur_stream->width, cur_stream->height, - bgcolor); - SDL_UpdateRect(screen, cur_stream->xleft, cur_stream->ytop, cur_stream->width, cur_stream->height); - } -} - -/* handle an event sent by the GUI */ -static void event_loop(void) -{ - SDL_Event event; - double incr, pos, frac; - - for(;;) { - double x; - SDL_WaitEvent(&event); - switch(event.type) { - case SDL_KEYDOWN: - if (exit_on_keydown) { - do_exit(); - break; - } - switch(event.key.keysym.sym) { - case SDLK_ESCAPE: - case SDLK_q: - do_exit(); - break; - case SDLK_f: - toggle_full_screen(); - break; - case SDLK_p: - case SDLK_SPACE: - toggle_pause(); - break; - case SDLK_s: //S: Step to next frame - step_to_next_frame(); - break; - case SDLK_a: - if (cur_stream) - stream_cycle_channel(cur_stream, AVMEDIA_TYPE_AUDIO); - break; - case SDLK_v: - if (cur_stream) - stream_cycle_channel(cur_stream, AVMEDIA_TYPE_VIDEO); - break; - case SDLK_t: - if (cur_stream) - stream_cycle_channel(cur_stream, AVMEDIA_TYPE_SUBTITLE); - break; - case SDLK_w: - toggle_audio_display(); - break; - case SDLK_LEFT: - incr = -10.0; - goto do_seek; - case SDLK_RIGHT: - incr = 10.0; - goto do_seek; - case SDLK_UP: - incr = 60.0; - goto do_seek; - case SDLK_DOWN: - incr = -60.0; - do_seek: - if (cur_stream) { - if (seek_by_bytes) { - if (cur_stream->video_stream >= 0 && cur_stream->video_current_pos>=0){ - pos= cur_stream->video_current_pos; - }else if(cur_stream->audio_stream >= 0 && cur_stream->audio_pkt.pos>=0){ - pos= cur_stream->audio_pkt.pos; - }else - pos = avio_tell(cur_stream->ic->pb); - if (cur_stream->ic->bit_rate) - incr *= cur_stream->ic->bit_rate / 8.0; - else - incr *= 180000.0; - pos += incr; - stream_seek(cur_stream, pos, incr, 1); - } else { - pos = get_master_clock(cur_stream); - pos += incr; - stream_seek(cur_stream, (int64_t)(pos * AV_TIME_BASE), (int64_t)(incr * AV_TIME_BASE), 0); - } - } - break; - default: - break; - } - break; - case SDL_MOUSEBUTTONDOWN: - if (exit_on_mousedown) { - do_exit(); - break; - } - case SDL_MOUSEMOTION: - if(event.type ==SDL_MOUSEBUTTONDOWN){ - x= event.button.x; - }else{ - if(event.motion.state != SDL_PRESSED) - break; - x= event.motion.x; - } - if (cur_stream) { - if(seek_by_bytes || cur_stream->ic->duration<=0){ - uint64_t size= avio_size(cur_stream->ic->pb); - stream_seek(cur_stream, size*x/cur_stream->width, 0, 1); - }else{ - int64_t ts; - int ns, hh, mm, ss; - int tns, thh, tmm, tss; - tns = cur_stream->ic->duration/1000000LL; - thh = tns/3600; - tmm = (tns%3600)/60; - tss = (tns%60); - frac = x/cur_stream->width; - ns = frac*tns; - hh = ns/3600; - mm = (ns%3600)/60; - ss = (ns%60); - fprintf(stderr, "Seek to %2.0f%% (%2d:%02d:%02d) of total duration (%2d:%02d:%02d) \n", frac*100, - hh, mm, ss, thh, tmm, tss); - ts = frac*cur_stream->ic->duration; - if (cur_stream->ic->start_time != AV_NOPTS_VALUE) - ts += cur_stream->ic->start_time; - stream_seek(cur_stream, ts, 0, 0); - } - } - break; - case SDL_VIDEORESIZE: - if (cur_stream) { - screen = SDL_SetVideoMode(event.resize.w, event.resize.h, 0, - SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL); - screen_width = cur_stream->width = event.resize.w; - screen_height= cur_stream->height= event.resize.h; - } - break; - case SDL_QUIT: - case FF_QUIT_EVENT: - do_exit(); - break; - case FF_ALLOC_EVENT: - video_open(event.user.data1); - alloc_picture(event.user.data1); - break; - case FF_REFRESH_EVENT: - video_refresh_timer(event.user.data1); - cur_stream->refresh=0; - break; - default: - break; - } - } -} - -static int opt_frame_size(const char *opt, const char *arg) -{ - if (av_parse_video_size(&frame_width, &frame_height, arg) < 0) { - fprintf(stderr, "Incorrect frame size\n"); - return AVERROR(EINVAL); - } - if ((frame_width % 2) != 0 || (frame_height % 2) != 0) { - fprintf(stderr, "Frame size must be a multiple of 2\n"); - return AVERROR(EINVAL); - } - return 0; -} - -static int opt_width(const char *opt, const char *arg) -{ - screen_width = parse_number_or_die(opt, arg, OPT_INT64, 1, INT_MAX); - return 0; -} - -static int opt_height(const char *opt, const char *arg) -{ - screen_height = parse_number_or_die(opt, arg, OPT_INT64, 1, INT_MAX); - return 0; -} - -static int opt_format(const char *opt, const char *arg) -{ - file_iformat = av_find_input_format(arg); - if (!file_iformat) { - fprintf(stderr, "Unknown input format: %s\n", arg); - return AVERROR(EINVAL); - } - return 0; -} - -static int opt_frame_pix_fmt(const char *opt, const char *arg) -{ - frame_pix_fmt = av_get_pix_fmt(arg); - return 0; -} - -static int opt_sync(const char *opt, const char *arg) -{ - if (!strcmp(arg, "audio")) - av_sync_type = AV_SYNC_AUDIO_MASTER; - else if (!strcmp(arg, "video")) - av_sync_type = AV_SYNC_VIDEO_MASTER; - else if (!strcmp(arg, "ext")) - av_sync_type = AV_SYNC_EXTERNAL_CLOCK; - else { - fprintf(stderr, "Unknown value for %s: %s\n", opt, arg); - exit(1); - } - return 0; -} - -static int opt_seek(const char *opt, const char *arg) -{ - start_time = parse_time_or_die(opt, arg, 1); - return 0; -} - -static int opt_duration(const char *opt, const char *arg) -{ - duration = parse_time_or_die(opt, arg, 1); - return 0; -} - -static int opt_debug(const char *opt, const char *arg) -{ - av_log_set_level(99); - debug = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX); - return 0; -} - -static int opt_vismv(const char *opt, const char *arg) -{ - debug_mv = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX); - return 0; -} - -static int opt_thread_count(const char *opt, const char *arg) -{ - thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX); -#if !HAVE_THREADS - fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n"); -#endif - return 0; -} - -static const OptionDef options[] = { -#include "cmdutils_common_opts.h" - { "x", HAS_ARG, {(void*)opt_width}, "force displayed width", "width" }, - { "y", HAS_ARG, {(void*)opt_height}, "force displayed height", "height" }, - { "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" }, - { "fs", OPT_BOOL, {(void*)&is_full_screen}, "force full screen" }, - { "an", OPT_BOOL, {(void*)&audio_disable}, "disable audio" }, - { "vn", OPT_BOOL, {(void*)&video_disable}, "disable video" }, - { "ast", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_AUDIO]}, "select desired audio stream", "stream_number" }, - { "vst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_VIDEO]}, "select desired video stream", "stream_number" }, - { "sst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_SUBTITLE]}, "select desired subtitle stream", "stream_number" }, - { "ss", HAS_ARG, {(void*)&opt_seek}, "seek to a given position in seconds", "pos" }, - { "t", HAS_ARG, {(void*)&opt_duration}, "play \"duration\" seconds of audio/video", "duration" }, - { "bytes", OPT_INT | HAS_ARG, {(void*)&seek_by_bytes}, "seek by bytes 0=off 1=on -1=auto", "val" }, - { "nodisp", OPT_BOOL, {(void*)&display_disable}, "disable graphical display" }, - { "f", HAS_ARG, {(void*)opt_format}, "force format", "fmt" }, - { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_frame_pix_fmt}, "set pixel format", "format" }, - { "stats", OPT_BOOL | OPT_EXPERT, {(void*)&show_status}, "show status", "" }, - { "debug", HAS_ARG | OPT_EXPERT, {(void*)opt_debug}, "print specific debug info", "" }, - { "bug", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&workaround_bugs}, "workaround bugs", "" }, - { "vismv", HAS_ARG | OPT_EXPERT, {(void*)opt_vismv}, "visualize motion vectors", "" }, - { "fast", OPT_BOOL | OPT_EXPERT, {(void*)&fast}, "non spec compliant optimizations", "" }, - { "genpts", OPT_BOOL | OPT_EXPERT, {(void*)&genpts}, "generate pts", "" }, - { "drp", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&decoder_reorder_pts}, "let decoder reorder pts 0=off 1=on -1=auto", ""}, - { "lowres", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&lowres}, "", "" }, - { "skiploop", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&skip_loop_filter}, "", "" }, - { "skipframe", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&skip_frame}, "", "" }, - { "skipidct", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&skip_idct}, "", "" }, - { "idct", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&idct}, "set idct algo", "algo" }, - { "er", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&error_recognition}, "set error detection threshold (0-4)", "threshold" }, - { "ec", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&error_concealment}, "set error concealment options", "bit_mask" }, - { "sync", HAS_ARG | OPT_EXPERT, {(void*)opt_sync}, "set audio-video sync. type (type=audio/video/ext)", "type" }, - { "threads", HAS_ARG | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" }, - { "autoexit", OPT_BOOL | OPT_EXPERT, {(void*)&autoexit}, "exit at the end", "" }, - { "exitonkeydown", OPT_BOOL | OPT_EXPERT, {(void*)&exit_on_keydown}, "exit on key down", "" }, - { "exitonmousedown", OPT_BOOL | OPT_EXPERT, {(void*)&exit_on_mousedown}, "exit on mouse down", "" }, - { "loop", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&loop}, "set number of times the playback shall be looped", "loop count" }, - { "framedrop", OPT_BOOL | OPT_EXPERT, {(void*)&framedrop}, "drop frames when cpu is too slow", "" }, - { "window_title", OPT_STRING | HAS_ARG, {(void*)&window_title}, "set window title", "window title" }, -#if CONFIG_AVFILTER - { "vf", OPT_STRING | HAS_ARG, {(void*)&vfilters}, "video filters", "filter list" }, -#endif - { "rdftspeed", OPT_INT | HAS_ARG| OPT_AUDIO | OPT_EXPERT, {(void*)&rdftspeed}, "rdft speed", "msecs" }, - { "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" }, - { "i", 0, {NULL}, "ffmpeg compatibility dummy option", ""}, - { NULL, }, -}; - -static void show_usage(void) -{ - printf("Simple media player\n"); - printf("usage: ffplay [options] input_file\n"); - printf("\n"); -} - -static void show_help(void) -{ - av_log_set_callback(log_callback_help); - show_usage(); - show_help_options(options, "Main options:\n", - OPT_EXPERT, 0); - show_help_options(options, "\nAdvanced options:\n", - OPT_EXPERT, OPT_EXPERT); - printf("\n"); - av_opt_show2(avcodec_opts[0], NULL, - AV_OPT_FLAG_DECODING_PARAM, 0); - printf("\n"); - av_opt_show2(avformat_opts, NULL, - AV_OPT_FLAG_DECODING_PARAM, 0); -#if !CONFIG_AVFILTER - printf("\n"); - av_opt_show2(sws_opts, NULL, - AV_OPT_FLAG_ENCODING_PARAM, 0); -#endif - printf("\nWhile playing:\n" - "q, ESC quit\n" - "f toggle full screen\n" - "p, SPC pause\n" - "a cycle audio channel\n" - "v cycle video channel\n" - "t cycle subtitle channel\n" - "w show audio waves\n" - "s activate frame-step mode\n" - "left/right seek backward/forward 10 seconds\n" - "down/up seek backward/forward 1 minute\n" - "mouse click seek to percentage in file corresponding to fraction of width\n" - ); -} - -static void opt_input_file(const char *filename) -{ - if (input_filename) { - fprintf(stderr, "Argument '%s' provided as input filename, but '%s' was already specified.\n", - filename, input_filename); - exit(1); - } - if (!strcmp(filename, "-")) - filename = "pipe:"; - input_filename = filename; -} - -/* Called from the main */ -int main(int argc, char **argv) -{ - int flags; - - av_log_set_flags(AV_LOG_SKIP_REPEATED); - - /* register all codecs, demux and protocols */ - avcodec_register_all(); -#if CONFIG_AVDEVICE - avdevice_register_all(); -#endif -#if CONFIG_AVFILTER - avfilter_register_all(); -#endif - av_register_all(); - - init_opts(); - - show_banner(); - - parse_options(argc, argv, options, opt_input_file); - - if (!input_filename) { - show_usage(); - fprintf(stderr, "An input file must be specified\n"); - fprintf(stderr, "Use -h to get full help or, even better, run 'man ffplay'\n"); - exit(1); - } - - if (display_disable) { - video_disable = 1; - } - flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER; -#if !defined(__MINGW32__) && !defined(__APPLE__) - flags |= SDL_INIT_EVENTTHREAD; /* Not supported on Windows or Mac OS X */ -#endif - if (SDL_Init (flags)) { - fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError()); - exit(1); - } - - if (!display_disable) { -#if HAVE_SDL_VIDEO_SIZE - const SDL_VideoInfo *vi = SDL_GetVideoInfo(); - fs_screen_width = vi->current_w; - fs_screen_height = vi->current_h; -#endif - } - - SDL_EventState(SDL_ACTIVEEVENT, SDL_IGNORE); - SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE); - SDL_EventState(SDL_USEREVENT, SDL_IGNORE); - - av_init_packet(&flush_pkt); - flush_pkt.data= "FLUSH"; - - cur_stream = stream_open(input_filename, file_iformat); - - event_loop(); - - /* never returns */ - - return 0; -} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-baseline.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-baseline.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-baseline.ffpreset 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-baseline.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -coder=0 -bf=0 -flags2=-wpred-dct8x8 -wpredp=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-faster.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-faster.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-faster.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-faster.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partb8x8 -me_method=hex -subq=4 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=2 -directpred=1 -trellis=1 -flags2=+bpyramid-mixed_refs+wpred+dct8x8+fastpskip -wpredp=1 -rc_lookahead=20 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-faster_firstpass.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-faster_firstpass.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-faster_firstpass.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-faster_firstpass.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=-parti8x8-parti4x4-partp8x8-partb8x8 -me_method=dia -subq=2 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=1 -directpred=1 -trellis=0 -flags2=+bpyramid-mixed_refs+wpred-dct8x8+fastpskip -wpredp=1 -rc_lookahead=20 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-fast.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-fast.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-fast.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-fast.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partb8x8 -me_method=hex -subq=6 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=2 -directpred=1 -trellis=1 -flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip -wpredp=2 -rc_lookahead=30 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-fast_firstpass.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-fast_firstpass.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-fast_firstpass.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-fast_firstpass.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=-parti8x8-parti4x4-partp8x8-partb8x8 -me_method=dia -subq=2 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=1 -directpred=1 -trellis=0 -flags2=+bpyramid-mixed_refs+wpred-dct8x8+fastpskip -wpredp=2 -rc_lookahead=30 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-ipod320.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-ipod320.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-ipod320.ffpreset 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-ipod320.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -coder=0 -bf=0 -flags2=-wpred-dct8x8 -level=13 -maxrate=768000 -bufsize=3000000 -wpredp=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-ipod640.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-ipod640.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-ipod640.ffpreset 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-ipod640.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -coder=0 -bf=0 -refs=1 -flags2=-wpred-dct8x8 -level=30 -maxrate=10000000 -bufsize=10000000 -wpredp=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_fast.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_fast.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_fast.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_fast.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -coder=0 -flags=+loop+cgop -cmp=+chroma -partitions=-parti8x8+parti4x4+partp8x8-partp4x4-partb8x8 -me_method=hex -subq=3 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -directpred=1 -flags2=+fastpskip -cqp=0 -wpredp=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_max.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_max.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_max.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_max.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8 -me_method=esa -subq=8 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -refs=16 -directpred=1 -flags2=+mixed_refs+dct8x8+fastpskip -cqp=0 -wpredp=2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_medium.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_medium.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_medium.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_medium.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=-parti8x8+parti4x4+partp8x8+partp4x4-partb8x8 -me_method=hex -subq=5 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -directpred=1 -flags2=+fastpskip -cqp=0 -wpredp=2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_slower.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_slower.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_slower.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_slower.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8 -me_method=umh -subq=8 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -refs=4 -directpred=1 -flags2=+mixed_refs+dct8x8+fastpskip -cqp=0 -wpredp=2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_slow.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_slow.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_slow.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_slow.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8 -me_method=umh -subq=6 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -refs=2 -directpred=1 -flags2=+dct8x8+fastpskip -cqp=0 -wpredp=2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_ultrafast.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_ultrafast.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-lossless_ultrafast.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-lossless_ultrafast.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -coder=0 -flags=+loop+cgop -cmp=+chroma -partitions=-parti8x8-parti4x4-partp8x8-partp4x4-partb8x8 -me_method=dia -subq=0 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -directpred=1 -flags2=+fastpskip -cqp=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-main.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-main.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-main.ffpreset 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-main.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -flags2=-dct8x8 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-medium.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-medium.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-medium.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-medium.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partb8x8 -me_method=hex -subq=7 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=3 -directpred=1 -trellis=1 -flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip -wpredp=2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-medium_firstpass.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-medium_firstpass.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-medium_firstpass.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-medium_firstpass.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=-parti8x8-parti4x4-partp8x8-partb8x8 -me_method=dia -subq=2 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=1 -directpred=1 -trellis=0 -flags2=+bpyramid-mixed_refs+wpred-dct8x8+fastpskip -wpredp=2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-placebo.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-placebo.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-placebo.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-placebo.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8 -me_method=tesa -subq=10 -me_range=24 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=2 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=16 -refs=16 -directpred=3 -trellis=2 -flags2=+bpyramid+mixed_refs+wpred+dct8x8-fastpskip -wpredp=2 -rc_lookahead=60 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-placebo_firstpass.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-placebo_firstpass.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-placebo_firstpass.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-placebo_firstpass.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8 -me_method=tesa -subq=10 -me_range=24 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=2 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=16 -refs=16 -directpred=3 -trellis=2 -flags2=+bpyramid+mixed_refs+wpred+dct8x8-fastpskip -wpredp=2 -rc_lookahead=60 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-slower.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-slower.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-slower.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-slower.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8 -me_method=umh -subq=9 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=2 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=8 -directpred=3 -trellis=2 -flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip -wpredp=2 -rc_lookahead=60 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-slower_firstpass.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-slower_firstpass.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-slower_firstpass.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-slower_firstpass.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=-parti8x8-parti4x4-partp8x8-partb8x8 -me_method=dia -subq=2 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=2 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=1 -directpred=3 -trellis=0 -flags2=+bpyramid-mixed_refs+wpred-dct8x8+fastpskip -wpredp=2 -rc_lookahead=60 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-slow.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-slow.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-slow.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-slow.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partb8x8 -me_method=umh -subq=8 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=2 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=5 -directpred=3 -trellis=1 -flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip -wpredp=2 -rc_lookahead=50 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-slow_firstpass.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-slow_firstpass.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-slow_firstpass.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-slow_firstpass.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=-parti8x8-parti4x4-partp8x8-partb8x8 -me_method=dia -subq=2 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=2 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=1 -directpred=3 -trellis=0 -flags2=+bpyramid-mixed_refs+wpred-dct8x8+fastpskip -wpredp=2 -rc_lookahead=50 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-superfast.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-superfast.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-superfast.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-superfast.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4-partp8x8-partb8x8 -me_method=dia -subq=1 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=1 -directpred=1 -trellis=0 -flags2=+bpyramid-mixed_refs+wpred+dct8x8+fastpskip-mbtree -wpredp=0 -rc_lookahead=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-superfast_firstpass.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-superfast_firstpass.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-superfast_firstpass.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-superfast_firstpass.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=-parti8x8-parti4x4-partp8x8-partb8x8 -me_method=dia -subq=1 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=1 -directpred=1 -trellis=0 -flags2=+bpyramid-mixed_refs+wpred-dct8x8+fastpskip-mbtree -wpredp=0 -rc_lookahead=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-ultrafast.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-ultrafast.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-ultrafast.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-ultrafast.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -coder=0 -flags=-loop+cgop -cmp=+chroma -partitions=-parti8x8-parti4x4-partp8x8-partb8x8 -me_method=dia -subq=0 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=0 -i_qfactor=0.71 -b_strategy=0 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=0 -refs=1 -directpred=1 -trellis=0 -flags2=-bpyramid-mixed_refs-wpred-dct8x8+fastpskip-mbtree -wpredp=0 -aq_mode=0 -rc_lookahead=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-ultrafast_firstpass.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-ultrafast_firstpass.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-ultrafast_firstpass.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-ultrafast_firstpass.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -coder=0 -flags=-loop+cgop -cmp=+chroma -partitions=-parti8x8-parti4x4-partp8x8-partb8x8 -me_method=dia -subq=0 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=0 -i_qfactor=0.71 -b_strategy=0 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=0 -refs=1 -directpred=1 -trellis=0 -flags2=-bpyramid-mixed_refs-wpred-dct8x8+fastpskip-mbtree -wpredp=0 -aq_mode=0 -rc_lookahead=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-veryfast.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-veryfast.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-veryfast.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-veryfast.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partb8x8 -me_method=hex -subq=2 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=1 -directpred=1 -trellis=0 -flags2=+bpyramid-mixed_refs+wpred+dct8x8+fastpskip -wpredp=0 -rc_lookahead=10 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-veryfast_firstpass.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-veryfast_firstpass.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-veryfast_firstpass.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-veryfast_firstpass.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=-parti8x8-parti4x4-partp8x8-partb8x8 -me_method=dia -subq=2 -me_range=16 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=1 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=3 -refs=1 -directpred=1 -trellis=0 -flags2=+bpyramid-mixed_refs+wpred-dct8x8+fastpskip -wpredp=0 -rc_lookahead=10 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-veryslow.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-veryslow.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-veryslow.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-veryslow.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8 -me_method=umh -subq=10 -me_range=24 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=2 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=8 -refs=16 -directpred=3 -trellis=2 -flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip -wpredp=2 -rc_lookahead=60 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-veryslow_firstpass.ffpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-veryslow_firstpass.ffpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffpresets/libx264-veryslow_firstpass.ffpreset 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffpresets/libx264-veryslow_firstpass.ffpreset 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -coder=1 -flags=+loop+cgop -cmp=+chroma -partitions=-parti8x8-parti4x4-partp8x8-partb8x8 -me_method=dia -subq=2 -me_range=24 -g=250 -keyint_min=25 -sc_threshold=40 -i_qfactor=0.71 -b_strategy=2 -qcomp=0.6 -qmin=0 -qmax=69 -qdiff=4 -bf=8 -refs=1 -directpred=3 -trellis=0 -flags2=+bpyramid-mixed_refs+wpred-dct8x8+fastpskip -wpredp=2 -rc_lookahead=60 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffprobe.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffprobe.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffprobe.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffprobe.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,417 +0,0 @@ -/* - * ffprobe : Simple Media Prober based on the Libav libraries - * Copyright (c) 2007-2010 Stefano Sabatini - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" - -#include "libavformat/avformat.h" -#include "libavcodec/avcodec.h" -#include "libavutil/opt.h" -#include "libavutil/pixdesc.h" -#include "libavutil/dict.h" -#include "libavdevice/avdevice.h" -#include "cmdutils.h" - -const char program_name[] = "ffprobe"; -const int program_birth_year = 2007; - -static int do_show_format = 0; -static int do_show_packets = 0; -static int do_show_streams = 0; - -static int show_value_unit = 0; -static int use_value_prefix = 0; -static int use_byte_value_binary_prefix = 0; -static int use_value_sexagesimal_format = 0; - -/* globals */ -static const OptionDef options[]; - -/* FFprobe context */ -static const char *input_filename; -static AVInputFormat *iformat = NULL; - -static const char *binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" }; -static const char *decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P" }; - -static const char *unit_second_str = "s" ; -static const char *unit_hertz_str = "Hz" ; -static const char *unit_byte_str = "byte" ; -static const char *unit_bit_per_second_str = "bit/s"; - -static char *value_string(char *buf, int buf_size, double val, const char *unit) -{ - if (unit == unit_second_str && use_value_sexagesimal_format) { - double secs; - int hours, mins; - secs = val; - mins = (int)secs / 60; - secs = secs - mins * 60; - hours = mins / 60; - mins %= 60; - snprintf(buf, buf_size, "%d:%02d:%09.6f", hours, mins, secs); - } else if (use_value_prefix) { - const char *prefix_string; - int index; - - if (unit == unit_byte_str && use_byte_value_binary_prefix) { - index = (int) (log(val)/log(2)) / 10; - index = av_clip(index, 0, FF_ARRAY_ELEMS(binary_unit_prefixes) -1); - val /= pow(2, index*10); - prefix_string = binary_unit_prefixes[index]; - } else { - index = (int) (log10(val)) / 3; - index = av_clip(index, 0, FF_ARRAY_ELEMS(decimal_unit_prefixes) -1); - val /= pow(10, index*3); - prefix_string = decimal_unit_prefixes[index]; - } - - snprintf(buf, buf_size, "%.3f %s%s", val, prefix_string, show_value_unit ? unit : ""); - } else { - snprintf(buf, buf_size, "%f %s", val, show_value_unit ? unit : ""); - } - - return buf; -} - -static char *time_value_string(char *buf, int buf_size, int64_t val, const AVRational *time_base) -{ - if (val == AV_NOPTS_VALUE) { - snprintf(buf, buf_size, "N/A"); - } else { - value_string(buf, buf_size, val * av_q2d(*time_base), unit_second_str); - } - - return buf; -} - -static char *ts_value_string (char *buf, int buf_size, int64_t ts) -{ - if (ts == AV_NOPTS_VALUE) { - snprintf(buf, buf_size, "N/A"); - } else { - snprintf(buf, buf_size, "%"PRId64, ts); - } - - return buf; -} - -static const char *media_type_string(enum AVMediaType media_type) -{ - switch (media_type) { - case AVMEDIA_TYPE_VIDEO: return "video"; - case AVMEDIA_TYPE_AUDIO: return "audio"; - case AVMEDIA_TYPE_DATA: return "data"; - case AVMEDIA_TYPE_SUBTITLE: return "subtitle"; - case AVMEDIA_TYPE_ATTACHMENT: return "attachment"; - default: return "unknown"; - } -} - -static void show_packet(AVFormatContext *fmt_ctx, AVPacket *pkt) -{ - char val_str[128]; - AVStream *st = fmt_ctx->streams[pkt->stream_index]; - - printf("[PACKET]\n"); - printf("codec_type=%s\n" , media_type_string(st->codec->codec_type)); - printf("stream_index=%d\n" , pkt->stream_index); - printf("pts=%s\n" , ts_value_string (val_str, sizeof(val_str), pkt->pts)); - printf("pts_time=%s\n" , time_value_string(val_str, sizeof(val_str), pkt->pts, &st->time_base)); - printf("dts=%s\n" , ts_value_string (val_str, sizeof(val_str), pkt->dts)); - printf("dts_time=%s\n" , time_value_string(val_str, sizeof(val_str), pkt->dts, &st->time_base)); - printf("duration=%s\n" , ts_value_string (val_str, sizeof(val_str), pkt->duration)); - printf("duration_time=%s\n", time_value_string(val_str, sizeof(val_str), pkt->duration, &st->time_base)); - printf("size=%s\n" , value_string (val_str, sizeof(val_str), pkt->size, unit_byte_str)); - printf("pos=%"PRId64"\n" , pkt->pos); - printf("flags=%c\n" , pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_'); - printf("[/PACKET]\n"); -} - -static void show_packets(AVFormatContext *fmt_ctx) -{ - AVPacket pkt; - - av_init_packet(&pkt); - - while (!av_read_frame(fmt_ctx, &pkt)) - show_packet(fmt_ctx, &pkt); -} - -static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) -{ - AVStream *stream = fmt_ctx->streams[stream_idx]; - AVCodecContext *dec_ctx; - AVCodec *dec; - char val_str[128]; - AVDictionaryEntry *tag = NULL; - AVRational display_aspect_ratio; - - printf("[STREAM]\n"); - - printf("index=%d\n", stream->index); - - if ((dec_ctx = stream->codec)) { - if ((dec = dec_ctx->codec)) { - printf("codec_name=%s\n", dec->name); - printf("codec_long_name=%s\n", dec->long_name); - } else { - printf("codec_name=unknown\n"); - } - - printf("codec_type=%s\n", media_type_string(dec_ctx->codec_type)); - printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den); - - /* print AVI/FourCC tag */ - av_get_codec_tag_string(val_str, sizeof(val_str), dec_ctx->codec_tag); - printf("codec_tag_string=%s\n", val_str); - printf("codec_tag=0x%04x\n", dec_ctx->codec_tag); - - switch (dec_ctx->codec_type) { - case AVMEDIA_TYPE_VIDEO: - printf("width=%d\n", dec_ctx->width); - printf("height=%d\n", dec_ctx->height); - printf("has_b_frames=%d\n", dec_ctx->has_b_frames); - if (dec_ctx->sample_aspect_ratio.num) { - printf("sample_aspect_ratio=%d:%d\n", dec_ctx->sample_aspect_ratio.num, - dec_ctx->sample_aspect_ratio.den); - av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, - dec_ctx->width * dec_ctx->sample_aspect_ratio.num, - dec_ctx->height * dec_ctx->sample_aspect_ratio.den, - 1024*1024); - printf("display_aspect_ratio=%d:%d\n", display_aspect_ratio.num, - display_aspect_ratio.den); - } - printf("pix_fmt=%s\n", dec_ctx->pix_fmt != PIX_FMT_NONE ? - av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown"); - break; - - case AVMEDIA_TYPE_AUDIO: - printf("sample_rate=%s\n", value_string(val_str, sizeof(val_str), - dec_ctx->sample_rate, - unit_hertz_str)); - printf("channels=%d\n", dec_ctx->channels); - printf("bits_per_sample=%d\n", av_get_bits_per_sample(dec_ctx->codec_id)); - break; - } - } else { - printf("codec_type=unknown\n"); - } - - if (fmt_ctx->iformat->flags & AVFMT_SHOW_IDS) - printf("id=0x%x\n", stream->id); - printf("r_frame_rate=%d/%d\n", stream->r_frame_rate.num, stream->r_frame_rate.den); - printf("avg_frame_rate=%d/%d\n", stream->avg_frame_rate.num, stream->avg_frame_rate.den); - printf("time_base=%d/%d\n", stream->time_base.num, stream->time_base.den); - printf("start_time=%s\n", time_value_string(val_str, sizeof(val_str), stream->start_time, - &stream->time_base)); - printf("duration=%s\n", time_value_string(val_str, sizeof(val_str), stream->duration, - &stream->time_base)); - if (stream->nb_frames) - printf("nb_frames=%"PRId64"\n", stream->nb_frames); - - while ((tag = av_dict_get(stream->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) - printf("TAG:%s=%s\n", tag->key, tag->value); - - printf("[/STREAM]\n"); -} - -static void show_format(AVFormatContext *fmt_ctx) -{ - AVDictionaryEntry *tag = NULL; - char val_str[128]; - - printf("[FORMAT]\n"); - - printf("filename=%s\n", fmt_ctx->filename); - printf("nb_streams=%d\n", fmt_ctx->nb_streams); - printf("format_name=%s\n", fmt_ctx->iformat->name); - printf("format_long_name=%s\n", fmt_ctx->iformat->long_name); - printf("start_time=%s\n", time_value_string(val_str, sizeof(val_str), fmt_ctx->start_time, - &AV_TIME_BASE_Q)); - printf("duration=%s\n", time_value_string(val_str, sizeof(val_str), fmt_ctx->duration, - &AV_TIME_BASE_Q)); - printf("size=%s\n", value_string(val_str, sizeof(val_str), fmt_ctx->file_size, - unit_byte_str)); - printf("bit_rate=%s\n", value_string(val_str, sizeof(val_str), fmt_ctx->bit_rate, - unit_bit_per_second_str)); - - while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) - printf("TAG:%s=%s\n", tag->key, tag->value); - - printf("[/FORMAT]\n"); -} - -static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename) -{ - int err, i; - AVFormatContext *fmt_ctx = NULL; - AVDictionaryEntry *t; - - if ((err = avformat_open_input(&fmt_ctx, filename, iformat, &format_opts)) < 0) { - print_error(filename, err); - return err; - } - if ((t = av_dict_get(format_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { - av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key); - return AVERROR_OPTION_NOT_FOUND; - } - - - /* fill the streams in the format context */ - if ((err = av_find_stream_info(fmt_ctx)) < 0) { - print_error(filename, err); - return err; - } - - av_dump_format(fmt_ctx, 0, filename, 0); - - /* bind a decoder to each input stream */ - for (i = 0; i < fmt_ctx->nb_streams; i++) { - AVStream *stream = fmt_ctx->streams[i]; - AVCodec *codec; - - if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) { - fprintf(stderr, "Unsupported codec with id %d for input stream %d\n", - stream->codec->codec_id, stream->index); - } else if (avcodec_open(stream->codec, codec) < 0) { - fprintf(stderr, "Error while opening codec for input stream %d\n", - stream->index); - } - } - - *fmt_ctx_ptr = fmt_ctx; - return 0; -} - -static int probe_file(const char *filename) -{ - AVFormatContext *fmt_ctx; - int ret, i; - - if ((ret = open_input_file(&fmt_ctx, filename))) - return ret; - - if (do_show_packets) - show_packets(fmt_ctx); - - if (do_show_streams) - for (i = 0; i < fmt_ctx->nb_streams; i++) - show_stream(fmt_ctx, i); - - if (do_show_format) - show_format(fmt_ctx); - - av_close_input_file(fmt_ctx); - return 0; -} - -static void show_usage(void) -{ - printf("Simple multimedia streams analyzer\n"); - printf("usage: ffprobe [OPTIONS] [INPUT_FILE]\n"); - printf("\n"); -} - -static int opt_format(const char *opt, const char *arg) -{ - iformat = av_find_input_format(arg); - if (!iformat) { - fprintf(stderr, "Unknown input format: %s\n", arg); - return AVERROR(EINVAL); - } - return 0; -} - -static void opt_input_file(const char *arg) -{ - if (input_filename) { - fprintf(stderr, "Argument '%s' provided as input filename, but '%s' was already specified.\n", - arg, input_filename); - exit(1); - } - if (!strcmp(arg, "-")) - arg = "pipe:"; - input_filename = arg; -} - -static void show_help(void) -{ - av_log_set_callback(log_callback_help); - show_usage(); - show_help_options(options, "Main options:\n", 0, 0); - printf("\n"); - av_opt_show2(avformat_opts, NULL, - AV_OPT_FLAG_DECODING_PARAM, 0); -} - -static void opt_pretty(void) -{ - show_value_unit = 1; - use_value_prefix = 1; - use_byte_value_binary_prefix = 1; - use_value_sexagesimal_format = 1; -} - -static const OptionDef options[] = { -#include "cmdutils_common_opts.h" - { "f", HAS_ARG, {(void*)opt_format}, "force format", "format" }, - { "unit", OPT_BOOL, {(void*)&show_value_unit}, "show unit of the displayed values" }, - { "prefix", OPT_BOOL, {(void*)&use_value_prefix}, "use SI prefixes for the displayed values" }, - { "byte_binary_prefix", OPT_BOOL, {(void*)&use_byte_value_binary_prefix}, - "use binary prefixes for byte units" }, - { "sexagesimal", OPT_BOOL, {(void*)&use_value_sexagesimal_format}, - "use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units" }, - { "pretty", 0, {(void*)&opt_pretty}, - "prettify the format of displayed values, make it more human readable" }, - { "show_format", OPT_BOOL, {(void*)&do_show_format} , "show format/container info" }, - { "show_packets", OPT_BOOL, {(void*)&do_show_packets}, "show packets info" }, - { "show_streams", OPT_BOOL, {(void*)&do_show_streams}, "show streams info" }, - { "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" }, - { NULL, }, -}; - -int main(int argc, char **argv) -{ - int ret; - - av_register_all(); -#if CONFIG_AVDEVICE - avdevice_register_all(); -#endif - - avformat_opts = avformat_alloc_context(); - - show_banner(); - parse_options(argc, argv, options, opt_input_file); - - if (!input_filename) { - show_usage(); - fprintf(stderr, "You have to specify one input file.\n"); - fprintf(stderr, "Use -h to get full help or, even better, run 'man ffprobe'.\n"); - exit(1); - } - - ret = probe_file(input_filename); - - av_free(avformat_opts); - - return ret; -} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffserver.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffserver.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffserver.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffserver.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,4753 +0,0 @@ -/* - * Multiple format streaming server - * Copyright (c) 2000, 2001, 2002 Fabrice Bellard - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" -#if !HAVE_CLOSESOCKET -#define closesocket close -#endif -#include -#include -#include -#include "libavformat/avformat.h" -#include "libavformat/ffm.h" -#include "libavformat/network.h" -#include "libavformat/os_support.h" -#include "libavformat/rtpdec.h" -#include "libavformat/rtsp.h" -// XXX for ffio_open_dyn_packet_buffer, to be removed -#include "libavformat/avio_internal.h" -#include "libavutil/avstring.h" -#include "libavutil/lfg.h" -#include "libavutil/dict.h" -#include "libavutil/random_seed.h" -#include "libavutil/parseutils.h" -#include "libavutil/opt.h" -#include -#include -#include -#include -#if HAVE_POLL_H -#include -#endif -#include -#include -#include -#include -#include -#if HAVE_DLFCN_H -#include -#endif - -#include "cmdutils.h" - -const char program_name[] = "ffserver"; -const int program_birth_year = 2000; - -static const OptionDef options[]; - -enum HTTPState { - HTTPSTATE_WAIT_REQUEST, - HTTPSTATE_SEND_HEADER, - HTTPSTATE_SEND_DATA_HEADER, - HTTPSTATE_SEND_DATA, /* sending TCP or UDP data */ - HTTPSTATE_SEND_DATA_TRAILER, - HTTPSTATE_RECEIVE_DATA, - HTTPSTATE_WAIT_FEED, /* wait for data from the feed */ - HTTPSTATE_READY, - - RTSPSTATE_WAIT_REQUEST, - RTSPSTATE_SEND_REPLY, - RTSPSTATE_SEND_PACKET, -}; - -static const char *http_state[] = { - "HTTP_WAIT_REQUEST", - "HTTP_SEND_HEADER", - - "SEND_DATA_HEADER", - "SEND_DATA", - "SEND_DATA_TRAILER", - "RECEIVE_DATA", - "WAIT_FEED", - "READY", - - "RTSP_WAIT_REQUEST", - "RTSP_SEND_REPLY", - "RTSP_SEND_PACKET", -}; - -#define MAX_STREAMS 20 - -#define IOBUFFER_INIT_SIZE 8192 - -/* timeouts are in ms */ -#define HTTP_REQUEST_TIMEOUT (15 * 1000) -#define RTSP_REQUEST_TIMEOUT (3600 * 24 * 1000) - -#define SYNC_TIMEOUT (10 * 1000) - -typedef struct RTSPActionServerSetup { - uint32_t ipaddr; - char transport_option[512]; -} RTSPActionServerSetup; - -typedef struct { - int64_t count1, count2; - int64_t time1, time2; -} DataRateData; - -/* context associated with one connection */ -typedef struct HTTPContext { - enum HTTPState state; - int fd; /* socket file descriptor */ - struct sockaddr_in from_addr; /* origin */ - struct pollfd *poll_entry; /* used when polling */ - int64_t timeout; - uint8_t *buffer_ptr, *buffer_end; - int http_error; - int post; - int chunked_encoding; - int chunk_size; /* 0 if it needs to be read */ - struct HTTPContext *next; - int got_key_frame; /* stream 0 => 1, stream 1 => 2, stream 2=> 4 */ - int64_t data_count; - /* feed input */ - int feed_fd; - /* input format handling */ - AVFormatContext *fmt_in; - int64_t start_time; /* In milliseconds - this wraps fairly often */ - int64_t first_pts; /* initial pts value */ - int64_t cur_pts; /* current pts value from the stream in us */ - int64_t cur_frame_duration; /* duration of the current frame in us */ - int cur_frame_bytes; /* output frame size, needed to compute - the time at which we send each - packet */ - int pts_stream_index; /* stream we choose as clock reference */ - int64_t cur_clock; /* current clock reference value in us */ - /* output format handling */ - struct FFStream *stream; - /* -1 is invalid stream */ - int feed_streams[MAX_STREAMS]; /* index of streams in the feed */ - int switch_feed_streams[MAX_STREAMS]; /* index of streams in the feed */ - int switch_pending; - AVFormatContext fmt_ctx; /* instance of FFStream for one user */ - int last_packet_sent; /* true if last data packet was sent */ - int suppress_log; - DataRateData datarate; - int wmp_client_id; - char protocol[16]; - char method[16]; - char url[128]; - int buffer_size; - uint8_t *buffer; - int is_packetized; /* if true, the stream is packetized */ - int packet_stream_index; /* current stream for output in state machine */ - - /* RTSP state specific */ - uint8_t *pb_buffer; /* XXX: use that in all the code */ - AVIOContext *pb; - int seq; /* RTSP sequence number */ - - /* RTP state specific */ - enum RTSPLowerTransport rtp_protocol; - char session_id[32]; /* session id */ - AVFormatContext *rtp_ctx[MAX_STREAMS]; - - /* RTP/UDP specific */ - URLContext *rtp_handles[MAX_STREAMS]; - - /* RTP/TCP specific */ - struct HTTPContext *rtsp_c; - uint8_t *packet_buffer, *packet_buffer_ptr, *packet_buffer_end; -} HTTPContext; - -/* each generated stream is described here */ -enum StreamType { - STREAM_TYPE_LIVE, - STREAM_TYPE_STATUS, - STREAM_TYPE_REDIRECT, -}; - -enum IPAddressAction { - IP_ALLOW = 1, - IP_DENY, -}; - -typedef struct IPAddressACL { - struct IPAddressACL *next; - enum IPAddressAction action; - /* These are in host order */ - struct in_addr first; - struct in_addr last; -} IPAddressACL; - -/* description of each stream of the ffserver.conf file */ -typedef struct FFStream { - enum StreamType stream_type; - char filename[1024]; /* stream filename */ - struct FFStream *feed; /* feed we are using (can be null if - coming from file) */ - AVDictionary *in_opts; /* input parameters */ - AVInputFormat *ifmt; /* if non NULL, force input format */ - AVOutputFormat *fmt; - IPAddressACL *acl; - char dynamic_acl[1024]; - int nb_streams; - int prebuffer; /* Number of millseconds early to start */ - int64_t max_time; /* Number of milliseconds to run */ - int send_on_key; - AVStream *streams[MAX_STREAMS]; - int feed_streams[MAX_STREAMS]; /* index of streams in the feed */ - char feed_filename[1024]; /* file name of the feed storage, or - input file name for a stream */ - char author[512]; - char title[512]; - char copyright[512]; - char comment[512]; - pid_t pid; /* Of ffmpeg process */ - time_t pid_start; /* Of ffmpeg process */ - char **child_argv; - struct FFStream *next; - unsigned bandwidth; /* bandwidth, in kbits/s */ - /* RTSP options */ - char *rtsp_option; - /* multicast specific */ - int is_multicast; - struct in_addr multicast_ip; - int multicast_port; /* first port used for multicast */ - int multicast_ttl; - int loop; /* if true, send the stream in loops (only meaningful if file) */ - - /* feed specific */ - int feed_opened; /* true if someone is writing to the feed */ - int is_feed; /* true if it is a feed */ - int readonly; /* True if writing is prohibited to the file */ - int truncate; /* True if feeder connection truncate the feed file */ - int conns_served; - int64_t bytes_served; - int64_t feed_max_size; /* maximum storage size, zero means unlimited */ - int64_t feed_write_index; /* current write position in feed (it wraps around) */ - int64_t feed_size; /* current size of feed */ - struct FFStream *next_feed; -} FFStream; - -typedef struct FeedData { - long long data_count; - float avg_frame_size; /* frame size averaged over last frames with exponential mean */ -} FeedData; - -static struct sockaddr_in my_http_addr; -static struct sockaddr_in my_rtsp_addr; - -static char logfilename[1024]; -static HTTPContext *first_http_ctx; -static FFStream *first_feed; /* contains only feeds */ -static FFStream *first_stream; /* contains all streams, including feeds */ - -static void new_connection(int server_fd, int is_rtsp); -static void close_connection(HTTPContext *c); - -/* HTTP handling */ -static int handle_connection(HTTPContext *c); -static int http_parse_request(HTTPContext *c); -static int http_send_data(HTTPContext *c); -static void compute_status(HTTPContext *c); -static int open_input_stream(HTTPContext *c, const char *info); -static int http_start_receive_data(HTTPContext *c); -static int http_receive_data(HTTPContext *c); - -/* RTSP handling */ -static int rtsp_parse_request(HTTPContext *c); -static void rtsp_cmd_describe(HTTPContext *c, const char *url); -static void rtsp_cmd_options(HTTPContext *c, const char *url); -static void rtsp_cmd_setup(HTTPContext *c, const char *url, RTSPMessageHeader *h); -static void rtsp_cmd_play(HTTPContext *c, const char *url, RTSPMessageHeader *h); -static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPMessageHeader *h); -static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPMessageHeader *h); - -/* SDP handling */ -static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, - struct in_addr my_ip); - -/* RTP handling */ -static HTTPContext *rtp_new_connection(struct sockaddr_in *from_addr, - FFStream *stream, const char *session_id, - enum RTSPLowerTransport rtp_protocol); -static int rtp_new_av_stream(HTTPContext *c, - int stream_index, struct sockaddr_in *dest_addr, - HTTPContext *rtsp_c); - -static const char *my_program_name; -static const char *my_program_dir; - -static const char *config_filename = "/etc/ffserver.conf"; - -static int ffserver_debug; -static int ffserver_daemon; -static int no_launch; -static int need_to_start_children; - -/* maximum number of simultaneous HTTP connections */ -static unsigned int nb_max_http_connections = 2000; -static unsigned int nb_max_connections = 5; -static unsigned int nb_connections; - -static uint64_t max_bandwidth = 1000; -static uint64_t current_bandwidth; - -static int64_t cur_time; // Making this global saves on passing it around everywhere - -static AVLFG random_state; - -static FILE *logfile = NULL; - -/* FIXME: make ffserver work with IPv6 */ -/* resolve host with also IP address parsing */ -static int resolve_host(struct in_addr *sin_addr, const char *hostname) -{ - - if (!ff_inet_aton(hostname, sin_addr)) { -#if HAVE_GETADDRINFO - struct addrinfo *ai, *cur; - struct addrinfo hints; - memset(&hints, 0, sizeof(hints)); - hints.ai_family = AF_INET; - if (getaddrinfo(hostname, NULL, &hints, &ai)) - return -1; - /* getaddrinfo returns a linked list of addrinfo structs. - * Even if we set ai_family = AF_INET above, make sure - * that the returned one actually is of the correct type. */ - for (cur = ai; cur; cur = cur->ai_next) { - if (cur->ai_family == AF_INET) { - *sin_addr = ((struct sockaddr_in *)cur->ai_addr)->sin_addr; - freeaddrinfo(ai); - return 0; - } - } - freeaddrinfo(ai); - return -1; -#else - struct hostent *hp; - hp = gethostbyname(hostname); - if (!hp) - return -1; - memcpy(sin_addr, hp->h_addr_list[0], sizeof(struct in_addr)); -#endif - } - return 0; -} - -static char *ctime1(char *buf2) -{ - time_t ti; - char *p; - - ti = time(NULL); - p = ctime(&ti); - strcpy(buf2, p); - p = buf2 + strlen(p) - 1; - if (*p == '\n') - *p = '\0'; - return buf2; -} - -static void http_vlog(const char *fmt, va_list vargs) -{ - static int print_prefix = 1; - if (logfile) { - if (print_prefix) { - char buf[32]; - ctime1(buf); - fprintf(logfile, "%s ", buf); - } - print_prefix = strstr(fmt, "\n") != NULL; - vfprintf(logfile, fmt, vargs); - fflush(logfile); - } -} - -#ifdef __GNUC__ -__attribute__ ((format (printf, 1, 2))) -#endif -static void http_log(const char *fmt, ...) -{ - va_list vargs; - va_start(vargs, fmt); - http_vlog(fmt, vargs); - va_end(vargs); -} - -static void http_av_log(void *ptr, int level, const char *fmt, va_list vargs) -{ - static int print_prefix = 1; - AVClass *avc = ptr ? *(AVClass**)ptr : NULL; - if (level > av_log_get_level()) - return; - if (print_prefix && avc) - http_log("[%s @ %p]", avc->item_name(ptr), ptr); - print_prefix = strstr(fmt, "\n") != NULL; - http_vlog(fmt, vargs); -} - -static void log_connection(HTTPContext *c) -{ - if (c->suppress_log) - return; - - http_log("%s - - [%s] \"%s %s\" %d %"PRId64"\n", - inet_ntoa(c->from_addr.sin_addr), c->method, c->url, - c->protocol, (c->http_error ? c->http_error : 200), c->data_count); -} - -static void update_datarate(DataRateData *drd, int64_t count) -{ - if (!drd->time1 && !drd->count1) { - drd->time1 = drd->time2 = cur_time; - drd->count1 = drd->count2 = count; - } else if (cur_time - drd->time2 > 5000) { - drd->time1 = drd->time2; - drd->count1 = drd->count2; - drd->time2 = cur_time; - drd->count2 = count; - } -} - -/* In bytes per second */ -static int compute_datarate(DataRateData *drd, int64_t count) -{ - if (cur_time == drd->time1) - return 0; - - return ((count - drd->count1) * 1000) / (cur_time - drd->time1); -} - - -static void start_children(FFStream *feed) -{ - if (no_launch) - return; - - for (; feed; feed = feed->next) { - if (feed->child_argv && !feed->pid) { - feed->pid_start = time(0); - - feed->pid = fork(); - - if (feed->pid < 0) { - http_log("Unable to create children\n"); - exit(1); - } - if (!feed->pid) { - /* In child */ - char pathname[1024]; - char *slash; - int i; - - av_strlcpy(pathname, my_program_name, sizeof(pathname)); - - slash = strrchr(pathname, '/'); - if (!slash) - slash = pathname; - else - slash++; - strcpy(slash, "ffmpeg"); - - http_log("Launch commandline: "); - http_log("%s ", pathname); - for (i = 1; feed->child_argv[i] && feed->child_argv[i][0]; i++) - http_log("%s ", feed->child_argv[i]); - http_log("\n"); - - for (i = 3; i < 256; i++) - close(i); - - if (!ffserver_debug) { - i = open("/dev/null", O_RDWR); - if (i != -1) { - dup2(i, 0); - dup2(i, 1); - dup2(i, 2); - close(i); - } - } - - /* This is needed to make relative pathnames work */ - chdir(my_program_dir); - - signal(SIGPIPE, SIG_DFL); - - execvp(pathname, feed->child_argv); - - _exit(1); - } - } - } -} - -/* open a listening socket */ -static int socket_open_listen(struct sockaddr_in *my_addr) -{ - int server_fd, tmp; - - server_fd = socket(AF_INET,SOCK_STREAM,0); - if (server_fd < 0) { - perror ("socket"); - return -1; - } - - tmp = 1; - setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp)); - - if (bind (server_fd, (struct sockaddr *) my_addr, sizeof (*my_addr)) < 0) { - char bindmsg[32]; - snprintf(bindmsg, sizeof(bindmsg), "bind(port %d)", ntohs(my_addr->sin_port)); - perror (bindmsg); - closesocket(server_fd); - return -1; - } - - if (listen (server_fd, 5) < 0) { - perror ("listen"); - closesocket(server_fd); - return -1; - } - ff_socket_nonblock(server_fd, 1); - - return server_fd; -} - -/* start all multicast streams */ -static void start_multicast(void) -{ - FFStream *stream; - char session_id[32]; - HTTPContext *rtp_c; - struct sockaddr_in dest_addr; - int default_port, stream_index; - - default_port = 6000; - for(stream = first_stream; stream != NULL; stream = stream->next) { - if (stream->is_multicast) { - /* open the RTP connection */ - snprintf(session_id, sizeof(session_id), "%08x%08x", - av_lfg_get(&random_state), av_lfg_get(&random_state)); - - /* choose a port if none given */ - if (stream->multicast_port == 0) { - stream->multicast_port = default_port; - default_port += 100; - } - - dest_addr.sin_family = AF_INET; - dest_addr.sin_addr = stream->multicast_ip; - dest_addr.sin_port = htons(stream->multicast_port); - - rtp_c = rtp_new_connection(&dest_addr, stream, session_id, - RTSP_LOWER_TRANSPORT_UDP_MULTICAST); - if (!rtp_c) - continue; - - if (open_input_stream(rtp_c, "") < 0) { - http_log("Could not open input stream for stream '%s'\n", - stream->filename); - continue; - } - - /* open each RTP stream */ - for(stream_index = 0; stream_index < stream->nb_streams; - stream_index++) { - dest_addr.sin_port = htons(stream->multicast_port + - 2 * stream_index); - if (rtp_new_av_stream(rtp_c, stream_index, &dest_addr, NULL) < 0) { - http_log("Could not open output stream '%s/streamid=%d'\n", - stream->filename, stream_index); - exit(1); - } - } - - /* change state to send data */ - rtp_c->state = HTTPSTATE_SEND_DATA; - } - } -} - -/* main loop of the http server */ -static int http_server(void) -{ - int server_fd = 0, rtsp_server_fd = 0; - int ret, delay, delay1; - struct pollfd *poll_table, *poll_entry; - HTTPContext *c, *c_next; - - if(!(poll_table = av_mallocz((nb_max_http_connections + 2)*sizeof(*poll_table)))) { - http_log("Impossible to allocate a poll table handling %d connections.\n", nb_max_http_connections); - return -1; - } - - if (my_http_addr.sin_port) { - server_fd = socket_open_listen(&my_http_addr); - if (server_fd < 0) - return -1; - } - - if (my_rtsp_addr.sin_port) { - rtsp_server_fd = socket_open_listen(&my_rtsp_addr); - if (rtsp_server_fd < 0) - return -1; - } - - if (!rtsp_server_fd && !server_fd) { - http_log("HTTP and RTSP disabled.\n"); - return -1; - } - - http_log("FFserver started.\n"); - - start_children(first_feed); - - start_multicast(); - - for(;;) { - poll_entry = poll_table; - if (server_fd) { - poll_entry->fd = server_fd; - poll_entry->events = POLLIN; - poll_entry++; - } - if (rtsp_server_fd) { - poll_entry->fd = rtsp_server_fd; - poll_entry->events = POLLIN; - poll_entry++; - } - - /* wait for events on each HTTP handle */ - c = first_http_ctx; - delay = 1000; - while (c != NULL) { - int fd; - fd = c->fd; - switch(c->state) { - case HTTPSTATE_SEND_HEADER: - case RTSPSTATE_SEND_REPLY: - case RTSPSTATE_SEND_PACKET: - c->poll_entry = poll_entry; - poll_entry->fd = fd; - poll_entry->events = POLLOUT; - poll_entry++; - break; - case HTTPSTATE_SEND_DATA_HEADER: - case HTTPSTATE_SEND_DATA: - case HTTPSTATE_SEND_DATA_TRAILER: - if (!c->is_packetized) { - /* for TCP, we output as much as we can (may need to put a limit) */ - c->poll_entry = poll_entry; - poll_entry->fd = fd; - poll_entry->events = POLLOUT; - poll_entry++; - } else { - /* when ffserver is doing the timing, we work by - looking at which packet need to be sent every - 10 ms */ - delay1 = 10; /* one tick wait XXX: 10 ms assumed */ - if (delay1 < delay) - delay = delay1; - } - break; - case HTTPSTATE_WAIT_REQUEST: - case HTTPSTATE_RECEIVE_DATA: - case HTTPSTATE_WAIT_FEED: - case RTSPSTATE_WAIT_REQUEST: - /* need to catch errors */ - c->poll_entry = poll_entry; - poll_entry->fd = fd; - poll_entry->events = POLLIN;/* Maybe this will work */ - poll_entry++; - break; - default: - c->poll_entry = NULL; - break; - } - c = c->next; - } - - /* wait for an event on one connection. We poll at least every - second to handle timeouts */ - do { - ret = poll(poll_table, poll_entry - poll_table, delay); - if (ret < 0 && ff_neterrno() != AVERROR(EAGAIN) && - ff_neterrno() != AVERROR(EINTR)) - return -1; - } while (ret < 0); - - cur_time = av_gettime() / 1000; - - if (need_to_start_children) { - need_to_start_children = 0; - start_children(first_feed); - } - - /* now handle the events */ - for(c = first_http_ctx; c != NULL; c = c_next) { - c_next = c->next; - if (handle_connection(c) < 0) { - /* close and free the connection */ - log_connection(c); - close_connection(c); - } - } - - poll_entry = poll_table; - if (server_fd) { - /* new HTTP connection request ? */ - if (poll_entry->revents & POLLIN) - new_connection(server_fd, 0); - poll_entry++; - } - if (rtsp_server_fd) { - /* new RTSP connection request ? */ - if (poll_entry->revents & POLLIN) - new_connection(rtsp_server_fd, 1); - } - } -} - -/* start waiting for a new HTTP/RTSP request */ -static void start_wait_request(HTTPContext *c, int is_rtsp) -{ - c->buffer_ptr = c->buffer; - c->buffer_end = c->buffer + c->buffer_size - 1; /* leave room for '\0' */ - - if (is_rtsp) { - c->timeout = cur_time + RTSP_REQUEST_TIMEOUT; - c->state = RTSPSTATE_WAIT_REQUEST; - } else { - c->timeout = cur_time + HTTP_REQUEST_TIMEOUT; - c->state = HTTPSTATE_WAIT_REQUEST; - } -} - -static void http_send_too_busy_reply(int fd) -{ - char buffer[300]; - int len = snprintf(buffer, sizeof(buffer), - "HTTP/1.0 503 Server too busy\r\n" - "Content-type: text/html\r\n" - "\r\n" - "Too busy\r\n" - "

The server is too busy to serve your request at this time.

\r\n" - "

The number of current connections is %d, and this exceeds the limit of %d.

\r\n" - "\r\n", - nb_connections, nb_max_connections); - send(fd, buffer, len, 0); -} - - -static void new_connection(int server_fd, int is_rtsp) -{ - struct sockaddr_in from_addr; - int fd, len; - HTTPContext *c = NULL; - - len = sizeof(from_addr); - fd = accept(server_fd, (struct sockaddr *)&from_addr, - &len); - if (fd < 0) { - http_log("error during accept %s\n", strerror(errno)); - return; - } - ff_socket_nonblock(fd, 1); - - if (nb_connections >= nb_max_connections) { - http_send_too_busy_reply(fd); - goto fail; - } - - /* add a new connection */ - c = av_mallocz(sizeof(HTTPContext)); - if (!c) - goto fail; - - c->fd = fd; - c->poll_entry = NULL; - c->from_addr = from_addr; - c->buffer_size = IOBUFFER_INIT_SIZE; - c->buffer = av_malloc(c->buffer_size); - if (!c->buffer) - goto fail; - - c->next = first_http_ctx; - first_http_ctx = c; - nb_connections++; - - start_wait_request(c, is_rtsp); - - return; - - fail: - if (c) { - av_free(c->buffer); - av_free(c); - } - closesocket(fd); -} - -static void close_connection(HTTPContext *c) -{ - HTTPContext **cp, *c1; - int i, nb_streams; - AVFormatContext *ctx; - URLContext *h; - AVStream *st; - - /* remove connection from list */ - cp = &first_http_ctx; - while ((*cp) != NULL) { - c1 = *cp; - if (c1 == c) - *cp = c->next; - else - cp = &c1->next; - } - - /* remove references, if any (XXX: do it faster) */ - for(c1 = first_http_ctx; c1 != NULL; c1 = c1->next) { - if (c1->rtsp_c == c) - c1->rtsp_c = NULL; - } - - /* remove connection associated resources */ - if (c->fd >= 0) - closesocket(c->fd); - if (c->fmt_in) { - /* close each frame parser */ - for(i=0;ifmt_in->nb_streams;i++) { - st = c->fmt_in->streams[i]; - if (st->codec->codec) - avcodec_close(st->codec); - } - av_close_input_file(c->fmt_in); - } - - /* free RTP output streams if any */ - nb_streams = 0; - if (c->stream) - nb_streams = c->stream->nb_streams; - - for(i=0;irtp_ctx[i]; - if (ctx) { - av_write_trailer(ctx); - av_dict_free(&ctx->metadata); - av_free(ctx->streams[0]); - av_free(ctx); - } - h = c->rtp_handles[i]; - if (h) - url_close(h); - } - - ctx = &c->fmt_ctx; - - if (!c->last_packet_sent && c->state == HTTPSTATE_SEND_DATA_TRAILER) { - if (ctx->oformat) { - /* prepare header */ - if (avio_open_dyn_buf(&ctx->pb) >= 0) { - av_write_trailer(ctx); - av_freep(&c->pb_buffer); - avio_close_dyn_buf(ctx->pb, &c->pb_buffer); - } - } - } - - for(i=0; inb_streams; i++) - av_free(ctx->streams[i]); - - if (c->stream && !c->post && c->stream->stream_type == STREAM_TYPE_LIVE) - current_bandwidth -= c->stream->bandwidth; - - /* signal that there is no feed if we are the feeder socket */ - if (c->state == HTTPSTATE_RECEIVE_DATA && c->stream) { - c->stream->feed_opened = 0; - close(c->feed_fd); - } - - av_freep(&c->pb_buffer); - av_freep(&c->packet_buffer); - av_free(c->buffer); - av_free(c); - nb_connections--; -} - -static int handle_connection(HTTPContext *c) -{ - int len, ret; - - switch(c->state) { - case HTTPSTATE_WAIT_REQUEST: - case RTSPSTATE_WAIT_REQUEST: - /* timeout ? */ - if ((c->timeout - cur_time) < 0) - return -1; - if (c->poll_entry->revents & (POLLERR | POLLHUP)) - return -1; - - /* no need to read if no events */ - if (!(c->poll_entry->revents & POLLIN)) - return 0; - /* read the data */ - read_loop: - len = recv(c->fd, c->buffer_ptr, 1, 0); - if (len < 0) { - if (ff_neterrno() != AVERROR(EAGAIN) && - ff_neterrno() != AVERROR(EINTR)) - return -1; - } else if (len == 0) { - return -1; - } else { - /* search for end of request. */ - uint8_t *ptr; - c->buffer_ptr += len; - ptr = c->buffer_ptr; - if ((ptr >= c->buffer + 2 && !memcmp(ptr-2, "\n\n", 2)) || - (ptr >= c->buffer + 4 && !memcmp(ptr-4, "\r\n\r\n", 4))) { - /* request found : parse it and reply */ - if (c->state == HTTPSTATE_WAIT_REQUEST) { - ret = http_parse_request(c); - } else { - ret = rtsp_parse_request(c); - } - if (ret < 0) - return -1; - } else if (ptr >= c->buffer_end) { - /* request too long: cannot do anything */ - return -1; - } else goto read_loop; - } - break; - - case HTTPSTATE_SEND_HEADER: - if (c->poll_entry->revents & (POLLERR | POLLHUP)) - return -1; - - /* no need to write if no events */ - if (!(c->poll_entry->revents & POLLOUT)) - return 0; - len = send(c->fd, c->buffer_ptr, c->buffer_end - c->buffer_ptr, 0); - if (len < 0) { - if (ff_neterrno() != AVERROR(EAGAIN) && - ff_neterrno() != AVERROR(EINTR)) { - /* error : close connection */ - av_freep(&c->pb_buffer); - return -1; - } - } else { - c->buffer_ptr += len; - if (c->stream) - c->stream->bytes_served += len; - c->data_count += len; - if (c->buffer_ptr >= c->buffer_end) { - av_freep(&c->pb_buffer); - /* if error, exit */ - if (c->http_error) - return -1; - /* all the buffer was sent : synchronize to the incoming stream */ - c->state = HTTPSTATE_SEND_DATA_HEADER; - c->buffer_ptr = c->buffer_end = c->buffer; - } - } - break; - - case HTTPSTATE_SEND_DATA: - case HTTPSTATE_SEND_DATA_HEADER: - case HTTPSTATE_SEND_DATA_TRAILER: - /* for packetized output, we consider we can always write (the - input streams sets the speed). It may be better to verify - that we do not rely too much on the kernel queues */ - if (!c->is_packetized) { - if (c->poll_entry->revents & (POLLERR | POLLHUP)) - return -1; - - /* no need to read if no events */ - if (!(c->poll_entry->revents & POLLOUT)) - return 0; - } - if (http_send_data(c) < 0) - return -1; - /* close connection if trailer sent */ - if (c->state == HTTPSTATE_SEND_DATA_TRAILER) - return -1; - break; - case HTTPSTATE_RECEIVE_DATA: - /* no need to read if no events */ - if (c->poll_entry->revents & (POLLERR | POLLHUP)) - return -1; - if (!(c->poll_entry->revents & POLLIN)) - return 0; - if (http_receive_data(c) < 0) - return -1; - break; - case HTTPSTATE_WAIT_FEED: - /* no need to read if no events */ - if (c->poll_entry->revents & (POLLIN | POLLERR | POLLHUP)) - return -1; - - /* nothing to do, we'll be waken up by incoming feed packets */ - break; - - case RTSPSTATE_SEND_REPLY: - if (c->poll_entry->revents & (POLLERR | POLLHUP)) { - av_freep(&c->pb_buffer); - return -1; - } - /* no need to write if no events */ - if (!(c->poll_entry->revents & POLLOUT)) - return 0; - len = send(c->fd, c->buffer_ptr, c->buffer_end - c->buffer_ptr, 0); - if (len < 0) { - if (ff_neterrno() != AVERROR(EAGAIN) && - ff_neterrno() != AVERROR(EINTR)) { - /* error : close connection */ - av_freep(&c->pb_buffer); - return -1; - } - } else { - c->buffer_ptr += len; - c->data_count += len; - if (c->buffer_ptr >= c->buffer_end) { - /* all the buffer was sent : wait for a new request */ - av_freep(&c->pb_buffer); - start_wait_request(c, 1); - } - } - break; - case RTSPSTATE_SEND_PACKET: - if (c->poll_entry->revents & (POLLERR | POLLHUP)) { - av_freep(&c->packet_buffer); - return -1; - } - /* no need to write if no events */ - if (!(c->poll_entry->revents & POLLOUT)) - return 0; - len = send(c->fd, c->packet_buffer_ptr, - c->packet_buffer_end - c->packet_buffer_ptr, 0); - if (len < 0) { - if (ff_neterrno() != AVERROR(EAGAIN) && - ff_neterrno() != AVERROR(EINTR)) { - /* error : close connection */ - av_freep(&c->packet_buffer); - return -1; - } - } else { - c->packet_buffer_ptr += len; - if (c->packet_buffer_ptr >= c->packet_buffer_end) { - /* all the buffer was sent : wait for a new request */ - av_freep(&c->packet_buffer); - c->state = RTSPSTATE_WAIT_REQUEST; - } - } - break; - case HTTPSTATE_READY: - /* nothing to do */ - break; - default: - return -1; - } - return 0; -} - -static int extract_rates(char *rates, int ratelen, const char *request) -{ - const char *p; - - for (p = request; *p && *p != '\r' && *p != '\n'; ) { - if (strncasecmp(p, "Pragma:", 7) == 0) { - const char *q = p + 7; - - while (*q && *q != '\n' && isspace(*q)) - q++; - - if (strncasecmp(q, "stream-switch-entry=", 20) == 0) { - int stream_no; - int rate_no; - - q += 20; - - memset(rates, 0xff, ratelen); - - while (1) { - while (*q && *q != '\n' && *q != ':') - q++; - - if (sscanf(q, ":%d:%d", &stream_no, &rate_no) != 2) - break; - - stream_no--; - if (stream_no < ratelen && stream_no >= 0) - rates[stream_no] = rate_no; - - while (*q && *q != '\n' && !isspace(*q)) - q++; - } - - return 1; - } - } - p = strchr(p, '\n'); - if (!p) - break; - - p++; - } - - return 0; -} - -static int find_stream_in_feed(FFStream *feed, AVCodecContext *codec, int bit_rate) -{ - int i; - int best_bitrate = 100000000; - int best = -1; - - for (i = 0; i < feed->nb_streams; i++) { - AVCodecContext *feed_codec = feed->streams[i]->codec; - - if (feed_codec->codec_id != codec->codec_id || - feed_codec->sample_rate != codec->sample_rate || - feed_codec->width != codec->width || - feed_codec->height != codec->height) - continue; - - /* Potential stream */ - - /* We want the fastest stream less than bit_rate, or the slowest - * faster than bit_rate - */ - - if (feed_codec->bit_rate <= bit_rate) { - if (best_bitrate > bit_rate || feed_codec->bit_rate > best_bitrate) { - best_bitrate = feed_codec->bit_rate; - best = i; - } - } else { - if (feed_codec->bit_rate < best_bitrate) { - best_bitrate = feed_codec->bit_rate; - best = i; - } - } - } - - return best; -} - -static int modify_current_stream(HTTPContext *c, char *rates) -{ - int i; - FFStream *req = c->stream; - int action_required = 0; - - /* Not much we can do for a feed */ - if (!req->feed) - return 0; - - for (i = 0; i < req->nb_streams; i++) { - AVCodecContext *codec = req->streams[i]->codec; - - switch(rates[i]) { - case 0: - c->switch_feed_streams[i] = req->feed_streams[i]; - break; - case 1: - c->switch_feed_streams[i] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 2); - break; - case 2: - /* Wants off or slow */ - c->switch_feed_streams[i] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 4); -#ifdef WANTS_OFF - /* This doesn't work well when it turns off the only stream! */ - c->switch_feed_streams[i] = -2; - c->feed_streams[i] = -2; -#endif - break; - } - - if (c->switch_feed_streams[i] >= 0 && c->switch_feed_streams[i] != c->feed_streams[i]) - action_required = 1; - } - - return action_required; -} - -/* XXX: factorize in utils.c ? */ -/* XXX: take care with different space meaning */ -static void skip_spaces(const char **pp) -{ - const char *p; - p = *pp; - while (*p == ' ' || *p == '\t') - p++; - *pp = p; -} - -static void get_word(char *buf, int buf_size, const char **pp) -{ - const char *p; - char *q; - - p = *pp; - skip_spaces(&p); - q = buf; - while (!isspace(*p) && *p != '\0') { - if ((q - buf) < buf_size - 1) - *q++ = *p; - p++; - } - if (buf_size > 0) - *q = '\0'; - *pp = p; -} - -static void get_arg(char *buf, int buf_size, const char **pp) -{ - const char *p; - char *q; - int quote; - - p = *pp; - while (isspace(*p)) p++; - q = buf; - quote = 0; - if (*p == '\"' || *p == '\'') - quote = *p++; - for(;;) { - if (quote) { - if (*p == quote) - break; - } else { - if (isspace(*p)) - break; - } - if (*p == '\0') - break; - if ((q - buf) < buf_size - 1) - *q++ = *p; - p++; - } - *q = '\0'; - if (quote && *p == quote) - p++; - *pp = p; -} - -static void parse_acl_row(FFStream *stream, FFStream* feed, IPAddressACL *ext_acl, - const char *p, const char *filename, int line_num) -{ - char arg[1024]; - IPAddressACL acl; - int errors = 0; - - get_arg(arg, sizeof(arg), &p); - if (strcasecmp(arg, "allow") == 0) - acl.action = IP_ALLOW; - else if (strcasecmp(arg, "deny") == 0) - acl.action = IP_DENY; - else { - fprintf(stderr, "%s:%d: ACL action '%s' is not ALLOW or DENY\n", - filename, line_num, arg); - errors++; - } - - get_arg(arg, sizeof(arg), &p); - - if (resolve_host(&acl.first, arg) != 0) { - fprintf(stderr, "%s:%d: ACL refers to invalid host or ip address '%s'\n", - filename, line_num, arg); - errors++; - } else - acl.last = acl.first; - - get_arg(arg, sizeof(arg), &p); - - if (arg[0]) { - if (resolve_host(&acl.last, arg) != 0) { - fprintf(stderr, "%s:%d: ACL refers to invalid host or ip address '%s'\n", - filename, line_num, arg); - errors++; - } - } - - if (!errors) { - IPAddressACL *nacl = av_mallocz(sizeof(*nacl)); - IPAddressACL **naclp = 0; - - acl.next = 0; - *nacl = acl; - - if (stream) - naclp = &stream->acl; - else if (feed) - naclp = &feed->acl; - else if (ext_acl) - naclp = &ext_acl; - else { - fprintf(stderr, "%s:%d: ACL found not in or \n", - filename, line_num); - errors++; - } - - if (naclp) { - while (*naclp) - naclp = &(*naclp)->next; - - *naclp = nacl; - } - } -} - - -static IPAddressACL* parse_dynamic_acl(FFStream *stream, HTTPContext *c) -{ - FILE* f; - char line[1024]; - char cmd[1024]; - IPAddressACL *acl = NULL; - int line_num = 0; - const char *p; - - f = fopen(stream->dynamic_acl, "r"); - if (!f) { - perror(stream->dynamic_acl); - return NULL; - } - - acl = av_mallocz(sizeof(IPAddressACL)); - - /* Build ACL */ - for(;;) { - if (fgets(line, sizeof(line), f) == NULL) - break; - line_num++; - p = line; - while (isspace(*p)) - p++; - if (*p == '\0' || *p == '#') - continue; - get_arg(cmd, sizeof(cmd), &p); - - if (!strcasecmp(cmd, "ACL")) - parse_acl_row(NULL, NULL, acl, p, stream->dynamic_acl, line_num); - } - fclose(f); - return acl; -} - - -static void free_acl_list(IPAddressACL *in_acl) -{ - IPAddressACL *pacl,*pacl2; - - pacl = in_acl; - while(pacl) { - pacl2 = pacl; - pacl = pacl->next; - av_freep(pacl2); - } -} - -static int validate_acl_list(IPAddressACL *in_acl, HTTPContext *c) -{ - enum IPAddressAction last_action = IP_DENY; - IPAddressACL *acl; - struct in_addr *src = &c->from_addr.sin_addr; - unsigned long src_addr = src->s_addr; - - for (acl = in_acl; acl; acl = acl->next) { - if (src_addr >= acl->first.s_addr && src_addr <= acl->last.s_addr) - return (acl->action == IP_ALLOW) ? 1 : 0; - last_action = acl->action; - } - - /* Nothing matched, so return not the last action */ - return (last_action == IP_DENY) ? 1 : 0; -} - -static int validate_acl(FFStream *stream, HTTPContext *c) -{ - int ret = 0; - IPAddressACL *acl; - - - /* if stream->acl is null validate_acl_list will return 1 */ - ret = validate_acl_list(stream->acl, c); - - if (stream->dynamic_acl[0]) { - acl = parse_dynamic_acl(stream, c); - - ret = validate_acl_list(acl, c); - - free_acl_list(acl); - } - - return ret; -} - -/* compute the real filename of a file by matching it without its - extensions to all the stream filenames */ -static void compute_real_filename(char *filename, int max_size) -{ - char file1[1024]; - char file2[1024]; - char *p; - FFStream *stream; - - /* compute filename by matching without the file extensions */ - av_strlcpy(file1, filename, sizeof(file1)); - p = strrchr(file1, '.'); - if (p) - *p = '\0'; - for(stream = first_stream; stream != NULL; stream = stream->next) { - av_strlcpy(file2, stream->filename, sizeof(file2)); - p = strrchr(file2, '.'); - if (p) - *p = '\0'; - if (!strcmp(file1, file2)) { - av_strlcpy(filename, stream->filename, max_size); - break; - } - } -} - -enum RedirType { - REDIR_NONE, - REDIR_ASX, - REDIR_RAM, - REDIR_ASF, - REDIR_RTSP, - REDIR_SDP, -}; - -/* parse http request and prepare header */ -static int http_parse_request(HTTPContext *c) -{ - char *p; - enum RedirType redir_type; - char cmd[32]; - char info[1024], filename[1024]; - char url[1024], *q; - char protocol[32]; - char msg[1024]; - const char *mime_type; - FFStream *stream; - int i; - char ratebuf[32]; - char *useragent = 0; - - p = c->buffer; - get_word(cmd, sizeof(cmd), (const char **)&p); - av_strlcpy(c->method, cmd, sizeof(c->method)); - - if (!strcmp(cmd, "GET")) - c->post = 0; - else if (!strcmp(cmd, "POST")) - c->post = 1; - else - return -1; - - get_word(url, sizeof(url), (const char **)&p); - av_strlcpy(c->url, url, sizeof(c->url)); - - get_word(protocol, sizeof(protocol), (const char **)&p); - if (strcmp(protocol, "HTTP/1.0") && strcmp(protocol, "HTTP/1.1")) - return -1; - - av_strlcpy(c->protocol, protocol, sizeof(c->protocol)); - - if (ffserver_debug) - http_log("%s - - New connection: %s %s\n", inet_ntoa(c->from_addr.sin_addr), cmd, url); - - /* find the filename and the optional info string in the request */ - p = strchr(url, '?'); - if (p) { - av_strlcpy(info, p, sizeof(info)); - *p = '\0'; - } else - info[0] = '\0'; - - av_strlcpy(filename, url + ((*url == '/') ? 1 : 0), sizeof(filename)-1); - - for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) { - if (strncasecmp(p, "User-Agent:", 11) == 0) { - useragent = p + 11; - if (*useragent && *useragent != '\n' && isspace(*useragent)) - useragent++; - break; - } - p = strchr(p, '\n'); - if (!p) - break; - - p++; - } - - redir_type = REDIR_NONE; - if (av_match_ext(filename, "asx")) { - redir_type = REDIR_ASX; - filename[strlen(filename)-1] = 'f'; - } else if (av_match_ext(filename, "asf") && - (!useragent || strncasecmp(useragent, "NSPlayer", 8) != 0)) { - /* if this isn't WMP or lookalike, return the redirector file */ - redir_type = REDIR_ASF; - } else if (av_match_ext(filename, "rpm,ram")) { - redir_type = REDIR_RAM; - strcpy(filename + strlen(filename)-2, "m"); - } else if (av_match_ext(filename, "rtsp")) { - redir_type = REDIR_RTSP; - compute_real_filename(filename, sizeof(filename) - 1); - } else if (av_match_ext(filename, "sdp")) { - redir_type = REDIR_SDP; - compute_real_filename(filename, sizeof(filename) - 1); - } - - // "redirect" / request to index.html - if (!strlen(filename)) - av_strlcpy(filename, "index.html", sizeof(filename) - 1); - - stream = first_stream; - while (stream != NULL) { - if (!strcmp(stream->filename, filename) && validate_acl(stream, c)) - break; - stream = stream->next; - } - if (stream == NULL) { - snprintf(msg, sizeof(msg), "File '%s' not found", url); - http_log("File '%s' not found\n", url); - goto send_error; - } - - c->stream = stream; - memcpy(c->feed_streams, stream->feed_streams, sizeof(c->feed_streams)); - memset(c->switch_feed_streams, -1, sizeof(c->switch_feed_streams)); - - if (stream->stream_type == STREAM_TYPE_REDIRECT) { - c->http_error = 301; - q = c->buffer; - q += snprintf(q, c->buffer_size, - "HTTP/1.0 301 Moved\r\n" - "Location: %s\r\n" - "Content-type: text/html\r\n" - "\r\n" - "Moved\r\n" - "You should be redirected.\r\n" - "\r\n", stream->feed_filename, stream->feed_filename); - /* prepare output buffer */ - c->buffer_ptr = c->buffer; - c->buffer_end = q; - c->state = HTTPSTATE_SEND_HEADER; - return 0; - } - - /* If this is WMP, get the rate information */ - if (extract_rates(ratebuf, sizeof(ratebuf), c->buffer)) { - if (modify_current_stream(c, ratebuf)) { - for (i = 0; i < FF_ARRAY_ELEMS(c->feed_streams); i++) { - if (c->switch_feed_streams[i] >= 0) - c->switch_feed_streams[i] = -1; - } - } - } - - if (c->post == 0 && stream->stream_type == STREAM_TYPE_LIVE) - current_bandwidth += stream->bandwidth; - - /* If already streaming this feed, do not let start another feeder. */ - if (stream->feed_opened) { - snprintf(msg, sizeof(msg), "This feed is already being received."); - http_log("Feed '%s' already being received\n", stream->feed_filename); - goto send_error; - } - - if (c->post == 0 && max_bandwidth < current_bandwidth) { - c->http_error = 503; - q = c->buffer; - q += snprintf(q, c->buffer_size, - "HTTP/1.0 503 Server too busy\r\n" - "Content-type: text/html\r\n" - "\r\n" - "Too busy\r\n" - "

The server is too busy to serve your request at this time.

\r\n" - "

The bandwidth being served (including your stream) is %"PRIu64"kbit/sec, " - "and this exceeds the limit of %"PRIu64"kbit/sec.

\r\n" - "\r\n", current_bandwidth, max_bandwidth); - /* prepare output buffer */ - c->buffer_ptr = c->buffer; - c->buffer_end = q; - c->state = HTTPSTATE_SEND_HEADER; - return 0; - } - - if (redir_type != REDIR_NONE) { - char *hostinfo = 0; - - for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) { - if (strncasecmp(p, "Host:", 5) == 0) { - hostinfo = p + 5; - break; - } - p = strchr(p, '\n'); - if (!p) - break; - - p++; - } - - if (hostinfo) { - char *eoh; - char hostbuf[260]; - - while (isspace(*hostinfo)) - hostinfo++; - - eoh = strchr(hostinfo, '\n'); - if (eoh) { - if (eoh[-1] == '\r') - eoh--; - - if (eoh - hostinfo < sizeof(hostbuf) - 1) { - memcpy(hostbuf, hostinfo, eoh - hostinfo); - hostbuf[eoh - hostinfo] = 0; - - c->http_error = 200; - q = c->buffer; - switch(redir_type) { - case REDIR_ASX: - q += snprintf(q, c->buffer_size, - "HTTP/1.0 200 ASX Follows\r\n" - "Content-type: video/x-ms-asf\r\n" - "\r\n" - "\r\n" - //"\r\n" - "\r\n" - "\r\n", hostbuf, filename, info); - break; - case REDIR_RAM: - q += snprintf(q, c->buffer_size, - "HTTP/1.0 200 RAM Follows\r\n" - "Content-type: audio/x-pn-realaudio\r\n" - "\r\n" - "# Autogenerated by ffserver\r\n" - "http://%s/%s%s\r\n", hostbuf, filename, info); - break; - case REDIR_ASF: - q += snprintf(q, c->buffer_size, - "HTTP/1.0 200 ASF Redirect follows\r\n" - "Content-type: video/x-ms-asf\r\n" - "\r\n" - "[Reference]\r\n" - "Ref1=http://%s/%s%s\r\n", hostbuf, filename, info); - break; - case REDIR_RTSP: - { - char hostname[256], *p; - /* extract only hostname */ - av_strlcpy(hostname, hostbuf, sizeof(hostname)); - p = strrchr(hostname, ':'); - if (p) - *p = '\0'; - q += snprintf(q, c->buffer_size, - "HTTP/1.0 200 RTSP Redirect follows\r\n" - /* XXX: incorrect mime type ? */ - "Content-type: application/x-rtsp\r\n" - "\r\n" - "rtsp://%s:%d/%s\r\n", hostname, ntohs(my_rtsp_addr.sin_port), filename); - } - break; - case REDIR_SDP: - { - uint8_t *sdp_data; - int sdp_data_size, len; - struct sockaddr_in my_addr; - - q += snprintf(q, c->buffer_size, - "HTTP/1.0 200 OK\r\n" - "Content-type: application/sdp\r\n" - "\r\n"); - - len = sizeof(my_addr); - getsockname(c->fd, (struct sockaddr *)&my_addr, &len); - - /* XXX: should use a dynamic buffer */ - sdp_data_size = prepare_sdp_description(stream, - &sdp_data, - my_addr.sin_addr); - if (sdp_data_size > 0) { - memcpy(q, sdp_data, sdp_data_size); - q += sdp_data_size; - *q = '\0'; - av_free(sdp_data); - } - } - break; - default: - abort(); - break; - } - - /* prepare output buffer */ - c->buffer_ptr = c->buffer; - c->buffer_end = q; - c->state = HTTPSTATE_SEND_HEADER; - return 0; - } - } - } - - snprintf(msg, sizeof(msg), "ASX/RAM file not handled"); - goto send_error; - } - - stream->conns_served++; - - /* XXX: add there authenticate and IP match */ - - if (c->post) { - /* if post, it means a feed is being sent */ - if (!stream->is_feed) { - /* However it might be a status report from WMP! Let us log the - * data as it might come in handy one day. */ - char *logline = 0; - int client_id = 0; - - for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) { - if (strncasecmp(p, "Pragma: log-line=", 17) == 0) { - logline = p; - break; - } - if (strncasecmp(p, "Pragma: client-id=", 18) == 0) - client_id = strtol(p + 18, 0, 10); - p = strchr(p, '\n'); - if (!p) - break; - - p++; - } - - if (logline) { - char *eol = strchr(logline, '\n'); - - logline += 17; - - if (eol) { - if (eol[-1] == '\r') - eol--; - http_log("%.*s\n", (int) (eol - logline), logline); - c->suppress_log = 1; - } - } - -#ifdef DEBUG - http_log("\nGot request:\n%s\n", c->buffer); -#endif - - if (client_id && extract_rates(ratebuf, sizeof(ratebuf), c->buffer)) { - HTTPContext *wmpc; - - /* Now we have to find the client_id */ - for (wmpc = first_http_ctx; wmpc; wmpc = wmpc->next) { - if (wmpc->wmp_client_id == client_id) - break; - } - - if (wmpc && modify_current_stream(wmpc, ratebuf)) - wmpc->switch_pending = 1; - } - - snprintf(msg, sizeof(msg), "POST command not handled"); - c->stream = 0; - goto send_error; - } - if (http_start_receive_data(c) < 0) { - snprintf(msg, sizeof(msg), "could not open feed"); - goto send_error; - } - c->http_error = 0; - c->state = HTTPSTATE_RECEIVE_DATA; - return 0; - } - -#ifdef DEBUG - if (strcmp(stream->filename + strlen(stream->filename) - 4, ".asf") == 0) - http_log("\nGot request:\n%s\n", c->buffer); -#endif - - if (c->stream->stream_type == STREAM_TYPE_STATUS) - goto send_status; - - /* open input stream */ - if (open_input_stream(c, info) < 0) { - snprintf(msg, sizeof(msg), "Input stream corresponding to '%s' not found", url); - goto send_error; - } - - /* prepare http header */ - q = c->buffer; - q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "HTTP/1.0 200 OK\r\n"); - mime_type = c->stream->fmt->mime_type; - if (!mime_type) - mime_type = "application/x-octet-stream"; - q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Pragma: no-cache\r\n"); - - /* for asf, we need extra headers */ - if (!strcmp(c->stream->fmt->name,"asf_stream")) { - /* Need to allocate a client id */ - - c->wmp_client_id = av_lfg_get(&random_state); - - q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Server: Cougar 4.1.0.3923\r\nCache-Control: no-cache\r\nPragma: client-id=%d\r\nPragma: features=\"broadcast\"\r\n", c->wmp_client_id); - } - q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Content-Type: %s\r\n", mime_type); - q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "\r\n"); - - /* prepare output buffer */ - c->http_error = 0; - c->buffer_ptr = c->buffer; - c->buffer_end = q; - c->state = HTTPSTATE_SEND_HEADER; - return 0; - send_error: - c->http_error = 404; - q = c->buffer; - q += snprintf(q, c->buffer_size, - "HTTP/1.0 404 Not Found\r\n" - "Content-type: text/html\r\n" - "\r\n" - "\n" - "404 Not Found\n" - "%s\n" - "\n", msg); - /* prepare output buffer */ - c->buffer_ptr = c->buffer; - c->buffer_end = q; - c->state = HTTPSTATE_SEND_HEADER; - return 0; - send_status: - compute_status(c); - c->http_error = 200; /* horrible : we use this value to avoid - going to the send data state */ - c->state = HTTPSTATE_SEND_HEADER; - return 0; -} - -static void fmt_bytecount(AVIOContext *pb, int64_t count) -{ - static const char *suffix = " kMGTP"; - const char *s; - - for (s = suffix; count >= 100000 && s[1]; count /= 1000, s++); - - avio_printf(pb, "%"PRId64"%c", count, *s); -} - -static void compute_status(HTTPContext *c) -{ - HTTPContext *c1; - FFStream *stream; - char *p; - time_t ti; - int i, len; - AVIOContext *pb; - - if (avio_open_dyn_buf(&pb) < 0) { - /* XXX: return an error ? */ - c->buffer_ptr = c->buffer; - c->buffer_end = c->buffer; - return; - } - - avio_printf(pb, "HTTP/1.0 200 OK\r\n"); - avio_printf(pb, "Content-type: %s\r\n", "text/html"); - avio_printf(pb, "Pragma: no-cache\r\n"); - avio_printf(pb, "\r\n"); - - avio_printf(pb, "%s Status\n", program_name); - if (c->stream->feed_filename[0]) - avio_printf(pb, "\n", c->stream->feed_filename); - avio_printf(pb, "\n"); - avio_printf(pb, "

%s Status

\n", program_name); - /* format status */ - avio_printf(pb, "

Available Streams

\n"); - avio_printf(pb, "\n"); - avio_printf(pb, "
PathServed
Conns

bytes
FormatBit rate
kbits/s
Video
kbits/s

Codec
Audio
kbits/s

Codec
Feed\n"); - stream = first_stream; - while (stream != NULL) { - char sfilename[1024]; - char *eosf; - - if (stream->feed != stream) { - av_strlcpy(sfilename, stream->filename, sizeof(sfilename) - 10); - eosf = sfilename + strlen(sfilename); - if (eosf - sfilename >= 4) { - if (strcmp(eosf - 4, ".asf") == 0) - strcpy(eosf - 4, ".asx"); - else if (strcmp(eosf - 3, ".rm") == 0) - strcpy(eosf - 3, ".ram"); - else if (stream->fmt && !strcmp(stream->fmt->name, "rtp")) { - /* generate a sample RTSP director if - unicast. Generate an SDP redirector if - multicast */ - eosf = strrchr(sfilename, '.'); - if (!eosf) - eosf = sfilename + strlen(sfilename); - if (stream->is_multicast) - strcpy(eosf, ".sdp"); - else - strcpy(eosf, ".rtsp"); - } - } - - avio_printf(pb, "
%s ", - sfilename, stream->filename); - avio_printf(pb, " %d ", - stream->conns_served); - fmt_bytecount(pb, stream->bytes_served); - switch(stream->stream_type) { - case STREAM_TYPE_LIVE: { - int audio_bit_rate = 0; - int video_bit_rate = 0; - const char *audio_codec_name = ""; - const char *video_codec_name = ""; - const char *audio_codec_name_extra = ""; - const char *video_codec_name_extra = ""; - - for(i=0;inb_streams;i++) { - AVStream *st = stream->streams[i]; - AVCodec *codec = avcodec_find_encoder(st->codec->codec_id); - switch(st->codec->codec_type) { - case AVMEDIA_TYPE_AUDIO: - audio_bit_rate += st->codec->bit_rate; - if (codec) { - if (*audio_codec_name) - audio_codec_name_extra = "..."; - audio_codec_name = codec->name; - } - break; - case AVMEDIA_TYPE_VIDEO: - video_bit_rate += st->codec->bit_rate; - if (codec) { - if (*video_codec_name) - video_codec_name_extra = "..."; - video_codec_name = codec->name; - } - break; - case AVMEDIA_TYPE_DATA: - video_bit_rate += st->codec->bit_rate; - break; - default: - abort(); - } - } - avio_printf(pb, " %s %d %d %s %s %d %s %s", - stream->fmt->name, - stream->bandwidth, - video_bit_rate / 1000, video_codec_name, video_codec_name_extra, - audio_bit_rate / 1000, audio_codec_name, audio_codec_name_extra); - if (stream->feed) - avio_printf(pb, "%s", stream->feed->filename); - else - avio_printf(pb, "%s", stream->feed_filename); - avio_printf(pb, "\n"); - } - break; - default: - avio_printf(pb, " - - - - \n"); - break; - } - } - stream = stream->next; - } - avio_printf(pb, "
\n"); - - stream = first_stream; - while (stream != NULL) { - if (stream->feed == stream) { - avio_printf(pb, "

Feed %s

", stream->filename); - if (stream->pid) { - avio_printf(pb, "Running as pid %d.\n", stream->pid); - -#if defined(linux) && !defined(CONFIG_NOCUTILS) - { - FILE *pid_stat; - char ps_cmd[64]; - - /* This is somewhat linux specific I guess */ - snprintf(ps_cmd, sizeof(ps_cmd), - "ps -o \"%%cpu,cputime\" --no-headers %d", - stream->pid); - - pid_stat = popen(ps_cmd, "r"); - if (pid_stat) { - char cpuperc[10]; - char cpuused[64]; - - if (fscanf(pid_stat, "%10s %64s", cpuperc, - cpuused) == 2) { - avio_printf(pb, "Currently using %s%% of the cpu. Total time used %s.\n", - cpuperc, cpuused); - } - fclose(pid_stat); - } - } -#endif - - avio_printf(pb, "

"); - } - avio_printf(pb, "
Streamtypekbits/scodecParameters\n"); - - for (i = 0; i < stream->nb_streams; i++) { - AVStream *st = stream->streams[i]; - AVCodec *codec = avcodec_find_encoder(st->codec->codec_id); - const char *type = "unknown"; - char parameters[64]; - - parameters[0] = 0; - - switch(st->codec->codec_type) { - case AVMEDIA_TYPE_AUDIO: - type = "audio"; - snprintf(parameters, sizeof(parameters), "%d channel(s), %d Hz", st->codec->channels, st->codec->sample_rate); - break; - case AVMEDIA_TYPE_VIDEO: - type = "video"; - snprintf(parameters, sizeof(parameters), "%dx%d, q=%d-%d, fps=%d", st->codec->width, st->codec->height, - st->codec->qmin, st->codec->qmax, st->codec->time_base.den / st->codec->time_base.num); - break; - default: - abort(); - } - avio_printf(pb, "
%d%s%d%s%s\n", - i, type, st->codec->bit_rate/1000, codec ? codec->name : "", parameters); - } - avio_printf(pb, "
\n"); - - } - stream = stream->next; - } - - /* connection status */ - avio_printf(pb, "

Connection Status

\n"); - - avio_printf(pb, "Number of connections: %d / %d
\n", - nb_connections, nb_max_connections); - - avio_printf(pb, "Bandwidth in use: %"PRIu64"k / %"PRIu64"k
\n", - current_bandwidth, max_bandwidth); - - avio_printf(pb, "\n"); - avio_printf(pb, "
#FileIPProtoStateTarget bits/secActual bits/secBytes transferred\n"); - c1 = first_http_ctx; - i = 0; - while (c1 != NULL) { - int bitrate; - int j; - - bitrate = 0; - if (c1->stream) { - for (j = 0; j < c1->stream->nb_streams; j++) { - if (!c1->stream->feed) - bitrate += c1->stream->streams[j]->codec->bit_rate; - else if (c1->feed_streams[j] >= 0) - bitrate += c1->stream->feed->streams[c1->feed_streams[j]]->codec->bit_rate; - } - } - - i++; - p = inet_ntoa(c1->from_addr.sin_addr); - avio_printf(pb, "
%d%s%s%s%s%s", - i, - c1->stream ? c1->stream->filename : "", - c1->state == HTTPSTATE_RECEIVE_DATA ? "(input)" : "", - p, - c1->protocol, - http_state[c1->state]); - fmt_bytecount(pb, bitrate); - avio_printf(pb, ""); - fmt_bytecount(pb, compute_datarate(&c1->datarate, c1->data_count) * 8); - avio_printf(pb, ""); - fmt_bytecount(pb, c1->data_count); - avio_printf(pb, "\n"); - c1 = c1->next; - } - avio_printf(pb, "
\n"); - - /* date */ - ti = time(NULL); - p = ctime(&ti); - avio_printf(pb, "
Generated at %s", p); - avio_printf(pb, "\n\n"); - - len = avio_close_dyn_buf(pb, &c->pb_buffer); - c->buffer_ptr = c->pb_buffer; - c->buffer_end = c->pb_buffer + len; -} - -/* check if the parser needs to be opened for stream i */ -static void open_parser(AVFormatContext *s, int i) -{ - AVStream *st = s->streams[i]; - AVCodec *codec; - - if (!st->codec->codec) { - codec = avcodec_find_decoder(st->codec->codec_id); - if (codec && (codec->capabilities & CODEC_CAP_PARSE_ONLY)) { - st->codec->parse_only = 1; - if (avcodec_open(st->codec, codec) < 0) - st->codec->parse_only = 0; - } - } -} - -static int open_input_stream(HTTPContext *c, const char *info) -{ - char buf[128]; - char input_filename[1024]; - AVFormatContext *s = NULL; - int buf_size, i, ret; - int64_t stream_pos; - - /* find file name */ - if (c->stream->feed) { - strcpy(input_filename, c->stream->feed->feed_filename); - buf_size = FFM_PACKET_SIZE; - /* compute position (absolute time) */ - if (av_find_info_tag(buf, sizeof(buf), "date", info)) { - if ((ret = av_parse_time(&stream_pos, buf, 0)) < 0) - return ret; - } else if (av_find_info_tag(buf, sizeof(buf), "buffer", info)) { - int prebuffer = strtol(buf, 0, 10); - stream_pos = av_gettime() - prebuffer * (int64_t)1000000; - } else - stream_pos = av_gettime() - c->stream->prebuffer * (int64_t)1000; - } else { - strcpy(input_filename, c->stream->feed_filename); - buf_size = 0; - /* compute position (relative time) */ - if (av_find_info_tag(buf, sizeof(buf), "date", info)) { - if ((ret = av_parse_time(&stream_pos, buf, 1)) < 0) - return ret; - } else - stream_pos = 0; - } - if (input_filename[0] == '\0') - return -1; - - /* open stream */ - if ((ret = avformat_open_input(&s, input_filename, c->stream->ifmt, &c->stream->in_opts)) < 0) { - http_log("could not open %s: %d\n", input_filename, ret); - return -1; - } - s->flags |= AVFMT_FLAG_GENPTS; - c->fmt_in = s; - if (strcmp(s->iformat->name, "ffm") && av_find_stream_info(c->fmt_in) < 0) { - http_log("Could not find stream info '%s'\n", input_filename); - av_close_input_file(s); - return -1; - } - - /* open each parser */ - for(i=0;inb_streams;i++) - open_parser(s, i); - - /* choose stream as clock source (we favorize video stream if - present) for packet sending */ - c->pts_stream_index = 0; - for(i=0;istream->nb_streams;i++) { - if (c->pts_stream_index == 0 && - c->stream->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) { - c->pts_stream_index = i; - } - } - - if (c->fmt_in->iformat->read_seek) - av_seek_frame(c->fmt_in, -1, stream_pos, 0); - /* set the start time (needed for maxtime and RTP packet timing) */ - c->start_time = cur_time; - c->first_pts = AV_NOPTS_VALUE; - return 0; -} - -/* return the server clock (in us) */ -static int64_t get_server_clock(HTTPContext *c) -{ - /* compute current pts value from system time */ - return (cur_time - c->start_time) * 1000; -} - -/* return the estimated time at which the current packet must be sent - (in us) */ -static int64_t get_packet_send_clock(HTTPContext *c) -{ - int bytes_left, bytes_sent, frame_bytes; - - frame_bytes = c->cur_frame_bytes; - if (frame_bytes <= 0) - return c->cur_pts; - else { - bytes_left = c->buffer_end - c->buffer_ptr; - bytes_sent = frame_bytes - bytes_left; - return c->cur_pts + (c->cur_frame_duration * bytes_sent) / frame_bytes; - } -} - - -static int http_prepare_data(HTTPContext *c) -{ - int i, len, ret; - AVFormatContext *ctx; - - av_freep(&c->pb_buffer); - switch(c->state) { - case HTTPSTATE_SEND_DATA_HEADER: - memset(&c->fmt_ctx, 0, sizeof(c->fmt_ctx)); - av_dict_set(&c->fmt_ctx.metadata, "author" , c->stream->author , 0); - av_dict_set(&c->fmt_ctx.metadata, "comment" , c->stream->comment , 0); - av_dict_set(&c->fmt_ctx.metadata, "copyright", c->stream->copyright, 0); - av_dict_set(&c->fmt_ctx.metadata, "title" , c->stream->title , 0); - - c->fmt_ctx.streams = av_mallocz(sizeof(AVStream *) * c->stream->nb_streams); - - for(i=0;istream->nb_streams;i++) { - AVStream *src; - c->fmt_ctx.streams[i] = av_mallocz(sizeof(AVStream)); - /* if file or feed, then just take streams from FFStream struct */ - if (!c->stream->feed || - c->stream->feed == c->stream) - src = c->stream->streams[i]; - else - src = c->stream->feed->streams[c->stream->feed_streams[i]]; - - *(c->fmt_ctx.streams[i]) = *src; - c->fmt_ctx.streams[i]->priv_data = 0; - c->fmt_ctx.streams[i]->codec->frame_number = 0; /* XXX: should be done in - AVStream, not in codec */ - } - /* set output format parameters */ - c->fmt_ctx.oformat = c->stream->fmt; - c->fmt_ctx.nb_streams = c->stream->nb_streams; - - c->got_key_frame = 0; - - /* prepare header and save header data in a stream */ - if (avio_open_dyn_buf(&c->fmt_ctx.pb) < 0) { - /* XXX: potential leak */ - return -1; - } - c->fmt_ctx.pb->seekable = 0; - - /* - * HACK to avoid mpeg ps muxer to spit many underflow errors - * Default value from Libav - * Try to set it use configuration option - */ - c->fmt_ctx.preload = (int)(0.5*AV_TIME_BASE); - c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE); - - if (avformat_write_header(&c->fmt_ctx, NULL) < 0) { - http_log("Error writing output header\n"); - return -1; - } - av_dict_free(&c->fmt_ctx.metadata); - - len = avio_close_dyn_buf(c->fmt_ctx.pb, &c->pb_buffer); - c->buffer_ptr = c->pb_buffer; - c->buffer_end = c->pb_buffer + len; - - c->state = HTTPSTATE_SEND_DATA; - c->last_packet_sent = 0; - break; - case HTTPSTATE_SEND_DATA: - /* find a new packet */ - /* read a packet from the input stream */ - if (c->stream->feed) - ffm_set_write_index(c->fmt_in, - c->stream->feed->feed_write_index, - c->stream->feed->feed_size); - - if (c->stream->max_time && - c->stream->max_time + c->start_time - cur_time < 0) - /* We have timed out */ - c->state = HTTPSTATE_SEND_DATA_TRAILER; - else { - AVPacket pkt; - redo: - ret = av_read_frame(c->fmt_in, &pkt); - if (ret < 0) { - if (c->stream->feed) { - /* if coming from feed, it means we reached the end of the - ffm file, so must wait for more data */ - c->state = HTTPSTATE_WAIT_FEED; - return 1; /* state changed */ - } else if (ret == AVERROR(EAGAIN)) { - /* input not ready, come back later */ - return 0; - } else { - if (c->stream->loop) { - av_close_input_file(c->fmt_in); - c->fmt_in = NULL; - if (open_input_stream(c, "") < 0) - goto no_loop; - goto redo; - } else { - no_loop: - /* must send trailer now because eof or error */ - c->state = HTTPSTATE_SEND_DATA_TRAILER; - } - } - } else { - int source_index = pkt.stream_index; - /* update first pts if needed */ - if (c->first_pts == AV_NOPTS_VALUE) { - c->first_pts = av_rescale_q(pkt.dts, c->fmt_in->streams[pkt.stream_index]->time_base, AV_TIME_BASE_Q); - c->start_time = cur_time; - } - /* send it to the appropriate stream */ - if (c->stream->feed) { - /* if coming from a feed, select the right stream */ - if (c->switch_pending) { - c->switch_pending = 0; - for(i=0;istream->nb_streams;i++) { - if (c->switch_feed_streams[i] == pkt.stream_index) - if (pkt.flags & AV_PKT_FLAG_KEY) - c->switch_feed_streams[i] = -1; - if (c->switch_feed_streams[i] >= 0) - c->switch_pending = 1; - } - } - for(i=0;istream->nb_streams;i++) { - if (c->stream->feed_streams[i] == pkt.stream_index) { - AVStream *st = c->fmt_in->streams[source_index]; - pkt.stream_index = i; - if (pkt.flags & AV_PKT_FLAG_KEY && - (st->codec->codec_type == AVMEDIA_TYPE_VIDEO || - c->stream->nb_streams == 1)) - c->got_key_frame = 1; - if (!c->stream->send_on_key || c->got_key_frame) - goto send_it; - } - } - } else { - AVCodecContext *codec; - AVStream *ist, *ost; - send_it: - ist = c->fmt_in->streams[source_index]; - /* specific handling for RTP: we use several - output stream (one for each RTP - connection). XXX: need more abstract handling */ - if (c->is_packetized) { - /* compute send time and duration */ - c->cur_pts = av_rescale_q(pkt.dts, ist->time_base, AV_TIME_BASE_Q); - c->cur_pts -= c->first_pts; - c->cur_frame_duration = av_rescale_q(pkt.duration, ist->time_base, AV_TIME_BASE_Q); - /* find RTP context */ - c->packet_stream_index = pkt.stream_index; - ctx = c->rtp_ctx[c->packet_stream_index]; - if(!ctx) { - av_free_packet(&pkt); - break; - } - codec = ctx->streams[0]->codec; - /* only one stream per RTP connection */ - pkt.stream_index = 0; - } else { - ctx = &c->fmt_ctx; - /* Fudge here */ - codec = ctx->streams[pkt.stream_index]->codec; - } - - if (c->is_packetized) { - int max_packet_size; - if (c->rtp_protocol == RTSP_LOWER_TRANSPORT_TCP) - max_packet_size = RTSP_TCP_MAX_PACKET_SIZE; - else - max_packet_size = url_get_max_packet_size(c->rtp_handles[c->packet_stream_index]); - ret = ffio_open_dyn_packet_buf(&ctx->pb, max_packet_size); - } else { - ret = avio_open_dyn_buf(&ctx->pb); - } - if (ret < 0) { - /* XXX: potential leak */ - return -1; - } - ost = ctx->streams[pkt.stream_index]; - - ctx->pb->seekable = 0; - if (pkt.dts != AV_NOPTS_VALUE) - pkt.dts = av_rescale_q(pkt.dts, ist->time_base, ost->time_base); - if (pkt.pts != AV_NOPTS_VALUE) - pkt.pts = av_rescale_q(pkt.pts, ist->time_base, ost->time_base); - pkt.duration = av_rescale_q(pkt.duration, ist->time_base, ost->time_base); - if (av_write_frame(ctx, &pkt) < 0) { - http_log("Error writing frame to output\n"); - c->state = HTTPSTATE_SEND_DATA_TRAILER; - } - - len = avio_close_dyn_buf(ctx->pb, &c->pb_buffer); - c->cur_frame_bytes = len; - c->buffer_ptr = c->pb_buffer; - c->buffer_end = c->pb_buffer + len; - - codec->frame_number++; - if (len == 0) { - av_free_packet(&pkt); - goto redo; - } - } - av_free_packet(&pkt); - } - } - break; - default: - case HTTPSTATE_SEND_DATA_TRAILER: - /* last packet test ? */ - if (c->last_packet_sent || c->is_packetized) - return -1; - ctx = &c->fmt_ctx; - /* prepare header */ - if (avio_open_dyn_buf(&ctx->pb) < 0) { - /* XXX: potential leak */ - return -1; - } - c->fmt_ctx.pb->seekable = 0; - av_write_trailer(ctx); - len = avio_close_dyn_buf(ctx->pb, &c->pb_buffer); - c->buffer_ptr = c->pb_buffer; - c->buffer_end = c->pb_buffer + len; - - c->last_packet_sent = 1; - break; - } - return 0; -} - -/* should convert the format at the same time */ -/* send data starting at c->buffer_ptr to the output connection - (either UDP or TCP connection) */ -static int http_send_data(HTTPContext *c) -{ - int len, ret; - - for(;;) { - if (c->buffer_ptr >= c->buffer_end) { - ret = http_prepare_data(c); - if (ret < 0) - return -1; - else if (ret != 0) - /* state change requested */ - break; - } else { - if (c->is_packetized) { - /* RTP data output */ - len = c->buffer_end - c->buffer_ptr; - if (len < 4) { - /* fail safe - should never happen */ - fail1: - c->buffer_ptr = c->buffer_end; - return 0; - } - len = (c->buffer_ptr[0] << 24) | - (c->buffer_ptr[1] << 16) | - (c->buffer_ptr[2] << 8) | - (c->buffer_ptr[3]); - if (len > (c->buffer_end - c->buffer_ptr)) - goto fail1; - if ((get_packet_send_clock(c) - get_server_clock(c)) > 0) { - /* nothing to send yet: we can wait */ - return 0; - } - - c->data_count += len; - update_datarate(&c->datarate, c->data_count); - if (c->stream) - c->stream->bytes_served += len; - - if (c->rtp_protocol == RTSP_LOWER_TRANSPORT_TCP) { - /* RTP packets are sent inside the RTSP TCP connection */ - AVIOContext *pb; - int interleaved_index, size; - uint8_t header[4]; - HTTPContext *rtsp_c; - - rtsp_c = c->rtsp_c; - /* if no RTSP connection left, error */ - if (!rtsp_c) - return -1; - /* if already sending something, then wait. */ - if (rtsp_c->state != RTSPSTATE_WAIT_REQUEST) - break; - if (avio_open_dyn_buf(&pb) < 0) - goto fail1; - interleaved_index = c->packet_stream_index * 2; - /* RTCP packets are sent at odd indexes */ - if (c->buffer_ptr[1] == 200) - interleaved_index++; - /* write RTSP TCP header */ - header[0] = '$'; - header[1] = interleaved_index; - header[2] = len >> 8; - header[3] = len; - avio_write(pb, header, 4); - /* write RTP packet data */ - c->buffer_ptr += 4; - avio_write(pb, c->buffer_ptr, len); - size = avio_close_dyn_buf(pb, &c->packet_buffer); - /* prepare asynchronous TCP sending */ - rtsp_c->packet_buffer_ptr = c->packet_buffer; - rtsp_c->packet_buffer_end = c->packet_buffer + size; - c->buffer_ptr += len; - - /* send everything we can NOW */ - len = send(rtsp_c->fd, rtsp_c->packet_buffer_ptr, - rtsp_c->packet_buffer_end - rtsp_c->packet_buffer_ptr, 0); - if (len > 0) - rtsp_c->packet_buffer_ptr += len; - if (rtsp_c->packet_buffer_ptr < rtsp_c->packet_buffer_end) { - /* if we could not send all the data, we will - send it later, so a new state is needed to - "lock" the RTSP TCP connection */ - rtsp_c->state = RTSPSTATE_SEND_PACKET; - break; - } else - /* all data has been sent */ - av_freep(&c->packet_buffer); - } else { - /* send RTP packet directly in UDP */ - c->buffer_ptr += 4; - url_write(c->rtp_handles[c->packet_stream_index], - c->buffer_ptr, len); - c->buffer_ptr += len; - /* here we continue as we can send several packets per 10 ms slot */ - } - } else { - /* TCP data output */ - len = send(c->fd, c->buffer_ptr, c->buffer_end - c->buffer_ptr, 0); - if (len < 0) { - if (ff_neterrno() != AVERROR(EAGAIN) && - ff_neterrno() != AVERROR(EINTR)) - /* error : close connection */ - return -1; - else - return 0; - } else - c->buffer_ptr += len; - - c->data_count += len; - update_datarate(&c->datarate, c->data_count); - if (c->stream) - c->stream->bytes_served += len; - break; - } - } - } /* for(;;) */ - return 0; -} - -static int http_start_receive_data(HTTPContext *c) -{ - int fd; - - if (c->stream->feed_opened) - return -1; - - /* Don't permit writing to this one */ - if (c->stream->readonly) - return -1; - - /* open feed */ - fd = open(c->stream->feed_filename, O_RDWR); - if (fd < 0) { - http_log("Error opening feeder file: %s\n", strerror(errno)); - return -1; - } - c->feed_fd = fd; - - if (c->stream->truncate) { - /* truncate feed file */ - ffm_write_write_index(c->feed_fd, FFM_PACKET_SIZE); - ftruncate(c->feed_fd, FFM_PACKET_SIZE); - http_log("Truncating feed file '%s'\n", c->stream->feed_filename); - } else { - if ((c->stream->feed_write_index = ffm_read_write_index(fd)) < 0) { - http_log("Error reading write index from feed file: %s\n", strerror(errno)); - return -1; - } - } - - c->stream->feed_write_index = FFMAX(ffm_read_write_index(fd), FFM_PACKET_SIZE); - c->stream->feed_size = lseek(fd, 0, SEEK_END); - lseek(fd, 0, SEEK_SET); - - /* init buffer input */ - c->buffer_ptr = c->buffer; - c->buffer_end = c->buffer + FFM_PACKET_SIZE; - c->stream->feed_opened = 1; - c->chunked_encoding = !!av_stristr(c->buffer, "Transfer-Encoding: chunked"); - return 0; -} - -static int http_receive_data(HTTPContext *c) -{ - HTTPContext *c1; - int len, loop_run = 0; - - while (c->chunked_encoding && !c->chunk_size && - c->buffer_end > c->buffer_ptr) { - /* read chunk header, if present */ - len = recv(c->fd, c->buffer_ptr, 1, 0); - - if (len < 0) { - if (ff_neterrno() != AVERROR(EAGAIN) && - ff_neterrno() != AVERROR(EINTR)) - /* error : close connection */ - goto fail; - return 0; - } else if (len == 0) { - /* end of connection : close it */ - goto fail; - } else if (c->buffer_ptr - c->buffer >= 2 && - !memcmp(c->buffer_ptr - 1, "\r\n", 2)) { - c->chunk_size = strtol(c->buffer, 0, 16); - if (c->chunk_size == 0) // end of stream - goto fail; - c->buffer_ptr = c->buffer; - break; - } else if (++loop_run > 10) { - /* no chunk header, abort */ - goto fail; - } else { - c->buffer_ptr++; - } - } - - if (c->buffer_end > c->buffer_ptr) { - len = recv(c->fd, c->buffer_ptr, - FFMIN(c->chunk_size, c->buffer_end - c->buffer_ptr), 0); - if (len < 0) { - if (ff_neterrno() != AVERROR(EAGAIN) && - ff_neterrno() != AVERROR(EINTR)) - /* error : close connection */ - goto fail; - } else if (len == 0) - /* end of connection : close it */ - goto fail; - else { - c->chunk_size -= len; - c->buffer_ptr += len; - c->data_count += len; - update_datarate(&c->datarate, c->data_count); - } - } - - if (c->buffer_ptr - c->buffer >= 2 && c->data_count > FFM_PACKET_SIZE) { - if (c->buffer[0] != 'f' || - c->buffer[1] != 'm') { - http_log("Feed stream has become desynchronized -- disconnecting\n"); - goto fail; - } - } - - if (c->buffer_ptr >= c->buffer_end) { - FFStream *feed = c->stream; - /* a packet has been received : write it in the store, except - if header */ - if (c->data_count > FFM_PACKET_SIZE) { - - // printf("writing pos=0x%"PRIx64" size=0x%"PRIx64"\n", feed->feed_write_index, feed->feed_size); - /* XXX: use llseek or url_seek */ - lseek(c->feed_fd, feed->feed_write_index, SEEK_SET); - if (write(c->feed_fd, c->buffer, FFM_PACKET_SIZE) < 0) { - http_log("Error writing to feed file: %s\n", strerror(errno)); - goto fail; - } - - feed->feed_write_index += FFM_PACKET_SIZE; - /* update file size */ - if (feed->feed_write_index > c->stream->feed_size) - feed->feed_size = feed->feed_write_index; - - /* handle wrap around if max file size reached */ - if (c->stream->feed_max_size && feed->feed_write_index >= c->stream->feed_max_size) - feed->feed_write_index = FFM_PACKET_SIZE; - - /* write index */ - if (ffm_write_write_index(c->feed_fd, feed->feed_write_index) < 0) { - http_log("Error writing index to feed file: %s\n", strerror(errno)); - goto fail; - } - - /* wake up any waiting connections */ - for(c1 = first_http_ctx; c1 != NULL; c1 = c1->next) { - if (c1->state == HTTPSTATE_WAIT_FEED && - c1->stream->feed == c->stream->feed) - c1->state = HTTPSTATE_SEND_DATA; - } - } else { - /* We have a header in our hands that contains useful data */ - AVFormatContext *s = avformat_alloc_context(); - AVIOContext *pb; - AVInputFormat *fmt_in; - int i; - - if (!s) - goto fail; - - /* use feed output format name to find corresponding input format */ - fmt_in = av_find_input_format(feed->fmt->name); - if (!fmt_in) - goto fail; - - pb = avio_alloc_context(c->buffer, c->buffer_end - c->buffer, - 0, NULL, NULL, NULL, NULL); - pb->seekable = 0; - - s->pb = pb; - if (avformat_open_input(&s, c->stream->feed_filename, fmt_in, NULL) < 0) { - av_free(pb); - goto fail; - } - - /* Now we have the actual streams */ - if (s->nb_streams != feed->nb_streams) { - av_close_input_stream(s); - av_free(pb); - http_log("Feed '%s' stream number does not match registered feed\n", - c->stream->feed_filename); - goto fail; - } - - for (i = 0; i < s->nb_streams; i++) { - AVStream *fst = feed->streams[i]; - AVStream *st = s->streams[i]; - avcodec_copy_context(fst->codec, st->codec); - } - - av_close_input_stream(s); - av_free(pb); - } - c->buffer_ptr = c->buffer; - } - - return 0; - fail: - c->stream->feed_opened = 0; - close(c->feed_fd); - /* wake up any waiting connections to stop waiting for feed */ - for(c1 = first_http_ctx; c1 != NULL; c1 = c1->next) { - if (c1->state == HTTPSTATE_WAIT_FEED && - c1->stream->feed == c->stream->feed) - c1->state = HTTPSTATE_SEND_DATA_TRAILER; - } - return -1; -} - -/********************************************************************/ -/* RTSP handling */ - -static void rtsp_reply_header(HTTPContext *c, enum RTSPStatusCode error_number) -{ - const char *str; - time_t ti; - struct tm *tm; - char buf2[32]; - - switch(error_number) { - case RTSP_STATUS_OK: - str = "OK"; - break; - case RTSP_STATUS_METHOD: - str = "Method Not Allowed"; - break; - case RTSP_STATUS_BANDWIDTH: - str = "Not Enough Bandwidth"; - break; - case RTSP_STATUS_SESSION: - str = "Session Not Found"; - break; - case RTSP_STATUS_STATE: - str = "Method Not Valid in This State"; - break; - case RTSP_STATUS_AGGREGATE: - str = "Aggregate operation not allowed"; - break; - case RTSP_STATUS_ONLY_AGGREGATE: - str = "Only aggregate operation allowed"; - break; - case RTSP_STATUS_TRANSPORT: - str = "Unsupported transport"; - break; - case RTSP_STATUS_INTERNAL: - str = "Internal Server Error"; - break; - case RTSP_STATUS_SERVICE: - str = "Service Unavailable"; - break; - case RTSP_STATUS_VERSION: - str = "RTSP Version not supported"; - break; - default: - str = "Unknown Error"; - break; - } - - avio_printf(c->pb, "RTSP/1.0 %d %s\r\n", error_number, str); - avio_printf(c->pb, "CSeq: %d\r\n", c->seq); - - /* output GMT time */ - ti = time(NULL); - tm = gmtime(&ti); - strftime(buf2, sizeof(buf2), "%a, %d %b %Y %H:%M:%S", tm); - avio_printf(c->pb, "Date: %s GMT\r\n", buf2); -} - -static void rtsp_reply_error(HTTPContext *c, enum RTSPStatusCode error_number) -{ - rtsp_reply_header(c, error_number); - avio_printf(c->pb, "\r\n"); -} - -static int rtsp_parse_request(HTTPContext *c) -{ - const char *p, *p1, *p2; - char cmd[32]; - char url[1024]; - char protocol[32]; - char line[1024]; - int len; - RTSPMessageHeader header1, *header = &header1; - - c->buffer_ptr[0] = '\0'; - p = c->buffer; - - get_word(cmd, sizeof(cmd), &p); - get_word(url, sizeof(url), &p); - get_word(protocol, sizeof(protocol), &p); - - av_strlcpy(c->method, cmd, sizeof(c->method)); - av_strlcpy(c->url, url, sizeof(c->url)); - av_strlcpy(c->protocol, protocol, sizeof(c->protocol)); - - if (avio_open_dyn_buf(&c->pb) < 0) { - /* XXX: cannot do more */ - c->pb = NULL; /* safety */ - return -1; - } - - /* check version name */ - if (strcmp(protocol, "RTSP/1.0") != 0) { - rtsp_reply_error(c, RTSP_STATUS_VERSION); - goto the_end; - } - - /* parse each header line */ - memset(header, 0, sizeof(*header)); - /* skip to next line */ - while (*p != '\n' && *p != '\0') - p++; - if (*p == '\n') - p++; - while (*p != '\0') { - p1 = memchr(p, '\n', (char *)c->buffer_ptr - p); - if (!p1) - break; - p2 = p1; - if (p2 > p && p2[-1] == '\r') - p2--; - /* skip empty line */ - if (p2 == p) - break; - len = p2 - p; - if (len > sizeof(line) - 1) - len = sizeof(line) - 1; - memcpy(line, p, len); - line[len] = '\0'; - ff_rtsp_parse_line(header, line, NULL, NULL); - p = p1 + 1; - } - - /* handle sequence number */ - c->seq = header->seq; - - if (!strcmp(cmd, "DESCRIBE")) - rtsp_cmd_describe(c, url); - else if (!strcmp(cmd, "OPTIONS")) - rtsp_cmd_options(c, url); - else if (!strcmp(cmd, "SETUP")) - rtsp_cmd_setup(c, url, header); - else if (!strcmp(cmd, "PLAY")) - rtsp_cmd_play(c, url, header); - else if (!strcmp(cmd, "PAUSE")) - rtsp_cmd_pause(c, url, header); - else if (!strcmp(cmd, "TEARDOWN")) - rtsp_cmd_teardown(c, url, header); - else - rtsp_reply_error(c, RTSP_STATUS_METHOD); - - the_end: - len = avio_close_dyn_buf(c->pb, &c->pb_buffer); - c->pb = NULL; /* safety */ - if (len < 0) { - /* XXX: cannot do more */ - return -1; - } - c->buffer_ptr = c->pb_buffer; - c->buffer_end = c->pb_buffer + len; - c->state = RTSPSTATE_SEND_REPLY; - return 0; -} - -static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, - struct in_addr my_ip) -{ - AVFormatContext *avc; - AVStream *avs = NULL; - int i; - - avc = avformat_alloc_context(); - if (avc == NULL) { - return -1; - } - av_dict_set(&avc->metadata, "title", - stream->title[0] ? stream->title : "No Title", 0); - avc->nb_streams = stream->nb_streams; - if (stream->is_multicast) { - snprintf(avc->filename, 1024, "rtp://%s:%d?multicast=1?ttl=%d", - inet_ntoa(stream->multicast_ip), - stream->multicast_port, stream->multicast_ttl); - } else { - snprintf(avc->filename, 1024, "rtp://0.0.0.0"); - } - - if (avc->nb_streams >= INT_MAX/sizeof(*avc->streams) || - !(avc->streams = av_malloc(avc->nb_streams * sizeof(*avc->streams)))) - goto sdp_done; - if (avc->nb_streams >= INT_MAX/sizeof(*avs) || - !(avs = av_malloc(avc->nb_streams * sizeof(*avs)))) - goto sdp_done; - - for(i = 0; i < stream->nb_streams; i++) { - avc->streams[i] = &avs[i]; - avc->streams[i]->codec = stream->streams[i]->codec; - } - *pbuffer = av_mallocz(2048); - av_sdp_create(&avc, 1, *pbuffer, 2048); - - sdp_done: - av_free(avc->streams); - av_dict_free(&avc->metadata); - av_free(avc); - av_free(avs); - - return strlen(*pbuffer); -} - -static void rtsp_cmd_options(HTTPContext *c, const char *url) -{ -// rtsp_reply_header(c, RTSP_STATUS_OK); - avio_printf(c->pb, "RTSP/1.0 %d %s\r\n", RTSP_STATUS_OK, "OK"); - avio_printf(c->pb, "CSeq: %d\r\n", c->seq); - avio_printf(c->pb, "Public: %s\r\n", "OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE"); - avio_printf(c->pb, "\r\n"); -} - -static void rtsp_cmd_describe(HTTPContext *c, const char *url) -{ - FFStream *stream; - char path1[1024]; - const char *path; - uint8_t *content; - int content_length, len; - struct sockaddr_in my_addr; - - /* find which url is asked */ - av_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); - path = path1; - if (*path == '/') - path++; - - for(stream = first_stream; stream != NULL; stream = stream->next) { - if (!stream->is_feed && - stream->fmt && !strcmp(stream->fmt->name, "rtp") && - !strcmp(path, stream->filename)) { - goto found; - } - } - /* no stream found */ - rtsp_reply_error(c, RTSP_STATUS_SERVICE); /* XXX: right error ? */ - return; - - found: - /* prepare the media description in sdp format */ - - /* get the host IP */ - len = sizeof(my_addr); - getsockname(c->fd, (struct sockaddr *)&my_addr, &len); - content_length = prepare_sdp_description(stream, &content, my_addr.sin_addr); - if (content_length < 0) { - rtsp_reply_error(c, RTSP_STATUS_INTERNAL); - return; - } - rtsp_reply_header(c, RTSP_STATUS_OK); - avio_printf(c->pb, "Content-Base: %s/\r\n", url); - avio_printf(c->pb, "Content-Type: application/sdp\r\n"); - avio_printf(c->pb, "Content-Length: %d\r\n", content_length); - avio_printf(c->pb, "\r\n"); - avio_write(c->pb, content, content_length); - av_free(content); -} - -static HTTPContext *find_rtp_session(const char *session_id) -{ - HTTPContext *c; - - if (session_id[0] == '\0') - return NULL; - - for(c = first_http_ctx; c != NULL; c = c->next) { - if (!strcmp(c->session_id, session_id)) - return c; - } - return NULL; -} - -static RTSPTransportField *find_transport(RTSPMessageHeader *h, enum RTSPLowerTransport lower_transport) -{ - RTSPTransportField *th; - int i; - - for(i=0;inb_transports;i++) { - th = &h->transports[i]; - if (th->lower_transport == lower_transport) - return th; - } - return NULL; -} - -static void rtsp_cmd_setup(HTTPContext *c, const char *url, - RTSPMessageHeader *h) -{ - FFStream *stream; - int stream_index, rtp_port, rtcp_port; - char buf[1024]; - char path1[1024]; - const char *path; - HTTPContext *rtp_c; - RTSPTransportField *th; - struct sockaddr_in dest_addr; - RTSPActionServerSetup setup; - - /* find which url is asked */ - av_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); - path = path1; - if (*path == '/') - path++; - - /* now check each stream */ - for(stream = first_stream; stream != NULL; stream = stream->next) { - if (!stream->is_feed && - stream->fmt && !strcmp(stream->fmt->name, "rtp")) { - /* accept aggregate filenames only if single stream */ - if (!strcmp(path, stream->filename)) { - if (stream->nb_streams != 1) { - rtsp_reply_error(c, RTSP_STATUS_AGGREGATE); - return; - } - stream_index = 0; - goto found; - } - - for(stream_index = 0; stream_index < stream->nb_streams; - stream_index++) { - snprintf(buf, sizeof(buf), "%s/streamid=%d", - stream->filename, stream_index); - if (!strcmp(path, buf)) - goto found; - } - } - } - /* no stream found */ - rtsp_reply_error(c, RTSP_STATUS_SERVICE); /* XXX: right error ? */ - return; - found: - - /* generate session id if needed */ - if (h->session_id[0] == '\0') - snprintf(h->session_id, sizeof(h->session_id), "%08x%08x", - av_lfg_get(&random_state), av_lfg_get(&random_state)); - - /* find rtp session, and create it if none found */ - rtp_c = find_rtp_session(h->session_id); - if (!rtp_c) { - /* always prefer UDP */ - th = find_transport(h, RTSP_LOWER_TRANSPORT_UDP); - if (!th) { - th = find_transport(h, RTSP_LOWER_TRANSPORT_TCP); - if (!th) { - rtsp_reply_error(c, RTSP_STATUS_TRANSPORT); - return; - } - } - - rtp_c = rtp_new_connection(&c->from_addr, stream, h->session_id, - th->lower_transport); - if (!rtp_c) { - rtsp_reply_error(c, RTSP_STATUS_BANDWIDTH); - return; - } - - /* open input stream */ - if (open_input_stream(rtp_c, "") < 0) { - rtsp_reply_error(c, RTSP_STATUS_INTERNAL); - return; - } - } - - /* test if stream is OK (test needed because several SETUP needs - to be done for a given file) */ - if (rtp_c->stream != stream) { - rtsp_reply_error(c, RTSP_STATUS_SERVICE); - return; - } - - /* test if stream is already set up */ - if (rtp_c->rtp_ctx[stream_index]) { - rtsp_reply_error(c, RTSP_STATUS_STATE); - return; - } - - /* check transport */ - th = find_transport(h, rtp_c->rtp_protocol); - if (!th || (th->lower_transport == RTSP_LOWER_TRANSPORT_UDP && - th->client_port_min <= 0)) { - rtsp_reply_error(c, RTSP_STATUS_TRANSPORT); - return; - } - - /* setup default options */ - setup.transport_option[0] = '\0'; - dest_addr = rtp_c->from_addr; - dest_addr.sin_port = htons(th->client_port_min); - - /* setup stream */ - if (rtp_new_av_stream(rtp_c, stream_index, &dest_addr, c) < 0) { - rtsp_reply_error(c, RTSP_STATUS_TRANSPORT); - return; - } - - /* now everything is OK, so we can send the connection parameters */ - rtsp_reply_header(c, RTSP_STATUS_OK); - /* session ID */ - avio_printf(c->pb, "Session: %s\r\n", rtp_c->session_id); - - switch(rtp_c->rtp_protocol) { - case RTSP_LOWER_TRANSPORT_UDP: - rtp_port = rtp_get_local_rtp_port(rtp_c->rtp_handles[stream_index]); - rtcp_port = rtp_get_local_rtcp_port(rtp_c->rtp_handles[stream_index]); - avio_printf(c->pb, "Transport: RTP/AVP/UDP;unicast;" - "client_port=%d-%d;server_port=%d-%d", - th->client_port_min, th->client_port_max, - rtp_port, rtcp_port); - break; - case RTSP_LOWER_TRANSPORT_TCP: - avio_printf(c->pb, "Transport: RTP/AVP/TCP;interleaved=%d-%d", - stream_index * 2, stream_index * 2 + 1); - break; - default: - break; - } - if (setup.transport_option[0] != '\0') - avio_printf(c->pb, ";%s", setup.transport_option); - avio_printf(c->pb, "\r\n"); - - - avio_printf(c->pb, "\r\n"); -} - - -/* find an rtp connection by using the session ID. Check consistency - with filename */ -static HTTPContext *find_rtp_session_with_url(const char *url, - const char *session_id) -{ - HTTPContext *rtp_c; - char path1[1024]; - const char *path; - char buf[1024]; - int s, len; - - rtp_c = find_rtp_session(session_id); - if (!rtp_c) - return NULL; - - /* find which url is asked */ - av_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); - path = path1; - if (*path == '/') - path++; - if(!strcmp(path, rtp_c->stream->filename)) return rtp_c; - for(s=0; sstream->nb_streams; ++s) { - snprintf(buf, sizeof(buf), "%s/streamid=%d", - rtp_c->stream->filename, s); - if(!strncmp(path, buf, sizeof(buf))) { - // XXX: Should we reply with RTSP_STATUS_ONLY_AGGREGATE if nb_streams>1? - return rtp_c; - } - } - len = strlen(path); - if (len > 0 && path[len - 1] == '/' && - !strncmp(path, rtp_c->stream->filename, len - 1)) - return rtp_c; - return NULL; -} - -static void rtsp_cmd_play(HTTPContext *c, const char *url, RTSPMessageHeader *h) -{ - HTTPContext *rtp_c; - - rtp_c = find_rtp_session_with_url(url, h->session_id); - if (!rtp_c) { - rtsp_reply_error(c, RTSP_STATUS_SESSION); - return; - } - - if (rtp_c->state != HTTPSTATE_SEND_DATA && - rtp_c->state != HTTPSTATE_WAIT_FEED && - rtp_c->state != HTTPSTATE_READY) { - rtsp_reply_error(c, RTSP_STATUS_STATE); - return; - } - - rtp_c->state = HTTPSTATE_SEND_DATA; - - /* now everything is OK, so we can send the connection parameters */ - rtsp_reply_header(c, RTSP_STATUS_OK); - /* session ID */ - avio_printf(c->pb, "Session: %s\r\n", rtp_c->session_id); - avio_printf(c->pb, "\r\n"); -} - -static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPMessageHeader *h) -{ - HTTPContext *rtp_c; - - rtp_c = find_rtp_session_with_url(url, h->session_id); - if (!rtp_c) { - rtsp_reply_error(c, RTSP_STATUS_SESSION); - return; - } - - if (rtp_c->state != HTTPSTATE_SEND_DATA && - rtp_c->state != HTTPSTATE_WAIT_FEED) { - rtsp_reply_error(c, RTSP_STATUS_STATE); - return; - } - - rtp_c->state = HTTPSTATE_READY; - rtp_c->first_pts = AV_NOPTS_VALUE; - /* now everything is OK, so we can send the connection parameters */ - rtsp_reply_header(c, RTSP_STATUS_OK); - /* session ID */ - avio_printf(c->pb, "Session: %s\r\n", rtp_c->session_id); - avio_printf(c->pb, "\r\n"); -} - -static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPMessageHeader *h) -{ - HTTPContext *rtp_c; - - rtp_c = find_rtp_session_with_url(url, h->session_id); - if (!rtp_c) { - rtsp_reply_error(c, RTSP_STATUS_SESSION); - return; - } - - /* now everything is OK, so we can send the connection parameters */ - rtsp_reply_header(c, RTSP_STATUS_OK); - /* session ID */ - avio_printf(c->pb, "Session: %s\r\n", rtp_c->session_id); - avio_printf(c->pb, "\r\n"); - - /* abort the session */ - close_connection(rtp_c); -} - - -/********************************************************************/ -/* RTP handling */ - -static HTTPContext *rtp_new_connection(struct sockaddr_in *from_addr, - FFStream *stream, const char *session_id, - enum RTSPLowerTransport rtp_protocol) -{ - HTTPContext *c = NULL; - const char *proto_str; - - /* XXX: should output a warning page when coming - close to the connection limit */ - if (nb_connections >= nb_max_connections) - goto fail; - - /* add a new connection */ - c = av_mallocz(sizeof(HTTPContext)); - if (!c) - goto fail; - - c->fd = -1; - c->poll_entry = NULL; - c->from_addr = *from_addr; - c->buffer_size = IOBUFFER_INIT_SIZE; - c->buffer = av_malloc(c->buffer_size); - if (!c->buffer) - goto fail; - nb_connections++; - c->stream = stream; - av_strlcpy(c->session_id, session_id, sizeof(c->session_id)); - c->state = HTTPSTATE_READY; - c->is_packetized = 1; - c->rtp_protocol = rtp_protocol; - - /* protocol is shown in statistics */ - switch(c->rtp_protocol) { - case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: - proto_str = "MCAST"; - break; - case RTSP_LOWER_TRANSPORT_UDP: - proto_str = "UDP"; - break; - case RTSP_LOWER_TRANSPORT_TCP: - proto_str = "TCP"; - break; - default: - proto_str = "???"; - break; - } - av_strlcpy(c->protocol, "RTP/", sizeof(c->protocol)); - av_strlcat(c->protocol, proto_str, sizeof(c->protocol)); - - current_bandwidth += stream->bandwidth; - - c->next = first_http_ctx; - first_http_ctx = c; - return c; - - fail: - if (c) { - av_free(c->buffer); - av_free(c); - } - return NULL; -} - -/* add a new RTP stream in an RTP connection (used in RTSP SETUP - command). If RTP/TCP protocol is used, TCP connection 'rtsp_c' is - used. */ -static int rtp_new_av_stream(HTTPContext *c, - int stream_index, struct sockaddr_in *dest_addr, - HTTPContext *rtsp_c) -{ - AVFormatContext *ctx; - AVStream *st; - char *ipaddr; - URLContext *h = NULL; - uint8_t *dummy_buf; - int max_packet_size; - - /* now we can open the relevant output stream */ - ctx = avformat_alloc_context(); - if (!ctx) - return -1; - ctx->oformat = av_guess_format("rtp", NULL, NULL); - - st = av_mallocz(sizeof(AVStream)); - if (!st) - goto fail; - ctx->nb_streams = 1; - ctx->streams = av_mallocz(sizeof(AVStream *) * ctx->nb_streams); - if (!ctx->streams) - goto fail; - ctx->streams[0] = st; - - if (!c->stream->feed || - c->stream->feed == c->stream) - memcpy(st, c->stream->streams[stream_index], sizeof(AVStream)); - else - memcpy(st, - c->stream->feed->streams[c->stream->feed_streams[stream_index]], - sizeof(AVStream)); - st->priv_data = NULL; - - /* build destination RTP address */ - ipaddr = inet_ntoa(dest_addr->sin_addr); - - switch(c->rtp_protocol) { - case RTSP_LOWER_TRANSPORT_UDP: - case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: - /* RTP/UDP case */ - - /* XXX: also pass as parameter to function ? */ - if (c->stream->is_multicast) { - int ttl; - ttl = c->stream->multicast_ttl; - if (!ttl) - ttl = 16; - snprintf(ctx->filename, sizeof(ctx->filename), - "rtp://%s:%d?multicast=1&ttl=%d", - ipaddr, ntohs(dest_addr->sin_port), ttl); - } else { - snprintf(ctx->filename, sizeof(ctx->filename), - "rtp://%s:%d", ipaddr, ntohs(dest_addr->sin_port)); - } - - if (url_open(&h, ctx->filename, AVIO_FLAG_WRITE) < 0) - goto fail; - c->rtp_handles[stream_index] = h; - max_packet_size = url_get_max_packet_size(h); - break; - case RTSP_LOWER_TRANSPORT_TCP: - /* RTP/TCP case */ - c->rtsp_c = rtsp_c; - max_packet_size = RTSP_TCP_MAX_PACKET_SIZE; - break; - default: - goto fail; - } - - http_log("%s:%d - - \"PLAY %s/streamid=%d %s\"\n", - ipaddr, ntohs(dest_addr->sin_port), - c->stream->filename, stream_index, c->protocol); - - /* normally, no packets should be output here, but the packet size may be checked */ - if (ffio_open_dyn_packet_buf(&ctx->pb, max_packet_size) < 0) { - /* XXX: close stream */ - goto fail; - } - if (avformat_write_header(ctx, NULL) < 0) { - fail: - if (h) - url_close(h); - av_free(ctx); - return -1; - } - avio_close_dyn_buf(ctx->pb, &dummy_buf); - av_free(dummy_buf); - - c->rtp_ctx[stream_index] = ctx; - return 0; -} - -/********************************************************************/ -/* ffserver initialization */ - -static AVStream *add_av_stream1(FFStream *stream, AVCodecContext *codec, int copy) -{ - AVStream *fst; - - fst = av_mallocz(sizeof(AVStream)); - if (!fst) - return NULL; - if (copy) { - fst->codec= avcodec_alloc_context(); - memcpy(fst->codec, codec, sizeof(AVCodecContext)); - if (codec->extradata_size) { - fst->codec->extradata = av_malloc(codec->extradata_size); - memcpy(fst->codec->extradata, codec->extradata, - codec->extradata_size); - } - } else { - /* live streams must use the actual feed's codec since it may be - * updated later to carry extradata needed by the streams. - */ - fst->codec = codec; - } - fst->priv_data = av_mallocz(sizeof(FeedData)); - fst->index = stream->nb_streams; - av_set_pts_info(fst, 33, 1, 90000); - fst->sample_aspect_ratio = codec->sample_aspect_ratio; - stream->streams[stream->nb_streams++] = fst; - return fst; -} - -/* return the stream number in the feed */ -static int add_av_stream(FFStream *feed, AVStream *st) -{ - AVStream *fst; - AVCodecContext *av, *av1; - int i; - - av = st->codec; - for(i=0;inb_streams;i++) { - st = feed->streams[i]; - av1 = st->codec; - if (av1->codec_id == av->codec_id && - av1->codec_type == av->codec_type && - av1->bit_rate == av->bit_rate) { - - switch(av->codec_type) { - case AVMEDIA_TYPE_AUDIO: - if (av1->channels == av->channels && - av1->sample_rate == av->sample_rate) - goto found; - break; - case AVMEDIA_TYPE_VIDEO: - if (av1->width == av->width && - av1->height == av->height && - av1->time_base.den == av->time_base.den && - av1->time_base.num == av->time_base.num && - av1->gop_size == av->gop_size) - goto found; - break; - default: - abort(); - } - } - } - - fst = add_av_stream1(feed, av, 0); - if (!fst) - return -1; - return feed->nb_streams - 1; - found: - return i; -} - -static void remove_stream(FFStream *stream) -{ - FFStream **ps; - ps = &first_stream; - while (*ps != NULL) { - if (*ps == stream) - *ps = (*ps)->next; - else - ps = &(*ps)->next; - } -} - -/* specific mpeg4 handling : we extract the raw parameters */ -static void extract_mpeg4_header(AVFormatContext *infile) -{ - int mpeg4_count, i, size; - AVPacket pkt; - AVStream *st; - const uint8_t *p; - - mpeg4_count = 0; - for(i=0;inb_streams;i++) { - st = infile->streams[i]; - if (st->codec->codec_id == CODEC_ID_MPEG4 && - st->codec->extradata_size == 0) { - mpeg4_count++; - } - } - if (!mpeg4_count) - return; - - printf("MPEG4 without extra data: trying to find header in %s\n", infile->filename); - while (mpeg4_count > 0) { - if (av_read_packet(infile, &pkt) < 0) - break; - st = infile->streams[pkt.stream_index]; - if (st->codec->codec_id == CODEC_ID_MPEG4 && - st->codec->extradata_size == 0) { - av_freep(&st->codec->extradata); - /* fill extradata with the header */ - /* XXX: we make hard suppositions here ! */ - p = pkt.data; - while (p < pkt.data + pkt.size - 4) { - /* stop when vop header is found */ - if (p[0] == 0x00 && p[1] == 0x00 && - p[2] == 0x01 && p[3] == 0xb6) { - size = p - pkt.data; - // av_hex_dump_log(infile, AV_LOG_DEBUG, pkt.data, size); - st->codec->extradata = av_malloc(size); - st->codec->extradata_size = size; - memcpy(st->codec->extradata, pkt.data, size); - break; - } - p++; - } - mpeg4_count--; - } - av_free_packet(&pkt); - } -} - -/* compute the needed AVStream for each file */ -static void build_file_streams(void) -{ - FFStream *stream, *stream_next; - int i, ret; - - /* gather all streams */ - for(stream = first_stream; stream != NULL; stream = stream_next) { - AVFormatContext *infile = NULL; - stream_next = stream->next; - if (stream->stream_type == STREAM_TYPE_LIVE && - !stream->feed) { - /* the stream comes from a file */ - /* try to open the file */ - /* open stream */ - if (stream->fmt && !strcmp(stream->fmt->name, "rtp")) { - /* specific case : if transport stream output to RTP, - we use a raw transport stream reader */ - av_dict_set(&stream->in_opts, "mpeg2ts_compute_pcr", "1", 0); - } - - http_log("Opening file '%s'\n", stream->feed_filename); - if ((ret = avformat_open_input(&infile, stream->feed_filename, stream->ifmt, &stream->in_opts)) < 0) { - http_log("Could not open '%s': %d\n", stream->feed_filename, ret); - /* remove stream (no need to spend more time on it) */ - fail: - remove_stream(stream); - } else { - /* find all the AVStreams inside and reference them in - 'stream' */ - if (av_find_stream_info(infile) < 0) { - http_log("Could not find codec parameters from '%s'\n", - stream->feed_filename); - av_close_input_file(infile); - goto fail; - } - extract_mpeg4_header(infile); - - for(i=0;inb_streams;i++) - add_av_stream1(stream, infile->streams[i]->codec, 1); - - av_close_input_file(infile); - } - } - } -} - -/* compute the needed AVStream for each feed */ -static void build_feed_streams(void) -{ - FFStream *stream, *feed; - int i; - - /* gather all streams */ - for(stream = first_stream; stream != NULL; stream = stream->next) { - feed = stream->feed; - if (feed) { - if (!stream->is_feed) { - /* we handle a stream coming from a feed */ - for(i=0;inb_streams;i++) - stream->feed_streams[i] = add_av_stream(feed, stream->streams[i]); - } - } - } - - /* gather all streams */ - for(stream = first_stream; stream != NULL; stream = stream->next) { - feed = stream->feed; - if (feed) { - if (stream->is_feed) { - for(i=0;inb_streams;i++) - stream->feed_streams[i] = i; - } - } - } - - /* create feed files if needed */ - for(feed = first_feed; feed != NULL; feed = feed->next_feed) { - int fd; - - if (avio_check(feed->feed_filename, AVIO_FLAG_READ) > 0) { - /* See if it matches */ - AVFormatContext *s = NULL; - int matches = 0; - - if (avformat_open_input(&s, feed->feed_filename, NULL, NULL) >= 0) { - /* Now see if it matches */ - if (s->nb_streams == feed->nb_streams) { - matches = 1; - for(i=0;inb_streams;i++) { - AVStream *sf, *ss; - sf = feed->streams[i]; - ss = s->streams[i]; - - if (sf->index != ss->index || - sf->id != ss->id) { - http_log("Index & Id do not match for stream %d (%s)\n", - i, feed->feed_filename); - matches = 0; - } else { - AVCodecContext *ccf, *ccs; - - ccf = sf->codec; - ccs = ss->codec; -#define CHECK_CODEC(x) (ccf->x != ccs->x) - - if (CHECK_CODEC(codec_id) || CHECK_CODEC(codec_type)) { - http_log("Codecs do not match for stream %d\n", i); - matches = 0; - } else if (CHECK_CODEC(bit_rate) || CHECK_CODEC(flags)) { - http_log("Codec bitrates do not match for stream %d\n", i); - matches = 0; - } else if (ccf->codec_type == AVMEDIA_TYPE_VIDEO) { - if (CHECK_CODEC(time_base.den) || - CHECK_CODEC(time_base.num) || - CHECK_CODEC(width) || - CHECK_CODEC(height)) { - http_log("Codec width, height and framerate do not match for stream %d\n", i); - matches = 0; - } - } else if (ccf->codec_type == AVMEDIA_TYPE_AUDIO) { - if (CHECK_CODEC(sample_rate) || - CHECK_CODEC(channels) || - CHECK_CODEC(frame_size)) { - http_log("Codec sample_rate, channels, frame_size do not match for stream %d\n", i); - matches = 0; - } - } else { - http_log("Unknown codec type\n"); - matches = 0; - } - } - if (!matches) - break; - } - } else - http_log("Deleting feed file '%s' as stream counts differ (%d != %d)\n", - feed->feed_filename, s->nb_streams, feed->nb_streams); - - av_close_input_file(s); - } else - http_log("Deleting feed file '%s' as it appears to be corrupt\n", - feed->feed_filename); - - if (!matches) { - if (feed->readonly) { - http_log("Unable to delete feed file '%s' as it is marked readonly\n", - feed->feed_filename); - exit(1); - } - unlink(feed->feed_filename); - } - } - if (avio_check(feed->feed_filename, AVIO_FLAG_WRITE) <= 0) { - AVFormatContext s1 = {0}, *s = &s1; - - if (feed->readonly) { - http_log("Unable to create feed file '%s' as it is marked readonly\n", - feed->feed_filename); - exit(1); - } - - /* only write the header of the ffm file */ - if (avio_open(&s->pb, feed->feed_filename, AVIO_FLAG_WRITE) < 0) { - http_log("Could not open output feed file '%s'\n", - feed->feed_filename); - exit(1); - } - s->oformat = feed->fmt; - s->nb_streams = feed->nb_streams; - s->streams = feed->streams; - if (avformat_write_header(s, NULL) < 0) { - http_log("Container doesn't supports the required parameters\n"); - exit(1); - } - /* XXX: need better api */ - av_freep(&s->priv_data); - avio_close(s->pb); - } - /* get feed size and write index */ - fd = open(feed->feed_filename, O_RDONLY); - if (fd < 0) { - http_log("Could not open output feed file '%s'\n", - feed->feed_filename); - exit(1); - } - - feed->feed_write_index = FFMAX(ffm_read_write_index(fd), FFM_PACKET_SIZE); - feed->feed_size = lseek(fd, 0, SEEK_END); - /* ensure that we do not wrap before the end of file */ - if (feed->feed_max_size && feed->feed_max_size < feed->feed_size) - feed->feed_max_size = feed->feed_size; - - close(fd); - } -} - -/* compute the bandwidth used by each stream */ -static void compute_bandwidth(void) -{ - unsigned bandwidth; - int i; - FFStream *stream; - - for(stream = first_stream; stream != NULL; stream = stream->next) { - bandwidth = 0; - for(i=0;inb_streams;i++) { - AVStream *st = stream->streams[i]; - switch(st->codec->codec_type) { - case AVMEDIA_TYPE_AUDIO: - case AVMEDIA_TYPE_VIDEO: - bandwidth += st->codec->bit_rate; - break; - default: - break; - } - } - stream->bandwidth = (bandwidth + 999) / 1000; - } -} - -/* add a codec and set the default parameters */ -static void add_codec(FFStream *stream, AVCodecContext *av) -{ - AVStream *st; - - /* compute default parameters */ - switch(av->codec_type) { - case AVMEDIA_TYPE_AUDIO: - if (av->bit_rate == 0) - av->bit_rate = 64000; - if (av->sample_rate == 0) - av->sample_rate = 22050; - if (av->channels == 0) - av->channels = 1; - break; - case AVMEDIA_TYPE_VIDEO: - if (av->bit_rate == 0) - av->bit_rate = 64000; - if (av->time_base.num == 0){ - av->time_base.den = 5; - av->time_base.num = 1; - } - if (av->width == 0 || av->height == 0) { - av->width = 160; - av->height = 128; - } - /* Bitrate tolerance is less for streaming */ - if (av->bit_rate_tolerance == 0) - av->bit_rate_tolerance = FFMAX(av->bit_rate / 4, - (int64_t)av->bit_rate*av->time_base.num/av->time_base.den); - if (av->qmin == 0) - av->qmin = 3; - if (av->qmax == 0) - av->qmax = 31; - if (av->max_qdiff == 0) - av->max_qdiff = 3; - av->qcompress = 0.5; - av->qblur = 0.5; - - if (!av->nsse_weight) - av->nsse_weight = 8; - - av->frame_skip_cmp = FF_CMP_DCTMAX; - if (!av->me_method) - av->me_method = ME_EPZS; - av->rc_buffer_aggressivity = 1.0; - - if (!av->rc_eq) - av->rc_eq = "tex^qComp"; - if (!av->i_quant_factor) - av->i_quant_factor = -0.8; - if (!av->b_quant_factor) - av->b_quant_factor = 1.25; - if (!av->b_quant_offset) - av->b_quant_offset = 1.25; - if (!av->rc_max_rate) - av->rc_max_rate = av->bit_rate * 2; - - if (av->rc_max_rate && !av->rc_buffer_size) { - av->rc_buffer_size = av->rc_max_rate; - } - - - break; - default: - abort(); - } - - st = av_mallocz(sizeof(AVStream)); - if (!st) - return; - st->codec = avcodec_alloc_context(); - stream->streams[stream->nb_streams++] = st; - memcpy(st->codec, av, sizeof(AVCodecContext)); -} - -static enum CodecID opt_audio_codec(const char *arg) -{ - AVCodec *p= avcodec_find_encoder_by_name(arg); - - if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO) - return CODEC_ID_NONE; - - return p->id; -} - -static enum CodecID opt_video_codec(const char *arg) -{ - AVCodec *p= avcodec_find_encoder_by_name(arg); - - if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO) - return CODEC_ID_NONE; - - return p->id; -} - -/* simplistic plugin support */ - -#if HAVE_DLOPEN -static void load_module(const char *filename) -{ - void *dll; - void (*init_func)(void); - dll = dlopen(filename, RTLD_NOW); - if (!dll) { - fprintf(stderr, "Could not load module '%s' - %s\n", - filename, dlerror()); - return; - } - - init_func = dlsym(dll, "ffserver_module_init"); - if (!init_func) { - fprintf(stderr, - "%s: init function 'ffserver_module_init()' not found\n", - filename); - dlclose(dll); - } - - init_func(); -} -#endif - -static int ffserver_opt_default(const char *opt, const char *arg, - AVCodecContext *avctx, int type) -{ - int ret = 0; - const AVOption *o = av_opt_find(avctx, opt, NULL, type, 0); - if(o) - ret = av_set_string3(avctx, opt, arg, 1, NULL); - return ret; -} - -static int ffserver_opt_preset(const char *arg, - AVCodecContext *avctx, int type, - enum CodecID *audio_id, enum CodecID *video_id) -{ - FILE *f=NULL; - char filename[1000], tmp[1000], tmp2[1000], line[1000]; - int ret = 0; - AVCodec *codec = avcodec_find_encoder(avctx->codec_id); - - if (!(f = get_preset_file(filename, sizeof(filename), arg, 0, - codec ? codec->name : NULL))) { - fprintf(stderr, "File for preset '%s' not found\n", arg); - return 1; - } - - while(!feof(f)){ - int e= fscanf(f, "%999[^\n]\n", line) - 1; - if(line[0] == '#' && !e) - continue; - e|= sscanf(line, "%999[^=]=%999[^\n]\n", tmp, tmp2) - 2; - if(e){ - fprintf(stderr, "%s: Invalid syntax: '%s'\n", filename, line); - ret = 1; - break; - } - if(!strcmp(tmp, "acodec")){ - *audio_id = opt_audio_codec(tmp2); - }else if(!strcmp(tmp, "vcodec")){ - *video_id = opt_video_codec(tmp2); - }else if(!strcmp(tmp, "scodec")){ - /* opt_subtitle_codec(tmp2); */ - }else if(ffserver_opt_default(tmp, tmp2, avctx, type) < 0){ - fprintf(stderr, "%s: Invalid option or argument: '%s', parsed as '%s' = '%s'\n", filename, line, tmp, tmp2); - ret = 1; - break; - } - } - - fclose(f); - - return ret; -} - -static AVOutputFormat *ffserver_guess_format(const char *short_name, const char *filename, - const char *mime_type) -{ - AVOutputFormat *fmt = av_guess_format(short_name, filename, mime_type); - - if (fmt) { - AVOutputFormat *stream_fmt; - char stream_format_name[64]; - - snprintf(stream_format_name, sizeof(stream_format_name), "%s_stream", fmt->name); - stream_fmt = av_guess_format(stream_format_name, NULL, NULL); - - if (stream_fmt) - fmt = stream_fmt; - } - - return fmt; -} - -static void report_config_error(const char *filename, int line_num, int *errors, const char *fmt, ...) -{ - va_list vl; - va_start(vl, fmt); - fprintf(stderr, "%s:%d: ", filename, line_num); - vfprintf(stderr, fmt, vl); - va_end(vl); - - (*errors)++; -} - -static int parse_ffconfig(const char *filename) -{ - FILE *f; - char line[1024]; - char cmd[64]; - char arg[1024]; - const char *p; - int val, errors, line_num; - FFStream **last_stream, *stream, *redirect; - FFStream **last_feed, *feed, *s; - AVCodecContext audio_enc, video_enc; - enum CodecID audio_id, video_id; - - f = fopen(filename, "r"); - if (!f) { - perror(filename); - return -1; - } - - errors = 0; - line_num = 0; - first_stream = NULL; - last_stream = &first_stream; - first_feed = NULL; - last_feed = &first_feed; - stream = NULL; - feed = NULL; - redirect = NULL; - audio_id = CODEC_ID_NONE; - video_id = CODEC_ID_NONE; - -#define ERROR(...) report_config_error(filename, line_num, &errors, __VA_ARGS__) - for(;;) { - if (fgets(line, sizeof(line), f) == NULL) - break; - line_num++; - p = line; - while (isspace(*p)) - p++; - if (*p == '\0' || *p == '#') - continue; - - get_arg(cmd, sizeof(cmd), &p); - - if (!strcasecmp(cmd, "Port")) { - get_arg(arg, sizeof(arg), &p); - val = atoi(arg); - if (val < 1 || val > 65536) { - ERROR("Invalid_port: %s\n", arg); - } - my_http_addr.sin_port = htons(val); - } else if (!strcasecmp(cmd, "BindAddress")) { - get_arg(arg, sizeof(arg), &p); - if (resolve_host(&my_http_addr.sin_addr, arg) != 0) { - ERROR("%s:%d: Invalid host/IP address: %s\n", arg); - } - } else if (!strcasecmp(cmd, "NoDaemon")) { - ffserver_daemon = 0; - } else if (!strcasecmp(cmd, "RTSPPort")) { - get_arg(arg, sizeof(arg), &p); - val = atoi(arg); - if (val < 1 || val > 65536) { - ERROR("%s:%d: Invalid port: %s\n", arg); - } - my_rtsp_addr.sin_port = htons(atoi(arg)); - } else if (!strcasecmp(cmd, "RTSPBindAddress")) { - get_arg(arg, sizeof(arg), &p); - if (resolve_host(&my_rtsp_addr.sin_addr, arg) != 0) { - ERROR("Invalid host/IP address: %s\n", arg); - } - } else if (!strcasecmp(cmd, "MaxHTTPConnections")) { - get_arg(arg, sizeof(arg), &p); - val = atoi(arg); - if (val < 1 || val > 65536) { - ERROR("Invalid MaxHTTPConnections: %s\n", arg); - } - nb_max_http_connections = val; - } else if (!strcasecmp(cmd, "MaxClients")) { - get_arg(arg, sizeof(arg), &p); - val = atoi(arg); - if (val < 1 || val > nb_max_http_connections) { - ERROR("Invalid MaxClients: %s\n", arg); - } else { - nb_max_connections = val; - } - } else if (!strcasecmp(cmd, "MaxBandwidth")) { - int64_t llval; - get_arg(arg, sizeof(arg), &p); - llval = atoll(arg); - if (llval < 10 || llval > 10000000) { - ERROR("Invalid MaxBandwidth: %s\n", arg); - } else - max_bandwidth = llval; - } else if (!strcasecmp(cmd, "CustomLog")) { - if (!ffserver_debug) - get_arg(logfilename, sizeof(logfilename), &p); - } else if (!strcasecmp(cmd, "filename, sizeof(feed->filename), &p); - q = strrchr(feed->filename, '>'); - if (*q) - *q = '\0'; - - for (s = first_feed; s; s = s->next) { - if (!strcmp(feed->filename, s->filename)) { - ERROR("Feed '%s' already registered\n", s->filename); - } - } - - feed->fmt = av_guess_format("ffm", NULL, NULL); - /* defaut feed file */ - snprintf(feed->feed_filename, sizeof(feed->feed_filename), - "/tmp/%s.ffm", feed->filename); - feed->feed_max_size = 5 * 1024 * 1024; - feed->is_feed = 1; - feed->feed = feed; /* self feeding :-) */ - - /* add in stream list */ - *last_stream = feed; - last_stream = &feed->next; - /* add in feed list */ - *last_feed = feed; - last_feed = &feed->next_feed; - } - } else if (!strcasecmp(cmd, "Launch")) { - if (feed) { - int i; - - feed->child_argv = av_mallocz(64 * sizeof(char *)); - - for (i = 0; i < 62; i++) { - get_arg(arg, sizeof(arg), &p); - if (!arg[0]) - break; - - feed->child_argv[i] = av_strdup(arg); - } - - feed->child_argv[i] = av_malloc(30 + strlen(feed->filename)); - - snprintf(feed->child_argv[i], 30+strlen(feed->filename), - "http://%s:%d/%s", - (my_http_addr.sin_addr.s_addr == INADDR_ANY) ? "127.0.0.1" : - inet_ntoa(my_http_addr.sin_addr), - ntohs(my_http_addr.sin_port), feed->filename); - } - } else if (!strcasecmp(cmd, "ReadOnlyFile")) { - if (feed) { - get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p); - feed->readonly = 1; - } else if (stream) { - get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p); - } - } else if (!strcasecmp(cmd, "File")) { - if (feed) { - get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p); - } else if (stream) - get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p); - } else if (!strcasecmp(cmd, "Truncate")) { - if (feed) { - get_arg(arg, sizeof(arg), &p); - feed->truncate = strtod(arg, NULL); - } - } else if (!strcasecmp(cmd, "FileMaxSize")) { - if (feed) { - char *p1; - double fsize; - - get_arg(arg, sizeof(arg), &p); - p1 = arg; - fsize = strtod(p1, &p1); - switch(toupper(*p1)) { - case 'K': - fsize *= 1024; - break; - case 'M': - fsize *= 1024 * 1024; - break; - case 'G': - fsize *= 1024 * 1024 * 1024; - break; - } - feed->feed_max_size = (int64_t)fsize; - if (feed->feed_max_size < FFM_PACKET_SIZE*4) { - ERROR("Feed max file size is too small, must be at least %d\n", FFM_PACKET_SIZE*4); - } - } - } else if (!strcasecmp(cmd, "
")) { - if (!feed) { - ERROR("No corresponding for \n"); - } - feed = NULL; - } else if (!strcasecmp(cmd, "filename, sizeof(stream->filename), &p); - q = strrchr(stream->filename, '>'); - if (*q) - *q = '\0'; - - for (s = first_stream; s; s = s->next) { - if (!strcmp(stream->filename, s->filename)) { - ERROR("Stream '%s' already registered\n", s->filename); - } - } - - stream->fmt = ffserver_guess_format(NULL, stream->filename, NULL); - avcodec_get_context_defaults2(&video_enc, AVMEDIA_TYPE_VIDEO); - avcodec_get_context_defaults2(&audio_enc, AVMEDIA_TYPE_AUDIO); - audio_id = CODEC_ID_NONE; - video_id = CODEC_ID_NONE; - if (stream->fmt) { - audio_id = stream->fmt->audio_codec; - video_id = stream->fmt->video_codec; - } - - *last_stream = stream; - last_stream = &stream->next; - } - } else if (!strcasecmp(cmd, "Feed")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - FFStream *sfeed; - - sfeed = first_feed; - while (sfeed != NULL) { - if (!strcmp(sfeed->filename, arg)) - break; - sfeed = sfeed->next_feed; - } - if (!sfeed) - ERROR("feed '%s' not defined\n", arg); - else - stream->feed = sfeed; - } - } else if (!strcasecmp(cmd, "Format")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - if (!strcmp(arg, "status")) { - stream->stream_type = STREAM_TYPE_STATUS; - stream->fmt = NULL; - } else { - stream->stream_type = STREAM_TYPE_LIVE; - /* jpeg cannot be used here, so use single frame jpeg */ - if (!strcmp(arg, "jpeg")) - strcpy(arg, "mjpeg"); - stream->fmt = ffserver_guess_format(arg, NULL, NULL); - if (!stream->fmt) { - ERROR("Unknown Format: %s\n", arg); - } - } - if (stream->fmt) { - audio_id = stream->fmt->audio_codec; - video_id = stream->fmt->video_codec; - } - } - } else if (!strcasecmp(cmd, "InputFormat")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - stream->ifmt = av_find_input_format(arg); - if (!stream->ifmt) { - ERROR("Unknown input format: %s\n", arg); - } - } - } else if (!strcasecmp(cmd, "FaviconURL")) { - if (stream && stream->stream_type == STREAM_TYPE_STATUS) { - get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p); - } else { - ERROR("FaviconURL only permitted for status streams\n"); - } - } else if (!strcasecmp(cmd, "Author")) { - if (stream) - get_arg(stream->author, sizeof(stream->author), &p); - } else if (!strcasecmp(cmd, "Comment")) { - if (stream) - get_arg(stream->comment, sizeof(stream->comment), &p); - } else if (!strcasecmp(cmd, "Copyright")) { - if (stream) - get_arg(stream->copyright, sizeof(stream->copyright), &p); - } else if (!strcasecmp(cmd, "Title")) { - if (stream) - get_arg(stream->title, sizeof(stream->title), &p); - } else if (!strcasecmp(cmd, "Preroll")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - stream->prebuffer = atof(arg) * 1000; - } else if (!strcasecmp(cmd, "StartSendOnKey")) { - if (stream) - stream->send_on_key = 1; - } else if (!strcasecmp(cmd, "AudioCodec")) { - get_arg(arg, sizeof(arg), &p); - audio_id = opt_audio_codec(arg); - if (audio_id == CODEC_ID_NONE) { - ERROR("Unknown AudioCodec: %s\n", arg); - } - } else if (!strcasecmp(cmd, "VideoCodec")) { - get_arg(arg, sizeof(arg), &p); - video_id = opt_video_codec(arg); - if (video_id == CODEC_ID_NONE) { - ERROR("Unknown VideoCodec: %s\n", arg); - } - } else if (!strcasecmp(cmd, "MaxTime")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - stream->max_time = atof(arg) * 1000; - } else if (!strcasecmp(cmd, "AudioBitRate")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - audio_enc.bit_rate = lrintf(atof(arg) * 1000); - } else if (!strcasecmp(cmd, "AudioChannels")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - audio_enc.channels = atoi(arg); - } else if (!strcasecmp(cmd, "AudioSampleRate")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - audio_enc.sample_rate = atoi(arg); - } else if (!strcasecmp(cmd, "AudioQuality")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { -// audio_enc.quality = atof(arg) * 1000; - } - } else if (!strcasecmp(cmd, "VideoBitRateRange")) { - if (stream) { - int minrate, maxrate; - - get_arg(arg, sizeof(arg), &p); - - if (sscanf(arg, "%d-%d", &minrate, &maxrate) == 2) { - video_enc.rc_min_rate = minrate * 1000; - video_enc.rc_max_rate = maxrate * 1000; - } else { - ERROR("Incorrect format for VideoBitRateRange -- should be -: %s\n", arg); - } - } - } else if (!strcasecmp(cmd, "Debug")) { - if (stream) { - get_arg(arg, sizeof(arg), &p); - video_enc.debug = strtol(arg,0,0); - } - } else if (!strcasecmp(cmd, "Strict")) { - if (stream) { - get_arg(arg, sizeof(arg), &p); - video_enc.strict_std_compliance = atoi(arg); - } - } else if (!strcasecmp(cmd, "VideoBufferSize")) { - if (stream) { - get_arg(arg, sizeof(arg), &p); - video_enc.rc_buffer_size = atoi(arg) * 8*1024; - } - } else if (!strcasecmp(cmd, "VideoBitRateTolerance")) { - if (stream) { - get_arg(arg, sizeof(arg), &p); - video_enc.bit_rate_tolerance = atoi(arg) * 1000; - } - } else if (!strcasecmp(cmd, "VideoBitRate")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - video_enc.bit_rate = atoi(arg) * 1000; - } - } else if (!strcasecmp(cmd, "VideoSize")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - av_parse_video_size(&video_enc.width, &video_enc.height, arg); - if ((video_enc.width % 16) != 0 || - (video_enc.height % 16) != 0) { - ERROR("Image size must be a multiple of 16\n"); - } - } - } else if (!strcasecmp(cmd, "VideoFrameRate")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - AVRational frame_rate; - if (av_parse_video_rate(&frame_rate, arg) < 0) { - ERROR("Incorrect frame rate: %s\n", arg); - } else { - video_enc.time_base.num = frame_rate.den; - video_enc.time_base.den = frame_rate.num; - } - } - } else if (!strcasecmp(cmd, "VideoGopSize")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - video_enc.gop_size = atoi(arg); - } else if (!strcasecmp(cmd, "VideoIntraOnly")) { - if (stream) - video_enc.gop_size = 1; - } else if (!strcasecmp(cmd, "VideoHighQuality")) { - if (stream) - video_enc.mb_decision = FF_MB_DECISION_BITS; - } else if (!strcasecmp(cmd, "Video4MotionVector")) { - if (stream) { - video_enc.mb_decision = FF_MB_DECISION_BITS; //FIXME remove - video_enc.flags |= CODEC_FLAG_4MV; - } - } else if (!strcasecmp(cmd, "AVOptionVideo") || - !strcasecmp(cmd, "AVOptionAudio")) { - char arg2[1024]; - AVCodecContext *avctx; - int type; - get_arg(arg, sizeof(arg), &p); - get_arg(arg2, sizeof(arg2), &p); - if (!strcasecmp(cmd, "AVOptionVideo")) { - avctx = &video_enc; - type = AV_OPT_FLAG_VIDEO_PARAM; - } else { - avctx = &audio_enc; - type = AV_OPT_FLAG_AUDIO_PARAM; - } - if (ffserver_opt_default(arg, arg2, avctx, type|AV_OPT_FLAG_ENCODING_PARAM)) { - ERROR("AVOption error: %s %s\n", arg, arg2); - } - } else if (!strcasecmp(cmd, "AVPresetVideo") || - !strcasecmp(cmd, "AVPresetAudio")) { - AVCodecContext *avctx; - int type; - get_arg(arg, sizeof(arg), &p); - if (!strcasecmp(cmd, "AVPresetVideo")) { - avctx = &video_enc; - video_enc.codec_id = video_id; - type = AV_OPT_FLAG_VIDEO_PARAM; - } else { - avctx = &audio_enc; - audio_enc.codec_id = audio_id; - type = AV_OPT_FLAG_AUDIO_PARAM; - } - if (ffserver_opt_preset(arg, avctx, type|AV_OPT_FLAG_ENCODING_PARAM, &audio_id, &video_id)) { - ERROR("AVPreset error: %s\n", arg); - } - } else if (!strcasecmp(cmd, "VideoTag")) { - get_arg(arg, sizeof(arg), &p); - if ((strlen(arg) == 4) && stream) - video_enc.codec_tag = MKTAG(arg[0], arg[1], arg[2], arg[3]); - } else if (!strcasecmp(cmd, "BitExact")) { - if (stream) - video_enc.flags |= CODEC_FLAG_BITEXACT; - } else if (!strcasecmp(cmd, "DctFastint")) { - if (stream) - video_enc.dct_algo = FF_DCT_FASTINT; - } else if (!strcasecmp(cmd, "IdctSimple")) { - if (stream) - video_enc.idct_algo = FF_IDCT_SIMPLE; - } else if (!strcasecmp(cmd, "Qscale")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - video_enc.flags |= CODEC_FLAG_QSCALE; - video_enc.global_quality = FF_QP2LAMBDA * atoi(arg); - } - } else if (!strcasecmp(cmd, "VideoQDiff")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - video_enc.max_qdiff = atoi(arg); - if (video_enc.max_qdiff < 1 || video_enc.max_qdiff > 31) { - ERROR("VideoQDiff out of range\n"); - } - } - } else if (!strcasecmp(cmd, "VideoQMax")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - video_enc.qmax = atoi(arg); - if (video_enc.qmax < 1 || video_enc.qmax > 31) { - ERROR("VideoQMax out of range\n"); - } - } - } else if (!strcasecmp(cmd, "VideoQMin")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - video_enc.qmin = atoi(arg); - if (video_enc.qmin < 1 || video_enc.qmin > 31) { - ERROR("VideoQMin out of range\n"); - } - } - } else if (!strcasecmp(cmd, "LumaElim")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - video_enc.luma_elim_threshold = atoi(arg); - } else if (!strcasecmp(cmd, "ChromaElim")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - video_enc.chroma_elim_threshold = atoi(arg); - } else if (!strcasecmp(cmd, "LumiMask")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - video_enc.lumi_masking = atof(arg); - } else if (!strcasecmp(cmd, "DarkMask")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - video_enc.dark_masking = atof(arg); - } else if (!strcasecmp(cmd, "NoVideo")) { - video_id = CODEC_ID_NONE; - } else if (!strcasecmp(cmd, "NoAudio")) { - audio_id = CODEC_ID_NONE; - } else if (!strcasecmp(cmd, "ACL")) { - parse_acl_row(stream, feed, NULL, p, filename, line_num); - } else if (!strcasecmp(cmd, "DynamicACL")) { - if (stream) { - get_arg(stream->dynamic_acl, sizeof(stream->dynamic_acl), &p); - } - } else if (!strcasecmp(cmd, "RTSPOption")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - av_freep(&stream->rtsp_option); - stream->rtsp_option = av_strdup(arg); - } - } else if (!strcasecmp(cmd, "MulticastAddress")) { - get_arg(arg, sizeof(arg), &p); - if (stream) { - if (resolve_host(&stream->multicast_ip, arg) != 0) { - ERROR("Invalid host/IP address: %s\n", arg); - } - stream->is_multicast = 1; - stream->loop = 1; /* default is looping */ - } - } else if (!strcasecmp(cmd, "MulticastPort")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - stream->multicast_port = atoi(arg); - } else if (!strcasecmp(cmd, "MulticastTTL")) { - get_arg(arg, sizeof(arg), &p); - if (stream) - stream->multicast_ttl = atoi(arg); - } else if (!strcasecmp(cmd, "NoLoop")) { - if (stream) - stream->loop = 0; - } else if (!strcasecmp(cmd, "
")) { - if (!stream) { - ERROR("No corresponding for \n"); - } else { - if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) { - if (audio_id != CODEC_ID_NONE) { - audio_enc.codec_type = AVMEDIA_TYPE_AUDIO; - audio_enc.codec_id = audio_id; - add_codec(stream, &audio_enc); - } - if (video_id != CODEC_ID_NONE) { - video_enc.codec_type = AVMEDIA_TYPE_VIDEO; - video_enc.codec_id = video_id; - add_codec(stream, &video_enc); - } - } - stream = NULL; - } - } else if (!strcasecmp(cmd, "next; - - get_arg(redirect->filename, sizeof(redirect->filename), &p); - q = strrchr(redirect->filename, '>'); - if (*q) - *q = '\0'; - redirect->stream_type = STREAM_TYPE_REDIRECT; - } - } else if (!strcasecmp(cmd, "URL")) { - if (redirect) - get_arg(redirect->feed_filename, sizeof(redirect->feed_filename), &p); - } else if (!strcasecmp(cmd, "")) { - if (!redirect) { - ERROR("No corresponding for \n"); - } else { - if (!redirect->feed_filename[0]) { - ERROR("No URL found for \n"); - } - redirect = NULL; - } - } else if (!strcasecmp(cmd, "LoadModule")) { - get_arg(arg, sizeof(arg), &p); -#if HAVE_DLOPEN - load_module(arg); -#else - ERROR("Module support not compiled into this version: '%s'\n", arg); -#endif - } else { - ERROR("Incorrect keyword: '%s'\n", cmd); - } - } -#undef ERROR - - fclose(f); - if (errors) - return -1; - else - return 0; -} - -static void handle_child_exit(int sig) -{ - pid_t pid; - int status; - - while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { - FFStream *feed; - - for (feed = first_feed; feed; feed = feed->next) { - if (feed->pid == pid) { - int uptime = time(0) - feed->pid_start; - - feed->pid = 0; - fprintf(stderr, "%s: Pid %d exited with status %d after %d seconds\n", feed->filename, pid, status, uptime); - - if (uptime < 30) - /* Turn off any more restarts */ - feed->child_argv = 0; - } - } - } - - need_to_start_children = 1; -} - -static void opt_debug(void) -{ - ffserver_debug = 1; - ffserver_daemon = 0; - logfilename[0] = '-'; -} - -static void show_help(void) -{ - printf("usage: ffserver [options]\n" - "Hyper fast multi format Audio/Video streaming server\n"); - printf("\n"); - show_help_options(options, "Main options:\n", 0, 0); -} - -static const OptionDef options[] = { -#include "cmdutils_common_opts.h" - { "n", OPT_BOOL, {(void *)&no_launch }, "enable no-launch mode" }, - { "d", 0, {(void*)opt_debug}, "enable debug mode" }, - { "f", HAS_ARG | OPT_STRING, {(void*)&config_filename }, "use configfile instead of /etc/ffserver.conf", "configfile" }, - { NULL }, -}; - -int main(int argc, char **argv) -{ - struct sigaction sigact; - - av_register_all(); - - show_banner(); - - my_program_name = argv[0]; - my_program_dir = getcwd(0, 0); - ffserver_daemon = 1; - - parse_options(argc, argv, options, NULL); - - unsetenv("http_proxy"); /* Kill the http_proxy */ - - av_lfg_init(&random_state, av_get_random_seed()); - - memset(&sigact, 0, sizeof(sigact)); - sigact.sa_handler = handle_child_exit; - sigact.sa_flags = SA_NOCLDSTOP | SA_RESTART; - sigaction(SIGCHLD, &sigact, 0); - - if (parse_ffconfig(config_filename) < 0) { - fprintf(stderr, "Incorrect config file - exiting.\n"); - exit(1); - } - - /* open log file if needed */ - if (logfilename[0] != '\0') { - if (!strcmp(logfilename, "-")) - logfile = stdout; - else - logfile = fopen(logfilename, "a"); - av_log_set_callback(http_av_log); - } - - build_file_streams(); - - build_feed_streams(); - - compute_bandwidth(); - - /* put the process in background and detach it from its TTY */ - if (ffserver_daemon) { - int pid; - - pid = fork(); - if (pid < 0) { - perror("fork"); - exit(1); - } else if (pid > 0) { - /* parent : exit */ - exit(0); - } else { - /* child */ - setsid(); - close(0); - open("/dev/null", O_RDWR); - if (strcmp(logfilename, "-") != 0) { - close(1); - dup(0); - } - close(2); - dup(0); - } - } - - /* signal init */ - signal(SIGPIPE, SIG_IGN); - - if (ffserver_daemon) - chdir("/"); - - if (http_server() < 0) { - http_log("Could not start server\n"); - exit(1); - } - - return 0; -} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffserver.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffserver.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/ffserver.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/ffserver.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -/* - * Multiple format streaming server - * copyright (c) 2002 Fabrice Bellard - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef LIBAV_FFSERVER_H -#define LIBAV_FFSERVER_H - -/* interface between ffserver and modules */ - -void ffserver_module_init(void); - -#endif /* LIBAV_FFSERVER_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/.gitignore mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/.gitignore --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/.gitignore 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/.gitignore 2012-01-11 00:34:30.000000000 +0000 @@ -12,9 +12,10 @@ doc/*.pod doxy ffmpeg -ffplay -ffprobe -ffserver +avconv +avplay +avprobe +avserver libavcodec/*_tablegen libavcodec/*_tables.c libavcodec/*_tables.h @@ -30,7 +31,6 @@ tests/base64 tests/data tests/rotozoom -tests/seek_test tests/tiny_psnr tests/videogen tests/vsynth1 @@ -42,5 +42,4 @@ tools/probetest tools/qt-faststart tools/trasher -tools/trasher*.d version.h diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/4xm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/4xm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/4xm.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/4xm.c 2012-01-11 00:34:30.000000000 +0000 @@ -132,8 +132,8 @@ AVFrame current_picture, last_picture; GetBitContext pre_gb; ///< ac/dc prefix GetBitContext gb; - const uint8_t *bytestream; - const uint16_t *wordstream; + GetByteContext g; + GetByteContext g2; int mv[256]; VLC pre_vlc; int last_dc; @@ -277,7 +277,7 @@ } #endif -static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w, int h, int stride, int scale, int dc){ +static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w, int h, int stride, int scale, unsigned dc){ int i; dc*= 0x10001; @@ -328,7 +328,7 @@ assert(code>=0 && code<=6); if(code == 0){ - src += f->mv[ *f->bytestream++ ]; + src += f->mv[bytestream2_get_byte(&f->g)]; if(start > src || src > end){ av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n"); return; @@ -345,21 +345,21 @@ }else if(code == 3 && f->version<2){ mcdc(dst, src, log2w, h, stride, 1, 0); }else if(code == 4){ - src += f->mv[ *f->bytestream++ ]; + src += f->mv[bytestream2_get_byte(&f->g)]; if(start > src || src > end){ av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n"); return; } - mcdc(dst, src, log2w, h, stride, 1, av_le2ne16(*f->wordstream++)); + mcdc(dst, src, log2w, h, stride, 1, bytestream2_get_le16(&f->g2)); }else if(code == 5){ - mcdc(dst, src, log2w, h, stride, 0, av_le2ne16(*f->wordstream++)); + mcdc(dst, src, log2w, h, stride, 0, bytestream2_get_le16(&f->g2)); }else if(code == 6){ if(log2w){ - dst[0] = av_le2ne16(*f->wordstream++); - dst[1] = av_le2ne16(*f->wordstream++); + dst[0] = bytestream2_get_le16(&f->g2); + dst[1] = bytestream2_get_le16(&f->g2); }else{ - dst[0 ] = av_le2ne16(*f->wordstream++); - dst[stride] = av_le2ne16(*f->wordstream++); + dst[0 ] = bytestream2_get_le16(&f->g2); + dst[stride] = bytestream2_get_le16(&f->g2); } } } @@ -371,7 +371,7 @@ uint16_t *src= (uint16_t*)f->last_picture.data[0]; uint16_t *dst= (uint16_t*)f->current_picture.data[0]; const int stride= f->current_picture.linesize[0]>>1; - unsigned int bitstream_size, bytestream_size, wordstream_size, extra; + unsigned int bitstream_size, bytestream_size, wordstream_size, extra, bytestream_offset, wordstream_offset; if(f->version>1){ extra=20; @@ -399,10 +399,13 @@ if (!f->bitstream_buffer) return AVERROR(ENOMEM); f->dsp.bswap_buf(f->bitstream_buffer, (const uint32_t*)(buf + extra), bitstream_size/4); + memset((uint8_t*)f->bitstream_buffer + bitstream_size, 0, FF_INPUT_BUFFER_PADDING_SIZE); init_get_bits(&f->gb, f->bitstream_buffer, 8*bitstream_size); - f->wordstream= (const uint16_t*)(buf + extra + bitstream_size); - f->bytestream= buf + extra + bitstream_size + wordstream_size; + wordstream_offset = extra + bitstream_size; + bytestream_offset = extra + bitstream_size + wordstream_size; + bytestream2_init(&f->g2, buf + wordstream_offset, length - wordstream_offset); + bytestream2_init(&f->g, buf + bytestream_offset, length - bytestream_offset); init_mv(f); @@ -414,15 +417,6 @@ dst += 8*stride; } - if( bitstream_size != (get_bits_count(&f->gb)+31)/32*4 - || (((const char*)f->wordstream - (const char*)buf + 2)&~2) != extra + bitstream_size + wordstream_size - || (((const char*)f->bytestream - (const char*)buf + 3)&~3) != extra + bitstream_size + wordstream_size + bytestream_size) - av_log(f->avctx, AV_LOG_ERROR, " %d %td %td bytes left\n", - bitstream_size - (get_bits_count(&f->gb)+31)/32*4, - -(((const char*)f->bytestream - (const char*)buf + 3)&~3) + (extra + bitstream_size + wordstream_size + bytestream_size), - -(((const char*)f->wordstream - (const char*)buf + 2)&~2) + (extra + bitstream_size + wordstream_size) - ); - return 0; } @@ -601,9 +595,10 @@ len_tab[j]= len; } - init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257, - len_tab , 1, 1, - bits_tab, 4, 4, 0); + if (init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257, + len_tab , 1, 1, + bits_tab, 4, 4, 0)) + return NULL; return ptr; } @@ -619,16 +614,24 @@ int x, y, x2, y2; const int width= f->avctx->width; const int height= f->avctx->height; + const int mbs = (FFALIGN(width, 16) >> 4) * (FFALIGN(height, 16) >> 4); uint16_t *dst= (uint16_t*)f->current_picture.data[0]; const int stride= f->current_picture.linesize[0]>>1; + GetByteContext g3; + + if(length < mbs * 8) { + av_log(f->avctx, AV_LOG_ERROR, "packet size too small\n"); + return AVERROR_INVALIDDATA; + } + bytestream2_init(&g3, buf, length); for(y=0; y>2) + 8*(y2>>2); @@ -645,7 +648,7 @@ } dst+=16; } - dst += 16*stride - width; + dst += 16 * stride - x; } return 0; @@ -655,12 +658,19 @@ int x, y; const int width= f->avctx->width; const int height= f->avctx->height; - uint16_t *dst= (uint16_t*)f->current_picture.data[0]; - const int stride= f->current_picture.linesize[0]>>1; const unsigned int bitstream_size= AV_RL32(buf); - const int token_count av_unused = AV_RL32(buf + bitstream_size + 8); - unsigned int prestream_size= 4*AV_RL32(buf + bitstream_size + 4); - const uint8_t *prestream= buf + bitstream_size + 12; + int token_count av_unused; + unsigned int prestream_size; + const uint8_t *prestream; + + if (length < bitstream_size + 12) { + av_log(f->avctx, AV_LOG_ERROR, "packet size too small\n"); + return AVERROR_INVALIDDATA; + } + + token_count = AV_RL32(buf + bitstream_size + 8); + prestream_size = 4 * AV_RL32(buf + bitstream_size + 4); + prestream = buf + bitstream_size + 12; if(prestream_size + bitstream_size + 12 != length || bitstream_size > (1<<26) @@ -679,6 +689,7 @@ if (!f->bitstream_buffer) return AVERROR(ENOMEM); f->dsp.bswap_buf(f->bitstream_buffer, (const uint32_t*)prestream, prestream_size/4); + memset((uint8_t*)f->bitstream_buffer + prestream_size, 0, FF_INPUT_BUFFER_PADDING_SIZE); init_get_bits(&f->pre_gb, f->bitstream_buffer, 8*prestream_size); f->last_dc= 0*128*8*8; @@ -690,7 +701,6 @@ idct_put(f, x, y); } - dst += 16*stride; } if(get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3) != 256) @@ -784,7 +794,7 @@ if(frame_4cc == AV_RL32("ifr2")){ p->pict_type= AV_PICTURE_TYPE_I; - if(decode_i2_frame(f, buf-4, frame_size) < 0) + if(decode_i2_frame(f, buf-4, frame_size + 4) < 0) return -1; }else if(frame_4cc == AV_RL32("ifrm")){ p->pict_type= AV_PICTURE_TYPE_I; @@ -866,15 +876,14 @@ } AVCodec ff_fourxm_decoder = { - "4xm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_4XM, - sizeof(FourXContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "4xm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_4XM, + .priv_data_size = sizeof(FourXContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("4X Movie"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/8bps.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/8bps.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/8bps.c 2011-04-16 05:56:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/8bps.c 2012-01-11 00:34:30.000000000 +0000 @@ -221,14 +221,13 @@ AVCodec ff_eightbps_decoder = { - "8bps", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_8BPS, - sizeof(EightBpsContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"), + .name = "8bps", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_8BPS, + .priv_data_size = sizeof(EightBpsContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/8svx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/8svx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/8svx.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/8svx.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,7 @@ * @file * 8svx audio decoder * @author Jaikrishnan Menon + * * supports: fibonacci delta encoding * : exponential encoding */ @@ -31,46 +32,141 @@ /** decoder context */ typedef struct EightSvxContext { - int16_t fib_acc; - const int16_t *table; + AVFrame frame; + uint8_t fib_acc[2]; + const int8_t *table; + + /* buffer used to store the whole first packet. + data is only sent as one large packet */ + uint8_t *data[2]; + int data_size; + int data_idx; } EightSvxContext; -static const int16_t fibonacci[16] = { -34<<8, -21<<8, -13<<8, -8<<8, -5<<8, -3<<8, -2<<8, -1<<8, - 0, 1<<8, 2<<8, 3<<8, 5<<8, 8<<8, 13<<8, 21<<8 }; -static const int16_t exponential[16] = { -128<<8, -64<<8, -32<<8, -16<<8, -8<<8, -4<<8, -2<<8, -1<<8, - 0, 1<<8, 2<<8, 4<<8, 8<<8, 16<<8, 32<<8, 64<<8 }; +static const int8_t fibonacci[16] = { -34, -21, -13, -8, -5, -3, -2, -1, + 0, 1, 2, 3, 5, 8, 13, 21 }; +static const int8_t exponential[16] = { -128, -64, -32, -16, -8, -4, -2, -1, + 0, 1, 2, 4, 8, 16, 32, 64 }; + +#define MAX_FRAME_SIZE 32768 + +/** + * Delta decode the compressed values in src, and put the resulting + * decoded samples in dst. + * + * @param[in,out] state starting value. it is saved for use in the next call. + */ +static void delta_decode(uint8_t *dst, const uint8_t *src, int src_size, + uint8_t *state, const int8_t *table, int channels) +{ + uint8_t val = *state; + + while (src_size--) { + uint8_t d = *src++; + val = av_clip_uint8(val + table[d & 0xF]); + *dst = val; + dst += channels; + val = av_clip_uint8(val + table[d >> 4]); + *dst = val; + dst += channels; + } + + *state = val; +} + +static void raw_decode(uint8_t *dst, const int8_t *src, int src_size, + int channels) +{ + while (src_size--) { + *dst = *src++ + 128; + dst += channels; + } +} /** decode a frame */ -static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - AVPacket *avpkt) +static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; EightSvxContext *esc = avctx->priv_data; - int16_t *out_data = data; - int consumed = buf_size; - const uint8_t *buf_end = buf + buf_size; - - if((*data_size >> 2) < buf_size) - return -1; + int buf_size; + uint8_t *out_data; + int ret; + int is_compr = (avctx->codec_id != CODEC_ID_PCM_S8_PLANAR); + + /* for the first packet, copy data to buffer */ + if (avpkt->data) { + int hdr_size = is_compr ? 2 : 0; + int chan_size = (avpkt->size - hdr_size * avctx->channels) / avctx->channels; + + if (avpkt->size < hdr_size * avctx->channels) { + av_log(avctx, AV_LOG_ERROR, "packet size is too small\n"); + return AVERROR(EINVAL); + } + if (esc->data[0]) { + av_log(avctx, AV_LOG_ERROR, "unexpected data after first packet\n"); + return AVERROR(EINVAL); + } + + if (is_compr) { + esc->fib_acc[0] = avpkt->data[1] + 128; + if (avctx->channels == 2) + esc->fib_acc[1] = avpkt->data[2+chan_size+1] + 128; + } + + esc->data_idx = 0; + esc->data_size = chan_size; + if (!(esc->data[0] = av_malloc(chan_size))) + return AVERROR(ENOMEM); + if (avctx->channels == 2) { + if (!(esc->data[1] = av_malloc(chan_size))) { + av_freep(&esc->data[0]); + return AVERROR(ENOMEM); + } + } + memcpy(esc->data[0], &avpkt->data[hdr_size], chan_size); + if (avctx->channels == 2) + memcpy(esc->data[1], &avpkt->data[2*hdr_size+chan_size], chan_size); + } + if (!esc->data[0]) { + av_log(avctx, AV_LOG_ERROR, "unexpected empty packet\n"); + return AVERROR(EINVAL); + } - if(avctx->frame_number == 0) { - esc->fib_acc = buf[1] << 8; - buf_size -= 2; - buf += 2; + /* decode next piece of data from the buffer */ + buf_size = FFMIN(MAX_FRAME_SIZE, esc->data_size - esc->data_idx); + if (buf_size <= 0) { + *got_frame_ptr = 0; + return avpkt->size; } - *data_size = buf_size << 2; + /* get output buffer */ + esc->frame.nb_samples = buf_size * (is_compr + 1); + if ((ret = avctx->get_buffer(avctx, &esc->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + out_data = esc->frame.data[0]; - while(buf < buf_end) { - uint8_t d = *buf++; - esc->fib_acc += esc->table[d & 0x0f]; - *out_data++ = esc->fib_acc; - esc->fib_acc += esc->table[d >> 4]; - *out_data++ = esc->fib_acc; + if (is_compr) { + delta_decode(out_data, &esc->data[0][esc->data_idx], buf_size, + &esc->fib_acc[0], esc->table, avctx->channels); + if (avctx->channels == 2) { + delta_decode(&out_data[1], &esc->data[1][esc->data_idx], buf_size, + &esc->fib_acc[1], esc->table, avctx->channels); + } + } else { + int ch; + for (ch = 0; ch < avctx->channels; ch++) { + raw_decode((int8_t *)&out_data[ch], &esc->data[ch][esc->data_idx], + buf_size, avctx->channels); + } } + esc->data_idx += buf_size; - return consumed; + *got_frame_ptr = 1; + *(AVFrame *)data = esc->frame; + + return avpkt->size; } /** initialize 8svx decoder */ @@ -78,6 +174,11 @@ { EightSvxContext *esc = avctx->priv_data; + if (avctx->channels < 1 || avctx->channels > 2) { + av_log(avctx, AV_LOG_ERROR, "8SVX does not support more than 2 channels\n"); + return AVERROR(EINVAL); + } + switch(avctx->codec->id) { case CODEC_ID_8SVX_FIB: esc->table = fibonacci; @@ -85,10 +186,26 @@ case CODEC_ID_8SVX_EXP: esc->table = exponential; break; + case CODEC_ID_PCM_S8_PLANAR: + break; default: return -1; } - avctx->sample_fmt = AV_SAMPLE_FMT_S16; + avctx->sample_fmt = AV_SAMPLE_FMT_U8; + + avcodec_get_frame_defaults(&esc->frame); + avctx->coded_frame = &esc->frame; + + return 0; +} + +static av_cold int eightsvx_decode_close(AVCodecContext *avctx) +{ + EightSvxContext *esc = avctx->priv_data; + + av_freep(&esc->data[0]); + av_freep(&esc->data[1]); + return 0; } @@ -98,7 +215,9 @@ .id = CODEC_ID_8SVX_FIB, .priv_data_size = sizeof (EightSvxContext), .init = eightsvx_decode_init, + .close = eightsvx_decode_close, .decode = eightsvx_decode_frame, + .capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"), }; @@ -108,6 +227,20 @@ .id = CODEC_ID_8SVX_EXP, .priv_data_size = sizeof (EightSvxContext), .init = eightsvx_decode_init, + .close = eightsvx_decode_close, .decode = eightsvx_decode_frame, + .capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"), }; + +AVCodec ff_pcm_s8_planar_decoder = { + .name = "pcm_s8_planar", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_PCM_S8_PLANAR, + .priv_data_size = sizeof(EightSvxContext), + .init = eightsvx_decode_init, + .close = eightsvx_decode_close, + .decode = eightsvx_decode_frame, + .capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("PCM signed 8-bit planar"), +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aac_ac3_parser.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aac_ac3_parser.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aac_ac3_parser.h 2011-03-27 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aac_ac3_parser.h 2012-01-11 00:34:30.000000000 +0000 @@ -48,7 +48,7 @@ int sample_rate; int bit_rate; int samples; - int64_t channel_layout; + uint64_t channel_layout; int service_type; int remaining_size; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacadtsdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacadtsdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacadtsdec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacadtsdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,7 +26,7 @@ #include "get_bits.h" #include "mpeg4audio.h" -int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr) +int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr) { int size, rdb, ch, sr; int aot, crc_abs; @@ -39,7 +39,7 @@ crc_abs = get_bits1(gbc); /* protection_absent */ aot = get_bits(gbc, 2); /* profile_objecttype */ sr = get_bits(gbc, 4); /* sample_frequency_index */ - if(!ff_mpeg4audio_sample_rates[sr]) + if(!avpriv_mpeg4audio_sample_rates[sr]) return AAC_AC3_PARSE_ERROR_SAMPLE_RATE; skip_bits1(gbc); /* private_bit */ ch = get_bits(gbc, 3); /* channel_configuration */ @@ -62,7 +62,7 @@ hdr->crc_absent = crc_abs; hdr->num_aac_frames = rdb + 1; hdr->sampling_index = sr; - hdr->sample_rate = ff_mpeg4audio_sample_rates[sr]; + hdr->sample_rate = avpriv_mpeg4audio_sample_rates[sr]; hdr->samples = (rdb + 1) * 1024; hdr->bit_rate = size * 8 * hdr->sample_rate / hdr->samples; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacadtsdec.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacadtsdec.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacadtsdec.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacadtsdec.h 2012-01-11 00:34:30.000000000 +0000 @@ -49,6 +49,6 @@ * -2 if the version element is invalid, -3 if the sample rate * element is invalid, or -4 if the bit rate element is invalid. */ -int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr); +int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr); #endif /* AVCODEC_AACADTSDEC_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aac_adtstoasc_bsf.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aac_adtstoasc_bsf.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aac_adtstoasc_bsf.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aac_adtstoasc_bsf.c 2012-01-11 00:34:30.000000000 +0000 @@ -55,7 +55,7 @@ if (show_bits(&gb, 12) != 0xfff) return 0; - if (ff_aac_parse_header(&gb, &hdr) < 0) { + if (avpriv_aac_parse_header(&gb, &hdr) < 0) { av_log(avctx, AV_LOG_ERROR, "Error parsing ADTS frame header!\n"); return -1; } @@ -72,13 +72,13 @@ int pce_size = 0; uint8_t pce_data[MAX_PCE_SIZE]; if (!hdr.chan_config) { - init_get_bits(&gb, buf, buf_size); + init_get_bits(&gb, buf, buf_size * 8); if (get_bits(&gb, 3) != 5) { av_log_missing_feature(avctx, "PCE based channel configuration, where the PCE is not the first syntax element is", 0); return -1; } init_put_bits(&pb, pce_data, MAX_PCE_SIZE); - pce_size = ff_copy_pce_data(&pb, &gb)/8; + pce_size = avpriv_copy_pce_data(&pb, &gb)/8; flush_put_bits(&pb); buf_size -= get_bits_count(&gb)/8; buf += get_bits_count(&gb)/8; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aaccoder.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aaccoder.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aaccoder.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aaccoder.c 2012-01-11 00:34:30.000000000 +0000 @@ -33,6 +33,7 @@ #include "libavutil/libm.h" // brought forward to work around cygwin header breakage #include +#include "libavutil/mathematics.h" #include "avcodec.h" #include "put_bits.h" #include "aac.h" @@ -345,7 +346,7 @@ float cost_stay_here, cost_get_here; float rd = 0.0f; for (w = 0; w < group_len; w++) { - FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(win+w)*16+swb]; + FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(win+w)*16+swb]; rd += quantize_band_cost(s, sce->coeffs + start + w*128, s->scoefs + start + w*128, size, sce->sf_idx[(win+w)*16+swb], cb, @@ -432,10 +433,26 @@ for (swb = 0; swb < max_sfb; swb++) { size = sce->ics.swb_sizes[swb]; if (sce->zeroes[win*16 + swb]) { - for (cb = 0; cb < 12; cb++) { - path[swb+1][cb].prev_idx = cb; - path[swb+1][cb].cost = path[swb][cb].cost; - path[swb+1][cb].run = path[swb][cb].run + 1; + float cost_stay_here = path[swb][0].cost; + float cost_get_here = next_minrd + run_bits + 4; + if ( run_value_bits[sce->ics.num_windows == 8][path[swb][0].run] + != run_value_bits[sce->ics.num_windows == 8][path[swb][0].run+1]) + cost_stay_here += run_bits; + if (cost_get_here < cost_stay_here) { + path[swb+1][0].prev_idx = next_mincb; + path[swb+1][0].cost = cost_get_here; + path[swb+1][0].run = 1; + } else { + path[swb+1][0].prev_idx = 0; + path[swb+1][0].cost = cost_stay_here; + path[swb+1][0].run = path[swb][0].run + 1; + } + next_minrd = path[swb+1][0].cost; + next_mincb = 0; + for (cb = 1; cb < 12; cb++) { + path[swb+1][cb].cost = 61450; + path[swb+1][cb].prev_idx = -1; + path[swb+1][cb].run = 0; } } else { float minrd = next_minrd; @@ -609,7 +626,7 @@ qmin = INT_MAX; qmax = 0.0f; for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { - FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+g]; + FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g]; if (band->energy <= band->threshold || band->threshold == 0.0f) { sce->zeroes[(w+w2)*16+g] = 1; continue; @@ -638,7 +655,7 @@ float dist = 0; int cb = find_min_book(maxval, sce->sf_idx[w*16+g]); for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { - FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+g]; + FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g]; dist += quantize_band_cost(s, coefs + w2*128, s->scoefs + start + w2*128, sce->ics.swb_sizes[g], q + q0, cb, lambda / band->threshold, INFINITY, NULL); } @@ -711,7 +728,7 @@ int nz = 0; float uplim = 0.0f; for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { - FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+g]; + FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g]; uplim += band->threshold; if (band->energy <= band->threshold || band->threshold == 0.0f) { sce->zeroes[(w+w2)*16+g] = 1; @@ -1011,7 +1028,7 @@ for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { for (g = 0; g < sce->ics.num_swb; g++) { for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { - FFPsyBand *band = &s->psy.psy_bands[s->cur_channel*PSY_MAX_BANDS+(w+w2)*16+g]; + FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g]; if (band->energy <= band->threshold) { sce->sf_idx[(w+w2)*16+g] = 218; sce->zeroes[(w+w2)*16+g] = 1; @@ -1049,8 +1066,8 @@ if (!cpe->ch[0].zeroes[w*16+g] && !cpe->ch[1].zeroes[w*16+g]) { float dist1 = 0.0f, dist2 = 0.0f; for (w2 = 0; w2 < sce0->ics.group_len[w]; w2++) { - FFPsyBand *band0 = &s->psy.psy_bands[(s->cur_channel+0)*PSY_MAX_BANDS+(w+w2)*16+g]; - FFPsyBand *band1 = &s->psy.psy_bands[(s->cur_channel+1)*PSY_MAX_BANDS+(w+w2)*16+g]; + FFPsyBand *band0 = &s->psy.ch[s->cur_channel+0].psy_bands[(w+w2)*16+g]; + FFPsyBand *band1 = &s->psy.ch[s->cur_channel+1].psy_bands[(w+w2)*16+g]; float minthr = FFMIN(band0->threshold, band1->threshold); float maxthr = FFMAX(band0->threshold, band1->threshold); for (i = 0; i < sce0->ics.swb_sizes[g]; i++) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacdec.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -98,6 +98,7 @@ #include "aacsbr.h" #include "mpeg4audio.h" #include "aacadtsdec.h" +#include "libavutil/intfloat.h" #include #include @@ -108,11 +109,6 @@ # include "arm/aac.h" #endif -union float754 { - float f; - uint32_t i; -}; - static VLC vlc_scalefactors; static VLC vlc_spectral[11]; @@ -167,6 +163,19 @@ } } +static int count_channels(enum ChannelPosition che_pos[4][MAX_ELEM_ID]) +{ + int i, type, sum = 0; + for (i = 0; i < MAX_ELEM_ID; i++) { + for (type = 0; type < 4; type++) { + sum += (1 + (type == TYPE_CPE)) * + (che_pos[type][i] != AAC_CHANNEL_OFF && + che_pos[type][i] != AAC_CHANNEL_CC); + } + } + return sum; +} + /** * Check for the channel element in the current channel position configuration. * If it exists, make sure the appropriate element is allocated and map the @@ -184,9 +193,11 @@ int type, int id, int *channels) { if (che_pos[type][id]) { - if (!ac->che[type][id] && !(ac->che[type][id] = av_mallocz(sizeof(ChannelElement)))) - return AVERROR(ENOMEM); - ff_aac_sbr_ctx_init(ac, &ac->che[type][id]->sbr); + if (!ac->che[type][id]) { + if (!(ac->che[type][id] = av_mallocz(sizeof(ChannelElement)))) + return AVERROR(ENOMEM); + ff_aac_sbr_ctx_init(ac, &ac->che[type][id]->sbr); + } if (type != TYPE_CCE) { ac->output_data[(*channels)++] = ac->che[type][id]->ch[0].ret; if (type == TYPE_CPE || @@ -420,6 +431,12 @@ if ((ret = set_default_channel_config(avctx, new_che_pos, channel_config))) return ret; } + + if (count_channels(new_che_pos) > 1) { + m4ac->ps = 0; + } else if (m4ac->sbr == 1 && m4ac->ps == -1) + m4ac->ps = 1; + if (ac && (ret = output_configure(ac, ac->che_pos, new_che_pos, channel_config, OC_GLOBAL_HDR))) return ret; @@ -450,15 +467,17 @@ * @param ac pointer to AACContext, may be null * @param avctx pointer to AVCCodecContext, used for logging * @param m4ac pointer to MPEG4AudioConfig, used for parsing - * @param data pointer to AVCodecContext extradata - * @param data_size size of AVCCodecContext extradata + * @param data pointer to buffer holding an audio specific config + * @param bit_size size of audio specific config or data in bits + * @param sync_extension look for an appended sync extension * * @return Returns error status or number of consumed bits. <0 - error */ static int decode_audio_specific_config(AACContext *ac, AVCodecContext *avctx, MPEG4AudioConfig *m4ac, - const uint8_t *data, int data_size) + const uint8_t *data, int bit_size, + int sync_extension) { GetBitContext gb; int i; @@ -468,16 +487,14 @@ av_dlog(avctx, "%02x ", avctx->extradata[i]); av_dlog(avctx, "\n"); - init_get_bits(&gb, data, data_size * 8); + init_get_bits(&gb, data, bit_size); - if ((i = ff_mpeg4audio_get_config(m4ac, data, data_size)) < 0) + if ((i = avpriv_mpeg4audio_get_config(m4ac, data, bit_size, sync_extension)) < 0) return -1; if (m4ac->sampling_index > 12) { av_log(avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", m4ac->sampling_index); return -1; } - if (m4ac->sbr == 1 && m4ac->ps == -1) - m4ac->ps = 1; skip_bits_long(&gb, i); @@ -530,6 +547,22 @@ reset_predict_state(&ps[i]); } +static int sample_rate_idx (int rate) +{ + if (92017 <= rate) return 0; + else if (75132 <= rate) return 1; + else if (55426 <= rate) return 2; + else if (46009 <= rate) return 3; + else if (37566 <= rate) return 4; + else if (27713 <= rate) return 5; + else if (23004 <= rate) return 6; + else if (18783 <= rate) return 7; + else if (13856 <= rate) return 8; + else if (11502 <= rate) return 9; + else if (9391 <= rate) return 10; + else return 11; +} + static void reset_predictor_group(PredictorState *ps, int group_num) { int i; @@ -554,8 +587,33 @@ if (avctx->extradata_size > 0) { if (decode_audio_specific_config(ac, ac->avctx, &ac->m4ac, avctx->extradata, - avctx->extradata_size) < 0) + avctx->extradata_size*8, 1) < 0) return -1; + } else { + int sr, i; + enum ChannelPosition new_che_pos[4][MAX_ELEM_ID]; + + sr = sample_rate_idx(avctx->sample_rate); + ac->m4ac.sampling_index = sr; + ac->m4ac.channels = avctx->channels; + ac->m4ac.sbr = -1; + ac->m4ac.ps = -1; + + for (i = 0; i < FF_ARRAY_ELEMS(ff_mpeg4audio_channels); i++) + if (ff_mpeg4audio_channels[i] == avctx->channels) + break; + if (i == FF_ARRAY_ELEMS(ff_mpeg4audio_channels)) { + i = 0; + } + ac->m4ac.chan_config = i; + + if (ac->m4ac.chan_config) { + int ret = set_default_channel_config(avctx, new_che_pos, ac->m4ac.chan_config); + if (!ret) + output_configure(ac, ac->che_pos, new_che_pos, ac->m4ac.chan_config, OC_GLOBAL_HDR); + else if (avctx->err_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; + } } if (avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT) { @@ -603,6 +661,9 @@ cbrt_tableinit(); + avcodec_get_frame_defaults(&ac->frame); + avctx->coded_frame = &ac->frame; + return 0; } @@ -659,16 +720,13 @@ /** * Decode Individual Channel Stream info; reference: table 4.6. - * - * @param common_window Channels have independent [0], or shared [1], Individual Channel Stream information. */ static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics, - GetBitContext *gb, int common_window) + GetBitContext *gb) { if (get_bits1(gb)) { av_log(ac->avctx, AV_LOG_ERROR, "Reserved bit set.\n"); - memset(ics, 0, sizeof(IndividualChannelStream)); - return -1; + return AVERROR_INVALIDDATA; } ics->window_sequence[1] = ics->window_sequence[0]; ics->window_sequence[0] = get_bits(gb, 2); @@ -703,13 +761,11 @@ if (ics->predictor_present) { if (ac->m4ac.object_type == AOT_AAC_MAIN) { if (decode_prediction(ac, ics, gb)) { - memset(ics, 0, sizeof(IndividualChannelStream)); - return -1; + return AVERROR_INVALIDDATA; } } else if (ac->m4ac.object_type == AOT_AAC_LC) { av_log(ac->avctx, AV_LOG_ERROR, "Prediction is not allowed in AAC-LC.\n"); - memset(ics, 0, sizeof(IndividualChannelStream)); - return -1; + return AVERROR_INVALIDDATA; } else { if ((ics->ltp.present = get_bits(gb, 1))) decode_ltp(ac, &ics->ltp, gb, ics->max_sfb); @@ -721,8 +777,7 @@ av_log(ac->avctx, AV_LOG_ERROR, "Number of scalefactor bands in group (%d) exceeds limit (%d).\n", ics->max_sfb, ics->num_swb); - memset(ics, 0, sizeof(IndividualChannelStream)); - return -1; + return AVERROR_INVALIDDATA; } return 0; @@ -956,7 +1011,7 @@ static inline float *VMUL2S(float *dst, const float *v, unsigned idx, unsigned sign, const float *scale) { - union float754 s0, s1; + union av_intfloat32 s0, s1; s0.f = s1.f = *scale; s0.i ^= sign >> 1 << 31; @@ -974,8 +1029,8 @@ unsigned sign, const float *scale) { unsigned nz = idx >> 12; - union float754 s = { .f = *scale }; - union float754 t; + union av_intfloat32 s = { .f = *scale }; + union av_intfloat32 t; t.i = s.i ^ (sign & 1U<<31); *dst++ = v[idx & 3] * t.f; @@ -1088,7 +1143,7 @@ GET_VLC(code, re, gb, vlc_tab, 8, 2); cb_idx = cb_vector_idx[code]; nnz = cb_idx >> 8 & 15; - bits = SHOW_UBITS(re, gb, nnz) << (32-nnz); + bits = nnz ? GET_CACHE(re, gb) : 0; LAST_SKIP_BITS(re, gb, nnz); cf = VMUL4S(cf, vq, cb_idx, bits, sf + idx); } while (len -= 4); @@ -1128,7 +1183,7 @@ GET_VLC(code, re, gb, vlc_tab, 8, 2); cb_idx = cb_vector_idx[code]; nnz = cb_idx >> 8 & 15; - sign = SHOW_UBITS(re, gb, nnz) << (cb_idx >> 12); + sign = nnz ? SHOW_UBITS(re, gb, nnz) << (cb_idx >> 12) : 0; LAST_SKIP_BITS(re, gb, nnz); cf = VMUL2S(cf, vq, cb_idx, sign, sf + idx); } while (len -= 2); @@ -1224,7 +1279,7 @@ static av_always_inline float flt16_round(float pf) { - union float754 tmp; + union av_intfloat32 tmp; tmp.f = pf; tmp.i = (tmp.i + 0x00008000U) & 0xFFFF0000U; return tmp.f; @@ -1232,7 +1287,7 @@ static av_always_inline float flt16_even(float pf) { - union float754 tmp; + union av_intfloat32 tmp; tmp.f = pf; tmp.i = (tmp.i + 0x00007FFFU + (tmp.i & 0x00010000U >> 16)) & 0xFFFF0000U; return tmp.f; @@ -1240,7 +1295,7 @@ static av_always_inline float flt16_trunc(float pf) { - union float754 pun; + union av_intfloat32 pun; pun.f = pf; pun.i &= 0xFFFF0000U; return pun.f; @@ -1327,8 +1382,8 @@ global_gain = get_bits(gb, 8); if (!common_window && !scale_flag) { - if (decode_ics_info(ac, ics, gb, 0) < 0) - return -1; + if (decode_ics_info(ac, ics, gb) < 0) + return AVERROR_INVALIDDATA; } if (decode_band_types(ac, sce->band_type, sce->band_type_run_end, gb, ics) < 0) @@ -1444,8 +1499,8 @@ common_window = get_bits1(gb); if (common_window) { - if (decode_ics_info(ac, &cpe->ch[0].ics, gb, 1)) - return -1; + if (decode_ics_info(ac, &cpe->ch[0].ics, gb)) + return AVERROR_INVALIDDATA; i = cpe->ch[1].ics.use_kb_window[0]; cpe->ch[1].ics = cpe->ch[0].ics; cpe->ch[1].ics.use_kb_window[1] = i; @@ -1753,12 +1808,10 @@ } else { memset(in, 0, 448 * sizeof(float)); ac->dsp.vector_fmul(in + 448, in + 448, swindow_prev, 128); - memcpy(in + 576, in + 576, 448 * sizeof(float)); } if (ics->window_sequence[0] != LONG_START_SEQUENCE) { ac->dsp.vector_fmul_reverse(in + 1024, in + 1024, lwindow, 1024); } else { - memcpy(in + 1024, in + 1024, 448 * sizeof(float)); ac->dsp.vector_fmul_reverse(in + 1024 + 448, in + 1024 + 448, swindow, 128); memset(in + 1024 + 576, 0, 448 * sizeof(float)); } @@ -2036,26 +2089,28 @@ int size; AACADTSHeaderInfo hdr_info; - size = ff_aac_parse_header(gb, &hdr_info); + size = avpriv_aac_parse_header(gb, &hdr_info); if (size > 0) { - if (ac->output_configured != OC_LOCKED && hdr_info.chan_config) { + if (hdr_info.chan_config) { enum ChannelPosition new_che_pos[4][MAX_ELEM_ID]; memset(new_che_pos, 0, 4 * MAX_ELEM_ID * sizeof(new_che_pos[0][0])); ac->m4ac.chan_config = hdr_info.chan_config; if (set_default_channel_config(ac->avctx, new_che_pos, hdr_info.chan_config)) return -7; - if (output_configure(ac, ac->che_pos, new_che_pos, hdr_info.chan_config, OC_TRIAL_FRAME)) + if (output_configure(ac, ac->che_pos, new_che_pos, hdr_info.chan_config, + FFMAX(ac->output_configured, OC_TRIAL_FRAME))) return -7; } else if (ac->output_configured != OC_LOCKED) { + ac->m4ac.chan_config = 0; ac->output_configured = OC_NONE; } if (ac->output_configured != OC_LOCKED) { ac->m4ac.sbr = -1; ac->m4ac.ps = -1; + ac->m4ac.sample_rate = hdr_info.sample_rate; + ac->m4ac.sampling_index = hdr_info.sampling_index; + ac->m4ac.object_type = hdr_info.object_type; } - ac->m4ac.sample_rate = hdr_info.sample_rate; - ac->m4ac.sampling_index = hdr_info.sampling_index; - ac->m4ac.object_type = hdr_info.object_type; if (!ac->avctx->sample_rate) ac->avctx->sample_rate = hdr_info.sample_rate; if (hdr_info.num_aac_frames == 1) { @@ -2070,13 +2125,13 @@ } static int aac_decode_frame_int(AVCodecContext *avctx, void *data, - int *data_size, GetBitContext *gb) + int *got_frame_ptr, GetBitContext *gb) { AACContext *ac = avctx->priv_data; ChannelElement *che = NULL, *che_prev = NULL; enum RawDataBlockType elem_type, elem_type_prev = TYPE_END; - int err, elem_id, data_size_tmp; - int samples = 0, multiplier; + int err, elem_id; + int samples = 0, multiplier, audio_found = 0; if (show_bits(gb, 12) == 0xfff) { if (parse_adts_frame_header(ac, gb) < 0) { @@ -2107,10 +2162,12 @@ case TYPE_SCE: err = decode_ics(ac, &che->ch[0], gb, 0, 0); + audio_found = 1; break; case TYPE_CPE: err = decode_cpe(ac, gb, che); + audio_found = 1; break; case TYPE_CCE: @@ -2119,6 +2176,7 @@ case TYPE_LFE: err = decode_ics(ac, &che->ch[0], gb, 0, 0); + audio_found = 1; break; case TYPE_DSE: @@ -2176,44 +2234,65 @@ avctx->frame_size = samples; } - data_size_tmp = samples * avctx->channels * - av_get_bytes_per_sample(avctx->sample_fmt); - if (*data_size < data_size_tmp) { - av_log(avctx, AV_LOG_ERROR, - "Output buffer too small (%d) or trying to output too many samples (%d) for this frame.\n", - *data_size, data_size_tmp); - return -1; - } - *data_size = data_size_tmp; - if (samples) { + /* get output buffer */ + ac->frame.nb_samples = samples; + if ((err = avctx->get_buffer(avctx, &ac->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return err; + } + if (avctx->sample_fmt == AV_SAMPLE_FMT_FLT) - ac->fmt_conv.float_interleave(data, (const float **)ac->output_data, + ac->fmt_conv.float_interleave((float *)ac->frame.data[0], + (const float **)ac->output_data, samples, avctx->channels); else - ac->fmt_conv.float_to_int16_interleave(data, (const float **)ac->output_data, + ac->fmt_conv.float_to_int16_interleave((int16_t *)ac->frame.data[0], + (const float **)ac->output_data, samples, avctx->channels); + + *(AVFrame *)data = ac->frame; } + *got_frame_ptr = !!samples; - if (ac->output_configured) + if (ac->output_configured && audio_found) ac->output_configured = OC_LOCKED; return 0; } static int aac_decode_frame(AVCodecContext *avctx, void *data, - int *data_size, AVPacket *avpkt) + int *got_frame_ptr, AVPacket *avpkt) { + AACContext *ac = avctx->priv_data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; GetBitContext gb; int buf_consumed; int buf_offset; int err; + int new_extradata_size; + const uint8_t *new_extradata = av_packet_get_side_data(avpkt, + AV_PKT_DATA_NEW_EXTRADATA, + &new_extradata_size); + + if (new_extradata) { + av_free(avctx->extradata); + avctx->extradata = av_mallocz(new_extradata_size + + FF_INPUT_BUFFER_PADDING_SIZE); + if (!avctx->extradata) + return AVERROR(ENOMEM); + avctx->extradata_size = new_extradata_size; + memcpy(avctx->extradata, new_extradata, new_extradata_size); + if (decode_audio_specific_config(ac, ac->avctx, &ac->m4ac, + avctx->extradata, + avctx->extradata_size*8, 1) < 0) + return AVERROR_INVALIDDATA; + } init_get_bits(&gb, buf, buf_size * 8); - if ((err = aac_decode_frame_int(avctx, data, data_size, &gb)) < 0) + if ((err = aac_decode_frame_int(avctx, data, got_frame_ptr, &gb)) < 0) return err; buf_consumed = (get_bits_count(&gb) + 7) >> 3; @@ -2264,29 +2343,42 @@ } static int latm_decode_audio_specific_config(struct LATMContext *latmctx, - GetBitContext *gb) + GetBitContext *gb, int asclen) { - AVCodecContext *avctx = latmctx->aac_ctx.avctx; - MPEG4AudioConfig m4ac; - int config_start_bit = get_bits_count(gb); - int bits_consumed, esize; + AACContext *ac = &latmctx->aac_ctx; + AVCodecContext *avctx = ac->avctx; + MPEG4AudioConfig m4ac = {0}; + int config_start_bit = get_bits_count(gb); + int sync_extension = 0; + int bits_consumed, esize; + + if (asclen) { + sync_extension = 1; + asclen = FFMIN(asclen, get_bits_left(gb)); + } else + asclen = get_bits_left(gb); if (config_start_bit % 8) { av_log_missing_feature(latmctx->aac_ctx.avctx, "audio specific " "config not byte aligned.\n", 1); return AVERROR_INVALIDDATA; - } else { - bits_consumed = - decode_audio_specific_config(NULL, avctx, &m4ac, + } + bits_consumed = decode_audio_specific_config(NULL, avctx, &m4ac, gb->buffer + (config_start_bit / 8), - get_bits_left(gb) / 8); + asclen, sync_extension); - if (bits_consumed < 0) - return AVERROR_INVALIDDATA; + if (bits_consumed < 0) + return AVERROR_INVALIDDATA; + + if (ac->m4ac.sample_rate != m4ac.sample_rate || + ac->m4ac.chan_config != m4ac.chan_config) { + + av_log(avctx, AV_LOG_INFO, "audio config changed\n"); + latmctx->initialized = 0; esize = (bits_consumed+7) / 8; - if (avctx->extradata_size <= esize) { + if (avctx->extradata_size < esize) { av_free(avctx->extradata); avctx->extradata = av_malloc(esize + FF_INPUT_BUFFER_PADDING_SIZE); if (!avctx->extradata) @@ -2296,9 +2388,8 @@ avctx->extradata_size = esize; memcpy(avctx->extradata, gb->buffer + (config_start_bit/8), esize); memset(avctx->extradata+esize, 0, FF_INPUT_BUFFER_PADDING_SIZE); - - skip_bits_long(gb, bits_consumed); } + skip_bits_long(gb, bits_consumed); return bits_consumed; } @@ -2337,11 +2428,11 @@ // for all but first stream: use_same_config = get_bits(gb, 1); if (!audio_mux_version) { - if ((ret = latm_decode_audio_specific_config(latmctx, gb)) < 0) + if ((ret = latm_decode_audio_specific_config(latmctx, gb, 0)) < 0) return ret; } else { int ascLen = latm_get_value(gb); - if ((ret = latm_decode_audio_specific_config(latmctx, gb)) < 0) + if ((ret = latm_decode_audio_specific_config(latmctx, gb, ascLen)) < 0) return ret; ascLen -= ret; skip_bits_long(gb, ascLen); @@ -2435,16 +2526,13 @@ } -static int latm_decode_frame(AVCodecContext *avctx, void *out, int *out_size, - AVPacket *avpkt) +static int latm_decode_frame(AVCodecContext *avctx, void *out, + int *got_frame_ptr, AVPacket *avpkt) { struct LATMContext *latmctx = avctx->priv_data; int muxlength, err; GetBitContext gb; - if (avpkt->size == 0) - return 0; - init_get_bits(&gb, avpkt->data, avpkt->size * 8); // check for LOAS sync word @@ -2461,11 +2549,12 @@ if (!latmctx->initialized) { if (!avctx->extradata) { - *out_size = 0; + *got_frame_ptr = 0; return avpkt->size; } else { - aac_decode_close(avctx); - if ((err = aac_decode_init(avctx)) < 0) + if ((err = decode_audio_specific_config( + &latmctx->aac_ctx, avctx, &latmctx->aac_ctx.m4ac, + avctx->extradata, avctx->extradata_size*8, 1)) < 0) return err; latmctx->initialized = 1; } @@ -2478,7 +2567,7 @@ return AVERROR_INVALIDDATA; } - if ((err = aac_decode_frame_int(avctx, out, out_size, &gb)) < 0) + if ((err = aac_decode_frame_int(avctx, out, got_frame_ptr, &gb)) < 0) return err; return muxlength; @@ -2487,33 +2576,28 @@ av_cold static int latm_decode_init(AVCodecContext *avctx) { struct LATMContext *latmctx = avctx->priv_data; - int ret; - - ret = aac_decode_init(avctx); + int ret = aac_decode_init(avctx); - if (avctx->extradata_size > 0) { + if (avctx->extradata_size > 0) latmctx->initialized = !ret; - } else { - latmctx->initialized = 0; - } return ret; } AVCodec ff_aac_decoder = { - "aac", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_AAC, - sizeof(AACContext), - aac_decode_init, - NULL, - aac_decode_close, - aac_decode_frame, + .name = "aac", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_AAC, + .priv_data_size = sizeof(AACContext), + .init = aac_decode_init, + .close = aac_decode_close, + .decode = aac_decode_frame, .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"), .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, + .capabilities = CODEC_CAP_CHANNEL_CONF | CODEC_CAP_DR1, .channel_layouts = aac_channel_layout, }; @@ -2534,5 +2618,6 @@ .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, + .capabilities = CODEC_CAP_CHANNEL_CONF | CODEC_CAP_DR1, .channel_layouts = aac_channel_layout, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacdectab.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacdectab.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacdectab.h 2011-04-29 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacdectab.h 2012-01-11 00:34:30.000000000 +0000 @@ -90,7 +90,7 @@ { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_LFE, 0 }, { TYPE_CPE, 2 }, { TYPE_CPE, 1 }, }, }; -static const int64_t aac_channel_layout[8] = { +static const uint64_t aac_channel_layout[8] = { AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_SURROUND, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacenc.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -165,12 +165,13 @@ AACEncContext *s = avctx->priv_data; int i; const uint8_t *sizes[2]; + uint8_t grouping[AAC_MAX_CHANNELS]; int lengths[2]; avctx->frame_size = 1024; for (i = 0; i < 16; i++) - if (avctx->sample_rate == ff_mpeg4audio_sample_rates[i]) + if (avctx->sample_rate == avpriv_mpeg4audio_sample_rates[i]) break; if (i == 16) { av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate %d\n", avctx->sample_rate); @@ -199,8 +200,9 @@ ff_init_ff_sine_windows(10); ff_init_ff_sine_windows(7); + s->chan_map = aac_chan_configs[avctx->channels-1]; s->samples = av_malloc(2 * 1024 * avctx->channels * sizeof(s->samples[0])); - s->cpe = av_mallocz(sizeof(ChannelElement) * aac_chan_configs[avctx->channels-1][0]); + s->cpe = av_mallocz(sizeof(ChannelElement) * s->chan_map[0]); avctx->extradata = av_mallocz(5 + FF_INPUT_BUFFER_PADDING_SIZE); avctx->extradata_size = 5; put_audio_specific_config(avctx); @@ -209,7 +211,9 @@ sizes[1] = swb_size_128[i]; lengths[0] = ff_aac_num_swb_1024[i]; lengths[1] = ff_aac_num_swb_128[i]; - ff_psy_init(&s->psy, avctx, 2, sizes, lengths); + for (i = 0; i < s->chan_map[0]; i++) + grouping[i] = s->chan_map[i + 1] == TYPE_CPE; + ff_psy_init(&s->psy, avctx, 2, sizes, lengths, s->chan_map[0], grouping); s->psypp = ff_psy_preprocess_init(avctx); s->coder = &ff_aac_coders[2]; @@ -363,7 +367,7 @@ if (msc == 0 || ics0->max_sfb == 0) cpe->ms_mode = 0; else - cpe->ms_mode = msc < ics0->max_sfb ? 1 : 2; + cpe->ms_mode = msc < ics0->max_sfb * ics0->num_windows ? 1 : 2; } } @@ -478,7 +482,7 @@ put_bits(&s->pb, 8, namelen - 16); put_bits(&s->pb, 4, 0); //extension type - filler padbits = 8 - (put_bits_count(&s->pb) & 7); - align_put_bits(&s->pb); + avpriv_align_put_bits(&s->pb); for (i = 0; i < namelen - 2; i++) put_bits(&s->pb, 8, name[i]); put_bits(&s->pb, 12 - padbits, 0); @@ -491,7 +495,6 @@ int16_t *samples = s->samples, *samples2, *la; ChannelElement *cpe; int i, ch, w, g, chans, tag, start_ch; - const uint8_t *chan_map = aac_chan_configs[avctx->channels-1]; int chan_el_counter[4]; FFPsyWindowInfo windows[AAC_MAX_CHANNELS]; @@ -504,8 +507,8 @@ } else { start_ch = 0; samples2 = s->samples + 1024 * avctx->channels; - for (i = 0; i < chan_map[0]; i++) { - tag = chan_map[i+1]; + for (i = 0; i < s->chan_map[0]; i++) { + tag = s->chan_map[i+1]; chans = tag == TYPE_CPE ? 2 : 1; ff_psy_preprocess(s->psypp, (uint16_t*)data + start_ch, samples2 + start_ch, start_ch, chans); @@ -520,9 +523,9 @@ } start_ch = 0; - for (i = 0; i < chan_map[0]; i++) { + for (i = 0; i < s->chan_map[0]; i++) { FFPsyWindowInfo* wi = windows + start_ch; - tag = chan_map[i+1]; + tag = s->chan_map[i+1]; chans = tag == TYPE_CPE ? 2 : 1; cpe = &s->cpe[i]; for (ch = 0; ch < chans; ch++) { @@ -537,6 +540,12 @@ wi[ch].window_shape = 0; wi[ch].num_windows = 1; wi[ch].grouping[0] = 1; + + /* Only the lowest 12 coefficients are used in a LFE channel. + * The expression below results in only the bottom 8 coefficients + * being used for 11.025kHz to 16kHz sample rates. + */ + ics->num_swb = s->samplerate_index >= 8 ? 1 : 3; } else { wi[ch] = s->psy.model->window(&s->psy, samples2, la, cur_channel, ics->window_sequence[0]); @@ -547,7 +556,7 @@ ics->use_kb_window[0] = wi[ch].window_shape; ics->num_windows = wi[ch].num_windows; ics->swb_sizes = s->psy.bands [ics->num_windows == 8]; - ics->num_swb = tag == TYPE_LFE ? 12 : s->psy.num_bands[ics->num_windows == 8]; + ics->num_swb = tag == TYPE_LFE ? ics->num_swb : s->psy.num_bands[ics->num_windows == 8]; for (w = 0; w < ics->num_windows; w++) ics->group_len[w] = wi[ch].grouping[w]; @@ -562,16 +571,19 @@ put_bitstream_info(avctx, s, LIBAVCODEC_IDENT); start_ch = 0; memset(chan_el_counter, 0, sizeof(chan_el_counter)); - for (i = 0; i < chan_map[0]; i++) { + for (i = 0; i < s->chan_map[0]; i++) { FFPsyWindowInfo* wi = windows + start_ch; - tag = chan_map[i+1]; + const float *coeffs[2]; + tag = s->chan_map[i+1]; chans = tag == TYPE_CPE ? 2 : 1; cpe = &s->cpe[i]; put_bits(&s->pb, 3, tag); put_bits(&s->pb, 4, chan_el_counter[tag]++); + for (ch = 0; ch < chans; ch++) + coeffs[ch] = cpe->ch[ch].coeffs; + s->psy.model->analyze(&s->psy, start_ch, coeffs, wi); for (ch = 0; ch < chans; ch++) { - s->cur_channel = start_ch + ch; - s->psy.model->analyze(&s->psy, s->cur_channel, cpe->ch[ch].coeffs, &wi[ch]); + s->cur_channel = start_ch * 2 + ch; s->coder->search_for_quantizers(avctx, s, &cpe->ch[ch], s->lambda); } cpe->common_window = 0; @@ -587,7 +599,7 @@ } } } - s->cur_channel = start_ch; + s->cur_channel = start_ch * 2; if (s->options.stereo_mode && cpe->common_window) { if (s->options.stereo_mode > 0) { IndividualChannelStream *ics = &cpe->ch[0].ics; @@ -656,10 +668,10 @@ #define AACENC_FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM static const AVOption aacenc_options[] = { - {"stereo_mode", "Stereo coding method", offsetof(AACEncContext, options.stereo_mode), FF_OPT_TYPE_INT, {.dbl = 0}, -1, 1, AACENC_FLAGS, "stereo_mode"}, - {"auto", "Selected by the Encoder", 0, FF_OPT_TYPE_CONST, {.dbl = -1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"}, - {"ms_off", "Disable Mid/Side coding", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"}, - {"ms_force", "Force Mid/Side for the whole frame if possible", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"}, + {"stereo_mode", "Stereo coding method", offsetof(AACEncContext, options.stereo_mode), AV_OPT_TYPE_INT, {.dbl = 0}, -1, 1, AACENC_FLAGS, "stereo_mode"}, + {"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.dbl = -1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"}, + {"ms_off", "Disable Mid/Side coding", 0, AV_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"}, + {"ms_force", "Force Mid/Side for the whole frame if possible", 0, AV_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"}, {NULL} }; @@ -671,13 +683,13 @@ }; AVCodec ff_aac_encoder = { - "aac", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_AAC, - sizeof(AACEncContext), - aac_encode_init, - aac_encode_frame, - aac_encode_end, + .name = "aac", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_AAC, + .priv_data_size = sizeof(AACEncContext), + .init = aac_encode_init, + .encode = aac_encode_frame, + .close = aac_encode_end, .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacenc.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacenc.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacenc.h 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacenc.h 2012-01-11 00:34:30.000000000 +0000 @@ -61,6 +61,7 @@ int16_t *samples; ///< saved preprocessed input int samplerate_index; ///< MPEG-4 samplerate index + const uint8_t *chan_map; ///< channel configuration map ChannelElement *cpe; ///< channel elements FFPsyContext psy; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aac.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aac.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aac.h 2011-05-17 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aac.h 2012-01-11 00:34:30.000000000 +0000 @@ -84,6 +84,7 @@ #define IS_CODEBOOK_UNSIGNED(x) ((x - 1) & 10) enum ChannelPosition { + AAC_CHANNEL_OFF = 0, AAC_CHANNEL_FRONT = 1, AAC_CHANNEL_SIDE = 2, AAC_CHANNEL_BACK = 3, @@ -104,11 +105,11 @@ * Output configuration status */ enum OCStatus { - OC_NONE, //< Output unconfigured - OC_TRIAL_PCE, //< Output configuration under trial specified by an inband PCE - OC_TRIAL_FRAME, //< Output configuration under trial specified by a frame header - OC_GLOBAL_HDR, //< Output configuration set in a global header but not yet locked - OC_LOCKED, //< Output configuration locked in place + OC_NONE, ///< Output unconfigured + OC_TRIAL_PCE, ///< Output configuration under trial specified by an inband PCE + OC_TRIAL_FRAME, ///< Output configuration under trial specified by a frame header + OC_GLOBAL_HDR, ///< Output configuration set in a global header but not yet locked + OC_LOCKED, ///< Output configuration locked in place }; /** @@ -251,6 +252,7 @@ */ typedef struct { AVCodecContext *avctx; + AVFrame frame; MPEG4AudioConfig m4ac; @@ -258,7 +260,7 @@ DynamicRangeControl che_drc; /** - * @defgroup elements Channel element related data. + * @name Channel element related data * @{ */ enum ChannelPosition che_pos[4][MAX_ELEM_ID]; /**< channel element channel mapping with the @@ -270,14 +272,15 @@ /** @} */ /** - * @defgroup temporary aligned temporary buffers (We do not want to have these on the stack.) + * @name temporary aligned temporary buffers + * (We do not want to have these on the stack.) * @{ */ DECLARE_ALIGNED(32, float, buf_mdct)[1024]; /** @} */ /** - * @defgroup tables Computed / set up during initialization. + * @name Computed / set up during initialization * @{ */ FFTContext mdct; @@ -289,7 +292,7 @@ /** @} */ /** - * @defgroup output Members used for output interleaving. + * @name Members used for output interleaving * @{ */ float *output_data[MAX_CHANNELS]; ///< Points to each element's 'ret' buffer (PCM output). diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aac_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aac_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aac_parser.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aac_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -40,7 +40,7 @@ tmp.u64 = av_be2ne64(state); init_get_bits(&bits, tmp.u8+8-AAC_ADTS_HEADER_SIZE, AAC_ADTS_HEADER_SIZE * 8); - if ((size = ff_aac_parse_header(&bits, &hdr)) < 0) + if ((size = avpriv_aac_parse_header(&bits, &hdr)) < 0) return 0; *need_next_header = 0; *new_frame_start = 1; @@ -61,9 +61,9 @@ AVCodecParser ff_aac_parser = { - { CODEC_ID_AAC }, - sizeof(AACAC3ParseContext), - aac_parse_init, - ff_aac_ac3_parse, - ff_parse_close, + .codec_ids = { CODEC_ID_AAC }, + .priv_data_size = sizeof(AACAC3ParseContext), + .parser_init = aac_parse_init, + .parser_parse = ff_aac_ac3_parse, + .parser_close = ff_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacps.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacps.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacps.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacps.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,9 +28,9 @@ #include "aacps_tablegen.h" #include "aacpsdata.c" -#define PS_BASELINE 0 //< Operate in Baseline PS mode - //< Baseline implies 10 or 20 stereo bands, - //< mixing mode A, and no ipd/opd +#define PS_BASELINE 0 ///< Operate in Baseline PS mode + ///< Baseline implies 10 or 20 stereo bands, + ///< mixing mode A, and no ipd/opd #define numQMFSlots 32 //numTimeSlots * RATE @@ -69,19 +69,19 @@ static VLC vlc_ps[10]; -/** - * Read Inter-channel Intensity Difference/Inter-Channel Coherence/ - * Inter-channel Phase Difference/Overall Phase Difference parameters from the - * bitstream. - * - * @param avctx contains the current codec context - * @param gb pointer to the input bitstream - * @param ps pointer to the Parametric Stereo context - * @param par pointer to the parameter to be read - * @param e envelope to decode - * @param dt 1: time delta-coded, 0: frequency delta-coded - */ #define READ_PAR_DATA(PAR, OFFSET, MASK, ERR_CONDITION) \ +/** \ + * Read Inter-channel Intensity Difference/Inter-Channel Coherence/ \ + * Inter-channel Phase Difference/Overall Phase Difference parameters from the \ + * bitstream. \ + * \ + * @param avctx contains the current codec context \ + * @param gb pointer to the input bitstream \ + * @param ps pointer to the Parametric Stereo context \ + * @param PAR pointer to the parameter to be read \ + * @param e envelope to decode \ + * @param dt 1: time delta-coded, 0: frequency delta-coded \ + */ \ static int read_ ## PAR ## _data(AVCodecContext *avctx, GetBitContext *gb, PSContext *ps, \ int8_t (*PAR)[PS_MAX_NR_IIDICC], int table_idx, int e, int dt) \ { \ @@ -223,7 +223,7 @@ cnt -= 2 + ps_read_extension_data(gb, ps, ps_extension_id); } if (cnt < 0) { - av_log(avctx, AV_LOG_ERROR, "ps extension overflow %d", cnt); + av_log(avctx, AV_LOG_ERROR, "ps extension overflow %d\n", cnt); goto err; } skip_bits(gb, cnt); @@ -654,7 +654,7 @@ const int8_t *k_to_i = is34 ? k_to_i_34 : k_to_i_20; const float peak_decay_factor = 0.76592833836465f; const float transient_impact = 1.5f; - const float a_smooth = 0.25f; //< Smoothing coefficient + const float a_smooth = 0.25f; ///< Smoothing coefficient int i, k, m, n; int n0 = 0, nL = 32; static const int link_delay[] = { 3, 4, 5 }; @@ -813,14 +813,17 @@ const float (*H_LUT)[8][4] = (PS_BASELINE || ps->icc_mode < 3) ? HA : HB; //Remapping - memcpy(H11[0][0], H11[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H11[0][0][0])); - memcpy(H11[1][0], H11[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H11[1][0][0])); - memcpy(H12[0][0], H12[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H12[0][0][0])); - memcpy(H12[1][0], H12[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H12[1][0][0])); - memcpy(H21[0][0], H21[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H21[0][0][0])); - memcpy(H21[1][0], H21[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H21[1][0][0])); - memcpy(H22[0][0], H22[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H22[0][0][0])); - memcpy(H22[1][0], H22[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H22[1][0][0])); + if (ps->num_env_old) { + memcpy(H11[0][0], H11[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H11[0][0][0])); + memcpy(H11[1][0], H11[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H11[1][0][0])); + memcpy(H12[0][0], H12[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H12[0][0][0])); + memcpy(H12[1][0], H12[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H12[1][0][0])); + memcpy(H21[0][0], H21[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H21[0][0][0])); + memcpy(H21[1][0], H21[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H21[1][0][0])); + memcpy(H22[0][0], H22[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H22[0][0][0])); + memcpy(H22[1][0], H22[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H22[1][0][0])); + } + if (is34) { remap34(&iid_mapped, ps->iid_par, ps->nr_iid_par, ps->num_env, 1); remap34(&icc_mapped, ps->icc_par, ps->nr_icc_par, ps->num_env, 1); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacps.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacps.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacps.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacps.h 2012-01-11 00:34:30.000000000 +0000 @@ -52,11 +52,11 @@ int num_env; int enable_ipdopd; int border_position[PS_MAX_NUM_ENV+1]; - int8_t iid_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; //avctx->bit_rate / ctx->avctx->channels; @@ -556,8 +557,8 @@ /** * Calculate band thresholds as suggested in 3GPP TS26.403 */ -static void psy_3gpp_analyze(FFPsyContext *ctx, int channel, - const float *coefs, const FFPsyWindowInfo *wi) +static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel, + const float *coefs, const FFPsyWindowInfo *wi) { AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data; AacPsyChannel *pch = &pctx->ch[channel]; @@ -626,7 +627,7 @@ } /* 5.6.1.3.2 "Calculation of the desired perceptual entropy" */ - ctx->pe[channel] = pe; + ctx->ch[channel].entropy = pe; desired_bits = calc_bit_demand(pctx, pe, ctx->bitres.bits, ctx->bitres.size, wi->num_windows == 8); desired_pe = PSY_3GPP_BITS_TO_PE(desired_bits); /* NOTE: PE correction is kept simple. During initial testing it had very @@ -730,7 +731,7 @@ for (w = 0; w < wi->num_windows*16; w += 16) { for (g = 0; g < num_bands; g++) { AacPsyBand *band = &pch->band[w+g]; - FFPsyBand *psy_band = &ctx->psy_bands[channel*PSY_MAX_BANDS+w+g]; + FFPsyBand *psy_band = &ctx->ch[channel].psy_bands[w+g]; psy_band->threshold = band->thr; psy_band->energy = band->energy; @@ -740,6 +741,16 @@ memcpy(pch->prev_band, pch->band, sizeof(pch->band)); } +static void psy_3gpp_analyze(FFPsyContext *ctx, int channel, + const float **coeffs, const FFPsyWindowInfo *wi) +{ + int ch; + FFPsyChannelGroup *group = ff_psy_find_group(ctx, channel); + + for (ch = 0; ch < group->num_ch; ch++) + psy_3gpp_analyze_channel(ctx, channel + ch, coeffs[ch], &wi[ch]); +} + static av_cold void psy_3gpp_end(FFPsyContext *apc) { AacPsyContext *pctx = (AacPsyContext*) apc->model_priv_data; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacsbr.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacsbr.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aacsbr.c 2011-05-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aacsbr.c 2012-01-11 00:34:30.000000000 +0000 @@ -1181,14 +1181,15 @@ { int i, n; const float *sbr_qmf_window = div ? sbr_qmf_window_ds : sbr_qmf_window_us; + const int step = 128 >> div; float *v; for (i = 0; i < 32; i++) { - if (*v_off == 0) { + if (*v_off < step) { int saved_samples = (1280 - 128) >> div; memcpy(&v0[SBR_SYNTHESIS_BUF_SIZE - saved_samples], v0, saved_samples * sizeof(float)); - *v_off = SBR_SYNTHESIS_BUF_SIZE - saved_samples - (128 >> div); + *v_off = SBR_SYNTHESIS_BUF_SIZE - saved_samples - step; } else { - *v_off -= 128 >> div; + *v_off -= step; } v = v0 + *v_off; if (div) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aasc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aasc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aasc.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aasc.c 2012-01-11 00:34:30.000000000 +0000 @@ -110,14 +110,13 @@ } AVCodec ff_aasc_decoder = { - "aasc", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_AASC, - sizeof(AascContext), - aasc_decode_init, - NULL, - aasc_decode_end, - aasc_decode_frame, - CODEC_CAP_DR1, + .name = "aasc", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_AASC, + .priv_data_size = sizeof(AascContext), + .init = aasc_decode_init, + .close = aasc_decode_end, + .decode = aasc_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3dec.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,6 +30,7 @@ #include #include "libavutil/crc.h" +#include "libavutil/opt.h" #include "internal.h" #include "aac_ac3_parser.h" #include "ac3_parser.h" @@ -37,16 +38,12 @@ #include "ac3dec_data.h" #include "kbdwin.h" -/** Large enough for maximum possible frame size when the specification limit is ignored */ -#define AC3_FRAME_BUFFER_SIZE 32768 - /** * table for ungrouping 3 values in 7 bits. * used for exponents and bap=2 mantissas */ static uint8_t ungroup_3_in_7_bits_tab[128][3]; - /** tables for ungrouping mantissas */ static int b1_mantissas[32][3]; static int b2_mantissas[128][3]; @@ -126,7 +123,7 @@ /* generate table for ungrouping 3 values in 7 bits reference: Section 7.1.3 Exponent Decoding */ - for(i=0; i<128; i++) { + for (i = 0; i < 128; i++) { ungroup_3_in_7_bits_tab[i][0] = i / 25; ungroup_3_in_7_bits_tab[i][1] = (i % 25) / 5; ungroup_3_in_7_bits_tab[i][2] = (i % 25) % 5; @@ -134,13 +131,13 @@ /* generate grouped mantissa tables reference: Section 7.3.5 Ungrouping of Mantissas */ - for(i=0; i<32; i++) { + for (i = 0; i < 32; i++) { /* bap=1 mantissas */ b1_mantissas[i][0] = symmetric_dequant(ff_ac3_ungroup_3_in_5_bits_tab[i][0], 3); b1_mantissas[i][1] = symmetric_dequant(ff_ac3_ungroup_3_in_5_bits_tab[i][1], 3); b1_mantissas[i][2] = symmetric_dequant(ff_ac3_ungroup_3_in_5_bits_tab[i][2], 3); } - for(i=0; i<128; i++) { + for (i = 0; i < 128; i++) { /* bap=2 mantissas */ b2_mantissas[i][0] = symmetric_dequant(ungroup_3_in_7_bits_tab[i][0], 5); b2_mantissas[i][1] = symmetric_dequant(ungroup_3_in_7_bits_tab[i][1], 5); @@ -152,24 +149,23 @@ } /* generate ungrouped mantissa tables reference: Tables 7.21 and 7.23 */ - for(i=0; i<7; i++) { + for (i = 0; i < 7; i++) { /* bap=3 mantissas */ b3_mantissas[i] = symmetric_dequant(i, 7); } - for(i=0; i<15; i++) { + for (i = 0; i < 15; i++) { /* bap=5 mantissas */ b5_mantissas[i] = symmetric_dequant(i, 15); } /* generate dynamic range table reference: Section 7.7.1 Dynamic Range Control */ - for(i=0; i<256; i++) { + for (i = 0; i < 256; i++) { int v = (i >> 5) - ((i >> 7) << 3) - 5; dynamic_range_tab[i] = powf(2.0f, v) * ((i & 0x1F) | 0x20); } } - /** * AVCodec initialization */ @@ -178,6 +174,11 @@ AC3DecodeContext *s = avctx->priv_data; s->avctx = avctx; +#if FF_API_DRC_SCALE + if (avctx->drc_scale) + s->drc_scale = avctx->drc_scale; +#endif + ff_ac3_common_init(); ac3_tables_init(); ff_mdct_init(&s->imdct_256, 8, 1, 1.0); @@ -205,10 +206,8 @@ } s->downmixed = 1; - /* allocate context input buffer */ - s->input_buffer = av_mallocz(AC3_FRAME_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); - if (!s->input_buffer) - return AVERROR(ENOMEM); + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; return 0; } @@ -224,7 +223,7 @@ int i; /* read the rest of the bsi. read twice for dual mono mode. */ - i = !(s->channel_mode); + i = !s->channel_mode; do { skip_bits(gbc, 5); // skip dialog normalization if (get_bits1(gbc)) @@ -249,7 +248,7 @@ i = get_bits(gbc, 6); do { skip_bits(gbc, 8); - } while(i--); + } while (i--); } return 0; @@ -263,8 +262,8 @@ AC3HeaderInfo hdr; int err; - err = ff_ac3_parse_header(&s->gbc, &hdr); - if(err) + err = avpriv_ac3_parse_header(&s->gbc, &hdr); + if (err) return err; /* get decoding parameters from header info */ @@ -286,9 +285,9 @@ s->frame_type = hdr.frame_type; s->substreamid = hdr.substreamid; - if(s->lfe_on) { - s->start_freq[s->lfe_ch] = 0; - s->end_freq[s->lfe_ch] = 7; + if (s->lfe_on) { + s->start_freq[s->lfe_ch] = 0; + s->end_freq[s->lfe_ch] = 7; s->num_exp_groups[s->lfe_ch] = 2; s->channel_in_cpl[s->lfe_ch] = 0; } @@ -325,38 +324,39 @@ float smix = gain_levels[surround_levels[s->surround_mix_level]]; float norm0, norm1; - for(i=0; ifbw_channels; i++) { + for (i = 0; i < s->fbw_channels; i++) { s->downmix_coeffs[i][0] = gain_levels[ac3_default_coeffs[s->channel_mode][i][0]]; s->downmix_coeffs[i][1] = gain_levels[ac3_default_coeffs[s->channel_mode][i][1]]; } - if(s->channel_mode > 1 && s->channel_mode & 1) { + if (s->channel_mode > 1 && s->channel_mode & 1) { s->downmix_coeffs[1][0] = s->downmix_coeffs[1][1] = cmix; } - if(s->channel_mode == AC3_CHMODE_2F1R || s->channel_mode == AC3_CHMODE_3F1R) { + if (s->channel_mode == AC3_CHMODE_2F1R || s->channel_mode == AC3_CHMODE_3F1R) { int nf = s->channel_mode - 2; s->downmix_coeffs[nf][0] = s->downmix_coeffs[nf][1] = smix * LEVEL_MINUS_3DB; } - if(s->channel_mode == AC3_CHMODE_2F2R || s->channel_mode == AC3_CHMODE_3F2R) { + if (s->channel_mode == AC3_CHMODE_2F2R || s->channel_mode == AC3_CHMODE_3F2R) { int nf = s->channel_mode - 4; s->downmix_coeffs[nf][0] = s->downmix_coeffs[nf+1][1] = smix; } /* renormalize */ norm0 = norm1 = 0.0; - for(i=0; ifbw_channels; i++) { + for (i = 0; i < s->fbw_channels; i++) { norm0 += s->downmix_coeffs[i][0]; norm1 += s->downmix_coeffs[i][1]; } norm0 = 1.0f / norm0; norm1 = 1.0f / norm1; - for(i=0; ifbw_channels; i++) { + for (i = 0; i < s->fbw_channels; i++) { s->downmix_coeffs[i][0] *= norm0; s->downmix_coeffs[i][1] *= norm1; } - if(s->output_mode == AC3_CHMODE_MONO) { - for(i=0; ifbw_channels; i++) - s->downmix_coeffs[i][0] = (s->downmix_coeffs[i][0] + s->downmix_coeffs[i][1]) * LEVEL_MINUS_3DB; + if (s->output_mode == AC3_CHMODE_MONO) { + for (i = 0; i < s->fbw_channels; i++) + s->downmix_coeffs[i][0] = (s->downmix_coeffs[i][0] + + s->downmix_coeffs[i][1]) * LEVEL_MINUS_3DB; } } @@ -373,7 +373,7 @@ /* unpack groups */ group_size = exp_strategy + (exp_strategy == EXP_D45); - for(grp=0,i=0; grp 24U) return -1; switch (group_size) { - case 4: dexps[j++] = prevexp; - dexps[j++] = prevexp; - case 2: dexps[j++] = prevexp; - case 1: dexps[j++] = prevexp; + case 4: dexps[j++] = prevexp; + dexps[j++] = prevexp; + case 2: dexps[j++] = prevexp; + case 1: dexps[j++] = prevexp; } } return 0; @@ -413,7 +413,8 @@ if (s->channel_in_cpl[ch]) { int cpl_coord = s->cpl_coords[ch][band] << 5; for (bin = band_start; bin < band_end; bin++) { - s->fixed_coeffs[ch][bin] = MULH(s->fixed_coeffs[CPL_CH][bin] << 4, cpl_coord); + s->fixed_coeffs[ch][bin] = + MULH(s->fixed_coeffs[CPL_CH][bin] << 4, cpl_coord); } if (ch == 2 && s->phase_flags[band]) { for (bin = band_start; bin < band_end; bin++) @@ -444,73 +445,70 @@ static void ac3_decode_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, mant_groups *m) { int start_freq = s->start_freq[ch_index]; - int end_freq = s->end_freq[ch_index]; - uint8_t *baps = s->bap[ch_index]; - int8_t *exps = s->dexps[ch_index]; - int *coeffs = s->fixed_coeffs[ch_index]; - int dither = (ch_index == CPL_CH) || s->dither_flag[ch_index]; + int end_freq = s->end_freq[ch_index]; + uint8_t *baps = s->bap[ch_index]; + int8_t *exps = s->dexps[ch_index]; + int *coeffs = s->fixed_coeffs[ch_index]; + int dither = (ch_index == CPL_CH) || s->dither_flag[ch_index]; GetBitContext *gbc = &s->gbc; int freq; - for(freq = start_freq; freq < end_freq; freq++){ + for (freq = start_freq; freq < end_freq; freq++) { int bap = baps[freq]; int mantissa; - switch(bap){ - case 0: - if (dither) - mantissa = (av_lfg_get(&s->dith_state) & 0x7FFFFF) - 0x400000; - else - mantissa = 0; - break; - case 1: - if(m->b1){ - m->b1--; - mantissa = m->b1_mant[m->b1]; - } - else{ - int bits = get_bits(gbc, 5); - mantissa = b1_mantissas[bits][0]; - m->b1_mant[1] = b1_mantissas[bits][1]; - m->b1_mant[0] = b1_mantissas[bits][2]; - m->b1 = 2; - } - break; - case 2: - if(m->b2){ - m->b2--; - mantissa = m->b2_mant[m->b2]; - } - else{ - int bits = get_bits(gbc, 7); - mantissa = b2_mantissas[bits][0]; - m->b2_mant[1] = b2_mantissas[bits][1]; - m->b2_mant[0] = b2_mantissas[bits][2]; - m->b2 = 2; - } - break; - case 3: - mantissa = b3_mantissas[get_bits(gbc, 3)]; - break; - case 4: - if(m->b4){ - m->b4 = 0; - mantissa = m->b4_mant; - } - else{ - int bits = get_bits(gbc, 7); - mantissa = b4_mantissas[bits][0]; - m->b4_mant = b4_mantissas[bits][1]; - m->b4 = 1; - } - break; - case 5: - mantissa = b5_mantissas[get_bits(gbc, 4)]; - break; - default: /* 6 to 15 */ - mantissa = get_bits(gbc, quantization_tab[bap]); - /* Shift mantissa and sign-extend it. */ - mantissa = (mantissa << (32-quantization_tab[bap]))>>8; - break; + switch (bap) { + case 0: + if (dither) + mantissa = (av_lfg_get(&s->dith_state) & 0x7FFFFF) - 0x400000; + else + mantissa = 0; + break; + case 1: + if (m->b1) { + m->b1--; + mantissa = m->b1_mant[m->b1]; + } else { + int bits = get_bits(gbc, 5); + mantissa = b1_mantissas[bits][0]; + m->b1_mant[1] = b1_mantissas[bits][1]; + m->b1_mant[0] = b1_mantissas[bits][2]; + m->b1 = 2; + } + break; + case 2: + if (m->b2) { + m->b2--; + mantissa = m->b2_mant[m->b2]; + } else { + int bits = get_bits(gbc, 7); + mantissa = b2_mantissas[bits][0]; + m->b2_mant[1] = b2_mantissas[bits][1]; + m->b2_mant[0] = b2_mantissas[bits][2]; + m->b2 = 2; + } + break; + case 3: + mantissa = b3_mantissas[get_bits(gbc, 3)]; + break; + case 4: + if (m->b4) { + m->b4 = 0; + mantissa = m->b4_mant; + } else { + int bits = get_bits(gbc, 7); + mantissa = b4_mantissas[bits][0]; + m->b4_mant = b4_mantissas[bits][1]; + m->b4 = 1; + } + break; + case 5: + mantissa = b5_mantissas[get_bits(gbc, 4)]; + break; + default: /* 6 to 15 */ + /* Shift mantissa and sign-extend it. */ + mantissa = get_sbits(gbc, quantization_tab[bap]); + mantissa <<= 24 - quantization_tab[bap]; + break; } coeffs[freq] = mantissa >> exps[freq]; } @@ -524,10 +522,10 @@ static void remove_dithering(AC3DecodeContext *s) { int ch, i; - for(ch=1; ch<=s->fbw_channels; ch++) { - if(!s->dither_flag[ch] && s->channel_in_cpl[ch]) { - for(i = s->start_freq[CPL_CH]; iend_freq[CPL_CH]; i++) { - if(!s->bap[CPL_CH][i]) + for (ch = 1; ch <= s->fbw_channels; ch++) { + if (!s->dither_flag[ch] && s->channel_in_cpl[ch]) { + for (i = s->start_freq[CPL_CH]; i < s->end_freq[CPL_CH]; i++) { + if (!s->bap[CPL_CH][i]) s->fixed_coeffs[ch][i] = 0; } } @@ -535,7 +533,7 @@ } static void decode_transform_coeffs_ch(AC3DecodeContext *s, int blk, int ch, - mant_groups *m) + mant_groups *m) { if (!s->channel_uses_aht[ch]) { ac3_decode_transform_coeffs_ch(s, ch, m); @@ -579,7 +577,7 @@ } do s->fixed_coeffs[ch][end] = 0; - while(++end < 256); + while (++end < 256); } /* zero the dithered coefficients for appropriate channels */ @@ -597,10 +595,10 @@ end = FFMIN(s->end_freq[1], s->end_freq[2]); - for(bnd=0; bndnum_rematrixing_bands; bnd++) { - if(s->rematrixing_flags[bnd]) { - bndend = FFMIN(end, ff_ac3_rematrix_band_tab[bnd+1]); - for(i=ff_ac3_rematrix_band_tab[bnd]; inum_rematrixing_bands; bnd++) { + if (s->rematrixing_flags[bnd]) { + bndend = FFMIN(end, ff_ac3_rematrix_band_tab[bnd + 1]); + for (i = ff_ac3_rematrix_band_tab[bnd]; i < bndend; i++) { int tmp0 = s->fixed_coeffs[1][i]; s->fixed_coeffs[1][i] += s->fixed_coeffs[2][i]; s->fixed_coeffs[2][i] = tmp0 - s->fixed_coeffs[2][i]; @@ -618,21 +616,23 @@ { int ch; - for (ch=1; ch<=channels; ch++) { + for (ch = 1; ch <= channels; ch++) { if (s->block_switch[ch]) { int i; - float *x = s->tmp_output+128; - for(i=0; i<128; i++) - x[i] = s->transform_coeffs[ch][2*i]; + float *x = s->tmp_output + 128; + for (i = 0; i < 128; i++) + x[i] = s->transform_coeffs[ch][2 * i]; s->imdct_256.imdct_half(&s->imdct_256, s->tmp_output, x); - s->dsp.vector_fmul_window(s->output[ch-1], s->delay[ch-1], s->tmp_output, s->window, 128); - for(i=0; i<128; i++) - x[i] = s->transform_coeffs[ch][2*i+1]; - s->imdct_256.imdct_half(&s->imdct_256, s->delay[ch-1], x); + s->dsp.vector_fmul_window(s->output[ch - 1], s->delay[ch - 1], + s->tmp_output, s->window, 128); + for (i = 0; i < 128; i++) + x[i] = s->transform_coeffs[ch][2 * i + 1]; + s->imdct_256.imdct_half(&s->imdct_256, s->delay[ch - 1], x); } else { s->imdct_512.imdct_half(&s->imdct_512, s->tmp_output, s->transform_coeffs[ch]); - s->dsp.vector_fmul_window(s->output[ch-1], s->delay[ch-1], s->tmp_output, s->window, 128); - memcpy(s->delay[ch-1], s->tmp_output+128, 128*sizeof(float)); + s->dsp.vector_fmul_window(s->output[ch - 1], s->delay[ch - 1], + s->tmp_output, s->window, 128); + memcpy(s->delay[ch - 1], s->tmp_output + 128, 128 * sizeof(float)); } } } @@ -640,24 +640,25 @@ /** * Downmix the output to mono or stereo. */ -void ff_ac3_downmix_c(float (*samples)[256], float (*matrix)[2], int out_ch, int in_ch, int len) +void ff_ac3_downmix_c(float (*samples)[256], float (*matrix)[2], + int out_ch, int in_ch, int len) { int i, j; float v0, v1; - if(out_ch == 2) { - for(i=0; idelay[0]); - switch(s->channel_mode) { - case AC3_CHMODE_DUALMONO: - case AC3_CHMODE_STEREO: - /* upmix mono to stereo */ - memcpy(s->delay[1], s->delay[0], channel_data_size); - break; - case AC3_CHMODE_2F2R: - memset(s->delay[3], 0, channel_data_size); - case AC3_CHMODE_2F1R: - memset(s->delay[2], 0, channel_data_size); - break; - case AC3_CHMODE_3F2R: - memset(s->delay[4], 0, channel_data_size); - case AC3_CHMODE_3F1R: - memset(s->delay[3], 0, channel_data_size); - case AC3_CHMODE_3F: - memcpy(s->delay[2], s->delay[1], channel_data_size); - memset(s->delay[1], 0, channel_data_size); - break; + switch (s->channel_mode) { + case AC3_CHMODE_DUALMONO: + case AC3_CHMODE_STEREO: + /* upmix mono to stereo */ + memcpy(s->delay[1], s->delay[0], channel_data_size); + break; + case AC3_CHMODE_2F2R: + memset(s->delay[3], 0, channel_data_size); + case AC3_CHMODE_2F1R: + memset(s->delay[2], 0, channel_data_size); + break; + case AC3_CHMODE_3F2R: + memset(s->delay[4], 0, channel_data_size); + case AC3_CHMODE_3F1R: + memset(s->delay[3], 0, channel_data_size); + case AC3_CHMODE_3F: + memcpy(s->delay[2], s->delay[1], channel_data_size); + memset(s->delay[1], 0, channel_data_size); + break; } } @@ -741,7 +742,7 @@ bnd_sz[0] = ecpl ? 6 : 12; for (bnd = 0, subbnd = 1; subbnd < n_subbands; subbnd++) { int subbnd_size = (ecpl && subbnd < 4) ? 6 : 12; - if (band_struct[subbnd-1]) { + if (band_struct[subbnd - 1]) { n_bands--; bnd_sz[bnd] += subbnd_size; } else { @@ -778,7 +779,7 @@ if (s->block_switch_syntax) { for (ch = 1; ch <= fbw_channels; ch++) { s->block_switch[ch] = get_bits1(gbc); - if(ch > 1 && s->block_switch[ch] != s->block_switch[1]) + if (ch > 1 && s->block_switch[ch] != s->block_switch[1]) different_transforms = 1; } } @@ -791,15 +792,15 @@ } /* dynamic range */ - i = !(s->channel_mode); + i = !s->channel_mode; do { - if(get_bits1(gbc)) { - s->dynamic_range[i] = ((dynamic_range_tab[get_bits(gbc, 8)]-1.0) * - s->avctx->drc_scale)+1.0; - } else if(blk == 0) { + if (get_bits1(gbc)) { + s->dynamic_range[i] = ((dynamic_range_tab[get_bits(gbc, 8)] - 1.0) * + s->drc_scale) + 1.0; + } else if (blk == 0) { s->dynamic_range[i] = 1.0f; } - } while(i--); + } while (i--); /* spectral extension strategy */ if (s->eac3 && (!blk || get_bits1(gbc))) { @@ -880,7 +881,8 @@ bandsize = s->spx_band_sizes[bnd]; nratio = ((float)((bin + (bandsize >> 1))) / s->spx_dst_end_freq) - spx_blend; nratio = av_clipf(nratio, 0.0f, 1.0f); - nblend = sqrtf(3.0f * nratio); // noise is scaled by sqrt(3) to give unity variance + nblend = sqrtf(3.0f * nratio); // noise is scaled by sqrt(3) + // to give unity variance sblend = sqrtf(1.0f - nratio); bin += bandsize; @@ -890,7 +892,7 @@ if (spx_coord_exp == 15) spx_coord_mant <<= 1; else spx_coord_mant += 4; spx_coord_mant <<= (25 - spx_coord_exp - master_spx_coord); - spx_coord = spx_coord_mant * (1.0f/(1<<23)); + spx_coord = spx_coord_mant * (1.0f / (1 << 23)); /* multiply noise and signal blending factors by spx coordinate */ s->spx_noise_blend [ch][bnd] = nblend * spx_coord; @@ -963,8 +965,9 @@ s->phase_flags_in_use = 0; } } else if (!s->eac3) { - if(!blk) { - av_log(s->avctx, AV_LOG_ERROR, "new coupling strategy must be present in block 0\n"); + if (!blk) { + av_log(s->avctx, AV_LOG_ERROR, "new coupling strategy must " + "be present in block 0\n"); return -1; } else { s->cpl_in_use[blk] = s->cpl_in_use[blk-1]; @@ -993,7 +996,8 @@ s->cpl_coords[ch][bnd] >>= (cpl_coord_exp + master_cpl_coord); } } else if (!blk) { - av_log(s->avctx, AV_LOG_ERROR, "new coupling coordinates must be present in block 0\n"); + av_log(s->avctx, AV_LOG_ERROR, "new coupling coordinates must " + "be present in block 0\n"); return -1; } } else { @@ -1018,10 +1022,11 @@ } else if (s->spx_in_use && s->spx_src_start_freq <= 61) { s->num_rematrixing_bands--; } - for(bnd=0; bndnum_rematrixing_bands; bnd++) + for (bnd = 0; bnd < s->num_rematrixing_bands; bnd++) s->rematrixing_flags[bnd] = get_bits1(gbc); } else if (!blk) { - av_log(s->avctx, AV_LOG_WARNING, "Warning: new rematrixing strategy not present in block 0\n"); + av_log(s->avctx, AV_LOG_WARNING, "Warning: " + "new rematrixing strategy not present in block 0\n"); s->num_rematrixing_bands = 0; } } @@ -1030,7 +1035,7 @@ for (ch = !cpl_in_use; ch <= s->channels; ch++) { if (!s->eac3) s->exp_strategy[blk][ch] = get_bits(gbc, 2 - (ch == s->lfe_ch)); - if(s->exp_strategy[blk][ch] != EXP_REUSE) + if (s->exp_strategy[blk][ch] != EXP_REUSE) bit_alloc_stages[ch] = 3; } @@ -1053,8 +1058,8 @@ s->end_freq[ch] = bandwidth_code * 3 + 73; } group_size = 3 << (s->exp_strategy[blk][ch] - 1); - s->num_exp_groups[ch] = (s->end_freq[ch]+group_size-4) / group_size; - if(blk > 0 && s->end_freq[ch] != prev) + s->num_exp_groups[ch] = (s->end_freq[ch] + group_size-4) / group_size; + if (blk > 0 && s->end_freq[ch] != prev) memset(bit_alloc_stages, 3, AC3_MAX_CHANNELS); } } @@ -1073,7 +1078,7 @@ av_log(s->avctx, AV_LOG_ERROR, "exponent out-of-range\n"); return -1; } - if(ch != CPL_CH && ch != s->lfe_ch) + if (ch != CPL_CH && ch != s->lfe_ch) skip_bits(gbc, 2); /* skip gainrng */ } } @@ -1086,17 +1091,18 @@ s->bit_alloc_params.slow_gain = ff_ac3_slow_gain_tab[get_bits(gbc, 2)]; s->bit_alloc_params.db_per_bit = ff_ac3_db_per_bit_tab[get_bits(gbc, 2)]; s->bit_alloc_params.floor = ff_ac3_floor_tab[get_bits(gbc, 3)]; - for(ch=!cpl_in_use; ch<=s->channels; ch++) + for (ch = !cpl_in_use; ch <= s->channels; ch++) bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 2); } else if (!blk) { - av_log(s->avctx, AV_LOG_ERROR, "new bit allocation info must be present in block 0\n"); + av_log(s->avctx, AV_LOG_ERROR, "new bit allocation info must " + "be present in block 0\n"); return -1; } } /* signal-to-noise ratio offsets and fast gains (signal-to-mask ratios) */ - if(!s->eac3 || !blk){ - if(s->snr_offset_strategy && get_bits1(gbc)) { + if (!s->eac3 || !blk) { + if (s->snr_offset_strategy && get_bits1(gbc)) { int snr = 0; int csnr; csnr = (get_bits(gbc, 6) - 15) << 4; @@ -1105,7 +1111,7 @@ if (ch == i || s->snr_offset_strategy == 2) snr = (csnr + get_bits(gbc, 4)) << 2; /* run at least last bit allocation stage if snr offset changes */ - if(blk && s->snr_offset[ch] != snr) { + if (blk && s->snr_offset[ch] != snr) { bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 1); } s->snr_offset[ch] = snr; @@ -1115,7 +1121,7 @@ int prev = s->fast_gain[ch]; s->fast_gain[ch] = ff_ac3_fast_gain_tab[get_bits(gbc, 3)]; /* run last 2 bit allocation stages if fast gain changes */ - if(blk && prev != s->fast_gain[ch]) + if (blk && prev != s->fast_gain[ch]) bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 2); } } @@ -1131,7 +1137,7 @@ int prev = s->fast_gain[ch]; s->fast_gain[ch] = ff_ac3_fast_gain_tab[get_bits(gbc, 3)]; /* run last 2 bit allocation stages if fast gain changes */ - if(blk && prev != s->fast_gain[ch]) + if (blk && prev != s->fast_gain[ch]) bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 2); } } else if (s->eac3 && !blk) { @@ -1151,14 +1157,15 @@ int sl = get_bits(gbc, 3); /* run last 2 bit allocation stages for coupling channel if coupling leak changes */ - if(blk && (fl != s->bit_alloc_params.cpl_fast_leak || - sl != s->bit_alloc_params.cpl_slow_leak)) { + if (blk && (fl != s->bit_alloc_params.cpl_fast_leak || + sl != s->bit_alloc_params.cpl_slow_leak)) { bit_alloc_stages[CPL_CH] = FFMAX(bit_alloc_stages[CPL_CH], 2); } s->bit_alloc_params.cpl_fast_leak = fl; s->bit_alloc_params.cpl_slow_leak = sl; } else if (!s->eac3 && !blk) { - av_log(s->avctx, AV_LOG_ERROR, "new coupling leak info must be present in block 0\n"); + av_log(s->avctx, AV_LOG_ERROR, "new coupling leak info must " + "be present in block 0\n"); return -1; } s->first_cpl_leak = 0; @@ -1182,40 +1189,40 @@ for (seg = 0; seg < s->dba_nsegs[ch]; seg++) { s->dba_offsets[ch][seg] = get_bits(gbc, 5); s->dba_lengths[ch][seg] = get_bits(gbc, 4); - s->dba_values[ch][seg] = get_bits(gbc, 3); + s->dba_values[ch][seg] = get_bits(gbc, 3); } /* run last 2 bit allocation stages if new dba values */ bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 2); } } - } else if(blk == 0) { - for(ch=0; ch<=s->channels; ch++) { + } else if (blk == 0) { + for (ch = 0; ch <= s->channels; ch++) { s->dba_mode[ch] = DBA_NONE; } } /* Bit allocation */ - for(ch=!cpl_in_use; ch<=s->channels; ch++) { - if(bit_alloc_stages[ch] > 2) { + for (ch = !cpl_in_use; ch <= s->channels; ch++) { + if (bit_alloc_stages[ch] > 2) { /* Exponent mapping into PSD and PSD integration */ ff_ac3_bit_alloc_calc_psd(s->dexps[ch], s->start_freq[ch], s->end_freq[ch], s->psd[ch], s->band_psd[ch]); } - if(bit_alloc_stages[ch] > 1) { + if (bit_alloc_stages[ch] > 1) { /* Compute excitation function, Compute masking curve, and Apply delta bit allocation */ if (ff_ac3_bit_alloc_calc_mask(&s->bit_alloc_params, s->band_psd[ch], - s->start_freq[ch], s->end_freq[ch], - s->fast_gain[ch], (ch == s->lfe_ch), - s->dba_mode[ch], s->dba_nsegs[ch], + s->start_freq[ch], s->end_freq[ch], + s->fast_gain[ch], (ch == s->lfe_ch), + s->dba_mode[ch], s->dba_nsegs[ch], s->dba_offsets[ch], s->dba_lengths[ch], - s->dba_values[ch], s->mask[ch])) { + s->dba_values[ch], s->mask[ch])) { av_log(s->avctx, AV_LOG_ERROR, "error in bit allocation\n"); return -1; } } - if(bit_alloc_stages[ch] > 0) { + if (bit_alloc_stages[ch] > 0) { /* Compute bit allocation */ const uint8_t *bap_tab = s->channel_uses_aht[ch] ? ff_eac3_hebap_tab : ff_ac3_bap_tab; @@ -1230,7 +1237,7 @@ /* unused dummy data */ if (s->skip_syntax && get_bits1(gbc)) { int skipl = get_bits(gbc, 9); - while(skipl--) + while (skipl--) skip_bits(gbc, 8); } @@ -1241,18 +1248,19 @@ /* TODO: generate enhanced coupling coordinates and uncouple */ /* recover coefficients if rematrixing is in use */ - if(s->channel_mode == AC3_CHMODE_STEREO) + if (s->channel_mode == AC3_CHMODE_STEREO) do_rematrixing(s); /* apply scaling to coefficients (headroom, dynrng) */ - for(ch=1; ch<=s->channels; ch++) { + for (ch = 1; ch <= s->channels; ch++) { float gain = s->mul_bias / 4194304.0f; - if(s->channel_mode == AC3_CHMODE_DUALMONO) { - gain *= s->dynamic_range[2-ch]; + if (s->channel_mode == AC3_CHMODE_DUALMONO) { + gain *= s->dynamic_range[2 - ch]; } else { gain *= s->dynamic_range[0]; } - s->fmt_conv.int32_to_float_fmul_scalar(s->transform_coeffs[ch], s->fixed_coeffs[ch], gain, 256); + s->fmt_conv.int32_to_float_fmul_scalar(s->transform_coeffs[ch], + s->fixed_coeffs[ch], gain, 256); } /* apply spectral extension to high frequency bins */ @@ -1266,27 +1274,30 @@ downmix_output = s->channels != s->out_channels && !((s->output_mode & AC3_OUTPUT_LFEON) && s->fbw_channels == s->out_channels); - if(different_transforms) { + if (different_transforms) { /* the delay samples have already been downmixed, so we upmix the delay samples in order to reconstruct all channels before downmixing. */ - if(s->downmixed) { + if (s->downmixed) { s->downmixed = 0; ac3_upmix_delay(s); } do_imdct(s, s->channels); - if(downmix_output) { - s->dsp.ac3_downmix(s->output, s->downmix_coeffs, s->out_channels, s->fbw_channels, 256); + if (downmix_output) { + s->dsp.ac3_downmix(s->output, s->downmix_coeffs, + s->out_channels, s->fbw_channels, 256); } } else { - if(downmix_output) { - s->dsp.ac3_downmix(s->transform_coeffs+1, s->downmix_coeffs, s->out_channels, s->fbw_channels, 256); + if (downmix_output) { + s->dsp.ac3_downmix(s->transform_coeffs + 1, s->downmix_coeffs, + s->out_channels, s->fbw_channels, 256); } - if(downmix_output && !s->downmixed) { + if (downmix_output && !s->downmixed) { s->downmixed = 1; - s->dsp.ac3_downmix(s->delay, s->downmix_coeffs, s->out_channels, s->fbw_channels, 128); + s->dsp.ac3_downmix(s->delay, s->downmix_coeffs, s->out_channels, + s->fbw_channels, 128); } do_imdct(s, s->out_channels); @@ -1298,15 +1309,15 @@ /** * Decode a single AC-3 frame. */ -static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, - AVPacket *avpkt) +static int ac3_decode_frame(AVCodecContext * avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AC3DecodeContext *s = avctx->priv_data; - float *out_samples_flt = data; - int16_t *out_samples_s16 = data; - int blk, ch, err; + float *out_samples_flt; + int16_t *out_samples_s16; + int blk, ch, err, ret; const uint8_t *channel_map; const float *output[AC3_MAX_CHANNELS]; @@ -1323,45 +1334,47 @@ init_get_bits(&s->gbc, buf, buf_size * 8); /* parse the syncinfo */ - *data_size = 0; err = parse_frame_header(s); if (err) { - switch(err) { - case AAC_AC3_PARSE_ERROR_SYNC: - av_log(avctx, AV_LOG_ERROR, "frame sync error\n"); - return -1; - case AAC_AC3_PARSE_ERROR_BSID: - av_log(avctx, AV_LOG_ERROR, "invalid bitstream id\n"); - break; - case AAC_AC3_PARSE_ERROR_SAMPLE_RATE: - av_log(avctx, AV_LOG_ERROR, "invalid sample rate\n"); - break; - case AAC_AC3_PARSE_ERROR_FRAME_SIZE: - av_log(avctx, AV_LOG_ERROR, "invalid frame size\n"); - break; - case AAC_AC3_PARSE_ERROR_FRAME_TYPE: - /* skip frame if CRC is ok. otherwise use error concealment. */ - /* TODO: add support for substreams and dependent frames */ - if(s->frame_type == EAC3_FRAME_TYPE_DEPENDENT || s->substreamid) { - av_log(avctx, AV_LOG_ERROR, "unsupported frame type : skipping frame\n"); - return s->frame_size; - } else { - av_log(avctx, AV_LOG_ERROR, "invalid frame type\n"); - } - break; - default: - av_log(avctx, AV_LOG_ERROR, "invalid header\n"); - break; + switch (err) { + case AAC_AC3_PARSE_ERROR_SYNC: + av_log(avctx, AV_LOG_ERROR, "frame sync error\n"); + return -1; + case AAC_AC3_PARSE_ERROR_BSID: + av_log(avctx, AV_LOG_ERROR, "invalid bitstream id\n"); + break; + case AAC_AC3_PARSE_ERROR_SAMPLE_RATE: + av_log(avctx, AV_LOG_ERROR, "invalid sample rate\n"); + break; + case AAC_AC3_PARSE_ERROR_FRAME_SIZE: + av_log(avctx, AV_LOG_ERROR, "invalid frame size\n"); + break; + case AAC_AC3_PARSE_ERROR_FRAME_TYPE: + /* skip frame if CRC is ok. otherwise use error concealment. */ + /* TODO: add support for substreams and dependent frames */ + if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT || s->substreamid) { + av_log(avctx, AV_LOG_ERROR, "unsupported frame type : " + "skipping frame\n"); + *got_frame_ptr = 0; + return s->frame_size; + } else { + av_log(avctx, AV_LOG_ERROR, "invalid frame type\n"); + } + break; + default: + av_log(avctx, AV_LOG_ERROR, "invalid header\n"); + break; } } else { /* check that reported frame size fits in input buffer */ if (s->frame_size > buf_size) { av_log(avctx, AV_LOG_ERROR, "incomplete frame\n"); err = AAC_AC3_PARSE_ERROR_FRAME_SIZE; - } else if (avctx->error_recognition >= FF_ER_CAREFUL) { + } else if (avctx->err_recognition & AV_EF_CRCCHECK) { /* check for crc mismatch */ - if (av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, &buf[2], s->frame_size-2)) { + if (av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, &buf[2], + s->frame_size - 2)) { av_log(avctx, AV_LOG_ERROR, "frame CRC mismatch\n"); err = AAC_AC3_PARSE_ERROR_CRC; } @@ -1371,12 +1384,12 @@ /* if frame is ok, set audio parameters */ if (!err) { avctx->sample_rate = s->sample_rate; - avctx->bit_rate = s->bit_rate; + avctx->bit_rate = s->bit_rate; /* channel config */ s->out_channels = s->channels; - s->output_mode = s->channel_mode; - if(s->lfe_on) + s->output_mode = s->channel_mode; + if (s->lfe_on) s->output_mode |= AC3_OUTPUT_LFEON; if (avctx->request_channels > 0 && avctx->request_channels <= 2 && avctx->request_channels < s->channels) { @@ -1384,17 +1397,17 @@ s->output_mode = avctx->request_channels == 1 ? AC3_CHMODE_MONO : AC3_CHMODE_STEREO; s->channel_layout = ff_ac3_channel_layout_tab[s->output_mode]; } - avctx->channels = s->out_channels; + avctx->channels = s->out_channels; avctx->channel_layout = s->channel_layout; /* set downmixing coefficients if needed */ - if(s->channels != s->out_channels && !((s->output_mode & AC3_OUTPUT_LFEON) && + if (s->channels != s->out_channels && !((s->output_mode & AC3_OUTPUT_LFEON) && s->fbw_channels == s->out_channels)) { set_downmix_coeffs(s); } } else if (!s->out_channels) { s->out_channels = avctx->channels; - if(s->out_channels < s->channels) + if (s->out_channels < s->channels) s->output_mode = s->out_channels == 1 ? AC3_CHMODE_MONO : AC3_CHMODE_STEREO; } /* set audio service type based on bitstream mode for AC-3 */ @@ -1402,6 +1415,15 @@ if (s->bitstream_mode == 0x7 && s->channels > 1) avctx->audio_service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE; + /* get output buffer */ + s->frame.nb_samples = s->num_blocks * 256; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + out_samples_flt = (float *)s->frame.data[0]; + out_samples_s16 = (int16_t *)s->frame.data[0]; + /* decode the audio blocks */ channel_map = ff_ac3_dec_channel_map[s->output_mode & ~AC3_OUTPUT_LFEON][s->lfe_on]; for (ch = 0; ch < s->out_channels; ch++) @@ -1421,8 +1443,10 @@ out_samples_s16 += 256 * s->out_channels; } } - *data_size = s->num_blocks * 256 * avctx->channels * - av_get_bytes_per_sample(avctx->sample_fmt); + + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return FFMIN(buf_size, s->frame_size); } @@ -1435,37 +1459,60 @@ ff_mdct_end(&s->imdct_512); ff_mdct_end(&s->imdct_256); - av_freep(&s->input_buffer); - return 0; } +#define OFFSET(x) offsetof(AC3DecodeContext, x) +#define PAR (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM) +static const AVOption options[] = { + { "drc_scale", "percentage of dynamic range compression to apply", OFFSET(drc_scale), AV_OPT_TYPE_FLOAT, {1.0}, 0.0, 1.0, PAR }, + { NULL}, +}; + +static const AVClass ac3_decoder_class = { + .class_name = "AC3 decoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVCodec ff_ac3_decoder = { - .name = "ac3", - .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AC3, + .name = "ac3", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_AC3, .priv_data_size = sizeof (AC3DecodeContext), - .init = ac3_decode_init, - .close = ac3_decode_end, - .decode = ac3_decode_frame, - .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"), - .sample_fmts = (const enum AVSampleFormat[]) { - AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE - }, + .init = ac3_decode_init, + .close = ac3_decode_end, + .decode = ac3_decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"), + .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT, + AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_NONE }, + .priv_class = &ac3_decoder_class, }; #if CONFIG_EAC3_DECODER +static const AVClass eac3_decoder_class = { + .class_name = "E-AC3 decoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVCodec ff_eac3_decoder = { - .name = "eac3", - .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_EAC3, + .name = "eac3", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_EAC3, .priv_data_size = sizeof (AC3DecodeContext), - .init = ac3_decode_init, - .close = ac3_decode_end, - .decode = ac3_decode_frame, - .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"), - .sample_fmts = (const enum AVSampleFormat[]) { - AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE - }, + .init = ac3_decode_init, + .close = ac3_decode_end, + .decode = ac3_decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"), + .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT, + AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_NONE }, + .priv_class = &eac3_decoder_class, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3dec.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3dec.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3dec.h 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3dec.h 2012-01-11 00:34:30.000000000 +0000 @@ -62,12 +62,16 @@ #define SPX_MAX_BANDS 17 +/** Large enough for maximum possible frame size when the specification limit is ignored */ +#define AC3_FRAME_BUFFER_SIZE 32768 + typedef struct { + AVClass *class; ///< class for AVOptions AVCodecContext *avctx; ///< parent context + AVFrame frame; ///< AVFrame for decoded output GetBitContext gbc; ///< bitstream reader - uint8_t *input_buffer; ///< temp buffer to prevent overread -///@defgroup bsi bit stream information +///@name Bit stream information ///@{ int frame_type; ///< frame type (strmtyp) int substreamid; ///< substream identification @@ -85,7 +89,7 @@ int eac3; ///< indicates if current frame is E-AC-3 ///@} -///@defgroup audfrm frame syntax parameters +///@name Frame syntax parameters int snr_offset_strategy; ///< SNR offset strategy (snroffststr) int block_switch_syntax; ///< block switch syntax enabled (blkswe) int dither_flag_syntax; ///< dither flag syntax enabled (dithflage) @@ -95,7 +99,7 @@ int skip_syntax; ///< skip field syntax enabled (skipflde) ///@} -///@defgroup cpl standard coupling +///@name Standard coupling int cpl_in_use[AC3_MAX_BLOCKS]; ///< coupling in use (cplinu) int cpl_strategy_exists[AC3_MAX_BLOCKS];///< coupling strategy exists (cplstre) int channel_in_cpl[AC3_MAX_CHANNELS]; ///< channel in coupling (chincpl) @@ -108,7 +112,7 @@ int cpl_coords[AC3_MAX_CHANNELS][AC3_MAX_CPL_BANDS]; ///< coupling coordinates (cplco) ///@} -///@defgroup spx spectral extension +///@name Spectral extension ///@{ int spx_in_use; ///< spectral extension in use (spxinu) uint8_t channel_uses_spx[AC3_MAX_CHANNELS]; ///< channel uses spectral extension (chinspx) @@ -124,12 +128,12 @@ float spx_signal_blend[AC3_MAX_CHANNELS][SPX_MAX_BANDS];///< spx signal blending factor (sblendfact) ///@} -///@defgroup aht adaptive hybrid transform +///@name Adaptive hybrid transform int channel_uses_aht[AC3_MAX_CHANNELS]; ///< channel AHT in use (chahtinu) int pre_mantissa[AC3_MAX_CHANNELS][AC3_MAX_COEFS][AC3_MAX_BLOCKS]; ///< pre-IDCT mantissas ///@} -///@defgroup channel channel +///@name Channel int fbw_channels; ///< number of full-bandwidth channels int channels; ///< number of total channels int lfe_ch; ///< index of LFE channel @@ -139,27 +143,28 @@ int out_channels; ///< number of output channels ///@} -///@defgroup dynrng dynamic range +///@name Dynamic range float dynamic_range[2]; ///< dynamic range + float drc_scale; ///< percentage of dynamic range compression to be applied ///@} -///@defgroup bandwidth bandwidth +///@name Bandwidth int start_freq[AC3_MAX_CHANNELS]; ///< start frequency bin (strtmant) int end_freq[AC3_MAX_CHANNELS]; ///< end frequency bin (endmant) ///@} -///@defgroup rematrixing rematrixing +///@name Rematrixing int num_rematrixing_bands; ///< number of rematrixing bands (nrematbnd) int rematrixing_flags[4]; ///< rematrixing flags (rematflg) ///@} -///@defgroup exponents exponents +///@name Exponents int num_exp_groups[AC3_MAX_CHANNELS]; ///< Number of exponent groups (nexpgrp) int8_t dexps[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< decoded exponents int exp_strategy[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS]; ///< exponent strategies (expstr) ///@} -///@defgroup bitalloc bit allocation +///@name Bit allocation AC3BitAllocParameters bit_alloc_params; ///< bit allocation parameters int first_cpl_leak; ///< first coupling leak state (firstcplleak) int snr_offset[AC3_MAX_CHANNELS]; ///< signal-to-noise ratio offsets (snroffst) @@ -175,31 +180,32 @@ uint8_t dba_values[AC3_MAX_CHANNELS][8]; ///< delta values for each segment ///@} -///@defgroup dithering zero-mantissa dithering +///@name Zero-mantissa dithering int dither_flag[AC3_MAX_CHANNELS]; ///< dither flags (dithflg) AVLFG dith_state; ///< for dither generation ///@} -///@defgroup imdct IMDCT +///@name IMDCT int block_switch[AC3_MAX_CHANNELS]; ///< block switch flags (blksw) FFTContext imdct_512; ///< for 512 sample IMDCT FFTContext imdct_256; ///< for 256 sample IMDCT ///@} -///@defgroup opt optimization +///@name Optimization DSPContext dsp; ///< for optimization AC3DSPContext ac3dsp; FmtConvertContext fmt_conv; ///< optimized conversion functions float mul_bias; ///< scaling for float_to_int16 conversion ///@} -///@defgroup arrays aligned arrays +///@name Aligned arrays DECLARE_ALIGNED(16, int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< fixed-point transform coefficients DECLARE_ALIGNED(32, float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< transform coefficients DECLARE_ALIGNED(32, float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< delay - added to the next block DECLARE_ALIGNED(32, float, window)[AC3_BLOCK_SIZE]; ///< window coefficients DECLARE_ALIGNED(32, float, tmp_output)[AC3_BLOCK_SIZE]; ///< temporary storage for output before windowing DECLARE_ALIGNED(32, float, output)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< output after imdct transform and windowing + DECLARE_ALIGNED(32, uint8_t, input_buffer)[AC3_FRAME_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE]; ///< temp buffer to prevent overread ///@} } AC3DecodeContext; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3dsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3dsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3dsp.c 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3dsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -164,21 +164,8 @@ int i; for (i = 0; i < nb_coefs; i++) { - int e; int v = abs(coef[i]); - if (v == 0) - e = 24; - else { - e = 23 - av_log2(v); - if (e >= 24) { - e = 24; - coef[i] = 0; - } else if (e < 0) { - e = 0; - coef[i] = av_clip(coef[i], -16777215, 16777215); - } - } - exp[i] = e; + exp[i] = v ? 23 - av_log2(v) : 24; } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc.c 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -77,7 +77,7 @@ /** * List of supported channel layouts. */ -const int64_t ff_ac3_channel_layouts[19] = { +const uint64_t ff_ac3_channel_layouts[19] = { AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_2_1, @@ -176,8 +176,10 @@ /** * Adjust the frame size to make the average bit rate match the target bit rate. * This is only needed for 11025, 22050, and 44100 sample rates or any E-AC-3. + * + * @param s AC-3 encoder private context */ -static void adjust_frame_size(AC3EncodeContext *s) +void ff_ac3_adjust_frame_size(AC3EncodeContext *s) { while (s->bits_written >= s->bit_rate && s->samples_written >= s->sample_rate) { s->bits_written -= s->bit_rate; @@ -186,18 +188,24 @@ s->frame_size = s->frame_size_min + 2 * (s->bits_written * s->sample_rate < s->samples_written * s->bit_rate); s->bits_written += s->frame_size * 8; - s->samples_written += AC3_FRAME_SIZE; + s->samples_written += AC3_BLOCK_SIZE * s->num_blocks; } -static void compute_coupling_strategy(AC3EncodeContext *s) +/** + * Set the initial coupling strategy parameters prior to coupling analysis. + * + * @param s AC-3 encoder private context + */ +void ff_ac3_compute_coupling_strategy(AC3EncodeContext *s) { int blk, ch; int got_cpl_snr; + int num_cpl_blocks; /* set coupling use flags for each block/channel */ /* TODO: turn coupling on/off and adjust start band based on bit usage */ - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; for (ch = 1; ch <= s->fbw_channels; ch++) block->channel_in_cpl[ch] = s->cpl_on; @@ -206,12 +214,14 @@ /* enable coupling for each block if at least 2 channels have coupling enabled for that block */ got_cpl_snr = 0; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + num_cpl_blocks = 0; + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; block->num_cpl_channels = 0; for (ch = 1; ch <= s->fbw_channels; ch++) block->num_cpl_channels += block->channel_in_cpl[ch]; block->cpl_in_use = block->num_cpl_channels > 1; + num_cpl_blocks += block->cpl_in_use; if (!block->cpl_in_use) { block->num_cpl_channels = 0; for (ch = 1; ch <= s->fbw_channels; ch++) @@ -237,9 +247,11 @@ block->new_snr_offsets = 0; } } + if (!num_cpl_blocks) + s->cpl_on = 0; /* set bandwidth for each channel */ - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; for (ch = 1; ch <= s->fbw_channels; ch++) { if (block->channel_in_cpl[ch]) @@ -253,8 +265,10 @@ /** * Apply stereo rematrixing to coefficients based on rematrixing flags. + * + * @param s AC-3 encoder private context */ -static void apply_rematrixing(AC3EncodeContext *s) +void ff_ac3_apply_rematrixing(AC3EncodeContext *s) { int nb_coefs; int blk, bnd, i; @@ -264,7 +278,7 @@ if (!s->rematrixing_enabled) return; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; if (block->new_rematrixing_strategy) flags = block->rematrixing_flags; @@ -285,7 +299,7 @@ } -/** +/* * Initialize exponent tables. */ static av_cold void exponent_init(AC3EncodeContext *s) @@ -301,18 +315,19 @@ } /* LFE */ exponent_group_tab[0][0][7] = 2; + + if (CONFIG_EAC3_ENCODER && s->eac3) + ff_eac3_exponent_init(); } -/** +/* * Extract exponents from the MDCT coefficients. - * This takes into account the normalization that was done to the input samples - * by adjusting the exponents by the exponent shift values. */ static void extract_exponents(AC3EncodeContext *s) { int ch = !s->cpl_on; - int chan_size = AC3_MAX_COEFS * AC3_MAX_BLOCKS * (s->channels - ch + 1); + int chan_size = AC3_MAX_COEFS * s->num_blocks * (s->channels - ch + 1); AC3Block *block = &s->blocks[0]; s->ac3dsp.extract_exponents(block->exp[ch], block->fixed_coef[ch], chan_size); @@ -325,8 +340,17 @@ */ #define EXP_DIFF_THRESHOLD 500 - /** + * Table used to select exponent strategy based on exponent reuse block interval. + */ +static const uint8_t exp_strategy_reuse_tab[4][6] = { + { EXP_D15, EXP_D15, EXP_D15, EXP_D15, EXP_D15, EXP_D15 }, + { EXP_D15, EXP_D15, EXP_D15, EXP_D15, EXP_D15, EXP_D15 }, + { EXP_D25, EXP_D25, EXP_D15, EXP_D15, EXP_D15, EXP_D15 }, + { EXP_D45, EXP_D25, EXP_D25, EXP_D15, EXP_D15, EXP_D15 } +}; + +/* * Calculate exponent strategies for all channels. * Array arrangement is reversed to simplify the per-channel calculation. */ @@ -343,9 +367,16 @@ reused in the next frame */ exp_strategy[0] = EXP_NEW; exp += AC3_MAX_COEFS; - for (blk = 1; blk < AC3_MAX_BLOCKS; blk++, exp += AC3_MAX_COEFS) { - if ((ch == CPL_CH && (!s->blocks[blk].cpl_in_use || !s->blocks[blk-1].cpl_in_use)) || - (ch > CPL_CH && (s->blocks[blk].channel_in_cpl[ch] != s->blocks[blk-1].channel_in_cpl[ch]))) { + for (blk = 1; blk < s->num_blocks; blk++, exp += AC3_MAX_COEFS) { + if (ch == CPL_CH) { + if (!s->blocks[blk-1].cpl_in_use) { + exp_strategy[blk] = EXP_NEW; + continue; + } else if (!s->blocks[blk].cpl_in_use) { + exp_strategy[blk] = EXP_REUSE; + continue; + } + } else if (s->blocks[blk].channel_in_cpl[ch] != s->blocks[blk-1].channel_in_cpl[ch]) { exp_strategy[blk] = EXP_NEW; continue; } @@ -360,30 +391,34 @@ /* now select the encoding strategy type : if exponents are often recoded, we use a coarse encoding */ blk = 0; - while (blk < AC3_MAX_BLOCKS) { + while (blk < s->num_blocks) { blk1 = blk + 1; - while (blk1 < AC3_MAX_BLOCKS && exp_strategy[blk1] == EXP_REUSE) + while (blk1 < s->num_blocks && exp_strategy[blk1] == EXP_REUSE) blk1++; - switch (blk1 - blk) { - case 1: exp_strategy[blk] = EXP_D45; break; - case 2: - case 3: exp_strategy[blk] = EXP_D25; break; - default: exp_strategy[blk] = EXP_D15; break; - } + exp_strategy[blk] = exp_strategy_reuse_tab[s->num_blks_code][blk1-blk-1]; blk = blk1; } } if (s->lfe_on) { ch = s->lfe_channel; s->exp_strategy[ch][0] = EXP_D15; - for (blk = 1; blk < AC3_MAX_BLOCKS; blk++) + for (blk = 1; blk < s->num_blocks; blk++) s->exp_strategy[ch][blk] = EXP_REUSE; } + + /* for E-AC-3, determine frame exponent strategy */ + if (CONFIG_EAC3_ENCODER && s->eac3) + ff_eac3_get_frame_exp_strategy(s); } /** * Update the exponents so that they are the ones the decoder will decode. + * + * @param[in,out] exp array of exponents for 1 block in 1 channel + * @param nb_exps number of exponents in active bandwidth + * @param exp_strategy exponent strategy for the block + * @param cpl indicates if the block is in the coupling channel */ static void encode_exponents_blk_ch(uint8_t *exp, int nb_exps, int exp_strategy, int cpl) @@ -452,7 +487,7 @@ } -/** +/* * Encode exponents from original extracted form to what the decoder will see. * This copies and groups exponents based on exponent strategy and reduces * deltas between adjacent exponent groups so that they can be differentially @@ -470,7 +505,7 @@ cpl = (ch == CPL_CH); blk = 0; - while (blk < AC3_MAX_BLOCKS) { + while (blk < s->num_blocks) { AC3Block *block = &s->blocks[blk]; if (cpl && !block->cpl_in_use) { exp += AC3_MAX_COEFS; @@ -483,7 +518,7 @@ /* count the number of EXP_REUSE blocks after the current block and set exponent reference block numbers */ s->exp_ref_block[ch][blk] = blk; - while (blk1 < AC3_MAX_BLOCKS && exp_strategy[blk1] == EXP_REUSE) { + while (blk1 < s->num_blocks && exp_strategy[blk1] == EXP_REUSE) { s->exp_ref_block[ch][blk1] = blk; blk1++; } @@ -505,21 +540,50 @@ } +/* + * Count exponent bits based on bandwidth, coupling, and exponent strategies. + */ +static int count_exponent_bits(AC3EncodeContext *s) +{ + int blk, ch; + int nb_groups, bit_count; + + bit_count = 0; + for (blk = 0; blk < s->num_blocks; blk++) { + AC3Block *block = &s->blocks[blk]; + for (ch = !block->cpl_in_use; ch <= s->channels; ch++) { + int exp_strategy = s->exp_strategy[ch][blk]; + int cpl = (ch == CPL_CH); + int nb_coefs = block->end_freq[ch] - s->start_freq[ch]; + + if (exp_strategy == EXP_REUSE) + continue; + + nb_groups = exponent_group_tab[cpl][exp_strategy-1][nb_coefs]; + bit_count += 4 + (nb_groups * 7); + } + } + + return bit_count; +} + + /** * Group exponents. * 3 delta-encoded exponents are in each 7-bit group. The number of groups * varies depending on exponent strategy and bandwidth. + * + * @param s AC-3 encoder private context */ -static void group_exponents(AC3EncodeContext *s) +void ff_ac3_group_exponents(AC3EncodeContext *s) { int blk, ch, i, cpl; - int group_size, nb_groups, bit_count; + int group_size, nb_groups; uint8_t *p; int delta0, delta1, delta2; int exp0, exp1; - bit_count = 0; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; for (ch = !block->cpl_in_use; ch <= s->channels; ch++) { int exp_strategy = s->exp_strategy[ch][blk]; @@ -528,7 +592,6 @@ cpl = (ch == CPL_CH); group_size = exp_strategy + (exp_strategy == EXP_D45); nb_groups = exponent_group_tab[cpl][exp_strategy-1][block->end_freq[ch]-s->start_freq[ch]]; - bit_count += 4 + (nb_groups * 7); p = block->exp[ch] + s->start_freq[ch] - cpl; /* DC exponent */ @@ -560,8 +623,6 @@ } } } - - s->exponent_bits = bit_count; } @@ -569,8 +630,10 @@ * Calculate final exponents from the supplied MDCT coefficients and exponent shift. * Extract exponents from MDCT coefficients, calculate exponent strategies, * and encode final exponents. + * + * @param s AC-3 encoder private context */ -static void process_exponents(AC3EncodeContext *s) +void ff_ac3_process_exponents(AC3EncodeContext *s) { extract_exponents(s); @@ -578,13 +641,11 @@ encode_exponents(s); - group_exponents(s); - emms_c(); } -/** +/* * Count frame bits that are based solely on fixed parameters. * This only has to be run once when the encoder is initialized. */ @@ -608,26 +669,38 @@ if (s->eac3) { /* bitstream info header */ frame_bits += 35; - frame_bits += 1 + 1 + 1; + frame_bits += 1 + 1; + if (s->num_blocks != 0x6) + frame_bits++; + frame_bits++; /* audio frame header */ - frame_bits += 2; + if (s->num_blocks == 6) + frame_bits += 2; frame_bits += 10; /* exponent strategy */ - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) - frame_bits += 2 * s->fbw_channels + s->lfe_on; + if (s->use_frame_exp_strategy) + frame_bits += 5 * s->fbw_channels; + else + frame_bits += s->num_blocks * 2 * s->fbw_channels; + if (s->lfe_on) + frame_bits += s->num_blocks; /* converter exponent strategy */ - frame_bits += s->fbw_channels * 5; + if (s->num_blks_code != 0x3) + frame_bits++; + else + frame_bits += s->fbw_channels * 5; /* snr offsets */ frame_bits += 10; /* block start info */ - frame_bits++; + if (s->num_blocks != 1) + frame_bits++; } else { frame_bits += 49; frame_bits += frame_bits_inc[s->channel_mode]; } /* audio blocks */ - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { if (!s->eac3) { /* block switch flags */ frame_bits += s->fbw_channels; @@ -678,7 +751,7 @@ } -/** +/* * Initialize bit allocation. * Set default parameter codes and calculate parameter values. */ @@ -713,7 +786,7 @@ } -/** +/* * Count the bits used to encode the frame, minus exponents and mantissas. * Bits based on fixed parameters have already been counted, so now we just * have to add the bits based on parameters that change during encoding. @@ -726,10 +799,34 @@ /* header */ if (s->eac3) { + if (opt->eac3_mixing_metadata) { + if (s->channel_mode > AC3_CHMODE_STEREO) + frame_bits += 2; + if (s->has_center) + frame_bits += 6; + if (s->has_surround) + frame_bits += 6; + frame_bits += s->lfe_on; + frame_bits += 1 + 1 + 2; + if (s->channel_mode < AC3_CHMODE_STEREO) + frame_bits++; + frame_bits++; + } + if (opt->eac3_info_metadata) { + frame_bits += 3 + 1 + 1; + if (s->channel_mode == AC3_CHMODE_STEREO) + frame_bits += 2 + 2; + if (s->channel_mode >= AC3_CHMODE_2F2R) + frame_bits += 2; + frame_bits++; + if (opt->audio_production_info) + frame_bits += 5 + 2 + 1; + frame_bits++; + } /* coupling */ if (s->channel_mode > AC3_CHMODE_MONO) { frame_bits++; - for (blk = 1; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 1; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; frame_bits++; if (block->new_cpl_strategy) @@ -737,8 +834,14 @@ } } /* coupling exponent strategy */ - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) - frame_bits += 2 * s->blocks[blk].cpl_in_use; + if (s->cpl_on) { + if (s->use_frame_exp_strategy) { + frame_bits += 5 * s->cpl_on; + } else { + for (blk = 0; blk < s->num_blocks; blk++) + frame_bits += 2 * s->blocks[blk].cpl_in_use; + } + } } else { if (opt->audio_production_info) frame_bits += 7; @@ -751,7 +854,7 @@ } /* audio blocks */ - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; /* coupling strategy */ @@ -779,9 +882,9 @@ if (block->cpl_in_use) { for (ch = 1; ch <= s->fbw_channels; ch++) { if (block->channel_in_cpl[ch]) { - if (!s->eac3 || block->new_cpl_coords != 2) + if (!s->eac3 || block->new_cpl_coords[ch] != 2) frame_bits++; - if (block->new_cpl_coords) { + if (block->new_cpl_coords[ch]) { frame_bits += 2; frame_bits += (4 + 4) * s->num_cpl_bands; } @@ -830,7 +933,7 @@ } -/** +/* * Calculate masking curve based on the final exponents. * Also calculate the power spectral densities to use in future calculations. */ @@ -838,7 +941,7 @@ { int blk, ch; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; for (ch = !block->cpl_in_use; ch <= s->channels; ch++) { /* We only need psd and mask for calculating bap. @@ -860,7 +963,7 @@ } -/** +/* * Ensure that bap for each block and channel point to the current bap_buffer. * They may have been switched during the bit allocation search. */ @@ -874,9 +977,9 @@ ref_bap = s->bap_buffer; for (ch = 0; ch <= s->channels; ch++) { - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) + for (blk = 0; blk < s->num_blocks; blk++) s->ref_bap[ch][blk] = ref_bap + AC3_MAX_COEFS * s->exp_ref_block[ch][blk]; - ref_bap += AC3_MAX_COEFS * AC3_MAX_BLOCKS; + ref_bap += AC3_MAX_COEFS * s->num_blocks; } s->ref_bap_set = 1; } @@ -886,6 +989,8 @@ * Initialize mantissa counts. * These are set so that they are padded to the next whole group size when bits * are counted in compute_mantissa_size. + * + * @param[in,out] mant_cnt running counts for each bap value for each block */ static void count_mantissa_bits_init(uint16_t mant_cnt[AC3_MAX_BLOCKS][16]) { @@ -902,6 +1007,12 @@ /** * Update mantissa bit counts for all blocks in 1 channel in a given bandwidth * range. + * + * @param s AC-3 encoder private context + * @param ch channel index + * @param[in,out] mant_cnt running counts for each bap value for each block + * @param start starting coefficient bin + * @param end ending coefficient bin */ static void count_mantissa_bits_update_ch(AC3EncodeContext *s, int ch, uint16_t mant_cnt[AC3_MAX_BLOCKS][16], @@ -909,7 +1020,7 @@ { int blk; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; if (ch == CPL_CH && !block->cpl_in_use) continue; @@ -920,7 +1031,7 @@ } -/** +/* * Count the number of mantissa bits in the frame based on the bap values. */ static int count_mantissa_bits(AC3EncodeContext *s) @@ -943,6 +1054,9 @@ * Run the bit allocation with a given SNR offset. * This calculates the bit allocation pointers that will be used to determine * the quantization of each mantissa. + * + * @param s AC-3 encoder private context + * @param snr_offset SNR offset, 0 to 1023 * @return the number of bits needed for mantissas if the given SNR offset is * is used. */ @@ -953,7 +1067,7 @@ snr_offset = (snr_offset - 240) << 2; reset_block_bap(s); - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; for (ch = !block->cpl_in_use; ch <= s->channels; ch++) { @@ -973,7 +1087,7 @@ } -/** +/* * Constant bitrate bit allocation search. * Find the largest SNR offset that will allow data to fit in the frame. */ @@ -1022,93 +1136,31 @@ } -/** - * Downgrade exponent strategies to reduce the bits used by the exponents. - * This is a fallback for when bit allocation fails with the normal exponent - * strategies. Each time this function is run it only downgrades the - * strategy in 1 channel of 1 block. - * @return non-zero if downgrade was unsuccessful - */ -static int downgrade_exponents(AC3EncodeContext *s) -{ - int ch, blk; - - for (blk = AC3_MAX_BLOCKS-1; blk >= 0; blk--) { - for (ch = !s->blocks[blk].cpl_in_use; ch <= s->fbw_channels; ch++) { - if (s->exp_strategy[ch][blk] == EXP_D15) { - s->exp_strategy[ch][blk] = EXP_D25; - return 0; - } - } - } - for (blk = AC3_MAX_BLOCKS-1; blk >= 0; blk--) { - for (ch = !s->blocks[blk].cpl_in_use; ch <= s->fbw_channels; ch++) { - if (s->exp_strategy[ch][blk] == EXP_D25) { - s->exp_strategy[ch][blk] = EXP_D45; - return 0; - } - } - } - /* block 0 cannot reuse exponents, so only downgrade D45 to REUSE if - the block number > 0 */ - for (blk = AC3_MAX_BLOCKS-1; blk > 0; blk--) { - for (ch = !s->blocks[blk].cpl_in_use; ch <= s->fbw_channels; ch++) { - if (s->exp_strategy[ch][blk] > EXP_REUSE) { - s->exp_strategy[ch][blk] = EXP_REUSE; - return 0; - } - } - } - return -1; -} - - -/** +/* * Perform bit allocation search. * Finds the SNR offset value that maximizes quality and fits in the specified * frame size. Output is the SNR offset and a set of bit allocation pointers * used to quantize the mantissas. */ -static int compute_bit_allocation(AC3EncodeContext *s) +int ff_ac3_compute_bit_allocation(AC3EncodeContext *s) { - int ret; - count_frame_bits(s); - bit_alloc_masking(s); - - ret = cbr_bit_allocation(s); - while (ret) { - /* fallback 1: disable channel coupling */ - if (s->cpl_on) { - s->cpl_on = 0; - compute_coupling_strategy(s); - s->compute_rematrixing_strategy(s); - apply_rematrixing(s); - process_exponents(s); - ret = compute_bit_allocation(s); - continue; - } - - /* fallback 2: downgrade exponents */ - if (!downgrade_exponents(s)) { - extract_exponents(s); - encode_exponents(s); - group_exponents(s); - ret = compute_bit_allocation(s); - continue; - } + s->exponent_bits = count_exponent_bits(s); - /* fallbacks were not enough... */ - break; - } + bit_alloc_masking(s); - return ret; + return cbr_bit_allocation(s); } /** * Symmetric quantization on 'levels' levels. + * + * @param c unquantized coefficient + * @param e exponent + * @param levels number of quantization levels + * @return quantized coefficient */ static inline int sym_quant(int c, int e, int levels) { @@ -1120,6 +1172,11 @@ /** * Asymmetric quantization on 2^qbits levels. + * + * @param c unquantized coefficient + * @param e exponent + * @param qbits number of quantization bits + * @return quantized coefficient */ static inline int asym_quant(int c, int e, int qbits) { @@ -1136,6 +1193,14 @@ /** * Quantize a set of mantissas for a single channel in a single block. + * + * @param s Mantissa count context + * @param fixed_coef unquantized fixed-point coefficients + * @param exp exponents + * @param bap bit allocation pointer indices + * @param[out] qmant quantized coefficients + * @param start_freq starting coefficient bin + * @param end_freq ending coefficient bin */ static void quantize_mantissas_blk_ch(AC3Mant *s, int32_t *fixed_coef, uint8_t *exp, uint8_t *bap, @@ -1231,12 +1296,14 @@ /** * Quantize mantissas using coefficients, exponents, and bit allocation pointers. + * + * @param s AC-3 encoder private context */ -static void quantize_mantissas(AC3EncodeContext *s) +void ff_ac3_quantize_mantissas(AC3EncodeContext *s) { int blk, ch, ch0=0, got_cpl; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; AC3Mant m = { 0 }; @@ -1258,7 +1325,7 @@ } -/** +/* * Write the AC-3 frame header to the output bitstream. */ static void ac3_output_frame_header(AC3EncodeContext *s) @@ -1314,7 +1381,7 @@ } -/** +/* * Write one audio block to the output bitstream. */ static void output_audio_block(AC3EncodeContext *s, int blk) @@ -1376,9 +1443,9 @@ if (block->cpl_in_use) { for (ch = 1; ch <= s->fbw_channels; ch++) { if (block->channel_in_cpl[ch]) { - if (!s->eac3 || block->new_cpl_coords != 2) - put_bits(&s->pb, 1, block->new_cpl_coords); - if (block->new_cpl_coords) { + if (!s->eac3 || block->new_cpl_coords[ch] != 2) + put_bits(&s->pb, 1, block->new_cpl_coords[ch]); + if (block->new_cpl_coords[ch]) { put_bits(&s->pb, 2, block->cpl_master_exp[ch]); for (bnd = 0; bnd < s->num_cpl_bands; bnd++) { put_bits(&s->pb, 4, block->cpl_coord_exp [ch][bnd]); @@ -1542,7 +1609,7 @@ } -/** +/* * Fill the end of the frame with 0's and compute the two CRCs. */ static void output_frame_end(AC3EncodeContext *s) @@ -1590,8 +1657,11 @@ /** * Write the frame to the output bitstream. + * + * @param s AC-3 encoder private context + * @param frame output data buffer */ -static void output_frame(AC3EncodeContext *s, unsigned char *frame) +void ff_ac3_output_frame(AC3EncodeContext *s, unsigned char *frame) { int blk; @@ -1599,17 +1669,17 @@ s->output_frame_header(s); - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) + for (blk = 0; blk < s->num_blocks; blk++) output_audio_block(s, blk); output_frame_end(s); } -static void dprint_options(AVCodecContext *avctx) +static void dprint_options(AC3EncodeContext *s) { #ifdef DEBUG - AC3EncodeContext *s = avctx->priv_data; + AVCodecContext *avctx = s->avctx; AC3EncOptions *opt = &s->options; char strbuf[32]; @@ -1627,6 +1697,7 @@ av_dlog(avctx, "channel_layout: %s\n", strbuf); av_dlog(avctx, "sample_rate: %d\n", s->sample_rate); av_dlog(avctx, "bit_rate: %d\n", s->bit_rate); + av_dlog(avctx, "blocks/frame: %d (code=%d)\n", s->num_blocks, s->num_blks_code); if (s->cutoff) av_dlog(avctx, "cutoff: %d\n", s->cutoff); @@ -1645,9 +1716,9 @@ if (opt->audio_production_info) { av_dlog(avctx, "mixing_level: %ddB\n", opt->mixing_level); switch (opt->room_type) { - case 0: av_strlcpy(strbuf, "notindicated", 32); break; - case 1: av_strlcpy(strbuf, "large", 32); break; - case 2: av_strlcpy(strbuf, "small", 32); break; + case AC3ENC_OPT_NOT_INDICATED: av_strlcpy(strbuf, "notindicated", 32); break; + case AC3ENC_OPT_LARGE_ROOM: av_strlcpy(strbuf, "large", 32); break; + case AC3ENC_OPT_SMALL_ROOM: av_strlcpy(strbuf, "small", 32); break; default: snprintf(strbuf, 32, "ERROR (%d)", opt->room_type); } av_dlog(avctx, "room_type: %s\n", strbuf); @@ -1659,9 +1730,9 @@ av_dlog(avctx, "dialnorm: %ddB\n", opt->dialogue_level); if (s->channel_mode == AC3_CHMODE_STEREO) { switch (opt->dolby_surround_mode) { - case 0: av_strlcpy(strbuf, "notindicated", 32); break; - case 1: av_strlcpy(strbuf, "on", 32); break; - case 2: av_strlcpy(strbuf, "off", 32); break; + case AC3ENC_OPT_NOT_INDICATED: av_strlcpy(strbuf, "notindicated", 32); break; + case AC3ENC_OPT_MODE_ON: av_strlcpy(strbuf, "on", 32); break; + case AC3ENC_OPT_MODE_OFF: av_strlcpy(strbuf, "off", 32); break; default: snprintf(strbuf, 32, "ERROR (%d)", opt->dolby_surround_mode); } av_dlog(avctx, "dsur_mode: %s\n", strbuf); @@ -1673,9 +1744,9 @@ if (s->bitstream_id == 6) { if (opt->extended_bsi_1) { switch (opt->preferred_stereo_downmix) { - case 0: av_strlcpy(strbuf, "notindicated", 32); break; - case 1: av_strlcpy(strbuf, "ltrt", 32); break; - case 2: av_strlcpy(strbuf, "loro", 32); break; + case AC3ENC_OPT_NOT_INDICATED: av_strlcpy(strbuf, "notindicated", 32); break; + case AC3ENC_OPT_DOWNMIX_LTRT: av_strlcpy(strbuf, "ltrt", 32); break; + case AC3ENC_OPT_DOWNMIX_LORO: av_strlcpy(strbuf, "loro", 32); break; default: snprintf(strbuf, 32, "ERROR (%d)", opt->preferred_stereo_downmix); } av_dlog(avctx, "dmix_mode: %s\n", strbuf); @@ -1692,23 +1763,23 @@ } if (opt->extended_bsi_2) { switch (opt->dolby_surround_ex_mode) { - case 0: av_strlcpy(strbuf, "notindicated", 32); break; - case 1: av_strlcpy(strbuf, "on", 32); break; - case 2: av_strlcpy(strbuf, "off", 32); break; + case AC3ENC_OPT_NOT_INDICATED: av_strlcpy(strbuf, "notindicated", 32); break; + case AC3ENC_OPT_MODE_ON: av_strlcpy(strbuf, "on", 32); break; + case AC3ENC_OPT_MODE_OFF: av_strlcpy(strbuf, "off", 32); break; default: snprintf(strbuf, 32, "ERROR (%d)", opt->dolby_surround_ex_mode); } av_dlog(avctx, "dsurex_mode: %s\n", strbuf); switch (opt->dolby_headphone_mode) { - case 0: av_strlcpy(strbuf, "notindicated", 32); break; - case 1: av_strlcpy(strbuf, "on", 32); break; - case 2: av_strlcpy(strbuf, "off", 32); break; + case AC3ENC_OPT_NOT_INDICATED: av_strlcpy(strbuf, "notindicated", 32); break; + case AC3ENC_OPT_MODE_ON: av_strlcpy(strbuf, "on", 32); break; + case AC3ENC_OPT_MODE_OFF: av_strlcpy(strbuf, "off", 32); break; default: snprintf(strbuf, 32, "ERROR (%d)", opt->dolby_headphone_mode); } av_dlog(avctx, "dheadphone_mode: %s\n", strbuf); switch (opt->ad_converter_type) { - case 0: av_strlcpy(strbuf, "standard", 32); break; - case 1: av_strlcpy(strbuf, "hdcd", 32); break; + case AC3ENC_OPT_ADCONV_STANDARD: av_strlcpy(strbuf, "standard", 32); break; + case AC3ENC_OPT_ADCONV_HDCD: av_strlcpy(strbuf, "hdcd", 32); break; default: snprintf(strbuf, 32, "ERROR (%d)", opt->ad_converter_type); } av_dlog(avctx, "ad_conv_type: %s\n", strbuf); @@ -1759,27 +1830,155 @@ /** * Validate metadata options as set by AVOption system. * These values can optionally be changed per-frame. + * + * @param s AC-3 encoder private context */ -static int validate_metadata(AVCodecContext *avctx) +int ff_ac3_validate_metadata(AC3EncodeContext *s) { - AC3EncodeContext *s = avctx->priv_data; + AVCodecContext *avctx = s->avctx; AC3EncOptions *opt = &s->options; - /* validate mixing levels */ - if (s->has_center) { - validate_mix_level(avctx, "center_mix_level", &opt->center_mix_level, - cmixlev_options, CMIXLEV_NUM_OPTIONS, 1, 0, - &s->center_mix_level); - } - if (s->has_surround) { - validate_mix_level(avctx, "surround_mix_level", &opt->surround_mix_level, - surmixlev_options, SURMIXLEV_NUM_OPTIONS, 1, 0, - &s->surround_mix_level); + opt->audio_production_info = 0; + opt->extended_bsi_1 = 0; + opt->extended_bsi_2 = 0; + opt->eac3_mixing_metadata = 0; + opt->eac3_info_metadata = 0; + + /* determine mixing metadata / xbsi1 use */ + if (s->channel_mode > AC3_CHMODE_STEREO && opt->preferred_stereo_downmix != AC3ENC_OPT_NONE) { + opt->extended_bsi_1 = 1; + opt->eac3_mixing_metadata = 1; + } + if (s->has_center && + (opt->ltrt_center_mix_level >= 0 || opt->loro_center_mix_level >= 0)) { + opt->extended_bsi_1 = 1; + opt->eac3_mixing_metadata = 1; + } + if (s->has_surround && + (opt->ltrt_surround_mix_level >= 0 || opt->loro_surround_mix_level >= 0)) { + opt->extended_bsi_1 = 1; + opt->eac3_mixing_metadata = 1; } - /* set audio production info flag */ - if (opt->mixing_level >= 0 || opt->room_type >= 0) { - if (opt->mixing_level < 0) { + if (s->eac3) { + /* determine info metadata use */ + if (avctx->audio_service_type != AV_AUDIO_SERVICE_TYPE_MAIN) + opt->eac3_info_metadata = 1; + if (opt->copyright != AC3ENC_OPT_NONE || opt->original != AC3ENC_OPT_NONE) + opt->eac3_info_metadata = 1; + if (s->channel_mode == AC3_CHMODE_STEREO && + (opt->dolby_headphone_mode != AC3ENC_OPT_NONE || opt->dolby_surround_mode != AC3ENC_OPT_NONE)) + opt->eac3_info_metadata = 1; + if (s->channel_mode >= AC3_CHMODE_2F2R && opt->dolby_surround_ex_mode != AC3ENC_OPT_NONE) + opt->eac3_info_metadata = 1; + if (opt->mixing_level != AC3ENC_OPT_NONE || opt->room_type != AC3ENC_OPT_NONE || + opt->ad_converter_type != AC3ENC_OPT_NONE) { + opt->audio_production_info = 1; + opt->eac3_info_metadata = 1; + } + } else { + /* determine audio production info use */ + if (opt->mixing_level != AC3ENC_OPT_NONE || opt->room_type != AC3ENC_OPT_NONE) + opt->audio_production_info = 1; + + /* determine xbsi2 use */ + if (s->channel_mode >= AC3_CHMODE_2F2R && opt->dolby_surround_ex_mode != AC3ENC_OPT_NONE) + opt->extended_bsi_2 = 1; + if (s->channel_mode == AC3_CHMODE_STEREO && opt->dolby_headphone_mode != AC3ENC_OPT_NONE) + opt->extended_bsi_2 = 1; + if (opt->ad_converter_type != AC3ENC_OPT_NONE) + opt->extended_bsi_2 = 1; + } + + /* validate AC-3 mixing levels */ + if (!s->eac3) { + if (s->has_center) { + validate_mix_level(avctx, "center_mix_level", &opt->center_mix_level, + cmixlev_options, CMIXLEV_NUM_OPTIONS, 1, 0, + &s->center_mix_level); + } + if (s->has_surround) { + validate_mix_level(avctx, "surround_mix_level", &opt->surround_mix_level, + surmixlev_options, SURMIXLEV_NUM_OPTIONS, 1, 0, + &s->surround_mix_level); + } + } + + /* validate extended bsi 1 / mixing metadata */ + if (opt->extended_bsi_1 || opt->eac3_mixing_metadata) { + /* default preferred stereo downmix */ + if (opt->preferred_stereo_downmix == AC3ENC_OPT_NONE) + opt->preferred_stereo_downmix = AC3ENC_OPT_NOT_INDICATED; + if (!s->eac3 || s->has_center) { + /* validate Lt/Rt center mix level */ + validate_mix_level(avctx, "ltrt_center_mix_level", + &opt->ltrt_center_mix_level, extmixlev_options, + EXTMIXLEV_NUM_OPTIONS, 5, 0, + &s->ltrt_center_mix_level); + /* validate Lo/Ro center mix level */ + validate_mix_level(avctx, "loro_center_mix_level", + &opt->loro_center_mix_level, extmixlev_options, + EXTMIXLEV_NUM_OPTIONS, 5, 0, + &s->loro_center_mix_level); + } + if (!s->eac3 || s->has_surround) { + /* validate Lt/Rt surround mix level */ + validate_mix_level(avctx, "ltrt_surround_mix_level", + &opt->ltrt_surround_mix_level, extmixlev_options, + EXTMIXLEV_NUM_OPTIONS, 6, 3, + &s->ltrt_surround_mix_level); + /* validate Lo/Ro surround mix level */ + validate_mix_level(avctx, "loro_surround_mix_level", + &opt->loro_surround_mix_level, extmixlev_options, + EXTMIXLEV_NUM_OPTIONS, 6, 3, + &s->loro_surround_mix_level); + } + } + + /* validate audio service type / channels combination */ + if ((avctx->audio_service_type == AV_AUDIO_SERVICE_TYPE_KARAOKE && + avctx->channels == 1) || + ((avctx->audio_service_type == AV_AUDIO_SERVICE_TYPE_COMMENTARY || + avctx->audio_service_type == AV_AUDIO_SERVICE_TYPE_EMERGENCY || + avctx->audio_service_type == AV_AUDIO_SERVICE_TYPE_VOICE_OVER) + && avctx->channels > 1)) { + av_log(avctx, AV_LOG_ERROR, "invalid audio service type for the " + "specified number of channels\n"); + return AVERROR(EINVAL); + } + + /* validate extended bsi 2 / info metadata */ + if (opt->extended_bsi_2 || opt->eac3_info_metadata) { + /* default dolby headphone mode */ + if (opt->dolby_headphone_mode == AC3ENC_OPT_NONE) + opt->dolby_headphone_mode = AC3ENC_OPT_NOT_INDICATED; + /* default dolby surround ex mode */ + if (opt->dolby_surround_ex_mode == AC3ENC_OPT_NONE) + opt->dolby_surround_ex_mode = AC3ENC_OPT_NOT_INDICATED; + /* default A/D converter type */ + if (opt->ad_converter_type == AC3ENC_OPT_NONE) + opt->ad_converter_type = AC3ENC_OPT_ADCONV_STANDARD; + } + + /* copyright & original defaults */ + if (!s->eac3 || opt->eac3_info_metadata) { + /* default copyright */ + if (opt->copyright == AC3ENC_OPT_NONE) + opt->copyright = AC3ENC_OPT_OFF; + /* default original */ + if (opt->original == AC3ENC_OPT_NONE) + opt->original = AC3ENC_OPT_ON; + } + + /* dolby surround mode default */ + if (!s->eac3 || opt->eac3_info_metadata) { + if (opt->dolby_surround_mode == AC3ENC_OPT_NONE) + opt->dolby_surround_mode = AC3ENC_OPT_NOT_INDICATED; + } + + /* validate audio production info */ + if (opt->audio_production_info) { + if (opt->mixing_level == AC3ENC_OPT_NONE) { av_log(avctx, AV_LOG_ERROR, "mixing_level must be set if " "room_type is set\n"); return AVERROR(EINVAL); @@ -1790,68 +1989,12 @@ return AVERROR(EINVAL); } /* default room type */ - if (opt->room_type < 0) - opt->room_type = 0; - opt->audio_production_info = 1; - } else { - opt->audio_production_info = 0; - } - - /* set extended bsi 1 flag */ - if ((s->has_center || s->has_surround) && - (opt->preferred_stereo_downmix >= 0 || - opt->ltrt_center_mix_level >= 0 || - opt->ltrt_surround_mix_level >= 0 || - opt->loro_center_mix_level >= 0 || - opt->loro_surround_mix_level >= 0)) { - /* default preferred stereo downmix */ - if (opt->preferred_stereo_downmix < 0) - opt->preferred_stereo_downmix = 0; - /* validate Lt/Rt center mix level */ - validate_mix_level(avctx, "ltrt_center_mix_level", - &opt->ltrt_center_mix_level, extmixlev_options, - EXTMIXLEV_NUM_OPTIONS, 5, 0, - &s->ltrt_center_mix_level); - /* validate Lt/Rt surround mix level */ - validate_mix_level(avctx, "ltrt_surround_mix_level", - &opt->ltrt_surround_mix_level, extmixlev_options, - EXTMIXLEV_NUM_OPTIONS, 6, 3, - &s->ltrt_surround_mix_level); - /* validate Lo/Ro center mix level */ - validate_mix_level(avctx, "loro_center_mix_level", - &opt->loro_center_mix_level, extmixlev_options, - EXTMIXLEV_NUM_OPTIONS, 5, 0, - &s->loro_center_mix_level); - /* validate Lo/Ro surround mix level */ - validate_mix_level(avctx, "loro_surround_mix_level", - &opt->loro_surround_mix_level, extmixlev_options, - EXTMIXLEV_NUM_OPTIONS, 6, 3, - &s->loro_surround_mix_level); - opt->extended_bsi_1 = 1; - } else { - opt->extended_bsi_1 = 0; - } - - /* set extended bsi 2 flag */ - if (opt->dolby_surround_ex_mode >= 0 || - opt->dolby_headphone_mode >= 0 || - opt->ad_converter_type >= 0) { - /* default dolby surround ex mode */ - if (opt->dolby_surround_ex_mode < 0) - opt->dolby_surround_ex_mode = 0; - /* default dolby headphone mode */ - if (opt->dolby_headphone_mode < 0) - opt->dolby_headphone_mode = 0; - /* default A/D converter type */ - if (opt->ad_converter_type < 0) - opt->ad_converter_type = 0; - opt->extended_bsi_2 = 1; - } else { - opt->extended_bsi_2 = 0; + if (opt->room_type == AC3ENC_OPT_NONE) + opt->room_type = AC3ENC_OPT_NOT_INDICATED; } /* set bitstream id for alternate bitstream syntax */ - if (opt->extended_bsi_1 || opt->extended_bsi_2) { + if (!s->eac3 && (opt->extended_bsi_1 || opt->extended_bsi_2)) { if (s->bitstream_id > 8 && s->bitstream_id < 11) { static int warn_once = 1; if (warn_once) { @@ -1870,58 +2013,9 @@ /** - * Encode a single AC-3 frame. - */ -int ff_ac3_encode_frame(AVCodecContext *avctx, unsigned char *frame, - int buf_size, void *data) -{ - AC3EncodeContext *s = avctx->priv_data; - const SampleType *samples = data; - int ret; - - if (!s->eac3 && s->options.allow_per_frame_metadata) { - ret = validate_metadata(avctx); - if (ret) - return ret; - } - - if (s->bit_alloc.sr_code == 1 || s->eac3) - adjust_frame_size(s); - - s->deinterleave_input_samples(s, samples); - - s->apply_mdct(s); - - s->scale_coefficients(s); - - s->cpl_on = s->cpl_enabled; - compute_coupling_strategy(s); - - if (s->cpl_on) - s->apply_channel_coupling(s); - - s->compute_rematrixing_strategy(s); - - apply_rematrixing(s); - - process_exponents(s); - - ret = compute_bit_allocation(s); - if (ret) { - av_log(avctx, AV_LOG_ERROR, "Bit allocation failed. Try increasing the bitrate.\n"); - return ret; - } - - quantize_mantissas(s); - - output_frame(s, frame); - - return s->frame_size; -} - - -/** * Finalize encoding and free any memory allocated by the encoder. + * + * @param avctx Codec context */ av_cold int ff_ac3_encode_close(AVCodecContext *avctx) { @@ -1942,7 +2036,9 @@ av_freep(&s->band_psd_buffer); av_freep(&s->mask_buffer); av_freep(&s->qmant_buffer); - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + av_freep(&s->cpl_coord_exp_buffer); + av_freep(&s->cpl_coord_mant_buffer); + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; av_freep(&block->mdct_coef); av_freep(&block->fixed_coef); @@ -1952,27 +2048,28 @@ av_freep(&block->band_psd); av_freep(&block->mask); av_freep(&block->qmant); + av_freep(&block->cpl_coord_exp); + av_freep(&block->cpl_coord_mant); } - s->mdct_end(s->mdct); - av_freep(&s->mdct); + s->mdct_end(s); av_freep(&avctx->coded_frame); return 0; } -/** +/* * Set channel information during initialization. */ static av_cold int set_channel_info(AC3EncodeContext *s, int channels, - int64_t *channel_layout) + uint64_t *channel_layout) { int ch_layout; if (channels < 1 || channels > AC3_MAX_CHANNELS) return AVERROR(EINVAL); - if ((uint64_t)*channel_layout > 0x7FF) + if (*channel_layout > 0x7FF) return AVERROR(EINVAL); ch_layout = *channel_layout; if (!ch_layout) @@ -2010,8 +2107,9 @@ } -static av_cold int validate_options(AVCodecContext *avctx, AC3EncodeContext *s) +static av_cold int validate_options(AC3EncodeContext *s) { + AVCodecContext *avctx = s->avctx; int i, ret, max_sr; /* validate channel layout */ @@ -2047,18 +2145,30 @@ /* validate bit rate */ if (s->eac3) { int max_br, min_br, wpf, min_br_dist, min_br_code; + int num_blks_code, num_blocks, frame_samples; /* calculate min/max bitrate */ - max_br = 2048 * s->sample_rate / AC3_FRAME_SIZE * 16; - min_br = ((s->sample_rate + (AC3_FRAME_SIZE-1)) / AC3_FRAME_SIZE) * 16; + /* TODO: More testing with 3 and 2 blocks. All E-AC-3 samples I've + found use either 6 blocks or 1 block, even though 2 or 3 blocks + would work as far as the bit rate is concerned. */ + for (num_blks_code = 3; num_blks_code >= 0; num_blks_code--) { + num_blocks = ((int[]){ 1, 2, 3, 6 })[num_blks_code]; + frame_samples = AC3_BLOCK_SIZE * num_blocks; + max_br = 2048 * s->sample_rate / frame_samples * 16; + min_br = ((s->sample_rate + (frame_samples-1)) / frame_samples) * 16; + if (avctx->bit_rate <= max_br) + break; + } if (avctx->bit_rate < min_br || avctx->bit_rate > max_br) { av_log(avctx, AV_LOG_ERROR, "invalid bit rate. must be %d to %d " "for this sample rate\n", min_br, max_br); return AVERROR(EINVAL); } + s->num_blks_code = num_blks_code; + s->num_blocks = num_blocks; /* calculate words-per-frame for the selected bitrate */ - wpf = (avctx->bit_rate / 16) * AC3_FRAME_SIZE / s->sample_rate; + wpf = (avctx->bit_rate / 16) * frame_samples / s->sample_rate; av_assert1(wpf > 0 && wpf <= 2048); /* find the closest AC-3 bitrate code to the selected bitrate. @@ -2090,6 +2200,8 @@ } s->frame_size_code = i << 1; s->frame_size_min = 2 * ff_ac3_frame_size_tab[s->frame_size_code][s->bit_alloc.sr_code]; + s->num_blks_code = 0x3; + s->num_blocks = 6; } s->bit_rate = avctx->bit_rate; s->frame_size = s->frame_size_min; @@ -2103,35 +2215,21 @@ if (s->cutoff > (s->sample_rate >> 1)) s->cutoff = s->sample_rate >> 1; - /* validate audio service type / channels combination */ - if ((avctx->audio_service_type == AV_AUDIO_SERVICE_TYPE_KARAOKE && - avctx->channels == 1) || - ((avctx->audio_service_type == AV_AUDIO_SERVICE_TYPE_COMMENTARY || - avctx->audio_service_type == AV_AUDIO_SERVICE_TYPE_EMERGENCY || - avctx->audio_service_type == AV_AUDIO_SERVICE_TYPE_VOICE_OVER) - && avctx->channels > 1)) { - av_log(avctx, AV_LOG_ERROR, "invalid audio service type for the " - "specified number of channels\n"); - return AVERROR(EINVAL); - } - - if (!s->eac3) { - ret = validate_metadata(avctx); - if (ret) - return ret; - } + ret = ff_ac3_validate_metadata(s); + if (ret) + return ret; s->rematrixing_enabled = s->options.stereo_rematrixing && (s->channel_mode == AC3_CHMODE_STEREO); s->cpl_enabled = s->options.channel_coupling && - s->channel_mode >= AC3_CHMODE_STEREO && !s->fixed_point; + s->channel_mode >= AC3_CHMODE_STEREO; return 0; } -/** +/* * Set bandwidth for all channels. * The user can optionally supply a cutoff frequency. Otherwise an appropriate * default value will be used. @@ -2154,24 +2252,28 @@ /* set number of coefficients for each channel */ for (ch = 1; ch <= s->fbw_channels; ch++) { s->start_freq[ch] = 0; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) + for (blk = 0; blk < s->num_blocks; blk++) s->blocks[blk].end_freq[ch] = s->bandwidth_code * 3 + 73; } /* LFE channel always has 7 coefs */ if (s->lfe_on) { s->start_freq[s->lfe_channel] = 0; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) + for (blk = 0; blk < s->num_blocks; blk++) s->blocks[blk].end_freq[ch] = 7; } /* initialize coupling strategy */ if (s->cpl_enabled) { - if (s->options.cpl_start >= 0) { + if (s->options.cpl_start != AC3ENC_OPT_AUTO) { cpl_start = s->options.cpl_start; } else { cpl_start = ac3_coupling_start_tab[s->channel_mode-2][s->bit_alloc.sr_code][s->frame_size_code/2]; - if (cpl_start < 0) - s->cpl_enabled = 0; + if (cpl_start < 0) { + if (s->options.channel_coupling == AC3ENC_OPT_AUTO) + s->cpl_enabled = 0; + else + cpl_start = 15; + } } } if (s->cpl_enabled) { @@ -2197,46 +2299,48 @@ s->start_freq[CPL_CH] = cpl_start_band * 12 + 37; s->cpl_end_freq = cpl_end_band * 12 + 37; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) + for (blk = 0; blk < s->num_blocks; blk++) s->blocks[blk].end_freq[CPL_CH] = s->cpl_end_freq; } } -static av_cold int allocate_buffers(AVCodecContext *avctx) +static av_cold int allocate_buffers(AC3EncodeContext *s) { + AVCodecContext *avctx = s->avctx; int blk, ch; - AC3EncodeContext *s = avctx->priv_data; int channels = s->channels + 1; /* includes coupling channel */ + int channel_blocks = channels * s->num_blocks; + int total_coefs = AC3_MAX_COEFS * channel_blocks; if (s->allocate_sample_buffers(s)) goto alloc_fail; - FF_ALLOC_OR_GOTO(avctx, s->bap_buffer, AC3_MAX_BLOCKS * channels * - AC3_MAX_COEFS * sizeof(*s->bap_buffer), alloc_fail); - FF_ALLOC_OR_GOTO(avctx, s->bap1_buffer, AC3_MAX_BLOCKS * channels * - AC3_MAX_COEFS * sizeof(*s->bap1_buffer), alloc_fail); - FF_ALLOCZ_OR_GOTO(avctx, s->mdct_coef_buffer, AC3_MAX_BLOCKS * channels * - AC3_MAX_COEFS * sizeof(*s->mdct_coef_buffer), alloc_fail); - FF_ALLOC_OR_GOTO(avctx, s->exp_buffer, AC3_MAX_BLOCKS * channels * - AC3_MAX_COEFS * sizeof(*s->exp_buffer), alloc_fail); - FF_ALLOC_OR_GOTO(avctx, s->grouped_exp_buffer, AC3_MAX_BLOCKS * channels * - 128 * sizeof(*s->grouped_exp_buffer), alloc_fail); - FF_ALLOC_OR_GOTO(avctx, s->psd_buffer, AC3_MAX_BLOCKS * channels * - AC3_MAX_COEFS * sizeof(*s->psd_buffer), alloc_fail); - FF_ALLOC_OR_GOTO(avctx, s->band_psd_buffer, AC3_MAX_BLOCKS * channels * - 64 * sizeof(*s->band_psd_buffer), alloc_fail); - FF_ALLOC_OR_GOTO(avctx, s->mask_buffer, AC3_MAX_BLOCKS * channels * - 64 * sizeof(*s->mask_buffer), alloc_fail); - FF_ALLOC_OR_GOTO(avctx, s->qmant_buffer, AC3_MAX_BLOCKS * channels * - AC3_MAX_COEFS * sizeof(*s->qmant_buffer), alloc_fail); + FF_ALLOC_OR_GOTO(avctx, s->bap_buffer, total_coefs * + sizeof(*s->bap_buffer), alloc_fail); + FF_ALLOC_OR_GOTO(avctx, s->bap1_buffer, total_coefs * + sizeof(*s->bap1_buffer), alloc_fail); + FF_ALLOCZ_OR_GOTO(avctx, s->mdct_coef_buffer, total_coefs * + sizeof(*s->mdct_coef_buffer), alloc_fail); + FF_ALLOC_OR_GOTO(avctx, s->exp_buffer, total_coefs * + sizeof(*s->exp_buffer), alloc_fail); + FF_ALLOC_OR_GOTO(avctx, s->grouped_exp_buffer, channel_blocks * 128 * + sizeof(*s->grouped_exp_buffer), alloc_fail); + FF_ALLOC_OR_GOTO(avctx, s->psd_buffer, total_coefs * + sizeof(*s->psd_buffer), alloc_fail); + FF_ALLOC_OR_GOTO(avctx, s->band_psd_buffer, channel_blocks * 64 * + sizeof(*s->band_psd_buffer), alloc_fail); + FF_ALLOC_OR_GOTO(avctx, s->mask_buffer, channel_blocks * 64 * + sizeof(*s->mask_buffer), alloc_fail); + FF_ALLOC_OR_GOTO(avctx, s->qmant_buffer, total_coefs * + sizeof(*s->qmant_buffer), alloc_fail); if (s->cpl_enabled) { - FF_ALLOC_OR_GOTO(avctx, s->cpl_coord_exp_buffer, AC3_MAX_BLOCKS * channels * - 16 * sizeof(*s->cpl_coord_exp_buffer), alloc_fail); - FF_ALLOC_OR_GOTO(avctx, s->cpl_coord_mant_buffer, AC3_MAX_BLOCKS * channels * - 16 * sizeof(*s->cpl_coord_mant_buffer), alloc_fail); + FF_ALLOC_OR_GOTO(avctx, s->cpl_coord_exp_buffer, channel_blocks * 16 * + sizeof(*s->cpl_coord_exp_buffer), alloc_fail); + FF_ALLOC_OR_GOTO(avctx, s->cpl_coord_mant_buffer, channel_blocks * 16 * + sizeof(*s->cpl_coord_mant_buffer), alloc_fail); } - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; FF_ALLOCZ_OR_GOTO(avctx, block->mdct_coef, channels * sizeof(*block->mdct_coef), alloc_fail); @@ -2272,23 +2376,23 @@ } /* arrangement: channel, block, coeff */ - block->exp[ch] = &s->exp_buffer [AC3_MAX_COEFS * (AC3_MAX_BLOCKS * ch + blk)]; - block->mdct_coef[ch] = &s->mdct_coef_buffer [AC3_MAX_COEFS * (AC3_MAX_BLOCKS * ch + blk)]; + block->exp[ch] = &s->exp_buffer [AC3_MAX_COEFS * (s->num_blocks * ch + blk)]; + block->mdct_coef[ch] = &s->mdct_coef_buffer [AC3_MAX_COEFS * (s->num_blocks * ch + blk)]; } } if (!s->fixed_point) { - FF_ALLOCZ_OR_GOTO(avctx, s->fixed_coef_buffer, AC3_MAX_BLOCKS * channels * - AC3_MAX_COEFS * sizeof(*s->fixed_coef_buffer), alloc_fail); - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + FF_ALLOCZ_OR_GOTO(avctx, s->fixed_coef_buffer, total_coefs * + sizeof(*s->fixed_coef_buffer), alloc_fail); + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; FF_ALLOCZ_OR_GOTO(avctx, block->fixed_coef, channels * sizeof(*block->fixed_coef), alloc_fail); for (ch = 0; ch < channels; ch++) - block->fixed_coef[ch] = &s->fixed_coef_buffer[AC3_MAX_COEFS * (AC3_MAX_BLOCKS * ch + blk)]; + block->fixed_coef[ch] = &s->fixed_coef_buffer[AC3_MAX_COEFS * (s->num_blocks * ch + blk)]; } } else { - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; FF_ALLOCZ_OR_GOTO(avctx, block->fixed_coef, channels * sizeof(*block->fixed_coef), alloc_fail); @@ -2303,9 +2407,6 @@ } -/** - * Initialize the encoder. - */ av_cold int ff_ac3_encode_init(AVCodecContext *avctx) { AC3EncodeContext *s = avctx->priv_data; @@ -2315,14 +2416,14 @@ s->eac3 = avctx->codec_id == CODEC_ID_EAC3; - avctx->frame_size = AC3_FRAME_SIZE; - ff_ac3_common_init(); - ret = validate_options(avctx, s); + ret = validate_options(s); if (ret) return ret; + avctx->frame_size = AC3_BLOCK_SIZE * s->num_blocks; + s->bitstream_mode = avctx->audio_service_type; if (s->bitstream_mode == AV_AUDIO_SERVICE_TYPE_KARAOKE) s->bitstream_mode = 0x7; @@ -2342,24 +2443,11 @@ if (CONFIG_AC3_FIXED_ENCODER && s->fixed_point) { s->mdct_end = ff_ac3_fixed_mdct_end; s->mdct_init = ff_ac3_fixed_mdct_init; - s->apply_window = ff_ac3_fixed_apply_window; - s->normalize_samples = ff_ac3_fixed_normalize_samples; - s->scale_coefficients = ff_ac3_fixed_scale_coefficients; s->allocate_sample_buffers = ff_ac3_fixed_allocate_sample_buffers; - s->deinterleave_input_samples = ff_ac3_fixed_deinterleave_input_samples; - s->apply_mdct = ff_ac3_fixed_apply_mdct; - s->apply_channel_coupling = ff_ac3_fixed_apply_channel_coupling; - s->compute_rematrixing_strategy = ff_ac3_fixed_compute_rematrixing_strategy; } else if (CONFIG_AC3_ENCODER || CONFIG_EAC3_ENCODER) { s->mdct_end = ff_ac3_float_mdct_end; s->mdct_init = ff_ac3_float_mdct_init; - s->apply_window = ff_ac3_float_apply_window; - s->scale_coefficients = ff_ac3_float_scale_coefficients; s->allocate_sample_buffers = ff_ac3_float_allocate_sample_buffers; - s->deinterleave_input_samples = ff_ac3_float_deinterleave_input_samples; - s->apply_mdct = ff_ac3_float_apply_mdct; - s->apply_channel_coupling = ff_ac3_float_apply_channel_coupling; - s->compute_rematrixing_strategy = ff_ac3_float_compute_rematrixing_strategy; } if (CONFIG_EAC3_ENCODER && s->eac3) s->output_frame_header = ff_eac3_output_frame_header; @@ -2372,12 +2460,11 @@ bit_alloc_init(s); - FF_ALLOCZ_OR_GOTO(avctx, s->mdct, sizeof(AC3MDCTContext), init_fail); - ret = s->mdct_init(avctx, s->mdct, 9); + ret = s->mdct_init(s); if (ret) goto init_fail; - ret = allocate_buffers(avctx); + ret = allocate_buffers(s); if (ret) goto init_fail; @@ -2386,7 +2473,7 @@ dsputil_init(&s->dsp, avctx); ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT); - dprint_options(avctx); + dprint_options(s); return 0; init_fail: diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc_fixed.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc_fixed.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc_fixed.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc_fixed.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,70 +29,59 @@ #define CONFIG_FFT_FLOAT 0 #undef CONFIG_AC3ENC_FLOAT #include "ac3enc.h" +#include "eac3enc.h" #define AC3ENC_TYPE AC3ENC_TYPE_AC3_FIXED #include "ac3enc_opts_template.c" -static AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_item_name, - ac3fixed_options, LIBAVUTIL_VERSION_INT }; +static const AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_item_name, + ac3fixed_options, LIBAVUTIL_VERSION_INT }; #include "ac3enc_template.c" /** * Finalize MDCT and free allocated memory. + * + * @param s AC-3 encoder private context */ -av_cold void AC3_NAME(mdct_end)(AC3MDCTContext *mdct) +av_cold void AC3_NAME(mdct_end)(AC3EncodeContext *s) { - ff_mdct_end(&mdct->fft); + ff_mdct_end(&s->mdct); } /** * Initialize MDCT tables. - * @param nbits log2(MDCT size) + * + * @param s AC-3 encoder private context + * @return 0 on success, negative error code on failure */ -av_cold int AC3_NAME(mdct_init)(AVCodecContext *avctx, AC3MDCTContext *mdct, - int nbits) +av_cold int AC3_NAME(mdct_init)(AC3EncodeContext *s) { - int ret = ff_mdct_init(&mdct->fft, nbits, 0, -1.0); - mdct->window = ff_ac3_window; + int ret = ff_mdct_init(&s->mdct, 9, 0, -1.0); + s->mdct_window = ff_ac3_window; return ret; } -/** +/* * Apply KBD window to input samples prior to MDCT. */ -void AC3_NAME(apply_window)(DSPContext *dsp, int16_t *output, - const int16_t *input, const int16_t *window, - unsigned int len) +static void apply_window(DSPContext *dsp, int16_t *output, const int16_t *input, + const int16_t *window, unsigned int len) { dsp->apply_window_int16(output, input, window, len); } -/** - * Calculate the log2() of the maximum absolute value in an array. - * @param tab input array - * @param n number of values in the array - * @return log2(max(abs(tab[]))) - */ -static int log2_tab(AC3EncodeContext *s, int16_t *src, int len) -{ - int v = s->ac3dsp.ac3_max_msb_abs_int16(src, len); - return av_log2(v); -} - - -/** +/* * Normalize the input samples to use the maximum available precision. * This assumes signed 16-bit input samples. - * - * @return exponent shift */ -int AC3_NAME(normalize_samples)(AC3EncodeContext *s) +static int normalize_samples(AC3EncodeContext *s) { - int v = 14 - log2_tab(s, s->windowed_samples, AC3_WINDOW_SIZE); + int v = s->ac3dsp.ac3_max_msb_abs_int16(s->windowed_samples, AC3_WINDOW_SIZE); + v = 14 - av_log2(v); if (v > 0) s->ac3dsp.ac3_lshift_int16(s->windowed_samples, AC3_WINDOW_SIZE, v); /* +6 to right-shift from 31-bit to 25-bit */ @@ -100,14 +89,14 @@ } -/** +/* * Scale MDCT coefficients to 25-bit signed fixed-point. */ -void AC3_NAME(scale_coefficients)(AC3EncodeContext *s) +static void scale_coefficients(AC3EncodeContext *s) { int blk, ch; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; for (ch = 1; ch <= s->channels; ch++) { s->ac3dsp.ac3_rshift_int32(block->mdct_coef[ch], AC3_MAX_COEFS, @@ -117,6 +106,31 @@ } +/* + * Clip MDCT coefficients to allowable range. + */ +static void clip_coefficients(DSPContext *dsp, int32_t *coef, unsigned int len) +{ + dsp->vector_clip_int32(coef, coef, COEF_MIN, COEF_MAX, len); +} + + +/* + * Calculate a single coupling coordinate. + */ +static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl) +{ + if (energy_cpl <= COEF_MAX) { + return 1048576; + } else { + uint64_t coord = energy_ch / (energy_cpl >> 24); + uint32_t coord32 = FFMIN(coord, 1073741824); + coord32 = ff_sqrt(coord32) << 9; + return FFMIN(coord32, COEF_MAX); + } +} + + static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx) { AC3EncodeContext *s = avctx->priv_data; @@ -126,14 +140,13 @@ AVCodec ff_ac3_fixed_encoder = { - "ac3_fixed", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_AC3, - sizeof(AC3EncodeContext), - ac3_fixed_encode_init, - ff_ac3_encode_frame, - ff_ac3_encode_close, - NULL, + .name = "ac3_fixed", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_AC3, + .priv_data_size = sizeof(AC3EncodeContext), + .init = ac3_fixed_encode_init, + .encode = ff_ac3_fixed_encode_frame, + .close = ff_ac3_encode_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"), .priv_class = &ac3enc_class, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc_float.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc_float.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc_float.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc_float.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,8 +35,8 @@ #if CONFIG_AC3_ENCODER #define AC3ENC_TYPE AC3ENC_TYPE_AC3 #include "ac3enc_opts_template.c" -static AVClass ac3enc_class = { "AC-3 Encoder", av_default_item_name, - ac3_options, LIBAVUTIL_VERSION_INT }; +static const AVClass ac3enc_class = { "AC-3 Encoder", av_default_item_name, + ac3_options, LIBAVUTIL_VERSION_INT }; #endif #include "ac3enc_template.c" @@ -44,74 +44,107 @@ /** * Finalize MDCT and free allocated memory. + * + * @param s AC-3 encoder private context */ -av_cold void ff_ac3_float_mdct_end(AC3MDCTContext *mdct) +av_cold void ff_ac3_float_mdct_end(AC3EncodeContext *s) { - ff_mdct_end(&mdct->fft); - av_freep(&mdct->window); + ff_mdct_end(&s->mdct); + av_freep(&s->mdct_window); } /** * Initialize MDCT tables. - * @param nbits log2(MDCT size) + * + * @param s AC-3 encoder private context + * @return 0 on success, negative error code on failure */ -av_cold int ff_ac3_float_mdct_init(AVCodecContext *avctx, AC3MDCTContext *mdct, - int nbits) +av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s) { float *window; int i, n, n2; - n = 1 << nbits; + n = 1 << 9; n2 = n >> 1; window = av_malloc(n * sizeof(*window)); if (!window) { - av_log(avctx, AV_LOG_ERROR, "Cannot allocate memory.\n"); + av_log(s->avctx, AV_LOG_ERROR, "Cannot allocate memory.\n"); return AVERROR(ENOMEM); } ff_kbd_window_init(window, 5.0, n2); for (i = 0; i < n2; i++) window[n-1-i] = window[i]; - mdct->window = window; + s->mdct_window = window; - return ff_mdct_init(&mdct->fft, nbits, 0, -2.0 / n); + return ff_mdct_init(&s->mdct, 9, 0, -2.0 / n); } -/** +/* * Apply KBD window to input samples prior to MDCT. */ -void ff_ac3_float_apply_window(DSPContext *dsp, float *output, - const float *input, const float *window, - unsigned int len) +static void apply_window(DSPContext *dsp, float *output, const float *input, + const float *window, unsigned int len) { dsp->vector_fmul(output, input, window, len); } -/** +/* + * Normalize the input samples. + * Not needed for the floating-point encoder. + */ +static int normalize_samples(AC3EncodeContext *s) +{ + return 0; +} + + +/* * Scale MDCT coefficients from float to 24-bit fixed-point. */ -void ff_ac3_float_scale_coefficients(AC3EncodeContext *s) +static void scale_coefficients(AC3EncodeContext *s) +{ + int chan_size = AC3_MAX_COEFS * s->num_blocks; + int cpl = s->cpl_on; + s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + (chan_size * !cpl), + s->mdct_coef_buffer + (chan_size * !cpl), + chan_size * (s->channels + cpl)); +} + + +/* + * Clip MDCT coefficients to allowable range. + */ +static void clip_coefficients(DSPContext *dsp, float *coef, unsigned int len) +{ + dsp->vector_clipf(coef, coef, COEF_MIN, COEF_MAX, len); +} + + +/* + * Calculate a single coupling coordinate. + */ +static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl) { - int chan_size = AC3_MAX_COEFS * AC3_MAX_BLOCKS; - s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + chan_size, - s->mdct_coef_buffer + chan_size, - chan_size * s->channels); + float coord = 0.125; + if (energy_cpl > 0) + coord *= sqrtf(energy_ch / energy_cpl); + return FFMIN(coord, COEF_MAX); } #if CONFIG_AC3_ENCODER AVCodec ff_ac3_encoder = { - "ac3", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_AC3, - sizeof(AC3EncodeContext), - ff_ac3_encode_init, - ff_ac3_encode_frame, - ff_ac3_encode_close, - NULL, + .name = "ac3", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_AC3, + .priv_data_size = sizeof(AC3EncodeContext), + .init = ff_ac3_encode_init, + .encode = ff_ac3_float_encode_frame, + .close = ff_ac3_encode_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"), .priv_class = &ac3enc_class, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc.h 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc.h 2012-01-11 00:34:30.000000000 +0000 @@ -50,22 +50,40 @@ #if CONFIG_AC3ENC_FLOAT #define AC3_NAME(x) ff_ac3_float_ ## x #define MAC_COEF(d,a,b) ((d)+=(a)*(b)) +#define COEF_MIN (-16777215.0/16777216.0) +#define COEF_MAX ( 16777215.0/16777216.0) +#define NEW_CPL_COORD_THRESHOLD 0.03 typedef float SampleType; typedef float CoefType; typedef float CoefSumType; #else #define AC3_NAME(x) ff_ac3_fixed_ ## x #define MAC_COEF(d,a,b) MAC64(d,a,b) +#define COEF_MIN -16777215 +#define COEF_MAX 16777215 +#define NEW_CPL_COORD_THRESHOLD 503317 typedef int16_t SampleType; typedef int32_t CoefType; typedef int64_t CoefSumType; #endif +/* common option values */ +#define AC3ENC_OPT_NONE -1 +#define AC3ENC_OPT_AUTO -1 +#define AC3ENC_OPT_OFF 0 +#define AC3ENC_OPT_ON 1 +#define AC3ENC_OPT_NOT_INDICATED 0 +#define AC3ENC_OPT_MODE_ON 2 +#define AC3ENC_OPT_MODE_OFF 1 + +/* specific option values */ +#define AC3ENC_OPT_LARGE_ROOM 1 +#define AC3ENC_OPT_SMALL_ROOM 2 +#define AC3ENC_OPT_DOWNMIX_LTRT 1 +#define AC3ENC_OPT_DOWNMIX_LORO 2 +#define AC3ENC_OPT_ADCONV_STANDARD 0 +#define AC3ENC_OPT_ADCONV_HDCD 1 -typedef struct AC3MDCTContext { - const SampleType *window; ///< MDCT window function - FFTContext fft; ///< FFT context for MDCT calculation -} AC3MDCTContext; /** * Encoding Options used by AVOption. @@ -92,6 +110,8 @@ int dolby_surround_ex_mode; int dolby_headphone_mode; int ad_converter_type; + int eac3_mixing_metadata; + int eac3_info_metadata; /* other encoding options */ int allow_per_frame_metadata; @@ -122,7 +142,7 @@ int cpl_in_use; ///< coupling in use for this block (cplinu) uint8_t channel_in_cpl[AC3_MAX_CHANNELS]; ///< channel in coupling (chincpl) int num_cpl_channels; ///< number of channels in coupling - uint8_t new_cpl_coords; ///< send new coupling coordinates (cplcoe) + uint8_t new_cpl_coords[AC3_MAX_CHANNELS]; ///< send new coupling coordinates (cplcoe) uint8_t cpl_master_exp[AC3_MAX_CHANNELS]; ///< coupling coord master exponents (mstrcplco) int new_snr_offsets; ///< send new SNR offsets int new_cpl_leak; ///< send new coupling leak info @@ -139,7 +159,8 @@ PutBitContext pb; ///< bitstream writer context DSPContext dsp; AC3DSPContext ac3dsp; ///< AC-3 optimized functions - AC3MDCTContext *mdct; ///< MDCT context + FFTContext mdct; ///< FFT context for MDCT calculation + const SampleType *mdct_window; ///< MDCT window function array AC3Block blocks[AC3_MAX_BLOCKS]; ///< per-block info @@ -151,6 +172,8 @@ int bit_rate; ///< target bit rate, in bits-per-second int sample_rate; ///< sampling frequency, in Hz + int num_blks_code; ///< number of blocks code (numblkscod) + int num_blocks; ///< number of blocks per frame int frame_size_min; ///< minimum frame size in case rounding is necessary int frame_size; ///< current frame size in bytes int frame_size_code; ///< frame size code (frmsizecod) @@ -217,82 +240,66 @@ uint8_t *cpl_coord_mant_buffer; uint8_t exp_strategy[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< exponent strategies + uint8_t frame_exp_strategy[AC3_MAX_CHANNELS]; ///< frame exp strategy index + int use_frame_exp_strategy; ///< indicates use of frame exp strategy uint8_t exp_ref_block[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< reference blocks for EXP_REUSE uint8_t *ref_bap [AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< bit allocation pointers (bap) int ref_bap_set; ///< indicates if ref_bap pointers have been set /* fixed vs. float function pointers */ - void (*mdct_end)(AC3MDCTContext *mdct); - int (*mdct_init)(AVCodecContext *avctx, AC3MDCTContext *mdct, int nbits); - void (*apply_window)(DSPContext *dsp, SampleType *output, - const SampleType *input, const SampleType *window, - unsigned int len); - int (*normalize_samples)(struct AC3EncodeContext *s); - void (*scale_coefficients)(struct AC3EncodeContext *s); + void (*mdct_end)(struct AC3EncodeContext *s); + int (*mdct_init)(struct AC3EncodeContext *s); /* fixed vs. float templated function pointers */ int (*allocate_sample_buffers)(struct AC3EncodeContext *s); - void (*deinterleave_input_samples)(struct AC3EncodeContext *s, - const SampleType *samples); - void (*apply_mdct)(struct AC3EncodeContext *s); - void (*apply_channel_coupling)(struct AC3EncodeContext *s); - void (*compute_rematrixing_strategy)(struct AC3EncodeContext *s); /* AC-3 vs. E-AC-3 function pointers */ void (*output_frame_header)(struct AC3EncodeContext *s); } AC3EncodeContext; -extern const int64_t ff_ac3_channel_layouts[19]; +extern const uint64_t ff_ac3_channel_layouts[19]; int ff_ac3_encode_init(AVCodecContext *avctx); -int ff_ac3_encode_frame(AVCodecContext *avctx, unsigned char *frame, - int buf_size, void *data); - int ff_ac3_encode_close(AVCodecContext *avctx); +int ff_ac3_validate_metadata(AC3EncodeContext *s); -/* prototypes for functions in ac3enc_fixed.c and ac3enc_float.c */ +void ff_ac3_adjust_frame_size(AC3EncodeContext *s); -void ff_ac3_fixed_mdct_end(AC3MDCTContext *mdct); -void ff_ac3_float_mdct_end(AC3MDCTContext *mdct); +void ff_ac3_compute_coupling_strategy(AC3EncodeContext *s); -int ff_ac3_fixed_mdct_init(AVCodecContext *avctx, AC3MDCTContext *mdct, - int nbits); -int ff_ac3_float_mdct_init(AVCodecContext *avctx, AC3MDCTContext *mdct, - int nbits); - -void ff_ac3_fixed_apply_window(DSPContext *dsp, SampleType *output, - const SampleType *input, - const SampleType *window, unsigned int len); -void ff_ac3_float_apply_window(DSPContext *dsp, SampleType *output, - const SampleType *input, - const SampleType *window, unsigned int len); +void ff_ac3_apply_rematrixing(AC3EncodeContext *s); -int ff_ac3_fixed_normalize_samples(AC3EncodeContext *s); +void ff_ac3_process_exponents(AC3EncodeContext *s); -void ff_ac3_fixed_scale_coefficients(AC3EncodeContext *s); -void ff_ac3_float_scale_coefficients(AC3EncodeContext *s); +int ff_ac3_compute_bit_allocation(AC3EncodeContext *s); +void ff_ac3_group_exponents(AC3EncodeContext *s); -/* prototypes for functions in ac3enc_template.c */ +void ff_ac3_quantize_mantissas(AC3EncodeContext *s); + +void ff_ac3_output_frame(AC3EncodeContext *s, unsigned char *frame); -int ff_ac3_fixed_allocate_sample_buffers(AC3EncodeContext *s); -int ff_ac3_float_allocate_sample_buffers(AC3EncodeContext *s); -void ff_ac3_fixed_deinterleave_input_samples(AC3EncodeContext *s, - const SampleType *samples); -void ff_ac3_float_deinterleave_input_samples(AC3EncodeContext *s, - const SampleType *samples); +/* prototypes for functions in ac3enc_fixed.c and ac3enc_float.c */ -void ff_ac3_fixed_apply_mdct(AC3EncodeContext *s); -void ff_ac3_float_apply_mdct(AC3EncodeContext *s); +void ff_ac3_fixed_mdct_end(AC3EncodeContext *s); +void ff_ac3_float_mdct_end(AC3EncodeContext *s); -void ff_ac3_fixed_apply_channel_coupling(AC3EncodeContext *s); -void ff_ac3_float_apply_channel_coupling(AC3EncodeContext *s); +int ff_ac3_fixed_mdct_init(AC3EncodeContext *s); +int ff_ac3_float_mdct_init(AC3EncodeContext *s); + + +/* prototypes for functions in ac3enc_template.c */ + +int ff_ac3_fixed_allocate_sample_buffers(AC3EncodeContext *s); +int ff_ac3_float_allocate_sample_buffers(AC3EncodeContext *s); -void ff_ac3_fixed_compute_rematrixing_strategy(AC3EncodeContext *s); -void ff_ac3_float_compute_rematrixing_strategy(AC3EncodeContext *s); +int ff_ac3_fixed_encode_frame(AVCodecContext *avctx, unsigned char *frame, + int buf_size, void *data); +int ff_ac3_float_encode_frame(AVCodecContext *avctx, unsigned char *frame, + int buf_size, void *data); #endif /* AVCODEC_AC3ENC_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc_opts_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc_opts_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc_opts_template.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc_opts_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,56 +29,52 @@ #else /* AC3ENC_TYPE_EAC3 */ static const AVOption eac3_options[] = { #endif -#if AC3ENC_TYPE != AC3ENC_TYPE_EAC3 /* Metadata Options */ -{"per_frame_metadata", "Allow Changing Metadata Per-Frame", OFFSET(allow_per_frame_metadata), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, 1, AC3ENC_PARAM}, -/* downmix levels */ -{"center_mixlev", "Center Mix Level", OFFSET(center_mix_level), FF_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_4POINT5DB }, 0.0, 1.0, AC3ENC_PARAM}, -{"surround_mixlev", "Surround Mix Level", OFFSET(surround_mix_level), FF_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_6DB }, 0.0, 1.0, AC3ENC_PARAM}, +{"per_frame_metadata", "Allow Changing Metadata Per-Frame", OFFSET(allow_per_frame_metadata), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, 1, AC3ENC_PARAM}, +#if AC3ENC_TYPE != AC3ENC_TYPE_EAC3 +/* AC-3 downmix levels */ +{"center_mixlev", "Center Mix Level", OFFSET(center_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_4POINT5DB }, 0.0, 1.0, AC3ENC_PARAM}, +{"surround_mixlev", "Surround Mix Level", OFFSET(surround_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_6DB }, 0.0, 1.0, AC3ENC_PARAM}, +#endif /* audio production information */ -{"mixing_level", "Mixing Level", OFFSET(mixing_level), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 111, AC3ENC_PARAM}, -{"room_type", "Room Type", OFFSET(room_type), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 2, AC3ENC_PARAM, "room_type"}, - {"notindicated", "Not Indicated (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"}, - {"large", "Large Room", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"}, - {"small", "Small Room", 0, FF_OPT_TYPE_CONST, {.dbl = 2 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"}, +{"mixing_level", "Mixing Level", OFFSET(mixing_level), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, 111, AC3ENC_PARAM}, +{"room_type", "Room Type", OFFSET(room_type), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_SMALL_ROOM, AC3ENC_PARAM, "room_type"}, + {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"}, + {"large", "Large Room", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_LARGE_ROOM }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"}, + {"small", "Small Room", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_SMALL_ROOM }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"}, /* other metadata options */ -{"copyright", "Copyright Bit", OFFSET(copyright), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, 1, AC3ENC_PARAM}, -#endif -{"dialnorm", "Dialogue Level (dB)", OFFSET(dialogue_level), FF_OPT_TYPE_INT, {.dbl = -31 }, -31, -1, AC3ENC_PARAM}, -#if AC3ENC_TYPE != AC3ENC_TYPE_EAC3 -{"dsur_mode", "Dolby Surround Mode", OFFSET(dolby_surround_mode), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, 2, AC3ENC_PARAM, "dsur_mode"}, - {"notindicated", "Not Indicated (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"}, - {"on", "Dolby Surround Encoded", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"}, - {"off", "Not Dolby Surround Encoded", 0, FF_OPT_TYPE_CONST, {.dbl = 2 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"}, -{"original", "Original Bit Stream", OFFSET(original), FF_OPT_TYPE_INT, {.dbl = 1 }, 0, 1, AC3ENC_PARAM}, +{"copyright", "Copyright Bit", OFFSET(copyright), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, 1, AC3ENC_PARAM}, +{"dialnorm", "Dialogue Level (dB)", OFFSET(dialogue_level), AV_OPT_TYPE_INT, {.dbl = -31 }, -31, -1, AC3ENC_PARAM}, +{"dsur_mode", "Dolby Surround Mode", OFFSET(dolby_surround_mode), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_MODE_ON, AC3ENC_PARAM, "dsur_mode"}, + {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"}, + {"on", "Dolby Surround Encoded", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_MODE_ON }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"}, + {"off", "Not Dolby Surround Encoded", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_MODE_OFF }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"}, +{"original", "Original Bit Stream", OFFSET(original), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, 1, AC3ENC_PARAM}, /* extended bitstream information */ -{"dmix_mode", "Preferred Stereo Downmix Mode", OFFSET(preferred_stereo_downmix), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 2, AC3ENC_PARAM, "dmix_mode"}, - {"notindicated", "Not Indicated (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"}, - {"ltrt", "Lt/Rt Downmix Preferred", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"}, - {"loro", "Lo/Ro Downmix Preferred", 0, FF_OPT_TYPE_CONST, {.dbl = 2 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"}, -{"ltrt_cmixlev", "Lt/Rt Center Mix Level", OFFSET(ltrt_center_mix_level), FF_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM}, -{"ltrt_surmixlev", "Lt/Rt Surround Mix Level", OFFSET(ltrt_surround_mix_level), FF_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM}, -{"loro_cmixlev", "Lo/Ro Center Mix Level", OFFSET(loro_center_mix_level), FF_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM}, -{"loro_surmixlev", "Lo/Ro Surround Mix Level", OFFSET(loro_surround_mix_level), FF_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM}, -{"dsurex_mode", "Dolby Surround EX Mode", OFFSET(dolby_surround_ex_mode), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 2, AC3ENC_PARAM, "dsurex_mode"}, - {"notindicated", "Not Indicated (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"}, - {"on", "Dolby Surround EX Encoded", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"}, - {"off", "Not Dolby Surround EX Encoded", 0, FF_OPT_TYPE_CONST, {.dbl = 2 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"}, -{"dheadphone_mode", "Dolby Headphone Mode", OFFSET(dolby_headphone_mode), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 2, AC3ENC_PARAM, "dheadphone_mode"}, - {"notindicated", "Not Indicated (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"}, - {"on", "Dolby Headphone Encoded", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"}, - {"off", "Not Dolby Headphone Encoded", 0, FF_OPT_TYPE_CONST, {.dbl = 2 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"}, -{"ad_conv_type", "A/D Converter Type", OFFSET(ad_converter_type), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 1, AC3ENC_PARAM, "ad_conv_type"}, - {"standard", "Standard (default)", 0, FF_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"}, - {"hdcd", "HDCD", 0, FF_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"}, -#endif +{"dmix_mode", "Preferred Stereo Downmix Mode", OFFSET(preferred_stereo_downmix), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_DOWNMIX_LORO, AC3ENC_PARAM, "dmix_mode"}, + {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"}, + {"ltrt", "Lt/Rt Downmix Preferred", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_DOWNMIX_LTRT }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"}, + {"loro", "Lo/Ro Downmix Preferred", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_DOWNMIX_LORO }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"}, +{"ltrt_cmixlev", "Lt/Rt Center Mix Level", OFFSET(ltrt_center_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM}, +{"ltrt_surmixlev", "Lt/Rt Surround Mix Level", OFFSET(ltrt_surround_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM}, +{"loro_cmixlev", "Lo/Ro Center Mix Level", OFFSET(loro_center_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM}, +{"loro_surmixlev", "Lo/Ro Surround Mix Level", OFFSET(loro_surround_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM}, +{"dsurex_mode", "Dolby Surround EX Mode", OFFSET(dolby_surround_ex_mode), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_MODE_ON, AC3ENC_PARAM, "dsurex_mode"}, + {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"}, + {"on", "Dolby Surround EX Encoded", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_MODE_ON }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"}, + {"off", "Not Dolby Surround EX Encoded", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_MODE_OFF }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"}, +{"dheadphone_mode", "Dolby Headphone Mode", OFFSET(dolby_headphone_mode), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_MODE_ON, AC3ENC_PARAM, "dheadphone_mode"}, + {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"}, + {"on", "Dolby Headphone Encoded", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_MODE_ON }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"}, + {"off", "Not Dolby Headphone Encoded", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_MODE_OFF }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"}, +{"ad_conv_type", "A/D Converter Type", OFFSET(ad_converter_type), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_ADCONV_HDCD, AC3ENC_PARAM, "ad_conv_type"}, + {"standard", "Standard (default)", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_ADCONV_STANDARD }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"}, + {"hdcd", "HDCD", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_ADCONV_HDCD }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"}, /* Other Encoding Options */ -{"stereo_rematrixing", "Stereo Rematrixing", OFFSET(stereo_rematrixing), FF_OPT_TYPE_INT, {.dbl = 1 }, 0, 1, AC3ENC_PARAM}, -#if AC3ENC_TYPE != AC3ENC_TYPE_AC3_FIXED -{"channel_coupling", "Channel Coupling", OFFSET(channel_coupling), FF_OPT_TYPE_INT, {.dbl = 1 }, 0, 1, AC3ENC_PARAM, "channel_coupling"}, - {"auto", "Selected by the Encoder", 0, FF_OPT_TYPE_CONST, {.dbl = -1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "channel_coupling"}, -{"cpl_start_band", "Coupling Start Band", OFFSET(cpl_start), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, 15, AC3ENC_PARAM, "cpl_start_band"}, - {"auto", "Selected by the Encoder", 0, FF_OPT_TYPE_CONST, {.dbl = -1 }, INT_MIN, INT_MAX, AC3ENC_PARAM, "cpl_start_band"}, -#endif +{"stereo_rematrixing", "Stereo Rematrixing", OFFSET(stereo_rematrixing), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_ON }, AC3ENC_OPT_OFF, AC3ENC_OPT_ON, AC3ENC_PARAM}, +{"channel_coupling", "Channel Coupling", OFFSET(channel_coupling), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_AUTO }, AC3ENC_OPT_AUTO, AC3ENC_OPT_ON, AC3ENC_PARAM, "channel_coupling"}, + {"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_AUTO }, INT_MIN, INT_MAX, AC3ENC_PARAM, "channel_coupling"}, +{"cpl_start_band", "Coupling Start Band", OFFSET(cpl_start), AV_OPT_TYPE_INT, {.dbl = AC3ENC_OPT_AUTO }, AC3ENC_OPT_AUTO, 15, AC3ENC_PARAM, "cpl_start_band"}, + {"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.dbl = AC3ENC_OPT_AUTO }, INT_MIN, INT_MAX, AC3ENC_PARAM, "cpl_start_band"}, {NULL} }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3enc_template.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3enc_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,7 +28,20 @@ #include -#include "ac3enc.h" + +/* prototypes for static functions in ac3enc_fixed.c and ac3enc_float.c */ + +static void scale_coefficients(AC3EncodeContext *s); + +static void apply_window(DSPContext *dsp, SampleType *output, + const SampleType *input, const SampleType *window, + unsigned int len); + +static int normalize_samples(AC3EncodeContext *s); + +static void clip_coefficients(DSPContext *dsp, CoefType *coef, unsigned int len); + +static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl); int AC3_NAME(allocate_sample_buffers)(AC3EncodeContext *s) @@ -51,12 +64,12 @@ } -/** +/* * Deinterleave input samples. * Channels are reordered from Libav's default order to AC-3 order. */ -void AC3_NAME(deinterleave_input_samples)(AC3EncodeContext *s, - const SampleType *samples) +static void deinterleave_input_samples(AC3EncodeContext *s, + const SampleType *samples) { int ch, i; @@ -66,13 +79,13 @@ int sinc; /* copy last 256 samples of previous frame to the start of the current frame */ - memcpy(&s->planar_samples[ch][0], &s->planar_samples[ch][AC3_FRAME_SIZE], + memcpy(&s->planar_samples[ch][0], &s->planar_samples[ch][AC3_BLOCK_SIZE * s->num_blocks], AC3_BLOCK_SIZE * sizeof(s->planar_samples[0][0])); /* deinterleave */ sinc = s->channels; sptr = samples + s->channel_map[ch]; - for (i = AC3_BLOCK_SIZE; i < AC3_FRAME_SIZE+AC3_BLOCK_SIZE; i++) { + for (i = AC3_BLOCK_SIZE; i < AC3_BLOCK_SIZE * (s->num_blocks + 1); i++) { s->planar_samples[ch][i] = *sptr; sptr += sinc; } @@ -80,64 +93,52 @@ } -/** +/* * Apply the MDCT to input samples to generate frequency coefficients. * This applies the KBD window and normalizes the input to reduce precision * loss due to fixed-point calculations. */ -void AC3_NAME(apply_mdct)(AC3EncodeContext *s) +static void apply_mdct(AC3EncodeContext *s) { int blk, ch; for (ch = 0; ch < s->channels; ch++) { - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; const SampleType *input_samples = &s->planar_samples[ch][blk * AC3_BLOCK_SIZE]; - s->apply_window(&s->dsp, s->windowed_samples, input_samples, - s->mdct->window, AC3_WINDOW_SIZE); + apply_window(&s->dsp, s->windowed_samples, input_samples, + s->mdct_window, AC3_WINDOW_SIZE); if (s->fixed_point) - block->coeff_shift[ch+1] = s->normalize_samples(s); + block->coeff_shift[ch+1] = normalize_samples(s); - s->mdct->fft.mdct_calcw(&s->mdct->fft, block->mdct_coef[ch+1], - s->windowed_samples); + s->mdct.mdct_calcw(&s->mdct, block->mdct_coef[ch+1], + s->windowed_samples); } } } -/** - * Calculate a single coupling coordinate. - */ -static inline float calc_cpl_coord(float energy_ch, float energy_cpl) -{ - float coord = 0.125; - if (energy_cpl > 0) - coord *= sqrtf(energy_ch / energy_cpl); - return coord; -} - - -/** +/* * Calculate coupling channel and coupling coordinates. - * TODO: Currently this is only used for the floating-point encoder. I was - * able to make it work for the fixed-point encoder, but quality was - * generally lower in most cases than not using coupling. If a more - * adaptive coupling strategy were to be implemented it might be useful - * at that time to use coupling for the fixed-point encoder as well. */ -void AC3_NAME(apply_channel_coupling)(AC3EncodeContext *s) +static void apply_channel_coupling(AC3EncodeContext *s) { + LOCAL_ALIGNED_16(CoefType, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); #if CONFIG_AC3ENC_FLOAT - LOCAL_ALIGNED_16(float, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); LOCAL_ALIGNED_16(int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]); +#else + int32_t (*fixed_cpl_coords)[AC3_MAX_CHANNELS][16] = cpl_coords; +#endif int blk, ch, bnd, i, j; CoefSumType energy[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS][16] = {{{0}}}; int cpl_start, num_cpl_coefs; memset(cpl_coords, 0, AC3_MAX_BLOCKS * sizeof(*cpl_coords)); - memset(fixed_cpl_coords, 0, AC3_MAX_BLOCKS * sizeof(*fixed_cpl_coords)); +#if CONFIG_AC3ENC_FLOAT + memset(fixed_cpl_coords, 0, AC3_MAX_BLOCKS * sizeof(*cpl_coords)); +#endif /* align start to 16-byte boundary. align length to multiple of 32. note: coupling start bin % 4 will always be 1 */ @@ -146,7 +147,7 @@ cpl_start = FFMIN(256, cpl_start + num_cpl_coefs) - num_cpl_coefs; /* calculate coupling channel from fbw channels */ - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; CoefType *cpl_coef = &block->mdct_coef[CPL_CH][cpl_start]; if (!block->cpl_in_use) @@ -160,12 +161,8 @@ cpl_coef[i] += ch_coef[i]; } - /* coefficients must be clipped to +/- 1.0 in order to be encoded */ - s->dsp.vector_clipf(cpl_coef, cpl_coef, -1.0f, 1.0f, num_cpl_coefs); - - /* scale coupling coefficients from float to 24-bit fixed-point */ - s->ac3dsp.float_to_fixed24(&block->fixed_coef[CPL_CH][cpl_start], - cpl_coef, num_cpl_coefs); + /* coefficients must be clipped in order to be encoded */ + clip_coefficients(&s->dsp, cpl_coef, num_cpl_coefs); } /* calculate energy in each band in coupling channel and each fbw channel */ @@ -175,7 +172,7 @@ while (i < s->cpl_end_freq) { int band_size = s->cpl_band_sizes[bnd]; for (ch = CPL_CH; ch <= s->fbw_channels; ch++) { - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; if (!block->cpl_in_use || (ch > CPL_CH && !block->channel_in_cpl[ch])) continue; @@ -189,68 +186,64 @@ bnd++; } + /* calculate coupling coordinates for all blocks for all channels */ + for (blk = 0; blk < s->num_blocks; blk++) { + AC3Block *block = &s->blocks[blk]; + if (!block->cpl_in_use) + continue; + for (ch = 1; ch <= s->fbw_channels; ch++) { + if (!block->channel_in_cpl[ch]) + continue; + for (bnd = 0; bnd < s->num_cpl_bands; bnd++) { + cpl_coords[blk][ch][bnd] = calc_cpl_coord(energy[blk][ch][bnd], + energy[blk][CPL_CH][bnd]); + } + } + } + /* determine which blocks to send new coupling coordinates for */ - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; AC3Block *block0 = blk ? &s->blocks[blk-1] : NULL; - int new_coords = 0; - CoefSumType coord_diff[AC3_MAX_CHANNELS] = {0,}; - - if (block->cpl_in_use) { - /* calculate coupling coordinates for all blocks and calculate the - average difference between coordinates in successive blocks */ - for (ch = 1; ch <= s->fbw_channels; ch++) { - if (!block->channel_in_cpl[ch]) - continue; - for (bnd = 0; bnd < s->num_cpl_bands; bnd++) { - cpl_coords[blk][ch][bnd] = calc_cpl_coord(energy[blk][ch][bnd], - energy[blk][CPL_CH][bnd]); - if (blk > 0 && block0->cpl_in_use && - block0->channel_in_cpl[ch]) { - coord_diff[ch] += fabs(cpl_coords[blk-1][ch][bnd] - - cpl_coords[blk ][ch][bnd]); - } - } - coord_diff[ch] /= s->num_cpl_bands; - } + memset(block->new_cpl_coords, 0, sizeof(block->new_cpl_coords)); + if (block->cpl_in_use) { /* send new coordinates if this is the first block, if previous * block did not use coupling but this block does, the channels * using coupling has changed from the previous block, or the * coordinate difference from the last block for any channel is * greater than a threshold value. */ - if (blk == 0) { - new_coords = 1; - } else if (!block0->cpl_in_use) { - new_coords = 1; + if (blk == 0 || !block0->cpl_in_use) { + for (ch = 1; ch <= s->fbw_channels; ch++) + block->new_cpl_coords[ch] = 1; } else { for (ch = 1; ch <= s->fbw_channels; ch++) { - if (block->channel_in_cpl[ch] && !block0->channel_in_cpl[ch]) { - new_coords = 1; - break; - } - } - if (!new_coords) { - for (ch = 1; ch <= s->fbw_channels; ch++) { - if (block->channel_in_cpl[ch] && coord_diff[ch] > 0.04) { - new_coords = 1; - break; + if (!block->channel_in_cpl[ch]) + continue; + if (!block0->channel_in_cpl[ch]) { + block->new_cpl_coords[ch] = 1; + } else { + CoefSumType coord_diff = 0; + for (bnd = 0; bnd < s->num_cpl_bands; bnd++) { + coord_diff += FFABS(cpl_coords[blk-1][ch][bnd] - + cpl_coords[blk ][ch][bnd]); } + coord_diff /= s->num_cpl_bands; + if (coord_diff > NEW_CPL_COORD_THRESHOLD) + block->new_cpl_coords[ch] = 1; } } } } - block->new_cpl_coords = new_coords; } /* calculate final coupling coordinates, taking into account reusing of coordinates in successive blocks */ for (bnd = 0; bnd < s->num_cpl_bands; bnd++) { blk = 0; - while (blk < AC3_MAX_BLOCKS) { - int blk1; - CoefSumType energy_cpl; + while (blk < s->num_blocks) { + int av_uninit(blk1); AC3Block *block = &s->blocks[blk]; if (!block->cpl_in_use) { @@ -258,23 +251,18 @@ continue; } - energy_cpl = energy[blk][CPL_CH][bnd]; - blk1 = blk+1; - while (!s->blocks[blk1].new_cpl_coords && blk1 < AC3_MAX_BLOCKS) { - if (s->blocks[blk1].cpl_in_use) - energy_cpl += energy[blk1][CPL_CH][bnd]; - blk1++; - } - for (ch = 1; ch <= s->fbw_channels; ch++) { - CoefType energy_ch; + CoefSumType energy_ch, energy_cpl; if (!block->channel_in_cpl[ch]) continue; + energy_cpl = energy[blk][CPL_CH][bnd]; energy_ch = energy[blk][ch][bnd]; blk1 = blk+1; - while (!s->blocks[blk1].new_cpl_coords && blk1 < AC3_MAX_BLOCKS) { - if (s->blocks[blk1].cpl_in_use) + while (!s->blocks[blk1].new_cpl_coords[ch] && blk1 < s->num_blocks) { + if (s->blocks[blk1].cpl_in_use) { + energy_cpl += energy[blk1][CPL_CH][bnd]; energy_ch += energy[blk1][ch][bnd]; + } blk1++; } cpl_coords[blk][ch][bnd] = calc_cpl_coord(energy_ch, energy_cpl); @@ -284,14 +272,16 @@ } /* calculate exponents/mantissas for coupling coordinates */ - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; - if (!block->cpl_in_use || !block->new_cpl_coords) + if (!block->cpl_in_use) continue; +#if CONFIG_AC3ENC_FLOAT s->ac3dsp.float_to_fixed24(fixed_cpl_coords[blk][1], cpl_coords[blk][1], s->fbw_channels * 16); +#endif s->ac3dsp.extract_exponents(block->cpl_coord_exp[1], fixed_cpl_coords[blk][1], s->fbw_channels * 16); @@ -299,6 +289,9 @@ for (ch = 1; ch <= s->fbw_channels; ch++) { int bnd, min_exp, max_exp, master_exp; + if (!block->new_cpl_coords[ch]) + continue; + /* determine master exponent */ min_exp = max_exp = block->cpl_coord_exp[ch][0]; for (bnd = 1; bnd < s->num_cpl_bands; bnd++) { @@ -332,14 +325,13 @@ if (CONFIG_EAC3_ENCODER && s->eac3) ff_eac3_set_cpl_states(s); -#endif /* CONFIG_AC3ENC_FLOAT */ } -/** +/* * Determine rematrixing flags for each block and band. */ -void AC3_NAME(compute_rematrixing_strategy)(AC3EncodeContext *s) +static void compute_rematrixing_strategy(AC3EncodeContext *s) { int nb_coefs; int blk, bnd, i; @@ -348,15 +340,10 @@ if (s->channel_mode != AC3_CHMODE_STEREO) return; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { block = &s->blocks[blk]; block->new_rematrixing_strategy = !blk; - if (!s->rematrixing_enabled) { - block0 = block; - continue; - } - block->num_rematrixing_bands = 4; if (block->cpl_in_use) { block->num_rematrixing_bands -= (s->start_freq[CPL_CH] <= 61); @@ -366,6 +353,11 @@ } nb_coefs = FFMIN(block->end_freq[1], block->end_freq[2]); + if (!s->rematrixing_enabled) { + block0 = block; + continue; + } + for (bnd = 0; bnd < block->num_rematrixing_bands; bnd++) { /* calculate calculate sum of squared coeffs for one band in one block */ int start = ff_ac3_rematrix_band_tab[bnd]; @@ -397,3 +389,60 @@ block0 = block; } } + + +int AC3_NAME(encode_frame)(AVCodecContext *avctx, unsigned char *frame, + int buf_size, void *data) +{ + AC3EncodeContext *s = avctx->priv_data; + const SampleType *samples = data; + int ret; + + if (s->options.allow_per_frame_metadata) { + ret = ff_ac3_validate_metadata(s); + if (ret) + return ret; + } + + if (s->bit_alloc.sr_code == 1 || s->eac3) + ff_ac3_adjust_frame_size(s); + + deinterleave_input_samples(s, samples); + + apply_mdct(s); + + if (s->fixed_point) + scale_coefficients(s); + + clip_coefficients(&s->dsp, s->blocks[0].mdct_coef[1], + AC3_MAX_COEFS * s->num_blocks * s->channels); + + s->cpl_on = s->cpl_enabled; + ff_ac3_compute_coupling_strategy(s); + + if (s->cpl_on) + apply_channel_coupling(s); + + compute_rematrixing_strategy(s); + + if (!s->fixed_point) + scale_coefficients(s); + + ff_ac3_apply_rematrixing(s); + + ff_ac3_process_exponents(s); + + ret = ff_ac3_compute_bit_allocation(s); + if (ret) { + av_log(avctx, AV_LOG_ERROR, "Bit allocation failed. Try increasing the bitrate.\n"); + return ret; + } + + ff_ac3_group_exponents(s); + + ff_ac3_quantize_mantissas(s); + + ff_ac3_output_frame(s, frame); + + return s->frame_size; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3.h 2011-05-25 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3.h 2012-01-11 00:34:30.000000000 +0000 @@ -92,7 +92,7 @@ * Coded AC-3 header values up to the lfeon element, plus derived values. */ typedef struct { - /** @defgroup coded Coded elements + /** @name Coded elements * @{ */ uint16_t sync_word; @@ -110,7 +110,7 @@ int num_blocks; ///< number of audio blocks /** @} */ - /** @defgroup derived Derived values + /** @name Derived values * @{ */ uint8_t sr_shift; @@ -118,7 +118,7 @@ uint32_t bit_rate; uint8_t channels; uint16_t frame_size; - int64_t channel_layout; + uint64_t channel_layout; /** @} */ } AC3HeaderInfo; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3_parser.c 2011-03-27 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,7 +35,7 @@ }; -int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) +int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) { int frame_size_code; @@ -141,7 +141,7 @@ GetBitContext gbc; init_get_bits(&gbc, tmp.u8+8-AC3_HEADER_SIZE, 54); - err = ff_ac3_parse_header(&gbc, &hdr); + err = avpriv_ac3_parse_header(&gbc, &hdr); if(err < 0) return 0; @@ -174,9 +174,9 @@ AVCodecParser ff_ac3_parser = { - { CODEC_ID_AC3, CODEC_ID_EAC3 }, - sizeof(AACAC3ParseContext), - ac3_parse_init, - ff_aac_ac3_parse, - ff_parse_close, + .codec_ids = { CODEC_ID_AC3, CODEC_ID_EAC3 }, + .priv_data_size = sizeof(AACAC3ParseContext), + .parser_init = ac3_parse_init, + .parser_parse = ff_aac_ac3_parse, + .parser_close = ff_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3_parser.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3_parser.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ac3_parser.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ac3_parser.h 2012-01-11 00:34:30.000000000 +0000 @@ -36,6 +36,6 @@ * -2 if the bsid (version) element is invalid, -3 if the fscod (sample rate) * element is invalid, or -4 if the frmsizecod (bit rate) element is invalid. */ -int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr); +int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr); #endif /* AVCODEC_AC3_PARSER_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/acelp_pitch_delay.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/acelp_pitch_delay.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/acelp_pitch_delay.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/acelp_pitch_delay.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/mathematics.h" #include "avcodec.h" #include "dsputil.h" #include "acelp_pitch_delay.h" @@ -104,20 +105,9 @@ for(i=0; iscalarproduct_int16(fc_v, fc_v, subframe_size, 0))) >> 3) & ~0x3ff); - - mr_energy = (5439 * (mr_energy >> 15)) >> 8; // (0.15) = (0.15) * (7.23) - - return bidir_sal( - ((ff_exp2(mr_energy & 0x7fff) + 16) >> 5) * (gain_corr_factor >> 1), - (mr_energy >> 15) - 25 - ); -#else mr_energy = gain_corr_factor * exp(M_LN10 / (20 << 23) * mr_energy) / sqrt(dsp->scalarproduct_int16(fc_v, fc_v, subframe_size, 0)); return mr_energy >> 12; -#endif } float ff_amr_set_fixed_gain(float fixed_gain_factor, float fixed_mean_energy, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/acelp_pitch_delay.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/acelp_pitch_delay.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/acelp_pitch_delay.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/acelp_pitch_delay.h 2012-01-11 00:34:30.000000000 +0000 @@ -30,11 +30,11 @@ #define PITCH_DELAY_MAX 143 /** - * \brief Decode pitch delay of the first subframe encoded by 8 bits with 1/3 + * @brief Decode pitch delay of the first subframe encoded by 8 bits with 1/3 * resolution. - * \param ac_index adaptive codebook index (8 bits) + * @param ac_index adaptive codebook index (8 bits) * - * \return pitch delay in 1/3 units + * @return pitch delay in 1/3 units * * Pitch delay is coded: * with 1/3 resolution, 19 < pitch_delay < 85 @@ -43,18 +43,18 @@ int ff_acelp_decode_8bit_to_1st_delay3(int ac_index); /** - * \brief Decode pitch delay of the second subframe encoded by 5 or 6 bits + * @brief Decode pitch delay of the second subframe encoded by 5 or 6 bits * with 1/3 precision. - * \param ac_index adaptive codebook index (5 or 6 bits) - * \param pitch_delay_min lower bound (integer) of pitch delay interval + * @param ac_index adaptive codebook index (5 or 6 bits) + * @param pitch_delay_min lower bound (integer) of pitch delay interval * for second subframe * - * \return pitch delay in 1/3 units + * @return pitch delay in 1/3 units * * Pitch delay is coded: * with 1/3 resolution, -6 < pitch_delay - int(prev_pitch_delay) < 5 * - * \remark The routine is used in G.729 @@8k, AMR @@10.2k, AMR @@7.95k, + * @remark The routine is used in G.729 @@8k, AMR @@10.2k, AMR @@7.95k, * AMR @@7.4k for the second subframe. */ int ff_acelp_decode_5_6_bit_to_2nd_delay3( @@ -62,19 +62,19 @@ int pitch_delay_min); /** - * \brief Decode pitch delay with 1/3 precision. - * \param ac_index adaptive codebook index (4 bits) - * \param pitch_delay_min lower bound (integer) of pitch delay interval for + * @brief Decode pitch delay with 1/3 precision. + * @param ac_index adaptive codebook index (4 bits) + * @param pitch_delay_min lower bound (integer) of pitch delay interval for * second subframe * - * \return pitch delay in 1/3 units + * @return pitch delay in 1/3 units * * Pitch delay is coded: * integers only, -6 < pitch_delay - int(prev_pitch_delay) <= -2 * with 1/3 resolution, -2 < pitch_delay - int(prev_pitch_delay) < 1 * integers only, 1 <= pitch_delay - int(prev_pitch_delay) < 5 * - * \remark The routine is used in G.729 @@6.4k, AMR @@6.7k, AMR @@5.9k, + * @remark The routine is used in G.729 @@6.4k, AMR @@6.7k, AMR @@5.9k, * AMR @@5.15k, AMR @@4.75k for the second subframe. */ int ff_acelp_decode_4bit_to_2nd_delay3( @@ -82,44 +82,44 @@ int pitch_delay_min); /** - * \brief Decode pitch delay of the first subframe encoded by 9 bits + * @brief Decode pitch delay of the first subframe encoded by 9 bits * with 1/6 precision. - * \param ac_index adaptive codebook index (9 bits) + * @param ac_index adaptive codebook index (9 bits) * - * \return pitch delay in 1/6 units + * @return pitch delay in 1/6 units * * Pitch delay is coded: * with 1/6 resolution, 17 < pitch_delay < 95 * integers only, 95 <= pitch_delay <= 143 * - * \remark The routine is used in AMR @@12.2k for the first and third subframes. + * @remark The routine is used in AMR @@12.2k for the first and third subframes. */ int ff_acelp_decode_9bit_to_1st_delay6(int ac_index); /** - * \brief Decode pitch delay of the second subframe encoded by 6 bits + * @brief Decode pitch delay of the second subframe encoded by 6 bits * with 1/6 precision. - * \param ac_index adaptive codebook index (6 bits) - * \param pitch_delay_min lower bound (integer) of pitch delay interval for + * @param ac_index adaptive codebook index (6 bits) + * @param pitch_delay_min lower bound (integer) of pitch delay interval for * second subframe * - * \return pitch delay in 1/6 units + * @return pitch delay in 1/6 units * * Pitch delay is coded: * with 1/6 resolution, -6 < pitch_delay - int(prev_pitch_delay) < 5 * - * \remark The routine is used in AMR @@12.2k for the second and fourth subframes. + * @remark The routine is used in AMR @@12.2k for the second and fourth subframes. */ int ff_acelp_decode_6bit_to_2nd_delay6( int ac_index, int pitch_delay_min); /** - * \brief Update past quantized energies - * \param[in,out] quant_energy past quantized energies (5.10) - * \param gain_corr_factor gain correction factor - * \param log2_ma_pred_order log2() of MA prediction order - * \param erasure frame erasure flag + * @brief Update past quantized energies + * @param[in,out] quant_energy past quantized energies (5.10) + * @param gain_corr_factor gain correction factor + * @param log2_ma_pred_order log2() of MA prediction order + * @param erasure frame erasure flag * * If frame erasure flag is not equal to zero, memory is updated with * averaged energy, attenuated by 4dB: @@ -128,7 +128,7 @@ * In normal mode memory is updated with * Er - Ep = 20 * log10(gain_corr_factor) * - * \remark The routine is used in G.729 and AMR (all modes). + * @remark The routine is used in G.729 and AMR (all modes). */ void ff_acelp_update_past_gain( int16_t* quant_energy, @@ -137,16 +137,16 @@ int erasure); /** - * \brief Decode the adaptive codebook gain and add + * @brief Decode the adaptive codebook gain and add * correction (4.1.5 and 3.9.1 of G.729). - * \param dsp initialized dsputil context - * \param gain_corr_factor gain correction factor (2.13) - * \param fc_v fixed-codebook vector (2.13) - * \param mr_energy mean innovation energy and fixed-point correction (7.13) - * \param[in,out] quant_energy past quantized energies (5.10) - * \param subframe_size length of subframe + * @param dsp initialized dsputil context + * @param gain_corr_factor gain correction factor (2.13) + * @param fc_v fixed-codebook vector (2.13) + * @param mr_energy mean innovation energy and fixed-point correction (7.13) + * @param[in,out] quant_energy past quantized energies (5.10) + * @param subframe_size length of subframe * - * \return quantized fixed-codebook gain (14.1) + * @return quantized fixed-codebook gain (14.1) * * The routine implements equations 69, 66 and 71 of the G.729 specification (3.9.1) * @@ -205,7 +205,7 @@ * * mr_energy = Em + 10log(N) + 10log(2^26) * - * \remark The routine is used in G.729 and AMR (all modes). + * @remark The routine is used in G.729 and AMR (all modes). */ int16_t ff_acelp_decode_gain_code( DSPContext *dsp, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/acelp_vectors.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/acelp_vectors.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/acelp_vectors.c 2011-05-17 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/acelp_vectors.c 2012-01-11 00:34:30.000000000 +0000 @@ -48,26 +48,6 @@ 28, 26, }; -const uint8_t ff_fc_2pulses_9bits_track2_gray[32] = -{ - 0, 2, - 5, 4, - 12, 10, - 7, 9, - 25, 24, - 20, 22, - 14, 15, - 19, 17, - 36, 31, - 21, 26, - 1, 6, - 16, 11, - 27, 29, - 32, 30, - 39, 37, - 34, 35, -}; - const uint8_t ff_fc_4pulses_8bits_tracks_13[16] = { 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/acelp_vectors.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/acelp_vectors.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/acelp_vectors.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/acelp_vectors.h 2012-01-11 00:34:30.000000000 +0000 @@ -82,37 +82,6 @@ extern const uint8_t ff_fc_2pulses_9bits_track1_gray[16]; /** - * Track|Pulse| Positions - * ----------------------------------------- - * 2 | 1 | 0, 7, 14, 20, 27, 34, 1, 21 - * | | 2, 9, 15, 22, 29, 35, 6, 26 - * | | 4,10, 17, 24, 30, 37, 11, 31 - * | | 5,12, 19, 25, 32, 39, 16, 36 - * ----------------------------------------- - * - * @remark Track in the table should be read top-to-bottom, left-to-right. - * - * @note (EE.1) This table (from the reference code) does not comply with - * the specification. - * The specification contains the following table: - * - * Track|Pulse| Positions - * ----------------------------------------- - * 2 | 1 | 0, 5, 10, 15, 20, 25, 30, 35 - * | | 1, 6, 11, 16, 21, 26, 31, 36 - * | | 2, 7, 12, 17, 22, 27, 32, 37 - * | | 4, 9, 14, 19, 24, 29, 34, 39 - * - * ----------------------------------------- - * - * @note (EE.2) Reference G.729D code also uses gray decoding for each - * pulse index before looking up the value in the table. - * - * Used in G.729 @@6.4k (with gray coding) - */ -extern const uint8_t ff_fc_2pulses_9bits_track2_gray[32]; - -/** * b60 hamming windowed sinc function coefficients */ extern const float ff_b60_sinc[61]; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adpcm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adpcm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adpcm.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adpcm.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,4 @@ /* - * ADPCM codecs * Copyright (c) 2001-2003 The ffmpeg Project * * This file is part of Libav. @@ -22,10 +21,12 @@ #include "get_bits.h" #include "put_bits.h" #include "bytestream.h" +#include "adpcm.h" +#include "adpcm_data.h" /** * @file - * ADPCM codecs. + * ADPCM decoders * First version by Francois Revol (revol@free.fr) * Fringe ADPCM codecs (e.g., DK3, DK4, Westwood) * by Mike Melanson (melanson@pcisys.net) @@ -41,73 +42,35 @@ * Features and limitations: * * Reference documents: - * http://www.pcisys.net/~melanson/codecs/simpleaudio.html - * http://www.geocities.com/SiliconValley/8682/aud3.txt - * http://openquicktime.sourceforge.net/plugins.htm - * XAnim sources (xa_codec.c) http://www.rasnaimaging.com/people/lapus/download.html - * http://www.cs.ucla.edu/~leec/mediabench/applications.html - * SoX source code http://home.sprynet.com/~cbagwell/sox.html + * http://wiki.multimedia.cx/index.php?title=Category:ADPCM_Audio_Codecs + * http://www.pcisys.net/~melanson/codecs/simpleaudio.html [dead] + * http://www.geocities.com/SiliconValley/8682/aud3.txt [dead] + * http://openquicktime.sourceforge.net/ + * XAnim sources (xa_codec.c) http://xanim.polter.net/ + * http://www.cs.ucla.edu/~leec/mediabench/applications.html [dead] + * SoX source code http://sox.sourceforge.net/ * * CD-ROM XA: - * http://ku-www.ss.titech.ac.jp/~yatsushi/xaadpcm.html - * vagpack & depack http://homepages.compuserve.de/bITmASTER32/psx-index.html + * http://ku-www.ss.titech.ac.jp/~yatsushi/xaadpcm.html [dead] + * vagpack & depack http://homepages.compuserve.de/bITmASTER32/psx-index.html [dead] * readstr http://www.geocities.co.jp/Playtown/2004/ */ -#define BLKSIZE 1024 - -/* step_table[] and index_table[] are from the ADPCM reference source */ -/* This is the index table: */ -static const int index_table[16] = { - -1, -1, -1, -1, 2, 4, 6, 8, - -1, -1, -1, -1, 2, 4, 6, 8, -}; - -/** - * This is the step table. Note that many programs use slight deviations from - * this table, but such deviations are negligible: - */ -static const int step_table[89] = { - 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, - 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, - 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, - 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, - 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, - 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, - 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, - 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, - 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 -}; - -/* These are for MS-ADPCM */ -/* AdaptationTable[], AdaptCoeff1[], and AdaptCoeff2[] are from libsndfile */ -static const int AdaptationTable[] = { - 230, 230, 230, 230, 307, 409, 512, 614, - 768, 614, 512, 409, 307, 230, 230, 230 -}; - -/** Divided by 4 to fit in 8-bit integers */ -static const uint8_t AdaptCoeff1[] = { - 64, 128, 0, 48, 60, 115, 98 -}; - -/** Divided by 4 to fit in 8-bit integers */ -static const int8_t AdaptCoeff2[] = { - 0, -64, 0, 16, 0, -52, -58 -}; - /* These are for CD-ROM XA ADPCM */ static const int xa_adpcm_table[5][2] = { - { 0, 0 }, - { 60, 0 }, - { 115, -52 }, - { 98, -55 }, - { 122, -60 } + { 0, 0 }, + { 60, 0 }, + { 115, -52 }, + { 98, -55 }, + { 122, -60 } }; static const int ea_adpcm_table[] = { - 0, 240, 460, 392, 0, 0, -208, -220, 0, 1, - 3, 4, 7, 8, 10, 11, 0, -1, -3, -4 + 0, 240, 460, 392, + 0, 0, -208, -220, + 0, 1, 3, 4, + 7, 8, 10, 11, + 0, -1, -3, -4 }; // padded to zero where table size is less then 16 @@ -118,643 +81,33 @@ /*5*/ { -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 4, 6, 8, 10, 13, 16 } }; -static const int yamaha_indexscale[] = { - 230, 230, 230, 230, 307, 409, 512, 614, - 230, 230, 230, 230, 307, 409, 512, 614 -}; - -static const int yamaha_difflookup[] = { - 1, 3, 5, 7, 9, 11, 13, 15, - -1, -3, -5, -7, -9, -11, -13, -15 -}; - /* end of tables */ -typedef struct ADPCMChannelStatus { - int predictor; - short int step_index; - int step; - /* for encoding */ - int prev_sample; - - /* MS version */ - short sample1; - short sample2; - int coeff1; - int coeff2; - int idelta; -} ADPCMChannelStatus; - -typedef struct TrellisPath { - int nibble; - int prev; -} TrellisPath; - -typedef struct TrellisNode { - uint32_t ssd; - int path; - int sample1; - int sample2; - int step; -} TrellisNode; - -typedef struct ADPCMContext { +typedef struct ADPCMDecodeContext { + AVFrame frame; ADPCMChannelStatus status[6]; - TrellisPath *paths; - TrellisNode *node_buf; - TrellisNode **nodep_buf; - uint8_t *trellis_hash; -} ADPCMContext; - -#define FREEZE_INTERVAL 128 - -/* XXX: implement encoding */ - -#if CONFIG_ENCODERS -static av_cold int adpcm_encode_init(AVCodecContext *avctx) -{ - ADPCMContext *s = avctx->priv_data; - uint8_t *extradata; - int i; - if (avctx->channels > 2) - return -1; /* only stereo or mono =) */ - - if(avctx->trellis && (unsigned)avctx->trellis > 16U){ - av_log(avctx, AV_LOG_ERROR, "invalid trellis size\n"); - return -1; - } - - if (avctx->trellis) { - int frontier = 1 << avctx->trellis; - int max_paths = frontier * FREEZE_INTERVAL; - FF_ALLOC_OR_GOTO(avctx, s->paths, max_paths * sizeof(*s->paths), error); - FF_ALLOC_OR_GOTO(avctx, s->node_buf, 2 * frontier * sizeof(*s->node_buf), error); - FF_ALLOC_OR_GOTO(avctx, s->nodep_buf, 2 * frontier * sizeof(*s->nodep_buf), error); - FF_ALLOC_OR_GOTO(avctx, s->trellis_hash, 65536 * sizeof(*s->trellis_hash), error); - } - - switch(avctx->codec->id) { - case CODEC_ID_ADPCM_IMA_WAV: - avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 / (4 * avctx->channels) + 1; /* each 16 bits sample gives one nibble */ - /* and we have 4 bytes per channel overhead */ - avctx->block_align = BLKSIZE; - /* seems frame_size isn't taken into account... have to buffer the samples :-( */ - break; - case CODEC_ID_ADPCM_IMA_QT: - avctx->frame_size = 64; - avctx->block_align = 34 * avctx->channels; - break; - case CODEC_ID_ADPCM_MS: - avctx->frame_size = (BLKSIZE - 7 * avctx->channels) * 2 / avctx->channels + 2; /* each 16 bits sample gives one nibble */ - /* and we have 7 bytes per channel overhead */ - avctx->block_align = BLKSIZE; - avctx->extradata_size = 32; - extradata = avctx->extradata = av_malloc(avctx->extradata_size); - if (!extradata) - return AVERROR(ENOMEM); - bytestream_put_le16(&extradata, avctx->frame_size); - bytestream_put_le16(&extradata, 7); /* wNumCoef */ - for (i = 0; i < 7; i++) { - bytestream_put_le16(&extradata, AdaptCoeff1[i] * 4); - bytestream_put_le16(&extradata, AdaptCoeff2[i] * 4); - } - break; - case CODEC_ID_ADPCM_YAMAHA: - avctx->frame_size = BLKSIZE * avctx->channels; - avctx->block_align = BLKSIZE; - break; - case CODEC_ID_ADPCM_SWF: - if (avctx->sample_rate != 11025 && - avctx->sample_rate != 22050 && - avctx->sample_rate != 44100) { - av_log(avctx, AV_LOG_ERROR, "Sample rate must be 11025, 22050 or 44100\n"); - goto error; - } - avctx->frame_size = 512 * (avctx->sample_rate / 11025); - break; - default: - goto error; - } - - avctx->coded_frame= avcodec_alloc_frame(); - avctx->coded_frame->key_frame= 1; - - return 0; -error: - av_freep(&s->paths); - av_freep(&s->node_buf); - av_freep(&s->nodep_buf); - av_freep(&s->trellis_hash); - return -1; -} - -static av_cold int adpcm_encode_close(AVCodecContext *avctx) -{ - ADPCMContext *s = avctx->priv_data; - av_freep(&avctx->coded_frame); - av_freep(&s->paths); - av_freep(&s->node_buf); - av_freep(&s->nodep_buf); - av_freep(&s->trellis_hash); - - return 0; -} - - -static inline unsigned char adpcm_ima_compress_sample(ADPCMChannelStatus *c, short sample) -{ - int delta = sample - c->prev_sample; - int nibble = FFMIN(7, abs(delta)*4/step_table[c->step_index]) + (delta<0)*8; - c->prev_sample += ((step_table[c->step_index] * yamaha_difflookup[nibble]) / 8); - c->prev_sample = av_clip_int16(c->prev_sample); - c->step_index = av_clip(c->step_index + index_table[nibble], 0, 88); - return nibble; -} - -static inline unsigned char adpcm_ms_compress_sample(ADPCMChannelStatus *c, short sample) -{ - int predictor, nibble, bias; - - predictor = (((c->sample1) * (c->coeff1)) + ((c->sample2) * (c->coeff2))) / 64; - - nibble= sample - predictor; - if(nibble>=0) bias= c->idelta/2; - else bias=-c->idelta/2; - - nibble= (nibble + bias) / c->idelta; - nibble= av_clip(nibble, -8, 7)&0x0F; - - predictor += (signed)((nibble & 0x08)?(nibble - 0x10):(nibble)) * c->idelta; - - c->sample2 = c->sample1; - c->sample1 = av_clip_int16(predictor); - - c->idelta = (AdaptationTable[(int)nibble] * c->idelta) >> 8; - if (c->idelta < 16) c->idelta = 16; - - return nibble; -} - -static inline unsigned char adpcm_yamaha_compress_sample(ADPCMChannelStatus *c, short sample) -{ - int nibble, delta; - - if(!c->step) { - c->predictor = 0; - c->step = 127; - } - - delta = sample - c->predictor; - - nibble = FFMIN(7, abs(delta)*4/c->step) + (delta<0)*8; - - c->predictor += ((c->step * yamaha_difflookup[nibble]) / 8); - c->predictor = av_clip_int16(c->predictor); - c->step = (c->step * yamaha_indexscale[nibble]) >> 8; - c->step = av_clip(c->step, 127, 24567); - - return nibble; -} - -static void adpcm_compress_trellis(AVCodecContext *avctx, const short *samples, - uint8_t *dst, ADPCMChannelStatus *c, int n) -{ - //FIXME 6% faster if frontier is a compile-time constant - ADPCMContext *s = avctx->priv_data; - const int frontier = 1 << avctx->trellis; - const int stride = avctx->channels; - const int version = avctx->codec->id; - TrellisPath *paths = s->paths, *p; - TrellisNode *node_buf = s->node_buf; - TrellisNode **nodep_buf = s->nodep_buf; - TrellisNode **nodes = nodep_buf; // nodes[] is always sorted by .ssd - TrellisNode **nodes_next = nodep_buf + frontier; - int pathn = 0, froze = -1, i, j, k, generation = 0; - uint8_t *hash = s->trellis_hash; - memset(hash, 0xff, 65536 * sizeof(*hash)); - - memset(nodep_buf, 0, 2 * frontier * sizeof(*nodep_buf)); - nodes[0] = node_buf + frontier; - nodes[0]->ssd = 0; - nodes[0]->path = 0; - nodes[0]->step = c->step_index; - nodes[0]->sample1 = c->sample1; - nodes[0]->sample2 = c->sample2; - if((version == CODEC_ID_ADPCM_IMA_WAV) || (version == CODEC_ID_ADPCM_IMA_QT) || (version == CODEC_ID_ADPCM_SWF)) - nodes[0]->sample1 = c->prev_sample; - if(version == CODEC_ID_ADPCM_MS) - nodes[0]->step = c->idelta; - if(version == CODEC_ID_ADPCM_YAMAHA) { - if(c->step == 0) { - nodes[0]->step = 127; - nodes[0]->sample1 = 0; - } else { - nodes[0]->step = c->step; - nodes[0]->sample1 = c->predictor; - } - } - - for(i=0; istep; - int nidx; - if(version == CODEC_ID_ADPCM_MS) { - const int predictor = ((nodes[j]->sample1 * c->coeff1) + (nodes[j]->sample2 * c->coeff2)) / 64; - const int div = (sample - predictor) / step; - const int nmin = av_clip(div-range, -8, 6); - const int nmax = av_clip(div+range, -7, 7); - for(nidx=nmin; nidx<=nmax; nidx++) { - const int nibble = nidx & 0xf; - int dec_sample = predictor + nidx * step; -#define STORE_NODE(NAME, STEP_INDEX)\ - int d;\ - uint32_t ssd;\ - int pos;\ - TrellisNode *u;\ - uint8_t *h;\ - dec_sample = av_clip_int16(dec_sample);\ - d = sample - dec_sample;\ - ssd = nodes[j]->ssd + d*d;\ - /* Check for wraparound, skip such samples completely. \ - * Note, changing ssd to a 64 bit variable would be \ - * simpler, avoiding this check, but it's slower on \ - * x86 32 bit at the moment. */\ - if (ssd < nodes[j]->ssd)\ - goto next_##NAME;\ - /* Collapse any two states with the same previous sample value. \ - * One could also distinguish states by step and by 2nd to last - * sample, but the effects of that are negligible. - * Since nodes in the previous generation are iterated - * through a heap, they're roughly ordered from better to - * worse, but not strictly ordered. Therefore, an earlier - * node with the same sample value is better in most cases - * (and thus the current is skipped), but not strictly - * in all cases. Only skipping samples where ssd >= - * ssd of the earlier node with the same sample gives - * slightly worse quality, though, for some reason. */ \ - h = &hash[(uint16_t) dec_sample];\ - if (*h == generation)\ - goto next_##NAME;\ - if (heap_pos < frontier) {\ - pos = heap_pos++;\ - } else {\ - /* Try to replace one of the leaf nodes with the new \ - * one, but try a different slot each time. */\ - pos = (frontier >> 1) + (heap_pos & ((frontier >> 1) - 1));\ - if (ssd > nodes_next[pos]->ssd)\ - goto next_##NAME;\ - heap_pos++;\ - }\ - *h = generation;\ - u = nodes_next[pos];\ - if(!u) {\ - assert(pathn < FREEZE_INTERVAL<trellis);\ - u = t++;\ - nodes_next[pos] = u;\ - u->path = pathn++;\ - }\ - u->ssd = ssd;\ - u->step = STEP_INDEX;\ - u->sample2 = nodes[j]->sample1;\ - u->sample1 = dec_sample;\ - paths[u->path].nibble = nibble;\ - paths[u->path].prev = nodes[j]->path;\ - /* Sift the newly inserted node up in the heap to \ - * restore the heap property. */\ - while (pos > 0) {\ - int parent = (pos - 1) >> 1;\ - if (nodes_next[parent]->ssd <= ssd)\ - break;\ - FFSWAP(TrellisNode*, nodes_next[parent], nodes_next[pos]);\ - pos = parent;\ - }\ - next_##NAME:; - STORE_NODE(ms, FFMAX(16, (AdaptationTable[nibble] * step) >> 8)); - } - } else if((version == CODEC_ID_ADPCM_IMA_WAV)|| (version == CODEC_ID_ADPCM_IMA_QT)|| (version == CODEC_ID_ADPCM_SWF)) { -#define LOOP_NODES(NAME, STEP_TABLE, STEP_INDEX)\ - const int predictor = nodes[j]->sample1;\ - const int div = (sample - predictor) * 4 / STEP_TABLE;\ - int nmin = av_clip(div-range, -7, 6);\ - int nmax = av_clip(div+range, -6, 7);\ - if(nmin<=0) nmin--; /* distinguish -0 from +0 */\ - if(nmax<0) nmax--;\ - for(nidx=nmin; nidx<=nmax; nidx++) {\ - const int nibble = nidx<0 ? 7-nidx : nidx;\ - int dec_sample = predictor + (STEP_TABLE * yamaha_difflookup[nibble]) / 8;\ - STORE_NODE(NAME, STEP_INDEX);\ - } - LOOP_NODES(ima, step_table[step], av_clip(step + index_table[nibble], 0, 88)); - } else { //CODEC_ID_ADPCM_YAMAHA - LOOP_NODES(yamaha, step, av_clip((step * yamaha_indexscale[nibble]) >> 8, 127, 24567)); -#undef LOOP_NODES -#undef STORE_NODE - } - } - - u = nodes; - nodes = nodes_next; - nodes_next = u; - - generation++; - if (generation == 255) { - memset(hash, 0xff, 65536 * sizeof(*hash)); - generation = 0; - } - - // prevent overflow - if(nodes[0]->ssd > (1<<28)) { - for(j=1; jssd -= nodes[0]->ssd; - nodes[0]->ssd = 0; - } - - // merge old paths to save memory - if(i == froze + FREEZE_INTERVAL) { - p = &paths[nodes[0]->path]; - for(k=i; k>froze; k--) { - dst[k] = p->nibble; - p = &paths[p->prev]; - } - froze = i; - pathn = 0; - // other nodes might use paths that don't coincide with the frozen one. - // checking which nodes do so is too slow, so just kill them all. - // this also slightly improves quality, but I don't know why. - memset(nodes+1, 0, (frontier-1)*sizeof(TrellisNode*)); - } - } - - p = &paths[nodes[0]->path]; - for(i=n-1; i>froze; i--) { - dst[i] = p->nibble; - p = &paths[p->prev]; - } - - c->predictor = nodes[0]->sample1; - c->sample1 = nodes[0]->sample1; - c->sample2 = nodes[0]->sample2; - c->step_index = nodes[0]->step; - c->step = nodes[0]->step; - c->idelta = nodes[0]->step; -} - -static int adpcm_encode_frame(AVCodecContext *avctx, - unsigned char *frame, int buf_size, void *data) -{ - int n, i, st; - short *samples; - unsigned char *dst; - ADPCMContext *c = avctx->priv_data; - uint8_t *buf; - - dst = frame; - samples = (short *)data; - st= avctx->channels == 2; -/* n = (BLKSIZE - 4 * avctx->channels) / (2 * 8 * avctx->channels); */ - - switch(avctx->codec->id) { - case CODEC_ID_ADPCM_IMA_WAV: - n = avctx->frame_size / 8; - c->status[0].prev_sample = (signed short)samples[0]; /* XXX */ -/* c->status[0].step_index = 0; *//* XXX: not sure how to init the state machine */ - bytestream_put_le16(&dst, c->status[0].prev_sample); - *dst++ = (unsigned char)c->status[0].step_index; - *dst++ = 0; /* unknown */ - samples++; - if (avctx->channels == 2) { - c->status[1].prev_sample = (signed short)samples[0]; -/* c->status[1].step_index = 0; */ - bytestream_put_le16(&dst, c->status[1].prev_sample); - *dst++ = (unsigned char)c->status[1].step_index; - *dst++ = 0; - samples++; - } - - /* stereo: 4 bytes (8 samples) for left, 4 bytes for right, 4 bytes left, ... */ - if(avctx->trellis > 0) { - FF_ALLOC_OR_GOTO(avctx, buf, 2*n*8, error); - adpcm_compress_trellis(avctx, samples, buf, &c->status[0], n*8); - if(avctx->channels == 2) - adpcm_compress_trellis(avctx, samples+1, buf + n*8, &c->status[1], n*8); - for(i=0; ichannels == 2) { - uint8_t *buf1 = buf + n*8; - *dst++ = buf1[8*i+0] | (buf1[8*i+1] << 4); - *dst++ = buf1[8*i+2] | (buf1[8*i+3] << 4); - *dst++ = buf1[8*i+4] | (buf1[8*i+5] << 4); - *dst++ = buf1[8*i+6] | (buf1[8*i+7] << 4); - } - } - av_free(buf); - } else - for (; n>0; n--) { - *dst = adpcm_ima_compress_sample(&c->status[0], samples[0]); - *dst |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels]) << 4; - dst++; - *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 2]); - *dst |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 3]) << 4; - dst++; - *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 4]); - *dst |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 5]) << 4; - dst++; - *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 6]); - *dst |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 7]) << 4; - dst++; - /* right channel */ - if (avctx->channels == 2) { - *dst = adpcm_ima_compress_sample(&c->status[1], samples[1]); - *dst |= adpcm_ima_compress_sample(&c->status[1], samples[3]) << 4; - dst++; - *dst = adpcm_ima_compress_sample(&c->status[1], samples[5]); - *dst |= adpcm_ima_compress_sample(&c->status[1], samples[7]) << 4; - dst++; - *dst = adpcm_ima_compress_sample(&c->status[1], samples[9]); - *dst |= adpcm_ima_compress_sample(&c->status[1], samples[11]) << 4; - dst++; - *dst = adpcm_ima_compress_sample(&c->status[1], samples[13]); - *dst |= adpcm_ima_compress_sample(&c->status[1], samples[15]) << 4; - dst++; - } - samples += 8 * avctx->channels; - } - break; - case CODEC_ID_ADPCM_IMA_QT: - { - int ch, i; - PutBitContext pb; - init_put_bits(&pb, dst, buf_size*8); - - for(ch=0; chchannels; ch++){ - put_bits(&pb, 9, (c->status[ch].prev_sample + 0x10000) >> 7); - put_bits(&pb, 7, c->status[ch].step_index); - if(avctx->trellis > 0) { - uint8_t buf[64]; - adpcm_compress_trellis(avctx, samples+ch, buf, &c->status[ch], 64); - for(i=0; i<64; i++) - put_bits(&pb, 4, buf[i^1]); - c->status[ch].prev_sample = c->status[ch].predictor & ~0x7F; - } else { - for (i=0; i<64; i+=2){ - int t1, t2; - t1 = adpcm_ima_compress_sample(&c->status[ch], samples[avctx->channels*(i+0)+ch]); - t2 = adpcm_ima_compress_sample(&c->status[ch], samples[avctx->channels*(i+1)+ch]); - put_bits(&pb, 4, t2); - put_bits(&pb, 4, t1); - } - c->status[ch].prev_sample &= ~0x7F; - } - } - - flush_put_bits(&pb); - dst += put_bits_count(&pb)>>3; - break; - } - case CODEC_ID_ADPCM_SWF: - { - int i; - PutBitContext pb; - init_put_bits(&pb, dst, buf_size*8); - - n = avctx->frame_size-1; - - //Store AdpcmCodeSize - put_bits(&pb, 2, 2); //Set 4bits flash adpcm format - - //Init the encoder state - for(i=0; ichannels; i++){ - c->status[i].step_index = av_clip(c->status[i].step_index, 0, 63); // clip step so it fits 6 bits - put_sbits(&pb, 16, samples[i]); - put_bits(&pb, 6, c->status[i].step_index); - c->status[i].prev_sample = (signed short)samples[i]; - } - - if(avctx->trellis > 0) { - FF_ALLOC_OR_GOTO(avctx, buf, 2*n, error); - adpcm_compress_trellis(avctx, samples+2, buf, &c->status[0], n); - if (avctx->channels == 2) - adpcm_compress_trellis(avctx, samples+3, buf+n, &c->status[1], n); - for(i=0; ichannels == 2) - put_bits(&pb, 4, buf[n+i]); - } - av_free(buf); - } else { - for (i=1; iframe_size; i++) { - put_bits(&pb, 4, adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels*i])); - if (avctx->channels == 2) - put_bits(&pb, 4, adpcm_ima_compress_sample(&c->status[1], samples[2*i+1])); - } - } - flush_put_bits(&pb); - dst += put_bits_count(&pb)>>3; - break; - } - case CODEC_ID_ADPCM_MS: - for(i=0; ichannels; i++){ - int predictor=0; - - *dst++ = predictor; - c->status[i].coeff1 = AdaptCoeff1[predictor]; - c->status[i].coeff2 = AdaptCoeff2[predictor]; - } - for(i=0; ichannels; i++){ - if (c->status[i].idelta < 16) - c->status[i].idelta = 16; - - bytestream_put_le16(&dst, c->status[i].idelta); - } - for(i=0; ichannels; i++){ - c->status[i].sample2= *samples++; - } - for(i=0; ichannels; i++){ - c->status[i].sample1= *samples++; - - bytestream_put_le16(&dst, c->status[i].sample1); - } - for(i=0; ichannels; i++) - bytestream_put_le16(&dst, c->status[i].sample2); - - if(avctx->trellis > 0) { - int n = avctx->block_align - 7*avctx->channels; - FF_ALLOC_OR_GOTO(avctx, buf, 2*n, error); - if(avctx->channels == 1) { - adpcm_compress_trellis(avctx, samples, buf, &c->status[0], n); - for(i=0; istatus[0], n); - adpcm_compress_trellis(avctx, samples+1, buf+n, &c->status[1], n); - for(i=0; ichannels; iblock_align; i++) { - int nibble; - nibble = adpcm_ms_compress_sample(&c->status[ 0], *samples++)<<4; - nibble|= adpcm_ms_compress_sample(&c->status[st], *samples++); - *dst++ = nibble; - } - break; - case CODEC_ID_ADPCM_YAMAHA: - n = avctx->frame_size / 2; - if(avctx->trellis > 0) { - FF_ALLOC_OR_GOTO(avctx, buf, 2*n*2, error); - n *= 2; - if(avctx->channels == 1) { - adpcm_compress_trellis(avctx, samples, buf, &c->status[0], n); - for(i=0; istatus[0], n); - adpcm_compress_trellis(avctx, samples+1, buf+n, &c->status[1], n); - for(i=0; ichannels; n>0; n--) { - int nibble; - nibble = adpcm_yamaha_compress_sample(&c->status[ 0], *samples++); - nibble |= adpcm_yamaha_compress_sample(&c->status[st], *samples++) << 4; - *dst++ = nibble; - } - break; - default: - error: - return -1; - } - return dst - frame; -} -#endif //CONFIG_ENCODERS +} ADPCMDecodeContext; static av_cold int adpcm_decode_init(AVCodecContext * avctx) { - ADPCMContext *c = avctx->priv_data; + ADPCMDecodeContext *c = avctx->priv_data; + unsigned int min_channels = 1; unsigned int max_channels = 2; switch(avctx->codec->id) { + case CODEC_ID_ADPCM_EA: + min_channels = 2; + break; case CODEC_ID_ADPCM_EA_R1: case CODEC_ID_ADPCM_EA_R2: case CODEC_ID_ADPCM_EA_R3: + case CODEC_ID_ADPCM_EA_XAS: max_channels = 6; break; } - if(avctx->channels > max_channels){ - return -1; + if (avctx->channels < min_channels || avctx->channels > max_channels) { + av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n"); + return AVERROR(EINVAL); } switch(avctx->codec->id) { @@ -777,6 +130,10 @@ break; } avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + avcodec_get_frame_defaults(&c->frame); + avctx->coded_frame = &c->frame; + return 0; } @@ -786,8 +143,8 @@ int predictor; int sign, delta, diff, step; - step = step_table[c->step_index]; - step_index = c->step_index + index_table[(unsigned)nibble]; + step = ff_adpcm_step_table[c->step_index]; + step_index = c->step_index + ff_adpcm_index_table[(unsigned)nibble]; if (step_index < 0) step_index = 0; else if (step_index > 88) step_index = 88; @@ -807,6 +164,32 @@ return (short)c->predictor; } +static inline int adpcm_ima_qt_expand_nibble(ADPCMChannelStatus *c, int nibble, int shift) +{ + int step_index; + int predictor; + int diff, step; + + step = ff_adpcm_step_table[c->step_index]; + step_index = c->step_index + ff_adpcm_index_table[nibble]; + step_index = av_clip(step_index, 0, 88); + + diff = step >> 3; + if (nibble & 4) diff += step; + if (nibble & 2) diff += step >> 1; + if (nibble & 1) diff += step >> 2; + + if (nibble & 8) + predictor = c->predictor - diff; + else + predictor = c->predictor + diff; + + c->predictor = av_clip_int16(predictor); + c->step_index = step_index; + + return c->predictor; +} + static inline short adpcm_ms_expand_nibble(ADPCMChannelStatus *c, char nibble) { int predictor; @@ -816,7 +199,7 @@ c->sample2 = c->sample1; c->sample1 = av_clip_int16(predictor); - c->idelta = (AdaptationTable[(int)nibble] * c->idelta) >> 8; + c->idelta = (ff_adpcm_AdaptationTable[(int)nibble] * c->idelta) >> 8; if (c->idelta < 16) c->idelta = 16; return c->sample1; @@ -837,7 +220,7 @@ c->predictor = ((c->predictor * 254) >> 8) + (sign ? -diff : diff); c->predictor = av_clip_int16(c->predictor); /* calculate new step and clamp it to range 511..32767 */ - new_step = (AdaptationTable[nibble & 7] * c->step) >> 8; + new_step = (ff_adpcm_AdaptationTable[nibble & 7] * c->step) >> 8; c->step = av_clip(new_step, 511, 32767); return (short)c->predictor; @@ -870,9 +253,9 @@ c->step = 127; } - c->predictor += (c->step * yamaha_difflookup[nibble]) / 8; + c->predictor += (c->step * ff_adpcm_yamaha_difflookup[nibble]) / 8; c->predictor = av_clip_int16(c->predictor); - c->step = (c->step * yamaha_indexscale[nibble]) >> 8; + c->step = (c->step * ff_adpcm_yamaha_indexscale[nibble]) >> 8; c->step = av_clip(c->step, 127, 24567); return c->predictor; } @@ -942,6 +325,173 @@ } } +/** + * Get the number of samples that will be decoded from the packet. + * In one case, this is actually the maximum number of samples possible to + * decode with the given buf_size. + * + * @param[out] coded_samples set to the number of samples as coded in the + * packet, or 0 if the codec does not encode the + * number of samples in each frame. + */ +static int get_nb_samples(AVCodecContext *avctx, const uint8_t *buf, + int buf_size, int *coded_samples) +{ + ADPCMDecodeContext *s = avctx->priv_data; + int nb_samples = 0; + int ch = avctx->channels; + int has_coded_samples = 0; + int header_size; + + *coded_samples = 0; + + switch (avctx->codec->id) { + /* constant, only check buf_size */ + case CODEC_ID_ADPCM_EA_XAS: + if (buf_size < 76 * ch) + return 0; + nb_samples = 128; + break; + case CODEC_ID_ADPCM_IMA_QT: + if (buf_size < 34 * ch) + return 0; + nb_samples = 64; + break; + /* simple 4-bit adpcm */ + case CODEC_ID_ADPCM_CT: + case CODEC_ID_ADPCM_IMA_EA_SEAD: + case CODEC_ID_ADPCM_IMA_WS: + case CODEC_ID_ADPCM_YAMAHA: + nb_samples = buf_size * 2 / ch; + break; + } + if (nb_samples) + return nb_samples; + + /* simple 4-bit adpcm, with header */ + header_size = 0; + switch (avctx->codec->id) { + case CODEC_ID_ADPCM_4XM: + case CODEC_ID_ADPCM_IMA_ISS: header_size = 4 * ch; break; + case CODEC_ID_ADPCM_IMA_AMV: header_size = 8; break; + case CODEC_ID_ADPCM_IMA_SMJPEG: header_size = 4; break; + } + if (header_size > 0) + return (buf_size - header_size) * 2 / ch; + + /* more complex formats */ + switch (avctx->codec->id) { + case CODEC_ID_ADPCM_EA: + has_coded_samples = 1; + if (buf_size < 4) + return 0; + *coded_samples = AV_RL32(buf); + *coded_samples -= *coded_samples % 28; + nb_samples = (buf_size - 12) / 30 * 28; + break; + case CODEC_ID_ADPCM_IMA_EA_EACS: + has_coded_samples = 1; + if (buf_size < 4) + return 0; + *coded_samples = AV_RL32(buf); + nb_samples = (buf_size - (4 + 8 * ch)) * 2 / ch; + break; + case CODEC_ID_ADPCM_EA_MAXIS_XA: + nb_samples = ((buf_size - ch) / (2 * ch)) * 2 * ch; + break; + case CODEC_ID_ADPCM_EA_R1: + case CODEC_ID_ADPCM_EA_R2: + case CODEC_ID_ADPCM_EA_R3: + /* maximum number of samples */ + /* has internal offsets and a per-frame switch to signal raw 16-bit */ + has_coded_samples = 1; + if (buf_size < 4) + return 0; + switch (avctx->codec->id) { + case CODEC_ID_ADPCM_EA_R1: + header_size = 4 + 9 * ch; + *coded_samples = AV_RL32(buf); + break; + case CODEC_ID_ADPCM_EA_R2: + header_size = 4 + 5 * ch; + *coded_samples = AV_RL32(buf); + break; + case CODEC_ID_ADPCM_EA_R3: + header_size = 4 + 5 * ch; + *coded_samples = AV_RB32(buf); + break; + } + *coded_samples -= *coded_samples % 28; + nb_samples = (buf_size - header_size) * 2 / ch; + nb_samples -= nb_samples % 28; + break; + case CODEC_ID_ADPCM_IMA_DK3: + if (avctx->block_align > 0) + buf_size = FFMIN(buf_size, avctx->block_align); + nb_samples = ((buf_size - 16) * 8 / 3) / ch; + break; + case CODEC_ID_ADPCM_IMA_DK4: + nb_samples = 1 + (buf_size - 4 * ch) * 2 / ch; + break; + case CODEC_ID_ADPCM_IMA_WAV: + if (avctx->block_align > 0) + buf_size = FFMIN(buf_size, avctx->block_align); + nb_samples = 1 + (buf_size - 4 * ch) / (4 * ch) * 8; + break; + case CODEC_ID_ADPCM_MS: + if (avctx->block_align > 0) + buf_size = FFMIN(buf_size, avctx->block_align); + nb_samples = 2 + (buf_size - 7 * ch) * 2 / ch; + break; + case CODEC_ID_ADPCM_SBPRO_2: + case CODEC_ID_ADPCM_SBPRO_3: + case CODEC_ID_ADPCM_SBPRO_4: + { + int samples_per_byte; + switch (avctx->codec->id) { + case CODEC_ID_ADPCM_SBPRO_2: samples_per_byte = 4; break; + case CODEC_ID_ADPCM_SBPRO_3: samples_per_byte = 3; break; + case CODEC_ID_ADPCM_SBPRO_4: samples_per_byte = 2; break; + } + if (!s->status[0].step_index) { + nb_samples++; + buf_size -= ch; + } + nb_samples += buf_size * samples_per_byte / ch; + break; + } + case CODEC_ID_ADPCM_SWF: + { + int buf_bits = buf_size * 8 - 2; + int nbits = (buf[0] >> 6) + 2; + int block_hdr_size = 22 * ch; + int block_size = block_hdr_size + nbits * ch * 4095; + int nblocks = buf_bits / block_size; + int bits_left = buf_bits - nblocks * block_size; + nb_samples = nblocks * 4096; + if (bits_left >= block_hdr_size) + nb_samples += 1 + (bits_left - block_hdr_size) / (nbits * ch); + break; + } + case CODEC_ID_ADPCM_THP: + has_coded_samples = 1; + if (buf_size < 8) + return 0; + *coded_samples = AV_RB32(&buf[4]); + *coded_samples -= *coded_samples % 14; + nb_samples = (buf_size - 80) / (8 * ch) * 14; + break; + case CODEC_ID_ADPCM_XA: + nb_samples = (buf_size / 128) * 224 / ch; + break; + } + + /* validate coded sample count */ + if (has_coded_samples && (*coded_samples <= 0 || *coded_samples > nb_samples)) + return AVERROR_INVALIDDATA; + + return nb_samples; +} /* DK3 ADPCM support macro */ #define DK3_GET_NEXT_NIBBLE() \ @@ -952,105 +502,104 @@ } \ else \ { \ + if (end_of_packet) \ + break; \ last_byte = *src++; \ - if (src >= buf + buf_size) break; \ + if (src >= buf + buf_size) \ + end_of_packet = 1; \ nibble = last_byte & 0x0F; \ decode_top_nibble_next = 1; \ } -static int adpcm_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int adpcm_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - ADPCMContext *c = avctx->priv_data; + ADPCMDecodeContext *c = avctx->priv_data; ADPCMChannelStatus *cs; int n, m, channel, i; - int block_predictor[2]; short *samples; - short *samples_end; const uint8_t *src; int st; /* stereo */ - - /* DK3 ADPCM accounting variables */ - unsigned char last_byte = 0; - unsigned char nibble; - int decode_top_nibble_next = 0; - int diff_channel; - - /* EA ADPCM state variables */ - uint32_t samples_in_chunk; - int32_t previous_left_sample, previous_right_sample; - int32_t current_left_sample, current_right_sample; - int32_t next_left_sample, next_right_sample; - int32_t coeff1l, coeff2l, coeff1r, coeff2r; - uint8_t shift_left, shift_right; int count1, count2; - int coeff[2][2], shift[2];//used in EA MAXIS ADPCM + int nb_samples, coded_samples, ret; - if (!buf_size) - return 0; + nb_samples = get_nb_samples(avctx, buf, buf_size, &coded_samples); + if (nb_samples <= 0) { + av_log(avctx, AV_LOG_ERROR, "invalid number of samples in packet\n"); + return AVERROR_INVALIDDATA; + } - //should protect all 4bit ADPCM variants - //8 is needed for CODEC_ID_ADPCM_IMA_WAV with 2 channels - // - if(*data_size/4 < buf_size + 8) - return -1; + /* get output buffer */ + c->frame.nb_samples = nb_samples; + if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (short *)c->frame.data[0]; + + /* use coded_samples when applicable */ + /* it is always <= nb_samples, so the output buffer will be large enough */ + if (coded_samples) { + if (coded_samples != nb_samples) + av_log(avctx, AV_LOG_WARNING, "mismatch in coded sample count\n"); + c->frame.nb_samples = nb_samples = coded_samples; + } - samples = data; - samples_end= samples + *data_size/2; - *data_size= 0; src = buf; st = avctx->channels == 2 ? 1 : 0; switch(avctx->codec->id) { case CODEC_ID_ADPCM_IMA_QT: - n = buf_size - 2*avctx->channels; + /* In QuickTime, IMA is encoded by chunks of 34 bytes (=64 samples). + Channel data is interleaved per-chunk. */ for (channel = 0; channel < avctx->channels; channel++) { + int16_t predictor; + int step_index; cs = &(c->status[channel]); /* (pppppp) (piiiiiii) */ /* Bits 15-7 are the _top_ 9 bits of the 16-bit initial predictor value */ - cs->predictor = (*src++) << 8; - cs->predictor |= (*src & 0x80); - cs->predictor &= 0xFF80; - - /* sign extension */ - if(cs->predictor & 0x8000) - cs->predictor -= 0x10000; - - cs->predictor = av_clip_int16(cs->predictor); - - cs->step_index = (*src++) & 0x7F; + predictor = AV_RB16(src); + step_index = predictor & 0x7F; + predictor &= 0xFF80; + + src += 2; + + if (cs->step_index == step_index) { + int diff = (int)predictor - cs->predictor; + if (diff < 0) + diff = - diff; + if (diff > 0x7f) + goto update; + } else { + update: + cs->step_index = step_index; + cs->predictor = predictor; + } if (cs->step_index > 88){ av_log(avctx, AV_LOG_ERROR, "ERROR: step_index = %i\n", cs->step_index); cs->step_index = 88; } - cs->step = step_table[cs->step_index]; + samples = (short *)c->frame.data[0] + channel; - samples = (short*)data + channel; - - for(m=32; n>0 && m>0; n--, m--) { /* in QuickTime, IMA is encoded by chuncks of 34 bytes (=64 samples) */ - *samples = adpcm_ima_expand_nibble(cs, src[0] & 0x0F, 3); + for (m = 0; m < 32; m++) { + *samples = adpcm_ima_qt_expand_nibble(cs, src[0] & 0x0F, 3); samples += avctx->channels; - *samples = adpcm_ima_expand_nibble(cs, src[0] >> 4 , 3); + *samples = adpcm_ima_qt_expand_nibble(cs, src[0] >> 4 , 3); samples += avctx->channels; src ++; } } - if (st) - samples--; break; case CODEC_ID_ADPCM_IMA_WAV: if (avctx->block_align != 0 && buf_size > avctx->block_align) buf_size = avctx->block_align; -// samples_per_block= (block_align-4*chanels)*8 / (bits_per_sample * chanels) + 1; - for(i=0; ichannels; i++){ cs = &(c->status[i]); cs->predictor = *samples++ = (int16_t)bytestream_get_le16(&src); @@ -1063,61 +612,61 @@ if (*src++) av_log(avctx, AV_LOG_ERROR, "unused byte should be null but is %d!!\n", src[-1]); /* unused */ } - while(src < buf + buf_size){ - for(m=0; m<4; m++){ - for(i=0; i<=st; i++) - *samples++ = adpcm_ima_expand_nibble(&c->status[i], src[4*i] & 0x0F, 3); - for(i=0; i<=st; i++) - *samples++ = adpcm_ima_expand_nibble(&c->status[i], src[4*i] >> 4 , 3); - src++; + for (n = (nb_samples - 1) / 8; n > 0; n--) { + for (i = 0; i < avctx->channels; i++) { + cs = &c->status[i]; + for (m = 0; m < 4; m++) { + uint8_t v = *src++; + *samples = adpcm_ima_expand_nibble(cs, v & 0x0F, 3); + samples += avctx->channels; + *samples = adpcm_ima_expand_nibble(cs, v >> 4 , 3); + samples += avctx->channels; + } + samples -= 8 * avctx->channels - 1; } - src += 4*st; + samples += 7 * avctx->channels; } break; case CODEC_ID_ADPCM_4XM: - cs = &(c->status[0]); - c->status[0].predictor= (int16_t)bytestream_get_le16(&src); - if(st){ - c->status[1].predictor= (int16_t)bytestream_get_le16(&src); - } - c->status[0].step_index= (int16_t)bytestream_get_le16(&src); - if(st){ - c->status[1].step_index= (int16_t)bytestream_get_le16(&src); - } - if (cs->step_index < 0) cs->step_index = 0; - if (cs->step_index > 88) cs->step_index = 88; - - m= (buf_size - (src - buf))>>st; - for(i=0; istatus[0], src[i] & 0x0F, 4); - if (st) - *samples++ = adpcm_ima_expand_nibble(&c->status[1], src[i+m] & 0x0F, 4); - *samples++ = adpcm_ima_expand_nibble(&c->status[0], src[i] >> 4, 4); - if (st) - *samples++ = adpcm_ima_expand_nibble(&c->status[1], src[i+m] >> 4, 4); - } + for (i = 0; i < avctx->channels; i++) + c->status[i].predictor= (int16_t)bytestream_get_le16(&src); - src += m<channels; i++) { + c->status[i].step_index= (int16_t)bytestream_get_le16(&src); + c->status[i].step_index = av_clip(c->status[i].step_index, 0, 88); + } + for (i = 0; i < avctx->channels; i++) { + samples = (short *)c->frame.data[0] + i; + cs = &c->status[i]; + for (n = nb_samples >> 1; n > 0; n--, src++) { + uint8_t v = *src; + *samples = adpcm_ima_expand_nibble(cs, v & 0x0F, 4); + samples += avctx->channels; + *samples = adpcm_ima_expand_nibble(cs, v >> 4 , 4); + samples += avctx->channels; + } + } break; case CODEC_ID_ADPCM_MS: + { + int block_predictor; + if (avctx->block_align != 0 && buf_size > avctx->block_align) buf_size = avctx->block_align; - n = buf_size - 7 * avctx->channels; - if (n < 0) - return -1; - block_predictor[0] = av_clip(*src++, 0, 6); - block_predictor[1] = 0; - if (st) - block_predictor[1] = av_clip(*src++, 0, 6); + + block_predictor = av_clip(*src++, 0, 6); + c->status[0].coeff1 = ff_adpcm_AdaptCoeff1[block_predictor]; + c->status[0].coeff2 = ff_adpcm_AdaptCoeff2[block_predictor]; + if (st) { + block_predictor = av_clip(*src++, 0, 6); + c->status[1].coeff1 = ff_adpcm_AdaptCoeff1[block_predictor]; + c->status[1].coeff2 = ff_adpcm_AdaptCoeff2[block_predictor]; + } c->status[0].idelta = (int16_t)bytestream_get_le16(&src); if (st){ c->status[1].idelta = (int16_t)bytestream_get_le16(&src); } - c->status[0].coeff1 = AdaptCoeff1[block_predictor[0]]; - c->status[0].coeff2 = AdaptCoeff2[block_predictor[0]]; - c->status[1].coeff1 = AdaptCoeff1[block_predictor[1]]; - c->status[1].coeff2 = AdaptCoeff2[block_predictor[1]]; c->status[0].sample1 = bytestream_get_le16(&src); if (st) c->status[1].sample1 = bytestream_get_le16(&src); @@ -1128,51 +677,40 @@ if (st) *samples++ = c->status[1].sample2; *samples++ = c->status[0].sample1; if (st) *samples++ = c->status[1].sample1; - for(;n>0;n--) { + for(n = (nb_samples - 2) >> (1 - st); n > 0; n--, src++) { *samples++ = adpcm_ms_expand_nibble(&c->status[0 ], src[0] >> 4 ); *samples++ = adpcm_ms_expand_nibble(&c->status[st], src[0] & 0x0F); - src ++; } break; + } case CODEC_ID_ADPCM_IMA_DK4: if (avctx->block_align != 0 && buf_size > avctx->block_align) buf_size = avctx->block_align; - c->status[0].predictor = (int16_t)bytestream_get_le16(&src); - c->status[0].step_index = *src++; - src++; - *samples++ = c->status[0].predictor; - if (st) { - c->status[1].predictor = (int16_t)bytestream_get_le16(&src); - c->status[1].step_index = *src++; + for (channel = 0; channel < avctx->channels; channel++) { + cs = &c->status[channel]; + cs->predictor = (int16_t)bytestream_get_le16(&src); + cs->step_index = *src++; src++; - *samples++ = c->status[1].predictor; + *samples++ = cs->predictor; } - while (src < buf + buf_size) { - - /* take care of the top nibble (always left or mono channel) */ - *samples++ = adpcm_ima_expand_nibble(&c->status[0], - src[0] >> 4, 3); - - /* take care of the bottom nibble, which is right sample for - * stereo, or another mono sample */ - if (st) - *samples++ = adpcm_ima_expand_nibble(&c->status[1], - src[0] & 0x0F, 3); - else - *samples++ = adpcm_ima_expand_nibble(&c->status[0], - src[0] & 0x0F, 3); - - src++; + for (n = nb_samples >> (1 - st); n > 0; n--, src++) { + uint8_t v = *src; + *samples++ = adpcm_ima_expand_nibble(&c->status[0 ], v >> 4 , 3); + *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3); } break; case CODEC_ID_ADPCM_IMA_DK3: + { + unsigned char last_byte = 0; + unsigned char nibble; + int decode_top_nibble_next = 0; + int end_of_packet = 0; + int diff_channel; + if (avctx->block_align != 0 && buf_size > avctx->block_align) buf_size = avctx->block_align; - if(buf_size + 16 > (samples_end - samples)*3/8) - return -1; - c->status[0].predictor = (int16_t)AV_RL16(src + 10); c->status[1].predictor = (int16_t)AV_RL16(src + 12); c->status[0].step_index = src[14]; @@ -1211,50 +749,35 @@ *samples++ = c->status[0].predictor - c->status[1].predictor; } break; + } case CODEC_ID_ADPCM_IMA_ISS: - c->status[0].predictor = (int16_t)AV_RL16(src + 0); - c->status[0].step_index = src[2]; - src += 4; - if(st) { - c->status[1].predictor = (int16_t)AV_RL16(src + 0); - c->status[1].step_index = src[2]; - src += 4; + for (channel = 0; channel < avctx->channels; channel++) { + cs = &c->status[channel]; + cs->predictor = (int16_t)bytestream_get_le16(&src); + cs->step_index = *src++; + src++; } - while (src < buf + buf_size) { - + for (n = nb_samples >> (1 - st); n > 0; n--, src++) { + uint8_t v1, v2; + uint8_t v = *src; + /* nibbles are swapped for mono */ if (st) { - *samples++ = adpcm_ima_expand_nibble(&c->status[0], - src[0] >> 4 , 3); - *samples++ = adpcm_ima_expand_nibble(&c->status[1], - src[0] & 0x0F, 3); + v1 = v >> 4; + v2 = v & 0x0F; } else { - *samples++ = adpcm_ima_expand_nibble(&c->status[0], - src[0] & 0x0F, 3); - *samples++ = adpcm_ima_expand_nibble(&c->status[0], - src[0] >> 4 , 3); + v2 = v >> 4; + v1 = v & 0x0F; } - - src++; + *samples++ = adpcm_ima_expand_nibble(&c->status[0 ], v1, 3); + *samples++ = adpcm_ima_expand_nibble(&c->status[st], v2, 3); } break; case CODEC_ID_ADPCM_IMA_WS: - /* no per-block initialization; just start decoding the data */ while (src < buf + buf_size) { - - if (st) { - *samples++ = adpcm_ima_expand_nibble(&c->status[0], - src[0] >> 4 , 3); - *samples++ = adpcm_ima_expand_nibble(&c->status[1], - src[0] & 0x0F, 3); - } else { - *samples++ = adpcm_ima_expand_nibble(&c->status[0], - src[0] >> 4 , 3); - *samples++ = adpcm_ima_expand_nibble(&c->status[0], - src[0] & 0x0F, 3); - } - - src++; + uint8_t v = *src++; + *samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4 , 3); + *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3); } break; case CODEC_ID_ADPCM_XA: @@ -1267,55 +790,56 @@ } break; case CODEC_ID_ADPCM_IMA_EA_EACS: - samples_in_chunk = bytestream_get_le32(&src) >> (1-st); - - if (samples_in_chunk > buf_size-4-(8<status[i].step_index = bytestream_get_le32(&src); for (i=0; i<=st; i++) c->status[i].predictor = bytestream_get_le32(&src); - for (; samples_in_chunk; samples_in_chunk--, src++) { + for (n = nb_samples >> (1 - st); n > 0; n--, src++) { *samples++ = adpcm_ima_expand_nibble(&c->status[0], *src>>4, 3); *samples++ = adpcm_ima_expand_nibble(&c->status[st], *src&0x0F, 3); } break; case CODEC_ID_ADPCM_IMA_EA_SEAD: - for (; src < buf+buf_size; src++) { + for (n = nb_samples >> (1 - st); n > 0; n--, src++) { *samples++ = adpcm_ima_expand_nibble(&c->status[0], src[0] >> 4, 6); *samples++ = adpcm_ima_expand_nibble(&c->status[st],src[0]&0x0F, 6); } break; case CODEC_ID_ADPCM_EA: - if (buf_size < 4 || AV_RL32(src) >= ((buf_size - 12) * 2)) { - src += buf_size; - break; - } - samples_in_chunk = AV_RL32(src); - src += 4; + { + int32_t previous_left_sample, previous_right_sample; + int32_t current_left_sample, current_right_sample; + int32_t next_left_sample, next_right_sample; + int32_t coeff1l, coeff2l, coeff1r, coeff2r; + uint8_t shift_left, shift_right; + + /* Each EA ADPCM frame has a 12-byte header followed by 30-byte pieces, + each coding 28 stereo samples. */ + + src += 4; // skip sample count (already read) + current_left_sample = (int16_t)bytestream_get_le16(&src); previous_left_sample = (int16_t)bytestream_get_le16(&src); current_right_sample = (int16_t)bytestream_get_le16(&src); previous_right_sample = (int16_t)bytestream_get_le16(&src); - for (count1 = 0; count1 < samples_in_chunk/28;count1++) { + for (count1 = 0; count1 < nb_samples / 28; count1++) { coeff1l = ea_adpcm_table[ *src >> 4 ]; coeff2l = ea_adpcm_table[(*src >> 4 ) + 4]; coeff1r = ea_adpcm_table[*src & 0x0F]; coeff2r = ea_adpcm_table[(*src & 0x0F) + 4]; src++; - shift_left = (*src >> 4 ) + 8; - shift_right = (*src & 0x0F) + 8; + shift_left = 20 - (*src >> 4); + shift_right = 20 - (*src & 0x0F); src++; for (count2 = 0; count2 < 28; count2++) { - next_left_sample = (int32_t)((*src & 0xF0) << 24) >> shift_left; - next_right_sample = (int32_t)((*src & 0x0F) << 28) >> shift_right; + next_left_sample = sign_extend(*src >> 4, 4) << shift_left; + next_right_sample = sign_extend(*src, 4) << shift_right; src++; next_left_sample = (next_left_sample + @@ -1338,17 +862,21 @@ src += 2; // Skip terminating 0x0000 break; + } case CODEC_ID_ADPCM_EA_MAXIS_XA: + { + int coeff[2][2], shift[2]; + for(channel = 0; channel < avctx->channels; channel++) { for (i=0; i<2; i++) coeff[channel][i] = ea_adpcm_table[(*src >> 4) + 4*i]; - shift[channel] = (*src & 0x0F) + 8; + shift[channel] = 20 - (*src & 0x0F); src++; } - for (count1 = 0; count1 < (buf_size - avctx->channels) / avctx->channels; count1++) { + for (count1 = 0; count1 < nb_samples / 2; count1++) { for(i = 4; i >= 0; i-=4) { /* Pairwise samples LL RR (st) or LL LL (mono) */ for(channel = 0; channel < avctx->channels; channel++) { - int32_t sample = (int32_t)(((*(src+channel) >> i) & 0x0F) << 0x1C) >> shift[channel]; + int32_t sample = sign_extend(src[channel] >> i, 4) << shift[channel]; sample = (sample + c->status[channel].sample1 * coeff[channel][0] + c->status[channel].sample2 * coeff[channel][1] + 0x80) >> 8; @@ -1359,7 +887,10 @@ } src+=avctx->channels; } + /* consume whole packet */ + src = buf + buf_size; break; + } case CODEC_ID_ADPCM_EA_R1: case CODEC_ID_ADPCM_EA_R2: case CODEC_ID_ADPCM_EA_R3: { @@ -1375,14 +906,9 @@ uint16_t *samplesC; const uint8_t *srcC; const uint8_t *src_end = buf + buf_size; + int count = 0; - samples_in_chunk = (big_endian ? bytestream_get_be32(&src) - : bytestream_get_le32(&src)) / 28; - if (samples_in_chunk > UINT32_MAX/(28*avctx->channels) || - 28*samples_in_chunk*avctx->channels > samples_end-samples) { - src += buf_size - 4; - break; - } + src += 4; // skip sample count (already read) for (channel=0; channelchannels; channel++) { int32_t offset = (big_endian ? bytestream_get_be32(&src) @@ -1401,7 +927,7 @@ previous_sample = c->status[channel].prev_sample; } - for (count1=0; count1 src_end - 30*2) break; @@ -1415,14 +941,14 @@ } else { coeff1 = ea_adpcm_table[ *srcC>>4 ]; coeff2 = ea_adpcm_table[(*srcC>>4) + 4]; - shift = (*srcC++ & 0x0F) + 8; + shift = 20 - (*srcC++ & 0x0F); if (srcC > src_end - 14) break; for (count2=0; count2<28; count2++) { if (count2 & 1) - next_sample = (int32_t)((*srcC++ & 0x0F) << 28) >> shift; + next_sample = sign_extend(*srcC++, 4) << shift; else - next_sample = (int32_t)((*srcC & 0xF0) << 24) >> shift; + next_sample = sign_extend(*srcC >> 4, 4) << shift; next_sample += (current_sample * coeff1) + (previous_sample * coeff2); @@ -1435,6 +961,12 @@ } } } + if (!count) { + count = count1; + } else if (count != count1) { + av_log(avctx, AV_LOG_WARNING, "per-channel sample count mismatch\n"); + count = FFMAX(count, count1); + } if (avctx->codec->id != CODEC_ID_ADPCM_EA_R1) { c->status[channel].predictor = current_sample; @@ -1442,23 +974,18 @@ } } - src = src + buf_size - (4 + 4*avctx->channels); - samples += 28 * samples_in_chunk * avctx->channels; + c->frame.nb_samples = count * 28; + src = src_end; break; } case CODEC_ID_ADPCM_EA_XAS: - if (samples_end-samples < 32*4*avctx->channels - || buf_size < (4+15)*4*avctx->channels) { - src += buf_size; - break; - } for (channel=0; channelchannels; channel++) { int coeff[2][4], shift[4]; short *s2, *s = &samples[channel]; for (n=0; n<4; n++, s+=32*avctx->channels) { for (i=0; i<2; i++) coeff[i][n] = ea_adpcm_table[(src[0]&0x0F)+4*i]; - shift[n] = (src[2]&0x0F) + 8; + shift[n] = 20 - (src[2] & 0x0F); for (s2=s, i=0; i<2; i++, src+=2, s2+=avctx->channels) s2[0] = (src[0]&0xF0) + (src[1]<<8); } @@ -1467,7 +994,7 @@ s = &samples[m*avctx->channels + channel]; for (n=0; n<4; n++, src++, s+=32*avctx->channels) { for (s2=s, i=0; i<8; i+=4, s2+=avctx->channels) { - int level = (int32_t)((*src & (0xF0>>i)) << (24+i)) >> shift[n]; + int level = sign_extend(*src >> (4 - i), 4) << shift[n]; int pred = s2[-1*avctx->channels] * coeff[0][n] + s2[-2*avctx->channels] * coeff[1][n]; s2[0] = av_clip_int16((level + pred + 0x80) >> 8); @@ -1475,17 +1002,20 @@ } } } - samples += 32*4*avctx->channels; break; case CODEC_ID_ADPCM_IMA_AMV: case CODEC_ID_ADPCM_IMA_SMJPEG: - c->status[0].predictor = (int16_t)bytestream_get_le16(&src); - c->status[0].step_index = bytestream_get_le16(&src); - - if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV) - src+=4; + if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV) { + c->status[0].predictor = sign_extend(bytestream_get_le16(&src), 16); + c->status[0].step_index = bytestream_get_le16(&src); + src += 4; + } else { + c->status[0].predictor = sign_extend(bytestream_get_be16(&src), 16); + c->status[0].step_index = bytestream_get_byte(&src); + src += 1; + } - while (src < buf + buf_size) { + for (n = nb_samples >> (1 - st); n > 0; n--, src++) { char hi, lo; lo = *src & 0x0F; hi = *src >> 4; @@ -1497,23 +1027,13 @@ lo, 3); *samples++ = adpcm_ima_expand_nibble(&c->status[0], hi, 3); - src++; } break; case CODEC_ID_ADPCM_CT: - while (src < buf + buf_size) { - if (st) { - *samples++ = adpcm_ct_expand_nibble(&c->status[0], - src[0] >> 4); - *samples++ = adpcm_ct_expand_nibble(&c->status[1], - src[0] & 0x0F); - } else { - *samples++ = adpcm_ct_expand_nibble(&c->status[0], - src[0] >> 4); - *samples++ = adpcm_ct_expand_nibble(&c->status[0], - src[0] & 0x0F); - } - src++; + for (n = nb_samples >> (1 - st); n > 0; n--, src++) { + uint8_t v = *src; + *samples++ = adpcm_ct_expand_nibble(&c->status[0 ], v >> 4 ); + *samples++ = adpcm_ct_expand_nibble(&c->status[st], v & 0x0F); } break; case CODEC_ID_ADPCM_SBPRO_4: @@ -1525,27 +1045,26 @@ if (st) *samples++ = 128 * (*src++ - 0x80); c->status[0].step_index = 1; + nb_samples--; } if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_4) { - while (src < buf + buf_size) { + for (n = nb_samples >> (1 - st); n > 0; n--, src++) { *samples++ = adpcm_sbpro_expand_nibble(&c->status[0], src[0] >> 4, 4, 0); *samples++ = adpcm_sbpro_expand_nibble(&c->status[st], src[0] & 0x0F, 4, 0); - src++; } } else if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_3) { - while (src < buf + buf_size && samples + 2 < samples_end) { + for (n = nb_samples / 3; n > 0; n--, src++) { *samples++ = adpcm_sbpro_expand_nibble(&c->status[0], src[0] >> 5 , 3, 0); *samples++ = adpcm_sbpro_expand_nibble(&c->status[0], (src[0] >> 2) & 0x07, 3, 0); *samples++ = adpcm_sbpro_expand_nibble(&c->status[0], src[0] & 0x03, 2, 0); - src++; } } else { - while (src < buf + buf_size && samples + 3 < samples_end) { + for (n = nb_samples >> (2 - st); n > 0; n--, src++) { *samples++ = adpcm_sbpro_expand_nibble(&c->status[0], src[0] >> 6 , 2, 2); *samples++ = adpcm_sbpro_expand_nibble(&c->status[st], @@ -1554,7 +1073,6 @@ (src[0] >> 2) & 0x03, 2, 2); *samples++ = adpcm_sbpro_expand_nibble(&c->status[st], src[0] & 0x03, 2, 2); - src++; } } break; @@ -1586,7 +1104,7 @@ for (i = 0; i < avctx->channels; i++) { // similar to IMA adpcm int delta = get_bits(&gb, nb_bits); - int step = step_table[c->status[i].step_index]; + int step = ff_adpcm_step_table[c->status[i].step_index]; long vpdiff = 0; // vpdiff = (delta+0.5)*step/4 int k = k0; @@ -1609,10 +1127,6 @@ c->status[i].predictor = av_clip_int16(c->status[i].predictor); *samples++ = c->status[i].predictor; - if (samples >= samples_end) { - av_log(avctx, AV_LOG_ERROR, "allocated output buffer is too small\n"); - return -1; - } } } } @@ -1620,35 +1134,20 @@ break; } case CODEC_ID_ADPCM_YAMAHA: - while (src < buf + buf_size) { - if (st) { - *samples++ = adpcm_yamaha_expand_nibble(&c->status[0], - src[0] & 0x0F); - *samples++ = adpcm_yamaha_expand_nibble(&c->status[1], - src[0] >> 4 ); - } else { - *samples++ = adpcm_yamaha_expand_nibble(&c->status[0], - src[0] & 0x0F); - *samples++ = adpcm_yamaha_expand_nibble(&c->status[0], - src[0] >> 4 ); - } - src++; + for (n = nb_samples >> (1 - st); n > 0; n--, src++) { + uint8_t v = *src; + *samples++ = adpcm_yamaha_expand_nibble(&c->status[0 ], v & 0x0F); + *samples++ = adpcm_yamaha_expand_nibble(&c->status[st], v >> 4 ); } break; case CODEC_ID_ADPCM_THP: { int table[2][16]; - unsigned int samplecnt; int prev[2][2]; int ch; - if (buf_size < 80) { - av_log(avctx, AV_LOG_ERROR, "frame too small\n"); - return -1; - } - - src+=4; - samplecnt = bytestream_get_be32(&src); + src += 4; // skip channel size + src += 4; // skip number of samples (already read) for (i = 0; i < 32; i++) table[0][i] = (int16_t)bytestream_get_be16(&src); @@ -1657,29 +1156,24 @@ for (i = 0; i < 4; i++) prev[0][i] = (int16_t)bytestream_get_be16(&src); - if (samplecnt >= (samples_end - samples) / (st + 1)) { - av_log(avctx, AV_LOG_ERROR, "allocated output buffer is too small\n"); - return -1; - } - for (ch = 0; ch <= st; ch++) { - samples = (unsigned short *) data + ch; + samples = (short *)c->frame.data[0] + ch; /* Read in every sample for this channel. */ - for (i = 0; i < samplecnt / 14; i++) { + for (i = 0; i < nb_samples / 14; i++) { int index = (*src >> 4) & 7; - unsigned int exp = 28 - (*src++ & 15); + unsigned int exp = *src++ & 15; int factor1 = table[ch][index * 2]; int factor2 = table[ch][index * 2 + 1]; /* Decode 14 samples. */ for (n = 0; n < 14; n++) { int32_t sampledat; - if(n&1) sampledat= *src++ <<28; - else sampledat= (*src&0xF0)<<24; + if(n&1) sampledat = sign_extend(*src++, 4); + else sampledat = sign_extend(*src >> 4, 4); sampledat = ((prev[ch][0]*factor1 - + prev[ch][1]*factor2) >> 11) + (sampledat>>exp); + + prev[ch][1]*factor2) >> 11) + (sampledat << exp); *samples = av_clip_int16(sampledat); prev[ch][1] = prev[ch][0]; prev[ch][0] = *samples++; @@ -1690,59 +1184,31 @@ } } } - - /* In the previous loop, in case stereo is used, samples is - increased exactly one time too often. */ - samples -= st; break; } default: return -1; } - *data_size = (uint8_t *)samples - (uint8_t *)data; + + *got_frame_ptr = 1; + *(AVFrame *)data = c->frame; + return src - buf; } - -#if CONFIG_ENCODERS -#define ADPCM_ENCODER(id,name,long_name_) \ -AVCodec ff_ ## name ## _encoder = { \ - #name, \ - AVMEDIA_TYPE_AUDIO, \ - id, \ - sizeof(ADPCMContext), \ - adpcm_encode_init, \ - adpcm_encode_frame, \ - adpcm_encode_close, \ - NULL, \ - .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, \ - .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ +#define ADPCM_DECODER(id_, name_, long_name_) \ +AVCodec ff_ ## name_ ## _decoder = { \ + .name = #name_, \ + .type = AVMEDIA_TYPE_AUDIO, \ + .id = id_, \ + .priv_data_size = sizeof(ADPCMDecodeContext), \ + .init = adpcm_decode_init, \ + .decode = adpcm_decode_frame, \ + .capabilities = CODEC_CAP_DR1, \ + .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ } -#else -#define ADPCM_ENCODER(id,name,long_name_) -#endif - -#if CONFIG_DECODERS -#define ADPCM_DECODER(id,name,long_name_) \ -AVCodec ff_ ## name ## _decoder = { \ - #name, \ - AVMEDIA_TYPE_AUDIO, \ - id, \ - sizeof(ADPCMContext), \ - adpcm_decode_init, \ - NULL, \ - NULL, \ - adpcm_decode_frame, \ - .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ -} -#else -#define ADPCM_DECODER(id,name,long_name_) -#endif - -#define ADPCM_CODEC(id,name,long_name_) \ - ADPCM_ENCODER(id,name,long_name_); ADPCM_DECODER(id,name,long_name_) /* Note: Do not forget to add new entries to the Makefile as well. */ ADPCM_DECODER(CODEC_ID_ADPCM_4XM, adpcm_4xm, "ADPCM 4X Movie"); @@ -1759,15 +1225,15 @@ ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs, "ADPCM IMA Electronic Arts EACS"); ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead, "ADPCM IMA Electronic Arts SEAD"); ADPCM_DECODER(CODEC_ID_ADPCM_IMA_ISS, adpcm_ima_iss, "ADPCM IMA Funcom ISS"); -ADPCM_CODEC (CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime"); +ADPCM_DECODER(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime"); ADPCM_DECODER(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg, "ADPCM IMA Loki SDL MJPEG"); -ADPCM_CODEC (CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV"); +ADPCM_DECODER(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV"); ADPCM_DECODER(CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws, "ADPCM IMA Westwood"); -ADPCM_CODEC (CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft"); +ADPCM_DECODER(CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft"); ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_2, adpcm_sbpro_2, "ADPCM Sound Blaster Pro 2-bit"); ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_3, adpcm_sbpro_3, "ADPCM Sound Blaster Pro 2.6-bit"); ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_4, adpcm_sbpro_4, "ADPCM Sound Blaster Pro 4-bit"); -ADPCM_CODEC (CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash"); +ADPCM_DECODER(CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash"); ADPCM_DECODER(CODEC_ID_ADPCM_THP, adpcm_thp, "ADPCM Nintendo Gamecube THP"); ADPCM_DECODER(CODEC_ID_ADPCM_XA, adpcm_xa, "ADPCM CDROM XA"); -ADPCM_CODEC (CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha"); +ADPCM_DECODER(CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha"); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adpcm_data.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adpcm_data.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adpcm_data.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adpcm_data.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2001-2003 The ffmpeg Project + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * ADPCM tables + */ + +#include + +/* ff_adpcm_step_table[] and ff_adpcm_index_table[] are from the ADPCM + reference source */ +/* This is the index table: */ +const int8_t ff_adpcm_index_table[16] = { + -1, -1, -1, -1, 2, 4, 6, 8, + -1, -1, -1, -1, 2, 4, 6, 8, +}; + +/** + * This is the step table. Note that many programs use slight deviations from + * this table, but such deviations are negligible: + */ +const int16_t ff_adpcm_step_table[89] = { + 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, + 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, + 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, + 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, + 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, + 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, + 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, + 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, + 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 +}; + +/* These are for MS-ADPCM */ +/* ff_adpcm_AdaptationTable[], ff_adpcm_AdaptCoeff1[], and + ff_adpcm_AdaptCoeff2[] are from libsndfile */ +const int16_t ff_adpcm_AdaptationTable[] = { + 230, 230, 230, 230, 307, 409, 512, 614, + 768, 614, 512, 409, 307, 230, 230, 230 +}; + +/** Divided by 4 to fit in 8-bit integers */ +const uint8_t ff_adpcm_AdaptCoeff1[] = { + 64, 128, 0, 48, 60, 115, 98 +}; + +/** Divided by 4 to fit in 8-bit integers */ +const int8_t ff_adpcm_AdaptCoeff2[] = { + 0, -64, 0, 16, 0, -52, -58 +}; + +const int16_t ff_adpcm_yamaha_indexscale[] = { + 230, 230, 230, 230, 307, 409, 512, 614, + 230, 230, 230, 230, 307, 409, 512, 614 +}; + +const int8_t ff_adpcm_yamaha_difflookup[] = { + 1, 3, 5, 7, 9, 11, 13, 15, + -1, -3, -5, -7, -9, -11, -13, -15 +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adpcm_data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adpcm_data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adpcm_data.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adpcm_data.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2001-2003 The ffmpeg Project + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * ADPCM tables + */ + +#ifndef AVCODEC_ADPCM_DATA_H +#define AVCODEC_ADPCM_DATA_H + +#include + +extern const int8_t ff_adpcm_index_table[16]; +extern const int16_t ff_adpcm_step_table[89]; +extern const int16_t ff_adpcm_AdaptationTable[]; +extern const uint8_t ff_adpcm_AdaptCoeff1[]; +extern const int8_t ff_adpcm_AdaptCoeff2[]; +extern const int16_t ff_adpcm_yamaha_indexscale[]; +extern const int8_t ff_adpcm_yamaha_difflookup[]; + +#endif /* AVCODEC_ADPCM_DATA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adpcmenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adpcmenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adpcmenc.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adpcmenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,716 @@ +/* + * Copyright (c) 2001-2003 The ffmpeg Project + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "avcodec.h" +#include "get_bits.h" +#include "put_bits.h" +#include "bytestream.h" +#include "adpcm.h" +#include "adpcm_data.h" + +/** + * @file + * ADPCM encoders + * First version by Francois Revol (revol@free.fr) + * Fringe ADPCM codecs (e.g., DK3, DK4, Westwood) + * by Mike Melanson (melanson@pcisys.net) + * + * See ADPCM decoder reference documents for codec information. + */ + +typedef struct TrellisPath { + int nibble; + int prev; +} TrellisPath; + +typedef struct TrellisNode { + uint32_t ssd; + int path; + int sample1; + int sample2; + int step; +} TrellisNode; + +typedef struct ADPCMEncodeContext { + ADPCMChannelStatus status[6]; + TrellisPath *paths; + TrellisNode *node_buf; + TrellisNode **nodep_buf; + uint8_t *trellis_hash; +} ADPCMEncodeContext; + +#define FREEZE_INTERVAL 128 + +static av_cold int adpcm_encode_init(AVCodecContext *avctx) +{ + ADPCMEncodeContext *s = avctx->priv_data; + uint8_t *extradata; + int i; + if (avctx->channels > 2) + return -1; /* only stereo or mono =) */ + + if (avctx->trellis && (unsigned)avctx->trellis > 16U) { + av_log(avctx, AV_LOG_ERROR, "invalid trellis size\n"); + return -1; + } + + if (avctx->trellis) { + int frontier = 1 << avctx->trellis; + int max_paths = frontier * FREEZE_INTERVAL; + FF_ALLOC_OR_GOTO(avctx, s->paths, + max_paths * sizeof(*s->paths), error); + FF_ALLOC_OR_GOTO(avctx, s->node_buf, + 2 * frontier * sizeof(*s->node_buf), error); + FF_ALLOC_OR_GOTO(avctx, s->nodep_buf, + 2 * frontier * sizeof(*s->nodep_buf), error); + FF_ALLOC_OR_GOTO(avctx, s->trellis_hash, + 65536 * sizeof(*s->trellis_hash), error); + } + + avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id); + + switch (avctx->codec->id) { + case CODEC_ID_ADPCM_IMA_WAV: + /* each 16 bits sample gives one nibble + and we have 4 bytes per channel overhead */ + avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 / + (4 * avctx->channels) + 1; + /* seems frame_size isn't taken into account... + have to buffer the samples :-( */ + avctx->block_align = BLKSIZE; + break; + case CODEC_ID_ADPCM_IMA_QT: + avctx->frame_size = 64; + avctx->block_align = 34 * avctx->channels; + break; + case CODEC_ID_ADPCM_MS: + /* each 16 bits sample gives one nibble + and we have 7 bytes per channel overhead */ + avctx->frame_size = (BLKSIZE - 7 * avctx->channels) * 2 / + avctx->channels + 2; + avctx->block_align = BLKSIZE; + avctx->extradata_size = 32; + extradata = avctx->extradata = av_malloc(avctx->extradata_size); + if (!extradata) + return AVERROR(ENOMEM); + bytestream_put_le16(&extradata, avctx->frame_size); + bytestream_put_le16(&extradata, 7); /* wNumCoef */ + for (i = 0; i < 7; i++) { + bytestream_put_le16(&extradata, ff_adpcm_AdaptCoeff1[i] * 4); + bytestream_put_le16(&extradata, ff_adpcm_AdaptCoeff2[i] * 4); + } + break; + case CODEC_ID_ADPCM_YAMAHA: + avctx->frame_size = BLKSIZE * avctx->channels; + avctx->block_align = BLKSIZE; + break; + case CODEC_ID_ADPCM_SWF: + if (avctx->sample_rate != 11025 && + avctx->sample_rate != 22050 && + avctx->sample_rate != 44100) { + av_log(avctx, AV_LOG_ERROR, "Sample rate must be 11025, " + "22050 or 44100\n"); + goto error; + } + avctx->frame_size = 512 * (avctx->sample_rate / 11025); + break; + default: + goto error; + } + + avctx->coded_frame = avcodec_alloc_frame(); + avctx->coded_frame->key_frame= 1; + + return 0; +error: + av_freep(&s->paths); + av_freep(&s->node_buf); + av_freep(&s->nodep_buf); + av_freep(&s->trellis_hash); + return -1; +} + +static av_cold int adpcm_encode_close(AVCodecContext *avctx) +{ + ADPCMEncodeContext *s = avctx->priv_data; + av_freep(&avctx->coded_frame); + av_freep(&s->paths); + av_freep(&s->node_buf); + av_freep(&s->nodep_buf); + av_freep(&s->trellis_hash); + + return 0; +} + + +static inline unsigned char adpcm_ima_compress_sample(ADPCMChannelStatus *c, + short sample) +{ + int delta = sample - c->prev_sample; + int nibble = FFMIN(7, abs(delta) * 4 / + ff_adpcm_step_table[c->step_index]) + (delta < 0) * 8; + c->prev_sample += ((ff_adpcm_step_table[c->step_index] * + ff_adpcm_yamaha_difflookup[nibble]) / 8); + c->prev_sample = av_clip_int16(c->prev_sample); + c->step_index = av_clip(c->step_index + ff_adpcm_index_table[nibble], 0, 88); + return nibble; +} + +static inline unsigned char adpcm_ima_qt_compress_sample(ADPCMChannelStatus *c, + short sample) +{ + int delta = sample - c->prev_sample; + int mask, step = ff_adpcm_step_table[c->step_index]; + int diff = step >> 3; + int nibble = 0; + + if (delta < 0) { + nibble = 8; + delta = -delta; + } + + for (mask = 4; mask;) { + if (delta >= step) { + nibble |= mask; + delta -= step; + diff += step; + } + step >>= 1; + mask >>= 1; + } + + if (nibble & 8) + c->prev_sample -= diff; + else + c->prev_sample += diff; + + c->prev_sample = av_clip_int16(c->prev_sample); + c->step_index = av_clip(c->step_index + ff_adpcm_index_table[nibble], 0, 88); + + return nibble; +} + +static inline unsigned char adpcm_ms_compress_sample(ADPCMChannelStatus *c, + short sample) +{ + int predictor, nibble, bias; + + predictor = (((c->sample1) * (c->coeff1)) + + (( c->sample2) * (c->coeff2))) / 64; + + nibble = sample - predictor; + if (nibble >= 0) + bias = c->idelta / 2; + else + bias = -c->idelta / 2; + + nibble = (nibble + bias) / c->idelta; + nibble = av_clip(nibble, -8, 7) & 0x0F; + + predictor += (signed)((nibble & 0x08) ? (nibble - 0x10) : nibble) * c->idelta; + + c->sample2 = c->sample1; + c->sample1 = av_clip_int16(predictor); + + c->idelta = (ff_adpcm_AdaptationTable[(int)nibble] * c->idelta) >> 8; + if (c->idelta < 16) + c->idelta = 16; + + return nibble; +} + +static inline unsigned char adpcm_yamaha_compress_sample(ADPCMChannelStatus *c, + short sample) +{ + int nibble, delta; + + if (!c->step) { + c->predictor = 0; + c->step = 127; + } + + delta = sample - c->predictor; + + nibble = FFMIN(7, abs(delta) * 4 / c->step) + (delta < 0) * 8; + + c->predictor += ((c->step * ff_adpcm_yamaha_difflookup[nibble]) / 8); + c->predictor = av_clip_int16(c->predictor); + c->step = (c->step * ff_adpcm_yamaha_indexscale[nibble]) >> 8; + c->step = av_clip(c->step, 127, 24567); + + return nibble; +} + +static void adpcm_compress_trellis(AVCodecContext *avctx, const short *samples, + uint8_t *dst, ADPCMChannelStatus *c, int n) +{ + //FIXME 6% faster if frontier is a compile-time constant + ADPCMEncodeContext *s = avctx->priv_data; + const int frontier = 1 << avctx->trellis; + const int stride = avctx->channels; + const int version = avctx->codec->id; + TrellisPath *paths = s->paths, *p; + TrellisNode *node_buf = s->node_buf; + TrellisNode **nodep_buf = s->nodep_buf; + TrellisNode **nodes = nodep_buf; // nodes[] is always sorted by .ssd + TrellisNode **nodes_next = nodep_buf + frontier; + int pathn = 0, froze = -1, i, j, k, generation = 0; + uint8_t *hash = s->trellis_hash; + memset(hash, 0xff, 65536 * sizeof(*hash)); + + memset(nodep_buf, 0, 2 * frontier * sizeof(*nodep_buf)); + nodes[0] = node_buf + frontier; + nodes[0]->ssd = 0; + nodes[0]->path = 0; + nodes[0]->step = c->step_index; + nodes[0]->sample1 = c->sample1; + nodes[0]->sample2 = c->sample2; + if (version == CODEC_ID_ADPCM_IMA_WAV || + version == CODEC_ID_ADPCM_IMA_QT || + version == CODEC_ID_ADPCM_SWF) + nodes[0]->sample1 = c->prev_sample; + if (version == CODEC_ID_ADPCM_MS) + nodes[0]->step = c->idelta; + if (version == CODEC_ID_ADPCM_YAMAHA) { + if (c->step == 0) { + nodes[0]->step = 127; + nodes[0]->sample1 = 0; + } else { + nodes[0]->step = c->step; + nodes[0]->sample1 = c->predictor; + } + } + + for (i = 0; i < n; i++) { + TrellisNode *t = node_buf + frontier*(i&1); + TrellisNode **u; + int sample = samples[i * stride]; + int heap_pos = 0; + memset(nodes_next, 0, frontier * sizeof(TrellisNode*)); + for (j = 0; j < frontier && nodes[j]; j++) { + // higher j have higher ssd already, so they're likely + // to yield a suboptimal next sample too + const int range = (j < frontier / 2) ? 1 : 0; + const int step = nodes[j]->step; + int nidx; + if (version == CODEC_ID_ADPCM_MS) { + const int predictor = ((nodes[j]->sample1 * c->coeff1) + + (nodes[j]->sample2 * c->coeff2)) / 64; + const int div = (sample - predictor) / step; + const int nmin = av_clip(div-range, -8, 6); + const int nmax = av_clip(div+range, -7, 7); + for (nidx = nmin; nidx <= nmax; nidx++) { + const int nibble = nidx & 0xf; + int dec_sample = predictor + nidx * step; +#define STORE_NODE(NAME, STEP_INDEX)\ + int d;\ + uint32_t ssd;\ + int pos;\ + TrellisNode *u;\ + uint8_t *h;\ + dec_sample = av_clip_int16(dec_sample);\ + d = sample - dec_sample;\ + ssd = nodes[j]->ssd + d*d;\ + /* Check for wraparound, skip such samples completely. \ + * Note, changing ssd to a 64 bit variable would be \ + * simpler, avoiding this check, but it's slower on \ + * x86 32 bit at the moment. */\ + if (ssd < nodes[j]->ssd)\ + goto next_##NAME;\ + /* Collapse any two states with the same previous sample value. \ + * One could also distinguish states by step and by 2nd to last + * sample, but the effects of that are negligible. + * Since nodes in the previous generation are iterated + * through a heap, they're roughly ordered from better to + * worse, but not strictly ordered. Therefore, an earlier + * node with the same sample value is better in most cases + * (and thus the current is skipped), but not strictly + * in all cases. Only skipping samples where ssd >= + * ssd of the earlier node with the same sample gives + * slightly worse quality, though, for some reason. */ \ + h = &hash[(uint16_t) dec_sample];\ + if (*h == generation)\ + goto next_##NAME;\ + if (heap_pos < frontier) {\ + pos = heap_pos++;\ + } else {\ + /* Try to replace one of the leaf nodes with the new \ + * one, but try a different slot each time. */\ + pos = (frontier >> 1) +\ + (heap_pos & ((frontier >> 1) - 1));\ + if (ssd > nodes_next[pos]->ssd)\ + goto next_##NAME;\ + heap_pos++;\ + }\ + *h = generation;\ + u = nodes_next[pos];\ + if (!u) {\ + assert(pathn < FREEZE_INTERVAL << avctx->trellis);\ + u = t++;\ + nodes_next[pos] = u;\ + u->path = pathn++;\ + }\ + u->ssd = ssd;\ + u->step = STEP_INDEX;\ + u->sample2 = nodes[j]->sample1;\ + u->sample1 = dec_sample;\ + paths[u->path].nibble = nibble;\ + paths[u->path].prev = nodes[j]->path;\ + /* Sift the newly inserted node up in the heap to \ + * restore the heap property. */\ + while (pos > 0) {\ + int parent = (pos - 1) >> 1;\ + if (nodes_next[parent]->ssd <= ssd)\ + break;\ + FFSWAP(TrellisNode*, nodes_next[parent], nodes_next[pos]);\ + pos = parent;\ + }\ + next_##NAME:; + STORE_NODE(ms, FFMAX(16, + (ff_adpcm_AdaptationTable[nibble] * step) >> 8)); + } + } else if (version == CODEC_ID_ADPCM_IMA_WAV || + version == CODEC_ID_ADPCM_IMA_QT || + version == CODEC_ID_ADPCM_SWF) { +#define LOOP_NODES(NAME, STEP_TABLE, STEP_INDEX)\ + const int predictor = nodes[j]->sample1;\ + const int div = (sample - predictor) * 4 / STEP_TABLE;\ + int nmin = av_clip(div - range, -7, 6);\ + int nmax = av_clip(div + range, -6, 7);\ + if (nmin <= 0)\ + nmin--; /* distinguish -0 from +0 */\ + if (nmax < 0)\ + nmax--;\ + for (nidx = nmin; nidx <= nmax; nidx++) {\ + const int nibble = nidx < 0 ? 7 - nidx : nidx;\ + int dec_sample = predictor +\ + (STEP_TABLE *\ + ff_adpcm_yamaha_difflookup[nibble]) / 8;\ + STORE_NODE(NAME, STEP_INDEX);\ + } + LOOP_NODES(ima, ff_adpcm_step_table[step], + av_clip(step + ff_adpcm_index_table[nibble], 0, 88)); + } else { //CODEC_ID_ADPCM_YAMAHA + LOOP_NODES(yamaha, step, + av_clip((step * ff_adpcm_yamaha_indexscale[nibble]) >> 8, + 127, 24567)); +#undef LOOP_NODES +#undef STORE_NODE + } + } + + u = nodes; + nodes = nodes_next; + nodes_next = u; + + generation++; + if (generation == 255) { + memset(hash, 0xff, 65536 * sizeof(*hash)); + generation = 0; + } + + // prevent overflow + if (nodes[0]->ssd > (1 << 28)) { + for (j = 1; j < frontier && nodes[j]; j++) + nodes[j]->ssd -= nodes[0]->ssd; + nodes[0]->ssd = 0; + } + + // merge old paths to save memory + if (i == froze + FREEZE_INTERVAL) { + p = &paths[nodes[0]->path]; + for (k = i; k > froze; k--) { + dst[k] = p->nibble; + p = &paths[p->prev]; + } + froze = i; + pathn = 0; + // other nodes might use paths that don't coincide with the frozen one. + // checking which nodes do so is too slow, so just kill them all. + // this also slightly improves quality, but I don't know why. + memset(nodes + 1, 0, (frontier - 1) * sizeof(TrellisNode*)); + } + } + + p = &paths[nodes[0]->path]; + for (i = n - 1; i > froze; i--) { + dst[i] = p->nibble; + p = &paths[p->prev]; + } + + c->predictor = nodes[0]->sample1; + c->sample1 = nodes[0]->sample1; + c->sample2 = nodes[0]->sample2; + c->step_index = nodes[0]->step; + c->step = nodes[0]->step; + c->idelta = nodes[0]->step; +} + +static int adpcm_encode_frame(AVCodecContext *avctx, + unsigned char *frame, int buf_size, void *data) +{ + int n, i, st; + short *samples; + unsigned char *dst; + ADPCMEncodeContext *c = avctx->priv_data; + uint8_t *buf; + + dst = frame; + samples = (short *)data; + st = avctx->channels == 2; + /* n = (BLKSIZE - 4 * avctx->channels) / (2 * 8 * avctx->channels); */ + + switch(avctx->codec->id) { + case CODEC_ID_ADPCM_IMA_WAV: + n = avctx->frame_size / 8; + c->status[0].prev_sample = (signed short)samples[0]; /* XXX */ + /* c->status[0].step_index = 0; + XXX: not sure how to init the state machine */ + bytestream_put_le16(&dst, c->status[0].prev_sample); + *dst++ = (unsigned char)c->status[0].step_index; + *dst++ = 0; /* unknown */ + samples++; + if (avctx->channels == 2) { + c->status[1].prev_sample = (signed short)samples[0]; + /* c->status[1].step_index = 0; */ + bytestream_put_le16(&dst, c->status[1].prev_sample); + *dst++ = (unsigned char)c->status[1].step_index; + *dst++ = 0; + samples++; + } + + /* stereo: 4 bytes (8 samples) for left, + 4 bytes for right, 4 bytes left, ... */ + if (avctx->trellis > 0) { + FF_ALLOC_OR_GOTO(avctx, buf, 2 * n * 8, error); + adpcm_compress_trellis(avctx, samples, buf, &c->status[0], n * 8); + if (avctx->channels == 2) + adpcm_compress_trellis(avctx, samples + 1, buf + n * 8, + &c->status[1], n * 8); + for (i = 0; i < n; i++) { + *dst++ = buf[8 * i + 0] | (buf[8 * i + 1] << 4); + *dst++ = buf[8 * i + 2] | (buf[8 * i + 3] << 4); + *dst++ = buf[8 * i + 4] | (buf[8 * i + 5] << 4); + *dst++ = buf[8 * i + 6] | (buf[8 * i + 7] << 4); + if (avctx->channels == 2) { + uint8_t *buf1 = buf + n * 8; + *dst++ = buf1[8 * i + 0] | (buf1[8 * i + 1] << 4); + *dst++ = buf1[8 * i + 2] | (buf1[8 * i + 3] << 4); + *dst++ = buf1[8 * i + 4] | (buf1[8 * i + 5] << 4); + *dst++ = buf1[8 * i + 6] | (buf1[8 * i + 7] << 4); + } + } + av_free(buf); + } else { + for (; n > 0; n--) { + *dst = adpcm_ima_compress_sample(&c->status[0], samples[0]); + *dst++ |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels ]) << 4; + *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 2]); + *dst++ |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 3]) << 4; + *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 4]); + *dst++ |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 5]) << 4; + *dst = adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 6]); + *dst++ |= adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels * 7]) << 4; + /* right channel */ + if (avctx->channels == 2) { + *dst = adpcm_ima_compress_sample(&c->status[1], samples[1 ]); + *dst++ |= adpcm_ima_compress_sample(&c->status[1], samples[3 ]) << 4; + *dst = adpcm_ima_compress_sample(&c->status[1], samples[5 ]); + *dst++ |= adpcm_ima_compress_sample(&c->status[1], samples[7 ]) << 4; + *dst = adpcm_ima_compress_sample(&c->status[1], samples[9 ]); + *dst++ |= adpcm_ima_compress_sample(&c->status[1], samples[11]) << 4; + *dst = adpcm_ima_compress_sample(&c->status[1], samples[13]); + *dst++ |= adpcm_ima_compress_sample(&c->status[1], samples[15]) << 4; + } + samples += 8 * avctx->channels; + } + } + break; + case CODEC_ID_ADPCM_IMA_QT: + { + int ch, i; + PutBitContext pb; + init_put_bits(&pb, dst, buf_size * 8); + + for (ch = 0; ch < avctx->channels; ch++) { + put_bits(&pb, 9, (c->status[ch].prev_sample + 0x10000) >> 7); + put_bits(&pb, 7, c->status[ch].step_index); + if (avctx->trellis > 0) { + uint8_t buf[64]; + adpcm_compress_trellis(avctx, samples+ch, buf, &c->status[ch], 64); + for (i = 0; i < 64; i++) + put_bits(&pb, 4, buf[i ^ 1]); + } else { + for (i = 0; i < 64; i += 2) { + int t1, t2; + t1 = adpcm_ima_qt_compress_sample(&c->status[ch], + samples[avctx->channels * (i + 0) + ch]); + t2 = adpcm_ima_qt_compress_sample(&c->status[ch], + samples[avctx->channels * (i + 1) + ch]); + put_bits(&pb, 4, t2); + put_bits(&pb, 4, t1); + } + } + } + + flush_put_bits(&pb); + dst += put_bits_count(&pb) >> 3; + break; + } + case CODEC_ID_ADPCM_SWF: + { + int i; + PutBitContext pb; + init_put_bits(&pb, dst, buf_size * 8); + + n = avctx->frame_size - 1; + + // store AdpcmCodeSize + put_bits(&pb, 2, 2); // set 4-bit flash adpcm format + + // init the encoder state + for (i = 0; i < avctx->channels; i++) { + // clip step so it fits 6 bits + c->status[i].step_index = av_clip(c->status[i].step_index, 0, 63); + put_sbits(&pb, 16, samples[i]); + put_bits(&pb, 6, c->status[i].step_index); + c->status[i].prev_sample = (signed short)samples[i]; + } + + if (avctx->trellis > 0) { + FF_ALLOC_OR_GOTO(avctx, buf, 2 * n, error); + adpcm_compress_trellis(avctx, samples + 2, buf, &c->status[0], n); + if (avctx->channels == 2) + adpcm_compress_trellis(avctx, samples + 3, buf + n, + &c->status[1], n); + for (i = 0; i < n; i++) { + put_bits(&pb, 4, buf[i]); + if (avctx->channels == 2) + put_bits(&pb, 4, buf[n + i]); + } + av_free(buf); + } else { + for (i = 1; i < avctx->frame_size; i++) { + put_bits(&pb, 4, adpcm_ima_compress_sample(&c->status[0], + samples[avctx->channels * i])); + if (avctx->channels == 2) + put_bits(&pb, 4, adpcm_ima_compress_sample(&c->status[1], + samples[2 * i + 1])); + } + } + flush_put_bits(&pb); + dst += put_bits_count(&pb) >> 3; + break; + } + case CODEC_ID_ADPCM_MS: + for (i = 0; i < avctx->channels; i++) { + int predictor = 0; + *dst++ = predictor; + c->status[i].coeff1 = ff_adpcm_AdaptCoeff1[predictor]; + c->status[i].coeff2 = ff_adpcm_AdaptCoeff2[predictor]; + } + for (i = 0; i < avctx->channels; i++) { + if (c->status[i].idelta < 16) + c->status[i].idelta = 16; + bytestream_put_le16(&dst, c->status[i].idelta); + } + for (i = 0; i < avctx->channels; i++) + c->status[i].sample2= *samples++; + for (i = 0; i < avctx->channels; i++) { + c->status[i].sample1 = *samples++; + bytestream_put_le16(&dst, c->status[i].sample1); + } + for (i = 0; i < avctx->channels; i++) + bytestream_put_le16(&dst, c->status[i].sample2); + + if (avctx->trellis > 0) { + int n = avctx->block_align - 7 * avctx->channels; + FF_ALLOC_OR_GOTO(avctx, buf, 2 * n, error); + if (avctx->channels == 1) { + adpcm_compress_trellis(avctx, samples, buf, &c->status[0], n); + for (i = 0; i < n; i += 2) + *dst++ = (buf[i] << 4) | buf[i + 1]; + } else { + adpcm_compress_trellis(avctx, samples, buf, &c->status[0], n); + adpcm_compress_trellis(avctx, samples + 1, buf + n, &c->status[1], n); + for (i = 0; i < n; i++) + *dst++ = (buf[i] << 4) | buf[n + i]; + } + av_free(buf); + } else { + for (i = 7 * avctx->channels; i < avctx->block_align; i++) { + int nibble; + nibble = adpcm_ms_compress_sample(&c->status[ 0], *samples++) << 4; + nibble |= adpcm_ms_compress_sample(&c->status[st], *samples++); + *dst++ = nibble; + } + } + break; + case CODEC_ID_ADPCM_YAMAHA: + n = avctx->frame_size / 2; + if (avctx->trellis > 0) { + FF_ALLOC_OR_GOTO(avctx, buf, 2 * n * 2, error); + n *= 2; + if (avctx->channels == 1) { + adpcm_compress_trellis(avctx, samples, buf, &c->status[0], n); + for (i = 0; i < n; i += 2) + *dst++ = buf[i] | (buf[i + 1] << 4); + } else { + adpcm_compress_trellis(avctx, samples, buf, &c->status[0], n); + adpcm_compress_trellis(avctx, samples + 1, buf + n, &c->status[1], n); + for (i = 0; i < n; i++) + *dst++ = buf[i] | (buf[n + i] << 4); + } + av_free(buf); + } else + for (n *= avctx->channels; n > 0; n--) { + int nibble; + nibble = adpcm_yamaha_compress_sample(&c->status[ 0], *samples++); + nibble |= adpcm_yamaha_compress_sample(&c->status[st], *samples++) << 4; + *dst++ = nibble; + } + break; + default: + error: + return -1; + } + return dst - frame; +} + + +#define ADPCM_ENCODER(id_, name_, long_name_) \ +AVCodec ff_ ## name_ ## _encoder = { \ + .name = #name_, \ + .type = AVMEDIA_TYPE_AUDIO, \ + .id = id_, \ + .priv_data_size = sizeof(ADPCMEncodeContext), \ + .init = adpcm_encode_init, \ + .encode = adpcm_encode_frame, \ + .close = adpcm_encode_close, \ + .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, \ + AV_SAMPLE_FMT_NONE}, \ + .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ +} + +ADPCM_ENCODER(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime"); +ADPCM_ENCODER(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV"); +ADPCM_ENCODER(CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft"); +ADPCM_ENCODER(CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash"); +ADPCM_ENCODER(CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha"); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adpcm.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adpcm.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adpcm.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adpcm.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2001-2003 The ffmpeg Project + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * ADPCM encoder/decoder common header. + */ + +#ifndef AVCODEC_ADPCM_H +#define AVCODEC_ADPCM_H + +#define BLKSIZE 1024 + +typedef struct ADPCMChannelStatus { + int predictor; + short int step_index; + int step; + /* for encoding */ + int prev_sample; + + /* MS version */ + short sample1; + short sample2; + int coeff1; + int coeff2; + int idelta; +} ADPCMChannelStatus; + +#endif /* AVCODEC_ADPCM_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adx.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adx.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2011 Justin Ruggles + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/intreadwrite.h" +#include "libavutil/mathematics.h" +#include "adx.h" + +void ff_adx_calculate_coeffs(int cutoff, int sample_rate, int bits, int *coeff) +{ + double a, b, c; + + a = M_SQRT2 - cos(2.0 * M_PI * cutoff / sample_rate); + b = M_SQRT2 - 1.0; + c = (a - sqrt((a + b) * (a - b))) / b; + + coeff[0] = lrintf(c * 2.0 * (1 << bits)); + coeff[1] = lrintf(-(c * c) * (1 << bits)); +} + +int avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf, + int bufsize, int *header_size, int *coeff) +{ + int offset, cutoff; + + if (bufsize < 24) + return AVERROR_INVALIDDATA; + + if (AV_RB16(buf) != 0x8000) + return AVERROR_INVALIDDATA; + offset = AV_RB16(buf + 2) + 4; + + /* if copyright string is within the provided data, validate it */ + if (bufsize >= offset && memcmp(buf + offset - 6, "(c)CRI", 6)) + return AVERROR_INVALIDDATA; + + /* check for encoding=3 block_size=18, sample_size=4 */ + if (buf[4] != 3 || buf[5] != 18 || buf[6] != 4) { + av_log_ask_for_sample(avctx, "unsupported ADX format\n"); + return AVERROR_PATCHWELCOME; + } + + /* channels */ + avctx->channels = buf[7]; + if (avctx->channels <= 0 || avctx->channels > 2) + return AVERROR_INVALIDDATA; + + /* sample rate */ + avctx->sample_rate = AV_RB32(buf + 8); + if (avctx->sample_rate < 1 || + avctx->sample_rate > INT_MAX / (avctx->channels * BLOCK_SIZE * 8)) + return AVERROR_INVALIDDATA; + + /* bit rate */ + avctx->bit_rate = avctx->sample_rate * avctx->channels * BLOCK_SIZE * 8 / BLOCK_SAMPLES; + + /* LPC coefficients */ + if (coeff) { + cutoff = AV_RB16(buf + 16); + ff_adx_calculate_coeffs(cutoff, avctx->sample_rate, COEFF_BITS, coeff); + } + + *header_size = offset; + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adxdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adxdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adxdec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adxdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,7 @@ #include "libavutil/intreadwrite.h" #include "avcodec.h" #include "adx.h" +#include "get_bits.h" /** * @file @@ -34,147 +35,151 @@ static av_cold int adx_decode_init(AVCodecContext *avctx) { + ADXContext *c = avctx->priv_data; + int ret, header_size; + + if (avctx->extradata_size >= 24) { + if ((ret = avpriv_adx_decode_header(avctx, avctx->extradata, + avctx->extradata_size, &header_size, + c->coeff)) < 0) { + av_log(avctx, AV_LOG_ERROR, "error parsing ADX header\n"); + return AVERROR_INVALIDDATA; + } + c->channels = avctx->channels; + c->header_parsed = 1; + } + avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + avcodec_get_frame_defaults(&c->frame); + avctx->coded_frame = &c->frame; + return 0; } -/* 18 bytes <-> 32 samples */ - -static void adx_decode(short *out,const unsigned char *in,PREV *prev) +/** + * Decode 32 samples from 18 bytes. + * + * A 16-bit scalar value is applied to 32 residuals, which then have a + * 2nd-order LPC filter applied to it to form the output signal for a single + * channel. + */ +static int adx_decode(ADXContext *c, int16_t *out, const uint8_t *in, int ch) { + ADXChannelState *prev = &c->prev[ch]; + GetBitContext gb; int scale = AV_RB16(in); int i; - int s0,s1,s2,d; + int s0, s1, s2, d; -// printf("%x ",scale); + /* check if this is an EOF packet */ + if (scale & 0x8000) + return -1; - in+=2; + init_get_bits(&gb, in + 2, (BLOCK_SIZE - 2) * 8); s1 = prev->s1; s2 = prev->s2; - for(i=0;i<16;i++) { - d = in[i]; - // d>>=4; if (d&8) d-=16; - d = ((signed char)d >> 4); - s0 = (BASEVOL*d*scale + SCALE1*s1 - SCALE2*s2)>>14; + for (i = 0; i < BLOCK_SAMPLES; i++) { + d = get_sbits(&gb, 4); + s0 = ((d << COEFF_BITS) * scale + c->coeff[0] * s1 + c->coeff[1] * s2) >> COEFF_BITS; s2 = s1; s1 = av_clip_int16(s0); - *out++=s1; - - d = in[i]; - //d&=15; if (d&8) d-=16; - d = ((signed char)(d<<4) >> 4); - s0 = (BASEVOL*d*scale + SCALE1*s1 - SCALE2*s2)>>14; - s2 = s1; - s1 = av_clip_int16(s0); - *out++=s1; + *out = s1; + out += c->channels; } prev->s1 = s1; prev->s2 = s2; + return 0; } -static void adx_decode_stereo(short *out,const unsigned char *in,PREV *prev) +static int adx_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { - short tmp[32*2]; - int i; - - adx_decode(tmp ,in ,prev); - adx_decode(tmp+32,in+18,prev+1); - for(i=0;i<32;i++) { - out[i*2] = tmp[i]; - out[i*2+1] = tmp[i+32]; + int buf_size = avpkt->size; + ADXContext *c = avctx->priv_data; + int16_t *samples; + const uint8_t *buf = avpkt->data; + int num_blocks, ch, ret; + + if (c->eof) { + *got_frame_ptr = 0; + return buf_size; + } + + if (!c->header_parsed && buf_size >= 2 && AV_RB16(buf) == 0x8000) { + int header_size; + if ((ret = avpriv_adx_decode_header(avctx, buf, buf_size, &header_size, + c->coeff)) < 0) { + av_log(avctx, AV_LOG_ERROR, "error parsing ADX header\n"); + return AVERROR_INVALIDDATA; + } + c->channels = avctx->channels; + c->header_parsed = 1; + if (buf_size < header_size) + return AVERROR_INVALIDDATA; + buf += header_size; + buf_size -= header_size; + } + if (!c->header_parsed) + return AVERROR_INVALIDDATA; + + /* calculate number of blocks in the packet */ + num_blocks = buf_size / (BLOCK_SIZE * c->channels); + + /* if the packet is not an even multiple of BLOCK_SIZE, check for an EOF + packet */ + if (!num_blocks || buf_size % (BLOCK_SIZE * avctx->channels)) { + if (buf_size >= 4 && (AV_RB16(buf) & 0x8000)) { + c->eof = 1; + *got_frame_ptr = 0; + return avpkt->size; + } + return AVERROR_INVALIDDATA; } -} -/* return data offset or 0 */ -static int adx_decode_header(AVCodecContext *avctx,const unsigned char *buf,size_t bufsize) -{ - int offset; - - if (buf[0]!=0x80) return 0; - offset = (AV_RB32(buf)^0x80000000)+4; - if (bufsizeframe.nb_samples = num_blocks * BLOCK_SAMPLES; + if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (int16_t *)c->frame.data[0]; + + while (num_blocks--) { + for (ch = 0; ch < c->channels; ch++) { + if (adx_decode(c, samples + ch, buf, ch)) { + c->eof = 1; + buf = avpkt->data + avpkt->size; + break; + } + buf_size -= BLOCK_SIZE; + buf += BLOCK_SIZE; + } + samples += BLOCK_SAMPLES * c->channels; + } - avctx->channels = buf[7]; - avctx->sample_rate = AV_RB32(buf+8); - avctx->bit_rate = avctx->sample_rate*avctx->channels*18*8/32; + *got_frame_ptr = 1; + *(AVFrame *)data = c->frame; - return offset; + return buf - avpkt->data; } -static int adx_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static void adx_decode_flush(AVCodecContext *avctx) { - const uint8_t *buf0 = avpkt->data; - int buf_size = avpkt->size; ADXContext *c = avctx->priv_data; - short *samples = data; - const uint8_t *buf = buf0; - int rest = buf_size; - - if (!c->header_parsed) { - int hdrsize = adx_decode_header(avctx,buf,rest); - if (hdrsize==0) return -1; - c->header_parsed = 1; - buf += hdrsize; - rest -= hdrsize; - } - - /* 18 bytes of data are expanded into 32*2 bytes of audio, - so guard against buffer overflows */ - if(rest/18 > *data_size/64) - rest = (*data_size/64) * 18; - - if (c->in_temp) { - int copysize = 18*avctx->channels - c->in_temp; - memcpy(c->dec_temp+c->in_temp,buf,copysize); - rest -= copysize; - buf += copysize; - if (avctx->channels==1) { - adx_decode(samples,c->dec_temp,c->prev); - samples += 32; - } else { - adx_decode_stereo(samples,c->dec_temp,c->prev); - samples += 32*2; - } - } - // - if (avctx->channels==1) { - while(rest>=18) { - adx_decode(samples,buf,c->prev); - rest-=18; - buf+=18; - samples+=32; - } - } else { - while(rest>=18*2) { - adx_decode_stereo(samples,buf,c->prev); - rest-=18*2; - buf+=18*2; - samples+=32*2; - } - } - // - c->in_temp = rest; - if (rest) { - memcpy(c->dec_temp,buf,rest); - buf+=rest; - } - *data_size = (uint8_t*)samples - (uint8_t*)data; -// printf("%d:%d ",buf-buf0,*data_size); fflush(stdout); - return buf-buf0; + memset(c->prev, 0, sizeof(c->prev)); + c->eof = 0; } AVCodec ff_adpcm_adx_decoder = { - "adpcm_adx", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_ADPCM_ADX, - sizeof(ADXContext), - adx_decode_init, - NULL, - NULL, - adx_decode_frame, - .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"), + .name = "adpcm_adx", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_ADPCM_ADX, + .priv_data_size = sizeof(ADXContext), + .init = adx_decode_init, + .decode = adx_decode_frame, + .flush = adx_decode_flush, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"), }; - diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adxenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adxenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adxenc.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adxenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,9 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavutil/intreadwrite.h" #include "avcodec.h" #include "adx.h" +#include "bytestream.h" +#include "put_bits.h" /** * @file @@ -32,98 +33,97 @@ * adx2wav & wav2adx http://www.geocities.co.jp/Playtown/2004/ */ -/* 18 bytes <-> 32 samples */ - -static void adx_encode(unsigned char *adx,const short *wav,PREV *prev) +static void adx_encode(ADXContext *c, uint8_t *adx, const int16_t *wav, + ADXChannelState *prev, int channels) { + PutBitContext pb; int scale; - int i; - int s0,s1,s2,d; - int max=0; - int min=0; - int data[32]; + int i, j; + int s0, s1, s2, d; + int max = 0; + int min = 0; + int data[BLOCK_SAMPLES]; s1 = prev->s1; s2 = prev->s2; - for(i=0;i<32;i++) { + for (i = 0, j = 0; j < 32; i += channels, j++) { s0 = wav[i]; - d = ((s0<<14) - SCALE1*s1 + SCALE2*s2)/BASEVOL; - data[i]=d; - if (maxd) min=d; + d = ((s0 << COEFF_BITS) - c->coeff[0] * s1 - c->coeff[1] * s2) >> COEFF_BITS; + data[j] = d; + if (max < d) + max = d; + if (min > d) + min = d; s2 = s1; s1 = s0; } prev->s1 = s1; prev->s2 = s2; - /* -8..+7 */ - - if (max==0 && min==0) { - memset(adx,0,18); + if (max == 0 && min == 0) { + memset(adx, 0, BLOCK_SIZE); return; } - if (max/7>-min/8) scale = max/7; - else scale = -min/8; + if (max / 7 > -min / 8) + scale = max / 7; + else + scale = -min / 8; - if (scale==0) scale=1; + if (scale == 0) + scale = 1; AV_WB16(adx, scale); - for(i=0;i<16;i++) { - adx[i+2] = ((data[i*2]/scale)<<4) | ((data[i*2+1]/scale)&0xf); - } + init_put_bits(&pb, adx + 2, 16); + for (i = 0; i < BLOCK_SAMPLES; i++) + put_sbits(&pb, 4, av_clip(data[i] / scale, -8, 7)); + flush_put_bits(&pb); } -static int adx_encode_header(AVCodecContext *avctx,unsigned char *buf,size_t bufsize) +#define HEADER_SIZE 36 + +static int adx_encode_header(AVCodecContext *avctx, uint8_t *buf, int bufsize) { -#if 0 - struct { - uint32_t offset; /* 0x80000000 + sample start - 4 */ - unsigned char unknown1[3]; /* 03 12 04 */ - unsigned char channel; /* 1 or 2 */ - uint32_t freq; - uint32_t size; - uint32_t unknown2; /* 01 f4 03 00 */ - uint32_t unknown3; /* 00 00 00 00 */ - uint32_t unknown4; /* 00 00 00 00 */ - - /* if loop - unknown3 00 15 00 01 - unknown4 00 00 00 01 - long loop_start_sample; - long loop_start_byte; - long loop_end_sample; - long loop_end_byte; - long - */ - } adxhdr; /* big endian */ - /* offset-6 "(c)CRI" */ -#endif - AV_WB32(buf+0x00,0x80000000|0x20); - AV_WB32(buf+0x04,0x03120400|avctx->channels); - AV_WB32(buf+0x08,avctx->sample_rate); - AV_WB32(buf+0x0c,0); /* FIXME: set after */ - AV_WB32(buf+0x10,0x01040300); - AV_WB32(buf+0x14,0x00000000); - AV_WB32(buf+0x18,0x00000000); - memcpy(buf+0x1c,"\0\0(c)CRI",8); - return 0x20+4; + ADXContext *c = avctx->priv_data; + + if (bufsize < HEADER_SIZE) + return AVERROR(EINVAL); + + bytestream_put_be16(&buf, 0x8000); /* header signature */ + bytestream_put_be16(&buf, HEADER_SIZE - 4); /* copyright offset */ + bytestream_put_byte(&buf, 3); /* encoding */ + bytestream_put_byte(&buf, BLOCK_SIZE); /* block size */ + bytestream_put_byte(&buf, 4); /* sample size */ + bytestream_put_byte(&buf, avctx->channels); /* channels */ + bytestream_put_be32(&buf, avctx->sample_rate); /* sample rate */ + bytestream_put_be32(&buf, 0); /* total sample count */ + bytestream_put_be16(&buf, c->cutoff); /* cutoff frequency */ + bytestream_put_byte(&buf, 3); /* version */ + bytestream_put_byte(&buf, 0); /* flags */ + bytestream_put_be32(&buf, 0); /* unknown */ + bytestream_put_be32(&buf, 0); /* loop enabled */ + bytestream_put_be16(&buf, 0); /* padding */ + bytestream_put_buffer(&buf, "(c)CRI", 6); /* copyright signature */ + + return HEADER_SIZE; } static av_cold int adx_encode_init(AVCodecContext *avctx) { - if (avctx->channels > 2) - return -1; /* only stereo or mono =) */ - avctx->frame_size = 32; + ADXContext *c = avctx->priv_data; - avctx->coded_frame= avcodec_alloc_frame(); - avctx->coded_frame->key_frame= 1; + if (avctx->channels > 2) { + av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n"); + return AVERROR(EINVAL); + } + avctx->frame_size = BLOCK_SAMPLES; -// avctx->bit_rate = avctx->sample_rate*avctx->channels*18*8/32; + avctx->coded_frame = avcodec_alloc_frame(); - av_log(avctx, AV_LOG_DEBUG, "adx encode init\n"); + /* the cutoff can be adjusted, but this seems to work pretty well */ + c->cutoff = 500; + ff_adx_calculate_coeffs(c->cutoff, avctx->sample_rate, COEFF_BITS, c->coeff); return 0; } @@ -131,67 +131,48 @@ static av_cold int adx_encode_close(AVCodecContext *avctx) { av_freep(&avctx->coded_frame); - return 0; } -static int adx_encode_frame(AVCodecContext *avctx, - uint8_t *frame, int buf_size, void *data) +static int adx_encode_frame(AVCodecContext *avctx, uint8_t *frame, + int buf_size, void *data) { - ADXContext *c = avctx->priv_data; - const short *samples = data; - unsigned char *dst = frame; - int rest = avctx->frame_size; - -/* - input data size = - ffmpeg.c: do_audio_out() - frame_bytes = enc->frame_size * 2 * enc->channels; -*/ + ADXContext *c = avctx->priv_data; + const int16_t *samples = data; + uint8_t *dst = frame; + int ch; -// printf("sz=%d ",buf_size); fflush(stdout); if (!c->header_parsed) { - int hdrsize = adx_encode_header(avctx,dst,buf_size); - dst+=hdrsize; + int hdrsize; + if ((hdrsize = adx_encode_header(avctx, dst, buf_size)) < 0) { + av_log(avctx, AV_LOG_ERROR, "output buffer is too small\n"); + return AVERROR(EINVAL); + } + dst += hdrsize; + buf_size -= hdrsize; c->header_parsed = 1; } + if (buf_size < BLOCK_SIZE * avctx->channels) { + av_log(avctx, AV_LOG_ERROR, "output buffer is too small\n"); + return AVERROR(EINVAL); + } - if (avctx->channels==1) { - while(rest>=32) { - adx_encode(dst,samples,c->prev); - dst+=18; - samples+=32; - rest-=32; - } - } else { - while(rest>=32*2) { - short tmpbuf[32*2]; - int i; - - for(i=0;i<32;i++) { - tmpbuf[i] = samples[i*2]; - tmpbuf[i+32] = samples[i*2+1]; - } - - adx_encode(dst,tmpbuf,c->prev); - adx_encode(dst+18,tmpbuf+32,c->prev+1); - dst+=18*2; - samples+=32*2; - rest-=32*2; - } + for (ch = 0; ch < avctx->channels; ch++) { + adx_encode(c, dst, samples + ch, &c->prev[ch], avctx->channels); + dst += BLOCK_SIZE; } - return dst-frame; + return dst - frame; } AVCodec ff_adpcm_adx_encoder = { - "adpcm_adx", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_ADPCM_ADX, - sizeof(ADXContext), - adx_encode_init, - adx_encode_frame, - adx_encode_close, - NULL, - .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, - .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"), + .name = "adpcm_adx", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_ADPCM_ADX, + .priv_data_size = sizeof(ADXContext), + .init = adx_encode_init, + .encode = adx_encode_frame, + .close = adx_encode_close, + .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_NONE }, + .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adx.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adx.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adx.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adx.h 2012-01-11 00:34:30.000000000 +0000 @@ -31,19 +31,51 @@ #ifndef AVCODEC_ADX_H #define AVCODEC_ADX_H +#include + +#include "avcodec.h" + typedef struct { int s1,s2; -} PREV; +} ADXChannelState; typedef struct { - PREV prev[2]; + AVFrame frame; + int channels; + ADXChannelState prev[2]; int header_parsed; - unsigned char dec_temp[18*2]; - int in_temp; + int eof; + int cutoff; + int coeff[2]; } ADXContext; -#define BASEVOL 0x4000 -#define SCALE1 0x7298 -#define SCALE2 0x3350 +#define COEFF_BITS 12 + +#define BLOCK_SIZE 18 +#define BLOCK_SAMPLES 32 + +/** + * Calculate LPC coefficients based on cutoff frequency and sample rate. + * + * @param cutoff cutoff frequency + * @param sample_rate sample rate + * @param bits number of bits used to quantize coefficients + * @param[out] coeff 2 quantized LPC coefficients + */ +void ff_adx_calculate_coeffs(int cutoff, int sample_rate, int bits, int *coeff); + +/** + * Decode ADX stream header. + * Sets avctx->channels and avctx->sample_rate. + * + * @param avctx codec context + * @param buf header data + * @param bufsize data size, should be at least 24 bytes + * @param[out] header_size size of ADX header + * @param[out] coeff 2 LPC coefficients, can be NULL + * @return data offset or negative error code if header is invalid + */ +int avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf, + int bufsize, int *header_size, int *coeff); #endif /* AVCODEC_ADX_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adx_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adx_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/adx_parser.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/adx_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2011 Justin Ruggles + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * ADX audio parser + * + * Splits packets into individual blocks. + */ + +#include "libavutil/intreadwrite.h" +#include "parser.h" +#include "adx.h" + +typedef struct ADXParseContext { + ParseContext pc; + int header_size; + int block_size; + int remaining; +} ADXParseContext; + +static int adx_parse(AVCodecParserContext *s1, + AVCodecContext *avctx, + const uint8_t **poutbuf, int *poutbuf_size, + const uint8_t *buf, int buf_size) +{ + ADXParseContext *s = s1->priv_data; + ParseContext *pc = &s->pc; + int next = END_NOT_FOUND; + int i; + uint64_t state = pc->state64; + + if (!s->header_size) { + for (i = 0; i < buf_size; i++) { + state = (state << 8) | buf[i]; + /* check for fixed fields in ADX header for possible match */ + if ((state & 0xFFFF0000FFFFFF00) == 0x8000000003120400ULL) { + int channels = state & 0xFF; + int header_size = ((state >> 32) & 0xFFFF) + 4; + if (channels > 0 && header_size >= 8) { + s->header_size = header_size; + s->block_size = BLOCK_SIZE * channels; + s->remaining = i - 7 + s->header_size + s->block_size; + break; + } + } + } + pc->state64 = state; + } + + if (s->header_size) { + if (!s->remaining) + s->remaining = s->block_size; + if (s->remaining <= buf_size) { + next = s->remaining; + s->remaining = 0; + } else + s->remaining -= buf_size; + } + + if (ff_combine_frame(pc, next, &buf, &buf_size) < 0 || !buf_size) { + *poutbuf = NULL; + *poutbuf_size = 0; + return buf_size; + } + *poutbuf = buf; + *poutbuf_size = buf_size; + return next; +} + +AVCodecParser ff_adx_parser = { + .codec_ids = { CODEC_ID_ADPCM_ADX }, + .priv_data_size = sizeof(ADXParseContext), + .parser_parse = adx_parse, + .parser_close = ff_parse_close, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/alac.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/alac.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/alac.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/alac.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,31 +23,25 @@ * @file * ALAC (Apple Lossless Audio Codec) decoder * @author 2005 David Hammerton + * @see http://crazney.net/programs/itunes/alac.html * - * For more information on the ALAC format, visit: - * http://crazney.net/programs/itunes/alac.html - * - * Note: This decoder expects a 36- (0x24-)byte QuickTime atom to be + * Note: This decoder expects a 36-byte QuickTime atom to be * passed through the extradata[_size] fields. This atom is tacked onto * the end of an 'alac' stsd atom and has the following format: - * bytes 0-3 atom size (0x24), big-endian - * bytes 4-7 atom type ('alac', not the 'alac' tag from start of stsd) - * bytes 8-35 data bytes needed by decoder * - * Extradata: - * 32bit size - * 32bit tag (=alac) - * 32bit zero? - * 32bit max sample per frame - * 8bit ?? (zero?) + * 32bit atom size + * 32bit tag ("alac") + * 32bit tag version (0) + * 32bit samples per frame (used when not set explicitly in the frames) + * 8bit compatible version (0) * 8bit sample size - * 8bit history mult - * 8bit initial history - * 8bit kmodifier - * 8bit channels? - * 16bit ?? - * 32bit max coded frame size - * 32bit bitrate? + * 8bit history mult (40) + * 8bit initial history (14) + * 8bit kmodifier (10) + * 8bit channels + * 16bit maxRun (255) + * 32bit max coded frame size (0 means unknown) + * 32bit average bitrate (0 means unknown) * 32bit samplerate */ @@ -64,17 +58,17 @@ typedef struct { AVCodecContext *avctx; + AVFrame frame; GetBitContext gb; int numchannels; - int bytespersample; /* buffers */ int32_t *predicterror_buffer[MAX_CHANNELS]; int32_t *outputsamples_buffer[MAX_CHANNELS]; - int32_t *wasted_bits_buffer[MAX_CHANNELS]; + int32_t *extra_bits_buffer[MAX_CHANNELS]; /* stuff from setinfo */ uint32_t setinfo_max_samples_per_frame; /* 0x1000 = 4096 */ /* max samples per frame? */ @@ -84,58 +78,9 @@ uint8_t setinfo_rice_kmodifier; /* 0x0e */ /* end setinfo stuff */ - int wasted_bits; + int extra_bits; /**< number of extra bits beyond 16-bit */ } ALACContext; -static void allocate_buffers(ALACContext *alac) -{ - int chan; - for (chan = 0; chan < MAX_CHANNELS; chan++) { - alac->predicterror_buffer[chan] = - av_malloc(alac->setinfo_max_samples_per_frame * 4); - - alac->outputsamples_buffer[chan] = - av_malloc(alac->setinfo_max_samples_per_frame * 4); - - alac->wasted_bits_buffer[chan] = av_malloc(alac->setinfo_max_samples_per_frame * 4); - } -} - -static int alac_set_info(ALACContext *alac) -{ - const unsigned char *ptr = alac->avctx->extradata; - - ptr += 4; /* size */ - ptr += 4; /* alac */ - ptr += 4; /* 0 ? */ - - if(AV_RB32(ptr) >= UINT_MAX/4){ - av_log(alac->avctx, AV_LOG_ERROR, "setinfo_max_samples_per_frame too large\n"); - return -1; - } - - /* buffer size / 2 ? */ - alac->setinfo_max_samples_per_frame = bytestream_get_be32(&ptr); - ptr++; /* ??? */ - alac->setinfo_sample_size = *ptr++; - if (alac->setinfo_sample_size > 32) { - av_log(alac->avctx, AV_LOG_ERROR, "setinfo_sample_size too large\n"); - return -1; - } - alac->setinfo_rice_historymult = *ptr++; - alac->setinfo_rice_initialhistory = *ptr++; - alac->setinfo_rice_kmodifier = *ptr++; - ptr++; /* channels? */ - bytestream_get_be16(&ptr); /* ??? */ - bytestream_get_be32(&ptr); /* max coded frame size */ - bytestream_get_be32(&ptr); /* bitrate ? */ - bytestream_get_be32(&ptr); /* samplerate */ - - allocate_buffers(alac); - - return 0; -} - static inline int decode_scalar(GetBitContext *gb, int k, int limit, int readsamplesize){ /* read x - number of 1s before 0 represent the rice */ int x = get_unary_0_9(gb); @@ -286,20 +231,9 @@ buffer_out[i+1] = val; } -#if 0 /* 4 and 8 are very common cases (the only ones i've seen). these * should be unrolled and optimized */ - if (predictor_coef_num == 4) { - /* FIXME: optimized general case */ - return; - } - - if (predictor_coef_table == 8) { - /* FIXME: optimized general case */ - return; - } -#endif /* general case */ if (predictor_coef_num > 0) { @@ -360,99 +294,61 @@ } } -static void reconstruct_stereo_16(int32_t *buffer[MAX_CHANNELS], - int16_t *buffer_out, - int numchannels, int numsamples, - uint8_t interlacing_shift, - uint8_t interlacing_leftweight) +static void decorrelate_stereo(int32_t *buffer[MAX_CHANNELS], + int numsamples, uint8_t interlacing_shift, + uint8_t interlacing_leftweight) { int i; - if (numsamples <= 0) - return; - - /* weighted interlacing */ - if (interlacing_leftweight) { - for (i = 0; i < numsamples; i++) { - int32_t a, b; - a = buffer[0][i]; - b = buffer[1][i]; + for (i = 0; i < numsamples; i++) { + int32_t a, b; - a -= (b * interlacing_leftweight) >> interlacing_shift; - b += a; + a = buffer[0][i]; + b = buffer[1][i]; - buffer_out[i*numchannels] = b; - buffer_out[i*numchannels + 1] = a; - } + a -= (b * interlacing_leftweight) >> interlacing_shift; + b += a; - return; + buffer[0][i] = b; + buffer[1][i] = a; } +} - /* otherwise basic interlacing took place */ - for (i = 0; i < numsamples; i++) { - int16_t left, right; - - left = buffer[0][i]; - right = buffer[1][i]; +static void append_extra_bits(int32_t *buffer[MAX_CHANNELS], + int32_t *extra_bits_buffer[MAX_CHANNELS], + int extra_bits, int numchannels, int numsamples) +{ + int i, ch; - buffer_out[i*numchannels] = left; - buffer_out[i*numchannels + 1] = right; - } + for (ch = 0; ch < numchannels; ch++) + for (i = 0; i < numsamples; i++) + buffer[ch][i] = (buffer[ch][i] << extra_bits) | extra_bits_buffer[ch][i]; } -static void decorrelate_stereo_24(int32_t *buffer[MAX_CHANNELS], - int32_t *buffer_out, - int32_t *wasted_bits_buffer[MAX_CHANNELS], - int wasted_bits, - int numchannels, int numsamples, - uint8_t interlacing_shift, - uint8_t interlacing_leftweight) +static void interleave_stereo_16(int32_t *buffer[MAX_CHANNELS], + int16_t *buffer_out, int numsamples) { int i; - if (numsamples <= 0) - return; - - /* weighted interlacing */ - if (interlacing_leftweight) { - for (i = 0; i < numsamples; i++) { - int32_t a, b; - - a = buffer[0][i]; - b = buffer[1][i]; - - a -= (b * interlacing_leftweight) >> interlacing_shift; - b += a; - - if (wasted_bits) { - b = (b << wasted_bits) | wasted_bits_buffer[0][i]; - a = (a << wasted_bits) | wasted_bits_buffer[1][i]; - } - - buffer_out[i * numchannels] = b << 8; - buffer_out[i * numchannels + 1] = a << 8; - } - } else { - for (i = 0; i < numsamples; i++) { - int32_t left, right; - - left = buffer[0][i]; - right = buffer[1][i]; + for (i = 0; i < numsamples; i++) { + *buffer_out++ = buffer[0][i]; + *buffer_out++ = buffer[1][i]; + } +} - if (wasted_bits) { - left = (left << wasted_bits) | wasted_bits_buffer[0][i]; - right = (right << wasted_bits) | wasted_bits_buffer[1][i]; - } +static void interleave_stereo_24(int32_t *buffer[MAX_CHANNELS], + int32_t *buffer_out, int numsamples) +{ + int i; - buffer_out[i * numchannels] = left << 8; - buffer_out[i * numchannels + 1] = right << 8; - } + for (i = 0; i < numsamples; i++) { + *buffer_out++ = buffer[0][i] << 8; + *buffer_out++ = buffer[1][i] << 8; } } -static int alac_decode_frame(AVCodecContext *avctx, - void *outbuffer, int *outputsize, - AVPacket *avpkt) +static int alac_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *inbuffer = avpkt->data; int input_buffer_size = avpkt->size; @@ -465,18 +361,14 @@ int isnotcompressed; uint8_t interlacing_shift; uint8_t interlacing_leftweight; - - /* short-circuit null buffers */ - if (!inbuffer || !input_buffer_size) - return -1; + int i, ch, ret; init_get_bits(&alac->gb, inbuffer, input_buffer_size * 8); channels = get_bits(&alac->gb, 3) + 1; - if (channels > MAX_CHANNELS) { - av_log(avctx, AV_LOG_ERROR, "channels > %d not supported\n", - MAX_CHANNELS); - return -1; + if (channels != avctx->channels) { + av_log(avctx, AV_LOG_ERROR, "frame header channel count mismatch\n"); + return AVERROR_INVALIDDATA; } /* 2^result = something to do with output waiting. @@ -489,7 +381,7 @@ /* the output sample size is stored soon */ hassize = get_bits1(&alac->gb); - alac->wasted_bits = get_bits(&alac->gb, 2) << 3; + alac->extra_bits = get_bits(&alac->gb, 2) << 3; /* whether the frame is compressed */ isnotcompressed = get_bits1(&alac->gb); @@ -504,25 +396,18 @@ } else outputsamples = alac->setinfo_max_samples_per_frame; - switch (alac->setinfo_sample_size) { - case 16: avctx->sample_fmt = AV_SAMPLE_FMT_S16; - alac->bytespersample = channels << 1; - break; - case 24: avctx->sample_fmt = AV_SAMPLE_FMT_S32; - alac->bytespersample = channels << 2; - break; - default: av_log(avctx, AV_LOG_ERROR, "Sample depth %d is not supported.\n", - alac->setinfo_sample_size); - return -1; - } - - if(outputsamples > *outputsize / alac->bytespersample){ - av_log(avctx, AV_LOG_ERROR, "sample buffer too small\n"); - return -1; + /* get output buffer */ + if (outputsamples > INT32_MAX) { + av_log(avctx, AV_LOG_ERROR, "unsupported block size: %u\n", outputsamples); + return AVERROR_INVALIDDATA; + } + alac->frame.nb_samples = outputsamples; + if ((ret = avctx->get_buffer(avctx, &alac->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; } - *outputsize = outputsamples * alac->bytespersample; - readsamplesize = alac->setinfo_sample_size - (alac->wasted_bits) + channels - 1; + readsamplesize = alac->setinfo_sample_size - alac->extra_bits + channels - 1; if (readsamplesize > MIN_CACHE_BITS) { av_log(avctx, AV_LOG_ERROR, "readsamplesize too big (%d)\n", readsamplesize); return -1; @@ -535,118 +420,107 @@ int prediction_type[MAX_CHANNELS]; int prediction_quantitization[MAX_CHANNELS]; int ricemodifier[MAX_CHANNELS]; - int i, chan; interlacing_shift = get_bits(&alac->gb, 8); interlacing_leftweight = get_bits(&alac->gb, 8); - for (chan = 0; chan < channels; chan++) { - prediction_type[chan] = get_bits(&alac->gb, 4); - prediction_quantitization[chan] = get_bits(&alac->gb, 4); + for (ch = 0; ch < channels; ch++) { + prediction_type[ch] = get_bits(&alac->gb, 4); + prediction_quantitization[ch] = get_bits(&alac->gb, 4); - ricemodifier[chan] = get_bits(&alac->gb, 3); - predictor_coef_num[chan] = get_bits(&alac->gb, 5); + ricemodifier[ch] = get_bits(&alac->gb, 3); + predictor_coef_num[ch] = get_bits(&alac->gb, 5); /* read the predictor table */ - for (i = 0; i < predictor_coef_num[chan]; i++) - predictor_coef_table[chan][i] = (int16_t)get_bits(&alac->gb, 16); + for (i = 0; i < predictor_coef_num[ch]; i++) + predictor_coef_table[ch][i] = (int16_t)get_bits(&alac->gb, 16); } - if (alac->wasted_bits) { - int i, ch; + if (alac->extra_bits) { for (i = 0; i < outputsamples; i++) { for (ch = 0; ch < channels; ch++) - alac->wasted_bits_buffer[ch][i] = get_bits(&alac->gb, alac->wasted_bits); + alac->extra_bits_buffer[ch][i] = get_bits(&alac->gb, alac->extra_bits); } } - for (chan = 0; chan < channels; chan++) { + for (ch = 0; ch < channels; ch++) { bastardized_rice_decompress(alac, - alac->predicterror_buffer[chan], + alac->predicterror_buffer[ch], outputsamples, readsamplesize, alac->setinfo_rice_initialhistory, alac->setinfo_rice_kmodifier, - ricemodifier[chan] * alac->setinfo_rice_historymult / 4, + ricemodifier[ch] * alac->setinfo_rice_historymult / 4, (1 << alac->setinfo_rice_kmodifier) - 1); - if (prediction_type[chan] == 0) { - /* adaptive fir */ - predictor_decompress_fir_adapt(alac->predicterror_buffer[chan], - alac->outputsamples_buffer[chan], - outputsamples, - readsamplesize, - predictor_coef_table[chan], - predictor_coef_num[chan], - prediction_quantitization[chan]); - } else { - av_log(avctx, AV_LOG_ERROR, "FIXME: unhandled prediction type: %i\n", prediction_type[chan]); - /* I think the only other prediction type (or perhaps this is - * just a boolean?) runs adaptive fir twice.. like: - * predictor_decompress_fir_adapt(predictor_error, tempout, ...) - * predictor_decompress_fir_adapt(predictor_error, outputsamples ...) - * little strange.. + /* adaptive FIR filter */ + if (prediction_type[ch] == 15) { + /* Prediction type 15 runs the adaptive FIR twice. + * The first pass uses the special-case coef_num = 31, while + * the second pass uses the coefs from the bitstream. + * + * However, this prediction type is not currently used by the + * reference encoder. */ + predictor_decompress_fir_adapt(alac->predicterror_buffer[ch], + alac->predicterror_buffer[ch], + outputsamples, readsamplesize, + NULL, 31, 0); + } else if (prediction_type[ch] > 0) { + av_log(avctx, AV_LOG_WARNING, "unknown prediction type: %i\n", + prediction_type[ch]); } + predictor_decompress_fir_adapt(alac->predicterror_buffer[ch], + alac->outputsamples_buffer[ch], + outputsamples, readsamplesize, + predictor_coef_table[ch], + predictor_coef_num[ch], + prediction_quantitization[ch]); } } else { /* not compressed, easy case */ - int i, chan; - if (alac->setinfo_sample_size <= 16) { - for (i = 0; i < outputsamples; i++) - for (chan = 0; chan < channels; chan++) { - int32_t audiobits; - - audiobits = get_sbits_long(&alac->gb, alac->setinfo_sample_size); - - alac->outputsamples_buffer[chan][i] = audiobits; - } - } else { - for (i = 0; i < outputsamples; i++) { - for (chan = 0; chan < channels; chan++) { - alac->outputsamples_buffer[chan][i] = get_bits(&alac->gb, - alac->setinfo_sample_size); - alac->outputsamples_buffer[chan][i] = sign_extend(alac->outputsamples_buffer[chan][i], - alac->setinfo_sample_size); - } + for (i = 0; i < outputsamples; i++) { + for (ch = 0; ch < channels; ch++) { + alac->outputsamples_buffer[ch][i] = get_sbits_long(&alac->gb, + alac->setinfo_sample_size); } } - alac->wasted_bits = 0; + alac->extra_bits = 0; interlacing_shift = 0; interlacing_leftweight = 0; } if (get_bits(&alac->gb, 3) != 7) av_log(avctx, AV_LOG_ERROR, "Error : Wrong End Of Frame\n"); + if (channels == 2 && interlacing_leftweight) { + decorrelate_stereo(alac->outputsamples_buffer, outputsamples, + interlacing_shift, interlacing_leftweight); + } + + if (alac->extra_bits) { + append_extra_bits(alac->outputsamples_buffer, alac->extra_bits_buffer, + alac->extra_bits, alac->numchannels, outputsamples); + } + switch(alac->setinfo_sample_size) { case 16: if (channels == 2) { - reconstruct_stereo_16(alac->outputsamples_buffer, - (int16_t*)outbuffer, - alac->numchannels, - outputsamples, - interlacing_shift, - interlacing_leftweight); + interleave_stereo_16(alac->outputsamples_buffer, + (int16_t *)alac->frame.data[0], outputsamples); } else { - int i; + int16_t *outbuffer = (int16_t *)alac->frame.data[0]; for (i = 0; i < outputsamples; i++) { - ((int16_t*)outbuffer)[i] = alac->outputsamples_buffer[0][i]; + outbuffer[i] = alac->outputsamples_buffer[0][i]; } } break; case 24: if (channels == 2) { - decorrelate_stereo_24(alac->outputsamples_buffer, - outbuffer, - alac->wasted_bits_buffer, - alac->wasted_bits, - alac->numchannels, - outputsamples, - interlacing_shift, - interlacing_leftweight); + interleave_stereo_24(alac->outputsamples_buffer, + (int32_t *)alac->frame.data[0], outputsamples); } else { - int i; + int32_t *outbuffer = (int32_t *)alac->frame.data[0]; for (i = 0; i < outputsamples; i++) - ((int32_t *)outbuffer)[i] = alac->outputsamples_buffer[0][i] << 8; + outbuffer[i] = alac->outputsamples_buffer[0][i] << 8; } break; } @@ -654,14 +528,81 @@ if (input_buffer_size * 8 - get_bits_count(&alac->gb) > 8) av_log(avctx, AV_LOG_ERROR, "Error : %d bits left\n", input_buffer_size * 8 - get_bits_count(&alac->gb)); + *got_frame_ptr = 1; + *(AVFrame *)data = alac->frame; + return input_buffer_size; } +static av_cold int alac_decode_close(AVCodecContext *avctx) +{ + ALACContext *alac = avctx->priv_data; + + int ch; + for (ch = 0; ch < alac->numchannels; ch++) { + av_freep(&alac->predicterror_buffer[ch]); + av_freep(&alac->outputsamples_buffer[ch]); + av_freep(&alac->extra_bits_buffer[ch]); + } + + return 0; +} + +static int allocate_buffers(ALACContext *alac) +{ + int ch; + for (ch = 0; ch < alac->numchannels; ch++) { + int buf_size = alac->setinfo_max_samples_per_frame * sizeof(int32_t); + + FF_ALLOC_OR_GOTO(alac->avctx, alac->predicterror_buffer[ch], + buf_size, buf_alloc_fail); + + FF_ALLOC_OR_GOTO(alac->avctx, alac->outputsamples_buffer[ch], + buf_size, buf_alloc_fail); + + FF_ALLOC_OR_GOTO(alac->avctx, alac->extra_bits_buffer[ch], + buf_size, buf_alloc_fail); + } + return 0; +buf_alloc_fail: + alac_decode_close(alac->avctx); + return AVERROR(ENOMEM); +} + +static int alac_set_info(ALACContext *alac) +{ + const unsigned char *ptr = alac->avctx->extradata; + + ptr += 4; /* size */ + ptr += 4; /* alac */ + ptr += 4; /* version */ + + if(AV_RB32(ptr) >= UINT_MAX/4){ + av_log(alac->avctx, AV_LOG_ERROR, "setinfo_max_samples_per_frame too large\n"); + return -1; + } + + /* buffer size / 2 ? */ + alac->setinfo_max_samples_per_frame = bytestream_get_be32(&ptr); + ptr++; /* compatible version */ + alac->setinfo_sample_size = *ptr++; + alac->setinfo_rice_historymult = *ptr++; + alac->setinfo_rice_initialhistory = *ptr++; + alac->setinfo_rice_kmodifier = *ptr++; + alac->numchannels = *ptr++; + bytestream_get_be16(&ptr); /* maxRun */ + bytestream_get_be32(&ptr); /* max coded frame size */ + bytestream_get_be32(&ptr); /* average bitrate */ + bytestream_get_be32(&ptr); /* samplerate */ + + return 0; +} + static av_cold int alac_decode_init(AVCodecContext * avctx) { + int ret; ALACContext *alac = avctx->priv_data; alac->avctx = avctx; - alac->numchannels = alac->avctx->channels; /* initialize from the extradata */ if (alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE) { @@ -674,31 +615,50 @@ return -1; } - return 0; -} + switch (alac->setinfo_sample_size) { + case 16: avctx->sample_fmt = AV_SAMPLE_FMT_S16; + break; + case 24: avctx->sample_fmt = AV_SAMPLE_FMT_S32; + break; + default: av_log_ask_for_sample(avctx, "Sample depth %d is not supported.\n", + alac->setinfo_sample_size); + return AVERROR_PATCHWELCOME; + } -static av_cold int alac_decode_close(AVCodecContext *avctx) -{ - ALACContext *alac = avctx->priv_data; + if (alac->numchannels < 1) { + av_log(avctx, AV_LOG_WARNING, "Invalid channel count\n"); + alac->numchannels = avctx->channels; + } else { + if (alac->numchannels > MAX_CHANNELS) + alac->numchannels = avctx->channels; + else + avctx->channels = alac->numchannels; + } + if (avctx->channels > MAX_CHANNELS) { + av_log(avctx, AV_LOG_ERROR, "Unsupported channel count: %d\n", + avctx->channels); + return AVERROR_PATCHWELCOME; + } - int chan; - for (chan = 0; chan < MAX_CHANNELS; chan++) { - av_freep(&alac->predicterror_buffer[chan]); - av_freep(&alac->outputsamples_buffer[chan]); - av_freep(&alac->wasted_bits_buffer[chan]); + if ((ret = allocate_buffers(alac)) < 0) { + av_log(avctx, AV_LOG_ERROR, "Error allocating buffers\n"); + return ret; } + avcodec_get_frame_defaults(&alac->frame); + avctx->coded_frame = &alac->frame; + return 0; } AVCodec ff_alac_decoder = { - "alac", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_ALAC, - sizeof(ALACContext), - alac_decode_init, - NULL, - alac_decode_close, - alac_decode_frame, + .name = "alac", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_ALAC, + .priv_data_size = sizeof(ALACContext), + .init = alac_decode_init, + .close = alac_decode_close, + .decode = alac_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/alacenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/alacenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/alacenc.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/alacenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -75,20 +75,22 @@ } AlacEncodeContext; -static void init_sample_buffers(AlacEncodeContext *s, const int16_t *input_samples) +static void init_sample_buffers(AlacEncodeContext *s, + const int16_t *input_samples) { int ch, i; - for(ch=0;chavctx->channels;ch++) { + for (ch = 0; ch < s->avctx->channels; ch++) { const int16_t *sptr = input_samples + ch; - for(i=0;iavctx->frame_size;i++) { + for (i = 0; i < s->avctx->frame_size; i++) { s->sample_buf[ch][i] = *sptr; sptr += s->avctx->channels; } } } -static void encode_scalar(AlacEncodeContext *s, int x, int k, int write_sample_size) +static void encode_scalar(AlacEncodeContext *s, int x, + int k, int write_sample_size) { int divisor, q, r; @@ -97,17 +99,17 @@ q = x / divisor; r = x % divisor; - if(q > 8) { + if (q > 8) { // write escape code and sample value directly put_bits(&s->pbctx, 9, ALAC_ESCAPE_CODE); put_bits(&s->pbctx, write_sample_size, x); } else { - if(q) + if (q) put_bits(&s->pbctx, q, (1<pbctx, 1, 0); - if(k != 1) { - if(r > 0) + if (k != 1) { + if (r > 0) put_bits(&s->pbctx, k, r+1); else put_bits(&s->pbctx, k-1, 0); @@ -164,7 +166,7 @@ /* calculate sum of 2nd order residual for each channel */ sum[0] = sum[1] = sum[2] = sum[3] = 0; - for(i=2; i> 1); @@ -181,8 +183,8 @@ /* return mode with lowest score */ best = 0; - for(i=1; i<4; i++) { - if(score[i] < score[best]) { + for (i = 1; i < 4; i++) { + if (score[i] < score[best]) { best = i; } } @@ -205,7 +207,7 @@ break; case ALAC_CHMODE_LEFT_SIDE: - for(i=0; iinterlacing_leftweight = 1; @@ -213,7 +215,7 @@ break; case ALAC_CHMODE_RIGHT_SIDE: - for(i=0; i> 31); @@ -223,7 +225,7 @@ break; default: - for(i=0; i> 1; right[i] = tmp - right[i]; @@ -239,10 +241,10 @@ int i; AlacLPCContext lpc = s->lpc[ch]; - if(lpc.lpc_order == 31) { + if (lpc.lpc_order == 31) { s->predictor_buf[0] = s->sample_buf[ch][0]; - for(i=1; iavctx->frame_size; i++) + for (i = 1; i < s->avctx->frame_size; i++) s->predictor_buf[i] = s->sample_buf[ch][i] - s->sample_buf[ch][i-1]; return; @@ -250,17 +252,17 @@ // generalised linear predictor - if(lpc.lpc_order > 0) { + if (lpc.lpc_order > 0) { int32_t *samples = s->sample_buf[ch]; int32_t *residual = s->predictor_buf; // generate warm-up samples residual[0] = samples[0]; - for(i=1;i<=lpc.lpc_order;i++) + for (i = 1; i <= lpc.lpc_order; i++) residual[i] = samples[i] - samples[i-1]; // perform lpc on remaining samples - for(i = lpc.lpc_order + 1; i < s->avctx->frame_size; i++) { + for (i = lpc.lpc_order + 1; i < s->avctx->frame_size; i++) { int sum = 1 << (lpc.lpc_quant - 1), res_val, j; for (j = 0; j < lpc.lpc_order; j++) { @@ -303,7 +305,7 @@ int sign_modifier = 0, i, k; int32_t *samples = s->predictor_buf; - for(i=0;i < s->avctx->frame_size;) { + for (i = 0; i < s->avctx->frame_size;) { int x; k = av_log2((history >> 9) + 3); @@ -320,15 +322,15 @@ - ((history * s->rc.history_mult) >> 9); sign_modifier = 0; - if(x > 0xFFFF) + if (x > 0xFFFF) history = 0xFFFF; - if((history < 128) && (i < s->avctx->frame_size)) { + if (history < 128 && i < s->avctx->frame_size) { unsigned int block_size = 0; k = 7 - av_log2(history) + ((history + 16) >> 6); - while((*samples == 0) && (i < s->avctx->frame_size)) { + while (*samples == 0 && i < s->avctx->frame_size) { samples++; i++; block_size++; @@ -346,31 +348,40 @@ static void write_compressed_frame(AlacEncodeContext *s) { int i, j; + int prediction_type = 0; - if(s->avctx->channels == 2) + if (s->avctx->channels == 2) alac_stereo_decorrelation(s); put_bits(&s->pbctx, 8, s->interlacing_shift); put_bits(&s->pbctx, 8, s->interlacing_leftweight); - for(i=0;iavctx->channels;i++) { + for (i = 0; i < s->avctx->channels; i++) { calc_predictor_params(s, i); - put_bits(&s->pbctx, 4, 0); // prediction type : currently only type 0 has been RE'd + put_bits(&s->pbctx, 4, prediction_type); put_bits(&s->pbctx, 4, s->lpc[i].lpc_quant); put_bits(&s->pbctx, 3, s->rc.rice_modifier); put_bits(&s->pbctx, 5, s->lpc[i].lpc_order); // predictor coeff. table - for(j=0;jlpc[i].lpc_order;j++) { + for (j = 0; j < s->lpc[i].lpc_order; j++) { put_sbits(&s->pbctx, 16, s->lpc[i].lpc_coeff[j]); } } // apply lpc and entropy coding to audio samples - for(i=0;iavctx->channels;i++) { + for (i = 0; i < s->avctx->channels; i++) { alac_linear_predictor(s, i); + + // TODO: determine when this will actually help. for now it's not used. + if (prediction_type == 15) { + // 2nd pass 1st order filter + for (j = s->avctx->frame_size - 1; j > 0; j--) + s->predictor_buf[j] -= s->predictor_buf[j - 1]; + } + alac_entropy_coder(s); } } @@ -384,13 +395,21 @@ avctx->frame_size = DEFAULT_FRAME_SIZE; avctx->bits_per_coded_sample = DEFAULT_SAMPLE_SIZE; - if(avctx->sample_fmt != AV_SAMPLE_FMT_S16) { + if (avctx->sample_fmt != AV_SAMPLE_FMT_S16) { av_log(avctx, AV_LOG_ERROR, "only pcm_s16 input samples are supported\n"); return -1; } + /* TODO: Correctly implement multi-channel ALAC. + It is similar to multi-channel AAC, in that it has a series of + single-channel (SCE), channel-pair (CPE), and LFE elements. */ + if (avctx->channels > 2) { + av_log(avctx, AV_LOG_ERROR, "only mono or stereo input is currently supported\n"); + return AVERROR_PATCHWELCOME; + } + // Set default compression level - if(avctx->compression_level == FF_COMPRESSION_DEFAULT) + if (avctx->compression_level == FF_COMPRESSION_DEFAULT) s->compression_level = 2; else s->compression_level = av_clip(avctx->compression_level, 0, 2); @@ -411,21 +430,23 @@ AV_WB8 (alac_extradata+17, avctx->bits_per_coded_sample); AV_WB8 (alac_extradata+21, avctx->channels); AV_WB32(alac_extradata+24, s->max_coded_frame_size); - AV_WB32(alac_extradata+28, avctx->sample_rate*avctx->channels*avctx->bits_per_coded_sample); // average bitrate + AV_WB32(alac_extradata+28, + avctx->sample_rate * avctx->channels * avctx->bits_per_coded_sample); // average bitrate AV_WB32(alac_extradata+32, avctx->sample_rate); // Set relevant extradata fields - if(s->compression_level > 0) { + if (s->compression_level > 0) { AV_WB8(alac_extradata+18, s->rc.history_mult); AV_WB8(alac_extradata+19, s->rc.initial_history); AV_WB8(alac_extradata+20, s->rc.k_modifier); } s->min_prediction_order = DEFAULT_MIN_PRED_ORDER; - if(avctx->min_prediction_order >= 0) { - if(avctx->min_prediction_order < MIN_LPC_ORDER || + if (avctx->min_prediction_order >= 0) { + if (avctx->min_prediction_order < MIN_LPC_ORDER || avctx->min_prediction_order > ALAC_MAX_LPC_ORDER) { - av_log(avctx, AV_LOG_ERROR, "invalid min prediction order: %d\n", avctx->min_prediction_order); + av_log(avctx, AV_LOG_ERROR, "invalid min prediction order: %d\n", + avctx->min_prediction_order); return -1; } @@ -433,18 +454,20 @@ } s->max_prediction_order = DEFAULT_MAX_PRED_ORDER; - if(avctx->max_prediction_order >= 0) { - if(avctx->max_prediction_order < MIN_LPC_ORDER || - avctx->max_prediction_order > ALAC_MAX_LPC_ORDER) { - av_log(avctx, AV_LOG_ERROR, "invalid max prediction order: %d\n", avctx->max_prediction_order); + if (avctx->max_prediction_order >= 0) { + if (avctx->max_prediction_order < MIN_LPC_ORDER || + avctx->max_prediction_order > ALAC_MAX_LPC_ORDER) { + av_log(avctx, AV_LOG_ERROR, "invalid max prediction order: %d\n", + avctx->max_prediction_order); return -1; } s->max_prediction_order = avctx->max_prediction_order; } - if(s->max_prediction_order < s->min_prediction_order) { - av_log(avctx, AV_LOG_ERROR, "invalid prediction orders: min=%d max=%d\n", + if (s->max_prediction_order < s->min_prediction_order) { + av_log(avctx, AV_LOG_ERROR, + "invalid prediction orders: min=%d max=%d\n", s->min_prediction_order, s->max_prediction_order); return -1; } @@ -469,12 +492,12 @@ PutBitContext *pb = &s->pbctx; int i, out_bytes, verbatim_flag = 0; - if(avctx->frame_size > DEFAULT_FRAME_SIZE) { + if (avctx->frame_size > DEFAULT_FRAME_SIZE) { av_log(avctx, AV_LOG_ERROR, "input frame size exceeded\n"); return -1; } - if(buf_size < 2*s->max_coded_frame_size) { + if (buf_size < 2 * s->max_coded_frame_size) { av_log(avctx, AV_LOG_ERROR, "buffer size is too small\n"); return -1; } @@ -482,11 +505,11 @@ verbatim: init_put_bits(pb, frame, buf_size); - if((s->compression_level == 0) || verbatim_flag) { + if (s->compression_level == 0 || verbatim_flag) { // Verbatim mode const int16_t *samples = data; write_frame_header(s, 1); - for(i=0; iframe_size*avctx->channels; i++) { + for (i = 0; i < avctx->frame_size * avctx->channels; i++) { put_sbits(pb, 16, *samples++); } } else { @@ -499,9 +522,9 @@ flush_put_bits(pb); out_bytes = put_bits_count(pb) >> 3; - if(out_bytes > s->max_coded_frame_size) { + if (out_bytes > s->max_coded_frame_size) { /* frame too large. use verbatim mode */ - if(verbatim_flag || (s->compression_level == 0)) { + if (verbatim_flag || s->compression_level == 0) { /* still too large. must be an error. */ av_log(avctx, AV_LOG_ERROR, "error encoding frame\n"); return -1; @@ -524,14 +547,15 @@ } AVCodec ff_alac_encoder = { - "alac", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_ALAC, - sizeof(AlacEncodeContext), - alac_encode_init, - alac_encode_frame, - alac_encode_close, + .name = "alac", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_ALAC, + .priv_data_size = sizeof(AlacEncodeContext), + .init = alac_encode_init, + .encode = alac_encode_frame, + .close = alac_encode_close, .capabilities = CODEC_CAP_SMALL_LAST_FRAME, - .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE}, + .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/allcodecs.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/allcodecs.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/allcodecs.c 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/allcodecs.c 2012-01-11 00:34:30.000000000 +0000 @@ -57,6 +57,7 @@ REGISTER_HWACCEL (H263_VAAPI, h263_vaapi); REGISTER_HWACCEL (H264_DXVA2, h264_dxva2); REGISTER_HWACCEL (H264_VAAPI, h264_vaapi); + REGISTER_HWACCEL (H264_VDA, h264_vda); REGISTER_HWACCEL (MPEG2_DXVA2, mpeg2_dxva2); REGISTER_HWACCEL (MPEG2_VAAPI, mpeg2_vaapi); REGISTER_HWACCEL (MPEG4_VAAPI, mpeg4_vaapi); @@ -81,11 +82,12 @@ REGISTER_DECODER (BFI, bfi); REGISTER_DECODER (BINK, bink); REGISTER_ENCDEC (BMP, bmp); + REGISTER_DECODER (BMV_VIDEO, bmv_video); REGISTER_DECODER (C93, c93); REGISTER_DECODER (CAVS, cavs); REGISTER_DECODER (CDGRAPHICS, cdgraphics); REGISTER_DECODER (CINEPAK, cinepak); - REGISTER_DECODER (CLJR, cljr); + REGISTER_ENCDEC (CLJR, cljr); REGISTER_DECODER (CSCD, cscd); REGISTER_DECODER (CYUV, cyuv); REGISTER_DECODER (DFA, dfa); @@ -94,6 +96,7 @@ REGISTER_DECODER (DSICINVIDEO, dsicinvideo); REGISTER_ENCDEC (DVVIDEO, dvvideo); REGISTER_DECODER (DXA, dxa); + REGISTER_DECODER (DXTORY, dxtory); REGISTER_DECODER (EACMV, eacmv); REGISTER_DECODER (EAMAD, eamad); REGISTER_DECODER (EATGQ, eatgq); @@ -106,6 +109,7 @@ REGISTER_ENCDEC (FFV1, ffv1); REGISTER_ENCDEC (FFVHUFF, ffvhuff); REGISTER_ENCDEC (FLASHSV, flashsv); + REGISTER_DECODER (FLASHSV2, flashsv2); REGISTER_DECODER (FLIC, flic); REGISTER_ENCDEC (FLV, flv); REGISTER_DECODER (FOURXM, fourxm); @@ -124,6 +128,7 @@ REGISTER_DECODER (IFF_ILBM, iff_ilbm); REGISTER_DECODER (INDEO2, indeo2); REGISTER_DECODER (INDEO3, indeo3); + REGISTER_DECODER (INDEO4, indeo4); REGISTER_DECODER (INDEO5, indeo5); REGISTER_DECODER (INTERPLAY_VIDEO, interplay_video); REGISTER_ENCDEC (JPEGLS, jpegls); @@ -144,7 +149,6 @@ REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video); REGISTER_ENCDEC (MPEG4, mpeg4); REGISTER_DECODER (MPEG4_VDPAU, mpeg4_vdpau); - REGISTER_DECODER (MPEGVIDEO, mpegvideo); REGISTER_DECODER (MPEG_VDPAU, mpeg_vdpau); REGISTER_DECODER (MPEG1_VDPAU, mpeg1_vdpau); REGISTER_DECODER (MSMPEG4V1, msmpeg4v1); @@ -163,6 +167,7 @@ REGISTER_DECODER (PICTOR, pictor); REGISTER_ENCDEC (PNG, png); REGISTER_ENCDEC (PPM, ppm); + REGISTER_DECODER (PRORES, prores); REGISTER_DECODER (PTX, ptx); REGISTER_DECODER (QDRAW, qdraw); REGISTER_DECODER (QPEG, qpeg); @@ -197,11 +202,15 @@ REGISTER_DECODER (TSCC, tscc); REGISTER_DECODER (TXD, txd); REGISTER_DECODER (ULTI, ulti); + REGISTER_DECODER (UTVIDEO, utvideo); REGISTER_ENCDEC (V210, v210); REGISTER_DECODER (V210X, v210x); + REGISTER_ENCDEC (V410, v410); REGISTER_DECODER (VB, vb); + REGISTER_DECODER (VBLE, vble); REGISTER_DECODER (VC1, vc1); REGISTER_DECODER (VC1_VDPAU, vc1_vdpau); + REGISTER_DECODER (VC1IMAGE, vc1image); REGISTER_DECODER (VCR1, vcr1); REGISTER_DECODER (VMDVIDEO, vmdvideo); REGISTER_DECODER (VMNC, vmnc); @@ -216,6 +225,7 @@ REGISTER_ENCDEC (WMV2, wmv2); REGISTER_DECODER (WMV3, wmv3); REGISTER_DECODER (WMV3_VDPAU, wmv3_vdpau); + REGISTER_DECODER (WMV3IMAGE, wmv3image); REGISTER_DECODER (WNV1, wnv1); REGISTER_DECODER (XAN_WC3, xan_wc3); REGISTER_DECODER (XAN_WC4, xan_wc4); @@ -238,6 +248,7 @@ REGISTER_DECODER (ATRAC3, atrac3); REGISTER_DECODER (BINKAUDIO_DCT, binkaudio_dct); REGISTER_DECODER (BINKAUDIO_RDFT, binkaudio_rdft); + REGISTER_DECODER (BMV_AUDIO, bmv_audio); REGISTER_DECODER (COOK, cook); REGISTER_DECODER (DCA, dca); REGISTER_DECODER (DSICINAUDIO, dsicinaudio); @@ -293,6 +304,7 @@ REGISTER_DECODER (PCM_LXF, pcm_lxf); REGISTER_ENCDEC (PCM_MULAW, pcm_mulaw); REGISTER_ENCDEC (PCM_S8, pcm_s8); + REGISTER_DECODER (PCM_S8_PLANAR, pcm_s8_planar); REGISTER_ENCDEC (PCM_S16BE, pcm_s16be); REGISTER_ENCDEC (PCM_S16LE, pcm_s16le); REGISTER_DECODER (PCM_S16LE_PLANAR, pcm_s16le_planar); @@ -308,7 +320,7 @@ REGISTER_ENCDEC (PCM_U24LE, pcm_u24le); REGISTER_ENCDEC (PCM_U32BE, pcm_u32be); REGISTER_ENCDEC (PCM_U32LE, pcm_u32le); - REGISTER_ENCDEC (PCM_ZORK , pcm_zork); + REGISTER_DECODER (PCM_ZORK , pcm_zork); /* DPCM codecs */ REGISTER_DECODER (INTERPLAY_DPCM, interplay_dpcm); @@ -365,7 +377,7 @@ REGISTER_DECODER (LIBOPENCORE_AMRWB, libopencore_amrwb); REGISTER_DECODER (LIBOPENJPEG, libopenjpeg); REGISTER_ENCDEC (LIBSCHROEDINGER, libschroedinger); - REGISTER_DECODER (LIBSPEEX, libspeex); + REGISTER_ENCDEC (LIBSPEEX, libspeex); REGISTER_ENCODER (LIBTHEORA, libtheora); REGISTER_ENCODER (LIBVO_AACENC, libvo_aacenc); REGISTER_ENCODER (LIBVO_AMRWBENC, libvo_amrwbenc); @@ -379,6 +391,7 @@ REGISTER_PARSER (AAC, aac); REGISTER_PARSER (AAC_LATM, aac_latm); REGISTER_PARSER (AC3, ac3); + REGISTER_PARSER (ADX, adx); REGISTER_PARSER (CAVSVIDEO, cavsvideo); REGISTER_PARSER (DCA, dca); REGISTER_PARSER (DIRAC, dirac); @@ -395,6 +408,8 @@ REGISTER_PARSER (MPEGAUDIO, mpegaudio); REGISTER_PARSER (MPEGVIDEO, mpegvideo); REGISTER_PARSER (PNM, pnm); + REGISTER_PARSER (RV30, rv30); + REGISTER_PARSER (RV40, rv40); REGISTER_PARSER (VC1, vc1); REGISTER_PARSER (VP3, vp3); REGISTER_PARSER (VP8, vp8); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/alpha/dsputil_alpha.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/alpha/dsputil_alpha.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/alpha/dsputil_alpha.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/alpha/dsputil_alpha.c 2012-01-11 00:34:30.000000000 +0000 @@ -270,7 +270,7 @@ void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx) { - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; if (!high_bit_depth) { c->put_pixels_tab[0][0] = put_pixels16_axp_asm; @@ -321,7 +321,8 @@ c->put_pixels_clamped = put_pixels_clamped_mvi_asm; c->add_pixels_clamped = add_pixels_clamped_mvi_asm; - c->get_pixels = get_pixels_mvi; + if (!high_bit_depth) + c->get_pixels = get_pixels_mvi; c->diff_pixels = diff_pixels_mvi; c->sad[0] = pix_abs16x16_mvi_asm; c->sad[1] = pix_abs8x8_mvi; @@ -335,7 +336,7 @@ put_pixels_clamped_axp_p = c->put_pixels_clamped; add_pixels_clamped_axp_p = c->add_pixels_clamped; - if (!avctx->lowres && + if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 && (avctx->idct_algo == FF_IDCT_AUTO || avctx->idct_algo == FF_IDCT_SIMPLEALPHA)) { c->idct_put = ff_simple_idct_put_axp; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/alsdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/alsdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/alsdec.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/alsdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -191,6 +191,7 @@ typedef struct { AVCodecContext *avctx; + AVFrame frame; ALSSpecificConfig sconf; GetBitContext gb; DSPContext dsp; @@ -289,8 +290,8 @@ init_get_bits(&gb, avctx->extradata, avctx->extradata_size * 8); - config_offset = ff_mpeg4audio_get_config(&m4ac, avctx->extradata, - avctx->extradata_size); + config_offset = avpriv_mpeg4audio_get_config(&m4ac, avctx->extradata, + avctx->extradata_size * 8, 1); if (config_offset < 0) return -1; @@ -393,7 +394,7 @@ if (get_bits_left(&gb) < 32) return -1; - if (avctx->error_recognition >= FF_ER_CAREFUL) { + if (avctx->err_recognition & AV_EF_CRCCHECK) { ctx->crc_table = av_crc_get_table(AV_CRC_32_IEEE_LE); ctx->crc = 0xFFFFFFFF; ctx->crc_org = ~get_bits_long(&gb, 32); @@ -1415,15 +1416,14 @@ /** Decode an ALS frame. */ -static int decode_frame(AVCodecContext *avctx, - void *data, int *data_size, +static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { ALSDecContext *ctx = avctx->priv_data; ALSSpecificConfig *sconf = &ctx->sconf; const uint8_t *buffer = avpkt->data; int buffer_size = avpkt->size; - int invalid_frame, size; + int invalid_frame, ret; unsigned int c, sample, ra_frame, bytes_read, shift; init_get_bits(&ctx->gb, buffer, buffer_size * 8); @@ -1448,21 +1448,17 @@ ctx->frame_id++; - // check for size of decoded data - size = ctx->cur_frame_length * avctx->channels * - av_get_bytes_per_sample(avctx->sample_fmt); - - if (size > *data_size) { - av_log(avctx, AV_LOG_ERROR, "Decoded data exceeds buffer size.\n"); - return -1; + /* get output buffer */ + ctx->frame.nb_samples = ctx->cur_frame_length; + if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; } - *data_size = size; - // transform decoded frame into output format #define INTERLEAVE_OUTPUT(bps) \ { \ - int##bps##_t *dest = (int##bps##_t*) data; \ + int##bps##_t *dest = (int##bps##_t*)ctx->frame.data[0]; \ shift = bps - ctx->avctx->bits_per_raw_sample; \ for (sample = 0; sample < ctx->cur_frame_length; sample++) \ for (c = 0; c < avctx->channels; c++) \ @@ -1476,11 +1472,11 @@ } // update CRC - if (sconf->crc_enabled && avctx->error_recognition >= FF_ER_CAREFUL) { + if (sconf->crc_enabled && (avctx->err_recognition & AV_EF_CRCCHECK)) { int swap = HAVE_BIGENDIAN != sconf->msb_first; if (ctx->avctx->bits_per_raw_sample == 24) { - int32_t *src = data; + int32_t *src = (int32_t *)ctx->frame.data[0]; for (sample = 0; sample < ctx->cur_frame_length * avctx->channels; @@ -1501,22 +1497,25 @@ if (swap) { if (ctx->avctx->bits_per_raw_sample <= 16) { - int16_t *src = (int16_t*) data; + int16_t *src = (int16_t*) ctx->frame.data[0]; int16_t *dest = (int16_t*) ctx->crc_buffer; for (sample = 0; sample < ctx->cur_frame_length * avctx->channels; sample++) *dest++ = av_bswap16(src[sample]); } else { - ctx->dsp.bswap_buf((uint32_t*)ctx->crc_buffer, data, + ctx->dsp.bswap_buf((uint32_t*)ctx->crc_buffer, + (uint32_t *)ctx->frame.data[0], ctx->cur_frame_length * avctx->channels); } crc_source = ctx->crc_buffer; } else { - crc_source = data; + crc_source = ctx->frame.data[0]; } - ctx->crc = av_crc(ctx->crc_table, ctx->crc, crc_source, size); + ctx->crc = av_crc(ctx->crc_table, ctx->crc, crc_source, + ctx->cur_frame_length * avctx->channels * + av_get_bytes_per_sample(avctx->sample_fmt)); } @@ -1527,6 +1526,9 @@ } } + *got_frame_ptr = 1; + *(AVFrame *)data = ctx->frame; + bytes_read = invalid_frame ? buffer_size : (get_bits_count(&ctx->gb) + 7) >> 3; @@ -1710,7 +1712,7 @@ // allocate crc buffer if (HAVE_BIGENDIAN != sconf->msb_first && sconf->crc_enabled && - avctx->error_recognition >= FF_ER_CAREFUL) { + (avctx->err_recognition & AV_EF_CRCCHECK)) { ctx->crc_buffer = av_malloc(sizeof(*ctx->crc_buffer) * ctx->cur_frame_length * avctx->channels * @@ -1724,6 +1726,9 @@ dsputil_init(&ctx->dsp, avctx); + avcodec_get_frame_defaults(&ctx->frame); + avctx->coded_frame = &ctx->frame; + return 0; } @@ -1739,16 +1744,15 @@ AVCodec ff_als_decoder = { - "als", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP4ALS, - sizeof(ALSDecContext), - decode_init, - NULL, - decode_end, - decode_frame, + .name = "als", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP4ALS, + .priv_data_size = sizeof(ALSDecContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, .flush = flush, - .capabilities = CODEC_CAP_SUBFRAMES, + .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/amrnbdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/amrnbdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/amrnbdec.c 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/amrnbdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -83,7 +83,7 @@ /** Maximum sharpening factor * * The specification says 0.8, which should be 13107, but the reference C code - * uses 13017 instead. (Amusingly the same applies to SHARP_MAX in g729dec.c.) + * uses 13017 instead. (Amusingly the same applies to SHARP_MAX in bitexact G.729.) */ #define SHARP_MAX 0.79449462890625 @@ -95,6 +95,7 @@ #define AMR_AGC_ALPHA 0.9 typedef struct AMRContext { + AVFrame avframe; ///< AVFrame for decoded samples AMRNBFrame frame; ///< decoded AMR parameters (lsf coefficients, codebook indexes, etc) uint8_t bad_frame_indicator; ///< bad frame ? 1 : 0 enum Mode cur_frame_mode; @@ -167,6 +168,9 @@ for (i = 0; i < 4; i++) p->prediction_error[i] = MIN_ENERGY; + avcodec_get_frame_defaults(&p->avframe); + avctx->coded_frame = &p->avframe; + return 0; } @@ -204,7 +208,7 @@ } -/// @defgroup amr_lpc_decoding AMR pitch LPC coefficient decoding functions +/// @name AMR pitch LPC coefficient decoding functions /// @{ /** @@ -341,7 +345,7 @@ /// @} -/// @defgroup amr_pitch_vector_decoding AMR pitch vector decoding functions +/// @name AMR pitch vector decoding functions /// @{ /** @@ -403,7 +407,7 @@ /// @} -/// @defgroup amr_algebraic_code_book AMR algebraic code book (fixed) vector decoding functions +/// @name AMR algebraic code book (fixed) vector decoding functions /// @{ /** @@ -547,7 +551,7 @@ /// @} -/// @defgroup amr_gain_decoding AMR gain decoding functions +/// @name AMR gain decoding functions /// @{ /** @@ -633,7 +637,7 @@ /// @} -/// @defgroup amr_pre_processing AMR pre-processing functions +/// @name AMR preprocessing functions /// @{ /** @@ -649,7 +653,7 @@ static void apply_ir_filter(float *out, const AMRFixed *in, const float *filter) { - float filter1[AMR_SUBFRAME_SIZE], //!< filters at pitch lag*1 and *2 + float filter1[AMR_SUBFRAME_SIZE], ///< filters at pitch lag*1 and *2 filter2[AMR_SUBFRAME_SIZE]; int lag = in->pitch_lag; float fac = in->pitch_fac; @@ -751,7 +755,7 @@ /// @} -/// @defgroup amr_synthesis AMR synthesis functions +/// @name AMR synthesis functions /// @{ /** @@ -812,7 +816,7 @@ /// @} -/// @defgroup amr_update AMR update functions +/// @name AMR update functions /// @{ /** @@ -837,7 +841,7 @@ /// @} -/// @defgroup amr_postproc AMR Post processing functions +/// @name AMR Postprocessing functions /// @{ /** @@ -919,21 +923,29 @@ /// @} -static int amrnb_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - AVPacket *avpkt) +static int amrnb_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { AMRContext *p = avctx->priv_data; // pointer to private data const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - float *buf_out = data; // pointer to the output data buffer - int i, subframe; + float *buf_out; // pointer to the output data buffer + int i, subframe, ret; float fixed_gain_factor; AMRFixed fixed_sparse = {0}; // fixed vector up to anti-sparseness processing float spare_vector[AMR_SUBFRAME_SIZE]; // extra stack space to hold result from anti-sparseness processing float synth_fixed_gain; // the fixed gain that synthesis should use const float *synth_fixed_vector; // pointer to the fixed vector that synthesis should use + /* get output buffer */ + p->avframe.nb_samples = AMR_BLOCK_SIZE; + if ((ret = avctx->get_buffer(avctx, &p->avframe)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + buf_out = (float *)p->avframe.data[0]; + p->cur_frame_mode = unpack_bitstream(p, buf, buf_size); if (p->cur_frame_mode == MODE_DTX) { av_log_missing_feature(avctx, "dtx mode", 1); @@ -965,6 +977,10 @@ pitch_sharpening(p, subframe, p->cur_frame_mode, &fixed_sparse); + if (fixed_sparse.pitch_lag == 0) { + av_log(avctx, AV_LOG_ERROR, "The file is corrupted, pitch_lag = 0 is not allowed\n"); + return AVERROR_INVALIDDATA; + } ff_set_fixed_vector(p->fixed_vector, &fixed_sparse, 1.0, AMR_SUBFRAME_SIZE); @@ -1028,8 +1044,8 @@ ff_weighted_vector_sumf(p->lsf_avg, p->lsf_avg, p->lsf_q[3], 0.84, 0.16, LP_FILTER_ORDER); - /* report how many samples we got */ - *data_size = AMR_BLOCK_SIZE * sizeof(float); + *got_frame_ptr = 1; + *(AVFrame *)data = p->avframe; /* return the amount of bytes consumed if everything was OK */ return frame_sizes_nb[p->cur_frame_mode] + 1; // +7 for rounding and +8 for TOC @@ -1043,6 +1059,7 @@ .priv_data_size = sizeof(AMRContext), .init = amrnb_decode_init, .decode = amrnb_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Adaptive Multi-Rate NarrowBand"), .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/amrwbdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/amrwbdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/amrwbdec.c 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/amrwbdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,6 +41,7 @@ #include "amrwbdata.h" typedef struct { + AVFrame avframe; ///< AVFrame for decoded samples AMRWBFrame frame; ///< AMRWB parameters decoded from bitstream enum Mode fr_cur_mode; ///< mode index of current frame uint8_t fr_quality; ///< frame quality index (FQI) @@ -102,12 +103,15 @@ for (i = 0; i < 4; i++) ctx->prediction_error[i] = MIN_ENERGY; + avcodec_get_frame_defaults(&ctx->avframe); + avctx->coded_frame = &ctx->avframe; + return 0; } /** * Decode the frame header in the "MIME/storage" format. This format - * is simpler and does not carry the auxiliary information of the frame + * is simpler and does not carry the auxiliary frame information. * * @param[in] ctx The Context * @param[in] buf Pointer to the input buffer @@ -129,7 +133,7 @@ } /** - * Decodes quantized ISF vectors using 36-bit indexes (6K60 mode only) + * Decode quantized ISF vectors using 36-bit indexes (6K60 mode only). * * @param[in] ind Array of 5 indexes * @param[out] isf_q Buffer for isf_q[LP_ORDER] @@ -156,7 +160,7 @@ } /** - * Decodes quantized ISF vectors using 46-bit indexes (except 6K60 mode) + * Decode quantized ISF vectors using 46-bit indexes (except 6K60 mode). * * @param[in] ind Array of 7 indexes * @param[out] isf_q Buffer for isf_q[LP_ORDER] @@ -189,8 +193,8 @@ } /** - * Apply mean and past ISF values using the prediction factor - * Updates past ISF vector + * Apply mean and past ISF values using the prediction factor. + * Updates past ISF vector. * * @param[in,out] isf_q Current quantized ISF * @param[in,out] isf_past Past quantized ISF @@ -211,7 +215,7 @@ /** * Interpolate the fourth ISP vector from current and past frames - * to obtain a ISP vector for each subframe + * to obtain an ISP vector for each subframe. * * @param[in,out] isp_q ISPs for each subframe * @param[in] isp4_past Past ISP for subframe 4 @@ -228,9 +232,9 @@ } /** - * Decode an adaptive codebook index into pitch lag (except 6k60, 8k85 modes) - * Calculate integer lag and fractional lag always using 1/4 resolution - * In 1st and 3rd subframes the index is relative to last subframe integer lag + * Decode an adaptive codebook index into pitch lag (except 6k60, 8k85 modes). + * Calculate integer lag and fractional lag always using 1/4 resolution. + * In 1st and 3rd subframes the index is relative to last subframe integer lag. * * @param[out] lag_int Decoded integer pitch lag * @param[out] lag_frac Decoded fractional pitch lag @@ -267,9 +271,9 @@ } /** - * Decode a adaptive codebook index into pitch lag for 8k85 and 6k60 modes - * Description is analogous to decode_pitch_lag_high, but in 6k60 relative - * index is used for all subframes except the first + * Decode an adaptive codebook index into pitch lag for 8k85 and 6k60 modes. + * The description is analogous to decode_pitch_lag_high, but in 6k60 the + * relative index is used for all subframes except the first. */ static void decode_pitch_lag_low(int *lag_int, int *lag_frac, int pitch_index, uint8_t *base_lag_int, int subframe, enum Mode mode) @@ -294,7 +298,7 @@ /** * Find the pitch vector by interpolating the past excitation at the - * pitch delay, which is obtained in this function + * pitch delay, which is obtained in this function. * * @param[in,out] ctx The context * @param[in] amr_subframe Current subframe data @@ -347,10 +351,10 @@ /** * The next six functions decode_[i]p_track decode exactly i pulses * positions and amplitudes (-1 or 1) in a subframe track using - * an encoded pulse indexing (TS 26.190 section 5.8.2) + * an encoded pulse indexing (TS 26.190 section 5.8.2). * * The results are given in out[], in which a negative number means - * amplitude -1 and vice versa (i.e., ampl(x) = x / abs(x) ) + * amplitude -1 and vice versa (i.e., ampl(x) = x / abs(x) ). * * @param[out] out Output buffer (writes i elements) * @param[in] code Pulse index (no. of bits varies, see below) @@ -466,7 +470,7 @@ /** * Decode the algebraic codebook index to pulse positions and signs, - * then construct the algebraic codebook vector + * then construct the algebraic codebook vector. * * @param[out] fixed_vector Buffer for the fixed codebook excitation * @param[in] pulse_hi MSBs part of the pulse index array (higher modes only) @@ -537,7 +541,7 @@ } /** - * Decode pitch gain and fixed gain correction factor + * Decode pitch gain and fixed gain correction factor. * * @param[in] vq_gain Vector-quantized index for gains * @param[in] mode Mode of the current frame @@ -555,7 +559,7 @@ } /** - * Apply pitch sharpening filters to the fixed codebook vector + * Apply pitch sharpening filters to the fixed codebook vector. * * @param[in] ctx The context * @param[in,out] fixed_vector Fixed codebook excitation @@ -576,7 +580,7 @@ } /** - * Calculate the voicing factor (-1.0 = unvoiced to 1.0 = voiced) + * Calculate the voicing factor (-1.0 = unvoiced to 1.0 = voiced). * * @param[in] p_vector, f_vector Pitch and fixed excitation vectors * @param[in] p_gain, f_gain Pitch and fixed gains @@ -595,8 +599,8 @@ } /** - * Reduce fixed vector sparseness by smoothing with one of three IR filters - * Also known as "adaptive phase dispersion" + * Reduce fixed vector sparseness by smoothing with one of three IR filters, + * also known as "adaptive phase dispersion". * * @param[in] ctx The context * @param[in,out] fixed_vector Unfiltered fixed vector @@ -666,7 +670,7 @@ /** * Calculate a stability factor {teta} based on distance between - * current and past isf. A value of 1 shows maximum signal stability + * current and past isf. A value of 1 shows maximum signal stability. */ static float stability_factor(const float *isf, const float *isf_past) { @@ -683,7 +687,7 @@ /** * Apply a non-linear fixed gain smoothing in order to reduce - * fluctuation in the energy of excitation + * fluctuation in the energy of excitation. * * @param[in] fixed_gain Unsmoothed fixed gain * @param[in,out] prev_tr_gain Previous threshold gain (updated) @@ -714,7 +718,7 @@ } /** - * Filter the fixed_vector to emphasize the higher frequencies + * Filter the fixed_vector to emphasize the higher frequencies. * * @param[in,out] fixed_vector Fixed codebook vector * @param[in] voice_fac Frame voicing factor @@ -738,7 +742,7 @@ } /** - * Conduct 16th order linear predictive coding synthesis from excitation + * Conduct 16th order linear predictive coding synthesis from excitation. * * @param[in] ctx Pointer to the AMRWBContext * @param[in] lpc Pointer to the LPC coefficients @@ -798,7 +802,7 @@ /** * Upsample a signal by 5/4 ratio (from 12.8kHz to 16kHz) using - * a FIR interpolation filter. Uses past data from before *in address + * a FIR interpolation filter. Uses past data from before *in address. * * @param[out] out Buffer for interpolated signal * @param[in] in Current signal data (length 0.8*o_size) @@ -828,7 +832,7 @@ /** * Calculate the high-band gain based on encoded index (23k85 mode) or - * on the low-band speech signal and the Voice Activity Detection flag + * on the low-band speech signal and the Voice Activity Detection flag. * * @param[in] ctx The context * @param[in] synth LB speech synthesis at 12.8k @@ -853,7 +857,7 @@ /** * Generate the high-band excitation with the same energy from the lower - * one and scaled by the given gain + * one and scaled by the given gain. * * @param[in] ctx The context * @param[out] hb_exc Buffer for the excitation @@ -876,7 +880,7 @@ } /** - * Calculate the auto-correlation for the ISF difference vector + * Calculate the auto-correlation for the ISF difference vector. */ static float auto_correlation(float *diff_isf, float mean, int lag) { @@ -892,7 +896,7 @@ /** * Extrapolate a ISF vector to the 16kHz range (20th order LP) - * used at mode 6k60 LP filter for the high frequency band + * used at mode 6k60 LP filter for the high frequency band. * * @param[out] out Buffer for extrapolated isf * @param[in] isf Input isf vector @@ -977,7 +981,7 @@ /** * Conduct 20th order linear predictive coding synthesis for the high - * frequency band excitation at 16kHz + * frequency band excitation at 16kHz. * * @param[in] ctx The context * @param[in] subframe Current subframe index (0 to 3) @@ -1015,8 +1019,8 @@ } /** - * Apply to high-band samples a 15th order filter - * The filter characteristic depends on the given coefficients + * Apply a 15th order filter to high-band samples. + * The filter characteristic depends on the given coefficients. * * @param[out] out Buffer for filtered output * @param[in] fir_coef Filter coefficients @@ -1044,7 +1048,7 @@ } /** - * Update context state before the next subframe + * Update context state before the next subframe. */ static void update_sub_state(AMRWBContext *ctx) { @@ -1062,15 +1066,15 @@ LP_ORDER_16k * sizeof(float)); } -static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - AVPacket *avpkt) +static int amrwb_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { AMRWBContext *ctx = avctx->priv_data; AMRWBFrame *cf = &ctx->frame; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; int expected_fr_size, header_size; - float *buf_out = data; + float *buf_out; float spare_vector[AMRWB_SFR_SIZE]; // extra stack space to hold result from anti-sparseness processing float fixed_gain_factor; // fixed gain correction factor (gamma) float *synth_fixed_vector; // pointer to the fixed vector that synthesis should use @@ -1080,7 +1084,15 @@ float hb_exc[AMRWB_SFR_SIZE_16k]; // excitation for the high frequency band float hb_samples[AMRWB_SFR_SIZE_16k]; // filtered high-band samples from synthesis float hb_gain; - int sub, i; + int sub, i, ret; + + /* get output buffer */ + ctx->avframe.nb_samples = 4 * AMRWB_SFR_SIZE_16k; + if ((ret = avctx->get_buffer(avctx, &ctx->avframe)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + buf_out = (float *)ctx->avframe.data[0]; header_size = decode_mime_header(ctx, buf); expected_fr_size = ((cf_sizes_wb[ctx->fr_cur_mode] + 7) >> 3) + 1; @@ -1088,7 +1100,7 @@ if (buf_size < expected_fr_size) { av_log(avctx, AV_LOG_ERROR, "Frame too small (%d bytes). Truncated file?\n", buf_size); - *data_size = 0; + *got_frame_ptr = 0; return buf_size; } @@ -1219,8 +1231,8 @@ memcpy(ctx->isp_sub4_past, ctx->isp[3], LP_ORDER * sizeof(ctx->isp[3][0])); memcpy(ctx->isf_past_final, ctx->isf_cur, LP_ORDER * sizeof(float)); - /* report how many samples we got */ - *data_size = 4 * AMRWB_SFR_SIZE_16k * sizeof(float); + *got_frame_ptr = 1; + *(AVFrame *)data = ctx->avframe; return expected_fr_size; } @@ -1232,6 +1244,7 @@ .priv_data_size = sizeof(AMRWBContext), .init = amrwb_decode_init, .decode = amrwb_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Adaptive Multi-Rate WideBand"), .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/anm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/anm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/anm.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/anm.c 2012-01-11 00:34:30.000000000 +0000 @@ -81,6 +81,8 @@ int striplen = FFMIN(count, remaining); if (buf) { striplen = FFMIN(striplen, buf_end - *buf); + if (*buf >= buf_end) + goto exhausted; memcpy(*dst, *buf, striplen); *buf += striplen; } else if (pixel >= 0) @@ -184,14 +186,13 @@ } AVCodec ff_anm_decoder = { - "anm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ANM, - sizeof(AnmContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "anm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ANM, + .priv_data_size = sizeof(AnmContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ansi.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ansi.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ansi.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ansi.c 2012-01-11 00:34:30.000000000 +0000 @@ -153,7 +153,7 @@ /** * Execute ANSI escape code - * @param <0 error + * @return 0 on success, negative on error */ static int execute_code(AVCodecContext * avctx, int c) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/apedec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/apedec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/apedec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/apedec.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,12 +20,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "avcodec.h" #include "dsputil.h" #include "get_bits.h" #include "bytestream.h" #include "libavutil/audioconvert.h" +#include "libavutil/avassert.h" /** * @file @@ -128,6 +129,7 @@ /** Decoder context */ typedef struct APEContext { AVCodecContext *avctx; + AVFrame frame; DSPContext dsp; int channels; int samples; ///< samples left to decode in current frame @@ -139,8 +141,6 @@ uint32_t CRC; ///< frame CRC int frameflags; ///< frame flags - int currentframeblocks; ///< samples (per channel) in current frame - int blocksdecoded; ///< count of decoded samples in current frame APEPredictor predictor; ///< predictor used for final reconstruction int32_t decoded0[BLOCKS_PER_LOOP]; ///< decoded data for the first channel @@ -156,29 +156,40 @@ uint8_t *data; ///< current frame data uint8_t *data_end; ///< frame data end const uint8_t *ptr; ///< current position in frame data - const uint8_t *last_ptr; ///< position where last 4608-sample block ended int error; } APEContext; // TODO: dsputilize -static av_cold int ape_decode_init(AVCodecContext * avctx) +static av_cold int ape_decode_close(AVCodecContext *avctx) +{ + APEContext *s = avctx->priv_data; + int i; + + for (i = 0; i < APE_FILTER_LEVELS; i++) + av_freep(&s->filterbuf[i]); + + av_freep(&s->data); + return 0; +} + +static av_cold int ape_decode_init(AVCodecContext *avctx) { APEContext *s = avctx->priv_data; int i; if (avctx->extradata_size != 6) { av_log(avctx, AV_LOG_ERROR, "Incorrect extradata\n"); - return -1; + return AVERROR(EINVAL); } if (avctx->bits_per_coded_sample != 16) { av_log(avctx, AV_LOG_ERROR, "Only 16-bit samples are supported\n"); - return -1; + return AVERROR(EINVAL); } if (avctx->channels > 2) { av_log(avctx, AV_LOG_ERROR, "Only mono and stereo is supported\n"); - return -1; + return AVERROR(EINVAL); } s->avctx = avctx; s->channels = avctx->channels; @@ -186,38 +197,37 @@ s->compression_level = AV_RL16(avctx->extradata + 2); s->flags = AV_RL16(avctx->extradata + 4); - av_log(avctx, AV_LOG_DEBUG, "Compression Level: %d - Flags: %d\n", s->compression_level, s->flags); + av_log(avctx, AV_LOG_DEBUG, "Compression Level: %d - Flags: %d\n", + s->compression_level, s->flags); if (s->compression_level % 1000 || s->compression_level > COMPRESSION_LEVEL_INSANE) { - av_log(avctx, AV_LOG_ERROR, "Incorrect compression level %d\n", s->compression_level); - return -1; + av_log(avctx, AV_LOG_ERROR, "Incorrect compression level %d\n", + s->compression_level); + return AVERROR_INVALIDDATA; } s->fset = s->compression_level / 1000 - 1; for (i = 0; i < APE_FILTER_LEVELS; i++) { if (!ape_filter_orders[s->fset][i]) break; - s->filterbuf[i] = av_malloc((ape_filter_orders[s->fset][i] * 3 + HISTORY_SIZE) * 4); + FF_ALLOC_OR_GOTO(avctx, s->filterbuf[i], + (ape_filter_orders[s->fset][i] * 3 + HISTORY_SIZE) * 4, + filter_alloc_fail); } dsputil_init(&s->dsp, avctx); avctx->sample_fmt = AV_SAMPLE_FMT_S16; avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; - return 0; -} - -static av_cold int ape_decode_close(AVCodecContext * avctx) -{ - APEContext *s = avctx->priv_data; - int i; - for (i = 0; i < APE_FILTER_LEVELS; i++) - av_freep(&s->filterbuf[i]); + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; - av_freep(&s->data); return 0; +filter_alloc_fail: + ape_decode_close(avctx); + return AVERROR(ENOMEM); } /** - * @defgroup rangecoder APE range decoder + * @name APE range decoding functions * @{ */ @@ -228,7 +238,7 @@ #define BOTTOM_VALUE (TOP_VALUE >> 8) /** Start the decoder */ -static inline void range_start_decoding(APEContext * ctx) +static inline void range_start_decoding(APEContext *ctx) { ctx->rc.buffer = bytestream_get_byte(&ctx->ptr); ctx->rc.low = ctx->rc.buffer >> (8 - EXTRA_BITS); @@ -236,13 +246,16 @@ } /** Perform normalization */ -static inline void range_dec_normalize(APEContext * ctx) +static inline void range_dec_normalize(APEContext *ctx) { while (ctx->rc.range <= BOTTOM_VALUE) { ctx->rc.buffer <<= 8; - if(ctx->ptr < ctx->data_end) + if(ctx->ptr < ctx->data_end) { ctx->rc.buffer += *ctx->ptr; - ctx->ptr++; + ctx->ptr++; + } else { + ctx->error = 1; + } ctx->rc.low = (ctx->rc.low << 8) | ((ctx->rc.buffer >> 1) & 0xFF); ctx->rc.range <<= 8; } @@ -254,7 +267,7 @@ * @param tot_f is the total frequency or (code_value)1<rc.help = ctx->rc.range / tot_f; @@ -266,7 +279,7 @@ * @param ctx decoder context * @param shift number of bits to decode */ -static inline int range_decode_culshift(APEContext * ctx, int shift) +static inline int range_decode_culshift(APEContext *ctx, int shift) { range_dec_normalize(ctx); ctx->rc.help = ctx->rc.range >> shift; @@ -280,14 +293,14 @@ * @param sy_f the interval length (frequency of the symbol) * @param lt_f the lower end (frequency sum of < symbols) */ -static inline void range_decode_update(APEContext * ctx, int sy_f, int lt_f) +static inline void range_decode_update(APEContext *ctx, int sy_f, int lt_f) { ctx->rc.low -= ctx->rc.help * lt_f; ctx->rc.range = ctx->rc.help * sy_f; } /** Decode n bits (n <= 16) without modelling */ -static inline int range_decode_bits(APEContext * ctx, int n) +static inline int range_decode_bits(APEContext *ctx, int n) { int sym = range_decode_culshift(ctx, n); range_decode_update(ctx, 1, sym); @@ -339,7 +352,7 @@ * @param counts probability range start position * @param counts_diff probability range widths */ -static inline int range_get_symbol(APEContext * ctx, +static inline int range_get_symbol(APEContext *ctx, const uint16_t counts[], const uint16_t counts_diff[]) { @@ -374,7 +387,7 @@ rice->k++; } -static inline int ape_decode_value(APEContext * ctx, APERice *rice) +static inline int ape_decode_value(APEContext *ctx, APERice *rice) { int x, overflow; @@ -441,13 +454,11 @@ return -(x >> 1); } -static void entropy_decode(APEContext * ctx, int blockstodecode, int stereo) +static void entropy_decode(APEContext *ctx, int blockstodecode, int stereo) { int32_t *decoded0 = ctx->decoded0; int32_t *decoded1 = ctx->decoded1; - ctx->blocksdecoded = blockstodecode; - if (ctx->frameflags & APE_FRAMECODE_STEREO_SILENCE) { /* We are pure silence, just memset the output buffer. */ memset(decoded0, 0, blockstodecode * sizeof(int32_t)); @@ -459,14 +470,13 @@ *decoded1++ = ape_decode_value(ctx, &ctx->riceX); } } - - if (ctx->blocksdecoded == ctx->currentframeblocks) - range_dec_normalize(ctx); /* normalize to use up all bytes */ } -static void init_entropy_decoder(APEContext * ctx) +static int init_entropy_decoder(APEContext *ctx) { /* Read the CRC */ + if (ctx->data_end - ctx->ptr < 6) + return AVERROR_INVALIDDATA; ctx->CRC = bytestream_get_be32(&ctx->ptr); /* Read the frame flags if they exist */ @@ -474,12 +484,11 @@ if ((ctx->fileversion > 3820) && (ctx->CRC & 0x80000000)) { ctx->CRC &= ~0x80000000; + if (ctx->data_end - ctx->ptr < 6) + return AVERROR_INVALIDDATA; ctx->frameflags = bytestream_get_be32(&ctx->ptr); } - /* Keep a count of the blocks decoded in this frame */ - ctx->blocksdecoded = 0; - /* Initialize the rice structs */ ctx->riceX.k = 10; ctx->riceX.ksum = (1 << ctx->riceX.k) * 16; @@ -490,13 +499,15 @@ ctx->ptr++; range_start_decoding(ctx); + + return 0; } static const int32_t initial_coeffs[4] = { 360, 317, -109, 98 }; -static void init_predictor_decoder(APEContext * ctx) +static void init_predictor_decoder(APEContext *ctx) { APEPredictor *p = &ctx->predictor; @@ -519,7 +530,10 @@ return (x < 0) - (x > 0); } -static av_always_inline int predictor_update_filter(APEPredictor *p, const int decoded, const int filter, const int delayA, const int delayB, const int adaptA, const int adaptB) +static av_always_inline int predictor_update_filter(APEPredictor *p, + const int decoded, const int filter, + const int delayA, const int delayB, + const int adaptA, const int adaptB) { int32_t predictionA, predictionB, sign; @@ -563,7 +577,7 @@ return p->filterA[filter]; } -static void predictor_decode_stereo(APEContext * ctx, int count) +static void predictor_decode_stereo(APEContext *ctx, int count) { APEPredictor *p = &ctx->predictor; int32_t *decoded0 = ctx->decoded0; @@ -571,9 +585,11 @@ while (count--) { /* Predictor Y */ - *decoded0 = predictor_update_filter(p, *decoded0, 0, YDELAYA, YDELAYB, YADAPTCOEFFSA, YADAPTCOEFFSB); + *decoded0 = predictor_update_filter(p, *decoded0, 0, YDELAYA, YDELAYB, + YADAPTCOEFFSA, YADAPTCOEFFSB); decoded0++; - *decoded1 = predictor_update_filter(p, *decoded1, 1, XDELAYA, XDELAYB, XADAPTCOEFFSA, XADAPTCOEFFSB); + *decoded1 = predictor_update_filter(p, *decoded1, 1, XDELAYA, XDELAYB, + XADAPTCOEFFSA, XADAPTCOEFFSB); decoded1++; /* Combined */ @@ -587,7 +603,7 @@ } } -static void predictor_decode_mono(APEContext * ctx, int count) +static void predictor_decode_mono(APEContext *ctx, int count) { APEPredictor *p = &ctx->predictor; int32_t *decoded0 = ctx->decoded0; @@ -632,7 +648,7 @@ p->lastA[0] = currentA; } -static void do_init_filter(APEFilter *f, int16_t * buf, int order) +static void do_init_filter(APEFilter *f, int16_t *buf, int order) { f->coeffs = buf; f->historybuffer = buf + order; @@ -644,20 +660,23 @@ f->avg = 0; } -static void init_filter(APEContext * ctx, APEFilter *f, int16_t * buf, int order) +static void init_filter(APEContext *ctx, APEFilter *f, int16_t *buf, int order) { do_init_filter(&f[0], buf, order); do_init_filter(&f[1], buf + order * 3 + HISTORY_SIZE, order); } -static void do_apply_filter(APEContext * ctx, int version, APEFilter *f, int32_t *data, int count, int order, int fracbits) +static void do_apply_filter(APEContext *ctx, int version, APEFilter *f, + int32_t *data, int count, int order, int fracbits) { int res; int absres; while (count--) { /* round fixedpoint scalar product */ - res = ctx->dsp.scalarproduct_and_madd_int16(f->coeffs, f->delay - order, f->adaptcoeffs - order, order, APESIGN(*data)); + res = ctx->dsp.scalarproduct_and_madd_int16(f->coeffs, f->delay - order, + f->adaptcoeffs - order, + order, APESIGN(*data)); res = (res + (1 << (fracbits - 1))) >> fracbits; res += *data; *data++ = res; @@ -676,7 +695,8 @@ /* Update the adaption coefficients */ absres = FFABS(res); if (absres) - *f->adaptcoeffs = ((res & (1<<31)) - (1<<30)) >> (25 + (absres <= f->avg*3) + (absres <= f->avg*4/3)); + *f->adaptcoeffs = ((res & (-1<<31)) ^ (-1<<30)) >> + (25 + (absres <= f->avg*3) + (absres <= f->avg*4/3)); else *f->adaptcoeffs = 0; @@ -699,8 +719,8 @@ } } -static void apply_filter(APEContext * ctx, APEFilter *f, - int32_t * data0, int32_t * data1, +static void apply_filter(APEContext *ctx, APEFilter *f, + int32_t *data0, int32_t *data1, int count, int order, int fracbits) { do_apply_filter(ctx, ctx->fileversion, &f[0], data0, count, order, fracbits); @@ -708,34 +728,38 @@ do_apply_filter(ctx, ctx->fileversion, &f[1], data1, count, order, fracbits); } -static void ape_apply_filters(APEContext * ctx, int32_t * decoded0, - int32_t * decoded1, int count) +static void ape_apply_filters(APEContext *ctx, int32_t *decoded0, + int32_t *decoded1, int count) { int i; for (i = 0; i < APE_FILTER_LEVELS; i++) { if (!ape_filter_orders[ctx->fset][i]) break; - apply_filter(ctx, ctx->filters[i], decoded0, decoded1, count, ape_filter_orders[ctx->fset][i], ape_filter_fracbits[ctx->fset][i]); + apply_filter(ctx, ctx->filters[i], decoded0, decoded1, count, + ape_filter_orders[ctx->fset][i], + ape_filter_fracbits[ctx->fset][i]); } } -static void init_frame_decoder(APEContext * ctx) +static int init_frame_decoder(APEContext *ctx) { - int i; - init_entropy_decoder(ctx); + int i, ret; + if ((ret = init_entropy_decoder(ctx)) < 0) + return ret; init_predictor_decoder(ctx); for (i = 0; i < APE_FILTER_LEVELS; i++) { if (!ape_filter_orders[ctx->fset][i]) break; - init_filter(ctx, ctx->filters[i], ctx->filterbuf[i], ape_filter_orders[ctx->fset][i]); + init_filter(ctx, ctx->filters[i], ctx->filterbuf[i], + ape_filter_orders[ctx->fset][i]); } + return 0; } -static void ape_unpack_mono(APEContext * ctx, int count) +static void ape_unpack_mono(APEContext *ctx, int count) { - int32_t left; int32_t *decoded0 = ctx->decoded0; int32_t *decoded1 = ctx->decoded1; @@ -754,14 +778,11 @@ /* Pseudo-stereo - just copy left channel to right channel */ if (ctx->channels == 2) { - while (count--) { - left = *decoded0; - *(decoded1++) = *(decoded0++) = left; - } + memcpy(decoded1, decoded0, count * sizeof(*decoded1)); } } -static void ape_unpack_stereo(APEContext * ctx, int count) +static void ape_unpack_stereo(APEContext *ctx, int count) { int32_t left, right; int32_t *decoded0 = ctx->decoded0; @@ -789,66 +810,87 @@ } } -static int ape_decode_frame(AVCodecContext * avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int ape_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; APEContext *s = avctx->priv_data; - int16_t *samples = data; - int nblocks; - int i, n; + int16_t *samples; + int i, ret; int blockstodecode; - int bytes_used; + int bytes_used = 0; - if (buf_size == 0 && !s->samples) { - *data_size = 0; - return 0; - } - - /* should not happen but who knows */ - if (BLOCKS_PER_LOOP * 2 * avctx->channels > *data_size) { - av_log (avctx, AV_LOG_ERROR, "Packet size is too big to be handled in lavc! (max is %d where you have %d)\n", *data_size, s->samples * 2 * avctx->channels); - return -1; - } + /* this should never be negative, but bad things will happen if it is, so + check it just to make sure. */ + av_assert0(s->samples >= 0); if(!s->samples){ - s->data = av_realloc(s->data, (buf_size + 3) & ~3); + uint32_t nblocks, offset; + void *tmp_data; + + if (!buf_size) { + *got_frame_ptr = 0; + return 0; + } + if (buf_size < 8) { + av_log(avctx, AV_LOG_ERROR, "Packet is too small\n"); + return AVERROR_INVALIDDATA; + } + + tmp_data = av_realloc(s->data, FFALIGN(buf_size, 4)); + if (!tmp_data) + return AVERROR(ENOMEM); + s->data = tmp_data; s->dsp.bswap_buf((uint32_t*)s->data, (const uint32_t*)buf, buf_size >> 2); - s->ptr = s->last_ptr = s->data; + s->ptr = s->data; s->data_end = s->data + buf_size; - nblocks = s->samples = bytestream_get_be32(&s->ptr); - n = bytestream_get_be32(&s->ptr); - if(n < 0 || n > 3){ + nblocks = bytestream_get_be32(&s->ptr); + offset = bytestream_get_be32(&s->ptr); + if (offset > 3) { av_log(avctx, AV_LOG_ERROR, "Incorrect offset passed\n"); s->data = NULL; - return -1; + return AVERROR_INVALIDDATA; + } + if (s->data_end - s->ptr < offset) { + av_log(avctx, AV_LOG_ERROR, "Packet is too small\n"); + return AVERROR_INVALIDDATA; } - s->ptr += n; + s->ptr += offset; - s->currentframeblocks = nblocks; - buf += 4; - if (s->samples <= 0) { - *data_size = 0; - return buf_size; + if (!nblocks || nblocks > INT_MAX) { + av_log(avctx, AV_LOG_ERROR, "Invalid sample count: %u.\n", nblocks); + return AVERROR_INVALIDDATA; } + s->samples = nblocks; memset(s->decoded0, 0, sizeof(s->decoded0)); memset(s->decoded1, 0, sizeof(s->decoded1)); /* Initialize the frame decoder */ - init_frame_decoder(s); + if (init_frame_decoder(s) < 0) { + av_log(avctx, AV_LOG_ERROR, "Error reading frame header\n"); + return AVERROR_INVALIDDATA; + } + + bytes_used = buf_size; } if (!s->data) { - *data_size = 0; + *got_frame_ptr = 0; return buf_size; } - nblocks = s->samples; - blockstodecode = FFMIN(BLOCKS_PER_LOOP, nblocks); + blockstodecode = FFMIN(BLOCKS_PER_LOOP, s->samples); + + /* get output buffer */ + s->frame.nb_samples = blockstodecode; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (int16_t *)s->frame.data[0]; s->error=0; @@ -858,10 +900,10 @@ ape_unpack_stereo(s, blockstodecode); emms_c(); - if(s->error || s->ptr > s->data_end){ + if (s->error) { s->samples=0; av_log(avctx, AV_LOG_ERROR, "Error decoding frame\n"); - return -1; + return AVERROR_INVALIDDATA; } for (i = 0; i < blockstodecode; i++) { @@ -872,9 +914,9 @@ s->samples -= blockstodecode; - *data_size = blockstodecode * 2 * s->channels; - bytes_used = s->samples ? s->ptr - s->last_ptr : buf_size; - s->last_ptr = s->ptr; + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return bytes_used; } @@ -885,15 +927,14 @@ } AVCodec ff_ape_decoder = { - "ape", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_APE, - sizeof(APEContext), - ape_decode_init, - NULL, - ape_decode_close, - ape_decode_frame, - .capabilities = CODEC_CAP_SUBFRAMES, + .name = "ape", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_APE, + .priv_data_size = sizeof(APEContext), + .init = ape_decode_init, + .close = ape_decode_close, + .decode = ape_decode_frame, + .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DELAY | CODEC_CAP_DR1, .flush = ape_flush, .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/api-example.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/api-example.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/api-example.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/api-example.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,8 +20,9 @@ /** * @file - * avcodec API use example. + * libavcodec API use example. * + * @example libavcodec/api-example.c * Note that this library only handles codecs (mpeg, mpeg4, etc...), * not file formats (avi, vob, etc...). See library 'libavformat' for the * format handling @@ -37,6 +38,7 @@ #include "libavcodec/avcodec.h" #include "libavutil/mathematics.h" +#include "libavutil/samplefmt.h" #define INBUF_SIZE 4096 #define AUDIO_INBUF_SIZE 20480 @@ -64,7 +66,7 @@ exit(1); } - c= avcodec_alloc_context(); + c = avcodec_alloc_context3(codec); /* put sample parameters */ c->bit_rate = 64000; @@ -117,11 +119,11 @@ { AVCodec *codec; AVCodecContext *c= NULL; - int out_size, len; + int len; FILE *f, *outfile; - uint8_t *outbuf; uint8_t inbuf[AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE]; AVPacket avpkt; + AVFrame *decoded_frame = NULL; av_init_packet(&avpkt); @@ -134,7 +136,7 @@ exit(1); } - c= avcodec_alloc_context(); + c = avcodec_alloc_context3(codec); /* open it */ if (avcodec_open(c, codec) < 0) { @@ -142,8 +144,6 @@ exit(1); } - outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE); - f = fopen(filename, "rb"); if (!f) { fprintf(stderr, "could not open %s\n", filename); @@ -160,15 +160,27 @@ avpkt.size = fread(inbuf, 1, AUDIO_INBUF_SIZE, f); while (avpkt.size > 0) { - out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; - len = avcodec_decode_audio3(c, (short *)outbuf, &out_size, &avpkt); + int got_frame = 0; + + if (!decoded_frame) { + if (!(decoded_frame = avcodec_alloc_frame())) { + fprintf(stderr, "out of memory\n"); + exit(1); + } + } else + avcodec_get_frame_defaults(decoded_frame); + + len = avcodec_decode_audio4(c, decoded_frame, &got_frame, &avpkt); if (len < 0) { fprintf(stderr, "Error while decoding\n"); exit(1); } - if (out_size > 0) { + if (got_frame) { /* if a frame has been decoded, output it */ - fwrite(outbuf, 1, out_size, outfile); + int data_size = av_samples_get_buffer_size(NULL, c->channels, + decoded_frame->nb_samples, + c->sample_fmt, 1); + fwrite(decoded_frame->data[0], 1, data_size, outfile); } avpkt.size -= len; avpkt.data += len; @@ -188,10 +200,10 @@ fclose(outfile); fclose(f); - free(outbuf); avcodec_close(c); av_free(c); + av_free(decoded_frame); } /* @@ -215,7 +227,7 @@ exit(1); } - c= avcodec_alloc_context(); + c = avcodec_alloc_context3(codec); picture= avcodec_alloc_frame(); /* put sample parameters */ @@ -346,7 +358,7 @@ exit(1); } - c= avcodec_alloc_context(); + c = avcodec_alloc_context3(codec); picture= avcodec_alloc_frame(); if(codec->capabilities&CODEC_CAP_TRUNCATED) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/aac.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/aac.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/aac.h 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/aac.h 2012-01-11 00:34:30.000000000 +0000 @@ -114,12 +114,15 @@ "vmov d1, %2, %3 \n\t" "lsls %6, %6, #1 \n\t" "and %0, %5, #1<<31 \n\t" + "it cs \n\t" "lslcs %5, %5, #1 \n\t" "lsls %6, %6, #1 \n\t" "and %1, %5, #1<<31 \n\t" + "it cs \n\t" "lslcs %5, %5, #1 \n\t" "lsls %6, %6, #1 \n\t" "and %2, %5, #1<<31 \n\t" + "it cs \n\t" "lslcs %5, %5, #1 \n\t" "vmov d4, %0, %1 \n\t" "and %3, %5, #1<<31 \n\t" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/ac3dsp_arm.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/ac3dsp_arm.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/ac3dsp_arm.S 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/ac3dsp_arm.S 2012-01-11 00:34:30.000000000 +0000 @@ -27,6 +27,7 @@ lsl r3, lr, #1 ldrh r12, [r0, r3] subs r2, r2, #1 + it gt ldrbgt lr, [r1], #1 add r12, r12, #1 strh r12, [r0, r3] diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/ac3dsp_armv6.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/ac3dsp_armv6.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/ac3dsp_armv6.S 2011-05-15 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/ac3dsp_armv6.S 2012-01-11 00:34:30.000000000 +0000 @@ -37,14 +37,16 @@ ldrb r10, [r4], #1 1: ldrsh r9, [r0], #2 @ mask[band] - movw r8, #0x1fe0 + mov r8, #0xff0 sub r9, r9, r12 @ - snr_offset mov r11, r10 ldrb r10, [r4], #1 @ band_start_tab[band++] subs r9, r9, r5 @ - floor + it lt movlt r9, #0 cmp r10, r3 @ - end - and r9, r9, r8 @ & 0x1fe0 + and r9, r9, r8, lsl #1 @ & 0x1fe0 + ite gt subgt r8, r3, r11 suble r8, r10, r11 add r9, r9, r5 @ + floor => m diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/ac3dsp_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/ac3dsp_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/ac3dsp_neon.S 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/ac3dsp_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -41,6 +41,7 @@ function ff_ac3_exponent_min_neon, export=1 cmp r1, #0 + it eq bxeq lr push {lr} mov r12, #256 @@ -94,19 +95,14 @@ endfunc function ff_ac3_extract_exponents_neon, export=1 - vmov.i32 q14, #24 vmov.i32 q15, #8 1: - vld1.32 {q0}, [r1,:128] + vld1.32 {q0}, [r1,:128]! vabs.s32 q1, q0 vclz.i32 q3, q1 vsub.i32 q3, q3, q15 - vcge.s32 q2, q3, q14 - vbit q3, q14, q2 - vbic q0, q0, q2 vmovn.i32 d6, q3 vmovn.i16 d6, q3 - vst1.32 {q0}, [r1,:128]! vst1.32 {d6[0]}, [r0,:32]! subs r2, r2, #4 bgt 1b diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/asm-offsets.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/asm-offsets.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/asm-offsets.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/asm-offsets.h 2012-01-11 00:34:30.000000000 +0000 @@ -29,11 +29,11 @@ #endif /* MpegEncContext */ -#define Y_DC_SCALE 0xb4 -#define C_DC_SCALE 0xb8 -#define AC_PRED 0xbc -#define BLOCK_LAST_INDEX 0xc0 -#define H263_AIC 0xf0 -#define INTER_SCANTAB_RASTER_END 0x138 +#define Y_DC_SCALE 0xa8 +#define C_DC_SCALE 0xac +#define AC_PRED 0xb0 +#define BLOCK_LAST_INDEX 0xb4 +#define H263_AIC 0xe4 +#define INTER_SCANTAB_RASTER_END 0x12c #endif /* AVCODEC_ARM_ASM_OFFSETS_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/asm.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/asm.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/asm.S 2011-05-31 02:05:07.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/asm.S 2012-01-11 00:34:30.000000000 +0000 @@ -26,7 +26,32 @@ # define ELF @ #endif +#if CONFIG_THUMB +# define A @ +# define T +#else +# define A +# define T @ +#endif + +#if HAVE_NEON + .arch armv7-a +#elif HAVE_ARMV6T2 + .arch armv6t2 +#elif HAVE_ARMV6 + .arch armv6 +#elif HAVE_ARMV5TE + .arch armv5te +#endif + +#if HAVE_NEON + .fpu neon +#elif HAVE_ARMVFP + .fpu vfp +#endif + .syntax unified +T .thumb .macro require8 val=1 ELF .eabi_attribute 24, \val @@ -82,6 +107,96 @@ #endif .endm +.macro ldr_pre rt, rn, rm:vararg +A ldr \rt, [\rn, \rm]! +T add \rn, \rn, \rm +T ldr \rt, [\rn] +.endm + +.macro ldr_dpre rt, rn, rm:vararg +A ldr \rt, [\rn, -\rm]! +T sub \rn, \rn, \rm +T ldr \rt, [\rn] +.endm + +.macro ldr_post rt, rn, rm:vararg +A ldr \rt, [\rn], \rm +T ldr \rt, [\rn] +T add \rn, \rn, \rm +.endm + +.macro ldrd_reg rt, rt2, rn, rm +A ldrd \rt, \rt2, [\rn, \rm] +T add \rt, \rn, \rm +T ldrd \rt, \rt2, [\rt] +.endm + +.macro ldrd_post rt, rt2, rn, rm +A ldrd \rt, \rt2, [\rn], \rm +T ldrd \rt, \rt2, [\rn] +T add \rn, \rn, \rm +.endm + +.macro ldrh_pre rt, rn, rm +A ldrh \rt, [\rn, \rm]! +T add \rn, \rn, \rm +T ldrh \rt, [\rn] +.endm + +.macro ldrh_dpre rt, rn, rm +A ldrh \rt, [\rn, -\rm]! +T sub \rn, \rn, \rm +T ldrh \rt, [\rn] +.endm + +.macro ldrh_post rt, rn, rm +A ldrh \rt, [\rn], \rm +T ldrh \rt, [\rn] +T add \rn, \rn, \rm +.endm + +.macro str_post rt, rn, rm:vararg +A str \rt, [\rn], \rm +T str \rt, [\rn] +T add \rn, \rn, \rm +.endm + +.macro strb_post rt, rn, rm:vararg +A strb \rt, [\rn], \rm +T strb \rt, [\rn] +T add \rn, \rn, \rm +.endm + +.macro strd_post rt, rt2, rn, rm +A strd \rt, \rt2, [\rn], \rm +T strd \rt, \rt2, [\rn] +T add \rn, \rn, \rm +.endm + +.macro strh_pre rt, rn, rm +A strh \rt, [\rn, \rm]! +T add \rn, \rn, \rm +T strh \rt, [\rn] +.endm + +.macro strh_dpre rt, rn, rm +A strh \rt, [\rn, -\rm]! +T sub \rn, \rn, \rm +T strh \rt, [\rn] +.endm + +.macro strh_post rt, rn, rm +A strh \rt, [\rn], \rm +T strh \rt, [\rn] +T add \rn, \rn, \rm +.endm + +.macro strh_dpost rt, rn, rm +A strh \rt, [\rn], -\rm +T strh \rt, [\rn] +T sub \rn, \rn, \rm +.endm + #if HAVE_VFP_ARGS .eabi_attribute 28, 1 # define VFP diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dcadsp_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dcadsp_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dcadsp_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dcadsp_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -27,6 +27,7 @@ add r5, r2, #256*4-16 @ cf1 sub r1, r1, #12 cmp r3, #32 + ite eq moveq r6, #256/32 movne r6, #256/64 NOVFP vldr s0, [sp, #16] @ scale diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dca.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dca.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dca.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dca.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2011 Mans Rullgard + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_DCA_H +#define AVCODEC_ARM_DCA_H + +#include +#include "config.h" +#include "libavutil/intmath.h" + +#if HAVE_ARMV6 && HAVE_INLINE_ASM && AV_GCC_VERSION_AT_LEAST(4,4) + +#define decode_blockcodes decode_blockcodes +static inline int decode_blockcodes(int code1, int code2, int levels, + int *values) +{ + int v0, v1, v2, v3, v4, v5; + + __asm__ ("smmul %8, %14, %18 \n" + "smmul %11, %15, %18 \n" + "smlabb %14, %8, %17, %14 \n" + "smlabb %15, %11, %17, %15 \n" + "smmul %9, %8, %18 \n" + "smmul %12, %11, %18 \n" + "sub %14, %14, %16, lsr #1 \n" + "sub %15, %15, %16, lsr #1 \n" + "smlabb %8, %9, %17, %8 \n" + "smlabb %11, %12, %17, %11 \n" + "smmul %10, %9, %18 \n" + "smmul %13, %12, %18 \n" + "str %14, %0 \n" + "str %15, %4 \n" + "sub %8, %8, %16, lsr #1 \n" + "sub %11, %11, %16, lsr #1 \n" + "smlabb %9, %10, %17, %9 \n" + "smlabb %12, %13, %17, %12 \n" + "smmul %14, %10, %18 \n" + "smmul %15, %13, %18 \n" + "str %8, %1 \n" + "str %11, %5 \n" + "sub %9, %9, %16, lsr #1 \n" + "sub %12, %12, %16, lsr #1 \n" + "smlabb %10, %14, %17, %10 \n" + "smlabb %13, %15, %17, %13 \n" + "str %9, %2 \n" + "str %12, %6 \n" + "sub %10, %10, %16, lsr #1 \n" + "sub %13, %13, %16, lsr #1 \n" + "str %10, %3 \n" + "str %13, %7 \n" + : "=m"(values[0]), "=m"(values[1]), + "=m"(values[2]), "=m"(values[3]), + "=m"(values[4]), "=m"(values[5]), + "=m"(values[6]), "=m"(values[7]), + "=&r"(v0), "=&r"(v1), "=&r"(v2), + "=&r"(v3), "=&r"(v4), "=&r"(v5), + "+&r"(code1), "+&r"(code2) + : "r"(levels - 1), "r"(-levels), "r"(ff_inverse[levels])); + + return code1 | code2; +} + +#endif + +#if HAVE_NEON && HAVE_INLINE_ASM && HAVE_ASM_MOD_Y + +#define int8x8_fmul_int32 int8x8_fmul_int32 +static inline void int8x8_fmul_int32(float *dst, const int8_t *src, int scale) +{ + __asm__ ("vcvt.f32.s32 %2, %2, #4 \n" + "vld1.8 {d0}, [%1,:64] \n" + "vmovl.s8 q0, d0 \n" + "vmovl.s16 q1, d1 \n" + "vmovl.s16 q0, d0 \n" + "vcvt.f32.s32 q0, q0 \n" + "vcvt.f32.s32 q1, q1 \n" + "vmul.f32 q0, q0, %y2 \n" + "vmul.f32 q1, q1, %y2 \n" + "vst1.32 {q0-q1}, [%m0,:128] \n" + : "=Um"(*(float (*)[8])dst) + : "r"(src), "x"(scale) + : "d0", "d1", "d2", "d3"); +} + +#endif + +#endif /* AVCODEC_ARM_DCA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_arm.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_arm.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_arm.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_arm.S 2012-01-11 00:34:30.000000000 +0000 @@ -24,11 +24,6 @@ preserve8 -#if !HAVE_PLD -.macro pld reg -.endm -#endif - #if HAVE_ARMV5TE function ff_prefetch_arm, export=1 subs r2, r2, #1 @@ -37,6 +32,8 @@ bne ff_prefetch_arm bx lr endfunc +#else +#define pld @ #endif .macro ALIGN_QWORD_D shift, Rd0, Rd1, Rd2, Rd3, Rn0, Rn1, Rn2, Rn3, Rn4 @@ -554,10 +551,12 @@ and r9, r5, r14 and r10, r6, r14 and r11, r7, r14 + it eq andeq r14, r14, r14, \rnd #1 add r8, r8, r10 add r9, r9, r11 ldr r12, =0xfcfcfcfc >> 2 + itt eq addeq r8, r8, r14 addeq r9, r9, r14 and r4, r12, r4, lsr #2 @@ -638,8 +637,10 @@ mvn r5, r5 mvn r7, r7 tst r6, #0x100 + it ne movne r6, r5, lsr #24 tst r8, #0x100 + it ne movne r8, r7, lsr #24 mov r9, r6 ldrsh r5, [r0, #4] /* moved form [A] */ @@ -654,8 +655,10 @@ mvn r5, r5 mvn r7, r7 tst r6, #0x100 + it ne movne r6, r5, lsr #24 tst r8, #0x100 + it ne movne r8, r7, lsr #24 orr r9, r9, r6, lsl #16 ldr r4, [r1, #4] /* moved form [B] */ @@ -676,8 +679,10 @@ mvn r5, r5 mvn r7, r7 tst r6, #0x100 + it ne movne r6, r5, lsr #24 tst r8, #0x100 + it ne movne r8, r7, lsr #24 mov r9, r6 ldrsh r5, [r0, #12] /* moved from [D] */ @@ -692,8 +697,10 @@ mvn r5, r5 mvn r7, r7 tst r6, #0x100 + it ne movne r6, r5, lsr #24 tst r8, #0x100 + it ne movne r8, r7, lsr #24 orr r9, r9, r6, lsl #16 add r0, r0, #16 /* moved from [E] */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_armv6.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_armv6.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_armv6.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_armv6.S 2012-01-11 00:34:30.000000000 +0000 @@ -22,8 +22,6 @@ preserve8 - .text - .macro call_2x_pixels type, subp function ff_\type\()_pixels16\subp\()_armv6, export=1 push {r0-r3, lr} @@ -47,16 +45,16 @@ ldr r5, [r1, #4] ldr r6, [r1, #8] ldr r7, [r1, #12] - ldr r4, [r1], r2 + ldr_post r4, r1, r2 strd r6, r7, [r0, #8] ldr r9, [r1, #4] - strd r4, r5, [r0], r2 + strd_post r4, r5, r0, r2 ldr r10, [r1, #8] ldr r11, [r1, #12] - ldr r8, [r1], r2 + ldr_post r8, r1, r2 strd r10, r11, [r0, #8] subs r3, r3, #2 - strd r8, r9, [r0], r2 + strd_post r8, r9, r0, r2 bne 1b pop {r4-r11} @@ -67,12 +65,12 @@ push {r4-r7} 1: ldr r5, [r1, #4] - ldr r4, [r1], r2 + ldr_post r4, r1, r2 ldr r7, [r1, #4] - strd r4, r5, [r0], r2 - ldr r6, [r1], r2 + strd_post r4, r5, r0, r2 + ldr_post r6, r1, r2 subs r3, r3, #2 - strd r6, r7, [r0], r2 + strd_post r6, r7, r0, r2 bne 1b pop {r4-r7} @@ -90,7 +88,7 @@ ldr r5, [r1, #4] ldr r7, [r1, #5] lsr r6, r4, #8 - ldr r8, [r1, r2]! + ldr_pre r8, r1, r2 orr r6, r6, r5, lsl #24 ldr r9, [r1, #4] ldr r11, [r1, #5] @@ -112,9 +110,9 @@ uhadd8 r9, r9, r11 and r6, r6, r12 uadd8 r8, r8, r14 - strd r4, r5, [r0], r2 + strd_post r4, r5, r0, r2 uadd8 r9, r9, r6 - strd r8, r9, [r0], r2 + strd_post r8, r9, r0, r2 bne 1b pop {r4-r11, pc} @@ -127,7 +125,7 @@ orr r12, r12, r12, lsl #16 ldr r4, [r1] ldr r5, [r1, #4] - ldr r6, [r1, r2]! + ldr_pre r6, r1, r2 ldr r7, [r1, #4] 1: subs r3, r3, #2 @@ -136,7 +134,7 @@ uhadd8 r9, r5, r7 eor r11, r5, r7 and r10, r10, r12 - ldr r4, [r1, r2]! + ldr_pre r4, r1, r2 uadd8 r8, r8, r10 and r11, r11, r12 uadd8 r9, r9, r11 @@ -148,11 +146,11 @@ eor r7, r5, r7 uadd8 r10, r10, r6 and r7, r7, r12 - ldr r6, [r1, r2]! + ldr_pre r6, r1, r2 uadd8 r11, r11, r7 - strd r8, r9, [r0], r2 + strd_post r8, r9, r0, r2 ldr r7, [r1, #4] - strd r10, r11, [r0], r2 + strd_post r10, r11, r0, r2 bne 1b pop {r4-r11} @@ -166,7 +164,7 @@ ldr r4, [r1] ldr r5, [r1, #4] ldr r7, [r1, #5] - ldr r8, [r1, r2]! + ldr_pre r8, r1, r2 ldr r9, [r1, #4] ldr r14, [r1, #5] add r1, r1, r2 @@ -191,16 +189,16 @@ push {r4-r9, lr} ldr r4, [r1] ldr r5, [r1, #4] - ldr r6, [r1, r2]! + ldr_pre r6, r1, r2 ldr r7, [r1, #4] 1: subs r3, r3, #2 uhadd8 r8, r4, r6 - ldr r4, [r1, r2]! + ldr_pre r4, r1, r2 uhadd8 r9, r5, r7 ldr r5, [r1, #4] uhadd8 r12, r4, r6 - ldr r6, [r1, r2]! + ldr_pre r6, r1, r2 uhadd8 r14, r5, r7 ldr r7, [r1, #4] stm r0, {r8,r9} @@ -220,44 +218,44 @@ orr lr, lr, lr, lsl #16 ldrd r4, r5, [r0] ldr r10, [r1, #4] - ldr r9, [r1], r2 + ldr_post r9, r1, r2 subs r3, r3, #2 1: pld [r1, r2] eor r8, r4, r9 uhadd8 r4, r4, r9 eor r12, r5, r10 - ldrd r6, r7, [r0, r2] + ldrd_reg r6, r7, r0, r2 uhadd8 r5, r5, r10 and r8, r8, lr ldr r10, [r1, #4] and r12, r12, lr uadd8 r4, r4, r8 - ldr r9, [r1], r2 + ldr_post r9, r1, r2 eor r8, r6, r9 uadd8 r5, r5, r12 pld [r1, r2, lsl #1] eor r12, r7, r10 uhadd8 r6, r6, r9 - strd r4, r5, [r0], r2 + strd_post r4, r5, r0, r2 uhadd8 r7, r7, r10 beq 2f and r8, r8, lr - ldrd r4, r5, [r0, r2] + ldrd_reg r4, r5, r0, r2 uadd8 r6, r6, r8 ldr r10, [r1, #4] and r12, r12, lr subs r3, r3, #2 uadd8 r7, r7, r12 - ldr r9, [r1], r2 - strd r6, r7, [r0], r2 + ldr_post r9, r1, r2 + strd_post r6, r7, r0, r2 b 1b 2: and r8, r8, lr and r12, r12, lr uadd8 r6, r6, r8 uadd8 r7, r7, r12 - strd r6, r7, [r0], r2 + strd_post r6, r7, r0, r2 pop {r4-r10, pc} endfunc @@ -284,7 +282,7 @@ orr r6, r8, r5, lsl #8 orr r7, r4, lr, lsl #8 subs r3, r3, #1 - strd r6, r7, [r1], r2 + strd_post r6, r7, r1, r2 bgt 1b pop {r4-r8,pc} endfunc @@ -294,7 +292,7 @@ push {r4-r8, lr} mov lr, #8 1: - ldrd r4, r5, [r1], r2 + ldrd_post r4, r5, r1, r2 subs lr, lr, #1 uxtb16 r6, r4 uxtb16 r4, r4, ror #8 @@ -317,8 +315,8 @@ push {r4-r9, lr} mov lr, #8 1: - ldrd r4, r5, [r1], r3 - ldrd r6, r7, [r2], r3 + ldrd_post r4, r5, r1, r3 + ldrd_post r6, r7, r2, r3 uxtb16 r8, r4 uxtb16 r4, r4, ror #8 uxtb16 r9, r6 @@ -492,19 +490,19 @@ push {r4-r9, lr} mov r0, #0 mov lr, #0 - ldrd r4, r5, [r1], r3 + ldrd_post r4, r5, r1, r3 1: subs r12, r12, #2 ldr r7, [r2, #4] - ldr r6, [r2], r3 - ldrd r8, r9, [r1], r3 + ldr_post r6, r2, r3 + ldrd_post r8, r9, r1, r3 usada8 r0, r4, r6, r0 pld [r2, r3] usada8 lr, r5, r7, lr ldr r7, [r2, #4] - ldr r6, [r2], r3 + ldr_post r6, r2, r3 beq 2f - ldrd r4, r5, [r1], r3 + ldrd_post r4, r5, r1, r3 usada8 r0, r8, r6, r0 pld [r2, r3] usada8 lr, r9, r7, lr @@ -613,7 +611,7 @@ ldr r7, [r0, #12] usada8 r2, r6, lr, r2 beq 2f - ldr r4, [r0, r1]! + ldr_pre r4, r0, r1 usada8 r3, r7, lr, r3 bgt 1b 2: diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_init_arm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_init_arm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_init_arm.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_init_arm.c 2012-01-11 00:34:30.000000000 +0000 @@ -75,12 +75,12 @@ void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx) { - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; ff_put_pixels_clamped = c->put_pixels_clamped; ff_add_pixels_clamped = c->add_pixels_clamped; - if (!avctx->lowres) { + if (!avctx->lowres && avctx->bits_per_raw_sample <= 8) { if(avctx->idct_algo == FF_IDCT_AUTO || avctx->idct_algo == FF_IDCT_ARM){ c->idct_put = j_rev_dct_arm_put; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_init_armv5te.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_init_armv5te.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_init_armv5te.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_init_armv5te.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,8 +29,9 @@ void av_cold ff_dsputil_init_armv5te(DSPContext* c, AVCodecContext *avctx) { - if (!avctx->lowres && (avctx->idct_algo == FF_IDCT_AUTO || - avctx->idct_algo == FF_IDCT_SIMPLEARMV5TE)) { + if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 && + (avctx->idct_algo == FF_IDCT_AUTO || + avctx->idct_algo == FF_IDCT_SIMPLEARMV5TE)) { c->idct_put = ff_simple_idct_put_armv5te; c->idct_add = ff_simple_idct_add_armv5te; c->idct = ff_simple_idct_armv5te; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_init_armv6.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_init_armv6.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_init_armv6.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_init_armv6.c 2012-01-11 00:34:30.000000000 +0000 @@ -72,10 +72,11 @@ void av_cold ff_dsputil_init_armv6(DSPContext* c, AVCodecContext *avctx) { - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; - if (!avctx->lowres && (avctx->idct_algo == FF_IDCT_AUTO || - avctx->idct_algo == FF_IDCT_SIMPLEARMV6)) { + if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 && + (avctx->idct_algo == FF_IDCT_AUTO || + avctx->idct_algo == FF_IDCT_SIMPLEARMV6)) { c->idct_put = ff_simple_idct_put_armv6; c->idct_add = ff_simple_idct_add_armv6; c->idct = ff_simple_idct_armv6; @@ -105,8 +106,9 @@ c->avg_pixels_tab[1][0] = ff_avg_pixels8_armv6; } + if (!high_bit_depth) + c->get_pixels = ff_get_pixels_armv6; c->add_pixels_clamped = ff_add_pixels_clamped_armv6; - c->get_pixels = ff_get_pixels_armv6; c->diff_pixels = ff_diff_pixels_armv6; c->pix_abs[0][0] = ff_pix_abs16_armv6; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_init_neon.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_init_neon.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_init_neon.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_init_neon.c 2012-01-11 00:34:30.000000000 +0000 @@ -53,7 +53,19 @@ void ff_put_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels16_x2_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels16_y2_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels16_xy2_neon(uint8_t *, const uint8_t *, int, int); void ff_avg_pixels8_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels8_x2_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels8_y2_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels8_xy2_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels16_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels16_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels16_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels8_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels8_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); +void ff_avg_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int); void ff_put_pixels_clamped_neon(const DCTELEM *, uint8_t *, int); @@ -143,14 +155,8 @@ const float *src1, const float *win, int len); void ff_vector_fmul_scalar_neon(float *dst, const float *src, float mul, int len); -void ff_vector_fmul_sv_scalar_2_neon(float *dst, const float *src, - const float **vp, float mul, int len); -void ff_vector_fmul_sv_scalar_4_neon(float *dst, const float *src, - const float **vp, float mul, int len); -void ff_sv_fmul_scalar_2_neon(float *dst, const float **vp, float mul, - int len); -void ff_sv_fmul_scalar_4_neon(float *dst, const float **vp, float mul, - int len); +void ff_vector_fmac_scalar_neon(float *dst, const float *src, float mul, + int len); void ff_butterflies_float_neon(float *v1, float *v2, int len); float ff_scalarproduct_float_neon(const float *v1, const float *v2, int len); void ff_vector_fmul_reverse_neon(float *dst, const float *src0, @@ -160,6 +166,8 @@ void ff_vector_clipf_neon(float *dst, const float *src, float min, float max, int len); +void ff_vector_clip_int32_neon(int32_t *dst, const int32_t *src, int32_t min, + int32_t max, unsigned int len); void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize); @@ -173,9 +181,9 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx) { - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; - if (!avctx->lowres) { + if (!avctx->lowres && avctx->bits_per_raw_sample <= 8) { if (avctx->idct_algo == FF_IDCT_AUTO || avctx->idct_algo == FF_IDCT_SIMPLENEON) { c->idct_put = ff_simple_idct_put_neon; @@ -193,37 +201,51 @@ } if (!high_bit_depth) { - c->clear_block = ff_clear_block_neon; - c->clear_blocks = ff_clear_blocks_neon; - - c->put_pixels_tab[0][0] = ff_put_pixels16_neon; - c->put_pixels_tab[0][1] = ff_put_pixels16_x2_neon; - c->put_pixels_tab[0][2] = ff_put_pixels16_y2_neon; - c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_neon; - c->put_pixels_tab[1][0] = ff_put_pixels8_neon; - c->put_pixels_tab[1][1] = ff_put_pixels8_x2_neon; - c->put_pixels_tab[1][2] = ff_put_pixels8_y2_neon; - c->put_pixels_tab[1][3] = ff_put_pixels8_xy2_neon; - - c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_neon; - c->put_no_rnd_pixels_tab[0][1] = ff_put_pixels16_x2_no_rnd_neon; - c->put_no_rnd_pixels_tab[0][2] = ff_put_pixels16_y2_no_rnd_neon; - c->put_no_rnd_pixels_tab[0][3] = ff_put_pixels16_xy2_no_rnd_neon; - c->put_no_rnd_pixels_tab[1][0] = ff_put_pixels8_neon; - c->put_no_rnd_pixels_tab[1][1] = ff_put_pixels8_x2_no_rnd_neon; - c->put_no_rnd_pixels_tab[1][2] = ff_put_pixels8_y2_no_rnd_neon; - c->put_no_rnd_pixels_tab[1][3] = ff_put_pixels8_xy2_no_rnd_neon; + c->clear_block = ff_clear_block_neon; + c->clear_blocks = ff_clear_blocks_neon; - c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon; - c->avg_pixels_tab[1][0] = ff_avg_pixels8_neon; + c->put_pixels_tab[0][0] = ff_put_pixels16_neon; + c->put_pixels_tab[0][1] = ff_put_pixels16_x2_neon; + c->put_pixels_tab[0][2] = ff_put_pixels16_y2_neon; + c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_neon; + c->put_pixels_tab[1][0] = ff_put_pixels8_neon; + c->put_pixels_tab[1][1] = ff_put_pixels8_x2_neon; + c->put_pixels_tab[1][2] = ff_put_pixels8_y2_neon; + c->put_pixels_tab[1][3] = ff_put_pixels8_xy2_neon; + + c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_neon; + c->put_no_rnd_pixels_tab[0][1] = ff_put_pixels16_x2_no_rnd_neon; + c->put_no_rnd_pixels_tab[0][2] = ff_put_pixels16_y2_no_rnd_neon; + c->put_no_rnd_pixels_tab[0][3] = ff_put_pixels16_xy2_no_rnd_neon; + c->put_no_rnd_pixels_tab[1][0] = ff_put_pixels8_neon; + c->put_no_rnd_pixels_tab[1][1] = ff_put_pixels8_x2_no_rnd_neon; + c->put_no_rnd_pixels_tab[1][2] = ff_put_pixels8_y2_no_rnd_neon; + c->put_no_rnd_pixels_tab[1][3] = ff_put_pixels8_xy2_no_rnd_neon; + + c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon; + c->avg_pixels_tab[0][1] = ff_avg_pixels16_x2_neon; + c->avg_pixels_tab[0][2] = ff_avg_pixels16_y2_neon; + c->avg_pixels_tab[0][3] = ff_avg_pixels16_xy2_neon; + c->avg_pixels_tab[1][0] = ff_avg_pixels8_neon; + c->avg_pixels_tab[1][1] = ff_avg_pixels8_x2_neon; + c->avg_pixels_tab[1][2] = ff_avg_pixels8_y2_neon; + c->avg_pixels_tab[1][3] = ff_avg_pixels8_xy2_neon; + + c->avg_no_rnd_pixels_tab[0][0] = ff_avg_pixels16_neon; + c->avg_no_rnd_pixels_tab[0][1] = ff_avg_pixels16_x2_no_rnd_neon; + c->avg_no_rnd_pixels_tab[0][2] = ff_avg_pixels16_y2_no_rnd_neon; + c->avg_no_rnd_pixels_tab[0][3] = ff_avg_pixels16_xy2_no_rnd_neon; + c->avg_no_rnd_pixels_tab[1][0] = ff_avg_pixels8_neon; + c->avg_no_rnd_pixels_tab[1][1] = ff_avg_pixels8_x2_no_rnd_neon; + c->avg_no_rnd_pixels_tab[1][2] = ff_avg_pixels8_y2_no_rnd_neon; + c->avg_no_rnd_pixels_tab[1][3] = ff_avg_pixels8_xy2_no_rnd_neon; } c->add_pixels_clamped = ff_add_pixels_clamped_neon; c->put_pixels_clamped = ff_put_pixels_clamped_neon; c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon; - if (CONFIG_H264_DECODER) { - if (!high_bit_depth) { + if (CONFIG_H264_DECODER && !high_bit_depth) { c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon; c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_neon; c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_neon; @@ -299,7 +321,6 @@ c->avg_h264_qpel_pixels_tab[1][13] = ff_avg_h264_qpel8_mc13_neon; c->avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon; c->avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon; - } } if (CONFIG_VP3_DECODER) { @@ -311,17 +332,13 @@ c->vector_fmul = ff_vector_fmul_neon; c->vector_fmul_window = ff_vector_fmul_window_neon; c->vector_fmul_scalar = ff_vector_fmul_scalar_neon; + c->vector_fmac_scalar = ff_vector_fmac_scalar_neon; c->butterflies_float = ff_butterflies_float_neon; c->scalarproduct_float = ff_scalarproduct_float_neon; c->vector_fmul_reverse = ff_vector_fmul_reverse_neon; c->vector_fmul_add = ff_vector_fmul_add_neon; c->vector_clipf = ff_vector_clipf_neon; - - c->vector_fmul_sv_scalar[0] = ff_vector_fmul_sv_scalar_2_neon; - c->vector_fmul_sv_scalar[1] = ff_vector_fmul_sv_scalar_4_neon; - - c->sv_fmul_scalar[0] = ff_sv_fmul_scalar_2_neon; - c->sv_fmul_scalar[1] = ff_sv_fmul_scalar_4_neon; + c->vector_clip_int32 = ff_vector_clip_int32_neon; if (CONFIG_VORBIS_DECODER) c->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_neon; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_iwmmxt.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_iwmmxt.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_iwmmxt.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_iwmmxt.c 2012-01-11 00:34:30.000000000 +0000 @@ -155,7 +155,7 @@ void ff_dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx) { int mm_flags = AV_CPU_FLAG_IWMMXT; /* multimedia extension flags */ - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; if (avctx->dsp_mask) { if (avctx->dsp_mask & AV_CPU_FLAG_FORCE) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_neon.S 2011-03-25 03:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,6 @@ #include "asm.S" preserve8 - .text function ff_clear_block_neon, export=1 vmov.i16 q0, #0 @@ -41,75 +40,89 @@ bx lr endfunc - .macro pixels16 avg=0 -.if \avg - mov ip, r0 -.endif -1: vld1.64 {d0, d1}, [r1], r2 - vld1.64 {d2, d3}, [r1], r2 - vld1.64 {d4, d5}, [r1], r2 +.macro pixels16 rnd=1, avg=0 + .if \avg + mov r12, r0 + .endif +1: vld1.64 {q0}, [r1], r2 + vld1.64 {q1}, [r1], r2 + vld1.64 {q2}, [r1], r2 pld [r1, r2, lsl #2] - vld1.64 {d6, d7}, [r1], r2 + vld1.64 {q3}, [r1], r2 pld [r1] pld [r1, r2] pld [r1, r2, lsl #1] -.if \avg - vld1.64 {d16,d17}, [ip,:128], r2 + .if \avg + vld1.64 {q8}, [r12,:128], r2 vrhadd.u8 q0, q0, q8 - vld1.64 {d18,d19}, [ip,:128], r2 + vld1.64 {q9}, [r12,:128], r2 vrhadd.u8 q1, q1, q9 - vld1.64 {d20,d21}, [ip,:128], r2 + vld1.64 {q10}, [r12,:128], r2 vrhadd.u8 q2, q2, q10 - vld1.64 {d22,d23}, [ip,:128], r2 + vld1.64 {q11}, [r12,:128], r2 vrhadd.u8 q3, q3, q11 -.endif + .endif subs r3, r3, #4 - vst1.64 {d0, d1}, [r0,:128], r2 - vst1.64 {d2, d3}, [r0,:128], r2 - vst1.64 {d4, d5}, [r0,:128], r2 - vst1.64 {d6, d7}, [r0,:128], r2 + vst1.64 {q0}, [r0,:128], r2 + vst1.64 {q1}, [r0,:128], r2 + vst1.64 {q2}, [r0,:128], r2 + vst1.64 {q3}, [r0,:128], r2 bne 1b bx lr - .endm +.endm - .macro pixels16_x2 vhadd=vrhadd.u8 -1: vld1.64 {d0-d2}, [r1], r2 - vld1.64 {d4-d6}, [r1], r2 +.macro pixels16_x2 rnd=1, avg=0 +1: vld1.64 {d0-d2}, [r1], r2 + vld1.64 {d4-d6}, [r1], r2 pld [r1] pld [r1, r2] subs r3, r3, #2 vext.8 q1, q0, q1, #1 - \vhadd q0, q0, q1 + avg q0, q0, q1 vext.8 q3, q2, q3, #1 - \vhadd q2, q2, q3 - vst1.64 {d0, d1}, [r0,:128], r2 - vst1.64 {d4, d5}, [r0,:128], r2 + avg q2, q2, q3 + .if \avg + vld1.8 {q1}, [r0,:128], r2 + vld1.8 {q3}, [r0,:128] + vrhadd.u8 q0, q0, q1 + vrhadd.u8 q2, q2, q3 + sub r0, r0, r2 + .endif + vst1.64 {q0}, [r0,:128], r2 + vst1.64 {q2}, [r0,:128], r2 bne 1b bx lr - .endm +.endm - .macro pixels16_y2 vhadd=vrhadd.u8 - vld1.64 {d0, d1}, [r1], r2 - vld1.64 {d2, d3}, [r1], r2 +.macro pixels16_y2 rnd=1, avg=0 + vld1.64 {q0}, [r1], r2 + vld1.64 {q1}, [r1], r2 1: subs r3, r3, #2 - \vhadd q2, q0, q1 - vld1.64 {d0, d1}, [r1], r2 - \vhadd q3, q0, q1 - vld1.64 {d2, d3}, [r1], r2 + avg q2, q0, q1 + vld1.64 {q0}, [r1], r2 + avg q3, q0, q1 + vld1.64 {q1}, [r1], r2 pld [r1] pld [r1, r2] - vst1.64 {d4, d5}, [r0,:128], r2 - vst1.64 {d6, d7}, [r0,:128], r2 + .if \avg + vld1.8 {q8}, [r0,:128], r2 + vld1.8 {q9}, [r0,:128] + vrhadd.u8 q2, q2, q8 + vrhadd.u8 q3, q3, q9 + sub r0, r0, r2 + .endif + vst1.64 {q2}, [r0,:128], r2 + vst1.64 {q3}, [r0,:128], r2 bne 1b bx lr - .endm +.endm - .macro pixels16_xy2 vshrn=vrshrn.u16 no_rnd=0 - vld1.64 {d0-d2}, [r1], r2 - vld1.64 {d4-d6}, [r1], r2 -.if \no_rnd +.macro pixels16_xy2 rnd=1, avg=0 + vld1.64 {d0-d2}, [r1], r2 + vld1.64 {d4-d6}, [r1], r2 + .ifeq \rnd vmov.i16 q13, #1 -.endif + .endif pld [r1] pld [r1, r2] vext.8 q1, q0, q1, #1 @@ -119,109 +132,129 @@ vaddl.u8 q9, d4, d6 vaddl.u8 q11, d5, d7 1: subs r3, r3, #2 - vld1.64 {d0-d2}, [r1], r2 + vld1.64 {d0-d2}, [r1], r2 vadd.u16 q12, q8, q9 pld [r1] -.if \no_rnd + .ifeq \rnd vadd.u16 q12, q12, q13 -.endif + .endif vext.8 q15, q0, q1, #1 vadd.u16 q1 , q10, q11 - \vshrn d28, q12, #2 -.if \no_rnd + shrn d28, q12, #2 + .ifeq \rnd vadd.u16 q1, q1, q13 -.endif - \vshrn d29, q1, #2 + .endif + shrn d29, q1, #2 + .if \avg + vld1.8 {q8}, [r0,:128] + vrhadd.u8 q14, q14, q8 + .endif vaddl.u8 q8, d0, d30 - vld1.64 {d2-d4}, [r1], r2 + vld1.64 {d2-d4}, [r1], r2 vaddl.u8 q10, d1, d31 - vst1.64 {d28,d29}, [r0,:128], r2 + vst1.64 {q14}, [r0,:128], r2 vadd.u16 q12, q8, q9 pld [r1, r2] -.if \no_rnd + .ifeq \rnd vadd.u16 q12, q12, q13 -.endif + .endif vext.8 q2, q1, q2, #1 vadd.u16 q0, q10, q11 - \vshrn d30, q12, #2 -.if \no_rnd + shrn d30, q12, #2 + .ifeq \rnd vadd.u16 q0, q0, q13 -.endif - \vshrn d31, q0, #2 + .endif + shrn d31, q0, #2 + .if \avg + vld1.8 {q9}, [r0,:128] + vrhadd.u8 q15, q15, q9 + .endif vaddl.u8 q9, d2, d4 vaddl.u8 q11, d3, d5 - vst1.64 {d30,d31}, [r0,:128], r2 + vst1.64 {q15}, [r0,:128], r2 bgt 1b bx lr - .endm +.endm - .macro pixels8 avg=0 -1: vld1.64 {d0}, [r1], r2 - vld1.64 {d1}, [r1], r2 - vld1.64 {d2}, [r1], r2 +.macro pixels8 rnd=1, avg=0 +1: vld1.64 {d0}, [r1], r2 + vld1.64 {d1}, [r1], r2 + vld1.64 {d2}, [r1], r2 pld [r1, r2, lsl #2] - vld1.64 {d3}, [r1], r2 + vld1.64 {d3}, [r1], r2 pld [r1] pld [r1, r2] pld [r1, r2, lsl #1] -.if \avg - vld1.64 {d4}, [r0,:64], r2 + .if \avg + vld1.64 {d4}, [r0,:64], r2 vrhadd.u8 d0, d0, d4 - vld1.64 {d5}, [r0,:64], r2 + vld1.64 {d5}, [r0,:64], r2 vrhadd.u8 d1, d1, d5 - vld1.64 {d6}, [r0,:64], r2 + vld1.64 {d6}, [r0,:64], r2 vrhadd.u8 d2, d2, d6 - vld1.64 {d7}, [r0,:64], r2 + vld1.64 {d7}, [r0,:64], r2 vrhadd.u8 d3, d3, d7 sub r0, r0, r2, lsl #2 -.endif + .endif subs r3, r3, #4 - vst1.64 {d0}, [r0,:64], r2 - vst1.64 {d1}, [r0,:64], r2 - vst1.64 {d2}, [r0,:64], r2 - vst1.64 {d3}, [r0,:64], r2 + vst1.64 {d0}, [r0,:64], r2 + vst1.64 {d1}, [r0,:64], r2 + vst1.64 {d2}, [r0,:64], r2 + vst1.64 {d3}, [r0,:64], r2 bne 1b bx lr - .endm +.endm - .macro pixels8_x2 vhadd=vrhadd.u8 -1: vld1.64 {d0, d1}, [r1], r2 +.macro pixels8_x2 rnd=1, avg=0 +1: vld1.64 {q0}, [r1], r2 vext.8 d1, d0, d1, #1 - vld1.64 {d2, d3}, [r1], r2 + vld1.64 {q1}, [r1], r2 vext.8 d3, d2, d3, #1 pld [r1] pld [r1, r2] subs r3, r3, #2 vswp d1, d2 - \vhadd q0, q0, q1 - vst1.64 {d0}, [r0,:64], r2 - vst1.64 {d1}, [r0,:64], r2 + avg q0, q0, q1 + .if \avg + vld1.8 {d4}, [r0,:64], r2 + vld1.8 {d5}, [r0,:64] + vrhadd.u8 q0, q0, q2 + sub r0, r0, r2 + .endif + vst1.64 {d0}, [r0,:64], r2 + vst1.64 {d1}, [r0,:64], r2 bne 1b bx lr - .endm +.endm - .macro pixels8_y2 vhadd=vrhadd.u8 - vld1.64 {d0}, [r1], r2 - vld1.64 {d1}, [r1], r2 +.macro pixels8_y2 rnd=1, avg=0 + vld1.64 {d0}, [r1], r2 + vld1.64 {d1}, [r1], r2 1: subs r3, r3, #2 - \vhadd d4, d0, d1 - vld1.64 {d0}, [r1], r2 - \vhadd d5, d0, d1 - vld1.64 {d1}, [r1], r2 + avg d4, d0, d1 + vld1.64 {d0}, [r1], r2 + avg d5, d0, d1 + vld1.64 {d1}, [r1], r2 pld [r1] pld [r1, r2] - vst1.64 {d4}, [r0,:64], r2 - vst1.64 {d5}, [r0,:64], r2 + .if \avg + vld1.8 {d2}, [r0,:64], r2 + vld1.8 {d3}, [r0,:64] + vrhadd.u8 q2, q2, q1 + sub r0, r0, r2 + .endif + vst1.64 {d4}, [r0,:64], r2 + vst1.64 {d5}, [r0,:64], r2 bne 1b bx lr - .endm +.endm - .macro pixels8_xy2 vshrn=vrshrn.u16 no_rnd=0 - vld1.64 {d0, d1}, [r1], r2 - vld1.64 {d2, d3}, [r1], r2 -.if \no_rnd +.macro pixels8_xy2 rnd=1, avg=0 + vld1.64 {q0}, [r1], r2 + vld1.64 {q1}, [r1], r2 + .ifeq \rnd vmov.i16 q11, #1 -.endif + .endif pld [r1] pld [r1, r2] vext.8 d4, d0, d1, #1 @@ -229,70 +262,101 @@ vaddl.u8 q8, d0, d4 vaddl.u8 q9, d2, d6 1: subs r3, r3, #2 - vld1.64 {d0, d1}, [r1], r2 + vld1.64 {q0}, [r1], r2 pld [r1] vadd.u16 q10, q8, q9 vext.8 d4, d0, d1, #1 -.if \no_rnd + .ifeq \rnd vadd.u16 q10, q10, q11 -.endif + .endif vaddl.u8 q8, d0, d4 - \vshrn d5, q10, #2 - vld1.64 {d2, d3}, [r1], r2 + shrn d5, q10, #2 + vld1.64 {q1}, [r1], r2 vadd.u16 q10, q8, q9 pld [r1, r2] -.if \no_rnd + .if \avg + vld1.8 {d7}, [r0,:64] + vrhadd.u8 d5, d5, d7 + .endif + .ifeq \rnd vadd.u16 q10, q10, q11 -.endif - vst1.64 {d5}, [r0,:64], r2 - \vshrn d7, q10, #2 + .endif + vst1.64 {d5}, [r0,:64], r2 + shrn d7, q10, #2 + .if \avg + vld1.8 {d5}, [r0,:64] + vrhadd.u8 d7, d7, d5 + .endif vext.8 d6, d2, d3, #1 vaddl.u8 q9, d2, d6 - vst1.64 {d7}, [r0,:64], r2 + vst1.64 {d7}, [r0,:64], r2 bgt 1b bx lr - .endm +.endm - .macro pixfunc pfx name suf rnd_op args:vararg +.macro pixfunc pfx, name, suf, rnd=1, avg=0 + .if \rnd + .macro avg rd, rn, rm + vrhadd.u8 \rd, \rn, \rm + .endm + .macro shrn rd, rn, rm + vrshrn.u16 \rd, \rn, \rm + .endm + .else + .macro avg rd, rn, rm + vhadd.u8 \rd, \rn, \rm + .endm + .macro shrn rd, rn, rm + vshrn.u16 \rd, \rn, \rm + .endm + .endif function ff_\pfx\name\suf\()_neon, export=1 - \name \rnd_op \args + \name \rnd, \avg endfunc - .endm - - .macro pixfunc2 pfx name args:vararg - pixfunc \pfx \name - pixfunc \pfx \name \args - .endm + .purgem avg + .purgem shrn +.endm + +.macro pixfunc2 pfx, name, avg=0 + pixfunc \pfx, \name, rnd=1, avg=\avg + pixfunc \pfx, \name, _no_rnd, rnd=0, avg=\avg +.endm function ff_put_h264_qpel16_mc00_neon, export=1 mov r3, #16 endfunc - pixfunc put_ pixels16 - pixfunc2 put_ pixels16_x2, _no_rnd, vhadd.u8 - pixfunc2 put_ pixels16_y2, _no_rnd, vhadd.u8 - pixfunc2 put_ pixels16_xy2, _no_rnd, vshrn.u16, 1 + pixfunc put_, pixels16, avg=0 + pixfunc2 put_, pixels16_x2, avg=0 + pixfunc2 put_, pixels16_y2, avg=0 + pixfunc2 put_, pixels16_xy2, avg=0 function ff_avg_h264_qpel16_mc00_neon, export=1 mov r3, #16 endfunc - pixfunc avg_ pixels16,, 1 + pixfunc avg_, pixels16, avg=1 + pixfunc2 avg_, pixels16_x2, avg=1 + pixfunc2 avg_, pixels16_y2, avg=1 + pixfunc2 avg_, pixels16_xy2, avg=1 function ff_put_h264_qpel8_mc00_neon, export=1 mov r3, #8 endfunc - pixfunc put_ pixels8 - pixfunc2 put_ pixels8_x2, _no_rnd, vhadd.u8 - pixfunc2 put_ pixels8_y2, _no_rnd, vhadd.u8 - pixfunc2 put_ pixels8_xy2, _no_rnd, vshrn.u16, 1 + pixfunc put_, pixels8, avg=0 + pixfunc2 put_, pixels8_x2, avg=0 + pixfunc2 put_, pixels8_y2, avg=0 + pixfunc2 put_, pixels8_xy2, avg=0 function ff_avg_h264_qpel8_mc00_neon, export=1 mov r3, #8 endfunc - pixfunc avg_ pixels8,, 1 + pixfunc avg_, pixels8, avg=1 + pixfunc2 avg_, pixels8_x2, avg=1 + pixfunc2 avg_, pixels8_y2, avg=1 + pixfunc2 avg_, pixels8_xy2, avg=1 function ff_put_pixels_clamped_neon, export=1 vld1.64 {d16-d19}, [r0,:128]! @@ -531,6 +595,7 @@ 2: vst1.32 {d2-d3}, [r3, :128]! vst1.32 {d0-d1}, [r12,:128]! + it lt bxlt lr 3: vld1.32 {d2-d3}, [r1,:128] @@ -575,6 +640,7 @@ 2: vst1.32 {q2},[r0,:128]! vst1.32 {q3},[r0,:128]! ands len, len, #15 + it eq bxeq lr 3: vld1.32 {q0},[r1,:128]! vmul.f32 q0, q0, q8 @@ -585,105 +651,50 @@ .unreq len endfunc -function ff_vector_fmul_sv_scalar_2_neon, export=1 -VFP vdup.32 d16, d0[0] -NOVFP vdup.32 d16, r3 -NOVFP ldr r3, [sp] - vld1.32 {d0},[r1,:64]! - vld1.32 {d1},[r1,:64]! -1: subs r3, r3, #4 - vmul.f32 d4, d0, d16 - vmul.f32 d5, d1, d16 - ldr r12, [r2], #4 - vld1.32 {d2},[r12,:64] - ldr r12, [r2], #4 - vld1.32 {d3},[r12,:64] - vmul.f32 d4, d4, d2 - vmul.f32 d5, d5, d3 - beq 2f - vld1.32 {d0},[r1,:64]! - vld1.32 {d1},[r1,:64]! - vst1.32 {d4},[r0,:64]! - vst1.32 {d5},[r0,:64]! - b 1b -2: vst1.32 {d4},[r0,:64]! - vst1.32 {d5},[r0,:64]! - bx lr -endfunc - -function ff_vector_fmul_sv_scalar_4_neon, export=1 -VFP vdup.32 q10, d0[0] -NOVFP vdup.32 q10, r3 -NOVFP ldr r3, [sp] - push {lr} - bics lr, r3, #7 - beq 3f - vld1.32 {q0},[r1,:128]! - vld1.32 {q2},[r1,:128]! -1: ldr r12, [r2], #4 - vld1.32 {q1},[r12,:128] - ldr r12, [r2], #4 - vld1.32 {q3},[r12,:128] - vmul.f32 q8, q0, q10 - vmul.f32 q8, q8, q1 - vmul.f32 q9, q2, q10 - vmul.f32 q9, q9, q3 - subs lr, lr, #8 - beq 2f - vld1.32 {q0},[r1,:128]! - vld1.32 {q2},[r1,:128]! - vst1.32 {q8},[r0,:128]! - vst1.32 {q9},[r0,:128]! - b 1b -2: vst1.32 {q8},[r0,:128]! - vst1.32 {q9},[r0,:128]! - ands r3, r3, #7 - popeq {pc} -3: vld1.32 {q0},[r1,:128]! - ldr r12, [r2], #4 - vld1.32 {q1},[r12,:128] - vmul.f32 q0, q0, q10 - vmul.f32 q0, q0, q1 - vst1.32 {q0},[r0,:128]! - subs r3, r3, #4 - bgt 3b - pop {pc} -endfunc - -function ff_sv_fmul_scalar_2_neon, export=1 +function ff_vector_fmac_scalar_neon, export=1 VFP len .req r2 +VFP acc .req r3 NOVFP len .req r3 -VFP vdup.32 q8, d0[0] -NOVFP vdup.32 q8, r2 - ldr r12, [r1], #4 - vld1.32 {d0},[r12,:64] - ldr r12, [r1], #4 - vld1.32 {d1},[r12,:64] -1: vmul.f32 q1, q0, q8 - subs len, len, #4 +NOVFP acc .req r2 +VFP vdup.32 q15, d0[0] +NOVFP vdup.32 q15, r2 + bics r12, len, #15 + mov acc, r0 + beq 3f + vld1.32 {q0}, [r1,:128]! + vld1.32 {q8}, [acc,:128]! + vld1.32 {q1}, [r1,:128]! + vld1.32 {q9}, [acc,:128]! +1: vmla.f32 q8, q0, q15 + vld1.32 {q2}, [r1,:128]! + vld1.32 {q10}, [acc,:128]! + vmla.f32 q9, q1, q15 + vld1.32 {q3}, [r1,:128]! + vld1.32 {q11}, [acc,:128]! + vmla.f32 q10, q2, q15 + vst1.32 {q8}, [r0,:128]! + vmla.f32 q11, q3, q15 + vst1.32 {q9}, [r0,:128]! + subs r12, r12, #16 beq 2f - ldr r12, [r1], #4 - vld1.32 {d0},[r12,:64] - ldr r12, [r1], #4 - vld1.32 {d1},[r12,:64] - vst1.32 {q1},[r0,:128]! + vld1.32 {q0}, [r1,:128]! + vld1.32 {q8}, [acc,:128]! + vst1.32 {q10}, [r0,:128]! + vld1.32 {q1}, [r1,:128]! + vld1.32 {q9}, [acc,:128]! + vst1.32 {q11}, [r0,:128]! b 1b -2: vst1.32 {q1},[r0,:128]! - bx lr - .unreq len -endfunc - -function ff_sv_fmul_scalar_4_neon, export=1 -VFP len .req r2 -NOVFP len .req r3 -VFP vdup.32 q8, d0[0] -NOVFP vdup.32 q8, r2 -1: ldr r12, [r1], #4 - vld1.32 {q0},[r12,:128] - vmul.f32 q0, q0, q8 - vst1.32 {q0},[r0,:128]! +2: vst1.32 {q10}, [r0,:128]! + vst1.32 {q11}, [r0,:128]! + ands len, len, #15 + it eq + bxeq lr +3: vld1.32 {q0}, [r1,:128]! + vld1.32 {q8}, [acc,:128]! + vmla.f32 q8, q0, q15 + vst1.32 {q8}, [r0,:128]! subs len, len, #4 - bgt 1b + bgt 3b bx lr .unreq len endfunc @@ -812,3 +823,19 @@ pop {r4,pc} endfunc + +function ff_vector_clip_int32_neon, export=1 + vdup.32 q0, r2 + vdup.32 q1, r3 + ldr r2, [sp] +1: + vld1.32 {q2-q3}, [r1,:128]! + vmin.s32 q2, q2, q1 + vmin.s32 q3, q3, q1 + vmax.s32 q2, q2, q0 + vmax.s32 q3, q3, q0 + vst1.32 {q2-q3}, [r0,:128]! + subs r2, r2, #8 + bgt 1b + bx lr +endfunc diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_vfp.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_vfp.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/dsputil_vfp.S 2011-05-31 02:05:07.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/dsputil_vfp.S 2012-01-11 00:34:30.000000000 +0000 @@ -55,18 +55,23 @@ 1: subs r3, r3, #16 vmul.f32 s12, s4, s12 + itttt ge vldmiage r1!, {s16-s19} vldmiage r2!, {s24-s27} vldmiage r1!, {s20-s23} vldmiage r2!, {s28-s31} + it ge vmulge.f32 s24, s16, s24 vstmia r0!, {s8-s11} vstmia r0!, {s12-s15} + it ge vmulge.f32 s28, s20, s28 + itttt gt vldmiagt r1!, {s0-s3} vldmiagt r2!, {s8-s11} vldmiagt r1!, {s4-s7} vldmiagt r2!, {s12-s15} + ittt ge vmulge.f32 s8, s0, s8 vstmiage r0!, {s24-s27} vstmiage r0!, {s28-s31} @@ -97,33 +102,49 @@ vmul.f32 s11, s0, s11 1: subs r3, r3, #16 + it ge vldmdbge r2!, {s16-s19} vmul.f32 s12, s7, s12 + it ge vldmiage r1!, {s24-s27} vmul.f32 s13, s6, s13 + it ge vldmdbge r2!, {s20-s23} vmul.f32 s14, s5, s14 + it ge vldmiage r1!, {s28-s31} vmul.f32 s15, s4, s15 + it ge vmulge.f32 s24, s19, s24 + it gt vldmdbgt r2!, {s0-s3} + it ge vmulge.f32 s25, s18, s25 vstmia r0!, {s8-s13} + it ge vmulge.f32 s26, s17, s26 + it gt vldmiagt r1!, {s8-s11} + itt ge vmulge.f32 s27, s16, s27 vmulge.f32 s28, s23, s28 + it gt vldmdbgt r2!, {s4-s7} + it ge vmulge.f32 s29, s22, s29 vstmia r0!, {s14-s15} + ittt ge vmulge.f32 s30, s21, s30 vmulge.f32 s31, s20, s31 vmulge.f32 s8, s3, s8 + it gt vldmiagt r1!, {s12-s15} + itttt ge vmulge.f32 s9, s2, s9 vmulge.f32 s10, s1, s10 vstmiage r0!, {s24-s27} vmulge.f32 s11, s0, s11 + it ge vstmiage r0!, {s28-s31} bgt 1b diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/fft_fixed_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/fft_fixed_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/fft_fixed_neon.S 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/fft_fixed_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -56,7 +56,7 @@ vhsub.s16 \r0, \d0, \d1 @ t3, t4, t8, t7 vhsub.s16 \r1, \d1, \d0 vhadd.s16 \d0, \d0, \d1 @ t1, t2, t6, t5 - vmov.i64 \d1, #0xffff<<32 + vmov.i64 \d1, #0xffff00000000 vbit \r0, \r1, \d1 vrev64.16 \r1, \r0 @ t7, t8, t4, t3 vtrn.32 \r0, \r1 @ t3, t4, t7, t8 @@ -75,9 +75,9 @@ .endm function fft4_neon - vld1.16 {d0-d1}, [r0,:128] + vld1.16 {d0-d1}, [r0] fft4 d0, d1, d2, d3 - vst1.16 {d0-d1}, [r0,:128] + vst1.16 {d0-d1}, [r0] bx lr endfunc diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/fft_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/fft_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/fft_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/fft_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -28,7 +28,6 @@ #define M_SQRT1_2 0.70710678118654752440 - .text function fft4_neon vld1.32 {d0-d3}, [r0,:128] @@ -349,9 +348,7 @@ pop {r4,pc} endfunc - .section .rodata - .align 4 -fft_tab_neon: +const fft_tab_neon .word fft4_neon .word fft8_neon .word fft16_neon @@ -367,8 +364,12 @@ .word fft16384_neon .word fft32768_neon .word fft65536_neon -ELF .size fft_tab_neon, . - fft_tab_neon +endconst - .align 4 -pmmp: .float +1.0, -1.0, -1.0, +1.0 -mppm: .float -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2 +const pmmp, align=4 + .float +1.0, -1.0, -1.0, +1.0 +endconst + +const mppm, align=4 + .float -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2 +endconst diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/fmtconvert_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/fmtconvert_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/fmtconvert_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/fmtconvert_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,6 @@ #include "asm.S" preserve8 - .text function ff_float_to_int16_neon, export=1 subs r2, r2, #8 @@ -71,6 +70,7 @@ function ff_float_to_int16_interleave_neon, export=1 cmp r3, #2 + itt lt ldrlt r1, [r1] blt ff_float_to_int16_neon bne 4f @@ -196,6 +196,7 @@ vst1.64 {d3}, [r8], ip vst1.64 {d7}, [r8], ip subs r3, r3, #4 + it eq popeq {r4-r8,pc} cmp r3, #4 add r0, r0, #8 @@ -305,6 +306,7 @@ vst1.32 {d23[1]}, [r8], ip 8: subs r3, r3, #2 add r0, r0, #4 + it eq popeq {r4-r8,pc} @ 1 channel @@ -354,6 +356,7 @@ vst1.16 {d2[3]}, [r5,:16], ip vst1.16 {d3[1]}, [r5,:16], ip vst1.16 {d3[3]}, [r5,:16], ip + it eq popeq {r4-r8,pc} vld1.64 {d0-d1}, [r4,:128]! vcvt.s32.f32 q0, q0, #16 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/fmtconvert_vfp.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/fmtconvert_vfp.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/fmtconvert_vfp.S 2011-05-31 02:05:07.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/fmtconvert_vfp.S 2012-01-11 00:34:30.000000000 +0000 @@ -46,6 +46,7 @@ vmov r5, r6, s2, s3 vmov r7, r8, s4, s5 vmov ip, lr, s6, s7 + it gt vldmiagt r1!, {s16-s23} ssat r4, #16, r4 ssat r3, #16, r3 @@ -53,10 +54,12 @@ ssat r5, #16, r5 pkhbt r3, r3, r4, lsl #16 pkhbt r4, r5, r6, lsl #16 + itttt gt vcvtgt.s32.f32 s0, s16 vcvtgt.s32.f32 s1, s17 vcvtgt.s32.f32 s2, s18 vcvtgt.s32.f32 s3, s19 + itttt gt vcvtgt.s32.f32 s4, s20 vcvtgt.s32.f32 s5, s21 vcvtgt.s32.f32 s6, s22 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264cmc_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264cmc_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264cmc_neon.S 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264cmc_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,430 @@ +/* + * Copyright (c) 2008 Mans Rullgard + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "asm.S" + +/* chroma_mc8(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y) */ +.macro h264_chroma_mc8 type, codec=h264 +function ff_\type\()_\codec\()_chroma_mc8_neon, export=1 + push {r4-r7, lr} + ldrd r4, [sp, #20] + .ifc \type,avg + mov lr, r0 + .endif + pld [r1] + pld [r1, r2] + + .ifc \codec,rv40 + movrel r6, rv40bias + lsr r7, r5, #1 + add r6, r6, r7, lsl #3 + lsr r7, r4, #1 + add r6, r6, r7, lsl #1 + vld1.16 {d22[],d23[]}, [r6,:16] + .endif + +A muls r7, r4, r5 +T mul r7, r4, r5 +T cmp r7, #0 + rsb r6, r7, r5, lsl #3 + rsb r12, r7, r4, lsl #3 + sub r4, r7, r4, lsl #3 + sub r4, r4, r5, lsl #3 + add r4, r4, #64 + + beq 2f + + add r5, r1, r2 + + vdup.8 d0, r4 + lsl r4, r2, #1 + vdup.8 d1, r12 + vld1.8 {d4, d5}, [r1], r4 + vdup.8 d2, r6 + vld1.8 {d6, d7}, [r5], r4 + vdup.8 d3, r7 + + vext.8 d5, d4, d5, #1 + vext.8 d7, d6, d7, #1 + +1: pld [r5] + vmull.u8 q8, d4, d0 + vmlal.u8 q8, d5, d1 + vld1.8 {d4, d5}, [r1], r4 + vmlal.u8 q8, d6, d2 + vext.8 d5, d4, d5, #1 + vmlal.u8 q8, d7, d3 + vmull.u8 q9, d6, d0 + subs r3, r3, #2 + vmlal.u8 q9, d7, d1 + vmlal.u8 q9, d4, d2 + vmlal.u8 q9, d5, d3 + vld1.8 {d6, d7}, [r5], r4 + pld [r1] + .ifc \codec,h264 + vrshrn.u16 d16, q8, #6 + vrshrn.u16 d17, q9, #6 + .else + vadd.u16 q8, q8, q11 + vadd.u16 q9, q9, q11 + vshrn.u16 d16, q8, #6 + vshrn.u16 d17, q9, #6 + .endif + .ifc \type,avg + vld1.8 {d20}, [lr,:64], r2 + vld1.8 {d21}, [lr,:64], r2 + vrhadd.u8 q8, q8, q10 + .endif + vext.8 d7, d6, d7, #1 + vst1.8 {d16}, [r0,:64], r2 + vst1.8 {d17}, [r0,:64], r2 + bgt 1b + + pop {r4-r7, pc} + +2: tst r6, r6 + add r12, r12, r6 + vdup.8 d0, r4 + vdup.8 d1, r12 + + beq 4f + + add r5, r1, r2 + lsl r4, r2, #1 + vld1.8 {d4}, [r1], r4 + vld1.8 {d6}, [r5], r4 + +3: pld [r5] + vmull.u8 q8, d4, d0 + vmlal.u8 q8, d6, d1 + vld1.8 {d4}, [r1], r4 + vmull.u8 q9, d6, d0 + vmlal.u8 q9, d4, d1 + vld1.8 {d6}, [r5], r4 + .ifc \codec,h264 + vrshrn.u16 d16, q8, #6 + vrshrn.u16 d17, q9, #6 + .else + vadd.u16 q8, q8, q11 + vadd.u16 q9, q9, q11 + vshrn.u16 d16, q8, #6 + vshrn.u16 d17, q9, #6 + .endif + .ifc \type,avg + vld1.8 {d20}, [lr,:64], r2 + vld1.8 {d21}, [lr,:64], r2 + vrhadd.u8 q8, q8, q10 + .endif + subs r3, r3, #2 + pld [r1] + vst1.8 {d16}, [r0,:64], r2 + vst1.8 {d17}, [r0,:64], r2 + bgt 3b + + pop {r4-r7, pc} + +4: vld1.8 {d4, d5}, [r1], r2 + vld1.8 {d6, d7}, [r1], r2 + vext.8 d5, d4, d5, #1 + vext.8 d7, d6, d7, #1 + +5: pld [r1] + subs r3, r3, #2 + vmull.u8 q8, d4, d0 + vmlal.u8 q8, d5, d1 + vld1.8 {d4, d5}, [r1], r2 + vmull.u8 q9, d6, d0 + vmlal.u8 q9, d7, d1 + pld [r1] + vext.8 d5, d4, d5, #1 + .ifc \codec,h264 + vrshrn.u16 d16, q8, #6 + vrshrn.u16 d17, q9, #6 + .else + vadd.u16 q8, q8, q11 + vadd.u16 q9, q9, q11 + vshrn.u16 d16, q8, #6 + vshrn.u16 d17, q9, #6 + .endif + .ifc \type,avg + vld1.8 {d20}, [lr,:64], r2 + vld1.8 {d21}, [lr,:64], r2 + vrhadd.u8 q8, q8, q10 + .endif + vld1.8 {d6, d7}, [r1], r2 + vext.8 d7, d6, d7, #1 + vst1.8 {d16}, [r0,:64], r2 + vst1.8 {d17}, [r0,:64], r2 + bgt 5b + + pop {r4-r7, pc} +endfunc +.endm + +/* chroma_mc4(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y) */ +.macro h264_chroma_mc4 type, codec=h264 +function ff_\type\()_\codec\()_chroma_mc4_neon, export=1 + push {r4-r7, lr} + ldrd r4, [sp, #20] + .ifc \type,avg + mov lr, r0 + .endif + pld [r1] + pld [r1, r2] + + .ifc \codec,rv40 + movrel r6, rv40bias + lsr r7, r5, #1 + add r6, r6, r7, lsl #3 + lsr r7, r4, #1 + add r6, r6, r7, lsl #1 + vld1.16 {d22[],d23[]}, [r6,:16] + .endif + +A muls r7, r4, r5 +T mul r7, r4, r5 +T cmp r7, #0 + rsb r6, r7, r5, lsl #3 + rsb r12, r7, r4, lsl #3 + sub r4, r7, r4, lsl #3 + sub r4, r4, r5, lsl #3 + add r4, r4, #64 + + beq 2f + + add r5, r1, r2 + + vdup.8 d0, r4 + lsl r4, r2, #1 + vdup.8 d1, r12 + vld1.8 {d4}, [r1], r4 + vdup.8 d2, r6 + vld1.8 {d6}, [r5], r4 + vdup.8 d3, r7 + + vext.8 d5, d4, d5, #1 + vext.8 d7, d6, d7, #1 + vtrn.32 d4, d5 + vtrn.32 d6, d7 + + vtrn.32 d0, d1 + vtrn.32 d2, d3 + +1: pld [r5] + vmull.u8 q8, d4, d0 + vmlal.u8 q8, d6, d2 + vld1.8 {d4}, [r1], r4 + vext.8 d5, d4, d5, #1 + vtrn.32 d4, d5 + vmull.u8 q9, d6, d0 + vmlal.u8 q9, d4, d2 + vld1.8 {d6}, [r5], r4 + vadd.i16 d16, d16, d17 + vadd.i16 d17, d18, d19 + .ifc \codec,h264 + vrshrn.u16 d16, q8, #6 + .else + vadd.u16 q8, q8, q11 + vshrn.u16 d16, q8, #6 + .endif + subs r3, r3, #2 + pld [r1] + .ifc \type,avg + vld1.32 {d20[0]}, [lr,:32], r2 + vld1.32 {d20[1]}, [lr,:32], r2 + vrhadd.u8 d16, d16, d20 + .endif + vext.8 d7, d6, d7, #1 + vtrn.32 d6, d7 + vst1.32 {d16[0]}, [r0,:32], r2 + vst1.32 {d16[1]}, [r0,:32], r2 + bgt 1b + + pop {r4-r7, pc} + +2: tst r6, r6 + add r12, r12, r6 + vdup.8 d0, r4 + vdup.8 d1, r12 + vtrn.32 d0, d1 + + beq 4f + + vext.32 d1, d0, d1, #1 + add r5, r1, r2 + lsl r4, r2, #1 + vld1.32 {d4[0]}, [r1], r4 + vld1.32 {d4[1]}, [r5], r4 + +3: pld [r5] + vmull.u8 q8, d4, d0 + vld1.32 {d4[0]}, [r1], r4 + vmull.u8 q9, d4, d1 + vld1.32 {d4[1]}, [r5], r4 + vadd.i16 d16, d16, d17 + vadd.i16 d17, d18, d19 + .ifc \codec,h264 + vrshrn.u16 d16, q8, #6 + .else + vadd.u16 q8, q8, q11 + vshrn.u16 d16, q8, #6 + .endif + .ifc \type,avg + vld1.32 {d20[0]}, [lr,:32], r2 + vld1.32 {d20[1]}, [lr,:32], r2 + vrhadd.u8 d16, d16, d20 + .endif + subs r3, r3, #2 + pld [r1] + vst1.32 {d16[0]}, [r0,:32], r2 + vst1.32 {d16[1]}, [r0,:32], r2 + bgt 3b + + pop {r4-r7, pc} + +4: vld1.8 {d4}, [r1], r2 + vld1.8 {d6}, [r1], r2 + vext.8 d5, d4, d5, #1 + vext.8 d7, d6, d7, #1 + vtrn.32 d4, d5 + vtrn.32 d6, d7 + +5: vmull.u8 q8, d4, d0 + vmull.u8 q9, d6, d0 + subs r3, r3, #2 + vld1.8 {d4}, [r1], r2 + vext.8 d5, d4, d5, #1 + vtrn.32 d4, d5 + vadd.i16 d16, d16, d17 + vadd.i16 d17, d18, d19 + pld [r1] + .ifc \codec,h264 + vrshrn.u16 d16, q8, #6 + .else + vadd.u16 q8, q8, q11 + vshrn.u16 d16, q8, #6 + .endif + .ifc \type,avg + vld1.32 {d20[0]}, [lr,:32], r2 + vld1.32 {d20[1]}, [lr,:32], r2 + vrhadd.u8 d16, d16, d20 + .endif + vld1.8 {d6}, [r1], r2 + vext.8 d7, d6, d7, #1 + vtrn.32 d6, d7 + pld [r1] + vst1.32 {d16[0]}, [r0,:32], r2 + vst1.32 {d16[1]}, [r0,:32], r2 + bgt 5b + + pop {r4-r7, pc} +endfunc +.endm + +.macro h264_chroma_mc2 type +function ff_\type\()_h264_chroma_mc2_neon, export=1 + push {r4-r6, lr} + ldr r4, [sp, #16] + ldr lr, [sp, #20] + pld [r1] + pld [r1, r2] + orrs r5, r4, lr + beq 2f + + mul r5, r4, lr + rsb r6, r5, lr, lsl #3 + rsb r12, r5, r4, lsl #3 + sub r4, r5, r4, lsl #3 + sub r4, r4, lr, lsl #3 + add r4, r4, #64 + vdup.8 d0, r4 + vdup.8 d2, r12 + vdup.8 d1, r6 + vdup.8 d3, r5 + vtrn.16 q0, q1 +1: + vld1.32 {d4[0]}, [r1], r2 + vld1.32 {d4[1]}, [r1], r2 + vrev64.32 d5, d4 + vld1.32 {d5[1]}, [r1] + vext.8 q3, q2, q2, #1 + vtrn.16 q2, q3 + vmull.u8 q8, d4, d0 + vmlal.u8 q8, d5, d1 + .ifc \type,avg + vld1.16 {d18[0]}, [r0,:16], r2 + vld1.16 {d18[1]}, [r0,:16] + sub r0, r0, r2 + .endif + vtrn.32 d16, d17 + vadd.i16 d16, d16, d17 + vrshrn.u16 d16, q8, #6 + .ifc \type,avg + vrhadd.u8 d16, d16, d18 + .endif + vst1.16 {d16[0]}, [r0,:16], r2 + vst1.16 {d16[1]}, [r0,:16], r2 + subs r3, r3, #2 + bgt 1b + pop {r4-r6, pc} +2: + .ifc \type,put + ldrh_post r5, r1, r2 + strh_post r5, r0, r2 + ldrh_post r6, r1, r2 + strh_post r6, r0, r2 + .else + vld1.16 {d16[0]}, [r1], r2 + vld1.16 {d16[1]}, [r1], r2 + vld1.16 {d18[0]}, [r0,:16], r2 + vld1.16 {d18[1]}, [r0,:16] + sub r0, r0, r2 + vrhadd.u8 d16, d16, d18 + vst1.16 {d16[0]}, [r0,:16], r2 + vst1.16 {d16[1]}, [r0,:16], r2 + .endif + subs r3, r3, #2 + bgt 2b + pop {r4-r6, pc} +endfunc +.endm + +#if CONFIG_H264_DECODER + h264_chroma_mc8 put + h264_chroma_mc8 avg + h264_chroma_mc4 put + h264_chroma_mc4 avg + h264_chroma_mc2 put + h264_chroma_mc2 avg +#endif + +#if CONFIG_RV40_DECODER +const rv40bias + .short 0, 16, 32, 16 + .short 32, 28, 32, 28 + .short 0, 32, 16, 32 + .short 32, 28, 32, 28 +endconst + + h264_chroma_mc8 put, rv40 + h264_chroma_mc8 avg, rv40 + h264_chroma_mc4 put, rv40 + h264_chroma_mc4 avg, rv40 +#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264dsp_init_arm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264dsp_init_arm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264dsp_init_arm.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264dsp_init_arm.c 2012-01-11 00:34:30.000000000 +0000 @@ -32,47 +32,22 @@ void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0); -void ff_weight_h264_pixels_16x16_neon(uint8_t *ds, int stride, int log2_den, - int weight, int offset); -void ff_weight_h264_pixels_16x8_neon(uint8_t *ds, int stride, int log2_den, - int weight, int offset); -void ff_weight_h264_pixels_8x16_neon(uint8_t *ds, int stride, int log2_den, - int weight, int offset); -void ff_weight_h264_pixels_8x8_neon(uint8_t *ds, int stride, int log2_den, - int weight, int offset); -void ff_weight_h264_pixels_8x4_neon(uint8_t *ds, int stride, int log2_den, - int weight, int offset); -void ff_weight_h264_pixels_4x8_neon(uint8_t *ds, int stride, int log2_den, - int weight, int offset); -void ff_weight_h264_pixels_4x4_neon(uint8_t *ds, int stride, int log2_den, - int weight, int offset); -void ff_weight_h264_pixels_4x2_neon(uint8_t *ds, int stride, int log2_den, - int weight, int offset); - -void ff_biweight_h264_pixels_16x16_neon(uint8_t *dst, uint8_t *src, int stride, - int log2_den, int weightd, int weights, - int offset); -void ff_biweight_h264_pixels_16x8_neon(uint8_t *dst, uint8_t *src, int stride, - int log2_den, int weightd, int weights, - int offset); -void ff_biweight_h264_pixels_8x16_neon(uint8_t *dst, uint8_t *src, int stride, - int log2_den, int weightd, int weights, - int offset); -void ff_biweight_h264_pixels_8x8_neon(uint8_t *dst, uint8_t *src, int stride, - int log2_den, int weightd, int weights, - int offset); -void ff_biweight_h264_pixels_8x4_neon(uint8_t *dst, uint8_t *src, int stride, - int log2_den, int weightd, int weights, - int offset); -void ff_biweight_h264_pixels_4x8_neon(uint8_t *dst, uint8_t *src, int stride, - int log2_den, int weightd, int weights, - int offset); -void ff_biweight_h264_pixels_4x4_neon(uint8_t *dst, uint8_t *src, int stride, - int log2_den, int weightd, int weights, - int offset); -void ff_biweight_h264_pixels_4x2_neon(uint8_t *dst, uint8_t *src, int stride, - int log2_den, int weightd, int weights, - int offset); +void ff_weight_h264_pixels_16_neon(uint8_t *dst, int stride, int height, + int log2_den, int weight, int offset); +void ff_weight_h264_pixels_8_neon(uint8_t *dst, int stride, int height, + int log2_den, int weight, int offset); +void ff_weight_h264_pixels_4_neon(uint8_t *dst, int stride, int height, + int log2_den, int weight, int offset); + +void ff_biweight_h264_pixels_16_neon(uint8_t *dst, uint8_t *src, int stride, + int height, int log2_den, int weightd, + int weights, int offset); +void ff_biweight_h264_pixels_8_neon(uint8_t *dst, uint8_t *src, int stride, + int height, int log2_den, int weightd, + int weights, int offset); +void ff_biweight_h264_pixels_4_neon(uint8_t *dst, uint8_t *src, int stride, + int height, int log2_den, int weightd, + int weights, int offset); void ff_h264_idct_add_neon(uint8_t *dst, DCTELEM *block, int stride); void ff_h264_idct_dc_add_neon(uint8_t *dst, DCTELEM *block, int stride); @@ -92,7 +67,7 @@ DCTELEM *block, int stride, const uint8_t nnzc[6*8]); -static void ff_h264dsp_init_neon(H264DSPContext *c, const int bit_depth) +static void ff_h264dsp_init_neon(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) { if (bit_depth == 8) { c->h264_v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon; @@ -100,36 +75,27 @@ c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon; c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon; - c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16x16_neon; - c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_16x8_neon; - c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels_8x16_neon; - c->weight_h264_pixels_tab[3] = ff_weight_h264_pixels_8x8_neon; - c->weight_h264_pixels_tab[4] = ff_weight_h264_pixels_8x4_neon; - c->weight_h264_pixels_tab[5] = ff_weight_h264_pixels_4x8_neon; - c->weight_h264_pixels_tab[6] = ff_weight_h264_pixels_4x4_neon; - c->weight_h264_pixels_tab[7] = ff_weight_h264_pixels_4x2_neon; - - c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels_16x16_neon; - c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels_16x8_neon; - c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels_8x16_neon; - c->biweight_h264_pixels_tab[3] = ff_biweight_h264_pixels_8x8_neon; - c->biweight_h264_pixels_tab[4] = ff_biweight_h264_pixels_8x4_neon; - c->biweight_h264_pixels_tab[5] = ff_biweight_h264_pixels_4x8_neon; - c->biweight_h264_pixels_tab[6] = ff_biweight_h264_pixels_4x4_neon; - c->biweight_h264_pixels_tab[7] = ff_biweight_h264_pixels_4x2_neon; + c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16_neon; + c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_8_neon; + c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels_4_neon; + + c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels_16_neon; + c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels_8_neon; + c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels_4_neon; c->h264_idct_add = ff_h264_idct_add_neon; c->h264_idct_dc_add = ff_h264_idct_dc_add_neon; c->h264_idct_add16 = ff_h264_idct_add16_neon; c->h264_idct_add16intra = ff_h264_idct_add16intra_neon; - c->h264_idct_add8 = ff_h264_idct_add8_neon; + if (chroma_format_idc == 1) + c->h264_idct_add8 = ff_h264_idct_add8_neon; c->h264_idct8_add = ff_h264_idct8_add_neon; c->h264_idct8_dc_add = ff_h264_idct8_dc_add_neon; c->h264_idct8_add4 = ff_h264_idct8_add4_neon; } } -void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth) +void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) { - if (HAVE_NEON) ff_h264dsp_init_neon(c, bit_depth); + if (HAVE_NEON) ff_h264dsp_init_neon(c, bit_depth, chroma_format_idc); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264dsp_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264dsp_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264dsp_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264dsp_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -19,414 +19,26 @@ */ #include "asm.S" - - .macro transpose_8x8 r0 r1 r2 r3 r4 r5 r6 r7 - vtrn.32 \r0, \r4 - vtrn.32 \r1, \r5 - vtrn.32 \r2, \r6 - vtrn.32 \r3, \r7 - vtrn.16 \r0, \r2 - vtrn.16 \r1, \r3 - vtrn.16 \r4, \r6 - vtrn.16 \r5, \r7 - vtrn.8 \r0, \r1 - vtrn.8 \r2, \r3 - vtrn.8 \r4, \r5 - vtrn.8 \r6, \r7 - .endm - - .macro transpose_4x4 r0 r1 r2 r3 - vtrn.16 \r0, \r2 - vtrn.16 \r1, \r3 - vtrn.8 \r0, \r1 - vtrn.8 \r2, \r3 - .endm - - .macro swap4 r0 r1 r2 r3 r4 r5 r6 r7 - vswp \r0, \r4 - vswp \r1, \r5 - vswp \r2, \r6 - vswp \r3, \r7 - .endm - - .macro transpose16_4x4 r0 r1 r2 r3 r4 r5 r6 r7 - vtrn.32 \r0, \r2 - vtrn.32 \r1, \r3 - vtrn.32 \r4, \r6 - vtrn.32 \r5, \r7 - vtrn.16 \r0, \r1 - vtrn.16 \r2, \r3 - vtrn.16 \r4, \r5 - vtrn.16 \r6, \r7 - .endm - -/* chroma_mc8(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y) */ - .macro h264_chroma_mc8 type -function ff_\type\()_h264_chroma_mc8_neon, export=1 - push {r4-r7, lr} - ldrd r4, [sp, #20] -.ifc \type,avg - mov lr, r0 -.endif - pld [r1] - pld [r1, r2] - - muls r7, r4, r5 - rsb r6, r7, r5, lsl #3 - rsb ip, r7, r4, lsl #3 - sub r4, r7, r4, lsl #3 - sub r4, r4, r5, lsl #3 - add r4, r4, #64 - - beq 2f - - add r5, r1, r2 - - vdup.8 d0, r4 - lsl r4, r2, #1 - vdup.8 d1, ip - vld1.64 {d4, d5}, [r1], r4 - vdup.8 d2, r6 - vld1.64 {d6, d7}, [r5], r4 - vdup.8 d3, r7 - - vext.8 d5, d4, d5, #1 - vext.8 d7, d6, d7, #1 - -1: pld [r5] - vmull.u8 q8, d4, d0 - vmlal.u8 q8, d5, d1 - vld1.64 {d4, d5}, [r1], r4 - vmlal.u8 q8, d6, d2 - vext.8 d5, d4, d5, #1 - vmlal.u8 q8, d7, d3 - vmull.u8 q9, d6, d0 - subs r3, r3, #2 - vmlal.u8 q9, d7, d1 - vmlal.u8 q9, d4, d2 - vmlal.u8 q9, d5, d3 - vrshrn.u16 d16, q8, #6 - vld1.64 {d6, d7}, [r5], r4 - pld [r1] - vrshrn.u16 d17, q9, #6 -.ifc \type,avg - vld1.64 {d20}, [lr,:64], r2 - vld1.64 {d21}, [lr,:64], r2 - vrhadd.u8 q8, q8, q10 -.endif - vext.8 d7, d6, d7, #1 - vst1.64 {d16}, [r0,:64], r2 - vst1.64 {d17}, [r0,:64], r2 - bgt 1b - - pop {r4-r7, pc} - -2: tst r6, r6 - add ip, ip, r6 - vdup.8 d0, r4 - vdup.8 d1, ip - - beq 4f - - add r5, r1, r2 - lsl r4, r2, #1 - vld1.64 {d4}, [r1], r4 - vld1.64 {d6}, [r5], r4 - -3: pld [r5] - vmull.u8 q8, d4, d0 - vmlal.u8 q8, d6, d1 - vld1.64 {d4}, [r1], r4 - vmull.u8 q9, d6, d0 - vmlal.u8 q9, d4, d1 - vld1.64 {d6}, [r5], r4 - vrshrn.u16 d16, q8, #6 - vrshrn.u16 d17, q9, #6 -.ifc \type,avg - vld1.64 {d20}, [lr,:64], r2 - vld1.64 {d21}, [lr,:64], r2 - vrhadd.u8 q8, q8, q10 -.endif - subs r3, r3, #2 - pld [r1] - vst1.64 {d16}, [r0,:64], r2 - vst1.64 {d17}, [r0,:64], r2 - bgt 3b - - pop {r4-r7, pc} - -4: vld1.64 {d4, d5}, [r1], r2 - vld1.64 {d6, d7}, [r1], r2 - vext.8 d5, d4, d5, #1 - vext.8 d7, d6, d7, #1 - -5: pld [r1] - subs r3, r3, #2 - vmull.u8 q8, d4, d0 - vmlal.u8 q8, d5, d1 - vld1.64 {d4, d5}, [r1], r2 - vmull.u8 q9, d6, d0 - vmlal.u8 q9, d7, d1 - pld [r1] - vext.8 d5, d4, d5, #1 - vrshrn.u16 d16, q8, #6 - vrshrn.u16 d17, q9, #6 -.ifc \type,avg - vld1.64 {d20}, [lr,:64], r2 - vld1.64 {d21}, [lr,:64], r2 - vrhadd.u8 q8, q8, q10 -.endif - vld1.64 {d6, d7}, [r1], r2 - vext.8 d7, d6, d7, #1 - vst1.64 {d16}, [r0,:64], r2 - vst1.64 {d17}, [r0,:64], r2 - bgt 5b - - pop {r4-r7, pc} -endfunc - .endm - -/* chroma_mc4(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y) */ - .macro h264_chroma_mc4 type -function ff_\type\()_h264_chroma_mc4_neon, export=1 - push {r4-r7, lr} - ldrd r4, [sp, #20] -.ifc \type,avg - mov lr, r0 -.endif - pld [r1] - pld [r1, r2] - - muls r7, r4, r5 - rsb r6, r7, r5, lsl #3 - rsb ip, r7, r4, lsl #3 - sub r4, r7, r4, lsl #3 - sub r4, r4, r5, lsl #3 - add r4, r4, #64 - - beq 2f - - add r5, r1, r2 - - vdup.8 d0, r4 - lsl r4, r2, #1 - vdup.8 d1, ip - vld1.64 {d4}, [r1], r4 - vdup.8 d2, r6 - vld1.64 {d6}, [r5], r4 - vdup.8 d3, r7 - - vext.8 d5, d4, d5, #1 - vext.8 d7, d6, d7, #1 - vtrn.32 d4, d5 - vtrn.32 d6, d7 - - vtrn.32 d0, d1 - vtrn.32 d2, d3 - -1: pld [r5] - vmull.u8 q8, d4, d0 - vmlal.u8 q8, d6, d2 - vld1.64 {d4}, [r1], r4 - vext.8 d5, d4, d5, #1 - vtrn.32 d4, d5 - vmull.u8 q9, d6, d0 - vmlal.u8 q9, d4, d2 - vld1.64 {d6}, [r5], r4 - vadd.i16 d16, d16, d17 - vadd.i16 d17, d18, d19 - vrshrn.u16 d16, q8, #6 - subs r3, r3, #2 - pld [r1] -.ifc \type,avg - vld1.32 {d20[0]}, [lr,:32], r2 - vld1.32 {d20[1]}, [lr,:32], r2 - vrhadd.u8 d16, d16, d20 -.endif - vext.8 d7, d6, d7, #1 - vtrn.32 d6, d7 - vst1.32 {d16[0]}, [r0,:32], r2 - vst1.32 {d16[1]}, [r0,:32], r2 - bgt 1b - - pop {r4-r7, pc} - -2: tst r6, r6 - add ip, ip, r6 - vdup.8 d0, r4 - vdup.8 d1, ip - vtrn.32 d0, d1 - - beq 4f - - vext.32 d1, d0, d1, #1 - add r5, r1, r2 - lsl r4, r2, #1 - vld1.32 {d4[0]}, [r1], r4 - vld1.32 {d4[1]}, [r5], r4 - -3: pld [r5] - vmull.u8 q8, d4, d0 - vld1.32 {d4[0]}, [r1], r4 - vmull.u8 q9, d4, d1 - vld1.32 {d4[1]}, [r5], r4 - vadd.i16 d16, d16, d17 - vadd.i16 d17, d18, d19 - vrshrn.u16 d16, q8, #6 -.ifc \type,avg - vld1.32 {d20[0]}, [lr,:32], r2 - vld1.32 {d20[1]}, [lr,:32], r2 - vrhadd.u8 d16, d16, d20 -.endif - subs r3, r3, #2 - pld [r1] - vst1.32 {d16[0]}, [r0,:32], r2 - vst1.32 {d16[1]}, [r0,:32], r2 - bgt 3b - - pop {r4-r7, pc} - -4: vld1.64 {d4}, [r1], r2 - vld1.64 {d6}, [r1], r2 - vext.8 d5, d4, d5, #1 - vext.8 d7, d6, d7, #1 - vtrn.32 d4, d5 - vtrn.32 d6, d7 - -5: vmull.u8 q8, d4, d0 - vmull.u8 q9, d6, d0 - subs r3, r3, #2 - vld1.64 {d4}, [r1], r2 - vext.8 d5, d4, d5, #1 - vtrn.32 d4, d5 - vadd.i16 d16, d16, d17 - vadd.i16 d17, d18, d19 - pld [r1] - vrshrn.u16 d16, q8, #6 -.ifc \type,avg - vld1.32 {d20[0]}, [lr,:32], r2 - vld1.32 {d20[1]}, [lr,:32], r2 - vrhadd.u8 d16, d16, d20 -.endif - vld1.64 {d6}, [r1], r2 - vext.8 d7, d6, d7, #1 - vtrn.32 d6, d7 - pld [r1] - vst1.32 {d16[0]}, [r0,:32], r2 - vst1.32 {d16[1]}, [r0,:32], r2 - bgt 5b - - pop {r4-r7, pc} -endfunc - .endm - - .macro h264_chroma_mc2 type -function ff_\type\()_h264_chroma_mc2_neon, export=1 - push {r4-r6, lr} - ldr r4, [sp, #16] - ldr lr, [sp, #20] - pld [r1] - pld [r1, r2] - orrs r5, r4, lr - beq 2f - - mul r5, r4, lr - rsb r6, r5, lr, lsl #3 - rsb r12, r5, r4, lsl #3 - sub r4, r5, r4, lsl #3 - sub r4, r4, lr, lsl #3 - add r4, r4, #64 - vdup.8 d0, r4 - vdup.8 d2, r12 - vdup.8 d1, r6 - vdup.8 d3, r5 - vtrn.16 q0, q1 -1: - vld1.32 {d4[0]}, [r1], r2 - vld1.32 {d4[1]}, [r1], r2 - vrev64.32 d5, d4 - vld1.32 {d5[1]}, [r1] - vext.8 q3, q2, q2, #1 - vtrn.16 q2, q3 - vmull.u8 q8, d4, d0 - vmlal.u8 q8, d5, d1 -.ifc \type,avg - vld1.16 {d18[0]}, [r0,:16], r2 - vld1.16 {d18[1]}, [r0,:16] - sub r0, r0, r2 -.endif - vtrn.32 d16, d17 - vadd.i16 d16, d16, d17 - vrshrn.u16 d16, q8, #6 -.ifc \type,avg - vrhadd.u8 d16, d16, d18 -.endif - vst1.16 {d16[0]}, [r0,:16], r2 - vst1.16 {d16[1]}, [r0,:16], r2 - subs r3, r3, #2 - bgt 1b - pop {r4-r6, pc} -2: -.ifc \type,put - ldrh r5, [r1], r2 - strh r5, [r0], r2 - ldrh r6, [r1], r2 - strh r6, [r0], r2 -.else - vld1.16 {d16[0]}, [r1], r2 - vld1.16 {d16[1]}, [r1], r2 - vld1.16 {d18[0]}, [r0,:16], r2 - vld1.16 {d18[1]}, [r0,:16] - sub r0, r0, r2 - vrhadd.u8 d16, d16, d18 - vst1.16 {d16[0]}, [r0,:16], r2 - vst1.16 {d16[1]}, [r0,:16], r2 -.endif - subs r3, r3, #2 - bgt 2b - pop {r4-r6, pc} -endfunc -.endm - - .text - .align - - h264_chroma_mc8 put - h264_chroma_mc8 avg - h264_chroma_mc4 put - h264_chroma_mc4 avg - h264_chroma_mc2 put - h264_chroma_mc2 avg +#include "neon.S" /* H.264 loop filter */ - .macro h264_loop_filter_start - ldr ip, [sp] +.macro h264_loop_filter_start + ldr r12, [sp] tst r2, r2 - ldr ip, [ip] + ldr r12, [r12] + it ne tstne r3, r3 - vmov.32 d24[0], ip - and ip, ip, ip, lsl #16 + vmov.32 d24[0], r12 + and r12, r12, r12, lsl #16 + it eq bxeq lr - ands ip, ip, ip, lsl #8 + ands r12, r12, r12, lsl #8 + it lt bxlt lr - .endm - - .macro align_push_regs - and ip, sp, #15 - add ip, ip, #32 - sub sp, sp, ip - vst1.64 {d12-d15}, [sp,:128] - sub sp, sp, #32 - vst1.64 {d8-d11}, [sp,:128] - .endm - - .macro align_pop_regs - vld1.64 {d8-d11}, [sp,:128]! - vld1.64 {d12-d15}, [sp,:128], ip - .endm +.endm - .macro h264_loop_filter_luma +.macro h264_loop_filter_luma vdup.8 q11, r2 @ alpha vmovl.u8 q12, d24 vabd.u8 q6, q8, q0 @ abs(p0 - q0) @@ -492,31 +104,31 @@ vqmovun.s16 d17, q6 vqmovun.s16 d0, q11 vqmovun.s16 d1, q12 - .endm +.endm function ff_h264_v_loop_filter_luma_neon, export=1 h264_loop_filter_start - vld1.64 {d0, d1}, [r0,:128], r1 - vld1.64 {d2, d3}, [r0,:128], r1 - vld1.64 {d4, d5}, [r0,:128], r1 + vld1.8 {d0, d1}, [r0,:128], r1 + vld1.8 {d2, d3}, [r0,:128], r1 + vld1.8 {d4, d5}, [r0,:128], r1 sub r0, r0, r1, lsl #2 sub r0, r0, r1, lsl #1 - vld1.64 {d20,d21}, [r0,:128], r1 - vld1.64 {d18,d19}, [r0,:128], r1 - vld1.64 {d16,d17}, [r0,:128], r1 + vld1.8 {d20,d21}, [r0,:128], r1 + vld1.8 {d18,d19}, [r0,:128], r1 + vld1.8 {d16,d17}, [r0,:128], r1 - align_push_regs + vpush {d8-d15} h264_loop_filter_luma sub r0, r0, r1, lsl #1 - vst1.64 {d8, d9}, [r0,:128], r1 - vst1.64 {d16,d17}, [r0,:128], r1 - vst1.64 {d0, d1}, [r0,:128], r1 - vst1.64 {d10,d11}, [r0,:128] + vst1.8 {d8, d9}, [r0,:128], r1 + vst1.8 {d16,d17}, [r0,:128], r1 + vst1.8 {d0, d1}, [r0,:128], r1 + vst1.8 {d10,d11}, [r0,:128] - align_pop_regs + vpop {d8-d15} bx lr endfunc @@ -524,26 +136,26 @@ h264_loop_filter_start sub r0, r0, #4 - vld1.64 {d6}, [r0], r1 - vld1.64 {d20}, [r0], r1 - vld1.64 {d18}, [r0], r1 - vld1.64 {d16}, [r0], r1 - vld1.64 {d0}, [r0], r1 - vld1.64 {d2}, [r0], r1 - vld1.64 {d4}, [r0], r1 - vld1.64 {d26}, [r0], r1 - vld1.64 {d7}, [r0], r1 - vld1.64 {d21}, [r0], r1 - vld1.64 {d19}, [r0], r1 - vld1.64 {d17}, [r0], r1 - vld1.64 {d1}, [r0], r1 - vld1.64 {d3}, [r0], r1 - vld1.64 {d5}, [r0], r1 - vld1.64 {d27}, [r0], r1 + vld1.8 {d6}, [r0], r1 + vld1.8 {d20}, [r0], r1 + vld1.8 {d18}, [r0], r1 + vld1.8 {d16}, [r0], r1 + vld1.8 {d0}, [r0], r1 + vld1.8 {d2}, [r0], r1 + vld1.8 {d4}, [r0], r1 + vld1.8 {d26}, [r0], r1 + vld1.8 {d7}, [r0], r1 + vld1.8 {d21}, [r0], r1 + vld1.8 {d19}, [r0], r1 + vld1.8 {d17}, [r0], r1 + vld1.8 {d1}, [r0], r1 + vld1.8 {d3}, [r0], r1 + vld1.8 {d5}, [r0], r1 + vld1.8 {d27}, [r0], r1 transpose_8x8 q3, q10, q9, q8, q0, q1, q2, q13 - align_push_regs + vpush {d8-d15} h264_loop_filter_luma @@ -568,11 +180,11 @@ vst1.32 {d1[1]}, [r0], r1 vst1.32 {d11[1]}, [r0], r1 - align_pop_regs + vpop {d8-d15} bx lr endfunc - .macro h264_loop_filter_chroma +.macro h264_loop_filter_chroma vdup.8 d22, r2 @ alpha vmovl.u8 q12, d24 vabd.u8 d26, d16, d0 @ abs(p0 - q0) @@ -601,22 +213,22 @@ vsubw.s8 q11, q11, d4 vqmovun.s16 d16, q14 vqmovun.s16 d0, q11 - .endm +.endm function ff_h264_v_loop_filter_chroma_neon, export=1 h264_loop_filter_start sub r0, r0, r1, lsl #1 - vld1.64 {d18}, [r0,:64], r1 - vld1.64 {d16}, [r0,:64], r1 - vld1.64 {d0}, [r0,:64], r1 - vld1.64 {d2}, [r0,:64] + vld1.8 {d18}, [r0,:64], r1 + vld1.8 {d16}, [r0,:64], r1 + vld1.8 {d0}, [r0,:64], r1 + vld1.8 {d2}, [r0,:64] h264_loop_filter_chroma sub r0, r0, r1, lsl #1 - vst1.64 {d16}, [r0,:64], r1 - vst1.64 {d0}, [r0,:64], r1 + vst1.8 {d16}, [r0,:64], r1 + vst1.8 {d0}, [r0,:64], r1 bx lr endfunc @@ -661,20 +273,20 @@ /* H.264 qpel MC */ - .macro lowpass_const r +.macro lowpass_const r movw \r, #5 movt \r, #20 vmov.32 d6[0], \r - .endm +.endm - .macro lowpass_8 r0, r1, r2, r3, d0, d1, narrow=1 -.if \narrow +.macro lowpass_8 r0, r1, r2, r3, d0, d1, narrow=1 + .if \narrow t0 .req q0 t1 .req q8 -.else + .else t0 .req \d0 t1 .req \d1 -.endif + .endif vext.8 d2, \r0, \r1, #2 vext.8 d3, \r0, \r1, #3 vaddl.u8 q1, d2, d3 @@ -695,20 +307,20 @@ vaddl.u8 t1, \r2, d31 vmla.i16 t1, q9, d6[1] vmls.i16 t1, q10, d6[0] -.if \narrow + .if \narrow vqrshrun.s16 \d0, t0, #5 vqrshrun.s16 \d1, t1, #5 -.endif + .endif .unreq t0 .unreq t1 - .endm +.endm - .macro lowpass_8_1 r0, r1, d0, narrow=1 -.if \narrow +.macro lowpass_8_1 r0, r1, d0, narrow=1 + .if \narrow t0 .req q0 -.else + .else t0 .req \d0 -.endif + .endif vext.8 d2, \r0, \r1, #2 vext.8 d3, \r0, \r1, #3 vaddl.u8 q1, d2, d3 @@ -719,13 +331,13 @@ vaddl.u8 t0, \r0, d30 vmla.i16 t0, q1, d6[1] vmls.i16 t0, q2, d6[0] -.if \narrow + .if \narrow vqrshrun.s16 \d0, t0, #5 -.endif + .endif .unreq t0 - .endm +.endm - .macro lowpass_8.16 r0, r1, l0, h0, l1, h1, d +.macro lowpass_8.16 r0, r1, l0, h0, l1, h1, d vext.16 q1, \r0, \r1, #2 vext.16 q0, \r0, \r1, #3 vaddl.s16 q9, d2, d0 @@ -760,59 +372,59 @@ vrshrn.s32 d19, q1, #10 vqmovun.s16 \d, q9 - .endm +.endm function put_h264_qpel16_h_lowpass_neon_packed mov r4, lr - mov ip, #16 + mov r12, #16 mov r3, #8 bl put_h264_qpel8_h_lowpass_neon sub r1, r1, r2, lsl #4 add r1, r1, #8 - mov ip, #16 + mov r12, #16 mov lr, r4 b put_h264_qpel8_h_lowpass_neon endfunc - .macro h264_qpel_h_lowpass type +.macro h264_qpel_h_lowpass type function \type\()_h264_qpel16_h_lowpass_neon push {lr} - mov ip, #16 + mov r12, #16 bl \type\()_h264_qpel8_h_lowpass_neon sub r0, r0, r3, lsl #4 sub r1, r1, r2, lsl #4 add r0, r0, #8 add r1, r1, #8 - mov ip, #16 + mov r12, #16 pop {lr} endfunc function \type\()_h264_qpel8_h_lowpass_neon -1: vld1.64 {d0, d1}, [r1], r2 - vld1.64 {d16,d17}, [r1], r2 - subs ip, ip, #2 +1: vld1.8 {d0, d1}, [r1], r2 + vld1.8 {d16,d17}, [r1], r2 + subs r12, r12, #2 lowpass_8 d0, d1, d16, d17, d0, d16 -.ifc \type,avg + .ifc \type,avg vld1.8 {d2}, [r0,:64], r3 vrhadd.u8 d0, d0, d2 vld1.8 {d3}, [r0,:64] vrhadd.u8 d16, d16, d3 sub r0, r0, r3 -.endif - vst1.64 {d0}, [r0,:64], r3 - vst1.64 {d16}, [r0,:64], r3 + .endif + vst1.8 {d0}, [r0,:64], r3 + vst1.8 {d16}, [r0,:64], r3 bne 1b bx lr endfunc - .endm +.endm h264_qpel_h_lowpass put h264_qpel_h_lowpass avg - .macro h264_qpel_h_lowpass_l2 type +.macro h264_qpel_h_lowpass_l2 type function \type\()_h264_qpel16_h_lowpass_l2_neon push {lr} - mov ip, #16 + mov r12, #16 bl \type\()_h264_qpel8_h_lowpass_l2_neon sub r0, r0, r2, lsl #4 sub r1, r1, r2, lsl #4 @@ -820,31 +432,31 @@ add r0, r0, #8 add r1, r1, #8 add r3, r3, #8 - mov ip, #16 + mov r12, #16 pop {lr} endfunc function \type\()_h264_qpel8_h_lowpass_l2_neon -1: vld1.64 {d0, d1}, [r1], r2 - vld1.64 {d16,d17}, [r1], r2 - vld1.64 {d28}, [r3], r2 - vld1.64 {d29}, [r3], r2 - subs ip, ip, #2 +1: vld1.8 {d0, d1}, [r1], r2 + vld1.8 {d16,d17}, [r1], r2 + vld1.8 {d28}, [r3], r2 + vld1.8 {d29}, [r3], r2 + subs r12, r12, #2 lowpass_8 d0, d1, d16, d17, d0, d1 vrhadd.u8 q0, q0, q14 -.ifc \type,avg + .ifc \type,avg vld1.8 {d2}, [r0,:64], r2 vrhadd.u8 d0, d0, d2 vld1.8 {d3}, [r0,:64] vrhadd.u8 d1, d1, d3 sub r0, r0, r2 -.endif - vst1.64 {d0}, [r0,:64], r2 - vst1.64 {d1}, [r0,:64], r2 + .endif + vst1.8 {d0}, [r0,:64], r2 + vst1.8 {d1}, [r0,:64], r2 bne 1b bx lr endfunc - .endm +.endm h264_qpel_h_lowpass_l2 put h264_qpel_h_lowpass_l2 avg @@ -864,7 +476,7 @@ b put_h264_qpel8_v_lowpass_neon endfunc - .macro h264_qpel_v_lowpass type +.macro h264_qpel_v_lowpass type function \type\()_h264_qpel16_v_lowpass_neon mov r4, lr bl \type\()_h264_qpel8_v_lowpass_neon @@ -881,19 +493,19 @@ endfunc function \type\()_h264_qpel8_v_lowpass_neon - vld1.64 {d8}, [r1], r3 - vld1.64 {d10}, [r1], r3 - vld1.64 {d12}, [r1], r3 - vld1.64 {d14}, [r1], r3 - vld1.64 {d22}, [r1], r3 - vld1.64 {d24}, [r1], r3 - vld1.64 {d26}, [r1], r3 - vld1.64 {d28}, [r1], r3 - vld1.64 {d9}, [r1], r3 - vld1.64 {d11}, [r1], r3 - vld1.64 {d13}, [r1], r3 - vld1.64 {d15}, [r1], r3 - vld1.64 {d23}, [r1] + vld1.8 {d8}, [r1], r3 + vld1.8 {d10}, [r1], r3 + vld1.8 {d12}, [r1], r3 + vld1.8 {d14}, [r1], r3 + vld1.8 {d22}, [r1], r3 + vld1.8 {d24}, [r1], r3 + vld1.8 {d26}, [r1], r3 + vld1.8 {d28}, [r1], r3 + vld1.8 {d9}, [r1], r3 + vld1.8 {d11}, [r1], r3 + vld1.8 {d13}, [r1], r3 + vld1.8 {d15}, [r1], r3 + vld1.8 {d23}, [r1] transpose_8x8 q4, q5, q6, q7, q11, q12, q13, q14 lowpass_8 d8, d9, d10, d11, d8, d10 @@ -902,7 +514,7 @@ lowpass_8 d26, d27, d28, d29, d26, d28 transpose_8x8 d8, d10, d12, d14, d22, d24, d26, d28 -.ifc \type,avg + .ifc \type,avg vld1.8 {d9}, [r0,:64], r2 vrhadd.u8 d8, d8, d9 vld1.8 {d11}, [r0,:64], r2 @@ -920,34 +532,34 @@ vld1.8 {d29}, [r0,:64], r2 vrhadd.u8 d28, d28, d29 sub r0, r0, r2, lsl #3 -.endif + .endif - vst1.64 {d8}, [r0,:64], r2 - vst1.64 {d10}, [r0,:64], r2 - vst1.64 {d12}, [r0,:64], r2 - vst1.64 {d14}, [r0,:64], r2 - vst1.64 {d22}, [r0,:64], r2 - vst1.64 {d24}, [r0,:64], r2 - vst1.64 {d26}, [r0,:64], r2 - vst1.64 {d28}, [r0,:64], r2 + vst1.8 {d8}, [r0,:64], r2 + vst1.8 {d10}, [r0,:64], r2 + vst1.8 {d12}, [r0,:64], r2 + vst1.8 {d14}, [r0,:64], r2 + vst1.8 {d22}, [r0,:64], r2 + vst1.8 {d24}, [r0,:64], r2 + vst1.8 {d26}, [r0,:64], r2 + vst1.8 {d28}, [r0,:64], r2 bx lr endfunc - .endm +.endm h264_qpel_v_lowpass put h264_qpel_v_lowpass avg - .macro h264_qpel_v_lowpass_l2 type +.macro h264_qpel_v_lowpass_l2 type function \type\()_h264_qpel16_v_lowpass_l2_neon mov r4, lr bl \type\()_h264_qpel8_v_lowpass_l2_neon sub r1, r1, r3, lsl #2 bl \type\()_h264_qpel8_v_lowpass_l2_neon sub r0, r0, r3, lsl #4 - sub ip, ip, r2, lsl #4 + sub r12, r12, r2, lsl #4 add r0, r0, #8 - add ip, ip, #8 + add r12, r12, #8 sub r1, r1, r3, lsl #4 sub r1, r1, r3, lsl #2 add r1, r1, #8 @@ -957,19 +569,19 @@ endfunc function \type\()_h264_qpel8_v_lowpass_l2_neon - vld1.64 {d8}, [r1], r3 - vld1.64 {d10}, [r1], r3 - vld1.64 {d12}, [r1], r3 - vld1.64 {d14}, [r1], r3 - vld1.64 {d22}, [r1], r3 - vld1.64 {d24}, [r1], r3 - vld1.64 {d26}, [r1], r3 - vld1.64 {d28}, [r1], r3 - vld1.64 {d9}, [r1], r3 - vld1.64 {d11}, [r1], r3 - vld1.64 {d13}, [r1], r3 - vld1.64 {d15}, [r1], r3 - vld1.64 {d23}, [r1] + vld1.8 {d8}, [r1], r3 + vld1.8 {d10}, [r1], r3 + vld1.8 {d12}, [r1], r3 + vld1.8 {d14}, [r1], r3 + vld1.8 {d22}, [r1], r3 + vld1.8 {d24}, [r1], r3 + vld1.8 {d26}, [r1], r3 + vld1.8 {d28}, [r1], r3 + vld1.8 {d9}, [r1], r3 + vld1.8 {d11}, [r1], r3 + vld1.8 {d13}, [r1], r3 + vld1.8 {d15}, [r1], r3 + vld1.8 {d23}, [r1] transpose_8x8 q4, q5, q6, q7, q11, q12, q13, q14 lowpass_8 d8, d9, d10, d11, d8, d9 @@ -978,20 +590,20 @@ lowpass_8 d26, d27, d28, d29, d26, d27 transpose_8x8 d8, d9, d12, d13, d22, d23, d26, d27 - vld1.64 {d0}, [ip], r2 - vld1.64 {d1}, [ip], r2 - vld1.64 {d2}, [ip], r2 - vld1.64 {d3}, [ip], r2 - vld1.64 {d4}, [ip], r2 + vld1.8 {d0}, [r12], r2 + vld1.8 {d1}, [r12], r2 + vld1.8 {d2}, [r12], r2 + vld1.8 {d3}, [r12], r2 + vld1.8 {d4}, [r12], r2 vrhadd.u8 q0, q0, q4 - vld1.64 {d5}, [ip], r2 + vld1.8 {d5}, [r12], r2 vrhadd.u8 q1, q1, q6 - vld1.64 {d10}, [ip], r2 + vld1.8 {d10}, [r12], r2 vrhadd.u8 q2, q2, q11 - vld1.64 {d11}, [ip], r2 + vld1.8 {d11}, [r12], r2 vrhadd.u8 q5, q5, q13 -.ifc \type,avg + .ifc \type,avg vld1.8 {d16}, [r0,:64], r3 vrhadd.u8 d0, d0, d16 vld1.8 {d17}, [r0,:64], r3 @@ -1009,51 +621,51 @@ vld1.8 {d17}, [r0,:64], r3 vrhadd.u8 d11, d11, d17 sub r0, r0, r3, lsl #3 -.endif + .endif - vst1.64 {d0}, [r0,:64], r3 - vst1.64 {d1}, [r0,:64], r3 - vst1.64 {d2}, [r0,:64], r3 - vst1.64 {d3}, [r0,:64], r3 - vst1.64 {d4}, [r0,:64], r3 - vst1.64 {d5}, [r0,:64], r3 - vst1.64 {d10}, [r0,:64], r3 - vst1.64 {d11}, [r0,:64], r3 + vst1.8 {d0}, [r0,:64], r3 + vst1.8 {d1}, [r0,:64], r3 + vst1.8 {d2}, [r0,:64], r3 + vst1.8 {d3}, [r0,:64], r3 + vst1.8 {d4}, [r0,:64], r3 + vst1.8 {d5}, [r0,:64], r3 + vst1.8 {d10}, [r0,:64], r3 + vst1.8 {d11}, [r0,:64], r3 bx lr endfunc - .endm +.endm h264_qpel_v_lowpass_l2 put h264_qpel_v_lowpass_l2 avg function put_h264_qpel8_hv_lowpass_neon_top - lowpass_const ip - mov ip, #12 -1: vld1.64 {d0, d1}, [r1], r3 - vld1.64 {d16,d17}, [r1], r3 - subs ip, ip, #2 + lowpass_const r12 + mov r12, #12 +1: vld1.8 {d0, d1}, [r1], r3 + vld1.8 {d16,d17}, [r1], r3 + subs r12, r12, #2 lowpass_8 d0, d1, d16, d17, q11, q12, narrow=0 - vst1.64 {d22-d25}, [r4,:128]! + vst1.8 {d22-d25}, [r4,:128]! bne 1b - vld1.64 {d0, d1}, [r1] + vld1.8 {d0, d1}, [r1] lowpass_8_1 d0, d1, q12, narrow=0 - mov ip, #-16 - add r4, r4, ip - vld1.64 {d30,d31}, [r4,:128], ip - vld1.64 {d20,d21}, [r4,:128], ip - vld1.64 {d18,d19}, [r4,:128], ip - vld1.64 {d16,d17}, [r4,:128], ip - vld1.64 {d14,d15}, [r4,:128], ip - vld1.64 {d12,d13}, [r4,:128], ip - vld1.64 {d10,d11}, [r4,:128], ip - vld1.64 {d8, d9}, [r4,:128], ip - vld1.64 {d6, d7}, [r4,:128], ip - vld1.64 {d4, d5}, [r4,:128], ip - vld1.64 {d2, d3}, [r4,:128], ip - vld1.64 {d0, d1}, [r4,:128] + mov r12, #-16 + add r4, r4, r12 + vld1.8 {d30,d31}, [r4,:128], r12 + vld1.8 {d20,d21}, [r4,:128], r12 + vld1.8 {d18,d19}, [r4,:128], r12 + vld1.8 {d16,d17}, [r4,:128], r12 + vld1.8 {d14,d15}, [r4,:128], r12 + vld1.8 {d12,d13}, [r4,:128], r12 + vld1.8 {d10,d11}, [r4,:128], r12 + vld1.8 {d8, d9}, [r4,:128], r12 + vld1.8 {d6, d7}, [r4,:128], r12 + vld1.8 {d4, d5}, [r4,:128], r12 + vld1.8 {d2, d3}, [r4,:128], r12 + vld1.8 {d0, d1}, [r4,:128] swap4 d1, d3, d5, d7, d8, d10, d12, d14 transpose16_4x4 q0, q1, q2, q3, q4, q5, q6, q7 @@ -1061,31 +673,31 @@ swap4 d17, d19, d21, d31, d24, d26, d28, d22 transpose16_4x4 q8, q9, q10, q15, q12, q13, q14, q11 - vst1.64 {d30,d31}, [r4,:128]! - vst1.64 {d6, d7}, [r4,:128]! - vst1.64 {d20,d21}, [r4,:128]! - vst1.64 {d4, d5}, [r4,:128]! - vst1.64 {d18,d19}, [r4,:128]! - vst1.64 {d2, d3}, [r4,:128]! - vst1.64 {d16,d17}, [r4,:128]! - vst1.64 {d0, d1}, [r4,:128] + vst1.8 {d30,d31}, [r4,:128]! + vst1.8 {d6, d7}, [r4,:128]! + vst1.8 {d20,d21}, [r4,:128]! + vst1.8 {d4, d5}, [r4,:128]! + vst1.8 {d18,d19}, [r4,:128]! + vst1.8 {d2, d3}, [r4,:128]! + vst1.8 {d16,d17}, [r4,:128]! + vst1.8 {d0, d1}, [r4,:128] lowpass_8.16 q4, q12, d8, d9, d24, d25, d8 lowpass_8.16 q5, q13, d10, d11, d26, d27, d9 lowpass_8.16 q6, q14, d12, d13, d28, d29, d10 lowpass_8.16 q7, q11, d14, d15, d22, d23, d11 - vld1.64 {d16,d17}, [r4,:128], ip - vld1.64 {d30,d31}, [r4,:128], ip + vld1.8 {d16,d17}, [r4,:128], r12 + vld1.8 {d30,d31}, [r4,:128], r12 lowpass_8.16 q8, q15, d16, d17, d30, d31, d12 - vld1.64 {d16,d17}, [r4,:128], ip - vld1.64 {d30,d31}, [r4,:128], ip + vld1.8 {d16,d17}, [r4,:128], r12 + vld1.8 {d30,d31}, [r4,:128], r12 lowpass_8.16 q8, q15, d16, d17, d30, d31, d13 - vld1.64 {d16,d17}, [r4,:128], ip - vld1.64 {d30,d31}, [r4,:128], ip + vld1.8 {d16,d17}, [r4,:128], r12 + vld1.8 {d30,d31}, [r4,:128], r12 lowpass_8.16 q8, q15, d16, d17, d30, d31, d14 - vld1.64 {d16,d17}, [r4,:128], ip - vld1.64 {d30,d31}, [r4,:128] + vld1.8 {d16,d17}, [r4,:128], r12 + vld1.8 {d30,d31}, [r4,:128] lowpass_8.16 q8, q15, d16, d17, d30, d31, d15 transpose_8x8 d12, d13, d14, d15, d8, d9, d10, d11 @@ -1093,11 +705,11 @@ bx lr endfunc - .macro h264_qpel8_hv_lowpass type +.macro h264_qpel8_hv_lowpass type function \type\()_h264_qpel8_hv_lowpass_neon mov r10, lr bl put_h264_qpel8_hv_lowpass_neon_top -.ifc \type,avg + .ifc \type,avg vld1.8 {d0}, [r0,:64], r2 vrhadd.u8 d12, d12, d0 vld1.8 {d1}, [r0,:64], r2 @@ -1115,38 +727,39 @@ vld1.8 {d7}, [r0,:64], r2 vrhadd.u8 d11, d11, d7 sub r0, r0, r2, lsl #3 -.endif - vst1.64 {d12}, [r0,:64], r2 - vst1.64 {d13}, [r0,:64], r2 - vst1.64 {d14}, [r0,:64], r2 - vst1.64 {d15}, [r0,:64], r2 - vst1.64 {d8}, [r0,:64], r2 - vst1.64 {d9}, [r0,:64], r2 - vst1.64 {d10}, [r0,:64], r2 - vst1.64 {d11}, [r0,:64], r2 + .endif + + vst1.8 {d12}, [r0,:64], r2 + vst1.8 {d13}, [r0,:64], r2 + vst1.8 {d14}, [r0,:64], r2 + vst1.8 {d15}, [r0,:64], r2 + vst1.8 {d8}, [r0,:64], r2 + vst1.8 {d9}, [r0,:64], r2 + vst1.8 {d10}, [r0,:64], r2 + vst1.8 {d11}, [r0,:64], r2 mov lr, r10 bx lr endfunc - .endm +.endm h264_qpel8_hv_lowpass put h264_qpel8_hv_lowpass avg - .macro h264_qpel8_hv_lowpass_l2 type +.macro h264_qpel8_hv_lowpass_l2 type function \type\()_h264_qpel8_hv_lowpass_l2_neon mov r10, lr bl put_h264_qpel8_hv_lowpass_neon_top - vld1.64 {d0, d1}, [r2,:128]! - vld1.64 {d2, d3}, [r2,:128]! + vld1.8 {d0, d1}, [r2,:128]! + vld1.8 {d2, d3}, [r2,:128]! vrhadd.u8 q0, q0, q6 - vld1.64 {d4, d5}, [r2,:128]! + vld1.8 {d4, d5}, [r2,:128]! vrhadd.u8 q1, q1, q7 - vld1.64 {d6, d7}, [r2,:128]! + vld1.8 {d6, d7}, [r2,:128]! vrhadd.u8 q2, q2, q4 vrhadd.u8 q3, q3, q5 -.ifc \type,avg + .ifc \type,avg vld1.8 {d16}, [r0,:64], r3 vrhadd.u8 d0, d0, d16 vld1.8 {d17}, [r0,:64], r3 @@ -1164,25 +777,25 @@ vld1.8 {d23}, [r0,:64], r3 vrhadd.u8 d7, d7, d23 sub r0, r0, r3, lsl #3 -.endif - vst1.64 {d0}, [r0,:64], r3 - vst1.64 {d1}, [r0,:64], r3 - vst1.64 {d2}, [r0,:64], r3 - vst1.64 {d3}, [r0,:64], r3 - vst1.64 {d4}, [r0,:64], r3 - vst1.64 {d5}, [r0,:64], r3 - vst1.64 {d6}, [r0,:64], r3 - vst1.64 {d7}, [r0,:64], r3 + .endif + vst1.8 {d0}, [r0,:64], r3 + vst1.8 {d1}, [r0,:64], r3 + vst1.8 {d2}, [r0,:64], r3 + vst1.8 {d3}, [r0,:64], r3 + vst1.8 {d4}, [r0,:64], r3 + vst1.8 {d5}, [r0,:64], r3 + vst1.8 {d6}, [r0,:64], r3 + vst1.8 {d7}, [r0,:64], r3 mov lr, r10 bx lr endfunc - .endm +.endm h264_qpel8_hv_lowpass_l2 put h264_qpel8_hv_lowpass_l2 avg - .macro h264_qpel16_hv type +.macro h264_qpel16_hv type function \type\()_h264_qpel16_hv_lowpass_neon mov r9, lr bl \type\()_h264_qpel8_hv_lowpass_neon @@ -1215,17 +828,17 @@ mov lr, r9 b \type\()_h264_qpel8_hv_lowpass_l2_neon endfunc - .endm +.endm h264_qpel16_hv put h264_qpel16_hv avg - .macro h264_qpel8 type +.macro h264_qpel8 type function ff_\type\()_h264_qpel8_mc10_neon, export=1 lowpass_const r3 mov r3, r1 sub r1, r1, #2 - mov ip, #8 + mov r12, #8 b \type\()_h264_qpel8_h_lowpass_l2_neon endfunc @@ -1233,7 +846,7 @@ lowpass_const r3 sub r1, r1, #2 mov r3, r2 - mov ip, #8 + mov r12, #8 b \type\()_h264_qpel8_h_lowpass_neon endfunc @@ -1241,13 +854,13 @@ lowpass_const r3 add r3, r1, #1 sub r1, r1, #2 - mov ip, #8 + mov r12, #8 b \type\()_h264_qpel8_h_lowpass_l2_neon endfunc function ff_\type\()_h264_qpel8_mc01_neon, export=1 push {lr} - mov ip, r1 + mov r12, r1 \type\()_h264_qpel8_mc01: lowpass_const r3 mov r3, r2 @@ -1263,22 +876,24 @@ \type\()_h264_qpel8_mc11: lowpass_const r3 mov r11, sp - bic sp, sp, #15 +A bic sp, sp, #15 +T bic r0, r11, #15 +T mov sp, r0 sub sp, sp, #64 mov r0, sp sub r1, r1, #2 mov r3, #8 - mov ip, #8 + mov r12, #8 vpush {d8-d15} bl put_h264_qpel8_h_lowpass_neon - ldrd r0, [r11] + ldrd r0, [r11], #8 mov r3, r2 - add ip, sp, #64 + add r12, sp, #64 sub r1, r1, r2, lsl #1 mov r2, #8 bl \type\()_h264_qpel8_v_lowpass_l2_neon vpop {d8-d15} - add sp, r11, #8 + mov sp, r11 pop {r11, pc} endfunc @@ -1287,23 +902,25 @@ \type\()_h264_qpel8_mc21: lowpass_const r3 mov r11, sp - bic sp, sp, #15 +A bic sp, sp, #15 +T bic r0, r11, #15 +T mov sp, r0 sub sp, sp, #(8*8+16*12) sub r1, r1, #2 mov r3, #8 mov r0, sp - mov ip, #8 + mov r12, #8 vpush {d8-d15} bl put_h264_qpel8_h_lowpass_neon mov r4, r0 - ldrd r0, [r11] + ldrd r0, [r11], #8 sub r1, r1, r2, lsl #1 sub r1, r1, #2 mov r3, r2 sub r2, r4, #64 bl \type\()_h264_qpel8_hv_lowpass_l2_neon vpop {d8-d15} - add sp, r11, #8 + mov sp, r11 pop {r4, r10, r11, pc} endfunc @@ -1330,7 +947,9 @@ \type\()_h264_qpel8_mc12: lowpass_const r3 mov r11, sp - bic sp, sp, #15 +A bic sp, sp, #15 +T bic r0, r11, #15 +T mov sp, r0 sub sp, sp, #(8*8+16*12) sub r1, r1, r2, lsl #1 mov r3, r2 @@ -1339,20 +958,22 @@ vpush {d8-d15} bl put_h264_qpel8_v_lowpass_neon mov r4, r0 - ldrd r0, [r11] + ldrd r0, [r11], #8 sub r1, r1, r3, lsl #1 sub r1, r1, #2 sub r2, r4, #64 bl \type\()_h264_qpel8_hv_lowpass_l2_neon vpop {d8-d15} - add sp, r11, #8 + mov sp, r11 pop {r4, r10, r11, pc} endfunc function ff_\type\()_h264_qpel8_mc22_neon, export=1 push {r4, r10, r11, lr} mov r11, sp - bic sp, sp, #15 +A bic sp, sp, #15 +T bic r4, r11, #15 +T mov sp, r4 sub r1, r1, r2, lsl #1 sub r1, r1, #2 mov r3, r2 @@ -1373,7 +994,7 @@ function ff_\type\()_h264_qpel8_mc03_neon, export=1 push {lr} - add ip, r1, r2 + add r12, r1, r2 b \type\()_h264_qpel8_mc01 endfunc @@ -1396,12 +1017,12 @@ sub r1, r1, #1 b \type\()_h264_qpel8_mc11 endfunc - .endm +.endm h264_qpel8 put h264_qpel8 avg - .macro h264_qpel16 type +.macro h264_qpel16 type function ff_\type\()_h264_qpel16_mc10_neon, export=1 lowpass_const r3 mov r3, r1 @@ -1425,7 +1046,7 @@ function ff_\type\()_h264_qpel16_mc01_neon, export=1 push {r4, lr} - mov ip, r1 + mov r12, r1 \type\()_h264_qpel16_mc01: lowpass_const r3 mov r3, r2 @@ -1441,21 +1062,23 @@ \type\()_h264_qpel16_mc11: lowpass_const r3 mov r11, sp - bic sp, sp, #15 +A bic sp, sp, #15 +T bic r0, r11, #15 +T mov sp, r0 sub sp, sp, #256 mov r0, sp sub r1, r1, #2 mov r3, #16 vpush {d8-d15} bl put_h264_qpel16_h_lowpass_neon - ldrd r0, [r11] + ldrd r0, [r11], #8 mov r3, r2 - add ip, sp, #64 + add r12, sp, #64 sub r1, r1, r2, lsl #1 mov r2, #16 bl \type\()_h264_qpel16_v_lowpass_l2_neon vpop {d8-d15} - add sp, r11, #8 + mov sp, r11 pop {r4, r11, pc} endfunc @@ -1464,20 +1087,22 @@ \type\()_h264_qpel16_mc21: lowpass_const r3 mov r11, sp - bic sp, sp, #15 +A bic sp, sp, #15 +T bic r0, r11, #15 +T mov sp, r0 sub sp, sp, #(16*16+16*12) sub r1, r1, #2 mov r0, sp vpush {d8-d15} bl put_h264_qpel16_h_lowpass_neon_packed mov r4, r0 - ldrd r0, [r11] + ldrd r0, [r11], #8 sub r1, r1, r2, lsl #1 sub r1, r1, #2 mov r3, r2 bl \type\()_h264_qpel16_hv_lowpass_l2_neon vpop {d8-d15} - add sp, r11, #8 + mov sp, r11 pop {r4-r5, r9-r11, pc} endfunc @@ -1504,7 +1129,9 @@ \type\()_h264_qpel16_mc12: lowpass_const r3 mov r11, sp - bic sp, sp, #15 +A bic sp, sp, #15 +T bic r0, r11, #15 +T mov sp, r0 sub sp, sp, #(16*16+16*12) sub r1, r1, r2, lsl #1 mov r0, sp @@ -1512,13 +1139,13 @@ vpush {d8-d15} bl put_h264_qpel16_v_lowpass_neon_packed mov r4, r0 - ldrd r0, [r11] + ldrd r0, [r11], #8 sub r1, r1, r3, lsl #1 sub r1, r1, #2 mov r2, r3 bl \type\()_h264_qpel16_hv_lowpass_l2_neon vpop {d8-d15} - add sp, r11, #8 + mov sp, r11 pop {r4-r5, r9-r11, pc} endfunc @@ -1526,7 +1153,9 @@ push {r4, r9-r11, lr} lowpass_const r3 mov r11, sp - bic sp, sp, #15 +A bic sp, sp, #15 +T bic r4, r11, #15 +T mov sp, r4 sub r1, r1, r2, lsl #1 sub r1, r1, #2 mov r3, r2 @@ -1547,7 +1176,7 @@ function ff_\type\()_h264_qpel16_mc03_neon, export=1 push {r4, lr} - add ip, r1, r2 + add r12, r1, r2 b \type\()_h264_qpel16_mc01 endfunc @@ -1570,19 +1199,19 @@ sub r1, r1, #1 b \type\()_h264_qpel16_mc11 endfunc - .endm +.endm h264_qpel16 put h264_qpel16 avg @ Biweighted prediction - .macro biweight_16 macs, macd +.macro biweight_16 macs, macd vdup.8 d0, r4 vdup.8 d1, r5 vmov q2, q8 vmov q3, q8 -1: subs ip, ip, #2 +1: subs r3, r3, #2 vld1.8 {d20-d21},[r0,:128], r2 \macd q2, d0, d20 pld [r0] @@ -1615,14 +1244,14 @@ vst1.8 {d24-d25},[r6,:128], r2 bne 1b pop {r4-r6, pc} - .endm +.endm - .macro biweight_8 macs, macd +.macro biweight_8 macs, macd vdup.8 d0, r4 vdup.8 d1, r5 vmov q1, q8 vmov q10, q8 -1: subs ip, ip, #2 +1: subs r3, r3, #2 vld1.8 {d4},[r0,:64], r2 \macd q1, d0, d4 pld [r0] @@ -1645,14 +1274,14 @@ vst1.8 {d4},[r6,:64], r2 bne 1b pop {r4-r6, pc} - .endm +.endm - .macro biweight_4 macs, macd +.macro biweight_4 macs, macd vdup.8 d0, r4 vdup.8 d1, r5 vmov q1, q8 vmov q10, q8 -1: subs ip, ip, #4 +1: subs r3, r3, #4 vld1.32 {d4[0]},[r0,:32], r2 vld1.32 {d4[1]},[r0,:32], r2 \macd q1, d0, d4 @@ -1687,19 +1316,20 @@ vst1.32 {d2[0]},[r6,:32], r2 vst1.32 {d2[1]},[r6,:32], r2 pop {r4-r6, pc} - .endm +.endm - .macro biweight_func w -function biweight_h264_pixels_\w\()_neon +.macro biweight_func w +function ff_biweight_h264_pixels_\w\()_neon, export=1 push {r4-r6, lr} - add r4, sp, #16 + ldr r12, [sp, #16] + add r4, sp, #20 ldm r4, {r4-r6} lsr lr, r4, #31 add r6, r6, #1 eors lr, lr, r5, lsr #30 orr r6, r6, #1 - vdup.16 q9, r3 - lsl r6, r6, r3 + vdup.16 q9, r12 + lsl r6, r6, r12 vmvn q9, q9 vdup.16 q8, r6 mov r6, r0 @@ -1718,36 +1348,17 @@ 40: rsb r5, r5, #0 biweight_\w vmlsl.u8, vmlal.u8 endfunc - .endm - - .macro biweight_entry w, h, b=1 -function ff_biweight_h264_pixels_\w\()x\h\()_neon, export=1 - mov ip, #\h -.if \b - b biweight_h264_pixels_\w\()_neon -.endif -endfunc - .endm +.endm - biweight_entry 16, 8 - biweight_entry 16, 16, b=0 biweight_func 16 - - biweight_entry 8, 16 - biweight_entry 8, 4 - biweight_entry 8, 8, b=0 biweight_func 8 - - biweight_entry 4, 8 - biweight_entry 4, 2 - biweight_entry 4, 4, b=0 biweight_func 4 @ Weighted prediction - .macro weight_16 add - vdup.8 d0, r3 -1: subs ip, ip, #2 +.macro weight_16 add + vdup.8 d0, r12 +1: subs r2, r2, #2 vld1.8 {d20-d21},[r0,:128], r1 vmull.u8 q2, d0, d20 pld [r0] @@ -1772,11 +1383,11 @@ vst1.8 {d24-d25},[r4,:128], r1 bne 1b pop {r4, pc} - .endm +.endm - .macro weight_8 add - vdup.8 d0, r3 -1: subs ip, ip, #2 +.macro weight_8 add + vdup.8 d0, r12 +1: subs r2, r2, #2 vld1.8 {d4},[r0,:64], r1 vmull.u8 q1, d0, d4 pld [r0] @@ -1793,13 +1404,13 @@ vst1.8 {d4},[r4,:64], r1 bne 1b pop {r4, pc} - .endm +.endm - .macro weight_4 add - vdup.8 d0, r3 +.macro weight_4 add + vdup.8 d0, r12 vmov q1, q8 vmov q10, q8 -1: subs ip, ip, #4 +1: subs r2, r2, #4 vld1.32 {d4[0]},[r0,:32], r1 vld1.32 {d4[1]},[r0,:32], r1 vmull.u8 q1, d0, d4 @@ -1829,53 +1440,35 @@ vst1.32 {d2[0]},[r4,:32], r1 vst1.32 {d2[1]},[r4,:32], r1 pop {r4, pc} - .endm +.endm - .macro weight_func w -function weight_h264_pixels_\w\()_neon +.macro weight_func w +function ff_weight_h264_pixels_\w\()_neon, export=1 push {r4, lr} - ldr r4, [sp, #8] - cmp r2, #1 - lsl r4, r4, r2 + ldr r12, [sp, #8] + ldr r4, [sp, #12] + cmp r3, #1 + lsl r4, r4, r3 vdup.16 q8, r4 mov r4, r0 ble 20f - rsb lr, r2, #1 + rsb lr, r3, #1 vdup.16 q9, lr - cmp r3, #0 + cmp r12, #0 blt 10f weight_\w vhadd.s16 -10: rsb r3, r3, #0 +10: rsb r12, r12, #0 weight_\w vhsub.s16 -20: rsb lr, r2, #0 +20: rsb lr, r3, #0 vdup.16 q9, lr - cmp r3, #0 + cmp r12, #0 blt 10f weight_\w vadd.s16 -10: rsb r3, r3, #0 +10: rsb r12, r12, #0 weight_\w vsub.s16 endfunc - .endm - - .macro weight_entry w, h, b=1 -function ff_weight_h264_pixels_\w\()x\h\()_neon, export=1 - mov ip, #\h -.if \b - b weight_h264_pixels_\w\()_neon -.endif -endfunc - .endm +.endm - weight_entry 16, 8 - weight_entry 16, 16, b=0 weight_func 16 - - weight_entry 8, 16 - weight_entry 8, 4 - weight_entry 8, 8, b=0 weight_func 8 - - weight_entry 4, 8 - weight_entry 4, 2 - weight_entry 4, 4, b=0 weight_func 4 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264idct_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264idct_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264idct_neon.S 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264idct_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -21,7 +21,6 @@ #include "asm.S" preserve8 - .text function ff_h264_idct_add_neon, export=1 vld1.64 {d0-d3}, [r1,:128] @@ -106,10 +105,12 @@ blt 2f ldrsh lr, [r1] add r0, r0, r4 + it ne movne lr, #0 cmp lr, #0 - adrne lr, ff_h264_idct_dc_add_neon - adreq lr, ff_h264_idct_add_neon + ite ne + adrne lr, ff_h264_idct_dc_add_neon + CONFIG_THUMB + adreq lr, ff_h264_idct_add_neon + CONFIG_THUMB blx lr 2: subs ip, ip, #1 add r1, r1, #32 @@ -132,8 +133,9 @@ add r0, r0, r4 cmp r8, #0 ldrsh r8, [r1] - adrne lr, ff_h264_idct_add_neon - adreq lr, ff_h264_idct_dc_add_neon + iteet ne + adrne lr, ff_h264_idct_add_neon + CONFIG_THUMB + adreq lr, ff_h264_idct_dc_add_neon + CONFIG_THUMB cmpeq r8, #0 blxne lr subs ip, ip, #1 @@ -159,12 +161,14 @@ add r1, r3, r12, lsl #5 cmp r8, #0 ldrsh r8, [r1] - adrne lr, ff_h264_idct_add_neon - adreq lr, ff_h264_idct_dc_add_neon + iteet ne + adrne lr, ff_h264_idct_add_neon + CONFIG_THUMB + adreq lr, ff_h264_idct_dc_add_neon + CONFIG_THUMB cmpeq r8, #0 blxne lr add r12, r12, #1 cmp r12, #4 + itt eq moveq r12, #16 moveq r4, r9 cmp r12, #20 @@ -365,10 +369,12 @@ blt 2f ldrsh lr, [r1] add r0, r0, r4 + it ne movne lr, #0 cmp lr, #0 - adrne lr, ff_h264_idct8_dc_add_neon - adreq lr, ff_h264_idct8_add_neon + ite ne + adrne lr, ff_h264_idct8_dc_add_neon + CONFIG_THUMB + adreq lr, ff_h264_idct8_add_neon + CONFIG_THUMB blx lr 2: subs r12, r12, #4 add r1, r1, #128 @@ -376,8 +382,8 @@ pop {r4-r8,pc} endfunc - .section .rodata -scan8: .byte 4+ 1*8, 5+ 1*8, 4+ 2*8, 5+ 2*8 +const scan8 + .byte 4+ 1*8, 5+ 1*8, 4+ 2*8, 5+ 2*8 .byte 6+ 1*8, 7+ 1*8, 6+ 2*8, 7+ 2*8 .byte 4+ 3*8, 5+ 3*8, 4+ 4*8, 5+ 4*8 .byte 6+ 3*8, 7+ 3*8, 6+ 4*8, 7+ 4*8 @@ -389,3 +395,4 @@ .byte 6+11*8, 7+11*8, 6+12*8, 7+12*8 .byte 4+13*8, 5+13*8, 4+14*8, 5+14*8 .byte 6+13*8, 7+13*8, 6+14*8, 7+14*8 +endconst diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264pred_init_arm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264pred_init_arm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264pred_init_arm.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264pred_init_arm.c 2012-01-11 00:34:30.000000000 +0000 @@ -42,7 +42,7 @@ void ff_pred8x8_l00_dc_neon(uint8_t *src, int stride); void ff_pred8x8_0l0_dc_neon(uint8_t *src, int stride); -static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int bit_depth) +static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc) { const int high_depth = bit_depth > 8; @@ -74,7 +74,7 @@ h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_neon; } -void ff_h264_pred_init_arm(H264PredContext *h, int codec_id, int bit_depth) +void ff_h264_pred_init_arm(H264PredContext *h, int codec_id, int bit_depth, const int chroma_format_idc) { - if (HAVE_NEON) ff_h264_pred_init_neon(h, codec_id, bit_depth); + if (HAVE_NEON) ff_h264_pred_init_neon(h, codec_id, bit_depth, chroma_format_idc); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264pred_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264pred_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/h264pred_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/h264pred_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -166,12 +166,9 @@ bx lr endfunc - .section .rodata - .align 4 -p16weight: +const p16weight, align=4 .short 1,2,3,4,5,6,7,8 - - .text +endconst function ff_pred8x8_hor_neon, export=1 sub r2, r0, #1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/int_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/int_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/int_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/int_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,6 @@ preserve8 .fpu neon - .text function ff_scalarproduct_int16_neon, export=1 vmov.i16 q0, #0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/Makefile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/Makefile 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/Makefile 2012-01-11 00:34:30.000000000 +0000 @@ -54,6 +54,7 @@ NEON-OBJS-$(CONFIG_H264DSP) += arm/h264dsp_neon.o \ arm/h264idct_neon.o \ + arm/h264cmc_neon.o \ NEON-OBJS-$(CONFIG_H264PRED) += arm/h264pred_neon.o \ @@ -62,6 +63,15 @@ NEON-OBJS-$(CONFIG_DCA_DECODER) += arm/dcadsp_neon.o \ arm/synth_filter_neon.o \ +NEON-OBJS-$(CONFIG_RV30_DECODER) += arm/rv34dsp_init_neon.o \ + arm/rv34dsp_neon.o \ + +NEON-OBJS-$(CONFIG_RV40_DECODER) += arm/rv34dsp_init_neon.o \ + arm/rv34dsp_neon.o \ + arm/rv40dsp_init_neon.o \ + arm/rv40dsp_neon.o \ + arm/h264cmc_neon.o \ + NEON-OBJS-$(CONFIG_VP3_DECODER) += arm/vp3dsp_neon.o NEON-OBJS-$(CONFIG_VP5_DECODER) += arm/vp56dsp_neon.o \ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mathops.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mathops.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mathops.h 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mathops.h 2012-01-11 00:34:30.000000000 +0000 @@ -64,11 +64,14 @@ __asm__ ( "mov %0, %2 \n\t" "cmp %1, %2 \n\t" + "itt gt \n\t" "movgt %0, %1 \n\t" "movgt %1, %2 \n\t" "cmp %1, %3 \n\t" + "it le \n\t" "movle %1, %3 \n\t" "cmp %0, %1 \n\t" + "it gt \n\t" "movgt %0, %1 \n\t" : "=&r"(m), "+r"(a) : "r"(b), "r"(c) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mdct_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mdct_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mdct_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mdct_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -23,8 +23,6 @@ preserve8 - .text - #define ff_fft_calc_neon X(ff_fft_calc_neon) function ff_imdct_half_neon, export=1 @@ -191,7 +189,9 @@ vadd.f32 d17, d17, d3 @ in2u+in1d -I 1: vmul.f32 d7, d0, d21 @ I*s - ldr r10, [r3, lr, lsr #1] +A ldr r10, [r3, lr, lsr #1] +T lsr r10, lr, #1 +T ldr r10, [r3, r10] vmul.f32 d6, d1, d20 @ -R*c ldr r6, [r3, #4]! vmul.f32 d4, d1, d21 @ -R*s diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mpegaudiodsp_fixed_armv6.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mpegaudiodsp_fixed_armv6.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mpegaudiodsp_fixed_armv6.S 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mpegaudiodsp_fixed_armv6.S 2012-01-11 00:34:30.000000000 +0000 @@ -75,7 +75,7 @@ sum8 r8, r9, r1, r0, r10, r11, r12, lr sum8 r8, r9, r1, r2, r10, r11, r12, lr, rsb, 32 round r10, r8, r9 - strh r10, [r3], r4 + strh_post r10, r3, r4 mov lr, #15 1: @@ -127,10 +127,10 @@ round r10, r8, r9 adds r8, r8, r4 adc r9, r9, r7 - strh r10, [r3], r12 + strh_post r10, r3, r12 round r11, r8, r9 subs lr, lr, #1 - strh r11, [r5], -r12 + strh_dpost r11, r5, r12 bgt 1b sum8 r8, r9, r1, r0, r10, r11, r12, lr, rsb, 33 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mpegvideo_armv5te_s.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mpegvideo_armv5te_s.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mpegvideo_armv5te_s.S 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mpegvideo_armv5te_s.S 2012-01-11 00:34:30.000000000 +0000 @@ -38,15 +38,21 @@ .macro dequant_t dst, src, mul, add, tmp rsbs \tmp, ip, \src, asr #16 + it gt addgt \tmp, \add, #0 + it lt rsblt \tmp, \add, #0 + it ne smlatbne \dst, \src, \mul, \tmp .endm .macro dequant_b dst, src, mul, add, tmp rsbs \tmp, ip, \src, lsl #16 + it gt addgt \tmp, \add, #0 + it lt rsblt \tmp, \add, #0 + it ne smlabbne \dst, \src, \mul, \tmp .endm @@ -80,21 +86,27 @@ strh lr, [r0], #2 subs r3, r3, #8 + it gt ldrdgt r4, [r0, #0] /* load data early to avoid load/use pipeline stall */ bgt 1b adds r3, r3, #2 + it le pople {r4-r9,pc} 2: ldrsh r9, [r0, #0] ldrsh lr, [r0, #2] mov r8, r2 cmp r9, #0 + it lt rsblt r8, r2, #0 + it ne smlabbne r9, r9, r1, r8 mov r8, r2 cmp lr, #0 + it lt rsblt r8, r2, #0 + it ne smlabbne lr, lr, r1, r8 strh r9, [r0], #2 strh lr, [r0], #2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mpegvideo_iwmmxt.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mpegvideo_iwmmxt.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mpegvideo_iwmmxt.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mpegvideo_iwmmxt.c 2012-01-11 00:34:30.000000000 +0000 @@ -93,29 +93,9 @@ block_orig[0] = level; } -#if 0 -static void dct_unquantize_h263_inter_iwmmxt(MpegEncContext *s, - DCTELEM *block, int n, int qscale) -{ - int nCoeffs; - - assert(s->block_last_index[n]>=0); - - if(s->ac_pred) - nCoeffs=63; - else - nCoeffs= s->inter_scantable.raster_end[ s->block_last_index[n] ]; - - ippiQuantInvInter_Compact_H263_16s_I(block, nCoeffs+1, qscale); -} -#endif - void MPV_common_init_iwmmxt(MpegEncContext *s) { if (!(mm_flags & AV_CPU_FLAG_IWMMXT)) return; s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_iwmmxt; -#if 0 - s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_iwmmxt; -#endif } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mpegvideo_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mpegvideo_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/mpegvideo_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/mpegvideo_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -57,6 +57,7 @@ subs r3, r3, #16 vst1.16 {q0}, [r1,:128]! vst1.16 {q8}, [r1,:128]! + it le bxle lr cmp r3, #8 bgt 1b @@ -78,6 +79,7 @@ ldr r6, [r0, #AC_PRED] add lr, r0, #INTER_SCANTAB_RASTER_END cmp r6, #0 + it ne movne r12, #63 bne 1f ldr r12, [r12, r2, lsl #2] @@ -86,9 +88,11 @@ ldrsh r4, [r1] cmp r5, #0 mov r5, r1 + it ne movne r2, #0 bne 2f cmp r2, #4 + it ge addge r0, r0, #4 sub r2, r3, #1 ldr r6, [r0, #Y_DC_SCALE] diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/neon.S 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2008 Mans Rullgard + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +.macro transpose_8x8 r0, r1, r2, r3, r4, r5, r6, r7 + vtrn.32 \r0, \r4 + vtrn.32 \r1, \r5 + vtrn.32 \r2, \r6 + vtrn.32 \r3, \r7 + vtrn.16 \r0, \r2 + vtrn.16 \r1, \r3 + vtrn.16 \r4, \r6 + vtrn.16 \r5, \r7 + vtrn.8 \r0, \r1 + vtrn.8 \r2, \r3 + vtrn.8 \r4, \r5 + vtrn.8 \r6, \r7 +.endm + +.macro transpose_4x4 r0, r1, r2, r3 + vtrn.16 \r0, \r2 + vtrn.16 \r1, \r3 + vtrn.8 \r0, \r1 + vtrn.8 \r2, \r3 +.endm + +.macro swap4 r0, r1, r2, r3, r4, r5, r6, r7 + vswp \r0, \r4 + vswp \r1, \r5 + vswp \r2, \r6 + vswp \r3, \r7 +.endm + +.macro transpose16_4x4 r0, r1, r2, r3, r4, r5, r6, r7 + vtrn.32 \r0, \r2 + vtrn.32 \r1, \r3 + vtrn.32 \r4, \r6 + vtrn.32 \r5, \r7 + vtrn.16 \r0, \r1 + vtrn.16 \r2, \r3 + vtrn.16 \r4, \r5 + vtrn.16 \r6, \r7 +.endm diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/rdft_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/rdft_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/rdft_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/rdft_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -137,6 +137,7 @@ vst1.32 {d22}, [r5,:64] cmp r6, #0 + it eq popeq {r4-r8,pc} vmul.f32 d22, d22, d18 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/rv34dsp_init_neon.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/rv34dsp_init_neon.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/rv34dsp_init_neon.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/rv34dsp_init_neon.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2011 Janne Grunau + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include "libavcodec/avcodec.h" +#include "libavcodec/rv34dsp.h" + +void ff_rv34_inv_transform_neon(DCTELEM *block); +void ff_rv34_inv_transform_noround_neon(DCTELEM *block); + +void ff_rv34dsp_init_neon(RV34DSPContext *c, DSPContext* dsp) +{ + c->rv34_inv_transform_tab[0] = ff_rv34_inv_transform_neon; + c->rv34_inv_transform_tab[1] = ff_rv34_inv_transform_noround_neon; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/rv34dsp_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/rv34dsp_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/rv34dsp_neon.S 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/rv34dsp_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2011 Janne Grunau + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "asm.S" + +.macro rv34_inv_transform + mov r1, #16 + vld1.16 {d28}, [r0,:64], r1 @ block[i+8*0] + vld1.16 {d29}, [r0,:64], r1 @ block[i+8*1] + vld1.16 {d30}, [r0,:64], r1 @ block[i+8*2] + vld1.16 {d31}, [r0,:64], r1 @ block[i+8*3] + vmov.s16 d0, #13 + vshll.s16 q12, d29, #3 + vshll.s16 q13, d29, #4 + vshll.s16 q9, d31, #3 + vshll.s16 q1, d31, #4 + vmull.s16 q10, d28, d0 + vmlal.s16 q10, d30, d0 + vmull.s16 q11, d28, d0 + vmlsl.s16 q11, d30, d0 + vsubw.s16 q12, q12, d29 @ z2 = block[i+8*1]*7 + vaddw.s16 q13, q13, d29 @ z3 = block[i+8*1]*17 + vsubw.s16 q9, q9, d31 + vaddw.s16 q1, q1, d31 + vadd.s32 q13, q13, q9 @ z3 = 17*block[i+8*1] + 7*block[i+8*3] + vsub.s32 q12, q12, q1 @ z2 = 7*block[i+8*1] - 17*block[i+8*3] + vadd.s32 q1, q10, q13 @ z0 + z3 + vadd.s32 q2, q11, q12 @ z1 + z2 + vsub.s32 q8, q10, q13 @ z0 - z3 + vsub.s32 q3, q11, q12 @ z1 - z2 + vtrn.32 q1, q2 + vtrn.32 q3, q8 + vswp d3, d6 + vswp d5, d16 + vmov.s32 d0, #13 + vadd.s32 q10, q1, q3 + vsub.s32 q11, q1, q3 + vshl.s32 q12, q2, #3 + vshl.s32 q9, q2, #4 + vmul.s32 q13, q11, d0[0] + vshl.s32 q11, q8, #4 + vadd.s32 q9, q9, q2 + vshl.s32 q15, q8, #3 + vsub.s32 q12, q12, q2 + vadd.s32 q11, q11, q8 + vmul.s32 q14, q10, d0[0] + vsub.s32 q8, q15, q8 + vsub.s32 q12, q12, q11 + vadd.s32 q9, q9, q8 + vadd.s32 q2, q13, q12 @ z1 + z2 + vadd.s32 q1, q14, q9 @ z0 + z3 + vsub.s32 q3, q13, q12 @ z1 - z2 + vsub.s32 q15, q14, q9 @ z0 - z3 +.endm + +/* void ff_rv34_inv_transform_neon(DCTELEM *block); */ +function ff_rv34_inv_transform_neon, export=1 + mov r2, r0 + rv34_inv_transform + vrshrn.s32 d1, q2, #10 @ (z1 + z2) >> 10 + vrshrn.s32 d0, q1, #10 @ (z0 + z3) >> 10 + vrshrn.s32 d2, q3, #10 @ (z1 - z2) >> 10 + vrshrn.s32 d3, q15, #10 @ (z0 - z3) >> 10 + vst4.16 {d0[0], d1[0], d2[0], d3[0]}, [r2,:64], r1 + vst4.16 {d0[1], d1[1], d2[1], d3[1]}, [r2,:64], r1 + vst4.16 {d0[2], d1[2], d2[2], d3[2]}, [r2,:64], r1 + vst4.16 {d0[3], d1[3], d2[3], d3[3]}, [r2,:64], r1 + bx lr +endfunc + +/* void rv34_inv_transform_noround_neon(DCTELEM *block); */ +function ff_rv34_inv_transform_noround_neon, export=1 + mov r2, r0 + rv34_inv_transform + vshl.s32 q11, q2, #1 + vshl.s32 q10, q1, #1 + vshl.s32 q12, q3, #1 + vshl.s32 q13, q15, #1 + vadd.s32 q11, q11, q2 + vadd.s32 q10, q10, q1 + vadd.s32 q12, q12, q3 + vadd.s32 q13, q13, q15 + vshrn.s32 d0, q10, #11 @ (z0 + z3)*3 >> 11 + vshrn.s32 d1, q11, #11 @ (z1 + z2)*3 >> 11 + vshrn.s32 d2, q12, #11 @ (z1 - z2)*3 >> 11 + vshrn.s32 d3, q13, #11 @ (z0 - z3)*3 >> 11 + vst4.16 {d0[0], d1[0], d2[0], d3[0]}, [r2,:64], r1 + vst4.16 {d0[1], d1[1], d2[1], d3[1]}, [r2,:64], r1 + vst4.16 {d0[2], d1[2], d2[2], d3[2]}, [r2,:64], r1 + vst4.16 {d0[3], d1[3], d2[3], d3[3]}, [r2,:64], r1 + bx lr +endfunc diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/rv40dsp_init_neon.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/rv40dsp_init_neon.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/rv40dsp_init_neon.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/rv40dsp_init_neon.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2011 Janne Grunau + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include "libavcodec/avcodec.h" +#include "libavcodec/rv34dsp.h" + +#define DECL_QPEL3(type, w, pos) \ + void ff_##type##_rv40_qpel##w##_mc##pos##_neon(uint8_t *dst, uint8_t *src,\ + int stride) +#define DECL_QPEL2(w, pos) \ + DECL_QPEL3(put, w, pos); \ + DECL_QPEL3(avg, w, pos) + +#define DECL_QPEL_XY(x, y) \ + DECL_QPEL2(16, x ## y); \ + DECL_QPEL2(8, x ## y) + +#define DECL_QPEL_Y(y) \ + DECL_QPEL_XY(0, y); \ + DECL_QPEL_XY(1, y); \ + DECL_QPEL_XY(2, y); \ + DECL_QPEL_XY(3, y); \ + +DECL_QPEL_Y(0); +DECL_QPEL_Y(1); +DECL_QPEL_Y(2); +DECL_QPEL_Y(3); + +void ff_put_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int); +void ff_put_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int); + +void ff_avg_rv40_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int); +void ff_avg_rv40_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int); + +void ff_rv40_weight_func_16_neon(uint8_t *, uint8_t *, uint8_t *, int, int, int); +void ff_rv40_weight_func_8_neon(uint8_t *, uint8_t *, uint8_t *, int, int, int); + +int ff_rv40_h_loop_filter_strength_neon(uint8_t *src, int stride, + int beta, int beta2, int edge, + int *p1, int *q1); +int ff_rv40_v_loop_filter_strength_neon(uint8_t *src, int stride, + int beta, int beta2, int edge, + int *p1, int *q1); + +void ff_rv40_h_weak_loop_filter_neon(uint8_t *src, int stride, int filter_p1, + int filter_q1, int alpha, int beta, + int lim_p0q0, int lim_q1, int lim_p1); +void ff_rv40_v_weak_loop_filter_neon(uint8_t *src, int stride, int filter_p1, + int filter_q1, int alpha, int beta, + int lim_p0q0, int lim_q1, int lim_p1); + +void ff_rv40dsp_init_neon(RV34DSPContext *c, DSPContext* dsp) +{ + c->put_pixels_tab[0][ 1] = ff_put_rv40_qpel16_mc10_neon; + c->put_pixels_tab[0][ 3] = ff_put_rv40_qpel16_mc30_neon; + c->put_pixels_tab[0][ 4] = ff_put_rv40_qpel16_mc01_neon; + c->put_pixels_tab[0][ 5] = ff_put_rv40_qpel16_mc11_neon; + c->put_pixels_tab[0][ 6] = ff_put_rv40_qpel16_mc21_neon; + c->put_pixels_tab[0][ 7] = ff_put_rv40_qpel16_mc31_neon; + c->put_pixels_tab[0][ 9] = ff_put_rv40_qpel16_mc12_neon; + c->put_pixels_tab[0][10] = ff_put_rv40_qpel16_mc22_neon; + c->put_pixels_tab[0][11] = ff_put_rv40_qpel16_mc32_neon; + c->put_pixels_tab[0][12] = ff_put_rv40_qpel16_mc03_neon; + c->put_pixels_tab[0][13] = ff_put_rv40_qpel16_mc13_neon; + c->put_pixels_tab[0][14] = ff_put_rv40_qpel16_mc23_neon; + c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_neon; + c->avg_pixels_tab[0][ 1] = ff_avg_rv40_qpel16_mc10_neon; + c->avg_pixels_tab[0][ 3] = ff_avg_rv40_qpel16_mc30_neon; + c->avg_pixels_tab[0][ 4] = ff_avg_rv40_qpel16_mc01_neon; + c->avg_pixels_tab[0][ 5] = ff_avg_rv40_qpel16_mc11_neon; + c->avg_pixels_tab[0][ 6] = ff_avg_rv40_qpel16_mc21_neon; + c->avg_pixels_tab[0][ 7] = ff_avg_rv40_qpel16_mc31_neon; + c->avg_pixels_tab[0][ 9] = ff_avg_rv40_qpel16_mc12_neon; + c->avg_pixels_tab[0][10] = ff_avg_rv40_qpel16_mc22_neon; + c->avg_pixels_tab[0][11] = ff_avg_rv40_qpel16_mc32_neon; + c->avg_pixels_tab[0][12] = ff_avg_rv40_qpel16_mc03_neon; + c->avg_pixels_tab[0][13] = ff_avg_rv40_qpel16_mc13_neon; + c->avg_pixels_tab[0][14] = ff_avg_rv40_qpel16_mc23_neon; + c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_neon; + c->put_pixels_tab[1][ 1] = ff_put_rv40_qpel8_mc10_neon; + c->put_pixels_tab[1][ 3] = ff_put_rv40_qpel8_mc30_neon; + c->put_pixels_tab[1][ 4] = ff_put_rv40_qpel8_mc01_neon; + c->put_pixels_tab[1][ 5] = ff_put_rv40_qpel8_mc11_neon; + c->put_pixels_tab[1][ 6] = ff_put_rv40_qpel8_mc21_neon; + c->put_pixels_tab[1][ 7] = ff_put_rv40_qpel8_mc31_neon; + c->put_pixels_tab[1][ 9] = ff_put_rv40_qpel8_mc12_neon; + c->put_pixels_tab[1][10] = ff_put_rv40_qpel8_mc22_neon; + c->put_pixels_tab[1][11] = ff_put_rv40_qpel8_mc32_neon; + c->put_pixels_tab[1][12] = ff_put_rv40_qpel8_mc03_neon; + c->put_pixels_tab[1][13] = ff_put_rv40_qpel8_mc13_neon; + c->put_pixels_tab[1][14] = ff_put_rv40_qpel8_mc23_neon; + c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_neon; + c->avg_pixels_tab[1][ 1] = ff_avg_rv40_qpel8_mc10_neon; + c->avg_pixels_tab[1][ 3] = ff_avg_rv40_qpel8_mc30_neon; + c->avg_pixels_tab[1][ 4] = ff_avg_rv40_qpel8_mc01_neon; + c->avg_pixels_tab[1][ 5] = ff_avg_rv40_qpel8_mc11_neon; + c->avg_pixels_tab[1][ 6] = ff_avg_rv40_qpel8_mc21_neon; + c->avg_pixels_tab[1][ 7] = ff_avg_rv40_qpel8_mc31_neon; + c->avg_pixels_tab[1][ 9] = ff_avg_rv40_qpel8_mc12_neon; + c->avg_pixels_tab[1][10] = ff_avg_rv40_qpel8_mc22_neon; + c->avg_pixels_tab[1][11] = ff_avg_rv40_qpel8_mc32_neon; + c->avg_pixels_tab[1][12] = ff_avg_rv40_qpel8_mc03_neon; + c->avg_pixels_tab[1][13] = ff_avg_rv40_qpel8_mc13_neon; + c->avg_pixels_tab[1][14] = ff_avg_rv40_qpel8_mc23_neon; + c->avg_pixels_tab[1][15] = ff_avg_rv40_qpel8_mc33_neon; + + c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_neon; + c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_neon; + c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_neon; + c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_neon; + + c->rv40_weight_pixels_tab[0] = ff_rv40_weight_func_16_neon; + c->rv40_weight_pixels_tab[1] = ff_rv40_weight_func_8_neon; + + c->rv40_loop_filter_strength[0] = ff_rv40_h_loop_filter_strength_neon; + c->rv40_loop_filter_strength[1] = ff_rv40_v_loop_filter_strength_neon; + c->rv40_weak_loop_filter[0] = ff_rv40_h_weak_loop_filter_neon; + c->rv40_weak_loop_filter[1] = ff_rv40_v_weak_loop_filter_neon; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/rv40dsp_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/rv40dsp_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/rv40dsp_neon.S 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/rv40dsp_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,920 @@ +/* + * Copyright (c) 2011 Janne Grunau + * Copyright (c) 2011 Mans Rullgard + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "asm.S" +#include "neon.S" + +.macro qpel_lowpass r0, r1, rc1, rc2, shift + vext.8 d25, \r0, \r1, #1 @ src[-1] + vext.8 d26, \r0, \r1, #4 @ src[ 2] + vext.8 d24, \r0, \r1, #5 @ src[ 3] + vaddl.u8 q9, d25, d26 + vaddl.u8 q8, \r0, d24 + vext.8 d27, \r0, \r1, #2 @ src[ 0] + vshl.s16 q12, q9, #2 + vsub.s16 q8, q8, q9 + vext.8 d28, \r0, \r1, #3 @ src[ 1] + vsub.s16 q8, q8, q12 + vmlal.u8 q8, d27, \rc1 + vmlal.u8 q8, d28, \rc2 + vqrshrun.s16 \r0, q8, #\shift +.endm + +.macro qpel_lowpass_x2 r0, r1, r2, r3, rc1, rc2, shift + vext.8 d25, \r0, \r1, #1 @ src[-1] + vext.8 d26, \r0, \r1, #4 @ src[ 2] + vext.8 d24, \r0, \r1, #5 @ src[ 3] + vaddl.u8 q9, d25, d26 + vaddl.u8 q8, \r0, d24 + vext.8 d29, \r0, \r1, #2 @ src[ 0] + vext.8 d28, \r0, \r1, #3 @ src[ 1] + vshl.s16 q10, q9, #2 + vext.8 \r1, \r2, \r3, #1 @ src[-1] + vsub.s16 q8, q8, q9 + vext.8 d22, \r2, \r3, #4 @ src[ 2] + vext.8 \r0, \r2, \r3, #5 @ src[ 3] + vaddl.u8 q13, \r1, d22 + vaddl.u8 q12, \r2, \r0 + vsub.s16 q8, q8, q10 + vshl.s16 q9, q13, #2 + vsub.s16 q12, q12, q13 + vmlal.u8 q8, d29, \rc1 + vmlal.u8 q8, d28, \rc2 + vsub.s16 q12, q12, q9 + vext.8 d26, \r2, \r3, #2 @ src[ 0] + vext.8 d27, \r2, \r3, #3 @ src[ 1] + vmlal.u8 q12, d26, \rc1 + vmlal.u8 q12, d27, \rc2 + vqrshrun.s16 \r0, q8, #\shift + vqrshrun.s16 \r2, q12, #\shift +.endm + +.macro rv40_qpel8_h shift +function put_rv40_qpel8_h_lp_packed_s\shift\()_neon +1: + vld1.8 {q2}, [r1], r2 + vld1.8 {q3}, [r1], r2 + qpel_lowpass_x2 d4, d5, d6, d7, d0, d1, \shift + vst1.8 {d4}, [r12,:64]! + vst1.8 {d6}, [r12,:64]! + subs r3, r3, #2 + bgt 1b + vld1.8 {q2}, [r1] + qpel_lowpass d4, d5, d0, d1, \shift + vst1.8 {d4}, [r12,:64]! + bx lr +endfunc +.endm + +.macro rv40_qpel8_v shift, type +function \type\()_rv40_qpel8_v_lp_packed_s\shift\()_neon + vld1.64 {d2}, [r1,:64]! + vld1.64 {d3}, [r1,:64]! + vld1.64 {d4}, [r1,:64]! + vld1.64 {d5}, [r1,:64]! + vld1.64 {d6}, [r1,:64]! + vld1.64 {d7}, [r1,:64]! + vld1.64 {d8}, [r1,:64]! + vld1.64 {d9}, [r1,:64]! + vld1.64 {d10}, [r1,:64]! + vld1.64 {d11}, [r1,:64]! + vld1.64 {d12}, [r1,:64]! + vld1.64 {d13}, [r1,:64]! + vld1.64 {d14}, [r1,:64]! + transpose_8x8 d2, d3, d4, d5, d6, d7, d8, d9 + transpose_8x8 d10, d11, d12, d13, d14, d15, d30, d31 + qpel_lowpass_x2 d2, d10, d3, d11, d0, d1, \shift + qpel_lowpass_x2 d4, d12, d5, d13, d0, d1, \shift + qpel_lowpass_x2 d6, d14, d7, d15, d0, d1, \shift + qpel_lowpass_x2 d8, d30, d9, d31, d0, d1, \shift + transpose_8x8 d2, d3, d4, d5, d6, d7, d8, d9 + .ifc \type,avg + vld1.64 d12, [r0,:64], r2 + vld1.64 d13, [r0,:64], r2 + vld1.64 d14, [r0,:64], r2 + vld1.64 d15, [r0,:64], r2 + vld1.64 d16, [r0,:64], r2 + vld1.64 d17, [r0,:64], r2 + vld1.64 d18, [r0,:64], r2 + vld1.64 d19, [r0,:64], r2 + sub r0, r0, r2, lsl #3 + vrhadd.u8 q1, q1, q6 + vrhadd.u8 q2, q2, q7 + vrhadd.u8 q3, q3, q8 + vrhadd.u8 q4, q4, q9 + .endif + vst1.64 d2, [r0,:64], r2 + vst1.64 d3, [r0,:64], r2 + vst1.64 d4, [r0,:64], r2 + vst1.64 d5, [r0,:64], r2 + vst1.64 d6, [r0,:64], r2 + vst1.64 d7, [r0,:64], r2 + vst1.64 d8, [r0,:64], r2 + vst1.64 d9, [r0,:64], r2 + bx lr +endfunc +.endm + + rv40_qpel8_h 5 + rv40_qpel8_h 6 + +.macro rv40_qpel type +function \type\()_rv40_qpel8_h_lowpass_neon + .ifc \type,avg + mov r12, r0 + .endif +1: + vld1.8 {q2}, [r1], r2 + vld1.8 {q3}, [r1], r2 + qpel_lowpass_x2 d4, d5, d6, d7, d0, d1, 6 + .ifc \type,avg + vld1.8 {d3}, [r12,:64], r2 + vld1.8 {d16}, [r12,:64], r2 + vrhadd.u8 d4, d4, d3 + vrhadd.u8 d6, d6, d16 + .endif + vst1.8 {d4}, [r0,:64], r2 + vst1.8 {d6}, [r0,:64], r2 + subs r3, r3, #2 + bgt 1b + bx lr +endfunc + +function \type\()_rv40_qpel8_v_lowpass_neon + vld1.64 {d2}, [r1], r2 + vld1.64 {d3}, [r1], r2 + vld1.64 {d4}, [r1], r2 + vld1.64 {d5}, [r1], r2 + vld1.64 {d6}, [r1], r2 + vld1.64 {d7}, [r1], r2 + vld1.64 {d8}, [r1], r2 + vld1.64 {d9}, [r1], r2 + vld1.64 {d10}, [r1], r2 + vld1.64 {d11}, [r1], r2 + vld1.64 {d12}, [r1], r2 + vld1.64 {d13}, [r1], r2 + vld1.64 {d14}, [r1] + transpose_8x8 d2, d3, d4, d5, d6, d7, d8, d9 + transpose_8x8 d10, d11, d12, d13, d14, d15, d30, d31 + qpel_lowpass_x2 d2, d10, d3, d11, d0, d1, 6 + qpel_lowpass_x2 d4, d12, d5, d13, d0, d1, 6 + qpel_lowpass_x2 d6, d14, d7, d15, d0, d1, 6 + qpel_lowpass_x2 d8, d30, d9, d31, d0, d1, 6 + transpose_8x8 d2, d3, d4, d5, d6, d7, d8, d9 + .ifc \type,avg + vld1.64 d12, [r0,:64], r2 + vld1.64 d13, [r0,:64], r2 + vld1.64 d14, [r0,:64], r2 + vld1.64 d15, [r0,:64], r2 + vld1.64 d16, [r0,:64], r2 + vld1.64 d17, [r0,:64], r2 + vld1.64 d18, [r0,:64], r2 + vld1.64 d19, [r0,:64], r2 + sub r0, r0, r2, lsl #3 + vrhadd.u8 q1, q1, q6 + vrhadd.u8 q2, q2, q7 + vrhadd.u8 q3, q3, q8 + vrhadd.u8 q4, q4, q9 + .endif + vst1.64 d2, [r0,:64], r2 + vst1.64 d3, [r0,:64], r2 + vst1.64 d4, [r0,:64], r2 + vst1.64 d5, [r0,:64], r2 + vst1.64 d6, [r0,:64], r2 + vst1.64 d7, [r0,:64], r2 + vst1.64 d8, [r0,:64], r2 + vst1.64 d9, [r0,:64], r2 + bx lr +endfunc + + rv40_qpel8_v 5, \type + rv40_qpel8_v 6, \type + +function ff_\type\()_rv40_qpel8_mc10_neon, export=1 + sub r1, r1, #2 + mov r3, #8 + vmov.i8 d0, #52 + vmov.i8 d1, #20 + b \type\()_rv40_qpel8_h_lowpass_neon +endfunc + +function ff_\type\()_rv40_qpel8_mc30_neon, export=1 + sub r1, r1, #2 + mov r3, #8 + vmov.i8 d0, #20 + vmov.i8 d1, #52 + b \type\()_rv40_qpel8_h_lowpass_neon +endfunc + +function ff_\type\()_rv40_qpel8_mc01_neon, export=1 + push {r4, lr} + vpush {d8-d15} + sub r1, r1, r2, lsl #1 + vmov.i8 d0, #52 + vmov.i8 d1, #20 + bl \type\()_rv40_qpel8_v_lowpass_neon + vpop {d8-d15} + pop {r4, pc} +endfunc + +function ff_\type\()_rv40_qpel8_mc11_neon, export=1 + push {r4, lr} + vpush {d8-d15} + sub sp, sp, #14*8 + add r12, sp, #7 + bic r12, r12, #7 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + mov r3, #12 + vmov.i8 d0, #52 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s6_neon + add r1, sp, #7 + bic r1, r1, #7 + bl \type\()_rv40_qpel8_v_lp_packed_s6_neon + add sp, sp, #14*8 + vpop {d8-d15} + pop {r4, pc} +endfunc + +function ff_\type\()_rv40_qpel8_mc21_neon, export=1 + push {r4, lr} + vpush {d8-d15} + sub sp, sp, #14*8 + add r12, sp, #7 + bic r12, r12, #7 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + mov r3, #12 + vmov.i8 d0, #20 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s5_neon + add r1, sp, #7 + bic r1, r1, #7 + vmov.i8 d0, #52 + bl \type\()_rv40_qpel8_v_lp_packed_s6_neon + add sp, sp, #14*8 + vpop {d8-d15} + pop {r4, pc} +endfunc + +function ff_\type\()_rv40_qpel8_mc31_neon, export=1 + push {r4, lr} + vpush {d8-d15} + sub sp, sp, #14*8 + add r12, sp, #7 + bic r12, r12, #7 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + mov r3, #12 + vmov.i8 d0, #20 + vmov.i8 d1, #52 + bl put_rv40_qpel8_h_lp_packed_s6_neon + add r1, sp, #7 + bic r1, r1, #7 + vswp d0, d1 + bl \type\()_rv40_qpel8_v_lp_packed_s6_neon + add sp, sp, #14*8 + vpop {d8-d15} + pop {r4, pc} +endfunc + +function ff_\type\()_rv40_qpel8_mc12_neon, export=1 + push {r4, lr} + vpush {d8-d15} + sub sp, sp, #14*8 + add r12, sp, #7 + bic r12, r12, #7 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + mov r3, #12 + vmov.i8 d0, #52 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s6_neon + add r1, sp, #7 + bic r1, r1, #7 + vmov.i8 d0, #20 + bl \type\()_rv40_qpel8_v_lp_packed_s5_neon + add sp, sp, #14*8 + vpop {d8-d15} + pop {r4, pc} +endfunc + +function ff_\type\()_rv40_qpel8_mc22_neon, export=1 + push {r4, lr} + vpush {d8-d15} + sub sp, sp, #14*8 + add r12, sp, #7 + bic r12, r12, #7 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + mov r3, #12 + vmov.i8 d0, #20 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s5_neon + add r1, sp, #7 + bic r1, r1, #7 + bl \type\()_rv40_qpel8_v_lp_packed_s5_neon + add sp, sp, #14*8 + vpop {d8-d15} + pop {r4, pc} +endfunc + +function ff_\type\()_rv40_qpel8_mc32_neon, export=1 + push {r4, lr} + vpush {d8-d15} + sub sp, sp, #14*8 + add r12, sp, #7 + bic r12, r12, #7 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + mov r3, #12 + vmov.i8 d0, #20 + vmov.i8 d1, #52 + bl put_rv40_qpel8_h_lp_packed_s6_neon + add r1, sp, #7 + bic r1, r1, #7 + vmov.i8 d1, #20 + bl \type\()_rv40_qpel8_v_lp_packed_s5_neon + add sp, sp, #14*8 + vpop {d8-d15} + pop {r4, pc} +endfunc + +function ff_\type\()_rv40_qpel8_mc03_neon, export=1 + push {r4, lr} + vpush {d8-d15} + sub r1, r1, r2, lsl #1 + vmov.i8 d0, #20 + vmov.i8 d1, #52 + bl \type\()_rv40_qpel8_v_lowpass_neon + vpop {d8-d15} + pop {r4, pc} +endfunc + +function ff_\type\()_rv40_qpel8_mc33_neon, export=1 + mov r3, #8 + b X(ff_\type\()_pixels8_xy2_neon) +endfunc + +function ff_\type\()_rv40_qpel8_mc13_neon, export=1 + push {r4, lr} + vpush {d8-d15} + sub sp, sp, #14*8 + add r12, sp, #7 + bic r12, r12, #7 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + mov r3, #12 + vmov.i8 d0, #52 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s6_neon + add r1, sp, #7 + bic r1, r1, #7 + vswp d0, d1 + bl \type\()_rv40_qpel8_v_lp_packed_s6_neon + add sp, sp, #14*8 + vpop {d8-d15} + pop {r4, pc} +endfunc + +function ff_\type\()_rv40_qpel8_mc23_neon, export=1 + push {r4, lr} + vpush {d8-d15} + sub sp, sp, #14*8 + add r12, sp, #7 + bic r12, r12, #7 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + mov r3, #12 + vmov.i8 d0, #20 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s5_neon + add r1, sp, #7 + bic r1, r1, #7 + vmov.i8 d1, #52 + bl \type\()_rv40_qpel8_v_lp_packed_s6_neon + add sp, sp, #14*8 + vpop {d8-d15} + pop {r4, pc} +endfunc + +function ff_\type\()_rv40_qpel16_mc10_neon, export=1 + vmov.i8 d0, #52 + vmov.i8 d1, #20 +.L\type\()_rv40_qpel16_h: + push {r1, lr} + sub r1, r1, #2 + mov r3, #16 + bl \type\()_rv40_qpel8_h_lowpass_neon + pop {r1, lr} + sub r0, r0, r2, lsl #4 + add r0, r0, #8 + add r1, r1, #6 + mov r3, #16 + b \type\()_rv40_qpel8_h_lowpass_neon +endfunc + +function ff_\type\()_rv40_qpel16_mc30_neon, export=1 + vmov.i8 d0, #20 + vmov.i8 d1, #52 + b .L\type\()_rv40_qpel16_h +endfunc + +function ff_\type\()_rv40_qpel16_mc01_neon, export=1 + vmov.i8 d0, #52 + vmov.i8 d1, #20 +.L\type\()_rv40_qpel16_v: + sub r1, r1, r2, lsl #1 + push {r1, lr} + vpush {d8-d15} + bl \type\()_rv40_qpel8_v_lowpass_neon + sub r1, r1, r2, lsl #2 + bl \type\()_rv40_qpel8_v_lowpass_neon + ldr r1, [sp, #64] + sub r0, r0, r2, lsl #4 + add r0, r0, #8 + add r1, r1, #8 + bl \type\()_rv40_qpel8_v_lowpass_neon + sub r1, r1, r2, lsl #2 + bl \type\()_rv40_qpel8_v_lowpass_neon + vpop {d8-d15} + pop {r1, pc} +endfunc + +function ff_\type\()_rv40_qpel16_mc11_neon, export=1 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + push {r1, lr} + vpush {d8-d15} + sub sp, sp, #44*8 + add r12, sp, #7 + bic r12, r12, #7 + mov r3, #20 + vmov.i8 d0, #52 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s6_neon + ldr r1, [sp, #416] + add r1, r1, #8 + mov r3, #20 + bl put_rv40_qpel8_h_lp_packed_s6_neon +.L\type\()_rv40_qpel16_v_s6: + add r1, sp, #7 + bic r1, r1, #7 + bl \type\()_rv40_qpel8_v_lp_packed_s6_neon + sub r1, r1, #40 + bl \type\()_rv40_qpel8_v_lp_packed_s6_neon + sub r0, r0, r2, lsl #4 + add r0, r0, #8 + bl \type\()_rv40_qpel8_v_lp_packed_s6_neon + sub r1, r1, #40 + bl \type\()_rv40_qpel8_v_lp_packed_s6_neon + add sp, sp, #44*8 + vpop {d8-d15} + pop {r1, pc} +endfunc + +function ff_\type\()_rv40_qpel16_mc21_neon, export=1 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + push {r1, lr} + vpush {d8-d15} + sub sp, sp, #44*8 + add r12, sp, #7 + bic r12, r12, #7 + mov r3, #20 + vmov.i8 d0, #20 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s5_neon + ldr r1, [sp, #416] + add r1, r1, #8 + mov r3, #20 + bl put_rv40_qpel8_h_lp_packed_s5_neon + vmov.i8 d0, #52 + b .L\type\()_rv40_qpel16_v_s6 +endfunc + +function ff_\type\()_rv40_qpel16_mc31_neon, export=1 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + push {r1, lr} + vpush {d8-d15} + sub sp, sp, #44*8 + add r12, sp, #7 + bic r12, r12, #7 + mov r3, #20 + vmov.i8 d0, #20 + vmov.i8 d1, #52 + bl put_rv40_qpel8_h_lp_packed_s6_neon + ldr r1, [sp, #416] + add r1, r1, #8 + mov r3, #20 + bl put_rv40_qpel8_h_lp_packed_s6_neon + vswp d0, d1 + b .L\type\()_rv40_qpel16_v_s6 +endfunc + +function ff_\type\()_rv40_qpel16_mc12_neon, export=1 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + push {r1, lr} + vpush {d8-d15} + sub sp, sp, #44*8 + add r12, sp, #7 + bic r12, r12, #7 + mov r3, #20 + vmov.i8 d0, #52 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s6_neon + ldr r1, [sp, #416] + add r1, r1, #8 + mov r3, #20 + bl put_rv40_qpel8_h_lp_packed_s6_neon + vmov.i8 d0, #20 +.L\type\()_rv40_qpel16_v_s5: + add r1, sp, #7 + bic r1, r1, #7 + bl \type\()_rv40_qpel8_v_lp_packed_s5_neon + sub r1, r1, #40 + bl \type\()_rv40_qpel8_v_lp_packed_s5_neon + sub r0, r0, r2, lsl #4 + add r0, r0, #8 + bl \type\()_rv40_qpel8_v_lp_packed_s5_neon + sub r1, r1, #40 + bl \type\()_rv40_qpel8_v_lp_packed_s5_neon + add sp, sp, #44*8 + vpop {d8-d15} + pop {r1, pc} +endfunc + +function ff_\type\()_rv40_qpel16_mc22_neon, export=1 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + push {r1, lr} + vpush {d8-d15} + sub sp, sp, #44*8 + add r12, sp, #7 + bic r12, r12, #7 + mov r3, #20 + vmov.i8 d0, #20 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s5_neon + ldr r1, [sp, #416] + add r1, r1, #8 + mov r3, #20 + bl put_rv40_qpel8_h_lp_packed_s5_neon + b .L\type\()_rv40_qpel16_v_s5 +endfunc + +function ff_\type\()_rv40_qpel16_mc32_neon, export=1 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + push {r1, lr} + vpush {d8-d15} + sub sp, sp, #44*8 + add r12, sp, #7 + bic r12, r12, #7 + mov r3, #20 + vmov.i8 d0, #20 + vmov.i8 d1, #52 + bl put_rv40_qpel8_h_lp_packed_s6_neon + ldr r1, [sp, #416] + add r1, r1, #8 + mov r3, #20 + bl put_rv40_qpel8_h_lp_packed_s6_neon + vmov.i8 d1, #20 + b .L\type\()_rv40_qpel16_v_s5 +endfunc + +function ff_\type\()_rv40_qpel16_mc03_neon, export=1 + vmov.i8 d0, #20 + vmov.i8 d1, #52 + b .L\type\()_rv40_qpel16_v +endfunc + +function ff_\type\()_rv40_qpel16_mc13_neon, export=1 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + push {r1, lr} + vpush {d8-d15} + sub sp, sp, #44*8 + add r12, sp, #7 + bic r12, r12, #7 + mov r3, #20 + vmov.i8 d0, #52 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s6_neon + ldr r1, [sp, #416] + add r1, r1, #8 + mov r3, #20 + bl put_rv40_qpel8_h_lp_packed_s6_neon + vswp d0, d1 + b .L\type\()_rv40_qpel16_v_s6 +endfunc + +function ff_\type\()_rv40_qpel16_mc23_neon, export=1 + sub r1, r1, r2, lsl #1 + sub r1, r1, #2 + push {r1, lr} + vpush {d8-d15} + sub sp, sp, #44*8 + add r12, sp, #7 + bic r12, r12, #7 + mov r3, #20 + vmov.i8 d0, #20 + vmov.i8 d1, #20 + bl put_rv40_qpel8_h_lp_packed_s5_neon + ldr r1, [sp, #416] + add r1, r1, #8 + mov r3, #20 + bl put_rv40_qpel8_h_lp_packed_s5_neon + vmov.i8 d1, #52 + b .L\type\()_rv40_qpel16_v_s6 +endfunc + +function ff_\type\()_rv40_qpel16_mc33_neon, export=1 + mov r3, #16 + b X(ff_\type\()_pixels16_xy2_neon) +endfunc +.endm + + rv40_qpel put + rv40_qpel avg + +.macro rv40_weight + vmovl.u8 q8, d2 + vmovl.u8 q9, d3 + vmovl.u8 q10, d4 + vmovl.u8 q11, d5 + vmull.u16 q2, d16, d0[2] + vmull.u16 q3, d17, d0[2] + vmull.u16 q8, d18, d0[2] + vmull.u16 q9, d19, d0[2] + vmull.u16 q12, d20, d0[0] + vmull.u16 q13, d21, d0[0] + vmull.u16 q14, d22, d0[0] + vmull.u16 q15, d23, d0[0] + vshrn.i32 d4, q2, #9 + vshrn.i32 d5, q3, #9 + vshrn.i32 d6, q8, #9 + vshrn.i32 d7, q9, #9 + vshrn.i32 d16, q12, #9 + vshrn.i32 d17, q13, #9 + vshrn.i32 d18, q14, #9 + vshrn.i32 d19, q15, #9 + vadd.u16 q2, q2, q8 + vadd.u16 q3, q3, q9 + vrshrn.i16 d2, q2, #5 + vrshrn.i16 d3, q3, #5 +.endm + +/* void ff_rv40_weight_func_16_neon(uint8_t *dst, uint8_t *src1, uint8_t *src2, + int w1, int w2, int stride) */ +function ff_rv40_weight_func_16_neon, export=1 + ldr r12, [sp] + vmov d0, r3, r12 + ldr r12, [sp, #4] + mov r3, #16 +1: + vld1.8 {q1}, [r1,:128], r12 + vld1.8 {q2}, [r2,:128], r12 + rv40_weight + vst1.8 {q1}, [r0,:128], r12 + subs r3, r3, #1 + bne 1b + bx lr +endfunc + +/* void ff_rv40_weight_func_8_neon(uint8_t *dst, uint8_t *src1, uint8_t *src2, + int w1, int w2, int stride) */ +function ff_rv40_weight_func_8_neon, export=1 + ldr r12, [sp] + vmov d0, r3, r12 + ldr r12, [sp, #4] + mov r3, #8 +1: + vld1.8 {d2}, [r1,:64], r12 + vld1.8 {d3}, [r1,:64], r12 + vld1.8 {d4}, [r2,:64], r12 + vld1.8 {d5}, [r2,:64], r12 + rv40_weight + vst1.8 {d2}, [r0,:64], r12 + vst1.8 {d3}, [r0,:64], r12 + subs r3, r3, #2 + bne 1b + bx lr +endfunc + +function ff_rv40_h_loop_filter_strength_neon, export=1 + pkhbt r2, r3, r2, lsl #18 + + ldr r3, [r0] + ldr_dpre r12, r0, r1 + teq r3, r12 + beq 1f + + sub r0, r0, r1, lsl #1 + + vld1.32 {d4[]}, [r0,:32], r1 @ -3 + vld1.32 {d0[]}, [r0,:32], r1 @ -2 + vld1.32 {d4[1]}, [r0,:32], r1 @ -1 + vld1.32 {d5[]}, [r0,:32], r1 @ 0 + vld1.32 {d1[]}, [r0,:32], r1 @ 1 + vld1.32 {d5[0]}, [r0,:32], r1 @ 2 + + vpaddl.u8 q8, q0 @ -2, -2, -2, -2, 1, 1, 1, 1 + vpaddl.u8 q9, q2 @ -3, -3, -1, -1, 2, 2, 0, 0 + vdup.32 d30, r2 @ beta2, beta << 2 + vpadd.u16 d16, d16, d17 @ -2, -2, 1, 1 + vpadd.u16 d18, d18, d19 @ -3, -1, 2, 0 + vabd.u16 d16, d18, d16 + vclt.u16 d16, d16, d30 + + ldrd r2, r3, [sp, #4] + vmovl.u16 q12, d16 + vtrn.16 d16, d17 + vshr.u32 q12, q12, #15 + ldr r0, [sp] + vst1.32 {d24[1]}, [r2,:32] + vst1.32 {d25[1]}, [r3,:32] + + cmp r0, #0 + it eq + bxeq lr + + vand d18, d16, d17 + vtrn.32 d18, d19 + vand d18, d18, d19 + vmov.u16 r0, d18[0] + bx lr +1: + ldrd r2, r3, [sp, #4] + mov r0, #0 + str r0, [r2] + str r0, [r3] + bx lr +endfunc + +function ff_rv40_v_loop_filter_strength_neon, export=1 + sub r0, r0, #3 + pkhbt r2, r3, r2, lsl #18 + + vld1.8 {d0}, [r0], r1 + vld1.8 {d1}, [r0], r1 + vld1.8 {d2}, [r0], r1 + vld1.8 {d3}, [r0], r1 + + vaddl.u8 q0, d0, d1 + vaddl.u8 q1, d2, d3 + vdup.32 q15, r2 + vadd.u16 q0, q0, q1 @ -3, -2, -1, 0, 1, 2 + vext.16 q1, q0, q0, #1 @ -2, -1, 0, 1, 2 + vabd.u16 q0, q1, q0 + vclt.u16 q0, q0, q15 + + ldrd r2, r3, [sp, #4] + vmovl.u16 q1, d0 + vext.16 d1, d0, d1, #3 + vshr.u32 q1, q1, #15 + ldr r0, [sp] + vst1.32 {d2[1]}, [r2,:32] + vst1.32 {d3[1]}, [r3,:32] + + cmp r0, #0 + it eq + bxeq lr + + vand d0, d0, d1 + vtrn.16 d0, d1 + vand d0, d0, d1 + vmov.u16 r0, d0[0] + bx lr +endfunc + +.macro rv40_weak_loop_filter + vdup.16 d30, r2 @ filter_p1 + vdup.16 d31, r3 @ filter_q1 + ldrd r2, r3, [sp] + vdup.16 d28, r2 @ alpha + vdup.16 d29, r3 @ beta + ldr r12, [sp, #8] + vdup.16 d25, r12 @ lim_p0q0 + ldrd r2, r3, [sp, #12] + vsubl.u8 q9, d5, d4 @ x, t + vabdl.u8 q8, d5, d4 @ x, abs(t) + vneg.s16 q15, q15 + vceq.i16 d16, d19, #0 @ !t + vshl.s16 d19, d19, #2 @ t << 2 + vmul.u16 d18, d17, d28 @ alpha * abs(t) + vand d24, d30, d31 @ filter_p1 & filter_q1 + vsubl.u8 q1, d0, d4 @ p1p2, p1p0 + vsubl.u8 q3, d1, d5 @ q1q2, q1q0 + vmov.i16 d22, #3 + vshr.u16 d18, d18, #7 + vadd.i16 d22, d22, d24 @ 3 - (filter_p1 & filter_q1) + vsubl.u8 q10, d0, d1 @ src[-2] - src[1] + vcle.u16 d18, d18, d22 + vand d20, d20, d24 + vneg.s16 d23, d25 @ -lim_p0q0 + vadd.s16 d19, d19, d20 + vbic d16, d18, d16 @ t && u <= 3 - (fp1 & fq1) + vtrn.32 d4, d5 @ -3, 2, -1, 0 + vrshr.s16 d19, d19, #3 + vmov d28, d29 @ beta + vswp d3, d6 @ q1q2, p1p0 + vmin.s16 d19, d19, d25 + vand d30, d30, d16 + vand d31, d31, d16 + vadd.s16 q10, q1, q3 @ p1p2 + p1p0, q1q2 + q1q0 + vmax.s16 d19, d19, d23 @ diff + vabs.s16 q1, q1 @ abs(p1p2), abs(q1q2) + vand d18, d19, d16 @ diff + vcle.u16 q1, q1, q14 + vneg.s16 d19, d18 @ -diff + vdup.16 d26, r3 @ lim_p1 + vaddw.u8 q2, q9, d5 @ src[-1]+diff, src[0]-diff + vhsub.s16 q11, q10, q9 + vand q1, q1, q15 + vqmovun.s16 d4, q2 @ -1, 0 + vand q9, q11, q1 + vdup.16 d27, r2 @ lim_q1 + vneg.s16 q9, q9 + vneg.s16 q14, q13 + vmin.s16 q9, q9, q13 + vtrn.32 d0, d1 @ -2, 1, -2, 1 + vmax.s16 q9, q9, q14 + vaddw.u8 q3, q9, d0 + vqmovun.s16 d5, q3 @ -2, 1 +.endm + +function ff_rv40_h_weak_loop_filter_neon, export=1 + sub r0, r0, r1, lsl #1 + sub r0, r0, r1 + + vld1.32 {d4[]}, [r0,:32], r1 + vld1.32 {d0[]}, [r0,:32], r1 + vld1.32 {d4[1]}, [r0,:32], r1 + vld1.32 {d5[]}, [r0,:32], r1 + vld1.32 {d1[]}, [r0,:32], r1 + vld1.32 {d5[0]}, [r0,:32] + + sub r0, r0, r1, lsl #2 + + rv40_weak_loop_filter + + vst1.32 {d5[0]}, [r0,:32], r1 + vst1.32 {d4[0]}, [r0,:32], r1 + vst1.32 {d4[1]}, [r0,:32], r1 + vst1.32 {d5[1]}, [r0,:32], r1 + + bx lr +endfunc + +function ff_rv40_v_weak_loop_filter_neon, export=1 + sub r12, r0, #3 + sub r0, r0, #2 + + vld1.8 {d4}, [r12], r1 + vld1.8 {d5}, [r12], r1 + vld1.8 {d2}, [r12], r1 + vld1.8 {d3}, [r12], r1 + + vtrn.16 q2, q1 + vtrn.8 d4, d5 + vtrn.8 d2, d3 + + vrev64.32 d5, d5 + vtrn.32 q2, q1 + vdup.32 d0, d3[0] + vdup.32 d1, d2[0] + + rv40_weak_loop_filter + + vtrn.32 q2, q3 + vswp d4, d5 + + vst4.8 {d4[0],d5[0],d6[0],d7[0]}, [r0], r1 + vst4.8 {d4[1],d5[1],d6[1],d7[1]}, [r0], r1 + vst4.8 {d4[2],d5[2],d6[2],d7[2]}, [r0], r1 + vst4.8 {d4[3],d5[3],d6[3],d7[3]}, [r0], r1 + + bx lr +endfunc diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/simple_idct_arm.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/simple_idct_arm.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/simple_idct_arm.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/simple_idct_arm.S 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,4 @@ /* - * simple_idct_arm.S * Copyright (C) 2002 Frederic 'dilb' Boulay * * Author: Frederic Boulay @@ -54,8 +53,6 @@ #define COL_SHIFTED_1 524288 /* 1<< (COL_SHIFT-1) */ - .text - function ff_simple_idct_arm, export=1 @@ void simple_idct_arm(int16_t *block) @@ save stack for reg needed (take all of them), @@ -121,11 +118,13 @@ ldr r11, [r12, #offW7] @ R11=W7 mul r5, r10, r7 @ R5=W5*ROWr16[1]=b2 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle) mul r7, r11, r7 @ R7=W7*ROWr16[1]=b3 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle) - teq r2, #0 @ if null avoid muls - mlane r0, r9, r2, r0 @ R0+=W3*ROWr16[3]=b0 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) + teq r2, #0 @ if null avoid muls + itttt ne + mlane r0, r9, r2, r0 @ R0+=W3*ROWr16[3]=b0 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) rsbne r2, r2, #0 @ R2=-ROWr16[3] mlane r1, r11, r2, r1 @ R1-=W7*ROWr16[3]=b1 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) mlane r5, r8, r2, r5 @ R5-=W1*ROWr16[3]=b2 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) + it ne mlane r7, r10, r2, r7 @ R7-=W5*ROWr16[3]=b3 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) @@ at this point, R0=b0, R1=b1, R2 (free), R3=ROWr32[2], R4=ROWr32[3], @@ -148,19 +147,23 @@ @@ MAC16(b3, -W1, row[7]); @@ MAC16(b1, -W5, row[7]); mov r3, r3, asr #16 @ R3=ROWr16[5] - teq r3, #0 @ if null avoid muls + teq r3, #0 @ if null avoid muls + it ne mlane r0, r10, r3, r0 @ R0+=W5*ROWr16[5]=b0 mov r4, r4, asr #16 @ R4=ROWr16[7] + itttt ne mlane r5, r11, r3, r5 @ R5+=W7*ROWr16[5]=b2 mlane r7, r9, r3, r7 @ R7+=W3*ROWr16[5]=b3 rsbne r3, r3, #0 @ R3=-ROWr16[5] mlane r1, r8, r3, r1 @ R7-=W1*ROWr16[5]=b1 @@ R3 is free now - teq r4, #0 @ if null avoid muls + teq r4, #0 @ if null avoid muls + itttt ne mlane r0, r11, r4, r0 @ R0+=W7*ROWr16[7]=b0 mlane r5, r9, r4, r5 @ R5+=W3*ROWr16[7]=b2 rsbne r4, r4, #0 @ R4=-ROWr16[7] mlane r7, r8, r4, r7 @ R7-=W1*ROWr16[7]=b3 + it ne mlane r1, r10, r4, r1 @ R1-=W5*ROWr16[7]=b1 @@ R4 is free now __end_b_evaluation: @@ -204,16 +207,19 @@ @@ a2 -= W4*row[4] @@ a3 += W4*row[4] ldrsh r11, [r14, #8] @ R11=ROWr16[4] - teq r11, #0 @ if null avoid muls + teq r11, #0 @ if null avoid muls + it ne mulne r11, r9, r11 @ R11=W4*ROWr16[4] @@ R9 is free now ldrsh r9, [r14, #12] @ R9=ROWr16[6] + itttt ne addne r6, r6, r11 @ R6+=W4*ROWr16[4] (a0) subne r2, r2, r11 @ R2-=W4*ROWr16[4] (a1) subne r3, r3, r11 @ R3-=W4*ROWr16[4] (a2) addne r4, r4, r11 @ R4+=W4*ROWr16[4] (a3) @@ W6 alone is no more useful, save W2*ROWr16[6] in it instead - teq r9, #0 @ if null avoid muls + teq r9, #0 @ if null avoid muls + itttt ne mulne r11, r10, r9 @ R11=W6*ROWr16[6] addne r6, r6, r11 @ R6+=W6*ROWr16[6] (a0) mulne r10, r8, r9 @ R10=W2*ROWr16[6] @@ -222,6 +228,7 @@ @@ a1 -= W2*row[6]; @@ a2 += W2*row[6]; subne r4, r4, r11 @ R4-=W6*ROWr16[6] (a3) + itt ne subne r2, r2, r10 @ R2-=W2*ROWr16[6] (a1) addne r3, r3, r10 @ R3+=W2*ROWr16[6] (a2) @@ -323,10 +330,12 @@ ldrsh r2, [r14, #48] mul r7, r11, r7 @ R7=W7*ROWr16[1]=b3 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle) teq r2, #0 @ if 0, then avoid muls + itttt ne mlane r0, r9, r2, r0 @ R0+=W3*ROWr16[3]=b0 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) rsbne r2, r2, #0 @ R2=-ROWr16[3] mlane r1, r11, r2, r1 @ R1-=W7*ROWr16[3]=b1 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) mlane r5, r8, r2, r5 @ R5-=W1*ROWr16[3]=b2 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) + it ne mlane r7, r10, r2, r7 @ R7-=W5*ROWr16[3]=b3 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) @@ at this point, R0=b0, R1=b1, R2 (free), R3 (free), R4 (free), @@ -342,18 +351,22 @@ @@ MAC16(b1, -W5, col[7x8]); ldrsh r3, [r14, #80] @ R3=COLr16[5x8] teq r3, #0 @ if 0 then avoid muls + itttt ne mlane r0, r10, r3, r0 @ R0+=W5*ROWr16[5x8]=b0 mlane r5, r11, r3, r5 @ R5+=W7*ROWr16[5x8]=b2 mlane r7, r9, r3, r7 @ R7+=W3*ROWr16[5x8]=b3 rsbne r3, r3, #0 @ R3=-ROWr16[5x8] ldrsh r4, [r14, #112] @ R4=COLr16[7x8] + it ne mlane r1, r8, r3, r1 @ R7-=W1*ROWr16[5x8]=b1 @@ R3 is free now teq r4, #0 @ if 0 then avoid muls + itttt ne mlane r0, r11, r4, r0 @ R0+=W7*ROWr16[7x8]=b0 mlane r5, r9, r4, r5 @ R5+=W3*ROWr16[7x8]=b2 rsbne r4, r4, #0 @ R4=-ROWr16[7x8] mlane r7, r8, r4, r7 @ R7-=W1*ROWr16[7x8]=b3 + it ne mlane r1, r10, r4, r1 @ R1-=W5*ROWr16[7x8]=b1 @@ R4 is free now __end_b_evaluation2: @@ -390,15 +403,18 @@ @@ a3 += W4*row[4] ldrsh r11, [r14, #64] @ R11=ROWr16[4] teq r11, #0 @ if null avoid muls + itttt ne mulne r11, r9, r11 @ R11=W4*ROWr16[4] @@ R9 is free now addne r6, r6, r11 @ R6+=W4*ROWr16[4] (a0) subne r2, r2, r11 @ R2-=W4*ROWr16[4] (a1) subne r3, r3, r11 @ R3-=W4*ROWr16[4] (a2) ldrsh r9, [r14, #96] @ R9=ROWr16[6] + it ne addne r4, r4, r11 @ R4+=W4*ROWr16[4] (a3) @@ W6 alone is no more useful, save W2*ROWr16[6] in it instead teq r9, #0 @ if null avoid muls + itttt ne mulne r11, r10, r9 @ R11=W6*ROWr16[6] addne r6, r6, r11 @ R6+=W6*ROWr16[6] (a0) mulne r10, r8, r9 @ R10=W2*ROWr16[6] @@ -407,6 +423,7 @@ @@ a1 -= W2*row[6]; @@ a2 += W2*row[6]; subne r4, r4, r11 @ R4-=W6*ROWr16[6] (a3) + itt ne subne r2, r2, r10 @ R2-=W2*ROWr16[6] (a1) addne r3, r3, r10 @ R3+=W2*ROWr16[6] (a2) __end_a_evaluation2: diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/simple_idct_armv5te.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/simple_idct_armv5te.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/simple_idct_armv5te.S 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/simple_idct_armv5te.S 2012-01-11 00:34:30.000000000 +0000 @@ -49,6 +49,7 @@ ldrd v1, [a1, #8] ldrd a3, [a1] /* a3 = row[1:0], a4 = row[3:2] */ orrs v1, v1, v2 + itt eq cmpeq v1, a4 cmpeq v1, a3, lsr #16 beq row_dc_only @@ -269,6 +270,7 @@ ldmfd sp!, {a3, a4} adds a2, a3, v1 mov a2, a2, lsr #20 + it mi orrmi a2, a2, #0xf000 add ip, a4, v2 mov ip, ip, asr #20 @@ -276,6 +278,7 @@ str a2, [a1] subs a3, a3, v1 mov a2, a3, lsr #20 + it mi orrmi a2, a2, #0xf000 sub a4, a4, v2 mov a4, a4, asr #20 @@ -285,6 +288,7 @@ subs a2, a3, v3 mov a2, a2, lsr #20 + it mi orrmi a2, a2, #0xf000 sub ip, a4, v4 mov ip, ip, asr #20 @@ -292,6 +296,7 @@ str a2, [a1, #(16*1)] adds a3, a3, v3 mov a2, a3, lsr #20 + it mi orrmi a2, a2, #0xf000 add a4, a4, v4 mov a4, a4, asr #20 @@ -301,6 +306,7 @@ adds a2, a3, v5 mov a2, a2, lsr #20 + it mi orrmi a2, a2, #0xf000 add ip, a4, v6 mov ip, ip, asr #20 @@ -308,6 +314,7 @@ str a2, [a1, #(16*2)] subs a3, a3, v5 mov a2, a3, lsr #20 + it mi orrmi a2, a2, #0xf000 sub a4, a4, v6 mov a4, a4, asr #20 @@ -317,6 +324,7 @@ adds a2, a3, v7 mov a2, a2, lsr #20 + it mi orrmi a2, a2, #0xf000 add ip, a4, fp mov ip, ip, asr #20 @@ -324,6 +332,7 @@ str a2, [a1, #(16*3)] subs a3, a3, v7 mov a2, a3, lsr #20 + it mi orrmi a2, a2, #0xf000 sub a4, a4, fp mov a4, a4, asr #20 @@ -335,15 +344,19 @@ .macro clip dst, src:vararg movs \dst, \src + it mi movmi \dst, #0 cmp \dst, #255 + it gt movgt \dst, #255 .endm .macro aclip dst, src:vararg adds \dst, \src + it mi movmi \dst, #0 cmp \dst, #255 + it gt movgt \dst, #255 .endm @@ -370,35 +383,35 @@ orr a2, a3, a4, lsl #8 rsb v2, lr, lr, lsl #3 ldmfd sp!, {a3, a4} - strh a2, [v2, v1]! + strh_pre a2, v2, v1 sub a2, a3, v3 clip a2, a2, asr #20 sub ip, a4, v4 clip ip, ip, asr #20 orr a2, a2, ip, lsl #8 - strh a2, [v1, lr]! + strh_pre a2, v1, lr add a3, a3, v3 clip a2, a3, asr #20 add a4, a4, v4 clip a4, a4, asr #20 orr a2, a2, a4, lsl #8 ldmfd sp!, {a3, a4} - strh a2, [v2, -lr]! + strh_dpre a2, v2, lr add a2, a3, v5 clip a2, a2, asr #20 add ip, a4, v6 clip ip, ip, asr #20 orr a2, a2, ip, lsl #8 - strh a2, [v1, lr]! + strh_pre a2, v1, lr sub a3, a3, v5 clip a2, a3, asr #20 sub a4, a4, v6 clip a4, a4, asr #20 orr a2, a2, a4, lsl #8 ldmfd sp!, {a3, a4} - strh a2, [v2, -lr]! + strh_dpre a2, v2, lr add a2, a3, v7 clip a2, a2, asr #20 @@ -411,7 +424,7 @@ sub a4, a4, fp clip a4, a4, asr #20 orr a2, a2, a4, lsl #8 - strh a2, [v2, -lr] + strh_dpre a2, v2, lr ldr pc, [sp], #4 endfunc @@ -436,7 +449,7 @@ ldr v1, [sp, #32] sub a4, a4, v2 rsb v2, v1, v1, lsl #3 - ldrh ip, [v2, lr]! + ldrh_pre ip, v2, lr strh a2, [lr] and a2, ip, #255 aclip a3, a2, a3, asr #20 @@ -448,7 +461,7 @@ strh a2, [v2] ldmfd sp!, {a3, a4} - ldrh ip, [lr, v1]! + ldrh_pre ip, lr, v1 sub a2, a3, v3 add a3, a3, v3 and v3, ip, #255 @@ -458,7 +471,7 @@ aclip v3, v3, ip, lsr #8 orr a2, a2, v3, lsl #8 add a4, a4, v4 - ldrh ip, [v2, -v1]! + ldrh_dpre ip, v2, v1 strh a2, [lr] and a2, ip, #255 aclip a3, a2, a3, asr #20 @@ -468,7 +481,7 @@ strh a2, [v2] ldmfd sp!, {a3, a4} - ldrh ip, [lr, v1]! + ldrh_pre ip, lr, v1 add a2, a3, v5 sub a3, a3, v5 and v3, ip, #255 @@ -478,7 +491,7 @@ aclip v3, v3, ip, lsr #8 orr a2, a2, v3, lsl #8 sub a4, a4, v6 - ldrh ip, [v2, -v1]! + ldrh_dpre ip, v2, v1 strh a2, [lr] and a2, ip, #255 aclip a3, a2, a3, asr #20 @@ -488,7 +501,7 @@ strh a2, [v2] ldmfd sp!, {a3, a4} - ldrh ip, [lr, v1]! + ldrh_pre ip, lr, v1 add a2, a3, v7 sub a3, a3, v7 and v3, ip, #255 @@ -498,7 +511,7 @@ aclip v3, v3, ip, lsr #8 orr a2, a2, v3, lsl #8 sub a4, a4, fp - ldrh ip, [v2, -v1]! + ldrh_dpre ip, v2, v1 strh a2, [lr] and a2, ip, #255 aclip a3, a2, a3, asr #20 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/simple_idct_armv6.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/simple_idct_armv6.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/simple_idct_armv6.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/simple_idct_armv6.S 2012-01-11 00:34:30.000000000 +0000 @@ -200,6 +200,7 @@ ldr r3, [r0, #8] /* r3 = row[3,1] */ ldr r2, [r0] /* r2 = row[2,0] */ orrs lr, lr, ip + itt eq cmpeq lr, r3 cmpeq lr, r2, lsr #16 beq 1f @@ -282,14 +283,14 @@ pop {r1, r2} idct_finish_shift_sat COL_SHIFT - strb r4, [r1], r2 - strb r5, [r1], r2 - strb r6, [r1], r2 - strb r7, [r1], r2 - strb r11,[r1], r2 - strb r10,[r1], r2 - strb r9, [r1], r2 - strb r8, [r1], r2 + strb_post r4, r1, r2 + strb_post r5, r1, r2 + strb_post r6, r1, r2 + strb_post r7, r1, r2 + strb_post r11,r1, r2 + strb_post r10,r1, r2 + strb_post r9, r1, r2 + strb_post r8, r1, r2 sub r1, r1, r2, lsl #3 @@ -318,16 +319,16 @@ add ip, r3, ip, asr #COL_SHIFT usat ip, #8, ip add r4, r7, r4, asr #COL_SHIFT - strb ip, [r1], r2 + strb_post ip, r1, r2 ldrb ip, [r1, r2] usat r4, #8, r4 ldrb r11,[r1, r2, lsl #2] add r5, ip, r5, asr #COL_SHIFT usat r5, #8, r5 - strb r4, [r1], r2 + strb_post r4, r1, r2 ldrb r3, [r1, r2] ldrb ip, [r1, r2, lsl #2] - strb r5, [r1], r2 + strb_post r5, r1, r2 ldrb r7, [r1, r2] ldrb r4, [r1, r2, lsl #2] add r6, r3, r6, asr #COL_SHIFT @@ -340,11 +341,11 @@ usat r8, #8, r8 add lr, r4, lr, asr #COL_SHIFT usat lr, #8, lr - strb r6, [r1], r2 - strb r10,[r1], r2 - strb r9, [r1], r2 - strb r8, [r1], r2 - strb lr, [r1], r2 + strb_post r6, r1, r2 + strb_post r10,r1, r2 + strb_post r9, r1, r2 + strb_post r8, r1, r2 + strb_post lr, r1, r2 sub r1, r1, r2, lsl #3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/simple_idct_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/simple_idct_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/simple_idct_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/simple_idct_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -71,7 +71,7 @@ add r3, r0, r1, lsl #2 pld [r0, r1] pld [r0, r1, lsl #1] - pld [r3, -r1] +A pld [r3, -r1] pld [r3] pld [r3, r1] add r3, r3, r1, lsl #1 @@ -164,6 +164,7 @@ orrs r4, r4, r5 idct_col4_top + it eq addeq r2, r2, #16 beq 1f @@ -176,6 +177,7 @@ 1: orrs r6, r6, r7 ldrd r4, [r2, #16] + it eq addeq r2, r2, #16 beq 2f @@ -187,6 +189,7 @@ 2: orrs r4, r4, r5 ldrd r4, [r2, #16] + it eq addeq r2, r2, #16 beq 3f @@ -199,6 +202,7 @@ vadd.i32 q13, q13, q8 3: orrs r4, r4, r5 + it eq addeq r2, r2, #16 beq 4f @@ -239,10 +243,9 @@ bx lr endfunc - .section .rodata - .align 4 -idct_coeff_neon: +const idct_coeff_neon, align=4 .short W1, W2, W3, W4, W5, W6, W7, W4c +endconst .macro idct_start data push {r4-r7, lr} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/synth_filter_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/synth_filter_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/synth_filter_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/synth_filter_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -100,9 +100,11 @@ vst1.32 {q9}, [r2,:128] subs r1, r1, #1 + it eq popeq {r4-r11,pc} cmp r4, #0 + itt eq subeq r8, r8, #512*4 subeq r9, r9, #512*4 sub r5, r5, #512*4 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/vp3dsp_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/vp3dsp_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/vp3dsp_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/vp3dsp_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -20,11 +20,9 @@ #include "asm.S" -.section .rodata -.align 4 - -vp3_idct_constants: +const vp3_idct_constants, align=4 .short 64277, 60547, 54491, 46341, 36410, 25080, 12785 +endconst #define xC1S7 d0[0] #define xC2S6 d0[1] @@ -34,8 +32,6 @@ #define xC6S2 d1[1] #define xC7S1 d1[2] -.text - .macro vp3_loop_filter vsubl.u8 q3, d18, d17 vsubl.u8 q2, d16, d19 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/vp56_arith.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/vp56_arith.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/vp56_arith.h 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/vp56_arith.h 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,14 @@ #ifndef AVCODEC_ARM_VP56_ARITH_H #define AVCODEC_ARM_VP56_ARITH_H +#if CONFIG_THUMB +# define A(x) +# define T(x) x +#else +# define A(x) x +# define T(x) +#endif + #if HAVE_ARMV6 && HAVE_INLINE_ASM #define vp56_rac_get_prob vp56_rac_get_prob_armv6 @@ -32,15 +40,21 @@ unsigned bit; __asm__ ("adds %3, %3, %0 \n" + "itt cs \n" "cmpcs %7, %4 \n" - "ldrcsh %2, [%4], #2 \n" + A("ldrcsh %2, [%4], #2 \n") + T("ldrhcs %2, [%4], #2 \n") "rsb %0, %6, #256 \n" "smlabb %0, %5, %6, %0 \n" + T("itttt cs \n") "rev16cs %2, %2 \n" - "orrcs %1, %1, %2, lsl %3 \n" + T("lslcs %2, %2, %3 \n") + T("orrcs %1, %1, %2 \n") + A("orrcs %1, %1, %2, lsl %3 \n") "subcs %3, %3, #16 \n" "lsr %0, %0, #8 \n" "cmp %1, %0, lsl #16 \n" + "ittte ge \n" "subge %1, %1, %0, lsl #16 \n" "subge %0, %5, %0 \n" "movge %2, #1 \n" @@ -64,12 +78,17 @@ unsigned tmp; __asm__ ("adds %3, %3, %0 \n" + "itt cs \n" "cmpcs %7, %4 \n" - "ldrcsh %2, [%4], #2 \n" + A("ldrcsh %2, [%4], #2 \n") + T("ldrhcs %2, [%4], #2 \n") "rsb %0, %6, #256 \n" "smlabb %0, %5, %6, %0 \n" + T("itttt cs \n") "rev16cs %2, %2 \n" - "orrcs %1, %1, %2, lsl %3 \n" + T("lslcs %2, %2, %3 \n") + T("orrcs %1, %1, %2 \n") + A("orrcs %1, %1, %2, lsl %3 \n") "subcs %3, %3, #16 \n" "lsr %0, %0, #8 \n" "lsl %2, %0, #16 \n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/vp8_armv6.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/vp8_armv6.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/vp8_armv6.S 2011-05-31 02:05:07.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/vp8_armv6.S 2012-01-11 00:34:30.000000000 +0000 @@ -25,13 +25,18 @@ lsl \cw, \cw, \t0 lsl \t0, \h, \t0 rsb \h, \pr, #256 + it cs ldrhcs \t1, [\buf], #2 smlabb \h, \t0, \pr, \h +T itttt cs rev16cs \t1, \t1 - orrcs \cw, \cw, \t1, lsl \bs +A orrcs \cw, \cw, \t1, lsl \bs +T lslcs \t1, \t1, \bs +T orrcs \cw, \cw, \t1 subcs \bs, \bs, #16 lsr \h, \h, #8 cmp \cw, \h, lsl #16 + itt ge subge \cw, \cw, \h, lsl #16 subge \h, \t0, \h .endm @@ -40,14 +45,20 @@ adds \bs, \bs, \t0 lsl \cw, \cw, \t0 lsl \t0, \h, \t0 + it cs ldrhcs \t1, [\buf], #2 mov \h, #128 + it cs rev16cs \t1, \t1 add \h, \h, \t0, lsl #7 - orrcs \cw, \cw, \t1, lsl \bs +A orrcs \cw, \cw, \t1, lsl \bs +T ittt cs +T lslcs \t1, \t1, \bs +T orrcs \cw, \cw, \t1 subcs \bs, \bs, #16 lsr \h, \h, #8 cmp \cw, \h, lsl #16 + itt ge subge \cw, \cw, \h, lsl #16 subge \h, \t0, \h .endm @@ -59,6 +70,7 @@ cmp r3, #0 ldr r11, [r5] ldm r0, {r5-r7} @ high, bits, buf + it ne pkhtbne r11, r11, r11, asr #16 ldr r8, [r0, #16] @ code_word 0: @@ -80,19 +92,26 @@ adds r6, r6, r9 add r4, r4, #11 lsl r8, r8, r9 + it cs ldrhcs r10, [r7], #2 lsl r9, r5, r9 mov r5, #128 + it cs rev16cs r10, r10 add r5, r5, r9, lsl #7 - orrcs r8, r8, r10, lsl r6 +T ittt cs +T lslcs r10, r10, r6 +T orrcs r8, r8, r10 +A orrcs r8, r8, r10, lsl r6 subcs r6, r6, #16 lsr r5, r5, #8 cmp r8, r5, lsl #16 movrel r10, zigzag_scan-1 + itt ge subge r8, r8, r5, lsl #16 subge r5, r9, r5 ldrb r10, [r10, r3] + it ge rsbge r12, r12, #0 cmp r3, #16 strh r12, [r1, r10] @@ -108,6 +127,7 @@ ldr r0, [sp] ldr r9, [r0, #12] cmp r7, r9 + it hi movhi r7, r9 stm r0, {r5-r7} @ high, bits, buf str r8, [r0, #16] @ code_word @@ -131,11 +151,13 @@ mov r12, #2 ldrb r0, [r4, #4] rac_get_prob r5, r6, r7, r8, r0, r9, r10 + it ge addge r12, #1 ldrb r9, [lr, r5] blt 4f ldrb r0, [r4, #5] rac_get_prob r5, r6, r7, r8, r0, r9, r10 + it ge addge r12, #1 ldrb r9, [lr, r5] b 4f @@ -153,6 +175,7 @@ mov r12, #5 mov r0, #159 rac_get_prob r5, r6, r7, r8, r0, r9, r10 + it ge addge r12, r12, #1 ldrb r9, [lr, r5] b 4f @@ -160,23 +183,28 @@ mov r12, #7 mov r0, #165 rac_get_prob r5, r6, r7, r8, r0, r9, r10 + it ge addge r12, r12, #2 ldrb r9, [lr, r5] mov r0, #145 rac_get_prob r5, r6, r7, r8, r0, r9, r10 + it ge addge r12, r12, #1 ldrb r9, [lr, r5] b 4f 3: ldrb r0, [r4, #8] rac_get_prob r5, r6, r7, r8, r0, r9, r10 + it ge addge r4, r4, #1 ldrb r9, [lr, r5] + ite ge movge r12, #2 movlt r12, #0 ldrb r0, [r4, #9] rac_get_prob r5, r6, r7, r8, r0, r9, r10 mov r9, #8 + it ge addge r12, r12, #1 movrel r4, X(ff_vp8_dct_cat_prob) lsl r9, r9, r12 @@ -189,6 +217,7 @@ lsl r1, r1, #1 rac_get_prob r5, r6, r7, r8, r0, r9, r10 ldrb r0, [r4], #1 + it ge addge r1, r1, #1 cmp r0, #0 bne 1b @@ -200,6 +229,7 @@ add r4, r2, r4 add r4, r4, #22 rac_get_128 r5, r6, r7, r8, r9, r10 + it ge rsbge r12, r12, #0 smulbb r12, r12, r11 movrel r9, zigzag_scan-1 @@ -210,9 +240,9 @@ b 5b endfunc - .section .rodata -zigzag_scan: +const zigzag_scan .byte 0, 2, 8, 16 .byte 10, 4, 6, 12 .byte 18, 24, 26, 20 .byte 14, 22, 28, 30 +endconst diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/vp8dsp_neon.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/vp8dsp_neon.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/arm/vp8dsp_neon.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/arm/vp8dsp_neon.S 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,7 @@ */ #include "asm.S" +#include "neon.S" function ff_vp8_luma_dc_wht_neon, export=1 vld1.16 {q0-q1}, [r1,:128] @@ -454,23 +455,6 @@ .endif .endm -.macro transpose8x16matrix - vtrn.32 q0, q4 - vtrn.32 q1, q5 - vtrn.32 q2, q6 - vtrn.32 q3, q7 - - vtrn.16 q0, q2 - vtrn.16 q1, q3 - vtrn.16 q4, q6 - vtrn.16 q5, q7 - - vtrn.8 q0, q1 - vtrn.8 q2, q3 - vtrn.8 q4, q5 - vtrn.8 q6, q7 -.endm - .macro vp8_v_loop_filter16 name, inner=0, simple=0 function ff_vp8_v_loop_filter16\name\()_neon, export=1 vpush {q4-q7} @@ -605,7 +589,7 @@ vld1.8 {d13}, [r0], r1 vld1.8 {d15}, [r0], r1 - transpose8x16matrix + transpose_8x8 q0, q1, q2, q3, q4, q5, q6, q7 vdup.8 q14, r2 @ flim_E .if !\simple @@ -616,7 +600,7 @@ sub r0, r0, r1, lsl #4 @ backup 16 rows - transpose8x16matrix + transpose_8x8 q0, q1, q2, q3, q4, q5, q6, q7 @ Store pixels: vst1.8 {d0}, [r0], r1 @@ -670,7 +654,7 @@ vld1.8 {d14}, [r0], r2 vld1.8 {d15}, [r1], r2 - transpose8x16matrix + transpose_8x8 q0, q1, q2, q3, q4, q5, q6, q7 vdup.8 q14, r3 @ flim_E vdup.8 q15, r12 @ flim_I @@ -681,7 +665,7 @@ sub r0, r0, r2, lsl #3 @ backup u 8 rows sub r1, r1, r2, lsl #3 @ backup v 8 rows - transpose8x16matrix + transpose_8x8 q0, q1, q2, q3, q4, q5, q6, q7 @ Store pixels: vst1.8 {d0}, [r0], r2 @@ -746,14 +730,14 @@ push {r4-r6,lr} 1: subs r12, r12, #4 - ldr r4, [r2], r3 - ldr r5, [r2], r3 - ldr r6, [r2], r3 - ldr lr, [r2], r3 - str r4, [r0], r1 - str r5, [r0], r1 - str r6, [r0], r1 - str lr, [r0], r1 + ldr_post r4, r2, r3 + ldr_post r5, r2, r3 + ldr_post r6, r2, r3 + ldr_post lr, r2, r3 + str_post r4, r0, r1 + str_post r5, r0, r1 + str_post r6, r0, r1 + str_post lr, r0, r1 bgt 1b pop {r4-r6,pc} endfunc diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ass.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ass.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ass.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ass.h 2012-01-11 00:34:30.000000000 +0000 @@ -25,8 +25,7 @@ #include "avcodec.h" /** - * Default values for ASS style. - * @defgroup ass_default + * @name Default values for ASS style * @{ */ #define ASS_DEFAULT_FONT "Arial" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/asv1.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/asv1.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/asv1.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/asv1.c 2012-01-11 00:34:30.000000000 +0000 @@ -497,7 +497,7 @@ } emms_c(); - align_put_bits(&a->pb); + avpriv_align_put_bits(&a->pb); while(put_bits_count(&a->pb)&31) put_bits(&a->pb, 8, 0); @@ -603,39 +603,37 @@ } AVCodec ff_asv1_decoder = { - "asv1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ASV1, - sizeof(ASV1Context), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "asv1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ASV1, + .priv_data_size = sizeof(ASV1Context), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name= NULL_IF_CONFIG_SMALL("ASUS V1"), }; AVCodec ff_asv2_decoder = { - "asv2", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ASV2, - sizeof(ASV1Context), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "asv2", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ASV2, + .priv_data_size = sizeof(ASV1Context), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name= NULL_IF_CONFIG_SMALL("ASUS V2"), }; #if CONFIG_ASV1_ENCODER AVCodec ff_asv1_encoder = { - "asv1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ASV1, - sizeof(ASV1Context), - encode_init, - encode_frame, + .name = "asv1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ASV1, + .priv_data_size = sizeof(ASV1Context), + .init = encode_init, + .encode = encode_frame, //encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("ASUS V1"), @@ -644,12 +642,12 @@ #if CONFIG_ASV2_ENCODER AVCodec ff_asv2_encoder = { - "asv2", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ASV2, - sizeof(ASV1Context), - encode_init, - encode_frame, + .name = "asv2", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ASV2, + .priv_data_size = sizeof(ASV1Context), + .init = encode_init, + .encode = encode_frame, //encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("ASUS V2"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/atrac1.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/atrac1.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/atrac1.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/atrac1.c 2012-01-11 00:34:30.000000000 +0000 @@ -36,6 +36,7 @@ #include "get_bits.h" #include "dsputil.h" #include "fft.h" +#include "fmtconvert.h" #include "sinewin.h" #include "atrac.h" @@ -71,6 +72,7 @@ * The atrac1 context, holds all needed parameters for decoding */ typedef struct { + AVFrame frame; AT1SUCtx SUs[AT1_MAX_CHANNELS]; ///< channel sound unit DECLARE_ALIGNED(32, float, spec)[AT1_SU_SAMPLES]; ///< the mdct spectrum buffer @@ -78,10 +80,11 @@ DECLARE_ALIGNED(32, float, mid)[256]; DECLARE_ALIGNED(32, float, high)[512]; float* bands[3]; - DECLARE_ALIGNED(32, float, out_samples)[AT1_MAX_CHANNELS][AT1_SU_SAMPLES]; + float *out_samples[AT1_MAX_CHANNELS]; FFTContext mdct_ctx[3]; int channels; DSPContext dsp; + FmtConvertContext fmt_conv; } AT1Ctx; /** size of the transform in samples in the long mode for each QMF band */ @@ -129,7 +132,7 @@ nbits = mdct_long_nbits[band_num] - log2_block_count; if (nbits != 5 && nbits != 7 && nbits != 8) - return -1; + return AVERROR_INVALIDDATA; } else { block_size = 32; nbits = 5; @@ -173,14 +176,14 @@ /* low and mid band */ log2_block_count_tmp = get_bits(gb, 2); if (log2_block_count_tmp & 1) - return -1; + return AVERROR_INVALIDDATA; log2_block_cnt[i] = 2 - log2_block_count_tmp; } /* high band */ log2_block_count_tmp = get_bits(gb, 2); if (log2_block_count_tmp != 0 && log2_block_count_tmp != 3) - return -1; + return AVERROR_INVALIDDATA; log2_block_cnt[IDX_HIGH_BAND] = 3 - log2_block_count_tmp; skip_bits(gb, 2); @@ -229,7 +232,7 @@ /* check for bitstream overflow */ if (bits_used > AT1_SU_MAX_BITS) - return -1; + return AVERROR_INVALIDDATA; /* get the position of the 1st spec according to the block size mode */ pos = su->log2_block_count[band_num] ? bfu_start_short[bfu_num] : bfu_start_long[bfu_num]; @@ -271,21 +274,29 @@ static int atrac1_decode_frame(AVCodecContext *avctx, void *data, - int *data_size, AVPacket *avpkt) + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AT1Ctx *q = avctx->priv_data; - int ch, ret, i; + int ch, ret; GetBitContext gb; - float* samples = data; + float *samples; if (buf_size < 212 * q->channels) { - av_log(q,AV_LOG_ERROR,"Not enought data to decode!\n"); - return -1; + av_log(avctx, AV_LOG_ERROR, "Not enough data to decode!\n"); + return AVERROR_INVALIDDATA; } + /* get output buffer */ + q->frame.nb_samples = AT1_SU_SAMPLES; + if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (float *)q->frame.data[0]; + for (ch = 0; ch < q->channels; ch++) { AT1SUCtx* su = &q->SUs[ch]; @@ -303,44 +314,74 @@ ret = at1_imdct_block(su, q); if (ret < 0) return ret; - at1_subband_synthesis(q, su, q->out_samples[ch]); + at1_subband_synthesis(q, su, q->channels == 1 ? samples : q->out_samples[ch]); } - /* interleave; FIXME, should create/use a DSP function */ - if (q->channels == 1) { - /* mono */ - memcpy(samples, q->out_samples[0], AT1_SU_SAMPLES * 4); - } else { - /* stereo */ - for (i = 0; i < AT1_SU_SAMPLES; i++) { - samples[i * 2] = q->out_samples[0][i]; - samples[i * 2 + 1] = q->out_samples[1][i]; - } + /* interleave */ + if (q->channels == 2) { + q->fmt_conv.float_interleave(samples, (const float **)q->out_samples, + AT1_SU_SAMPLES, 2); } - *data_size = q->channels * AT1_SU_SAMPLES * sizeof(*samples); + *got_frame_ptr = 1; + *(AVFrame *)data = q->frame; + return avctx->block_align; } +static av_cold int atrac1_decode_end(AVCodecContext * avctx) +{ + AT1Ctx *q = avctx->priv_data; + + av_freep(&q->out_samples[0]); + + ff_mdct_end(&q->mdct_ctx[0]); + ff_mdct_end(&q->mdct_ctx[1]); + ff_mdct_end(&q->mdct_ctx[2]); + + return 0; +} + + static av_cold int atrac1_decode_init(AVCodecContext *avctx) { AT1Ctx *q = avctx->priv_data; + int ret; avctx->sample_fmt = AV_SAMPLE_FMT_FLT; + if (avctx->channels < 1 || avctx->channels > AT1_MAX_CHANNELS) { + av_log(avctx, AV_LOG_ERROR, "Unsupported number of channels: %d\n", + avctx->channels); + return AVERROR(EINVAL); + } q->channels = avctx->channels; + if (avctx->channels == 2) { + q->out_samples[0] = av_malloc(2 * AT1_SU_SAMPLES * sizeof(*q->out_samples[0])); + q->out_samples[1] = q->out_samples[0] + AT1_SU_SAMPLES; + if (!q->out_samples[0]) { + av_freep(&q->out_samples[0]); + return AVERROR(ENOMEM); + } + } + /* Init the mdct transforms */ - ff_mdct_init(&q->mdct_ctx[0], 6, 1, -1.0/ (1 << 15)); - ff_mdct_init(&q->mdct_ctx[1], 8, 1, -1.0/ (1 << 15)); - ff_mdct_init(&q->mdct_ctx[2], 9, 1, -1.0/ (1 << 15)); + if ((ret = ff_mdct_init(&q->mdct_ctx[0], 6, 1, -1.0/ (1 << 15))) || + (ret = ff_mdct_init(&q->mdct_ctx[1], 8, 1, -1.0/ (1 << 15))) || + (ret = ff_mdct_init(&q->mdct_ctx[2], 9, 1, -1.0/ (1 << 15)))) { + av_log(avctx, AV_LOG_ERROR, "Error initializing MDCT\n"); + atrac1_decode_end(avctx); + return ret; + } ff_init_ff_sine_windows(5); atrac_generate_tables(); dsputil_init(&q->dsp, avctx); + ff_fmt_convert_init(&q->fmt_conv, avctx); q->bands[0] = q->low; q->bands[1] = q->mid; @@ -352,16 +393,9 @@ q->SUs[1].spectrum[0] = q->SUs[1].spec1; q->SUs[1].spectrum[1] = q->SUs[1].spec2; - return 0; -} - - -static av_cold int atrac1_decode_end(AVCodecContext * avctx) { - AT1Ctx *q = avctx->priv_data; + avcodec_get_frame_defaults(&q->frame); + avctx->coded_frame = &q->frame; - ff_mdct_end(&q->mdct_ctx[0]); - ff_mdct_end(&q->mdct_ctx[1]); - ff_mdct_end(&q->mdct_ctx[2]); return 0; } @@ -374,5 +408,6 @@ .init = atrac1_decode_init, .close = atrac1_decode_end, .decode = atrac1_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Atrac 1 (Adaptive TRansform Acoustic Coding)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/atrac3.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/atrac3.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/atrac3.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/atrac3.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,6 +41,7 @@ #include "dsputil.h" #include "bytestream.h" #include "fft.h" +#include "fmtconvert.h" #include "atrac.h" #include "atrac3data.h" @@ -48,6 +49,8 @@ #define JOINT_STEREO 0x12 #define STEREO 0x2 +#define SAMPLES_PER_FRAME 1024 +#define MDCT_SIZE 512 /* These structures are needed to store the parsed gain control data. */ typedef struct { @@ -70,12 +73,12 @@ int bandsCoded; int numComponents; tonal_component components[64]; - float prevFrame[1024]; + float prevFrame[SAMPLES_PER_FRAME]; int gcBlkSwitch; gain_block gainBlock[2]; - DECLARE_ALIGNED(32, float, spectrum)[1024]; - DECLARE_ALIGNED(32, float, IMDCT_buf)[1024]; + DECLARE_ALIGNED(32, float, spectrum)[SAMPLES_PER_FRAME]; + DECLARE_ALIGNED(32, float, IMDCT_buf)[SAMPLES_PER_FRAME]; float delayBuf1[46]; ///mdct_ctx.imdct_calc(&q->mdct_ctx,pOutput,pInput); /* Perform windowing on the output. */ - dsp.vector_fmul(pOutput, pOutput, mdct_window, 512); + dsp.vector_fmul(pOutput, pOutput, mdct_window, MDCT_SIZE); } @@ -192,7 +197,7 @@ } -static av_cold void init_atrac3_transforms(ATRAC3Context *q) { +static av_cold int init_atrac3_transforms(ATRAC3Context *q, int is_float) { float enc_window[256]; int i; @@ -208,7 +213,7 @@ } /* Initialize the MDCT transform. */ - ff_mdct_init(&q->mdct_ctx, 9, 1, 1.0); + return ff_mdct_init(&q->mdct_ctx, 9, 1, is_float ? 1.0 / 32768 : 1.0); } /** @@ -221,6 +226,8 @@ av_free(q->pUnits); av_free(q->decoded_bytes_buffer); + av_freep(&q->outSamples[0]); + ff_mdct_end(&q->mdct_ctx); return 0; @@ -340,7 +347,7 @@ /* Clear the subbands that were not coded. */ first = subbandTab[cnt]; - memset(pOut+first, 0, (1024 - first) * sizeof(float)); + memset(pOut+first, 0, (SAMPLES_PER_FRAME - first) * sizeof(float)); return numSubbands; } @@ -370,7 +377,7 @@ coding_mode_selector = get_bits(gb,2); if (coding_mode_selector == 2) - return -1; + return AVERROR_INVALIDDATA; coding_mode = coding_mode_selector & 1; @@ -382,7 +389,7 @@ quant_step_index = get_bits(gb,3); if (quant_step_index <= 1) - return -1; + return AVERROR_INVALIDDATA; if (coding_mode_selector == 3) coding_mode = get_bits1(gb); @@ -396,7 +403,7 @@ for (k=0; kIMDCT_buf, 0, 512 * sizeof(float)); /* gain compensation and overlapping */ - gainCompensateAndOverlap (pSnd->IMDCT_buf, &(pSnd->prevFrame[band*256]), &(pOut[band*256]), - &((pSnd->gainBlock[1 - (pSnd->gcBlkSwitch)]).gBlock[band]), - &((pSnd->gainBlock[pSnd->gcBlkSwitch]).gBlock[band])); + gainCompensateAndOverlap(pSnd->IMDCT_buf, &pSnd->prevFrame[band * 256], + &pOut[band * 256], + &pSnd->gainBlock[1 - pSnd->gcBlkSwitch].gBlock[band], + &pSnd->gainBlock[ pSnd->gcBlkSwitch].gBlock[band]); } /* Swap the gain control buffers for the next frame. */ @@ -719,7 +727,8 @@ * @param databuf the input data */ -static int decodeFrame(ATRAC3Context *q, const uint8_t* databuf) +static int decodeFrame(ATRAC3Context *q, const uint8_t* databuf, + float **out_samples) { int result, i; float *p1, *p2, *p3, *p4; @@ -731,9 +740,9 @@ /* decode Sound Unit 1 */ init_get_bits(&q->gb,databuf,q->bits_per_frame); - result = decodeChannelSoundUnit(q,&q->gb, q->pUnits, q->outSamples, 0, JOINT_STEREO); + result = decodeChannelSoundUnit(q,&q->gb, q->pUnits, out_samples[0], 0, JOINT_STEREO); if (result != 0) - return (result); + return result; /* Framedata of the su2 in the joint-stereo mode is encoded in * reverse byte order so we need to swap it first. */ @@ -753,7 +762,7 @@ ptr1 = q->decoded_bytes_buffer; for (i = 4; *ptr1 == 0xF8; i++, ptr1++) { if (i >= q->bytes_per_frame) - return -1; + return AVERROR_INVALIDDATA; } @@ -772,14 +781,14 @@ } /* Decode Sound Unit 2. */ - result = decodeChannelSoundUnit(q,&q->gb, &q->pUnits[1], &q->outSamples[1024], 1, JOINT_STEREO); + result = decodeChannelSoundUnit(q,&q->gb, &q->pUnits[1], out_samples[1], 1, JOINT_STEREO); if (result != 0) - return (result); + return result; /* Reconstruct the channel coefficients. */ - reverseMatrixing(q->outSamples, &q->outSamples[1024], q->matrix_coeff_index_prev, q->matrix_coeff_index_now); + reverseMatrixing(out_samples[0], out_samples[1], q->matrix_coeff_index_prev, q->matrix_coeff_index_now); - channelWeighting(q->outSamples, &q->outSamples[1024], q->weighting_delay); + channelWeighting(out_samples[0], out_samples[1], q->weighting_delay); } else { /* normal stereo mode or mono */ @@ -787,24 +796,25 @@ for (i=0 ; ichannels ; i++) { /* Set the bitstream reader at the start of a channel sound unit. */ - init_get_bits(&q->gb, databuf+((i*q->bytes_per_frame)/q->channels), (q->bits_per_frame)/q->channels); + init_get_bits(&q->gb, + databuf + i * q->bytes_per_frame / q->channels, + q->bits_per_frame / q->channels); - result = decodeChannelSoundUnit(q,&q->gb, &q->pUnits[i], &q->outSamples[i*1024], i, q->codingMode); + result = decodeChannelSoundUnit(q,&q->gb, &q->pUnits[i], out_samples[i], i, q->codingMode); if (result != 0) - return (result); + return result; } } /* Apply the iQMF synthesis filter. */ - p1= q->outSamples; for (i=0 ; ichannels ; i++) { + p1 = out_samples[i]; p2= p1+256; p3= p2+256; p4= p3+256; atrac_iqmf (p1, p2, 256, p1, q->pUnits[i].delayBuf1, q->tempBuf); atrac_iqmf (p4, p3, 256, p3, q->pUnits[i].delayBuf2, q->tempBuf); atrac_iqmf (p1, p3, 512, p1, q->pUnits[i].delayBuf3, q->tempBuf); - p1 +=1024; } return 0; @@ -817,22 +827,31 @@ * @param avctx pointer to the AVCodecContext */ -static int atrac3_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) { +static int atrac3_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) +{ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; ATRAC3Context *q = avctx->priv_data; - int result = 0, i; + int result; const uint8_t* databuf; - int16_t* samples = data; + float *samples_flt; + int16_t *samples_s16; if (buf_size < avctx->block_align) { av_log(avctx, AV_LOG_ERROR, "Frame too small (%d bytes). Truncated file?\n", buf_size); - *data_size = 0; - return buf_size; + return AVERROR_INVALIDDATA; + } + + /* get output buffer */ + q->frame.nb_samples = SAMPLES_PER_FRAME; + if ((result = avctx->get_buffer(avctx, &q->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return result; } + samples_flt = (float *)q->frame.data[0]; + samples_s16 = (int16_t *)q->frame.data[0]; /* Check if we need to descramble and what buffer to pass on. */ if (q->scrambled_stream) { @@ -842,27 +861,30 @@ databuf = buf; } - result = decodeFrame(q, databuf); + if (q->channels == 1 && avctx->sample_fmt == AV_SAMPLE_FMT_FLT) + result = decodeFrame(q, databuf, &samples_flt); + else + result = decodeFrame(q, databuf, q->outSamples); if (result != 0) { av_log(NULL,AV_LOG_ERROR,"Frame decoding error!\n"); - return -1; + return result; } - if (q->channels == 1) { - /* mono */ - for (i = 0; i<1024; i++) - samples[i] = av_clip_int16(round(q->outSamples[i])); - *data_size = 1024 * sizeof(int16_t); - } else { - /* stereo */ - for (i = 0; i < 1024; i++) { - samples[i*2] = av_clip_int16(round(q->outSamples[i])); - samples[i*2+1] = av_clip_int16(round(q->outSamples[1024+i])); - } - *data_size = 2048 * sizeof(int16_t); + /* interleave */ + if (q->channels == 2 && avctx->sample_fmt == AV_SAMPLE_FMT_FLT) { + q->fmt_conv.float_interleave(samples_flt, + (const float **)q->outSamples, + SAMPLES_PER_FRAME, 2); + } else if (avctx->sample_fmt == AV_SAMPLE_FMT_S16) { + q->fmt_conv.float_to_int16_interleave(samples_s16, + (const float **)q->outSamples, + SAMPLES_PER_FRAME, q->channels); } + *got_frame_ptr = 1; + *(AVFrame *)data = q->frame; + return avctx->block_align; } @@ -875,7 +897,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) { - int i; + int i, ret; const uint8_t *edata_ptr = avctx->extradata; ATRAC3Context *q = avctx->priv_data; static VLC_TYPE atrac3_vlc_table[4096][2]; @@ -899,7 +921,7 @@ av_log(avctx,AV_LOG_DEBUG,"[12-13] %d\n",bytestream_get_le16(&edata_ptr)); //Unknown always 0 /* setup */ - q->samples_per_frame = 1024 * q->channels; + q->samples_per_frame = SAMPLES_PER_FRAME * q->channels; q->atrac3version = 4; q->delay = 0x88E; if (q->codingMode) @@ -912,7 +934,7 @@ if ((q->bytes_per_frame == 96*q->channels*q->frame_factor) || (q->bytes_per_frame == 152*q->channels*q->frame_factor) || (q->bytes_per_frame == 192*q->channels*q->frame_factor)) { } else { av_log(avctx,AV_LOG_ERROR,"Unknown frame/channel/frame_factor configuration %d/%d/%d\n", q->bytes_per_frame, q->channels, q->frame_factor); - return -1; + return AVERROR_INVALIDDATA; } } else if (avctx->extradata_size == 10) { @@ -932,17 +954,17 @@ if (q->atrac3version != 4) { av_log(avctx,AV_LOG_ERROR,"Version %d != 4.\n",q->atrac3version); - return -1; + return AVERROR_INVALIDDATA; } - if (q->samples_per_frame != 1024 && q->samples_per_frame != 2048) { + if (q->samples_per_frame != SAMPLES_PER_FRAME && q->samples_per_frame != SAMPLES_PER_FRAME*2) { av_log(avctx,AV_LOG_ERROR,"Unknown amount of samples per frame %d.\n",q->samples_per_frame); - return -1; + return AVERROR_INVALIDDATA; } if (q->delay != 0x88E) { av_log(avctx,AV_LOG_ERROR,"Unknown amount of delay %x != 0x88E.\n",q->delay); - return -1; + return AVERROR_INVALIDDATA; } if (q->codingMode == STEREO) { @@ -951,17 +973,17 @@ av_log(avctx,AV_LOG_DEBUG,"Joint stereo detected.\n"); } else { av_log(avctx,AV_LOG_ERROR,"Unknown channel coding mode %x!\n",q->codingMode); - return -1; + return AVERROR_INVALIDDATA; } if (avctx->channels <= 0 || avctx->channels > 2 /*|| ((avctx->channels * 1024) != q->samples_per_frame)*/) { av_log(avctx,AV_LOG_ERROR,"Channel configuration error!\n"); - return -1; + return AVERROR(EINVAL); } if(avctx->block_align >= UINT_MAX/2) - return -1; + return AVERROR(EINVAL); /* Pad the data buffer with FF_INPUT_BUFFER_PADDING_SIZE, * this is for the bitstream reader. */ @@ -981,7 +1003,16 @@ vlcs_initialized = 1; } - init_atrac3_transforms(q); + if (avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT) + avctx->sample_fmt = AV_SAMPLE_FMT_FLT; + else + avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + if ((ret = init_atrac3_transforms(q, avctx->sample_fmt == AV_SAMPLE_FMT_FLT))) { + av_log(avctx, AV_LOG_ERROR, "Error initializing MDCT\n"); + av_freep(&q->decoded_bytes_buffer); + return ret; + } atrac_generate_tables(); @@ -1007,14 +1038,26 @@ } dsputil_init(&dsp, avctx); + ff_fmt_convert_init(&q->fmt_conv, avctx); q->pUnits = av_mallocz(sizeof(channel_unit)*q->channels); if (!q->pUnits) { - av_free(q->decoded_bytes_buffer); + atrac3_decode_close(avctx); return AVERROR(ENOMEM); } - avctx->sample_fmt = AV_SAMPLE_FMT_S16; + if (avctx->channels > 1 || avctx->sample_fmt == AV_SAMPLE_FMT_S16) { + q->outSamples[0] = av_mallocz(SAMPLES_PER_FRAME * avctx->channels * sizeof(*q->outSamples[0])); + q->outSamples[1] = q->outSamples[0] + SAMPLES_PER_FRAME; + if (!q->outSamples[0]) { + atrac3_decode_close(avctx); + return AVERROR(ENOMEM); + } + } + + avcodec_get_frame_defaults(&q->frame); + avctx->coded_frame = &q->frame; + return 0; } @@ -1028,5 +1071,6 @@ .init = atrac3_decode_init, .close = atrac3_decode_close, .decode = atrac3_decode_frame, + .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Atrac 3 (Adaptive TRansform Acoustic Coding 3)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/audioconvert.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/audioconvert.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/audioconvert.c 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/audioconvert.c 2012-01-11 00:34:30.000000000 +0000 @@ -48,7 +48,7 @@ } #endif -int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name) +uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name) { switch(nb_channels) { case 1: return AV_CH_LAYOUT_MONO; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/audioconvert.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/audioconvert.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/audioconvert.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/audioconvert.h 2012-01-11 00:34:30.000000000 +0000 @@ -80,7 +80,7 @@ * @param fmt_name Format name, or NULL if unknown * @return Channel layout mask */ -int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name); +uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name); struct AVAudioConvert; typedef struct AVAudioConvert AVAudioConvert; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aura.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aura.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/aura.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/aura.c 2012-01-11 00:34:30.000000000 +0000 @@ -123,16 +123,14 @@ } AVCodec ff_aura2_decoder = { - "aura2", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_AURA2, - sizeof(AuraDecodeContext), - aura_decode_init, - NULL, - aura_decode_end, - aura_decode_frame, - CODEC_CAP_DR1, - NULL, + .name = "aura2", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_AURA2, + .priv_data_size = sizeof(AuraDecodeContext), + .init = aura_decode_init, + .close = aura_decode_end, + .decode = aura_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Auravision Aura 2"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/avcodec.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/avcodec.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/avcodec.h 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/avcodec.h 2012-01-11 00:34:30.000000000 +0000 @@ -30,8 +30,43 @@ #include "libavutil/samplefmt.h" #include "libavutil/avutil.h" #include "libavutil/cpu.h" +#include "libavutil/dict.h" +#include "libavutil/log.h" +#include "libavutil/pixfmt.h" +#include "libavutil/rational.h" #include "libavcodec/version.h" +/** + * @defgroup libavc Encoding/Decoding Library + * @{ + * + * @defgroup lavc_decoding Decoding + * @{ + * @} + * + * @defgroup lavc_encoding Encoding + * @{ + * @} + * + * @defgroup lavc_codec Codecs + * @{ + * @defgroup lavc_codec_native Native Codecs + * @{ + * @} + * @defgroup lavc_codec_wrappers External library wrappers + * @{ + * @} + * @defgroup lavc_codec_hwaccel Hardware Accelerators bridge + * @{ + * @} + * @} + * @defgroup lavc_internal Internal + * @{ + * @} + * @} + * + */ + /** * Identify the syntax and semantics of the bitstream. @@ -148,7 +183,9 @@ CODEC_ID_TIERTEXSEQVIDEO, CODEC_ID_TIFF, CODEC_ID_GIF, +#if LIBAVCODEC_VERSION_MAJOR == 53 CODEC_ID_FFH264, +#endif CODEC_ID_DXA, CODEC_ID_DNXHD, CODEC_ID_THP, @@ -166,8 +203,10 @@ CODEC_ID_INDEO5, CODEC_ID_MIMIC, CODEC_ID_RL2, +#if LIBAVCODEC_VERSION_MAJOR == 53 CODEC_ID_8SVX_EXP, CODEC_ID_8SVX_FIB, +#endif CODEC_ID_ESCAPE124, CODEC_ID_DIRAC, CODEC_ID_BFI, @@ -204,9 +243,21 @@ CODEC_ID_PRORES, CODEC_ID_JV, CODEC_ID_DFA, + CODEC_ID_WMV3IMAGE, + CODEC_ID_VC1IMAGE, +#if LIBAVCODEC_VERSION_MAJOR == 53 + CODEC_ID_G723_1, + CODEC_ID_G729, +#endif + CODEC_ID_UTVIDEO, + CODEC_ID_BMV_VIDEO, + CODEC_ID_VBLE, + CODEC_ID_DXTORY, + CODEC_ID_V410, /* various PCM "codecs" */ - CODEC_ID_PCM_S16LE= 0x10000, + CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs + CODEC_ID_PCM_S16LE = 0x10000, CODEC_ID_PCM_S16BE, CODEC_ID_PCM_U16LE, CODEC_ID_PCM_U16BE, @@ -233,9 +284,10 @@ CODEC_ID_PCM_BLURAY, CODEC_ID_PCM_LXF, CODEC_ID_S302M, + CODEC_ID_PCM_S8_PLANAR, /* various ADPCM codecs */ - CODEC_ID_ADPCM_IMA_QT= 0x11000, + CODEC_ID_ADPCM_IMA_QT = 0x11000, CODEC_ID_ADPCM_IMA_WAV, CODEC_ID_ADPCM_IMA_DK3, CODEC_ID_ADPCM_IMA_DK4, @@ -266,21 +318,21 @@ CODEC_ID_ADPCM_G722, /* AMR */ - CODEC_ID_AMR_NB= 0x12000, + CODEC_ID_AMR_NB = 0x12000, CODEC_ID_AMR_WB, /* RealAudio codecs*/ - CODEC_ID_RA_144= 0x13000, + CODEC_ID_RA_144 = 0x13000, CODEC_ID_RA_288, /* various DPCM codecs */ - CODEC_ID_ROQ_DPCM= 0x14000, + CODEC_ID_ROQ_DPCM = 0x14000, CODEC_ID_INTERPLAY_DPCM, CODEC_ID_XAN_DPCM, CODEC_ID_SOL_DPCM, /* audio codecs */ - CODEC_ID_MP2= 0x15000, + CODEC_ID_MP2 = 0x15000, CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3 CODEC_ID_AAC, CODEC_ID_AC3, @@ -292,8 +344,10 @@ CODEC_ID_MACE3, CODEC_ID_MACE6, CODEC_ID_VMDAUDIO, +#if LIBAVCODEC_VERSION_MAJOR == 53 CODEC_ID_SONIC, CODEC_ID_SONIC_LS, +#endif CODEC_ID_FLAC, CODEC_ID_MP3ADU, CODEC_ID_MP3ON4, @@ -334,9 +388,18 @@ CODEC_ID_BINKAUDIO_DCT, CODEC_ID_AAC_LATM, CODEC_ID_QDMC, + CODEC_ID_CELT, +#if LIBAVCODEC_VERSION_MAJOR > 53 + CODEC_ID_G723_1, + CODEC_ID_G729, + CODEC_ID_8SVX_EXP, + CODEC_ID_8SVX_FIB, +#endif + CODEC_ID_BMV_AUDIO, /* subtitle codecs */ - CODEC_ID_DVD_SUBTITLE= 0x17000, + CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs. + CODEC_ID_DVD_SUBTITLE = 0x17000, CODEC_ID_DVB_SUBTITLE, CODEC_ID_TEXT, ///< raw UTF-8 text CODEC_ID_XSUB, @@ -347,13 +410,16 @@ CODEC_ID_SRT, /* other specific kind of codecs (generally used for attachments) */ - CODEC_ID_TTF= 0x18000, + CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs. + CODEC_ID_TTF = 0x18000, - CODEC_ID_PROBE= 0x19000, ///< codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it + CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it - CODEC_ID_MPEG2TS= 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS + CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS + * stream (only used by libavformat) */ + CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems * stream (only used by libavformat) */ - CODEC_ID_FFMETADATA=0x21000, ///< Dummy codec for streams containing only metadata information. + CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information. }; #if FF_API_OLD_SAMPLE_FMT @@ -416,8 +482,10 @@ #define CH_LAYOUT_STEREO_DOWNMIX AV_CH_LAYOUT_STEREO_DOWNMIX #endif +#if FF_API_OLD_DECODE_AUDIO /* in bytes */ #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio +#endif /** * Required number of additionally allocated bytes at the end of the input bitstream for decoding. @@ -519,7 +587,7 @@ /** * LPC analysis type */ -attribute_deprecated enum AVLPCType { +enum AVLPCType { AV_LPC_TYPE_DEFAULT = -1, ///< use the codec default LPC type AV_LPC_TYPE_NONE = 0, ///< do not use LPC prediction or use all zero coefficients AV_LPC_TYPE_FIXED = 1, ///< fixed LPC coefficients @@ -561,7 +629,6 @@ #define CODEC_FLAG_QPEL 0x0010 ///< Use qpel MC. #define CODEC_FLAG_GMC 0x0020 ///< Use GMC. #define CODEC_FLAG_MV0 0x0040 ///< Always try a MB with MV=<0,0>. -#define CODEC_FLAG_PART 0x0080 ///< Use data partitioning. /** * The parent program guarantees that the input for B-frames containing * streams is not written to for at least s->max_b_frames+1 frames, if @@ -570,7 +637,6 @@ #define CODEC_FLAG_INPUT_PRESERVED 0x0100 #define CODEC_FLAG_PASS1 0x0200 ///< Use internal 2pass ratecontrol in first pass mode. #define CODEC_FLAG_PASS2 0x0400 ///< Use internal 2pass ratecontrol in second pass mode. -#define CODEC_FLAG_EXTERN_HUFF 0x1000 ///< Use external Huffman table (for MJPEG). #define CODEC_FLAG_GRAY 0x2000 ///< Only decode/encode grayscale. #define CODEC_FLAG_EMU_EDGE 0x4000 ///< Don't draw edges. #define CODEC_FLAG_PSNR 0x8000 ///< error[?] variables will be set during encoding. @@ -579,25 +645,42 @@ #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 ///< Normalize adaptive quantization. #define CODEC_FLAG_INTERLACED_DCT 0x00040000 ///< Use interlaced DCT. #define CODEC_FLAG_LOW_DELAY 0x00080000 ///< Force low delay. -#define CODEC_FLAG_ALT_SCAN 0x00100000 ///< Use alternate scan. #define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< Place global headers in extradata instead of every keyframe. #define CODEC_FLAG_BITEXACT 0x00800000 ///< Use only bitexact stuff (except (I)DCT). /* Fx : Flag for h263+ extra options */ #define CODEC_FLAG_AC_PRED 0x01000000 ///< H.263 advanced intra coding / MPEG-4 AC prediction -#define CODEC_FLAG_H263P_UMV 0x02000000 ///< unlimited motion vector #define CODEC_FLAG_CBP_RD 0x04000000 ///< Use rate distortion optimization for cbp. #define CODEC_FLAG_QP_RD 0x08000000 ///< Use rate distortion optimization for qp selectioon. -#define CODEC_FLAG_H263P_AIV 0x00000008 ///< H.263 alternative inter VLC -#define CODEC_FLAG_OBMC 0x00000001 ///< OBMC #define CODEC_FLAG_LOOP_FILTER 0x00000800 ///< loop filter -#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000 #define CODEC_FLAG_INTERLACED_ME 0x20000000 ///< interlaced motion estimation -#define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000 ///< Will reserve space for SVCD scan offset user data. #define CODEC_FLAG_CLOSED_GOP 0x80000000 #define CODEC_FLAG2_FAST 0x00000001 ///< Allow non spec compliant speedup tricks. #define CODEC_FLAG2_STRICT_GOP 0x00000002 ///< Strictly enforce GOP size. #define CODEC_FLAG2_NO_OUTPUT 0x00000004 ///< Skip bitstream encoding. #define CODEC_FLAG2_LOCAL_HEADER 0x00000008 ///< Place global headers at every keyframe instead of in extradata. +#define CODEC_FLAG2_SKIP_RD 0x00004000 ///< RD optimal MB level residual skipping +#define CODEC_FLAG2_CHUNKS 0x00008000 ///< Input bitstream might be truncated at a packet boundaries instead of only at frame boundaries. +/** + * @defgroup deprecated_flags Deprecated codec flags + * Use corresponding private codec options instead. + * @{ + */ +#if FF_API_MPEGVIDEO_GLOBAL_OPTS +#define CODEC_FLAG_OBMC 0x00000001 ///< OBMC +#define CODEC_FLAG_H263P_AIV 0x00000008 ///< H.263 alternative inter VLC +#define CODEC_FLAG_PART 0x0080 ///< Use data partitioning. +#define CODEC_FLAG_ALT_SCAN 0x00100000 ///< Use alternate scan. +#define CODEC_FLAG_H263P_UMV 0x02000000 ///< unlimited motion vector +#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000 +#define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000 ///< Will reserve space for SVCD scan offset user data. +#define CODEC_FLAG2_INTRA_VLC 0x00000800 ///< Use MPEG-2 intra VLC table. +#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 ///< timecode is in drop frame format. +#define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000 ///< Use MPEG-2 nonlinear quantizer. +#endif +#if FF_API_MJPEG_GLOBAL_OPTS +#define CODEC_FLAG_EXTERN_HUFF 0x1000 ///< Use external Huffman table (for MJPEG). +#endif +#if FF_API_X264_GLOBAL_OPTS #define CODEC_FLAG2_BPYRAMID 0x00000010 ///< H.264 allow B-frames to be used as references. #define CODEC_FLAG2_WPRED 0x00000020 ///< H.264 weighted biprediction for B-frames #define CODEC_FLAG2_MIXED_REFS 0x00000040 ///< H.264 one reference per partition, as opposed to one reference per macroblock @@ -605,17 +688,20 @@ #define CODEC_FLAG2_FASTPSKIP 0x00000100 ///< H.264 fast pskip #define CODEC_FLAG2_AUD 0x00000200 ///< H.264 access unit delimiters #define CODEC_FLAG2_BRDO 0x00000400 ///< B-frame rate-distortion optimization -#define CODEC_FLAG2_INTRA_VLC 0x00000800 ///< Use MPEG-2 intra VLC table. -#define CODEC_FLAG2_MEMC_ONLY 0x00001000 ///< Only do ME/MC (I frames -> ref, P frame -> ME+MC). -#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 ///< timecode is in drop frame format. -#define CODEC_FLAG2_SKIP_RD 0x00004000 ///< RD optimal MB level residual skipping -#define CODEC_FLAG2_CHUNKS 0x00008000 ///< Input bitstream might be truncated at a packet boundaries instead of only at frame boundaries. -#define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000 ///< Use MPEG-2 nonlinear quantizer. -#define CODEC_FLAG2_BIT_RESERVOIR 0x00020000 ///< Use a bit reservoir when encoding if possible #define CODEC_FLAG2_MBTREE 0x00040000 ///< Use macroblock tree ratecontrol (x264 only) #define CODEC_FLAG2_PSY 0x00080000 ///< Use psycho visual optimizations. #define CODEC_FLAG2_SSIM 0x00100000 ///< Compute SSIM during encoding, error[] values are undefined. #define CODEC_FLAG2_INTRA_REFRESH 0x00200000 ///< Use periodic insertion of intra blocks instead of keyframes. +#endif +#if FF_API_SNOW_GLOBAL_OPTS +#define CODEC_FLAG2_MEMC_ONLY 0x00001000 ///< Only do ME/MC (I frames -> ref, P frame -> ME+MC). +#endif +#if FF_API_LAME_GLOBAL_OPTS +#define CODEC_FLAG2_BIT_RESERVOIR 0x00020000 ///< Use a bit reservoir when encoding if possible +#endif +/** + * @} + */ /* Unsupported options : * Syntax Arithmetic coding (SAC) @@ -631,14 +717,30 @@ * assume the buffer was allocated by avcodec_default_get_buffer. */ #define CODEC_CAP_DR1 0x0002 +#if FF_API_PARSE_FRAME /* If 'parse_only' field is true, then avcodec_parse_frame() can be used. */ #define CODEC_CAP_PARSE_ONLY 0x0004 +#endif #define CODEC_CAP_TRUNCATED 0x0008 /* Codec can export data for HW decoding (XvMC). */ #define CODEC_CAP_HWACCEL 0x0010 /** - * Codec has a nonzero delay and needs to be fed with NULL at the end to get the delayed data. - * If this is not set, the codec is guaranteed to never be fed with NULL data. + * Encoder or decoder requires flushing with NULL input at the end in order to + * give the complete and correct output. + * + * NOTE: If this flag is not set, the codec is guaranteed to never be fed with + * with NULL data. The user can still send NULL data to the public encode + * or decode function, but libavcodec will not pass it along to the codec + * unless this flag is set. + * + * Decoders: + * The decoder has a non-zero delay and needs to be fed with avpkt->data=NULL, + * avpkt->size=0 at the end to get the delayed data until the decoder no longer + * returns frames. + * + * Encoders: + * The encoder needs to be fed with NULL data at the end of encoding until the + * encoder no longer returns data. */ #define CODEC_CAP_DELAY 0x0020 /** @@ -683,6 +785,14 @@ * Codec supports slice-based (or partition-based) multithreading. */ #define CODEC_CAP_SLICE_THREADS 0x2000 +/** + * Codec supports changed parameters at any point. + */ +#define CODEC_CAP_PARAM_CHANGE 0x4000 +/** + * Codec supports avctx->thread_count == 0 (auto). + */ +#define CODEC_CAP_AUTO_THREADS 0x8000 //The following defines may change, don't expect compatibility if you use them. #define MB_TYPE_INTRA4x4 0x0001 @@ -737,266 +847,6 @@ int16_t position[3][2]; }AVPanScan; -#define FF_COMMON_FRAME \ - /**\ - * pointer to the picture planes.\ - * This might be different from the first allocated byte\ - * - encoding: \ - * - decoding: \ - */\ - uint8_t *data[4];\ - int linesize[4];\ - /**\ - * pointer to the first allocated byte of the picture. Can be used in get_buffer/release_buffer.\ - * This isn't used by libavcodec unless the default get/release_buffer() is used.\ - * - encoding: \ - * - decoding: \ - */\ - uint8_t *base[4];\ - /**\ - * 1 -> keyframe, 0-> not\ - * - encoding: Set by libavcodec.\ - * - decoding: Set by libavcodec.\ - */\ - int key_frame;\ -\ - /**\ - * Picture type of the frame, see ?_TYPE below.\ - * - encoding: Set by libavcodec. for coded_picture (and set by user for input).\ - * - decoding: Set by libavcodec.\ - */\ - enum AVPictureType pict_type;\ -\ - /**\ - * presentation timestamp in time_base units (time when frame should be shown to user)\ - * If AV_NOPTS_VALUE then frame_rate = 1/time_base will be assumed.\ - * - encoding: MUST be set by user.\ - * - decoding: Set by libavcodec.\ - */\ - int64_t pts;\ -\ - /**\ - * picture number in bitstream order\ - * - encoding: set by\ - * - decoding: Set by libavcodec.\ - */\ - int coded_picture_number;\ - /**\ - * picture number in display order\ - * - encoding: set by\ - * - decoding: Set by libavcodec.\ - */\ - int display_picture_number;\ -\ - /**\ - * quality (between 1 (good) and FF_LAMBDA_MAX (bad)) \ - * - encoding: Set by libavcodec. for coded_picture (and set by user for input).\ - * - decoding: Set by libavcodec.\ - */\ - int quality; \ -\ - /**\ - * buffer age (1->was last buffer and dint change, 2->..., ...).\ - * Set to INT_MAX if the buffer has not been used yet.\ - * - encoding: unused\ - * - decoding: MUST be set by get_buffer().\ - */\ - int age;\ -\ - /**\ - * is this picture used as reference\ - * The values for this are the same as the MpegEncContext.picture_structure\ - * variable, that is 1->top field, 2->bottom field, 3->frame/both fields.\ - * Set to 4 for delayed, non-reference frames.\ - * - encoding: unused\ - * - decoding: Set by libavcodec. (before get_buffer() call)).\ - */\ - int reference;\ -\ - /**\ - * QP table\ - * - encoding: unused\ - * - decoding: Set by libavcodec.\ - */\ - int8_t *qscale_table;\ - /**\ - * QP store stride\ - * - encoding: unused\ - * - decoding: Set by libavcodec.\ - */\ - int qstride;\ -\ - /**\ - * mbskip_table[mb]>=1 if MB didn't change\ - * stride= mb_width = (width+15)>>4\ - * - encoding: unused\ - * - decoding: Set by libavcodec.\ - */\ - uint8_t *mbskip_table;\ -\ - /**\ - * motion vector table\ - * @code\ - * example:\ - * int mv_sample_log2= 4 - motion_subsample_log2;\ - * int mb_width= (width+15)>>4;\ - * int mv_stride= (mb_width << mv_sample_log2) + 1;\ - * motion_val[direction][x + y*mv_stride][0->mv_x, 1->mv_y];\ - * @endcode\ - * - encoding: Set by user.\ - * - decoding: Set by libavcodec.\ - */\ - int16_t (*motion_val[2])[2];\ -\ - /**\ - * macroblock type table\ - * mb_type_base + mb_width + 2\ - * - encoding: Set by user.\ - * - decoding: Set by libavcodec.\ - */\ - uint32_t *mb_type;\ -\ - /**\ - * log2 of the size of the block which a single vector in motion_val represents: \ - * (4->16x16, 3->8x8, 2-> 4x4, 1-> 2x2)\ - * - encoding: unused\ - * - decoding: Set by libavcodec.\ - */\ - uint8_t motion_subsample_log2;\ -\ - /**\ - * for some private data of the user\ - * - encoding: unused\ - * - decoding: Set by user.\ - */\ - void *opaque;\ -\ - /**\ - * error\ - * - encoding: Set by libavcodec. if flags&CODEC_FLAG_PSNR.\ - * - decoding: unused\ - */\ - uint64_t error[4];\ -\ - /**\ - * type of the buffer (to keep track of who has to deallocate data[*])\ - * - encoding: Set by the one who allocates it.\ - * - decoding: Set by the one who allocates it.\ - * Note: User allocated (direct rendering) & internal buffers cannot coexist currently.\ - */\ - int type;\ - \ - /**\ - * When decoding, this signals how much the picture must be delayed.\ - * extra_delay = repeat_pict / (2*fps)\ - * - encoding: unused\ - * - decoding: Set by libavcodec.\ - */\ - int repeat_pict;\ - \ - /**\ - * \ - */\ - int qscale_type;\ - \ - /**\ - * The content of the picture is interlaced.\ - * - encoding: Set by user.\ - * - decoding: Set by libavcodec. (default 0)\ - */\ - int interlaced_frame;\ - \ - /**\ - * If the content is interlaced, is top field displayed first.\ - * - encoding: Set by user.\ - * - decoding: Set by libavcodec.\ - */\ - int top_field_first;\ - \ - /**\ - * Pan scan.\ - * - encoding: Set by user.\ - * - decoding: Set by libavcodec.\ - */\ - AVPanScan *pan_scan;\ - \ - /**\ - * Tell user application that palette has changed from previous frame.\ - * - encoding: ??? (no palette-enabled encoder yet)\ - * - decoding: Set by libavcodec. (default 0).\ - */\ - int palette_has_changed;\ - \ - /**\ - * codec suggestion on buffer type if != 0\ - * - encoding: unused\ - * - decoding: Set by libavcodec. (before get_buffer() call)).\ - */\ - int buffer_hints;\ -\ - /**\ - * DCT coefficients\ - * - encoding: unused\ - * - decoding: Set by libavcodec.\ - */\ - short *dct_coeff;\ -\ - /**\ - * motion reference frame index\ - * the order in which these are stored can depend on the codec.\ - * - encoding: Set by user.\ - * - decoding: Set by libavcodec.\ - */\ - int8_t *ref_index[2];\ -\ - /**\ - * reordered opaque 64bit (generally an integer or a double precision float\ - * PTS but can be anything). \ - * The user sets AVCodecContext.reordered_opaque to represent the input at\ - * that time,\ - * the decoder reorders values as needed and sets AVFrame.reordered_opaque\ - * to exactly one of the values provided by the user through AVCodecContext.reordered_opaque \ - * @deprecated in favor of pkt_pts\ - * - encoding: unused\ - * - decoding: Read by user.\ - */\ - int64_t reordered_opaque;\ -\ - /**\ - * hardware accelerator private data (Libav-allocated)\ - * - encoding: unused\ - * - decoding: Set by libavcodec\ - */\ - void *hwaccel_picture_private;\ -\ - /**\ - * reordered pts from the last AVPacket that has been input into the decoder\ - * - encoding: unused\ - * - decoding: Read by user.\ - */\ - int64_t pkt_pts;\ -\ - /**\ - * dts from the last AVPacket that has been input into the decoder\ - * - encoding: unused\ - * - decoding: Read by user.\ - */\ - int64_t pkt_dts;\ -\ - /**\ - * the AVCodecContext which ff_thread_get_buffer() was last called on\ - * - encoding: Set by libavcodec.\ - * - decoding: Set by libavcodec.\ - */\ - struct AVCodecContext *owner;\ -\ - /**\ - * used by multithreading to store frame-specific info\ - * - encoding: Set by libavcodec.\ - * - decoding: Set by libavcodec.\ - */\ - void *thread_opaque;\ - #define FF_QSCALE_TYPE_MPEG1 0 #define FF_QSCALE_TYPE_MPEG2 1 #define FF_QSCALE_TYPE_H264 2 @@ -1025,6 +875,8 @@ enum AVPacketSideDataType { AV_PKT_DATA_PALETTE, + AV_PKT_DATA_NEW_EXTRADATA, + AV_PKT_DATA_PARAM_CHANGE, }; typedef struct AVPacket { @@ -1047,6 +899,9 @@ uint8_t *data; int size; int stream_index; + /** + * A combination of AV_PKT_FLAG values + */ int flags; /** * Additional packet data that can be provided by the container. @@ -1087,21 +942,374 @@ */ int64_t convergence_duration; } AVPacket; -#define AV_PKT_FLAG_KEY 0x0001 +#define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe +#define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted + +/** + * An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows: + * u32le param_flags + * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) + * s32le channel_count + * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT) + * u64le channel_layout + * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE) + * s32le sample_rate + * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS) + * s32le width + * s32le height + */ + +enum AVSideDataParamChangeFlags { + AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001, + AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002, + AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004, + AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008, +}; /** * Audio Video Frame. - * New fields can be added to the end of FF_COMMON_FRAME with minor version - * bumps. - * Removal, reordering and changes to existing fields require a major - * version bump. No fields should be added into AVFrame before or after - * FF_COMMON_FRAME! + * New fields can be added to the end of AVFRAME with minor version + * bumps. Removal, reordering and changes to existing fields require + * a major version bump. * sizeof(AVFrame) must not be used outside libav*. */ typedef struct AVFrame { - FF_COMMON_FRAME +#if FF_API_DATA_POINTERS +#define AV_NUM_DATA_POINTERS 4 +#else +#define AV_NUM_DATA_POINTERS 8 +#endif + /** + * pointer to the picture/channel planes. + * This might be different from the first allocated byte + * - encoding: Set by user + * - decoding: set by AVCodecContext.get_buffer() + */ + uint8_t *data[AV_NUM_DATA_POINTERS]; + + /** + * Size, in bytes, of the data for each picture/channel plane. + * + * For audio, only linesize[0] may be set. For planar audio, each channel + * plane must be the same size. + * + * - encoding: Set by user (video only) + * - decoding: set by AVCodecContext.get_buffer() + */ + int linesize[AV_NUM_DATA_POINTERS]; + + /** + * pointer to the first allocated byte of the picture. Can be used in get_buffer/release_buffer. + * This isn't used by libavcodec unless the default get/release_buffer() is used. + * - encoding: + * - decoding: + */ + uint8_t *base[AV_NUM_DATA_POINTERS]; + /** + * 1 -> keyframe, 0-> not + * - encoding: Set by libavcodec. + * - decoding: Set by libavcodec. + */ + int key_frame; + + /** + * Picture type of the frame, see ?_TYPE below. + * - encoding: Set by libavcodec. for coded_picture (and set by user for input). + * - decoding: Set by libavcodec. + */ + enum AVPictureType pict_type; + + /** + * presentation timestamp in time_base units (time when frame should be shown to user) + * If AV_NOPTS_VALUE then frame_rate = 1/time_base will be assumed. + * - encoding: MUST be set by user. + * - decoding: Set by libavcodec. + */ + int64_t pts; + + /** + * picture number in bitstream order + * - encoding: set by + * - decoding: Set by libavcodec. + */ + int coded_picture_number; + /** + * picture number in display order + * - encoding: set by + * - decoding: Set by libavcodec. + */ + int display_picture_number; + + /** + * quality (between 1 (good) and FF_LAMBDA_MAX (bad)) + * - encoding: Set by libavcodec. for coded_picture (and set by user for input). + * - decoding: Set by libavcodec. + */ + int quality; + +#if FF_API_AVFRAME_AGE + /** + * @deprecated unused + */ + attribute_deprecated int age; +#endif + + /** + * is this picture used as reference + * The values for this are the same as the MpegEncContext.picture_structure + * variable, that is 1->top field, 2->bottom field, 3->frame/both fields. + * Set to 4 for delayed, non-reference frames. + * - encoding: unused + * - decoding: Set by libavcodec. (before get_buffer() call)). + */ + int reference; + + /** + * QP table + * - encoding: unused + * - decoding: Set by libavcodec. + */ + int8_t *qscale_table; + /** + * QP store stride + * - encoding: unused + * - decoding: Set by libavcodec. + */ + int qstride; + + /** + * mbskip_table[mb]>=1 if MB didn't change + * stride= mb_width = (width+15)>>4 + * - encoding: unused + * - decoding: Set by libavcodec. + */ + uint8_t *mbskip_table; + + /** + * motion vector table + * @code + * example: + * int mv_sample_log2= 4 - motion_subsample_log2; + * int mb_width= (width+15)>>4; + * int mv_stride= (mb_width << mv_sample_log2) + 1; + * motion_val[direction][x + y*mv_stride][0->mv_x, 1->mv_y]; + * @endcode + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + int16_t (*motion_val[2])[2]; + + /** + * macroblock type table + * mb_type_base + mb_width + 2 + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + uint32_t *mb_type; + + /** + * log2 of the size of the block which a single vector in motion_val represents: + * (4->16x16, 3->8x8, 2-> 4x4, 1-> 2x2) + * - encoding: unused + * - decoding: Set by libavcodec. + */ + uint8_t motion_subsample_log2; + + /** + * for some private data of the user + * - encoding: unused + * - decoding: Set by user. + */ + void *opaque; + + /** + * error + * - encoding: Set by libavcodec. if flags&CODEC_FLAG_PSNR. + * - decoding: unused + */ + uint64_t error[AV_NUM_DATA_POINTERS]; + + /** + * type of the buffer (to keep track of who has to deallocate data[*]) + * - encoding: Set by the one who allocates it. + * - decoding: Set by the one who allocates it. + * Note: User allocated (direct rendering) & internal buffers cannot coexist currently. + */ + int type; + + /** + * When decoding, this signals how much the picture must be delayed. + * extra_delay = repeat_pict / (2*fps) + * - encoding: unused + * - decoding: Set by libavcodec. + */ + int repeat_pict; + + /** + * + */ + int qscale_type; + + /** + * The content of the picture is interlaced. + * - encoding: Set by user. + * - decoding: Set by libavcodec. (default 0) + */ + int interlaced_frame; + + /** + * If the content is interlaced, is top field displayed first. + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + int top_field_first; + + /** + * Pan scan. + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + AVPanScan *pan_scan; + + /** + * Tell user application that palette has changed from previous frame. + * - encoding: ??? (no palette-enabled encoder yet) + * - decoding: Set by libavcodec. (default 0). + */ + int palette_has_changed; + + /** + * codec suggestion on buffer type if != 0 + * - encoding: unused + * - decoding: Set by libavcodec. (before get_buffer() call)). + */ + int buffer_hints; + + /** + * DCT coefficients + * - encoding: unused + * - decoding: Set by libavcodec. + */ + short *dct_coeff; + + /** + * motion reference frame index + * the order in which these are stored can depend on the codec. + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + int8_t *ref_index[2]; + + /** + * reordered opaque 64bit (generally an integer or a double precision float + * PTS but can be anything). + * The user sets AVCodecContext.reordered_opaque to represent the input at + * that time, + * the decoder reorders values as needed and sets AVFrame.reordered_opaque + * to exactly one of the values provided by the user through AVCodecContext.reordered_opaque + * @deprecated in favor of pkt_pts + * - encoding: unused + * - decoding: Read by user. + */ + int64_t reordered_opaque; + + /** + * hardware accelerator private data (Libav-allocated) + * - encoding: unused + * - decoding: Set by libavcodec + */ + void *hwaccel_picture_private; + + /** + * reordered pts from the last AVPacket that has been input into the decoder + * - encoding: unused + * - decoding: Read by user. + */ + int64_t pkt_pts; + + /** + * dts from the last AVPacket that has been input into the decoder + * - encoding: unused + * - decoding: Read by user. + */ + int64_t pkt_dts; + + /** + * the AVCodecContext which ff_thread_get_buffer() was last called on + * - encoding: Set by libavcodec. + * - decoding: Set by libavcodec. + */ + struct AVCodecContext *owner; + + /** + * used by multithreading to store frame-specific info + * - encoding: Set by libavcodec. + * - decoding: Set by libavcodec. + */ + void *thread_opaque; + + /** + * number of audio samples (per channel) described by this frame + * - encoding: unused + * - decoding: Set by libavcodec + */ + int nb_samples; + + /** + * pointers to the data planes/channels. + * + * For video, this should simply point to data[]. + * + * For planar audio, each channel has a separate data pointer, and + * linesize[0] contains the size of each channel buffer. + * For packed audio, there is just one data pointer, and linesize[0] + * contains the total size of the buffer for all channels. + * + * Note: Both data and extended_data will always be set by get_buffer(), + * but for planar audio with more channels that can fit in data, + * extended_data must be used by the decoder in order to access all + * channels. + * + * encoding: unused + * decoding: set by AVCodecContext.get_buffer() + */ + uint8_t **extended_data; + + /** + * sample aspect ratio for the video frame, 0/1 if unknown\unspecified + * - encoding: unused + * - decoding: Read by user. + */ + AVRational sample_aspect_ratio; + + /** + * width and height of the video frame + * - encoding: unused + * - decoding: Read by user. + */ + int width, height; + + /** + * format of the frame, -1 if unknown or unset + * Values correspond to enum PixelFormat for video frames, + * enum AVSampleFormat for audio) + * - encoding: unused + * - decoding: Read by user. + */ + int format; } AVFrame; +struct AVCodecInternal; + +enum AVFieldOrder { + AV_FIELD_UNKNOWN, + AV_FIELD_PROGRESSIVE, + AV_FIELD_TT, //< Top coded_first, top displayed first + AV_FIELD_BB, //< Bottom coded first, bottom displayed first + AV_FIELD_TB, //< Top coded first, bottom displayed first + AV_FIELD_BT, //< Bottom coded first, top displayed first +}; + /** * main external API structure. * New fields can be added to the end with minor version bumps. @@ -1112,7 +1320,7 @@ typedef struct AVCodecContext { /** * information on struct for av_log - * - set by avcodec_alloc_context + * - set by avcodec_alloc_context3 */ const AVClass *av_class; /** @@ -1141,7 +1349,7 @@ * Some codecs need additional format info. It is stored here. * If any muxer uses this then ALL demuxers/parsers AND encoders for the * specific codec MUST set it correctly otherwise stream copy breaks. - * In general use of this field by muxers is not recommanded. + * In general use of this field by muxers is not recommended. * - encoding: Set by libavcodec. * - decoding: Set by libavcodec. (FIXME: Is this OK?) */ @@ -1232,7 +1440,7 @@ * @param offset offset into the AVFrame.data from which the slice should be read */ void (*draw_horiz_band)(struct AVCodecContext *s, - const AVFrame *src, int offset[4], + const AVFrame *src, int offset[AV_NUM_DATA_POINTERS], int y, int type, int height); /* audio only */ @@ -1363,7 +1571,7 @@ * A demuxer should set this to what is stored in the field used to identify the codec. * If there are multiple such fields in a container then the demuxer should choose the one * which maximizes the information about the used codec. - * If the codec tag field in a container is larger then 32 bits then the demuxer should + * If the codec tag field in a container is larger than 32 bits then the demuxer should * remap the longer ID to 32 bits with a table or other structure. Alternatively a new * extra_codec_tag + size could be added but for this a clear advantage must be demonstrated * first. @@ -1436,29 +1644,73 @@ */ float b_quant_offset; +#if FF_API_ER /** - * Error recognization; higher values will detect more errors but may + * Error recognition; higher values will detect more errors but may * misdetect some more or less valid parts as errors. * - encoding: unused * - decoding: Set by user. */ - int error_recognition; + attribute_deprecated int error_recognition; #define FF_ER_CAREFUL 1 #define FF_ER_COMPLIANT 2 #define FF_ER_AGGRESSIVE 3 #define FF_ER_VERY_AGGRESSIVE 4 +#define FF_ER_EXPLODE 5 +#endif /* FF_API_ER */ /** * Called at the beginning of each frame to get a buffer for it. - * If pic.reference is set then the frame will be read later by libavcodec. - * avcodec_align_dimensions2() should be used to find the required width and - * height, as they normally need to be rounded up to the next multiple of 16. + * + * The function will set AVFrame.data[], AVFrame.linesize[]. + * AVFrame.extended_data[] must also be set, but it should be the same as + * AVFrame.data[] except for planar audio with more channels than can fit + * in AVFrame.data[]. In that case, AVFrame.data[] shall still contain as + * many data pointers as it can hold. + * * if CODEC_CAP_DR1 is not set then get_buffer() must call * avcodec_default_get_buffer() instead of providing buffers allocated by * some other means. + * + * AVFrame.data[] should be 32- or 16-byte-aligned unless the CPU doesn't + * need it. avcodec_default_get_buffer() aligns the output buffer properly, + * but if get_buffer() is overridden then alignment considerations should + * be taken into account. + * + * @see avcodec_default_get_buffer() + * + * Video: + * + * If pic.reference is set then the frame will be read later by libavcodec. + * avcodec_align_dimensions2() should be used to find the required width and + * height, as they normally need to be rounded up to the next multiple of 16. + * * If frame multithreading is used and thread_safe_callbacks is set, - * it may be called from a different thread, but not from more than one at once. - * Does not need to be reentrant. + * it may be called from a different thread, but not from more than one at + * once. Does not need to be reentrant. + * + * @see release_buffer(), reget_buffer() + * @see avcodec_align_dimensions2() + * + * Audio: + * + * Decoders request a buffer of a particular size by setting + * AVFrame.nb_samples prior to calling get_buffer(). The decoder may, + * however, utilize only part of the buffer by setting AVFrame.nb_samples + * to a smaller value in the output frame. + * + * Decoders cannot use the buffer after returning from + * avcodec_decode_audio4(), so they will not call release_buffer(), as it + * is assumed to be released immediately upon return. + * + * As a convenience, av_samples_get_buffer_size() and + * av_samples_fill_arrays() in libavutil may be used by custom get_buffer() + * functions to find the required data size and to fill data pointers and + * linesize. In AVFrame.linesize, only linesize[0] may be set for audio + * since all planes must be the same size. + * + * @see av_samples_get_buffer_size(), av_samples_fill_arrays() + * * - encoding: unused * - decoding: Set by libavcodec, user can override. */ @@ -1489,9 +1741,15 @@ */ int block_align; - int parse_only; /* - decoding only: If true, only parsing is done - (function avcodec_parse_frame()). The frame - data is returned. Only MPEG codecs support this now. */ +#if FF_API_PARSE_FRAME + /** + * If true, only parsing is done. The frame data is returned. + * Only MPEG audio decoders support this now. + * - encoding: unused + * - decoding: Set by user + */ + attribute_deprecated int parse_only; +#endif /** * 0-> h263 quant 1-> mpeg quant @@ -1771,7 +2029,7 @@ * - encoding: Set by libavcodec if flags&CODEC_FLAG_PSNR. * - decoding: unused */ - uint64_t error[4]; + uint64_t error[AV_NUM_DATA_POINTERS]; /** * motion estimation comparison function @@ -1916,17 +2174,21 @@ */ int color_table_id; +#if FF_API_INTERNAL_CONTEXT /** * internal_buffer count * Don't touch, used by libavcodec default_get_buffer(). + * @deprecated this field was moved to an internal context */ - int internal_buffer_count; + attribute_deprecated int internal_buffer_count; /** * internal_buffers * Don't touch, used by libavcodec default_get_buffer(). + * @deprecated this field was moved to an internal context */ - void *internal_buffer; + attribute_deprecated void *internal_buffer; +#endif /** * Global quality for codecs which cannot change it per frame. @@ -2232,6 +2494,23 @@ #define FF_PROFILE_VC1_COMPLEX 2 #define FF_PROFILE_VC1_ADVANCED 3 +#define FF_PROFILE_MPEG4_SIMPLE 0 +#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1 +#define FF_PROFILE_MPEG4_CORE 2 +#define FF_PROFILE_MPEG4_MAIN 3 +#define FF_PROFILE_MPEG4_N_BIT 4 +#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5 +#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6 +#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7 +#define FF_PROFILE_MPEG4_HYBRID 8 +#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9 +#define FF_PROFILE_MPEG4_CORE_SCALABLE 10 +#define FF_PROFILE_MPEG4_ADVANCED_CODING 11 +#define FF_PROFILE_MPEG4_ADVANCED_CORE 12 +#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13 +#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14 +#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15 + /** * level * - encoding: Set by user. @@ -2248,8 +2527,7 @@ int lowres; /** - * Bitstream width / height, may be different from width/height if lowres - * or other things are used. + * Bitstream width / height, may be different from width/height if lowres enabled. * - encoding: unused * - decoding: Set by user before init if known. Codec should override / dynamically change if needed. */ @@ -2347,19 +2625,23 @@ */ int brd_scale; +#if FF_API_X264_GLOBAL_OPTS /** * constant rate factor - quality-based VBR - values ~correspond to qps * - encoding: Set by user. * - decoding: unused + * @deprecated use 'crf' libx264 private option */ - float crf; + attribute_deprecated float crf; /** * constant quantization parameter rate control method * - encoding: Set by user. * - decoding: unused + * @deprecated use 'cqp' libx264 private option */ - int cqp; + attribute_deprecated int cqp; +#endif /** * minimum GOP size @@ -2382,12 +2664,14 @@ */ int chromaoffset; +#if FF_API_X264_GLOBAL_OPTS /** - * Influences how often B-frames are used. + * Influence how often B-frames are used. * - encoding: Set by user. * - decoding: unused */ - int bframebias; + attribute_deprecated int bframebias; +#endif /** * trellis RD quantization @@ -2396,12 +2680,13 @@ */ int trellis; +#if FF_API_X264_GLOBAL_OPTS /** * Reduce fluctuations in qp (before curve compression). * - encoding: Set by user. * - decoding: unused */ - float complexityblur; + attribute_deprecated float complexityblur; /** * in-loop deblocking filter alphac0 parameter @@ -2409,7 +2694,7 @@ * - encoding: Set by user. * - decoding: unused */ - int deblockalpha; + attribute_deprecated int deblockalpha; /** * in-loop deblocking filter beta parameter @@ -2417,14 +2702,14 @@ * - encoding: Set by user. * - decoding: unused */ - int deblockbeta; + attribute_deprecated int deblockbeta; /** * macroblock subpartition sizes to consider - p8x8, p4x4, b8x8, i8x8, i4x4 * - encoding: Set by user. * - decoding: unused */ - int partitions; + attribute_deprecated int partitions; #define X264_PART_I4X4 0x001 /* Analyze i4x4 */ #define X264_PART_I8X8 0x002 /* Analyze i8x8 (requires 8x8 transform) */ #define X264_PART_P8X8 0x010 /* Analyze p16x8, p8x16 and p8x8 */ @@ -2436,7 +2721,8 @@ * - encoding: Set by user. * - decoding: unused */ - int directpred; + attribute_deprecated int directpred; +#endif /** * Audio cutoff bandwidth (0 means "automatic") @@ -2461,7 +2747,7 @@ int mv0_threshold; /** - * Adjusts sensitivity of b_frame_strategy 1. + * Adjust sensitivity of b_frame_strategy 1. * - encoding: Set by user. * - decoding: unused */ @@ -2488,7 +2774,7 @@ #if FF_API_FLAC_GLOBAL_OPTS /** - * @defgroup flac_opts FLAC options + * @name FLAC options * @deprecated Use FLAC encoder private options instead. * @{ */ @@ -2540,13 +2826,16 @@ int request_channels; #endif +#if FF_API_DRC_SCALE /** * Percentage of dynamic range compression to be applied by the decoder. * The default value is 1.0, corresponding to full compression. * - encoding: unused * - decoding: Set by user. + * @deprecated use AC3 decoder private option instead. */ - float drc_scale; + attribute_deprecated float drc_scale; +#endif /** * opaque 64bit number (generally a PTS) that will be reordered and @@ -2559,7 +2848,6 @@ /** * Bits per sample/pixel of internal libavcodec pixel/sample format. - * This field is applicable only when sample_fmt is AV_SAMPLE_FMT_S32. * - encoding: set by user. * - decoding: set by libavcodec. */ @@ -2570,14 +2858,14 @@ * - encoding: set by user. * - decoding: set by libavcodec. */ - int64_t channel_layout; + uint64_t channel_layout; /** * Request decoder to use this channel layout if it can (0 for default) * - encoding: unused * - decoding: Set by user. */ - int64_t request_channel_layout; + uint64_t request_channel_layout; /** * Ratecontrol attempt to use, at maximum, of what can be used without an underflow. @@ -2676,6 +2964,7 @@ */ int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count); +#if FF_API_X264_GLOBAL_OPTS /** * explicit P-frame weighted prediction analysis method * 0: off @@ -2684,7 +2973,7 @@ * - encoding: Set by user. * - decoding: unused */ - int weighted_p_pred; + attribute_deprecated int weighted_p_pred; /** * AQ mode @@ -2694,7 +2983,7 @@ * - encoding: Set by user * - decoding: unused */ - int aq_mode; + attribute_deprecated int aq_mode; /** * AQ strength @@ -2702,7 +2991,7 @@ * - encoding: Set by user * - decoding: unused */ - float aq_strength; + attribute_deprecated float aq_strength; /** * PSY RD @@ -2710,7 +2999,7 @@ * - encoding: Set by user * - decoding: unused */ - float psy_rd; + attribute_deprecated float psy_rd; /** * PSY trellis @@ -2718,7 +3007,7 @@ * - encoding: Set by user * - decoding: unused */ - float psy_trellis; + attribute_deprecated float psy_trellis; /** * RC lookahead @@ -2726,7 +3015,7 @@ * - encoding: Set by user * - decoding: unused */ - int rc_lookahead; + attribute_deprecated int rc_lookahead; /** * Constant rate factor maximum @@ -2735,13 +3024,14 @@ * - encoding: Set by user. * - decoding: unused */ - float crf_max; + attribute_deprecated float crf_max; +#endif int log_level_offset; #if FF_API_FLAC_GLOBAL_OPTS /** - * Determines which LPC analysis algorithm to use. + * Determine which LPC analysis algorithm to use. * - encoding: Set by user * - decoding: unused */ @@ -2769,8 +3059,8 @@ * For SUBTITLE_ASS subtitle type, it should contain the whole ASS * [Script Info] and [V4+ Styles] section, plus the [Events] line and * the Format line following. It shouldn't include any Dialogue line. - * - encoding: Set/allocated/freed by user (before avcodec_open()) - * - decoding: Set/allocated/freed by libavcodec (by avcodec_open()) + * - encoding: Set/allocated/freed by user (before avcodec_open2()) + * - decoding: Set/allocated/freed by libavcodec (by avcodec_open2()) */ uint8_t *subtitle_header; int subtitle_header_size; @@ -2784,14 +3074,18 @@ */ AVPacket *pkt; +#if FF_API_INTERNAL_CONTEXT /** * Whether this is a copy of the context which had init() called on it. * This is used by multithreading - shared tables and picture pointers * should be freed from the original context only. * - encoding: Set by libavcodec. * - decoding: Set by libavcodec. + * + * @deprecated this field has been moved to an internal context */ - int is_copy; + attribute_deprecated int is_copy; +#endif /** * Which multithreading methods to use. @@ -2802,8 +3096,8 @@ * - decoding: Set by user, otherwise the default is used. */ int thread_type; -#define FF_THREAD_FRAME 1 //< Decode more than one frame at once -#define FF_THREAD_SLICE 2 //< Decode more than one part of a single frame at once +#define FF_THREAD_FRAME 1 ///< Decode more than one frame at once +#define FF_THREAD_SLICE 2 ///< Decode more than one part of a single frame at once /** * Which multithreading methods are in use by the codec. @@ -2843,6 +3137,31 @@ * - decoding: Set by user. */ enum AVSampleFormat request_sample_fmt; + + /** + * Error recognition; may misdetect some more or less valid parts as errors. + * - encoding: unused + * - decoding: Set by user. + */ + int err_recognition; +#define AV_EF_CRCCHECK (1<<0) +#define AV_EF_BITSTREAM (1<<1) +#define AV_EF_BUFFER (1<<2) +#define AV_EF_EXPLODE (1<<3) + + /** + * Private context used for internal data. + * + * Unlike priv_data, this is not codec-specific. It is used in general + * libavcodec functions. + */ + struct AVCodecInternal *internal; + + /** Field order + * - encoding: set by libavcodec + * - decoding: Set by libavcodec + */ + enum AVFieldOrder field_order; } AVCodecContext; /** @@ -2853,6 +3172,8 @@ const char *name; ///< short name for the profile } AVProfile; +typedef struct AVCodecDefault AVCodecDefault; + /** * AVCodec. */ @@ -2891,13 +3212,13 @@ const char *long_name; const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0 const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1 - const int64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0 + const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0 uint8_t max_lowres; ///< maximum value for lowres supported by the decoder const AVClass *priv_class; ///< AVClass for the private context const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} /** - * @defgroup framethreading Frame-level threading support functions. + * @name Frame-level threading support functions * @{ */ /** @@ -2915,6 +3236,16 @@ */ int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src); /** @} */ + + /** + * Private codec-specific defaults. + */ + const AVCodecDefault *defaults; + + /** + * Initialize codec static data, called from avcodec_register(). + */ + void (*init_static_data)(struct AVCodec *codec); } AVCodec; /** @@ -3012,10 +3343,12 @@ * the last component is alpha */ typedef struct AVPicture { - uint8_t *data[4]; - int linesize[4]; ///< number of bytes per line + uint8_t *data[AV_NUM_DATA_POINTERS]; + int linesize[AV_NUM_DATA_POINTERS]; ///< number of bytes per line } AVPicture; +#define AVPALETTE_SIZE 1024 +#define AVPALETTE_COUNT 256 #if FF_API_PALETTE_CONTROL /** * AVPaletteControl @@ -3025,8 +3358,6 @@ * @deprecated Use AVPacket to send palette changes instead. * This is totally broken. */ -#define AVPALETTE_SIZE 1024 -#define AVPALETTE_COUNT 256 typedef struct AVPaletteControl { /* Demuxer sets this to 1 to indicate the palette has changed; @@ -3194,7 +3525,7 @@ * @param linear if 1 then the used FIR filter will be linearly interpolated between the 2 closest, if 0 the closest will be used * @param cutoff cutoff frequency, 1.0 corresponds to half the output sampling rate - * @return allocated ReSampleContext, NULL if error occured + * @return allocated ReSampleContext, NULL if error occurred */ ReSampleContext *av_audio_resample_init(int output_channels, int input_channels, int output_rate, int input_rate, @@ -3255,7 +3586,7 @@ /** * Allocate memory for a picture. Call avpicture_free() to free it. * - * \see avpicture_fill() + * @see avpicture_fill() * * @param picture the picture to be filled in * @param pix_fmt the format of the picture @@ -3302,7 +3633,7 @@ * The data is stored compactly, without any gaps for alignment or padding * which may be applied by avpicture_fill(). * - * \see avpicture_get_size() + * @see avpicture_get_size() * * @param[in] src AVPicture containing image data * @param[in] pix_fmt The format in which the picture data is stored. @@ -3408,6 +3739,7 @@ enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr); +#if FF_API_GET_ALPHA_INFO #define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */ #define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */ @@ -3415,8 +3747,10 @@ * Tell if an image really has transparent alpha values. * @return ored mask of FF_ALPHA_xxx constants */ +attribute_deprecated int img_get_alpha_info(const AVPicture *src, enum PixelFormat pix_fmt, int width, int height); +#endif /* deinterlace a picture */ /* deinterlace - if not supported return -1 */ @@ -3447,21 +3781,22 @@ */ const char *avcodec_license(void); +#if FF_API_AVCODEC_INIT /** - * Initialize libavcodec. - * If called more than once, does nothing. - * - * @warning This function must be called before any other libavcodec - * function. - * - * @warning This function is not thread-safe. + * @deprecated this function is called automatically from avcodec_register() + * and avcodec_register_all(), there is no need to call it manually */ +attribute_deprecated void avcodec_init(void); +#endif /** * Register the codec codec and initialize libavcodec. * - * @see avcodec_init(), avcodec_register_all() + * @warning either this function or avcodec_register_all() must be called + * before any other libavcodec functions. + * + * @see avcodec_register_all() */ void avcodec_register(AVCodec *codec); @@ -3507,46 +3842,73 @@ */ const char *av_get_profile_name(const AVCodec *codec, int profile); +#if FF_API_ALLOC_CONTEXT /** * Set the fields of the given AVCodecContext to default values. * * @param s The AVCodecContext of which the fields should be set to default values. + * @deprecated use avcodec_get_context_defaults3 */ +attribute_deprecated void avcodec_get_context_defaults(AVCodecContext *s); /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! * we WILL change its arguments and name a few times! */ +attribute_deprecated void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType); +#endif -/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! - * we WILL change its arguments and name a few times! */ +/** + * Set the fields of the given AVCodecContext to default values corresponding + * to the given codec (defaults may be codec-dependent). + * + * Do not call this function if a non-NULL codec has been passed + * to avcodec_alloc_context3() that allocated this AVCodecContext. + * If codec is non-NULL, it is illegal to call avcodec_open2() with a + * different codec on this AVCodecContext. + */ int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec); +#if FF_API_ALLOC_CONTEXT /** * Allocate an AVCodecContext and set its fields to default values. The * resulting struct can be deallocated by simply calling av_free(). * * @return An AVCodecContext filled with default values or NULL on failure. * @see avcodec_get_context_defaults + * + * @deprecated use avcodec_alloc_context3() */ +attribute_deprecated AVCodecContext *avcodec_alloc_context(void); /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! * we WILL change its arguments and name a few times! */ +attribute_deprecated AVCodecContext *avcodec_alloc_context2(enum AVMediaType); +#endif -/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! - * we WILL change its arguments and name a few times! */ +/** + * Allocate an AVCodecContext and set its fields to default values. The + * resulting struct can be deallocated by simply calling av_free(). + * + * @param codec if non-NULL, allocate private data and initialize defaults + * for the given codec. It is illegal to then call avcodec_open2() + * with a different codec. + * + * @return An AVCodecContext filled with default values or NULL on failure. + * @see avcodec_get_context_defaults + */ AVCodecContext *avcodec_alloc_context3(AVCodec *codec); /** * Copy the settings of the source AVCodecContext into the destination * AVCodecContext. The resulting destination codec context will be - * unopened, i.e. you are required to call avcodec_open() before you + * unopened, i.e. you are required to call avcodec_open2() before you * can use this AVCodecContext to decode/encode video/audio data. * * @param dest target codec context, should be initialized with - * avcodec_alloc_context(), but otherwise uninitialized + * avcodec_alloc_context3(), but otherwise uninitialized * @param src source codec context * @return AVERROR() on error (e.g. memory allocation error), 0 on success */ @@ -3600,13 +3962,13 @@ * according to avcodec_get_edge_width() before. */ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, - int linesize_align[4]); + int linesize_align[AV_NUM_DATA_POINTERS]); enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt); #if FF_API_THREAD_INIT /** - * @deprecated Set s->thread_count before calling avcodec_open() instead of calling this. + * @deprecated Set s->thread_count before calling avcodec_open2() instead of calling this. */ attribute_deprecated int avcodec_thread_init(AVCodecContext *s, int thread_count); @@ -3616,6 +3978,7 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count); //FIXME func typedef +#if FF_API_AVCODEC_OPEN /** * Initialize the AVCodecContext to use the given AVCodec. Prior to using this * function the context has to be allocated. @@ -3632,7 +3995,7 @@ * if (!codec) * exit(1); * - * context = avcodec_alloc_context(); + * context = avcodec_alloc_context3(codec); * * if (avcodec_open(context, codec) < 0) * exit(1); @@ -3641,11 +4004,53 @@ * @param avctx The context which will be set up to use the given codec. * @param codec The codec to use within the context. * @return zero on success, a negative value on error - * @see avcodec_alloc_context, avcodec_find_decoder, avcodec_find_encoder, avcodec_close + * @see avcodec_alloc_context3, avcodec_find_decoder, avcodec_find_encoder, avcodec_close + * + * @deprecated use avcodec_open2 */ +attribute_deprecated int avcodec_open(AVCodecContext *avctx, AVCodec *codec); +#endif + +/** + * Initialize the AVCodecContext to use the given AVCodec. Prior to using this + * function the context has to be allocated with avcodec_alloc_context3(). + * + * The functions avcodec_find_decoder_by_name(), avcodec_find_encoder_by_name(), + * avcodec_find_decoder() and avcodec_find_encoder() provide an easy way for + * retrieving a codec. + * + * @warning This function is not thread safe! + * + * @code + * avcodec_register_all(); + * av_dict_set(&opts, "b", "2.5M", 0); + * codec = avcodec_find_decoder(CODEC_ID_H264); + * if (!codec) + * exit(1); + * + * context = avcodec_alloc_context3(codec); + * + * if (avcodec_open2(context, codec, opts) < 0) + * exit(1); + * @endcode + * + * @param avctx The context to initialize. + * @param options A dictionary filled with AVCodecContext and codec-private options. + * On return this object will be filled with options that were not found. + * + * @return zero on success, a negative value on error + * @see avcodec_alloc_context3(), avcodec_find_decoder(), avcodec_find_encoder(), + * av_dict_set(), av_opt_find(). + */ +int avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options); +#if FF_API_OLD_DECODE_AUDIO /** + * Wrapper function which calls avcodec_decode_audio4. + * + * @deprecated Use avcodec_decode_audio4 instead. + * * Decode the audio frame of size avpkt->size from avpkt->data into samples. * Some decoders may support multiple frames in a single AVPacket, such * decoders would then just decode the first frame. In this case, @@ -3674,8 +4079,14 @@ * samples should be 16 byte aligned unless the CPU doesn't need it * (AltiVec and SSE do). * + * @note Codecs which have the CODEC_CAP_DELAY capability set have a delay + * between input and output, these need to be fed with avpkt->data=NULL, + * avpkt->size=0 at the end to return the remaining frames. + * * @param avctx the codec context * @param[out] samples the output buffer, sample type in avctx->sample_fmt + * If the sample format is planar, each channel plane will + * be the same size, with no padding between channels. * @param[in,out] frame_size_ptr the output buffer size in bytes * @param[in] avpkt The input AVPacket containing the input buffer. * You can create such packet with av_init_packet() and by then setting @@ -3684,9 +4095,46 @@ * @return On error a negative value is returned, otherwise the number of bytes * used or zero if no frame data was decompressed (used) from the input AVPacket. */ -int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, +attribute_deprecated int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket *avpkt); +#endif + +/** + * Decode the audio frame of size avpkt->size from avpkt->data into frame. + * + * Some decoders may support multiple frames in a single AVPacket. Such + * decoders would then just decode the first frame. In this case, + * avcodec_decode_audio4 has to be called again with an AVPacket containing + * the remaining data in order to decode the second frame, etc... + * Even if no frames are returned, the packet needs to be fed to the decoder + * with remaining data until it is completely consumed or an error occurs. + * + * @warning The input buffer, avpkt->data must be FF_INPUT_BUFFER_PADDING_SIZE + * larger than the actual read bytes because some optimized bitstream + * readers read 32 or 64 bits at once and could read over the end. + * + * @note You might have to align the input buffer. The alignment requirements + * depend on the CPU and the decoder. + * + * @param avctx the codec context + * @param[out] frame The AVFrame in which to store decoded audio samples. + * Decoders request a buffer of a particular size by setting + * AVFrame.nb_samples prior to calling get_buffer(). The + * decoder may, however, only utilize part of the buffer by + * setting AVFrame.nb_samples to a smaller value in the + * output frame. + * @param[out] got_frame_ptr Zero if no frame could be decoded, otherwise it is + * non-zero. + * @param[in] avpkt The input AVPacket containing the input buffer. + * At least avpkt->data and avpkt->size should be set. Some + * decoders might also require additional fields to be set. + * @return A negative error code is returned if an error occurred during + * decoding, otherwise the number of bytes consumed from the input + * AVPacket is returned. + */ +int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, + int *got_frame_ptr, AVPacket *avpkt); /** * Decode the video frame of size avpkt->size from avpkt->data into picture. @@ -3707,8 +4155,9 @@ * * In practice, avpkt->data should have 4 byte alignment at minimum. * - * @note Some codecs have a delay between input and output, these need to be - * fed with avpkt->data=NULL, avpkt->size=0 at the end to return the remaining frames. + * @note Codecs which have the CODEC_CAP_DELAY capability set have a delay + * between input and output, these need to be fed with avpkt->data=NULL, + * avpkt->size=0 at the end to return the remaining frames. * * @param avctx the codec context * @param[out] picture The AVFrame in which the decoded video frame will be stored. @@ -3753,23 +4202,19 @@ AVPacket *avpkt); /** - * Frees all allocated data in the given subtitle struct. + * Free all allocated data in the given subtitle struct. * * @param sub AVSubtitle to free. */ void avsubtitle_free(AVSubtitle *sub); -int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata, - int *data_size_ptr, - uint8_t *buf, int buf_size); - /** * Encode an audio frame from samples into buf. * * @note The output buffer should be at least FF_MIN_BUFFER_SIZE bytes large. - * However, for PCM audio the user will know how much space is needed - * because it depends on the value passed in buf_size as described - * below. In that case a lower value can be used. + * However, for codecs with avctx->frame_size equal to 0 (e.g. PCM) the user + * will know how much space is needed because it depends on the value passed + * in buf_size as described below. In that case a lower value can be used. * * @param avctx the codec context * @param[out] buf the output buffer @@ -3777,8 +4222,11 @@ * @param[in] samples the input buffer containing the samples * The number of samples read from this buffer is frame_size*channels, * both of which are defined in avctx. - * For PCM audio the number of samples read from samples is equal to - * buf_size * input_sample_size / output_sample_size. + * For codecs which have avctx->frame_size equal to 0 (e.g. PCM) the number of + * samples read from samples is equal to: + * buf_size * 8 / (avctx->channels * av_get_bits_per_sample(avctx->codec_id)) + * This also implies that av_get_bits_per_sample() must not return 0 for these + * codecs. * @return On error a negative value is returned, on success zero or the number * of bytes used to encode the data read from the input buffer. */ @@ -3847,7 +4295,7 @@ #if FF_API_OLD_SAMPLE_FMT /** - * @deprecated Use av_get_bits_per_sample_fmt() instead. + * @deprecated Use av_get_bytes_per_sample() instead. */ attribute_deprecated int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt); @@ -3896,7 +4344,7 @@ int64_t offset; ///< byte offset from starting packet start int64_t cur_frame_end[AV_PARSER_PTS_NB]; - /*! + /** * Set by parser to 1 for key frames and 0 for non-key frames. * It is initialized to -1, so if the parser doesn't set this flag, * old-style fallback using AV_PICTURE_TYPE_I picture type as key frames @@ -4122,7 +4570,7 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v); /** - * Logs a generic warning message about a missing feature. This function is + * Log a generic warning message about a missing feature. This function is * intended to be used internally by Libav (libavcodec, libavformat, etc.) * only, and would normally not be used by applications. * @param[in] avc a pointer to an arbitrary struct of which the first field is @@ -4143,7 +4591,7 @@ * a pointer to an AVClass struct * @param[in] msg string containing an optional message, or NULL if no message */ -void av_log_ask_for_sample(void *avc, const char *msg, ...); +void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3); /** * Register the hardware accelerator hwaccel. @@ -4183,4 +4631,17 @@ */ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)); +/** + * Get the type of the given codec. + */ +enum AVMediaType avcodec_get_type(enum CodecID codec_id); + +/** + * Get the AVClass for AVCodecContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *avcodec_get_class(void); + #endif /* AVCODEC_AVCODEC_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/avs.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/avs.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/avs.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/avs.c 2012-01-11 00:34:30.000000000 +0000 @@ -47,6 +47,7 @@ void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; + const uint8_t *buf_end = avpkt->data + avpkt->size; int buf_size = avpkt->size; AvsContext *const avs = avctx->priv_data; AVFrame *picture = data; @@ -69,6 +70,8 @@ out = avs->picture.data[0]; stride = avs->picture.linesize[0]; + if (buf_end - buf < 4) + return AVERROR_INVALIDDATA; sub_type = buf[0]; type = buf[1]; buf += 4; @@ -79,6 +82,8 @@ first = AV_RL16(buf); last = first + AV_RL16(buf + 2); + if (first >= 256 || last > 256 || buf_end - buf < 4 + 4 + 3 * (last - first)) + return AVERROR_INVALIDDATA; buf += 4; for (i=first; ipriv_data; + if (s->picture.data[0]) + avctx->release_buffer(avctx, &s->picture); + return 0; +} + + AVCodec ff_avs_decoder = { - "avs", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_AVS, - sizeof(AvsContext), - avs_decode_init, - NULL, - NULL, - avs_decode_frame, - CODEC_CAP_DR1, + .name = "avs", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_AVS, + .priv_data_size = sizeof(AvsContext), + .init = avs_decode_init, + .decode = avs_decode_frame, + .close = avs_decode_end, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bethsoftvideo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bethsoftvideo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bethsoftvideo.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bethsoftvideo.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,8 +23,8 @@ * @file * @brief Bethesda Softworks VID Video Decoder * @author Nicholas Tung [ntung (at. ntung com] (2007-03) - * @sa http://wiki.multimedia.cx/index.php?title=Bethsoft_VID - * @sa http://www.svatopluk.com/andux/docs/dfvid.html + * @see http://wiki.multimedia.cx/index.php?title=Bethsoft_VID + * @see http://www.svatopluk.com/andux/docs/dfvid.html */ #include "libavutil/common.h" @@ -34,6 +34,7 @@ typedef struct BethsoftvidContext { AVFrame frame; + GetByteContext g; } BethsoftvidContext; static av_cold int bethsoftvid_decode_init(AVCodecContext *avctx) @@ -46,22 +47,25 @@ return 0; } -static void set_palette(AVFrame * frame, const uint8_t * palette_buffer) +static int set_palette(BethsoftvidContext *ctx) { - uint32_t * palette = (uint32_t *)frame->data[1]; + uint32_t *palette = (uint32_t *)ctx->frame.data[1]; int a; + + if (bytestream2_get_bytes_left(&ctx->g) < 256*3) + return AVERROR_INVALIDDATA; + for(a = 0; a < 256; a++){ - palette[a] = AV_RB24(&palette_buffer[a * 3]) * 4; + palette[a] = bytestream2_get_be24u(&ctx->g) * 4; } - frame->palette_has_changed = 1; + ctx->frame.palette_has_changed = 1; + return 256*3; } static int bethsoftvid_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; BethsoftvidContext * vid = avctx->priv_data; char block_type; uint8_t * dst; @@ -75,30 +79,32 @@ av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); return -1; } + + bytestream2_init(&vid->g, avpkt->data, avpkt->size); dst = vid->frame.data[0]; frame_end = vid->frame.data[0] + vid->frame.linesize[0] * avctx->height; - switch(block_type = *buf++){ - case PALETTE_BLOCK: - set_palette(&vid->frame, buf); - return 0; + switch(block_type = bytestream2_get_byte(&vid->g)){ + case PALETTE_BLOCK: { + return set_palette(vid); + } case VIDEO_YOFF_P_FRAME: - yoffset = bytestream_get_le16(&buf); + yoffset = bytestream2_get_le16(&vid->g); if(yoffset >= avctx->height) return -1; dst += vid->frame.linesize[0] * yoffset; } // main code - while((code = *buf++)){ + while((code = bytestream2_get_byte(&vid->g))){ int length = code & 0x7f; // copy any bytes starting at the current position, and ending at the frame width while(length > remaining){ if(code < 0x80) - bytestream_get_buffer(&buf, dst, remaining); + bytestream2_get_buffer(&vid->g, dst, remaining); else if(block_type == VIDEO_I_FRAME) - memset(dst, buf[0], remaining); + memset(dst, bytestream2_peek_byte(&vid->g), remaining); length -= remaining; // decrement the number of bytes to be copied dst += remaining + wrap_to_next_line; // skip over extra bytes at end of frame remaining = avctx->width; @@ -108,9 +114,9 @@ // copy any remaining bytes after / if line overflows if(code < 0x80) - bytestream_get_buffer(&buf, dst, length); + bytestream2_get_buffer(&vid->g, dst, length); else if(block_type == VIDEO_I_FRAME) - memset(dst, *buf++, length); + memset(dst, bytestream2_get_byte(&vid->g), length); remaining -= length; dst += length; } @@ -119,7 +125,7 @@ *data_size = sizeof(AVFrame); *(AVFrame*)data = vid->frame; - return buf_size; + return avpkt->size; } static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bfi.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bfi.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bfi.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bfi.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,7 @@ * @file * @brief Brute Force & Ignorance (.bfi) video decoder * @author Sisir Koppaka ( sisir.koppaka at gmail dot com ) - * @sa http://wiki.multimedia.cx/index.php?title=BFI + * @see http://wiki.multimedia.cx/index.php?title=BFI */ #include "libavutil/common.h" @@ -36,7 +36,7 @@ uint8_t *dst; } BFIContext; -static av_cold int bfi_decode_init(AVCodecContext * avctx) +static av_cold int bfi_decode_init(AVCodecContext *avctx) { BFIContext *bfi = avctx->priv_data; avctx->pix_fmt = PIX_FMT_PAL8; @@ -44,10 +44,10 @@ return 0; } -static int bfi_decode_frame(AVCodecContext * avctx, void *data, +static int bfi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data, *buf_end = avpkt->data + avpkt->size; + GetByteContext g; int buf_size = avpkt->size; BFIContext *bfi = avctx->priv_data; uint8_t *dst = bfi->dst; @@ -66,16 +66,18 @@ return -1; } + bytestream2_init(&g, avpkt->data, buf_size); + /* Set frame parameters and palette, if necessary */ if (!avctx->frame_number) { bfi->frame.pict_type = AV_PICTURE_TYPE_I; bfi->frame.key_frame = 1; /* Setting the palette */ - if(avctx->extradata_size>768) { + if (avctx->extradata_size > 768) { av_log(NULL, AV_LOG_ERROR, "Palette is too large.\n"); return -1; } - pal = (uint32_t *) bfi->frame.data[1]; + pal = (uint32_t *)bfi->frame.data[1]; for (i = 0; i < avctx->extradata_size / 3; i++) { int shift = 16; *pal = 0; @@ -91,46 +93,47 @@ bfi->frame.key_frame = 0; } - buf += 4; //Unpacked size, not required. + bytestream2_skip(&g, 4); // Unpacked size, not required. while (dst != frame_end) { - static const uint8_t lentab[4]={0,2,0,1}; - unsigned int byte = *buf++, av_uninit(offset); - unsigned int code = byte >> 6; + static const uint8_t lentab[4] = { 0, 2, 0, 1 }; + unsigned int byte = bytestream2_get_byte(&g), av_uninit(offset); + unsigned int code = byte >> 6; unsigned int length = byte & ~0xC0; - if (buf >= buf_end) { - av_log(avctx, AV_LOG_ERROR, "Input resolution larger than actual frame.\n"); + if (!bytestream2_get_bytes_left(&g)) { + av_log(avctx, AV_LOG_ERROR, + "Input resolution larger than actual frame.\n"); return -1; } /* Get length and offset(if required) */ if (length == 0) { if (code == 1) { - length = bytestream_get_byte(&buf); - offset = bytestream_get_le16(&buf); + length = bytestream2_get_byte(&g); + offset = bytestream2_get_le16(&g); } else { - length = bytestream_get_le16(&buf); + length = bytestream2_get_le16(&g); if (code == 2 && length == 0) break; } } else { if (code == 1) - offset = bytestream_get_byte(&buf); + offset = bytestream2_get_byte(&g); } /* Do boundary check */ - if (dst + (length< frame_end) + if (dst + (length << lentab[code]) > frame_end) break; switch (code) { case 0: //Normal Chain - if (length >= buf_end - buf) { + if (length >= bytestream2_get_bytes_left(&g)) { av_log(avctx, AV_LOG_ERROR, "Frame larger than buffer.\n"); return -1; } - bytestream_get_buffer(&buf, dst, length); + bytestream2_get_buffer(&g, dst, length); dst += length; break; @@ -148,8 +151,8 @@ break; case 3: //Fill Chain - colour1 = bytestream_get_byte(&buf); - colour2 = bytestream_get_byte(&buf); + colour1 = bytestream2_get_byte(&g); + colour2 = bytestream2_get_byte(&g); while (length--) { *dst++ = colour1; *dst++ = colour2; @@ -167,7 +170,7 @@ dst += bfi->frame.linesize[0]; } *data_size = sizeof(AVFrame); - *(AVFrame *) data = bfi->frame; + *(AVFrame *)data = bfi->frame; return buf_size; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bfin/dsputil_bfin.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bfin/dsputil_bfin.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bfin/dsputil_bfin.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bfin/dsputil_bfin.c 2012-01-11 00:34:30.000000000 +0000 @@ -197,14 +197,14 @@ void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx ) { - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; - c->get_pixels = ff_bfin_get_pixels; c->diff_pixels = ff_bfin_diff_pixels; c->put_pixels_clamped = ff_bfin_put_pixels_clamped; c->add_pixels_clamped = ff_bfin_add_pixels_clamped; if (!high_bit_depth) + c->get_pixels = ff_bfin_get_pixels; c->clear_blocks = bfin_clear_blocks; c->pix_sum = ff_bfin_pix_sum; c->pix_norm1 = ff_bfin_pix_norm1; @@ -253,19 +253,21 @@ /* c->put_no_rnd_pixels_tab[0][3] = ff_bfin_put_pixels16_xy2_nornd; */ } - if (avctx->dct_algo == FF_DCT_AUTO) - c->fdct = ff_bfin_fdct; - - if (avctx->idct_algo==FF_IDCT_VP3) { - c->idct_permutation_type = FF_NO_IDCT_PERM; - c->idct = ff_bfin_vp3_idct; - c->idct_add = ff_bfin_vp3_idct_add; - c->idct_put = ff_bfin_vp3_idct_put; - } else if (avctx->idct_algo == FF_IDCT_AUTO) { - c->idct_permutation_type = FF_NO_IDCT_PERM; - c->idct = ff_bfin_idct; - c->idct_add = bfin_idct_add; - c->idct_put = bfin_idct_put; + if (avctx->bits_per_raw_sample <= 8) { + if (avctx->dct_algo == FF_DCT_AUTO) + c->fdct = ff_bfin_fdct; + + if (avctx->idct_algo == FF_IDCT_VP3) { + c->idct_permutation_type = FF_NO_IDCT_PERM; + c->idct = ff_bfin_vp3_idct; + c->idct_add = ff_bfin_vp3_idct_add; + c->idct_put = ff_bfin_vp3_idct_put; + } else if (avctx->idct_algo == FF_IDCT_AUTO) { + c->idct_permutation_type = FF_NO_IDCT_PERM; + c->idct = ff_bfin_idct; + c->idct_add = bfin_idct_add; + c->idct_put = bfin_idct_put; + } } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bfin/fdct_bfin.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bfin/fdct_bfin.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bfin/fdct_bfin.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bfin/fdct_bfin.S 2012-01-11 00:34:30.000000000 +0000 @@ -104,14 +104,14 @@ S3,C3, ----------------------------------------------------------- -FFMPEG conformance testing results +Libav conformance testing results ----------------------------------------------------------- dct-test: modified with the following dct_error("BFINfdct", 0, ff_bfin_fdct, fdct, test); produces the following output: -root:/u/ffmpeg/bhead/libavcodec> ./dct-test -ffmpeg DCT/IDCT test +libavcodec> ./dct-test +Libav DCT/IDCT test 2 -131 -6 -48 -36 33 -83 24 34 52 -24 -15 5 92 57 143 @@ -123,8 +123,6 @@ -17 -63 -15 73 50 -91 159 -14 DCT BFINfdct: err_inf=2 err2=0.16425938 syserr=0.00795000 maxout=2098 blockSumErr=27 DCT BFINfdct: 92.1 kdct/s -root:/u/ffmpeg/bhead/libavcodec> - */ #include "config.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bfin/idct_bfin.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bfin/idct_bfin.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bfin/idct_bfin.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bfin/idct_bfin.S 2012-01-11 00:34:30.000000000 +0000 @@ -32,15 +32,15 @@ ----------------------------------------------------------- -FFMPEG conformance testing results +Libav conformance testing results ----------------------------------------------------------- dct-test: modified with the following dct_error("BFINidct", 1, ff_bfin_idct, idct, test); produces the following output -root:/u/ffmpeg/bhead/libavcodec> ./dct-test -i -ffmpeg DCT/IDCT test +libavcodec> ./dct-test -i +Libav DCT/IDCT test 8 15 -2 21 24 17 0 10 2 -10 -5 -5 -3 7 -14 -3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bgmc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bgmc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bgmc.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bgmc.c 2012-01-11 00:34:30.000000000 +0000 @@ -474,7 +474,8 @@ av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n"); return AVERROR(ENOMEM); } else { - // initialize lut_status buffer to a value never used to compare against + // initialize lut_status buffer to a value never used to compare + // against memset(*cf_lut_status, -1, sizeof(*cf_lut_status) * LUT_BUFF); } @@ -494,7 +495,7 @@ /** Initialize decoding and reads the first value */ void ff_bgmc_decode_init(GetBitContext *gb, - unsigned int *h, unsigned int *l, unsigned int *v) + unsigned int *h, unsigned int *l, unsigned int *v) { *h = TOP_VALUE; *l = 0; @@ -513,9 +514,9 @@ /** Read and decode a block Gilbert-Moore coded symbol */ void ff_bgmc_decode(GetBitContext *gb, unsigned int num, int32_t *dst, - int delta, unsigned int sx, - unsigned int *h, unsigned int *l, unsigned int *v, - uint8_t *cf_lut, int *cf_lut_status) + int delta, unsigned int sx, + unsigned int *h, unsigned int *l, unsigned int *v, + uint8_t *cf_lut, int *cf_lut_status) { unsigned int i; uint8_t *lut = bgmc_lut_getp(cf_lut, cf_lut_status, delta); @@ -567,4 +568,3 @@ *l = low; *v = value; } - diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/binkaudio.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/binkaudio.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/binkaudio.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/binkaudio.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,20 +29,23 @@ */ #include "avcodec.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" #include "dsputil.h" #include "dct.h" #include "rdft.h" #include "fmtconvert.h" -#include "libavutil/intfloat_readwrite.h" +#include "libavutil/intfloat.h" extern const uint16_t ff_wma_critical_freqs[25]; +static float quant_table[96]; + #define MAX_CHANNELS 2 #define BINK_BLOCK_MAX_SIZE (MAX_CHANNELS << 11) typedef struct { + AVFrame frame; GetBitContext gb; DSPContext dsp; FmtConvertContext fmt_conv; @@ -56,8 +59,11 @@ unsigned int *bands; float root; DECLARE_ALIGNED(32, FFTSample, coeffs)[BINK_BLOCK_MAX_SIZE]; - DECLARE_ALIGNED(16, short, previous)[BINK_BLOCK_MAX_SIZE / 16]; ///< coeffs from previous audio block + DECLARE_ALIGNED(16, int16_t, previous)[BINK_BLOCK_MAX_SIZE / 16]; ///< coeffs from previous audio block + DECLARE_ALIGNED(16, int16_t, current)[BINK_BLOCK_MAX_SIZE / 16]; float *coeffs_ptr[MAX_CHANNELS]; ///< pointers to the coeffs arrays for float_to_int16_interleave + float *prev_ptr[MAX_CHANNELS]; ///< pointers to the overlap points in the coeffs array + uint8_t *packet_buffer; union { RDFTContext rdft; DCTContext dct; @@ -90,7 +96,7 @@ return -1; } - s->version_b = avctx->codec_tag == MKTAG('B','I','K','b'); + s->version_b = avctx->extradata && avctx->extradata[3] == 'b'; if (avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) { // audio is already interleaved for the RDFT format variant @@ -107,6 +113,10 @@ s->block_size = (s->frame_len - s->overlap_len) * s->channels; sample_rate_half = (sample_rate + 1) / 2; s->root = 2.0 / sqrt(s->frame_len); + for (i = 0; i < 96; i++) { + /* constant is result of 0.066399999/log10(M_E) */ + quant_table[i] = expf(i * 0.15289164787221953823f) * s->root; + } /* calculate number of bands */ for (s->num_bands = 1; s->num_bands < 25; s->num_bands++) @@ -126,8 +136,10 @@ s->first = 1; avctx->sample_fmt = AV_SAMPLE_FMT_S16; - for (i = 0; i < s->channels; i++) + for (i = 0; i < s->channels; i++) { s->coeffs_ptr[i] = s->coeffs + i * s->frame_len; + s->prev_ptr[i] = s->coeffs_ptr[i] + s->frame_len - s->overlap_len; + } if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) ff_rdft_init(&s->trans.rdft, frame_len_bits, DFT_C2R); @@ -136,6 +148,9 @@ else return -1; + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } @@ -152,11 +167,18 @@ 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 32, 64 }; +#define GET_BITS_SAFE(out, nbits) do { \ + if (get_bits_left(gb) < nbits) \ + return AVERROR_INVALIDDATA; \ + out = get_bits(gb, nbits); \ +} while (0) + /** * Decode Bink Audio block * @param[out] out Output buffer (must contain s->block_size elements) + * @return 0 on success, negative error code on failure */ -static void decode_block(BinkAudioContext *s, short *out, int use_dct) +static int decode_block(BinkAudioContext *s, int16_t *out, int use_dct) { int ch, i, j, k; float q, quant[25]; @@ -169,17 +191,22 @@ for (ch = 0; ch < s->channels; ch++) { FFTSample *coeffs = s->coeffs_ptr[ch]; if (s->version_b) { - coeffs[0] = av_int2flt(get_bits(gb, 32)) * s->root; - coeffs[1] = av_int2flt(get_bits(gb, 32)) * s->root; + if (get_bits_left(gb) < 64) + return AVERROR_INVALIDDATA; + coeffs[0] = av_int2float(get_bits_long(gb, 32)) * s->root; + coeffs[1] = av_int2float(get_bits_long(gb, 32)) * s->root; } else { + if (get_bits_left(gb) < 58) + return AVERROR_INVALIDDATA; coeffs[0] = get_float(gb) * s->root; coeffs[1] = get_float(gb) * s->root; } + if (get_bits_left(gb) < s->num_bands * 8) + return AVERROR_INVALIDDATA; for (i = 0; i < s->num_bands; i++) { - /* constant is result of 0.066399999/log10(M_E) */ int value = get_bits(gb, 8); - quant[i] = expf(FFMIN(value, 95) * 0.15289164787221953823f) * s->root; + quant[i] = quant_table[FFMIN(value, 95)]; } k = 0; @@ -190,15 +217,20 @@ while (i < s->frame_len) { if (s->version_b) { j = i + 16; - } else if (get_bits1(gb)) { - j = i + rle_length_tab[get_bits(gb, 4)] * 8; } else { - j = i + 8; + int v; + GET_BITS_SAFE(v, 1); + if (v) { + GET_BITS_SAFE(v, 4); + j = i + rle_length_tab[v] * 8; + } else { + j = i + 8; + } } j = FFMIN(j, s->frame_len); - width = get_bits(gb, 4); + GET_BITS_SAFE(width, 4); if (width == 0) { memset(coeffs + i, 0, (j - i) * sizeof(*coeffs)); i = j; @@ -208,9 +240,11 @@ while (i < j) { if (s->bands[k] == i) q = quant[k++]; - coeff = get_bits(gb, width); + GET_BITS_SAFE(coeff, width); if (coeff) { - if (get_bits1(gb)) + int v; + GET_BITS_SAFE(v, 1); + if (v) coeffs[i] = -q * coeff; else coeffs[i] = q * coeff; @@ -231,8 +265,12 @@ s->trans.rdft.rdft_calc(&s->trans.rdft, coeffs); } + s->fmt_conv.float_to_int16_interleave(s->current, + (const float **)s->prev_ptr, + s->overlap_len, s->channels); s->fmt_conv.float_to_int16_interleave(out, (const float **)s->coeffs_ptr, - s->frame_len, s->channels); + s->frame_len - s->overlap_len, + s->channels); if (!s->first) { int count = s->overlap_len * s->channels; @@ -242,20 +280,24 @@ } } - memcpy(s->previous, out + s->block_size, - s->overlap_len * s->channels * sizeof(*out)); + memcpy(s->previous, s->current, + s->overlap_len * s->channels * sizeof(*s->previous)); s->first = 0; + + return 0; } static av_cold int decode_end(AVCodecContext *avctx) { BinkAudioContext * s = avctx->priv_data; av_freep(&s->bands); + av_freep(&s->packet_buffer); if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) ff_rdft_end(&s->trans.rdft); else if (CONFIG_BINKAUDIO_DCT_DECODER) ff_dct_end(&s->trans.dct); + return 0; } @@ -265,52 +307,77 @@ if (n) skip_bits(s, n); } -static int decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { BinkAudioContext *s = avctx->priv_data; - const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; - short *samples = data; - short *samples_end = (short*)((uint8_t*)data + *data_size); - int reported_size; + int16_t *samples; GetBitContext *gb = &s->gb; + int ret, consumed = 0; + + if (!get_bits_left(gb)) { + uint8_t *buf; + /* handle end-of-stream */ + if (!avpkt->size) { + *got_frame_ptr = 0; + return 0; + } + if (avpkt->size < 4) { + av_log(avctx, AV_LOG_ERROR, "Packet is too small\n"); + return AVERROR_INVALIDDATA; + } + buf = av_realloc(s->packet_buffer, avpkt->size + FF_INPUT_BUFFER_PADDING_SIZE); + if (!buf) + return AVERROR(ENOMEM); + s->packet_buffer = buf; + memcpy(s->packet_buffer, avpkt->data, avpkt->size); + init_get_bits(gb, s->packet_buffer, avpkt->size * 8); + consumed = avpkt->size; - init_get_bits(gb, buf, buf_size * 8); + /* skip reported size */ + skip_bits_long(gb, 32); + } + + /* get output buffer */ + s->frame.nb_samples = s->block_size / avctx->channels; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (int16_t *)s->frame.data[0]; - reported_size = get_bits_long(gb, 32); - while (get_bits_count(gb) / 8 < buf_size && - samples + s->block_size <= samples_end) { - decode_block(s, samples, avctx->codec->id == CODEC_ID_BINKAUDIO_DCT); - samples += s->block_size; - get_bits_align32(gb); + if (decode_block(s, samples, avctx->codec->id == CODEC_ID_BINKAUDIO_DCT)) { + av_log(avctx, AV_LOG_ERROR, "Incomplete packet\n"); + return AVERROR_INVALIDDATA; } + get_bits_align32(gb); + + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; - *data_size = FFMIN(reported_size, (uint8_t*)samples - (uint8_t*)data); - return buf_size; + return consumed; } AVCodec ff_binkaudio_rdft_decoder = { - "binkaudio_rdft", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_BINKAUDIO_RDFT, - sizeof(BinkAudioContext), - decode_init, - NULL, - decode_end, - decode_frame, + .name = "binkaudio_rdft", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_BINKAUDIO_RDFT, + .priv_data_size = sizeof(BinkAudioContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)") }; AVCodec ff_binkaudio_dct_decoder = { - "binkaudio_dct", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_BINKAUDIO_DCT, - sizeof(BinkAudioContext), - decode_init, - NULL, - decode_end, - decode_frame, + .name = "binkaudio_dct", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_BINKAUDIO_DCT, + .priv_data_size = sizeof(BinkAudioContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)") }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bink.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bink.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bink.c 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bink.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,9 +24,10 @@ #include "avcodec.h" #include "dsputil.h" #include "binkdata.h" +#include "binkdsp.h" #include "mathops.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" #define BINK_FLAG_ALPHA 0x00100000 @@ -60,8 +61,8 @@ 0, 0, 0, 1, 1, 0, 1, 0, 0, 0 }; -static uint32_t binkb_intra_quant[16][64]; -static uint32_t binkb_inter_quant[16][64]; +static int32_t binkb_intra_quant[16][64]; +static int32_t binkb_inter_quant[16][64]; /** * IDs for different data types used in Bink video codec @@ -109,11 +110,11 @@ typedef struct BinkContext { AVCodecContext *avctx; DSPContext dsp; + BinkDSPContext bdsp; AVFrame pic, last; int version; ///< internal Bink file version int has_alpha; int swap_planes; - ScanTable scantable; ///< permutated scantable for DCT coeffs decoding Bundle bundle[BINKB_NB_SRC]; ///< bundles for decoding all data types Tree col_high[16]; ///< trees for decoding high nibble in "colours" data type @@ -246,7 +247,7 @@ tree->syms[i] = get_bits(gb, 4); tmp1[tree->syms[i]] = 1; } - for (i = 0; i < 16; i++) + for (i = 0; i < 16 && len < 16 - 1; i++) if (!tmp1[i]) tree->syms[++len] = i; } else { @@ -343,14 +344,14 @@ memset(b->cur_dec, v, t); b->cur_dec += t; } else { - do { + while (b->cur_dec < dec_end) { v = GET_HUFF(gb, b->tree); if (v) { sign = -get_bits1(gb); v = (v ^ sign) - sign; } *b->cur_dec++ = v; - } while (b->cur_dec < dec_end); + } } return 0; } @@ -374,7 +375,7 @@ memset(b->cur_dec, v, t); b->cur_dec += t; } else { - do { + while (b->cur_dec < dec_end) { v = GET_HUFF(gb, b->tree); if (v < 12) { last = v; @@ -382,10 +383,12 @@ } else { int run = bink_rlelens[v - 12]; + if (dec_end - b->cur_dec < run) + return -1; memset(b->cur_dec, last, run); b->cur_dec += run; } - } while (b->cur_dec < dec_end); + } } return 0; } @@ -455,7 +458,8 @@ int start_bits, int has_sign) { int i, j, len, len2, bsize, sign, v, v2; - int16_t *dst = (int16_t*)b->cur_dec; + int16_t *dst = (int16_t*)b->cur_dec; + int16_t *dst_end = (int16_t*)b->data_end; CHECK_READ_VAL(gb, b, len); v = get_bits(gb, start_bits - has_sign); @@ -463,10 +467,14 @@ sign = -get_bits1(gb); v = (v ^ sign) - sign; } + if (dst_end - dst < 1) + return -1; *dst++ = v; len--; for (i = 0; i < len; i += 8) { len2 = FFMIN(len - i, 8); + if (dst_end - dst < len2) + return -1; bsize = get_bits(gb, 4); if (bsize) { for (j = 0; j < len2; j++) { @@ -534,6 +542,8 @@ int i, len; CHECK_READ_VAL(gb, b, len); + if (b->data_end - b->cur_dec < len * (1 + (bits > 8))) + return -1; if (bits <= 8) { if (!issigned) { for (i = 0; i < len; i++) @@ -580,17 +590,17 @@ * @param quant_matrices quantization matrices * @return 0 for success, negative value in other cases */ -static int read_dct_coeffs(GetBitContext *gb, DCTELEM block[64], const uint8_t *scan, - const uint32_t quant_matrices[16][64], int q) +static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *scan, + const int32_t quant_matrices[16][64], int q) { int coef_list[128]; int mode_list[128]; - int i, t, mask, bits, ccoef, mode, sign; + int i, t, bits, ccoef, mode, sign; int list_start = 64, list_end = 64, list_pos; int coef_count = 0; int coef_idx[64]; int quant_idx; - const uint32_t *quant; + const int32_t *quant; coef_list[list_end] = 4; mode_list[list_end++] = 0; coef_list[list_end] = 24; mode_list[list_end++] = 0; @@ -599,8 +609,7 @@ coef_list[list_end] = 2; mode_list[list_end++] = 3; coef_list[list_end] = 3; mode_list[list_end++] = 3; - bits = get_bits(gb, 4) - 1; - for (mask = 1 << bits; bits >= 0; mask >>= 1, bits--) { + for (bits = get_bits(gb, 4) - 1; bits >= 0; bits--) { list_pos = list_start; while (list_pos < list_end) { if (!(mode_list[list_pos] | coef_list[list_pos]) || !get_bits1(gb)) { @@ -623,11 +632,10 @@ coef_list[--list_start] = ccoef; mode_list[ list_start] = 3; } else { - int t; if (!bits) { t = 1 - (get_bits1(gb) << 1); } else { - t = get_bits(gb, bits) | mask; + t = get_bits(gb, bits) | 1 << bits; sign = -get_bits1(gb); t = (t ^ sign) - sign; } @@ -648,7 +656,7 @@ if (!bits) { t = 1 - (get_bits1(gb) << 1); } else { - t = get_bits(gb, bits) | mask; + t = get_bits(gb, bits) | 1 << bits; sign = -get_bits1(gb); t = (t ^ sign) - sign; } @@ -791,6 +799,7 @@ const uint8_t *scan; int xoff, yoff; LOCAL_ALIGNED_16(DCTELEM, block, [64]); + LOCAL_ALIGNED_16(int32_t, dctblock, [64]); int coordmap[64]; int ybias = is_key ? -15 : 0; int qp; @@ -845,11 +854,11 @@ dst[coordmap[*scan++]] = binkb_get_value(c, BINKB_SRC_COLORS); break; case 2: - c->dsp.clear_block(block); - block[0] = binkb_get_value(c, BINKB_SRC_INTRA_DC); + memset(dctblock, 0, sizeof(*dctblock) * 64); + dctblock[0] = binkb_get_value(c, BINKB_SRC_INTRA_DC); qp = binkb_get_value(c, BINKB_SRC_INTRA_Q); - read_dct_coeffs(gb, block, c->scantable.permutated, binkb_intra_quant, qp); - c->dsp.idct_put(dst, stride, block); + read_dct_coeffs(gb, dctblock, bink_scan, binkb_intra_quant, qp); + c->bdsp.idct_put(dst, stride, dctblock); break; case 3: xoff = binkb_get_value(c, BINKB_SRC_X_OFF); @@ -878,11 +887,11 @@ } else { put_pixels8x8_overlapped(dst, ref, stride); } - c->dsp.clear_block(block); - block[0] = binkb_get_value(c, BINKB_SRC_INTER_DC); + memset(dctblock, 0, sizeof(*dctblock) * 64); + dctblock[0] = binkb_get_value(c, BINKB_SRC_INTER_DC); qp = binkb_get_value(c, BINKB_SRC_INTER_Q); - read_dct_coeffs(gb, block, c->scantable.permutated, binkb_inter_quant, qp); - c->dsp.idct_add(dst, stride, block); + read_dct_coeffs(gb, dctblock, bink_scan, binkb_inter_quant, qp); + c->bdsp.idct_add(dst, stride, dctblock); break; case 5: v = binkb_get_value(c, BINKB_SRC_COLORS); @@ -937,6 +946,7 @@ int xoff, yoff; LOCAL_ALIGNED_16(DCTELEM, block, [64]); LOCAL_ALIGNED_16(uint8_t, ublock, [64]); + LOCAL_ALIGNED_16(int32_t, dctblock, [64]); int coordmap[64]; const int stride = c->pic.linesize[plane_idx]; @@ -948,8 +958,9 @@ for (i = 0; i < BINK_NB_SRC; i++) read_bundle(gb, c, i); - ref_start = c->last.data[plane_idx]; - ref_end = c->last.data[plane_idx] + ref_start = c->last.data[plane_idx] ? c->last.data[plane_idx] + : c->pic.data[plane_idx]; + ref_end = ref_start + (bw - 1 + c->last.linesize[plane_idx] * (bh - 1)) * 8; for (i = 0; i < 64; i++) @@ -978,7 +989,8 @@ if (by == bh) break; dst = c->pic.data[plane_idx] + 8*by*stride; - prev = c->last.data[plane_idx] + 8*by*stride; + prev = (c->last.data[plane_idx] ? c->last.data[plane_idx] + : c->pic.data[plane_idx]) + 8*by*stride; for (bx = 0; bx < bw; bx++, dst += 8, prev += 8) { blk = get_value(c, BINK_SRC_BLOCK_TYPES); // 16x16 block type on odd line means part of the already decoded block, so skip it @@ -1019,11 +1031,10 @@ ublock[*scan++] = get_value(c, BINK_SRC_COLORS); break; case INTRA_BLOCK: - c->dsp.clear_block(block); - block[0] = get_value(c, BINK_SRC_INTRA_DC); - read_dct_coeffs(gb, block, c->scantable.permutated, bink_intra_quant, -1); - c->dsp.idct(block); - c->dsp.put_pixels_nonclamped(block, ublock, 8); + memset(dctblock, 0, sizeof(*dctblock) * 64); + dctblock[0] = get_value(c, BINK_SRC_INTRA_DC); + read_dct_coeffs(gb, dctblock, bink_scan, bink_intra_quant, -1); + c->bdsp.idct_put(ublock, 8, dctblock); break; case FILL_BLOCK: v = get_value(c, BINK_SRC_COLORS); @@ -1048,7 +1059,7 @@ return -1; } if (blk != FILL_BLOCK) - c->dsp.scale_block(ublock, dst, stride); + c->bdsp.scale_block(ublock, dst, stride); bx++; dst += 8; prev += 8; @@ -1103,10 +1114,10 @@ c->dsp.add_pixels8(dst, block, stride); break; case INTRA_BLOCK: - c->dsp.clear_block(block); - block[0] = get_value(c, BINK_SRC_INTRA_DC); - read_dct_coeffs(gb, block, c->scantable.permutated, bink_intra_quant, -1); - c->dsp.idct_put(dst, stride, block); + memset(dctblock, 0, sizeof(*dctblock) * 64); + dctblock[0] = get_value(c, BINK_SRC_INTRA_DC); + read_dct_coeffs(gb, dctblock, bink_scan, bink_intra_quant, -1); + c->bdsp.idct_put(dst, stride, dctblock); break; case FILL_BLOCK: v = get_value(c, BINK_SRC_COLORS); @@ -1117,10 +1128,10 @@ yoff = get_value(c, BINK_SRC_Y_OFF); ref = prev + xoff + yoff * stride; c->dsp.put_pixels_tab[1][0](dst, ref, stride, 8); - c->dsp.clear_block(block); - block[0] = get_value(c, BINK_SRC_INTER_DC); - read_dct_coeffs(gb, block, c->scantable.permutated, bink_inter_quant, -1); - c->dsp.idct_add(dst, stride, block); + memset(dctblock, 0, sizeof(*dctblock) * 64); + dctblock[0] = get_value(c, BINK_SRC_INTER_DC); + read_dct_coeffs(gb, dctblock, bink_scan, bink_inter_quant, -1); + c->bdsp.idct_add(dst, stride, dctblock); break; case PATTERN_BLOCK: for (i = 0; i < 2; i++) @@ -1288,7 +1299,7 @@ avctx->idct_algo = FF_IDCT_BINK; dsputil_init(&c->dsp, avctx); - ff_init_scantable(c->dsp.idct_permutation, &c->scantable, bink_scan); + ff_binkdsp_init(&c->bdsp); init_bundles(c); @@ -1316,13 +1327,12 @@ } AVCodec ff_bink_decoder = { - "binkvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_BINKVIDEO, - sizeof(BinkContext), - decode_init, - NULL, - decode_end, - decode_frame, + .name = "binkvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_BINKVIDEO, + .priv_data_size = sizeof(BinkContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, .long_name = NULL_IF_CONFIG_SMALL("Bink video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/binkdata.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/binkdata.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/binkdata.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/binkdata.h 2012-01-11 00:34:30.000000000 +0000 @@ -285,7 +285,7 @@ } }; -static const uint32_t bink_intra_quant[16][64] = { +static const int32_t bink_intra_quant[16][64] = { { 0x010000, 0x016315, 0x01E83D, 0x02A535, 0x014E7B, 0x016577, 0x02F1E6, 0x02724C, 0x010000, 0x00EEDA, 0x024102, 0x017F9B, 0x00BE80, 0x00611E, 0x01083C, 0x00A552, @@ -448,7 +448,7 @@ }, }; -static const uint32_t bink_inter_quant[16][64] = { +static const int32_t bink_inter_quant[16][64] = { { 0x010000, 0x017946, 0x01A5A9, 0x0248DC, 0x016363, 0x0152A7, 0x0243EC, 0x0209EA, 0x012000, 0x00E248, 0x01BBDA, 0x015CBC, 0x00A486, 0x0053E0, 0x00F036, 0x008095, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/binkdsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/binkdsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/binkdsp.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/binkdsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,136 @@ +/* + * Bink DSP routines + * Copyright (c) 2009 Kostya Shishkov + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Bink DSP routines + */ + +#include "dsputil.h" +#include "binkdsp.h" + +#define A1 2896 /* (1/sqrt(2))<<12 */ +#define A2 2217 +#define A3 3784 +#define A4 -5352 + +#define IDCT_TRANSFORM(dest,s0,s1,s2,s3,s4,s5,s6,s7,d0,d1,d2,d3,d4,d5,d6,d7,munge,src) {\ + const int a0 = (src)[s0] + (src)[s4]; \ + const int a1 = (src)[s0] - (src)[s4]; \ + const int a2 = (src)[s2] + (src)[s6]; \ + const int a3 = (A1*((src)[s2] - (src)[s6])) >> 11; \ + const int a4 = (src)[s5] + (src)[s3]; \ + const int a5 = (src)[s5] - (src)[s3]; \ + const int a6 = (src)[s1] + (src)[s7]; \ + const int a7 = (src)[s1] - (src)[s7]; \ + const int b0 = a4 + a6; \ + const int b1 = (A3*(a5 + a7)) >> 11; \ + const int b2 = ((A4*a5) >> 11) - b0 + b1; \ + const int b3 = (A1*(a6 - a4) >> 11) - b2; \ + const int b4 = ((A2*a7) >> 11) + b3 - b1; \ + (dest)[d0] = munge(a0+a2 +b0); \ + (dest)[d1] = munge(a1+a3-a2+b2); \ + (dest)[d2] = munge(a1-a3+a2+b3); \ + (dest)[d3] = munge(a0-a2 -b4); \ + (dest)[d4] = munge(a0-a2 +b4); \ + (dest)[d5] = munge(a1-a3+a2-b3); \ + (dest)[d6] = munge(a1+a3-a2-b2); \ + (dest)[d7] = munge(a0+a2 -b0); \ +} +/* end IDCT_TRANSFORM macro */ + +#define MUNGE_NONE(x) (x) +#define IDCT_COL(dest,src) IDCT_TRANSFORM(dest,0,8,16,24,32,40,48,56,0,8,16,24,32,40,48,56,MUNGE_NONE,src) + +#define MUNGE_ROW(x) (((x) + 0x7F)>>8) +#define IDCT_ROW(dest,src) IDCT_TRANSFORM(dest,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,MUNGE_ROW,src) + +static inline void bink_idct_col(int *dest, const int32_t *src) +{ + if ((src[8]|src[16]|src[24]|src[32]|src[40]|src[48]|src[56])==0) { + dest[0] = + dest[8] = + dest[16] = + dest[24] = + dest[32] = + dest[40] = + dest[48] = + dest[56] = src[0]; + } else { + IDCT_COL(dest, src); + } +} + +static void bink_idct_c(int32_t *block) +{ + int i; + int temp[64]; + + for (i = 0; i < 8; i++) + bink_idct_col(&temp[i], &block[i]); + for (i = 0; i < 8; i++) { + IDCT_ROW( (&block[8*i]), (&temp[8*i]) ); + } +} + +static void bink_idct_add_c(uint8_t *dest, int linesize, int32_t *block) +{ + int i, j; + + bink_idct_c(block); + for (i = 0; i < 8; i++, dest += linesize, block += 8) + for (j = 0; j < 8; j++) + dest[j] += block[j]; +} + +static void bink_idct_put_c(uint8_t *dest, int linesize, int32_t *block) +{ + int i; + int temp[64]; + for (i = 0; i < 8; i++) + bink_idct_col(&temp[i], &block[i]); + for (i = 0; i < 8; i++) { + IDCT_ROW( (&dest[i*linesize]), (&temp[8*i]) ); + } +} + +static void scale_block_c(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align 8*/, int linesize) +{ + int i, j; + uint16_t *dst1 = (uint16_t *) dst; + uint16_t *dst2 = (uint16_t *)(dst + linesize); + + for (j = 0; j < 8; j++) { + for (i = 0; i < 8; i++) { + dst1[i] = dst2[i] = src[i] * 0x0101; + } + src += 8; + dst1 += linesize; + dst2 += linesize; + } +} + +void ff_binkdsp_init(BinkDSPContext *c) +{ + c->idct_add = bink_idct_add_c; + c->idct_put = bink_idct_put_c; + c->scale_block = scale_block_c; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/binkdsp.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/binkdsp.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/binkdsp.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/binkdsp.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,40 @@ +/* + * Bink DSP routines + * Copyright (c) 2009 Kostya Shishkov + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Bink DSP routines + */ + +#ifndef AVCODEC_BINKDSP_H +#define AVCODEC_BINKDSP_H + +#include "dsputil.h" + +typedef struct BinkDSPContext { + void (*idct_put)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/); + void (*idct_add)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/); + void (*scale_block)(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align 8*/, int linesize); +} BinkDSPContext; + +void ff_binkdsp_init(BinkDSPContext *c); + +#endif /* AVCODEC_BINKDSP_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/binkidct.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/binkidct.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/binkidct.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/binkidct.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -/* - * Bink IDCT algorithm - * Copyright (c) 2009 Kostya Shishkov - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * Bink IDCT algorithm - */ - -#include "dsputil.h" - -#define A1 2896 /* (1/sqrt(2))<<12 */ -#define A2 2217 -#define A3 3784 -#define A4 -5352 - -#define IDCT_TRANSFORM(dest,s0,s1,s2,s3,s4,s5,s6,s7,d0,d1,d2,d3,d4,d5,d6,d7,munge,src) {\ - const int a0 = (src)[s0] + (src)[s4]; \ - const int a1 = (src)[s0] - (src)[s4]; \ - const int a2 = (src)[s2] + (src)[s6]; \ - const int a3 = (A1*((src)[s2] - (src)[s6])) >> 11; \ - const int a4 = (src)[s5] + (src)[s3]; \ - const int a5 = (src)[s5] - (src)[s3]; \ - const int a6 = (src)[s1] + (src)[s7]; \ - const int a7 = (src)[s1] - (src)[s7]; \ - const int b0 = a4 + a6; \ - const int b1 = (A3*(a5 + a7)) >> 11; \ - const int b2 = ((A4*a5) >> 11) - b0 + b1; \ - const int b3 = (A1*(a6 - a4) >> 11) - b2; \ - const int b4 = ((A2*a7) >> 11) + b3 - b1; \ - (dest)[d0] = munge(a0+a2 +b0); \ - (dest)[d1] = munge(a1+a3-a2+b2); \ - (dest)[d2] = munge(a1-a3+a2+b3); \ - (dest)[d3] = munge(a0-a2 -b4); \ - (dest)[d4] = munge(a0-a2 +b4); \ - (dest)[d5] = munge(a1-a3+a2-b3); \ - (dest)[d6] = munge(a1+a3-a2-b2); \ - (dest)[d7] = munge(a0+a2 -b0); \ -} -/* end IDCT_TRANSFORM macro */ - -#define MUNGE_NONE(x) (x) -#define IDCT_COL(dest,src) IDCT_TRANSFORM(dest,0,8,16,24,32,40,48,56,0,8,16,24,32,40,48,56,MUNGE_NONE,src) - -#define MUNGE_ROW(x) (((x) + 0x7F)>>8) -#define IDCT_ROW(dest,src) IDCT_TRANSFORM(dest,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,MUNGE_ROW,src) - -static inline void bink_idct_col(int *dest, const DCTELEM *src) -{ - if ((src[8]|src[16]|src[24]|src[32]|src[40]|src[48]|src[56])==0) { - dest[0] = - dest[8] = - dest[16] = - dest[24] = - dest[32] = - dest[40] = - dest[48] = - dest[56] = src[0]; - } else { - IDCT_COL(dest, src); - } -} - -void ff_bink_idct_c(DCTELEM *block) -{ - int i; - int temp[64]; - - for (i = 0; i < 8; i++) - bink_idct_col(&temp[i], &block[i]); - for (i = 0; i < 8; i++) { - IDCT_ROW( (&block[8*i]), (&temp[8*i]) ); - } -} - -void ff_bink_idct_add_c(uint8_t *dest, int linesize, DCTELEM *block) -{ - int i, j; - - ff_bink_idct_c(block); - for (i = 0; i < 8; i++, dest += linesize, block += 8) - for (j = 0; j < 8; j++) - dest[j] += block[j]; -} - -void ff_bink_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block) -{ - int i; - int temp[64]; - for (i = 0; i < 8; i++) - bink_idct_col(&temp[i], &block[i]); - for (i = 0; i < 8; i++) { - IDCT_ROW( (&dest[i*linesize]), (&temp[8*i]) ); - } -} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bit_depth_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bit_depth_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bit_depth_template.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bit_depth_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,91 @@ +/* + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "dsputil.h" + +#ifndef BIT_DEPTH +#define BIT_DEPTH 8 +#endif + +#ifdef AVCODEC_H264_HIGH_DEPTH_H +# undef pixel +# undef pixel2 +# undef pixel4 +# undef dctcoef +# undef INIT_CLIP +# undef no_rnd_avg_pixel4 +# undef rnd_avg_pixel4 +# undef AV_RN2P +# undef AV_RN4P +# undef AV_RN4PA +# undef AV_WN2P +# undef AV_WN4P +# undef AV_WN4PA +# undef CLIP +# undef FUNC +# undef FUNCC +# undef av_clip_pixel +# undef PIXEL_SPLAT_X4 +#else +# define AVCODEC_H264_HIGH_DEPTH_H +#endif + +#if BIT_DEPTH > 8 +# define pixel uint16_t +# define pixel2 uint32_t +# define pixel4 uint64_t +# define dctcoef int32_t + +# define INIT_CLIP +# define no_rnd_avg_pixel4 no_rnd_avg64 +# define rnd_avg_pixel4 rnd_avg64 +# define AV_RN2P AV_RN32 +# define AV_RN4P AV_RN64 +# define AV_RN4PA AV_RN64A +# define AV_WN2P AV_WN32 +# define AV_WN4P AV_WN64 +# define AV_WN4PA AV_WN64A +# define PIXEL_SPLAT_X4(x) ((x)*0x0001000100010001ULL) + +# define av_clip_pixel(a) av_clip_uintp2(a, BIT_DEPTH) +# define CLIP(a) av_clip_uintp2(a, BIT_DEPTH) +#else +# define pixel uint8_t +# define pixel2 uint16_t +# define pixel4 uint32_t +# define dctcoef int16_t + +# define INIT_CLIP uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; +# define no_rnd_avg_pixel4 no_rnd_avg32 +# define rnd_avg_pixel4 rnd_avg32 +# define AV_RN2P AV_RN16 +# define AV_RN4P AV_RN32 +# define AV_RN4PA AV_RN32A +# define AV_WN2P AV_WN16 +# define AV_WN4P AV_WN32 +# define AV_WN4PA AV_WN32A +# define PIXEL_SPLAT_X4(x) ((x)*0x01010101U) + +# define av_clip_pixel(a) av_clip_uint8(a) +# define CLIP(a) cm[a] +#endif + +#define FUNC3(a, b, c) a ## _ ## b ## c +#define FUNC2(a, b, c) FUNC3(a, b, c) +#define FUNC(a) FUNC2(a, BIT_DEPTH,) +#define FUNCC(a) FUNC2(a, BIT_DEPTH, _c) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bitstream.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bitstream.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bitstream.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bitstream.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,13 +41,9 @@ 24, }; -void align_put_bits(PutBitContext *s) +void avpriv_align_put_bits(PutBitContext *s) { -#ifdef ALT_BITSTREAM_WRITER - put_bits(s,( - s->index) & 7,0); -#else put_bits(s,s->bit_left & 7,0); -#endif } void ff_put_string(PutBitContext *pb, const char *string, int terminate_string) @@ -60,7 +56,7 @@ put_bits(pb, 8, 0); } -void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length) +void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length) { int words= length>>4; int bits= length&15; @@ -107,7 +103,7 @@ vlc->table_size += size; if (vlc->table_size > vlc->table_allocated) { if(use_static) - abort(); //cant do anything, init_vlc() is used with too little memory + abort(); // cannot do anything, init_vlc() is used with too little memory vlc->table_allocated += (1 << vlc->bits); vlc->table = av_realloc(vlc->table, sizeof(VLC_TYPE) * 2 * vlc->table_allocated); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bmp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bmp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bmp.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bmp.c 2012-01-11 00:34:30.000000000 +0000 @@ -162,8 +162,18 @@ case 16: if(comp == BMP_RGB) avctx->pix_fmt = PIX_FMT_RGB555; - if(comp == BMP_BITFIELDS) - avctx->pix_fmt = rgb[1] == 0x07E0 ? PIX_FMT_RGB565 : PIX_FMT_RGB555; + else if (comp == BMP_BITFIELDS) { + if (rgb[0] == 0xF800 && rgb[1] == 0x07E0 && rgb[2] == 0x001F) + avctx->pix_fmt = PIX_FMT_RGB565; + else if (rgb[0] == 0x7C00 && rgb[1] == 0x03E0 && rgb[2] == 0x001F) + avctx->pix_fmt = PIX_FMT_RGB555; + else if (rgb[0] == 0x0F00 && rgb[1] == 0x00F0 && rgb[2] == 0x000F) + avctx->pix_fmt = PIX_FMT_RGB444; + else { + av_log(avctx, AV_LOG_ERROR, "Unknown bitfields %0X %0X %0X\n", rgb[0], rgb[1], rgb[2]); + return AVERROR(EINVAL); + } + } break; case 8: if(hsize - ihsize - 14 > 0) @@ -171,17 +181,15 @@ else avctx->pix_fmt = PIX_FMT_GRAY8; break; + case 1: case 4: if(hsize - ihsize - 14 > 0){ avctx->pix_fmt = PIX_FMT_PAL8; }else{ - av_log(avctx, AV_LOG_ERROR, "Unknown palette for 16-colour BMP\n"); + av_log(avctx, AV_LOG_ERROR, "Unknown palette for %d-colour BMP\n", 1<pix_fmt = PIX_FMT_MONOBLACK; - break; default: av_log(avctx, AV_LOG_ERROR, "depth %d not supported\n", depth); return -1; @@ -265,6 +273,22 @@ }else{ switch(depth){ case 1: + for (i = 0; i < avctx->height; i++) { + int j; + for (j = 0; j < n; j++) { + ptr[j*8+0] = buf[j] >> 7; + ptr[j*8+1] = (buf[j] >> 6) & 1; + ptr[j*8+2] = (buf[j] >> 5) & 1; + ptr[j*8+3] = (buf[j] >> 4) & 1; + ptr[j*8+4] = (buf[j] >> 3) & 1; + ptr[j*8+5] = (buf[j] >> 2) & 1; + ptr[j*8+6] = (buf[j] >> 1) & 1; + ptr[j*8+7] = buf[j] & 1; + } + buf += n; + ptr += linesize; + } + break; case 8: case 24: for(i = 0; i < avctx->height; i++){ @@ -336,14 +360,13 @@ } AVCodec ff_bmp_decoder = { - "bmp", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_BMP, - sizeof(BMPContext), - bmp_decode_init, - NULL, - bmp_decode_end, - bmp_decode_frame, - CODEC_CAP_DR1, + .name = "bmp", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_BMP, + .priv_data_size = sizeof(BMPContext), + .init = bmp_decode_init, + .close = bmp_decode_end, + .decode = bmp_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("BMP image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bmpenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bmpenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bmpenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bmpenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,6 +27,7 @@ static const uint32_t monoblack_pal[] = { 0x000000, 0xFFFFFF }; static const uint32_t rgb565_masks[] = { 0xF800, 0x07E0, 0x001F }; +static const uint32_t rgb444_masks[] = { 0x0F00, 0x00F0, 0x000F }; static av_cold int bmp_encode_init(AVCodecContext *avctx){ BMPContext *s = avctx->priv_data; @@ -39,9 +40,8 @@ avctx->bits_per_coded_sample = 24; break; case PIX_FMT_RGB555: - avctx->bits_per_coded_sample = 16; - break; case PIX_FMT_RGB565: + case PIX_FMT_RGB444: avctx->bits_per_coded_sample = 16; break; case PIX_FMT_RGB8: @@ -77,6 +77,11 @@ p->pict_type= AV_PICTURE_TYPE_I; p->key_frame= 1; switch (avctx->pix_fmt) { + case PIX_FMT_RGB444: + compression = BMP_BITFIELDS; + pal = rgb444_masks; // abuse pal to hold color masks + pal_entries = 3; + break; case PIX_FMT_RGB565: compression = BMP_BITFIELDS; pal = rgb565_masks; // abuse pal to hold color masks @@ -150,16 +155,15 @@ } AVCodec ff_bmp_encoder = { - "bmp", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_BMP, - sizeof(BMPContext), - bmp_encode_init, - bmp_encode_frame, - NULL, //encode_end, + .name = "bmp", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_BMP, + .priv_data_size = sizeof(BMPContext), + .init = bmp_encode_init, + .encode = bmp_encode_frame, .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_BGR24, - PIX_FMT_RGB555, PIX_FMT_RGB565, + PIX_FMT_RGB555, PIX_FMT_RGB444, PIX_FMT_RGB565, PIX_FMT_RGB8, PIX_FMT_BGR8, PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, PIX_FMT_GRAY8, PIX_FMT_PAL8, PIX_FMT_MONOBLACK, PIX_FMT_NONE}, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bmv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bmv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bmv.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bmv.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,376 @@ +/* + * Discworld II BMV video and audio decoder + * Copyright (c) 2011 Konstantin Shishkov + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "avcodec.h" +#include "bytestream.h" + +enum BMVFlags{ + BMV_NOP = 0, + BMV_END, + BMV_DELTA, + BMV_INTRA, + + BMV_SCROLL = 0x04, + BMV_PALETTE = 0x08, + BMV_COMMAND = 0x10, + BMV_AUDIO = 0x20, + BMV_EXT = 0x40, + BMV_PRINT = 0x80 +}; + +#define SCREEN_WIDE 640 +#define SCREEN_HIGH 429 + +typedef struct BMVDecContext { + AVCodecContext *avctx; + AVFrame pic; + + uint8_t *frame, frame_base[SCREEN_WIDE * (SCREEN_HIGH + 1)]; + uint32_t pal[256]; + const uint8_t *stream; +} BMVDecContext; + +#define NEXT_BYTE(v) v = forward ? v + 1 : v - 1; + +static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame, int frame_off) +{ + int val, saved_val = 0; + int tmplen = src_len; + const uint8_t *src, *source_end = source + src_len; + uint8_t *frame_end = frame + SCREEN_WIDE * SCREEN_HIGH; + uint8_t *dst, *dst_end; + int len, mask; + int forward = (frame_off <= -SCREEN_WIDE) || (frame_off >= 0); + int read_two_nibbles, flag; + int advance_mode; + int mode = 0; + int i; + + if (src_len <= 0) + return -1; + + if (forward) { + src = source; + dst = frame; + dst_end = frame_end; + } else { + src = source + src_len - 1; + dst = frame_end - 1; + dst_end = frame - 1; + } + for (;;) { + int shift = 0; + flag = 0; + + /* The mode/len decoding is a bit strange: + * values are coded as variable-length codes with nibble units, + * code end is signalled by two top bits in the nibble being nonzero. + * And since data is bytepacked and we read two nibbles at a time, + * we may get a nibble belonging to the next code. + * Hence this convoluted loop. + */ + if (!mode || (tmplen == 4)) { + if (src < source || src >= source_end) + return -1; + val = *src; + read_two_nibbles = 1; + } else { + val = saved_val; + read_two_nibbles = 0; + } + if (!(val & 0xC)) { + for (;;) { + if (!read_two_nibbles) { + if (src < source || src >= source_end) + return -1; + shift += 2; + val |= *src << shift; + if (*src & 0xC) + break; + } + // two upper bits of the nibble is zero, + // so shift top nibble value down into their place + read_two_nibbles = 0; + shift += 2; + mask = (1 << shift) - 1; + val = ((val >> 2) & ~mask) | (val & mask); + NEXT_BYTE(src); + if ((val & (0xC << shift))) { + flag = 1; + break; + } + } + } else if (mode) { + flag = tmplen != 4; + } + if (flag) { + tmplen = 4; + } else { + saved_val = val >> (4 + shift); + tmplen = 0; + val &= (1 << (shift + 4)) - 1; + NEXT_BYTE(src); + } + advance_mode = val & 1; + len = (val >> 1) - 1; + mode += 1 + advance_mode; + if (mode >= 4) + mode -= 3; + if (FFABS(dst_end - dst) < len) + return -1; + switch (mode) { + case 1: + if (forward) { + if (dst - frame + SCREEN_WIDE < frame_off || + frame_end - dst < frame_off + len) + return -1; + for (i = 0; i < len; i++) + dst[i] = dst[frame_off + i]; + dst += len; + } else { + dst -= len; + if (dst - frame + SCREEN_WIDE < frame_off || + frame_end - dst < frame_off + len) + return -1; + for (i = len - 1; i >= 0; i--) + dst[i] = dst[frame_off + i]; + } + break; + case 2: + if (forward) { + if (source + src_len - src < len) + return -1; + memcpy(dst, src, len); + dst += len; + src += len; + } else { + if (src - source < len) + return -1; + dst -= len; + src -= len; + memcpy(dst, src, len); + } + break; + case 3: + val = forward ? dst[-1] : dst[1]; + if (forward) { + memset(dst, val, len); + dst += len; + } else { + dst -= len; + memset(dst, val, len); + } + break; + default: + break; + } + if (dst == dst_end) + return 0; + } + return 0; +} + +static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *pkt) +{ + BMVDecContext * const c = avctx->priv_data; + int type, scr_off; + int i; + uint8_t *srcptr, *outptr; + + c->stream = pkt->data; + type = bytestream_get_byte(&c->stream); + if (type & BMV_AUDIO) { + int blobs = bytestream_get_byte(&c->stream); + if (pkt->size < blobs * 65 + 2) { + av_log(avctx, AV_LOG_ERROR, "Audio data doesn't fit in frame\n"); + return AVERROR_INVALIDDATA; + } + c->stream += blobs * 65; + } + if (type & BMV_COMMAND) { + int command_size = (type & BMV_PRINT) ? 8 : 10; + if (c->stream - pkt->data + command_size > pkt->size) { + av_log(avctx, AV_LOG_ERROR, "Command data doesn't fit in frame\n"); + return AVERROR_INVALIDDATA; + } + c->stream += command_size; + } + if (type & BMV_PALETTE) { + if (c->stream - pkt->data > pkt->size - 768) { + av_log(avctx, AV_LOG_ERROR, "Palette data doesn't fit in frame\n"); + return AVERROR_INVALIDDATA; + } + for (i = 0; i < 256; i++) + c->pal[i] = bytestream_get_be24(&c->stream); + } + if (type & BMV_SCROLL) { + if (c->stream - pkt->data > pkt->size - 2) { + av_log(avctx, AV_LOG_ERROR, "Screen offset data doesn't fit in frame\n"); + return AVERROR_INVALIDDATA; + } + scr_off = (int16_t)bytestream_get_le16(&c->stream); + } else if ((type & BMV_INTRA) == BMV_INTRA) { + scr_off = -640; + } else { + scr_off = 0; + } + + if (decode_bmv_frame(c->stream, pkt->size - (c->stream - pkt->data), c->frame, scr_off)) { + av_log(avctx, AV_LOG_ERROR, "Error decoding frame data\n"); + return AVERROR_INVALIDDATA; + } + + memcpy(c->pic.data[1], c->pal, AVPALETTE_SIZE); + c->pic.palette_has_changed = type & BMV_PALETTE; + + outptr = c->pic.data[0]; + srcptr = c->frame; + + for (i = 0; i < avctx->height; i++) { + memcpy(outptr, srcptr, avctx->width); + srcptr += avctx->width; + outptr += c->pic.linesize[0]; + } + + *data_size = sizeof(AVFrame); + *(AVFrame*)data = c->pic; + + /* always report that the buffer was completely consumed */ + return pkt->size; +} + +static av_cold int decode_init(AVCodecContext *avctx) +{ + BMVDecContext * const c = avctx->priv_data; + + c->avctx = avctx; + avctx->pix_fmt = PIX_FMT_PAL8; + + c->pic.reference = 1; + if (avctx->get_buffer(avctx, &c->pic) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return -1; + } + + c->frame = c->frame_base + 640; + + return 0; +} + +static av_cold int decode_end(AVCodecContext *avctx) +{ + BMVDecContext *c = avctx->priv_data; + + if (c->pic.data[0]) + avctx->release_buffer(avctx, &c->pic); + + return 0; +} + +typedef struct BMVAudioDecContext { + AVFrame frame; +} BMVAudioDecContext; + +static const int bmv_aud_mults[16] = { + 16512, 8256, 4128, 2064, 1032, 516, 258, 192, 129, 88, 64, 56, 48, 40, 36, 32 +}; + +static av_cold int bmv_aud_decode_init(AVCodecContext *avctx) +{ + BMVAudioDecContext *c = avctx->priv_data; + + if (avctx->channels != 2) { + av_log(avctx, AV_LOG_INFO, "invalid number of channels\n"); + return AVERROR(EINVAL); + } + + avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + avcodec_get_frame_defaults(&c->frame); + avctx->coded_frame = &c->frame; + + return 0; +} + +static int bmv_aud_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) +{ + BMVAudioDecContext *c = avctx->priv_data; + const uint8_t *buf = avpkt->data; + int buf_size = avpkt->size; + int blocks = 0, total_blocks, i; + int ret; + int16_t *output_samples; + int scale[2]; + + total_blocks = *buf++; + if (buf_size < total_blocks * 65 + 1) { + av_log(avctx, AV_LOG_ERROR, "expected %d bytes, got %d\n", + total_blocks * 65 + 1, buf_size); + return AVERROR_INVALIDDATA; + } + + /* get output buffer */ + c->frame.nb_samples = total_blocks * 32; + if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + output_samples = (int16_t *)c->frame.data[0]; + + for (blocks = 0; blocks < total_blocks; blocks++) { + uint8_t code = *buf++; + code = (code >> 1) | (code << 7); + scale[0] = bmv_aud_mults[code & 0xF]; + scale[1] = bmv_aud_mults[code >> 4]; + for (i = 0; i < 32; i++) { + *output_samples++ = av_clip_int16((scale[0] * (int8_t)*buf++) >> 5); + *output_samples++ = av_clip_int16((scale[1] * (int8_t)*buf++) >> 5); + } + } + + *got_frame_ptr = 1; + *(AVFrame *)data = c->frame; + + return buf_size; +} + +AVCodec ff_bmv_video_decoder = { + .name = "bmv_video", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_BMV_VIDEO, + .priv_data_size = sizeof(BMVDecContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV video"), +}; + +AVCodec ff_bmv_audio_decoder = { + .name = "bmv_audio", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_BMV_AUDIO, + .priv_data_size = sizeof(BMVAudioDecContext), + .init = bmv_aud_decode_init, + .decode = bmv_aud_decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV audio"), +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bytestream.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bytestream.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/bytestream.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/bytestream.h 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,10 @@ #include "libavutil/common.h" #include "libavutil/intreadwrite.h" +typedef struct { + const uint8_t *buffer, *buffer_end, *buffer_start; +} GetByteContext; + #define DEF_T(type, name, bytes, read, write) \ static av_always_inline type bytestream_get_ ## name(const uint8_t **b){\ (*b) += bytes;\ @@ -34,6 +38,22 @@ static av_always_inline void bytestream_put_ ##name(uint8_t **b, const type value){\ write(*b, value);\ (*b) += bytes;\ +}\ +static av_always_inline type bytestream2_get_ ## name ## u(GetByteContext *g)\ +{\ + return bytestream_get_ ## name(&g->buffer);\ +}\ +static av_always_inline type bytestream2_get_ ## name(GetByteContext *g)\ +{\ + if (g->buffer_end - g->buffer < bytes)\ + return 0;\ + return bytestream2_get_ ## name ## u(g);\ +}\ +static av_always_inline type bytestream2_peek_ ## name(GetByteContext *g)\ +{\ + if (g->buffer_end - g->buffer < bytes)\ + return 0;\ + return read(g->buffer);\ } #define DEF(name, bytes, read, write) \ @@ -55,6 +75,63 @@ #undef DEF64 #undef DEF_T +static av_always_inline void bytestream2_init(GetByteContext *g, + const uint8_t *buf, int buf_size) +{ + g->buffer = buf; + g->buffer_start = buf; + g->buffer_end = buf + buf_size; +} + +static av_always_inline unsigned int bytestream2_get_bytes_left(GetByteContext *g) +{ + return g->buffer_end - g->buffer; +} + +static av_always_inline void bytestream2_skip(GetByteContext *g, + unsigned int size) +{ + g->buffer += FFMIN(g->buffer_end - g->buffer, size); +} + +static av_always_inline int bytestream2_tell(GetByteContext *g) +{ + return (int)(g->buffer - g->buffer_start); +} + +static av_always_inline int bytestream2_seek(GetByteContext *g, int offset, + int whence) +{ + switch (whence) { + case SEEK_CUR: + offset = av_clip(offset, -(g->buffer - g->buffer_start), + g->buffer_end - g->buffer); + g->buffer += offset; + break; + case SEEK_END: + offset = av_clip(offset, -(g->buffer_end - g->buffer_start), 0); + g->buffer = g->buffer_end + offset; + break; + case SEEK_SET: + offset = av_clip(offset, 0, g->buffer_end - g->buffer_start); + g->buffer = g->buffer_start + offset; + break; + default: + return AVERROR(EINVAL); + } + return bytestream2_tell(g); +} + +static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, + uint8_t *dst, + unsigned int size) +{ + int size2 = FFMIN(g->buffer_end - g->buffer, size); + memcpy(dst, g->buffer, size2); + g->buffer += size2; + return size2; +} + static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b, uint8_t *dst, unsigned int size) { memcpy(dst, *b, size); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/c93.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/c93.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/c93.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/c93.c 2012-01-11 00:34:30.000000000 +0000 @@ -243,14 +243,13 @@ } AVCodec ff_c93_decoder = { - "c93", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_C93, - sizeof(C93DecoderContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "c93", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_C93, + .priv_data_size = sizeof(C93DecoderContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Interplay C93"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cabac.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cabac.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cabac.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cabac.c 2012-01-11 00:34:30.000000000 +0000 @@ -75,18 +75,7 @@ 33,33,34,34,35,35,35,36, 36,36,37,37,37,38,38,63, }; -#if 0 -const uint8_t ff_h264_norm_shift_old[128]= { - 7,6,5,5,4,4,4,4,3,3,3,3,3,3,3,3, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -}; -#endif + const uint8_t ff_h264_norm_shift[512]= { 9,8,7,7,6,6,6,6,5,5,5,5,5,5,5,5, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, @@ -120,10 +109,6 @@ c->low= 0; c->range= 0x1FE; c->outstanding_count= 0; -#ifdef STRICT_LIMITS - c->sym_count =0; -#endif - c->pb.bit_left++; //avoids firstBitFlag } @@ -177,6 +162,92 @@ #include "avcodec.h" #include "cabac.h" +static inline void put_cabac_bit(CABACContext *c, int b){ + put_bits(&c->pb, 1, b); + for(;c->outstanding_count; c->outstanding_count--){ + put_bits(&c->pb, 1, 1-b); + } +} + +static inline void renorm_cabac_encoder(CABACContext *c){ + while(c->range < 0x100){ + //FIXME optimize + if(c->low<0x100){ + put_cabac_bit(c, 0); + }else if(c->low<0x200){ + c->outstanding_count++; + c->low -= 0x100; + }else{ + put_cabac_bit(c, 1); + c->low -= 0x200; + } + + c->range+= c->range; + c->low += c->low; + } +} + +static void put_cabac(CABACContext *c, uint8_t * const state, int bit){ + int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + *state]; + + if(bit == ((*state)&1)){ + c->range -= RangeLPS; + *state= ff_h264_mps_state[*state]; + }else{ + c->low += c->range - RangeLPS; + c->range = RangeLPS; + *state= ff_h264_lps_state[*state]; + } + + renorm_cabac_encoder(c); +} + +/** + * @param bit 0 -> write zero bit, !=0 write one bit + */ +static void put_cabac_bypass(CABACContext *c, int bit){ + c->low += c->low; + + if(bit){ + c->low += c->range; + } +//FIXME optimize + if(c->low<0x200){ + put_cabac_bit(c, 0); + }else if(c->low<0x400){ + c->outstanding_count++; + c->low -= 0x200; + }else{ + put_cabac_bit(c, 1); + c->low -= 0x400; + } +} + +/** + * + * @return the number of bytes written + */ +static int put_cabac_terminate(CABACContext *c, int bit){ + c->range -= 2; + + if(!bit){ + renorm_cabac_encoder(c); + }else{ + c->low += c->range; + c->range= 2; + + renorm_cabac_encoder(c); + + assert(c->low <= 0x1FF); + put_cabac_bit(c, c->low>>9); + put_bits(&c->pb, 2, ((c->low>>7)&3)|1); + + flush_put_bits(&c->pb); //FIXME FIXME FIXME XXX wrong + } + + return (put_bits_count(&c->pb)+7)>>3; +} + int main(void){ CABACContext c; uint8_t b[9*SIZE]; @@ -205,18 +276,6 @@ STOP_TIMER("put_cabac") } - for(i=0; ipb, 1, b); - for(;c->outstanding_count; c->outstanding_count--){ - put_bits(&c->pb, 1, 1-b); - } -} - -static inline void renorm_cabac_encoder(CABACContext *c){ - while(c->range < 0x100){ - //FIXME optimize - if(c->low<0x100){ - put_cabac_bit(c, 0); - }else if(c->low<0x200){ - c->outstanding_count++; - c->low -= 0x100; - }else{ - put_cabac_bit(c, 1); - c->low -= 0x200; - } - - c->range+= c->range; - c->low += c->low; - } -} - -#ifdef TEST -static void put_cabac(CABACContext *c, uint8_t * const state, int bit){ - int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + *state]; - - if(bit == ((*state)&1)){ - c->range -= RangeLPS; - *state= ff_h264_mps_state[*state]; - }else{ - c->low += c->range - RangeLPS; - c->range = RangeLPS; - *state= ff_h264_lps_state[*state]; - } - - renorm_cabac_encoder(c); - -#ifdef STRICT_LIMITS - c->symCount++; -#endif -} - -static void put_cabac_static(CABACContext *c, int RangeLPS, int bit){ - assert(c->range > RangeLPS); - - if(!bit){ - c->range -= RangeLPS; - }else{ - c->low += c->range - RangeLPS; - c->range = RangeLPS; - } - - renorm_cabac_encoder(c); - -#ifdef STRICT_LIMITS - c->symCount++; -#endif -} - -/** - * @param bit 0 -> write zero bit, !=0 write one bit - */ -static void put_cabac_bypass(CABACContext *c, int bit){ - c->low += c->low; - - if(bit){ - c->low += c->range; - } -//FIXME optimize - if(c->low<0x200){ - put_cabac_bit(c, 0); - }else if(c->low<0x400){ - c->outstanding_count++; - c->low -= 0x200; - }else{ - put_cabac_bit(c, 1); - c->low -= 0x400; - } - -#ifdef STRICT_LIMITS - c->symCount++; -#endif -} - -/** - * - * @return the number of bytes written - */ -static int put_cabac_terminate(CABACContext *c, int bit){ - c->range -= 2; - - if(!bit){ - renorm_cabac_encoder(c); - }else{ - c->low += c->range; - c->range= 2; - - renorm_cabac_encoder(c); - - assert(c->low <= 0x1FF); - put_cabac_bit(c, c->low>>9); - put_bits(&c->pb, 2, ((c->low>>7)&3)|1); - - flush_put_bits(&c->pb); //FIXME FIXME FIXME XXX wrong - } - -#ifdef STRICT_LIMITS - c->symCount++; -#endif - - return (put_bits_count(&c->pb)+7)>>3; -} - -/** - * put (truncated) unary binarization. - */ -static void put_cabac_u(CABACContext *c, uint8_t * state, int v, int max, int max_index, int truncated){ - int i; - - assert(v <= max); - -#if 1 - for(i=0; i= m){ //FIXME optimize - put_cabac_bypass(c, 1); - v-= m; - m+= m; - } - put_cabac_bypass(c, 0); - while(m>>=1){ - put_cabac_bypass(c, v&m); - } - } - - if(is_signed) - put_cabac_bypass(c, sign); - } -} -#endif /* TEST */ - static void refill(CABACContext *c){ #if CABAC_BITS == 16 c->low+= (c->bytestream[0]<<9) + (c->bytestream[1]<<1); @@ -272,15 +72,6 @@ c->bytestream+= CABAC_BITS/8; } -static inline void renorm_cabac_decoder(CABACContext *c){ - while(c->range < 0x100){ - c->range+= c->range; - c->low+= c->low; - if(!(c->low & CABAC_MASK)) - refill(c); - } -} - static inline void renorm_cabac_decoder_once(CABACContext *c){ int shift= (uint32_t)(c->range - 0x100)>>31; c->range<<= shift; @@ -388,62 +179,4 @@ } } -#if 0 -/** - * Get (truncated) unary binarization. - */ -static int get_cabac_u(CABACContext *c, uint8_t * state, int max, int max_index, int truncated){ - int i; - - for(i=0; i>=1){ - v+= v + get_cabac_bypass(c); - } - i += v; - - if(is_signed && get_cabac_bypass(c)){ - return -i; - }else - return i; -} -#endif /* 0 */ - #endif /* AVCODEC_CABAC_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cavs.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cavs.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cavs.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cavs.c 2012-01-11 00:34:30.000000000 +0000 @@ -333,9 +333,9 @@ const int mx= mv->x + src_x_offset*8; const int my= mv->y + src_y_offset*8; const int luma_xy= (mx&3) + ((my&3)<<2); - uint8_t * src_y = pic->data[0] + (mx>>2) + (my>>2)*h->l_stride; - uint8_t * src_cb= pic->data[1] + (mx>>3) + (my>>3)*h->c_stride; - uint8_t * src_cr= pic->data[2] + (mx>>3) + (my>>3)*h->c_stride; + uint8_t * src_y = pic->f.data[0] + (mx >> 2) + (my >> 2) * h->l_stride; + uint8_t * src_cb = pic->f.data[1] + (mx >> 3) + (my >> 3) * h->c_stride; + uint8_t * src_cr = pic->f.data[2] + (mx >> 3) + (my >> 3) * h->c_stride; int extra_width= 0; //(s->flags&CODEC_FLAG_EMU_EDGE) ? 0 : 16; int extra_height= extra_width; int emu=0; @@ -344,7 +344,7 @@ const int pic_width = 16*h->mb_width; const int pic_height = 16*h->mb_height; - if(!pic->data[0]) + if(!pic->f.data[0]) return; if(mx&7) extra_width -= 3; if(my&7) extra_height -= 3; @@ -602,9 +602,9 @@ h->mbx = 0; h->mby++; /* re-calculate sample pointers */ - h->cy = h->picture.data[0] + h->mby*16*h->l_stride; - h->cu = h->picture.data[1] + h->mby*8*h->c_stride; - h->cv = h->picture.data[2] + h->mby*8*h->c_stride; + h->cy = h->picture.f.data[0] + h->mby * 16 * h->l_stride; + h->cu = h->picture.f.data[1] + h->mby * 8 * h->c_stride; + h->cv = h->picture.f.data[2] + h->mby * 8 * h->c_stride; if(h->mby == h->mb_height) { //frame end return 0; } @@ -629,11 +629,11 @@ h->mv[MV_FWD_X0] = ff_cavs_dir_mv; set_mvs(&h->mv[MV_FWD_X0], BLK_16X16); h->pred_mode_Y[3] = h->pred_mode_Y[6] = NOT_AVAIL; - h->cy = h->picture.data[0]; - h->cu = h->picture.data[1]; - h->cv = h->picture.data[2]; - h->l_stride = h->picture.linesize[0]; - h->c_stride = h->picture.linesize[1]; + h->cy = h->picture.f.data[0]; + h->cu = h->picture.f.data[1]; + h->cv = h->picture.f.data[2]; + h->l_stride = h->picture.f.linesize[0]; + h->c_stride = h->picture.f.linesize[1]; h->luma_scan[2] = 8*h->l_stride; h->luma_scan[3] = 8*h->l_stride+8; h->mbx = h->mby = h->mbidx = 0; @@ -658,8 +658,8 @@ h->top_mv[1] = av_malloc((h->mb_width*2+1)*sizeof(cavs_vector)); h->top_pred_Y = av_malloc( h->mb_width*2*sizeof(*h->top_pred_Y)); h->top_border_y = av_malloc((h->mb_width+1)*16); - h->top_border_u = av_malloc((h->mb_width)*10); - h->top_border_v = av_malloc((h->mb_width)*10); + h->top_border_u = av_malloc( h->mb_width * 10); + h->top_border_v = av_malloc( h->mb_width * 10); /* alloc space for co-located MVs and types */ h->col_mv = av_malloc( h->mb_width*h->mb_height*4*sizeof(cavs_vector)); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cavsdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cavsdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cavsdec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cavsdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -130,12 +130,14 @@ r++; mask = -(level_code & 1); level = (level^mask) - mask; - } else { + } else if (level_code >= 0) { level = r->rltab[level_code][0]; if(!level) //end of block signal break; run = r->rltab[level_code][1]; r += r->rltab[level_code][2]; + } else { + break; } level_buf[i] = level; run_buf[i] = run; @@ -189,7 +191,8 @@ static int decode_mb_i(AVSContext *h, int cbp_code) { GetBitContext *gb = &h->s.gb; - int block, pred_mode_uv; + unsigned pred_mode_uv; + int block; uint8_t top[18]; uint8_t *left = NULL; uint8_t *d; @@ -445,6 +448,8 @@ if((show_bits_long(gb,24+align) & 0xFFFFFF) == 0x000001) { skip_bits_long(gb,24+align); h->stc = get_bits(gb,8); + if (h->stc >= h->mb_height) + return 0; decode_slice_header(h,gb); return 1; } @@ -476,8 +481,8 @@ return -1; } /* make sure we have the reference frames we need */ - if(!h->DPB[0].data[0] || - (!h->DPB[1].data[0] && h->pic_type == AV_PICTURE_TYPE_B)) + if(!h->DPB[0].f.data[0] || + (!h->DPB[1].f.data[0] && h->pic_type == AV_PICTURE_TYPE_B)) return -1; } else { h->pic_type = AV_PICTURE_TYPE_I; @@ -485,7 +490,7 @@ skip_bits(&s->gb,24);//time_code /* old sample clips were all progressive and no low_delay, bump stream revision if detected otherwise */ - if((s->low_delay) || !(show_bits(&s->gb,9) & 1)) + if (s->low_delay || !(show_bits(&s->gb,9) & 1)) h->stream_revision = 1; /* similarly test top_field_first and repeat_first_field */ else if(show_bits(&s->gb,11) & 3) @@ -494,7 +499,7 @@ skip_bits(&s->gb,1); //marker_bit } /* release last B frame */ - if(h->picture.data[0]) + if(h->picture.f.data[0]) s->avctx->release_buffer(s->avctx, (AVFrame *)&h->picture); s->avctx->get_buffer(s->avctx, (AVFrame *)&h->picture); @@ -585,7 +590,7 @@ } while(ff_cavs_next_mb(h)); } if(h->pic_type != AV_PICTURE_TYPE_B) { - if(h->DPB[1].data[0]) + if(h->DPB[1].f.data[0]) s->avctx->release_buffer(s->avctx, (AVFrame *)&h->DPB[1]); h->DPB[1] = h->DPB[0]; h->DPB[0] = h->picture; @@ -619,8 +624,8 @@ s->low_delay = get_bits1(&s->gb); h->mb_width = (s->width + 15) >> 4; h->mb_height = (s->height + 15) >> 4; - h->s.avctx->time_base.den = ff_frame_rate_tab[frame_rate_code].num; - h->s.avctx->time_base.num = ff_frame_rate_tab[frame_rate_code].den; + h->s.avctx->time_base.den = avpriv_frame_rate_tab[frame_rate_code].num; + h->s.avctx->time_base.num = avpriv_frame_rate_tab[frame_rate_code].den; h->s.avctx->width = s->width; h->s.avctx->height = s->height; if(!h->top_qp) @@ -648,7 +653,7 @@ s->avctx = avctx; if (buf_size == 0) { - if(!s->low_delay && h->DPB[0].data[0]) { + if (!s->low_delay && h->DPB[0].f.data[0]) { *data_size = sizeof(AVPicture); *picture = *(AVFrame *) &h->DPB[0]; } @@ -658,8 +663,8 @@ buf_ptr = buf; buf_end = buf + buf_size; for(;;) { - buf_ptr = ff_find_start_code(buf_ptr,buf_end, &stc); - if(stc & 0xFFFFFE00) + buf_ptr = avpriv_mpv_find_start_code(buf_ptr,buf_end, &stc); + if((stc & 0xFFFFFE00) || buf_ptr == buf_end) return FFMAX(0, buf_ptr - buf - s->parse_context.last_index); input_size = (buf_end - buf_ptr)*8; switch(stc) { @@ -669,9 +674,9 @@ break; case PIC_I_START_CODE: if(!h->got_keyframe) { - if(h->DPB[0].data[0]) + if(h->DPB[0].f.data[0]) avctx->release_buffer(avctx, (AVFrame *)&h->DPB[0]); - if(h->DPB[1].data[0]) + if(h->DPB[1].f.data[0]) avctx->release_buffer(avctx, (AVFrame *)&h->DPB[1]); h->got_keyframe = 1; } @@ -685,7 +690,7 @@ break; *data_size = sizeof(AVPicture); if(h->pic_type != AV_PICTURE_TYPE_B) { - if(h->DPB[1].data[0]) { + if(h->DPB[1].f.data[0]) { *picture = *(AVFrame *) &h->DPB[1]; } else { *data_size = 0; @@ -710,15 +715,14 @@ } AVCodec ff_cavs_decoder = { - "cavs", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_CAVS, - sizeof(AVSContext), - ff_cavs_init, - NULL, - ff_cavs_end, - cavs_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DELAY, + .name = "cavs", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_CAVS, + .priv_data_size = sizeof(AVSContext), + .init = ff_cavs_init, + .close = ff_cavs_end, + .decode = cavs_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY, .flush= cavs_flush, .long_name= NULL_IF_CONFIG_SMALL("Chinese AVS video (AVS1-P2, JiZhun profile)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cavs_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cavs_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cavs_parser.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cavs_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,7 +30,7 @@ /** - * finds the end of the current frame in the bitstream. + * Find the end of the current frame in the bitstream. * @return the position of the first byte of the next frame, or -1 */ static int cavs_find_frame_end(ParseContext *pc, const uint8_t *buf, @@ -98,10 +98,9 @@ } AVCodecParser ff_cavsvideo_parser = { - { CODEC_ID_CAVS }, - sizeof(ParseContext1), - NULL, - cavsvideo_parse, - ff_parse1_close, - ff_mpeg4video_split, + .codec_ids = { CODEC_ID_CAVS }, + .priv_data_size = sizeof(ParseContext1), + .parser_parse = cavsvideo_parse, + .parser_close = ff_parse1_close, + .split = ff_mpeg4video_split, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cdgraphics.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cdgraphics.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cdgraphics.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cdgraphics.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,8 +26,8 @@ * @file * @brief CD Graphics Video Decoder * @author Michael Tison - * @sa http://wiki.multimedia.cx/index.php?title=CD_Graphics - * @sa http://www.ccs.neu.edu/home/bchafy/cdb/info/cdg + * @see http://wiki.multimedia.cx/index.php?title=CD_Graphics + * @see http://www.ccs.neu.edu/home/bchafy/cdb/info/cdg */ /// default screen sizes @@ -368,15 +368,13 @@ } AVCodec ff_cdgraphics_decoder = { - "cdgraphics", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_CDGRAPHICS, - sizeof(CDGraphicsContext), - cdg_decode_init, - NULL, - cdg_decode_end, - cdg_decode_frame, - CODEC_CAP_DR1, - .max_lowres = 5, + .name = "cdgraphics", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_CDGRAPHICS, + .priv_data_size = sizeof(CDGraphicsContext), + .init = cdg_decode_init, + .close = cdg_decode_end, + .decode = cdg_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("CD Graphics video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/celp_filters.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/celp_filters.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/celp_filters.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/celp_filters.h 2012-01-11 00:34:30.000000000 +0000 @@ -34,7 +34,7 @@ * * fc_out[n] = sum(i,0,len-1){ fc_in[i] * filter[(len + n - i)%len] } * - * \note fc_in and fc_out should not overlap! + * @note fc_in and fc_out should not overlap! */ void ff_celp_convolve_circ(int16_t *fc_out, const int16_t *fc_in, const int16_t *filter, int len); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/celp_math.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/celp_math.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/celp_math.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/celp_math.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,82 +27,6 @@ #include "avcodec.h" #include "celp_math.h" -#ifdef G729_BITEXACT -/** - * Cosine table: base_cos[i] = (1<<15) * cos(i*PI/64) - */ -static const int16_t base_cos[64] = -{ - 32767, 32729, 32610, 32413, 32138, 31786, 31357, 30853, - 30274, 29622, 28899, 28106, 27246, 26320, 25330, 24279, - 23170, 22006, 20788, 19520, 18205, 16846, 15447, 14010, - 12540, 11039, 9512, 7962, 6393, 4808, 3212, 1608, - 0, -1608, -3212, -4808, -6393, -7962, -9512, -11039, - -12540, -14010, -15447, -16846, -18205, -19520, -20788, -22006, - -23170, -24279, -25330, -26320, -27246, -28106, -28899, -29622, - -30274, -30853, -31357, -31786, -32138, -32413, -32610, -32729 -}; - -/** - * Slope used to compute cos(x) - * - * cos(ind*64+offset) = base_cos[ind]+offset*slope_cos[ind] - * values multiplied by 1<<19 - */ -static const int16_t slope_cos[64] = -{ - -632, -1893, -3150, -4399, -5638, -6863, -8072, -9261, - -10428, -11570, -12684, -13767, -14817, -15832, -16808, -17744, - -18637, -19486, -20287, -21039, -21741, -22390, -22986, -23526, - -24009, -24435, -24801, -25108, -25354, -25540, -25664, -25726, - -25726, -25664, -25540, -25354, -25108, -24801, -24435, -24009, - -23526, -22986, -22390, -21741, -21039, -20287, -19486, -18637, - -17744, -16808, -15832, -14817, -13767, -12684, -11570, -10428, - -9261, -8072, -6863, -5638, -4399, -3150, -1893, -632 -}; - -/** - * Table used to compute exp2(x) - * - * tab_exp2[i] = (1<<14) * exp2(i/32) = 2^(i/32) i=0..32 - */ -static const uint16_t tab_exp2[33] = -{ - 16384, 16743, 17109, 17484, 17867, 18258, 18658, 19066, 19484, 19911, - 20347, 20792, 21247, 21713, 22188, 22674, 23170, 23678, 24196, 24726, - 25268, 25821, 26386, 26964, 27554, 28158, 28774, 29405, 30048, 30706, - 31379, 32066, 32767 -}; - -int16_t ff_cos(uint16_t arg) -{ - uint8_t offset= arg; - uint8_t ind = arg >> 8; - - assert(arg < 0x4000); - - return FFMAX(base_cos[ind] + ((slope_cos[ind] * offset) >> 12), -0x8000); -} - -int ff_exp2(uint16_t power) -{ - uint16_t frac_x0; - uint16_t frac_dx; - int result; - - assert(power <= 0x7fff); - - frac_x0 = power >> 10; - frac_dx = (power & 0x03ff) << 5; - - result = tab_exp2[frac_x0] << 15; - result += frac_dx * (tab_exp2[frac_x0+1] - tab_exp2[frac_x0]); - - return result >> 10; -} - -#else // G729_BITEXACT - /** * Cosine table: base_cos[i] = (1<<15) * cos(i*PI/64) */ @@ -154,8 +78,6 @@ return result + ((result*(power&31)*89)>>22); } -#endif // else G729_BITEXACT - /** * Table used to compute log2(x) * @@ -163,17 +85,10 @@ */ static const uint16_t tab_log2[33] = { -#ifdef G729_BITEXACT - 0, 1455, 2866, 4236, 5568, 6863, 8124, 9352, - 10549, 11716, 12855, 13967, 15054, 16117, 17156, 18172, - 19167, 20142, 21097, 22033, 22951, 23852, 24735, 25603, - 26455, 27291, 28113, 28922, 29716, 30497, 31266, 32023, 32767, -#else 4, 1459, 2870, 4240, 5572, 6867, 8127, 9355, 10552, 11719, 12858, 13971, 15057, 16120, 17158, 18175, 19170, 20145, 21100, 22036, 22954, 23854, 24738, 25605, 26457, 27294, 28116, 28924, 29719, 30500, 31269, 32025, 32769, -#endif }; int ff_log2(uint32_t value) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/celp_math.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/celp_math.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/celp_math.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/celp_math.h 2012-01-11 00:34:30.000000000 +0000 @@ -64,7 +64,7 @@ } /** - * returns the dot product. + * Return the dot product. * @param a input data array * @param b input data array * @param length number of elements diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cinepak.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cinepak.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cinepak.c 2011-04-16 05:56:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cinepak.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,10 +22,11 @@ /** * @file * Cinepak video decoder - * by Ewald Snel - * For more information on the Cinepak algorithm, visit: + * @author Ewald Snel + * + * @see For more information on the Cinepak algorithm, visit: * http://www.csse.monash.edu.au/~timf/ - * For more information on the quirky data inside Sega FILM/CPK files, visit: + * @see For more information on the quirky data inside Sega FILM/CPK files, visit: * http://wiki.multimedia.cx/index.php?title=Sega_FILM */ @@ -147,7 +148,7 @@ for (x=strip->x1; x < strip->x2; x+=4) { if ((chunk_id & 0x01) && !(mask >>= 1)) { if ((data + 4) > eod) - return -1; + return AVERROR_INVALIDDATA; flag = AV_RB32 (data); data += 4; @@ -157,7 +158,7 @@ if (!(chunk_id & 0x01) || (flag & mask)) { if (!(chunk_id & 0x02) && !(mask >>= 1)) { if ((data + 4) > eod) - return -1; + return AVERROR_INVALIDDATA; flag = AV_RB32 (data); data += 4; @@ -166,7 +167,7 @@ if ((chunk_id & 0x02) || (~flag & mask)) { if (data >= eod) - return -1; + return AVERROR_INVALIDDATA; codebook = &strip->v1_codebook[*data++]; s->frame.data[0][iy[0] + 0] = codebook->y0; @@ -207,7 +208,7 @@ } else if (flag & mask) { if ((data + 4) > eod) - return -1; + return AVERROR_INVALIDDATA; codebook = &strip->v4_codebook[*data++]; s->frame.data[0][iy[0] + 0] = codebook->y0; @@ -269,16 +270,16 @@ int chunk_id, chunk_size; /* coordinate sanity checks */ - if (strip->x1 >= s->width || strip->x2 > s->width || - strip->y1 >= s->height || strip->y2 > s->height || + if (strip->x2 > s->width || + strip->y2 > s->height || strip->x1 >= strip->x2 || strip->y1 >= strip->y2) - return -1; + return AVERROR_INVALIDDATA; while ((data + 4) <= eod) { chunk_id = data[0]; chunk_size = AV_RB24 (&data[1]) - 4; if(chunk_size < 0) - return -1; + return AVERROR_INVALIDDATA; data += 4; chunk_size = ((data + chunk_size) > eod) ? (eod - data) : chunk_size; @@ -311,7 +312,7 @@ data += chunk_size; } - return -1; + return AVERROR_INVALIDDATA; } static int cinepak_decode (CinepakContext *s) @@ -322,21 +323,27 @@ int encoded_buf_size; if (s->size < 10) - return -1; + return AVERROR_INVALIDDATA; frame_flags = s->data[0]; num_strips = AV_RB16 (&s->data[8]); - encoded_buf_size = ((s->data[1] << 16) | AV_RB16 (&s->data[2])); + encoded_buf_size = AV_RB24(&s->data[1]); /* if this is the first frame, check for deviant Sega FILM data */ if (s->sega_film_skip_bytes == -1) { - if (encoded_buf_size != s->size) { + if (!encoded_buf_size) { + av_log_ask_for_sample(s->avctx, "encoded_buf_size is 0"); + return AVERROR_INVALIDDATA; + } + if (encoded_buf_size != s->size && (s->size % encoded_buf_size) != 0) { /* If the encoded frame size differs from the frame size as indicated * by the container file, this data likely comes from a Sega FILM/CPK file. * If the frame header is followed by the bytes FE 00 00 06 00 00 then * this is probably one of the two known files that have 6 extra bytes - * after the frame header. Else, assume 2 extra bytes. */ - if ((s->data[10] == 0xFE) && + * after the frame header. Else, assume 2 extra bytes. The container + * size also cannot be a multiple of the encoded size. */ + if (s->size >= 16 && + (s->data[10] == 0xFE) && (s->data[11] == 0x00) && (s->data[12] == 0x00) && (s->data[13] == 0x06) && @@ -351,12 +358,11 @@ s->data += 10 + s->sega_film_skip_bytes; - if (num_strips > MAX_STRIPS) - num_strips = MAX_STRIPS; + num_strips = FFMIN(num_strips, MAX_STRIPS); for (i=0; i < num_strips; i++) { if ((s->data + 12) > eod) - return -1; + return AVERROR_INVALIDDATA; s->strips[i].id = s->data[0]; s->strips[i].y1 = y0; @@ -365,6 +371,8 @@ s->strips[i].x2 = s->avctx->width; strip_size = AV_RB24 (&s->data[1]) - 12; + if (strip_size < 0) + return AVERROR_INVALIDDATA; s->data += 12; strip_size = ((s->data + strip_size) > eod) ? (eod - s->data) : strip_size; @@ -414,7 +422,7 @@ AVPacket *avpkt) { const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; + int ret = 0, buf_size = avpkt->size; CinepakContext *s = avctx->priv_data; s->data = buf; @@ -423,9 +431,9 @@ s->frame.reference = 1; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; - if (avctx->reget_buffer(avctx, &s->frame)) { + if ((ret = avctx->reget_buffer(avctx, &s->frame))) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); - return -1; + return ret; } if (s->palette_video) { @@ -459,14 +467,13 @@ } AVCodec ff_cinepak_decoder = { - "cinepak", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_CINEPAK, - sizeof(CinepakContext), - cinepak_decode_init, - NULL, - cinepak_decode_end, - cinepak_decode_frame, - CODEC_CAP_DR1, + .name = "cinepak", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_CINEPAK, + .priv_data_size = sizeof(CinepakContext), + .init = cinepak_decode_init, + .close = cinepak_decode_end, + .decode = cinepak_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Cinepak"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cljr.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cljr.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cljr.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cljr.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,143 +25,150 @@ */ #include "avcodec.h" -#include "dsputil.h" #include "get_bits.h" +#include "put_bits.h" -/* Disable the encoder. */ -#undef CONFIG_CLJR_ENCODER -#define CONFIG_CLJR_ENCODER 0 - -typedef struct CLJRContext{ - AVCodecContext *avctx; - AVFrame picture; - int delta[16]; - int offset[4]; - GetBitContext gb; +typedef struct CLJRContext { + AVFrame picture; } CLJRContext; +static av_cold int common_init(AVCodecContext *avctx) +{ + CLJRContext * const a = avctx->priv_data; + + avctx->coded_frame = &a->picture; + + return 0; +} + +#if CONFIG_CLJR_DECODER static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; + int buf_size = avpkt->size; CLJRContext * const a = avctx->priv_data; + GetBitContext gb; AVFrame *picture = data; - AVFrame * const p= (AVFrame*)&a->picture; + AVFrame * const p = &a->picture; int x, y; - if(p->data[0]) + if (p->data[0]) avctx->release_buffer(avctx, p); - if(buf_size/avctx->height < avctx->width) { - av_log(avctx, AV_LOG_ERROR, "Resolution larger than buffer size. Invalid header?\n"); - return -1; + if (avctx->height <= 0 || avctx->width <= 0) { + av_log(avctx, AV_LOG_ERROR, "Invalid width or height\n"); + return AVERROR_INVALIDDATA; } - p->reference= 0; - if(avctx->get_buffer(avctx, p) < 0){ + if (buf_size < avctx->height * avctx->width) { + av_log(avctx, AV_LOG_ERROR, + "Resolution larger than buffer size. Invalid header?\n"); + return AVERROR_INVALIDDATA; + } + + p->reference = 0; + if (avctx->get_buffer(avctx, p) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return -1; } - p->pict_type= AV_PICTURE_TYPE_I; - p->key_frame= 1; + p->pict_type = AV_PICTURE_TYPE_I; + p->key_frame = 1; - init_get_bits(&a->gb, buf, buf_size); + init_get_bits(&gb, buf, buf_size * 8); - for(y=0; yheight; y++){ - uint8_t *luma= &a->picture.data[0][ y*a->picture.linesize[0] ]; - uint8_t *cb= &a->picture.data[1][ y*a->picture.linesize[1] ]; - uint8_t *cr= &a->picture.data[2][ y*a->picture.linesize[2] ]; - for(x=0; xwidth; x+=4){ - luma[3] = get_bits(&a->gb, 5) << 3; - luma[2] = get_bits(&a->gb, 5) << 3; - luma[1] = get_bits(&a->gb, 5) << 3; - luma[0] = get_bits(&a->gb, 5) << 3; - luma+= 4; - *(cb++) = get_bits(&a->gb, 6) << 2; - *(cr++) = get_bits(&a->gb, 6) << 2; + for (y = 0; y < avctx->height; y++) { + uint8_t *luma = &a->picture.data[0][y * a->picture.linesize[0]]; + uint8_t *cb = &a->picture.data[1][y * a->picture.linesize[1]]; + uint8_t *cr = &a->picture.data[2][y * a->picture.linesize[2]]; + for (x = 0; x < avctx->width; x += 4) { + luma[3] = get_bits(&gb, 5) << 3; + luma[2] = get_bits(&gb, 5) << 3; + luma[1] = get_bits(&gb, 5) << 3; + luma[0] = get_bits(&gb, 5) << 3; + luma += 4; + *(cb++) = get_bits(&gb, 6) << 2; + *(cr++) = get_bits(&gb, 6) << 2; } } - *picture= *(AVFrame*)&a->picture; + *picture = a->picture; *data_size = sizeof(AVPicture); - emms_c(); - return buf_size; } -#if CONFIG_CLJR_ENCODER -static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ - CLJRContext * const a = avctx->priv_data; - AVFrame *pict = data; - AVFrame * const p= (AVFrame*)&a->picture; - int size; - - *p = *pict; - p->pict_type= AV_PICTURE_TYPE_I; - p->key_frame= 1; - - emms_c(); - - align_put_bits(&a->pb); - while(get_bit_count(&a->pb)&31) - put_bits(&a->pb, 8, 0); - - size= get_bit_count(&a->pb)/32; - - return size*4; +static av_cold int decode_init(AVCodecContext *avctx) +{ + avctx->pix_fmt = PIX_FMT_YUV411P; + return common_init(avctx); } -#endif -static av_cold void common_init(AVCodecContext *avctx){ - CLJRContext * const a = avctx->priv_data; +static av_cold int decode_end(AVCodecContext *avctx) +{ + CLJRContext *a = avctx->priv_data; - avctx->coded_frame= (AVFrame*)&a->picture; - a->avctx= avctx; + if (a->picture.data[0]) + avctx->release_buffer(avctx, &a->picture); + return 0; } -static av_cold int decode_init(AVCodecContext *avctx){ +AVCodec ff_cljr_decoder = { + .name = "cljr", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_CLJR, + .priv_data_size = sizeof(CLJRContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"), +}; +#endif - common_init(avctx); +#if CONFIG_CLJR_ENCODER +static int encode_frame(AVCodecContext *avctx, unsigned char *buf, + int buf_size, void *data) +{ + PutBitContext pb; + AVFrame *p = data; + int x, y; - avctx->pix_fmt= PIX_FMT_YUV411P; + p->pict_type = AV_PICTURE_TYPE_I; + p->key_frame = 1; - return 0; -} + init_put_bits(&pb, buf, buf_size / 8); -#if CONFIG_CLJR_ENCODER -static av_cold int encode_init(AVCodecContext *avctx){ + for (y = 0; y < avctx->height; y++) { + uint8_t *luma = &p->data[0][y * p->linesize[0]]; + uint8_t *cb = &p->data[1][y * p->linesize[1]]; + uint8_t *cr = &p->data[2][y * p->linesize[2]]; + for (x = 0; x < avctx->width; x += 4) { + put_bits(&pb, 5, luma[3] >> 3); + put_bits(&pb, 5, luma[2] >> 3); + put_bits(&pb, 5, luma[1] >> 3); + put_bits(&pb, 5, luma[0] >> 3); + luma += 4; + put_bits(&pb, 6, *(cb++) >> 2); + put_bits(&pb, 6, *(cr++) >> 2); + } + } - common_init(avctx); + flush_put_bits(&pb); - return 0; + return put_bits_count(&pb) / 8; } -#endif -AVCodec ff_cljr_decoder = { - "cljr", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_CLJR, - sizeof(CLJRContext), - decode_init, - NULL, - NULL, - decode_frame, - CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"), -}; - -#if CONFIG_CLJR_ENCODER AVCodec ff_cljr_encoder = { - "cljr", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_CLJR, - sizeof(CLJRContext), - encode_init, - encode_frame, - //encode_end, - .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"), + .name = "cljr", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_CLJR, + .priv_data_size = sizeof(CLJRContext), + .init = common_init, + .encode = encode_frame, + .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_YUV411P, + PIX_FMT_NONE }, + .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"), }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cook.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cook.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cook.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cook.c 2012-01-11 00:34:30.000000000 +0000 @@ -42,12 +42,7 @@ * available. */ -#include -#include -#include - #include "libavutil/lfg.h" -#include "libavutil/random_seed.h" #include "avcodec.h" #include "get_bits.h" #include "dsputil.h" @@ -62,7 +57,7 @@ #define MONO 0x1000001 #define STEREO 0x1000002 #define JOINT_STEREO 0x1000003 -#define MC_COOK 0x2000000 //multichannel Cook, not supported +#define MC_COOK 0x2000000 // multichannel Cook, not supported #define SUBBAND_SIZE 20 #define MAX_SUBPACKETS 5 @@ -107,26 +102,27 @@ * The following 5 functions provide the lowlevel arithmetic on * the internal audio buffers. */ - void (* scalar_dequant)(struct cook *q, int index, int quant_index, - int* subband_coef_index, int* subband_coef_sign, - float* mlt_p); - - void (* decouple) (struct cook *q, - COOKSubpacket *p, - int subband, - float f1, float f2, - float *decode_buffer, - float *mlt_buffer1, float *mlt_buffer2); + void (*scalar_dequant)(struct cook *q, int index, int quant_index, + int *subband_coef_index, int *subband_coef_sign, + float *mlt_p); + + void (*decouple)(struct cook *q, + COOKSubpacket *p, + int subband, + float f1, float f2, + float *decode_buffer, + float *mlt_buffer1, float *mlt_buffer2); - void (* imlt_window) (struct cook *q, float *buffer1, - cook_gains *gains_ptr, float *previous_buffer); + void (*imlt_window)(struct cook *q, float *buffer1, + cook_gains *gains_ptr, float *previous_buffer); - void (* interpolate) (struct cook *q, float* buffer, - int gain_index, int gain_index_next); + void (*interpolate)(struct cook *q, float *buffer, + int gain_index, int gain_index_next); - void (* saturate_output) (struct cook *q, int chan, int16_t *out); + void (*saturate_output)(struct cook *q, int chan, float *out); AVCodecContext* avctx; + AVFrame frame; GetBitContext gb; /* stream data */ int nb_channels; @@ -136,6 +132,7 @@ int samples_per_channel; /* states */ AVLFG random_state; + int discarded_packets; /* transform data */ FFTContext mdct_ctx; @@ -143,7 +140,7 @@ /* VLC data */ VLC envelope_quant_index[13]; - VLC sqvh[7]; //scalar quantization + VLC sqvh[7]; // scalar quantization /* generatable tables and related variables */ int gain_size_factor; @@ -168,92 +165,96 @@ /*************** init functions ***************/ /* table generator */ -static av_cold void init_pow2table(void){ +static av_cold void init_pow2table(void) +{ int i; - for (i=-63 ; i<64 ; i++){ - pow2tab[63+i]= pow(2, i); - rootpow2tab[63+i]=sqrt(pow(2, i)); + for (i = -63; i < 64; i++) { + pow2tab[63 + i] = pow(2, i); + rootpow2tab[63 + i] = sqrt(pow(2, i)); } } /* table generator */ -static av_cold void init_gain_table(COOKContext *q) { +static av_cold void init_gain_table(COOKContext *q) +{ int i; - q->gain_size_factor = q->samples_per_channel/8; - for (i=0 ; i<23 ; i++) { - q->gain_table[i] = pow(pow2tab[i+52] , - (1.0/(double)q->gain_size_factor)); - } + q->gain_size_factor = q->samples_per_channel / 8; + for (i = 0; i < 23; i++) + q->gain_table[i] = pow(pow2tab[i + 52], + (1.0 / (double) q->gain_size_factor)); } -static av_cold int init_cook_vlc_tables(COOKContext *q) { +static av_cold int init_cook_vlc_tables(COOKContext *q) +{ int i, result; result = 0; - for (i=0 ; i<13 ; i++) { - result |= init_vlc (&q->envelope_quant_index[i], 9, 24, - envelope_quant_index_huffbits[i], 1, 1, - envelope_quant_index_huffcodes[i], 2, 2, 0); + for (i = 0; i < 13; i++) { + result |= init_vlc(&q->envelope_quant_index[i], 9, 24, + envelope_quant_index_huffbits[i], 1, 1, + envelope_quant_index_huffcodes[i], 2, 2, 0); } - av_log(q->avctx,AV_LOG_DEBUG,"sqvh VLC init\n"); - for (i=0 ; i<7 ; i++) { - result |= init_vlc (&q->sqvh[i], vhvlcsize_tab[i], vhsize_tab[i], - cvh_huffbits[i], 1, 1, - cvh_huffcodes[i], 2, 2, 0); + av_log(q->avctx, AV_LOG_DEBUG, "sqvh VLC init\n"); + for (i = 0; i < 7; i++) { + result |= init_vlc(&q->sqvh[i], vhvlcsize_tab[i], vhsize_tab[i], + cvh_huffbits[i], 1, 1, + cvh_huffcodes[i], 2, 2, 0); } - for(i=0;inum_subpackets;i++){ - if (q->subpacket[i].joint_stereo==1){ - result |= init_vlc (&q->subpacket[i].ccpl, 6, (1<subpacket[i].js_vlc_bits)-1, - ccpl_huffbits[q->subpacket[i].js_vlc_bits-2], 1, 1, - ccpl_huffcodes[q->subpacket[i].js_vlc_bits-2], 2, 2, 0); - av_log(q->avctx,AV_LOG_DEBUG,"subpacket %i Joint-stereo VLC used.\n",i); + for (i = 0; i < q->num_subpackets; i++) { + if (q->subpacket[i].joint_stereo == 1) { + result |= init_vlc(&q->subpacket[i].ccpl, 6, (1 << q->subpacket[i].js_vlc_bits) - 1, + ccpl_huffbits[q->subpacket[i].js_vlc_bits - 2], 1, 1, + ccpl_huffcodes[q->subpacket[i].js_vlc_bits - 2], 2, 2, 0); + av_log(q->avctx, AV_LOG_DEBUG, "subpacket %i Joint-stereo VLC used.\n", i); } } - av_log(q->avctx,AV_LOG_DEBUG,"VLC tables initialized.\n"); + av_log(q->avctx, AV_LOG_DEBUG, "VLC tables initialized.\n"); return result; } -static av_cold int init_cook_mlt(COOKContext *q) { - int j; +static av_cold int init_cook_mlt(COOKContext *q) +{ + int j, ret; int mlt_size = q->samples_per_channel; - if ((q->mlt_window = av_malloc(sizeof(float)*mlt_size)) == 0) - return -1; + if ((q->mlt_window = av_malloc(mlt_size * sizeof(*q->mlt_window))) == 0) + return AVERROR(ENOMEM); /* Initialize the MLT window: simple sine window. */ ff_sine_window_init(q->mlt_window, mlt_size); - for(j=0 ; jmlt_window[j] *= sqrt(2.0 / q->samples_per_channel); /* Initialize the MDCT. */ - if (ff_mdct_init(&q->mdct_ctx, av_log2(mlt_size)+1, 1, 1.0)) { - av_free(q->mlt_window); - return -1; + if ((ret = ff_mdct_init(&q->mdct_ctx, av_log2(mlt_size) + 1, 1, 1.0 / 32768.0))) { + av_free(q->mlt_window); + return ret; } - av_log(q->avctx,AV_LOG_DEBUG,"MDCT initialized, order = %d.\n", - av_log2(mlt_size)+1); + av_log(q->avctx, AV_LOG_DEBUG, "MDCT initialized, order = %d.\n", + av_log2(mlt_size) + 1); return 0; } -static const float *maybe_reformat_buffer32 (COOKContext *q, const float *ptr, int n) +static const float *maybe_reformat_buffer32(COOKContext *q, const float *ptr, int n) { if (1) return ptr; } -static av_cold void init_cplscales_table (COOKContext *q) { +static av_cold void init_cplscales_table(COOKContext *q) +{ int i; - for (i=0;i<5;i++) - q->cplscales[i] = maybe_reformat_buffer32 (q, cplscales[i], (1<<(i+2))-1); + for (i = 0; i < 5; i++) + q->cplscales[i] = maybe_reformat_buffer32(q, cplscales[i], (1 << (i + 2)) - 1); } /*************** init functions end ***********/ -#define DECODE_BYTES_PAD1(bytes) (3 - ((bytes)+3) % 4) +#define DECODE_BYTES_PAD1(bytes) (3 - ((bytes) + 3) % 4) #define DECODE_BYTES_PAD2(bytes) ((bytes) % 4 + DECODE_BYTES_PAD1(2 * (bytes))) /** @@ -276,23 +277,27 @@ * @param out pointer to byte array of outdata * @param bytes number of bytes */ - -static inline int decode_bytes(const uint8_t* inbuffer, uint8_t* out, int bytes){ +static inline int decode_bytes(const uint8_t *inbuffer, uint8_t *out, int bytes) +{ + static const uint32_t tab[4] = { + AV_BE2NE32C(0x37c511f2), AV_BE2NE32C(0xf237c511), + AV_BE2NE32C(0x11f237c5), AV_BE2NE32C(0xc511f237), + }; int i, off; uint32_t c; - const uint32_t* buf; - uint32_t* obuf = (uint32_t*) out; + const uint32_t *buf; + uint32_t *obuf = (uint32_t *) out; /* FIXME: 64 bit platforms would be able to do 64 bits at a time. * I'm too lazy though, should be something like - * for(i=0 ; i> (off*8)) | (0x37c511f2 << (32-(off*8)))); + off = (intptr_t) inbuffer & 3; + buf = (const uint32_t *) (inbuffer - off); + c = tab[off]; bytes += 3 + off; - for (i = 0; i < bytes/4; i++) + for (i = 0; i < bytes / 4; i++) obuf[i] = c ^ buf[i]; return off; @@ -301,12 +306,11 @@ /** * Cook uninit */ - static av_cold int cook_decode_close(AVCodecContext *avctx) { int i; COOKContext *q = avctx->priv_data; - av_log(avctx,AV_LOG_DEBUG, "Deallocating memory.\n"); + av_log(avctx, AV_LOG_DEBUG, "Deallocating memory.\n"); /* Free allocated memory buffers. */ av_free(q->mlt_window); @@ -316,17 +320,14 @@ ff_mdct_end(&q->mdct_ctx); /* Free the VLC tables. */ - for (i=0 ; i<13 ; i++) { + for (i = 0; i < 13; i++) free_vlc(&q->envelope_quant_index[i]); - } - for (i=0 ; i<7 ; i++) { + for (i = 0; i < 7; i++) free_vlc(&q->sqvh[i]); - } - for (i=0 ; inum_subpackets ; i++) { + for (i = 0; i < q->num_subpackets; i++) free_vlc(&q->subpacket[i].ccpl); - } - av_log(avctx,AV_LOG_DEBUG,"Memory deallocated.\n"); + av_log(avctx, AV_LOG_DEBUG, "Memory deallocated.\n"); return 0; } @@ -335,24 +336,28 @@ * Fill the gain array for the timedomain quantization. * * @param gb pointer to the GetBitContext - * @param gaininfo[9] array of gain indexes + * @param gaininfo array[9] of gain indexes */ - static void decode_gain_info(GetBitContext *gb, int *gaininfo) { int i, n; - while (get_bits1(gb)) {} - n = get_bits_count(gb) - 1; //amount of elements*2 to update + while (get_bits1(gb)) { + /* NOTHING */ + } + + n = get_bits_count(gb) - 1; // amount of elements*2 to update i = 0; while (n--) { int index = get_bits(gb, 3); int gain = get_bits1(gb) ? get_bits(gb, 4) - 7 : -1; - while (i <= index) gaininfo[i++] = gain; + while (i <= index) + gaininfo[i++] = gain; } - while (i <= 8) gaininfo[i++] = 0; + while (i <= 8) + gaininfo[i++] = 0; } /** @@ -361,25 +366,28 @@ * @param q pointer to the COOKContext * @param quant_index_table pointer to the array */ +static void decode_envelope(COOKContext *q, COOKSubpacket *p, + int *quant_index_table) +{ + int i, j, vlc_index; -static void decode_envelope(COOKContext *q, COOKSubpacket *p, int* quant_index_table) { - int i,j, vlc_index; - - quant_index_table[0]= get_bits(&q->gb,6) - 6; //This is used later in categorize + quant_index_table[0] = get_bits(&q->gb, 6) - 6; // This is used later in categorize - for (i=1 ; i < p->total_subbands ; i++){ - vlc_index=i; + for (i = 1; i < p->total_subbands; i++) { + vlc_index = i; if (i >= p->js_subband_start * 2) { - vlc_index-=p->js_subband_start; + vlc_index -= p->js_subband_start; } else { - vlc_index/=2; - if(vlc_index < 1) vlc_index = 1; - } - if (vlc_index>13) vlc_index = 13; //the VLC tables >13 are identical to No. 13 - - j = get_vlc2(&q->gb, q->envelope_quant_index[vlc_index-1].table, - q->envelope_quant_index[vlc_index-1].bits,2); - quant_index_table[i] = quant_index_table[i-1] + j - 12; //differential encoding + vlc_index /= 2; + if (vlc_index < 1) + vlc_index = 1; + } + if (vlc_index > 13) + vlc_index = 13; // the VLC tables >13 are identical to No. 13 + + j = get_vlc2(&q->gb, q->envelope_quant_index[vlc_index - 1].table, + q->envelope_quant_index[vlc_index - 1].bits, 2); + quant_index_table[i] = quant_index_table[i - 1] + j - 12; // differential encoding } } @@ -391,48 +399,47 @@ * @param category pointer to the category array * @param category_index pointer to the category_index array */ - -static void categorize(COOKContext *q, COOKSubpacket *p, int* quant_index_table, - int* category, int* category_index){ +static void categorize(COOKContext *q, COOKSubpacket *p, int *quant_index_table, + int *category, int *category_index) +{ int exp_idx, bias, tmpbias1, tmpbias2, bits_left, num_bits, index, v, i, j; int exp_index2[102]; int exp_index1[102]; - int tmp_categorize_array[128*2]; - int tmp_categorize_array1_idx=p->numvector_size; - int tmp_categorize_array2_idx=p->numvector_size; + int tmp_categorize_array[128 * 2]; + int tmp_categorize_array1_idx = p->numvector_size; + int tmp_categorize_array2_idx = p->numvector_size; - bits_left = p->bits_per_subpacket - get_bits_count(&q->gb); + bits_left = p->bits_per_subpacket - get_bits_count(&q->gb); - if(bits_left > q->samples_per_channel) { + if (bits_left > q->samples_per_channel) { bits_left = q->samples_per_channel + - ((bits_left - q->samples_per_channel)*5)/8; + ((bits_left - q->samples_per_channel) * 5) / 8; //av_log(q->avctx, AV_LOG_ERROR, "bits_left = %d\n",bits_left); } - memset(&exp_index1,0,102*sizeof(int)); - memset(&exp_index2,0,102*sizeof(int)); - memset(&tmp_categorize_array,0,128*2*sizeof(int)); + memset(&exp_index1, 0, sizeof(exp_index1)); + memset(&exp_index2, 0, sizeof(exp_index2)); + memset(&tmp_categorize_array, 0, sizeof(tmp_categorize_array)); - bias=-32; + bias = -32; /* Estimate bias. */ - for (i=32 ; i>0 ; i=i/2){ + for (i = 32; i > 0; i = i / 2) { num_bits = 0; - index = 0; - for (j=p->total_subbands ; j>0 ; j--){ + index = 0; + for (j = p->total_subbands; j > 0; j--) { exp_idx = av_clip((i - quant_index_table[index] + bias) / 2, 0, 7); index++; - num_bits+=expbits_tab[exp_idx]; - } - if(num_bits >= bits_left - 32){ - bias+=i; + num_bits += expbits_tab[exp_idx]; } + if (num_bits >= bits_left - 32) + bias += i; } /* Calculate total number of bits. */ - num_bits=0; - for (i=0 ; itotal_subbands ; i++) { + num_bits = 0; + for (i = 0; i < p->total_subbands; i++) { exp_idx = av_clip((bias - quant_index_table[i]) / 2, 0, 7); num_bits += expbits_tab[exp_idx]; exp_index1[i] = exp_idx; @@ -440,50 +447,51 @@ } tmpbias1 = tmpbias2 = num_bits; - for (j = 1 ; j < p->numvector_size ; j++) { - if (tmpbias1 + tmpbias2 > 2*bits_left) { /* ---> */ + for (j = 1; j < p->numvector_size; j++) { + if (tmpbias1 + tmpbias2 > 2 * bits_left) { /* ---> */ int max = -999999; - index=-1; - for (i=0 ; itotal_subbands ; i++){ + index = -1; + for (i = 0; i < p->total_subbands; i++) { if (exp_index1[i] < 7) { - v = (-2*exp_index1[i]) - quant_index_table[i] + bias; - if ( v >= max) { - max = v; + v = (-2 * exp_index1[i]) - quant_index_table[i] + bias; + if (v >= max) { + max = v; index = i; } } } - if(index==-1)break; + if (index == -1) + break; tmp_categorize_array[tmp_categorize_array1_idx++] = index; tmpbias1 -= expbits_tab[exp_index1[index]] - - expbits_tab[exp_index1[index]+1]; + expbits_tab[exp_index1[index] + 1]; ++exp_index1[index]; } else { /* <--- */ int min = 999999; - index=-1; - for (i=0 ; itotal_subbands ; i++){ - if(exp_index2[i] > 0){ - v = (-2*exp_index2[i])-quant_index_table[i]+bias; - if ( v < min) { - min = v; + index = -1; + for (i = 0; i < p->total_subbands; i++) { + if (exp_index2[i] > 0) { + v = (-2 * exp_index2[i]) - quant_index_table[i] + bias; + if (v < min) { + min = v; index = i; } } } - if(index == -1)break; + if (index == -1) + break; tmp_categorize_array[--tmp_categorize_array2_idx] = index; tmpbias2 -= expbits_tab[exp_index2[index]] - - expbits_tab[exp_index2[index]-1]; + expbits_tab[exp_index2[index] - 1]; --exp_index2[index]; } } - for(i=0 ; itotal_subbands ; i++) + for (i = 0; i < p->total_subbands; i++) category[i] = exp_index2[i]; - for(i=0 ; inumvector_size-1 ; i++) + for (i = 0; i < p->numvector_size - 1; i++) category_index[i] = tmp_categorize_array[tmp_categorize_array2_idx++]; - } @@ -494,13 +502,12 @@ * @param category pointer to the category array * @param category_index pointer to the category_index array */ - -static inline void expand_category(COOKContext *q, int* category, - int* category_index){ +static inline void expand_category(COOKContext *q, int *category, + int *category_index) +{ int i; - for(i=0 ; inum_vectors ; i++){ + for (i = 0; i < q->num_vectors; i++) ++category[category_index[i]]; - } } /** @@ -513,23 +520,25 @@ * @param subband_coef_sign signs of coefficients * @param mlt_p pointer into the mlt buffer */ - static void scalar_dequant_float(COOKContext *q, int index, int quant_index, - int* subband_coef_index, int* subband_coef_sign, - float* mlt_p){ + int *subband_coef_index, int *subband_coef_sign, + float *mlt_p) +{ int i; float f1; - for(i=0 ; irandom_state) < 0x80000000) f1 = -f1; + if (av_lfg_get(&q->random_state) < 0x80000000) + f1 = -f1; } - mlt_p[i] = f1 * rootpow2tab[quant_index+63]; + mlt_p[i] = f1 * rootpow2tab[quant_index + 63]; } } /** @@ -540,35 +549,35 @@ * @param subband_coef_index array of indexes to quant_centroid_tab * @param subband_coef_sign signs of coefficients */ - -static int unpack_SQVH(COOKContext *q, COOKSubpacket *p, int category, int* subband_coef_index, - int* subband_coef_sign) { - int i,j; - int vlc, vd ,tmp, result; +static int unpack_SQVH(COOKContext *q, COOKSubpacket *p, int category, + int *subband_coef_index, int *subband_coef_sign) +{ + int i, j; + int vlc, vd, tmp, result; vd = vd_tab[category]; result = 0; - for(i=0 ; igb, q->sqvh[category].table, q->sqvh[category].bits, 3); - if (p->bits_per_subpacket < get_bits_count(&q->gb)){ + if (p->bits_per_subpacket < get_bits_count(&q->gb)) { vlc = 0; result = 1; } - for(j=vd-1 ; j>=0 ; j--){ - tmp = (vlc * invradix_tab[category])/0x100000; - subband_coef_index[vd*i+j] = vlc - tmp * (kmax_tab[category]+1); + for (j = vd - 1; j >= 0; j--) { + tmp = (vlc * invradix_tab[category]) / 0x100000; + subband_coef_index[vd * i + j] = vlc - tmp * (kmax_tab[category] + 1); vlc = tmp; } - for(j=0 ; jgb) < p->bits_per_subpacket){ - subband_coef_sign[i*vd+j] = get_bits1(&q->gb); + for (j = 0; j < vd; j++) { + if (subband_coef_index[i * vd + j]) { + if (get_bits_count(&q->gb) < p->bits_per_subpacket) { + subband_coef_sign[i * vd + j] = get_bits1(&q->gb); } else { - result=1; - subband_coef_sign[i*vd+j]=0; + result = 1; + subband_coef_sign[i * vd + j] = 0; } } else { - subband_coef_sign[i*vd+j]=0; + subband_coef_sign[i * vd + j] = 0; } } } @@ -584,10 +593,9 @@ * @param quant_index_table pointer to the array * @param mlt_buffer pointer to mlt coefficients */ - - -static void decode_vectors(COOKContext* q, COOKSubpacket* p, int* category, - int *quant_index_table, float* mlt_buffer){ +static void decode_vectors(COOKContext *q, COOKSubpacket *p, int *category, + int *quant_index_table, float *mlt_buffer) +{ /* A zero in this table means that the subband coefficient is random noise coded. */ int subband_coef_index[SUBBAND_SIZE]; @@ -595,28 +603,29 @@ positive multiplicator. */ int subband_coef_sign[SUBBAND_SIZE]; int band, j; - int index=0; + int index = 0; - for(band=0 ; bandtotal_subbands ; band++){ + for (band = 0; band < p->total_subbands; band++) { index = category[band]; - if(category[band] < 7){ - if(unpack_SQVH(q, p, category[band], subband_coef_index, subband_coef_sign)){ - index=7; - for(j=0 ; jtotal_subbands ; j++) category[band+j]=7; + if (category[band] < 7) { + if (unpack_SQVH(q, p, category[band], subband_coef_index, subband_coef_sign)) { + index = 7; + for (j = 0; j < p->total_subbands; j++) + category[band + j] = 7; } } - if(index>=7) { + if (index >= 7) { memset(subband_coef_index, 0, sizeof(subband_coef_index)); - memset(subband_coef_sign, 0, sizeof(subband_coef_sign)); + memset(subband_coef_sign, 0, sizeof(subband_coef_sign)); } q->scalar_dequant(q, index, quant_index_table[band], subband_coef_index, subband_coef_sign, &mlt_buffer[band * SUBBAND_SIZE]); } - if(p->total_subbands*SUBBAND_SIZE >= q->samples_per_channel){ + /* FIXME: should this be removed, or moved into loop above? */ + if (p->total_subbands * SUBBAND_SIZE >= q->samples_per_channel) return; - } /* FIXME: should this be removed, or moved into loop above? */ } @@ -626,18 +635,17 @@ * @param q pointer to the COOKContext * @param mlt_buffer pointer to mlt coefficients */ - -static void mono_decode(COOKContext *q, COOKSubpacket *p, float* mlt_buffer) { - +static void mono_decode(COOKContext *q, COOKSubpacket *p, float *mlt_buffer) +{ int category_index[128]; int quant_index_table[102]; int category[128]; - memset(&category, 0, 128*sizeof(int)); - memset(&category_index, 0, 128*sizeof(int)); + memset(&category, 0, sizeof(category)); + memset(&category_index, 0, sizeof(category_index)); decode_envelope(q, p, quant_index_table); - q->num_vectors = get_bits(&q->gb,p->log2_numvector_size); + q->num_vectors = get_bits(&q->gb, p->log2_numvector_size); categorize(q, p, quant_index_table, category, category_index); expand_category(q, category, category_index); decode_vectors(q, p, category, quant_index_table, mlt_buffer); @@ -652,25 +660,22 @@ * @param gain_index index for the block multiplier * @param gain_index_next index for the next block multiplier */ - -static void interpolate_float(COOKContext *q, float* buffer, - int gain_index, int gain_index_next){ +static void interpolate_float(COOKContext *q, float *buffer, + int gain_index, int gain_index_next) +{ int i; float fc1, fc2; - fc1 = pow2tab[gain_index+63]; + fc1 = pow2tab[gain_index + 63]; - if(gain_index == gain_index_next){ //static gain - for(i=0 ; igain_size_factor ; i++){ - buffer[i]*=fc1; - } - return; - } else { //smooth gain - fc2 = q->gain_table[11 + (gain_index_next-gain_index)]; - for(i=0 ; igain_size_factor ; i++){ - buffer[i]*=fc1; - fc1*=fc2; + if (gain_index == gain_index_next) { // static gain + for (i = 0; i < q->gain_size_factor; i++) + buffer[i] *= fc1; + } else { // smooth gain + fc2 = q->gain_table[11 + (gain_index_next - gain_index)]; + for (i = 0; i < q->gain_size_factor; i++) { + buffer[i] *= fc1; + fc1 *= fc2; } - return; } } @@ -682,9 +687,8 @@ * @param gains_ptr current and previous gains * @param previous_buffer pointer to the previous buffer to be used for overlapping */ - -static void imlt_window_float (COOKContext *q, float *inbuffer, - cook_gains *gains_ptr, float *previous_buffer) +static void imlt_window_float(COOKContext *q, float *inbuffer, + cook_gains *gains_ptr, float *previous_buffer) { const float fc = pow2tab[gains_ptr->previous[0] + 63]; int i; @@ -695,10 +699,9 @@ */ /* Apply window and overlap */ - for(i = 0; i < q->samples_per_channel; i++){ + for (i = 0; i < q->samples_per_channel; i++) inbuffer[i] = inbuffer[i] * fc * q->mlt_window[i] - - previous_buffer[i] * q->mlt_window[q->samples_per_channel - 1 - i]; - } + previous_buffer[i] * q->mlt_window[q->samples_per_channel - 1 - i]; } /** @@ -712,9 +715,8 @@ * @param gains_ptr current and previous gains * @param previous_buffer pointer to the previous buffer to be used for overlapping */ - static void imlt_gain(COOKContext *q, float *inbuffer, - cook_gains *gains_ptr, float* previous_buffer) + cook_gains *gains_ptr, float *previous_buffer) { float *buffer0 = q->mono_mdct_output; float *buffer1 = q->mono_mdct_output + q->samples_per_channel; @@ -723,17 +725,17 @@ /* Inverse modified discrete cosine transform */ q->mdct_ctx.imdct_calc(&q->mdct_ctx, q->mono_mdct_output, inbuffer); - q->imlt_window (q, buffer1, gains_ptr, previous_buffer); + q->imlt_window(q, buffer1, gains_ptr, previous_buffer); /* Apply gain profile */ - for (i = 0; i < 8; i++) { + for (i = 0; i < 8; i++) if (gains_ptr->now[i] || gains_ptr->now[i + 1]) q->interpolate(q, &buffer1[q->gain_size_factor * i], gains_ptr->now[i], gains_ptr->now[i + 1]); - } /* Save away the current to be previous block. */ - memcpy(previous_buffer, buffer0, sizeof(float)*q->samples_per_channel); + memcpy(previous_buffer, buffer0, + q->samples_per_channel * sizeof(*previous_buffer)); } @@ -744,27 +746,23 @@ * @param decouple_tab decoupling array * */ +static void decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab) +{ + int i; + int vlc = get_bits1(&q->gb); + int start = cplband[p->js_subband_start]; + int end = cplband[p->subbands - 1]; + int length = end - start + 1; -static void decouple_info(COOKContext *q, COOKSubpacket *p, int* decouple_tab){ - int length, i; - - if(get_bits1(&q->gb)) { - if(cplband[p->js_subband_start] > cplband[p->subbands-1]) return; - - length = cplband[p->subbands-1] - cplband[p->js_subband_start] + 1; - for (i=0 ; ijs_subband_start] + i] = get_vlc2(&q->gb, p->ccpl.table, p->ccpl.bits, 2); - } + if (start > end) return; - } - - if(cplband[p->js_subband_start] > cplband[p->subbands-1]) return; - length = cplband[p->subbands-1] - cplband[p->js_subband_start] + 1; - for (i=0 ; ijs_subband_start] + i] = get_bits(&q->gb, p->js_vlc_bits); - } - return; + if (vlc) + for (i = 0; i < length; i++) + decouple_tab[start + i] = get_vlc2(&q->gb, p->ccpl.table, p->ccpl.bits, 2); + else + for (i = 0; i < length; i++) + decouple_tab[start + i] = get_bits(&q->gb, p->js_vlc_bits); } /* @@ -778,18 +776,18 @@ * @param mlt_buffer1 pointer to left channel mlt coefficients * @param mlt_buffer2 pointer to right channel mlt coefficients */ -static void decouple_float (COOKContext *q, - COOKSubpacket *p, - int subband, - float f1, float f2, - float *decode_buffer, - float *mlt_buffer1, float *mlt_buffer2) +static void decouple_float(COOKContext *q, + COOKSubpacket *p, + int subband, + float f1, float f2, + float *decode_buffer, + float *mlt_buffer1, float *mlt_buffer2) { int j, tmp_idx; - for (j=0 ; jjs_subband_start + subband)*SUBBAND_SIZE)+j; - mlt_buffer1[SUBBAND_SIZE*subband + j] = f1 * decode_buffer[tmp_idx]; - mlt_buffer2[SUBBAND_SIZE*subband + j] = f2 * decode_buffer[tmp_idx]; + for (j = 0; j < SUBBAND_SIZE; j++) { + tmp_idx = ((p->js_subband_start + subband) * SUBBAND_SIZE) + j; + mlt_buffer1[SUBBAND_SIZE * subband + j] = f1 * decode_buffer[tmp_idx]; + mlt_buffer2[SUBBAND_SIZE * subband + j] = f2 * decode_buffer[tmp_idx]; } } @@ -800,43 +798,43 @@ * @param mlt_buffer1 pointer to left channel mlt coefficients * @param mlt_buffer2 pointer to right channel mlt coefficients */ - -static void joint_decode(COOKContext *q, COOKSubpacket *p, float* mlt_buffer1, - float* mlt_buffer2) { - int i,j; +static void joint_decode(COOKContext *q, COOKSubpacket *p, float *mlt_buffer1, + float *mlt_buffer2) +{ + int i, j; int decouple_tab[SUBBAND_SIZE]; float *decode_buffer = q->decode_buffer_0; int idx, cpl_tmp; - float f1,f2; - const float* cplscale; + float f1, f2; + const float *cplscale; memset(decouple_tab, 0, sizeof(decouple_tab)); - memset(decode_buffer, 0, sizeof(decode_buffer)); + memset(decode_buffer, 0, sizeof(q->decode_buffer_0)); /* Make sure the buffers are zeroed out. */ - memset(mlt_buffer1,0, 1024*sizeof(float)); - memset(mlt_buffer2,0, 1024*sizeof(float)); + memset(mlt_buffer1, 0, 1024 * sizeof(*mlt_buffer1)); + memset(mlt_buffer2, 0, 1024 * sizeof(*mlt_buffer2)); decouple_info(q, p, decouple_tab); mono_decode(q, p, decode_buffer); /* The two channels are stored interleaved in decode_buffer. */ - for (i=0 ; ijs_subband_start ; i++) { - for (j=0 ; jjs_subband_start; i++) { + for (j = 0; j < SUBBAND_SIZE; j++) { + mlt_buffer1[i * 20 + j] = decode_buffer[i * 40 + j]; + mlt_buffer2[i * 20 + j] = decode_buffer[i * 40 + 20 + j]; } } /* When we reach js_subband_start (the higher frequencies) the coefficients are stored in a coupling scheme. */ idx = (1 << p->js_vlc_bits) - 1; - for (i=p->js_subband_start ; isubbands ; i++) { + for (i = p->js_subband_start; i < p->subbands; i++) { cpl_tmp = cplband[i]; - idx -=decouple_tab[cpl_tmp]; - cplscale = q->cplscales[p->js_vlc_bits-2]; //choose decoupler table + idx -= decouple_tab[cpl_tmp]; + cplscale = q->cplscales[p->js_vlc_bits - 2]; // choose decoupler table f1 = cplscale[decouple_tab[cpl_tmp]]; - f2 = cplscale[idx-1]; - q->decouple (q, p, i, f1, f2, decode_buffer, mlt_buffer1, mlt_buffer2); + f2 = cplscale[idx - 1]; + q->decouple(q, p, i, f1, f2, decode_buffer, mlt_buffer1, mlt_buffer2); idx = (1 << p->js_vlc_bits) - 1; } } @@ -849,15 +847,14 @@ * @param inbuffer pointer to raw stream data * @param gains_ptr array of current/prev gain pointers */ - -static inline void -decode_bytes_and_gain(COOKContext *q, COOKSubpacket *p, const uint8_t *inbuffer, - cook_gains *gains_ptr) +static inline void decode_bytes_and_gain(COOKContext *q, COOKSubpacket *p, + const uint8_t *inbuffer, + cook_gains *gains_ptr) { int offset; offset = decode_bytes(inbuffer, q->decoded_bytes_buffer, - p->bits_per_subpacket/8); + p->bits_per_subpacket / 8); init_get_bits(&q->gb, q->decoded_bytes_buffer + offset, p->bits_per_subpacket); decode_gain_info(&q->gb, gains_ptr->now); @@ -866,23 +863,19 @@ FFSWAP(int *, gains_ptr->now, gains_ptr->previous); } - /** - * Saturate the output signal to signed 16bit integers. +/** + * Saturate the output signal and interleave. * * @param q pointer to the COOKContext * @param chan channel to saturate * @param out pointer to the output vector */ -static void -saturate_output_float (COOKContext *q, int chan, int16_t *out) +static void saturate_output_float(COOKContext *q, int chan, float *out) { int j; float *output = q->mono_mdct_output + q->samples_per_channel; - /* Clip and convert floats to 16 bits. - */ for (j = 0; j < q->samples_per_channel; j++) { - out[chan + q->nb_channels * j] = - av_clip_int16(lrintf(output[j])); + out[chan + q->nb_channels * j] = av_clipf(output[j], -1.0, 1.0); } } @@ -898,14 +891,13 @@ * @param out pointer to the output buffer * @param chan 0: left or single channel, 1: right channel */ - -static inline void -mlt_compensate_output(COOKContext *q, float *decode_buffer, - cook_gains *gains_ptr, float *previous_buffer, - int16_t *out, int chan) +static inline void mlt_compensate_output(COOKContext *q, float *decode_buffer, + cook_gains *gains_ptr, float *previous_buffer, + float *out, int chan) { imlt_gain(q, decode_buffer, gains_ptr, previous_buffer); - q->saturate_output (q, chan, out); + if (out) + q->saturate_output(q, chan, out); } @@ -917,14 +909,15 @@ * @param inbuffer pointer to the inbuffer * @param outbuffer pointer to the outbuffer */ -static void decode_subpacket(COOKContext *q, COOKSubpacket* p, const uint8_t *inbuffer, int16_t *outbuffer) { +static void decode_subpacket(COOKContext *q, COOKSubpacket *p, + const uint8_t *inbuffer, float *outbuffer) +{ int sub_packet_size = p->size; /* packet dump */ -// for (i=0 ; iavctx, AV_LOG_ERROR, "%02x", inbuffer[i]); -// } -// av_log(q->avctx, AV_LOG_ERROR, "\n"); - memset(q->decode_buffer_1,0,sizeof(q->decode_buffer_1)); + // for (i = 0; i < sub_packet_size ; i++) + // av_log(q->avctx, AV_LOG_ERROR, "%02x", inbuffer[i]); + // av_log(q->avctx, AV_LOG_ERROR, "\n"); + memset(q->decode_buffer_1, 0, sizeof(q->decode_buffer_1)); decode_bytes_and_gain(q, p, inbuffer, &p->gains1); if (p->joint_stereo) { @@ -933,7 +926,7 @@ mono_decode(q, p, q->decode_buffer_1); if (p->num_channels == 2) { - decode_bytes_and_gain(q, p, inbuffer + sub_packet_size/2, &p->gains2); + decode_bytes_and_gain(q, p, inbuffer + sub_packet_size / 2, &p->gains2); mono_decode(q, p, q->decode_buffer_2); } } @@ -941,16 +934,13 @@ mlt_compensate_output(q, q->decode_buffer_1, &p->gains1, p->mono_previous_buffer1, outbuffer, p->ch_idx); - if (p->num_channels == 2) { - if (p->joint_stereo) { + if (p->num_channels == 2) + if (p->joint_stereo) mlt_compensate_output(q, q->decode_buffer_2, &p->gains1, p->mono_previous_buffer2, outbuffer, p->ch_idx + 1); - } else { + else mlt_compensate_output(q, q->decode_buffer_2, &p->gains2, p->mono_previous_buffer2, outbuffer, p->ch_idx + 1); - } - } - } @@ -959,47 +949,69 @@ * * @param avctx pointer to the AVCodecContext */ - -static int cook_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) { +static int cook_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) +{ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; COOKContext *q = avctx->priv_data; - int i; + float *samples = NULL; + int i, ret; int offset = 0; int chidx = 0; if (buf_size < avctx->block_align) return buf_size; + /* get output buffer */ + if (q->discarded_packets >= 2) { + q->frame.nb_samples = q->samples_per_channel; + if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (float *) q->frame.data[0]; + } + /* estimate subpacket sizes */ q->subpacket[0].size = avctx->block_align; - for(i=1;inum_subpackets;i++){ + for (i = 1; i < q->num_subpackets; i++) { q->subpacket[i].size = 2 * buf[avctx->block_align - q->num_subpackets + i]; q->subpacket[0].size -= q->subpacket[i].size + 1; if (q->subpacket[0].size < 0) { - av_log(avctx,AV_LOG_DEBUG,"frame subpacket size total > avctx->block_align!\n"); - return -1; + av_log(avctx, AV_LOG_DEBUG, + "frame subpacket size total > avctx->block_align!\n"); + return AVERROR_INVALIDDATA; } } /* decode supbackets */ - *data_size = 0; - for(i=0;inum_subpackets;i++){ - q->subpacket[i].bits_per_subpacket = (q->subpacket[i].size*8)>>q->subpacket[i].bits_per_subpdiv; + for (i = 0; i < q->num_subpackets; i++) { + q->subpacket[i].bits_per_subpacket = (q->subpacket[i].size * 8) >> + q->subpacket[i].bits_per_subpdiv; q->subpacket[i].ch_idx = chidx; - av_log(avctx,AV_LOG_DEBUG,"subpacket[%i] size %i js %i %i block_align %i\n",i,q->subpacket[i].size,q->subpacket[i].joint_stereo,offset,avctx->block_align); - decode_subpacket(q, &q->subpacket[i], buf + offset, (int16_t*)data); + av_log(avctx, AV_LOG_DEBUG, + "subpacket[%i] size %i js %i %i block_align %i\n", + i, q->subpacket[i].size, q->subpacket[i].joint_stereo, offset, + avctx->block_align); + + decode_subpacket(q, &q->subpacket[i], buf + offset, samples); offset += q->subpacket[i].size; chidx += q->subpacket[i].num_channels; - av_log(avctx,AV_LOG_DEBUG,"subpacket[%i] %i %i\n",i,q->subpacket[i].size * 8,get_bits_count(&q->gb)); + av_log(avctx, AV_LOG_DEBUG, "subpacket[%i] %i %i\n", + i, q->subpacket[i].size * 8, get_bits_count(&q->gb)); } - *data_size = sizeof(int16_t) * q->nb_channels * q->samples_per_channel; /* Discard the first two frames: no valid audio. */ - if (avctx->frame_number < 2) *data_size = 0; + if (q->discarded_packets < 2) { + q->discarded_packets++; + *got_frame_ptr = 0; + return avctx->block_align; + } + + *got_frame_ptr = 1; + *(AVFrame *) data = q->frame; return avctx->block_align; } @@ -1008,34 +1020,34 @@ static void dump_cook_context(COOKContext *q) { //int i=0; -#define PRINT(a,b) av_log(q->avctx,AV_LOG_ERROR," %s = %d\n", a, b); - av_log(q->avctx,AV_LOG_ERROR,"COOKextradata\n"); - av_log(q->avctx,AV_LOG_ERROR,"cookversion=%x\n",q->subpacket[0].cookversion); +#define PRINT(a, b) av_log(q->avctx, AV_LOG_ERROR, " %s = %d\n", a, b); + av_log(q->avctx, AV_LOG_ERROR, "COOKextradata\n"); + av_log(q->avctx, AV_LOG_ERROR, "cookversion=%x\n", q->subpacket[0].cookversion); if (q->subpacket[0].cookversion > STEREO) { - PRINT("js_subband_start",q->subpacket[0].js_subband_start); - PRINT("js_vlc_bits",q->subpacket[0].js_vlc_bits); + PRINT("js_subband_start", q->subpacket[0].js_subband_start); + PRINT("js_vlc_bits", q->subpacket[0].js_vlc_bits); } - av_log(q->avctx,AV_LOG_ERROR,"COOKContext\n"); - PRINT("nb_channels",q->nb_channels); - PRINT("bit_rate",q->bit_rate); - PRINT("sample_rate",q->sample_rate); - PRINT("samples_per_channel",q->subpacket[0].samples_per_channel); - PRINT("samples_per_frame",q->subpacket[0].samples_per_frame); - PRINT("subbands",q->subpacket[0].subbands); - PRINT("js_subband_start",q->subpacket[0].js_subband_start); - PRINT("log2_numvector_size",q->subpacket[0].log2_numvector_size); - PRINT("numvector_size",q->subpacket[0].numvector_size); - PRINT("total_subbands",q->subpacket[0].total_subbands); + av_log(q->avctx, AV_LOG_ERROR, "COOKContext\n"); + PRINT("nb_channels", q->nb_channels); + PRINT("bit_rate", q->bit_rate); + PRINT("sample_rate", q->sample_rate); + PRINT("samples_per_channel", q->subpacket[0].samples_per_channel); + PRINT("samples_per_frame", q->subpacket[0].samples_per_frame); + PRINT("subbands", q->subpacket[0].subbands); + PRINT("js_subband_start", q->subpacket[0].js_subband_start); + PRINT("log2_numvector_size", q->subpacket[0].log2_numvector_size); + PRINT("numvector_size", q->subpacket[0].numvector_size); + PRINT("total_subbands", q->subpacket[0].total_subbands); } #endif -static av_cold int cook_count_channels(unsigned int mask){ +static av_cold int cook_count_channels(unsigned int mask) +{ int i; int channels = 0; - for(i = 0;i<32;i++){ - if(mask & (1<priv_data; @@ -1053,14 +1064,15 @@ int extradata_size = avctx->extradata_size; int s = 0; unsigned int channel_mask = 0; + int ret; q->avctx = avctx; /* Take care of the codec specific extradata. */ if (extradata_size <= 0) { - av_log(avctx,AV_LOG_ERROR,"Necessary extradata missing!\n"); - return -1; + av_log(avctx, AV_LOG_ERROR, "Necessary extradata missing!\n"); + return AVERROR_INVALIDDATA; } - av_log(avctx,AV_LOG_DEBUG,"codecdata_length=%d\n",avctx->extradata_size); + av_log(avctx, AV_LOG_DEBUG, "codecdata_length=%d\n", avctx->extradata_size); /* Take data from the AVCodecContext (RM container). */ q->sample_rate = avctx->sample_rate; @@ -1070,17 +1082,17 @@ /* Initialize RNG. */ av_lfg_init(&q->random_state, 0); - while(edata_ptr < edata_ptr_end){ + while (edata_ptr < edata_ptr_end) { /* 8 for mono, 16 for stereo, ? for multichannel Swap to right endianness so we don't need to care later on. */ - if (extradata_size >= 8){ + if (extradata_size >= 8) { q->subpacket[s].cookversion = bytestream_get_be32(&edata_ptr); - q->subpacket[s].samples_per_frame = bytestream_get_be16(&edata_ptr); + q->subpacket[s].samples_per_frame = bytestream_get_be16(&edata_ptr); q->subpacket[s].subbands = bytestream_get_be16(&edata_ptr); extradata_size -= 8; } - if (avctx->extradata_size >= 8){ - bytestream_get_be32(&edata_ptr); //Unknown unused + if (extradata_size >= 8) { + bytestream_get_be32(&edata_ptr); // Unknown unused q->subpacket[s].js_subband_start = bytestream_get_be16(&edata_ptr); q->subpacket[s].js_vlc_bits = bytestream_get_be16(&edata_ptr); extradata_size -= 8; @@ -1097,71 +1109,73 @@ /* Initialize version-dependent variables */ - av_log(avctx,AV_LOG_DEBUG,"subpacket[%i].cookversion=%x\n",s,q->subpacket[s].cookversion); + av_log(avctx, AV_LOG_DEBUG, "subpacket[%i].cookversion=%x\n", s, + q->subpacket[s].cookversion); q->subpacket[s].joint_stereo = 0; switch (q->subpacket[s].cookversion) { - case MONO: - if (q->nb_channels != 1) { - av_log_ask_for_sample(avctx, "Container channels != 1.\n"); - return -1; - } - av_log(avctx,AV_LOG_DEBUG,"MONO\n"); - break; - case STEREO: - if (q->nb_channels != 1) { - q->subpacket[s].bits_per_subpdiv = 1; - q->subpacket[s].num_channels = 2; - } - av_log(avctx,AV_LOG_DEBUG,"STEREO\n"); - break; - case JOINT_STEREO: - if (q->nb_channels != 2) { - av_log_ask_for_sample(avctx, "Container channels != 2.\n"); - return -1; - } - av_log(avctx,AV_LOG_DEBUG,"JOINT_STEREO\n"); - if (avctx->extradata_size >= 16){ - q->subpacket[s].total_subbands = q->subpacket[s].subbands + q->subpacket[s].js_subband_start; - q->subpacket[s].joint_stereo = 1; - q->subpacket[s].num_channels = 2; - } + case MONO: + if (q->nb_channels != 1) { + av_log_ask_for_sample(avctx, "Container channels != 1.\n"); + return AVERROR_PATCHWELCOME; + } + av_log(avctx, AV_LOG_DEBUG, "MONO\n"); + break; + case STEREO: + if (q->nb_channels != 1) { + q->subpacket[s].bits_per_subpdiv = 1; + q->subpacket[s].num_channels = 2; + } + av_log(avctx, AV_LOG_DEBUG, "STEREO\n"); + break; + case JOINT_STEREO: + if (q->nb_channels != 2) { + av_log_ask_for_sample(avctx, "Container channels != 2.\n"); + return AVERROR_PATCHWELCOME; + } + av_log(avctx, AV_LOG_DEBUG, "JOINT_STEREO\n"); + if (avctx->extradata_size >= 16) { + q->subpacket[s].total_subbands = q->subpacket[s].subbands + + q->subpacket[s].js_subband_start; + q->subpacket[s].joint_stereo = 1; + q->subpacket[s].num_channels = 2; + } + if (q->subpacket[s].samples_per_channel > 256) { + q->subpacket[s].log2_numvector_size = 6; + } + if (q->subpacket[s].samples_per_channel > 512) { + q->subpacket[s].log2_numvector_size = 7; + } + break; + case MC_COOK: + av_log(avctx, AV_LOG_DEBUG, "MULTI_CHANNEL\n"); + if (extradata_size >= 4) + channel_mask |= q->subpacket[s].channel_mask = bytestream_get_be32(&edata_ptr); + + if (cook_count_channels(q->subpacket[s].channel_mask) > 1) { + q->subpacket[s].total_subbands = q->subpacket[s].subbands + + q->subpacket[s].js_subband_start; + q->subpacket[s].joint_stereo = 1; + q->subpacket[s].num_channels = 2; + q->subpacket[s].samples_per_channel = q->subpacket[s].samples_per_frame >> 1; + if (q->subpacket[s].samples_per_channel > 256) { - q->subpacket[s].log2_numvector_size = 6; + q->subpacket[s].log2_numvector_size = 6; } if (q->subpacket[s].samples_per_channel > 512) { - q->subpacket[s].log2_numvector_size = 7; + q->subpacket[s].log2_numvector_size = 7; } - break; - case MC_COOK: - av_log(avctx,AV_LOG_DEBUG,"MULTI_CHANNEL\n"); - if(extradata_size >= 4) - channel_mask |= q->subpacket[s].channel_mask = bytestream_get_be32(&edata_ptr); - - if(cook_count_channels(q->subpacket[s].channel_mask) > 1){ - q->subpacket[s].total_subbands = q->subpacket[s].subbands + q->subpacket[s].js_subband_start; - q->subpacket[s].joint_stereo = 1; - q->subpacket[s].num_channels = 2; - q->subpacket[s].samples_per_channel = q->subpacket[s].samples_per_frame >> 1; - - if (q->subpacket[s].samples_per_channel > 256) { - q->subpacket[s].log2_numvector_size = 6; - } - if (q->subpacket[s].samples_per_channel > 512) { - q->subpacket[s].log2_numvector_size = 7; - } - }else - q->subpacket[s].samples_per_channel = q->subpacket[s].samples_per_frame; + } else + q->subpacket[s].samples_per_channel = q->subpacket[s].samples_per_frame; - break; - default: - av_log_ask_for_sample(avctx, "Unknown Cook version.\n"); - return -1; - break; + break; + default: + av_log_ask_for_sample(avctx, "Unknown Cook version.\n"); + return AVERROR_PATCHWELCOME; } - if(s > 1 && q->subpacket[s].samples_per_channel != q->samples_per_channel) { - av_log(avctx,AV_LOG_ERROR,"different number of samples per channel!\n"); - return -1; + if (s > 1 && q->subpacket[s].samples_per_channel != q->samples_per_channel) { + av_log(avctx, AV_LOG_ERROR, "different number of samples per channel!\n"); + return AVERROR_INVALIDDATA; } else q->samples_per_channel = q->subpacket[0].samples_per_channel; @@ -1172,17 +1186,19 @@ /* Try to catch some obviously faulty streams, othervise it might be exploitable */ if (q->subpacket[s].total_subbands > 53) { av_log_ask_for_sample(avctx, "total_subbands > 53\n"); - return -1; + return AVERROR_PATCHWELCOME; } - if ((q->subpacket[s].js_vlc_bits > 6) || (q->subpacket[s].js_vlc_bits < 0)) { - av_log(avctx,AV_LOG_ERROR,"js_vlc_bits = %d, only >= 0 and <= 6 allowed!\n",q->subpacket[s].js_vlc_bits); - return -1; + if ((q->subpacket[s].js_vlc_bits > 6) || + (q->subpacket[s].js_vlc_bits < 2 * q->subpacket[s].joint_stereo)) { + av_log(avctx, AV_LOG_ERROR, "js_vlc_bits = %d, only >= %d and <= 6 allowed!\n", + q->subpacket[s].js_vlc_bits, 2 * q->subpacket[s].joint_stereo); + return AVERROR_INVALIDDATA; } if (q->subpacket[s].subbands > 50) { av_log_ask_for_sample(avctx, "subbands > 50\n"); - return -1; + return AVERROR_PATCHWELCOME; } q->subpacket[s].gains1.now = q->subpacket[s].gain_1; q->subpacket[s].gains1.previous = q->subpacket[s].gain_2; @@ -1193,7 +1209,7 @@ s++; if (s > MAX_SUBPACKETS) { av_log_ask_for_sample(avctx, "Too many subpackets > 5\n"); - return -1; + return AVERROR_PATCHWELCOME; } } /* Generate tables */ @@ -1201,26 +1217,26 @@ init_gain_table(q); init_cplscales_table(q); - if (init_cook_vlc_tables(q) != 0) - return -1; + if ((ret = init_cook_vlc_tables(q))) + return ret; - if(avctx->block_align >= UINT_MAX/2) - return -1; + if (avctx->block_align >= UINT_MAX / 2) + return AVERROR(EINVAL); /* Pad the databuffer with: DECODE_BYTES_PAD1 or DECODE_BYTES_PAD2 for decode_bytes(), FF_INPUT_BUFFER_PADDING_SIZE, for the bitstreamreader. */ - q->decoded_bytes_buffer = - av_mallocz(avctx->block_align - + DECODE_BYTES_PAD1(avctx->block_align) - + FF_INPUT_BUFFER_PADDING_SIZE); + q->decoded_bytes_buffer = + av_mallocz(avctx->block_align + + DECODE_BYTES_PAD1(avctx->block_align) + + FF_INPUT_BUFFER_PADDING_SIZE); if (q->decoded_bytes_buffer == NULL) - return -1; + return AVERROR(ENOMEM); /* Initialize transform. */ - if ( init_cook_mlt(q) != 0 ) - return -1; + if ((ret = init_cook_mlt(q))) + return ret; /* Initialize COOK signal arithmetic handling */ if (1) { @@ -1232,19 +1248,23 @@ } /* Try to catch some obviously faulty streams, othervise it might be exploitable */ - if ((q->samples_per_channel == 256) || (q->samples_per_channel == 512) || (q->samples_per_channel == 1024)) { + if ((q->samples_per_channel == 256) || (q->samples_per_channel == 512) + || (q->samples_per_channel == 1024)) { } else { av_log_ask_for_sample(avctx, "unknown amount of samples_per_channel = %d\n", q->samples_per_channel); - return -1; + return AVERROR_PATCHWELCOME; } - avctx->sample_fmt = AV_SAMPLE_FMT_S16; + avctx->sample_fmt = AV_SAMPLE_FMT_FLT; if (channel_mask) avctx->channel_layout = channel_mask; else - avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; + avctx->channel_layout = (avctx->channels == 2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; + + avcodec_get_frame_defaults(&q->frame); + avctx->coded_frame = &q->frame; #ifdef DEBUG dump_cook_context(q); @@ -1252,15 +1272,14 @@ return 0; } - -AVCodec ff_cook_decoder = -{ - .name = "cook", - .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_COOK, +AVCodec ff_cook_decoder = { + .name = "cook", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_COOK, .priv_data_size = sizeof(COOKContext), - .init = cook_decode_init, - .close = cook_decode_close, - .decode = cook_decode_frame, - .long_name = NULL_IF_CONFIG_SMALL("COOK"), + .init = cook_decode_init, + .close = cook_decode_close, + .decode = cook_decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("COOK"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cscd.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cscd.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cscd.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cscd.c 2012-01-11 00:34:30.000000000 +0000 @@ -255,15 +255,14 @@ } AVCodec ff_cscd_decoder = { - "camstudio", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_CSCD, - sizeof(CamStudioContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "camstudio", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_CSCD, + .priv_data_size = sizeof(CamStudioContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("CamStudio"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cyuv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cyuv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/cyuv.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/cyuv.c 2012-01-11 00:34:30.000000000 +0000 @@ -179,32 +179,28 @@ #if CONFIG_AURA_DECODER AVCodec ff_aura_decoder = { - "aura", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_AURA, - sizeof(CyuvDecodeContext), - cyuv_decode_init, - NULL, - cyuv_decode_end, - cyuv_decode_frame, - CODEC_CAP_DR1, - NULL, + .name = "aura", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_AURA, + .priv_data_size = sizeof(CyuvDecodeContext), + .init = cyuv_decode_init, + .close = cyuv_decode_end, + .decode = cyuv_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Auravision AURA"), }; #endif #if CONFIG_CYUV_DECODER AVCodec ff_cyuv_decoder = { - "cyuv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_CYUV, - sizeof(CyuvDecodeContext), - cyuv_decode_init, - NULL, - cyuv_decode_end, - cyuv_decode_frame, - CODEC_CAP_DR1, - NULL, + .name = "cyuv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_CYUV, + .priv_data_size = sizeof(CyuvDecodeContext), + .init = cyuv_decode_init, + .close = cyuv_decode_end, + .decode = cyuv_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Creative YUV (CYUV)"), }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dca.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dca.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dca.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dca.c 2012-01-11 00:34:30.000000000 +0000 @@ -42,15 +42,19 @@ #include "dcadsp.h" #include "fmtconvert.h" +#if ARCH_ARM +# include "arm/dca.h" +#endif + //#define TRACE -#define DCA_PRIM_CHANNELS_MAX (7) -#define DCA_SUBBANDS (32) -#define DCA_ABITS_MAX (32) /* Should be 28 */ -#define DCA_SUBSUBFRAMES_MAX (4) -#define DCA_SUBFRAMES_MAX (16) -#define DCA_BLOCKS_MAX (16) -#define DCA_LFE_MAX (3) +#define DCA_PRIM_CHANNELS_MAX (7) +#define DCA_SUBBANDS (32) +#define DCA_ABITS_MAX (32) /* Should be 28 */ +#define DCA_SUBSUBFRAMES_MAX (4) +#define DCA_SUBFRAMES_MAX (16) +#define DCA_BLOCKS_MAX (16) +#define DCA_LFE_MAX (3) enum DCAMode { DCA_MONO = 0, @@ -123,28 +127,45 @@ * OV -> center back * All 2 channel configurations -> AV_CH_LAYOUT_STEREO */ - -static const int64_t dca_core_channel_layout[] = { - AV_CH_FRONT_CENTER, ///< 1, A - AV_CH_LAYOUT_STEREO, ///< 2, A + B (dual mono) - AV_CH_LAYOUT_STEREO, ///< 2, L + R (stereo) - AV_CH_LAYOUT_STEREO, ///< 2, (L+R) + (L-R) (sum-difference) - AV_CH_LAYOUT_STEREO, ///< 2, LT +RT (left and right total) - AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER, ///< 3, C+L+R - AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER, ///< 3, L+R+S - AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER|AV_CH_BACK_CENTER, ///< 4, C + L + R+ S - AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT, ///< 4, L + R +SL+ SR - AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT, ///< 5, C + L + R+ SL+SR - AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER, ///< 6, CL + CR + L + R + SL + SR - AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT|AV_CH_FRONT_CENTER|AV_CH_BACK_CENTER, ///< 6, C + L + R+ LR + RR + OV - AV_CH_FRONT_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT, ///< 6, CF+ CR+LF+ RF+LR + RR - AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT, ///< 7, CL + C + CR + L + R + SL + SR - AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT, ///< 8, CL + CR + L + R + SL1 + SL2+ SR1 + SR2 - AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_BACK_CENTER|AV_CH_SIDE_RIGHT, ///< 8, CL + C+ CR + L + R + SL + S+ SR +static const uint64_t dca_core_channel_layout[] = { + AV_CH_FRONT_CENTER, ///< 1, A + AV_CH_LAYOUT_STEREO, ///< 2, A + B (dual mono) + AV_CH_LAYOUT_STEREO, ///< 2, L + R (stereo) + AV_CH_LAYOUT_STEREO, ///< 2, (L + R) + (L - R) (sum-difference) + AV_CH_LAYOUT_STEREO, ///< 2, LT + RT (left and right total) + AV_CH_LAYOUT_STEREO | AV_CH_FRONT_CENTER, ///< 3, C + L + R + AV_CH_LAYOUT_STEREO | AV_CH_BACK_CENTER, ///< 3, L + R + S + AV_CH_LAYOUT_STEREO | AV_CH_FRONT_CENTER | AV_CH_BACK_CENTER, ///< 4, C + L + R + S + AV_CH_LAYOUT_STEREO | AV_CH_SIDE_LEFT | AV_CH_SIDE_RIGHT, ///< 4, L + R + SL + SR + + AV_CH_LAYOUT_STEREO | AV_CH_FRONT_CENTER | AV_CH_SIDE_LEFT | + AV_CH_SIDE_RIGHT, ///< 5, C + L + R + SL + SR + + AV_CH_LAYOUT_STEREO | AV_CH_SIDE_LEFT | AV_CH_SIDE_RIGHT | + AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER, ///< 6, CL + CR + L + R + SL + SR + + AV_CH_LAYOUT_STEREO | AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT | + AV_CH_FRONT_CENTER | AV_CH_BACK_CENTER, ///< 6, C + L + R + LR + RR + OV + + AV_CH_FRONT_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER | + AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_BACK_CENTER | + AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT, ///< 6, CF + CR + LF + RF + LR + RR + + AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_CENTER | + AV_CH_FRONT_RIGHT_OF_CENTER | AV_CH_LAYOUT_STEREO | + AV_CH_SIDE_LEFT | AV_CH_SIDE_RIGHT, ///< 7, CL + C + CR + L + R + SL + SR + + AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER | + AV_CH_LAYOUT_STEREO | AV_CH_SIDE_LEFT | AV_CH_SIDE_RIGHT | + AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT, ///< 8, CL + CR + L + R + SL1 + SL2 + SR1 + SR2 + + AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_CENTER | + AV_CH_FRONT_RIGHT_OF_CENTER | AV_CH_LAYOUT_STEREO | + AV_CH_SIDE_LEFT | AV_CH_BACK_CENTER | AV_CH_SIDE_RIGHT, ///< 8, CL + C + CR + L + R + SL + S + SR }; static const int8_t dca_lfe_index[] = { - 1,2,2,2,2,3,2,3,2,3,2,3,1,3,2,3 + 1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 1, 3, 2, 3 }; static const int8_t dca_channel_reorder_lfe[][9] = { @@ -223,19 +244,19 @@ { 3, 2, 4, 0, 1, 5, 8, 7, 6}, }; -#define DCA_DOLBY 101 /* FIXME */ +#define DCA_DOLBY 101 /* FIXME */ -#define DCA_CHANNEL_BITS 6 -#define DCA_CHANNEL_MASK 0x3F +#define DCA_CHANNEL_BITS 6 +#define DCA_CHANNEL_MASK 0x3F -#define DCA_LFE 0x80 +#define DCA_LFE 0x80 -#define HEADER_SIZE 14 +#define HEADER_SIZE 14 -#define DCA_MAX_FRAME_SIZE 16384 -#define DCA_MAX_EXSS_HEADER_SIZE 4096 +#define DCA_MAX_FRAME_SIZE 16384 +#define DCA_MAX_EXSS_HEADER_SIZE 4096 -#define DCA_BUFFER_PADDING_SIZE 1024 +#define DCA_BUFFER_PADDING_SIZE 1024 /** Bit allocation */ typedef struct { @@ -250,13 +271,16 @@ static BitAlloc dca_scalefactor; ///< scalefactor VLCs static BitAlloc dca_smpl_bitalloc[11]; ///< samples VLCs -static av_always_inline int get_bitalloc(GetBitContext *gb, BitAlloc *ba, int idx) +static av_always_inline int get_bitalloc(GetBitContext *gb, BitAlloc *ba, + int idx) { - return get_vlc2(gb, ba->vlc[idx].table, ba->vlc[idx].bits, ba->wrap) + ba->offset; + return get_vlc2(gb, ba->vlc[idx].table, ba->vlc[idx].bits, ba->wrap) + + ba->offset; } typedef struct { AVCodecContext *avctx; + AVFrame frame; /* Frame header */ int frame_type; ///< type of the current frame int samples_deficit; ///< deficit sample count @@ -302,8 +326,8 @@ float scalefactor_adj[DCA_PRIM_CHANNELS_MAX][DCA_ABITS_MAX]; ///< scale factor adjustment /* Primary audio coding side information */ - int subsubframes[DCA_SUBFRAMES_MAX]; ///< number of subsubframes - int partial_samples[DCA_SUBFRAMES_MAX]; ///< partial subsubframe samples count + int subsubframes[DCA_SUBFRAMES_MAX]; ///< number of subsubframes + int partial_samples[DCA_SUBFRAMES_MAX]; ///< partial subsubframe samples count int prediction_mode[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS]; ///< prediction mode (ADPCM used or not) int prediction_vq[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS]; ///< prediction VQ coefs int bitalloc[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS]; ///< bit allocation index @@ -320,7 +344,7 @@ int lfe_scale_factor; /* Subband samples history (for ADPCM) */ - float subband_samples_hist[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][4]; + DECLARE_ALIGNED(16, float, subband_samples_hist)[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][4]; DECLARE_ALIGNED(32, float, subband_fir_hist)[DCA_PRIM_CHANNELS_MAX][512]; DECLARE_ALIGNED(32, float, subband_fir_noidea)[DCA_PRIM_CHANNELS_MAX][32]; int hist_index[DCA_PRIM_CHANNELS_MAX]; @@ -330,13 +354,13 @@ float scale_bias; ///< output scale DECLARE_ALIGNED(32, float, subband_samples)[DCA_BLOCKS_MAX][DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][8]; - DECLARE_ALIGNED(32, float, samples)[(DCA_PRIM_CHANNELS_MAX+1)*256]; - const float *samples_chanptr[DCA_PRIM_CHANNELS_MAX+1]; + DECLARE_ALIGNED(32, float, samples)[(DCA_PRIM_CHANNELS_MAX + 1) * 256]; + const float *samples_chanptr[DCA_PRIM_CHANNELS_MAX + 1]; uint8_t dca_buffer[DCA_MAX_FRAME_SIZE + DCA_MAX_EXSS_HEADER_SIZE + DCA_BUFFER_PADDING_SIZE]; int dca_buffer_size; ///< how much data is in the dca_buffer - const int8_t* channel_order_tab; ///< channel reordering table, lfe and non lfe + const int8_t *channel_order_tab; ///< channel reordering table, lfe and non lfe GetBitContext gb; /* Current position in DCA frame */ int current_subframe; @@ -411,13 +435,15 @@ } for (i = 0; i < 10; i++) - for (j = 0; j < 7; j++){ - if (!bitalloc_codes[i][j]) break; - dca_smpl_bitalloc[i+1].offset = bitalloc_offsets[i]; - dca_smpl_bitalloc[i+1].wrap = 1 + (j > 4); - dca_smpl_bitalloc[i+1].vlc[j].table = &dca_table[dca_vlc_offs[c]]; - dca_smpl_bitalloc[i+1].vlc[j].table_allocated = dca_vlc_offs[c + 1] - dca_vlc_offs[c]; - init_vlc(&dca_smpl_bitalloc[i+1].vlc[j], bitalloc_maxbits[i][j], + for (j = 0; j < 7; j++) { + if (!bitalloc_codes[i][j]) + break; + dca_smpl_bitalloc[i + 1].offset = bitalloc_offsets[i]; + dca_smpl_bitalloc[i + 1].wrap = 1 + (j > 4); + dca_smpl_bitalloc[i + 1].vlc[j].table = &dca_table[dca_vlc_offs[c]]; + dca_smpl_bitalloc[i + 1].vlc[j].table_allocated = dca_vlc_offs[c + 1] - dca_vlc_offs[c]; + + init_vlc(&dca_smpl_bitalloc[i + 1].vlc[j], bitalloc_maxbits[i][j], bitalloc_sizes[i], bitalloc_bits[i][j], 1, 1, bitalloc_codes[i][j], 2, 2, INIT_VLC_USE_NEW_STATIC); @@ -428,19 +454,19 @@ static inline void get_array(GetBitContext *gb, int *dst, int len, int bits) { - while(len--) + while (len--) *dst++ = get_bits(gb, bits); } -static int dca_parse_audio_coding_header(DCAContext * s, int base_channel) +static int dca_parse_audio_coding_header(DCAContext *s, int base_channel) { int i, j; static const float adj_table[4] = { 1.0, 1.1250, 1.2500, 1.4375 }; static const int bitlen[11] = { 0, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3 }; - static const int thr[11] = { 0, 1, 3, 3, 3, 3, 7, 7, 7, 7, 7 }; + static const int thr[11] = { 0, 1, 3, 3, 3, 3, 7, 7, 7, 7, 7 }; - s->total_channels = get_bits(&s->gb, 3) + 1 + base_channel; - s->prim_channels = s->total_channels; + s->total_channels = get_bits(&s->gb, 3) + 1 + base_channel; + s->prim_channels = s->total_channels; if (s->prim_channels > DCA_PRIM_CHANNELS_MAX) s->prim_channels = DCA_PRIM_CHANNELS_MAX; @@ -483,23 +509,28 @@ get_bits(&s->gb, 16); } - s->current_subframe = 0; + s->current_subframe = 0; s->current_subsubframe = 0; #ifdef TRACE av_log(s->avctx, AV_LOG_DEBUG, "subframes: %i\n", s->subframes); av_log(s->avctx, AV_LOG_DEBUG, "prim channels: %i\n", s->prim_channels); - for (i = base_channel; i < s->prim_channels; i++){ - av_log(s->avctx, AV_LOG_DEBUG, "subband activity: %i\n", s->subband_activity[i]); - av_log(s->avctx, AV_LOG_DEBUG, "vq start subband: %i\n", s->vq_start_subband[i]); - av_log(s->avctx, AV_LOG_DEBUG, "joint intensity: %i\n", s->joint_intensity[i]); - av_log(s->avctx, AV_LOG_DEBUG, "transient mode codebook: %i\n", s->transient_huffman[i]); - av_log(s->avctx, AV_LOG_DEBUG, "scale factor codebook: %i\n", s->scalefactor_huffman[i]); - av_log(s->avctx, AV_LOG_DEBUG, "bit allocation quantizer: %i\n", s->bitalloc_huffman[i]); + for (i = base_channel; i < s->prim_channels; i++) { + av_log(s->avctx, AV_LOG_DEBUG, "subband activity: %i\n", + s->subband_activity[i]); + av_log(s->avctx, AV_LOG_DEBUG, "vq start subband: %i\n", + s->vq_start_subband[i]); + av_log(s->avctx, AV_LOG_DEBUG, "joint intensity: %i\n", + s->joint_intensity[i]); + av_log(s->avctx, AV_LOG_DEBUG, "transient mode codebook: %i\n", + s->transient_huffman[i]); + av_log(s->avctx, AV_LOG_DEBUG, "scale factor codebook: %i\n", + s->scalefactor_huffman[i]); + av_log(s->avctx, AV_LOG_DEBUG, "bit allocation quantizer: %i\n", + s->bitalloc_huffman[i]); av_log(s->avctx, AV_LOG_DEBUG, "quant index huff:"); for (j = 0; j < 11; j++) - av_log(s->avctx, AV_LOG_DEBUG, " %i", - s->quant_index_huffman[i][j]); + av_log(s->avctx, AV_LOG_DEBUG, " %i", s->quant_index_huffman[i][j]); av_log(s->avctx, AV_LOG_DEBUG, "\n"); av_log(s->avctx, AV_LOG_DEBUG, "scalefac adj:"); for (j = 0; j < 11; j++) @@ -508,15 +539,15 @@ } #endif - return 0; + return 0; } -static int dca_parse_frame_header(DCAContext * s) +static int dca_parse_frame_header(DCAContext *s) { init_get_bits(&s->gb, s->dca_buffer, s->dca_buffer_size * 8); /* Sync code */ - get_bits(&s->gb, 32); + skip_bits_long(&s->gb, 32); /* Frame header */ s->frame_type = get_bits(&s->gb, 1); @@ -525,15 +556,15 @@ s->sample_blocks = get_bits(&s->gb, 7) + 1; s->frame_size = get_bits(&s->gb, 14) + 1; if (s->frame_size < 95) - return -1; + return AVERROR_INVALIDDATA; s->amode = get_bits(&s->gb, 6); s->sample_rate = dca_sample_rates[get_bits(&s->gb, 4)]; if (!s->sample_rate) - return -1; + return AVERROR_INVALIDDATA; s->bit_rate_index = get_bits(&s->gb, 5); s->bit_rate = dca_bit_rates[s->bit_rate_index]; if (!s->bit_rate) - return -1; + return AVERROR_INVALIDDATA; s->downmix = get_bits(&s->gb, 1); s->dynrange = get_bits(&s->gb, 1); @@ -560,7 +591,8 @@ /* FIXME: channels mixing levels */ s->output = s->amode; - if (s->lfe) s->output |= DCA_LFE; + if (s->lfe) + s->output |= DCA_LFE; #ifdef TRACE av_log(s->avctx, AV_LOG_DEBUG, "frame type: %i\n", s->frame_type); @@ -609,24 +641,24 @@ static inline int get_scale(GetBitContext *gb, int level, int value) { - if (level < 5) { - /* huffman encoded */ - value += get_bitalloc(gb, &dca_scalefactor, level); - } else if (level < 8) - value = get_bits(gb, level + 1); - return value; + if (level < 5) { + /* huffman encoded */ + value += get_bitalloc(gb, &dca_scalefactor, level); + } else if (level < 8) + value = get_bits(gb, level + 1); + return value; } -static int dca_subframe_header(DCAContext * s, int base_channel, int block_index) +static int dca_subframe_header(DCAContext *s, int base_channel, int block_index) { /* Primary audio coding side information */ int j, k; if (get_bits_left(&s->gb) < 0) - return -1; + return AVERROR_INVALIDDATA; if (!base_channel) { - s->subsubframes[s->current_subframe] = get_bits(&s->gb, 2) + 1; + s->subsubframes[s->current_subframe] = get_bits(&s->gb, 2) + 1; s->partial_samples[s->current_subframe] = get_bits(&s->gb, 3); } @@ -655,16 +687,16 @@ else if (s->bitalloc_huffman[j] == 7) { av_log(s->avctx, AV_LOG_ERROR, "Invalid bit allocation index\n"); - return -1; + return AVERROR_INVALIDDATA; } else { s->bitalloc[j][k] = get_bitalloc(&s->gb, &dca_bitalloc_index, s->bitalloc_huffman[j]); } if (s->bitalloc[j][k] > 26) { -// av_log(s->avctx,AV_LOG_DEBUG,"bitalloc index [%i][%i] too big (%i)\n", -// j, k, s->bitalloc[j][k]); - return -1; + // av_log(s->avctx, AV_LOG_DEBUG, "bitalloc index [%i][%i] too big (%i)\n", + // j, k, s->bitalloc[j][k]); + return AVERROR_INVALIDDATA; } } } @@ -682,13 +714,14 @@ } if (get_bits_left(&s->gb) < 0) - return -1; + return AVERROR_INVALIDDATA; for (j = base_channel; j < s->prim_channels; j++) { const uint32_t *scale_table; int scale_sum; - memset(s->scale_factor[j], 0, s->subband_activity[j] * sizeof(s->scale_factor[0][0][0]) * 2); + memset(s->scale_factor[j], 0, + s->subband_activity[j] * sizeof(s->scale_factor[0][0][0]) * 2); if (s->scalefactor_huffman[j] == 6) scale_table = scale_factor_quant7; @@ -720,7 +753,7 @@ } if (get_bits_left(&s->gb) < 0) - return -1; + return AVERROR_INVALIDDATA; /* Scale factors for joint subband coding */ for (j = base_channel; j < s->prim_channels; j++) { @@ -806,9 +839,11 @@ } #ifdef TRACE - av_log(s->avctx, AV_LOG_DEBUG, "subsubframes: %i\n", s->subsubframes[s->current_subframe]); + av_log(s->avctx, AV_LOG_DEBUG, "subsubframes: %i\n", + s->subsubframes[s->current_subframe]); av_log(s->avctx, AV_LOG_DEBUG, "partial samples: %i\n", s->partial_samples[s->current_subframe]); + for (j = base_channel; j < s->prim_channels; j++) { av_log(s->avctx, AV_LOG_DEBUG, "prediction mode:"); for (k = 0; k < s->subband_activity[j]; k++) @@ -817,12 +852,12 @@ } for (j = base_channel; j < s->prim_channels; j++) { for (k = 0; k < s->subband_activity[j]; k++) - av_log(s->avctx, AV_LOG_DEBUG, - "prediction coefs: %f, %f, %f, %f\n", - (float) adpcm_vb[s->prediction_vq[j][k]][0] / 8192, - (float) adpcm_vb[s->prediction_vq[j][k]][1] / 8192, - (float) adpcm_vb[s->prediction_vq[j][k]][2] / 8192, - (float) adpcm_vb[s->prediction_vq[j][k]][3] / 8192); + av_log(s->avctx, AV_LOG_DEBUG, + "prediction coefs: %f, %f, %f, %f\n", + (float) adpcm_vb[s->prediction_vq[j][k]][0] / 8192, + (float) adpcm_vb[s->prediction_vq[j][k]][1] / 8192, + (float) adpcm_vb[s->prediction_vq[j][k]][2] / 8192, + (float) adpcm_vb[s->prediction_vq[j][k]][3] / 8192); } for (j = base_channel; j < s->prim_channels; j++) { av_log(s->avctx, AV_LOG_DEBUG, "bitalloc index: "); @@ -858,8 +893,10 @@ if (!base_channel && s->prim_channels > 2 && s->downmix) { av_log(s->avctx, AV_LOG_DEBUG, "Downmix coeffs:\n"); for (j = 0; j < s->prim_channels; j++) { - av_log(s->avctx, AV_LOG_DEBUG, "Channel 0,%d = %f\n", j, dca_downmix_coeffs[s->downmix_coef[j][0]]); - av_log(s->avctx, AV_LOG_DEBUG, "Channel 1,%d = %f\n", j, dca_downmix_coeffs[s->downmix_coef[j][1]]); + av_log(s->avctx, AV_LOG_DEBUG, "Channel 0, %d = %f\n", j, + dca_downmix_coeffs[s->downmix_coef[j][0]]); + av_log(s->avctx, AV_LOG_DEBUG, "Channel 1, %d = %f\n", j, + dca_downmix_coeffs[s->downmix_coef[j][1]]); } av_log(s->avctx, AV_LOG_DEBUG, "\n"); } @@ -880,7 +917,7 @@ return 0; } -static void qmf_32_subbands(DCAContext * s, int chans, +static void qmf_32_subbands(DCAContext *s, int chans, float samples_in[32][8], float *samples_out, float scale) { @@ -890,7 +927,7 @@ int sb_act = s->subband_activity[chans]; int subindex; - scale *= sqrt(1/8.0); + scale *= sqrt(1 / 8.0); /* Select filter */ if (!s->multirate_inter) /* Non-perfect reconstruction */ @@ -898,22 +935,24 @@ else /* Perfect reconstruction */ prCoeff = fir_32bands_perfect; + for (i = sb_act; i < 32; i++) + s->raXin[i] = 0.0; + /* Reconstructed channel sample index */ for (subindex = 0; subindex < 8; subindex++) { /* Load in one sample from each subband and clear inactive subbands */ - for (i = 0; i < sb_act; i++){ - uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ ((i-1)&2)<<30; + for (i = 0; i < sb_act; i++) { + unsigned sign = (i - 1) & 2; + uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ sign << 30; AV_WN32A(&s->raXin[i], v); } - for (; i < 32; i++) - s->raXin[i] = 0.0; s->synth.synth_filter_float(&s->imdct, - s->subband_fir_hist[chans], &s->hist_index[chans], - s->subband_fir_noidea[chans], prCoeff, - samples_out, s->raXin, scale); - samples_out+= 32; - + s->subband_fir_hist[chans], + &s->hist_index[chans], + s->subband_fir_noidea[chans], prCoeff, + samples_out, s->raXin, scale); + samples_out += 32; } } @@ -943,45 +982,44 @@ } /* Interpolation */ for (deciindex = 0; deciindex < num_deci_sample; deciindex++) { - s->dcadsp.lfe_fir(samples_out, samples_in, prCoeff, decifactor, - scale); + s->dcadsp.lfe_fir(samples_out, samples_in, prCoeff, decifactor, scale); samples_in++; samples_out += 2 * decifactor; } } /* downmixing routines */ -#define MIX_REAR1(samples, si1, rs, coef) \ - samples[i] += samples[si1] * coef[rs][0]; \ - samples[i+256] += samples[si1] * coef[rs][1]; - -#define MIX_REAR2(samples, si1, si2, rs, coef) \ - samples[i] += samples[si1] * coef[rs][0] + samples[si2] * coef[rs+1][0]; \ - samples[i+256] += samples[si1] * coef[rs][1] + samples[si2] * coef[rs+1][1]; - -#define MIX_FRONT3(samples, coef) \ - t = samples[i+c]; \ - u = samples[i+l]; \ - v = samples[i+r]; \ +#define MIX_REAR1(samples, si1, rs, coef) \ + samples[i] += samples[si1] * coef[rs][0]; \ + samples[i+256] += samples[si1] * coef[rs][1]; + +#define MIX_REAR2(samples, si1, si2, rs, coef) \ + samples[i] += samples[si1] * coef[rs][0] + samples[si2] * coef[rs + 1][0]; \ + samples[i+256] += samples[si1] * coef[rs][1] + samples[si2] * coef[rs + 1][1]; + +#define MIX_FRONT3(samples, coef) \ + t = samples[i + c]; \ + u = samples[i + l]; \ + v = samples[i + r]; \ samples[i] = t * coef[0][0] + u * coef[1][0] + v * coef[2][0]; \ samples[i+256] = t * coef[0][1] + u * coef[1][1] + v * coef[2][1]; -#define DOWNMIX_TO_STEREO(op1, op2) \ - for (i = 0; i < 256; i++){ \ - op1 \ - op2 \ +#define DOWNMIX_TO_STEREO(op1, op2) \ + for (i = 0; i < 256; i++) { \ + op1 \ + op2 \ } static void dca_downmix(float *samples, int srcfmt, int downmix_coef[DCA_PRIM_CHANNELS_MAX][2], const int8_t *channel_mapping) { - int c,l,r,sl,sr,s; + int c, l, r, sl, sr, s; int i; float t, u, v; float coef[DCA_PRIM_CHANNELS_MAX][2]; - for (i=0; icurrent_subsubframe; @@ -1079,7 +1130,7 @@ for (k = base_channel; k < s->prim_channels; k++) { if (get_bits_left(&s->gb) < 0) - return -1; + return AVERROR_INVALIDDATA; for (l = 0; l < s->vq_start_subband[k]; l++) { int m; @@ -1099,39 +1150,45 @@ /* * Extract bits from the bit stream */ - if (!abits){ + if (!abits) { memset(subband_samples[k][l], 0, 8 * sizeof(subband_samples[0][0][0])); } else { /* Deal with transients */ int sfi = s->transition_mode[k][l] && subsubframe >= s->transition_mode[k][l]; - float rscale = quant_step_size * s->scale_factor[k][l][sfi] * s->scalefactor_adj[k][sel]; + float rscale = quant_step_size * s->scale_factor[k][l][sfi] * + s->scalefactor_adj[k][sel]; - if (abits >= 11 || !dca_smpl_bitalloc[abits].vlc[sel].table){ - if (abits <= 7){ + if (abits >= 11 || !dca_smpl_bitalloc[abits].vlc[sel].table) { + if (abits <= 7) { /* Block code */ - int block_code1, block_code2, size, levels; + int block_code1, block_code2, size, levels, err; - size = abits_sizes[abits-1]; - levels = abits_levels[abits-1]; + size = abits_sizes[abits - 1]; + levels = abits_levels[abits - 1]; block_code1 = get_bits(&s->gb, size); - /* FIXME Should test return value */ - decode_blockcode(block_code1, levels, block); block_code2 = get_bits(&s->gb, size); - decode_blockcode(block_code2, levels, &block[4]); - }else{ + err = decode_blockcodes(block_code1, block_code2, + levels, block); + if (err) { + av_log(s->avctx, AV_LOG_ERROR, + "ERROR: block code look-up failed\n"); + return AVERROR_INVALIDDATA; + } + } else { /* no coding */ for (m = 0; m < 8; m++) block[m] = get_sbits(&s->gb, abits - 3); } - }else{ + } else { /* Huffman coded */ for (m = 0; m < 8; m++) - block[m] = get_bitalloc(&s->gb, &dca_smpl_bitalloc[abits], sel); + block[m] = get_bitalloc(&s->gb, + &dca_smpl_bitalloc[abits], sel); } s->fmt_conv.int32_to_float_fmul_scalar(subband_samples[k][l], - block, rscale, 8); + block, rscale, 8); } /* @@ -1148,8 +1205,7 @@ else if (s->predictor_history) subband_samples[k][l][m] += (adpcm_vb[s->prediction_vq[k][l]][n - 1] * - s->subband_samples_hist[k][l][m - n + - 4] / 8192); + s->subband_samples_hist[k][l][m - n + 4] / 8192); } } } @@ -1160,19 +1216,17 @@ for (l = s->vq_start_subband[k]; l < s->subband_activity[k]; l++) { /* 1 vector -> 32 samples but we only need the 8 samples * for this subsubframe. */ - int m; + int hfvq = s->high_freq_vq[k][l]; if (!s->debug_flag & 0x01) { - av_log(s->avctx, AV_LOG_DEBUG, "Stream with high frequencies VQ coding\n"); + av_log(s->avctx, AV_LOG_DEBUG, + "Stream with high frequencies VQ coding\n"); s->debug_flag |= 0x01; } - for (m = 0; m < 8; m++) { - subband_samples[k][l][m] = - high_freq_vq[s->high_freq_vq[k][l]][subsubframe * 8 + - m] - * (float) s->scale_factor[k][l][0] / 16.0; - } + int8x8_fmul_int32(subband_samples[k][l], + &high_freq_vq[hfvq][subsubframe * 8], + s->scale_factor[k][l][0]); } } @@ -1190,23 +1244,25 @@ /* Backup predictor history for adpcm */ for (k = base_channel; k < s->prim_channels; k++) for (l = 0; l < s->vq_start_subband[k]; l++) - memcpy(s->subband_samples_hist[k][l], &subband_samples[k][l][4], - 4 * sizeof(subband_samples[0][0][0])); + memcpy(s->subband_samples_hist[k][l], + &subband_samples[k][l][4], + 4 * sizeof(subband_samples[0][0][0])); return 0; } -static int dca_filter_channels(DCAContext * s, int block_index) +static int dca_filter_channels(DCAContext *s, int block_index) { float (*subband_samples)[DCA_SUBBANDS][8] = s->subband_samples[block_index]; int k; /* 32 subbands QMF */ for (k = 0; k < s->prim_channels; k++) { -/* static float pcm_to_double[8] = - {32768.0, 32768.0, 524288.0, 524288.0, 0, 8388608.0, 8388608.0};*/ - qmf_32_subbands(s, k, subband_samples[k], &s->samples[256 * s->channel_order_tab[k]], - M_SQRT1_2*s->scale_bias /*pcm_to_double[s->source_pcm_res] */ ); +/* static float pcm_to_double[8] = { 32768.0, 32768.0, 524288.0, 524288.0, + 0, 8388608.0, 8388608.0 };*/ + qmf_32_subbands(s, k, subband_samples[k], + &s->samples[256 * s->channel_order_tab[k]], + M_SQRT1_2 * s->scale_bias /* pcm_to_double[s->source_pcm_res] */); } /* Down mixing */ @@ -1219,7 +1275,7 @@ lfe_interpolation_fir(s, s->lfe, 2 * s->lfe, s->lfe_data + 2 * s->lfe * (block_index + 4), &s->samples[256 * dca_lfe_index[s->amode]], - (1.0/256.0)*s->scale_bias); + (1.0 / 256.0) * s->scale_bias); /* Outputs 20bits pcm samples */ } @@ -1227,7 +1283,7 @@ } -static int dca_subframe_footer(DCAContext * s, int base_channel) +static int dca_subframe_footer(DCAContext *s, int base_channel) { int aux_data_count = 0, i; @@ -1238,7 +1294,7 @@ /* presumably optional information only appears in the core? */ if (!base_channel) { if (s->timestamp) - get_bits(&s->gb, 32); + skip_bits_long(&s->gb, 32); if (s->aux_data) aux_data_count = get_bits(&s->gb, 6); @@ -1259,14 +1315,15 @@ * @param s pointer to the DCAContext */ -static int dca_decode_block(DCAContext * s, int base_channel, int block_index) +static int dca_decode_block(DCAContext *s, int base_channel, int block_index) { + int ret; /* Sanity check */ if (s->current_subframe >= s->subframes) { av_log(s->avctx, AV_LOG_DEBUG, "check failed: %i>%i", s->current_subframe, s->subframes); - return -1; + return AVERROR_INVALIDDATA; } if (!s->current_subsubframe) { @@ -1274,16 +1331,16 @@ av_log(s->avctx, AV_LOG_DEBUG, "DSYNC dca_subframe_header\n"); #endif /* Read subframe header */ - if (dca_subframe_header(s, base_channel, block_index)) - return -1; + if ((ret = dca_subframe_header(s, base_channel, block_index))) + return ret; } /* Read subsubframe */ #ifdef TRACE av_log(s->avctx, AV_LOG_DEBUG, "DSYNC dca_subsubframe\n"); #endif - if (dca_subsubframe(s, base_channel, block_index)) - return -1; + if ((ret = dca_subsubframe(s, base_channel, block_index))) + return ret; /* Update state */ s->current_subsubframe++; @@ -1296,8 +1353,8 @@ av_log(s->avctx, AV_LOG_DEBUG, "DSYNC dca_subframe_footer\n"); #endif /* Read subframe footer */ - if (dca_subframe_footer(s, base_channel)) - return -1; + if ((ret = dca_subframe_footer(s, base_channel))) + return ret; } return 0; @@ -1306,8 +1363,8 @@ /** * Convert bitstream to one representation based on sync marker */ -static int dca_convert_bitstream(const uint8_t * src, int src_size, uint8_t * dst, - int max_size) +static int dca_convert_bitstream(const uint8_t *src, int src_size, uint8_t *dst, + int max_size) { uint32_t mrk; int i, tmp; @@ -1315,8 +1372,8 @@ uint16_t *sdst = (uint16_t *) dst; PutBitContext pb; - if ((unsigned)src_size > (unsigned)max_size) { -// av_log(NULL, AV_LOG_ERROR, "Input frame size larger then DCA_MAX_FRAME_SIZE!\n"); + if ((unsigned) src_size > (unsigned) max_size) { +// av_log(NULL, AV_LOG_ERROR, "Input frame size larger than DCA_MAX_FRAME_SIZE!\n"); // return -1; src_size = max_size; } @@ -1340,7 +1397,7 @@ flush_put_bits(&pb); return (put_bits_count(&pb) + 7) >> 3; default: - return -1; + return AVERROR_INVALIDDATA; } } @@ -1350,18 +1407,16 @@ static int dca_exss_mask2count(int mask) { /* count bits that mean speaker pairs twice */ - return av_popcount(mask) - + av_popcount(mask & ( - DCA_EXSS_CENTER_LEFT_RIGHT - | DCA_EXSS_FRONT_LEFT_RIGHT - | DCA_EXSS_FRONT_HIGH_LEFT_RIGHT - | DCA_EXSS_WIDE_LEFT_RIGHT - | DCA_EXSS_SIDE_LEFT_RIGHT - | DCA_EXSS_SIDE_HIGH_LEFT_RIGHT - | DCA_EXSS_SIDE_REAR_LEFT_RIGHT - | DCA_EXSS_REAR_LEFT_RIGHT - | DCA_EXSS_REAR_HIGH_LEFT_RIGHT - )); + return av_popcount(mask) + + av_popcount(mask & (DCA_EXSS_CENTER_LEFT_RIGHT | + DCA_EXSS_FRONT_LEFT_RIGHT | + DCA_EXSS_FRONT_HIGH_LEFT_RIGHT | + DCA_EXSS_WIDE_LEFT_RIGHT | + DCA_EXSS_SIDE_LEFT_RIGHT | + DCA_EXSS_SIDE_HIGH_LEFT_RIGHT | + DCA_EXSS_SIDE_REAR_LEFT_RIGHT | + DCA_EXSS_REAR_LEFT_RIGHT | + DCA_EXSS_REAR_HIGH_LEFT_RIGHT)); } /** @@ -1387,7 +1442,7 @@ int header_size; int channels; int embedded_stereo = 0; - int embedded_6ch = 0; + int embedded_6ch = 0; int drc_code_present; int extensions_mask; int i, j; @@ -1522,7 +1577,8 @@ if (!(extensions_mask & DCA_EXT_CORE)) av_log(s->avctx, AV_LOG_WARNING, "DTS core detection mismatch.\n"); if ((extensions_mask & DCA_CORE_EXTS) != s->core_ext_mask) - av_log(s->avctx, AV_LOG_WARNING, "DTS extensions detection mismatch (%d, %d)\n", + av_log(s->avctx, AV_LOG_WARNING, + "DTS extensions detection mismatch (%d, %d)\n", extensions_mask & DCA_CORE_EXTS, s->core_ext_mask); return 0; @@ -1547,7 +1603,7 @@ ss_index = get_bits(&s->gb, 2); blownup = get_bits1(&s->gb); - skip_bits(&s->gb, 8 + 4 * blownup); // header_size + skip_bits(&s->gb, 8 + 4 * blownup); // header_size skip_bits(&s->gb, 16 + 4 * blownup); // hd_size s->static_fields = get_bits1(&s->gb); @@ -1588,18 +1644,18 @@ int mix_out_mask_size; skip_bits(&s->gb, 2); // adjustment level - mix_out_mask_size = (get_bits(&s->gb, 2) + 1) << 2; - s->num_mix_configs = get_bits(&s->gb, 2) + 1; + mix_out_mask_size = (get_bits(&s->gb, 2) + 1) << 2; + s->num_mix_configs = get_bits(&s->gb, 2) + 1; for (i = 0; i < s->num_mix_configs; i++) { - int mix_out_mask = get_bits(&s->gb, mix_out_mask_size); + int mix_out_mask = get_bits(&s->gb, mix_out_mask_size); s->mix_config_num_ch[i] = dca_exss_mask2count(mix_out_mask); } } } for (i = 0; i < num_assets; i++) - skip_bits_long(&s->gb, 16 + 4 * blownup); // asset size + skip_bits_long(&s->gb, 16 + 4 * blownup); // asset size for (i = 0; i < num_assets; i++) { if (dca_exss_parse_asset_header(s)) @@ -1614,19 +1670,17 @@ * Main frame decoding function * FIXME add arguments */ -static int dca_decode_frame(AVCodecContext * avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int dca_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; int lfe_samples; int num_core_channels = 0; - int i; - float *samples_flt = data; - int16_t *samples_s16 = data; - int out_size; + int i, ret; + float *samples_flt; + int16_t *samples_s16; DCAContext *s = avctx->priv_data; int channels; int core_ss_end; @@ -1636,25 +1690,28 @@ s->dca_buffer_size = dca_convert_bitstream(buf, buf_size, s->dca_buffer, DCA_MAX_FRAME_SIZE + DCA_MAX_EXSS_HEADER_SIZE); - if (s->dca_buffer_size == -1) { + if (s->dca_buffer_size == AVERROR_INVALIDDATA) { av_log(avctx, AV_LOG_ERROR, "Not a valid DCA frame\n"); - return -1; + return AVERROR_INVALIDDATA; } init_get_bits(&s->gb, s->dca_buffer, s->dca_buffer_size * 8); - if (dca_parse_frame_header(s) < 0) { + if ((ret = dca_parse_frame_header(s)) < 0) { //seems like the frame is corrupt, try with the next one - *data_size=0; - return buf_size; + return ret; } //set AVCodec values with parsed data avctx->sample_rate = s->sample_rate; - avctx->bit_rate = s->bit_rate; + avctx->bit_rate = s->bit_rate; + avctx->frame_size = s->sample_blocks * 32; s->profile = FF_PROFILE_DTS; for (i = 0; i < (s->sample_blocks / 8); i++) { - dca_decode_block(s, 0, i); + if ((ret = dca_decode_block(s, 0, i))) { + av_log(avctx, AV_LOG_ERROR, "error decoding block\n"); + return ret; + } } /* record number of core channels incase less than max channels are requested */ @@ -1678,69 +1735,71 @@ /* extensions start at 32-bit boundaries into bitstream */ skip_bits_long(&s->gb, (-get_bits_count(&s->gb)) & 31); - while(core_ss_end - get_bits_count(&s->gb) >= 32) { - uint32_t bits = get_bits_long(&s->gb, 32); - - switch(bits) { - case 0x5a5a5a5a: { - int ext_amode, xch_fsize; + while (core_ss_end - get_bits_count(&s->gb) >= 32) { + uint32_t bits = get_bits_long(&s->gb, 32); - s->xch_base_channel = s->prim_channels; - - /* validate sync word using XCHFSIZE field */ - xch_fsize = show_bits(&s->gb, 10); - if((s->frame_size != (get_bits_count(&s->gb) >> 3) - 4 + xch_fsize) && - (s->frame_size != (get_bits_count(&s->gb) >> 3) - 4 + xch_fsize + 1)) - continue; - - /* skip length-to-end-of-frame field for the moment */ - skip_bits(&s->gb, 10); + switch (bits) { + case 0x5a5a5a5a: { + int ext_amode, xch_fsize; + + s->xch_base_channel = s->prim_channels; + + /* validate sync word using XCHFSIZE field */ + xch_fsize = show_bits(&s->gb, 10); + if ((s->frame_size != (get_bits_count(&s->gb) >> 3) - 4 + xch_fsize) && + (s->frame_size != (get_bits_count(&s->gb) >> 3) - 4 + xch_fsize + 1)) + continue; + + /* skip length-to-end-of-frame field for the moment */ + skip_bits(&s->gb, 10); + + s->core_ext_mask |= DCA_EXT_XCH; + + /* extension amode(number of channels in extension) should be 1 */ + /* AFAIK XCh is not used for more channels */ + if ((ext_amode = get_bits(&s->gb, 4)) != 1) { + av_log(avctx, AV_LOG_ERROR, "XCh extension amode %d not" + " supported!\n", ext_amode); + continue; + } - s->core_ext_mask |= DCA_EXT_XCH; + /* much like core primary audio coding header */ + dca_parse_audio_coding_header(s, s->xch_base_channel); - /* extension amode should == 1, number of channels in extension */ - /* AFAIK XCh is not used for more channels */ - if ((ext_amode = get_bits(&s->gb, 4)) != 1) { - av_log(avctx, AV_LOG_ERROR, "XCh extension amode %d not" - " supported!\n",ext_amode); - continue; - } - - /* much like core primary audio coding header */ - dca_parse_audio_coding_header(s, s->xch_base_channel); + for (i = 0; i < (s->sample_blocks / 8); i++) + if ((ret = dca_decode_block(s, s->xch_base_channel, i))) { + av_log(avctx, AV_LOG_ERROR, "error decoding XCh extension\n"); + continue; + } - for (i = 0; i < (s->sample_blocks / 8); i++) { - dca_decode_block(s, s->xch_base_channel, i); + s->xch_present = 1; + break; } + case 0x47004a03: + /* XXCh: extended channels */ + /* usually found either in core or HD part in DTS-HD HRA streams, + * but not in DTS-ES which contains XCh extensions instead */ + s->core_ext_mask |= DCA_EXT_XXCH; + break; - s->xch_present = 1; - break; - } - case 0x47004a03: - /* XXCh: extended channels */ - /* usually found either in core or HD part in DTS-HD HRA streams, - * but not in DTS-ES which contains XCh extensions instead */ - s->core_ext_mask |= DCA_EXT_XXCH; - break; + case 0x1d95f262: { + int fsize96 = show_bits(&s->gb, 12) + 1; + if (s->frame_size != (get_bits_count(&s->gb) >> 3) - 4 + fsize96) + continue; - case 0x1d95f262: { - int fsize96 = show_bits(&s->gb, 12) + 1; - if (s->frame_size != (get_bits_count(&s->gb) >> 3) - 4 + fsize96) - continue; + av_log(avctx, AV_LOG_DEBUG, "X96 extension found at %d bits\n", + get_bits_count(&s->gb)); + skip_bits(&s->gb, 12); + av_log(avctx, AV_LOG_DEBUG, "FSIZE96 = %d bytes\n", fsize96); + av_log(avctx, AV_LOG_DEBUG, "REVNO = %d\n", get_bits(&s->gb, 4)); - av_log(avctx, AV_LOG_DEBUG, "X96 extension found at %d bits\n", get_bits_count(&s->gb)); - skip_bits(&s->gb, 12); - av_log(avctx, AV_LOG_DEBUG, "FSIZE96 = %d bytes\n", fsize96); - av_log(avctx, AV_LOG_DEBUG, "REVNO = %d\n", get_bits(&s->gb, 4)); + s->core_ext_mask |= DCA_EXT_X96; + break; + } + } - s->core_ext_mask |= DCA_EXT_X96; - break; + skip_bits_long(&s->gb, (-get_bits_count(&s->gb)) & 31); } - } - - skip_bits_long(&s->gb, (-get_bits_count(&s->gb)) & 31); - } - } else { /* no supported extensions, skip the rest of the core substream */ skip_bits_long(&s->gb, core_ss_end - get_bits_count(&s->gb)); @@ -1752,15 +1811,15 @@ s->profile = FF_PROFILE_DTS_ES; /* check for ExSS (HD part) */ - if (s->dca_buffer_size - s->frame_size > 32 - && get_bits_long(&s->gb, 32) == DCA_HD_MARKER) + if (s->dca_buffer_size - s->frame_size > 32 && + get_bits_long(&s->gb, 32) == DCA_HD_MARKER) dca_exss_parse_header(s); avctx->profile = s->profile; channels = s->prim_channels + !!s->lfe; - if (s->amode<16) { + if (s->amode < 16) { avctx->channel_layout = dca_core_channel_layout[s->amode]; if (s->xch_present && (!avctx->request_channels || @@ -1784,7 +1843,7 @@ if (channels > !!s->lfe && s->channel_order_tab[channels - 1 - !!s->lfe] < 0) - return -1; + return AVERROR_INVALIDDATA; if (avctx->request_channels == 2 && s->prim_channels > 2) { channels = 2; @@ -1792,8 +1851,8 @@ avctx->channel_layout = AV_CH_LAYOUT_STEREO; } } else { - av_log(avctx, AV_LOG_ERROR, "Non standard configuration %d !\n",s->amode); - return -1; + av_log(avctx, AV_LOG_ERROR, "Non standard configuration %d !\n", s->amode); + return AVERROR_INVALIDDATA; } @@ -1809,14 +1868,17 @@ if (avctx->channels != channels) { av_log(avctx, AV_LOG_ERROR, "DCA decoder does not support number of " "channels changing in stream. Skipping frame.\n"); - return -1; + return AVERROR_PATCHWELCOME; } - out_size = 256 / 8 * s->sample_blocks * channels * - av_get_bytes_per_sample(avctx->sample_fmt); - if (*data_size < out_size) - return -1; - *data_size = out_size; + /* get output buffer */ + s->frame.nb_samples = 256 * (s->sample_blocks / 8); + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples_flt = (float *) s->frame.data[0]; + samples_s16 = (int16_t *) s->frame.data[0]; /* filter to get final output */ for (i = 0; i < (s->sample_blocks / 8); i++) { @@ -1824,15 +1886,12 @@ /* If this was marked as a DTS-ES stream we need to subtract back- */ /* channel from SL & SR to remove matrixed back-channel signal */ - if((s->source_pcm_res & 1) && s->xch_present) { - float* back_chan = s->samples + s->channel_order_tab[s->xch_base_channel] * 256; - float* lt_chan = s->samples + s->channel_order_tab[s->xch_base_channel - 2] * 256; - float* rt_chan = s->samples + s->channel_order_tab[s->xch_base_channel - 1] * 256; - int j; - for(j = 0; j < 256; ++j) { - lt_chan[j] -= back_chan[j] * M_SQRT1_2; - rt_chan[j] -= back_chan[j] * M_SQRT1_2; - } + if ((s->source_pcm_res & 1) && s->xch_present) { + float *back_chan = s->samples + s->channel_order_tab[s->xch_base_channel] * 256; + float *lt_chan = s->samples + s->channel_order_tab[s->xch_base_channel - 2] * 256; + float *rt_chan = s->samples + s->channel_order_tab[s->xch_base_channel - 1] * 256; + s->dsp.vector_fmac_scalar(lt_chan, back_chan, -M_SQRT1_2, 256); + s->dsp.vector_fmac_scalar(rt_chan, back_chan, -M_SQRT1_2, 256); } if (avctx->sample_fmt == AV_SAMPLE_FMT_FLT) { @@ -1849,9 +1908,11 @@ /* update lfe history */ lfe_samples = 2 * s->lfe * (s->sample_blocks / 8); - for (i = 0; i < 2 * s->lfe * 4; i++) { + for (i = 0; i < 2 * s->lfe * 4; i++) s->lfe_data[i] = s->lfe_data[i + lfe_samples]; - } + + *got_frame_ptr = 1; + *(AVFrame *) data = s->frame; return buf_size; } @@ -1864,7 +1925,7 @@ * @param avctx pointer to the AVCodecContext */ -static av_cold int dca_decode_init(AVCodecContext * avctx) +static av_cold int dca_decode_init(AVCodecContext *avctx) { DCAContext *s = avctx->priv_data; int i; @@ -1878,15 +1939,15 @@ ff_dcadsp_init(&s->dcadsp); ff_fmt_convert_init(&s->fmt_conv, avctx); - for (i = 0; i < DCA_PRIM_CHANNELS_MAX+1; i++) + for (i = 0; i < DCA_PRIM_CHANNELS_MAX + 1; i++) s->samples_chanptr[i] = s->samples + i * 256; if (avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT) { avctx->sample_fmt = AV_SAMPLE_FMT_FLT; - s->scale_bias = 1.0 / 32768.0; + s->scale_bias = 1.0 / 32768.0; } else { avctx->sample_fmt = AV_SAMPLE_FMT_S16; - s->scale_bias = 1.0; + s->scale_bias = 1.0; } /* allow downmixing to stereo */ @@ -1895,10 +1956,13 @@ avctx->channels = avctx->request_channels; } + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } -static av_cold int dca_decode_end(AVCodecContext * avctx) +static av_cold int dca_decode_end(AVCodecContext *avctx) { DCAContext *s = avctx->priv_data; ff_mdct_end(&s->imdct); @@ -1915,17 +1979,17 @@ }; AVCodec ff_dca_decoder = { - .name = "dca", - .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_DTS, - .priv_data_size = sizeof(DCAContext), - .init = dca_decode_init, - .decode = dca_decode_frame, - .close = dca_decode_end, - .long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"), - .capabilities = CODEC_CAP_CHANNEL_CONF, - .sample_fmts = (const enum AVSampleFormat[]) { - AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE - }, - .profiles = NULL_IF_CONFIG_SMALL(profiles), + .name = "dca", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_DTS, + .priv_data_size = sizeof(DCAContext), + .init = dca_decode_init, + .decode = dca_decode_frame, + .close = dca_decode_end, + .long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"), + .capabilities = CODEC_CAP_CHANNEL_CONF | CODEC_CAP_DR1, + .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT, + AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_NONE }, + .profiles = NULL_IF_CONFIG_SMALL(profiles), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dcadata.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dcadata.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dcadata.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dcadata.h 2012-01-11 00:34:30.000000000 +0000 @@ -4224,7 +4224,7 @@ /* Vector quantization tables */ -static const int8_t high_freq_vq[1024][32] = +DECLARE_ALIGNED(8, static const int8_t, high_freq_vq)[1024][32] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dca_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dca_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dca_parser.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dca_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -39,7 +39,7 @@ || state == DCA_MARKER_RAW_LE || state == DCA_MARKER_RAW_BE) /** - * finds the end of the current frame in the bitstream. + * Find the end of the current frame in the bitstream. * @return the position of the first byte of the next frame, or -1 */ static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf, @@ -126,9 +126,9 @@ } AVCodecParser ff_dca_parser = { - {CODEC_ID_DTS}, - sizeof(DCAParseContext), - dca_parse_init, - dca_parse, - ff_parse_close, + .codec_ids = { CODEC_ID_DTS }, + .priv_data_size = sizeof(DCAParseContext), + .parser_init = dca_parse_init, + .parser_parse = dca_parse, + .parser_close = ff_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dct.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dct.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dct.c 2011-05-19 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dct.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,15 +28,16 @@ */ #include + #include "libavutil/mathematics.h" #include "dct.h" #include "dct32.h" -/* sin((M_PI * x / (2*n)) */ -#define SIN(s,n,x) (s->costab[(n) - (x)]) +/* sin((M_PI * x / (2 * n)) */ +#define SIN(s, n, x) (s->costab[(n) - (x)]) -/* cos((M_PI * x / (2*n)) */ -#define COS(s,n,x) (s->costab[x]) +/* cos((M_PI * x / (2 * n)) */ +#define COS(s, n, x) (s->costab[x]) static void ff_dst_calc_I_c(DCTContext *ctx, FFTSample *data) { @@ -44,28 +45,28 @@ int i; data[0] = 0; - for(i = 1; i < n/2; i++) { - float tmp1 = data[i ]; - float tmp2 = data[n - i]; - float s = SIN(ctx, n, 2*i); - - s *= tmp1 + tmp2; - tmp1 = (tmp1 - tmp2) * 0.5f; - data[i ] = s + tmp1; - data[n - i] = s - tmp1; + for (i = 1; i < n / 2; i++) { + float tmp1 = data[i ]; + float tmp2 = data[n - i]; + float s = SIN(ctx, n, 2 * i); + + s *= tmp1 + tmp2; + tmp1 = (tmp1 - tmp2) * 0.5f; + data[i] = s + tmp1; + data[n - i] = s - tmp1; } - data[n/2] *= 2; + data[n / 2] *= 2; ctx->rdft.rdft_calc(&ctx->rdft, data); data[0] *= 0.5f; - for(i = 1; i < n-2; i += 2) { - data[i + 1] += data[i - 1]; - data[i ] = -data[i + 2]; + for (i = 1; i < n - 2; i += 2) { + data[i + 1] += data[i - 1]; + data[i] = -data[i + 2]; } - data[n-1] = 0; + data[n - 1] = 0; } static void ff_dct_calc_I_c(DCTContext *ctx, FFTSample *data) @@ -74,19 +75,19 @@ int i; float next = -0.5f * (data[0] - data[n]); - for(i = 0; i < n/2; i++) { - float tmp1 = data[i ]; + for (i = 0; i < n / 2; i++) { + float tmp1 = data[i]; float tmp2 = data[n - i]; - float s = SIN(ctx, n, 2*i); - float c = COS(ctx, n, 2*i); + float s = SIN(ctx, n, 2 * i); + float c = COS(ctx, n, 2 * i); c *= tmp1 - tmp2; s *= tmp1 - tmp2; next += c; - tmp1 = (tmp1 + tmp2) * 0.5f; - data[i ] = tmp1 - s; + tmp1 = (tmp1 + tmp2) * 0.5f; + data[i] = tmp1 - s; data[n - i] = tmp1 + s; } @@ -94,7 +95,7 @@ data[n] = data[1]; data[1] = next; - for(i = 3; i <= n; i += 2) + for (i = 3; i <= n; i += 2) data[i] = data[i - 2] - data[i]; } @@ -103,16 +104,16 @@ int n = 1 << ctx->nbits; int i; - float next = data[n - 1]; + float next = data[n - 1]; float inv_n = 1.0f / n; for (i = n - 2; i >= 2; i -= 2) { - float val1 = data[i ]; + float val1 = data[i]; float val2 = data[i - 1] - data[i + 1]; - float c = COS(ctx, n, i); - float s = SIN(ctx, n, i); + float c = COS(ctx, n, i); + float s = SIN(ctx, n, i); - data[i ] = c * val1 + s * val2; + data[i] = c * val1 + s * val2; data[i + 1] = s * val1 - c * val2; } @@ -121,13 +122,13 @@ ctx->rdft.rdft_calc(&ctx->rdft, data); for (i = 0; i < n / 2; i++) { - float tmp1 = data[i ] * inv_n; + float tmp1 = data[i] * inv_n; float tmp2 = data[n - i - 1] * inv_n; - float csc = ctx->csc2[i] * (tmp1 - tmp2); + float csc = ctx->csc2[i] * (tmp1 - tmp2); - tmp1 += tmp2; - data[i ] = tmp1 + csc; - data[n - i - 1] = tmp1 - csc; + tmp1 += tmp2; + data[i] = tmp1 + csc; + data[n - i - 1] = tmp1 - csc; } } @@ -137,34 +138,33 @@ int i; float next; - for (i=0; i < n/2; i++) { - float tmp1 = data[i ]; + for (i = 0; i < n / 2; i++) { + float tmp1 = data[i]; float tmp2 = data[n - i - 1]; - float s = SIN(ctx, n, 2*i + 1); + float s = SIN(ctx, n, 2 * i + 1); - s *= tmp1 - tmp2; - tmp1 = (tmp1 + tmp2) * 0.5f; + s *= tmp1 - tmp2; + tmp1 = (tmp1 + tmp2) * 0.5f; - data[i ] = tmp1 + s; + data[i] = tmp1 + s; data[n-i-1] = tmp1 - s; } ctx->rdft.rdft_calc(&ctx->rdft, data); - next = data[1] * 0.5; + next = data[1] * 0.5; data[1] *= -1; for (i = n - 2; i >= 0; i -= 2) { float inr = data[i ]; float ini = data[i + 1]; - float c = COS(ctx, n, i); - float s = SIN(ctx, n, i); + float c = COS(ctx, n, i); + float s = SIN(ctx, n, i); - data[i ] = c * inr + s * ini; + data[i] = c * inr + s * ini; + data[i + 1] = next; - data[i+1] = next; - - next += s * inr - c * ini; + next += s * inr - c * ini; } } @@ -180,36 +180,36 @@ memset(s, 0, sizeof(*s)); - s->nbits = nbits; - s->inverse = inverse; + s->nbits = nbits; + s->inverse = inverse; if (inverse == DCT_II && nbits == 5) { s->dct_calc = dct32_func; } else { - ff_init_ff_cos_tabs(nbits+2); - - s->costab = ff_cos_tabs[nbits+2]; + ff_init_ff_cos_tabs(nbits + 2); - s->csc2 = av_malloc(n/2 * sizeof(FFTSample)); + s->costab = ff_cos_tabs[nbits + 2]; + s->csc2 = av_malloc(n / 2 * sizeof(FFTSample)); if (ff_rdft_init(&s->rdft, nbits, inverse == DCT_III) < 0) { av_free(s->csc2); return -1; } - for (i = 0; i < n/2; i++) - s->csc2[i] = 0.5 / sin((M_PI / (2*n) * (2*i + 1))); + for (i = 0; i < n / 2; i++) + s->csc2[i] = 0.5 / sin((M_PI / (2 * n) * (2 * i + 1))); - switch(inverse) { - case DCT_I : s->dct_calc = ff_dct_calc_I_c; break; - case DCT_II : s->dct_calc = ff_dct_calc_II_c ; break; + switch (inverse) { + case DCT_I : s->dct_calc = ff_dct_calc_I_c; break; + case DCT_II : s->dct_calc = ff_dct_calc_II_c; break; case DCT_III: s->dct_calc = ff_dct_calc_III_c; break; - case DST_I : s->dct_calc = ff_dst_calc_I_c; break; + case DST_I : s->dct_calc = ff_dst_calc_I_c; break; } } s->dct32 = ff_dct32_float; - if (HAVE_MMX) ff_dct_init_mmx(s); + if (HAVE_MMX) + ff_dct_init_mmx(s); return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dctref.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dctref.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dctref.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dctref.h 2012-01-11 00:34:30.000000000 +0000 @@ -22,10 +22,8 @@ #ifndef AVCODEC_DCTREF_H #define AVCODEC_DCTREF_H -#include "dsputil.h" - -void ff_ref_fdct(DCTELEM *block); -void ff_ref_idct(DCTELEM *block); +void ff_ref_fdct(short *block); +void ff_ref_idct(short *block); void ff_ref_dct_init(void); #endif /* AVCODEC_DCTREF_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dct-test.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dct-test.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dct-test.c 2011-05-01 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dct-test.c 2012-01-11 00:34:30.000000000 +0000 @@ -68,12 +68,12 @@ void ff_simple_idct_axp(DCTELEM *data); struct algo { - const char *name; - enum { FDCT, IDCT } is_idct; - void (* func) (DCTELEM *block); - void (* ref) (DCTELEM *block); - enum formattag { NO_PERM,MMX_PERM, MMX_SIMPLE_PERM, SCALE_PERM, SSE2_PERM, PARTTRANS_PERM } format; - int mm_support; + const char *name; + void (*func)(DCTELEM *block); + enum formattag { NO_PERM, MMX_PERM, MMX_SIMPLE_PERM, SCALE_PERM, + SSE2_PERM, PARTTRANS_PERM } format; + int mm_support; + int nonspec; }; #ifndef FAAN_POSTSCALE @@ -84,71 +84,77 @@ static int cpu_flags; -struct algo algos[] = { - {"REF-DBL", 0, ff_ref_fdct, ff_ref_fdct, NO_PERM}, - {"FAAN", 0, ff_faandct, ff_ref_fdct, FAAN_SCALE}, - {"FAANI", 1, ff_faanidct, ff_ref_idct, NO_PERM}, - {"IJG-AAN-INT", 0, fdct_ifast, ff_ref_fdct, SCALE_PERM}, - {"IJG-LLM-INT", 0, ff_jpeg_fdct_islow, ff_ref_fdct, NO_PERM}, - {"REF-DBL", 1, ff_ref_idct, ff_ref_idct, NO_PERM}, - {"INT", 1, j_rev_dct, ff_ref_idct, MMX_PERM}, - {"SIMPLE-C", 1, ff_simple_idct, ff_ref_idct, NO_PERM}, +static const struct algo fdct_tab[] = { + { "REF-DBL", ff_ref_fdct, NO_PERM }, + { "FAAN", ff_faandct, FAAN_SCALE }, + { "IJG-AAN-INT", fdct_ifast, SCALE_PERM }, + { "IJG-LLM-INT", ff_jpeg_fdct_islow_8, NO_PERM }, #if HAVE_MMX - {"MMX", 0, ff_fdct_mmx, ff_ref_fdct, NO_PERM, AV_CPU_FLAG_MMX}, -#if HAVE_MMX2 - {"MMX2", 0, ff_fdct_mmx2, ff_ref_fdct, NO_PERM, AV_CPU_FLAG_MMX2}, - {"SSE2", 0, ff_fdct_sse2, ff_ref_fdct, NO_PERM, AV_CPU_FLAG_SSE2}, + { "MMX", ff_fdct_mmx, NO_PERM, AV_CPU_FLAG_MMX }, + { "MMX2", ff_fdct_mmx2, NO_PERM, AV_CPU_FLAG_MMX2 }, + { "SSE2", ff_fdct_sse2, NO_PERM, AV_CPU_FLAG_SSE2 }, #endif -#if CONFIG_GPL - {"LIBMPEG2-MMX", 1, ff_mmx_idct, ff_ref_idct, MMX_PERM, AV_CPU_FLAG_MMX}, - {"LIBMPEG2-MMX2", 1, ff_mmxext_idct, ff_ref_idct, MMX_PERM, AV_CPU_FLAG_MMX2}, +#if HAVE_ALTIVEC + { "altivecfdct", fdct_altivec, NO_PERM, AV_CPU_FLAG_ALTIVEC }, #endif - {"SIMPLE-MMX", 1, ff_simple_idct_mmx, ff_ref_idct, MMX_SIMPLE_PERM, AV_CPU_FLAG_MMX}, - {"XVID-MMX", 1, ff_idct_xvid_mmx, ff_ref_idct, NO_PERM, AV_CPU_FLAG_MMX}, - {"XVID-MMX2", 1, ff_idct_xvid_mmx2, ff_ref_idct, NO_PERM, AV_CPU_FLAG_MMX2}, - {"XVID-SSE2", 1, ff_idct_xvid_sse2, ff_ref_idct, SSE2_PERM, AV_CPU_FLAG_SSE2}, + +#if ARCH_BFIN + { "BFINfdct", ff_bfin_fdct, NO_PERM }, #endif -#if HAVE_ALTIVEC - {"altivecfdct", 0, fdct_altivec, ff_ref_fdct, NO_PERM, AV_CPU_FLAG_ALTIVEC}, + { 0 } +}; + +static const struct algo idct_tab[] = { + { "FAANI", ff_faanidct, NO_PERM }, + { "REF-DBL", ff_ref_idct, NO_PERM }, + { "INT", j_rev_dct, MMX_PERM }, + { "SIMPLE-C", ff_simple_idct_8, NO_PERM }, + +#if HAVE_MMX +#if CONFIG_GPL + { "LIBMPEG2-MMX", ff_mmx_idct, MMX_PERM, AV_CPU_FLAG_MMX, 1 }, + { "LIBMPEG2-MMX2", ff_mmxext_idct, MMX_PERM, AV_CPU_FLAG_MMX2, 1 }, +#endif + { "SIMPLE-MMX", ff_simple_idct_mmx, MMX_SIMPLE_PERM, AV_CPU_FLAG_MMX }, + { "XVID-MMX", ff_idct_xvid_mmx, NO_PERM, AV_CPU_FLAG_MMX, 1 }, + { "XVID-MMX2", ff_idct_xvid_mmx2, NO_PERM, AV_CPU_FLAG_MMX2, 1 }, + { "XVID-SSE2", ff_idct_xvid_sse2, SSE2_PERM, AV_CPU_FLAG_SSE2, 1 }, #endif #if ARCH_BFIN - {"BFINfdct", 0, ff_bfin_fdct, ff_ref_fdct, NO_PERM}, - {"BFINidct", 1, ff_bfin_idct, ff_ref_idct, NO_PERM}, + { "BFINidct", ff_bfin_idct, NO_PERM }, #endif #if ARCH_ARM - {"SIMPLE-ARM", 1, ff_simple_idct_arm, ff_ref_idct, NO_PERM }, - {"INT-ARM", 1, ff_j_rev_dct_arm, ff_ref_idct, MMX_PERM }, + { "SIMPLE-ARM", ff_simple_idct_arm, NO_PERM }, + { "INT-ARM", ff_j_rev_dct_arm, MMX_PERM }, +#endif #if HAVE_ARMV5TE - {"SIMPLE-ARMV5TE", 1, ff_simple_idct_armv5te, ff_ref_idct, NO_PERM }, + { "SIMPLE-ARMV5TE", ff_simple_idct_armv5te,NO_PERM }, #endif #if HAVE_ARMV6 - {"SIMPLE-ARMV6", 1, ff_simple_idct_armv6, ff_ref_idct, MMX_PERM }, + { "SIMPLE-ARMV6", ff_simple_idct_armv6, MMX_PERM }, #endif #if HAVE_NEON - {"SIMPLE-NEON", 1, ff_simple_idct_neon, ff_ref_idct, PARTTRANS_PERM }, + { "SIMPLE-NEON", ff_simple_idct_neon, PARTTRANS_PERM }, #endif -#endif /* ARCH_ARM */ #if ARCH_ALPHA - {"SIMPLE-ALPHA", 1, ff_simple_idct_axp, ff_ref_idct, NO_PERM }, + { "SIMPLE-ALPHA", ff_simple_idct_axp, NO_PERM }, #endif - { 0 } + { 0 } }; #define AANSCALE_BITS 12 -uint8_t cropTbl[256 + 2 * MAX_NEG_CROP]; - static int64_t gettime(void) { struct timeval tv; - gettimeofday(&tv,NULL); + gettimeofday(&tv, NULL); return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; } @@ -157,18 +163,18 @@ static short idct_mmx_perm[64]; -static short idct_simple_mmx_perm[64]={ - 0x00, 0x08, 0x04, 0x09, 0x01, 0x0C, 0x05, 0x0D, - 0x10, 0x18, 0x14, 0x19, 0x11, 0x1C, 0x15, 0x1D, - 0x20, 0x28, 0x24, 0x29, 0x21, 0x2C, 0x25, 0x2D, - 0x12, 0x1A, 0x16, 0x1B, 0x13, 0x1E, 0x17, 0x1F, - 0x02, 0x0A, 0x06, 0x0B, 0x03, 0x0E, 0x07, 0x0F, - 0x30, 0x38, 0x34, 0x39, 0x31, 0x3C, 0x35, 0x3D, - 0x22, 0x2A, 0x26, 0x2B, 0x23, 0x2E, 0x27, 0x2F, - 0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F, +static short idct_simple_mmx_perm[64] = { + 0x00, 0x08, 0x04, 0x09, 0x01, 0x0C, 0x05, 0x0D, + 0x10, 0x18, 0x14, 0x19, 0x11, 0x1C, 0x15, 0x1D, + 0x20, 0x28, 0x24, 0x29, 0x21, 0x2C, 0x25, 0x2D, + 0x12, 0x1A, 0x16, 0x1B, 0x13, 0x1E, 0x17, 0x1F, + 0x02, 0x0A, 0x06, 0x0B, 0x03, 0x0E, 0x07, 0x0F, + 0x30, 0x38, 0x34, 0x39, 0x31, 0x3C, 0x35, 0x3D, + 0x22, 0x2A, 0x26, 0x2B, 0x23, 0x2E, 0x27, 0x2F, + 0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F, }; -static const uint8_t idct_sse2_row_perm[8] = {0, 4, 1, 5, 2, 6, 3, 7}; +static const uint8_t idct_sse2_row_perm[8] = { 0, 4, 1, 5, 2, 6, 3, 7 }; static void idct_mmx_init(void) { @@ -177,13 +183,11 @@ /* the mmx/mmxext idct uses a reordered input, so we patch scan tables */ for (i = 0; i < 64; i++) { idct_mmx_perm[i] = (i & 0x38) | ((i & 6) >> 1) | ((i & 1) << 2); -// idct_simple_mmx_perm[i] = simple_block_permute_op(i); } } DECLARE_ALIGNED(16, static DCTELEM, block)[64]; -DECLARE_ALIGNED(8, static DCTELEM, block1)[64]; -DECLARE_ALIGNED(8, static DCTELEM, block_org)[64]; +DECLARE_ALIGNED(8, static DCTELEM, block1)[64]; static inline void mmx_emms(void) { @@ -193,187 +197,153 @@ #endif } -static void dct_error(const char *name, int is_idct, - void (*fdct_func)(DCTELEM *block), - void (*fdct_ref)(DCTELEM *block), int form, int test) +static void init_block(DCTELEM block[64], int test, int is_idct, AVLFG *prng) { - int it, i, scale; - int err_inf, v; - int64_t err2, ti, ti1, it1; - int64_t sysErr[64], sysErrMax=0; - int maxout=0; - int blockSumErrMax=0, blockSumErr; - AVLFG prng; - - av_lfg_init(&prng, 1); + int i, j; - err_inf = 0; - err2 = 0; - for(i=0; i<64; i++) sysErr[i]=0; - for(it=0;it>=3; - } + switch (test) { + case 0: + for (i = 0; i < 64; i++) + block[i] = (av_lfg_get(prng) % 512) - 256; + if (is_idct) { + ff_ref_fdct(block); + for (i = 0; i < 64; i++) + block[i] >>= 3; + } break; - case 1:{ - int num = av_lfg_get(&prng) % 10 + 1; - for(i=0;i> 3) & 3)] = src[i]; + } else { + for (i = 0; i < 64; i++) + dst[i] = src[i]; + } } -#endif - for(i=0; i<64; i++) - block_org[i]= block1[i]; +static int dct_error(const struct algo *dct, int test, int is_idct, int speed) +{ + void (*ref)(DCTELEM *block) = is_idct ? ff_ref_idct : ff_ref_fdct; + int it, i, scale; + int err_inf, v; + int64_t err2, ti, ti1, it1, err_sum = 0; + int64_t sysErr[64], sysErrMax = 0; + int maxout = 0; + int blockSumErrMax = 0, blockSumErr; + AVLFG prng; + double omse, ome; + int spec_err; - if (form == MMX_PERM) { - for(i=0;i<64;i++) - block[idct_mmx_perm[i]] = block1[i]; - } else if (form == MMX_SIMPLE_PERM) { - for(i=0;i<64;i++) - block[idct_simple_mmx_perm[i]] = block1[i]; - - } else if (form == SSE2_PERM) { - for(i=0; i<64; i++) - block[(i&0x38) | idct_sse2_row_perm[i&7]] = block1[i]; - } else if (form == PARTTRANS_PERM) { - for(i=0; i<64; i++) - block[(i&0x24) | ((i&3)<<3) | ((i>>3)&3)] = block1[i]; - } else { - for(i=0; i<64; i++) - block[i]= block1[i]; - } -#if 0 // simulate mismatch control for tested IDCT but not the ref -{ int sum=0; - for(i=0;i<64;i++) - sum+=block[i]; + av_lfg_init(&prng, 1); - if((sum&1)==0) block[63]^=1; -} -#endif + err_inf = 0; + err2 = 0; + for (i = 0; i < 64; i++) + sysErr[i] = 0; + for (it = 0; it < NB_ITS; it++) { + init_block(block1, test, is_idct, &prng); + permute(block, block1, dct->format); - fdct_func(block); + dct->func(block); mmx_emms(); - if (form == SCALE_PERM) { - for(i=0; i<64; i++) { - scale = 8*(1 << (AANSCALE_BITS + 11)) / ff_aanscales[i]; - block[i] = (block[i] * scale /*+ (1<<(AANSCALE_BITS-1))*/) >> AANSCALE_BITS; + if (dct->format == SCALE_PERM) { + for (i = 0; i < 64; i++) { + scale = 8 * (1 << (AANSCALE_BITS + 11)) / ff_aanscales[i]; + block[i] = (block[i] * scale) >> AANSCALE_BITS; } } - fdct_ref(block1); + ref(block1); - blockSumErr=0; - for(i=0;i<64;i++) { - v = abs(block[i] - block1[i]); + blockSumErr = 0; + for (i = 0; i < 64; i++) { + int err = block[i] - block1[i]; + err_sum += err; + v = abs(err); if (v > err_inf) err_inf = v; err2 += v * v; sysErr[i] += block[i] - block1[i]; blockSumErr += v; - if( abs(block[i])>maxout) maxout=abs(block[i]); - } - if(blockSumErrMax < blockSumErr) blockSumErrMax= blockSumErr; -#if 0 // print different matrix pairs - if(blockSumErr){ - printf("\n"); - for(i=0; i<64; i++){ - if((i&7)==0) printf("\n"); - printf("%4d ", block_org[i]); - } - for(i=0; i<64; i++){ - if((i&7)==0) printf("\n"); - printf("%4d ", block[i] - block1[i]); - } + if (abs(block[i]) > maxout) + maxout = abs(block[i]); } -#endif + if (blockSumErrMax < blockSumErr) + blockSumErrMax = blockSumErr; } - for(i=0; i<64; i++) sysErrMax= FFMAX(sysErrMax, FFABS(sysErr[i])); + for (i = 0; i < 64; i++) + sysErrMax = FFMAX(sysErrMax, FFABS(sysErr[i])); - for(i=0; i<64; i++){ - if(i%8==0) printf("\n"); - printf("%7d ", (int)sysErr[i]); + for (i = 0; i < 64; i++) { + if (i % 8 == 0) + printf("\n"); + printf("%7d ", (int) sysErr[i]); } printf("\n"); - printf("%s %s: err_inf=%d err2=%0.8f syserr=%0.8f maxout=%d blockSumErr=%d\n", - is_idct ? "IDCT" : "DCT", - name, err_inf, (double)err2 / NB_ITS / 64.0, (double)sysErrMax / NB_ITS, maxout, blockSumErrMax); + omse = (double) err2 / NB_ITS / 64; + ome = (double) err_sum / NB_ITS / 64; - /* speed test */ - for(i=0;i<64;i++) - block1[i] = 0; - switch(test){ - case 0: - for(i=0;i<64;i++) - block1[i] = av_lfg_get(&prng) % 512 -256; - if (is_idct){ - ff_ref_fdct(block1); + spec_err = is_idct && (err_inf > 1 || omse > 0.02 || fabs(ome) > 0.0015); - for(i=0;i<64;i++) - block1[i]>>=3; - } - break; - case 1:{ - case 2: - block1[0] = av_lfg_get(&prng) % 512 -256; - block1[1] = av_lfg_get(&prng) % 512 -256; - block1[2] = av_lfg_get(&prng) % 512 -256; - block1[3] = av_lfg_get(&prng) % 512 -256; - }break; - } + printf("%s %s: ppe=%d omse=%0.8f ome=%0.8f syserr=%0.8f maxout=%d blockSumErr=%d\n", + is_idct ? "IDCT" : "DCT", dct->name, err_inf, + omse, ome, (double) sysErrMax / NB_ITS, + maxout, blockSumErrMax); - if (form == MMX_PERM) { - for(i=0;i<64;i++) - block[idct_mmx_perm[i]] = block1[i]; - } else if(form == MMX_SIMPLE_PERM) { - for(i=0;i<64;i++) - block[idct_simple_mmx_perm[i]] = block1[i]; - } else { - for(i=0; i<64; i++) - block[i]= block1[i]; - } + if (spec_err && !dct->nonspec) + return 1; + + if (!speed) + return 0; + + /* speed test */ + init_block(block, test, is_idct, &prng); + permute(block1, block, dct->format); ti = gettime(); it1 = 0; do { - for(it=0;itfunc(block); } it1 += NB_ITS_SPEED; ti1 = gettime() - ti; } while (ti1 < 1000000); mmx_emms(); - printf("%s %s: %0.1f kdct/s\n", - is_idct ? "IDCT" : "DCT", - name, (double)it1 * 1000.0 / (double)ti1); + printf("%s %s: %0.1f kdct/s\n", is_idct ? "IDCT" : "DCT", dct->name, + (double) it1 * 1000.0 / (double) ti1); + + return 0; } DECLARE_ALIGNED(8, static uint8_t, img_dest)[64]; @@ -391,19 +361,19 @@ if (!init) { init = 1; - for(i=0;i<8;i++) { + for (i = 0; i < 8; i++) { sum = 0; - for(j=0;j<8;j++) { - s = (i==0) ? sqrt(1.0/8.0) : sqrt(1.0/4.0); + for (j = 0; j < 8; j++) { + s = (i == 0) ? sqrt(1.0 / 8.0) : sqrt(1.0 / 4.0); c8[i][j] = s * cos(M_PI * i * (j + 0.5) / 8.0); sum += c8[i][j] * c8[i][j]; } } - for(i=0;i<4;i++) { + for (i = 0; i < 4; i++) { sum = 0; - for(j=0;j<4;j++) { - s = (i==0) ? sqrt(1.0/4.0) : sqrt(1.0/2.0); + for (j = 0; j < 4; j++) { + s = (i == 0) ? sqrt(1.0 / 4.0) : sqrt(1.0 / 2.0); c4[i][j] = s * cos(M_PI * i * (j + 0.5) / 4.0); sum += c4[i][j] * c4[i][j]; } @@ -412,58 +382,59 @@ /* butterfly */ s = 0.5 * sqrt(2.0); - for(i=0;i<4;i++) { - for(j=0;j<8;j++) { - block1[8*(2*i)+j] = (block[8*(2*i)+j] + block[8*(2*i+1)+j]) * s; - block1[8*(2*i+1)+j] = (block[8*(2*i)+j] - block[8*(2*i+1)+j]) * s; + for (i = 0; i < 4; i++) { + for (j = 0; j < 8; j++) { + block1[8 * (2 * i) + j] = + (block[8 * (2 * i) + j] + block[8 * (2 * i + 1) + j]) * s; + block1[8 * (2 * i + 1) + j] = + (block[8 * (2 * i) + j] - block[8 * (2 * i + 1) + j]) * s; } } /* idct8 on lines */ - for(i=0;i<8;i++) { - for(j=0;j<8;j++) { + for (i = 0; i < 8; i++) { + for (j = 0; j < 8; j++) { sum = 0; - for(k=0;k<8;k++) - sum += c8[k][j] * block1[8*i+k]; - block2[8*i+j] = sum; + for (k = 0; k < 8; k++) + sum += c8[k][j] * block1[8 * i + k]; + block2[8 * i + j] = sum; } } /* idct4 */ - for(i=0;i<8;i++) { - for(j=0;j<4;j++) { + for (i = 0; i < 8; i++) { + for (j = 0; j < 4; j++) { /* top */ sum = 0; - for(k=0;k<4;k++) - sum += c4[k][j] * block2[8*(2*k)+i]; - block3[8*(2*j)+i] = sum; + for (k = 0; k < 4; k++) + sum += c4[k][j] * block2[8 * (2 * k) + i]; + block3[8 * (2 * j) + i] = sum; /* bottom */ sum = 0; - for(k=0;k<4;k++) - sum += c4[k][j] * block2[8*(2*k+1)+i]; - block3[8*(2*j+1)+i] = sum; + for (k = 0; k < 4; k++) + sum += c4[k][j] * block2[8 * (2 * k + 1) + i]; + block3[8 * (2 * j + 1) + i] = sum; } } /* clamp and store the result */ - for(i=0;i<8;i++) { - for(j=0;j<8;j++) { - v = block3[8*i+j]; - if (v < 0) - v = 0; - else if (v > 255) - v = 255; - dest[i * linesize + j] = (int)rint(v); + for (i = 0; i < 8; i++) { + for (j = 0; j < 8; j++) { + v = block3[8 * i + j]; + if (v < 0) v = 0; + else if (v > 255) v = 255; + dest[i * linesize + j] = (int) rint(v); } } } static void idct248_error(const char *name, - void (*idct248_put)(uint8_t *dest, int line_size, int16_t *block)) + void (*idct248_put)(uint8_t *dest, int line_size, + int16_t *block), + int speed) { int it, i, it1, ti, ti1, err_max, v; - AVLFG prng; av_lfg_init(&prng, 1); @@ -471,41 +442,39 @@ /* just one test to see if code is correct (precision is less important here) */ err_max = 0; - for(it=0;it err_max) err_max = v; } } - printf("%s %s: err_inf=%d\n", - 1 ? "IDCT248" : "DCT248", - name, err_max); + printf("%s %s: err_inf=%d\n", 1 ? "IDCT248" : "DCT248", name, err_max); + + if (!speed) + return; ti = gettime(); it1 = 0; do { - for(it=0;it test with random sparse matrixes\n" " 2 -> do 3. test from mpeg4 std\n" "-i test IDCT implementations\n" - "-4 test IDCT248 implementations\n"); + "-4 test IDCT248 implementations\n" + "-t speed test\n"); } int main(int argc, char **argv) { int test_idct = 0, test_248_dct = 0; - int c,i; - int test=1; + int c, i; + int test = 1; + int speed = 0; + int err = 0; + cpu_flags = av_get_cpu_flags(); ff_ref_dct_init(); idct_mmx_init(); - for(i=0;i<256;i++) cropTbl[i + MAX_NEG_CROP] = i; - for(i=0;iframe_rate_index > 0) { if (source->frame_rate_index <= 8) - frame_rate = ff_frame_rate_tab[source->frame_rate_index]; + frame_rate = avpriv_frame_rate_tab[source->frame_rate_index]; else frame_rate = dirac_frame_rate[source->frame_rate_index-9]; } @@ -242,7 +242,7 @@ return 0; } -int ff_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb, +int avpriv_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb, dirac_source_params *source) { unsigned version_major; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dirac.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dirac.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dirac.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dirac.h 2012-01-11 00:34:30.000000000 +0000 @@ -51,7 +51,7 @@ uint8_t color_spec_index; ///< index into dirac_color_spec_presets[] } dirac_source_params; -int ff_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb, - dirac_source_params *source); +int avpriv_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb, + dirac_source_params *source); #endif /* AVCODEC_DIRAC_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dirac_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dirac_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dirac_parser.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dirac_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -248,9 +248,8 @@ } AVCodecParser ff_dirac_parser = { - { CODEC_ID_DIRAC }, - sizeof(DiracParseContext), - NULL, - dirac_parse, - dirac_parse_close, + .codec_ids = { CODEC_ID_DIRAC }, + .priv_data_size = sizeof(DiracParseContext), + .parser_parse = dirac_parse, + .parser_close = dirac_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dnxhddata.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dnxhddata.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dnxhddata.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dnxhddata.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,28 @@ #include "avcodec.h" #include "dnxhddata.h" +static const uint8_t dnxhd_1235_luma_weight[] = { + 0, 32, 32, 32, 33, 35, 38, 39, + 32, 33, 32, 33, 36, 36, 39, 42, + 32, 32, 33, 36, 35, 37, 41, 43, + 31, 33, 34, 36, 36, 40, 42, 48, + 32, 34, 36, 37, 39, 42, 46, 51, + 36, 37, 37, 39, 41, 46, 51, 55, + 37, 39, 41, 41, 47, 50, 55, 56, + 41, 42, 41, 44, 50, 53, 60, 60 +}; + +static const uint8_t dnxhd_1235_chroma_weight[] = { + 0, 32, 33, 34, 39, 41, 54, 59, + 33, 34, 35, 38, 43, 49, 58, 84, + 34, 37, 39, 44, 46, 55, 74, 87, + 40, 42, 47, 48, 58, 70, 87, 86, + 43, 50, 56, 63, 72, 94, 91, 82, + 55, 63, 65, 75, 93, 89, 85, 73, + 61, 67, 82, 81, 83, 90, 79, 73, + 74, 84, 75, 78, 90, 85, 73, 73 +}; + static const uint8_t dnxhd_1237_luma_weight[] = { 0, 32, 33, 34, 34, 36, 37, 36, 36, 37, 38, 38, 38, 39, 41, 44, @@ -108,7 +130,7 @@ 48, 49, 51, 51, 52, 52, 54, 54, 49, 49, 52, 53, 54, 54, 53, 53, 55, 59, 63, 62, 60, 60, 60, 60, - }; +}; static const uint8_t dnxhd_1243_luma_weight[] = { 0, 32, 32, 33, 33, 35, 35, 35, @@ -132,6 +154,28 @@ 46, 45, 46, 47, 47, 48, 47, 47, }; +static const uint8_t dnxhd_1250_luma_weight[] = { + 0, 32, 35, 35, 36, 36, 41, 43, + 32, 34, 35, 36, 37, 39, 43, 47, + 33, 34, 36, 38, 38, 42, 42, 50, + 34, 36, 38, 38, 41, 40, 47, 54, + 35, 38, 39, 40, 39, 45, 49, 58, + 38, 39, 40, 39, 46, 47, 54, 60, + 38, 39, 41, 46, 46, 48, 57, 62, + 40, 41, 44, 45, 49, 54, 63, 63 +}; + +static const uint8_t dnxhd_1250_chroma_weight[] = { + 0, 32, 35, 36, 40, 42, 51, 51, + 35, 36, 39, 39, 43, 51, 52, 55, + 36, 41, 41, 43, 51, 53, 54, 56, + 43, 44, 45, 50, 54, 54, 55, 57, + 45, 48, 50, 51, 55, 58, 59, 58, + 49, 52, 49, 57, 58, 62, 58, 60, + 51, 51, 56, 58, 62, 61, 59, 62, + 52, 52, 60, 61, 59, 59, 63, 63 +}; + static const uint8_t dnxhd_1251_luma_weight[] = { 0, 32, 32, 34, 34, 34, 34, 35, 35, 35, 36, 37, 36, 36, 35, 36, @@ -184,35 +228,144 @@ }; static const uint16_t dnxhd_1237_ac_codes[257] = { - 0, 1, 4, 5, 12, 26, 27, 56, 57, 58, 59, 120, 121, 244, 245, 246, 247, 248, 498, 499, 500, 501, 502, 1006, 1007, 1008, 1009, 1010, 1011, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 4064, 4065, 4066, 4067, 4068, 4069, 4070, 4071, 4072, 4073, 8148, 8149, 8150, 8151, 8152, 8153, 8154, 8155, 8156, 8157, 8158, 16318, 16319, 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327, 16328, 16329, 16330, 16331, 16332, 16333, 32668, 32669, 32670, 32671, 32672, 32673, 32674, 32675, 32676, 32677, 32678, 32679, 32680, 32681, 32682, 32683, 32684, 65370, 65371, 65372, 65373, 65374, 65375, 65376, 65377, 65378, 65379, 65380, 65381, 65382, 65383, 65384, 65385, 65386, 65387, 65388, 65389, 65390, 65391, 65392, 65393, 65394, 65395, 65396, 65397, 65398, 65399, 65400, 65401, 65402, 65403, 65404, 65405, 65406, 65407, 65408, 65409, 65410, 65411, 65412, 65413, 65414, 65415, 65416, 65417, 65418, 65419, 65420, 65421, 65422, 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438, 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446, 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454, 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462, 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470, 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478, 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494, 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502, 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510, 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518, 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526, 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534, 65535, + 0, 1, 4, 5, 12, 26, 27, 56, + 57, 58, 59, 120, 121, 244, 245, 246, + 247, 248, 498, 499, 500, 501, 502, 1006, + 1007, 1008, 1009, 1010, 1011, 2024, 2025, 2026, + 2027, 2028, 2029, 2030, 2031, 4064, 4065, 4066, + 4067, 4068, 4069, 4070, 4071, 4072, 4073, 8148, + 8149, 8150, 8151, 8152, 8153, 8154, 8155, 8156, + 8157, 8158, 16318, 16319, 16320, 16321, 16322, 16323, + 16324, 16325, 16326, 16327, 16328, 16329, 16330, 16331, + 16332, 16333, 32668, 32669, 32670, 32671, 32672, 32673, + 32674, 32675, 32676, 32677, 32678, 32679, 32680, 32681, + 32682, 32683, 32684, 65370, 65371, 65372, 65373, 65374, + 65375, 65376, 65377, 65378, 65379, 65380, 65381, 65382, + 65383, 65384, 65385, 65386, 65387, 65388, 65389, 65390, + 65391, 65392, 65393, 65394, 65395, 65396, 65397, 65398, + 65399, 65400, 65401, 65402, 65403, 65404, 65405, 65406, + 65407, 65408, 65409, 65410, 65411, 65412, 65413, 65414, + 65415, 65416, 65417, 65418, 65419, 65420, 65421, 65422, + 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, + 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438, + 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446, + 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454, + 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462, + 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470, + 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478, + 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, + 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494, + 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502, + 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510, + 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518, + 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526, + 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534, + 65535, }; static const uint8_t dnxhd_1237_ac_bits[257] = { - 2, 2, 3, 3, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 2, 2, 3, 3, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, + 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, + 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, }; static const uint8_t dnxhd_1237_ac_level[257] = { - 1, 1, 2, 0, 3, 4, 2, 5, 6, 7, 3, 8, 9, 10, 11, 12, 4, 5, 13, 14, 15, 16, 6, 17, 18, 19, 20, 21, 7, 22, 23, 24, 25, 26, 27, 8, 9, 28, 29, 30, 31, 32, 33, 34, 10, 11, 12, 35, 36, 37, 38, 39, 40, 41, 13, 14, 15, 16, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 17, 18, 19, 20, 21, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 1, 22, 23, 24, 25, 26, 27, 62, 63, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 1, 1, 2, 0, 3, 4, 2, 5, 6, 7, 3, 8, 9, 10, 11, 12, + 4, 5, 13, 14, 15, 16, 6, 17, 18, 19, 20, 21, 7, 22, 23, 24, + 25, 26, 27, 8, 9, 28, 29, 30, 31, 32, 33, 34, 10, 11, 12, 35, + 36, 37, 38, 39, 40, 41, 13, 14, 15, 16, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 17, 18, 19, 20, 21, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 64, 1, 22, 23, 24, 25, 26, 27, 62, 63, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, }; static const uint8_t dnxhd_1237_ac_run_flag[257] = { - 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, }; static const uint8_t dnxhd_1237_ac_index_flag[257] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, }; static const uint16_t dnxhd_1237_run_codes[62] = { - 0, 4, 10, 11, 24, 25, 26, 54, 55, 56, 57, 58, 118, 119, 240, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, + 0, 4, 10, 11, 24, 25, 26, 54, + 55, 56, 57, 58, 118, 119, 240, 482, + 483, 484, 485, 486, 487, 488, 489, 490, + 491, 492, 493, 494, 990, 991, 992, 993, + 994, 995, 996, 997, 998, 999, 1000, 1001, + 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, + 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, + 1018, 1019, 1020, 1021, 1022, 1023, }; static const uint8_t dnxhd_1237_run_bits[62] = { - 1, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 1, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, }; static const uint8_t dnxhd_1237_run[62] = { - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 57, 58, 59, 60, 61, 62, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 53, 57, 58, 59, 60, 61, 62, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, }; static const uint8_t dnxhd_1238_dc_codes[12] = { @@ -224,122 +377,698 @@ }; static const uint16_t dnxhd_1238_ac_codes[257] = { - 0, 1, 4, 10, 11, 24, 25, 26, 54, 55, 56, 57, 116, 117, 118, 119, 240, 241, 242, 243, 244, 245, 492, 493, 494, 495, 496, 497, 498, 499, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 4056, 4057, 4058, 4059, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 8140, 8141, 8142, 8143, 8144, 8145, 8146, 8147, 8148, 8149, 8150, 8151, 8152, 8153, 8154, 8155, 8156, 16314, 16315, 16316, 16317, 16318, 16319, 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327, 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335, 16336, 16337, 16338, 32678, 32679, 32680, 32681, 32682, 32683, 32684, 32685, 32686, 32687, 32688, 32689, 32690, 32691, 32692, 32693, 32694, 32695, 32696, 32697, 32698, 32699, 32700, 32701, 32702, 32703, 32704, 32705, 65412, 65413, 65414, 65415, 65416, 65417, 65418, 65419, 65420, 65421, 65422, 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438, 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446, 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454, 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462, 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470, 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478, 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494, 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502, 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510, 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518, 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526, 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534, 65535, + 0, 1, 4, 10, 11, 24, 25, 26, + 54, 55, 56, 57, 116, 117, 118, 119, + 240, 241, 242, 243, 244, 245, 492, 493, + 494, 495, 496, 497, 498, 499, 1000, 1001, + 1002, 1003, 1004, 1005, 1006, 1007, 1008, 2018, + 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, + 2027, 4056, 4057, 4058, 4059, 4060, 4061, 4062, + 4063, 4064, 4065, 4066, 4067, 4068, 4069, 8140, + 8141, 8142, 8143, 8144, 8145, 8146, 8147, 8148, + 8149, 8150, 8151, 8152, 8153, 8154, 8155, 8156, + 16314, 16315, 16316, 16317, 16318, 16319, 16320, 16321, + 16322, 16323, 16324, 16325, 16326, 16327, 16328, 16329, + 16330, 16331, 16332, 16333, 16334, 16335, 16336, 16337, + 16338, 32678, 32679, 32680, 32681, 32682, 32683, 32684, + 32685, 32686, 32687, 32688, 32689, 32690, 32691, 32692, + 32693, 32694, 32695, 32696, 32697, 32698, 32699, 32700, + 32701, 32702, 32703, 32704, 32705, 65412, 65413, 65414, + 65415, 65416, 65417, 65418, 65419, 65420, 65421, 65422, + 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, + 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438, + 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446, + 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454, + 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462, + 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470, + 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478, + 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, + 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494, + 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502, + 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510, + 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518, + 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526, + 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534, + 65535, }; static const uint8_t dnxhd_1238_ac_bits[257] = { - 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, }; static const uint8_t dnxhd_1238_ac_level[257] = { - 1, 1, 2, 3, 0, 4, 5, 2, 6, 7, 8, 3, 9, 10, 11, 4, 12, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 22, 6, 7, 23, 24, 25, 26, 27, 28, 29, 8, 9, 30, 31, 32, 33, 34, 35, 36, 37, 10, 11, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 12, 13, 14, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 15, 16, 17, 18, 62, 63, 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 40, 25, 26, 27, 28, 29, 30, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 1, 1, 2, 3, 0, 4, 5, 2, 6, 7, 8, 3, 9, 10, 11, 4, + 12, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 22, 6, 7, 23, 24, + 25, 26, 27, 28, 29, 8, 9, 30, 31, 32, 33, 34, 35, 36, 37, 10, + 11, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 12, 13, 14, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 15, 16, 17, 18, + 62, 63, 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 19, 20, 21, 22, 23, 24, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 40, 25, + 26, 27, 28, 29, 30, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, }; /* 0 is EOB */ static const uint8_t dnxhd_1238_ac_run_flag[257] = { - 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, }; static const uint8_t dnxhd_1238_ac_index_flag[257] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -}; - -static const uint16_t dnxhd_1238_run_codes[62] = { - 0, 4, 10, 11, 24, 25, 26, 27, 56, 57, 58, 59, 120, 242, 486, 487, 488, 489, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, -}; - -static const uint8_t dnxhd_1238_run_bits[62] = { - 1, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, +}; + +static const uint16_t dnxhd_1235_1238_1241_run_codes[62] = { + 0, 4, 10, 11, 24, 25, 26, 27, + 56, 57, 58, 59, 120, 242, 486, 487, + 488, 489, 980, 981, 982, 983, 984, 985, + 986, 987, 988, 989, 990, 991, 992, 993, + 994, 995, 996, 997, 998, 999, 1000, 1001, + 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, + 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, + 1018, 1019, 1020, 1021, 1022, 1023, +}; + +static const uint8_t dnxhd_1235_1238_1241_run_bits[62] = { + 1, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 8, 9, 9, + 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, }; static const uint8_t dnxhd_1238_run[62] = { - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 21, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 20, 21, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, }; -static const uint8_t dnxhd_1241_dc_codes[14] = { +static const uint8_t dnxhd_1235_1241_dc_codes[14] = { 10, 62, 11, 12, 13, 0, 1, 2, 3, 4, 14, 30, 126, 127, }; -static const uint8_t dnxhd_1241_dc_bits[14] = { +static const uint8_t dnxhd_1235_1241_dc_bits[14] = { 4, 6, 4, 4, 4, 3, 3, 3, 3, 3, 4, 5, 7, 7, }; -static const uint16_t dnxhd_1241_ac_codes[257] = { - 0, 1, 4, 10, 11, 24, 25, 26, 54, 55, 56, 57, 116, 117, 118, 119, 240, 241, 242, 243, 244, 245, 492, 493, 494, 495, 496, 497, 498, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 4054, 4055, 4056, 4057, 4058, 4059, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 8140, 8141, 8142, 8143, 8144, 8145, 8146, 8147, 8148, 8149, 8150, 8151, 8152, 8153, 8154, 8155, 8156, 8157, 16316, 16317, 16318, 16319, 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327, 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335, 16336, 16337, 32676, 32677, 32678, 32679, 32680, 32681, 32682, 32683, 32684, 32685, 32686, 32687, 32688, 32689, 32690, 32691, 32692, 32693, 32694, 32695, 32696, 32697, 32698, 32699, 32700, 32701, 32702, 32703, 32704, 32705, 32706, 32707, 32708, 65418, 65419, 65420, 65421, 65422, 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438, 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446, 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454, 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462, 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470, 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478, 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494, 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502, 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510, 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518, 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526, 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534, 65535, -}; - -static const uint8_t dnxhd_1241_ac_bits[257] = { - 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, -}; - -static const uint8_t dnxhd_1241_ac_level[257] = { - 1, 1, 2, 3, 0, 4, 5, 2, 6, 7, 8, 3, 9, 10, 11, 4, 12, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 6, 7, 22, 23, 24, 25, 26, 27, 28, 29, 8, 9, 30, 31, 32, 33, 34, 35, 36, 37, 38, 10, 11, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 12, 13, 14, 15, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1, 16, 17, 18, 19, 64, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 25, 26, 27, 28, 29, 30, 31, 32, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -}; - -static const uint8_t dnxhd_1241_ac_run_flag[257] = { - 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -}; -static const uint8_t dnxhd_1241_ac_index_flag[257] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -}; - -static const uint8_t dnxhd_1241_run[62] = { - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 17, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, +static const uint16_t dnxhd_1235_1241_ac_codes[257] = { + 0, 1, 4, 10, 11, 24, 25, 26, + 54, 55, 56, 57, 116, 117, 118, 119, + 240, 241, 242, 243, 244, 245, 492, 493, + 494, 495, 496, 497, 498, 998, 999, 1000, + 1001, 1002, 1003, 1004, 1005, 1006, 1007, 2016, + 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, + 2025, 2026, 4054, 4055, 4056, 4057, 4058, 4059, + 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, + 4068, 4069, 8140, 8141, 8142, 8143, 8144, 8145, + 8146, 8147, 8148, 8149, 8150, 8151, 8152, 8153, + 8154, 8155, 8156, 8157, 16316, 16317, 16318, 16319, + 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327, + 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335, + 16336, 16337, 32676, 32677, 32678, 32679, 32680, 32681, + 32682, 32683, 32684, 32685, 32686, 32687, 32688, 32689, + 32690, 32691, 32692, 32693, 32694, 32695, 32696, 32697, + 32698, 32699, 32700, 32701, 32702, 32703, 32704, 32705, + 32706, 32707, 32708, 65418, 65419, 65420, 65421, 65422, + 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, + 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438, + 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446, + 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454, + 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462, + 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470, + 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478, + 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, + 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494, + 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502, + 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510, + 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518, + 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526, + 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534, + 65535, +}; + +static const uint8_t dnxhd_1235_1241_ac_bits[257] = { + 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, +}; + +static const uint8_t dnxhd_1235_1241_ac_level[257] = { + 1, 1, 2, 3, 0, 4, 5, 2, 6, 7, 8, 3, 9, 10, 11, 4, + 12, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 6, 7, 22, 23, 24, + 25, 26, 27, 28, 29, 8, 9, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 10, 11, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 12, 13, + 14, 15, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1, + 16, 17, 18, 19, 64, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 25, 26, 27, 28, 29, 30, 31, 32, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, +}; + +static const uint8_t dnxhd_1235_1241_ac_run_flag[257] = { + 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, +}; + +static const uint8_t dnxhd_1235_1241_ac_index_flag[257] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, +}; + +static const uint8_t dnxhd_1235_1241_run[62] = { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 18, 20, 17, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, +}; + +static const uint8_t dnxhd_1250_dc_codes[14] = { + 10, 62, 11, 12, 13, 0, 1, 2, 3, 4, 14, 30, 126, 127 +}; +static const uint8_t dnxhd_1250_dc_bits[14] = { + 4, 6, 4, 4, 4, 3, 3, 3, 3, 3, 4, 5, 7, 7 +}; +static const uint16_t dnxhd_1250_ac_codes[257] = { + 0, 1, 4, 10, 11, 24, 25, 26, + 54, 55, 56, 57, 116, 117, 118, 119, + 240, 241, 242, 243, 244, 245, 492, 493, + 494, 495, 496, 497, 498, 998, 999, 1000, + 1001, 1002, 1003, 1004, 1005, 1006, 2014, 2015, + 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, + 2024, 2025, 4052, 4053, 4054, 4055, 4056, 4057, + 4058, 4059, 4060, 4061, 4062, 4063, 4064, 4065, + 4066, 4067, 8136, 8137, 8138, 8139, 8140, 8141, + 8142, 8143, 8144, 8145, 8146, 8147, 8148, 8149, + 8150, 8151, 8152, 8153, 8154, 8155, 8156, 16314, + 16315, 16316, 16317, 16318, 16319, 16320, 16321, 16322, + 16323, 16324, 16325, 16326, 16327, 16328, 16329, 16330, + 16331, 16332, 16333, 16334, 16335, 16336, 16337, 16338, + 32678, 32679, 32680, 32681, 32682, 32683, 32684, 32685, + 32686, 32687, 32688, 32689, 32690, 32691, 32692, 32693, + 32694, 32695, 32696, 32697, 32698, 32699, 32700, 32701, + 32702, 32703, 32704, 32705, 32706, 32707, 32708, 32709, + 32710, 32711, 32712, 65426, 65427, 65428, 65429, 65430, + 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438, + 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446, + 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454, + 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462, + 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470, + 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478, + 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, + 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494, + 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502, + 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510, + 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518, + 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526, + 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534, + 65535 +}; +static const uint8_t dnxhd_1250_ac_bits[257] = { + 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16 +}; +static const uint8_t dnxhd_1250_ac_level[257] = { + 1, 1, 2, 3, 0, 4, 5, 2, 6, 7, 8, 3, 9, 10, 11, 4, + 12, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 22, 6, 23, 24, 25, + 26, 27, 28, 29, 7, 8, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 9, 10, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 11, + 12, 13, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1, 2, + 3, 4, 5, 14, 15, 16, 17, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 18, 19, 20, 21, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 22, 23, 24, + 25, 26, 27, 54, 57, 58, 59, 60, 61, 62, 63, 64, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64 +}; +static const uint8_t dnxhd_1250_ac_run_flag[257] = { + 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1 +}; +static const uint8_t dnxhd_1250_ac_index_flag[257] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1 +}; +static const uint16_t dnxhd_1250_run_codes[62] = { + 0, 4, 5, 12, 26, 27, 28, 58, + 118, 119, 120, 242, 486, 487, 976, 977, + 978, 979, 980, 981, 982, 983, 984, 985, + 986, 987, 988, 989, 990, 991, 992, 993, + 994, 995, 996, 997, 998, 999, 1000, 1001, + 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, + 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, + 1018, 1019, 1020, 1021, 1022, 1023 +}; +static const uint8_t dnxhd_1250_run_bits[62] = { + 1, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 +}; +static const uint8_t dnxhd_1250_run[62] = { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62 }; static const uint8_t dnxhd_1251_dc_codes[12] = { 0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63, }; + static const uint8_t dnxhd_1251_dc_bits[12] = { 3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6, }; + static const uint16_t dnxhd_1251_ac_codes[257] = { - 0, 1, 4, 10, 11, 24, 25, 26, 54, 55, 56, 57, 116, 117, 118, 119, 240, 241, 242, 243, 244, 245, 492, 493, 494, 495, 496, 497, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 4052, 4053, 4054, 4055, 4056, 4057, 4058, 4059, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 8134, 8135, 8136, 8137, 8138, 8139, 8140, 8141, 8142, 8143, 8144, 8145, 8146, 8147, 8148, 8149, 8150, 8151, 8152, 8153, 8154, 8155, 8156, 16314, 16315, 16316, 16317, 16318, 16319, 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327, 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335, 16336, 16337, 16338, 16339, 32680, 32681, 32682, 32683, 32684, 32685, 32686, 32687, 32688, 32689, 32690, 32691, 32692, 32693, 32694, 32695, 32696, 32697, 32698, 32699, 32700, 32701, 32702, 32703, 32704, 32705, 32706, 32707, 32708, 32709, 32710, 32711, 32712, 32713, 32714, 65430, 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438, 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446, 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454, 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462, 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470, 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478, 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494, 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502, 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510, 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518, 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526, 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534, 65535, + 0, 1, 4, 10, 11, 24, 25, 26, + 54, 55, 56, 57, 116, 117, 118, 119, + 240, 241, 242, 243, 244, 245, 492, 493, + 494, 495, 496, 497, 996, 997, 998, 999, + 1000, 1001, 1002, 1003, 1004, 1005, 2012, 2013, + 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, + 2022, 2023, 2024, 2025, 4052, 4053, 4054, 4055, + 4056, 4057, 4058, 4059, 4060, 4061, 4062, 4063, + 4064, 4065, 4066, 8134, 8135, 8136, 8137, 8138, + 8139, 8140, 8141, 8142, 8143, 8144, 8145, 8146, + 8147, 8148, 8149, 8150, 8151, 8152, 8153, 8154, + 8155, 8156, 16314, 16315, 16316, 16317, 16318, 16319, + 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327, + 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335, + 16336, 16337, 16338, 16339, 32680, 32681, 32682, 32683, + 32684, 32685, 32686, 32687, 32688, 32689, 32690, 32691, + 32692, 32693, 32694, 32695, 32696, 32697, 32698, 32699, + 32700, 32701, 32702, 32703, 32704, 32705, 32706, 32707, + 32708, 32709, 32710, 32711, 32712, 32713, 32714, 65430, + 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438, + 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446, + 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454, + 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462, + 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470, + 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478, + 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, + 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494, + 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502, + 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510, + 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518, + 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526, + 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534, + 65535, }; + static const uint8_t dnxhd_1251_ac_bits[257] = { - 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, }; + static const uint8_t dnxhd_1251_ac_level[257] = { - 1, 1, 2, 3, 0, 4, 5, 2, 6, 7, 8, 3, 9, 10, 11, 4, 12, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 6, 22, 23, 24, 25, 26, 27, 28, 29, 7, 8, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 9, 10, 11, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 12, 13, 14, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1, 2, 3, 4, 5, 6, 7, 8, 15, 16, 17, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 18, 19, 20, 21, 22, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 23, 24, 25, 26, 27, 28, 59, 60, 61, 62, 63, 64, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 1, 1, 2, 3, 0, 4, 5, 2, 6, 7, 8, 3, 9, 10, 11, 4, + 12, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 6, 22, 23, 24, 25, + 26, 27, 28, 29, 7, 8, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 9, 10, 11, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 12, 13, 14, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1, + 2, 3, 4, 5, 6, 7, 8, 15, 16, 17, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 18, + 19, 20, 21, 22, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 23, 24, 25, 26, 27, 28, 59, 60, 61, 62, 63, 64, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, }; + static const uint8_t dnxhd_1251_ac_run_flag[257] = { - 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, }; + static const uint8_t dnxhd_1251_ac_index_flag[257] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, }; + static const uint16_t dnxhd_1251_run_codes[62] = { - 0, 4, 5, 12, 26, 27, 28, 58, 118, 119, 120, 242, 486, 487, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, + 0, 4, 5, 12, 26, 27, 28, 58, + 118, 119, 120, 242, 486, 487, 976, 977, + 978, 979, 980, 981, 982, 983, 984, 985, + 986, 987, 988, 989, 990, 991, 992, 993, + 994, 995, 996, 997, 998, 999, 1000, 1001, + 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, + 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, + 1018, 1019, 1020, 1021, 1022, 1023, }; + static const uint8_t dnxhd_1251_run_bits[62] = { - 1, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 1, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, }; + static const uint8_t dnxhd_1251_run[62] = { - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, }; static const uint8_t dnxhd_1252_dc_codes[12] = { 0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63, }; + static const uint8_t dnxhd_1252_dc_bits[12] = { 3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6, }; + static const uint16_t dnxhd_1252_ac_codes[257] = { - 0, 1, 4, 10, 11, 12, 26, 27, 56, 57, 58, 118, 119, 120, 242, 243, 244, 245, 246, 247, 496, 497, 498, 499, 500, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 4070, 4071, 8144, 8145, 8146, 8147, 8148, 8149, 8150, 8151, 8152, 8153, 8154, 8155, 8156, 8157, 8158, 16318, 16319, 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327, 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335, 32672, 32673, 32674, 32675, 32676, 32677, 32678, 32679, 32680, 32681, 32682, 32683, 32684, 32685, 32686, 32687, 32688, 32689, 32690, 32691, 32692, 32693, 32694, 65390, 65391, 65392, 65393, 65394, 65395, 65396, 65397, 65398, 65399, 65400, 65401, 65402, 65403, 65404, 65405, 65406, 65407, 65408, 65409, 65410, 65411, 65412, 65413, 65414, 65415, 65416, 65417, 65418, 65419, 65420, 65421, 65422, 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438, 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446, 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454, 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462, 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470, 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478, 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494, 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502, 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510, 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518, 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526, 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534, 65535, + 0, 1, 4, 10, 11, 12, 26, 27, + 56, 57, 58, 118, 119, 120, 242, 243, + 244, 245, 246, 247, 496, 497, 498, 499, + 500, 1002, 1003, 1004, 1005, 1006, 1007, 1008, + 1009, 2020, 2021, 2022, 2023, 2024, 2025, 2026, + 2027, 2028, 2029, 4060, 4061, 4062, 4063, 4064, + 4065, 4066, 4067, 4068, 4069, 4070, 4071, 8144, + 8145, 8146, 8147, 8148, 8149, 8150, 8151, 8152, + 8153, 8154, 8155, 8156, 8157, 8158, 16318, 16319, + 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327, + 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335, + 32672, 32673, 32674, 32675, 32676, 32677, 32678, 32679, + 32680, 32681, 32682, 32683, 32684, 32685, 32686, 32687, + 32688, 32689, 32690, 32691, 32692, 32693, 32694, 65390, + 65391, 65392, 65393, 65394, 65395, 65396, 65397, 65398, + 65399, 65400, 65401, 65402, 65403, 65404, 65405, 65406, + 65407, 65408, 65409, 65410, 65411, 65412, 65413, 65414, + 65415, 65416, 65417, 65418, 65419, 65420, 65421, 65422, + 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, + 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438, + 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446, + 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454, + 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462, + 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470, + 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478, + 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, + 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494, + 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502, + 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510, + 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518, + 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526, + 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534, + 65535, }; + static const uint8_t dnxhd_1252_ac_bits[257] = { - 2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, + 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, }; + static const uint8_t dnxhd_1252_ac_level[257] = { - 1, 1, 2, 3, 2, 0, 4, 5, 6, 7, 3, 8, 9, 10, 11, 12, 13, 14, 4, 5, 15, 16, 17, 18, 6, 19, 20, 21, 22, 23, 24, 7, 8, 25, 26, 27, 28, 29, 30, 31, 32, 9, 10, 33, 34, 35, 36, 37, 38, 39, 40, 41, 11, 12, 13, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 14, 15, 16, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1, 2, 3, 17, 18, 19, 20, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 22, 23, 24, 25, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 1, 1, 2, 3, 2, 0, 4, 5, 6, 7, 3, 8, 9, 10, 11, 12, + 13, 14, 4, 5, 15, 16, 17, 18, 6, 19, 20, 21, 22, 23, 24, 7, + 8, 25, 26, 27, 28, 29, 30, 31, 32, 9, 10, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 11, 12, 13, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 14, 15, 16, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 1, 2, 3, 17, 18, 19, 20, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 22, 23, 24, 25, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, }; + static const uint8_t dnxhd_1252_ac_run_flag[257] = { - 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, }; + static const uint8_t dnxhd_1252_ac_index_flag[257] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, }; const CIDEntry ff_dnxhd_cid_table[] = { + { 1235, 1920, 1080, 0, 917504, 917504, 6, 10, + dnxhd_1235_luma_weight, dnxhd_1235_chroma_weight, + dnxhd_1235_1241_dc_codes, dnxhd_1235_1241_dc_bits, + dnxhd_1235_1241_ac_codes, dnxhd_1235_1241_ac_bits, dnxhd_1235_1241_ac_level, + dnxhd_1235_1241_ac_run_flag, dnxhd_1235_1241_ac_index_flag, + dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run, + { 175, 185, 365, 440 } }, { 1237, 1920, 1080, 0, 606208, 606208, 4, 8, dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, @@ -352,14 +1081,14 @@ dnxhd_1238_dc_codes, dnxhd_1238_dc_bits, dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_level, dnxhd_1238_ac_run_flag, dnxhd_1238_ac_index_flag, - dnxhd_1238_run_codes, dnxhd_1238_run_bits, dnxhd_1238_run, + dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1238_run, { 175, 185, 220, 365, 440 } }, { 1241, 1920, 1080, 1, 917504, 458752, 6, 10, dnxhd_1241_luma_weight, dnxhd_1241_chroma_weight, - dnxhd_1241_dc_codes, dnxhd_1241_dc_bits, - dnxhd_1241_ac_codes, dnxhd_1241_ac_bits, dnxhd_1241_ac_level, - dnxhd_1241_ac_run_flag, dnxhd_1241_ac_index_flag, - dnxhd_1238_run_codes, dnxhd_1238_run_bits, dnxhd_1241_run, + dnxhd_1235_1241_dc_codes, dnxhd_1235_1241_dc_bits, + dnxhd_1235_1241_ac_codes, dnxhd_1235_1241_ac_bits, dnxhd_1235_1241_ac_level, + dnxhd_1235_1241_ac_run_flag, dnxhd_1235_1241_ac_index_flag, + dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run, { 185, 220 } }, { 1242, 1920, 1080, 1, 606208, 303104, 4, 8, dnxhd_1242_luma_weight, dnxhd_1242_chroma_weight, @@ -373,8 +1102,15 @@ dnxhd_1238_dc_codes, dnxhd_1238_dc_bits, dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_level, dnxhd_1238_ac_run_flag, dnxhd_1238_ac_index_flag, - dnxhd_1238_run_codes, dnxhd_1238_run_bits, dnxhd_1238_run, + dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1238_run, { 185, 220 } }, + { 1250, 1280, 720, 0, 458752, 458752, 6, 10, + dnxhd_1250_luma_weight, dnxhd_1250_chroma_weight, + dnxhd_1250_dc_codes, dnxhd_1250_dc_bits, + dnxhd_1250_ac_codes, dnxhd_1250_ac_bits, dnxhd_1250_ac_level, + dnxhd_1250_ac_run_flag, dnxhd_1250_ac_index_flag, + dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run, + { 90, 180, 220 } }, { 1251, 1280, 720, 0, 458752, 458752, 4, 8, dnxhd_1251_luma_weight, dnxhd_1251_chroma_weight, dnxhd_1251_dc_codes, dnxhd_1251_dc_bits, @@ -407,7 +1143,7 @@ return -1; } -int ff_dnxhd_find_cid(AVCodecContext *avctx) +int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth) { int i, j; int mbs = avctx->bit_rate/1000000; @@ -417,7 +1153,7 @@ const CIDEntry *cid = &ff_dnxhd_cid_table[i]; if (cid->width == avctx->width && cid->height == avctx->height && cid->interlaced == !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT) && - cid->bit_depth == 8) { // until 10 bit is supported + cid->bit_depth == bit_depth) { for (j = 0; j < sizeof(cid->bit_rates); j++) { if (cid->bit_rates[j] == mbs) return cid->cid; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dnxhddata.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dnxhddata.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dnxhddata.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dnxhddata.h 2012-01-11 00:34:30.000000000 +0000 @@ -46,6 +46,6 @@ extern const CIDEntry ff_dnxhd_cid_table[]; int ff_dnxhd_get_cid_table(int cid); -int ff_dnxhd_find_cid(AVCodecContext *avctx); +int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth); #endif /* AVCODEC_DNXHDDATA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dnxhddec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dnxhddec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dnxhddec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dnxhddec.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,9 @@ /* * VC3/DNxHD decoder. * Copyright (c) 2007 SmartJog S.A., Baptiste Coudurier + * Copyright (c) 2011 MirriAd Ltd + * + * 10 bit support added by MirriAd Ltd, Joseph Artsimovich * * This file is part of Libav. * @@ -28,7 +31,7 @@ #include "dnxhddata.h" #include "dsputil.h" -typedef struct { +typedef struct DNXHDContext { AVCodecContext *avctx; AVFrame picture; GetBitContext gb; @@ -43,17 +46,22 @@ DECLARE_ALIGNED(16, DCTELEM, blocks)[8][64]; ScanTable scantable; const CIDEntry *cid_table; + int bit_depth; // 8, 10 or 0 if not initialized at all. + void (*decode_dct_block)(struct DNXHDContext *ctx, DCTELEM *block, + int n, int qscale); } DNXHDContext; #define DNXHD_VLC_BITS 9 #define DNXHD_DC_VLC_BITS 7 +static void dnxhd_decode_dct_block_8(DNXHDContext *ctx, DCTELEM *block, int n, int qscale); +static void dnxhd_decode_dct_block_10(DNXHDContext *ctx, DCTELEM *block, int n, int qscale); + static av_cold int dnxhd_decode_init(AVCodecContext *avctx) { DNXHDContext *ctx = avctx->priv_data; ctx->avctx = avctx; - dsputil_init(&ctx->dsp, avctx); avctx->coded_frame = &ctx->picture; ctx->picture.type = AV_PICTURE_TYPE_I; ctx->picture.key_frame = 1; @@ -62,7 +70,7 @@ static int dnxhd_init_vlc(DNXHDContext *ctx, int cid) { - if (!ctx->cid_table) { + if (cid != ctx->cid) { int index; if ((index = ff_dnxhd_get_cid_table(cid)) < 0) { @@ -70,10 +78,15 @@ return -1; } ctx->cid_table = &ff_dnxhd_cid_table[index]; + + free_vlc(&ctx->ac_vlc); + free_vlc(&ctx->dc_vlc); + free_vlc(&ctx->run_vlc); + init_vlc(&ctx->ac_vlc, DNXHD_VLC_BITS, 257, ctx->cid_table->ac_bits, 1, 1, ctx->cid_table->ac_codes, 2, 2, 0); - init_vlc(&ctx->dc_vlc, DNXHD_DC_VLC_BITS, ctx->cid_table->bit_depth+4, + init_vlc(&ctx->dc_vlc, DNXHD_DC_VLC_BITS, ctx->bit_depth + 4, ctx->cid_table->dc_bits, 1, 1, ctx->cid_table->dc_codes, 1, 1, 0); init_vlc(&ctx->run_vlc, DNXHD_VLC_BITS, 62, @@ -81,6 +94,7 @@ ctx->cid_table->run_codes, 2, 2, 0); ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, ff_zigzag_direct); + ctx->cid = cid; } return 0; } @@ -88,7 +102,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_size, int first_field) { static const uint8_t header_prefix[] = { 0x00, 0x00, 0x02, 0x80, 0x01 }; - int i; + int i, cid; if (buf_size < 0x280) return -1; @@ -107,17 +121,30 @@ ctx->height = AV_RB16(buf + 0x18); ctx->width = AV_RB16(buf + 0x1a); - av_dlog(ctx->avctx, "width %d, heigth %d\n", ctx->width, ctx->height); + av_dlog(ctx->avctx, "width %d, height %d\n", ctx->width, ctx->height); if (buf[0x21] & 0x40) { - av_log(ctx->avctx, AV_LOG_ERROR, "10 bit per component\n"); - return -1; + ctx->avctx->pix_fmt = PIX_FMT_YUV422P10; + ctx->avctx->bits_per_raw_sample = 10; + if (ctx->bit_depth != 10) { + dsputil_init(&ctx->dsp, ctx->avctx); + ctx->bit_depth = 10; + ctx->decode_dct_block = dnxhd_decode_dct_block_10; + } + } else { + ctx->avctx->pix_fmt = PIX_FMT_YUV422P; + ctx->avctx->bits_per_raw_sample = 8; + if (ctx->bit_depth != 8) { + dsputil_init(&ctx->dsp, ctx->avctx); + ctx->bit_depth = 8; + ctx->decode_dct_block = dnxhd_decode_dct_block_8; + } } - ctx->cid = AV_RB32(buf + 0x28); - av_dlog(ctx->avctx, "compression id %d\n", ctx->cid); + cid = AV_RB32(buf + 0x28); + av_dlog(ctx->avctx, "compression id %d\n", cid); - if (dnxhd_init_vlc(ctx, ctx->cid) < 0) + if (dnxhd_init_vlc(ctx, cid) < 0) return -1; if (buf_size < ctx->cid_table->coding_unit_size) { @@ -151,79 +178,103 @@ return 0; } -static int dnxhd_decode_dc(DNXHDContext *ctx) -{ - int len; - - len = get_vlc2(&ctx->gb, ctx->dc_vlc.table, DNXHD_DC_VLC_BITS, 1); - return len ? get_xbits(&ctx->gb, len) : 0; -} - -static void dnxhd_decode_dct_block(DNXHDContext *ctx, DCTELEM *block, int n, int qscale) +static av_always_inline void dnxhd_decode_dct_block(DNXHDContext *ctx, + DCTELEM *block, int n, + int qscale, + int index_bits, + int level_bias, + int level_shift) { - int i, j, index, index2; + int i, j, index1, index2, len; int level, component, sign; - const uint8_t *weigth_matrix; + const uint8_t *weight_matrix; + OPEN_READER(bs, &ctx->gb); if (n&2) { component = 1 + (n&1); - weigth_matrix = ctx->cid_table->chroma_weight; + weight_matrix = ctx->cid_table->chroma_weight; } else { component = 0; - weigth_matrix = ctx->cid_table->luma_weight; + weight_matrix = ctx->cid_table->luma_weight; } - ctx->last_dc[component] += dnxhd_decode_dc(ctx); + UPDATE_CACHE(bs, &ctx->gb); + GET_VLC(len, bs, &ctx->gb, ctx->dc_vlc.table, DNXHD_DC_VLC_BITS, 1); + if (len) { + level = GET_CACHE(bs, &ctx->gb); + LAST_SKIP_BITS(bs, &ctx->gb, len); + sign = ~level >> 31; + level = (NEG_USR32(sign ^ level, len) ^ sign) - sign; + ctx->last_dc[component] += level; + } block[0] = ctx->last_dc[component]; //av_log(ctx->avctx, AV_LOG_DEBUG, "dc %d\n", block[0]); + for (i = 1; ; i++) { - index = get_vlc2(&ctx->gb, ctx->ac_vlc.table, DNXHD_VLC_BITS, 2); - //av_log(ctx->avctx, AV_LOG_DEBUG, "index %d\n", index); - level = ctx->cid_table->ac_level[index]; + UPDATE_CACHE(bs, &ctx->gb); + GET_VLC(index1, bs, &ctx->gb, ctx->ac_vlc.table, + DNXHD_VLC_BITS, 2); + //av_log(ctx->avctx, AV_LOG_DEBUG, "index %d\n", index1); + level = ctx->cid_table->ac_level[index1]; if (!level) { /* EOB */ //av_log(ctx->avctx, AV_LOG_DEBUG, "EOB\n"); - return; + break; } - sign = get_sbits(&ctx->gb, 1); - if (ctx->cid_table->ac_index_flag[index]) { - level += get_bits(&ctx->gb, ctx->cid_table->index_bits)<<6; + sign = SHOW_SBITS(bs, &ctx->gb, 1); + SKIP_BITS(bs, &ctx->gb, 1); + + if (ctx->cid_table->ac_index_flag[index1]) { + level += SHOW_UBITS(bs, &ctx->gb, index_bits) << 6; + SKIP_BITS(bs, &ctx->gb, index_bits); } - if (ctx->cid_table->ac_run_flag[index]) { - index2 = get_vlc2(&ctx->gb, ctx->run_vlc.table, DNXHD_VLC_BITS, 2); + if (ctx->cid_table->ac_run_flag[index1]) { + UPDATE_CACHE(bs, &ctx->gb); + GET_VLC(index2, bs, &ctx->gb, ctx->run_vlc.table, + DNXHD_VLC_BITS, 2); i += ctx->cid_table->run[index2]; } if (i > 63) { av_log(ctx->avctx, AV_LOG_ERROR, "ac tex damaged %d, %d\n", n, i); - return; + break; } j = ctx->scantable.permutated[i]; //av_log(ctx->avctx, AV_LOG_DEBUG, "j %d\n", j); - //av_log(ctx->avctx, AV_LOG_DEBUG, "level %d, weigth %d\n", level, weigth_matrix[i]); - level = (2*level+1) * qscale * weigth_matrix[i]; - if (ctx->cid_table->bit_depth == 10) { - if (weigth_matrix[i] != 8) - level += 8; - level >>= 4; - } else { - if (weigth_matrix[i] != 32) - level += 32; - level >>= 6; - } + //av_log(ctx->avctx, AV_LOG_DEBUG, "level %d, weight %d\n", level, weight_matrix[i]); + level = (2*level+1) * qscale * weight_matrix[i]; + if (level_bias < 32 || weight_matrix[i] != level_bias) + level += level_bias; + level >>= level_shift; + //av_log(NULL, AV_LOG_DEBUG, "i %d, j %d, end level %d\n", i, j, level); block[j] = (level^sign) - sign; } + + CLOSE_READER(bs, &ctx->gb); +} + +static void dnxhd_decode_dct_block_8(DNXHDContext *ctx, DCTELEM *block, + int n, int qscale) +{ + dnxhd_decode_dct_block(ctx, block, n, qscale, 4, 32, 6); +} + +static void dnxhd_decode_dct_block_10(DNXHDContext *ctx, DCTELEM *block, + int n, int qscale) +{ + dnxhd_decode_dct_block(ctx, block, n, qscale, 6, 8, 4); } static int dnxhd_decode_macroblock(DNXHDContext *ctx, int x, int y) { + int shift1 = ctx->bit_depth == 10; int dct_linesize_luma = ctx->picture.linesize[0]; int dct_linesize_chroma = ctx->picture.linesize[1]; uint8_t *dest_y, *dest_u, *dest_v; - int dct_offset; + int dct_y_offset, dct_x_offset; int qscale, i; qscale = get_bits(&ctx->gb, 11); @@ -232,7 +283,7 @@ for (i = 0; i < 8; i++) { ctx->dsp.clear_block(ctx->blocks[i]); - dnxhd_decode_dct_block(ctx, ctx->blocks[i], i, qscale); + ctx->decode_dct_block(ctx, ctx->blocks[i], i, qscale); } if (ctx->picture.interlaced_frame) { @@ -240,9 +291,9 @@ dct_linesize_chroma <<= 1; } - dest_y = ctx->picture.data[0] + ((y * dct_linesize_luma) << 4) + (x << 4); - dest_u = ctx->picture.data[1] + ((y * dct_linesize_chroma) << 4) + (x << 3); - dest_v = ctx->picture.data[2] + ((y * dct_linesize_chroma) << 4) + (x << 3); + dest_y = ctx->picture.data[0] + ((y * dct_linesize_luma) << 4) + (x << (4 + shift1)); + dest_u = ctx->picture.data[1] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1)); + dest_v = ctx->picture.data[2] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1)); if (ctx->cur_field) { dest_y += ctx->picture.linesize[0]; @@ -250,18 +301,19 @@ dest_v += ctx->picture.linesize[2]; } - dct_offset = dct_linesize_luma << 3; - ctx->dsp.idct_put(dest_y, dct_linesize_luma, ctx->blocks[0]); - ctx->dsp.idct_put(dest_y + 8, dct_linesize_luma, ctx->blocks[1]); - ctx->dsp.idct_put(dest_y + dct_offset, dct_linesize_luma, ctx->blocks[4]); - ctx->dsp.idct_put(dest_y + dct_offset + 8, dct_linesize_luma, ctx->blocks[5]); + dct_y_offset = dct_linesize_luma << 3; + dct_x_offset = 8 << shift1; + ctx->dsp.idct_put(dest_y, dct_linesize_luma, ctx->blocks[0]); + ctx->dsp.idct_put(dest_y + dct_x_offset, dct_linesize_luma, ctx->blocks[1]); + ctx->dsp.idct_put(dest_y + dct_y_offset, dct_linesize_luma, ctx->blocks[4]); + ctx->dsp.idct_put(dest_y + dct_y_offset + dct_x_offset, dct_linesize_luma, ctx->blocks[5]); if (!(ctx->avctx->flags & CODEC_FLAG_GRAY)) { - dct_offset = dct_linesize_chroma << 3; - ctx->dsp.idct_put(dest_u, dct_linesize_chroma, ctx->blocks[2]); - ctx->dsp.idct_put(dest_v, dct_linesize_chroma, ctx->blocks[3]); - ctx->dsp.idct_put(dest_u + dct_offset, dct_linesize_chroma, ctx->blocks[6]); - ctx->dsp.idct_put(dest_v + dct_offset, dct_linesize_chroma, ctx->blocks[7]); + dct_y_offset = dct_linesize_chroma << 3; + ctx->dsp.idct_put(dest_u, dct_linesize_chroma, ctx->blocks[2]); + ctx->dsp.idct_put(dest_v, dct_linesize_chroma, ctx->blocks[3]); + ctx->dsp.idct_put(dest_u + dct_y_offset, dct_linesize_chroma, ctx->blocks[6]); + ctx->dsp.idct_put(dest_v + dct_y_offset, dct_linesize_chroma, ctx->blocks[7]); } return 0; @@ -273,7 +325,7 @@ for (y = 0; y < ctx->mb_height; y++) { ctx->last_dc[0] = ctx->last_dc[1] = - ctx->last_dc[2] = 1<<(ctx->cid_table->bit_depth+2); // for levels +2^(bitdepth-1) + ctx->last_dc[2] = 1 << (ctx->bit_depth + 2); // for levels +2^(bitdepth-1) init_get_bits(&ctx->gb, buf + ctx->mb_scan_index[y], (buf_size - ctx->mb_scan_index[y]) << 3); for (x = 0; x < ctx->mb_width; x++) { //START_TIMER; @@ -306,7 +358,6 @@ first_field = 1; } - avctx->pix_fmt = PIX_FMT_YUV422P; if (av_image_check_size(ctx->width, ctx->height, 0, avctx)) return -1; avcodec_set_dimensions(avctx, ctx->width, ctx->height); @@ -347,14 +398,13 @@ } AVCodec ff_dnxhd_decoder = { - "dnxhd", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_DNXHD, - sizeof(DNXHDContext), - dnxhd_decode_init, - NULL, - dnxhd_decode_close, - dnxhd_decode_frame, - CODEC_CAP_DR1, + .name = "dnxhd", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_DNXHD, + .priv_data_size = sizeof(DNXHDContext), + .init = dnxhd_decode_init, + .close = dnxhd_decode_close, + .decode = dnxhd_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dnxhdenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dnxhdenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dnxhdenc.c 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dnxhdenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,8 +1,10 @@ /* * VC3/DNxHD encoder * Copyright (c) 2007 Baptiste Coudurier + * Copyright (c) 2011 MirriAd Ltd * * VC-3 encoder funded by the British Broadcasting Corporation + * 10 bit support added by MirriAd Ltd, Joseph Artsimovich * * This file is part of Libav. * @@ -28,21 +30,21 @@ #include "avcodec.h" #include "dsputil.h" #include "mpegvideo.h" +#include "mpegvideo_common.h" #include "dnxhdenc.h" #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +#define DNX10BIT_QMAT_SHIFT 18 // The largest value that will not lead to overflow for 10bit samples. static const AVOption options[]={ - {"nitris_compat", "encode with Avid Nitris compatibility", offsetof(DNXHDEncContext, nitris_compat), FF_OPT_TYPE_INT, {.dbl = 0}, 0, 1, VE}, + {"nitris_compat", "encode with Avid Nitris compatibility", offsetof(DNXHDEncContext, nitris_compat), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, VE}, {NULL} }; static const AVClass class = { "dnxhd", av_default_item_name, options, LIBAVUTIL_VERSION_INT }; -int dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow); - #define LAMBDA_FRAC_BITS 10 -static av_always_inline void dnxhd_get_pixels_8x4(DCTELEM *restrict block, const uint8_t *pixels, int line_size) +static void dnxhd_8bit_get_pixels_8x4_sym(DCTELEM *restrict block, const uint8_t *pixels, int line_size) { int i; for (i = 0; i < 4; i++) { @@ -53,10 +55,48 @@ pixels += line_size; block += 8; } - memcpy(block , block- 8, sizeof(*block)*8); - memcpy(block+ 8, block-16, sizeof(*block)*8); - memcpy(block+16, block-24, sizeof(*block)*8); - memcpy(block+24, block-32, sizeof(*block)*8); + memcpy(block, block - 8, sizeof(*block) * 8); + memcpy(block + 8, block - 16, sizeof(*block) * 8); + memcpy(block + 16, block - 24, sizeof(*block) * 8); + memcpy(block + 24, block - 32, sizeof(*block) * 8); +} + +static av_always_inline void dnxhd_10bit_get_pixels_8x4_sym(DCTELEM *restrict block, const uint8_t *pixels, int line_size) +{ + int i; + + block += 32; + + for (i = 0; i < 4; i++) { + memcpy(block + i * 8, pixels + i * line_size, 8 * sizeof(*block)); + memcpy(block - (i+1) * 8, pixels + i * line_size, 8 * sizeof(*block)); + } +} + +static int dnxhd_10bit_dct_quantize(MpegEncContext *ctx, DCTELEM *block, + int n, int qscale, int *overflow) +{ + const uint8_t *scantable= ctx->intra_scantable.scantable; + const int *qmat = ctx->q_intra_matrix[qscale]; + int last_non_zero = 0; + int i; + + ctx->dsp.fdct(block); + + // Divide by 4 with rounding, to compensate scaling of DCT coefficients + block[0] = (block[0] + 2) >> 2; + + for (i = 1; i < 64; ++i) { + int j = scantable[i]; + int sign = block[j] >> 31; + int level = (block[j] ^ sign) - sign; + level = level * qmat[j] >> DNX10BIT_QMAT_SHIFT; + block[j] = (level ^ sign) - sign; + if (level) + last_non_zero = i; + } + + return last_non_zero; } static int dnxhd_init_vlc(DNXHDEncContext *ctx) @@ -65,9 +105,9 @@ int max_level = 1<<(ctx->cid_table->bit_depth+2); FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->vlc_codes, max_level*4*sizeof(*ctx->vlc_codes), fail); - FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->vlc_bits , max_level*4*sizeof(*ctx->vlc_bits ), fail); - FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->run_codes, 63*2 , fail); - FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->run_bits , 63 , fail); + FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->vlc_bits, max_level*4*sizeof(*ctx->vlc_bits) , fail); + FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->run_codes, 63*2, fail); + FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->run_bits, 63, fail); ctx->vlc_codes += max_level*2; ctx->vlc_bits += max_level*2; @@ -119,31 +159,55 @@ // init first elem to 1 to avoid div by 0 in convert_matrix uint16_t weight_matrix[64] = {1,}; // convert_matrix needs uint16_t* int qscale, i; + const uint8_t *luma_weight_table = ctx->cid_table->luma_weight; + const uint8_t *chroma_weight_table = ctx->cid_table->chroma_weight; - FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->qmatrix_l, (ctx->m.avctx->qmax+1) * 64 * sizeof(int) , fail); - FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->qmatrix_c, (ctx->m.avctx->qmax+1) * 64 * sizeof(int) , fail); + FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->qmatrix_l, (ctx->m.avctx->qmax+1) * 64 * sizeof(int), fail); + FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->qmatrix_c, (ctx->m.avctx->qmax+1) * 64 * sizeof(int), fail); FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->qmatrix_l16, (ctx->m.avctx->qmax+1) * 64 * 2 * sizeof(uint16_t), fail); FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->qmatrix_c16, (ctx->m.avctx->qmax+1) * 64 * 2 * sizeof(uint16_t), fail); - for (i = 1; i < 64; i++) { - int j = ctx->m.dsp.idct_permutation[ff_zigzag_direct[i]]; - weight_matrix[j] = ctx->cid_table->luma_weight[i]; - } - ff_convert_matrix(&ctx->m.dsp, ctx->qmatrix_l, ctx->qmatrix_l16, weight_matrix, - ctx->m.intra_quant_bias, 1, ctx->m.avctx->qmax, 1); - for (i = 1; i < 64; i++) { - int j = ctx->m.dsp.idct_permutation[ff_zigzag_direct[i]]; - weight_matrix[j] = ctx->cid_table->chroma_weight[i]; - } - ff_convert_matrix(&ctx->m.dsp, ctx->qmatrix_c, ctx->qmatrix_c16, weight_matrix, - ctx->m.intra_quant_bias, 1, ctx->m.avctx->qmax, 1); - for (qscale = 1; qscale <= ctx->m.avctx->qmax; qscale++) { - for (i = 0; i < 64; i++) { - ctx->qmatrix_l [qscale] [i] <<= 2; ctx->qmatrix_c [qscale] [i] <<= 2; - ctx->qmatrix_l16[qscale][0][i] <<= 2; ctx->qmatrix_l16[qscale][1][i] <<= 2; - ctx->qmatrix_c16[qscale][0][i] <<= 2; ctx->qmatrix_c16[qscale][1][i] <<= 2; + if (ctx->cid_table->bit_depth == 8) { + for (i = 1; i < 64; i++) { + int j = ctx->m.dsp.idct_permutation[ff_zigzag_direct[i]]; + weight_matrix[j] = ctx->cid_table->luma_weight[i]; + } + ff_convert_matrix(&ctx->m.dsp, ctx->qmatrix_l, ctx->qmatrix_l16, weight_matrix, + ctx->m.intra_quant_bias, 1, ctx->m.avctx->qmax, 1); + for (i = 1; i < 64; i++) { + int j = ctx->m.dsp.idct_permutation[ff_zigzag_direct[i]]; + weight_matrix[j] = ctx->cid_table->chroma_weight[i]; + } + ff_convert_matrix(&ctx->m.dsp, ctx->qmatrix_c, ctx->qmatrix_c16, weight_matrix, + ctx->m.intra_quant_bias, 1, ctx->m.avctx->qmax, 1); + + for (qscale = 1; qscale <= ctx->m.avctx->qmax; qscale++) { + for (i = 0; i < 64; i++) { + ctx->qmatrix_l [qscale] [i] <<= 2; ctx->qmatrix_c [qscale] [i] <<= 2; + ctx->qmatrix_l16[qscale][0][i] <<= 2; ctx->qmatrix_l16[qscale][1][i] <<= 2; + ctx->qmatrix_c16[qscale][0][i] <<= 2; ctx->qmatrix_c16[qscale][1][i] <<= 2; + } + } + } else { + // 10-bit + for (qscale = 1; qscale <= ctx->m.avctx->qmax; qscale++) { + for (i = 1; i < 64; i++) { + int j = ctx->m.dsp.idct_permutation[ff_zigzag_direct[i]]; + + // The quantization formula from the VC-3 standard is: + // quantized = sign(block[i]) * floor(abs(block[i]/s) * p / (qscale * weight_table[i])) + // Where p is 32 for 8-bit samples and 8 for 10-bit ones. + // The s factor compensates scaling of DCT coefficients done by the DCT routines, + // and therefore is not present in standard. It's 8 for 8-bit samples and 4 for 10-bit ones. + // We want values of ctx->qtmatrix_l and ctx->qtmatrix_r to be: + // ((1 << DNX10BIT_QMAT_SHIFT) * (p / s)) / (qscale * weight_table[i]) + // For 10-bit samples, p / s == 2 + ctx->qmatrix_l[qscale][j] = (1 << (DNX10BIT_QMAT_SHIFT + 1)) / (qscale * luma_weight_table[i]); + ctx->qmatrix_c[qscale][j] = (1 << (DNX10BIT_QMAT_SHIFT + 1)) / (qscale * chroma_weight_table[i]); + } } } + return 0; fail: return -1; @@ -166,10 +230,22 @@ static int dnxhd_encode_init(AVCodecContext *avctx) { DNXHDEncContext *ctx = avctx->priv_data; - int i, index; + int i, index, bit_depth; + + switch (avctx->pix_fmt) { + case PIX_FMT_YUV422P: + bit_depth = 8; + break; + case PIX_FMT_YUV422P10: + bit_depth = 10; + break; + default: + av_log(avctx, AV_LOG_ERROR, "pixel format is incompatible with DNxHD\n"); + return -1; + } - ctx->cid = ff_dnxhd_find_cid(avctx); - if (!ctx->cid || avctx->pix_fmt != PIX_FMT_YUV422P) { + ctx->cid = ff_dnxhd_find_cid(avctx, bit_depth); + if (!ctx->cid) { av_log(avctx, AV_LOG_ERROR, "video parameters incompatible with DNxHD\n"); return -1; } @@ -182,15 +258,25 @@ ctx->m.mb_intra = 1; ctx->m.h263_aic = 1; - ctx->get_pixels_8x4_sym = dnxhd_get_pixels_8x4; + avctx->bits_per_raw_sample = ctx->cid_table->bit_depth; dsputil_init(&ctx->m.dsp, avctx); ff_dct_common_init(&ctx->m); + if (!ctx->m.dct_quantize) + ctx->m.dct_quantize = dct_quantize_c; + + if (ctx->cid_table->bit_depth == 10) { + ctx->m.dct_quantize = dnxhd_10bit_dct_quantize; + ctx->get_pixels_8x4_sym = dnxhd_10bit_get_pixels_8x4_sym; + ctx->block_width_l2 = 4; + } else { + ctx->get_pixels_8x4_sym = dnxhd_8bit_get_pixels_8x4_sym; + ctx->block_width_l2 = 3; + } + #if HAVE_MMX ff_dnxhd_init_mmx(ctx); #endif - if (!ctx->m.dct_quantize) - ctx->m.dct_quantize = dct_quantize_c; ctx->m.mb_height = (avctx->height + 15) / 16; ctx->m.mb_width = (avctx->width + 15) / 16; @@ -219,7 +305,7 @@ FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->slice_size, ctx->m.mb_height*sizeof(uint32_t), fail); FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->slice_offs, ctx->m.mb_height*sizeof(uint32_t), fail); FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->mb_bits, ctx->m.mb_num *sizeof(uint16_t), fail); - FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->mb_qscale, ctx->m.mb_num *sizeof(uint8_t) , fail); + FF_ALLOCZ_OR_GOTO(ctx->m.avctx, ctx->mb_qscale, ctx->m.mb_num *sizeof(uint8_t), fail); ctx->frame.key_frame = 1; ctx->frame.pict_type = AV_PICTURE_TYPE_I; @@ -256,7 +342,7 @@ AV_WB16(buf + 0x1a, avctx->width); // SPL AV_WB16(buf + 0x1d, avctx->height>>ctx->interlaced); // NAL - buf[0x21] = 0x38; // FIXME 8 bit per comp + buf[0x21] = ctx->cid_table->bit_depth == 10 ? 0x58 : 0x38; buf[0x22] = 0x88 + (ctx->interlaced<<2); AV_WB32(buf + 0x28, ctx->cid); // CID buf[0x2c] = ctx->interlaced ? 0 : 0x80; @@ -322,15 +408,27 @@ if (level) { if (level < 0) { level = (1-2*level) * qscale * weight_matrix[i]; - if (weight_matrix[i] != 32) - level += 32; - level >>= 6; + if (ctx->cid_table->bit_depth == 10) { + if (weight_matrix[i] != 8) + level += 8; + level >>= 4; + } else { + if (weight_matrix[i] != 32) + level += 32; + level >>= 6; + } level = -level; } else { level = (2*level+1) * qscale * weight_matrix[i]; - if (weight_matrix[i] != 32) - level += 32; - level >>= 6; + if (ctx->cid_table->bit_depth == 10) { + if (weight_matrix[i] != 8) + level += 8; + level >>= 4; + } else { + if (weight_matrix[i] != 32) + level += 32; + level >>= 6; + } } block[j] = level; } @@ -342,7 +440,7 @@ int score = 0; int i; for (i = 0; i < 64; i++) - score += (block[i]-qblock[i])*(block[i]-qblock[i]); + score += (block[i] - qblock[i]) * (block[i] - qblock[i]); return score; } @@ -365,31 +463,35 @@ static av_always_inline void dnxhd_get_blocks(DNXHDEncContext *ctx, int mb_x, int mb_y) { - const uint8_t *ptr_y = ctx->thread[0]->src[0] + ((mb_y << 4) * ctx->m.linesize) + (mb_x << 4); - const uint8_t *ptr_u = ctx->thread[0]->src[1] + ((mb_y << 4) * ctx->m.uvlinesize) + (mb_x << 3); - const uint8_t *ptr_v = ctx->thread[0]->src[2] + ((mb_y << 4) * ctx->m.uvlinesize) + (mb_x << 3); + const int bs = ctx->block_width_l2; + const int bw = 1 << bs; + const uint8_t *ptr_y = ctx->thread[0]->src[0] + ((mb_y << 4) * ctx->m.linesize) + (mb_x << bs+1); + const uint8_t *ptr_u = ctx->thread[0]->src[1] + ((mb_y << 4) * ctx->m.uvlinesize) + (mb_x << bs); + const uint8_t *ptr_v = ctx->thread[0]->src[2] + ((mb_y << 4) * ctx->m.uvlinesize) + (mb_x << bs); DSPContext *dsp = &ctx->m.dsp; - dsp->get_pixels(ctx->blocks[0], ptr_y , ctx->m.linesize); - dsp->get_pixels(ctx->blocks[1], ptr_y + 8, ctx->m.linesize); - dsp->get_pixels(ctx->blocks[2], ptr_u , ctx->m.uvlinesize); - dsp->get_pixels(ctx->blocks[3], ptr_v , ctx->m.uvlinesize); + dsp->get_pixels(ctx->blocks[0], ptr_y, ctx->m.linesize); + dsp->get_pixels(ctx->blocks[1], ptr_y + bw, ctx->m.linesize); + dsp->get_pixels(ctx->blocks[2], ptr_u, ctx->m.uvlinesize); + dsp->get_pixels(ctx->blocks[3], ptr_v, ctx->m.uvlinesize); if (mb_y+1 == ctx->m.mb_height && ctx->m.avctx->height == 1080) { if (ctx->interlaced) { - ctx->get_pixels_8x4_sym(ctx->blocks[4], ptr_y + ctx->dct_y_offset , ctx->m.linesize); - ctx->get_pixels_8x4_sym(ctx->blocks[5], ptr_y + ctx->dct_y_offset + 8, ctx->m.linesize); - ctx->get_pixels_8x4_sym(ctx->blocks[6], ptr_u + ctx->dct_uv_offset , ctx->m.uvlinesize); - ctx->get_pixels_8x4_sym(ctx->blocks[7], ptr_v + ctx->dct_uv_offset , ctx->m.uvlinesize); + ctx->get_pixels_8x4_sym(ctx->blocks[4], ptr_y + ctx->dct_y_offset, ctx->m.linesize); + ctx->get_pixels_8x4_sym(ctx->blocks[5], ptr_y + ctx->dct_y_offset + bw, ctx->m.linesize); + ctx->get_pixels_8x4_sym(ctx->blocks[6], ptr_u + ctx->dct_uv_offset, ctx->m.uvlinesize); + ctx->get_pixels_8x4_sym(ctx->blocks[7], ptr_v + ctx->dct_uv_offset, ctx->m.uvlinesize); } else { - dsp->clear_block(ctx->blocks[4]); dsp->clear_block(ctx->blocks[5]); - dsp->clear_block(ctx->blocks[6]); dsp->clear_block(ctx->blocks[7]); + dsp->clear_block(ctx->blocks[4]); + dsp->clear_block(ctx->blocks[5]); + dsp->clear_block(ctx->blocks[6]); + dsp->clear_block(ctx->blocks[7]); } } else { - dsp->get_pixels(ctx->blocks[4], ptr_y + ctx->dct_y_offset , ctx->m.linesize); - dsp->get_pixels(ctx->blocks[5], ptr_y + ctx->dct_y_offset + 8, ctx->m.linesize); - dsp->get_pixels(ctx->blocks[6], ptr_u + ctx->dct_uv_offset , ctx->m.uvlinesize); - dsp->get_pixels(ctx->blocks[7], ptr_v + ctx->dct_uv_offset , ctx->m.uvlinesize); + dsp->get_pixels(ctx->blocks[4], ptr_y + ctx->dct_y_offset, ctx->m.linesize); + dsp->get_pixels(ctx->blocks[5], ptr_y + ctx->dct_y_offset + bw, ctx->m.linesize); + dsp->get_pixels(ctx->blocks[6], ptr_u + ctx->dct_uv_offset, ctx->m.uvlinesize); + dsp->get_pixels(ctx->blocks[7], ptr_v + ctx->dct_uv_offset, ctx->m.uvlinesize); } } @@ -416,7 +518,7 @@ ctx->m.last_dc[0] = ctx->m.last_dc[1] = - ctx->m.last_dc[2] = 1024; + ctx->m.last_dc[2] = 1 << (ctx->cid_table->bit_depth + 2); for (mb_x = 0; mb_x < ctx->m.mb_width; mb_x++) { unsigned mb = mb_y * ctx->m.mb_width + mb_x; @@ -439,6 +541,8 @@ diff = block[0] - ctx->m.last_dc[n]; if (diff < 0) nbits = av_log2_16bit(-2*diff); else nbits = av_log2_16bit( 2*diff); + + assert(nbits < ctx->cid_table->bit_depth + 4); dc_bits += ctx->cid_table->dc_bits[nbits] + nbits; ctx->m.last_dc[n] = block[0]; @@ -464,7 +568,7 @@ ctx->m.last_dc[0] = ctx->m.last_dc[1] = - ctx->m.last_dc[2] = 1024; + ctx->m.last_dc[2] = 1 << (ctx->cid_table->bit_depth + 2); for (mb_x = 0; mb_x < ctx->m.mb_width; mb_x++) { unsigned mb = mb_y * ctx->m.mb_width + mb_x; int qscale = ctx->mb_qscale[mb]; @@ -476,9 +580,9 @@ for (i = 0; i < 8; i++) { DCTELEM *block = ctx->blocks[i]; - int last_index, overflow; - int n = dnxhd_switch_matrix(ctx, i); - last_index = ctx->m.dct_quantize(&ctx->m, block, i, qscale, &overflow); + int overflow, n = dnxhd_switch_matrix(ctx, i); + int last_index = ctx->m.dct_quantize(&ctx->m, block, i, + qscale, &overflow); //START_TIMER; dnxhd_encode_block(ctx, block, last_index, n); //STOP_TIMER("encode_block"); @@ -497,14 +601,14 @@ for (mb_y = 0; mb_y < ctx->m.mb_height; mb_y++) { int thread_size; ctx->slice_offs[mb_y] = offset; - ctx->slice_size[mb_y] = 0; - for (mb_x = 0; mb_x < ctx->m.mb_width; mb_x++) { - unsigned mb = mb_y * ctx->m.mb_width + mb_x; - ctx->slice_size[mb_y] += ctx->mb_bits[mb]; - } - ctx->slice_size[mb_y] = (ctx->slice_size[mb_y]+31)&~31; - ctx->slice_size[mb_y] >>= 3; - thread_size = ctx->slice_size[mb_y]; + ctx->slice_size[mb_y] = 0; + for (mb_x = 0; mb_x < ctx->m.mb_width; mb_x++) { + unsigned mb = mb_y * ctx->m.mb_width + mb_x; + ctx->slice_size[mb_y] += ctx->mb_bits[mb]; + } + ctx->slice_size[mb_y] = (ctx->slice_size[mb_y]+31)&~31; + ctx->slice_size[mb_y] >>= 3; + thread_size = ctx->slice_size[mb_y]; offset += thread_size; } } @@ -514,13 +618,40 @@ DNXHDEncContext *ctx = avctx->priv_data; int mb_y = jobnr, mb_x; ctx = ctx->thread[threadnr]; - for (mb_x = 0; mb_x < ctx->m.mb_width; mb_x++) { - unsigned mb = mb_y * ctx->m.mb_width + mb_x; - uint8_t *pix = ctx->thread[0]->src[0] + ((mb_y<<4) * ctx->m.linesize) + (mb_x<<4); - int sum = ctx->m.dsp.pix_sum(pix, ctx->m.linesize); - int varc = (ctx->m.dsp.pix_norm1(pix, ctx->m.linesize) - (((unsigned)(sum*sum))>>8)+128)>>8; - ctx->mb_cmp[mb].value = varc; - ctx->mb_cmp[mb].mb = mb; + if (ctx->cid_table->bit_depth == 8) { + uint8_t *pix = ctx->thread[0]->src[0] + ((mb_y<<4) * ctx->m.linesize); + for (mb_x = 0; mb_x < ctx->m.mb_width; ++mb_x, pix += 16) { + unsigned mb = mb_y * ctx->m.mb_width + mb_x; + int sum = ctx->m.dsp.pix_sum(pix, ctx->m.linesize); + int varc = (ctx->m.dsp.pix_norm1(pix, ctx->m.linesize) - (((unsigned)sum*sum)>>8)+128)>>8; + ctx->mb_cmp[mb].value = varc; + ctx->mb_cmp[mb].mb = mb; + } + } else { // 10-bit + int const linesize = ctx->m.linesize >> 1; + for (mb_x = 0; mb_x < ctx->m.mb_width; ++mb_x) { + uint16_t *pix = (uint16_t*)ctx->thread[0]->src[0] + ((mb_y << 4) * linesize) + (mb_x << 4); + unsigned mb = mb_y * ctx->m.mb_width + mb_x; + int sum = 0; + int sqsum = 0; + int mean, sqmean; + int i, j; + // Macroblocks are 16x16 pixels, unlike DCT blocks which are 8x8. + for (i = 0; i < 16; ++i) { + for (j = 0; j < 16; ++j) { + // Turn 16-bit pixels into 10-bit ones. + int const sample = (unsigned)pix[j] >> 6; + sum += sample; + sqsum += sample * sample; + // 2^10 * 2^10 * 16 * 16 = 2^28, which is less than INT_MAX + } + pix += linesize; + } + mean = sum >> 8; // 16*16 == 2^8 + sqmean = sqsum >> 8; + ctx->mb_cmp[mb].value = sqmean - mean * mean; + ctx->mb_cmp[mb].mb = mb; + } } return 0; } @@ -551,7 +682,8 @@ int qscale = 1; int mb = y*ctx->m.mb_width+x; for (q = 1; q < avctx->qmax; q++) { - unsigned score = ctx->mb_rc[q][mb].bits*lambda+(ctx->mb_rc[q][mb].ssd<mb_rc[q][mb].bits*lambda+ + ((unsigned)ctx->mb_rc[q][mb].ssd<>1; else lambda -= down_step; - down_step *= 5; // XXX tune ? + down_step = FFMIN((int64_t)down_step*5, INT_MAX); up_step = 1<priv_data; int i; - short square; + + if (avctx->channels < 1 || avctx->channels > 2) { + av_log(avctx, AV_LOG_INFO, "invalid number of channels\n"); + return AVERROR(EINVAL); + } s->channels = avctx->channels; s->sample[0] = s->sample[1] = 0; @@ -125,25 +130,23 @@ case CODEC_ID_ROQ_DPCM: /* initialize square table */ for (i = 0; i < 128; i++) { - square = i * i; - s->roq_square_array[i] = square; + int16_t square = i * i; + s->roq_square_array[i ] = square; s->roq_square_array[i + 128] = -square; } break; - case CODEC_ID_SOL_DPCM: switch(avctx->codec_tag){ case 1: - s->sol_table=sol_table_old; + s->sol_table = sol_table_old; s->sample[0] = s->sample[1] = 0x80; break; case 2: - s->sol_table=sol_table_new; + s->sol_table = sol_table_new; s->sample[0] = s->sample[1] = 0x80; break; case 3: - s->sol_table=sol_table_16; break; default: av_log(avctx, AV_LOG_ERROR, "Unknown SOL subcodec\n"); @@ -155,163 +158,181 @@ break; } - avctx->sample_fmt = AV_SAMPLE_FMT_S16; + if (avctx->codec->id == CODEC_ID_SOL_DPCM && avctx->codec_tag != 3) + avctx->sample_fmt = AV_SAMPLE_FMT_U8; + else + avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } -static int dpcm_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) + +static int dpcm_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; + const uint8_t *buf_end = buf + buf_size; DPCMContext *s = avctx->priv_data; - int in, out = 0; + int out = 0, ret; int predictor[2]; - int channel_number = 0; - short *output_samples = data; - int shift[2]; - unsigned char byte; - short diff; - - if (!buf_size) - return 0; - - // almost every DPCM variant expands one byte of data into two - if(*data_size/2 < buf_size) - return -1; + int ch = 0; + int stereo = s->channels - 1; + int16_t *output_samples; + + /* calculate output size */ + switch(avctx->codec->id) { + case CODEC_ID_ROQ_DPCM: + out = buf_size - 8; + break; + case CODEC_ID_INTERPLAY_DPCM: + out = buf_size - 6 - s->channels; + break; + case CODEC_ID_XAN_DPCM: + out = buf_size - 2 * s->channels; + break; + case CODEC_ID_SOL_DPCM: + if (avctx->codec_tag != 3) + out = buf_size * 2; + else + out = buf_size; + break; + } + if (out <= 0) { + av_log(avctx, AV_LOG_ERROR, "packet is too small\n"); + return AVERROR(EINVAL); + } + + /* get output buffer */ + s->frame.nb_samples = out / s->channels; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + output_samples = (int16_t *)s->frame.data[0]; switch(avctx->codec->id) { case CODEC_ID_ROQ_DPCM: - if (s->channels == 1) - predictor[0] = AV_RL16(&buf[6]); - else { - predictor[0] = buf[7] << 8; - predictor[1] = buf[6] << 8; + buf += 6; + + if (stereo) { + predictor[1] = (int16_t)(bytestream_get_byte(&buf) << 8); + predictor[0] = (int16_t)(bytestream_get_byte(&buf) << 8); + } else { + predictor[0] = (int16_t)bytestream_get_le16(&buf); } - SE_16BIT(predictor[0]); - SE_16BIT(predictor[1]); /* decode the samples */ - for (in = 8, out = 0; in < buf_size; in++, out++) { - predictor[channel_number] += s->roq_square_array[buf[in]]; - predictor[channel_number] = av_clip_int16(predictor[channel_number]); - output_samples[out] = predictor[channel_number]; + while (buf < buf_end) { + predictor[ch] += s->roq_square_array[*buf++]; + predictor[ch] = av_clip_int16(predictor[ch]); + *output_samples++ = predictor[ch]; /* toggle channel */ - channel_number ^= s->channels - 1; + ch ^= stereo; } break; case CODEC_ID_INTERPLAY_DPCM: - in = 6; /* skip over the stream mask and stream length */ - predictor[0] = AV_RL16(&buf[in]); - in += 2; - SE_16BIT(predictor[0]) - output_samples[out++] = predictor[0]; - if (s->channels == 2) { - predictor[1] = AV_RL16(&buf[in]); - in += 2; - SE_16BIT(predictor[1]) - output_samples[out++] = predictor[1]; + buf += 6; /* skip over the stream mask and stream length */ + + for (ch = 0; ch < s->channels; ch++) { + predictor[ch] = (int16_t)bytestream_get_le16(&buf); + *output_samples++ = predictor[ch]; } - while (in < buf_size) { - predictor[channel_number] += interplay_delta_table[buf[in++]]; - predictor[channel_number] = av_clip_int16(predictor[channel_number]); - output_samples[out++] = predictor[channel_number]; + ch = 0; + while (buf < buf_end) { + predictor[ch] += interplay_delta_table[*buf++]; + predictor[ch] = av_clip_int16(predictor[ch]); + *output_samples++ = predictor[ch]; /* toggle channel */ - channel_number ^= s->channels - 1; + ch ^= stereo; } - break; case CODEC_ID_XAN_DPCM: - in = 0; - shift[0] = shift[1] = 4; - predictor[0] = AV_RL16(&buf[in]); - in += 2; - SE_16BIT(predictor[0]); - if (s->channels == 2) { - predictor[1] = AV_RL16(&buf[in]); - in += 2; - SE_16BIT(predictor[1]); - } + { + int shift[2] = { 4, 4 }; + + for (ch = 0; ch < s->channels; ch++) + predictor[ch] = (int16_t)bytestream_get_le16(&buf); - while (in < buf_size) { - byte = buf[in++]; - diff = (byte & 0xFC) << 8; - if ((byte & 0x03) == 3) - shift[channel_number]++; + ch = 0; + while (buf < buf_end) { + uint8_t n = *buf++; + int16_t diff = (n & 0xFC) << 8; + if ((n & 0x03) == 3) + shift[ch]++; else - shift[channel_number] -= (2 * (byte & 3)); + shift[ch] -= (2 * (n & 3)); /* saturate the shifter to a lower limit of 0 */ - if (shift[channel_number] < 0) - shift[channel_number] = 0; + if (shift[ch] < 0) + shift[ch] = 0; - diff >>= shift[channel_number]; - predictor[channel_number] += diff; + diff >>= shift[ch]; + predictor[ch] += diff; - predictor[channel_number] = av_clip_int16(predictor[channel_number]); - output_samples[out++] = predictor[channel_number]; + predictor[ch] = av_clip_int16(predictor[ch]); + *output_samples++ = predictor[ch]; /* toggle channel */ - channel_number ^= s->channels - 1; + ch ^= stereo; } break; + } case CODEC_ID_SOL_DPCM: - in = 0; if (avctx->codec_tag != 3) { - if(*data_size/4 < buf_size) - return -1; - while (in < buf_size) { - int n1, n2; - n1 = (buf[in] >> 4) & 0xF; - n2 = buf[in++] & 0xF; - s->sample[0] += s->sol_table[n1]; - if (s->sample[0] < 0) s->sample[0] = 0; - if (s->sample[0] > 255) s->sample[0] = 255; - output_samples[out++] = (s->sample[0] - 128) << 8; - s->sample[s->channels - 1] += s->sol_table[n2]; - if (s->sample[s->channels - 1] < 0) s->sample[s->channels - 1] = 0; - if (s->sample[s->channels - 1] > 255) s->sample[s->channels - 1] = 255; - output_samples[out++] = (s->sample[s->channels - 1] - 128) << 8; + uint8_t *output_samples_u8 = s->frame.data[0]; + while (buf < buf_end) { + uint8_t n = *buf++; + + s->sample[0] += s->sol_table[n >> 4]; + s->sample[0] = av_clip_uint8(s->sample[0]); + *output_samples_u8++ = s->sample[0]; + + s->sample[stereo] += s->sol_table[n & 0x0F]; + s->sample[stereo] = av_clip_uint8(s->sample[stereo]); + *output_samples_u8++ = s->sample[stereo]; } } else { - while (in < buf_size) { - int n; - n = buf[in++]; - if (n & 0x80) s->sample[channel_number] -= s->sol_table[n & 0x7F]; - else s->sample[channel_number] += s->sol_table[n & 0x7F]; - s->sample[channel_number] = av_clip_int16(s->sample[channel_number]); - output_samples[out++] = s->sample[channel_number]; + while (buf < buf_end) { + uint8_t n = *buf++; + if (n & 0x80) s->sample[ch] -= sol_table_16[n & 0x7F]; + else s->sample[ch] += sol_table_16[n & 0x7F]; + s->sample[ch] = av_clip_int16(s->sample[ch]); + *output_samples++ = s->sample[ch]; /* toggle channel */ - channel_number ^= s->channels - 1; + ch ^= stereo; } } break; } - *data_size = out * sizeof(short); + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return buf_size; } -#define DPCM_DECODER(id, name, long_name_) \ -AVCodec ff_ ## name ## _decoder = { \ - #name, \ - AVMEDIA_TYPE_AUDIO, \ - id, \ - sizeof(DPCMContext), \ - dpcm_decode_init, \ - NULL, \ - NULL, \ - dpcm_decode_frame, \ - .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ +#define DPCM_DECODER(id_, name_, long_name_) \ +AVCodec ff_ ## name_ ## _decoder = { \ + .name = #name_, \ + .type = AVMEDIA_TYPE_AUDIO, \ + .id = id_, \ + .priv_data_size = sizeof(DPCMContext), \ + .init = dpcm_decode_init, \ + .decode = dpcm_decode_frame, \ + .capabilities = CODEC_CAP_DR1, \ + .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ } DPCM_DECODER(CODEC_ID_INTERPLAY_DPCM, interplay_dpcm, "DPCM Interplay"); -DPCM_DECODER(CODEC_ID_ROQ_DPCM, roq_dpcm, "DPCM id RoQ"); -DPCM_DECODER(CODEC_ID_SOL_DPCM, sol_dpcm, "DPCM Sol"); -DPCM_DECODER(CODEC_ID_XAN_DPCM, xan_dpcm, "DPCM Xan"); +DPCM_DECODER(CODEC_ID_ROQ_DPCM, roq_dpcm, "DPCM id RoQ"); +DPCM_DECODER(CODEC_ID_SOL_DPCM, sol_dpcm, "DPCM Sol"); +DPCM_DECODER(CODEC_ID_XAN_DPCM, xan_dpcm, "DPCM Xan"); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dpx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dpx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dpx.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dpx.c 2012-01-11 00:34:30.000000000 +0000 @@ -234,15 +234,12 @@ } AVCodec ff_dpx_decoder = { - "dpx", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_DPX, - sizeof(DPXContext), - decode_init, - NULL, - decode_end, - decode_frame, - 0, - NULL, + .name = "dpx", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_DPX, + .priv_data_size = sizeof(DPXContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, .long_name = NULL_IF_CONFIG_SMALL("DPX image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dpxenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dpxenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dpxenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dpxenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,7 +35,7 @@ DPXContext *s = avctx->priv_data; avctx->coded_frame = &s->picture; - avctx->coded_frame->pict_type = FF_I_TYPE; + avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; s->big_endian = 1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dsicinav.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dsicinav.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dsicinav.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dsicinav.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,7 @@ #include "avcodec.h" #include "bytestream.h" +#include "mathops.h" typedef enum CinVideoBitmapIndex { @@ -43,7 +44,7 @@ } CinVideoContext; typedef struct CinAudioContext { - AVCodecContext *avctx; + AVFrame frame; int initial_decode_frame; int delta; } CinAudioContext; @@ -216,7 +217,11 @@ bitmap_frame_size = buf_size - 4; /* handle palette */ + if (bitmap_frame_size < palette_colors_count * (3 + (palette_type != 0))) + return AVERROR_INVALIDDATA; if (palette_type == 0) { + if (palette_colors_count > 256) + return AVERROR_INVALIDDATA; for (i = 0; i < palette_colors_count; ++i) { cin->palette[i] = bytestream_get_le24(&buf); bitmap_frame_size -= 3; @@ -304,66 +309,78 @@ { CinAudioContext *cin = avctx->priv_data; - cin->avctx = avctx; + if (avctx->channels != 1) { + av_log_ask_for_sample(avctx, "Number of channels is not supported\n"); + return AVERROR_PATCHWELCOME; + } + cin->initial_decode_frame = 1; cin->delta = 0; avctx->sample_fmt = AV_SAMPLE_FMT_S16; + avcodec_get_frame_defaults(&cin->frame); + avctx->coded_frame = &cin->frame; + return 0; } -static int cinaudio_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int cinaudio_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; CinAudioContext *cin = avctx->priv_data; - const uint8_t *src = buf; - int16_t *samples = (int16_t *)data; - - buf_size = FFMIN(buf_size, *data_size/2); + const uint8_t *buf_end = buf + avpkt->size; + int16_t *samples; + int delta, ret; + + /* get output buffer */ + cin->frame.nb_samples = avpkt->size - cin->initial_decode_frame; + if ((ret = avctx->get_buffer(avctx, &cin->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (int16_t *)cin->frame.data[0]; + delta = cin->delta; if (cin->initial_decode_frame) { cin->initial_decode_frame = 0; - cin->delta = (int16_t)AV_RL16(src); src += 2; - *samples++ = cin->delta; - buf_size -= 2; + delta = sign_extend(AV_RL16(buf), 16); + buf += 2; + *samples++ = delta; } - while (buf_size > 0) { - cin->delta += cinaudio_delta16_table[*src++]; - cin->delta = av_clip_int16(cin->delta); - *samples++ = cin->delta; - --buf_size; + while (buf < buf_end) { + delta += cinaudio_delta16_table[*buf++]; + delta = av_clip_int16(delta); + *samples++ = delta; } + cin->delta = delta; - *data_size = (uint8_t *)samples - (uint8_t *)data; + *got_frame_ptr = 1; + *(AVFrame *)data = cin->frame; - return src - buf; + return avpkt->size; } AVCodec ff_dsicinvideo_decoder = { - "dsicinvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_DSICINVIDEO, - sizeof(CinVideoContext), - cinvideo_decode_init, - NULL, - cinvideo_decode_end, - cinvideo_decode_frame, - CODEC_CAP_DR1, + .name = "dsicinvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_DSICINVIDEO, + .priv_data_size = sizeof(CinVideoContext), + .init = cinvideo_decode_init, + .close = cinvideo_decode_end, + .decode = cinvideo_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN video"), }; AVCodec ff_dsicinaudio_decoder = { - "dsicinaudio", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_DSICINAUDIO, - sizeof(CinAudioContext), - cinaudio_decode_init, - NULL, - NULL, - cinaudio_decode_frame, + .name = "dsicinaudio", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_DSICINAUDIO, + .priv_data_size = sizeof(CinAudioContext), + .init = cinaudio_decode_init, + .decode = cinaudio_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN audio"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dsputil.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dsputil.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dsputil.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dsputil.c 2012-01-11 00:34:30.000000000 +0000 @@ -145,6 +145,41 @@ } } +void ff_init_scantable_permutation(uint8_t *idct_permutation, + int idct_permutation_type) +{ + int i; + + switch(idct_permutation_type){ + case FF_NO_IDCT_PERM: + for(i=0; i<64; i++) + idct_permutation[i]= i; + break; + case FF_LIBMPEG2_IDCT_PERM: + for(i=0; i<64; i++) + idct_permutation[i]= (i & 0x38) | ((i & 6) >> 1) | ((i & 1) << 2); + break; + case FF_SIMPLE_IDCT_PERM: + for(i=0; i<64; i++) + idct_permutation[i]= simple_mmx_permutation[i]; + break; + case FF_TRANSPOSE_IDCT_PERM: + for(i=0; i<64; i++) + idct_permutation[i]= ((i&7)<<3) | (i>>3); + break; + case FF_PARTTRANS_IDCT_PERM: + for(i=0; i<64; i++) + idct_permutation[i]= (i&0x24) | ((i&3)<<3) | ((i>>3)&3); + break; + case FF_SSE2_IDCT_PERM: + for(i=0; i<64; i++) + idct_permutation[i]= (i&0x38) | idct_sse2_row_perm[i&7]; + break; + default: + av_log(NULL, AV_LOG_ERROR, "Internal error, IDCT permutation not set\n"); + } +} + static int pix_sum_c(uint8_t * pix, int line_size) { int s, i, j; @@ -185,7 +220,7 @@ s += sq[pix[6]]; s += sq[pix[7]]; #else -#if LONG_MAX > 2147483647 +#if HAVE_FAST_64BIT register uint64_t x=*(uint64_t*)pix; s += sq[x&0xff]; s += sq[(x>>8)&0xff]; @@ -307,25 +342,6 @@ return s; } -static void get_pixels_c(DCTELEM *restrict block, const uint8_t *pixels, int line_size) -{ - int i; - - /* read the pixels */ - for(i=0;i<8;i++) { - block[0] = pixels[0]; - block[1] = pixels[1]; - block[2] = pixels[2]; - block[3] = pixels[3]; - block[4] = pixels[4]; - block[5] = pixels[5]; - block[6] = pixels[6]; - block[7] = pixels[7]; - pixels += line_size; - block += 8; - } -} - static void diff_pixels_c(DCTELEM *restrict block, const uint8_t *s1, const uint8_t *s2, int stride){ int i; @@ -424,27 +440,6 @@ } } -static void put_pixels_nonclamped_c(const DCTELEM *block, uint8_t *restrict pixels, - int line_size) -{ - int i; - - /* read the pixels */ - for(i=0;i<8;i++) { - pixels[0] = block[0]; - pixels[1] = block[1]; - pixels[2] = block[2]; - pixels[3] = block[3]; - pixels[4] = block[4]; - pixels[5] = block[5]; - pixels[6] = block[6]; - pixels[7] = block[7]; - - pixels += line_size; - block += 8; - } -} - void ff_add_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, int line_size) { @@ -526,22 +521,6 @@ } } -static void scale_block_c(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align 8*/, int linesize) -{ - int i, j; - uint16_t *dst1 = (uint16_t *) dst; - uint16_t *dst2 = (uint16_t *)(dst + linesize); - - for (j = 0; j < 8; j++) { - for (i = 0; i < 8; i++) { - dst1[i] = dst2[i] = src[i] * 0x0101; - } - src += 8; - dst1 += linesize; - dst2 += linesize; - } -} - #define avg2(a,b) ((a+b+1)>>1) #define avg4(a,b,c,d) ((a+b+c+d+2)>>2) @@ -819,27 +798,6 @@ dst += stride; } } -#if 0 -#define TPEL_WIDTH(width)\ -static void put_tpel_pixels ## width ## _mc00_c(uint8_t *dst, const uint8_t *src, int stride, int height){\ - void put_tpel_pixels_mc00_c(dst, src, stride, width, height);}\ -static void put_tpel_pixels ## width ## _mc10_c(uint8_t *dst, const uint8_t *src, int stride, int height){\ - void put_tpel_pixels_mc10_c(dst, src, stride, width, height);}\ -static void put_tpel_pixels ## width ## _mc20_c(uint8_t *dst, const uint8_t *src, int stride, int height){\ - void put_tpel_pixels_mc20_c(dst, src, stride, width, height);}\ -static void put_tpel_pixels ## width ## _mc01_c(uint8_t *dst, const uint8_t *src, int stride, int height){\ - void put_tpel_pixels_mc01_c(dst, src, stride, width, height);}\ -static void put_tpel_pixels ## width ## _mc11_c(uint8_t *dst, const uint8_t *src, int stride, int height){\ - void put_tpel_pixels_mc11_c(dst, src, stride, width, height);}\ -static void put_tpel_pixels ## width ## _mc21_c(uint8_t *dst, const uint8_t *src, int stride, int height){\ - void put_tpel_pixels_mc21_c(dst, src, stride, width, height);}\ -static void put_tpel_pixels ## width ## _mc02_c(uint8_t *dst, const uint8_t *src, int stride, int height){\ - void put_tpel_pixels_mc02_c(dst, src, stride, width, height);}\ -static void put_tpel_pixels ## width ## _mc12_c(uint8_t *dst, const uint8_t *src, int stride, int height){\ - void put_tpel_pixels_mc12_c(dst, src, stride, width, height);}\ -static void put_tpel_pixels ## width ## _mc22_c(uint8_t *dst, const uint8_t *src, int stride, int height){\ - void put_tpel_pixels_mc22_c(dst, src, stride, width, height);} -#endif #define QPEL_MC(r, OPNAME, RND, OP) \ static void OPNAME ## mpeg4_qpel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){\ @@ -1357,16 +1315,16 @@ } #if CONFIG_RV40_DECODER -static void put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){ +void ff_put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){ put_pixels16_xy2_8_c(dst, src, stride, 16); } -static void avg_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){ +void ff_avg_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){ avg_pixels16_xy2_8_c(dst, src, stride, 16); } -static void put_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){ +void ff_put_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){ put_pixels8_xy2_8_c(dst, src, stride, 8); } -static void avg_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){ +void ff_avg_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){ avg_pixels8_xy2_8_c(dst, src, stride, 8); } #endif /* CONFIG_RV40_DECODER */ @@ -1821,7 +1779,7 @@ } /** - * permutes an 8x8 block. + * Permute an 8x8 block. * @param block the block which will be permuted according to the given permutation vector * @param permutation the permutation vector * @param last the last non zero coefficient in scantable order, used to speed the permutation up @@ -2258,7 +2216,7 @@ s->block_last_index[0/*FIXME*/]= s->fast_dct_quantize(s, temp, 0/*FIXME*/, s->qscale, &i); s->dct_unquantize_inter(s, temp, 0, s->qscale); - ff_simple_idct(temp); //FIXME + ff_simple_idct_8(temp); //FIXME for(i=0; i<64; i++) sum+= (temp[i]-bak[i])*(temp[i]-bak[i]); @@ -2532,48 +2490,12 @@ dst[i] = src[i] * mul; } -static void vector_fmul_sv_scalar_2_c(float *dst, const float *src, - const float **sv, float mul, int len) -{ - int i; - for (i = 0; i < len; i += 2, sv++) { - dst[i ] = src[i ] * sv[0][0] * mul; - dst[i+1] = src[i+1] * sv[0][1] * mul; - } -} - -static void vector_fmul_sv_scalar_4_c(float *dst, const float *src, - const float **sv, float mul, int len) -{ - int i; - for (i = 0; i < len; i += 4, sv++) { - dst[i ] = src[i ] * sv[0][0] * mul; - dst[i+1] = src[i+1] * sv[0][1] * mul; - dst[i+2] = src[i+2] * sv[0][2] * mul; - dst[i+3] = src[i+3] * sv[0][3] * mul; - } -} - -static void sv_fmul_scalar_2_c(float *dst, const float **sv, float mul, - int len) -{ - int i; - for (i = 0; i < len; i += 2, sv++) { - dst[i ] = sv[0][0] * mul; - dst[i+1] = sv[0][1] * mul; - } -} - -static void sv_fmul_scalar_4_c(float *dst, const float **sv, float mul, - int len) +static void vector_fmac_scalar_c(float *dst, const float *src, float mul, + int len) { int i; - for (i = 0; i < len; i += 4, sv++) { - dst[i ] = sv[0][0] * mul; - dst[i+1] = sv[0][1] * mul; - dst[i+2] = sv[0][2] * mul; - dst[i+3] = sv[0][3] * mul; - } + for (i = 0; i < len; i++) + dst[i] += src[i] * mul; } static void butterflies_float_c(float *restrict v1, float *restrict v2, @@ -2587,6 +2509,18 @@ } } +static void butterflies_float_interleave_c(float *dst, const float *src0, + const float *src1, int len) +{ + int i; + for (i = 0; i < len; i++) { + float f1 = src0[i]; + float f2 = src1[i]; + dst[2*i ] = f1 + f2; + dst[2*i + 1] = f1 - f2; + } +} + static float scalarproduct_float_c(const float *v1, const float *v2, int len) { float p = 0.0; @@ -2676,6 +2610,22 @@ } } +static void vector_clip_int32_c(int32_t *dst, const int32_t *src, int32_t min, + int32_t max, unsigned int len) +{ + do { + *dst++ = av_clip(*src++, min, max); + *dst++ = av_clip(*src++, min, max); + *dst++ = av_clip(*src++, min, max); + *dst++ = av_clip(*src++, min, max); + *dst++ = av_clip(*src++, min, max); + *dst++ = av_clip(*src++, min, max); + *dst++ = av_clip(*src++, min, max); + *dst++ = av_clip(*src++, min, max); + len -= 8; + } while (len > 0); +} + #define W0 2048 #define W1 2841 /* 2048*sqrt (2)*cos (1*pi/16) */ #define W2 2676 /* 2048*sqrt (2)*cos (2*pi/16) */ @@ -2828,9 +2778,9 @@ int ff_check_alignment(void){ static int did_fail=0; - DECLARE_ALIGNED(16, int, aligned); + LOCAL_ALIGNED_16(int, aligned, [4]); - if((intptr_t)&aligned & 15){ + if((intptr_t)aligned & 15){ if(!did_fail){ #if HAVE_MMX || HAVE_ALTIVEC av_log(NULL, AV_LOG_ERROR, @@ -2853,44 +2803,28 @@ ff_check_alignment(); #if CONFIG_ENCODERS - if(avctx->dct_algo==FF_DCT_FASTINT) { - c->fdct = fdct_ifast; - c->fdct248 = fdct_ifast248; - } - else if(avctx->dct_algo==FF_DCT_FAAN) { - c->fdct = ff_faandct; - c->fdct248 = ff_faandct248; - } - else { - c->fdct = ff_jpeg_fdct_islow; //slow/accurate/default - c->fdct248 = ff_fdct248_islow; + if (avctx->bits_per_raw_sample == 10) { + c->fdct = ff_jpeg_fdct_islow_10; + c->fdct248 = ff_fdct248_islow_10; + } else { + if(avctx->dct_algo==FF_DCT_FASTINT) { + c->fdct = fdct_ifast; + c->fdct248 = fdct_ifast248; + } + else if(avctx->dct_algo==FF_DCT_FAAN) { + c->fdct = ff_faandct; + c->fdct248 = ff_faandct248; + } + else { + c->fdct = ff_jpeg_fdct_islow_8; //slow/accurate/default + c->fdct248 = ff_fdct248_islow_8; + } } #endif //CONFIG_ENCODERS if(avctx->lowres==1){ - if(avctx->idct_algo==FF_IDCT_INT || avctx->idct_algo==FF_IDCT_AUTO || !CONFIG_H264_DECODER){ - c->idct_put= ff_jref_idct4_put; - c->idct_add= ff_jref_idct4_add; - }else{ - if (avctx->codec_id != CODEC_ID_H264) { - c->idct_put= ff_h264_lowres_idct_put_8_c; - c->idct_add= ff_h264_lowres_idct_add_8_c; - } else { - switch (avctx->bits_per_raw_sample) { - case 9: - c->idct_put= ff_h264_lowres_idct_put_9_c; - c->idct_add= ff_h264_lowres_idct_add_9_c; - break; - case 10: - c->idct_put= ff_h264_lowres_idct_put_10_c; - c->idct_add= ff_h264_lowres_idct_add_10_c; - break; - default: - c->idct_put= ff_h264_lowres_idct_put_8_c; - c->idct_add= ff_h264_lowres_idct_add_8_c; - } - } - } + c->idct_put= ff_jref_idct4_put; + c->idct_add= ff_jref_idct4_add; c->idct = j_rev_dct4; c->idct_permutation_type= FF_NO_IDCT_PERM; }else if(avctx->lowres==2){ @@ -2904,6 +2838,12 @@ c->idct = j_rev_dct1; c->idct_permutation_type= FF_NO_IDCT_PERM; }else{ + if (avctx->bits_per_raw_sample == 10) { + c->idct_put = ff_simple_idct_put_10; + c->idct_add = ff_simple_idct_add_10; + c->idct = ff_simple_idct_10; + c->idct_permutation_type = FF_NO_IDCT_PERM; + } else { if(avctx->idct_algo==FF_IDCT_INT){ c->idct_put= ff_jref_idct_put; c->idct_add= ff_jref_idct_add; @@ -2928,24 +2868,18 @@ }else if(CONFIG_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) { c->idct_put= ff_ea_idct_put_c; c->idct_permutation_type= FF_NO_IDCT_PERM; - }else if(CONFIG_BINK_DECODER && avctx->idct_algo==FF_IDCT_BINK) { - c->idct = ff_bink_idct_c; - c->idct_add = ff_bink_idct_add_c; - c->idct_put = ff_bink_idct_put_c; - c->idct_permutation_type = FF_NO_IDCT_PERM; }else{ //accurate/default - c->idct_put= ff_simple_idct_put; - c->idct_add= ff_simple_idct_add; - c->idct = ff_simple_idct; + c->idct_put = ff_simple_idct_put_8; + c->idct_add = ff_simple_idct_add_8; + c->idct = ff_simple_idct_8; c->idct_permutation_type= FF_NO_IDCT_PERM; } + } } - c->get_pixels = get_pixels_c; c->diff_pixels = diff_pixels_c; c->put_pixels_clamped = ff_put_pixels_clamped_c; c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_c; - c->put_pixels_nonclamped = put_pixels_nonclamped_c; c->add_pixels_clamped = ff_add_pixels_clamped_c; c->sum_abs_dctelem = sum_abs_dctelem_c; c->gmc1 = gmc1_c; @@ -2955,7 +2889,6 @@ c->fill_block_tab[0] = fill_block16_c; c->fill_block_tab[1] = fill_block8_c; - c->scale_block = scale_block_c; /* TODO [0] 16 [1] 8 */ c->pix_abs[0][0] = pix_abs16_c; @@ -3025,16 +2958,6 @@ #if CONFIG_WMV2_DECODER || CONFIG_VC1_DECODER ff_intrax8dsp_init(c,avctx); #endif -#if CONFIG_RV30_DECODER - ff_rv30dsp_init(c,avctx); -#endif -#if CONFIG_RV40_DECODER - ff_rv40dsp_init(c,avctx); - c->put_rv40_qpel_pixels_tab[0][15] = put_rv40_qpel16_mc33_c; - c->avg_rv40_qpel_pixels_tab[0][15] = avg_rv40_qpel16_mc33_c; - c->put_rv40_qpel_pixels_tab[1][15] = put_rv40_qpel8_mc33_c; - c->avg_rv40_qpel_pixels_tab[1][15] = avg_rv40_qpel8_mc33_c; -#endif c->put_mspel_pixels_tab[0]= ff_put_pixels8x8_c; c->put_mspel_pixels_tab[1]= put_mspel8_mc10_c; @@ -3122,15 +3045,12 @@ c->scalarproduct_int16 = scalarproduct_int16_c; c->scalarproduct_and_madd_int16 = scalarproduct_and_madd_int16_c; c->apply_window_int16 = apply_window_int16_c; + c->vector_clip_int32 = vector_clip_int32_c; c->scalarproduct_float = scalarproduct_float_c; c->butterflies_float = butterflies_float_c; + c->butterflies_float_interleave = butterflies_float_interleave_c; c->vector_fmul_scalar = vector_fmul_scalar_c; - - c->vector_fmul_sv_scalar[0] = vector_fmul_sv_scalar_2_c; - c->vector_fmul_sv_scalar[1] = vector_fmul_sv_scalar_4_c; - - c->sv_fmul_scalar[0] = sv_fmul_scalar_2_c; - c->sv_fmul_scalar[1] = sv_fmul_scalar_4_c; + c->vector_fmac_scalar = vector_fmac_scalar_c; c->shrink[0]= av_image_copy_plane; c->shrink[1]= ff_shrink22; @@ -3172,13 +3092,14 @@ c->PFX ## _pixels_tab[IDX][15] = FUNCC(PFX ## NUM ## _mc33, depth) -#define BIT_DEPTH_FUNCS(depth)\ +#define BIT_DEPTH_FUNCS(depth, dct)\ + c->get_pixels = FUNCC(get_pixels ## dct , depth);\ c->draw_edges = FUNCC(draw_edges , depth);\ c->emulated_edge_mc = FUNC (ff_emulated_edge_mc , depth);\ - c->clear_block = FUNCC(clear_block , depth);\ - c->clear_blocks = FUNCC(clear_blocks , depth);\ - c->add_pixels8 = FUNCC(add_pixels8 , depth);\ - c->add_pixels4 = FUNCC(add_pixels4 , depth);\ + c->clear_block = FUNCC(clear_block ## dct , depth);\ + c->clear_blocks = FUNCC(clear_blocks ## dct , depth);\ + c->add_pixels8 = FUNCC(add_pixels8 ## dct , depth);\ + c->add_pixels4 = FUNCC(add_pixels4 ## dct , depth);\ c->put_no_rnd_pixels_l2[0] = FUNCC(put_no_rnd_pixels16_l2, depth);\ c->put_no_rnd_pixels_l2[1] = FUNCC(put_no_rnd_pixels8_l2 , depth);\ \ @@ -3210,21 +3131,26 @@ dspfunc2(avg_h264_qpel, 1, 8, depth);\ dspfunc2(avg_h264_qpel, 2, 4, depth); - if (avctx->codec_id != CODEC_ID_H264 || avctx->bits_per_raw_sample == 8) { - BIT_DEPTH_FUNCS(8) - } else { - switch (avctx->bits_per_raw_sample) { - case 9: - BIT_DEPTH_FUNCS(9) - break; - case 10: - BIT_DEPTH_FUNCS(10) - break; - default: - av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", avctx->bits_per_raw_sample); - BIT_DEPTH_FUNCS(8) - break; + switch (avctx->bits_per_raw_sample) { + case 9: + if (c->dct_bits == 32) { + BIT_DEPTH_FUNCS(9, _32); + } else { + BIT_DEPTH_FUNCS(9, _16); + } + break; + case 10: + if (c->dct_bits == 32) { + BIT_DEPTH_FUNCS(10, _32); + } else { + BIT_DEPTH_FUNCS(10, _16); } + break; + default: + av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", avctx->bits_per_raw_sample); + case 8: + BIT_DEPTH_FUNCS(8, _16); + break; } @@ -3245,43 +3171,6 @@ c->avg_2tap_qpel_pixels_tab[0][i]= c->avg_h264_qpel_pixels_tab[0][i]; } - c->put_rv30_tpel_pixels_tab[0][0] = c->put_h264_qpel_pixels_tab[0][0]; - c->put_rv30_tpel_pixels_tab[1][0] = c->put_h264_qpel_pixels_tab[1][0]; - c->avg_rv30_tpel_pixels_tab[0][0] = c->avg_h264_qpel_pixels_tab[0][0]; - c->avg_rv30_tpel_pixels_tab[1][0] = c->avg_h264_qpel_pixels_tab[1][0]; - - c->put_rv40_qpel_pixels_tab[0][0] = c->put_h264_qpel_pixels_tab[0][0]; - c->put_rv40_qpel_pixels_tab[1][0] = c->put_h264_qpel_pixels_tab[1][0]; - c->avg_rv40_qpel_pixels_tab[0][0] = c->avg_h264_qpel_pixels_tab[0][0]; - c->avg_rv40_qpel_pixels_tab[1][0] = c->avg_h264_qpel_pixels_tab[1][0]; - - switch(c->idct_permutation_type){ - case FF_NO_IDCT_PERM: - for(i=0; i<64; i++) - c->idct_permutation[i]= i; - break; - case FF_LIBMPEG2_IDCT_PERM: - for(i=0; i<64; i++) - c->idct_permutation[i]= (i & 0x38) | ((i & 6) >> 1) | ((i & 1) << 2); - break; - case FF_SIMPLE_IDCT_PERM: - for(i=0; i<64; i++) - c->idct_permutation[i]= simple_mmx_permutation[i]; - break; - case FF_TRANSPOSE_IDCT_PERM: - for(i=0; i<64; i++) - c->idct_permutation[i]= ((i&7)<<3) | (i>>3); - break; - case FF_PARTTRANS_IDCT_PERM: - for(i=0; i<64; i++) - c->idct_permutation[i]= (i&0x24) | ((i&3)<<3) | ((i>>3)&3); - break; - case FF_SSE2_IDCT_PERM: - for(i=0; i<64; i++) - c->idct_permutation[i]= (i&0x38) | idct_sse2_row_perm[i&7]; - break; - default: - av_log(avctx, AV_LOG_ERROR, "Internal error, IDCT permutation not set\n"); - } + ff_init_scantable_permutation(c->idct_permutation, + c->idct_permutation_type); } - diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dsputil.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dsputil.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dsputil.h 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dsputil.h 2012-01-11 00:34:30.000000000 +0000 @@ -40,8 +40,10 @@ void fdct_ifast (DCTELEM *data); void fdct_ifast248 (DCTELEM *data); -void ff_jpeg_fdct_islow (DCTELEM *data); -void ff_fdct248_islow (DCTELEM *data); +void ff_jpeg_fdct_islow_8(DCTELEM *data); +void ff_jpeg_fdct_islow_10(DCTELEM *data); +void ff_fdct248_islow_8(DCTELEM *data); +void ff_fdct248_islow_10(DCTELEM *data); void j_rev_dct (DCTELEM *data); void j_rev_dct4 (DCTELEM *data); @@ -58,13 +60,13 @@ void ff_h264_idct_add_ ## depth ## _c(uint8_t *dst, DCTELEM *block, int stride);\ void ff_h264_idct8_dc_add_ ## depth ## _c(uint8_t *dst, DCTELEM *block, int stride);\ void ff_h264_idct_dc_add_ ## depth ## _c(uint8_t *dst, DCTELEM *block, int stride);\ -void ff_h264_lowres_idct_add_ ## depth ## _c(uint8_t *dst, int stride, DCTELEM *block);\ -void ff_h264_lowres_idct_put_ ## depth ## _c(uint8_t *dst, int stride, DCTELEM *block);\ void ff_h264_idct_add16_ ## depth ## _c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);\ void ff_h264_idct_add16intra_ ## depth ## _c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);\ void ff_h264_idct8_add4_ ## depth ## _c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);\ +void ff_h264_idct_add8_422_ ## depth ## _c(uint8_t **dest, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);\ void ff_h264_idct_add8_ ## depth ## _c(uint8_t **dest, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);\ void ff_h264_luma_dc_dequant_idct_ ## depth ## _c(DCTELEM *output, DCTELEM *input, int qmul);\ +void ff_h264_chroma422_dc_dequant_idct_ ## depth ## _c(DCTELEM *block, int qmul);\ void ff_h264_chroma_dc_dequant_idct_ ## depth ## _c(DCTELEM *block, int qmul); H264_IDCT( 8) @@ -111,14 +113,15 @@ void ff_vp3_v_loop_filter_c(uint8_t *src, int stride, int *bounding_values); void ff_vp3_h_loop_filter_c(uint8_t *src, int stride, int *bounding_values); -/* Bink functions */ -void ff_bink_idct_c (DCTELEM *block); -void ff_bink_idct_add_c(uint8_t *dest, int linesize, DCTELEM *block); -void ff_bink_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block); - /* EA functions */ void ff_ea_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block); +/* RV40 functions */ +void ff_put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride); +void ff_avg_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride); +void ff_put_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride); +void ff_avg_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride); + /* 1/2^n downscaling functions from imgconvert.c */ void ff_shrink22(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height); void ff_shrink44(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height); @@ -150,7 +153,7 @@ /* add and put pixel (decoding) */ // blocksizes for op_pixels_func are 8x4,8x8 16x8 16x16 -//h for op_pixels_func is limited to {width/2, width} but never larger than 16 and never smaller then 4 +//h for op_pixels_func is limited to {width/2, width} but never larger than 16 and never smaller than 4 typedef void (*op_pixels_func)(uint8_t *block/*align width (8 or 16)*/, const uint8_t *pixels/*align 1*/, int line_size, int h); typedef void (*tpel_mc_func)(uint8_t *block/*align width (8 or 16)*/, const uint8_t *pixels/*align 1*/, int line_size, int w, int h); typedef void (*qpel_mc_func)(uint8_t *dst/*align width (8 or 16)*/, uint8_t *src/*align 1*/, int stride); @@ -183,7 +186,7 @@ } /* motion estimation */ -// h is limited to {width/2, width, 2*width} but never larger than 16 and never smaller then 2 +// h is limited to {width/2, width, 2*width} but never larger than 16 and never smaller than 2 // although currently h<4 is not used as functions with width <8 are neither used nor implemented typedef int (*me_cmp_func)(void /*MpegEncContext*/ *s, uint8_t *blk1/*align width (8 or 16)*/, uint8_t *blk2/*align 1*/, int line_size, int h)/* __attribute__ ((const))*/; @@ -201,6 +204,8 @@ } ScanTable; void ff_init_scantable(uint8_t *, ScanTable *st, const uint8_t *src_scantable); +void ff_init_scantable_permutation(uint8_t *idct_permutation, + int idct_permutation_type); #define EMULATED_EDGE(depth) \ void ff_emulated_edge_mc_ ## depth (uint8_t *buf, const uint8_t *src, int linesize,\ @@ -211,8 +216,6 @@ EMULATED_EDGE(9) EMULATED_EDGE(10) -#define ff_emulated_edge_mc ff_emulated_edge_mc_8 - void ff_add_pixels_clamped_c(const DCTELEM *block, uint8_t *dest, int linesize); void ff_put_pixels_clamped_c(const DCTELEM *block, uint8_t *dest, int linesize); void ff_put_signed_pixels_clamped_c(const DCTELEM *block, uint8_t *dest, int linesize); @@ -221,12 +224,16 @@ * DSPContext. */ typedef struct DSPContext { + /** + * Size of DCT coefficients. + */ + int dct_bits; + /* pixel ops : interface with DCT */ void (*get_pixels)(DCTELEM *block/*align 16*/, const uint8_t *pixels/*align 8*/, int line_size); void (*diff_pixels)(DCTELEM *block/*align 16*/, const uint8_t *s1/*align 8*/, const uint8_t *s2/*align 8*/, int stride); void (*put_pixels_clamped)(const DCTELEM *block/*align 16*/, uint8_t *pixels/*align 8*/, int line_size); void (*put_signed_pixels_clamped)(const DCTELEM *block/*align 16*/, uint8_t *pixels/*align 8*/, int line_size); - void (*put_pixels_nonclamped)(const DCTELEM *block/*align 16*/, uint8_t *pixels/*align 8*/, int line_size); void (*add_pixels_clamped)(const DCTELEM *block/*align 16*/, uint8_t *pixels/*align 8*/, int line_size); void (*add_pixels8)(uint8_t *pixels, DCTELEM *block, int line_size); void (*add_pixels4)(uint8_t *pixels, DCTELEM *block, int line_size); @@ -421,31 +428,16 @@ void (*vector_fmul_scalar)(float *dst, const float *src, float mul, int len); /** - * Multiply a vector of floats by concatenated short vectors of - * floats and by a scalar float. Source and destination vectors - * must overlap exactly or not at all. - * [0]: short vectors of length 2, 8-byte aligned - * [1]: short vectors of length 4, 16-byte aligned - * @param dst output vector, 16-byte aligned + * Multiply a vector of floats by a scalar float and add to + * destination vector. Source and destination vectors must + * overlap exactly or not at all. + * @param dst result vector, 16-byte aligned * @param src input vector, 16-byte aligned - * @param sv array of pointers to short vectors * @param mul scalar value - * @param len number of elements in src and dst, multiple of 4 - */ - void (*vector_fmul_sv_scalar[2])(float *dst, const float *src, - const float **sv, float mul, int len); - /** - * Multiply short vectors of floats by a scalar float, store - * concatenated result. - * [0]: short vectors of length 2, 8-byte aligned - * [1]: short vectors of length 4, 16-byte aligned - * @param dst output vector, 16-byte aligned - * @param sv array of pointers to short vectors - * @param mul scalar value - * @param len number of output elements, multiple of 4 + * @param len length of vector, multiple of 4 */ - void (*sv_fmul_scalar[2])(float *dst, const float **sv, - float mul, int len); + void (*vector_fmac_scalar)(float *dst, const float *src, float mul, + int len); /** * Calculate the scalar product of two vectors of floats. * @param v1 first vector, 16-byte aligned @@ -461,6 +453,23 @@ */ void (*butterflies_float)(float *restrict v1, float *restrict v2, int len); + /** + * Calculate the sum and difference of two vectors of floats and interleave + * results into a separate output vector of floats, with each sum + * positioned before the corresponding difference. + * + * @param dst output vector + * constraints: 16-byte aligned + * @param src0 first input vector + * constraints: 32-byte aligned + * @param src1 second input vector + * constraints: 32-byte aligned + * @param len number of elements in the input + * constraints: multiple of 8 + */ + void (*butterflies_float_interleave)(float *dst, const float *src0, + const float *src1, int len); + /* (I)DCT */ void (*fdct)(DCTELEM *block/* align 16*/); void (*fdct248)(DCTELEM *block/* align 16*/); @@ -489,8 +498,8 @@ * with the zigzag/alternate scan
* an example to avoid confusion: * - (->decode coeffs -> zigzag reorder -> dequant -> reference idct ->...) - * - (x -> referece dct -> reference idct -> x) - * - (x -> referece dct -> simple_mmx_perm = idct_permutation -> simple_idct_mmx -> x) + * - (x -> reference dct -> reference idct -> x) + * - (x -> reference dct -> simple_mmx_perm = idct_permutation -> simple_idct_mmx -> x) * - (->decode coeffs -> zigzag reorder -> simple_mmx_perm -> dequant -> simple_idct_mmx ->...) */ uint8_t idct_permutation[64]; @@ -555,19 +564,23 @@ void (*apply_window_int16)(int16_t *output, const int16_t *input, const int16_t *window, unsigned int len); - /* rv30 functions */ - qpel_mc_func put_rv30_tpel_pixels_tab[4][16]; - qpel_mc_func avg_rv30_tpel_pixels_tab[4][16]; - - /* rv40 functions */ - qpel_mc_func put_rv40_qpel_pixels_tab[4][16]; - qpel_mc_func avg_rv40_qpel_pixels_tab[4][16]; - h264_chroma_mc_func put_rv40_chroma_pixels_tab[3]; - h264_chroma_mc_func avg_rv40_chroma_pixels_tab[3]; + /** + * Clip each element in an array of int32_t to a given minimum and maximum value. + * @param dst destination array + * constraints: 16-byte aligned + * @param src source array + * constraints: 16-byte aligned + * @param min minimum value + * constraints: must in the the range [-(1<<24), 1<<24] + * @param max maximum value + * constraints: must in the the range [-(1<<24), 1<<24] + * @param len number of elements in the array + * constraints: multiple of 32 greater than zero + */ + void (*vector_clip_int32)(int32_t *dst, const int32_t *src, int32_t min, + int32_t max, unsigned int len); - /* bink functions */ op_fill_func fill_block_tab[2]; - void (*scale_block)(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align 8*/, int linesize); } DSPContext; void dsputil_static_init(void); @@ -641,8 +654,6 @@ void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx); void ff_dsputil_init_dwt(DSPContext *c); -void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx); -void ff_rv40dsp_init(DSPContext* c, AVCodecContext *avctx); void ff_intrax8dsp_init(DSPContext* c, AVCodecContext *avctx); void ff_mlp_init(DSPContext* c, AVCodecContext *avctx); void ff_mlp_init_x86(DSPContext* c, AVCodecContext *avctx); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dsputil_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dsputil_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dsputil_template.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dsputil_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,7 +27,7 @@ * DSP utils */ -#include "high_bit_depth.h" +#include "bit_depth_template.c" static inline void FUNC(copy_block2)(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride, int h) { @@ -192,187 +192,89 @@ } } -static void FUNCC(add_pixels8)(uint8_t *restrict _pixels, DCTELEM *_block, int line_size) -{ - int i; - pixel *restrict pixels = (pixel *restrict)_pixels; - dctcoef *block = (dctcoef*)_block; - line_size /= sizeof(pixel); - - for(i=0;i<8;i++) { - pixels[0] += block[0]; - pixels[1] += block[1]; - pixels[2] += block[2]; - pixels[3] += block[3]; - pixels[4] += block[4]; - pixels[5] += block[5]; - pixels[6] += block[6]; - pixels[7] += block[7]; - pixels += line_size; - block += 8; - } +#define DCTELEM_FUNCS(dctcoef, suffix) \ +static void FUNCC(get_pixels ## suffix)(DCTELEM *restrict _block, \ + const uint8_t *_pixels, \ + int line_size) \ +{ \ + const pixel *pixels = (const pixel *) _pixels; \ + dctcoef *restrict block = (dctcoef *) _block; \ + int i; \ + \ + /* read the pixels */ \ + for(i=0;i<8;i++) { \ + block[0] = pixels[0]; \ + block[1] = pixels[1]; \ + block[2] = pixels[2]; \ + block[3] = pixels[3]; \ + block[4] = pixels[4]; \ + block[5] = pixels[5]; \ + block[6] = pixels[6]; \ + block[7] = pixels[7]; \ + pixels += line_size / sizeof(pixel); \ + block += 8; \ + } \ +} \ + \ +static void FUNCC(add_pixels8 ## suffix)(uint8_t *restrict _pixels, \ + DCTELEM *_block, \ + int line_size) \ +{ \ + int i; \ + pixel *restrict pixels = (pixel *restrict)_pixels; \ + dctcoef *block = (dctcoef*)_block; \ + line_size /= sizeof(pixel); \ + \ + for(i=0;i<8;i++) { \ + pixels[0] += block[0]; \ + pixels[1] += block[1]; \ + pixels[2] += block[2]; \ + pixels[3] += block[3]; \ + pixels[4] += block[4]; \ + pixels[5] += block[5]; \ + pixels[6] += block[6]; \ + pixels[7] += block[7]; \ + pixels += line_size; \ + block += 8; \ + } \ +} \ + \ +static void FUNCC(add_pixels4 ## suffix)(uint8_t *restrict _pixels, \ + DCTELEM *_block, \ + int line_size) \ +{ \ + int i; \ + pixel *restrict pixels = (pixel *restrict)_pixels; \ + dctcoef *block = (dctcoef*)_block; \ + line_size /= sizeof(pixel); \ + \ + for(i=0;i<4;i++) { \ + pixels[0] += block[0]; \ + pixels[1] += block[1]; \ + pixels[2] += block[2]; \ + pixels[3] += block[3]; \ + pixels += line_size; \ + block += 4; \ + } \ +} \ + \ +static void FUNCC(clear_block ## suffix)(DCTELEM *block) \ +{ \ + memset(block, 0, sizeof(dctcoef)*64); \ +} \ + \ +/** \ + * memset(blocks, 0, sizeof(DCTELEM)*6*64) \ + */ \ +static void FUNCC(clear_blocks ## suffix)(DCTELEM *blocks) \ +{ \ + memset(blocks, 0, sizeof(dctcoef)*6*64); \ } -static void FUNCC(add_pixels4)(uint8_t *restrict _pixels, DCTELEM *_block, int line_size) -{ - int i; - pixel *restrict pixels = (pixel *restrict)_pixels; - dctcoef *block = (dctcoef*)_block; - line_size /= sizeof(pixel); - - for(i=0;i<4;i++) { - pixels[0] += block[0]; - pixels[1] += block[1]; - pixels[2] += block[2]; - pixels[3] += block[3]; - pixels += line_size; - block += 4; - } -} - -#if 0 - -#define PIXOP2(OPNAME, OP) \ -static void OPNAME ## _pixels(uint8_t *block, const uint8_t *pixels, int line_size, int h)\ -{\ - int i;\ - for(i=0; i>1));\ - pixels+=line_size;\ - block +=line_size;\ - }\ -}\ -\ -static void OPNAME ## _pixels_x2_c(uint8_t *block, const uint8_t *pixels, int line_size, int h)\ -{\ - int i;\ - for(i=0; i>1));\ - pixels+=line_size;\ - block +=line_size;\ - }\ -}\ -\ -static void OPNAME ## _no_rnd_pixels_y2_c(uint8_t *block, const uint8_t *pixels, int line_size, int h)\ -{\ - int i;\ - for(i=0; i>1));\ - pixels+=line_size;\ - block +=line_size;\ - }\ -}\ -\ -static void OPNAME ## _pixels_y2_c(uint8_t *block, const uint8_t *pixels, int line_size, int h)\ -{\ - int i;\ - for(i=0; i>1));\ - pixels+=line_size;\ - block +=line_size;\ - }\ -}\ -\ -static void OPNAME ## _pixels_xy2_c(uint8_t *block, const uint8_t *pixels, int line_size, int h)\ -{\ - int i;\ - const uint64_t a= AV_RN64(pixels );\ - const uint64_t b= AV_RN64(pixels+1);\ - uint64_t l0= (a&0x0303030303030303ULL)\ - + (b&0x0303030303030303ULL)\ - + 0x0202020202020202ULL;\ - uint64_t h0= ((a&0xFCFCFCFCFCFCFCFCULL)>>2)\ - + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\ - uint64_t l1,h1;\ -\ - pixels+=line_size;\ - for(i=0; i>2)\ - + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\ - OP(*((uint64_t*)block), h0+h1+(((l0+l1)>>2)&0x0F0F0F0F0F0F0F0FULL));\ - pixels+=line_size;\ - block +=line_size;\ - a= AV_RN64(pixels );\ - b= AV_RN64(pixels+1);\ - l0= (a&0x0303030303030303ULL)\ - + (b&0x0303030303030303ULL)\ - + 0x0202020202020202ULL;\ - h0= ((a&0xFCFCFCFCFCFCFCFCULL)>>2)\ - + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\ - OP(*((uint64_t*)block), h0+h1+(((l0+l1)>>2)&0x0F0F0F0F0F0F0F0FULL));\ - pixels+=line_size;\ - block +=line_size;\ - }\ -}\ -\ -static void OPNAME ## _no_rnd_pixels_xy2_c(uint8_t *block, const uint8_t *pixels, int line_size, int h)\ -{\ - int i;\ - const uint64_t a= AV_RN64(pixels );\ - const uint64_t b= AV_RN64(pixels+1);\ - uint64_t l0= (a&0x0303030303030303ULL)\ - + (b&0x0303030303030303ULL)\ - + 0x0101010101010101ULL;\ - uint64_t h0= ((a&0xFCFCFCFCFCFCFCFCULL)>>2)\ - + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\ - uint64_t l1,h1;\ -\ - pixels+=line_size;\ - for(i=0; i>2)\ - + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\ - OP(*((uint64_t*)block), h0+h1+(((l0+l1)>>2)&0x0F0F0F0F0F0F0F0FULL));\ - pixels+=line_size;\ - block +=line_size;\ - a= AV_RN64(pixels );\ - b= AV_RN64(pixels+1);\ - l0= (a&0x0303030303030303ULL)\ - + (b&0x0303030303030303ULL)\ - + 0x0101010101010101ULL;\ - h0= ((a&0xFCFCFCFCFCFCFCFCULL)>>2)\ - + ((b&0xFCFCFCFCFCFCFCFCULL)>>2);\ - OP(*((uint64_t*)block), h0+h1+(((l0+l1)>>2)&0x0F0F0F0F0F0F0F0FULL));\ - pixels+=line_size;\ - block +=line_size;\ - }\ -}\ -\ -CALL_2X_PIXELS(OPNAME ## _pixels16_c , OPNAME ## _pixels_c , 8*sizeof(pixel))\ -CALL_2X_PIXELS(OPNAME ## _pixels16_x2_c , OPNAME ## _pixels_x2_c , 8*sizeof(pixel))\ -CALL_2X_PIXELS(OPNAME ## _pixels16_y2_c , OPNAME ## _pixels_y2_c , 8*sizeof(pixel))\ -CALL_2X_PIXELS(OPNAME ## _pixels16_xy2_c, OPNAME ## _pixels_xy2_c, 8*sizeof(pixel))\ -CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_x2_c , OPNAME ## _no_rnd_pixels_x2_c , 8*sizeof(pixel))\ -CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_y2_c , OPNAME ## _no_rnd_pixels_y2_c , 8*sizeof(pixel))\ -CALL_2X_PIXELS(OPNAME ## _no_rnd_pixels16_xy2_c, OPNAME ## _no_rnd_pixels_xy2_c, 8*sizeof(pixel)) - -#define op_avg(a, b) a = ( ((a)|(b)) - ((((a)^(b))&0xFEFEFEFEFEFEFEFEULL)>>1) ) -#else // 64 bit variant +DCTELEM_FUNCS(DCTELEM, _16) +#if BIT_DEPTH > 8 +DCTELEM_FUNCS(dctcoef, _32) +#endif #define PIXOP2(OPNAME, OP) \ static void FUNCC(OPNAME ## _pixels2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){\ @@ -749,7 +651,6 @@ CALL_2X_PIXELS(FUNCC(OPNAME ## _no_rnd_pixels16_xy2), FUNCC(OPNAME ## _no_rnd_pixels8_xy2), 8*sizeof(pixel))\ #define op_avg(a, b) a = rnd_avg_pixel4(a, b) -#endif #define op_put(a, b) a = b PIXOP2(avg, op_avg) @@ -1376,16 +1277,3 @@ void FUNCC(ff_avg_pixels16x16)(uint8_t *dst, uint8_t *src, int stride) { FUNCC(avg_pixels16)(dst, src, stride, 16); } - -static void FUNCC(clear_block)(DCTELEM *block) -{ - memset(block, 0, sizeof(dctcoef)*64); -} - -/** - * memset(blocks, 0, sizeof(DCTELEM)*6*64) - */ -static void FUNCC(clear_blocks)(DCTELEM *blocks) -{ - memset(blocks, 0, sizeof(dctcoef)*6*64); -} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvbsub.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvbsub.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvbsub.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvbsub.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * DVB subtitle encoding for ffmpeg + * DVB subtitle encoding * Copyright (c) 2005 Fabrice Bellard * * This file is part of Libav. @@ -403,11 +403,10 @@ } AVCodec ff_dvbsub_encoder = { - "dvbsub", - AVMEDIA_TYPE_SUBTITLE, - CODEC_ID_DVB_SUBTITLE, - sizeof(DVBSubtitleContext), - NULL, - dvbsub_encode, + .name = "dvbsub", + .type = AVMEDIA_TYPE_SUBTITLE, + .id = CODEC_ID_DVB_SUBTITLE, + .priv_data_size = sizeof(DVBSubtitleContext), + .encode = dvbsub_encode, .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvbsubdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvbsubdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvbsubdec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvbsubdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * DVB subtitle decoding for ffmpeg + * DVB subtitle decoding * Copyright (c) 2005 Ian Caulfield * * This file is part of Libav. @@ -1464,13 +1464,12 @@ AVCodec ff_dvbsub_decoder = { - "dvbsub", - AVMEDIA_TYPE_SUBTITLE, - CODEC_ID_DVB_SUBTITLE, - sizeof(DVBSubContext), - dvbsub_init_decoder, - NULL, - dvbsub_close_decoder, - dvbsub_decode, + .name = "dvbsub", + .type = AVMEDIA_TYPE_SUBTITLE, + .id = CODEC_ID_DVB_SUBTITLE, + .priv_data_size = sizeof(DVBSubContext), + .init = dvbsub_init_decoder, + .close = dvbsub_close_decoder, + .decode = dvbsub_decode, .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvbsub_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvbsub_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvbsub_parser.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvbsub_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -172,9 +172,9 @@ } AVCodecParser ff_dvbsub_parser = { - { CODEC_ID_DVB_SUBTITLE }, - sizeof(DVBSubParseContext), - dvbsub_parse_init, - dvbsub_parse, - dvbsub_parse_close, + .codec_ids = { CODEC_ID_DVB_SUBTITLE }, + .priv_data_size = sizeof(DVBSubParseContext), + .parser_init = dvbsub_parse_init, + .parser_parse = dvbsub_parse, + .parser_close = dvbsub_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dv.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dv.c 2012-01-11 00:34:30.000000000 +0000 @@ -37,7 +37,7 @@ * @file * DV codec. */ -#define ALT_BITSTREAM_READER + #include "libavutil/pixdesc.h" #include "avcodec.h" #include "dsputil.h" @@ -349,7 +349,7 @@ static av_cold int dvvideo_init_encoder(AVCodecContext *avctx) { - if (!ff_dv_codec_profile(avctx)) { + if (!avpriv_dv_codec_profile(avctx)) { av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video\n", avctx->width, avctx->height, av_get_pix_fmt_name(avctx->pix_fmt)); return -1; @@ -364,13 +364,12 @@ uint8_t pos; /* position in block */ void (*idct_put)(uint8_t *dest, int line_size, DCTELEM *block); uint8_t partial_bit_count; - uint16_t partial_bit_buffer; + uint32_t partial_bit_buffer; int shift_offset; } BlockInfo; /* bit budget for AC only in 5 MBs */ static const int vs_total_ac_bits = (100 * 4 + 68*2) * 5; -/* see dv_88_areas and dv_248_areas for details */ static const int mb_area_start[5] = { 1, 6, 21, 43, 64 }; static inline int put_bits_left(PutBitContext* s) @@ -378,7 +377,7 @@ return (s->buf_end - s->buf) * 8 - put_bits_count(s); } -/* decode ac coefficients */ +/* decode AC coefficients */ static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block) { int last_index = gb->size_in_bits; @@ -391,10 +390,9 @@ OPEN_READER(re, gb); UPDATE_CACHE(re, gb); - /* if we must parse a partial vlc, we do it here */ + /* if we must parse a partial VLC, we do it here */ if (partial_bit_count > 0) { - re_cache = ((unsigned)re_cache >> partial_bit_count) | - (mb->partial_bit_buffer << (sizeof(re_cache) * 8 - partial_bit_count)); + re_cache = re_cache >> partial_bit_count | mb->partial_bit_buffer; re_index -= partial_bit_count; mb->partial_bit_count = 0; } @@ -417,7 +415,7 @@ if (re_index + vlc_len > last_index) { /* should be < 16 bits otherwise a codeword could have been parsed */ mb->partial_bit_count = last_index - re_index; - mb->partial_bit_buffer = NEG_USR32(re_cache, mb->partial_bit_count); + mb->partial_bit_buffer = re_cache & ~(-1u >> mb->partial_bit_count); re_index = last_index; break; } @@ -476,8 +474,8 @@ GetBitContext gb; BlockInfo mb_data[5 * DV_MAX_BPM], *mb, *mb1; LOCAL_ALIGNED_16(DCTELEM, sblock, [5*DV_MAX_BPM], [64]); - LOCAL_ALIGNED_16(uint8_t, mb_bit_buffer, [80 + 4]); /* allow some slack */ - LOCAL_ALIGNED_16(uint8_t, vs_bit_buffer, [5 * 80 + 4]); /* allow some slack */ + LOCAL_ALIGNED_16(uint8_t, mb_bit_buffer, [ 80 + FF_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */ + LOCAL_ALIGNED_16(uint8_t, vs_bit_buffer, [5*80 + FF_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */ const int log2_blocksize = 3-s->avctx->lowres; int is_field_mode[5]; @@ -486,7 +484,7 @@ memset(sblock, 0, 5*DV_MAX_BPM*sizeof(*sblock)); - /* pass 1 : read DC and AC coefficients in blocks */ + /* pass 1: read DC and AC coefficients in blocks */ buf_ptr = &s->buf[work_chunk->buf_offset*80]; block1 = &sblock[0][0]; mb1 = mb_data; @@ -503,7 +501,7 @@ last_index = s->sys->block_sizes[j]; init_get_bits(&gb, buf_ptr, last_index); - /* get the dc */ + /* get the DC */ dc = get_sbits(&gb, 9); dct_mode = get_bits1(&gb); class1 = get_bits(&gb, 2); @@ -530,7 +528,7 @@ av_dlog(avctx, "MB block: %d, %d ", mb_index, j); dv_decode_ac(&gb, mb, block); - /* write the remaining bits in a new buffer only if the + /* write the remaining bits in a new buffer only if the block is finished */ if (mb->pos >= 64) bit_copy(&pb, &gb); @@ -539,11 +537,12 @@ mb++; } - /* pass 2 : we can do it just after */ + /* pass 2: we can do it just after */ av_dlog(avctx, "***pass 2 size=%d MB#=%d\n", put_bits_count(&pb), mb_index); block = block1; mb = mb1; init_get_bits(&gb, mb_bit_buffer, put_bits_count(&pb)); + put_bits32(&pb, 0); // padding must be zeroed flush_put_bits(&pb); for (j = 0; j < s->sys->bpm; j++, block += 64, mb++) { if (mb->pos < 64 && get_bits_left(&gb) > 0) { @@ -559,11 +558,12 @@ bit_copy(&vs_pb, &gb); } - /* we need a pass other the whole video segment */ + /* we need a pass over the whole video segment */ av_dlog(avctx, "***pass 3 size=%d\n", put_bits_count(&vs_pb)); block = &sblock[0][0]; mb = mb_data; init_get_bits(&gb, vs_bit_buffer, put_bits_count(&vs_pb)); + put_bits32(&vs_pb, 0); // padding must be zeroed flush_put_bits(&vs_pb); for (mb_index = 0; mb_index < 5; mb_index++) { for (j = 0; j < s->sys->bpm; j++) { @@ -640,7 +640,7 @@ } #if CONFIG_SMALL -/* Converts run and level (where level != 0) pair into vlc, returning bit size */ +/* Converts run and level (where level != 0) pair into VLC, returning bit size */ static av_always_inline int dv_rl2vlc(int run, int level, int sign, uint32_t* vlc) { int size; @@ -757,7 +757,7 @@ if (ps > 0) { int is = s->ildct_cmp(NULL, data , NULL, linesize<<1, 4) + s->ildct_cmp(NULL, data + linesize, NULL, linesize<<1, 4); - return (ps > is); + return ps > is; } } @@ -817,7 +817,7 @@ if (level + 15 > 30U) { bi->sign[i] = (level >> 31) & 1; - /* weigh it and and shift down into range, adding for rounding */ + /* weight it and and shift down into range, adding for rounding */ /* the extra division by a factor of 2^4 reverses the 8x expansion of the DCT AND the 2x doubling of the weights */ level = (FFABS(level) * weight[i] + (1 << (dv_weight_bits+3))) >> (dv_weight_bits+4); @@ -1071,7 +1071,7 @@ const uint8_t* vsc_pack; int apt, is16_9; - s->sys = ff_dv_frame_profile(s->sys, buf, buf_size); + s->sys = avpriv_dv_frame_profile(s->sys, buf, buf_size); if (!s->sys || buf_size < s->sys->frame_size || dv_init_dynamic_tables(s->sys)) { av_log(avctx, AV_LOG_ERROR, "could not find dv frame profile\n"); return -1; /* NOTE: we only accept several full frames */ @@ -1244,7 +1244,7 @@ { DVVideoContext *s = c->priv_data; - s->sys = ff_dv_codec_profile(c); + s->sys = avpriv_dv_codec_profile(c); if (!s->sys || buf_size < s->sys->frame_size || dv_init_dynamic_tables(s->sys)) return -1; @@ -1278,12 +1278,12 @@ #if CONFIG_DVVIDEO_ENCODER AVCodec ff_dvvideo_encoder = { - "dvvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_DVVIDEO, - sizeof(DVVideoContext), - dvvideo_init_encoder, - dvvideo_encode_frame, + .name = "dvvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_DVVIDEO, + .priv_data_size = sizeof(DVVideoContext), + .init = dvvideo_init_encoder, + .encode = dvvideo_encode_frame, .capabilities = CODEC_CAP_SLICE_THREADS, .pix_fmts = (const enum PixelFormat[]) {PIX_FMT_YUV411P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), @@ -1292,16 +1292,14 @@ #if CONFIG_DVVIDEO_DECODER AVCodec ff_dvvideo_decoder = { - "dvvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_DVVIDEO, - sizeof(DVVideoContext), - dvvideo_init, - NULL, - dvvideo_close, - dvvideo_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_SLICE_THREADS, - NULL, + .name = "dvvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_DVVIDEO, + .priv_data_size = sizeof(DVVideoContext), + .init = dvvideo_init, + .close = dvvideo_close, + .decode = dvvideo_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_SLICE_THREADS, .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvdata.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvdata.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvdata.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvdata.c 2012-01-11 00:34:30.000000000 +0000 @@ -245,7 +245,7 @@ } }; -const DVprofile* ff_dv_frame_profile(const DVprofile *sys, +const DVprofile* avpriv_dv_frame_profile(const DVprofile *sys, const uint8_t* frame, unsigned buf_size) { int i; @@ -270,7 +270,7 @@ return NULL; } -const DVprofile* ff_dv_codec_profile(AVCodecContext* codec) +const DVprofile* avpriv_dv_codec_profile(AVCodecContext* codec) { int i; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvdata.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvdata.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvdata.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvdata.h 2012-01-11 00:34:30.000000000 +0000 @@ -274,9 +274,9 @@ */ #define DV_MAX_BPM 8 -const DVprofile* ff_dv_frame_profile(const DVprofile *sys, - const uint8_t* frame, unsigned buf_size); -const DVprofile* ff_dv_codec_profile(AVCodecContext* codec); +const DVprofile* avpriv_dv_frame_profile(const DVprofile *sys, + const uint8_t* frame, unsigned buf_size); +const DVprofile* avpriv_dv_codec_profile(AVCodecContext* codec); static inline int dv_write_dif_id(enum dv_section_type t, uint8_t chan_num, uint8_t seq_num, uint8_t dif_num, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvdsubdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvdsubdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvdsubdec.c 2011-05-25 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvdsubdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * DVD subtitle decoding for ffmpeg + * DVD subtitle decoding * Copyright (c) 2005 Fabrice Bellard * * This file is part of Libav. @@ -487,13 +487,9 @@ } AVCodec ff_dvdsub_decoder = { - "dvdsub", - AVMEDIA_TYPE_SUBTITLE, - CODEC_ID_DVD_SUBTITLE, - 0, - NULL, - NULL, - NULL, - dvdsub_decode, + .name = "dvdsub", + .type = AVMEDIA_TYPE_SUBTITLE, + .id = CODEC_ID_DVD_SUBTITLE, + .decode = dvdsub_decode, .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvdsubenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvdsubenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvdsubenc.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvdsubenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * DVD subtitle encoding for ffmpeg + * DVD subtitle encoding * Copyright (c) 2005 Wolfram Gloger * * This file is part of Libav. @@ -216,11 +216,9 @@ } AVCodec ff_dvdsub_encoder = { - "dvdsub", - AVMEDIA_TYPE_SUBTITLE, - CODEC_ID_DVD_SUBTITLE, - 0, - NULL, - dvdsub_encode, + .name = "dvdsub", + .type = AVMEDIA_TYPE_SUBTITLE, + .id = CODEC_ID_DVD_SUBTITLE, + .encode = dvdsub_encode, .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvdsub_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvdsub_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dvdsub_parser.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dvdsub_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * DVD subtitle decoding for ffmpeg + * DVD subtitle decoding * Copyright (c) 2005 Fabrice Bellard * * This file is part of Libav. @@ -77,9 +77,9 @@ } AVCodecParser ff_dvdsub_parser = { - { CODEC_ID_DVD_SUBTITLE }, - sizeof(DVDSubParseContext), - dvdsub_parse_init, - dvdsub_parse, - dvdsub_parse_close, + .codec_ids = { CODEC_ID_DVD_SUBTITLE }, + .priv_data_size = sizeof(DVDSubParseContext), + .parser_init = dvdsub_parse_init, + .parser_parse = dvdsub_parse, + .parser_close = dvdsub_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxa.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxa.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxa.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxa.c 2012-01-11 00:34:30.000000000 +0000 @@ -318,15 +318,14 @@ } AVCodec ff_dxa_decoder = { - "dxa", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_DXA, - sizeof(DxaDecContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "dxa", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_DXA, + .priv_data_size = sizeof(DxaDecContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Feeble Files/ScummVM DXA"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxtory.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxtory.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxtory.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxtory.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * Dxtory decoder + * + * Copyright (c) 2011 Konstantin Shishkov + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "avcodec.h" +#include "libavutil/intreadwrite.h" + +static av_cold int decode_init(AVCodecContext *avctx) +{ + avctx->pix_fmt = PIX_FMT_YUV420P; + avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) + return AVERROR(ENOMEM); + + return 0; +} + +static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, + AVPacket *avpkt) +{ + int h, w; + AVFrame *pic = avctx->coded_frame; + const uint8_t *src = avpkt->data; + uint8_t *Y1, *Y2, *U, *V; + int ret; + + if (pic->data[0]) + avctx->release_buffer(avctx, pic); + + if (avpkt->size < avctx->width * avctx->height * 3 / 2 + 16) { + av_log(avctx, AV_LOG_ERROR, "packet too small\n"); + return AVERROR_INVALIDDATA; + } + + pic->reference = 0; + if ((ret = avctx->get_buffer(avctx, pic)) < 0) + return ret; + + pic->pict_type = AV_PICTURE_TYPE_I; + pic->key_frame = 1; + + if (AV_RL32(src) != 0x01000002) { + av_log_ask_for_sample(avctx, "Unknown frame header %X\n", AV_RL32(src)); + return AVERROR_PATCHWELCOME; + } + src += 16; + + Y1 = pic->data[0]; + Y2 = pic->data[0] + pic->linesize[0]; + U = pic->data[1]; + V = pic->data[2]; + for (h = 0; h < avctx->height; h += 2) { + for (w = 0; w < avctx->width; w += 2) { + AV_WN16A(Y1 + w, AV_RN16A(src)); + AV_WN16A(Y2 + w, AV_RN16A(src + 2)); + U[w >> 1] = src[4] + 0x80; + V[w >> 1] = src[5] + 0x80; + src += 6; + } + Y1 += pic->linesize[0] << 1; + Y2 += pic->linesize[0] << 1; + U += pic->linesize[1]; + V += pic->linesize[2]; + } + + *data_size = sizeof(AVFrame); + *(AVFrame*)data = *pic; + + return avpkt->size; +} + +static av_cold int decode_close(AVCodecContext *avctx) +{ + AVFrame *pic = avctx->coded_frame; + if (pic->data[0]) + avctx->release_buffer(avctx, pic); + av_freep(&avctx->coded_frame); + + return 0; +} + +AVCodec ff_dxtory_decoder = { + .name = "dxtory", + .long_name = NULL_IF_CONFIG_SMALL("Dxtory"), + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_DXTORY, + .init = decode_init, + .close = decode_close, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxva2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxva2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxva2.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxva2.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,7 +24,7 @@ void *ff_dxva2_get_surface(const Picture *picture) { - return picture->data[3]; + return picture->f.data[3]; } unsigned ff_dxva2_get_surface_index(const struct dxva_context *ctx, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxva2.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxva2.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxva2.h 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxva2.h 2012-01-11 00:34:30.000000000 +0000 @@ -25,8 +25,11 @@ #include +#include #include +#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards + /** * This structure is used to provides the necessary configurations and data * to the DXVA2 Libav HWAccel implementation. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxva2_h264.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxva2_h264.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxva2_h264.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxva2_h264.c 2012-01-11 00:34:30.000000000 +0000 @@ -70,15 +70,15 @@ ff_dxva2_get_surface_index(ctx, r), r->long_ref != 0); - if ((r->reference & PICT_TOP_FIELD) && r->field_poc[0] != INT_MAX) + if ((r->f.reference & PICT_TOP_FIELD) && r->field_poc[0] != INT_MAX) pp->FieldOrderCntList[i][0] = r->field_poc[0]; - if ((r->reference & PICT_BOTTOM_FIELD) && r->field_poc[1] != INT_MAX) + if ((r->f.reference & PICT_BOTTOM_FIELD) && r->field_poc[1] != INT_MAX) pp->FieldOrderCntList[i][1] = r->field_poc[1]; pp->FrameNumList[i] = r->long_ref ? r->pic_id : r->frame_num; - if (r->reference & PICT_TOP_FIELD) + if (r->f.reference & PICT_TOP_FIELD) pp->UsedForReferenceFlags |= 1 << (2*i + 0); - if (r->reference & PICT_BOTTOM_FIELD) + if (r->f.reference & PICT_BOTTOM_FIELD) pp->UsedForReferenceFlags |= 1 << (2*i + 1); } else { pp->RefFrameList[i].bPicEntry = 0xff; @@ -113,7 +113,10 @@ pp->bit_depth_luma_minus8 = h->sps.bit_depth_luma - 8; pp->bit_depth_chroma_minus8 = h->sps.bit_depth_chroma - 8; - pp->Reserved16Bits = 3; /* FIXME is there a way to detect the right mode ? */ + if (ctx->workaround & FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG) + pp->Reserved16Bits = 0; + else + pp->Reserved16Bits = 3; /* FIXME is there a way to detect the right mode ? */ pp->StatusReportFeedbackNumber = 1 + ctx->report_id++; pp->CurrFieldOrderCnt[0] = 0; if ((s->picture_structure & PICT_TOP_FIELD) && @@ -150,17 +153,29 @@ //pp->SliceGroupMap[810]; /* XXX not implemented by Libav */ } -static void fill_scaling_lists(const H264Context *h, DXVA_Qmatrix_H264 *qm) +static void fill_scaling_lists(struct dxva_context *ctx, const H264Context *h, DXVA_Qmatrix_H264 *qm) { unsigned i, j; memset(qm, 0, sizeof(*qm)); - for (i = 0; i < 6; i++) - for (j = 0; j < 16; j++) - qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][zigzag_scan[j]]; - - for (i = 0; i < 2; i++) - for (j = 0; j < 64; j++) - qm->bScalingLists8x8[i][j] = h->pps.scaling_matrix8[i][ff_zigzag_direct[j]]; + if (ctx->workaround & FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG) { + for (i = 0; i < 6; i++) + for (j = 0; j < 16; j++) + qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][j]; + + for (i = 0; i < 64; i++) { + qm->bScalingLists8x8[0][i] = h->pps.scaling_matrix8[0][i]; + qm->bScalingLists8x8[1][i] = h->pps.scaling_matrix8[3][i]; + } + } else { + for (i = 0; i < 6; i++) + for (j = 0; j < 16; j++) + qm->bScalingLists4x4[i][j] = h->pps.scaling_matrix4[i][zigzag_scan[j]]; + + for (i = 0; i < 64; i++) { + qm->bScalingLists8x8[0][i] = h->pps.scaling_matrix8[0][ff_zigzag_direct[i]]; + qm->bScalingLists8x8[1][i] = h->pps.scaling_matrix8[3][ff_zigzag_direct[i]]; + } + } } static int is_slice_short(struct dxva_context *ctx) @@ -216,7 +231,7 @@ unsigned plane; fill_picture_entry(&slice->RefPicList[list][i], ff_dxva2_get_surface_index(ctx, r), - r->reference == PICT_BOTTOM_FIELD); + r->f.reference == PICT_BOTTOM_FIELD); for (plane = 0; plane < 3; plane++) { int w, o; if (plane == 0 && h->luma_weight_flag[list]) { @@ -265,7 +280,7 @@ const unsigned mb_count = s->mb_width * s->mb_height; struct dxva_context *ctx = avctx->hwaccel_context; const Picture *current_picture = h->s.current_picture_ptr; - struct dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private; + struct dxva2_picture_context *ctx_pic = current_picture->f.hwaccel_picture_private; DXVA_Slice_H264_Short *slice = NULL; uint8_t *dxva_data, *current, *end; unsigned dxva_size; @@ -360,7 +375,7 @@ { const H264Context *h = avctx->priv_data; struct dxva_context *ctx = avctx->hwaccel_context; - struct dxva2_picture_context *ctx_pic = h->s.current_picture_ptr->hwaccel_picture_private; + struct dxva2_picture_context *ctx_pic = h->s.current_picture_ptr->f.hwaccel_picture_private; if (!ctx->decoder || !ctx->cfg || ctx->surface_count <= 0) return -1; @@ -370,7 +385,7 @@ fill_picture_parameters(ctx, h, &ctx_pic->pp); /* Fill up DXVA_Qmatrix_H264 */ - fill_scaling_lists(h, &ctx_pic->qm); + fill_scaling_lists(ctx, h, &ctx_pic->qm); ctx_pic->slice_count = 0; ctx_pic->bitstream_size = 0; @@ -384,7 +399,7 @@ const H264Context *h = avctx->priv_data; struct dxva_context *ctx = avctx->hwaccel_context; const Picture *current_picture = h->s.current_picture_ptr; - struct dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private; + struct dxva2_picture_context *ctx_pic = current_picture->f.hwaccel_picture_private; unsigned position; if (ctx_pic->slice_count >= MAX_SLICES) @@ -413,7 +428,7 @@ H264Context *h = avctx->priv_data; MpegEncContext *s = &h->s; struct dxva2_picture_context *ctx_pic = - h->s.current_picture_ptr->hwaccel_picture_private; + h->s.current_picture_ptr->f.hwaccel_picture_private; if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0) return -1; @@ -428,7 +443,6 @@ .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_H264, .pix_fmt = PIX_FMT_DXVA2_VLD, - .capabilities = 0, .start_frame = start_frame, .decode_slice = decode_slice, .end_frame = end_frame, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxva2_mpeg2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxva2_mpeg2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxva2_mpeg2.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxva2_mpeg2.c 2012-01-11 00:34:30.000000000 +0000 @@ -151,7 +151,7 @@ const struct MpegEncContext *s = avctx->priv_data; struct dxva_context *ctx = avctx->hwaccel_context; struct dxva2_picture_context *ctx_pic = - s->current_picture_ptr->hwaccel_picture_private; + s->current_picture_ptr->f.hwaccel_picture_private; const int is_field = s->picture_structure != PICT_FRAME; const unsigned mb_count = s->mb_width * (s->mb_height >> is_field); uint8_t *dxva_data, *current, *end; @@ -210,7 +210,7 @@ const struct MpegEncContext *s = avctx->priv_data; struct dxva_context *ctx = avctx->hwaccel_context; struct dxva2_picture_context *ctx_pic = - s->current_picture_ptr->hwaccel_picture_private; + s->current_picture_ptr->f.hwaccel_picture_private; if (!ctx->decoder || !ctx->cfg || ctx->surface_count <= 0) return -1; @@ -230,7 +230,7 @@ { const struct MpegEncContext *s = avctx->priv_data; struct dxva2_picture_context *ctx_pic = - s->current_picture_ptr->hwaccel_picture_private; + s->current_picture_ptr->f.hwaccel_picture_private; unsigned position; if (ctx_pic->slice_count >= MAX_SLICES) @@ -250,7 +250,7 @@ { struct MpegEncContext *s = avctx->priv_data; struct dxva2_picture_context *ctx_pic = - s->current_picture_ptr->hwaccel_picture_private; + s->current_picture_ptr->f.hwaccel_picture_private; if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0) return -1; @@ -265,7 +265,6 @@ .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_MPEG2VIDEO, .pix_fmt = PIX_FMT_DXVA2_VLD, - .capabilities = 0, .start_frame = start_frame, .decode_slice = decode_slice, .end_frame = end_frame, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxva2_vc1.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxva2_vc1.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/dxva2_vc1.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/dxva2_vc1.c 2012-01-11 00:34:30.000000000 +0000 @@ -68,7 +68,7 @@ pp->bPicStructure |= 0x01; if (s->picture_structure & PICT_BOTTOM_FIELD) pp->bPicStructure |= 0x02; - pp->bSecondField = v->interlace && v->fcm != 0x03 && !s->first_field; + pp->bSecondField = v->interlace && v->fcm != ILACE_FIELD && !s->first_field; pp->bPicIntra = s->pict_type == AV_PICTURE_TYPE_I; pp->bPicBackwardPrediction = s->pict_type == AV_PICTURE_TYPE_B; pp->bBidirectionalAveragingMode = (1 << 7) | @@ -100,7 +100,7 @@ (s->resync_marker << 4) | (v->rangered << 3) | (s->max_b_frames ); - pp->bPicExtrapolation = (!v->interlace || v->fcm == 0x00) ? 1 : 2; + pp->bPicExtrapolation = (!v->interlace || v->fcm == PROGRESSIVE) ? 1 : 2; pp->bPicDeblocked = ((v->profile != PROFILE_ADVANCED && v->rangeredfrm) << 5) | (s->loop_filter << 1); pp->bPicDeblockConfined = (v->postprocflag << 7) | @@ -161,7 +161,7 @@ const VC1Context *v = avctx->priv_data; struct dxva_context *ctx = avctx->hwaccel_context; const MpegEncContext *s = &v->s; - struct dxva2_picture_context *ctx_pic = s->current_picture_ptr->hwaccel_picture_private; + struct dxva2_picture_context *ctx_pic = s->current_picture_ptr->f.hwaccel_picture_private; DXVA_SliceInfo *slice = &ctx_pic->si; @@ -213,7 +213,7 @@ { const VC1Context *v = avctx->priv_data; struct dxva_context *ctx = avctx->hwaccel_context; - struct dxva2_picture_context *ctx_pic = v->s.current_picture_ptr->hwaccel_picture_private; + struct dxva2_picture_context *ctx_pic = v->s.current_picture_ptr->f.hwaccel_picture_private; if (!ctx->decoder || !ctx->cfg || ctx->surface_count <= 0) return -1; @@ -231,7 +231,7 @@ { const VC1Context *v = avctx->priv_data; const Picture *current_picture = v->s.current_picture_ptr; - struct dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private; + struct dxva2_picture_context *ctx_pic = current_picture->f.hwaccel_picture_private; if (ctx_pic->bitstream_size > 0) return -1; @@ -252,7 +252,7 @@ static int end_frame(AVCodecContext *avctx) { VC1Context *v = avctx->priv_data; - struct dxva2_picture_context *ctx_pic = v->s.current_picture_ptr->hwaccel_picture_private; + struct dxva2_picture_context *ctx_pic = v->s.current_picture_ptr->f.hwaccel_picture_private; if (ctx_pic->bitstream_size <= 0) return -1; @@ -269,7 +269,6 @@ .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_WMV3, .pix_fmt = PIX_FMT_DXVA2_VLD, - .capabilities = 0, .start_frame = start_frame, .decode_slice = decode_slice, .end_frame = end_frame, @@ -282,7 +281,6 @@ .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_VC1, .pix_fmt = PIX_FMT_DXVA2_VLD, - .capabilities = 0, .start_frame = start_frame, .decode_slice = decode_slice, .end_frame = end_frame, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3_data.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3_data.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3_data.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3_data.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,1134 @@ +/* + * E-AC-3 tables + * Copyright (c) 2007 Bartlomiej Wolowiec + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Tables taken directly from the E-AC-3 spec. + */ + +#include "eac3_data.h" +#include "ac3.h" + +const uint8_t ff_eac3_bits_vs_hebap[20] = { + 0, 2, 3, 4, 5, 7, 8, 9, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, +}; + +/** + * Table E3.6, Gk=1 + * No gain (Gk=1) inverse quantization, remapping scale factors + * ff_eac3_gaq_remap[hebap+8] + */ +const int16_t ff_eac3_gaq_remap_1[12] = { + 4681, 2185, 1057, 520, 258, 129, 64, 32, 16, 8, 2, 0 +}; + +/** + * Table E3.6, Gk=2 & Gk=4, A + * Large mantissa inverse quantization, remapping scale factors + * ff_eac3_gaq_remap_2_4_a[hebap-8][Gk=2,4] + */ +const int16_t ff_eac3_gaq_remap_2_4_a[9][2] = { + { -10923, -4681 }, + { -14043, -6554 }, + { -15292, -7399 }, + { -15855, -7802 }, + { -16124, -7998 }, + { -16255, -8096 }, + { -16320, -8144 }, + { -16352, -8168 }, + { -16368, -8180 } +}; + +/** + * Table E3.6, Gk=2 & Gk=4, B + * Large mantissa inverse quantization, negative mantissa remapping offsets + * ff_eac3_gaq_remap_3_4_b[hebap-8][Gk=2,4] + */ +const int16_t ff_eac3_gaq_remap_2_4_b[9][2] = { + { -5461, -1170 }, + { -11703, -4915 }, + { -14199, -6606 }, + { -15327, -7412 }, + { -15864, -7805 }, + { -16126, -7999 }, + { -16255, -8096 }, + { -16320, -8144 }, + { -16352, -8168 } +}; + +static const int16_t vq_hebap1[4][6] = { +{ 7167, 4739, 1106, 4269, 10412, 4820}, +{ -5702, -3187, -14483, -1392, -2027, 849}, +{ 633, 6199, 7009, -12779, -2306, -2636}, +{ -1468, -7031, 7592, 10617, -5946, -3062}, +}; +static const int16_t vq_hebap2[8][6] = { +{ -12073, 608, -7019, 590, 4000, 869}, +{ 6692, 15689, -6178, -9239, -74, 133}, +{ 1855, -989, 20596, -2920, -4475, 225}, +{ -1194, -3901, -821, -6566, -875, -20298}, +{ -2762, -3181, -4094, -5623, -16945, 9765}, +{ 1547, 6839, 1980, 20233, -1071, -4986}, +{ 6221, -17915, -5516, 6266, 358, 1162}, +{ 3753, -1066, 4283, -3227, 15928, 10186}, +}; +static const int16_t vq_hebap3[16][6] = { +{ -10028, 20779, 10982, -4560, 798, -68}, +{ 11050, 20490, -6617, -5342, -1797, -1631}, +{ 3977, -542, 7118, -1166, 18844, 14678}, +{ -4320, -96, -7295, -492, -22050, -4277}, +{ 2692, 5856, 5530, 21862, -7212, -5325}, +{ -135, -23391, 962, 8115, -644, 382}, +{ -1563, 3400, -3299, 4693, -6892, 22398}, +{ 3535, 3030, 7296, 6214, 20476, -12099}, +{ 57, -6823, 1848, -22349, -5919, 6823}, +{ -821, -3655, -387, -6253, -1735, -22373}, +{ -6046, 1586, -18890, -14392, 9214, 705}, +{ -5716, 264, -17964, 14618, 7921, -337}, +{ -110, 108, 8, 74, -89, -50}, +{ 6612, -1517, 21687, -1658, -7949, -246}, +{ 21667, -6335, -8290, -101, -1349, -22}, +{ -22003, -6476, 7974, 648, 2054, -331}, +}; +static const int16_t vq_hebap4[32][6] = { +{ 6636, -4593, 14173, -17297, -16523, 864}, +{ 3658, 22540, 104, -1763, -84, 6}, +{ 21580, -17815, -7282, -1575, -2078, -320}, +{ -2233, 10017, -2728, 14938, -13640, -17659}, +{ -1564, -17738, -19161, 13735, 2757, 2951}, +{ 4520, 5510, 7393, 10799, 19231, -13770}, +{ 399, 2976, -1099, 5013, -1159, 22095}, +{ 3624, -2359, 4680, -2238, 22702, 3765}, +{ -4201, -8285, -6810, -12390, -18414, 15382}, +{ -5198, -6869, -10047, -8364, -16022, -20562}, +{ -142, -22671, -368, 4391, -464, -13}, +{ 814, -1118, -1089, -22019, 74, 1553}, +{ -1618, 19222, -17642, -13490, 842, -2309}, +{ 4689, 16490, 20813, -15387, -4164, -3968}, +{ -3308, 11214, -13542, 13599, -19473, 13770}, +{ 1817, 854, 21225, -966, -1643, -268}, +{ -2587, -107, -20154, 376, 1174, -304}, +{ -2919, 453, -5390, 750, -22034, -978}, +{ -19012, 16839, 10000, -3580, 2211, 1459}, +{ 1363, -2658, -33, -4067, 1165, -21985}, +{ -8592, -2760, -17520, -15985, 14897, 1323}, +{ 652, -9331, 3253, -14622, 12181, 19692}, +{ -6361, 5773, -15395, 17291, 16590, -2922}, +{ -661, -601, 1609, 22610, 992, -1045}, +{ 4961, 9107, 11225, 7829, 16320, 18627}, +{ -21872, -1433, 138, 1470, -1891, -196}, +{ -19499, -18203, 11056, -516, 2543, -2249}, +{ -1196, -17574, 20150, 11462, -401, 2619}, +{ 4638, -8154, 11891, -15759, 17615, -14955}, +{ -83, 278, 323, 55, -154, 232}, +{ 7788, 1462, 18395, 15296, -15763, -1131}, +}; +static const int16_t vq_hebap5[128][6] = { +{ -3394, -19730, 2963, 9590, 4660, 19673}, +{ -15665, -6405, 17671, 3860, -8232, -19429}, +{ 4467, 412, -17873, -8037, 691, -17307}, +{ 3580, 2363, 6886, 3763, 6379, -20522}, +{ -17230, -14133, -1396, -23939, 8373, -12537}, +{ -8073, -21469, -15638, 3214, 8105, -5965}, +{ 4343, 5169, 2683, -16822, -5146, -16558}, +{ 6348, -10668, 12995, -25500, -22090, 4091}, +{ -2880, -8366, -5968, -17158, -2638, 23132}, +{ -5095, -14281, -22371, 21741, 3689, 2961}, +{ -2443, -17739, 25155, 2707, 1594, 7}, +{ -18379, 9010, 4270, 731, -426, -640}, +{ -23695, 24732, 5642, 612, -308, -964}, +{ -767, 1268, 225, 1635, 173, 916}, +{ 5455, 6493, 4902, 10560, 23041, -17140}, +{ 17219, -21054, -18716, 4936, -3420, 3357}, +{ -1390, 15488, -21946, -14611, 1339, 542}, +{ -6866, -2254, -12070, -3075, -19981, -20622}, +{ -1803, 11775, 1343, 8917, 693, 24497}, +{ -21610, 9462, 4681, 9254, -7815, 15904}, +{ -5559, -3018, -9169, -1347, -22547, 12868}, +{ -366, 5076, -1727, 20427, -283, -2923}, +{ -1886, -6313, -939, -2081, -1399, 3513}, +{ -3161, -537, -5075, 11268, 19396, 989}, +{ 2345, 4153, 5769, -4273, 233, -399}, +{ -21894, -1138, -16474, 5902, 5488, -3211}, +{ 10007, -12530, 18829, 20932, -1158, 1790}, +{ -1165, 5014, -1199, 6415, -8418, -21038}, +{ 1892, -3534, 3815, -5846, 16427, 20288}, +{ -2664, -11627, -4147, -18311, -22710, 14848}, +{ 17256, 10419, 7764, 12040, 18956, 2525}, +{ -21419, -18685, -10897, 4368, -7051, 4539}, +{ -1574, 2050, 5760, 24756, 15983, 17678}, +{ -538, -22867, 11067, 10301, 385, 528}, +{ -8465, -3025, -16357, -23237, 16491, 3654}, +{ 5840, 575, 11890, 1947, 25157, 6653}, +{ 6625, -3516, -1964, 3850, -390, -116}, +{ 18005, 20900, 14323, -7621, -10922, 11802}, +{ -4857, -2932, -13334, -7815, 21622, 2267}, +{ -579, -9431, -748, -21321, 12367, 8265}, +{ -8317, 1375, -17847, 2921, 9062, 22046}, +{ 18398, 8635, -1503, -2418, -18295, -14734}, +{ -2987, 15129, -3331, 22300, 13878, -13639}, +{ 5874, -19026, 15587, 11350, -20738, 1971}, +{ 1581, -6955, -21440, 2455, 65, 414}, +{ 515, -4468, -665, -4672, 125, -19222}, +{ 21495, -20301, -1872, -1926, -211, -1022}, +{ 5189, -12250, -1775, -23550, -4546, 5813}, +{ 321, -6331, 14646, 6975, -1773, 867}, +{ -13814, 3180, 7927, 444, 19552, 3146}, +{ -6660, 12252, -1972, 17408, -24280, -12956}, +{ -745, 14356, -1107, 23742, -9631, -18344}, +{ 18284, -7909, -7531, 19118, 7721, -12659}, +{ 1926, 15101, -12848, 2153, 21631, 1864}, +{ -2130, 23416, 17056, -15597, -1544, 87}, +{ 8314, -11824, 14581, -20591, 7891, -2099}, +{ 19600, 22814, -17304, -2040, 285, -3863}, +{ -8214, -18322, 10724, -13744, -13469, -1666}, +{ 14351, 4880, -20034, 964, -4221, -180}, +{ -24598, -16635, 19724, 5925, 4777, 4414}, +{ -2495, 23493, -16141, 2918, -1038, -2010}, +{ 18974, -2540, 13343, 1405, -6194, -1136}, +{ 2489, 13670, 22638, -7311, -129, -2792}, +{ -13962, 16775, 23012, 728, 3397, 162}, +{ 3038, 993, 8774, -21969, -6609, 910}, +{ -12444, -22386, -2626, -5295, 19520, 9872}, +{ -1911, -18274, -18506, -14962, 4760, 7119}, +{ 8298, -2978, 25886, 7660, -7897, 1020}, +{ 6132, 15127, 18757, -24370, -6529, -6627}, +{ 7924, 12125, -9459, -23962, 5502, 937}, +{ -17056, -5373, 2522, 327, 1129, -390}, +{ 15774, 19955, -10380, 11172, -3107, 14853}, +{ -11904, -8091, -17928, -22287, -17237, -6803}, +{ -12862, -2172, -6509, 5927, 12458, -22355}, +{ -497, 322, 1038, -6643, -5404, 20311}, +{ 1083, -22984, -8494, 12130, -762, 2623}, +{ 5067, 19712, -1901, -30, -325, 85}, +{ 987, -5830, 4212, -9030, 9121, -25038}, +{ -7868, 7284, -12292, 12914, -21592, 20941}, +{ -1630, -7694, -2187, -8525, -5604, -25196}, +{ -6668, 388, -22535, 1526, 9082, 193}, +{ -7867, -22308, 5163, 362, 944, -259}, +{ 3824, -11850, 7591, -23176, 25342, 23771}, +{ -10504, 4123, -21111, 21173, 22439, -838}, +{ -4723, 21795, 6184, -122, 1642, -717}, +{ 24504, 19887, -2043, 986, 7, -55}, +{ -27313, -135, 2437, 259, 89, 307}, +{ 24446, -3873, -5391, -820, -2387, 361}, +{ 5529, 5784, 18682, 242, -21896, -4003}, +{ 22304, 4483, 722, -12242, 7570, 15448}, +{ 8673, 3009, 20437, 21108, -21100, -3080}, +{ -1132, 2705, -1825, 5420, -785, 18532}, +{ 16932, -13517, -16509, -14858, -20327, -14221}, +{ 2219, 1380, 21474, -1128, 327, 83}, +{ -2177, 21517, -3856, -14180, -204, -2191}, +{ 953, -9426, 15874, -10710, -3231, 21030}, +{ -421, -1377, 640, -8239, -20976, 2174}, +{ 4309, 18514, -9100, -18319, -15518, 3704}, +{ -5943, 449, -8387, 1075, -22210, -4992}, +{ 2953, 12788, 18285, 1430, 14937, 21731}, +{ -2913, 401, -4739, -20105, 1699, -1147}, +{ 3449, 5241, 8853, 22134, -7547, 1451}, +{ -2154, 8584, 18120, -15614, 19319, -5991}, +{ 3501, 2841, 5897, 6397, 8630, 23018}, +{ 2467, 2956, 379, 5703, -22047, -2189}, +{ -16963, -594, 18822, -5295, 1640, 774}, +{ 2896, -1424, 3586, -2292, 19910, -1822}, +{ -18575, 21219, -14001, -12573, 16466, 635}, +{ -1998, -19314, -16527, 12208, -16576, -7854}, +{ -9674, 1012, -21645, 2883, -12712, 2321}, +{ -1005, 471, -3629, 8045, -11087, 25533}, +{ 4141, -21472, -2673, 756, -663, -523}, +{ 6490, 8531, 19289, 18949, 6092, -9347}, +{ 16965, 24599, 14024, 10072, -536, -10438}, +{ -8147, 2145, -23028, -17073, 5451, -4401}, +{ -14873, 20520, -18303, -9717, -11885, -17831}, +{ -2290, -14120, 2070, 22467, 1671, 725}, +{ -8538, 14629, 3521, -20577, 6673, 8200}, +{ 20248, 4410, -1366, -585, 1229, -2449}, +{ 7467, -7148, 13667, -8246, 22392, -17320}, +{ -1932, 3875, -9064, -3812, 958, 265}, +{ -4399, 2959, -15911, 19598, 4954, -1105}, +{ 18009, -9923, -18137, -3862, 11178, 5821}, +{ -14596, -1227, 9660, 21619, 11228, -11721}, +{ -721, -1700, 109, -2142, 61, -6772}, +{ -24619, -22520, 5608, -1957, -1761, -1012}, +{ -23728, -4451, -2688, -14679, -4266, 9919}, +{ 8495, -894, 20438, -13820, -17267, 139}, +}; +static const int16_t vq_hebap6[256][6] = { +{ 10154, 7365, 16861, 18681, -22893, -3636}, +{ -2619, -3788, -5529, -5192, -9009, -20298}, +{ -5583, -22800, 21297, 7012, 745, 720}, +{ 428, -1459, 109, -3082, 361, -8403}, +{ 8161, 22401, 241, 1755, -874, -2824}, +{ 1140, 12643, 2306, 22263, -25146, -17557}, +{ -2609, 3379, 10337, -19730, -15468, -23944}, +{ -4040, -12796, -25772, 13096, 3905, 1315}, +{ 4624, -23799, 13608, 25317, -1175, 2173}, +{ -97, 13747, -5122, 23255, 4214, -22145}, +{ 6878, -322, 18264, -854, -11916, -733}, +{ 17280, -12669, -9693, 23563, -16240, -1309}, +{ 5802, -4968, 19526, -21194, -24622, -183}, +{ 5851, -16137, 15229, -9496, -1538, 377}, +{ 14096, 25057, 13419, 8290, 23320, 16818}, +{ -7261, 118, -15867, 19097, 9781, -277}, +{ -4288, 21589, -13288, -16259, 16633, -4862}, +{ 4909, -19217, 23411, 14705, -722, 125}, +{ 19462, -4732, -1928, -11527, 20770, 5425}, +{ -27562, -2881, -4331, 384, -2103, 1367}, +{ -266, -9175, 5441, 26333, -1924, 4221}, +{ -2970, -20170, -21816, 5450, -7426, 5344}, +{ -221, -6696, 603, -9140, 1308, -27506}, +{ 9621, -8380, -1967, 9403, -1651, 22817}, +{ 7566, -5250, -4165, 1385, -990, 560}, +{ -1262, 24738, -19057, 10741, 7585, -7098}, +{ 451, 20130, -9949, -6015, -2188, -1458}, +{ 22249, 9380, 9096, 10959, -2365, -3724}, +{ 18668, -650, -1234, 11092, 7678, 5969}, +{ 19207, -1485, -1076, -731, -684, 43}, +{ -4973, 13430, 20139, 60, 476, -935}, +{ -20029, 8710, 2499, 1016, -1158, 335}, +{ -26413, 18598, -2201, -669, 3409, 793}, +{ -4726, 8875, -24607, -9646, 3643, -283}, +{ 13303, -21404, -3691, -1184, -1970, 1612}, +{ 173, 60, 919, 1229, 6942, -665}, +{ 16377, 16991, 5341, -14015, -2304, -20390}, +{ 25334, -10609, 11947, -7653, -6363, 14058}, +{ 23929, -13259, -7226, -937, 234, -187}, +{ 6311, -1877, 12506, -1879, 18751, -23341}, +{ 621, 6445, 3354, -24274, 8406, 5315}, +{ -3297, -5034, -4704, -5080, -25730, 5347}, +{ -1275, -13295, -965, -23318, 1214, 26259}, +{ -6252, 10035, -20105, 15301, -16073, 5136}, +{ 9562, -3911, -19510, 4745, 22270, -4171}, +{ 7978, -19600, 14024, -5745, -20855, 8939}, +{ 7, -4039, 991, -6065, 52, -19423}, +{ 3485, 2969, 7732, 7786, 25312, 6206}, +{ -959, -12812, -1840, -22743, 7324, 10830}, +{ -4686, 1678, -10172, -5205, 4294, -1271}, +{ 3889, 1302, 7450, 638, 20374, -3133}, +{ -12496, -9123, 18463, -12343, -7238, 18552}, +{ -6185, 8649, -6903, -895, 17109, 16604}, +{ -9896, 28579, 2845, 1640, 2925, -298}, +{ 14968, -25988, 14878, -24012, 1815, -6474}, +{ 26107, 5166, 21225, 15873, 21617, 14825}, +{ -21684, 16438, 20504, -14346, -7114, -4162}, +{ 28647, 90, -1572, 789, -902, -75}, +{ -1479, 2471, -4061, 3612, -2240, 10914}, +{ 8616, 17491, 17255, -17456, 17022, -16357}, +{ -20722, -18597, 25274, 17720, -3573, 1695}, +{ -997, 6129, -6303, 11250, -11359, -19739}, +{ -74, -4001, -1584, 13384, 162, -144}, +{ -529, 21068, 7923, -11396, 422, -26}, +{ 7102, -13531, -20055, 2629, -178, -429}, +{ 9201, 1368, -22238, 2623, -20499, 24889}, +{ -432, 6675, -266, 8723, 80, 28024}, +{ 19493, -3108, -9261, 1910, -21777, 5345}, +{ 14079, -11489, 12604, 6079, 19877, 1315}, +{ 10947, 9837, -18612, 15742, 4792, 605}, +{ -1777, 3758, -4087, 21696, 6024, -576}, +{ 3567, -3578, 16379, 2680, -1752, 716}, +{ -5049, -1399, -4550, -652, -17721, -3366}, +{ -3635, -4372, -6522, -22152, 7382, 1458}, +{ 12242, 19190, 5646, -7815, -20289, 21344}, +{ -7508, 19952, 23542, -9753, 5669, -1990}, +{ -2275, 15438, 10907, -17879, 6497, 13582}, +{ -15894, -15646, -4716, 6019, 24250, -6179}, +{ -2049, -6856, -1208, 918, 17735, -69}, +{ -3721, 9099, -16065, -23621, 5981, -2344}, +{ 7862, -8918, 24033, 25508, -11033, -741}, +{ -12588, 19468, 14649, 15451, -21226, 1171}, +{ 2102, 1147, 2789, 4096, 2179, 8750}, +{ -18214, -17758, -10366, -5203, -1066, -3541}, +{ -2819, -19958, -11921, 6032, 8315, 10374}, +{ -9078, -2100, 19431, -17, 732, -689}, +{ -14512, -19224, -7095, 18727, 1870, 22906}, +{ 3912, 659, 25597, -4006, 9619, 877}, +{ 2616, 22695, -5770, 17920, 3812, 20220}, +{ 2561, 26847, -5245, -10908, 2256, -517}, +{ -4974, 198, -21983, -3608, 22174, -18924}, +{ 21308, -1211, 19144, 16691, -1588, 11390}, +{ -1790, 3959, -3488, 7003, -7107, 20877}, +{ -6108, -17955, -18722, 24763, 16508, 3211}, +{ 20462, -24987, -20361, 4484, -5111, -478}, +{ -6378, -1998, -10229, -561, -22039, -22339}, +{ 3047, -18850, 7586, 14743, -19862, 6351}, +{ -5047, 1405, -9672, 1055, -21881, 11170}, +{ 3481, -9699, 6526, -16655, 22813, 21907}, +{ -18570, 17501, 14664, 1291, 5026, 19676}, +{ 16134, -19810, -16956, -17939, -16933, 5800}, +{ -8224, 4908, 8935, 2272, -1140, -23217}, +{ 1572, 2753, -1598, 2143, -3346, -21926}, +{ -9832, -1060, -27818, 1214, 7289, 150}, +{ 98, 1538, 535, 17429, -23198, -901}, +{ 21340, -20146, 3297, -1744, -8207, -21462}, +{ -4166, -4633, -17902, 5478, 1285, 136}, +{ 18713, 21003, 24818, 11421, 1282, -4618}, +{ -3535, 7636, -265, 2141, -829, -2035}, +{ -3184, 19713, 2775, -2, 1090, 104}, +{ -6771, -20185, 2938, -2125, -36, 1268}, +{ 9560, 9430, 9586, 22100, 13827, 6296}, +{ -535, -20018, 4276, -1868, -448, -17183}, +{ -24352, 14244, -13647, -21040, 2271, 11555}, +{ -2646, 15437, -4589, 18638, -4299, -622}, +{ -20064, 4169, 18115, -1404, 13722, -1825}, +{ -16359, 9080, 744, 22021, 125, 10794}, +{ 9644, -14607, -18479, -14714, 11174, -20754}, +{ -326, -23762, 6144, 7909, 602, 1540}, +{ -6650, 6634, -12683, 21396, 20785, -6839}, +{ 4252, -21043, 5628, 18687, 23860, 8328}, +{ 17986, 5704, -5245, -18093, -555, 3219}, +{ 6091, 14232, -5117, -17456, -19452, -11649}, +{ -21586, 11302, 15434, 25590, 6777, -26683}, +{ 21355, -8244, 5877, -3540, 6079, -2567}, +{ 2603, -2455, 5421, -12286, -19100, 5574}, +{ -1721, -26393, -23664, 22904, -349, 3787}, +{ 2189, -1203, 5340, 3249, -22617, 104}, +{ -1664, -11020, -2857, -20723, -24049, 19900}, +{ 22873, -7345, -18481, -14616, -8400, -12965}, +{ 3777, 3958, 8239, 20494, -6991, -1201}, +{ -160, -1613, -793, -8681, 573, 776}, +{ 4297, -3786, 20373, 6082, -5321, -18400}, +{ 18745, 2463, 12546, -7749, -7734, -2183}, +{ 11074, -4720, 22119, 1825, -24351, 4080}, +{ 1503, -19178, -1569, 13, -313, 375}, +{ 318, -575, 2544, 178, 102, 40}, +{ -15996, -26897, 5008, 3320, 686, 1159}, +{ 25755, 26886, 574, -5930, -3916, 1407}, +{ -9148, -7665, -2875, -8384, -18663, 26400}, +{ -7445, -18040, -18396, 8802, -2252, -21886}, +{ 7851, 11773, 27485, -12847, -1410, 19590}, +{ 2240, 5947, 11247, 15980, -6499, 24280}, +{ 21673, -18515, 9771, 6550, -2730, 334}, +{ -4149, 1576, -11010, 89, -24429, -5710}, +{ 7720, 1478, 21412, -25025, -8385, 9}, +{ -2448, 10218, -12756, -16079, 1161, -21284}, +{ -8757, -14429, -22918, -14812, 2629, 13844}, +{ -7252, 2843, -9639, 2882, -14625, 24497}, +{ -674, -6530, 414, -23333, -21343, 454}, +{ 2104, -6312, 10887, 18087, -1199, 175}, +{ -493, -562, -2739, 118, -1074, 93}, +{ -10011, -4075, -28071, 22180, 15077, -636}, +{ -4637, -16408, -9003, -20418, -11608, -20932}, +{ 4815, 15892, 24238, -13634, -3074, -1059}, +{ -6724, 4610, -18772, -15283, -16685, 23988}, +{ 15349, -674, -3682, 21679, 4475, -12088}, +{ 4756, 2593, 5354, 6001, 15063, 26490}, +{ -23815, -17251, 6944, 378, 694, 670}, +{ 23392, -8839, -14713, 7544, -876, 11088}, +{ 3640, 3336, 22593, -3495, -2328, -113}, +{ 284, 6914, 3097, 10171, 6638, -18621}, +{ 2472, 5976, 11054, -11936, -603, -663}, +{ 16175, 16441, 13164, -4043, 4667, 7431}, +{ 19338, 15534, -6533, 1681, -4857, 17048}, +{ 17027, 532, -19064, -1441, -5130, 1085}, +{ -12617, -17609, 2062, -25332, 19009, -16121}, +{ 10056, -21000, -13634, -2949, 15367, 19934}, +{ -648, -1605, 10046, -1592, 13296, 19808}, +{ -1054, 10744, 538, 24938, 9630, -9052}, +{ -10099, 3042, -25076, -24052, 13971, 100}, +{ 6547, 6907, 7031, 10348, 23775, -17886}, +{ -22793, -1984, -1393, -3330, 9267, 14317}, +{ -14346, -3967, 3042, 16254, -17303, 9646}, +{ -21393, 23628, 16773, 716, 2663, 114}, +{ -19016, -3038, 1574, -245, 1463, -793}, +{ 22410, 23441, -14637, -530, 17310, 13617}, +{ -11582, 7935, -13954, 23465, -24628, 26550}, +{ -1045, 3679, -2218, 10572, 20999, -3702}, +{ -15513, 197, 16718, -24603, 4945, 5}, +{ 10781, 4335, 26790, -9059, -16152, -2840}, +{ 16075, -24100, -3933, -6833, 12645, -7029}, +{ 2096, -25572, -8370, 6814, 11, 1178}, +{ -11848, -583, -8889, -20543, -10471, -380}, +{ -2487, 24777, -21639, -19341, 1660, -732}, +{ 2313, 13679, 4085, 24549, 24691, -21179}, +{ -2366, -504, -4130, -10570, 23668, 1961}, +{ 20379, 17809, -9506, 3733, -18954, -6292}, +{ -3856, 16802, -929, -20310, -17739, 6797}, +{ 12431, 6078, -11272, -14450, 6913, 23476}, +{ 7636, -1655, 23017, 10719, -8292, 838}, +{ -8559, -1235, -18096, 3897, 16093, 1490}, +{ -3586, 8276, 15165, -3791, -21149, 1741}, +{ -4497, 21739, 2366, -278, -4792, 15549}, +{ -23122, -13708, 7668, 16232, 24120, 15025}, +{ -20043, 12821, -20160, 16691, -11655, -16081}, +{ -12601, 20239, 3496, -2549, -6745, -11850}, +{ 4441, 7812, 20783, 17080, 11523, -9643}, +{ 24766, 8494, -23298, -3262, 11101, -7120}, +{ -10107, -7623, -22152, -18303, 26645, 9550}, +{ -25549, 477, 7874, -1538, 1123, -168}, +{ 470, 9834, -347, 23945, -10381, -9467}, +{ -4096, -9702, -6856, -21544, 20845, 7174}, +{ 5370, 9748, -23765, -1190, 512, -1538}, +{ -1006, -10046, -12649, 19234, -1790, -890}, +{ 15108, 23620, -15646, -2522, -1203, -1325}, +{ -7406, -2605, 1095, -247, -473, 177}, +{ 8089, 4, 12424, -22284, 10405, -7728}, +{ 22196, 10775, -5043, 690, 534, -212}, +{ -3153, -1418, -16835, 18426, 15821, 22956}, +{ 5681, -2229, 3196, -3414, -21817, -14807}, +{ 19, 787, 1032, 170, -8295, -645}, +{ -882, -2319, -27105, 432, -4392, 1499}, +{ -1354, -11819, -76, -20380, -10293, 11328}, +{ 211, -4753, -4675, -6933, -13538, 14479}, +{ 6043, 5260, -459, -462, 143, -65}, +{ -2572, 7256, -3317, 9212, -23184, -9990}, +{ -24882, -9532, 18874, 6101, 2429, -14482}, +{ 8314, 2277, 14192, 3512, 25881, 22000}, +{ 208, 20218, -281, -24778, -63, -1183}, +{ 1095, -6034, 2706, -21935, -2655, 563}, +{ 23, -5930, 243, -8989, 5345, 20558}, +{ -15466, 12699, 4160, 11087, 20621, -10416}, +{ 20995, -85, -8468, 194, 1003, -9515}, +{ -19637, -3335, -14081, 3574, -23381, -667}, +{ -2076, 3489, -3192, -19367, 539, -1530}, +{ 7352, -15213, 22596, 19369, 1043, 16627}, +{ -1872, -413, 1235, -5276, -3550, 21903}, +{ 7931, -2008, 16968, -6799, 29393, -2475}, +{ -13589, 8389, -23636, -22091, -14178, -14297}, +{ -11575, -20090, 16056, -1848, 15721, 4500}, +{ 3849, -16581, 20161, -21155, 7778, 11864}, +{ -6547, -1273, -18837, -11218, 11636, 1044}, +{ 2528, -6691, -17917, -11362, -4894, -1008}, +{ 1241, 4260, 2319, 6111, 3485, 20209}, +{ 3014, -3048, 5316, -4539, 20831, 8702}, +{ -1790, -14683, 278, 13956, -10065, -10547}, +{ -22732, -7957, -1154, 13821, -1484, -1247}, +{ -7317, -615, 13094, 18927, 9897, 1452}, +{ 2552, -2338, 3424, -4630, 11124, -19584}, +{ -11125, -20553, -10855, -10783, -20767, 6833}, +{ 984, -15095, 5775, 25125, 5377, -19799}, +{ 517, 13272, -7458, -1711, 20612, -6013}, +{ -21417, 13251, -20795, 13449, 17281, 13104}, +{ -15811, -16248, 23093, -4037, -8195, 871}, +{ 582, 12571, -21129, -14766, -9187, 5685}, +{ 4318, -1776, 11425, -17763, -9921, 577}, +{ 6013, 16830, 17655, -25766, -4400, -3550}, +{ -13744, -16541, 3636, -3330, -21091, -15886}, +{ 6565, -11147, 8649, -13114, 23345, -13565}, +{ -2542, -9046, -7558, 29240, 3701, -383}, +{ -10612, 24995, 1893, -8210, 20920, -16210}, +{ 5276, 16726, 10659, 19940, -4799, -19324}, +{ -532, -9300, 27856, 4965, -241, 536}, +{ -765, -20706, -3412, 18870, 2765, 1420}, +{ -3059, 2708, -19022, -331, 3537, 116}, +}; +static const int16_t vq_hebap7[512][6] = { +{ -21173, 21893, 10390, 13646, 10718, -9177}, +{ -22519, -8193, 18328, -6629, 25518, -10848}, +{ 6800, -13758, -13278, 22418, 14667, -20938}, +{ 2347, 10516, 1125, -3455, 5569, 27136}, +{ -6617, 11851, -24524, 22937, 20362, -6019}, +{ -21768, 10681, -19615, -15021, -8478, -2081}, +{ -2745, 8684, -4895, 27739, 7554, -11961}, +{ -1020, 2460, -954, 4754, -627, -16368}, +{ -19702, 23097, 75, -13684, -2644, 2108}, +{ 4049, -2872, 5851, -4459, 22150, 12560}, +{ -21304, -17129, -730, 7419, -11658, -10523}, +{ 11332, 1792, 26666, 23518, -19561, -491}, +{ -17827, -16777, -13606, -14389, -22029, -2464}, +{ 1091, -5967, -7975, -16977, -20432, -21931}, +{ 18388, -1103, 1933, 13342, -17463, 18114}, +{ 22646, 17345, -9966, 17919, 18274, 698}, +{ 1484, 20297, -5754, -26515, 4941, -22263}, +{ -2603, 4587, -5842, 18464, 8767, -2568}, +{ -2797, -1602, 21713, 3099, -25683, 3224}, +{ -19027, 4693, -5007, 6060, 1972, -15095}, +{ -2189, 9516, -530, 20669, -4662, -8301}, +{ -22325, -8887, 2529, -11352, 5476, 998}, +{ 22100, -5052, 1651, -2657, 4615, 2319}, +{ 20855, -3078, -3330, 4105, 13470, 3069}, +{ 85, 17289, 10264, -14752, 214, 90}, +{ -26365, -18849, -19352, 19244, -10218, 9909}, +{ -9739, 20497, -6579, -6983, 2891, -738}, +{ 20575, -15860, -22913, 6870, 76, 327}, +{ 8744, -12877, -22945, -2372, -19424, -9771}, +{ -12886, 16183, 21084, 3821, 749, -13792}, +{ -15995, 18399, 2391, -17661, 19484, -6018}, +{ 1423, 11734, 4051, 19290, 6857, -19681}, +{ -5200, 9766, 18246, 2463, 18764, -4852}, +{ -597, 19498, 1323, -9096, -308, -1104}, +{ -3099, -25731, -15665, 25332, 4634, 2635}, +{ 19623, -2384, -7913, 11796, -9333, -14084}, +{ 2642, 26453, -21091, -10354, -1693, -1711}, +{ 22031, 21625, 11580, -22915, -4141, 129}, +{ -6122, 3542, 915, -261, -17, -383}, +{ 1696, 6704, -1425, 20838, 857, -4416}, +{ 1423, -15280, -8550, -9667, 5210, 5687}, +{ -4520, -613, -11683, 5618, 4230, 619}, +{ 937, -4963, -14102, -17104, -6906, -5952}, +{ -15068, -481, -7237, -14894, 18876, 21673}, +{ -25658, 2910, 1143, -327, -458, -995}, +{ -9656, -819, -24900, 2804, 20225, 1083}, +{ -1111, -3682, -1788, -19492, 966, 821}, +{ 7293, -21759, 10790, -7059, -23293, -1723}, +{ -282, -11093, 170, -20950, -28926, 12615}, +{ 17938, 3713, -1563, 885, 5, 564}, +{ 6116, 22696, 2242, -6951, 9975, -6132}, +{ 4338, 26808, -3705, 1976, -1079, -2570}, +{ -661, -7901, -2668, -15194, 17722, 4375}, +{ -4174, -11053, 717, -22506, 1562, 12252}, +{ -6405, 18334, 6103, 6983, 5956, 18195}, +{ 9851, 5370, 23604, -6861, -6569, -62}, +{ 21964, 13359, -683, 3785, 2168, 209}, +{ -3569, -1127, -19724, -1544, 1308, -803}, +{ -3083, 16049, -13791, -3077, 4294, 23713}, +{ -9999, 9943, -15872, 12934, -23631, 21699}, +{ 9722, 22837, 12192, 15091, 5533, 4837}, +{ 2243, 2099, 1243, 4089, 4748, 12956}, +{ 4007, -2468, 3353, -3092, 8843, 17024}, +{ 4330, 6127, 5549, 9249, 11226, 28592}, +{ -9586, -8825, 236, 1009, 455, -964}, +{ 6829, 19290, -1018, 200, 1821, 578}, +{ 5196, 957, 10372, 3330, -12800, -127}, +{ -3022, -8193, -14557, 22061, 5920, 1053}, +{ 10982, 25942, -24546, -23278, -11905, -6789}, +{ 22667, -11010, 5736, 2567, 23705, -10253}, +{ -3343, -4233, -5458, 20667, -10843, -3605}, +{ -4131, -3612, 4575, -829, -350, -847}, +{ -3303, 3451, -7398, -11604, 3023, 455}, +{ 3200, -9547, 3202, -22893, 11184, -26466}, +{ -14093, -4117, 15382, 14295, -10915, -20377}, +{ 3807, -11016, 22052, 14370, -15328, -7733}, +{ -6291, -17719, -1560, 12048, -19805, -443}, +{ -6147, -4234, -160, 8363, 22638, 11911}, +{ 19197, 1175, 7422, -9875, -4136, 4704}, +{ -72, -7652, -112, -11955, -3230, 27175}, +{ 3274, 5963, 7501, -17019, 866, -25452}, +{ 737, 1861, 1833, 2022, 2384, 4755}, +{ -5217, 7512, 3323, 2715, 3065, -1606}, +{ 4247, 565, 5629, 2497, 18019, -4920}, +{ -2833, -17920, -8062, 15738, -1018, 2136}, +{ 3050, -19483, 16930, 29835, -10222, 15153}, +{ -11346, 118, -25796, -13761, 15320, -468}, +{ -4824, 4960, -4263, 1575, -10593, 19561}, +{ -8203, -1409, -763, -1139, -607, 1408}, +{ -2203, -11415, 2021, -6388, -2600, 711}, +{ -413, -2511, -216, -3519, -28267, 1719}, +{ -14446, 17050, 13917, 13499, -25762, -16121}, +{ 19228, 7341, -12301, 682, -3791, -199}, +{ -4193, 20746, -15651, 11349, 5860, -824}, +{ -21490, -3546, -3, -1705, -3959, 9213}, +{ 15445, -1876, 2012, -19627, 16228, -4845}, +{ -2867, -3733, -7354, -175, -20119, 11174}, +{ -3571, -24587, 19700, 6654, 979, -654}, +{ 21820, -7430, -6639, -10767, -8362, 15543}, +{ 14827, 17977, -7204, -3409, 1906, -17288}, +{ 3525, -3947, -1415, -2798, 17648, 2082}, +{ -6580, -15255, -17913, 1337, 15338, 21158}, +{ 6210, 9698, 15155, -24666, -22507, -3999}, +{ -1740, -593, 1095, -7779, 25058, 5601}, +{ 21415, -432, -1658, -6898, -1438, -14454}, +{ -6943, 700, -12139, -745, -24187, 22466}, +{ 6287, 3283, 11006, 3844, 19184, 14781}, +{ -22502, 15274, 5443, -2808, -970, -3343}, +{ 3257, -3708, 4744, -8301, 22814, -10208}, +{ 24346, -20970, 19846, 987, -11958, -6277}, +{ 3906, -19701, 13060, -1609, 18641, 7466}, +{ -26409, -22549, 16305, 2014, 10975, 18032}, +{ -7039, 4655, -14818, 18739, 15789, 1296}, +{ 9310, -1681, 14667, -3326, 26535, -11853}, +{ 5728, 5917, 13400, 10020, -2236, -24704}, +{ 1741, -6727, 12695, -22009, 4080, 5450}, +{ -2621, 9393, 21143, -25938, -3162, -2529}, +{ 20672, 18894, -13939, 6990, -8260, 15811}, +{ -23818, 11183, -13639, 11868, 16045, 2630}, +{ 18361, -10220, 829, 856, -1010, 157}, +{ 14400, -4678, 5153, -13290, -27434, -11028}, +{ 21613, 11256, 17453, 7604, 13130, -484}, +{ 7, 1236, 573, 4214, 5576, -3081}, +{ 916, -9092, 1285, -8958, 1185, -28699}, +{ 21587, 23695, 19116, -2885, -14282, -8438}, +{ 23414, -6161, 12978, 3061, -9351, 2236}, +{ -3070, -7344, -20140, 5788, 582, -551}, +{ -3993, 315, -7773, 8224, -28082, -12465}, +{ 13766, -15357, 19205, -20624, 13043, -19247}, +{ 3777, -177, 8029, -1001, 17812, 5162}, +{ -7308, -4327, -18096, -620, -1350, 14932}, +{ 14756, -1221, -12819, -14922, -547, 27125}, +{ 2234, 1708, 2764, 5416, 7986, -25163}, +{ 2873, 3636, 3992, 5344, 10142, 21259}, +{ 1158, 5379, 508, -10514, 290, -1615}, +{ 1114, 24789, 16575, -25168, -298, -2832}, +{ -1107, -6144, -1918, -7791, -2971, -23276}, +{ 4016, 10793, 17317, -4342, -20982, -3383}, +{ -4494, -207, -9951, -3575, 7947, 1154}, +{ -7576, 8117, -14047, 16982, -26457, -27540}, +{ -15164, 16096, -16844, -8886, -23720, 15906}, +{ 24922, 5680, -1874, 420, 132, 117}, +{ -506, -19310, -198, 412, -311, 752}, +{ -1906, 3981, -7688, 16566, -19291, -14722}, +{ -399, -729, -3807, -4196, -12395, 7639}, +{ 3368, 2330, 9092, 23686, -10290, -1705}, +{ -3148, 2596, -7986, 14602, -4807, 16627}, +{ 8057, 1481, 49, 17205, 24869, 7474}, +{ -19304, -513, 11905, 2346, 5588, 3365}, +{ -5063, -21812, 11370, 10896, 4881, 261}, +{ 4794, 20577, 5109, -6025, -8049, -1521}, +{ 8125, -14756, 20639, -14918, 23941, -3650}, +{ 12451, 1381, 3613, 8687, -24002, 4848}, +{ 6726, 10643, 10086, 25217, -25159, -1065}, +{ 6561, 13977, 2911, 21737, 16465, -26050}, +{ -1776, 2575, -19606, -16800, 3032, 6679}, +{ 15012, -17910, -8438, -21554, -27111, 11808}, +{ 3448, -924, -15913, -1135, 5126, -20613}, +{ 7720, 2226, 17463, 5434, 28942, 17552}, +{ 1246, 15614, -11743, 24618, -17539, 3272}, +{ 3215, 17950, 2783, -722, -22672, 5979}, +{ -5678, -3184, -26087, 26034, 6583, 3302}, +{ 20310, -3555, -2715, -444, -1487, 1526}, +{ -20640, -21970, -12207, -25793, 8863, -1036}, +{ 17888, 570, -16102, 8329, -2553, 15275}, +{ -2677, 9950, -1879, 16477, -12762, -29007}, +{ -120, -2221, 219, 97, 365, 35}, +{ 1270, -718, 1480, -2689, 1930, -7527}, +{ 1896, 8750, 1906, 18235, -12692, -6174}, +{ -3733, 13713, -9882, -15960, -1376, -7146}, +{ -10600, 8496, 15967, -8792, 7532, 20439}, +{ 3041, -13457, 1032, -26952, 5787, 24984}, +{ -4590, -8220, -9322, -6112, -17243, 25745}, +{ -17808, 6970, 3752, 626, -114, 2178}, +{ 4449, -4862, 7054, -5404, 4738, -2827}, +{ 4922, -651, 18939, -9866, 848, 1886}, +{ -336, -5410, 7234, 20444, -9583, -600}, +{ 781, -19474, -12648, 6634, 1414, 450}, +{ -3399, -16770, 11107, 13200, -5498, 21663}, +{ -3265, 4859, -5961, 7530, -10837, 28086}, +{ 10350, -12901, 25699, 25640, -639, 351}, +{ 1163, 18763, -5466, -15087, -145, -1377}, +{ -14477, 27229, -31383, -32653, 21439, -2894}, +{ 15420, 18823, 22128, 19398, 22583, 13587}, +{ -10674, 10710, 5089, -4756, 909, -20760}, +{ -12948, -20660, 7410, 2722, 3427, 11585}, +{ -1105, 18374, 19731, -9650, 22442, 19634}, +{ -296, -6798, -14677, 21603, 19796, 21399}, +{ -19350, -7501, 25446, 13144, 8588, -25298}, +{ 3092, -10618, 20896, 9249, -3326, 1796}, +{ -811, 1449, 3106, 4748, 12073, -14262}, +{ -20720, 14275, -4332, -25838, -5781, -21149}, +{ -5132, 10554, -14020, -22150, 2840, -554}, +{ 25533, 17648, 14886, -21074, 2459, 25142}, +{ -9370, -1788, -12862, -5870, -25811, -11023}, +{ 6698, 819, 10313, 166, 27581, 523}, +{ 101, -19388, 3413, 9638, 64, 806}, +{ -2742, -17931, -2576, 22818, 8553, 1126}, +{ 2972, 15203, 1792, 25434, -5728, -17265}, +{ -1419, 1604, 4398, 11452, 1731, 23787}, +{ -5136, 4625, -10653, 27981, 9897, -2510}, +{ -10528, -28033, 2999, -1530, -832, -830}, +{ -11133, -12511, 22206, -7243, -23578, -21698}, +{ 16935, -21892, 1861, -9606, 9432, 19026}, +{ 10277, 9516, 26815, 2010, -4943, -9080}, +{ 5547, -2210, 14270, -15300, -19316, 1822}, +{ -4850, -783, -8959, -3076, -20056, -3197}, +{ 8232, -2794, -17752, 13308, 3229, -991}, +{ -12237, -6581, 10315, -9552, 2260, -20648}, +{ -7000, 5529, -7553, -7490, -10342, -10266}, +{ 3641, 19479, -5972, -19097, -18570, 12805}, +{ 1283, -4164, 4198, -28473, -2498, 1866}, +{ 16047, 26826, -13053, -6316, 985, -1597}, +{ -403, 13680, 6457, 25070, 27124, -20710}, +{ -18070, -1790, -24986, 5953, -954, 26600}, +{ -24224, -15383, 24788, 1953, -1136, 187}, +{ -2289, 12505, -20738, -904, 18324, 21258}, +{ 2658, -6140, 16179, 22276, -556, 2154}, +{ -6087, 13950, -25682, -27713, 4049, -4795}, +{ -21452, 26473, 19435, -9124, 895, 303}, +{ -22200, -26177, -6026, 24729, -22926, -9030}, +{ -14276, -15982, 23732, -22851, 9268, -3841}, +{ 29482, 21923, -6213, 1679, -2059, -1120}, +{ -435, 9802, -3891, 12359, -4288, -18971}, +{ 19768, -86, 2467, 1990, -1021, -5354}, +{ 20986, -8783, -5329, -23562, -4730, 2673}, +{ -5095, 5605, -4629, 19150, 26037, -12259}, +{ 972, 6858, 4551, 27949, -4025, -2272}, +{ 6075, -3260, -4989, -373, -1571, -3730}, +{ -7256, -12992, -8820, -5109, 23054, 5054}, +{ 920, 2615, 7912, -7353, -4905, 20186}, +{ -250, 5454, 3140, 6928, -18723, -2051}, +{ -10299, -4372, 19608, 4879, -661, -1885}, +{ 14816, -8603, -19815, 6135, -21210, 14108}, +{ -11945, -2223, 5018, 11892, 22741, 406}, +{ -13184, -2613, -13256, -22433, -12482, -8380}, +{ 17066, 25267, -2273, 5056, -342, 145}, +{ 8401, -17683, 19112, 10615, -19453, 17083}, +{ 20821, -5700, 12298, -25598, 10391, 7692}, +{ 4550, 15779, 17338, -19379, -4768, 1206}, +{ -7723, 10836, -27164, -11439, 6835, -1776}, +{ 2542, 3199, 4442, 17513, -3711, -914}, +{ 20960, -16774, -5814, 11087, -70, 22961}, +{ 3305, 2919, 6256, -4800, -20966, -3230}, +{ 5924, -16547, 2183, 2733, 3446, -23306}, +{ -6061, -194, -13852, -10971, 19488, 1029}, +{ 4467, -5964, -19004, 1519, -359, 855}, +{ -1581, -7607, 22070, -11580, -10032, 17102}, +{ -12412, 2553, 4324, 22500, 5751, 12170}, +{ -25127, 17996, -6384, 1180, 1182, 9622}, +{ 23462, -8471, -4392, -2669, 7638, -16835}, +{ -5511, -2887, -10757, -20883, 7246, 1053}, +{ 2703, -20602, -7554, 7516, -7740, 5868}, +{ 20670, 21901, 457, 14969, -17657, -11921}, +{ 3603, -1595, -2177, -157, -43, 605}, +{ 2513, 8954, 10527, 22559, -16100, -16041}, +{ 6002, 4951, 6795, -4862, -22400, 18849}, +{ 7590, -1693, -24688, -3404, 14169, 1214}, +{ -4398, -6663, -6870, -10083, -24596, 9253}, +{ 10468, 17751, -7748, 147, -6314, 4419}, +{ 16187, -16557, -4119, 4302, 7625, 5409}, +{ 3303, 2735, 7458, -19902, -2254, -3702}, +{ -2077, 21609, 14870, 12545, -6081, -1764}, +{ 4678, 11740, 2859, 6953, 1919, -3871}, +{ 3522, -21853, -2469, -10453, 18893, -10742}, +{ 3759, -10191, -4866, -2659, -17831, -1242}, +{ 14991, 9351, 11870, -1573, -4848, 22549}, +{ 9509, -27152, 10734, 20851, -26185, -17878}, +{ -7170, -1392, -19495, 12746, 8198, -1988}, +{ 1883, 28158, -846, -7235, 249, 233}, +{ -7200, 669, -371, -2948, 23234, -5635}, +{ 3141, 288, 3223, -1258, -98, -27607}, +{ 17373, -23235, 5110, -11199, -2574, -11487}, +{ -4928, 1518, -5456, 670, -18278, 1951}, +{ 10334, -19865, -4649, 361, -160, -923}, +{ 18732, 14264, -3155, -7485, -3328, 5959}, +{ -3614, 21077, 7276, 3536, 8121, -1528}, +{ -8422, 500, -19182, 18929, 26392, -1039}, +{ 15639, 25668, 8375, 1903, 1945, -11979}, +{ -2716, 3389, 26850, -4587, 1803, 22}, +{ 1177, -655, 1233, -2128, 7844, 1767}, +{ -761, 8209, -19290, -4593, 1923, -343}, +{ -689, -3530, -3267, -3804, -2753, 18566}, +{ -2110, 1962, -1353, 16643, 2765, -23102}, +{ -433, 4905, 302, 13016, 15933, -5905}, +{ 3203, 4126, 11181, -5496, -2529, -1160}, +{ -1091, -6469, -1415, 5682, -268, 583}, +{ -9405, -19572, 6216, 1658, 993, -75}, +{ -1695, -4504, -2289, -4088, -6556, -16577}, +{ 4760, -892, -10902, 6516, 24199, -6011}, +{ -253, 1000, 63, -81, -115, -382}, +{ -1333, 24224, -698, -4667, -2801, -19144}, +{ -876, -28866, -21873, 12677, -6344, 3235}, +{ 16847, 21145, -26172, -3183, -396, 230}, +{ 18296, -7790, -12857, -679, -1473, 5}, +{ -10488, 11429, 25805, -1122, 1401, -438}, +{ 3782, -7429, 26720, 17567, 19257, 12542}, +{ 6332, -746, 12789, 9316, -22542, -5354}, +{ 3418, -22728, 26978, 18303, 1076, 956}, +{ -27315, -2988, 920, 235, 2233, 81}, +{ 6199, 5296, 16093, 14768, -8429, -1112}, +{ -6432, 19244, 9921, -3253, 1278, -954}, +{ 24213, 2049, -22931, 2585, -2410, -4216}, +{ 9286, 14282, -19735, -3985, -2344, 1028}, +{ -20128, 17993, -9458, 23012, -16983, 8625}, +{ -6896, -20730, 3762, 17415, 22341, 19024}, +{ 842, 24181, 25062, -5839, -78, 937}, +{ -621, 19722, -24204, -1962, -14854, -56}, +{ 22766, -5119, 17365, 23868, -19480, -6558}, +{ -2158, 17490, -21435, 3340, -12819, -20295}, +{ -9621, 17325, 715, 2265, -4123, -492}, +{ 9156, 12947, 27303, -21175, -6072, -9457}, +{ -13164, -23269, -14006, -4184, 6978, 2}, +{ 938, -13381, 3520, -24297, 22902, 19589}, +{ -4911, -19774, 19764, -9310, -12650, 3819}, +{ -5462, -4249, -6987, -6260, -13943, -25150}, +{ 9341, 10369, -13862, -6704, 22556, -519}, +{ 6651, 18768, -4855, 12570, 14730, -10209}, +{ -823, 18119, 398, -1582, -116, -363}, +{ -6935, -12694, -28392, 8552, 6961, -239}, +{ -2602, -4704, -1021, 2015, 5129, 23670}, +{ -12559, -8190, -25028, 18544, 14179, 1663}, +{ 3813, 21036, -9620, -5051, -1800, -1087}, +{ -22057, 16675, 14960, 9459, 2786, 16991}, +{ -26040, -19318, -6414, 1104, 5798, -18039}, +{ -1737, 24825, 10417, -11087, 896, -5273}, +{ -1855, 11661, -2803, 24809, -21435, -19792}, +{ -23473, -16729, -5782, 5643, 2636, 4940}, +{ -1724, 4388, -26673, -13695, 10570, -25895}, +{ 15358, -19496, 26242, -18493, 1736, 8054}, +{ 5684, 20890, 4091, -19100, -14588, -10468}, +{ 17260, -16291, 14859, -17711, -19174, 12435}, +{ -27185, -12573, 6743, -562, 976, -257}, +{ 12395, -8618, -22248, -19843, 11013, 7762}, +{ 3799, 11853, -27622, -8473, 1089, -1495}, +{ 4141, -2182, -26720, -735, -774, 1469}, +{ 3125, 13762, 4606, 29257, 18771, -9958}, +{ -17465, -9445, -17562, -2530, -6435, -3726}, +{ -1742, 4351, -6841, -19773, 9627, -10654}, +{ 7251, 3525, 10835, 5601, 25198, -23348}, +{ -10300, -17830, 631, 11640, 2044, -20878}, +{ -873, -8502, -1063, -15674, -10693, 14934}, +{ -15957, 28137, 5268, 477, -1053, 1158}, +{ -1495, -8814, -5764, -24965, 25988, 7907}, +{ -1038, -114, -2308, -1319, -6480, 1472}, +{ 4895, -17897, -25850, 5301, -188, 1581}, +{ 3200, 17225, 4346, 22101, -18543, 22028}, +{ -10250, 545, -10932, 2276, -28070, 8118}, +{ 15343, 2329, 9316, 20537, 14908, 21021}, +{ 6329, 6130, -24508, 837, -8637, -5844}, +{ 7386, -501, 10503, 20131, 11435, -4755}, +{ -2745, 24174, -9274, 15273, -8389, -5835}, +{ 2992, -2864, 6048, -7473, 11687, -19996}, +{ -883, -11954, -9976, -21829, -4436, -27178}, +{ 3458, 19626, 1280, 2597, 19849, 5255}, +{ -5315, 19133, -14518, -8946, 13749, -1352}, +{ 18642, 17655, 11001, 6817, -18418, 6336}, +{ -1697, 2244, -4640, 3948, -12890, -5273}, +{ 20428, 10542, 4170, -1012, 19439, 21691}, +{ -2943, -19735, -4208, 1320, 909, -8897}, +{ 9351, -8066, -2618, -12933, 26582, 3507}, +{ 9705, -22628, 8311, 8167, -13293, 5608}, +{ 3222, 3749, -1508, 165, -52, -196}, +{ 102, -22744, -8832, 903, -11421, -14662}, +{ -120, 5998, 19765, 13401, 3628, 5197}, +{ 8528, 5827, -1066, 774, -39, -166}, +{ 9411, -9476, 9581, -13004, 24456, 24900}, +{ 17878, 2235, -21639, 20478, 4716, -7190}, +{ -2482, 9511, 1611, -21943, 14230, -1289}, +{ 9288, -2291, 23215, -3452, -10842, 11}, +{ 9496, 3041, 5130, -3890, -21219, -22589}, +{ 14262, -9838, 20195, 14019, 91, -17200}, +{ -18591, 980, 17, 821, 120, -574}, +{ 12285, -19269, 13742, 16373, -161, 6025}, +{ -3364, 1530, -4005, 2454, -10872, -23839}, +{ 105, 5085, -260, 5790, -588, 19170}, +{ 4121, 4169, 13439, 14644, 20899, 7434}, +{ -175, 13101, -3704, 23233, 3907, 10106}, +{ -6101, 23467, 5204, -1341, 1599, 13174}, +{ -3217, -3494, 15117, -8387, -11762, -4750}, +{ 1146, 4675, -19378, 14917, -5091, 249}, +{ -21506, 10136, -16473, -13305, 18382, -8601}, +{ 628, 2447, 3344, 3130, -5115, 119}, +{ 17900, -22422, -17633, 21967, -16293, -7676}, +{ 16863, 24214, 5612, -3858, -809, 3822}, +{ -2291, 10091, -2360, -25109, -1226, 312}, +{ 2957, 11256, 26745, -13266, -3455, -1128}, +{ -19762, -2708, 4604, 6355, 1638, 25501}, +{ -19593, -7753, 3159, -85, -489, -1855}, +{ 814, 12510, 19077, -4681, -2610, -1474}, +{ -23408, -19027, 8137, 19878, 7912, -282}, +{ 839, -19652, 11927, 27278, -3211, 2266}, +{ 4020, -1110, 8226, -1274, 20922, 25060}, +{ 26576, 325, -8693, -232, -2218, -699}, +{ -11293, -4200, 1805, -6673, -22940, -1339}, +{ -2005, -15886, -1047, -27687, -13235, 14370}, +{ -22073, 1949, 13175, -15656, -1846, 8055}, +{ 3039, 12025, 7132, -24632, 413, -2347}, +{ -24048, -206, 12459, -6654, -417, -10091}, +{ 18179, -23688, -20515, -16396, 7230, 763}, +{ 5659, -5085, 13878, -23729, -11077, -19587}, +{ 11340, 501, 25040, 7616, -19658, 1605}, +{ -26650, 8878, 10544, 417, 1299, 261}, +{ 14460, 11369, -3263, 9990, 8194, 18111}, +{ 1355, -20838, -9196, -16060, -8559, -730}, +{ -1918, -20937, -18293, -2461, -2651, 4316}, +{ -2810, 24521, -10996, -25721, 308, -1234}, +{ -9075, -17280, -1833, -29342, -24213, -16631}, +{ -2843, 10165, -5339, -2888, 21858, -21340}, +{ -15832, 14849, -23780, 5184, 10113, -20639}, +{ -19535, -11361, 8413, 1486, -23658, -5759}, +{ -7512, 1027, -20794, 13732, 19892, -21934}, +{ -12132, -7022, -19175, -8840, 22125, -16490}, +{ 1937, 5210, -6318, -23788, 13141, 11082}, +{ -205, 6036, -380, 8658, -233, 28020}, +{ -5523, 7477, 7635, 23595, 9763, -2590}, +{ 21658, -28313, -3086, -300, -1032, 1744}, +{ -22352, 16646, 208, 6665, -17400, -3028}, +{ 18482, 9336, -2737, -19372, 407, -4389}, +{ -4913, -17370, 18819, -17654, 13416, 15232}, +{ 7749, 6368, 23135, -18174, 7584, -4248}, +{ -1489, -6523, 586, -10157, 14964, 25568}, +{ 3844, -6156, 4897, -13045, -22526, 5647}, +{ -8491, -2105, -24774, 905, -9326, 1456}, +{ -3040, -1476, 1166, -4428, 11236, 9204}, +{ 3397, -1451, 13598, -15841, 24540, 5819}, +{ 8483, -2993, 21547, -16916, 7741, 24018}, +{ -14932, -23758, -5332, -6664, -4497, 13267}, +{ 19379, 12916, -2142, -737, 21100, -22101}, +{ 3393, -4629, 5735, -18913, -6969, 2687}, +{ 1148, -16147, -21433, -28095, -630, -14449}, +{ 7300, 672, 18530, -17452, -10149, 351}, +{ 11356, -10974, 17212, 4624, 145, 17791}, +{ -711, -3479, -2238, 15887, 2027, 0}, +{ -28048, 1794, -593, -2758, -21852, 11535}, +{ -19683, 4937, 22004, 21523, -3148, 1790}, +{ 813, 8231, 2633, 11981, -3043, 22201}, +{ 8952, -24760, -690, 14873, -2366, -5372}, +{ 8406, -5439, -274, -642, -145, 778}, +{ -6605, 7258, 20780, -23507, -18625, 22782}, +{ -22896, -25488, 10020, -1614, 1508, -1393}, +{ 7607, 407, -24678, -16385, -1804, -4699}, +{ -10592, -19139, 10462, -3747, 8721, -6919}, +{ 13010, 5292, -6230, -4884, -20904, -1797}, +{ 16891, -13770, -465, 19343, -10741, -12959}, +{ 25193, -14799, -5681, -521, -321, -1211}, +{ 6917, -3093, 20183, -26903, -12026, 1295}, +{ 305, 1992, 19457, -985, 25, -521}, +{ 6707, -3698, 8365, -8687, 21921, -27166}, +{ 4668, 5997, 7117, 11696, 24401, -10794}, +{ 744, -9416, 19893, 1963, 7922, -9824}, +{ 3430, 21282, -1736, 10844, 8821, 27015}, +{ -8813, 1521, -24038, 1651, 7838, -1208}, +{ 3911, -11221, 3273, -12541, 7168, 18402}, +{ 21642, 9117, -11536, -5256, 7077, 2382}, +{ 100, 3817, -6713, 1244, 1518, -321}, +{ 7946, -18670, 10667, -4866, 727, 776}, +{ -15883, -8150, -2087, 22739, 1567, -3482}, +{ 4380, -2735, 8469, -7025, -11424, 1317}, +{ 26970, 4393, 7665, 17561, -714, 650}, +{ -16191, -835, 8365, 1795, -14314, 16297}, +{ 4504, -10048, 7662, -26690, -17428, 2580}, +{ 48, -3984, 564, -5871, 2658, -18658}, +{ 12579, -26016, -15642, 2672, -1347, -887}, +{ -4950, 4208, -6811, 2569, -20621, -8658}, +{ -1836, -14818, -5571, -23322, -14800, 25867}, +{ 5434, -28139, -2357, -2883, -570, 2431}, +{ 13096, -2771, 24994, -12496, -24723, -1025}, +{ -5676, -4339, 1908, 18628, -21323, 17366}, +{ 27660, -27897, -15409, 1436, -7112, -2241}, +{ 8019, 3847, 24568, -469, 9674, 10683}, +{ -903, -10149, 1801, -21260, 4795, -8751}, +{ 1122, -9582, 2625, 22791, 956, 882}, +{ 7876, 19075, -9900, -24266, 7496, 9277}, +{ 980, -26764, -5386, 5396, 1086, 1648}, +{ 28838, -1270, -447, 5, -429, -20}, +{ -15283, 6132, 22812, 1252, -9963, 511}, +{ 851, 7925, -457, -12210, 4261, 7579}, +{ -4530, 8452, -1246, 14501, -24951, -5760}, +{ -17814, -10727, 9887, -23929, -13432, 1878}, +{ -15049, 10165, 16491, -14603, -11712, -21156}, +{ -3317, 840, -5683, 22413, 1994, 586}, +{ 23158, -5788, -15043, -10372, -9271, -13523}, +{ -773, -9509, -3993, -24264, 8463, 5804}, +{ -8545, -703, -12440, -3985, -25122, -28147}, +{ -16659, 16001, 2746, 1611, 5097, -1043}, +{ 41, -7181, 19903, 31555, -32237, 13927}, +{ -5658, 845, -12774, 5705, 16695, -86}, +{ 5282, 14875, 27026, 21124, 15776, -10477}, +{ 14712, 19648, -11487, -13361, -20196, -15229}, +{ 8597, -9138, -626, 10891, -6015, 6346}, +{ -1488, -1272, -1479, -1303, -3704, -5485}, +{ -3370, 17871, -6604, 24930, 25886, -3127}, +{ 8416, 27783, -1385, 5350, -4260, 19993}, +{ 5688, 362, 17246, 3809, -3246, 1088}, +{ -105, -29607, 2747, 15223, -167, 3722}, +{ 3502, -3195, 8602, 7772, -1566, -915}, +{ -491, 3257, -2423, 5522, 20606, -100}, +{ -13948, -11368, -15375, -21866, -8520, 12221}, +{ -616, 2424, -2023, 4398, -3805, 8108}, +{ -7204, 21043, 21211, -9395, -19391, 896}, +{ -5737, -15160, -21298, 17066, -1006, -366}, +{ 6261, 3240, -11937, -16213, -15820, 6581}, +{ -3155, 24796, 2733, -1257, -875, -1597}, +{ -20469, 11094, 24071, -8987, 14136, 2220}, +{ -14106, 11959, -22495, 4135, -1055, -5420}, +{ 801, -2655, 60, -5324, -790, 5937}, +{ -7372, -1764, -22433, -26060, 21707, 4178}, +{ -5715, -6648, -14908, 1325, -24044, 1493}, +{ -6024, -12488, 23930, 2950, 1601, 1173}, +{ 19067, 17630, 17929, -10654, 10928, -4958}, +{ 3231, -3284, 27336, 4174, -1683, 497}, +}; + +const int16_t (* const ff_eac3_mantissa_vq[8])[6] = { + NULL, + vq_hebap1, + vq_hebap2, + vq_hebap3, + vq_hebap4, + vq_hebap5, + vq_hebap6, + vq_hebap7, +}; + +/** + * Table E2.14 Frame Exponent Strategy Combinations + */ +const uint8_t ff_eac3_frm_expstr[32][6] = { +{ EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_REUSE}, +{ EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_D45}, +{ EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_D25, EXP_REUSE}, +{ EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D45}, +{ EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_REUSE}, +{ EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_D45}, +{ EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE}, +{ EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D45, EXP_D45}, +{ EXP_D25, EXP_REUSE, EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE}, +{ EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45}, +{ EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE}, +{ EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_D45, EXP_D45}, +{ EXP_D25, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE}, +{ EXP_D25, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE, EXP_D45}, +{ EXP_D25, EXP_REUSE, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE}, +{ EXP_D25, EXP_REUSE, EXP_D45, EXP_D45, EXP_D45, EXP_D45}, +{ EXP_D45, EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_REUSE}, +{ EXP_D45, EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_D45}, +{ EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D25, EXP_REUSE}, +{ EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D45}, +{ EXP_D45, EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_REUSE}, +{ EXP_D45, EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_D45}, +{ EXP_D45, EXP_D25, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE}, +{ EXP_D45, EXP_D25, EXP_REUSE, EXP_D45, EXP_D45, EXP_D45}, +{ EXP_D45, EXP_D45, EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE}, +{ EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45}, +{ EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE}, +{ EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_D45, EXP_D45}, +{ EXP_D45, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE}, +{ EXP_D45, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_D45}, +{ EXP_D45, EXP_D45, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE}, +{ EXP_D45, EXP_D45, EXP_D45, EXP_D45, EXP_D45, EXP_D45}, +}; + +/** + * Table E.25: Spectral Extension Attenuation Table + * ff_eac3_spx_atten_tab[code][bin]=pow(2.0,(bin+1)*(code+1)/-15.0); + */ +const float ff_eac3_spx_atten_tab[32][3] = { + { 0.954841603910416503f, 0.911722488558216804f, 0.870550563296124125f }, + { 0.911722488558216804f, 0.831237896142787758f, 0.757858283255198995f }, + { 0.870550563296124125f, 0.757858283255198995f, 0.659753955386447100f }, + { 0.831237896142787758f, 0.690956439983888004f, 0.574349177498517438f }, + { 0.793700525984099792f, 0.629960524947436595f, 0.500000000000000000f }, + { 0.757858283255198995f, 0.574349177498517438f, 0.435275281648062062f }, + { 0.723634618720189082f, 0.523647061410313364f, 0.378929141627599553f }, + { 0.690956439983888004f, 0.477420801955208307f, 0.329876977693223550f }, + { 0.659753955386447100f, 0.435275281648062062f, 0.287174588749258719f }, + { 0.629960524947436595f, 0.396850262992049896f, 0.250000000000000000f }, + { 0.601512518041058319f, 0.361817309360094541f, 0.217637640824031003f }, + { 0.574349177498517438f, 0.329876977693223550f, 0.189464570813799776f }, + { 0.548412489847312945f, 0.300756259020529160f, 0.164938488846611775f }, + { 0.523647061410313364f, 0.274206244923656473f, 0.143587294374629387f }, + { 0.500000000000000000f, 0.250000000000000000f, 0.125000000000000000f }, + { 0.477420801955208307f, 0.227930622139554201f, 0.108818820412015502f }, + { 0.455861244279108402f, 0.207809474035696939f, 0.094732285406899888f }, + { 0.435275281648062062f, 0.189464570813799776f, 0.082469244423305887f }, + { 0.415618948071393879f, 0.172739109995972029f, 0.071793647187314694f }, + { 0.396850262992049896f, 0.157490131236859149f, 0.062500000000000000f }, + { 0.378929141627599553f, 0.143587294374629387f, 0.054409410206007751f }, + { 0.361817309360094541f, 0.130911765352578369f, 0.047366142703449930f }, + { 0.345478219991944002f, 0.119355200488802049f, 0.041234622211652958f }, + { 0.329876977693223550f, 0.108818820412015502f, 0.035896823593657347f }, + { 0.314980262473718298f, 0.099212565748012460f, 0.031250000000000000f }, + { 0.300756259020529160f, 0.090454327340023621f, 0.027204705103003875f }, + { 0.287174588749258719f, 0.082469244423305887f, 0.023683071351724965f }, + { 0.274206244923656473f, 0.075189064755132290f, 0.020617311105826479f }, + { 0.261823530705156682f, 0.068551561230914118f, 0.017948411796828673f }, + { 0.250000000000000000f, 0.062500000000000000f, 0.015625000000000000f }, + { 0.238710400977604098f, 0.056982655534888536f, 0.013602352551501938f }, + { 0.227930622139554201f, 0.051952368508924235f, 0.011841535675862483f } +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3_data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3_data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3_data.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3_data.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,36 @@ +/* + * E-AC-3 tables + * Copyright (c) 2007 Bartlomiej Wolowiec + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_EAC3_DATA_H +#define AVCODEC_EAC3_DATA_H + +#include + +extern const uint8_t ff_eac3_bits_vs_hebap[20]; +extern const int16_t ff_eac3_gaq_remap_1[12]; +extern const int16_t ff_eac3_gaq_remap_2_4_a[9][2]; +extern const int16_t ff_eac3_gaq_remap_2_4_b[9][2]; + +extern const int16_t (* const ff_eac3_mantissa_vq[8])[6]; +extern const uint8_t ff_eac3_frm_expstr[32][6]; +extern const float ff_eac3_spx_atten_tab[32][3]; + +#endif /* AVCODEC_EAC3_DATA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3dec.c 2011-03-27 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -51,7 +51,7 @@ #include "ac3_parser.h" #include "ac3dec.h" #include "ac3dec_data.h" -#include "eac3dec_data.h" +#include "eac3_data.h" /** gain adaptive quantization mode */ typedef enum { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3dec_data.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3dec_data.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3dec_data.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3dec_data.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1134 +0,0 @@ -/* - * E-AC-3 decoder tables - * Copyright (c) 2007 Bartlomiej Wolowiec - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * Tables taken directly from the E-AC-3 spec. - */ - -#include "eac3dec_data.h" -#include "ac3.h" - -const uint8_t ff_eac3_bits_vs_hebap[20] = { - 0, 2, 3, 4, 5, 7, 8, 9, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, -}; - -/** - * Table E3.6, Gk=1 - * No gain (Gk=1) inverse quantization, remapping scale factors - * ff_eac3_gaq_remap[hebap+8] - */ -const int16_t ff_eac3_gaq_remap_1[12] = { - 4681, 2185, 1057, 520, 258, 129, 64, 32, 16, 8, 2, 0 -}; - -/** - * Table E3.6, Gk=2 & Gk=4, A - * Large mantissa inverse quantization, remapping scale factors - * ff_eac3_gaq_remap_2_4_a[hebap-8][Gk=2,4] - */ -const int16_t ff_eac3_gaq_remap_2_4_a[9][2] = { - { -10923, -4681 }, - { -14043, -6554 }, - { -15292, -7399 }, - { -15855, -7802 }, - { -16124, -7998 }, - { -16255, -8096 }, - { -16320, -8144 }, - { -16352, -8168 }, - { -16368, -8180 } -}; - -/** - * Table E3.6, Gk=2 & Gk=4, B - * Large mantissa inverse quantization, negative mantissa remapping offsets - * ff_eac3_gaq_remap_3_4_b[hebap-8][Gk=2,4] - */ -const int16_t ff_eac3_gaq_remap_2_4_b[9][2] = { - { -5461, -1170 }, - { -11703, -4915 }, - { -14199, -6606 }, - { -15327, -7412 }, - { -15864, -7805 }, - { -16126, -7999 }, - { -16255, -8096 }, - { -16320, -8144 }, - { -16352, -8168 } -}; - -static const int16_t vq_hebap1[4][6] = { -{ 7167, 4739, 1106, 4269, 10412, 4820}, -{ -5702, -3187, -14483, -1392, -2027, 849}, -{ 633, 6199, 7009, -12779, -2306, -2636}, -{ -1468, -7031, 7592, 10617, -5946, -3062}, -}; -static const int16_t vq_hebap2[8][6] = { -{ -12073, 608, -7019, 590, 4000, 869}, -{ 6692, 15689, -6178, -9239, -74, 133}, -{ 1855, -989, 20596, -2920, -4475, 225}, -{ -1194, -3901, -821, -6566, -875, -20298}, -{ -2762, -3181, -4094, -5623, -16945, 9765}, -{ 1547, 6839, 1980, 20233, -1071, -4986}, -{ 6221, -17915, -5516, 6266, 358, 1162}, -{ 3753, -1066, 4283, -3227, 15928, 10186}, -}; -static const int16_t vq_hebap3[16][6] = { -{ -10028, 20779, 10982, -4560, 798, -68}, -{ 11050, 20490, -6617, -5342, -1797, -1631}, -{ 3977, -542, 7118, -1166, 18844, 14678}, -{ -4320, -96, -7295, -492, -22050, -4277}, -{ 2692, 5856, 5530, 21862, -7212, -5325}, -{ -135, -23391, 962, 8115, -644, 382}, -{ -1563, 3400, -3299, 4693, -6892, 22398}, -{ 3535, 3030, 7296, 6214, 20476, -12099}, -{ 57, -6823, 1848, -22349, -5919, 6823}, -{ -821, -3655, -387, -6253, -1735, -22373}, -{ -6046, 1586, -18890, -14392, 9214, 705}, -{ -5716, 264, -17964, 14618, 7921, -337}, -{ -110, 108, 8, 74, -89, -50}, -{ 6612, -1517, 21687, -1658, -7949, -246}, -{ 21667, -6335, -8290, -101, -1349, -22}, -{ -22003, -6476, 7974, 648, 2054, -331}, -}; -static const int16_t vq_hebap4[32][6] = { -{ 6636, -4593, 14173, -17297, -16523, 864}, -{ 3658, 22540, 104, -1763, -84, 6}, -{ 21580, -17815, -7282, -1575, -2078, -320}, -{ -2233, 10017, -2728, 14938, -13640, -17659}, -{ -1564, -17738, -19161, 13735, 2757, 2951}, -{ 4520, 5510, 7393, 10799, 19231, -13770}, -{ 399, 2976, -1099, 5013, -1159, 22095}, -{ 3624, -2359, 4680, -2238, 22702, 3765}, -{ -4201, -8285, -6810, -12390, -18414, 15382}, -{ -5198, -6869, -10047, -8364, -16022, -20562}, -{ -142, -22671, -368, 4391, -464, -13}, -{ 814, -1118, -1089, -22019, 74, 1553}, -{ -1618, 19222, -17642, -13490, 842, -2309}, -{ 4689, 16490, 20813, -15387, -4164, -3968}, -{ -3308, 11214, -13542, 13599, -19473, 13770}, -{ 1817, 854, 21225, -966, -1643, -268}, -{ -2587, -107, -20154, 376, 1174, -304}, -{ -2919, 453, -5390, 750, -22034, -978}, -{ -19012, 16839, 10000, -3580, 2211, 1459}, -{ 1363, -2658, -33, -4067, 1165, -21985}, -{ -8592, -2760, -17520, -15985, 14897, 1323}, -{ 652, -9331, 3253, -14622, 12181, 19692}, -{ -6361, 5773, -15395, 17291, 16590, -2922}, -{ -661, -601, 1609, 22610, 992, -1045}, -{ 4961, 9107, 11225, 7829, 16320, 18627}, -{ -21872, -1433, 138, 1470, -1891, -196}, -{ -19499, -18203, 11056, -516, 2543, -2249}, -{ -1196, -17574, 20150, 11462, -401, 2619}, -{ 4638, -8154, 11891, -15759, 17615, -14955}, -{ -83, 278, 323, 55, -154, 232}, -{ 7788, 1462, 18395, 15296, -15763, -1131}, -}; -static const int16_t vq_hebap5[128][6] = { -{ -3394, -19730, 2963, 9590, 4660, 19673}, -{ -15665, -6405, 17671, 3860, -8232, -19429}, -{ 4467, 412, -17873, -8037, 691, -17307}, -{ 3580, 2363, 6886, 3763, 6379, -20522}, -{ -17230, -14133, -1396, -23939, 8373, -12537}, -{ -8073, -21469, -15638, 3214, 8105, -5965}, -{ 4343, 5169, 2683, -16822, -5146, -16558}, -{ 6348, -10668, 12995, -25500, -22090, 4091}, -{ -2880, -8366, -5968, -17158, -2638, 23132}, -{ -5095, -14281, -22371, 21741, 3689, 2961}, -{ -2443, -17739, 25155, 2707, 1594, 7}, -{ -18379, 9010, 4270, 731, -426, -640}, -{ -23695, 24732, 5642, 612, -308, -964}, -{ -767, 1268, 225, 1635, 173, 916}, -{ 5455, 6493, 4902, 10560, 23041, -17140}, -{ 17219, -21054, -18716, 4936, -3420, 3357}, -{ -1390, 15488, -21946, -14611, 1339, 542}, -{ -6866, -2254, -12070, -3075, -19981, -20622}, -{ -1803, 11775, 1343, 8917, 693, 24497}, -{ -21610, 9462, 4681, 9254, -7815, 15904}, -{ -5559, -3018, -9169, -1347, -22547, 12868}, -{ -366, 5076, -1727, 20427, -283, -2923}, -{ -1886, -6313, -939, -2081, -1399, 3513}, -{ -3161, -537, -5075, 11268, 19396, 989}, -{ 2345, 4153, 5769, -4273, 233, -399}, -{ -21894, -1138, -16474, 5902, 5488, -3211}, -{ 10007, -12530, 18829, 20932, -1158, 1790}, -{ -1165, 5014, -1199, 6415, -8418, -21038}, -{ 1892, -3534, 3815, -5846, 16427, 20288}, -{ -2664, -11627, -4147, -18311, -22710, 14848}, -{ 17256, 10419, 7764, 12040, 18956, 2525}, -{ -21419, -18685, -10897, 4368, -7051, 4539}, -{ -1574, 2050, 5760, 24756, 15983, 17678}, -{ -538, -22867, 11067, 10301, 385, 528}, -{ -8465, -3025, -16357, -23237, 16491, 3654}, -{ 5840, 575, 11890, 1947, 25157, 6653}, -{ 6625, -3516, -1964, 3850, -390, -116}, -{ 18005, 20900, 14323, -7621, -10922, 11802}, -{ -4857, -2932, -13334, -7815, 21622, 2267}, -{ -579, -9431, -748, -21321, 12367, 8265}, -{ -8317, 1375, -17847, 2921, 9062, 22046}, -{ 18398, 8635, -1503, -2418, -18295, -14734}, -{ -2987, 15129, -3331, 22300, 13878, -13639}, -{ 5874, -19026, 15587, 11350, -20738, 1971}, -{ 1581, -6955, -21440, 2455, 65, 414}, -{ 515, -4468, -665, -4672, 125, -19222}, -{ 21495, -20301, -1872, -1926, -211, -1022}, -{ 5189, -12250, -1775, -23550, -4546, 5813}, -{ 321, -6331, 14646, 6975, -1773, 867}, -{ -13814, 3180, 7927, 444, 19552, 3146}, -{ -6660, 12252, -1972, 17408, -24280, -12956}, -{ -745, 14356, -1107, 23742, -9631, -18344}, -{ 18284, -7909, -7531, 19118, 7721, -12659}, -{ 1926, 15101, -12848, 2153, 21631, 1864}, -{ -2130, 23416, 17056, -15597, -1544, 87}, -{ 8314, -11824, 14581, -20591, 7891, -2099}, -{ 19600, 22814, -17304, -2040, 285, -3863}, -{ -8214, -18322, 10724, -13744, -13469, -1666}, -{ 14351, 4880, -20034, 964, -4221, -180}, -{ -24598, -16635, 19724, 5925, 4777, 4414}, -{ -2495, 23493, -16141, 2918, -1038, -2010}, -{ 18974, -2540, 13343, 1405, -6194, -1136}, -{ 2489, 13670, 22638, -7311, -129, -2792}, -{ -13962, 16775, 23012, 728, 3397, 162}, -{ 3038, 993, 8774, -21969, -6609, 910}, -{ -12444, -22386, -2626, -5295, 19520, 9872}, -{ -1911, -18274, -18506, -14962, 4760, 7119}, -{ 8298, -2978, 25886, 7660, -7897, 1020}, -{ 6132, 15127, 18757, -24370, -6529, -6627}, -{ 7924, 12125, -9459, -23962, 5502, 937}, -{ -17056, -5373, 2522, 327, 1129, -390}, -{ 15774, 19955, -10380, 11172, -3107, 14853}, -{ -11904, -8091, -17928, -22287, -17237, -6803}, -{ -12862, -2172, -6509, 5927, 12458, -22355}, -{ -497, 322, 1038, -6643, -5404, 20311}, -{ 1083, -22984, -8494, 12130, -762, 2623}, -{ 5067, 19712, -1901, -30, -325, 85}, -{ 987, -5830, 4212, -9030, 9121, -25038}, -{ -7868, 7284, -12292, 12914, -21592, 20941}, -{ -1630, -7694, -2187, -8525, -5604, -25196}, -{ -6668, 388, -22535, 1526, 9082, 193}, -{ -7867, -22308, 5163, 362, 944, -259}, -{ 3824, -11850, 7591, -23176, 25342, 23771}, -{ -10504, 4123, -21111, 21173, 22439, -838}, -{ -4723, 21795, 6184, -122, 1642, -717}, -{ 24504, 19887, -2043, 986, 7, -55}, -{ -27313, -135, 2437, 259, 89, 307}, -{ 24446, -3873, -5391, -820, -2387, 361}, -{ 5529, 5784, 18682, 242, -21896, -4003}, -{ 22304, 4483, 722, -12242, 7570, 15448}, -{ 8673, 3009, 20437, 21108, -21100, -3080}, -{ -1132, 2705, -1825, 5420, -785, 18532}, -{ 16932, -13517, -16509, -14858, -20327, -14221}, -{ 2219, 1380, 21474, -1128, 327, 83}, -{ -2177, 21517, -3856, -14180, -204, -2191}, -{ 953, -9426, 15874, -10710, -3231, 21030}, -{ -421, -1377, 640, -8239, -20976, 2174}, -{ 4309, 18514, -9100, -18319, -15518, 3704}, -{ -5943, 449, -8387, 1075, -22210, -4992}, -{ 2953, 12788, 18285, 1430, 14937, 21731}, -{ -2913, 401, -4739, -20105, 1699, -1147}, -{ 3449, 5241, 8853, 22134, -7547, 1451}, -{ -2154, 8584, 18120, -15614, 19319, -5991}, -{ 3501, 2841, 5897, 6397, 8630, 23018}, -{ 2467, 2956, 379, 5703, -22047, -2189}, -{ -16963, -594, 18822, -5295, 1640, 774}, -{ 2896, -1424, 3586, -2292, 19910, -1822}, -{ -18575, 21219, -14001, -12573, 16466, 635}, -{ -1998, -19314, -16527, 12208, -16576, -7854}, -{ -9674, 1012, -21645, 2883, -12712, 2321}, -{ -1005, 471, -3629, 8045, -11087, 25533}, -{ 4141, -21472, -2673, 756, -663, -523}, -{ 6490, 8531, 19289, 18949, 6092, -9347}, -{ 16965, 24599, 14024, 10072, -536, -10438}, -{ -8147, 2145, -23028, -17073, 5451, -4401}, -{ -14873, 20520, -18303, -9717, -11885, -17831}, -{ -2290, -14120, 2070, 22467, 1671, 725}, -{ -8538, 14629, 3521, -20577, 6673, 8200}, -{ 20248, 4410, -1366, -585, 1229, -2449}, -{ 7467, -7148, 13667, -8246, 22392, -17320}, -{ -1932, 3875, -9064, -3812, 958, 265}, -{ -4399, 2959, -15911, 19598, 4954, -1105}, -{ 18009, -9923, -18137, -3862, 11178, 5821}, -{ -14596, -1227, 9660, 21619, 11228, -11721}, -{ -721, -1700, 109, -2142, 61, -6772}, -{ -24619, -22520, 5608, -1957, -1761, -1012}, -{ -23728, -4451, -2688, -14679, -4266, 9919}, -{ 8495, -894, 20438, -13820, -17267, 139}, -}; -static const int16_t vq_hebap6[256][6] = { -{ 10154, 7365, 16861, 18681, -22893, -3636}, -{ -2619, -3788, -5529, -5192, -9009, -20298}, -{ -5583, -22800, 21297, 7012, 745, 720}, -{ 428, -1459, 109, -3082, 361, -8403}, -{ 8161, 22401, 241, 1755, -874, -2824}, -{ 1140, 12643, 2306, 22263, -25146, -17557}, -{ -2609, 3379, 10337, -19730, -15468, -23944}, -{ -4040, -12796, -25772, 13096, 3905, 1315}, -{ 4624, -23799, 13608, 25317, -1175, 2173}, -{ -97, 13747, -5122, 23255, 4214, -22145}, -{ 6878, -322, 18264, -854, -11916, -733}, -{ 17280, -12669, -9693, 23563, -16240, -1309}, -{ 5802, -4968, 19526, -21194, -24622, -183}, -{ 5851, -16137, 15229, -9496, -1538, 377}, -{ 14096, 25057, 13419, 8290, 23320, 16818}, -{ -7261, 118, -15867, 19097, 9781, -277}, -{ -4288, 21589, -13288, -16259, 16633, -4862}, -{ 4909, -19217, 23411, 14705, -722, 125}, -{ 19462, -4732, -1928, -11527, 20770, 5425}, -{ -27562, -2881, -4331, 384, -2103, 1367}, -{ -266, -9175, 5441, 26333, -1924, 4221}, -{ -2970, -20170, -21816, 5450, -7426, 5344}, -{ -221, -6696, 603, -9140, 1308, -27506}, -{ 9621, -8380, -1967, 9403, -1651, 22817}, -{ 7566, -5250, -4165, 1385, -990, 560}, -{ -1262, 24738, -19057, 10741, 7585, -7098}, -{ 451, 20130, -9949, -6015, -2188, -1458}, -{ 22249, 9380, 9096, 10959, -2365, -3724}, -{ 18668, -650, -1234, 11092, 7678, 5969}, -{ 19207, -1485, -1076, -731, -684, 43}, -{ -4973, 13430, 20139, 60, 476, -935}, -{ -20029, 8710, 2499, 1016, -1158, 335}, -{ -26413, 18598, -2201, -669, 3409, 793}, -{ -4726, 8875, -24607, -9646, 3643, -283}, -{ 13303, -21404, -3691, -1184, -1970, 1612}, -{ 173, 60, 919, 1229, 6942, -665}, -{ 16377, 16991, 5341, -14015, -2304, -20390}, -{ 25334, -10609, 11947, -7653, -6363, 14058}, -{ 23929, -13259, -7226, -937, 234, -187}, -{ 6311, -1877, 12506, -1879, 18751, -23341}, -{ 621, 6445, 3354, -24274, 8406, 5315}, -{ -3297, -5034, -4704, -5080, -25730, 5347}, -{ -1275, -13295, -965, -23318, 1214, 26259}, -{ -6252, 10035, -20105, 15301, -16073, 5136}, -{ 9562, -3911, -19510, 4745, 22270, -4171}, -{ 7978, -19600, 14024, -5745, -20855, 8939}, -{ 7, -4039, 991, -6065, 52, -19423}, -{ 3485, 2969, 7732, 7786, 25312, 6206}, -{ -959, -12812, -1840, -22743, 7324, 10830}, -{ -4686, 1678, -10172, -5205, 4294, -1271}, -{ 3889, 1302, 7450, 638, 20374, -3133}, -{ -12496, -9123, 18463, -12343, -7238, 18552}, -{ -6185, 8649, -6903, -895, 17109, 16604}, -{ -9896, 28579, 2845, 1640, 2925, -298}, -{ 14968, -25988, 14878, -24012, 1815, -6474}, -{ 26107, 5166, 21225, 15873, 21617, 14825}, -{ -21684, 16438, 20504, -14346, -7114, -4162}, -{ 28647, 90, -1572, 789, -902, -75}, -{ -1479, 2471, -4061, 3612, -2240, 10914}, -{ 8616, 17491, 17255, -17456, 17022, -16357}, -{ -20722, -18597, 25274, 17720, -3573, 1695}, -{ -997, 6129, -6303, 11250, -11359, -19739}, -{ -74, -4001, -1584, 13384, 162, -144}, -{ -529, 21068, 7923, -11396, 422, -26}, -{ 7102, -13531, -20055, 2629, -178, -429}, -{ 9201, 1368, -22238, 2623, -20499, 24889}, -{ -432, 6675, -266, 8723, 80, 28024}, -{ 19493, -3108, -9261, 1910, -21777, 5345}, -{ 14079, -11489, 12604, 6079, 19877, 1315}, -{ 10947, 9837, -18612, 15742, 4792, 605}, -{ -1777, 3758, -4087, 21696, 6024, -576}, -{ 3567, -3578, 16379, 2680, -1752, 716}, -{ -5049, -1399, -4550, -652, -17721, -3366}, -{ -3635, -4372, -6522, -22152, 7382, 1458}, -{ 12242, 19190, 5646, -7815, -20289, 21344}, -{ -7508, 19952, 23542, -9753, 5669, -1990}, -{ -2275, 15438, 10907, -17879, 6497, 13582}, -{ -15894, -15646, -4716, 6019, 24250, -6179}, -{ -2049, -6856, -1208, 918, 17735, -69}, -{ -3721, 9099, -16065, -23621, 5981, -2344}, -{ 7862, -8918, 24033, 25508, -11033, -741}, -{ -12588, 19468, 14649, 15451, -21226, 1171}, -{ 2102, 1147, 2789, 4096, 2179, 8750}, -{ -18214, -17758, -10366, -5203, -1066, -3541}, -{ -2819, -19958, -11921, 6032, 8315, 10374}, -{ -9078, -2100, 19431, -17, 732, -689}, -{ -14512, -19224, -7095, 18727, 1870, 22906}, -{ 3912, 659, 25597, -4006, 9619, 877}, -{ 2616, 22695, -5770, 17920, 3812, 20220}, -{ 2561, 26847, -5245, -10908, 2256, -517}, -{ -4974, 198, -21983, -3608, 22174, -18924}, -{ 21308, -1211, 19144, 16691, -1588, 11390}, -{ -1790, 3959, -3488, 7003, -7107, 20877}, -{ -6108, -17955, -18722, 24763, 16508, 3211}, -{ 20462, -24987, -20361, 4484, -5111, -478}, -{ -6378, -1998, -10229, -561, -22039, -22339}, -{ 3047, -18850, 7586, 14743, -19862, 6351}, -{ -5047, 1405, -9672, 1055, -21881, 11170}, -{ 3481, -9699, 6526, -16655, 22813, 21907}, -{ -18570, 17501, 14664, 1291, 5026, 19676}, -{ 16134, -19810, -16956, -17939, -16933, 5800}, -{ -8224, 4908, 8935, 2272, -1140, -23217}, -{ 1572, 2753, -1598, 2143, -3346, -21926}, -{ -9832, -1060, -27818, 1214, 7289, 150}, -{ 98, 1538, 535, 17429, -23198, -901}, -{ 21340, -20146, 3297, -1744, -8207, -21462}, -{ -4166, -4633, -17902, 5478, 1285, 136}, -{ 18713, 21003, 24818, 11421, 1282, -4618}, -{ -3535, 7636, -265, 2141, -829, -2035}, -{ -3184, 19713, 2775, -2, 1090, 104}, -{ -6771, -20185, 2938, -2125, -36, 1268}, -{ 9560, 9430, 9586, 22100, 13827, 6296}, -{ -535, -20018, 4276, -1868, -448, -17183}, -{ -24352, 14244, -13647, -21040, 2271, 11555}, -{ -2646, 15437, -4589, 18638, -4299, -622}, -{ -20064, 4169, 18115, -1404, 13722, -1825}, -{ -16359, 9080, 744, 22021, 125, 10794}, -{ 9644, -14607, -18479, -14714, 11174, -20754}, -{ -326, -23762, 6144, 7909, 602, 1540}, -{ -6650, 6634, -12683, 21396, 20785, -6839}, -{ 4252, -21043, 5628, 18687, 23860, 8328}, -{ 17986, 5704, -5245, -18093, -555, 3219}, -{ 6091, 14232, -5117, -17456, -19452, -11649}, -{ -21586, 11302, 15434, 25590, 6777, -26683}, -{ 21355, -8244, 5877, -3540, 6079, -2567}, -{ 2603, -2455, 5421, -12286, -19100, 5574}, -{ -1721, -26393, -23664, 22904, -349, 3787}, -{ 2189, -1203, 5340, 3249, -22617, 104}, -{ -1664, -11020, -2857, -20723, -24049, 19900}, -{ 22873, -7345, -18481, -14616, -8400, -12965}, -{ 3777, 3958, 8239, 20494, -6991, -1201}, -{ -160, -1613, -793, -8681, 573, 776}, -{ 4297, -3786, 20373, 6082, -5321, -18400}, -{ 18745, 2463, 12546, -7749, -7734, -2183}, -{ 11074, -4720, 22119, 1825, -24351, 4080}, -{ 1503, -19178, -1569, 13, -313, 375}, -{ 318, -575, 2544, 178, 102, 40}, -{ -15996, -26897, 5008, 3320, 686, 1159}, -{ 25755, 26886, 574, -5930, -3916, 1407}, -{ -9148, -7665, -2875, -8384, -18663, 26400}, -{ -7445, -18040, -18396, 8802, -2252, -21886}, -{ 7851, 11773, 27485, -12847, -1410, 19590}, -{ 2240, 5947, 11247, 15980, -6499, 24280}, -{ 21673, -18515, 9771, 6550, -2730, 334}, -{ -4149, 1576, -11010, 89, -24429, -5710}, -{ 7720, 1478, 21412, -25025, -8385, 9}, -{ -2448, 10218, -12756, -16079, 1161, -21284}, -{ -8757, -14429, -22918, -14812, 2629, 13844}, -{ -7252, 2843, -9639, 2882, -14625, 24497}, -{ -674, -6530, 414, -23333, -21343, 454}, -{ 2104, -6312, 10887, 18087, -1199, 175}, -{ -493, -562, -2739, 118, -1074, 93}, -{ -10011, -4075, -28071, 22180, 15077, -636}, -{ -4637, -16408, -9003, -20418, -11608, -20932}, -{ 4815, 15892, 24238, -13634, -3074, -1059}, -{ -6724, 4610, -18772, -15283, -16685, 23988}, -{ 15349, -674, -3682, 21679, 4475, -12088}, -{ 4756, 2593, 5354, 6001, 15063, 26490}, -{ -23815, -17251, 6944, 378, 694, 670}, -{ 23392, -8839, -14713, 7544, -876, 11088}, -{ 3640, 3336, 22593, -3495, -2328, -113}, -{ 284, 6914, 3097, 10171, 6638, -18621}, -{ 2472, 5976, 11054, -11936, -603, -663}, -{ 16175, 16441, 13164, -4043, 4667, 7431}, -{ 19338, 15534, -6533, 1681, -4857, 17048}, -{ 17027, 532, -19064, -1441, -5130, 1085}, -{ -12617, -17609, 2062, -25332, 19009, -16121}, -{ 10056, -21000, -13634, -2949, 15367, 19934}, -{ -648, -1605, 10046, -1592, 13296, 19808}, -{ -1054, 10744, 538, 24938, 9630, -9052}, -{ -10099, 3042, -25076, -24052, 13971, 100}, -{ 6547, 6907, 7031, 10348, 23775, -17886}, -{ -22793, -1984, -1393, -3330, 9267, 14317}, -{ -14346, -3967, 3042, 16254, -17303, 9646}, -{ -21393, 23628, 16773, 716, 2663, 114}, -{ -19016, -3038, 1574, -245, 1463, -793}, -{ 22410, 23441, -14637, -530, 17310, 13617}, -{ -11582, 7935, -13954, 23465, -24628, 26550}, -{ -1045, 3679, -2218, 10572, 20999, -3702}, -{ -15513, 197, 16718, -24603, 4945, 5}, -{ 10781, 4335, 26790, -9059, -16152, -2840}, -{ 16075, -24100, -3933, -6833, 12645, -7029}, -{ 2096, -25572, -8370, 6814, 11, 1178}, -{ -11848, -583, -8889, -20543, -10471, -380}, -{ -2487, 24777, -21639, -19341, 1660, -732}, -{ 2313, 13679, 4085, 24549, 24691, -21179}, -{ -2366, -504, -4130, -10570, 23668, 1961}, -{ 20379, 17809, -9506, 3733, -18954, -6292}, -{ -3856, 16802, -929, -20310, -17739, 6797}, -{ 12431, 6078, -11272, -14450, 6913, 23476}, -{ 7636, -1655, 23017, 10719, -8292, 838}, -{ -8559, -1235, -18096, 3897, 16093, 1490}, -{ -3586, 8276, 15165, -3791, -21149, 1741}, -{ -4497, 21739, 2366, -278, -4792, 15549}, -{ -23122, -13708, 7668, 16232, 24120, 15025}, -{ -20043, 12821, -20160, 16691, -11655, -16081}, -{ -12601, 20239, 3496, -2549, -6745, -11850}, -{ 4441, 7812, 20783, 17080, 11523, -9643}, -{ 24766, 8494, -23298, -3262, 11101, -7120}, -{ -10107, -7623, -22152, -18303, 26645, 9550}, -{ -25549, 477, 7874, -1538, 1123, -168}, -{ 470, 9834, -347, 23945, -10381, -9467}, -{ -4096, -9702, -6856, -21544, 20845, 7174}, -{ 5370, 9748, -23765, -1190, 512, -1538}, -{ -1006, -10046, -12649, 19234, -1790, -890}, -{ 15108, 23620, -15646, -2522, -1203, -1325}, -{ -7406, -2605, 1095, -247, -473, 177}, -{ 8089, 4, 12424, -22284, 10405, -7728}, -{ 22196, 10775, -5043, 690, 534, -212}, -{ -3153, -1418, -16835, 18426, 15821, 22956}, -{ 5681, -2229, 3196, -3414, -21817, -14807}, -{ 19, 787, 1032, 170, -8295, -645}, -{ -882, -2319, -27105, 432, -4392, 1499}, -{ -1354, -11819, -76, -20380, -10293, 11328}, -{ 211, -4753, -4675, -6933, -13538, 14479}, -{ 6043, 5260, -459, -462, 143, -65}, -{ -2572, 7256, -3317, 9212, -23184, -9990}, -{ -24882, -9532, 18874, 6101, 2429, -14482}, -{ 8314, 2277, 14192, 3512, 25881, 22000}, -{ 208, 20218, -281, -24778, -63, -1183}, -{ 1095, -6034, 2706, -21935, -2655, 563}, -{ 23, -5930, 243, -8989, 5345, 20558}, -{ -15466, 12699, 4160, 11087, 20621, -10416}, -{ 20995, -85, -8468, 194, 1003, -9515}, -{ -19637, -3335, -14081, 3574, -23381, -667}, -{ -2076, 3489, -3192, -19367, 539, -1530}, -{ 7352, -15213, 22596, 19369, 1043, 16627}, -{ -1872, -413, 1235, -5276, -3550, 21903}, -{ 7931, -2008, 16968, -6799, 29393, -2475}, -{ -13589, 8389, -23636, -22091, -14178, -14297}, -{ -11575, -20090, 16056, -1848, 15721, 4500}, -{ 3849, -16581, 20161, -21155, 7778, 11864}, -{ -6547, -1273, -18837, -11218, 11636, 1044}, -{ 2528, -6691, -17917, -11362, -4894, -1008}, -{ 1241, 4260, 2319, 6111, 3485, 20209}, -{ 3014, -3048, 5316, -4539, 20831, 8702}, -{ -1790, -14683, 278, 13956, -10065, -10547}, -{ -22732, -7957, -1154, 13821, -1484, -1247}, -{ -7317, -615, 13094, 18927, 9897, 1452}, -{ 2552, -2338, 3424, -4630, 11124, -19584}, -{ -11125, -20553, -10855, -10783, -20767, 6833}, -{ 984, -15095, 5775, 25125, 5377, -19799}, -{ 517, 13272, -7458, -1711, 20612, -6013}, -{ -21417, 13251, -20795, 13449, 17281, 13104}, -{ -15811, -16248, 23093, -4037, -8195, 871}, -{ 582, 12571, -21129, -14766, -9187, 5685}, -{ 4318, -1776, 11425, -17763, -9921, 577}, -{ 6013, 16830, 17655, -25766, -4400, -3550}, -{ -13744, -16541, 3636, -3330, -21091, -15886}, -{ 6565, -11147, 8649, -13114, 23345, -13565}, -{ -2542, -9046, -7558, 29240, 3701, -383}, -{ -10612, 24995, 1893, -8210, 20920, -16210}, -{ 5276, 16726, 10659, 19940, -4799, -19324}, -{ -532, -9300, 27856, 4965, -241, 536}, -{ -765, -20706, -3412, 18870, 2765, 1420}, -{ -3059, 2708, -19022, -331, 3537, 116}, -}; -static const int16_t vq_hebap7[512][6] = { -{ -21173, 21893, 10390, 13646, 10718, -9177}, -{ -22519, -8193, 18328, -6629, 25518, -10848}, -{ 6800, -13758, -13278, 22418, 14667, -20938}, -{ 2347, 10516, 1125, -3455, 5569, 27136}, -{ -6617, 11851, -24524, 22937, 20362, -6019}, -{ -21768, 10681, -19615, -15021, -8478, -2081}, -{ -2745, 8684, -4895, 27739, 7554, -11961}, -{ -1020, 2460, -954, 4754, -627, -16368}, -{ -19702, 23097, 75, -13684, -2644, 2108}, -{ 4049, -2872, 5851, -4459, 22150, 12560}, -{ -21304, -17129, -730, 7419, -11658, -10523}, -{ 11332, 1792, 26666, 23518, -19561, -491}, -{ -17827, -16777, -13606, -14389, -22029, -2464}, -{ 1091, -5967, -7975, -16977, -20432, -21931}, -{ 18388, -1103, 1933, 13342, -17463, 18114}, -{ 22646, 17345, -9966, 17919, 18274, 698}, -{ 1484, 20297, -5754, -26515, 4941, -22263}, -{ -2603, 4587, -5842, 18464, 8767, -2568}, -{ -2797, -1602, 21713, 3099, -25683, 3224}, -{ -19027, 4693, -5007, 6060, 1972, -15095}, -{ -2189, 9516, -530, 20669, -4662, -8301}, -{ -22325, -8887, 2529, -11352, 5476, 998}, -{ 22100, -5052, 1651, -2657, 4615, 2319}, -{ 20855, -3078, -3330, 4105, 13470, 3069}, -{ 85, 17289, 10264, -14752, 214, 90}, -{ -26365, -18849, -19352, 19244, -10218, 9909}, -{ -9739, 20497, -6579, -6983, 2891, -738}, -{ 20575, -15860, -22913, 6870, 76, 327}, -{ 8744, -12877, -22945, -2372, -19424, -9771}, -{ -12886, 16183, 21084, 3821, 749, -13792}, -{ -15995, 18399, 2391, -17661, 19484, -6018}, -{ 1423, 11734, 4051, 19290, 6857, -19681}, -{ -5200, 9766, 18246, 2463, 18764, -4852}, -{ -597, 19498, 1323, -9096, -308, -1104}, -{ -3099, -25731, -15665, 25332, 4634, 2635}, -{ 19623, -2384, -7913, 11796, -9333, -14084}, -{ 2642, 26453, -21091, -10354, -1693, -1711}, -{ 22031, 21625, 11580, -22915, -4141, 129}, -{ -6122, 3542, 915, -261, -17, -383}, -{ 1696, 6704, -1425, 20838, 857, -4416}, -{ 1423, -15280, -8550, -9667, 5210, 5687}, -{ -4520, -613, -11683, 5618, 4230, 619}, -{ 937, -4963, -14102, -17104, -6906, -5952}, -{ -15068, -481, -7237, -14894, 18876, 21673}, -{ -25658, 2910, 1143, -327, -458, -995}, -{ -9656, -819, -24900, 2804, 20225, 1083}, -{ -1111, -3682, -1788, -19492, 966, 821}, -{ 7293, -21759, 10790, -7059, -23293, -1723}, -{ -282, -11093, 170, -20950, -28926, 12615}, -{ 17938, 3713, -1563, 885, 5, 564}, -{ 6116, 22696, 2242, -6951, 9975, -6132}, -{ 4338, 26808, -3705, 1976, -1079, -2570}, -{ -661, -7901, -2668, -15194, 17722, 4375}, -{ -4174, -11053, 717, -22506, 1562, 12252}, -{ -6405, 18334, 6103, 6983, 5956, 18195}, -{ 9851, 5370, 23604, -6861, -6569, -62}, -{ 21964, 13359, -683, 3785, 2168, 209}, -{ -3569, -1127, -19724, -1544, 1308, -803}, -{ -3083, 16049, -13791, -3077, 4294, 23713}, -{ -9999, 9943, -15872, 12934, -23631, 21699}, -{ 9722, 22837, 12192, 15091, 5533, 4837}, -{ 2243, 2099, 1243, 4089, 4748, 12956}, -{ 4007, -2468, 3353, -3092, 8843, 17024}, -{ 4330, 6127, 5549, 9249, 11226, 28592}, -{ -9586, -8825, 236, 1009, 455, -964}, -{ 6829, 19290, -1018, 200, 1821, 578}, -{ 5196, 957, 10372, 3330, -12800, -127}, -{ -3022, -8193, -14557, 22061, 5920, 1053}, -{ 10982, 25942, -24546, -23278, -11905, -6789}, -{ 22667, -11010, 5736, 2567, 23705, -10253}, -{ -3343, -4233, -5458, 20667, -10843, -3605}, -{ -4131, -3612, 4575, -829, -350, -847}, -{ -3303, 3451, -7398, -11604, 3023, 455}, -{ 3200, -9547, 3202, -22893, 11184, -26466}, -{ -14093, -4117, 15382, 14295, -10915, -20377}, -{ 3807, -11016, 22052, 14370, -15328, -7733}, -{ -6291, -17719, -1560, 12048, -19805, -443}, -{ -6147, -4234, -160, 8363, 22638, 11911}, -{ 19197, 1175, 7422, -9875, -4136, 4704}, -{ -72, -7652, -112, -11955, -3230, 27175}, -{ 3274, 5963, 7501, -17019, 866, -25452}, -{ 737, 1861, 1833, 2022, 2384, 4755}, -{ -5217, 7512, 3323, 2715, 3065, -1606}, -{ 4247, 565, 5629, 2497, 18019, -4920}, -{ -2833, -17920, -8062, 15738, -1018, 2136}, -{ 3050, -19483, 16930, 29835, -10222, 15153}, -{ -11346, 118, -25796, -13761, 15320, -468}, -{ -4824, 4960, -4263, 1575, -10593, 19561}, -{ -8203, -1409, -763, -1139, -607, 1408}, -{ -2203, -11415, 2021, -6388, -2600, 711}, -{ -413, -2511, -216, -3519, -28267, 1719}, -{ -14446, 17050, 13917, 13499, -25762, -16121}, -{ 19228, 7341, -12301, 682, -3791, -199}, -{ -4193, 20746, -15651, 11349, 5860, -824}, -{ -21490, -3546, -3, -1705, -3959, 9213}, -{ 15445, -1876, 2012, -19627, 16228, -4845}, -{ -2867, -3733, -7354, -175, -20119, 11174}, -{ -3571, -24587, 19700, 6654, 979, -654}, -{ 21820, -7430, -6639, -10767, -8362, 15543}, -{ 14827, 17977, -7204, -3409, 1906, -17288}, -{ 3525, -3947, -1415, -2798, 17648, 2082}, -{ -6580, -15255, -17913, 1337, 15338, 21158}, -{ 6210, 9698, 15155, -24666, -22507, -3999}, -{ -1740, -593, 1095, -7779, 25058, 5601}, -{ 21415, -432, -1658, -6898, -1438, -14454}, -{ -6943, 700, -12139, -745, -24187, 22466}, -{ 6287, 3283, 11006, 3844, 19184, 14781}, -{ -22502, 15274, 5443, -2808, -970, -3343}, -{ 3257, -3708, 4744, -8301, 22814, -10208}, -{ 24346, -20970, 19846, 987, -11958, -6277}, -{ 3906, -19701, 13060, -1609, 18641, 7466}, -{ -26409, -22549, 16305, 2014, 10975, 18032}, -{ -7039, 4655, -14818, 18739, 15789, 1296}, -{ 9310, -1681, 14667, -3326, 26535, -11853}, -{ 5728, 5917, 13400, 10020, -2236, -24704}, -{ 1741, -6727, 12695, -22009, 4080, 5450}, -{ -2621, 9393, 21143, -25938, -3162, -2529}, -{ 20672, 18894, -13939, 6990, -8260, 15811}, -{ -23818, 11183, -13639, 11868, 16045, 2630}, -{ 18361, -10220, 829, 856, -1010, 157}, -{ 14400, -4678, 5153, -13290, -27434, -11028}, -{ 21613, 11256, 17453, 7604, 13130, -484}, -{ 7, 1236, 573, 4214, 5576, -3081}, -{ 916, -9092, 1285, -8958, 1185, -28699}, -{ 21587, 23695, 19116, -2885, -14282, -8438}, -{ 23414, -6161, 12978, 3061, -9351, 2236}, -{ -3070, -7344, -20140, 5788, 582, -551}, -{ -3993, 315, -7773, 8224, -28082, -12465}, -{ 13766, -15357, 19205, -20624, 13043, -19247}, -{ 3777, -177, 8029, -1001, 17812, 5162}, -{ -7308, -4327, -18096, -620, -1350, 14932}, -{ 14756, -1221, -12819, -14922, -547, 27125}, -{ 2234, 1708, 2764, 5416, 7986, -25163}, -{ 2873, 3636, 3992, 5344, 10142, 21259}, -{ 1158, 5379, 508, -10514, 290, -1615}, -{ 1114, 24789, 16575, -25168, -298, -2832}, -{ -1107, -6144, -1918, -7791, -2971, -23276}, -{ 4016, 10793, 17317, -4342, -20982, -3383}, -{ -4494, -207, -9951, -3575, 7947, 1154}, -{ -7576, 8117, -14047, 16982, -26457, -27540}, -{ -15164, 16096, -16844, -8886, -23720, 15906}, -{ 24922, 5680, -1874, 420, 132, 117}, -{ -506, -19310, -198, 412, -311, 752}, -{ -1906, 3981, -7688, 16566, -19291, -14722}, -{ -399, -729, -3807, -4196, -12395, 7639}, -{ 3368, 2330, 9092, 23686, -10290, -1705}, -{ -3148, 2596, -7986, 14602, -4807, 16627}, -{ 8057, 1481, 49, 17205, 24869, 7474}, -{ -19304, -513, 11905, 2346, 5588, 3365}, -{ -5063, -21812, 11370, 10896, 4881, 261}, -{ 4794, 20577, 5109, -6025, -8049, -1521}, -{ 8125, -14756, 20639, -14918, 23941, -3650}, -{ 12451, 1381, 3613, 8687, -24002, 4848}, -{ 6726, 10643, 10086, 25217, -25159, -1065}, -{ 6561, 13977, 2911, 21737, 16465, -26050}, -{ -1776, 2575, -19606, -16800, 3032, 6679}, -{ 15012, -17910, -8438, -21554, -27111, 11808}, -{ 3448, -924, -15913, -1135, 5126, -20613}, -{ 7720, 2226, 17463, 5434, 28942, 17552}, -{ 1246, 15614, -11743, 24618, -17539, 3272}, -{ 3215, 17950, 2783, -722, -22672, 5979}, -{ -5678, -3184, -26087, 26034, 6583, 3302}, -{ 20310, -3555, -2715, -444, -1487, 1526}, -{ -20640, -21970, -12207, -25793, 8863, -1036}, -{ 17888, 570, -16102, 8329, -2553, 15275}, -{ -2677, 9950, -1879, 16477, -12762, -29007}, -{ -120, -2221, 219, 97, 365, 35}, -{ 1270, -718, 1480, -2689, 1930, -7527}, -{ 1896, 8750, 1906, 18235, -12692, -6174}, -{ -3733, 13713, -9882, -15960, -1376, -7146}, -{ -10600, 8496, 15967, -8792, 7532, 20439}, -{ 3041, -13457, 1032, -26952, 5787, 24984}, -{ -4590, -8220, -9322, -6112, -17243, 25745}, -{ -17808, 6970, 3752, 626, -114, 2178}, -{ 4449, -4862, 7054, -5404, 4738, -2827}, -{ 4922, -651, 18939, -9866, 848, 1886}, -{ -336, -5410, 7234, 20444, -9583, -600}, -{ 781, -19474, -12648, 6634, 1414, 450}, -{ -3399, -16770, 11107, 13200, -5498, 21663}, -{ -3265, 4859, -5961, 7530, -10837, 28086}, -{ 10350, -12901, 25699, 25640, -639, 351}, -{ 1163, 18763, -5466, -15087, -145, -1377}, -{ -14477, 27229, -31383, -32653, 21439, -2894}, -{ 15420, 18823, 22128, 19398, 22583, 13587}, -{ -10674, 10710, 5089, -4756, 909, -20760}, -{ -12948, -20660, 7410, 2722, 3427, 11585}, -{ -1105, 18374, 19731, -9650, 22442, 19634}, -{ -296, -6798, -14677, 21603, 19796, 21399}, -{ -19350, -7501, 25446, 13144, 8588, -25298}, -{ 3092, -10618, 20896, 9249, -3326, 1796}, -{ -811, 1449, 3106, 4748, 12073, -14262}, -{ -20720, 14275, -4332, -25838, -5781, -21149}, -{ -5132, 10554, -14020, -22150, 2840, -554}, -{ 25533, 17648, 14886, -21074, 2459, 25142}, -{ -9370, -1788, -12862, -5870, -25811, -11023}, -{ 6698, 819, 10313, 166, 27581, 523}, -{ 101, -19388, 3413, 9638, 64, 806}, -{ -2742, -17931, -2576, 22818, 8553, 1126}, -{ 2972, 15203, 1792, 25434, -5728, -17265}, -{ -1419, 1604, 4398, 11452, 1731, 23787}, -{ -5136, 4625, -10653, 27981, 9897, -2510}, -{ -10528, -28033, 2999, -1530, -832, -830}, -{ -11133, -12511, 22206, -7243, -23578, -21698}, -{ 16935, -21892, 1861, -9606, 9432, 19026}, -{ 10277, 9516, 26815, 2010, -4943, -9080}, -{ 5547, -2210, 14270, -15300, -19316, 1822}, -{ -4850, -783, -8959, -3076, -20056, -3197}, -{ 8232, -2794, -17752, 13308, 3229, -991}, -{ -12237, -6581, 10315, -9552, 2260, -20648}, -{ -7000, 5529, -7553, -7490, -10342, -10266}, -{ 3641, 19479, -5972, -19097, -18570, 12805}, -{ 1283, -4164, 4198, -28473, -2498, 1866}, -{ 16047, 26826, -13053, -6316, 985, -1597}, -{ -403, 13680, 6457, 25070, 27124, -20710}, -{ -18070, -1790, -24986, 5953, -954, 26600}, -{ -24224, -15383, 24788, 1953, -1136, 187}, -{ -2289, 12505, -20738, -904, 18324, 21258}, -{ 2658, -6140, 16179, 22276, -556, 2154}, -{ -6087, 13950, -25682, -27713, 4049, -4795}, -{ -21452, 26473, 19435, -9124, 895, 303}, -{ -22200, -26177, -6026, 24729, -22926, -9030}, -{ -14276, -15982, 23732, -22851, 9268, -3841}, -{ 29482, 21923, -6213, 1679, -2059, -1120}, -{ -435, 9802, -3891, 12359, -4288, -18971}, -{ 19768, -86, 2467, 1990, -1021, -5354}, -{ 20986, -8783, -5329, -23562, -4730, 2673}, -{ -5095, 5605, -4629, 19150, 26037, -12259}, -{ 972, 6858, 4551, 27949, -4025, -2272}, -{ 6075, -3260, -4989, -373, -1571, -3730}, -{ -7256, -12992, -8820, -5109, 23054, 5054}, -{ 920, 2615, 7912, -7353, -4905, 20186}, -{ -250, 5454, 3140, 6928, -18723, -2051}, -{ -10299, -4372, 19608, 4879, -661, -1885}, -{ 14816, -8603, -19815, 6135, -21210, 14108}, -{ -11945, -2223, 5018, 11892, 22741, 406}, -{ -13184, -2613, -13256, -22433, -12482, -8380}, -{ 17066, 25267, -2273, 5056, -342, 145}, -{ 8401, -17683, 19112, 10615, -19453, 17083}, -{ 20821, -5700, 12298, -25598, 10391, 7692}, -{ 4550, 15779, 17338, -19379, -4768, 1206}, -{ -7723, 10836, -27164, -11439, 6835, -1776}, -{ 2542, 3199, 4442, 17513, -3711, -914}, -{ 20960, -16774, -5814, 11087, -70, 22961}, -{ 3305, 2919, 6256, -4800, -20966, -3230}, -{ 5924, -16547, 2183, 2733, 3446, -23306}, -{ -6061, -194, -13852, -10971, 19488, 1029}, -{ 4467, -5964, -19004, 1519, -359, 855}, -{ -1581, -7607, 22070, -11580, -10032, 17102}, -{ -12412, 2553, 4324, 22500, 5751, 12170}, -{ -25127, 17996, -6384, 1180, 1182, 9622}, -{ 23462, -8471, -4392, -2669, 7638, -16835}, -{ -5511, -2887, -10757, -20883, 7246, 1053}, -{ 2703, -20602, -7554, 7516, -7740, 5868}, -{ 20670, 21901, 457, 14969, -17657, -11921}, -{ 3603, -1595, -2177, -157, -43, 605}, -{ 2513, 8954, 10527, 22559, -16100, -16041}, -{ 6002, 4951, 6795, -4862, -22400, 18849}, -{ 7590, -1693, -24688, -3404, 14169, 1214}, -{ -4398, -6663, -6870, -10083, -24596, 9253}, -{ 10468, 17751, -7748, 147, -6314, 4419}, -{ 16187, -16557, -4119, 4302, 7625, 5409}, -{ 3303, 2735, 7458, -19902, -2254, -3702}, -{ -2077, 21609, 14870, 12545, -6081, -1764}, -{ 4678, 11740, 2859, 6953, 1919, -3871}, -{ 3522, -21853, -2469, -10453, 18893, -10742}, -{ 3759, -10191, -4866, -2659, -17831, -1242}, -{ 14991, 9351, 11870, -1573, -4848, 22549}, -{ 9509, -27152, 10734, 20851, -26185, -17878}, -{ -7170, -1392, -19495, 12746, 8198, -1988}, -{ 1883, 28158, -846, -7235, 249, 233}, -{ -7200, 669, -371, -2948, 23234, -5635}, -{ 3141, 288, 3223, -1258, -98, -27607}, -{ 17373, -23235, 5110, -11199, -2574, -11487}, -{ -4928, 1518, -5456, 670, -18278, 1951}, -{ 10334, -19865, -4649, 361, -160, -923}, -{ 18732, 14264, -3155, -7485, -3328, 5959}, -{ -3614, 21077, 7276, 3536, 8121, -1528}, -{ -8422, 500, -19182, 18929, 26392, -1039}, -{ 15639, 25668, 8375, 1903, 1945, -11979}, -{ -2716, 3389, 26850, -4587, 1803, 22}, -{ 1177, -655, 1233, -2128, 7844, 1767}, -{ -761, 8209, -19290, -4593, 1923, -343}, -{ -689, -3530, -3267, -3804, -2753, 18566}, -{ -2110, 1962, -1353, 16643, 2765, -23102}, -{ -433, 4905, 302, 13016, 15933, -5905}, -{ 3203, 4126, 11181, -5496, -2529, -1160}, -{ -1091, -6469, -1415, 5682, -268, 583}, -{ -9405, -19572, 6216, 1658, 993, -75}, -{ -1695, -4504, -2289, -4088, -6556, -16577}, -{ 4760, -892, -10902, 6516, 24199, -6011}, -{ -253, 1000, 63, -81, -115, -382}, -{ -1333, 24224, -698, -4667, -2801, -19144}, -{ -876, -28866, -21873, 12677, -6344, 3235}, -{ 16847, 21145, -26172, -3183, -396, 230}, -{ 18296, -7790, -12857, -679, -1473, 5}, -{ -10488, 11429, 25805, -1122, 1401, -438}, -{ 3782, -7429, 26720, 17567, 19257, 12542}, -{ 6332, -746, 12789, 9316, -22542, -5354}, -{ 3418, -22728, 26978, 18303, 1076, 956}, -{ -27315, -2988, 920, 235, 2233, 81}, -{ 6199, 5296, 16093, 14768, -8429, -1112}, -{ -6432, 19244, 9921, -3253, 1278, -954}, -{ 24213, 2049, -22931, 2585, -2410, -4216}, -{ 9286, 14282, -19735, -3985, -2344, 1028}, -{ -20128, 17993, -9458, 23012, -16983, 8625}, -{ -6896, -20730, 3762, 17415, 22341, 19024}, -{ 842, 24181, 25062, -5839, -78, 937}, -{ -621, 19722, -24204, -1962, -14854, -56}, -{ 22766, -5119, 17365, 23868, -19480, -6558}, -{ -2158, 17490, -21435, 3340, -12819, -20295}, -{ -9621, 17325, 715, 2265, -4123, -492}, -{ 9156, 12947, 27303, -21175, -6072, -9457}, -{ -13164, -23269, -14006, -4184, 6978, 2}, -{ 938, -13381, 3520, -24297, 22902, 19589}, -{ -4911, -19774, 19764, -9310, -12650, 3819}, -{ -5462, -4249, -6987, -6260, -13943, -25150}, -{ 9341, 10369, -13862, -6704, 22556, -519}, -{ 6651, 18768, -4855, 12570, 14730, -10209}, -{ -823, 18119, 398, -1582, -116, -363}, -{ -6935, -12694, -28392, 8552, 6961, -239}, -{ -2602, -4704, -1021, 2015, 5129, 23670}, -{ -12559, -8190, -25028, 18544, 14179, 1663}, -{ 3813, 21036, -9620, -5051, -1800, -1087}, -{ -22057, 16675, 14960, 9459, 2786, 16991}, -{ -26040, -19318, -6414, 1104, 5798, -18039}, -{ -1737, 24825, 10417, -11087, 896, -5273}, -{ -1855, 11661, -2803, 24809, -21435, -19792}, -{ -23473, -16729, -5782, 5643, 2636, 4940}, -{ -1724, 4388, -26673, -13695, 10570, -25895}, -{ 15358, -19496, 26242, -18493, 1736, 8054}, -{ 5684, 20890, 4091, -19100, -14588, -10468}, -{ 17260, -16291, 14859, -17711, -19174, 12435}, -{ -27185, -12573, 6743, -562, 976, -257}, -{ 12395, -8618, -22248, -19843, 11013, 7762}, -{ 3799, 11853, -27622, -8473, 1089, -1495}, -{ 4141, -2182, -26720, -735, -774, 1469}, -{ 3125, 13762, 4606, 29257, 18771, -9958}, -{ -17465, -9445, -17562, -2530, -6435, -3726}, -{ -1742, 4351, -6841, -19773, 9627, -10654}, -{ 7251, 3525, 10835, 5601, 25198, -23348}, -{ -10300, -17830, 631, 11640, 2044, -20878}, -{ -873, -8502, -1063, -15674, -10693, 14934}, -{ -15957, 28137, 5268, 477, -1053, 1158}, -{ -1495, -8814, -5764, -24965, 25988, 7907}, -{ -1038, -114, -2308, -1319, -6480, 1472}, -{ 4895, -17897, -25850, 5301, -188, 1581}, -{ 3200, 17225, 4346, 22101, -18543, 22028}, -{ -10250, 545, -10932, 2276, -28070, 8118}, -{ 15343, 2329, 9316, 20537, 14908, 21021}, -{ 6329, 6130, -24508, 837, -8637, -5844}, -{ 7386, -501, 10503, 20131, 11435, -4755}, -{ -2745, 24174, -9274, 15273, -8389, -5835}, -{ 2992, -2864, 6048, -7473, 11687, -19996}, -{ -883, -11954, -9976, -21829, -4436, -27178}, -{ 3458, 19626, 1280, 2597, 19849, 5255}, -{ -5315, 19133, -14518, -8946, 13749, -1352}, -{ 18642, 17655, 11001, 6817, -18418, 6336}, -{ -1697, 2244, -4640, 3948, -12890, -5273}, -{ 20428, 10542, 4170, -1012, 19439, 21691}, -{ -2943, -19735, -4208, 1320, 909, -8897}, -{ 9351, -8066, -2618, -12933, 26582, 3507}, -{ 9705, -22628, 8311, 8167, -13293, 5608}, -{ 3222, 3749, -1508, 165, -52, -196}, -{ 102, -22744, -8832, 903, -11421, -14662}, -{ -120, 5998, 19765, 13401, 3628, 5197}, -{ 8528, 5827, -1066, 774, -39, -166}, -{ 9411, -9476, 9581, -13004, 24456, 24900}, -{ 17878, 2235, -21639, 20478, 4716, -7190}, -{ -2482, 9511, 1611, -21943, 14230, -1289}, -{ 9288, -2291, 23215, -3452, -10842, 11}, -{ 9496, 3041, 5130, -3890, -21219, -22589}, -{ 14262, -9838, 20195, 14019, 91, -17200}, -{ -18591, 980, 17, 821, 120, -574}, -{ 12285, -19269, 13742, 16373, -161, 6025}, -{ -3364, 1530, -4005, 2454, -10872, -23839}, -{ 105, 5085, -260, 5790, -588, 19170}, -{ 4121, 4169, 13439, 14644, 20899, 7434}, -{ -175, 13101, -3704, 23233, 3907, 10106}, -{ -6101, 23467, 5204, -1341, 1599, 13174}, -{ -3217, -3494, 15117, -8387, -11762, -4750}, -{ 1146, 4675, -19378, 14917, -5091, 249}, -{ -21506, 10136, -16473, -13305, 18382, -8601}, -{ 628, 2447, 3344, 3130, -5115, 119}, -{ 17900, -22422, -17633, 21967, -16293, -7676}, -{ 16863, 24214, 5612, -3858, -809, 3822}, -{ -2291, 10091, -2360, -25109, -1226, 312}, -{ 2957, 11256, 26745, -13266, -3455, -1128}, -{ -19762, -2708, 4604, 6355, 1638, 25501}, -{ -19593, -7753, 3159, -85, -489, -1855}, -{ 814, 12510, 19077, -4681, -2610, -1474}, -{ -23408, -19027, 8137, 19878, 7912, -282}, -{ 839, -19652, 11927, 27278, -3211, 2266}, -{ 4020, -1110, 8226, -1274, 20922, 25060}, -{ 26576, 325, -8693, -232, -2218, -699}, -{ -11293, -4200, 1805, -6673, -22940, -1339}, -{ -2005, -15886, -1047, -27687, -13235, 14370}, -{ -22073, 1949, 13175, -15656, -1846, 8055}, -{ 3039, 12025, 7132, -24632, 413, -2347}, -{ -24048, -206, 12459, -6654, -417, -10091}, -{ 18179, -23688, -20515, -16396, 7230, 763}, -{ 5659, -5085, 13878, -23729, -11077, -19587}, -{ 11340, 501, 25040, 7616, -19658, 1605}, -{ -26650, 8878, 10544, 417, 1299, 261}, -{ 14460, 11369, -3263, 9990, 8194, 18111}, -{ 1355, -20838, -9196, -16060, -8559, -730}, -{ -1918, -20937, -18293, -2461, -2651, 4316}, -{ -2810, 24521, -10996, -25721, 308, -1234}, -{ -9075, -17280, -1833, -29342, -24213, -16631}, -{ -2843, 10165, -5339, -2888, 21858, -21340}, -{ -15832, 14849, -23780, 5184, 10113, -20639}, -{ -19535, -11361, 8413, 1486, -23658, -5759}, -{ -7512, 1027, -20794, 13732, 19892, -21934}, -{ -12132, -7022, -19175, -8840, 22125, -16490}, -{ 1937, 5210, -6318, -23788, 13141, 11082}, -{ -205, 6036, -380, 8658, -233, 28020}, -{ -5523, 7477, 7635, 23595, 9763, -2590}, -{ 21658, -28313, -3086, -300, -1032, 1744}, -{ -22352, 16646, 208, 6665, -17400, -3028}, -{ 18482, 9336, -2737, -19372, 407, -4389}, -{ -4913, -17370, 18819, -17654, 13416, 15232}, -{ 7749, 6368, 23135, -18174, 7584, -4248}, -{ -1489, -6523, 586, -10157, 14964, 25568}, -{ 3844, -6156, 4897, -13045, -22526, 5647}, -{ -8491, -2105, -24774, 905, -9326, 1456}, -{ -3040, -1476, 1166, -4428, 11236, 9204}, -{ 3397, -1451, 13598, -15841, 24540, 5819}, -{ 8483, -2993, 21547, -16916, 7741, 24018}, -{ -14932, -23758, -5332, -6664, -4497, 13267}, -{ 19379, 12916, -2142, -737, 21100, -22101}, -{ 3393, -4629, 5735, -18913, -6969, 2687}, -{ 1148, -16147, -21433, -28095, -630, -14449}, -{ 7300, 672, 18530, -17452, -10149, 351}, -{ 11356, -10974, 17212, 4624, 145, 17791}, -{ -711, -3479, -2238, 15887, 2027, 0}, -{ -28048, 1794, -593, -2758, -21852, 11535}, -{ -19683, 4937, 22004, 21523, -3148, 1790}, -{ 813, 8231, 2633, 11981, -3043, 22201}, -{ 8952, -24760, -690, 14873, -2366, -5372}, -{ 8406, -5439, -274, -642, -145, 778}, -{ -6605, 7258, 20780, -23507, -18625, 22782}, -{ -22896, -25488, 10020, -1614, 1508, -1393}, -{ 7607, 407, -24678, -16385, -1804, -4699}, -{ -10592, -19139, 10462, -3747, 8721, -6919}, -{ 13010, 5292, -6230, -4884, -20904, -1797}, -{ 16891, -13770, -465, 19343, -10741, -12959}, -{ 25193, -14799, -5681, -521, -321, -1211}, -{ 6917, -3093, 20183, -26903, -12026, 1295}, -{ 305, 1992, 19457, -985, 25, -521}, -{ 6707, -3698, 8365, -8687, 21921, -27166}, -{ 4668, 5997, 7117, 11696, 24401, -10794}, -{ 744, -9416, 19893, 1963, 7922, -9824}, -{ 3430, 21282, -1736, 10844, 8821, 27015}, -{ -8813, 1521, -24038, 1651, 7838, -1208}, -{ 3911, -11221, 3273, -12541, 7168, 18402}, -{ 21642, 9117, -11536, -5256, 7077, 2382}, -{ 100, 3817, -6713, 1244, 1518, -321}, -{ 7946, -18670, 10667, -4866, 727, 776}, -{ -15883, -8150, -2087, 22739, 1567, -3482}, -{ 4380, -2735, 8469, -7025, -11424, 1317}, -{ 26970, 4393, 7665, 17561, -714, 650}, -{ -16191, -835, 8365, 1795, -14314, 16297}, -{ 4504, -10048, 7662, -26690, -17428, 2580}, -{ 48, -3984, 564, -5871, 2658, -18658}, -{ 12579, -26016, -15642, 2672, -1347, -887}, -{ -4950, 4208, -6811, 2569, -20621, -8658}, -{ -1836, -14818, -5571, -23322, -14800, 25867}, -{ 5434, -28139, -2357, -2883, -570, 2431}, -{ 13096, -2771, 24994, -12496, -24723, -1025}, -{ -5676, -4339, 1908, 18628, -21323, 17366}, -{ 27660, -27897, -15409, 1436, -7112, -2241}, -{ 8019, 3847, 24568, -469, 9674, 10683}, -{ -903, -10149, 1801, -21260, 4795, -8751}, -{ 1122, -9582, 2625, 22791, 956, 882}, -{ 7876, 19075, -9900, -24266, 7496, 9277}, -{ 980, -26764, -5386, 5396, 1086, 1648}, -{ 28838, -1270, -447, 5, -429, -20}, -{ -15283, 6132, 22812, 1252, -9963, 511}, -{ 851, 7925, -457, -12210, 4261, 7579}, -{ -4530, 8452, -1246, 14501, -24951, -5760}, -{ -17814, -10727, 9887, -23929, -13432, 1878}, -{ -15049, 10165, 16491, -14603, -11712, -21156}, -{ -3317, 840, -5683, 22413, 1994, 586}, -{ 23158, -5788, -15043, -10372, -9271, -13523}, -{ -773, -9509, -3993, -24264, 8463, 5804}, -{ -8545, -703, -12440, -3985, -25122, -28147}, -{ -16659, 16001, 2746, 1611, 5097, -1043}, -{ 41, -7181, 19903, 31555, -32237, 13927}, -{ -5658, 845, -12774, 5705, 16695, -86}, -{ 5282, 14875, 27026, 21124, 15776, -10477}, -{ 14712, 19648, -11487, -13361, -20196, -15229}, -{ 8597, -9138, -626, 10891, -6015, 6346}, -{ -1488, -1272, -1479, -1303, -3704, -5485}, -{ -3370, 17871, -6604, 24930, 25886, -3127}, -{ 8416, 27783, -1385, 5350, -4260, 19993}, -{ 5688, 362, 17246, 3809, -3246, 1088}, -{ -105, -29607, 2747, 15223, -167, 3722}, -{ 3502, -3195, 8602, 7772, -1566, -915}, -{ -491, 3257, -2423, 5522, 20606, -100}, -{ -13948, -11368, -15375, -21866, -8520, 12221}, -{ -616, 2424, -2023, 4398, -3805, 8108}, -{ -7204, 21043, 21211, -9395, -19391, 896}, -{ -5737, -15160, -21298, 17066, -1006, -366}, -{ 6261, 3240, -11937, -16213, -15820, 6581}, -{ -3155, 24796, 2733, -1257, -875, -1597}, -{ -20469, 11094, 24071, -8987, 14136, 2220}, -{ -14106, 11959, -22495, 4135, -1055, -5420}, -{ 801, -2655, 60, -5324, -790, 5937}, -{ -7372, -1764, -22433, -26060, 21707, 4178}, -{ -5715, -6648, -14908, 1325, -24044, 1493}, -{ -6024, -12488, 23930, 2950, 1601, 1173}, -{ 19067, 17630, 17929, -10654, 10928, -4958}, -{ 3231, -3284, 27336, 4174, -1683, 497}, -}; - -const int16_t (* const ff_eac3_mantissa_vq[8])[6] = { - NULL, - vq_hebap1, - vq_hebap2, - vq_hebap3, - vq_hebap4, - vq_hebap5, - vq_hebap6, - vq_hebap7, -}; - -/** - * Table E2.14 Frame Exponent Strategy Combinations - */ -const uint8_t ff_eac3_frm_expstr[32][6] = { -{ EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_REUSE}, -{ EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_D45}, -{ EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_D25, EXP_REUSE}, -{ EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D45}, -{ EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_REUSE}, -{ EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_D45}, -{ EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE}, -{ EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D45, EXP_D45}, -{ EXP_D25, EXP_REUSE, EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE}, -{ EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45}, -{ EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE}, -{ EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_D45, EXP_D45}, -{ EXP_D25, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE}, -{ EXP_D25, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE, EXP_D45}, -{ EXP_D25, EXP_REUSE, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE}, -{ EXP_D25, EXP_REUSE, EXP_D45, EXP_D45, EXP_D45, EXP_D45}, -{ EXP_D45, EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_REUSE}, -{ EXP_D45, EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_D45}, -{ EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D25, EXP_REUSE}, -{ EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D45}, -{ EXP_D45, EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_REUSE}, -{ EXP_D45, EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_D45}, -{ EXP_D45, EXP_D25, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE}, -{ EXP_D45, EXP_D25, EXP_REUSE, EXP_D45, EXP_D45, EXP_D45}, -{ EXP_D45, EXP_D45, EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE}, -{ EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45}, -{ EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE}, -{ EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_D45, EXP_D45}, -{ EXP_D45, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE}, -{ EXP_D45, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_D45}, -{ EXP_D45, EXP_D45, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE}, -{ EXP_D45, EXP_D45, EXP_D45, EXP_D45, EXP_D45, EXP_D45}, -}; - -/** - * Table E.25: Spectral Extension Attenuation Table - * ff_eac3_spx_atten_tab[code][bin]=pow(2.0,(bin+1)*(code+1)/-15.0); - */ -const float ff_eac3_spx_atten_tab[32][3] = { - { 0.954841603910416503f, 0.911722488558216804f, 0.870550563296124125f }, - { 0.911722488558216804f, 0.831237896142787758f, 0.757858283255198995f }, - { 0.870550563296124125f, 0.757858283255198995f, 0.659753955386447100f }, - { 0.831237896142787758f, 0.690956439983888004f, 0.574349177498517438f }, - { 0.793700525984099792f, 0.629960524947436595f, 0.500000000000000000f }, - { 0.757858283255198995f, 0.574349177498517438f, 0.435275281648062062f }, - { 0.723634618720189082f, 0.523647061410313364f, 0.378929141627599553f }, - { 0.690956439983888004f, 0.477420801955208307f, 0.329876977693223550f }, - { 0.659753955386447100f, 0.435275281648062062f, 0.287174588749258719f }, - { 0.629960524947436595f, 0.396850262992049896f, 0.250000000000000000f }, - { 0.601512518041058319f, 0.361817309360094541f, 0.217637640824031003f }, - { 0.574349177498517438f, 0.329876977693223550f, 0.189464570813799776f }, - { 0.548412489847312945f, 0.300756259020529160f, 0.164938488846611775f }, - { 0.523647061410313364f, 0.274206244923656473f, 0.143587294374629387f }, - { 0.500000000000000000f, 0.250000000000000000f, 0.125000000000000000f }, - { 0.477420801955208307f, 0.227930622139554201f, 0.108818820412015502f }, - { 0.455861244279108402f, 0.207809474035696939f, 0.094732285406899888f }, - { 0.435275281648062062f, 0.189464570813799776f, 0.082469244423305887f }, - { 0.415618948071393879f, 0.172739109995972029f, 0.071793647187314694f }, - { 0.396850262992049896f, 0.157490131236859149f, 0.062500000000000000f }, - { 0.378929141627599553f, 0.143587294374629387f, 0.054409410206007751f }, - { 0.361817309360094541f, 0.130911765352578369f, 0.047366142703449930f }, - { 0.345478219991944002f, 0.119355200488802049f, 0.041234622211652958f }, - { 0.329876977693223550f, 0.108818820412015502f, 0.035896823593657347f }, - { 0.314980262473718298f, 0.099212565748012460f, 0.031250000000000000f }, - { 0.300756259020529160f, 0.090454327340023621f, 0.027204705103003875f }, - { 0.287174588749258719f, 0.082469244423305887f, 0.023683071351724965f }, - { 0.274206244923656473f, 0.075189064755132290f, 0.020617311105826479f }, - { 0.261823530705156682f, 0.068551561230914118f, 0.017948411796828673f }, - { 0.250000000000000000f, 0.062500000000000000f, 0.015625000000000000f }, - { 0.238710400977604098f, 0.056982655534888536f, 0.013602352551501938f }, - { 0.227930622139554201f, 0.051952368508924235f, 0.011841535675862483f } -}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3dec_data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3dec_data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3dec_data.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3dec_data.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -/* - * E-AC-3 decoder tables - * Copyright (c) 2007 Bartlomiej Wolowiec - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVCODEC_EAC3DEC_DATA_H -#define AVCODEC_EAC3DEC_DATA_H - -#include - -extern const uint8_t ff_eac3_bits_vs_hebap[20]; -extern const int16_t ff_eac3_gaq_remap_1[12]; -extern const int16_t ff_eac3_gaq_remap_2_4_a[9][2]; -extern const int16_t ff_eac3_gaq_remap_2_4_b[9][2]; - -extern const int16_t (* const ff_eac3_mantissa_vq[8])[6]; -extern const uint8_t ff_eac3_frm_expstr[32][6]; -extern const float ff_eac3_spx_atten_tab[32][3]; - -#endif /* AVCODEC_EAC3DEC_DATA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3enc.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,12 +27,63 @@ #define CONFIG_AC3ENC_FLOAT 1 #include "ac3enc.h" #include "eac3enc.h" +#include "eac3_data.h" #define AC3ENC_TYPE AC3ENC_TYPE_EAC3 #include "ac3enc_opts_template.c" -static AVClass eac3enc_class = { "E-AC-3 Encoder", av_default_item_name, - eac3_options, LIBAVUTIL_VERSION_INT }; +static const AVClass eac3enc_class = { "E-AC-3 Encoder", av_default_item_name, + eac3_options, LIBAVUTIL_VERSION_INT }; + + +/** + * LUT for finding a matching frame exponent strategy index from a set of + * exponent strategies for a single channel across all 6 blocks. + */ +static int8_t eac3_frame_expstr_index_tab[3][4][4][4][4][4]; + + +void ff_eac3_exponent_init(void) +{ + int i; + + memset(eac3_frame_expstr_index_tab, -1, sizeof(eac3_frame_expstr_index_tab)); + for (i = 0; i < 32; i++) { + eac3_frame_expstr_index_tab[ff_eac3_frm_expstr[i][0]-1] + [ff_eac3_frm_expstr[i][1]] + [ff_eac3_frm_expstr[i][2]] + [ff_eac3_frm_expstr[i][3]] + [ff_eac3_frm_expstr[i][4]] + [ff_eac3_frm_expstr[i][5]] = i; + } +} + + +void ff_eac3_get_frame_exp_strategy(AC3EncodeContext *s) +{ + int ch; + + if (s->num_blocks < 6) { + s->use_frame_exp_strategy = 0; + return; + } + + s->use_frame_exp_strategy = 1; + for (ch = !s->cpl_on; ch <= s->fbw_channels; ch++) { + int expstr = eac3_frame_expstr_index_tab[s->exp_strategy[ch][0]-1] + [s->exp_strategy[ch][1]] + [s->exp_strategy[ch][2]] + [s->exp_strategy[ch][3]] + [s->exp_strategy[ch][4]] + [s->exp_strategy[ch][5]]; + if (expstr < 0) { + s->use_frame_exp_strategy = 0; + break; + } + s->frame_exp_strategy[ch] = expstr; + } +} + void ff_eac3_set_cpl_states(AC3EncodeContext *s) @@ -43,12 +94,12 @@ /* set first cpl coords */ for (ch = 1; ch <= s->fbw_channels; ch++) first_cpl_coords[ch] = 1; - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; for (ch = 1; ch <= s->fbw_channels; ch++) { if (block->channel_in_cpl[ch]) { if (first_cpl_coords[ch]) { - block->new_cpl_coords = 2; + block->new_cpl_coords[ch] = 2; first_cpl_coords[ch] = 0; } } else { @@ -58,7 +109,7 @@ } /* set first cpl leak */ - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 0; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; if (block->cpl_in_use) { block->new_cpl_leak = 2; @@ -84,22 +135,64 @@ put_bits(&s->pb, 2, s->bit_alloc.sr_code); /* sample rate code */ } else { put_bits(&s->pb, 2, s->bit_alloc.sr_code); /* sample rate code */ - put_bits(&s->pb, 2, 0x3); /* number of blocks = 6 */ + put_bits(&s->pb, 2, s->num_blks_code); /* number of blocks */ } put_bits(&s->pb, 3, s->channel_mode); /* audio coding mode */ put_bits(&s->pb, 1, s->lfe_on); /* LFE channel indicator */ put_bits(&s->pb, 5, s->bitstream_id); /* bitstream id (EAC3=16) */ put_bits(&s->pb, 5, -opt->dialogue_level); /* dialogue normalization level */ put_bits(&s->pb, 1, 0); /* no compression gain */ - put_bits(&s->pb, 1, 0); /* no mixing metadata */ - /* TODO: mixing metadata */ - put_bits(&s->pb, 1, 0); /* no info metadata */ - /* TODO: info metadata */ + /* mixing metadata*/ + put_bits(&s->pb, 1, opt->eac3_mixing_metadata); + if (opt->eac3_mixing_metadata) { + if (s->channel_mode > AC3_CHMODE_STEREO) + put_bits(&s->pb, 2, opt->preferred_stereo_downmix); + if (s->has_center) { + put_bits(&s->pb, 3, s->ltrt_center_mix_level); + put_bits(&s->pb, 3, s->loro_center_mix_level); + } + if (s->has_surround) { + put_bits(&s->pb, 3, s->ltrt_surround_mix_level); + put_bits(&s->pb, 3, s->loro_surround_mix_level); + } + if (s->lfe_on) + put_bits(&s->pb, 1, 0); + put_bits(&s->pb, 1, 0); /* no program scale */ + put_bits(&s->pb, 1, 0); /* no ext program scale */ + put_bits(&s->pb, 2, 0); /* no mixing parameters */ + if (s->channel_mode < AC3_CHMODE_STEREO) + put_bits(&s->pb, 1, 0); /* no pan info */ + put_bits(&s->pb, 1, 0); /* no frame mix config info */ + } + /* info metadata*/ + put_bits(&s->pb, 1, opt->eac3_info_metadata); + if (opt->eac3_info_metadata) { + put_bits(&s->pb, 3, s->bitstream_mode); + put_bits(&s->pb, 1, opt->copyright); + put_bits(&s->pb, 1, opt->original); + if (s->channel_mode == AC3_CHMODE_STEREO) { + put_bits(&s->pb, 2, opt->dolby_surround_mode); + put_bits(&s->pb, 2, opt->dolby_headphone_mode); + } + if (s->channel_mode >= AC3_CHMODE_2F2R) + put_bits(&s->pb, 2, opt->dolby_surround_ex_mode); + put_bits(&s->pb, 1, opt->audio_production_info); + if (opt->audio_production_info) { + put_bits(&s->pb, 5, opt->mixing_level - 80); + put_bits(&s->pb, 2, opt->room_type); + put_bits(&s->pb, 1, opt->ad_converter_type); + } + put_bits(&s->pb, 1, 0); + } + if (s->num_blocks != 6) + put_bits(&s->pb, 1, !(s->avctx->frame_number % 6)); /* converter sync flag */ put_bits(&s->pb, 1, 0); /* no additional bit stream info */ /* frame header */ - put_bits(&s->pb, 1, 1); /* exponent strategy syntax = each block */ + if (s->num_blocks == 6) { + put_bits(&s->pb, 1, !s->use_frame_exp_strategy);/* exponent strategy syntax */ put_bits(&s->pb, 1, 0); /* aht enabled = no */ + } put_bits(&s->pb, 2, 0); /* snr offset strategy = 1 */ put_bits(&s->pb, 1, 0); /* transient pre-noise processing enabled = no */ put_bits(&s->pb, 1, 0); /* block switch syntax enabled = no */ @@ -112,7 +205,7 @@ /* coupling strategy use flags */ if (s->channel_mode > AC3_CHMODE_MONO) { put_bits(&s->pb, 1, s->blocks[0].cpl_in_use); - for (blk = 1; blk < AC3_MAX_BLOCKS; blk++) { + for (blk = 1; blk < s->num_blocks; blk++) { AC3Block *block = &s->blocks[blk]; put_bits(&s->pb, 1, block->new_cpl_strategy); if (block->new_cpl_strategy) @@ -120,21 +213,35 @@ } } /* exponent strategy */ - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) - for (ch = !s->blocks[blk].cpl_in_use; ch <= s->fbw_channels; ch++) - put_bits(&s->pb, 2, s->exp_strategy[ch][blk]); + if (s->use_frame_exp_strategy) { + for (ch = !s->cpl_on; ch <= s->fbw_channels; ch++) + put_bits(&s->pb, 5, s->frame_exp_strategy[ch]); + } else { + for (blk = 0; blk < s->num_blocks; blk++) + for (ch = !s->blocks[blk].cpl_in_use; ch <= s->fbw_channels; ch++) + put_bits(&s->pb, 2, s->exp_strategy[ch][blk]); + } if (s->lfe_on) { - for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) + for (blk = 0; blk < s->num_blocks; blk++) put_bits(&s->pb, 1, s->exp_strategy[s->lfe_channel][blk]); } - /* E-AC-3 to AC-3 converter exponent strategy (unfortunately not optional...) */ - for (ch = 1; ch <= s->fbw_channels; ch++) - put_bits(&s->pb, 5, 0); + /* E-AC-3 to AC-3 converter exponent strategy (not optional when num blocks == 6) */ + if (s->num_blocks != 6) { + put_bits(&s->pb, 1, 0); + } else { + for (ch = 1; ch <= s->fbw_channels; ch++) { + if (s->use_frame_exp_strategy) + put_bits(&s->pb, 5, s->frame_exp_strategy[ch]); + else + put_bits(&s->pb, 5, 0); + } + } /* snr offsets */ put_bits(&s->pb, 6, s->coarse_snr_offset); put_bits(&s->pb, 4, s->fine_snr_offset[1]); /* block start info */ - put_bits(&s->pb, 1, 0); + if (s->num_blocks > 1) + put_bits(&s->pb, 1, 0); } @@ -145,7 +252,7 @@ .id = CODEC_ID_EAC3, .priv_data_size = sizeof(AC3EncodeContext), .init = ff_ac3_encode_init, - .encode = ff_ac3_encode_frame, + .encode = ff_ac3_float_encode_frame, .close = ff_ac3_encode_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 E-AC-3"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3enc.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3enc.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eac3enc.h 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eac3enc.h 2012-01-11 00:34:30.000000000 +0000 @@ -30,6 +30,16 @@ #include "ac3enc.h" /** + * Initialize E-AC-3 exponent tables. + */ +void ff_eac3_exponent_init(void); + +/** + * Determine frame exponent strategy use and indices. + */ +void ff_eac3_get_frame_exp_strategy(AC3EncodeContext *s); + +/** * Set coupling states. * This determines whether certain flags must be written to the bitstream or * whether they will be implicitly already known by the decoder. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eacmv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eacmv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eacmv.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eacmv.c 2012-01-11 00:34:30.000000000 +0000 @@ -52,7 +52,7 @@ unsigned char *dst = s->frame.data[0]; int i; - for (i=0; i < s->avctx->height && buf+s->avctx->width<=buf_end; i++) { + for (i=0; i < s->avctx->height && buf_end - buf >= s->avctx->width; i++) { memcpy(dst, buf, s->avctx->width); dst += s->frame.linesize[0]; buf += s->avctx->width; @@ -84,7 +84,7 @@ i = 0; for(y=0; yavctx->height/4; y++) - for(x=0; xavctx->width/4 && buf+iavctx->width/4 && buf_end - buf > i; x++) { if (buf[i]==0xFF) { unsigned char *dst = s->frame.data[0] + (y*4)*s->frame.linesize[0] + x*4; if (raw+16=buf_end) { + if(buf_end - buf < 16) { av_log(s->avctx, AV_LOG_WARNING, "truncated header\n"); return; } @@ -135,7 +135,7 @@ pal_count = AV_RL16(&buf[14]); buf += 16; - for (i=pal_start; i= 3; i++) { s->palette[i] = AV_RB24(buf); buf += 3; } @@ -153,6 +153,9 @@ CmvContext *s = avctx->priv_data; const uint8_t *buf_end = buf + buf_size; + if (buf_end - buf < EA_PREAMBLE_SIZE) + return AVERROR_INVALIDDATA; + if (AV_RL32(buf)==MVIh_TAG||AV_RB32(buf)==MVIh_TAG) { cmv_process_header(s, buf+EA_PREAMBLE_SIZE, buf_end); return buf_size; @@ -206,14 +209,13 @@ } AVCodec ff_eacmv_decoder = { - "eacmv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_CMV, - sizeof(CmvContext), - cmv_decode_init, - NULL, - cmv_decode_end, - cmv_decode_frame, - CODEC_CAP_DR1, + .name = "eacmv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_CMV, + .priv_data_size = sizeof(CmvContext), + .init = cmv_decode_init, + .close = cmv_decode_end, + .decode = cmv_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts CMV video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eamad.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eamad.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eamad.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eamad.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,9 +22,9 @@ /** * @file * Electronic Arts Madcow Video Decoder - * by Peter Ross + * @author Peter Ross * - * Technical details here: + * @see technical details at * http://wiki.multimedia.cx/index.php?title=Electronic_Arts_MAD */ @@ -307,14 +307,13 @@ } AVCodec ff_eamad_decoder = { - "eamad", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MAD, - sizeof(MadContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "eamad", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MAD, + .priv_data_size = sizeof(MadContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Madcow Video") }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eatgq.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eatgq.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eatgq.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eatgq.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,7 +29,7 @@ */ #include "avcodec.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" #include "bytestream.h" #include "dsputil.h" @@ -244,14 +244,13 @@ } AVCodec ff_eatgq_decoder = { - "eatgq", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_TGQ, - sizeof(TgqContext), - tgq_decode_init, - NULL, - tgq_decode_end, - tgq_decode_frame, - CODEC_CAP_DR1, + .name = "eatgq", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_TGQ, + .priv_data_size = sizeof(TgqContext), + .init = tgq_decode_init, + .close = tgq_decode_end, + .decode = tgq_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGQ video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eatgv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eatgv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eatgv.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eatgv.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,7 +29,7 @@ */ #include "avcodec.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" #include "libavutil/lzo.h" #include "libavutil/imgutils.h" @@ -155,7 +155,7 @@ vector_bits = AV_RL16(&buf[6]); buf += 12; - /* allocate codebook buffers as neccessary */ + /* allocate codebook buffers as necessary */ if (num_mvs > s->num_mvs) { s->mv_codebook = av_realloc(s->mv_codebook, num_mvs*2*sizeof(int)); s->num_mvs = num_mvs; @@ -286,7 +286,7 @@ s->frame.buffer_hints = FF_BUFFER_HINTS_VALID; s->frame.linesize[0] = s->width; - /* allocate additional 12 bytes to accomodate av_memcpy_backptr() OUTBUF_PADDED optimisation */ + /* allocate additional 12 bytes to accommodate av_memcpy_backptr() OUTBUF_PADDED optimisation */ s->frame.data[0] = av_malloc(s->width*s->height + 12); if (!s->frame.data[0]) return AVERROR(ENOMEM); @@ -335,13 +335,12 @@ } AVCodec ff_eatgv_decoder = { - "eatgv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_TGV, - sizeof(TgvContext), - tgv_decode_init, - NULL, - tgv_decode_end, - tgv_decode_frame, + .name = "eatgv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_TGV, + .priv_data_size = sizeof(TgvContext), + .init = tgv_decode_init, + .close = tgv_decode_end, + .decode = tgv_decode_frame, .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGV video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eatqi.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eatqi.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/eatqi.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/eatqi.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,10 +22,8 @@ /** * @file * Electronic Arts TQI Video Decoder - * by Peter Ross - * - * Technical details here: - * http://wiki.multimedia.cx/index.php?title=Electronic_Arts_TQI + * @author Peter Ross + * @see http://wiki.multimedia.cx/index.php?title=Electronic_Arts_TQI */ #include "avcodec.h" @@ -155,14 +153,13 @@ } AVCodec ff_eatqi_decoder = { - "eatqi", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_TQI, - sizeof(TqiContext), - tqi_decode_init, - NULL, - tqi_decode_end, - tqi_decode_frame, - CODEC_CAP_DR1, + .name = "eatqi", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_TQI, + .priv_data_size = sizeof(TqiContext), + .init = tqi_decode_init, + .close = tqi_decode_end, + .decode = tqi_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TQI Video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/error_resilience.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/error_resilience.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/error_resilience.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/error_resilience.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,18 +41,22 @@ #undef mb_intra static void decode_mb(MpegEncContext *s, int ref){ - s->dest[0] = s->current_picture.data[0] + (s->mb_y * 16* s->linesize ) + s->mb_x * 16; - s->dest[1] = s->current_picture.data[1] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift); - s->dest[2] = s->current_picture.data[2] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift); + s->dest[0] = s->current_picture.f.data[0] + (s->mb_y * 16 * s->linesize) + s->mb_x * 16; + s->dest[1] = s->current_picture.f.data[1] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift); + s->dest[2] = s->current_picture.f.data[2] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift); if(CONFIG_H264_DECODER && s->codec_id == CODEC_ID_H264){ H264Context *h= (void*)s; h->mb_xy= s->mb_x + s->mb_y*s->mb_stride; memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache)); assert(ref>=0); - if(ref >= h->ref_count[0]) //FIXME it is posible albeit uncommon that slice references differ between slices, we take the easy approuch and ignore it for now. If this turns out to have any relevance in practice then correct remapping should be added + /* FIXME: It is posible albeit uncommon that slice references + * differ between slices. We take the easy approach and ignore + * it for now. If this turns out to have any relevance in + * practice then correct remapping should be added. */ + if (ref >= h->ref_count[0]) ref=0; - fill_rectangle(&s->current_picture.ref_index[0][4*h->mb_xy], 2, 2, 2, ref, 1); + fill_rectangle(&s->current_picture.f.ref_index[0][4*h->mb_xy], 2, 2, 2, ref, 1); fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref, 1); fill_rectangle(h->mv_cache[0][ scan8[0] ], 4, 4, 8, pack16to32(s->mv[0][0][0],s->mv[0][0][1]), 4); assert(!FRAME_MBAFF); @@ -80,7 +84,7 @@ } /** - * replaces the current MB with a flat dc only version. + * Replace the current MB with a flat dc-only version. */ static void put_dc(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int mb_x, int mb_y) { @@ -105,8 +109,8 @@ for(y=0; y<8; y++){ int x; for(x=0; x<8; x++){ - dest_cb[x + y*(s->uvlinesize)]= dcu/8; - dest_cr[x + y*(s->uvlinesize)]= dcv/8; + dest_cb[x + y * s->uvlinesize] = dcu / 8; + dest_cr[x + y * s->uvlinesize] = dcv / 8; } } } @@ -166,15 +170,15 @@ error= s->error_status_table[mb_index]; - if(IS_INTER(s->current_picture.mb_type[mb_index])) continue; //inter - if(!(error&DC_ERROR)) continue; //dc-ok + if(IS_INTER(s->current_picture.f.mb_type[mb_index])) continue; //inter + if(!(error&ER_DC_ERROR)) continue; //dc-ok /* right block */ for(j=b_x+1; j>is_luma) + (b_y>>is_luma)*s->mb_stride; int error_j= s->error_status_table[mb_index_j]; - int intra_j= IS_INTRA(s->current_picture.mb_type[mb_index_j]); - if(intra_j==0 || !(error_j&DC_ERROR)){ + int intra_j = IS_INTRA(s->current_picture.f.mb_type[mb_index_j]); + if(intra_j==0 || !(error_j&ER_DC_ERROR)){ color[0]= dc[j + b_y*stride]; distance[0]= j-b_x; break; @@ -185,8 +189,8 @@ for(j=b_x-1; j>=0; j--){ int mb_index_j= (j>>is_luma) + (b_y>>is_luma)*s->mb_stride; int error_j= s->error_status_table[mb_index_j]; - int intra_j= IS_INTRA(s->current_picture.mb_type[mb_index_j]); - if(intra_j==0 || !(error_j&DC_ERROR)){ + int intra_j = IS_INTRA(s->current_picture.f.mb_type[mb_index_j]); + if(intra_j==0 || !(error_j&ER_DC_ERROR)){ color[1]= dc[j + b_y*stride]; distance[1]= b_x-j; break; @@ -197,8 +201,8 @@ for(j=b_y+1; j>is_luma) + (j>>is_luma)*s->mb_stride; int error_j= s->error_status_table[mb_index_j]; - int intra_j= IS_INTRA(s->current_picture.mb_type[mb_index_j]); - if(intra_j==0 || !(error_j&DC_ERROR)){ + int intra_j = IS_INTRA(s->current_picture.f.mb_type[mb_index_j]); + if(intra_j==0 || !(error_j&ER_DC_ERROR)){ color[2]= dc[b_x + j*stride]; distance[2]= j-b_y; break; @@ -209,8 +213,8 @@ for(j=b_y-1; j>=0; j--){ int mb_index_j= (b_x>>is_luma) + (j>>is_luma)*s->mb_stride; int error_j= s->error_status_table[mb_index_j]; - int intra_j= IS_INTRA(s->current_picture.mb_type[mb_index_j]); - if(intra_j==0 || !(error_j&DC_ERROR)){ + int intra_j = IS_INTRA(s->current_picture.f.mb_type[mb_index_j]); + if(intra_j==0 || !(error_j&ER_DC_ERROR)){ color[3]= dc[b_x + j*stride]; distance[3]= b_y-j; break; @@ -248,13 +252,13 @@ int y; int left_status = s->error_status_table[( b_x >>is_luma) + (b_y>>is_luma)*s->mb_stride]; int right_status= s->error_status_table[((b_x+1)>>is_luma) + (b_y>>is_luma)*s->mb_stride]; - int left_intra= IS_INTRA(s->current_picture.mb_type [( b_x >>is_luma) + (b_y>>is_luma)*s->mb_stride]); - int right_intra= IS_INTRA(s->current_picture.mb_type [((b_x+1)>>is_luma) + (b_y>>is_luma)*s->mb_stride]); - int left_damage = left_status&(DC_ERROR|AC_ERROR|MV_ERROR); - int right_damage= right_status&(DC_ERROR|AC_ERROR|MV_ERROR); + int left_intra = IS_INTRA(s->current_picture.f.mb_type[( b_x >> is_luma) + (b_y >> is_luma) * s->mb_stride]); + int right_intra = IS_INTRA(s->current_picture.f.mb_type[((b_x + 1) >> is_luma) + (b_y >> is_luma) * s->mb_stride]); + int left_damage = left_status&ER_MB_ERROR; + int right_damage= right_status&ER_MB_ERROR; int offset= b_x*8 + b_y*stride*8; - int16_t *left_mv= s->current_picture.motion_val[0][mvy_stride*b_y + mvx_stride* b_x ]; - int16_t *right_mv= s->current_picture.motion_val[0][mvy_stride*b_y + mvx_stride*(b_x+1)]; + int16_t *left_mv= s->current_picture.f.motion_val[0][mvy_stride*b_y + mvx_stride* b_x ]; + int16_t *right_mv= s->current_picture.f.motion_val[0][mvy_stride*b_y + mvx_stride*(b_x+1)]; if(!(left_damage||right_damage)) continue; // both undamaged @@ -311,13 +315,13 @@ int x; int top_status = s->error_status_table[(b_x>>is_luma) + ( b_y >>is_luma)*s->mb_stride]; int bottom_status= s->error_status_table[(b_x>>is_luma) + ((b_y+1)>>is_luma)*s->mb_stride]; - int top_intra= IS_INTRA(s->current_picture.mb_type [(b_x>>is_luma) + ( b_y >>is_luma)*s->mb_stride]); - int bottom_intra= IS_INTRA(s->current_picture.mb_type [(b_x>>is_luma) + ((b_y+1)>>is_luma)*s->mb_stride]); - int top_damage = top_status&(DC_ERROR|AC_ERROR|MV_ERROR); - int bottom_damage= bottom_status&(DC_ERROR|AC_ERROR|MV_ERROR); + int top_intra = IS_INTRA(s->current_picture.f.mb_type[(b_x >> is_luma) + ( b_y >> is_luma) * s->mb_stride]); + int bottom_intra = IS_INTRA(s->current_picture.f.mb_type[(b_x >> is_luma) + ((b_y + 1) >> is_luma) * s->mb_stride]); + int top_damage = top_status&ER_MB_ERROR; + int bottom_damage= bottom_status&ER_MB_ERROR; int offset= b_x*8 + b_y*stride*8; - int16_t *top_mv= s->current_picture.motion_val[0][mvy_stride* b_y + mvx_stride*b_x]; - int16_t *bottom_mv= s->current_picture.motion_val[0][mvy_stride*(b_y+1) + mvx_stride*b_x]; + int16_t *top_mv = s->current_picture.f.motion_val[0][mvy_stride * b_y + mvx_stride * b_x]; + int16_t *bottom_mv = s->current_picture.f.motion_val[0][mvy_stride * (b_y + 1) + mvx_stride * b_x]; if(!(top_damage||bottom_damage)) continue; // both undamaged @@ -376,8 +380,8 @@ int f=0; int error= s->error_status_table[mb_xy]; - if(IS_INTRA(s->current_picture.mb_type[mb_xy])) f=MV_FROZEN; //intra //FIXME check - if(!(error&MV_ERROR)) f=MV_FROZEN; //inter with undamaged MV + if(IS_INTRA(s->current_picture.f.mb_type[mb_xy])) f=MV_FROZEN; //intra //FIXME check + if(!(error&ER_MV_ERROR)) f=MV_FROZEN; //inter with undamaged MV fixed[mb_xy]= f; if(f==MV_FROZEN) @@ -389,10 +393,10 @@ for(mb_x=0; mb_xmb_width; mb_x++){ const int mb_xy= mb_x + mb_y*s->mb_stride; - if(IS_INTRA(s->current_picture.mb_type[mb_xy])) continue; - if(!(s->error_status_table[mb_xy]&MV_ERROR)) continue; + if(IS_INTRA(s->current_picture.f.mb_type[mb_xy])) continue; + if(!(s->error_status_table[mb_xy]&ER_MV_ERROR)) continue; - s->mv_dir = s->last_picture.data[0] ? MV_DIR_FORWARD : MV_DIR_BACKWARD; + s->mv_dir = s->last_picture.f.data[0] ? MV_DIR_FORWARD : MV_DIR_BACKWARD; s->mb_intra=0; s->mv_type = MV_TYPE_16X16; s->mb_skipped=0; @@ -434,8 +438,8 @@ if((mb_x^mb_y^pass)&1) continue; if(fixed[mb_xy]==MV_FROZEN) continue; - assert(!IS_INTRA(s->current_picture.mb_type[mb_xy])); - assert(s->last_picture_ptr && s->last_picture_ptr->data[0]); + assert(!IS_INTRA(s->current_picture.f.mb_type[mb_xy])); + assert(s->last_picture_ptr && s->last_picture_ptr->f.data[0]); j=0; if(mb_x>0 && fixed[mb_xy-1 ]==MV_FROZEN) j=1; @@ -454,27 +458,27 @@ none_left=0; if(mb_x>0 && fixed[mb_xy-1]){ - mv_predictor[pred_count][0]= s->current_picture.motion_val[0][mot_index - mot_step][0]; - mv_predictor[pred_count][1]= s->current_picture.motion_val[0][mot_index - mot_step][1]; - ref [pred_count] = s->current_picture.ref_index[0][4*(mb_xy-1)]; + mv_predictor[pred_count][0]= s->current_picture.f.motion_val[0][mot_index - mot_step][0]; + mv_predictor[pred_count][1]= s->current_picture.f.motion_val[0][mot_index - mot_step][1]; + ref [pred_count] = s->current_picture.f.ref_index[0][4*(mb_xy-1)]; pred_count++; } if(mb_x+1current_picture.motion_val[0][mot_index + mot_step][0]; - mv_predictor[pred_count][1]= s->current_picture.motion_val[0][mot_index + mot_step][1]; - ref [pred_count] = s->current_picture.ref_index[0][4*(mb_xy+1)]; + mv_predictor[pred_count][0]= s->current_picture.f.motion_val[0][mot_index + mot_step][0]; + mv_predictor[pred_count][1]= s->current_picture.f.motion_val[0][mot_index + mot_step][1]; + ref [pred_count] = s->current_picture.f.ref_index[0][4*(mb_xy+1)]; pred_count++; } if(mb_y>0 && fixed[mb_xy-mb_stride]){ - mv_predictor[pred_count][0]= s->current_picture.motion_val[0][mot_index - mot_stride*mot_step][0]; - mv_predictor[pred_count][1]= s->current_picture.motion_val[0][mot_index - mot_stride*mot_step][1]; - ref [pred_count] = s->current_picture.ref_index[0][4*(mb_xy-s->mb_stride)]; + mv_predictor[pred_count][0]= s->current_picture.f.motion_val[0][mot_index - mot_stride*mot_step][0]; + mv_predictor[pred_count][1]= s->current_picture.f.motion_val[0][mot_index - mot_stride*mot_step][1]; + ref [pred_count] = s->current_picture.f.ref_index[0][4*(mb_xy-s->mb_stride)]; pred_count++; } if(mb_y+1current_picture.motion_val[0][mot_index + mot_stride*mot_step][0]; - mv_predictor[pred_count][1]= s->current_picture.motion_val[0][mot_index + mot_stride*mot_step][1]; - ref [pred_count] = s->current_picture.ref_index[0][4*(mb_xy+s->mb_stride)]; + mv_predictor[pred_count][0]= s->current_picture.f.motion_val[0][mot_index + mot_stride*mot_step][0]; + mv_predictor[pred_count][1]= s->current_picture.f.motion_val[0][mot_index + mot_stride*mot_step][1]; + ref [pred_count] = s->current_picture.f.ref_index[0][4*(mb_xy+s->mb_stride)]; pred_count++; } if(pred_count==0) continue; @@ -534,16 +538,16 @@ ff_thread_await_progress((AVFrame *) s->last_picture_ptr, mb_y, 0); } - if (!s->last_picture.motion_val[0] || - !s->last_picture.ref_index[0]) + if (!s->last_picture.f.motion_val[0] || + !s->last_picture.f.ref_index[0]) goto skip_last_mv; - prev_x = s->last_picture.motion_val[0][mot_index][0]; - prev_y = s->last_picture.motion_val[0][mot_index][1]; - prev_ref = s->last_picture.ref_index[0][4*mb_xy]; + prev_x = s->last_picture.f.motion_val[0][mot_index][0]; + prev_y = s->last_picture.f.motion_val[0][mot_index][1]; + prev_ref = s->last_picture.f.ref_index[0][4*mb_xy]; } else { - prev_x = s->current_picture.motion_val[0][mot_index][0]; - prev_y = s->current_picture.motion_val[0][mot_index][1]; - prev_ref = s->current_picture.ref_index[0][4*mb_xy]; + prev_x = s->current_picture.f.motion_val[0][mot_index][0]; + prev_y = s->current_picture.f.motion_val[0][mot_index][1]; + prev_ref = s->current_picture.f.ref_index[0][4*mb_xy]; } /* last MV */ @@ -565,10 +569,10 @@ for(j=0; jcurrent_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; + uint8_t *src = s->current_picture.f.data[0] + mb_x*16 + mb_y*16*s->linesize; - s->current_picture.motion_val[0][mot_index][0]= s->mv[0][0][0]= mv_predictor[j][0]; - s->current_picture.motion_val[0][mot_index][1]= s->mv[0][0][1]= mv_predictor[j][1]; + s->current_picture.f.motion_val[0][mot_index][0] = s->mv[0][0][0] = mv_predictor[j][0]; + s->current_picture.f.motion_val[0][mot_index][1] = s->mv[0][0][1] = mv_predictor[j][1]; if(ref[j]<0) //predictor intra or otherwise not available continue; @@ -607,8 +611,8 @@ for(i=0; icurrent_picture.motion_val[0][mot_index+i+j*mot_stride][0]= s->mv[0][0][0]; - s->current_picture.motion_val[0][mot_index+i+j*mot_stride][1]= s->mv[0][0][1]; + s->current_picture.f.motion_val[0][mot_index + i + j * mot_stride][0] = s->mv[0][0][0]; + s->current_picture.f.motion_val[0][mot_index + i + j * mot_stride][1] = s->mv[0][0][1]; } decode_mb(s, ref[best_pred]); @@ -640,19 +644,19 @@ static int is_intra_more_likely(MpegEncContext *s){ int is_intra_likely, i, j, undamaged_count, skip_amount, mb_x, mb_y; - if(!s->last_picture_ptr || !s->last_picture_ptr->data[0]) return 1; //no previous frame available -> use spatial prediction + if (!s->last_picture_ptr || !s->last_picture_ptr->f.data[0]) return 1; //no previous frame available -> use spatial prediction undamaged_count=0; for(i=0; imb_num; i++){ const int mb_xy= s->mb_index2xy[i]; const int error= s->error_status_table[mb_xy]; - if(!((error&DC_ERROR) && (error&MV_ERROR))) + if(!((error&ER_DC_ERROR) && (error&ER_MV_ERROR))) undamaged_count++; } if(s->codec_id == CODEC_ID_H264){ H264Context *h= (void*)s; - if(h->ref_count[0] <= 0 || !h->ref_list[0][0].data[0]) + if (h->list_count <= 0 || h->ref_count[0] <= 0 || !h->ref_list[0][0].f.data[0]) return 1; } @@ -662,7 +666,7 @@ if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration && s->pict_type == AV_PICTURE_TYPE_I) return 1; - skip_amount= FFMAX(undamaged_count/50, 1); //check only upto 50 MBs + skip_amount = FFMAX(undamaged_count / 50, 1); // check only up to 50 MBs is_intra_likely=0; j=0; @@ -672,15 +676,15 @@ const int mb_xy= mb_x + mb_y*s->mb_stride; error= s->error_status_table[mb_xy]; - if((error&DC_ERROR) && (error&MV_ERROR)) + if((error&ER_DC_ERROR) && (error&ER_MV_ERROR)) continue; //skip damaged j++; if((j%skip_amount) != 0) continue; //skip a few to speed things up if(s->pict_type==AV_PICTURE_TYPE_I){ - uint8_t *mb_ptr = s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; - uint8_t *last_mb_ptr= s->last_picture.data [0] + mb_x*16 + mb_y*16*s->linesize; + uint8_t *mb_ptr = s->current_picture.f.data[0] + mb_x*16 + mb_y*16*s->linesize; + uint8_t *last_mb_ptr= s->last_picture.f.data [0] + mb_x*16 + mb_y*16*s->linesize; if (s->avctx->codec_id == CODEC_ID_H264) { // FIXME @@ -691,7 +695,7 @@ is_intra_likely += s->dsp.sad[0](NULL, last_mb_ptr, mb_ptr , s->linesize, 16); is_intra_likely -= s->dsp.sad[0](NULL, last_mb_ptr, last_mb_ptr+s->linesize*16, s->linesize, 16); }else{ - if(IS_INTRA(s->current_picture.mb_type[mb_xy])) + if (IS_INTRA(s->current_picture.f.mb_type[mb_xy])) is_intra_likely++; else is_intra_likely--; @@ -703,17 +707,17 @@ } void ff_er_frame_start(MpegEncContext *s){ - if(!s->error_recognition) return; + if(!s->err_recognition) return; - memset(s->error_status_table, MV_ERROR|AC_ERROR|DC_ERROR|VP_START|AC_END|DC_END|MV_END, s->mb_stride*s->mb_height*sizeof(uint8_t)); + memset(s->error_status_table, ER_MB_ERROR|VP_START|ER_MB_END, s->mb_stride*s->mb_height*sizeof(uint8_t)); s->error_count= 3*s->mb_num; s->error_occurred = 0; } /** - * adds a slice. + * Add a slice. * @param endx x component of the last macroblock, can be -1 for the last of the previous line - * @param status the status at the end (MV_END, AC_ERROR, ...), it is assumed that no earlier end or + * @param status the status at the end (ER_MV_END, ER_AC_ERROR, ...), it is assumed that no earlier end or * error of the same type occurred */ void ff_er_add_slice(MpegEncContext *s, int startx, int starty, int endx, int endy, int status){ @@ -731,23 +735,23 @@ return; } - if(!s->error_recognition) return; + if(!s->err_recognition) return; mask &= ~VP_START; - if(status & (AC_ERROR|AC_END)){ - mask &= ~(AC_ERROR|AC_END); + if(status & (ER_AC_ERROR|ER_AC_END)){ + mask &= ~(ER_AC_ERROR|ER_AC_END); s->error_count -= end_i - start_i + 1; } - if(status & (DC_ERROR|DC_END)){ - mask &= ~(DC_ERROR|DC_END); + if(status & (ER_DC_ERROR|ER_DC_END)){ + mask &= ~(ER_DC_ERROR|ER_DC_END); s->error_count -= end_i - start_i + 1; } - if(status & (MV_ERROR|MV_END)){ - mask &= ~(MV_ERROR|MV_END); + if(status & (ER_MV_ERROR|ER_MV_END)){ + mask &= ~(ER_MV_ERROR|ER_MV_END); s->error_count -= end_i - start_i + 1; } - if(status & (AC_ERROR|DC_ERROR|MV_ERROR)) { + if(status & ER_MB_ERROR) { s->error_occurred = 1; s->error_count= INT_MAX; } @@ -774,7 +778,7 @@ int prev_status= s->error_status_table[ s->mb_index2xy[start_i - 1] ]; prev_status &= ~ VP_START; - if(prev_status != (MV_END|DC_END|AC_END)) s->error_count= INT_MAX; + if(prev_status != (ER_MV_END|ER_DC_END|ER_AC_END)) s->error_count= INT_MAX; } } @@ -787,21 +791,21 @@ int size = s->b8_stride * 2 * s->mb_height; Picture *pic= s->current_picture_ptr; - if(!s->error_recognition || s->error_count==0 || s->avctx->lowres || + if(!s->err_recognition || s->error_count==0 || s->avctx->lowres || s->avctx->hwaccel || s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU || - s->picture_structure != PICT_FRAME || // we dont support ER of field pictures yet, though it should not crash if enabled + s->picture_structure != PICT_FRAME || // we do not support ER of field pictures yet, though it should not crash if enabled s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return; - if(s->current_picture.motion_val[0] == NULL){ + if (s->current_picture.f.motion_val[0] == NULL) { av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n"); for(i=0; i<2; i++){ - pic->ref_index[i]= av_mallocz(s->mb_stride * s->mb_height * 4 * sizeof(uint8_t)); + pic->f.ref_index[i] = av_mallocz(s->mb_stride * s->mb_height * 4 * sizeof(uint8_t)); pic->motion_val_base[i]= av_mallocz((size+4) * 2 * sizeof(uint16_t)); - pic->motion_val[i]= pic->motion_val_base[i]+4; + pic->f.motion_val[i] = pic->motion_val_base[i] + 4; } - pic->motion_subsample_log2= 3; + pic->f.motion_subsample_log2 = 3; s->current_picture= *s->current_picture_ptr; } @@ -845,13 +849,13 @@ const int mb_xy= s->mb_index2xy[i]; int error= s->error_status_table[mb_xy]; - if(error&AC_END) + if(error&ER_AC_END) end_ok=0; - if((error&MV_END) || (error&DC_END) || (error&AC_ERROR)) + if((error&ER_MV_END) || (error&ER_DC_END) || (error&ER_AC_ERROR)) end_ok=1; if(!end_ok) - s->error_status_table[mb_xy]|= AC_ERROR; + s->error_status_table[mb_xy]|= ER_AC_ERROR; if(error&VP_START) end_ok=0; @@ -859,7 +863,7 @@ } /* handle missing slices */ - if(s->error_recognition>=4){ + if(s->err_recognition&AV_EF_EXPLODE){ int end_ok=1; for(i=s->mb_num-2; i>=s->mb_width+100; i--){ //FIXME +100 hack @@ -870,14 +874,14 @@ if(error1&VP_START) end_ok=1; - if( error2==(VP_START|DC_ERROR|AC_ERROR|MV_ERROR|AC_END|DC_END|MV_END) - && error1!=(VP_START|DC_ERROR|AC_ERROR|MV_ERROR|AC_END|DC_END|MV_END) - && ((error1&AC_END) || (error1&DC_END) || (error1&MV_END))){ //end & uninit + if( error2==(VP_START|ER_MB_ERROR|ER_MB_END) + && error1!=(VP_START|ER_MB_ERROR|ER_MB_END) + && ((error1&ER_AC_END) || (error1&ER_DC_END) || (error1&ER_MV_END))){ //end & uninit end_ok=0; } if(!end_ok) - s->error_status_table[mb_xy]|= DC_ERROR|AC_ERROR|MV_ERROR; + s->error_status_table[mb_xy]|= ER_MB_ERROR; } } @@ -913,9 +917,9 @@ int old_error= s->error_status_table[mb_xy]; if(old_error&VP_START) - error= old_error& (DC_ERROR|AC_ERROR|MV_ERROR); + error= old_error& ER_MB_ERROR; else{ - error|= old_error& (DC_ERROR|AC_ERROR|MV_ERROR); + error|= old_error& ER_MB_ERROR; s->error_status_table[mb_xy]|= error; } } @@ -925,8 +929,8 @@ for(i=0; imb_num; i++){ const int mb_xy= s->mb_index2xy[i]; error= s->error_status_table[mb_xy]; - if(error&(AC_ERROR|DC_ERROR|MV_ERROR)) - error|= AC_ERROR|DC_ERROR|MV_ERROR; + if(error&ER_MB_ERROR) + error|= ER_MB_ERROR; s->error_status_table[mb_xy]= error; } } @@ -935,9 +939,9 @@ for(i=0; imb_num; i++){ const int mb_xy= s->mb_index2xy[i]; error= s->error_status_table[mb_xy]; - if(error&DC_ERROR) dc_error ++; - if(error&AC_ERROR) ac_error ++; - if(error&MV_ERROR) mv_error ++; + if(error&ER_DC_ERROR) dc_error ++; + if(error&ER_AC_ERROR) ac_error ++; + if(error&ER_MV_ERROR) mv_error ++; } av_log(s->avctx, AV_LOG_INFO, "concealing %d DC, %d AC, %d MV errors\n", dc_error, ac_error, mv_error); @@ -947,34 +951,34 @@ for(i=0; imb_num; i++){ const int mb_xy= s->mb_index2xy[i]; error= s->error_status_table[mb_xy]; - if(!((error&DC_ERROR) && (error&MV_ERROR))) + if(!((error&ER_DC_ERROR) && (error&ER_MV_ERROR))) continue; if(is_intra_likely) - s->current_picture.mb_type[mb_xy]= MB_TYPE_INTRA4x4; + s->current_picture.f.mb_type[mb_xy] = MB_TYPE_INTRA4x4; else - s->current_picture.mb_type[mb_xy]= MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[mb_xy] = MB_TYPE_16x16 | MB_TYPE_L0; } // change inter to intra blocks if no reference frames are available - if (!s->last_picture.data[0] && !s->next_picture.data[0]) + if (!s->last_picture.f.data[0] && !s->next_picture.f.data[0]) for(i=0; imb_num; i++){ const int mb_xy= s->mb_index2xy[i]; - if(!IS_INTRA(s->current_picture.mb_type[mb_xy])) - s->current_picture.mb_type[mb_xy]= MB_TYPE_INTRA4x4; + if (!IS_INTRA(s->current_picture.f.mb_type[mb_xy])) + s->current_picture.f.mb_type[mb_xy] = MB_TYPE_INTRA4x4; } /* handle inter blocks with damaged AC */ for(mb_y=0; mb_ymb_height; mb_y++){ for(mb_x=0; mb_xmb_width; mb_x++){ const int mb_xy= mb_x + mb_y * s->mb_stride; - const int mb_type= s->current_picture.mb_type[mb_xy]; - int dir = !s->last_picture.data[0]; + const int mb_type= s->current_picture.f.mb_type[mb_xy]; + int dir = !s->last_picture.f.data[0]; error= s->error_status_table[mb_xy]; if(IS_INTRA(mb_type)) continue; //intra - if(error&MV_ERROR) continue; //inter with damaged MV - if(!(error&AC_ERROR)) continue; //undamaged inter + if(error&ER_MV_ERROR) continue; //inter with damaged MV + if(!(error&ER_AC_ERROR)) continue; //undamaged inter s->mv_dir = dir ? MV_DIR_BACKWARD : MV_DIR_FORWARD; s->mb_intra=0; @@ -984,13 +988,13 @@ int j; s->mv_type = MV_TYPE_8X8; for(j=0; j<4; j++){ - s->mv[0][j][0] = s->current_picture.motion_val[dir][ mb_index + (j&1) + (j>>1)*s->b8_stride ][0]; - s->mv[0][j][1] = s->current_picture.motion_val[dir][ mb_index + (j&1) + (j>>1)*s->b8_stride ][1]; + s->mv[0][j][0] = s->current_picture.f.motion_val[dir][mb_index + (j & 1) + (j >> 1) * s->b8_stride][0]; + s->mv[0][j][1] = s->current_picture.f.motion_val[dir][mb_index + (j & 1) + (j >> 1) * s->b8_stride][1]; } }else{ s->mv_type = MV_TYPE_16X16; - s->mv[0][0][0] = s->current_picture.motion_val[dir][ mb_x*2 + mb_y*2*s->b8_stride ][0]; - s->mv[0][0][1] = s->current_picture.motion_val[dir][ mb_x*2 + mb_y*2*s->b8_stride ][1]; + s->mv[0][0][0] = s->current_picture.f.motion_val[dir][ mb_x*2 + mb_y*2*s->b8_stride ][0]; + s->mv[0][0][1] = s->current_picture.f.motion_val[dir][ mb_x*2 + mb_y*2*s->b8_stride ][1]; } s->dsp.clear_blocks(s->block[0]); @@ -1007,16 +1011,16 @@ for(mb_x=0; mb_xmb_width; mb_x++){ int xy= mb_x*2 + mb_y*2*s->b8_stride; const int mb_xy= mb_x + mb_y * s->mb_stride; - const int mb_type= s->current_picture.mb_type[mb_xy]; + const int mb_type= s->current_picture.f.mb_type[mb_xy]; error= s->error_status_table[mb_xy]; if(IS_INTRA(mb_type)) continue; - if(!(error&MV_ERROR)) continue; //inter with undamaged MV - if(!(error&AC_ERROR)) continue; //undamaged inter + if(!(error&ER_MV_ERROR)) continue; //inter with undamaged MV + if(!(error&ER_AC_ERROR)) continue; //undamaged inter s->mv_dir = MV_DIR_FORWARD|MV_DIR_BACKWARD; - if(!s->last_picture.data[0]) s->mv_dir &= ~MV_DIR_FORWARD; - if(!s->next_picture.data[0]) s->mv_dir &= ~MV_DIR_BACKWARD; + if(!s->last_picture.f.data[0]) s->mv_dir &= ~MV_DIR_FORWARD; + if(!s->next_picture.f.data[0]) s->mv_dir &= ~MV_DIR_BACKWARD; s->mb_intra=0; s->mv_type = MV_TYPE_16X16; s->mb_skipped=0; @@ -1031,10 +1035,10 @@ ff_thread_await_progress((AVFrame *) s->next_picture_ptr, mb_y, 0); } - s->mv[0][0][0] = s->next_picture.motion_val[0][xy][0]*time_pb/time_pp; - s->mv[0][0][1] = s->next_picture.motion_val[0][xy][1]*time_pb/time_pp; - s->mv[1][0][0] = s->next_picture.motion_val[0][xy][0]*(time_pb - time_pp)/time_pp; - s->mv[1][0][1] = s->next_picture.motion_val[0][xy][1]*(time_pb - time_pp)/time_pp; + s->mv[0][0][0] = s->next_picture.f.motion_val[0][xy][0] * time_pb / time_pp; + s->mv[0][0][1] = s->next_picture.f.motion_val[0][xy][1] * time_pb / time_pp; + s->mv[1][0][0] = s->next_picture.f.motion_val[0][xy][0] * (time_pb - time_pp) / time_pp; + s->mv[1][0][1] = s->next_picture.f.motion_val[0][xy][1] * (time_pb - time_pp) / time_pp; }else{ s->mv[0][0][0]= 0; s->mv[0][0][1]= 0; @@ -1061,16 +1065,16 @@ int16_t *dc_ptr; uint8_t *dest_y, *dest_cb, *dest_cr; const int mb_xy= mb_x + mb_y * s->mb_stride; - const int mb_type= s->current_picture.mb_type[mb_xy]; + const int mb_type = s->current_picture.f.mb_type[mb_xy]; error= s->error_status_table[mb_xy]; if(IS_INTRA(mb_type) && s->partitioned_frame) continue; -// if(error&MV_ERROR) continue; //inter data damaged FIXME is this good? +// if(error&ER_MV_ERROR) continue; //inter data damaged FIXME is this good? - dest_y = s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; - dest_cb= s->current_picture.data[1] + mb_x*8 + mb_y*8 *s->uvlinesize; - dest_cr= s->current_picture.data[2] + mb_x*8 + mb_y*8 *s->uvlinesize; + dest_y = s->current_picture.f.data[0] + mb_x * 16 + mb_y * 16 * s->linesize; + dest_cb = s->current_picture.f.data[1] + mb_x * 8 + mb_y * 8 * s->uvlinesize; + dest_cr = s->current_picture.f.data[2] + mb_x * 8 + mb_y * 8 * s->uvlinesize; dc_ptr= &s->dc_val[0][mb_x*2 + mb_y*2*s->b8_stride]; for(n=0; n<4; n++){ @@ -1088,8 +1092,8 @@ for(y=0; y<8; y++){ int x; for(x=0; x<8; x++){ - dcu+=dest_cb[x + y*(s->uvlinesize)]; - dcv+=dest_cr[x + y*(s->uvlinesize)]; + dcu += dest_cb[x + y * s->uvlinesize]; + dcv += dest_cr[x + y * s->uvlinesize]; } } s->dc_val[1][mb_x + mb_y*s->mb_stride]= (dcu+4)>>3; @@ -1110,16 +1114,16 @@ for(mb_x=0; mb_xmb_width; mb_x++){ uint8_t *dest_y, *dest_cb, *dest_cr; const int mb_xy= mb_x + mb_y * s->mb_stride; - const int mb_type= s->current_picture.mb_type[mb_xy]; + const int mb_type = s->current_picture.f.mb_type[mb_xy]; error= s->error_status_table[mb_xy]; if(IS_INTER(mb_type)) continue; - if(!(error&AC_ERROR)) continue; //undamaged + if(!(error&ER_AC_ERROR)) continue; //undamaged - dest_y = s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; - dest_cb= s->current_picture.data[1] + mb_x*8 + mb_y*8 *s->uvlinesize; - dest_cr= s->current_picture.data[2] + mb_x*8 + mb_y*8 *s->uvlinesize; + dest_y = s->current_picture.f.data[0] + mb_x * 16 + mb_y * 16 * s->linesize; + dest_cb = s->current_picture.f.data[1] + mb_x * 8 + mb_y * 8 * s->uvlinesize; + dest_cr = s->current_picture.f.data[2] + mb_x * 8 + mb_y * 8 * s->uvlinesize; put_dc(s, dest_y, dest_cb, dest_cr, mb_x, mb_y); } @@ -1127,14 +1131,14 @@ if(s->avctx->error_concealment&FF_EC_DEBLOCK){ /* filter horizontal block boundaries */ - h_block_filter(s, s->current_picture.data[0], s->mb_width*2, s->mb_height*2, s->linesize , 1); - h_block_filter(s, s->current_picture.data[1], s->mb_width , s->mb_height , s->uvlinesize, 0); - h_block_filter(s, s->current_picture.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0); + h_block_filter(s, s->current_picture.f.data[0], s->mb_width*2, s->mb_height*2, s->linesize , 1); + h_block_filter(s, s->current_picture.f.data[1], s->mb_width , s->mb_height , s->uvlinesize, 0); + h_block_filter(s, s->current_picture.f.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0); /* filter vertical block boundaries */ - v_block_filter(s, s->current_picture.data[0], s->mb_width*2, s->mb_height*2, s->linesize , 1); - v_block_filter(s, s->current_picture.data[1], 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); + v_block_filter(s, s->current_picture.f.data[0], s->mb_width*2, s->mb_height*2, s->linesize , 1); + v_block_filter(s, s->current_picture.f.data[1], s->mb_width , s->mb_height , s->uvlinesize, 0); + v_block_filter(s, s->current_picture.f.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0); } ec_clean: @@ -1143,7 +1147,7 @@ const int mb_xy= s->mb_index2xy[i]; int error= s->error_status_table[mb_xy]; - if(s->pict_type!=AV_PICTURE_TYPE_B && (error&(DC_ERROR|MV_ERROR|AC_ERROR))){ + if(s->pict_type!=AV_PICTURE_TYPE_B && (error&(ER_DC_ERROR|ER_MV_ERROR|ER_AC_ERROR))){ s->mbskip_table[mb_xy]=0; } s->mbintra_table[mb_xy]=1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/escape124.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/escape124.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/escape124.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/escape124.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,7 +21,7 @@ #include "avcodec.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" typedef union MacroBlock { @@ -364,15 +364,14 @@ AVCodec ff_escape124_decoder = { - "escape124", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ESCAPE124, - sizeof(Escape124Context), - escape124_decode_init, - NULL, - escape124_decode_close, - escape124_decode_frame, - CODEC_CAP_DR1, + .name = "escape124", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ESCAPE124, + .priv_data_size = sizeof(Escape124Context), + .init = escape124_decode_init, + .close = escape124_decode_close, + .decode = escape124_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Escape 124"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/faxcompr.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/faxcompr.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/faxcompr.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/faxcompr.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,8 +20,8 @@ */ /** - * CCITT Fax Group 3 and 4 decompression * @file + * CCITT Fax Group 3 and 4 decompression * @author Konstantin Shishkov */ #include "avcodec.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/faxcompr.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/faxcompr.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/faxcompr.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/faxcompr.h 2012-01-11 00:34:30.000000000 +0000 @@ -20,8 +20,8 @@ */ /** - * CCITT Fax Group 3 and 4 decompression * @file + * CCITT Fax Group 3 and 4 decompression * @author Konstantin Shishkov */ #ifndef AVCODEC_FAXCOMPR_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/fft.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/fft.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/fft.h 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/fft.h 2012-01-11 00:34:30.000000000 +0000 @@ -119,7 +119,7 @@ /** * Initialize the cosine table in ff_cos_tabs[index] - * \param index index in ff_cos_tabs array of the table to initialize + * @param index index in ff_cos_tabs array of the table to initialize */ void ff_init_ff_cos_tabs(int index); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/fft-test.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/fft-test.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/fft-test.c 2011-04-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/fft-test.c 2012-01-11 00:34:30.000000000 +0000 @@ -37,8 +37,6 @@ #include #include -#undef exit - /* reference fft */ #define MUL16(a,b) ((a) * (b)) @@ -228,7 +226,6 @@ "-n b set the transform size to 2^b\n" "-f x set scale factor for output data of (I)MDCT to x\n" ); - exit(1); } enum tf_transform { @@ -252,8 +249,9 @@ #if CONFIG_FFT_FLOAT RDFTContext r1, *r = &r1; DCTContext d1, *d = &d1; + int fft_size_2; #endif - int fft_nbits, fft_size, fft_size_2; + int fft_nbits, fft_size; double scale = 1.0; AVLFG prng; av_lfg_init(&prng, 1); @@ -266,7 +264,7 @@ switch(c) { case 'h': help(); - break; + return 1; case 's': do_speed = 1; break; @@ -292,7 +290,6 @@ } fft_size = 1 << fft_nbits; - fft_size_2 = fft_size >> 1; tab = av_malloc(fft_size * sizeof(FFTComplex)); tab1 = av_malloc(fft_size * sizeof(FFTComplex)); tab_ref = av_malloc(fft_size * sizeof(FFTComplex)); @@ -372,6 +369,7 @@ break; #if CONFIG_FFT_FLOAT case TRANSFORM_RDFT: + fft_size_2 = fft_size >> 1; if (do_inverse) { tab1[ 0].im = 0; tab1[fft_size_2].im = 0; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ffv1.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ffv1.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ffv1.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ffv1.c 2012-01-11 00:34:30.000000000 +0000 @@ -42,25 +42,6 @@ extern const uint8_t ff_log2_run[41]; -static const int8_t quant3[256]={ - 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, -}; - static const int8_t quant5_10bit[256]={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -98,42 +79,7 @@ -2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, -2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-1,-1, }; -static const int8_t quant7[256]={ - 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-2,-2,-2,-2,-2,-2,-2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-1, -}; -static const int8_t quant9[256]={ - 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-2,-2,-2,-2,-1,-1, -}; + static const int8_t quant9_10bit[256]={ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, @@ -171,24 +117,6 @@ -4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, -4,-4,-4,-4,-4,-3,-3,-3,-3,-3,-3,-3,-2,-2,-2,-1, }; -static const int8_t quant13[256]={ - 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6, --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6, --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6, --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6, --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-5, --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5, --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5, --4,-4,-4,-4,-4,-4,-4,-4,-4,-3,-3,-3,-3,-2,-2,-1, -}; static const uint8_t ver2_state[256]= { 0, 10, 10, 10, 10, 16, 16, 16, 28, 16, 16, 29, 42, 49, 20, 49, @@ -1765,7 +1693,7 @@ bytes_read = c->bytestream - c->bytestream_start - 1; if(bytes_read ==0) av_log(avctx, AV_LOG_ERROR, "error at end of AC stream\n"); //FIXME //printf("pos=%d\n", bytes_read); - init_get_bits(&f->slice_context[0]->gb, buf + bytes_read, buf_size - bytes_read); + init_get_bits(&f->slice_context[0]->gb, buf + bytes_read, (buf_size - bytes_read) * 8); } else { bytes_read = 0; /* avoid warning */ } @@ -1782,7 +1710,7 @@ if(fs->ac){ ff_init_range_decoder(&fs->c, buf_p, v); }else{ - init_get_bits(&fs->gb, buf_p, v); + init_get_bits(&fs->gb, buf_p, v * 8); } } @@ -1796,28 +1724,26 @@ } AVCodec ff_ffv1_decoder = { - "ffv1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_FFV1, - sizeof(FFV1Context), - decode_init, - NULL, - common_end, - decode_frame, - CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/ | CODEC_CAP_SLICE_THREADS, - NULL, + .name = "ffv1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_FFV1, + .priv_data_size = sizeof(FFV1Context), + .init = decode_init, + .close = common_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/ | CODEC_CAP_SLICE_THREADS, .long_name= NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"), }; #if CONFIG_FFV1_ENCODER AVCodec ff_ffv1_encoder = { - "ffv1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_FFV1, - sizeof(FFV1Context), - encode_init, - encode_frame, - common_end, + .name = "ffv1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_FFV1, + .priv_data_size = sizeof(FFV1Context), + .init = encode_init, + .encode = encode_frame, + .close = common_end, .capabilities = CODEC_CAP_SLICE_THREADS, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_RGB32, PIX_FMT_YUV420P16, PIX_FMT_YUV422P16, PIX_FMT_YUV444P16, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flacdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flacdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flacdec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flacdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,9 +23,7 @@ * @file * FLAC (Free Lossless Audio Codec) decoder * @author Alex Beregszaszi - * - * For more information on the FLAC format, visit: - * http://flac.sourceforge.net/ + * @see http://flac.sourceforge.net/ * * This decoder can be used in 1 of 2 ways: Either raw FLAC data can be fed * through, starting from the initial 'fLaC' signature; or by passing the @@ -51,6 +49,7 @@ FLACSTREAMINFO AVCodecContext *avctx; ///< parent AVCodecContext + AVFrame frame; GetBitContext gb; ///< GetBitContext initialized to start at the current frame int blocksize; ///< number of samples in the current frame @@ -65,7 +64,7 @@ static void allocate_buffers(FLACContext *s); -int ff_flac_is_extradata_valid(AVCodecContext *avctx, +int avpriv_flac_is_extradata_valid(AVCodecContext *avctx, enum FLACExtradataFormat *format, uint8_t **streaminfo_start) { @@ -106,11 +105,11 @@ if (!avctx->extradata) return 0; - if (!ff_flac_is_extradata_valid(avctx, &format, &streaminfo)) + if (!avpriv_flac_is_extradata_valid(avctx, &format, &streaminfo)) return -1; /* initialize based on the demuxer-supplied streamdata header */ - ff_flac_parse_streaminfo(avctx, (FLACStreaminfo *)s, streaminfo); + avpriv_flac_parse_streaminfo(avctx, (FLACStreaminfo *)s, streaminfo); if (s->bps > 16) avctx->sample_fmt = AV_SAMPLE_FMT_S32; else @@ -118,6 +117,9 @@ allocate_buffers(s); s->got_streaminfo = 1; + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } @@ -142,7 +144,7 @@ } } -void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s, +void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s, const uint8_t *buffer) { GetBitContext gb; @@ -176,7 +178,7 @@ dump_headers(avctx, s); } -void ff_flac_parse_block_header(const uint8_t *block_header, +void avpriv_flac_parse_block_header(const uint8_t *block_header, int *last, int *type, int *size) { int tmp = bytestream_get_byte(&block_header); @@ -203,12 +205,12 @@ /* need more data */ return 0; } - ff_flac_parse_block_header(&buf[4], NULL, &metadata_type, &metadata_size); + avpriv_flac_parse_block_header(&buf[4], NULL, &metadata_type, &metadata_size); if (metadata_type != FLAC_METADATA_TYPE_STREAMINFO || metadata_size != FLAC_STREAMINFO_SIZE) { return AVERROR_INVALIDDATA; } - ff_flac_parse_streaminfo(s->avctx, (FLACStreaminfo *)s, &buf[8]); + avpriv_flac_parse_streaminfo(s->avctx, (FLACStreaminfo *)s, &buf[8]); allocate_buffers(s); s->got_streaminfo = 1; @@ -228,9 +230,11 @@ buf += 4; do { - ff_flac_parse_block_header(buf, &metadata_last, NULL, &metadata_size); + if (buf_end - buf < 4) + return 0; + avpriv_flac_parse_block_header(buf, &metadata_last, NULL, &metadata_size); buf += 4; - if (buf + metadata_size > buf_end) { + if (buf_end - buf < metadata_size) { /* need more data in order to read the complete header */ return 0; } @@ -542,20 +546,18 @@ return 0; } -static int flac_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int flac_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; FLACContext *s = avctx->priv_data; int i, j = 0, bytes_read = 0; - int16_t *samples_16 = data; - int32_t *samples_32 = data; - int alloc_data_size= *data_size; - int output_size; + int16_t *samples_16; + int32_t *samples_32; + int ret; - *data_size=0; + *got_frame_ptr = 0; if (s->max_framesize == 0) { s->max_framesize = @@ -586,14 +588,14 @@ } bytes_read = (get_bits_count(&s->gb)+7)/8; - /* check if allocated data size is large enough for output */ - output_size = s->blocksize * s->channels * (s->is32 ? 4 : 2); - if (output_size > alloc_data_size) { - av_log(s->avctx, AV_LOG_ERROR, "output data size is larger than " - "allocated data size\n"); - return -1; + /* get output buffer */ + s->frame.nb_samples = s->blocksize; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; } - *data_size = output_size; + samples_16 = (int16_t *)s->frame.data[0]; + samples_32 = (int32_t *)s->frame.data[0]; #define DECORRELATE(left, right)\ assert(s->channels == 2);\ @@ -638,6 +640,9 @@ buf_size - bytes_read, buf_size); } + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return bytes_read; } @@ -654,13 +659,13 @@ } AVCodec ff_flac_decoder = { - "flac", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_FLAC, - sizeof(FLACContext), - flac_decode_init, - NULL, - flac_decode_close, - flac_decode_frame, + .name = "flac", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_FLAC, + .priv_data_size = sizeof(FLACContext), + .init = flac_decode_init, + .close = flac_decode_close, + .decode = flac_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name= NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flacenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flacenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flacenc.c 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flacenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -1330,22 +1330,22 @@ #define FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM static const AVOption options[] = { -{ "lpc_coeff_precision", "LPC coefficient precision", offsetof(FlacEncodeContext, options.lpc_coeff_precision), FF_OPT_TYPE_INT, {.dbl = 15 }, 0, MAX_LPC_PRECISION, FLAGS }, -{ "lpc_type", "LPC algorithm", offsetof(FlacEncodeContext, options.lpc_type), FF_OPT_TYPE_INT, {.dbl = FF_LPC_TYPE_DEFAULT }, FF_LPC_TYPE_DEFAULT, FF_LPC_TYPE_NB-1, FLAGS, "lpc_type" }, -{ "none", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_LPC_TYPE_NONE }, INT_MIN, INT_MAX, FLAGS, "lpc_type" }, -{ "fixed", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_LPC_TYPE_FIXED }, INT_MIN, INT_MAX, FLAGS, "lpc_type" }, -{ "levinson", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_LPC_TYPE_LEVINSON }, INT_MIN, INT_MAX, FLAGS, "lpc_type" }, -{ "cholesky", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_LPC_TYPE_CHOLESKY }, INT_MIN, INT_MAX, FLAGS, "lpc_type" }, -{ "lpc_passes", "Number of passes to use for Cholesky factorization during LPC analysis", offsetof(FlacEncodeContext, options.lpc_passes), FF_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, FLAGS }, -{ "min_partition_order", NULL, offsetof(FlacEncodeContext, options.min_partition_order), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, MAX_PARTITION_ORDER, FLAGS }, -{ "max_partition_order", NULL, offsetof(FlacEncodeContext, options.max_partition_order), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, MAX_PARTITION_ORDER, FLAGS }, -{ "prediction_order_method", "Search method for selecting prediction order", offsetof(FlacEncodeContext, options.prediction_order_method), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, ORDER_METHOD_LOG, FLAGS, "predm" }, -{ "estimation", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_EST }, INT_MIN, INT_MAX, FLAGS, "predm" }, -{ "2level", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_2LEVEL }, INT_MIN, INT_MAX, FLAGS, "predm" }, -{ "4level", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_4LEVEL }, INT_MIN, INT_MAX, FLAGS, "predm" }, -{ "8level", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_8LEVEL }, INT_MIN, INT_MAX, FLAGS, "predm" }, -{ "search", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_SEARCH }, INT_MIN, INT_MAX, FLAGS, "predm" }, -{ "log", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_LOG }, INT_MIN, INT_MAX, FLAGS, "predm" }, +{ "lpc_coeff_precision", "LPC coefficient precision", offsetof(FlacEncodeContext, options.lpc_coeff_precision), AV_OPT_TYPE_INT, {.dbl = 15 }, 0, MAX_LPC_PRECISION, FLAGS }, +{ "lpc_type", "LPC algorithm", offsetof(FlacEncodeContext, options.lpc_type), AV_OPT_TYPE_INT, {.dbl = FF_LPC_TYPE_DEFAULT }, FF_LPC_TYPE_DEFAULT, FF_LPC_TYPE_NB-1, FLAGS, "lpc_type" }, +{ "none", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_LPC_TYPE_NONE }, INT_MIN, INT_MAX, FLAGS, "lpc_type" }, +{ "fixed", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_LPC_TYPE_FIXED }, INT_MIN, INT_MAX, FLAGS, "lpc_type" }, +{ "levinson", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_LPC_TYPE_LEVINSON }, INT_MIN, INT_MAX, FLAGS, "lpc_type" }, +{ "cholesky", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_LPC_TYPE_CHOLESKY }, INT_MIN, INT_MAX, FLAGS, "lpc_type" }, +{ "lpc_passes", "Number of passes to use for Cholesky factorization during LPC analysis", offsetof(FlacEncodeContext, options.lpc_passes), AV_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, FLAGS }, +{ "min_partition_order", NULL, offsetof(FlacEncodeContext, options.min_partition_order), AV_OPT_TYPE_INT, {.dbl = -1 }, -1, MAX_PARTITION_ORDER, FLAGS }, +{ "max_partition_order", NULL, offsetof(FlacEncodeContext, options.max_partition_order), AV_OPT_TYPE_INT, {.dbl = -1 }, -1, MAX_PARTITION_ORDER, FLAGS }, +{ "prediction_order_method", "Search method for selecting prediction order", offsetof(FlacEncodeContext, options.prediction_order_method), AV_OPT_TYPE_INT, {.dbl = -1 }, -1, ORDER_METHOD_LOG, FLAGS, "predm" }, +{ "estimation", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_EST }, INT_MIN, INT_MAX, FLAGS, "predm" }, +{ "2level", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_2LEVEL }, INT_MIN, INT_MAX, FLAGS, "predm" }, +{ "4level", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_4LEVEL }, INT_MIN, INT_MAX, FLAGS, "predm" }, +{ "8level", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_8LEVEL }, INT_MIN, INT_MAX, FLAGS, "predm" }, +{ "search", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_SEARCH }, INT_MIN, INT_MAX, FLAGS, "predm" }, +{ "log", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = ORDER_METHOD_LOG }, INT_MIN, INT_MAX, FLAGS, "predm" }, { NULL }, }; @@ -1357,14 +1357,13 @@ }; AVCodec ff_flac_encoder = { - "flac", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_FLAC, - sizeof(FlacEncodeContext), - flac_encode_init, - flac_encode_frame, - flac_encode_close, - NULL, + .name = "flac", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_FLAC, + .priv_data_size = sizeof(FlacEncodeContext), + .init = flac_encode_init, + .encode = flac_encode_frame, + .close = flac_encode_close, .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flac.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flac.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flac.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flac.h 2012-01-11 00:34:30.000000000 +0000 @@ -95,8 +95,8 @@ * @param[out] s where parsed information is stored * @param[in] buffer pointer to start of 34-byte streaminfo data */ -void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s, - const uint8_t *buffer); +void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s, + const uint8_t *buffer); /** * Validate the FLAC extradata. @@ -105,9 +105,9 @@ * @param[out] streaminfo_start pointer to start of 34-byte STREAMINFO data. * @return 1 if valid, 0 if not valid. */ -int ff_flac_is_extradata_valid(AVCodecContext *avctx, - enum FLACExtradataFormat *format, - uint8_t **streaminfo_start); +int avpriv_flac_is_extradata_valid(AVCodecContext *avctx, + enum FLACExtradataFormat *format, + uint8_t **streaminfo_start); /** * Parse the metadata block parameters from the header. @@ -116,8 +116,8 @@ * @param[out] type metadata block type * @param[out] size metadata block size */ -void ff_flac_parse_block_header(const uint8_t *block_header, - int *last, int *type, int *size); +void avpriv_flac_parse_block_header(const uint8_t *block_header, + int *last, int *type, int *size); /** * Calculate an estimate for the maximum frame size based on verbatim mode. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flac_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flac_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flac_parser.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flac_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -674,9 +674,9 @@ } AVCodecParser ff_flac_parser = { - { CODEC_ID_FLAC }, - sizeof(FLACParseContext), - flac_parse_init, - flac_parse, - flac_parse_close, + .codec_ids = { CODEC_ID_FLAC }, + .priv_data_size = sizeof(FLACParseContext), + .parser_init = flac_parse_init, + .parser_parse = flac_parse, + .parser_close = flac_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flashsv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flashsv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flashsv.c 2011-05-05 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flashsv.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,35 +25,29 @@ * Flash Screen Video decoder * @author Alex Beregszaszi * @author Benjamin Larsson - */ - -/* Bitstream description - * The picture is divided into blocks that are zlib compressed. - * - * The decoder is fed complete frames, the frameheader contains: - * 4bits of block width - * 12bits of frame width - * 4bits of block height - * 12bits of frame height + * @author Daniel Verkamp + * @author Konstantin Shishkov * - * Directly after the header are the compressed blocks. The blocks - * have their compressed size represented with 16bits in the beginnig. - * If the size = 0 then the block is unchanged from the previous frame. - * All blocks are decompressed until the buffer is consumed. - * - * Encoding ideas, a basic encoder would just use a fixed block size. - * Block sizes can be multipels of 16, from 16 to 256. The blocks don't - * have to be quadratic. A brute force search with a set of diffrent - * block sizes should give a better result then to just use a fixed size. + * A description of the bitstream format for Flash Screen Video version 1/2 + * is part of the SWF File Format Specification (version 10), which can be + * downloaded from http://www.adobe.com/devnet/swf.html. */ #include #include #include +#include "libavutil/intreadwrite.h" #include "avcodec.h" +#include "bytestream.h" #include "get_bits.h" +typedef struct BlockInfo { + uint8_t *pos; + int size; + int unp_size; +} BlockInfo; + typedef struct FlashSVContext { AVCodecContext *avctx; AVFrame frame; @@ -62,21 +56,50 @@ uint8_t *tmpblock; int block_size; z_stream zstream; + int ver; + const uint32_t *pal; + int is_keyframe; + uint8_t *keyframedata; + uint8_t *keyframe; + BlockInfo *blocks; + uint8_t *deflate_block; + int deflate_block_size; + int color_depth; + int zlibprime_curr, zlibprime_prev; + int diff_start, diff_height; } FlashSVContext; -static void copy_region(uint8_t *sptr, uint8_t *dptr, - int dx, int dy, int h, int w, int stride) +static int decode_hybrid(const uint8_t *sptr, uint8_t *dptr, int dx, int dy, + int h, int w, int stride, const uint32_t *pal) { - int i; + int x, y; + const uint8_t *orig_src = sptr; - for (i = dx + h; i > dx; i--) { - memcpy(dptr + (i * stride) + dy * 3, sptr, w * 3); - sptr += w * 3; + for (y = dx+h; y > dx; y--) { + uint8_t *dst = dptr + (y * stride) + dy * 3; + for (x = 0; x < w; x++) { + if (*sptr & 0x80) { + /* 15-bit color */ + unsigned c = AV_RB16(sptr) & ~0x8000; + unsigned b = c & 0x1F; + unsigned g = (c >> 5) & 0x1F; + unsigned r = c >> 10; + /* 000aaabb -> aaabbaaa */ + *dst++ = (b << 3) | (b >> 2); + *dst++ = (g << 3) | (g >> 2); + *dst++ = (r << 3) | (r >> 2); + sptr += 2; + } else { + /* palette index */ + uint32_t c = pal[*sptr++]; + bytestream_put_le24(&dst, c); + } + } } + return sptr - orig_src; } - static av_cold int flashsv_decode_init(AVCodecContext *avctx) { FlashSVContext *s = avctx->priv_data; @@ -86,7 +109,7 @@ s->zstream.zalloc = Z_NULL; s->zstream.zfree = Z_NULL; s->zstream.opaque = Z_NULL; - zret = inflateInit(&(s->zstream)); + zret = inflateInit(&s->zstream); if (zret != Z_OK) { av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret); return 1; @@ -98,10 +121,114 @@ } +static void flashsv2_prime(FlashSVContext *s, uint8_t *src, + int size, int unp_size) +{ + z_stream zs; + + zs.zalloc = NULL; + zs.zfree = NULL; + zs.opaque = NULL; + + s->zstream.next_in = src; + s->zstream.avail_in = size; + s->zstream.next_out = s->tmpblock; + s->zstream.avail_out = s->block_size * 3; + inflate(&s->zstream, Z_SYNC_FLUSH); + + deflateInit(&zs, 0); + zs.next_in = s->tmpblock; + zs.avail_in = s->block_size * 3 - s->zstream.avail_out; + zs.next_out = s->deflate_block; + zs.avail_out = s->deflate_block_size; + deflate(&zs, Z_SYNC_FLUSH); + deflateEnd(&zs); + + inflateReset(&s->zstream); + + s->zstream.next_in = s->deflate_block; + s->zstream.avail_in = s->deflate_block_size - zs.avail_out; + s->zstream.next_out = s->tmpblock; + s->zstream.avail_out = s->block_size * 3; + inflate(&s->zstream, Z_SYNC_FLUSH); +} + +static int flashsv_decode_block(AVCodecContext *avctx, AVPacket *avpkt, + GetBitContext *gb, int block_size, + int width, int height, int x_pos, int y_pos, + int blk_idx) +{ + struct FlashSVContext *s = avctx->priv_data; + uint8_t *line = s->tmpblock; + int k; + int ret = inflateReset(&s->zstream); + if (ret != Z_OK) { + //return -1; + } + if (s->zlibprime_curr || s->zlibprime_prev) { + flashsv2_prime(s, s->blocks[blk_idx].pos, s->blocks[blk_idx].size, + s->blocks[blk_idx].unp_size); + } + s->zstream.next_in = avpkt->data + get_bits_count(gb) / 8; + s->zstream.avail_in = block_size; + s->zstream.next_out = s->tmpblock; + s->zstream.avail_out = s->block_size * 3; + ret = inflate(&s->zstream, Z_FINISH); + if (ret == Z_DATA_ERROR) { + av_log(avctx, AV_LOG_ERROR, "Zlib resync occurred\n"); + inflateSync(&s->zstream); + ret = inflate(&s->zstream, Z_FINISH); + } + + if (ret != Z_OK && ret != Z_STREAM_END) { + //return -1; + } + + if (s->is_keyframe) { + s->blocks[blk_idx].pos = s->keyframedata + (get_bits_count(gb) / 8); + s->blocks[blk_idx].size = block_size; + s->blocks[blk_idx].unp_size = s->block_size * 3 - s->zstream.avail_out; + } + if (!s->color_depth) { + /* Flash Screen Video stores the image upside down, so copy + * lines to destination in reverse order. */ + for (k = 1; k <= s->diff_height; k++) { + memcpy(s->frame.data[0] + x_pos * 3 + + (s->image_height - y_pos - s->diff_start - k) * s->frame.linesize[0], + line, width * 3); + /* advance source pointer to next line */ + line += width * 3; + } + } else { + /* hybrid 15-bit/palette mode */ + decode_hybrid(s->tmpblock, s->frame.data[0], + s->image_height - (y_pos + 1 + s->diff_start + s->diff_height), + x_pos, s->diff_height, width, + s->frame.linesize[0], s->pal); + } + skip_bits_long(gb, 8 * block_size); /* skip the consumed bits */ + return 0; +} + +static int calc_deflate_block_size(int tmpblock_size) +{ + z_stream zstream; + int size; + + zstream.zalloc = Z_NULL; + zstream.zfree = Z_NULL; + zstream.opaque = Z_NULL; + if (deflateInit(&zstream, 0) != Z_OK) + return -1; + size = deflateBound(&zstream, tmpblock_size); + deflateEnd(&zstream); + + return size; +} + static int flashsv_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; FlashSVContext *s = avctx->priv_data; int h_blocks, v_blocks, h_part, v_part, i, j; @@ -113,7 +240,7 @@ if (buf_size < 4) return -1; - init_get_bits(&gb, buf, buf_size * 8); + init_get_bits(&gb, avpkt->data, buf_size * 8); /* start to parse the bitstream */ s->block_width = 16 * (get_bits(&gb, 4) + 1); @@ -121,7 +248,19 @@ s->block_height = 16 * (get_bits(&gb, 4) + 1); s->image_height = get_bits(&gb, 12); - /* calculate amount of blocks and the size of the border blocks */ + if (s->ver == 2) { + skip_bits(&gb, 6); + if (get_bits1(&gb)) { + av_log_missing_feature(avctx, "iframe", 1); + return AVERROR_PATCHWELCOME; + } + if (get_bits1(&gb)) { + av_log_missing_feature(avctx, "custom palette", 1); + return AVERROR_PATCHWELCOME; + } + } + + /* calculate number of blocks and size of border (partial) blocks */ h_blocks = s->image_width / s->block_width; h_part = s->image_width % s->block_width; v_blocks = s->image_height / s->block_height; @@ -130,34 +269,61 @@ /* the block size could change between frames, make sure the buffer * is large enough, if not, get a larger one */ if (s->block_size < s->block_width * s->block_height) { - av_free(s->tmpblock); - if ((s->tmpblock = av_malloc(3 * s->block_width * s->block_height)) == NULL) { + int tmpblock_size = 3 * s->block_width * s->block_height; + + s->tmpblock = av_realloc(s->tmpblock, tmpblock_size); + if (!s->tmpblock) { av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); return AVERROR(ENOMEM); } + if (s->ver == 2) { + s->deflate_block_size = calc_deflate_block_size(tmpblock_size); + if (s->deflate_block_size <= 0) { + av_log(avctx, AV_LOG_ERROR, "Can't determine deflate buffer size.\n"); + return -1; + } + s->deflate_block = av_realloc(s->deflate_block, s->deflate_block_size); + if (!s->deflate_block) { + av_log(avctx, AV_LOG_ERROR, "Can't allocate deflate buffer.\n"); + return AVERROR(ENOMEM); + } + } } s->block_size = s->block_width * s->block_height; - /* init the image size once */ - if ((avctx->width == 0) && (avctx->height == 0)) { + /* initialize the image size once */ + if (avctx->width == 0 && avctx->height == 0) { avctx->width = s->image_width; avctx->height = s->image_height; } /* check for changes of image width and image height */ - if ((avctx->width != s->image_width) || (avctx->height != s->image_height)) { - av_log(avctx, AV_LOG_ERROR, "Frame width or height differs from first frames!\n"); - av_log(avctx, AV_LOG_ERROR, "fh = %d, fv %d vs ch = %d, cv = %d\n", avctx->height, - avctx->width, s->image_height, s->image_width); - return -1; + if (avctx->width != s->image_width || avctx->height != s->image_height) { + av_log(avctx, AV_LOG_ERROR, + "Frame width or height differs from first frame!\n"); + av_log(avctx, AV_LOG_ERROR, "fh = %d, fv %d vs ch = %d, cv = %d\n", + avctx->height, avctx->width, s->image_height, s->image_width); + return AVERROR_INVALIDDATA; } - av_log(avctx, AV_LOG_DEBUG, "image: %dx%d block: %dx%d num: %dx%d part: %dx%d\n", - s->image_width, s->image_height, s->block_width, s->block_height, - h_blocks, v_blocks, h_part, v_part); + /* we care for keyframes only in Screen Video v2 */ + s->is_keyframe = (avpkt->flags & AV_PKT_FLAG_KEY) && (s->ver == 2); + if (s->is_keyframe) { + s->keyframedata = av_realloc(s->keyframedata, avpkt->size); + memcpy(s->keyframedata, avpkt->data, avpkt->size); + s->blocks = av_realloc(s->blocks, + (v_blocks + !!v_part) * (h_blocks + !!h_part) + * sizeof(s->blocks[0])); + } - s->frame.reference = 1; - s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; + av_dlog(avctx, "image: %dx%d block: %dx%d num: %dx%d part: %dx%d\n", + s->image_width, s->image_height, s->block_width, s->block_height, + h_blocks, v_blocks, h_part, v_part); + + s->frame.reference = 3; + s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | + FF_BUFFER_HINTS_PRESERVE | + FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame) < 0) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); return -1; @@ -166,52 +332,96 @@ /* loop over all block columns */ for (j = 0; j < v_blocks + (v_part ? 1 : 0); j++) { - int hp = j * s->block_height; // horiz position in frame - int hs = (j < v_blocks) ? s->block_height : v_part; // size of block - + int y_pos = j * s->block_height; // vertical position in frame + int cur_blk_height = (j < v_blocks) ? s->block_height : v_part; /* loop over all block rows */ for (i = 0; i < h_blocks + (h_part ? 1 : 0); i++) { - int wp = i * s->block_width; // vert position in frame - int ws = (i < h_blocks) ? s->block_width : h_part; // size of block + int x_pos = i * s->block_width; // horizontal position in frame + int cur_blk_width = (i < h_blocks) ? s->block_width : h_part; + int has_diff = 0; /* get the size of the compressed zlib chunk */ int size = get_bits(&gb, 16); + + s->color_depth = 0; + s->zlibprime_curr = 0; + s->zlibprime_prev = 0; + s->diff_start = 0; + s->diff_height = cur_blk_height; + if (8 * size > get_bits_left(&gb)) { avctx->release_buffer(avctx, &s->frame); s->frame.data[0] = NULL; - return -1; + return AVERROR_INVALIDDATA; } - if (size == 0) { - /* no change, don't do anything */ - } else { - /* decompress block */ - int ret = inflateReset(&(s->zstream)); - if (ret != Z_OK) { - av_log(avctx, AV_LOG_ERROR, "error in decompression (reset) of block %dx%d\n", i, j); - /* return -1; */ + if (s->ver == 2 && size) { + skip_bits(&gb, 3); + s->color_depth = get_bits(&gb, 2); + has_diff = get_bits1(&gb); + s->zlibprime_curr = get_bits1(&gb); + s->zlibprime_prev = get_bits1(&gb); + + if (s->color_depth != 0 && s->color_depth != 2) { + av_log(avctx, AV_LOG_ERROR, + "%dx%d invalid color depth %d\n", i, j, s->color_depth); + return AVERROR_INVALIDDATA; } - s->zstream.next_in = buf + (get_bits_count(&gb) / 8); - s->zstream.avail_in = size; - s->zstream.next_out = s->tmpblock; - s->zstream.avail_out = s->block_size * 3; - ret = inflate(&(s->zstream), Z_FINISH); - if (ret == Z_DATA_ERROR) { - av_log(avctx, AV_LOG_ERROR, "Zlib resync occurred\n"); - inflateSync(&(s->zstream)); - ret = inflate(&(s->zstream), Z_FINISH); + + if (has_diff) { + s->diff_start = get_bits(&gb, 8); + s->diff_height = get_bits(&gb, 8); + av_log(avctx, AV_LOG_DEBUG, + "%dx%d diff start %d height %d\n", + i, j, s->diff_start, s->diff_height); + size -= 2; } - if ((ret != Z_OK) && (ret != Z_STREAM_END)) { - av_log(avctx, AV_LOG_ERROR, "error in decompression of block %dx%d: %d\n", i, j, ret); - /* return -1; */ + if (s->zlibprime_prev) + av_log(avctx, AV_LOG_DEBUG, "%dx%d zlibprime_prev\n", i, j); + + if (s->zlibprime_curr) { + int col = get_bits(&gb, 8); + int row = get_bits(&gb, 8); + av_log(avctx, AV_LOG_DEBUG, "%dx%d zlibprime_curr %dx%d\n", i, j, col, row); + size -= 2; + av_log_missing_feature(avctx, "zlibprime_curr", 1); + return AVERROR_PATCHWELCOME; } - copy_region(s->tmpblock, s->frame.data[0], s->image_height - (hp + hs + 1), - wp, hs, ws, s->frame.linesize[0]); - skip_bits_long(&gb, 8 * size); /* skip the consumed bits */ + size--; // account for flags byte + } + + if (has_diff) { + int k; + int off = (s->image_height - y_pos - 1) * s->frame.linesize[0]; + + for (k = 0; k < cur_blk_height; k++) + memcpy(s->frame.data[0] + off - k*s->frame.linesize[0] + x_pos*3, + s->keyframe + off - k*s->frame.linesize[0] + x_pos*3, + cur_blk_width * 3); + } + + /* skip unchanged blocks, which have size 0 */ + if (size) { + if (flashsv_decode_block(avctx, avpkt, &gb, size, + cur_blk_width, cur_blk_height, + x_pos, y_pos, + i + j * (h_blocks + !!h_part))) + av_log(avctx, AV_LOG_ERROR, + "error in decompression of block %dx%d\n", i, j); + } + } + } + if (s->is_keyframe && s->ver == 2) { + if (!s->keyframe) { + s->keyframe = av_malloc(s->frame.linesize[0] * avctx->height); + if (!s->keyframe) { + av_log(avctx, AV_LOG_ERROR, "Cannot allocate image data\n"); + return AVERROR(ENOMEM); } } + memcpy(s->keyframe, s->frame.data[0], s->frame.linesize[0] * avctx->height); } *data_size = sizeof(AVFrame); @@ -229,7 +439,7 @@ static av_cold int flashsv_decode_end(AVCodecContext *avctx) { FlashSVContext *s = avctx->priv_data; - inflateEnd(&(s->zstream)); + inflateEnd(&s->zstream); /* release the frame if needed */ if (s->frame.data[0]) avctx->release_buffer(avctx, &s->frame); @@ -241,6 +451,7 @@ } +#if CONFIG_FLASHSV_DECODER AVCodec ff_flashsv_decoder = { .name = "flashsv", .type = AVMEDIA_TYPE_VIDEO, @@ -253,3 +464,67 @@ .pix_fmts = (const enum PixelFormat[]){PIX_FMT_BGR24, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v1"), }; +#endif /* CONFIG_FLASHSV_DECODER */ + +#if CONFIG_FLASHSV2_DECODER +static const uint32_t ff_flashsv2_default_palette[128] = { + 0x000000, 0x333333, 0x666666, 0x999999, 0xCCCCCC, 0xFFFFFF, + 0x330000, 0x660000, 0x990000, 0xCC0000, 0xFF0000, 0x003300, + 0x006600, 0x009900, 0x00CC00, 0x00FF00, 0x000033, 0x000066, + 0x000099, 0x0000CC, 0x0000FF, 0x333300, 0x666600, 0x999900, + 0xCCCC00, 0xFFFF00, 0x003333, 0x006666, 0x009999, 0x00CCCC, + 0x00FFFF, 0x330033, 0x660066, 0x990099, 0xCC00CC, 0xFF00FF, + 0xFFFF33, 0xFFFF66, 0xFFFF99, 0xFFFFCC, 0xFF33FF, 0xFF66FF, + 0xFF99FF, 0xFFCCFF, 0x33FFFF, 0x66FFFF, 0x99FFFF, 0xCCFFFF, + 0xCCCC33, 0xCCCC66, 0xCCCC99, 0xCCCCFF, 0xCC33CC, 0xCC66CC, + 0xCC99CC, 0xCCFFCC, 0x33CCCC, 0x66CCCC, 0x99CCCC, 0xFFCCCC, + 0x999933, 0x999966, 0x9999CC, 0x9999FF, 0x993399, 0x996699, + 0x99CC99, 0x99FF99, 0x339999, 0x669999, 0xCC9999, 0xFF9999, + 0x666633, 0x666699, 0x6666CC, 0x6666FF, 0x663366, 0x669966, + 0x66CC66, 0x66FF66, 0x336666, 0x996666, 0xCC6666, 0xFF6666, + 0x333366, 0x333399, 0x3333CC, 0x3333FF, 0x336633, 0x339933, + 0x33CC33, 0x33FF33, 0x663333, 0x993333, 0xCC3333, 0xFF3333, + 0x003366, 0x336600, 0x660033, 0x006633, 0x330066, 0x663300, + 0x336699, 0x669933, 0x993366, 0x339966, 0x663399, 0x996633, + 0x6699CC, 0x99CC66, 0xCC6699, 0x66CC99, 0x9966CC, 0xCC9966, + 0x99CCFF, 0xCCFF99, 0xFF99CC, 0x99FFCC, 0xCC99FF, 0xFFCC99, + 0x111111, 0x222222, 0x444444, 0x555555, 0xAAAAAA, 0xBBBBBB, + 0xDDDDDD, 0xEEEEEE +}; + +static av_cold int flashsv2_decode_init(AVCodecContext *avctx) +{ + FlashSVContext *s = avctx->priv_data; + flashsv_decode_init(avctx); + s->pal = ff_flashsv2_default_palette; + s->ver = 2; + + return 0; +} + +static av_cold int flashsv2_decode_end(AVCodecContext *avctx) +{ + FlashSVContext *s = avctx->priv_data; + + av_freep(&s->keyframedata); + av_freep(&s->blocks); + av_freep(&s->keyframe); + av_freep(&s->deflate_block); + flashsv_decode_end(avctx); + + return 0; +} + +AVCodec ff_flashsv2_decoder = { + .name = "flashsv2", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_FLASHSV2, + .priv_data_size = sizeof(FlashSVContext), + .init = flashsv2_decode_init, + .close = flashsv2_decode_end, + .decode = flashsv_decode_frame, + .capabilities = CODEC_CAP_DR1, + .pix_fmts = (const enum PixelFormat[]){PIX_FMT_BGR24, PIX_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v2"), +}; +#endif /* CONFIG_FLASHSV2_DECODER */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flashsvenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flashsvenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flashsvenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flashsvenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,31 +27,21 @@ * Flash Screen Video encoder * @author Alex Beregszaszi * @author Benjamin Larsson + * + * A description of the bitstream format for Flash Screen Video version 1/2 + * is part of the SWF File Format Specification (version 10), which can be + * downloaded from http://www.adobe.com/devnet/swf.html. */ -/* Bitstream description - * The picture is divided into blocks that are zlib-compressed. - * - * The decoder is fed complete frames, the frameheader contains: - * 4bits of block width - * 12bits of frame width - * 4bits of block height - * 12bits of frame height - * - * Directly after the header are the compressed blocks. The blocks - * have their compressed size represented with 16bits in the beginig. - * If the size = 0 then the block is unchanged from the previous frame. - * All blocks are decompressed until the buffer is consumed. - * - * Encoding ideas, a basic encoder would just use a fixed block size. - * Block sizes can be multipels of 16, from 16 to 256. The blocks don't +/* + * Encoding ideas: A basic encoder would just use a fixed block size. + * Block sizes can be multiples of 16, from 16 to 256. The blocks don't * have to be quadratic. A brute force search with a set of different * block sizes should give a better result than to just use a fixed size. - */ - -/* TODO: - * Don't reencode the frame in brute force mode if the frame is a dupe. Speed up. - * Make the difference check faster. + * + * TODO: + * Don't reencode the frame in brute force mode if the frame is a dupe. + * Speed up. Make the difference check faster. */ #include @@ -85,8 +75,8 @@ int diff = 0; for (i = dx + h; i > dx; i--) { - nsptr = sptr + (i * stride) + dy * 3; - npfptr = pfptr + (i * stride) + dy * 3; + nsptr = sptr + i * stride + dy * 3; + npfptr = pfptr + i * stride + dy * 3; for (j = 0; j < w * 3; j++) { diff |= npfptr[j] ^ nsptr[j]; dptr[j] = nsptr[j]; @@ -104,13 +94,14 @@ s->avctx = avctx; - if ((avctx->width > 4095) || (avctx->height > 4095)) { - av_log(avctx, AV_LOG_ERROR, "Input dimensions too large, input must be max 4096x4096 !\n"); + if (avctx->width > 4095 || avctx->height > 4095) { + av_log(avctx, AV_LOG_ERROR, + "Input dimensions too large, input must be max 4096x4096 !\n"); return AVERROR_INVALIDDATA; } // Needed if zlib unused or init aborted before deflateInit - memset(&(s->zstream), 0, sizeof(z_stream)); + memset(&s->zstream, 0, sizeof(z_stream)); s->last_key_frame = 0; @@ -141,9 +132,9 @@ init_put_bits(&pb, buf, buf_size * 8); - put_bits(&pb, 4, (block_width / 16) - 1); + put_bits(&pb, 4, block_width / 16 - 1); put_bits(&pb, 12, s->image_width); - put_bits(&pb, 4, (block_height / 16) - 1); + put_bits(&pb, 4, block_height / 16 - 1); put_bits(&pb, 12, s->image_height); flush_put_bits(&pb); buf_pos = 4; @@ -156,37 +147,36 @@ /* loop over all block columns */ for (j = 0; j < v_blocks + (v_part ? 1 : 0); j++) { - int hp = j * block_height; // horiz position in frame - int hs = (j < v_blocks) ? block_height : v_part; // size of block + int y_pos = j * block_height; // vertical position in frame + int cur_blk_height = (j < v_blocks) ? block_height : v_part; /* loop over all block rows */ for (i = 0; i < h_blocks + (h_part ? 1 : 0); i++) { - int wp = i * block_width; // vert position in frame - int ws = (i < h_blocks) ? block_width : h_part; // size of block + int x_pos = i * block_width; // horizontal position in frame + int cur_blk_width = (i < h_blocks) ? block_width : h_part; int ret = Z_OK; - uint8_t *ptr; - - ptr = buf + buf_pos; + uint8_t *ptr = buf + buf_pos; /* copy the block to the temp buffer before compression * (if it differs from the previous frame's block) */ res = copy_region_enc(p->data[0], s->tmpblock, - s->image_height - (hp + hs + 1), - wp, hs, ws, p->linesize[0], previous_frame); + s->image_height - (y_pos + cur_blk_height + 1), + x_pos, cur_blk_height, cur_blk_width, + p->linesize[0], previous_frame); if (res || *I_frame) { - unsigned long zsize; - zsize = 3 * block_width * block_height; - ret = compress2(ptr + 2, &zsize, s->tmpblock, 3 * ws * hs, 9); - + unsigned long zsize = 3 * block_width * block_height; + ret = compress2(ptr + 2, &zsize, s->tmpblock, + 3 * cur_blk_width * cur_blk_height, 9); - //ret = deflateReset(&(s->zstream)); + //ret = deflateReset(&s->zstream); if (ret != Z_OK) - av_log(s->avctx, AV_LOG_ERROR, "error while compressing block %dx%d\n", i, j); + av_log(s->avctx, AV_LOG_ERROR, + "error while compressing block %dx%d\n", i, j); - bytestream_put_be16(&ptr, (unsigned int) zsize); + bytestream_put_be16(&ptr, zsize); buf_pos += zsize + 2; - //av_log(avctx, AV_LOG_ERROR, "buf_pos = %d\n", buf_pos); + av_dlog(s->avctx, "buf_pos = %d\n", buf_pos); } else { pred_blocks++; bytestream_put_be16(&ptr, 0); @@ -213,7 +203,7 @@ uint8_t *pfptr; int res; int I_frame = 0; - int opt_w, opt_h; + int opt_w = 4, opt_h = 4; *p = *pict; @@ -228,42 +218,40 @@ } if (p->linesize[0] < 0) - pfptr = s->previous_frame - ((s->image_height - 1) * p->linesize[0]); + pfptr = s->previous_frame - (s->image_height - 1) * p->linesize[0]; else pfptr = s->previous_frame; /* Check the placement of keyframes */ - if (avctx->gop_size > 0) { - if (avctx->frame_number >= s->last_key_frame + avctx->gop_size) { - I_frame = 1; - } + if (avctx->gop_size > 0 && + avctx->frame_number >= s->last_key_frame + avctx->gop_size) { + I_frame = 1; } - opt_w = 4; - opt_h = 4; - - if (buf_size < s->image_width*s->image_height*3) { + if (buf_size < s->image_width * s->image_height * 3) { //Conservative upper bound check for compressed data av_log(avctx, AV_LOG_ERROR, "buf_size %d < %d\n", buf_size, s->image_width * s->image_height * 3); return -1; } - res = encode_bitstream(s, p, buf, buf_size, opt_w * 16, opt_h * 16, pfptr, &I_frame); + res = encode_bitstream(s, p, buf, buf_size, opt_w * 16, opt_h * 16, + pfptr, &I_frame); //save the current frame if (p->linesize[0] > 0) memcpy(s->previous_frame, p->data[0], s->image_height * p->linesize[0]); else - memcpy(s->previous_frame, p->data[0] + p->linesize[0] * (s->image_height - 1), + memcpy(s->previous_frame, + p->data[0] + p->linesize[0] * (s->image_height - 1), s->image_height * FFABS(p->linesize[0])); //mark the frame type so the muxer can mux it correctly if (I_frame) { - p->pict_type = AV_PICTURE_TYPE_I; - p->key_frame = 1; + p->pict_type = AV_PICTURE_TYPE_I; + p->key_frame = 1; s->last_key_frame = avctx->frame_number; - av_log(avctx, AV_LOG_DEBUG, "Inserting key frame at frame %d\n", avctx->frame_number); + av_dlog(avctx, "Inserting keyframe at frame %d\n", avctx->frame_number); } else { p->pict_type = AV_PICTURE_TYPE_P; p->key_frame = 0; @@ -278,7 +266,7 @@ { FlashSVContext *s = avctx->priv_data; - deflateEnd(&(s->zstream)); + deflateEnd(&s->zstream); av_free(s->encbuffer); av_free(s->previous_frame); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flicvideo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flicvideo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flicvideo.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flicvideo.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,6 +41,8 @@ #include "libavutil/intreadwrite.h" #include "avcodec.h" +#include "bytestream.h" +#include "mathops.h" #define FLI_256_COLOR 4 #define FLI_DELTA 7 @@ -81,6 +83,12 @@ unsigned char *fli_header = (unsigned char *)avctx->extradata; int depth; + if (avctx->extradata_size != 12 && + avctx->extradata_size != 128) { + av_log(avctx, AV_LOG_ERROR, "Expected extradata of 12 or 128 bytes\n"); + return AVERROR_INVALIDDATA; + } + s->avctx = avctx; s->fli_type = AV_RL16(&fli_header[4]); /* Might be overridden if a Magic Carpet FLC */ @@ -90,9 +98,6 @@ /* special case for magic carpet FLIs */ s->fli_type = FLC_MAGIC_CARPET_SYNTHETIC_TYPE_CODE; depth = 8; - } else if (s->avctx->extradata_size != 128) { - av_log(avctx, AV_LOG_ERROR, "Expected extradata of 12 or 128 bytes\n"); - return -1; } else { depth = AV_RL16(&fli_header[12]); } @@ -112,7 +117,6 @@ case 24 : avctx->pix_fmt = PIX_FMT_BGR24; /* Supposedly BGR, but havent any files to test with */ av_log(avctx, AV_LOG_ERROR, "24Bpp FLC/FLX is unsupported due to no test files.\n"); return -1; - break; default : av_log(avctx, AV_LOG_ERROR, "Unknown FLC/FLX depth of %d Bpp is unsupported.\n",depth); return -1; @@ -130,7 +134,7 @@ { FlicDecodeContext *s = avctx->priv_data; - int stream_ptr = 0; + GetByteContext g2; int stream_ptr_after_color_chunk; int pixel_ptr; int palette_ptr; @@ -161,6 +165,8 @@ unsigned char *pixels; unsigned int pixel_limit; + bytestream2_init(&g2, buf, buf_size); + s->frame.reference = 1; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame) < 0) { @@ -170,25 +176,22 @@ pixels = s->frame.data[0]; pixel_limit = s->avctx->height * s->frame.linesize[0]; - - frame_size = AV_RL32(&buf[stream_ptr]); - stream_ptr += 6; /* skip the magic number */ - num_chunks = AV_RL16(&buf[stream_ptr]); - stream_ptr += 10; /* skip padding */ + frame_size = bytestream2_get_le32(&g2); + bytestream2_skip(&g2, 2); /* skip the magic number */ + num_chunks = bytestream2_get_le16(&g2); + bytestream2_skip(&g2, 8); /* skip padding */ frame_size -= 16; /* iterate through the chunks */ while ((frame_size > 0) && (num_chunks > 0)) { - chunk_size = AV_RL32(&buf[stream_ptr]); - stream_ptr += 4; - chunk_type = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + chunk_size = bytestream2_get_le32(&g2); + chunk_type = bytestream2_get_le16(&g2); switch (chunk_type) { case FLI_256_COLOR: case FLI_COLOR: - stream_ptr_after_color_chunk = stream_ptr + chunk_size - 6; + stream_ptr_after_color_chunk = bytestream2_tell(&g2) + chunk_size - 6; /* check special case: If this file is from the Magic Carpet * game and uses 6-bit colors even though it reports 256-color @@ -199,15 +202,14 @@ else color_shift = 2; /* set up the palette */ - color_packets = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + color_packets = bytestream2_get_le16(&g2); palette_ptr = 0; for (i = 0; i < color_packets; i++) { /* first byte is how many colors to skip */ - palette_ptr += buf[stream_ptr++]; + palette_ptr += bytestream2_get_byte(&g2); /* next byte indicates how many entries to change */ - color_changes = buf[stream_ptr++]; + color_changes = bytestream2_get_byte(&g2); /* if there are 0 color changes, there are actually 256 */ if (color_changes == 0) @@ -220,9 +222,9 @@ if ((unsigned)palette_ptr >= 256) palette_ptr = 0; - r = buf[stream_ptr++] << color_shift; - g = buf[stream_ptr++] << color_shift; - b = buf[stream_ptr++] << color_shift; + r = bytestream2_get_byte(&g2) << color_shift; + g = bytestream2_get_byte(&g2) << color_shift; + b = bytestream2_get_byte(&g2) << color_shift; entry = (r << 16) | (g << 8) | b; if (s->palette[palette_ptr] != entry) s->new_palette = 1; @@ -231,20 +233,19 @@ } /* color chunks sometimes have weird 16-bit alignment issues; - * therefore, take the hardline approach and set the stream_ptr + * therefore, take the hardline approach and skip * to the value calculated w.r.t. the size specified by the color * chunk header */ - stream_ptr = stream_ptr_after_color_chunk; + if (stream_ptr_after_color_chunk - bytestream2_tell(&g2) > 0) + bytestream2_skip(&g2, stream_ptr_after_color_chunk - bytestream2_tell(&g2)); break; case FLI_DELTA: y_ptr = 0; - compressed_lines = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + compressed_lines = bytestream2_get_le16(&g2); while (compressed_lines > 0) { - line_packets = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + line_packets = bytestream2_get_le16(&g2); if ((line_packets & 0xC000) == 0xC000) { // line skip opcode line_packets = -line_packets; @@ -263,14 +264,14 @@ pixel_countdown = s->avctx->width; for (i = 0; i < line_packets; i++) { /* account for the skip bytes */ - pixel_skip = buf[stream_ptr++]; + pixel_skip = bytestream2_get_byte(&g2); pixel_ptr += pixel_skip; pixel_countdown -= pixel_skip; - byte_run = (signed char)(buf[stream_ptr++]); + byte_run = sign_extend(bytestream2_get_byte(&g2), 8); if (byte_run < 0) { byte_run = -byte_run; - palette_idx1 = buf[stream_ptr++]; - palette_idx2 = buf[stream_ptr++]; + palette_idx1 = bytestream2_get_byte(&g2); + palette_idx2 = bytestream2_get_byte(&g2); CHECK_PIXEL_PTR(byte_run * 2); for (j = 0; j < byte_run; j++, pixel_countdown -= 2) { pixels[pixel_ptr++] = palette_idx1; @@ -279,8 +280,7 @@ } else { CHECK_PIXEL_PTR(byte_run * 2); for (j = 0; j < byte_run * 2; j++, pixel_countdown--) { - palette_idx1 = buf[stream_ptr++]; - pixels[pixel_ptr++] = palette_idx1; + pixels[pixel_ptr++] = bytestream2_get_byte(&g2); } } } @@ -292,34 +292,31 @@ case FLI_LC: /* line compressed */ - starting_line = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + starting_line = bytestream2_get_le16(&g2); y_ptr = 0; y_ptr += starting_line * s->frame.linesize[0]; - compressed_lines = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + compressed_lines = bytestream2_get_le16(&g2); while (compressed_lines > 0) { pixel_ptr = y_ptr; CHECK_PIXEL_PTR(0); pixel_countdown = s->avctx->width; - line_packets = buf[stream_ptr++]; + line_packets = bytestream2_get_byte(&g2); if (line_packets > 0) { for (i = 0; i < line_packets; i++) { /* account for the skip bytes */ - pixel_skip = buf[stream_ptr++]; + pixel_skip = bytestream2_get_byte(&g2); pixel_ptr += pixel_skip; pixel_countdown -= pixel_skip; - byte_run = (signed char)(buf[stream_ptr++]); + byte_run = sign_extend(bytestream2_get_byte(&g2),8); if (byte_run > 0) { CHECK_PIXEL_PTR(byte_run); for (j = 0; j < byte_run; j++, pixel_countdown--) { - palette_idx1 = buf[stream_ptr++]; - pixels[pixel_ptr++] = palette_idx1; + pixels[pixel_ptr++] = bytestream2_get_byte(&g2); } } else if (byte_run < 0) { byte_run = -byte_run; - palette_idx1 = buf[stream_ptr++]; + palette_idx1 = bytestream2_get_byte(&g2); CHECK_PIXEL_PTR(byte_run); for (j = 0; j < byte_run; j++, pixel_countdown--) { pixels[pixel_ptr++] = palette_idx1; @@ -347,12 +344,12 @@ pixel_ptr = y_ptr; /* disregard the line packets; instead, iterate through all * pixels on a row */ - stream_ptr++; + bytestream2_skip(&g2, 1); pixel_countdown = s->avctx->width; while (pixel_countdown > 0) { - byte_run = (signed char)(buf[stream_ptr++]); + byte_run = sign_extend(bytestream2_get_byte(&g2), 8); if (byte_run > 0) { - palette_idx1 = buf[stream_ptr++]; + palette_idx1 = bytestream2_get_byte(&g2); CHECK_PIXEL_PTR(byte_run); for (j = 0; j < byte_run; j++) { pixels[pixel_ptr++] = palette_idx1; @@ -365,8 +362,7 @@ byte_run = -byte_run; CHECK_PIXEL_PTR(byte_run); for (j = 0; j < byte_run; j++) { - palette_idx1 = buf[stream_ptr++]; - pixels[pixel_ptr++] = palette_idx1; + pixels[pixel_ptr++] = bytestream2_get_byte(&g2); pixel_countdown--; if (pixel_countdown < 0) av_log(avctx, AV_LOG_ERROR, "pixel_countdown < 0 (%d) at line %d\n", @@ -384,20 +380,19 @@ if (chunk_size - 6 > s->avctx->width * s->avctx->height) { av_log(avctx, AV_LOG_ERROR, "In chunk FLI_COPY : source data (%d bytes) " \ "bigger than image, skipping chunk\n", chunk_size - 6); - stream_ptr += chunk_size - 6; + bytestream2_skip(&g2, chunk_size - 6); } else { for (y_ptr = 0; y_ptr < s->frame.linesize[0] * s->avctx->height; y_ptr += s->frame.linesize[0]) { - memcpy(&pixels[y_ptr], &buf[stream_ptr], - s->avctx->width); - stream_ptr += s->avctx->width; + bytestream2_get_buffer(&g2, &pixels[y_ptr], + s->avctx->width); } } break; case FLI_MINI: /* some sort of a thumbnail? disregard this chunk... */ - stream_ptr += chunk_size - 6; + bytestream2_skip(&g2, chunk_size - 6); break; default: @@ -411,9 +406,11 @@ /* by the end of the chunk, the stream ptr should equal the frame * size (minus 1, possibly); if it doesn't, issue a warning */ - if ((stream_ptr != buf_size) && (stream_ptr != buf_size - 1)) + if ((bytestream2_get_bytes_left(&g2) != 0) && + (bytestream2_get_bytes_left(&g2) != 1)) av_log(avctx, AV_LOG_ERROR, "Processed FLI chunk where chunk size = %d " \ - "and final chunk ptr = %d\n", buf_size, stream_ptr); + "and final chunk ptr = %d\n", buf_size, + buf_size - bytestream2_get_bytes_left(&g2)); /* make the palette available on the way out */ memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE); @@ -436,7 +433,7 @@ /* Format is the pixel format, the packets are processed the same. */ FlicDecodeContext *s = avctx->priv_data; - int stream_ptr = 0; + GetByteContext g2; int pixel_ptr; unsigned char palette_idx1; @@ -459,6 +456,8 @@ int pixel; unsigned int pixel_limit; + bytestream2_init(&g2, buf, buf_size); + s->frame.reference = 1; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if (avctx->reget_buffer(avctx, &s->frame) < 0) { @@ -469,19 +468,17 @@ pixels = s->frame.data[0]; pixel_limit = s->avctx->height * s->frame.linesize[0]; - frame_size = AV_RL32(&buf[stream_ptr]); - stream_ptr += 6; /* skip the magic number */ - num_chunks = AV_RL16(&buf[stream_ptr]); - stream_ptr += 10; /* skip padding */ + frame_size = bytestream2_get_le32(&g2); + bytestream2_skip(&g2, 2); /* skip the magic number */ + num_chunks = bytestream2_get_le16(&g2); + bytestream2_skip(&g2, 8); /* skip padding */ frame_size -= 16; /* iterate through the chunks */ while ((frame_size > 0) && (num_chunks > 0)) { - chunk_size = AV_RL32(&buf[stream_ptr]); - stream_ptr += 4; - chunk_type = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + chunk_size = bytestream2_get_le32(&g2); + chunk_type = bytestream2_get_le16(&g2); switch (chunk_type) { case FLI_256_COLOR: @@ -490,17 +487,15 @@ * include one of these chunks in their first frame. * Why I do not know, it seems rather extraneous. */ /* av_log(avctx, AV_LOG_ERROR, "Unexpected Palette chunk %d in non-paletised FLC\n",chunk_type);*/ - stream_ptr = stream_ptr + chunk_size - 6; + bytestream2_skip(&g2, chunk_size - 6); break; case FLI_DELTA: case FLI_DTA_LC: y_ptr = 0; - compressed_lines = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + compressed_lines = bytestream2_get_le16(&g2); while (compressed_lines > 0) { - line_packets = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + line_packets = bytestream2_get_le16(&g2); if (line_packets < 0) { line_packets = -line_packets; y_ptr += line_packets * s->frame.linesize[0]; @@ -511,14 +506,13 @@ pixel_countdown = s->avctx->width; for (i = 0; i < line_packets; i++) { /* account for the skip bytes */ - pixel_skip = buf[stream_ptr++]; + pixel_skip = bytestream2_get_byte(&g2); pixel_ptr += (pixel_skip*2); /* Pixel is 2 bytes wide */ pixel_countdown -= pixel_skip; - byte_run = (signed char)(buf[stream_ptr++]); + byte_run = sign_extend(bytestream2_get_byte(&g2), 8); if (byte_run < 0) { byte_run = -byte_run; - pixel = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + pixel = bytestream2_get_le16(&g2); CHECK_PIXEL_PTR(2 * byte_run); for (j = 0; j < byte_run; j++, pixel_countdown -= 2) { *((signed short*)(&pixels[pixel_ptr])) = pixel; @@ -527,8 +521,7 @@ } else { CHECK_PIXEL_PTR(2 * byte_run); for (j = 0; j < byte_run; j++, pixel_countdown--) { - *((signed short*)(&pixels[pixel_ptr])) = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + *((signed short*)(&pixels[pixel_ptr])) = bytestream2_get_le16(&g2); pixel_ptr += 2; } } @@ -541,7 +534,7 @@ case FLI_LC: av_log(avctx, AV_LOG_ERROR, "Unexpected FLI_LC chunk in non-paletised FLC\n"); - stream_ptr = stream_ptr + chunk_size - 6; + bytestream2_skip(&g2, chunk_size - 6); break; case FLI_BLACK: @@ -556,13 +549,13 @@ pixel_ptr = y_ptr; /* disregard the line packets; instead, iterate through all * pixels on a row */ - stream_ptr++; + bytestream2_skip(&g2, 1); pixel_countdown = (s->avctx->width * 2); while (pixel_countdown > 0) { - byte_run = (signed char)(buf[stream_ptr++]); + byte_run = sign_extend(bytestream2_get_byte(&g2), 8); if (byte_run > 0) { - palette_idx1 = buf[stream_ptr++]; + palette_idx1 = bytestream2_get_byte(&g2); CHECK_PIXEL_PTR(byte_run); for (j = 0; j < byte_run; j++) { pixels[pixel_ptr++] = palette_idx1; @@ -575,7 +568,7 @@ byte_run = -byte_run; CHECK_PIXEL_PTR(byte_run); for (j = 0; j < byte_run; j++) { - palette_idx1 = buf[stream_ptr++]; + palette_idx1 = bytestream2_get_byte(&g2); pixels[pixel_ptr++] = palette_idx1; pixel_countdown--; if (pixel_countdown < 0) @@ -608,14 +601,13 @@ pixel_ptr = y_ptr; /* disregard the line packets; instead, iterate through all * pixels on a row */ - stream_ptr++; + bytestream2_skip(&g2, 1); pixel_countdown = s->avctx->width; /* Width is in pixels, not bytes */ while (pixel_countdown > 0) { - byte_run = (signed char)(buf[stream_ptr++]); + byte_run = sign_extend(bytestream2_get_byte(&g2), 8); if (byte_run > 0) { - pixel = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + pixel = bytestream2_get_le16(&g2); CHECK_PIXEL_PTR(2 * byte_run); for (j = 0; j < byte_run; j++) { *((signed short*)(&pixels[pixel_ptr])) = pixel; @@ -629,8 +621,7 @@ byte_run = -byte_run; CHECK_PIXEL_PTR(2 * byte_run); for (j = 0; j < byte_run; j++) { - *((signed short*)(&pixels[pixel_ptr])) = AV_RL16(&buf[stream_ptr]); - stream_ptr += 2; + *((signed short*)(&pixels[pixel_ptr])) = bytestream2_get_le16(&g2); pixel_ptr += 2; pixel_countdown--; if (pixel_countdown < 0) @@ -650,7 +641,7 @@ if (chunk_size - 6 > (unsigned int)(s->avctx->width * s->avctx->height)*2) { av_log(avctx, AV_LOG_ERROR, "In chunk FLI_COPY : source data (%d bytes) " \ "bigger than image, skipping chunk\n", chunk_size - 6); - stream_ptr += chunk_size - 6; + bytestream2_skip(&g2, chunk_size - 6); } else { for (y_ptr = 0; y_ptr < s->frame.linesize[0] * s->avctx->height; @@ -659,18 +650,17 @@ pixel_countdown = s->avctx->width; pixel_ptr = 0; while (pixel_countdown > 0) { - *((signed short*)(&pixels[y_ptr + pixel_ptr])) = AV_RL16(&buf[stream_ptr+pixel_ptr]); + *((signed short*)(&pixels[y_ptr + pixel_ptr])) = bytestream2_get_le16(&g2); pixel_ptr += 2; pixel_countdown--; } - stream_ptr += s->avctx->width*2; } } break; case FLI_MINI: /* some sort of a thumbnail? disregard this chunk... */ - stream_ptr += chunk_size - 6; + bytestream2_skip(&g2, chunk_size - 6); break; default: @@ -684,9 +674,9 @@ /* by the end of the chunk, the stream ptr should equal the frame * size (minus 1, possibly); if it doesn't, issue a warning */ - if ((stream_ptr != buf_size) && (stream_ptr != buf_size - 1)) + if ((bytestream2_get_bytes_left(&g2) != 0) && (bytestream2_get_bytes_left(&g2) != 1)) av_log(avctx, AV_LOG_ERROR, "Processed FLI chunk where chunk size = %d " \ - "and final chunk ptr = %d\n", buf_size, stream_ptr); + "and final chunk ptr = %d\n", buf_size, bytestream2_tell(&g2)); *data_size=sizeof(AVFrame); @@ -743,18 +733,13 @@ } AVCodec ff_flic_decoder = { - "flic", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_FLIC, - sizeof(FlicDecodeContext), - flic_decode_init, - NULL, - flic_decode_end, - flic_decode_frame, - CODEC_CAP_DR1, - NULL, - NULL, - NULL, - NULL, + .name = "flic", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_FLIC, + .priv_data_size = sizeof(FlicDecodeContext), + .init = flic_decode_init, + .close = flic_decode_end, + .decode = flic_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Autodesk Animator Flic video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flvdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flvdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flvdec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flvdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -119,15 +119,14 @@ } AVCodec ff_flv_decoder = { - "flv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_FLV1, - sizeof(MpegEncContext), - ff_h263_decode_init, - NULL, - ff_h263_decode_end, - ff_h263_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, + .name = "flv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_FLV1, + .priv_data_size = sizeof(MpegEncContext), + .init = ff_h263_decode_init, + .close = ff_h263_decode_end, + .decode = ff_h263_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, .max_lowres= 3, .long_name= NULL_IF_CONFIG_SMALL("Flash Video (FLV) / Sorenson Spark / Sorenson H.263"), .pix_fmts= ff_pixfmt_list_420, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flvenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flvenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/flvenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/flvenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,7 +25,7 @@ { int format; - align_put_bits(&s->pb); + avpriv_align_put_bits(&s->pb); put_bits(&s->pb, 17, 1); put_bits(&s->pb, 5, (s->h263_flv-1)); /* 0: h263 escape codes 1: 11-bit escape codes */ @@ -85,13 +85,13 @@ } AVCodec ff_flv_encoder = { - "flv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_FLV1, - sizeof(MpegEncContext), - MPV_encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "flv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_FLV1, + .priv_data_size = sizeof(MpegEncContext), + .init = MPV_encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("Flash Video (FLV) / Sorenson Spark / Sorenson H.263"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/fmtconvert.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/fmtconvert.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/fmtconvert.h 2011-05-19 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/fmtconvert.h 2012-01-11 00:34:30.000000000 +0000 @@ -70,7 +70,15 @@ long len, int channels); /** - * Convert an array of interleaved float to multiple arrays of float. + * Convert multiple arrays of float to an array of interleaved float. + * + * @param dst destination array of interleaved float. + * constraints: 16-byte aligned + * @param src source array of float arrays, one for each channel. + * constraints: 16-byte aligned + * @param len number of elements to convert. + * constraints: multiple of 8 + * @param channels number of channels */ void (*float_interleave)(float *dst, const float **src, unsigned int len, int channels); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/fraps.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/fraps.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/fraps.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/fraps.c 2012-01-11 00:34:30.000000000 +0000 @@ -111,6 +111,10 @@ */ if(j) dst[i] += dst[i - stride]; else if(Uoff) dst[i] += 0x80; + if (get_bits_left(&gb) < 0) { + free_vlc(&vlc); + return AVERROR_INVALIDDATA; + } } dst += stride; } @@ -356,14 +360,13 @@ AVCodec ff_fraps_decoder = { - "fraps", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_FRAPS, - sizeof(FrapsContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "fraps", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_FRAPS, + .priv_data_size = sizeof(FrapsContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Fraps"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/frwu.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/frwu.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/frwu.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/frwu.c 2012-01-11 00:34:30.000000000 +0000 @@ -110,14 +110,12 @@ } AVCodec ff_frwu_decoder = { - "FRWU", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_FRWU, - 0, - decode_init, - NULL, - decode_close, - decode_frame, - CODEC_CAP_DR1, + .name = "FRWU", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_FRWU, + .init = decode_init, + .close = decode_close, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Forward Uncompressed"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g722.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g722.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g722.c 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g722.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,7 +26,6 @@ /** * @file - * * G.722 ADPCM audio codec * * This G.722 decoder is a bit-exact implementation of the ITU G.722 @@ -37,45 +36,8 @@ * respectively of each byte are ignored. */ -#include "avcodec.h" #include "mathops.h" -#include "get_bits.h" - -#define PREV_SAMPLES_BUF_SIZE 1024 - -#define FREEZE_INTERVAL 128 - -typedef struct { - int16_t prev_samples[PREV_SAMPLES_BUF_SIZE]; ///< memory of past decoded samples - int prev_samples_pos; ///< the number of values in prev_samples - - /** - * The band[0] and band[1] correspond respectively to the lower band and higher band. - */ - struct G722Band { - int16_t s_predictor; ///< predictor output value - int32_t s_zero; ///< previous output signal from zero predictor - int8_t part_reconst_mem[2]; ///< signs of previous partially reconstructed signals - int16_t prev_qtzd_reconst; ///< previous quantized reconstructed signal (internal value, using low_inv_quant4) - int16_t pole_mem[2]; ///< second-order pole section coefficient buffer - int32_t diff_mem[6]; ///< quantizer difference signal memory - int16_t zero_mem[6]; ///< Seventh-order zero section coefficient buffer - int16_t log_factor; ///< delayed 2-logarithmic quantizer factor - int16_t scale_factor; ///< delayed quantizer scale factor - } band[2]; - - struct TrellisNode { - struct G722Band state; - uint32_t ssd; - int path; - } *node_buf[2], **nodep_buf[2]; - - struct TrellisPath { - int value; - int prev; - } *paths[2]; -} G722Context; - +#include "g722.h" static const int8_t sign_lookup[2] = { -1, 1 }; @@ -86,7 +48,7 @@ 3444, 3520, 3597, 3676, 3756, 3838, 3922, 4008 }; static const int16_t high_log_factor_step[2] = { 798, -214 }; -static const int16_t high_inv_quant[4] = { -926, -202, 926, 202 }; +const int16_t ff_g722_high_inv_quant[4] = { -926, -202, 926, 202 }; /** * low_log_factor_step[index] == wl[rl42[index]] */ @@ -94,11 +56,11 @@ -60, 3042, 1198, 538, 334, 172, 58, -30, 3042, 1198, 538, 334, 172, 58, -30, -60 }; -static const int16_t low_inv_quant4[16] = { +const int16_t ff_g722_low_inv_quant4[16] = { 0, -2557, -1612, -1121, -786, -530, -323, -150, 2557, 1612, 1121, 786, 530, 323, 150, 0 }; -static const int16_t low_inv_quant6[64] = { +const int16_t ff_g722_low_inv_quant6[64] = { -17, -17, -17, -17, -3101, -2738, -2376, -2088, -1873, -1689, -1535, -1399, -1279, -1170, -1072, -982, -899, -822, -750, -682, -618, -558, -501, -447, @@ -174,10 +136,10 @@ return shift < 0 ? wd1 >> -shift : wd1 << shift; } -static void update_low_predictor(struct G722Band *band, const int ilow) +void ff_g722_update_low_predictor(struct G722Band *band, const int ilow) { do_adaptive_prediction(band, - band->scale_factor * low_inv_quant4[ilow] >> 10); + band->scale_factor * ff_g722_low_inv_quant4[ilow] >> 10); // quantizer adaptation band->log_factor = av_clip((band->log_factor * 127 >> 7) + @@ -185,7 +147,7 @@ band->scale_factor = linear_scale_factor(band->log_factor - (8 << 11)); } -static void update_high_predictor(struct G722Band *band, const int dhigh, +void ff_g722_update_high_predictor(struct G722Band *band, const int dhigh, const int ihigh) { do_adaptive_prediction(band, dhigh); @@ -196,7 +158,7 @@ band->scale_factor = linear_scale_factor(band->log_factor - (10 << 11)); } -static void apply_qmf(const int16_t *prev_samples, int *xout1, int *xout2) +void ff_g722_apply_qmf(const int16_t *prev_samples, int *xout1, int *xout2) { int i; @@ -207,377 +169,3 @@ MAC16(*xout1, prev_samples[2*i+1], qmf_coeffs[11-i]); } } - -static av_cold int g722_init(AVCodecContext * avctx) -{ - G722Context *c = avctx->priv_data; - - if (avctx->channels != 1) { - av_log(avctx, AV_LOG_ERROR, "Only mono tracks are allowed.\n"); - return AVERROR_INVALIDDATA; - } - avctx->sample_fmt = AV_SAMPLE_FMT_S16; - - switch (avctx->bits_per_coded_sample) { - case 8: - case 7: - case 6: - break; - default: - av_log(avctx, AV_LOG_WARNING, "Unsupported bits_per_coded_sample [%d], " - "assuming 8\n", - avctx->bits_per_coded_sample); - case 0: - avctx->bits_per_coded_sample = 8; - break; - } - - c->band[0].scale_factor = 8; - c->band[1].scale_factor = 2; - c->prev_samples_pos = 22; - - if (avctx->lowres) - avctx->sample_rate /= 2; - - if (avctx->trellis) { - int frontier = 1 << avctx->trellis; - int max_paths = frontier * FREEZE_INTERVAL; - int i; - for (i = 0; i < 2; i++) { - c->paths[i] = av_mallocz(max_paths * sizeof(**c->paths)); - c->node_buf[i] = av_mallocz(2 * frontier * sizeof(**c->node_buf)); - c->nodep_buf[i] = av_mallocz(2 * frontier * sizeof(**c->nodep_buf)); - } - } - - return 0; -} - -static av_cold int g722_close(AVCodecContext *avctx) -{ - G722Context *c = avctx->priv_data; - int i; - for (i = 0; i < 2; i++) { - av_freep(&c->paths[i]); - av_freep(&c->node_buf[i]); - av_freep(&c->nodep_buf[i]); - } - return 0; -} - -#if CONFIG_ADPCM_G722_DECODER -static const int16_t low_inv_quant5[32] = { - -35, -35, -2919, -2195, -1765, -1458, -1219, -1023, - -858, -714, -587, -473, -370, -276, -190, -110, - 2919, 2195, 1765, 1458, 1219, 1023, 858, 714, - 587, 473, 370, 276, 190, 110, 35, -35 -}; - -static const int16_t *low_inv_quants[3] = { low_inv_quant6, low_inv_quant5, - low_inv_quant4 }; - -static int g722_decode_frame(AVCodecContext *avctx, void *data, - int *data_size, AVPacket *avpkt) -{ - G722Context *c = avctx->priv_data; - int16_t *out_buf = data; - int j, out_len = 0; - const int skip = 8 - avctx->bits_per_coded_sample; - const int16_t *quantizer_table = low_inv_quants[skip]; - GetBitContext gb; - - init_get_bits(&gb, avpkt->data, avpkt->size * 8); - - for (j = 0; j < avpkt->size; j++) { - int ilow, ihigh, rlow; - - ihigh = get_bits(&gb, 2); - ilow = get_bits(&gb, 6 - skip); - skip_bits(&gb, skip); - - rlow = av_clip((c->band[0].scale_factor * quantizer_table[ilow] >> 10) - + c->band[0].s_predictor, -16384, 16383); - - update_low_predictor(&c->band[0], ilow >> (2 - skip)); - - if (!avctx->lowres) { - const int dhigh = c->band[1].scale_factor * - high_inv_quant[ihigh] >> 10; - const int rhigh = av_clip(dhigh + c->band[1].s_predictor, - -16384, 16383); - int xout1, xout2; - - update_high_predictor(&c->band[1], dhigh, ihigh); - - c->prev_samples[c->prev_samples_pos++] = rlow + rhigh; - c->prev_samples[c->prev_samples_pos++] = rlow - rhigh; - apply_qmf(c->prev_samples + c->prev_samples_pos - 24, - &xout1, &xout2); - out_buf[out_len++] = av_clip_int16(xout1 >> 12); - out_buf[out_len++] = av_clip_int16(xout2 >> 12); - if (c->prev_samples_pos >= PREV_SAMPLES_BUF_SIZE) { - memmove(c->prev_samples, - c->prev_samples + c->prev_samples_pos - 22, - 22 * sizeof(c->prev_samples[0])); - c->prev_samples_pos = 22; - } - } else - out_buf[out_len++] = rlow; - } - *data_size = out_len << 1; - return avpkt->size; -} - -AVCodec ff_adpcm_g722_decoder = { - .name = "g722", - .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ADPCM_G722, - .priv_data_size = sizeof(G722Context), - .init = g722_init, - .decode = g722_decode_frame, - .long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"), - .max_lowres = 1, -}; -#endif - -#if CONFIG_ADPCM_G722_ENCODER -static const int16_t low_quant[33] = { - 35, 72, 110, 150, 190, 233, 276, 323, - 370, 422, 473, 530, 587, 650, 714, 786, - 858, 940, 1023, 1121, 1219, 1339, 1458, 1612, - 1765, 1980, 2195, 2557, 2919 -}; - -static inline void filter_samples(G722Context *c, const int16_t *samples, - int *xlow, int *xhigh) -{ - int xout1, xout2; - c->prev_samples[c->prev_samples_pos++] = samples[0]; - c->prev_samples[c->prev_samples_pos++] = samples[1]; - apply_qmf(c->prev_samples + c->prev_samples_pos - 24, &xout1, &xout2); - *xlow = xout1 + xout2 >> 13; - *xhigh = xout1 - xout2 >> 13; - if (c->prev_samples_pos >= PREV_SAMPLES_BUF_SIZE) { - memmove(c->prev_samples, - c->prev_samples + c->prev_samples_pos - 22, - 22 * sizeof(c->prev_samples[0])); - c->prev_samples_pos = 22; - } -} - -static inline int encode_high(const struct G722Band *state, int xhigh) -{ - int diff = av_clip_int16(xhigh - state->s_predictor); - int pred = 141 * state->scale_factor >> 8; - /* = diff >= 0 ? (diff < pred) + 2 : diff >= -pred */ - return ((diff ^ (diff >> (sizeof(diff)*8-1))) < pred) + 2*(diff >= 0); -} - -static inline int encode_low(const struct G722Band* state, int xlow) -{ - int diff = av_clip_int16(xlow - state->s_predictor); - /* = diff >= 0 ? diff : -(diff + 1) */ - int limit = diff ^ (diff >> (sizeof(diff)*8-1)); - int i = 0; - limit = limit + 1 << 10; - if (limit > low_quant[8] * state->scale_factor) - i = 9; - while (i < 29 && limit > low_quant[i] * state->scale_factor) - i++; - return (diff < 0 ? (i < 2 ? 63 : 33) : 61) - i; -} - -static int g722_encode_trellis(AVCodecContext *avctx, - uint8_t *dst, int buf_size, void *data) -{ - G722Context *c = avctx->priv_data; - const int16_t *samples = data; - int i, j, k; - int frontier = 1 << avctx->trellis; - struct TrellisNode **nodes[2]; - struct TrellisNode **nodes_next[2]; - int pathn[2] = {0, 0}, froze = -1; - struct TrellisPath *p[2]; - - for (i = 0; i < 2; i++) { - nodes[i] = c->nodep_buf[i]; - nodes_next[i] = c->nodep_buf[i] + frontier; - memset(c->nodep_buf[i], 0, 2 * frontier * sizeof(*c->nodep_buf)); - nodes[i][0] = c->node_buf[i] + frontier; - nodes[i][0]->ssd = 0; - nodes[i][0]->path = 0; - nodes[i][0]->state = c->band[i]; - } - - for (i = 0; i < buf_size >> 1; i++) { - int xlow, xhigh; - struct TrellisNode *next[2]; - int heap_pos[2] = {0, 0}; - - for (j = 0; j < 2; j++) { - next[j] = c->node_buf[j] + frontier*(i & 1); - memset(nodes_next[j], 0, frontier * sizeof(**nodes_next)); - } - - filter_samples(c, &samples[2*i], &xlow, &xhigh); - - for (j = 0; j < frontier && nodes[0][j]; j++) { - /* Only k >> 2 affects the future adaptive state, therefore testing - * small steps that don't change k >> 2 is useless, the orignal - * value from encode_low is better than them. Since we step k - * in steps of 4, make sure range is a multiple of 4, so that - * we don't miss the original value from encode_low. */ - int range = j < frontier/2 ? 4 : 0; - struct TrellisNode *cur_node = nodes[0][j]; - - int ilow = encode_low(&cur_node->state, xlow); - - for (k = ilow - range; k <= ilow + range && k <= 63; k += 4) { - int decoded, dec_diff, pos; - uint32_t ssd; - struct TrellisNode* node; - - if (k < 0) - continue; - - decoded = av_clip((cur_node->state.scale_factor * - low_inv_quant6[k] >> 10) - + cur_node->state.s_predictor, -16384, 16383); - dec_diff = xlow - decoded; - -#define STORE_NODE(index, UPDATE, VALUE)\ - ssd = cur_node->ssd + dec_diff*dec_diff;\ - /* Check for wraparound. Using 64 bit ssd counters would \ - * be simpler, but is slower on x86 32 bit. */\ - if (ssd < cur_node->ssd)\ - continue;\ - if (heap_pos[index] < frontier) {\ - pos = heap_pos[index]++;\ - assert(pathn[index] < FREEZE_INTERVAL * frontier);\ - node = nodes_next[index][pos] = next[index]++;\ - node->path = pathn[index]++;\ - } else {\ - /* Try to replace one of the leaf nodes with the new \ - * one, but not always testing the same leaf position */\ - pos = (frontier>>1) + (heap_pos[index] & ((frontier>>1) - 1));\ - if (ssd >= nodes_next[index][pos]->ssd)\ - continue;\ - heap_pos[index]++;\ - node = nodes_next[index][pos];\ - }\ - node->ssd = ssd;\ - node->state = cur_node->state;\ - UPDATE;\ - c->paths[index][node->path].value = VALUE;\ - c->paths[index][node->path].prev = cur_node->path;\ - /* Sift the newly inserted node up in the heap to restore \ - * the heap property */\ - while (pos > 0) {\ - int parent = (pos - 1) >> 1;\ - if (nodes_next[index][parent]->ssd <= ssd)\ - break;\ - FFSWAP(struct TrellisNode*, nodes_next[index][parent],\ - nodes_next[index][pos]);\ - pos = parent;\ - } - STORE_NODE(0, update_low_predictor(&node->state, k >> 2), k); - } - } - - for (j = 0; j < frontier && nodes[1][j]; j++) { - int ihigh; - struct TrellisNode *cur_node = nodes[1][j]; - - /* We don't try to get any initial guess for ihigh via - * encode_high - since there's only 4 possible values, test - * them all. Testing all of these gives a much, much larger - * gain than testing a larger range around ilow. */ - for (ihigh = 0; ihigh < 4; ihigh++) { - int dhigh, decoded, dec_diff, pos; - uint32_t ssd; - struct TrellisNode* node; - - dhigh = cur_node->state.scale_factor * - high_inv_quant[ihigh] >> 10; - decoded = av_clip(dhigh + cur_node->state.s_predictor, - -16384, 16383); - dec_diff = xhigh - decoded; - - STORE_NODE(1, update_high_predictor(&node->state, dhigh, ihigh), ihigh); - } - } - - for (j = 0; j < 2; j++) { - FFSWAP(struct TrellisNode**, nodes[j], nodes_next[j]); - - if (nodes[j][0]->ssd > (1 << 16)) { - for (k = 1; k < frontier && nodes[j][k]; k++) - nodes[j][k]->ssd -= nodes[j][0]->ssd; - nodes[j][0]->ssd = 0; - } - } - - if (i == froze + FREEZE_INTERVAL) { - p[0] = &c->paths[0][nodes[0][0]->path]; - p[1] = &c->paths[1][nodes[1][0]->path]; - for (j = i; j > froze; j--) { - dst[j] = p[1]->value << 6 | p[0]->value; - p[0] = &c->paths[0][p[0]->prev]; - p[1] = &c->paths[1][p[1]->prev]; - } - froze = i; - pathn[0] = pathn[1] = 0; - memset(nodes[0] + 1, 0, (frontier - 1)*sizeof(**nodes)); - memset(nodes[1] + 1, 0, (frontier - 1)*sizeof(**nodes)); - } - } - - p[0] = &c->paths[0][nodes[0][0]->path]; - p[1] = &c->paths[1][nodes[1][0]->path]; - for (j = i; j > froze; j--) { - dst[j] = p[1]->value << 6 | p[0]->value; - p[0] = &c->paths[0][p[0]->prev]; - p[1] = &c->paths[1][p[1]->prev]; - } - c->band[0] = nodes[0][0]->state; - c->band[1] = nodes[1][0]->state; - - return i; -} - -static int g722_encode_frame(AVCodecContext *avctx, - uint8_t *dst, int buf_size, void *data) -{ - G722Context *c = avctx->priv_data; - const int16_t *samples = data; - int i; - - if (avctx->trellis) - return g722_encode_trellis(avctx, dst, buf_size, data); - - for (i = 0; i < buf_size >> 1; i++) { - int xlow, xhigh, ihigh, ilow; - filter_samples(c, &samples[2*i], &xlow, &xhigh); - ihigh = encode_high(&c->band[1], xhigh); - ilow = encode_low(&c->band[0], xlow); - update_high_predictor(&c->band[1], c->band[1].scale_factor * - high_inv_quant[ihigh] >> 10, ihigh); - update_low_predictor(&c->band[0], ilow >> 2); - *dst++ = ihigh << 6 | ilow; - } - return i; -} - -AVCodec ff_adpcm_g722_encoder = { - .name = "g722", - .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ADPCM_G722, - .priv_data_size = sizeof(G722Context), - .init = g722_init, - .close = g722_close, - .encode = g722_encode_frame, - .long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"), - .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, -}; -#endif - diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g722dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g722dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g722dec.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g722dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,154 @@ +/* + * Copyright (c) CMU 1993 Computer Science, Speech Group + * Chengxiang Lu and Alex Hauptmann + * Copyright (c) 2005 Steve Underwood + * Copyright (c) 2009 Kenan Gillet + * Copyright (c) 2010 Martin Storsjo + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * G.722 ADPCM audio decoder + * + * This G.722 decoder is a bit-exact implementation of the ITU G.722 + * specification for all three specified bitrates - 64000bps, 56000bps + * and 48000bps. It passes the ITU tests. + * + * @note For the 56000bps and 48000bps bitrates, the lowest 1 or 2 bits + * respectively of each byte are ignored. + */ + +#include "avcodec.h" +#include "get_bits.h" +#include "g722.h" +#include "libavutil/opt.h" + +#define OFFSET(x) offsetof(G722Context, x) +#define AD AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM +static const AVOption options[] = { + { "bits_per_codeword", "Bits per G722 codeword", OFFSET(bits_per_codeword), AV_OPT_TYPE_FLAGS, { 8 }, 6, 8, AD }, + { NULL } +}; + +static const AVClass g722_decoder_class = { + .class_name = "g722 decoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +static av_cold int g722_decode_init(AVCodecContext * avctx) +{ + G722Context *c = avctx->priv_data; + + if (avctx->channels != 1) { + av_log(avctx, AV_LOG_ERROR, "Only mono tracks are allowed.\n"); + return AVERROR_INVALIDDATA; + } + avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + c->band[0].scale_factor = 8; + c->band[1].scale_factor = 2; + c->prev_samples_pos = 22; + + avcodec_get_frame_defaults(&c->frame); + avctx->coded_frame = &c->frame; + + return 0; +} + +static const int16_t low_inv_quant5[32] = { + -35, -35, -2919, -2195, -1765, -1458, -1219, -1023, + -858, -714, -587, -473, -370, -276, -190, -110, + 2919, 2195, 1765, 1458, 1219, 1023, 858, 714, + 587, 473, 370, 276, 190, 110, 35, -35 +}; + +static const int16_t *low_inv_quants[3] = { ff_g722_low_inv_quant6, + low_inv_quant5, + ff_g722_low_inv_quant4 }; + +static int g722_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) +{ + G722Context *c = avctx->priv_data; + int16_t *out_buf; + int j, ret; + const int skip = 8 - c->bits_per_codeword; + const int16_t *quantizer_table = low_inv_quants[skip]; + GetBitContext gb; + + /* get output buffer */ + c->frame.nb_samples = avpkt->size * 2; + if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + out_buf = (int16_t *)c->frame.data[0]; + + init_get_bits(&gb, avpkt->data, avpkt->size * 8); + + for (j = 0; j < avpkt->size; j++) { + int ilow, ihigh, rlow, rhigh, dhigh; + int xout1, xout2; + + ihigh = get_bits(&gb, 2); + ilow = get_bits(&gb, 6 - skip); + skip_bits(&gb, skip); + + rlow = av_clip((c->band[0].scale_factor * quantizer_table[ilow] >> 10) + + c->band[0].s_predictor, -16384, 16383); + + ff_g722_update_low_predictor(&c->band[0], ilow >> (2 - skip)); + + dhigh = c->band[1].scale_factor * ff_g722_high_inv_quant[ihigh] >> 10; + rhigh = av_clip(dhigh + c->band[1].s_predictor, -16384, 16383); + + ff_g722_update_high_predictor(&c->band[1], dhigh, ihigh); + + c->prev_samples[c->prev_samples_pos++] = rlow + rhigh; + c->prev_samples[c->prev_samples_pos++] = rlow - rhigh; + ff_g722_apply_qmf(c->prev_samples + c->prev_samples_pos - 24, + &xout1, &xout2); + *out_buf++ = av_clip_int16(xout1 >> 12); + *out_buf++ = av_clip_int16(xout2 >> 12); + if (c->prev_samples_pos >= PREV_SAMPLES_BUF_SIZE) { + memmove(c->prev_samples, c->prev_samples + c->prev_samples_pos - 22, + 22 * sizeof(c->prev_samples[0])); + c->prev_samples_pos = 22; + } + } + + *got_frame_ptr = 1; + *(AVFrame *)data = c->frame; + + return avpkt->size; +} + +AVCodec ff_adpcm_g722_decoder = { + .name = "g722", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_ADPCM_G722, + .priv_data_size = sizeof(G722Context), + .init = g722_decode_init, + .decode = g722_decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"), + .priv_class = &g722_decoder_class, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g722enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g722enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g722enc.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g722enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,374 @@ +/* + * Copyright (c) CMU 1993 Computer Science, Speech Group + * Chengxiang Lu and Alex Hauptmann + * Copyright (c) 2005 Steve Underwood + * Copyright (c) 2009 Kenan Gillet + * Copyright (c) 2010 Martin Storsjo + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * G.722 ADPCM audio encoder + */ + +#include "avcodec.h" +#include "g722.h" + +#define FREEZE_INTERVAL 128 + +/* This is an arbitrary value. Allowing insanely large values leads to strange + problems, so we limit it to a reasonable value */ +#define MAX_FRAME_SIZE 32768 + +/* We clip the value of avctx->trellis to prevent data type overflows and + undefined behavior. Using larger values is insanely slow anyway. */ +#define MIN_TRELLIS 0 +#define MAX_TRELLIS 16 + +static av_cold int g722_encode_init(AVCodecContext * avctx) +{ + G722Context *c = avctx->priv_data; + + if (avctx->channels != 1) { + av_log(avctx, AV_LOG_ERROR, "Only mono tracks are allowed.\n"); + return AVERROR_INVALIDDATA; + } + + c->band[0].scale_factor = 8; + c->band[1].scale_factor = 2; + c->prev_samples_pos = 22; + + if (avctx->trellis) { + int frontier = 1 << avctx->trellis; + int max_paths = frontier * FREEZE_INTERVAL; + int i; + for (i = 0; i < 2; i++) { + c->paths[i] = av_mallocz(max_paths * sizeof(**c->paths)); + c->node_buf[i] = av_mallocz(2 * frontier * sizeof(**c->node_buf)); + c->nodep_buf[i] = av_mallocz(2 * frontier * sizeof(**c->nodep_buf)); + } + } + + if (avctx->frame_size) { + /* validate frame size */ + if (avctx->frame_size & 1 || avctx->frame_size > MAX_FRAME_SIZE) { + int new_frame_size; + + if (avctx->frame_size == 1) + new_frame_size = 2; + else if (avctx->frame_size > MAX_FRAME_SIZE) + new_frame_size = MAX_FRAME_SIZE; + else + new_frame_size = avctx->frame_size - 1; + + av_log(avctx, AV_LOG_WARNING, "Requested frame size is not " + "allowed. Using %d instead of %d\n", new_frame_size, + avctx->frame_size); + avctx->frame_size = new_frame_size; + } + } else { + /* This is arbitrary. We use 320 because it's 20ms @ 16kHz, which is + a common packet size for VoIP applications */ + avctx->frame_size = 320; + } + + if (avctx->trellis) { + /* validate trellis */ + if (avctx->trellis < MIN_TRELLIS || avctx->trellis > MAX_TRELLIS) { + int new_trellis = av_clip(avctx->trellis, MIN_TRELLIS, MAX_TRELLIS); + av_log(avctx, AV_LOG_WARNING, "Requested trellis value is not " + "allowed. Using %d instead of %d\n", new_trellis, + avctx->trellis); + avctx->trellis = new_trellis; + } + } + + return 0; +} + +static av_cold int g722_encode_close(AVCodecContext *avctx) +{ + G722Context *c = avctx->priv_data; + int i; + for (i = 0; i < 2; i++) { + av_freep(&c->paths[i]); + av_freep(&c->node_buf[i]); + av_freep(&c->nodep_buf[i]); + } + return 0; +} + +static const int16_t low_quant[33] = { + 35, 72, 110, 150, 190, 233, 276, 323, + 370, 422, 473, 530, 587, 650, 714, 786, + 858, 940, 1023, 1121, 1219, 1339, 1458, 1612, + 1765, 1980, 2195, 2557, 2919 +}; + +static inline void filter_samples(G722Context *c, const int16_t *samples, + int *xlow, int *xhigh) +{ + int xout1, xout2; + c->prev_samples[c->prev_samples_pos++] = samples[0]; + c->prev_samples[c->prev_samples_pos++] = samples[1]; + ff_g722_apply_qmf(c->prev_samples + c->prev_samples_pos - 24, &xout1, &xout2); + *xlow = xout1 + xout2 >> 13; + *xhigh = xout1 - xout2 >> 13; + if (c->prev_samples_pos >= PREV_SAMPLES_BUF_SIZE) { + memmove(c->prev_samples, + c->prev_samples + c->prev_samples_pos - 22, + 22 * sizeof(c->prev_samples[0])); + c->prev_samples_pos = 22; + } +} + +static inline int encode_high(const struct G722Band *state, int xhigh) +{ + int diff = av_clip_int16(xhigh - state->s_predictor); + int pred = 141 * state->scale_factor >> 8; + /* = diff >= 0 ? (diff < pred) + 2 : diff >= -pred */ + return ((diff ^ (diff >> (sizeof(diff)*8-1))) < pred) + 2*(diff >= 0); +} + +static inline int encode_low(const struct G722Band* state, int xlow) +{ + int diff = av_clip_int16(xlow - state->s_predictor); + /* = diff >= 0 ? diff : -(diff + 1) */ + int limit = diff ^ (diff >> (sizeof(diff)*8-1)); + int i = 0; + limit = limit + 1 << 10; + if (limit > low_quant[8] * state->scale_factor) + i = 9; + while (i < 29 && limit > low_quant[i] * state->scale_factor) + i++; + return (diff < 0 ? (i < 2 ? 63 : 33) : 61) - i; +} + +static void g722_encode_trellis(G722Context *c, int trellis, + uint8_t *dst, int nb_samples, + const int16_t *samples) +{ + int i, j, k; + int frontier = 1 << trellis; + struct TrellisNode **nodes[2]; + struct TrellisNode **nodes_next[2]; + int pathn[2] = {0, 0}, froze = -1; + struct TrellisPath *p[2]; + + for (i = 0; i < 2; i++) { + nodes[i] = c->nodep_buf[i]; + nodes_next[i] = c->nodep_buf[i] + frontier; + memset(c->nodep_buf[i], 0, 2 * frontier * sizeof(*c->nodep_buf)); + nodes[i][0] = c->node_buf[i] + frontier; + nodes[i][0]->ssd = 0; + nodes[i][0]->path = 0; + nodes[i][0]->state = c->band[i]; + } + + for (i = 0; i < nb_samples >> 1; i++) { + int xlow, xhigh; + struct TrellisNode *next[2]; + int heap_pos[2] = {0, 0}; + + for (j = 0; j < 2; j++) { + next[j] = c->node_buf[j] + frontier*(i & 1); + memset(nodes_next[j], 0, frontier * sizeof(**nodes_next)); + } + + filter_samples(c, &samples[2*i], &xlow, &xhigh); + + for (j = 0; j < frontier && nodes[0][j]; j++) { + /* Only k >> 2 affects the future adaptive state, therefore testing + * small steps that don't change k >> 2 is useless, the original + * value from encode_low is better than them. Since we step k + * in steps of 4, make sure range is a multiple of 4, so that + * we don't miss the original value from encode_low. */ + int range = j < frontier/2 ? 4 : 0; + struct TrellisNode *cur_node = nodes[0][j]; + + int ilow = encode_low(&cur_node->state, xlow); + + for (k = ilow - range; k <= ilow + range && k <= 63; k += 4) { + int decoded, dec_diff, pos; + uint32_t ssd; + struct TrellisNode* node; + + if (k < 0) + continue; + + decoded = av_clip((cur_node->state.scale_factor * + ff_g722_low_inv_quant6[k] >> 10) + + cur_node->state.s_predictor, -16384, 16383); + dec_diff = xlow - decoded; + +#define STORE_NODE(index, UPDATE, VALUE)\ + ssd = cur_node->ssd + dec_diff*dec_diff;\ + /* Check for wraparound. Using 64 bit ssd counters would \ + * be simpler, but is slower on x86 32 bit. */\ + if (ssd < cur_node->ssd)\ + continue;\ + if (heap_pos[index] < frontier) {\ + pos = heap_pos[index]++;\ + assert(pathn[index] < FREEZE_INTERVAL * frontier);\ + node = nodes_next[index][pos] = next[index]++;\ + node->path = pathn[index]++;\ + } else {\ + /* Try to replace one of the leaf nodes with the new \ + * one, but not always testing the same leaf position */\ + pos = (frontier>>1) + (heap_pos[index] & ((frontier>>1) - 1));\ + if (ssd >= nodes_next[index][pos]->ssd)\ + continue;\ + heap_pos[index]++;\ + node = nodes_next[index][pos];\ + }\ + node->ssd = ssd;\ + node->state = cur_node->state;\ + UPDATE;\ + c->paths[index][node->path].value = VALUE;\ + c->paths[index][node->path].prev = cur_node->path;\ + /* Sift the newly inserted node up in the heap to restore \ + * the heap property */\ + while (pos > 0) {\ + int parent = (pos - 1) >> 1;\ + if (nodes_next[index][parent]->ssd <= ssd)\ + break;\ + FFSWAP(struct TrellisNode*, nodes_next[index][parent],\ + nodes_next[index][pos]);\ + pos = parent;\ + } + STORE_NODE(0, ff_g722_update_low_predictor(&node->state, k >> 2), k); + } + } + + for (j = 0; j < frontier && nodes[1][j]; j++) { + int ihigh; + struct TrellisNode *cur_node = nodes[1][j]; + + /* We don't try to get any initial guess for ihigh via + * encode_high - since there's only 4 possible values, test + * them all. Testing all of these gives a much, much larger + * gain than testing a larger range around ilow. */ + for (ihigh = 0; ihigh < 4; ihigh++) { + int dhigh, decoded, dec_diff, pos; + uint32_t ssd; + struct TrellisNode* node; + + dhigh = cur_node->state.scale_factor * + ff_g722_high_inv_quant[ihigh] >> 10; + decoded = av_clip(dhigh + cur_node->state.s_predictor, + -16384, 16383); + dec_diff = xhigh - decoded; + + STORE_NODE(1, ff_g722_update_high_predictor(&node->state, dhigh, ihigh), ihigh); + } + } + + for (j = 0; j < 2; j++) { + FFSWAP(struct TrellisNode**, nodes[j], nodes_next[j]); + + if (nodes[j][0]->ssd > (1 << 16)) { + for (k = 1; k < frontier && nodes[j][k]; k++) + nodes[j][k]->ssd -= nodes[j][0]->ssd; + nodes[j][0]->ssd = 0; + } + } + + if (i == froze + FREEZE_INTERVAL) { + p[0] = &c->paths[0][nodes[0][0]->path]; + p[1] = &c->paths[1][nodes[1][0]->path]; + for (j = i; j > froze; j--) { + dst[j] = p[1]->value << 6 | p[0]->value; + p[0] = &c->paths[0][p[0]->prev]; + p[1] = &c->paths[1][p[1]->prev]; + } + froze = i; + pathn[0] = pathn[1] = 0; + memset(nodes[0] + 1, 0, (frontier - 1)*sizeof(**nodes)); + memset(nodes[1] + 1, 0, (frontier - 1)*sizeof(**nodes)); + } + } + + p[0] = &c->paths[0][nodes[0][0]->path]; + p[1] = &c->paths[1][nodes[1][0]->path]; + for (j = i; j > froze; j--) { + dst[j] = p[1]->value << 6 | p[0]->value; + p[0] = &c->paths[0][p[0]->prev]; + p[1] = &c->paths[1][p[1]->prev]; + } + c->band[0] = nodes[0][0]->state; + c->band[1] = nodes[1][0]->state; +} + +static av_always_inline void encode_byte(G722Context *c, uint8_t *dst, + const int16_t *samples) +{ + int xlow, xhigh, ilow, ihigh; + filter_samples(c, samples, &xlow, &xhigh); + ihigh = encode_high(&c->band[1], xhigh); + ilow = encode_low (&c->band[0], xlow); + ff_g722_update_high_predictor(&c->band[1], c->band[1].scale_factor * + ff_g722_high_inv_quant[ihigh] >> 10, ihigh); + ff_g722_update_low_predictor(&c->band[0], ilow >> 2); + *dst = ihigh << 6 | ilow; +} + +static void g722_encode_no_trellis(G722Context *c, + uint8_t *dst, int nb_samples, + const int16_t *samples) +{ + int i; + for (i = 0; i < nb_samples; i += 2) + encode_byte(c, dst++, &samples[i]); +} + +static int g722_encode_frame(AVCodecContext *avctx, + uint8_t *dst, int buf_size, void *data) +{ + G722Context *c = avctx->priv_data; + const int16_t *samples = data; + int nb_samples; + + nb_samples = avctx->frame_size - (avctx->frame_size & 1); + + if (avctx->trellis) + g722_encode_trellis(c, avctx->trellis, dst, nb_samples, samples); + else + g722_encode_no_trellis(c, dst, nb_samples, samples); + + /* handle last frame with odd frame_size */ + if (nb_samples < avctx->frame_size) { + int16_t last_samples[2] = { samples[nb_samples], samples[nb_samples] }; + encode_byte(c, &dst[nb_samples >> 1], last_samples); + } + + return (avctx->frame_size + 1) >> 1; +} + +AVCodec ff_adpcm_g722_encoder = { + .name = "g722", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_ADPCM_G722, + .priv_data_size = sizeof(G722Context), + .init = g722_encode_init, + .close = g722_encode_close, + .encode = g722_encode_frame, + .capabilities = CODEC_CAP_SMALL_LAST_FRAME, + .long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"), + .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g722.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g722.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g722.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g722.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,78 @@ +/* + * Copyright (c) CMU 1993 Computer Science, Speech Group + * Chengxiang Lu and Alex Hauptmann + * Copyright (c) 2005 Steve Underwood + * Copyright (c) 2009 Kenan Gillet + * Copyright (c) 2010 Martin Storsjo + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_G722_H +#define AVCODEC_G722_H + +#include +#include "avcodec.h" + +#define PREV_SAMPLES_BUF_SIZE 1024 + +typedef struct { + const AVClass *class; + AVFrame frame; + int bits_per_codeword; + int16_t prev_samples[PREV_SAMPLES_BUF_SIZE]; ///< memory of past decoded samples + int prev_samples_pos; ///< the number of values in prev_samples + + /** + * The band[0] and band[1] correspond respectively to the lower band and higher band. + */ + struct G722Band { + int16_t s_predictor; ///< predictor output value + int32_t s_zero; ///< previous output signal from zero predictor + int8_t part_reconst_mem[2]; ///< signs of previous partially reconstructed signals + int16_t prev_qtzd_reconst; ///< previous quantized reconstructed signal (internal value, using low_inv_quant4) + int16_t pole_mem[2]; ///< second-order pole section coefficient buffer + int32_t diff_mem[6]; ///< quantizer difference signal memory + int16_t zero_mem[6]; ///< Seventh-order zero section coefficient buffer + int16_t log_factor; ///< delayed 2-logarithmic quantizer factor + int16_t scale_factor; ///< delayed quantizer scale factor + } band[2]; + + struct TrellisNode { + struct G722Band state; + uint32_t ssd; + int path; + } *node_buf[2], **nodep_buf[2]; + + struct TrellisPath { + int value; + int prev; + } *paths[2]; +} G722Context; + +extern const int16_t ff_g722_high_inv_quant[4]; +extern const int16_t ff_g722_low_inv_quant4[16]; +extern const int16_t ff_g722_low_inv_quant6[64]; + +void ff_g722_update_low_predictor(struct G722Band *band, const int ilow); + +void ff_g722_update_high_predictor(struct G722Band *band, const int dhigh, + const int ihigh); + +void ff_g722_apply_qmf(const int16_t *prev_samples, int *xout1, int *xout2); + +#endif /* AVCODEC_G722_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g726.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g726.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g726.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g726.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,7 +22,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include +#include "libavutil/avassert.h" +#include "libavutil/opt.h" #include "avcodec.h" +#include "internal.h" #include "get_bits.h" #include "put_bits.h" @@ -71,6 +74,8 @@ } G726Tables; typedef struct G726Context { + AVClass *class; + AVFrame frame; G726Tables tbls; /**< static tables needed for computation */ Float11 sr[2]; /**< prev. reconstructed samples */ @@ -266,11 +271,11 @@ return av_clip(re_signal << 2, -0xffff, 0xffff); } -static av_cold int g726_reset(G726Context* c, int index) +static av_cold int g726_reset(G726Context *c) { int i; - c->tbls = G726Tables_pool[index]; + c->tbls = G726Tables_pool[c->code_size - 2]; for (i=0; i<2; i++) { c->sr[i].mant = 1<<5; c->pk[i] = 1; @@ -295,65 +300,59 @@ g726_decode(c, i); return i; } -#endif /* Interfacing to the libavcodec */ -static av_cold int g726_init(AVCodecContext * avctx) +static av_cold int g726_encode_init(AVCodecContext *avctx) { G726Context* c = avctx->priv_data; - unsigned int index; - if (avctx->sample_rate <= 0) { - av_log(avctx, AV_LOG_ERROR, "Samplerate is invalid\n"); - return -1; + if (avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL && + avctx->sample_rate != 8000) { + av_log(avctx, AV_LOG_ERROR, "Sample rates other than 8kHz are not " + "allowed when the compliance level is higher than unofficial. " + "Resample or reduce the compliance level.\n"); + return AVERROR(EINVAL); } + av_assert0(avctx->sample_rate > 0); - index = (avctx->bit_rate + avctx->sample_rate/2) / avctx->sample_rate - 2; - - if (avctx->bit_rate % avctx->sample_rate && avctx->codec->encode) { - av_log(avctx, AV_LOG_ERROR, "Bitrate - Samplerate combination is invalid\n"); - return -1; - } if(avctx->channels != 1){ av_log(avctx, AV_LOG_ERROR, "Only mono is supported\n"); - return -1; - } - if(index>3){ - av_log(avctx, AV_LOG_ERROR, "Unsupported number of bits %d\n", index+2); - return -1; + return AVERROR(EINVAL); } - g726_reset(c, index); - c->code_size = index+2; + + if (avctx->bit_rate) + c->code_size = (avctx->bit_rate + avctx->sample_rate/2) / avctx->sample_rate; + + c->code_size = av_clip(c->code_size, 2, 5); + avctx->bit_rate = c->code_size * avctx->sample_rate; + avctx->bits_per_coded_sample = c->code_size; + + g726_reset(c); avctx->coded_frame = avcodec_alloc_frame(); if (!avctx->coded_frame) return AVERROR(ENOMEM); avctx->coded_frame->key_frame = 1; - if (avctx->codec->decode) - avctx->sample_fmt = AV_SAMPLE_FMT_S16; - /* select a frame size that will end on a byte boundary and have a size of approximately 1024 bytes */ - if (avctx->codec->encode) - avctx->frame_size = ((int[]){ 4096, 2736, 2048, 1640 })[index]; + avctx->frame_size = ((int[]){ 4096, 2736, 2048, 1640 })[c->code_size - 2]; return 0; } -static av_cold int g726_close(AVCodecContext *avctx) +static av_cold int g726_encode_close(AVCodecContext *avctx) { av_freep(&avctx->coded_frame); return 0; } -#if CONFIG_ADPCM_G726_ENCODER static int g726_encode_frame(AVCodecContext *avctx, uint8_t *dst, int buf_size, void *data) { G726Context *c = avctx->priv_data; - const short *samples = data; + const int16_t *samples = data; PutBitContext pb; int i; @@ -366,54 +365,124 @@ return put_bits_count(&pb)>>3; } + +#define OFFSET(x) offsetof(G726Context, x) +#define AE AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "code_size", "Bits per code", OFFSET(code_size), AV_OPT_TYPE_INT, { 4 }, 2, 5, AE }, + { NULL }, +}; + +static const AVClass class = { + .class_name = "g726", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +static const AVCodecDefault defaults[] = { + { "b", "0" }, + { NULL }, +}; + +AVCodec ff_adpcm_g726_encoder = { + .name = "g726", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_ADPCM_G726, + .priv_data_size = sizeof(G726Context), + .init = g726_encode_init, + .encode = g726_encode_frame, + .close = g726_encode_close, + .capabilities = CODEC_CAP_SMALL_LAST_FRAME, + .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"), + .priv_class = &class, + .defaults = defaults, +}; #endif -static int g726_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +#if CONFIG_ADPCM_G726_DECODER +static av_cold int g726_decode_init(AVCodecContext *avctx) +{ + G726Context* c = avctx->priv_data; + + if (avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT && + avctx->sample_rate != 8000) { + av_log(avctx, AV_LOG_ERROR, "Only 8kHz sample rate is allowed when " + "the compliance level is strict. Reduce the compliance level " + "if you wish to decode the stream anyway.\n"); + return AVERROR(EINVAL); + } + + if(avctx->channels != 1){ + av_log(avctx, AV_LOG_ERROR, "Only mono is supported\n"); + return AVERROR(EINVAL); + } + + c->code_size = avctx->bits_per_coded_sample; + if (c->code_size < 2 || c->code_size > 5) { + av_log(avctx, AV_LOG_ERROR, "Invalid number of bits %d\n", c->code_size); + return AVERROR(EINVAL); + } + g726_reset(c); + + avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + avcodec_get_frame_defaults(&c->frame); + avctx->coded_frame = &c->frame; + + return 0; +} + +static int g726_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; G726Context *c = avctx->priv_data; - short *samples = data; + int16_t *samples; GetBitContext gb; + int out_samples, ret; + + out_samples = buf_size * 8 / c->code_size; + + /* get output buffer */ + c->frame.nb_samples = out_samples; + if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (int16_t *)c->frame.data[0]; init_get_bits(&gb, buf, buf_size * 8); - while (get_bits_count(&gb) + c->code_size <= buf_size*8) + while (out_samples--) *samples++ = g726_decode(c, get_bits(&gb, c->code_size)); - if(buf_size*8 != get_bits_count(&gb)) + if (get_bits_left(&gb) > 0) av_log(avctx, AV_LOG_ERROR, "Frame invalidly split, missing parser?\n"); - *data_size = (uint8_t*)samples - (uint8_t*)data; + *got_frame_ptr = 1; + *(AVFrame *)data = c->frame; + return buf_size; } -#if CONFIG_ADPCM_G726_ENCODER -AVCodec ff_adpcm_g726_encoder = { - "g726", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_ADPCM_G726, - sizeof(G726Context), - g726_init, - g726_encode_frame, - g726_close, - NULL, - .capabilities = CODEC_CAP_SMALL_LAST_FRAME, - .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, - .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"), -}; -#endif +static void g726_decode_flush(AVCodecContext *avctx) +{ + G726Context *c = avctx->priv_data; + g726_reset(c); +} AVCodec ff_adpcm_g726_decoder = { - "g726", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_ADPCM_G726, - sizeof(G726Context), - g726_init, - NULL, - g726_close, - g726_decode_frame, + .name = "g726", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_ADPCM_G726, + .priv_data_size = sizeof(G726Context), + .init = g726_decode_init, + .decode = g726_decode_frame, + .flush = g726_decode_flush, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"), }; +#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g729data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g729data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/g729data.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/g729data.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,278 +0,0 @@ -/* - * data for G.729 decoder - * Copyright (c) 2007 Vladimir Voroshilov - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVCODEC_G729DATA_H -#define AVCODEC_G729DATA_H - -#include - -#define MA_NP 4 ///< Moving Average (MA) prediction order - -#define VQ_1ST_BITS 7 ///< first stage vector of quantizer (size in bits) -#define VQ_2ND_BITS 5 ///< second stage vector of quantizer (size in bits) - -#define GC_1ST_IDX_BITS_8K 3 ///< gain codebook (first stage) index, 8k mode (size in bits) -#define GC_2ND_IDX_BITS_8K 4 ///< gain codebook (second stage) index, 8k mode (size in bits) - -#define GC_1ST_IDX_BITS_6K4 3 ///< gain codebook (first stage) index, 6.4k mode (size in bits) -#define GC_2ND_IDX_BITS_6K4 3 ///< gain codebook (second stage) index, 6.4k mode (size in bits) - -/** - * first stage LSP codebook - * (10-dimensional, with 128 entries (3.24 of G.729) - */ -static const int16_t cb_lsp_1st[1< -#include -#include -#include -#include -#include -#include - -#include "avcodec.h" -#include "libavutil/avutil.h" -#include "get_bits.h" - -#include "lsp.h" -#include "celp_math.h" -#include "acelp_filters.h" -#include "acelp_pitch_delay.h" -#include "acelp_vectors.h" -#include "g729data.h" - -/** - * minimum quantized LSF value (3.2.4) - * 0.005 in Q13 - */ -#define LSFQ_MIN 40 - -/** - * maximum quantized LSF value (3.2.4) - * 3.135 in Q13 - */ -#define LSFQ_MAX 25681 - -/** - * minimum LSF distance (3.2.4) - * 0.0391 in Q13 - */ -#define LSFQ_DIFF_MIN 321 - -/** - * minimum gain pitch value (3.8, Equation 47) - * 0.2 in (1.14) - */ -#define SHARP_MIN 3277 - -/** - * maximum gain pitch value (3.8, Equation 47) - * (EE) This does not comply with the specification. - * Specification says about 0.8, which should be - * 13107 in (1.14), but reference C code uses - * 13017 (equals to 0.7945) instead of it. - */ -#define SHARP_MAX 13017 - -/** - * subframe size - */ -#define SUBFRAME_SIZE 40 - - -typedef struct { - uint8_t ac_index_bits[2]; ///< adaptive codebook index for second subframe (size in bits) - uint8_t parity_bit; ///< parity bit for pitch delay - uint8_t gc_1st_index_bits; ///< gain codebook (first stage) index (size in bits) - uint8_t gc_2nd_index_bits; ///< gain codebook (second stage) index (size in bits) - uint8_t fc_signs_bits; ///< number of pulses in fixed-codebook vector - uint8_t fc_indexes_bits; ///< size (in bits) of fixed-codebook index entry -} G729FormatDescription; - -typedef struct { - int pitch_delay_int_prev; ///< integer part of previous subframe's pitch delay (4.1.3) - - /// (2.13) LSP quantizer outputs - int16_t past_quantizer_output_buf[MA_NP + 1][10]; - int16_t* past_quantizer_outputs[MA_NP + 1]; - - int16_t lsfq[10]; ///< (2.13) quantized LSF coefficients from previous frame - int16_t lsp_buf[2][10]; ///< (0.15) LSP coefficients (previous and current frames) (3.2.5) - int16_t *lsp[2]; ///< pointers to lsp_buf -} G729Context; - -static const G729FormatDescription format_g729_8k = { - .ac_index_bits = {8,5}, - .parity_bit = 1, - .gc_1st_index_bits = GC_1ST_IDX_BITS_8K, - .gc_2nd_index_bits = GC_2ND_IDX_BITS_8K, - .fc_signs_bits = 4, - .fc_indexes_bits = 13, -}; - -static const G729FormatDescription format_g729d_6k4 = { - .ac_index_bits = {8,4}, - .parity_bit = 0, - .gc_1st_index_bits = GC_1ST_IDX_BITS_6K4, - .gc_2nd_index_bits = GC_2ND_IDX_BITS_6K4, - .fc_signs_bits = 2, - .fc_indexes_bits = 9, -}; - -/** - * \brief pseudo random number generator - */ -static inline uint16_t g729_prng(uint16_t value) -{ - return 31821 * value + 13849; -} - -/** - * Get parity bit of bit 2..7 - */ -static inline int get_parity(uint8_t value) -{ - return (0x6996966996696996ULL >> (value >> 2)) & 1; -} - -static void lsf_decode(int16_t* lsfq, int16_t* past_quantizer_outputs[MA_NP + 1], - int16_t ma_predictor, - int16_t vq_1st, int16_t vq_2nd_low, int16_t vq_2nd_high) -{ - int i,j; - static const uint8_t min_distance[2]={10, 5}; //(2.13) - int16_t* quantizer_output = past_quantizer_outputs[MA_NP]; - - for (i = 0; i < 5; i++) { - quantizer_output[i] = cb_lsp_1st[vq_1st][i ] + cb_lsp_2nd[vq_2nd_low ][i ]; - quantizer_output[i + 5] = cb_lsp_1st[vq_1st][i + 5] + cb_lsp_2nd[vq_2nd_high][i + 5]; - } - - for (j = 0; j < 2; j++) { - for (i = 1; i < 10; i++) { - int diff = (quantizer_output[i - 1] - quantizer_output[i] + min_distance[j]) >> 1; - if (diff > 0) { - quantizer_output[i - 1] -= diff; - quantizer_output[i ] += diff; - } - } - } - - for (i = 0; i < 10; i++) { - int sum = quantizer_output[i] * cb_ma_predictor_sum[ma_predictor][i]; - for (j = 0; j < MA_NP; j++) - sum += past_quantizer_outputs[j][i] * cb_ma_predictor[ma_predictor][j][i]; - - lsfq[i] = sum >> 15; - } - - /* Rotate past_quantizer_outputs. */ - memmove(past_quantizer_outputs + 1, past_quantizer_outputs, MA_NP * sizeof(int16_t*)); - past_quantizer_outputs[0] = quantizer_output; - - ff_acelp_reorder_lsf(lsfq, LSFQ_DIFF_MIN, LSFQ_MIN, LSFQ_MAX, 10); -} - -static av_cold int decoder_init(AVCodecContext * avctx) -{ - G729Context* ctx = avctx->priv_data; - int i,k; - - if (avctx->channels != 1) { - av_log(avctx, AV_LOG_ERROR, "Only mono sound is supported (requested channels: %d).\n", avctx->channels); - return AVERROR(EINVAL); - } - - /* Both 8kbit/s and 6.4kbit/s modes uses two subframes per frame. */ - avctx->frame_size = SUBFRAME_SIZE << 1; - - for (k = 0; k < MA_NP + 1; k++) { - ctx->past_quantizer_outputs[k] = ctx->past_quantizer_output_buf[k]; - for (i = 1; i < 11; i++) - ctx->past_quantizer_outputs[k][i - 1] = (18717 * i) >> 3; - } - - ctx->lsp[0] = ctx->lsp_buf[0]; - ctx->lsp[1] = ctx->lsp_buf[1]; - memcpy(ctx->lsp[0], lsp_init, 10 * sizeof(int16_t)); - - return 0; -} - -static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, - AVPacket *avpkt) -{ - const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; - int16_t *out_frame = data; - GetBitContext gb; - G729FormatDescription format; - int frame_erasure = 0; ///< frame erasure detected during decoding - int bad_pitch = 0; ///< parity check failed - int i; - G729Context *ctx = avctx->priv_data; - int16_t lp[2][11]; // (3.12) - uint8_t ma_predictor; ///< switched MA predictor of LSP quantizer - uint8_t quantizer_1st; ///< first stage vector of quantizer - uint8_t quantizer_2nd_lo; ///< second stage lower vector of quantizer (size in bits) - uint8_t quantizer_2nd_hi; ///< second stage higher vector of quantizer (size in bits) - - int pitch_delay_int; // pitch delay, integer part - int pitch_delay_3x; // pitch delay, multiplied by 3 - - if (*data_size < SUBFRAME_SIZE << 2) { - av_log(avctx, AV_LOG_ERROR, "Error processing packet: output buffer too small\n"); - return AVERROR(EIO); - } - - if (buf_size == 10) { - format = format_g729_8k; - av_log(avctx, AV_LOG_DEBUG, "Packet type: %s\n", "G.729 @ 8kbit/s"); - } else if (buf_size == 8) { - format = format_g729d_6k4; - av_log(avctx, AV_LOG_DEBUG, "Packet type: %s\n", "G.729D @ 6.4kbit/s"); - } else { - av_log(avctx, AV_LOG_ERROR, "Packet size %d is unknown.\n", buf_size); - return AVERROR_INVALIDDATA; - } - - for (i=0; i < buf_size; i++) - frame_erasure |= buf[i]; - frame_erasure = !frame_erasure; - - init_get_bits(&gb, buf, buf_size); - - ma_predictor = get_bits(&gb, 1); - quantizer_1st = get_bits(&gb, VQ_1ST_BITS); - quantizer_2nd_lo = get_bits(&gb, VQ_2ND_BITS); - quantizer_2nd_hi = get_bits(&gb, VQ_2ND_BITS); - - lsf_decode(ctx->lsfq, ctx->past_quantizer_outputs, - ma_predictor, - quantizer_1st, quantizer_2nd_lo, quantizer_2nd_hi); - - ff_acelp_lsf2lsp(ctx->lsp[1], ctx->lsfq, 10); - - ff_acelp_lp_decode(&lp[0][0], &lp[1][0], ctx->lsp[1], ctx->lsp[0], 10); - - FFSWAP(int16_t*, ctx->lsp[1], ctx->lsp[0]); - - for (i = 0; i < 2; i++) { - uint8_t ac_index; ///< adaptive codebook index - uint8_t pulses_signs; ///< fixed-codebook vector pulse signs - int fc_indexes; ///< fixed-codebook indexes - uint8_t gc_1st_index; ///< gain codebook (first stage) index - uint8_t gc_2nd_index; ///< gain codebook (second stage) index - - ac_index = get_bits(&gb, format.ac_index_bits[i]); - if(!i && format.parity_bit) - bad_pitch = get_parity(ac_index) == get_bits1(&gb); - fc_indexes = get_bits(&gb, format.fc_indexes_bits); - pulses_signs = get_bits(&gb, format.fc_signs_bits); - gc_1st_index = get_bits(&gb, format.gc_1st_index_bits); - gc_2nd_index = get_bits(&gb, format.gc_2nd_index_bits); - - if(!i) { - if (bad_pitch) - pitch_delay_3x = 3 * ctx->pitch_delay_int_prev; - else - pitch_delay_3x = ff_acelp_decode_8bit_to_1st_delay3(ac_index); - } else { - int pitch_delay_min = av_clip(ctx->pitch_delay_int_prev - 5, - PITCH_DELAY_MIN, PITCH_DELAY_MAX - 9); - - if(packet_type == FORMAT_G729D_6K4) - pitch_delay_3x = ff_acelp_decode_4bit_to_2nd_delay3(ac_index, pitch_delay_min); - else - pitch_delay_3x = ff_acelp_decode_5_6_bit_to_2nd_delay3(ac_index, pitch_delay_min); - } - - /* Round pitch delay to nearest (used everywhere except ff_acelp_interpolate). */ - pitch_delay_int = (pitch_delay_3x + 1) / 3; - - ff_acelp_weighted_vector_sum(fc + pitch_delay_int, - fc + pitch_delay_int, - fc, 1 << 14, - av_clip(ctx->gain_pitch, SHARP_MIN, SHARP_MAX), - 0, 14, - SUBFRAME_SIZE - pitch_delay_int); - - if (frame_erasure) { - ctx->gain_pitch = (29491 * ctx->gain_pitch) >> 15; // 0.90 (0.15) - ctx->gain_code = ( 2007 * ctx->gain_code ) >> 11; // 0.98 (0.11) - - gain_corr_factor = 0; - } else { - ctx->gain_pitch = cb_gain_1st_8k[gc_1st_index][0] + - cb_gain_2nd_8k[gc_2nd_index][0]; - gain_corr_factor = cb_gain_1st_8k[gc_1st_index][1] + - cb_gain_2nd_8k[gc_2nd_index][1]; - - ff_acelp_weighted_vector_sum(ctx->exc + i * SUBFRAME_SIZE, - ctx->exc + i * SUBFRAME_SIZE, fc, - (!voicing && frame_erasure) ? 0 : ctx->gain_pitch, - ( voicing && frame_erasure) ? 0 : ctx->gain_code, - 1 << 13, 14, SUBFRAME_SIZE); - - ctx->pitch_delay_int_prev = pitch_delay_int; - } - - *data_size = SUBFRAME_SIZE << 2; - return buf_size; -} - -AVCodec ff_g729_decoder = -{ - "g729", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_G729, - sizeof(G729Context), - decoder_init, - NULL, - NULL, - decode_frame, - .long_name = NULL_IF_CONFIG_SMALL("G.729"), -}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/get_bits.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/get_bits.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/get_bits.h 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/get_bits.h 2012-01-11 00:34:30.000000000 +0000 @@ -27,40 +27,35 @@ #define AVCODEC_GET_BITS_H #include -#include -#include -#include "libavutil/bswap.h" #include "libavutil/common.h" #include "libavutil/intreadwrite.h" #include "libavutil/log.h" #include "mathops.h" -#if defined(ALT_BITSTREAM_READER_LE) && !defined(ALT_BITSTREAM_READER) -# define ALT_BITSTREAM_READER -#endif - -#if !defined(A32_BITSTREAM_READER) && !defined(ALT_BITSTREAM_READER) -# if ARCH_ARM && !HAVE_FAST_UNALIGNED -# define A32_BITSTREAM_READER -# else -# define ALT_BITSTREAM_READER -//#define A32_BITSTREAM_READER -# endif +/* + * Safe bitstream reading: + * optionally, the get_bits API can check to ensure that we + * don't read past input buffer boundaries. This is protected + * with CONFIG_SAFE_BITSTREAM_READER at the global level, and + * then below that with UNCHECKED_BITSTREAM_READER at the per- + * decoder level. This means that decoders that check internally + * can "#define UNCHECKED_BITSTREAM_READER 1" to disable + * overread checks. + * Boundary checking causes a minor performance penalty so for + * applications that won't want/need this, it can be disabled + * globally using "#define CONFIG_SAFE_BITSTREAM_READER 0". + */ +#ifndef UNCHECKED_BITSTREAM_READER +#define UNCHECKED_BITSTREAM_READER !CONFIG_SAFE_BITSTREAM_READER #endif -/* bit input */ -/* buffer, buffer_end and size_in_bits must be present and used by every reader */ typedef struct GetBitContext { const uint8_t *buffer, *buffer_end; -#ifdef ALT_BITSTREAM_READER int index; -#elif defined A32_BITSTREAM_READER - uint32_t *buffer_ptr; - uint32_t cache0; - uint32_t cache1; - int bit_count; -#endif int size_in_bits; +#if !UNCHECKED_BITSTREAM_READER + int size_in_bits_plus8; +#endif } GetBitContext; #define VLC_TYPE int16_t @@ -85,13 +80,13 @@ getbitcontext OPEN_READER(name, gb) - loads gb into local variables + load gb into local variables CLOSE_READER(name, gb) - stores local vars in gb + store local vars in gb UPDATE_CACHE(name, gb) - refills the internal cache from the bitstream + refill the internal cache from the bitstream after this call at least MIN_CACHE_BITS will be available, GET_CACHE(name, gb) @@ -113,148 +108,94 @@ SKIP_COUNTER(name, gb, num) will increment the internal bit counter (see SKIP_CACHE & SKIP_BITS) -LAST_SKIP_CACHE(name, gb, num) - will remove the next num bits from the cache if it is needed for UPDATE_CACHE otherwise it will do nothing - LAST_SKIP_BITS(name, gb, num) - is equivalent to LAST_SKIP_CACHE; SKIP_COUNTER + like SKIP_BITS, to be used if next call is UPDATE_CACHE or CLOSE_READER for examples see get_bits, show_bits, skip_bits, get_vlc */ -#ifdef ALT_BITSTREAM_READER +#ifdef LONG_BITSTREAM_READER +# define MIN_CACHE_BITS 32 +#else # define MIN_CACHE_BITS 25 +#endif -# define OPEN_READER(name, gb) \ +#define OPEN_READER(name, gb) \ unsigned int name##_index = (gb)->index; \ unsigned int av_unused name##_cache = 0 -# define CLOSE_READER(name, gb) (gb)->index = name##_index +#define CLOSE_READER(name, gb) (gb)->index = name##_index -# ifdef ALT_BITSTREAM_READER_LE -# define UPDATE_CACHE(name, gb) \ - name##_cache = AV_RL32(((const uint8_t *)(gb)->buffer)+(name##_index>>3)) >> (name##_index&0x07) +#ifdef BITSTREAM_READER_LE -# define SKIP_CACHE(name, gb, num) name##_cache >>= (num) +# ifdef LONG_BITSTREAM_READER +# define UPDATE_CACHE(name, gb) name##_cache = \ + AV_RL64((gb)->buffer + (name##_index >> 3)) >> (name##_index & 7) # else -# define UPDATE_CACHE(name, gb) \ - name##_cache = AV_RB32(((const uint8_t *)(gb)->buffer)+(name##_index>>3)) << (name##_index&0x07) +# define UPDATE_CACHE(name, gb) name##_cache = \ + AV_RL32((gb)->buffer + (name##_index >> 3)) >> (name##_index & 7) +# endif -# define SKIP_CACHE(name, gb, num) name##_cache <<= (num) +# define SKIP_CACHE(name, gb, num) name##_cache >>= (num) + +#else + +# ifdef LONG_BITSTREAM_READER +# define UPDATE_CACHE(name, gb) name##_cache = \ + AV_RB64((gb)->buffer + (name##_index >> 3)) >> (32 - (name##_index & 7)) +# else +# define UPDATE_CACHE(name, gb) name##_cache = \ + AV_RB32((gb)->buffer + (name##_index >> 3)) << (name##_index & 7) # endif -// FIXME name? +# define SKIP_CACHE(name, gb, num) name##_cache <<= (num) + +#endif + +#if UNCHECKED_BITSTREAM_READER # define SKIP_COUNTER(name, gb, num) name##_index += (num) +#else +# define SKIP_COUNTER(name, gb, num) \ + name##_index = FFMIN((gb)->size_in_bits_plus8, name##_index + (num)) +#endif -# define SKIP_BITS(name, gb, num) do { \ +#define SKIP_BITS(name, gb, num) do { \ SKIP_CACHE(name, gb, num); \ SKIP_COUNTER(name, gb, num); \ } while (0) -# define LAST_SKIP_BITS(name, gb, num) SKIP_COUNTER(name, gb, num) -# define LAST_SKIP_CACHE(name, gb, num) +#define LAST_SKIP_BITS(name, gb, num) SKIP_COUNTER(name, gb, num) -# ifdef ALT_BITSTREAM_READER_LE +#ifdef BITSTREAM_READER_LE # define SHOW_UBITS(name, gb, num) zero_extend(name##_cache, num) - # define SHOW_SBITS(name, gb, num) sign_extend(name##_cache, num) -# else +#else # define SHOW_UBITS(name, gb, num) NEG_USR32(name##_cache, num) - # define SHOW_SBITS(name, gb, num) NEG_SSR32(name##_cache, num) -# endif +#endif -# define GET_CACHE(name, gb) ((uint32_t)name##_cache) +#define GET_CACHE(name, gb) ((uint32_t)name##_cache) -static inline int get_bits_count(const GetBitContext *s){ +static inline int get_bits_count(const GetBitContext *s) +{ return s->index; } static inline void skip_bits_long(GetBitContext *s, int n){ +#if UNCHECKED_BITSTREAM_READER s->index += n; -} - -#elif defined A32_BITSTREAM_READER - -# define MIN_CACHE_BITS 32 - -# define OPEN_READER(name, gb) \ - int name##_bit_count = (gb)->bit_count; \ - uint32_t name##_cache0 = (gb)->cache0; \ - uint32_t name##_cache1 = (gb)->cache1; \ - uint32_t *name##_buffer_ptr = (gb)->buffer_ptr - -# define CLOSE_READER(name, gb) do { \ - (gb)->bit_count = name##_bit_count; \ - (gb)->cache0 = name##_cache0; \ - (gb)->cache1 = name##_cache1; \ - (gb)->buffer_ptr = name##_buffer_ptr; \ - } while (0) - -# define UPDATE_CACHE(name, gb) do { \ - if(name##_bit_count > 0){ \ - const uint32_t next = av_be2ne32(*name##_buffer_ptr); \ - name##_cache0 |= NEG_USR32(next, name##_bit_count); \ - name##_cache1 |= next << name##_bit_count; \ - name##_buffer_ptr++; \ - name##_bit_count -= 32; \ - } \ - } while (0) - -#if ARCH_X86 -# define SKIP_CACHE(name, gb, num) \ - __asm__("shldl %2, %1, %0 \n\t" \ - "shll %2, %1 \n\t" \ - : "+r" (name##_cache0), "+r" (name##_cache1) \ - : "Ic" ((uint8_t)(num))) #else -# define SKIP_CACHE(name, gb, num) do { \ - name##_cache0 <<= (num); \ - name##_cache0 |= NEG_USR32(name##_cache1,num); \ - name##_cache1 <<= (num); \ - } while (0) + s->index += av_clip(n, -s->index, s->size_in_bits_plus8 - s->index); #endif - -# define SKIP_COUNTER(name, gb, num) name##_bit_count += (num) - -# define SKIP_BITS(name, gb, num) do { \ - SKIP_CACHE(name, gb, num); \ - SKIP_COUNTER(name, gb, num); \ - } while (0) - -# define LAST_SKIP_BITS(name, gb, num) SKIP_BITS(name, gb, num) -# define LAST_SKIP_CACHE(name, gb, num) SKIP_CACHE(name, gb, num) - -# define SHOW_UBITS(name, gb, num) NEG_USR32(name##_cache0, num) - -# define SHOW_SBITS(name, gb, num) NEG_SSR32(name##_cache0, num) - -# define GET_CACHE(name, gb) name##_cache0 - -static inline int get_bits_count(const GetBitContext *s) { - return ((uint8_t*)s->buffer_ptr - s->buffer)*8 - 32 + s->bit_count; } -static inline void skip_bits_long(GetBitContext *s, int n){ - OPEN_READER(re, s); - re_bit_count += n; - re_buffer_ptr += re_bit_count>>5; - re_bit_count &= 31; - re_cache0 = av_be2ne32(re_buffer_ptr[-1]) << re_bit_count; - re_cache1 = 0; - UPDATE_CACHE(re, s); - CLOSE_READER(re, s); -} - -#endif - /** * read mpeg1 dc style vlc (sign bit + mantisse with no MSB). * if MSB not set it is negative * @param n length in bits - * @author BERO */ -static inline int get_xbits(GetBitContext *s, int n){ +static inline int get_xbits(GetBitContext *s, int n) +{ register int sign; register int32_t cache; OPEN_READER(re, s); @@ -266,7 +207,8 @@ return (NEG_USR32(sign ^ cache, n) ^ sign) - sign; } -static inline int get_sbits(GetBitContext *s, int n){ +static inline int get_sbits(GetBitContext *s, int n) +{ register int tmp; OPEN_READER(re, s); UPDATE_CACHE(re, s); @@ -279,7 +221,8 @@ /** * Read 1-25 bits. */ -static inline unsigned int get_bits(GetBitContext *s, int n){ +static inline unsigned int get_bits(GetBitContext *s, int n) +{ register int tmp; OPEN_READER(re, s); UPDATE_CACHE(re, s); @@ -290,9 +233,10 @@ } /** - * Shows 1-25 bits. + * Show 1-25 bits. */ -static inline unsigned int show_bits(GetBitContext *s, int n){ +static inline unsigned int show_bits(GetBitContext *s, int n) +{ register int tmp; OPEN_READER(re, s); UPDATE_CACHE(re, s); @@ -300,49 +244,53 @@ return tmp; } -static inline void skip_bits(GetBitContext *s, int n){ - //Note gcc seems to optimize this to s->index+=n for the ALT_READER :)) +static inline void skip_bits(GetBitContext *s, int n) +{ OPEN_READER(re, s); UPDATE_CACHE(re, s); LAST_SKIP_BITS(re, s, n); CLOSE_READER(re, s); } -static inline unsigned int get_bits1(GetBitContext *s){ -#ifdef ALT_BITSTREAM_READER +static inline unsigned int get_bits1(GetBitContext *s) +{ unsigned int index = s->index; uint8_t result = s->buffer[index>>3]; -#ifdef ALT_BITSTREAM_READER_LE +#ifdef BITSTREAM_READER_LE result >>= index & 7; result &= 1; #else result <<= index & 7; result >>= 8 - 1; #endif - index++; +#if !UNCHECKED_BITSTREAM_READER + if (s->index < s->size_in_bits_plus8) +#endif + index++; s->index = index; return result; -#else - return get_bits(s, 1); -#endif } -static inline unsigned int show_bits1(GetBitContext *s){ +static inline unsigned int show_bits1(GetBitContext *s) +{ return show_bits(s, 1); } -static inline void skip_bits1(GetBitContext *s){ +static inline void skip_bits1(GetBitContext *s) +{ skip_bits(s, 1); } /** - * reads 0-32 bits. + * Read 0-32 bits. */ -static inline unsigned int get_bits_long(GetBitContext *s, int n){ - if (n <= MIN_CACHE_BITS) return get_bits(s, n); +static inline unsigned int get_bits_long(GetBitContext *s, int n) +{ + if (n <= MIN_CACHE_BITS) + return get_bits(s, n); else { -#ifdef ALT_BITSTREAM_READER_LE +#ifdef BITSTREAM_READER_LE int ret = get_bits(s, 16); return ret | (get_bits(s, n-16) << 16); #else @@ -353,17 +301,20 @@ } /** - * reads 0-32 bits as a signed integer. + * Read 0-32 bits as a signed integer. */ -static inline int get_sbits_long(GetBitContext *s, int n) { +static inline int get_sbits_long(GetBitContext *s, int n) +{ return sign_extend(get_bits_long(s, n), n); } /** - * shows 0-32 bits. + * Show 0-32 bits. */ -static inline unsigned int show_bits_long(GetBitContext *s, int n){ - if (n <= MIN_CACHE_BITS) return show_bits(s, n); +static inline unsigned int show_bits_long(GetBitContext *s, int n) +{ + if (n <= MIN_CACHE_BITS) + return show_bits(s, n); else { GetBitContext gb = *s; return get_bits_long(&gb, n); @@ -380,16 +331,13 @@ } /** - * init GetBitContext. - * @param buffer bitstream buffer, must be FF_INPUT_BUFFER_PADDING_SIZE bytes larger then the actual read bits + * Inititalize GetBitContext. + * @param buffer bitstream buffer, must be FF_INPUT_BUFFER_PADDING_SIZE bytes larger than the actual read bits * because some optimized bitstream readers read 32 or 64 bit at once and could read over the end * @param bit_size the size of the buffer in bits - * - * While GetBitContext stores the buffer size, for performance reasons you are - * responsible for checking for the buffer end yourself (take advantage of the padding)! */ -static inline void init_get_bits(GetBitContext *s, - const uint8_t *buffer, int bit_size) +static inline void init_get_bits(GetBitContext *s, const uint8_t *buffer, + int bit_size) { int buffer_size = (bit_size+7)>>3; if (buffer_size < 0 || bit_size < 0) { @@ -399,14 +347,11 @@ s->buffer = buffer; s->size_in_bits = bit_size; +#if !UNCHECKED_BITSTREAM_READER + s->size_in_bits_plus8 = bit_size + 8; +#endif s->buffer_end = buffer + buffer_size; -#ifdef ALT_BITSTREAM_READER s->index = 0; -#elif defined A32_BITSTREAM_READER - s->buffer_ptr = (uint32_t*)((intptr_t)buffer & ~3); - s->bit_count = 32 + 8*((intptr_t)buffer & 3); - skip_bits_long(s, 0); -#endif } static inline void align_get_bits(GetBitContext *s) @@ -442,12 +387,12 @@ /** - * * If the vlc code is invalid and max_depth=1, then no bits will be removed. * If the vlc code is invalid and max_depth>1, then the number of bits removed * is undefined. */ -#define GET_VLC(code, name, gb, table, bits, max_depth) do { \ +#define GET_VLC(code, name, gb, table, bits, max_depth) \ + do { \ int n, nb_bits; \ unsigned int index; \ \ @@ -478,7 +423,8 @@ SKIP_BITS(name, gb, n); \ } while (0) -#define GET_RL_VLC(level, run, name, gb, table, bits, max_depth, need_update) do { \ +#define GET_RL_VLC(level, run, name, gb, table, bits, max_depth, need_update) \ + do { \ int n, nb_bits; \ unsigned int index; \ \ @@ -504,7 +450,7 @@ /** - * parses a vlc code, faster then get_vlc() + * Parse a vlc code. * @param bits is the number of bits which will be read at once, must be * identical to nb_bits in init_vlc() * @param max_depth is the number of times bits bits must be read to completely @@ -512,7 +458,7 @@ * = (max_vlc_length + bits - 1) / bits */ static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE (*table)[2], - int bits, int max_depth) + int bits, int max_depth) { int code; @@ -525,7 +471,8 @@ return code; } -static inline int decode012(GetBitContext *gb){ +static inline int decode012(GetBitContext *gb) +{ int n; n = get_bits1(gb); if (n == 0) @@ -534,7 +481,8 @@ return get_bits1(gb) + 1; } -static inline int decode210(GetBitContext *gb){ +static inline int decode210(GetBitContext *gb) +{ if (get_bits1(gb)) return 0; else @@ -549,7 +497,8 @@ //#define TRACE #ifdef TRACE -static inline void print_bin(int bits, int n){ +static inline void print_bin(int bits, int n) +{ int i; for (i = n-1; i >= 0; i--) { @@ -560,7 +509,8 @@ } static inline int get_bits_trace(GetBitContext *s, int n, char *file, - const char *func, int line){ + const char *func, int line) +{ int r = get_bits(s, n); print_bin(r, n); @@ -570,7 +520,8 @@ } static inline int get_vlc_trace(GetBitContext *s, VLC_TYPE (*table)[2], int bits, int max_depth, char *file, - const char *func, int line){ + const char *func, int line) +{ int show = show_bits(s, 24); int pos = get_bits_count(s); int r = get_vlc2(s, table, bits, max_depth); @@ -584,7 +535,8 @@ return r; } static inline int get_xbits_trace(GetBitContext *s, int n, char *file, - const char *func, int line){ + const char *func, int line) +{ int show = show_bits(s, n); int r = get_xbits(s, n); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/gif.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/gif.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/gif.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/gif.c 2012-01-11 00:34:30.000000000 +0000 @@ -167,13 +167,13 @@ } AVCodec ff_gif_encoder = { - "gif", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_GIF, - sizeof(GIFContext), - gif_encode_init, - gif_encode_frame, - gif_encode_close, + .name = "gif", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_GIF, + .priv_data_size = sizeof(GIFContext), + .init = gif_encode_init, + .encode = gif_encode_frame, + .close = gif_encode_close, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_RGB8, PIX_FMT_BGR8, PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, PIX_FMT_GRAY8, PIX_FMT_PAL8, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/gifdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/gifdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/gifdec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/gifdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -96,11 +96,11 @@ n = (1 << bits_per_pixel); spal = palette; for(i = 0; i < n; i++) { - s->image_palette[i] = (0xff << 24) | AV_RB24(spal); + s->image_palette[i] = (0xffu << 24) | AV_RB24(spal); spal += 3; } for(; i < 256; i++) - s->image_palette[i] = (0xff << 24); + s->image_palette[i] = (0xffu << 24); /* handle transparency */ if (s->transparent_color_index >= 0) s->image_palette[s->transparent_color_index] = 0; @@ -326,14 +326,13 @@ } AVCodec ff_gif_decoder = { - "gif", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_GIF, - sizeof(GifState), - gif_decode_init, - NULL, - gif_decode_close, - gif_decode_frame, - CODEC_CAP_DR1, + .name = "gif", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_GIF, + .priv_data_size = sizeof(GifState), + .init = gif_decode_init, + .close = gif_decode_close, + .decode = gif_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/golomb.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/golomb.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/golomb.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/golomb.h 2012-01-11 00:34:30.000000000 +0000 @@ -75,6 +75,20 @@ } } +/** + * Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1. + */ +static inline unsigned get_ue_golomb_long(GetBitContext *gb) +{ + unsigned buf, log; + + buf = show_bits_long(gb, 32); + log = 31 - av_log2(buf); + skip_bits_long(gb, log); + + return get_bits_long(gb, log + 1) - 1; +} + /** * read unsigned exp golomb code, constraint to a max of 31. * the return value is undefined if the stored value exceeds 31. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/gsmdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/gsmdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/gsmdec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/gsmdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -32,6 +32,8 @@ static av_cold int gsm_init(AVCodecContext *avctx) { + GSMContext *s = avctx->priv_data; + avctx->channels = 1; if (!avctx->sample_rate) avctx->sample_rate = 8000; @@ -47,24 +49,34 @@ avctx->block_align = GSM_MS_BLOCK_SIZE; } + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } static int gsm_decode_frame(AVCodecContext *avctx, void *data, - int *data_size, AVPacket *avpkt) + int *got_frame_ptr, AVPacket *avpkt) { + GSMContext *s = avctx->priv_data; int res; GetBitContext gb; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - int16_t *samples = data; - int frame_bytes = 2 * avctx->frame_size; + int16_t *samples; - if (*data_size < frame_bytes) - return -1; - *data_size = 0; - if(buf_size < avctx->block_align) + if (buf_size < avctx->block_align) { + av_log(avctx, AV_LOG_ERROR, "Packet is too small\n"); return AVERROR_INVALIDDATA; + } + + /* get output buffer */ + s->frame.nb_samples = avctx->frame_size; + if ((res = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return res; + } + samples = (int16_t *)s->frame.data[0]; switch (avctx->codec_id) { case CODEC_ID_GSM: @@ -80,30 +92,39 @@ if (res < 0) return res; } - *data_size = frame_bytes; + + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return avctx->block_align; } +static void gsm_flush(AVCodecContext *avctx) +{ + GSMContext *s = avctx->priv_data; + memset(s, 0, sizeof(*s)); +} + AVCodec ff_gsm_decoder = { - "gsm", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_GSM, - sizeof(GSMContext), - gsm_init, - NULL, - NULL, - gsm_decode_frame, + .name = "gsm", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_GSM, + .priv_data_size = sizeof(GSMContext), + .init = gsm_init, + .decode = gsm_decode_frame, + .flush = gsm_flush, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("GSM"), }; AVCodec ff_gsm_ms_decoder = { - "gsm_ms", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_GSM_MS, - sizeof(GSMContext), - gsm_init, - NULL, - NULL, - gsm_decode_frame, + .name = "gsm_ms", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_GSM_MS, + .priv_data_size = sizeof(GSMContext), + .init = gsm_init, + .decode = gsm_decode_frame, + .flush = gsm_flush, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("GSM Microsoft variant"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/gsmdec_data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/gsmdec_data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/gsmdec_data.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/gsmdec_data.h 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,7 @@ #define AVCODEC_GSMDEC_DATA #include +#include "avcodec.h" // input and output sizes in byte #define GSM_BLOCK_SIZE 33 @@ -30,6 +31,7 @@ #define GSM_FRAME_SIZE 160 typedef struct { + AVFrame frame; // Contains first 120 elements from the previous frame // (used by long_term_synth according to the "lag"), // then in the following 160 elements the current diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h261dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h261dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h261dec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h261dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -97,7 +97,7 @@ } /** - * decodes the group of blocks header or slice header. + * Decode the group of blocks header or slice header. * @return <0 if an error occurred */ static int h261_decode_gob_header(H261Context *h){ @@ -136,7 +136,7 @@ if(s->qscale==0) { av_log(s->avctx, AV_LOG_ERROR, "qscale has forbidden 0 value\n"); - if (s->avctx->error_recognition >= FF_ER_COMPLIANT) + if (s->avctx->err_recognition & AV_EF_BITSTREAM) return -1; } @@ -150,7 +150,7 @@ } /** - * decodes the group of blocks / video packet header. + * Decode the group of blocks / video packet header. * @return <0 if no resync found */ static int ff_h261_resync(H261Context *h){ @@ -191,7 +191,7 @@ } /** - * decodes skipped macroblocks + * Decode skipped macroblocks. * @return 0 */ static int h261_decode_mb_skipped(H261Context *h, int mba1, int mba2 ) @@ -215,7 +215,7 @@ s->mv_dir = MV_DIR_FORWARD; s->mv_type = MV_TYPE_16X16; - s->current_picture.mb_type[xy]= MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; s->mv[0][0][0] = 0; s->mv[0][0][1] = 0; s->mb_skipped = 1; @@ -323,14 +323,14 @@ } if(s->mb_intra){ - s->current_picture.mb_type[xy]= MB_TYPE_INTRA; + s->current_picture.f.mb_type[xy] = MB_TYPE_INTRA; goto intra; } //set motion vectors s->mv_dir = MV_DIR_FORWARD; s->mv_type = MV_TYPE_16X16; - s->current_picture.mb_type[xy]= MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0; s->mv[0][0][0] = h->current_mv_x * 2;//gets divided by 2 in motion compensation s->mv[0][0][1] = h->current_mv_y * 2; @@ -355,7 +355,7 @@ } /** - * decodes a macroblock + * Decode a macroblock. * @return <0 if an error occurred */ static int h261_decode_block(H261Context * h, DCTELEM * block, @@ -437,7 +437,7 @@ } /** - * decodes the H261 picture header. + * Decode the H.261 picture header. * @return <0 if no startcode found */ static int h261_decode_picture_header(H261Context *h){ @@ -464,7 +464,7 @@ s->picture_number = (s->picture_number&~31) + i; s->avctx->time_base= (AVRational){1001, 30000}; - s->current_picture.pts= s->picture_number; + s->current_picture.f.pts = s->picture_number; /* PTYPE starts here */ @@ -570,8 +570,10 @@ } //we need to set current_picture_ptr before reading the header, otherwise we cannot store anyting im there - if(s->current_picture_ptr==NULL || s->current_picture_ptr->data[0]){ + if (s->current_picture_ptr == NULL || s->current_picture_ptr->f.data[0]) { int i= ff_find_unused_picture(s, 0); + if (i < 0) + return i; s->current_picture_ptr= &s->picture[i]; } @@ -596,8 +598,8 @@ } // for skipping the frame - s->current_picture.pict_type= s->pict_type; - s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I; + s->current_picture.f.pict_type = s->pict_type; + s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I; if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B) ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I) @@ -620,8 +622,8 @@ } MPV_frame_end(s); -assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type); -assert(s->current_picture.pict_type == s->pict_type); +assert(s->current_picture.f.pict_type == s->current_picture_ptr->f.pict_type); +assert(s->current_picture.f.pict_type == s->pict_type); *pict= *(AVFrame*)s->current_picture_ptr; ff_print_debug_info(s, pict); @@ -640,15 +642,14 @@ } AVCodec ff_h261_decoder = { - "h261", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_H261, - sizeof(H261Context), - h261_decode_init, - NULL, - h261_decode_end, - h261_decode_frame, - CODEC_CAP_DR1, + .name = "h261", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_H261, + .priv_data_size = sizeof(H261Context), + .init = h261_decode_init, + .close = h261_decode_end, + .decode = h261_decode_frame, + .capabilities = CODEC_CAP_DR1, .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("H.261"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h261enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h261enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h261enc.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h261enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -53,7 +53,7 @@ H261Context * h = (H261Context *) s; int format, temp_ref; - align_put_bits(&s->pb); + avpriv_align_put_bits(&s->pb); /* Update the pointer to last GOB */ s->ptr_lastgob = put_bits_ptr(&s->pb); @@ -251,7 +251,7 @@ /** - * encodes a 8x8 block. + * Encode an 8x8 block. * @param block the 8x8 block * @param n block index (0-3 are luma, 4-5 are chroma) */ @@ -322,13 +322,13 @@ } AVCodec ff_h261_encoder = { - "h261", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_H261, - sizeof(H261Context), - MPV_encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "h261", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_H261, + .priv_data_size = sizeof(H261Context), + .init = MPV_encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("H.261"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h261_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h261_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h261_parser.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h261_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -82,9 +82,8 @@ } AVCodecParser ff_h261_parser = { - { CODEC_ID_H261 }, - sizeof(ParseContext), - NULL, - h261_parse, - ff_parse_close, + .codec_ids = { CODEC_ID_H261 }, + .priv_data_size = sizeof(ParseContext), + .parser_parse = h261_parse, + .parser_close = ff_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h263.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h263.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h263.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h263.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * H263/MPEG4 backend for ffmpeg encoder and decoder + * H263/MPEG4 backend for encoder and decoder * Copyright (c) 2000,2001 Fabrice Bellard * H263+ support. * Copyright (c) 2001 Juan J. Sierralta P @@ -52,7 +52,7 @@ const int wrap = s->b8_stride; const int xy = s->block_index[0]; - s->current_picture.mbskip_table[mb_xy]= s->mb_skipped; + s->current_picture.f.mbskip_table[mb_xy] = s->mb_skipped; if(s->mv_type != MV_TYPE_8X8){ int motion_x, motion_y; @@ -71,30 +71,30 @@ s->p_field_mv_table[i][0][mb_xy][0]= s->mv[0][i][0]; s->p_field_mv_table[i][0][mb_xy][1]= s->mv[0][i][1]; } - s->current_picture.ref_index[0][4*mb_xy ]= - s->current_picture.ref_index[0][4*mb_xy + 1]= s->field_select[0][0]; - s->current_picture.ref_index[0][4*mb_xy + 2]= - s->current_picture.ref_index[0][4*mb_xy + 3]= s->field_select[0][1]; + s->current_picture.f.ref_index[0][4*mb_xy ] = + s->current_picture.f.ref_index[0][4*mb_xy + 1] = s->field_select[0][0]; + s->current_picture.f.ref_index[0][4*mb_xy + 2] = + s->current_picture.f.ref_index[0][4*mb_xy + 3] = s->field_select[0][1]; } /* no update if 8X8 because it has been done during parsing */ - s->current_picture.motion_val[0][xy][0] = motion_x; - s->current_picture.motion_val[0][xy][1] = motion_y; - s->current_picture.motion_val[0][xy + 1][0] = motion_x; - s->current_picture.motion_val[0][xy + 1][1] = motion_y; - s->current_picture.motion_val[0][xy + wrap][0] = motion_x; - s->current_picture.motion_val[0][xy + wrap][1] = motion_y; - s->current_picture.motion_val[0][xy + 1 + wrap][0] = motion_x; - s->current_picture.motion_val[0][xy + 1 + wrap][1] = motion_y; + s->current_picture.f.motion_val[0][xy][0] = motion_x; + s->current_picture.f.motion_val[0][xy][1] = motion_y; + s->current_picture.f.motion_val[0][xy + 1][0] = motion_x; + s->current_picture.f.motion_val[0][xy + 1][1] = motion_y; + s->current_picture.f.motion_val[0][xy + wrap][0] = motion_x; + s->current_picture.f.motion_val[0][xy + wrap][1] = motion_y; + s->current_picture.f.motion_val[0][xy + 1 + wrap][0] = motion_x; + s->current_picture.f.motion_val[0][xy + 1 + wrap][1] = motion_y; } if(s->encoding){ //FIXME encoding MUST be cleaned up if (s->mv_type == MV_TYPE_8X8) - s->current_picture.mb_type[mb_xy]= MB_TYPE_L0 | MB_TYPE_8x8; + s->current_picture.f.mb_type[mb_xy] = MB_TYPE_L0 | MB_TYPE_8x8; else if(s->mb_intra) - s->current_picture.mb_type[mb_xy]= MB_TYPE_INTRA; + s->current_picture.f.mb_type[mb_xy] = MB_TYPE_INTRA; else - s->current_picture.mb_type[mb_xy]= MB_TYPE_L0 | MB_TYPE_16x16; + s->current_picture.f.mb_type[mb_xy] = MB_TYPE_L0 | MB_TYPE_16x16; } } @@ -154,7 +154,7 @@ Diag Top Left Center */ - if(!IS_SKIP(s->current_picture.mb_type[xy])){ + if (!IS_SKIP(s->current_picture.f.mb_type[xy])) { qp_c= s->qscale; s->dsp.h263_v_loop_filter(dest_y+8*linesize , linesize, qp_c); s->dsp.h263_v_loop_filter(dest_y+8*linesize+8, linesize, qp_c); @@ -164,10 +164,10 @@ if(s->mb_y){ int qp_dt, qp_tt, qp_tc; - if(IS_SKIP(s->current_picture.mb_type[xy-s->mb_stride])) + if (IS_SKIP(s->current_picture.f.mb_type[xy - s->mb_stride])) qp_tt=0; else - qp_tt= s->current_picture.qscale_table[xy-s->mb_stride]; + qp_tt = s->current_picture.f.qscale_table[xy - s->mb_stride]; if(qp_c) qp_tc= qp_c; @@ -187,10 +187,10 @@ s->dsp.h263_h_loop_filter(dest_y-8*linesize+8 , linesize, qp_tt); if(s->mb_x){ - if(qp_tt || IS_SKIP(s->current_picture.mb_type[xy-1-s->mb_stride])) + if (qp_tt || IS_SKIP(s->current_picture.f.mb_type[xy - 1 - s->mb_stride])) qp_dt= qp_tt; else - qp_dt= s->current_picture.qscale_table[xy-1-s->mb_stride]; + qp_dt = s->current_picture.f.qscale_table[xy - 1 - s->mb_stride]; if(qp_dt){ const int chroma_qp= s->chroma_qscale_table[qp_dt]; @@ -209,10 +209,10 @@ if(s->mb_x){ int qp_lc; - if(qp_c || IS_SKIP(s->current_picture.mb_type[xy-1])) + if (qp_c || IS_SKIP(s->current_picture.f.mb_type[xy - 1])) qp_lc= qp_c; else - qp_lc= s->current_picture.qscale_table[xy-1]; + qp_lc = s->current_picture.f.qscale_table[xy - 1]; if(qp_lc){ s->dsp.h263_h_loop_filter(dest_y, linesize, qp_lc); @@ -321,7 +321,7 @@ static const int off[4]= {2, 1, 1, -1}; wrap = s->b8_stride; - mot_val = s->current_picture.motion_val[dir] + s->block_index[block]; + mot_val = s->current_picture.f.motion_val[dir] + s->block_index[block]; A = mot_val[ - 1]; /* special case for first (slice) line */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h263dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h263dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h263dec.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h263dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -91,6 +91,8 @@ break; case CODEC_ID_VC1: case CODEC_ID_WMV3: + case CODEC_ID_VC1IMAGE: + case CODEC_ID_WMV3IMAGE: s->h263_pred = 1; s->msmpeg4_version=6; avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; @@ -125,7 +127,7 @@ } /** - * returns the number of bytes consumed for building the current frame + * Return the number of bytes consumed for building the current frame. */ static int get_consumed_bytes(MpegEncContext *s, int buf_size){ int pos= (get_bits_count(&s->gb)+7)>>3; @@ -146,7 +148,7 @@ } static int decode_slice(MpegEncContext *s){ - const int part_mask= s->partitioned_frame ? (AC_END|AC_ERROR) : 0x7F; + const int part_mask= s->partitioned_frame ? (ER_AC_END|ER_AC_ERROR) : 0x7F; const int mb_size= 16>>s->avctx->lowres; s->last_resync_gb= s->gb; s->first_slice_line= 1; @@ -182,7 +184,7 @@ /* per-row end of slice checks */ if(s->msmpeg4_version){ if(s->resync_mb_y + s->slice_height == s->mb_y){ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END|DC_END|MV_END); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END); return 0; } @@ -223,7 +225,7 @@ ff_h263_loop_filter(s); //printf("%d %d %d %06X\n", s->mb_x, s->mb_y, s->gb.size*8 - get_bits_count(&s->gb), show_bits(&s->gb, 24)); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_END&part_mask); s->padding_bug_score--; @@ -236,11 +238,11 @@ return 0; }else if(ret==SLICE_NOEND){ av_log(s->avctx, AV_LOG_ERROR, "Slice mismatch at MB: %d\n", xy); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x+1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x+1, s->mb_y, ER_MB_END&part_mask); return -1; } av_log(s->avctx, AV_LOG_ERROR, "Error at MB: %d\n", xy); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR&part_mask); return -1; } @@ -308,7 +310,7 @@ max_extra+= 17; /* buggy padding but the frame should still end approximately at the bitstream end */ - if((s->workaround_bugs&FF_BUG_NO_PADDING) && s->error_recognition>=3) + if((s->workaround_bugs&FF_BUG_NO_PADDING) && (s->err_recognition&AV_EF_BUFFER)) max_extra+= 48; else if((s->workaround_bugs&FF_BUG_NO_PADDING)) max_extra+= 256*256*256*64; @@ -319,7 +321,7 @@ else if(left<0){ av_log(s->avctx, AV_LOG_ERROR, "overreading %d bits\n", -left); }else - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END|DC_END|MV_END); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END); return 0; } @@ -328,7 +330,7 @@ get_bits_left(&s->gb), show_bits(&s->gb, 24), s->padding_bug_score); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_END&part_mask); return -1; } @@ -394,8 +396,10 @@ /* We need to set current_picture_ptr before reading the header, * otherwise we cannot store anyting in there */ - if(s->current_picture_ptr==NULL || s->current_picture_ptr->data[0]){ + if (s->current_picture_ptr == NULL || s->current_picture_ptr->f.data[0]) { int i= ff_find_unused_picture(s, 0); + if (i < 0) + return i; s->current_picture_ptr= &s->picture[i]; } @@ -581,8 +585,8 @@ s->gob_index = ff_h263_get_gob_height(s); // for skipping the frame - s->current_picture.pict_type= s->pict_type; - s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I; + s->current_picture.f.pict_type = s->pict_type; + s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I; /* skip B-frames if we don't have reference frames */ if(s->last_picture_ptr==NULL && (s->pict_type==AV_PICTURE_TYPE_B || s->dropable)) return get_consumed_bytes(s, buf_size); @@ -638,7 +642,7 @@ s->mb_x=0; s->mb_y=0; - decode_slice(s); + ret = decode_slice(s); while(s->mb_ymb_height){ if(s->msmpeg4_version){ if(s->slice_height==0 || s->mb_x!=0 || (s->mb_y%s->slice_height)!=0 || get_bits_count(&s->gb) > s->gb.size_in_bits) @@ -654,12 +658,12 @@ if(s->msmpeg4_version<4 && s->h263_pred) ff_mpeg4_clean_buffers(s); - decode_slice(s); + if (decode_slice(s) < 0) ret = AVERROR_INVALIDDATA; } if (s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type==AV_PICTURE_TYPE_I) if(!CONFIG_MSMPEG4_DECODER || msmpeg4_decode_ext_header(s, buf_size) < 0){ - s->error_status_table[s->mb_num-1]= AC_ERROR|DC_ERROR|MV_ERROR; + s->error_status_table[s->mb_num-1]= ER_MB_ERROR; } assert(s->bitstream_buffer_size==0); @@ -705,8 +709,8 @@ MPV_frame_end(s); -assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type); -assert(s->current_picture.pict_type == s->pict_type); + assert(s->current_picture.f.pict_type == s->current_picture_ptr->f.pict_type); + assert(s->current_picture.f.pict_type == s->pict_type); if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { *pict= *(AVFrame*)s->current_picture_ptr; } else if (s->last_picture_ptr != NULL) { @@ -722,19 +726,18 @@ av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time); #endif - return get_consumed_bytes(s, buf_size); + return (ret && (avctx->err_recognition & AV_EF_EXPLODE))?ret:get_consumed_bytes(s, buf_size); } AVCodec ff_h263_decoder = { - "h263", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_H263, - sizeof(MpegEncContext), - ff_h263_decode_init, - NULL, - ff_h263_decode_end, - ff_h263_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, + .name = "h263", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_H263, + .priv_data_size = sizeof(MpegEncContext), + .init = ff_h263_decode_init, + .close = ff_h263_decode_end, + .decode = ff_h263_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, .flush= ff_mpeg_flush, .max_lowres= 3, .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h263.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h263.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h263.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h263.h 2012-01-11 00:34:30.000000000 +0000 @@ -200,48 +200,6 @@ return cbp; } -static inline int get_b_cbp(MpegEncContext * s, DCTELEM block[6][64], - int motion_x, int motion_y, int mb_type){ - int cbp=0, i; - - if(s->flags & CODEC_FLAG_CBP_RD){ - int score=0; - const int lambda= s->lambda2 >> (FF_LAMBDA_SHIFT - 6); - - for(i=0; i<6; i++){ - if(s->coded_score[i] < 0){ - score += s->coded_score[i]; - cbp |= 1 << (5 - i); - } - } - - if(cbp){ - int zero_score= -6; - if ((motion_x | motion_y | s->dquant | mb_type) == 0){ - zero_score-= 4; //2*MV + mb_type + cbp bit - } - - zero_score*= lambda; - if(zero_score <= score){ - cbp=0; - } - } - - for (i = 0; i < 6; i++) { - if (s->block_last_index[i] >= 0 && ((cbp >> (5 - i))&1)==0 ){ - s->block_last_index[i]= -1; - s->dsp.clear_block(s->block[i]); - } - } - }else{ - for (i = 0; i < 6; i++) { - if (s->block_last_index[i] >= 0) - cbp |= 1 << (5 - i); - } - } - return cbp; -} - static inline void memsetw(short *tab, int val, int n) { int i; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h263_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h263_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h263_parser.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h263_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -84,9 +84,8 @@ } AVCodecParser ff_h263_parser = { - { CODEC_ID_H263 }, - sizeof(ParseContext), - NULL, - h263_parse, - ff_parse_close, + .codec_ids = { CODEC_ID_H263 }, + .priv_data_size = sizeof(ParseContext), + .parser_parse = h263_parse, + .parser_close = ff_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264.c 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264.c 2012-01-11 00:34:30.000000000 +0000 @@ -56,21 +56,14 @@ static const enum PixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] = { PIX_FMT_DXVA2_VLD, PIX_FMT_VAAPI_VLD, + PIX_FMT_VDA_VLD, PIX_FMT_YUVJ420P, PIX_FMT_NONE }; -void ff_h264_write_back_intra_pred_mode(H264Context *h){ - int8_t *mode= h->intra4x4_pred_mode + h->mb2br_xy[h->mb_xy]; - - AV_COPY32(mode, h->intra4x4_pred_mode_cache + 4 + 8*4); - mode[4]= h->intra4x4_pred_mode_cache[7+8*3]; - mode[5]= h->intra4x4_pred_mode_cache[7+8*2]; - mode[6]= h->intra4x4_pred_mode_cache[7+8*1]; -} - /** - * checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks. + * Check if the top & left blocks are available if needed and + * change the dc mode so it only uses the available blocks. */ int ff_h264_check_intra4x4_pred_mode(H264Context *h){ MpegEncContext * const s = &h->s; @@ -109,7 +102,8 @@ } //FIXME cleanup like ff_h264_check_intra_pred_mode /** - * checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks. + * Check if the top & left blocks are available if needed and + * change the dc mode so it only uses the available blocks. */ int ff_h264_check_intra_pred_mode(H264Context *h, int mode){ MpegEncContext * const s = &h->s; @@ -270,8 +264,8 @@ // Error resilience puts the current picture in the ref list. // Don't try to wait on these as it will cause a deadlock. // Fields can wait on each other, though. - if(ref->thread_opaque != s->current_picture.thread_opaque || - (ref->reference&3) != s->picture_structure) { + if (ref->f.thread_opaque != s->current_picture.f.thread_opaque || + (ref->f.reference & 3) != s->picture_structure) { my = get_lowest_part_list_y(h, ref, n, height, y_offset, 0); if (refs[0][ref_n] < 0) nrefs[0] += 1; refs[0][ref_n] = FFMAX(refs[0][ref_n], my); @@ -282,8 +276,8 @@ int ref_n = h->ref_cache[1][ scan8[n] ]; Picture *ref= &h->ref_list[1][ref_n]; - if(ref->thread_opaque != s->current_picture.thread_opaque || - (ref->reference&3) != s->picture_structure) { + if (ref->f.thread_opaque != s->current_picture.f.thread_opaque || + (ref->f.reference & 3) != s->picture_structure) { my = get_lowest_part_list_y(h, ref, n, height, y_offset, 1); if (refs[1][ref_n] < 0) nrefs[1] += 1; refs[1][ref_n] = FFMAX(refs[1][ref_n], my); @@ -299,7 +293,7 @@ static void await_references(H264Context *h){ MpegEncContext * const s = &h->s; const int mb_xy= h->mb_xy; - const int mb_type= s->current_picture.mb_type[mb_xy]; + const int mb_type = s->current_picture.f.mb_type[mb_xy]; int refs[2][48]; int nrefs[2] = {0}; int ref, list; @@ -359,7 +353,7 @@ int row = refs[list][ref]; if(row >= 0){ Picture *ref_pic = &h->ref_list[list][ref]; - int ref_field = ref_pic->reference - 1; + int ref_field = ref_pic->f.reference - 1; int ref_field_picture = ref_pic->field_picture; int pic_height = 16*s->mb_height >> ref_field_picture; @@ -447,17 +441,20 @@ } #endif -static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square, int chroma_height, int delta, int list, - uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, - int src_x_offset, int src_y_offset, - qpel_mc_func *qpix_op, h264_chroma_mc_func chroma_op, - int pixel_shift, int chroma444){ +static av_always_inline void +mc_dir_part(H264Context *h, Picture *pic, int n, int square, + int height, int delta, int list, + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, + int src_x_offset, int src_y_offset, + qpel_mc_func *qpix_op, h264_chroma_mc_func chroma_op, + int pixel_shift, int chroma_idc) +{ MpegEncContext * const s = &h->s; const int mx= h->mv_cache[list][ scan8[n] ][0] + src_x_offset*8; int my= h->mv_cache[list][ scan8[n] ][1] + src_y_offset*8; const int luma_xy= (mx&3) + ((my&3)<<2); int offset = ((mx>>2) << pixel_shift) + (my>>2)*h->mb_linesize; - uint8_t * src_y = pic->data[0] + offset; + uint8_t * src_y = pic->f.data[0] + offset; uint8_t * src_cb, * src_cr; int extra_width= h->emu_edge_width; int extra_height= h->emu_edge_height; @@ -466,6 +463,7 @@ const int full_my= my>>2; const int pic_width = 16*s->mb_width; const int pic_height = 16*s->mb_height >> MB_FIELD; + int ysh; if(mx&7) extra_width -= 3; if(my&7) extra_height -= 3; @@ -474,7 +472,8 @@ || full_my < 0-extra_height || full_mx + 16/*FIXME*/ > pic_width + extra_width || full_my + 16/*FIXME*/ > pic_height + extra_height){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_y - (2 << pixel_shift) - 2*h->mb_linesize, h->mb_linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, pic_width, pic_height); + s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_y - (2 << pixel_shift) - 2*h->mb_linesize, h->mb_linesize, + 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, pic_width, pic_height); src_y= s->edge_emu_buffer + (2 << pixel_shift) + 2*h->mb_linesize; emu=1; } @@ -486,8 +485,8 @@ if(CONFIG_GRAY && s->flags&CODEC_FLAG_GRAY) return; - if(chroma444){ - src_cb = pic->data[1] + offset; + if(chroma_idc == 3 /* yuv444 */){ + src_cb = pic->f.data[1] + offset; if(emu){ s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cb - (2 << pixel_shift) - 2*h->mb_linesize, h->mb_linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, pic_width, pic_height); @@ -498,7 +497,7 @@ qpix_op[luma_xy](dest_cb + delta, src_cb + delta, h->mb_linesize); } - src_cr = pic->data[2] + offset; + src_cr = pic->f.data[2] + offset; if(emu){ s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cr - (2 << pixel_shift) - 2*h->mb_linesize, h->mb_linesize, 16+5, 16+5/*FIXME*/, full_mx-2, full_my-2, pic_width, pic_height); @@ -511,42 +510,55 @@ return; } - if(MB_FIELD){ + ysh = 3 - (chroma_idc == 2 /* yuv422 */); + if(chroma_idc == 1 /* yuv420 */ && MB_FIELD){ // chroma offset when predicting from a field of opposite parity - my += 2 * ((s->mb_y & 1) - (pic->reference - 1)); + my += 2 * ((s->mb_y & 1) - (pic->f.reference - 1)); emu |= (my>>3) < 0 || (my>>3) + 8 >= (pic_height>>1); } - src_cb= pic->data[1] + ((mx>>3) << pixel_shift) + (my>>3)*h->mb_uvlinesize; - src_cr= pic->data[2] + ((mx>>3) << pixel_shift) + (my>>3)*h->mb_uvlinesize; + + src_cb = pic->f.data[1] + ((mx >> 3) << pixel_shift) + (my >> ysh) * h->mb_uvlinesize; + src_cr = pic->f.data[2] + ((mx >> 3) << pixel_shift) + (my >> ysh) * h->mb_uvlinesize; if(emu){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cb, h->mb_uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), pic_width>>1, pic_height>>1); + s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cb, h->mb_uvlinesize, + 9, 8 * chroma_idc + 1, (mx >> 3), (my >> ysh), + pic_width >> 1, pic_height >> (chroma_idc == 1 /* yuv420 */)); src_cb= s->edge_emu_buffer; } - chroma_op(dest_cb, src_cb, h->mb_uvlinesize, chroma_height, mx&7, my&7); + chroma_op(dest_cb, src_cb, h->mb_uvlinesize, height >> (chroma_idc == 1 /* yuv420 */), + mx&7, (my << (chroma_idc == 2 /* yuv422 */)) &7); if(emu){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cr, h->mb_uvlinesize, 9, 9/*FIXME*/, (mx>>3), (my>>3), pic_width>>1, pic_height>>1); + s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cr, h->mb_uvlinesize, + 9, 8 * chroma_idc + 1, (mx >> 3), (my >> ysh), + pic_width >> 1, pic_height >> (chroma_idc == 1 /* yuv420 */)); src_cr= s->edge_emu_buffer; } - chroma_op(dest_cr, src_cr, h->mb_uvlinesize, chroma_height, mx&7, my&7); + chroma_op(dest_cr, src_cr, h->mb_uvlinesize, height >> (chroma_idc == 1 /* yuv420 */), + mx&7, (my << (chroma_idc == 2 /* yuv422 */)) &7); } -static inline void mc_part_std(H264Context *h, int n, int square, int chroma_height, int delta, - uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, - int x_offset, int y_offset, - qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, - qpel_mc_func *qpix_avg, h264_chroma_mc_func chroma_avg, - int list0, int list1, int pixel_shift, int chroma444){ +static av_always_inline void +mc_part_std(H264Context *h, int n, int square, int height, int delta, + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, + int x_offset, int y_offset, + qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, + qpel_mc_func *qpix_avg, h264_chroma_mc_func chroma_avg, + int list0, int list1, int pixel_shift, int chroma_idc) +{ MpegEncContext * const s = &h->s; qpel_mc_func *qpix_op= qpix_put; h264_chroma_mc_func chroma_op= chroma_put; dest_y += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize; - if(chroma444){ + if (chroma_idc == 3 /* yuv444 */) { dest_cb += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize; dest_cr += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize; - }else{ + } else if (chroma_idc == 2 /* yuv422 */) { + dest_cb += ( x_offset << pixel_shift) + 2*y_offset*h->mb_uvlinesize; + dest_cr += ( x_offset << pixel_shift) + 2*y_offset*h->mb_uvlinesize; + } else /* yuv420 */ { dest_cb += ( x_offset << pixel_shift) + y_offset*h->mb_uvlinesize; dest_cr += ( x_offset << pixel_shift) + y_offset*h->mb_uvlinesize; } @@ -555,9 +567,9 @@ if(list0){ Picture *ref= &h->ref_list[0][ h->ref_cache[0][ scan8[n] ] ]; - mc_dir_part(h, ref, n, square, chroma_height, delta, 0, + mc_dir_part(h, ref, n, square, height, delta, 0, dest_y, dest_cb, dest_cr, x_offset, y_offset, - qpix_op, chroma_op, pixel_shift, chroma444); + qpix_op, chroma_op, pixel_shift, chroma_idc); qpix_op= qpix_avg; chroma_op= chroma_avg; @@ -565,28 +577,36 @@ if(list1){ Picture *ref= &h->ref_list[1][ h->ref_cache[1][ scan8[n] ] ]; - mc_dir_part(h, ref, n, square, chroma_height, delta, 1, + mc_dir_part(h, ref, n, square, height, delta, 1, dest_y, dest_cb, dest_cr, x_offset, y_offset, - qpix_op, chroma_op, pixel_shift, chroma444); + qpix_op, chroma_op, pixel_shift, chroma_idc); } } -static inline void mc_part_weighted(H264Context *h, int n, int square, int chroma_height, int delta, - uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, - int x_offset, int y_offset, - qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, - h264_weight_func luma_weight_op, h264_weight_func chroma_weight_op, - h264_biweight_func luma_weight_avg, h264_biweight_func chroma_weight_avg, - int list0, int list1, int pixel_shift, int chroma444){ +static av_always_inline void +mc_part_weighted(H264Context *h, int n, int square, int height, int delta, + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, + int x_offset, int y_offset, + qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, + h264_weight_func luma_weight_op, h264_weight_func chroma_weight_op, + h264_biweight_func luma_weight_avg, h264_biweight_func chroma_weight_avg, + int list0, int list1, int pixel_shift, int chroma_idc){ MpegEncContext * const s = &h->s; + int chroma_height; dest_y += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize; - if(chroma444){ + if (chroma_idc == 3 /* yuv444 */) { + chroma_height = height; chroma_weight_avg = luma_weight_avg; chroma_weight_op = luma_weight_op; dest_cb += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize; dest_cr += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize; - }else{ + } else if (chroma_idc == 2 /* yuv422 */) { + chroma_height = height; + dest_cb += ( x_offset << pixel_shift) + 2*y_offset*h->mb_uvlinesize; + dest_cr += ( x_offset << pixel_shift) + 2*y_offset*h->mb_uvlinesize; + } else /* yuv420 */ { + chroma_height = height >> 1; dest_cb += ( x_offset << pixel_shift) + y_offset*h->mb_uvlinesize; dest_cr += ( x_offset << pixel_shift) + y_offset*h->mb_uvlinesize; } @@ -602,27 +622,32 @@ int refn0 = h->ref_cache[0][ scan8[n] ]; int refn1 = h->ref_cache[1][ scan8[n] ]; - mc_dir_part(h, &h->ref_list[0][refn0], n, square, chroma_height, delta, 0, + mc_dir_part(h, &h->ref_list[0][refn0], n, square, height, delta, 0, dest_y, dest_cb, dest_cr, - x_offset, y_offset, qpix_put, chroma_put, pixel_shift, chroma444); - mc_dir_part(h, &h->ref_list[1][refn1], n, square, chroma_height, delta, 1, + x_offset, y_offset, qpix_put, chroma_put, + pixel_shift, chroma_idc); + mc_dir_part(h, &h->ref_list[1][refn1], n, square, height, delta, 1, tmp_y, tmp_cb, tmp_cr, - x_offset, y_offset, qpix_put, chroma_put, pixel_shift, chroma444); + x_offset, y_offset, qpix_put, chroma_put, + pixel_shift, chroma_idc); if(h->use_weight == 2){ int weight0 = h->implicit_weight[refn0][refn1][s->mb_y&1]; int weight1 = 64 - weight0; - luma_weight_avg( dest_y, tmp_y, h-> mb_linesize, 5, weight0, weight1, 0); - chroma_weight_avg(dest_cb, tmp_cb, h->mb_uvlinesize, 5, weight0, weight1, 0); - chroma_weight_avg(dest_cr, tmp_cr, h->mb_uvlinesize, 5, weight0, weight1, 0); + luma_weight_avg( dest_y, tmp_y, h-> mb_linesize, + height, 5, weight0, weight1, 0); + chroma_weight_avg(dest_cb, tmp_cb, h->mb_uvlinesize, + chroma_height, 5, weight0, weight1, 0); + chroma_weight_avg(dest_cr, tmp_cr, h->mb_uvlinesize, + chroma_height, 5, weight0, weight1, 0); }else{ - luma_weight_avg(dest_y, tmp_y, h->mb_linesize, h->luma_log2_weight_denom, + luma_weight_avg(dest_y, tmp_y, h->mb_linesize, height, h->luma_log2_weight_denom, h->luma_weight[refn0][0][0] , h->luma_weight[refn1][1][0], h->luma_weight[refn0][0][1] + h->luma_weight[refn1][1][1]); - chroma_weight_avg(dest_cb, tmp_cb, h->mb_uvlinesize, h->chroma_log2_weight_denom, + chroma_weight_avg(dest_cb, tmp_cb, h->mb_uvlinesize, chroma_height, h->chroma_log2_weight_denom, h->chroma_weight[refn0][0][0][0] , h->chroma_weight[refn1][1][0][0], h->chroma_weight[refn0][0][0][1] + h->chroma_weight[refn1][1][0][1]); - chroma_weight_avg(dest_cr, tmp_cr, h->mb_uvlinesize, h->chroma_log2_weight_denom, + chroma_weight_avg(dest_cr, tmp_cr, h->mb_uvlinesize, chroma_height, h->chroma_log2_weight_denom, h->chroma_weight[refn0][0][1][0] , h->chroma_weight[refn1][1][1][0], h->chroma_weight[refn0][0][1][1] + h->chroma_weight[refn1][1][1][1]); } @@ -630,42 +655,46 @@ int list = list1 ? 1 : 0; int refn = h->ref_cache[list][ scan8[n] ]; Picture *ref= &h->ref_list[list][refn]; - mc_dir_part(h, ref, n, square, chroma_height, delta, list, + mc_dir_part(h, ref, n, square, height, delta, list, dest_y, dest_cb, dest_cr, x_offset, y_offset, - qpix_put, chroma_put, pixel_shift, chroma444); + qpix_put, chroma_put, pixel_shift, chroma_idc); - luma_weight_op(dest_y, h->mb_linesize, h->luma_log2_weight_denom, + luma_weight_op(dest_y, h->mb_linesize, height, h->luma_log2_weight_denom, h->luma_weight[refn][list][0], h->luma_weight[refn][list][1]); if(h->use_weight_chroma){ - chroma_weight_op(dest_cb, h->mb_uvlinesize, h->chroma_log2_weight_denom, + chroma_weight_op(dest_cb, h->mb_uvlinesize, chroma_height, h->chroma_log2_weight_denom, h->chroma_weight[refn][list][0][0], h->chroma_weight[refn][list][0][1]); - chroma_weight_op(dest_cr, h->mb_uvlinesize, h->chroma_log2_weight_denom, + chroma_weight_op(dest_cr, h->mb_uvlinesize, chroma_height, h->chroma_log2_weight_denom, h->chroma_weight[refn][list][1][0], h->chroma_weight[refn][list][1][1]); } } } -static inline void mc_part(H264Context *h, int n, int square, int chroma_height, int delta, - uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, - int x_offset, int y_offset, - qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, - qpel_mc_func *qpix_avg, h264_chroma_mc_func chroma_avg, - h264_weight_func *weight_op, h264_biweight_func *weight_avg, - int list0, int list1, int pixel_shift, int chroma444){ +static av_always_inline void +mc_part(H264Context *h, int n, int square, int height, int delta, + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, + int x_offset, int y_offset, + qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, + qpel_mc_func *qpix_avg, h264_chroma_mc_func chroma_avg, + h264_weight_func *weight_op, h264_biweight_func *weight_avg, + int list0, int list1, int pixel_shift, int chroma_idc) +{ if((h->use_weight==2 && list0 && list1 && (h->implicit_weight[ h->ref_cache[0][scan8[n]] ][ h->ref_cache[1][scan8[n]] ][h->s.mb_y&1] != 32)) || h->use_weight==1) - mc_part_weighted(h, n, square, chroma_height, delta, dest_y, dest_cb, dest_cr, + mc_part_weighted(h, n, square, height, delta, dest_y, dest_cb, dest_cr, x_offset, y_offset, qpix_put, chroma_put, - weight_op[0], weight_op[3], weight_avg[0], - weight_avg[3], list0, list1, pixel_shift, chroma444); + weight_op[0], weight_op[1], weight_avg[0], + weight_avg[1], list0, list1, pixel_shift, chroma_idc); else - mc_part_std(h, n, square, chroma_height, delta, dest_y, dest_cb, dest_cr, + mc_part_std(h, n, square, height, delta, dest_y, dest_cb, dest_cr, x_offset, y_offset, qpix_put, chroma_put, qpix_avg, - chroma_avg, list0, list1, pixel_shift, chroma444); + chroma_avg, list0, list1, pixel_shift, chroma_idc); } -static inline void prefetch_motion(H264Context *h, int list, int pixel_shift, int chroma444){ +static av_always_inline void +prefetch_motion(H264Context *h, int list, int pixel_shift, int chroma_idc) +{ /* fetch pixels for estimated mv 4 macroblocks ahead * optimized for 64byte cache lines */ MpegEncContext * const s = &h->s; @@ -673,10 +702,10 @@ if(refn >= 0){ const int mx= (h->mv_cache[list][scan8[0]][0]>>2) + 16*s->mb_x + 8; const int my= (h->mv_cache[list][scan8[0]][1]>>2) + 16*s->mb_y; - uint8_t **src= h->ref_list[list][refn].data; + uint8_t **src = h->ref_list[list][refn].f.data; int off= (mx << pixel_shift) + (my + (s->mb_x&3)*4)*h->mb_linesize + (64 << pixel_shift); s->dsp.prefetch(src[0]+off, s->linesize, 4); - if(chroma444){ + if (chroma_idc == 3 /* yuv444 */) { s->dsp.prefetch(src[1]+off, s->linesize, 4); s->dsp.prefetch(src[2]+off, s->linesize, 4); }else{ @@ -690,45 +719,46 @@ qpel_mc_func (*qpix_put)[16], h264_chroma_mc_func (*chroma_put), qpel_mc_func (*qpix_avg)[16], h264_chroma_mc_func (*chroma_avg), h264_weight_func *weight_op, h264_biweight_func *weight_avg, - int pixel_shift, int chroma444){ + int pixel_shift, int chroma_idc) +{ MpegEncContext * const s = &h->s; const int mb_xy= h->mb_xy; - const int mb_type= s->current_picture.mb_type[mb_xy]; + const int mb_type = s->current_picture.f.mb_type[mb_xy]; assert(IS_INTER(mb_type)); - if(HAVE_PTHREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME)) + if(HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME)) await_references(h); - prefetch_motion(h, 0, pixel_shift, chroma444); + prefetch_motion(h, 0, pixel_shift, chroma_idc); if(IS_16X16(mb_type)){ - mc_part(h, 0, 1, 8, 0, dest_y, dest_cb, dest_cr, 0, 0, + mc_part(h, 0, 1, 16, 0, dest_y, dest_cb, dest_cr, 0, 0, qpix_put[0], chroma_put[0], qpix_avg[0], chroma_avg[0], weight_op, weight_avg, IS_DIR(mb_type, 0, 0), IS_DIR(mb_type, 0, 1), - pixel_shift, chroma444); + pixel_shift, chroma_idc); }else if(IS_16X8(mb_type)){ - mc_part(h, 0, 0, 4, 8 << pixel_shift, dest_y, dest_cb, dest_cr, 0, 0, + mc_part(h, 0, 0, 8, 8 << pixel_shift, dest_y, dest_cb, dest_cr, 0, 0, qpix_put[1], chroma_put[0], qpix_avg[1], chroma_avg[0], - &weight_op[1], &weight_avg[1], + weight_op, weight_avg, IS_DIR(mb_type, 0, 0), IS_DIR(mb_type, 0, 1), - pixel_shift, chroma444); - mc_part(h, 8, 0, 4, 8 << pixel_shift, dest_y, dest_cb, dest_cr, 0, 4, + pixel_shift, chroma_idc); + mc_part(h, 8, 0, 8, 8 << pixel_shift, dest_y, dest_cb, dest_cr, 0, 4, qpix_put[1], chroma_put[0], qpix_avg[1], chroma_avg[0], - &weight_op[1], &weight_avg[1], + weight_op, weight_avg, IS_DIR(mb_type, 1, 0), IS_DIR(mb_type, 1, 1), - pixel_shift, chroma444); + pixel_shift, chroma_idc); }else if(IS_8X16(mb_type)){ - mc_part(h, 0, 0, 8, 8*h->mb_linesize, dest_y, dest_cb, dest_cr, 0, 0, + mc_part(h, 0, 0, 16, 8*h->mb_linesize, dest_y, dest_cb, dest_cr, 0, 0, qpix_put[1], chroma_put[1], qpix_avg[1], chroma_avg[1], - &weight_op[2], &weight_avg[2], + &weight_op[1], &weight_avg[1], IS_DIR(mb_type, 0, 0), IS_DIR(mb_type, 0, 1), - pixel_shift, chroma444); - mc_part(h, 4, 0, 8, 8*h->mb_linesize, dest_y, dest_cb, dest_cr, 4, 0, + pixel_shift, chroma_idc); + mc_part(h, 4, 0, 16, 8*h->mb_linesize, dest_y, dest_cb, dest_cr, 4, 0, qpix_put[1], chroma_put[1], qpix_avg[1], chroma_avg[1], - &weight_op[2], &weight_avg[2], + &weight_op[1], &weight_avg[1], IS_DIR(mb_type, 1, 0), IS_DIR(mb_type, 1, 1), - pixel_shift, chroma444); + pixel_shift, chroma_idc); }else{ int i; @@ -741,69 +771,73 @@ int y_offset= (i&2)<<1; if(IS_SUB_8X8(sub_mb_type)){ - mc_part(h, n, 1, 4, 0, dest_y, dest_cb, dest_cr, x_offset, y_offset, + mc_part(h, n, 1, 8, 0, dest_y, dest_cb, dest_cr, x_offset, y_offset, qpix_put[1], chroma_put[1], qpix_avg[1], chroma_avg[1], - &weight_op[3], &weight_avg[3], + &weight_op[1], &weight_avg[1], IS_DIR(sub_mb_type, 0, 0), IS_DIR(sub_mb_type, 0, 1), - pixel_shift, chroma444); + pixel_shift, chroma_idc); }else if(IS_SUB_8X4(sub_mb_type)){ - mc_part(h, n , 0, 2, 4 << pixel_shift, dest_y, dest_cb, dest_cr, x_offset, y_offset, + mc_part(h, n , 0, 4, 4 << pixel_shift, dest_y, dest_cb, dest_cr, x_offset, y_offset, qpix_put[2], chroma_put[1], qpix_avg[2], chroma_avg[1], - &weight_op[4], &weight_avg[4], + &weight_op[1], &weight_avg[1], IS_DIR(sub_mb_type, 0, 0), IS_DIR(sub_mb_type, 0, 1), - pixel_shift, chroma444); - mc_part(h, n+2, 0, 2, 4 << pixel_shift, dest_y, dest_cb, dest_cr, x_offset, y_offset+2, + pixel_shift, chroma_idc); + mc_part(h, n+2, 0, 4, 4 << pixel_shift, dest_y, dest_cb, dest_cr, x_offset, y_offset+2, qpix_put[2], chroma_put[1], qpix_avg[2], chroma_avg[1], - &weight_op[4], &weight_avg[4], + &weight_op[1], &weight_avg[1], IS_DIR(sub_mb_type, 0, 0), IS_DIR(sub_mb_type, 0, 1), - pixel_shift, chroma444); + pixel_shift, chroma_idc); }else if(IS_SUB_4X8(sub_mb_type)){ - mc_part(h, n , 0, 4, 4*h->mb_linesize, dest_y, dest_cb, dest_cr, x_offset, y_offset, + mc_part(h, n , 0, 8, 4*h->mb_linesize, dest_y, dest_cb, dest_cr, x_offset, y_offset, qpix_put[2], chroma_put[2], qpix_avg[2], chroma_avg[2], - &weight_op[5], &weight_avg[5], + &weight_op[2], &weight_avg[2], IS_DIR(sub_mb_type, 0, 0), IS_DIR(sub_mb_type, 0, 1), - pixel_shift, chroma444); - mc_part(h, n+1, 0, 4, 4*h->mb_linesize, dest_y, dest_cb, dest_cr, x_offset+2, y_offset, + pixel_shift, chroma_idc); + mc_part(h, n+1, 0, 8, 4*h->mb_linesize, dest_y, dest_cb, dest_cr, x_offset+2, y_offset, qpix_put[2], chroma_put[2], qpix_avg[2], chroma_avg[2], - &weight_op[5], &weight_avg[5], + &weight_op[2], &weight_avg[2], IS_DIR(sub_mb_type, 0, 0), IS_DIR(sub_mb_type, 0, 1), - pixel_shift, chroma444); + pixel_shift, chroma_idc); }else{ int j; assert(IS_SUB_4X4(sub_mb_type)); for(j=0; j<4; j++){ int sub_x_offset= x_offset + 2*(j&1); int sub_y_offset= y_offset + (j&2); - mc_part(h, n+j, 1, 2, 0, dest_y, dest_cb, dest_cr, sub_x_offset, sub_y_offset, + mc_part(h, n+j, 1, 4, 0, dest_y, dest_cb, dest_cr, sub_x_offset, sub_y_offset, qpix_put[2], chroma_put[2], qpix_avg[2], chroma_avg[2], - &weight_op[6], &weight_avg[6], + &weight_op[2], &weight_avg[2], IS_DIR(sub_mb_type, 0, 0), IS_DIR(sub_mb_type, 0, 1), - pixel_shift, chroma444); + pixel_shift, chroma_idc); } } } } - prefetch_motion(h, 1, pixel_shift, chroma444); + prefetch_motion(h, 1, pixel_shift, chroma_idc); } -#define hl_motion_fn(sh, bits) \ -static av_always_inline void hl_motion_ ## bits(H264Context *h, \ - uint8_t *dest_y, \ - uint8_t *dest_cb, uint8_t *dest_cr, \ - qpel_mc_func (*qpix_put)[16], \ - h264_chroma_mc_func (*chroma_put), \ - qpel_mc_func (*qpix_avg)[16], \ - h264_chroma_mc_func (*chroma_avg), \ - h264_weight_func *weight_op, \ - h264_biweight_func *weight_avg, \ - int chroma444) \ -{ \ - hl_motion(h, dest_y, dest_cb, dest_cr, qpix_put, chroma_put, \ - qpix_avg, chroma_avg, weight_op, weight_avg, sh, chroma444); \ +static av_always_inline void +hl_motion_420(H264Context *h, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, + qpel_mc_func (*qpix_put)[16], h264_chroma_mc_func (*chroma_put), + qpel_mc_func (*qpix_avg)[16], h264_chroma_mc_func (*chroma_avg), + h264_weight_func *weight_op, h264_biweight_func *weight_avg, + int pixel_shift) +{ + hl_motion(h, dest_y, dest_cb, dest_cr, qpix_put, chroma_put, + qpix_avg, chroma_avg, weight_op, weight_avg, pixel_shift, 1); +} + +static av_always_inline void +hl_motion_422(H264Context *h, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, + qpel_mc_func (*qpix_put)[16], h264_chroma_mc_func (*chroma_put), + qpel_mc_func (*qpix_avg)[16], h264_chroma_mc_func (*chroma_avg), + h264_weight_func *weight_op, h264_biweight_func *weight_avg, + int pixel_shift) +{ + hl_motion(h, dest_y, dest_cb, dest_cr, qpix_put, chroma_put, + qpix_avg, chroma_avg, weight_op, weight_avg, pixel_shift, 2); } -hl_motion_fn(0, 8); -hl_motion_fn(1, 16); static void free_tables(H264Context *h, int free_rbsp){ int i; @@ -969,7 +1003,7 @@ dst->list_counts = src->list_counts; dst->s.obmc_scratchpad = NULL; - ff_h264_pred_init(&dst->hpc, src->s.codec_id, src->sps.bit_depth_luma); + ff_h264_pred_init(&dst->hpc, src->s.codec_id, src->sps.bit_depth_luma, src->sps.chroma_format_idc); } /** @@ -997,12 +1031,11 @@ s->height = s->avctx->height; s->codec_id= s->avctx->codec->id; - ff_h264dsp_init(&h->h264dsp, 8); - ff_h264_pred_init(&h->hpc, s->codec_id, 8); + ff_h264dsp_init(&h->h264dsp, 8, 1); + ff_h264_pred_init(&h->hpc, s->codec_id, 8, 1); h->dequant_coeff_pps= -1; s->unrestricted_mv=1; - s->decode=1; //FIXME dsputil_init(&s->dsp, s->avctx); // needed so that idct permutation is known early @@ -1032,6 +1065,8 @@ p += 6; for (i = 0; i < cnt; i++) { nalsize = AV_RB16(p) + 2; + if (p - avctx->extradata + nalsize > avctx->extradata_size) + return -1; if(decode_nal_units(h, p, nalsize) < 0) { av_log(avctx, AV_LOG_ERROR, "Decoding sps %d from avcC failed\n", i); return -1; @@ -1042,6 +1077,8 @@ cnt = *(p++); // Number of pps for (i = 0; i < cnt; i++) { nalsize = AV_RB16(p) + 2; + if (p - avctx->extradata + nalsize > avctx->extradata_size) + return -1; if (decode_nal_units(h, p, nalsize) < 0) { av_log(avctx, AV_LOG_ERROR, "Decoding pps %d from avcC failed\n", i); return -1; @@ -1061,6 +1098,7 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx){ H264Context *h= avctx->priv_data; MpegEncContext * const s = &h->s; + int i; MPV_decode_defaults(s); @@ -1085,6 +1123,8 @@ h->thread_context[0] = h; h->outputed_poc = h->next_outputed_poc = INT_MIN; + for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++) + h->last_pocs[i] = INT_MIN; h->prev_poc_msb= 1<<16; h->x264_build = -1; ff_h264_reset_sei(h); @@ -1135,7 +1175,8 @@ static int decode_init_thread_copy(AVCodecContext *avctx){ H264Context *h= avctx->priv_data; - if (!avctx->is_copy) return 0; + if (!avctx->internal->is_copy) + return 0; memset(h->sps_buffers, 0, sizeof(h->sps_buffers)); memset(h->pps_buffers, 0, sizeof(h->pps_buffers)); @@ -1165,7 +1206,10 @@ memcpy(&h->s + 1, &h1->s + 1, sizeof(H264Context) - sizeof(MpegEncContext)); //copy all fields after MpegEnc memset(h->sps_buffers, 0, sizeof(h->sps_buffers)); memset(h->pps_buffers, 0, sizeof(h->pps_buffers)); - ff_h264_alloc_tables(h); + if (ff_h264_alloc_tables(h) < 0) { + av_log(dst, AV_LOG_ERROR, "Could not allocate memory for h264\n"); + return AVERROR(ENOMEM); + } context_init(h); for(i=0; i<2; i++){ @@ -1221,7 +1265,7 @@ if(!s->current_picture_ptr) return 0; if(!s->dropable) { - ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index); + err = ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index); h->prev_poc_msb = h->poc_msb; h->prev_poc_lsb = h->poc_lsb; } @@ -1229,14 +1273,13 @@ h->prev_frame_num = h->frame_num; h->outputed_poc = h->next_outputed_poc; - return 0; + return err; } int ff_h264_frame_start(H264Context *h){ MpegEncContext * const s = &h->s; int i; const int pixel_shift = h->pixel_shift; - int thread_count = (s->avctx->active_thread_type & FF_THREAD_SLICE) ? s->avctx->thread_count : 1; if(MPV_frame_start(s, s->avctx) < 0) return -1; @@ -1247,7 +1290,7 @@ * Zero here; IDR markings per slice in frame or fields are ORed in later. * See decode_nal_units(). */ - s->current_picture_ptr->key_frame= 0; + s->current_picture_ptr->f.key_frame = 0; s->current_picture_ptr->mmco_reset= 0; assert(s->linesize && s->uvlinesize); @@ -1265,14 +1308,14 @@ /* can't be in alloc_tables because linesize isn't known there. * FIXME: redo bipred weight to not require extra buffer? */ - for(i = 0; i < thread_count; i++) + for(i = 0; i < s->slice_context_count; i++) if(h->thread_context[i] && !h->thread_context[i]->s.obmc_scratchpad) h->thread_context[i]->s.obmc_scratchpad = av_malloc(16*6*s->linesize); /* some macroblocks can be accessed before they're available in case of lost slices, mbaff or threading*/ memset(h->slice_table, -1, (s->mb_height*s->mb_stride-1) * sizeof(*h->slice_table)); -// s->decode= (s->flags&CODEC_FLAG_PSNR) || !s->encoding || s->current_picture.reference /*|| h->contains_intra*/ || 1; +// s->decode = (s->flags & CODEC_FLAG_PSNR) || !s->encoding || s->current_picture.f.reference /*|| h->contains_intra*/ || 1; // We mark the current picture as non-reference after allocating it, so // that if we break out due to an error it can be released automatically @@ -1281,7 +1324,7 @@ // get released even with set reference, besides SVQ3 and others do not // mark frames as reference later "naturally". if(s->codec_id != CODEC_ID_SVQ3) - s->current_picture_ptr->reference= 0; + s->current_picture_ptr->f.reference = 0; s->current_picture_ptr->field_poc[0]= s->current_picture_ptr->field_poc[1]= INT_MAX; @@ -1306,9 +1349,10 @@ Picture *out = s->current_picture_ptr; Picture *cur = s->current_picture_ptr; int i, pics, out_of_order, out_idx; + int invalid = 0, cnt = 0; - s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_H264; - s->current_picture_ptr->pict_type= s->pict_type; + s->current_picture_ptr->f.qscale_type = FF_QSCALE_TYPE_H264; + s->current_picture_ptr->f.pict_type = s->pict_type; if (h->next_output_pic) return; @@ -1321,8 +1365,8 @@ return; } - cur->interlaced_frame = 0; - cur->repeat_pict = 0; + cur->f.interlaced_frame = 0; + cur->f.repeat_pict = 0; /* Signal interlacing information externally. */ /* Prioritize picture timing SEI information over used decoding process if it exists. */ @@ -1334,53 +1378,53 @@ break; case SEI_PIC_STRUCT_TOP_FIELD: case SEI_PIC_STRUCT_BOTTOM_FIELD: - cur->interlaced_frame = 1; + cur->f.interlaced_frame = 1; break; case SEI_PIC_STRUCT_TOP_BOTTOM: case SEI_PIC_STRUCT_BOTTOM_TOP: if (FIELD_OR_MBAFF_PICTURE) - cur->interlaced_frame = 1; + cur->f.interlaced_frame = 1; else // try to flag soft telecine progressive - cur->interlaced_frame = h->prev_interlaced_frame; + cur->f.interlaced_frame = h->prev_interlaced_frame; break; case SEI_PIC_STRUCT_TOP_BOTTOM_TOP: case SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM: // Signal the possibility of telecined film externally (pic_struct 5,6) // From these hints, let the applications decide if they apply deinterlacing. - cur->repeat_pict = 1; + cur->f.repeat_pict = 1; break; case SEI_PIC_STRUCT_FRAME_DOUBLING: // Force progressive here, as doubling interlaced frame is a bad idea. - cur->repeat_pict = 2; + cur->f.repeat_pict = 2; break; case SEI_PIC_STRUCT_FRAME_TRIPLING: - cur->repeat_pict = 4; + cur->f.repeat_pict = 4; break; } if ((h->sei_ct_type & 3) && h->sei_pic_struct <= SEI_PIC_STRUCT_BOTTOM_TOP) - cur->interlaced_frame = (h->sei_ct_type & (1<<1)) != 0; + cur->f.interlaced_frame = (h->sei_ct_type & (1 << 1)) != 0; }else{ /* Derive interlacing flag from used decoding process. */ - cur->interlaced_frame = FIELD_OR_MBAFF_PICTURE; + cur->f.interlaced_frame = FIELD_OR_MBAFF_PICTURE; } - h->prev_interlaced_frame = cur->interlaced_frame; + h->prev_interlaced_frame = cur->f.interlaced_frame; if (cur->field_poc[0] != cur->field_poc[1]){ /* Derive top_field_first from field pocs. */ - cur->top_field_first = cur->field_poc[0] < cur->field_poc[1]; + cur->f.top_field_first = cur->field_poc[0] < cur->field_poc[1]; }else{ - if(cur->interlaced_frame || h->sps.pic_struct_present_flag){ + if (cur->f.interlaced_frame || h->sps.pic_struct_present_flag) { /* Use picture timing SEI information. Even if it is a information of a past frame, better than nothing. */ if(h->sei_pic_struct == SEI_PIC_STRUCT_TOP_BOTTOM || h->sei_pic_struct == SEI_PIC_STRUCT_TOP_BOTTOM_TOP) - cur->top_field_first = 1; + cur->f.top_field_first = 1; else - cur->top_field_first = 0; + cur->f.top_field_first = 0; }else{ /* Most likely progressive */ - cur->top_field_first = 0; + cur->f.top_field_first = 0; } } @@ -1396,7 +1440,7 @@ if( s->avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT && !h->sps.bitstream_restriction_flag){ - s->avctx->has_b_frames= MAX_DELAYED_PIC_COUNT; + s->avctx->has_b_frames = MAX_DELAYED_PIC_COUNT - 1; s->low_delay= 0; } @@ -1406,44 +1450,92 @@ assert(pics <= MAX_DELAYED_PIC_COUNT); h->delayed_pic[pics++] = cur; - if(cur->reference == 0) - cur->reference = DELAYED_PIC_REF; + if (cur->f.reference == 0) + cur->f.reference = DELAYED_PIC_REF; + /* Frame reordering. This code takes pictures from coding order and sorts + * them by their incremental POC value into display order. It supports POC + * gaps, MMCO reset codes and random resets. + * A "display group" can start either with a IDR frame (f.key_frame = 1), + * and/or can be closed down with a MMCO reset code. In sequences where + * there is no delay, we can't detect that (since the frame was already + * output to the user), so we also set h->mmco_reset to detect the MMCO + * reset code. + * FIXME: if we detect insufficient delays (as per s->avctx->has_b_frames), + * we increase the delay between input and output. All frames affected by + * the lag (e.g. those that should have been output before another frame + * that we already returned to the user) will be dropped. This is a bug + * that we will fix later. */ + for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++) { + cnt += out->poc < h->last_pocs[i]; + invalid += out->poc == INT_MIN; + } + if (!h->mmco_reset && !cur->f.key_frame && cnt + invalid == MAX_DELAYED_PIC_COUNT && cnt > 0) { + h->mmco_reset = 2; + if (pics > 1) + h->delayed_pic[pics - 2]->mmco_reset = 2; + } + if (h->mmco_reset || cur->f.key_frame) { + for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++) + h->last_pocs[i] = INT_MIN; + cnt = 0; + invalid = MAX_DELAYED_PIC_COUNT; + } out = h->delayed_pic[0]; out_idx = 0; - for(i=1; h->delayed_pic[i] && !h->delayed_pic[i]->key_frame && !h->delayed_pic[i]->mmco_reset; i++) + for (i = 1; i < MAX_DELAYED_PIC_COUNT && h->delayed_pic[i] && + !h->delayed_pic[i-1]->mmco_reset && !h->delayed_pic[i]->f.key_frame; i++) + { if(h->delayed_pic[i]->poc < out->poc){ out = h->delayed_pic[i]; out_idx = i; } - if(s->avctx->has_b_frames == 0 && (h->delayed_pic[0]->key_frame || h->delayed_pic[0]->mmco_reset)) - h->next_outputed_poc= INT_MIN; - out_of_order = out->poc < h->next_outputed_poc; + } + if (s->avctx->has_b_frames == 0 && (h->delayed_pic[0]->f.key_frame || h->mmco_reset)) + h->next_outputed_poc = INT_MIN; + out_of_order = !out->f.key_frame && !h->mmco_reset && (out->poc < h->next_outputed_poc); if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames >= h->sps.num_reorder_frames) { } - else if((out_of_order && pics-1 == s->avctx->has_b_frames && s->avctx->has_b_frames < MAX_DELAYED_PIC_COUNT) - || (s->low_delay && - ((h->next_outputed_poc != INT_MIN && out->poc > h->next_outputed_poc + 2) - || cur->pict_type == AV_PICTURE_TYPE_B))) - { + else if (out_of_order && pics-1 == s->avctx->has_b_frames && + s->avctx->has_b_frames < MAX_DELAYED_PIC_COUNT) { + if (invalid + cnt < MAX_DELAYED_PIC_COUNT) { + s->avctx->has_b_frames = FFMAX(s->avctx->has_b_frames, cnt); + } + s->low_delay = 0; + } else if (s->low_delay && + ((h->next_outputed_poc != INT_MIN && out->poc > h->next_outputed_poc + 2) || + cur->f.pict_type == AV_PICTURE_TYPE_B)) { s->low_delay = 0; s->avctx->has_b_frames++; } - if(out_of_order || pics > s->avctx->has_b_frames){ - out->reference &= ~DELAYED_PIC_REF; + if(pics > s->avctx->has_b_frames){ + out->f.reference &= ~DELAYED_PIC_REF; out->owner2 = s; // for frame threading, the owner must be the second field's thread // or else the first thread can release the picture and reuse it unsafely for(i=out_idx; h->delayed_pic[i]; i++) h->delayed_pic[i] = h->delayed_pic[i+1]; } + memmove(h->last_pocs, &h->last_pocs[1], sizeof(*h->last_pocs) * (MAX_DELAYED_PIC_COUNT - 1)); + h->last_pocs[MAX_DELAYED_PIC_COUNT - 1] = cur->poc; if(!out_of_order && pics > s->avctx->has_b_frames){ h->next_output_pic = out; - if(out_idx==0 && h->delayed_pic[0] && (h->delayed_pic[0]->key_frame || h->delayed_pic[0]->mmco_reset)) { - h->next_outputed_poc = INT_MIN; - } else - h->next_outputed_poc = out->poc; + if (out->mmco_reset) { + if (out_idx > 0) { + h->next_outputed_poc = out->poc; + h->delayed_pic[out_idx - 1]->mmco_reset = out->mmco_reset; + } else { + h->next_outputed_poc = INT_MIN; + } + } else { + if (out_idx == 0 && pics > 1 && h->delayed_pic[0]->f.key_frame) { + h->next_outputed_poc = INT_MIN; + } else { + h->next_outputed_poc = out->poc; + } + } + h->mmco_reset = 0; }else{ av_log(s->avctx, AV_LOG_DEBUG, "no picture\n"); } @@ -1452,11 +1544,16 @@ ff_thread_finish_setup(s->avctx); } -static inline void backup_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize, int chroma444, int simple){ +static av_always_inline void backup_mb_border(H264Context *h, uint8_t *src_y, + uint8_t *src_cb, uint8_t *src_cr, + int linesize, int uvlinesize, int simple) +{ MpegEncContext * const s = &h->s; uint8_t *top_border; int top_idx = 1; const int pixel_shift = h->pixel_shift; + int chroma444 = CHROMA444; + int chroma422 = CHROMA422; src_y -= linesize; src_cb -= uvlinesize; @@ -1480,6 +1577,14 @@ AV_COPY128(top_border+16, src_cb + 15*uvlinesize); AV_COPY128(top_border+32, src_cr + 15*uvlinesize); } + } else if(chroma422) { + if (pixel_shift) { + AV_COPY128(top_border+32, src_cb + 15*uvlinesize); + AV_COPY128(top_border+48, src_cr + 15*uvlinesize); + } else { + AV_COPY64(top_border+16, src_cb + 15*uvlinesize); + AV_COPY64(top_border+24, src_cr + 15*uvlinesize); + } } else { if (pixel_shift) { AV_COPY128(top_border+32, src_cb+7*uvlinesize); @@ -1515,6 +1620,14 @@ AV_COPY128(top_border+16, src_cb + 16*linesize); AV_COPY128(top_border+32, src_cr + 16*linesize); } + } else if(chroma422) { + if (pixel_shift) { + AV_COPY128(top_border+32, src_cb+16*uvlinesize); + AV_COPY128(top_border+48, src_cr+16*uvlinesize); + } else { + AV_COPY64(top_border+16, src_cb+16*uvlinesize); + AV_COPY64(top_border+24, src_cr+16*uvlinesize); + } } else { if (pixel_shift) { AV_COPY128(top_border+32, src_cb+8*uvlinesize); @@ -1527,7 +1640,7 @@ } } -static inline void xchg_mb_border(H264Context *h, uint8_t *src_y, +static av_always_inline void xchg_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize, int xchg, int chroma444, @@ -1688,7 +1801,7 @@ tr_high= ((uint16_t*)ptr)[3 - linesize/2]*0x0001000100010001ULL; topright= (uint8_t*) &tr_high; } else { - tr= ptr[3 - linesize]*0x01010101; + tr= ptr[3 - linesize]*0x01010101u; topright= (uint8_t*) &tr; } }else @@ -1704,7 +1817,7 @@ idct_dc_add(ptr, h->mb + (i*16+p*256 << pixel_shift), linesize); else idct_add (ptr, h->mb + (i*16+p*256 << pixel_shift), linesize); - }else + } else if (CONFIG_SVQ3_DECODER) ff_svq3_add_idct_c(ptr, h->mb + i*16+p*256, linesize, qscale, 0); } } @@ -1721,10 +1834,10 @@ static const uint8_t dc_mapping[16] = { 0*16, 1*16, 4*16, 5*16, 2*16, 3*16, 6*16, 7*16, 8*16, 9*16,12*16,13*16,10*16,11*16,14*16,15*16}; for(i = 0; i < 16; i++) - dctcoef_set(h->mb+p*256, pixel_shift, dc_mapping[i], dctcoef_get(h->mb_luma_dc[p], pixel_shift, i)); + dctcoef_set(h->mb+(p*256 << pixel_shift), pixel_shift, dc_mapping[i], dctcoef_get(h->mb_luma_dc[p], pixel_shift, i)); } } - }else + } else if (CONFIG_SVQ3_DECODER) ff_svq3_luma_dc_dequant_idct_c(h->mb+p*256, h->mb_luma_dc[p], qscale); } } @@ -1768,7 +1881,7 @@ } } } - }else{ + } else if (CONFIG_SVQ3_DECODER) { for(i=0; i<16; i++){ if(h->non_zero_count_cache[ scan8[i+p*16] ] || h->mb[i*16+p*256]){ //FIXME benchmark weird rule, & below uint8_t * const ptr= dest_y + block_offset[i]; @@ -1779,12 +1892,13 @@ } } -static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, int pixel_shift){ +static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, int pixel_shift) +{ MpegEncContext * const s = &h->s; const int mb_x= s->mb_x; const int mb_y= s->mb_y; const int mb_xy= h->mb_xy; - const int mb_type= s->current_picture.mb_type[mb_xy]; + const int mb_type = s->current_picture.f.mb_type[mb_xy]; uint8_t *dest_y, *dest_cb, *dest_cr; int linesize, uvlinesize /*dct_offset*/; int i, j; @@ -1793,10 +1907,12 @@ /* is_h264 should always be true if SVQ3 is disabled. */ const int is_h264 = !CONFIG_SVQ3_DECODER || simple || s->codec_id == CODEC_ID_H264; void (*idct_add)(uint8_t *dst, DCTELEM *block, int stride); + const int block_h = 16 >> s->chroma_y_shift; + const int chroma422 = CHROMA422; - dest_y = s->current_picture.data[0] + ((mb_x << pixel_shift) + mb_y * s->linesize ) * 16; - dest_cb = s->current_picture.data[1] + ((mb_x << pixel_shift) + mb_y * s->uvlinesize) * 8; - dest_cr = s->current_picture.data[2] + ((mb_x << pixel_shift) + mb_y * s->uvlinesize) * 8; + dest_y = s->current_picture.f.data[0] + ((mb_x << pixel_shift) + mb_y * s->linesize ) * 16; + dest_cb = s->current_picture.f.data[1] + (mb_x << pixel_shift)*8 + mb_y * s->uvlinesize * block_h; + dest_cr = s->current_picture.f.data[2] + (mb_x << pixel_shift)*8 + mb_y * s->uvlinesize * block_h; s->dsp.prefetch(dest_y + (s->mb_x&3)*4*s->linesize + (64 << pixel_shift), s->linesize, 4); s->dsp.prefetch(dest_cb + (s->mb_x&7)*s->uvlinesize + (64 << pixel_shift), dest_cr - dest_cb, 2); @@ -1809,8 +1925,8 @@ block_offset = &h->block_offset[48]; if(mb_y&1){ //FIXME move out of this function? dest_y -= s->linesize*15; - dest_cb-= s->uvlinesize*7; - dest_cr-= s->uvlinesize*7; + dest_cb-= s->uvlinesize * (block_h - 1); + dest_cr-= s->uvlinesize * (block_h - 1); } if(FRAME_MBAFF) { int list; @@ -1848,15 +1964,30 @@ tmp_y[j] = get_bits(&gb, bit_depth); } if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ - for (i = 0; i < 8; i++) { - uint16_t *tmp_cb = (uint16_t*)(dest_cb + i*uvlinesize); - for (j = 0; j < 8; j++) - tmp_cb[j] = get_bits(&gb, bit_depth); - } - for (i = 0; i < 8; i++) { - uint16_t *tmp_cr = (uint16_t*)(dest_cr + i*uvlinesize); - for (j = 0; j < 8; j++) - tmp_cr[j] = get_bits(&gb, bit_depth); + if (!h->sps.chroma_format_idc) { + for (i = 0; i < block_h; i++) { + uint16_t *tmp_cb = (uint16_t*)(dest_cb + i*uvlinesize); + for (j = 0; j < 8; j++) { + tmp_cb[j] = 1 << (bit_depth - 1); + } + } + for (i = 0; i < block_h; i++) { + uint16_t *tmp_cr = (uint16_t*)(dest_cr + i*uvlinesize); + for (j = 0; j < 8; j++) { + tmp_cr[j] = 1 << (bit_depth - 1); + } + } + } else { + for (i = 0; i < block_h; i++) { + uint16_t *tmp_cb = (uint16_t*)(dest_cb + i*uvlinesize); + for (j = 0; j < 8; j++) + tmp_cb[j] = get_bits(&gb, bit_depth); + } + for (i = 0; i < block_h; i++) { + uint16_t *tmp_cr = (uint16_t*)(dest_cr + i*uvlinesize); + for (j = 0; j < 8; j++) + tmp_cr[j] = get_bits(&gb, bit_depth); + } } } } else { @@ -1864,9 +1995,16 @@ memcpy(dest_y + i* linesize, h->mb + i*8, 16); } if(simple || !CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ - for (i=0; i<8; i++) { - memcpy(dest_cb+ i*uvlinesize, h->mb + 128 + i*4, 8); - memcpy(dest_cr+ i*uvlinesize, h->mb + 160 + i*4, 8); + if (!h->sps.chroma_format_idc) { + for (i = 0; i < block_h; i++) { + memset(dest_cb + i*uvlinesize, 128, 8); + memset(dest_cr + i*uvlinesize, 128, 8); + } + } else { + for (i = 0; i < block_h; i++) { + memcpy(dest_cb + i*uvlinesize, h->mb + 128 + i*4, 8); + memcpy(dest_cr + i*uvlinesize, h->mb + 160 + i*4, 8); + } } } } @@ -1885,18 +2023,21 @@ if(h->deblocking_filter) xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 0, 0, simple, pixel_shift); }else if(is_h264){ - if (pixel_shift) { - hl_motion_16(h, dest_y, dest_cb, dest_cr, - s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, - s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, - h->h264dsp.weight_h264_pixels_tab, - h->h264dsp.biweight_h264_pixels_tab, 0); - } else - hl_motion_8(h, dest_y, dest_cb, dest_cr, - s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, - s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, - h->h264dsp.weight_h264_pixels_tab, - h->h264dsp.biweight_h264_pixels_tab, 0); + if (chroma422) { + hl_motion_422(h, dest_y, dest_cb, dest_cr, + s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, + s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, + h->h264dsp.weight_h264_pixels_tab, + h->h264dsp.biweight_h264_pixels_tab, + pixel_shift); + } else { + hl_motion_420(h, dest_y, dest_cb, dest_cr, + s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, + s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, + h->h264dsp.weight_h264_pixels_tab, + h->h264dsp.biweight_h264_pixels_tab, + pixel_shift); + } } hl_decode_mb_idct_luma(h, mb_type, is_h264, simple, transform_bypass, pixel_shift, block_offset, linesize, dest_y, 0); @@ -1914,18 +2055,32 @@ if(h->non_zero_count_cache[ scan8[i] ] || dctcoef_get(h->mb, pixel_shift, i*16)) idct_add (dest[j-1] + block_offset[i], h->mb + (i*16 << pixel_shift), uvlinesize); } + if (chroma422) { + for(i=j*16+4; inon_zero_count_cache[ scan8[i+4] ] || dctcoef_get(h->mb, pixel_shift, i*16)) + idct_add (dest[j-1] + block_offset[i+4], h->mb + (i*16 << pixel_shift), uvlinesize); + } + } } } }else{ if(is_h264){ + int qp[2]; + if (chroma422) { + qp[0] = h->chroma_qp[0] + 3; + qp[1] = h->chroma_qp[1] + 3; + } else { + qp[0] = h->chroma_qp[0]; + qp[1] = h->chroma_qp[1]; + } if(h->non_zero_count_cache[ scan8[CHROMA_DC_BLOCK_INDEX+0] ]) - h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + (16*16*1 << pixel_shift), h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][h->chroma_qp[0]][0]); + h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + (16*16*1 << pixel_shift), h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][qp[0]][0]); if(h->non_zero_count_cache[ scan8[CHROMA_DC_BLOCK_INDEX+1] ]) - h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + (16*16*2 << pixel_shift), h->dequant4_coeff[IS_INTRA(mb_type) ? 2:5][h->chroma_qp[1]][0]); + h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + (16*16*2 << pixel_shift), h->dequant4_coeff[IS_INTRA(mb_type) ? 2:5][qp[1]][0]); h->h264dsp.h264_idct_add8(dest, block_offset, h->mb, uvlinesize, h->non_zero_count_cache); - }else{ + } else if (CONFIG_SVQ3_DECODER) { h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + 16*16*1, h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][h->chroma_qp[0]][0]); h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + 16*16*2, h->dequant4_coeff[IS_INTRA(mb_type) ? 2:5][h->chroma_qp[1]][0]); for(j=1; j<3; j++){ @@ -1952,7 +2107,7 @@ const int mb_x= s->mb_x; const int mb_y= s->mb_y; const int mb_xy= h->mb_xy; - const int mb_type= s->current_picture.mb_type[mb_xy]; + const int mb_type = s->current_picture.f.mb_type[mb_xy]; uint8_t *dest[3]; int linesize; int i, j, p; @@ -1962,7 +2117,7 @@ for (p = 0; p < plane_count; p++) { - dest[p] = s->current_picture.data[p] + ((mb_x << pixel_shift) + mb_y * s->linesize) * 16; + dest[p] = s->current_picture.f.data[p] + ((mb_x << pixel_shift) + mb_y * s->linesize) * 16; s->dsp.prefetch(dest[p] + (s->mb_x&3)*4*s->linesize + (64 << pixel_shift), s->linesize, 4); } @@ -2026,18 +2181,11 @@ if(h->deblocking_filter) xchg_mb_border(h, dest[0], dest[1], dest[2], linesize, linesize, 0, 1, simple, pixel_shift); }else{ - if (pixel_shift) { - hl_motion_16(h, dest[0], dest[1], dest[2], - s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, - s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, - h->h264dsp.weight_h264_pixels_tab, - h->h264dsp.biweight_h264_pixels_tab, 1); - } else - hl_motion_8(h, dest[0], dest[1], dest[2], - s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, - s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, - h->h264dsp.weight_h264_pixels_tab, - h->h264dsp.biweight_h264_pixels_tab, 1); + hl_motion(h, dest[0], dest[1], dest[2], + s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, + s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, + h->h264dsp.weight_h264_pixels_tab, + h->h264dsp.biweight_h264_pixels_tab, pixel_shift, 3); } for (p = 0; p < plane_count; p++) @@ -2057,8 +2205,8 @@ static void hl_decode_mb_simple_ ## bits(H264Context *h){ \ hl_decode_mb_internal(h, 1, sh); \ } -hl_decode_mb_simple(0, 8); -hl_decode_mb_simple(1, 16); +hl_decode_mb_simple(0, 8) +hl_decode_mb_simple(1, 16) /** * Process a macroblock; this handles edge cases, such as interlacing. @@ -2078,7 +2226,7 @@ void ff_h264_hl_decode_mb(H264Context *h){ MpegEncContext * const s = &h->s; const int mb_xy= h->mb_xy; - const int mb_type= s->current_picture.mb_type[mb_xy]; + const int mb_type = s->current_picture.f.mb_type[mb_xy]; int is_complex = CONFIG_SMALL || h->is_complex || IS_INTRA_PCM(mb_type) || s->qscale == 0; if (CHROMA444) { @@ -2170,7 +2318,11 @@ } if(field < 0){ - cur_poc = s->current_picture_ptr->poc; + if (s->picture_structure == PICT_FRAME) { + cur_poc = s->current_picture_ptr->poc; + } else { + cur_poc = s->current_picture_ptr->field_poc[s->picture_structure - 1]; + } if( h->ref_count[0] == 1 && h->ref_count[1] == 1 && !FRAME_MBAFF && h->ref_list[0][0].poc + h->ref_list[1][0].poc == 2*cur_poc){ h->use_weight= 0; @@ -2195,15 +2347,17 @@ for(ref0=ref_start; ref0 < ref_count0; ref0++){ int poc0 = h->ref_list[0][ref0].poc; for(ref1=ref_start; ref1 < ref_count1; ref1++){ - int poc1 = h->ref_list[1][ref1].poc; - int td = av_clip(poc1 - poc0, -128, 127); - int w= 32; - if(td){ - int tb = av_clip(cur_poc - poc0, -128, 127); - int tx = (16384 + (FFABS(td) >> 1)) / td; - int dist_scale_factor = (tb*tx + 32) >> 8; - if(dist_scale_factor >= -64 && dist_scale_factor <= 128) - w = 64 - dist_scale_factor; + int w = 32; + if (!h->ref_list[0][ref0].long_ref && !h->ref_list[1][ref1].long_ref) { + int poc1 = h->ref_list[1][ref1].poc; + int td = av_clip(poc1 - poc0, -128, 127); + if(td){ + int tb = av_clip(cur_poc - poc0, -128, 127); + int tx = (16384 + (FFABS(td) >> 1)) / td; + int dist_scale_factor = (tb*tx + 32) >> 8; + if(dist_scale_factor >= -64 && dist_scale_factor <= 128) + w = 64 - dist_scale_factor; + } } if(field<0){ h->implicit_weight[ref0][ref1][0]= @@ -2232,14 +2386,16 @@ int i; for(i=0; idelayed_pic[i]) - h->delayed_pic[i]->reference= 0; + h->delayed_pic[i]->f.reference = 0; h->delayed_pic[i]= NULL; } + for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++) + h->last_pocs[i] = INT_MIN; h->outputed_poc=h->next_outputed_poc= INT_MIN; h->prev_interlaced_frame = 1; idr(h); if(h->s.current_picture_ptr) - h->s.current_picture_ptr->reference= 0; + h->s.current_picture_ptr->f.reference = 0; h->s.first_field= 0; ff_h264_reset_sei(h); ff_mpeg_flush(avctx); @@ -2359,9 +2515,10 @@ } } -static void field_end(H264Context *h, int in_setup){ +static int field_end(H264Context *h, int in_setup){ MpegEncContext * const s = &h->s; AVCodecContext * const avctx= s->avctx; + int err = 0; s->mb_y= 0; if (!in_setup && !s->dropable) @@ -2373,7 +2530,7 @@ if(in_setup || !(avctx->active_thread_type&FF_THREAD_FRAME)){ if(!s->dropable) { - ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index); + err = ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index); h->prev_poc_msb= h->poc_msb; h->prev_poc_lsb= h->poc_lsb; } @@ -2408,6 +2565,8 @@ MPV_frame_end(s); h->current_slice=0; + + return err; } /** @@ -2438,7 +2597,7 @@ } /** - * computes profile from profile_idc and constraint_set?_flags + * Compute profile from profile_idc and constraint_set?_flags. * * @param sps SPS * @@ -2465,7 +2624,7 @@ } /** - * decodes a slice header. + * Decode a slice header. * This will also call MPV_common_init() and frame_start() as needed. * * @param h h264context @@ -2485,7 +2644,8 @@ s->dropable= h->nal_ref_idc == 0; - if((s->avctx->flags2 & CODEC_FLAG2_FAST) && !h->nal_ref_idc){ + /* FIXME: 2tap qpel isn't implemented for high bit depth. */ + if((s->avctx->flags2 & CODEC_FLAG2_FAST) && !h->nal_ref_idc && !h->pixel_shift){ s->me.qpel_put= s->dsp.put_2tap_qpel_pixels_tab; s->me.qpel_avg= s->dsp.avg_2tap_qpel_pixels_tab; }else{ @@ -2557,11 +2717,13 @@ h->b_stride= s->mb_width*4; + s->chroma_y_shift = h->sps.chroma_format_idc <= 1; // 400 uses yuv420p + s->width = 16*s->mb_width - (2>>CHROMA444)*FFMIN(h->sps.crop_right, (8<sps.frame_mbs_only_flag) - s->height= 16*s->mb_height - (2>>CHROMA444)*FFMIN(h->sps.crop_bottom, (8<height= 16*s->mb_height - (1<chroma_y_shift)*FFMIN(h->sps.crop_bottom, (16>>s->chroma_y_shift)-1); else - s->height= 16*s->mb_height - (4>>CHROMA444)*FFMIN(h->sps.crop_bottom, (8<height= 16*s->mb_height - (2<chroma_y_shift)*FFMIN(h->sps.crop_bottom, (16>>s->chroma_y_shift)-1); if (s->context_initialized && ( s->width != s->avctx->width || s->height != s->avctx->height @@ -2584,9 +2746,6 @@ s->avctx->sample_aspect_ratio= h->sps.sar; av_assert0(s->avctx->sample_aspect_ratio.den); - h->s.avctx->coded_width = 16*s->mb_width; - h->s.avctx->coded_height = 16*s->mb_height; - if(h->sps.video_signal_type_present_flag){ s->avctx->color_range = h->sps.full_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; if(h->sps.colour_description_present_flag){ @@ -2606,14 +2765,35 @@ switch (h->sps.bit_depth_luma) { case 9 : - s->avctx->pix_fmt = CHROMA444 ? PIX_FMT_YUV444P9 : PIX_FMT_YUV420P9; + if (CHROMA444) { + if (s->avctx->colorspace == AVCOL_SPC_RGB) { + s->avctx->pix_fmt = PIX_FMT_GBRP9; + } else + s->avctx->pix_fmt = PIX_FMT_YUV444P9; + } else if (CHROMA422) + s->avctx->pix_fmt = PIX_FMT_YUV422P9; + else + s->avctx->pix_fmt = PIX_FMT_YUV420P9; break; case 10 : - s->avctx->pix_fmt = CHROMA444 ? PIX_FMT_YUV444P10 : PIX_FMT_YUV420P10; + if (CHROMA444) { + if (s->avctx->colorspace == AVCOL_SPC_RGB) { + s->avctx->pix_fmt = PIX_FMT_GBRP10; + } else + s->avctx->pix_fmt = PIX_FMT_YUV444P10; + } else if (CHROMA422) + s->avctx->pix_fmt = PIX_FMT_YUV422P10; + else + s->avctx->pix_fmt = PIX_FMT_YUV420P10; break; default: if (CHROMA444){ - s->avctx->pix_fmt = s->avctx->color_range == AVCOL_RANGE_JPEG ? PIX_FMT_YUVJ444P : PIX_FMT_YUV444P; + if (s->avctx->colorspace == AVCOL_SPC_RGB) { + s->avctx->pix_fmt = PIX_FMT_GBRP; + } else + s->avctx->pix_fmt = s->avctx->color_range == AVCOL_RANGE_JPEG ? PIX_FMT_YUVJ444P : PIX_FMT_YUV444P; + } else if (CHROMA422) { + s->avctx->pix_fmt = s->avctx->color_range == AVCOL_RANGE_JPEG ? PIX_FMT_YUVJ422P : PIX_FMT_YUV422P; }else{ s->avctx->pix_fmt = s->avctx->get_format(s->avctx, s->avctx->codec->pix_fmts ? @@ -2634,7 +2814,10 @@ h->prev_interlaced_frame = 1; init_scan_tables(h); - ff_h264_alloc_tables(h); + if (ff_h264_alloc_tables(h) < 0) { + av_log(h->s.avctx, AV_LOG_ERROR, "Could not allocate memory for h264\n"); + return AVERROR(ENOMEM); + } if (!HAVE_THREADS || !(s->avctx->active_thread_type&FF_THREAD_SLICE)) { if (context_init(h) < 0) { @@ -2642,7 +2825,7 @@ return -1; } } else { - for(i = 1; i < s->avctx->thread_count; i++) { + for(i = 1; i < s->slice_context_count; i++) { H264Context *c; c = h->thread_context[i] = av_malloc(sizeof(H264Context)); memcpy(c, h->s.thread_context[i], sizeof(MpegEncContext)); @@ -2655,7 +2838,7 @@ clone_tables(c, h, i); } - for(i = 0; i < s->avctx->thread_count; i++) + for(i = 0; i < s->slice_context_count; i++) if (context_init(h->thread_context[i]) < 0) { av_log(h->s.avctx, AV_LOG_ERROR, "context_init() failed.\n"); return -1; @@ -2708,17 +2891,19 @@ ff_thread_report_progress((AVFrame*)s->current_picture_ptr, INT_MAX, 0); ff_thread_report_progress((AVFrame*)s->current_picture_ptr, INT_MAX, 1); ff_generate_sliding_window_mmcos(h); - ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index); + if (ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index) < 0 && + (s->avctx->err_recognition & AV_EF_EXPLODE)) + return AVERROR_INVALIDDATA; /* Error concealment: if a ref is missing, copy the previous ref in its place. * FIXME: avoiding a memcpy would be nice, but ref handling makes many assumptions * about there being no actual duplicates. * FIXME: this doesn't copy padding for out-of-frame motion vectors. Given we're - * concealing a lost frame, this probably isn't noticable by comparison, but it should + * concealing a lost frame, this probably isn't noticeable by comparison, but it should * be fixed. */ if (h->short_ref_count) { if (prev) { - av_image_copy(h->short_ref[0]->data, h->short_ref[0]->linesize, - (const uint8_t**)prev->data, prev->linesize, + av_image_copy(h->short_ref[0]->f.data, h->short_ref[0]->f.linesize, + (const uint8_t**)prev->f.data, prev->f.linesize, s->avctx->pix_fmt, s->mb_width*16, s->mb_height*16); h->short_ref[0]->poc = prev->poc+2; } @@ -2729,8 +2914,8 @@ /* See if we have a decoded first field looking for a pair... */ if (s0->first_field) { assert(s0->current_picture_ptr); - assert(s0->current_picture_ptr->data[0]); - assert(s0->current_picture_ptr->reference != DELAYED_PIC_REF); + assert(s0->current_picture_ptr->f.data[0]); + assert(s0->current_picture_ptr->f.reference != DELAYED_PIC_REF); /* figure out if we have a complementary field pair */ if (!FIELD_PICTURE || s->picture_structure == last_pic_structure) { @@ -2743,7 +2928,7 @@ } else { if (h->nal_ref_idc && - s0->current_picture_ptr->reference && + s0->current_picture_ptr->f.reference && s0->current_picture_ptr->frame_num != h->frame_num) { /* * This and previous field were reference, but had @@ -2857,8 +3042,10 @@ ff_h264_fill_default_ref_list(h); } - if(h->slice_type_nos!=AV_PICTURE_TYPE_I && ff_h264_decode_ref_pic_list_reordering(h) < 0) + if(h->slice_type_nos!=AV_PICTURE_TYPE_I && ff_h264_decode_ref_pic_list_reordering(h) < 0) { + h->ref_count[1]= h->ref_count[0]= 0; return -1; + } if(h->slice_type_nos!=AV_PICTURE_TYPE_I){ s->last_picture_ptr= &h->ref_list[0][0]; @@ -2882,8 +3069,9 @@ } } - if(h->nal_ref_idc) - ff_h264_decode_ref_pic_marking(h0, &s->gb); + if(h->nal_ref_idc && ff_h264_decode_ref_pic_marking(h0, &s->gb) < 0 && + (s->avctx->err_recognition & AV_EF_EXPLODE)) + return AVERROR_INVALIDDATA; if(FRAME_MBAFF){ ff_h264_fill_mbaff_ref_list(h); @@ -2971,7 +3159,9 @@ } } } - h->qp_thresh= 15 + 52 - FFMIN(h->slice_alpha_c0_offset, h->slice_beta_offset) - FFMAX3(0, h->pps.chroma_qp_index_offset[0], h->pps.chroma_qp_index_offset[1]); + h->qp_thresh = 15 + 52 - FFMIN(h->slice_alpha_c0_offset, h->slice_beta_offset) + - FFMAX3(0, h->pps.chroma_qp_index_offset[0], h->pps.chroma_qp_index_offset[1]) + + 6 * (h->sps.bit_depth_luma - 8); #if 0 //FMO if( h->pps.num_slice_groups > 1 && h->pps.mb_slice_group_map_type >= 3 && h->pps.mb_slice_group_map_type <= 5) @@ -2989,16 +3179,16 @@ int *ref2frm= h->ref2frm[h->slice_num&(MAX_SLICES-1)][j]; for(i=0; i<16; i++){ id_list[i]= 60; - if(h->ref_list[j][i].data[0]){ + if (h->ref_list[j][i].f.data[0]) { int k; - uint8_t *base= h->ref_list[j][i].base[0]; + uint8_t *base = h->ref_list[j][i].f.base[0]; for(k=0; kshort_ref_count; k++) - if(h->short_ref[k]->base[0] == base){ + if (h->short_ref[k]->f.base[0] == base) { id_list[i]= k; break; } for(k=0; klong_ref_count; k++) - if(h->long_ref[k] && h->long_ref[k]->base[0] == base){ + if (h->long_ref[k] && h->long_ref[k]->f.base[0] == base) { id_list[i]= h->short_ref_count + k; break; } @@ -3009,12 +3199,12 @@ ref2frm[1]= -1; for(i=0; i<16; i++) ref2frm[i+2]= 4*id_list[i] - +(h->ref_list[j][i].reference&3); + + (h->ref_list[j][i].f.reference & 3); ref2frm[18+0]= ref2frm[18+1]= -1; for(i=16; i<48; i++) ref2frm[i+4]= 4*id_list[(i-16)>>1] - +(h->ref_list[j][i].reference&3); + + (h->ref_list[j][i].f.reference & 3); } //FIXME: fix draw_edges+PAFF+frame threads @@ -3053,215 +3243,207 @@ } } +static av_always_inline void fill_filter_caches_inter(H264Context *h, MpegEncContext * const s, int mb_type, int top_xy, + int left_xy[LEFT_MBS], int top_type, int left_type[LEFT_MBS], int mb_xy, int list) +{ + int b_stride = h->b_stride; + int16_t (*mv_dst)[2] = &h->mv_cache[list][scan8[0]]; + int8_t *ref_cache = &h->ref_cache[list][scan8[0]]; + if(IS_INTER(mb_type) || IS_DIRECT(mb_type)){ + if(USES_LIST(top_type, list)){ + const int b_xy= h->mb2b_xy[top_xy] + 3*b_stride; + const int b8_xy= 4*top_xy + 2; + int (*ref2frm)[64] = h->ref2frm[ h->slice_table[top_xy]&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2); + AV_COPY128(mv_dst - 1*8, s->current_picture.f.motion_val[list][b_xy + 0]); + ref_cache[0 - 1*8]= + ref_cache[1 - 1*8]= ref2frm[list][s->current_picture.f.ref_index[list][b8_xy + 0]]; + ref_cache[2 - 1*8]= + ref_cache[3 - 1*8]= ref2frm[list][s->current_picture.f.ref_index[list][b8_xy + 1]]; + }else{ + AV_ZERO128(mv_dst - 1*8); + AV_WN32A(&ref_cache[0 - 1*8], ((LIST_NOT_USED)&0xFF)*0x01010101u); + } + + if(!IS_INTERLACED(mb_type^left_type[LTOP])){ + if(USES_LIST(left_type[LTOP], list)){ + const int b_xy= h->mb2b_xy[left_xy[LTOP]] + 3; + const int b8_xy= 4*left_xy[LTOP] + 1; + int (*ref2frm)[64] = h->ref2frm[ h->slice_table[left_xy[LTOP]]&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2); + AV_COPY32(mv_dst - 1 + 0, s->current_picture.f.motion_val[list][b_xy + b_stride*0]); + AV_COPY32(mv_dst - 1 + 8, s->current_picture.f.motion_val[list][b_xy + b_stride*1]); + AV_COPY32(mv_dst - 1 + 16, s->current_picture.f.motion_val[list][b_xy + b_stride*2]); + AV_COPY32(mv_dst - 1 + 24, s->current_picture.f.motion_val[list][b_xy + b_stride*3]); + ref_cache[-1 + 0]= + ref_cache[-1 + 8]= ref2frm[list][s->current_picture.f.ref_index[list][b8_xy + 2*0]]; + ref_cache[-1 + 16]= + ref_cache[-1 + 24]= ref2frm[list][s->current_picture.f.ref_index[list][b8_xy + 2*1]]; + }else{ + AV_ZERO32(mv_dst - 1 + 0); + AV_ZERO32(mv_dst - 1 + 8); + AV_ZERO32(mv_dst - 1 +16); + AV_ZERO32(mv_dst - 1 +24); + ref_cache[-1 + 0]= + ref_cache[-1 + 8]= + ref_cache[-1 + 16]= + ref_cache[-1 + 24]= LIST_NOT_USED; + } + } + } + + if(!USES_LIST(mb_type, list)){ + fill_rectangle(mv_dst, 4, 4, 8, pack16to32(0,0), 4); + AV_WN32A(&ref_cache[0*8], ((LIST_NOT_USED)&0xFF)*0x01010101u); + AV_WN32A(&ref_cache[1*8], ((LIST_NOT_USED)&0xFF)*0x01010101u); + AV_WN32A(&ref_cache[2*8], ((LIST_NOT_USED)&0xFF)*0x01010101u); + AV_WN32A(&ref_cache[3*8], ((LIST_NOT_USED)&0xFF)*0x01010101u); + return; + } + + { + int8_t *ref = &s->current_picture.f.ref_index[list][4*mb_xy]; + int (*ref2frm)[64] = h->ref2frm[ h->slice_num&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2); + uint32_t ref01 = (pack16to32(ref2frm[list][ref[0]],ref2frm[list][ref[1]])&0x00FF00FF)*0x0101; + uint32_t ref23 = (pack16to32(ref2frm[list][ref[2]],ref2frm[list][ref[3]])&0x00FF00FF)*0x0101; + AV_WN32A(&ref_cache[0*8], ref01); + AV_WN32A(&ref_cache[1*8], ref01); + AV_WN32A(&ref_cache[2*8], ref23); + AV_WN32A(&ref_cache[3*8], ref23); + } + + { + int16_t (*mv_src)[2] = &s->current_picture.f.motion_val[list][4*s->mb_x + 4*s->mb_y*b_stride]; + AV_COPY128(mv_dst + 8*0, mv_src + 0*b_stride); + AV_COPY128(mv_dst + 8*1, mv_src + 1*b_stride); + AV_COPY128(mv_dst + 8*2, mv_src + 2*b_stride); + AV_COPY128(mv_dst + 8*3, mv_src + 3*b_stride); + } +} + /** * - * @return non zero if the loop filter can be skiped + * @return non zero if the loop filter can be skipped */ static int fill_filter_caches(H264Context *h, int mb_type){ MpegEncContext * const s = &h->s; const int mb_xy= h->mb_xy; - int top_xy, left_xy[2]; - int top_type, left_type[2]; + int top_xy, left_xy[LEFT_MBS]; + int top_type, left_type[LEFT_MBS]; + uint8_t *nnz; + uint8_t *nnz_cache; top_xy = mb_xy - (s->mb_stride << MB_FIELD); - //FIXME deblocking could skip the intra and nnz parts. - /* Wow, what a mess, why didn't they simplify the interlacing & intra * stuff, I can't imagine that these complex rules are worth it. */ - left_xy[1] = left_xy[0] = mb_xy-1; + left_xy[LBOT] = left_xy[LTOP] = mb_xy-1; if(FRAME_MBAFF){ - const int left_mb_field_flag = IS_INTERLACED(s->current_picture.mb_type[mb_xy-1]); + const int left_mb_field_flag = IS_INTERLACED(s->current_picture.f.mb_type[mb_xy - 1]); const int curr_mb_field_flag = IS_INTERLACED(mb_type); if(s->mb_y&1){ if (left_mb_field_flag != curr_mb_field_flag) { - left_xy[0] -= s->mb_stride; + left_xy[LTOP] -= s->mb_stride; } }else{ if(curr_mb_field_flag){ - top_xy += s->mb_stride & (((s->current_picture.mb_type[top_xy ]>>7)&1)-1); + top_xy += s->mb_stride & (((s->current_picture.f.mb_type[top_xy] >> 7) & 1) - 1); } if (left_mb_field_flag != curr_mb_field_flag) { - left_xy[1] += s->mb_stride; + left_xy[LBOT] += s->mb_stride; } } } h->top_mb_xy = top_xy; - h->left_mb_xy[0] = left_xy[0]; - h->left_mb_xy[1] = left_xy[1]; + h->left_mb_xy[LTOP] = left_xy[LTOP]; + h->left_mb_xy[LBOT] = left_xy[LBOT]; { //for sufficiently low qp, filtering wouldn't do anything //this is a conservative estimate: could also check beta_offset and more accurate chroma_qp int qp_thresh = h->qp_thresh; //FIXME strictly we should store qp_thresh for each mb of a slice - int qp = s->current_picture.qscale_table[mb_xy]; + int qp = s->current_picture.f.qscale_table[mb_xy]; if(qp <= qp_thresh - && (left_xy[0]<0 || ((qp + s->current_picture.qscale_table[left_xy[0]] + 1)>>1) <= qp_thresh) - && (top_xy < 0 || ((qp + s->current_picture.qscale_table[top_xy ] + 1)>>1) <= qp_thresh)){ + && (left_xy[LTOP] < 0 || ((qp + s->current_picture.f.qscale_table[left_xy[LTOP]] + 1) >> 1) <= qp_thresh) + && (top_xy < 0 || ((qp + s->current_picture.f.qscale_table[top_xy ] + 1) >> 1) <= qp_thresh)) { if(!FRAME_MBAFF) return 1; - if( (left_xy[0]< 0 || ((qp + s->current_picture.qscale_table[left_xy[1] ] + 1)>>1) <= qp_thresh) - && (top_xy < s->mb_stride || ((qp + s->current_picture.qscale_table[top_xy -s->mb_stride] + 1)>>1) <= qp_thresh)) + if ((left_xy[LTOP] < 0 || ((qp + s->current_picture.f.qscale_table[left_xy[LBOT] ] + 1) >> 1) <= qp_thresh) && + (top_xy < s->mb_stride || ((qp + s->current_picture.f.qscale_table[top_xy - s->mb_stride] + 1) >> 1) <= qp_thresh)) return 1; } } - top_type = s->current_picture.mb_type[top_xy] ; - left_type[0] = s->current_picture.mb_type[left_xy[0]]; - left_type[1] = s->current_picture.mb_type[left_xy[1]]; + top_type = s->current_picture.f.mb_type[top_xy]; + left_type[LTOP] = s->current_picture.f.mb_type[left_xy[LTOP]]; + left_type[LBOT] = s->current_picture.f.mb_type[left_xy[LBOT]]; if(h->deblocking_filter == 2){ - if(h->slice_table[top_xy ] != h->slice_num) top_type= 0; - if(h->slice_table[left_xy[0] ] != h->slice_num) left_type[0]= left_type[1]= 0; + if(h->slice_table[top_xy ] != h->slice_num) top_type= 0; + if(h->slice_table[left_xy[LBOT]] != h->slice_num) left_type[LTOP]= left_type[LBOT]= 0; }else{ - if(h->slice_table[top_xy ] == 0xFFFF) top_type= 0; - if(h->slice_table[left_xy[0] ] == 0xFFFF) left_type[0]= left_type[1] =0; + if(h->slice_table[top_xy ] == 0xFFFF) top_type= 0; + if(h->slice_table[left_xy[LBOT]] == 0xFFFF) left_type[LTOP]= left_type[LBOT] =0; } - h->top_type = top_type ; - h->left_type[0]= left_type[0]; - h->left_type[1]= left_type[1]; + h->top_type = top_type; + h->left_type[LTOP]= left_type[LTOP]; + h->left_type[LBOT]= left_type[LBOT]; if(IS_INTRA(mb_type)) return 0; - AV_COPY32(&h->non_zero_count_cache[4+8* 1], &h->non_zero_count[mb_xy][ 0]); - AV_COPY32(&h->non_zero_count_cache[4+8* 2], &h->non_zero_count[mb_xy][ 4]); - AV_COPY32(&h->non_zero_count_cache[4+8* 3], &h->non_zero_count[mb_xy][ 8]); - AV_COPY32(&h->non_zero_count_cache[4+8* 4], &h->non_zero_count[mb_xy][12]); - + fill_filter_caches_inter(h, s, mb_type, top_xy, left_xy, top_type, left_type, mb_xy, 0); + if(h->list_count == 2) + fill_filter_caches_inter(h, s, mb_type, top_xy, left_xy, top_type, left_type, mb_xy, 1); + + nnz = h->non_zero_count[mb_xy]; + nnz_cache = h->non_zero_count_cache; + AV_COPY32(&nnz_cache[4+8*1], &nnz[ 0]); + AV_COPY32(&nnz_cache[4+8*2], &nnz[ 4]); + AV_COPY32(&nnz_cache[4+8*3], &nnz[ 8]); + AV_COPY32(&nnz_cache[4+8*4], &nnz[12]); h->cbp= h->cbp_table[mb_xy]; - { - int list; - for(list=0; listlist_count; list++){ - int8_t *ref; - int y, b_stride; - int16_t (*mv_dst)[2]; - int16_t (*mv_src)[2]; - - if(!USES_LIST(mb_type, list)){ - fill_rectangle( h->mv_cache[list][scan8[0]], 4, 4, 8, pack16to32(0,0), 4); - AV_WN32A(&h->ref_cache[list][scan8[ 0]], ((LIST_NOT_USED)&0xFF)*0x01010101u); - AV_WN32A(&h->ref_cache[list][scan8[ 2]], ((LIST_NOT_USED)&0xFF)*0x01010101u); - AV_WN32A(&h->ref_cache[list][scan8[ 8]], ((LIST_NOT_USED)&0xFF)*0x01010101u); - AV_WN32A(&h->ref_cache[list][scan8[10]], ((LIST_NOT_USED)&0xFF)*0x01010101u); - continue; - } - - ref = &s->current_picture.ref_index[list][4*mb_xy]; - { - int (*ref2frm)[64] = h->ref2frm[ h->slice_num&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2); - AV_WN32A(&h->ref_cache[list][scan8[ 0]], (pack16to32(ref2frm[list][ref[0]],ref2frm[list][ref[1]])&0x00FF00FF)*0x0101); - AV_WN32A(&h->ref_cache[list][scan8[ 2]], (pack16to32(ref2frm[list][ref[0]],ref2frm[list][ref[1]])&0x00FF00FF)*0x0101); - ref += 2; - AV_WN32A(&h->ref_cache[list][scan8[ 8]], (pack16to32(ref2frm[list][ref[0]],ref2frm[list][ref[1]])&0x00FF00FF)*0x0101); - AV_WN32A(&h->ref_cache[list][scan8[10]], (pack16to32(ref2frm[list][ref[0]],ref2frm[list][ref[1]])&0x00FF00FF)*0x0101); - } - - b_stride = h->b_stride; - mv_dst = &h->mv_cache[list][scan8[0]]; - mv_src = &s->current_picture.motion_val[list][4*s->mb_x + 4*s->mb_y*b_stride]; - for(y=0; y<4; y++){ - AV_COPY128(mv_dst + 8*y, mv_src + y*b_stride); - } - - } - } - - -/* -0 . T T. T T T T -1 L . .L . . . . -2 L . .L . . . . -3 . T TL . . . . -4 L . .L . . . . -5 L . .. . . . . -*/ -//FIXME constraint_intra_pred & partitioning & nnz (let us hope this is just a typo in the spec) if(top_type){ - AV_COPY32(&h->non_zero_count_cache[4+8*0], &h->non_zero_count[top_xy][3*4]); + nnz = h->non_zero_count[top_xy]; + AV_COPY32(&nnz_cache[4+8*0], &nnz[3*4]); } - if(left_type[0]){ - h->non_zero_count_cache[3+8*1]= h->non_zero_count[left_xy[0]][3+0*4]; - h->non_zero_count_cache[3+8*2]= h->non_zero_count[left_xy[0]][3+1*4]; - h->non_zero_count_cache[3+8*3]= h->non_zero_count[left_xy[0]][3+2*4]; - h->non_zero_count_cache[3+8*4]= h->non_zero_count[left_xy[0]][3+3*4]; + if(left_type[LTOP]){ + nnz = h->non_zero_count[left_xy[LTOP]]; + nnz_cache[3+8*1]= nnz[3+0*4]; + nnz_cache[3+8*2]= nnz[3+1*4]; + nnz_cache[3+8*3]= nnz[3+2*4]; + nnz_cache[3+8*4]= nnz[3+3*4]; } // CAVLC 8x8dct requires NNZ values for residual decoding that differ from what the loop filter needs if(!CABAC && h->pps.transform_8x8_mode){ if(IS_8x8DCT(top_type)){ - h->non_zero_count_cache[4+8*0]= - h->non_zero_count_cache[5+8*0]= (h->cbp_table[top_xy] & 0x4000) >> 12; - h->non_zero_count_cache[6+8*0]= - h->non_zero_count_cache[7+8*0]= (h->cbp_table[top_xy] & 0x8000) >> 12; - } - if(IS_8x8DCT(left_type[0])){ - h->non_zero_count_cache[3+8*1]= - h->non_zero_count_cache[3+8*2]= (h->cbp_table[left_xy[0]]&0x2000) >> 12; //FIXME check MBAFF - } - if(IS_8x8DCT(left_type[1])){ - h->non_zero_count_cache[3+8*3]= - h->non_zero_count_cache[3+8*4]= (h->cbp_table[left_xy[1]]&0x8000) >> 12; //FIXME check MBAFF + nnz_cache[4+8*0]= + nnz_cache[5+8*0]= (h->cbp_table[top_xy] & 0x4000) >> 12; + nnz_cache[6+8*0]= + nnz_cache[7+8*0]= (h->cbp_table[top_xy] & 0x8000) >> 12; + } + if(IS_8x8DCT(left_type[LTOP])){ + nnz_cache[3+8*1]= + nnz_cache[3+8*2]= (h->cbp_table[left_xy[LTOP]]&0x2000) >> 12; //FIXME check MBAFF + } + if(IS_8x8DCT(left_type[LBOT])){ + nnz_cache[3+8*3]= + nnz_cache[3+8*4]= (h->cbp_table[left_xy[LBOT]]&0x8000) >> 12; //FIXME check MBAFF } if(IS_8x8DCT(mb_type)){ - h->non_zero_count_cache[scan8[0 ]]= h->non_zero_count_cache[scan8[1 ]]= - h->non_zero_count_cache[scan8[2 ]]= h->non_zero_count_cache[scan8[3 ]]= (h->cbp & 0x1000) >> 12; + nnz_cache[scan8[0 ]]= nnz_cache[scan8[1 ]]= + nnz_cache[scan8[2 ]]= nnz_cache[scan8[3 ]]= (h->cbp & 0x1000) >> 12; - h->non_zero_count_cache[scan8[0+ 4]]= h->non_zero_count_cache[scan8[1+ 4]]= - h->non_zero_count_cache[scan8[2+ 4]]= h->non_zero_count_cache[scan8[3+ 4]]= (h->cbp & 0x2000) >> 12; + nnz_cache[scan8[0+ 4]]= nnz_cache[scan8[1+ 4]]= + nnz_cache[scan8[2+ 4]]= nnz_cache[scan8[3+ 4]]= (h->cbp & 0x2000) >> 12; - h->non_zero_count_cache[scan8[0+ 8]]= h->non_zero_count_cache[scan8[1+ 8]]= - h->non_zero_count_cache[scan8[2+ 8]]= h->non_zero_count_cache[scan8[3+ 8]]= (h->cbp & 0x4000) >> 12; + nnz_cache[scan8[0+ 8]]= nnz_cache[scan8[1+ 8]]= + nnz_cache[scan8[2+ 8]]= nnz_cache[scan8[3+ 8]]= (h->cbp & 0x4000) >> 12; - h->non_zero_count_cache[scan8[0+12]]= h->non_zero_count_cache[scan8[1+12]]= - h->non_zero_count_cache[scan8[2+12]]= h->non_zero_count_cache[scan8[3+12]]= (h->cbp & 0x8000) >> 12; - } - } - - if(IS_INTER(mb_type) || IS_DIRECT(mb_type)){ - int list; - for(list=0; listlist_count; list++){ - if(USES_LIST(top_type, list)){ - const int b_xy= h->mb2b_xy[top_xy] + 3*h->b_stride; - const int b8_xy= 4*top_xy + 2; - int (*ref2frm)[64] = h->ref2frm[ h->slice_table[top_xy]&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2); - AV_COPY128(h->mv_cache[list][scan8[0] + 0 - 1*8], s->current_picture.motion_val[list][b_xy + 0]); - h->ref_cache[list][scan8[0] + 0 - 1*8]= - h->ref_cache[list][scan8[0] + 1 - 1*8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 0]]; - h->ref_cache[list][scan8[0] + 2 - 1*8]= - h->ref_cache[list][scan8[0] + 3 - 1*8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 1]]; - }else{ - AV_ZERO128(h->mv_cache[list][scan8[0] + 0 - 1*8]); - AV_WN32A(&h->ref_cache[list][scan8[0] + 0 - 1*8], ((LIST_NOT_USED)&0xFF)*0x01010101u); - } - - if(!IS_INTERLACED(mb_type^left_type[0])){ - if(USES_LIST(left_type[0], list)){ - const int b_xy= h->mb2b_xy[left_xy[0]] + 3; - const int b8_xy= 4*left_xy[0] + 1; - int (*ref2frm)[64] = h->ref2frm[ h->slice_table[left_xy[0]]&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2); - AV_COPY32(h->mv_cache[list][scan8[0] - 1 + 0 ], s->current_picture.motion_val[list][b_xy + h->b_stride*0]); - AV_COPY32(h->mv_cache[list][scan8[0] - 1 + 8 ], s->current_picture.motion_val[list][b_xy + h->b_stride*1]); - AV_COPY32(h->mv_cache[list][scan8[0] - 1 +16 ], s->current_picture.motion_val[list][b_xy + h->b_stride*2]); - AV_COPY32(h->mv_cache[list][scan8[0] - 1 +24 ], s->current_picture.motion_val[list][b_xy + h->b_stride*3]); - h->ref_cache[list][scan8[0] - 1 + 0 ]= - h->ref_cache[list][scan8[0] - 1 + 8 ]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 2*0]]; - h->ref_cache[list][scan8[0] - 1 +16 ]= - h->ref_cache[list][scan8[0] - 1 +24 ]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 2*1]]; - }else{ - AV_ZERO32(h->mv_cache [list][scan8[0] - 1 + 0 ]); - AV_ZERO32(h->mv_cache [list][scan8[0] - 1 + 8 ]); - AV_ZERO32(h->mv_cache [list][scan8[0] - 1 +16 ]); - AV_ZERO32(h->mv_cache [list][scan8[0] - 1 +24 ]); - h->ref_cache[list][scan8[0] - 1 + 0 ]= - h->ref_cache[list][scan8[0] - 1 + 8 ]= - h->ref_cache[list][scan8[0] - 1 + 16 ]= - h->ref_cache[list][scan8[0] - 1 + 24 ]= LIST_NOT_USED; - } - } + nnz_cache[scan8[0+12]]= nnz_cache[scan8[1+12]]= + nnz_cache[scan8[2+12]]= nnz_cache[scan8[3+12]]= (h->cbp & 0x8000) >> 12; } } @@ -3275,6 +3457,7 @@ const int end_mb_y= s->mb_y + FRAME_MBAFF; const int old_slice_type= h->slice_type; const int pixel_shift = h->pixel_shift; + const int block_h = 16 >> s->chroma_y_shift; if(h->deblocking_filter) { for(mb_x= start_x; mb_xmb_xy = mb_x + mb_y*s->mb_stride; h->slice_num= h->slice_table[mb_xy]; - mb_type= s->current_picture.mb_type[mb_xy]; + mb_type = s->current_picture.f.mb_type[mb_xy]; h->list_count= h->list_counts[mb_xy]; if(FRAME_MBAFF) @@ -3290,9 +3473,9 @@ s->mb_x= mb_x; s->mb_y= mb_y; - dest_y = s->current_picture.data[0] + ((mb_x << pixel_shift) + mb_y * s->linesize ) * 16; - dest_cb = s->current_picture.data[1] + ((mb_x << pixel_shift) + mb_y * s->uvlinesize) * (8 << CHROMA444); - dest_cr = s->current_picture.data[2] + ((mb_x << pixel_shift) + mb_y * s->uvlinesize) * (8 << CHROMA444); + dest_y = s->current_picture.f.data[0] + ((mb_x << pixel_shift) + mb_y * s->linesize ) * 16; + dest_cb = s->current_picture.f.data[1] + (mb_x << pixel_shift) * (8 << CHROMA444) + mb_y * s->uvlinesize * block_h; + dest_cr = s->current_picture.f.data[2] + (mb_x << pixel_shift) * (8 << CHROMA444) + mb_y * s->uvlinesize * block_h; //FIXME simplify above if (MB_FIELD) { @@ -3300,18 +3483,18 @@ uvlinesize = h->mb_uvlinesize = s->uvlinesize * 2; if(mb_y&1){ //FIXME move out of this function? dest_y -= s->linesize*15; - dest_cb-= s->uvlinesize*((8 << CHROMA444)-1); - dest_cr-= s->uvlinesize*((8 << CHROMA444)-1); + dest_cb-= s->uvlinesize * (block_h - 1); + dest_cr-= s->uvlinesize * (block_h - 1); } } else { linesize = h->mb_linesize = s->linesize; uvlinesize = h->mb_uvlinesize = s->uvlinesize; } - backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, CHROMA444, 0); + backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 0); if(fill_filter_caches(h, mb_type)) continue; - h->chroma_qp[0] = get_chroma_qp(h, 0, s->current_picture.qscale_table[mb_xy]); - h->chroma_qp[1] = get_chroma_qp(h, 1, s->current_picture.qscale_table[mb_xy]); + h->chroma_qp[0] = get_chroma_qp(h, 0, s->current_picture.f.qscale_table[mb_xy]); + h->chroma_qp[1] = get_chroma_qp(h, 1, s->current_picture.f.qscale_table[mb_xy]); if (FRAME_MBAFF) { ff_h264_filter_mb (h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize, uvlinesize); @@ -3332,9 +3515,9 @@ MpegEncContext * const s = &h->s; const int mb_xy= s->mb_x + s->mb_y*s->mb_stride; int mb_type = (h->slice_table[mb_xy-1] == h->slice_num) - ? s->current_picture.mb_type[mb_xy-1] + ? s->current_picture.f.mb_type[mb_xy - 1] : (h->slice_table[mb_xy-s->mb_stride] == h->slice_num) - ? s->current_picture.mb_type[mb_xy-s->mb_stride] + ? s->current_picture.f.mb_type[mb_xy - s->mb_stride] : 0; h->mb_mbaff = h->mb_field_decoding_flag = IS_INTERLACED(mb_type) ? 1 : 0; } @@ -3376,7 +3559,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){ H264Context *h = *(void**)arg; MpegEncContext * const s = &h->s; - const int part_mask= s->partitioned_frame ? (AC_END|AC_ERROR) : 0x7F; + const int part_mask= s->partitioned_frame ? (ER_AC_END|ER_AC_ERROR) : 0x7F; int lf_x_start = s->mb_x; s->mb_skip_run= -1; @@ -3415,13 +3598,13 @@ eos = get_cabac_terminate( &h->cabac ); if((s->workaround_bugs & FF_BUG_TRUNCATED) && h->cabac.bytestream > h->cabac.bytestream_end + 2){ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END&part_mask); if (s->mb_x >= lf_x_start) loop_filter(h, lf_x_start, s->mb_x + 1); return 0; } if( ret < 0 || h->cabac.bytestream > h->cabac.bytestream_end + 2) { av_log(h->s.avctx, AV_LOG_ERROR, "error while decoding MB %d %d, bytestream (%td)\n", s->mb_x, s->mb_y, h->cabac.bytestream_end - h->cabac.bytestream); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR&part_mask); return -1; } @@ -3439,7 +3622,7 @@ if( eos || s->mb_y >= s->mb_height ) { tprintf(s->avctx, "slice end %d %d\n", get_bits_count(&s->gb), s->gb.size_in_bits); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END&part_mask); if (s->mb_x > lf_x_start) loop_filter(h, lf_x_start, s->mb_x); return 0; } @@ -3461,7 +3644,7 @@ if(ret<0){ av_log(h->s.avctx, AV_LOG_ERROR, "error while decoding MB %d %d\n", s->mb_x, s->mb_y); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR&part_mask); return -1; } @@ -3479,11 +3662,11 @@ tprintf(s->avctx, "slice end %d %d\n", get_bits_count(&s->gb), s->gb.size_in_bits); if(get_bits_count(&s->gb) == s->gb.size_in_bits ) { - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END&part_mask); return 0; }else{ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_END&part_mask); return -1; } @@ -3493,65 +3676,18 @@ if(get_bits_count(&s->gb) >= s->gb.size_in_bits && s->mb_skip_run<=0){ tprintf(s->avctx, "slice end %d %d\n", get_bits_count(&s->gb), s->gb.size_in_bits); if(get_bits_count(&s->gb) == s->gb.size_in_bits ){ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END&part_mask); if (s->mb_x > lf_x_start) loop_filter(h, lf_x_start, s->mb_x); return 0; }else{ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR&part_mask); return -1; } } } } - -#if 0 - for(;s->mb_y < s->mb_height; s->mb_y++){ - for(;s->mb_x < s->mb_width; s->mb_x++){ - int ret= decode_mb(h); - - ff_h264_hl_decode_mb(h); - - if(ret<0){ - av_log(s->avctx, AV_LOG_ERROR, "error while decoding MB %d %d\n", s->mb_x, s->mb_y); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask); - - return -1; - } - - if(++s->mb_x >= s->mb_width){ - s->mb_x=0; - if(++s->mb_y >= s->mb_height){ - if(get_bits_count(s->gb) == s->gb.size_in_bits){ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); - - return 0; - }else{ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); - - return -1; - } - } - } - - if(get_bits_count(s->?gb) >= s->gb?.size_in_bits){ - if(get_bits_count(s->gb) == s->gb.size_in_bits){ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); - - return 0; - }else{ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask); - - return -1; - } - } - } - s->mb_x=0; - ff_draw_horiz_band(s, 16*s->mb_y, 16); - } -#endif - return -1; //not reached } /** @@ -3560,26 +3696,24 @@ * @param h h264 master context * @param context_count number of contexts to execute */ -static void execute_decode_slices(H264Context *h, int context_count){ +static int execute_decode_slices(H264Context *h, int context_count){ MpegEncContext * const s = &h->s; AVCodecContext * const avctx= s->avctx; H264Context *hx; int i; - if (s->avctx->hwaccel) - return; - if(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) - return; + if (s->avctx->hwaccel || s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) + return 0; if(context_count == 1) { - decode_slice(avctx, &h); + return decode_slice(avctx, &h); } else { for(i = 1; i < context_count; i++) { hx = h->thread_context[i]; - hx->s.error_recognition = avctx->error_recognition; + hx->s.err_recognition = avctx->err_recognition; hx->s.error_count = 0; } - avctx->execute(avctx, (void *)decode_slice, + avctx->execute(avctx, decode_slice, h->thread_context, NULL, context_count, sizeof(void*)); /* pull back stuff from slices to master context */ @@ -3591,6 +3725,8 @@ for(i = 1; i < context_count; i++) h->s.error_count += h->thread_context[i]->s.error_count; } + + return 0; } @@ -3605,7 +3741,7 @@ int nals_needed=0; ///< number of NALs that need decoding before the next frame thread starts int nal_index; - h->max_contexts = (HAVE_THREADS && (s->avctx->active_thread_type&FF_THREAD_SLICE)) ? avctx->thread_count : 1; + h->max_contexts = s->slice_context_count; if(!(s->flags2 & CODEC_FLAG2_CHUNKS)){ h->current_slice = 0; if (!s->first_field) @@ -3622,12 +3758,12 @@ int consumed; int dst_length; int bit_length; - const uint8_t *ptr; + uint8_t *ptr; int i, nalsize = 0; int err; if(buf_index >= next_avc) { - if(buf_index >= buf_size) break; + if (buf_index >= buf_size - h->nal_length_size) break; nalsize = 0; for(i = 0; i < h->nal_length_size; i++) nalsize = (nalsize << 8) | buf[buf_index++]; @@ -3672,6 +3808,9 @@ } if (h->is_avc && (nalsize != consumed) && nalsize){ + // set trailing bits in the last partial byte to zero + if (bit_length & 7) + ptr[bit_length >> 3] = ptr[bit_length >> 3] & (0xff << 8 - (bit_length & 7)); av_log(h->s.avctx, AV_LOG_DEBUG, "AVC: Consumed only %d bytes instead of %d\n", consumed, nalsize); } @@ -3685,9 +3824,13 @@ switch (hx->nal_unit_type) { case NAL_SPS: case NAL_PPS: + nals_needed = nal_index; + break; case NAL_IDR_SLICE: case NAL_SLICE: - nals_needed = nal_index; + init_get_bits(&hx->s.gb, ptr, bit_length); + if (!get_ue_golomb(&hx->s.gb)) + nals_needed = nal_index; } continue; } @@ -3704,7 +3847,7 @@ av_log(h->s.avctx, AV_LOG_ERROR, "Invalid mix of idr and non-idr slices"); return -1; } - idr(h); //FIXME ensure we don't loose some frames if there is reordering + idr(h); // FIXME ensure we don't lose some frames if there is reordering case NAL_SLICE: init_get_bits(&hx->s.gb, ptr, bit_length); hx->intra_gb_ptr= @@ -3714,7 +3857,7 @@ if((err = decode_slice_header(hx, h))) break; - s->current_picture_ptr->key_frame |= + s->current_picture_ptr->f.key_frame |= (hx->nal_unit_type == NAL_IDR_SLICE) || (h->sei_recovery_frame_cnt >= 0); @@ -3788,16 +3931,19 @@ if(avctx->has_b_frames < 2) avctx->has_b_frames= !s->low_delay; - if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) { + if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma || + h->cur_chroma_format_idc != h->sps.chroma_format_idc) { if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) { avctx->bits_per_raw_sample = h->sps.bit_depth_luma; + h->cur_chroma_format_idc = h->sps.chroma_format_idc; h->pixel_shift = h->sps.bit_depth_luma > 8; - ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma); - ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma); + ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma, h->sps.chroma_format_idc); + ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma, h->sps.chroma_format_idc); + s->dsp.dct_bits = h->sps.bit_depth_luma > 8 ? 32 : 16; dsputil_init(&s->dsp, s->avctx); } else { - av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma); + av_log(avctx, AV_LOG_ERROR, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma); return -1; } } @@ -3844,7 +3990,7 @@ } /** - * returns the number of bytes consumed for building the current frame + * Return the number of bytes consumed for building the current frame. */ static int get_consumed_bytes(MpegEncContext *s, int pos, int buf_size){ if(pos==0) pos=1; //avoid infinite loops (i doubt that is needed but ...) @@ -3862,7 +4008,7 @@ H264Context *h = avctx->priv_data; MpegEncContext *s = &h->s; AVFrame *pict = data; - int buf_index; + int buf_index = 0; s->flags= avctx->flags; s->flags2= avctx->flags2; @@ -3878,7 +4024,7 @@ //FIXME factorize this with the output code below out = h->delayed_pic[0]; out_idx = 0; - for(i=1; h->delayed_pic[i] && !h->delayed_pic[i]->key_frame && !h->delayed_pic[i]->mmco_reset; i++) + for (i = 1; h->delayed_pic[i] && !h->delayed_pic[i]->f.key_frame && !h->delayed_pic[i]->mmco_reset; i++) if(h->delayed_pic[i]->poc < out->poc){ out = h->delayed_pic[i]; out_idx = i; @@ -3892,7 +4038,7 @@ *pict= *(AVFrame*)out; } - return 0; + return buf_index; } buf_index=decode_nal_units(h, buf, buf_size); @@ -3963,10 +4109,10 @@ uint8_t temp[SIZE]; PutBitContext pb; GetBitContext gb; -// int int_temp[10000]; DSPContext dsp; AVCodecContext avctx; + avctx.av_class = avcodec_get_class(); dsputil_init(&dsp, &avctx); init_put_bits(&pb, temp, SIZE); @@ -3980,9 +4126,7 @@ init_get_bits(&gb, temp, 8*SIZE); for(i=0; ih264dsp.h264_idct_add(ref, block, 4); -/* for(j=0; j<16; j++){ - printf("%d ", ref[j]); - } - printf("\n");*/ - - for(j=0; j<16; j++){ - int diff= FFABS(src[j] - ref[j]); - - error+= diff*diff; - max_error= FFMAX(max_error, diff); - } - } - printf("error=%f max_error=%d\n", ((float)error)/COUNT/16, (int)max_error ); - printf("testing quantizer\n"); - for(qp=0; qp<52; qp++){ - for(i=0; i<16; i++) - src1_block[i]= src2_block[i]= random()%255; - - } - printf("Testing NAL layer\n"); - - uint8_t bitstream[COUNT]; - uint8_t nal[COUNT*2]; - H264Context h; - memset(&h, 0, sizeof(H264Context)); - - for(i=0; imb_field_decoding_flag & !!s->mb_x; //for FMO:(s->current_picture.mb_type[mba_xy]>>7)&(h->slice_table[mba_xy] == h->slice_num); - ctx += (s->current_picture.mb_type[mbb_xy]>>7)&(h->slice_table[mbb_xy] == h->slice_num); + ctx += h->mb_field_decoding_flag & !!s->mb_x; //for FMO:(s->current_picture.f.mb_type[mba_xy] >> 7) & (h->slice_table[mba_xy] == h->slice_num); + ctx += (s->current_picture.f.mb_type[mbb_xy] >> 7) & (h->slice_table[mbb_xy] == h->slice_num); return get_cabac_noinline( &h->cabac, &(h->cabac_state+70)[ctx] ); } @@ -1296,9 +1296,9 @@ if(intra_slice){ int ctx=0; - if( h->left_type[0] & (MB_TYPE_INTRA16x16|MB_TYPE_INTRA_PCM)) + if( h->left_type[LTOP] & (MB_TYPE_INTRA16x16|MB_TYPE_INTRA_PCM)) ctx++; - if( h->top_type & (MB_TYPE_INTRA16x16|MB_TYPE_INTRA_PCM)) + if( h->top_type & (MB_TYPE_INTRA16x16|MB_TYPE_INTRA_PCM)) ctx++; if( get_cabac_noinline( &h->cabac, &state[ctx] ) == 0 ) return 0; /* I4x4 */ @@ -1330,13 +1330,13 @@ mba_xy = mb_xy - 1; if( (mb_y&1) && h->slice_table[mba_xy] == h->slice_num - && MB_FIELD == !!IS_INTERLACED( s->current_picture.mb_type[mba_xy] ) ) + && MB_FIELD == !!IS_INTERLACED( s->current_picture.f.mb_type[mba_xy] ) ) mba_xy += s->mb_stride; if( MB_FIELD ){ mbb_xy = mb_xy - s->mb_stride; if( !(mb_y&1) && h->slice_table[mbb_xy] == h->slice_num - && IS_INTERLACED( s->current_picture.mb_type[mbb_xy] ) ) + && IS_INTERLACED( s->current_picture.f.mb_type[mbb_xy] ) ) mbb_xy -= s->mb_stride; }else mbb_xy = mb_x + (mb_y-1)*s->mb_stride; @@ -1346,9 +1346,9 @@ mbb_xy = mb_xy - (s->mb_stride << FIELD_PICTURE); } - if( h->slice_table[mba_xy] == h->slice_num && !IS_SKIP( s->current_picture.mb_type[mba_xy] )) + if( h->slice_table[mba_xy] == h->slice_num && !IS_SKIP( s->current_picture.f.mb_type[mba_xy] )) ctx++; - if( h->slice_table[mbb_xy] == h->slice_num && !IS_SKIP( s->current_picture.mb_type[mbb_xy] )) + if( h->slice_table[mbb_xy] == h->slice_num && !IS_SKIP( s->current_picture.f.mb_type[mbb_xy] )) ctx++; if( h->slice_type_nos == AV_PICTURE_TYPE_B ) @@ -1376,10 +1376,10 @@ int ctx = 0; /* No need to test for IS_INTRA4x4 and IS_INTRA16x16, as we set chroma_pred_mode_table to 0 */ - if( h->left_type[0] && h->chroma_pred_mode_table[mba_xy] != 0 ) + if( h->left_type[LTOP] && h->chroma_pred_mode_table[mba_xy] != 0 ) ctx++; - if( h->top_type && h->chroma_pred_mode_table[mbb_xy] != 0 ) + if( h->top_type && h->chroma_pred_mode_table[mbb_xy] != 0 ) ctx++; if( get_cabac_noinline( &h->cabac, &h->cabac_state[64+ctx] ) == 0 ) @@ -1565,7 +1565,12 @@ 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8 }; -static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff, int is_dc ) { +static av_always_inline void +decode_cabac_residual_internal(H264Context *h, DCTELEM *block, + int cat, int n, const uint8_t *scantable, + const uint32_t *qmul, int max_coeff, + int is_dc, int chroma422) +{ static const int significant_coeff_flag_offset[2][14] = { { 105+0, 105+15, 105+29, 105+44, 105+47, 402, 484+0, 484+15, 484+29, 660, 528+0, 528+15, 528+29, 718 }, { 277+0, 277+15, 277+29, 277+44, 277+47, 436, 776+0, 776+15, 776+29, 675, 820+0, 820+15, 820+29, 733 } @@ -1587,12 +1592,16 @@ 9, 9,10,10, 8,11,12,11, 9, 9,10,10, 8,13,13, 9, 9,10,10, 8,13,13, 9, 9,10,10,14,14,14,14,14 } }; + static const uint8_t sig_coeff_offset_dc[7] = { 0, 0, 1, 1, 2, 2, 2 }; /* node ctx: 0..3: abslevel1 (with abslevelgt1 == 0). * 4..7: abslevelgt1 + 3 (and abslevel1 doesn't matter). * map node ctx => cabac ctx for level=1 */ static const uint8_t coeff_abs_level1_ctx[8] = { 1, 2, 3, 4, 0, 0, 0, 0 }; /* map node ctx => cabac ctx for level>1 */ - static const uint8_t coeff_abs_levelgt1_ctx[8] = { 5, 5, 5, 5, 6, 7, 8, 9 }; + static const uint8_t coeff_abs_levelgt1_ctx[2][8] = { + { 5, 5, 5, 5, 6, 7, 8, 9 }, + { 5, 5, 5, 5, 6, 7, 8, 8 }, // 422/dc case + }; static const uint8_t coeff_abs_level_transition[2][8] = { /* update node ctx after decoding a level=1 */ { 1, 2, 3, 3, 4, 5, 6, 7 }, @@ -1647,16 +1656,24 @@ index[coeff_count++] = last;\ } const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD]; -#if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) +#if ARCH_X86 && HAVE_7REGS && !defined(BROKEN_RELOCATIONS) coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, - last_coeff_ctx_base-significant_coeff_ctx_base, sig_off); + last_coeff_ctx_base, sig_off); } else { - coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index, - last_coeff_ctx_base-significant_coeff_ctx_base); + if (is_dc && chroma422) { // dc 422 + DECODE_SIGNIFICANCE(7, sig_coeff_offset_dc[last], sig_coeff_offset_dc[last]); + } else { + coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index, + last_coeff_ctx_base-significant_coeff_ctx_base); + } #else DECODE_SIGNIFICANCE( 63, sig_off[last], last_coeff_flag_offset_8x8[last] ); } else { - DECODE_SIGNIFICANCE( max_coeff - 1, last, last ); + if (is_dc && chroma422) { // dc 422 + DECODE_SIGNIFICANCE(7, sig_coeff_offset_dc[last], sig_coeff_offset_dc[last]); + } else { + DECODE_SIGNIFICANCE(max_coeff - 1, last, last); + } #endif } assert(coeff_count > 0); @@ -1691,7 +1708,7 @@ } \ } else { \ int coeff_abs = 2; \ - ctx = coeff_abs_levelgt1_ctx[node_ctx] + abs_level_m1_ctx_base; \ + ctx = coeff_abs_levelgt1_ctx[is_dc && chroma422][node_ctx] + abs_level_m1_ctx_base; \ node_ctx = coeff_abs_level_transition[1][node_ctx]; \ \ while( coeff_abs < 15 && get_cabac( CC, ctx ) ) { \ @@ -1733,11 +1750,18 @@ } static void decode_cabac_residual_dc_internal( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, int max_coeff ) { - decode_cabac_residual_internal(h, block, cat, n, scantable, NULL, max_coeff, 1); + decode_cabac_residual_internal(h, block, cat, n, scantable, NULL, max_coeff, 1, 0); +} + +static void decode_cabac_residual_dc_internal_422(H264Context *h, DCTELEM *block, + int cat, int n, const uint8_t *scantable, + int max_coeff) +{ + decode_cabac_residual_internal(h, block, cat, n, scantable, NULL, max_coeff, 1, 1); } static void decode_cabac_residual_nondc_internal( 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, 0); + decode_cabac_residual_internal(h, block, cat, n, scantable, qmul, max_coeff, 0, 0); } /* cat: 0-> DC 16x16 n = 0 @@ -1761,6 +1785,19 @@ decode_cabac_residual_dc_internal( h, block, cat, n, scantable, max_coeff ); } +static av_always_inline void +decode_cabac_residual_dc_422(H264Context *h, DCTELEM *block, + int cat, int n, const uint8_t *scantable, + int max_coeff) +{ + /* read coded block flag */ + if (get_cabac(&h->cabac, &h->cabac_state[get_cabac_cbf_ctx(h, cat, n, max_coeff, 1)]) == 0) { + h->non_zero_count_cache[scan8[n]] = 0; + return; + } + decode_cabac_residual_dc_internal_422(h, block, cat, n, scantable, max_coeff); +} + static av_always_inline void decode_cabac_residual_nondc( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff ) { /* read coded block flag */ if( (cat != 5 || CHROMA444) && get_cabac( &h->cabac, &h->cabac_state[get_cabac_cbf_ctx( h, cat, n, max_coeff, 0 ) ] ) == 0 ) { @@ -1818,16 +1855,15 @@ } } } else { - uint8_t * const nnz= &h->non_zero_count_cache[ scan8[4*i8x8+16*p] ]; - nnz[0] = nnz[1] = nnz[8] = nnz[9] = 0; + fill_rectangle(&h->non_zero_count_cache[scan8[4*i8x8+16*p]], 2, 2, 8, 0, 1); } } } } /** - * decodes a macroblock - * @return 0 if OK, AC_ERROR / DC_ERROR / MV_ERROR if an error is noticed + * Decode a macroblock. + * @return 0 if OK, ER_AC_ERROR / ER_DC_ERROR / ER_MV_ERROR if an error is noticed */ int ff_h264_decode_mb_cabac(H264Context *h) { MpegEncContext * const s = &h->s; @@ -1850,7 +1886,7 @@ /* read skip flags */ if( skip ) { if( FRAME_MBAFF && (s->mb_y&1)==0 ){ - s->current_picture.mb_type[mb_xy] = MB_TYPE_SKIP; + s->current_picture.f.mb_type[mb_xy] = MB_TYPE_SKIP; h->next_mb_skipped = decode_cabac_mb_skip( h, s->mb_x, s->mb_y+1 ); if(!h->next_mb_skipped) h->mb_mbaff = h->mb_field_decoding_flag = decode_cabac_field_decoding_flag(h); @@ -1880,7 +1916,7 @@ int ctx = 0; assert(h->slice_type_nos == AV_PICTURE_TYPE_B); - if( !IS_DIRECT( h->left_type[0]-1 ) ) + if( !IS_DIRECT( h->left_type[LTOP]-1 ) ) ctx++; if( !IS_DIRECT( h->top_type-1 ) ) ctx++; @@ -1966,10 +2002,10 @@ h->cbp_table[mb_xy] = 0xf7ef; h->chroma_pred_mode_table[mb_xy] = 0; // In deblocking, the quantizer is 0 - s->current_picture.qscale_table[mb_xy]= 0; + s->current_picture.f.qscale_table[mb_xy] = 0; // All coeffs are present memset(h->non_zero_count[mb_xy], 16, 48); - s->current_picture.mb_type[mb_xy]= mb_type; + s->current_picture.f.mb_type[mb_xy] = mb_type; h->last_qscale_diff = 0; return 0; } @@ -1999,7 +2035,7 @@ //av_log( s->avctx, AV_LOG_ERROR, "i4x4 pred=%d mode=%d\n", pred, h->intra4x4_pred_mode_cache[ scan8[i] ] ); } } - ff_h264_write_back_intra_pred_mode(h); + write_back_intra_pred_mode(h); if( ff_h264_check_intra4x4_pred_mode(h) < 0 ) return -1; } else { h->intra16x16_pred_mode= ff_h264_check_intra_pred_mode( h, h->intra16x16_pred_mode ); @@ -2248,24 +2284,25 @@ * the transform mode of the current macroblock there. */ if (CHROMA444 && IS_8x8DCT(mb_type)){ int i; + uint8_t *nnz_cache = h->non_zero_count_cache; for (i = 0; i < 2; i++){ - if (h->left_type[i] && !IS_8x8DCT(h->left_type[i])){ - h->non_zero_count_cache[3+8* 1 + 2*8*i]= - h->non_zero_count_cache[3+8* 2 + 2*8*i]= - h->non_zero_count_cache[3+8* 6 + 2*8*i]= - h->non_zero_count_cache[3+8* 7 + 2*8*i]= - h->non_zero_count_cache[3+8*11 + 2*8*i]= - h->non_zero_count_cache[3+8*12 + 2*8*i]= IS_INTRA(mb_type) ? 64 : 0; + if (h->left_type[LEFT(i)] && !IS_8x8DCT(h->left_type[LEFT(i)])){ + nnz_cache[3+8* 1 + 2*8*i]= + nnz_cache[3+8* 2 + 2*8*i]= + nnz_cache[3+8* 6 + 2*8*i]= + nnz_cache[3+8* 7 + 2*8*i]= + nnz_cache[3+8*11 + 2*8*i]= + nnz_cache[3+8*12 + 2*8*i]= IS_INTRA(mb_type) ? 64 : 0; } } if (h->top_type && !IS_8x8DCT(h->top_type)){ uint32_t top_empty = CABAC && !IS_INTRA(mb_type) ? 0 : 0x40404040; - AV_WN32A(&h->non_zero_count_cache[4+8* 0], top_empty); - AV_WN32A(&h->non_zero_count_cache[4+8* 5], top_empty); - AV_WN32A(&h->non_zero_count_cache[4+8*10], top_empty); + AV_WN32A(&nnz_cache[4+8* 0], top_empty); + AV_WN32A(&nnz_cache[4+8* 5], top_empty); + AV_WN32A(&nnz_cache[4+8*10], top_empty); } } - s->current_picture.mb_type[mb_xy]= mb_type; + s->current_picture.f.mb_type[mb_xy] = mb_type; if( cbp || IS_INTRA16x16( mb_type ) ) { const uint8_t *scan, *scan8x8; @@ -2313,7 +2350,36 @@ if(CHROMA444){ decode_cabac_luma_residual(h, scan, scan8x8, pixel_shift, mb_type, cbp, 1); decode_cabac_luma_residual(h, scan, scan8x8, pixel_shift, mb_type, cbp, 2); - } else { + } else if (CHROMA422) { + if( cbp&0x30 ){ + int c; + for( c = 0; c < 2; c++ ) { + //av_log( s->avctx, AV_LOG_ERROR, "INTRA C%d-DC\n",c ); + decode_cabac_residual_dc_422(h, h->mb + ((256 + 16*16*c) << pixel_shift), 3, + CHROMA_DC_BLOCK_INDEX + c, + chroma422_dc_scan, 8); + } + } + + if( cbp&0x20 ) { + int c, i, i8x8; + for( c = 0; c < 2; c++ ) { + DCTELEM *mb = h->mb + (16*(16 + 16*c) << pixel_shift); + qmul = h->dequant4_coeff[c+1+(IS_INTRA( mb_type ) ? 0:3)][h->chroma_qp[c]]; + for (i8x8 = 0; i8x8 < 2; i8x8++) { + for (i = 0; i < 4; i++) { + const int index = 16 + 16 * c + 8*i8x8 + i; + //av_log(s->avctx, AV_LOG_ERROR, "INTRA C%d-AC %d\n",c, index - 16); + decode_cabac_residual_nondc(h, mb, 4, index, scan + 1, qmul, 15); + mb += 16<non_zero_count_cache[scan8[16]], 4, 4, 8, 0, 1); + fill_rectangle(&h->non_zero_count_cache[scan8[32]], 4, 4, 8, 0, 1); + } + } else /* yuv420 */ { if( cbp&0x30 ){ int c; for( c = 0; c < 2; c++ ) { @@ -2344,7 +2410,7 @@ h->last_qscale_diff = 0; } - s->current_picture.qscale_table[mb_xy]= s->qscale; + s->current_picture.f.qscale_table[mb_xy] = s->qscale; write_back_non_zero_count(h); if(MB_MBAFF){ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_cavlc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_cavlc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_cavlc.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_cavlc.c 2012-01-11 00:34:30.000000000 +0000 @@ -62,6 +62,30 @@ 2, 3, 2, 0, }; +static const uint8_t chroma422_dc_coeff_token_len[4*9]={ + 1, 0, 0, 0, + 7, 2, 0, 0, + 7, 7, 3, 0, + 9, 7, 7, 5, + 9, 9, 7, 6, + 10, 10, 9, 7, + 11, 11, 10, 7, + 12, 12, 11, 10, + 13, 12, 12, 11, +}; + +static const uint8_t chroma422_dc_coeff_token_bits[4*9]={ + 1, 0, 0, 0, + 15, 1, 0, 0, + 14, 13, 1, 0, + 7, 12, 11, 1, + 6, 5, 10, 1, + 7, 6, 4, 9, + 7, 6, 5, 8, + 7, 6, 5, 4, + 7, 5, 4, 4, +}; + static const uint8_t coeff_token_len[4][4*17]={ { 1, 0, 0, 0, @@ -172,6 +196,26 @@ { 1, 0, 0, 0,}, }; +static const uint8_t chroma422_dc_total_zeros_len[7][8]= { + { 1, 3, 3, 4, 4, 4, 5, 5 }, + { 3, 2, 3, 3, 3, 3, 3 }, + { 3, 3, 2, 2, 3, 3 }, + { 3, 2, 2, 2, 3 }, + { 2, 2, 2, 2 }, + { 2, 2, 1 }, + { 1, 1 }, +}; + +static const uint8_t chroma422_dc_total_zeros_bits[7][8]= { + { 1, 2, 3, 2, 3, 1, 1, 0 }, + { 0, 1, 1, 4, 5, 6, 7 }, + { 0, 1, 1, 2, 6, 7 }, + { 6, 0, 1, 2, 7 }, + { 0, 1, 2, 3 }, + { 0, 1, 1 }, + { 0, 1 }, +}; + static const uint8_t run_len[7][16]={ {1,1}, {1,2,2}, @@ -200,6 +244,10 @@ static VLC_TYPE chroma_dc_coeff_token_vlc_table[256][2]; static const int chroma_dc_coeff_token_vlc_table_size = 256; +static VLC chroma422_dc_coeff_token_vlc; +static VLC_TYPE chroma422_dc_coeff_token_vlc_table[8192][2]; +static const int chroma422_dc_coeff_token_vlc_table_size = 8192; + static VLC total_zeros_vlc[15]; static VLC_TYPE total_zeros_vlc_tables[15][512][2]; static const int total_zeros_vlc_tables_size = 512; @@ -208,6 +256,10 @@ static VLC_TYPE chroma_dc_total_zeros_vlc_tables[3][8][2]; static const int chroma_dc_total_zeros_vlc_tables_size = 8; +static VLC chroma422_dc_total_zeros_vlc[7]; +static VLC_TYPE chroma422_dc_total_zeros_vlc_tables[7][32][2]; +static const int chroma422_dc_total_zeros_vlc_tables_size = 32; + static VLC run_vlc[6]; static VLC_TYPE run_vlc_tables[6][8][2]; static const int run_vlc_tables_size = 8; @@ -219,9 +271,17 @@ #define LEVEL_TAB_BITS 8 static int8_t cavlc_level_tab[7][1<>(LEVEL_TAB_BITS-prefix-1-suffix_length)) - (1<>1) ^ mask) - mask; if(prefix + 1 + suffix_length <= LEVEL_TAB_BITS){ + int level_code = (prefix << suffix_length) + + (i >> (av_log2(i) - suffix_length)) - (1 << suffix_length); + int mask = -(level_code&1); + level_code = (((2 + level_code) >> 1) ^ mask) - mask; cavlc_level_tab[suffix_length][i][0]= level_code; cavlc_level_tab[suffix_length][i][1]= prefix + 1 + suffix_length; }else if(prefix + 1 <= LEVEL_TAB_BITS){ @@ -277,6 +338,13 @@ &chroma_dc_coeff_token_bits[0], 1, 1, INIT_VLC_USE_NEW_STATIC); + chroma422_dc_coeff_token_vlc.table = chroma422_dc_coeff_token_vlc_table; + chroma422_dc_coeff_token_vlc.table_allocated = chroma422_dc_coeff_token_vlc_table_size; + init_vlc(&chroma422_dc_coeff_token_vlc, CHROMA422_DC_COEFF_TOKEN_VLC_BITS, 4*9, + &chroma422_dc_coeff_token_len [0], 1, 1, + &chroma422_dc_coeff_token_bits[0], 1, 1, + INIT_VLC_USE_NEW_STATIC); + offset = 0; for(i=0; i<4; i++){ coeff_token_vlc[i].table = coeff_token_vlc_tables+offset; @@ -303,6 +371,17 @@ &chroma_dc_total_zeros_bits[i][0], 1, 1, INIT_VLC_USE_NEW_STATIC); } + + for(i=0; i<7; i++){ + chroma422_dc_total_zeros_vlc[i].table = chroma422_dc_total_zeros_vlc_tables[i]; + chroma422_dc_total_zeros_vlc[i].table_allocated = chroma422_dc_total_zeros_vlc_tables_size; + init_vlc(&chroma422_dc_total_zeros_vlc[i], + CHROMA422_DC_TOTAL_ZEROS_VLC_BITS, 8, + &chroma422_dc_total_zeros_len [i][0], 1, 1, + &chroma422_dc_total_zeros_bits[i][0], 1, 1, + INIT_VLC_USE_NEW_STATIC); + } + for(i=0; i<15; i++){ total_zeros_vlc[i].table = total_zeros_vlc_tables[i]; total_zeros_vlc[i].table_allocated = total_zeros_vlc_tables_size; @@ -357,7 +436,7 @@ } /** - * decodes a residual block. + * Decode a residual block. * @param n block index * @param scantable scantable * @param max_coeff number of coefficients in the block @@ -372,7 +451,10 @@ //FIXME put trailing_onex into the context if(max_coeff <= 8){ - coeff_token= get_vlc2(gb, chroma_dc_coeff_token_vlc.table, CHROMA_DC_COEFF_TOKEN_VLC_BITS, 1); + if (max_coeff == 4) + coeff_token = get_vlc2(gb, chroma_dc_coeff_token_vlc.table, CHROMA_DC_COEFF_TOKEN_VLC_BITS, 1); + else + coeff_token = get_vlc2(gb, chroma422_dc_coeff_token_vlc.table, CHROMA422_DC_COEFF_TOKEN_VLC_BITS, 1); total_coeff= coeff_token>>2; }else{ if(n >= LUMA_DC_BLOCK_INDEX){ @@ -482,11 +564,16 @@ if(total_coeff == max_coeff) zeros_left=0; else{ - /* FIXME: we don't actually support 4:2:2 yet. */ - if(max_coeff <= 8) - zeros_left= get_vlc2(gb, (chroma_dc_total_zeros_vlc-1)[ total_coeff ].table, CHROMA_DC_TOTAL_ZEROS_VLC_BITS, 1); - else + if (max_coeff <= 8) { + if (max_coeff == 4) + zeros_left = get_vlc2(gb, (chroma_dc_total_zeros_vlc-1)[total_coeff].table, + CHROMA_DC_TOTAL_ZEROS_VLC_BITS, 1); + else + zeros_left = get_vlc2(gb, (chroma422_dc_total_zeros_vlc-1)[total_coeff].table, + CHROMA422_DC_TOTAL_ZEROS_VLC_BITS, 1); + } else { zeros_left= get_vlc2(gb, (total_zeros_vlc-1)[ total_coeff ].table, TOTAL_ZEROS_VLC_BITS, 1); + } } #define STORE_BLOCK(type) \ @@ -689,11 +776,11 @@ } // In deblocking, the quantizer is 0 - s->current_picture.qscale_table[mb_xy]= 0; + s->current_picture.f.qscale_table[mb_xy] = 0; // All coeffs are present memset(h->non_zero_count[mb_xy], 16, 48); - s->current_picture.mb_type[mb_xy]= mb_type; + s->current_picture.f.mb_type[mb_xy] = mb_type; return 0; } @@ -731,7 +818,7 @@ else h->intra4x4_pred_mode_cache[ scan8[i] ] = mode; } - ff_h264_write_back_intra_pred_mode(h); + write_back_intra_pred_mode(h); if( ff_h264_check_intra4x4_pred_mode(h) < 0) return -1; }else{ @@ -990,10 +1077,10 @@ } h->cbp= h->cbp_table[mb_xy]= cbp; - s->current_picture.mb_type[mb_xy]= mb_type; + s->current_picture.f.mb_type[mb_xy] = mb_type; if(cbp || IS_INTRA16x16(mb_type)){ - int i4x4, chroma_idx; + int i4x4, i8x8, chroma_idx; int dquant; int ret; GetBitContext *gb= IS_INTRA(mb_type) ? h->intra_gb_ptr : h->inter_gb_ptr; @@ -1035,7 +1122,34 @@ if( decode_luma_residual(h, gb, scan, scan8x8, pixel_shift, mb_type, cbp, 2) < 0 ){ return -1; } - } else { + } else if (CHROMA422) { + if(cbp&0x30){ + for(chroma_idx=0; chroma_idx<2; chroma_idx++) + if (decode_residual(h, gb, h->mb + ((256 + 16*16*chroma_idx) << pixel_shift), + CHROMA_DC_BLOCK_INDEX+chroma_idx, chroma422_dc_scan, + NULL, 8) < 0) { + return -1; + } + } + + if(cbp&0x20){ + for(chroma_idx=0; chroma_idx<2; chroma_idx++){ + const uint32_t *qmul = h->dequant4_coeff[chroma_idx+1+(IS_INTRA( mb_type ) ? 0:3)][h->chroma_qp[chroma_idx]]; + DCTELEM *mb = h->mb + (16*(16 + 16*chroma_idx) << pixel_shift); + for (i8x8 = 0; i8x8 < 2; i8x8++) { + for (i4x4 = 0; i4x4 < 4; i4x4++) { + const int index = 16 + 16*chroma_idx + 8*i8x8 + i4x4; + if (decode_residual(h, gb, mb, index, scan + 1, qmul, 15) < 0) + return -1; + mb += 16 << pixel_shift; + } + } + } + }else{ + fill_rectangle(&h->non_zero_count_cache[scan8[16]], 4, 4, 8, 0, 1); + fill_rectangle(&h->non_zero_count_cache[scan8[32]], 4, 4, 8, 0, 1); + } + } else /* yuv420 */ { if(cbp&0x30){ for(chroma_idx=0; chroma_idx<2; chroma_idx++) if( decode_residual(h, gb, h->mb + ((256 + 16*16*chroma_idx) << pixel_shift), CHROMA_DC_BLOCK_INDEX+chroma_idx, chroma_dc_scan, NULL, 4) < 0){ @@ -1063,7 +1177,7 @@ fill_rectangle(&h->non_zero_count_cache[scan8[16]], 4, 4, 8, 0, 1); fill_rectangle(&h->non_zero_count_cache[scan8[32]], 4, 4, 8, 0, 1); } - s->current_picture.qscale_table[mb_xy]= s->qscale; + s->current_picture.f.qscale_table[mb_xy] = s->qscale; write_back_non_zero_count(h); if(MB_MBAFF){ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264data.h 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264data.h 2012-01-11 00:34:30.000000000 +0000 @@ -80,7 +80,14 @@ static const uint8_t chroma_dc_scan[4]={ (0+0*2)*16, (1+0*2)*16, - (0+1*2)*16, (1+1*2)*16, //FIXME + (0+1*2)*16, (1+1*2)*16, +}; + +static const uint8_t chroma422_dc_scan[8]={ + (0+0*2)*16, (0+1*2)*16, + (1+0*2)*16, (0+2*2)*16, + (0+3*2)*16, (1+1*2)*16, + (1+2*2)*16, (1+3*2)*16, }; // zigzag_scan8x8_cavlc[i] = zigzag_scan8x8[(i/4) + 16*(i%4)] diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_direct.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_direct.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_direct.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_direct.c 2012-01-11 00:34:30.000000000 +0000 @@ -87,7 +87,7 @@ poc= (poc&~3) + rfield + 1; for(j=start; jref_list[0][j].frame_num + (h->ref_list[0][j].reference&3) == poc){ + if (4 * h->ref_list[0][j].frame_num + (h->ref_list[0][j].f.reference & 3) == poc) { int cur_ref= mbafi ? (j-16)^field : j; map[list][2*old_ref + (rfield^field) + 16] = cur_ref; if(rfield == field || !interl) @@ -105,12 +105,12 @@ Picture * const cur = s->current_picture_ptr; int list, j, field; int sidx= (s->picture_structure&1)^1; - int ref1sidx= (ref1->reference&1)^1; + int ref1sidx = (ref1->f.reference&1)^1; for(list=0; list<2; list++){ cur->ref_count[sidx][list] = h->ref_count[list]; for(j=0; jref_count[list]; j++) - cur->ref_poc[sidx][list][j] = 4*h->ref_list[list][j].frame_num + (h->ref_list[list][j].reference&3); + cur->ref_poc[sidx][list][j] = 4 * h->ref_list[list][j].frame_num + (h->ref_list[list][j].f.reference & 3); } if(s->picture_structure == PICT_FRAME){ @@ -126,11 +126,11 @@ int *col_poc = h->ref_list[1]->field_poc; h->col_parity= (FFABS(col_poc[0] - cur_poc) >= FFABS(col_poc[1] - cur_poc)); ref1sidx=sidx= h->col_parity; - }else if(!(s->picture_structure & h->ref_list[1][0].reference) && !h->ref_list[1][0].mbaff){ // FL -> FL & differ parity - h->col_fieldoff= 2*(h->ref_list[1][0].reference) - 3; + } else if (!(s->picture_structure & h->ref_list[1][0].f.reference) && !h->ref_list[1][0].mbaff) { // FL -> FL & differ parity + h->col_fieldoff = 2 * h->ref_list[1][0].f.reference - 3; } - if(cur->pict_type != AV_PICTURE_TYPE_B || h->direct_spatial_mv_pred) + if (cur->f.pict_type != AV_PICTURE_TYPE_B || h->direct_spatial_mv_pred) return; for(list=0; list<2; list++){ @@ -143,11 +143,11 @@ static void await_reference_mb_row(H264Context * const h, Picture *ref, int mb_y) { - int ref_field = ref->reference - 1; + int ref_field = ref->f.reference - 1; int ref_field_picture = ref->field_picture; int ref_height = 16*h->s.mb_height >> ref_field_picture; - if(!HAVE_PTHREADS || !(h->s.avctx->active_thread_type&FF_THREAD_FRAME)) + if(!HAVE_THREADS || !(h->s.avctx->active_thread_type&FF_THREAD_FRAME)) return; //FIXME it can be safe to access mb stuff @@ -172,7 +172,7 @@ int mv[2]; int list; - assert(h->ref_list[1][0].reference&3); + assert(h->ref_list[1][0].f.reference & 3); await_reference_mb_row(h, &h->ref_list[1][0], s->mb_y + !!IS_INTERLACED(*mb_type)); @@ -234,8 +234,8 @@ return; } - if(IS_INTERLACED(h->ref_list[1][0].mb_type[mb_xy])){ // AFL/AFR/FR/FL -> AFL/FL - if(!IS_INTERLACED(*mb_type)){ // AFR/FR -> AFL/FL + if (IS_INTERLACED(h->ref_list[1][0].f.mb_type[mb_xy])) { // AFL/AFR/FR/FL -> AFL/FL + if (!IS_INTERLACED(*mb_type)) { // AFR/FR -> AFL/FL mb_y = (s->mb_y&~1) + h->col_parity; mb_xy= s->mb_x + ((s->mb_y&~1) + h->col_parity)*s->mb_stride; b8_stride = 0; @@ -248,8 +248,8 @@ if(IS_INTERLACED(*mb_type)){ // AFL /FL -> AFR/FR mb_y = s->mb_y&~1; mb_xy= s->mb_x + (s->mb_y&~1)*s->mb_stride; - mb_type_col[0] = h->ref_list[1][0].mb_type[mb_xy]; - mb_type_col[1] = h->ref_list[1][0].mb_type[mb_xy + s->mb_stride]; + mb_type_col[0] = h->ref_list[1][0].f.mb_type[mb_xy]; + mb_type_col[1] = h->ref_list[1][0].f.mb_type[mb_xy + s->mb_stride]; b8_stride = 2+4*s->mb_stride; b4_stride *= 6; @@ -264,7 +264,7 @@ }else{ // AFR/FR -> AFR/FR single_col: mb_type_col[0] = - mb_type_col[1] = h->ref_list[1][0].mb_type[mb_xy]; + mb_type_col[1] = h->ref_list[1][0].f.mb_type[mb_xy]; sub_mb_type |= MB_TYPE_16x16|MB_TYPE_DIRECT2; /* B_SUB_8x8 */ if(!is_b8x8 && (mb_type_col[0] & MB_TYPE_16x16_OR_INTRA)){ @@ -284,10 +284,10 @@ await_reference_mb_row(h, &h->ref_list[1][0], mb_y); - l1mv0 = &h->ref_list[1][0].motion_val[0][h->mb2b_xy [mb_xy]]; - l1mv1 = &h->ref_list[1][0].motion_val[1][h->mb2b_xy [mb_xy]]; - l1ref0 = &h->ref_list[1][0].ref_index [0][4*mb_xy]; - l1ref1 = &h->ref_list[1][0].ref_index [1][4*mb_xy]; + l1mv0 = &h->ref_list[1][0].f.motion_val[0][h->mb2b_xy [mb_xy]]; + l1mv1 = &h->ref_list[1][0].f.motion_val[1][h->mb2b_xy [mb_xy]]; + l1ref0 = &h->ref_list[1][0].f.ref_index [0][4 * mb_xy]; + l1ref1 = &h->ref_list[1][0].f.ref_index [1][4 * mb_xy]; if(!b8_stride){ if(s->mb_y&1){ l1ref0 += 2; @@ -416,12 +416,12 @@ unsigned int sub_mb_type; int i8, i4; - assert(h->ref_list[1][0].reference&3); + assert(h->ref_list[1][0].f.reference & 3); await_reference_mb_row(h, &h->ref_list[1][0], s->mb_y + !!IS_INTERLACED(*mb_type)); - if(IS_INTERLACED(h->ref_list[1][0].mb_type[mb_xy])){ // AFL/AFR/FR/FL -> AFL/FL - if(!IS_INTERLACED(*mb_type)){ // AFR/FR -> AFL/FL + if (IS_INTERLACED(h->ref_list[1][0].f.mb_type[mb_xy])) { // AFL/AFR/FR/FL -> AFL/FL + if (!IS_INTERLACED(*mb_type)) { // AFR/FR -> AFL/FL mb_y = (s->mb_y&~1) + h->col_parity; mb_xy= s->mb_x + ((s->mb_y&~1) + h->col_parity)*s->mb_stride; b8_stride = 0; @@ -434,8 +434,8 @@ if(IS_INTERLACED(*mb_type)){ // AFL /FL -> AFR/FR mb_y = s->mb_y&~1; mb_xy= s->mb_x + (s->mb_y&~1)*s->mb_stride; - mb_type_col[0] = h->ref_list[1][0].mb_type[mb_xy]; - mb_type_col[1] = h->ref_list[1][0].mb_type[mb_xy + s->mb_stride]; + mb_type_col[0] = h->ref_list[1][0].f.mb_type[mb_xy]; + mb_type_col[1] = h->ref_list[1][0].f.mb_type[mb_xy + s->mb_stride]; b8_stride = 2+4*s->mb_stride; b4_stride *= 6; @@ -451,7 +451,7 @@ }else{ // AFR/FR -> AFR/FR single_col: mb_type_col[0] = - mb_type_col[1] = h->ref_list[1][0].mb_type[mb_xy]; + mb_type_col[1] = h->ref_list[1][0].f.mb_type[mb_xy]; sub_mb_type = MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2; /* B_SUB_8x8 */ if(!is_b8x8 && (mb_type_col[0] & MB_TYPE_16x16_OR_INTRA)){ @@ -471,10 +471,10 @@ await_reference_mb_row(h, &h->ref_list[1][0], mb_y); - l1mv0 = &h->ref_list[1][0].motion_val[0][h->mb2b_xy [mb_xy]]; - l1mv1 = &h->ref_list[1][0].motion_val[1][h->mb2b_xy [mb_xy]]; - l1ref0 = &h->ref_list[1][0].ref_index [0][4*mb_xy]; - l1ref1 = &h->ref_list[1][0].ref_index [1][4*mb_xy]; + l1mv0 = &h->ref_list[1][0].f.motion_val[0][h->mb2b_xy [mb_xy]]; + l1mv1 = &h->ref_list[1][0].f.motion_val[1][h->mb2b_xy [mb_xy]]; + l1ref0 = &h->ref_list[1][0].f.ref_index [0][4 * mb_xy]; + l1ref1 = &h->ref_list[1][0].f.ref_index [1][4 * mb_xy]; if(!b8_stride){ if(s->mb_y&1){ l1ref0 += 2; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264dsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264dsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264dsp.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264dsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,7 +41,7 @@ #include "h264dsp_template.c" #undef BIT_DEPTH -void ff_h264dsp_init(H264DSPContext *c, const int bit_depth) +void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) { #undef FUNC #define FUNC(a, depth) a ## _ ## depth ## _c @@ -53,31 +53,25 @@ c->h264_idct8_dc_add= FUNC(ff_h264_idct8_dc_add, depth);\ c->h264_idct_add16 = FUNC(ff_h264_idct_add16, depth);\ c->h264_idct8_add4 = FUNC(ff_h264_idct8_add4, depth);\ - c->h264_idct_add8 = FUNC(ff_h264_idct_add8, depth);\ + if (chroma_format_idc == 1)\ + c->h264_idct_add8 = FUNC(ff_h264_idct_add8, depth);\ + else\ + c->h264_idct_add8 = FUNC(ff_h264_idct_add8_422, depth);\ c->h264_idct_add16intra= FUNC(ff_h264_idct_add16intra, depth);\ c->h264_luma_dc_dequant_idct= FUNC(ff_h264_luma_dc_dequant_idct, depth);\ - c->h264_chroma_dc_dequant_idct= FUNC(ff_h264_chroma_dc_dequant_idct, depth);\ + if (chroma_format_idc == 1)\ + c->h264_chroma_dc_dequant_idct= FUNC(ff_h264_chroma_dc_dequant_idct, depth);\ + else\ + c->h264_chroma_dc_dequant_idct= FUNC(ff_h264_chroma422_dc_dequant_idct, depth);\ \ - c->weight_h264_pixels_tab[0]= FUNC(weight_h264_pixels16x16, depth);\ - c->weight_h264_pixels_tab[1]= FUNC(weight_h264_pixels16x8, depth);\ - c->weight_h264_pixels_tab[2]= FUNC(weight_h264_pixels8x16, depth);\ - c->weight_h264_pixels_tab[3]= FUNC(weight_h264_pixels8x8, depth);\ - c->weight_h264_pixels_tab[4]= FUNC(weight_h264_pixels8x4, depth);\ - c->weight_h264_pixels_tab[5]= FUNC(weight_h264_pixels4x8, depth);\ - c->weight_h264_pixels_tab[6]= FUNC(weight_h264_pixels4x4, depth);\ - c->weight_h264_pixels_tab[7]= FUNC(weight_h264_pixels4x2, depth);\ - c->weight_h264_pixels_tab[8]= FUNC(weight_h264_pixels2x4, depth);\ - c->weight_h264_pixels_tab[9]= FUNC(weight_h264_pixels2x2, depth);\ - c->biweight_h264_pixels_tab[0]= FUNC(biweight_h264_pixels16x16, depth);\ - c->biweight_h264_pixels_tab[1]= FUNC(biweight_h264_pixels16x8, depth);\ - c->biweight_h264_pixels_tab[2]= FUNC(biweight_h264_pixels8x16, depth);\ - c->biweight_h264_pixels_tab[3]= FUNC(biweight_h264_pixels8x8, depth);\ - c->biweight_h264_pixels_tab[4]= FUNC(biweight_h264_pixels8x4, depth);\ - c->biweight_h264_pixels_tab[5]= FUNC(biweight_h264_pixels4x8, depth);\ - c->biweight_h264_pixels_tab[6]= FUNC(biweight_h264_pixels4x4, depth);\ - c->biweight_h264_pixels_tab[7]= FUNC(biweight_h264_pixels4x2, depth);\ - c->biweight_h264_pixels_tab[8]= FUNC(biweight_h264_pixels2x4, depth);\ - c->biweight_h264_pixels_tab[9]= FUNC(biweight_h264_pixels2x2, depth);\ + c->weight_h264_pixels_tab[0]= FUNC(weight_h264_pixels16, depth);\ + c->weight_h264_pixels_tab[1]= FUNC(weight_h264_pixels8, depth);\ + c->weight_h264_pixels_tab[2]= FUNC(weight_h264_pixels4, depth);\ + c->weight_h264_pixels_tab[3]= FUNC(weight_h264_pixels2, depth);\ + c->biweight_h264_pixels_tab[0]= FUNC(biweight_h264_pixels16, depth);\ + c->biweight_h264_pixels_tab[1]= FUNC(biweight_h264_pixels8, depth);\ + c->biweight_h264_pixels_tab[2]= FUNC(biweight_h264_pixels4, depth);\ + c->biweight_h264_pixels_tab[3]= FUNC(biweight_h264_pixels2, depth);\ \ c->h264_v_loop_filter_luma= FUNC(h264_v_loop_filter_luma, depth);\ c->h264_h_loop_filter_luma= FUNC(h264_h_loop_filter_luma, depth);\ @@ -86,11 +80,23 @@ c->h264_h_loop_filter_luma_intra= FUNC(h264_h_loop_filter_luma_intra, depth);\ c->h264_h_loop_filter_luma_mbaff_intra= FUNC(h264_h_loop_filter_luma_mbaff_intra, depth);\ c->h264_v_loop_filter_chroma= FUNC(h264_v_loop_filter_chroma, depth);\ - c->h264_h_loop_filter_chroma= FUNC(h264_h_loop_filter_chroma, depth);\ - c->h264_h_loop_filter_chroma_mbaff= FUNC(h264_h_loop_filter_chroma_mbaff, depth);\ + if (chroma_format_idc == 1)\ + c->h264_h_loop_filter_chroma= FUNC(h264_h_loop_filter_chroma, depth);\ + else\ + c->h264_h_loop_filter_chroma= FUNC(h264_h_loop_filter_chroma422, depth);\ + if (chroma_format_idc == 1)\ + c->h264_h_loop_filter_chroma_mbaff= FUNC(h264_h_loop_filter_chroma_mbaff, depth);\ + else\ + c->h264_h_loop_filter_chroma_mbaff= FUNC(h264_h_loop_filter_chroma422_mbaff, depth);\ c->h264_v_loop_filter_chroma_intra= FUNC(h264_v_loop_filter_chroma_intra, depth);\ - c->h264_h_loop_filter_chroma_intra= FUNC(h264_h_loop_filter_chroma_intra, depth);\ - c->h264_h_loop_filter_chroma_mbaff_intra= FUNC(h264_h_loop_filter_chroma_mbaff_intra, depth);\ + if (chroma_format_idc == 1)\ + c->h264_h_loop_filter_chroma_intra= FUNC(h264_h_loop_filter_chroma_intra, depth);\ + else\ + c->h264_h_loop_filter_chroma_intra= FUNC(h264_h_loop_filter_chroma422_intra, depth);\ + if (chroma_format_idc == 1)\ + c->h264_h_loop_filter_chroma_mbaff_intra= FUNC(h264_h_loop_filter_chroma_mbaff_intra, depth);\ + else\ + c->h264_h_loop_filter_chroma_mbaff_intra= FUNC(h264_h_loop_filter_chroma422_mbaff_intra, depth);\ c->h264_loop_filter_strength= NULL; switch (bit_depth) { @@ -105,7 +111,7 @@ break; } - if (ARCH_ARM) ff_h264dsp_init_arm(c, bit_depth); - if (HAVE_ALTIVEC) ff_h264dsp_init_ppc(c, bit_depth); - if (HAVE_MMX) ff_h264dsp_init_x86(c, bit_depth); + if (ARCH_ARM) ff_h264dsp_init_arm(c, bit_depth, chroma_format_idc); + if (HAVE_ALTIVEC) ff_h264dsp_init_ppc(c, bit_depth, chroma_format_idc); + if (HAVE_MMX) ff_h264dsp_init_x86(c, bit_depth, chroma_format_idc); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264dsp.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264dsp.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264dsp.h 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264dsp.h 2012-01-11 00:34:30.000000000 +0000 @@ -31,16 +31,18 @@ #include "dsputil.h" //typedef void (*h264_chroma_mc_func)(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int srcStride, int h, int x, int y); -typedef void (*h264_weight_func)(uint8_t *block, int stride, int log2_denom, int weight, int offset); -typedef void (*h264_biweight_func)(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offset); +typedef void (*h264_weight_func)(uint8_t *block, int stride, int height, + int log2_denom, int weight, int offset); +typedef void (*h264_biweight_func)(uint8_t *dst, uint8_t *src, int stride, int height, + int log2_denom, int weightd, int weights, int offset); /** * Context for storing H.264 DSP functions */ typedef struct H264DSPContext{ /* weighted MC */ - h264_weight_func weight_h264_pixels_tab[10]; - h264_biweight_func biweight_h264_pixels_tab[10]; + h264_weight_func weight_h264_pixels_tab[4]; + h264_biweight_func biweight_h264_pixels_tab[4]; /* loop filter */ void (*h264_v_loop_filter_luma)(uint8_t *pix/*align 16*/, int stride, int alpha, int beta, int8_t *tc0); @@ -74,9 +76,9 @@ void (*h264_chroma_dc_dequant_idct)(DCTELEM *block, int qmul); }H264DSPContext; -void ff_h264dsp_init(H264DSPContext *c, const int bit_depth); -void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth); -void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth); -void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth); +void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, const int chroma_format_idc); +void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, const int chroma_format_idc); +void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth, const int chroma_format_idc); +void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, const int chroma_format_idc); #endif /* AVCODEC_H264DSP_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264dsp_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264dsp_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264dsp_template.c 2011-06-11 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264dsp_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,18 +25,20 @@ * @author Michael Niedermayer */ -#include "high_bit_depth.h" +#include "bit_depth_template.c" #define op_scale1(x) block[x] = av_clip_pixel( (block[x]*weight + offset) >> log2_denom ) #define op_scale2(x) dst[x] = av_clip_pixel( (src[x]*weights + dst[x]*weightd + offset) >> (log2_denom+1)) -#define H264_WEIGHT(W,H) \ -static void FUNCC(weight_h264_pixels ## W ## x ## H)(uint8_t *_block, int stride, int log2_denom, int weight, int offset){ \ +#define H264_WEIGHT(W) \ +static void FUNCC(weight_h264_pixels ## W)(uint8_t *_block, int stride, int height, \ + int log2_denom, int weight, int offset) \ +{ \ int y; \ pixel *block = (pixel*)_block; \ stride /= sizeof(pixel); \ offset <<= (log2_denom + (BIT_DEPTH-8)); \ if(log2_denom) offset += 1<<(log2_denom-1); \ - for(y=0; ymb_field_decoding_flag #define FRAME_MBAFF h->mb_aff_frame #define FIELD_PICTURE (s->picture_structure != PICT_FRAME) +#define LEFT_MBS 2 +#define LTOP 0 +#define LBOT 1 +#define LEFT(i) (i) #else #define MB_MBAFF 0 #define MB_FIELD 0 @@ -77,6 +74,10 @@ #define FIELD_PICTURE 0 #undef IS_INTERLACED #define IS_INTERLACED(mb_type) 0 +#define LEFT_MBS 1 +#define LTOP 0 +#define LBOT 0 +#define LEFT(i) 0 #endif #define FIELD_OR_MBAFF_PICTURE (FRAME_MBAFF || FIELD_PICTURE) @@ -84,6 +85,7 @@ #define CABAC h->pps.cabac #endif +#define CHROMA422 (h->sps.chroma_format_idc == 2) #define CHROMA444 (h->sps.chroma_format_idc == 3) #define EXTENDED_SAR 255 @@ -272,12 +274,12 @@ int topleft_mb_xy; int top_mb_xy; int topright_mb_xy; - int left_mb_xy[2]; + int left_mb_xy[LEFT_MBS]; int topleft_type; int top_type; int topright_type; - int left_type[2]; + int left_type[LEFT_MBS]; const uint8_t * left_block; int topleft_partition; @@ -308,11 +310,6 @@ #define PART_NOT_AVAILABLE -2 /** - * is 1 if the specific list MV&references are set to 0,0,-2. - */ - int mv_cache_clean[2]; - - /** * number of neighbors (top and/or left) that used 8x8 dct */ int neighbor_transform_size; @@ -491,6 +488,7 @@ Picture *long_ref[32]; Picture default_ref_list[2][32]; ///< base reference list for all slices of a coded picture Picture *delayed_pic[MAX_DELAYED_PIC_COUNT+2]; //FIXME size? + int last_pocs[MAX_DELAYED_PIC_COUNT]; Picture *next_output_pic; int outputed_poc; int next_outputed_poc; @@ -500,6 +498,7 @@ */ MMCO mmco[MAX_MMCO_COUNT]; int mmco_index; + int mmco_reset; int long_ref_count; ///< number of actual long term references int short_ref_count; ///< number of actual short term references @@ -507,7 +506,7 @@ int cabac_init_idc; /** - * @defgroup multithreading Members for slice based multithreading + * @name Members for slice based multithreading * @{ */ struct H264Context *thread_context[MAX_THREADS]; @@ -579,6 +578,8 @@ // Timestamp stuff int sei_buffering_period_present; ///< Buffering period SEI flag int initial_cpb_removal_delay[32]; ///< Initial timestamps for CPBs + + int cur_chroma_format_idc; }H264Context; @@ -658,7 +659,6 @@ */ int ff_h264_check_intra_pred_mode(H264Context *h, int mode); -void ff_h264_write_back_intra_pred_mode(H264Context *h); void ff_h264_hl_decode_mb(H264Context *h); int ff_h264_frame_start(H264Context *h); int ff_h264_decode_extradata(H264Context *h); @@ -668,13 +668,13 @@ /** * Decode a macroblock - * @return 0 if OK, AC_ERROR / DC_ERROR / MV_ERROR if an error is noticed + * @return 0 if OK, ER_AC_ERROR / ER_DC_ERROR / ER_MV_ERROR if an error is noticed */ int ff_h264_decode_mb_cavlc(H264Context *h); /** * Decode a CABAC coded macroblock - * @return 0 if OK, AC_ERROR / DC_ERROR / MV_ERROR if an error is noticed + * @return 0 if OK, ER_AC_ERROR / ER_DC_ERROR / ER_MV_ERROR if an error is noticed */ int ff_h264_decode_mb_cabac(H264Context *h); @@ -762,430 +762,16 @@ } /** - * gets the chroma qp. + * Get the chroma qp. */ -static inline int get_chroma_qp(H264Context *h, int t, int qscale){ +static av_always_inline int get_chroma_qp(H264Context *h, int t, int qscale){ return h->pps.chroma_qp_table[t][qscale]; } -static inline void pred_pskip_motion(H264Context * const h, int * const mx, int * const my); - -static void fill_decode_neighbors(H264Context *h, int mb_type){ - MpegEncContext * const s = &h->s; - const int mb_xy= h->mb_xy; - int topleft_xy, top_xy, topright_xy, left_xy[2]; - static const uint8_t left_block_options[4][32]={ - {0,1,2,3,7,10,8,11,3+0*4, 3+1*4, 3+2*4, 3+3*4, 1+4*4, 1+8*4, 1+5*4, 1+9*4}, - {2,2,3,3,8,11,8,11,3+2*4, 3+2*4, 3+3*4, 3+3*4, 1+5*4, 1+9*4, 1+5*4, 1+9*4}, - {0,0,1,1,7,10,7,10,3+0*4, 3+0*4, 3+1*4, 3+1*4, 1+4*4, 1+8*4, 1+4*4, 1+8*4}, - {0,2,0,2,7,10,7,10,3+0*4, 3+2*4, 3+0*4, 3+2*4, 1+4*4, 1+8*4, 1+4*4, 1+8*4} - }; - - h->topleft_partition= -1; - - top_xy = mb_xy - (s->mb_stride << MB_FIELD); - - /* Wow, what a mess, why didn't they simplify the interlacing & intra - * stuff, I can't imagine that these complex rules are worth it. */ - - topleft_xy = top_xy - 1; - topright_xy= top_xy + 1; - left_xy[1] = left_xy[0] = mb_xy-1; - h->left_block = left_block_options[0]; - if(FRAME_MBAFF){ - const int left_mb_field_flag = IS_INTERLACED(s->current_picture.mb_type[mb_xy-1]); - const int curr_mb_field_flag = IS_INTERLACED(mb_type); - if(s->mb_y&1){ - if (left_mb_field_flag != curr_mb_field_flag) { - left_xy[1] = left_xy[0] = mb_xy - s->mb_stride - 1; - if (curr_mb_field_flag) { - left_xy[1] += s->mb_stride; - h->left_block = left_block_options[3]; - } else { - topleft_xy += s->mb_stride; - // take top left mv from the middle of the mb, as opposed to all other modes which use the bottom right partition - h->topleft_partition = 0; - h->left_block = left_block_options[1]; - } - } - }else{ - if(curr_mb_field_flag){ - topleft_xy += s->mb_stride & (((s->current_picture.mb_type[top_xy - 1]>>7)&1)-1); - topright_xy += s->mb_stride & (((s->current_picture.mb_type[top_xy + 1]>>7)&1)-1); - top_xy += s->mb_stride & (((s->current_picture.mb_type[top_xy ]>>7)&1)-1); - } - if (left_mb_field_flag != curr_mb_field_flag) { - if (curr_mb_field_flag) { - left_xy[1] += s->mb_stride; - h->left_block = left_block_options[3]; - } else { - h->left_block = left_block_options[2]; - } - } - } - } - - h->topleft_mb_xy = topleft_xy; - h->top_mb_xy = top_xy; - h->topright_mb_xy= topright_xy; - h->left_mb_xy[0] = left_xy[0]; - h->left_mb_xy[1] = left_xy[1]; - //FIXME do we need all in the context? - - h->topleft_type = s->current_picture.mb_type[topleft_xy] ; - h->top_type = s->current_picture.mb_type[top_xy] ; - h->topright_type= s->current_picture.mb_type[topright_xy]; - h->left_type[0] = s->current_picture.mb_type[left_xy[0]] ; - h->left_type[1] = s->current_picture.mb_type[left_xy[1]] ; - - if(FMO){ - if(h->slice_table[topleft_xy ] != h->slice_num) h->topleft_type = 0; - if(h->slice_table[top_xy ] != h->slice_num) h->top_type = 0; - if(h->slice_table[left_xy[0] ] != h->slice_num) h->left_type[0] = h->left_type[1] = 0; - }else{ - if(h->slice_table[topleft_xy ] != h->slice_num){ - h->topleft_type = 0; - if(h->slice_table[top_xy ] != h->slice_num) h->top_type = 0; - if(h->slice_table[left_xy[0] ] != h->slice_num) h->left_type[0] = h->left_type[1] = 0; - } - } - if(h->slice_table[topright_xy] != h->slice_num) h->topright_type= 0; -} - -static void fill_decode_caches(H264Context *h, int mb_type){ - MpegEncContext * const s = &h->s; - int topleft_xy, top_xy, topright_xy, left_xy[2]; - int topleft_type, top_type, topright_type, left_type[2]; - const uint8_t * left_block= h->left_block; - int i; - - topleft_xy = h->topleft_mb_xy ; - top_xy = h->top_mb_xy ; - topright_xy = h->topright_mb_xy; - left_xy[0] = h->left_mb_xy[0] ; - left_xy[1] = h->left_mb_xy[1] ; - topleft_type = h->topleft_type ; - top_type = h->top_type ; - topright_type= h->topright_type ; - left_type[0] = h->left_type[0] ; - left_type[1] = h->left_type[1] ; - - if(!IS_SKIP(mb_type)){ - if(IS_INTRA(mb_type)){ - int type_mask= h->pps.constrained_intra_pred ? IS_INTRA(-1) : -1; - h->topleft_samples_available= - h->top_samples_available= - h->left_samples_available= 0xFFFF; - h->topright_samples_available= 0xEEEA; - - if(!(top_type & type_mask)){ - h->topleft_samples_available= 0xB3FF; - h->top_samples_available= 0x33FF; - h->topright_samples_available= 0x26EA; - } - if(IS_INTERLACED(mb_type) != IS_INTERLACED(left_type[0])){ - if(IS_INTERLACED(mb_type)){ - if(!(left_type[0] & type_mask)){ - h->topleft_samples_available&= 0xDFFF; - h->left_samples_available&= 0x5FFF; - } - if(!(left_type[1] & type_mask)){ - h->topleft_samples_available&= 0xFF5F; - h->left_samples_available&= 0xFF5F; - } - }else{ - int left_typei = s->current_picture.mb_type[left_xy[0] + s->mb_stride]; - - assert(left_xy[0] == left_xy[1]); - if(!((left_typei & type_mask) && (left_type[0] & type_mask))){ - h->topleft_samples_available&= 0xDF5F; - h->left_samples_available&= 0x5F5F; - } - } - }else{ - if(!(left_type[0] & type_mask)){ - h->topleft_samples_available&= 0xDF5F; - h->left_samples_available&= 0x5F5F; - } - } - - if(!(topleft_type & type_mask)) - h->topleft_samples_available&= 0x7FFF; - - if(!(topright_type & type_mask)) - h->topright_samples_available&= 0xFBFF; - - if(IS_INTRA4x4(mb_type)){ - if(IS_INTRA4x4(top_type)){ - AV_COPY32(h->intra4x4_pred_mode_cache+4+8*0, h->intra4x4_pred_mode + h->mb2br_xy[top_xy]); - }else{ - h->intra4x4_pred_mode_cache[4+8*0]= - h->intra4x4_pred_mode_cache[5+8*0]= - h->intra4x4_pred_mode_cache[6+8*0]= - h->intra4x4_pred_mode_cache[7+8*0]= 2 - 3*!(top_type & type_mask); - } - for(i=0; i<2; i++){ - if(IS_INTRA4x4(left_type[i])){ - int8_t *mode= h->intra4x4_pred_mode + h->mb2br_xy[left_xy[i]]; - h->intra4x4_pred_mode_cache[3+8*1 + 2*8*i]= mode[6-left_block[0+2*i]]; - h->intra4x4_pred_mode_cache[3+8*2 + 2*8*i]= mode[6-left_block[1+2*i]]; - }else{ - h->intra4x4_pred_mode_cache[3+8*1 + 2*8*i]= - h->intra4x4_pred_mode_cache[3+8*2 + 2*8*i]= 2 - 3*!(left_type[i] & type_mask); - } - } - } - } - - -/* -0 . T T. T T T T -1 L . .L . . . . -2 L . .L . . . . -3 . T TL . . . . -4 L . .L . . . . -5 L . .. . . . . -*/ -//FIXME constraint_intra_pred & partitioning & nnz (let us hope this is just a typo in the spec) - if(top_type){ - AV_COPY32(&h->non_zero_count_cache[4+8* 0], &h->non_zero_count[top_xy][4*3]); - if(CHROMA444){ - AV_COPY32(&h->non_zero_count_cache[4+8* 5], &h->non_zero_count[top_xy][4* 7]); - AV_COPY32(&h->non_zero_count_cache[4+8*10], &h->non_zero_count[top_xy][4*11]); - }else{ - AV_COPY32(&h->non_zero_count_cache[4+8* 5], &h->non_zero_count[top_xy][4* 5]); - AV_COPY32(&h->non_zero_count_cache[4+8*10], &h->non_zero_count[top_xy][4* 9]); - } - }else{ - uint32_t top_empty = CABAC && !IS_INTRA(mb_type) ? 0 : 0x40404040; - AV_WN32A(&h->non_zero_count_cache[4+8* 0], top_empty); - AV_WN32A(&h->non_zero_count_cache[4+8* 5], top_empty); - AV_WN32A(&h->non_zero_count_cache[4+8*10], top_empty); - } - - for (i=0; i<2; i++) { - if(left_type[i]){ - h->non_zero_count_cache[3+8* 1 + 2*8*i]= h->non_zero_count[left_xy[i]][left_block[8+0+2*i]]; - h->non_zero_count_cache[3+8* 2 + 2*8*i]= h->non_zero_count[left_xy[i]][left_block[8+1+2*i]]; - if(CHROMA444){ - h->non_zero_count_cache[3+8* 6 + 2*8*i]= h->non_zero_count[left_xy[i]][left_block[8+0+2*i]+4*4]; - h->non_zero_count_cache[3+8* 7 + 2*8*i]= h->non_zero_count[left_xy[i]][left_block[8+1+2*i]+4*4]; - h->non_zero_count_cache[3+8*11 + 2*8*i]= h->non_zero_count[left_xy[i]][left_block[8+0+2*i]+8*4]; - h->non_zero_count_cache[3+8*12 + 2*8*i]= h->non_zero_count[left_xy[i]][left_block[8+1+2*i]+8*4]; - }else{ - h->non_zero_count_cache[3+8* 6 + 8*i]= h->non_zero_count[left_xy[i]][left_block[8+4+2*i]]; - h->non_zero_count_cache[3+8*11 + 8*i]= h->non_zero_count[left_xy[i]][left_block[8+5+2*i]]; - } - }else{ - h->non_zero_count_cache[3+8* 1 + 2*8*i]= - h->non_zero_count_cache[3+8* 2 + 2*8*i]= - h->non_zero_count_cache[3+8* 6 + 2*8*i]= - h->non_zero_count_cache[3+8* 7 + 2*8*i]= - h->non_zero_count_cache[3+8*11 + 2*8*i]= - h->non_zero_count_cache[3+8*12 + 2*8*i]= CABAC && !IS_INTRA(mb_type) ? 0 : 64; - } - } - - if( CABAC ) { - // top_cbp - if(top_type) { - h->top_cbp = h->cbp_table[top_xy]; - } else { - h->top_cbp = IS_INTRA(mb_type) ? 0x7CF : 0x00F; - } - // left_cbp - if (left_type[0]) { - h->left_cbp = (h->cbp_table[left_xy[0]] & 0x7F0) - | ((h->cbp_table[left_xy[0]]>>(left_block[0]&(~1)))&2) - | (((h->cbp_table[left_xy[1]]>>(left_block[2]&(~1)))&2) << 2); - } else { - h->left_cbp = IS_INTRA(mb_type) ? 0x7CF : 0x00F; - } - } - } - - if(IS_INTER(mb_type) || (IS_DIRECT(mb_type) && h->direct_spatial_mv_pred)){ - int list; - for(list=0; listlist_count; list++){ - if(!USES_LIST(mb_type, list)){ - /*if(!h->mv_cache_clean[list]){ - memset(h->mv_cache [list], 0, 8*5*2*sizeof(int16_t)); //FIXME clean only input? clean at all? - memset(h->ref_cache[list], PART_NOT_AVAILABLE, 8*5*sizeof(int8_t)); - h->mv_cache_clean[list]= 1; - }*/ - continue; - } - assert(!(IS_DIRECT(mb_type) && !h->direct_spatial_mv_pred)); - - h->mv_cache_clean[list]= 0; - - if(USES_LIST(top_type, list)){ - const int b_xy= h->mb2b_xy[top_xy] + 3*h->b_stride; - AV_COPY128(h->mv_cache[list][scan8[0] + 0 - 1*8], s->current_picture.motion_val[list][b_xy + 0]); - h->ref_cache[list][scan8[0] + 0 - 1*8]= - h->ref_cache[list][scan8[0] + 1 - 1*8]= s->current_picture.ref_index[list][4*top_xy + 2]; - h->ref_cache[list][scan8[0] + 2 - 1*8]= - h->ref_cache[list][scan8[0] + 3 - 1*8]= s->current_picture.ref_index[list][4*top_xy + 3]; - }else{ - AV_ZERO128(h->mv_cache[list][scan8[0] + 0 - 1*8]); - AV_WN32A(&h->ref_cache[list][scan8[0] + 0 - 1*8], ((top_type ? LIST_NOT_USED : PART_NOT_AVAILABLE)&0xFF)*0x01010101); - } - - if(mb_type & (MB_TYPE_16x8|MB_TYPE_8x8)){ - for(i=0; i<2; i++){ - int cache_idx = scan8[0] - 1 + i*2*8; - if(USES_LIST(left_type[i], list)){ - const int b_xy= h->mb2b_xy[left_xy[i]] + 3; - const int b8_xy= 4*left_xy[i] + 1; - AV_COPY32(h->mv_cache[list][cache_idx ], s->current_picture.motion_val[list][b_xy + h->b_stride*left_block[0+i*2]]); - AV_COPY32(h->mv_cache[list][cache_idx+8], s->current_picture.motion_val[list][b_xy + h->b_stride*left_block[1+i*2]]); - h->ref_cache[list][cache_idx ]= s->current_picture.ref_index[list][b8_xy + (left_block[0+i*2]&~1)]; - h->ref_cache[list][cache_idx+8]= s->current_picture.ref_index[list][b8_xy + (left_block[1+i*2]&~1)]; - }else{ - AV_ZERO32(h->mv_cache [list][cache_idx ]); - AV_ZERO32(h->mv_cache [list][cache_idx+8]); - h->ref_cache[list][cache_idx ]= - h->ref_cache[list][cache_idx+8]= (left_type[i]) ? LIST_NOT_USED : PART_NOT_AVAILABLE; - } - } - }else{ - if(USES_LIST(left_type[0], list)){ - const int b_xy= h->mb2b_xy[left_xy[0]] + 3; - const int b8_xy= 4*left_xy[0] + 1; - AV_COPY32(h->mv_cache[list][scan8[0] - 1], s->current_picture.motion_val[list][b_xy + h->b_stride*left_block[0]]); - h->ref_cache[list][scan8[0] - 1]= s->current_picture.ref_index[list][b8_xy + (left_block[0]&~1)]; - }else{ - AV_ZERO32(h->mv_cache [list][scan8[0] - 1]); - h->ref_cache[list][scan8[0] - 1]= left_type[0] ? LIST_NOT_USED : PART_NOT_AVAILABLE; - } - } - - if(USES_LIST(topright_type, list)){ - const int b_xy= h->mb2b_xy[topright_xy] + 3*h->b_stride; - AV_COPY32(h->mv_cache[list][scan8[0] + 4 - 1*8], s->current_picture.motion_val[list][b_xy]); - h->ref_cache[list][scan8[0] + 4 - 1*8]= s->current_picture.ref_index[list][4*topright_xy + 2]; - }else{ - AV_ZERO32(h->mv_cache [list][scan8[0] + 4 - 1*8]); - h->ref_cache[list][scan8[0] + 4 - 1*8]= topright_type ? LIST_NOT_USED : PART_NOT_AVAILABLE; - } - if(h->ref_cache[list][scan8[0] + 4 - 1*8] < 0){ - if(USES_LIST(topleft_type, list)){ - const int b_xy = h->mb2b_xy [topleft_xy] + 3 + h->b_stride + (h->topleft_partition & 2*h->b_stride); - const int b8_xy= 4*topleft_xy + 1 + (h->topleft_partition & 2); - AV_COPY32(h->mv_cache[list][scan8[0] - 1 - 1*8], s->current_picture.motion_val[list][b_xy]); - h->ref_cache[list][scan8[0] - 1 - 1*8]= s->current_picture.ref_index[list][b8_xy]; - }else{ - AV_ZERO32(h->mv_cache[list][scan8[0] - 1 - 1*8]); - h->ref_cache[list][scan8[0] - 1 - 1*8]= topleft_type ? LIST_NOT_USED : PART_NOT_AVAILABLE; - } - } - - if((mb_type&(MB_TYPE_SKIP|MB_TYPE_DIRECT2)) && !FRAME_MBAFF) - continue; - - if(!(mb_type&(MB_TYPE_SKIP|MB_TYPE_DIRECT2))) { - h->ref_cache[list][scan8[4 ]] = - h->ref_cache[list][scan8[12]] = PART_NOT_AVAILABLE; - AV_ZERO32(h->mv_cache [list][scan8[4 ]]); - AV_ZERO32(h->mv_cache [list][scan8[12]]); - - if( CABAC ) { - /* XXX beurk, Load mvd */ - if(USES_LIST(top_type, list)){ - const int b_xy= h->mb2br_xy[top_xy]; - AV_COPY64(h->mvd_cache[list][scan8[0] + 0 - 1*8], h->mvd_table[list][b_xy + 0]); - }else{ - AV_ZERO64(h->mvd_cache[list][scan8[0] + 0 - 1*8]); - } - if(USES_LIST(left_type[0], list)){ - const int b_xy= h->mb2br_xy[left_xy[0]] + 6; - AV_COPY16(h->mvd_cache[list][scan8[0] - 1 + 0*8], h->mvd_table[list][b_xy - left_block[0]]); - AV_COPY16(h->mvd_cache[list][scan8[0] - 1 + 1*8], h->mvd_table[list][b_xy - left_block[1]]); - }else{ - AV_ZERO16(h->mvd_cache [list][scan8[0] - 1 + 0*8]); - AV_ZERO16(h->mvd_cache [list][scan8[0] - 1 + 1*8]); - } - if(USES_LIST(left_type[1], list)){ - const int b_xy= h->mb2br_xy[left_xy[1]] + 6; - AV_COPY16(h->mvd_cache[list][scan8[0] - 1 + 2*8], h->mvd_table[list][b_xy - left_block[2]]); - AV_COPY16(h->mvd_cache[list][scan8[0] - 1 + 3*8], h->mvd_table[list][b_xy - left_block[3]]); - }else{ - AV_ZERO16(h->mvd_cache [list][scan8[0] - 1 + 2*8]); - AV_ZERO16(h->mvd_cache [list][scan8[0] - 1 + 3*8]); - } - AV_ZERO16(h->mvd_cache [list][scan8[4 ]]); - AV_ZERO16(h->mvd_cache [list][scan8[12]]); - if(h->slice_type_nos == AV_PICTURE_TYPE_B){ - fill_rectangle(&h->direct_cache[scan8[0]], 4, 4, 8, MB_TYPE_16x16>>1, 1); - - if(IS_DIRECT(top_type)){ - AV_WN32A(&h->direct_cache[scan8[0] - 1*8], 0x01010101u*(MB_TYPE_DIRECT2>>1)); - }else if(IS_8X8(top_type)){ - int b8_xy = 4*top_xy; - h->direct_cache[scan8[0] + 0 - 1*8]= h->direct_table[b8_xy + 2]; - h->direct_cache[scan8[0] + 2 - 1*8]= h->direct_table[b8_xy + 3]; - }else{ - AV_WN32A(&h->direct_cache[scan8[0] - 1*8], 0x01010101*(MB_TYPE_16x16>>1)); - } - - if(IS_DIRECT(left_type[0])) - h->direct_cache[scan8[0] - 1 + 0*8]= MB_TYPE_DIRECT2>>1; - else if(IS_8X8(left_type[0])) - h->direct_cache[scan8[0] - 1 + 0*8]= h->direct_table[4*left_xy[0] + 1 + (left_block[0]&~1)]; - else - h->direct_cache[scan8[0] - 1 + 0*8]= MB_TYPE_16x16>>1; - - if(IS_DIRECT(left_type[1])) - h->direct_cache[scan8[0] - 1 + 2*8]= MB_TYPE_DIRECT2>>1; - else if(IS_8X8(left_type[1])) - h->direct_cache[scan8[0] - 1 + 2*8]= h->direct_table[4*left_xy[1] + 1 + (left_block[2]&~1)]; - else - h->direct_cache[scan8[0] - 1 + 2*8]= MB_TYPE_16x16>>1; - } - } - } - if(FRAME_MBAFF){ -#define MAP_MVS\ - MAP_F2F(scan8[0] - 1 - 1*8, topleft_type)\ - MAP_F2F(scan8[0] + 0 - 1*8, top_type)\ - MAP_F2F(scan8[0] + 1 - 1*8, top_type)\ - MAP_F2F(scan8[0] + 2 - 1*8, top_type)\ - MAP_F2F(scan8[0] + 3 - 1*8, top_type)\ - MAP_F2F(scan8[0] + 4 - 1*8, topright_type)\ - MAP_F2F(scan8[0] - 1 + 0*8, left_type[0])\ - MAP_F2F(scan8[0] - 1 + 1*8, left_type[0])\ - MAP_F2F(scan8[0] - 1 + 2*8, left_type[1])\ - MAP_F2F(scan8[0] - 1 + 3*8, left_type[1]) - if(MB_FIELD){ -#define MAP_F2F(idx, mb_type)\ - if(!IS_INTERLACED(mb_type) && h->ref_cache[list][idx] >= 0){\ - h->ref_cache[list][idx] <<= 1;\ - h->mv_cache[list][idx][1] /= 2;\ - h->mvd_cache[list][idx][1] >>=1;\ - } - MAP_MVS -#undef MAP_F2F - }else{ -#define MAP_F2F(idx, mb_type)\ - if(IS_INTERLACED(mb_type) && h->ref_cache[list][idx] >= 0){\ - h->ref_cache[list][idx] >>= 1;\ - h->mv_cache[list][idx][1] <<= 1;\ - h->mvd_cache[list][idx][1] <<= 1;\ - } - MAP_MVS -#undef MAP_F2F - } - } - } - } - - h->neighbor_transform_size= !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[0]); -} - /** - * gets the predicted intra4x4 prediction mode. + * Get the predicted intra4x4 prediction mode. */ -static inline int pred_intra_mode(H264Context *h, int n){ +static av_always_inline int pred_intra_mode(H264Context *h, int n){ const int index8= scan8[n]; const int left= h->intra4x4_pred_mode_cache[index8 - 1]; const int top = h->intra4x4_pred_mode_cache[index8 - 8]; @@ -1197,69 +783,84 @@ else return min; } -static inline void write_back_non_zero_count(H264Context *h){ +static av_always_inline void write_back_intra_pred_mode(H264Context *h){ + int8_t *i4x4= h->intra4x4_pred_mode + h->mb2br_xy[h->mb_xy]; + int8_t *i4x4_cache= h->intra4x4_pred_mode_cache; + + AV_COPY32(i4x4, i4x4_cache + 4 + 8*4); + i4x4[4]= i4x4_cache[7+8*3]; + i4x4[5]= i4x4_cache[7+8*2]; + i4x4[6]= i4x4_cache[7+8*1]; +} + +static av_always_inline void write_back_non_zero_count(H264Context *h){ const int mb_xy= h->mb_xy; + uint8_t *nnz = h->non_zero_count[mb_xy]; + uint8_t *nnz_cache = h->non_zero_count_cache; - AV_COPY32(&h->non_zero_count[mb_xy][ 0], &h->non_zero_count_cache[4+8* 1]); - AV_COPY32(&h->non_zero_count[mb_xy][ 4], &h->non_zero_count_cache[4+8* 2]); - AV_COPY32(&h->non_zero_count[mb_xy][ 8], &h->non_zero_count_cache[4+8* 3]); - AV_COPY32(&h->non_zero_count[mb_xy][12], &h->non_zero_count_cache[4+8* 4]); - AV_COPY32(&h->non_zero_count[mb_xy][16], &h->non_zero_count_cache[4+8* 6]); - AV_COPY32(&h->non_zero_count[mb_xy][20], &h->non_zero_count_cache[4+8* 7]); - AV_COPY32(&h->non_zero_count[mb_xy][32], &h->non_zero_count_cache[4+8*11]); - AV_COPY32(&h->non_zero_count[mb_xy][36], &h->non_zero_count_cache[4+8*12]); - - if(CHROMA444){ - AV_COPY32(&h->non_zero_count[mb_xy][24], &h->non_zero_count_cache[4+8* 8]); - AV_COPY32(&h->non_zero_count[mb_xy][28], &h->non_zero_count_cache[4+8* 9]); - AV_COPY32(&h->non_zero_count[mb_xy][40], &h->non_zero_count_cache[4+8*13]); - AV_COPY32(&h->non_zero_count[mb_xy][44], &h->non_zero_count_cache[4+8*14]); + AV_COPY32(&nnz[ 0], &nnz_cache[4+8* 1]); + AV_COPY32(&nnz[ 4], &nnz_cache[4+8* 2]); + AV_COPY32(&nnz[ 8], &nnz_cache[4+8* 3]); + AV_COPY32(&nnz[12], &nnz_cache[4+8* 4]); + AV_COPY32(&nnz[16], &nnz_cache[4+8* 6]); + AV_COPY32(&nnz[20], &nnz_cache[4+8* 7]); + AV_COPY32(&nnz[32], &nnz_cache[4+8*11]); + AV_COPY32(&nnz[36], &nnz_cache[4+8*12]); + + if(!h->s.chroma_y_shift){ + AV_COPY32(&nnz[24], &nnz_cache[4+8* 8]); + AV_COPY32(&nnz[28], &nnz_cache[4+8* 9]); + AV_COPY32(&nnz[40], &nnz_cache[4+8*13]); + AV_COPY32(&nnz[44], &nnz_cache[4+8*14]); } } -static inline void write_back_motion(H264Context *h, int mb_type){ +static av_always_inline void write_back_motion_list(H264Context *h, MpegEncContext * const s, int b_stride, + int b_xy, int b8_xy, int mb_type, int list ) +{ + int16_t (*mv_dst)[2] = &s->current_picture.f.motion_val[list][b_xy]; + int16_t (*mv_src)[2] = &h->mv_cache[list][scan8[0]]; + AV_COPY128(mv_dst + 0*b_stride, mv_src + 8*0); + AV_COPY128(mv_dst + 1*b_stride, mv_src + 8*1); + AV_COPY128(mv_dst + 2*b_stride, mv_src + 8*2); + AV_COPY128(mv_dst + 3*b_stride, mv_src + 8*3); + if( CABAC ) { + uint8_t (*mvd_dst)[2] = &h->mvd_table[list][FMO ? 8*h->mb_xy : h->mb2br_xy[h->mb_xy]]; + uint8_t (*mvd_src)[2] = &h->mvd_cache[list][scan8[0]]; + if(IS_SKIP(mb_type)) + AV_ZERO128(mvd_dst); + else{ + AV_COPY64(mvd_dst, mvd_src + 8*3); + AV_COPY16(mvd_dst + 3 + 3, mvd_src + 3 + 8*0); + AV_COPY16(mvd_dst + 3 + 2, mvd_src + 3 + 8*1); + AV_COPY16(mvd_dst + 3 + 1, mvd_src + 3 + 8*2); + } + } + + { + int8_t *ref_index = &s->current_picture.f.ref_index[list][b8_xy]; + int8_t *ref_cache = h->ref_cache[list]; + ref_index[0+0*2]= ref_cache[scan8[0]]; + ref_index[1+0*2]= ref_cache[scan8[4]]; + ref_index[0+1*2]= ref_cache[scan8[8]]; + ref_index[1+1*2]= ref_cache[scan8[12]]; + } +} + +static av_always_inline void write_back_motion(H264Context *h, int mb_type){ MpegEncContext * const s = &h->s; + const int b_stride = h->b_stride; const int b_xy = 4*s->mb_x + 4*s->mb_y*h->b_stride; //try mb2b(8)_xy const int b8_xy= 4*h->mb_xy; - int list; - - if(!USES_LIST(mb_type, 0)) - fill_rectangle(&s->current_picture.ref_index[0][b8_xy], 2, 2, 2, (uint8_t)LIST_NOT_USED, 1); - for(list=0; listlist_count; list++){ - int y, b_stride; - int16_t (*mv_dst)[2]; - int16_t (*mv_src)[2]; - - if(!USES_LIST(mb_type, list)) - continue; - - b_stride = h->b_stride; - mv_dst = &s->current_picture.motion_val[list][b_xy]; - mv_src = &h->mv_cache[list][scan8[0]]; - for(y=0; y<4; y++){ - AV_COPY128(mv_dst + y*b_stride, mv_src + 8*y); - } - if( CABAC ) { - uint8_t (*mvd_dst)[2] = &h->mvd_table[list][FMO ? 8*h->mb_xy : h->mb2br_xy[h->mb_xy]]; - uint8_t (*mvd_src)[2] = &h->mvd_cache[list][scan8[0]]; - if(IS_SKIP(mb_type)) - AV_ZERO128(mvd_dst); - else{ - AV_COPY64(mvd_dst, mvd_src + 8*3); - AV_COPY16(mvd_dst + 3 + 3, mvd_src + 3 + 8*0); - AV_COPY16(mvd_dst + 3 + 2, mvd_src + 3 + 8*1); - AV_COPY16(mvd_dst + 3 + 1, mvd_src + 3 + 8*2); - } - } - - { - int8_t *ref_index = &s->current_picture.ref_index[list][b8_xy]; - ref_index[0+0*2]= h->ref_cache[list][scan8[0]]; - ref_index[1+0*2]= h->ref_cache[list][scan8[4]]; - ref_index[0+1*2]= h->ref_cache[list][scan8[8]]; - ref_index[1+1*2]= h->ref_cache[list][scan8[12]]; - } + if(USES_LIST(mb_type, 0)){ + write_back_motion_list(h, s, b_stride, b_xy, b8_xy, mb_type, 0); + }else{ + fill_rectangle(&s->current_picture.f.ref_index[0][b8_xy], + 2, 2, 2, (uint8_t)LIST_NOT_USED, 1); + } + if(USES_LIST(mb_type, 1)){ + write_back_motion_list(h, s, b_stride, b_xy, b8_xy, mb_type, 1); } if(h->slice_type_nos == AV_PICTURE_TYPE_B && CABAC){ @@ -1272,56 +873,11 @@ } } -static inline int get_dct8x8_allowed(H264Context *h){ +static av_always_inline int get_dct8x8_allowed(H264Context *h){ if(h->sps.direct_8x8_inference_flag) return !(AV_RN64A(h->sub_mb_type) & ((MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8 )*0x0001000100010001ULL)); else return !(AV_RN64A(h->sub_mb_type) & ((MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8|MB_TYPE_DIRECT2)*0x0001000100010001ULL)); } -/** - * decodes a P_SKIP or B_SKIP macroblock - */ -static void av_unused decode_mb_skip(H264Context *h){ - MpegEncContext * const s = &h->s; - const int mb_xy= h->mb_xy; - int mb_type=0; - - memset(h->non_zero_count[mb_xy], 0, 48); - - if(MB_FIELD) - mb_type|= MB_TYPE_INTERLACED; - - if( h->slice_type_nos == AV_PICTURE_TYPE_B ) - { - // just for fill_caches. pred_direct_motion will set the real mb_type - mb_type|= MB_TYPE_L0L1|MB_TYPE_DIRECT2|MB_TYPE_SKIP; - if(h->direct_spatial_mv_pred){ - fill_decode_neighbors(h, mb_type); - fill_decode_caches(h, mb_type); //FIXME check what is needed and what not ... - } - ff_h264_pred_direct_motion(h, &mb_type); - mb_type|= MB_TYPE_SKIP; - } - else - { - int mx, my; - mb_type|= MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P1L0|MB_TYPE_SKIP; - - fill_decode_neighbors(h, mb_type); - fill_decode_caches(h, mb_type); //FIXME check what is needed and what not ... - pred_pskip_motion(h, &mx, &my); - fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, 0, 1); - fill_rectangle( h->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mx,my), 4); - } - - write_back_motion(h, mb_type); - s->current_picture.mb_type[mb_xy]= mb_type; - s->current_picture.qscale_table[mb_xy]= s->qscale; - h->slice_table[ mb_xy ]= h->slice_num; - h->prev_mb_skipped= 1; -} - -#include "h264_mvpred.h" //For pred_pskip_motion() - #endif /* AVCODEC_H264_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264idct_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264idct_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264idct_template.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264idct_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,7 +25,7 @@ * @author Michael Niedermayer */ -#include "high_bit_depth.h" +#include "bit_depth_template.c" #ifndef AVCODEC_H264IDCT_INTERNAL_H #define AVCODEC_H264IDCT_INTERNAL_H @@ -46,52 +46,41 @@ }; #endif -static av_always_inline void FUNCC(idct_internal)(uint8_t *_dst, DCTELEM *_block, int stride, int block_stride, int shift, int add){ +void FUNCC(ff_h264_idct_add)(uint8_t *_dst, DCTELEM *_block, int stride) +{ int i; INIT_CLIP pixel *dst = (pixel*)_dst; dctcoef *block = (dctcoef*)_block; stride /= sizeof(pixel); - block[0] += 1<<(shift-1); + block[0] += 1 << 5; for(i=0; i<4; i++){ - const int z0= block[i + block_stride*0] + block[i + block_stride*2]; - const int z1= block[i + block_stride*0] - block[i + block_stride*2]; - const int z2= (block[i + block_stride*1]>>1) - block[i + block_stride*3]; - const int z3= block[i + block_stride*1] + (block[i + block_stride*3]>>1); - - block[i + block_stride*0]= z0 + z3; - block[i + block_stride*1]= z1 + z2; - block[i + block_stride*2]= z1 - z2; - block[i + block_stride*3]= z0 - z3; + const int z0= block[i + 4*0] + block[i + 4*2]; + const int z1= block[i + 4*0] - block[i + 4*2]; + const int z2= (block[i + 4*1]>>1) - block[i + 4*3]; + const int z3= block[i + 4*1] + (block[i + 4*3]>>1); + + block[i + 4*0]= z0 + z3; + block[i + 4*1]= z1 + z2; + block[i + 4*2]= z1 - z2; + block[i + 4*3]= z0 - z3; } for(i=0; i<4; i++){ - const int z0= block[0 + block_stride*i] + block[2 + block_stride*i]; - const int z1= block[0 + block_stride*i] - block[2 + block_stride*i]; - const int z2= (block[1 + block_stride*i]>>1) - block[3 + block_stride*i]; - const int z3= block[1 + block_stride*i] + (block[3 + block_stride*i]>>1); - - dst[i + 0*stride]= CLIP(add*dst[i + 0*stride] + ((z0 + z3) >> shift)); - dst[i + 1*stride]= CLIP(add*dst[i + 1*stride] + ((z1 + z2) >> shift)); - dst[i + 2*stride]= CLIP(add*dst[i + 2*stride] + ((z1 - z2) >> shift)); - dst[i + 3*stride]= CLIP(add*dst[i + 3*stride] + ((z0 - z3) >> shift)); + const int z0= block[0 + 4*i] + block[2 + 4*i]; + const int z1= block[0 + 4*i] - block[2 + 4*i]; + const int z2= (block[1 + 4*i]>>1) - block[3 + 4*i]; + const int z3= block[1 + 4*i] + (block[3 + 4*i]>>1); + + dst[i + 0*stride]= CLIP(dst[i + 0*stride] + ((z0 + z3) >> 6)); + dst[i + 1*stride]= CLIP(dst[i + 1*stride] + ((z1 + z2) >> 6)); + dst[i + 2*stride]= CLIP(dst[i + 2*stride] + ((z1 - z2) >> 6)); + dst[i + 3*stride]= CLIP(dst[i + 3*stride] + ((z0 - z3) >> 6)); } } -void FUNCC(ff_h264_idct_add)(uint8_t *dst, DCTELEM *block, int stride){ - FUNCC(idct_internal)(dst, block, stride, 4, 6, 1); -} - -void FUNCC(ff_h264_lowres_idct_add)(uint8_t *dst, int stride, DCTELEM *block){ - FUNCC(idct_internal)(dst, block, stride, 8, 3, 1); -} - -void FUNCC(ff_h264_lowres_idct_put)(uint8_t *dst, int stride, DCTELEM *block){ - FUNCC(idct_internal)(dst, block, stride, 8, 3, 0); -} - void FUNCC(ff_h264_idct8_add)(uint8_t *_dst, DCTELEM *_block, int stride){ int i; INIT_CLIP @@ -200,7 +189,7 @@ int nnz = nnzc[ scan8[i] ]; if(nnz){ if(nnz==1 && ((dctcoef*)block)[i*16]) FUNCC(ff_h264_idct_dc_add)(dst + block_offset[i], block + i*16*sizeof(pixel), stride); - else FUNCC(idct_internal )(dst + block_offset[i], block + i*16*sizeof(pixel), stride, 4, 6, 1); + else FUNCC(ff_h264_idct_add )(dst + block_offset[i], block + i*16*sizeof(pixel), stride); } } } @@ -208,7 +197,7 @@ void FUNCC(ff_h264_idct_add16intra)(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[15*8]){ int i; for(i=0; i<16; i++){ - if(nnzc[ scan8[i] ]) FUNCC(idct_internal )(dst + block_offset[i], block + i*16*sizeof(pixel), stride, 4, 6, 1); + if(nnzc[ scan8[i] ]) FUNCC(ff_h264_idct_add )(dst + block_offset[i], block + i*16*sizeof(pixel), stride); else if(((dctcoef*)block)[i*16]) FUNCC(ff_h264_idct_dc_add)(dst + block_offset[i], block + i*16*sizeof(pixel), stride); } } @@ -235,9 +224,32 @@ } } } + +void FUNCC(ff_h264_idct_add8_422)(uint8_t **dest, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[15*8]){ + int i, j; + + for(j=1; j<3; j++){ + for(i=j*16; i> 8; + block[stride*1+offset]= ((z1 + z2)*qmul + 128) >> 8; + block[stride*2+offset]= ((z1 - z2)*qmul + 128) >> 8; + block[stride*3+offset]= ((z0 - z3)*qmul + 128) >> 8; + } +} + void FUNCC(ff_h264_chroma_dc_dequant_idct)(DCTELEM *_block, int qmul){ const int stride= 16*2; const int xStride= 16; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_loopfilter.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_loopfilter.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_loopfilter.c 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_loopfilter.c 2012-01-11 00:34:30.000000000 +0000 @@ -100,14 +100,14 @@ {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, }; -static void av_always_inline filter_mb_edgev( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h) { - const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); - const unsigned int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset; +/* intra: 0 if this loopfilter call is guaranteed to be inter (bS < 4), 1 if it might be intra (bS == 4) */ +static void av_always_inline filter_mb_edgev( uint8_t *pix, int stride, const int16_t bS[4], unsigned int qp, int a, int b, H264Context *h, int intra ) { + const unsigned int index_a = qp + a; const int alpha = alpha_table[index_a]; - const int beta = beta_table[qp - qp_bd_offset + h->slice_beta_offset]; + const int beta = beta_table[qp + b]; if (alpha ==0 || beta == 0) return; - if( bS[0] < 4 ) { + if( bS[0] < 4 || !intra ) { int8_t tc[4]; tc[0] = tc0_table[index_a][bS[0]]; tc[1] = tc0_table[index_a][bS[1]]; @@ -118,14 +118,13 @@ h->h264dsp.h264_h_loop_filter_luma_intra(pix, stride, alpha, beta); } } -static void av_always_inline filter_mb_edgecv( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) { - const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); - const unsigned int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset; +static void av_always_inline filter_mb_edgecv( uint8_t *pix, int stride, const int16_t bS[4], unsigned int qp, int a, int b, H264Context *h, int intra ) { + const unsigned int index_a = qp + a; const int alpha = alpha_table[index_a]; - const int beta = beta_table[qp - qp_bd_offset + h->slice_beta_offset]; + const int beta = beta_table[qp + b]; if (alpha ==0 || beta == 0) return; - if( bS[0] < 4 ) { + if( bS[0] < 4 || !intra ) { int8_t tc[4]; tc[0] = tc0_table[index_a][bS[0]]+1; tc[1] = tc0_table[index_a][bS[1]]+1; @@ -137,14 +136,13 @@ } } -static void filter_mb_mbaff_edgev( H264Context *h, uint8_t *pix, int stride, int16_t bS[7], int bsi, int qp ) { - const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); - int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset; - int alpha = alpha_table[index_a]; - int beta = beta_table[qp - qp_bd_offset + h->slice_beta_offset]; +static void av_always_inline filter_mb_mbaff_edgev( H264Context *h, uint8_t *pix, int stride, const int16_t bS[7], int bsi, int qp, int a, int b, int intra ) { + const unsigned int index_a = qp + a; + const int alpha = alpha_table[index_a]; + const int beta = beta_table[qp + b]; if (alpha ==0 || beta == 0) return; - if( bS[0] < 4 ) { + if( bS[0] < 4 || !intra ) { int8_t tc[4]; tc[0] = tc0_table[index_a][bS[0*bsi]]; tc[1] = tc0_table[index_a][bS[1*bsi]]; @@ -155,14 +153,13 @@ h->h264dsp.h264_h_loop_filter_luma_mbaff_intra(pix, stride, alpha, beta); } } -static void filter_mb_mbaff_edgecv( H264Context *h, uint8_t *pix, int stride, int16_t bS[7], int bsi, int qp ) { - const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); - int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset; - int alpha = alpha_table[index_a]; - int beta = beta_table[qp - qp_bd_offset + h->slice_beta_offset]; +static void av_always_inline filter_mb_mbaff_edgecv( H264Context *h, uint8_t *pix, int stride, const int16_t bS[7], int bsi, int qp, int a, int b, int intra ) { + const unsigned int index_a = qp + a; + const int alpha = alpha_table[index_a]; + const int beta = beta_table[qp + b]; if (alpha ==0 || beta == 0) return; - if( bS[0] < 4 ) { + if( bS[0] < 4 || !intra ) { int8_t tc[4]; tc[0] = tc0_table[index_a][bS[0*bsi]] + 1; tc[1] = tc0_table[index_a][bS[1*bsi]] + 1; @@ -174,14 +171,13 @@ } } -static void av_always_inline filter_mb_edgeh( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) { - const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); - const unsigned int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset; +static void av_always_inline filter_mb_edgeh( uint8_t *pix, int stride, const int16_t bS[4], unsigned int qp, int a, int b, H264Context *h, int intra ) { + const unsigned int index_a = qp + a; const int alpha = alpha_table[index_a]; - const int beta = beta_table[qp - qp_bd_offset + h->slice_beta_offset]; + const int beta = beta_table[qp + b]; if (alpha ==0 || beta == 0) return; - if( bS[0] < 4 ) { + if( bS[0] < 4 || !intra ) { int8_t tc[4]; tc[0] = tc0_table[index_a][bS[0]]; tc[1] = tc0_table[index_a][bS[1]]; @@ -193,14 +189,13 @@ } } -static void av_always_inline filter_mb_edgech( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) { - const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); - const unsigned int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset; +static void av_always_inline filter_mb_edgech( uint8_t *pix, int stride, const int16_t bS[4], unsigned int qp, int a, int b, H264Context *h, int intra ) { + const unsigned int index_a = qp + a; const int alpha = alpha_table[index_a]; - const int beta = beta_table[qp - qp_bd_offset + h->slice_beta_offset]; + const int beta = beta_table[qp + b]; if (alpha ==0 || beta == 0) return; - if( bS[0] < 4 ) { + if( bS[0] < 4 || !intra ) { int8_t tc[4]; tc[0] = tc0_table[index_a][bS[0]]+1; tc[1] = tc0_table[index_a][bS[1]]+1; @@ -212,74 +207,126 @@ } } -void ff_h264_filter_mb_fast( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize) { +static void av_always_inline h264_filter_mb_fast_internal( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, + unsigned int linesize, unsigned int uvlinesize, int pixel_shift) { MpegEncContext * const s = &h->s; - int mb_xy; - int mb_type, left_type; - int qp, qp0, qp1, qpc, qpc0, qpc1, qp_thresh; int chroma = !(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY)); + int chroma444 = CHROMA444; + int chroma422 = CHROMA422; - mb_xy = h->mb_xy; - - if(!h->top_type || !h->h264dsp.h264_loop_filter_strength || h->pps.chroma_qp_diff || CHROMA444) { - ff_h264_filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize); - return; - } - assert(!FRAME_MBAFF); - left_type= h->left_type[0]; - - mb_type = s->current_picture.mb_type[mb_xy]; - qp = s->current_picture.qscale_table[mb_xy]; - qp0 = s->current_picture.qscale_table[mb_xy-1]; - qp1 = s->current_picture.qscale_table[h->top_mb_xy]; - qpc = get_chroma_qp( h, 0, qp ); - qpc0 = get_chroma_qp( h, 0, qp0 ); - qpc1 = get_chroma_qp( h, 0, qp1 ); + int mb_xy = h->mb_xy; + int left_type= h->left_type[LTOP]; + int top_type= h->top_type; + + int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); + int a = h->slice_alpha_c0_offset - qp_bd_offset; + int b = h->slice_beta_offset - qp_bd_offset; + + int mb_type = s->current_picture.f.mb_type[mb_xy]; + int qp = s->current_picture.f.qscale_table[mb_xy]; + int qp0 = s->current_picture.f.qscale_table[mb_xy - 1]; + int qp1 = s->current_picture.f.qscale_table[h->top_mb_xy]; + int qpc = get_chroma_qp( h, 0, qp ); + int qpc0 = get_chroma_qp( h, 0, qp0 ); + int qpc1 = get_chroma_qp( h, 0, qp1 ); qp0 = (qp + qp0 + 1) >> 1; qp1 = (qp + qp1 + 1) >> 1; qpc0 = (qpc + qpc0 + 1) >> 1; qpc1 = (qpc + qpc1 + 1) >> 1; - qp_thresh = 15+52 - h->slice_alpha_c0_offset; - if(qp <= qp_thresh && qp0 <= qp_thresh && qp1 <= qp_thresh && - qpc <= qp_thresh && qpc0 <= qp_thresh && qpc1 <= qp_thresh) - return; if( IS_INTRA(mb_type) ) { - int16_t bS4[4] = {4,4,4,4}; - int16_t bS3[4] = {3,3,3,3}; - int16_t *bSH = FIELD_PICTURE ? bS3 : bS4; + static const int16_t bS4[4] = {4,4,4,4}; + static const int16_t bS3[4] = {3,3,3,3}; + const int16_t *bSH = FIELD_PICTURE ? bS3 : bS4; if(left_type) - filter_mb_edgev( &img_y[4*0], linesize, bS4, qp0, h); + filter_mb_edgev( &img_y[4*0<cbp&7) == 7 ) { + if( IS_8x8DCT(mb_type) && (h->cbp&7) == 7 && !chroma444 ) { edges = 4; AV_WN64A(bS[0][0], 0x0002000200020002ULL); AV_WN64A(bS[0][2], 0x0002000200020002ULL); @@ -287,7 +334,7 @@ AV_WN64A(bS[1][2], 0x0002000200020002ULL); } else { int mask_edge1 = (3*(((5*mb_type)>>5)&1)) | (mb_type>>4); //(mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 : (mb_type & MB_TYPE_16x8) ? 1 : 0; - int mask_edge0 = 3*((mask_edge1>>1) & ((5*left_type)>>5)&1); // (mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16)) && (h->left_type[0] & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 : 0; + int mask_edge0 = 3*((mask_edge1>>1) & ((5*left_type)>>5)&1); // (mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16)) && (h->left_type[LTOP] & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 : 0; int step = 1+(mb_type>>24); //IS_8x8DCT(mb_type) ? 2 : 1; edges = 4 - 3*((mb_type>>3) & !(h->cbp & 15)); //(mb_type & MB_TYPE_16x16) && !(h->cbp & 15) ? 1 : 4; h->h264dsp.h264_loop_filter_strength( bS, h->non_zero_count_cache, h->ref_cache, h->mv_cache, @@ -295,38 +342,64 @@ } if( IS_INTRA(left_type) ) AV_WN64A(bS[0][0], 0x0004000400040004ULL); - if( IS_INTRA(h->top_type) ) + if( IS_INTRA(top_type) ) AV_WN64A(bS[1][0], FIELD_PICTURE ? 0x0003000300030003ULL : 0x0004000400040004ULL); -#define FILTER(hv,dir,edge)\ +#define FILTER(hv,dir,edge,intra)\ if(AV_RN64A(bS[dir][edge])) { \ - filter_mb_edge##hv( &img_y[4*edge*(dir?linesize:1)], linesize, bS[dir][edge], edge ? qp : qp##dir, h );\ - if(chroma && !(edge&1)) {\ - filter_mb_edgec##hv( &img_cb[2*edge*(dir?uvlinesize:1)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir, h );\ - filter_mb_edgec##hv( &img_cr[2*edge*(dir?uvlinesize:1)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir, h );\ + filter_mb_edge##hv( &img_y[4*edge*(dir?linesize:1<h264dsp.h264_loop_filter_strength || h->pps.chroma_qp_diff) { + ff_h264_filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize); + return; + } + +#if CONFIG_SMALL + h264_filter_mb_fast_internal(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, h->pixel_shift); +#else + if(h->pixel_shift){ + h264_filter_mb_fast_internal(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, 1); + }else{ + h264_filter_mb_fast_internal(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, 0); + } +#endif +} + static int check_mv(H264Context *h, long b_idx, long bn_idx, int mvy_limit){ int v; @@ -356,12 +429,14 @@ return v; } -static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize, int mb_xy, int mb_type, int mvy_limit, int first_vertical_edge_done, int chroma, int chroma444, int dir) { +static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize, int mb_xy, int mb_type, int mvy_limit, int first_vertical_edge_done, int a, int b, int chroma, int dir) { MpegEncContext * const s = &h->s; int edge; int chroma_qp_avg[2]; + int chroma444 = CHROMA444; + int chroma422 = CHROMA422; const int mbm_xy = dir == 0 ? mb_xy -1 : h->top_mb_xy; - const int mbm_type = dir == 0 ? h->left_type[0] : h->top_type; + const int mbm_type = dir == 0 ? h->left_type[LTOP] : h->top_type; // how often to recheck mv-based bS when iterating between edges static const uint8_t mask_edge_tab[2][8]={{0,3,3,3,1,1,1,1}, @@ -389,10 +464,10 @@ for(j=0; j<2; j++, mbn_xy += s->mb_stride){ DECLARE_ALIGNED(8, int16_t, bS)[4]; int qp; - if( IS_INTRA(mb_type|s->current_picture.mb_type[mbn_xy]) ) { + if (IS_INTRA(mb_type | s->current_picture.f.mb_type[mbn_xy])) { AV_WN64A(bS, 0x0003000300030003ULL); } else { - if(!CABAC && IS_8x8DCT(s->current_picture.mb_type[mbn_xy])){ + if (!CABAC && IS_8x8DCT(s->current_picture.f.mb_type[mbn_xy])) { bS[0]= 1+((h->cbp_table[mbn_xy] & 0x4000)||h->non_zero_count_cache[scan8[0]+0]); bS[1]= 1+((h->cbp_table[mbn_xy] & 0x4000)||h->non_zero_count_cache[scan8[0]+1]); bS[2]= 1+((h->cbp_table[mbn_xy] & 0x8000)||h->non_zero_count_cache[scan8[0]+2]); @@ -407,19 +482,19 @@ } // Do not use s->qscale as luma quantizer because it has not the same // value in IPCM macroblocks. - qp = ( s->current_picture.qscale_table[mb_xy] + s->current_picture.qscale_table[mbn_xy] + 1 ) >> 1; + qp = (s->current_picture.f.qscale_table[mb_xy] + s->current_picture.f.qscale_table[mbn_xy] + 1) >> 1; tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d ls:%d uvls:%d", mb_x, mb_y, dir, edge, qp, tmp_linesize, tmp_uvlinesize); { int i; for (i = 0; i < 4; i++) tprintf(s->avctx, " bS[%d]:%d", i, bS[i]); tprintf(s->avctx, "\n"); } - filter_mb_edgeh( &img_y[j*linesize], tmp_linesize, bS, qp, h ); - chroma_qp_avg[0] = (h->chroma_qp[0] + get_chroma_qp( h, 0, s->current_picture.qscale_table[mbn_xy] ) + 1 ) >> 1; - chroma_qp_avg[1] = (h->chroma_qp[1] + get_chroma_qp( h, 1, s->current_picture.qscale_table[mbn_xy] ) + 1 ) >> 1; + filter_mb_edgeh( &img_y[j*linesize], tmp_linesize, bS, qp, a, b, h, 0 ); + chroma_qp_avg[0] = (h->chroma_qp[0] + get_chroma_qp(h, 0, s->current_picture.f.qscale_table[mbn_xy]) + 1) >> 1; + chroma_qp_avg[1] = (h->chroma_qp[1] + get_chroma_qp(h, 1, s->current_picture.f.qscale_table[mbn_xy]) + 1) >> 1; if (chroma) { if (chroma444) { - filter_mb_edgeh (&img_cb[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[0], h); - filter_mb_edgeh (&img_cr[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[1], h); + filter_mb_edgeh (&img_cb[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[0], a, b, h, 0); + filter_mb_edgeh (&img_cr[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[1], a, b, h, 0); } else { - filter_mb_edgech(&img_cb[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[0], h); - filter_mb_edgech(&img_cr[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[1], h); + filter_mb_edgech(&img_cb[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[0], a, b, h, 0); + filter_mb_edgech(&img_cr[j*uvlinesize], tmp_uvlinesize, bS, chroma_qp_avg[1], a, b, h, 0); } } } @@ -472,32 +547,32 @@ // Do not use s->qscale as luma quantizer because it has not the same // value in IPCM macroblocks. if(bS[0]+bS[1]+bS[2]+bS[3]){ - qp = ( s->current_picture.qscale_table[mb_xy] + s->current_picture.qscale_table[mbm_xy] + 1 ) >> 1; + qp = (s->current_picture.f.qscale_table[mb_xy] + s->current_picture.f.qscale_table[mbm_xy] + 1) >> 1; //tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d, QPc:%d, QPcn:%d\n", mb_x, mb_y, dir, edge, qp, h->chroma_qp[0], s->current_picture.qscale_table[mbn_xy]); tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d ls:%d uvls:%d", mb_x, mb_y, dir, edge, qp, linesize, uvlinesize); //{ int i; for (i = 0; i < 4; i++) tprintf(s->avctx, " bS[%d]:%d", i, bS[i]); tprintf(s->avctx, "\n"); } - chroma_qp_avg[0] = (h->chroma_qp[0] + get_chroma_qp( h, 0, s->current_picture.qscale_table[mbm_xy] ) + 1 ) >> 1; - chroma_qp_avg[1] = (h->chroma_qp[1] + get_chroma_qp( h, 1, s->current_picture.qscale_table[mbm_xy] ) + 1 ) >> 1; + chroma_qp_avg[0] = (h->chroma_qp[0] + get_chroma_qp(h, 0, s->current_picture.f.qscale_table[mbm_xy]) + 1) >> 1; + chroma_qp_avg[1] = (h->chroma_qp[1] + get_chroma_qp(h, 1, s->current_picture.f.qscale_table[mbm_xy]) + 1) >> 1; if( dir == 0 ) { - filter_mb_edgev( &img_y[0], linesize, bS, qp, h ); + filter_mb_edgev( &img_y[0], linesize, bS, qp, a, b, h, 1 ); if (chroma) { if (chroma444) { - filter_mb_edgev ( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], h); - filter_mb_edgev ( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], h); + filter_mb_edgev ( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], a, b, h, 1); + filter_mb_edgev ( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], a, b, h, 1); } else { - filter_mb_edgecv( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], h); - filter_mb_edgecv( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], h); + filter_mb_edgecv( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], a, b, h, 1); + filter_mb_edgecv( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], a, b, h, 1); } } } else { - filter_mb_edgeh( &img_y[0], linesize, bS, qp, h ); + filter_mb_edgeh( &img_y[0], linesize, bS, qp, a, b, h, 1 ); if (chroma) { if (chroma444) { - filter_mb_edgeh ( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], h); - filter_mb_edgeh ( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], h); + filter_mb_edgeh ( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], a, b, h, 1); + filter_mb_edgeh ( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], a, b, h, 1); } else { - filter_mb_edgech( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], h); - filter_mb_edgech( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], h); + filter_mb_edgech( &img_cb[0], uvlinesize, bS, chroma_qp_avg[0], a, b, h, 1); + filter_mb_edgech( &img_cr[0], uvlinesize, bS, chroma_qp_avg[1], a, b, h, 1); } } } @@ -509,8 +584,9 @@ for( edge = 1; edge < edges; edge++ ) { DECLARE_ALIGNED(8, int16_t, bS)[4]; int qp; + const int deblock_edge = !IS_8x8DCT(mb_type & (edge<<24)); // (edge&1) && IS_8x8DCT(mb_type) - if( IS_8x8DCT(mb_type & (edge<<24)) ) // (edge&1) && IS_8x8DCT(mb_type) + if (!deblock_edge && (!chroma422 || dir == 0)) continue; if( IS_INTRA(mb_type)) { @@ -556,30 +632,39 @@ /* Filter edge */ // Do not use s->qscale as luma quantizer because it has not the same // value in IPCM macroblocks. - qp = s->current_picture.qscale_table[mb_xy]; + qp = s->current_picture.f.qscale_table[mb_xy]; //tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d, QPc:%d, QPcn:%d\n", mb_x, mb_y, dir, edge, qp, h->chroma_qp[0], s->current_picture.qscale_table[mbn_xy]); tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d ls:%d uvls:%d", mb_x, mb_y, dir, edge, qp, linesize, uvlinesize); //{ int i; for (i = 0; i < 4; i++) tprintf(s->avctx, " bS[%d]:%d", i, bS[i]); tprintf(s->avctx, "\n"); } if( dir == 0 ) { - filter_mb_edgev( &img_y[4*edge << h->pixel_shift], linesize, bS, qp, h ); + filter_mb_edgev( &img_y[4*edge << h->pixel_shift], linesize, bS, qp, a, b, h, 0 ); if (chroma) { if (chroma444) { - filter_mb_edgev ( &img_cb[4*edge << h->pixel_shift], uvlinesize, bS, h->chroma_qp[0], h); - filter_mb_edgev ( &img_cr[4*edge << h->pixel_shift], uvlinesize, bS, h->chroma_qp[1], h); + filter_mb_edgev ( &img_cb[4*edge << h->pixel_shift], uvlinesize, bS, h->chroma_qp[0], a, b, h, 0); + filter_mb_edgev ( &img_cr[4*edge << h->pixel_shift], uvlinesize, bS, h->chroma_qp[1], a, b, h, 0); } else if( (edge&1) == 0 ) { - filter_mb_edgecv( &img_cb[2*edge << h->pixel_shift], uvlinesize, bS, h->chroma_qp[0], h); - filter_mb_edgecv( &img_cr[2*edge << h->pixel_shift], uvlinesize, bS, h->chroma_qp[1], h); + filter_mb_edgecv( &img_cb[2*edge << h->pixel_shift], uvlinesize, bS, h->chroma_qp[0], a, b, h, 0); + filter_mb_edgecv( &img_cr[2*edge << h->pixel_shift], uvlinesize, bS, h->chroma_qp[1], a, b, h, 0); } } } else { - filter_mb_edgeh( &img_y[4*edge*linesize], linesize, bS, qp, h ); - if (chroma) { - if (chroma444) { - filter_mb_edgeh ( &img_cb[4*edge*uvlinesize], uvlinesize, bS, h->chroma_qp[0], h); - filter_mb_edgeh ( &img_cr[4*edge*uvlinesize], uvlinesize, bS, h->chroma_qp[1], h); - } else if( (edge&1) == 0 ) { - filter_mb_edgech( &img_cb[2*edge*uvlinesize], uvlinesize, bS, h->chroma_qp[0], h); - filter_mb_edgech( &img_cr[2*edge*uvlinesize], uvlinesize, bS, h->chroma_qp[1], h); + if (chroma422) { + if (deblock_edge) + filter_mb_edgeh(&img_y[4*edge*linesize], linesize, bS, qp, a, b, h, 0); + if (chroma) { + filter_mb_edgech(&img_cb[4*edge*uvlinesize], uvlinesize, bS, h->chroma_qp[0], a, b, h, 0); + filter_mb_edgech(&img_cr[4*edge*uvlinesize], uvlinesize, bS, h->chroma_qp[1], a, b, h, 0); + } + } else { + filter_mb_edgeh(&img_y[4*edge*linesize], linesize, bS, qp, a, b, h, 0); + if (chroma) { + if (chroma444) { + filter_mb_edgeh (&img_cb[4*edge*uvlinesize], uvlinesize, bS, h->chroma_qp[0], a, b, h, 0); + filter_mb_edgeh (&img_cr[4*edge*uvlinesize], uvlinesize, bS, h->chroma_qp[1], a, b, h, 0); + } else if ((edge&1) == 0) { + filter_mb_edgech(&img_cb[2*edge*uvlinesize], uvlinesize, bS, h->chroma_qp[0], a, b, h, 0); + filter_mb_edgech(&img_cr[2*edge*uvlinesize], uvlinesize, bS, h->chroma_qp[1], a, b, h, 0); + } } } } @@ -589,17 +674,20 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize) { MpegEncContext * const s = &h->s; const int mb_xy= mb_x + mb_y*s->mb_stride; - const int mb_type = s->current_picture.mb_type[mb_xy]; + const int mb_type = s->current_picture.f.mb_type[mb_xy]; const int mvy_limit = IS_INTERLACED(mb_type) ? 2 : 4; int first_vertical_edge_done = 0; av_unused int dir; int chroma = !(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY)); + int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); + int a = h->slice_alpha_c0_offset - qp_bd_offset; + int b = h->slice_beta_offset - qp_bd_offset; if (FRAME_MBAFF // and current and left pair do not have the same interlaced type - && IS_INTERLACED(mb_type^h->left_type[0]) + && IS_INTERLACED(mb_type^h->left_type[LTOP]) // and left mb is in available to us - && h->left_type[0]) { + && h->left_type[LTOP]) { /* First vertical edge is different in MBAFF frames * There are 8 different bS to compute and 2 different Qp */ @@ -627,8 +715,8 @@ const uint8_t *off= offset[MB_FIELD][mb_y&1]; for( i = 0; i < 8; i++ ) { int j= MB_FIELD ? i>>2 : i&1; - int mbn_xy = h->left_mb_xy[j]; - int mbn_type= h->left_type[j]; + int mbn_xy = h->left_mb_xy[LEFT(j)]; + int mbn_type= h->left_type[LEFT(j)]; if( IS_INTRA( mbn_type ) ) bS[i] = 4; @@ -642,9 +730,9 @@ } } - mb_qp = s->current_picture.qscale_table[mb_xy]; - mbn0_qp = s->current_picture.qscale_table[h->left_mb_xy[0]]; - mbn1_qp = s->current_picture.qscale_table[h->left_mb_xy[1]]; + mb_qp = s->current_picture.f.qscale_table[mb_xy]; + mbn0_qp = s->current_picture.f.qscale_table[h->left_mb_xy[0]]; + mbn1_qp = s->current_picture.f.qscale_table[h->left_mb_xy[1]]; qp[0] = ( mb_qp + mbn0_qp + 1 ) >> 1; bqp[0] = ( get_chroma_qp( h, 0, mb_qp ) + get_chroma_qp( h, 0, mbn0_qp ) + 1 ) >> 1; @@ -660,35 +748,40 @@ tprintf(s->avctx, "filter mb:%d/%d MBAFF, QPy:%d/%d, QPb:%d/%d QPr:%d/%d ls:%d uvls:%d", mb_x, mb_y, qp[0], qp[1], bqp[0], bqp[1], rqp[0], rqp[1], linesize, uvlinesize); { int i; for (i = 0; i < 8; i++) tprintf(s->avctx, " bS[%d]:%d", i, bS[i]); tprintf(s->avctx, "\n"); } if(MB_FIELD){ - filter_mb_mbaff_edgev ( h, img_y , linesize, bS , 1, qp [0] ); - filter_mb_mbaff_edgev ( h, img_y + 8* linesize, linesize, bS+4, 1, qp [1] ); + filter_mb_mbaff_edgev ( h, img_y , linesize, bS , 1, qp [0], a, b, 1 ); + filter_mb_mbaff_edgev ( h, img_y + 8* linesize, linesize, bS+4, 1, qp [1], a, b, 1 ); if (chroma){ if (CHROMA444) { - filter_mb_mbaff_edgev ( h, img_cb, uvlinesize, bS , 1, bqp[0] ); - filter_mb_mbaff_edgev ( h, img_cb + 8*uvlinesize, uvlinesize, bS+4, 1, bqp[1] ); - filter_mb_mbaff_edgev ( h, img_cr, uvlinesize, bS , 1, rqp[0] ); - filter_mb_mbaff_edgev ( h, img_cr + 8*uvlinesize, uvlinesize, bS+4, 1, rqp[1] ); + filter_mb_mbaff_edgev ( h, img_cb, uvlinesize, bS , 1, bqp[0], a, b, 1 ); + filter_mb_mbaff_edgev ( h, img_cb + 8*uvlinesize, uvlinesize, bS+4, 1, bqp[1], a, b, 1 ); + filter_mb_mbaff_edgev ( h, img_cr, uvlinesize, bS , 1, rqp[0], a, b, 1 ); + filter_mb_mbaff_edgev ( h, img_cr + 8*uvlinesize, uvlinesize, bS+4, 1, rqp[1], a, b, 1 ); + } else if (CHROMA422) { + filter_mb_mbaff_edgecv(h, img_cb, uvlinesize, bS , 1, bqp[0], a, b, 1); + filter_mb_mbaff_edgecv(h, img_cb + 8*uvlinesize, uvlinesize, bS+4, 1, bqp[1], a, b, 1); + filter_mb_mbaff_edgecv(h, img_cr, uvlinesize, bS , 1, rqp[0], a, b, 1); + filter_mb_mbaff_edgecv(h, img_cr + 8*uvlinesize, uvlinesize, bS+4, 1, rqp[1], a, b, 1); }else{ - filter_mb_mbaff_edgecv( h, img_cb, uvlinesize, bS , 1, bqp[0] ); - filter_mb_mbaff_edgecv( h, img_cb + 4*uvlinesize, uvlinesize, bS+4, 1, bqp[1] ); - filter_mb_mbaff_edgecv( h, img_cr, uvlinesize, bS , 1, rqp[0] ); - filter_mb_mbaff_edgecv( h, img_cr + 4*uvlinesize, uvlinesize, bS+4, 1, rqp[1] ); + filter_mb_mbaff_edgecv( h, img_cb, uvlinesize, bS , 1, bqp[0], a, b, 1 ); + filter_mb_mbaff_edgecv( h, img_cb + 4*uvlinesize, uvlinesize, bS+4, 1, bqp[1], a, b, 1 ); + filter_mb_mbaff_edgecv( h, img_cr, uvlinesize, bS , 1, rqp[0], a, b, 1 ); + filter_mb_mbaff_edgecv( h, img_cr + 4*uvlinesize, uvlinesize, bS+4, 1, rqp[1], a, b, 1 ); } } }else{ - filter_mb_mbaff_edgev ( h, img_y , 2* linesize, bS , 2, qp [0] ); - filter_mb_mbaff_edgev ( h, img_y + linesize, 2* linesize, bS+1, 2, qp [1] ); + filter_mb_mbaff_edgev ( h, img_y , 2* linesize, bS , 2, qp [0], a, b, 1 ); + filter_mb_mbaff_edgev ( h, img_y + linesize, 2* linesize, bS+1, 2, qp [1], a, b, 1 ); if (chroma){ if (CHROMA444) { - filter_mb_mbaff_edgev ( h, img_cb, 2*uvlinesize, bS , 2, bqp[0] ); - filter_mb_mbaff_edgev ( h, img_cb + uvlinesize, 2*uvlinesize, bS+1, 2, bqp[1] ); - filter_mb_mbaff_edgev ( h, img_cr, 2*uvlinesize, bS , 2, rqp[0] ); - filter_mb_mbaff_edgev ( h, img_cr + uvlinesize, 2*uvlinesize, bS+1, 2, rqp[1] ); + filter_mb_mbaff_edgev ( h, img_cb, 2*uvlinesize, bS , 2, bqp[0], a, b, 1 ); + filter_mb_mbaff_edgev ( h, img_cb + uvlinesize, 2*uvlinesize, bS+1, 2, bqp[1], a, b, 1 ); + filter_mb_mbaff_edgev ( h, img_cr, 2*uvlinesize, bS , 2, rqp[0], a, b, 1 ); + filter_mb_mbaff_edgev ( h, img_cr + uvlinesize, 2*uvlinesize, bS+1, 2, rqp[1], a, b, 1 ); }else{ - filter_mb_mbaff_edgecv( h, img_cb, 2*uvlinesize, bS , 2, bqp[0] ); - filter_mb_mbaff_edgecv( h, img_cb + uvlinesize, 2*uvlinesize, bS+1, 2, bqp[1] ); - filter_mb_mbaff_edgecv( h, img_cr, 2*uvlinesize, bS , 2, rqp[0] ); - filter_mb_mbaff_edgecv( h, img_cr + uvlinesize, 2*uvlinesize, bS+1, 2, rqp[1] ); + filter_mb_mbaff_edgecv( h, img_cb, 2*uvlinesize, bS , 2, bqp[0], a, b, 1 ); + filter_mb_mbaff_edgecv( h, img_cb + uvlinesize, 2*uvlinesize, bS+1, 2, bqp[1], a, b, 1 ); + filter_mb_mbaff_edgecv( h, img_cr, 2*uvlinesize, bS , 2, rqp[0], a, b, 1 ); + filter_mb_mbaff_edgecv( h, img_cr + uvlinesize, 2*uvlinesize, bS+1, 2, rqp[1], a, b, 1 ); } } } @@ -696,9 +789,9 @@ #if CONFIG_SMALL 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, chroma, CHROMA444, 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, a, b, chroma, dir); #else - filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, first_vertical_edge_done, chroma, CHROMA444, 0); - filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, 0, chroma, CHROMA444, 1); + filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, first_vertical_edge_done, a, b, chroma, 0); + filter_mb_dir(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, 0, a, b, chroma, 1); #endif } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_mvpred.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_mvpred.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_mvpred.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_mvpred.h 2012-01-11 00:34:30.000000000 +0000 @@ -35,7 +35,7 @@ //#undef NDEBUG #include -static inline int fetch_diagonal_mv(H264Context *h, const int16_t **C, int i, int list, int part_width){ +static av_always_inline int fetch_diagonal_mv(H264Context *h, const int16_t **C, int i, int list, int part_width){ const int topright_ref= h->ref_cache[list][ i - 8 + part_width ]; MpegEncContext *s = &h->s; @@ -48,15 +48,15 @@ const int mb_type = mb_types[xy+(y4>>2)*s->mb_stride];\ if(!USES_LIST(mb_type,list))\ return LIST_NOT_USED;\ - mv = s->current_picture_ptr->motion_val[list][h->mb2b_xy[xy]+3 + y4*h->b_stride];\ + mv = s->current_picture_ptr->f.motion_val[list][h->mb2b_xy[xy] + 3 + y4*h->b_stride];\ h->mv_cache[list][scan8[0]-2][0] = mv[0];\ h->mv_cache[list][scan8[0]-2][1] = mv[1] MV_OP;\ - return s->current_picture_ptr->ref_index[list][4*xy+1 + (y4&~1)] REF_OP; + return s->current_picture_ptr->f.ref_index[list][4*xy + 1 + (y4 & ~1)] REF_OP; if(topright_ref == PART_NOT_AVAILABLE && i >= scan8[0]+8 && (i&7)==4 && h->ref_cache[list][scan8[0]-1] != PART_NOT_AVAILABLE){ - const uint32_t *mb_types = s->current_picture_ptr->mb_type; + const uint32_t *mb_types = s->current_picture_ptr->f.mb_type; const int16_t *mv; AV_ZERO32(h->mv_cache[list][scan8[0]-2]); *C = h->mv_cache[list][scan8[0]-2]; @@ -64,7 +64,6 @@ if(!MB_FIELD && IS_INTERLACED(h->left_type[0])){ SET_DIAG_MV(*2, >>1, h->left_mb_xy[0]+s->mb_stride, (s->mb_y&1)*2+(i>>5)); - assert(h->left_mb_xy[0] == h->left_mb_xy[1]); } if(MB_FIELD && !IS_INTERLACED(h->left_type[0])){ @@ -87,13 +86,13 @@ } /** - * gets the predicted MV. + * Get the predicted MV. * @param n the block index * @param part_width the width of the partition (4, 8,16) -> (1, 2, 4) * @param mx the x component of the predicted motion vector * @param my the y component of the predicted motion vector */ -static inline void pred_motion(H264Context * const h, int n, int part_width, int list, int ref, int * const mx, int * const my){ +static av_always_inline void pred_motion(H264Context * const h, int n, int part_width, int list, int ref, int * const mx, int * const my){ const int index8= scan8[n]; const int top_ref= h->ref_cache[list][ index8 - 8 ]; const int left_ref= h->ref_cache[list][ index8 - 1 ]; @@ -143,12 +142,12 @@ } /** - * gets the directionally predicted 16x8 MV. + * Get the directionally predicted 16x8 MV. * @param n the block index * @param mx the x component of the predicted motion vector * @param my the y component of the predicted motion vector */ -static inline void pred_16x8_motion(H264Context * const h, int n, int list, int ref, int * const mx, int * const my){ +static av_always_inline void pred_16x8_motion(H264Context * const h, int n, int list, int ref, int * const mx, int * const my){ if(n==0){ const int top_ref= h->ref_cache[list][ scan8[0] - 8 ]; const int16_t * const B= h->mv_cache[list][ scan8[0] - 8 ]; @@ -178,12 +177,12 @@ } /** - * gets the directionally predicted 8x16 MV. + * Get the directionally predicted 8x16 MV. * @param n the block index * @param mx the x component of the predicted motion vector * @param my the y component of the predicted motion vector */ -static inline void pred_8x16_motion(H264Context * const h, int n, int list, int ref, int * const mx, int * const my){ +static av_always_inline void pred_8x16_motion(H264Context * const h, int n, int list, int ref, int * const mx, int * const my){ if(n==0){ const int left_ref= h->ref_cache[list][ scan8[0] - 1 ]; const int16_t * const A= h->mv_cache[list][ scan8[0] - 1 ]; @@ -214,23 +213,580 @@ pred_motion(h, n, 2, list, ref, mx, my); } -static inline void pred_pskip_motion(H264Context * const h, int * const mx, int * const my){ - const int top_ref = h->ref_cache[0][ scan8[0] - 8 ]; - const int left_ref= h->ref_cache[0][ scan8[0] - 1 ]; +#define FIX_MV_MBAFF(type, refn, mvn, idx)\ + if(FRAME_MBAFF){\ + if(MB_FIELD){\ + if(!IS_INTERLACED(type)){\ + refn <<= 1;\ + AV_COPY32(mvbuf[idx], mvn);\ + mvbuf[idx][1] /= 2;\ + mvn = mvbuf[idx];\ + }\ + }else{\ + if(IS_INTERLACED(type)){\ + refn >>= 1;\ + AV_COPY32(mvbuf[idx], mvn);\ + mvbuf[idx][1] <<= 1;\ + mvn = mvbuf[idx];\ + }\ + }\ + } - tprintf(h->s.avctx, "pred_pskip: (%d) (%d) at %2d %2d\n", top_ref, left_ref, h->s.mb_x, h->s.mb_y); +static av_always_inline void pred_pskip_motion(H264Context * const h){ + DECLARE_ALIGNED(4, static const int16_t, zeromv)[2] = {0}; + DECLARE_ALIGNED(4, int16_t, mvbuf)[3][2]; + MpegEncContext * const s = &h->s; + int8_t *ref = s->current_picture.f.ref_index[0]; + int16_t (*mv)[2] = s->current_picture.f.motion_val[0]; + int top_ref, left_ref, diagonal_ref, match_count, mx, my; + const int16_t *A, *B, *C; + int b_stride = h->b_stride; + + fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, 0, 1); + + /* To avoid doing an entire fill_decode_caches, we inline the relevant parts here. + * FIXME: this is a partial duplicate of the logic in fill_decode_caches, but it's + * faster this way. Is there a way to avoid this duplication? + */ + if(USES_LIST(h->left_type[LTOP], 0)){ + left_ref = ref[4*h->left_mb_xy[LTOP] + 1 + (h->left_block[0]&~1)]; + A = mv[h->mb2b_xy[h->left_mb_xy[LTOP]] + 3 + b_stride*h->left_block[0]]; + FIX_MV_MBAFF(h->left_type[LTOP], left_ref, A, 0); + if(!(left_ref | AV_RN32A(A))){ + goto zeromv; + } + }else if(h->left_type[LTOP]){ + left_ref = LIST_NOT_USED; + A = zeromv; + }else{ + goto zeromv; + } - if(top_ref == PART_NOT_AVAILABLE || left_ref == PART_NOT_AVAILABLE - || !( top_ref | AV_RN32A(h->mv_cache[0][ scan8[0] - 8 ])) - || !(left_ref | AV_RN32A(h->mv_cache[0][ scan8[0] - 1 ]))){ + if(USES_LIST(h->top_type, 0)){ + top_ref = ref[4*h->top_mb_xy + 2]; + B = mv[h->mb2b_xy[h->top_mb_xy] + 3*b_stride]; + FIX_MV_MBAFF(h->top_type, top_ref, B, 1); + if(!(top_ref | AV_RN32A(B))){ + goto zeromv; + } + }else if(h->top_type){ + top_ref = LIST_NOT_USED; + B = zeromv; + }else{ + goto zeromv; + } - *mx = *my = 0; - return; + tprintf(h->s.avctx, "pred_pskip: (%d) (%d) at %2d %2d\n", top_ref, left_ref, h->s.mb_x, h->s.mb_y); + + if(USES_LIST(h->topright_type, 0)){ + diagonal_ref = ref[4*h->topright_mb_xy + 2]; + C = mv[h->mb2b_xy[h->topright_mb_xy] + 3*b_stride]; + FIX_MV_MBAFF(h->topright_type, diagonal_ref, C, 2); + }else if(h->topright_type){ + diagonal_ref = LIST_NOT_USED; + C = zeromv; + }else{ + if(USES_LIST(h->topleft_type, 0)){ + diagonal_ref = ref[4*h->topleft_mb_xy + 1 + (h->topleft_partition & 2)]; + C = mv[h->mb2b_xy[h->topleft_mb_xy] + 3 + b_stride + (h->topleft_partition & 2*b_stride)]; + FIX_MV_MBAFF(h->topleft_type, diagonal_ref, C, 2); + }else if(h->topleft_type){ + diagonal_ref = LIST_NOT_USED; + C = zeromv; + }else{ + diagonal_ref = PART_NOT_AVAILABLE; + C = zeromv; + } } - pred_motion(h, 0, 4, 0, 0, mx, my); + match_count= !diagonal_ref + !top_ref + !left_ref; + tprintf(h->s.avctx, "pred_pskip_motion match_count=%d\n", match_count); + if(match_count > 1){ + mx = mid_pred(A[0], B[0], C[0]); + my = mid_pred(A[1], B[1], C[1]); + }else if(match_count==1){ + if(!left_ref){ + mx = A[0]; + my = A[1]; + }else if(!top_ref){ + mx = B[0]; + my = B[1]; + }else{ + mx = C[0]; + my = C[1]; + } + }else{ + mx = mid_pred(A[0], B[0], C[0]); + my = mid_pred(A[1], B[1], C[1]); + } + fill_rectangle( h->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mx,my), 4); + return; +zeromv: + fill_rectangle( h->mv_cache[0][scan8[0]], 4, 4, 8, 0, 4); return; } +static void fill_decode_neighbors(H264Context *h, int mb_type){ + MpegEncContext * const s = &h->s; + const int mb_xy= h->mb_xy; + int topleft_xy, top_xy, topright_xy, left_xy[LEFT_MBS]; + static const uint8_t left_block_options[4][32]={ + {0,1,2,3,7,10,8,11,3+0*4, 3+1*4, 3+2*4, 3+3*4, 1+4*4, 1+8*4, 1+5*4, 1+9*4}, + {2,2,3,3,8,11,8,11,3+2*4, 3+2*4, 3+3*4, 3+3*4, 1+5*4, 1+9*4, 1+5*4, 1+9*4}, + {0,0,1,1,7,10,7,10,3+0*4, 3+0*4, 3+1*4, 3+1*4, 1+4*4, 1+8*4, 1+4*4, 1+8*4}, + {0,2,0,2,7,10,7,10,3+0*4, 3+2*4, 3+0*4, 3+2*4, 1+4*4, 1+8*4, 1+4*4, 1+8*4} + }; + + h->topleft_partition= -1; + + top_xy = mb_xy - (s->mb_stride << MB_FIELD); + + /* Wow, what a mess, why didn't they simplify the interlacing & intra + * stuff, I can't imagine that these complex rules are worth it. */ + + topleft_xy = top_xy - 1; + topright_xy= top_xy + 1; + left_xy[LBOT] = left_xy[LTOP] = mb_xy-1; + h->left_block = left_block_options[0]; + if(FRAME_MBAFF){ + const int left_mb_field_flag = IS_INTERLACED(s->current_picture.f.mb_type[mb_xy - 1]); + const int curr_mb_field_flag = IS_INTERLACED(mb_type); + if(s->mb_y&1){ + if (left_mb_field_flag != curr_mb_field_flag) { + left_xy[LBOT] = left_xy[LTOP] = mb_xy - s->mb_stride - 1; + if (curr_mb_field_flag) { + left_xy[LBOT] += s->mb_stride; + h->left_block = left_block_options[3]; + } else { + topleft_xy += s->mb_stride; + // take top left mv from the middle of the mb, as opposed to all other modes which use the bottom right partition + h->topleft_partition = 0; + h->left_block = left_block_options[1]; + } + } + }else{ + if(curr_mb_field_flag){ + topleft_xy += s->mb_stride & (((s->current_picture.f.mb_type[top_xy - 1] >> 7) & 1) - 1); + topright_xy += s->mb_stride & (((s->current_picture.f.mb_type[top_xy + 1] >> 7) & 1) - 1); + top_xy += s->mb_stride & (((s->current_picture.f.mb_type[top_xy ] >> 7) & 1) - 1); + } + if (left_mb_field_flag != curr_mb_field_flag) { + if (curr_mb_field_flag) { + left_xy[LBOT] += s->mb_stride; + h->left_block = left_block_options[3]; + } else { + h->left_block = left_block_options[2]; + } + } + } + } + + h->topleft_mb_xy = topleft_xy; + h->top_mb_xy = top_xy; + h->topright_mb_xy= topright_xy; + h->left_mb_xy[LTOP] = left_xy[LTOP]; + h->left_mb_xy[LBOT] = left_xy[LBOT]; + //FIXME do we need all in the context? + + h->topleft_type = s->current_picture.f.mb_type[topleft_xy]; + h->top_type = s->current_picture.f.mb_type[top_xy]; + h->topright_type = s->current_picture.f.mb_type[topright_xy]; + h->left_type[LTOP] = s->current_picture.f.mb_type[left_xy[LTOP]]; + h->left_type[LBOT] = s->current_picture.f.mb_type[left_xy[LBOT]]; + + if(FMO){ + if(h->slice_table[topleft_xy ] != h->slice_num) h->topleft_type = 0; + if(h->slice_table[top_xy ] != h->slice_num) h->top_type = 0; + if(h->slice_table[left_xy[LTOP] ] != h->slice_num) h->left_type[LTOP] = h->left_type[LBOT] = 0; + }else{ + if(h->slice_table[topleft_xy ] != h->slice_num){ + h->topleft_type = 0; + if(h->slice_table[top_xy ] != h->slice_num) h->top_type = 0; + if(h->slice_table[left_xy[LTOP] ] != h->slice_num) h->left_type[LTOP] = h->left_type[LBOT] = 0; + } + } + if(h->slice_table[topright_xy] != h->slice_num) h->topright_type= 0; +} + +static void fill_decode_caches(H264Context *h, int mb_type){ + MpegEncContext * const s = &h->s; + int topleft_xy, top_xy, topright_xy, left_xy[LEFT_MBS]; + int topleft_type, top_type, topright_type, left_type[LEFT_MBS]; + const uint8_t * left_block= h->left_block; + int i; + uint8_t *nnz; + uint8_t *nnz_cache; + + topleft_xy = h->topleft_mb_xy; + top_xy = h->top_mb_xy; + topright_xy = h->topright_mb_xy; + left_xy[LTOP] = h->left_mb_xy[LTOP]; + left_xy[LBOT] = h->left_mb_xy[LBOT]; + topleft_type = h->topleft_type; + top_type = h->top_type; + topright_type = h->topright_type; + left_type[LTOP]= h->left_type[LTOP]; + left_type[LBOT]= h->left_type[LBOT]; + + if(!IS_SKIP(mb_type)){ + if(IS_INTRA(mb_type)){ + int type_mask= h->pps.constrained_intra_pred ? IS_INTRA(-1) : -1; + h->topleft_samples_available= + h->top_samples_available= + h->left_samples_available= 0xFFFF; + h->topright_samples_available= 0xEEEA; + + if(!(top_type & type_mask)){ + h->topleft_samples_available= 0xB3FF; + h->top_samples_available= 0x33FF; + h->topright_samples_available= 0x26EA; + } + if(IS_INTERLACED(mb_type) != IS_INTERLACED(left_type[LTOP])){ + if(IS_INTERLACED(mb_type)){ + if(!(left_type[LTOP] & type_mask)){ + h->topleft_samples_available&= 0xDFFF; + h->left_samples_available&= 0x5FFF; + } + if(!(left_type[LBOT] & type_mask)){ + h->topleft_samples_available&= 0xFF5F; + h->left_samples_available&= 0xFF5F; + } + }else{ + int left_typei = s->current_picture.f.mb_type[left_xy[LTOP] + s->mb_stride]; + + assert(left_xy[LTOP] == left_xy[LBOT]); + if(!((left_typei & type_mask) && (left_type[LTOP] & type_mask))){ + h->topleft_samples_available&= 0xDF5F; + h->left_samples_available&= 0x5F5F; + } + } + }else{ + if(!(left_type[LTOP] & type_mask)){ + h->topleft_samples_available&= 0xDF5F; + h->left_samples_available&= 0x5F5F; + } + } + + if(!(topleft_type & type_mask)) + h->topleft_samples_available&= 0x7FFF; + + if(!(topright_type & type_mask)) + h->topright_samples_available&= 0xFBFF; + + if(IS_INTRA4x4(mb_type)){ + if(IS_INTRA4x4(top_type)){ + AV_COPY32(h->intra4x4_pred_mode_cache+4+8*0, h->intra4x4_pred_mode + h->mb2br_xy[top_xy]); + }else{ + h->intra4x4_pred_mode_cache[4+8*0]= + h->intra4x4_pred_mode_cache[5+8*0]= + h->intra4x4_pred_mode_cache[6+8*0]= + h->intra4x4_pred_mode_cache[7+8*0]= 2 - 3*!(top_type & type_mask); + } + for(i=0; i<2; i++){ + if(IS_INTRA4x4(left_type[LEFT(i)])){ + int8_t *mode= h->intra4x4_pred_mode + h->mb2br_xy[left_xy[LEFT(i)]]; + h->intra4x4_pred_mode_cache[3+8*1 + 2*8*i]= mode[6-left_block[0+2*i]]; + h->intra4x4_pred_mode_cache[3+8*2 + 2*8*i]= mode[6-left_block[1+2*i]]; + }else{ + h->intra4x4_pred_mode_cache[3+8*1 + 2*8*i]= + h->intra4x4_pred_mode_cache[3+8*2 + 2*8*i]= 2 - 3*!(left_type[LEFT(i)] & type_mask); + } + } + } + } + + +/* +0 . T T. T T T T +1 L . .L . . . . +2 L . .L . . . . +3 . T TL . . . . +4 L . .L . . . . +5 L . .. . . . . +*/ +//FIXME constraint_intra_pred & partitioning & nnz (let us hope this is just a typo in the spec) + nnz_cache = h->non_zero_count_cache; + if(top_type){ + nnz = h->non_zero_count[top_xy]; + AV_COPY32(&nnz_cache[4+8* 0], &nnz[4*3]); + if(!s->chroma_y_shift){ + AV_COPY32(&nnz_cache[4+8* 5], &nnz[4* 7]); + AV_COPY32(&nnz_cache[4+8*10], &nnz[4*11]); + }else{ + AV_COPY32(&nnz_cache[4+8* 5], &nnz[4* 5]); + AV_COPY32(&nnz_cache[4+8*10], &nnz[4* 9]); + } + }else{ + uint32_t top_empty = CABAC && !IS_INTRA(mb_type) ? 0 : 0x40404040; + AV_WN32A(&nnz_cache[4+8* 0], top_empty); + AV_WN32A(&nnz_cache[4+8* 5], top_empty); + AV_WN32A(&nnz_cache[4+8*10], top_empty); + } + + for (i=0; i<2; i++) { + if(left_type[LEFT(i)]){ + nnz = h->non_zero_count[left_xy[LEFT(i)]]; + nnz_cache[3+8* 1 + 2*8*i]= nnz[left_block[8+0+2*i]]; + nnz_cache[3+8* 2 + 2*8*i]= nnz[left_block[8+1+2*i]]; + if(CHROMA444){ + nnz_cache[3+8* 6 + 2*8*i]= nnz[left_block[8+0+2*i]+4*4]; + nnz_cache[3+8* 7 + 2*8*i]= nnz[left_block[8+1+2*i]+4*4]; + nnz_cache[3+8*11 + 2*8*i]= nnz[left_block[8+0+2*i]+8*4]; + nnz_cache[3+8*12 + 2*8*i]= nnz[left_block[8+1+2*i]+8*4]; + }else if(CHROMA422) { + nnz_cache[3+8* 6 + 2*8*i]= nnz[left_block[8+0+2*i]-2+4*4]; + nnz_cache[3+8* 7 + 2*8*i]= nnz[left_block[8+1+2*i]-2+4*4]; + nnz_cache[3+8*11 + 2*8*i]= nnz[left_block[8+0+2*i]-2+8*4]; + nnz_cache[3+8*12 + 2*8*i]= nnz[left_block[8+1+2*i]-2+8*4]; + }else{ + nnz_cache[3+8* 6 + 8*i]= nnz[left_block[8+4+2*i]]; + nnz_cache[3+8*11 + 8*i]= nnz[left_block[8+5+2*i]]; + } + }else{ + nnz_cache[3+8* 1 + 2*8*i]= + nnz_cache[3+8* 2 + 2*8*i]= + nnz_cache[3+8* 6 + 2*8*i]= + nnz_cache[3+8* 7 + 2*8*i]= + nnz_cache[3+8*11 + 2*8*i]= + nnz_cache[3+8*12 + 2*8*i]= CABAC && !IS_INTRA(mb_type) ? 0 : 64; + } + } + + if( CABAC ) { + // top_cbp + if(top_type) { + h->top_cbp = h->cbp_table[top_xy]; + } else { + h->top_cbp = IS_INTRA(mb_type) ? 0x7CF : 0x00F; + } + // left_cbp + if (left_type[LTOP]) { + h->left_cbp = (h->cbp_table[left_xy[LTOP]] & 0x7F0) + | ((h->cbp_table[left_xy[LTOP]]>>(left_block[0]&(~1)))&2) + | (((h->cbp_table[left_xy[LBOT]]>>(left_block[2]&(~1)))&2) << 2); + } else { + h->left_cbp = IS_INTRA(mb_type) ? 0x7CF : 0x00F; + } + } + } + + if(IS_INTER(mb_type) || (IS_DIRECT(mb_type) && h->direct_spatial_mv_pred)){ + int list; + int b_stride = h->b_stride; + for(list=0; listlist_count; list++){ + int8_t *ref_cache = &h->ref_cache[list][scan8[0]]; + int8_t *ref = s->current_picture.f.ref_index[list]; + int16_t (*mv_cache)[2] = &h->mv_cache[list][scan8[0]]; + int16_t (*mv)[2] = s->current_picture.f.motion_val[list]; + if(!USES_LIST(mb_type, list)){ + continue; + } + assert(!(IS_DIRECT(mb_type) && !h->direct_spatial_mv_pred)); + + if(USES_LIST(top_type, list)){ + const int b_xy= h->mb2b_xy[top_xy] + 3*b_stride; + AV_COPY128(mv_cache[0 - 1*8], mv[b_xy + 0]); + ref_cache[0 - 1*8]= + ref_cache[1 - 1*8]= ref[4*top_xy + 2]; + ref_cache[2 - 1*8]= + ref_cache[3 - 1*8]= ref[4*top_xy + 3]; + }else{ + AV_ZERO128(mv_cache[0 - 1*8]); + AV_WN32A(&ref_cache[0 - 1*8], ((top_type ? LIST_NOT_USED : PART_NOT_AVAILABLE)&0xFF)*0x01010101u); + } + + if(mb_type & (MB_TYPE_16x8|MB_TYPE_8x8)){ + for(i=0; i<2; i++){ + int cache_idx = -1 + i*2*8; + if(USES_LIST(left_type[LEFT(i)], list)){ + const int b_xy= h->mb2b_xy[left_xy[LEFT(i)]] + 3; + const int b8_xy= 4*left_xy[LEFT(i)] + 1; + AV_COPY32(mv_cache[cache_idx ], mv[b_xy + b_stride*left_block[0+i*2]]); + AV_COPY32(mv_cache[cache_idx+8], mv[b_xy + b_stride*left_block[1+i*2]]); + ref_cache[cache_idx ]= ref[b8_xy + (left_block[0+i*2]&~1)]; + ref_cache[cache_idx+8]= ref[b8_xy + (left_block[1+i*2]&~1)]; + }else{ + AV_ZERO32(mv_cache[cache_idx ]); + AV_ZERO32(mv_cache[cache_idx+8]); + ref_cache[cache_idx ]= + ref_cache[cache_idx+8]= (left_type[LEFT(i)]) ? LIST_NOT_USED : PART_NOT_AVAILABLE; + } + } + }else{ + if(USES_LIST(left_type[LTOP], list)){ + const int b_xy= h->mb2b_xy[left_xy[LTOP]] + 3; + const int b8_xy= 4*left_xy[LTOP] + 1; + AV_COPY32(mv_cache[-1], mv[b_xy + b_stride*left_block[0]]); + ref_cache[-1]= ref[b8_xy + (left_block[0]&~1)]; + }else{ + AV_ZERO32(mv_cache[-1]); + ref_cache[-1]= left_type[LTOP] ? LIST_NOT_USED : PART_NOT_AVAILABLE; + } + } + + if(USES_LIST(topright_type, list)){ + const int b_xy= h->mb2b_xy[topright_xy] + 3*b_stride; + AV_COPY32(mv_cache[4 - 1*8], mv[b_xy]); + ref_cache[4 - 1*8]= ref[4*topright_xy + 2]; + }else{ + AV_ZERO32(mv_cache[4 - 1*8]); + ref_cache[4 - 1*8]= topright_type ? LIST_NOT_USED : PART_NOT_AVAILABLE; + } + if(ref_cache[4 - 1*8] < 0){ + if(USES_LIST(topleft_type, list)){ + const int b_xy = h->mb2b_xy[topleft_xy] + 3 + b_stride + (h->topleft_partition & 2*b_stride); + const int b8_xy= 4*topleft_xy + 1 + (h->topleft_partition & 2); + AV_COPY32(mv_cache[-1 - 1*8], mv[b_xy]); + ref_cache[-1 - 1*8]= ref[b8_xy]; + }else{ + AV_ZERO32(mv_cache[-1 - 1*8]); + ref_cache[-1 - 1*8]= topleft_type ? LIST_NOT_USED : PART_NOT_AVAILABLE; + } + } + + if((mb_type&(MB_TYPE_SKIP|MB_TYPE_DIRECT2)) && !FRAME_MBAFF) + continue; + + if(!(mb_type&(MB_TYPE_SKIP|MB_TYPE_DIRECT2))){ + uint8_t (*mvd_cache)[2] = &h->mvd_cache[list][scan8[0]]; + uint8_t (*mvd)[2] = h->mvd_table[list]; + ref_cache[2+8*0] = + ref_cache[2+8*2] = PART_NOT_AVAILABLE; + AV_ZERO32(mv_cache[2+8*0]); + AV_ZERO32(mv_cache[2+8*2]); + + if( CABAC ) { + if(USES_LIST(top_type, list)){ + const int b_xy= h->mb2br_xy[top_xy]; + AV_COPY64(mvd_cache[0 - 1*8], mvd[b_xy + 0]); + }else{ + AV_ZERO64(mvd_cache[0 - 1*8]); + } + if(USES_LIST(left_type[LTOP], list)){ + const int b_xy= h->mb2br_xy[left_xy[LTOP]] + 6; + AV_COPY16(mvd_cache[-1 + 0*8], mvd[b_xy - left_block[0]]); + AV_COPY16(mvd_cache[-1 + 1*8], mvd[b_xy - left_block[1]]); + }else{ + AV_ZERO16(mvd_cache[-1 + 0*8]); + AV_ZERO16(mvd_cache[-1 + 1*8]); + } + if(USES_LIST(left_type[LBOT], list)){ + const int b_xy= h->mb2br_xy[left_xy[LBOT]] + 6; + AV_COPY16(mvd_cache[-1 + 2*8], mvd[b_xy - left_block[2]]); + AV_COPY16(mvd_cache[-1 + 3*8], mvd[b_xy - left_block[3]]); + }else{ + AV_ZERO16(mvd_cache[-1 + 2*8]); + AV_ZERO16(mvd_cache[-1 + 3*8]); + } + AV_ZERO16(mvd_cache[2+8*0]); + AV_ZERO16(mvd_cache[2+8*2]); + if(h->slice_type_nos == AV_PICTURE_TYPE_B){ + uint8_t *direct_cache = &h->direct_cache[scan8[0]]; + uint8_t *direct_table = h->direct_table; + fill_rectangle(direct_cache, 4, 4, 8, MB_TYPE_16x16>>1, 1); + + if(IS_DIRECT(top_type)){ + AV_WN32A(&direct_cache[-1*8], 0x01010101u*(MB_TYPE_DIRECT2>>1)); + }else if(IS_8X8(top_type)){ + int b8_xy = 4*top_xy; + direct_cache[0 - 1*8]= direct_table[b8_xy + 2]; + direct_cache[2 - 1*8]= direct_table[b8_xy + 3]; + }else{ + AV_WN32A(&direct_cache[-1*8], 0x01010101*(MB_TYPE_16x16>>1)); + } + + if(IS_DIRECT(left_type[LTOP])) + direct_cache[-1 + 0*8]= MB_TYPE_DIRECT2>>1; + else if(IS_8X8(left_type[LTOP])) + direct_cache[-1 + 0*8]= direct_table[4*left_xy[LTOP] + 1 + (left_block[0]&~1)]; + else + direct_cache[-1 + 0*8]= MB_TYPE_16x16>>1; + + if(IS_DIRECT(left_type[LBOT])) + direct_cache[-1 + 2*8]= MB_TYPE_DIRECT2>>1; + else if(IS_8X8(left_type[LBOT])) + direct_cache[-1 + 2*8]= direct_table[4*left_xy[LBOT] + 1 + (left_block[2]&~1)]; + else + direct_cache[-1 + 2*8]= MB_TYPE_16x16>>1; + } + } + } + if(FRAME_MBAFF){ +#define MAP_MVS\ + MAP_F2F(scan8[0] - 1 - 1*8, topleft_type)\ + MAP_F2F(scan8[0] + 0 - 1*8, top_type)\ + MAP_F2F(scan8[0] + 1 - 1*8, top_type)\ + MAP_F2F(scan8[0] + 2 - 1*8, top_type)\ + MAP_F2F(scan8[0] + 3 - 1*8, top_type)\ + MAP_F2F(scan8[0] + 4 - 1*8, topright_type)\ + MAP_F2F(scan8[0] - 1 + 0*8, left_type[LTOP])\ + MAP_F2F(scan8[0] - 1 + 1*8, left_type[LTOP])\ + MAP_F2F(scan8[0] - 1 + 2*8, left_type[LBOT])\ + MAP_F2F(scan8[0] - 1 + 3*8, left_type[LBOT]) + if(MB_FIELD){ +#define MAP_F2F(idx, mb_type)\ + if(!IS_INTERLACED(mb_type) && h->ref_cache[list][idx] >= 0){\ + h->ref_cache[list][idx] <<= 1;\ + h->mv_cache[list][idx][1] /= 2;\ + h->mvd_cache[list][idx][1] >>=1;\ + } + MAP_MVS +#undef MAP_F2F + }else{ +#define MAP_F2F(idx, mb_type)\ + if(IS_INTERLACED(mb_type) && h->ref_cache[list][idx] >= 0){\ + h->ref_cache[list][idx] >>= 1;\ + h->mv_cache[list][idx][1] <<= 1;\ + h->mvd_cache[list][idx][1] <<= 1;\ + } + MAP_MVS +#undef MAP_F2F + } + } + } + } + + h->neighbor_transform_size= !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[LTOP]); +} + +/** + * decodes a P_SKIP or B_SKIP macroblock + */ +static void av_unused decode_mb_skip(H264Context *h){ + MpegEncContext * const s = &h->s; + const int mb_xy= h->mb_xy; + int mb_type=0; + + memset(h->non_zero_count[mb_xy], 0, 48); + + if(MB_FIELD) + mb_type|= MB_TYPE_INTERLACED; + + if( h->slice_type_nos == AV_PICTURE_TYPE_B ) + { + // just for fill_caches. pred_direct_motion will set the real mb_type + mb_type|= MB_TYPE_L0L1|MB_TYPE_DIRECT2|MB_TYPE_SKIP; + if(h->direct_spatial_mv_pred){ + fill_decode_neighbors(h, mb_type); + fill_decode_caches(h, mb_type); //FIXME check what is needed and what not ... + } + ff_h264_pred_direct_motion(h, &mb_type); + mb_type|= MB_TYPE_SKIP; + } + else + { + mb_type|= MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P1L0|MB_TYPE_SKIP; + + fill_decode_neighbors(h, mb_type); + pred_pskip_motion(h); + } + + write_back_motion(h, mb_type); + s->current_picture.f.mb_type[mb_xy] = mb_type; + s->current_picture.f.qscale_table[mb_xy] = s->qscale; + h->slice_table[ mb_xy ]= h->slice_num; + h->prev_mb_skipped= 1; +} + #endif /* AVCODEC_H264_MVPRED_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_parser.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -97,7 +97,7 @@ return i-(state&5); } -/*! +/** * Parse NAL units of found picture and decode some basic information. * * @param s parser context. @@ -131,7 +131,7 @@ for(;;) { int src_length, dst_length, consumed; - buf = ff_find_start_code(buf, buf_end, &state); + buf = avpriv_mpv_find_start_code(buf, buf_end, &state); if(buf >= buf_end) break; --buf; @@ -330,14 +330,15 @@ { H264Context *h = s->priv_data; h->thread_context[0] = h; + h->s.slice_context_count = 1; return 0; } AVCodecParser ff_h264_parser = { - { CODEC_ID_H264 }, - sizeof(H264Context), - init, - h264_parse, - close, - h264_split, + .codec_ids = { CODEC_ID_H264 }, + .priv_data_size = sizeof(H264Context), + .parser_init = init, + .parser_parse = h264_parse, + .parser_close = close, + .split = h264_split, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264pred.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264pred.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264pred.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264pred.c 2012-01-11 00:34:30.000000000 +0000 @@ -40,7 +40,7 @@ #undef BIT_DEPTH static void pred4x4_vertical_vp8_c(uint8_t *src, const uint8_t *topright, int stride){ - const int lt= src[-1-1*stride]; + const unsigned lt = src[-1-1*stride]; LOAD_TOP_EDGE LOAD_TOP_RIGHT_EDGE uint32_t v = PACK_4U8((lt + 2*t0 + t1 + 2) >> 2, @@ -55,7 +55,7 @@ } static void pred4x4_horizontal_vp8_c(uint8_t *src, const uint8_t *topright, int stride){ - const int lt= src[-1-1*stride]; + const unsigned lt = src[-1-1*stride]; LOAD_LEFT_EDGE AV_WN32A(src+0*stride, ((lt + 2*l0 + l1 + 2) >> 2)*0x01010101); @@ -67,8 +67,6 @@ static void pred4x4_down_left_svq3_c(uint8_t *src, const uint8_t *topright, int stride){ LOAD_TOP_EDGE LOAD_LEFT_EDGE - const av_unused int unu0= t0; - const av_unused int unu1= l0; src[0+0*stride]=(l1 + t1)>>1; src[1+0*stride]= @@ -292,7 +290,7 @@ static void pred8x8_left_dc_rv40_c(uint8_t *src, int stride){ int i; - int dc0; + unsigned dc0; dc0=0; for(i=0;i<8; i++) @@ -307,7 +305,7 @@ static void pred8x8_top_dc_rv40_c(uint8_t *src, int stride){ int i; - int dc0; + unsigned dc0; dc0=0; for(i=0;i<8; i++) @@ -322,7 +320,7 @@ static void pred8x8_dc_rv40_c(uint8_t *src, int stride){ int i; - int dc0=0; + unsigned dc0 = 0; for(i=0;i<4; i++){ dc0+= src[-1+i*stride] + src[i-stride]; @@ -363,7 +361,7 @@ /** * Set the intra prediction function pointers. */ -void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth){ +void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc){ // MpegEncContext * const s = &h->s; #undef FUNC @@ -436,20 +434,39 @@ h->pred8x8l[TOP_DC_PRED ]= FUNCC(pred8x8l_top_dc , depth);\ h->pred8x8l[DC_128_PRED ]= FUNCC(pred8x8l_128_dc , depth);\ \ - h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x8_vertical , depth);\ - h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x8_horizontal , depth);\ + if (chroma_format_idc == 1) {\ + h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x8_vertical , depth);\ + h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x8_horizontal , depth);\ + } else {\ + h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x16_vertical , depth);\ + h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x16_horizontal , depth);\ + }\ if (codec_id != CODEC_ID_VP8) {\ - h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x8_plane , depth);\ + if (chroma_format_idc == 1) {\ + h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x8_plane , depth);\ + } else {\ + h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x16_plane , depth);\ + }\ } else\ h->pred8x8[PLANE_PRED8x8]= FUNCD(pred8x8_tm_vp8);\ if(codec_id != CODEC_ID_RV40 && codec_id != CODEC_ID_VP8){\ - h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\ - h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\ - h->pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc , depth);\ - h->pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_l0t, depth);\ - h->pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_0lt, depth);\ - h->pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_l00, depth);\ - h->pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_0l0, depth);\ + if (chroma_format_idc == 1) {\ + h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\ + h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\ + h->pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc , depth);\ + h->pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_l0t, depth);\ + h->pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_0lt, depth);\ + h->pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_l00, depth);\ + h->pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_0l0, depth);\ + } else {\ + h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x16_dc , depth);\ + h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x16_left_dc , depth);\ + h->pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x16_top_dc , depth);\ + h->pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= FUNC(pred8x16_mad_cow_dc_l0t, depth);\ + h->pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= FUNC(pred8x16_mad_cow_dc_0lt, depth);\ + h->pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= FUNC(pred8x16_mad_cow_dc_l00, depth);\ + h->pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= FUNC(pred8x16_mad_cow_dc_0l0, depth);\ + }\ }else{\ h->pred8x8[DC_PRED8x8 ]= FUNCD(pred8x8_dc_rv40);\ h->pred8x8[LEFT_DC_PRED8x8]= FUNCD(pred8x8_left_dc_rv40);\ @@ -459,7 +476,11 @@ h->pred8x8[DC_129_PRED8x8]= FUNCC(pred8x8_129_dc , depth);\ }\ }\ - h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x8_128_dc , depth);\ + if (chroma_format_idc == 1) {\ + h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x8_128_dc , depth);\ + } else {\ + h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x16_128_dc , depth);\ + }\ \ h->pred16x16[DC_PRED8x8 ]= FUNCC(pred16x16_dc , depth);\ h->pred16x16[VERT_PRED8x8 ]= FUNCC(pred16x16_vertical , depth);\ @@ -489,8 +510,13 @@ h->pred4x4_add [ HOR_PRED ]= FUNCC(pred4x4_horizontal_add , depth);\ h->pred8x8l_add [VERT_PRED ]= FUNCC(pred8x8l_vertical_add , depth);\ h->pred8x8l_add [ HOR_PRED ]= FUNCC(pred8x8l_horizontal_add , depth);\ + if (chroma_format_idc == 1) {\ h->pred8x8_add [VERT_PRED8x8]= FUNCC(pred8x8_vertical_add , depth);\ h->pred8x8_add [ HOR_PRED8x8]= FUNCC(pred8x8_horizontal_add , depth);\ + } else {\ + h->pred8x8_add [VERT_PRED8x8]= FUNCC(pred8x16_vertical_add , depth);\ + h->pred8x8_add [ HOR_PRED8x8]= FUNCC(pred8x16_horizontal_add , depth);\ + }\ h->pred16x16_add[VERT_PRED8x8]= FUNCC(pred16x16_vertical_add , depth);\ h->pred16x16_add[ HOR_PRED8x8]= FUNCC(pred16x16_horizontal_add , depth);\ @@ -506,6 +532,6 @@ break; } - if (ARCH_ARM) ff_h264_pred_init_arm(h, codec_id, bit_depth); - if (HAVE_MMX) ff_h264_pred_init_x86(h, codec_id, bit_depth); + if (ARCH_ARM) ff_h264_pred_init_arm(h, codec_id, bit_depth, chroma_format_idc); + if (HAVE_MMX) ff_h264_pred_init_x86(h, codec_id, bit_depth, chroma_format_idc); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264pred.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264pred.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264pred.h 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264pred.h 2012-01-11 00:34:30.000000000 +0000 @@ -101,8 +101,8 @@ void (*pred16x16_add[3])(uint8_t *pix/*align 16*/, const int *block_offset, const DCTELEM *block/*align 16*/, int stride); }H264PredContext; -void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth); -void ff_h264_pred_init_arm(H264PredContext *h, int codec_id, const int bit_depth); -void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth); +void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc); +void ff_h264_pred_init_arm(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc); +void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc); #endif /* AVCODEC_H264PRED_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264pred_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264pred_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264pred_template.c 2011-05-11 13:51:50.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264pred_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,7 +26,8 @@ */ #include "mathops.h" -#include "high_bit_depth.h" + +#include "bit_depth_template.c" static void FUNCC(pred4x4_vertical)(uint8_t *_src, const uint8_t *topright, int _stride){ pixel *src = (pixel*)_src; @@ -120,28 +121,28 @@ #define LOAD_TOP_RIGHT_EDGE\ - const int av_unused t4= topright[0];\ - const int av_unused t5= topright[1];\ - const int av_unused t6= topright[2];\ - const int av_unused t7= topright[3];\ + const unsigned av_unused t4 = topright[0];\ + const unsigned av_unused t5 = topright[1];\ + const unsigned av_unused t6 = topright[2];\ + const unsigned av_unused t7 = topright[3];\ #define LOAD_DOWN_LEFT_EDGE\ - const int av_unused l4= src[-1+4*stride];\ - const int av_unused l5= src[-1+5*stride];\ - const int av_unused l6= src[-1+6*stride];\ - const int av_unused l7= src[-1+7*stride];\ + const unsigned av_unused l4 = src[-1+4*stride];\ + const unsigned av_unused l5 = src[-1+5*stride];\ + const unsigned av_unused l6 = src[-1+6*stride];\ + const unsigned av_unused l7 = src[-1+7*stride];\ #define LOAD_LEFT_EDGE\ - const int av_unused l0= src[-1+0*stride];\ - const int av_unused l1= src[-1+1*stride];\ - const int av_unused l2= src[-1+2*stride];\ - const int av_unused l3= src[-1+3*stride];\ + const unsigned av_unused l0 = src[-1+0*stride];\ + const unsigned av_unused l1 = src[-1+1*stride];\ + const unsigned av_unused l2 = src[-1+2*stride];\ + const unsigned av_unused l3 = src[-1+3*stride];\ #define LOAD_TOP_EDGE\ - const int av_unused t0= src[ 0-1*stride];\ - const int av_unused t1= src[ 1-1*stride];\ - const int av_unused t2= src[ 2-1*stride];\ - const int av_unused t3= src[ 3-1*stride];\ + const unsigned av_unused t0 = src[ 0-1*stride];\ + const unsigned av_unused t1 = src[ 1-1*stride];\ + const unsigned av_unused t2 = src[ 2-1*stride];\ + const unsigned av_unused t3 = src[ 3-1*stride];\ static void FUNCC(pred4x4_down_right)(uint8_t *_src, const uint8_t *topright, int _stride){ pixel *src = (pixel*)_src; @@ -387,9 +388,9 @@ PREDICT_16x16_DC(PIXEL_SPLAT_X4(v));\ } -PRED16x16_X(127, (1<<(BIT_DEPTH-1))-1); -PRED16x16_X(128, (1<<(BIT_DEPTH-1))+0); -PRED16x16_X(129, (1<<(BIT_DEPTH-1))+1); +PRED16x16_X(127, (1<<(BIT_DEPTH-1))-1) +PRED16x16_X(128, (1<<(BIT_DEPTH-1))+0) +PRED16x16_X(129, (1<<(BIT_DEPTH-1))+1) static inline void FUNCC(pred16x16_plane_compat)(uint8_t *_src, int _stride, const int svq3, const int rv40){ int i, j, k; @@ -453,6 +454,19 @@ } } +static void FUNCC(pred8x16_vertical)(uint8_t *_src, int _stride){ + int i; + pixel *src = (pixel*)_src; + int stride = _stride>>(sizeof(pixel)-1); + const pixel4 a= AV_RN4PA(((pixel4*)(src-stride))+0); + const pixel4 b= AV_RN4PA(((pixel4*)(src-stride))+1); + + for(i=0; i<16; i++){ + AV_WN4PA(((pixel4*)(src+i*stride))+0, a); + AV_WN4PA(((pixel4*)(src+i*stride))+1, b); + } +} + static void FUNCC(pred8x8_horizontal)(uint8_t *_src, int stride){ int i; pixel *src = (pixel*)_src; @@ -465,6 +479,17 @@ } } +static void FUNCC(pred8x16_horizontal)(uint8_t *_src, int stride){ + int i; + pixel *src = (pixel*)_src; + stride >>= sizeof(pixel)-1; + for(i=0; i<16; i++){ + const pixel4 a = PIXEL_SPLAT_X4(src[-1+i*stride]); + AV_WN4PA(((pixel4*)(src+i*stride))+0, a); + AV_WN4PA(((pixel4*)(src+i*stride))+1, a); + } +} + #define PRED8x8_X(n, v)\ static void FUNCC(pred8x8_##n##_dc)(uint8_t *_src, int stride){\ int i;\ @@ -477,9 +502,14 @@ }\ } -PRED8x8_X(127, (1<<(BIT_DEPTH-1))-1); -PRED8x8_X(128, (1<<(BIT_DEPTH-1))+0); -PRED8x8_X(129, (1<<(BIT_DEPTH-1))+1); +PRED8x8_X(127, (1<<(BIT_DEPTH-1))-1) +PRED8x8_X(128, (1<<(BIT_DEPTH-1))+0) +PRED8x8_X(129, (1<<(BIT_DEPTH-1))+1) + +static void FUNCC(pred8x16_128_dc)(uint8_t *_src, int stride){ + FUNCC(pred8x8_128_dc)(_src, stride); + FUNCC(pred8x8_128_dc)(_src+8*stride, stride); +} static void FUNCC(pred8x8_left_dc)(uint8_t *_src, int stride){ int i; @@ -506,6 +536,11 @@ } } +static void FUNCC(pred8x16_left_dc)(uint8_t *_src, int stride){ + FUNCC(pred8x8_left_dc)(_src, stride); + FUNCC(pred8x8_left_dc)(_src+8*stride, stride); +} + static void FUNCC(pred8x8_top_dc)(uint8_t *_src, int stride){ int i; int dc0, dc1; @@ -531,6 +566,27 @@ } } +static void FUNCC(pred8x16_top_dc)(uint8_t *_src, int stride){ + int i; + int dc0, dc1; + pixel4 dc0splat, dc1splat; + pixel *src = (pixel*)_src; + stride >>= sizeof(pixel)-1; + + dc0=dc1=0; + for(i=0;i<4; i++){ + dc0+= src[i-stride]; + dc1+= src[4+i-stride]; + } + dc0splat = PIXEL_SPLAT_X4((dc0 + 2)>>2); + dc1splat = PIXEL_SPLAT_X4((dc1 + 2)>>2); + + for(i=0; i<16; i++){ + AV_WN4PA(((pixel4*)(src+i*stride))+0, dc0splat); + AV_WN4PA(((pixel4*)(src+i*stride))+1, dc1splat); + } +} + static void FUNCC(pred8x8_dc)(uint8_t *_src, int stride){ int i; int dc0, dc1, dc2; @@ -559,29 +615,92 @@ } } -//the following 4 function should not be optimized! +static void FUNCC(pred8x16_dc)(uint8_t *_src, int stride){ + int i; + int dc0, dc1, dc2, dc3, dc4; + pixel4 dc0splat, dc1splat, dc2splat, dc3splat, dc4splat, dc5splat, dc6splat, dc7splat; + pixel *src = (pixel*)_src; + stride >>= sizeof(pixel)-1; + + dc0=dc1=dc2=dc3=dc4=0; + for(i=0;i<4; i++){ + dc0+= src[-1+i*stride] + src[i-stride]; + dc1+= src[4+i-stride]; + dc2+= src[-1+(i+4)*stride]; + dc3+= src[-1+(i+8)*stride]; + dc4+= src[-1+(i+12)*stride]; + } + dc0splat = PIXEL_SPLAT_X4((dc0 + 4)>>3); + dc1splat = PIXEL_SPLAT_X4((dc1 + 2)>>2); + dc2splat = PIXEL_SPLAT_X4((dc2 + 2)>>2); + dc3splat = PIXEL_SPLAT_X4((dc1 + dc2 + 4)>>3); + dc4splat = PIXEL_SPLAT_X4((dc3 + 2)>>2); + dc5splat = PIXEL_SPLAT_X4((dc1 + dc3 + 4)>>3); + dc6splat = PIXEL_SPLAT_X4((dc4 + 2)>>2); + dc7splat = PIXEL_SPLAT_X4((dc1 + dc4 + 4)>>3); + + for(i=0; i<4; i++){ + AV_WN4PA(((pixel4*)(src+i*stride))+0, dc0splat); + AV_WN4PA(((pixel4*)(src+i*stride))+1, dc1splat); + } + for(i=4; i<8; i++){ + AV_WN4PA(((pixel4*)(src+i*stride))+0, dc2splat); + AV_WN4PA(((pixel4*)(src+i*stride))+1, dc3splat); + } + for(i=8; i<12; i++){ + AV_WN4PA(((pixel4*)(src+i*stride))+0, dc4splat); + AV_WN4PA(((pixel4*)(src+i*stride))+1, dc5splat); + } + for(i=12; i<16; i++){ + AV_WN4PA(((pixel4*)(src+i*stride))+0, dc6splat); + AV_WN4PA(((pixel4*)(src+i*stride))+1, dc7splat); + } +} + static void FUNC(pred8x8_mad_cow_dc_l0t)(uint8_t *src, int stride){ FUNCC(pred8x8_top_dc)(src, stride); FUNCC(pred4x4_dc)(src, NULL, stride); } +static void FUNC(pred8x16_mad_cow_dc_l0t)(uint8_t *src, int stride){ + FUNCC(pred8x16_top_dc)(src, stride); + FUNCC(pred4x4_dc)(src, NULL, stride); +} + static void FUNC(pred8x8_mad_cow_dc_0lt)(uint8_t *src, int stride){ FUNCC(pred8x8_dc)(src, stride); FUNCC(pred4x4_top_dc)(src, NULL, stride); } +static void FUNC(pred8x16_mad_cow_dc_0lt)(uint8_t *src, int stride){ + FUNCC(pred8x16_dc)(src, stride); + FUNCC(pred4x4_top_dc)(src, NULL, stride); +} + static void FUNC(pred8x8_mad_cow_dc_l00)(uint8_t *src, int stride){ FUNCC(pred8x8_left_dc)(src, stride); FUNCC(pred4x4_128_dc)(src + 4*stride , NULL, stride); FUNCC(pred4x4_128_dc)(src + 4*stride + 4*sizeof(pixel), NULL, stride); } +static void FUNC(pred8x16_mad_cow_dc_l00)(uint8_t *src, int stride){ + FUNCC(pred8x16_left_dc)(src, stride); + FUNCC(pred4x4_128_dc)(src + 4*stride , NULL, stride); + FUNCC(pred4x4_128_dc)(src + 4*stride + 4*sizeof(pixel), NULL, stride); +} + static void FUNC(pred8x8_mad_cow_dc_0l0)(uint8_t *src, int stride){ FUNCC(pred8x8_left_dc)(src, stride); FUNCC(pred4x4_128_dc)(src , NULL, stride); FUNCC(pred4x4_128_dc)(src + 4*sizeof(pixel), NULL, stride); } +static void FUNC(pred8x16_mad_cow_dc_0l0)(uint8_t *src, int stride){ + FUNCC(pred8x16_left_dc)(src, stride); + FUNCC(pred4x4_128_dc)(src , NULL, stride); + FUNCC(pred4x4_128_dc)(src + 4*sizeof(pixel), NULL, stride); +} + static void FUNCC(pred8x8_plane)(uint8_t *_src, int _stride){ int j, k; int a; @@ -617,6 +736,47 @@ } } +static void FUNCC(pred8x16_plane)(uint8_t *_src, int _stride){ + int j, k; + int a; + INIT_CLIP + pixel *src = (pixel*)_src; + int stride = _stride>>(sizeof(pixel)-1); + const pixel * const src0 = src +3-stride; + const pixel * src1 = src +8*stride-1; + const pixel * src2 = src1-2*stride; // == src+6*stride-1; + int H = src0[1] - src0[-1]; + int V = src1[0] - src2[ 0]; + + for (k = 2; k <= 4; ++k) { + src1 += stride; src2 -= stride; + H += k*(src0[k] - src0[-k]); + V += k*(src1[0] - src2[ 0]); + } + for (; k <= 8; ++k) { + src1 += stride; src2 -= stride; + V += k*(src1[0] - src2[0]); + } + + H = (17*H+16) >> 5; + V = (5*V+32) >> 6; + + a = 16*(src1[0] + src2[8] + 1) - 7*V - 3*H; + for(j=16; j>0; --j) { + int b = a; + a += V; + src[0] = CLIP((b ) >> 5); + src[1] = CLIP((b+ H) >> 5); + src[2] = CLIP((b+2*H) >> 5); + src[3] = CLIP((b+3*H) >> 5); + src[4] = CLIP((b+4*H) >> 5); + src[5] = CLIP((b+5*H) >> 5); + src[6] = CLIP((b+6*H) >> 5); + src[7] = CLIP((b+7*H) >> 5); + src += stride; + } +} + #define SRC(x,y) src[(x)+(y)*stride] #define PL(y) \ const int l##y = (SRC(-1,y-1) + 2*SRC(-1,y) + SRC(-1,y+1) + 2) >> 2; @@ -987,8 +1147,24 @@ FUNCC(pred4x4_vertical_add)(pix + block_offset[i], block + i*16*sizeof(pixel), stride); } +static void FUNCC(pred8x16_vertical_add)(uint8_t *pix, const int *block_offset, const DCTELEM *block, int stride){ + int i; + for(i=0; i<4; i++) + FUNCC(pred4x4_vertical_add)(pix + block_offset[i], block + i*16*sizeof(pixel), stride); + for(i=4; i<8; i++) + FUNCC(pred4x4_vertical_add)(pix + block_offset[i+4], block + i*16*sizeof(pixel), stride); +} + static void FUNCC(pred8x8_horizontal_add)(uint8_t *pix, const int *block_offset, const DCTELEM *block, int stride){ int i; for(i=0; i<4; i++) FUNCC(pred4x4_horizontal_add)(pix + block_offset[i], block + i*16*sizeof(pixel), stride); } + +static void FUNCC(pred8x16_horizontal_add)(uint8_t *pix, const int *block_offset, const DCTELEM *block, int stride){ + int i; + for(i=0; i<4; i++) + FUNCC(pred4x4_horizontal_add)(pix + block_offset[i], block + i*16*sizeof(pixel), stride); + for(i=4; i<8; i++) + FUNCC(pred4x4_horizontal_add)(pix + block_offset[i+4], block + i*16*sizeof(pixel), stride); +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_ps.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_ps.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_ps.c 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_ps.c 2012-01-11 00:34:30.000000000 +0000 @@ -130,8 +130,8 @@ get_bits(&s->gb, 4); /* bit_rate_scale */ get_bits(&s->gb, 4); /* cpb_size_scale */ for(i=0; igb); /* bit_rate_value_minus1 */ - get_ue_golomb(&s->gb); /* cpb_size_value_minus1 */ + get_ue_golomb_long(&s->gb); /* bit_rate_value_minus1 */ + get_ue_golomb_long(&s->gb); /* cpb_size_value_minus1 */ get_bits1(&s->gb); /* cbr_flag */ } sps->initial_cpb_removal_delay_length = get_bits(&s->gb, 5) + 1; @@ -396,7 +396,8 @@ #endif sps->crop= get_bits1(&s->gb); if(sps->crop){ - int crop_limit = sps->chroma_format_idc == 3 ? 16 : 8; + int crop_vertical_limit = sps->chroma_format_idc & 2 ? 16 : 8; + int crop_horizontal_limit = sps->chroma_format_idc == 3 ? 16 : 8; sps->crop_left = get_ue_golomb(&s->gb); sps->crop_right = get_ue_golomb(&s->gb); sps->crop_top = get_ue_golomb(&s->gb); @@ -404,7 +405,7 @@ if(sps->crop_left || sps->crop_top){ av_log(h->s.avctx, AV_LOG_ERROR, "insane cropping not completely supported, this could look slightly wrong ...\n"); } - if(sps->crop_right >= crop_limit || sps->crop_bottom >= crop_limit){ + if(sps->crop_right >= crop_horizontal_limit || sps->crop_bottom >= crop_vertical_limit){ av_log(h->s.avctx, AV_LOG_ERROR, "brainfart cropping not supported, this could look slightly wrong ...\n"); } }else{ @@ -462,6 +463,7 @@ unsigned int pps_id= get_ue_golomb(&s->gb); PPS *pps; const int qp_bd_offset = 6*(h->sps.bit_depth_luma-8); + int bits_left; if(pps_id >= MAX_PPS_COUNT) { av_log(h->s.avctx, AV_LOG_ERROR, "pps_id (%d) out of range\n", pps_id); @@ -538,7 +540,9 @@ memcpy(pps->scaling_matrix4, h->sps_buffers[pps->sps_id]->scaling_matrix4, sizeof(pps->scaling_matrix4)); memcpy(pps->scaling_matrix8, h->sps_buffers[pps->sps_id]->scaling_matrix8, sizeof(pps->scaling_matrix8)); - if(get_bits_count(&s->gb) < bit_length){ + bits_left = bit_length - get_bits_count(&s->gb); + if (bits_left && (bits_left > 8 || + show_bits(&s->gb, bits_left) != 1 << (bits_left - 1))) { pps->transform_8x8_mode= get_bits1(&s->gb); decode_scaling_matrices(h, h->sps_buffers[pps->sps_id], pps, 0, pps->scaling_matrix4, pps->scaling_matrix8); pps->chroma_qp_index_offset[1]= get_se_golomb(&s->gb); //second_chroma_qp_index_offset diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_refs.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_refs.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/h264_refs.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/h264_refs.c 2012-01-11 00:34:30.000000000 +0000 @@ -39,16 +39,16 @@ int i; for (i = 0; i < 4; ++i) { if (parity == PICT_BOTTOM_FIELD) - pic->data[i] += pic->linesize[i]; - pic->reference = parity; - pic->linesize[i] *= 2; + pic->f.data[i] += pic->f.linesize[i]; + pic->f.reference = parity; + pic->f.linesize[i] *= 2; } pic->poc= pic->field_poc[parity == PICT_BOTTOM_FIELD]; } static int split_field_copy(Picture *dest, Picture *src, int parity, int id_add){ - int match = !!(src->reference & parity); + int match = !!(src->f.reference & parity); if (match) { *dest = *src; @@ -67,9 +67,9 @@ int index=0; while(i[0]reference & sel))) + while (i[0] < len && !(in[ i[0] ] && (in[ i[0] ]->f.reference & sel))) i[0]++; - while(i[1]reference & (sel^3)))) + while (i[1] < len && !(in[ i[1] ] && (in[ i[1] ]->f.reference & (sel^3)))) i[1]++; if(i[0] < len){ in[ i[0] ]->pic_id= is_long ? i[0] : in[ i[0] ]->frame_num; @@ -133,7 +133,7 @@ } if(lens[0] == lens[1] && lens[1] > 1){ - for(i=0; h->default_ref_list[0][i].data[0] == h->default_ref_list[1][i].data[0] && idefault_ref_list[0][i].f.data[0] == h->default_ref_list[1][i].f.data[0] && i < lens[0]; i++); if(i == lens[0]) FFSWAP(Picture, h->default_ref_list[1][0], h->default_ref_list[1][1]); } @@ -229,11 +229,11 @@ for(i= h->short_ref_count-1; i>=0; i--){ ref = h->short_ref[i]; - assert(ref->reference); + assert(ref->f.reference); assert(!ref->long_ref); if( ref->frame_num == frame_num && - (ref->reference & pic_structure) + (ref->f.reference & pic_structure) ) break; } @@ -250,8 +250,8 @@ return -1; } ref = h->long_ref[long_idx]; - assert(!(ref && !ref->reference)); - if(ref && (ref->reference & pic_structure)){ + assert(!(ref && !ref->f.reference)); + if (ref && (ref->f.reference & pic_structure)) { ref->pic_id= pic_id; assert(ref->long_ref); i=0; @@ -285,9 +285,9 @@ } for(list=0; listlist_count; list++){ for(index= 0; index < h->ref_count[list]; index++){ - if(!h->ref_list[list][index].data[0]){ + if (!h->ref_list[list][index].f.data[0]) { av_log(h->s.avctx, AV_LOG_ERROR, "Missing reference picture\n"); - if(h->default_ref_list[list][0].data[0]) + if (h->default_ref_list[list][0].f.data[0]) h->ref_list[list][index]= h->default_ref_list[list][0]; else return -1; @@ -306,13 +306,13 @@ Picture *field = &h->ref_list[list][16+2*i]; field[0] = *frame; for(j=0; j<3; j++) - field[0].linesize[j] <<= 1; - field[0].reference = PICT_TOP_FIELD; + field[0].f.linesize[j] <<= 1; + field[0].f.reference = PICT_TOP_FIELD; field[0].poc= field[0].field_poc[0]; field[1] = field[0]; for(j=0; j<3; j++) - field[1].data[j] += frame->linesize[j]; - field[1].reference = PICT_BOTTOM_FIELD; + field[1].f.data[j] += frame->f.linesize[j]; + field[1].f.reference = PICT_BOTTOM_FIELD; field[1].poc= field[1].field_poc[1]; h->luma_weight[16+2*i][list][0] = h->luma_weight[16+2*i+1][list][0] = h->luma_weight[i][list][0]; @@ -338,12 +338,12 @@ */ static inline int unreference_pic(H264Context *h, Picture *pic, int refmask){ int i; - if (pic->reference &= refmask) { + if (pic->f.reference &= refmask) { return 0; } else { for(i = 0; h->delayed_pic[i]; i++) if(pic == h->delayed_pic[i]){ - pic->reference=DELAYED_PIC_REF; + pic->f.reference = DELAYED_PIC_REF; break; } return 1; @@ -453,7 +453,8 @@ av_log(h->s.avctx, AV_LOG_DEBUG, "short term list:\n"); for(i=0; ishort_ref_count; i++){ Picture *pic= h->short_ref[i]; - av_log(h->s.avctx, AV_LOG_DEBUG, "%d fn:%d poc:%d %p\n", i, pic->frame_num, pic->poc, pic->data[0]); + av_log(h->s.avctx, AV_LOG_DEBUG, "%d fn:%d poc:%d %p\n", + i, pic->frame_num, pic->poc, pic->f.data[0]); } } } @@ -468,7 +469,8 @@ for(i = 0; i < 16; i++){ Picture *pic= h->long_ref[i]; if (pic) { - av_log(h->s.avctx, AV_LOG_DEBUG, "%d fn:%d poc:%d %p\n", i, pic->frame_num, pic->poc, pic->data[0]); + av_log(h->s.avctx, AV_LOG_DEBUG, "%d fn:%d poc:%d %p\n", + i, pic->frame_num, pic->poc, pic->f.data[0]); } } } @@ -480,7 +482,7 @@ h->mmco_index= 0; if(h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count && - !(FIELD_PICTURE && !s->first_field && s->current_picture_ptr->reference)) { + !(FIELD_PICTURE && !s->first_field && s->current_picture_ptr->f.reference)) { h->mmco[0].opcode= MMCO_SHORT2UNUSED; h->mmco[0].short_pic_num= h->short_ref[ h->short_ref_count - 1 ]->frame_num; h->mmco_index= 1; @@ -496,7 +498,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){ MpegEncContext * const s = &h->s; int i, av_uninit(j); - int current_ref_assigned=0; + int current_ref_assigned=0, err=0; Picture *av_uninit(pic); if((s->avctx->debug&FF_DEBUG_MMCO) && mmco_count==0) @@ -513,8 +515,10 @@ pic = find_short(h, frame_num, &j); if(!pic){ if(mmco[i].opcode != MMCO_SHORT2LONG || !h->long_ref[mmco[i].long_arg] - || h->long_ref[mmco[i].long_arg]->frame_num != frame_num) - av_log(h->s.avctx, AV_LOG_ERROR, "mmco: unref short failure\n"); + || h->long_ref[mmco[i].long_arg]->frame_num != frame_num) { + av_log(h->s.avctx, AV_LOG_ERROR, "mmco: unref short failure\n"); + err = AVERROR_INVALIDDATA; + } continue; } } @@ -561,7 +565,7 @@ h->long_ref_count++; } - s->current_picture_ptr->reference |= s->picture_structure; + s->current_picture_ptr->f.reference |= s->picture_structure; current_ref_assigned=1; break; case MMCO_SET_MAX_LONG: @@ -578,13 +582,9 @@ for(j = 0; j < 16; j++) { remove_long(h, j, 0); } - s->current_picture_ptr->poc= - s->current_picture_ptr->field_poc[0]= - s->current_picture_ptr->field_poc[1]= - h->poc_lsb= - h->poc_msb= h->frame_num= s->current_picture_ptr->frame_num= 0; + h->mmco_reset = 1; s->current_picture_ptr->mmco_reset=1; break; default: assert(0); @@ -600,16 +600,18 @@ */ if (h->short_ref_count && h->short_ref[0] == s->current_picture_ptr) { /* Just mark the second field valid */ - s->current_picture_ptr->reference = PICT_FRAME; + s->current_picture_ptr->f.reference = PICT_FRAME; } else if (s->current_picture_ptr->long_ref) { av_log(h->s.avctx, AV_LOG_ERROR, "illegal short term reference " "assignment for second field " "in complementary field pair " "(first field is long term)\n"); + err = AVERROR_INVALIDDATA; } else { pic= remove_short(h, s->current_picture_ptr->frame_num, 0); if(pic){ av_log(h->s.avctx, AV_LOG_ERROR, "illegal short term buffer state detected\n"); + err = AVERROR_INVALIDDATA; } if(h->short_ref_count) @@ -617,7 +619,7 @@ h->short_ref[0]= s->current_picture_ptr; h->short_ref_count++; - s->current_picture_ptr->reference |= s->picture_structure; + s->current_picture_ptr->f.reference |= s->picture_structure; } } @@ -632,6 +634,7 @@ "number of reference frames (%d+%d) exceeds max (%d; probably " "corrupt input), discarding one\n", h->long_ref_count, h->short_ref_count, h->sps.ref_frame_count); + err = AVERROR_INVALIDDATA; if (h->long_ref_count && !h->short_ref_count) { for (i = 0; i < 16; ++i) @@ -648,7 +651,7 @@ print_short_term(h); print_long_term(h); - return 0; + return (h->s.avctx->err_recognition & AV_EF_EXPLODE) ? err : 0; } int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb){ @@ -678,7 +681,7 @@ } if(opcode==MMCO_SHORT2LONG || opcode==MMCO_LONG2UNUSED || opcode==MMCO_LONG || opcode==MMCO_SET_MAX_LONG){ unsigned int long_arg= get_ue_golomb_31(gb); - if(long_arg >= 32 || (long_arg >= 16 && !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE))){ + if(long_arg >= 32 || (long_arg >= 16 && !(opcode == MMCO_SET_MAX_LONG && long_arg == 16) && !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE))){ av_log(h->s.avctx, AV_LOG_ERROR, "illegal long ref in memory management control operation %d\n", opcode); return -1; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/high_bit_depth.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/high_bit_depth.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/high_bit_depth.h 2011-05-11 13:51:50.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/high_bit_depth.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -#include "dsputil.h" - -#ifndef BIT_DEPTH -#define BIT_DEPTH 8 -#endif - -#ifdef AVCODEC_H264_HIGH_DEPTH_H -# undef pixel -# undef pixel2 -# undef pixel4 -# undef dctcoef -# undef INIT_CLIP -# undef no_rnd_avg_pixel4 -# undef rnd_avg_pixel4 -# undef AV_RN2P -# undef AV_RN4P -# undef AV_RN4PA -# undef AV_WN2P -# undef AV_WN4P -# undef AV_WN4PA -# undef CLIP -# undef FUNC -# undef FUNCC -# undef av_clip_pixel -# undef PIXEL_SPLAT_X4 -#else -# define AVCODEC_H264_HIGH_DEPTH_H -# define CLIP_PIXEL(depth)\ - static inline uint16_t av_clip_pixel_ ## depth (int p)\ - {\ - const int pixel_max = (1 << depth)-1;\ - return (p & ~pixel_max) ? (-p)>>31 & pixel_max : p;\ - } - -CLIP_PIXEL( 9) -CLIP_PIXEL(10) -#endif - -#if BIT_DEPTH > 8 -# define pixel uint16_t -# define pixel2 uint32_t -# define pixel4 uint64_t -# define dctcoef int32_t - -# define INIT_CLIP -# define no_rnd_avg_pixel4 no_rnd_avg64 -# define rnd_avg_pixel4 rnd_avg64 -# define AV_RN2P AV_RN32 -# define AV_RN4P AV_RN64 -# define AV_RN4PA AV_RN64A -# define AV_WN2P AV_WN32 -# define AV_WN4P AV_WN64 -# define AV_WN4PA AV_WN64A -# define PIXEL_SPLAT_X4(x) ((x)*0x0001000100010001ULL) -#else -# define pixel uint8_t -# define pixel2 uint16_t -# define pixel4 uint32_t -# define dctcoef int16_t - -# define INIT_CLIP uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; -# define no_rnd_avg_pixel4 no_rnd_avg32 -# define rnd_avg_pixel4 rnd_avg32 -# define AV_RN2P AV_RN16 -# define AV_RN4P AV_RN32 -# define AV_RN4PA AV_RN32A -# define AV_WN2P AV_WN16 -# define AV_WN4P AV_WN32 -# define AV_WN4PA AV_WN32A -# define PIXEL_SPLAT_X4(x) ((x)*0x01010101U) -#endif - -#if BIT_DEPTH == 8 -# define av_clip_pixel(a) av_clip_uint8(a) -# define CLIP(a) cm[a] -# define FUNC(a) a ## _8 -# define FUNCC(a) a ## _8_c -#elif BIT_DEPTH == 9 -# define av_clip_pixel(a) av_clip_pixel_9(a) -# define CLIP(a) av_clip_pixel_9(a) -# define FUNC(a) a ## _9 -# define FUNCC(a) a ## _9_c -#elif BIT_DEPTH == 10 -# define av_clip_pixel(a) av_clip_pixel_10(a) -# define CLIP(a) av_clip_pixel_10(a) -# define FUNC(a) a ## _10 -# define FUNCC(a) a ## _10_c -#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/huffman.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/huffman.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/huffman.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/huffman.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,4 @@ -/** - * @file - * huffman tree builder and VLC generator +/* * Copyright (c) 2006 Konstantin Shishkov * * This file is part of Libav. @@ -20,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * huffman tree builder and VLC generator + */ + #include "avcodec.h" #include "get_bits.h" #include "huffman.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/huffman.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/huffman.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/huffman.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/huffman.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,4 @@ -/** - * @file - * huffman tree builder and VLC generator +/* * Copyright (C) 2007 Aurelien Jacobs * * This file is part of Libav. @@ -20,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * huffman tree builder and VLC generator + */ + #ifndef AVCODEC_HUFFMAN_H #define AVCODEC_HUFFMAN_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/huffyuv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/huffyuv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/huffyuv.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/huffyuv.c 2012-01-11 00:34:30.000000000 +0000 @@ -921,8 +921,8 @@ #if CONFIG_HUFFYUV_DECODER || CONFIG_FFVHUFF_DECODER static void draw_slice(HYuvContext *s, int y){ - int h, cy; - int offset[4]; + int h, cy, i; + int offset[AV_NUM_DATA_POINTERS]; if(s->avctx->draw_horiz_band==NULL) return; @@ -939,7 +939,8 @@ offset[0] = s->picture.linesize[0]*y; offset[1] = s->picture.linesize[1]*cy; offset[2] = s->picture.linesize[2]*cy; - offset[3] = 0; + for (i = 3; i < AV_NUM_DATA_POINTERS; i++) + offset[i] = 0; emms_c(); s->avctx->draw_horiz_band(s->avctx, &s->picture, offset, y, 3, h); @@ -1435,16 +1436,14 @@ #if CONFIG_HUFFYUV_DECODER AVCodec ff_huffyuv_decoder = { - "huffyuv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_HUFFYUV, - sizeof(HYuvContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS, - NULL, + .name = "huffyuv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_HUFFYUV, + .priv_data_size = sizeof(HYuvContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS, .init_thread_copy = ONLY_IF_THREADS_ENABLED(decode_init_thread_copy), .long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"), }; @@ -1452,16 +1451,14 @@ #if CONFIG_FFVHUFF_DECODER AVCodec ff_ffvhuff_decoder = { - "ffvhuff", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_FFVHUFF, - sizeof(HYuvContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS, - NULL, + .name = "ffvhuff", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_FFVHUFF, + .priv_data_size = sizeof(HYuvContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS, .init_thread_copy = ONLY_IF_THREADS_ENABLED(decode_init_thread_copy), .long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"), }; @@ -1469,13 +1466,13 @@ #if CONFIG_HUFFYUV_ENCODER AVCodec ff_huffyuv_encoder = { - "huffyuv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_HUFFYUV, - sizeof(HYuvContext), - encode_init, - encode_frame, - encode_end, + .name = "huffyuv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_HUFFYUV, + .priv_data_size = sizeof(HYuvContext), + .init = encode_init, + .encode = encode_frame, + .close = encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"), }; @@ -1483,13 +1480,13 @@ #if CONFIG_FFVHUFF_ENCODER AVCodec ff_ffvhuff_encoder = { - "ffvhuff", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_FFVHUFF, - sizeof(HYuvContext), - encode_init, - encode_frame, - encode_end, + .name = "ffvhuff", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_FFVHUFF, + .priv_data_size = sizeof(HYuvContext), + .init = encode_init, + .encode = encode_frame, + .close = encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/idcinvideo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/idcinvideo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/idcinvideo.c 2011-04-16 05:56:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/idcinvideo.c 2012-01-11 00:34:30.000000000 +0000 @@ -36,7 +36,7 @@ * a little more compression by exploiting the fact that adjacent pixels * tend to be similar. * - * Note that this decoder could use ffmpeg's optimized VLC facilities + * Note that this decoder could use libavcodec's optimized VLC facilities * rather than naive, tree-based Huffman decoding. However, there are 256 * Huffman tables. Plus, the VLC bit coding order is right -> left instead * or left -> right, so all of the bits would have to be reversed. Further, @@ -254,15 +254,14 @@ } AVCodec ff_idcin_decoder = { - "idcinvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_IDCIN, - sizeof(IdcinContext), - idcin_decode_init, - NULL, - idcin_decode_end, - idcin_decode_frame, - CODEC_CAP_DR1, + .name = "idcinvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_IDCIN, + .priv_data_size = sizeof(IdcinContext), + .init = idcin_decode_init, + .close = idcin_decode_end, + .decode = idcin_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("id Quake II CIN video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/iff.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/iff.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/iff.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/iff.c 2012-01-11 00:34:30.000000000 +0000 @@ -368,27 +368,25 @@ } AVCodec ff_iff_ilbm_decoder = { - "iff_ilbm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_IFF_ILBM, - sizeof(IffContext), - decode_init, - NULL, - decode_end, - decode_frame_ilbm, - CODEC_CAP_DR1, + .name = "iff_ilbm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_IFF_ILBM, + .priv_data_size = sizeof(IffContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame_ilbm, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("IFF ILBM"), }; AVCodec ff_iff_byterun1_decoder = { - "iff_byterun1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_IFF_BYTERUN1, - sizeof(IffContext), - decode_init, - NULL, - decode_end, - decode_frame_byterun1, - CODEC_CAP_DR1, + .name = "iff_byterun1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_IFF_BYTERUN1, + .priv_data_size = sizeof(IffContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame_byterun1, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("IFF ByteRun1"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/iirfilter.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/iirfilter.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/iirfilter.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/iirfilter.c 2012-01-11 00:34:30.000000000 +0000 @@ -311,6 +311,9 @@ } #ifdef TEST +#undef printf +#include + #define FILT_ORDER 4 #define SIZE 1024 int main(void) @@ -320,7 +323,6 @@ float cutoff_coeff = 0.4; int16_t x[SIZE], y[SIZE]; int i; - FILE* fd; fcoeffs = ff_iir_filter_init_coeffs(NULL, FF_FILTER_TYPE_BUTTERWORTH, FF_FILTER_MODE_LOWPASS, FILT_ORDER, @@ -333,13 +335,8 @@ ff_iir_filter(fcoeffs, fstate, SIZE, x, 1, y, 1); - fd = fopen("in.bin", "w"); - fwrite(x, sizeof(x[0]), SIZE, fd); - fclose(fd); - - fd = fopen("out.bin", "w"); - fwrite(y, sizeof(y[0]), SIZE, fd); - fclose(fd); + for (i = 0; i < SIZE; i++) + printf("%6d %6d\n", x[i], y[i]); ff_iir_filter_free_coeffs(fcoeffs); ff_iir_filter_free_state(fstate); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/imc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/imc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/imc.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/imc.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,7 +35,6 @@ #include #include -#define ALT_BITSTREAM_READER #include "avcodec.h" #include "get_bits.h" #include "dsputil.h" @@ -51,6 +50,8 @@ #define COEFFS 256 typedef struct { + AVFrame frame; + float old_floor[BANDS]; float flcoeffs1[BANDS]; float flcoeffs2[BANDS]; @@ -104,10 +105,15 @@ static av_cold int imc_decode_init(AVCodecContext * avctx) { - int i, j; + int i, j, ret; IMCContext *q = avctx->priv_data; double r1, r2; + if (avctx->channels != 1) { + av_log_ask_for_sample(avctx, "Number of channels is not supported\n"); + return AVERROR_PATCHWELCOME; + } + q->decoder_reset = 1; for(i = 0; i < BANDS; i++) @@ -156,10 +162,17 @@ } q->one_div_log2 = 1/log(2); - ff_fft_init(&q->fft, 7, 1); + if ((ret = ff_fft_init(&q->fft, 7, 1))) { + av_log(avctx, AV_LOG_INFO, "FFT init failed\n"); + return ret; + } dsputil_init(&q->dsp, avctx); avctx->sample_fmt = AV_SAMPLE_FMT_FLT; - avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; + avctx->channel_layout = AV_CH_LAYOUT_MONO; + + avcodec_get_frame_defaults(&q->frame); + avctx->coded_frame = &q->frame; + return 0; } @@ -336,7 +349,7 @@ indx = 2; if (indx == -1) - return -1; + return AVERROR_INVALIDDATA; q->flcoeffs4[i] = q->flcoeffs4[i] + xTab[(indx*2 + (q->flcoeffs1[i] < highest)) * 2 + flag]; } @@ -595,7 +608,7 @@ middle_value = max_size >> 1; if (q->codewords[j] >= max_size || q->codewords[j] < 0) - return -1; + return AVERROR_INVALIDDATA; if (cw_len >= 4){ quantizer = imc_quantizer2[(stream_format_code & 2) >> 1]; @@ -628,7 +641,7 @@ if (get_bits_count(&q->gb) + cw_len > 512){ //av_log(NULL,0,"Band %i coeff %i cw_len %i\n",i,j,cw_len); - return -1; + return AVERROR_INVALIDDATA; } if(cw_len && (!q->bandFlagsBuf[i] || !q->skipFlags[j])) @@ -641,9 +654,8 @@ return 0; } -static int imc_decode_frame(AVCodecContext * avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int imc_decode_frame(AVCodecContext * avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; @@ -651,20 +663,27 @@ IMCContext *q = avctx->priv_data; int stream_format_code; - int imc_hdr, i, j; + int imc_hdr, i, j, ret; int flag; int bits, summer; int counter, bitscount; - uint16_t buf16[IMC_BLOCK_SIZE / 2]; + LOCAL_ALIGNED_16(uint16_t, buf16, [IMC_BLOCK_SIZE / 2]); if (buf_size < IMC_BLOCK_SIZE) { av_log(avctx, AV_LOG_ERROR, "imc frame too small!\n"); - return -1; + return AVERROR_INVALIDDATA; + } + + /* get output buffer */ + q->frame.nb_samples = COEFFS; + if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; } - for(i = 0; i < IMC_BLOCK_SIZE / 2; i++) - buf16[i] = av_bswap16(((const uint16_t*)buf)[i]); + q->out_samples = (float *)q->frame.data[0]; + + q->dsp.bswap16_buf(buf16, (const uint16_t*)buf, IMC_BLOCK_SIZE / 2); - q->out_samples = data; init_get_bits(&q->gb, (const uint8_t*)buf16, IMC_BLOCK_SIZE * 8); /* Check the frame header */ @@ -672,13 +691,13 @@ if (imc_hdr != IMC_FRAME_ID) { av_log(avctx, AV_LOG_ERROR, "imc frame header check failed!\n"); av_log(avctx, AV_LOG_ERROR, "got %x instead of 0x21.\n", imc_hdr); - return -1; + return AVERROR_INVALIDDATA; } stream_format_code = get_bits(&q->gb, 3); if(stream_format_code & 1){ av_log(avctx, AV_LOG_ERROR, "Stream code format %X is not supported\n", stream_format_code); - return -1; + return AVERROR_INVALIDDATA; } // av_log(avctx, AV_LOG_DEBUG, "stream_format_code = %d\n", stream_format_code); @@ -738,10 +757,11 @@ } } - if(bit_allocation (q, stream_format_code, 512 - bitscount - get_bits_count(&q->gb), flag) < 0) { + if((ret = bit_allocation (q, stream_format_code, + 512 - bitscount - get_bits_count(&q->gb), flag)) < 0) { av_log(avctx, AV_LOG_ERROR, "Bit allocations failed\n"); q->decoder_reset = 1; - return -1; + return ret; } for(i = 0; i < BANDS; i++) { @@ -795,20 +815,21 @@ if(imc_get_coeffs(q) < 0) { av_log(avctx, AV_LOG_ERROR, "Read coefficients failed\n"); q->decoder_reset = 1; - return 0; + return AVERROR_INVALIDDATA; } if(inverse_quant_coeff(q, stream_format_code) < 0) { av_log(avctx, AV_LOG_ERROR, "Inverse quantization of coefficients failed\n"); q->decoder_reset = 1; - return 0; + return AVERROR_INVALIDDATA; } memset(q->skipFlags, 0, sizeof(q->skipFlags)); imc_imdct256(q); - *data_size = COEFFS * sizeof(float); + *got_frame_ptr = 1; + *(AVFrame *)data = q->frame; return IMC_BLOCK_SIZE; } @@ -819,6 +840,7 @@ IMCContext *q = avctx->priv_data; ff_fft_end(&q->fft); + return 0; } @@ -831,5 +853,6 @@ .init = imc_decode_init, .close = imc_decode_close, .decode = imc_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/imgconvert.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/imgconvert.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/imgconvert.c 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/imgconvert.c 2012-01-11 00:34:30.000000000 +0000 @@ -42,9 +42,6 @@ #include "x86/dsputil_mmx.h" #endif -#define xglue(x, y) x ## y -#define glue(x, y) xglue(x, y) - #define FF_COLOR_RGB 0 /**< RGB color space */ #define FF_COLOR_GRAY 1 /**< gray color space */ #define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */ @@ -865,6 +862,7 @@ return 0; } +#if FF_API_GET_ALPHA_INFO /* NOTE: we scan all the pixels to have an exact information */ static int get_alpha_info_pal8(const AVPicture *src, int width, int height) { @@ -911,6 +909,7 @@ } return ret; } +#endif #if !(HAVE_MMX && HAVE_YASM) /* filter parameters: [-1 4 2 4 -1] // 8 */ @@ -1001,7 +1000,7 @@ uint8_t *src_m1, *src_0, *src_p1, *src_p2; int y; uint8_t *buf; - buf = (uint8_t*)av_malloc(width); + buf = av_malloc(width); src_m1 = src1; memcpy(buf,src_m1,width); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo2.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo2.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,7 @@ * @file * Intel Indeo 2 decoder. */ -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "avcodec.h" #include "get_bits.h" #include "indeo2data.h" @@ -156,16 +156,22 @@ return -1; } + start = 48; /* hardcoded for now */ + + if (start >= buf_size) { + av_log(s->avctx, AV_LOG_ERROR, "input buffer size too small (%d)\n", buf_size); + return AVERROR_INVALIDDATA; + } + s->decode_delta = buf[18]; /* decide whether frame uses deltas or not */ -#ifndef ALT_BITSTREAM_READER_LE +#ifndef BITSTREAM_READER_LE for (i = 0; i < buf_size; i++) buf[i] = av_reverse[buf[i]]; #endif - start = 48; /* hardcoded for now */ - init_get_bits(&s->gb, buf + start, buf_size - start); + init_get_bits(&s->gb, buf + start, (buf_size - start) * 8); if (s->decode_delta) { /* intraframe */ ir2_decode_plane(s, avctx->width, avctx->height, @@ -201,7 +207,7 @@ ir2_vlc.table = vlc_tables; ir2_vlc.table_allocated = 1 << CODE_VLC_BITS; -#ifdef ALT_BITSTREAM_READER_LE +#ifdef BITSTREAM_READER_LE init_vlc(&ir2_vlc, CODE_VLC_BITS, IR2_CODES, &ir2_codes[0][1], 4, 2, &ir2_codes[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); @@ -225,14 +231,13 @@ } AVCodec ff_indeo2_decoder = { - "indeo2", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_INDEO2, - sizeof(Ir2Context), - ir2_decode_init, - NULL, - ir2_decode_end, - ir2_decode_frame, - CODEC_CAP_DR1, + .name = "indeo2", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_INDEO2, + .priv_data_size = sizeof(Ir2Context), + .init = ir2_decode_init, + .close = ir2_decode_end, + .decode = ir2_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 2"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo2data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo2data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo2data.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo2data.h 2012-01-11 00:34:30.000000000 +0000 @@ -26,7 +26,7 @@ #define IR2_CODES 143 static const uint16_t ir2_codes[IR2_CODES][2] = { -#ifdef ALT_BITSTREAM_READER_LE +#ifdef BITSTREAM_READER_LE {0x0000, 3}, {0x0004, 3}, {0x0006, 3}, {0x0001, 5}, {0x0009, 5}, {0x0019, 5}, {0x000D, 5}, {0x001D, 5}, {0x0023, 6}, {0x0013, 6}, {0x0033, 6}, {0x000B, 6}, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo3.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo3.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo3.c 2011-05-05 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo3.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Intel Indeo 3 (IV31, IV32, etc.) video decoder for ffmpeg - * written, produced, and directed by Alan Smithee + * Indeo Video v3 compatible decoder + * Copyright (c) 2009 - 2011 Maxim Poliakovski * * This file is part of Libav. * @@ -19,1134 +19,1066 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include -#include +/** + * @file + * This is a decoder for Intel Indeo Video v3. + * It is based on vector quantization, run-length coding and motion compensation. + * Known container formats: .avi and .mov + * Known FOURCCs: 'IV31', 'IV32' + * + * @see http://wiki.multimedia.cx/index.php?title=Indeo_3 + */ #include "libavutil/imgutils.h" +#include "libavutil/intreadwrite.h" #include "avcodec.h" #include "dsputil.h" #include "bytestream.h" +#include "get_bits.h" #include "indeo3data.h" -typedef struct -{ - uint8_t *Ybuf; - uint8_t *Ubuf; - uint8_t *Vbuf; - unsigned short y_w, y_h; - unsigned short uv_w, uv_h; -} YUVBufs; +/* RLE opcodes. */ +enum { + RLE_ESC_F9 = 249, ///< same as RLE_ESC_FA + do the same with next block + RLE_ESC_FA = 250, ///< INTRA: skip block, INTER: copy data from reference + RLE_ESC_FB = 251, ///< apply null delta to N blocks / skip N blocks + RLE_ESC_FC = 252, ///< same as RLE_ESC_FD + do the same with next block + RLE_ESC_FD = 253, ///< apply null delta to all remaining lines of this block + RLE_ESC_FE = 254, ///< apply null delta to all lines up to the 3rd line + RLE_ESC_FF = 255 ///< apply null delta to all lines up to the 2nd line +}; + + +/* Some constants for parsing frame bitstream flags. */ +#define BS_8BIT_PEL (1 << 1) ///< 8bit pixel bitdepth indicator +#define BS_KEYFRAME (1 << 2) ///< intra frame indicator +#define BS_MV_Y_HALF (1 << 4) ///< vertical mv halfpel resolution indicator +#define BS_MV_X_HALF (1 << 5) ///< horizontal mv halfpel resolution indicator +#define BS_NONREF (1 << 8) ///< nonref (discardable) frame indicator +#define BS_BUFFER 9 ///< indicates which of two frame buffers should be used + + +typedef struct Plane { + uint8_t *buffers[2]; + uint8_t *pixels[2]; ///< pointer to the actual pixel data of the buffers above + uint32_t width; + uint32_t height; + uint32_t pitch; +} Plane; + +#define CELL_STACK_MAX 20 + +typedef struct Cell { + int16_t xpos; ///< cell coordinates in 4x4 blocks + int16_t ypos; + int16_t width; ///< cell width in 4x4 blocks + int16_t height; ///< cell height in 4x4 blocks + uint8_t tree; ///< tree id: 0- MC tree, 1 - VQ tree + const int8_t *mv_ptr; ///< ptr to the motion vector if any +} Cell; typedef struct Indeo3DecodeContext { AVCodecContext *avctx; - int width, height; - AVFrame frame; + AVFrame frame; + DSPContext dsp; - uint8_t *buf; - YUVBufs iv_frame[2]; - YUVBufs *cur_frame; - YUVBufs *ref_frame; - - uint8_t *ModPred; - uint8_t *corrector_type; + GetBitContext gb; + int need_resync; + int skip_bits; + const uint8_t *next_cell_data; + const uint8_t *last_byte; + const int8_t *mc_vectors; + unsigned num_vectors; ///< number of motion vectors in mc_vectors + + int16_t width, height; + uint32_t frame_num; ///< current frame number (zero-based) + uint32_t data_size; ///< size of the frame data in bytes + uint16_t frame_flags; ///< frame properties + uint8_t cb_offset; ///< needed for selecting VQ tables + uint8_t buf_sel; ///< active frame buffer: 0 - primary, 1 -secondary + const uint8_t *y_data_ptr; + const uint8_t *v_data_ptr; + const uint8_t *u_data_ptr; + int32_t y_data_size; + int32_t v_data_size; + int32_t u_data_size; + const uint8_t *alt_quant; ///< secondary VQ table set for the modes 1 and 4 + Plane planes[3]; } Indeo3DecodeContext; -static const uint8_t corrector_type_0[24] = { - 195, 159, 133, 115, 101, 93, 87, 77, - 195, 159, 133, 115, 101, 93, 87, 77, - 128, 79, 79, 79, 79, 79, 79, 79 -}; -static const uint8_t corrector_type_2[8] = { 9, 7, 6, 8, 5, 4, 3, 2 }; +static uint8_t requant_tab[8][128]; -static av_cold int build_modpred(Indeo3DecodeContext *s) +/* + * Build the static requantization table. + * This table is used to remap pixel values according to a specific + * quant index and thus avoid overflows while adding deltas. + */ +static av_cold void build_requant_tab(void) { - int i, j; + static int8_t offsets[8] = { 1, 1, 2, -3, -3, 3, 4, 4 }; + static int8_t deltas [8] = { 0, 1, 0, 4, 4, 1, 0, 1 }; - if (!(s->ModPred = av_malloc(8 * 128))) - return AVERROR(ENOMEM); + int i, j, step; - for (i=0; i < 128; ++i) { - s->ModPred[i+0*128] = i > 126 ? 254 : 2*(i + 1 - ((i + 1) % 2)); - s->ModPred[i+1*128] = i == 7 ? 20 : - i == 119 || - i == 120 ? 236 : 2*(i + 2 - ((i + 1) % 3)); - s->ModPred[i+2*128] = i > 125 ? 248 : 2*(i + 2 - ((i + 2) % 4)); - s->ModPred[i+3*128] = 2*(i + 1 - ((i - 3) % 5)); - s->ModPred[i+4*128] = i == 8 ? 20 : 2*(i + 1 - ((i - 3) % 6)); - s->ModPred[i+5*128] = 2*(i + 4 - ((i + 3) % 7)); - s->ModPred[i+6*128] = i > 123 ? 240 : 2*(i + 4 - ((i + 4) % 8)); - s->ModPred[i+7*128] = 2*(i + 5 - ((i + 4) % 9)); - } - - if (!(s->corrector_type = av_malloc(24 * 256))) - return AVERROR(ENOMEM); - - for (i=0; i < 24; ++i) { - for (j=0; j < 256; ++j) { - s->corrector_type[i*256+j] = j < corrector_type_0[i] ? 1 : - j < 248 || (i == 16 && j == 248) ? 0 : - corrector_type_2[j - 248]; - } + for (i = 0; i < 8; i++) { + step = i + 2; + for (j = 0; j < 128; j++) + requant_tab[i][j] = (j + offsets[i]) / step * step + deltas[i]; } - return 0; + /* some last elements calculated above will have values >= 128 */ + /* pixel values shall never exceed 127 so set them to non-overflowing values */ + /* according with the quantization step of the respective section */ + requant_tab[0][127] = 126; + requant_tab[1][119] = 118; + requant_tab[1][120] = 118; + requant_tab[2][126] = 124; + requant_tab[2][127] = 124; + requant_tab[6][124] = 120; + requant_tab[6][125] = 120; + requant_tab[6][126] = 120; + requant_tab[6][127] = 120; + + /* Patch for compatibility with the Intel's binary decoders */ + requant_tab[1][7] = 10; + requant_tab[4][8] = 10; } -static av_cold int iv_alloc_frames(Indeo3DecodeContext *s) + +static av_cold int allocate_frame_buffers(Indeo3DecodeContext *ctx, + AVCodecContext *avctx) { - int luma_width = (s->width + 3) & ~3, - luma_height = (s->height + 3) & ~3, - chroma_width = ((luma_width >> 2) + 3) & ~3, - chroma_height = ((luma_height >> 2) + 3) & ~3, - luma_pixels = luma_width * luma_height, - chroma_pixels = chroma_width * chroma_height, - i; - unsigned int bufsize = luma_pixels * 2 + luma_width * 3 + - (chroma_pixels + chroma_width) * 4; - - av_freep(&s->buf); - if(!(s->buf = av_malloc(bufsize))) - return AVERROR(ENOMEM); - s->iv_frame[0].y_w = s->iv_frame[1].y_w = luma_width; - s->iv_frame[0].y_h = s->iv_frame[1].y_h = luma_height; - s->iv_frame[0].uv_w = s->iv_frame[1].uv_w = chroma_width; - s->iv_frame[0].uv_h = s->iv_frame[1].uv_h = chroma_height; - - s->iv_frame[0].Ybuf = s->buf + luma_width; - i = luma_pixels + luma_width * 2; - s->iv_frame[1].Ybuf = s->buf + i; - i += (luma_pixels + luma_width); - s->iv_frame[0].Ubuf = s->buf + i; - i += (chroma_pixels + chroma_width); - s->iv_frame[1].Ubuf = s->buf + i; - i += (chroma_pixels + chroma_width); - s->iv_frame[0].Vbuf = s->buf + i; - i += (chroma_pixels + chroma_width); - s->iv_frame[1].Vbuf = s->buf + i; - - for(i = 1; i <= luma_width; i++) - s->iv_frame[0].Ybuf[-i] = s->iv_frame[1].Ybuf[-i] = - s->iv_frame[0].Ubuf[-i] = 0x80; - - for(i = 1; i <= chroma_width; i++) { - s->iv_frame[1].Ubuf[-i] = 0x80; - s->iv_frame[0].Vbuf[-i] = 0x80; - s->iv_frame[1].Vbuf[-i] = 0x80; - s->iv_frame[1].Vbuf[chroma_pixels+i-1] = 0x80; + int p, luma_width, luma_height, chroma_width, chroma_height; + int luma_pitch, chroma_pitch, luma_size, chroma_size; + + luma_width = ctx->width; + luma_height = ctx->height; + + if (luma_width < 16 || luma_width > 640 || + luma_height < 16 || luma_height > 480 || + luma_width & 3 || luma_height & 3) { + av_log(avctx, AV_LOG_ERROR, "Invalid picture dimensions: %d x %d!\n", + luma_width, luma_height); + return AVERROR_INVALIDDATA; + } + + chroma_width = FFALIGN(luma_width >> 2, 4); + chroma_height = FFALIGN(luma_height >> 2, 4); + + luma_pitch = FFALIGN(luma_width, 16); + chroma_pitch = FFALIGN(chroma_width, 16); + + /* Calculate size of the luminance plane. */ + /* Add one line more for INTRA prediction. */ + luma_size = luma_pitch * (luma_height + 1); + + /* Calculate size of a chrominance planes. */ + /* Add one line more for INTRA prediction. */ + chroma_size = chroma_pitch * (chroma_height + 1); + + /* allocate frame buffers */ + for (p = 0; p < 3; p++) { + ctx->planes[p].pitch = !p ? luma_pitch : chroma_pitch; + ctx->planes[p].width = !p ? luma_width : chroma_width; + ctx->planes[p].height = !p ? luma_height : chroma_height; + + ctx->planes[p].buffers[0] = av_malloc(!p ? luma_size : chroma_size); + ctx->planes[p].buffers[1] = av_malloc(!p ? luma_size : chroma_size); + + /* fill the INTRA prediction lines with the middle pixel value = 64 */ + memset(ctx->planes[p].buffers[0], 0x40, ctx->planes[p].pitch); + memset(ctx->planes[p].buffers[1], 0x40, ctx->planes[p].pitch); + + /* set buffer pointers = buf_ptr + pitch and thus skip the INTRA prediction line */ + ctx->planes[p].pixels[0] = ctx->planes[p].buffers[0] + ctx->planes[p].pitch; + ctx->planes[p].pixels[1] = ctx->planes[p].buffers[1] + ctx->planes[p].pitch; } return 0; } -static av_cold void iv_free_func(Indeo3DecodeContext *s) + +static av_cold void free_frame_buffers(Indeo3DecodeContext *ctx) { - av_freep(&s->buf); - av_freep(&s->ModPred); - av_freep(&s->corrector_type); + int p; + + for (p = 0; p < 3; p++) { + av_freep(&ctx->planes[p].buffers[0]); + av_freep(&ctx->planes[p].buffers[1]); + } } -struct ustr { - int xpos; - int ypos; - int width; - int height; - int split_flag; - int split_direction; - int usl7; -}; +/** + * Copy pixels of the cell(x + mv_x, y + mv_y) from the previous frame into + * the cell(x, y) in the current frame. + * + * @param ctx pointer to the decoder context + * @param plane pointer to the plane descriptor + * @param cell pointer to the cell descriptor + */ +static void copy_cell(Indeo3DecodeContext *ctx, Plane *plane, Cell *cell) +{ + int h, w, mv_x, mv_y, offset, offset_dst; + uint8_t *src, *dst; -#define LV1_CHECK(buf1,rle_v3,lv1,lp2) \ - if((lv1 & 0x80) != 0) { \ - if(rle_v3 != 0) \ - rle_v3 = 0; \ - else { \ - rle_v3 = 1; \ - buf1 -= 2; \ - } \ - } \ - lp2 = 4; - - -#define RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3) \ - if(rle_v3 == 0) { \ - rle_v2 = *buf1; \ - rle_v1 = 1; \ - if(rle_v2 > 32) { \ - rle_v2 -= 32; \ - rle_v1 = 0; \ - } \ - rle_v3 = 1; \ - } \ - buf1--; - - -#define LP2_CHECK(buf1,rle_v3,lp2) \ - if(lp2 == 0 && rle_v3 != 0) \ - rle_v3 = 0; \ - else { \ - buf1--; \ - rle_v3 = 1; \ + /* setup output and reference pointers */ + offset_dst = (cell->ypos << 2) * plane->pitch + (cell->xpos << 2); + dst = plane->pixels[ctx->buf_sel] + offset_dst; + mv_y = cell->mv_ptr[0]; + mv_x = cell->mv_ptr[1]; + offset = offset_dst + mv_y * plane->pitch + mv_x; + src = plane->pixels[ctx->buf_sel ^ 1] + offset; + + h = cell->height << 2; + + for (w = cell->width; w > 0;) { + /* copy using 16xH blocks */ + if (!((cell->xpos << 2) & 15) && w >= 4) { + for (; w >= 4; src += 16, dst += 16, w -= 4) + ctx->dsp.put_no_rnd_pixels_tab[0][0](dst, src, plane->pitch, h); + } + + /* copy using 8xH blocks */ + if (!((cell->xpos << 2) & 7) && w >= 2) { + ctx->dsp.put_no_rnd_pixels_tab[1][0](dst, src, plane->pitch, h); + w -= 2; + src += 8; + dst += 8; + } + + if (w >= 1) { + copy_block4(dst, src, plane->pitch, plane->pitch, h); + w--; + src += 4; + dst += 4; + } } +} + + +/* Average 4/8 pixels at once without rounding using SWAR */ +#define AVG_32(dst, src, ref) \ + AV_WN32A(dst, ((AV_RN32A(src) + AV_RN32A(ref)) >> 1) & 0x7F7F7F7FUL) +#define AVG_64(dst, src, ref) \ + AV_WN64A(dst, ((AV_RN64A(src) + AV_RN64A(ref)) >> 1) & 0x7F7F7F7F7F7F7F7FULL) -#define RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2) \ - rle_v2--; \ - if(rle_v2 == 0) { \ - rle_v3 = 0; \ - buf1 += 2; \ - } \ - lp2 = 4; - -static void iv_Decode_Chunk(Indeo3DecodeContext *s, - uint8_t *cur, uint8_t *ref, int width, int height, - const uint8_t *buf1, int cb_offset, const uint8_t *hdr, - const uint8_t *buf2, int min_width_160) + +/* + * Replicate each even pixel as follows: + * ABCDEFGH -> AACCEEGG + */ +static inline uint64_t replicate64(uint64_t a) { +#if HAVE_BIGENDIAN + a &= 0xFF00FF00FF00FF00ULL; + a |= a >> 8; +#else + a &= 0x00FF00FF00FF00FFULL; + a |= a << 8; +#endif + return a; +} + +static inline uint32_t replicate32(uint32_t a) { +#if HAVE_BIGENDIAN + a &= 0xFF00FF00UL; + a |= a >> 8; +#else + a &= 0x00FF00FFUL; + a |= a << 8; +#endif + return a; +} + + +/* Fill n lines with 64bit pixel value pix */ +static inline void fill_64(uint8_t *dst, const uint64_t pix, int32_t n, + int32_t row_offset) { - uint8_t bit_buf; - unsigned int bit_pos, lv, lv1, lv2; - int *width_tbl, width_tbl_arr[10]; - const signed char *ref_vectors; - uint8_t *cur_frm_pos, *ref_frm_pos, *cp, *cp2; - uint32_t *cur_lp, *ref_lp; - const uint32_t *correction_lp[2], *correctionloworder_lp[2], *correctionhighorder_lp[2]; - uint8_t *correction_type_sp[2]; - struct ustr strip_tbl[20], *strip; - int i, j, k, lp1, lp2, flag1, cmd, blks_width, blks_height, region_160_width, - rle_v1, rle_v2, rle_v3; - unsigned short res; - - bit_buf = 0; - ref_vectors = NULL; - - width_tbl = width_tbl_arr + 1; - i = (width < 0 ? width + 3 : width)/4; - for(j = -1; j < 8; j++) - width_tbl[j] = i * j; - - strip = strip_tbl; - - for(region_160_width = 0; region_160_width < (width - min_width_160); region_160_width += min_width_160); - - strip->ypos = strip->xpos = 0; - for(strip->width = min_width_160; width > strip->width; strip->width *= 2); - strip->height = height; - strip->split_direction = 0; - strip->split_flag = 0; - strip->usl7 = 0; - - bit_pos = 0; - - rle_v1 = rle_v2 = rle_v3 = 0; - - while(strip >= strip_tbl) { - if(bit_pos <= 0) { - bit_pos = 8; - bit_buf = *buf1++; - } + for (; n > 0; dst += row_offset, n--) + AV_WN64A(dst, pix); +} - bit_pos -= 2; - cmd = (bit_buf >> bit_pos) & 0x03; - if(cmd == 0) { - strip++; - if(strip >= strip_tbl + FF_ARRAY_ELEMS(strip_tbl)) { - av_log(s->avctx, AV_LOG_WARNING, "out of range strip\n"); - break; - } - memcpy(strip, strip-1, sizeof(*strip)); - strip->split_flag = 1; - strip->split_direction = 0; - strip->height = (strip->height > 8 ? ((strip->height+8)>>4)<<3 : 4); - continue; - } else if(cmd == 1) { - strip++; - if(strip >= strip_tbl + FF_ARRAY_ELEMS(strip_tbl)) { - av_log(s->avctx, AV_LOG_WARNING, "out of range strip\n"); - break; - } - memcpy(strip, strip-1, sizeof(*strip)); - strip->split_flag = 1; - strip->split_direction = 1; - strip->width = (strip->width > 8 ? ((strip->width+8)>>4)<<3 : 4); - continue; - } else if(cmd == 2) { - if(strip->usl7 == 0) { - strip->usl7 = 1; - ref_vectors = NULL; - continue; - } - } else if(cmd == 3) { - if(strip->usl7 == 0) { - strip->usl7 = 1; - ref_vectors = (const signed char*)buf2 + (*buf1 * 2); - buf1++; - continue; - } - } +/* Error codes for cell decoding. */ +enum { + IV3_NOERR = 0, + IV3_BAD_RLE = 1, + IV3_BAD_DATA = 2, + IV3_BAD_COUNTER = 3, + IV3_UNSUPPORTED = 4, + IV3_OUT_OF_DATA = 5 +}; - cur_frm_pos = cur + width * strip->ypos + strip->xpos; - if((blks_width = strip->width) < 0) - blks_width += 3; - blks_width >>= 2; - blks_height = strip->height; - - if(ref_vectors != NULL) { - ref_frm_pos = ref + (ref_vectors[0] + strip->ypos) * width + - ref_vectors[1] + strip->xpos; - } else - ref_frm_pos = cur_frm_pos - width_tbl[4]; +#define BUFFER_PRECHECK \ +if (*data_ptr >= last_ptr) \ + return IV3_OUT_OF_DATA; \ + +#define RLE_BLOCK_COPY \ + if (cell->mv_ptr || !skip_flag) \ + copy_block4(dst, ref, row_offset, row_offset, 4 << v_zoom) + +#define RLE_BLOCK_COPY_8 \ + pix64 = AV_RN64A(ref);\ + if (is_first_row) {/* special prediction case: top line of a cell */\ + pix64 = replicate64(pix64);\ + fill_64(dst + row_offset, pix64, 7, row_offset);\ + AVG_64(dst, ref, dst + row_offset);\ + } else \ + fill_64(dst, pix64, 8, row_offset) + +#define RLE_LINES_COPY \ + copy_block4(dst, ref, row_offset, row_offset, num_lines << v_zoom) + +#define RLE_LINES_COPY_M10 \ + pix64 = AV_RN64A(ref);\ + if (is_top_of_cell) {\ + pix64 = replicate64(pix64);\ + fill_64(dst + row_offset, pix64, (num_lines << 1) - 1, row_offset);\ + AVG_64(dst, ref, dst + row_offset);\ + } else \ + fill_64(dst, pix64, num_lines << 1, row_offset) + +#define APPLY_DELTA_4 \ + AV_WN16A(dst + line_offset , AV_RN16A(ref ) + delta_tab->deltas[dyad1]);\ + AV_WN16A(dst + line_offset + 2, AV_RN16A(ref + 2) + delta_tab->deltas[dyad2]);\ + if (mode >= 3) {\ + if (is_top_of_cell && !cell->ypos) {\ + AV_COPY32(dst, dst + row_offset);\ + } else {\ + AVG_32(dst, ref, dst + row_offset);\ + }\ + } - if(cmd == 2) { - if(bit_pos <= 0) { - bit_pos = 8; - bit_buf = *buf1++; - } +#define APPLY_DELTA_8 \ + /* apply two 32-bit VQ deltas to next even line */\ + if (is_top_of_cell) { \ + AV_WN32A(dst + row_offset , \ + replicate32(AV_RN32A(ref )) + delta_tab->deltas_m10[dyad1]);\ + AV_WN32A(dst + row_offset + 4, \ + replicate32(AV_RN32A(ref + 4)) + delta_tab->deltas_m10[dyad2]);\ + } else { \ + AV_WN32A(dst + row_offset , \ + AV_RN32A(ref ) + delta_tab->deltas_m10[dyad1]);\ + AV_WN32A(dst + row_offset + 4, \ + AV_RN32A(ref + 4) + delta_tab->deltas_m10[dyad2]);\ + } \ + /* odd lines are not coded but rather interpolated/replicated */\ + /* first line of the cell on the top of image? - replicate */\ + /* otherwise - interpolate */\ + if (is_top_of_cell && !cell->ypos) {\ + AV_COPY64(dst, dst + row_offset);\ + } else \ + AVG_64(dst, ref, dst + row_offset); + + +#define APPLY_DELTA_1011_INTER \ + if (mode == 10) { \ + AV_WN32A(dst , \ + AV_RN32A(dst ) + delta_tab->deltas_m10[dyad1]);\ + AV_WN32A(dst + 4 , \ + AV_RN32A(dst + 4 ) + delta_tab->deltas_m10[dyad2]);\ + AV_WN32A(dst + row_offset , \ + AV_RN32A(dst + row_offset ) + delta_tab->deltas_m10[dyad1]);\ + AV_WN32A(dst + row_offset + 4, \ + AV_RN32A(dst + row_offset + 4) + delta_tab->deltas_m10[dyad2]);\ + } else { \ + AV_WN16A(dst , \ + AV_RN16A(dst ) + delta_tab->deltas[dyad1]);\ + AV_WN16A(dst + 2 , \ + AV_RN16A(dst + 2 ) + delta_tab->deltas[dyad2]);\ + AV_WN16A(dst + row_offset , \ + AV_RN16A(dst + row_offset ) + delta_tab->deltas[dyad1]);\ + AV_WN16A(dst + row_offset + 2, \ + AV_RN16A(dst + row_offset + 2) + delta_tab->deltas[dyad2]);\ + } - bit_pos -= 2; - cmd = (bit_buf >> bit_pos) & 0x03; - if(cmd == 0 || ref_vectors != NULL) { - for(lp1 = 0; lp1 < blks_width; lp1++) { - for(i = 0, j = 0; i < blks_height; i++, j += width_tbl[1]) - ((uint32_t *)cur_frm_pos)[j] = ((uint32_t *)ref_frm_pos)[j]; - cur_frm_pos += 4; - ref_frm_pos += 4; - } - } else if(cmd != 1) - return; - } else { - k = *buf1 >> 4; - j = *buf1 & 0x0f; - buf1++; - lv = j + cb_offset; - - if((lv - 8) <= 7 && (k == 0 || k == 3 || k == 10)) { - cp2 = s->ModPred + ((lv - 8) << 7); - cp = ref_frm_pos; - for(i = 0; i < blks_width << 2; i++) { - int v = *cp >> 1; - *(cp++) = cp2[v]; +static int decode_cell_data(Cell *cell, uint8_t *block, uint8_t *ref_block, + int pitch, int h_zoom, int v_zoom, int mode, + const vqEntry *delta[2], int swap_quads[2], + const uint8_t **data_ptr, const uint8_t *last_ptr) +{ + int x, y, line, num_lines; + int rle_blocks = 0; + uint8_t code, *dst, *ref; + const vqEntry *delta_tab; + unsigned int dyad1, dyad2; + uint64_t pix64; + int skip_flag = 0, is_top_of_cell, is_first_row = 1; + int row_offset, blk_row_offset, line_offset; + + row_offset = pitch; + blk_row_offset = (row_offset << (2 + v_zoom)) - (cell->width << 2); + line_offset = v_zoom ? row_offset : 0; + + for (y = 0; y < cell->height; is_first_row = 0, y += 1 + v_zoom) { + for (x = 0; x < cell->width; x += 1 + h_zoom) { + ref = ref_block; + dst = block; + + if (rle_blocks > 0) { + if (mode <= 4) { + RLE_BLOCK_COPY; + } else if (mode == 10 && !cell->mv_ptr) { + RLE_BLOCK_COPY_8; } - } - - if(k == 1 || k == 4) { - lv = (hdr[j] & 0xf) + cb_offset; - correction_type_sp[0] = s->corrector_type + (lv << 8); - correction_lp[0] = correction + (lv << 8); - lv = (hdr[j] >> 4) + cb_offset; - correction_lp[1] = correction + (lv << 8); - correction_type_sp[1] = s->corrector_type + (lv << 8); + rle_blocks--; } else { - correctionloworder_lp[0] = correctionloworder_lp[1] = correctionloworder + (lv << 8); - correctionhighorder_lp[0] = correctionhighorder_lp[1] = correctionhighorder + (lv << 8); - correction_type_sp[0] = correction_type_sp[1] = s->corrector_type + (lv << 8); - correction_lp[0] = correction_lp[1] = correction + (lv << 8); - } - - switch(k) { - case 1: - case 0: /********** CASE 0 **********/ - for( ; blks_height > 0; blks_height -= 4) { - for(lp1 = 0; lp1 < blks_width; lp1++) { - for(lp2 = 0; lp2 < 4; ) { - k = *buf1++; - cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2]; - ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2]; - - switch(correction_type_sp[0][k]) { - case 0: - *cur_lp = av_le2ne32(((av_le2ne32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); - lp2++; - break; - case 1: - res = ((av_le2ne16(((unsigned short *)(ref_lp))[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1; - ((unsigned short *)cur_lp)[0] = av_le2ne16(res); - res = ((av_le2ne16(((unsigned short *)(ref_lp))[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1; - ((unsigned short *)cur_lp)[1] = av_le2ne16(res); - buf1++; - lp2++; - break; - case 2: - if(lp2 == 0) { - for(i = 0, j = 0; i < 2; i++, j += width_tbl[1]) - cur_lp[j] = ref_lp[j]; - lp2 += 2; - } - break; - case 3: - if(lp2 < 2) { - for(i = 0, j = 0; i < (3 - lp2); i++, j += width_tbl[1]) - cur_lp[j] = ref_lp[j]; - lp2 = 3; - } - break; - case 8: - if(lp2 == 0) { - RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3) - - if(rle_v1 == 1 || ref_vectors != NULL) { - for(i = 0, j = 0; i < 4; i++, j += width_tbl[1]) - cur_lp[j] = ref_lp[j]; - } - - RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2) - break; - } else { - rle_v1 = 1; - rle_v2 = *buf1 - 1; - } - case 5: - LP2_CHECK(buf1,rle_v3,lp2) - case 4: - for(i = 0, j = 0; i < (4 - lp2); i++, j += width_tbl[1]) - cur_lp[j] = ref_lp[j]; - lp2 = 4; - break; - - case 7: - if(rle_v3 != 0) - rle_v3 = 0; - else { - buf1--; - rle_v3 = 1; + for (line = 0; line < 4;) { + num_lines = 1; + is_top_of_cell = is_first_row && !line; + + /* select primary VQ table for odd, secondary for even lines */ + if (mode <= 4) + delta_tab = delta[line & 1]; + else + delta_tab = delta[1]; + BUFFER_PRECHECK; + code = bytestream_get_byte(data_ptr); + if (code < 248) { + if (code < delta_tab->num_dyads) { + BUFFER_PRECHECK; + dyad1 = bytestream_get_byte(data_ptr); + dyad2 = code; + if (dyad1 >= delta_tab->num_dyads || dyad1 >= 248) + return IV3_BAD_DATA; + } else { + /* process QUADS */ + code -= delta_tab->num_dyads; + dyad1 = code / delta_tab->quad_exp; + dyad2 = code % delta_tab->quad_exp; + if (swap_quads[line & 1]) + FFSWAP(unsigned int, dyad1, dyad2); + } + if (mode <= 4) { + APPLY_DELTA_4; + } else if (mode == 10 && !cell->mv_ptr) { + APPLY_DELTA_8; + } else { + APPLY_DELTA_1011_INTER; + } + } else { + /* process RLE codes */ + switch (code) { + case RLE_ESC_FC: + skip_flag = 0; + rle_blocks = 1; + code = 253; + /* FALLTHROUGH */ + case RLE_ESC_FF: + case RLE_ESC_FE: + case RLE_ESC_FD: + num_lines = 257 - code - line; + if (num_lines <= 0) + return IV3_BAD_RLE; + if (mode <= 4) { + RLE_LINES_COPY; + } else if (mode == 10 && !cell->mv_ptr) { + RLE_LINES_COPY_M10; + } + break; + case RLE_ESC_FB: + BUFFER_PRECHECK; + code = bytestream_get_byte(data_ptr); + rle_blocks = (code & 0x1F) - 1; /* set block counter */ + if (code >= 64 || rle_blocks < 0) + return IV3_BAD_COUNTER; + skip_flag = code & 0x20; + num_lines = 4 - line; /* enforce next block processing */ + if (mode >= 10 || (cell->mv_ptr || !skip_flag)) { + if (mode <= 4) { + RLE_LINES_COPY; + } else if (mode == 10 && !cell->mv_ptr) { + RLE_LINES_COPY_M10; } - case 6: - if(ref_vectors != NULL) { - for(i = 0, j = 0; i < 4; i++, j += width_tbl[1]) - cur_lp[j] = ref_lp[j]; + } + break; + case RLE_ESC_F9: + skip_flag = 1; + rle_blocks = 1; + /* FALLTHROUGH */ + case RLE_ESC_FA: + if (line) + return IV3_BAD_RLE; + num_lines = 4; /* enforce next block processing */ + if (cell->mv_ptr) { + if (mode <= 4) { + RLE_LINES_COPY; + } else if (mode == 10 && !cell->mv_ptr) { + RLE_LINES_COPY_M10; } - lp2 = 4; - break; - - case 9: - lv1 = *buf1++; - lv = (lv1 & 0x7F) << 1; - lv += (lv << 8); - lv += (lv << 16); - for(i = 0, j = 0; i < 4; i++, j += width_tbl[1]) - cur_lp[j] = lv; - - LV1_CHECK(buf1,rle_v3,lv1,lp2) - break; - default: - return; } + break; + default: + return IV3_UNSUPPORTED; } - - cur_frm_pos += 4; - ref_frm_pos += 4; } - cur_frm_pos += ((width - blks_width) * 4); - ref_frm_pos += ((width - blks_width) * 4); + line += num_lines; + ref += row_offset * (num_lines << v_zoom); + dst += row_offset * (num_lines << v_zoom); } - break; + } - case 4: - case 3: /********** CASE 3 **********/ - if(ref_vectors != NULL) - return; - flag1 = 1; - - for( ; blks_height > 0; blks_height -= 8) { - for(lp1 = 0; lp1 < blks_width; lp1++) { - for(lp2 = 0; lp2 < 4; ) { - k = *buf1++; - - cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2]; - ref_lp = ((uint32_t *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1]; - - switch(correction_type_sp[lp2 & 0x01][k]) { - case 0: - cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); - if(lp2 > 0 || flag1 == 0 || strip->ypos != 0) - cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; - else - cur_lp[0] = av_le2ne32(((av_le2ne32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); - lp2++; - break; - - case 1: - res = ((av_le2ne16(((unsigned short *)ref_lp)[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1; - ((unsigned short *)cur_lp)[width_tbl[2]] = av_le2ne16(res); - res = ((av_le2ne16(((unsigned short *)ref_lp)[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1; - ((unsigned short *)cur_lp)[width_tbl[2]+1] = av_le2ne16(res); - - if(lp2 > 0 || flag1 == 0 || strip->ypos != 0) - cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; - else - cur_lp[0] = cur_lp[width_tbl[1]]; - buf1++; - lp2++; - break; - - case 2: - if(lp2 == 0) { - for(i = 0, j = 0; i < 4; i++, j += width_tbl[1]) - cur_lp[j] = *ref_lp; - lp2 += 2; - } - break; + /* move to next horizontal block */ + block += 4 << h_zoom; + ref_block += 4 << h_zoom; + } - case 3: - if(lp2 < 2) { - for(i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1]) - cur_lp[j] = *ref_lp; - lp2 = 3; - } - break; + /* move to next line of blocks */ + ref_block += blk_row_offset; + block += blk_row_offset; + } + return IV3_NOERR; +} - case 6: - lp2 = 4; - break; - - case 7: - if(rle_v3 != 0) - rle_v3 = 0; - else { - buf1--; - rle_v3 = 1; - } - lp2 = 4; - break; - case 8: - if(lp2 == 0) { - RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3) - - if(rle_v1 == 1) { - for(i = 0, j = 0; i < 8; i++, j += width_tbl[1]) - cur_lp[j] = ref_lp[j]; - } - - RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2) - break; - } else { - rle_v2 = (*buf1) - 1; - rle_v1 = 1; - } - case 5: - LP2_CHECK(buf1,rle_v3,lp2) - case 4: - for(i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1]) - cur_lp[j] = *ref_lp; - lp2 = 4; - break; - - case 9: - av_log(s->avctx, AV_LOG_ERROR, "UNTESTED.\n"); - lv1 = *buf1++; - lv = (lv1 & 0x7F) << 1; - lv += (lv << 8); - lv += (lv << 16); +/** + * Decode a vector-quantized cell. + * It consists of several routines, each of which handles one or more "modes" + * with which a cell can be encoded. + * + * @param ctx pointer to the decoder context + * @param avctx ptr to the AVCodecContext + * @param plane pointer to the plane descriptor + * @param cell pointer to the cell descriptor + * @param data_ptr pointer to the compressed data + * @param last_ptr pointer to the last byte to catch reads past end of buffer + * @return number of consumed bytes or negative number in case of error + */ +static int decode_cell(Indeo3DecodeContext *ctx, AVCodecContext *avctx, + Plane *plane, Cell *cell, const uint8_t *data_ptr, + const uint8_t *last_ptr) +{ + int x, mv_x, mv_y, mode, vq_index, prim_indx, second_indx; + int zoom_fac; + int offset, error = 0, swap_quads[2]; + uint8_t code, *block, *ref_block = 0; + const vqEntry *delta[2]; + const uint8_t *data_start = data_ptr; + + /* get coding mode and VQ table index from the VQ descriptor byte */ + code = *data_ptr++; + mode = code >> 4; + vq_index = code & 0xF; + + /* setup output and reference pointers */ + offset = (cell->ypos << 2) * plane->pitch + (cell->xpos << 2); + block = plane->pixels[ctx->buf_sel] + offset; + if (!cell->mv_ptr) { + /* use previous line as reference for INTRA cells */ + ref_block = block - plane->pitch; + } else if (mode >= 10) { + /* for mode 10 and 11 INTER first copy the predicted cell into the current one */ + /* so we don't need to do data copying for each RLE code later */ + copy_cell(ctx, plane, cell); + } else { + /* set the pointer to the reference pixels for modes 0-4 INTER */ + mv_y = cell->mv_ptr[0]; + mv_x = cell->mv_ptr[1]; + offset += mv_y * plane->pitch + mv_x; + ref_block = plane->pixels[ctx->buf_sel ^ 1] + offset; + } - for(i = 0, j = 0; i < 4; i++, j += width_tbl[1]) - cur_lp[j] = lv; + /* select VQ tables as follows: */ + /* modes 0 and 3 use only the primary table for all lines in a block */ + /* while modes 1 and 4 switch between primary and secondary tables on alternate lines */ + if (mode == 1 || mode == 4) { + code = ctx->alt_quant[vq_index]; + prim_indx = (code >> 4) + ctx->cb_offset; + second_indx = (code & 0xF) + ctx->cb_offset; + } else { + vq_index += ctx->cb_offset; + prim_indx = second_indx = vq_index; + } - LV1_CHECK(buf1,rle_v3,lv1,lp2) - break; + if (prim_indx >= 24 || second_indx >= 24) { + av_log(avctx, AV_LOG_ERROR, "Invalid VQ table indexes! Primary: %d, secondary: %d!\n", + prim_indx, second_indx); + return AVERROR_INVALIDDATA; + } - default: - return; - } - } + delta[0] = &vq_tab[second_indx]; + delta[1] = &vq_tab[prim_indx]; + swap_quads[0] = second_indx >= 16; + swap_quads[1] = prim_indx >= 16; + + /* requantize the prediction if VQ index of this cell differs from VQ index */ + /* of the predicted cell in order to avoid overflows. */ + if (vq_index >= 8 && ref_block) { + for (x = 0; x < cell->width << 2; x++) + ref_block[x] = requant_tab[vq_index & 7][ref_block[x]]; + } - cur_frm_pos += 4; - } + error = IV3_NOERR; - cur_frm_pos += (((width * 2) - blks_width) * 4); - flag1 = 0; - } - break; + switch (mode) { + case 0: /*------------------ MODES 0 & 1 (4x4 block processing) --------------------*/ + case 1: + case 3: /*------------------ MODES 3 & 4 (4x8 block processing) --------------------*/ + case 4: + if (mode >= 3 && cell->mv_ptr) { + av_log(avctx, AV_LOG_ERROR, "Attempt to apply Mode 3/4 to an INTER cell!\n"); + return AVERROR_INVALIDDATA; + } - case 10: /********** CASE 10 **********/ - if(ref_vectors == NULL) { - flag1 = 1; - - for( ; blks_height > 0; blks_height -= 8) { - for(lp1 = 0; lp1 < blks_width; lp1 += 2) { - for(lp2 = 0; lp2 < 4; ) { - k = *buf1++; - cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2]; - ref_lp = ((uint32_t *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1]; - lv1 = ref_lp[0]; - lv2 = ref_lp[1]; - if(lp2 == 0 && flag1 != 0) { -#if HAVE_BIGENDIAN - lv1 = lv1 & 0xFF00FF00; - lv1 = (lv1 >> 8) | lv1; - lv2 = lv2 & 0xFF00FF00; - lv2 = (lv2 >> 8) | lv2; -#else - lv1 = lv1 & 0x00FF00FF; - lv1 = (lv1 << 8) | lv1; - lv2 = lv2 & 0x00FF00FF; - lv2 = (lv2 << 8) | lv2; -#endif - } + zoom_fac = mode >= 3; + error = decode_cell_data(cell, block, ref_block, plane->pitch, 0, zoom_fac, + mode, delta, swap_quads, &data_ptr, last_ptr); + break; + case 10: /*-------------------- MODE 10 (8x8 block processing) ---------------------*/ + case 11: /*----------------- MODE 11 (4x8 INTER block processing) ------------------*/ + if (mode == 10 && !cell->mv_ptr) { /* MODE 10 INTRA processing */ + error = decode_cell_data(cell, block, ref_block, plane->pitch, 1, 1, + mode, delta, swap_quads, &data_ptr, last_ptr); + } else { /* mode 10 and 11 INTER processing */ + if (mode == 11 && !cell->mv_ptr) { + av_log(avctx, AV_LOG_ERROR, "Attempt to use Mode 11 for an INTRA cell!\n"); + return AVERROR_INVALIDDATA; + } - switch(correction_type_sp[lp2 & 0x01][k]) { - case 0: - cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1); - cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(lv2) >> 1) + correctionhighorder_lp[lp2 & 0x01][k]) << 1); - if(lp2 > 0 || strip->ypos != 0 || flag1 == 0) { - cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; - cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE; - } else { - cur_lp[0] = cur_lp[width_tbl[1]]; - cur_lp[1] = cur_lp[width_tbl[1]+1]; - } - lp2++; - break; - - case 1: - cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][*buf1]) << 1); - cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(lv2) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1); - if(lp2 > 0 || strip->ypos != 0 || flag1 == 0) { - cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; - cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE; - } else { - cur_lp[0] = cur_lp[width_tbl[1]]; - cur_lp[1] = cur_lp[width_tbl[1]+1]; - } - buf1++; - lp2++; - break; - - case 2: - if(lp2 == 0) { - if(flag1 != 0) { - for(i = 0, j = width_tbl[1]; i < 3; i++, j += width_tbl[1]) { - cur_lp[j] = lv1; - cur_lp[j+1] = lv2; - } - cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; - cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE; - } else { - for(i = 0, j = 0; i < 4; i++, j += width_tbl[1]) { - cur_lp[j] = lv1; - cur_lp[j+1] = lv2; - } - } - lp2 += 2; - } - break; - - case 3: - if(lp2 < 2) { - if(lp2 == 0 && flag1 != 0) { - for(i = 0, j = width_tbl[1]; i < 5; i++, j += width_tbl[1]) { - cur_lp[j] = lv1; - cur_lp[j+1] = lv2; - } - cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; - cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE; - } else { - for(i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1]) { - cur_lp[j] = lv1; - cur_lp[j+1] = lv2; - } - } - lp2 = 3; - } - break; - - case 8: - if(lp2 == 0) { - RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3) - if(rle_v1 == 1) { - if(flag1 != 0) { - for(i = 0, j = width_tbl[1]; i < 7; i++, j += width_tbl[1]) { - cur_lp[j] = lv1; - cur_lp[j+1] = lv2; - } - cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; - cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE; - } else { - for(i = 0, j = 0; i < 8; i++, j += width_tbl[1]) { - cur_lp[j] = lv1; - cur_lp[j+1] = lv2; - } - } - } - RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2) - break; - } else { - rle_v1 = 1; - rle_v2 = (*buf1) - 1; - } - case 5: - LP2_CHECK(buf1,rle_v3,lp2) - case 4: - if(lp2 == 0 && flag1 != 0) { - for(i = 0, j = width_tbl[1]; i < 7; i++, j += width_tbl[1]) { - cur_lp[j] = lv1; - cur_lp[j+1] = lv2; - } - cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE; - cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE; - } else { - for(i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1]) { - cur_lp[j] = lv1; - cur_lp[j+1] = lv2; - } - } - lp2 = 4; - break; - - case 6: - lp2 = 4; - break; - - case 7: - if(lp2 == 0) { - if(rle_v3 != 0) - rle_v3 = 0; - else { - buf1--; - rle_v3 = 1; - } - lp2 = 4; - } - break; - - case 9: - av_log(s->avctx, AV_LOG_ERROR, "UNTESTED.\n"); - lv1 = *buf1; - lv = (lv1 & 0x7F) << 1; - lv += (lv << 8); - lv += (lv << 16); - for(i = 0, j = 0; i < 8; i++, j += width_tbl[1]) - cur_lp[j] = lv; - LV1_CHECK(buf1,rle_v3,lv1,lp2) - break; + zoom_fac = mode == 10; + error = decode_cell_data(cell, block, ref_block, plane->pitch, + zoom_fac, 1, mode, delta, swap_quads, + &data_ptr, last_ptr); + } + break; + default: + av_log(avctx, AV_LOG_ERROR, "Unsupported coding mode: %d\n", mode); + return AVERROR_INVALIDDATA; + }//switch mode + + switch (error) { + case IV3_BAD_RLE: + av_log(avctx, AV_LOG_ERROR, "Mode %d: RLE code %X is not allowed at the current line\n", + mode, data_ptr[-1]); + return AVERROR_INVALIDDATA; + case IV3_BAD_DATA: + av_log(avctx, AV_LOG_ERROR, "Mode %d: invalid VQ data\n", mode); + return AVERROR_INVALIDDATA; + case IV3_BAD_COUNTER: + av_log(avctx, AV_LOG_ERROR, "Mode %d: RLE-FB invalid counter: %d\n", mode, code); + return AVERROR_INVALIDDATA; + case IV3_UNSUPPORTED: + av_log(avctx, AV_LOG_ERROR, "Mode %d: unsupported RLE code: %X\n", mode, data_ptr[-1]); + return AVERROR_INVALIDDATA; + case IV3_OUT_OF_DATA: + av_log(avctx, AV_LOG_ERROR, "Mode %d: attempt to read past end of buffer\n", mode); + return AVERROR_INVALIDDATA; + } - default: - return; - } - } + return data_ptr - data_start; /* report number of bytes consumed from the input buffer */ +} - cur_frm_pos += 8; - } - cur_frm_pos += (((width * 2) - blks_width) * 4); - flag1 = 0; - } - } else { - for( ; blks_height > 0; blks_height -= 8) { - for(lp1 = 0; lp1 < blks_width; lp1 += 2) { - for(lp2 = 0; lp2 < 4; ) { - k = *buf1++; - cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2]; - ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2 * 2]; - - switch(correction_type_sp[lp2 & 0x01][k]) { - case 0: - lv1 = correctionloworder_lp[lp2 & 0x01][k]; - lv2 = correctionhighorder_lp[lp2 & 0x01][k]; - cur_lp[0] = av_le2ne32(((av_le2ne32(ref_lp[0]) >> 1) + lv1) << 1); - cur_lp[1] = av_le2ne32(((av_le2ne32(ref_lp[1]) >> 1) + lv2) << 1); - cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1); - cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1); - lp2++; - break; - - case 1: - lv1 = correctionloworder_lp[lp2 & 0x01][*buf1++]; - lv2 = correctionloworder_lp[lp2 & 0x01][k]; - cur_lp[0] = av_le2ne32(((av_le2ne32(ref_lp[0]) >> 1) + lv1) << 1); - cur_lp[1] = av_le2ne32(((av_le2ne32(ref_lp[1]) >> 1) + lv2) << 1); - cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1); - cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1); - lp2++; - break; - - case 2: - if(lp2 == 0) { - for(i = 0, j = 0; i < 4; i++, j += width_tbl[1]) { - cur_lp[j] = ref_lp[j]; - cur_lp[j+1] = ref_lp[j+1]; - } - lp2 += 2; - } - break; - - case 3: - if(lp2 < 2) { - for(i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1]) { - cur_lp[j] = ref_lp[j]; - cur_lp[j+1] = ref_lp[j+1]; - } - lp2 = 3; - } - break; - - case 8: - if(lp2 == 0) { - RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3) - for(i = 0, j = 0; i < 8; i++, j += width_tbl[1]) { - ((uint32_t *)cur_frm_pos)[j] = ((uint32_t *)ref_frm_pos)[j]; - ((uint32_t *)cur_frm_pos)[j+1] = ((uint32_t *)ref_frm_pos)[j+1]; - } - RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2) - break; - } else { - rle_v1 = 1; - rle_v2 = (*buf1) - 1; - } - case 5: - case 7: - LP2_CHECK(buf1,rle_v3,lp2) - case 6: - case 4: - for(i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1]) { - cur_lp[j] = ref_lp[j]; - cur_lp[j+1] = ref_lp[j+1]; - } - lp2 = 4; - break; - - case 9: - av_log(s->avctx, AV_LOG_ERROR, "UNTESTED.\n"); - lv1 = *buf1; - lv = (lv1 & 0x7F) << 1; - lv += (lv << 8); - lv += (lv << 16); - for(i = 0, j = 0; i < 8; i++, j += width_tbl[1]) - ((uint32_t *)cur_frm_pos)[j] = ((uint32_t *)cur_frm_pos)[j+1] = lv; - LV1_CHECK(buf1,rle_v3,lv1,lp2) - break; +/* Binary tree codes. */ +enum { + H_SPLIT = 0, + V_SPLIT = 1, + INTRA_NULL = 2, + INTER_DATA = 3 +}; - default: - return; - } - } - cur_frm_pos += 8; - ref_frm_pos += 8; - } +#define SPLIT_CELL(size, new_size) (new_size) = ((size) > 2) ? ((((size) + 2) >> 2) << 1) : 1 - cur_frm_pos += (((width * 2) - blks_width) * 4); - ref_frm_pos += (((width * 2) - blks_width) * 4); - } - } - break; +#define UPDATE_BITPOS(n) \ + ctx->skip_bits += (n); \ + ctx->need_resync = 1 + +#define RESYNC_BITSTREAM \ + if (ctx->need_resync && !(get_bits_count(&ctx->gb) & 7)) { \ + skip_bits_long(&ctx->gb, ctx->skip_bits); \ + ctx->skip_bits = 0; \ + ctx->need_resync = 0; \ + } - case 11: /********** CASE 11 **********/ - if(ref_vectors == NULL) - return; - - for( ; blks_height > 0; blks_height -= 8) { - for(lp1 = 0; lp1 < blks_width; lp1++) { - for(lp2 = 0; lp2 < 4; ) { - k = *buf1++; - cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2]; - ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2 * 2]; - - switch(correction_type_sp[lp2 & 0x01][k]) { - case 0: - cur_lp[0] = av_le2ne32(((av_le2ne32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); - cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1); - lp2++; - break; - - case 1: - lv1 = (unsigned short)(correction_lp[lp2 & 0x01][*buf1++]); - lv2 = (unsigned short)(correction_lp[lp2 & 0x01][k]); - res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[0]) >> 1) + lv1) << 1); - ((unsigned short *)cur_lp)[0] = av_le2ne16(res); - res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[1]) >> 1) + lv2) << 1); - ((unsigned short *)cur_lp)[1] = av_le2ne16(res); - res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[width_tbl[2]]) >> 1) + lv1) << 1); - ((unsigned short *)cur_lp)[width_tbl[2]] = av_le2ne16(res); - res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[width_tbl[2]+1]) >> 1) + lv2) << 1); - ((unsigned short *)cur_lp)[width_tbl[2]+1] = av_le2ne16(res); - lp2++; - break; - - case 2: - if(lp2 == 0) { - for(i = 0, j = 0; i < 4; i++, j += width_tbl[1]) - cur_lp[j] = ref_lp[j]; - lp2 += 2; - } - break; +#define CHECK_CELL \ + if (curr_cell.xpos + curr_cell.width > (plane->width >> 2) || \ + curr_cell.ypos + curr_cell.height > (plane->height >> 2)) { \ + av_log(avctx, AV_LOG_ERROR, "Invalid cell: x=%d, y=%d, w=%d, h=%d\n", \ + curr_cell.xpos, curr_cell.ypos, curr_cell.width, curr_cell.height); \ + return AVERROR_INVALIDDATA; \ + } - case 3: - if(lp2 < 2) { - for(i = 0, j = 0; i < 6 - (lp2 * 2); i++, j += width_tbl[1]) - cur_lp[j] = ref_lp[j]; - lp2 = 3; - } - break; - case 8: - if(lp2 == 0) { - RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3) - - for(i = 0, j = 0; i < 8; i++, j += width_tbl[1]) - cur_lp[j] = ref_lp[j]; - - RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2) - break; - } else { - rle_v1 = 1; - rle_v2 = (*buf1) - 1; - } - case 5: - case 7: - LP2_CHECK(buf1,rle_v3,lp2) - case 4: - case 6: - for(i = 0, j = 0; i < 8 - (lp2 * 2); i++, j += width_tbl[1]) - cur_lp[j] = ref_lp[j]; - lp2 = 4; - break; - - case 9: - av_log(s->avctx, AV_LOG_ERROR, "UNTESTED.\n"); - lv1 = *buf1++; - lv = (lv1 & 0x7F) << 1; - lv += (lv << 8); - lv += (lv << 16); - for(i = 0, j = 0; i < 4; i++, j += width_tbl[1]) - cur_lp[j] = lv; - LV1_CHECK(buf1,rle_v3,lv1,lp2) - break; +static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx, + Plane *plane, int code, Cell *ref_cell, + const int depth, const int strip_width) +{ + Cell curr_cell; + int bytes_used; - default: - return; - } - } + if (depth <= 0) { + av_log(avctx, AV_LOG_ERROR, "Stack overflow (corrupted binary tree)!\n"); + return AVERROR_INVALIDDATA; // unwind recursion + } - cur_frm_pos += 4; - ref_frm_pos += 4; - } + curr_cell = *ref_cell; // clone parent cell + if (code == H_SPLIT) { + SPLIT_CELL(ref_cell->height, curr_cell.height); + ref_cell->ypos += curr_cell.height; + ref_cell->height -= curr_cell.height; + } else if (code == V_SPLIT) { + if (curr_cell.width > strip_width) { + /* split strip */ + curr_cell.width = (curr_cell.width <= (strip_width << 1) ? 1 : 2) * strip_width; + } else + SPLIT_CELL(ref_cell->width, curr_cell.width); + ref_cell->xpos += curr_cell.width; + ref_cell->width -= curr_cell.width; + } - cur_frm_pos += (((width * 2) - blks_width) * 4); - ref_frm_pos += (((width * 2) - blks_width) * 4); + while (1) { /* loop until return */ + RESYNC_BITSTREAM; + switch (code = get_bits(&ctx->gb, 2)) { + case H_SPLIT: + case V_SPLIT: + if (parse_bintree(ctx, avctx, plane, code, &curr_cell, depth - 1, strip_width)) + return AVERROR_INVALIDDATA; + break; + case INTRA_NULL: + if (!curr_cell.tree) { /* MC tree INTRA code */ + curr_cell.mv_ptr = 0; /* mark the current strip as INTRA */ + curr_cell.tree = 1; /* enter the VQ tree */ + } else { /* VQ tree NULL code */ + RESYNC_BITSTREAM; + code = get_bits(&ctx->gb, 2); + if (code >= 2) { + av_log(avctx, AV_LOG_ERROR, "Invalid VQ_NULL code: %d\n", code); + return AVERROR_INVALIDDATA; } - break; + if (code == 1) + av_log(avctx, AV_LOG_ERROR, "SkipCell procedure not implemented yet!\n"); - default: - return; + CHECK_CELL + if (!curr_cell.mv_ptr) + return AVERROR_INVALIDDATA; + copy_cell(ctx, plane, &curr_cell); + return 0; } - } - - for( ; strip >= strip_tbl; strip--) { - if(strip->split_flag != 0) { - strip->split_flag = 0; - strip->usl7 = (strip-1)->usl7; - - if(strip->split_direction) { - strip->xpos += strip->width; - strip->width = (strip-1)->width - strip->width; - if(region_160_width <= strip->xpos && width < strip->width + strip->xpos) - strip->width = width - strip->xpos; - } else { - strip->ypos += strip->height; - strip->height = (strip-1)->height - strip->height; + break; + case INTER_DATA: + if (!curr_cell.tree) { /* MC tree INTER code */ + unsigned mv_idx; + /* get motion vector index and setup the pointer to the mv set */ + if (!ctx->need_resync) + ctx->next_cell_data = &ctx->gb.buffer[(get_bits_count(&ctx->gb) + 7) >> 3]; + mv_idx = *(ctx->next_cell_data++) << 1; + if (mv_idx >= ctx->num_vectors) { + av_log(avctx, AV_LOG_ERROR, "motion vector index out of range\n"); + return AVERROR_INVALIDDATA; } - break; + curr_cell.mv_ptr = &ctx->mc_vectors[mv_idx]; + curr_cell.tree = 1; /* enter the VQ tree */ + UPDATE_BITPOS(8); + } else { /* VQ tree DATA code */ + if (!ctx->need_resync) + ctx->next_cell_data = &ctx->gb.buffer[(get_bits_count(&ctx->gb) + 7) >> 3]; + + CHECK_CELL + bytes_used = decode_cell(ctx, avctx, plane, &curr_cell, + ctx->next_cell_data, ctx->last_byte); + if (bytes_used < 0) + return AVERROR_INVALIDDATA; + + UPDATE_BITPOS(bytes_used << 3); + ctx->next_cell_data += bytes_used; + return 0; } + break; } - } + }//while + + return 0; } -static av_cold int indeo3_decode_init(AVCodecContext *avctx) + +static int decode_plane(Indeo3DecodeContext *ctx, AVCodecContext *avctx, + Plane *plane, const uint8_t *data, int32_t data_size, + int32_t strip_width) { - Indeo3DecodeContext *s = avctx->priv_data; - int ret = 0; + Cell curr_cell; + unsigned num_vectors; - s->avctx = avctx; - s->width = avctx->width; - s->height = avctx->height; - avctx->pix_fmt = PIX_FMT_YUV410P; + /* each plane data starts with mc_vector_count field, */ + /* an optional array of motion vectors followed by the vq data */ + num_vectors = bytestream_get_le32(&data); + if (num_vectors > 256) { + av_log(ctx->avctx, AV_LOG_ERROR, + "Read invalid number of motion vectors %d\n", num_vectors); + return AVERROR_INVALIDDATA; + } + if (num_vectors * 2 >= data_size) + return AVERROR_INVALIDDATA; + + ctx->num_vectors = num_vectors; + ctx->mc_vectors = num_vectors ? data : 0; - if (!(ret = build_modpred(s))) - ret = iv_alloc_frames(s); - if (ret) - iv_free_func(s); + /* init the bitreader */ + init_get_bits(&ctx->gb, &data[num_vectors * 2], (data_size - num_vectors * 2) << 3); + ctx->skip_bits = 0; + ctx->need_resync = 0; + + ctx->last_byte = data + data_size - 1; + + /* initialize the 1st cell and set its dimensions to whole plane */ + curr_cell.xpos = curr_cell.ypos = 0; + curr_cell.width = plane->width >> 2; + curr_cell.height = plane->height >> 2; + curr_cell.tree = 0; // we are in the MC tree now + curr_cell.mv_ptr = 0; // no motion vector = INTRA cell - return ret; + return parse_bintree(ctx, avctx, plane, INTRA_NULL, &curr_cell, CELL_STACK_MAX, strip_width); } -static int iv_decode_frame(AVCodecContext *avctx, - const uint8_t *buf, int buf_size) + +#define OS_HDR_ID MKBETAG('F', 'R', 'M', 'H') + +static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, + const uint8_t *buf, int buf_size) { - Indeo3DecodeContext *s = avctx->priv_data; - unsigned int image_width, image_height, - chroma_width, chroma_height; - unsigned int flags, cb_offset, data_size, - y_offset, v_offset, u_offset, mc_vector_count; - const uint8_t *hdr_pos, *buf_pos; - - buf_pos = buf; - buf_pos += 18; /* skip OS header (16 bytes) and version number */ - - flags = bytestream_get_le16(&buf_pos); - data_size = bytestream_get_le32(&buf_pos); - cb_offset = *buf_pos++; - buf_pos += 3; /* skip reserved byte and checksum */ - image_height = bytestream_get_le16(&buf_pos); - image_width = bytestream_get_le16(&buf_pos); - - if(av_image_check_size(image_width, image_height, 0, avctx)) - return -1; - if (image_width != avctx->width || image_height != avctx->height) { - int ret; - avcodec_set_dimensions(avctx, image_width, image_height); - s->width = avctx->width; - s->height = avctx->height; - ret = iv_alloc_frames(s); - if (ret < 0) { - s->width = s->height = 0; - return ret; - } + const uint8_t *buf_ptr = buf, *bs_hdr; + uint32_t frame_num, word2, check_sum, data_size; + uint32_t y_offset, u_offset, v_offset, starts[3], ends[3]; + uint16_t height, width; + int i, j; + + /* parse and check the OS header */ + frame_num = bytestream_get_le32(&buf_ptr); + word2 = bytestream_get_le32(&buf_ptr); + check_sum = bytestream_get_le32(&buf_ptr); + data_size = bytestream_get_le32(&buf_ptr); + + if ((frame_num ^ word2 ^ data_size ^ OS_HDR_ID) != check_sum) { + av_log(avctx, AV_LOG_ERROR, "OS header checksum mismatch!\n"); + return AVERROR_INVALIDDATA; } - chroma_height = ((image_height >> 2) + 3) & 0x7ffc; - chroma_width = ((image_width >> 2) + 3) & 0x7ffc; - y_offset = bytestream_get_le32(&buf_pos); - v_offset = bytestream_get_le32(&buf_pos); - u_offset = bytestream_get_le32(&buf_pos); - buf_pos += 4; /* reserved */ - hdr_pos = buf_pos; - if(data_size == 0x80) return 4; - - if(FFMAX3(y_offset, v_offset, u_offset) >= buf_size-16) { - av_log(s->avctx, AV_LOG_ERROR, "y/u/v offset outside buffer\n"); - return -1; - } - - if(flags & 0x200) { - s->cur_frame = s->iv_frame + 1; - s->ref_frame = s->iv_frame; - } else { - s->cur_frame = s->iv_frame; - s->ref_frame = s->iv_frame + 1; + /* parse the bitstream header */ + bs_hdr = buf_ptr; + + if (bytestream_get_le16(&buf_ptr) != 32) { + av_log(avctx, AV_LOG_ERROR, "Unsupported codec version!\n"); + return AVERROR_INVALIDDATA; + } + + ctx->frame_num = frame_num; + ctx->frame_flags = bytestream_get_le16(&buf_ptr); + ctx->data_size = (bytestream_get_le32(&buf_ptr) + 7) >> 3; + ctx->cb_offset = *buf_ptr++; + + if (ctx->data_size == 16) + return 4; + if (ctx->data_size > buf_size) + ctx->data_size = buf_size; + + buf_ptr += 3; // skip reserved byte and checksum + + /* check frame dimensions */ + height = bytestream_get_le16(&buf_ptr); + width = bytestream_get_le16(&buf_ptr); + if (av_image_check_size(width, height, 0, avctx)) + return AVERROR_INVALIDDATA; + + if (width != ctx->width || height != ctx->height) { + av_dlog(avctx, "Frame dimensions changed!\n"); + + ctx->width = width; + ctx->height = height; + + free_frame_buffers(ctx); + allocate_frame_buffers(ctx, avctx); + avcodec_set_dimensions(avctx, width, height); + } + + y_offset = bytestream_get_le32(&buf_ptr); + v_offset = bytestream_get_le32(&buf_ptr); + u_offset = bytestream_get_le32(&buf_ptr); + + /* unfortunately there is no common order of planes in the buffer */ + /* so we use that sorting algo for determining planes data sizes */ + starts[0] = y_offset; + starts[1] = v_offset; + starts[2] = u_offset; + + for (j = 0; j < 3; j++) { + ends[j] = ctx->data_size; + for (i = 2; i >= 0; i--) + if (starts[i] < ends[j] && starts[i] > starts[j]) + ends[j] = starts[i]; } - buf_pos = buf + 16 + y_offset; - mc_vector_count = bytestream_get_le32(&buf_pos); - if(2LL*mc_vector_count >= buf_size-16-y_offset) { - av_log(s->avctx, AV_LOG_ERROR, "mc_vector_count too large\n"); - return -1; + ctx->y_data_size = ends[0] - starts[0]; + ctx->v_data_size = ends[1] - starts[1]; + ctx->u_data_size = ends[2] - starts[2]; + if (FFMAX3(y_offset, v_offset, u_offset) >= ctx->data_size - 16 || + FFMIN3(ctx->y_data_size, ctx->v_data_size, ctx->u_data_size) <= 0) { + av_log(avctx, AV_LOG_ERROR, "One of the y/u/v offsets is invalid\n"); + return AVERROR_INVALIDDATA; } - iv_Decode_Chunk(s, s->cur_frame->Ybuf, s->ref_frame->Ybuf, image_width, - image_height, buf_pos + mc_vector_count * 2, cb_offset, hdr_pos, buf_pos, - FFMIN(image_width, 160)); + ctx->y_data_ptr = bs_hdr + y_offset; + ctx->v_data_ptr = bs_hdr + v_offset; + ctx->u_data_ptr = bs_hdr + u_offset; + ctx->alt_quant = buf_ptr + sizeof(uint32_t); + + if (ctx->data_size == 16) { + av_log(avctx, AV_LOG_DEBUG, "Sync frame encountered!\n"); + return 16; + } - if (!(s->avctx->flags & CODEC_FLAG_GRAY)) - { + if (ctx->frame_flags & BS_8BIT_PEL) { + av_log_ask_for_sample(avctx, "8-bit pixel format\n"); + return AVERROR_PATCHWELCOME; + } + + if (ctx->frame_flags & BS_MV_X_HALF || ctx->frame_flags & BS_MV_Y_HALF) { + av_log_ask_for_sample(avctx, "halfpel motion vectors\n"); + return AVERROR_PATCHWELCOME; + } + + return 0; +} - buf_pos = buf + 16 + v_offset; - mc_vector_count = bytestream_get_le32(&buf_pos); - if(2LL*mc_vector_count >= buf_size-16-v_offset) { - av_log(s->avctx, AV_LOG_ERROR, "mc_vector_count too large\n"); - return -1; - } - iv_Decode_Chunk(s, s->cur_frame->Vbuf, s->ref_frame->Vbuf, chroma_width, - chroma_height, buf_pos + mc_vector_count * 2, cb_offset, hdr_pos, buf_pos, - FFMIN(chroma_width, 40)); - - buf_pos = buf + 16 + u_offset; - mc_vector_count = bytestream_get_le32(&buf_pos); - if(2LL*mc_vector_count >= buf_size-16-u_offset) { - av_log(s->avctx, AV_LOG_ERROR, "mc_vector_count too large\n"); - return -1; +/** + * Convert and output the current plane. + * All pixel values will be upsampled by shifting right by one bit. + * + * @param[in] plane pointer to the descriptor of the plane being processed + * @param[in] buf_sel indicates which frame buffer the input data stored in + * @param[out] dst pointer to the buffer receiving converted pixels + * @param[in] dst_pitch pitch for moving to the next y line + */ +static void output_plane(const Plane *plane, int buf_sel, uint8_t *dst, int dst_pitch) +{ + int x,y; + const uint8_t *src = plane->pixels[buf_sel]; + uint32_t pitch = plane->pitch; + + for (y = 0; y < plane->height; y++) { + /* convert four pixels at once using SWAR */ + for (x = 0; x < plane->width >> 2; x++) { + AV_WN32A(dst, (AV_RN32A(src) & 0x7F7F7F7F) << 1); + src += 4; + dst += 4; } - iv_Decode_Chunk(s, s->cur_frame->Ubuf, s->ref_frame->Ubuf, chroma_width, - chroma_height, buf_pos + mc_vector_count * 2, cb_offset, hdr_pos, buf_pos, - FFMIN(chroma_width, 40)); + for (x <<= 2; x < plane->width; x++) + *dst++ = *src++ << 1; + src += pitch - plane->width; + dst += dst_pitch - plane->width; } +} + + +static av_cold int decode_init(AVCodecContext *avctx) +{ + Indeo3DecodeContext *ctx = avctx->priv_data; + + ctx->avctx = avctx; + ctx->width = avctx->width; + ctx->height = avctx->height; + avctx->pix_fmt = PIX_FMT_YUV410P; + + build_requant_tab(); + + dsputil_init(&ctx->dsp, avctx); - return 8; + allocate_frame_buffers(ctx, avctx); + + return 0; } -static int indeo3_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) + +static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, + AVPacket *avpkt) { + Indeo3DecodeContext *ctx = avctx->priv_data; const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; - Indeo3DecodeContext *s=avctx->priv_data; - uint8_t *src, *dest; - int y; - - if (iv_decode_frame(avctx, buf, buf_size) < 0) - return -1; - - if(s->frame.data[0]) - avctx->release_buffer(avctx, &s->frame); - - s->frame.reference = 0; - if(avctx->get_buffer(avctx, &s->frame) < 0) { - av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n"); - return -1; - } - - src = s->cur_frame->Ybuf; - dest = s->frame.data[0]; - for (y = 0; y < s->height; y++) { - memcpy(dest, src, s->cur_frame->y_w); - src += s->cur_frame->y_w; - dest += s->frame.linesize[0]; - } - - if (!(s->avctx->flags & CODEC_FLAG_GRAY)) - { - src = s->cur_frame->Ubuf; - dest = s->frame.data[1]; - for (y = 0; y < s->height / 4; y++) { - memcpy(dest, src, s->cur_frame->uv_w); - src += s->cur_frame->uv_w; - dest += s->frame.linesize[1]; - } + int buf_size = avpkt->size; + int res; - src = s->cur_frame->Vbuf; - dest = s->frame.data[2]; - for (y = 0; y < s->height / 4; y++) { - memcpy(dest, src, s->cur_frame->uv_w); - src += s->cur_frame->uv_w; - dest += s->frame.linesize[2]; - } + res = decode_frame_headers(ctx, avctx, buf, buf_size); + if (res < 0) + return res; + + /* skip sync(null) frames */ + if (res) { + // we have processed 16 bytes but no data was decoded + *data_size = 0; + return buf_size; } - *data_size=sizeof(AVFrame); - *(AVFrame*)data= s->frame; + /* skip droppable INTER frames if requested */ + if (ctx->frame_flags & BS_NONREF && + (avctx->skip_frame >= AVDISCARD_NONREF)) + return 0; + + /* skip INTER frames if requested */ + if (!(ctx->frame_flags & BS_KEYFRAME) && avctx->skip_frame >= AVDISCARD_NONKEY) + return 0; + + /* use BS_BUFFER flag for buffer switching */ + ctx->buf_sel = (ctx->frame_flags >> BS_BUFFER) & 1; + + /* decode luma plane */ + if ((res = decode_plane(ctx, avctx, ctx->planes, ctx->y_data_ptr, ctx->y_data_size, 40))) + return res; + + /* decode chroma planes */ + if ((res = decode_plane(ctx, avctx, &ctx->planes[1], ctx->u_data_ptr, ctx->u_data_size, 10))) + return res; + + if ((res = decode_plane(ctx, avctx, &ctx->planes[2], ctx->v_data_ptr, ctx->v_data_size, 10))) + return res; + + if (ctx->frame.data[0]) + avctx->release_buffer(avctx, &ctx->frame); + + ctx->frame.reference = 0; + if ((res = avctx->get_buffer(avctx, &ctx->frame)) < 0) { + av_log(ctx->avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return res; + } + + output_plane(&ctx->planes[0], ctx->buf_sel, ctx->frame.data[0], ctx->frame.linesize[0]); + output_plane(&ctx->planes[1], ctx->buf_sel, ctx->frame.data[1], ctx->frame.linesize[1]); + output_plane(&ctx->planes[2], ctx->buf_sel, ctx->frame.data[2], ctx->frame.linesize[2]); + + *data_size = sizeof(AVFrame); + *(AVFrame*)data = ctx->frame; return buf_size; } -static av_cold int indeo3_decode_end(AVCodecContext *avctx) + +static av_cold int decode_close(AVCodecContext *avctx) { - Indeo3DecodeContext *s = avctx->priv_data; + Indeo3DecodeContext *ctx = avctx->priv_data; + + free_frame_buffers(avctx->priv_data); - iv_free_func(s); + if (ctx->frame.data[0]) + avctx->release_buffer(avctx, &ctx->frame); return 0; } AVCodec ff_indeo3_decoder = { - "indeo3", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_INDEO3, - sizeof(Indeo3DecodeContext), - indeo3_decode_init, - NULL, - indeo3_decode_end, - indeo3_decode_frame, - CODEC_CAP_DR1, - NULL, - .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"), + .name = "indeo3", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_INDEO3, + .priv_data_size = sizeof(Indeo3DecodeContext), + .init = decode_init, + .close = decode_close, + .decode = decode_frame, + .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo3data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo3data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo3data.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo3data.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Intel Indeo 3 (IV31, IV32, etc.) video decoder for ffmpeg - * written, produced, and directed by Alan Smithee + * Indeo Video v3 compatible decoder + * Copyright (c) 2009 - 2011 Maxim Poliakovski * * This file is part of Libav. * @@ -24,2319 +24,339 @@ #include -static const uint32_t correction[] = { - 0x00000000, 0x00000202, 0xfffffdfe, 0x000002ff, 0xfffffd01, 0xffffff03, 0x000000fd, 0x00000404, - 0xfffffbfc, 0x00000501, 0xfffffaff, 0x00000105, 0xfffffefb, 0x000003fc, 0xfffffc04, 0x000005fe, - 0xfffffa02, 0xfffffe06, 0x000001fa, 0x00000904, 0xfffff6fc, 0x00000409, 0xfffffbf7, 0x00000909, - 0xfffff6f7, 0x00000a01, 0xfffff5ff, 0x0000010a, 0xfffffef6, 0x000007fb, 0xfffff805, 0xfffffb08, - 0x000004f8, 0x00000f09, 0xfffff0f7, 0x0000090f, 0xfffff6f1, 0x00000bfd, 0xfffff403, 0xfffffd0c, - 0x000002f4, 0x00001004, 0xffffeffc, 0x00000410, 0xfffffbf0, 0x00001010, 0xffffeff0, 0x00001200, - 0xffffee00, 0x00000012, 0xffffffee, 0x00000bf4, 0xfffff40c, 0x00000ff7, 0xfffff009, 0xfffff710, - 0x000008f0, 0x00001b0b, 0xffffe4f5, 0x00000b1b, 0xfffff4e5, 0x00001c13, 0xffffe3ed, 0x0000131c, - 0xffffece4, 0x000015fa, 0xffffea06, 0xfffffa16, 0x000005ea, 0x00001d04, 0xffffe2fc, 0x0000041d, - 0xfffffbe3, 0x00001e1e, 0xffffe1e2, 0x000020fe, 0xffffdf02, 0xfffffe21, 0x000001df, 0x000016ee, - 0xffffe912, 0xffffee17, 0x000011e9, 0x00001df1, 0xffffe20f, 0xfffff11e, 0x00000ee2, 0x00002e16, - 0xffffd1ea, 0x0000162e, 0xffffe9d2, 0x00002f0d, 0xffffd0f3, 0x00000d2f, 0xfffff2d1, 0x00003123, - 0xffffcedd, 0x00002331, 0xffffdccf, 0x000028f5, 0xffffd70b, 0xfffff529, 0x00000ad7, 0x00003304, - 0xffffccfc, 0x00000433, 0xfffffbcd, 0x00003636, 0xffffc9ca, 0x000021de, 0xffffde22, 0x000029e3, - 0xffffd61d, 0xffffe32a, 0x00001cd6, 0x00003bfa, 0xffffc406, 0xfffffa3c, 0x000005c4, 0x00004c1b, - 0xffffb3e5, 0x00001b4c, 0xffffe4b4, 0x00004d2b, 0xffffb2d5, 0x00002b4d, 0xffffd4b3, 0x000036e8, - 0xffffc918, 0xffffe837, 0x000017c9, 0x00004f0e, 0xffffb0f2, 0x00000e4f, 0xfffff1b1, 0x0000533f, - 0xffffacc1, 0x00003f53, 0xffffc0ad, 0x000049ec, 0xffffb614, 0xffffec4a, 0x000013b6, 0x00005802, - 0xffffa7fe, 0x00000258, 0xfffffda8, 0x00005d5d, 0xffffa2a3, 0x00003ccc, 0xffffc334, 0xffffcc3d, - 0x000033c3, 0x00007834, 0xffff87cc, 0x00003478, 0xffffcb88, 0x00004ad3, 0xffffb52d, 0xffffd34b, - 0x00002cb5, 0x00007d4b, 0xffff82b5, 0x00004b7d, 0xffffb483, 0x00007a21, 0xffff85df, 0x0000217a, - 0xffffde86, 0x000066f3, 0xffff990d, 0xfffff367, 0x00000c99, 0x00005fd8, 0xffffa028, 0xffffd860, - 0x000027a0, 0x00007ede, 0xffff8122, 0xffffde7f, 0x00002181, 0x000058a7, 0xffffa759, 0x000068b2, - 0xffff974e, 0xffffb269, 0x00004d97, 0x00000c0c, 0xfffff3f4, 0x00001717, 0xffffe8e9, 0x00002a2a, - 0xffffd5d6, 0x00004949, 0xffffb6b7, 0x00000000, 0x02020000, 0xfdfe0000, 0x02ff0000, 0xfd010000, - 0xff030000, 0x00fd0000, 0x00000202, 0x02020202, 0xfdfe0202, 0x02ff0202, 0xfd010202, 0xff030202, - 0x00fd0202, 0xfffffdfe, 0x0201fdfe, 0xfdfdfdfe, 0x02fefdfe, 0xfd00fdfe, 0xff02fdfe, 0x00fcfdfe, - 0x000002ff, 0x020202ff, 0xfdfe02ff, 0x02ff02ff, 0xfd0102ff, 0xff0302ff, 0x00fd02ff, 0xfffffd01, - 0x0201fd01, 0xfdfdfd01, 0x02fefd01, 0xfd00fd01, 0xff02fd01, 0x00fcfd01, 0xffffff03, 0x0201ff03, - 0xfdfdff03, 0x02feff03, 0xfd00ff03, 0xff02ff03, 0x00fcff03, 0x000000fd, 0x020200fd, 0xfdfe00fd, - 0x02ff00fd, 0xfd0100fd, 0xff0300fd, 0x00fd00fd, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000303, 0xfffffcfd, 0x000003ff, 0xfffffc01, 0xffffff04, 0x000000fc, 0x00000707, - 0xfffff8f9, 0x00000802, 0xfffff7fe, 0x00000208, 0xfffffdf8, 0x000008fe, 0xfffff702, 0xfffffe09, - 0x000001f7, 0x000005fa, 0xfffffa06, 0x00000d06, 0xfffff2fa, 0x0000060d, 0xfffff9f3, 0x00000d0d, - 0xfffff2f3, 0x00000e01, 0xfffff1ff, 0x0000010e, 0xfffffef2, 0x00000bf8, 0xfffff408, 0xfffff80c, - 0x000007f4, 0x0000170e, 0xffffe8f2, 0x00000e17, 0xfffff1e9, 0x000011fb, 0xffffee05, 0xfffffb12, - 0x000004ee, 0x00001806, 0xffffe7fa, 0x00000618, 0xfffff9e8, 0x00001818, 0xffffe7e8, 0x00001aff, - 0xffffe501, 0xffffff1b, 0x000000e5, 0x000010ef, 0xffffef11, 0x000016f3, 0xffffe90d, 0xfffff317, - 0x00000ce9, 0x00002810, 0xffffd7f0, 0x00001028, 0xffffefd8, 0x0000291c, 0xffffd6e4, 0x00001c29, - 0xffffe3d7, 0x000020f7, 0xffffdf09, 0xfffff721, 0x000008df, 0x00002b06, 0xffffd4fa, 0x0000062b, - 0xfffff9d5, 0x00002e2e, 0xffffd1d2, 0x000031fc, 0xffffce04, 0xfffffc32, 0x000003ce, 0x000021e5, - 0xffffde1b, 0xffffe522, 0x00001ade, 0x00002cea, 0xffffd316, 0xffffea2d, 0x000015d3, 0x00004522, - 0xffffbade, 0x00002245, 0xffffddbb, 0x00004613, 0xffffb9ed, 0x00001346, 0xffffecba, 0x00004935, - 0xffffb6cb, 0x00003549, 0xffffcab7, 0x00003def, 0xffffc211, 0xffffef3e, 0x000010c2, 0x00004d05, - 0xffffb2fb, 0x0000054d, 0xfffffab3, 0x00005252, 0xffffadae, 0x000032cd, 0xffffcd33, 0x00003fd5, - 0xffffc02b, 0xffffd540, 0x00002ac0, 0x000059f6, 0xffffa60a, 0xfffff65a, 0x000009a6, 0x00007229, - 0xffff8dd7, 0x00002972, 0xffffd68e, 0x00007440, 0xffff8bc0, 0x00004074, 0xffffbf8c, 0x000051db, - 0xffffae25, 0xffffdb52, 0x000024ae, 0x00007716, 0xffff88ea, 0x00001677, 0xffffe989, 0x00007c5f, - 0xffff83a1, 0x00005f7c, 0xffffa084, 0x00006ee2, 0xffff911e, 0xffffe26f, 0x00001d91, 0x00005bb2, - 0xffffa44e, 0xffffb25c, 0x00004da4, 0x000070bc, 0xffff8f44, 0xffffbc71, 0x0000438f, 0x00001212, - 0xffffedee, 0x00002222, 0xffffddde, 0x00003f3f, 0xffffc0c1, 0x00006d6d, 0xffff9293, 0x00000000, - 0x03030000, 0xfcfd0000, 0x03ff0000, 0xfc010000, 0xff040000, 0x00fc0000, 0x07070000, 0xf8f90000, - 0x00000303, 0x03030303, 0xfcfd0303, 0x03ff0303, 0xfc010303, 0xff040303, 0x00fc0303, 0x07070303, - 0xf8f90303, 0xfffffcfd, 0x0302fcfd, 0xfcfcfcfd, 0x03fefcfd, 0xfc00fcfd, 0xff03fcfd, 0x00fbfcfd, - 0x0706fcfd, 0xf8f8fcfd, 0x000003ff, 0x030303ff, 0xfcfd03ff, 0x03ff03ff, 0xfc0103ff, 0xff0403ff, - 0x00fc03ff, 0x070703ff, 0xf8f903ff, 0xfffffc01, 0x0302fc01, 0xfcfcfc01, 0x03fefc01, 0xfc00fc01, - 0xff03fc01, 0x00fbfc01, 0x0706fc01, 0xf8f8fc01, 0xffffff04, 0x0302ff04, 0xfcfcff04, 0x03feff04, - 0xfc00ff04, 0xff03ff04, 0x00fbff04, 0x0706ff04, 0xf8f8ff04, 0x000000fc, 0x030300fc, 0xfcfd00fc, - 0x03ff00fc, 0xfc0100fc, 0xff0400fc, 0x00fc00fc, 0x070700fc, 0xf8f900fc, 0x00000707, 0x03030707, - 0xfcfd0707, 0x03ff0707, 0xfc010707, 0xff040707, 0x00fc0707, 0x07070707, 0xf8f90707, 0xfffff8f9, - 0x0302f8f9, 0xfcfcf8f9, 0x03fef8f9, 0xfc00f8f9, 0xff03f8f9, 0x00fbf8f9, 0x0706f8f9, 0xf8f8f8f9, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000404, 0xfffffbfc, 0x000004ff, 0xfffffb01, 0xffffff05, 0x000000fb, 0x00000a03, - 0xfffff5fd, 0x0000030a, 0xfffffcf6, 0x00000909, 0xfffff6f7, 0x000006f9, 0xfffff907, 0x00000bfd, - 0xfffff403, 0xfffffd0c, 0x000002f4, 0x00001108, 0xffffeef8, 0x00000811, 0xfffff7ef, 0x00001111, - 0xffffeeef, 0x00001301, 0xffffecff, 0x00000113, 0xfffffeed, 0x00000ff5, 0xfffff00b, 0xfffff510, - 0x00000af0, 0x000016fa, 0xffffe906, 0xfffffa17, 0x000005e9, 0x00001f12, 0xffffe0ee, 0x0000121f, - 0xffffede1, 0x00002008, 0xffffdff8, 0x00000820, 0xfffff7e0, 0x00002121, 0xffffdedf, 0x000023ff, - 0xffffdc01, 0xffffff24, 0x000000dc, 0x000016e9, 0xffffe917, 0x00001eef, 0xffffe111, 0xffffef1f, - 0x000010e1, 0x00003615, 0xffffc9eb, 0x00001536, 0xffffeaca, 0x00003725, 0xffffc8db, 0x00002537, - 0xffffdac9, 0x00002bf4, 0xffffd40c, 0xfffff42c, 0x00000bd4, 0x00003908, 0xffffc6f8, 0x00000839, - 0xfffff7c7, 0x00003d3d, 0xffffc2c3, 0x000041fb, 0xffffbe05, 0xfffffb42, 0x000004be, 0x00002cdc, - 0xffffd324, 0xffffdc2d, 0x000023d3, 0x00003be3, 0xffffc41d, 0xffffe33c, 0x00001cc4, 0x00005c2d, - 0xffffa3d3, 0x00002d5c, 0xffffd2a4, 0x00005d19, 0xffffa2e7, 0x0000195d, 0xffffe6a3, 0x00006147, - 0xffff9eb9, 0x00004761, 0xffffb89f, 0x000052ea, 0xffffad16, 0xffffea53, 0x000015ad, 0x00006607, - 0xffff99f9, 0x00000766, 0xfffff89a, 0x00006d6d, 0xffff9293, 0x000043bc, 0xffffbc44, 0x000054c7, - 0xffffab39, 0xffffc755, 0x000038ab, 0x000077f3, 0xffff880d, 0xfffff378, 0x00000c88, 0x00006dcf, - 0xffff9231, 0xffffcf6e, 0x00003092, 0x00007a98, 0xffff8568, 0xffff987b, 0x00006785, 0x00001818, - 0xffffe7e8, 0x00002e2e, 0xffffd1d2, 0x00005454, 0xffffabac, 0x00000000, 0x04040000, 0xfbfc0000, - 0x04ff0000, 0xfb010000, 0xff050000, 0x00fb0000, 0x0a030000, 0xf5fd0000, 0x030a0000, 0x00000404, - 0x04040404, 0xfbfc0404, 0x04ff0404, 0xfb010404, 0xff050404, 0x00fb0404, 0x0a030404, 0xf5fd0404, - 0x030a0404, 0xfffffbfc, 0x0403fbfc, 0xfbfbfbfc, 0x04fefbfc, 0xfb00fbfc, 0xff04fbfc, 0x00fafbfc, - 0x0a02fbfc, 0xf5fcfbfc, 0x0309fbfc, 0x000004ff, 0x040404ff, 0xfbfc04ff, 0x04ff04ff, 0xfb0104ff, - 0xff0504ff, 0x00fb04ff, 0x0a0304ff, 0xf5fd04ff, 0x030a04ff, 0xfffffb01, 0x0403fb01, 0xfbfbfb01, - 0x04fefb01, 0xfb00fb01, 0xff04fb01, 0x00fafb01, 0x0a02fb01, 0xf5fcfb01, 0x0309fb01, 0xffffff05, - 0x0403ff05, 0xfbfbff05, 0x04feff05, 0xfb00ff05, 0xff04ff05, 0x00faff05, 0x0a02ff05, 0xf5fcff05, - 0x0309ff05, 0x000000fb, 0x040400fb, 0xfbfc00fb, 0x04ff00fb, 0xfb0100fb, 0xff0500fb, 0x00fb00fb, - 0x0a0300fb, 0xf5fd00fb, 0x030a00fb, 0x00000a03, 0x04040a03, 0xfbfc0a03, 0x04ff0a03, 0xfb010a03, - 0xff050a03, 0x00fb0a03, 0x0a030a03, 0xf5fd0a03, 0x030a0a03, 0xfffff5fd, 0x0403f5fd, 0xfbfbf5fd, - 0x04fef5fd, 0xfb00f5fd, 0xff04f5fd, 0x00faf5fd, 0x0a02f5fd, 0xf5fcf5fd, 0x0309f5fd, 0x0000030a, - 0x0404030a, 0xfbfc030a, 0x04ff030a, 0xfb01030a, 0xff05030a, 0x00fb030a, 0x0a03030a, 0xf5fd030a, - 0x030a030a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000505, 0xfffffafb, 0x000006fe, 0xfffff902, 0xfffffe07, 0x000001f9, 0x00000b0b, - 0xfffff4f5, 0x00000d03, 0xfffff2fd, 0x0000030d, 0xfffffcf3, 0x000008f7, 0xfffff709, 0x00000efc, - 0xfffff104, 0xfffffc0f, 0x000003f1, 0x0000160b, 0xffffe9f5, 0x00000b16, 0xfffff4ea, 0x00001515, - 0xffffeaeb, 0x00001802, 0xffffe7fe, 0x00000218, 0xfffffde8, 0x000013f2, 0xffffec0e, 0xfffff214, - 0x00000dec, 0x00002617, 0xffffd9e9, 0x00001726, 0xffffe8da, 0x00001cf8, 0xffffe308, 0xfffff81d, - 0x000007e3, 0x0000270b, 0xffffd8f5, 0x00000b27, 0xfffff4d9, 0x00002929, 0xffffd6d7, 0x00002cff, - 0xffffd301, 0xffffff2d, 0x000000d3, 0x00001ce3, 0xffffe31d, 0x000026ea, 0xffffd916, 0xffffea27, - 0x000015d9, 0x0000431b, 0xffffbce5, 0x00001b43, 0xffffe4bd, 0x0000452f, 0xffffbad1, 0x00002f45, - 0xffffd0bb, 0x000037f1, 0xffffc80f, 0xfffff138, 0x00000ec8, 0x0000470b, 0xffffb8f5, 0x00000b47, - 0xfffff4b9, 0x00004c4c, 0xffffb3b4, 0x000052fa, 0xffffad06, 0xfffffa53, 0x000005ad, 0x000038d3, - 0xffffc72d, 0xffffd339, 0x00002cc7, 0x00004adc, 0xffffb524, 0xffffdc4b, 0x000023b5, 0x00007338, - 0xffff8cc8, 0x00003873, 0xffffc78d, 0x0000751f, 0xffff8ae1, 0x00001f75, 0xffffe08b, 0x00007a58, - 0xffff85a8, 0x0000587a, 0xffffa786, 0x000067e4, 0xffff981c, 0xffffe468, 0x00001b98, 0x000054ab, - 0xffffab55, 0x000069b8, 0xffff9648, 0xffffb86a, 0x00004796, 0x00001e1e, 0xffffe1e2, 0x00003a3a, - 0xffffc5c6, 0x00006969, 0xffff9697, 0x00000000, 0x05050000, 0xfafb0000, 0x06fe0000, 0xf9020000, - 0xfe070000, 0x01f90000, 0x0b0b0000, 0xf4f50000, 0x0d030000, 0xf2fd0000, 0x00000505, 0x05050505, - 0xfafb0505, 0x06fe0505, 0xf9020505, 0xfe070505, 0x01f90505, 0x0b0b0505, 0xf4f50505, 0x0d030505, - 0xf2fd0505, 0xfffffafb, 0x0504fafb, 0xfafafafb, 0x06fdfafb, 0xf901fafb, 0xfe06fafb, 0x01f8fafb, - 0x0b0afafb, 0xf4f4fafb, 0x0d02fafb, 0xf2fcfafb, 0x000006fe, 0x050506fe, 0xfafb06fe, 0x06fe06fe, - 0xf90206fe, 0xfe0706fe, 0x01f906fe, 0x0b0b06fe, 0xf4f506fe, 0x0d0306fe, 0xf2fd06fe, 0xfffff902, - 0x0504f902, 0xfafaf902, 0x06fdf902, 0xf901f902, 0xfe06f902, 0x01f8f902, 0x0b0af902, 0xf4f4f902, - 0x0d02f902, 0xf2fcf902, 0xfffffe07, 0x0504fe07, 0xfafafe07, 0x06fdfe07, 0xf901fe07, 0xfe06fe07, - 0x01f8fe07, 0x0b0afe07, 0xf4f4fe07, 0x0d02fe07, 0xf2fcfe07, 0x000001f9, 0x050501f9, 0xfafb01f9, - 0x06fe01f9, 0xf90201f9, 0xfe0701f9, 0x01f901f9, 0x0b0b01f9, 0xf4f501f9, 0x0d0301f9, 0xf2fd01f9, - 0x00000b0b, 0x05050b0b, 0xfafb0b0b, 0x06fe0b0b, 0xf9020b0b, 0xfe070b0b, 0x01f90b0b, 0x0b0b0b0b, - 0xf4f50b0b, 0x0d030b0b, 0xf2fd0b0b, 0xfffff4f5, 0x0504f4f5, 0xfafaf4f5, 0x06fdf4f5, 0xf901f4f5, - 0xfe06f4f5, 0x01f8f4f5, 0x0b0af4f5, 0xf4f4f4f5, 0x0d02f4f5, 0xf2fcf4f5, 0x00000d03, 0x05050d03, - 0xfafb0d03, 0x06fe0d03, 0xf9020d03, 0xfe070d03, 0x01f90d03, 0x0b0b0d03, 0xf4f50d03, 0x0d030d03, - 0xf2fd0d03, 0xfffff2fd, 0x0504f2fd, 0xfafaf2fd, 0x06fdf2fd, 0xf901f2fd, 0xfe06f2fd, 0x01f8f2fd, - 0x0b0af2fd, 0xf4f4f2fd, 0x0d02f2fd, 0xf2fcf2fd, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000606, 0xfffff9fa, 0x000007fe, 0xfffff802, 0xfffffe08, 0x000001f8, 0x00000d0d, - 0xfffff2f3, 0x00000f04, 0xfffff0fc, 0x0000040f, 0xfffffbf1, 0x00000af5, 0xfffff50b, 0x000011fb, - 0xffffee05, 0xfffffb12, 0x000004ee, 0x00001a0d, 0xffffe5f3, 0x00000d1a, 0xfffff2e6, 0x00001a1a, - 0xffffe5e6, 0x00001d02, 0xffffe2fe, 0x0000021d, 0xfffffde3, 0x000017f0, 0xffffe810, 0xfffff018, - 0x00000fe8, 0x00002e1c, 0xffffd1e4, 0x00001c2e, 0xffffe3d2, 0x000022f7, 0xffffdd09, 0xfffff723, - 0x000008dd, 0x00002f0d, 0xffffd0f3, 0x00000d2f, 0xfffff2d1, 0x00003131, 0xffffcecf, 0x000035ff, - 0xffffca01, 0xffffff36, 0x000000ca, 0x000022dd, 0xffffdd23, 0x00002ee6, 0xffffd11a, 0xffffe62f, - 0x000019d1, 0x00005120, 0xffffaee0, 0x00002051, 0xffffdfaf, 0x00005338, 0xffffacc8, 0x00003853, - 0xffffc7ad, 0x000042ee, 0xffffbd12, 0xffffee43, 0x000011bd, 0x0000560d, 0xffffa9f3, 0x00000d56, - 0xfffff2aa, 0x00005b5b, 0xffffa4a5, 0x000062f9, 0xffff9d07, 0xfffff963, 0x0000069d, 0x000043ca, - 0xffffbc36, 0xffffca44, 0x000035bc, 0x000059d4, 0xffffa62c, 0xffffd45a, 0x00002ba6, 0x00007bdf, - 0xffff8421, 0xffffdf7c, 0x00002084, 0x00006699, 0xffff9967, 0x00007eaa, 0xffff8156, 0xffffaa7f, - 0x00005581, 0x00002525, 0xffffdadb, 0x00004545, 0xffffbabb, 0x00000000, 0x06060000, 0xf9fa0000, - 0x07fe0000, 0xf8020000, 0xfe080000, 0x01f80000, 0x0d0d0000, 0xf2f30000, 0x0f040000, 0xf0fc0000, - 0x040f0000, 0x00000606, 0x06060606, 0xf9fa0606, 0x07fe0606, 0xf8020606, 0xfe080606, 0x01f80606, - 0x0d0d0606, 0xf2f30606, 0x0f040606, 0xf0fc0606, 0x040f0606, 0xfffff9fa, 0x0605f9fa, 0xf9f9f9fa, - 0x07fdf9fa, 0xf801f9fa, 0xfe07f9fa, 0x01f7f9fa, 0x0d0cf9fa, 0xf2f2f9fa, 0x0f03f9fa, 0xf0fbf9fa, - 0x040ef9fa, 0x000007fe, 0x060607fe, 0xf9fa07fe, 0x07fe07fe, 0xf80207fe, 0xfe0807fe, 0x01f807fe, - 0x0d0d07fe, 0xf2f307fe, 0x0f0407fe, 0xf0fc07fe, 0x040f07fe, 0xfffff802, 0x0605f802, 0xf9f9f802, - 0x07fdf802, 0xf801f802, 0xfe07f802, 0x01f7f802, 0x0d0cf802, 0xf2f2f802, 0x0f03f802, 0xf0fbf802, - 0x040ef802, 0xfffffe08, 0x0605fe08, 0xf9f9fe08, 0x07fdfe08, 0xf801fe08, 0xfe07fe08, 0x01f7fe08, - 0x0d0cfe08, 0xf2f2fe08, 0x0f03fe08, 0xf0fbfe08, 0x040efe08, 0x000001f8, 0x060601f8, 0xf9fa01f8, - 0x07fe01f8, 0xf80201f8, 0xfe0801f8, 0x01f801f8, 0x0d0d01f8, 0xf2f301f8, 0x0f0401f8, 0xf0fc01f8, - 0x040f01f8, 0x00000d0d, 0x06060d0d, 0xf9fa0d0d, 0x07fe0d0d, 0xf8020d0d, 0xfe080d0d, 0x01f80d0d, - 0x0d0d0d0d, 0xf2f30d0d, 0x0f040d0d, 0xf0fc0d0d, 0x040f0d0d, 0xfffff2f3, 0x0605f2f3, 0xf9f9f2f3, - 0x07fdf2f3, 0xf801f2f3, 0xfe07f2f3, 0x01f7f2f3, 0x0d0cf2f3, 0xf2f2f2f3, 0x0f03f2f3, 0xf0fbf2f3, - 0x040ef2f3, 0x00000f04, 0x06060f04, 0xf9fa0f04, 0x07fe0f04, 0xf8020f04, 0xfe080f04, 0x01f80f04, - 0x0d0d0f04, 0xf2f30f04, 0x0f040f04, 0xf0fc0f04, 0x040f0f04, 0xfffff0fc, 0x0605f0fc, 0xf9f9f0fc, - 0x07fdf0fc, 0xf801f0fc, 0xfe07f0fc, 0x01f7f0fc, 0x0d0cf0fc, 0xf2f2f0fc, 0x0f03f0fc, 0xf0fbf0fc, - 0x040ef0fc, 0x0000040f, 0x0606040f, 0xf9fa040f, 0x07fe040f, 0xf802040f, 0xfe08040f, 0x01f8040f, - 0x0d0d040f, 0xf2f3040f, 0x0f04040f, 0xf0fc040f, 0x040f040f, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000707, 0xfffff8f9, 0x000009fd, 0xfffff603, 0xfffffd0a, 0x000002f6, 0x00001010, - 0xffffeff0, 0x00001205, 0xffffedfb, 0x00000512, 0xfffffaee, 0x00000cf3, 0xfffff30d, 0x000014fa, - 0xffffeb06, 0xfffffa15, 0x000005eb, 0x00001e0f, 0xffffe1f1, 0x00000f1e, 0xfffff0e2, 0x00001e1e, - 0xffffe1e2, 0x00002202, 0xffffddfe, 0x00000222, 0xfffffdde, 0x00001bed, 0xffffe413, 0xffffed1c, - 0x000012e4, 0x00003620, 0xffffc9e0, 0x00002036, 0xffffdfca, 0x000028f5, 0xffffd70b, 0xfffff529, - 0x00000ad7, 0x0000370f, 0xffffc8f1, 0x00000f37, 0xfffff0c9, 0x00003939, 0xffffc6c7, 0x00003eff, - 0xffffc101, 0xffffff3f, 0x000000c1, 0x000027d8, 0xffffd828, 0x000036e2, 0xffffc91e, 0xffffe237, - 0x00001dc9, 0x00005e25, 0xffffa1db, 0x0000255e, 0xffffdaa2, 0x00006041, 0xffff9fbf, 0x00004160, - 0xffffbea0, 0x00004deb, 0xffffb215, 0xffffeb4e, 0x000014b2, 0x0000640f, 0xffff9bf1, 0x00000f64, - 0xfffff09c, 0x00006a6a, 0xffff9596, 0x000073f8, 0xffff8c08, 0xfffff874, 0x0000078c, 0x00004ec1, - 0xffffb13f, 0xffffc14f, 0x00003eb1, 0x000068cd, 0xffff9733, 0xffffcd69, 0x00003297, 0x00007788, - 0xffff8878, 0x00002b2b, 0xffffd4d5, 0x00005050, 0xffffafb0, 0x00000000, 0x07070000, 0xf8f90000, - 0x09fd0000, 0xf6030000, 0xfd0a0000, 0x02f60000, 0x10100000, 0xeff00000, 0x12050000, 0xedfb0000, - 0x05120000, 0x00000707, 0x07070707, 0xf8f90707, 0x09fd0707, 0xf6030707, 0xfd0a0707, 0x02f60707, - 0x10100707, 0xeff00707, 0x12050707, 0xedfb0707, 0x05120707, 0xfffff8f9, 0x0706f8f9, 0xf8f8f8f9, - 0x09fcf8f9, 0xf602f8f9, 0xfd09f8f9, 0x02f5f8f9, 0x100ff8f9, 0xefeff8f9, 0x1204f8f9, 0xedfaf8f9, - 0x0511f8f9, 0x000009fd, 0x070709fd, 0xf8f909fd, 0x09fd09fd, 0xf60309fd, 0xfd0a09fd, 0x02f609fd, - 0x101009fd, 0xeff009fd, 0x120509fd, 0xedfb09fd, 0x051209fd, 0xfffff603, 0x0706f603, 0xf8f8f603, - 0x09fcf603, 0xf602f603, 0xfd09f603, 0x02f5f603, 0x100ff603, 0xefeff603, 0x1204f603, 0xedfaf603, - 0x0511f603, 0xfffffd0a, 0x0706fd0a, 0xf8f8fd0a, 0x09fcfd0a, 0xf602fd0a, 0xfd09fd0a, 0x02f5fd0a, - 0x100ffd0a, 0xefeffd0a, 0x1204fd0a, 0xedfafd0a, 0x0511fd0a, 0x000002f6, 0x070702f6, 0xf8f902f6, - 0x09fd02f6, 0xf60302f6, 0xfd0a02f6, 0x02f602f6, 0x101002f6, 0xeff002f6, 0x120502f6, 0xedfb02f6, - 0x051202f6, 0x00001010, 0x07071010, 0xf8f91010, 0x09fd1010, 0xf6031010, 0xfd0a1010, 0x02f61010, - 0x10101010, 0xeff01010, 0x12051010, 0xedfb1010, 0x05121010, 0xffffeff0, 0x0706eff0, 0xf8f8eff0, - 0x09fceff0, 0xf602eff0, 0xfd09eff0, 0x02f5eff0, 0x100feff0, 0xefefeff0, 0x1204eff0, 0xedfaeff0, - 0x0511eff0, 0x00001205, 0x07071205, 0xf8f91205, 0x09fd1205, 0xf6031205, 0xfd0a1205, 0x02f61205, - 0x10101205, 0xeff01205, 0x12051205, 0xedfb1205, 0x05121205, 0xffffedfb, 0x0706edfb, 0xf8f8edfb, - 0x09fcedfb, 0xf602edfb, 0xfd09edfb, 0x02f5edfb, 0x100fedfb, 0xefefedfb, 0x1204edfb, 0xedfaedfb, - 0x0511edfb, 0x00000512, 0x07070512, 0xf8f90512, 0x09fd0512, 0xf6030512, 0xfd0a0512, 0x02f60512, - 0x10100512, 0xeff00512, 0x12050512, 0xedfb0512, 0x05120512, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000808, 0xfffff7f8, 0x00000afd, 0xfffff503, 0xfffffd0b, 0x000002f5, 0x00001212, - 0xffffedee, 0x00001405, 0xffffebfb, 0x00000514, 0xfffffaec, 0x00000ef1, 0xfffff10f, 0x000017f9, - 0xffffe807, 0xfffff918, 0x000006e8, 0x00002311, 0xffffdcef, 0x00001123, 0xffffeedd, 0x00002222, - 0xffffddde, 0x00002603, 0xffffd9fd, 0x00000326, 0xfffffcda, 0x00001fea, 0xffffe016, 0xffffea20, - 0x000015e0, 0x00003d25, 0xffffc2db, 0x0000253d, 0xffffdac3, 0x00002ef3, 0xffffd10d, 0xfffff32f, - 0x00000cd1, 0x00003f11, 0xffffc0ef, 0x0000113f, 0xffffeec1, 0x00004141, 0xffffbebf, 0x000047ff, - 0xffffb801, 0xffffff48, 0x000000b8, 0x00002dd2, 0xffffd22e, 0x00003edd, 0xffffc123, 0xffffdd3f, - 0x000022c1, 0x00006b2b, 0xffff94d5, 0x00002b6b, 0xffffd495, 0x00006e4b, 0xffff91b5, 0x00004b6e, - 0xffffb492, 0x000058e8, 0xffffa718, 0xffffe859, 0x000017a7, 0x00007211, 0xffff8def, 0x00001172, - 0xffffee8e, 0x00007979, 0xffff8687, 0x00005ab8, 0xffffa548, 0xffffb85b, 0x000047a5, 0x000077c6, - 0xffff883a, 0xffffc678, 0x00003988, 0x00003131, 0xffffcecf, 0x00005c5c, 0xffffa3a4, 0x00000000, - 0x08080000, 0xf7f80000, 0x0afd0000, 0xf5030000, 0xfd0b0000, 0x02f50000, 0x12120000, 0xedee0000, - 0x14050000, 0xebfb0000, 0x05140000, 0x00000808, 0x08080808, 0xf7f80808, 0x0afd0808, 0xf5030808, - 0xfd0b0808, 0x02f50808, 0x12120808, 0xedee0808, 0x14050808, 0xebfb0808, 0x05140808, 0xfffff7f8, - 0x0807f7f8, 0xf7f7f7f8, 0x0afcf7f8, 0xf502f7f8, 0xfd0af7f8, 0x02f4f7f8, 0x1211f7f8, 0xededf7f8, - 0x1404f7f8, 0xebfaf7f8, 0x0513f7f8, 0x00000afd, 0x08080afd, 0xf7f80afd, 0x0afd0afd, 0xf5030afd, - 0xfd0b0afd, 0x02f50afd, 0x12120afd, 0xedee0afd, 0x14050afd, 0xebfb0afd, 0x05140afd, 0xfffff503, - 0x0807f503, 0xf7f7f503, 0x0afcf503, 0xf502f503, 0xfd0af503, 0x02f4f503, 0x1211f503, 0xededf503, - 0x1404f503, 0xebfaf503, 0x0513f503, 0xfffffd0b, 0x0807fd0b, 0xf7f7fd0b, 0x0afcfd0b, 0xf502fd0b, - 0xfd0afd0b, 0x02f4fd0b, 0x1211fd0b, 0xededfd0b, 0x1404fd0b, 0xebfafd0b, 0x0513fd0b, 0x000002f5, - 0x080802f5, 0xf7f802f5, 0x0afd02f5, 0xf50302f5, 0xfd0b02f5, 0x02f502f5, 0x121202f5, 0xedee02f5, - 0x140502f5, 0xebfb02f5, 0x051402f5, 0x00001212, 0x08081212, 0xf7f81212, 0x0afd1212, 0xf5031212, - 0xfd0b1212, 0x02f51212, 0x12121212, 0xedee1212, 0x14051212, 0xebfb1212, 0x05141212, 0xffffedee, - 0x0807edee, 0xf7f7edee, 0x0afcedee, 0xf502edee, 0xfd0aedee, 0x02f4edee, 0x1211edee, 0xedededee, - 0x1404edee, 0xebfaedee, 0x0513edee, 0x00001405, 0x08081405, 0xf7f81405, 0x0afd1405, 0xf5031405, - 0xfd0b1405, 0x02f51405, 0x12121405, 0xedee1405, 0x14051405, 0xebfb1405, 0x05141405, 0xffffebfb, - 0x0807ebfb, 0xf7f7ebfb, 0x0afcebfb, 0xf502ebfb, 0xfd0aebfb, 0x02f4ebfb, 0x1211ebfb, 0xededebfb, - 0x1404ebfb, 0xebfaebfb, 0x0513ebfb, 0x00000514, 0x08080514, 0xf7f80514, 0x0afd0514, 0xf5030514, - 0xfd0b0514, 0x02f50514, 0x12120514, 0xedee0514, 0x14050514, 0xebfb0514, 0x05140514, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000909, 0xfffff6f7, 0x00000bfd, 0xfffff403, 0xfffffd0c, 0x000002f4, 0x00001414, - 0xffffebec, 0x00001706, 0xffffe8fa, 0x00000617, 0xfffff9e9, 0x000010ef, 0xffffef11, 0x00001af9, - 0xffffe507, 0xfffff91b, 0x000006e5, 0x00002713, 0xffffd8ed, 0x00001327, 0xffffecd9, 0x00002727, - 0xffffd8d9, 0x00002b03, 0xffffd4fd, 0x0000032b, 0xfffffcd5, 0x000023e8, 0xffffdc18, 0xffffe824, - 0x000017dc, 0x0000452a, 0xffffbad6, 0x00002a45, 0xffffd5bb, 0x000034f2, 0xffffcb0e, 0xfffff235, - 0x00000dcb, 0x00004713, 0xffffb8ed, 0x00001347, 0xffffecb9, 0x00004949, 0xffffb6b7, 0x00004ffe, - 0xffffb002, 0xfffffe50, 0x000001b0, 0x000033cc, 0xffffcc34, 0x000045d9, 0xffffba27, 0xffffd946, - 0x000026ba, 0x00007930, 0xffff86d0, 0x00003079, 0xffffcf87, 0x00007c54, 0xffff83ac, 0x0000547c, - 0xffffab84, 0x000063e5, 0xffff9c1b, 0xffffe564, 0x00001a9c, 0x000065af, 0xffff9a51, 0xffffaf66, - 0x0000509a, 0x00003737, 0xffffc8c9, 0x00006868, 0xffff9798, 0x00000000, 0x09090000, 0xf6f70000, - 0x0bfd0000, 0xf4030000, 0xfd0c0000, 0x02f40000, 0x14140000, 0xebec0000, 0x17060000, 0xe8fa0000, - 0x06170000, 0xf9e90000, 0x00000909, 0x09090909, 0xf6f70909, 0x0bfd0909, 0xf4030909, 0xfd0c0909, - 0x02f40909, 0x14140909, 0xebec0909, 0x17060909, 0xe8fa0909, 0x06170909, 0xf9e90909, 0xfffff6f7, - 0x0908f6f7, 0xf6f6f6f7, 0x0bfcf6f7, 0xf402f6f7, 0xfd0bf6f7, 0x02f3f6f7, 0x1413f6f7, 0xebebf6f7, - 0x1705f6f7, 0xe8f9f6f7, 0x0616f6f7, 0xf9e8f6f7, 0x00000bfd, 0x09090bfd, 0xf6f70bfd, 0x0bfd0bfd, - 0xf4030bfd, 0xfd0c0bfd, 0x02f40bfd, 0x14140bfd, 0xebec0bfd, 0x17060bfd, 0xe8fa0bfd, 0x06170bfd, - 0xf9e90bfd, 0xfffff403, 0x0908f403, 0xf6f6f403, 0x0bfcf403, 0xf402f403, 0xfd0bf403, 0x02f3f403, - 0x1413f403, 0xebebf403, 0x1705f403, 0xe8f9f403, 0x0616f403, 0xf9e8f403, 0xfffffd0c, 0x0908fd0c, - 0xf6f6fd0c, 0x0bfcfd0c, 0xf402fd0c, 0xfd0bfd0c, 0x02f3fd0c, 0x1413fd0c, 0xebebfd0c, 0x1705fd0c, - 0xe8f9fd0c, 0x0616fd0c, 0xf9e8fd0c, 0x000002f4, 0x090902f4, 0xf6f702f4, 0x0bfd02f4, 0xf40302f4, - 0xfd0c02f4, 0x02f402f4, 0x141402f4, 0xebec02f4, 0x170602f4, 0xe8fa02f4, 0x061702f4, 0xf9e902f4, - 0x00001414, 0x09091414, 0xf6f71414, 0x0bfd1414, 0xf4031414, 0xfd0c1414, 0x02f41414, 0x14141414, - 0xebec1414, 0x17061414, 0xe8fa1414, 0x06171414, 0xf9e91414, 0xffffebec, 0x0908ebec, 0xf6f6ebec, - 0x0bfcebec, 0xf402ebec, 0xfd0bebec, 0x02f3ebec, 0x1413ebec, 0xebebebec, 0x1705ebec, 0xe8f9ebec, - 0x0616ebec, 0xf9e8ebec, 0x00001706, 0x09091706, 0xf6f71706, 0x0bfd1706, 0xf4031706, 0xfd0c1706, - 0x02f41706, 0x14141706, 0xebec1706, 0x17061706, 0xe8fa1706, 0x06171706, 0xf9e91706, 0xffffe8fa, - 0x0908e8fa, 0xf6f6e8fa, 0x0bfce8fa, 0xf402e8fa, 0xfd0be8fa, 0x02f3e8fa, 0x1413e8fa, 0xebebe8fa, - 0x1705e8fa, 0xe8f9e8fa, 0x0616e8fa, 0xf9e8e8fa, 0x00000617, 0x09090617, 0xf6f70617, 0x0bfd0617, - 0xf4030617, 0xfd0c0617, 0x02f40617, 0x14140617, 0xebec0617, 0x17060617, 0xe8fa0617, 0x06170617, - 0xf9e90617, 0xfffff9e9, 0x0908f9e9, 0xf6f6f9e9, 0x0bfcf9e9, 0xf402f9e9, 0xfd0bf9e9, 0x02f3f9e9, - 0x1413f9e9, 0xebebf9e9, 0x1705f9e9, 0xe8f9f9e9, 0x0616f9e9, 0xf9e8f9e9, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000202, 0xfffffdfe, 0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000404, - 0xfffffbfc, 0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x000003fc, 0xfffffc04, 0x000005fe, - 0xfffffa02, 0xfffffe06, 0x000001fa, 0x00000804, 0xfffff7fc, 0x00000408, 0xfffffbf8, 0x00000808, - 0xfffff7f8, 0x00000a00, 0xfffff600, 0x0000000a, 0xfffffff6, 0x000007fc, 0xfffff804, 0xfffffc08, - 0x000003f8, 0x00000e08, 0xfffff1f8, 0x0000080e, 0xfffff7f2, 0x00000bfe, 0xfffff402, 0xfffffe0c, - 0x000001f4, 0x00001004, 0xffffeffc, 0x00000410, 0xfffffbf0, 0x00001010, 0xffffeff0, 0x00001200, - 0xffffee00, 0x00000012, 0xffffffee, 0x00000bf4, 0xfffff40c, 0x00000ff8, 0xfffff008, 0xfffff810, - 0x000007f0, 0x00001a0a, 0xffffe5f6, 0x00000a1a, 0xfffff5e6, 0x00001c12, 0xffffe3ee, 0x0000121c, - 0xffffede4, 0x000015fa, 0xffffea06, 0xfffffa16, 0x000005ea, 0x00001c04, 0xffffe3fc, 0x0000041c, - 0xfffffbe4, 0x00001e1e, 0xffffe1e2, 0x00001ffe, 0xffffe002, 0xfffffe20, 0x000001e0, 0x000015ee, - 0xffffea12, 0xffffee16, 0x000011ea, 0x00001df2, 0xffffe20e, 0xfffff21e, 0x00000de2, 0x00002e16, - 0xffffd1ea, 0x0000162e, 0xffffe9d2, 0x00002e0c, 0xffffd1f4, 0x00000c2e, 0xfffff3d2, 0x00003022, - 0xffffcfde, 0x00002230, 0xffffddd0, 0x000027f6, 0xffffd80a, 0xfffff628, 0x000009d8, 0x00003204, - 0xffffcdfc, 0x00000432, 0xfffffbce, 0x00003636, 0xffffc9ca, 0x000021de, 0xffffde22, 0x000029e4, - 0xffffd61c, 0xffffe42a, 0x00001bd6, 0x00003bfa, 0xffffc406, 0xfffffa3c, 0x000005c4, 0x00004c1a, - 0xffffb3e6, 0x00001a4c, 0xffffe5b4, 0x00004c2a, 0xffffb3d6, 0x00002a4c, 0xffffd5b4, 0x000035e8, - 0xffffca18, 0xffffe836, 0x000017ca, 0x00004e0e, 0xffffb1f2, 0x00000e4e, 0xfffff1b2, 0x0000523e, - 0xffffadc2, 0x00003e52, 0xffffc1ae, 0x000049ec, 0xffffb614, 0xffffec4a, 0x000013b6, 0x00005802, - 0xffffa7fe, 0x00000258, 0xfffffda8, 0x00005c5c, 0xffffa3a4, 0x00003bcc, 0xffffc434, 0xffffcc3c, - 0x000033c4, 0x00007634, 0xffff89cc, 0x00003476, 0xffffcb8a, 0x000049d4, 0xffffb62c, 0xffffd44a, - 0x00002bb6, 0x0000764a, 0xffff89b6, 0x00004a76, 0xffffb58a, 0x00007620, 0xffff89e0, 0x00002076, - 0xffffdf8a, 0x000065f4, 0xffff9a0c, 0xfffff466, 0x00000b9a, 0x00005fd8, 0xffffa028, 0xffffd860, - 0x000027a0, 0x000075de, 0xffff8a22, 0xffffde76, 0x0000218a, 0x000057a8, 0xffffa858, 0x000067b2, - 0xffff984e, 0xffffb268, 0x00004d98, 0x00000c0c, 0xfffff3f4, 0x00001616, 0xffffe9ea, 0x00002a2a, - 0xffffd5d6, 0x00004848, 0xffffb7b8, 0x00000000, 0x02020000, 0xfdfe0000, 0x02000000, 0xfe000000, - 0x00020000, 0xfffe0000, 0x00000202, 0x02020202, 0xfdfe0202, 0x02000202, 0xfe000202, 0x00020202, - 0xfffe0202, 0xfffffdfe, 0x0201fdfe, 0xfdfdfdfe, 0x01fffdfe, 0xfdfffdfe, 0x0001fdfe, 0xfffdfdfe, - 0x00000200, 0x02020200, 0xfdfe0200, 0x02000200, 0xfe000200, 0x00020200, 0xfffe0200, 0xfffffe00, - 0x0201fe00, 0xfdfdfe00, 0x01fffe00, 0xfdfffe00, 0x0001fe00, 0xfffdfe00, 0x00000002, 0x02020002, - 0xfdfe0002, 0x02000002, 0xfe000002, 0x00020002, 0xfffe0002, 0xfffffffe, 0x0201fffe, 0xfdfdfffe, - 0x01fffffe, 0xfdfffffe, 0x0001fffe, 0xfffdfffe, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000303, 0xfffffcfd, 0x00000300, 0xfffffd00, 0x00000003, 0xfffffffd, 0x00000606, - 0xfffff9fa, 0x00000903, 0xfffff6fd, 0x00000309, 0xfffffcf7, 0x000008fd, 0xfffff703, 0xfffffd09, - 0x000002f7, 0x000005fa, 0xfffffa06, 0x00000c06, 0xfffff3fa, 0x0000060c, 0xfffff9f4, 0x00000c0c, - 0xfffff3f4, 0x00000f00, 0xfffff100, 0x0000000f, 0xfffffff1, 0x00000bf7, 0xfffff409, 0xfffff70c, - 0x000008f4, 0x0000180f, 0xffffe7f1, 0x00000f18, 0xfffff0e8, 0x000011fa, 0xffffee06, 0xfffffa12, - 0x000005ee, 0x00001806, 0xffffe7fa, 0x00000618, 0xfffff9e8, 0x00001818, 0xffffe7e8, 0x00001b00, - 0xffffe500, 0x0000001b, 0xffffffe5, 0x000011ee, 0xffffee12, 0x000017f4, 0xffffe80c, 0xfffff418, - 0x00000be8, 0x0000270f, 0xffffd8f1, 0x00000f27, 0xfffff0d9, 0x00002a1b, 0xffffd5e5, 0x00001b2a, - 0xffffe4d6, 0x000020f7, 0xffffdf09, 0xfffff721, 0x000008df, 0x00002a06, 0xffffd5fa, 0x0000062a, - 0xfffff9d6, 0x00002d2d, 0xffffd2d3, 0x000032fd, 0xffffcd03, 0xfffffd33, 0x000002cd, 0x000020e5, - 0xffffdf1b, 0xffffe521, 0x00001adf, 0x00002ceb, 0xffffd315, 0xffffeb2d, 0x000014d3, 0x00004521, - 0xffffbadf, 0x00002145, 0xffffdebb, 0x00004512, 0xffffbaee, 0x00001245, 0xffffedbb, 0x00004836, - 0xffffb7ca, 0x00003648, 0xffffc9b8, 0x00003eee, 0xffffc112, 0xffffee3f, 0x000011c1, 0x00004e06, - 0xffffb1fa, 0x0000064e, 0xfffff9b2, 0x00005151, 0xffffaeaf, 0x000032cd, 0xffffcd33, 0x00003ed6, - 0xffffc12a, 0xffffd63f, 0x000029c1, 0x000059f7, 0xffffa609, 0xfffff75a, 0x000008a6, 0x0000722a, - 0xffff8dd6, 0x00002a72, 0xffffd58e, 0x0000753f, 0xffff8ac1, 0x00003f75, 0xffffc08b, 0x000050dc, - 0xffffaf24, 0xffffdc51, 0x000023af, 0x00007815, 0xffff87eb, 0x00001578, 0xffffea88, 0x00007b60, - 0xffff84a0, 0x0000607b, 0xffff9f85, 0x00006ee2, 0xffff911e, 0xffffe26f, 0x00001d91, 0x00005cb2, - 0xffffa34e, 0xffffb25d, 0x00004da3, 0x000071bb, 0xffff8e45, 0xffffbb72, 0x0000448e, 0x00001212, - 0xffffedee, 0x00002121, 0xffffdedf, 0x00003f3f, 0xffffc0c1, 0x00006c6c, 0xffff9394, 0x00000000, - 0x03030000, 0xfcfd0000, 0x03000000, 0xfd000000, 0x00030000, 0xfffd0000, 0x06060000, 0xf9fa0000, - 0x00000303, 0x03030303, 0xfcfd0303, 0x03000303, 0xfd000303, 0x00030303, 0xfffd0303, 0x06060303, - 0xf9fa0303, 0xfffffcfd, 0x0302fcfd, 0xfcfcfcfd, 0x02fffcfd, 0xfcfffcfd, 0x0002fcfd, 0xfffcfcfd, - 0x0605fcfd, 0xf9f9fcfd, 0x00000300, 0x03030300, 0xfcfd0300, 0x03000300, 0xfd000300, 0x00030300, - 0xfffd0300, 0x06060300, 0xf9fa0300, 0xfffffd00, 0x0302fd00, 0xfcfcfd00, 0x02fffd00, 0xfcfffd00, - 0x0002fd00, 0xfffcfd00, 0x0605fd00, 0xf9f9fd00, 0x00000003, 0x03030003, 0xfcfd0003, 0x03000003, - 0xfd000003, 0x00030003, 0xfffd0003, 0x06060003, 0xf9fa0003, 0xfffffffd, 0x0302fffd, 0xfcfcfffd, - 0x02fffffd, 0xfcfffffd, 0x0002fffd, 0xfffcfffd, 0x0605fffd, 0xf9f9fffd, 0x00000606, 0x03030606, - 0xfcfd0606, 0x03000606, 0xfd000606, 0x00030606, 0xfffd0606, 0x06060606, 0xf9fa0606, 0xfffff9fa, - 0x0302f9fa, 0xfcfcf9fa, 0x02fff9fa, 0xfcfff9fa, 0x0002f9fa, 0xfffcf9fa, 0x0605f9fa, 0xf9f9f9fa, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000404, 0xfffffbfc, 0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x00000804, - 0xfffff7fc, 0x00000408, 0xfffffbf8, 0x00000808, 0xfffff7f8, 0x000007f8, 0xfffff808, 0x00000bfc, - 0xfffff404, 0xfffffc0c, 0x000003f4, 0x00001008, 0xffffeff8, 0x00000810, 0xfffff7f0, 0x00001010, - 0xffffeff0, 0x00001400, 0xffffec00, 0x00000014, 0xffffffec, 0x00000ff4, 0xfffff00c, 0xfffff410, - 0x00000bf0, 0x000017fc, 0xffffe804, 0xfffffc18, 0x000003e8, 0x00002010, 0xffffdff0, 0x00001020, - 0xffffefe0, 0x00002008, 0xffffdff8, 0x00000820, 0xfffff7e0, 0x00002020, 0xffffdfe0, 0x00002400, - 0xffffdc00, 0x00000024, 0xffffffdc, 0x000017e8, 0xffffe818, 0x00001ff0, 0xffffe010, 0xfffff020, - 0x00000fe0, 0x00003414, 0xffffcbec, 0x00001434, 0xffffebcc, 0x00003824, 0xffffc7dc, 0x00002438, - 0xffffdbc8, 0x00002bf4, 0xffffd40c, 0xfffff42c, 0x00000bd4, 0x00003808, 0xffffc7f8, 0x00000838, - 0xfffff7c8, 0x00003c3c, 0xffffc3c4, 0x00003ffc, 0xffffc004, 0xfffffc40, 0x000003c0, 0x00002bdc, - 0xffffd424, 0xffffdc2c, 0x000023d4, 0x00003be4, 0xffffc41c, 0xffffe43c, 0x00001bc4, 0x00005c2c, - 0xffffa3d4, 0x00002c5c, 0xffffd3a4, 0x00005c18, 0xffffa3e8, 0x0000185c, 0xffffe7a4, 0x00006048, - 0xffff9fb8, 0x00004860, 0xffffb7a0, 0x000053ec, 0xffffac14, 0xffffec54, 0x000013ac, 0x00006408, - 0xffff9bf8, 0x00000864, 0xfffff79c, 0x00006c6c, 0xffff9394, 0x000043bc, 0xffffbc44, 0x000053c8, - 0xffffac38, 0xffffc854, 0x000037ac, 0x000077f4, 0xffff880c, 0xfffff478, 0x00000b88, 0x00006bd0, - 0xffff9430, 0xffffd06c, 0x00002f94, 0x00007b98, 0xffff8468, 0xffff987c, 0x00006784, 0x00001818, - 0xffffe7e8, 0x00002c2c, 0xffffd3d4, 0x00005454, 0xffffabac, 0x00000000, 0x04040000, 0xfbfc0000, - 0x04000000, 0xfc000000, 0x00040000, 0xfffc0000, 0x08040000, 0xf7fc0000, 0x04080000, 0x00000404, - 0x04040404, 0xfbfc0404, 0x04000404, 0xfc000404, 0x00040404, 0xfffc0404, 0x08040404, 0xf7fc0404, - 0x04080404, 0xfffffbfc, 0x0403fbfc, 0xfbfbfbfc, 0x03fffbfc, 0xfbfffbfc, 0x0003fbfc, 0xfffbfbfc, - 0x0803fbfc, 0xf7fbfbfc, 0x0407fbfc, 0x00000400, 0x04040400, 0xfbfc0400, 0x04000400, 0xfc000400, - 0x00040400, 0xfffc0400, 0x08040400, 0xf7fc0400, 0x04080400, 0xfffffc00, 0x0403fc00, 0xfbfbfc00, - 0x03fffc00, 0xfbfffc00, 0x0003fc00, 0xfffbfc00, 0x0803fc00, 0xf7fbfc00, 0x0407fc00, 0x00000004, - 0x04040004, 0xfbfc0004, 0x04000004, 0xfc000004, 0x00040004, 0xfffc0004, 0x08040004, 0xf7fc0004, - 0x04080004, 0xfffffffc, 0x0403fffc, 0xfbfbfffc, 0x03fffffc, 0xfbfffffc, 0x0003fffc, 0xfffbfffc, - 0x0803fffc, 0xf7fbfffc, 0x0407fffc, 0x00000804, 0x04040804, 0xfbfc0804, 0x04000804, 0xfc000804, - 0x00040804, 0xfffc0804, 0x08040804, 0xf7fc0804, 0x04080804, 0xfffff7fc, 0x0403f7fc, 0xfbfbf7fc, - 0x03fff7fc, 0xfbfff7fc, 0x0003f7fc, 0xfffbf7fc, 0x0803f7fc, 0xf7fbf7fc, 0x0407f7fc, 0x00000408, - 0x04040408, 0xfbfc0408, 0x04000408, 0xfc000408, 0x00040408, 0xfffc0408, 0x08040408, 0xf7fc0408, - 0x04080408, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000505, 0xfffffafb, 0x00000500, 0xfffffb00, 0x00000005, 0xfffffffb, 0x00000a0a, - 0xfffff5f6, 0x00000f05, 0xfffff0fb, 0x0000050f, 0xfffffaf1, 0x000009f6, 0xfffff60a, 0x00000efb, - 0xfffff105, 0xfffffb0f, 0x000004f1, 0x0000140a, 0xffffebf6, 0x00000a14, 0xfffff5ec, 0x00001414, - 0xffffebec, 0x00001900, 0xffffe700, 0x00000019, 0xffffffe7, 0x000013f1, 0xffffec0f, 0xfffff114, - 0x00000eec, 0x00002819, 0xffffd7e7, 0x00001928, 0xffffe6d8, 0x00001df6, 0xffffe20a, 0xfffff61e, - 0x000009e2, 0x0000280a, 0xffffd7f6, 0x00000a28, 0xfffff5d8, 0x00002828, 0xffffd7d8, 0x00002d00, - 0xffffd300, 0x0000002d, 0xffffffd3, 0x00001de2, 0xffffe21e, 0x000027ec, 0xffffd814, 0xffffec28, - 0x000013d8, 0x00004119, 0xffffbee7, 0x00001941, 0xffffe6bf, 0x0000462d, 0xffffb9d3, 0x00002d46, - 0xffffd2ba, 0x000036f1, 0xffffc90f, 0xfffff137, 0x00000ec9, 0x0000460a, 0xffffb9f6, 0x00000a46, - 0xfffff5ba, 0x00004b4b, 0xffffb4b5, 0x000054fb, 0xffffab05, 0xfffffb55, 0x000004ab, 0x000036d3, - 0xffffc92d, 0xffffd337, 0x00002cc9, 0x00004add, 0xffffb523, 0xffffdd4b, 0x000022b5, 0x00007337, - 0xffff8cc9, 0x00003773, 0xffffc88d, 0x0000731e, 0xffff8ce2, 0x00001e73, 0xffffe18d, 0x0000785a, - 0xffff87a6, 0x00005a78, 0xffffa588, 0x000068e2, 0xffff971e, 0xffffe269, 0x00001d97, 0x000054ab, - 0xffffab55, 0x000068ba, 0xffff9746, 0xffffba69, 0x00004597, 0x00001e1e, 0xffffe1e2, 0x00003c3c, - 0xffffc3c4, 0x00006969, 0xffff9697, 0x00000000, 0x05050000, 0xfafb0000, 0x05000000, 0xfb000000, - 0x00050000, 0xfffb0000, 0x0a0a0000, 0xf5f60000, 0x0f050000, 0xf0fb0000, 0x00000505, 0x05050505, - 0xfafb0505, 0x05000505, 0xfb000505, 0x00050505, 0xfffb0505, 0x0a0a0505, 0xf5f60505, 0x0f050505, - 0xf0fb0505, 0xfffffafb, 0x0504fafb, 0xfafafafb, 0x04fffafb, 0xfafffafb, 0x0004fafb, 0xfffafafb, - 0x0a09fafb, 0xf5f5fafb, 0x0f04fafb, 0xf0fafafb, 0x00000500, 0x05050500, 0xfafb0500, 0x05000500, - 0xfb000500, 0x00050500, 0xfffb0500, 0x0a0a0500, 0xf5f60500, 0x0f050500, 0xf0fb0500, 0xfffffb00, - 0x0504fb00, 0xfafafb00, 0x04fffb00, 0xfafffb00, 0x0004fb00, 0xfffafb00, 0x0a09fb00, 0xf5f5fb00, - 0x0f04fb00, 0xf0fafb00, 0x00000005, 0x05050005, 0xfafb0005, 0x05000005, 0xfb000005, 0x00050005, - 0xfffb0005, 0x0a0a0005, 0xf5f60005, 0x0f050005, 0xf0fb0005, 0xfffffffb, 0x0504fffb, 0xfafafffb, - 0x04fffffb, 0xfafffffb, 0x0004fffb, 0xfffafffb, 0x0a09fffb, 0xf5f5fffb, 0x0f04fffb, 0xf0fafffb, - 0x00000a0a, 0x05050a0a, 0xfafb0a0a, 0x05000a0a, 0xfb000a0a, 0x00050a0a, 0xfffb0a0a, 0x0a0a0a0a, - 0xf5f60a0a, 0x0f050a0a, 0xf0fb0a0a, 0xfffff5f6, 0x0504f5f6, 0xfafaf5f6, 0x04fff5f6, 0xfafff5f6, - 0x0004f5f6, 0xfffaf5f6, 0x0a09f5f6, 0xf5f5f5f6, 0x0f04f5f6, 0xf0faf5f6, 0x00000f05, 0x05050f05, - 0xfafb0f05, 0x05000f05, 0xfb000f05, 0x00050f05, 0xfffb0f05, 0x0a0a0f05, 0xf5f60f05, 0x0f050f05, - 0xf0fb0f05, 0xfffff0fb, 0x0504f0fb, 0xfafaf0fb, 0x04fff0fb, 0xfafff0fb, 0x0004f0fb, 0xfffaf0fb, - 0x0a09f0fb, 0xf5f5f0fb, 0x0f04f0fb, 0xf0faf0fb, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000606, 0xfffff9fa, 0x00000600, 0xfffffa00, 0x00000006, 0xfffffffa, 0x00000c0c, - 0xfffff3f4, 0x00000c06, 0xfffff3fa, 0x0000060c, 0xfffff9f4, 0x00000bf4, 0xfffff40c, 0x000011fa, - 0xffffee06, 0xfffffa12, 0x000005ee, 0x0000180c, 0xffffe7f4, 0x00000c18, 0xfffff3e8, 0x00001818, - 0xffffe7e8, 0x00001e00, 0xffffe200, 0x0000001e, 0xffffffe2, 0x000017ee, 0xffffe812, 0xffffee18, - 0x000011e8, 0x0000301e, 0xffffcfe2, 0x00001e30, 0xffffe1d0, 0x000023fa, 0xffffdc06, 0xfffffa24, - 0x000005dc, 0x0000300c, 0xffffcff4, 0x00000c30, 0xfffff3d0, 0x00003030, 0xffffcfd0, 0x00003600, - 0xffffca00, 0x00000036, 0xffffffca, 0x000023dc, 0xffffdc24, 0x00002fe8, 0xffffd018, 0xffffe830, - 0x000017d0, 0x00004e1e, 0xffffb1e2, 0x00001e4e, 0xffffe1b2, 0x00005436, 0xffffabca, 0x00003654, - 0xffffc9ac, 0x000041ee, 0xffffbe12, 0xffffee42, 0x000011be, 0x0000540c, 0xffffabf4, 0x00000c54, - 0xfffff3ac, 0x00005a5a, 0xffffa5a6, 0x00005ffa, 0xffffa006, 0xfffffa60, 0x000005a0, 0x000041ca, - 0xffffbe36, 0xffffca42, 0x000035be, 0x000059d6, 0xffffa62a, 0xffffd65a, 0x000029a6, 0x00007de2, - 0xffff821e, 0xffffe27e, 0x00001d82, 0x0000659a, 0xffff9a66, 0x00007dac, 0xffff8254, 0xffffac7e, - 0x00005382, 0x00002424, 0xffffdbdc, 0x00004242, 0xffffbdbe, 0x00000000, 0x06060000, 0xf9fa0000, - 0x06000000, 0xfa000000, 0x00060000, 0xfffa0000, 0x0c0c0000, 0xf3f40000, 0x0c060000, 0xf3fa0000, - 0x060c0000, 0x00000606, 0x06060606, 0xf9fa0606, 0x06000606, 0xfa000606, 0x00060606, 0xfffa0606, - 0x0c0c0606, 0xf3f40606, 0x0c060606, 0xf3fa0606, 0x060c0606, 0xfffff9fa, 0x0605f9fa, 0xf9f9f9fa, - 0x05fff9fa, 0xf9fff9fa, 0x0005f9fa, 0xfff9f9fa, 0x0c0bf9fa, 0xf3f3f9fa, 0x0c05f9fa, 0xf3f9f9fa, - 0x060bf9fa, 0x00000600, 0x06060600, 0xf9fa0600, 0x06000600, 0xfa000600, 0x00060600, 0xfffa0600, - 0x0c0c0600, 0xf3f40600, 0x0c060600, 0xf3fa0600, 0x060c0600, 0xfffffa00, 0x0605fa00, 0xf9f9fa00, - 0x05fffa00, 0xf9fffa00, 0x0005fa00, 0xfff9fa00, 0x0c0bfa00, 0xf3f3fa00, 0x0c05fa00, 0xf3f9fa00, - 0x060bfa00, 0x00000006, 0x06060006, 0xf9fa0006, 0x06000006, 0xfa000006, 0x00060006, 0xfffa0006, - 0x0c0c0006, 0xf3f40006, 0x0c060006, 0xf3fa0006, 0x060c0006, 0xfffffffa, 0x0605fffa, 0xf9f9fffa, - 0x05fffffa, 0xf9fffffa, 0x0005fffa, 0xfff9fffa, 0x0c0bfffa, 0xf3f3fffa, 0x0c05fffa, 0xf3f9fffa, - 0x060bfffa, 0x00000c0c, 0x06060c0c, 0xf9fa0c0c, 0x06000c0c, 0xfa000c0c, 0x00060c0c, 0xfffa0c0c, - 0x0c0c0c0c, 0xf3f40c0c, 0x0c060c0c, 0xf3fa0c0c, 0x060c0c0c, 0xfffff3f4, 0x0605f3f4, 0xf9f9f3f4, - 0x05fff3f4, 0xf9fff3f4, 0x0005f3f4, 0xfff9f3f4, 0x0c0bf3f4, 0xf3f3f3f4, 0x0c05f3f4, 0xf3f9f3f4, - 0x060bf3f4, 0x00000c06, 0x06060c06, 0xf9fa0c06, 0x06000c06, 0xfa000c06, 0x00060c06, 0xfffa0c06, - 0x0c0c0c06, 0xf3f40c06, 0x0c060c06, 0xf3fa0c06, 0x060c0c06, 0xfffff3fa, 0x0605f3fa, 0xf9f9f3fa, - 0x05fff3fa, 0xf9fff3fa, 0x0005f3fa, 0xfff9f3fa, 0x0c0bf3fa, 0xf3f3f3fa, 0x0c05f3fa, 0xf3f9f3fa, - 0x060bf3fa, 0x0000060c, 0x0606060c, 0xf9fa060c, 0x0600060c, 0xfa00060c, 0x0006060c, 0xfffa060c, - 0x0c0c060c, 0xf3f4060c, 0x0c06060c, 0xf3fa060c, 0x060c060c, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000707, 0xfffff8f9, 0x00000700, 0xfffff900, 0x00000007, 0xfffffff9, 0x00000e0e, - 0xfffff1f2, 0x00001507, 0xffffeaf9, 0x00000715, 0xfffff8eb, 0x00000df2, 0xfffff20e, 0x000014f9, - 0xffffeb07, 0xfffff915, 0x000006eb, 0x00001c0e, 0xffffe3f2, 0x00000e1c, 0xfffff1e4, 0x00001c1c, - 0xffffe3e4, 0x00002300, 0xffffdd00, 0x00000023, 0xffffffdd, 0x00001beb, 0xffffe415, 0xffffeb1c, - 0x000014e4, 0x00003823, 0xffffc7dd, 0x00002338, 0xffffdcc8, 0x000029f2, 0xffffd60e, 0xfffff22a, - 0x00000dd6, 0x0000380e, 0xffffc7f2, 0x00000e38, 0xfffff1c8, 0x00003838, 0xffffc7c8, 0x00003f00, - 0xffffc100, 0x0000003f, 0xffffffc1, 0x000029d6, 0xffffd62a, 0x000037e4, 0xffffc81c, 0xffffe438, - 0x00001bc8, 0x00005b23, 0xffffa4dd, 0x0000235b, 0xffffdca5, 0x0000623f, 0xffff9dc1, 0x00003f62, - 0xffffc09e, 0x00004ceb, 0xffffb315, 0xffffeb4d, 0x000014b3, 0x0000620e, 0xffff9df2, 0x00000e62, - 0xfffff19e, 0x00006969, 0xffff9697, 0x000076f9, 0xffff8907, 0xfffff977, 0x00000689, 0x00004cc1, - 0xffffb33f, 0xffffc14d, 0x00003eb3, 0x000068cf, 0xffff9731, 0xffffcf69, 0x00003097, 0x00007689, - 0xffff8977, 0x00002a2a, 0xffffd5d6, 0x00004d4d, 0xffffb2b3, 0x00000000, 0x07070000, 0xf8f90000, - 0x07000000, 0xf9000000, 0x00070000, 0xfff90000, 0x0e0e0000, 0xf1f20000, 0x15070000, 0xeaf90000, - 0x07150000, 0x00000707, 0x07070707, 0xf8f90707, 0x07000707, 0xf9000707, 0x00070707, 0xfff90707, - 0x0e0e0707, 0xf1f20707, 0x15070707, 0xeaf90707, 0x07150707, 0xfffff8f9, 0x0706f8f9, 0xf8f8f8f9, - 0x06fff8f9, 0xf8fff8f9, 0x0006f8f9, 0xfff8f8f9, 0x0e0df8f9, 0xf1f1f8f9, 0x1506f8f9, 0xeaf8f8f9, - 0x0714f8f9, 0x00000700, 0x07070700, 0xf8f90700, 0x07000700, 0xf9000700, 0x00070700, 0xfff90700, - 0x0e0e0700, 0xf1f20700, 0x15070700, 0xeaf90700, 0x07150700, 0xfffff900, 0x0706f900, 0xf8f8f900, - 0x06fff900, 0xf8fff900, 0x0006f900, 0xfff8f900, 0x0e0df900, 0xf1f1f900, 0x1506f900, 0xeaf8f900, - 0x0714f900, 0x00000007, 0x07070007, 0xf8f90007, 0x07000007, 0xf9000007, 0x00070007, 0xfff90007, - 0x0e0e0007, 0xf1f20007, 0x15070007, 0xeaf90007, 0x07150007, 0xfffffff9, 0x0706fff9, 0xf8f8fff9, - 0x06fffff9, 0xf8fffff9, 0x0006fff9, 0xfff8fff9, 0x0e0dfff9, 0xf1f1fff9, 0x1506fff9, 0xeaf8fff9, - 0x0714fff9, 0x00000e0e, 0x07070e0e, 0xf8f90e0e, 0x07000e0e, 0xf9000e0e, 0x00070e0e, 0xfff90e0e, - 0x0e0e0e0e, 0xf1f20e0e, 0x15070e0e, 0xeaf90e0e, 0x07150e0e, 0xfffff1f2, 0x0706f1f2, 0xf8f8f1f2, - 0x06fff1f2, 0xf8fff1f2, 0x0006f1f2, 0xfff8f1f2, 0x0e0df1f2, 0xf1f1f1f2, 0x1506f1f2, 0xeaf8f1f2, - 0x0714f1f2, 0x00001507, 0x07071507, 0xf8f91507, 0x07001507, 0xf9001507, 0x00071507, 0xfff91507, - 0x0e0e1507, 0xf1f21507, 0x15071507, 0xeaf91507, 0x07151507, 0xffffeaf9, 0x0706eaf9, 0xf8f8eaf9, - 0x06ffeaf9, 0xf8ffeaf9, 0x0006eaf9, 0xfff8eaf9, 0x0e0deaf9, 0xf1f1eaf9, 0x1506eaf9, 0xeaf8eaf9, - 0x0714eaf9, 0x00000715, 0x07070715, 0xf8f90715, 0x07000715, 0xf9000715, 0x00070715, 0xfff90715, - 0x0e0e0715, 0xf1f20715, 0x15070715, 0xeaf90715, 0x07150715, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000808, 0xfffff7f8, 0x00000800, 0xfffff800, 0x00000008, 0xfffffff8, 0x00001010, - 0xffffeff0, 0x00001008, 0xffffeff8, 0x00000810, 0xfffff7f0, 0x00000ff0, 0xfffff010, 0x000017f8, - 0xffffe808, 0xfffff818, 0x000007e8, 0x00002010, 0xffffdff0, 0x00001020, 0xffffefe0, 0x00002020, - 0xffffdfe0, 0x00002800, 0xffffd800, 0x00000028, 0xffffffd8, 0x00001fe8, 0xffffe018, 0xffffe820, - 0x000017e0, 0x00004028, 0xffffbfd8, 0x00002840, 0xffffd7c0, 0x00002ff0, 0xffffd010, 0xfffff030, - 0x00000fd0, 0x00004010, 0xffffbff0, 0x00001040, 0xffffefc0, 0x00004040, 0xffffbfc0, 0x00004800, - 0xffffb800, 0x00000048, 0xffffffb8, 0x00002fd0, 0xffffd030, 0x00003fe0, 0xffffc020, 0xffffe040, - 0x00001fc0, 0x00006828, 0xffff97d8, 0x00002868, 0xffffd798, 0x00007048, 0xffff8fb8, 0x00004870, - 0xffffb790, 0x000057e8, 0xffffa818, 0xffffe858, 0x000017a8, 0x00007010, 0xffff8ff0, 0x00001070, - 0xffffef90, 0x00007878, 0xffff8788, 0x000057b8, 0xffffa848, 0xffffb858, 0x000047a8, 0x000077c8, - 0xffff8838, 0xffffc878, 0x00003788, 0x00003030, 0xffffcfd0, 0x00005858, 0xffffa7a8, 0x00000000, - 0x08080000, 0xf7f80000, 0x08000000, 0xf8000000, 0x00080000, 0xfff80000, 0x10100000, 0xeff00000, - 0x10080000, 0xeff80000, 0x08100000, 0x00000808, 0x08080808, 0xf7f80808, 0x08000808, 0xf8000808, - 0x00080808, 0xfff80808, 0x10100808, 0xeff00808, 0x10080808, 0xeff80808, 0x08100808, 0xfffff7f8, - 0x0807f7f8, 0xf7f7f7f8, 0x07fff7f8, 0xf7fff7f8, 0x0007f7f8, 0xfff7f7f8, 0x100ff7f8, 0xefeff7f8, - 0x1007f7f8, 0xeff7f7f8, 0x080ff7f8, 0x00000800, 0x08080800, 0xf7f80800, 0x08000800, 0xf8000800, - 0x00080800, 0xfff80800, 0x10100800, 0xeff00800, 0x10080800, 0xeff80800, 0x08100800, 0xfffff800, - 0x0807f800, 0xf7f7f800, 0x07fff800, 0xf7fff800, 0x0007f800, 0xfff7f800, 0x100ff800, 0xefeff800, - 0x1007f800, 0xeff7f800, 0x080ff800, 0x00000008, 0x08080008, 0xf7f80008, 0x08000008, 0xf8000008, - 0x00080008, 0xfff80008, 0x10100008, 0xeff00008, 0x10080008, 0xeff80008, 0x08100008, 0xfffffff8, - 0x0807fff8, 0xf7f7fff8, 0x07fffff8, 0xf7fffff8, 0x0007fff8, 0xfff7fff8, 0x100ffff8, 0xefeffff8, - 0x1007fff8, 0xeff7fff8, 0x080ffff8, 0x00001010, 0x08081010, 0xf7f81010, 0x08001010, 0xf8001010, - 0x00081010, 0xfff81010, 0x10101010, 0xeff01010, 0x10081010, 0xeff81010, 0x08101010, 0xffffeff0, - 0x0807eff0, 0xf7f7eff0, 0x07ffeff0, 0xf7ffeff0, 0x0007eff0, 0xfff7eff0, 0x100feff0, 0xefefeff0, - 0x1007eff0, 0xeff7eff0, 0x080feff0, 0x00001008, 0x08081008, 0xf7f81008, 0x08001008, 0xf8001008, - 0x00081008, 0xfff81008, 0x10101008, 0xeff01008, 0x10081008, 0xeff81008, 0x08101008, 0xffffeff8, - 0x0807eff8, 0xf7f7eff8, 0x07ffeff8, 0xf7ffeff8, 0x0007eff8, 0xfff7eff8, 0x100feff8, 0xefefeff8, - 0x1007eff8, 0xeff7eff8, 0x080feff8, 0x00000810, 0x08080810, 0xf7f80810, 0x08000810, 0xf8000810, - 0x00080810, 0xfff80810, 0x10100810, 0xeff00810, 0x10080810, 0xeff80810, 0x08100810, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000909, 0xfffff6f7, 0x00000900, 0xfffff700, 0x00000009, 0xfffffff7, 0x00001212, - 0xffffedee, 0x00001b09, 0xffffe4f7, 0x0000091b, 0xfffff6e5, 0x000011ee, 0xffffee12, 0x00001af7, - 0xffffe509, 0xfffff71b, 0x000008e5, 0x00002412, 0xffffdbee, 0x00001224, 0xffffeddc, 0x00002424, - 0xffffdbdc, 0x00002d00, 0xffffd300, 0x0000002d, 0xffffffd3, 0x000023e5, 0xffffdc1b, 0xffffe524, - 0x00001adc, 0x0000482d, 0xffffb7d3, 0x00002d48, 0xffffd2b8, 0x000035ee, 0xffffca12, 0xffffee36, - 0x000011ca, 0x00004812, 0xffffb7ee, 0x00001248, 0xffffedb8, 0x00004848, 0xffffb7b8, 0x00005100, - 0xffffaf00, 0x00000051, 0xffffffaf, 0x000035ca, 0xffffca36, 0x000047dc, 0xffffb824, 0xffffdc48, - 0x000023b8, 0x0000752d, 0xffff8ad3, 0x00002d75, 0xffffd28b, 0x00007e51, 0xffff81af, 0x0000517e, - 0xffffae82, 0x000062e5, 0xffff9d1b, 0xffffe563, 0x00001a9d, 0x000062af, 0xffff9d51, 0xffffaf63, - 0x0000509d, 0x00003636, 0xffffc9ca, 0x00006c6c, 0xffff9394, 0x00000000, 0x09090000, 0xf6f70000, - 0x09000000, 0xf7000000, 0x00090000, 0xfff70000, 0x12120000, 0xedee0000, 0x1b090000, 0xe4f70000, - 0x091b0000, 0xf6e50000, 0x00000909, 0x09090909, 0xf6f70909, 0x09000909, 0xf7000909, 0x00090909, - 0xfff70909, 0x12120909, 0xedee0909, 0x1b090909, 0xe4f70909, 0x091b0909, 0xf6e50909, 0xfffff6f7, - 0x0908f6f7, 0xf6f6f6f7, 0x08fff6f7, 0xf6fff6f7, 0x0008f6f7, 0xfff6f6f7, 0x1211f6f7, 0xededf6f7, - 0x1b08f6f7, 0xe4f6f6f7, 0x091af6f7, 0xf6e4f6f7, 0x00000900, 0x09090900, 0xf6f70900, 0x09000900, - 0xf7000900, 0x00090900, 0xfff70900, 0x12120900, 0xedee0900, 0x1b090900, 0xe4f70900, 0x091b0900, - 0xf6e50900, 0xfffff700, 0x0908f700, 0xf6f6f700, 0x08fff700, 0xf6fff700, 0x0008f700, 0xfff6f700, - 0x1211f700, 0xededf700, 0x1b08f700, 0xe4f6f700, 0x091af700, 0xf6e4f700, 0x00000009, 0x09090009, - 0xf6f70009, 0x09000009, 0xf7000009, 0x00090009, 0xfff70009, 0x12120009, 0xedee0009, 0x1b090009, - 0xe4f70009, 0x091b0009, 0xf6e50009, 0xfffffff7, 0x0908fff7, 0xf6f6fff7, 0x08fffff7, 0xf6fffff7, - 0x0008fff7, 0xfff6fff7, 0x1211fff7, 0xededfff7, 0x1b08fff7, 0xe4f6fff7, 0x091afff7, 0xf6e4fff7, - 0x00001212, 0x09091212, 0xf6f71212, 0x09001212, 0xf7001212, 0x00091212, 0xfff71212, 0x12121212, - 0xedee1212, 0x1b091212, 0xe4f71212, 0x091b1212, 0xf6e51212, 0xffffedee, 0x0908edee, 0xf6f6edee, - 0x08ffedee, 0xf6ffedee, 0x0008edee, 0xfff6edee, 0x1211edee, 0xedededee, 0x1b08edee, 0xe4f6edee, - 0x091aedee, 0xf6e4edee, 0x00001b09, 0x09091b09, 0xf6f71b09, 0x09001b09, 0xf7001b09, 0x00091b09, - 0xfff71b09, 0x12121b09, 0xedee1b09, 0x1b091b09, 0xe4f71b09, 0x091b1b09, 0xf6e51b09, 0xffffe4f7, - 0x0908e4f7, 0xf6f6e4f7, 0x08ffe4f7, 0xf6ffe4f7, 0x0008e4f7, 0xfff6e4f7, 0x1211e4f7, 0xedede4f7, - 0x1b08e4f7, 0xe4f6e4f7, 0x091ae4f7, 0xf6e4e4f7, 0x0000091b, 0x0909091b, 0xf6f7091b, 0x0900091b, - 0xf700091b, 0x0009091b, 0xfff7091b, 0x1212091b, 0xedee091b, 0x1b09091b, 0xe4f7091b, 0x091b091b, - 0xf6e5091b, 0xfffff6e5, 0x0908f6e5, 0xf6f6f6e5, 0x08fff6e5, 0xf6fff6e5, 0x0008f6e5, 0xfff6f6e5, - 0x1211f6e5, 0xededf6e5, 0x1b08f6e5, 0xe4f6f6e5, 0x091af6e5, 0xf6e4f6e5, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000202, 0xfffffdfe, 0x00000300, 0xfffffd00, 0x00000003, 0xfffffffd, 0x00000606, - 0xfffff9fa, 0x00000700, 0xfffff900, 0x00000007, 0xfffffff9, 0x000004fb, 0xfffffb05, 0xfffffb05, - 0x000004fb, 0x00000b06, 0xfffff4fa, 0x0000060b, 0xfffff9f5, 0x00000800, 0xfffff800, 0x00000008, - 0xfffffff8, 0x00000b0b, 0xfffff4f5, 0x00000c00, 0xfffff400, 0x0000000c, 0xfffffff4, 0x0000110c, - 0xffffeef4, 0x00000c11, 0xfffff3ef, 0x00001111, 0xffffeeef, 0x00001206, 0xffffedfa, 0x00000612, - 0xfffff9ee, 0x00000af8, 0xfffff508, 0xfffff80b, 0x000007f5, 0x00000f00, 0xfffff100, 0x0000000f, - 0xfffffff1, 0x00001400, 0xffffec00, 0x00000014, 0xffffffec, 0x00001912, 0xffffe6ee, 0x00001219, - 0xffffede7, 0x0000190b, 0xffffe6f5, 0x00000b19, 0xfffff4e7, 0x00001919, 0xffffe6e7, 0x00000df2, - 0xfffff20e, 0xfffff20e, 0x00000df2, 0x00001a00, 0xffffe600, 0x0000001a, 0xffffffe6, 0x000011f5, - 0xffffee0b, 0xfffff512, 0x00000aee, 0x000015f9, 0xffffea07, 0xfffff916, 0x000006ea, 0x0000221a, - 0xffffdde6, 0x00001a22, 0xffffe5de, 0x00002212, 0xffffddee, 0x00001222, 0xffffedde, 0x00002222, - 0xffffddde, 0x0000230b, 0xffffdcf5, 0x00000b23, 0xfffff4dd, 0x00001d00, 0xffffe300, 0x0000001d, - 0xffffffe3, 0x000015ed, 0xffffea13, 0xffffed16, 0x000012ea, 0x000019f1, 0xffffe60f, 0xfffff11a, - 0x00000ee6, 0x00002500, 0xffffdb00, 0x00000025, 0xffffffdb, 0x00002c1b, 0xffffd3e5, 0x00001b2c, - 0xffffe4d4, 0x00002c24, 0xffffd3dc, 0x0000242c, 0xffffdbd4, 0x00002c12, 0xffffd3ee, 0x0000122c, - 0xffffedd4, 0x000020f6, 0xffffdf0a, 0xfffff621, 0x000009df, 0x00002d2d, 0xffffd2d3, 0x00000000, - 0x00000000, 0x00000202, 0xfffffdfe, 0x00000300, 0xfffffd00, 0x00000003, 0xfffffffd, 0x00000606, - 0xfffff9fa, 0x00000700, 0xfffff900, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020300, 0x0201fd00, - 0x02020003, 0x0201fffd, 0x02020606, 0x0201f9fa, 0x02020700, 0x0201f900, 0xfdfe0000, 0xfdfe0202, - 0xfdfdfdfe, 0xfdfe0300, 0xfdfdfd00, 0xfdfe0003, 0xfdfdfffd, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0700, - 0xfdfdf900, 0x03000000, 0x03000202, 0x02fffdfe, 0x03000300, 0x02fffd00, 0x03000003, 0x02fffffd, - 0x03000606, 0x02fff9fa, 0x03000700, 0x02fff900, 0xfd000000, 0xfd000202, 0xfcfffdfe, 0xfd000300, - 0xfcfffd00, 0xfd000003, 0xfcfffffd, 0xfd000606, 0xfcfff9fa, 0xfd000700, 0xfcfff900, 0x00030000, - 0x00030202, 0x0002fdfe, 0x00030300, 0x0002fd00, 0x00030003, 0x0002fffd, 0x00030606, 0x0002f9fa, - 0x00030700, 0x0002f900, 0xfffd0000, 0xfffd0202, 0xfffcfdfe, 0xfffd0300, 0xfffcfd00, 0xfffd0003, - 0xfffcfffd, 0xfffd0606, 0xfffcf9fa, 0xfffd0700, 0xfffcf900, 0x06060000, 0x06060202, 0x0605fdfe, - 0x06060300, 0x0605fd00, 0x06060003, 0x0605fffd, 0x06060606, 0x0605f9fa, 0x06060700, 0x0605f900, - 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0300, 0xf9f9fd00, 0xf9fa0003, 0xf9f9fffd, 0xf9fa0606, - 0xf9f9f9fa, 0xf9fa0700, 0xf9f9f900, 0x07000000, 0x07000202, 0x06fffdfe, 0x07000300, 0x06fffd00, - 0x07000003, 0x06fffffd, 0x07000606, 0x06fff9fa, 0x07000700, 0x06fff900, 0xf9000000, 0xf9000202, - 0xf8fffdfe, 0xf9000300, 0xf8fffd00, 0xf9000003, 0xf8fffffd, 0xf9000606, 0xf8fff9fa, 0xf9000700, - 0xf8fff900, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000202, 0xfffffdfe, 0x00000606, - 0xfffff9fa, 0x00000600, 0xfffffa00, 0x00000006, 0xfffffffa, 0x000003fc, 0xfffffc04, 0xfffffa0a, - 0x000005f6, 0xfffff400, 0x00000c00, 0xfffff3fa, 0xfffff406, 0x00000bfa, 0x00000c06, 0xfffffff2, - 0x0000000e, 0x00000c0c, 0xfffff3f4, 0xffffee00, 0x00001200, 0xfffff40e, 0x00000bf2, 0xfffff9ee, - 0xfffffa12, 0x000005ee, 0x00000612, 0xffffedf6, 0xffffee0a, 0x000011f6, 0x0000120a, 0xffffffea, - 0x00000016, 0xffffe800, 0x00001800, 0xfffff3ea, 0xfffff416, 0x00000bea, 0x00000c16, 0xffffe7f8, - 0xffffe808, 0x000017f8, 0x00001808, 0xfffff9e6, 0xfffffa1a, 0x000005e6, 0x0000061a, 0xffffffe4, - 0x0000001c, 0x00001414, 0xffffebec, 0xffffe5f2, 0x00001a0e, 0xfffff3e2, 0x00000c1e, 0xffffdff6, - 0x0000200a, 0xffffdfee, 0x00002012, 0xffffe5e6, 0x00001a1a, 0xffffebde, 0x00001422, 0xfffff3da, - 0x00000c26, 0xffffdfe0, 0x00002020, 0x00002020, 0xffffd7ea, 0xffffddde, 0x00002222, 0x00000000, - 0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, - 0x00000600, 0xfffffa00, 0x00000006, 0xfffffffa, 0x02000000, 0x02000200, 0x01fffe00, 0x02000002, - 0x01fffffe, 0x02000202, 0x01fffdfe, 0x02000606, 0x01fff9fa, 0x02000600, 0x01fffa00, 0x02000006, - 0x01fffffa, 0xfe000000, 0xfe000200, 0xfdfffe00, 0xfe000002, 0xfdfffffe, 0xfe000202, 0xfdfffdfe, - 0xfe000606, 0xfdfff9fa, 0xfe000600, 0xfdfffa00, 0xfe000006, 0xfdfffffa, 0x00020000, 0x00020200, - 0x0001fe00, 0x00020002, 0x0001fffe, 0x00020202, 0x0001fdfe, 0x00020606, 0x0001f9fa, 0x00020600, - 0x0001fa00, 0x00020006, 0x0001fffa, 0xfffe0000, 0xfffe0200, 0xfffdfe00, 0xfffe0002, 0xfffdfffe, - 0xfffe0202, 0xfffdfdfe, 0xfffe0606, 0xfffdf9fa, 0xfffe0600, 0xfffdfa00, 0xfffe0006, 0xfffdfffa, - 0x02020000, 0x02020200, 0x0201fe00, 0x02020002, 0x0201fffe, 0x02020202, 0x0201fdfe, 0x02020606, - 0x0201f9fa, 0x02020600, 0x0201fa00, 0x02020006, 0x0201fffa, 0xfdfe0000, 0xfdfe0200, 0xfdfdfe00, - 0xfdfe0002, 0xfdfdfffe, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0600, 0xfdfdfa00, - 0xfdfe0006, 0xfdfdfffa, 0x06060000, 0x06060200, 0x0605fe00, 0x06060002, 0x0605fffe, 0x06060202, - 0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060600, 0x0605fa00, 0x06060006, 0x0605fffa, 0xf9fa0000, - 0xf9fa0200, 0xf9f9fe00, 0xf9fa0002, 0xf9f9fffe, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa, - 0xf9fa0600, 0xf9f9fa00, 0xf9fa0006, 0xf9f9fffa, 0x06000000, 0x06000200, 0x05fffe00, 0x06000002, - 0x05fffffe, 0x06000202, 0x05fffdfe, 0x06000606, 0x05fff9fa, 0x06000600, 0x05fffa00, 0x06000006, - 0x05fffffa, 0xfa000000, 0xfa000200, 0xf9fffe00, 0xfa000002, 0xf9fffffe, 0xfa000202, 0xf9fffdfe, - 0xfa000606, 0xf9fff9fa, 0xfa000600, 0xf9fffa00, 0xfa000006, 0xf9fffffa, 0x00060000, 0x00060200, - 0x0005fe00, 0x00060002, 0x0005fffe, 0x00060202, 0x0005fdfe, 0x00060606, 0x0005f9fa, 0x00060600, - 0x0005fa00, 0x00060006, 0x0005fffa, 0xfffa0000, 0xfffa0200, 0xfff9fe00, 0xfffa0002, 0xfff9fffe, - 0xfffa0202, 0xfff9fdfe, 0xfffa0606, 0xfff9f9fa, 0xfffa0600, 0xfff9fa00, 0xfffa0006, 0xfff9fffa, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000404, 0xfffffbfc, 0x00000a0a, - 0xfffff5f6, 0x00000a00, 0xfffff600, 0x0000000a, 0xfffffff6, 0x000005fa, 0xfffffa06, 0xfffff80e, - 0x000007f2, 0xffffffee, 0x00000012, 0xfffff00a, 0x00000ff6, 0xffffe800, 0x00001800, 0xfffff7e8, - 0xfffff818, 0x000007e8, 0x00000818, 0x00001212, 0xffffedee, 0xfffff014, 0x00000fec, 0xffffe5f2, - 0xffffe60e, 0x000019f2, 0x00001a0e, 0xffffffe2, 0x0000001e, 0xffffde00, 0x00002200, 0xfffff7de, - 0xfffff822, 0x000007de, 0x00000822, 0xffffede2, 0xffffee1e, 0x000011e2, 0x0000121e, 0xffffddf6, - 0xffffde0a, 0x000021f6, 0x0000220a, 0xffffddec, 0x00002214, 0xffffffd8, 0x00000028, 0x00001e1e, - 0xffffe1e2, 0xffffedd8, 0x00001228, 0xffffd400, 0x00002c00, 0xffffd3f0, 0x00002c10, 0xffffdbdc, - 0xffffdbdc, 0x00002424, 0xffffd3e6, 0x00002c1a, 0xffffe5d2, 0x00001a2e, 0xffffedcc, 0x00001234, - 0xffffc9ec, 0xffffd3d4, 0x00002c2c, 0xffffc9e0, 0xffffd1d2, 0xffffd1d2, 0x00002e2e, 0x00000000, - 0x00000200, 0xfffffe00, 0x00000002, 0xfffffffe, 0x00000404, 0xfffffbfc, 0x00000a0a, 0xfffff5f6, - 0x00000a00, 0xfffff600, 0x0000000a, 0xfffffff6, 0x02000000, 0x02000200, 0x01fffe00, 0x02000002, - 0x01fffffe, 0x02000404, 0x01fffbfc, 0x02000a0a, 0x01fff5f6, 0x02000a00, 0x01fff600, 0x0200000a, - 0x01fffff6, 0xfe000000, 0xfe000200, 0xfdfffe00, 0xfe000002, 0xfdfffffe, 0xfe000404, 0xfdfffbfc, - 0xfe000a0a, 0xfdfff5f6, 0xfe000a00, 0xfdfff600, 0xfe00000a, 0xfdfffff6, 0x00020000, 0x00020200, - 0x0001fe00, 0x00020002, 0x0001fffe, 0x00020404, 0x0001fbfc, 0x00020a0a, 0x0001f5f6, 0x00020a00, - 0x0001f600, 0x0002000a, 0x0001fff6, 0xfffe0000, 0xfffe0200, 0xfffdfe00, 0xfffe0002, 0xfffdfffe, - 0xfffe0404, 0xfffdfbfc, 0xfffe0a0a, 0xfffdf5f6, 0xfffe0a00, 0xfffdf600, 0xfffe000a, 0xfffdfff6, - 0x04040000, 0x04040200, 0x0403fe00, 0x04040002, 0x0403fffe, 0x04040404, 0x0403fbfc, 0x04040a0a, - 0x0403f5f6, 0x04040a00, 0x0403f600, 0x0404000a, 0x0403fff6, 0xfbfc0000, 0xfbfc0200, 0xfbfbfe00, - 0xfbfc0002, 0xfbfbfffe, 0xfbfc0404, 0xfbfbfbfc, 0xfbfc0a0a, 0xfbfbf5f6, 0xfbfc0a00, 0xfbfbf600, - 0xfbfc000a, 0xfbfbfff6, 0x0a0a0000, 0x0a0a0200, 0x0a09fe00, 0x0a0a0002, 0x0a09fffe, 0x0a0a0404, - 0x0a09fbfc, 0x0a0a0a0a, 0x0a09f5f6, 0x0a0a0a00, 0x0a09f600, 0x0a0a000a, 0x0a09fff6, 0xf5f60000, - 0xf5f60200, 0xf5f5fe00, 0xf5f60002, 0xf5f5fffe, 0xf5f60404, 0xf5f5fbfc, 0xf5f60a0a, 0xf5f5f5f6, - 0xf5f60a00, 0xf5f5f600, 0xf5f6000a, 0xf5f5fff6, 0x0a000000, 0x0a000200, 0x09fffe00, 0x0a000002, - 0x09fffffe, 0x0a000404, 0x09fffbfc, 0x0a000a0a, 0x09fff5f6, 0x0a000a00, 0x09fff600, 0x0a00000a, - 0x09fffff6, 0xf6000000, 0xf6000200, 0xf5fffe00, 0xf6000002, 0xf5fffffe, 0xf6000404, 0xf5fffbfc, - 0xf6000a0a, 0xf5fff5f6, 0xf6000a00, 0xf5fff600, 0xf600000a, 0xf5fffff6, 0x000a0000, 0x000a0200, - 0x0009fe00, 0x000a0002, 0x0009fffe, 0x000a0404, 0x0009fbfc, 0x000a0a0a, 0x0009f5f6, 0x000a0a00, - 0x0009f600, 0x000a000a, 0x0009fff6, 0xfff60000, 0xfff60200, 0xfff5fe00, 0xfff60002, 0xfff5fffe, - 0xfff60404, 0xfff5fbfc, 0xfff60a0a, 0xfff5f5f6, 0xfff60a00, 0xfff5f600, 0xfff6000a, 0xfff5fff6, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x00000404, 0xfffffbfc, 0x00000c0c, - 0xfffff3f4, 0x00000c00, 0xfffff400, 0x0000000c, 0xfffffff4, 0x000007f8, 0xfffff808, 0xfffff008, - 0x00000ff8, 0xffffe800, 0x00001800, 0xfffff7e8, 0xfffff818, 0x000007e8, 0x00000818, 0xfffff014, - 0x00000fec, 0xffffffe4, 0x0000001c, 0xffffe7f0, 0xffffe810, 0x000017f0, 0x00001810, 0xffffe000, - 0x00002000, 0xffffefe4, 0xfffff01c, 0x00000fe4, 0x0000101c, 0xffffdff8, 0xffffe008, 0xfffff7e0, - 0xfffff820, 0x000007e0, 0x00000820, 0x00001ff8, 0x00002008, 0x00001818, 0xffffe7e8, 0xffffe818, - 0x000017e8, 0xffffdfec, 0x00002014, 0xffffffd8, 0x00000028, 0xffffefd8, 0x00001028, 0xffffd400, - 0xffffd400, 0xffffffd4, 0x0000002c, 0x00002c00, 0x00002c00, 0xffffdfe0, 0x00002020, 0xffffd3f0, - 0x00002c10, 0xffffd3e8, 0xffffe7d4, 0x0000182c, 0x00002c18, 0xffffefd0, 0x00001030, 0xffffdbdc, - 0xffffdbdc, 0x00002424, 0x00002424, 0xffffcbec, 0x00002828, 0xffffd7d8, 0xffffcbe0, 0x00000000, - 0x00000400, 0xfffffc00, 0x00000004, 0xfffffffc, 0x00000404, 0xfffffbfc, 0x00000c0c, 0xfffff3f4, - 0x00000c00, 0xfffff400, 0x0000000c, 0xfffffff4, 0x04000000, 0x04000400, 0x03fffc00, 0x04000004, - 0x03fffffc, 0x04000404, 0x03fffbfc, 0x04000c0c, 0x03fff3f4, 0x04000c00, 0x03fff400, 0x0400000c, - 0x03fffff4, 0xfc000000, 0xfc000400, 0xfbfffc00, 0xfc000004, 0xfbfffffc, 0xfc000404, 0xfbfffbfc, - 0xfc000c0c, 0xfbfff3f4, 0xfc000c00, 0xfbfff400, 0xfc00000c, 0xfbfffff4, 0x00040000, 0x00040400, - 0x0003fc00, 0x00040004, 0x0003fffc, 0x00040404, 0x0003fbfc, 0x00040c0c, 0x0003f3f4, 0x00040c00, - 0x0003f400, 0x0004000c, 0x0003fff4, 0xfffc0000, 0xfffc0400, 0xfffbfc00, 0xfffc0004, 0xfffbfffc, - 0xfffc0404, 0xfffbfbfc, 0xfffc0c0c, 0xfffbf3f4, 0xfffc0c00, 0xfffbf400, 0xfffc000c, 0xfffbfff4, - 0x04040000, 0x04040400, 0x0403fc00, 0x04040004, 0x0403fffc, 0x04040404, 0x0403fbfc, 0x04040c0c, - 0x0403f3f4, 0x04040c00, 0x0403f400, 0x0404000c, 0x0403fff4, 0xfbfc0000, 0xfbfc0400, 0xfbfbfc00, - 0xfbfc0004, 0xfbfbfffc, 0xfbfc0404, 0xfbfbfbfc, 0xfbfc0c0c, 0xfbfbf3f4, 0xfbfc0c00, 0xfbfbf400, - 0xfbfc000c, 0xfbfbfff4, 0x0c0c0000, 0x0c0c0400, 0x0c0bfc00, 0x0c0c0004, 0x0c0bfffc, 0x0c0c0404, - 0x0c0bfbfc, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c0c00, 0x0c0bf400, 0x0c0c000c, 0x0c0bfff4, 0xf3f40000, - 0xf3f40400, 0xf3f3fc00, 0xf3f40004, 0xf3f3fffc, 0xf3f40404, 0xf3f3fbfc, 0xf3f40c0c, 0xf3f3f3f4, - 0xf3f40c00, 0xf3f3f400, 0xf3f4000c, 0xf3f3fff4, 0x0c000000, 0x0c000400, 0x0bfffc00, 0x0c000004, - 0x0bfffffc, 0x0c000404, 0x0bfffbfc, 0x0c000c0c, 0x0bfff3f4, 0x0c000c00, 0x0bfff400, 0x0c00000c, - 0x0bfffff4, 0xf4000000, 0xf4000400, 0xf3fffc00, 0xf4000004, 0xf3fffffc, 0xf4000404, 0xf3fffbfc, - 0xf4000c0c, 0xf3fff3f4, 0xf4000c00, 0xf3fff400, 0xf400000c, 0xf3fffff4, 0x000c0000, 0x000c0400, - 0x000bfc00, 0x000c0004, 0x000bfffc, 0x000c0404, 0x000bfbfc, 0x000c0c0c, 0x000bf3f4, 0x000c0c00, - 0x000bf400, 0x000c000c, 0x000bfff4, 0xfff40000, 0xfff40400, 0xfff3fc00, 0xfff40004, 0xfff3fffc, - 0xfff40404, 0xfff3fbfc, 0xfff40c0c, 0xfff3f3f4, 0xfff40c00, 0xfff3f400, 0xfff4000c, 0xfff3fff4, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, - 0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec, - 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606, - 0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e, - 0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4, - 0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202, - 0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020, - 0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa, - 0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2, - 0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414, - 0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe, - 0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0, - 0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c, - 0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000, - 0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec, - 0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606, - 0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e, - 0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4, - 0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202, - 0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020, - 0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa, - 0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, - 0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec, - 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606, - 0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e, - 0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4, - 0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202, - 0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020, - 0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa, - 0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2, - 0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414, - 0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe, - 0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0, - 0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c, - 0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000, - 0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec, - 0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606, - 0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e, - 0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4, - 0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202, - 0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020, - 0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa, - 0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, - 0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec, - 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606, - 0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e, - 0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4, - 0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202, - 0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020, - 0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa, - 0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2, - 0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414, - 0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe, - 0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0, - 0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c, - 0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000, - 0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec, - 0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606, - 0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e, - 0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4, - 0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202, - 0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020, - 0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa, - 0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, - 0xffffebec, 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000202, 0xfffffdfe, 0x00000606, 0xfffff9fa, 0x00000c0c, 0xfffff3f4, 0x00001414, 0xffffebec, - 0x00002020, 0xffffdfe0, 0x00002e2e, 0xffffd1d2, 0x02020000, 0x02020202, 0x0201fdfe, 0x02020606, - 0x0201f9fa, 0x02020c0c, 0x0201f3f4, 0x02021414, 0x0201ebec, 0x02022020, 0x0201dfe0, 0x02022e2e, - 0x0201d1d2, 0xfdfe0000, 0xfdfe0202, 0xfdfdfdfe, 0xfdfe0606, 0xfdfdf9fa, 0xfdfe0c0c, 0xfdfdf3f4, - 0xfdfe1414, 0xfdfdebec, 0xfdfe2020, 0xfdfddfe0, 0xfdfe2e2e, 0xfdfdd1d2, 0x06060000, 0x06060202, - 0x0605fdfe, 0x06060606, 0x0605f9fa, 0x06060c0c, 0x0605f3f4, 0x06061414, 0x0605ebec, 0x06062020, - 0x0605dfe0, 0x06062e2e, 0x0605d1d2, 0xf9fa0000, 0xf9fa0202, 0xf9f9fdfe, 0xf9fa0606, 0xf9f9f9fa, - 0xf9fa0c0c, 0xf9f9f3f4, 0xf9fa1414, 0xf9f9ebec, 0xf9fa2020, 0xf9f9dfe0, 0xf9fa2e2e, 0xf9f9d1d2, - 0x0c0c0000, 0x0c0c0202, 0x0c0bfdfe, 0x0c0c0606, 0x0c0bf9fa, 0x0c0c0c0c, 0x0c0bf3f4, 0x0c0c1414, - 0x0c0bebec, 0x0c0c2020, 0x0c0bdfe0, 0x0c0c2e2e, 0x0c0bd1d2, 0xf3f40000, 0xf3f40202, 0xf3f3fdfe, - 0xf3f40606, 0xf3f3f9fa, 0xf3f40c0c, 0xf3f3f3f4, 0xf3f41414, 0xf3f3ebec, 0xf3f42020, 0xf3f3dfe0, - 0xf3f42e2e, 0xf3f3d1d2, 0x14140000, 0x14140202, 0x1413fdfe, 0x14140606, 0x1413f9fa, 0x14140c0c, - 0x1413f3f4, 0x14141414, 0x1413ebec, 0x14142020, 0x1413dfe0, 0x14142e2e, 0x1413d1d2, 0xebec0000, - 0xebec0202, 0xebebfdfe, 0xebec0606, 0xebebf9fa, 0xebec0c0c, 0xebebf3f4, 0xebec1414, 0xebebebec, - 0xebec2020, 0xebebdfe0, 0xebec2e2e, 0xebebd1d2, 0x20200000, 0x20200202, 0x201ffdfe, 0x20200606, - 0x201ff9fa, 0x20200c0c, 0x201ff3f4, 0x20201414, 0x201febec, 0x20202020, 0x201fdfe0, 0x20202e2e, - 0x201fd1d2, 0xdfe00000, 0xdfe00202, 0xdfdffdfe, 0xdfe00606, 0xdfdff9fa, 0xdfe00c0c, 0xdfdff3f4, - 0xdfe01414, 0xdfdfebec, 0xdfe02020, 0xdfdfdfe0, 0xdfe02e2e, 0xdfdfd1d2, 0x2e2e0000, 0x2e2e0202, - 0x2e2dfdfe, 0x2e2e0606, 0x2e2df9fa, 0x2e2e0c0c, 0x2e2df3f4, 0x2e2e1414, 0x2e2debec, 0x2e2e2020, - 0x2e2ddfe0, 0x2e2e2e2e, 0x2e2dd1d2, 0xd1d20000, 0xd1d20202, 0xd1d1fdfe, 0xd1d20606, 0xd1d1f9fa, - 0xd1d20c0c, 0xd1d1f3f4, 0xd1d21414, 0xd1d1ebec, 0xd1d22020, 0xd1d1dfe0, 0xd1d22e2e, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 -}; +#include "config.h" + +/* + * Define compressed VQ tables. + */ +#define TAB_1_1 \ + PD( 0, 0), E2( 2, 2), E4( -1, 3), E2( 4, 4), E4( 1, 5),\ + E2( -4, 4), E4( -2, 6), E4( 4, 9), E2( 9, 9), E4( 1, 10),\ + E4( -5, 8), E4( 9, 15), E4( -3, 12), E4( 4, 16), E2( 16, 16),\ + E4( 0, 18), E2( -12, 12), E4( -9, 16), E4( 11, 27), E4( 19, 28),\ + E4( -6, 22), E4( 4, 29), E2( 30, 30), E4( -2, 33), E4( -18, 23),\ + E4( -15, 30), E4( 22, 46), E4( 13, 47), E4( 35, 49), E4( -11, 41),\ + E4( 4, 51), E2( 54, 54), E2( -34, 34), E4( -29, 42), E4( -6, 60),\ + E4( 27, 76), E4( 43, 77), E4( -24, 55), E4( 14, 79), E4( 63, 83),\ + E4( -20, 74), E4( 2, 88), E2( 93, 93), E4( -52, 61), E4( 52, 120),\ + E4( -45, 75), E4( 75, 125), E4( 33, 122), E4( -13, 103), E4( -40, 96),\ + E4( -34, 127), E2( -89, 89), E4( -78, 105), E2( 12, 12), E2( 23, 23),\ + E2( 42, 42), E2( 73, 73) -static const uint32_t correctionloworder[] = { - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x04040404, - 0xfbfbfbfc, 0x05050101, 0xfafafeff, 0x01010505, 0xfefefafb, 0x0403fbfc, 0xfbfc0404, 0x0605fdfe, - 0xf9fa0202, 0xfdfe0606, 0x0201f9fa, 0x09090404, 0xf6f6fbfc, 0x04040909, 0xfbfbf6f7, 0x09090909, - 0xf6f6f6f7, 0x0a0a0101, 0xf5f5feff, 0x01010a0a, 0xfefef5f6, 0x0807fafb, 0xf7f80505, 0xfafb0808, - 0x0504f7f8, 0x0f0f0909, 0xf0f0f6f7, 0x09090f0f, 0xf6f6f0f1, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, - 0x0302f3f4, 0x10100404, 0xefeffbfc, 0x04041010, 0xfbfbeff0, 0x10101010, 0xefefeff0, 0x12120000, - 0xedee0000, 0x00001212, 0xffffedee, 0x0c0bf3f4, 0xf3f40c0c, 0x100ff6f7, 0xeff00909, 0xf6f71010, - 0x0908eff0, 0x1b1b0b0b, 0xe4e4f4f5, 0x0b0b1b1b, 0xf4f4e4e5, 0x1c1c1313, 0xe3e3eced, 0x13131c1c, - 0xecece3e4, 0x1615f9fa, 0xe9ea0606, 0xf9fa1616, 0x0605e9ea, 0x1d1d0404, 0xe2e2fbfc, 0x04041d1d, - 0xfbfbe2e3, 0x1e1e1e1e, 0xe1e1e1e2, 0x2120fdfe, 0xdedf0202, 0xfdfe2121, 0x0201dedf, 0x1716edee, - 0xe8e91212, 0xedee1717, 0x1211e8e9, 0x1e1df0f1, 0xe1e20f0f, 0xf0f11e1e, 0x0f0ee1e2, 0x2e2e1616, - 0xd1d1e9ea, 0x16162e2e, 0xe9e9d1d2, 0x2f2f0d0d, 0xd0d0f2f3, 0x0d0d2f2f, 0xf2f2d0d1, 0x31312323, - 0xcecedcdd, 0x23233131, 0xdcdccecf, 0x2928f4f5, 0xd6d70b0b, 0xf4f52929, 0x0b0ad6d7, 0x33330404, - 0xccccfbfc, 0x04043333, 0xfbfbcccd, 0x36363636, 0xc9c9c9ca, 0x2221ddde, 0xddde2222, 0x2a29e2e3, - 0xd5d61d1d, 0xe2e32a2a, 0x1d1cd5d6, 0x3c3bf9fa, 0xc3c40606, 0xf9fa3c3c, 0x0605c3c4, 0x4c4c1b1b, - 0xb3b3e4e5, 0x1b1b4c4c, 0xe4e4b3b4, 0x4d4d2b2b, 0xb2b2d4d5, 0x2b2b4d4d, 0xd4d4b2b3, 0x3736e7e8, - 0xc8c91818, 0xe7e83737, 0x1817c8c9, 0x4f4f0e0e, 0xb0b0f1f2, 0x0e0e4f4f, 0xf1f1b0b1, 0x53533f3f, - 0xacacc0c1, 0x3f3f5353, 0xc0c0acad, 0x4a49ebec, 0xb5b61414, 0xebec4a4a, 0x1413b5b6, 0x58580202, - 0xa7a7fdfe, 0x02025858, 0xfdfda7a8, 0x5d5d5d5d, 0xa2a2a2a3, 0x3d3ccbcc, 0xc2c33434, 0xcbcc3d3d, - 0x3433c2c3, 0x78783434, 0x8787cbcc, 0x34347878, 0xcbcb8788, 0x4b4ad2d3, 0xb4b52d2d, 0xd2d34b4b, - 0x2d2cb4b5, 0x7d7d4b4b, 0x8282b4b5, 0x4b4b7d7d, 0xb4b48283, 0x7a7a2121, 0x8585dedf, 0x21217a7a, - 0xdede8586, 0x6766f2f3, 0x98990d0d, 0xf2f36767, 0x0d0c9899, 0x605fd7d8, 0x9fa02828, 0xd7d86060, - 0x28279fa0, 0x7f7eddde, 0x80812222, 0xddde7f7f, 0x22218081, 0x5958a6a7, 0xa6a75959, 0x6968b1b2, - 0x96974e4e, 0xb1b26969, 0x4e4d9697, 0x0c0c0c0c, 0xf3f3f3f4, 0x17171717, 0xe8e8e8e9, 0x2a2a2a2a, - 0xd5d5d5d6, 0x49494949, 0xb6b6b6b7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, - 0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0x0302feff, 0xfcfd0101, - 0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfcfd0101, 0xfeff0303, 0xfeff0303, - 0xfeff0303, 0xfeff0303, 0xfeff0303, 0xfeff0303, 0xfeff0303, 0x0100fcfd, 0x0100fcfd, 0x0100fcfd, - 0x0100fcfd, 0x0100fcfd, 0x0100fcfd, 0x0100fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, - 0xf8f8f8f9, 0x08080202, 0xf7f7fdfe, 0x02020808, 0xfdfdf7f8, 0x0908fdfe, 0xf6f70202, 0xfdfe0909, - 0x0201f6f7, 0x0605f9fa, 0xf9fa0606, 0x0d0d0606, 0xf2f2f9fa, 0x06060d0d, 0xf9f9f2f3, 0x0d0d0d0d, - 0xf2f2f2f3, 0x0e0e0101, 0xf1f1feff, 0x01010e0e, 0xfefef1f2, 0x0c0bf7f8, 0xf3f40808, 0xf7f80c0c, - 0x0807f3f4, 0x17170e0e, 0xe8e8f1f2, 0x0e0e1717, 0xf1f1e8e9, 0x1211fafb, 0xedee0505, 0xfafb1212, - 0x0504edee, 0x18180606, 0xe7e7f9fa, 0x06061818, 0xf9f9e7e8, 0x18181818, 0xe7e7e7e8, 0x1b1afeff, - 0xe4e50101, 0xfeff1b1b, 0x0100e4e5, 0x1110eeef, 0xeeef1111, 0x1716f2f3, 0xe8e90d0d, 0xf2f31717, - 0x0d0ce8e9, 0x28281010, 0xd7d7eff0, 0x10102828, 0xefefd7d8, 0x29291c1c, 0xd6d6e3e4, 0x1c1c2929, - 0xe3e3d6d7, 0x2120f6f7, 0xdedf0909, 0xf6f72121, 0x0908dedf, 0x2b2b0606, 0xd4d4f9fa, 0x06062b2b, - 0xf9f9d4d5, 0x2e2e2e2e, 0xd1d1d1d2, 0x3231fbfc, 0xcdce0404, 0xfbfc3232, 0x0403cdce, 0x2221e4e5, - 0xddde1b1b, 0xe4e52222, 0x1b1addde, 0x2d2ce9ea, 0xd2d31616, 0xe9ea2d2d, 0x1615d2d3, 0x45452222, - 0xbabaddde, 0x22224545, 0xddddbabb, 0x46461313, 0xb9b9eced, 0x13134646, 0xececb9ba, 0x49493535, - 0xb6b6cacb, 0x35354949, 0xcacab6b7, 0x3e3deeef, 0xc1c21111, 0xeeef3e3e, 0x1110c1c2, 0x4d4d0505, - 0xb2b2fafb, 0x05054d4d, 0xfafab2b3, 0x52525252, 0xadadadae, 0x3332cccd, 0xcccd3333, 0x403fd4d5, - 0xbfc02b2b, 0xd4d54040, 0x2b2abfc0, 0x5a59f5f6, 0xa5a60a0a, 0xf5f65a5a, 0x0a09a5a6, 0x72722929, - 0x8d8dd6d7, 0x29297272, 0xd6d68d8e, 0x74744040, 0x8b8bbfc0, 0x40407474, 0xbfbf8b8c, 0x5251dadb, - 0xadae2525, 0xdadb5252, 0x2524adae, 0x77771616, 0x8888e9ea, 0x16167777, 0xe9e98889, 0x7c7c5f5f, - 0x8383a0a1, 0x5f5f7c7c, 0xa0a08384, 0x6f6ee1e2, 0x90911e1e, 0xe1e26f6f, 0x1e1d9091, 0x5c5bb1b2, - 0xa3a44e4e, 0xb1b25c5c, 0x4e4da3a4, 0x7170bbbc, 0x8e8f4444, 0xbbbc7171, 0x44438e8f, 0x12121212, - 0xedededee, 0x22222222, 0xddddddde, 0x3f3f3f3f, 0xc0c0c0c1, 0x6d6d6d6d, 0x92929293, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, - 0x03030303, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, - 0xfcfcfcfd, 0xfcfcfcfd, 0x0403feff, 0x0403feff, 0x0403feff, 0x0403feff, 0x0403feff, 0x0403feff, - 0x0403feff, 0x0403feff, 0x0403feff, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101, - 0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfbfc0101, 0xfeff0404, 0xfeff0404, 0xfeff0404, 0xfeff0404, - 0xfeff0404, 0xfeff0404, 0xfeff0404, 0xfeff0404, 0xfeff0404, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc, - 0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x0100fbfc, 0x07070707, 0x07070707, - 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0xf8f8f8f9, - 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, - 0xf5f5fcfd, 0x03030a0a, 0xfcfcf5f6, 0x09090909, 0xf6f6f6f7, 0x0706f8f9, 0xf8f90707, 0x0c0bfcfd, - 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x11110808, 0xeeeef7f8, 0x08081111, 0xf7f7eeef, 0x11111111, - 0xeeeeeeef, 0x13130101, 0xececfeff, 0x01011313, 0xfefeeced, 0x100ff4f5, 0xeff00b0b, 0xf4f51010, - 0x0b0aeff0, 0x1716f9fa, 0xe8e90606, 0xf9fa1717, 0x0605e8e9, 0x1f1f1212, 0xe0e0edee, 0x12121f1f, - 0xedede0e1, 0x20200808, 0xdfdff7f8, 0x08082020, 0xf7f7dfe0, 0x21212121, 0xdedededf, 0x2423feff, - 0xdbdc0101, 0xfeff2424, 0x0100dbdc, 0x1716e8e9, 0xe8e91717, 0x1f1eeeef, 0xe0e11111, 0xeeef1f1f, - 0x1110e0e1, 0x36361515, 0xc9c9eaeb, 0x15153636, 0xeaeac9ca, 0x37372525, 0xc8c8dadb, 0x25253737, - 0xdadac8c9, 0x2c2bf3f4, 0xd3d40c0c, 0xf3f42c2c, 0x0c0bd3d4, 0x39390808, 0xc6c6f7f8, 0x08083939, - 0xf7f7c6c7, 0x3d3d3d3d, 0xc2c2c2c3, 0x4241fafb, 0xbdbe0505, 0xfafb4242, 0x0504bdbe, 0x2d2cdbdc, - 0xd2d32424, 0xdbdc2d2d, 0x2423d2d3, 0x3c3be2e3, 0xc3c41d1d, 0xe2e33c3c, 0x1d1cc3c4, 0x5c5c2d2d, - 0xa3a3d2d3, 0x2d2d5c5c, 0xd2d2a3a4, 0x5d5d1919, 0xa2a2e6e7, 0x19195d5d, 0xe6e6a2a3, 0x61614747, - 0x9e9eb8b9, 0x47476161, 0xb8b89e9f, 0x5352e9ea, 0xacad1616, 0xe9ea5353, 0x1615acad, 0x66660707, - 0x9999f8f9, 0x07076666, 0xf8f8999a, 0x6d6d6d6d, 0x92929293, 0x4443bbbc, 0xbbbc4444, 0x5554c6c7, - 0xaaab3939, 0xc6c75555, 0x3938aaab, 0x7877f2f3, 0x87880d0d, 0xf2f37878, 0x0d0c8788, 0x6e6dcecf, - 0x91923131, 0xcecf6e6e, 0x31309192, 0x7b7a9798, 0x84856868, 0x97987b7b, 0x68678485, 0x18181818, - 0xe7e7e7e8, 0x2e2e2e2e, 0xd1d1d1d2, 0x54545454, 0xabababac, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04040404, - 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, - 0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, - 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff, - 0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff, 0x0504feff, 0xfafb0101, 0xfafb0101, 0xfafb0101, - 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfafb0101, 0xfeff0505, - 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, 0xfeff0505, - 0xfeff0505, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0100fafb, - 0x0100fafb, 0x0100fafb, 0x0100fafb, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, - 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0x0a0a0303, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, - 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0xf5f5fcfd, 0x03030a0a, - 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, 0x03030a0a, - 0x03030a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, - 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x03030d0d, 0xfcfcf2f3, 0x0908f6f7, 0xf6f70909, 0x0f0efbfc, - 0xf0f10404, 0xfbfc0f0f, 0x0403f0f1, 0x16160b0b, 0xe9e9f4f5, 0x0b0b1616, 0xf4f4e9ea, 0x15151515, - 0xeaeaeaeb, 0x18180202, 0xe7e7fdfe, 0x02021818, 0xfdfde7e8, 0x1413f1f2, 0xebec0e0e, 0xf1f21414, - 0x0e0debec, 0x26261717, 0xd9d9e8e9, 0x17172626, 0xe8e8d9da, 0x1d1cf7f8, 0xe2e30808, 0xf7f81d1d, - 0x0807e2e3, 0x27270b0b, 0xd8d8f4f5, 0x0b0b2727, 0xf4f4d8d9, 0x29292929, 0xd6d6d6d7, 0x2d2cfeff, - 0xd2d30101, 0xfeff2d2d, 0x0100d2d3, 0x1d1ce2e3, 0xe2e31d1d, 0x2726e9ea, 0xd8d91616, 0xe9ea2727, - 0x1615d8d9, 0x43431b1b, 0xbcbce4e5, 0x1b1b4343, 0xe4e4bcbd, 0x45452f2f, 0xbabad0d1, 0x2f2f4545, - 0xd0d0babb, 0x3837f0f1, 0xc7c80f0f, 0xf0f13838, 0x0f0ec7c8, 0x47470b0b, 0xb8b8f4f5, 0x0b0b4747, - 0xf4f4b8b9, 0x4c4c4c4c, 0xb3b3b3b4, 0x5352f9fa, 0xacad0606, 0xf9fa5353, 0x0605acad, 0x3938d2d3, - 0xc6c72d2d, 0xd2d33939, 0x2d2cc6c7, 0x4b4adbdc, 0xb4b52424, 0xdbdc4b4b, 0x2423b4b5, 0x73733838, - 0x8c8cc7c8, 0x38387373, 0xc7c78c8d, 0x75751f1f, 0x8a8ae0e1, 0x1f1f7575, 0xe0e08a8b, 0x7a7a5858, - 0x8585a7a8, 0x58587a7a, 0xa7a78586, 0x6867e3e4, 0x97981c1c, 0xe3e46868, 0x1c1b9798, 0x5554aaab, - 0xaaab5555, 0x6a69b7b8, 0x95964848, 0xb7b86a6a, 0x48479596, 0x1e1e1e1e, 0xe1e1e1e2, 0x3a3a3a3a, - 0xc5c5c5c6, 0x69696969, 0x96969697, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x05050505, 0x05050505, - 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, - 0x05050505, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, - 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, - 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0x0706fdfe, 0xf8f90202, - 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, 0xf8f90202, - 0xf8f90202, 0xf8f90202, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, - 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0xfdfe0707, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, - 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, 0x0201f8f9, - 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, - 0x0b0b0b0b, 0x0b0b0b0b, 0x0b0b0b0b, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, - 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0xf4f4f4f5, 0x0d0d0303, 0x0d0d0303, - 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, 0x0d0d0303, - 0x0d0d0303, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, - 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0xf2f2fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, - 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0xfbfbf0f1, 0x0b0af4f5, 0xf4f50b0b, 0x1211fafb, - 0xedee0505, 0xfafb1212, 0x0504edee, 0x1a1a0d0d, 0xe5e5f2f3, 0x0d0d1a1a, 0xf2f2e5e6, 0x1a1a1a1a, - 0xe5e5e5e6, 0x1d1d0202, 0xe2e2fdfe, 0x02021d1d, 0xfdfde2e3, 0x1817eff0, 0xe7e81010, 0xeff01818, - 0x100fe7e8, 0x2e2e1c1c, 0xd1d1e3e4, 0x1c1c2e2e, 0xe3e3d1d2, 0x2322f6f7, 0xdcdd0909, 0xf6f72323, - 0x0908dcdd, 0x2f2f0d0d, 0xd0d0f2f3, 0x0d0d2f2f, 0xf2f2d0d1, 0x31313131, 0xcecececf, 0x3635feff, - 0xc9ca0101, 0xfeff3636, 0x0100c9ca, 0x2322dcdd, 0xdcdd2323, 0x2f2ee5e6, 0xd0d11a1a, 0xe5e62f2f, - 0x1a19d0d1, 0x51512020, 0xaeaedfe0, 0x20205151, 0xdfdfaeaf, 0x53533838, 0xacacc7c8, 0x38385353, - 0xc7c7acad, 0x4342edee, 0xbcbd1212, 0xedee4343, 0x1211bcbd, 0x56560d0d, 0xa9a9f2f3, 0x0d0d5656, - 0xf2f2a9aa, 0x5b5b5b5b, 0xa4a4a4a5, 0x6362f8f9, 0x9c9d0707, 0xf8f96363, 0x07069c9d, 0x4443c9ca, - 0xbbbc3636, 0xc9ca4444, 0x3635bbbc, 0x5a59d3d4, 0xa5a62c2c, 0xd3d45a5a, 0x2c2ba5a6, 0x7c7bdedf, - 0x83842121, 0xdedf7c7c, 0x21208384, 0x67669899, 0x98996767, 0x7f7ea9aa, 0x80815656, 0xa9aa7f7f, - 0x56558081, 0x25252525, 0xdadadadb, 0x45454545, 0xbabababb, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0xf9f9f9fa, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, - 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0x0807fdfe, 0xf7f80202, 0xf7f80202, 0xf7f80202, - 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, 0xf7f80202, - 0xf7f80202, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, - 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0xfdfe0808, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, - 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, 0x0201f7f8, - 0x0201f7f8, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, - 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0x0d0d0d0d, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, - 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, 0xf2f2f2f3, - 0xf2f2f2f3, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, - 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0x0f0f0404, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, - 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, 0xf0f0fbfc, - 0xf0f0fbfc, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, - 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x04040f0f, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, - 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0xfafaedee, 0x0d0cf2f3, 0xf2f30d0d, 0x1514f9fa, - 0xeaeb0606, 0xf9fa1515, 0x0605eaeb, 0x1e1e0f0f, 0xe1e1f0f1, 0x0f0f1e1e, 0xf0f0e1e2, 0x1e1e1e1e, - 0xe1e1e1e2, 0x22220202, 0xddddfdfe, 0x02022222, 0xfdfdddde, 0x1c1beced, 0xe3e41313, 0xeced1c1c, - 0x1312e3e4, 0x36362020, 0xc9c9dfe0, 0x20203636, 0xdfdfc9ca, 0x2928f4f5, 0xd6d70b0b, 0xf4f52929, - 0x0b0ad6d7, 0x37370f0f, 0xc8c8f0f1, 0x0f0f3737, 0xf0f0c8c9, 0x39393939, 0xc6c6c6c7, 0x3f3efeff, - 0xc0c10101, 0xfeff3f3f, 0x0100c0c1, 0x2827d7d8, 0xd7d82828, 0x3736e1e2, 0xc8c91e1e, 0xe1e23737, - 0x1e1dc8c9, 0x5e5e2525, 0xa1a1dadb, 0x25255e5e, 0xdadaa1a2, 0x60604141, 0x9f9fbebf, 0x41416060, - 0xbebe9fa0, 0x4e4deaeb, 0xb1b21515, 0xeaeb4e4e, 0x1514b1b2, 0x64640f0f, 0x9b9bf0f1, 0x0f0f6464, - 0xf0f09b9c, 0x6a6a6a6a, 0x95959596, 0x7473f7f8, 0x8b8c0808, 0xf7f87474, 0x08078b8c, 0x4f4ec0c1, - 0xb0b13f3f, 0xc0c14f4f, 0x3f3eb0b1, 0x6968cccd, 0x96973333, 0xcccd6969, 0x33329697, 0x78778788, - 0x87887878, 0x2b2b2b2b, 0xd4d4d4d5, 0x50505050, 0xafafafb0, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, - 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, - 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, - 0xf8f8f8f9, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, - 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0x0a09fcfd, 0xf5f60303, 0xf5f60303, 0xf5f60303, - 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, 0xf5f60303, - 0xf5f60303, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, - 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0xfcfd0a0a, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, - 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, 0x0302f5f6, - 0x0302f5f6, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, - 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0xefefeff0, 0xefefeff0, 0xefefeff0, - 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, - 0xefefeff0, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505, - 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0x12120505, 0xededfafb, 0xededfafb, 0xededfafb, - 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, 0xededfafb, - 0xededfafb, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212, - 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x05051212, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, - 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0xfafaebec, 0x0f0ef0f1, 0xf0f10f0f, 0x1817f8f9, - 0xe7e80707, 0xf8f91818, 0x0706e7e8, 0x23231111, 0xdcdceeef, 0x11112323, 0xeeeedcdd, 0x22222222, - 0xddddddde, 0x26260303, 0xd9d9fcfd, 0x03032626, 0xfcfcd9da, 0x201fe9ea, 0xdfe01616, 0xe9ea2020, - 0x1615dfe0, 0x3d3d2525, 0xc2c2dadb, 0x25253d3d, 0xdadac2c3, 0x2f2ef2f3, 0xd0d10d0d, 0xf2f32f2f, - 0x0d0cd0d1, 0x3f3f1111, 0xc0c0eeef, 0x11113f3f, 0xeeeec0c1, 0x41414141, 0xbebebebf, 0x4847feff, - 0xb7b80101, 0xfeff4848, 0x0100b7b8, 0x2e2dd1d2, 0xd1d22e2e, 0x3f3edcdd, 0xc0c12323, 0xdcdd3f3f, - 0x2322c0c1, 0x6b6b2b2b, 0x9494d4d5, 0x2b2b6b6b, 0xd4d49495, 0x6e6e4b4b, 0x9191b4b5, 0x4b4b6e6e, - 0xb4b49192, 0x5958e7e8, 0xa6a71818, 0xe7e85959, 0x1817a6a7, 0x72721111, 0x8d8deeef, 0x11117272, - 0xeeee8d8e, 0x79797979, 0x86868687, 0x5b5ab7b8, 0xa4a54848, 0xb7b85b5b, 0x4847a4a5, 0x7877c5c6, - 0x87883a3a, 0xc5c67878, 0x3a398788, 0x31313131, 0xcecececf, 0x5c5c5c5c, 0xa3a3a3a4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, - 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0xf7f7f7f8, - 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, - 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, - 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0x0b0afcfd, 0xf4f50303, - 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xf4f50303, - 0xf4f50303, 0xf4f50303, 0xf4f50303, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, - 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0xfcfd0b0b, 0x0302f4f5, - 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, - 0x0302f4f5, 0x0302f4f5, 0x0302f4f5, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, - 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0xedededee, - 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, - 0xedededee, 0xedededee, 0xedededee, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505, - 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0x14140505, 0xebebfafb, - 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, 0xebebfafb, - 0xebebfafb, 0xebebfafb, 0xebebfafb, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414, - 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x05051414, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, - 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x1110eeef, 0xeeef1111, 0x1b1af8f9, - 0xe4e50707, 0xf8f91b1b, 0x0706e4e5, 0x27271313, 0xd8d8eced, 0x13132727, 0xececd8d9, 0x27272727, - 0xd8d8d8d9, 0x2b2b0303, 0xd4d4fcfd, 0x03032b2b, 0xfcfcd4d5, 0x2423e7e8, 0xdbdc1818, 0xe7e82424, - 0x1817dbdc, 0x45452a2a, 0xbabad5d6, 0x2a2a4545, 0xd5d5babb, 0x3534f1f2, 0xcacb0e0e, 0xf1f23535, - 0x0e0dcacb, 0x47471313, 0xb8b8eced, 0x13134747, 0xececb8b9, 0x49494949, 0xb6b6b6b7, 0x504ffdfe, - 0xafb00202, 0xfdfe5050, 0x0201afb0, 0x3433cbcc, 0xcbcc3434, 0x4645d8d9, 0xb9ba2727, 0xd8d94646, - 0x2726b9ba, 0x79793030, 0x8686cfd0, 0x30307979, 0xcfcf8687, 0x7c7c5454, 0x8383abac, 0x54547c7c, - 0xabab8384, 0x6463e4e5, 0x9b9c1b1b, 0xe4e56464, 0x1b1a9b9c, 0x6665aeaf, 0x999a5151, 0xaeaf6666, - 0x5150999a, 0x37373737, 0xc8c8c8c9, 0x68686868, 0x97979798, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, - 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0xf6f6f6f7, - 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, - 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, - 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, 0x0c0bfcfd, - 0x0c0bfcfd, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, - 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xf3f40303, 0xfcfd0c0c, 0xfcfd0c0c, - 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, - 0xfcfd0c0c, 0xfcfd0c0c, 0xfcfd0c0c, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, - 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, 0x0302f3f4, - 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, - 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec, 0xebebebec, 0xebebebec, - 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, - 0xebebebec, 0xebebebec, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, - 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0x17170606, 0xe8e8f9fa, - 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, - 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0xe8e8f9fa, 0x06061717, 0x06061717, 0x06061717, 0x06061717, - 0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717, 0x06061717, - 0x06061717, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, - 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0xf9f9e8e9, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, - 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x0403fbfc, 0xfbfc0404, 0x0605fdfe, - 0xf9fa0202, 0xfdfe0606, 0x0201f9fa, 0x08080404, 0xf7f7fbfc, 0x04040808, 0xfbfbf7f8, 0x08080808, - 0xf7f7f7f8, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x0807fbfc, 0xf7f80404, 0xfbfc0808, - 0x0403f7f8, 0x0e0e0808, 0xf1f1f7f8, 0x08080e0e, 0xf7f7f1f2, 0x0c0bfdfe, 0xf3f40202, 0xfdfe0c0c, - 0x0201f3f4, 0x10100404, 0xefeffbfc, 0x04041010, 0xfbfbeff0, 0x10101010, 0xefefeff0, 0x12120000, - 0xedee0000, 0x00001212, 0xffffedee, 0x0c0bf3f4, 0xf3f40c0c, 0x100ff7f8, 0xeff00808, 0xf7f81010, - 0x0807eff0, 0x1a1a0a0a, 0xe5e5f5f6, 0x0a0a1a1a, 0xf5f5e5e6, 0x1c1c1212, 0xe3e3edee, 0x12121c1c, - 0xedede3e4, 0x1615f9fa, 0xe9ea0606, 0xf9fa1616, 0x0605e9ea, 0x1c1c0404, 0xe3e3fbfc, 0x04041c1c, - 0xfbfbe3e4, 0x1e1e1e1e, 0xe1e1e1e2, 0x201ffdfe, 0xdfe00202, 0xfdfe2020, 0x0201dfe0, 0x1615edee, - 0xe9ea1212, 0xedee1616, 0x1211e9ea, 0x1e1df1f2, 0xe1e20e0e, 0xf1f21e1e, 0x0e0de1e2, 0x2e2e1616, - 0xd1d1e9ea, 0x16162e2e, 0xe9e9d1d2, 0x2e2e0c0c, 0xd1d1f3f4, 0x0c0c2e2e, 0xf3f3d1d2, 0x30302222, - 0xcfcfddde, 0x22223030, 0xddddcfd0, 0x2827f5f6, 0xd7d80a0a, 0xf5f62828, 0x0a09d7d8, 0x32320404, - 0xcdcdfbfc, 0x04043232, 0xfbfbcdce, 0x36363636, 0xc9c9c9ca, 0x2221ddde, 0xddde2222, 0x2a29e3e4, - 0xd5d61c1c, 0xe3e42a2a, 0x1c1bd5d6, 0x3c3bf9fa, 0xc3c40606, 0xf9fa3c3c, 0x0605c3c4, 0x4c4c1a1a, - 0xb3b3e5e6, 0x1a1a4c4c, 0xe5e5b3b4, 0x4c4c2a2a, 0xb3b3d5d6, 0x2a2a4c4c, 0xd5d5b3b4, 0x3635e7e8, - 0xc9ca1818, 0xe7e83636, 0x1817c9ca, 0x4e4e0e0e, 0xb1b1f1f2, 0x0e0e4e4e, 0xf1f1b1b2, 0x52523e3e, - 0xadadc1c2, 0x3e3e5252, 0xc1c1adae, 0x4a49ebec, 0xb5b61414, 0xebec4a4a, 0x1413b5b6, 0x58580202, - 0xa7a7fdfe, 0x02025858, 0xfdfda7a8, 0x5c5c5c5c, 0xa3a3a3a4, 0x3c3bcbcc, 0xc3c43434, 0xcbcc3c3c, - 0x3433c3c4, 0x76763434, 0x8989cbcc, 0x34347676, 0xcbcb898a, 0x4a49d3d4, 0xb5b62c2c, 0xd3d44a4a, - 0x2c2bb5b6, 0x76764a4a, 0x8989b5b6, 0x4a4a7676, 0xb5b5898a, 0x76762020, 0x8989dfe0, 0x20207676, - 0xdfdf898a, 0x6665f3f4, 0x999a0c0c, 0xf3f46666, 0x0c0b999a, 0x605fd7d8, 0x9fa02828, 0xd7d86060, - 0x28279fa0, 0x7675ddde, 0x898a2222, 0xddde7676, 0x2221898a, 0x5857a7a8, 0xa7a85858, 0x6867b1b2, - 0x97984e4e, 0xb1b26868, 0x4e4d9798, 0x0c0c0c0c, 0xf3f3f3f4, 0x16161616, 0xe9e9e9ea, 0x2a2a2a2a, - 0xd5d5d5d6, 0x48484848, 0xb7b7b7b8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, - 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0xfdfe0000, - 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0x00000202, 0x00000202, - 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, - 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, - 0xf9f9f9fa, 0x09090303, 0xf6f6fcfd, 0x03030909, 0xfcfcf6f7, 0x0908fcfd, 0xf6f70303, 0xfcfd0909, - 0x0302f6f7, 0x0605f9fa, 0xf9fa0606, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0xf9f9f3f4, 0x0c0c0c0c, - 0xf3f3f3f4, 0x0f0f0000, 0xf0f10000, 0x00000f0f, 0xfffff0f1, 0x0c0bf6f7, 0xf3f40909, 0xf6f70c0c, - 0x0908f3f4, 0x18180f0f, 0xe7e7f0f1, 0x0f0f1818, 0xf0f0e7e8, 0x1211f9fa, 0xedee0606, 0xf9fa1212, - 0x0605edee, 0x18180606, 0xe7e7f9fa, 0x06061818, 0xf9f9e7e8, 0x18181818, 0xe7e7e7e8, 0x1b1b0000, - 0xe4e50000, 0x00001b1b, 0xffffe4e5, 0x1211edee, 0xedee1212, 0x1817f3f4, 0xe7e80c0c, 0xf3f41818, - 0x0c0be7e8, 0x27270f0f, 0xd8d8f0f1, 0x0f0f2727, 0xf0f0d8d9, 0x2a2a1b1b, 0xd5d5e4e5, 0x1b1b2a2a, - 0xe4e4d5d6, 0x2120f6f7, 0xdedf0909, 0xf6f72121, 0x0908dedf, 0x2a2a0606, 0xd5d5f9fa, 0x06062a2a, - 0xf9f9d5d6, 0x2d2d2d2d, 0xd2d2d2d3, 0x3332fcfd, 0xcccd0303, 0xfcfd3333, 0x0302cccd, 0x2120e4e5, - 0xdedf1b1b, 0xe4e52121, 0x1b1adedf, 0x2d2ceaeb, 0xd2d31515, 0xeaeb2d2d, 0x1514d2d3, 0x45452121, - 0xbabadedf, 0x21214545, 0xdedebabb, 0x45451212, 0xbabaedee, 0x12124545, 0xededbabb, 0x48483636, - 0xb7b7c9ca, 0x36364848, 0xc9c9b7b8, 0x3f3eedee, 0xc0c11212, 0xedee3f3f, 0x1211c0c1, 0x4e4e0606, - 0xb1b1f9fa, 0x06064e4e, 0xf9f9b1b2, 0x51515151, 0xaeaeaeaf, 0x3332cccd, 0xcccd3333, 0x3f3ed5d6, - 0xc0c12a2a, 0xd5d63f3f, 0x2a29c0c1, 0x5a59f6f7, 0xa5a60909, 0xf6f75a5a, 0x0908a5a6, 0x72722a2a, - 0x8d8dd5d6, 0x2a2a7272, 0xd5d58d8e, 0x75753f3f, 0x8a8ac0c1, 0x3f3f7575, 0xc0c08a8b, 0x5150dbdc, - 0xaeaf2424, 0xdbdc5151, 0x2423aeaf, 0x78781515, 0x8787eaeb, 0x15157878, 0xeaea8788, 0x7b7b6060, - 0x84849fa0, 0x60607b7b, 0x9f9f8485, 0x6f6ee1e2, 0x90911e1e, 0xe1e26f6f, 0x1e1d9091, 0x5d5cb1b2, - 0xa2a34e4e, 0xb1b25d5d, 0x4e4da2a3, 0x7271babb, 0x8d8e4545, 0xbabb7272, 0x45448d8e, 0x12121212, - 0xedededee, 0x21212121, 0xdedededf, 0x3f3f3f3f, 0xc0c0c0c1, 0x6c6c6c6c, 0x93939394, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, 0x03030303, - 0x03030303, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, 0xfcfcfcfd, - 0xfcfcfcfd, 0xfcfcfcfd, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000, - 0x03030000, 0x03030000, 0x03030000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, - 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0x00000303, 0x00000303, 0x00000303, 0x00000303, - 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, - 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, - 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, - 0xf7f7fbfc, 0x04040808, 0xfbfbf7f8, 0x08080808, 0xf7f7f7f8, 0x0807f7f8, 0xf7f80808, 0x0c0bfbfc, - 0xf3f40404, 0xfbfc0c0c, 0x0403f3f4, 0x10100808, 0xefeff7f8, 0x08081010, 0xf7f7eff0, 0x10101010, - 0xefefeff0, 0x14140000, 0xebec0000, 0x00001414, 0xffffebec, 0x100ff3f4, 0xeff00c0c, 0xf3f41010, - 0x0c0beff0, 0x1817fbfc, 0xe7e80404, 0xfbfc1818, 0x0403e7e8, 0x20201010, 0xdfdfeff0, 0x10102020, - 0xefefdfe0, 0x20200808, 0xdfdff7f8, 0x08082020, 0xf7f7dfe0, 0x20202020, 0xdfdfdfe0, 0x24240000, - 0xdbdc0000, 0x00002424, 0xffffdbdc, 0x1817e7e8, 0xe7e81818, 0x201feff0, 0xdfe01010, 0xeff02020, - 0x100fdfe0, 0x34341414, 0xcbcbebec, 0x14143434, 0xebebcbcc, 0x38382424, 0xc7c7dbdc, 0x24243838, - 0xdbdbc7c8, 0x2c2bf3f4, 0xd3d40c0c, 0xf3f42c2c, 0x0c0bd3d4, 0x38380808, 0xc7c7f7f8, 0x08083838, - 0xf7f7c7c8, 0x3c3c3c3c, 0xc3c3c3c4, 0x403ffbfc, 0xbfc00404, 0xfbfc4040, 0x0403bfc0, 0x2c2bdbdc, - 0xd3d42424, 0xdbdc2c2c, 0x2423d3d4, 0x3c3be3e4, 0xc3c41c1c, 0xe3e43c3c, 0x1c1bc3c4, 0x5c5c2c2c, - 0xa3a3d3d4, 0x2c2c5c5c, 0xd3d3a3a4, 0x5c5c1818, 0xa3a3e7e8, 0x18185c5c, 0xe7e7a3a4, 0x60604848, - 0x9f9fb7b8, 0x48486060, 0xb7b79fa0, 0x5453ebec, 0xabac1414, 0xebec5454, 0x1413abac, 0x64640808, - 0x9b9bf7f8, 0x08086464, 0xf7f79b9c, 0x6c6c6c6c, 0x93939394, 0x4443bbbc, 0xbbbc4444, 0x5453c7c8, - 0xabac3838, 0xc7c85454, 0x3837abac, 0x7877f3f4, 0x87880c0c, 0xf3f47878, 0x0c0b8788, 0x6c6bcfd0, - 0x93943030, 0xcfd06c6c, 0x302f9394, 0x7c7b9798, 0x83846868, 0x97987c7c, 0x68678384, 0x18181818, - 0xe7e7e7e8, 0x2c2c2c2c, 0xd3d3d3d4, 0x54545454, 0xabababac, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04040404, - 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, - 0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, - 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, - 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, - 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0x00000404, - 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, - 0x00000404, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, - 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0x08080404, 0x08080404, 0x08080404, 0x08080404, 0x08080404, - 0x08080404, 0x08080404, 0x08080404, 0x08080404, 0x08080404, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, - 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0xf7f7fbfc, 0x04040808, - 0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808, 0x04040808, - 0x04040808, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, - 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x05050f0f, 0xfafaf0f1, 0x0a09f5f6, 0xf5f60a0a, 0x0f0efafb, - 0xf0f10505, 0xfafb0f0f, 0x0504f0f1, 0x14140a0a, 0xebebf5f6, 0x0a0a1414, 0xf5f5ebec, 0x14141414, - 0xebebebec, 0x19190000, 0xe6e70000, 0x00001919, 0xffffe6e7, 0x1413f0f1, 0xebec0f0f, 0xf0f11414, - 0x0f0eebec, 0x28281919, 0xd7d7e6e7, 0x19192828, 0xe6e6d7d8, 0x1e1df5f6, 0xe1e20a0a, 0xf5f61e1e, - 0x0a09e1e2, 0x28280a0a, 0xd7d7f5f6, 0x0a0a2828, 0xf5f5d7d8, 0x28282828, 0xd7d7d7d8, 0x2d2d0000, - 0xd2d30000, 0x00002d2d, 0xffffd2d3, 0x1e1de1e2, 0xe1e21e1e, 0x2827ebec, 0xd7d81414, 0xebec2828, - 0x1413d7d8, 0x41411919, 0xbebee6e7, 0x19194141, 0xe6e6bebf, 0x46462d2d, 0xb9b9d2d3, 0x2d2d4646, - 0xd2d2b9ba, 0x3736f0f1, 0xc8c90f0f, 0xf0f13737, 0x0f0ec8c9, 0x46460a0a, 0xb9b9f5f6, 0x0a0a4646, - 0xf5f5b9ba, 0x4b4b4b4b, 0xb4b4b4b5, 0x5554fafb, 0xaaab0505, 0xfafb5555, 0x0504aaab, 0x3736d2d3, - 0xc8c92d2d, 0xd2d33737, 0x2d2cc8c9, 0x4b4adcdd, 0xb4b52323, 0xdcdd4b4b, 0x2322b4b5, 0x73733737, - 0x8c8cc8c9, 0x37377373, 0xc8c88c8d, 0x73731e1e, 0x8c8ce1e2, 0x1e1e7373, 0xe1e18c8d, 0x78785a5a, - 0x8787a5a6, 0x5a5a7878, 0xa5a58788, 0x6968e1e2, 0x96971e1e, 0xe1e26969, 0x1e1d9697, 0x5554aaab, - 0xaaab5555, 0x6968b9ba, 0x96974646, 0xb9ba6969, 0x46459697, 0x1e1e1e1e, 0xe1e1e1e2, 0x3c3c3c3c, - 0xc3c3c3c4, 0x69696969, 0x96969697, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x05050505, 0x05050505, - 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, 0x05050505, - 0x05050505, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, - 0xfafafafb, 0xfafafafb, 0xfafafafb, 0xfafafafb, 0x05050000, 0x05050000, 0x05050000, 0x05050000, - 0x05050000, 0x05050000, 0x05050000, 0x05050000, 0x05050000, 0x05050000, 0x05050000, 0xfafb0000, - 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, 0xfafb0000, - 0xfafb0000, 0xfafb0000, 0x00000505, 0x00000505, 0x00000505, 0x00000505, 0x00000505, 0x00000505, - 0x00000505, 0x00000505, 0x00000505, 0x00000505, 0x00000505, 0xfffffafb, 0xfffffafb, 0xfffffafb, - 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, 0xfffffafb, - 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, - 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, - 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0x0f0f0505, 0x0f0f0505, - 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, 0x0f0f0505, - 0x0f0f0505, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, - 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0xf0f0fafb, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, - 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0xf9f9f3f4, 0x0c0bf3f4, 0xf3f40c0c, 0x1211f9fa, - 0xedee0606, 0xf9fa1212, 0x0605edee, 0x18180c0c, 0xe7e7f3f4, 0x0c0c1818, 0xf3f3e7e8, 0x18181818, - 0xe7e7e7e8, 0x1e1e0000, 0xe1e20000, 0x00001e1e, 0xffffe1e2, 0x1817edee, 0xe7e81212, 0xedee1818, - 0x1211e7e8, 0x30301e1e, 0xcfcfe1e2, 0x1e1e3030, 0xe1e1cfd0, 0x2423f9fa, 0xdbdc0606, 0xf9fa2424, - 0x0605dbdc, 0x30300c0c, 0xcfcff3f4, 0x0c0c3030, 0xf3f3cfd0, 0x30303030, 0xcfcfcfd0, 0x36360000, - 0xc9ca0000, 0x00003636, 0xffffc9ca, 0x2423dbdc, 0xdbdc2424, 0x302fe7e8, 0xcfd01818, 0xe7e83030, - 0x1817cfd0, 0x4e4e1e1e, 0xb1b1e1e2, 0x1e1e4e4e, 0xe1e1b1b2, 0x54543636, 0xababc9ca, 0x36365454, - 0xc9c9abac, 0x4241edee, 0xbdbe1212, 0xedee4242, 0x1211bdbe, 0x54540c0c, 0xababf3f4, 0x0c0c5454, - 0xf3f3abac, 0x5a5a5a5a, 0xa5a5a5a6, 0x605ff9fa, 0x9fa00606, 0xf9fa6060, 0x06059fa0, 0x4241c9ca, - 0xbdbe3636, 0xc9ca4242, 0x3635bdbe, 0x5a59d5d6, 0xa5a62a2a, 0xd5d65a5a, 0x2a29a5a6, 0x7e7de1e2, - 0x81821e1e, 0xe1e27e7e, 0x1e1d8182, 0x6665999a, 0x999a6666, 0x7e7dabac, 0x81825454, 0xabac7e7e, - 0x54538182, 0x24242424, 0xdbdbdbdc, 0x42424242, 0xbdbdbdbe, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0xf9f9f9fa, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, - 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, - 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, - 0xf9fa0000, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, - 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, - 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, - 0xfffff9fa, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, - 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, - 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, - 0xf3f3f3f4, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, - 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0x0c0c0606, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, - 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, 0xf3f3f9fa, - 0xf3f3f9fa, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, - 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x06060c0c, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, - 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0xf8f8eaeb, 0x0e0df1f2, 0xf1f20e0e, 0x1514f8f9, - 0xeaeb0707, 0xf8f91515, 0x0706eaeb, 0x1c1c0e0e, 0xe3e3f1f2, 0x0e0e1c1c, 0xf1f1e3e4, 0x1c1c1c1c, - 0xe3e3e3e4, 0x23230000, 0xdcdd0000, 0x00002323, 0xffffdcdd, 0x1c1beaeb, 0xe3e41515, 0xeaeb1c1c, - 0x1514e3e4, 0x38382323, 0xc7c7dcdd, 0x23233838, 0xdcdcc7c8, 0x2a29f1f2, 0xd5d60e0e, 0xf1f22a2a, - 0x0e0dd5d6, 0x38380e0e, 0xc7c7f1f2, 0x0e0e3838, 0xf1f1c7c8, 0x38383838, 0xc7c7c7c8, 0x3f3f0000, - 0xc0c10000, 0x00003f3f, 0xffffc0c1, 0x2a29d5d6, 0xd5d62a2a, 0x3837e3e4, 0xc7c81c1c, 0xe3e43838, - 0x1c1bc7c8, 0x5b5b2323, 0xa4a4dcdd, 0x23235b5b, 0xdcdca4a5, 0x62623f3f, 0x9d9dc0c1, 0x3f3f6262, - 0xc0c09d9e, 0x4d4ceaeb, 0xb2b31515, 0xeaeb4d4d, 0x1514b2b3, 0x62620e0e, 0x9d9df1f2, 0x0e0e6262, - 0xf1f19d9e, 0x69696969, 0x96969697, 0x7776f8f9, 0x88890707, 0xf8f97777, 0x07068889, 0x4d4cc0c1, - 0xb2b33f3f, 0xc0c14d4d, 0x3f3eb2b3, 0x6968cecf, 0x96973131, 0xcecf6969, 0x31309697, 0x77768889, - 0x88897777, 0x2a2a2a2a, 0xd5d5d5d6, 0x4d4d4d4d, 0xb2b2b2b3, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, - 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0x07070707, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, - 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, 0xf8f8f8f9, - 0xf8f8f8f9, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, - 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0xf8f90000, 0xf8f90000, 0xf8f90000, - 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, - 0xf8f90000, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707, - 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, - 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, 0xfffff8f9, - 0xfffff8f9, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, - 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0x0e0e0e0e, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, - 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, 0xf1f1f1f2, - 0xf1f1f1f2, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707, - 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0x15150707, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, - 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, 0xeaeaf8f9, - 0xeaeaf8f9, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515, - 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x07071515, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, - 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0xf7f7eff0, 0x100feff0, 0xeff01010, 0x1817f7f8, - 0xe7e80808, 0xf7f81818, 0x0807e7e8, 0x20201010, 0xdfdfeff0, 0x10102020, 0xefefdfe0, 0x20202020, - 0xdfdfdfe0, 0x28280000, 0xd7d80000, 0x00002828, 0xffffd7d8, 0x201fe7e8, 0xdfe01818, 0xe7e82020, - 0x1817dfe0, 0x40402828, 0xbfbfd7d8, 0x28284040, 0xd7d7bfc0, 0x302feff0, 0xcfd01010, 0xeff03030, - 0x100fcfd0, 0x40401010, 0xbfbfeff0, 0x10104040, 0xefefbfc0, 0x40404040, 0xbfbfbfc0, 0x48480000, - 0xb7b80000, 0x00004848, 0xffffb7b8, 0x302fcfd0, 0xcfd03030, 0x403fdfe0, 0xbfc02020, 0xdfe04040, - 0x201fbfc0, 0x68682828, 0x9797d7d8, 0x28286868, 0xd7d79798, 0x70704848, 0x8f8fb7b8, 0x48487070, - 0xb7b78f90, 0x5857e7e8, 0xa7a81818, 0xe7e85858, 0x1817a7a8, 0x70701010, 0x8f8feff0, 0x10107070, - 0xefef8f90, 0x78787878, 0x87878788, 0x5857b7b8, 0xa7a84848, 0xb7b85858, 0x4847a7a8, 0x7877c7c8, - 0x87883838, 0xc7c87878, 0x38378788, 0x30303030, 0xcfcfcfd0, 0x58585858, 0xa7a7a7a8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, - 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0x08080808, 0xf7f7f7f8, - 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, - 0xf7f7f7f8, 0xf7f7f7f8, 0xf7f7f7f8, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000, - 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0x08080000, 0xf7f80000, - 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, 0xf7f80000, - 0xf7f80000, 0xf7f80000, 0xf7f80000, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808, - 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0x00000808, 0xfffff7f8, - 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, - 0xfffff7f8, 0xfffff7f8, 0xfffff7f8, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, - 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0x10101010, 0xefefeff0, - 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, 0xefefeff0, - 0xefefeff0, 0xefefeff0, 0xefefeff0, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808, - 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0x10100808, 0xefeff7f8, - 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, - 0xefeff7f8, 0xefeff7f8, 0xefeff7f8, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010, - 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x08081010, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, - 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x1211edee, 0xedee1212, 0x1b1af6f7, - 0xe4e50909, 0xf6f71b1b, 0x0908e4e5, 0x24241212, 0xdbdbedee, 0x12122424, 0xededdbdc, 0x24242424, - 0xdbdbdbdc, 0x2d2d0000, 0xd2d30000, 0x00002d2d, 0xffffd2d3, 0x2423e4e5, 0xdbdc1b1b, 0xe4e52424, - 0x1b1adbdc, 0x48482d2d, 0xb7b7d2d3, 0x2d2d4848, 0xd2d2b7b8, 0x3635edee, 0xc9ca1212, 0xedee3636, - 0x1211c9ca, 0x48481212, 0xb7b7edee, 0x12124848, 0xededb7b8, 0x48484848, 0xb7b7b7b8, 0x51510000, - 0xaeaf0000, 0x00005151, 0xffffaeaf, 0x3635c9ca, 0xc9ca3636, 0x4847dbdc, 0xb7b82424, 0xdbdc4848, - 0x2423b7b8, 0x75752d2d, 0x8a8ad2d3, 0x2d2d7575, 0xd2d28a8b, 0x7e7e5151, 0x8181aeaf, 0x51517e7e, - 0xaeae8182, 0x6362e4e5, 0x9c9d1b1b, 0xe4e56363, 0x1b1a9c9d, 0x6362aeaf, 0x9c9d5151, 0xaeaf6363, - 0x51509c9d, 0x36363636, 0xc9c9c9ca, 0x6c6c6c6c, 0x93939394, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, - 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0x09090909, 0xf6f6f6f7, - 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, - 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0xf6f6f6f7, 0x09090000, 0x09090000, 0x09090000, 0x09090000, - 0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000, 0x09090000, - 0x09090000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, - 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0xf6f70000, 0x00000909, 0x00000909, - 0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909, 0x00000909, - 0x00000909, 0x00000909, 0x00000909, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, - 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, 0xfffff6f7, - 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, - 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0x12121212, 0xedededee, 0xedededee, 0xedededee, - 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, 0xedededee, - 0xedededee, 0xedededee, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, - 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0x1b1b0909, 0xe4e4f6f7, - 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, - 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0xe4e4f6f7, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, - 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, 0x09091b1b, - 0x09091b1b, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, - 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0xf6f6e4e5, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, - 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0504fafb, 0xfafb0505, 0xfafb0505, - 0x0504fafb, 0x0b0b0606, 0xf4f4f9fa, 0x06060b0b, 0xf9f9f4f5, 0x08080000, 0xf7f80000, 0x00000808, - 0xfffff7f8, 0x0b0b0b0b, 0xf4f4f4f5, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x11110c0c, - 0xeeeef3f4, 0x0c0c1111, 0xf3f3eeef, 0x11111111, 0xeeeeeeef, 0x12120606, 0xededf9fa, 0x06061212, - 0xf9f9edee, 0x0b0af7f8, 0xf4f50808, 0xf7f80b0b, 0x0807f4f5, 0x0f0f0000, 0xf0f10000, 0x00000f0f, - 0xfffff0f1, 0x14140000, 0xebec0000, 0x00001414, 0xffffebec, 0x19191212, 0xe6e6edee, 0x12121919, - 0xedede6e7, 0x19190b0b, 0xe6e6f4f5, 0x0b0b1919, 0xf4f4e6e7, 0x19191919, 0xe6e6e6e7, 0x0e0df1f2, - 0xf1f20e0e, 0xf1f20e0e, 0x0e0df1f2, 0x1a1a0000, 0xe5e60000, 0x00001a1a, 0xffffe5e6, 0x1211f4f5, - 0xedee0b0b, 0xf4f51212, 0x0b0aedee, 0x1615f8f9, 0xe9ea0707, 0xf8f91616, 0x0706e9ea, 0x22221a1a, - 0xdddde5e6, 0x1a1a2222, 0xe5e5ddde, 0x22221212, 0xddddedee, 0x12122222, 0xededddde, 0x22222222, - 0xddddddde, 0x23230b0b, 0xdcdcf4f5, 0x0b0b2323, 0xf4f4dcdd, 0x1d1d0000, 0xe2e30000, 0x00001d1d, - 0xffffe2e3, 0x1615eced, 0xe9ea1313, 0xeced1616, 0x1312e9ea, 0x1a19f0f1, 0xe5e60f0f, 0xf0f11a1a, - 0x0f0ee5e6, 0x25250000, 0xdadb0000, 0x00002525, 0xffffdadb, 0x2c2c1b1b, 0xd3d3e4e5, 0x1b1b2c2c, - 0xe4e4d3d4, 0x2c2c2424, 0xd3d3dbdc, 0x24242c2c, 0xdbdbd3d4, 0x2c2c1212, 0xd3d3edee, 0x12122c2c, - 0xededd3d4, 0x2120f5f6, 0xdedf0a0a, 0xf5f62121, 0x0a09dedf, 0x2d2d2d2d, 0xd2d2d2d3, 0x00000000, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, - 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, - 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, - 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, - 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, - 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, - 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, - 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, - 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, - 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, - 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x03030000, 0xfcfd0000, - 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, 0xf8f90000, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x07070000, - 0xf8f90000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, - 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0403fbfc, 0xfbfc0404, 0xf9fa0a0a, - 0x0605f5f6, 0xf3f40000, 0x0c0c0000, 0xf3f3f9fa, 0xf3f40606, 0x0c0bf9fa, 0x0c0c0606, 0xfffff1f2, - 0x00000e0e, 0x0c0c0c0c, 0xf3f3f3f4, 0xedee0000, 0x12120000, 0xf3f40e0e, 0x0c0bf1f2, 0xf9f9edee, - 0xf9fa1212, 0x0605edee, 0x06061212, 0xededf5f6, 0xedee0a0a, 0x1211f5f6, 0x12120a0a, 0xffffe9ea, - 0x00001616, 0xe7e80000, 0x18180000, 0xf3f3e9ea, 0xf3f41616, 0x0c0be9ea, 0x0c0c1616, 0xe7e7f7f8, - 0xe7e80808, 0x1817f7f8, 0x18180808, 0xf9f9e5e6, 0xf9fa1a1a, 0x0605e5e6, 0x06061a1a, 0xffffe3e4, - 0x00001c1c, 0x14141414, 0xebebebec, 0xe5e5f1f2, 0x1a1a0e0e, 0xf3f3e1e2, 0x0c0c1e1e, 0xdfdff5f6, - 0x20200a0a, 0xdfdfedee, 0x20201212, 0xe5e5e5e6, 0x1a1a1a1a, 0xebebddde, 0x14142222, 0xf3f3d9da, - 0x0c0c2626, 0xdfdfdfe0, 0x20202020, 0x20202020, 0xd7d7e9ea, 0xddddddde, 0x22222222, 0x00000000, - 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, - 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, - 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, - 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, - 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, - 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, - 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, - 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, - 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, - 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, - 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, - 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, - 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, - 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, - 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, - 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, - 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, - 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, - 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, - 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, - 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, - 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x0605f9fa, 0xf9fa0606, 0xf7f80e0e, - 0x0807f1f2, 0xffffedee, 0x00001212, 0xeff00a0a, 0x100ff5f6, 0xe7e80000, 0x18180000, 0xf7f7e7e8, - 0xf7f81818, 0x0807e7e8, 0x08081818, 0x12121212, 0xedededee, 0xeff01414, 0x100febec, 0xe5e5f1f2, - 0xe5e60e0e, 0x1a19f1f2, 0x1a1a0e0e, 0xffffe1e2, 0x00001e1e, 0xddde0000, 0x22220000, 0xf7f7ddde, - 0xf7f82222, 0x0807ddde, 0x08082222, 0xedede1e2, 0xedee1e1e, 0x1211e1e2, 0x12121e1e, 0xddddf5f6, - 0xddde0a0a, 0x2221f5f6, 0x22220a0a, 0xddddebec, 0x22221414, 0xffffd7d8, 0x00002828, 0x1e1e1e1e, - 0xe1e1e1e2, 0xededd7d8, 0x12122828, 0xd3d40000, 0x2c2c0000, 0xd3d3eff0, 0x2c2c1010, 0xdbdbdbdc, - 0xdbdbdbdc, 0x24242424, 0xd3d3e5e6, 0x2c2c1a1a, 0xe5e5d1d2, 0x1a1a2e2e, 0xededcbcc, 0x12123434, - 0xc9c9ebec, 0xd3d3d3d4, 0x2c2c2c2c, 0xc9c9dfe0, 0xd1d1d1d2, 0xd1d1d1d2, 0x2e2e2e2e, 0x00000000, - 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, - 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, - 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, - 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, - 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, - 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, - 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, - 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, - 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, - 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, - 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, - 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, - 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, - 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, - 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, - 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, - 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, - 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, - 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, - 0xf5f60000, 0x00000a0a, 0xfffff5f6, 0x00000000, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, - 0x04040404, 0xfbfbfbfc, 0x0a0a0a0a, 0xf5f5f5f6, 0x0a0a0000, 0xf5f60000, 0x00000a0a, 0xfffff5f6, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, - 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x0807f7f8, 0xf7f80808, 0xeff00808, - 0x100ff7f8, 0xe7e80000, 0x18180000, 0xf7f7e7e8, 0xf7f81818, 0x0807e7e8, 0x08081818, 0xeff01414, - 0x100febec, 0xffffe3e4, 0x00001c1c, 0xe7e7eff0, 0xe7e81010, 0x1817eff0, 0x18181010, 0xdfe00000, - 0x20200000, 0xefefe3e4, 0xeff01c1c, 0x100fe3e4, 0x10101c1c, 0xdfdff7f8, 0xdfe00808, 0xf7f7dfe0, - 0xf7f82020, 0x0807dfe0, 0x08082020, 0x201ff7f8, 0x20200808, 0x18181818, 0xe7e7e7e8, 0xe7e81818, - 0x1817e7e8, 0xdfdfebec, 0x20201414, 0xffffd7d8, 0x00002828, 0xefefd7d8, 0x10102828, 0xd3d40000, - 0xd3d40000, 0xffffd3d4, 0x00002c2c, 0x2c2c0000, 0x2c2c0000, 0xdfdfdfe0, 0x20202020, 0xd3d3eff0, - 0x2c2c1010, 0xd3d3e7e8, 0xe7e7d3d4, 0x18182c2c, 0x2c2c1818, 0xefefcfd0, 0x10103030, 0xdbdbdbdc, - 0xdbdbdbdc, 0x24242424, 0x24242424, 0xcbcbebec, 0x28282828, 0xd7d7d7d8, 0xcbcbdfe0, 0x00000000, - 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, - 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, - 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, - 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, - 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, - 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, - 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, - 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, - 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, - 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, - 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, - 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, - 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, - 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, - 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, - 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, - 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, - 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, - 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, - 0xf3f40000, 0x00000c0c, 0xfffff3f4, 0x00000000, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, - 0x04040404, 0xfbfbfbfc, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0000, 0xf3f40000, 0x00000c0c, 0xfffff3f4, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, - 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, - 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, - 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, - 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, - 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, - 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, - 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, - 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, - 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, - 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, - 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, - 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, - 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, - 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, - 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, - 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, - 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, - 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, - 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, - 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, - 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, - 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, - 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, - 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, - 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, - 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, - 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, - 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, - 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, - 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, - 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, - 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, - 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, - 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, - 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, - 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, - 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, - 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, - 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, - 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, - 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, - 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, - 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, - 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, - 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, - 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, - 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, - 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, - 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, - 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, - 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, - 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, - 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, - 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, - 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, - 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, - 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, - 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, - 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, - 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, - 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, - 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, - 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, - 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x06060606, 0xf9f9f9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x14141414, 0xebebebec, 0x20202020, 0xdfdfdfe0, 0x2e2e2e2e, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 -}; +#define TAB_1_2 \ + PD( 0, 0), E2( 3, 3), E4( -1, 4), E2( 7, 7), E4( 2, 8),\ + E4( -2, 9), E2( -6, 6), E4( 6, 13), E2( 13, 13), E4( 1, 14),\ + E4( -8, 12), E4( 14, 23), E4( -5, 18), E4( 6, 24), E2( 24, 24),\ + E4( -1, 27), E2( -17, 17), E4( -13, 23), E4( 16, 40), E4( 28, 41),\ + E4( -9, 33), E4( 6, 43), E2( 46, 46), E4( -4, 50), E4( -27, 34),\ + E4( -22, 45), E4( 34, 69), E4( 19, 70), E4( 53, 73), E4( -17, 62),\ + E4( 5, 77), E2( 82, 82), E2( -51, 51), E4( -43, 64), E4( -10, 90),\ + E4( 41, 114), E4( 64, 116), E4( -37, 82), E4( 22, 119), E4( 95, 124),\ + E4( -30, 111), E4( -78, 92), E4( -68, 113), E2( 18, 18), E2( 34, 34),\ + E2( 63, 63), E2( 109, 109) + +#define TAB_1_3 \ + PD( 0, 0), E2( 4, 4), E4( -1, 5), E4( 3, 10), E2( 9, 9),\ + E2( -7, 7), E4( -3, 12), E4( 8, 17), E2( 17, 17), E4( 1, 19),\ + E4( -11, 16), E4( -6, 23), E4( 18, 31), E4( 8, 32), E2( 33, 33),\ + E4( -1, 36), E2( -23, 23), E4( -17, 31), E4( 21, 54), E4( 37, 55),\ + E4( -12, 44), E4( 8, 57), E2( 61, 61), E4( -5, 66), E4( -36, 45),\ + E4( -29, 60), E4( 45, 92), E4( 25, 93), E4( 71, 97), E4( -22, 83),\ + E4( 7, 102), E2( 109, 109), E2( -68, 68), E4( -57, 85), E4( -13, 120),\ + E4( -49, 110), E4(-104, 123), E2( 24, 24), E2( 46, 46), E2( 84, 84) + +#define TAB_1_4 \ + PD( 0, 0), E2( 5, 5), E4( -2, 7), E2( 11, 11), E4( 3, 13),\ + E2( -9, 9), E4( -4, 15), E4( 11, 22), E2( 21, 21), E4( 2, 24),\ + E4( -14, 20), E4( 23, 38), E4( -8, 29), E4( 11, 39), E2( 41, 41),\ + E4( -1, 45), E2( -29, 29), E4( -22, 39), E4( 27, 67), E4( 47, 69),\ + E4( -15, 56), E4( 11, 71), E2( 76, 76), E4( -6, 83), E4( -45, 57),\ + E4( -36, 75), E4( 56, 115), E4( 31, 117), E4( 88, 122), E4( -28, 104),\ + E2( -85, 85), E4( -72, 106), E2( 30, 30), E2( 58, 58), E2( 105, 105) + +#define TAB_1_5 \ + PD( 0, 0), E2( 6, 6), E4( -2, 8), E2( 13, 13), E4( 4, 15),\ + E2( -11, 11), E4( -5, 18), E4( 13, 26), E2( 26, 26), E4( 2, 29),\ + E4( -16, 24), E4( 28, 46), E4( -9, 35), E4( 13, 47), E2( 49, 49),\ + E4( -1, 54), E2( -35, 35), E4( -26, 47), E4( 32, 81), E4( 56, 83),\ + E4( -18, 67), E4( 13, 86), E2( 91, 91), E4( -7, 99), E4( -54, 68),\ + E4( -44, 90), E4( -33, 124), E2(-103, 103), E4( -86, 127), E2( 37, 37),\ + E2( 69, 69) + +#define TAB_1_6 \ + PD( 0, 0), E2( 7, 7), E4( -3, 10), E2( 16, 16), E4( 5, 18),\ + E2( -13, 13), E4( -6, 21), E4( 15, 30), E2( 30, 30), E4( 2, 34),\ + E4( -19, 28), E4( 32, 54), E4( -11, 41), E4( 15, 55), E2( 57, 57),\ + E4( -1, 63), E2( -40, 40), E4( -30, 55), E4( 37, 94), E4( 65, 96),\ + E4( -21, 78), E4( 15, 100), E2( 106, 106), E4( -8, 116), E4( -63, 79),\ + E4( -51, 105), E2(-120, 120), E2( 43, 43), E2( 80, 80) + +#define TAB_1_7 \ + PD( 0, 0), E2( 8, 8), E4( -3, 11), E2( 18, 18), E4( 5, 20),\ + E2( -15, 15), E4( -7, 24), E4( 17, 35), E2( 34, 34), E4( 3, 38),\ + E4( -22, 32), E4( 37, 61), E4( -13, 47), E4( 17, 63), E2( 65, 65),\ + E4( -1, 72), E2( -46, 46), E4( -35, 63), E4( 43, 107), E4( 75, 110),\ + E4( -24, 89), E4( 17, 114), E2( 121, 121), E4( -72, 91), E4( -58, 120),\ + E2( 49, 49), E2( 92, 92) + +#define TAB_1_8 \ + PD( 0, 0), E2( 9, 9), E4( -3, 12), E2( 20, 20), E4( 6, 23),\ + E2( -17, 17), E4( -7, 27), E4( 19, 39), E2( 39, 39), E4( 3, 43),\ + E4( -24, 36), E4( 42, 69), E4( -14, 53), E4( 19, 71), E2( 73, 73),\ + E4( -2, 80), E2( -52, 52), E4( -39, 70), E4( 48, 121), E4( 84, 124),\ + E4( -27, 100), E4( -81, 102), E2( 55, 55), E2( 104, 104) + +#define TAB_2_1 \ + PD( 0, 0), E2( 2, 2), E4( 0, 2), E2( 4, 4), E4( 0, 4),\ + E2( -4, 4), E4( -2, 6), E4( 4, 8), E2( 8, 8), E4( 0, 10),\ + E4( -4, 8), E4( 8, 14), E4( -2, 12), E4( 4, 16), E2( 16, 16),\ + E4( 0, 18), E2( -12, 12), E4( -8, 16), E4( 10, 26), E4( 18, 28),\ + E4( -6, 22), E4( 4, 28), E2( 30, 30), E4( -2, 32), E4( -18, 22),\ + E4( -14, 30), E4( 22, 46), E4( 12, 46), E4( 34, 48), E4( -10, 40),\ + E4( 4, 50), E2( 54, 54), E2( -34, 34), E4( -28, 42), E4( -6, 60),\ + E4( 26, 76), E4( 42, 76), E4( -24, 54), E4( 14, 78), E4( 62, 82),\ + E4( -20, 74), E4( 2, 88), E2( 92, 92), E4( -52, 60), E4( 52, 118),\ + E4( -44, 74), E4( 74, 118), E4( 32, 118), E4( -12, 102), E4( -40, 96),\ + E4( -34, 118), E2( -88, 88), E4( -78, 104), E2( 12, 12), E2( 22, 22),\ + E2( 42, 42), E2( 72, 72) + +#define TAB_2_2 \ + PD( 0, 0), E2( 3, 3), E4( 0, 3), E2( 6, 6), E4( 3, 9),\ + E4( -3, 9), E2( -6, 6), E4( 6, 12), E2( 12, 12), E4( 0, 15),\ + E4( -9, 12), E4( 15, 24), E4( -6, 18), E4( 6, 24), E2( 24, 24),\ + E4( 0, 27), E2( -18, 18), E4( -12, 24), E4( 15, 39), E4( 27, 42),\ + E4( -9, 33), E4( 6, 42), E2( 45, 45), E4( -3, 51), E4( -27, 33),\ + E4( -21, 45), E4( 33, 69), E4( 18, 69), E4( 54, 72), E4( -18, 63),\ + E4( 6, 78), E2( 81, 81), E2( -51, 51), E4( -42, 63), E4( -9, 90),\ + E4( 42, 114), E4( 63, 117), E4( -36, 81), E4( 21, 120), E4( 96, 123),\ + E4( -30, 111), E4( -78, 93), E4( -69, 114), E2( 18, 18), E2( 33, 33),\ + E2( 63, 63), E2( 108, 108) + +#define TAB_2_3 \ + PD( 0, 0), E2( 4, 4), E4( 0, 4), E4( 4, 8), E2( 8, 8),\ + E2( -8, 8), E4( -4, 12), E4( 8, 16), E2( 16, 16), E4( 0, 20),\ + E4( -12, 16), E4( -4, 24), E4( 16, 32), E4( 8, 32), E2( 32, 32),\ + E4( 0, 36), E2( -24, 24), E4( -16, 32), E4( 20, 52), E4( 36, 56),\ + E4( -12, 44), E4( 8, 56), E2( 60, 60), E4( -4, 64), E4( -36, 44),\ + E4( -28, 60), E4( 44, 92), E4( 24, 92), E4( 72, 96), E4( -20, 84),\ + E4( 8, 100), E2( 108, 108), E2( -68, 68), E4( -56, 84), E4( -12, 120),\ + E4( -48, 108), E4(-104, 124), E2( 24, 24), E2( 44, 44), E2( 84, 84) + +#define TAB_2_4 \ + PD( 0, 0), E2( 5, 5), E4( 0, 5), E2( 10, 10), E4( 5, 15),\ + E2( -10, 10), E4( -5, 15), E4( 10, 20), E2( 20, 20), E4( 0, 25),\ + E4( -15, 20), E4( 25, 40), E4( -10, 30), E4( 10, 40), E2( 40, 40),\ + E4( 0, 45), E2( -30, 30), E4( -20, 40), E4( 25, 65), E4( 45, 70),\ + E4( -15, 55), E4( 10, 70), E2( 75, 75), E4( -5, 85), E4( -45, 55),\ + E4( -35, 75), E4( 55, 115), E4( 30, 115), E4( 90, 120), E4( -30, 105),\ + E2( -85, 85), E4( -70, 105), E2( 30, 30), E2( 60, 60), E2( 105, 105) + +#define TAB_2_5 \ + PD( 0, 0), E2( 6, 6), E4( 0, 6), E2( 12, 12), E4( 6, 12),\ + E2( -12, 12), E4( -6, 18), E4( 12, 24), E2( 24, 24), E4( 0, 30),\ + E4( -18, 24), E4( 30, 48), E4( -6, 36), E4( 12, 48), E2( 48, 48),\ + E4( 0, 54), E2( -36, 36), E4( -24, 48), E4( 30, 78), E4( 54, 84),\ + E4( -18, 66), E4( 12, 84), E2( 90, 90), E4( -6, 96), E4( -54, 66),\ + E4( -42, 90), E4( -30, 126), E2(-102, 102), E4( -84, 126), E2( 36, 36),\ + E2( 66, 66) + +#define TAB_2_6 \ + PD( 0, 0), E2( 7, 7), E4( 0, 7), E2( 14, 14), E4( 7, 21),\ + E2( -14, 14), E4( -7, 21), E4( 14, 28), E2( 28, 28), E4( 0, 35),\ + E4( -21, 28), E4( 35, 56), E4( -14, 42), E4( 14, 56), E2( 56, 56),\ + E4( 0, 63), E2( -42, 42), E4( -28, 56), E4( 35, 91), E4( 63, 98),\ + E4( -21, 77), E4( 14, 98), E2( 105, 105), E4( -7, 119), E4( -63, 77),\ + E4( -49, 105), E2(-119, 119), E2( 42, 42), E2( 77, 77) + +#define TAB_2_7 \ + PD( 0, 0), E2( 8, 8), E4( 0, 8), E2( 16, 16), E4( 8, 16),\ + E2( -16, 16), E4( -8, 24), E4( 16, 32), E2( 32, 32), E4( 0, 40),\ + E4( -24, 32), E4( 40, 64), E4( -16, 48), E4( 16, 64), E2( 64, 64),\ + E4( 0, 72), E2( -48, 48), E4( -32, 64), E4( 40, 104), E4( 72, 112),\ + E4( -24, 88), E4( 16, 112), E2( 120, 120), E4( -72, 88), E4( -56, 120),\ + E2( 48, 48), E2( 88, 88) + +#define TAB_2_8 \ + PD( 0, 0), E2( 9, 9), E4( 0, 9), E2( 18, 18), E4( 9, 27),\ + E2( -18, 18), E4( -9, 27), E4( 18, 36), E2( 36, 36), E4( 0, 45),\ + E4( -27, 36), E4( 45, 72), E4( -18, 54), E4( 18, 72), E2( 72, 72),\ + E4( 0, 81), E2( -54, 54), E4( -36, 72), E4( 45, 117), E4( 81, 126),\ + E4( -27, 99), E4( -81, 99), E2( 54, 54), E2( 108, 108) + +#define TAB_3_1 \ + PD( 0, 0), E2( 2, 2), E4( 0, 3), E2( 6, 6), E4( 0, 7),\ + E2( -5, 5), E2( 5, -5), E4( 6, 11), E4( 0, 8), E2( 11, 11),\ + E4( 0, 12), E4( 12, 17), E2( 17, 17), E4( 6, 18), E4( -8, 11),\ + E4( 0, 15), E4( 0, 20), E4( 18, 25), E4( 11, 25), E2( 25, 25),\ + E2( -14, 14), E2( 14, -14), E4( 0, 26), E4( -11, 18), E4( -7, 22),\ + E4( 26, 34), E4( 18, 34), E2( 34, 34), E4( 11, 35), E4( 0, 29),\ + E4( -19, 22), E4( -15, 26), E4( 0, 37), E4( 27, 44), E4( 36, 44),\ + E4( 18, 44), E4( -10, 33), E2( 45, 45) + +#define TAB_3_2 \ + PD( 0, 0), E4( 0, 2), E2( 2, 2), E2( 6, 6), E4( 0, 6),\ + E2( -4, 4), E2( 10, -6), E2( 0, -12), PD( -6, -12), E2( 6, -12),\ + PD( 6, 12), E2( -14, 0), E2( 12, 12), E2( 0, -18), E2( 14, -12),\ + PD( -18, -6), E2( 18, -6), PD( 18, 6), PD( -10, -18), E2( 10, -18),\ + PD( 10, 18), E2( -22, 0), E2( 0, -24), PD( -22, -12), E2( 22, -12),\ + PD( 22, 12), PD( -8, -24), E2( 8, -24), PD( 8, 24), PD( -26, -6),\ + E2( 26, -6), PD( 26, 6), E2( -28, 0), E2( 20, 20), E2( -14, -26),\ + E2( -30, -12), E2( -10, -32), E2( -18, -32), E2( -26, -26), E2( -34, -20),\ + E2( -38, -12), E2( -32, -32), PD( 32, 32), PD( -22, -40), E2( -34, -34) + +#define TAB_3_3 \ + PD( 0, 0), E4( 0, 2), E2( 4, 4), E2( 10, 10), E4( 0, 10),\ + E2( -6, 6), E2( 14, -8), E2( -18, 0), E2( 10, -16), E2( 0, -24),\ + PD( -24, -8), E2( 24, -8), PD( 24, 8), E2( 18, 18), E2( 20, -16),\ + PD( -14, -26), E2( 14, -26), PD( 14, 26), E2( -30, 0), E2( 0, -34),\ + PD( -34, -8), E2( 34, -8), PD( 34, 8), PD( -30, -18), E2( 30, -18),\ + PD( 30, 18), PD( -10, -34), E2( 10, -34), PD( 10, 34), E2( -20, -34),\ + E2( -40, 0), E2( 30, 30), E2( -40, -18), E2( 0, -44), E2( -16, -44),\ + PD( -36, -36), E2( -36, -36), E2( -26, -44), E2( -46, -26), E2( -52, -18),\ + PD( -20, -54), E2( -44, -44), PD( -32, -54), PD( -46, -46), E2( -46, -46) + +#define TAB_3_4 \ + PD( 0, 0), E4( 0, 4), E2( 4, 4), E2( 12, 12), E4( 0, 12),\ + E2( -8, 8), E2( 8, -16), E2( 0, -24), PD( -24, -8), E2( 24, -8),\ + PD( 24, 8), E2( 20, -16), E2( -28, 0), PD( -16, -24), E2( 16, -24),\ + PD( 16, 24), E2( 0, -32), PD( -28, -16), E2( 28, -16), PD( 28, 16),\ + PD( -8, -32), PD( 8, -32), PD( -32, -8), E2( 32, -8), PD( 32, 8),\ + PD( -8, 32), PD( 8, 32), E2( 24, 24), E2( 24, -24), E2( -20, -32),\ + E2( -40, 0), E2( -40, -16), PD( 0, -44), PD( 0, -44), E2( -44, 0),\ + PD( 0, 44), PD( 0, 44), E2( -32, -32), E2( -16, -44), PD( -24, -44),\ + E2( -44, -24), PD( 24, 44), E2( -48, -16), PD( -36, -36), E2( -36, -36),\ + PD( 36, 36), PD( -20, -52), E2( 40, 40), PD( -32, -52) + +#define TAB_3_5 \ + PD( 0, 0), E2( 2, 2), E2( 6, 6), E2( 12, 12), E2( 20, 20),\ + E2( 32, 32), E2( 46, 46) + + +/** + * Pack two delta values (a,b) into one 16bit word + * according with endianess of the host machine. + */ +#if HAVE_BIGENDIAN +#define PD(a,b) (((a) << 8) + (b)) +#else +#define PD(a,b) (((b) << 8) + (a)) +#endif + +/** + * Expand a pair of delta values (a,b) + * into two/four delta entries. + */ +#define E2(a, b) PD(a, b), PD(-a, -b) +#define E4(a, b) PD(a, b), PD(-a, -b), PD(b, a), PD(-b, -a) + +/* + * VQ tables for 4x4 block modes. + * Let the compiler decompress and build the tables for us. + */ +static const int16_t delta_tab_1_1[195] = { TAB_1_1 }; +static const int16_t delta_tab_1_2[159] = { TAB_1_2 }; +static const int16_t delta_tab_1_3[133] = { TAB_1_3 }; +static const int16_t delta_tab_1_4[115] = { TAB_1_4 }; +static const int16_t delta_tab_1_5[101] = { TAB_1_5 }; +static const int16_t delta_tab_1_6[93] = { TAB_1_6 }; +static const int16_t delta_tab_1_7[87] = { TAB_1_7 }; +static const int16_t delta_tab_1_8[77] = { TAB_1_8 }; + +static const int16_t delta_tab_2_1[195] = { TAB_2_1 }; +static const int16_t delta_tab_2_2[159] = { TAB_2_2 }; +static const int16_t delta_tab_2_3[133] = { TAB_2_3 }; +static const int16_t delta_tab_2_4[115] = { TAB_2_4 }; +static const int16_t delta_tab_2_5[101] = { TAB_2_5 }; +static const int16_t delta_tab_2_6[93] = { TAB_2_6 }; +static const int16_t delta_tab_2_7[87] = { TAB_2_7 }; +static const int16_t delta_tab_2_8[77] = { TAB_2_8 }; + +static const int16_t delta_tab_3_1[128] = { TAB_3_1 }; +static const int16_t delta_tab_3_2[79] = { TAB_3_2 }; +static const int16_t delta_tab_3_3[79] = { TAB_3_3 }; +static const int16_t delta_tab_3_4[79] = { TAB_3_4 }; +static const int16_t delta_tab_3_5[79] = { TAB_3_5 }; + +#undef PD + +/** + * Pack four delta values (a,a,b,b) into one 32bit word + * according with endianess of the host machine. + */ +#if HAVE_BIGENDIAN +#define PD(a,b) (((a) << 24) + ((a) << 16) + ((b) << 8) + (b)) +#else +#define PD(a,b) (((b) << 24) + ((b) << 16) + ((a) << 8) + (a)) +#endif + +/* + * VQ tables for 8x8 block modes. + * Those are based on the same delta tables by using + * each value twice: ABCD --> AABBCCDD. + */ +static const int32_t delta_tab_1_1_m10[195] = { TAB_1_1 }; +static const int32_t delta_tab_1_2_m10[159] = { TAB_1_2 }; +static const int32_t delta_tab_1_3_m10[133] = { TAB_1_3 }; +static const int32_t delta_tab_1_4_m10[115] = { TAB_1_4 }; +static const int32_t delta_tab_1_5_m10[101] = { TAB_1_5 }; +static const int32_t delta_tab_1_6_m10[93] = { TAB_1_6 }; +static const int32_t delta_tab_1_7_m10[87] = { TAB_1_7 }; +static const int32_t delta_tab_1_8_m10[77] = { TAB_1_8 }; + +static const int32_t delta_tab_2_1_m10[195] = { TAB_2_1 }; +static const int32_t delta_tab_2_2_m10[159] = { TAB_2_2 }; +static const int32_t delta_tab_2_3_m10[133] = { TAB_2_3 }; +static const int32_t delta_tab_2_4_m10[115] = { TAB_2_4 }; +static const int32_t delta_tab_2_5_m10[101] = { TAB_2_5 }; +static const int32_t delta_tab_2_6_m10[93] = { TAB_2_6 }; +static const int32_t delta_tab_2_7_m10[87] = { TAB_2_7 }; +static const int32_t delta_tab_2_8_m10[77] = { TAB_2_8 }; + +static const int32_t delta_tab_3_1_m10[128] = { TAB_3_1 }; +static const int32_t delta_tab_3_2_m10[79] = { TAB_3_2 }; +static const int32_t delta_tab_3_3_m10[79] = { TAB_3_3 }; +static const int32_t delta_tab_3_4_m10[79] = { TAB_3_4 }; +static const int32_t delta_tab_3_5_m10[79] = { TAB_3_5 }; + + +typedef struct { + const int16_t *deltas; ///< delta tables for 4x4 block modes + const int32_t *deltas_m10; ///< delta tables for 8x8 block modes + uint8_t num_dyads; ///< number of two-pixel deltas + uint8_t quad_exp; ///< log2 of four-pixel deltas +} vqEntry; + +static const vqEntry vq_tab[24] = { + /* set 1 */ + { delta_tab_1_1, delta_tab_1_1_m10, 195, 7 }, + { delta_tab_1_2, delta_tab_1_2_m10, 159, 9 }, + { delta_tab_1_3, delta_tab_1_3_m10, 133, 10 }, + { delta_tab_1_4, delta_tab_1_4_m10, 115, 11 }, + { delta_tab_1_5, delta_tab_1_5_m10, 101, 12 }, + { delta_tab_1_6, delta_tab_1_6_m10, 93, 12 }, + { delta_tab_1_7, delta_tab_1_7_m10, 87, 12 }, + { delta_tab_1_8, delta_tab_1_8_m10, 77, 13 }, + /* set 2 */ + { delta_tab_2_1, delta_tab_2_1_m10, 195, 7 }, + { delta_tab_2_2, delta_tab_2_2_m10, 159, 9 }, + { delta_tab_2_3, delta_tab_2_3_m10, 133, 10 }, + { delta_tab_2_4, delta_tab_2_4_m10, 115, 11 }, + { delta_tab_2_5, delta_tab_2_5_m10, 101, 12 }, + { delta_tab_2_6, delta_tab_2_6_m10, 93, 12 }, + { delta_tab_2_7, delta_tab_2_7_m10, 87, 12 }, + { delta_tab_2_8, delta_tab_2_8_m10, 77, 13 }, -static const uint32_t correctionhighorder[] = { - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, - 0xfeff0303, 0x0100fcfd, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, - 0x0100fcfd, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000, - 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000, 0x02020202, 0xfdfdfdfe, - 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, - 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, - 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, - 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, - 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, - 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, - 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x0403feff, - 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, 0xfcfcfcfd, - 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, 0x03030303, - 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, 0x00000000, - 0x03030303, 0xfcfcfcfd, 0x0403feff, 0xfbfc0101, 0xfeff0404, 0x0100fbfc, 0x07070707, 0xf8f8f8f9, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x04040404, 0xfbfbfbfc, - 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, - 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, - 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, - 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, - 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, - 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, - 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, - 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, - 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, - 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, 0x04040404, 0xfbfbfbfc, - 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, 0x03030a0a, 0x00000000, - 0x04040404, 0xfbfbfbfc, 0x0504feff, 0xfafb0101, 0xfeff0505, 0x0100fafb, 0x0a0a0303, 0xf5f5fcfd, - 0x03030a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, - 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, - 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, - 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, - 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, - 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, - 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, - 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, - 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, - 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, - 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, - 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, - 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x05050505, - 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, - 0xf2f2fcfd, 0x00000000, 0x05050505, 0xfafafafb, 0x0706fdfe, 0xf8f90202, 0xfdfe0707, 0x0201f8f9, - 0x0b0b0b0b, 0xf4f4f4f5, 0x0d0d0303, 0xf2f2fcfd, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, - 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, - 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, - 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, - 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, - 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, - 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, - 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, - 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, - 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, - 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, - 0x04040f0f, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x0807fdfe, 0xf7f80202, 0xfdfe0808, 0x0201f7f8, - 0x0d0d0d0d, 0xf2f2f2f3, 0x0f0f0404, 0xf0f0fbfc, 0x04040f0f, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, - 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, - 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, - 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, - 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, - 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, - 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, - 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, - 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, - 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, - 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, - 0x05051212, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x0a09fcfd, 0xf5f60303, 0xfcfd0a0a, 0x0302f5f6, - 0x10101010, 0xefefeff0, 0x12120505, 0xededfafb, 0x05051212, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, - 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, - 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, - 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, - 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, - 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, - 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, - 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, - 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, - 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, - 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, - 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x0b0afcfd, 0xf4f50303, - 0xfcfd0b0b, 0x0302f4f5, 0x12121212, 0xedededee, 0x14140505, 0xebebfafb, 0x05051414, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x09090909, 0xf6f6f6f7, - 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, - 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, - 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, - 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, - 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, - 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, - 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, - 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, - 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, - 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, - 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, - 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, - 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, - 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, - 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, - 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, - 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, - 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, - 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, - 0xf9f9e8e9, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x0c0bfcfd, 0xf3f40303, 0xfcfd0c0c, 0x0302f3f4, - 0x14141414, 0xebebebec, 0x17170606, 0xe8e8f9fa, 0x06061717, 0xf9f9e8e9, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, - 0x00000202, 0xfffffdfe, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, - 0xfffffdfe, 0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, - 0x00000000, 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000, - 0x02020202, 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000, 0x02020202, - 0xfdfdfdfe, 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000, 0x02020202, 0xfdfdfdfe, - 0x02020000, 0xfdfe0000, 0x00000202, 0xfffffdfe, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, - 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, - 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, - 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, - 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, - 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, - 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, 0x03030000, - 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, 0xfcfcfcfd, - 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, 0x03030303, - 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, 0x00000000, - 0x03030303, 0xfcfcfcfd, 0x03030000, 0xfcfd0000, 0x00000303, 0xfffffcfd, 0x06060606, 0xf9f9f9fa, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x04040404, 0xfbfbfbfc, - 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, - 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, - 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, - 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, - 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, - 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, - 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, - 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, - 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, - 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, 0x04040404, 0xfbfbfbfc, - 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, 0x04040808, 0x00000000, - 0x04040404, 0xfbfbfbfc, 0x04040000, 0xfbfc0000, 0x00000404, 0xfffffbfc, 0x08080404, 0xf7f7fbfc, - 0x04040808, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, - 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, - 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, - 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, - 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, - 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, - 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, - 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, - 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, - 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, - 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, - 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, - 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x05050505, - 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, - 0xf0f0fafb, 0x00000000, 0x05050505, 0xfafafafb, 0x05050000, 0xfafb0000, 0x00000505, 0xfffffafb, - 0x0a0a0a0a, 0xf5f5f5f6, 0x0f0f0505, 0xf0f0fafb, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, - 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, - 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, - 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, - 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, - 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, - 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, - 0x06060c0c, 0x00000000, 0x06060606, 0xf9f9f9fa, 0x06060000, 0xf9fa0000, 0x00000606, 0xfffff9fa, - 0x0c0c0c0c, 0xf3f3f3f4, 0x0c0c0606, 0xf3f3f9fa, 0x06060c0c, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, - 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, - 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, - 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, - 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, - 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, - 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, - 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, - 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, - 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, - 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, - 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, - 0x07071515, 0x00000000, 0x07070707, 0xf8f8f8f9, 0x07070000, 0xf8f90000, 0x00000707, 0xfffff8f9, - 0x0e0e0e0e, 0xf1f1f1f2, 0x15150707, 0xeaeaf8f9, 0x07071515, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, - 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, - 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, - 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, - 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, - 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, - 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, - 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, - 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, - 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, - 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, - 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, - 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, 0x08080808, 0xf7f7f7f8, 0x08080000, 0xf7f80000, - 0x00000808, 0xfffff7f8, 0x10101010, 0xefefeff0, 0x10100808, 0xefeff7f8, 0x08081010, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, 0x09090909, 0xf6f6f6f7, - 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, - 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, - 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, - 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, - 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, - 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, - 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, - 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, - 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, - 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, - 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, - 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, - 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, - 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, - 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, - 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, - 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, - 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, - 0xf6f70000, 0x00000909, 0xfffff6f7, 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, - 0xf6f6e4e5, 0x00000000, 0x09090909, 0xf6f6f6f7, 0x09090000, 0xf6f70000, 0x00000909, 0xfffff6f7, - 0x12121212, 0xedededee, 0x1b1b0909, 0xe4e4f6f7, 0x09091b1b, 0xf6f6e4e5, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, - 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, - 0xfdfdfdfe, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0x03030000, - 0x03030000, 0x03030000, 0x03030000, 0x03030000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, - 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0xfcfd0000, 0x00000303, - 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, 0x00000303, - 0x00000303, 0x00000303, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, - 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0xfffffcfd, 0x06060606, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, - 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, - 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0x07070000, 0xf8f90000, 0xf8f90000, - 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, 0xf8f90000, - 0xf8f90000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, - 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, - 0x02020000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, - 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0x00000202, 0x00000202, - 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, - 0x00000202, 0x00000202, 0x00000202, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, - 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, - 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, - 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, - 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, - 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0x06060000, 0x06060000, 0x06060000, 0x06060000, - 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, 0x06060000, - 0x06060000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, - 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0xf9fa0000, 0x00000606, 0x00000606, - 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, 0x00000606, - 0x00000606, 0x00000606, 0x00000606, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, - 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, 0xfffff9fa, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, - 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, 0x02020000, - 0x02020000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, - 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0xfdfe0000, 0x00000202, 0x00000202, - 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, 0x00000202, - 0x00000202, 0x00000202, 0x00000202, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, - 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, 0xfffffdfe, - 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, - 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, - 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, - 0xfbfbfbfc, 0xfbfbfbfc, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, - 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0x0a0a0a0a, 0xf5f5f5f6, - 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, - 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0xf5f5f5f6, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, - 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, 0x0a0a0000, - 0x0a0a0000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, - 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0xf5f60000, 0x00000a0a, 0x00000a0a, - 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, 0x00000a0a, - 0x00000a0a, 0x00000a0a, 0x00000a0a, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, - 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, 0xfffff5f6, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, - 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, 0x04040000, - 0x04040000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, - 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0xfbfc0000, 0x00000404, 0x00000404, - 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, 0x00000404, - 0x00000404, 0x00000404, 0x00000404, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, - 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, 0xfffffbfc, - 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, - 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0x04040404, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, - 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, 0xfbfbfbfc, - 0xfbfbfbfc, 0xfbfbfbfc, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, - 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, - 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, - 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, - 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, 0x0c0c0000, - 0x0c0c0000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, - 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0xf3f40000, 0x00000c0c, 0x00000c0c, - 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, 0x00000c0c, - 0x00000c0c, 0x00000c0c, 0x00000c0c, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, - 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, 0xfffff3f4, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, - 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, - 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, - 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, - 0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, - 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec, - 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, - 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020, - 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, - 0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, - 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e, - 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, - 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, - 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, - 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, - 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, - 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, - 0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, - 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec, - 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, - 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020, - 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, - 0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, - 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e, - 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, - 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, - 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, - 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, - 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, - 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, - 0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, - 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec, - 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, - 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020, - 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, - 0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, - 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e, - 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, - 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, - 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, - 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, - 0x02020202, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, - 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0xfdfdfdfe, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, 0x06060606, - 0x06060606, 0x06060606, 0x06060606, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, 0xf9f9f9fa, - 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, - 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0x0c0c0c0c, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, - 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, 0xf3f3f3f4, - 0xf3f3f3f4, 0xf3f3f3f4, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, - 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0x14141414, 0xebebebec, - 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, - 0xebebebec, 0xebebebec, 0xebebebec, 0xebebebec, 0x20202020, 0x20202020, 0x20202020, 0x20202020, - 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, 0x20202020, - 0x20202020, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, - 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0xdfdfdfe0, 0x2e2e2e2e, 0x2e2e2e2e, - 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, - 0x2e2e2e2e, 0x2e2e2e2e, 0x2e2e2e2e, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, - 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, 0xd1d1d1d2, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 + /* set 3 */ + { delta_tab_3_1, delta_tab_3_1_m10, 128, 11 }, + { delta_tab_3_2, delta_tab_3_2_m10, 79, 13 }, + { delta_tab_3_3, delta_tab_3_3_m10, 79, 13 }, + { delta_tab_3_4, delta_tab_3_4_m10, 79, 13 }, + { delta_tab_3_5, delta_tab_3_5_m10, 79, 13 }, + { delta_tab_3_5, delta_tab_3_5_m10, 79, 13 }, + { delta_tab_3_5, delta_tab_3_5_m10, 79, 13 }, + { delta_tab_3_5, delta_tab_3_5_m10, 79, 13 } }; #endif /* AVCODEC_INDEO3DATA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo4.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo4.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo4.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo4.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,826 @@ +/* + * Indeo Video Interactive v4 compatible decoder + * Copyright (c) 2009-2011 Maxim Poliakovski + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Indeo Video Interactive version 4 decoder + * + * Indeo 4 data is usually transported within .avi or .mov files. + * Known FOURCCs: 'IV41' + */ + +#define BITSTREAM_READER_LE +#include "avcodec.h" +#include "get_bits.h" +#include "dsputil.h" +#include "ivi_dsp.h" +#include "ivi_common.h" +#include "indeo4data.h" + +#define IVI4_STREAM_ANALYSER 0 +#define IVI4_DEBUG_CHECKSUM 0 + +/** + * Indeo 4 frame types. + */ +enum { + FRAMETYPE_INTRA = 0, + FRAMETYPE_BIDIR1 = 1, ///< bidirectional frame + FRAMETYPE_INTER = 2, ///< non-droppable P-frame + FRAMETYPE_BIDIR = 3, ///< bidirectional frame + FRAMETYPE_INTER_NOREF = 4, ///< droppable P-frame + FRAMETYPE_NULL_FIRST = 5, ///< empty frame with no data + FRAMETYPE_NULL_LAST = 6 ///< empty frame with no data +}; + +#define IVI4_PIC_SIZE_ESC 7 + + +typedef struct { + GetBitContext gb; + AVFrame frame; + RVMapDesc rvmap_tabs[9]; ///< local corrected copy of the static rvmap tables + + uint32_t frame_num; + int frame_type; + int prev_frame_type; ///< frame type of the previous frame + uint32_t data_size; ///< size of the frame data in bytes from picture header + int is_scalable; + int transp_status; ///< transparency mode status: 1 - enabled + + IVIPicConfig pic_conf; + IVIPlaneDesc planes[3]; ///< color planes + + int buf_switch; ///< used to switch between three buffers + int dst_buf; ///< buffer index for the currently decoded frame + int ref_buf; ///< inter frame reference buffer index + + IVIHuffTab mb_vlc; ///< current macroblock table descriptor + IVIHuffTab blk_vlc; ///< current block table descriptor + + uint16_t checksum; ///< frame checksum + + uint8_t rvmap_sel; + uint8_t in_imf; + uint8_t in_q; ///< flag for explicitly stored quantiser delta + uint8_t pic_glob_quant; + uint8_t unknown1; + +#if IVI4_STREAM_ANALYSER + uint8_t has_b_frames; + uint8_t has_transp; + uint8_t uses_tiling; + uint8_t uses_haar; + uint8_t uses_fullpel; +#endif +} IVI4DecContext; + + +struct { + InvTransformPtr *inv_trans; + DCTransformPtr *dc_trans; + int is_2d_trans; +} transforms[18] = { + { ff_ivi_inverse_haar_8x8, ff_ivi_dc_haar_2d, 1 }, + { NULL, NULL, 0 }, /* inverse Haar 8x1 */ + { NULL, NULL, 0 }, /* inverse Haar 1x8 */ + { ff_ivi_put_pixels_8x8, ff_ivi_put_dc_pixel_8x8, 1 }, + { ff_ivi_inverse_slant_8x8, ff_ivi_dc_slant_2d, 1 }, + { ff_ivi_row_slant8, ff_ivi_dc_row_slant, 1 }, + { ff_ivi_col_slant8, ff_ivi_dc_col_slant, 1 }, + { NULL, NULL, 0 }, /* inverse DCT 8x8 */ + { NULL, NULL, 0 }, /* inverse DCT 8x1 */ + { NULL, NULL, 0 }, /* inverse DCT 1x8 */ + { NULL, NULL, 0 }, /* inverse Haar 4x4 */ + { ff_ivi_inverse_slant_4x4, ff_ivi_dc_slant_2d, 1 }, + { NULL, NULL, 0 }, /* no transform 4x4 */ + { NULL, NULL, 0 }, /* inverse Haar 1x4 */ + { NULL, NULL, 0 }, /* inverse Haar 4x1 */ + { NULL, NULL, 0 }, /* inverse slant 1x4 */ + { NULL, NULL, 0 }, /* inverse slant 4x1 */ + { NULL, NULL, 0 }, /* inverse DCT 4x4 */ +}; + +/** + * Decode subdivision of a plane. + * This is a simplified version that checks for two supported subdivisions: + * - 1 wavelet band per plane, size factor 1:1, code pattern: 3 + * - 4 wavelet bands per plane, size factor 1:4, code pattern: 2,3,3,3,3 + * Anything else is either unsupported or corrupt. + * + * @param[in,out] gb the GetBit context + * @return number of wavelet bands or 0 on error + */ +static int decode_plane_subdivision(GetBitContext *gb) +{ + int i; + + switch (get_bits(gb, 2)) { + case 3: + return 1; + case 2: + for (i = 0; i < 4; i++) + if (get_bits(gb, 2) != 3) + return 0; + return 4; + default: + return 0; + } +} + +static inline int scale_tile_size(int def_size, int size_factor) +{ + return size_factor == 15 ? def_size : (size_factor + 1) << 5; +} + +/** + * Decode Indeo 4 picture header. + * + * @param[in,out] ctx pointer to the decoder context + * @param[in] avctx pointer to the AVCodecContext + * @return result code: 0 = OK, negative number = error + */ +static int decode_pic_hdr(IVI4DecContext *ctx, AVCodecContext *avctx) +{ + int pic_size_indx, i, p; + IVIPicConfig pic_conf; + + if (get_bits(&ctx->gb, 18) != 0x3FFF8) { + av_log(avctx, AV_LOG_ERROR, "Invalid picture start code!\n"); + return AVERROR_INVALIDDATA; + } + + ctx->prev_frame_type = ctx->frame_type; + ctx->frame_type = get_bits(&ctx->gb, 3); + if (ctx->frame_type == 7) { + av_log(avctx, AV_LOG_ERROR, "Invalid frame type: %d\n", ctx->frame_type); + return AVERROR_INVALIDDATA; + } + +#if IVI4_STREAM_ANALYSER + if ( ctx->frame_type == FRAMETYPE_BIDIR1 + || ctx->frame_type == FRAMETYPE_BIDIR) + ctx->has_b_frames = 1; +#endif + + ctx->transp_status = get_bits1(&ctx->gb); +#if IVI4_STREAM_ANALYSER + if (ctx->transp_status) { + ctx->has_transp = 1; + } +#endif + + /* unknown bit: Mac decoder ignores this bit, XANIM returns error */ + if (get_bits1(&ctx->gb)) { + av_log(avctx, AV_LOG_ERROR, "Sync bit is set!\n"); + return AVERROR_INVALIDDATA; + } + + ctx->data_size = get_bits1(&ctx->gb) ? get_bits(&ctx->gb, 24) : 0; + + /* null frames don't contain anything else so we just return */ + if (ctx->frame_type >= FRAMETYPE_NULL_FIRST) { + av_dlog(avctx, "Null frame encountered!\n"); + return 0; + } + + /* Check key lock status. If enabled - ignore lock word. */ + /* Usually we have to prompt the user for the password, but */ + /* we don't do that because Indeo 4 videos can be decoded anyway */ + if (get_bits1(&ctx->gb)) { + skip_bits_long(&ctx->gb, 32); + av_dlog(avctx, "Password-protected clip!\n"); + } + + pic_size_indx = get_bits(&ctx->gb, 3); + if (pic_size_indx == IVI4_PIC_SIZE_ESC) { + pic_conf.pic_height = get_bits(&ctx->gb, 16); + pic_conf.pic_width = get_bits(&ctx->gb, 16); + } else { + pic_conf.pic_height = ivi4_common_pic_sizes[pic_size_indx * 2 + 1]; + pic_conf.pic_width = ivi4_common_pic_sizes[pic_size_indx * 2 ]; + } + + /* Decode tile dimensions. */ + if (get_bits1(&ctx->gb)) { + pic_conf.tile_height = scale_tile_size(pic_conf.pic_height, get_bits(&ctx->gb, 4)); + pic_conf.tile_width = scale_tile_size(pic_conf.pic_width, get_bits(&ctx->gb, 4)); +#if IVI4_STREAM_ANALYSER + ctx->uses_tiling = 1; +#endif + } else { + pic_conf.tile_height = pic_conf.pic_height; + pic_conf.tile_width = pic_conf.pic_width; + } + + /* Decode chroma subsampling. We support only 4:4 aka YVU9. */ + if (get_bits(&ctx->gb, 2)) { + av_log(avctx, AV_LOG_ERROR, "Only YVU9 picture format is supported!\n"); + return AVERROR_INVALIDDATA; + } + pic_conf.chroma_height = (pic_conf.pic_height + 3) >> 2; + pic_conf.chroma_width = (pic_conf.pic_width + 3) >> 2; + + /* decode subdivision of the planes */ + pic_conf.luma_bands = decode_plane_subdivision(&ctx->gb); + if (pic_conf.luma_bands) + pic_conf.chroma_bands = decode_plane_subdivision(&ctx->gb); + ctx->is_scalable = pic_conf.luma_bands != 1 || pic_conf.chroma_bands != 1; + if (ctx->is_scalable && (pic_conf.luma_bands != 4 || pic_conf.chroma_bands != 1)) { + av_log(avctx, AV_LOG_ERROR, "Scalability: unsupported subdivision! Luma bands: %d, chroma bands: %d\n", + pic_conf.luma_bands, pic_conf.chroma_bands); + return AVERROR_INVALIDDATA; + } + + /* check if picture layout was changed and reallocate buffers */ + if (ivi_pic_config_cmp(&pic_conf, &ctx->pic_conf)) { + if (ff_ivi_init_planes(ctx->planes, &pic_conf)) { + av_log(avctx, AV_LOG_ERROR, "Couldn't reallocate color planes!\n"); + return AVERROR(ENOMEM); + } + + ctx->pic_conf = pic_conf; + + /* set default macroblock/block dimensions */ + for (p = 0; p <= 2; p++) { + for (i = 0; i < (!p ? pic_conf.luma_bands : pic_conf.chroma_bands); i++) { + ctx->planes[p].bands[i].mb_size = !p ? (!ctx->is_scalable ? 16 : 8) : 4; + ctx->planes[p].bands[i].blk_size = !p ? 8 : 4; + } + } + + if (ff_ivi_init_tiles(ctx->planes, ctx->pic_conf.tile_width, + ctx->pic_conf.tile_height)) { + av_log(avctx, AV_LOG_ERROR, + "Couldn't reallocate internal structures!\n"); + return AVERROR(ENOMEM); + } + } + + ctx->frame_num = get_bits1(&ctx->gb) ? get_bits(&ctx->gb, 20) : 0; + + /* skip decTimeEst field if present */ + if (get_bits1(&ctx->gb)) + skip_bits(&ctx->gb, 8); + + /* decode macroblock and block huffman codebooks */ + if (ff_ivi_dec_huff_desc(&ctx->gb, get_bits1(&ctx->gb), IVI_MB_HUFF, &ctx->mb_vlc, avctx) || + ff_ivi_dec_huff_desc(&ctx->gb, get_bits1(&ctx->gb), IVI_BLK_HUFF, &ctx->blk_vlc, avctx)) + return AVERROR_INVALIDDATA; + + ctx->rvmap_sel = get_bits1(&ctx->gb) ? get_bits(&ctx->gb, 3) : 8; + + ctx->in_imf = get_bits1(&ctx->gb); + ctx->in_q = get_bits1(&ctx->gb); + + ctx->pic_glob_quant = get_bits(&ctx->gb, 5); + + /* TODO: ignore this parameter if unused */ + ctx->unknown1 = get_bits1(&ctx->gb) ? get_bits(&ctx->gb, 3) : 0; + + ctx->checksum = get_bits1(&ctx->gb) ? get_bits(&ctx->gb, 16) : 0; + + /* skip picture header extension if any */ + while (get_bits1(&ctx->gb)) { + av_dlog(avctx, "Pic hdr extension encountered!\n"); + skip_bits(&ctx->gb, 8); + } + + if (get_bits1(&ctx->gb)) { + av_log(avctx, AV_LOG_ERROR, "Bad blocks bits encountered!\n"); + } + + align_get_bits(&ctx->gb); + + return 0; +} + + +/** + * Decode Indeo 4 band header. + * + * @param[in,out] ctx pointer to the decoder context + * @param[in,out] band pointer to the band descriptor + * @param[in] avctx pointer to the AVCodecContext + * @return result code: 0 = OK, negative number = error + */ +static int decode_band_hdr(IVI4DecContext *ctx, IVIBandDesc *band, + AVCodecContext *avctx) +{ + int plane, band_num, indx, transform_id, scan_indx; + int i; + + plane = get_bits(&ctx->gb, 2); + band_num = get_bits(&ctx->gb, 4); + if (band->plane != plane || band->band_num != band_num) { + av_log(avctx, AV_LOG_ERROR, "Invalid band header sequence!\n"); + return AVERROR_INVALIDDATA; + } + + band->is_empty = get_bits1(&ctx->gb); + if (!band->is_empty) { + /* skip header size + * If header size is not given, header size is 4 bytes. */ + if (get_bits1(&ctx->gb)) + skip_bits(&ctx->gb, 16); + + band->is_halfpel = get_bits(&ctx->gb, 2); + if (band->is_halfpel >= 2) { + av_log(avctx, AV_LOG_ERROR, "Invalid/unsupported mv resolution: %d!\n", + band->is_halfpel); + return AVERROR_INVALIDDATA; + } +#if IVI4_STREAM_ANALYSER + if (!band->is_halfpel) + ctx->uses_fullpel = 1; +#endif + + band->checksum_present = get_bits1(&ctx->gb); + if (band->checksum_present) + band->checksum = get_bits(&ctx->gb, 16); + + indx = get_bits(&ctx->gb, 2); + if (indx == 3) { + av_log(avctx, AV_LOG_ERROR, "Invalid block size!\n"); + return AVERROR_INVALIDDATA; + } + band->mb_size = 16 >> indx; + band->blk_size = 8 >> (indx >> 1); + + band->inherit_mv = get_bits1(&ctx->gb); + band->inherit_qdelta = get_bits1(&ctx->gb); + + band->glob_quant = get_bits(&ctx->gb, 5); + + if (!get_bits1(&ctx->gb) || ctx->frame_type == FRAMETYPE_INTRA) { + transform_id = get_bits(&ctx->gb, 5); + if (!transforms[transform_id].inv_trans) { + av_log_ask_for_sample(avctx, "Unimplemented transform: %d!\n", transform_id); + return AVERROR_PATCHWELCOME; + } + if ((transform_id >= 7 && transform_id <= 9) || + transform_id == 17) { + av_log_ask_for_sample(avctx, "DCT transform not supported yet!\n"); + return AVERROR_PATCHWELCOME; + } + +#if IVI4_STREAM_ANALYSER + if ((transform_id >= 0 && transform_id <= 2) || transform_id == 10) + ctx->uses_haar = 1; +#endif + + band->inv_transform = transforms[transform_id].inv_trans; + band->dc_transform = transforms[transform_id].dc_trans; + band->is_2d_trans = transforms[transform_id].is_2d_trans; + + scan_indx = get_bits(&ctx->gb, 4); + if (scan_indx == 15) { + av_log(avctx, AV_LOG_ERROR, "Custom scan pattern encountered!\n"); + return AVERROR_INVALIDDATA; + } + band->scan = scan_index_to_tab[scan_indx]; + + band->quant_mat = get_bits(&ctx->gb, 5); + if (band->quant_mat == 31) { + av_log(avctx, AV_LOG_ERROR, "Custom quant matrix encountered!\n"); + return AVERROR_INVALIDDATA; + } + } + + /* decode block huffman codebook */ + if (ff_ivi_dec_huff_desc(&ctx->gb, get_bits1(&ctx->gb), IVI_BLK_HUFF, + &band->blk_vlc, avctx)) + return AVERROR_INVALIDDATA; + + /* select appropriate rvmap table for this band */ + band->rvmap_sel = get_bits1(&ctx->gb) ? get_bits(&ctx->gb, 3) : 8; + + /* decode rvmap probability corrections if any */ + band->num_corr = 0; /* there is no corrections */ + if (get_bits1(&ctx->gb)) { + band->num_corr = get_bits(&ctx->gb, 8); /* get number of correction pairs */ + if (band->num_corr > 61) { + av_log(avctx, AV_LOG_ERROR, "Too many corrections: %d\n", + band->num_corr); + return AVERROR_INVALIDDATA; + } + + /* read correction pairs */ + for (i = 0; i < band->num_corr * 2; i++) + band->corr[i] = get_bits(&ctx->gb, 8); + } + } + + if (band->blk_size == 8) { + band->intra_base = &ivi4_quant_8x8_intra[quant_index_to_tab[band->quant_mat]][0]; + band->inter_base = &ivi4_quant_8x8_inter[quant_index_to_tab[band->quant_mat]][0]; + } else { + band->intra_base = &ivi4_quant_4x4_intra[quant_index_to_tab[band->quant_mat]][0]; + band->inter_base = &ivi4_quant_4x4_inter[quant_index_to_tab[band->quant_mat]][0]; + } + + /* Indeo 4 doesn't use scale tables */ + band->intra_scale = NULL; + band->inter_scale = NULL; + + align_get_bits(&ctx->gb); + + return 0; +} + + +/** + * Decode information (block type, cbp, quant delta, motion vector) + * for all macroblocks in the current tile. + * + * @param[in,out] ctx pointer to the decoder context + * @param[in,out] band pointer to the band descriptor + * @param[in,out] tile pointer to the tile descriptor + * @param[in] avctx pointer to the AVCodecContext + * @return result code: 0 = OK, negative number = error + */ +static int decode_mb_info(IVI4DecContext *ctx, IVIBandDesc *band, + IVITile *tile, AVCodecContext *avctx) +{ + int x, y, mv_x, mv_y, mv_delta, offs, mb_offset, blks_per_mb, + mv_scale, mb_type_bits; + IVIMbInfo *mb, *ref_mb; + int row_offset = band->mb_size * band->pitch; + + mb = tile->mbs; + ref_mb = tile->ref_mbs; + offs = tile->ypos * band->pitch + tile->xpos; + + blks_per_mb = band->mb_size != band->blk_size ? 4 : 1; + mb_type_bits = ctx->frame_type == FRAMETYPE_BIDIR ? 2 : 1; + + /* scale factor for motion vectors */ + mv_scale = (ctx->planes[0].bands[0].mb_size >> 3) - (band->mb_size >> 3); + mv_x = mv_y = 0; + + for (y = tile->ypos; y < tile->ypos + tile->height; y += band->mb_size) { + mb_offset = offs; + + for (x = tile->xpos; x < tile->xpos + tile->width; x += band->mb_size) { + mb->xpos = x; + mb->ypos = y; + mb->buf_offs = mb_offset; + + if (get_bits1(&ctx->gb)) { + if (ctx->frame_type == FRAMETYPE_INTRA) { + av_log(avctx, AV_LOG_ERROR, "Empty macroblock in an INTRA picture!\n"); + return AVERROR_INVALIDDATA; + } + mb->type = 1; /* empty macroblocks are always INTER */ + mb->cbp = 0; /* all blocks are empty */ + + mb->q_delta = 0; + if (!band->plane && !band->band_num && ctx->in_q) { + mb->q_delta = get_vlc2(&ctx->gb, ctx->mb_vlc.tab->table, + IVI_VLC_BITS, 1); + mb->q_delta = IVI_TOSIGNED(mb->q_delta); + } + + mb->mv_x = mb->mv_y = 0; /* no motion vector coded */ + if (band->inherit_mv) { + /* motion vector inheritance */ + if (mv_scale) { + mb->mv_x = ivi_scale_mv(ref_mb->mv_x, mv_scale); + mb->mv_y = ivi_scale_mv(ref_mb->mv_y, mv_scale); + } else { + mb->mv_x = ref_mb->mv_x; + mb->mv_y = ref_mb->mv_y; + } + } + } else { + if (band->inherit_mv) { + mb->type = ref_mb->type; /* copy mb_type from corresponding reference mb */ + } else if (ctx->frame_type == FRAMETYPE_INTRA) { + mb->type = 0; /* mb_type is always INTRA for intra-frames */ + } else { + mb->type = get_bits(&ctx->gb, mb_type_bits); + } + + mb->cbp = get_bits(&ctx->gb, blks_per_mb); + + mb->q_delta = 0; + if (band->inherit_qdelta) { + if (ref_mb) mb->q_delta = ref_mb->q_delta; + } else if (mb->cbp || (!band->plane && !band->band_num && + ctx->in_q)) { + mb->q_delta = get_vlc2(&ctx->gb, ctx->mb_vlc.tab->table, + IVI_VLC_BITS, 1); + mb->q_delta = IVI_TOSIGNED(mb->q_delta); + } + + if (!mb->type) { + mb->mv_x = mb->mv_y = 0; /* there is no motion vector in intra-macroblocks */ + } else { + if (band->inherit_mv) { + /* motion vector inheritance */ + if (mv_scale) { + mb->mv_x = ivi_scale_mv(ref_mb->mv_x, mv_scale); + mb->mv_y = ivi_scale_mv(ref_mb->mv_y, mv_scale); + } else { + mb->mv_x = ref_mb->mv_x; + mb->mv_y = ref_mb->mv_y; + } + } else { + /* decode motion vector deltas */ + mv_delta = get_vlc2(&ctx->gb, ctx->mb_vlc.tab->table, + IVI_VLC_BITS, 1); + mv_y += IVI_TOSIGNED(mv_delta); + mv_delta = get_vlc2(&ctx->gb, ctx->mb_vlc.tab->table, + IVI_VLC_BITS, 1); + mv_x += IVI_TOSIGNED(mv_delta); + mb->mv_x = mv_x; + mb->mv_y = mv_y; + } + } + } + + mb++; + if (ref_mb) + ref_mb++; + mb_offset += band->mb_size; + } + + offs += row_offset; + } + + align_get_bits(&ctx->gb); + + return 0; +} + + +/** + * Decode an Indeo 4 band. + * + * @param[in,out] ctx pointer to the decoder context + * @param[in,out] band pointer to the band descriptor + * @param[in] avctx pointer to the AVCodecContext + * @return result code: 0 = OK, negative number = error + */ +static int decode_band(IVI4DecContext *ctx, int plane_num, + IVIBandDesc *band, AVCodecContext *avctx) +{ + int result, i, t, pos, idx1, idx2; + IVITile *tile; + + band->buf = band->bufs[ctx->dst_buf]; + band->ref_buf = band->bufs[ctx->ref_buf]; + + result = decode_band_hdr(ctx, band, avctx); + if (result) { + av_log(avctx, AV_LOG_ERROR, "Error decoding band header\n"); + return result; + } + + if (band->is_empty) { + av_log(avctx, AV_LOG_ERROR, "Empty band encountered!\n"); + return AVERROR_INVALIDDATA; + } + + band->rv_map = &ctx->rvmap_tabs[band->rvmap_sel]; + + /* apply corrections to the selected rvmap table if present */ + for (i = 0; i < band->num_corr; i++) { + idx1 = band->corr[i * 2]; + idx2 = band->corr[i * 2 + 1]; + FFSWAP(uint8_t, band->rv_map->runtab[idx1], band->rv_map->runtab[idx2]); + FFSWAP(int16_t, band->rv_map->valtab[idx1], band->rv_map->valtab[idx2]); + } + + pos = get_bits_count(&ctx->gb); + + for (t = 0; t < band->num_tiles; t++) { + tile = &band->tiles[t]; + + tile->is_empty = get_bits1(&ctx->gb); + if (tile->is_empty) { + ff_ivi_process_empty_tile(avctx, band, tile, + (ctx->planes[0].bands[0].mb_size >> 3) - (band->mb_size >> 3)); + av_dlog(avctx, "Empty tile encountered!\n"); + } else { + tile->data_size = ff_ivi_dec_tile_data_size(&ctx->gb); + if (!tile->data_size) { + av_log(avctx, AV_LOG_ERROR, "Tile data size is zero!\n"); + return AVERROR_INVALIDDATA; + } + + result = decode_mb_info(ctx, band, tile, avctx); + if (result < 0) + break; + + result = ff_ivi_decode_blocks(&ctx->gb, band, tile); + if (result < 0 || ((get_bits_count(&ctx->gb) - pos) >> 3) != tile->data_size) { + av_log(avctx, AV_LOG_ERROR, "Corrupted tile data encountered!\n"); + break; + } + + pos += tile->data_size << 3; // skip to next tile + } + } + + /* restore the selected rvmap table by applying its corrections in reverse order */ + for (i = band->num_corr - 1; i >= 0; i--) { + idx1 = band->corr[i * 2]; + idx2 = band->corr[i * 2 + 1]; + FFSWAP(uint8_t, band->rv_map->runtab[idx1], band->rv_map->runtab[idx2]); + FFSWAP(int16_t, band->rv_map->valtab[idx1], band->rv_map->valtab[idx2]); + } + +#if defined(DEBUG) && IVI4_DEBUG_CHECKSUM + if (band->checksum_present) { + uint16_t chksum = ivi_calc_band_checksum(band); + if (chksum != band->checksum) { + av_log(avctx, AV_LOG_ERROR, + "Band checksum mismatch! Plane %d, band %d, received: %x, calculated: %x\n", + band->plane, band->band_num, band->checksum, chksum); + } + } +#endif + + align_get_bits(&ctx->gb); + + return 0; +} + + +static av_cold int decode_init(AVCodecContext *avctx) +{ + IVI4DecContext *ctx = avctx->priv_data; + + ff_ivi_init_static_vlc(); + + /* copy rvmap tables in our context so we can apply changes to them */ + memcpy(ctx->rvmap_tabs, ff_ivi_rvmap_tabs, sizeof(ff_ivi_rvmap_tabs)); + + /* Force allocation of the internal buffers */ + /* during picture header decoding. */ + ctx->pic_conf.pic_width = 0; + ctx->pic_conf.pic_height = 0; + + avctx->pix_fmt = PIX_FMT_YUV410P; + + return 0; +} + + +/** + * Rearrange decoding and reference buffers. + * + * @param[in,out] ctx pointer to the decoder context + */ +static void switch_buffers(IVI4DecContext *ctx) +{ + switch (ctx->prev_frame_type) { + case FRAMETYPE_INTRA: + case FRAMETYPE_INTER: + ctx->buf_switch ^= 1; + ctx->dst_buf = ctx->buf_switch; + ctx->ref_buf = ctx->buf_switch ^ 1; + break; + case FRAMETYPE_INTER_NOREF: + break; + } + + switch (ctx->frame_type) { + case FRAMETYPE_INTRA: + ctx->buf_switch = 0; + /* FALLTHROUGH */ + case FRAMETYPE_INTER: + ctx->dst_buf = ctx->buf_switch; + ctx->ref_buf = ctx->buf_switch ^ 1; + break; + case FRAMETYPE_INTER_NOREF: + case FRAMETYPE_NULL_FIRST: + case FRAMETYPE_NULL_LAST: + break; + } +} + + +static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, + AVPacket *avpkt) +{ + IVI4DecContext *ctx = avctx->priv_data; + const uint8_t *buf = avpkt->data; + int buf_size = avpkt->size; + int result, p, b; + + init_get_bits(&ctx->gb, buf, buf_size * 8); + + result = decode_pic_hdr(ctx, avctx); + if (result) { + av_log(avctx, AV_LOG_ERROR, "Error decoding picture header\n"); + return result; + } + + switch_buffers(ctx); + + if (ctx->frame_type < FRAMETYPE_NULL_FIRST) { + for (p = 0; p < 3; p++) { + for (b = 0; b < ctx->planes[p].num_bands; b++) { + result = decode_band(ctx, p, &ctx->planes[p].bands[b], avctx); + if (result) { + av_log(avctx, AV_LOG_ERROR, + "Error decoding band: %d, plane: %d\n", b, p); + return result; + } + } + } + } + + /* If the bidirectional mode is enabled, next I and the following P frame will */ + /* be sent together. Unfortunately the approach below seems to be the only way */ + /* to handle the B-frames mode. That's exactly the same Intel decoders do. */ + if (ctx->frame_type == FRAMETYPE_INTRA) { + while (get_bits(&ctx->gb, 8)); // skip version string + skip_bits_long(&ctx->gb, 64); // skip padding, TODO: implement correct 8-bytes alignment + if (get_bits_left(&ctx->gb) > 18 && show_bits(&ctx->gb, 18) == 0x3FFF8) + av_log(avctx, AV_LOG_ERROR, "Buffer contains IP frames!\n"); + } + + if (ctx->frame.data[0]) + avctx->release_buffer(avctx, &ctx->frame); + + ctx->frame.reference = 0; + if ((result = avctx->get_buffer(avctx, &ctx->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return result; + } + + if (ctx->is_scalable) { + ff_ivi_recompose_haar(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4); + } else { + ff_ivi_output_plane(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]); + } + + ff_ivi_output_plane(&ctx->planes[2], ctx->frame.data[1], ctx->frame.linesize[1]); + ff_ivi_output_plane(&ctx->planes[1], ctx->frame.data[2], ctx->frame.linesize[2]); + + *data_size = sizeof(AVFrame); + *(AVFrame*)data = ctx->frame; + + return buf_size; +} + + +static av_cold int decode_close(AVCodecContext *avctx) +{ + IVI4DecContext *ctx = avctx->priv_data; + + ff_ivi_free_buffers(&ctx->planes[0]); + + if (ctx->frame.data[0]) + avctx->release_buffer(avctx, &ctx->frame); + +#if IVI4_STREAM_ANALYSER + if (ctx->is_scalable) + av_log(avctx, AV_LOG_ERROR, "This video uses scalability mode!\n"); + if (ctx->uses_tiling) + av_log(avctx, AV_LOG_ERROR, "This video uses local decoding!\n"); + if (ctx->has_b_frames) + av_log(avctx, AV_LOG_ERROR, "This video contains B-frames!\n"); + if (ctx->has_transp) + av_log(avctx, AV_LOG_ERROR, "Transparency mode is enabled!\n"); + if (ctx->uses_haar) + av_log(avctx, AV_LOG_ERROR, "This video uses Haar transform!\n"); + if (ctx->uses_fullpel) + av_log(avctx, AV_LOG_ERROR, "This video uses fullpel motion vectors!\n"); +#endif + + return 0; +} + + +AVCodec ff_indeo4_decoder = { + .name = "indeo4", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_INDEO4, + .priv_data_size = sizeof(IVI4DecContext), + .init = decode_init, + .close = decode_close, + .decode = decode_frame, + .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 4"), +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo4data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo4data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo4data.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo4data.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,350 @@ +/* + * Indeo Video Interactive 4 compatible decoder + * Copyright (c) 2009-2010 Maxim Poliakovski + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * This file contains data needed for the Indeo 4 decoder. + */ + +#ifndef AVCODEC_INDEO4DATA_H +#define AVCODEC_INDEO4DATA_H + +#include +#include "dsputil.h" +#include "ivi_common.h" + +/** + * standard picture dimensions + */ +static const uint16_t ivi4_common_pic_sizes[14] = { + 640, 480, 320, 240, 160, 120, 704, 480, 352, 240, 352, 288, 176, 144 +}; + +/** + * Indeo 4 8x8 scan (zigzag) patterns + */ +static const uint8_t ivi4_alternate_scan_8x8[64] = { + 0, 8, 1, 9, 16, 24, 2, 3, 17, 25, 10, 11, 32, 40, 48, 56, + 4, 5, 6, 7, 33, 41, 49, 57, 18, 19, 26, 27, 12, 13, 14, 15, + 34, 35, 43, 42, 50, 51, 59, 58, 20, 21, 22, 23, 31, 30, 29, 28, + 36, 37, 38, 39, 47, 46, 45, 44, 52, 53, 54, 55, 63, 62, 61, 60 +}; + +static const uint8_t ivi4_alternate_scan_4x4[16] = { + 0, 1, 4, 5, 8, 12, 2, 3, 9, 13, 6, 7, 10, 11, 14, 15 +}; + +static const uint8_t ivi4_vertical_scan_4x4[16] = { + 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15 +}; + +static const uint8_t ivi4_horizontal_scan_4x4[16] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +}; + +static const uint8_t *scan_index_to_tab[15] = { + // for 8x8 transforms + ff_zigzag_direct, + ivi4_alternate_scan_8x8, + ff_ivi_horizontal_scan_8x8, + ff_ivi_vertical_scan_8x8, + ff_zigzag_direct, + + // for 4x4 transforms + ff_ivi_direct_scan_4x4, + ivi4_alternate_scan_4x4, + ivi4_vertical_scan_4x4, + ivi4_horizontal_scan_4x4, + ff_ivi_direct_scan_4x4, + + // TODO: check if those are needed + ff_ivi_horizontal_scan_8x8, + ff_ivi_horizontal_scan_8x8, + ff_ivi_horizontal_scan_8x8, + ff_ivi_horizontal_scan_8x8, + ff_ivi_horizontal_scan_8x8 +}; + +/** + * Indeo 4 dequant tables + */ +static uint16_t ivi4_quant_8x8_intra[9][64] = { + { + 43, 342, 385, 470, 555, 555, 598, 726, + 342, 342, 470, 513, 555, 598, 726, 769, + 385, 470, 555, 555, 598, 726, 726, 811, + 470, 470, 555, 555, 598, 726, 769, 854, + 470, 555, 555, 598, 683, 726, 854, 1025, + 555, 555, 598, 683, 726, 854, 1025, 1153, + 555, 555, 598, 726, 811, 982, 1195, 1451, + 555, 598, 726, 811, 982, 1195, 1451, 1793 + }, + { + 86, 1195, 2390, 2390, 4865, 4865, 4865, 4865, + 1195, 1195, 2390, 2390, 4865, 4865, 4865, 4865, + 2390, 2390, 4865, 4865, 6827, 6827, 6827, 6827, + 2390, 2390, 4865, 4865, 6827, 6827, 6827, 6827, + 4865, 4865, 6827, 6827, 6827, 6827, 6827, 6827, + 4865, 4865, 6827, 6827, 6827, 6827, 6827, 6827, + 4865, 4865, 6827, 6827, 6827, 6827, 6827, 6827, + 4865, 4865, 6827, 6827, 6827, 6827, 6827, 6827 + }, + { + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835 + }, + { + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414 + }, + { + 897, 897, 897, 897, 897, 897, 897, 897, + 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, + 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, + 1409, 1409, 1409, 1409, 1409, 1409, 1409, 1409, + 1579, 1579, 1579, 1579, 1579, 1579, 1579, 1579, + 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, + 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, + 2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091 + }, + { + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414 + }, + { + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390 + }, + { + 22, 171, 214, 257, 257, 299, 299, 342, + 171, 171, 257, 257, 299, 299, 342, 385, + 214, 257, 257, 299, 299, 342, 342, 385, + 257, 257, 257, 299, 299, 342, 385, 427, + 257, 257, 299, 299, 342, 385, 427, 513, + 257, 299, 299, 342, 385, 427, 513, 598, + 299, 299, 299, 385, 385, 470, 598, 726, + 299, 299, 385, 385, 470, 598, 726, 897 + }, + { + 86, 598, 1195, 1195, 2390, 2390, 2390, 2390, + 598, 598, 1195, 1195, 2390, 2390, 2390, 2390, + 1195, 1195, 2390, 2390, 3414, 3414, 3414, 3414, + 1195, 1195, 2390, 2390, 3414, 3414, 3414, 3414, + 2390, 2390, 3414, 3414, 3414, 3414, 3414, 3414, + 2390, 2390, 3414, 3414, 3414, 3414, 3414, 3414, + 2390, 2390, 3414, 3414, 3414, 3414, 3414, 3414, + 2390, 2390, 3414, 3414, 3414, 3414, 3414, 3414 + } +}; + +static uint16_t ivi4_quant_8x8_inter[9][64] = { + { + 427, 427, 470, 427, 427, 427, 470, 470, + 427, 427, 470, 427, 427, 427, 470, 470, + 470, 470, 470, 470, 470, 470, 470, 470, + 427, 427, 470, 470, 427, 427, 470, 470, + 427, 427, 470, 427, 427, 427, 470, 470, + 427, 427, 470, 427, 427, 427, 470, 470, + 470, 470, 470, 470, 470, 470, 470, 470, + 470, 470, 470, 470, 470, 470, 470, 470 + }, + { + 1707, 1707, 2433, 2433, 3414, 3414, 3414, 3414, + 1707, 1707, 2433, 2433, 3414, 3414, 3414, 3414, + 2433, 2433, 3414, 3414, 4822, 4822, 4822, 4822, + 2433, 2433, 3414, 3414, 4822, 4822, 4822, 4822, + 3414, 3414, 4822, 4822, 3414, 3414, 3414, 3414, + 3414, 3414, 4822, 4822, 3414, 3414, 3414, 3414, + 3414, 3414, 4822, 4822, 3414, 3414, 3414, 3414, + 3414, 3414, 4822, 4822, 3414, 3414, 3414, 3414 + }, + { + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281 + }, + { + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433 + }, + { + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281, + 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281, + 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281 + }, + { + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433 + }, + { + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707 + }, + { + 86, 171, 171, 214, 214, 214, 214, 257, + 171, 171, 214, 214, 214, 214, 257, 257, + 171, 214, 214, 214, 214, 257, 257, 257, + 214, 214, 214, 214, 257, 257, 257, 299, + 214, 214, 214, 257, 257, 257, 299, 299, + 214, 214, 257, 257, 257, 299, 299, 299, + 214, 257, 257, 257, 299, 299, 299, 342, + 257, 257, 257, 299, 299, 299, 342, 342 + }, + { + 854, 854, 1195, 1195, 1707, 1707, 1707, 1707, + 854, 854, 1195, 1195, 1707, 1707, 1707, 1707, + 1195, 1195, 1707, 1707, 2390, 2390, 2390, 2390, + 1195, 1195, 1707, 1707, 2390, 2390, 2390, 2390, + 1707, 1707, 2390, 2390, 1707, 1707, 1707, 1707, + 1707, 1707, 2390, 2390, 1707, 1707, 1707, 1707, + 1707, 1707, 2390, 2390, 1707, 1707, 1707, 1707, + 1707, 1707, 2390, 2390, 1707, 1707, 1707, 1707 + } +}; + +static uint16_t ivi4_quant_4x4_intra[5][16] = { + { + 22, 214, 257, 299, + 214, 257, 299, 342, + 257, 299, 342, 427, + 299, 342, 427, 513 + }, + { + 129, 1025, 1451, 1451, + 1025, 1025, 1451, 1451, + 1451, 1451, 2049, 2049, + 1451, 1451, 2049, 2049 + }, + { + 43, 171, 171, 171, + 43, 171, 171, 171, + 43, 171, 171, 171, + 43, 171, 171, 171 + }, + { + 43, 43, 43, 43, + 171, 171, 171, 171, + 171, 171, 171, 171, + 171, 171, 171, 171 + }, + { + 43, 43, 43, 43, + 43, 43, 43, 43, + 43, 43, 43, 43, + 43, 43, 43, 43 + } +}; + +static uint16_t ivi4_quant_4x4_inter[5][16] = { + { + 107, 214, 257, 299, + 214, 257, 299, 299, + 257, 299, 299, 342, + 299, 299, 342, 342 + }, + { + 513, 1025, 1238, 1238, + 1025, 1025, 1238, 1238, + 1238, 1238, 1451, 1451, + 1238, 1238, 1451, 1451 + }, + { + 43, 171, 171, 171, + 43, 171, 171, 171, + 43, 171, 171, 171, + 43, 171, 171, 171 + }, + { + 43, 43, 43, 43, + 171, 171, 171, 171, + 171, 171, 171, 171, + 171, 171, 171, 171 + }, + { + 43, 43, 43, 43, + 43, 43, 43, 43, + 43, 43, 43, 43, + 43, 43, 43, 43 + } +}; + +/** + * Table for mapping quant matrix index from the bitstream + * into internal quant table number. + */ +static uint8_t quant_index_to_tab[22] = { + 0, 1, 0, 2, 1, 3, 0, 4, 1, 5, 0, 1, 6, 7, 8, // for 8x8 quant matrixes + 0, 1, 2, 2, 3, 3, 4 // for 4x4 quant matrixes +}; + +#endif /* AVCODEC_INDEO4DATA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo5.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo5.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/indeo5.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/indeo5.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,7 +27,7 @@ * Known FOURCCs: 'IV50' */ -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "avcodec.h" #include "get_bits.h" #include "dsputil.h" @@ -757,7 +757,7 @@ switch_buffers(ctx); - //START_TIMER; + //{ START_TIMER; if (ctx->frame_type != FRAMETYPE_NULL) { for (p = 0; p < 3; p++) { @@ -772,7 +772,7 @@ } } - //STOP_TIMER("decode_planes"); + //STOP_TIMER("decode_planes"); } if (ctx->frame.data[0]) avctx->release_buffer(avctx, &ctx->frame); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/intelh263dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/intelh263dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/intelh263dec.c 2011-06-11 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/intelh263dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -125,15 +125,14 @@ } AVCodec ff_h263i_decoder = { - "h263i", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_H263I, - sizeof(MpegEncContext), - ff_h263_decode_init, - NULL, - ff_h263_decode_end, - ff_h263_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, + .name = "h263i", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_H263I, + .priv_data_size = sizeof(MpegEncContext), + .init = ff_h263_decode_init, + .close = ff_h263_decode_end, + .decode = ff_h263_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"), .pix_fmts= ff_pixfmt_list_420, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/internal.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/internal.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/internal.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/internal.h 2012-01-11 00:34:30.000000000 +0000 @@ -25,8 +25,49 @@ #define AVCODEC_INTERNAL_H #include + +#include "libavutil/pixfmt.h" #include "avcodec.h" +typedef struct InternalBuffer { + uint8_t *base[AV_NUM_DATA_POINTERS]; + uint8_t *data[AV_NUM_DATA_POINTERS]; + int linesize[AV_NUM_DATA_POINTERS]; + int width; + int height; + enum PixelFormat pix_fmt; + uint8_t **extended_data; + int audio_data_size; + int nb_channels; +} InternalBuffer; + +typedef struct AVCodecInternal { + /** + * internal buffer count + * used by default get/release/reget_buffer(). + */ + int buffer_count; + + /** + * internal buffers + * used by default get/release/reget_buffer(). + */ + InternalBuffer *buffer; + + /** + * Whether the parent AVCodecContext is a copy of the context which had + * init() called on it. + * This is used by multithreading - shared tables and picture pointers + * should be freed from the original context only. + */ + int is_copy; +} AVCodecInternal; + +struct AVCodecDefault { + const uint8_t *key; + const uint8_t *value; +}; + /** * Determine whether pix_fmt is a hardware accelerated format. */ @@ -48,6 +89,9 @@ */ int ff_match_2uint16(const uint16_t (*tab)[2], int size, int a, int b); -unsigned int ff_toupper4(unsigned int x); +unsigned int avpriv_toupper4(unsigned int x); + +int avpriv_lock_avformat(void); +int avpriv_unlock_avformat(void); #endif /* AVCODEC_INTERNAL_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/interplayvideo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/interplayvideo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/interplayvideo.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/interplayvideo.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,7 +41,7 @@ #include "avcodec.h" #include "bytestream.h" #include "dsputil.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" #define PALETTE_COUNT 256 @@ -1019,9 +1019,6 @@ dsputil_init(&s->dsp, avctx); - /* decoding map contains 4 bits of information per 8x8 block */ - s->decoding_map_size = avctx->width * avctx->height / (8 * 8 * 2); - s->current_frame.data[0] = s->last_frame.data[0] = s->second_last_frame.data[0] = NULL; @@ -1036,6 +1033,9 @@ int buf_size = avpkt->size; IpvideoContext *s = avctx->priv_data; + /* decoding map contains 4 bits of information per 8x8 block */ + s->decoding_map_size = avctx->width * avctx->height / (8 * 8 * 2); + /* compressed buffer needs to be large enough to at least hold an entire * decoding map */ if (buf_size < s->decoding_map_size) @@ -1089,14 +1089,13 @@ } AVCodec ff_interplay_video_decoder = { - "interplayvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_INTERPLAY_VIDEO, - sizeof(IpvideoContext), - ipvideo_decode_init, - NULL, - ipvideo_decode_end, - ipvideo_decode_frame, - CODEC_CAP_DR1, + .name = "interplayvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_INTERPLAY_VIDEO, + .priv_data_size = sizeof(IpvideoContext), + .init = ipvideo_decode_init, + .close = ipvideo_decode_end, + .decode = ipvideo_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_PARAM_CHANGE, .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/intrax8.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/intrax8.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/intrax8.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/intrax8.c 2012-01-11 00:34:30.000000000 +0000 @@ -304,7 +304,7 @@ int quant; s->dsp.x8_setup_spatial_compensation(s->dest[chroma], s->edge_emu_buffer, - s->current_picture.linesize[chroma>0], + s->current_picture.f.linesize[chroma>0], &range, &sum, w->edges); if(chroma){ w->orient=w->chroma_orient; @@ -613,7 +613,7 @@ dc_level+= (w->predicted_dc*divide_quant + (1<<12) )>>13; dsp_x8_put_solidcolor( av_clip_uint8((dc_level*dc_quant+4)>>3), - s->dest[chroma], s->current_picture.linesize[!!chroma]); + s->dest[chroma], s->current_picture.f.linesize[!!chroma]); goto block_placed; } @@ -637,15 +637,15 @@ } if(w->flat_dc){ - dsp_x8_put_solidcolor(w->predicted_dc, s->dest[chroma], s->current_picture.linesize[!!chroma]); + dsp_x8_put_solidcolor(w->predicted_dc, s->dest[chroma], s->current_picture.f.linesize[!!chroma]); }else{ s->dsp.x8_spatial_compensation[w->orient]( s->edge_emu_buffer, s->dest[chroma], - s->current_picture.linesize[!!chroma] ); + s->current_picture.f.linesize[!!chroma] ); } if(!zeros_only) s->dsp.idct_add ( s->dest[chroma], - s->current_picture.linesize[!!chroma], + s->current_picture.f.linesize[!!chroma], s->block[0] ); block_placed: @@ -656,7 +656,7 @@ if(s->loop_filter){ uint8_t* ptr = s->dest[chroma]; - int linesize = s->current_picture.linesize[!!chroma]; + int linesize = s->current_picture.f.linesize[!!chroma]; if(!( (w->edges&2) || ( zeros_only && (w->orient|4)==4 ) )){ s->dsp.x8_h_loop_filter(ptr, linesize, w->quant); @@ -671,12 +671,12 @@ static void x8_init_block_index(MpegEncContext *s){ //FIXME maybe merge with ff_* //not s->linesize as this would be wrong for field pics //not that IntraX8 has interlacing support ;) - const int linesize = s->current_picture.linesize[0]; - const int uvlinesize= s->current_picture.linesize[1]; + const int linesize = s->current_picture.f.linesize[0]; + const int uvlinesize = s->current_picture.f.linesize[1]; - s->dest[0] = s->current_picture.data[0]; - s->dest[1] = s->current_picture.data[1]; - s->dest[2] = s->current_picture.data[2]; + s->dest[0] = s->current_picture.f.data[0]; + s->dest[1] = s->current_picture.f.data[1]; + s->dest[2] = s->current_picture.f.data[2]; s->dest[0] += s->mb_y * linesize << 3; s->dest[1] += ( s->mb_y&(~1) ) * uvlinesize << 2;//chroma blocks are on add rows @@ -771,7 +771,7 @@ /*emulate MB info in the relevant tables*/ s->mbskip_table [mb_xy]=0; s->mbintra_table[mb_xy]=1; - s->current_picture.qscale_table[mb_xy]=w->quant; + s->current_picture.f.qscale_table[mb_xy] = w->quant; mb_xy++; } s->dest[0]+= 8; @@ -784,6 +784,6 @@ error: ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, (s->mb_x>>1)-1, (s->mb_y>>1)-1, - (AC_END|DC_END|MV_END) ); + ER_MB_END ); return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ituh263dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ituh263dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ituh263dec.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ituh263dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,6 +30,7 @@ //#define DEBUG #include +#include "libavutil/mathematics.h" #include "dsputil.h" #include "avcodec.h" #include "mpegvideo.h" @@ -147,7 +148,7 @@ } /** - * decodes the group of blocks header or slice header. + * Decode the group of blocks header or slice header. * @return <0 if an error occurred */ static int h263_decode_gob_header(MpegEncContext *s) @@ -202,7 +203,7 @@ } /** - * finds the next resync_marker + * Find the next resync_marker. * @param p pointer to buffer to scan * @param end pointer to the end of the buffer * @return pointer to the next resync_marker, or end if none was found @@ -223,7 +224,7 @@ } /** - * decodes the group of blocks / video packet header. + * Decode the group of blocks / video packet header. * @return bit position of the resync_marker, or <0 if none was found */ int ff_h263_resync(MpegEncContext *s){ @@ -270,7 +271,7 @@ int h263_decode_motion(MpegEncContext * s, int pred, int f_code) { - int code, val, sign, shift, l; + int code, val, sign, shift; code = get_vlc2(&s->gb, mv_vlc.table, MV_VLC_BITS, 2); if (code == 0) @@ -292,8 +293,7 @@ /* modulo decoding */ if (!s->h263_long_vectors) { - l = INT_BIT - 5 - f_code; - val = (val<>l; + val = sign_extend(val, 5 + f_code); } else { /* horrible h263 long vector mode */ if (pred < -31 && val < -63) @@ -306,7 +306,7 @@ } -/* Decodes RVLC of H.263+ UMV */ +/* Decode RVLC of H.263+ UMV */ static int h263p_decode_umotion(MpegEncContext * s, int pred) { int code = 0, sign; @@ -352,20 +352,20 @@ do{ if (get_bits1(&s->gb)) { /* skip mb */ - mot_val = s->current_picture.motion_val[0][ s->block_index[0] ]; + mot_val = s->current_picture.f.motion_val[0][s->block_index[0]]; mot_val[0 ]= mot_val[2 ]= mot_val[0+stride]= mot_val[2+stride]= 0; mot_val[1 ]= mot_val[3 ]= mot_val[1+stride]= mot_val[3+stride]= 0; - s->current_picture.mb_type[xy]= MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; goto end; } cbpc = get_vlc2(&s->gb, ff_h263_inter_MCBPC_vlc.table, INTER_MCBPC_VLC_BITS, 2); }while(cbpc == 20); if(cbpc & 4){ - s->current_picture.mb_type[xy]= MB_TYPE_INTRA; + s->current_picture.f.mb_type[xy] = MB_TYPE_INTRA; }else{ get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1); if (cbpc & 8) { @@ -377,7 +377,7 @@ } if ((cbpc & 16) == 0) { - s->current_picture.mb_type[xy]= MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0; /* 16x16 motion prediction */ mot_val= h263_pred_motion(s, 0, 0, &pred_x, &pred_y); if (s->umvplus) @@ -395,7 +395,7 @@ mot_val[1 ]= mot_val[3 ]= mot_val[1+stride]= mot_val[3+stride]= my; } else { - s->current_picture.mb_type[xy]= MB_TYPE_8x8 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0; for(i=0;i<4;i++) { mot_val = h263_pred_motion(s, i, 0, &pred_x, &pred_y); if (s->umvplus) @@ -484,7 +484,7 @@ level = get_bits(&s->gb, 8); if((level&0x7F) == 0){ av_log(s->avctx, AV_LOG_ERROR, "illegal dc %d at %d %d\n", level, s->mb_x, s->mb_y); - if(s->error_recognition >= FF_ER_COMPLIANT) + if(s->err_recognition & AV_EF_BITSTREAM) return -1; } if (level == 255) @@ -617,7 +617,7 @@ s->block_last_index[i] = -1; s->mv_dir = MV_DIR_FORWARD; s->mv_type = MV_TYPE_16X16; - s->current_picture.mb_type[xy]= MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; s->mv[0][0][0] = 0; s->mv[0][0][1] = 0; s->mb_skipped = !(s->obmc | s->loop_filter); @@ -650,7 +650,7 @@ s->mv_dir = MV_DIR_FORWARD; if ((cbpc & 16) == 0) { - s->current_picture.mb_type[xy]= MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0; /* 16x16 motion prediction */ s->mv_type = MV_TYPE_16X16; h263_pred_motion(s, 0, 0, &pred_x, &pred_y); @@ -675,7 +675,7 @@ if (s->umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1) skip_bits1(&s->gb); /* Bit stuffing to prevent PSC */ } else { - s->current_picture.mb_type[xy]= MB_TYPE_8x8 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0; s->mv_type = MV_TYPE_8X8; for(i=0;i<4;i++) { mot_val = h263_pred_motion(s, i, 0, &pred_x, &pred_y); @@ -703,8 +703,8 @@ } else if(s->pict_type==AV_PICTURE_TYPE_B) { int mb_type; const int stride= s->b8_stride; - int16_t *mot_val0 = s->current_picture.motion_val[0][ 2*(s->mb_x + s->mb_y*stride) ]; - int16_t *mot_val1 = s->current_picture.motion_val[1][ 2*(s->mb_x + s->mb_y*stride) ]; + int16_t *mot_val0 = s->current_picture.f.motion_val[0][2 * (s->mb_x + s->mb_y * stride)]; + int16_t *mot_val1 = s->current_picture.f.motion_val[1][2 * (s->mb_x + s->mb_y * stride)]; // const int mv_xy= s->mb_x + 1 + s->mb_y * s->mb_stride; //FIXME ugly @@ -787,7 +787,7 @@ } } - s->current_picture.mb_type[xy]= mb_type; + s->current_picture.f.mb_type[xy] = mb_type; } else { /* I-Frame */ do{ cbpc = get_vlc2(&s->gb, ff_h263_intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2); @@ -802,11 +802,11 @@ dquant = cbpc & 4; s->mb_intra = 1; intra: - s->current_picture.mb_type[xy]= MB_TYPE_INTRA; + s->current_picture.f.mb_type[xy] = MB_TYPE_INTRA; if (s->h263_aic) { s->ac_pred = get_bits1(&s->gb); if(s->ac_pred){ - s->current_picture.mb_type[xy]= MB_TYPE_INTRA | MB_TYPE_ACPRED; + s->current_picture.f.mb_type[xy] = MB_TYPE_INTRA | MB_TYPE_ACPRED; s->h263_aic_dir = get_bits1(&s->gb); } @@ -888,7 +888,7 @@ i = get_bits(&s->gb, 8); /* picture timestamp */ if( (s->picture_number&~0xFF)+i < s->picture_number) i+= 256; - s->current_picture_ptr->pts= + s->current_picture_ptr->f.pts = s->picture_number= (s->picture_number&~0xFF) + i; /* PTYPE starts here */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ituh263enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ituh263enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ituh263enc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ituh263enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -126,7 +126,7 @@ coded_frame_rate= 1800000; coded_frame_rate_base= (1000+best_clock_code)*best_divisor; - align_put_bits(&s->pb); + avpriv_align_put_bits(&s->pb); /* Update the pointer to last GOB */ s->ptr_lastgob = put_bits_ptr(&s->pb); @@ -275,7 +275,7 @@ */ void ff_clean_h263_qscales(MpegEncContext *s){ int i; - int8_t * const qscale_table= s->current_picture.qscale_table; + int8_t * const qscale_table = s->current_picture.f.qscale_table; ff_init_qscale_tab(s); @@ -302,7 +302,7 @@ static const int dquant_code[5]= {1,0,9,2,3}; /** - * encodes a 8x8 block. + * Encode an 8x8 block. * @param block the 8x8 block * @param n block index (0-3 are luma, 4-5 are chroma) */ @@ -529,8 +529,8 @@ /* motion vectors: 8x8 mode*/ h263_pred_motion(s, i, 0, &pred_x, &pred_y); - motion_x= s->current_picture.motion_val[0][ s->block_index[i] ][0]; - motion_y= s->current_picture.motion_val[0][ s->block_index[i] ][1]; + motion_x = s->current_picture.f.motion_val[0][s->block_index[i]][0]; + motion_y = s->current_picture.f.motion_val[0][s->block_index[i]][1]; if (!s->umvplus) { ff_h263_encode_motion_vector(s, motion_x - pred_x, motion_y - pred_y, 1); @@ -657,7 +657,7 @@ void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code) { - int range, l, bit_size, sign, code, bits; + int range, bit_size, sign, code, bits; if (val == 0) { /* zero vector */ @@ -667,8 +667,7 @@ bit_size = f_code - 1; range = 1 << bit_size; /* modulo encoding */ - l= INT_BIT - 6 - bit_size; - val = (val<>l; + val = sign_extend(val, 6 + bit_size); sign = val>>31; val= (val^sign)-sign; sign&=1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ivi_common.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ivi_common.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ivi_common.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ivi_common.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,7 +26,7 @@ * Indeo5 decoders. */ -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "avcodec.h" #include "get_bits.h" #include "ivi_common.h" @@ -611,6 +611,9 @@ const int16_t *src = plane->bands[0].buf; uint32_t pitch = plane->bands[0].pitch; + if (!src) + return; + for (y = 0; y < plane->height; y++) { for (x = 0; x < plane->width; x++) dst[x] = av_clip_uint8(src[x] + 128); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ivi_common.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ivi_common.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ivi_common.h 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ivi_common.h 2012-01-11 00:34:30.000000000 +0000 @@ -51,7 +51,7 @@ /// or "7" for custom one VLC *tab; /// pointer to the table associated with tab_sel - //! the following are used only when tab_sel == 7 + /// the following are used only when tab_sel == 7 IVIHuffDesc cust_desc; /// custom Huffman codebook descriptor VLC cust_tab; /// vlc table for custom codebook } IVIHuffTab; @@ -195,10 +195,10 @@ /** compare some properties of two pictures */ static inline int ivi_pic_config_cmp(IVIPicConfig *str1, IVIPicConfig *str2) { - return (str1->pic_width != str2->pic_width || str1->pic_height != str2->pic_height || - str1->chroma_width != str2->chroma_width || str1->chroma_height != str2->chroma_height || - str1->tile_width != str2->tile_width || str1->tile_height != str2->tile_height || - str1->luma_bands != str2->luma_bands || str1->chroma_bands != str2->chroma_bands); + return str1->pic_width != str2->pic_width || str1->pic_height != str2->pic_height || + str1->chroma_width != str2->chroma_width || str1->chroma_height != str2->chroma_height || + str1->tile_width != str2->tile_width || str1->tile_height != str2->tile_height || + str1->luma_bands != str2->luma_bands || str1->chroma_bands != str2->chroma_bands; } /** calculate number of tiles in a stride */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ivi_dsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ivi_dsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ivi_dsp.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ivi_dsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,7 @@ /* * DSP functions for Indeo Video Interactive codecs (Indeo4 and Indeo5) * - * Copyright (c) 2009 Maxim Poliakovski + * Copyright (c) 2009-2011 Maxim Poliakovski * * This file is part of Libav. * @@ -178,6 +178,153 @@ } } +void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst, + const int dst_pitch, const int num_bands) +{ + int x, y, indx, b0, b1, b2, b3, p0, p1, p2, p3; + const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr; + int32_t pitch; + + /* all bands should have the same pitch */ + pitch = plane->bands[0].pitch; + + /* get pointers to the wavelet bands */ + b0_ptr = plane->bands[0].buf; + b1_ptr = plane->bands[1].buf; + b2_ptr = plane->bands[2].buf; + b3_ptr = plane->bands[3].buf; + + for (y = 0; y < plane->height; y += 2) { + for (x = 0, indx = 0; x < plane->width; x += 2, indx++) { + /* load coefficients */ + b0 = b0_ptr[indx]; //should be: b0 = (num_bands > 0) ? b0_ptr[indx] : 0; + b1 = b1_ptr[indx]; //should be: b1 = (num_bands > 1) ? b1_ptr[indx] : 0; + b2 = b2_ptr[indx]; //should be: b2 = (num_bands > 2) ? b2_ptr[indx] : 0; + b3 = b3_ptr[indx]; //should be: b3 = (num_bands > 3) ? b3_ptr[indx] : 0; + + /* haar wavelet recomposition */ + p0 = (b0 + b1 + b2 + b3 + 2) >> 2; + p1 = (b0 + b1 - b2 - b3 + 2) >> 2; + p2 = (b0 - b1 + b2 - b3 + 2) >> 2; + p3 = (b0 - b1 - b2 + b3 + 2) >> 2; + + /* bias, convert and output four pixels */ + dst[x] = av_clip_uint8(p0 + 128); + dst[x + 1] = av_clip_uint8(p1 + 128); + dst[dst_pitch + x] = av_clip_uint8(p2 + 128); + dst[dst_pitch + x + 1] = av_clip_uint8(p3 + 128); + }// for x + + dst += dst_pitch << 1; + + b0_ptr += pitch; + b1_ptr += pitch; + b2_ptr += pitch; + b3_ptr += pitch; + }// for y +} + +/** butterfly operation for the inverse Haar transform */ +#define IVI_HAAR_BFLY(s1, s2, o1, o2, t) \ + t = (s1 - s2) >> 1;\ + o1 = (s1 + s2) >> 1;\ + o2 = t;\ + +/** inverse 8-point Haar transform */ +#define INV_HAAR8(s1, s5, s3, s7, s2, s4, s6, s8,\ + d1, d2, d3, d4, d5, d6, d7, d8,\ + t0, t1, t2, t3, t4, t5, t6, t7, t8) {\ + t1 = s1 << 1; t5 = s5 << 1;\ + IVI_HAAR_BFLY(t1, t5, t1, t5, t0); IVI_HAAR_BFLY(t1, s3, t1, t3, t0);\ + IVI_HAAR_BFLY(t5, s7, t5, t7, t0); IVI_HAAR_BFLY(t1, s2, t1, t2, t0);\ + IVI_HAAR_BFLY(t3, s4, t3, t4, t0); IVI_HAAR_BFLY(t5, s6, t5, t6, t0);\ + IVI_HAAR_BFLY(t7, s8, t7, t8, t0);\ + d1 = COMPENSATE(t1);\ + d2 = COMPENSATE(t2);\ + d3 = COMPENSATE(t3);\ + d4 = COMPENSATE(t4);\ + d5 = COMPENSATE(t5);\ + d6 = COMPENSATE(t6);\ + d7 = COMPENSATE(t7);\ + d8 = COMPENSATE(t8); } + +/** inverse 4-point Haar transform */ +#define INV_HAAR4(s1, s3, s5, s7) {\ + HAAR_BFLY(s1, s5); HAAR_BFLY(s1, s3); HAAR_BFLY(s5, s7);\ + s1 = COMPENSATE(s1);\ + s3 = COMPENSATE(s3);\ + s5 = COMPENSATE(s5);\ + s7 = COMPENSATE(s7); } + +void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, uint32_t pitch, + const uint8_t *flags) +{ + int i, shift, sp1, sp2, sp3, sp4; + const int32_t *src; + int32_t *dst; + int tmp[64]; + int t0, t1, t2, t3, t4, t5, t6, t7, t8; + + /* apply the InvHaar8 to all columns */ +#define COMPENSATE(x) (x) + src = in; + dst = tmp; + for (i = 0; i < 8; i++) { + if (flags[i]) { + /* pre-scaling */ + shift = !(i & 4); + sp1 = src[ 0] << shift; + sp2 = src[ 8] << shift; + sp3 = src[16] << shift; + sp4 = src[24] << shift; + INV_HAAR8( sp1, sp2, sp3, sp4, + src[32], src[40], src[48], src[56], + dst[ 0], dst[ 8], dst[16], dst[24], + dst[32], dst[40], dst[48], dst[56], + t0, t1, t2, t3, t4, t5, t6, t7, t8); + } else + dst[ 0] = dst[ 8] = dst[16] = dst[24] = + dst[32] = dst[40] = dst[48] = dst[56] = 0; + + src++; + dst++; + } +#undef COMPENSATE + + /* apply the InvHaar8 to all rows */ +#define COMPENSATE(x) (x) + src = tmp; + for (i = 0; i < 8; i++) { + if ( !src[0] && !src[1] && !src[2] && !src[3] + && !src[4] && !src[5] && !src[6] && !src[7]) { + memset(out, 0, 8 * sizeof(out[0])); + } else { + INV_HAAR8(src[0], src[1], src[2], src[3], + src[4], src[5], src[6], src[7], + out[0], out[1], out[2], out[3], + out[4], out[5], out[6], out[7], + t0, t1, t2, t3, t4, t5, t6, t7, t8); + } + src += 8; + out += pitch; + } +#undef COMPENSATE +} + +void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, uint32_t pitch, + int blk_size) +{ + int x, y; + int16_t dc_coeff; + + dc_coeff = (*in + 0) >> 3; + + for (y = 0; y < blk_size; out += pitch, y++) { + for (x = 0; x < blk_size; x++) + out[x] = dc_coeff; + } +} + /** butterfly operation for the inverse slant transform */ #define IVI_SLANT_BFLY(s1, s2, o1, o2, t) \ t = s1 - s2;\ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ivi_dsp.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ivi_dsp.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ivi_dsp.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ivi_dsp.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,7 @@ /* * DSP functions for Indeo Video Interactive codecs (Indeo4 and Indeo5) * - * Copyright (c) 2009 Maxim Poliakovski + * Copyright (c) 2009-2011 Maxim Poliakovski * * This file is part of Libav. * @@ -44,6 +44,43 @@ const int dst_pitch, const int num_bands); /** + * Haar wavelet recomposition filter for Indeo 4 + * + * @param[in] plane pointer to the descriptor of the plane being processed + * @param[out] dst pointer to the destination buffer + * @param[in] dst_pitch pitch of the destination buffer + * @param[in] num_bands number of wavelet bands to be processed + */ +void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst, + const int dst_pitch, const int num_bands); + +/** + * two-dimensional inverse Haar 8x8 transform for Indeo 4 + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags: + * != 0 - non_empty column, 0 - empty one + * (this array must be filled by caller) + */ +void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, uint32_t pitch, + const uint8_t *flags); + +/** + * DC-only two-dimensional inverse Haar transform for Indeo 4. + * Performing the inverse transform in this case is equivalent to + * spreading DC_coeff >> 3 over the whole block. + * + * @param[in] in pointer to the dc coefficient + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] blk_size transform block size + */ +void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, uint32_t pitch, + int blk_size); + +/** * two-dimensional inverse slant 8x8 transform * * @param[in] in pointer to the vector of transform coefficients diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jfdctfst.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jfdctfst.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jfdctfst.c 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jfdctfst.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,4 @@ /* - * jfdctfst.c - * * This file is part of the Independent JPEG Group's software. * * The authors make NO WARRANTY or representation, either express or implied, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jfdctint.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jfdctint.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jfdctint.c 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jfdctint.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,402 +1,25 @@ -/* - * jfdctint.c - * - * This file is part of the Independent JPEG Group's software. - * - * The authors make NO WARRANTY or representation, either express or implied, - * with respect to this software, its quality, accuracy, merchantability, or - * fitness for a particular purpose. This software is provided "AS IS", and - * you, its user, assume the entire risk as to its quality and accuracy. - * - * This software is copyright (C) 1991-1996, Thomas G. Lane. - * All Rights Reserved except as specified below. - * - * Permission is hereby granted to use, copy, modify, and distribute this - * software (or portions thereof) for any purpose, without fee, subject to - * these conditions: - * (1) If any part of the source code for this software is distributed, then - * this README file must be included, with this copyright and no-warranty - * notice unaltered; and any additions, deletions, or changes to the original - * files must be clearly indicated in accompanying documentation. - * (2) If only executable code is distributed, then the accompanying - * documentation must state that "this software is based in part on the work - * of the Independent JPEG Group". - * (3) Permission for use of this software is granted only if the user accepts - * full responsibility for any undesirable consequences; the authors accept - * NO LIABILITY for damages of any kind. - * - * These conditions apply to any software derived from or based on the IJG - * code, not just to the unmodified library. If you use our work, you ought - * to acknowledge us. - * - * Permission is NOT granted for the use of any IJG author's name or company - * name in advertising or publicity relating to this software or products - * derived from it. This software may be referred to only as "the Independent - * JPEG Group's software". - * - * We specifically permit and encourage the use of this software as the basis - * of commercial products, provided that all warranty or liability claims are - * assumed by the product vendor. - * - * This file contains a slow-but-accurate integer implementation of the - * forward DCT (Discrete Cosine Transform). - * - * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT - * on each column. Direct algorithms are also available, but they are - * much more complex and seem not to be any faster when reduced to code. - * - * This implementation is based on an algorithm described in - * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT - * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, - * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. - * The primary algorithm described there uses 11 multiplies and 29 adds. - * We use their alternate method with 12 multiplies and 32 adds. - * The advantage of this method is that no data path contains more than one - * multiplication; this allows a very simple and accurate implementation in - * scaled fixed-point arithmetic, with a minimal number of shifts. - */ - /** - * @file - * Independent JPEG Group's slow & accurate dct. - */ - -#include -#include -#include "libavutil/common.h" -#include "dsputil.h" - -#define DCTSIZE 8 -#define BITS_IN_JSAMPLE 8 -#define GLOBAL(x) x -#define RIGHT_SHIFT(x, n) ((x) >> (n)) -#define MULTIPLY16C16(var,const) ((var)*(const)) - -#if 1 //def USE_ACCURATE_ROUNDING -#define DESCALE(x,n) RIGHT_SHIFT((x) + (1 << ((n) - 1)), n) -#else -#define DESCALE(x,n) RIGHT_SHIFT(x, n) -#endif - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ -#endif - - -/* - * The poop on this scaling stuff is as follows: - * - * Each 1-D DCT step produces outputs which are a factor of sqrt(N) - * larger than the true DCT outputs. The final outputs are therefore - * a factor of N larger than desired; since N=8 this can be cured by - * a simple right shift at the end of the algorithm. The advantage of - * this arrangement is that we save two multiplications per 1-D DCT, - * because the y0 and y4 outputs need not be divided by sqrt(N). - * In the IJG code, this factor of 8 is removed by the quantization step - * (in jcdctmgr.c), NOT in this module. - * - * We have to do addition and subtraction of the integer inputs, which - * is no problem, and multiplication by fractional constants, which is - * a problem to do in integer arithmetic. We multiply all the constants - * by CONST_SCALE and convert them to integer constants (thus retaining - * CONST_BITS bits of precision in the constants). After doing a - * multiplication we have to divide the product by CONST_SCALE, with proper - * rounding, to produce the correct output. This division can be done - * cheaply as a right shift of CONST_BITS bits. We postpone shifting - * as long as possible so that partial sums can be added together with - * full fractional precision. + * This file is part of Libav. * - * The outputs of the first pass are scaled up by PASS1_BITS bits so that - * they are represented to better-than-integral precision. These outputs - * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word - * with the recommended scaling. (For 12-bit sample data, the intermediate - * array is int32_t anyway.) - * - * To avoid overflow of the 32-bit intermediate results in pass 2, we must - * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis - * shows that the values given below are the most effective. - */ - -#if BITS_IN_JSAMPLE == 8 -#define CONST_BITS 13 -#define PASS1_BITS 4 /* set this to 2 if 16x16 multiplies are faster */ -#else -#define CONST_BITS 13 -#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ -#endif - -/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus - * causing a lot of useless floating-point operations at run time. - * To get around this we use the following pre-calculated constants. - * If you change CONST_BITS you may want to add appropriate values. - * (With a reasonable C compiler, you can just rely on the FIX() macro...) - */ - -#if CONST_BITS == 13 -#define FIX_0_298631336 ((int32_t) 2446) /* FIX(0.298631336) */ -#define FIX_0_390180644 ((int32_t) 3196) /* FIX(0.390180644) */ -#define FIX_0_541196100 ((int32_t) 4433) /* FIX(0.541196100) */ -#define FIX_0_765366865 ((int32_t) 6270) /* FIX(0.765366865) */ -#define FIX_0_899976223 ((int32_t) 7373) /* FIX(0.899976223) */ -#define FIX_1_175875602 ((int32_t) 9633) /* FIX(1.175875602) */ -#define FIX_1_501321110 ((int32_t) 12299) /* FIX(1.501321110) */ -#define FIX_1_847759065 ((int32_t) 15137) /* FIX(1.847759065) */ -#define FIX_1_961570560 ((int32_t) 16069) /* FIX(1.961570560) */ -#define FIX_2_053119869 ((int32_t) 16819) /* FIX(2.053119869) */ -#define FIX_2_562915447 ((int32_t) 20995) /* FIX(2.562915447) */ -#define FIX_3_072711026 ((int32_t) 25172) /* FIX(3.072711026) */ -#else -#define FIX_0_298631336 FIX(0.298631336) -#define FIX_0_390180644 FIX(0.390180644) -#define FIX_0_541196100 FIX(0.541196100) -#define FIX_0_765366865 FIX(0.765366865) -#define FIX_0_899976223 FIX(0.899976223) -#define FIX_1_175875602 FIX(1.175875602) -#define FIX_1_501321110 FIX(1.501321110) -#define FIX_1_847759065 FIX(1.847759065) -#define FIX_1_961570560 FIX(1.961570560) -#define FIX_2_053119869 FIX(2.053119869) -#define FIX_2_562915447 FIX(2.562915447) -#define FIX_3_072711026 FIX(3.072711026) -#endif - - -/* Multiply an int32_t variable by an int32_t constant to yield an int32_t result. - * For 8-bit samples with the recommended scaling, all the variable - * and constant values involved are no more than 16 bits wide, so a - * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. - * For 12-bit samples, a full 32-bit multiplication will be needed. - */ - -#if BITS_IN_JSAMPLE == 8 && CONST_BITS<=13 && PASS1_BITS<=2 -#define MULTIPLY(var,const) MULTIPLY16C16(var,const) -#else -#define MULTIPLY(var,const) ((var) * (const)) -#endif - - -static av_always_inline void row_fdct(DCTELEM * data){ - int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - int tmp10, tmp11, tmp12, tmp13; - int z1, z2, z3, z4, z5; - DCTELEM *dataptr; - int ctr; - - /* Pass 1: process rows. */ - /* Note results are scaled up by sqrt(8) compared to a true DCT; */ - /* furthermore, we scale the results by 2**PASS1_BITS. */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - tmp0 = dataptr[0] + dataptr[7]; - tmp7 = dataptr[0] - dataptr[7]; - tmp1 = dataptr[1] + dataptr[6]; - tmp6 = dataptr[1] - dataptr[6]; - tmp2 = dataptr[2] + dataptr[5]; - tmp5 = dataptr[2] - dataptr[5]; - tmp3 = dataptr[3] + dataptr[4]; - tmp4 = dataptr[3] - dataptr[4]; - - /* Even part per LL&M figure 1 --- note that published figure is faulty; - * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". - */ - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - dataptr[0] = (DCTELEM) ((tmp10 + tmp11) << PASS1_BITS); - dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); - dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), - CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), - CONST_BITS-PASS1_BITS); - - /* Odd part per figure 8 --- note paper omits factor of sqrt(2). - * cK represents cos(K*pi/16). - * i0..i3 in the paper are tmp4..tmp7 here. - */ - - z1 = tmp4 + tmp7; - z2 = tmp5 + tmp6; - z3 = tmp4 + tmp6; - z4 = tmp5 + tmp7; - z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ - - tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ - tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ - tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ - tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ - z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ - z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ - z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ - z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ - - z3 += z5; - z4 += z5; - - dataptr[7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, CONST_BITS-PASS1_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, CONST_BITS-PASS1_BITS); - dataptr[1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, CONST_BITS-PASS1_BITS); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } -} - -/* - * Perform the forward DCT on one block of samples. - */ - -GLOBAL(void) -ff_jpeg_fdct_islow (DCTELEM * data) -{ - int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - int tmp10, tmp11, tmp12, tmp13; - int z1, z2, z3, z4, z5; - DCTELEM *dataptr; - int ctr; - - row_fdct(data); - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; - tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; - tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; - tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; - tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; - - /* Even part per LL&M figure 1 --- note that published figure is faulty; - * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". - */ - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS); - dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); - dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), - CONST_BITS+PASS1_BITS); - - /* Odd part per figure 8 --- note paper omits factor of sqrt(2). - * cK represents cos(K*pi/16). - * i0..i3 in the paper are tmp4..tmp7 here. - */ - - z1 = tmp4 + tmp7; - z2 = tmp5 + tmp6; - z3 = tmp4 + tmp6; - z4 = tmp5 + tmp7; - z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ - - tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ - tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ - tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ - tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ - z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ - z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ - z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ - z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ - - z3 += z5; - z4 += z5; - - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - -/* - * The secret of DCT2-4-8 is really simple -- you do the usual 1-DCT - * on the rows and then, instead of doing even and odd, part on the colums - * you do even part two times. - */ -GLOBAL(void) -ff_fdct248_islow (DCTELEM * data) -{ - int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - int tmp10, tmp11, tmp12, tmp13; - int z1; - DCTELEM *dataptr; - int ctr; - - row_fdct(data); - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*1]; - tmp1 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3]; - tmp2 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*6] + dataptr[DCTSIZE*7]; - tmp4 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*1]; - tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3]; - tmp6 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5]; - tmp7 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7]; - - tmp10 = tmp0 + tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - tmp13 = tmp0 - tmp3; - - dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS); - dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); - dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), - CONST_BITS+PASS1_BITS); - - tmp10 = tmp4 + tmp7; - tmp11 = tmp5 + tmp6; - tmp12 = tmp5 - tmp6; - tmp13 = tmp4 - tmp7; - - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#define BIT_DEPTH 8 +#include "jfdctint_template.c" +#undef BIT_DEPTH + +#define BIT_DEPTH 10 +#include "jfdctint_template.c" +#undef BIT_DEPTH diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jfdctint_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jfdctint_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jfdctint_template.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jfdctint_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,403 @@ +/* + * This file is part of the Independent JPEG Group's software. + * + * The authors make NO WARRANTY or representation, either express or implied, + * with respect to this software, its quality, accuracy, merchantability, or + * fitness for a particular purpose. This software is provided "AS IS", and + * you, its user, assume the entire risk as to its quality and accuracy. + * + * This software is copyright (C) 1991-1996, Thomas G. Lane. + * All Rights Reserved except as specified below. + * + * Permission is hereby granted to use, copy, modify, and distribute this + * software (or portions thereof) for any purpose, without fee, subject to + * these conditions: + * (1) If any part of the source code for this software is distributed, then + * this README file must be included, with this copyright and no-warranty + * notice unaltered; and any additions, deletions, or changes to the original + * files must be clearly indicated in accompanying documentation. + * (2) If only executable code is distributed, then the accompanying + * documentation must state that "this software is based in part on the work + * of the Independent JPEG Group". + * (3) Permission for use of this software is granted only if the user accepts + * full responsibility for any undesirable consequences; the authors accept + * NO LIABILITY for damages of any kind. + * + * These conditions apply to any software derived from or based on the IJG + * code, not just to the unmodified library. If you use our work, you ought + * to acknowledge us. + * + * Permission is NOT granted for the use of any IJG author's name or company + * name in advertising or publicity relating to this software or products + * derived from it. This software may be referred to only as "the Independent + * JPEG Group's software". + * + * We specifically permit and encourage the use of this software as the basis + * of commercial products, provided that all warranty or liability claims are + * assumed by the product vendor. + * + * This file contains a slow-but-accurate integer implementation of the + * forward DCT (Discrete Cosine Transform). + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on an algorithm described in + * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT + * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, + * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. + * The primary algorithm described there uses 11 multiplies and 29 adds. + * We use their alternate method with 12 multiplies and 32 adds. + * The advantage of this method is that no data path contains more than one + * multiplication; this allows a very simple and accurate implementation in + * scaled fixed-point arithmetic, with a minimal number of shifts. + */ + +/** + * @file + * Independent JPEG Group's slow & accurate dct. + */ + +#include "libavutil/common.h" +#include "dsputil.h" + +#include "bit_depth_template.c" + +#define DCTSIZE 8 +#define BITS_IN_JSAMPLE BIT_DEPTH +#define GLOBAL(x) x +#define RIGHT_SHIFT(x, n) ((x) >> (n)) +#define MULTIPLY16C16(var,const) ((var)*(const)) + +#if 1 //def USE_ACCURATE_ROUNDING +#define DESCALE(x,n) RIGHT_SHIFT((x) + (1 << ((n) - 1)), n) +#else +#define DESCALE(x,n) RIGHT_SHIFT(x, n) +#endif + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 +#error "Sorry, this code only copes with 8x8 DCTs." +#endif + + +/* + * The poop on this scaling stuff is as follows: + * + * Each 1-D DCT step produces outputs which are a factor of sqrt(N) + * larger than the true DCT outputs. The final outputs are therefore + * a factor of N larger than desired; since N=8 this can be cured by + * a simple right shift at the end of the algorithm. The advantage of + * this arrangement is that we save two multiplications per 1-D DCT, + * because the y0 and y4 outputs need not be divided by sqrt(N). + * In the IJG code, this factor of 8 is removed by the quantization step + * (in jcdctmgr.c), NOT in this module. + * + * We have to do addition and subtraction of the integer inputs, which + * is no problem, and multiplication by fractional constants, which is + * a problem to do in integer arithmetic. We multiply all the constants + * by CONST_SCALE and convert them to integer constants (thus retaining + * CONST_BITS bits of precision in the constants). After doing a + * multiplication we have to divide the product by CONST_SCALE, with proper + * rounding, to produce the correct output. This division can be done + * cheaply as a right shift of CONST_BITS bits. We postpone shifting + * as long as possible so that partial sums can be added together with + * full fractional precision. + * + * The outputs of the first pass are scaled up by PASS1_BITS bits so that + * they are represented to better-than-integral precision. These outputs + * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word + * with the recommended scaling. (For 12-bit sample data, the intermediate + * array is int32_t anyway.) + * + * To avoid overflow of the 32-bit intermediate results in pass 2, we must + * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis + * shows that the values given below are the most effective. + */ + +#undef CONST_BITS +#undef PASS1_BITS +#undef OUT_SHIFT + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 4 /* set this to 2 if 16x16 multiplies are faster */ +#define OUT_SHIFT PASS1_BITS +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#define OUT_SHIFT (PASS1_BITS + 1) +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_298631336 ((int32_t) 2446) /* FIX(0.298631336) */ +#define FIX_0_390180644 ((int32_t) 3196) /* FIX(0.390180644) */ +#define FIX_0_541196100 ((int32_t) 4433) /* FIX(0.541196100) */ +#define FIX_0_765366865 ((int32_t) 6270) /* FIX(0.765366865) */ +#define FIX_0_899976223 ((int32_t) 7373) /* FIX(0.899976223) */ +#define FIX_1_175875602 ((int32_t) 9633) /* FIX(1.175875602) */ +#define FIX_1_501321110 ((int32_t) 12299) /* FIX(1.501321110) */ +#define FIX_1_847759065 ((int32_t) 15137) /* FIX(1.847759065) */ +#define FIX_1_961570560 ((int32_t) 16069) /* FIX(1.961570560) */ +#define FIX_2_053119869 ((int32_t) 16819) /* FIX(2.053119869) */ +#define FIX_2_562915447 ((int32_t) 20995) /* FIX(2.562915447) */ +#define FIX_3_072711026 ((int32_t) 25172) /* FIX(3.072711026) */ +#else +#define FIX_0_298631336 FIX(0.298631336) +#define FIX_0_390180644 FIX(0.390180644) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_175875602 FIX(1.175875602) +#define FIX_1_501321110 FIX(1.501321110) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_1_961570560 FIX(1.961570560) +#define FIX_2_053119869 FIX(2.053119869) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_072711026 FIX(3.072711026) +#endif + + +/* Multiply an int32_t variable by an int32_t constant to yield an int32_t result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 && CONST_BITS<=13 && PASS1_BITS<=2 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +static av_always_inline void FUNC(row_fdct)(DCTELEM *data) +{ + int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + int tmp10, tmp11, tmp12, tmp13; + int z1, z2, z3, z4, z5; + DCTELEM *dataptr; + int ctr; + + /* Pass 1: process rows. */ + /* Note results are scaled up by sqrt(8) compared to a true DCT; */ + /* furthermore, we scale the results by 2**PASS1_BITS. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[0] + dataptr[7]; + tmp7 = dataptr[0] - dataptr[7]; + tmp1 = dataptr[1] + dataptr[6]; + tmp6 = dataptr[1] - dataptr[6]; + tmp2 = dataptr[2] + dataptr[5]; + tmp5 = dataptr[2] - dataptr[5]; + tmp3 = dataptr[3] + dataptr[4]; + tmp4 = dataptr[3] - dataptr[4]; + + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". + */ + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[0] = (DCTELEM) ((tmp10 + tmp11) << PASS1_BITS); + dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); + dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), + CONST_BITS-PASS1_BITS); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * cK represents cos(K*pi/16). + * i0..i3 in the paper are tmp4..tmp7 here. + */ + + z1 = tmp4 + tmp7; + z2 = tmp5 + tmp6; + z3 = tmp4 + tmp6; + z4 = tmp5 + tmp7; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + dataptr[7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, CONST_BITS-PASS1_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, CONST_BITS-PASS1_BITS); + dataptr[1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, CONST_BITS-PASS1_BITS); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } +} + +/* + * Perform the forward DCT on one block of samples. + */ + +GLOBAL(void) +FUNC(ff_jpeg_fdct_islow)(DCTELEM *data) +{ + int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + int tmp10, tmp11, tmp12, tmp13; + int z1, z2, z3, z4, z5; + DCTELEM *dataptr; + int ctr; + + FUNC(row_fdct)(data); + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". + */ + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = DESCALE(tmp10 + tmp11, OUT_SHIFT); + dataptr[DCTSIZE*4] = DESCALE(tmp10 - tmp11, OUT_SHIFT); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); + dataptr[DCTSIZE*2] = DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), + CONST_BITS + OUT_SHIFT); + dataptr[DCTSIZE*6] = DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), + CONST_BITS + OUT_SHIFT); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * cK represents cos(K*pi/16). + * i0..i3 in the paper are tmp4..tmp7 here. + */ + + z1 = tmp4 + tmp7; + z2 = tmp5 + tmp6; + z3 = tmp4 + tmp6; + z4 = tmp5 + tmp7; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + dataptr[DCTSIZE*7] = DESCALE(tmp4 + z1 + z3, CONST_BITS + OUT_SHIFT); + dataptr[DCTSIZE*5] = DESCALE(tmp5 + z2 + z4, CONST_BITS + OUT_SHIFT); + dataptr[DCTSIZE*3] = DESCALE(tmp6 + z2 + z3, CONST_BITS + OUT_SHIFT); + dataptr[DCTSIZE*1] = DESCALE(tmp7 + z1 + z4, CONST_BITS + OUT_SHIFT); + + dataptr++; /* advance pointer to next column */ + } +} + +/* + * The secret of DCT2-4-8 is really simple -- you do the usual 1-DCT + * on the rows and then, instead of doing even and odd, part on the columns + * you do even part two times. + */ +GLOBAL(void) +FUNC(ff_fdct248_islow)(DCTELEM *data) +{ + int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + int tmp10, tmp11, tmp12, tmp13; + int z1; + DCTELEM *dataptr; + int ctr; + + FUNC(row_fdct)(data); + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*1]; + tmp1 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3]; + tmp2 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*6] + dataptr[DCTSIZE*7]; + tmp4 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*1]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3]; + tmp6 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5]; + tmp7 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7]; + + tmp10 = tmp0 + tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + tmp13 = tmp0 - tmp3; + + dataptr[DCTSIZE*0] = DESCALE(tmp10 + tmp11, OUT_SHIFT); + dataptr[DCTSIZE*4] = DESCALE(tmp10 - tmp11, OUT_SHIFT); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); + dataptr[DCTSIZE*2] = DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), + CONST_BITS+OUT_SHIFT); + dataptr[DCTSIZE*6] = DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), + CONST_BITS+OUT_SHIFT); + + tmp10 = tmp4 + tmp7; + tmp11 = tmp5 + tmp6; + tmp12 = tmp5 - tmp6; + tmp13 = tmp4 - tmp7; + + dataptr[DCTSIZE*1] = DESCALE(tmp10 + tmp11, OUT_SHIFT); + dataptr[DCTSIZE*5] = DESCALE(tmp10 - tmp11, OUT_SHIFT); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); + dataptr[DCTSIZE*3] = DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), + CONST_BITS + OUT_SHIFT); + dataptr[DCTSIZE*7] = DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), + CONST_BITS + OUT_SHIFT); + + dataptr++; /* advance pointer to next column */ + } +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jpeglsdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jpeglsdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jpeglsdec.c 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jpeglsdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -364,14 +364,13 @@ AVCodec ff_jpegls_decoder = { - "jpegls", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_JPEGLS, - sizeof(MJpegDecodeContext), - ff_mjpeg_decode_init, - NULL, - ff_mjpeg_decode_end, - ff_mjpeg_decode_frame, - CODEC_CAP_DR1, + .name = "jpegls", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_JPEGLS, + .priv_data_size = sizeof(MJpegDecodeContext), + .init = ff_mjpeg_decode_init, + .close = ff_mjpeg_decode_end, + .decode = ff_mjpeg_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jpeglsenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jpeglsenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jpeglsenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jpeglsenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -357,7 +357,7 @@ put_bits(&pb, 8, v); } } - align_put_bits(&pb); + avpriv_align_put_bits(&pb); av_free(buf2); /* End of image */ @@ -383,13 +383,12 @@ } AVCodec ff_jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them - "jpegls", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_JPEGLS, - sizeof(JpeglsContext), - encode_init_ls, - encode_picture_ls, - NULL, - .pix_fmts= (const enum PixelFormat[]){PIX_FMT_BGR24, PIX_FMT_RGB24, PIX_FMT_GRAY8, PIX_FMT_GRAY16, PIX_FMT_NONE}, - .long_name= NULL_IF_CONFIG_SMALL("JPEG-LS"), + .name = "jpegls", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_JPEGLS, + .priv_data_size = sizeof(JpeglsContext), + .init = encode_init_ls, + .encode = encode_picture_ls, + .pix_fmts = (const enum PixelFormat[]){PIX_FMT_BGR24, PIX_FMT_RGB24, PIX_FMT_GRAY8, PIX_FMT_GRAY16, PIX_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jrevdct.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jrevdct.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jrevdct.c 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jrevdct.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,4 @@ /* - * jrevdct.c - * * This file is part of the Independent JPEG Group's software. * * The authors make NO WARRANTY or representation, either express or implied, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jvdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jvdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/jvdec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/jvdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -150,7 +150,7 @@ if (video_type == 0 || video_type == 1) { GetBitContext gb; - init_get_bits(&gb, buf, FFMIN(video_size, buf_end - buf)); + init_get_bits(&gb, buf, FFMIN(video_size, (buf_end - buf) * 8)); for (j = 0; j < avctx->height; j += 8) for (i = 0; i < avctx->width; i += 8) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/kgv1dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/kgv1dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/kgv1dec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/kgv1dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -165,14 +165,12 @@ } AVCodec ff_kgv1_decoder = { - "kgv1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_KGV1, - sizeof(KgvContext), - decode_init, - NULL, - decode_end, - decode_frame, - .max_lowres = 1, + .name = "kgv1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_KGV1, + .priv_data_size = sizeof(KgvContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, .long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/kmvc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/kmvc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/kmvc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/kmvc.c 2012-01-11 00:34:30.000000000 +0000 @@ -46,6 +46,7 @@ uint32_t pal[256]; uint8_t *cur, *prev; uint8_t *frm0, *frm1; + GetByteContext g; } KmvcContext; typedef struct BitBuf { @@ -55,19 +56,19 @@ #define BLK(data, x, y) data[(x) + (y) * 320] -#define kmvc_init_getbits(bb, src) bb.bits = 7; bb.bitbuf = *src++; +#define kmvc_init_getbits(bb, g) bb.bits = 7; bb.bitbuf = bytestream2_get_byte(g); -#define kmvc_getbit(bb, src, res) {\ +#define kmvc_getbit(bb, g, res) {\ res = 0; \ if (bb.bitbuf & (1 << bb.bits)) res = 1; \ bb.bits--; \ if(bb.bits == -1) { \ - bb.bitbuf = *src++; \ + bb.bitbuf = bytestream2_get_byte(g); \ bb.bits = 7; \ } \ } -static void kmvc_decode_intra_8x8(KmvcContext * ctx, const uint8_t * src, int w, int h) +static int kmvc_decode_intra_8x8(KmvcContext * ctx, int w, int h) { BitBuf bb; int res, val; @@ -76,28 +77,32 @@ int l0x, l1x, l0y, l1y; int mx, my; - kmvc_init_getbits(bb, src); + kmvc_init_getbits(bb, &ctx->g); for (by = 0; by < h; by += 8) for (bx = 0; bx < w; bx += 8) { - kmvc_getbit(bb, src, res); + if (!bytestream2_get_bytes_left(&ctx->g)) { + av_log(ctx->avctx, AV_LOG_ERROR, "Data overrun\n"); + return AVERROR_INVALIDDATA; + } + kmvc_getbit(bb, &ctx->g, res); if (!res) { // fill whole 8x8 block - val = *src++; + val = bytestream2_get_byte(&ctx->g); for (i = 0; i < 64; i++) BLK(ctx->cur, bx + (i & 0x7), by + (i >> 3)) = val; } else { // handle four 4x4 subblocks for (i = 0; i < 4; i++) { l0x = bx + (i & 1) * 4; l0y = by + (i & 2) * 2; - kmvc_getbit(bb, src, res); + kmvc_getbit(bb, &ctx->g, res); if (!res) { - kmvc_getbit(bb, src, res); + kmvc_getbit(bb, &ctx->g, res); if (!res) { // fill whole 4x4 block - val = *src++; + val = bytestream2_get_byte(&ctx->g); for (j = 0; j < 16; j++) BLK(ctx->cur, l0x + (j & 3), l0y + (j >> 2)) = val; } else { // copy block from already decoded place - val = *src++; + val = bytestream2_get_byte(&ctx->g); mx = val & 0xF; my = val >> 4; for (j = 0; j < 16; j++) @@ -108,17 +113,17 @@ for (j = 0; j < 4; j++) { l1x = l0x + (j & 1) * 2; l1y = l0y + (j & 2); - kmvc_getbit(bb, src, res); + kmvc_getbit(bb, &ctx->g, res); if (!res) { - kmvc_getbit(bb, src, res); + kmvc_getbit(bb, &ctx->g, res); if (!res) { // fill whole 2x2 block - val = *src++; + val = bytestream2_get_byte(&ctx->g); BLK(ctx->cur, l1x, l1y) = val; BLK(ctx->cur, l1x + 1, l1y) = val; BLK(ctx->cur, l1x, l1y + 1) = val; BLK(ctx->cur, l1x + 1, l1y + 1) = val; } else { // copy block from already decoded place - val = *src++; + val = bytestream2_get_byte(&ctx->g); mx = val & 0xF; my = val >> 4; BLK(ctx->cur, l1x, l1y) = BLK(ctx->cur, l1x - mx, l1y - my); @@ -130,19 +135,21 @@ BLK(ctx->cur, l1x + 1 - mx, l1y + 1 - my); } } else { // read values for block - BLK(ctx->cur, l1x, l1y) = *src++; - BLK(ctx->cur, l1x + 1, l1y) = *src++; - BLK(ctx->cur, l1x, l1y + 1) = *src++; - BLK(ctx->cur, l1x + 1, l1y + 1) = *src++; + BLK(ctx->cur, l1x, l1y) = bytestream2_get_byte(&ctx->g); + BLK(ctx->cur, l1x + 1, l1y) = bytestream2_get_byte(&ctx->g); + BLK(ctx->cur, l1x, l1y + 1) = bytestream2_get_byte(&ctx->g); + BLK(ctx->cur, l1x + 1, l1y + 1) = bytestream2_get_byte(&ctx->g); } } } } } } + + return 0; } -static void kmvc_decode_inter_8x8(KmvcContext * ctx, const uint8_t * src, int w, int h) +static int kmvc_decode_inter_8x8(KmvcContext * ctx, int w, int h) { BitBuf bb; int res, val; @@ -151,15 +158,19 @@ int l0x, l1x, l0y, l1y; int mx, my; - kmvc_init_getbits(bb, src); + kmvc_init_getbits(bb, &ctx->g); for (by = 0; by < h; by += 8) for (bx = 0; bx < w; bx += 8) { - kmvc_getbit(bb, src, res); + kmvc_getbit(bb, &ctx->g, res); if (!res) { - kmvc_getbit(bb, src, res); + kmvc_getbit(bb, &ctx->g, res); if (!res) { // fill whole 8x8 block - val = *src++; + if (!bytestream2_get_bytes_left(&ctx->g)) { + av_log(ctx->avctx, AV_LOG_ERROR, "Data overrun\n"); + return AVERROR_INVALIDDATA; + } + val = bytestream2_get_byte(&ctx->g); for (i = 0; i < 64; i++) BLK(ctx->cur, bx + (i & 0x7), by + (i >> 3)) = val; } else { // copy block from previous frame @@ -168,18 +179,22 @@ BLK(ctx->prev, bx + (i & 0x7), by + (i >> 3)); } } else { // handle four 4x4 subblocks + if (!bytestream2_get_bytes_left(&ctx->g)) { + av_log(ctx->avctx, AV_LOG_ERROR, "Data overrun\n"); + return AVERROR_INVALIDDATA; + } for (i = 0; i < 4; i++) { l0x = bx + (i & 1) * 4; l0y = by + (i & 2) * 2; - kmvc_getbit(bb, src, res); + kmvc_getbit(bb, &ctx->g, res); if (!res) { - kmvc_getbit(bb, src, res); + kmvc_getbit(bb, &ctx->g, res); if (!res) { // fill whole 4x4 block - val = *src++; + val = bytestream2_get_byte(&ctx->g); for (j = 0; j < 16; j++) BLK(ctx->cur, l0x + (j & 3), l0y + (j >> 2)) = val; } else { // copy block - val = *src++; + val = bytestream2_get_byte(&ctx->g); mx = (val & 0xF) - 8; my = (val >> 4) - 8; for (j = 0; j < 16; j++) @@ -190,17 +205,17 @@ for (j = 0; j < 4; j++) { l1x = l0x + (j & 1) * 2; l1y = l0y + (j & 2); - kmvc_getbit(bb, src, res); + kmvc_getbit(bb, &ctx->g, res); if (!res) { - kmvc_getbit(bb, src, res); + kmvc_getbit(bb, &ctx->g, res); if (!res) { // fill whole 2x2 block - val = *src++; + val = bytestream2_get_byte(&ctx->g); BLK(ctx->cur, l1x, l1y) = val; BLK(ctx->cur, l1x + 1, l1y) = val; BLK(ctx->cur, l1x, l1y + 1) = val; BLK(ctx->cur, l1x + 1, l1y + 1) = val; } else { // copy block - val = *src++; + val = bytestream2_get_byte(&ctx->g); mx = (val & 0xF) - 8; my = (val >> 4) - 8; BLK(ctx->cur, l1x, l1y) = BLK(ctx->prev, l1x + mx, l1y + my); @@ -212,22 +227,22 @@ BLK(ctx->prev, l1x + 1 + mx, l1y + 1 + my); } } else { // read values for block - BLK(ctx->cur, l1x, l1y) = *src++; - BLK(ctx->cur, l1x + 1, l1y) = *src++; - BLK(ctx->cur, l1x, l1y + 1) = *src++; - BLK(ctx->cur, l1x + 1, l1y + 1) = *src++; + BLK(ctx->cur, l1x, l1y) = bytestream2_get_byte(&ctx->g); + BLK(ctx->cur, l1x + 1, l1y) = bytestream2_get_byte(&ctx->g); + BLK(ctx->cur, l1x, l1y + 1) = bytestream2_get_byte(&ctx->g); + BLK(ctx->cur, l1x + 1, l1y + 1) = bytestream2_get_byte(&ctx->g); } } } } } } + + return 0; } static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; KmvcContext *const ctx = avctx->priv_data; uint8_t *out, *src; int i; @@ -235,6 +250,7 @@ int blocksize; const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL); + bytestream2_init(&ctx->g, avpkt->data, avpkt->size); if (ctx->pic.data[0]) avctx->release_buffer(avctx, &ctx->pic); @@ -245,16 +261,16 @@ return -1; } - header = *buf++; + header = bytestream2_get_byte(&ctx->g); /* blocksize 127 is really palette change event */ - if (buf[0] == 127) { - buf += 3; + if (bytestream2_peek_byte(&ctx->g) == 127) { + bytestream2_skip(&ctx->g, 3); for (i = 0; i < 127; i++) { - ctx->pal[i + (header & 0x81)] = AV_RB24(buf); - buf += 4; + ctx->pal[i + (header & 0x81)] = bytestream2_get_be24(&ctx->g); + bytestream2_skip(&ctx->g, 1); } - buf -= 127 * 4 + 3; + bytestream2_seek(&ctx->g, -127 * 4 - 3, SEEK_CUR); } if (header & KMVC_KEYFRAME) { @@ -269,7 +285,7 @@ ctx->pic.palette_has_changed = 1; // palette starts from index 1 and has 127 entries for (i = 1; i <= ctx->palsize; i++) { - ctx->pal[i] = bytestream_get_be24(&buf); + ctx->pal[i] = bytestream2_get_be24(&ctx->g); } } @@ -286,7 +302,7 @@ /* make the palette available on the way out */ memcpy(ctx->pic.data[1], ctx->pal, 1024); - blocksize = *buf++; + blocksize = bytestream2_get_byte(&ctx->g); if (blocksize != 8 && blocksize != 127) { av_log(avctx, AV_LOG_ERROR, "Block size = %i\n", blocksize); @@ -299,10 +315,10 @@ memcpy(ctx->cur, ctx->prev, 320 * 200); break; case 3: - kmvc_decode_intra_8x8(ctx, buf, avctx->width, avctx->height); + kmvc_decode_intra_8x8(ctx, avctx->width, avctx->height); break; case 4: - kmvc_decode_inter_8x8(ctx, buf, avctx->width, avctx->height); + kmvc_decode_inter_8x8(ctx, avctx->width, avctx->height); break; default: av_log(avctx, AV_LOG_ERROR, "Unknown compression method %i\n", header & KMVC_METHOD); @@ -330,7 +346,7 @@ *(AVFrame *) data = ctx->pic; /* always report that the buffer was completely consumed */ - return buf_size; + return avpkt->size; } @@ -398,14 +414,13 @@ } AVCodec ff_kmvc_decoder = { - "kmvc", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_KMVC, - sizeof(KmvcContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "kmvc", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_KMVC, + .priv_data_size = sizeof(KmvcContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Karl Morton's video codec"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lagarith.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lagarith.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lagarith.c 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lagarith.c 2012-01-11 00:34:30.000000000 +0000 @@ -32,25 +32,27 @@ #include "lagarithrac.h" enum LagarithFrameType { - FRAME_RAW = 1, /*!< uncompressed */ - FRAME_U_RGB24 = 2, /*!< unaligned RGB24 */ - FRAME_ARITH_YUY2 = 3, /*!< arithmetic coded YUY2 */ - FRAME_ARITH_RGB24 = 4, /*!< arithmetic coded RGB24 */ - FRAME_SOLID_GRAY = 5, /*!< solid grayscale color frame */ - FRAME_SOLID_COLOR = 6, /*!< solid non-grayscale color frame */ - FRAME_OLD_ARITH_RGB = 7, /*!< obsolete arithmetic coded RGB (no longer encoded by upstream since version 1.1.0) */ - FRAME_ARITH_RGBA = 8, /*!< arithmetic coded RGBA */ - FRAME_SOLID_RGBA = 9, /*!< solid RGBA color frame */ - FRAME_ARITH_YV12 = 10, /*!< arithmetic coded YV12 */ - FRAME_REDUCED_RES = 11, /*!< reduced resolution YV12 frame */ + FRAME_RAW = 1, /**< uncompressed */ + FRAME_U_RGB24 = 2, /**< unaligned RGB24 */ + FRAME_ARITH_YUY2 = 3, /**< arithmetic coded YUY2 */ + FRAME_ARITH_RGB24 = 4, /**< arithmetic coded RGB24 */ + FRAME_SOLID_GRAY = 5, /**< solid grayscale color frame */ + FRAME_SOLID_COLOR = 6, /**< solid non-grayscale color frame */ + FRAME_OLD_ARITH_RGB = 7, /**< obsolete arithmetic coded RGB (no longer encoded by upstream since version 1.1.0) */ + FRAME_ARITH_RGBA = 8, /**< arithmetic coded RGBA */ + FRAME_SOLID_RGBA = 9, /**< solid RGBA color frame */ + FRAME_ARITH_YV12 = 10, /**< arithmetic coded YV12 */ + FRAME_REDUCED_RES = 11, /**< reduced resolution YV12 frame */ }; typedef struct LagarithContext { AVCodecContext *avctx; AVFrame picture; DSPContext dsp; - int zeros; /*!< number of consecutive zero bytes encountered */ - int zeros_rem; /*!< number of zero bytes remaining to output */ + int zeros; /**< number of consecutive zero bytes encountered */ + int zeros_rem; /**< number of zero bytes remaining to output */ + uint8_t *rgb_planes; + int rgb_stride; } LagarithContext; /** @@ -245,21 +247,21 @@ { int L, TL; + /* Left pixel is actually prev_row[width] */ + L = buf[width - stride - 1]; if (!line) { /* Left prediction only for first line */ L = l->dsp.add_hfyu_left_prediction(buf + 1, buf + 1, width - 1, buf[0]); return; } else if (line == 1) { - /* Second line, left predict first pixel, the rest of the line is median predicted */ - /* FIXME: In the case of RGB this pixel is top predicted */ - TL = buf[-stride]; + /* Second line, left predict first pixel, the rest of the line is median predicted + * NOTE: In the case of RGB this pixel is top predicted */ + TL = l->avctx->pix_fmt == PIX_FMT_YUV420P ? buf[-stride] : L; } else { /* Top left is 2 rows back, last pixel */ TL = buf[width - (2 * stride) - 1]; } - /* Left pixel is actually prev_row[width] */ - L = buf[width - stride - 1]; add_lag_median_prediction(buf, buf - stride, buf, width, &L, &TL); @@ -443,6 +445,9 @@ AVFrame *const p = &l->picture; uint8_t frametype = 0; uint32_t offset_gu = 0, offset_bv = 0, offset_ry = 9; + int offs[4]; + uint8_t *srcs[4], *dst; + int i, j, planes = 3; AVFrame *picture = data; @@ -458,6 +463,79 @@ offset_bv = AV_RL32(buf + 5); switch (frametype) { + case FRAME_SOLID_RGBA: + avctx->pix_fmt = PIX_FMT_RGB32; + + if (avctx->get_buffer(avctx, p) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return -1; + } + + dst = p->data[0]; + for (j = 0; j < avctx->height; j++) { + for (i = 0; i < avctx->width; i++) + AV_WN32(dst + i * 4, offset_gu); + dst += p->linesize[0]; + } + break; + case FRAME_ARITH_RGBA: + avctx->pix_fmt = PIX_FMT_RGB32; + planes = 4; + offset_ry += 4; + offs[3] = AV_RL32(buf + 9); + case FRAME_ARITH_RGB24: + if (frametype == FRAME_ARITH_RGB24) + avctx->pix_fmt = PIX_FMT_RGB24; + + if (avctx->get_buffer(avctx, p) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return -1; + } + + offs[0] = offset_bv; + offs[1] = offset_gu; + offs[2] = offset_ry; + + if (!l->rgb_planes) { + l->rgb_stride = FFALIGN(avctx->width, 16); + l->rgb_planes = av_malloc(l->rgb_stride * avctx->height * planes); + if (!l->rgb_planes) { + av_log(avctx, AV_LOG_ERROR, "cannot allocate temporary buffer\n"); + return AVERROR(ENOMEM); + } + } + for (i = 0; i < planes; i++) + srcs[i] = l->rgb_planes + (i + 1) * l->rgb_stride * avctx->height - l->rgb_stride; + for (i = 0; i < planes; i++) + lag_decode_arith_plane(l, srcs[i], + avctx->width, avctx->height, + -l->rgb_stride, buf + offs[i], + buf_size); + dst = p->data[0]; + for (i = 0; i < planes; i++) + srcs[i] = l->rgb_planes + i * l->rgb_stride * avctx->height; + for (j = 0; j < avctx->height; j++) { + for (i = 0; i < avctx->width; i++) { + uint8_t r, g, b, a; + r = srcs[0][i]; + g = srcs[1][i]; + b = srcs[2][i]; + r += g; + b += g; + if (frametype == FRAME_ARITH_RGBA) { + a = srcs[3][i]; + AV_WN32(dst + i * 4, MKBETAG(a, r, g, b)); + } else { + dst[i * 3 + 0] = r; + dst[i * 3 + 1] = g; + dst[i * 3 + 2] = b; + } + } + dst += p->linesize[0]; + for (i = 0; i < planes; i++) + srcs[i] += l->rgb_stride; + } + break; case FRAME_ARITH_YV12: avctx->pix_fmt = PIX_FMT_YUV420P; @@ -504,19 +582,19 @@ if (l->picture.data[0]) avctx->release_buffer(avctx, &l->picture); + av_freep(&l->rgb_planes); return 0; } AVCodec ff_lagarith_decoder = { - "lagarith", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_LAGARITH, - sizeof(LagarithContext), - lag_decode_init, - NULL, - lag_decode_end, - lag_decode_frame, - CODEC_CAP_DR1, + .name = "lagarith", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_LAGARITH, + .priv_data_size = sizeof(LagarithContext), + .init = lag_decode_init, + .close = lag_decode_end, + .decode = lag_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Lagarith lossless"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lagarithrac.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lagarithrac.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lagarithrac.h 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lagarithrac.h 2012-01-11 00:34:30.000000000 +0000 @@ -40,15 +40,15 @@ AVCodecContext *avctx; unsigned low; unsigned range; - unsigned scale; /*!< Number of bits of precision in range. */ - unsigned hash_shift; /*!< Number of bits to shift to calculate hash for radix search. */ + unsigned scale; /**< Number of bits of precision in range. */ + unsigned hash_shift; /**< Number of bits to shift to calculate hash for radix search. */ - const uint8_t *bytestream_start; /*!< Start of input bytestream. */ - const uint8_t *bytestream; /*!< Current position in input bytestream. */ - const uint8_t *bytestream_end; /*!< End position of input bytestream. */ + const uint8_t *bytestream_start; /**< Start of input bytestream. */ + const uint8_t *bytestream; /**< Current position in input bytestream. */ + const uint8_t *bytestream_end; /**< End position of input bytestream. */ - uint32_t prob[258]; /*!< Table of cumulative probability for each symbol. */ - uint8_t range_hash[256]; /*!< Hash table mapping upper byte to approximate symbol. */ + uint32_t prob[258]; /**< Table of cumulative probability for each symbol. */ + uint8_t range_hash[256]; /**< Hash table mapping upper byte to approximate symbol. */ } lag_rac; void lag_rac_init(lag_rac *l, GetBitContext *gb, int length); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/latm_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/latm_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/latm_parser.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/latm_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -36,7 +36,7 @@ } LATMParseContext; /** - * finds the end of the current frame in the bitstream. + * Find the end of the current frame in the bitstream. * @return the position of the first byte of the next frame, or -1 */ static int latm_find_frame_end(AVCodecParserContext *s1, const uint8_t *buf, @@ -106,9 +106,8 @@ } AVCodecParser ff_aac_latm_parser = { - { CODEC_ID_AAC_LATM }, - sizeof(LATMParseContext), - NULL, - latm_parse, - ff_parse_close + .codec_ids = { CODEC_ID_AAC_LATM }, + .priv_data_size = sizeof(LATMParseContext), + .parser_parse = latm_parse, + .parser_close = ff_parse_close }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lcldec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lcldec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lcldec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lcldec.c 2012-01-11 00:34:30.000000000 +0000 @@ -73,8 +73,8 @@ /** - * \param srcptr compressed source buffer, must be padded with at least 5 extra bytes - * \param destptr must be padded sufficiently for av_memcpy_backptr + * @param srcptr compressed source buffer, must be padded with at least 5 extra bytes + * @param destptr must be padded sufficiently for av_memcpy_backptr */ static unsigned int mszh_decomp(const unsigned char * srcptr, int srclen, unsigned char * destptr, unsigned int destsize) { @@ -119,11 +119,11 @@ #if CONFIG_ZLIB_DECODER /** - * \brief decompress a zlib-compressed data block into decomp_buf - * \param src compressed input buffer - * \param src_len data length in input buffer - * \param offset offset in decomp_buf - * \param expected expected decompressed length + * @brief decompress a zlib-compressed data block into decomp_buf + * @param src compressed input buffer + * @param src_len data length in input buffer + * @param offset offset in decomp_buf + * @param expected expected decompressed length */ static int zlib_decomp(AVCodecContext *avctx, const uint8_t *src, int src_len, int offset, int expected) { @@ -610,30 +610,28 @@ #if CONFIG_MSZH_DECODER AVCodec ff_mszh_decoder = { - "mszh", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MSZH, - sizeof(LclDecContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "mszh", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MSZH, + .priv_data_size = sizeof(LclDecContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) MSZH"), }; #endif #if CONFIG_ZLIB_DECODER AVCodec ff_zlib_decoder = { - "zlib", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ZLIB, - sizeof(LclDecContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "zlib", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ZLIB, + .priv_data_size = sizeof(LclDecContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"), }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lclenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lclenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lclenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lclenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -171,13 +171,13 @@ } AVCodec ff_zlib_encoder = { - "zlib", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ZLIB, - sizeof(LclEncContext), - encode_init, - encode_frame, - encode_end, + .name = "zlib", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ZLIB, + .priv_data_size = sizeof(LclEncContext), + .init = encode_init, + .encode = encode_frame, + .close = encode_end, .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_BGR24, PIX_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libavcodec.v mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libavcodec.v --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libavcodec.v 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libavcodec.v 2012-01-11 00:34:30.000000000 +0000 @@ -1,9 +1,8 @@ LIBAVCODEC_$MAJOR { - global: *; - local: - ff_*_bsf; - ff_*_decoder; - ff_*_encoder; - ff_*_hwaccel; - ff_*_parser; + global: av*; + audio_resample; + audio_resample_close; + #deprecated, remove after next bump + img_get_alpha_info; + local: *; }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libdiracdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libdiracdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libdiracdec.c 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libdiracdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -37,34 +37,34 @@ #include /** contains a single frame returned from Dirac */ -typedef struct FfmpegDiracDecoderParams { +typedef struct DiracDecoderParams { /** decoder handle */ dirac_decoder_t* p_decoder; /** buffer to hold decoded frame */ unsigned char* p_out_frame_buf; -} FfmpegDiracDecoderParams; +} DiracDecoderParams; /** * returns Libav chroma format */ -static enum PixelFormat GetFfmpegChromaFormat(dirac_chroma_t dirac_pix_fmt) +static enum PixelFormat get_chroma_format(dirac_chroma_t dirac_pix_fmt) { - int num_formats = sizeof(ffmpeg_dirac_pixel_format_map) / - sizeof(ffmpeg_dirac_pixel_format_map[0]); + int num_formats = sizeof(dirac_pixel_format_map) / + sizeof(dirac_pixel_format_map[0]); int idx; for (idx = 0; idx < num_formats; ++idx) - if (ffmpeg_dirac_pixel_format_map[idx].dirac_pix_fmt == dirac_pix_fmt) - return ffmpeg_dirac_pixel_format_map[idx].ff_pix_fmt; + if (dirac_pixel_format_map[idx].dirac_pix_fmt == dirac_pix_fmt) + return dirac_pixel_format_map[idx].ff_pix_fmt; return PIX_FMT_NONE; } static av_cold int libdirac_decode_init(AVCodecContext *avccontext) { - FfmpegDiracDecoderParams *p_dirac_params = avccontext->priv_data; + DiracDecoderParams *p_dirac_params = avccontext->priv_data; p_dirac_params->p_decoder = dirac_decoder_init(avccontext->debug); if (!p_dirac_params->p_decoder) @@ -80,7 +80,7 @@ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - FfmpegDiracDecoderParams *p_dirac_params = avccontext->priv_data; + DiracDecoderParams *p_dirac_params = avccontext->priv_data; AVPicture *picture = data; AVPicture pic; int pict_size; @@ -117,7 +117,7 @@ avccontext->height = src_params->height; avccontext->width = src_params->width; - avccontext->pix_fmt = GetFfmpegChromaFormat(src_params->chroma); + avccontext->pix_fmt = get_chroma_format(src_params->chroma); if (avccontext->pix_fmt == PIX_FMT_NONE) { av_log(avccontext, AV_LOG_ERROR, "Dirac chroma format %d not supported currently\n", @@ -174,7 +174,7 @@ static av_cold int libdirac_decode_close(AVCodecContext *avccontext) { - FfmpegDiracDecoderParams *p_dirac_params = avccontext->priv_data; + DiracDecoderParams *p_dirac_params = avccontext->priv_data; dirac_decoder_close(p_dirac_params->p_decoder); av_freep(&p_dirac_params->p_out_frame_buf); @@ -195,15 +195,14 @@ AVCodec ff_libdirac_decoder = { - "libdirac", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_DIRAC, - sizeof(FfmpegDiracDecoderParams), - libdirac_decode_init, - NULL, - libdirac_decode_close, - libdirac_decode_frame, - CODEC_CAP_DELAY, + .name = "libdirac", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_DIRAC, + .priv_data_size = sizeof(DiracDecoderParams), + .init = libdirac_decode_init, + .close = libdirac_decode_close, + .decode = libdirac_decode_frame, + .capabilities = CODEC_CAP_DELAY, .flush = libdirac_flush, .long_name = NULL_IF_CONFIG_SMALL("libdirac Dirac 2.2"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libdiracenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libdiracenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libdiracenc.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libdiracenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -38,7 +38,7 @@ #include /** Dirac encoder private data */ -typedef struct FfmpegDiracEncoderParams { +typedef struct DiracEncoderParams { /** Dirac encoder context */ dirac_encoder_context_t enc_ctx; @@ -61,27 +61,27 @@ int enc_buf_size; /** queue storing encoded frames */ - FfmpegDiracSchroQueue enc_frame_queue; + DiracSchroQueue enc_frame_queue; /** end of sequence signalled by user, 0 - false, 1 - true */ int eos_signalled; /** end of sequence returned by encoder, 0 - false, 1 - true */ int eos_pulled; -} FfmpegDiracEncoderParams; +} DiracEncoderParams; /** * Works out Dirac-compatible chroma format. */ static dirac_chroma_t GetDiracChromaFormat(enum PixelFormat ff_pix_fmt) { - int num_formats = sizeof(ffmpeg_dirac_pixel_format_map) / - sizeof(ffmpeg_dirac_pixel_format_map[0]); + int num_formats = sizeof(dirac_pixel_format_map) / + sizeof(dirac_pixel_format_map[0]); int idx; for (idx = 0; idx < num_formats; ++idx) - if (ffmpeg_dirac_pixel_format_map[idx].ff_pix_fmt == ff_pix_fmt) - return ffmpeg_dirac_pixel_format_map[idx].dirac_pix_fmt; + if (dirac_pixel_format_map[idx].ff_pix_fmt == ff_pix_fmt) + return dirac_pixel_format_map[idx].dirac_pix_fmt; return formatNK; } @@ -127,7 +127,7 @@ static av_cold int libdirac_encode_init(AVCodecContext *avccontext) { - FfmpegDiracEncoderParams* p_dirac_params = avccontext->priv_data; + DiracEncoderParams* p_dirac_params = avccontext->priv_data; int no_local = 1; int verbose = avccontext->debug; VideoFormat preset; @@ -136,7 +136,7 @@ preset = GetDiracVideoFormatPreset(avccontext); /* initialize the encoder context */ - dirac_encoder_context_init(&(p_dirac_params->enc_ctx), preset); + dirac_encoder_context_init(&p_dirac_params->enc_ctx, preset); p_dirac_params->enc_ctx.src_params.chroma = GetDiracChromaFormat(avccontext->pix_fmt); @@ -199,7 +199,7 @@ * irrespective of the type of source material */ p_dirac_params->enc_ctx.enc_params.picture_coding_mode = 1; - p_dirac_params->p_encoder = dirac_encoder_init(&(p_dirac_params->enc_ctx), + p_dirac_params->p_encoder = dirac_encoder_init(&p_dirac_params->enc_ctx, verbose); if (!p_dirac_params->p_encoder) { @@ -219,9 +219,9 @@ static void DiracFreeFrame(void *data) { - FfmpegDiracSchroEncodedFrame *enc_frame = data; + DiracSchroEncodedFrame *enc_frame = data; - av_freep(&(enc_frame->p_encbuf)); + av_freep(&enc_frame->p_encbuf); av_free(enc_frame); } @@ -231,9 +231,9 @@ { int enc_size = 0; dirac_encoder_state_t state; - FfmpegDiracEncoderParams* p_dirac_params = avccontext->priv_data; - FfmpegDiracSchroEncodedFrame* p_frame_output = NULL; - FfmpegDiracSchroEncodedFrame* p_next_output_frame = NULL; + DiracEncoderParams *p_dirac_params = avccontext->priv_data; + DiracSchroEncodedFrame *p_frame_output = NULL; + DiracSchroEncodedFrame *p_next_output_frame = NULL; int go = 1; int last_frame_in_sequence = 0; @@ -303,7 +303,7 @@ break; /* create output frame */ - p_frame_output = av_mallocz(sizeof(FfmpegDiracSchroEncodedFrame)); + p_frame_output = av_mallocz(sizeof(DiracSchroEncodedFrame)); /* set output data */ p_frame_output->size = p_dirac_params->enc_buf_size; p_frame_output->p_encbuf = p_dirac_params->enc_buf; @@ -371,7 +371,7 @@ static av_cold int libdirac_encode_close(AVCodecContext *avccontext) { - FfmpegDiracEncoderParams* p_dirac_params = avccontext->priv_data; + DiracEncoderParams *p_dirac_params = avccontext->priv_data; /* close the encoder */ dirac_encoder_close(p_dirac_params->p_encoder); @@ -392,13 +392,13 @@ AVCodec ff_libdirac_encoder = { - "libdirac", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_DIRAC, - sizeof(FfmpegDiracEncoderParams), - libdirac_encode_init, - libdirac_encode_frame, - libdirac_encode_close, + .name = "libdirac", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_DIRAC, + .priv_data_size = sizeof(DiracEncoderParams), + .init = libdirac_encode_init, + .encode = libdirac_encode_frame, + .close = libdirac_encode_close, .capabilities = CODEC_CAP_DELAY, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("libdirac Dirac 2.2"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libdirac.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libdirac.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libdirac.h 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libdirac.h 2012-01-11 00:34:30.000000000 +0000 @@ -20,7 +20,7 @@ /** * @file -* data structures common to libdiracenc.c and libdiracdec.c +* data structures common to libdirac encoder and decoder */ #ifndef AVCODEC_LIBDIRAC_H @@ -35,7 +35,7 @@ static const struct { enum PixelFormat ff_pix_fmt; dirac_chroma_t dirac_pix_fmt; -} ffmpeg_dirac_pixel_format_map[] = { +} dirac_pixel_format_map[] = { { PIX_FMT_YUV420P, format420 }, { PIX_FMT_YUV422P, format422 }, { PIX_FMT_YUV444P, format444 }, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libdirac_libschro.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libdirac_libschro.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libdirac_libschro.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libdirac_libschro.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,7 +25,7 @@ #include "libdirac_libschro.h" -static const FfmpegDiracSchroVideoFormatInfo ff_dirac_schro_video_format_info[] = { +static const DiracSchroVideoFormatInfo ff_dirac_schro_video_format_info[] = { { 640, 480, 24000, 1001}, { 176, 120, 15000, 1001}, { 176, 144, 25, 2 }, @@ -53,7 +53,7 @@ sizeof(ff_dirac_schro_video_format_info[0]); for (idx = 1; idx < num_formats; ++idx) { - const FfmpegDiracSchroVideoFormatInfo *vf = &ff_dirac_schro_video_format_info[idx]; + const DiracSchroVideoFormatInfo *vf = &ff_dirac_schro_video_format_info[idx]; if (avccontext->width == vf->width && avccontext->height == vf->height) { ret_idx = idx; @@ -65,22 +65,22 @@ return ret_idx; } -void ff_dirac_schro_queue_init(FfmpegDiracSchroQueue *queue) +void ff_dirac_schro_queue_init(DiracSchroQueue *queue) { queue->p_head = queue->p_tail = NULL; queue->size = 0; } -void ff_dirac_schro_queue_free(FfmpegDiracSchroQueue *queue, +void ff_dirac_schro_queue_free(DiracSchroQueue *queue, void (*free_func)(void *)) { while (queue->p_head) free_func(ff_dirac_schro_queue_pop(queue)); } -int ff_dirac_schro_queue_push_back(FfmpegDiracSchroQueue *queue, void *p_data) +int ff_dirac_schro_queue_push_back(DiracSchroQueue *queue, void *p_data) { - FfmpegDiracSchroQueueElement *p_new = av_mallocz(sizeof(FfmpegDiracSchroQueueElement)); + DiracSchroQueueElement *p_new = av_mallocz(sizeof(DiracSchroQueueElement)); if (!p_new) return -1; @@ -97,9 +97,9 @@ return 0; } -void *ff_dirac_schro_queue_pop(FfmpegDiracSchroQueue *queue) +void *ff_dirac_schro_queue_pop(DiracSchroQueue *queue) { - FfmpegDiracSchroQueueElement *top = queue->p_head; + DiracSchroQueueElement *top = queue->p_head; if (top) { void *data = top->data; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libdirac_libschro.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libdirac_libschro.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libdirac_libschro.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libdirac_libschro.h 2012-01-11 00:34:30.000000000 +0000 @@ -33,7 +33,7 @@ uint16_t height; uint16_t frame_rate_num; uint16_t frame_rate_denom; -} FfmpegDiracSchroVideoFormatInfo; +} DiracSchroVideoFormatInfo; /** * Returns the index into the Dirac Schro common video format info table @@ -43,7 +43,7 @@ /** * contains a single encoded frame returned from Dirac or Schroedinger */ -typedef struct FfmpegDiracSchroEncodedFrame { +typedef struct DiracSchroEncodedFrame { /** encoded frame data */ uint8_t *p_encbuf; @@ -55,51 +55,51 @@ /** key frame flag. 1 : is key frame , 0 : in not key frame */ uint16_t key_frame; -} FfmpegDiracSchroEncodedFrame; +} DiracSchroEncodedFrame; /** * queue element */ -typedef struct FfmpegDiracSchroQueueElement { +typedef struct DiracSchroQueueElement { /** Data to be stored in queue*/ void *data; /** Pointer to next element queue */ - struct FfmpegDiracSchroQueueElement *next; -} FfmpegDiracSchroQueueElement; + struct DiracSchroQueueElement *next; +} DiracSchroQueueElement; /** * A simple queue implementation used in libdirac and libschroedinger */ -typedef struct FfmpegDiracSchroQueue { +typedef struct DiracSchroQueue { /** Pointer to head of queue */ - FfmpegDiracSchroQueueElement *p_head; + DiracSchroQueueElement *p_head; /** Pointer to tail of queue */ - FfmpegDiracSchroQueueElement *p_tail; + DiracSchroQueueElement *p_tail; /** Queue size*/ int size; -} FfmpegDiracSchroQueue; +} DiracSchroQueue; /** * Initialise the queue */ -void ff_dirac_schro_queue_init(FfmpegDiracSchroQueue *queue); +void ff_dirac_schro_queue_init(DiracSchroQueue *queue); /** * Add an element to the end of the queue */ -int ff_dirac_schro_queue_push_back(FfmpegDiracSchroQueue *queue, void *p_data); +int ff_dirac_schro_queue_push_back(DiracSchroQueue *queue, void *p_data); /** * Return the first element in the queue */ -void *ff_dirac_schro_queue_pop(FfmpegDiracSchroQueue *queue); +void *ff_dirac_schro_queue_pop(DiracSchroQueue *queue); /** * Free the queue resources. free_func is a function supplied by the caller to * free any resources allocated by the caller. The data field of the queue * element is passed to it. */ -void ff_dirac_schro_queue_free(FfmpegDiracSchroQueue *queue, +void ff_dirac_schro_queue_free(DiracSchroQueue *queue, void (*free_func)(void *)); #endif /* AVCODEC_LIBDIRAC_LIBSCHRO_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libfaac.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libfaac.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libfaac.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libfaac.c 2012-01-11 00:34:30.000000000 +0000 @@ -155,13 +155,13 @@ }; AVCodec ff_libfaac_encoder = { - "libfaac", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_AAC, - sizeof(FaacAudioContext), - Faac_encode_init, - Faac_encode_frame, - Faac_encode_close, + .name = "libfaac", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_AAC, + .priv_data_size = sizeof(FaacAudioContext), + .init = Faac_encode_init, + .encode = Faac_encode_frame, + .close = Faac_encode_close, .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("libfaac AAC (Advanced Audio Codec)"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libgsm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libgsm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libgsm.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libgsm.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,36 +35,26 @@ #define GSM_MS_BLOCK_SIZE 65 #define GSM_FRAME_SIZE 160 -static av_cold int libgsm_init(AVCodecContext *avctx) { +static av_cold int libgsm_encode_init(AVCodecContext *avctx) { if (avctx->channels > 1) { av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d channels\n", avctx->channels); return -1; } - if(avctx->codec->decode){ - if(!avctx->channels) - avctx->channels= 1; - - if(!avctx->sample_rate) - avctx->sample_rate= 8000; - - avctx->sample_fmt = AV_SAMPLE_FMT_S16; - }else{ - if (avctx->sample_rate != 8000) { - av_log(avctx, AV_LOG_ERROR, "Sample rate 8000Hz required for GSM, got %dHz\n", - avctx->sample_rate); - if(avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) - return -1; - } - if (avctx->bit_rate != 13000 /* Official */ && - avctx->bit_rate != 13200 /* Very common */ && - avctx->bit_rate != 0 /* Unknown; a.o. mov does not set bitrate when decoding */ ) { - av_log(avctx, AV_LOG_ERROR, "Bitrate 13000bps required for GSM, got %dbps\n", - avctx->bit_rate); - if(avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) - return -1; - } + if (avctx->sample_rate != 8000) { + av_log(avctx, AV_LOG_ERROR, "Sample rate 8000Hz required for GSM, got %dHz\n", + avctx->sample_rate); + if (avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) + return -1; + } + if (avctx->bit_rate != 13000 /* Official */ && + avctx->bit_rate != 13200 /* Very common */ && + avctx->bit_rate != 0 /* Unknown; a.o. mov does not set bitrate when decoding */ ) { + av_log(avctx, AV_LOG_ERROR, "Bitrate 13000bps required for GSM, got %dbps\n", + avctx->bit_rate); + if (avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) + return -1; } avctx->priv_data = gsm_create(); @@ -88,7 +78,7 @@ return 0; } -static av_cold int libgsm_close(AVCodecContext *avctx) { +static av_cold int libgsm_encode_close(AVCodecContext *avctx) { av_freep(&avctx->coded_frame); gsm_destroy(avctx->priv_data); avctx->priv_data = NULL; @@ -113,69 +103,145 @@ AVCodec ff_libgsm_encoder = { - "libgsm", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_GSM, - 0, - libgsm_init, - libgsm_encode_frame, - libgsm_close, + .name = "libgsm", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_GSM, + .init = libgsm_encode_init, + .encode = libgsm_encode_frame, + .close = libgsm_encode_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"), }; AVCodec ff_libgsm_ms_encoder = { - "libgsm_ms", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_GSM_MS, - 0, - libgsm_init, - libgsm_encode_frame, - libgsm_close, + .name = "libgsm_ms", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_GSM_MS, + .init = libgsm_encode_init, + .encode = libgsm_encode_frame, + .close = libgsm_encode_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), }; -static int libgsm_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; - *data_size = 0; /* In case of error */ - if(buf_size < avctx->block_align) return -1; +typedef struct LibGSMDecodeContext { + AVFrame frame; + struct gsm_state *state; +} LibGSMDecodeContext; + +static av_cold int libgsm_decode_init(AVCodecContext *avctx) { + LibGSMDecodeContext *s = avctx->priv_data; + + if (avctx->channels > 1) { + av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d channels\n", + avctx->channels); + return -1; + } + + if (!avctx->channels) + avctx->channels = 1; + + if (!avctx->sample_rate) + avctx->sample_rate = 8000; + + avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + s->state = gsm_create(); + switch(avctx->codec_id) { case CODEC_ID_GSM: - if(gsm_decode(avctx->priv_data,buf,data)) return -1; - *data_size = GSM_FRAME_SIZE*sizeof(int16_t); + avctx->frame_size = GSM_FRAME_SIZE; + avctx->block_align = GSM_BLOCK_SIZE; break; - case CODEC_ID_GSM_MS: - if(gsm_decode(avctx->priv_data,buf,data) || - gsm_decode(avctx->priv_data,buf+33,((int16_t*)data)+GSM_FRAME_SIZE)) return -1; - *data_size = GSM_FRAME_SIZE*sizeof(int16_t)*2; + case CODEC_ID_GSM_MS: { + int one = 1; + gsm_option(s->state, GSM_OPT_WAV49, &one); + avctx->frame_size = 2 * GSM_FRAME_SIZE; + avctx->block_align = GSM_MS_BLOCK_SIZE; + } } + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + + return 0; +} + +static av_cold int libgsm_decode_close(AVCodecContext *avctx) { + LibGSMDecodeContext *s = avctx->priv_data; + + gsm_destroy(s->state); + s->state = NULL; + return 0; +} + +static int libgsm_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) +{ + int i, ret; + LibGSMDecodeContext *s = avctx->priv_data; + uint8_t *buf = avpkt->data; + int buf_size = avpkt->size; + int16_t *samples; + + if (buf_size < avctx->block_align) { + av_log(avctx, AV_LOG_ERROR, "Packet is too small\n"); + return AVERROR_INVALIDDATA; + } + + /* get output buffer */ + s->frame.nb_samples = avctx->frame_size; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (int16_t *)s->frame.data[0]; + + for (i = 0; i < avctx->frame_size / GSM_FRAME_SIZE; i++) { + if ((ret = gsm_decode(s->state, buf, samples)) < 0) + return -1; + buf += GSM_BLOCK_SIZE; + samples += GSM_FRAME_SIZE; + } + + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return avctx->block_align; } +static void libgsm_flush(AVCodecContext *avctx) { + LibGSMDecodeContext *s = avctx->priv_data; + int one = 1; + + gsm_destroy(s->state); + s->state = gsm_create(); + if (avctx->codec_id == CODEC_ID_GSM_MS) + gsm_option(s->state, GSM_OPT_WAV49, &one); +} + AVCodec ff_libgsm_decoder = { - "libgsm", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_GSM, - 0, - libgsm_init, - NULL, - libgsm_close, - libgsm_decode_frame, + .name = "libgsm", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_GSM, + .priv_data_size = sizeof(LibGSMDecodeContext), + .init = libgsm_decode_init, + .close = libgsm_decode_close, + .decode = libgsm_decode_frame, + .flush = libgsm_flush, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"), }; AVCodec ff_libgsm_ms_decoder = { - "libgsm_ms", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_GSM_MS, - 0, - libgsm_init, - NULL, - libgsm_close, - libgsm_decode_frame, + .name = "libgsm_ms", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_GSM_MS, + .priv_data_size = sizeof(LibGSMDecodeContext), + .init = libgsm_decode_init, + .close = libgsm_decode_close, + .decode = libgsm_decode_frame, + .flush = libgsm_flush, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libmp3lame.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libmp3lame.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libmp3lame.c 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libmp3lame.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,16 +25,20 @@ */ #include "libavutil/intreadwrite.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" #include "avcodec.h" #include "mpegaudio.h" #include -#define BUFFER_SIZE (7200 + 2*MPA_FRAME_SIZE + MPA_FRAME_SIZE/4) +#define BUFFER_SIZE (7200 + 2 * MPA_FRAME_SIZE + MPA_FRAME_SIZE / 4) typedef struct Mp3AudioContext { + AVClass *class; lame_global_flags *gfp; int stereo; uint8_t buffer[BUFFER_SIZE]; int buffer_index; + int reservoir; } Mp3AudioContext; static av_cold int MP3lame_encode_init(AVCodecContext *avctx) @@ -51,27 +55,29 @@ lame_set_in_samplerate(s->gfp, avctx->sample_rate); lame_set_out_samplerate(s->gfp, avctx->sample_rate); lame_set_num_channels(s->gfp, avctx->channels); - if(avctx->compression_level == FF_COMPRESSION_DEFAULT) { + if (avctx->compression_level == FF_COMPRESSION_DEFAULT) { lame_set_quality(s->gfp, 5); } else { lame_set_quality(s->gfp, avctx->compression_level); } lame_set_mode(s->gfp, s->stereo ? JOINT_STEREO : MONO); - lame_set_brate(s->gfp, avctx->bit_rate/1000); - if(avctx->flags & CODEC_FLAG_QSCALE) { + lame_set_brate(s->gfp, avctx->bit_rate / 1000); + if (avctx->flags & CODEC_FLAG_QSCALE) { lame_set_brate(s->gfp, 0); lame_set_VBR(s->gfp, vbr_default); - lame_set_VBR_quality(s->gfp, avctx->global_quality/(float)FF_QP2LAMBDA); + lame_set_VBR_quality(s->gfp, avctx->global_quality / (float)FF_QP2LAMBDA); } lame_set_bWriteVbrTag(s->gfp,0); - lame_set_disable_reservoir(s->gfp, avctx->flags2 & CODEC_FLAG2_BIT_RESERVOIR ? 0 : 1); +#if FF_API_LAME_GLOBAL_OPTS + s->reservoir = avctx->flags2 & CODEC_FLAG2_BIT_RESERVOIR; +#endif + lame_set_disable_reservoir(s->gfp, !s->reservoir); if (lame_init_params(s->gfp) < 0) goto err_close; - avctx->frame_size = lame_get_framesize(s->gfp); - - avctx->coded_frame= avcodec_alloc_frame(); - avctx->coded_frame->key_frame= 1; + avctx->frame_size = lame_get_framesize(s->gfp); + avctx->coded_frame = avcodec_alloc_frame(); + avctx->coded_frame->key_frame = 1; return 0; @@ -86,60 +92,62 @@ }; static const int sBitRates[2][3][15] = { - { { 0, 32, 64, 96,128,160,192,224,256,288,320,352,384,416,448}, - { 0, 32, 48, 56, 64, 80, 96,112,128,160,192,224,256,320,384}, - { 0, 32, 40, 48, 56, 64, 80, 96,112,128,160,192,224,256,320} + { + { 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448 }, + { 0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384 }, + { 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 } }, - { { 0, 32, 48, 56, 64, 80, 96,112,128,144,160,176,192,224,256}, - { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96,112,128,144,160}, - { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96,112,128,144,160} + { + { 0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256 }, + { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160 }, + { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160 } }, }; -static const int sSamplesPerFrame[2][3] = -{ - { 384, 1152, 1152 }, - { 384, 1152, 576 } +static const int sSamplesPerFrame[2][3] = { + { 384, 1152, 1152 }, + { 384, 1152, 576 } }; -static const int sBitsPerSlot[3] = { - 32, - 8, - 8 -}; +static const int sBitsPerSlot[3] = { 32, 8, 8 }; static int mp3len(void *data, int *samplesPerFrame, int *sampleRate) { - uint32_t header = AV_RB32(data); - int layerID = 3 - ((header >> 17) & 0x03); - int bitRateID = ((header >> 12) & 0x0f); + uint32_t header = AV_RB32(data); + int layerID = 3 - ((header >> 17) & 0x03); + int bitRateID = ((header >> 12) & 0x0f); int sampleRateID = ((header >> 10) & 0x03); - int bitsPerSlot = sBitsPerSlot[layerID]; - int isPadded = ((header >> 9) & 0x01); - static int const mode_tab[4]= {2,3,1,0}; - int mode= mode_tab[(header >> 19) & 0x03]; - int mpeg_id= mode>0; + int bitsPerSlot = sBitsPerSlot[layerID]; + int isPadded = ((header >> 9) & 0x01); + static int const mode_tab[4] = { 2, 3, 1, 0 }; + int mode = mode_tab[(header >> 19) & 0x03]; + int mpeg_id = mode > 0; int temp0, temp1, bitRate; - if ( (( header >> 21 ) & 0x7ff) != 0x7ff || mode == 3 || layerID==3 || sampleRateID==3) { + if (((header >> 21) & 0x7ff) != 0x7ff || mode == 3 || layerID == 3 || + sampleRateID == 3) { return -1; } - if(!samplesPerFrame) samplesPerFrame= &temp0; - if(!sampleRate ) sampleRate = &temp1; + if (!samplesPerFrame) + samplesPerFrame = &temp0; + if (!sampleRate) + sampleRate = &temp1; -// *isMono = ((header >> 6) & 0x03) == 0x03; + //*isMono = ((header >> 6) & 0x03) == 0x03; - *sampleRate = sSampleRates[sampleRateID]>>mode; - bitRate = sBitRates[mpeg_id][layerID][bitRateID] * 1000; + *sampleRate = sSampleRates[sampleRateID] >> mode; + bitRate = sBitRates[mpeg_id][layerID][bitRateID] * 1000; *samplesPerFrame = sSamplesPerFrame[mpeg_id][layerID]; -//av_log(NULL, AV_LOG_DEBUG, "sr:%d br:%d spf:%d l:%d m:%d\n", *sampleRate, bitRate, *samplesPerFrame, layerID, mode); + //av_log(NULL, AV_LOG_DEBUG, + // "sr:%d br:%d spf:%d l:%d m:%d\n", + // *sampleRate, bitRate, *samplesPerFrame, layerID, mode); return *samplesPerFrame * bitRate / (bitsPerSlot * *sampleRate) + isPadded; } -static int MP3lame_encode_frame(AVCodecContext *avctx, - unsigned char *frame, int buf_size, void *data) +static int MP3lame_encode_frame(AVCodecContext *avctx, unsigned char *frame, + int buf_size, void *data) { Mp3AudioContext *s = avctx->priv_data; int len; @@ -147,59 +155,52 @@ /* lame 3.91 dies on '1-channel interleaved' data */ - if(data){ + if (data) { if (s->stereo) { - lame_result = lame_encode_buffer_interleaved( - s->gfp, - data, - avctx->frame_size, - s->buffer + s->buffer_index, - BUFFER_SIZE - s->buffer_index - ); + lame_result = lame_encode_buffer_interleaved(s->gfp, data, + avctx->frame_size, + s->buffer + s->buffer_index, + BUFFER_SIZE - s->buffer_index); } else { - lame_result = lame_encode_buffer( - s->gfp, - data, - data, - avctx->frame_size, - s->buffer + s->buffer_index, - BUFFER_SIZE - s->buffer_index - ); + lame_result = lame_encode_buffer(s->gfp, data, data, + avctx->frame_size, s->buffer + + s->buffer_index, BUFFER_SIZE - + s->buffer_index); } - }else{ - lame_result= lame_encode_flush( - s->gfp, - s->buffer + s->buffer_index, - BUFFER_SIZE - s->buffer_index - ); + } else { + lame_result = lame_encode_flush(s->gfp, s->buffer + s->buffer_index, + BUFFER_SIZE - s->buffer_index); } - if(lame_result < 0){ - if(lame_result==-1) { + if (lame_result < 0) { + if (lame_result == -1) { /* output buffer too small */ - av_log(avctx, AV_LOG_ERROR, "lame: output buffer too small (buffer index: %d, free bytes: %d)\n", s->buffer_index, BUFFER_SIZE - s->buffer_index); + av_log(avctx, AV_LOG_ERROR, + "lame: output buffer too small (buffer index: %d, free bytes: %d)\n", + s->buffer_index, BUFFER_SIZE - s->buffer_index); } return -1; } s->buffer_index += lame_result; - if(s->buffer_index<4) + if (s->buffer_index < 4) return 0; - len= mp3len(s->buffer, NULL, NULL); -//av_log(avctx, AV_LOG_DEBUG, "in:%d packet-len:%d index:%d\n", avctx->frame_size, len, s->buffer_index); - if(len <= s->buffer_index){ + len = mp3len(s->buffer, NULL, NULL); + //av_log(avctx, AV_LOG_DEBUG, "in:%d packet-len:%d index:%d\n", + // avctx->frame_size, len, s->buffer_index); + if (len <= s->buffer_index) { memcpy(frame, s->buffer, len); s->buffer_index -= len; - memmove(s->buffer, s->buffer+len, s->buffer_index); - //FIXME fix the audio codec API, so we do not need the memcpy() -/*for(i=0; ibuffer, s->buffer + len, s->buffer_index); + // FIXME fix the audio codec API, so we do not need the memcpy() + /*for(i=0; ipriv_data; - s->frame_count = 0; s->dec_state = Decoder_Interface_init(); if (!s->dec_state) { av_log(avctx, AV_LOG_ERROR, "Decoder_Interface_init error\n"); @@ -114,6 +113,9 @@ return AVERROR(ENOSYS); } + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } @@ -122,21 +124,29 @@ AMRContext *s = avctx->priv_data; Decoder_Interface_exit(s->dec_state); + return 0; } static int amr_nb_decode_frame(AVCodecContext *avctx, void *data, - int *data_size, AVPacket *avpkt) + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AMRContext *s = avctx->priv_data; static const uint8_t block_size[16] = { 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0 }; enum Mode dec_mode; - int packet_size; + int packet_size, ret; av_dlog(avctx, "amr_decode_frame buf=%p buf_size=%d frame_count=%d!!\n", - buf, buf_size, s->frame_count); + buf, buf_size, avctx->frame_number); + + /* get output buffer */ + s->frame.nb_samples = 160; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } dec_mode = (buf[0] >> 3) & 0x000F; packet_size = block_size[dec_mode] + 1; @@ -147,25 +157,26 @@ return AVERROR_INVALIDDATA; } - s->frame_count++; av_dlog(avctx, "packet_size=%d buf= 0x%X %X %X %X\n", packet_size, buf[0], buf[1], buf[2], buf[3]); /* call decoder */ - Decoder_Interface_Decode(s->dec_state, buf, data, 0); - *data_size = 160 * 2; + Decoder_Interface_Decode(s->dec_state, buf, (short *)s->frame.data[0], 0); + + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; return packet_size; } AVCodec ff_libopencore_amrnb_decoder = { - "libopencore_amrnb", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_AMR_NB, - sizeof(AMRContext), - amr_nb_decode_init, - NULL, - amr_nb_decode_close, - amr_nb_decode_frame, + .name = "libopencore_amrnb", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_AMR_NB, + .priv_data_size = sizeof(AMRContext), + .init = amr_nb_decode_init, + .close = amr_nb_decode_close, + .decode = amr_nb_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("OpenCORE Adaptive Multi-Rate (AMR) Narrow-Band"), }; @@ -173,8 +184,6 @@ { AMRContext *s = avctx->priv_data; - s->frame_count = 0; - if (avctx->sample_rate != 8000) { av_log(avctx, AV_LOG_ERROR, "Only 8000Hz sample rate supported\n"); return AVERROR(ENOSYS); @@ -230,14 +239,13 @@ } AVCodec ff_libopencore_amrnb_encoder = { - "libopencore_amrnb", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_AMR_NB, - sizeof(AMRContext), - amr_nb_encode_init, - amr_nb_encode_frame, - amr_nb_encode_close, - NULL, + .name = "libopencore_amrnb", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_AMR_NB, + .priv_data_size = sizeof(AMRContext), + .init = amr_nb_encode_init, + .encode = amr_nb_encode_frame, + .close = amr_nb_encode_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("OpenCORE Adaptive Multi-Rate (AMR) Narrow-Band"), .priv_class = &class, @@ -252,6 +260,7 @@ #include typedef struct AMRWBContext { + AVFrame frame; void *state; } AMRWBContext; @@ -268,22 +277,28 @@ return AVERROR(ENOSYS); } + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } static int amr_wb_decode_frame(AVCodecContext *avctx, void *data, - int *data_size, AVPacket *avpkt) + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AMRWBContext *s = avctx->priv_data; - int mode; + int mode, ret; int packet_size; static const uint8_t block_size[16] = {18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 6, 0, 0, 0, 1, 1}; - if (!buf_size) - /* nothing to do */ - return 0; + /* get output buffer */ + s->frame.nb_samples = 320; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } mode = (buf[0] >> 3) & 0x000F; packet_size = block_size[mode]; @@ -294,8 +309,11 @@ return AVERROR_INVALIDDATA; } - D_IF_decode(s->state, buf, data, _good_frame); - *data_size = 320 * 2; + D_IF_decode(s->state, buf, (short *)s->frame.data[0], _good_frame); + + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return packet_size; } @@ -308,14 +326,14 @@ } AVCodec ff_libopencore_amrwb_decoder = { - "libopencore_amrwb", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_AMR_WB, - sizeof(AMRWBContext), - amr_wb_decode_init, - NULL, - amr_wb_decode_close, - amr_wb_decode_frame, + .name = "libopencore_amrwb", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_AMR_WB, + .priv_data_size = sizeof(AMRWBContext), + .init = amr_wb_decode_init, + .close = amr_wb_decode_close, + .decode = amr_wb_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("OpenCORE Adaptive Multi-Rate (AMR) Wide-Band"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libopenjpeg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libopenjpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libopenjpeg.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libopenjpeg.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,6 +27,7 @@ #include "libavutil/imgutils.h" #include "avcodec.h" #include "libavutil/intreadwrite.h" +#include "thread.h" #define OPJ_STATIC #include @@ -57,11 +58,19 @@ return 0; } +static av_cold int libopenjpeg_decode_init_thread_copy(AVCodecContext *avctx) +{ + LibOpenJPEGContext *ctx = avctx->priv_data; + + avctx->coded_frame = &ctx->image; + return 0; +} + static int libopenjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; + uint8_t *buf = avpkt->data; int buf_size = avpkt->size; LibOpenJPEGContext *ctx = avctx->priv_data; AVFrame *picture = &ctx->image, *output = data; @@ -94,7 +103,7 @@ } opj_set_event_mgr((opj_common_ptr)dec, NULL, NULL); - ctx->dec_params.cp_reduce = avctx->lowres; + ctx->dec_params.cp_limit_decoding = LIMIT_TO_MAIN_HEADER; // Tie decoder with decoding parameters opj_setup_decoder(dec, &ctx->dec_params); stream = opj_cio_open((opj_common_ptr)dec, buf, buf_size); @@ -104,7 +113,7 @@ return -1; } - // Decode the codestream + // Decode the header only image = opj_decode_with_info(dec, stream, NULL); opj_cio_close(stream); if(!image) { @@ -112,8 +121,8 @@ opj_destroy_decompress(dec); return -1; } - width = image->comps[0].w << avctx->lowres; - height = image->comps[0].h << avctx->lowres; + width = image->x1 - image->x0; + height = image->y1 - image->y0; if(av_image_check_size(width, height, 0, avctx) < 0) { av_log(avctx, AV_LOG_ERROR, "%dx%d dimension invalid.\n", width, height); goto done; @@ -139,13 +148,30 @@ } if(picture->data[0]) - avctx->release_buffer(avctx, picture); + ff_thread_release_buffer(avctx, picture); + + if(ff_thread_get_buffer(avctx, picture) < 0){ + av_log(avctx, AV_LOG_ERROR, "ff_thread_get_buffer() failed\n"); + return -1; + } - if(avctx->get_buffer(avctx, picture) < 0) { - av_log(avctx, AV_LOG_ERROR, "Couldn't allocate image buffer.\n"); + ff_thread_finish_setup(avctx); + + ctx->dec_params.cp_limit_decoding = NO_LIMITATION; + ctx->dec_params.cp_reduce = avctx->lowres; + // Tie decoder with decoding parameters + opj_setup_decoder(dec, &ctx->dec_params); + stream = opj_cio_open((opj_common_ptr)dec, buf, buf_size); + if(!stream) { + av_log(avctx, AV_LOG_ERROR, "Codestream could not be opened for reading.\n"); + opj_destroy_decompress(dec); return -1; } + // Decode the codestream + image = opj_decode_with_info(dec, stream, NULL); + opj_cio_close(stream); + for(x = 0; x < image->numcomps; x++) { adjust[x] = FFMAX(image->comps[x].prec - 8, 0); } @@ -179,21 +205,21 @@ LibOpenJPEGContext *ctx = avctx->priv_data; if(ctx->image.data[0]) - avctx->release_buffer(avctx, &ctx->image); + ff_thread_release_buffer(avctx, &ctx->image); return 0 ; } AVCodec ff_libopenjpeg_decoder = { - "libopenjpeg", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_JPEG2000, - sizeof(LibOpenJPEGContext), - libopenjpeg_decode_init, - NULL, - libopenjpeg_decode_close, - libopenjpeg_decode_frame, - CODEC_CAP_DR1, - .max_lowres = 5, - .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG based JPEG 2000 decoder"), -} ; + .name = "libopenjpeg", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_JPEG2000, + .priv_data_size = sizeof(LibOpenJPEGContext), + .init = libopenjpeg_decode_init, + .close = libopenjpeg_decode_close, + .decode = libopenjpeg_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, + .max_lowres = 5, + .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG based JPEG 2000 decoder"), + .init_thread_copy = ONLY_IF_THREADS_ENABLED(libopenjpeg_decode_init_thread_copy) +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libschroedinger.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libschroedinger.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libschroedinger.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libschroedinger.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,7 +20,7 @@ /** * @file -* function definitions common to libschroedingerdec.c and libschroedingerenc.c +* function definitions common to libschroedinger decoder and encoder */ #include "libdirac_libschro.h" @@ -64,14 +64,14 @@ int ff_get_schro_frame_format (SchroChromaFormat schro_pix_fmt, SchroFrameFormat *schro_frame_fmt) { - unsigned int num_formats = sizeof(ffmpeg_schro_pixel_format_map) / - sizeof(ffmpeg_schro_pixel_format_map[0]); + unsigned int num_formats = sizeof(schro_pixel_format_map) / + sizeof(schro_pixel_format_map[0]); int idx; for (idx = 0; idx < num_formats; ++idx) { - if (ffmpeg_schro_pixel_format_map[idx].schro_pix_fmt == schro_pix_fmt) { - *schro_frame_fmt = ffmpeg_schro_pixel_format_map[idx].schro_frame_fmt; + if (schro_pixel_format_map[idx].schro_pix_fmt == schro_pix_fmt) { + *schro_frame_fmt = schro_pixel_format_map[idx].schro_frame_fmt; return 0; } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libschroedingerdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libschroedingerdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libschroedingerdec.c 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libschroedingerdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,7 +41,7 @@ #include /** libschroedinger decoder private data */ -typedef struct FfmpegSchroDecoderParams { +typedef struct SchroDecoderParams { /** Schroedinger video format */ SchroVideoFormat *format; @@ -52,7 +52,7 @@ SchroDecoder* decoder; /** queue storing decoded frames */ - FfmpegDiracSchroQueue dec_frame_queue; + DiracSchroQueue dec_frame_queue; /** end of sequence signalled */ int eos_signalled; @@ -62,25 +62,25 @@ /** decoded picture */ AVPicture dec_pic; -} FfmpegSchroDecoderParams; +} SchroDecoderParams; -typedef struct FfmpegSchroParseUnitContext { +typedef struct SchroParseUnitContext { const uint8_t *buf; int buf_size; -} FfmpegSchroParseUnitContext; +} SchroParseUnitContext; static void libschroedinger_decode_buffer_free(SchroBuffer *schro_buf, void *priv); -static void FfmpegSchroParseContextInit(FfmpegSchroParseUnitContext *parse_ctx, - const uint8_t *buf, int buf_size) +static void SchroParseContextInit(SchroParseUnitContext *parse_ctx, + const uint8_t *buf, int buf_size) { parse_ctx->buf = buf; parse_ctx->buf_size = buf_size; } -static SchroBuffer* FfmpegFindNextSchroParseUnit(FfmpegSchroParseUnitContext *parse_ctx) +static SchroBuffer *FindNextSchroParseUnit(SchroParseUnitContext *parse_ctx) { SchroBuffer *enc_buf = NULL; int next_pu_offset = 0; @@ -120,22 +120,22 @@ /** * Returns Libav chroma format. */ -static enum PixelFormat GetFfmpegChromaFormat(SchroChromaFormat schro_pix_fmt) +static enum PixelFormat get_chroma_format(SchroChromaFormat schro_pix_fmt) { - int num_formats = sizeof(ffmpeg_schro_pixel_format_map) / - sizeof(ffmpeg_schro_pixel_format_map[0]); + int num_formats = sizeof(schro_pixel_format_map) / + sizeof(schro_pixel_format_map[0]); int idx; for (idx = 0; idx < num_formats; ++idx) - if (ffmpeg_schro_pixel_format_map[idx].schro_pix_fmt == schro_pix_fmt) - return ffmpeg_schro_pixel_format_map[idx].ff_pix_fmt; + if (schro_pixel_format_map[idx].schro_pix_fmt == schro_pix_fmt) + return schro_pixel_format_map[idx].ff_pix_fmt; return PIX_FMT_NONE; } static av_cold int libschroedinger_decode_init(AVCodecContext *avccontext) { - FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; + SchroDecoderParams *p_schro_params = avccontext->priv_data; /* First of all, initialize our supporting libraries. */ schro_init(); @@ -164,7 +164,7 @@ static void libschroedinger_handle_first_access_unit(AVCodecContext *avccontext) { - FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; + SchroDecoderParams *p_schro_params = avccontext->priv_data; SchroDecoder *decoder = p_schro_params->decoder; p_schro_params->format = schro_decoder_get_video_format(decoder); @@ -179,7 +179,7 @@ } avccontext->height = p_schro_params->format->height; avccontext->width = p_schro_params->format->width; - avccontext->pix_fmt = GetFfmpegChromaFormat(p_schro_params->format->chroma_format); + avccontext->pix_fmt = get_chroma_format(p_schro_params->format->chroma_format); if (ff_get_schro_frame_format(p_schro_params->format->chroma_format, &p_schro_params->frame_format) == -1) { @@ -206,20 +206,19 @@ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; + SchroDecoderParams *p_schro_params = avccontext->priv_data; SchroDecoder *decoder = p_schro_params->decoder; - SchroVideoFormat *format; AVPicture *picture = data; SchroBuffer *enc_buf; SchroFrame* frame; int state; int go = 1; int outer = 1; - FfmpegSchroParseUnitContext parse_ctx; + SchroParseUnitContext parse_ctx; *data_size = 0; - FfmpegSchroParseContextInit(&parse_ctx, buf, buf_size); + SchroParseContextInit(&parse_ctx, buf, buf_size); if (!buf_size) { if (!p_schro_params->eos_signalled) { state = schro_decoder_push_end_of_stream(decoder); @@ -229,7 +228,7 @@ /* Loop through all the individual parse units in the input buffer */ do { - if ((enc_buf = FfmpegFindNextSchroParseUnit(&parse_ctx))) { + if ((enc_buf = FindNextSchroParseUnit(&parse_ctx))) { /* Push buffer into decoder. */ if (SCHRO_PARSE_CODE_IS_PICTURE(enc_buf->data[4]) && SCHRO_PARSE_CODE_NUM_REFS(enc_buf->data[4]) > 0) @@ -240,7 +239,6 @@ go = 1; } else outer = 0; - format = p_schro_params->format; while (go) { /* Parse data and process result. */ @@ -316,7 +314,7 @@ static av_cold int libschroedinger_decode_close(AVCodecContext *avccontext) { - FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; + SchroDecoderParams *p_schro_params = avccontext->priv_data; /* Free the decoder. */ schro_decoder_free(p_schro_params->decoder); av_freep(&p_schro_params->format); @@ -334,7 +332,7 @@ { /* Got a seek request. Free the decoded frames queue and then reset * the decoder */ - FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; + SchroDecoderParams *p_schro_params = avccontext->priv_data; /* Free data in the output frame queue. */ ff_dirac_schro_queue_free(&p_schro_params->dec_frame_queue, @@ -347,15 +345,14 @@ } AVCodec ff_libschroedinger_decoder = { - "libschroedinger", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_DIRAC, - sizeof(FfmpegSchroDecoderParams), - libschroedinger_decode_init, - NULL, - libschroedinger_decode_close, - libschroedinger_decode_frame, - CODEC_CAP_DELAY, + .name = "libschroedinger", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_DIRAC, + .priv_data_size = sizeof(SchroDecoderParams), + .init = libschroedinger_decode_init, + .close = libschroedinger_decode_close, + .decode = libschroedinger_decode_frame, + .capabilities = CODEC_CAP_DELAY, .flush = libschroedinger_flush, .long_name = NULL_IF_CONFIG_SMALL("libschroedinger Dirac 2.2"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libschroedingerenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libschroedingerenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libschroedingerenc.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libschroedingerenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,7 +41,7 @@ /** libschroedinger encoder private data */ -typedef struct FfmpegSchroEncoderParams { +typedef struct SchroEncoderParams { /** Schroedinger video format */ SchroVideoFormat *format; @@ -64,31 +64,31 @@ int enc_buf_size; /** queue storing encoded frames */ - FfmpegDiracSchroQueue enc_frame_queue; + DiracSchroQueue enc_frame_queue; /** end of sequence signalled */ int eos_signalled; /** end of sequence pulled */ int eos_pulled; -} FfmpegSchroEncoderParams; +} SchroEncoderParams; /** * Works out Schro-compatible chroma format. */ static int SetSchroChromaFormat(AVCodecContext *avccontext) { - int num_formats = sizeof(ffmpeg_schro_pixel_format_map) / - sizeof(ffmpeg_schro_pixel_format_map[0]); + int num_formats = sizeof(schro_pixel_format_map) / + sizeof(schro_pixel_format_map[0]); int idx; - FfmpegSchroEncoderParams* p_schro_params = avccontext->priv_data; + SchroEncoderParams *p_schro_params = avccontext->priv_data; for (idx = 0; idx < num_formats; ++idx) { - if (ffmpeg_schro_pixel_format_map[idx].ff_pix_fmt == + if (schro_pixel_format_map[idx].ff_pix_fmt == avccontext->pix_fmt) { p_schro_params->format->chroma_format = - ffmpeg_schro_pixel_format_map[idx].schro_pix_fmt; + schro_pixel_format_map[idx].schro_pix_fmt; return 0; } } @@ -102,7 +102,7 @@ static int libschroedinger_encode_init(AVCodecContext *avccontext) { - FfmpegSchroEncoderParams* p_schro_params = avccontext->priv_data; + SchroEncoderParams *p_schro_params = avccontext->priv_data; SchroVideoFormatEnum preset; /* Initialize the libraries that libschroedinger depends on. */ @@ -238,7 +238,7 @@ static SchroFrame *libschroedinger_frame_from_data(AVCodecContext *avccontext, void *in_data) { - FfmpegSchroEncoderParams* p_schro_params = avccontext->priv_data; + SchroEncoderParams *p_schro_params = avccontext->priv_data; SchroFrame *in_frame; /* Input line size may differ from what the codec supports. Especially * when transcoding from one format to another. So use avpicture_layout @@ -256,9 +256,9 @@ static void SchroedingerFreeFrame(void *data) { - FfmpegDiracSchroEncodedFrame *enc_frame = data; + DiracSchroEncodedFrame *enc_frame = data; - av_freep(&(enc_frame->p_encbuf)); + av_freep(&enc_frame->p_encbuf); av_free(enc_frame); } @@ -267,9 +267,9 @@ int buf_size, void *data) { int enc_size = 0; - FfmpegSchroEncoderParams* p_schro_params = avccontext->priv_data; + SchroEncoderParams *p_schro_params = avccontext->priv_data; SchroEncoder *encoder = p_schro_params->encoder; - struct FfmpegDiracSchroEncodedFrame* p_frame_output = NULL; + struct DiracSchroEncodedFrame *p_frame_output = NULL; int go = 1; SchroBuffer *enc_buf; int presentation_frame; @@ -328,7 +328,7 @@ } /* Create output frame. */ - p_frame_output = av_mallocz(sizeof(FfmpegDiracSchroEncodedFrame)); + p_frame_output = av_mallocz(sizeof(DiracSchroEncodedFrame)); /* Set output data. */ p_frame_output->size = p_schro_params->enc_buf_size; p_frame_output->p_encbuf = p_schro_params->enc_buf; @@ -400,8 +400,7 @@ static int libschroedinger_encode_close(AVCodecContext *avccontext) { - - FfmpegSchroEncoderParams* p_schro_params = avccontext->priv_data; + SchroEncoderParams *p_schro_params = avccontext->priv_data; /* Close the encoder. */ schro_encoder_free(p_schro_params->encoder); @@ -423,13 +422,13 @@ AVCodec ff_libschroedinger_encoder = { - "libschroedinger", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_DIRAC, - sizeof(FfmpegSchroEncoderParams), - libschroedinger_encode_init, - libschroedinger_encode_frame, - libschroedinger_encode_close, + .name = "libschroedinger", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_DIRAC, + .priv_data_size = sizeof(SchroEncoderParams), + .init = libschroedinger_encode_init, + .encode = libschroedinger_encode_frame, + .close = libschroedinger_encode_close, .capabilities = CODEC_CAP_DELAY, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("libschroedinger Dirac 2.2"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libschroedinger.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libschroedinger.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libschroedinger.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libschroedinger.h 2012-01-11 00:34:30.000000000 +0000 @@ -20,7 +20,7 @@ /** * @file -* data structures common to libschroedingerdec.c and libschroedingerenc.c +* data structures common to libschroedinger decoder and encoder */ #ifndef AVCODEC_LIBSCHROEDINGER_H @@ -34,7 +34,7 @@ enum PixelFormat ff_pix_fmt; SchroChromaFormat schro_pix_fmt; SchroFrameFormat schro_frame_fmt; -} ffmpeg_schro_pixel_format_map[] = { +} schro_pixel_format_map[] = { { PIX_FMT_YUV420P, SCHRO_CHROMA_420, SCHRO_FRAME_FORMAT_U8_420 }, { PIX_FMT_YUV422P, SCHRO_CHROMA_422, SCHRO_FRAME_FORMAT_U8_422 }, { PIX_FMT_YUV444P, SCHRO_CHROMA_444, SCHRO_FRAME_FORMAT_U8_444 }, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libspeexdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libspeexdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libspeexdec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libspeexdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -18,13 +18,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "avcodec.h" #include #include #include #include +#include "avcodec.h" typedef struct { + AVFrame frame; SpeexBits bits; SpeexStereoState stereo; void *dec_state; @@ -60,14 +61,14 @@ mode = speex_lib_get_mode(s->header->mode); if (!mode) { av_log(avctx, AV_LOG_ERROR, "Unknown Speex mode %d", s->header->mode); - return -1; + return AVERROR_INVALIDDATA; } } else av_log(avctx, AV_LOG_INFO, "Missing Speex header, assuming defaults.\n"); if (avctx->channels > 2) { av_log(avctx, AV_LOG_ERROR, "Only stereo and mono are supported.\n"); - return -1; + return AVERROR(EINVAL); } speex_bits_init(&s->bits); @@ -89,42 +90,57 @@ s->stereo = (SpeexStereoState)SPEEX_STEREO_STATE_INIT; speex_decoder_ctl(s->dec_state, SPEEX_SET_HANDLER, &callback); } + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } -static int libspeex_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int libspeex_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; + uint8_t *buf = avpkt->data; int buf_size = avpkt->size; LibSpeexContext *s = avctx->priv_data; - int16_t *output = data, *end; - int i, num_samples; - - num_samples = s->frame_size * avctx->channels; - end = output + *data_size / sizeof(*output); + int16_t *output; + int ret, consumed = 0; - speex_bits_read_from(&s->bits, buf, buf_size); - - for (i = 0; speex_bits_remaining(&s->bits) && output + num_samples < end; i++) { - int ret = speex_decode_int(s->dec_state, &s->bits, output); - if (ret <= -2) { - av_log(avctx, AV_LOG_ERROR, "Error decoding Speex frame.\n"); - return -1; - } else if (ret == -1) - // end of stream - break; + /* get output buffer */ + s->frame.nb_samples = s->frame_size; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + output = (int16_t *)s->frame.data[0]; - if (avctx->channels == 2) - speex_decode_stereo_int(output, s->frame_size, &s->stereo); + /* if there is not enough data left for the smallest possible frame, + reset the libspeex buffer using the current packet, otherwise ignore + the current packet and keep decoding frames from the libspeex buffer. */ + if (speex_bits_remaining(&s->bits) < 43) { + /* check for flush packet */ + if (!buf || !buf_size) { + *got_frame_ptr = 0; + return buf_size; + } + /* set new buffer */ + speex_bits_read_from(&s->bits, buf, buf_size); + consumed = buf_size; + } - output += num_samples; + /* decode a single frame */ + ret = speex_decode_int(s->dec_state, &s->bits, output); + if (ret <= -2) { + av_log(avctx, AV_LOG_ERROR, "Error decoding Speex frame.\n"); + return AVERROR_INVALIDDATA; } + if (avctx->channels == 2) + speex_decode_stereo_int(output, s->frame_size, &s->stereo); - avctx->frame_size = s->frame_size * i; - *data_size = avctx->channels * avctx->frame_size * sizeof(*output); - return buf_size; + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + + return consumed; } static av_cold int libspeex_decode_close(AVCodecContext *avctx) @@ -138,14 +154,21 @@ return 0; } +static av_cold void libspeex_decode_flush(AVCodecContext *avctx) +{ + LibSpeexContext *s = avctx->priv_data; + speex_bits_reset(&s->bits); +} + AVCodec ff_libspeex_decoder = { - "libspeex", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_SPEEX, - sizeof(LibSpeexContext), - libspeex_decode_init, - NULL, - libspeex_decode_close, - libspeex_decode_frame, + .name = "libspeex", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_SPEEX, + .priv_data_size = sizeof(LibSpeexContext), + .init = libspeex_decode_init, + .close = libspeex_decode_close, + .decode = libspeex_decode_frame, + .flush = libspeex_decode_flush, + .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DELAY | CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("libspeex Speex"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libspeexenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libspeexenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libspeexenc.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libspeexenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,326 @@ +/* + * Copyright (C) 2009 Justin Ruggles + * Copyright (c) 2009 Xuggle Incorporated + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * libspeex Speex audio encoder + * + * Usage Guide + * This explains the values that need to be set prior to initialization in + * order to control various encoding parameters. + * + * Channels + * Speex only supports mono or stereo, so avctx->channels must be set to + * 1 or 2. + * + * Sample Rate / Encoding Mode + * Speex has 3 modes, each of which uses a specific sample rate. + * narrowband : 8 kHz + * wideband : 16 kHz + * ultra-wideband : 32 kHz + * avctx->sample_rate must be set to one of these 3 values. This will be + * used to set the encoding mode. + * + * Rate Control + * VBR mode is turned on by setting CODEC_FLAG_QSCALE in avctx->flags. + * avctx->global_quality is used to set the encoding quality. + * For CBR mode, avctx->bit_rate can be used to set the constant bitrate. + * Alternatively, the 'cbr_quality' option can be set from 0 to 10 to set + * a constant bitrate based on quality. + * For ABR mode, set avctx->bit_rate and set the 'abr' option to 1. + * Approx. Bitrate Range: + * narrowband : 2400 - 25600 bps + * wideband : 4000 - 43200 bps + * ultra-wideband : 4400 - 45200 bps + * + * Complexity + * Encoding complexity is controlled by setting avctx->compression_level. + * The valid range is 0 to 10. A higher setting gives generally better + * quality at the expense of encoding speed. This does not affect the + * bit rate. + * + * Frames-per-Packet + * The encoder defaults to using 1 frame-per-packet. However, it is + * sometimes desirable to use multiple frames-per-packet to reduce the + * amount of container overhead. This can be done by setting the + * 'frames_per_packet' option to a value 1 to 8. + */ + +#include +#include +#include +#include "libavutil/mathematics.h" +#include "libavutil/opt.h" +#include "avcodec.h" +#include "internal.h" + +typedef struct { + AVClass *class; ///< AVClass for private options + SpeexBits bits; ///< libspeex bitwriter context + SpeexHeader header; ///< libspeex header struct + void *enc_state; ///< libspeex encoder state + int frames_per_packet; ///< number of frames to encode in each packet + float vbr_quality; ///< VBR quality 0.0 to 10.0 + int cbr_quality; ///< CBR quality 0 to 10 + int abr; ///< flag to enable ABR + int pkt_frame_count; ///< frame count for the current packet + int lookahead; ///< encoder delay + int64_t next_pts; ///< next pts, in sample_rate time base + int pkt_sample_count; ///< sample count in the current packet +} LibSpeexEncContext; + +static av_cold void print_enc_params(AVCodecContext *avctx, + LibSpeexEncContext *s) +{ + const char *mode_str = "unknown"; + + av_log(avctx, AV_LOG_DEBUG, "channels: %d\n", avctx->channels); + switch (s->header.mode) { + case SPEEX_MODEID_NB: mode_str = "narrowband"; break; + case SPEEX_MODEID_WB: mode_str = "wideband"; break; + case SPEEX_MODEID_UWB: mode_str = "ultra-wideband"; break; + } + av_log(avctx, AV_LOG_DEBUG, "mode: %s\n", mode_str); + if (s->header.vbr) { + av_log(avctx, AV_LOG_DEBUG, "rate control: VBR\n"); + av_log(avctx, AV_LOG_DEBUG, " quality: %f\n", s->vbr_quality); + } else if (s->abr) { + av_log(avctx, AV_LOG_DEBUG, "rate control: ABR\n"); + av_log(avctx, AV_LOG_DEBUG, " bitrate: %d bps\n", avctx->bit_rate); + } else { + av_log(avctx, AV_LOG_DEBUG, "rate control: CBR\n"); + av_log(avctx, AV_LOG_DEBUG, " bitrate: %d bps\n", avctx->bit_rate); + } + av_log(avctx, AV_LOG_DEBUG, "complexity: %d\n", + avctx->compression_level); + av_log(avctx, AV_LOG_DEBUG, "frame size: %d samples\n", + avctx->frame_size); + av_log(avctx, AV_LOG_DEBUG, "frames per packet: %d\n", + s->frames_per_packet); + av_log(avctx, AV_LOG_DEBUG, "packet size: %d\n", + avctx->frame_size * s->frames_per_packet); +} + +static av_cold int encode_init(AVCodecContext *avctx) +{ + LibSpeexEncContext *s = avctx->priv_data; + const SpeexMode *mode; + uint8_t *header_data; + int header_size; + int32_t complexity; + + /* channels */ + if (avctx->channels < 1 || avctx->channels > 2) { + av_log(avctx, AV_LOG_ERROR, "Invalid channels (%d). Only stereo and " + "mono are supported\n", avctx->channels); + return AVERROR(EINVAL); + } + + /* sample rate and encoding mode */ + switch (avctx->sample_rate) { + case 8000: mode = &speex_nb_mode; break; + case 16000: mode = &speex_wb_mode; break; + case 32000: mode = &speex_uwb_mode; break; + default: + av_log(avctx, AV_LOG_ERROR, "Sample rate of %d Hz is not supported. " + "Resample to 8, 16, or 32 kHz.\n", avctx->sample_rate); + return AVERROR(EINVAL); + } + + /* initialize libspeex */ + s->enc_state = speex_encoder_init(mode); + if (!s->enc_state) { + av_log(avctx, AV_LOG_ERROR, "Error initializing libspeex\n"); + return -1; + } + speex_init_header(&s->header, avctx->sample_rate, avctx->channels, mode); + + /* rate control method and parameters */ + if (avctx->flags & CODEC_FLAG_QSCALE) { + /* VBR */ + s->header.vbr = 1; + speex_encoder_ctl(s->enc_state, SPEEX_SET_VBR, &s->header.vbr); + s->vbr_quality = av_clipf(avctx->global_quality / (float)FF_QP2LAMBDA, + 0.0f, 10.0f); + speex_encoder_ctl(s->enc_state, SPEEX_SET_VBR_QUALITY, &s->vbr_quality); + } else { + s->header.bitrate = avctx->bit_rate; + if (avctx->bit_rate > 0) { + /* CBR or ABR by bitrate */ + if (s->abr) { + speex_encoder_ctl(s->enc_state, SPEEX_SET_ABR, + &s->header.bitrate); + speex_encoder_ctl(s->enc_state, SPEEX_GET_ABR, + &s->header.bitrate); + } else { + speex_encoder_ctl(s->enc_state, SPEEX_SET_BITRATE, + &s->header.bitrate); + speex_encoder_ctl(s->enc_state, SPEEX_GET_BITRATE, + &s->header.bitrate); + } + } else { + /* CBR by quality */ + speex_encoder_ctl(s->enc_state, SPEEX_SET_QUALITY, + &s->cbr_quality); + speex_encoder_ctl(s->enc_state, SPEEX_GET_BITRATE, + &s->header.bitrate); + } + /* stereo side information adds about 800 bps to the base bitrate */ + /* TODO: this should be calculated exactly */ + avctx->bit_rate = s->header.bitrate + (avctx->channels == 2 ? 800 : 0); + } + + /* set encoding complexity */ + if (avctx->compression_level > FF_COMPRESSION_DEFAULT) { + complexity = av_clip(avctx->compression_level, 0, 10); + speex_encoder_ctl(s->enc_state, SPEEX_SET_COMPLEXITY, &complexity); + } + speex_encoder_ctl(s->enc_state, SPEEX_GET_COMPLEXITY, &complexity); + avctx->compression_level = complexity; + + /* set packet size */ + avctx->frame_size = s->header.frame_size; + s->header.frames_per_packet = s->frames_per_packet; + + /* set encoding delay */ + speex_encoder_ctl(s->enc_state, SPEEX_GET_LOOKAHEAD, &s->lookahead); + s->next_pts = -s->lookahead; + + /* create header packet bytes from header struct */ + /* note: libspeex allocates the memory for header_data, which is freed + below with speex_header_free() */ + header_data = speex_header_to_packet(&s->header, &header_size); + + /* allocate extradata and coded_frame */ + avctx->extradata = av_malloc(header_size + FF_INPUT_BUFFER_PADDING_SIZE); + avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->extradata || !avctx->coded_frame) { + speex_header_free(header_data); + speex_encoder_destroy(s->enc_state); + av_log(avctx, AV_LOG_ERROR, "memory allocation error\n"); + return AVERROR(ENOMEM); + } + + /* copy header packet to extradata */ + memcpy(avctx->extradata, header_data, header_size); + avctx->extradata_size = header_size; + speex_header_free(header_data); + + /* init libspeex bitwriter */ + speex_bits_init(&s->bits); + + print_enc_params(avctx, s); + return 0; +} + +static int encode_frame(AVCodecContext *avctx, uint8_t *frame, int buf_size, + void *data) +{ + LibSpeexEncContext *s = avctx->priv_data; + int16_t *samples = data; + + if (data) { + /* encode Speex frame */ + if (avctx->channels == 2) + speex_encode_stereo_int(samples, s->header.frame_size, &s->bits); + speex_encode_int(s->enc_state, samples, &s->bits); + s->pkt_frame_count++; + s->pkt_sample_count += avctx->frame_size; + } else { + /* handle end-of-stream */ + if (!s->pkt_frame_count) + return 0; + /* add extra terminator codes for unused frames in last packet */ + while (s->pkt_frame_count < s->frames_per_packet) { + speex_bits_pack(&s->bits, 15, 5); + s->pkt_frame_count++; + } + } + + /* write output if all frames for the packet have been encoded */ + if (s->pkt_frame_count == s->frames_per_packet) { + s->pkt_frame_count = 0; + avctx->coded_frame->pts = + av_rescale_q(s->next_pts, (AVRational){ 1, avctx->sample_rate }, + avctx->time_base); + s->next_pts += s->pkt_sample_count; + s->pkt_sample_count = 0; + if (buf_size > speex_bits_nbytes(&s->bits)) { + int ret = speex_bits_write(&s->bits, frame, buf_size); + speex_bits_reset(&s->bits); + return ret; + } else { + av_log(avctx, AV_LOG_ERROR, "output buffer too small"); + return AVERROR(EINVAL); + } + } + return 0; +} + +static av_cold int encode_close(AVCodecContext *avctx) +{ + LibSpeexEncContext *s = avctx->priv_data; + + speex_bits_destroy(&s->bits); + speex_encoder_destroy(s->enc_state); + + av_freep(&avctx->coded_frame); + av_freep(&avctx->extradata); + + return 0; +} + +#define OFFSET(x) offsetof(LibSpeexEncContext, x) +#define AE AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "abr", "Use average bit rate", OFFSET(abr), AV_OPT_TYPE_INT, { 0 }, 0, 1, AE }, + { "cbr_quality", "Set quality value (0 to 10) for CBR", OFFSET(cbr_quality), AV_OPT_TYPE_INT, { 8 }, 0, 10, AE }, + { "frames_per_packet", "Number of frames to encode in each packet", OFFSET(frames_per_packet), AV_OPT_TYPE_INT, { 1 }, 1, 8, AE }, + { NULL }, +}; + +static const AVClass class = { + .class_name = "libspeex", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +static const AVCodecDefault defaults[] = { + { "b", "0" }, + { "compression_level", "3" }, + { NULL }, +}; + +AVCodec ff_libspeex_encoder = { + .name = "libspeex", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_SPEEX, + .priv_data_size = sizeof(LibSpeexEncContext), + .init = encode_init, + .encode = encode_frame, + .close = encode_close, + .capabilities = CODEC_CAP_DELAY, + .sample_fmts = (const enum SampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, + .long_name = NULL_IF_CONFIG_SMALL("libspeex Speex"), + .priv_class = &class, + .defaults = defaults, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libtheoraenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libtheoraenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libtheoraenc.c 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libtheoraenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -241,7 +241,7 @@ header, comment, and tables. Each one is prefixed with a 16bit size, then they - are concatenated together into ffmpeg's extradata. + are concatenated together into libavcodec's extradata. */ offset = 0; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libvo-aacenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libvo-aacenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libvo-aacenc.c 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libvo-aacenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -63,7 +63,7 @@ } for (index = 0; index < 16; index++) - if (avctx->sample_rate == ff_mpeg4audio_sample_rates[index]) + if (avctx->sample_rate == avpriv_mpeg4audio_sample_rates[index]) break; if (index == 16) { av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate %d\n", @@ -116,14 +116,13 @@ } AVCodec ff_libvo_aacenc_encoder = { - "libvo_aacenc", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_AAC, - sizeof(AACContext), - aac_encode_init, - aac_encode_frame, - aac_encode_close, - NULL, + .name = "libvo_aacenc", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_AAC, + .priv_data_size = sizeof(AACContext), + .init = aac_encode_init, + .encode = aac_encode_frame, + .close = aac_encode_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("Android VisualOn AAC"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libvo-amrwbenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libvo-amrwbenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libvo-amrwbenc.c 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libvo-amrwbenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -34,7 +34,7 @@ } AMRWBContext; static const AVOption options[] = { - { "dtx", "Allow DTX (generate comfort noise)", offsetof(AMRWBContext, allow_dtx), FF_OPT_TYPE_INT, 0, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, + { "dtx", "Allow DTX (generate comfort noise)", offsetof(AMRWBContext, allow_dtx), AV_OPT_TYPE_INT, { 0 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, { NULL } }; @@ -118,14 +118,13 @@ } AVCodec ff_libvo_amrwbenc_encoder = { - "libvo_amrwbenc", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_AMR_WB, - sizeof(AMRWBContext), - amr_wb_encode_init, - amr_wb_encode_frame, - amr_wb_encode_close, - NULL, + .name = "libvo_amrwbenc", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_AMR_WB, + .priv_data_size = sizeof(AMRWBContext), + .init = amr_wb_encode_init, + .encode = amr_wb_encode_frame, + .close = amr_wb_encode_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("Android VisualOn Adaptive Multi-Rate " "(AMR) Wide-Band"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libvorbis.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libvorbis.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libvorbis.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libvorbis.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,69 +30,72 @@ #include "avcodec.h" #include "bytestream.h" #include "vorbis.h" +#include "libavutil/mathematics.h" #undef NDEBUG #include #define OGGVORBIS_FRAME_SIZE 64 -#define BUFFER_SIZE (1024*64) +#define BUFFER_SIZE (1024 * 64) typedef struct OggVorbisContext { AVClass *av_class; - vorbis_info vi ; - vorbis_dsp_state vd ; - vorbis_block vb ; + vorbis_info vi; + vorbis_dsp_state vd; + vorbis_block vb; uint8_t buffer[BUFFER_SIZE]; int buffer_index; int eof; /* decoder */ - vorbis_comment vc ; + vorbis_comment vc; ogg_packet op; double iblock; -} OggVorbisContext ; +} OggVorbisContext; -static const AVOption options[]={ -{"iblock", "Sets the impulse block bias", offsetof(OggVorbisContext, iblock), FF_OPT_TYPE_DOUBLE, {.dbl = 0}, -15, 0, AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_ENCODING_PARAM}, -{NULL} +static const AVOption options[] = { + { "iblock", "Sets the impulse block bias", offsetof(OggVorbisContext, iblock), AV_OPT_TYPE_DOUBLE, { .dbl = 0 }, -15, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, + { NULL } }; static const AVClass class = { "libvorbis", av_default_item_name, options, LIBAVUTIL_VERSION_INT }; -static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avccontext) { - OggVorbisContext *context = avccontext->priv_data ; +static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avccontext) +{ + OggVorbisContext *context = avccontext->priv_data; double cfreq; - if(avccontext->flags & CODEC_FLAG_QSCALE) { + if (avccontext->flags & CODEC_FLAG_QSCALE) { /* variable bitrate */ - if(vorbis_encode_setup_vbr(vi, avccontext->channels, - avccontext->sample_rate, - avccontext->global_quality / (float)FF_QP2LAMBDA / 10.0)) + if (vorbis_encode_setup_vbr(vi, avccontext->channels, + avccontext->sample_rate, + avccontext->global_quality / (float)FF_QP2LAMBDA / 10.0)) return -1; } else { int minrate = avccontext->rc_min_rate > 0 ? avccontext->rc_min_rate : -1; int maxrate = avccontext->rc_min_rate > 0 ? avccontext->rc_max_rate : -1; /* constant bitrate */ - if(vorbis_encode_setup_managed(vi, avccontext->channels, - avccontext->sample_rate, minrate, avccontext->bit_rate, maxrate)) + if (vorbis_encode_setup_managed(vi, avccontext->channels, + avccontext->sample_rate, minrate, + avccontext->bit_rate, maxrate)) return -1; /* variable bitrate by estimate, disable slow rate management */ - if(minrate == -1 && maxrate == -1) - if(vorbis_encode_ctl(vi, OV_ECTL_RATEMANAGE2_SET, NULL)) + if (minrate == -1 && maxrate == -1) + if (vorbis_encode_ctl(vi, OV_ECTL_RATEMANAGE2_SET, NULL)) return -1; } /* cutoff frequency */ - if(avccontext->cutoff > 0) { + if (avccontext->cutoff > 0) { cfreq = avccontext->cutoff / 1000.0; - if(vorbis_encode_ctl(vi, OV_ECTL_LOWPASS_SET, &cfreq)) + if (vorbis_encode_ctl(vi, OV_ECTL_LOWPASS_SET, &cfreq)) return -1; } - if(context->iblock){ + if (context->iblock) { vorbis_encode_ctl(vi, OV_ECTL_IBLOCK_SET, &context->iblock); } @@ -100,35 +103,39 @@ } /* How many bytes are needed for a buffer of length 'l' */ -static int xiph_len(int l) { return (1 + l / 255 + l); } +static int xiph_len(int l) +{ + return 1 + l / 255 + l; +} -static av_cold int oggvorbis_encode_init(AVCodecContext *avccontext) { - OggVorbisContext *context = avccontext->priv_data ; +static av_cold int oggvorbis_encode_init(AVCodecContext *avccontext) +{ + OggVorbisContext *context = avccontext->priv_data; ogg_packet header, header_comm, header_code; uint8_t *p; unsigned int offset; - vorbis_info_init(&context->vi) ; - if(oggvorbis_init_encoder(&context->vi, avccontext) < 0) { - av_log(avccontext, AV_LOG_ERROR, "oggvorbis_encode_init: init_encoder failed\n") ; - return -1 ; + vorbis_info_init(&context->vi); + if (oggvorbis_init_encoder(&context->vi, avccontext) < 0) { + av_log(avccontext, AV_LOG_ERROR, "oggvorbis_encode_init: init_encoder failed\n"); + return -1; } - vorbis_analysis_init(&context->vd, &context->vi) ; - vorbis_block_init(&context->vd, &context->vb) ; + vorbis_analysis_init(&context->vd, &context->vi); + vorbis_block_init(&context->vd, &context->vb); vorbis_comment_init(&context->vc); - vorbis_comment_add_tag(&context->vc, "encoder", LIBAVCODEC_IDENT) ; + vorbis_comment_add_tag(&context->vc, "encoder", LIBAVCODEC_IDENT); vorbis_analysis_headerout(&context->vd, &context->vc, &header, - &header_comm, &header_code); + &header_comm, &header_code); - avccontext->extradata_size= + avccontext->extradata_size = 1 + xiph_len(header.bytes) + xiph_len(header_comm.bytes) + header_code.bytes; p = avccontext->extradata = - av_malloc(avccontext->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); - p[0] = 2; - offset = 1; + av_malloc(avccontext->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); + p[0] = 2; + offset = 1; offset += av_xiphlacing(&p[offset], header.bytes); offset += av_xiphlacing(&p[offset], header_comm.bytes); memcpy(&p[offset], header.packet, header.bytes); @@ -139,56 +146,57 @@ offset += header_code.bytes; assert(offset == avccontext->extradata_size); -/* vorbis_block_clear(&context->vb); +#if 0 + vorbis_block_clear(&context->vb); vorbis_dsp_clear(&context->vd); - vorbis_info_clear(&context->vi);*/ + vorbis_info_clear(&context->vi); +#endif vorbis_comment_clear(&context->vc); - avccontext->frame_size = OGGVORBIS_FRAME_SIZE ; + avccontext->frame_size = OGGVORBIS_FRAME_SIZE; - avccontext->coded_frame= avcodec_alloc_frame(); - avccontext->coded_frame->key_frame= 1; + avccontext->coded_frame = avcodec_alloc_frame(); + avccontext->coded_frame->key_frame = 1; - return 0 ; + return 0; } - static int oggvorbis_encode_frame(AVCodecContext *avccontext, unsigned char *packets, - int buf_size, void *data) + int buf_size, void *data) { - OggVorbisContext *context = avccontext->priv_data ; - ogg_packet op ; - signed short *audio = data ; + OggVorbisContext *context = avccontext->priv_data; + ogg_packet op; + signed short *audio = data; int l; - if(data) { + if (data) { const int samples = avccontext->frame_size; - float **buffer ; + float **buffer; int c, channels = context->vi.channels; - buffer = vorbis_analysis_buffer(&context->vd, samples) ; + buffer = vorbis_analysis_buffer(&context->vd, samples); for (c = 0; c < channels; c++) { int co = (channels > 8) ? c : - ff_vorbis_encoding_channel_layout_offsets[channels-1][c]; - for(l = 0 ; l < samples ; l++) - buffer[c][l]=audio[l*channels+co]/32768.f; + ff_vorbis_encoding_channel_layout_offsets[channels - 1][c]; + for (l = 0; l < samples; l++) + buffer[c][l] = audio[l * channels + co] / 32768.f; } - vorbis_analysis_wrote(&context->vd, samples) ; + vorbis_analysis_wrote(&context->vd, samples); } else { - if(!context->eof) - vorbis_analysis_wrote(&context->vd, 0) ; + if (!context->eof) + vorbis_analysis_wrote(&context->vd, 0); context->eof = 1; } - while(vorbis_analysis_blockout(&context->vd, &context->vb) == 1) { + while (vorbis_analysis_blockout(&context->vd, &context->vb) == 1) { vorbis_analysis(&context->vb, NULL); - vorbis_bitrate_addblock(&context->vb) ; + vorbis_bitrate_addblock(&context->vb); - while(vorbis_bitrate_flushpacket(&context->vd, &op)) { + while (vorbis_bitrate_flushpacket(&context->vd, &op)) { /* i'd love to say the following line is a hack, but sadly it's * not, apparently the end of stream decision is in libogg. */ - if(op.bytes==1 && op.e_o_s) + if (op.bytes == 1 && op.e_o_s) continue; if (context->buffer_index + sizeof(ogg_packet) + op.bytes > BUFFER_SIZE) { av_log(avccontext, AV_LOG_ERROR, "libvorbis: buffer overflow."); @@ -202,13 +210,13 @@ } } - l=0; - if(context->buffer_index){ - ogg_packet *op2= (ogg_packet*)context->buffer; + l = 0; + if (context->buffer_index) { + ogg_packet *op2 = (ogg_packet *)context->buffer; op2->packet = context->buffer + sizeof(ogg_packet); - l= op2->bytes; - avccontext->coded_frame->pts= av_rescale_q(op2->granulepos, (AVRational){1, avccontext->sample_rate}, avccontext->time_base); + l = op2->bytes; + avccontext->coded_frame->pts = av_rescale_q(op2->granulepos, (AVRational) { 1, avccontext->sample_rate }, avccontext->time_base); //FIXME we should reorder the user supplied pts and not assume that they are spaced by 1/sample_rate if (l > buf_size) { @@ -225,12 +233,12 @@ return l; } - -static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext) { - OggVorbisContext *context = avccontext->priv_data ; +static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext) +{ + OggVorbisContext *context = avccontext->priv_data; /* ogg_packet op ; */ - vorbis_analysis_wrote(&context->vd, 0) ; /* notify vorbisenc this is EOF */ + vorbis_analysis_wrote(&context->vd, 0); /* notify vorbisenc this is EOF */ vorbis_block_clear(&context->vb); vorbis_dsp_clear(&context->vd); @@ -239,20 +247,19 @@ av_freep(&avccontext->coded_frame); av_freep(&avccontext->extradata); - return 0 ; + return 0; } - AVCodec ff_libvorbis_encoder = { - "libvorbis", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_VORBIS, - sizeof(OggVorbisContext), - oggvorbis_encode_init, - oggvorbis_encode_frame, - oggvorbis_encode_close, - .capabilities= CODEC_CAP_DELAY, - .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, - .long_name= NULL_IF_CONFIG_SMALL("libvorbis Vorbis"), - .priv_class= &class, -} ; + .name = "libvorbis", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_VORBIS, + .priv_data_size = sizeof(OggVorbisContext), + .init = oggvorbis_encode_init, + .encode = oggvorbis_encode_frame, + .close = oggvorbis_encode_close, + .capabilities = CODEC_CAP_DELAY, + .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, + .long_name = NULL_IF_CONFIG_SMALL("libvorbis Vorbis"), + .priv_class = &class, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libvpxdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libvpxdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libvpxdec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libvpxdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -112,14 +112,13 @@ } AVCodec ff_libvpx_decoder = { - "libvpx", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VP8, - sizeof(VP8Context), - vp8_init, - NULL, /* encode */ - vp8_free, - vp8_decode, - 0, /* capabilities */ - .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"), + .name = "libvpx", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VP8, + .priv_data_size = sizeof(VP8Context), + .init = vp8_init, + .close = vp8_free, + .decode = vp8_decode, + .capabilities = CODEC_CAP_AUTO_THREADS, + .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libvpxenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libvpxenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libvpxenc.c 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libvpxenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,7 +29,10 @@ #include #include "avcodec.h" +#include "internal.h" #include "libavutil/base64.h" +#include "libavutil/mathematics.h" +#include "libavutil/opt.h" /** * Portion of struct vpx_codec_cx_pkt from vpx_encoder.h. @@ -47,11 +50,19 @@ }; typedef struct VP8EncoderContext { + AVClass *class; struct vpx_codec_ctx encoder; struct vpx_image rawimg; struct vpx_fixed_buf twopass_stats; unsigned long deadline; //i.e., RT/GOOD/BEST struct FrameListData *coded_frame_list; + int cpu_used; + int auto_alt_ref; + int arnr_max_frames; + int arnr_strength; + int arnr_type; + int lag_in_frames; + int error_resilient; } VP8Context; /** String mappings for enum vp8e_enc_control_id */ @@ -204,7 +215,6 @@ { VP8Context *ctx = avctx->priv_data; const struct vpx_codec_iface *iface = &vpx_codec_vp8_cx_algo; - int cpuused = 3; struct vpx_codec_enc_cfg enccfg; int res; @@ -224,6 +234,9 @@ enccfg.g_timebase.den = avctx->time_base.den; enccfg.g_threads = avctx->thread_count; + if (ctx->lag_in_frames >= 0) + enccfg.g_lag_in_frames = ctx->lag_in_frames; + if (avctx->flags & CODEC_FLAG_PASS1) enccfg.g_pass = VPX_RC_FIRST_PASS; else if (avctx->flags & CODEC_FLAG_PASS2) @@ -236,9 +249,10 @@ enccfg.rc_end_usage = VPX_CBR; enccfg.rc_target_bitrate = av_rescale_rnd(avctx->bit_rate, 1, 1000, AV_ROUND_NEAR_INF); - - enccfg.rc_min_quantizer = avctx->qmin; - enccfg.rc_max_quantizer = avctx->qmax; + if (avctx->qmin > 0) + enccfg.rc_min_quantizer = avctx->qmin; + if (avctx->qmax > 0) + enccfg.rc_max_quantizer = avctx->qmax; enccfg.rc_dropframe_thresh = avctx->frame_skip_threshold; //0-100 (0 => CBR, 100 => VBR) @@ -258,9 +272,10 @@ enccfg.rc_buf_optimal_sz = enccfg.rc_buf_sz * 5 / 6; //_enc_init() will balk if kf_min_dist differs from max w/VPX_KF_AUTO - if (avctx->keyint_min == avctx->gop_size) + if (avctx->keyint_min >= 0 && avctx->keyint_min == avctx->gop_size) enccfg.kf_min_dist = avctx->keyint_min; - enccfg.kf_max_dist = avctx->gop_size; + if (avctx->gop_size >= 0) + enccfg.kf_max_dist = avctx->gop_size; if (enccfg.g_pass == VPX_RC_FIRST_PASS) enccfg.g_lag_in_frames = 0; @@ -291,13 +306,14 @@ enccfg.rc_twopass_stats_in = ctx->twopass_stats; } - ctx->deadline = VPX_DL_GOOD_QUALITY; /* 0-3: For non-zero values the encoder increasingly optimizes for reduced complexity playback on low powered devices at the expense of encode quality. */ if (avctx->profile != FF_PROFILE_UNKNOWN) enccfg.g_profile = avctx->profile; + enccfg.g_error_resilient = ctx->error_resilient; + dump_enc_cfg(avctx, &enccfg); /* Construct Encoder Context */ res = vpx_codec_enc_init(&ctx->encoder, iface, &enccfg, 0); @@ -308,7 +324,16 @@ //codec control failures are currently treated only as warnings av_log(avctx, AV_LOG_DEBUG, "vpx_codec_control\n"); - codecctl_int(avctx, VP8E_SET_CPUUSED, cpuused); + if (ctx->cpu_used != INT_MIN) + codecctl_int(avctx, VP8E_SET_CPUUSED, ctx->cpu_used); + if (ctx->auto_alt_ref >= 0) + codecctl_int(avctx, VP8E_SET_ENABLEAUTOALTREF, ctx->auto_alt_ref); + if (ctx->arnr_max_frames >= 0) + codecctl_int(avctx, VP8E_SET_ARNR_MAXFRAMES, ctx->arnr_max_frames); + if (ctx->arnr_strength >= 0) + codecctl_int(avctx, VP8E_SET_ARNR_STRENGTH, ctx->arnr_strength); + if (ctx->arnr_type >= 0) + codecctl_int(avctx, VP8E_SET_ARNR_TYPE, ctx->arnr_type); codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, avctx->noise_reduction); codecctl_int(avctx, VP8E_SET_TOKEN_PARTITIONS, av_log2(avctx->slices)); codecctl_int(avctx, VP8E_SET_STATIC_THRESHOLD, avctx->mb_threshold); @@ -495,16 +520,61 @@ return coded_size; } +#define OFFSET(x) offsetof(VP8Context, x) +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "cpu-used", "Quality/Speed ratio modifier", OFFSET(cpu_used), AV_OPT_TYPE_INT, {INT_MIN}, INT_MIN, INT_MAX, VE}, + { "auto-alt-ref", "Enable use of alternate reference " + "frames (2-pass only)", OFFSET(auto_alt_ref), AV_OPT_TYPE_INT, {-1}, -1, 1, VE}, + { "lag-in-frames", "Number of frames to look ahead for " + "alternate reference frame selection", OFFSET(lag_in_frames), AV_OPT_TYPE_INT, {-1}, -1, INT_MAX, VE}, + { "arnr-maxframes", "altref noise reduction max frame count", OFFSET(arnr_max_frames), AV_OPT_TYPE_INT, {-1}, -1, INT_MAX, VE}, + { "arnr-strength", "altref noise reduction filter strength", OFFSET(arnr_strength), AV_OPT_TYPE_INT, {-1}, -1, INT_MAX, VE}, + { "arnr-type", "altref noise reduction filter type", OFFSET(arnr_type), AV_OPT_TYPE_INT, {-1}, -1, INT_MAX, VE, "arnr_type"}, + { "backward", NULL, 0, AV_OPT_TYPE_CONST, {1}, 0, 0, VE, "arnr_type" }, + { "forward", NULL, 0, AV_OPT_TYPE_CONST, {2}, 0, 0, VE, "arnr_type" }, + { "centered", NULL, 0, AV_OPT_TYPE_CONST, {3}, 0, 0, VE, "arnr_type" }, + { "deadline", "Time to spend encoding, in microseconds.", OFFSET(deadline), AV_OPT_TYPE_INT, {VPX_DL_GOOD_QUALITY}, INT_MIN, INT_MAX, VE, "quality"}, + { "best", NULL, 0, AV_OPT_TYPE_CONST, {VPX_DL_BEST_QUALITY}, 0, 0, VE, "quality"}, + { "good", NULL, 0, AV_OPT_TYPE_CONST, {VPX_DL_GOOD_QUALITY}, 0, 0, VE, "quality"}, + { "realtime", NULL, 0, AV_OPT_TYPE_CONST, {VPX_DL_REALTIME}, 0, 0, VE, "quality"}, + { "error-resilient", "Error resilience configuration", OFFSET(error_resilient), AV_OPT_TYPE_FLAGS, {0}, INT_MIN, INT_MAX, VE, "er"}, +#ifdef VPX_ERROR_RESILIENT_DEFAULT + { "default", "Improve resiliency against losses of whole frames", 0, AV_OPT_TYPE_CONST, {VPX_ERROR_RESILIENT_DEFAULT}, 0, 0, VE, "er"}, + { "partitions", "The frame partitions are independently decodable " + "by the bool decoder, meaning that partitions can be decoded even " + "though earlier partitions have been lost. Note that intra predicition" + " is still done over the partition boundary.", 0, AV_OPT_TYPE_CONST, {VPX_ERROR_RESILIENT_PARTITIONS}, 0, 0, VE, "er"}, +#endif + { NULL } +}; + +static const AVClass class = { + .class_name = "libvpx encoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +static const AVCodecDefault defaults[] = { + { "qmin", "-1" }, + { "qmax", "-1" }, + { "g", "-1" }, + { "keyint_min", "-1" }, + { NULL }, +}; + AVCodec ff_libvpx_encoder = { - "libvpx", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VP8, - sizeof(VP8Context), - vp8_init, - vp8_encode, - vp8_free, - NULL, - CODEC_CAP_DELAY, + .name = "libvpx", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VP8, + .priv_data_size = sizeof(VP8Context), + .init = vp8_init, + .encode = vp8_encode, + .close = vp8_free, + .capabilities = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"), + .priv_class = &class, + .defaults = defaults, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libx264.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libx264.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libx264.c 2011-05-19 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libx264.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,20 +19,53 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/opt.h" +#include "libavutil/pixdesc.h" #include "avcodec.h" +#include "internal.h" #include +#include #include #include #include #include typedef struct X264Context { + AVClass *class; x264_param_t params; x264_t *enc; x264_picture_t pic; uint8_t *sei; int sei_size; AVFrame out_pic; + char *preset; + char *tune; + char *profile; + int fastfirstpass; + float crf; + float crf_max; + int cqp; + int aq_mode; + float aq_strength; + char *psy_rd; + int psy; + int rc_lookahead; + int weightp; + int weightb; + int ssim; + int intra_refresh; + int b_bias; + int b_pyramid; + int mixed_refs; + int dct8x8; + int fast_pskip; + int aud; + int mbtree; + char *deblock; + float cplxblur; + char *partitions; + int direct_pred; + int slice_max_size; } X264Context; static void X264_log(void *p, int level, const char *fmt, va_list args) @@ -90,7 +123,9 @@ x264_picture_t pic_out; x264_picture_init( &x4->pic ); - x4->pic.img.i_csp = X264_CSP_I420; + x4->pic.img.i_csp = x4->params.i_csp; + if (x264_bit_depth > 8) + x4->pic.img.i_csp |= X264_CSP_HIGH_DEPTH; x4->pic.img.i_plane = 3; if (frame) { @@ -138,7 +173,8 @@ } x4->out_pic.key_frame = pic_out.b_keyframe; - x4->out_pic.quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA; + if (bufsize) + x4->out_pic.quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA; return bufsize; } @@ -156,25 +192,61 @@ return 0; } +static int convert_pix_fmt(enum PixelFormat pix_fmt) +{ + switch (pix_fmt) { + case PIX_FMT_YUV420P: + case PIX_FMT_YUVJ420P: + case PIX_FMT_YUV420P9: + case PIX_FMT_YUV420P10: return X264_CSP_I420; + case PIX_FMT_YUV422P: + case PIX_FMT_YUV422P10: return X264_CSP_I422; + case PIX_FMT_YUV444P: + case PIX_FMT_YUV444P9: + case PIX_FMT_YUV444P10: return X264_CSP_I444; + }; + return 0; +} + +#define PARSE_X264_OPT(name, var)\ + if (x4->var && x264_param_parse(&x4->params, name, x4->var) < 0) {\ + av_log(avctx, AV_LOG_ERROR, "Error parsing option '%s' with value '%s'.\n", name, x4->var);\ + return AVERROR(EINVAL);\ + } + static av_cold int X264_init(AVCodecContext *avctx) { X264Context *x4 = avctx->priv_data; - x4->sei_size = 0; x264_param_default(&x4->params); + x4->params.b_deblocking_filter = avctx->flags & CODEC_FLAG_LOOP_FILTER; + + if (x4->preset || x4->tune) + if (x264_param_default_preset(&x4->params, x4->preset, x4->tune) < 0) { + av_log(avctx, AV_LOG_ERROR, "Error setting preset/tune %s/%s.\n", x4->preset, x4->tune); + return AVERROR(EINVAL); + } + + if (avctx->level > 0) + x4->params.i_level_idc = avctx->level; + x4->params.pf_log = X264_log; x4->params.p_log_private = avctx; + x4->params.i_log_level = X264_LOG_DEBUG; + x4->params.i_csp = convert_pix_fmt(avctx->pix_fmt); - x4->params.i_keyint_max = avctx->gop_size; - x4->params.b_intra_refresh = avctx->flags2 & CODEC_FLAG2_INTRA_REFRESH; - x4->params.rc.i_bitrate = avctx->bit_rate / 1000; + if (avctx->bit_rate) { + x4->params.rc.i_bitrate = avctx->bit_rate / 1000; + x4->params.rc.i_rc_method = X264_RC_ABR; + } x4->params.rc.i_vbv_buffer_size = avctx->rc_buffer_size / 1000; x4->params.rc.i_vbv_max_bitrate = avctx->rc_max_rate / 1000; x4->params.rc.b_stat_write = avctx->flags & CODEC_FLAG_PASS1; if (avctx->flags & CODEC_FLAG_PASS2) { x4->params.rc.b_stat_read = 1; } else { +#if FF_API_X264_GLOBAL_OPTS if (avctx->crf) { x4->params.rc.i_rc_method = X264_RC_CRF; x4->params.rc.f_rf_constant = avctx->crf; @@ -183,48 +255,53 @@ x4->params.rc.i_rc_method = X264_RC_CQP; x4->params.rc.i_qp_constant = avctx->cqp; } - } - - // if neither crf nor cqp modes are selected we have to enable the RC - // we do it this way because we cannot check if the bitrate has been set - if (!(avctx->crf || (avctx->cqp > -1))) - x4->params.rc.i_rc_method = X264_RC_ABR; +#endif - x4->params.i_bframe = avctx->max_b_frames; - x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC; - x4->params.i_bframe_adaptive = avctx->b_frame_strategy; - x4->params.i_bframe_bias = avctx->bframebias; - x4->params.i_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID ? X264_B_PYRAMID_NORMAL : X264_B_PYRAMID_NONE; - avctx->has_b_frames = avctx->flags2 & CODEC_FLAG2_BPYRAMID ? 2 : !!avctx->max_b_frames; - - x4->params.i_keyint_min = avctx->keyint_min; - if (x4->params.i_keyint_min > x4->params.i_keyint_max) - x4->params.i_keyint_min = x4->params.i_keyint_max; + if (x4->crf >= 0) { + x4->params.rc.i_rc_method = X264_RC_CRF; + x4->params.rc.f_rf_constant = x4->crf; + } else if (x4->cqp >= 0) { + x4->params.rc.i_rc_method = X264_RC_CQP; + x4->params.rc.i_qp_constant = x4->cqp; + } - x4->params.i_scenecut_threshold = avctx->scenechange_threshold; + if (x4->crf_max >= 0) + x4->params.rc.f_rf_constant_max = x4->crf_max; + } - x4->params.b_deblocking_filter = avctx->flags & CODEC_FLAG_LOOP_FILTER; - x4->params.i_deblocking_filter_alphac0 = avctx->deblockalpha; - x4->params.i_deblocking_filter_beta = avctx->deblockbeta; + if (avctx->rc_buffer_size && avctx->rc_initial_buffer_occupancy && + (avctx->rc_initial_buffer_occupancy <= avctx->rc_buffer_size)) { + x4->params.rc.f_vbv_buffer_init = + (float)avctx->rc_initial_buffer_occupancy / avctx->rc_buffer_size; + } - x4->params.rc.i_qp_min = avctx->qmin; - x4->params.rc.i_qp_max = avctx->qmax; - x4->params.rc.i_qp_step = avctx->max_qdiff; - - x4->params.rc.f_qcompress = avctx->qcompress; /* 0.0 => cbr, 1.0 => constant qp */ - x4->params.rc.f_qblur = avctx->qblur; /* temporally blur quants */ - x4->params.rc.f_complexity_blur = avctx->complexityblur; - - x4->params.i_frame_reference = avctx->refs; - - x4->params.i_width = avctx->width; - x4->params.i_height = avctx->height; - x4->params.vui.i_sar_width = avctx->sample_aspect_ratio.num; - x4->params.vui.i_sar_height = avctx->sample_aspect_ratio.den; - x4->params.i_fps_num = x4->params.i_timebase_den = avctx->time_base.den; - x4->params.i_fps_den = x4->params.i_timebase_num = avctx->time_base.num; + x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor); + x4->params.rc.f_pb_factor = avctx->b_quant_factor; + x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset; - x4->params.analyse.inter = 0; +#if FF_API_X264_GLOBAL_OPTS + if (avctx->aq_mode >= 0) + x4->params.rc.i_aq_mode = avctx->aq_mode; + if (avctx->aq_strength >= 0) + x4->params.rc.f_aq_strength = avctx->aq_strength; + if (avctx->psy_rd >= 0) + x4->params.analyse.f_psy_rd = avctx->psy_rd; + if (avctx->psy_trellis >= 0) + x4->params.analyse.f_psy_trellis = avctx->psy_trellis; + if (avctx->rc_lookahead >= 0) + x4->params.rc.i_lookahead = avctx->rc_lookahead; + if (avctx->weighted_p_pred >= 0) + x4->params.analyse.i_weighted_pred = avctx->weighted_p_pred; + if (avctx->bframebias) + x4->params.i_bframe_bias = avctx->bframebias; + if (avctx->deblockalpha) + x4->params.i_deblocking_filter_alphac0 = avctx->deblockalpha; + if (avctx->deblockbeta) + x4->params.i_deblocking_filter_beta = avctx->deblockbeta; + if (avctx->complexityblur >= 0) + x4->params.rc.f_complexity_blur = avctx->complexityblur; + if (avctx->directpred >= 0) + x4->params.analyse.i_direct_mv_pred = avctx->directpred; if (avctx->partitions) { if (avctx->partitions & X264_PART_I4X4) x4->params.analyse.inter |= X264_ANALYSE_I4x4; @@ -237,11 +314,17 @@ if (avctx->partitions & X264_PART_B8X8) x4->params.analyse.inter |= X264_ANALYSE_BSUB16x16; } - - x4->params.analyse.i_direct_mv_pred = avctx->directpred; - + x4->params.analyse.b_ssim = avctx->flags2 & CODEC_FLAG2_SSIM; + x4->params.b_intra_refresh = avctx->flags2 & CODEC_FLAG2_INTRA_REFRESH; + x4->params.i_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID ? X264_B_PYRAMID_NORMAL : X264_B_PYRAMID_NONE; x4->params.analyse.b_weighted_bipred = avctx->flags2 & CODEC_FLAG2_WPRED; - x4->params.analyse.i_weighted_pred = avctx->weighted_p_pred; + x4->params.analyse.b_mixed_references = avctx->flags2 & CODEC_FLAG2_MIXED_REFS; + x4->params.analyse.b_transform_8x8 = avctx->flags2 & CODEC_FLAG2_8X8DCT; + x4->params.analyse.b_fast_pskip = avctx->flags2 & CODEC_FLAG2_FASTPSKIP; + x4->params.b_aud = avctx->flags2 & CODEC_FLAG2_AUD; + x4->params.analyse.b_psy = avctx->flags2 & CODEC_FLAG2_PSY; + x4->params.rc.b_mb_tree = !!(avctx->flags2 & CODEC_FLAG2_MBTREE); +#endif if (avctx->me_method == ME_EPZS) x4->params.analyse.i_me_method = X264_ME_DIA; @@ -253,46 +336,101 @@ x4->params.analyse.i_me_method = X264_ME_ESA; else if (avctx->me_method == ME_TESA) x4->params.analyse.i_me_method = X264_ME_TESA; - else x4->params.analyse.i_me_method = X264_ME_HEX; - - x4->params.rc.i_aq_mode = avctx->aq_mode; - x4->params.rc.f_aq_strength = avctx->aq_strength; - x4->params.rc.i_lookahead = avctx->rc_lookahead; - - x4->params.analyse.b_psy = avctx->flags2 & CODEC_FLAG2_PSY; - x4->params.analyse.f_psy_rd = avctx->psy_rd; - x4->params.analyse.f_psy_trellis = avctx->psy_trellis; - - x4->params.analyse.i_me_range = avctx->me_range; - x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality; - x4->params.analyse.b_mixed_references = avctx->flags2 & CODEC_FLAG2_MIXED_REFS; - x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA; - x4->params.analyse.b_transform_8x8 = avctx->flags2 & CODEC_FLAG2_8X8DCT; - x4->params.analyse.b_fast_pskip = avctx->flags2 & CODEC_FLAG2_FASTPSKIP; - - x4->params.analyse.i_trellis = avctx->trellis; - x4->params.analyse.i_noise_reduction = avctx->noise_reduction; - - if (avctx->level > 0) - x4->params.i_level_idc = avctx->level; - - if (avctx->rc_buffer_size && avctx->rc_initial_buffer_occupancy && - (avctx->rc_initial_buffer_occupancy <= avctx->rc_buffer_size)) { - x4->params.rc.f_vbv_buffer_init = - (float)avctx->rc_initial_buffer_occupancy / avctx->rc_buffer_size; - } + if (avctx->gop_size >= 0) + x4->params.i_keyint_max = avctx->gop_size; + if (avctx->max_b_frames >= 0) + x4->params.i_bframe = avctx->max_b_frames; + if (avctx->scenechange_threshold >= 0) + x4->params.i_scenecut_threshold = avctx->scenechange_threshold; + if (avctx->qmin >= 0) + x4->params.rc.i_qp_min = avctx->qmin; + if (avctx->qmax >= 0) + x4->params.rc.i_qp_max = avctx->qmax; + if (avctx->max_qdiff >= 0) + x4->params.rc.i_qp_step = avctx->max_qdiff; + if (avctx->qblur >= 0) + x4->params.rc.f_qblur = avctx->qblur; /* temporally blur quants */ + if (avctx->qcompress >= 0) + x4->params.rc.f_qcompress = avctx->qcompress; /* 0.0 => cbr, 1.0 => constant qp */ + if (avctx->refs >= 0) + x4->params.i_frame_reference = avctx->refs; + if (avctx->trellis >= 0) + x4->params.analyse.i_trellis = avctx->trellis; + if (avctx->me_range >= 0) + x4->params.analyse.i_me_range = avctx->me_range; + if (avctx->noise_reduction >= 0) + x4->params.analyse.i_noise_reduction = avctx->noise_reduction; + if (avctx->me_subpel_quality >= 0) + x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality; + if (avctx->b_frame_strategy >= 0) + x4->params.i_bframe_adaptive = avctx->b_frame_strategy; + if (avctx->keyint_min >= 0) + x4->params.i_keyint_min = avctx->keyint_min; + if (avctx->coder_type >= 0) + x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC; + if (avctx->me_cmp >= 0) + x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA; + + if (x4->aq_mode >= 0) + x4->params.rc.i_aq_mode = x4->aq_mode; + if (x4->aq_strength >= 0) + x4->params.rc.f_aq_strength = x4->aq_strength; + PARSE_X264_OPT("psy-rd", psy_rd); + PARSE_X264_OPT("deblock", deblock); + PARSE_X264_OPT("partitions", partitions); + if (x4->psy >= 0) + x4->params.analyse.b_psy = x4->psy; + if (x4->rc_lookahead >= 0) + x4->params.rc.i_lookahead = x4->rc_lookahead; + if (x4->weightp >= 0) + x4->params.analyse.i_weighted_pred = x4->weightp; + if (x4->weightb >= 0) + x4->params.analyse.b_weighted_bipred = x4->weightb; + if (x4->cplxblur >= 0) + x4->params.rc.f_complexity_blur = x4->cplxblur; + + if (x4->ssim >= 0) + x4->params.analyse.b_ssim = x4->ssim; + if (x4->intra_refresh >= 0) + x4->params.b_intra_refresh = x4->intra_refresh; + if (x4->b_bias != INT_MIN) + x4->params.i_bframe_bias = x4->b_bias; + if (x4->b_pyramid >= 0) + x4->params.i_bframe_pyramid = x4->b_pyramid; + if (x4->mixed_refs >= 0) + x4->params.analyse.b_mixed_references = x4->mixed_refs; + if (x4->dct8x8 >= 0) + x4->params.analyse.b_transform_8x8 = x4->dct8x8; + if (x4->fast_pskip >= 0) + x4->params.analyse.b_fast_pskip = x4->fast_pskip; + if (x4->aud >= 0) + x4->params.b_aud = x4->aud; + if (x4->mbtree >= 0) + x4->params.rc.b_mb_tree = x4->mbtree; + if (x4->direct_pred >= 0) + x4->params.analyse.i_direct_mv_pred = x4->direct_pred; + + if (x4->slice_max_size >= 0) + x4->params.i_slice_max_size = x4->slice_max_size; + + if (x4->fastfirstpass) + x264_param_apply_fastfirstpass(&x4->params); + + if (x4->profile) + if (x264_param_apply_profile(&x4->params, x4->profile) < 0) { + av_log(avctx, AV_LOG_ERROR, "Error setting profile %s.\n", x4->profile); + return AVERROR(EINVAL); + } - x4->params.rc.b_mb_tree = !!(avctx->flags2 & CODEC_FLAG2_MBTREE); - x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor); - x4->params.rc.f_pb_factor = avctx->b_quant_factor; - x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset; + x4->params.i_width = avctx->width; + x4->params.i_height = avctx->height; + x4->params.vui.i_sar_width = avctx->sample_aspect_ratio.num; + x4->params.vui.i_sar_height = avctx->sample_aspect_ratio.den; + x4->params.i_fps_num = x4->params.i_timebase_den = avctx->time_base.den; + x4->params.i_fps_den = x4->params.i_timebase_num = avctx->time_base.num; x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR; - x4->params.analyse.b_ssim = avctx->flags2 & CODEC_FLAG2_SSIM; - x4->params.i_log_level = X264_LOG_DEBUG; - - x4->params.b_aud = avctx->flags2 & CODEC_FLAG2_AUD; x4->params.i_threads = avctx->thread_count; @@ -307,6 +445,14 @@ if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) x4->params.b_repeat_headers = 0; + // update AVCodecContext with x264 parameters + avctx->has_b_frames = x4->params.i_bframe ? + x4->params.i_bframe_pyramid ? 2 : 1 : 0; + avctx->bit_rate = x4->params.rc.i_bitrate*1000; +#if FF_API_X264_GLOBAL_OPTS + avctx->crf = x4->params.rc.f_rf_constant; +#endif + x4->enc = x264_encoder_open(&x4->params); if (!x4->enc) return -1; @@ -330,6 +476,114 @@ return 0; } +static const enum PixelFormat pix_fmts_8bit[] = { + PIX_FMT_YUV420P, + PIX_FMT_YUVJ420P, + PIX_FMT_YUV422P, + PIX_FMT_YUV444P, + PIX_FMT_NONE +}; +static const enum PixelFormat pix_fmts_9bit[] = { + PIX_FMT_YUV420P9, + PIX_FMT_YUV444P9, + PIX_FMT_NONE +}; +static const enum PixelFormat pix_fmts_10bit[] = { + PIX_FMT_YUV420P10, + PIX_FMT_YUV422P10, + PIX_FMT_YUV444P10, + PIX_FMT_NONE +}; + +static av_cold void X264_init_static(AVCodec *codec) +{ + if (x264_bit_depth == 8) + codec->pix_fmts = pix_fmts_8bit; + else if (x264_bit_depth == 9) + codec->pix_fmts = pix_fmts_9bit; + else if (x264_bit_depth == 10) + codec->pix_fmts = pix_fmts_10bit; +} + +#define OFFSET(x) offsetof(X264Context, x) +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "preset", "Set the encoding preset (cf. x264 --fullhelp)", OFFSET(preset), AV_OPT_TYPE_STRING, { .str = "medium" }, 0, 0, VE}, + { "tune", "Tune the encoding params (cf. x264 --fullhelp)", OFFSET(tune), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE}, + { "profile", "Set profile restrictions (cf. x264 --fullhelp) ", OFFSET(profile), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE}, + { "fastfirstpass", "Use fast settings when encoding first pass", OFFSET(fastfirstpass), AV_OPT_TYPE_INT, { 1 }, 0, 1, VE}, + { "crf", "Select the quality for constant quality mode", OFFSET(crf), AV_OPT_TYPE_FLOAT, {-1 }, -1, FLT_MAX, VE }, + { "crf_max", "In CRF mode, prevents VBV from lowering quality beyond this point.",OFFSET(crf_max), AV_OPT_TYPE_FLOAT, {-1 }, -1, FLT_MAX, VE }, + { "qp", "Constant quantization parameter rate control method",OFFSET(cqp), AV_OPT_TYPE_INT, {-1 }, -1, INT_MAX, VE }, + { "aq-mode", "AQ method", OFFSET(aq_mode), AV_OPT_TYPE_INT, {-1 }, -1, INT_MAX, VE, "aq_mode"}, + { "none", NULL, 0, AV_OPT_TYPE_CONST, {X264_AQ_NONE}, INT_MIN, INT_MAX, VE, "aq_mode" }, + { "variance", "Variance AQ (complexity mask)", 0, AV_OPT_TYPE_CONST, {X264_AQ_VARIANCE}, INT_MIN, INT_MAX, VE, "aq_mode" }, + { "autovariance", "Auto-variance AQ (experimental)", 0, AV_OPT_TYPE_CONST, {X264_AQ_AUTOVARIANCE}, INT_MIN, INT_MAX, VE, "aq_mode" }, + { "aq-strength", "AQ strength. Reduces blocking and blurring in flat and textured areas.", OFFSET(aq_strength), AV_OPT_TYPE_FLOAT, {-1}, -1, FLT_MAX, VE}, + { "psy", "Use psychovisual optimizations.", OFFSET(psy), AV_OPT_TYPE_INT, {-1 }, -1, 1, VE }, + { "psy-rd", "Strength of psychovisual optimization, in : format.", OFFSET(psy_rd), AV_OPT_TYPE_STRING, {0 }, 0, 0, VE}, + { "rc-lookahead", "Number of frames to look ahead for frametype and ratecontrol", OFFSET(rc_lookahead), AV_OPT_TYPE_INT, {-1 }, -1, INT_MAX, VE }, + { "weightb", "Weighted prediction for B-frames.", OFFSET(weightb), AV_OPT_TYPE_INT, {-1 }, -1, 1, VE }, + { "weightp", "Weighted prediction analysis method.", OFFSET(weightp), AV_OPT_TYPE_INT, {-1 }, -1, INT_MAX, VE, "weightp" }, + { "none", NULL, 0, AV_OPT_TYPE_CONST, {X264_WEIGHTP_NONE}, INT_MIN, INT_MAX, VE, "weightp" }, + { "simple", NULL, 0, AV_OPT_TYPE_CONST, {X264_WEIGHTP_SIMPLE}, INT_MIN, INT_MAX, VE, "weightp" }, + { "smart", NULL, 0, AV_OPT_TYPE_CONST, {X264_WEIGHTP_SMART}, INT_MIN, INT_MAX, VE, "weightp" }, + { "ssim", "Calculate and print SSIM stats.", OFFSET(ssim), AV_OPT_TYPE_INT, {-1 }, -1, 1, VE }, + { "intra-refresh", "Use Periodic Intra Refresh instead of IDR frames.",OFFSET(intra_refresh),AV_OPT_TYPE_INT, {-1 }, -1, 1, VE }, + { "b-bias", "Influences how often B-frames are used", OFFSET(b_bias), AV_OPT_TYPE_INT, {INT_MIN}, INT_MIN, INT_MAX, VE }, + { "b-pyramid", "Keep some B-frames as references.", OFFSET(b_pyramid), AV_OPT_TYPE_INT, {-1 }, -1, INT_MAX, VE, "b_pyramid" }, + { "none", NULL, 0, AV_OPT_TYPE_CONST, {X264_B_PYRAMID_NONE}, INT_MIN, INT_MAX, VE, "b_pyramid" }, + { "strict", "Strictly hierarchical pyramid", 0, AV_OPT_TYPE_CONST, {X264_B_PYRAMID_STRICT}, INT_MIN, INT_MAX, VE, "b_pyramid" }, + { "normal", "Non-strict (not Blu-ray compatible)", 0, AV_OPT_TYPE_CONST, {X264_B_PYRAMID_NORMAL}, INT_MIN, INT_MAX, VE, "b_pyramid" }, + { "mixed-refs", "One reference per partition, as opposed to one reference per macroblock", OFFSET(mixed_refs), AV_OPT_TYPE_INT, {-1}, -1, 1, VE }, + { "8x8dct", "High profile 8x8 transform.", OFFSET(dct8x8), AV_OPT_TYPE_INT, {-1 }, -1, 1, VE}, + { "fast-pskip", NULL, OFFSET(fast_pskip), AV_OPT_TYPE_INT, {-1 }, -1, 1, VE}, + { "aud", "Use access unit delimiters.", OFFSET(aud), AV_OPT_TYPE_INT, {-1 }, -1, 1, VE}, + { "mbtree", "Use macroblock tree ratecontrol.", OFFSET(mbtree), AV_OPT_TYPE_INT, {-1 }, -1, 1, VE}, + { "deblock", "Loop filter parameters, in form.", OFFSET(deblock), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE}, + { "cplxblur", "Reduce fluctuations in QP (before curve compression)", OFFSET(cplxblur), AV_OPT_TYPE_FLOAT, {-1 }, -1, FLT_MAX, VE}, + { "partitions", "A comma-separated list of partitions to consider. " + "Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all", OFFSET(partitions), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE}, + { "direct-pred", "Direct MV prediction mode", OFFSET(direct_pred), AV_OPT_TYPE_INT, {-1 }, -1, INT_MAX, VE, "direct-pred" }, + { "none", NULL, 0, AV_OPT_TYPE_CONST, { X264_DIRECT_PRED_NONE }, 0, 0, VE, "direct-pred" }, + { "spatial", NULL, 0, AV_OPT_TYPE_CONST, { X264_DIRECT_PRED_SPATIAL }, 0, 0, VE, "direct-pred" }, + { "temporal", NULL, 0, AV_OPT_TYPE_CONST, { X264_DIRECT_PRED_TEMPORAL }, 0, 0, VE, "direct-pred" }, + { "auto", NULL, 0, AV_OPT_TYPE_CONST, { X264_DIRECT_PRED_AUTO }, 0, 0, VE, "direct-pred" }, + { "slice-max-size","Constant quantization parameter rate control method",OFFSET(slice_max_size), AV_OPT_TYPE_INT, {-1 }, -1, INT_MAX, VE }, + { NULL }, +}; + +static const AVClass class = { + .class_name = "libx264", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +static const AVCodecDefault x264_defaults[] = { + { "b", "0" }, + { "bf", "-1" }, + { "g", "-1" }, + { "qmin", "-1" }, + { "qmax", "-1" }, + { "qdiff", "-1" }, + { "qblur", "-1" }, + { "qcomp", "-1" }, + { "refs", "-1" }, + { "sc_threshold", "-1" }, + { "trellis", "-1" }, + { "nr", "-1" }, + { "me_range", "-1" }, + { "me_method", "-1" }, + { "subq", "-1" }, + { "b_strategy", "-1" }, + { "keyint_min", "-1" }, + { "coder", "-1" }, + { "cmp", "-1" }, + { "threads", AV_STRINGIFY(X264_THREADS_AUTO) }, + { NULL }, +}; + AVCodec ff_libx264_encoder = { .name = "libx264", .type = AVMEDIA_TYPE_VIDEO, @@ -338,7 +592,9 @@ .init = X264_init, .encode = X264_frame, .close = X264_close, - .capabilities = CODEC_CAP_DELAY, - .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_YUV420P, PIX_FMT_YUVJ420P, PIX_FMT_NONE }, + .capabilities = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS, .long_name = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), + .priv_class = &class, + .defaults = x264_defaults, + .init_static_data = X264_init_static, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libxavs.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libxavs.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libxavs.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libxavs.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,8 +24,11 @@ #include #include #include +#include #include #include "avcodec.h" +#include "internal.h" +#include "libavutil/opt.h" #define END_OF_STREAM 0x001 @@ -41,6 +44,15 @@ int sei_size; AVFrame out_pic; int end_of_stream; + float crf; + int cqp; + int b_bias; + float cplxblur; + int direct_pred; + int aud; + int fast_pskip; + int mbtree; + int mixed_refs; } XavsContext; static void XAVS_log(void *p, int level, const char *fmt, va_list args) @@ -181,13 +193,17 @@ x4->params.pf_log = XAVS_log; x4->params.p_log_private = avctx; x4->params.i_keyint_max = avctx->gop_size; - x4->params.rc.i_bitrate = avctx->bit_rate / 1000; + if (avctx->bit_rate) { + x4->params.rc.i_bitrate = avctx->bit_rate / 1000; + x4->params.rc.i_rc_method = XAVS_RC_ABR; + } x4->params.rc.i_vbv_buffer_size = avctx->rc_buffer_size / 1000; x4->params.rc.i_vbv_max_bitrate = avctx->rc_max_rate / 1000; x4->params.rc.b_stat_write = avctx->flags & CODEC_FLAG_PASS1; if (avctx->flags & CODEC_FLAG_PASS2) { x4->params.rc.b_stat_read = 1; } else { +#if FF_API_X264_GLOBAL_OPTS if (avctx->crf) { x4->params.rc.i_rc_method = XAVS_RC_CRF; x4->params.rc.f_rf_constant = avctx->crf; @@ -195,19 +211,63 @@ x4->params.rc.i_rc_method = XAVS_RC_CQP; x4->params.rc.i_qp_constant = avctx->cqp; } +#endif + + if (x4->crf >= 0) { + x4->params.rc.i_rc_method = XAVS_RC_CRF; + x4->params.rc.f_rf_constant = x4->crf; + } else if (x4->cqp >= 0) { + x4->params.rc.i_rc_method = XAVS_RC_CQP; + x4->params.rc.i_qp_constant = x4->cqp; + } } - /* if neither crf nor cqp modes are selected we have to enable the RC */ - /* we do it this way because we cannot check if the bitrate has been set */ - if (!(avctx->crf || (avctx->cqp > -1))) - x4->params.rc.i_rc_method = XAVS_RC_ABR; +#if FF_API_X264_GLOBAL_OPTS + if (avctx->bframebias) + x4->params.i_bframe_bias = avctx->bframebias; + if (avctx->deblockalpha) + x4->params.i_deblocking_filter_alphac0 = avctx->deblockalpha; + if (avctx->deblockbeta) + x4->params.i_deblocking_filter_beta = avctx->deblockbeta; + if (avctx->complexityblur >= 0) + x4->params.rc.f_complexity_blur = avctx->complexityblur; + if (avctx->directpred >= 0) + x4->params.analyse.i_direct_mv_pred = avctx->directpred; + if (avctx->partitions) { + if (avctx->partitions & XAVS_PART_I8X8) + x4->params.analyse.inter |= XAVS_ANALYSE_I8x8; + if (avctx->partitions & XAVS_PART_P8X8) + x4->params.analyse.inter |= XAVS_ANALYSE_PSUB16x16; + if (avctx->partitions & XAVS_PART_B8X8) + x4->params.analyse.inter |= XAVS_ANALYSE_BSUB16x16; + } + x4->params.rc.b_mb_tree = !!(avctx->flags2 & CODEC_FLAG2_MBTREE); + x4->params.b_aud = avctx->flags2 & CODEC_FLAG2_AUD; + x4->params.analyse.b_mixed_references = avctx->flags2 & CODEC_FLAG2_MIXED_REFS; + x4->params.analyse.b_fast_pskip = avctx->flags2 & CODEC_FLAG2_FASTPSKIP; + x4->params.analyse.b_weighted_bipred = avctx->flags2 & CODEC_FLAG2_WPRED; +#endif + + if (x4->aud >= 0) + x4->params.b_aud = x4->aud; + if (x4->mbtree >= 0) + x4->params.rc.b_mb_tree = x4->mbtree; + if (x4->direct_pred >= 0) + x4->params.analyse.i_direct_mv_pred = x4->direct_pred; + if (x4->fast_pskip >= 0) + x4->params.analyse.b_fast_pskip = x4->fast_pskip; + if (x4->mixed_refs >= 0) + x4->params.analyse.b_mixed_references = x4->mixed_refs; + if (x4->b_bias != INT_MIN) + x4->params.i_bframe_bias = x4->b_bias; + if (x4->cplxblur >= 0) + x4->params.rc.f_complexity_blur = x4->cplxblur; x4->params.i_bframe = avctx->max_b_frames; /* cabac is not included in AVS JiZhun Profile */ x4->params.b_cabac = 0; x4->params.i_bframe_adaptive = avctx->b_frame_strategy; - x4->params.i_bframe_bias = avctx->bframebias; avctx->has_b_frames = !!avctx->max_b_frames; @@ -220,8 +280,6 @@ x4->params.i_scenecut_threshold = avctx->scenechange_threshold; // x4->params.b_deblocking_filter = avctx->flags & CODEC_FLAG_LOOP_FILTER; - x4->params.i_deblocking_filter_alphac0 = avctx->deblockalpha; - x4->params.i_deblocking_filter_beta = avctx->deblockbeta; x4->params.rc.i_qp_min = avctx->qmin; x4->params.rc.i_qp_max = avctx->qmax; @@ -229,7 +287,6 @@ x4->params.rc.f_qcompress = avctx->qcompress; /* 0.0 => cbr, 1.0 => constant qp */ x4->params.rc.f_qblur = avctx->qblur; /* temporally blur quants */ - x4->params.rc.f_complexity_blur = avctx->complexityblur; x4->params.i_frame_reference = avctx->refs; @@ -241,20 +298,6 @@ x4->params.i_fps_num = avctx->time_base.den; x4->params.i_fps_den = avctx->time_base.num; x4->params.analyse.inter = XAVS_ANALYSE_I8x8 |XAVS_ANALYSE_PSUB16x16| XAVS_ANALYSE_BSUB16x16; - if (avctx->partitions) { - if (avctx->partitions & XAVS_PART_I8X8) - x4->params.analyse.inter |= XAVS_ANALYSE_I8x8; - - if (avctx->partitions & XAVS_PART_P8X8) - x4->params.analyse.inter |= XAVS_ANALYSE_PSUB16x16; - - if (avctx->partitions & XAVS_PART_B8X8) - x4->params.analyse.inter |= XAVS_ANALYSE_BSUB16x16; - } - - x4->params.analyse.i_direct_mv_pred = avctx->directpred; - - x4->params.analyse.b_weighted_bipred = avctx->flags2 & CODEC_FLAG2_WPRED; switch (avctx->me_method) { case ME_EPZS: @@ -279,11 +322,9 @@ x4->params.analyse.i_me_range = avctx->me_range; x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality; - x4->params.analyse.b_mixed_references = avctx->flags2 & CODEC_FLAG2_MIXED_REFS; x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA; /* AVS P2 only enables 8x8 transform */ x4->params.analyse.b_transform_8x8 = 1; //avctx->flags2 & CODEC_FLAG2_8X8DCT; - x4->params.analyse.b_fast_pskip = avctx->flags2 & CODEC_FLAG2_FASTPSKIP; x4->params.analyse.i_trellis = avctx->trellis; x4->params.analyse.i_noise_reduction = avctx->noise_reduction; @@ -303,14 +344,12 @@ /* TAG:do we have MB tree RC method */ /* what is the RC method we are now using? Default NO */ - x4->params.rc.b_mb_tree = !!(avctx->flags2 & CODEC_FLAG2_MBTREE); x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor); x4->params.rc.f_pb_factor = avctx->b_quant_factor; x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset; x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR; x4->params.i_log_level = XAVS_LOG_DEBUG; - x4->params.b_aud = avctx->flags2 & CODEC_FLAG2_AUD; x4->params.i_threads = avctx->thread_count; x4->params.b_interlaced = avctx->flags & CODEC_FLAG_INTERLACED_DCT; @@ -336,6 +375,37 @@ return 0; } +#define OFFSET(x) offsetof(XavsContext, x) +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "crf", "Select the quality for constant quality mode", OFFSET(crf), AV_OPT_TYPE_FLOAT, {-1 }, -1, FLT_MAX, VE }, + { "qp", "Constant quantization parameter rate control method",OFFSET(cqp), AV_OPT_TYPE_INT, {-1 }, -1, INT_MAX, VE }, + { "b-bias", "Influences how often B-frames are used", OFFSET(b_bias), AV_OPT_TYPE_INT, {INT_MIN}, INT_MIN, INT_MAX, VE }, + { "cplxblur", "Reduce fluctuations in QP (before curve compression)", OFFSET(cplxblur), AV_OPT_TYPE_FLOAT, {-1 }, -1, FLT_MAX, VE}, + { "direct-pred", "Direct MV prediction mode", OFFSET(direct_pred), AV_OPT_TYPE_INT, {-1 }, -1, INT_MAX, VE, "direct-pred" }, + { "none", NULL, 0, AV_OPT_TYPE_CONST, { XAVS_DIRECT_PRED_NONE }, 0, 0, VE, "direct-pred" }, + { "spatial", NULL, 0, AV_OPT_TYPE_CONST, { XAVS_DIRECT_PRED_SPATIAL }, 0, 0, VE, "direct-pred" }, + { "temporal", NULL, 0, AV_OPT_TYPE_CONST, { XAVS_DIRECT_PRED_TEMPORAL }, 0, 0, VE, "direct-pred" }, + { "auto", NULL, 0, AV_OPT_TYPE_CONST, { XAVS_DIRECT_PRED_AUTO }, 0, 0, VE, "direct-pred" }, + { "aud", "Use access unit delimiters.", OFFSET(aud), AV_OPT_TYPE_INT, {-1 }, -1, 1, VE}, + { "mbtree", "Use macroblock tree ratecontrol.", OFFSET(mbtree), AV_OPT_TYPE_INT, {-1 }, -1, 1, VE}, + { "mixed-refs", "One reference per partition, as opposed to one reference per macroblock", OFFSET(mixed_refs), AV_OPT_TYPE_INT, {-1}, -1, 1, VE }, + { "fast-pskip", NULL, OFFSET(fast_pskip), AV_OPT_TYPE_INT, {-1 }, -1, 1, VE}, + { NULL }, +}; + +static const AVClass class = { + .class_name = "libxavs", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +static const AVCodecDefault xavs_defaults[] = { + { "b", "0" }, + { NULL }, +}; + AVCodec ff_libxavs_encoder = { .name = "libxavs", .type = AVMEDIA_TYPE_VIDEO, @@ -344,8 +414,10 @@ .init = XAVS_init, .encode = XAVS_frame, .close = XAVS_close, - .capabilities = CODEC_CAP_DELAY, + .capabilities = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS, .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_YUV420P, PIX_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("libxavs - the Chinese Audio Video Standard Encoder"), + .priv_class = &class, + .defaults = xavs_defaults, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libxvidff.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libxvidff.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/libxvidff.c 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/libxvidff.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,6 +30,7 @@ #include "avcodec.h" #include "libavutil/cpu.h" #include "libavutil/intreadwrite.h" +#include "libavutil/mathematics.h" #include "libxvid_internal.h" #if !HAVE_MKSTEMP #include @@ -136,7 +137,7 @@ xvid_enc_create_t xvid_enc_create; xvid_enc_plugin_t plugins[7]; - /* Bring in VOP flags from ffmpeg command-line */ + /* Bring in VOP flags from avconv command-line */ x->vop_flags = XVID_VOP_HALFPEL; /* Bare minimum quality */ if( xvid_flags & CODEC_FLAG_4MV ) x->vop_flags |= XVID_VOP_INTER4V; /* Level 3 */ @@ -190,7 +191,7 @@ break; } - /* Bring in VOL flags from ffmpeg command-line */ + /* Bring in VOL flags from avconv command-line */ x->vol_flags = 0; if( xvid_flags & CODEC_FLAG_GMC ) { x->vol_flags |= XVID_VOL_GMC; @@ -269,7 +270,7 @@ rc2pass2.version = XVID_VERSION; rc2pass2.bitrate = avctx->bit_rate; - fd = ff_tempfile("xvidff.", &(x->twopassfile)); + fd = ff_tempfile("xvidff.", &x->twopassfile); if( fd == -1 ) { av_log(avctx, AV_LOG_ERROR, "Xvid: Cannot write 2-pass pipe\n"); @@ -413,7 +414,7 @@ char *tmp; struct xvid_context *x = avctx->priv_data; AVFrame *picture = data; - AVFrame *p = &(x->encoded_picture); + AVFrame *p = &x->encoded_picture; xvid_enc_frame_t xvid_enc_frame; xvid_enc_stats_t xvid_enc_stats; @@ -574,7 +575,7 @@ } /* Less dangerous now, memmove properly copies the two chunks of overlapping data */ - memmove(frame, &(frame[vo_len]), frame_len - vo_len); + memmove(frame, &frame[vo_len], frame_len - vo_len); return frame_len - vo_len; } else return frame_len; @@ -668,7 +669,7 @@ /* This is because we can safely prevent a buffer overflow */ log[0] = 0; snprintf(log, BUFFER_REMAINING(log), - "# ffmpeg 2-pass log file, using xvid codec\n"); + "# avconv 2-pass log file, using xvid codec\n"); snprintf(BUFFER_CAT(log), BUFFER_REMAINING(log), "# Do not modify. libxvidcore version: %d.%d.%d\n\n", XVID_VERSION_MAJOR(XVID_VERSION), @@ -748,7 +749,7 @@ static int xvid_ff_2pass_after(struct xvid_context *ref, xvid_plg_data_t *param) { char *log = ref->twopassbuffer; - char *frame_types = " ipbs"; + const char *frame_types = " ipbs"; char frame_type; /* Quick bounds check */ @@ -808,13 +809,13 @@ * Xvid codec definition for libavcodec. */ AVCodec ff_libxvid_encoder = { - "libxvid", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG4, - sizeof(struct xvid_context), - xvid_encode_init, - xvid_encode_frame, - xvid_encode_close, + .name = "libxvid", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG4, + .priv_data_size = sizeof(struct xvid_context), + .init = xvid_encode_init, + .encode = xvid_encode_frame, + .close = xvid_encode_close, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ljpegenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ljpegenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ljpegenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ljpegenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -187,12 +187,12 @@ AVCodec ff_ljpeg_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them - "ljpeg", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_LJPEG, - sizeof(MpegEncContext), - MPV_encode_init, - encode_picture_lossless, - MPV_encode_end, - .long_name = NULL_IF_CONFIG_SMALL("Lossless JPEG"), + .name = "ljpeg", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_LJPEG, + .priv_data_size = sizeof(MpegEncContext), + .init = MPV_encode_init, + .encode = encode_picture_lossless, + .close = MPV_encode_end, + .long_name = NULL_IF_CONFIG_SMALL("Lossless JPEG"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/loco.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/loco.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/loco.c 2011-04-23 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/loco.c 2012-01-11 00:34:30.000000000 +0000 @@ -286,14 +286,13 @@ } AVCodec ff_loco_decoder = { - "loco", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_LOCO, - sizeof(LOCOContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "loco", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_LOCO, + .priv_data_size = sizeof(LOCOContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("LOCO"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lpc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lpc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lpc.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lpc.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,8 +35,9 @@ double w; double c; - assert(!(len&1)); //the optimization in r11881 does not support odd len - //if someone wants odd len extend the change in r11881 + /* The optimization in commit fa4ed8c does not support odd len. + * If someone wants odd len extend that change. */ + assert(!(len & 1)); n2 = (len >> 1); c = 2.0 / (len - 1.0); @@ -149,10 +150,8 @@ /** * Calculate LPC coefficients for multiple orders * - * @param use_lpc LPC method for determining coefficients - * 0 = LPC with fixed pre-defined coeffs - * 1 = LPC with coeffs determined by Levinson-Durbin recursion - * 2+ = LPC with coeffs determined by Cholesky factorization using (use_lpc-1) passes. + * @param lpc_type LPC method for determining coefficients, + * see #FFLPCType for details */ int ff_lpc_calc_coefs(LPCContext *s, const int32_t *samples, int blocksize, int min_order, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lpc.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lpc.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lpc.h 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lpc.h 2012-01-11 00:34:30.000000000 +0000 @@ -67,7 +67,7 @@ * Perform autocorrelation on input samples with delay of 0 to lag. * @param data input samples. * constraints: no alignment needed, but must have have at - * least lag*sizeof(double) valid bytes preceeding it, and + * least lag*sizeof(double) valid bytes preceding it, and * size must be at least (len+1)*sizeof(double) if data is * 16-byte aligned or (len+2)*sizeof(double) if data is * unaligned. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lsp.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -74,9 +74,9 @@ } /** - * \brief decodes polynomial coefficients from LSP - * \param f [out] decoded polynomial coefficients (-0x20000000 <= (3.22) <= 0x1fffffff) - * \param lsp LSP coefficients (-0x8000 <= (0.15) <= 0x7fff) + * @brief decodes polynomial coefficients from LSP + * @param[out] f decoded polynomial coefficients (-0x20000000 <= (3.22) <= 0x1fffffff) + * @param lsp LSP coefficients (-0x8000 <= (0.15) <= 0x7fff) */ static void lsp2poly(int* f, const int16_t* lsp, int lp_half_order) { @@ -120,8 +120,8 @@ void ff_amrwb_lsp2lpc(const double *lsp, float *lp, int lp_order) { int lp_half_order = lp_order >> 1; - double buf[lp_half_order + 1]; - double pa[lp_half_order + 1]; + double buf[MAX_LP_HALF_ORDER + 1]; + double pa[MAX_LP_HALF_ORDER + 1]; double *qa = buf + 1; int i,j; @@ -150,11 +150,7 @@ /* LSP values for first subframe (3.2.5 of G.729, Equation 24)*/ for(i=0; i> 1) + (lsp_prev[i] >> 1); -#else lsp_1st[i] = (lsp_2nd[i] + lsp_prev[i]) >> 1; -#endif ff_acelp_lsp2lpc(lp_1st, lsp_1st, lp_order >> 1); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lsp.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lsp.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lsp.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lsp.h 2012-01-11 00:34:30.000000000 +0000 @@ -30,12 +30,12 @@ */ /** - * \brief ensure a minimum distance between LSFs - * \param[in,out] lsfq LSF to check and adjust - * \param lsfq_min_distance minimum distance between LSFs - * \param lsfq_min minimum allowed LSF value - * \param lsfq_max maximum allowed LSF value - * \param lp_order LP filter order + * @brief ensure a minimum distance between LSFs + * @param[in,out] lsfq LSF to check and adjust + * @param lsfq_min_distance minimum distance between LSFs + * @param lsfq_min minimum allowed LSF value + * @param lsfq_max maximum allowed LSF value + * @param lp_order LP filter order */ void ff_acelp_reorder_lsf(int16_t* lsfq, int lsfq_min_distance, int lsfq_min, int lsfq_max, int lp_order); @@ -53,12 +53,12 @@ void ff_set_min_dist_lsf(float *lsf, double min_spacing, int size); /** - * \brief Convert LSF to LSP - * \param[out] lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) - * \param lsf normalized LSF coefficients (0 <= (2.13) < 0x2000 * PI) - * \param lp_order LP filter order + * @brief Convert LSF to LSP + * @param[out] lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) + * @param lsf normalized LSF coefficients (0 <= (2.13) < 0x2000 * PI) + * @param lp_order LP filter order * - * \remark It is safe to pass the same array into the lsf and lsp parameters. + * @remark It is safe to pass the same array into the lsf and lsp parameters. */ void ff_acelp_lsf2lsp(int16_t *lsp, const int16_t *lsf, int lp_order); @@ -68,10 +68,10 @@ void ff_acelp_lsf2lspd(double *lsp, const float *lsf, int lp_order); /** - * \brief LSP to LP conversion (3.2.6 of G.729) - * \param[out] lp decoded LP coefficients (-0x8000 <= (3.12) < 0x8000) - * \param lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) - * \param lp_half_order LP filter order, divided by 2 + * @brief LSP to LP conversion (3.2.6 of G.729) + * @param[out] lp decoded LP coefficients (-0x8000 <= (3.12) < 0x8000) + * @param lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) + * @param lp_half_order LP filter order, divided by 2 */ void ff_acelp_lsp2lpc(int16_t* lp, const int16_t* lsp, int lp_half_order); @@ -81,17 +81,17 @@ void ff_amrwb_lsp2lpc(const double *lsp, float *lp, int lp_order); /** - * \brief Interpolate LSP for the first subframe and convert LSP -> LP for both subframes (3.2.5 and 3.2.6 of G.729) - * \param[out] lp_1st decoded LP coefficients for first subframe (-0x8000 <= (3.12) < 0x8000) - * \param[out] lp_2nd decoded LP coefficients for second subframe (-0x8000 <= (3.12) < 0x8000) - * \param lsp_2nd LSP coefficients of the second subframe (-0x8000 <= (0.15) < 0x8000) - * \param lsp_prev LSP coefficients from the second subframe of the previous frame (-0x8000 <= (0.15) < 0x8000) - * \param lp_order LP filter order + * @brief Interpolate LSP for the first subframe and convert LSP -> LP for both subframes (3.2.5 and 3.2.6 of G.729) + * @param[out] lp_1st decoded LP coefficients for first subframe (-0x8000 <= (3.12) < 0x8000) + * @param[out] lp_2nd decoded LP coefficients for second subframe (-0x8000 <= (3.12) < 0x8000) + * @param lsp_2nd LSP coefficients of the second subframe (-0x8000 <= (0.15) < 0x8000) + * @param lsp_prev LSP coefficients from the second subframe of the previous frame (-0x8000 <= (0.15) < 0x8000) + * @param lp_order LP filter order */ void ff_acelp_lp_decode(int16_t* lp_1st, int16_t* lp_2nd, const int16_t* lsp_2nd, const int16_t* lsp_prev, int lp_order); -#define MAX_LP_HALF_ORDER 8 +#define MAX_LP_HALF_ORDER 10 #define MAX_LP_ORDER (2*MAX_LP_HALF_ORDER) /** diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lzw.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lzw.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lzw.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lzw.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,7 +24,7 @@ * @file * @brief LZW decoding routines * @author Fabrice Bellard - * Modified for use in TIFF by Konstantin Shishkov + * @author modified for use in TIFF by Konstantin Shishkov */ #include "avcodec.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lzwenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lzwenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lzwenc.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lzwenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,8 +20,8 @@ */ /** - * LZW encoder * @file + * LZW encoder * @author Bartlomiej Wolowiec */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lzw.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lzw.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/lzw.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/lzw.h 2012-01-11 00:34:30.000000000 +0000 @@ -24,7 +24,7 @@ * @file * @brief LZW decoding routines * @author Fabrice Bellard - * Modified for use in TIFF by Konstantin Shishkov + * @author modified for use in TIFF by Konstantin Shishkov */ #ifndef AVCODEC_LZW_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mace.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mace.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mace.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mace.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,7 +27,7 @@ #include "avcodec.h" /* - * Adapted to ffmpeg by Francois Revol + * Adapted to libavcodec by Francois Revol * (removed 68k REG stuff, changed types, added some statics and consts, * libavcodec api, context stuff, interlaced stereo out). */ @@ -153,6 +153,7 @@ } ChannelData; typedef struct MACEContext { + AVFrame frame; ChannelData chd[2]; } MACEContext; @@ -228,27 +229,35 @@ static av_cold int mace_decode_init(AVCodecContext * avctx) { + MACEContext *ctx = avctx->priv_data; + if (avctx->channels > 2) return -1; avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + avcodec_get_frame_defaults(&ctx->frame); + avctx->coded_frame = &ctx->frame; + return 0; } -static int mace_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int mace_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - int16_t *samples = data; + int16_t *samples; MACEContext *ctx = avctx->priv_data; - int i, j, k, l; + int i, j, k, l, ret; int is_mace3 = (avctx->codec_id == CODEC_ID_MACE3); - if (*data_size < (3 * buf_size << (2-is_mace3))) { - av_log(avctx, AV_LOG_ERROR, "Output buffer too small!\n"); - return -1; + /* get output buffer */ + ctx->frame.nb_samples = 3 * (buf_size << (1 - is_mace3)) / avctx->channels; + if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; } + samples = (int16_t *)ctx->frame.data[0]; for(i = 0; i < avctx->channels; i++) { int16_t *output = samples + i; @@ -274,32 +283,31 @@ } } - *data_size = 3 * buf_size << (2-is_mace3); + *got_frame_ptr = 1; + *(AVFrame *)data = ctx->frame; return buf_size; } AVCodec ff_mace3_decoder = { - "mace3", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MACE3, - sizeof(MACEContext), - mace_decode_init, - NULL, - NULL, - mace_decode_frame, + .name = "mace3", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MACE3, + .priv_data_size = sizeof(MACEContext), + .init = mace_decode_init, + .decode = mace_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 3:1"), }; AVCodec ff_mace6_decoder = { - "mace6", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MACE6, - sizeof(MACEContext), - mace_decode_init, - NULL, - NULL, - mace_decode_frame, + .name = "mace6", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MACE6, + .priv_data_size = sizeof(MACEContext), + .init = mace_decode_init, + .decode = mace_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 6:1"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/Makefile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/Makefile 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/Makefile 2012-01-11 00:34:30.000000000 +0000 @@ -1,9 +1,7 @@ -include $(SUBDIR)../config.mak - NAME = avcodec FFLIBS = avutil -HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vdpau.h version.h xvmc.h +HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vda.h vdpau.h version.h xvmc.h OBJS = allcodecs.o \ audioconvert.o \ @@ -47,6 +45,7 @@ OBJS-$(CONFIG_RDFT) += rdft.o $(RDFT-OBJS-yes) OBJS-$(CONFIG_SINEWIN) += sinewin.o OBJS-$(CONFIG_VAAPI) += vaapi.o +OBJS-$(CONFIG_VDA) += vda.o OBJS-$(CONFIG_VDPAU) += vdpau.o # decoders/encoders/hardware accelerators @@ -91,11 +90,13 @@ OBJS-$(CONFIG_AVS_DECODER) += avs.o OBJS-$(CONFIG_BETHSOFTVID_DECODER) += bethsoftvideo.o OBJS-$(CONFIG_BFI_DECODER) += bfi.o -OBJS-$(CONFIG_BINK_DECODER) += bink.o binkidct.o +OBJS-$(CONFIG_BINK_DECODER) += bink.o binkdsp.o OBJS-$(CONFIG_BINKAUDIO_DCT_DECODER) += binkaudio.o wma.o OBJS-$(CONFIG_BINKAUDIO_RDFT_DECODER) += binkaudio.o wma.o OBJS-$(CONFIG_BMP_DECODER) += bmp.o msrledec.o OBJS-$(CONFIG_BMP_ENCODER) += bmpenc.o +OBJS-$(CONFIG_BMV_VIDEO_DECODER) += bmv.o +OBJS-$(CONFIG_BMV_AUDIO_DECODER) += bmv.o OBJS-$(CONFIG_C93_DECODER) += c93.o OBJS-$(CONFIG_CAVS_DECODER) += cavs.o cavsdec.o cavsdsp.o \ mpeg12data.o mpegvideo.o @@ -124,9 +125,10 @@ OBJS-$(CONFIG_DVVIDEO_DECODER) += dv.o dvdata.o OBJS-$(CONFIG_DVVIDEO_ENCODER) += dv.o dvdata.o OBJS-$(CONFIG_DXA_DECODER) += dxa.o -OBJS-$(CONFIG_EAC3_DECODER) += eac3dec.o eac3dec_data.o +OBJS-$(CONFIG_DXTORY_DECODER) += dxtory.o +OBJS-$(CONFIG_EAC3_DECODER) += eac3dec.o eac3_data.o OBJS-$(CONFIG_EAC3_ENCODER) += eac3enc.o ac3enc.o ac3enc_float.o \ - ac3tab.o ac3.o kbdwin.o + ac3tab.o ac3.o kbdwin.o eac3_data.o OBJS-$(CONFIG_EACMV_DECODER) += eacmv.o OBJS-$(CONFIG_EAMAD_DECODER) += eamad.o eaidct.o mpeg12.o \ mpeg12data.o mpegvideo.o \ @@ -148,6 +150,7 @@ OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o OBJS-$(CONFIG_FLASHSV_ENCODER) += flashsvenc.o +OBJS-$(CONFIG_FLASHSV2_DECODER) += flashsv.o OBJS-$(CONFIG_FLIC_DECODER) += flicvideo.o OBJS-$(CONFIG_FOURXM_DECODER) += 4xm.o OBJS-$(CONFIG_FRAPS_DECODER) += fraps.o @@ -179,6 +182,7 @@ mpegvideo.o error_resilience.o OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o +OBJS-$(CONFIG_H264_VDA_HWACCEL) += vda_h264.o OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o OBJS-$(CONFIG_IDCIN_DECODER) += idcinvideo.o @@ -187,6 +191,7 @@ OBJS-$(CONFIG_IMC_DECODER) += imc.o OBJS-$(CONFIG_INDEO2_DECODER) += indeo2.o OBJS-$(CONFIG_INDEO3_DECODER) += indeo3.o +OBJS-$(CONFIG_INDEO4_DECODER) += indeo4.o ivi_common.o ivi_dsp.o OBJS-$(CONFIG_INDEO5_DECODER) += indeo5.o ivi_common.o ivi_dsp.o OBJS-$(CONFIG_INTERPLAY_DPCM_DECODER) += dpcm.o OBJS-$(CONFIG_INTERPLAY_VIDEO_DECODER) += interplayvideo.o @@ -246,8 +251,6 @@ OBJS-$(CONFIG_MPC8_DECODER) += mpc8.o mpc.o mpegaudiodec.o \ mpegaudiodecheader.o mpegaudio.o \ mpegaudiodata.o -OBJS-$(CONFIG_MPEGVIDEO_DECODER) += mpeg12.o mpeg12data.o \ - mpegvideo.o error_resilience.o OBJS-$(CONFIG_MPEG_XVMC_DECODER) += mpegvideo_xvmc.o OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o \ mpegvideo.o error_resilience.o @@ -296,6 +299,7 @@ OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o pnm.o +OBJS-$(CONFIG_PRORES_DECODER) += proresdec.o proresdsp.o OBJS-$(CONFIG_PTX_DECODER) += ptx.o OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o celp_math.o \ celp_filters.o acelp_vectors.o \ @@ -324,9 +328,9 @@ OBJS-$(CONFIG_RV10_ENCODER) += rv10enc.o OBJS-$(CONFIG_RV20_DECODER) += rv10.o OBJS-$(CONFIG_RV20_ENCODER) += rv20enc.o -OBJS-$(CONFIG_RV30_DECODER) += rv30.o rv34.o rv30dsp.o \ +OBJS-$(CONFIG_RV30_DECODER) += rv30.o rv34.o rv30dsp.o rv34dsp.o \ mpegvideo.o error_resilience.o -OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o rv40dsp.o \ +OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o rv34dsp.o rv40dsp.o \ mpegvideo.o error_resilience.o OBJS-$(CONFIG_S302M_DECODER) += s302m.o OBJS-$(CONFIG_SGI_DECODER) += sgidec.o @@ -339,12 +343,12 @@ OBJS-$(CONFIG_SMACKAUD_DECODER) += smacker.o OBJS-$(CONFIG_SMACKER_DECODER) += smacker.o OBJS-$(CONFIG_SMC_DECODER) += smc.o -OBJS-$(CONFIG_SNOW_DECODER) += snow.o rangecoder.o -OBJS-$(CONFIG_SNOW_ENCODER) += snow.o rangecoder.o motion_est.o \ - ratecontrol.o h263.o \ - mpegvideo.o error_resilience.o \ - ituh263enc.o mpegvideo_enc.o \ - mpeg12data.o +OBJS-$(CONFIG_SNOW_DECODER) += snowdec.o snow.o rangecoder.o +OBJS-$(CONFIG_SNOW_ENCODER) += snowenc.o snow.o rangecoder.o \ + motion_est.o ratecontrol.o \ + h263.o mpegvideo.o \ + error_resilience.o ituh263enc.o \ + mpegvideo_enc.o mpeg12data.o OBJS-$(CONFIG_SOL_DPCM_DECODER) += dpcm.o OBJS-$(CONFIG_SP5X_DECODER) += sp5xdec.o mjpegdec.o mjpeg.o OBJS-$(CONFIG_SRT_DECODER) += srtdec.o ass.o @@ -378,10 +382,14 @@ OBJS-$(CONFIG_TWINVQ_DECODER) += twinvq.o celp_math.o OBJS-$(CONFIG_TXD_DECODER) += txd.o s3tc.o OBJS-$(CONFIG_ULTI_DECODER) += ulti.o +OBJS-$(CONFIG_UTVIDEO_DECODER) += utvideo.o OBJS-$(CONFIG_V210_DECODER) += v210dec.o OBJS-$(CONFIG_V210_ENCODER) += v210enc.o +OBJS-$(CONFIG_V410_DECODER) += v410dec.o +OBJS-$(CONFIG_V410_ENCODER) += v410enc.o OBJS-$(CONFIG_V210X_DECODER) += v210x.o OBJS-$(CONFIG_VB_DECODER) += vb.o +OBJS-$(CONFIG_VBLE_DECODER) += vble.o OBJS-$(CONFIG_VC1_DECODER) += vc1dec.o vc1.o vc1data.o vc1dsp.o \ msmpeg4.o msmpeg4data.o \ intrax8.o intrax8dsp.o @@ -452,6 +460,7 @@ OBJS-$(CONFIG_PCM_MULAW_ENCODER) += pcm.o OBJS-$(CONFIG_PCM_S8_DECODER) += pcm.o OBJS-$(CONFIG_PCM_S8_ENCODER) += pcm.o +OBJS-$(CONFIG_PCM_S8_PLANAR_DECODER) += 8svx.o OBJS-$(CONFIG_PCM_S16BE_DECODER) += pcm.o OBJS-$(CONFIG_PCM_S16BE_ENCODER) += pcm.o OBJS-$(CONFIG_PCM_S16LE_DECODER) += pcm.o @@ -482,48 +491,48 @@ OBJS-$(CONFIG_PCM_U32LE_DECODER) += pcm.o OBJS-$(CONFIG_PCM_U32LE_ENCODER) += pcm.o OBJS-$(CONFIG_PCM_ZORK_DECODER) += pcm.o -OBJS-$(CONFIG_PCM_ZORK_ENCODER) += pcm.o -OBJS-$(CONFIG_ADPCM_4XM_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_ADX_DECODER) += adxdec.o -OBJS-$(CONFIG_ADPCM_ADX_ENCODER) += adxenc.o -OBJS-$(CONFIG_ADPCM_CT_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_EA_MAXIS_XA_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_EA_R1_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_EA_R2_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_EA_R3_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_EA_XAS_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_G722_DECODER) += g722.o -OBJS-$(CONFIG_ADPCM_G722_ENCODER) += g722.o +OBJS-$(CONFIG_ADPCM_4XM_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_ADX_DECODER) += adxdec.o adx.o +OBJS-$(CONFIG_ADPCM_ADX_ENCODER) += adxenc.o adx.o +OBJS-$(CONFIG_ADPCM_CT_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_EA_MAXIS_XA_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_EA_R1_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_EA_R2_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_EA_R3_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_EA_XAS_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_G722_DECODER) += g722.o g722dec.o +OBJS-$(CONFIG_ADPCM_G722_ENCODER) += g722.o g722enc.o OBJS-$(CONFIG_ADPCM_G726_DECODER) += g726.o OBJS-$(CONFIG_ADPCM_G726_ENCODER) += g726.o -OBJS-$(CONFIG_ADPCM_IMA_AMV_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_IMA_DK3_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_IMA_DK4_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_IMA_EA_EACS_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_IMA_EA_SEAD_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_IMA_ISS_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_IMA_QT_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_IMA_QT_ENCODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_IMA_SMJPEG_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_IMA_WAV_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_IMA_WAV_ENCODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_IMA_WS_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_MS_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_MS_ENCODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_SBPRO_2_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_SBPRO_3_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_SBPRO_4_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_SWF_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_SWF_ENCODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_THP_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_XA_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_YAMAHA_DECODER) += adpcm.o -OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcm.o +OBJS-$(CONFIG_ADPCM_IMA_AMV_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_IMA_DK3_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_IMA_DK4_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_IMA_EA_EACS_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_IMA_EA_SEAD_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_IMA_ISS_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_IMA_QT_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_IMA_QT_ENCODER) += adpcmenc.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_IMA_SMJPEG_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_IMA_WAV_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_IMA_WAV_ENCODER) += adpcmenc.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_IMA_WS_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_MS_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_MS_ENCODER) += adpcmenc.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_SBPRO_2_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_SBPRO_3_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_SBPRO_4_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_SWF_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_SWF_ENCODER) += adpcmenc.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_THP_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_XA_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_YAMAHA_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcmenc.o adpcm_data.o # libavformat dependencies OBJS-$(CONFIG_ADTS_MUXER) += mpeg4audio.o +OBJS-$(CONFIG_ADX_DEMUXER) += adx.o OBJS-$(CONFIG_CAF_DEMUXER) += mpeg4audio.o mpegaudiodata.o OBJS-$(CONFIG_DV_DEMUXER) += dvdata.o OBJS-$(CONFIG_DV_MUXER) += dvdata.o @@ -532,12 +541,14 @@ OBJS-$(CONFIG_FLV_DEMUXER) += mpeg4audio.o OBJS-$(CONFIG_GXF_DEMUXER) += mpeg12data.o OBJS-$(CONFIG_IFF_DEMUXER) += iff.o +OBJS-$(CONFIG_LATM_MUXER) += mpeg4audio.o OBJS-$(CONFIG_MATROSKA_AUDIO_MUXER) += xiph.o mpeg4audio.o \ flacdec.o flacdata.o flac.o OBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio.o mpegaudiodata.o OBJS-$(CONFIG_MATROSKA_MUXER) += xiph.o mpeg4audio.o \ flacdec.o flacdata.o flac.o \ mpegaudiodata.o +OBJS-$(CONFIG_MP3_MUXER) += mpegaudiodata.o mpegaudiodecheader.o OBJS-$(CONFIG_MOV_DEMUXER) += mpeg4audio.o mpegaudiodata.o OBJS-$(CONFIG_MOV_MUXER) += mpeg4audio.o mpegaudiodata.o OBJS-$(CONFIG_MPEGTS_MUXER) += mpegvideo.o mpeg4audio.o @@ -573,6 +584,7 @@ libschroedinger.o \ libdirac_libschro.o OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o +OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o OBJS-$(CONFIG_LIBVO_AACENC_ENCODER) += libvo-aacenc.o mpeg4audio.o OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o @@ -588,6 +600,7 @@ aacadtsdec.o mpeg4audio.o OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o \ aac_ac3_parser.o +OBJS-$(CONFIG_ADX_PARSER) += adx_parser.o adx.o OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o OBJS-$(CONFIG_DIRAC_PARSER) += dirac_parser.o @@ -616,6 +629,8 @@ mpeg12.o mpeg12data.o \ mpegvideo.o error_resilience.o OBJS-$(CONFIG_PNM_PARSER) += pnm_parser.o pnm.o +OBJS-$(CONFIG_RV30_PARSER) += rv34_parser.o +OBJS-$(CONFIG_RV40_PARSER) += rv34_parser.o OBJS-$(CONFIG_VC1_PARSER) += vc1_parser.o vc1.o vc1data.o \ msmpeg4.o msmpeg4data.o mpeg4video.o \ h263.o mpegvideo.o error_resilience.o @@ -641,7 +656,7 @@ # thread libraries OBJS-$(HAVE_PTHREADS) += pthread.o -OBJS-$(HAVE_W32THREADS) += w32thread.o +OBJS-$(HAVE_W32THREADS) += pthread.o OBJS-$(CONFIG_MLIB) += mlib/dsputil_mlib.o \ @@ -651,7 +666,7 @@ # well. OBJS-$(!CONFIG_SMALL) += inverse.o --include $(SUBDIR)$(ARCH)/Makefile +-include $(SRC_PATH)/$(SUBDIR)$(ARCH)/Makefile SKIPHEADERS += %_tablegen.h \ %_tables.h \ @@ -663,12 +678,14 @@ SKIPHEADERS-$(CONFIG_LIBDIRAC) += libdirac.h SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER) += libschroedinger.h SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_internal.h +SKIPHEADERS-$(CONFIG_VDA) += vda.h vda_internal.h SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h +SKIPHEADERS-$(HAVE_W32THREADS) += w32pthreads.h EXAMPLES = api -TESTPROGS = cabac dct fft fft-fixed h264 iirfilter rangecoder snow +TESTPROGS = cabac dct fft fft-fixed h264 iirfilter rangecoder TESTPROGS-$(HAVE_MMX) += motion TESTOBJS = dctref.o @@ -680,8 +697,6 @@ CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF) -include $(SUBDIR)../subdir.mak - $(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o TRIG_TABLES = cos cos_fixed sin diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mathops.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mathops.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mathops.h 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mathops.h 2012-01-11 00:34:30.000000000 +0000 @@ -116,7 +116,9 @@ #ifndef sign_extend static inline av_const int sign_extend(int val, unsigned bits) { - return (val << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits); + unsigned shift = 8 * sizeof(int) - bits; + union { unsigned u; int s; } v = { (unsigned) val << shift }; + return v.s >> shift; } #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mdec.c 2011-05-19 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -265,15 +265,14 @@ } AVCodec ff_mdec_decoder = { - "mdec", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MDEC, - sizeof(MDECContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, + .name = "mdec", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MDEC, + .priv_data_size = sizeof(MDECContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, .long_name= NULL_IF_CONFIG_SMALL("Sony PlayStation MDEC (Motion DECoder)"), .init_thread_copy= ONLY_IF_THREADS_ENABLED(decode_init_thread_copy) }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mimic.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mimic.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mimic.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mimic.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,6 +24,7 @@ #include #include "avcodec.h" +#include "internal.h" #include "get_bits.h" #include "bytestream.h" #include "dsputil.h" @@ -405,7 +406,8 @@ av_free(ctx->swap_buf); - if(avctx->is_copy) return 0; + if (avctx->internal->is_copy) + return 0; for(i = 0; i < 16; i++) if(ctx->buf_ptrs[i].data[0]) @@ -416,15 +418,14 @@ } AVCodec ff_mimic_decoder = { - "mimic", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MIMIC, - sizeof(MimicContext), - mimic_decode_init, - NULL, - mimic_decode_end, - mimic_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, + .name = "mimic", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MIMIC, + .priv_data_size = sizeof(MimicContext), + .init = mimic_decode_init, + .close = mimic_decode_end, + .decode = mimic_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, .long_name = NULL_IF_CONFIG_SMALL("Mimic"), .update_thread_context = ONLY_IF_THREADS_ENABLED(mimic_decode_update_thread_context) }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpeg2jpeg_bsf.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpeg2jpeg_bsf.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpeg2jpeg_bsf.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpeg2jpeg_bsf.c 2012-01-11 00:34:30.000000000 +0000 @@ -108,6 +108,5 @@ AVBitStreamFilter ff_mjpeg2jpeg_bsf = { .name = "mjpeg2jpeg", - .priv_data_size = 0, .filter = mjpeg2jpeg_filter, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpegbdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpegbdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpegbdec.c 2011-03-31 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpegbdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -81,7 +81,9 @@ { init_get_bits(&s->gb, buf_ptr+dqt_offs, (buf_end - (buf_ptr+dqt_offs))*8); s->start_code = DQT; - ff_mjpeg_decode_dqt(s); + if (ff_mjpeg_decode_dqt(s) < 0 && + (avctx->err_recognition & AV_EF_EXPLODE)) + return AVERROR_INVALIDDATA; } dht_offs = read_offs(avctx, &hgb, buf_end - buf_ptr, "dht is %d and size is %d\n"); @@ -113,7 +115,9 @@ init_get_bits(&s->gb, buf_ptr+sos_offs, field_size*8); s->mjpb_skiptosod = (sod_offs - sos_offs - show_bits(&s->gb, 16)); s->start_code = SOS; - ff_mjpeg_decode_sos(s, NULL, NULL); + if (ff_mjpeg_decode_sos(s, NULL, NULL) < 0 && + (avctx->err_recognition & AV_EF_EXPLODE)) + return AVERROR_INVALIDDATA; } if (s->interlaced) { @@ -146,16 +150,14 @@ } AVCodec ff_mjpegb_decoder = { - "mjpegb", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MJPEGB, - sizeof(MJpegDecodeContext), - ff_mjpeg_decode_init, - NULL, - ff_mjpeg_decode_end, - mjpegb_decode_frame, - CODEC_CAP_DR1, - NULL, + .name = "mjpegb", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MJPEGB, + .priv_data_size = sizeof(MJpegDecodeContext), + .init = ff_mjpeg_decode_init, + .close = ff_mjpeg_decode_end, + .decode = mjpegb_decode_frame, + .capabilities = CODEC_CAP_DR1, .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("Apple MJPEG-B"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpegdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpegdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpegdec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpegdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,10 +30,11 @@ * MJPEG decoder. */ -//#define DEBUG +// #define DEBUG #include #include "libavutil/imgutils.h" +#include "libavutil/opt.h" #include "avcodec.h" #include "dsputil.h" #include "mjpeg.h" @@ -41,8 +42,9 @@ #include "jpeglsdec.h" -static int build_vlc(VLC *vlc, const uint8_t *bits_table, const uint8_t *val_table, - int nb_codes, int use_static, int is_ac) +static int build_vlc(VLC *vlc, const uint8_t *bits_table, + const uint8_t *val_table, int nb_codes, + int use_static, int is_ac) { uint8_t huff_size[256]; uint16_t huff_code[256]; @@ -54,15 +56,18 @@ memset(huff_size, 0, sizeof(huff_size)); ff_mjpeg_build_huffman_codes(huff_size, huff_code, bits_table, val_table); - for(i=0; i<256; i++) - huff_sym[i]= i + 16*is_ac; + for (i = 0; i < 256; i++) + huff_sym[i] = i + 16 * is_ac; - if(is_ac) huff_sym[0]= 16*256; + if (is_ac) + huff_sym[0] = 16 * 256; - return init_vlc_sparse(vlc, 9, nb_codes, huff_size, 1, 1, huff_code, 2, 2, huff_sym, 2, 2, use_static); + return init_vlc_sparse(vlc, 9, nb_codes, huff_size, 1, 1, + huff_code, 2, 2, huff_sym, 2, 2, use_static); } -static void build_basic_mjpeg_vlc(MJpegDecodeContext * s) { +static void build_basic_mjpeg_vlc(MJpegDecodeContext *s) +{ build_vlc(&s->vlcs[0][0], ff_mjpeg_bits_dc_luminance, ff_mjpeg_val_dc, 12, 0, 0); build_vlc(&s->vlcs[0][1], ff_mjpeg_bits_dc_chrominance, @@ -87,30 +92,31 @@ s->avctx = avctx; dsputil_init(&s->dsp, avctx); ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct); - s->buffer_size = 0; - s->buffer = NULL; - s->start_code = -1; + s->buffer_size = 0; + s->buffer = NULL; + s->start_code = -1; s->first_picture = 1; - s->org_height = avctx->coded_height; + s->org_height = avctx->coded_height; avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; build_basic_mjpeg_vlc(s); +#if FF_API_MJPEG_GLOBAL_OPTS if (avctx->flags & CODEC_FLAG_EXTERN_HUFF) - { + s->extern_huff = 1; +#endif + if (s->extern_huff) { av_log(avctx, AV_LOG_INFO, "mjpeg: using external huffman table\n"); - init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size*8); + init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size * 8); if (ff_mjpeg_decode_dht(s)) { - av_log(avctx, AV_LOG_ERROR, "mjpeg: error using external huffman table, switching back to internal\n"); - build_basic_mjpeg_vlc(s); + av_log(avctx, AV_LOG_ERROR, + "mjpeg: error using external huffman table\n"); + return AVERROR_INVALIDDATA; } } - if (avctx->extradata_size > 9 && - AV_RL32(avctx->extradata + 4) == MKTAG('f','i','e','l')) { - if (avctx->extradata[9] == 6) { /* quicktime icefloe 019 */ - s->interlace_polarity = 1; /* bottom field first */ - av_log(avctx, AV_LOG_DEBUG, "mjpeg bottom field first\n"); - } + if (avctx->field_order == AV_FIELD_BB) { /* quicktime icefloe 019 */ + s->interlace_polarity = 1; /* bottom field first */ + av_log(avctx, AV_LOG_DEBUG, "mjpeg bottom field first\n"); } if (avctx->codec->id == CODEC_ID_AMV) s->flipped = 1; @@ -128,8 +134,7 @@ while (len >= 65) { /* only 8 bit precision handled */ - if (get_bits(&s->gb, 4) != 0) - { + if (get_bits(&s->gb, 4) != 0) { av_log(s->avctx, AV_LOG_ERROR, "dqt: 16bit precision\n"); return -1; } @@ -138,19 +143,18 @@ return -1; av_log(s->avctx, AV_LOG_DEBUG, "index=%d\n", index); /* read quant table */ - for(i=0;i<64;i++) { + for (i = 0; i < 64; i++) { j = s->scantable.permutated[i]; s->quant_matrixes[index][j] = get_bits(&s->gb, 8); } - //XXX FIXME finetune, and perhaps add dc too - s->qscale[index]= FFMAX( - s->quant_matrixes[index][s->scantable.permutated[1]], - s->quant_matrixes[index][s->scantable.permutated[8]]) >> 1; - av_log(s->avctx, AV_LOG_DEBUG, "qscale[%d]: %d\n", index, s->qscale[index]); + // XXX FIXME finetune, and perhaps add dc too + s->qscale[index] = FFMAX(s->quant_matrixes[index][s->scantable.permutated[1]], + s->quant_matrixes[index][s->scantable.permutated[8]]) >> 1; + av_log(s->avctx, AV_LOG_DEBUG, "qscale[%d]: %d\n", + index, s->qscale[index]); len -= 65; } - return 0; } @@ -173,7 +177,7 @@ if (index >= 4) return -1; n = 0; - for(i=1;i<=16;i++) { + for (i = 1; i <= 16; i++) { bits_table[i] = get_bits(&s->gb, 8); n += bits_table[i]; } @@ -182,7 +186,7 @@ return -1; code_max = 0; - for(i=0;igb, 8); if (v > code_max) code_max = v; @@ -194,15 +198,15 @@ free_vlc(&s->vlcs[class][index]); av_log(s->avctx, AV_LOG_DEBUG, "class=%d index=%d nb_codes=%d\n", class, index, code_max + 1); - if(build_vlc(&s->vlcs[class][index], bits_table, val_table, code_max + 1, 0, class > 0) < 0){ + if (build_vlc(&s->vlcs[class][index], bits_table, val_table, + code_max + 1, 0, class > 0) < 0) return -1; - } - if(class>0){ + if (class > 0) { free_vlc(&s->vlcs[2][index]); - if(build_vlc(&s->vlcs[2][index], bits_table, val_table, code_max + 1, 0, 0) < 0){ - return -1; - } + if (build_vlc(&s->vlcs[2][index], bits_table, val_table, + code_max + 1, 0, 0) < 0) + return -1; } } return 0; @@ -213,44 +217,47 @@ int len, nb_components, i, width, height, pix_fmt_id; /* XXX: verify len field validity */ - len = get_bits(&s->gb, 16); - s->bits= get_bits(&s->gb, 8); + len = get_bits(&s->gb, 16); + s->bits = get_bits(&s->gb, 8); - if(s->pegasus_rct) s->bits=9; - if(s->bits==9 && !s->pegasus_rct) s->rct=1; //FIXME ugly + if (s->pegasus_rct) + s->bits = 9; + if (s->bits == 9 && !s->pegasus_rct) + s->rct = 1; // FIXME ugly - if (s->bits != 8 && !s->lossless){ + if (s->bits != 8 && !s->lossless) { av_log(s->avctx, AV_LOG_ERROR, "only 8 bits/component accepted\n"); return -1; } height = get_bits(&s->gb, 16); - width = get_bits(&s->gb, 16); + width = get_bits(&s->gb, 16); - //HACK for odd_height.mov - if(s->interlaced && s->width == width && s->height == height + 1) + // HACK for odd_height.mov + if (s->interlaced && s->width == width && s->height == height + 1) height= s->height; av_log(s->avctx, AV_LOG_DEBUG, "sof0: picture: %dx%d\n", width, height); - if(av_image_check_size(width, height, 0, s->avctx)) + if (av_image_check_size(width, height, 0, s->avctx)) return -1; nb_components = get_bits(&s->gb, 8); if (nb_components <= 0 || nb_components > MAX_COMPONENTS) return -1; - if (s->ls && !(s->bits <= 8 || nb_components == 1)){ - av_log(s->avctx, AV_LOG_ERROR, "only <= 8 bits/component or 16-bit gray accepted for JPEG-LS\n"); + if (s->ls && !(s->bits <= 8 || nb_components == 1)) { + av_log(s->avctx, AV_LOG_ERROR, + "only <= 8 bits/component or 16-bit gray accepted for JPEG-LS\n"); return -1; } s->nb_components = nb_components; - s->h_max = 1; - s->v_max = 1; - for(i=0;ih_max = 1; + s->v_max = 1; + for (i = 0; i < nb_components; i++) { /* component id */ s->component_id[i] = get_bits(&s->gb, 8) - 1; - s->h_count[i] = get_bits(&s->gb, 4); - s->v_count[i] = get_bits(&s->gb, 4); + s->h_count[i] = get_bits(&s->gb, 4); + s->v_count[i] = get_bits(&s->gb, 4); /* compute hmax and vmax (only used in interleaved case) */ if (s->h_count[i] > s->h_max) s->h_max = s->h_count[i]; @@ -259,45 +266,47 @@ s->quant_index[i] = get_bits(&s->gb, 8); if (s->quant_index[i] >= 4) return -1; - av_log(s->avctx, AV_LOG_DEBUG, "component %d %d:%d id: %d quant:%d\n", i, s->h_count[i], - s->v_count[i], s->component_id[i], s->quant_index[i]); + av_log(s->avctx, AV_LOG_DEBUG, "component %d %d:%d id: %d quant:%d\n", + i, s->h_count[i], s->v_count[i], + s->component_id[i], s->quant_index[i]); } - if(s->ls && (s->h_max > 1 || s->v_max > 1)) { - av_log(s->avctx, AV_LOG_ERROR, "Subsampling in JPEG-LS is not supported.\n"); + if (s->ls && (s->h_max > 1 || s->v_max > 1)) { + av_log(s->avctx, AV_LOG_ERROR, + "Subsampling in JPEG-LS is not supported.\n"); return -1; } - if(s->v_max==1 && s->h_max==1 && s->lossless==1) s->rgb=1; + if (s->v_max == 1 && s->h_max == 1 && s->lossless == 1) + s->rgb = 1; /* if different size, realloc/alloc picture */ /* XXX: also check h_count and v_count */ if (width != s->width || height != s->height) { av_freep(&s->qscale_table); - s->width = width; - s->height = height; + s->width = width; + s->height = height; s->interlaced = 0; /* test interlaced mode */ - if (s->first_picture && + if (s->first_picture && s->org_height != 0 && s->height < ((s->org_height * 3) / 4)) { - s->interlaced = 1; - s->bottom_field = s->interlace_polarity; + s->interlaced = 1; + s->bottom_field = s->interlace_polarity; s->picture_ptr->interlaced_frame = 1; - s->picture_ptr->top_field_first = !s->interlace_polarity; + s->picture_ptr->top_field_first = !s->interlace_polarity; height *= 2; } avcodec_set_dimensions(s->avctx, width, height); - s->qscale_table= av_mallocz((s->width+15)/16); - + s->qscale_table = av_mallocz((s->width + 15) / 16); s->first_picture = 0; } - if(s->interlaced && (s->bottom_field == !s->interlace_polarity)) + if (s->interlaced && (s->bottom_field == !s->interlace_polarity)) return 0; /* XXX: not complete test ! */ @@ -306,19 +315,20 @@ (s->h_count[2] << 12) | (s->v_count[2] << 8) | (s->h_count[3] << 4) | s->v_count[3]; av_log(s->avctx, AV_LOG_DEBUG, "pix fmt id %x\n", pix_fmt_id); - //NOTE we do not allocate pictures large enough for the possible padding of h/v_count being 4 - if(!(pix_fmt_id & 0xD0D0D0D0)) - pix_fmt_id-= (pix_fmt_id & 0xF0F0F0F0)>>1; - if(!(pix_fmt_id & 0x0D0D0D0D)) - pix_fmt_id-= (pix_fmt_id & 0x0F0F0F0F)>>1; + /* NOTE we do not allocate pictures large enough for the possible + * padding of h/v_count being 4 */ + if (!(pix_fmt_id & 0xD0D0D0D0)) + pix_fmt_id -= (pix_fmt_id & 0xF0F0F0F0) >> 1; + if (!(pix_fmt_id & 0x0D0D0D0D)) + pix_fmt_id -= (pix_fmt_id & 0x0F0F0F0F) >> 1; - switch(pix_fmt_id){ + switch (pix_fmt_id) { case 0x11111100: - if(s->rgb){ + if (s->rgb) s->avctx->pix_fmt = PIX_FMT_BGRA; - }else + else s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV444P : PIX_FMT_YUVJ444P; - assert(s->nb_components==3); + assert(s->nb_components == 3); break; case 0x11000000: s->avctx->pix_fmt = PIX_FMT_GRAY8; @@ -336,47 +346,46 @@ av_log(s->avctx, AV_LOG_ERROR, "Unhandled pixel format 0x%x\n", pix_fmt_id); return -1; } - if(s->ls){ - if(s->nb_components > 1) + if (s->ls) { + if (s->nb_components > 1) s->avctx->pix_fmt = PIX_FMT_RGB24; - else if(s->bits <= 8) + else if (s->bits <= 8) s->avctx->pix_fmt = PIX_FMT_GRAY8; else s->avctx->pix_fmt = PIX_FMT_GRAY16; } - if(s->picture_ptr->data[0]) + if (s->picture_ptr->data[0]) s->avctx->release_buffer(s->avctx, s->picture_ptr); - if(s->avctx->get_buffer(s->avctx, s->picture_ptr) < 0){ + if (s->avctx->get_buffer(s->avctx, s->picture_ptr) < 0) { av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return -1; } - s->picture_ptr->pict_type= AV_PICTURE_TYPE_I; - s->picture_ptr->key_frame= 1; - s->got_picture = 1; + s->picture_ptr->pict_type = AV_PICTURE_TYPE_I; + s->picture_ptr->key_frame = 1; + s->got_picture = 1; + + for (i = 0; i < 3; i++) + s->linesize[i] = s->picture_ptr->linesize[i] << s->interlaced; + +// printf("%d %d %d %d %d %d\n", +// s->width, s->height, s->linesize[0], s->linesize[1], +// s->interlaced, s->avctx->height); - for(i=0; i<3; i++){ - s->linesize[i]= s->picture_ptr->linesize[i] << s->interlaced; - } - -// printf("%d %d %d %d %d %d\n", s->width, s->height, s->linesize[0], s->linesize[1], s->interlaced, s->avctx->height); - - if (len != (8+(3*nb_components))) - { + if (len != (8 + (3 * nb_components))) av_log(s->avctx, AV_LOG_DEBUG, "decode_sof0: error, len(%d) mismatch\n", len); - } /* totally blank picture as progressive JPEG will only add details to it */ - if(s->progressive){ - int bw = (width + s->h_max*8-1) / (s->h_max*8); - int bh = (height + s->v_max*8-1) / (s->v_max*8); - for(i=0; inb_components; i++) { + if (s->progressive) { + int bw = (width + s->h_max * 8 - 1) / (s->h_max * 8); + int bh = (height + s->v_max * 8 - 1) / (s->v_max * 8); + for (i = 0; i < s->nb_components; i++) { int size = bw * bh * s->h_count[i] * s->v_count[i]; av_freep(&s->blocks[i]); av_freep(&s->last_nnz[i]); - s->blocks[i] = av_malloc(size * sizeof(**s->blocks)); - s->last_nnz[i] = av_mallocz(size * sizeof(**s->last_nnz)); + s->blocks[i] = av_malloc(size * sizeof(**s->blocks)); + s->last_nnz[i] = av_mallocz(size * sizeof(**s->last_nnz)); s->block_stride[i] = bw * s->h_count[i]; } memset(s->coefs_finished, 0, sizeof(s->coefs_finished)); @@ -388,22 +397,22 @@ { int code; code = get_vlc2(&s->gb, s->vlcs[0][dc_index].table, 9, 2); - if (code < 0) - { - av_log(s->avctx, AV_LOG_WARNING, "mjpeg_decode_dc: bad vlc: %d:%d (%p)\n", 0, dc_index, - &s->vlcs[0][dc_index]); + if (code < 0) { + av_log(s->avctx, AV_LOG_WARNING, + "mjpeg_decode_dc: bad vlc: %d:%d (%p)\n", + 0, dc_index, &s->vlcs[0][dc_index]); return 0xffff; } - if(code) + if (code) return get_xbits(&s->gb, code); else return 0; } /* decode block and dequantize */ -static int decode_block(MJpegDecodeContext *s, DCTELEM *block, - int component, int dc_index, int ac_index, int16_t *quant_matrix) +static int decode_block(MJpegDecodeContext *s, DCTELEM *block, int component, + int dc_index, int ac_index, int16_t *quant_matrix) { int code, i, j, level, val; @@ -425,14 +434,14 @@ i += ((unsigned)code) >> 4; code &= 0xf; - if(code){ - if(code > MIN_CACHE_BITS - 16){ + if (code) { + if (code > MIN_CACHE_BITS - 16) UPDATE_CACHE(re, &s->gb); - } + { - int cache=GET_CACHE(re,&s->gb); - int sign=(~cache)>>31; - level = (NEG_USR32(sign ^ cache,code) ^ sign) - sign; + int cache = GET_CACHE(re, &s->gb); + int sign = (~cache) >> 31; + level = (NEG_USR32(sign ^ cache,code) ^ sign) - sign; } LAST_SKIP_BITS(re, &s->gb, code); @@ -441,17 +450,18 @@ av_log(s->avctx, AV_LOG_ERROR, "error count: %d\n", i); return -1; } - j = s->scantable.permutated[i]; + j = s->scantable.permutated[i]; block[j] = level * quant_matrix[j]; } - }while(i<63); + } while (i < 63); CLOSE_READER(re, &s->gb);} return 0; } -static int decode_dc_progressive(MJpegDecodeContext *s, DCTELEM *block, int component, - int dc_index, int16_t *quant_matrix, int Al) +static int decode_dc_progressive(MJpegDecodeContext *s, DCTELEM *block, + int component, int dc_index, + int16_t *quant_matrix, int Al) { int val; s->dsp.clear_block(block); @@ -467,113 +477,121 @@ } /* decode block and dequantize - progressive JPEG version */ -static int decode_block_progressive(MJpegDecodeContext *s, DCTELEM *block, uint8_t *last_nnz, - int ac_index, int16_t *quant_matrix, +static int decode_block_progressive(MJpegDecodeContext *s, DCTELEM *block, + uint8_t *last_nnz, int ac_index, + int16_t *quant_matrix, int ss, int se, int Al, int *EOBRUN) { int code, i, j, level, val, run; - if(*EOBRUN){ + if (*EOBRUN) { (*EOBRUN)--; return 0; } - {OPEN_READER(re, &s->gb); - for(i=ss;;i++) { - UPDATE_CACHE(re, &s->gb); - GET_VLC(code, re, &s->gb, s->vlcs[2][ac_index].table, 9, 2); - run = ((unsigned) code) >> 4; - code &= 0xF; - if(code) { - i += run; - if(code > MIN_CACHE_BITS - 16){ - UPDATE_CACHE(re, &s->gb); - } - { - int cache=GET_CACHE(re,&s->gb); - int sign=(~cache)>>31; - level = (NEG_USR32(sign ^ cache,code) ^ sign) - sign; - } + { + OPEN_READER(re, &s->gb); + for (i = ss; ; i++) { + UPDATE_CACHE(re, &s->gb); + GET_VLC(code, re, &s->gb, s->vlcs[2][ac_index].table, 9, 2); - LAST_SKIP_BITS(re, &s->gb, code); + run = ((unsigned) code) >> 4; + code &= 0xF; + if (code) { + i += run; + if (code > MIN_CACHE_BITS - 16) + UPDATE_CACHE(re, &s->gb); - if (i >= se) { - if(i == se){ - j = s->scantable.permutated[se]; - block[j] = level * quant_matrix[j] << Al; - break; + { + int cache = GET_CACHE(re, &s->gb); + int sign = (~cache) >> 31; + level = (NEG_USR32(sign ^ cache,code) ^ sign) - sign; } - av_log(s->avctx, AV_LOG_ERROR, "error count: %d\n", i); - return -1; - } - j = s->scantable.permutated[i]; - block[j] = level * quant_matrix[j] << Al; - }else{ - if(run == 0xF){// ZRL - skip 15 coefficients - i += 15; + + LAST_SKIP_BITS(re, &s->gb, code); + if (i >= se) { - av_log(s->avctx, AV_LOG_ERROR, "ZRL overflow: %d\n", i); + if (i == se) { + j = s->scantable.permutated[se]; + block[j] = level * quant_matrix[j] << Al; + break; + } + av_log(s->avctx, AV_LOG_ERROR, "error count: %d\n", i); return -1; } - }else{ - val = (1 << run); - if(run){ - UPDATE_CACHE(re, &s->gb); - val += NEG_USR32(GET_CACHE(re, &s->gb), run); - LAST_SKIP_BITS(re, &s->gb, run); + j = s->scantable.permutated[i]; + block[j] = level * quant_matrix[j] << Al; + } else { + if (run == 0xF) {// ZRL - skip 15 coefficients + i += 15; + if (i >= se) { + av_log(s->avctx, AV_LOG_ERROR, "ZRL overflow: %d\n", i); + return -1; + } + } else { + val = (1 << run); + if (run) { + UPDATE_CACHE(re, &s->gb); + val += NEG_USR32(GET_CACHE(re, &s->gb), run); + LAST_SKIP_BITS(re, &s->gb, run); + } + *EOBRUN = val - 1; + break; } - *EOBRUN = val - 1; - break; } } + CLOSE_READER(re, &s->gb); } - CLOSE_READER(re, &s->gb);} - if(i > *last_nnz) + + if (i > *last_nnz) *last_nnz = i; + return 0; } -#define REFINE_BIT(j) {\ - UPDATE_CACHE(re, &s->gb);\ - sign = block[j]>>15;\ - block[j] += SHOW_UBITS(re, &s->gb, 1) * ((quant_matrix[j]^sign)-sign) << Al;\ - LAST_SKIP_BITS(re, &s->gb, 1);\ -} - -#define ZERO_RUN \ -for(;;i++) {\ - if(i > last) {\ - i += run;\ - if(i > se) {\ - av_log(s->avctx, AV_LOG_ERROR, "error count: %d\n", i);\ - return -1;\ - }\ - break;\ - }\ - j = s->scantable.permutated[i];\ - if(block[j])\ - REFINE_BIT(j)\ - else if(run-- == 0)\ - break;\ +#define REFINE_BIT(j) { \ + UPDATE_CACHE(re, &s->gb); \ + sign = block[j] >> 15; \ + block[j] += SHOW_UBITS(re, &s->gb, 1) * \ + ((quant_matrix[j] ^ sign) - sign) << Al; \ + LAST_SKIP_BITS(re, &s->gb, 1); \ +} + +#define ZERO_RUN \ +for (; ; i++) { \ + if (i > last) { \ + i += run; \ + if (i > se) { \ + av_log(s->avctx, AV_LOG_ERROR, "error count: %d\n", i); \ + return -1; \ + } \ + break; \ + } \ + j = s->scantable.permutated[i]; \ + if (block[j]) \ + REFINE_BIT(j) \ + else if (run-- == 0) \ + break; \ } /* decode block and dequantize - progressive JPEG refinement pass */ -static int decode_block_refinement(MJpegDecodeContext *s, DCTELEM *block, uint8_t *last_nnz, - int ac_index, int16_t *quant_matrix, - int ss, int se, int Al, int *EOBRUN) +static int decode_block_refinement(MJpegDecodeContext *s, DCTELEM *block, + uint8_t *last_nnz, + int ac_index, int16_t *quant_matrix, + int ss, int se, int Al, int *EOBRUN) { - int code, i=ss, j, sign, val, run; - int last = FFMIN(se, *last_nnz); + int code, i = ss, j, sign, val, run; + int last = FFMIN(se, *last_nnz); OPEN_READER(re, &s->gb); - if(*EOBRUN) + if (*EOBRUN) { (*EOBRUN)--; - else { - for(;;i++) { + } else { + for (; ; i++) { UPDATE_CACHE(re, &s->gb); GET_VLC(code, re, &s->gb, s->vlcs[2][ac_index].table, 9, 2); - if(code & 0xF) { + if (code & 0xF) { run = ((unsigned) code) >> 4; UPDATE_CACHE(re, &s->gb); val = SHOW_UBITS(re, &s->gb, 1); @@ -581,21 +599,21 @@ ZERO_RUN; j = s->scantable.permutated[i]; val--; - block[j] = ((quant_matrix[j]^val)-val) << Al; - if(i == se) { - if(i > *last_nnz) + block[j] = ((quant_matrix[j]^val) - val) << Al; + if (i == se) { + if (i > *last_nnz) *last_nnz = i; CLOSE_READER(re, &s->gb); return 0; } - }else{ + } else { run = ((unsigned) code) >> 4; - if(run == 0xF){ + if (run == 0xF) { ZERO_RUN; - }else{ + } else { val = run; run = (1 << run); - if(val) { + if (val) { UPDATE_CACHE(re, &s->gb); run += SHOW_UBITS(re, &s->gb, val); LAST_SKIP_BITS(re, &s->gb, val); @@ -606,13 +624,13 @@ } } - if(i > *last_nnz) + if (i > *last_nnz) *last_nnz = i; } - for(;i<=last;i++) { + for (; i <= last; i++) { j = s->scantable.permutated[i]; - if(block[j]) + if (block[j]) REFINE_BIT(j) } CLOSE_READER(re, &s->gb); @@ -622,43 +640,46 @@ #undef REFINE_BIT #undef ZERO_RUN -static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int predictor, int point_transform){ +static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int predictor, + int point_transform) +{ int i, mb_x, mb_y; uint16_t (*buffer)[4]; int left[3], top[3], topleft[3]; - const int linesize= s->linesize[0]; - const int mask= (1<bits)-1; + const int linesize = s->linesize[0]; + const int mask = (1 << s->bits) - 1; - av_fast_malloc(&s->ljpeg_buffer, &s->ljpeg_buffer_size, (unsigned)s->mb_width * 4 * sizeof(s->ljpeg_buffer[0][0])); - buffer= s->ljpeg_buffer; + av_fast_malloc(&s->ljpeg_buffer, &s->ljpeg_buffer_size, + (unsigned)s->mb_width * 4 * sizeof(s->ljpeg_buffer[0][0])); + buffer = s->ljpeg_buffer; - for(i=0; i<3; i++){ - buffer[0][i]= 1 << (s->bits + point_transform - 1); - } - for(mb_y = 0; mb_y < s->mb_height; mb_y++) { - const int modified_predictor= mb_y ? predictor : 1; + for (i = 0; i < 3; i++) + buffer[0][i] = 1 << (s->bits + point_transform - 1); + + for (mb_y = 0; mb_y < s->mb_height; mb_y++) { + const int modified_predictor = mb_y ? predictor : 1; uint8_t *ptr = s->picture_ptr->data[0] + (linesize * mb_y); if (s->interlaced && s->bottom_field) ptr += linesize >> 1; - for(i=0; i<3; i++){ - top[i]= left[i]= topleft[i]= buffer[0][i]; - } - for(mb_x = 0; mb_x < s->mb_width; mb_x++) { + for (i = 0; i < 3; i++) + top[i] = left[i] = topleft[i] = buffer[0][i]; + + for (mb_x = 0; mb_x < s->mb_width; mb_x++) { if (s->restart_interval && !s->restart_count) s->restart_count = s->restart_interval; - for(i=0;i<3;i++) { + for (i = 0; i < 3; i++) { int pred; - topleft[i]= top[i]; - top[i]= buffer[mb_x][i]; + topleft[i] = top[i]; + top[i] = buffer[mb_x][i]; PREDICT(pred, topleft[i], top[i], left[i], modified_predictor); - left[i]= - buffer[mb_x][i]= mask & (pred + (mjpeg_decode_dc(s, s->dc_index[i]) << point_transform)); + left[i] = buffer[mb_x][i] = + mask & (pred + (mjpeg_decode_dc(s, s->dc_index[i]) << point_transform)); } if (s->restart_interval && !--s->restart_count) { @@ -667,71 +688,74 @@ } } - if(s->rct){ - for(mb_x = 0; mb_x < s->mb_width; mb_x++) { - ptr[4*mb_x+1] = buffer[mb_x][0] - ((buffer[mb_x][1] + buffer[mb_x][2] - 0x200)>>2); - ptr[4*mb_x+0] = buffer[mb_x][1] + ptr[4*mb_x+1]; - ptr[4*mb_x+2] = buffer[mb_x][2] + ptr[4*mb_x+1]; - } - }else if(s->pegasus_rct){ - for(mb_x = 0; mb_x < s->mb_width; mb_x++) { - ptr[4*mb_x+1] = buffer[mb_x][0] - ((buffer[mb_x][1] + buffer[mb_x][2])>>2); - ptr[4*mb_x+0] = buffer[mb_x][1] + ptr[4*mb_x+1]; - ptr[4*mb_x+2] = buffer[mb_x][2] + ptr[4*mb_x+1]; - } - }else{ - for(mb_x = 0; mb_x < s->mb_width; mb_x++) { - ptr[4*mb_x+0] = buffer[mb_x][2]; - ptr[4*mb_x+1] = buffer[mb_x][1]; - ptr[4*mb_x+2] = buffer[mb_x][0]; + if (s->rct) { + for (mb_x = 0; mb_x < s->mb_width; mb_x++) { + ptr[4 * mb_x + 1] = buffer[mb_x][0] - ((buffer[mb_x][1] + buffer[mb_x][2] - 0x200) >> 2); + ptr[4 * mb_x + 0] = buffer[mb_x][1] + ptr[4 * mb_x + 1]; + ptr[4 * mb_x + 2] = buffer[mb_x][2] + ptr[4 * mb_x + 1]; + } + } else if (s->pegasus_rct) { + for (mb_x = 0; mb_x < s->mb_width; mb_x++) { + ptr[4 * mb_x + 1] = buffer[mb_x][0] - ((buffer[mb_x][1] + buffer[mb_x][2]) >> 2); + ptr[4 * mb_x + 0] = buffer[mb_x][1] + ptr[4 * mb_x + 1]; + ptr[4 * mb_x + 2] = buffer[mb_x][2] + ptr[4 * mb_x + 1]; + } + } else { + for (mb_x = 0; mb_x < s->mb_width; mb_x++) { + ptr[4 * mb_x + 0] = buffer[mb_x][2]; + ptr[4 * mb_x + 1] = buffer[mb_x][1]; + ptr[4 * mb_x + 2] = buffer[mb_x][0]; } } } return 0; } -static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor, int point_transform){ +static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor, + int point_transform) +{ int i, mb_x, mb_y; - const int nb_components=3; + const int nb_components = 3; - for(mb_y = 0; mb_y < s->mb_height; mb_y++) { - for(mb_x = 0; mb_x < s->mb_width; mb_x++) { + for (mb_y = 0; mb_y < s->mb_height; mb_y++) { + for (mb_x = 0; mb_x < s->mb_width; mb_x++) { if (s->restart_interval && !s->restart_count) s->restart_count = s->restart_interval; - if(mb_x==0 || mb_y==0 || s->interlaced){ - for(i=0;iinterlaced) { + for (i = 0; i < nb_components; i++) { uint8_t *ptr; int n, h, v, x, y, c, j, linesize; - n = s->nb_blocks[i]; - c = s->comp_index[i]; - h = s->h_scount[i]; - v = s->v_scount[i]; - x = 0; - y = 0; - linesize= s->linesize[c]; + n = s->nb_blocks[i]; + c = s->comp_index[i]; + h = s->h_scount[i]; + v = s->v_scount[i]; + x = 0; + y = 0; + linesize = s->linesize[c]; - for(j=0; jpicture_ptr->data[c] + (linesize * (v * mb_y + y)) + (h * mb_x + x); //FIXME optimize this crap - if(y==0 && mb_y==0){ - if(x==0 && mb_x==0){ - pred= 128 << point_transform; - }else{ - pred= ptr[-1]; - } - }else{ - if(x==0 && mb_x==0){ - pred= ptr[-linesize]; - }else{ - PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor); - } - } + // FIXME optimize this crap + ptr = s->picture_ptr->data[c] + + (linesize * (v * mb_y + y)) + + (h * mb_x + x); + if (y == 0 && mb_y == 0) { + if (x == 0 && mb_x == 0) + pred = 128 << point_transform; + else + pred = ptr[-1]; + } else { + if (x == 0 && mb_x == 0) + pred = ptr[-linesize]; + else + PREDICT(pred, ptr[-linesize - 1], + ptr[-linesize], ptr[-1], predictor); + } if (s->interlaced && s->bottom_field) ptr += linesize >> 1; - *ptr= pred + (mjpeg_decode_dc(s, s->dc_index[i]) << point_transform); + *ptr = pred + (mjpeg_decode_dc(s, s->dc_index[i]) << point_transform); if (++x == h) { x = 0; @@ -739,24 +763,28 @@ } } } - }else{ - for(i=0;inb_blocks[i]; - c = s->comp_index[i]; - h = s->h_scount[i]; - v = s->v_scount[i]; - x = 0; - y = 0; - linesize= s->linesize[c]; + n = s->nb_blocks[i]; + c = s->comp_index[i]; + h = s->h_scount[i]; + v = s->v_scount[i]; + x = 0; + y = 0; + linesize = s->linesize[c]; - for(j=0; jpicture_ptr->data[c] + (linesize * (v * mb_y + y)) + (h * mb_x + x); //FIXME optimize this crap - PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor); - *ptr= pred + (mjpeg_decode_dc(s, s->dc_index[i]) << point_transform); + // FIXME optimize this crap + ptr = s->picture_ptr->data[c] + + (linesize * (v * mb_y + y)) + + (h * mb_x + x); + PREDICT(pred, ptr[-linesize - 1], + ptr[-linesize], ptr[-1], predictor); + *ptr = pred + (mjpeg_decode_dc(s, s->dc_index[i]) << point_transform); if (++x == h) { x = 0; y++; @@ -788,49 +816,54 @@ } } -static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, int Al, - const uint8_t *mb_bitmask, const AVFrame *reference){ +static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, + int Al, const uint8_t *mb_bitmask, + const AVFrame *reference) +{ int i, mb_x, mb_y; - uint8_t* data[MAX_COMPONENTS]; + uint8_t *data[MAX_COMPONENTS]; const uint8_t *reference_data[MAX_COMPONENTS]; int linesize[MAX_COMPONENTS]; GetBitContext mb_bitmask_gb; - if (mb_bitmask) { - init_get_bits(&mb_bitmask_gb, mb_bitmask, s->mb_width*s->mb_height); - } + if (mb_bitmask) + init_get_bits(&mb_bitmask_gb, mb_bitmask, s->mb_width * s->mb_height); - if(s->flipped && s->avctx->flags & CODEC_FLAG_EMU_EDGE) { - av_log(s->avctx, AV_LOG_ERROR, "Can not flip image with CODEC_FLAG_EMU_EDGE set!\n"); + if (s->flipped && s->avctx->flags & CODEC_FLAG_EMU_EDGE) { + av_log(s->avctx, AV_LOG_ERROR, + "Can not flip image with CODEC_FLAG_EMU_EDGE set!\n"); s->flipped = 0; } - for(i=0; i < nb_components; i++) { - int c = s->comp_index[i]; + + for (i = 0; i < nb_components; i++) { + int c = s->comp_index[i]; data[c] = s->picture_ptr->data[c]; reference_data[c] = reference ? reference->data[c] : NULL; - linesize[c]=s->linesize[c]; + linesize[c] = s->linesize[c]; s->coefs_finished[c] |= 1; - if(s->flipped) { - //picture should be flipped upside-down for this codec - int offset = (linesize[c] * (s->v_scount[i] * (8 * s->mb_height -((s->height/s->v_max)&7)) - 1 )); - data[c] += offset; + if (s->flipped) { + // picture should be flipped upside-down for this codec + int offset = (linesize[c] * (s->v_scount[i] * + (8 * s->mb_height - ((s->height / s->v_max) & 7)) - 1)); + data[c] += offset; reference_data[c] += offset; - linesize[c] *= -1; + linesize[c] *= -1; } } - for(mb_y = 0; mb_y < s->mb_height; mb_y++) { - for(mb_x = 0; mb_x < s->mb_width; mb_x++) { + for (mb_y = 0; mb_y < s->mb_height; mb_y++) { + for (mb_x = 0; mb_x < s->mb_width; mb_x++) { const int copy_mb = mb_bitmask && !get_bits1(&mb_bitmask_gb); if (s->restart_interval && !s->restart_count) s->restart_count = s->restart_interval; - if(get_bits_count(&s->gb)>s->gb.size_in_bits){ - av_log(s->avctx, AV_LOG_ERROR, "overread %d\n", get_bits_count(&s->gb) - s->gb.size_in_bits); + if (get_bits_count(&s->gb)>s->gb.size_in_bits) { + av_log(s->avctx, AV_LOG_ERROR, "overread %d\n", + get_bits_count(&s->gb) - s->gb.size_in_bits); return -1; } - for(i=0;iv_scount[i]; x = 0; y = 0; - for(j=0;j> s->avctx->lowres); - if(s->interlaced && s->bottom_field) + if (s->interlaced && s->bottom_field) block_offset += linesize[c] >> 1; ptr = data[c] + block_offset; - if(!s->progressive) { - if (copy_mb) { - mjpeg_copy_block(ptr, reference_data[c] + block_offset, linesize[c], s->avctx->lowres); - } else { - s->dsp.clear_block(s->block); - if(decode_block(s, s->block, i, - s->dc_index[i], s->ac_index[i], - s->quant_matrixes[ s->quant_index[c] ]) < 0) { - av_log(s->avctx, AV_LOG_ERROR, "error y=%d x=%d\n", mb_y, mb_x); - return -1; - } - s->dsp.idct_put(ptr, linesize[c], s->block); + if (!s->progressive) { + if (copy_mb) + mjpeg_copy_block(ptr, reference_data[c] + block_offset, + linesize[c], s->avctx->lowres); + else { + s->dsp.clear_block(s->block); + if (decode_block(s, s->block, i, + s->dc_index[i], s->ac_index[i], + s->quant_matrixes[s->quant_index[c]]) < 0) { + av_log(s->avctx, AV_LOG_ERROR, + "error y=%d x=%d\n", mb_y, mb_x); + return -1; + } + s->dsp.idct_put(ptr, linesize[c], s->block); } } else { - int block_idx = s->block_stride[c] * (v * mb_y + y) + (h * mb_x + x); + int block_idx = s->block_stride[c] * (v * mb_y + y) + + (h * mb_x + x); DCTELEM *block = s->blocks[c][block_idx]; - if(Ah) - block[0] += get_bits1(&s->gb) * s->quant_matrixes[ s->quant_index[c] ][0] << Al; - else if(decode_dc_progressive(s, block, i, s->dc_index[i], s->quant_matrixes[ s->quant_index[c] ], Al) < 0) { - av_log(s->avctx, AV_LOG_ERROR, "error y=%d x=%d\n", mb_y, mb_x); + if (Ah) + block[0] += get_bits1(&s->gb) * + s->quant_matrixes[s->quant_index[c]][0] << Al; + else if (decode_dc_progressive(s, block, i, s->dc_index[i], + s->quant_matrixes[s->quant_index[c]], + Al) < 0) { + av_log(s->avctx, AV_LOG_ERROR, + "error y=%d x=%d\n", mb_y, mb_x); return -1; } } -// av_log(s->avctx, AV_LOG_DEBUG, "mb: %d %d processed\n", mb_y, mb_x); -//av_log(NULL, AV_LOG_DEBUG, "%d %d %d %d %d %d %d %d \n", mb_x, mb_y, x, y, c, s->bottom_field, (v * mb_y + y) * 8, (h * mb_x + x) * 8); + // av_log(s->avctx, AV_LOG_DEBUG, "mb: %d %d processed\n", + // mb_y, mb_x); + // av_log(NULL, AV_LOG_DEBUG, "%d %d %d %d %d %d %d %d \n", + // mb_x, mb_y, x, y, c, s->bottom_field, + // (v * mb_y + y) * 8, (h * mb_x + x) * 8); if (++x == h) { x = 0; y++; @@ -879,73 +922,87 @@ } } - if (s->restart_interval && !--s->restart_count) { - align_get_bits(&s->gb); - skip_bits(&s->gb, 16); /* skip RSTn */ - for (i=0; ilast_dc[i] = 1024; + if (s->restart_interval) { + s->restart_count--; + i = 8 + ((-get_bits_count(&s->gb)) & 7); + /* skip RSTn */ + if (show_bits(&s->gb, i) == (1 << i) - 1) { + int pos = get_bits_count(&s->gb); + align_get_bits(&s->gb); + while (get_bits_left(&s->gb) >= 8 && show_bits(&s->gb, 8) == 0xFF) + skip_bits(&s->gb, 8); + if ((get_bits(&s->gb, 8) & 0xF8) == 0xD0) { + for (i = 0; i < nb_components; i++) /* reset dc */ + s->last_dc[i] = 1024; + } else + skip_bits_long(&s->gb, pos - get_bits_count(&s->gb)); + } } } } return 0; } -static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, int se, int Ah, int Al, - const uint8_t *mb_bitmask, const AVFrame *reference){ +static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, + int se, int Ah, int Al, + const uint8_t *mb_bitmask, + const AVFrame *reference) +{ int mb_x, mb_y; int EOBRUN = 0; int c = s->comp_index[0]; - uint8_t* data = s->picture_ptr->data[c]; + uint8_t *data = s->picture_ptr->data[c]; const uint8_t *reference_data = reference ? reference->data[c] : NULL; - int linesize = s->linesize[c]; + int linesize = s->linesize[c]; int last_scan = 0; - int16_t *quant_matrix = s->quant_matrixes[ s->quant_index[c] ]; + int16_t *quant_matrix = s->quant_matrixes[s->quant_index[c]]; GetBitContext mb_bitmask_gb; - if (mb_bitmask) { - init_get_bits(&mb_bitmask_gb, mb_bitmask, s->mb_width*s->mb_height); - } + if (mb_bitmask) + init_get_bits(&mb_bitmask_gb, mb_bitmask, s->mb_width * s->mb_height); - if(!Al) { - s->coefs_finished[c] |= (1LL<<(se+1))-(1LL<coefs_finished[c] |= (1LL << (se + 1)) - (1LL << ss); last_scan = !~s->coefs_finished[c]; } - if(s->interlaced && s->bottom_field) { - int offset = linesize >> 1; - data += offset; + if (s->interlaced && s->bottom_field) { + int offset = linesize >> 1; + data += offset; reference_data += offset; } - for(mb_y = 0; mb_y < s->mb_height; mb_y++) { - int block_offset = (mb_y*linesize*8 >> s->avctx->lowres); - uint8_t *ptr = data + block_offset; - int block_idx = mb_y * s->block_stride[c]; + for (mb_y = 0; mb_y < s->mb_height; mb_y++) { + int block_offset = (mb_y * linesize * 8 >> s->avctx->lowres); + uint8_t *ptr = data + block_offset; + int block_idx = mb_y * s->block_stride[c]; DCTELEM (*block)[64] = &s->blocks[c][block_idx]; - uint8_t *last_nnz = &s->last_nnz[c][block_idx]; - for(mb_x = 0; mb_x < s->mb_width; mb_x++, block++, last_nnz++) { + uint8_t *last_nnz = &s->last_nnz[c][block_idx]; + for (mb_x = 0; mb_x < s->mb_width; mb_x++, block++, last_nnz++) { const int copy_mb = mb_bitmask && !get_bits1(&mb_bitmask_gb); if (!copy_mb) { - int ret; - if(Ah) - ret = decode_block_refinement(s, *block, last_nnz, s->ac_index[0], - quant_matrix, ss, se, Al, &EOBRUN); - else - ret = decode_block_progressive(s, *block, last_nnz, s->ac_index[0], - quant_matrix, ss, se, Al, &EOBRUN); - if(ret < 0) { - av_log(s->avctx, AV_LOG_ERROR, "error y=%d x=%d\n", mb_y, mb_x); - return -1; - } + int ret; + if (Ah) + ret = decode_block_refinement(s, *block, last_nnz, s->ac_index[0], + quant_matrix, ss, se, Al, &EOBRUN); + else + ret = decode_block_progressive(s, *block, last_nnz, s->ac_index[0], + quant_matrix, ss, se, Al, &EOBRUN); + if (ret < 0) { + av_log(s->avctx, AV_LOG_ERROR, + "error y=%d x=%d\n", mb_y, mb_x); + return -1; + } } - if(last_scan) { + if (last_scan) { if (copy_mb) { - mjpeg_copy_block(ptr, reference_data + block_offset, linesize, s->avctx->lowres); + mjpeg_copy_block(ptr, reference_data + block_offset, + linesize, s->avctx->lowres); } else { - s->dsp.idct_put(ptr, linesize, *block); - ptr += 8 >> s->avctx->lowres; + s->dsp.idct_put(ptr, linesize, *block); + ptr += 8 >> s->avctx->lowres; } } } @@ -953,36 +1010,36 @@ return 0; } -int ff_mjpeg_decode_sos(MJpegDecodeContext *s, - const uint8_t *mb_bitmask, const AVFrame *reference) +int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask, + const AVFrame *reference) { int len, nb_components, i, h, v, predictor, point_transform; int index, id; - const int block_size= s->lossless ? 1 : 8; + const int block_size = s->lossless ? 1 : 8; int ilv, prev_shift; /* XXX: verify len field validity */ len = get_bits(&s->gb, 16); nb_components = get_bits(&s->gb, 8); - if (nb_components == 0 || nb_components > MAX_COMPONENTS){ - av_log(s->avctx, AV_LOG_ERROR, "decode_sos: nb_components (%d) unsupported\n", nb_components); + if (nb_components == 0 || nb_components > MAX_COMPONENTS) { + av_log(s->avctx, AV_LOG_ERROR, + "decode_sos: nb_components (%d) unsupported\n", nb_components); return -1; } - if (len != 6+2*nb_components) - { + if (len != 6 + 2 * nb_components) { av_log(s->avctx, AV_LOG_ERROR, "decode_sos: invalid len (%d)\n", len); return -1; } - for(i=0;igb, 8) - 1; av_log(s->avctx, AV_LOG_DEBUG, "component: %d\n", id); /* find component index */ - for(index=0;indexnb_components;index++) + for (index = 0; index < s->nb_components; index++) if (id == s->component_id[index]) break; - if (index == s->nb_components) - { - av_log(s->avctx, AV_LOG_ERROR, "decode_sos: index(%d) out of components\n", index); + if (index == s->nb_components) { + av_log(s->avctx, AV_LOG_ERROR, + "decode_sos: index(%d) out of components\n", index); return -1; } /* Metasoft MJPEG codec has Cb and Cr swapped */ @@ -993,8 +1050,8 @@ s->comp_index[i] = index; s->nb_blocks[i] = s->h_count[index] * s->v_count[index]; - s->h_scount[i] = s->h_count[index]; - s->v_scount[i] = s->v_count[index]; + s->h_scount[i] = s->h_count[index]; + s->v_scount[i] = s->v_count[index]; s->dc_index[i] = get_bits(&s->gb, 4); s->ac_index[i] = get_bits(&s->gb, 4); @@ -1002,34 +1059,36 @@ if (s->dc_index[i] < 0 || s->ac_index[i] < 0 || s->dc_index[i] >= 4 || s->ac_index[i] >= 4) goto out_of_range; - if (!s->vlcs[0][s->dc_index[i]].table || !s->vlcs[1][s->ac_index[i]].table) + if (!s->vlcs[0][s->dc_index[i]].table || + !s->vlcs[1][s->ac_index[i]].table) goto out_of_range; } - predictor= get_bits(&s->gb, 8); /* JPEG Ss / lossless JPEG predictor /JPEG-LS NEAR */ - ilv= get_bits(&s->gb, 8); /* JPEG Se / JPEG-LS ILV */ - prev_shift = get_bits(&s->gb, 4); /* Ah */ - point_transform= get_bits(&s->gb, 4); /* Al */ + predictor = get_bits(&s->gb, 8); /* JPEG Ss / lossless JPEG predictor /JPEG-LS NEAR */ + ilv = get_bits(&s->gb, 8); /* JPEG Se / JPEG-LS ILV */ + prev_shift = get_bits(&s->gb, 4); /* Ah */ + point_transform = get_bits(&s->gb, 4); /* Al */ - for(i=0;ilast_dc[i] = 1024; if (nb_components > 1) { /* interleaved stream */ s->mb_width = (s->width + s->h_max * block_size - 1) / (s->h_max * block_size); s->mb_height = (s->height + s->v_max * block_size - 1) / (s->v_max * block_size); - } else if(!s->ls) { /* skip this for JPEG-LS */ + } else if (!s->ls) { /* skip this for JPEG-LS */ h = s->h_max / s->h_scount[0]; v = s->v_max / s->v_scount[0]; - s->mb_width = (s->width + h * block_size - 1) / (h * block_size); - s->mb_height = (s->height + v * block_size - 1) / (v * block_size); + s->mb_width = (s->width + h * block_size - 1) / (h * block_size); + s->mb_height = (s->height + v * block_size - 1) / (v * block_size); s->nb_blocks[0] = 1; - s->h_scount[0] = 1; - s->v_scount[0] = 1; + s->h_scount[0] = 1; + s->v_scount[0] = 1; } - if(s->avctx->debug & FF_DEBUG_PICT_INFO) - av_log(s->avctx, AV_LOG_DEBUG, "%s %s p:%d >>:%d ilv:%d bits:%d %s\n", s->lossless ? "lossless" : "sequential DCT", s->rgb ? "RGB" : "", + if (s->avctx->debug & FF_DEBUG_PICT_INFO) + av_log(s->avctx, AV_LOG_DEBUG, "%s %s p:%d >>:%d ilv:%d bits:%d %s\n", + s->lossless ? "lossless" : "sequential DCT", s->rgb ? "RGB" : "", predictor, point_transform, ilv, s->bits, s->pegasus_rct ? "PRCT" : (s->rct ? "RCT" : "")); @@ -1038,30 +1097,31 @@ for (i = s->mjpb_skiptosod; i > 0; i--) skip_bits(&s->gb, 8); - if(s->lossless){ - if(CONFIG_JPEGLS_DECODER && s->ls){ -// for(){ + if (s->lossless) { + if (CONFIG_JPEGLS_DECODER && s->ls) { +// for () { // reset_ls_coding_parameters(s, 0); - if(ff_jpegls_decode_picture(s, predictor, point_transform, ilv) < 0) + if (ff_jpegls_decode_picture(s, predictor, point_transform, ilv) < 0) return -1; - }else{ - if(s->rgb){ - if(ljpeg_decode_rgb_scan(s, predictor, point_transform) < 0) + } else { + if (s->rgb) { + if (ljpeg_decode_rgb_scan(s, predictor, point_transform) < 0) return -1; - }else{ - if(ljpeg_decode_yuv_scan(s, predictor, point_transform) < 0) + } else { + if (ljpeg_decode_yuv_scan(s, predictor, point_transform) < 0) return -1; } } - }else{ - if(s->progressive && predictor) { - if(mjpeg_decode_scan_progressive_ac(s, predictor, ilv, prev_shift, point_transform, - mb_bitmask, reference) < 0) + } else { + if (s->progressive && predictor) { + if (mjpeg_decode_scan_progressive_ac(s, predictor, ilv, prev_shift, + point_transform, + mb_bitmask, reference) < 0) return -1; } else { - if(mjpeg_decode_scan(s, nb_components, prev_shift, point_transform, - mb_bitmask, reference) < 0) + if (mjpeg_decode_scan(s, nb_components, prev_shift, point_transform, + mb_bitmask, reference) < 0) return -1; } } @@ -1077,8 +1137,9 @@ if (get_bits(&s->gb, 16) != 4) return -1; s->restart_interval = get_bits(&s->gb, 16); - s->restart_count = 0; - av_log(s->avctx, AV_LOG_DEBUG, "restart interval: %d\n", s->restart_interval); + s->restart_count = 0; + av_log(s->avctx, AV_LOG_DEBUG, "restart interval: %d\n", + s->restart_interval); return 0; } @@ -1090,22 +1151,20 @@ len = get_bits(&s->gb, 16); if (len < 5) return -1; - if(8*len + get_bits_count(&s->gb) > s->gb.size_in_bits) + if (8 * len + get_bits_count(&s->gb) > s->gb.size_in_bits) return -1; - id = get_bits_long(&s->gb, 32); - id = av_be2ne32(id); + id = get_bits_long(&s->gb, 32); + id = av_be2ne32(id); len -= 6; - if(s->avctx->debug & FF_DEBUG_STARTCODE){ + if (s->avctx->debug & FF_DEBUG_STARTCODE) av_log(s->avctx, AV_LOG_DEBUG, "APPx %8X\n", id); - } - /* buggy AVID, it puts EOI only at every 10th frame */ - /* also this fourcc is used by non-avid files too, it holds some - informations, but it's always present in AVID creates files */ - if (id == AV_RL32("AVI1")) - { + /* Buggy AVID, it puts EOI only at every 10th frame. */ + /* Also, this fourcc is used by non-avid files too, it holds some + information, but it's always present in AVID-created files. */ + if (id == AV_RL32("AVI1")) { /* structure: 4bytes AVI1 1bytes polarity @@ -1113,12 +1172,14 @@ 4bytes field_size 4bytes field_size_less_padding */ - s->buggy_avid = 1; -// if (s->first_picture) -// printf("mjpeg: workarounding buggy AVID\n"); + s->buggy_avid = 1; +// if (s->first_picture) +// printf("mjpeg: workarounding buggy AVID\n"); i = get_bits(&s->gb, 8); - if (i==2) s->bottom_field= 1; - else if(i==1) s->bottom_field= 0; + if (i == 2) + s->bottom_field = 1; + else if (i == 1) + s->bottom_field = 0; #if 0 skip_bits(&s->gb, 8); skip_bits(&s->gb, 32); @@ -1132,63 +1193,61 @@ // len -= 2; - if (id == AV_RL32("JFIF")) - { + if (id == AV_RL32("JFIF")) { int t_w, t_h, v1, v2; skip_bits(&s->gb, 8); /* the trailing zero-byte */ - v1= get_bits(&s->gb, 8); - v2= get_bits(&s->gb, 8); + v1 = get_bits(&s->gb, 8); + v2 = get_bits(&s->gb, 8); skip_bits(&s->gb, 8); - s->avctx->sample_aspect_ratio.num= get_bits(&s->gb, 16); - s->avctx->sample_aspect_ratio.den= get_bits(&s->gb, 16); + s->avctx->sample_aspect_ratio.num = get_bits(&s->gb, 16); + s->avctx->sample_aspect_ratio.den = get_bits(&s->gb, 16); if (s->avctx->debug & FF_DEBUG_PICT_INFO) - av_log(s->avctx, AV_LOG_INFO, "mjpeg: JFIF header found (version: %x.%x) SAR=%d/%d\n", - v1, v2, - s->avctx->sample_aspect_ratio.num, - s->avctx->sample_aspect_ratio.den - ); + av_log(s->avctx, AV_LOG_INFO, + "mjpeg: JFIF header found (version: %x.%x) SAR=%d/%d\n", + v1, v2, + s->avctx->sample_aspect_ratio.num, + s->avctx->sample_aspect_ratio.den); t_w = get_bits(&s->gb, 8); t_h = get_bits(&s->gb, 8); - if (t_w && t_h) - { + if (t_w && t_h) { /* skip thumbnail */ - if (len-10-(t_w*t_h*3) > 0) - len -= t_w*t_h*3; + if (len -10 - (t_w * t_h * 3) > 0) + len -= t_w * t_h * 3; } len -= 10; goto out; } - if (id == AV_RL32("Adob") && (get_bits(&s->gb, 8) == 'e')) - { + if (id == AV_RL32("Adob") && (get_bits(&s->gb, 8) == 'e')) { if (s->avctx->debug & FF_DEBUG_PICT_INFO) av_log(s->avctx, AV_LOG_INFO, "mjpeg: Adobe header found\n"); skip_bits(&s->gb, 16); /* version */ skip_bits(&s->gb, 16); /* flags0 */ skip_bits(&s->gb, 16); /* flags1 */ - skip_bits(&s->gb, 8); /* transform */ + skip_bits(&s->gb, 8); /* transform */ len -= 7; goto out; } - if (id == AV_RL32("LJIF")){ + if (id == AV_RL32("LJIF")) { if (s->avctx->debug & FF_DEBUG_PICT_INFO) - av_log(s->avctx, AV_LOG_INFO, "Pegasus lossless jpeg header found\n"); + av_log(s->avctx, AV_LOG_INFO, + "Pegasus lossless jpeg header found\n"); skip_bits(&s->gb, 16); /* version ? */ skip_bits(&s->gb, 16); /* unknwon always 0? */ skip_bits(&s->gb, 16); /* unknwon always 0? */ skip_bits(&s->gb, 16); /* unknwon always 0? */ - switch( get_bits(&s->gb, 8)){ + switch (get_bits(&s->gb, 8)) { case 1: - s->rgb= 1; - s->pegasus_rct=0; + s->rgb = 1; + s->pegasus_rct = 0; break; case 2: - s->rgb= 1; - s->pegasus_rct=1; + s->rgb = 1; + s->pegasus_rct = 1; break; default: av_log(s->avctx, AV_LOG_ERROR, "unknown colorspace\n"); @@ -1198,13 +1257,12 @@ } /* Apple MJPEG-A */ - if ((s->start_code == APP1) && (len > (0x28 - 8))) - { - id = get_bits_long(&s->gb, 32); - id = av_be2ne32(id); + if ((s->start_code == APP1) && (len > (0x28 - 8))) { + id = get_bits_long(&s->gb, 32); + id = av_be2ne32(id); len -= 4; - if (id == AV_RL32("mjpg")) /* Apple MJPEG-A */ - { + /* Apple MJPEG-A */ + if (id == AV_RL32("mjpg")) { #if 0 skip_bits(&s->gb, 32); /* field size */ skip_bits(&s->gb, 32); /* pad field size */ @@ -1223,8 +1281,9 @@ out: /* slow but needed for extreme adobe jpegs */ if (len < 0) - av_log(s->avctx, AV_LOG_ERROR, "mjpeg: error, decode_app parser read over the end\n"); - while(--len > 0) + av_log(s->avctx, AV_LOG_ERROR, + "mjpeg: error, decode_app parser read over the end\n"); + while (--len > 0) skip_bits(&s->gb, 8); return 0; @@ -1233,34 +1292,31 @@ static int mjpeg_decode_com(MJpegDecodeContext *s) { int len = get_bits(&s->gb, 16); - if (len >= 2 && 8*len - 16 + get_bits_count(&s->gb) <= s->gb.size_in_bits) { + if (len >= 2 && + 8 * len - 16 + get_bits_count(&s->gb) <= s->gb.size_in_bits) { char *cbuf = av_malloc(len - 1); if (cbuf) { int i; for (i = 0; i < len - 2; i++) cbuf[i] = get_bits(&s->gb, 8); - if (i > 0 && cbuf[i-1] == '\n') - cbuf[i-1] = 0; + if (i > 0 && cbuf[i - 1] == '\n') + cbuf[i - 1] = 0; else cbuf[i] = 0; - if(s->avctx->debug & FF_DEBUG_PICT_INFO) + if (s->avctx->debug & FF_DEBUG_PICT_INFO) av_log(s->avctx, AV_LOG_INFO, "mjpeg comment: '%s'\n", cbuf); /* buggy avid, it puts EOI only at every 10th frame */ - if (!strcmp(cbuf, "AVID")) - { + if (!strcmp(cbuf, "AVID")) { s->buggy_avid = 1; - // if (s->first_picture) - // printf("mjpeg: workarounding buggy AVID\n"); - } - else if(!strcmp(cbuf, "CS=ITU601")){ - s->cs_itu601= 1; - } - else if((len > 20 && !strncmp(cbuf, "Intel(R) JPEG Library", 21)) || - (len > 19 && !strncmp(cbuf, "Metasoft MJPEG Codec", 20))){ + // if (s->first_picture) + // printf("mjpeg: workarounding buggy AVID\n"); + } else if (!strcmp(cbuf, "CS=ITU601")) + s->cs_itu601 = 1; + else if ((len > 20 && !strncmp(cbuf, "Intel(R) JPEG Library", 21)) || + (len > 19 && !strncmp(cbuf, "Metasoft MJPEG Codec", 20))) s->flipped = 1; - } av_free(cbuf); } @@ -1269,29 +1325,6 @@ return 0; } -#if 0 -static int valid_marker_list[] = -{ - /* 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f */ -/* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* 1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* 2 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* 3 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* 4 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* 5 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* 6 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* 7 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* 8 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* 9 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* a */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* b */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -/* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -/* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -/* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, -} -#endif - /* return the 8 bit start code value and update the search state. Return -1 if no start code found */ static int find_marker(const uint8_t **pbuf_ptr, const uint8_t *buf_end) @@ -1300,12 +1333,12 @@ unsigned int v, v2; int val; #ifdef DEBUG - int skipped=0; + int skipped = 0; #endif buf_ptr = *pbuf_ptr; while (buf_ptr < buf_end) { - v = *buf_ptr++; + v = *buf_ptr++; v2 = *buf_ptr; if ((v == 0xff) && (v2 >= 0xc0) && (v2 <= 0xfe) && buf_ptr < buf_end) { val = *buf_ptr++; @@ -1324,105 +1357,97 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s, const uint8_t **buf_ptr, const uint8_t *buf_end, - const uint8_t **unescaped_buf_ptr, int *unescaped_buf_size) + const uint8_t **unescaped_buf_ptr, + int *unescaped_buf_size) { int start_code; start_code = find_marker(buf_ptr, buf_end); - if ((buf_end - *buf_ptr) > s->buffer_size) - { - av_free(s->buffer); - s->buffer_size = buf_end - *buf_ptr; - s->buffer = av_malloc(s->buffer_size + FF_INPUT_BUFFER_PADDING_SIZE); - av_log(s->avctx, AV_LOG_DEBUG, "buffer too small, expanding to %d bytes\n", - s->buffer_size); - } - - /* unescape buffer of SOS, use special treatment for JPEG-LS */ - if (start_code == SOS && !s->ls) - { - const uint8_t *src = *buf_ptr; - uint8_t *dst = s->buffer; - - while (src s->buffer_size) { + av_free(s->buffer); + s->buffer_size = buf_end - *buf_ptr; + s->buffer = av_malloc(s->buffer_size + FF_INPUT_BUFFER_PADDING_SIZE); + av_log(s->avctx, AV_LOG_DEBUG, + "buffer too small, expanding to %d bytes\n", s->buffer_size); + } + + /* unescape buffer of SOS, use special treatment for JPEG-LS */ + if (start_code == SOS && !s->ls) { + const uint8_t *src = *buf_ptr; + uint8_t *dst = s->buffer; + + while (src < buf_end) { + uint8_t x = *(src++); + + *(dst++) = x; + if (s->avctx->codec_id != CODEC_ID_THP) { + if (x == 0xff) { + while (src < buf_end && x == 0xff) + x = *(src++); + if (x >= 0xd0 && x <= 0xd7) *(dst++) = x; - if (s->avctx->codec_id != CODEC_ID_THP) - { - if (x == 0xff) { - while (src < buf_end && x == 0xff) - x = *(src++); - - if (x >= 0xd0 && x <= 0xd7) - *(dst++) = x; - else if (x) - break; - } - } - } - *unescaped_buf_ptr = s->buffer; - *unescaped_buf_size = dst - s->buffer; - - av_log(s->avctx, AV_LOG_DEBUG, "escaping removed %td bytes\n", - (buf_end - *buf_ptr) - (dst - s->buffer)); + else if (x) + break; } - else if(start_code == SOS && s->ls){ - const uint8_t *src = *buf_ptr; - uint8_t *dst = s->buffer; - int bit_count = 0; - int t = 0, b = 0; - PutBitContext pb; - - s->cur_scan++; - - /* find marker */ - while (src + t < buf_end){ - uint8_t x = src[t++]; - if (x == 0xff){ - while((src + t < buf_end) && x == 0xff) - x = src[t++]; - if (x & 0x80) { - t -= 2; - break; - } - } - } - bit_count = t * 8; - - init_put_bits(&pb, dst, t); - - /* unescape bitstream */ - while(b < t){ - uint8_t x = src[b++]; - put_bits(&pb, 8, x); - if(x == 0xFF){ - x = src[b++]; - put_bits(&pb, 7, x); - bit_count--; - } - } - flush_put_bits(&pb); + } + } + *unescaped_buf_ptr = s->buffer; + *unescaped_buf_size = dst - s->buffer; - *unescaped_buf_ptr = dst; - *unescaped_buf_size = (bit_count + 7) >> 3; - } - else - { - *unescaped_buf_ptr = *buf_ptr; - *unescaped_buf_size = buf_end - *buf_ptr; + av_log(s->avctx, AV_LOG_DEBUG, "escaping removed %td bytes\n", + (buf_end - *buf_ptr) - (dst - s->buffer)); + } else if (start_code == SOS && s->ls) { + const uint8_t *src = *buf_ptr; + uint8_t *dst = s->buffer; + int bit_count = 0; + int t = 0, b = 0; + PutBitContext pb; + + s->cur_scan++; + + /* find marker */ + while (src + t < buf_end) { + uint8_t x = src[t++]; + if (x == 0xff) { + while ((src + t < buf_end) && x == 0xff) + x = src[t++]; + if (x & 0x80) { + t -= 2; + break; } + } + } + bit_count = t * 8; + init_put_bits(&pb, dst, t); + + /* unescape bitstream */ + while (b < t) { + uint8_t x = src[b++]; + put_bits(&pb, 8, x); + if (x == 0xFF) { + x = src[b++]; + put_bits(&pb, 7, x); + bit_count--; + } + } + flush_put_bits(&pb); + + *unescaped_buf_ptr = dst; + *unescaped_buf_size = (bit_count + 7) >> 3; + } else { + *unescaped_buf_ptr = *buf_ptr; + *unescaped_buf_size = buf_end - *buf_ptr; + } return start_code; } -int ff_mjpeg_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, + AVPacket *avpkt) { const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; + int buf_size = avpkt->size; MJpegDecodeContext *s = avctx->priv_data; const uint8_t *buf_end, *buf_ptr; const uint8_t *unescaped_buf_ptr; @@ -1436,150 +1461,155 @@ while (buf_ptr < buf_end) { /* find start next marker */ start_code = ff_mjpeg_find_marker(s, &buf_ptr, buf_end, - &unescaped_buf_ptr, &unescaped_buf_size); - { - /* EOF */ - if (start_code < 0) { - goto the_end; - } else { - av_log(avctx, AV_LOG_DEBUG, "marker=%x avail_size_in_buf=%td\n", start_code, buf_end - buf_ptr); - - init_get_bits(&s->gb, unescaped_buf_ptr, unescaped_buf_size*8); + &unescaped_buf_ptr, + &unescaped_buf_size); + /* EOF */ + if (start_code < 0) { + goto the_end; + } else { + av_log(avctx, AV_LOG_DEBUG, "marker=%x avail_size_in_buf=%td\n", + start_code, buf_end - buf_ptr); - s->start_code = start_code; - if(s->avctx->debug & FF_DEBUG_STARTCODE){ - av_log(avctx, AV_LOG_DEBUG, "startcode: %X\n", start_code); - } + init_get_bits(&s->gb, unescaped_buf_ptr, unescaped_buf_size * 8); - /* process markers */ - if (start_code >= 0xd0 && start_code <= 0xd7) { - av_log(avctx, AV_LOG_DEBUG, "restart marker: %d\n", start_code&0x0f); - /* APP fields */ - } else if (start_code >= APP0 && start_code <= APP15) { - mjpeg_decode_app(s); - /* Comment */ - } else if (start_code == COM){ - mjpeg_decode_com(s); + s->start_code = start_code; + if (s->avctx->debug & FF_DEBUG_STARTCODE) + av_log(avctx, AV_LOG_DEBUG, "startcode: %X\n", start_code); + + /* process markers */ + if (start_code >= 0xd0 && start_code <= 0xd7) + av_log(avctx, AV_LOG_DEBUG, + "restart marker: %d\n", start_code & 0x0f); + /* APP fields */ + else if (start_code >= APP0 && start_code <= APP15) + mjpeg_decode_app(s); + /* Comment */ + else if (start_code == COM) + mjpeg_decode_com(s); + + switch (start_code) { + case SOI: + s->restart_interval = 0; + s->restart_count = 0; + /* nothing to do on SOI */ + break; + case DQT: + ff_mjpeg_decode_dqt(s); + break; + case DHT: + if (ff_mjpeg_decode_dht(s) < 0) { + av_log(avctx, AV_LOG_ERROR, "huffman table decode error\n"); + return -1; } - - switch(start_code) { - case SOI: - s->restart_interval = 0; - - s->restart_count = 0; - /* nothing to do on SOI */ + break; + case SOF0: + case SOF1: + s->lossless = 0; + s->ls = 0; + s->progressive = 0; + if (ff_mjpeg_decode_sof(s) < 0) + return -1; + break; + case SOF2: + s->lossless = 0; + s->ls = 0; + s->progressive = 1; + if (ff_mjpeg_decode_sof(s) < 0) + return -1; + break; + case SOF3: + s->lossless = 1; + s->ls = 0; + s->progressive = 0; + if (ff_mjpeg_decode_sof(s) < 0) + return -1; + break; + case SOF48: + s->lossless = 1; + s->ls = 1; + s->progressive = 0; + if (ff_mjpeg_decode_sof(s) < 0) + return -1; + break; + case LSE: + if (!CONFIG_JPEGLS_DECODER || ff_jpegls_decode_lse(s) < 0) + return -1; + break; + case EOI: + s->cur_scan = 0; + if ((s->buggy_avid && !s->interlaced) || s->restart_interval) break; - case DQT: - ff_mjpeg_decode_dqt(s); +eoi_parser: + if (!s->got_picture) { + av_log(avctx, AV_LOG_WARNING, + "Found EOI before any SOF, ignoring\n"); break; - case DHT: - if(ff_mjpeg_decode_dht(s) < 0){ - av_log(avctx, AV_LOG_ERROR, "huffman table decode error\n"); - return -1; } - break; - case SOF0: - case SOF1: - s->lossless=0; - s->ls=0; - s->progressive=0; - if (ff_mjpeg_decode_sof(s) < 0) - return -1; - break; - case SOF2: - s->lossless=0; - s->ls=0; - s->progressive=1; - if (ff_mjpeg_decode_sof(s) < 0) - return -1; - break; - case SOF3: - s->lossless=1; - s->ls=0; - s->progressive=0; - if (ff_mjpeg_decode_sof(s) < 0) - return -1; - break; - case SOF48: - s->lossless=1; - s->ls=1; - s->progressive=0; - if (ff_mjpeg_decode_sof(s) < 0) - return -1; - break; - case LSE: - if (!CONFIG_JPEGLS_DECODER || ff_jpegls_decode_lse(s) < 0) - return -1; - break; - case EOI: - s->cur_scan = 0; - if ((s->buggy_avid && !s->interlaced) || s->restart_interval) - break; -eoi_parser: - if (!s->got_picture) { - av_log(avctx, AV_LOG_WARNING, "Found EOI before any SOF, ignoring\n"); - break; + if (s->interlaced) { + s->bottom_field ^= 1; + /* if not bottom field, do not output image yet */ + if (s->bottom_field == !s->interlace_polarity) + goto not_the_end; } - { - if (s->interlaced) { - s->bottom_field ^= 1; - /* if not bottom field, do not output image yet */ - if (s->bottom_field == !s->interlace_polarity) - goto not_the_end; - } - *picture = *s->picture_ptr; - *data_size = sizeof(AVFrame); - - if(!s->lossless){ - picture->quality= FFMAX3(s->qscale[0], s->qscale[1], s->qscale[2]); - picture->qstride= 0; - picture->qscale_table= s->qscale_table; - memset(picture->qscale_table, picture->quality, (s->width+15)/16); - if(avctx->debug & FF_DEBUG_QP) - av_log(avctx, AV_LOG_DEBUG, "QP: %d\n", picture->quality); - picture->quality*= FF_QP2LAMBDA; - } + *picture = *s->picture_ptr; + *data_size = sizeof(AVFrame); - goto the_end; + if (!s->lossless) { + picture->quality = FFMAX3(s->qscale[0], + s->qscale[1], + s->qscale[2]); + picture->qstride = 0; + picture->qscale_table = s->qscale_table; + memset(picture->qscale_table, picture->quality, + (s->width + 15) / 16); + if (avctx->debug & FF_DEBUG_QP) + av_log(avctx, AV_LOG_DEBUG, + "QP: %d\n", picture->quality); + picture->quality *= FF_QP2LAMBDA; } + + goto the_end; + case SOS: + if (!s->got_picture) { + av_log(avctx, AV_LOG_WARNING, + "Can not process SOS before SOF, skipping\n"); break; - case SOS: - if (!s->got_picture) { - av_log(avctx, AV_LOG_WARNING, "Can not process SOS before SOF, skipping\n"); - break; } - ff_mjpeg_decode_sos(s, NULL, NULL); - /* buggy avid puts EOI every 10-20th frame */ - /* if restart period is over process EOI */ - if ((s->buggy_avid && !s->interlaced) || s->restart_interval) - goto eoi_parser; - break; - case DRI: - mjpeg_decode_dri(s); - break; - case SOF5: - case SOF6: - case SOF7: - case SOF9: - case SOF10: - case SOF11: - case SOF13: - case SOF14: - case SOF15: - case JPG: - av_log(avctx, AV_LOG_ERROR, "mjpeg: unsupported coding type (%x)\n", start_code); - break; -// default: -// printf("mjpeg: unsupported marker (%x)\n", start_code); -// break; - } + if (ff_mjpeg_decode_sos(s, NULL, NULL) < 0 && + (avctx->err_recognition & AV_EF_EXPLODE)) + return AVERROR_INVALIDDATA; + /* buggy avid puts EOI every 10-20th frame */ + /* if restart period is over process EOI */ + if ((s->buggy_avid && !s->interlaced) || s->restart_interval) + goto eoi_parser; + break; + case DRI: + mjpeg_decode_dri(s); + break; + case SOF5: + case SOF6: + case SOF7: + case SOF9: + case SOF10: + case SOF11: + case SOF13: + case SOF14: + case SOF15: + case JPG: + av_log(avctx, AV_LOG_ERROR, + "mjpeg: unsupported coding type (%x)\n", start_code); + break; +// default: +// printf("mjpeg: unsupported marker (%x)\n", start_code); +// break; + } not_the_end: - /* eof process start code */ - buf_ptr += (get_bits_count(&s->gb)+7)/8; - av_log(avctx, AV_LOG_DEBUG, "marker parser used %d bytes (%d bits)\n", - (get_bits_count(&s->gb)+7)/8, get_bits_count(&s->gb)); - } + /* eof process start code */ + buf_ptr += (get_bits_count(&s->gb) + 7) / 8; + av_log(avctx, AV_LOG_DEBUG, + "marker parser used %d bytes (%d bits)\n", + (get_bits_count(&s->gb) + 7) / 8, get_bits_count(&s->gb)); } } if (s->got_picture) { @@ -1589,8 +1619,9 @@ av_log(avctx, AV_LOG_FATAL, "No JPEG data found in image\n"); return -1; the_end: - av_log(avctx, AV_LOG_DEBUG, "mjpeg decode frame unused %td bytes\n", buf_end - buf_ptr); -// return buf_end - buf_ptr; + av_log(avctx, AV_LOG_DEBUG, "mjpeg decode frame unused %td bytes\n", + buf_end - buf_ptr); +// return buf_end - buf_ptr; return buf_ptr - buf; } @@ -1605,45 +1636,57 @@ av_free(s->buffer); av_free(s->qscale_table); av_freep(&s->ljpeg_buffer); - s->ljpeg_buffer_size=0; + s->ljpeg_buffer_size = 0; - for(i=0;i<3;i++) { - for(j=0;j<4;j++) + for (i = 0; i < 3; i++) { + for (j = 0; j < 4; j++) free_vlc(&s->vlcs[i][j]); } - for(i=0; iblocks[i]); av_freep(&s->last_nnz[i]); } return 0; } +#define OFFSET(x) offsetof(MJpegDecodeContext, x) +#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM +static const AVOption options[] = { + { "extern_huff", "Use external huffman table.", + OFFSET(extern_huff), AV_OPT_TYPE_INT, { 0 }, 0, 1, VD }, + { NULL }, +}; + +static const AVClass mjpegdec_class = { + .class_name = "MJPEG decoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVCodec ff_mjpeg_decoder = { - "mjpeg", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MJPEG, - sizeof(MJpegDecodeContext), - ff_mjpeg_decode_init, - NULL, - ff_mjpeg_decode_end, - ff_mjpeg_decode_frame, - CODEC_CAP_DR1, - NULL, - .max_lowres = 3, - .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"), + .name = "mjpeg", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MJPEG, + .priv_data_size = sizeof(MJpegDecodeContext), + .init = ff_mjpeg_decode_init, + .close = ff_mjpeg_decode_end, + .decode = ff_mjpeg_decode_frame, + .capabilities = CODEC_CAP_DR1, + .max_lowres = 3, + .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"), + .priv_class = &mjpegdec_class, }; AVCodec ff_thp_decoder = { - "thp", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_THP, - sizeof(MJpegDecodeContext), - ff_mjpeg_decode_init, - NULL, - ff_mjpeg_decode_end, - ff_mjpeg_decode_frame, - CODEC_CAP_DR1, - NULL, - .max_lowres = 3, - .long_name = NULL_IF_CONFIG_SMALL("Nintendo Gamecube THP video"), + .name = "thp", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_THP, + .priv_data_size = sizeof(MJpegDecodeContext), + .init = ff_mjpeg_decode_init, + .close = ff_mjpeg_decode_end, + .decode = ff_mjpeg_decode_frame, + .capabilities = CODEC_CAP_DR1, + .max_lowres = 3, + .long_name = NULL_IF_CONFIG_SMALL("Nintendo Gamecube THP video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpegdec.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpegdec.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpegdec.h 2011-03-31 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpegdec.h 2012-01-11 00:34:30.000000000 +0000 @@ -29,6 +29,8 @@ #ifndef AVCODEC_MJPEGDEC_H #define AVCODEC_MJPEGDEC_H +#include "libavutil/log.h" + #include "avcodec.h" #include "get_bits.h" #include "dsputil.h" @@ -36,6 +38,7 @@ #define MAX_COMPONENTS 4 typedef struct MJpegDecodeContext { + AVClass *class; AVCodecContext *avctx; GetBitContext gb; @@ -106,6 +109,8 @@ uint16_t (*ljpeg_buffer)[4]; unsigned int ljpeg_buffer_size; + + int extern_huff; } MJpegDecodeContext; int ff_mjpeg_decode_init(AVCodecContext *avctx); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpegenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpegenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpegenc.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpegenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -446,13 +446,13 @@ } AVCodec ff_mjpeg_encoder = { - "mjpeg", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MJPEG, - sizeof(MpegEncContext), - MPV_encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "mjpeg", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MJPEG, + .priv_data_size = sizeof(MpegEncContext), + .init = MPV_encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpeg_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpeg_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mjpeg_parser.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mjpeg_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,7 +30,7 @@ /** - * finds the end of the current frame in the bitstream. + * Find the end of the current frame in the bitstream. * @return the position of the first byte of the next frame, or -1 */ static int find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size){ @@ -97,9 +97,8 @@ AVCodecParser ff_mjpeg_parser = { - { CODEC_ID_MJPEG }, - sizeof(ParseContext), - NULL, - jpeg_parse, - ff_parse_close, + .codec_ids = { CODEC_ID_MJPEG }, + .priv_data_size = sizeof(ParseContext), + .parser_parse = jpeg_parse, + .parser_close = ff_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mlib/dsputil_mlib.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mlib/dsputil_mlib.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mlib/dsputil_mlib.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mlib/dsputil_mlib.c 2012-01-11 00:34:30.000000000 +0000 @@ -421,13 +421,14 @@ void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx) { - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; - c->get_pixels = get_pixels_mlib; c->diff_pixels = diff_pixels_mlib; c->add_pixels_clamped = add_pixels_clamped_mlib; if (!high_bit_depth) { + c->get_pixels = get_pixels_mlib; + c->put_pixels_tab[0][0] = put_pixels16_mlib; c->put_pixels_tab[0][1] = put_pixels16_x2_mlib; c->put_pixels_tab[0][2] = put_pixels16_y2_mlib; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mlpdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mlpdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mlpdec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mlpdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -45,35 +45,35 @@ "a sample of this file."; typedef struct SubStream { - //! Set if a valid restart header has been read. Otherwise the substream cannot be decoded. + /// Set if a valid restart header has been read. Otherwise the substream cannot be decoded. uint8_t restart_seen; //@{ /** restart header data */ - //! The type of noise to be used in the rematrix stage. + /// The type of noise to be used in the rematrix stage. uint16_t noise_type; - //! The index of the first channel coded in this substream. + /// The index of the first channel coded in this substream. uint8_t min_channel; - //! The index of the last channel coded in this substream. + /// The index of the last channel coded in this substream. uint8_t max_channel; - //! The number of channels input into the rematrix stage. + /// The number of channels input into the rematrix stage. uint8_t max_matrix_channel; - //! For each channel output by the matrix, the output channel to map it to + /// For each channel output by the matrix, the output channel to map it to uint8_t ch_assign[MAX_CHANNELS]; - //! Channel coding parameters for channels in the substream + /// Channel coding parameters for channels in the substream ChannelParams channel_params[MAX_CHANNELS]; - //! The left shift applied to random noise in 0x31ea substreams. + /// The left shift applied to random noise in 0x31ea substreams. uint8_t noise_shift; - //! The current seed value for the pseudorandom noise generator(s). + /// The current seed value for the pseudorandom noise generator(s). uint32_t noisegen_seed; - //! Set if the substream contains extra info to check the size of VLC blocks. + /// Set if the substream contains extra info to check the size of VLC blocks. uint8_t data_check_present; - //! Bitmask of which parameter sets are conveyed in a decoding parameter block. + /// Bitmask of which parameter sets are conveyed in a decoding parameter block. uint8_t param_presence_flags; #define PARAM_BLOCKSIZE (1 << 7) #define PARAM_MATRIX (1 << 6) @@ -88,54 +88,55 @@ //@{ /** matrix data */ - //! Number of matrices to be applied. + /// Number of matrices to be applied. uint8_t num_primitive_matrices; - //! matrix output channel + /// matrix output channel uint8_t matrix_out_ch[MAX_MATRICES]; - //! Whether the LSBs of the matrix output are encoded in the bitstream. + /// Whether the LSBs of the matrix output are encoded in the bitstream. uint8_t lsb_bypass[MAX_MATRICES]; - //! Matrix coefficients, stored as 2.14 fixed point. + /// Matrix coefficients, stored as 2.14 fixed point. int32_t matrix_coeff[MAX_MATRICES][MAX_CHANNELS]; - //! Left shift to apply to noise values in 0x31eb substreams. + /// Left shift to apply to noise values in 0x31eb substreams. uint8_t matrix_noise_shift[MAX_MATRICES]; //@} - //! Left shift to apply to Huffman-decoded residuals. + /// Left shift to apply to Huffman-decoded residuals. uint8_t quant_step_size[MAX_CHANNELS]; - //! number of PCM samples in current audio block + /// number of PCM samples in current audio block uint16_t blocksize; - //! Number of PCM samples decoded so far in this frame. + /// Number of PCM samples decoded so far in this frame. uint16_t blockpos; - //! Left shift to apply to decoded PCM values to get final 24-bit output. + /// Left shift to apply to decoded PCM values to get final 24-bit output. int8_t output_shift[MAX_CHANNELS]; - //! Running XOR of all output samples. + /// Running XOR of all output samples. int32_t lossless_check_data; } SubStream; typedef struct MLPDecodeContext { AVCodecContext *avctx; + AVFrame frame; - //! Current access unit being read has a major sync. + /// Current access unit being read has a major sync. int is_major_sync_unit; - //! Set if a valid major sync block has been read. Otherwise no decoding is possible. + /// Set if a valid major sync block has been read. Otherwise no decoding is possible. uint8_t params_valid; - //! Number of substreams contained within this stream. + /// Number of substreams contained within this stream. uint8_t num_substreams; - //! Index of the last substream to decode - further substreams are skipped. + /// Index of the last substream to decode - further substreams are skipped. uint8_t max_decoded_substream; - //! number of PCM samples contained in each frame + /// number of PCM samples contained in each frame int access_unit_size; - //! next power of two above the number of samples in each frame + /// next power of two above the number of samples in each frame int access_unit_size_pow2; SubStream substream[MAX_SUBSTREAMS]; @@ -214,7 +215,7 @@ VLC_BITS, (9 + VLC_BITS - 1) / VLC_BITS); if (result < 0) - return -1; + return AVERROR_INVALIDDATA; if (lsb_bits > 0) result = (result << lsb_bits) + get_bits(gbp, lsb_bits); @@ -239,6 +240,9 @@ m->substream[substr].lossless_check_data = 0xffffffff; dsputil_init(&m->dsp, avctx); + avcodec_get_frame_defaults(&m->frame); + avctx->coded_frame = &m->frame; + return 0; } @@ -250,61 +254,61 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb) { MLPHeaderInfo mh; - int substr; + int substr, ret; - if (ff_mlp_read_major_sync(m->avctx, &mh, gb) != 0) - return -1; + if ((ret = ff_mlp_read_major_sync(m->avctx, &mh, gb)) != 0) + return ret; if (mh.group1_bits == 0) { av_log(m->avctx, AV_LOG_ERROR, "invalid/unknown bits per sample\n"); - return -1; + return AVERROR_INVALIDDATA; } if (mh.group2_bits > mh.group1_bits) { av_log(m->avctx, AV_LOG_ERROR, "Channel group 2 cannot have more bits per sample than group 1.\n"); - return -1; + return AVERROR_INVALIDDATA; } if (mh.group2_samplerate && mh.group2_samplerate != mh.group1_samplerate) { av_log(m->avctx, AV_LOG_ERROR, "Channel groups with differing sample rates are not currently supported.\n"); - return -1; + return AVERROR_INVALIDDATA; } if (mh.group1_samplerate == 0) { av_log(m->avctx, AV_LOG_ERROR, "invalid/unknown sampling rate\n"); - return -1; + return AVERROR_INVALIDDATA; } if (mh.group1_samplerate > MAX_SAMPLERATE) { av_log(m->avctx, AV_LOG_ERROR, "Sampling rate %d is greater than the supported maximum (%d).\n", mh.group1_samplerate, MAX_SAMPLERATE); - return -1; + return AVERROR_INVALIDDATA; } if (mh.access_unit_size > MAX_BLOCKSIZE) { av_log(m->avctx, AV_LOG_ERROR, "Block size %d is greater than the supported maximum (%d).\n", mh.access_unit_size, MAX_BLOCKSIZE); - return -1; + return AVERROR_INVALIDDATA; } if (mh.access_unit_size_pow2 > MAX_BLOCKSIZE_POW2) { av_log(m->avctx, AV_LOG_ERROR, "Block size pow2 %d is greater than the supported maximum (%d).\n", mh.access_unit_size_pow2, MAX_BLOCKSIZE_POW2); - return -1; + return AVERROR_INVALIDDATA; } if (mh.num_substreams == 0) - return -1; + return AVERROR_INVALIDDATA; if (m->avctx->codec_id == CODEC_ID_MLP && mh.num_substreams > 2) { av_log(m->avctx, AV_LOG_ERROR, "MLP only supports up to 2 substreams.\n"); - return -1; + return AVERROR_INVALIDDATA; } if (mh.num_substreams > MAX_SUBSTREAMS) { av_log(m->avctx, AV_LOG_ERROR, "Number of substreams %d is larger than the maximum supported " "by the decoder. %s\n", mh.num_substreams, sample_message); - return -1; + return AVERROR_INVALIDDATA; } m->access_unit_size = mh.access_unit_size; @@ -351,14 +355,14 @@ if (sync_word != 0x31ea >> 1) { av_log(m->avctx, AV_LOG_ERROR, "restart header sync incorrect (got 0x%04x)\n", sync_word); - return -1; + return AVERROR_INVALIDDATA; } s->noise_type = get_bits1(gbp); if (m->avctx->codec_id == CODEC_ID_MLP && s->noise_type) { av_log(m->avctx, AV_LOG_ERROR, "MLP must have 0x31ea sync word.\n"); - return -1; + return AVERROR_INVALIDDATA; } skip_bits(gbp, 16); /* Output timestamp */ @@ -371,13 +375,13 @@ av_log(m->avctx, AV_LOG_ERROR, "Max matrix channel cannot be greater than %d.\n", max_matrix_channel); - return -1; + return AVERROR_INVALIDDATA; } if (s->max_channel != s->max_matrix_channel) { av_log(m->avctx, AV_LOG_ERROR, "Max channel must be equal max matrix channel.\n"); - return -1; + return AVERROR_INVALIDDATA; } /* This should happen for TrueHD streams with >6 channels and MLP's noise @@ -386,13 +390,13 @@ av_log(m->avctx, AV_LOG_ERROR, "Number of channels %d is larger than the maximum supported " "by the decoder. %s\n", s->max_channel+2, sample_message); - return -1; + return AVERROR_INVALIDDATA; } if (s->min_channel > s->max_channel) { av_log(m->avctx, AV_LOG_ERROR, "Substream min channel cannot be greater than max channel.\n"); - return -1; + return AVERROR_INVALIDDATA; } if (m->avctx->request_channels > 0 @@ -431,7 +435,7 @@ av_log(m->avctx, AV_LOG_ERROR, "Assignment of matrix channel %d to invalid output channel %d. %s\n", ch, ch_assign, sample_message); - return -1; + return AVERROR_INVALIDDATA; } s->ch_assign[ch_assign] = ch; } @@ -487,7 +491,7 @@ if (m->filter_changed[channel][filter]++ > 1) { av_log(m->avctx, AV_LOG_ERROR, "Filters may change only once per access unit.\n"); - return -1; + return AVERROR_INVALIDDATA; } order = get_bits(gbp, 4); @@ -495,7 +499,7 @@ av_log(m->avctx, AV_LOG_ERROR, "%cIR filter order %d is greater than maximum %d.\n", fchar, order, max_order); - return -1; + return AVERROR_INVALIDDATA; } fp->order = order; @@ -511,13 +515,13 @@ av_log(m->avctx, AV_LOG_ERROR, "%cIR filter coeff_bits must be between 1 and 16.\n", fchar); - return -1; + return AVERROR_INVALIDDATA; } if (coeff_bits + coeff_shift > 16) { av_log(m->avctx, AV_LOG_ERROR, "Sum of coeff_bits and coeff_shift for %cIR filter must be 16 or less.\n", fchar); - return -1; + return AVERROR_INVALIDDATA; } for (i = 0; i < order; i++) @@ -529,7 +533,7 @@ if (filter == FIR) { av_log(m->avctx, AV_LOG_ERROR, "FIR filter has state data specified.\n"); - return -1; + return AVERROR_INVALIDDATA; } state_bits = get_bits(gbp, 4); @@ -557,7 +561,7 @@ if (m->matrix_changed++ > 1) { av_log(m->avctx, AV_LOG_ERROR, "Matrices may change only once per access unit.\n"); - return -1; + return AVERROR_INVALIDDATA; } s->num_primitive_matrices = get_bits(gbp, 4); @@ -566,7 +570,7 @@ av_log(m->avctx, AV_LOG_ERROR, "Number of primitive matrices cannot be greater than %d.\n", max_primitive_matrices); - return -1; + return AVERROR_INVALIDDATA; } for (mat = 0; mat < s->num_primitive_matrices; mat++) { @@ -579,12 +583,12 @@ av_log(m->avctx, AV_LOG_ERROR, "Invalid channel %d specified as output from matrix.\n", s->matrix_out_ch[mat]); - return -1; + return AVERROR_INVALIDDATA; } if (frac_bits > 14) { av_log(m->avctx, AV_LOG_ERROR, "Too many fractional bits specified.\n"); - return -1; + return AVERROR_INVALIDDATA; } max_chan = s->max_matrix_channel; @@ -617,27 +621,28 @@ ChannelParams *cp = &s->channel_params[ch]; FilterParams *fir = &cp->filter_params[FIR]; FilterParams *iir = &cp->filter_params[IIR]; + int ret; if (s->param_presence_flags & PARAM_FIR) if (get_bits1(gbp)) - if (read_filter_params(m, gbp, substr, ch, FIR) < 0) - return -1; + if ((ret = read_filter_params(m, gbp, substr, ch, FIR)) < 0) + return ret; if (s->param_presence_flags & PARAM_IIR) if (get_bits1(gbp)) - if (read_filter_params(m, gbp, substr, ch, IIR) < 0) - return -1; + if ((ret = read_filter_params(m, gbp, substr, ch, IIR)) < 0) + return ret; if (fir->order + iir->order > 8) { av_log(m->avctx, AV_LOG_ERROR, "Total filter orders too high.\n"); - return -1; + return AVERROR_INVALIDDATA; } if (fir->order && iir->order && fir->shift != iir->shift) { av_log(m->avctx, AV_LOG_ERROR, "FIR and IIR filters must use the same precision.\n"); - return -1; + return AVERROR_INVALIDDATA; } /* The FIR and IIR filters must have the same precision. * To simplify the filtering code, only the precision of the @@ -656,7 +661,7 @@ if (cp->huff_lsbs > 24) { av_log(m->avctx, AV_LOG_ERROR, "Invalid huff_lsbs.\n"); - return -1; + return AVERROR_INVALIDDATA; } cp->sign_huff_offset = calculate_sign_huff(m, substr, ch); @@ -672,6 +677,7 @@ { SubStream *s = &m->substream[substr]; unsigned int ch; + int ret; if (s->param_presence_flags & PARAM_PRESENCE) if (get_bits1(gbp)) @@ -683,14 +689,14 @@ if (s->blocksize < 8 || s->blocksize > m->access_unit_size) { av_log(m->avctx, AV_LOG_ERROR, "Invalid blocksize."); s->blocksize = 0; - return -1; + return AVERROR_INVALIDDATA; } } if (s->param_presence_flags & PARAM_MATRIX) if (get_bits1(gbp)) - if (read_matrix_params(m, substr, gbp) < 0) - return -1; + if ((ret = read_matrix_params(m, substr, gbp)) < 0) + return ret; if (s->param_presence_flags & PARAM_OUTSHIFT) if (get_bits1(gbp)) @@ -709,8 +715,8 @@ for (ch = s->min_channel; ch <= s->max_channel; ch++) if (get_bits1(gbp)) - if (read_channel_params(m, substr, gbp, ch) < 0) - return -1; + if ((ret = read_channel_params(m, substr, gbp, ch)) < 0) + return ret; return 0; } @@ -752,6 +758,7 @@ { SubStream *s = &m->substream[substr]; unsigned int i, ch, expected_stream_pos = 0; + int ret; if (s->data_check_present) { expected_stream_pos = get_bits_count(gbp); @@ -762,15 +769,15 @@ if (s->blockpos + s->blocksize > m->access_unit_size) { av_log(m->avctx, AV_LOG_ERROR, "too many audio samples in frame\n"); - return -1; + return AVERROR_INVALIDDATA; } memset(&m->bypassed_lsbs[s->blockpos][0], 0, s->blocksize * sizeof(m->bypassed_lsbs[0])); for (i = 0; i < s->blocksize; i++) - if (read_huff_channels(m, gbp, substr, i) < 0) - return -1; + if ((ret = read_huff_channels(m, gbp, substr, i)) < 0) + return ret; for (ch = s->min_channel; ch <= s->max_channel; ch++) filter_channel(m, substr, ch); @@ -901,16 +908,30 @@ /** Write the audio data into the output buffer. */ -static int output_data_internal(MLPDecodeContext *m, unsigned int substr, - uint8_t *data, unsigned int *data_size, int is32) +static int output_data(MLPDecodeContext *m, unsigned int substr, + void *data, int *got_frame_ptr) { + AVCodecContext *avctx = m->avctx; SubStream *s = &m->substream[substr]; unsigned int i, out_ch = 0; - int32_t *data_32 = (int32_t*) data; - int16_t *data_16 = (int16_t*) data; - - if (*data_size < (s->max_channel + 1) * s->blockpos * (is32 ? 4 : 2)) - return -1; + int32_t *data_32; + int16_t *data_16; + int ret; + int is32 = (m->avctx->sample_fmt == AV_SAMPLE_FMT_S32); + + if (m->avctx->channels != s->max_matrix_channel + 1) { + av_log(m->avctx, AV_LOG_ERROR, "channel count mismatch\n"); + return AVERROR_INVALIDDATA; + } + + /* get output buffer */ + m->frame.nb_samples = s->blockpos; + if ((ret = avctx->get_buffer(avctx, &m->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + data_32 = (int32_t *)m->frame.data[0]; + data_16 = (int16_t *)m->frame.data[0]; for (i = 0; i < s->blockpos; i++) { for (out_ch = 0; out_ch <= s->max_matrix_channel; out_ch++) { @@ -923,27 +944,18 @@ } } - *data_size = i * out_ch * (is32 ? 4 : 2); + *got_frame_ptr = 1; + *(AVFrame *)data = m->frame; return 0; } -static int output_data(MLPDecodeContext *m, unsigned int substr, - uint8_t *data, unsigned int *data_size) -{ - if (m->avctx->sample_fmt == AV_SAMPLE_FMT_S32) - return output_data_internal(m, substr, data, data_size, 1); - else - return output_data_internal(m, substr, data, data_size, 0); -} - - /** Read an access unit from the stream. * @return negative on error, 0 if not enough data is present in the input stream, * otherwise the number of bytes consumed. */ -static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size, - AVPacket *avpkt) +static int read_access_unit(AVCodecContext *avctx, void* data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; @@ -956,6 +968,7 @@ uint8_t substream_parity_present[MAX_SUBSTREAMS]; uint16_t substream_data_len[MAX_SUBSTREAMS]; uint8_t parity_bits; + int ret; if (buf_size < 4) return 0; @@ -963,7 +976,7 @@ length = (AV_RB16(buf) & 0xfff) * 2; if (length < 4 || length > buf_size) - return -1; + return AVERROR_INVALIDDATA; init_get_bits(&gb, (buf + 4), (length - 4) * 8); @@ -978,7 +991,7 @@ if (!m->params_valid) { av_log(m->avctx, AV_LOG_WARNING, "Stream parameters not seen; skipping frame.\n"); - *data_size = 0; + *got_frame_ptr = 0; return length; } @@ -1069,8 +1082,8 @@ if (!s->restart_seen) goto next_substr; - if (read_block_data(m, &gb, substr) < 0) - return -1; + if ((ret = read_block_data(m, &gb, substr)) < 0) + return ret; if (get_bits_count(&gb) >= substream_data_len[substr] * 8) goto substream_length_mismatch; @@ -1083,13 +1096,13 @@ int shorten_by; if (get_bits(&gb, 16) != 0xD234) - return -1; + return AVERROR_INVALIDDATA; shorten_by = get_bits(&gb, 16); if (m->avctx->codec_id == CODEC_ID_TRUEHD && shorten_by & 0x2000) s->blockpos -= FFMIN(shorten_by & 0x1FFF, s->blockpos); else if (m->avctx->codec_id == CODEC_ID_MLP && shorten_by != 0xD234) - return -1; + return AVERROR_INVALIDDATA; if (substr == m->max_decoded_substream) av_log(m->avctx, AV_LOG_INFO, "End of stream indicated.\n"); @@ -1123,42 +1136,40 @@ rematrix_channels(m, m->max_decoded_substream); - if (output_data(m, m->max_decoded_substream, data, data_size) < 0) - return -1; + if ((ret = output_data(m, m->max_decoded_substream, data, got_frame_ptr)) < 0) + return ret; return length; substream_length_mismatch: av_log(m->avctx, AV_LOG_ERROR, "substream %d length mismatch\n", substr); - return -1; + return AVERROR_INVALIDDATA; error: m->params_valid = 0; - return -1; + return AVERROR_INVALIDDATA; } AVCodec ff_mlp_decoder = { - "mlp", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MLP, - sizeof(MLPDecodeContext), - mlp_decode_init, - NULL, - NULL, - read_access_unit, + .name = "mlp", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MLP, + .priv_data_size = sizeof(MLPDecodeContext), + .init = mlp_decode_init, + .decode = read_access_unit, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"), }; #if CONFIG_TRUEHD_DECODER AVCodec ff_truehd_decoder = { - "truehd", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_TRUEHD, - sizeof(MLPDecodeContext), - mlp_decode_init, - NULL, - NULL, - read_access_unit, + .name = "truehd", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_TRUEHD, + .priv_data_size = sizeof(MLPDecodeContext), + .init = mlp_decode_init, + .decode = read_access_unit, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("TrueHD"), }; #endif /* CONFIG_TRUEHD_DECODER */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mlp_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mlp_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mlp_parser.c 2011-04-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mlp_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -107,7 +107,7 @@ return channels; } -static int64_t truehd_layout(int chanmap) +static uint64_t truehd_layout(int chanmap) { int layout = 0, i; @@ -138,11 +138,11 @@ checksum = ff_mlp_checksum16(gb->buffer, 26); if (checksum != AV_RL16(gb->buffer+26)) { av_log(log, AV_LOG_ERROR, "major sync info header checksum error\n"); - return -1; + return AVERROR_INVALIDDATA; } if (get_bits_long(gb, 24) != 0xf8726f) /* Sync words */ - return -1; + return AVERROR_INVALIDDATA; mh->stream_type = get_bits(gb, 8); @@ -173,7 +173,7 @@ mh->channels_thd_stream2 = get_bits(gb, 13); } else - return -1; + return AVERROR_INVALIDDATA; mh->access_unit_size = 40 << (ratebits & 7); mh->access_unit_size_pow2 = 64 << (ratebits & 7); @@ -345,9 +345,9 @@ } AVCodecParser ff_mlp_parser = { - { CODEC_ID_MLP, CODEC_ID_TRUEHD }, - sizeof(MLPParseContext), - mlp_init, - mlp_parse, - ff_parse_close, + .codec_ids = { CODEC_ID_MLP, CODEC_ID_TRUEHD }, + .priv_data_size = sizeof(MLPParseContext), + .parser_init = mlp_init, + .parser_parse = mlp_parse, + .parser_close = ff_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mmvideo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mmvideo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mmvideo.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mmvideo.c 2012-01-11 00:34:30.000000000 +0000 @@ -214,14 +214,13 @@ } AVCodec ff_mmvideo_decoder = { - "mmvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MMVIDEO, - sizeof(MmContext), - mm_decode_init, - NULL, - mm_decode_end, - mm_decode_frame, - CODEC_CAP_DR1, + .name = "mmvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MMVIDEO, + .priv_data_size = sizeof(MmContext), + .init = mm_decode_init, + .close = mm_decode_end, + .decode = mm_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM Video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/motion_est.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/motion_est.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/motion_est.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/motion_est.c 2012-01-11 00:34:30.000000000 +0000 @@ -52,7 +52,7 @@ int src_index, int ref_index, int size, int h); -static inline int update_map_generation(MotionEstContext *c) +static inline unsigned update_map_generation(MotionEstContext *c) { c->map_generation+= 1<<(ME_MAP_MV_BITS*2); if(c->map_generation==0){ @@ -248,7 +248,7 @@ } } -/*! \brief compares a block (either a full macroblock or a partition thereof) +/** @brief compares a block (either a full macroblock or a partition thereof) against a proposed motion-compensated prediction of that block */ static av_always_inline int cmp(MpegEncContext *s, const int x, const int y, const int subx, const int suby, @@ -374,30 +374,6 @@ return 0; } -#if 0 -static int pix_dev(uint8_t * pix, int line_size, int mean) -{ - int s, i, j; - - s = 0; - for (i = 0; i < 16; i++) { - for (j = 0; j < 16; j += 8) { - s += FFABS(pix[0]-mean); - s += FFABS(pix[1]-mean); - s += FFABS(pix[2]-mean); - s += FFABS(pix[3]-mean); - s += FFABS(pix[4]-mean); - s += FFABS(pix[5]-mean); - s += FFABS(pix[6]-mean); - s += FFABS(pix[7]-mean); - pix += 8; - } - pix += line_size - 16; - } - return s; -} -#endif - static inline void no_motion_search(MpegEncContext * s, int *mx_ptr, int *my_ptr) { @@ -533,16 +509,16 @@ if(mv4){ int mot_xy= s->block_index[0]; - s->current_picture.motion_val[0][mot_xy ][0]= mx; - s->current_picture.motion_val[0][mot_xy ][1]= my; - s->current_picture.motion_val[0][mot_xy+1][0]= mx; - s->current_picture.motion_val[0][mot_xy+1][1]= my; + s->current_picture.f.motion_val[0][mot_xy ][0] = mx; + s->current_picture.f.motion_val[0][mot_xy ][1] = my; + s->current_picture.f.motion_val[0][mot_xy + 1][0] = mx; + s->current_picture.f.motion_val[0][mot_xy + 1][1] = my; mot_xy += s->b8_stride; - s->current_picture.motion_val[0][mot_xy ][0]= mx; - s->current_picture.motion_val[0][mot_xy ][1]= my; - s->current_picture.motion_val[0][mot_xy+1][0]= mx; - s->current_picture.motion_val[0][mot_xy+1][1]= my; + s->current_picture.f.motion_val[0][mot_xy ][0] = mx; + s->current_picture.f.motion_val[0][mot_xy ][1] = my; + s->current_picture.f.motion_val[0][mot_xy + 1][0] = mx; + s->current_picture.f.motion_val[0][mot_xy + 1][1] = my; } } @@ -615,8 +591,8 @@ const int mot_stride = s->b8_stride; const int mot_xy = s->block_index[block]; - P_LEFT[0] = s->current_picture.motion_val[0][mot_xy - 1][0]; - P_LEFT[1] = s->current_picture.motion_val[0][mot_xy - 1][1]; + P_LEFT[0] = s->current_picture.f.motion_val[0][mot_xy - 1][0]; + P_LEFT[1] = s->current_picture.f.motion_val[0][mot_xy - 1][1]; if(P_LEFT[0] > (c->xmax<xmax<pred_x= pred_x4= P_LEFT[0]; c->pred_y= pred_y4= P_LEFT[1]; } else { - P_TOP[0] = s->current_picture.motion_val[0][mot_xy - mot_stride ][0]; - P_TOP[1] = s->current_picture.motion_val[0][mot_xy - mot_stride ][1]; - P_TOPRIGHT[0] = s->current_picture.motion_val[0][mot_xy - mot_stride + off[block]][0]; - P_TOPRIGHT[1] = s->current_picture.motion_val[0][mot_xy - mot_stride + off[block]][1]; + P_TOP[0] = s->current_picture.f.motion_val[0][mot_xy - mot_stride ][0]; + P_TOP[1] = s->current_picture.f.motion_val[0][mot_xy - mot_stride ][1]; + P_TOPRIGHT[0] = s->current_picture.f.motion_val[0][mot_xy - mot_stride + off[block]][0]; + P_TOPRIGHT[1] = s->current_picture.f.motion_val[0][mot_xy - mot_stride + off[block]][1]; if(P_TOP[1] > (c->ymax<ymax<xmin<xmin< (c->xmax<xmax<current_picture.motion_val[0][ s->block_index[block] ][0]= mx4; - s->current_picture.motion_val[0][ s->block_index[block] ][1]= my4; + s->current_picture.f.motion_val[0][s->block_index[block]][0] = mx4; + s->current_picture.f.motion_val[0][s->block_index[block]][1] = my4; if(mx4 != mx || my4 != my) same=0; } @@ -690,7 +666,7 @@ return INT_MAX; if(s->dsp.me_sub_cmp[0] != s->dsp.mb_cmp[0]){ - dmin_sum += s->dsp.mb_cmp[0](s, s->new_picture.data[0] + s->mb_x*16 + s->mb_y*16*stride, c->scratchpad, stride, 16); + dmin_sum += s->dsp.mb_cmp[0](s, s->new_picture.f.data[0] + s->mb_x*16 + s->mb_y*16*stride, c->scratchpad, stride, 16); } if(c->avctx->mb_cmp&FF_CMP_CHROMA){ @@ -705,15 +681,15 @@ offset= (s->mb_x*8 + (mx>>1)) + (s->mb_y*8 + (my>>1))*s->uvlinesize; if(s->no_rounding){ - s->dsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad , s->last_picture.data[1] + offset, s->uvlinesize, 8); - s->dsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad+8 , s->last_picture.data[2] + offset, s->uvlinesize, 8); + s->dsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad , s->last_picture.f.data[1] + offset, s->uvlinesize, 8); + s->dsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad + 8, s->last_picture.f.data[2] + offset, s->uvlinesize, 8); }else{ - s->dsp.put_pixels_tab [1][dxy](c->scratchpad , s->last_picture.data[1] + offset, s->uvlinesize, 8); - s->dsp.put_pixels_tab [1][dxy](c->scratchpad+8 , s->last_picture.data[2] + offset, s->uvlinesize, 8); + s->dsp.put_pixels_tab [1][dxy](c->scratchpad , s->last_picture.f.data[1] + offset, s->uvlinesize, 8); + s->dsp.put_pixels_tab [1][dxy](c->scratchpad + 8, s->last_picture.f.data[2] + offset, s->uvlinesize, 8); } - dmin_sum += s->dsp.mb_cmp[1](s, s->new_picture.data[1] + s->mb_x*8 + s->mb_y*8*s->uvlinesize, c->scratchpad , s->uvlinesize, 8); - dmin_sum += s->dsp.mb_cmp[1](s, s->new_picture.data[2] + s->mb_x*8 + s->mb_y*8*s->uvlinesize, c->scratchpad+8, s->uvlinesize, 8); + dmin_sum += s->dsp.mb_cmp[1](s, s->new_picture.f.data[1] + s->mb_x*8 + s->mb_y*8*s->uvlinesize, c->scratchpad , s->uvlinesize, 8); + dmin_sum += s->dsp.mb_cmp[1](s, s->new_picture.f.data[2] + s->mb_x*8 + s->mb_y*8*s->uvlinesize, c->scratchpad+8, s->uvlinesize, 8); } c->pred_x= mx; @@ -879,7 +855,7 @@ Picture *p= s->current_picture_ptr; int mb_xy= mb_x + mb_y*s->mb_stride; int xy= 2*mb_x + 2*mb_y*s->b8_stride; - int mb_type= s->current_picture.mb_type[mb_xy]; + int mb_type= s->current_picture.f.mb_type[mb_xy]; int flags= c->flags; int shift= (flags&FLAG_QPEL) + 1; int mask= (1<block_index[i]; - clip_input_mv(s, p->motion_val[0][xy], !!IS_INTERLACED(mb_type)); - clip_input_mv(s, p->motion_val[1][xy], !!IS_INTERLACED(mb_type)); + clip_input_mv(s, p->f.motion_val[0][xy], !!IS_INTERLACED(mb_type)); + clip_input_mv(s, p->f.motion_val[1][xy], !!IS_INTERLACED(mb_type)); } if(IS_INTERLACED(mb_type)){ @@ -912,8 +888,8 @@ } if(USES_LIST(mb_type, 0)){ - int field_select0= p->ref_index[0][4*mb_xy ]; - int field_select1= p->ref_index[0][4*mb_xy+2]; + int field_select0= p->f.ref_index[0][4*mb_xy ]; + int field_select1= p->f.ref_index[0][4*mb_xy+2]; assert(field_select0==0 ||field_select0==1); assert(field_select1==0 ||field_select1==1); init_interlaced_ref(s, 0); @@ -921,46 +897,46 @@ if(p_type){ s->p_field_select_table[0][mb_xy]= field_select0; s->p_field_select_table[1][mb_xy]= field_select1; - *(uint32_t*)s->p_field_mv_table[0][field_select0][mb_xy]= *(uint32_t*)p->motion_val[0][xy ]; - *(uint32_t*)s->p_field_mv_table[1][field_select1][mb_xy]= *(uint32_t*)p->motion_val[0][xy2]; + *(uint32_t*)s->p_field_mv_table[0][field_select0][mb_xy] = *(uint32_t*)p->f.motion_val[0][xy ]; + *(uint32_t*)s->p_field_mv_table[1][field_select1][mb_xy] = *(uint32_t*)p->f.motion_val[0][xy2]; s->mb_type[mb_xy]=CANDIDATE_MB_TYPE_INTER_I; }else{ s->b_field_select_table[0][0][mb_xy]= field_select0; s->b_field_select_table[0][1][mb_xy]= field_select1; - *(uint32_t*)s->b_field_mv_table[0][0][field_select0][mb_xy]= *(uint32_t*)p->motion_val[0][xy ]; - *(uint32_t*)s->b_field_mv_table[0][1][field_select1][mb_xy]= *(uint32_t*)p->motion_val[0][xy2]; + *(uint32_t*)s->b_field_mv_table[0][0][field_select0][mb_xy] = *(uint32_t*)p->f.motion_val[0][xy ]; + *(uint32_t*)s->b_field_mv_table[0][1][field_select1][mb_xy] = *(uint32_t*)p->f.motion_val[0][xy2]; s->mb_type[mb_xy]= CANDIDATE_MB_TYPE_FORWARD_I; } - x= p->motion_val[0][xy ][0]; - y= p->motion_val[0][xy ][1]; + x = p->f.motion_val[0][xy ][0]; + y = p->f.motion_val[0][xy ][1]; d = cmp(s, x>>shift, y>>shift, x&mask, y&mask, 0, 8, field_select0, 0, cmpf, chroma_cmpf, flags); - x= p->motion_val[0][xy2][0]; - y= p->motion_val[0][xy2][1]; + x = p->f.motion_val[0][xy2][0]; + y = p->f.motion_val[0][xy2][1]; d+= cmp(s, x>>shift, y>>shift, x&mask, y&mask, 0, 8, field_select1, 1, cmpf, chroma_cmpf, flags); } if(USES_LIST(mb_type, 1)){ - int field_select0= p->ref_index[1][4*mb_xy ]; - int field_select1= p->ref_index[1][4*mb_xy+2]; + int field_select0 = p->f.ref_index[1][4 * mb_xy ]; + int field_select1 = p->f.ref_index[1][4 * mb_xy + 2]; assert(field_select0==0 ||field_select0==1); assert(field_select1==0 ||field_select1==1); init_interlaced_ref(s, 2); s->b_field_select_table[1][0][mb_xy]= field_select0; s->b_field_select_table[1][1][mb_xy]= field_select1; - *(uint32_t*)s->b_field_mv_table[1][0][field_select0][mb_xy]= *(uint32_t*)p->motion_val[1][xy ]; - *(uint32_t*)s->b_field_mv_table[1][1][field_select1][mb_xy]= *(uint32_t*)p->motion_val[1][xy2]; + *(uint32_t*)s->b_field_mv_table[1][0][field_select0][mb_xy] = *(uint32_t*)p->f.motion_val[1][xy ]; + *(uint32_t*)s->b_field_mv_table[1][1][field_select1][mb_xy] = *(uint32_t*)p->f.motion_val[1][xy2]; if(USES_LIST(mb_type, 0)){ s->mb_type[mb_xy]= CANDIDATE_MB_TYPE_BIDIR_I; }else{ s->mb_type[mb_xy]= CANDIDATE_MB_TYPE_BACKWARD_I; } - x= p->motion_val[1][xy ][0]; - y= p->motion_val[1][xy ][1]; + x = p->f.motion_val[1][xy ][0]; + y = p->f.motion_val[1][xy ][1]; d = cmp(s, x>>shift, y>>shift, x&mask, y&mask, 0, 8, field_select0+2, 0, cmpf, chroma_cmpf, flags); - x= p->motion_val[1][xy2][0]; - y= p->motion_val[1][xy2][1]; + x = p->f.motion_val[1][xy2][0]; + y = p->f.motion_val[1][xy2][1]; d+= cmp(s, x>>shift, y>>shift, x&mask, y&mask, 0, 8, field_select1+2, 1, cmpf, chroma_cmpf, flags); //FIXME bidir scores } @@ -976,33 +952,33 @@ init_mv4_ref(c); for(i=0; i<4; i++){ xy= s->block_index[i]; - x= p->motion_val[0][xy][0]; - y= p->motion_val[0][xy][1]; + x= p->f.motion_val[0][xy][0]; + y= p->f.motion_val[0][xy][1]; d+= cmp(s, x>>shift, y>>shift, x&mask, y&mask, 1, 8, i, i, cmpf, chroma_cmpf, flags); } s->mb_type[mb_xy]=CANDIDATE_MB_TYPE_INTER4V; }else{ if(USES_LIST(mb_type, 0)){ if(p_type){ - *(uint32_t*)s->p_mv_table[mb_xy]= *(uint32_t*)p->motion_val[0][xy]; + *(uint32_t*)s->p_mv_table[mb_xy] = *(uint32_t*)p->f.motion_val[0][xy]; s->mb_type[mb_xy]=CANDIDATE_MB_TYPE_INTER; }else if(USES_LIST(mb_type, 1)){ - *(uint32_t*)s->b_bidir_forw_mv_table[mb_xy]= *(uint32_t*)p->motion_val[0][xy]; - *(uint32_t*)s->b_bidir_back_mv_table[mb_xy]= *(uint32_t*)p->motion_val[1][xy]; + *(uint32_t*)s->b_bidir_forw_mv_table[mb_xy] = *(uint32_t*)p->f.motion_val[0][xy]; + *(uint32_t*)s->b_bidir_back_mv_table[mb_xy] = *(uint32_t*)p->f.motion_val[1][xy]; s->mb_type[mb_xy]=CANDIDATE_MB_TYPE_BIDIR; }else{ - *(uint32_t*)s->b_forw_mv_table[mb_xy]= *(uint32_t*)p->motion_val[0][xy]; + *(uint32_t*)s->b_forw_mv_table[mb_xy] = *(uint32_t*)p->f.motion_val[0][xy]; s->mb_type[mb_xy]=CANDIDATE_MB_TYPE_FORWARD; } - x= p->motion_val[0][xy][0]; - y= p->motion_val[0][xy][1]; + x = p->f.motion_val[0][xy][0]; + y = p->f.motion_val[0][xy][1]; d = cmp(s, x>>shift, y>>shift, x&mask, y&mask, 0, 16, 0, 0, cmpf, chroma_cmpf, flags); }else if(USES_LIST(mb_type, 1)){ - *(uint32_t*)s->b_back_mv_table[mb_xy]= *(uint32_t*)p->motion_val[1][xy]; + *(uint32_t*)s->b_back_mv_table[mb_xy] = *(uint32_t*)p->f.motion_val[1][xy]; s->mb_type[mb_xy]=CANDIDATE_MB_TYPE_BACKWARD; - x= p->motion_val[1][xy][0]; - y= p->motion_val[1][xy][1]; + x = p->f.motion_val[1][xy][0]; + y = p->f.motion_val[1][xy][1]; d = cmp(s, x>>shift, y>>shift, x&mask, y&mask, 0, 16, 2, 0, cmpf, chroma_cmpf, flags); }else s->mb_type[mb_xy]=CANDIDATE_MB_TYPE_INTRA; @@ -1023,7 +999,7 @@ int mb_type=0; Picture * const pic= &s->current_picture; - init_ref(c, s->new_picture.data, s->last_picture.data, NULL, 16*mb_x, 16*mb_y, 0); + init_ref(c, s->new_picture.f.data, s->last_picture.f.data, NULL, 16*mb_x, 16*mb_y, 0); assert(s->quarter_sample==0 || s->quarter_sample==1); assert(s->linesize == c->stride); @@ -1040,7 +1016,7 @@ /* intra / predictive decision */ pix = c->src[0][0]; sum = s->dsp.pix_sum(pix, s->linesize); - varc = s->dsp.pix_norm1(pix, s->linesize) - (((unsigned)(sum*sum))>>8) + 500; + varc = s->dsp.pix_norm1(pix, s->linesize) - (((unsigned)sum*sum)>>8) + 500; pic->mb_mean[s->mb_stride * mb_y + mb_x] = (sum+128)>>8; pic->mb_var [s->mb_stride * mb_y + mb_x] = (varc+128)>>8; @@ -1075,16 +1051,16 @@ const int mot_stride = s->b8_stride; const int mot_xy = s->block_index[0]; - P_LEFT[0] = s->current_picture.motion_val[0][mot_xy - 1][0]; - P_LEFT[1] = s->current_picture.motion_val[0][mot_xy - 1][1]; + P_LEFT[0] = s->current_picture.f.motion_val[0][mot_xy - 1][0]; + P_LEFT[1] = s->current_picture.f.motion_val[0][mot_xy - 1][1]; if(P_LEFT[0] > (c->xmax<xmax<first_slice_line) { - P_TOP[0] = s->current_picture.motion_val[0][mot_xy - mot_stride ][0]; - P_TOP[1] = s->current_picture.motion_val[0][mot_xy - mot_stride ][1]; - P_TOPRIGHT[0] = s->current_picture.motion_val[0][mot_xy - mot_stride + 2][0]; - P_TOPRIGHT[1] = s->current_picture.motion_val[0][mot_xy - mot_stride + 2][1]; + P_TOP[0] = s->current_picture.f.motion_val[0][mot_xy - mot_stride ][0]; + P_TOP[1] = s->current_picture.f.motion_val[0][mot_xy - mot_stride ][1]; + P_TOPRIGHT[0] = s->current_picture.f.motion_val[0][mot_xy - mot_stride + 2][0]; + P_TOPRIGHT[1] = s->current_picture.f.motion_val[0][mot_xy - mot_stride + 2][1]; if(P_TOP[1] > (c->ymax<ymax<xmin<xmin< (c->ymax<ymax<avctx->mb_cmp&0xFF)==FF_CMP_SSE){ intra_score= varc - 500; }else{ - int mean= (sum+128)>>8; + unsigned mean = (sum+128)>>8; mean*= 0x01010101; for(i=0; i<16; i++){ @@ -1214,37 +1190,13 @@ intra_score= s->dsp.mb_cmp[0](s, c->scratchpad, pix, s->linesize, 16); } -#if 0 //FIXME - /* get chroma score */ - if(c->avctx->mb_cmp&FF_CMP_CHROMA){ - for(i=1; i<3; i++){ - uint8_t *dest_c; - int mean; - - if(s->out_format == FMT_H263){ - mean= (s->dc_val[i][mb_x + mb_y*s->b8_stride] + 4)>>3; //FIXME not exact but simple ;) - }else{ - mean= (s->last_dc[i] + 4)>>3; - } - dest_c = s->new_picture.data[i] + (mb_y * 8 * (s->uvlinesize)) + mb_x * 8; - - mean*= 0x01010101; - for(i=0; i<8; i++){ - *(uint32_t*)(&c->scratchpad[i*s->uvlinesize+ 0]) = mean; - *(uint32_t*)(&c->scratchpad[i*s->uvlinesize+ 4]) = mean; - } - - intra_score+= s->dsp.mb_cmp[1](s, c->scratchpad, dest_c, s->uvlinesize); - } - } -#endif intra_score += c->mb_penalty_factor*16; if(intra_score < dmin){ mb_type= CANDIDATE_MB_TYPE_INTRA; - s->current_picture.mb_type[mb_y*s->mb_stride + mb_x]= CANDIDATE_MB_TYPE_INTRA; //FIXME cleanup + s->current_picture.f.mb_type[mb_y*s->mb_stride + mb_x] = CANDIDATE_MB_TYPE_INTRA; //FIXME cleanup }else - s->current_picture.mb_type[mb_y*s->mb_stride + mb_x]= 0; + s->current_picture.f.mb_type[mb_y*s->mb_stride + mb_x] = 0; { int p_score= FFMIN(vard, varc-500+(s->lambda2>>FF_LAMBDA_SHIFT)*100); @@ -1264,7 +1216,7 @@ int P[10][2]; const int shift= 1+s->quarter_sample; const int xy= mb_x + mb_y*s->mb_stride; - init_ref(c, s->new_picture.data, s->last_picture.data, NULL, 16*mb_x, 16*mb_y, 0); + init_ref(c, s->new_picture.f.data, s->last_picture.f.data, NULL, 16*mb_x, 16*mb_y, 0); assert(s->quarter_sample==0 || s->quarter_sample==1); @@ -1615,7 +1567,7 @@ ymin= xmin=(-32)>>shift; ymax= xmax= 31>>shift; - if(IS_8X8(s->next_picture.mb_type[mot_xy])){ + if (IS_8X8(s->next_picture.f.mb_type[mot_xy])) { s->mv_type= MV_TYPE_8X8; }else{ s->mv_type= MV_TYPE_16X16; @@ -1625,8 +1577,8 @@ int index= s->block_index[i]; int min, max; - c->co_located_mv[i][0]= s->next_picture.motion_val[0][index][0]; - c->co_located_mv[i][1]= s->next_picture.motion_val[0][index][1]; + c->co_located_mv[i][0] = s->next_picture.f.motion_val[0][index][0]; + c->co_located_mv[i][1] = s->next_picture.f.motion_val[0][index][1]; c->direct_basis_mv[i][0]= c->co_located_mv[i][0]*time_pb/time_pp + ((i& 1)<<(shift+3)); c->direct_basis_mv[i][1]= c->co_located_mv[i][1]*time_pb/time_pp + ((i>>1)<<(shift+3)); // c->direct_basis_mv[1][i][0]= c->co_located_mv[i][0]*(time_pb - time_pp)/time_pp + ((i &1)<<(shift+3); @@ -1708,13 +1660,14 @@ int fmin, bmin, dmin, fbmin, bimin, fimin; int type=0; const int xy = mb_y*s->mb_stride + mb_x; - init_ref(c, s->new_picture.data, s->last_picture.data, s->next_picture.data, 16*mb_x, 16*mb_y, 2); + init_ref(c, s->new_picture.f.data, s->last_picture.f.data, + s->next_picture.f.data, 16 * mb_x, 16 * mb_y, 2); get_limits(s, 16*mb_x, 16*mb_y); c->skip=0; - if(s->codec_id == CODEC_ID_MPEG4 && s->next_picture.mbskip_table[xy]){ + if (s->codec_id == CODEC_ID_MPEG4 && s->next_picture.f.mbskip_table[xy]) { int score= direct_search(s, mb_x, mb_y); //FIXME just check 0,0 score= ((unsigned)(score*score + 128*256))>>16; @@ -1849,10 +1802,6 @@ if(dmin>256*256*16) type&= ~CANDIDATE_MB_TYPE_DIRECT; //do not try direct mode if it is invalid for this MB if(s->codec_id == CODEC_ID_MPEG4 && type&CANDIDATE_MB_TYPE_DIRECT && s->flags&CODEC_FLAG_MV0 && *(uint32_t*)s->b_direct_mv_table[xy]) type |= CANDIDATE_MB_TYPE_DIRECT0; -#if 0 - if(s->out_format == FMT_MPEG1) - type |= CANDIDATE_MB_TYPE_INTRA; -#endif } s->mb_type[mb_y*s->mb_stride + mb_x]= type; @@ -1947,14 +1896,14 @@ int block; for(block=0; block<4; block++){ int off= (block& 1) + (block>>1)*wrap; - int mx= s->current_picture.motion_val[0][ xy + off ][0]; - int my= s->current_picture.motion_val[0][ xy + off ][1]; + int mx = s->current_picture.f.motion_val[0][ xy + off ][0]; + int my = s->current_picture.f.motion_val[0][ xy + off ][1]; if( mx >=range || mx <-range || my >=range || my <-range){ s->mb_type[i] &= ~CANDIDATE_MB_TYPE_INTER4V; s->mb_type[i] |= CANDIDATE_MB_TYPE_INTRA; - s->current_picture.mb_type[i]= CANDIDATE_MB_TYPE_INTRA; + s->current_picture.f.mb_type[i] = CANDIDATE_MB_TYPE_INTRA; } } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/motion_est_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/motion_est_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/motion_est_template.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/motion_est_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -44,75 +44,6 @@ COPY3_IF_LT(dmin, d, bx, hx, by, hy)\ } -#if 0 -static int hpel_motion_search)(MpegEncContext * s, - int *mx_ptr, int *my_ptr, int dmin, - uint8_t *ref_data[3], - int size) -{ - const int xx = 16 * s->mb_x + 8*(n&1); - const int yy = 16 * s->mb_y + 8*(n>>1); - const int mx = *mx_ptr; - const int my = *my_ptr; - const int penalty_factor= c->sub_penalty_factor; - - LOAD_COMMON - - // INIT; - //FIXME factorize - me_cmp_func cmp, chroma_cmp, cmp_sub, chroma_cmp_sub; - - if(s->no_rounding /*FIXME b_type*/){ - hpel_put= &s->dsp.put_no_rnd_pixels_tab[size]; - chroma_hpel_put= &s->dsp.put_no_rnd_pixels_tab[size+1]; - }else{ - hpel_put=& s->dsp.put_pixels_tab[size]; - chroma_hpel_put= &s->dsp.put_pixels_tab[size+1]; - } - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; - cmp_sub= s->dsp.me_sub_cmp[size]; - chroma_cmp_sub= s->dsp.me_sub_cmp[size+1]; - - if(c->skip){ //FIXME somehow move up (benchmark) - *mx_ptr = 0; - *my_ptr = 0; - return dmin; - } - - if(c->avctx->me_cmp != c->avctx->me_sub_cmp){ - CMP_HPEL(dmin, 0, 0, mx, my, size); - if(mx || my) - dmin += (mv_penalty[2*mx - pred_x] + mv_penalty[2*my - pred_y])*penalty_factor; - } - - if (mx > xmin && mx < xmax && - my > ymin && my < ymax) { - int bx=2*mx, by=2*my; - int d= dmin; - - CHECK_HALF_MV(1, 1, mx-1, my-1) - CHECK_HALF_MV(0, 1, mx , my-1) - CHECK_HALF_MV(1, 1, mx , my-1) - CHECK_HALF_MV(1, 0, mx-1, my ) - CHECK_HALF_MV(1, 0, mx , my ) - CHECK_HALF_MV(1, 1, mx-1, my ) - CHECK_HALF_MV(0, 1, mx , my ) - CHECK_HALF_MV(1, 1, mx , my ) - - assert(bx >= xmin*2 || bx <= xmax*2 || by >= ymin*2 || by <= ymax*2); - - *mx_ptr = bx; - *my_ptr = by; - }else{ - *mx_ptr =2*mx; - *my_ptr =2*my; - } - - return dmin; -} - -#else static int hpel_motion_search(MpegEncContext * s, int *mx_ptr, int *my_ptr, int dmin, int src_index, int ref_index, @@ -158,8 +89,8 @@ const int b= score_map[(index+(1<penalty_factor; - int key; - int map_generation= c->map_generation; + unsigned key; + unsigned map_generation= c->map_generation; #ifndef NDEBUG uint32_t *map= c->map; #endif @@ -218,7 +149,6 @@ return dmin; } -#endif static int no_sub_motion_search(MpegEncContext * s, int *mx_ptr, int *my_ptr, int dmin, @@ -278,7 +208,7 @@ const int mx = *mx_ptr; const int my = *my_ptr; const int penalty_factor= c->sub_penalty_factor; - const int map_generation= c->map_generation; + const unsigned map_generation = c->map_generation; const int subpel_quality= c->avctx->me_subpel_quality; uint32_t *map= c->map; me_cmp_func cmpf, chroma_cmpf; @@ -321,7 +251,6 @@ int best_pos[8][2]; memset(best, 64, sizeof(int)*8); -#if 1 if(s->me.dia_size>=2){ const int tl= score_map[(index-(1<>2, ny>>2) } -#if 0 - const int tl= score_map[(index-(1<>2, (ny + oy[i])>>2) - } -#endif -#if 0 - //outer ring - CHECK_QUARTER_MV(1, 3, mx-1, my-1) - CHECK_QUARTER_MV(1, 2, mx-1, my-1) - CHECK_QUARTER_MV(1, 1, mx-1, my-1) - CHECK_QUARTER_MV(2, 1, mx-1, my-1) - CHECK_QUARTER_MV(3, 1, mx-1, my-1) - CHECK_QUARTER_MV(0, 1, mx , my-1) - CHECK_QUARTER_MV(1, 1, mx , my-1) - CHECK_QUARTER_MV(2, 1, mx , my-1) - CHECK_QUARTER_MV(3, 1, mx , my-1) - CHECK_QUARTER_MV(3, 2, mx , my-1) - CHECK_QUARTER_MV(3, 3, mx , my-1) - CHECK_QUARTER_MV(3, 0, mx , my ) - CHECK_QUARTER_MV(3, 1, mx , my ) - CHECK_QUARTER_MV(3, 2, mx , my ) - CHECK_QUARTER_MV(3, 3, mx , my ) - CHECK_QUARTER_MV(2, 3, mx , my ) - CHECK_QUARTER_MV(1, 3, mx , my ) - CHECK_QUARTER_MV(0, 3, mx , my ) - CHECK_QUARTER_MV(3, 3, mx-1, my ) - CHECK_QUARTER_MV(2, 3, mx-1, my ) - CHECK_QUARTER_MV(1, 3, mx-1, my ) - CHECK_QUARTER_MV(1, 2, mx-1, my ) - CHECK_QUARTER_MV(1, 1, mx-1, my ) - CHECK_QUARTER_MV(1, 0, mx-1, my ) -#endif assert(bx >= xmin*4 && bx <= xmax*4 && by >= ymin*4 && by <= ymax*4); *mx_ptr = bx; @@ -495,7 +354,7 @@ #define CHECK_MV(x,y)\ {\ - const int key= ((y)<= xmin);\ assert((x) <= xmax);\ @@ -523,7 +382,7 @@ #define CHECK_MV_DIR(x,y,new_dir)\ {\ - const int key= ((y)<map_generation; + unsigned map_generation = c->map_generation; cmpf= s->dsp.me_cmp[size]; chroma_cmpf= s->dsp.me_cmp[size+1]; { /* ensure that the best point is in the MAP as h/qpel refinement needs it */ - const int key= (best[1]<map_generation; + unsigned map_generation = c->map_generation; cmpf= s->dsp.me_cmp[size]; chroma_cmpf= s->dsp.me_cmp[size+1]; @@ -644,7 +503,7 @@ me_cmp_func cmpf, chroma_cmpf; LOAD_COMMON LOAD_COMMON2 - int map_generation= c->map_generation; + unsigned map_generation = c->map_generation; int x,y,d; const int dec= dia_size & (dia_size-1); @@ -678,7 +537,7 @@ me_cmp_func cmpf, chroma_cmpf; LOAD_COMMON LOAD_COMMON2 - int map_generation= c->map_generation; + unsigned map_generation = c->map_generation; int x,y,i,d; int dia_size= c->dia_size&0xFF; const int dec= dia_size & (dia_size-1); @@ -716,7 +575,7 @@ me_cmp_func cmpf, chroma_cmpf; LOAD_COMMON LOAD_COMMON2 - int map_generation= c->map_generation; + unsigned map_generation = c->map_generation; int x,y,x2,y2, i, j, d; const int dia_size= c->dia_size&0xFE; static const int hex[16][2]={{-4,-2}, {-4,-1}, {-4, 0}, {-4, 1}, {-4, 2}, @@ -763,7 +622,7 @@ me_cmp_func cmpf, chroma_cmpf; LOAD_COMMON LOAD_COMMON2 - int map_generation= c->map_generation; + unsigned map_generation = c->map_generation; int x,y, d; const int dia_size= c->dia_size&0xFF; @@ -792,7 +651,7 @@ #define SAB_CHECK_MV(ax,ay)\ {\ - const int key= ((ay)<map_generation; + unsigned map_generation = c->map_generation; cmpf= s->dsp.me_cmp[size]; chroma_cmpf= s->dsp.me_cmp[size+1]; @@ -916,7 +775,7 @@ int dia_size; LOAD_COMMON LOAD_COMMON2 - int map_generation= c->map_generation; + unsigned map_generation = c->map_generation; cmpf= s->dsp.me_cmp[size]; chroma_cmpf= s->dsp.me_cmp[size+1]; @@ -990,8 +849,8 @@ return var_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags); } -/*! - \param P[10][2] a list of candidate mvs to check before starting the +/** + @param P a list of candidate mvs to check before starting the iterative search. If one of the candidates is close to the optimal mv, then it takes fewer iterations. And it increases the chance that we find the optimal mv. @@ -1001,14 +860,14 @@ int ref_mv_scale, int flags, int size, int h) { MotionEstContext * const c= &s->me; - int best[2]={0, 0}; /*!< x and y coordinates of the best motion vector. + int best[2]={0, 0}; /**< x and y coordinates of the best motion vector. i.e. the difference between the position of the block currently being encoded and the position of the block chosen to predict it from. */ int d; ///< the score (cmp + penalty) of any given mv - int dmin; /*!< the best value of d, i.e. the score + int dmin; /**< the best value of d, i.e. the score corresponding to the mv stored in best[]. */ - int map_generation; + unsigned map_generation; int penalty_factor; const int ref_mv_stride= s->mb_stride; //pass as arg FIXME const int ref_mv_xy= s->mb_x + s->mb_y*ref_mv_stride; //add to last_mv beforepassing FIXME @@ -1136,7 +995,7 @@ MotionEstContext * const c= &s->me; int best[2]={0, 0}; int d, dmin; - int map_generation; + unsigned map_generation; const int penalty_factor= c->penalty_factor; const int size=1; const int h=8; @@ -1196,7 +1055,7 @@ MotionEstContext * const c= &s->me; int best[2]={0, 0}; int d, dmin; - int map_generation; + unsigned map_generation; const int penalty_factor= c->penalty_factor; const int size=0; //FIXME pass as arg const int h=8; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/motionpixels.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/motionpixels.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/motionpixels.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/motionpixels.c 2012-01-11 00:34:30.000000000 +0000 @@ -52,14 +52,16 @@ static av_cold int mp_decode_init(AVCodecContext *avctx) { MotionPixelsContext *mp = avctx->priv_data; + int w4 = (avctx->width + 3) & ~3; + int h4 = (avctx->height + 3) & ~3; motionpixels_tableinit(); mp->avctx = avctx; dsputil_init(&mp->dsp, avctx); - mp->changes_map = av_mallocz(avctx->width * avctx->height); + mp->changes_map = av_mallocz(avctx->width * h4); mp->offset_bits_len = av_log2(avctx->width * avctx->height) + 1; mp->vpt = av_mallocz(avctx->height * sizeof(YuvPixel)); - mp->hpt = av_mallocz(avctx->height * avctx->width / 16 * sizeof(YuvPixel)); + mp->hpt = av_mallocz(h4 * w4 / 16 * sizeof(YuvPixel)); avctx->pix_fmt = PIX_FMT_RGB555; return 0; } @@ -252,6 +254,7 @@ mp->dsp.bswap_buf((uint32_t *)mp->bswapbuf, (const uint32_t *)buf, buf_size / 4); if (buf_size & 3) memcpy(mp->bswapbuf + (buf_size & ~3), buf + (buf_size & ~3), buf_size & 3); + memset(mp->bswapbuf + buf_size, 0, FF_INPUT_BUFFER_PADDING_SIZE); init_get_bits(&gb, mp->bswapbuf, buf_size * 8); memset(mp->changes_map, 0, avctx->width * avctx->height); @@ -278,7 +281,10 @@ if (sz == 0) goto end; - init_vlc(&mp->vlc, mp->max_codes_bits, mp->codes_count, &mp->codes[0].size, sizeof(HuffCode), 1, &mp->codes[0].code, sizeof(HuffCode), 4, 0); + if (mp->max_codes_bits <= 0) + goto end; + if (init_vlc(&mp->vlc, mp->max_codes_bits, mp->codes_count, &mp->codes[0].size, sizeof(HuffCode), 1, &mp->codes[0].code, sizeof(HuffCode), 4, 0)) + goto end; mp_decode_frame_helper(mp, &gb); free_vlc(&mp->vlc); @@ -303,14 +309,13 @@ } AVCodec ff_motionpixels_decoder = { - "motionpixels", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MOTIONPIXELS, - sizeof(MotionPixelsContext), - mp_decode_init, - NULL, - mp_decode_end, - mp_decode_frame, - CODEC_CAP_DR1, + .name = "motionpixels", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MOTIONPIXELS, + .priv_data_size = sizeof(MotionPixelsContext), + .init = mp_decode_init, + .close = mp_decode_end, + .decode = mp_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Motion Pixels video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/motion-test.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/motion-test.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/motion-test.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/motion-test.c 2012-01-11 00:34:30.000000000 +0000 @@ -33,14 +33,13 @@ #include "dsputil.h" #include "libavutil/lfg.h" -#undef exit #undef printf #define WIDTH 64 #define HEIGHT 64 -uint8_t img1[WIDTH * HEIGHT]; -uint8_t img2[WIDTH * HEIGHT]; +static uint8_t img1[WIDTH * HEIGHT]; +static uint8_t img2[WIDTH * HEIGHT]; static void fill_random(uint8_t *tab, int size) { @@ -61,7 +60,6 @@ { printf("motion-test [-h]\n" "test motion implementations\n"); - exit(1); } static int64_t gettime(void) @@ -138,13 +136,13 @@ switch(c) { case 'h': help(); - break; + return 1; } } - printf("ffmpeg motion test\n"); + printf("Libav motion test\n"); - ctx = avcodec_alloc_context(); + ctx = avcodec_alloc_context3(NULL); ctx->dsp_mask = AV_CPU_FLAG_FORCE; dsputil_init(&cctx, ctx); for (c = 0; c < flags_size; c++) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mp3_header_decompress_bsf.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mp3_header_decompress_bsf.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mp3_header_decompress_bsf.c 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mp3_header_decompress_bsf.c 2012-01-11 00:34:30.000000000 +0000 @@ -50,10 +50,10 @@ lsf = sample_rate < (24000+32000)/2; mpeg25 = sample_rate < (12000+16000)/2; sample_rate_index= (header>>10)&3; - sample_rate= ff_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25); //in case sample rate is a little off + sample_rate= avpriv_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25); //in case sample rate is a little off for(bitrate_index=2; bitrate_index<30; bitrate_index++){ - frame_size = ff_mpa_bitrate_tab[lsf][2][bitrate_index>>1]; + frame_size = avpriv_mpa_bitrate_tab[lsf][2][bitrate_index>>1]; frame_size = (frame_size * 144000) / (sample_rate << lsf) + (bitrate_index&1); if(frame_size == buf_size + 4) break; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpc7.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpc7.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpc7.c 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpc7.c 2012-01-11 00:34:30.000000000 +0000 @@ -61,6 +61,13 @@ static VLC_TYPE hdr_table[1 << MPC7_HDR_BITS][2]; static VLC_TYPE quant_tables[7224][2]; + /* Musepack SV7 is always stereo */ + if (avctx->channels != 2) { + av_log_ask_for_sample(avctx, "Unsupported number of channels: %d\n", + avctx->channels); + return AVERROR_PATCHWELCOME; + } + if(avctx->extradata_size < 16){ av_log(avctx, AV_LOG_ERROR, "Too small extradata size (%i)!\n", avctx->extradata_size); return -1; @@ -88,7 +95,7 @@ c->frames_to_skip = 0; avctx->sample_fmt = AV_SAMPLE_FMT_S16; - avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; + avctx->channel_layout = AV_CH_LAYOUT_STEREO; if(vlc_initialized) return 0; av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n"); @@ -129,6 +136,10 @@ } } vlc_initialized = 1; + + avcodec_get_frame_defaults(&c->frame); + avctx->coded_frame = &c->frame; + return 0; } @@ -185,9 +196,8 @@ return ref + t; } -static int mpc7_decode_frame(AVCodecContext * avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int mpc7_decode_frame(AVCodecContext * avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; @@ -197,12 +207,20 @@ int i, ch; int mb = -1; Band *bands = c->bands; - int off; + int off, ret; int bits_used, bits_avail; - memset(bands, 0, sizeof(bands)); + memset(bands, 0, sizeof(*bands) * (c->maxbands + 1)); if(buf_size <= 4){ av_log(avctx, AV_LOG_ERROR, "Too small buffer passed (%i bytes)\n", buf_size); + return AVERROR(EINVAL); + } + + /* get output buffer */ + c->frame.nb_samples = buf[1] ? c->lastframelen : MPC_FRAME_SIZE; + if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; } bits = av_malloc(((buf_size - 1) & ~3) + FF_INPUT_BUFFER_PADDING_SIZE); @@ -262,7 +280,7 @@ for(ch = 0; ch < 2; ch++) idx_to_quant(c, &gb, bands[i].res[ch], c->Q[ch] + off); - ff_mpc_dequantize_and_synth(c, mb, data, 2); + ff_mpc_dequantize_and_synth(c, mb, c->frame.data[0], 2); av_free(bits); @@ -274,10 +292,12 @@ } if(c->frames_to_skip){ c->frames_to_skip--; - *data_size = 0; + *got_frame_ptr = 0; return buf_size; } - *data_size = (buf[1] ? c->lastframelen : MPC_FRAME_SIZE) * 4; + + *got_frame_ptr = 1; + *(AVFrame *)data = c->frame; return buf_size; } @@ -291,14 +311,13 @@ } AVCodec ff_mpc7_decoder = { - "mpc7", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MUSEPACK7, - sizeof(MPCContext), - mpc7_decode_init, - NULL, - NULL, - mpc7_decode_frame, + .name = "mpc7", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MUSEPACK7, + .priv_data_size = sizeof(MPCContext), + .init = mpc7_decode_init, + .decode = mpc7_decode_frame, .flush = mpc7_decode_flush, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Musepack SV7"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpc8.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpc8.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpc8.c 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpc8.c 2012-01-11 00:34:30.000000000 +0000 @@ -228,12 +228,15 @@ &mpc8_q8_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); } vlc_initialized = 1; + + avcodec_get_frame_defaults(&c->frame); + avctx->coded_frame = &c->frame; + return 0; } -static int mpc8_decode_frame(AVCodecContext * avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int mpc8_decode_frame(AVCodecContext * avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; @@ -245,6 +248,13 @@ int maxband, keyframe; int last[2]; + /* get output buffer */ + c->frame.nb_samples = MPC_FRAME_SIZE; + if ((res = avctx->get_buffer(avctx, &c->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return res; + } + keyframe = c->cur_frame == 0; if(keyframe){ @@ -260,6 +270,8 @@ maxband = c->last_max_band + get_vlc2(gb, band_vlc.table, MPC8_BANDS_BITS, 2); if(maxband > 32) maxband -= 33; } + if(maxband > c->maxbands) + return AVERROR_INVALIDDATA; c->last_max_band = maxband; /* read subband indexes */ @@ -393,26 +405,27 @@ } } - ff_mpc_dequantize_and_synth(c, maxband, data, avctx->channels); + ff_mpc_dequantize_and_synth(c, maxband, c->frame.data[0], avctx->channels); c->cur_frame++; c->last_bits_used = get_bits_count(gb); if(c->cur_frame >= c->frames) c->cur_frame = 0; - *data_size = MPC_FRAME_SIZE * 2 * avctx->channels; + + *got_frame_ptr = 1; + *(AVFrame *)data = c->frame; return c->cur_frame ? c->last_bits_used >> 3 : buf_size; } AVCodec ff_mpc8_decoder = { - "mpc8", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MUSEPACK8, - sizeof(MPCContext), - mpc8_decode_init, - NULL, - NULL, - mpc8_decode_frame, + .name = "mpc8", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MUSEPACK8, + .priv_data_size = sizeof(MPCContext), + .init = mpc8_decode_init, + .decode = mpc8_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Musepack SV8"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpc.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpc.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpc.h 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpc.h 2012-01-11 00:34:30.000000000 +0000 @@ -50,6 +50,7 @@ }Band; typedef struct { + AVFrame frame; DSPContext dsp; MPADSPContext mpadsp; GetBitContext gb; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg12.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg12.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg12.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg12.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,6 @@ /* * MPEG-1/2 decoder - * Copyright (c) 2000,2001 Fabrice Bellard + * Copyright (c) 2000, 2001 Fabrice Bellard * Copyright (c) 2002-2004 Michael Niedermayer * * This file is part of Libav. @@ -49,343 +49,867 @@ #define MB_PTYPE_VLC_BITS 6 #define MB_BTYPE_VLC_BITS 6 -static inline int mpeg1_decode_block_intra(MpegEncContext *s, - DCTELEM *block, - int n); -static inline int mpeg1_decode_block_inter(MpegEncContext *s, - DCTELEM *block, - int n); -static inline int mpeg1_fast_decode_block_inter(MpegEncContext *s, DCTELEM *block, int n); -static inline int mpeg2_decode_block_non_intra(MpegEncContext *s, - DCTELEM *block, - int n); -static inline int mpeg2_decode_block_intra(MpegEncContext *s, - DCTELEM *block, - int n); -static inline int mpeg2_fast_decode_block_non_intra(MpegEncContext *s, DCTELEM *block, int n); -static inline int mpeg2_fast_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n); -static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred); -static void exchange_uv(MpegEncContext *s); +static VLC mv_vlc; -static const enum PixelFormat pixfmt_xvmc_mpg2_420[] = { - PIX_FMT_XVMC_MPEG2_IDCT, - PIX_FMT_XVMC_MPEG2_MC, - PIX_FMT_NONE}; +/* as H.263, but only 17 codes */ +static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred) +{ + int code, sign, val, shift; -uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3]; + code = get_vlc2(&s->gb, mv_vlc.table, MV_VLC_BITS, 2); + if (code == 0) { + return pred; + } + if (code < 0) { + return 0xffff; + } + sign = get_bits1(&s->gb); + shift = fcode - 1; + val = code; + if (shift) { + val = (val - 1) << shift; + val |= get_bits(&s->gb, shift); + val++; + } + if (sign) + val = -val; + val += pred; -#define INIT_2D_VLC_RL(rl, static_size)\ -{\ - static RL_VLC_ELEM rl_vlc_table[static_size];\ - INIT_VLC_STATIC(&rl.vlc, TEX_VLC_BITS, rl.n + 2,\ - &rl.table_vlc[0][1], 4, 2,\ - &rl.table_vlc[0][0], 4, 2, static_size);\ -\ - rl.rl_vlc[0]= rl_vlc_table;\ - init_2d_vlc_rl(&rl);\ + /* modulo decoding */ + return sign_extend(val, 5 + shift); } -static void init_2d_vlc_rl(RLTable *rl) +static inline int mpeg1_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n) { - int i; + int level, dc, diff, i, j, run; + int component; + RLTable *rl = &ff_rl_mpeg1; + uint8_t * const scantable = s->intra_scantable.permutated; + const uint16_t *quant_matrix = s->intra_matrix; + const int qscale = s->qscale; - for(i=0; ivlc.table_size; i++){ - int code= rl->vlc.table[i][0]; - int len = rl->vlc.table[i][1]; - int level, run; + /* DC coefficient */ + component = (n <= 3 ? 0 : n - 4 + 1); + diff = decode_dc(&s->gb, component); + if (diff >= 0xffff) + return -1; + dc = s->last_dc[component]; + dc += diff; + s->last_dc[component] = dc; + block[0] = dc * quant_matrix[0]; + av_dlog(s->avctx, "dc=%d diff=%d\n", dc, diff); + i = 0; + { + OPEN_READER(re, &s->gb); + /* now quantify & encode AC coefficients */ + for (;;) { + UPDATE_CACHE(re, &s->gb); + GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); + + if (level == 127) { + break; + } else if (level != 0) { + i += run; + j = scantable[i]; + level = (level * qscale * quant_matrix[j]) >> 4; + level = (level - 1) | 1; + level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); + LAST_SKIP_BITS(re, &s->gb, 1); + } else { + /* escape */ + run = SHOW_UBITS(re, &s->gb, 6) + 1; LAST_SKIP_BITS(re, &s->gb, 6); + UPDATE_CACHE(re, &s->gb); + level = SHOW_SBITS(re, &s->gb, 8); SKIP_BITS(re, &s->gb, 8); + if (level == -128) { + level = SHOW_UBITS(re, &s->gb, 8) - 256; LAST_SKIP_BITS(re, &s->gb, 8); + } else if (level == 0) { + level = SHOW_UBITS(re, &s->gb, 8) ; LAST_SKIP_BITS(re, &s->gb, 8); + } + i += run; + j = scantable[i]; + if (level < 0) { + level = -level; + level = (level * qscale * quant_matrix[j]) >> 4; + level = (level - 1) | 1; + level = -level; + } else { + level = (level * qscale * quant_matrix[j]) >> 4; + level = (level - 1) | 1; + } + } + if (i > 63) { + av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y); + return -1; + } - if(len==0){ // illegal code - run= 65; - level= MAX_LEVEL; - }else if(len<0){ //more bits needed - run= 0; - level= code; - }else{ - if(code==rl->n){ //esc - run= 65; - level= 0; - }else if(code==rl->n+1){ //eob - run= 0; - level= 127; - }else{ - run= rl->table_run [code] + 1; - level= rl->table_level[code]; - } - } - rl->rl_vlc[0][i].len= len; - rl->rl_vlc[0][i].level= level; - rl->rl_vlc[0][i].run= run; + block[j] = level; + } + CLOSE_READER(re, &s->gb); } + s->block_last_index[n] = i; + return 0; } -void ff_mpeg12_common_init(MpegEncContext *s) +int ff_mpeg1_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n) { - - s->y_dc_scale_table= - s->c_dc_scale_table= ff_mpeg2_dc_scale_table[s->intra_dc_precision]; - -} - -void ff_mpeg1_clean_buffers(MpegEncContext *s){ - s->last_dc[0] = 1 << (7 + s->intra_dc_precision); - s->last_dc[1] = s->last_dc[0]; - s->last_dc[2] = s->last_dc[0]; - memset(s->last_mv, 0, sizeof(s->last_mv)); + return mpeg1_decode_block_intra(s, block, n); } - -/******************************************/ -/* decoding */ - -VLC ff_dc_lum_vlc; -VLC ff_dc_chroma_vlc; - -static VLC mv_vlc; -static VLC mbincr_vlc; -static VLC mb_ptype_vlc; -static VLC mb_btype_vlc; -static VLC mb_pat_vlc; - -av_cold void ff_mpeg12_init_vlcs(void) +static inline int mpeg1_decode_block_inter(MpegEncContext *s, DCTELEM *block, int n) { - static int done = 0; - - if (!done) { - done = 1; + int level, i, j, run; + RLTable *rl = &ff_rl_mpeg1; + uint8_t * const scantable = s->intra_scantable.permutated; + const uint16_t *quant_matrix = s->inter_matrix; + const int qscale = s->qscale; - INIT_VLC_STATIC(&ff_dc_lum_vlc, DC_VLC_BITS, 12, - ff_mpeg12_vlc_dc_lum_bits, 1, 1, - ff_mpeg12_vlc_dc_lum_code, 2, 2, 512); - INIT_VLC_STATIC(&ff_dc_chroma_vlc, DC_VLC_BITS, 12, - ff_mpeg12_vlc_dc_chroma_bits, 1, 1, - ff_mpeg12_vlc_dc_chroma_code, 2, 2, 514); - INIT_VLC_STATIC(&mv_vlc, MV_VLC_BITS, 17, - &ff_mpeg12_mbMotionVectorTable[0][1], 2, 1, - &ff_mpeg12_mbMotionVectorTable[0][0], 2, 1, 518); - INIT_VLC_STATIC(&mbincr_vlc, MBINCR_VLC_BITS, 36, - &ff_mpeg12_mbAddrIncrTable[0][1], 2, 1, - &ff_mpeg12_mbAddrIncrTable[0][0], 2, 1, 538); - INIT_VLC_STATIC(&mb_pat_vlc, MB_PAT_VLC_BITS, 64, - &ff_mpeg12_mbPatTable[0][1], 2, 1, - &ff_mpeg12_mbPatTable[0][0], 2, 1, 512); + { + OPEN_READER(re, &s->gb); + i = -1; + // special case for first coefficient, no need to add second VLC table + UPDATE_CACHE(re, &s->gb); + if (((int32_t)GET_CACHE(re, &s->gb)) < 0) { + level = (3 * qscale * quant_matrix[0]) >> 5; + level = (level - 1) | 1; + if (GET_CACHE(re, &s->gb) & 0x40000000) + level = -level; + block[0] = level; + i++; + SKIP_BITS(re, &s->gb, 2); + if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) + goto end; + } + /* now quantify & encode AC coefficients */ + for (;;) { + GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); - INIT_VLC_STATIC(&mb_ptype_vlc, MB_PTYPE_VLC_BITS, 7, - &table_mb_ptype[0][1], 2, 1, - &table_mb_ptype[0][0], 2, 1, 64); - INIT_VLC_STATIC(&mb_btype_vlc, MB_BTYPE_VLC_BITS, 11, - &table_mb_btype[0][1], 2, 1, - &table_mb_btype[0][0], 2, 1, 64); - init_rl(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]); - init_rl(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]); + if (level != 0) { + i += run; + j = scantable[i]; + level = ((level * 2 + 1) * qscale * quant_matrix[j]) >> 5; + level = (level - 1) | 1; + level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); + SKIP_BITS(re, &s->gb, 1); + } else { + /* escape */ + run = SHOW_UBITS(re, &s->gb, 6) + 1; LAST_SKIP_BITS(re, &s->gb, 6); + UPDATE_CACHE(re, &s->gb); + level = SHOW_SBITS(re, &s->gb, 8); SKIP_BITS(re, &s->gb, 8); + if (level == -128) { + level = SHOW_UBITS(re, &s->gb, 8) - 256; SKIP_BITS(re, &s->gb, 8); + } else if (level == 0) { + level = SHOW_UBITS(re, &s->gb, 8) ; SKIP_BITS(re, &s->gb, 8); + } + i += run; + j = scantable[i]; + if (level < 0) { + level = -level; + level = ((level * 2 + 1) * qscale * quant_matrix[j]) >> 5; + level = (level - 1) | 1; + level = -level; + } else { + level = ((level * 2 + 1) * qscale * quant_matrix[j]) >> 5; + level = (level - 1) | 1; + } + } + if (i > 63) { + av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y); + return -1; + } - INIT_2D_VLC_RL(ff_rl_mpeg1, 680); - INIT_2D_VLC_RL(ff_rl_mpeg2, 674); + block[j] = level; + if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) + break; + UPDATE_CACHE(re, &s->gb); + } +end: + LAST_SKIP_BITS(re, &s->gb, 2); + CLOSE_READER(re, &s->gb); } + s->block_last_index[n] = i; + return 0; } -static inline int get_dmv(MpegEncContext *s) +static inline int mpeg1_fast_decode_block_inter(MpegEncContext *s, DCTELEM *block, int n) { - if(get_bits1(&s->gb)) - return 1 - (get_bits1(&s->gb) << 1); - else - return 0; -} + int level, i, j, run; + RLTable *rl = &ff_rl_mpeg1; + uint8_t * const scantable = s->intra_scantable.permutated; + const int qscale = s->qscale; -static inline int get_qscale(MpegEncContext *s) -{ - int qscale = get_bits(&s->gb, 5); - if (s->q_scale_type) { - return non_linear_qscale[qscale]; - } else { - return qscale << 1; + { + OPEN_READER(re, &s->gb); + i = -1; + // special case for first coefficient, no need to add second VLC table + UPDATE_CACHE(re, &s->gb); + if (((int32_t)GET_CACHE(re, &s->gb)) < 0) { + level = (3 * qscale) >> 1; + level = (level - 1) | 1; + if (GET_CACHE(re, &s->gb) & 0x40000000) + level = -level; + block[0] = level; + i++; + SKIP_BITS(re, &s->gb, 2); + if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) + goto end; + } + + /* now quantify & encode AC coefficients */ + for (;;) { + GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); + + if (level != 0) { + i += run; + j = scantable[i]; + level = ((level * 2 + 1) * qscale) >> 1; + level = (level - 1) | 1; + level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); + SKIP_BITS(re, &s->gb, 1); + } else { + /* escape */ + run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6); + UPDATE_CACHE(re, &s->gb); + level = SHOW_SBITS(re, &s->gb, 8); SKIP_BITS(re, &s->gb, 8); + if (level == -128) { + level = SHOW_UBITS(re, &s->gb, 8) - 256; SKIP_BITS(re, &s->gb, 8); + } else if (level == 0) { + level = SHOW_UBITS(re, &s->gb, 8) ; SKIP_BITS(re, &s->gb, 8); + } + i += run; + j = scantable[i]; + if (level < 0) { + level = -level; + level = ((level * 2 + 1) * qscale) >> 1; + level = (level - 1) | 1; + level = -level; + } else { + level = ((level * 2 + 1) * qscale) >> 1; + level = (level - 1) | 1; + } + } + + block[j] = level; + if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) + break; + UPDATE_CACHE(re, &s->gb); + } +end: + LAST_SKIP_BITS(re, &s->gb, 2); + CLOSE_READER(re, &s->gb); } + s->block_last_index[n] = i; + return 0; } -/* motion type (for MPEG-2) */ -#define MT_FIELD 1 -#define MT_FRAME 2 -#define MT_16X8 2 -#define MT_DMV 3 -static int mpeg_decode_mb(MpegEncContext *s, - DCTELEM block[12][64]) +static inline int mpeg2_decode_block_non_intra(MpegEncContext *s, DCTELEM *block, int n) { - int i, j, k, cbp, val, mb_type, motion_type; - const int mb_block_count = 4 + (1<< s->chroma_format); + int level, i, j, run; + RLTable *rl = &ff_rl_mpeg1; + uint8_t * const scantable = s->intra_scantable.permutated; + const uint16_t *quant_matrix; + const int qscale = s->qscale; + int mismatch; - av_dlog(s->avctx, "decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y); + mismatch = 1; - assert(s->mb_skipped==0); + { + OPEN_READER(re, &s->gb); + i = -1; + if (n < 4) + quant_matrix = s->inter_matrix; + else + quant_matrix = s->chroma_inter_matrix; - if (s->mb_skip_run-- != 0) { - if (s->pict_type == AV_PICTURE_TYPE_P) { - s->mb_skipped = 1; - s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ]= MB_TYPE_SKIP | MB_TYPE_L0 | MB_TYPE_16x16; - } else { - int mb_type; + // special case for first coefficient, no need to add second VLC table + UPDATE_CACHE(re, &s->gb); + if (((int32_t)GET_CACHE(re, &s->gb)) < 0) { + level= (3 * qscale * quant_matrix[0]) >> 5; + if (GET_CACHE(re, &s->gb) & 0x40000000) + level = -level; + block[0] = level; + mismatch ^= level; + i++; + SKIP_BITS(re, &s->gb, 2); + if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) + goto end; + } - if(s->mb_x) - mb_type= s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride - 1]; - else - mb_type= s->current_picture.mb_type[ s->mb_width + (s->mb_y-1)*s->mb_stride - 1]; // FIXME not sure if this is allowed in MPEG at all - if(IS_INTRA(mb_type)) - return -1; + /* now quantify & encode AC coefficients */ + for (;;) { + GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); - s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ]= - mb_type | MB_TYPE_SKIP; -// assert(s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride - 1]&(MB_TYPE_16x16|MB_TYPE_16x8)); - - if((s->mv[0][0][0]|s->mv[0][0][1]|s->mv[1][0][0]|s->mv[1][0][1])==0) - s->mb_skipped = 1; - } - - return 0; - } + if (level != 0) { + i += run; + j = scantable[i]; + level = ((level * 2 + 1) * qscale * quant_matrix[j]) >> 5; + level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); + SKIP_BITS(re, &s->gb, 1); + } else { + /* escape */ + run = SHOW_UBITS(re, &s->gb, 6) + 1; LAST_SKIP_BITS(re, &s->gb, 6); + UPDATE_CACHE(re, &s->gb); + level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12); - switch(s->pict_type) { - default: - case AV_PICTURE_TYPE_I: - if (get_bits1(&s->gb) == 0) { - if (get_bits1(&s->gb) == 0){ - av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in I Frame at %d %d\n", s->mb_x, s->mb_y); + i += run; + j = scantable[i]; + if (level < 0) { + level = ((-level * 2 + 1) * qscale * quant_matrix[j]) >> 5; + level = -level; + } else { + level = ((level * 2 + 1) * qscale * quant_matrix[j]) >> 5; + } + } + if (i > 63) { + av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y); return -1; } - mb_type = MB_TYPE_QUANT | MB_TYPE_INTRA; - } else { - mb_type = MB_TYPE_INTRA; - } - break; - case AV_PICTURE_TYPE_P: - mb_type = get_vlc2(&s->gb, mb_ptype_vlc.table, MB_PTYPE_VLC_BITS, 1); - if (mb_type < 0){ - av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in P Frame at %d %d\n", s->mb_x, s->mb_y); - return -1; - } - mb_type = ptype2mb_type[ mb_type ]; - break; - case AV_PICTURE_TYPE_B: - mb_type = get_vlc2(&s->gb, mb_btype_vlc.table, MB_BTYPE_VLC_BITS, 1); - if (mb_type < 0){ - av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in B Frame at %d %d\n", s->mb_x, s->mb_y); - return -1; + + mismatch ^= level; + block[j] = level; + if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) + break; + UPDATE_CACHE(re, &s->gb); } - mb_type = btype2mb_type[ mb_type ]; - break; +end: + LAST_SKIP_BITS(re, &s->gb, 2); + CLOSE_READER(re, &s->gb); } - av_dlog(s->avctx, "mb_type=%x\n", mb_type); -// motion_type = 0; /* avoid warning */ - if (IS_INTRA(mb_type)) { - s->dsp.clear_blocks(s->block[0]); + block[63] ^= (mismatch & 1); - if(!s->chroma_y_shift){ - s->dsp.clear_blocks(s->block[6]); - } + s->block_last_index[n] = i; + return 0; +} - /* compute DCT type */ - if (s->picture_structure == PICT_FRAME && //FIXME add an interlaced_dct coded var? - !s->frame_pred_frame_dct) { - s->interlaced_dct = get_bits1(&s->gb); - } +static inline int mpeg2_fast_decode_block_non_intra(MpegEncContext *s, + DCTELEM *block, int n) +{ + int level, i, j, run; + RLTable *rl = &ff_rl_mpeg1; + uint8_t * const scantable = s->intra_scantable.permutated; + const int qscale = s->qscale; + OPEN_READER(re, &s->gb); + i = -1; - if (IS_QUANT(mb_type)) - s->qscale = get_qscale(s); + // special case for first coefficient, no need to add second VLC table + UPDATE_CACHE(re, &s->gb); + if (((int32_t)GET_CACHE(re, &s->gb)) < 0) { + level = (3 * qscale) >> 1; + if (GET_CACHE(re, &s->gb) & 0x40000000) + level = -level; + block[0] = level; + i++; + SKIP_BITS(re, &s->gb, 2); + if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) + goto end; + } - if (s->concealment_motion_vectors) { - /* just parse them */ - if (s->picture_structure != PICT_FRAME) - skip_bits1(&s->gb); /* field select */ + /* now quantify & encode AC coefficients */ + for (;;) { + GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); - s->mv[0][0][0]= s->last_mv[0][0][0]= s->last_mv[0][1][0] = - mpeg_decode_motion(s, s->mpeg_f_code[0][0], s->last_mv[0][0][0]); - s->mv[0][0][1]= s->last_mv[0][0][1]= s->last_mv[0][1][1] = - mpeg_decode_motion(s, s->mpeg_f_code[0][1], s->last_mv[0][0][1]); + if (level != 0) { + i += run; + j = scantable[i]; + level = ((level * 2 + 1) * qscale) >> 1; + level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); + SKIP_BITS(re, &s->gb, 1); + } else { + /* escape */ + run = SHOW_UBITS(re, &s->gb, 6) + 1; LAST_SKIP_BITS(re, &s->gb, 6); + UPDATE_CACHE(re, &s->gb); + level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12); - skip_bits1(&s->gb); /* marker */ - }else - memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */ - s->mb_intra = 1; - //if 1, we memcpy blocks in xvmcvideo - if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration > 1){ - ff_xvmc_pack_pblocks(s,-1);//inter are always full blocks - if(s->swap_uv){ - exchange_uv(s); + i += run; + j = scantable[i]; + if (level < 0) { + level = ((-level * 2 + 1) * qscale) >> 1; + level = -level; + } else { + level = ((level * 2 + 1) * qscale) >> 1; } } - if (s->codec_id == CODEC_ID_MPEG2VIDEO) { - if(s->flags2 & CODEC_FLAG2_FAST){ - for(i=0;i<6;i++) { - mpeg2_fast_decode_block_intra(s, *s->pblocks[i], i); - } - }else{ - for(i=0;ipblocks[i], i) < 0) - return -1; + block[j] = level; + if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) + break; + UPDATE_CACHE(re, &s->gb); + } +end: + LAST_SKIP_BITS(re, &s->gb, 2); + CLOSE_READER(re, &s->gb); + s->block_last_index[n] = i; + return 0; +} + + +static inline int mpeg2_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n) +{ + int level, dc, diff, i, j, run; + int component; + RLTable *rl; + uint8_t * const scantable = s->intra_scantable.permutated; + const uint16_t *quant_matrix; + const int qscale = s->qscale; + int mismatch; + + /* DC coefficient */ + if (n < 4) { + quant_matrix = s->intra_matrix; + component = 0; + } else { + quant_matrix = s->chroma_intra_matrix; + component = (n & 1) + 1; + } + diff = decode_dc(&s->gb, component); + if (diff >= 0xffff) + return -1; + dc = s->last_dc[component]; + dc += diff; + s->last_dc[component] = dc; + block[0] = dc << (3 - s->intra_dc_precision); + av_dlog(s->avctx, "dc=%d\n", block[0]); + mismatch = block[0] ^ 1; + i = 0; + if (s->intra_vlc_format) + rl = &ff_rl_mpeg2; + else + rl = &ff_rl_mpeg1; + + { + OPEN_READER(re, &s->gb); + /* now quantify & encode AC coefficients */ + for (;;) { + UPDATE_CACHE(re, &s->gb); + GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); + + if (level == 127) { + break; + } else if (level != 0) { + i += run; + j = scantable[i]; + level = (level * qscale * quant_matrix[j]) >> 4; + level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); + LAST_SKIP_BITS(re, &s->gb, 1); + } else { + /* escape */ + run = SHOW_UBITS(re, &s->gb, 6) + 1; LAST_SKIP_BITS(re, &s->gb, 6); + UPDATE_CACHE(re, &s->gb); + level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12); + i += run; + j = scantable[i]; + if (level < 0) { + level = (-level * qscale * quant_matrix[j]) >> 4; + level = -level; + } else { + level = (level * qscale * quant_matrix[j]) >> 4; } } - } else { - for(i=0;i<6;i++) { - if (mpeg1_decode_block_intra(s, *s->pblocks[i], i) < 0) - return -1; + if (i > 63) { + av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y); + return -1; } + + mismatch ^= level; + block[j] = level; } + CLOSE_READER(re, &s->gb); + } + block[63] ^= mismatch & 1; + + s->block_last_index[n] = i; + return 0; +} + +static inline int mpeg2_fast_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n) +{ + int level, dc, diff, j, run; + int component; + RLTable *rl; + uint8_t * scantable = s->intra_scantable.permutated; + const uint16_t *quant_matrix; + const int qscale = s->qscale; + + /* DC coefficient */ + if (n < 4) { + quant_matrix = s->intra_matrix; + component = 0; } else { - if (mb_type & MB_TYPE_ZERO_MV){ - assert(mb_type & MB_TYPE_CBP); + quant_matrix = s->chroma_intra_matrix; + component = (n & 1) + 1; + } + diff = decode_dc(&s->gb, component); + if (diff >= 0xffff) + return -1; + dc = s->last_dc[component]; + dc += diff; + s->last_dc[component] = dc; + block[0] = dc << (3 - s->intra_dc_precision); + if (s->intra_vlc_format) + rl = &ff_rl_mpeg2; + else + rl = &ff_rl_mpeg1; - s->mv_dir = MV_DIR_FORWARD; - if(s->picture_structure == PICT_FRAME){ - if(!s->frame_pred_frame_dct) - s->interlaced_dct = get_bits1(&s->gb); - s->mv_type = MV_TYPE_16X16; - }else{ - s->mv_type = MV_TYPE_FIELD; - mb_type |= MB_TYPE_INTERLACED; - s->field_select[0][0]= s->picture_structure - 1; + { + OPEN_READER(re, &s->gb); + /* now quantify & encode AC coefficients */ + for (;;) { + UPDATE_CACHE(re, &s->gb); + GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); + + if (level == 127) { + break; + } else if (level != 0) { + scantable += run; + j = *scantable; + level = (level * qscale * quant_matrix[j]) >> 4; + level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); + LAST_SKIP_BITS(re, &s->gb, 1); + } else { + /* escape */ + run = SHOW_UBITS(re, &s->gb, 6) + 1; LAST_SKIP_BITS(re, &s->gb, 6); + UPDATE_CACHE(re, &s->gb); + level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12); + scantable += run; + j = *scantable; + if (level < 0) { + level = (-level * qscale * quant_matrix[j]) >> 4; + level = -level; + } else { + level = (level * qscale * quant_matrix[j]) >> 4; + } } - if (IS_QUANT(mb_type)) - s->qscale = get_qscale(s); + block[j] = level; + } + CLOSE_READER(re, &s->gb); + } - s->last_mv[0][0][0] = 0; - s->last_mv[0][0][1] = 0; - s->last_mv[0][1][0] = 0; - s->last_mv[0][1][1] = 0; - s->mv[0][0][0] = 0; - s->mv[0][0][1] = 0; - }else{ - assert(mb_type & MB_TYPE_L0L1); -//FIXME decide if MBs in field pictures are MB_TYPE_INTERLACED - /* get additional motion vector type */ - if (s->frame_pred_frame_dct) - motion_type = MT_FRAME; - else{ - motion_type = get_bits(&s->gb, 2); - if (s->picture_structure == PICT_FRAME && HAS_CBP(mb_type)) - s->interlaced_dct = get_bits1(&s->gb); - } + s->block_last_index[n] = scantable - s->intra_scantable.permutated; + return 0; +} - if (IS_QUANT(mb_type)) - s->qscale = get_qscale(s); +uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3]; - /* motion vectors */ - s->mv_dir= (mb_type>>13)&3; - av_dlog(s->avctx, "motion_type=%d\n", motion_type); - switch(motion_type) { - case MT_FRAME: /* or MT_16X8 */ - if (s->picture_structure == PICT_FRAME) { - mb_type |= MB_TYPE_16x16; - s->mv_type = MV_TYPE_16X16; - for(i=0;i<2;i++) { - if (USES_LIST(mb_type, i)) { - /* MT_FRAME */ - s->mv[i][0][0]= s->last_mv[i][0][0]= s->last_mv[i][1][0] = +#define INIT_2D_VLC_RL(rl, static_size)\ +{\ + static RL_VLC_ELEM rl_vlc_table[static_size];\ + INIT_VLC_STATIC(&rl.vlc, TEX_VLC_BITS, rl.n + 2,\ + &rl.table_vlc[0][1], 4, 2,\ + &rl.table_vlc[0][0], 4, 2, static_size);\ +\ + rl.rl_vlc[0] = rl_vlc_table;\ + init_2d_vlc_rl(&rl);\ +} + +static void init_2d_vlc_rl(RLTable *rl) +{ + int i; + + for (i = 0; i < rl->vlc.table_size; i++) { + int code = rl->vlc.table[i][0]; + int len = rl->vlc.table[i][1]; + int level, run; + + if (len == 0) { // illegal code + run = 65; + level = MAX_LEVEL; + } else if (len<0) { //more bits needed + run = 0; + level = code; + } else { + if (code == rl->n) { //esc + run = 65; + level = 0; + } else if (code == rl->n+1) { //eob + run = 0; + level = 127; + } else { + run = rl->table_run [code] + 1; + level = rl->table_level[code]; + } + } + rl->rl_vlc[0][i].len = len; + rl->rl_vlc[0][i].level = level; + rl->rl_vlc[0][i].run = run; + } +} + +void ff_mpeg12_common_init(MpegEncContext *s) +{ + + s->y_dc_scale_table = + s->c_dc_scale_table = ff_mpeg2_dc_scale_table[s->intra_dc_precision]; + +} + +void ff_mpeg1_clean_buffers(MpegEncContext *s) +{ + s->last_dc[0] = 1 << (7 + s->intra_dc_precision); + s->last_dc[1] = s->last_dc[0]; + s->last_dc[2] = s->last_dc[0]; + memset(s->last_mv, 0, sizeof(s->last_mv)); +} + + +/******************************************/ +/* decoding */ + +VLC ff_dc_lum_vlc; +VLC ff_dc_chroma_vlc; + +static VLC mbincr_vlc; +static VLC mb_ptype_vlc; +static VLC mb_btype_vlc; +static VLC mb_pat_vlc; + +av_cold void ff_mpeg12_init_vlcs(void) +{ + static int done = 0; + + if (!done) { + done = 1; + + INIT_VLC_STATIC(&ff_dc_lum_vlc, DC_VLC_BITS, 12, + ff_mpeg12_vlc_dc_lum_bits, 1, 1, + ff_mpeg12_vlc_dc_lum_code, 2, 2, 512); + INIT_VLC_STATIC(&ff_dc_chroma_vlc, DC_VLC_BITS, 12, + ff_mpeg12_vlc_dc_chroma_bits, 1, 1, + ff_mpeg12_vlc_dc_chroma_code, 2, 2, 514); + INIT_VLC_STATIC(&mv_vlc, MV_VLC_BITS, 17, + &ff_mpeg12_mbMotionVectorTable[0][1], 2, 1, + &ff_mpeg12_mbMotionVectorTable[0][0], 2, 1, 518); + INIT_VLC_STATIC(&mbincr_vlc, MBINCR_VLC_BITS, 36, + &ff_mpeg12_mbAddrIncrTable[0][1], 2, 1, + &ff_mpeg12_mbAddrIncrTable[0][0], 2, 1, 538); + INIT_VLC_STATIC(&mb_pat_vlc, MB_PAT_VLC_BITS, 64, + &ff_mpeg12_mbPatTable[0][1], 2, 1, + &ff_mpeg12_mbPatTable[0][0], 2, 1, 512); + + INIT_VLC_STATIC(&mb_ptype_vlc, MB_PTYPE_VLC_BITS, 7, + &table_mb_ptype[0][1], 2, 1, + &table_mb_ptype[0][0], 2, 1, 64); + INIT_VLC_STATIC(&mb_btype_vlc, MB_BTYPE_VLC_BITS, 11, + &table_mb_btype[0][1], 2, 1, + &table_mb_btype[0][0], 2, 1, 64); + init_rl(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]); + init_rl(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]); + + INIT_2D_VLC_RL(ff_rl_mpeg1, 680); + INIT_2D_VLC_RL(ff_rl_mpeg2, 674); + } +} + +static inline int get_dmv(MpegEncContext *s) +{ + if (get_bits1(&s->gb)) + return 1 - (get_bits1(&s->gb) << 1); + else + return 0; +} + +static inline int get_qscale(MpegEncContext *s) +{ + int qscale = get_bits(&s->gb, 5); + if (s->q_scale_type) { + return non_linear_qscale[qscale]; + } else { + return qscale << 1; + } +} + +static void exchange_uv(MpegEncContext *s) +{ + DCTELEM (*tmp)[64]; + + tmp = s->pblocks[4]; + s->pblocks[4] = s->pblocks[5]; + s->pblocks[5] = tmp; +} + +/* motion type (for MPEG-2) */ +#define MT_FIELD 1 +#define MT_FRAME 2 +#define MT_16X8 2 +#define MT_DMV 3 + +static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64]) +{ + int i, j, k, cbp, val, mb_type, motion_type; + const int mb_block_count = 4 + (1 << s->chroma_format); + + av_dlog(s->avctx, "decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y); + + assert(s->mb_skipped == 0); + + if (s->mb_skip_run-- != 0) { + if (s->pict_type == AV_PICTURE_TYPE_P) { + s->mb_skipped = 1; + s->current_picture.f.mb_type[s->mb_x + s->mb_y * s->mb_stride] = MB_TYPE_SKIP | MB_TYPE_L0 | MB_TYPE_16x16; + } else { + int mb_type; + + if (s->mb_x) + mb_type = s->current_picture.f.mb_type[s->mb_x + s->mb_y * s->mb_stride - 1]; + else + mb_type = s->current_picture.f.mb_type[s->mb_width + (s->mb_y - 1) * s->mb_stride - 1]; // FIXME not sure if this is allowed in MPEG at all + if (IS_INTRA(mb_type)) + return -1; + s->current_picture.f.mb_type[s->mb_x + s->mb_y*s->mb_stride] = + mb_type | MB_TYPE_SKIP; +// assert(s->current_picture.f.mb_type[s->mb_x + s->mb_y * s->mb_stride - 1] & (MB_TYPE_16x16 | MB_TYPE_16x8)); + + if ((s->mv[0][0][0] | s->mv[0][0][1] | s->mv[1][0][0] | s->mv[1][0][1]) == 0) + s->mb_skipped = 1; + } + + return 0; + } + + switch (s->pict_type) { + default: + case AV_PICTURE_TYPE_I: + if (get_bits1(&s->gb) == 0) { + if (get_bits1(&s->gb) == 0) { + av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in I Frame at %d %d\n", s->mb_x, s->mb_y); + return -1; + } + mb_type = MB_TYPE_QUANT | MB_TYPE_INTRA; + } else { + mb_type = MB_TYPE_INTRA; + } + break; + case AV_PICTURE_TYPE_P: + mb_type = get_vlc2(&s->gb, mb_ptype_vlc.table, MB_PTYPE_VLC_BITS, 1); + if (mb_type < 0) { + av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in P Frame at %d %d\n", s->mb_x, s->mb_y); + return -1; + } + mb_type = ptype2mb_type[mb_type]; + break; + case AV_PICTURE_TYPE_B: + mb_type = get_vlc2(&s->gb, mb_btype_vlc.table, MB_BTYPE_VLC_BITS, 1); + if (mb_type < 0) { + av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in B Frame at %d %d\n", s->mb_x, s->mb_y); + return -1; + } + mb_type = btype2mb_type[mb_type]; + break; + } + av_dlog(s->avctx, "mb_type=%x\n", mb_type); +// motion_type = 0; /* avoid warning */ + if (IS_INTRA(mb_type)) { + s->dsp.clear_blocks(s->block[0]); + + if (!s->chroma_y_shift) { + s->dsp.clear_blocks(s->block[6]); + } + + /* compute DCT type */ + if (s->picture_structure == PICT_FRAME && // FIXME add an interlaced_dct coded var? + !s->frame_pred_frame_dct) { + s->interlaced_dct = get_bits1(&s->gb); + } + + if (IS_QUANT(mb_type)) + s->qscale = get_qscale(s); + + if (s->concealment_motion_vectors) { + /* just parse them */ + if (s->picture_structure != PICT_FRAME) + skip_bits1(&s->gb); /* field select */ + + s->mv[0][0][0]= s->last_mv[0][0][0]= s->last_mv[0][1][0] = + mpeg_decode_motion(s, s->mpeg_f_code[0][0], s->last_mv[0][0][0]); + s->mv[0][0][1]= s->last_mv[0][0][1]= s->last_mv[0][1][1] = + mpeg_decode_motion(s, s->mpeg_f_code[0][1], s->last_mv[0][0][1]); + + skip_bits1(&s->gb); /* marker */ + } else + memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */ + s->mb_intra = 1; + // if 1, we memcpy blocks in xvmcvideo + if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration > 1) { + ff_xvmc_pack_pblocks(s, -1); // inter are always full blocks + if (s->swap_uv) { + exchange_uv(s); + } + } + + if (s->codec_id == CODEC_ID_MPEG2VIDEO) { + if (s->flags2 & CODEC_FLAG2_FAST) { + for (i = 0; i < 6; i++) { + mpeg2_fast_decode_block_intra(s, *s->pblocks[i], i); + } + } else { + for (i = 0; i < mb_block_count; i++) { + if (mpeg2_decode_block_intra(s, *s->pblocks[i], i) < 0) + return -1; + } + } + } else { + for (i = 0; i < 6; i++) { + if (mpeg1_decode_block_intra(s, *s->pblocks[i], i) < 0) + return -1; + } + } + } else { + if (mb_type & MB_TYPE_ZERO_MV) { + assert(mb_type & MB_TYPE_CBP); + + s->mv_dir = MV_DIR_FORWARD; + if (s->picture_structure == PICT_FRAME) { + if (!s->frame_pred_frame_dct) + s->interlaced_dct = get_bits1(&s->gb); + s->mv_type = MV_TYPE_16X16; + } else { + s->mv_type = MV_TYPE_FIELD; + mb_type |= MB_TYPE_INTERLACED; + s->field_select[0][0] = s->picture_structure - 1; + } + + if (IS_QUANT(mb_type)) + s->qscale = get_qscale(s); + + s->last_mv[0][0][0] = 0; + s->last_mv[0][0][1] = 0; + s->last_mv[0][1][0] = 0; + s->last_mv[0][1][1] = 0; + s->mv[0][0][0] = 0; + s->mv[0][0][1] = 0; + } else { + assert(mb_type & MB_TYPE_L0L1); + // FIXME decide if MBs in field pictures are MB_TYPE_INTERLACED + /* get additional motion vector type */ + if (s->frame_pred_frame_dct) + motion_type = MT_FRAME; + else { + motion_type = get_bits(&s->gb, 2); + if (s->picture_structure == PICT_FRAME && HAS_CBP(mb_type)) + s->interlaced_dct = get_bits1(&s->gb); + } + + if (IS_QUANT(mb_type)) + s->qscale = get_qscale(s); + + /* motion vectors */ + s->mv_dir = (mb_type >> 13) & 3; + av_dlog(s->avctx, "motion_type=%d\n", motion_type); + switch (motion_type) { + case MT_FRAME: /* or MT_16X8 */ + if (s->picture_structure == PICT_FRAME) { + mb_type |= MB_TYPE_16x16; + s->mv_type = MV_TYPE_16X16; + for (i = 0; i < 2; i++) { + if (USES_LIST(mb_type, i)) { + /* MT_FRAME */ + s->mv[i][0][0]= s->last_mv[i][0][0]= s->last_mv[i][1][0] = mpeg_decode_motion(s, s->mpeg_f_code[i][0], s->last_mv[i][0][0]); s->mv[i][0][1]= s->last_mv[i][0][1]= s->last_mv[i][1][1] = mpeg_decode_motion(s, s->mpeg_f_code[i][1], s->last_mv[i][0][1]); /* full_pel: only for MPEG-1 */ - if (s->full_pel[i]){ + if (s->full_pel[i]) { s->mv[i][0][0] <<= 1; s->mv[i][0][1] <<= 1; } @@ -394,16 +918,16 @@ } else { mb_type |= MB_TYPE_16x8 | MB_TYPE_INTERLACED; s->mv_type = MV_TYPE_16X8; - for(i=0;i<2;i++) { + for (i = 0; i < 2; i++) { if (USES_LIST(mb_type, i)) { /* MT_16X8 */ - for(j=0;j<2;j++) { + for (j = 0; j < 2; j++) { s->field_select[i][j] = get_bits1(&s->gb); - for(k=0;k<2;k++) { + for (k = 0; k < 2; k++) { val = mpeg_decode_motion(s, s->mpeg_f_code[i][k], s->last_mv[i][j][k]); s->last_mv[i][j][k] = val; - s->mv[i][j][k] = val; + s->mv[i][j][k] = val; } } } @@ -414,34 +938,34 @@ s->mv_type = MV_TYPE_FIELD; if (s->picture_structure == PICT_FRAME) { mb_type |= MB_TYPE_16x8 | MB_TYPE_INTERLACED; - for(i=0;i<2;i++) { + for (i = 0; i < 2; i++) { if (USES_LIST(mb_type, i)) { - for(j=0;j<2;j++) { + for (j = 0; j < 2; j++) { s->field_select[i][j] = get_bits1(&s->gb); val = mpeg_decode_motion(s, s->mpeg_f_code[i][0], s->last_mv[i][j][0]); s->last_mv[i][j][0] = val; - s->mv[i][j][0] = val; + s->mv[i][j][0] = val; av_dlog(s->avctx, "fmx=%d\n", val); val = mpeg_decode_motion(s, s->mpeg_f_code[i][1], s->last_mv[i][j][1] >> 1); s->last_mv[i][j][1] = val << 1; - s->mv[i][j][1] = val; + s->mv[i][j][1] = val; av_dlog(s->avctx, "fmy=%d\n", val); } } } } else { mb_type |= MB_TYPE_16x16 | MB_TYPE_INTERLACED; - for(i=0;i<2;i++) { + for (i = 0; i < 2; i++) { if (USES_LIST(mb_type, i)) { s->field_select[i][0] = get_bits1(&s->gb); - for(k=0;k<2;k++) { + for (k = 0; k < 2; k++) { val = mpeg_decode_motion(s, s->mpeg_f_code[i][k], s->last_mv[i][0][k]); s->last_mv[i][0][k] = val; s->last_mv[i][1][k] = val; - s->mv[i][0][k] = val; + s->mv[i][0][k] = val; } } } @@ -449,706 +973,139 @@ break; case MT_DMV: s->mv_type = MV_TYPE_DMV; - for(i=0;i<2;i++) { + for (i = 0; i < 2; i++) { if (USES_LIST(mb_type, i)) { - int dmx, dmy, mx, my, m; - const int my_shift= s->picture_structure == PICT_FRAME; - - mx = mpeg_decode_motion(s, s->mpeg_f_code[i][0], - s->last_mv[i][0][0]); - s->last_mv[i][0][0] = mx; - s->last_mv[i][1][0] = mx; - dmx = get_dmv(s); - my = mpeg_decode_motion(s, s->mpeg_f_code[i][1], - s->last_mv[i][0][1] >> my_shift); - dmy = get_dmv(s); - - - s->last_mv[i][0][1] = my<last_mv[i][1][1] = my<mv[i][0][0] = mx; - s->mv[i][0][1] = my; - s->mv[i][1][0] = mx;//not used - s->mv[i][1][1] = my;//not used - - if (s->picture_structure == PICT_FRAME) { - mb_type |= MB_TYPE_16x16 | MB_TYPE_INTERLACED; - - //m = 1 + 2 * s->top_field_first; - m = s->top_field_first ? 1 : 3; - - /* top -> top pred */ - s->mv[i][2][0] = ((mx * m + (mx > 0)) >> 1) + dmx; - s->mv[i][2][1] = ((my * m + (my > 0)) >> 1) + dmy - 1; - m = 4 - m; - s->mv[i][3][0] = ((mx * m + (mx > 0)) >> 1) + dmx; - s->mv[i][3][1] = ((my * m + (my > 0)) >> 1) + dmy + 1; - } else { - mb_type |= MB_TYPE_16x16; - - s->mv[i][2][0] = ((mx + (mx > 0)) >> 1) + dmx; - s->mv[i][2][1] = ((my + (my > 0)) >> 1) + dmy; - if(s->picture_structure == PICT_TOP_FIELD) - s->mv[i][2][1]--; - else - s->mv[i][2][1]++; - } - } - } - break; - default: - av_log(s->avctx, AV_LOG_ERROR, "00 motion_type at %d %d\n", s->mb_x, s->mb_y); - return -1; - } - } - - s->mb_intra = 0; - if (HAS_CBP(mb_type)) { - s->dsp.clear_blocks(s->block[0]); - - cbp = get_vlc2(&s->gb, mb_pat_vlc.table, MB_PAT_VLC_BITS, 1); - if(mb_block_count > 6){ - cbp<<= mb_block_count-6; - cbp |= get_bits(&s->gb, mb_block_count-6); - s->dsp.clear_blocks(s->block[6]); - } - if (cbp <= 0){ - av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y); - return -1; - } - - //if 1, we memcpy blocks in xvmcvideo - if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration > 1){ - ff_xvmc_pack_pblocks(s,cbp); - if(s->swap_uv){ - exchange_uv(s); - } - } - - if (s->codec_id == CODEC_ID_MPEG2VIDEO) { - if(s->flags2 & CODEC_FLAG2_FAST){ - for(i=0;i<6;i++) { - if(cbp & 32) { - mpeg2_fast_decode_block_non_intra(s, *s->pblocks[i], i); - } else { - s->block_last_index[i] = -1; - } - cbp+=cbp; - } - }else{ - cbp<<= 12-mb_block_count; - - for(i=0;ipblocks[i], i) < 0) - return -1; - } else { - s->block_last_index[i] = -1; - } - cbp+=cbp; - } - } - } else { - if(s->flags2 & CODEC_FLAG2_FAST){ - for(i=0;i<6;i++) { - if (cbp & 32) { - mpeg1_fast_decode_block_inter(s, *s->pblocks[i], i); - } else { - s->block_last_index[i] = -1; - } - cbp+=cbp; - } - }else{ - for(i=0;i<6;i++) { - if (cbp & 32) { - if (mpeg1_decode_block_inter(s, *s->pblocks[i], i) < 0) - return -1; - } else { - s->block_last_index[i] = -1; - } - cbp+=cbp; - } - } - } - }else{ - for(i=0;i<12;i++) - s->block_last_index[i] = -1; - } - } - - s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ]= mb_type; - - return 0; -} - -/* as H.263, but only 17 codes */ -static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred) -{ - int code, sign, val, l, shift; - - code = get_vlc2(&s->gb, mv_vlc.table, MV_VLC_BITS, 2); - if (code == 0) { - return pred; - } - if (code < 0) { - return 0xffff; - } - - sign = get_bits1(&s->gb); - shift = fcode - 1; - val = code; - if (shift) { - val = (val - 1) << shift; - val |= get_bits(&s->gb, shift); - val++; - } - if (sign) - val = -val; - val += pred; - - /* modulo decoding */ - l= INT_BIT - 5 - shift; - val = (val<>l; - return val; -} - -static inline int mpeg1_decode_block_intra(MpegEncContext *s, - DCTELEM *block, - int n) -{ - int level, dc, diff, i, j, run; - int component; - RLTable *rl = &ff_rl_mpeg1; - uint8_t * const scantable= s->intra_scantable.permutated; - const uint16_t *quant_matrix= s->intra_matrix; - const int qscale= s->qscale; - - /* DC coefficient */ - component = (n <= 3 ? 0 : n - 4 + 1); - diff = decode_dc(&s->gb, component); - if (diff >= 0xffff) - return -1; - dc = s->last_dc[component]; - dc += diff; - s->last_dc[component] = dc; - block[0] = dc*quant_matrix[0]; - av_dlog(s->avctx, "dc=%d diff=%d\n", dc, diff); - i = 0; - { - OPEN_READER(re, &s->gb); - /* now quantify & encode AC coefficients */ - for(;;) { - UPDATE_CACHE(re, &s->gb); - GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); - - if(level == 127){ - break; - } else if(level != 0) { - i += run; - j = scantable[i]; - level= (level*qscale*quant_matrix[j])>>4; - level= (level-1)|1; - level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); - LAST_SKIP_BITS(re, &s->gb, 1); - } else { - /* escape */ - run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6); - UPDATE_CACHE(re, &s->gb); - level = SHOW_SBITS(re, &s->gb, 8); SKIP_BITS(re, &s->gb, 8); - if (level == -128) { - level = SHOW_UBITS(re, &s->gb, 8) - 256; LAST_SKIP_BITS(re, &s->gb, 8); - } else if (level == 0) { - level = SHOW_UBITS(re, &s->gb, 8) ; LAST_SKIP_BITS(re, &s->gb, 8); - } - i += run; - j = scantable[i]; - if(level<0){ - level= -level; - level= (level*qscale*quant_matrix[j])>>4; - level= (level-1)|1; - level= -level; - }else{ - level= (level*qscale*quant_matrix[j])>>4; - level= (level-1)|1; - } - } - if (i > 63){ - av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y); - return -1; - } - - block[j] = level; - } - CLOSE_READER(re, &s->gb); - } - s->block_last_index[n] = i; - return 0; -} - -int ff_mpeg1_decode_block_intra(MpegEncContext *s, - DCTELEM *block, - int n) -{ - return mpeg1_decode_block_intra(s, block, n); -} - -static inline int mpeg1_decode_block_inter(MpegEncContext *s, - DCTELEM *block, - int n) -{ - int level, i, j, run; - RLTable *rl = &ff_rl_mpeg1; - uint8_t * const scantable= s->intra_scantable.permutated; - const uint16_t *quant_matrix= s->inter_matrix; - const int qscale= s->qscale; - - { - OPEN_READER(re, &s->gb); - i = -1; - // special case for first coefficient, no need to add second VLC table - UPDATE_CACHE(re, &s->gb); - if (((int32_t)GET_CACHE(re, &s->gb)) < 0) { - level= (3*qscale*quant_matrix[0])>>5; - level= (level-1)|1; - if(GET_CACHE(re, &s->gb)&0x40000000) - level= -level; - block[0] = level; - i++; - SKIP_BITS(re, &s->gb, 2); - if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) - goto end; - } - /* now quantify & encode AC coefficients */ - for(;;) { - GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); - - if(level != 0) { - i += run; - j = scantable[i]; - level= ((level*2+1)*qscale*quant_matrix[j])>>5; - level= (level-1)|1; - level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); - SKIP_BITS(re, &s->gb, 1); - } else { - /* escape */ - run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6); - UPDATE_CACHE(re, &s->gb); - level = SHOW_SBITS(re, &s->gb, 8); SKIP_BITS(re, &s->gb, 8); - if (level == -128) { - level = SHOW_UBITS(re, &s->gb, 8) - 256; SKIP_BITS(re, &s->gb, 8); - } else if (level == 0) { - level = SHOW_UBITS(re, &s->gb, 8) ; SKIP_BITS(re, &s->gb, 8); - } - i += run; - j = scantable[i]; - if(level<0){ - level= -level; - level= ((level*2+1)*qscale*quant_matrix[j])>>5; - level= (level-1)|1; - level= -level; - }else{ - level= ((level*2+1)*qscale*quant_matrix[j])>>5; - level= (level-1)|1; - } - } - if (i > 63){ - av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y); - return -1; - } - - block[j] = level; - if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) - break; - UPDATE_CACHE(re, &s->gb); - } -end: - LAST_SKIP_BITS(re, &s->gb, 2); - CLOSE_READER(re, &s->gb); - } - s->block_last_index[n] = i; - return 0; -} - -static inline int mpeg1_fast_decode_block_inter(MpegEncContext *s, DCTELEM *block, int n) -{ - int level, i, j, run; - RLTable *rl = &ff_rl_mpeg1; - uint8_t * const scantable= s->intra_scantable.permutated; - const int qscale= s->qscale; - - { - OPEN_READER(re, &s->gb); - i = -1; - // special case for first coefficient, no need to add second VLC table - UPDATE_CACHE(re, &s->gb); - if (((int32_t)GET_CACHE(re, &s->gb)) < 0) { - level= (3*qscale)>>1; - level= (level-1)|1; - if(GET_CACHE(re, &s->gb)&0x40000000) - level= -level; - block[0] = level; - i++; - SKIP_BITS(re, &s->gb, 2); - if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) - goto end; - } - - /* now quantify & encode AC coefficients */ - for(;;) { - GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); - - if(level != 0) { - i += run; - j = scantable[i]; - level= ((level*2+1)*qscale)>>1; - level= (level-1)|1; - level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); - SKIP_BITS(re, &s->gb, 1); - } else { - /* escape */ - run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6); - UPDATE_CACHE(re, &s->gb); - level = SHOW_SBITS(re, &s->gb, 8); SKIP_BITS(re, &s->gb, 8); - if (level == -128) { - level = SHOW_UBITS(re, &s->gb, 8) - 256; SKIP_BITS(re, &s->gb, 8); - } else if (level == 0) { - level = SHOW_UBITS(re, &s->gb, 8) ; SKIP_BITS(re, &s->gb, 8); - } - i += run; - j = scantable[i]; - if(level<0){ - level= -level; - level= ((level*2+1)*qscale)>>1; - level= (level-1)|1; - level= -level; - }else{ - level= ((level*2+1)*qscale)>>1; - level= (level-1)|1; - } - } - - block[j] = level; - if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) - break; - UPDATE_CACHE(re, &s->gb); - } -end: - LAST_SKIP_BITS(re, &s->gb, 2); - CLOSE_READER(re, &s->gb); - } - s->block_last_index[n] = i; - return 0; -} - - -static inline int mpeg2_decode_block_non_intra(MpegEncContext *s, - DCTELEM *block, - int n) -{ - int level, i, j, run; - RLTable *rl = &ff_rl_mpeg1; - uint8_t * const scantable= s->intra_scantable.permutated; - const uint16_t *quant_matrix; - const int qscale= s->qscale; - int mismatch; - - mismatch = 1; - - { - OPEN_READER(re, &s->gb); - i = -1; - if (n < 4) - quant_matrix = s->inter_matrix; - else - quant_matrix = s->chroma_inter_matrix; - - // special case for first coefficient, no need to add second VLC table - UPDATE_CACHE(re, &s->gb); - if (((int32_t)GET_CACHE(re, &s->gb)) < 0) { - level= (3*qscale*quant_matrix[0])>>5; - if(GET_CACHE(re, &s->gb)&0x40000000) - level= -level; - block[0] = level; - mismatch ^= level; - i++; - SKIP_BITS(re, &s->gb, 2); - if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) - goto end; - } - - /* now quantify & encode AC coefficients */ - for(;;) { - GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); - - if(level != 0) { - i += run; - j = scantable[i]; - level= ((level*2+1)*qscale*quant_matrix[j])>>5; - level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); - SKIP_BITS(re, &s->gb, 1); - } else { - /* escape */ - run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6); - UPDATE_CACHE(re, &s->gb); - level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12); - - i += run; - j = scantable[i]; - if(level<0){ - level= ((-level*2+1)*qscale*quant_matrix[j])>>5; - level= -level; - }else{ - level= ((level*2+1)*qscale*quant_matrix[j])>>5; - } - } - if (i > 63){ - av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y); - return -1; - } - - mismatch ^= level; - block[j] = level; - if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) - break; - UPDATE_CACHE(re, &s->gb); - } -end: - LAST_SKIP_BITS(re, &s->gb, 2); - CLOSE_READER(re, &s->gb); - } - block[63] ^= (mismatch & 1); - - s->block_last_index[n] = i; - return 0; -} - -static inline int mpeg2_fast_decode_block_non_intra(MpegEncContext *s, - DCTELEM *block, - int n) -{ - int level, i, j, run; - RLTable *rl = &ff_rl_mpeg1; - uint8_t * const scantable= s->intra_scantable.permutated; - const int qscale= s->qscale; - OPEN_READER(re, &s->gb); - i = -1; - - // special case for first coefficient, no need to add second VLC table - UPDATE_CACHE(re, &s->gb); - if (((int32_t)GET_CACHE(re, &s->gb)) < 0) { - level= (3*qscale)>>1; - if(GET_CACHE(re, &s->gb)&0x40000000) - level= -level; - block[0] = level; - i++; - SKIP_BITS(re, &s->gb, 2); - if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) - goto end; - } - - /* now quantify & encode AC coefficients */ - for(;;) { - GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); + int dmx, dmy, mx, my, m; + const int my_shift = s->picture_structure == PICT_FRAME; - if(level != 0) { - i += run; - j = scantable[i]; - level= ((level*2+1)*qscale)>>1; - level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); - SKIP_BITS(re, &s->gb, 1); - } else { - /* escape */ - run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6); - UPDATE_CACHE(re, &s->gb); - level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12); + mx = mpeg_decode_motion(s, s->mpeg_f_code[i][0], + s->last_mv[i][0][0]); + s->last_mv[i][0][0] = mx; + s->last_mv[i][1][0] = mx; + dmx = get_dmv(s); + my = mpeg_decode_motion(s, s->mpeg_f_code[i][1], + s->last_mv[i][0][1] >> my_shift); + dmy = get_dmv(s); - i += run; - j = scantable[i]; - if(level<0){ - level= ((-level*2+1)*qscale)>>1; - level= -level; - }else{ - level= ((level*2+1)*qscale)>>1; - } - } - block[j] = level; - if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF) - break; - UPDATE_CACHE(re, &s->gb); - } -end: - LAST_SKIP_BITS(re, &s->gb, 2); - CLOSE_READER(re, &s->gb); - s->block_last_index[n] = i; - return 0; -} + s->last_mv[i][0][1] = my << my_shift; + s->last_mv[i][1][1] = my << my_shift; + s->mv[i][0][0] = mx; + s->mv[i][0][1] = my; + s->mv[i][1][0] = mx; // not used + s->mv[i][1][1] = my; // not used -static inline int mpeg2_decode_block_intra(MpegEncContext *s, - DCTELEM *block, - int n) -{ - int level, dc, diff, i, j, run; - int component; - RLTable *rl; - uint8_t * const scantable= s->intra_scantable.permutated; - const uint16_t *quant_matrix; - const int qscale= s->qscale; - int mismatch; + if (s->picture_structure == PICT_FRAME) { + mb_type |= MB_TYPE_16x16 | MB_TYPE_INTERLACED; - /* DC coefficient */ - if (n < 4){ - quant_matrix = s->intra_matrix; - component = 0; - }else{ - quant_matrix = s->chroma_intra_matrix; - component = (n&1) + 1; - } - diff = decode_dc(&s->gb, component); - if (diff >= 0xffff) - return -1; - dc = s->last_dc[component]; - dc += diff; - s->last_dc[component] = dc; - block[0] = dc << (3 - s->intra_dc_precision); - av_dlog(s->avctx, "dc=%d\n", block[0]); - mismatch = block[0] ^ 1; - i = 0; - if (s->intra_vlc_format) - rl = &ff_rl_mpeg2; - else - rl = &ff_rl_mpeg1; + // m = 1 + 2 * s->top_field_first; + m = s->top_field_first ? 1 : 3; - { - OPEN_READER(re, &s->gb); - /* now quantify & encode AC coefficients */ - for(;;) { - UPDATE_CACHE(re, &s->gb); - GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); + /* top -> top pred */ + s->mv[i][2][0] = ((mx * m + (mx > 0)) >> 1) + dmx; + s->mv[i][2][1] = ((my * m + (my > 0)) >> 1) + dmy - 1; + m = 4 - m; + s->mv[i][3][0] = ((mx * m + (mx > 0)) >> 1) + dmx; + s->mv[i][3][1] = ((my * m + (my > 0)) >> 1) + dmy + 1; + } else { + mb_type |= MB_TYPE_16x16; - if(level == 127){ - break; - } else if(level != 0) { - i += run; - j = scantable[i]; - level= (level*qscale*quant_matrix[j])>>4; - level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); - LAST_SKIP_BITS(re, &s->gb, 1); - } else { - /* escape */ - run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6); - UPDATE_CACHE(re, &s->gb); - level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12); - i += run; - j = scantable[i]; - if(level<0){ - level= (-level*qscale*quant_matrix[j])>>4; - level= -level; - }else{ - level= (level*qscale*quant_matrix[j])>>4; + s->mv[i][2][0] = ((mx + (mx > 0)) >> 1) + dmx; + s->mv[i][2][1] = ((my + (my > 0)) >> 1) + dmy; + if (s->picture_structure == PICT_TOP_FIELD) + s->mv[i][2][1]--; + else + s->mv[i][2][1]++; + } + } } - } - if (i > 63){ - av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y); + break; + default: + av_log(s->avctx, AV_LOG_ERROR, "00 motion_type at %d %d\n", s->mb_x, s->mb_y); return -1; } - - mismatch^= level; - block[j] = level; } - CLOSE_READER(re, &s->gb); - } - block[63]^= mismatch&1; - s->block_last_index[n] = i; - return 0; -} + s->mb_intra = 0; + if (HAS_CBP(mb_type)) { + s->dsp.clear_blocks(s->block[0]); -static inline int mpeg2_fast_decode_block_intra(MpegEncContext *s, - DCTELEM *block, - int n) -{ - int level, dc, diff, j, run; - int component; - RLTable *rl; - uint8_t * scantable= s->intra_scantable.permutated; - const uint16_t *quant_matrix; - const int qscale= s->qscale; + cbp = get_vlc2(&s->gb, mb_pat_vlc.table, MB_PAT_VLC_BITS, 1); + if (mb_block_count > 6) { + cbp <<= mb_block_count - 6; + cbp |= get_bits(&s->gb, mb_block_count - 6); + s->dsp.clear_blocks(s->block[6]); + } + if (cbp <= 0) { + av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y); + return -1; + } - /* DC coefficient */ - if (n < 4){ - quant_matrix = s->intra_matrix; - component = 0; - }else{ - quant_matrix = s->chroma_intra_matrix; - component = (n&1) + 1; - } - diff = decode_dc(&s->gb, component); - if (diff >= 0xffff) - return -1; - dc = s->last_dc[component]; - dc += diff; - s->last_dc[component] = dc; - block[0] = dc << (3 - s->intra_dc_precision); - if (s->intra_vlc_format) - rl = &ff_rl_mpeg2; - else - rl = &ff_rl_mpeg1; + //if 1, we memcpy blocks in xvmcvideo + if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration > 1) { + ff_xvmc_pack_pblocks(s, cbp); + if (s->swap_uv) { + exchange_uv(s); + } + } - { - OPEN_READER(re, &s->gb); - /* now quantify & encode AC coefficients */ - for(;;) { - UPDATE_CACHE(re, &s->gb); - GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0); + if (s->codec_id == CODEC_ID_MPEG2VIDEO) { + if (s->flags2 & CODEC_FLAG2_FAST) { + for (i = 0; i < 6; i++) { + if (cbp & 32) { + mpeg2_fast_decode_block_non_intra(s, *s->pblocks[i], i); + } else { + s->block_last_index[i] = -1; + } + cbp += cbp; + } + } else { + cbp <<= 12-mb_block_count; - if(level == 127){ - break; - } else if(level != 0) { - scantable += run; - j = *scantable; - level= (level*qscale*quant_matrix[j])>>4; - level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); - LAST_SKIP_BITS(re, &s->gb, 1); + for (i = 0; i < mb_block_count; i++) { + if (cbp & (1 << 11)) { + if (mpeg2_decode_block_non_intra(s, *s->pblocks[i], i) < 0) + return -1; + } else { + s->block_last_index[i] = -1; + } + cbp += cbp; + } + } } else { - /* escape */ - run = SHOW_UBITS(re, &s->gb, 6)+1; LAST_SKIP_BITS(re, &s->gb, 6); - UPDATE_CACHE(re, &s->gb); - level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12); - scantable += run; - j = *scantable; - if(level<0){ - level= (-level*qscale*quant_matrix[j])>>4; - level= -level; - }else{ - level= (level*qscale*quant_matrix[j])>>4; + if (s->flags2 & CODEC_FLAG2_FAST) { + for (i = 0; i < 6; i++) { + if (cbp & 32) { + mpeg1_fast_decode_block_inter(s, *s->pblocks[i], i); + } else { + s->block_last_index[i] = -1; + } + cbp += cbp; + } + } else { + for (i = 0; i < 6; i++) { + if (cbp & 32) { + if (mpeg1_decode_block_inter(s, *s->pblocks[i], i) < 0) + return -1; + } else { + s->block_last_index[i] = -1; + } + cbp += cbp; + } } } - - block[j] = level; + } else { + for (i = 0; i < 12; i++) + s->block_last_index[i] = -1; } - CLOSE_READER(re, &s->gb); } - s->block_last_index[n] = scantable - s->intra_scantable.permutated; + s->current_picture.f.mb_type[s->mb_x + s->mb_y * s->mb_stride] = mb_type; + return 0; } -typedef struct Mpeg1Context { - MpegEncContext mpeg_enc_ctx; - int mpeg_enc_ctx_allocated; /* true if decoding context allocated */ - int repeat_field; /* true if we must repeat the field */ - AVPanScan pan_scan; /**< some temporary storage for the panscan */ - int slice_count; - int swap_uv;//indicate VCR2 - int save_aspect_info; - int save_width, save_height, save_progressive_seq; - AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator - int sync; ///< Did we reach a sync point like a GOP/SEQ/KEYFrame? -} Mpeg1Context; - static av_cold int mpeg_decode_init(AVCodecContext *avctx) { Mpeg1Context *s = avctx->priv_data; @@ -1157,22 +1114,22 @@ /* we need some permutation to store matrices, * until MPV_common_init() sets the real permutation. */ - for(i=0;i<64;i++) + for (i = 0; i < 64; i++) s2->dsp.idct_permutation[i]=i; MPV_decode_defaults(s2); - s->mpeg_enc_ctx.avctx= avctx; - s->mpeg_enc_ctx.flags= avctx->flags; - s->mpeg_enc_ctx.flags2= avctx->flags2; + s->mpeg_enc_ctx.avctx = avctx; + s->mpeg_enc_ctx.flags = avctx->flags; + s->mpeg_enc_ctx.flags2 = avctx->flags2; ff_mpeg12_common_init(&s->mpeg_enc_ctx); ff_mpeg12_init_vlcs(); - s->mpeg_enc_ctx_allocated = 0; + s->mpeg_enc_ctx_allocated = 0; s->mpeg_enc_ctx.picture_number = 0; - s->repeat_field = 0; - s->mpeg_enc_ctx.codec_id= avctx->codec->id; - avctx->color_range= AVCOL_RANGE_MPEG; + s->repeat_field = 0; + s->mpeg_enc_ctx.codec_id = avctx->codec->id; + avctx->color_range = AVCOL_RANGE_MPEG; if (avctx->codec->id == CODEC_ID_MPEG1VIDEO) avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; else @@ -1186,48 +1143,55 @@ MpegEncContext *s = &ctx->mpeg_enc_ctx, *s1 = &ctx_from->mpeg_enc_ctx; int err; - if(avctx == avctx_from || !ctx_from->mpeg_enc_ctx_allocated || !s1->context_initialized) + if (avctx == avctx_from || !ctx_from->mpeg_enc_ctx_allocated || !s1->context_initialized) return 0; err = ff_mpeg_update_thread_context(avctx, avctx_from); - if(err) return err; + if (err) return err; - if(!ctx->mpeg_enc_ctx_allocated) + if (!ctx->mpeg_enc_ctx_allocated) memcpy(s + 1, s1 + 1, sizeof(Mpeg1Context) - sizeof(MpegEncContext)); - if(!(s->pict_type == FF_B_TYPE || s->low_delay)) + if (!(s->pict_type == AV_PICTURE_TYPE_B || s->low_delay)) s->picture_number++; return 0; } static void quant_matrix_rebuild(uint16_t *matrix, const uint8_t *old_perm, - const uint8_t *new_perm){ + const uint8_t *new_perm) +{ uint16_t temp_matrix[64]; int i; - memcpy(temp_matrix,matrix,64*sizeof(uint16_t)); + memcpy(temp_matrix, matrix, 64 * sizeof(uint16_t)); - for(i=0;i<64;i++){ + for (i = 0; i < 64; i++) { matrix[new_perm[i]] = temp_matrix[old_perm[i]]; } } -static enum PixelFormat mpeg_get_pixelformat(AVCodecContext *avctx){ +static const enum PixelFormat pixfmt_xvmc_mpg2_420[] = { + PIX_FMT_XVMC_MPEG2_IDCT, + PIX_FMT_XVMC_MPEG2_MC, + PIX_FMT_NONE }; + +static enum PixelFormat mpeg_get_pixelformat(AVCodecContext *avctx) +{ Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; - if(avctx->xvmc_acceleration) - return avctx->get_format(avctx,pixfmt_xvmc_mpg2_420); - else if(avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ - if(avctx->codec_id == CODEC_ID_MPEG1VIDEO) + if (avctx->xvmc_acceleration) + return avctx->get_format(avctx, pixfmt_xvmc_mpg2_420); + else if (avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) { + if (avctx->codec_id == CODEC_ID_MPEG1VIDEO) return PIX_FMT_VDPAU_MPEG1; else return PIX_FMT_VDPAU_MPEG2; - }else{ - if(s->chroma_format < 2) - return avctx->get_format(avctx,ff_hwaccel_pixfmt_list_420); - else if(s->chroma_format == 2) + } else { + if (s->chroma_format < 2) + return avctx->get_format(avctx, ff_hwaccel_pixfmt_list_420); + else if (s->chroma_format == 2) return PIX_FMT_YUV422P; else return PIX_FMT_YUV444P; @@ -1236,118 +1200,111 @@ /* Call this function when we know all parameters. * It may be called in different places for MPEG-1 and MPEG-2. */ -static int mpeg_decode_postinit(AVCodecContext *avctx){ +static int mpeg_decode_postinit(AVCodecContext *avctx) +{ Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; uint8_t old_permutation[64]; - if ( - (s1->mpeg_enc_ctx_allocated == 0)|| - avctx->coded_width != s->width || - avctx->coded_height != s->height|| - s1->save_width != s->width || - s1->save_height != s->height || - s1->save_aspect_info != s->aspect_ratio_info|| + if ((s1->mpeg_enc_ctx_allocated == 0) || + avctx->coded_width != s->width || + avctx->coded_height != s->height || + s1->save_width != s->width || + s1->save_height != s->height || + s1->save_aspect_info != s->aspect_ratio_info || s1->save_progressive_seq != s->progressive_sequence || 0) { if (s1->mpeg_enc_ctx_allocated) { - ParseContext pc= s->parse_context; - s->parse_context.buffer=0; + ParseContext pc = s->parse_context; + s->parse_context.buffer = 0; MPV_common_end(s); - s->parse_context= pc; + s->parse_context = pc; } - if( (s->width == 0 )||(s->height == 0)) + if ((s->width == 0) || (s->height == 0)) return -2; avcodec_set_dimensions(avctx, s->width, s->height); - avctx->bit_rate = s->bit_rate; - s1->save_aspect_info = s->aspect_ratio_info; - s1->save_width = s->width; - s1->save_height = s->height; + avctx->bit_rate = s->bit_rate; + s1->save_aspect_info = s->aspect_ratio_info; + s1->save_width = s->width; + s1->save_height = s->height; s1->save_progressive_seq = s->progressive_sequence; /* low_delay may be forced, in this case we will have B-frames * that behave like P-frames. */ - avctx->has_b_frames = !(s->low_delay); + avctx->has_b_frames = !s->low_delay; - assert((avctx->sub_id==1) == (avctx->codec_id==CODEC_ID_MPEG1VIDEO)); - if(avctx->codec_id==CODEC_ID_MPEG1VIDEO){ + assert((avctx->sub_id == 1) == (avctx->codec_id == CODEC_ID_MPEG1VIDEO)); + if (avctx->codec_id == CODEC_ID_MPEG1VIDEO) { //MPEG-1 fps - avctx->time_base.den= ff_frame_rate_tab[s->frame_rate_index].num; - avctx->time_base.num= ff_frame_rate_tab[s->frame_rate_index].den; + avctx->time_base.den = avpriv_frame_rate_tab[s->frame_rate_index].num; + avctx->time_base.num = avpriv_frame_rate_tab[s->frame_rate_index].den; //MPEG-1 aspect - avctx->sample_aspect_ratio= av_d2q( - 1.0/ff_mpeg1_aspect[s->aspect_ratio_info], 255); + avctx->sample_aspect_ratio = av_d2q(1.0/ff_mpeg1_aspect[s->aspect_ratio_info], 255); avctx->ticks_per_frame=1; - }else{//MPEG-2 + } else {//MPEG-2 //MPEG-2 fps - av_reduce( - &s->avctx->time_base.den, - &s->avctx->time_base.num, - ff_frame_rate_tab[s->frame_rate_index].num * s1->frame_rate_ext.num*2, - ff_frame_rate_tab[s->frame_rate_index].den * s1->frame_rate_ext.den, - 1<<30); - avctx->ticks_per_frame=2; - //MPEG-2 aspect - if(s->aspect_ratio_info > 1){ + av_reduce(&s->avctx->time_base.den, + &s->avctx->time_base.num, + avpriv_frame_rate_tab[s->frame_rate_index].num * s1->frame_rate_ext.num*2, + avpriv_frame_rate_tab[s->frame_rate_index].den * s1->frame_rate_ext.den, + 1 << 30); + avctx->ticks_per_frame = 2; + //MPEG-2 aspect + if (s->aspect_ratio_info > 1) { AVRational dar = - av_mul_q( - av_div_q(ff_mpeg2_aspect[s->aspect_ratio_info], - (AVRational){s1->pan_scan.width, s1->pan_scan.height}), - (AVRational){s->width, s->height}); + av_mul_q(av_div_q(ff_mpeg2_aspect[s->aspect_ratio_info], + (AVRational) {s1->pan_scan.width, s1->pan_scan.height}), + (AVRational) {s->width, s->height}); // we ignore the spec here and guess a bit as reality does not match the spec, see for example // res_change_ffmpeg_aspect.ts and sequence-display-aspect.mpg // issue1613, 621, 562 - if((s1->pan_scan.width == 0 ) || (s1->pan_scan.height == 0) || - (av_cmp_q(dar,(AVRational){4,3}) && av_cmp_q(dar,(AVRational){16,9}))) { - s->avctx->sample_aspect_ratio= - av_div_q( - ff_mpeg2_aspect[s->aspect_ratio_info], - (AVRational){s->width, s->height} - ); - }else{ - s->avctx->sample_aspect_ratio= - av_div_q( - ff_mpeg2_aspect[s->aspect_ratio_info], - (AVRational){s1->pan_scan.width, s1->pan_scan.height} - ); + if ((s1->pan_scan.width == 0) || (s1->pan_scan.height == 0) || + (av_cmp_q(dar, (AVRational) {4, 3}) && av_cmp_q(dar, (AVRational) {16, 9}))) { + s->avctx->sample_aspect_ratio = + av_div_q(ff_mpeg2_aspect[s->aspect_ratio_info], + (AVRational) {s->width, s->height}); + } else { + s->avctx->sample_aspect_ratio = + av_div_q(ff_mpeg2_aspect[s->aspect_ratio_info], + (AVRational) {s1->pan_scan.width, s1->pan_scan.height}); //issue1613 4/3 16/9 -> 16/9 //res_change_ffmpeg_aspect.ts 4/3 225/44 ->4/3 //widescreen-issue562.mpg 4/3 16/9 -> 16/9 -// s->avctx->sample_aspect_ratio= av_mul_q(s->avctx->sample_aspect_ratio, (AVRational){s->width, s->height}); -//av_log(NULL, AV_LOG_ERROR, "A %d/%d\n",ff_mpeg2_aspect[s->aspect_ratio_info].num, ff_mpeg2_aspect[s->aspect_ratio_info].den); -//av_log(NULL, AV_LOG_ERROR, "B %d/%d\n",s->avctx->sample_aspect_ratio.num, s->avctx->sample_aspect_ratio.den); +// s->avctx->sample_aspect_ratio = av_mul_q(s->avctx->sample_aspect_ratio, (AVRational) {s->width, s->height}); +//av_log(NULL, AV_LOG_ERROR, "A %d/%d\n", ff_mpeg2_aspect[s->aspect_ratio_info].num, ff_mpeg2_aspect[s->aspect_ratio_info].den); +//av_log(NULL, AV_LOG_ERROR, "B %d/%d\n", s->avctx->sample_aspect_ratio.num, s->avctx->sample_aspect_ratio.den); } - }else{ - s->avctx->sample_aspect_ratio= + } else { + s->avctx->sample_aspect_ratio = ff_mpeg2_aspect[s->aspect_ratio_info]; } - }//MPEG-2 + } // MPEG-2 avctx->pix_fmt = mpeg_get_pixelformat(avctx); avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); - //until then pix_fmt may be changed right after codec init - if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || - avctx->hwaccel || - s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ) - if( avctx->idct_algo == FF_IDCT_AUTO ) + // until then pix_fmt may be changed right after codec init + if (avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || + avctx->hwaccel || + s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) + if (avctx->idct_algo == FF_IDCT_AUTO) avctx->idct_algo = FF_IDCT_SIMPLE; /* Quantization matrices may need reordering * if DCT permutation is changed. */ - memcpy(old_permutation,s->dsp.idct_permutation,64*sizeof(uint8_t)); + memcpy(old_permutation, s->dsp.idct_permutation, 64 * sizeof(uint8_t)); if (MPV_common_init(s) < 0) return -2; - quant_matrix_rebuild(s->intra_matrix, old_permutation,s->dsp.idct_permutation); - quant_matrix_rebuild(s->inter_matrix, old_permutation,s->dsp.idct_permutation); - quant_matrix_rebuild(s->chroma_intra_matrix,old_permutation,s->dsp.idct_permutation); - quant_matrix_rebuild(s->chroma_inter_matrix,old_permutation,s->dsp.idct_permutation); + quant_matrix_rebuild(s->intra_matrix, old_permutation, s->dsp.idct_permutation); + quant_matrix_rebuild(s->inter_matrix, old_permutation, s->dsp.idct_permutation); + quant_matrix_rebuild(s->chroma_intra_matrix, old_permutation, s->dsp.idct_permutation); + quant_matrix_rebuild(s->chroma_inter_matrix, old_permutation, s->dsp.idct_permutation); s1->mpeg_enc_ctx_allocated = 1; } @@ -1365,14 +1322,14 @@ ref = get_bits(&s->gb, 10); /* temporal ref */ s->pict_type = get_bits(&s->gb, 3); - if(s->pict_type == 0 || s->pict_type > 3) + if (s->pict_type == 0 || s->pict_type > 3) return -1; - vbv_delay= get_bits(&s->gb, 16); + vbv_delay = get_bits(&s->gb, 16); if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) { s->full_pel[0] = get_bits1(&s->gb); f_code = get_bits(&s->gb, 3); - if (f_code == 0 && avctx->error_recognition >= FF_ER_COMPLIANT) + if (f_code == 0 && (avctx->err_recognition & AV_EF_BITSTREAM)) return -1; s->mpeg_f_code[0][0] = f_code; s->mpeg_f_code[0][1] = f_code; @@ -1380,15 +1337,15 @@ if (s->pict_type == AV_PICTURE_TYPE_B) { s->full_pel[1] = get_bits1(&s->gb); f_code = get_bits(&s->gb, 3); - if (f_code == 0 && avctx->error_recognition >= FF_ER_COMPLIANT) + if (f_code == 0 && (avctx->err_recognition & AV_EF_BITSTREAM)) return -1; s->mpeg_f_code[1][0] = f_code; s->mpeg_f_code[1][1] = f_code; } - s->current_picture.pict_type= s->pict_type; - s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I; + s->current_picture.f.pict_type = s->pict_type; + s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I; - if(avctx->debug & FF_DEBUG_PICT_INFO) + if (avctx->debug & FF_DEBUG_PICT_INFO) av_log(avctx, AV_LOG_DEBUG, "vbv_delay %d, ref %d type:%d\n", vbv_delay, ref, s->pict_type); s->y_dc_scale = 8; @@ -1403,30 +1360,31 @@ int bit_rate_ext; skip_bits(&s->gb, 1); /* profile and level esc*/ - s->avctx->profile= get_bits(&s->gb, 3); - s->avctx->level= get_bits(&s->gb, 4); + s->avctx->profile = get_bits(&s->gb, 3); + s->avctx->level = get_bits(&s->gb, 4); s->progressive_sequence = get_bits1(&s->gb); /* progressive_sequence */ - s->chroma_format = get_bits(&s->gb, 2); /* chroma_format 1=420, 2=422, 3=444 */ - horiz_size_ext = get_bits(&s->gb, 2); - vert_size_ext = get_bits(&s->gb, 2); - s->width |= (horiz_size_ext << 12); - s->height |= (vert_size_ext << 12); + s->chroma_format = get_bits(&s->gb, 2); /* chroma_format 1=420, 2=422, 3=444 */ + horiz_size_ext = get_bits(&s->gb, 2); + vert_size_ext = get_bits(&s->gb, 2); + s->width |= (horiz_size_ext << 12); + s->height |= (vert_size_ext << 12); bit_rate_ext = get_bits(&s->gb, 12); /* XXX: handle it */ s->bit_rate += (bit_rate_ext << 18) * 400; skip_bits1(&s->gb); /* marker */ - s->avctx->rc_buffer_size += get_bits(&s->gb, 8)*1024*16<<10; + s->avctx->rc_buffer_size += get_bits(&s->gb, 8) * 1024 * 16 << 10; s->low_delay = get_bits1(&s->gb); - if(s->flags & CODEC_FLAG_LOW_DELAY) s->low_delay=1; + if (s->flags & CODEC_FLAG_LOW_DELAY) + s->low_delay = 1; - s1->frame_rate_ext.num = get_bits(&s->gb, 2)+1; - s1->frame_rate_ext.den = get_bits(&s->gb, 5)+1; + s1->frame_rate_ext.num = get_bits(&s->gb, 2) + 1; + s1->frame_rate_ext.den = get_bits(&s->gb, 5) + 1; av_dlog(s->avctx, "sequence extension\n"); - s->codec_id= s->avctx->codec_id= CODEC_ID_MPEG2VIDEO; + s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO; s->avctx->sub_id = 2; /* indicates MPEG-2 found */ - if(s->avctx->debug & FF_DEBUG_PICT_INFO) + if (s->avctx->debug & FF_DEBUG_PICT_INFO) av_log(s->avctx, AV_LOG_DEBUG, "profile: %d, level: %d vbv buffer: %d, bitrate:%d\n", s->avctx->profile, s->avctx->level, s->avctx->rc_buffer_size, s->bit_rate); @@ -1434,78 +1392,78 @@ static void mpeg_decode_sequence_display_extension(Mpeg1Context *s1) { - MpegEncContext *s= &s1->mpeg_enc_ctx; + MpegEncContext *s = &s1->mpeg_enc_ctx; int color_description, w, h; skip_bits(&s->gb, 3); /* video format */ - color_description= get_bits1(&s->gb); - if(color_description){ - s->avctx->color_primaries= get_bits(&s->gb, 8); - s->avctx->color_trc = get_bits(&s->gb, 8); - s->avctx->colorspace = get_bits(&s->gb, 8); + color_description = get_bits1(&s->gb); + if (color_description) { + s->avctx->color_primaries = get_bits(&s->gb, 8); + s->avctx->color_trc = get_bits(&s->gb, 8); + s->avctx->colorspace = get_bits(&s->gb, 8); } - w= get_bits(&s->gb, 14); + w = get_bits(&s->gb, 14); skip_bits(&s->gb, 1); //marker - h= get_bits(&s->gb, 14); + h = get_bits(&s->gb, 14); // remaining 3 bits are zero padding - s1->pan_scan.width= 16*w; - s1->pan_scan.height=16*h; + s1->pan_scan.width = 16 * w; + s1->pan_scan.height = 16 * h; - if(s->avctx->debug & FF_DEBUG_PICT_INFO) + if (s->avctx->debug & FF_DEBUG_PICT_INFO) av_log(s->avctx, AV_LOG_DEBUG, "sde w:%d, h:%d\n", w, h); } static void mpeg_decode_picture_display_extension(Mpeg1Context *s1) { - MpegEncContext *s= &s1->mpeg_enc_ctx; - int i,nofco; + MpegEncContext *s = &s1->mpeg_enc_ctx; + int i, nofco; nofco = 1; - if(s->progressive_sequence){ - if(s->repeat_first_field){ + if (s->progressive_sequence) { + if (s->repeat_first_field) { nofco++; - if(s->top_field_first) + if (s->top_field_first) nofco++; } - }else{ - if(s->picture_structure == PICT_FRAME){ + } else { + if (s->picture_structure == PICT_FRAME) { nofco++; - if(s->repeat_first_field) + if (s->repeat_first_field) nofco++; } } - for(i=0; ipan_scan.position[i][0]= get_sbits(&s->gb, 16); - skip_bits(&s->gb, 1); //marker - s1->pan_scan.position[i][1]= get_sbits(&s->gb, 16); - skip_bits(&s->gb, 1); //marker + for (i = 0; i < nofco; i++) { + s1->pan_scan.position[i][0] = get_sbits(&s->gb, 16); + skip_bits(&s->gb, 1); // marker + s1->pan_scan.position[i][1] = get_sbits(&s->gb, 16); + skip_bits(&s->gb, 1); // marker } - if(s->avctx->debug & FF_DEBUG_PICT_INFO) + if (s->avctx->debug & FF_DEBUG_PICT_INFO) av_log(s->avctx, AV_LOG_DEBUG, "pde (%d,%d) (%d,%d) (%d,%d)\n", - s1->pan_scan.position[0][0], s1->pan_scan.position[0][1], - s1->pan_scan.position[1][0], s1->pan_scan.position[1][1], - s1->pan_scan.position[2][0], s1->pan_scan.position[2][1] - ); + s1->pan_scan.position[0][0], s1->pan_scan.position[0][1], + s1->pan_scan.position[1][0], s1->pan_scan.position[1][1], + s1->pan_scan.position[2][0], s1->pan_scan.position[2][1]); } -static int load_matrix(MpegEncContext *s, uint16_t matrix0[64], uint16_t matrix1[64], int intra){ +static int load_matrix(MpegEncContext *s, uint16_t matrix0[64], uint16_t matrix1[64], int intra) +{ int i; - for(i=0; i<64; i++) { - int j = s->dsp.idct_permutation[ ff_zigzag_direct[i] ]; + for (i = 0; i < 64; i++) { + int j = s->dsp.idct_permutation[ff_zigzag_direct[i]]; int v = get_bits(&s->gb, 8); - if(v==0){ + if (v == 0) { av_log(s->avctx, AV_LOG_ERROR, "matrix damaged\n"); return -1; } - if(intra && i==0 && v!=8){ + if (intra && i == 0 && v != 8) { av_log(s->avctx, AV_LOG_ERROR, "intra matrix invalid, ignoring\n"); - v= 8; // needed by pink.mpg / issue1046 + v = 8; // needed by pink.mpg / issue1046 } matrix0[j] = v; - if(matrix1) + if (matrix1) matrix1[j] = v; } return 0; @@ -1515,75 +1473,75 @@ { av_dlog(s->avctx, "matrix extension\n"); - if(get_bits1(&s->gb)) load_matrix(s, s->chroma_intra_matrix, s->intra_matrix, 1); - if(get_bits1(&s->gb)) load_matrix(s, s->chroma_inter_matrix, s->inter_matrix, 0); - if(get_bits1(&s->gb)) load_matrix(s, s->chroma_intra_matrix, NULL , 1); - if(get_bits1(&s->gb)) load_matrix(s, s->chroma_inter_matrix, NULL , 0); + if (get_bits1(&s->gb)) load_matrix(s, s->chroma_intra_matrix, s->intra_matrix, 1); + if (get_bits1(&s->gb)) load_matrix(s, s->chroma_inter_matrix, s->inter_matrix, 0); + if (get_bits1(&s->gb)) load_matrix(s, s->chroma_intra_matrix, NULL , 1); + if (get_bits1(&s->gb)) load_matrix(s, s->chroma_inter_matrix, NULL , 0); } static void mpeg_decode_picture_coding_extension(Mpeg1Context *s1) { - MpegEncContext *s= &s1->mpeg_enc_ctx; + MpegEncContext *s = &s1->mpeg_enc_ctx; s->full_pel[0] = s->full_pel[1] = 0; s->mpeg_f_code[0][0] = get_bits(&s->gb, 4); s->mpeg_f_code[0][1] = get_bits(&s->gb, 4); s->mpeg_f_code[1][0] = get_bits(&s->gb, 4); s->mpeg_f_code[1][1] = get_bits(&s->gb, 4); - if(!s->pict_type && s1->mpeg_enc_ctx_allocated){ + if (!s->pict_type && s1->mpeg_enc_ctx_allocated) { av_log(s->avctx, AV_LOG_ERROR, "Missing picture start code, guessing missing values\n"); - if(s->mpeg_f_code[1][0] == 15 && s->mpeg_f_code[1][1]==15){ - if(s->mpeg_f_code[0][0] == 15 && s->mpeg_f_code[0][1] == 15) - s->pict_type= AV_PICTURE_TYPE_I; + if (s->mpeg_f_code[1][0] == 15 && s->mpeg_f_code[1][1] == 15) { + if (s->mpeg_f_code[0][0] == 15 && s->mpeg_f_code[0][1] == 15) + s->pict_type = AV_PICTURE_TYPE_I; else - s->pict_type= AV_PICTURE_TYPE_P; - }else - s->pict_type= AV_PICTURE_TYPE_B; - s->current_picture.pict_type= s->pict_type; - s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I; - } - s->intra_dc_precision = get_bits(&s->gb, 2); - s->picture_structure = get_bits(&s->gb, 2); - s->top_field_first = get_bits1(&s->gb); - s->frame_pred_frame_dct = get_bits1(&s->gb); + s->pict_type = AV_PICTURE_TYPE_P; + } else + s->pict_type = AV_PICTURE_TYPE_B; + s->current_picture.f.pict_type = s->pict_type; + s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I; + } + s->intra_dc_precision = get_bits(&s->gb, 2); + s->picture_structure = get_bits(&s->gb, 2); + s->top_field_first = get_bits1(&s->gb); + s->frame_pred_frame_dct = get_bits1(&s->gb); s->concealment_motion_vectors = get_bits1(&s->gb); - s->q_scale_type = get_bits1(&s->gb); - s->intra_vlc_format = get_bits1(&s->gb); - s->alternate_scan = get_bits1(&s->gb); - s->repeat_first_field = get_bits1(&s->gb); - s->chroma_420_type = get_bits1(&s->gb); - s->progressive_frame = get_bits1(&s->gb); + s->q_scale_type = get_bits1(&s->gb); + s->intra_vlc_format = get_bits1(&s->gb); + s->alternate_scan = get_bits1(&s->gb); + s->repeat_first_field = get_bits1(&s->gb); + s->chroma_420_type = get_bits1(&s->gb); + s->progressive_frame = get_bits1(&s->gb); - if(s->progressive_sequence && !s->progressive_frame){ - s->progressive_frame= 1; + if (s->progressive_sequence && !s->progressive_frame) { + s->progressive_frame = 1; av_log(s->avctx, AV_LOG_ERROR, "interlaced frame in progressive sequence, ignoring\n"); } - if(s->picture_structure==0 || (s->progressive_frame && s->picture_structure!=PICT_FRAME)){ + if (s->picture_structure == 0 || (s->progressive_frame && s->picture_structure != PICT_FRAME)) { av_log(s->avctx, AV_LOG_ERROR, "picture_structure %d invalid, ignoring\n", s->picture_structure); - s->picture_structure= PICT_FRAME; + s->picture_structure = PICT_FRAME; } - if(s->progressive_sequence && !s->frame_pred_frame_dct){ + if (s->progressive_sequence && !s->frame_pred_frame_dct) { av_log(s->avctx, AV_LOG_ERROR, "invalid frame_pred_frame_dct\n"); - s->frame_pred_frame_dct= 1; + s->frame_pred_frame_dct = 1; } - if(s->picture_structure == PICT_FRAME){ - s->first_field=0; - s->v_edge_pos= 16*s->mb_height; - }else{ + if (s->picture_structure == PICT_FRAME) { + s->first_field = 0; + s->v_edge_pos = 16 * s->mb_height; + } else { s->first_field ^= 1; - s->v_edge_pos= 8*s->mb_height; - memset(s->mbskip_table, 0, s->mb_stride*s->mb_height); + s->v_edge_pos = 8 * s->mb_height; + memset(s->mbskip_table, 0, s->mb_stride * s->mb_height); } - if(s->alternate_scan){ - ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable , ff_alternate_vertical_scan); - ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable , ff_alternate_vertical_scan); - }else{ - ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable , ff_zigzag_direct); - ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable , ff_zigzag_direct); + if (s->alternate_scan) { + ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable, ff_alternate_vertical_scan); + ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, ff_alternate_vertical_scan); + } else { + ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable, ff_zigzag_direct); + ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct); } /* composite display not parsed */ @@ -1598,56 +1556,49 @@ av_dlog(s->avctx, "progressive_frame=%d\n", s->progressive_frame); } -static void exchange_uv(MpegEncContext *s){ - DCTELEM (*tmp)[64]; - - tmp = s->pblocks[4]; - s->pblocks[4] = s->pblocks[5]; - s->pblocks[5] = tmp; -} - -static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size){ - AVCodecContext *avctx= s->avctx; +static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) +{ + AVCodecContext *avctx = s->avctx; Mpeg1Context *s1 = (Mpeg1Context*)s; /* start frame decoding */ - if(s->first_field || s->picture_structure==PICT_FRAME){ - if(MPV_frame_start(s, avctx) < 0) + if (s->first_field || s->picture_structure == PICT_FRAME) { + if (MPV_frame_start(s, avctx) < 0) return -1; ff_er_frame_start(s); /* first check if we must repeat the frame */ - s->current_picture_ptr->repeat_pict = 0; + s->current_picture_ptr->f.repeat_pict = 0; if (s->repeat_first_field) { if (s->progressive_sequence) { if (s->top_field_first) - s->current_picture_ptr->repeat_pict = 4; + s->current_picture_ptr->f.repeat_pict = 4; else - s->current_picture_ptr->repeat_pict = 2; + s->current_picture_ptr->f.repeat_pict = 2; } else if (s->progressive_frame) { - s->current_picture_ptr->repeat_pict = 1; + s->current_picture_ptr->f.repeat_pict = 1; } } - *s->current_picture_ptr->pan_scan= s1->pan_scan; + *s->current_picture_ptr->f.pan_scan = s1->pan_scan; - if (HAVE_PTHREADS && (avctx->active_thread_type & FF_THREAD_FRAME)) + if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME)) ff_thread_finish_setup(avctx); - }else{ //second field - int i; + } else { // second field + int i; - if(!s->current_picture_ptr){ - av_log(s->avctx, AV_LOG_ERROR, "first field missing\n"); - return -1; - } + if (!s->current_picture_ptr) { + av_log(s->avctx, AV_LOG_ERROR, "first field missing\n"); + return -1; + } - for(i=0; i<4; i++){ - s->current_picture.data[i] = s->current_picture_ptr->data[i]; - if(s->picture_structure == PICT_BOTTOM_FIELD){ - s->current_picture.data[i] += s->current_picture_ptr->linesize[i]; - } + for (i = 0; i < 4; i++) { + s->current_picture.f.data[i] = s->current_picture_ptr->f.data[i]; + if (s->picture_structure == PICT_BOTTOM_FIELD) { + s->current_picture.f.data[i] += s->current_picture_ptr->f.linesize[i]; } + } } if (avctx->hwaccel) { @@ -1657,42 +1608,42 @@ // MPV_frame_start will call this function too, // but we need to call it on every field - if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) - if(ff_xvmc_field_start(s,avctx) < 0) + if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) + if (ff_xvmc_field_start(s, avctx) < 0) return -1; return 0; } #define DECODE_SLICE_ERROR -1 -#define DECODE_SLICE_OK 0 +#define DECODE_SLICE_OK 0 /** - * decodes a slice. MpegEncContext.mb_y must be set to the MB row from the startcode - * @return DECODE_SLICE_ERROR if the slice is damaged
- * DECODE_SLICE_OK if this slice is ok
+ * Decode a slice. + * MpegEncContext.mb_y must be set to the MB row from the startcode. + * @return DECODE_SLICE_ERROR if the slice is damaged, + * DECODE_SLICE_OK if this slice is OK */ -static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, +static int mpeg_decode_slice(MpegEncContext *s, int mb_y, const uint8_t **buf, int buf_size) { - MpegEncContext *s = &s1->mpeg_enc_ctx; - AVCodecContext *avctx= s->avctx; - const int field_pic= s->picture_structure != PICT_FRAME; - const int lowres= s->avctx->lowres; + AVCodecContext *avctx = s->avctx; + const int lowres = s->avctx->lowres; + const int field_pic = s->picture_structure != PICT_FRAME; - s->resync_mb_x= - s->resync_mb_y= -1; + s->resync_mb_x = + s->resync_mb_y = -1; assert(mb_y < s->mb_height); - init_get_bits(&s->gb, *buf, buf_size*8); + init_get_bits(&s->gb, *buf, buf_size * 8); ff_mpeg1_clean_buffers(s); s->interlaced_dct = 0; s->qscale = get_qscale(s); - if(s->qscale == 0){ + if (s->qscale == 0) { av_log(s->avctx, AV_LOG_ERROR, "qscale == 0\n"); return -1; } @@ -1702,14 +1653,14 @@ skip_bits(&s->gb, 8); } - s->mb_x=0; + s->mb_x = 0; - if(mb_y==0 && s->codec_tag == AV_RL32("SLIF")){ + if (mb_y == 0 && s->codec_tag == AV_RL32("SLIF")) { skip_bits1(&s->gb); - }else{ - for(;;) { + } else { + for (;;) { int code = get_vlc2(&s->gb, mbincr_vlc.table, MBINCR_VLC_BITS, 2); - if (code < 0){ + if (code < 0) { av_log(s->avctx, AV_LOG_ERROR, "first mb_incr damaged\n"); return -1; } @@ -1725,7 +1676,7 @@ } } - if(s->mb_x >= (unsigned)s->mb_width){ + if (s->mb_x >= (unsigned)s->mb_width) { av_log(s->avctx, AV_LOG_ERROR, "initial skip overflow\n"); return -1; } @@ -1733,7 +1684,7 @@ if (avctx->hwaccel) { const uint8_t *buf_end, *buf_start = *buf - 4; /* include start_code */ int start_code = -1; - buf_end = ff_find_start_code(buf_start + 2, *buf + buf_size, &start_code); + buf_end = avpriv_mpv_find_start_code(buf_start + 2, *buf + buf_size, &start_code); if (buf_end < *buf + buf_size) buf_end -= 4; s->mb_y = mb_y; @@ -1743,41 +1694,41 @@ return DECODE_SLICE_OK; } - s->resync_mb_x= s->mb_x; - s->resync_mb_y= s->mb_y= mb_y; - s->mb_skip_run= 0; + s->resync_mb_x = s->mb_x; + s->resync_mb_y = s->mb_y = mb_y; + s->mb_skip_run = 0; ff_init_block_index(s); - if (s->mb_y==0 && s->mb_x==0 && (s->first_field || s->picture_structure==PICT_FRAME)) { - if(s->avctx->debug&FF_DEBUG_PICT_INFO){ + if (s->mb_y == 0 && s->mb_x == 0 && (s->first_field || s->picture_structure == PICT_FRAME)) { + if (s->avctx->debug & FF_DEBUG_PICT_INFO) { av_log(s->avctx, AV_LOG_DEBUG, "qp:%d fc:%2d%2d%2d%2d %s %s %s %s %s dc:%d pstruct:%d fdct:%d cmv:%d qtype:%d ivlc:%d rff:%d %s\n", - s->qscale, s->mpeg_f_code[0][0],s->mpeg_f_code[0][1],s->mpeg_f_code[1][0],s->mpeg_f_code[1][1], - s->pict_type == AV_PICTURE_TYPE_I ? "I" : (s->pict_type == AV_PICTURE_TYPE_P ? "P" : (s->pict_type == AV_PICTURE_TYPE_B ? "B" : "S")), - s->progressive_sequence ? "ps" :"", s->progressive_frame ? "pf" : "", s->alternate_scan ? "alt" :"", s->top_field_first ? "top" :"", - s->intra_dc_precision, s->picture_structure, s->frame_pred_frame_dct, s->concealment_motion_vectors, - s->q_scale_type, s->intra_vlc_format, s->repeat_first_field, s->chroma_420_type ? "420" :""); + s->qscale, s->mpeg_f_code[0][0], s->mpeg_f_code[0][1], s->mpeg_f_code[1][0], s->mpeg_f_code[1][1], + s->pict_type == AV_PICTURE_TYPE_I ? "I" : (s->pict_type == AV_PICTURE_TYPE_P ? "P" : (s->pict_type == AV_PICTURE_TYPE_B ? "B" : "S")), + s->progressive_sequence ? "ps" :"", s->progressive_frame ? "pf" : "", s->alternate_scan ? "alt" :"", s->top_field_first ? "top" :"", + s->intra_dc_precision, s->picture_structure, s->frame_pred_frame_dct, s->concealment_motion_vectors, + s->q_scale_type, s->intra_vlc_format, s->repeat_first_field, s->chroma_420_type ? "420" :""); } } - for(;;) { - //If 1, we memcpy blocks in xvmcvideo. - if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration > 1) - ff_xvmc_init_block(s);//set s->block + for (;;) { + // If 1, we memcpy blocks in xvmcvideo. + if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration > 1) + ff_xvmc_init_block(s); // set s->block - if(mpeg_decode_mb(s, s->block) < 0) + if (mpeg_decode_mb(s, s->block) < 0) return -1; - if(s->current_picture.motion_val[0] && !s->encoding){ //note motion_val is normally NULL unless we want to extract the MVs + if (s->current_picture.f.motion_val[0] && !s->encoding) { // note motion_val is normally NULL unless we want to extract the MVs const int wrap = s->b8_stride; - int xy = s->mb_x*2 + s->mb_y*2*wrap; - int b8_xy= 4*(s->mb_x + s->mb_y*s->mb_stride); + int xy = s->mb_x * 2 + s->mb_y * 2 * wrap; + int b8_xy = 4 * (s->mb_x + s->mb_y * s->mb_stride); int motion_x, motion_y, dir, i; - for(i=0; i<2; i++){ - for(dir=0; dir<2; dir++){ - if (s->mb_intra || (dir==1 && s->pict_type != AV_PICTURE_TYPE_B)) { + for (i = 0; i < 2; i++) { + for (dir = 0; dir < 2; dir++) { + if (s->mb_intra || (dir == 1 && s->pict_type != AV_PICTURE_TYPE_B)) { motion_x = motion_y = 0; - }else if (s->mv_type == MV_TYPE_16X16 || (s->mv_type == MV_TYPE_FIELD && field_pic)){ + } else if (s->mv_type == MV_TYPE_16X16 || (s->mv_type == MV_TYPE_FIELD && field_pic)) { motion_x = s->mv[dir][0][0]; motion_y = s->mv[dir][0][1]; } else /*if ((s->mv_type == MV_TYPE_FIELD) || (s->mv_type == MV_TYPE_16X8))*/ { @@ -1785,13 +1736,13 @@ motion_y = s->mv[dir][i][1]; } - s->current_picture.motion_val[dir][xy ][0] = motion_x; - s->current_picture.motion_val[dir][xy ][1] = motion_y; - s->current_picture.motion_val[dir][xy + 1][0] = motion_x; - s->current_picture.motion_val[dir][xy + 1][1] = motion_y; - s->current_picture.ref_index [dir][b8_xy ]= - s->current_picture.ref_index [dir][b8_xy + 1]= s->field_select[dir][i]; - assert(s->field_select[dir][i]==0 || s->field_select[dir][i]==1); + s->current_picture.f.motion_val[dir][xy ][0] = motion_x; + s->current_picture.f.motion_val[dir][xy ][1] = motion_y; + s->current_picture.f.motion_val[dir][xy + 1][0] = motion_x; + s->current_picture.f.motion_val[dir][xy + 1][1] = motion_y; + s->current_picture.f.ref_index [dir][b8_xy ] = + s->current_picture.f.ref_index [dir][b8_xy + 1] = s->field_select[dir][i]; + assert(s->field_select[dir][i] == 0 || s->field_select[dir][i] == 1); } xy += wrap; b8_xy +=2; @@ -1805,25 +1756,25 @@ MPV_decode_mb(s, s->block); if (++s->mb_x >= s->mb_width) { - const int mb_size= 16>>s->avctx->lowres; + const int mb_size = 16 >> s->avctx->lowres; - ff_draw_horiz_band(s, mb_size*(s->mb_y>>field_pic), mb_size); + ff_draw_horiz_band(s, mb_size*(s->mb_y >> field_pic), mb_size); MPV_report_decode_progress(s); s->mb_x = 0; - s->mb_y += 1<mb_y += 1 << field_pic; - if(s->mb_y >= s->mb_height){ - int left= get_bits_left(&s->gb); - int is_d10= s->chroma_format==2 && s->pict_type==AV_PICTURE_TYPE_I && avctx->profile==0 && avctx->level==5 - && s->intra_dc_precision == 2 && s->q_scale_type == 1 && s->alternate_scan == 0 - && s->progressive_frame == 0 /* vbv_delay == 0xBBB || 0xE10*/; + if (s->mb_y >= s->mb_height) { + int left = get_bits_left(&s->gb); + int is_d10 = s->chroma_format == 2 && s->pict_type == AV_PICTURE_TYPE_I && avctx->profile == 0 && avctx->level == 5 + && s->intra_dc_precision == 2 && s->q_scale_type == 1 && s->alternate_scan == 0 + && s->progressive_frame == 0 /* vbv_delay == 0xBBB || 0xE10*/; - if(left < 0 || (left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10) - || (avctx->error_recognition >= FF_ER_AGGRESSIVE && left>8)){ + if (left < 0 || (left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10) + || ((avctx->err_recognition & AV_EF_BUFFER) && left > 8)) { av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d %0X\n", left, show_bits(&s->gb, FFMIN(left, 23))); return -1; - }else + } else goto eos; } @@ -1834,17 +1785,17 @@ if (s->mb_skip_run == -1) { /* read increment again */ s->mb_skip_run = 0; - for(;;) { + for (;;) { int code = get_vlc2(&s->gb, mbincr_vlc.table, MBINCR_VLC_BITS, 2); - if (code < 0){ + if (code < 0) { av_log(s->avctx, AV_LOG_ERROR, "mb incr damaged\n"); return -1; } if (code >= 33) { if (code == 33) { s->mb_skip_run += 33; - }else if(code == 35){ - if(s->mb_skip_run != 0 || show_bits(&s->gb, 15) != 0){ + } else if (code == 35) { + if (s->mb_skip_run != 0 || show_bits(&s->gb, 15) != 0) { av_log(s->avctx, AV_LOG_ERROR, "slice mismatch\n"); return -1; } @@ -1856,28 +1807,28 @@ break; } } - if(s->mb_skip_run){ + if (s->mb_skip_run) { int i; - if(s->pict_type == AV_PICTURE_TYPE_I){ + if (s->pict_type == AV_PICTURE_TYPE_I) { av_log(s->avctx, AV_LOG_ERROR, "skipped MB in I frame at %d %d\n", s->mb_x, s->mb_y); return -1; } /* skip mb */ s->mb_intra = 0; - for(i=0;i<12;i++) + for (i = 0; i < 12; i++) s->block_last_index[i] = -1; - if(s->picture_structure == PICT_FRAME) + if (s->picture_structure == PICT_FRAME) s->mv_type = MV_TYPE_16X16; else s->mv_type = MV_TYPE_FIELD; if (s->pict_type == AV_PICTURE_TYPE_P) { /* if P type, zero motion vector is implied */ - s->mv_dir = MV_DIR_FORWARD; - s->mv[0][0][0] = s->mv[0][0][1] = 0; - s->last_mv[0][0][0] = s->last_mv[0][0][1] = 0; - s->last_mv[0][1][0] = s->last_mv[0][1][1] = 0; - s->field_select[0][0]= (s->picture_structure - 1) & 1; + s->mv_dir = MV_DIR_FORWARD; + s->mv[0][0][0] = s->mv[0][0][1] = 0; + s->last_mv[0][0][0] = s->last_mv[0][0][1] = 0; + s->last_mv[0][1][0] = s->last_mv[0][1][1] = 0; + s->field_select[0][0] = (s->picture_structure - 1) & 1; } else { /* if B type, reuse previous vectors and directions */ s->mv[0][0][0] = s->last_mv[0][0][0]; @@ -1894,42 +1845,43 @@ return 0; } -static int slice_decode_thread(AVCodecContext *c, void *arg){ - MpegEncContext *s= *(void**)arg; - const uint8_t *buf= s->gb.buffer; - int mb_y= s->start_mb_y; - const int field_pic= s->picture_structure != PICT_FRAME; +static int slice_decode_thread(AVCodecContext *c, void *arg) +{ + MpegEncContext *s = *(void**)arg; + const uint8_t *buf = s->gb.buffer; + int mb_y = s->start_mb_y; + const int field_pic = s->picture_structure != PICT_FRAME; - s->error_count= (3*(s->end_mb_y - s->start_mb_y)*s->mb_width) >> field_pic; + s->error_count = (3 * (s->end_mb_y - s->start_mb_y) * s->mb_width) >> field_pic; - for(;;){ + for (;;) { uint32_t start_code; int ret; - ret= mpeg_decode_slice((Mpeg1Context*)s, mb_y, &buf, s->gb.buffer_end - buf); + ret = mpeg_decode_slice(s, mb_y, &buf, s->gb.buffer_end - buf); emms_c(); //av_log(c, AV_LOG_DEBUG, "ret:%d resync:%d/%d mb:%d/%d ts:%d/%d ec:%d\n", //ret, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, s->start_mb_y, s->end_mb_y, s->error_count); - if(ret < 0){ - if(s->resync_mb_x>=0 && s->resync_mb_y>=0) - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, AC_ERROR|DC_ERROR|MV_ERROR); - }else{ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END|DC_END|MV_END); + if (ret < 0) { + if (c->err_recognition & AV_EF_EXPLODE) + return ret; + if (s->resync_mb_x >= 0 && s->resync_mb_y >= 0) + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_AC_ERROR | ER_DC_ERROR | ER_MV_ERROR); + } else { + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_AC_END | ER_DC_END | ER_MV_END); } - if(s->mb_y == s->end_mb_y) + if (s->mb_y == s->end_mb_y) return 0; - start_code= -1; - buf = ff_find_start_code(buf, s->gb.buffer_end, &start_code); + start_code = -1; + buf = avpriv_mpv_find_start_code(buf, s->gb.buffer_end, &start_code); mb_y= (start_code - SLICE_MIN_START_CODE) << field_pic; if (s->picture_structure == PICT_BOTTOM_FIELD) mb_y++; - if(mb_y < 0 || mb_y >= s->end_mb_y) + if (mb_y < 0 || mb_y >= s->end_mb_y) return -1; } - - return 0; //not reached } /** @@ -1949,21 +1901,21 @@ av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode picture\n"); } - if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) + if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) ff_xvmc_field_end(s); /* end of slice reached */ - if (/*s->mb_y<mb_height &&*/ !s->first_field) { + if (/*s->mb_y << field_pic == s->mb_height &&*/ !s->first_field) { /* end of image */ - s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_MPEG2; + s->current_picture_ptr->f.qscale_type = FF_QSCALE_TYPE_MPEG2; ff_er_frame_end(s); MPV_frame_end(s); if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { - *pict= *(AVFrame*)s->current_picture_ptr; + *pict = *(AVFrame*)s->current_picture_ptr; ff_print_debug_info(s, pict); } else { if (avctx->active_thread_type & FF_THREAD_FRAME) @@ -1971,7 +1923,7 @@ /* latency of 1 frame for I- and P-frames */ /* XXX: use another variable than picture_number */ if (s->last_picture_ptr != NULL) { - *pict= *(AVFrame*)s->last_picture_ptr; + *pict = *(AVFrame*)s->last_picture_ptr; ff_print_debug_info(s, pict); } } @@ -1987,19 +1939,19 @@ { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; - int width,height; + int width, height; int i, v, j; init_get_bits(&s->gb, buf, buf_size*8); - width = get_bits(&s->gb, 12); + width = get_bits(&s->gb, 12); height = get_bits(&s->gb, 12); if (width <= 0 || height <= 0) return -1; - s->aspect_ratio_info= get_bits(&s->gb, 4); + s->aspect_ratio_info = get_bits(&s->gb, 4); if (s->aspect_ratio_info == 0) { av_log(avctx, AV_LOG_ERROR, "aspect ratio has forbidden 0 value\n"); - if (avctx->error_recognition >= FF_ER_COMPLIANT) + if (avctx->err_recognition & AV_EF_BITSTREAM) return -1; } s->frame_rate_index = get_bits(&s->gb, 4); @@ -2008,52 +1960,53 @@ s->bit_rate = get_bits(&s->gb, 18) * 400; if (get_bits1(&s->gb) == 0) /* marker */ return -1; - s->width = width; + s->width = width; s->height = height; - s->avctx->rc_buffer_size= get_bits(&s->gb, 10) * 1024*16; + s->avctx->rc_buffer_size = get_bits(&s->gb, 10) * 1024 * 16; skip_bits(&s->gb, 1); /* get matrix */ if (get_bits1(&s->gb)) { load_matrix(s, s->chroma_intra_matrix, s->intra_matrix, 1); } else { - for(i=0;i<64;i++) { + for (i = 0; i < 64; i++) { j = s->dsp.idct_permutation[i]; v = ff_mpeg1_default_intra_matrix[i]; - s->intra_matrix[j] = v; + s->intra_matrix[j] = v; s->chroma_intra_matrix[j] = v; } } if (get_bits1(&s->gb)) { load_matrix(s, s->chroma_inter_matrix, s->inter_matrix, 0); } else { - for(i=0;i<64;i++) { - int j= s->dsp.idct_permutation[i]; + for (i = 0; i < 64; i++) { + int j = s->dsp.idct_permutation[i]; v = ff_mpeg1_default_non_intra_matrix[i]; - s->inter_matrix[j] = v; + s->inter_matrix[j] = v; s->chroma_inter_matrix[j] = v; } } - if(show_bits(&s->gb, 23) != 0){ + if (show_bits(&s->gb, 23) != 0) { av_log(s->avctx, AV_LOG_ERROR, "sequence header damaged\n"); return -1; } /* we set MPEG-2 parameters so that it emulates MPEG-1 */ s->progressive_sequence = 1; - s->progressive_frame = 1; - s->picture_structure = PICT_FRAME; + s->progressive_frame = 1; + s->picture_structure = PICT_FRAME; s->frame_pred_frame_dct = 1; - s->chroma_format = 1; - s->codec_id= s->avctx->codec_id= CODEC_ID_MPEG1VIDEO; - avctx->sub_id = 1; /* indicates MPEG-1 */ - s->out_format = FMT_MPEG1; - s->swap_uv = 0;//AFAIK VCR2 does not have SEQ_HEADER - if(s->flags & CODEC_FLAG_LOW_DELAY) s->low_delay=1; + s->chroma_format = 1; + s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG1VIDEO; + avctx->sub_id = 1; /* indicates MPEG-1 */ + s->out_format = FMT_MPEG1; + s->swap_uv = 0; // AFAIK VCR2 does not have SEQ_HEADER + if (s->flags & CODEC_FLAG_LOW_DELAY) + s->low_delay = 1; - if(s->avctx->debug & FF_DEBUG_PICT_INFO) + if (s->avctx->debug & FF_DEBUG_PICT_INFO) av_log(s->avctx, AV_LOG_DEBUG, "vbv buffer: %d, bitrate:%d\n", s->avctx->rc_buffer_size, s->bit_rate); @@ -2073,41 +2026,41 @@ } s->width = avctx->coded_width; s->height = avctx->coded_height; - avctx->has_b_frames= 0; //true? - s->low_delay= 1; + avctx->has_b_frames = 0; // true? + s->low_delay = 1; avctx->pix_fmt = mpeg_get_pixelformat(avctx); avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); - if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel || - s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ) - if( avctx->idct_algo == FF_IDCT_AUTO ) + if (avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel || + s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) + if (avctx->idct_algo == FF_IDCT_AUTO) avctx->idct_algo = FF_IDCT_SIMPLE; if (MPV_common_init(s) < 0) return -1; - exchange_uv(s);//common init reset pblocks, so we swap them here - s->swap_uv = 1;// in case of xvmc we need to swap uv for each MB + exchange_uv(s); // common init reset pblocks, so we swap them here + s->swap_uv = 1; // in case of xvmc we need to swap uv for each MB s1->mpeg_enc_ctx_allocated = 1; - for(i=0;i<64;i++) { - int j= s->dsp.idct_permutation[i]; + for (i = 0; i < 64; i++) { + int j = s->dsp.idct_permutation[i]; v = ff_mpeg1_default_intra_matrix[i]; - s->intra_matrix[j] = v; + s->intra_matrix[j] = v; s->chroma_intra_matrix[j] = v; v = ff_mpeg1_default_non_intra_matrix[i]; - s->inter_matrix[j] = v; + s->inter_matrix[j] = v; s->chroma_inter_matrix[j] = v; } - s->progressive_sequence = 1; - s->progressive_frame = 1; - s->picture_structure = PICT_FRAME; - s->frame_pred_frame_dct = 1; - s->chroma_format = 1; - s->codec_id= s->avctx->codec_id= CODEC_ID_MPEG2VIDEO; - avctx->sub_id = 2; /* indicates MPEG-2 */ + s->progressive_sequence = 1; + s->progressive_frame = 1; + s->picture_structure = PICT_FRAME; + s->frame_pred_frame_dct = 1; + s->chroma_format = 1; + s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO; + avctx->sub_id = 2; /* indicates MPEG-2 */ s1->save_width = s->width; s1->save_height = s->height; s1->save_progressive_seq = s->progressive_sequence; @@ -2118,7 +2071,7 @@ static void mpeg_decode_user_data(AVCodecContext *avctx, const uint8_t *p, int buf_size) { - const uint8_t *buf_end = p+buf_size; + const uint8_t *buf_end = p + buf_size; /* we parse the DTG active format information */ if (buf_end - p >= 5 && @@ -2138,8 +2091,9 @@ } static void mpeg_decode_gop(AVCodecContext *avctx, - const uint8_t *buf, int buf_size){ - Mpeg1Context *s1 = avctx->priv_data; + const uint8_t *buf, int buf_size) +{ + Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; int time_code_hours, time_code_minutes; @@ -2150,22 +2104,22 @@ skip_bits1(&s->gb); /* drop_frame_flag */ - time_code_hours=get_bits(&s->gb,5); - time_code_minutes = get_bits(&s->gb,6); - skip_bits1(&s->gb);//marker bit - time_code_seconds = get_bits(&s->gb,6); - time_code_pictures = get_bits(&s->gb,6); + time_code_hours = get_bits(&s->gb, 5); + time_code_minutes = get_bits(&s->gb, 6); + skip_bits1(&s->gb); // marker bit + time_code_seconds = get_bits(&s->gb, 6); + time_code_pictures = get_bits(&s->gb, 6); - s->closed_gop = get_bits1(&s->gb); + s1->closed_gop = get_bits1(&s->gb); /*broken_link indicate that after editing the reference frames of the first B-Frames after GOP I-Frame are missing (open gop)*/ broken_link = get_bits1(&s->gb); - if(s->avctx->debug & FF_DEBUG_PICT_INFO) + if (s->avctx->debug & FF_DEBUG_PICT_INFO) av_log(s->avctx, AV_LOG_DEBUG, "GOP (%2d:%02d:%02d.[%02d]) closed_gop=%d broken_link=%d\n", - time_code_hours, time_code_minutes, time_code_seconds, - time_code_pictures, s->closed_gop, broken_link); + time_code_hours, time_code_minutes, time_code_seconds, + time_code_pictures, s1->closed_gop, broken_link); } /** * Find the end of the current frame in the bitstream. @@ -2174,7 +2128,7 @@ int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size, AVCodecParserContext *s) { int i; - uint32_t state= pc->state; + uint32_t state = pc->state; /* EOF considered as end of frame */ if (buf_size == 0) @@ -2188,49 +2142,51 @@ 4 searching end */ - for(i=0; iframe_start_found>=0 && pc->frame_start_found<=4); - if(pc->frame_start_found&1){ - if(state == EXT_START_CODE && (buf[i]&0xF0) != 0x80) + for (i = 0; i < buf_size; i++) { + assert(pc->frame_start_found >= 0 && pc->frame_start_found <= 4); + if (pc->frame_start_found & 1) { + if (state == EXT_START_CODE && (buf[i] & 0xF0) != 0x80) pc->frame_start_found--; - else if(state == EXT_START_CODE+2){ - if((buf[i]&3) == 3) pc->frame_start_found= 0; - else pc->frame_start_found= (pc->frame_start_found+1)&3; + else if (state == EXT_START_CODE + 2) { + if ((buf[i] & 3) == 3) + pc->frame_start_found = 0; + else + pc->frame_start_found = (pc->frame_start_found + 1) & 3; } state++; - }else{ - i= ff_find_start_code(buf+i, buf+buf_size, &state) - buf - 1; - if(pc->frame_start_found==0 && state >= SLICE_MIN_START_CODE && state <= SLICE_MAX_START_CODE){ + } else { + i = avpriv_mpv_find_start_code(buf + i, buf + buf_size, &state) - buf - 1; + if (pc->frame_start_found == 0 && state >= SLICE_MIN_START_CODE && state <= SLICE_MAX_START_CODE) { i++; - pc->frame_start_found=4; + pc->frame_start_found = 4; } - if(state == SEQ_END_CODE){ + if (state == SEQ_END_CODE) { pc->state=-1; return i+1; } - if(pc->frame_start_found==2 && state == SEQ_START_CODE) - pc->frame_start_found= 0; - if(pc->frame_start_found<4 && state == EXT_START_CODE) + if (pc->frame_start_found == 2 && state == SEQ_START_CODE) + pc->frame_start_found = 0; + if (pc->frame_start_found < 4 && state == EXT_START_CODE) pc->frame_start_found++; - if(pc->frame_start_found == 4 && (state&0xFFFFFF00) == 0x100){ - if(state < SLICE_MIN_START_CODE || state > SLICE_MAX_START_CODE){ - pc->frame_start_found=0; - pc->state=-1; - return i-3; + if (pc->frame_start_found == 4 && (state & 0xFFFFFF00) == 0x100) { + if (state < SLICE_MIN_START_CODE || state > SLICE_MAX_START_CODE) { + pc->frame_start_found = 0; + pc->state = -1; + return i - 3; } } - if(pc->frame_start_found == 0 && s && state == PICTURE_START_CODE){ - ff_fetch_timestamp(s, i-3, 1); + if (pc->frame_start_found == 0 && s && state == PICTURE_START_CODE) { + ff_fetch_timestamp(s, i - 3, 1); } } } - pc->state= state; + pc->state = state; return END_NOT_FOUND; } static int decode_chunks(AVCodecContext *avctx, - AVFrame *picture, int *data_size, - const uint8_t *buf, int buf_size); + AVFrame *picture, int *data_size, + const uint8_t *buf, int buf_size); /* handle buffering and image synchronisation */ static int mpeg_decode_frame(AVCodecContext *avctx, @@ -2246,102 +2202,94 @@ if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == SEQ_END_CODE)) { /* special case for last picture */ - if (s2->low_delay==0 && s2->next_picture_ptr) { - *picture= *(AVFrame*)s2->next_picture_ptr; - s2->next_picture_ptr= NULL; + if (s2->low_delay == 0 && s2->next_picture_ptr) { + *picture = *(AVFrame*)s2->next_picture_ptr; + s2->next_picture_ptr = NULL; *data_size = sizeof(AVFrame); } return buf_size; } - if(s2->flags&CODEC_FLAG_TRUNCATED){ - int next= ff_mpeg1_find_frame_end(&s2->parse_context, buf, buf_size, NULL); + if (s2->flags & CODEC_FLAG_TRUNCATED) { + int next = ff_mpeg1_find_frame_end(&s2->parse_context, buf, buf_size, NULL); - if( ff_combine_frame(&s2->parse_context, next, (const uint8_t **)&buf, &buf_size) < 0 ) + if (ff_combine_frame(&s2->parse_context, next, (const uint8_t **)&buf, &buf_size) < 0) return buf_size; } -#if 0 - if (s->repeat_field % 2 == 1) { - s->repeat_field++; - //fprintf(stderr,"\nRepeating last frame: %d -> %d! pict: %d %d", avctx->frame_number-1, avctx->frame_number, - // s2->picture_number, s->repeat_field); - if (avctx->flags & CODEC_FLAG_REPEAT_FIELD) { - *data_size = sizeof(AVPicture); - goto the_end; - } - } -#endif - - if(s->mpeg_enc_ctx_allocated==0 && avctx->codec_tag == AV_RL32("VCR2")) + if (s->mpeg_enc_ctx_allocated == 0 && avctx->codec_tag == AV_RL32("VCR2")) vcr2_init_sequence(avctx); - s->slice_count= 0; + s->slice_count = 0; - if(avctx->extradata && !avctx->frame_number) - decode_chunks(avctx, picture, data_size, avctx->extradata, avctx->extradata_size); + if (avctx->extradata && !avctx->frame_number) { + int ret = decode_chunks(avctx, picture, data_size, avctx->extradata, avctx->extradata_size); + if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE)) + return ret; + } return decode_chunks(avctx, picture, data_size, buf, buf_size); } static int decode_chunks(AVCodecContext *avctx, - AVFrame *picture, int *data_size, - const uint8_t *buf, int buf_size) + AVFrame *picture, int *data_size, + const uint8_t *buf, int buf_size) { Mpeg1Context *s = avctx->priv_data; MpegEncContext *s2 = &s->mpeg_enc_ctx; const uint8_t *buf_ptr = buf; const uint8_t *buf_end = buf + buf_size; int ret, input_size; - int last_code= 0; + int last_code = 0; - for(;;) { + for (;;) { /* find next start code */ uint32_t start_code = -1; - buf_ptr = ff_find_start_code(buf_ptr,buf_end, &start_code); - if (start_code > 0x1ff){ - if(s2->pict_type != AV_PICTURE_TYPE_B || avctx->skip_frame <= AVDISCARD_DEFAULT){ - if(HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE)){ + buf_ptr = avpriv_mpv_find_start_code(buf_ptr, buf_end, &start_code); + if (start_code > 0x1ff) { + if (s2->pict_type != AV_PICTURE_TYPE_B || avctx->skip_frame <= AVDISCARD_DEFAULT) { + if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE)) { int i; avctx->execute(avctx, slice_decode_thread, &s2->thread_context[0], NULL, s->slice_count, sizeof(void*)); - for(i=0; islice_count; i++) + for (i = 0; i < s->slice_count; i++) s2->error_count += s2->thread_context[i]->error_count; } - if (CONFIG_MPEG_VDPAU_DECODER && avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) + if (CONFIG_MPEG_VDPAU_DECODER && avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) ff_vdpau_mpeg_picture_complete(s2, buf, buf_size, s->slice_count); if (slice_end(avctx, picture)) { - if(s2->last_picture_ptr || s2->low_delay) //FIXME merge with the stuff in mpeg_decode_slice + if (s2->last_picture_ptr || s2->low_delay) //FIXME merge with the stuff in mpeg_decode_slice *data_size = sizeof(AVPicture); } } - s2->pict_type= 0; + s2->pict_type = 0; return FFMAX(0, buf_ptr - buf - s2->parse_context.last_index); } input_size = buf_end - buf_ptr; - if(avctx->debug & FF_DEBUG_STARTCODE){ + if (avctx->debug & FF_DEBUG_STARTCODE) { av_log(avctx, AV_LOG_DEBUG, "%3X at %td left %d\n", start_code, buf_ptr-buf, input_size); } /* prepare data for next start code */ - switch(start_code) { + switch (start_code) { case SEQ_START_CODE: - if(last_code == 0){ - mpeg1_decode_sequence(avctx, buf_ptr, - input_size); + if (last_code == 0) { + mpeg1_decode_sequence(avctx, buf_ptr, input_size); s->sync=1; - }else{ + } else { av_log(avctx, AV_LOG_ERROR, "ignoring SEQ_START_CODE after %X\n", last_code); + if (avctx->err_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; } break; case PICTURE_START_CODE: - if (HAVE_THREADS && (avctx->active_thread_type&FF_THREAD_SLICE) && s->slice_count) { + if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE) && s->slice_count) { int i; avctx->execute(avctx, slice_decode_thread, @@ -2351,31 +2299,35 @@ s2->error_count += s2->thread_context[i]->error_count; s->slice_count = 0; } - if(last_code == 0 || last_code == SLICE_MIN_START_CODE){ - if(mpeg_decode_postinit(avctx) < 0){ - av_log(avctx, AV_LOG_ERROR, "mpeg_decode_postinit() failure\n"); - return -1; - } + if (last_code == 0 || last_code == SLICE_MIN_START_CODE) { + ret = mpeg_decode_postinit(avctx); + if (ret < 0) { + av_log(avctx, AV_LOG_ERROR, "mpeg_decode_postinit() failure\n"); + return ret; + } - /* we have a complete image: we try to decompress it */ - if(mpeg1_decode_picture(avctx, - buf_ptr, input_size) < 0) - s2->pict_type=0; + /* we have a complete image: we try to decompress it */ + if (mpeg1_decode_picture(avctx, buf_ptr, input_size) < 0) + s2->pict_type = 0; s2->first_slice = 1; - last_code= PICTURE_START_CODE; - }else{ + last_code = PICTURE_START_CODE; + } else { av_log(avctx, AV_LOG_ERROR, "ignoring pic after %X\n", last_code); + if (avctx->err_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; } break; case EXT_START_CODE: init_get_bits(&s2->gb, buf_ptr, input_size*8); - switch(get_bits(&s2->gb, 4)) { + switch (get_bits(&s2->gb, 4)) { case 0x1: - if(last_code == 0){ + if (last_code == 0) { mpeg_decode_sequence_extension(s); - }else{ + } else { av_log(avctx, AV_LOG_ERROR, "ignoring seq ext after %X\n", last_code); + if (avctx->err_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; } break; case 0x2: @@ -2388,112 +2340,121 @@ mpeg_decode_picture_display_extension(s); break; case 0x8: - if(last_code == PICTURE_START_CODE){ - mpeg_decode_picture_coding_extension(s); - }else{ + if (last_code == PICTURE_START_CODE) { + mpeg_decode_picture_coding_extension(s); + } else { av_log(avctx, AV_LOG_ERROR, "ignoring pic cod ext after %X\n", last_code); + if (avctx->err_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; } break; } break; case USER_START_CODE: - mpeg_decode_user_data(avctx, - buf_ptr, input_size); + mpeg_decode_user_data(avctx, buf_ptr, input_size); break; case GOP_START_CODE: - if(last_code == 0){ - s2->first_field=0; - mpeg_decode_gop(avctx, - buf_ptr, input_size); + if (last_code == 0) { + s2->first_field=0; + mpeg_decode_gop(avctx, buf_ptr, input_size); s->sync=1; - }else{ + } else { av_log(avctx, AV_LOG_ERROR, "ignoring GOP_START_CODE after %X\n", last_code); + if (avctx->err_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; } break; default: if (start_code >= SLICE_MIN_START_CODE && - start_code <= SLICE_MAX_START_CODE && last_code!=0) { - const int field_pic= s2->picture_structure != PICT_FRAME; - int mb_y= (start_code - SLICE_MIN_START_CODE) << field_pic; - last_code= SLICE_MIN_START_CODE; + start_code <= SLICE_MAX_START_CODE && last_code != 0) { + const int field_pic = s2->picture_structure != PICT_FRAME; + int mb_y = (start_code - SLICE_MIN_START_CODE) << field_pic; + last_code = SLICE_MIN_START_CODE; - if(s2->picture_structure == PICT_BOTTOM_FIELD) + if (s2->picture_structure == PICT_BOTTOM_FIELD) mb_y++; - if (mb_y >= s2->mb_height){ + if (mb_y >= s2->mb_height) { av_log(s2->avctx, AV_LOG_ERROR, "slice below image (%d >= %d)\n", mb_y, s2->mb_height); return -1; } - if(s2->last_picture_ptr==NULL){ + if (s2->last_picture_ptr == NULL) { /* Skip B-frames if we do not have reference frames and gop is not closed */ - if(s2->pict_type==AV_PICTURE_TYPE_B){ - if(!s2->closed_gop) + if (s2->pict_type == AV_PICTURE_TYPE_B) { + if (!s->closed_gop) break; } } - if(s2->pict_type==AV_PICTURE_TYPE_I) + if (s2->pict_type == AV_PICTURE_TYPE_I) s->sync=1; - if(s2->next_picture_ptr==NULL){ + if (s2->next_picture_ptr == NULL) { /* Skip P-frames if we do not have a reference frame or we have an invalid header. */ - if(s2->pict_type==AV_PICTURE_TYPE_P && !s->sync) break; + if (s2->pict_type == AV_PICTURE_TYPE_P && !s->sync) break; } - if( (avctx->skip_frame >= AVDISCARD_NONREF && s2->pict_type==AV_PICTURE_TYPE_B) - ||(avctx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type!=AV_PICTURE_TYPE_I) - || avctx->skip_frame >= AVDISCARD_ALL) + if ((avctx->skip_frame >= AVDISCARD_NONREF && s2->pict_type == AV_PICTURE_TYPE_B) || + (avctx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type != AV_PICTURE_TYPE_I) || + avctx->skip_frame >= AVDISCARD_ALL) break; - if (!s->mpeg_enc_ctx_allocated) break; + if (!s->mpeg_enc_ctx_allocated) + break; - if(s2->codec_id == CODEC_ID_MPEG2VIDEO){ - if(mb_y < avctx->skip_top || mb_y >= s2->mb_height - avctx->skip_bottom) + if (s2->codec_id == CODEC_ID_MPEG2VIDEO) { + if (mb_y < avctx->skip_top || mb_y >= s2->mb_height - avctx->skip_bottom) break; } - if(!s2->pict_type){ + if (!s2->pict_type) { av_log(avctx, AV_LOG_ERROR, "Missing picture start code\n"); + if (avctx->err_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; break; } - if(s2->first_slice){ - s2->first_slice=0; - if(mpeg_field_start(s2, buf, buf_size) < 0) + if (s2->first_slice) { + s2->first_slice = 0; + if (mpeg_field_start(s2, buf, buf_size) < 0) return -1; } - if(!s2->current_picture_ptr){ + if (!s2->current_picture_ptr) { av_log(avctx, AV_LOG_ERROR, "current_picture not initialized\n"); - return -1; + return AVERROR_INVALIDDATA; } - if (avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) { + if (avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) { s->slice_count++; break; } - if(HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE)){ - int threshold= (s2->mb_height*s->slice_count + avctx->thread_count/2) / avctx->thread_count; - if(threshold <= mb_y){ - MpegEncContext *thread_context= s2->thread_context[s->slice_count]; - - thread_context->start_mb_y= mb_y; - thread_context->end_mb_y = s2->mb_height; - if(s->slice_count){ - s2->thread_context[s->slice_count-1]->end_mb_y= mb_y; + if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE)) { + int threshold = (s2->mb_height * s->slice_count + + s2->slice_context_count / 2) / + s2->slice_context_count; + if (threshold <= mb_y) { + MpegEncContext *thread_context = s2->thread_context[s->slice_count]; + + thread_context->start_mb_y = mb_y; + thread_context->end_mb_y = s2->mb_height; + if (s->slice_count) { + s2->thread_context[s->slice_count-1]->end_mb_y = mb_y; ff_update_duplicate_context(thread_context, s2); } init_get_bits(&thread_context->gb, buf_ptr, input_size*8); s->slice_count++; } - buf_ptr += 2; //FIXME add minimum number of bytes per slice - }else{ - ret = mpeg_decode_slice(s, mb_y, &buf_ptr, input_size); + buf_ptr += 2; // FIXME add minimum number of bytes per slice + } else { + ret = mpeg_decode_slice(s2, mb_y, &buf_ptr, input_size); emms_c(); - if(ret < 0){ - if(s2->resync_mb_x>=0 && s2->resync_mb_y>=0) - ff_er_add_slice(s2, s2->resync_mb_x, s2->resync_mb_y, s2->mb_x, s2->mb_y, AC_ERROR|DC_ERROR|MV_ERROR); - }else{ - ff_er_add_slice(s2, s2->resync_mb_x, s2->resync_mb_y, s2->mb_x-1, s2->mb_y, AC_END|DC_END|MV_END); + if (ret < 0) { + if (avctx->err_recognition & AV_EF_EXPLODE) + return ret; + if (s2->resync_mb_x >= 0 && s2->resync_mb_y >= 0) + ff_er_add_slice(s2, s2->resync_mb_x, s2->resync_mb_y, s2->mb_x, s2->mb_y, ER_AC_ERROR | ER_DC_ERROR | ER_MV_ERROR); + } else { + ff_er_add_slice(s2, s2->resync_mb_x, s2->resync_mb_y, s2->mb_x-1, s2->mb_y, ER_AC_END | ER_DC_END | ER_MV_END); } } } @@ -2502,10 +2463,12 @@ } } -static void flush(AVCodecContext *avctx){ +static void flush(AVCodecContext *avctx) +{ Mpeg1Context *s = avctx->priv_data; s->sync=0; + s->closed_gop = 0; ff_mpeg_flush(avctx); } @@ -2533,115 +2496,95 @@ AVCodec ff_mpeg1video_decoder = { - "mpeg1video", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG1VIDEO, - sizeof(Mpeg1Context), - mpeg_decode_init, - NULL, - mpeg_decode_end, - mpeg_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, - .flush= flush, - .max_lowres= 3, - .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"), - .update_thread_context= ONLY_IF_THREADS_ENABLED(mpeg_decode_update_thread_context) + .name = "mpeg1video", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG1VIDEO, + .priv_data_size = sizeof(Mpeg1Context), + .init = mpeg_decode_init, + .close = mpeg_decode_end, + .decode = mpeg_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, + .flush = flush, + .max_lowres = 3, + .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), + .update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg_decode_update_thread_context) }; AVCodec ff_mpeg2video_decoder = { - "mpeg2video", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG2VIDEO, - sizeof(Mpeg1Context), - mpeg_decode_init, - NULL, - mpeg_decode_end, - mpeg_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, - .flush= flush, - .max_lowres= 3, - .long_name= NULL_IF_CONFIG_SMALL("MPEG-2 video"), - .profiles = NULL_IF_CONFIG_SMALL(mpeg2_video_profiles), -}; - -//legacy decoder -AVCodec ff_mpegvideo_decoder = { - "mpegvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG2VIDEO, - sizeof(Mpeg1Context), - mpeg_decode_init, - NULL, - mpeg_decode_end, - mpeg_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, - .flush= flush, - .max_lowres= 3, - .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"), + .name = "mpeg2video", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG2VIDEO, + .priv_data_size = sizeof(Mpeg1Context), + .init = mpeg_decode_init, + .close = mpeg_decode_end, + .decode = mpeg_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, + .flush = flush, + .max_lowres = 3, + .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"), + .profiles = NULL_IF_CONFIG_SMALL(mpeg2_video_profiles), }; #if CONFIG_MPEG_XVMC_DECODER -static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){ - if( avctx->active_thread_type & FF_THREAD_SLICE ) +static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx) +{ + if (avctx->active_thread_type & FF_THREAD_SLICE) return -1; - if( !(avctx->slice_flags & SLICE_FLAG_CODED_ORDER) ) + if (!(avctx->slice_flags & SLICE_FLAG_CODED_ORDER)) return -1; - if( !(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD) ){ + if (!(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) { av_dlog(avctx, "mpeg12.c: XvMC decoder will work better if SLICE_FLAG_ALLOW_FIELD is set\n"); } mpeg_decode_init(avctx); - avctx->pix_fmt = PIX_FMT_XVMC_MPEG2_IDCT; - avctx->xvmc_acceleration = 2;//2 - the blocks are packed! + avctx->pix_fmt = PIX_FMT_XVMC_MPEG2_IDCT; + avctx->xvmc_acceleration = 2; // 2 - the blocks are packed! return 0; } AVCodec ff_mpeg_xvmc_decoder = { - "mpegvideo_xvmc", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG2VIDEO_XVMC, - sizeof(Mpeg1Context), - mpeg_mc_decode_init, - NULL, - mpeg_decode_end, - mpeg_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED| CODEC_CAP_HWACCEL | CODEC_CAP_DELAY, - .flush= flush, - .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video XvMC (X-Video Motion Compensation)"), + .name = "mpegvideo_xvmc", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG2VIDEO_XVMC, + .priv_data_size = sizeof(Mpeg1Context), + .init = mpeg_mc_decode_init, + .close = mpeg_decode_end, + .decode = mpeg_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED| CODEC_CAP_HWACCEL | CODEC_CAP_DELAY, + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video XvMC (X-Video Motion Compensation)"), }; #endif #if CONFIG_MPEG_VDPAU_DECODER AVCodec ff_mpeg_vdpau_decoder = { - "mpegvideo_vdpau", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG2VIDEO, - sizeof(Mpeg1Context), - mpeg_decode_init, - NULL, - mpeg_decode_end, - mpeg_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL_VDPAU | CODEC_CAP_DELAY, - .flush= flush, - .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video (VDPAU acceleration)"), + .name = "mpegvideo_vdpau", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG2VIDEO, + .priv_data_size = sizeof(Mpeg1Context), + .init = mpeg_decode_init, + .close = mpeg_decode_end, + .decode = mpeg_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL_VDPAU | CODEC_CAP_DELAY, + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video (VDPAU acceleration)"), }; #endif #if CONFIG_MPEG1_VDPAU_DECODER AVCodec ff_mpeg1_vdpau_decoder = { - "mpeg1video_vdpau", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG1VIDEO, - sizeof(Mpeg1Context), - mpeg_decode_init, - NULL, - mpeg_decode_end, - mpeg_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL_VDPAU | CODEC_CAP_DELAY, - .flush= flush, - .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video (VDPAU acceleration)"), + .name = "mpeg1video_vdpau", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG1VIDEO, + .priv_data_size = sizeof(Mpeg1Context), + .init = mpeg_decode_init, + .close = mpeg_decode_end, + .decode = mpeg_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL_VDPAU | CODEC_CAP_DELAY, + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video (VDPAU acceleration)"), }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg12data.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg12data.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg12data.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg12data.c 2012-01-11 00:34:30.000000000 +0000 @@ -305,7 +305,7 @@ { 0xc, 10 }, }; -const AVRational ff_frame_rate_tab[] = { +const AVRational avpriv_frame_rate_tab[] = { { 0, 0}, {24000, 1001}, { 24, 1}, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg12data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg12data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg12data.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg12data.h 2012-01-11 00:34:30.000000000 +0000 @@ -48,7 +48,7 @@ extern const uint8_t ff_mpeg12_mbMotionVectorTable[17][2]; -extern const AVRational ff_frame_rate_tab[]; +extern const AVRational avpriv_frame_rate_tab[]; extern const float ff_mpeg1_aspect[16]; extern const AVRational ff_mpeg2_aspect[16]; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg12enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg12enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg12enc.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg12enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,12 +27,15 @@ #include "avcodec.h" #include "dsputil.h" +#include "mathops.h" #include "mpegvideo.h" #include "mpeg12.h" #include "mpeg12data.h" #include "bytestream.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" static const uint8_t inv_non_linear_qscale[13] = { 0, 2, 4, 6, 8, @@ -71,11 +74,12 @@ for(i=0; i<128; i++){ int level= i-64; int run; + if (!level) + continue; for(run=0; run<64; run++){ - int len, bits, code; + int len, code; int alevel= FFABS(level); - int sign= (level>>31)&1; if (alevel > rl->max_level[0][run]) code= 111; /*rl->n*/ @@ -83,25 +87,15 @@ code= rl->index_run[0][run] + alevel - 1; if (code < 111 /* rl->n */) { - /* store the vlc & sign at once */ + /* length of vlc and sign */ len= rl->table_vlc[code][1]+1; - bits= (rl->table_vlc[code][0]<<1) + sign; } else { len= rl->table_vlc[111/*rl->n*/][1]+6; - bits= rl->table_vlc[111/*rl->n*/][0]<<6; - bits|= run; if (alevel < 128) { - bits<<=8; len+=8; - bits|= level & 0xff; + len += 8; } else { - bits<<=16; len+=16; - bits|= level & 0xff; - if (level < 0) { - bits|= 0x8001 + level + 255; - } else { - bits|= level & 0xffff; - } + len += 16; } } @@ -117,7 +111,7 @@ int64_t d; for(i=1;i<14;i++) { - int64_t n0= 1001LL/ff_frame_rate_tab[i].den*ff_frame_rate_tab[i].num*s->avctx->time_base.num; + int64_t n0= 1001LL/avpriv_frame_rate_tab[i].den*avpriv_frame_rate_tab[i].num*s->avctx->time_base.num; int64_t n1= 1001LL*s->avctx->time_base.den; if(s->avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL && i>=9) break; @@ -140,6 +134,13 @@ if(MPV_encode_init(avctx) < 0) return -1; +#if FF_API_MPEGVIDEO_GLOBAL_OPTS + if (avctx->flags2 & CODEC_FLAG2_DROP_FRAME_TIMECODE) + s->drop_frame_timecode = 1; + if (avctx->flags & CODEC_FLAG_SVCD_SCAN_OFFSET) + s->scan_offset = 1; +#endif + if(find_frame_rate_index(s) < 0){ if(s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL){ av_log(avctx, AV_LOG_ERROR, "MPEG1/2 does not support %d/%d fps\n", avctx->time_base.den, avctx->time_base.num); @@ -172,7 +173,7 @@ } } - if((avctx->flags2 & CODEC_FLAG2_DROP_FRAME_TIMECODE) && s->frame_rate_index != 4){ + if (s->drop_frame_timecode && s->frame_rate_index != 4) { av_log(avctx, AV_LOG_ERROR, "Drop frame time code only allowed with 1001/30000 fps\n"); return -1; } @@ -182,7 +183,7 @@ static void put_header(MpegEncContext *s, int header) { - align_put_bits(&s->pb); + avpriv_align_put_bits(&s->pb); put_bits(&s->pb, 16, header>>16); put_sbits(&s->pb, 16, header); } @@ -200,8 +201,8 @@ if(aspect_ratio==0.0) aspect_ratio= 1.0; //pixel aspect 1:1 (VGA) - if (s->current_picture.key_frame) { - AVRational framerate= ff_frame_rate_tab[s->frame_rate_index]; + if (s->current_picture.f.key_frame) { + AVRational framerate= avpriv_frame_rate_tab[s->frame_rate_index]; /* mpeg1 header repeated every gop */ put_header(s, SEQ_START_CODE); @@ -283,14 +284,14 @@ } put_header(s, GOP_START_CODE); - put_bits(&s->pb, 1, !!(s->avctx->flags2 & CODEC_FLAG2_DROP_FRAME_TIMECODE)); /* drop frame flag */ + put_bits(&s->pb, 1, s->drop_frame_timecode); /* drop frame flag */ /* time code : we must convert from the real frame rate to a fake mpeg frame rate in case of low frame rate */ fps = (framerate.num + framerate.den/2)/ framerate.den; - time_code = s->current_picture_ptr->coded_picture_number + s->avctx->timecode_frame_start; + time_code = s->current_picture_ptr->f.coded_picture_number + s->avctx->timecode_frame_start; - s->gop_picture_number = s->current_picture_ptr->coded_picture_number; - if (s->avctx->flags2 & CODEC_FLAG2_DROP_FRAME_TIMECODE) { + s->gop_picture_number = s->current_picture_ptr->f.coded_picture_number; + if (s->drop_frame_timecode) { /* only works for NTSC 29.97 */ int d = time_code / 17982; int m = time_code % 17982; @@ -396,7 +397,7 @@ if (s->progressive_sequence) { put_bits(&s->pb, 1, 0); /* no repeat */ } else { - put_bits(&s->pb, 1, s->current_picture_ptr->top_field_first); + put_bits(&s->pb, 1, s->current_picture_ptr->f.top_field_first); } /* XXX: optimize the generation of this flag with entropy measures */ @@ -413,7 +414,7 @@ put_bits(&s->pb, 1, s->progressive_frame); put_bits(&s->pb, 1, 0); //composite_display_flag } - if(s->flags & CODEC_FLAG_SVCD_SCAN_OFFSET){ + if (s->scan_offset) { int i; put_header(s, USER_START_CODE); @@ -681,8 +682,7 @@ int bit_size = f_or_b_code - 1; int range = 1 << bit_size; /* modulo encoding */ - int l= INT_BIT - 5 - bit_size; - val= (val<>l; + val = sign_extend(val, 5 + bit_size); if (val >= 0) { val--; @@ -925,30 +925,62 @@ put_bits(&s->pb, table_vlc[112][1], table_vlc[112][0]); } +#define OFFSET(x) offsetof(MpegEncContext, x) +#define VE AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM +#define COMMON_OPTS\ + { "intra_vlc", "Use MPEG-2 intra VLC table.", OFFSET(intra_vlc_format), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE },\ + { "drop_frame_timecode", "Timecode is in drop frame format.", OFFSET(drop_frame_timecode), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE}, \ + { "scan_offset", "Reserve space for SVCD scan offset user data.", OFFSET(scan_offset), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, + +static const AVOption mpeg1_options[] = { + COMMON_OPTS + { NULL }, +}; + +static const AVOption mpeg2_options[] = { + COMMON_OPTS + { "non_linear_quant", "Use nonlinear quantizer.", OFFSET(q_scale_type), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, + { "alternate_scan", "Enable alternate scantable.", OFFSET(alternate_scan), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, + { NULL }, +}; + +#define mpeg12_class(x)\ +static const AVClass mpeg## x ##_class = {\ + .class_name = "mpeg" #x "video encoder",\ + .item_name = av_default_item_name,\ + .option = mpeg## x ##_options,\ + .version = LIBAVUTIL_VERSION_INT,\ +}; + +mpeg12_class(1) +mpeg12_class(2) + AVCodec ff_mpeg1video_encoder = { - "mpeg1video", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG1VIDEO, - sizeof(MpegEncContext), - encode_init, - MPV_encode_picture, - MPV_encode_end, - .supported_framerates= ff_frame_rate_tab+1, + .name = "mpeg1video", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG1VIDEO, + .priv_data_size = sizeof(MpegEncContext), + .init = encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, + .supported_framerates= avpriv_frame_rate_tab+1, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .capabilities= CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"), + .priv_class = &mpeg1_class, }; AVCodec ff_mpeg2video_encoder = { - "mpeg2video", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG2VIDEO, - sizeof(MpegEncContext), - encode_init, - MPV_encode_picture, - MPV_encode_end, - .supported_framerates= ff_frame_rate_tab+1, + .name = "mpeg2video", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG2VIDEO, + .priv_data_size = sizeof(MpegEncContext), + .init = encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, + .supported_framerates= avpriv_frame_rate_tab+1, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE}, .capabilities= CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, .long_name= NULL_IF_CONFIG_SMALL("MPEG-2 video"), + .priv_class = &mpeg2_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg12.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg12.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg12.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg12.h 2012-01-11 00:34:30.000000000 +0000 @@ -30,6 +30,20 @@ extern VLC ff_dc_lum_vlc; extern VLC ff_dc_chroma_vlc; +typedef struct Mpeg1Context { + MpegEncContext mpeg_enc_ctx; + int mpeg_enc_ctx_allocated; /* true if decoding context allocated */ + int repeat_field; /* true if we must repeat the field */ + AVPanScan pan_scan; /**< some temporary storage for the panscan */ + int slice_count; + int swap_uv;//indicate VCR2 + int save_aspect_info; + int save_width, save_height, save_progressive_seq; + AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator + int sync; ///< Did we reach a sync point like a GOP/SEQ/KEYFrame? + int closed_gop; ///< GOP is closed +} Mpeg1Context; + extern uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3]; void ff_mpeg12_common_init(MpegEncContext *s); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4audio.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4audio.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4audio.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4audio.c 2012-01-11 00:34:30.000000000 +0000 @@ -52,7 +52,7 @@ return 0; } -const int ff_mpeg4audio_sample_rates[16] = { +const int avpriv_mpeg4audio_sample_rates[16] = { 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350 }; @@ -73,15 +73,16 @@ { *index = get_bits(gb, 4); return *index == 0x0f ? get_bits(gb, 24) : - ff_mpeg4audio_sample_rates[*index]; + avpriv_mpeg4audio_sample_rates[*index]; } -int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_size) +int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, + int bit_size, int sync_extension) { GetBitContext gb; int specific_config_bitindex; - init_get_bits(&gb, buf, buf_size*8); + init_get_bits(&gb, buf, bit_size); c->object_type = get_object_type(&gb); c->sample_rate = get_sample_rate(&gb, &c->sampling_index); c->chan_config = get_bits(&gb, 4); @@ -117,7 +118,7 @@ return -1; } - if (c->ext_object_type != AOT_SBR) { + if (c->ext_object_type != AOT_SBR && sync_extension) { while (get_bits_left(&gb) > 15) { if (show_bits(&gb, 11) == 0x2b7) { // sync extension get_bits(&gb, 11); @@ -151,7 +152,7 @@ return el; } -int ff_copy_pce_data(PutBitContext *pb, GetBitContext *gb) +int avpriv_copy_pce_data(PutBitContext *pb, GetBitContext *gb) { int five_bit_ch, four_bit_ch, comment_size, bits; int offset = put_bits_count(pb); @@ -173,7 +174,7 @@ copy_bits(pb, gb, 16); if (bits) copy_bits(pb, gb, bits); - align_put_bits(pb); + avpriv_align_put_bits(pb); align_get_bits(gb); comment_size = copy_bits(pb, gb, 8); for (; comment_size > 0; comment_size--) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4audio.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4audio.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4audio.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4audio.h 2012-01-11 00:34:30.000000000 +0000 @@ -31,25 +31,28 @@ int sampling_index; int sample_rate; int chan_config; - int sbr; //< -1 implicit, 1 presence + int sbr; ///< -1 implicit, 1 presence int ext_object_type; int ext_sampling_index; int ext_sample_rate; int ext_chan_config; int channels; - int ps; //< -1 implicit, 1 presence + int ps; ///< -1 implicit, 1 presence } MPEG4AudioConfig; -extern const int ff_mpeg4audio_sample_rates[16]; +extern const int avpriv_mpeg4audio_sample_rates[16]; extern const uint8_t ff_mpeg4audio_channels[8]; + /** * Parse MPEG-4 systems extradata to retrieve audio configuration. * @param[in] c MPEG4AudioConfig structure to fill. * @param[in] buf Extradata from container. - * @param[in] buf_size Extradata size. + * @param[in] bit_size Extradata size in bits. + * @param[in] sync_extension look for a sync extension after config if true. * @return On error -1 is returned, on success AudioSpecificConfig bit index in extradata. */ -int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_size); +int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, + int bit_size, int sync_extension); enum AudioObjectType { AOT_NULL, @@ -101,6 +104,6 @@ #define MAX_PCE_SIZE 304 ///pb_time; int p_mx, p_my; - p_mx= s->next_picture.motion_val[0][xy][0]; + p_mx = s->next_picture.f.motion_val[0][xy][0]; if((unsigned)(p_mx + tab_bias) < tab_size){ s->mv[0][i][0] = s->direct_scale_mv[0][p_mx + tab_bias] + mx; s->mv[1][i][0] = mx ? s->mv[0][i][0] - p_mx @@ -99,7 +99,7 @@ s->mv[1][i][0] = mx ? s->mv[0][i][0] - p_mx : p_mx*(time_pb - time_pp)/time_pp; } - p_my= s->next_picture.motion_val[0][xy][1]; + p_my = s->next_picture.f.motion_val[0][xy][1]; if((unsigned)(p_my + tab_bias) < tab_size){ s->mv[0][i][1] = s->direct_scale_mv[0][p_my + tab_bias] + my; s->mv[1][i][1] = my ? s->mv[0][i][1] - p_my @@ -120,7 +120,7 @@ */ int ff_mpeg4_set_direct_mv(MpegEncContext *s, int mx, int my){ const int mb_index= s->mb_x + s->mb_y*s->mb_stride; - const int colocated_mb_type= s->next_picture.mb_type[mb_index]; + const int colocated_mb_type = s->next_picture.f.mb_type[mb_index]; uint16_t time_pp; uint16_t time_pb; int i; @@ -137,7 +137,7 @@ } else if(IS_INTERLACED(colocated_mb_type)){ s->mv_type = MV_TYPE_FIELD; for(i=0; i<2; i++){ - int field_select= s->next_picture.ref_index[0][4*mb_index + 2*i]; + int field_select = s->next_picture.f.ref_index[0][4 * mb_index + 2 * i]; s->field_select[0][i]= field_select; s->field_select[1][i]= i; if(s->top_field_first){ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4videodec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4videodec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4videodec.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4videodec.c 2012-01-11 00:34:30.000000000 +0000 @@ -46,7 +46,7 @@ }; /** - * predicts the ac. + * Predict the ac. * @param n block index (0-3 are luma, 4-5 are chroma) * @param dir the ac prediction direction */ @@ -55,7 +55,7 @@ { int i; int16_t *ac_val, *ac_val1; - int8_t * const qscale_table= s->current_picture.qscale_table; + int8_t * const qscale_table = s->current_picture.f.qscale_table; /* find prediction */ ac_val = s->ac_val[0][0] + s->block_index[n] * 16; @@ -343,7 +343,7 @@ } /** - * decodes the next video packet. + * Decode the next video packet. * @return <0 if something went wrong */ int mpeg4_decode_video_packet_header(MpegEncContext *s) @@ -376,7 +376,7 @@ if(s->pict_type == AV_PICTURE_TYPE_B){ int mb_x = 0, mb_y = 0; - while(s->next_picture.mbskip_table[ s->mb_index2xy[ mb_num ] ]) { + while (s->next_picture.f.mbskip_table[s->mb_index2xy[mb_num]]) { if (!mb_x) ff_thread_await_progress((AVFrame*)s->next_picture_ptr, mb_y++, 0); mb_num++; if (++mb_x == s->mb_width) mb_x = 0; @@ -439,7 +439,7 @@ } /** - * gets the average motion vector for a GMC MB. + * Get the average motion vector for a GMC MB. * @param n either 0 for the x component or 1 for y * @return the average MV for a GMC MB */ @@ -485,7 +485,7 @@ } /** - * decodes the dc value. + * Decode the dc value. * @param n block index (0-3 are luma, 4-5 are chroma) * @param dir_ptr the prediction direction will be stored here * @return the quantized dc @@ -520,7 +520,7 @@ if (code > 8){ if(get_bits1(&s->gb)==0){ /* marker */ - if(s->error_recognition>=2){ + if(s->err_recognition&AV_EF_BITSTREAM){ av_log(s->avctx, AV_LOG_ERROR, "dc marker bit missing\n"); return -1; } @@ -532,7 +532,7 @@ } /** - * decodes first partition. + * Decode first partition. * @return number of MBs decoded or <0 if an error occurred */ static int mpeg4_decode_partition_a(MpegEncContext *s){ @@ -570,13 +570,13 @@ }while(cbpc == 8); s->cbp_table[xy]= cbpc & 3; - s->current_picture.mb_type[xy]= MB_TYPE_INTRA; + s->current_picture.f.mb_type[xy] = MB_TYPE_INTRA; s->mb_intra = 1; if(cbpc & 4) { ff_set_qscale(s, s->qscale + quant_tab[get_bits(&s->gb, 2)]); } - s->current_picture.qscale_table[xy]= s->qscale; + s->current_picture.f.qscale_table[xy]= s->qscale; s->mbintra_table[xy]= 1; for(i=0; i<6; i++){ @@ -592,7 +592,7 @@ s->pred_dir_table[xy]= dir; }else{ /* P/S_TYPE */ int mx, my, pred_x, pred_y, bits; - int16_t * const mot_val= s->current_picture.motion_val[0][s->block_index[0]]; + int16_t * const mot_val = s->current_picture.f.motion_val[0][s->block_index[0]]; const int stride= s->b8_stride*2; try_again: @@ -604,11 +604,11 @@ if(bits&0x10000){ /* skip mb */ if(s->pict_type==AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE){ - s->current_picture.mb_type[xy]= MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_GMC | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_GMC | MB_TYPE_L0; mx= get_amv(s, 0); my= get_amv(s, 1); }else{ - s->current_picture.mb_type[xy]= MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; mx=my=0; } mot_val[0 ]= mot_val[2 ]= @@ -634,7 +634,7 @@ s->mb_intra = ((cbpc & 4) != 0); if(s->mb_intra){ - s->current_picture.mb_type[xy]= MB_TYPE_INTRA; + s->current_picture.f.mb_type[xy] = MB_TYPE_INTRA; s->mbintra_table[xy]= 1; mot_val[0 ]= mot_val[2 ]= mot_val[0+stride]= mot_val[2+stride]= 0; @@ -660,11 +660,11 @@ my = h263_decode_motion(s, pred_y, s->f_code); if (my >= 0xffff) return -1; - s->current_picture.mb_type[xy]= MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0; } else { mx = get_amv(s, 0); my = get_amv(s, 1); - s->current_picture.mb_type[xy]= MB_TYPE_16x16 | MB_TYPE_GMC | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_GMC | MB_TYPE_L0; } mot_val[0 ]= mot_val[2 ] = @@ -673,7 +673,7 @@ mot_val[1+stride]= mot_val[3+stride]= my; } else { int i; - s->current_picture.mb_type[xy]= MB_TYPE_8x8 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0; for(i=0;i<4;i++) { int16_t *mot_val= h263_pred_motion(s, i, 0, &pred_x, &pred_y); mx = h263_decode_motion(s, pred_x, s->f_code); @@ -725,9 +725,9 @@ } s->cbp_table[xy]|= cbpy<<2; - s->current_picture.mb_type[xy] |= ac_pred*MB_TYPE_ACPRED; + s->current_picture.f.mb_type[xy] |= ac_pred*MB_TYPE_ACPRED; }else{ /* P || S_TYPE */ - if(IS_INTRA(s->current_picture.mb_type[xy])){ + if (IS_INTRA(s->current_picture.f.mb_type[xy])) { int dir=0,i; int ac_pred = get_bits1(&s->gb); int cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1); @@ -740,7 +740,7 @@ if(s->cbp_table[xy] & 8) { ff_set_qscale(s, s->qscale + quant_tab[get_bits(&s->gb, 2)]); } - s->current_picture.qscale_table[xy]= s->qscale; + s->current_picture.f.qscale_table[xy] = s->qscale; for(i=0; i<6; i++){ int dc_pred_dir; @@ -754,10 +754,10 @@ } s->cbp_table[xy]&= 3; //remove dquant s->cbp_table[xy]|= cbpy<<2; - s->current_picture.mb_type[xy] |= ac_pred*MB_TYPE_ACPRED; + s->current_picture.f.mb_type[xy] |= ac_pred*MB_TYPE_ACPRED; s->pred_dir_table[xy]= dir; - }else if(IS_SKIP(s->current_picture.mb_type[xy])){ - s->current_picture.qscale_table[xy]= s->qscale; + } else if (IS_SKIP(s->current_picture.f.mb_type[xy])) { + s->current_picture.f.qscale_table[xy] = s->qscale; s->cbp_table[xy]= 0; }else{ int cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1); @@ -770,7 +770,7 @@ if(s->cbp_table[xy] & 8) { ff_set_qscale(s, s->qscale + quant_tab[get_bits(&s->gb, 2)]); } - s->current_picture.qscale_table[xy]= s->qscale; + s->current_picture.f.qscale_table[xy] = s->qscale; s->cbp_table[xy]&= 3; //remove dquant s->cbp_table[xy]|= (cbpy^0xf)<<2; @@ -784,14 +784,14 @@ } /** - * decodes the first & second partition + * Decode the first and second partition. * @return <0 if error (and sets error type in the error_status_table) */ int ff_mpeg4_decode_partitions(MpegEncContext *s) { int mb_num; - const int part_a_error= s->pict_type==AV_PICTURE_TYPE_I ? (DC_ERROR|MV_ERROR) : MV_ERROR; - const int part_a_end = s->pict_type==AV_PICTURE_TYPE_I ? (DC_END |MV_END) : MV_END; + const int part_a_error= s->pict_type==AV_PICTURE_TYPE_I ? (ER_DC_ERROR|ER_MV_ERROR) : ER_MV_ERROR; + const int part_a_end = s->pict_type==AV_PICTURE_TYPE_I ? (ER_DC_END |ER_MV_END) : ER_MV_END; mb_num= mpeg4_decode_partition_a(s); if(mb_num<0){ @@ -826,18 +826,18 @@ if( mpeg4_decode_partition_b(s, mb_num) < 0){ if(s->pict_type==AV_PICTURE_TYPE_P) - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, DC_ERROR); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_DC_ERROR); return -1; }else{ if(s->pict_type==AV_PICTURE_TYPE_P) - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, DC_END); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_DC_END); } return 0; } /** - * decodes a block. + * Decode a block. * @return <0 if an error occurred */ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block, @@ -934,7 +934,7 @@ }; SKIP_CACHE(re, &s->gb, 1); last= SHOW_UBITS(re, &s->gb, 1); SKIP_CACHE(re, &s->gb, 1); - run= SHOW_UBITS(re, &s->gb, 6); LAST_SKIP_CACHE(re, &s->gb, 6); + run= SHOW_UBITS(re, &s->gb, 6); SKIP_COUNTER(re, &s->gb, 1+1+6); UPDATE_CACHE(re, &s->gb); @@ -951,7 +951,7 @@ }; SKIP_CACHE(re, &s->gb, 5); level= level * qmul + qadd; - level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); LAST_SKIP_CACHE(re, &s->gb, 1); + level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); SKIP_COUNTER(re, &s->gb, 1+11+5+1); i+= run + 1; @@ -968,7 +968,7 @@ /* third escape */ SKIP_CACHE(re, &s->gb, 2); last= SHOW_UBITS(re, &s->gb, 1); SKIP_CACHE(re, &s->gb, 1); - run= SHOW_UBITS(re, &s->gb, 6); LAST_SKIP_CACHE(re, &s->gb, 6); + run= SHOW_UBITS(re, &s->gb, 6); SKIP_COUNTER(re, &s->gb, 2+1+6); UPDATE_CACHE(re, &s->gb); @@ -985,38 +985,16 @@ if(SHOW_UBITS(re, &s->gb, 1)==0){ av_log(s->avctx, AV_LOG_ERROR, "2. marker bit missing in 3. esc\n"); return -1; - }; LAST_SKIP_CACHE(re, &s->gb, 1); + } SKIP_COUNTER(re, &s->gb, 1+12+1); } -#if 0 - if(s->error_recognition >= FF_ER_COMPLIANT){ - const int abs_level= FFABS(level); - if(abs_level<=MAX_LEVEL && run<=MAX_RUN){ - const int run1= run - rl->max_run[last][abs_level] - 1; - if(abs_level <= rl->max_level[last][run]){ - av_log(s->avctx, AV_LOG_ERROR, "illegal 3. esc, vlc encoding possible\n"); - return -1; - } - if(s->error_recognition > FF_ER_COMPLIANT){ - if(abs_level <= rl->max_level[last][run]*2){ - av_log(s->avctx, AV_LOG_ERROR, "illegal 3. esc, esc 1 encoding possible\n"); - return -1; - } - if(run1 >= 0 && abs_level <= rl->max_level[last][run1]){ - av_log(s->avctx, AV_LOG_ERROR, "illegal 3. esc, esc 2 encoding possible\n"); - return -1; - } - } - } - } -#endif if (level>0) level= level * qmul + qadd; else level= level * qmul - qadd; if((unsigned)(level + 2048) > 4095){ - if(s->error_recognition > FF_ER_COMPLIANT){ + if(s->err_recognition & AV_EF_BITSTREAM){ if(level > 2560 || level<-2560){ av_log(s->avctx, AV_LOG_ERROR, "|level| overflow in 3. esc, qp=%d\n", s->qscale); return -1; @@ -1091,20 +1069,20 @@ int cbp, mb_type; const int xy= s->mb_x + s->mb_y*s->mb_stride; - mb_type= s->current_picture.mb_type[xy]; + mb_type = s->current_picture.f.mb_type[xy]; cbp = s->cbp_table[xy]; s->use_intra_dc_vlc= s->qscale < s->intra_dc_threshold; - if(s->current_picture.qscale_table[xy] != s->qscale){ - ff_set_qscale(s, s->current_picture.qscale_table[xy] ); + if (s->current_picture.f.qscale_table[xy] != s->qscale) { + ff_set_qscale(s, s->current_picture.f.qscale_table[xy]); } if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type==AV_PICTURE_TYPE_S) { int i; for(i=0; i<4; i++){ - s->mv[0][i][0] = s->current_picture.motion_val[0][ s->block_index[i] ][0]; - s->mv[0][i][1] = s->current_picture.motion_val[0][ s->block_index[i] ][1]; + s->mv[0][i][0] = s->current_picture.f.motion_val[0][s->block_index[i]][0]; + s->mv[0][i][1] = s->current_picture.f.motion_val[0][s->block_index[i]][1]; } s->mb_intra = IS_INTRA(mb_type); @@ -1122,7 +1100,7 @@ s->mb_skipped = 1; } }else if(s->mb_intra){ - s->ac_pred = IS_ACPRED(s->current_picture.mb_type[xy]); + s->ac_pred = IS_ACPRED(s->current_picture.f.mb_type[xy]); }else if(!s->mb_intra){ // s->mcsel= 0; //FIXME do we need to init that @@ -1135,7 +1113,7 @@ } } else { /* I-Frame */ s->mb_intra = 1; - s->ac_pred = IS_ACPRED(s->current_picture.mb_type[xy]); + s->ac_pred = IS_ACPRED(s->current_picture.f.mb_type[xy]); } if (!IS_SKIP(mb_type)) { @@ -1188,14 +1166,14 @@ s->mv_dir = MV_DIR_FORWARD; s->mv_type = MV_TYPE_16X16; if(s->pict_type==AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE){ - s->current_picture.mb_type[xy]= MB_TYPE_SKIP | MB_TYPE_GMC | MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_GMC | MB_TYPE_16x16 | MB_TYPE_L0; s->mcsel=1; s->mv[0][0][0]= get_amv(s, 0); s->mv[0][0][1]= get_amv(s, 1); s->mb_skipped = 0; }else{ - s->current_picture.mb_type[xy]= MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; s->mcsel=0; s->mv[0][0][0] = 0; s->mv[0][0][1] = 0; @@ -1230,7 +1208,7 @@ s->mv_dir = MV_DIR_FORWARD; if ((cbpc & 16) == 0) { if(s->mcsel){ - s->current_picture.mb_type[xy]= MB_TYPE_GMC | MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_GMC | MB_TYPE_16x16 | MB_TYPE_L0; /* 16x16 global motion prediction */ s->mv_type = MV_TYPE_16X16; mx= get_amv(s, 0); @@ -1238,7 +1216,7 @@ s->mv[0][0][0] = mx; s->mv[0][0][1] = my; }else if((!s->progressive_sequence) && get_bits1(&s->gb)){ - s->current_picture.mb_type[xy]= MB_TYPE_16x8 | MB_TYPE_L0 | MB_TYPE_INTERLACED; + s->current_picture.f.mb_type[xy] = MB_TYPE_16x8 | MB_TYPE_L0 | MB_TYPE_INTERLACED; /* 16x8 field motion prediction */ s->mv_type= MV_TYPE_FIELD; @@ -1260,7 +1238,7 @@ s->mv[0][i][1] = my; } }else{ - s->current_picture.mb_type[xy]= MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0; /* 16x16 motion prediction */ s->mv_type = MV_TYPE_16X16; h263_pred_motion(s, 0, 0, &pred_x, &pred_y); @@ -1277,7 +1255,7 @@ s->mv[0][0][1] = my; } } else { - s->current_picture.mb_type[xy]= MB_TYPE_8x8 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_8x8 | MB_TYPE_L0; s->mv_type = MV_TYPE_8X8; for(i=0;i<4;i++) { mot_val = h263_pred_motion(s, i, 0, &pred_x, &pred_y); @@ -1314,7 +1292,7 @@ } /* if we skipped it in the future P Frame than skip it now too */ - s->mb_skipped= s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]; // Note, skiptab=0 if last was GMC + s->mb_skipped = s->next_picture.f.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]; // Note, skiptab=0 if last was GMC if(s->mb_skipped){ /* skip mb */ @@ -1327,7 +1305,7 @@ s->mv[0][0][1] = 0; s->mv[1][0][0] = 0; s->mv[1][0][1] = 0; - s->current_picture.mb_type[xy]= MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; + s->current_picture.f.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; goto end; } @@ -1433,7 +1411,7 @@ s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT; mb_type |= ff_mpeg4_set_direct_mv(s, mx, my); } - s->current_picture.mb_type[xy]= mb_type; + s->current_picture.f.mb_type[xy] = mb_type; } else { /* I-Frame */ do{ cbpc = get_vlc2(&s->gb, ff_h263_intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2); @@ -1448,9 +1426,9 @@ intra: s->ac_pred = get_bits1(&s->gb); if(s->ac_pred) - s->current_picture.mb_type[xy]= MB_TYPE_INTRA | MB_TYPE_ACPRED; + s->current_picture.f.mb_type[xy] = MB_TYPE_INTRA | MB_TYPE_ACPRED; else - s->current_picture.mb_type[xy]= MB_TYPE_INTRA; + s->current_picture.f.mb_type[xy] = MB_TYPE_INTRA; cbpy = get_vlc2(&s->gb, ff_h263_cbpy_vlc.table, CBPY_VLC_BITS, 1); if(cbpy<0){ @@ -1491,12 +1469,12 @@ if(mpeg4_is_resync(s)){ const int delta= s->mb_x + 1 == s->mb_width ? 2 : 1; - if(s->pict_type==AV_PICTURE_TYPE_B && s->next_picture.mbskip_table[xy + delta]){ + if (s->pict_type == AV_PICTURE_TYPE_B && s->next_picture.f.mbskip_table[xy + delta]) { ff_thread_await_progress((AVFrame*)s->next_picture_ptr, (s->mb_x + delta >= s->mb_width) ? FFMIN(s->mb_y+1, s->mb_height-1) : s->mb_y, 0); } - if(s->pict_type==AV_PICTURE_TYPE_B && s->next_picture.mbskip_table[xy + delta]) + if (s->pict_type == AV_PICTURE_TYPE_B && s->next_picture.f.mbskip_table[xy + delta]) return SLICE_OK; return SLICE_END; } @@ -1523,6 +1501,22 @@ return 0; } +static int mpeg4_decode_profile_level(MpegEncContext * s, GetBitContext *gb){ + int profile_and_level_indication; + + profile_and_level_indication = get_bits(gb, 8); + + s->avctx->profile = (profile_and_level_indication & 0xf0) >> 4; + s->avctx->level = (profile_and_level_indication & 0x0f); + + // for Simple profile, level 0 + if (s->avctx->profile == 0 && s->avctx->level == 8) { + s->avctx->level = 0; + } + + return 0; +} + static int decode_vol_header(MpegEncContext *s, GetBitContext *gb){ int width, height, vo_ver_id; @@ -1830,7 +1824,7 @@ } /** - * decodes the user data stuff in the header. + * Decode the user data stuff in the header. * Also initializes divx/xvid/lavc_version/build. */ static int decode_user_data(MpegEncContext *s, GetBitContext *gb){ @@ -1860,7 +1854,7 @@ } } - /* ffmpeg detection */ + /* libavcodec detection */ e=sscanf(buf, "FFmpe%*[^b]b%d", &build)+3; if(e!=4) e=sscanf(buf, "FFmpeg v%d.%d.%d / libavcodec build: %d", &ver, &ver2, &ver3, &build); @@ -1961,11 +1955,12 @@ } if(s->avctx->time_base.num) - s->current_picture_ptr->pts= (s->time + s->avctx->time_base.num/2) / s->avctx->time_base.num; + s->current_picture_ptr->f.pts = (s->time + s->avctx->time_base.num / 2) / s->avctx->time_base.num; else - s->current_picture_ptr->pts= AV_NOPTS_VALUE; + s->current_picture_ptr->f.pts = AV_NOPTS_VALUE; if(s->avctx->debug&FF_DEBUG_PTS) - av_log(s->avctx, AV_LOG_DEBUG, "MPEG4 PTS: %"PRId64"\n", s->current_picture_ptr->pts); + av_log(s->avctx, AV_LOG_DEBUG, "MPEG4 PTS: %"PRId64"\n", + s->current_picture_ptr->f.pts); check_marker(gb, "before vop_coded"); @@ -2099,14 +2094,14 @@ } /** - * decode mpeg4 headers + * Decode mpeg4 headers. * @return <0 if no VOP found (or a damaged one) * FRAME_SKIPPED if a not coded VOP is found * 0 if a VOP is found */ int ff_mpeg4_decode_picture_header(MpegEncContext * s, GetBitContext *gb) { - int startcode, v; + unsigned startcode, v; /* search next start code */ align_get_bits(gb); @@ -2176,6 +2171,9 @@ else if(startcode == GOP_STARTCODE){ mpeg4_decode_gop_header(s, gb); } + else if(startcode == VOS_STARTCODE){ + mpeg4_decode_profile_level(s, gb); + } else if(startcode == VOP_STARTCODE){ break; } @@ -2236,35 +2234,53 @@ return 0; } +static const AVProfile mpeg4_video_profiles[] = { + { FF_PROFILE_MPEG4_SIMPLE, "Simple Profile" }, + { FF_PROFILE_MPEG4_SIMPLE_SCALABLE, "Simple Scalable Profile" }, + { FF_PROFILE_MPEG4_CORE, "Core Profile" }, + { FF_PROFILE_MPEG4_MAIN, "Main Profile" }, + { FF_PROFILE_MPEG4_N_BIT, "N-bit Profile" }, + { FF_PROFILE_MPEG4_SCALABLE_TEXTURE, "Scalable Texture Profile" }, + { FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION, "Simple Face Animation Profile" }, + { FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE, "Basic Animated Texture Profile" }, + { FF_PROFILE_MPEG4_HYBRID, "Hybrid Profile" }, + { FF_PROFILE_MPEG4_ADVANCED_REAL_TIME, "Advanced Real Time Simple Profile" }, + { FF_PROFILE_MPEG4_CORE_SCALABLE, "Code Scalable Profile" }, + { FF_PROFILE_MPEG4_ADVANCED_CODING, "Advanced Coding Profile" }, + { FF_PROFILE_MPEG4_ADVANCED_CORE, "Advanced Core Profile" }, + { FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE, "Advanced Scalable Texture Profile" }, + { FF_PROFILE_MPEG4_SIMPLE_STUDIO, "Simple Studio Profile" }, + { FF_PROFILE_MPEG4_ADVANCED_SIMPLE, "Advanced Simple Profile" }, +}; + AVCodec ff_mpeg4_decoder = { - "mpeg4", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG4, - sizeof(MpegEncContext), - decode_init, - NULL, - ff_h263_decode_end, - ff_h263_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_FRAME_THREADS, + .name = "mpeg4", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG4, + .priv_data_size = sizeof(MpegEncContext), + .init = decode_init, + .close = ff_h263_decode_end, + .decode = ff_h263_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_FRAME_THREADS, .flush= ff_mpeg_flush, .max_lowres= 3, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), .pix_fmts= ff_hwaccel_pixfmt_list_420, + .profiles = NULL_IF_CONFIG_SMALL(mpeg4_video_profiles), .update_thread_context= ONLY_IF_THREADS_ENABLED(ff_mpeg_update_thread_context) }; #if CONFIG_MPEG4_VDPAU_DECODER AVCodec ff_mpeg4_vdpau_decoder = { - "mpeg4_vdpau", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG4, - sizeof(MpegEncContext), - decode_init, - NULL, - ff_h263_decode_end, - ff_h263_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, + .name = "mpeg4_vdpau", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG4, + .priv_data_size = sizeof(MpegEncContext), + .init = decode_init, + .close = ff_h263_decode_end, + .decode = ff_h263_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 (VDPAU)"), .pix_fmts= (const enum PixelFormat[]){PIX_FMT_VDPAU_MPEG4, PIX_FMT_NONE}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4videoenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4videoenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4videoenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4videoenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/log.h" +#include "libavutil/opt.h" #include "mpegvideo.h" #include "h263.h" #include "mpeg4video.h" @@ -124,7 +126,7 @@ { int score= 0; int i, n; - int8_t * const qscale_table= s->current_picture.qscale_table; + int8_t * const qscale_table = s->current_picture.f.qscale_table; memcpy(zigzag_last_index, s->block_last_index, sizeof(int)*6); @@ -201,7 +203,7 @@ */ void ff_clean_mpeg4_qscales(MpegEncContext *s){ int i; - int8_t * const qscale_table= s->current_picture.qscale_table; + int8_t * const qscale_table = s->current_picture.f.qscale_table; ff_clean_h263_qscales(s); @@ -236,7 +238,7 @@ /** - * encodes the dc value. + * Encode the dc value. * @param n block index (0-3 are luma, 4-5 are chroma) */ static inline void mpeg4_encode_dc(PutBitContext * s, int level, int n) @@ -289,17 +291,13 @@ } /** - * encodes a 8x8 block + * Encode an 8x8 block. * @param n block index (0-3 are luma, 4-5 are chroma) */ static inline void mpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n, int intra_dc, uint8_t *scan_table, PutBitContext *dc_pb, PutBitContext *ac_pb) { int i, last_non_zero; -#if 0 //variables for the outcommented version - int code, sign, last; -#endif - const RLTable *rl; uint32_t *bits_tab; uint8_t *len_tab; const int last_index = s->block_last_index[n]; @@ -309,20 +307,17 @@ mpeg4_encode_dc(dc_pb, intra_dc, n); if(last_index<1) return; i = 1; - rl = &ff_mpeg4_rl_intra; bits_tab= uni_mpeg4_intra_rl_bits; len_tab = uni_mpeg4_intra_rl_len; } else { if(last_index<0) return; i = 0; - rl = &ff_h263_rl_inter; bits_tab= uni_mpeg4_inter_rl_bits; len_tab = uni_mpeg4_inter_rl_len; } /* AC coefs */ last_non_zero = i - 1; -#if 1 for (; i < last_index; i++) { int level = block[ scan_table[i] ]; if (level) { @@ -348,64 +343,6 @@ put_bits(ac_pb, 7+2+1+6+1+12+1, (3<<23)+(3<<21)+(1<<20)+(run<<14)+(1<<13)+(((level-64)&0xfff)<<1)+1); } } -#else - for (; i <= last_index; i++) { - const int slevel = block[ scan_table[i] ]; - if (slevel) { - int level; - int run = i - last_non_zero - 1; - last = (i == last_index); - sign = 0; - level = slevel; - if (level < 0) { - sign = 1; - level = -level; - } - code = get_rl_index(rl, last, run, level); - put_bits(ac_pb, rl->table_vlc[code][1], rl->table_vlc[code][0]); - if (code == rl->n) { - int level1, run1; - level1 = level - rl->max_level[last][run]; - if (level1 < 1) - goto esc2; - code = get_rl_index(rl, last, run, level1); - if (code == rl->n) { - esc2: - put_bits(ac_pb, 1, 1); - if (level > MAX_LEVEL) - goto esc3; - run1 = run - rl->max_run[last][level] - 1; - if (run1 < 0) - goto esc3; - code = get_rl_index(rl, last, run1, level); - if (code == rl->n) { - esc3: - /* third escape */ - put_bits(ac_pb, 1, 1); - put_bits(ac_pb, 1, last); - put_bits(ac_pb, 6, run); - put_bits(ac_pb, 1, 1); - put_sbits(ac_pb, 12, slevel); - put_bits(ac_pb, 1, 1); - } else { - /* second escape */ - put_bits(ac_pb, 1, 0); - put_bits(ac_pb, rl->table_vlc[code][1], rl->table_vlc[code][0]); - put_bits(ac_pb, 1, sign); - } - } else { - /* first escape */ - put_bits(ac_pb, 1, 0); - put_bits(ac_pb, rl->table_vlc[code][1], rl->table_vlc[code][0]); - put_bits(ac_pb, 1, sign); - } - } else { - put_bits(ac_pb, 1, sign); - } - last_non_zero = i; - } - } -#endif } static int mpeg4_get_block_length(MpegEncContext * s, DCTELEM * block, int n, int intra_dc, @@ -488,6 +425,46 @@ } } +static inline int get_b_cbp(MpegEncContext * s, DCTELEM block[6][64], + int motion_x, int motion_y, int mb_type) +{ + int cbp = 0, i; + + if (s->flags & CODEC_FLAG_CBP_RD) { + int score = 0; + const int lambda = s->lambda2 >> (FF_LAMBDA_SHIFT - 6); + + for (i = 0; i < 6; i++) + if (s->coded_score[i] < 0) { + score += s->coded_score[i]; + cbp |= 1 << (5 - i); + } + + if (cbp) { + int zero_score = -6; + if ((motion_x | motion_y | s->dquant | mb_type) == 0) + zero_score -= 4; //2*MV + mb_type + cbp bit + + zero_score *= lambda; + if (zero_score <= score) + cbp = 0; + } + + for (i = 0; i < 6; i++) { + if (s->block_last_index[i] >= 0 && ((cbp >> (5 - i)) & 1) == 0) { + s->block_last_index[i] = -1; + s->dsp.clear_block(s->block[i]); + } + } + } else { + for (i = 0; i < 6; i++) { + if (s->block_last_index[i] >= 0) + cbp |= 1 << (5 - i); + } + } + return cbp; +} + //FIXME this is duplicated to h263.c static const int dquant_code[5]= {1,0,9,2,3}; @@ -522,7 +499,7 @@ assert(mb_type>=0); /* nothing to do if this MB was skipped in the next P Frame */ - if(s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]){ //FIXME avoid DCT & ... + if (s->next_picture.f.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]) { //FIXME avoid DCT & ... s->skip_count++; s->mv[0][0][0]= s->mv[0][0][1]= @@ -654,7 +631,7 @@ if(y+16 > s->height) y= s->height-16; offset= x + y*s->linesize; - p_pic= s->new_picture.data[0] + offset; + p_pic = s->new_picture.f.data[0] + offset; s->mb_skipped=1; for(i=0; imax_b_frames; i++){ @@ -662,10 +639,11 @@ int diff; Picture *pic= s->reordered_input_picture[i+1]; - if(pic==NULL || pic->pict_type!=AV_PICTURE_TYPE_B) break; + if (pic == NULL || pic->f.pict_type != AV_PICTURE_TYPE_B) + break; - b_pic= pic->data[0] + offset; - if(pic->type != FF_BUFFER_TYPE_SHARED) + b_pic = pic->f.data[0] + offset; + if (pic->f.type != FF_BUFFER_TYPE_SHARED) b_pic+= INPLACE_OFFSET; diff= s->dsp.sad[0](NULL, p_pic, b_pic, s->linesize, 16); if(diff>s->qscale*70){ //FIXME check that 70 is optimal @@ -769,8 +747,8 @@ /* motion vectors: 8x8 mode*/ h263_pred_motion(s, i, 0, &pred_x, &pred_y); - ff_h263_encode_motion_vector(s, s->current_picture.motion_val[0][ s->block_index[i] ][0] - pred_x, - s->current_picture.motion_val[0][ s->block_index[i] ][1] - pred_y, s->f_code); + ff_h263_encode_motion_vector(s, s->current_picture.f.motion_val[0][ s->block_index[i] ][0] - pred_x, + s->current_picture.f.motion_val[0][ s->block_index[i] ][1] - pred_y, s->f_code); } } @@ -879,9 +857,9 @@ put_bits(&s->pb, 16, 0); put_bits(&s->pb, 16, GOP_STARTCODE); - time= s->current_picture_ptr->pts; + time = s->current_picture_ptr->f.pts; if(s->reordered_input_picture[1]) - time= FFMIN(time, s->reordered_input_picture[1]->pts); + time = FFMIN(time, s->reordered_input_picture[1]->f.pts); time= time*s->avctx->time_base.num; seconds= time/s->avctx->time_base.den; @@ -1091,7 +1069,7 @@ } put_bits(&s->pb, 3, 0); /* intra dc VLC threshold */ if(!s->progressive_sequence){ - put_bits(&s->pb, 1, s->current_picture_ptr->top_field_first); + put_bits(&s->pb, 1, s->current_picture_ptr->f.top_field_first); put_bits(&s->pb, 1, s->alternate_scan); } //FIXME sprite stuff @@ -1265,7 +1243,6 @@ s->inter_ac_vlc_length = uni_mpeg4_inter_rl_len; s->inter_ac_vlc_last_length= uni_mpeg4_inter_rl_len + 128*64; s->luma_dc_vlc_length= uni_DCtab_lum_len; - s->chroma_dc_vlc_length= uni_DCtab_chrom_len; s->ac_esc_length= 7+2+1+6+1+12+1; s->y_dc_scale_table= ff_mpeg4_y_dc_scale_table; s->c_dc_scale_table= ff_mpeg4_c_dc_scale_table; @@ -1320,8 +1297,8 @@ flush_put_bits(&s->tex_pb); set_put_bits_buffer_size(&s->pb, s->pb2.buf_end - s->pb.buf); - ff_copy_bits(&s->pb, s->pb2.buf , pb2_len); - ff_copy_bits(&s->pb, s->tex_pb.buf, tex_pb_len); + avpriv_copy_bits(&s->pb, s->pb2.buf , pb2_len); + avpriv_copy_bits(&s->pb, s->tex_pb.buf, tex_pb_len); s->last_bits= put_bits_count(&s->pb); } @@ -1338,15 +1315,31 @@ put_bits(&s->pb, 1, 0); /* no HEC */ } +#define OFFSET(x) offsetof(MpegEncContext, x) +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "data_partitioning", "Use data partitioning.", OFFSET(data_partitioning), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, + { "alternate_scan", "Enable alternate scantable.", OFFSET(alternate_scan), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, + { NULL }, +}; + +static const AVClass mpeg4enc_class = { + .class_name = "MPEG4 encoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVCodec ff_mpeg4_encoder = { - "mpeg4", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MPEG4, - sizeof(MpegEncContext), - encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "mpeg4", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MPEG4, + .priv_data_size = sizeof(MpegEncContext), + .init = encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .capabilities= CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), + .priv_class = &mpeg4enc_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4video.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4video.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4video.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4video.h 2012-01-11 00:34:30.000000000 +0000 @@ -119,7 +119,7 @@ /** - * predicts the dc. + * Predict the dc. * encoding quantized level -> quantized diff * decoding quantized diff -> quantized level * @param n block index (0-3 are luma, 4-5 are chroma) @@ -174,7 +174,7 @@ }else{ level += pred; ret= level; - if(s->error_recognition>=3){ + if(s->err_recognition&AV_EF_BITSTREAM){ if(level<0){ av_log(s->avctx, AV_LOG_ERROR, "dc<0 at %dx%d\n", s->mb_x, s->mb_y); return -1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4video_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4video_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4video_parser.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4video_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -99,6 +99,7 @@ if (!pc->enc) return -1; pc->first_picture = 1; + pc->enc->slice_context_count = 1; return 0; } @@ -130,10 +131,10 @@ AVCodecParser ff_mpeg4video_parser = { - { CODEC_ID_MPEG4 }, - sizeof(ParseContext1), - mpeg4video_parse_init, - mpeg4video_parse, - ff_parse1_close, - ff_mpeg4video_split, + .codec_ids = { CODEC_ID_MPEG4 }, + .priv_data_size = sizeof(ParseContext1), + .parser_init = mpeg4video_parse_init, + .parser_parse = mpeg4video_parse, + .parser_close = ff_parse1_close, + .split = ff_mpeg4video_split, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4video_parser.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4video_parser.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpeg4video_parser.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpeg4video_parser.h 2012-01-11 00:34:30.000000000 +0000 @@ -26,7 +26,7 @@ #include "parser.h" /** - * finds the end of the current frame in the bitstream. + * Find the end of the current frame in the bitstream. * @return the position of the first byte of the next frame, or -1 */ int ff_mpeg4_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodata.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodata.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodata.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodata.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,7 +27,7 @@ #include "mpegaudiodata.h" -const uint16_t ff_mpa_bitrate_tab[2][3][15] = { +const uint16_t avpriv_mpa_bitrate_tab[2][3][15] = { { {0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448 }, {0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384 }, {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 } }, @@ -37,7 +37,7 @@ } }; -const uint16_t ff_mpa_freq_tab[3] = { 44100, 48000, 32000 }; +const uint16_t avpriv_mpa_freq_tab[3] = { 44100, 48000, 32000 }; /*******************************************************/ /* half mpeg encoding window (full precision) */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodata.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodata.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodata.h 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodata.h 2012-01-11 00:34:30.000000000 +0000 @@ -32,8 +32,8 @@ #define MODE_EXT_MS_STEREO 2 #define MODE_EXT_I_STEREO 1 -extern const uint16_t ff_mpa_bitrate_tab[2][3][15]; -extern const uint16_t ff_mpa_freq_tab[3]; +extern const uint16_t avpriv_mpa_bitrate_tab[2][3][15]; +extern const uint16_t avpriv_mpa_freq_tab[3]; extern const int32_t ff_mpa_enwindow[257]; extern const int ff_mpa_sblimit_table[5]; extern const int ff_mpa_quant_steps[17]; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodec.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodec.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,7 +21,7 @@ /** * @file - * MPEG Audio decoder. + * MPEG Audio decoder */ #include "libavutil/audioconvert.h" @@ -58,12 +58,12 @@ int preflag; int short_start, long_end; /* long/short band indexes */ uint8_t scale_factors[40]; - INTFLOAT sb_hybrid[SBLIMIT * 18]; /* 576 samples */ + DECLARE_ALIGNED(16, INTFLOAT, sb_hybrid)[SBLIMIT * 18]; /* 576 samples */ } GranuleDef; typedef struct MPADecodeContext { MPA_DECODE_HEADER - uint8_t last_buf[2*BACKSTEP_SIZE + EXTRABYTES]; + uint8_t last_buf[2 * BACKSTEP_SIZE + EXTRABYTES]; int last_buf_size; /* next header (used in free format parsing) */ uint32_t free_format_next_header; @@ -74,14 +74,12 @@ DECLARE_ALIGNED(32, INTFLOAT, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT]; INTFLOAT mdct_buf[MPA_MAX_CHANNELS][SBLIMIT * 18]; /* previous samples, for layer 3 MDCT */ GranuleDef granules[2][2]; /* Used in Layer 3 */ -#ifdef DEBUG - int frame_count; -#endif int adu_mode; ///< 0 for standard mp3, 1 for adu formatted mp3 int dither_state; - int error_recognition; + int err_recognition; AVCodecContext* avctx; MPADSPContext mpadsp; + AVFrame frame; } MPADecodeContext; #if CONFIG_FLOAT @@ -95,7 +93,7 @@ # define OUT_FMT AV_SAMPLE_FMT_FLT #else # define SHR(a,b) ((a)>>(b)) -/* WARNING: only correct for posititive numbers */ +/* WARNING: only correct for positive numbers */ # define FIXR_OLD(a) ((int)((a) * FRAC_ONE + 0.5)) # define FIXR(a) ((int)((a) * FRAC_ONE + 0.5)) # define FIXHR(a) ((int)((a) * (1LL<<32) + 0.5)) @@ -115,18 +113,16 @@ /* vlc structure for decoding layer 3 huffman tables */ static VLC huff_vlc[16]; static VLC_TYPE huff_vlc_tables[ - 0+128+128+128+130+128+154+166+ - 142+204+190+170+542+460+662+414 + 0 + 128 + 128 + 128 + 130 + 128 + 154 + 166 + + 142 + 204 + 190 + 170 + 542 + 460 + 662 + 414 ][2]; static const int huff_vlc_tables_sizes[16] = { - 0, 128, 128, 128, 130, 128, 154, 166, - 142, 204, 190, 170, 542, 460, 662, 414 + 0, 128, 128, 128, 130, 128, 154, 166, + 142, 204, 190, 170, 542, 460, 662, 414 }; static VLC huff_quad_vlc[2]; -static VLC_TYPE huff_quad_vlc_tables[128+16][2]; -static const int huff_quad_vlc_tables_sizes[2] = { - 128, 16 -}; +static VLC_TYPE huff_quad_vlc_tables[128+16][2]; +static const int huff_quad_vlc_tables_sizes[2] = { 128, 16 }; /* computed from band_size_long */ static uint16_t band_index_long[9][23]; #include "mpegaudio_tablegen.h" @@ -134,7 +130,6 @@ static INTFLOAT is_table[2][16]; static INTFLOAT is_table_lsf[2][2][16]; static INTFLOAT csa_table[8][4]; -static INTFLOAT mdct_win[8][36]; static int16_t division_tab3[1<<6 ]; static int16_t division_tab5[1<<8 ]; @@ -163,17 +158,19 @@ * Convert region offsets to region sizes and truncate * size to big_values. */ -static void ff_region_offset2size(GranuleDef *g){ - int i, k, j=0; - g->region_size[2] = (576 / 2); - for(i=0;i<3;i++) { +static void ff_region_offset2size(GranuleDef *g) +{ + int i, k, j = 0; + g->region_size[2] = 576 / 2; + for (i = 0; i < 3; i++) { k = FFMIN(g->region_size[i], g->big_values); g->region_size[i] = k - j; j = k; } } -static void ff_init_short_region(MPADecodeContext *s, GranuleDef *g){ +static void ff_init_short_region(MPADecodeContext *s, GranuleDef *g) +{ if (g->block_type == 2) g->region_size[0] = (36 / 2); else { @@ -187,17 +184,17 @@ g->region_size[1] = (576 / 2); } -static void ff_init_long_region(MPADecodeContext *s, GranuleDef *g, int ra1, int ra2){ +static void ff_init_long_region(MPADecodeContext *s, GranuleDef *g, int ra1, int ra2) +{ int l; - g->region_size[0] = - band_index_long[s->sample_rate_index][ra1 + 1] >> 1; + g->region_size[0] = band_index_long[s->sample_rate_index][ra1 + 1] >> 1; /* should not overflow */ l = FFMIN(ra1 + ra2 + 2, 22); - g->region_size[1] = - band_index_long[s->sample_rate_index][l] >> 1; + g->region_size[1] = band_index_long[s->sample_rate_index][ l] >> 1; } -static void ff_compute_band_indexes(MPADecodeContext *s, GranuleDef *g){ +static void ff_compute_band_indexes(MPADecodeContext *s, GranuleDef *g) +{ if (g->block_type == 2) { if (g->switch_point) { /* if switched mode, we handle the 36 first samples as @@ -212,12 +209,12 @@ g->short_start = 2 + (s->sample_rate_index != 8); } else { - g->long_end = 0; + g->long_end = 0; g->short_start = 0; } } else { g->short_start = 13; - g->long_end = 22; + g->long_end = 22; } } @@ -228,11 +225,11 @@ int shift, mod; int64_t val; - shift = scale_factor_modshift[scale_factor]; - mod = shift & 3; + shift = scale_factor_modshift[scale_factor]; + mod = shift & 3; shift >>= 2; - val = MUL64(mant + (-1 << n) + 1, scale_factor_mult[n-1][mod]); - shift += n; + val = MUL64(mant + (-1 << n) + 1, scale_factor_mult[n-1][mod]); + shift += n; /* NOTE: at this point, 1 <= shift >= 21 + 15 */ return (int)((val + (1LL << (shift - 1))) >> shift); } @@ -241,8 +238,8 @@ { int shift, mod, val; - shift = scale_factor_modshift[scale_factor]; - mod = shift & 3; + shift = scale_factor_modshift[scale_factor]; + mod = shift & 3; shift >>= 2; val = (mant - (steps >> 1)) * scale_factor_mult2[steps >> 2][mod]; @@ -258,250 +255,199 @@ unsigned int m; int e; - e = table_4_3_exp [4*value + (exponent&3)]; - m = table_4_3_value[4*value + (exponent&3)]; - e -= (exponent >> 2); - assert(e>=1); + e = table_4_3_exp [4 * value + (exponent & 3)]; + m = table_4_3_value[4 * value + (exponent & 3)]; + e -= exponent >> 2; + assert(e >= 1); if (e > 31) return 0; - m = (m + (1 << (e-1))) >> e; + m = (m + (1 << (e - 1))) >> e; return m; } -static av_cold int decode_init(AVCodecContext * avctx) +static av_cold void decode_init_static(void) { - MPADecodeContext *s = avctx->priv_data; - static int init=0; int i, j, k; + int offset; - s->avctx = avctx; - - ff_mpadsp_init(&s->mpadsp); - - avctx->sample_fmt= OUT_FMT; - s->error_recognition= avctx->error_recognition; - - if (!init && !avctx->parse_only) { - int offset; - - /* scale factors table for layer 1/2 */ - for(i=0;i<64;i++) { - int shift, mod; - /* 1.0 (i = 3) is normalized to 2 ^ FRAC_BITS */ - shift = (i / 3); - mod = i % 3; - scale_factor_modshift[i] = mod | (shift << 2); - } - - /* scale factor multiply for layer 1 */ - for(i=0;i<15;i++) { - int n, norm; - n = i + 2; - norm = ((INT64_C(1) << n) * FRAC_ONE) / ((1 << n) - 1); - scale_factor_mult[i][0] = MULLx(norm, FIXR(1.0 * 2.0), FRAC_BITS); - scale_factor_mult[i][1] = MULLx(norm, FIXR(0.7937005259 * 2.0), FRAC_BITS); - scale_factor_mult[i][2] = MULLx(norm, FIXR(0.6299605249 * 2.0), FRAC_BITS); - av_dlog(avctx, "%d: norm=%x s=%x %x %x\n", - i, norm, - scale_factor_mult[i][0], - scale_factor_mult[i][1], - scale_factor_mult[i][2]); - } - - RENAME(ff_mpa_synth_init)(RENAME(ff_mpa_synth_window)); - - /* huffman decode tables */ - offset = 0; - for(i=1;i<16;i++) { - const HuffTable *h = &mpa_huff_tables[i]; - int xsize, x, y; - uint8_t tmp_bits [512]; - uint16_t tmp_codes[512]; - - memset(tmp_bits , 0, sizeof(tmp_bits )); - memset(tmp_codes, 0, sizeof(tmp_codes)); - - xsize = h->xsize; - - j = 0; - for(x=0;xbits [j ]; - tmp_codes[(x << 5) | y | ((x&&y)<<4)]= h->codes[j++]; - } - } - - /* XXX: fail test */ - huff_vlc[i].table = huff_vlc_tables+offset; - huff_vlc[i].table_allocated = huff_vlc_tables_sizes[i]; - init_vlc(&huff_vlc[i], 7, 512, - tmp_bits, 1, 1, tmp_codes, 2, 2, - INIT_VLC_USE_NEW_STATIC); - offset += huff_vlc_tables_sizes[i]; - } - assert(offset == FF_ARRAY_ELEMS(huff_vlc_tables)); - - offset = 0; - for(i=0;i<2;i++) { - huff_quad_vlc[i].table = huff_quad_vlc_tables+offset; - huff_quad_vlc[i].table_allocated = huff_quad_vlc_tables_sizes[i]; - init_vlc(&huff_quad_vlc[i], i == 0 ? 7 : 4, 16, - mpa_quad_bits[i], 1, 1, mpa_quad_codes[i], 1, 1, - INIT_VLC_USE_NEW_STATIC); - offset += huff_quad_vlc_tables_sizes[i]; - } - assert(offset == FF_ARRAY_ELEMS(huff_quad_vlc_tables)); - - for(i=0;i<9;i++) { - k = 0; - for(j=0;j<22;j++) { - band_index_long[i][j] = k; - k += band_size_long[i][j]; + /* scale factors table for layer 1/2 */ + for (i = 0; i < 64; i++) { + int shift, mod; + /* 1.0 (i = 3) is normalized to 2 ^ FRAC_BITS */ + shift = i / 3; + mod = i % 3; + scale_factor_modshift[i] = mod | (shift << 2); + } + + /* scale factor multiply for layer 1 */ + for (i = 0; i < 15; i++) { + int n, norm; + n = i + 2; + norm = ((INT64_C(1) << n) * FRAC_ONE) / ((1 << n) - 1); + scale_factor_mult[i][0] = MULLx(norm, FIXR(1.0 * 2.0), FRAC_BITS); + scale_factor_mult[i][1] = MULLx(norm, FIXR(0.7937005259 * 2.0), FRAC_BITS); + scale_factor_mult[i][2] = MULLx(norm, FIXR(0.6299605249 * 2.0), FRAC_BITS); + av_dlog(NULL, "%d: norm=%x s=%x %x %x\n", i, norm, + scale_factor_mult[i][0], + scale_factor_mult[i][1], + scale_factor_mult[i][2]); + } + + RENAME(ff_mpa_synth_init)(RENAME(ff_mpa_synth_window)); + + /* huffman decode tables */ + offset = 0; + for (i = 1; i < 16; i++) { + const HuffTable *h = &mpa_huff_tables[i]; + int xsize, x, y; + uint8_t tmp_bits [512]; + uint16_t tmp_codes[512]; + + memset(tmp_bits , 0, sizeof(tmp_bits )); + memset(tmp_codes, 0, sizeof(tmp_codes)); + + xsize = h->xsize; + + j = 0; + for (x = 0; x < xsize; x++) { + for (y = 0; y < xsize; y++) { + tmp_bits [(x << 5) | y | ((x&&y)<<4)]= h->bits [j ]; + tmp_codes[(x << 5) | y | ((x&&y)<<4)]= h->codes[j++]; + } + } + + /* XXX: fail test */ + huff_vlc[i].table = huff_vlc_tables+offset; + huff_vlc[i].table_allocated = huff_vlc_tables_sizes[i]; + init_vlc(&huff_vlc[i], 7, 512, + tmp_bits, 1, 1, tmp_codes, 2, 2, + INIT_VLC_USE_NEW_STATIC); + offset += huff_vlc_tables_sizes[i]; + } + assert(offset == FF_ARRAY_ELEMS(huff_vlc_tables)); + + offset = 0; + for (i = 0; i < 2; i++) { + huff_quad_vlc[i].table = huff_quad_vlc_tables+offset; + huff_quad_vlc[i].table_allocated = huff_quad_vlc_tables_sizes[i]; + init_vlc(&huff_quad_vlc[i], i == 0 ? 7 : 4, 16, + mpa_quad_bits[i], 1, 1, mpa_quad_codes[i], 1, 1, + INIT_VLC_USE_NEW_STATIC); + offset += huff_quad_vlc_tables_sizes[i]; + } + assert(offset == FF_ARRAY_ELEMS(huff_quad_vlc_tables)); + + for (i = 0; i < 9; i++) { + k = 0; + for (j = 0; j < 22; j++) { + band_index_long[i][j] = k; + k += band_size_long[i][j]; + } + band_index_long[i][22] = k; + } + + /* compute n ^ (4/3) and store it in mantissa/exp format */ + + mpegaudio_tableinit(); + + for (i = 0; i < 4; i++) { + if (ff_mpa_quant_bits[i] < 0) { + for (j = 0; j < (1 << (-ff_mpa_quant_bits[i]+1)); j++) { + int val1, val2, val3, steps; + int val = j; + steps = ff_mpa_quant_steps[i]; + val1 = val % steps; + val /= steps; + val2 = val % steps; + val3 = val / steps; + division_tabs[i][j] = val1 + (val2 << 4) + (val3 << 8); } - band_index_long[i][22] = k; } - - /* compute n ^ (4/3) and store it in mantissa/exp format */ - - mpegaudio_tableinit(); - - for (i = 0; i < 4; i++) - if (ff_mpa_quant_bits[i] < 0) - for (j = 0; j < (1<<(-ff_mpa_quant_bits[i]+1)); j++) { - int val1, val2, val3, steps; - int val = j; - steps = ff_mpa_quant_steps[i]; - val1 = val % steps; - val /= steps; - val2 = val % steps; - val3 = val / steps; - division_tabs[i][j] = val1 + (val2 << 4) + (val3 << 8); - } + } - for(i=0;i<7;i++) { - float f; - INTFLOAT v; - if (i != 6) { - f = tan((double)i * M_PI / 12.0); - v = FIXR(f / (1.0 + f)); - } else { - v = FIXR(1.0); - } - is_table[0][i] = v; - is_table[1][6 - i] = v; + for (i = 0; i < 7; i++) { + float f; + INTFLOAT v; + if (i != 6) { + f = tan((double)i * M_PI / 12.0); + v = FIXR(f / (1.0 + f)); + } else { + v = FIXR(1.0); } - /* invalid values */ - for(i=7;i<16;i++) - is_table[0][i] = is_table[1][i] = 0.0; - - for(i=0;i<16;i++) { - double f; - int e, k; - - for(j=0;j<2;j++) { - e = -(j + 1) * ((i + 1) >> 1); - f = pow(2.0, e / 4.0); - k = i & 1; - is_table_lsf[j][k ^ 1][i] = FIXR(f); - is_table_lsf[j][k][i] = FIXR(1.0); - av_dlog(avctx, "is_table_lsf %d %d: %f %f\n", - i, j, (float) is_table_lsf[j][0][i], - (float) is_table_lsf[j][1][i]); - } + is_table[0][ i] = v; + is_table[1][6 - i] = v; + } + /* invalid values */ + for (i = 7; i < 16; i++) + is_table[0][i] = is_table[1][i] = 0.0; + + for (i = 0; i < 16; i++) { + double f; + int e, k; + + for (j = 0; j < 2; j++) { + e = -(j + 1) * ((i + 1) >> 1); + f = pow(2.0, e / 4.0); + k = i & 1; + is_table_lsf[j][k ^ 1][i] = FIXR(f); + is_table_lsf[j][k ][i] = FIXR(1.0); + av_dlog(NULL, "is_table_lsf %d %d: %f %f\n", + i, j, (float) is_table_lsf[j][0][i], + (float) is_table_lsf[j][1][i]); } + } - for(i=0;i<8;i++) { - float ci, cs, ca; - ci = ci_table[i]; - cs = 1.0 / sqrt(1.0 + ci * ci); - ca = cs * ci; + for (i = 0; i < 8; i++) { + float ci, cs, ca; + ci = ci_table[i]; + cs = 1.0 / sqrt(1.0 + ci * ci); + ca = cs * ci; #if !CONFIG_FLOAT - csa_table[i][0] = FIXHR(cs/4); - csa_table[i][1] = FIXHR(ca/4); - csa_table[i][2] = FIXHR(ca/4) + FIXHR(cs/4); - csa_table[i][3] = FIXHR(ca/4) - FIXHR(cs/4); + csa_table[i][0] = FIXHR(cs/4); + csa_table[i][1] = FIXHR(ca/4); + csa_table[i][2] = FIXHR(ca/4) + FIXHR(cs/4); + csa_table[i][3] = FIXHR(ca/4) - FIXHR(cs/4); #else - csa_table[i][0] = cs; - csa_table[i][1] = ca; - csa_table[i][2] = ca + cs; - csa_table[i][3] = ca - cs; + csa_table[i][0] = cs; + csa_table[i][1] = ca; + csa_table[i][2] = ca + cs; + csa_table[i][3] = ca - cs; #endif - } + } +} - /* compute mdct windows */ - for(i=0;i<36;i++) { - for(j=0; j<4; j++){ - double d; - - if(j==2 && i%3 != 1) - continue; - - d= sin(M_PI * (i + 0.5) / 36.0); - if(j==1){ - if (i>=30) d= 0; - else if(i>=24) d= sin(M_PI * (i - 18 + 0.5) / 12.0); - else if(i>=18) d= 1; - }else if(j==3){ - if (i< 6) d= 0; - else if(i< 12) d= sin(M_PI * (i - 6 + 0.5) / 12.0); - else if(i< 18) d= 1; - } - //merge last stage of imdct into the window coefficients - d*= 0.5 / cos(M_PI*(2*i + 19)/72); +static av_cold int decode_init(AVCodecContext * avctx) +{ + static int initialized_tables = 0; + MPADecodeContext *s = avctx->priv_data; - if(j==2) - mdct_win[j][i/3] = FIXHR((d / (1<<5))); - else - mdct_win[j][i ] = FIXHR((d / (1<<5))); - } - } + if (!initialized_tables) { + decode_init_static(); + initialized_tables = 1; + } - /* NOTE: we do frequency inversion adter the MDCT by changing - the sign of the right window coefs */ - for(j=0;j<4;j++) { - for(i=0;i<36;i+=2) { - mdct_win[j + 4][i] = mdct_win[j][i]; - mdct_win[j + 4][i + 1] = -mdct_win[j][i + 1]; - } - } + s->avctx = avctx; - init = 1; - } + ff_mpadsp_init(&s->mpadsp); + + avctx->sample_fmt= OUT_FMT; + s->err_recognition = avctx->err_recognition; if (avctx->codec_id == CODEC_ID_MP3ADU) s->adu_mode = 1; + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } #define C3 FIXHR(0.86602540378443864676/2) - -/* 0.5 / cos(pi*(2*i+1)/36) */ -static const INTFLOAT icos36[9] = { - FIXR(0.50190991877167369479), - FIXR(0.51763809020504152469), //0 - FIXR(0.55168895948124587824), - FIXR(0.61038729438072803416), - FIXR(0.70710678118654752439), //1 - FIXR(0.87172339781054900991), - FIXR(1.18310079157624925896), - FIXR(1.93185165257813657349), //2 - FIXR(5.73685662283492756461), -}; - -/* 0.5 / cos(pi*(2*i+1)/36) */ -static const INTFLOAT icos36h[9] = { - FIXHR(0.50190991877167369479/2), - FIXHR(0.51763809020504152469/2), //0 - FIXHR(0.55168895948124587824/2), - FIXHR(0.61038729438072803416/2), - FIXHR(0.70710678118654752439/2), //1 - FIXHR(0.87172339781054900991/2), - FIXHR(1.18310079157624925896/4), - FIXHR(1.93185165257813657349/4), //2 -// FIXHR(5.73685662283492756461), -}; +#define C4 FIXHR(0.70710678118654752439/2) //0.5 / cos(pi*(9)/36) +#define C5 FIXHR(0.51763809020504152469/2) //0.5 / cos(pi*(5)/36) +#define C6 FIXHR(1.93185165257813657349/4) //0.5 / cos(pi*(15)/36) /* 12 points IMDCT. We compute it "by hand" by factorizing obvious cases. */ @@ -509,133 +455,41 @@ { INTFLOAT in0, in1, in2, in3, in4, in5, t1, t2; - in0= in[0*3]; - in1= in[1*3] + in[0*3]; - in2= in[2*3] + in[1*3]; - in3= in[3*3] + in[2*3]; - in4= in[4*3] + in[3*3]; - in5= in[5*3] + in[4*3]; + in0 = in[0*3]; + in1 = in[1*3] + in[0*3]; + in2 = in[2*3] + in[1*3]; + in3 = in[3*3] + in[2*3]; + in4 = in[4*3] + in[3*3]; + in5 = in[5*3] + in[4*3]; in5 += in3; in3 += in1; - in2= MULH3(in2, C3, 2); - in3= MULH3(in3, C3, 4); + in2 = MULH3(in2, C3, 2); + in3 = MULH3(in3, C3, 4); - t1 = in0 - in4; - t2 = MULH3(in1 - in5, icos36h[4], 2); + t1 = in0 - in4; + t2 = MULH3(in1 - in5, C4, 2); - out[ 7]= - out[10]= t1 + t2; - out[ 1]= - out[ 4]= t1 - t2; - - in0 += SHR(in4, 1); - in4 = in0 + in2; - in5 += 2*in1; - in1 = MULH3(in5 + in3, icos36h[1], 1); - out[ 8]= - out[ 9]= in4 + in1; - out[ 2]= - out[ 3]= in4 - in1; - - in0 -= in2; - in5 = MULH3(in5 - in3, icos36h[7], 2); - out[ 0]= - out[ 5]= in0 - in5; - out[ 6]= - out[11]= in0 + in5; -} - -/* cos(pi*i/18) */ -#define C1 FIXHR(0.98480775301220805936/2) -#define C2 FIXHR(0.93969262078590838405/2) -#define C3 FIXHR(0.86602540378443864676/2) -#define C4 FIXHR(0.76604444311897803520/2) -#define C5 FIXHR(0.64278760968653932632/2) -#define C6 FIXHR(0.5/2) -#define C7 FIXHR(0.34202014332566873304/2) -#define C8 FIXHR(0.17364817766693034885/2) - - -/* using Lee like decomposition followed by hand coded 9 points DCT */ -static void imdct36(INTFLOAT *out, INTFLOAT *buf, INTFLOAT *in, INTFLOAT *win) -{ - int i, j; - INTFLOAT t0, t1, t2, t3, s0, s1, s2, s3; - INTFLOAT tmp[18], *tmp1, *in1; - - for(i=17;i>=1;i--) - in[i] += in[i-1]; - for(i=17;i>=3;i-=2) - in[i] += in[i-2]; - - for(j=0;j<2;j++) { - tmp1 = tmp + j; - in1 = in + j; - - t2 = in1[2*4] + in1[2*8] - in1[2*2]; - - t3 = in1[2*0] + SHR(in1[2*6],1); - t1 = in1[2*0] - in1[2*6]; - tmp1[ 6] = t1 - SHR(t2,1); - tmp1[16] = t1 + t2; - - t0 = MULH3(in1[2*2] + in1[2*4] , C2, 2); - t1 = MULH3(in1[2*4] - in1[2*8] , -2*C8, 1); - t2 = MULH3(in1[2*2] + in1[2*8] , -C4, 2); - - tmp1[10] = t3 - t0 - t2; - tmp1[ 2] = t3 + t0 + t1; - tmp1[14] = t3 + t2 - t1; - - tmp1[ 4] = MULH3(in1[2*5] + in1[2*7] - in1[2*1], -C3, 2); - t2 = MULH3(in1[2*1] + in1[2*5], C1, 2); - t3 = MULH3(in1[2*5] - in1[2*7], -2*C7, 1); - t0 = MULH3(in1[2*3], C3, 2); - - t1 = MULH3(in1[2*1] + in1[2*7], -C5, 2); - - tmp1[ 0] = t2 + t3 + t0; - tmp1[12] = t2 + t1 - t0; - tmp1[ 8] = t3 - t1 - t0; - } - - i = 0; - for(j=0;j<4;j++) { - t0 = tmp[i]; - t1 = tmp[i + 2]; - s0 = t1 + t0; - s2 = t1 - t0; - - t2 = tmp[i + 1]; - t3 = tmp[i + 3]; - s1 = MULH3(t3 + t2, icos36h[j], 2); - s3 = MULLx(t3 - t2, icos36[8 - j], FRAC_BITS); - - t0 = s0 + s1; - t1 = s0 - s1; - out[(9 + j)*SBLIMIT] = MULH3(t1, win[9 + j], 1) + buf[9 + j]; - out[(8 - j)*SBLIMIT] = MULH3(t1, win[8 - j], 1) + buf[8 - j]; - buf[9 + j] = MULH3(t0, win[18 + 9 + j], 1); - buf[8 - j] = MULH3(t0, win[18 + 8 - j], 1); - - t0 = s2 + s3; - t1 = s2 - s3; - out[(9 + 8 - j)*SBLIMIT] = MULH3(t1, win[9 + 8 - j], 1) + buf[9 + 8 - j]; - out[( j)*SBLIMIT] = MULH3(t1, win[ j], 1) + buf[ j]; - buf[9 + 8 - j] = MULH3(t0, win[18 + 9 + 8 - j], 1); - buf[ + j] = MULH3(t0, win[18 + j], 1); - i += 4; - } - - s0 = tmp[16]; - s1 = MULH3(tmp[17], icos36h[4], 2); - t0 = s0 + s1; - t1 = s0 - s1; - out[(9 + 4)*SBLIMIT] = MULH3(t1, win[9 + 4], 1) + buf[9 + 4]; - out[(8 - 4)*SBLIMIT] = MULH3(t1, win[8 - 4], 1) + buf[8 - 4]; - buf[9 + 4] = MULH3(t0, win[18 + 9 + 4], 1); - buf[8 - 4] = MULH3(t0, win[18 + 8 - 4], 1); + out[ 7] = + out[10] = t1 + t2; + out[ 1] = + out[ 4] = t1 - t2; + + in0 += SHR(in4, 1); + in4 = in0 + in2; + in5 += 2*in1; + in1 = MULH3(in5 + in3, C5, 1); + out[ 8] = + out[ 9] = in4 + in1; + out[ 2] = + out[ 3] = in4 - in1; + + in0 -= in2; + in5 = MULH3(in5 - in3, C6, 2); + out[ 0] = + out[ 5] = in0 - in5; + out[ 6] = + out[11] = in0 + in5; } /* return the number of decoded frames */ @@ -651,23 +505,22 @@ bound = SBLIMIT; /* allocation bits */ - for(i=0;inb_channels;ch++) { + for (i = 0; i < bound; i++) { + for (ch = 0; ch < s->nb_channels; ch++) { allocation[ch][i] = get_bits(&s->gb, 4); } } - for(i=bound;igb, 4); - } /* scale factors */ - for(i=0;inb_channels;ch++) { + for (i = 0; i < bound; i++) { + for (ch = 0; ch < s->nb_channels; ch++) { if (allocation[ch][i]) scale_factors[ch][i] = get_bits(&s->gb, 6); } } - for(i=bound;igb, 6); scale_factors[1][i] = get_bits(&s->gb, 6); @@ -675,9 +528,9 @@ } /* compute samples */ - for(j=0;j<12;j++) { - for(i=0;inb_channels;ch++) { + for (j = 0; j < 12; j++) { + for (i = 0; i < bound; i++) { + for (ch = 0; ch < s->nb_channels; ch++) { n = allocation[ch][i]; if (n) { mant = get_bits(&s->gb, n + 1); @@ -688,7 +541,7 @@ s->sb_samples[ch][j][i] = v; } } - for(i=bound;igb, n + 1); @@ -717,8 +570,8 @@ /* select decoding table */ table = ff_mpa_l2_select_table(s->bit_rate / 1000, s->nb_channels, - s->sample_rate, s->lsf); - sblimit = ff_mpa_sblimit_table[table]; + s->sample_rate, s->lsf); + sblimit = ff_mpa_sblimit_table[table]; alloc_table = ff_mpa_alloc_tables[table]; if (s->mode == MPA_JSTEREO) @@ -729,18 +582,18 @@ av_dlog(s->avctx, "bound=%d sblimit=%d\n", bound, sblimit); /* sanity check */ - if( bound > sblimit ) bound = sblimit; + if (bound > sblimit) + bound = sblimit; /* parse bit allocation */ j = 0; - for(i=0;inb_channels;ch++) { + for (ch = 0; ch < s->nb_channels; ch++) bit_alloc[ch][i] = get_bits(&s->gb, bit_alloc_bits); - } j += 1 << bit_alloc_bits; } - for(i=bound;igb, bit_alloc_bits); bit_alloc[0][i] = v; @@ -749,19 +602,19 @@ } /* scale codes */ - for(i=0;inb_channels;ch++) { + for (i = 0; i < sblimit; i++) { + for (ch = 0; ch < s->nb_channels; ch++) { if (bit_alloc[ch][i]) scale_code[ch][i] = get_bits(&s->gb, 2); } } /* scale factors */ - for(i=0;inb_channels;ch++) { + for (i = 0; i < sblimit; i++) { + for (ch = 0; ch < s->nb_channels; ch++) { if (bit_alloc[ch][i]) { sf = scale_factors[ch][i]; - switch(scale_code[ch][i]) { + switch (scale_code[ch][i]) { default: case 0: sf[0] = get_bits(&s->gb, 6); @@ -789,12 +642,12 @@ } /* samples */ - for(k=0;k<3;k++) { - for(l=0;l<12;l+=3) { + for (k = 0; k < 3; k++) { + for (l = 0; l < 12; l += 3) { j = 0; - for(i=0;inb_channels;ch++) { + for (ch = 0; ch < s->nb_channels; ch++) { b = bit_alloc[ch][i]; if (b) { scale = scale_factors[ch][i][k]; @@ -808,13 +661,13 @@ steps = ff_mpa_quant_steps[qindex]; s->sb_samples[ch][k * 12 + l + 0][i] = - l2_unscale_group(steps, v2 & 15, scale); + l2_unscale_group(steps, v2 & 15, scale); s->sb_samples[ch][k * 12 + l + 1][i] = l2_unscale_group(steps, (v2 >> 4) & 15, scale); s->sb_samples[ch][k * 12 + l + 2][i] = l2_unscale_group(steps, v2 >> 8 , scale); } else { - for(m=0;m<3;m++) { + for (m = 0; m < 3; m++) { v = get_bits(&s->gb, bits); v = l1_unscale(bits - 1, v, scale); s->sb_samples[ch][k * 12 + l + m][i] = v; @@ -830,7 +683,7 @@ j += 1 << bit_alloc_bits; } /* XXX: find a way to avoid this duplication of code */ - for(i=bound;isb_samples[1][k * 12 + l + 2][i] = l2_unscale_group(steps, v, scale1); } else { - for(m=0;m<3;m++) { + for (m = 0; m < 3; m++) { mant = get_bits(&s->gb, bits); s->sb_samples[0][k * 12 + l + m][i] = l1_unscale(bits - 1, mant, scale0); @@ -880,8 +733,8 @@ j += 1 << bit_alloc_bits; } /* fill remaining samples to zero */ - for(i=sblimit;inb_channels;ch++) { + for (i = sblimit; i < SBLIMIT; i++) { + for (ch = 0; ch < s->nb_channels; ch++) { s->sb_samples[ch][k * 12 + l + 0][i] = 0; s->sb_samples[ch][k * 12 + l + 1][i] = 0; s->sb_samples[ch][k * 12 + l + 2][i] = 0; @@ -892,28 +745,28 @@ return 3 * 12; } -#define SPLIT(dst,sf,n)\ - if(n==3){\ - int m= (sf*171)>>9;\ - dst= sf - 3*m;\ - sf=m;\ - }else if(n==4){\ - dst= sf&3;\ - sf>>=2;\ - }else if(n==5){\ - int m= (sf*205)>>10;\ - dst= sf - 5*m;\ - sf=m;\ - }else if(n==6){\ - int m= (sf*171)>>10;\ - dst= sf - 6*m;\ - sf=m;\ - }else{\ - dst=0;\ +#define SPLIT(dst,sf,n) \ + if (n == 3) { \ + int m = (sf * 171) >> 9; \ + dst = sf - 3 * m; \ + sf = m; \ + } else if (n == 4) { \ + dst = sf & 3; \ + sf >>= 2; \ + } else if (n == 5) { \ + int m = (sf * 205) >> 10; \ + dst = sf - 5 * m; \ + sf = m; \ + } else if (n == 6) { \ + int m = (sf * 171) >> 10; \ + dst = sf - 6 * m; \ + sf = m; \ + } else { \ + dst = 0; \ } -static av_always_inline void lsf_sf_expand(int *slen, - int sf, int n1, int n2, int n3) +static av_always_inline void lsf_sf_expand(int *slen, int sf, int n1, int n2, + int n3) { SPLIT(slen[3], sf, n3) SPLIT(slen[2], sf, n2) @@ -921,8 +774,7 @@ slen[0] = sf; } -static void exponents_from_scale_factors(MPADecodeContext *s, - GranuleDef *g, +static void exponents_from_scale_factors(MPADecodeContext *s, GranuleDef *g, int16_t *exponents) { const uint8_t *bstab, *pretab; @@ -930,30 +782,30 @@ int16_t *exp_ptr; exp_ptr = exponents; - gain = g->global_gain - 210; - shift = g->scalefac_scale + 1; + gain = g->global_gain - 210; + shift = g->scalefac_scale + 1; - bstab = band_size_long[s->sample_rate_index]; + bstab = band_size_long[s->sample_rate_index]; pretab = mpa_pretab[g->preflag]; - for(i=0;ilong_end;i++) { + for (i = 0; i < g->long_end; i++) { v0 = gain - ((g->scale_factors[i] + pretab[i]) << shift) + 400; len = bstab[i]; - for(j=len;j>0;j--) + for (j = len; j > 0; j--) *exp_ptr++ = v0; } if (g->short_start < 13) { - bstab = band_size_short[s->sample_rate_index]; + bstab = band_size_short[s->sample_rate_index]; gains[0] = gain - (g->subblock_gain[0] << 3); gains[1] = gain - (g->subblock_gain[1] << 3); gains[2] = gain - (g->subblock_gain[2] << 3); - k = g->long_end; - for(i=g->short_start;i<13;i++) { + k = g->long_end; + for (i = g->short_start; i < 13; i++) { len = bstab[i]; - for(l=0;l<3;l++) { + for (l = 0; l < 3; l++) { v0 = gains[l] - (g->scale_factors[k++] << shift) + 400; - for(j=len;j>0;j--) - *exp_ptr++ = v0; + for (j = len; j > 0; j--) + *exp_ptr++ = v0; } } } @@ -962,22 +814,21 @@ /* handle n = 0 too */ static inline int get_bitsz(GetBitContext *s, int n) { - if (n == 0) - return 0; - else - return get_bits(s, n); + return n ? get_bits(s, n) : 0; } -static void switch_buffer(MPADecodeContext *s, int *pos, int *end_pos, int *end_pos2){ - if(s->in_gb.buffer && *pos >= s->gb.size_in_bits){ - s->gb= s->in_gb; - s->in_gb.buffer=NULL; +static void switch_buffer(MPADecodeContext *s, int *pos, int *end_pos, + int *end_pos2) +{ + if (s->in_gb.buffer && *pos >= s->gb.size_in_bits) { + s->gb = s->in_gb; + s->in_gb.buffer = NULL; assert((get_bits_count(&s->gb) & 7) == 0); skip_bits_long(&s->gb, *pos - *end_pos); - *end_pos2= - *end_pos= *end_pos2 + get_bits_count(&s->gb) - *pos; - *pos= get_bits_count(&s->gb); + *end_pos2 = + *end_pos = *end_pos2 + get_bits_count(&s->gb) - *pos; + *pos = get_bits_count(&s->gb); } } @@ -988,13 +839,13 @@ *dst = v; */ #if CONFIG_FLOAT -#define READ_FLIP_SIGN(dst,src)\ - v = AV_RN32A(src) ^ (get_bits1(&s->gb)<<31);\ - AV_WN32A(dst, v); +#define READ_FLIP_SIGN(dst,src) \ + v = AV_RN32A(src) ^ (get_bits1(&s->gb) << 31); \ + AV_WN32A(dst, v); #else -#define READ_FLIP_SIGN(dst,src)\ - v= -get_bits1(&s->gb);\ - *(dst) = (*(src) ^ v) - v; +#define READ_FLIP_SIGN(dst,src) \ + v = -get_bits1(&s->gb); \ + *(dst) = (*(src) ^ v) - v; #endif static int huffman_decode(MPADecodeContext *s, GranuleDef *g, @@ -1004,43 +855,43 @@ int i; int last_pos, bits_left; VLC *vlc; - int end_pos= FFMIN(end_pos2, s->gb.size_in_bits); + int end_pos = FFMIN(end_pos2, s->gb.size_in_bits); /* low frequencies (called big values) */ s_index = 0; - for(i=0;i<3;i++) { + for (i = 0; i < 3; i++) { int j, k, l, linbits; j = g->region_size[i]; if (j == 0) continue; /* select vlc table */ - k = g->table_select[i]; - l = mpa_huff_data[k][0]; + k = g->table_select[i]; + l = mpa_huff_data[k][0]; linbits = mpa_huff_data[k][1]; - vlc = &huff_vlc[l]; + vlc = &huff_vlc[l]; - if(!l){ - memset(&g->sb_hybrid[s_index], 0, sizeof(*g->sb_hybrid)*2*j); - s_index += 2*j; + if (!l) { + memset(&g->sb_hybrid[s_index], 0, sizeof(*g->sb_hybrid) * 2 * j); + s_index += 2 * j; continue; } /* read huffcode and compute each couple */ - for(;j>0;j--) { + for (; j > 0; j--) { int exponent, x, y; int v; - int pos= get_bits_count(&s->gb); + int pos = get_bits_count(&s->gb); if (pos >= end_pos){ // av_log(NULL, AV_LOG_ERROR, "pos: %d %d %d %d\n", pos, end_pos, end_pos2, s_index); switch_buffer(s, &pos, &end_pos, &end_pos2); // av_log(NULL, AV_LOG_ERROR, "new pos: %d %d\n", pos, end_pos); - if(pos >= end_pos) + if (pos >= end_pos) break; } y = get_vlc2(&s->gb, vlc->table, 7, 3); - if(!y){ + if (!y) { g->sb_hybrid[s_index ] = g->sb_hybrid[s_index+1] = 0; s_index += 2; @@ -1051,100 +902,100 @@ av_dlog(s->avctx, "region=%d n=%d x=%d y=%d exp=%d\n", i, g->region_size[i] - j, x, y, exponent); - if(y&16){ + if (y & 16) { x = y >> 5; y = y & 0x0f; - if (x < 15){ - READ_FLIP_SIGN(g->sb_hybrid+s_index, RENAME(expval_table)[ exponent ]+x) - }else{ + if (x < 15) { + READ_FLIP_SIGN(g->sb_hybrid + s_index, RENAME(expval_table)[exponent] + x) + } else { x += get_bitsz(&s->gb, linbits); - v = l3_unscale(x, exponent); + v = l3_unscale(x, exponent); if (get_bits1(&s->gb)) v = -v; g->sb_hybrid[s_index] = v; } - if (y < 15){ - READ_FLIP_SIGN(g->sb_hybrid+s_index+1, RENAME(expval_table)[ exponent ]+y) - }else{ + if (y < 15) { + READ_FLIP_SIGN(g->sb_hybrid + s_index + 1, RENAME(expval_table)[exponent] + y) + } else { y += get_bitsz(&s->gb, linbits); - v = l3_unscale(y, exponent); + v = l3_unscale(y, exponent); if (get_bits1(&s->gb)) v = -v; g->sb_hybrid[s_index+1] = v; } - }else{ + } else { x = y >> 5; y = y & 0x0f; x += y; - if (x < 15){ - READ_FLIP_SIGN(g->sb_hybrid+s_index+!!y, RENAME(expval_table)[ exponent ]+x) - }else{ + if (x < 15) { + READ_FLIP_SIGN(g->sb_hybrid + s_index + !!y, RENAME(expval_table)[exponent] + x) + } else { x += get_bitsz(&s->gb, linbits); - v = l3_unscale(x, exponent); + v = l3_unscale(x, exponent); if (get_bits1(&s->gb)) v = -v; g->sb_hybrid[s_index+!!y] = v; } - g->sb_hybrid[s_index+ !y] = 0; + g->sb_hybrid[s_index + !y] = 0; } - s_index+=2; + s_index += 2; } } /* high frequencies */ vlc = &huff_quad_vlc[g->count1table_select]; - last_pos=0; + last_pos = 0; while (s_index <= 572) { int pos, code; pos = get_bits_count(&s->gb); if (pos >= end_pos) { - if (pos > end_pos2 && last_pos){ + if (pos > end_pos2 && last_pos) { /* some encoders generate an incorrect size for this part. We must go back into the data */ s_index -= 4; skip_bits_long(&s->gb, last_pos - pos); av_log(s->avctx, AV_LOG_INFO, "overread, skip %d enddists: %d %d\n", last_pos - pos, end_pos-pos, end_pos2-pos); - if(s->error_recognition >= FF_ER_COMPLIANT) + if(s->err_recognition & AV_EF_BITSTREAM) s_index=0; break; } // av_log(NULL, AV_LOG_ERROR, "pos2: %d %d %d %d\n", pos, end_pos, end_pos2, s_index); switch_buffer(s, &pos, &end_pos, &end_pos2); // av_log(NULL, AV_LOG_ERROR, "new pos2: %d %d %d\n", pos, end_pos, s_index); - if(pos >= end_pos) + if (pos >= end_pos) break; } - last_pos= pos; + last_pos = pos; code = get_vlc2(&s->gb, vlc->table, vlc->bits, 1); av_dlog(s->avctx, "t=%d code=%d\n", g->count1table_select, code); - g->sb_hybrid[s_index+0]= - g->sb_hybrid[s_index+1]= - g->sb_hybrid[s_index+2]= - g->sb_hybrid[s_index+3]= 0; - while(code){ - static const int idxtab[16]={3,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0}; + g->sb_hybrid[s_index+0] = + g->sb_hybrid[s_index+1] = + g->sb_hybrid[s_index+2] = + g->sb_hybrid[s_index+3] = 0; + while (code) { + static const int idxtab[16] = { 3,3,2,2,1,1,1,1,0,0,0,0,0,0,0,0 }; int v; - int pos= s_index+idxtab[code]; - code ^= 8>>idxtab[code]; - READ_FLIP_SIGN(g->sb_hybrid+pos, RENAME(exp_table)+exponents[pos]) + int pos = s_index + idxtab[code]; + code ^= 8 >> idxtab[code]; + READ_FLIP_SIGN(g->sb_hybrid + pos, RENAME(exp_table)+exponents[pos]) } - s_index+=4; + s_index += 4; } /* skip extension bits */ bits_left = end_pos2 - get_bits_count(&s->gb); //av_log(NULL, AV_LOG_ERROR, "left:%d buf:%p\n", bits_left, s->in_gb.buffer); - if (bits_left < 0 && s->error_recognition >= FF_ER_COMPLIANT) { + if (bits_left < 0 && (s->err_recognition & AV_EF_BITSTREAM)) { av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left); s_index=0; - }else if(bits_left > 0 && s->error_recognition >= FF_ER_AGGRESSIVE){ + } else if (bits_left > 0 && (s->err_recognition & AV_EF_BUFFER)) { av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left); - s_index=0; + s_index = 0; } - memset(&g->sb_hybrid[s_index], 0, sizeof(*g->sb_hybrid)*(576 - s_index)); + memset(&g->sb_hybrid[s_index], 0, sizeof(*g->sb_hybrid) * (576 - s_index)); skip_bits_long(&s->gb, bits_left); - i= get_bits_count(&s->gb); + i = get_bits_count(&s->gb); switch_buffer(s, &i, &end_pos, &end_pos2); return 0; @@ -1163,34 +1014,32 @@ return; if (g->switch_point) { - if (s->sample_rate_index != 8) { + if (s->sample_rate_index != 8) ptr = g->sb_hybrid + 36; - } else { + else ptr = g->sb_hybrid + 48; - } } else { ptr = g->sb_hybrid; } - for(i=g->short_start;i<13;i++) { - len = band_size_short[s->sample_rate_index][i]; + for (i = g->short_start; i < 13; i++) { + len = band_size_short[s->sample_rate_index][i]; ptr1 = ptr; - dst = tmp; - for(j=len;j>0;j--) { + dst = tmp; + for (j = len; j > 0; j--) { *dst++ = ptr[0*len]; *dst++ = ptr[1*len]; *dst++ = ptr[2*len]; ptr++; } - ptr+=2*len; + ptr += 2 * len; memcpy(ptr1, tmp, len * 3 * sizeof(*ptr1)); } } #define ISQRT2 FIXR(0.70710678118654752440) -static void compute_stereo(MPADecodeContext *s, - GranuleDef *g0, GranuleDef *g1) +static void compute_stereo(MPADecodeContext *s, GranuleDef *g0, GranuleDef *g1) { int i, j, k, l; int sf_max, sf, len, non_zero_found; @@ -1214,17 +1063,17 @@ non_zero_found_short[1] = 0; non_zero_found_short[2] = 0; k = (13 - g1->short_start) * 3 + g1->long_end - 3; - for(i = 12;i >= g1->short_start;i--) { + for (i = 12; i >= g1->short_start; i--) { /* for last band, use previous scale factor */ if (i != 11) k -= 3; len = band_size_short[s->sample_rate_index][i]; - for(l=2;l>=0;l--) { + for (l = 2; l >= 0; l--) { tab0 -= len; tab1 -= len; if (!non_zero_found_short[l]) { /* test if non zero band. if so, stop doing i-stereo */ - for(j=0;jmode_ext & MODE_EXT_MS_STEREO) { /* lower part of the spectrum : do ms stereo if enabled */ - for(j=0;jlong_end - 1;i >= 0;i--) { - len = band_size_long[s->sample_rate_index][i]; + for (i = g1->long_end - 1;i >= 0;i--) { + len = band_size_long[s->sample_rate_index][i]; tab0 -= len; tab1 -= len; /* test if non zero band. if so, stop doing i-stereo */ if (!non_zero_found) { - for(j=0;jscale_factors[k]; if (sf >= sf_max) goto found2; v1 = is_tab[0][sf]; v2 = is_tab[1][sf]; - for(j=0;jmode_ext & MODE_EXT_MS_STEREO) { /* lower part of the spectrum : do ms stereo if enabled */ - for(j=0;jsb_hybrid; tab1 = g1->sb_hybrid; - for(i=0;i<576;i++) { - tmp0 = tab0[i]; - tmp1 = tab1[i]; + for (i = 0; i < 576; i++) { + tmp0 = tab0[i]; + tmp1 = tab1[i]; tab0[i] = tmp0 + tmp1; tab1[i] = tmp0 - tmp1; } @@ -1326,8 +1175,8 @@ int tmp0 = ptr[-1-j]; \ int tmp1 = ptr[ j]; \ int tmp2 = MULH(tmp0 + tmp1, csa_table[j][0]); \ - ptr[-1-j] = 4*(tmp2 - MULH(tmp1, csa_table[j][2])); \ - ptr[ j] = 4*(tmp2 + MULH(tmp0, csa_table[j][3])); \ + ptr[-1-j] = 4 * (tmp2 - MULH(tmp1, csa_table[j][2])); \ + ptr[ j] = 4 * (tmp2 + MULH(tmp0, csa_table[j][3])); \ } while (0) #endif @@ -1347,7 +1196,7 @@ } ptr = g->sb_hybrid + 18; - for(i = n;i > 0;i--) { + for (i = n; i > 0; i--) { AA(0); AA(1); AA(2); @@ -1361,23 +1210,21 @@ } } -static void compute_imdct(MPADecodeContext *s, - GranuleDef *g, - INTFLOAT *sb_samples, - INTFLOAT *mdct_buf) +static void compute_imdct(MPADecodeContext *s, GranuleDef *g, + INTFLOAT *sb_samples, INTFLOAT *mdct_buf) { - INTFLOAT *win, *win1, *out_ptr, *ptr, *buf, *ptr1; + INTFLOAT *win, *out_ptr, *ptr, *buf, *ptr1; INTFLOAT out2[12]; int i, j, mdct_long_end, sblimit; /* find last non zero block */ - ptr = g->sb_hybrid + 576; + ptr = g->sb_hybrid + 576; ptr1 = g->sb_hybrid + 2 * 18; while (ptr >= ptr1) { int32_t *p; ptr -= 6; - p= (int32_t*)ptr; - if(p[0] | p[1] | p[2] | p[3] | p[4] | p[5]) + p = (int32_t*)ptr; + if (p[0] | p[1] | p[2] | p[3] | p[4] | p[5]) break; } sblimit = ((ptr - g->sb_hybrid) / 18) + 1; @@ -1392,63 +1239,53 @@ mdct_long_end = sblimit; } - buf = mdct_buf; - ptr = g->sb_hybrid; - for(j=0;jswitch_point && j < 2) - win1 = mdct_win[0]; - else - win1 = mdct_win[g->block_type]; - /* select frequency inversion */ - win = win1 + ((4 * 36) & -(j & 1)); - imdct36(out_ptr, buf, ptr, win); - out_ptr += 18*SBLIMIT; - ptr += 18; - buf += 18; - } - for(j=mdct_long_end;jmpadsp.RENAME(imdct36_blocks)(sb_samples, mdct_buf, g->sb_hybrid, + mdct_long_end, g->switch_point, + g->block_type); + + buf = mdct_buf + 4*18*(mdct_long_end >> 2) + (mdct_long_end & 3); + ptr = g->sb_hybrid + 18 * mdct_long_end; + + for (j = mdct_long_end; j < sblimit; j++) { /* select frequency inversion */ - win = mdct_win[2] + ((4 * 36) & -(j & 1)); + win = RENAME(ff_mdct_win)[2 + (4 & -(j & 1))]; out_ptr = sb_samples + j; - for(i=0; i<6; i++){ - *out_ptr = buf[i]; + for (i = 0; i < 6; i++) { + *out_ptr = buf[4*i]; out_ptr += SBLIMIT; } imdct12(out2, ptr + 0); - for(i=0;i<6;i++) { - *out_ptr = MULH3(out2[i ], win[i ], 1) + buf[i + 6*1]; - buf[i + 6*2] = MULH3(out2[i + 6], win[i + 6], 1); + for (i = 0; i < 6; i++) { + *out_ptr = MULH3(out2[i ], win[i ], 1) + buf[4*(i + 6*1)]; + buf[4*(i + 6*2)] = MULH3(out2[i + 6], win[i + 6], 1); out_ptr += SBLIMIT; } imdct12(out2, ptr + 1); - for(i=0;i<6;i++) { - *out_ptr = MULH3(out2[i ], win[i ], 1) + buf[i + 6*2]; - buf[i + 6*0] = MULH3(out2[i + 6], win[i + 6], 1); + for (i = 0; i < 6; i++) { + *out_ptr = MULH3(out2[i ], win[i ], 1) + buf[4*(i + 6*2)]; + buf[4*(i + 6*0)] = MULH3(out2[i + 6], win[i + 6], 1); out_ptr += SBLIMIT; } imdct12(out2, ptr + 2); - for(i=0;i<6;i++) { - buf[i + 6*0] = MULH3(out2[i ], win[i ], 1) + buf[i + 6*0]; - buf[i + 6*1] = MULH3(out2[i + 6], win[i + 6], 1); - buf[i + 6*2] = 0; + for (i = 0; i < 6; i++) { + buf[4*(i + 6*0)] = MULH3(out2[i ], win[i ], 1) + buf[4*(i + 6*0)]; + buf[4*(i + 6*1)] = MULH3(out2[i + 6], win[i + 6], 1); + buf[4*(i + 6*2)] = 0; } ptr += 18; - buf += 18; + buf += (j&3) != 3 ? 1 : (4*18-3); } /* zero bands */ - for(j=sblimit;jgb, 5); nb_granules = 2; - for(ch=0;chnb_channels;ch++) { + for (ch = 0; ch < s->nb_channels; ch++) { s->granules[ch][0].scfsi = 0;/* all scale factors are transmitted */ s->granules[ch][1].scfsi = get_bits(&s->gb, 4); } } - for(gr=0;grnb_channels;ch++) { + for (gr = 0; gr < nb_granules; gr++) { + for (ch = 0; ch < s->nb_channels; ch++) { av_dlog(s->avctx, "gr=%d ch=%d: side_info\n", gr, ch); g = &s->granules[ch][gr]; g->part2_3_length = get_bits(&s->gb, 12); - g->big_values = get_bits(&s->gb, 9); - if(g->big_values > 288){ + g->big_values = get_bits(&s->gb, 9); + if (g->big_values > 288) { av_log(s->avctx, AV_LOG_ERROR, "big_values too big\n"); - return -1; + return AVERROR_INVALIDDATA; } g->global_gain = get_bits(&s->gb, 8); @@ -1502,21 +1339,21 @@ blocksplit_flag = get_bits1(&s->gb); if (blocksplit_flag) { g->block_type = get_bits(&s->gb, 2); - if (g->block_type == 0){ + if (g->block_type == 0) { av_log(s->avctx, AV_LOG_ERROR, "invalid block type\n"); - return -1; + return AVERROR_INVALIDDATA; } g->switch_point = get_bits1(&s->gb); - for(i=0;i<2;i++) + for (i = 0; i < 2; i++) g->table_select[i] = get_bits(&s->gb, 5); - for(i=0;i<3;i++) + for (i = 0; i < 3; i++) g->subblock_gain[i] = get_bits(&s->gb, 3); ff_init_short_region(s, g); } else { int region_address1, region_address2; g->block_type = 0; g->switch_point = 0; - for(i=0;i<3;i++) + for (i = 0; i < 3; i++) g->table_select[i] = get_bits(&s->gb, 5); /* compute huffman coded region sizes */ region_address1 = get_bits(&s->gb, 4); @@ -1531,42 +1368,50 @@ g->preflag = 0; if (!s->lsf) g->preflag = get_bits1(&s->gb); - g->scalefac_scale = get_bits1(&s->gb); + g->scalefac_scale = get_bits1(&s->gb); g->count1table_select = get_bits1(&s->gb); av_dlog(s->avctx, "block_type=%d switch_point=%d\n", g->block_type, g->switch_point); } } - if (!s->adu_mode) { - const uint8_t *ptr = s->gb.buffer + (get_bits_count(&s->gb)>>3); - assert((get_bits_count(&s->gb) & 7) == 0); - /* now we get bits from the main_data_begin offset */ - av_dlog(s->avctx, "seekback: %d\n", main_data_begin); -//av_log(NULL, AV_LOG_ERROR, "backstep:%d, lastbuf:%d\n", main_data_begin, s->last_buf_size); + if (!s->adu_mode) { + int skip; + const uint8_t *ptr = s->gb.buffer + (get_bits_count(&s->gb)>>3); + assert((get_bits_count(&s->gb) & 7) == 0); + /* now we get bits from the main_data_begin offset */ + av_dlog(s->avctx, "seekback: %d\n", main_data_begin); + //av_log(NULL, AV_LOG_ERROR, "backstep:%d, lastbuf:%d\n", main_data_begin, s->last_buf_size); - memcpy(s->last_buf + s->last_buf_size, ptr, EXTRABYTES); - s->in_gb= s->gb; + memcpy(s->last_buf + s->last_buf_size, ptr, EXTRABYTES); + s->in_gb = s->gb; init_get_bits(&s->gb, s->last_buf, s->last_buf_size*8); - skip_bits_long(&s->gb, 8*(s->last_buf_size - main_data_begin)); - } - - for(gr=0;grnb_channels;ch++) { - g = &s->granules[ch][gr]; - if(get_bits_count(&s->gb)<0){ - av_log(s->avctx, AV_LOG_DEBUG, "mdb:%d, lastbuf:%d skipping granule %d\n", - main_data_begin, s->last_buf_size, gr); - skip_bits_long(&s->gb, g->part2_3_length); +#if !UNCHECKED_BITSTREAM_READER + s->gb.size_in_bits_plus8 += EXTRABYTES * 8; +#endif + s->last_buf_size <<= 3; + for (gr = 0; gr < nb_granules && (s->last_buf_size >> 3) < main_data_begin; gr++) { + for (ch = 0; ch < s->nb_channels; ch++) { + g = &s->granules[ch][gr]; + s->last_buf_size += g->part2_3_length; memset(g->sb_hybrid, 0, sizeof(g->sb_hybrid)); - if(get_bits_count(&s->gb) >= s->gb.size_in_bits && s->in_gb.buffer){ - skip_bits_long(&s->in_gb, get_bits_count(&s->gb) - s->gb.size_in_bits); - s->gb= s->in_gb; - s->in_gb.buffer=NULL; - } - continue; } + } + skip = s->last_buf_size - 8 * main_data_begin; + if (skip >= s->gb.size_in_bits && s->in_gb.buffer) { + skip_bits_long(&s->in_gb, skip - s->gb.size_in_bits); + s->gb = s->in_gb; + s->in_gb.buffer = NULL; + } else { + skip_bits_long(&s->gb, skip); + } + } else { + gr = 0; + } + for (; gr < nb_granules; gr++) { + for (ch = 0; ch < s->nb_channels; ch++) { + g = &s->granules[ch][gr]; bits_pos = get_bits_count(&s->gb); if (!s->lsf) { @@ -1580,39 +1425,39 @@ if (g->block_type == 2) { n = g->switch_point ? 17 : 18; j = 0; - if(slen1){ - for(i=0;iscale_factors[j++] = get_bits(&s->gb, slen1); - }else{ - for(i=0;iscale_factors[j++] = 0; } - if(slen2){ - for(i=0;i<18;i++) + if (slen2) { + for (i = 0; i < 18; i++) g->scale_factors[j++] = get_bits(&s->gb, slen2); - for(i=0;i<3;i++) + for (i = 0; i < 3; i++) g->scale_factors[j++] = 0; - }else{ - for(i=0;i<21;i++) + } else { + for (i = 0; i < 21; i++) g->scale_factors[j++] = 0; } } else { sc = s->granules[ch][0].scale_factors; j = 0; - for(k=0;k<4;k++) { - n = (k == 0 ? 6 : 5); + for (k = 0; k < 4; k++) { + n = k == 0 ? 6 : 5; if ((g->scfsi & (0x8 >> k)) == 0) { slen = (k < 2) ? slen1 : slen2; - if(slen){ - for(i=0;iscale_factors[j++] = get_bits(&s->gb, slen); - }else{ - for(i=0;iscale_factors[j++] = 0; } } else { /* simply copy from last granule */ - for(i=0;iscale_factors[j] = sc[j]; j++; } @@ -1624,11 +1469,11 @@ int tindex, tindex2, slen[4], sl, sf; /* LSF scale factors */ - if (g->block_type == 2) { + if (g->block_type == 2) tindex = g->switch_point ? 2 : 1; - } else { + else tindex = 0; - } + sf = g->scalefac_compress; if ((s->mode_ext & MODE_EXT_I_STEREO) && ch == 1) { /* intensity stereo case */ @@ -1659,19 +1504,19 @@ } j = 0; - for(k=0;k<4;k++) { - n = lsf_nsf_table[tindex2][tindex][k]; + for (k = 0; k < 4; k++) { + n = lsf_nsf_table[tindex2][tindex][k]; sl = slen[k]; - if(sl){ - for(i=0;iscale_factors[j++] = get_bits(&s->gb, sl); - }else{ - for(i=0;iscale_factors[j++] = 0; } } /* XXX: should compute exact size */ - for(;j<40;j++) + for (; j < 40; j++) g->scale_factors[j] = 0; } @@ -1684,7 +1529,7 @@ if (s->nb_channels == 2) compute_stereo(s, &s->granules[0][gr], &s->granules[1][gr]); - for(ch=0;chnb_channels;ch++) { + for (ch = 0; ch < s->nb_channels; ch++) { g = &s->granules[ch][gr]; reorder_block(s, g); @@ -1692,24 +1537,23 @@ compute_imdct(s, g, &s->sb_samples[ch][18 * gr][0], s->mdct_buf[ch]); } } /* gr */ - if(get_bits_count(&s->gb)<0) + if (get_bits_count(&s->gb) < 0) skip_bits_long(&s->gb, -get_bits_count(&s->gb)); return nb_granules * 18; } -static int mp_decode_frame(MPADecodeContext *s, - OUT_INT *samples, const uint8_t *buf, int buf_size) +static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, + const uint8_t *buf, int buf_size) { - int i, nb_frames, ch; + int i, nb_frames, ch, ret; OUT_INT *samples_ptr; - init_get_bits(&s->gb, buf + HEADER_SIZE, (buf_size - HEADER_SIZE)*8); + init_get_bits(&s->gb, buf + HEADER_SIZE, (buf_size - HEADER_SIZE) * 8); /* skip error protection field */ if (s->error_protection) skip_bits(&s->gb, 16); - av_dlog(s->avctx, "frame %d:\n", s->frame_count); switch(s->layer) { case 1: s->avctx->frame_size = 384; @@ -1725,38 +1569,46 @@ nb_frames = mp_decode_layer3(s); s->last_buf_size=0; - if(s->in_gb.buffer){ + if (s->in_gb.buffer) { align_get_bits(&s->gb); - i= get_bits_left(&s->gb)>>3; - if(i >= 0 && i <= BACKSTEP_SIZE){ + i = get_bits_left(&s->gb)>>3; + if (i >= 0 && i <= BACKSTEP_SIZE) { memmove(s->last_buf, s->gb.buffer + (get_bits_count(&s->gb)>>3), i); s->last_buf_size=i; - }else + } else av_log(s->avctx, AV_LOG_ERROR, "invalid old backstep %d\n", i); - s->gb= s->in_gb; - s->in_gb.buffer= NULL; + s->gb = s->in_gb; + s->in_gb.buffer = NULL; } align_get_bits(&s->gb); assert((get_bits_count(&s->gb) & 7) == 0); - i= get_bits_left(&s->gb)>>3; + i = get_bits_left(&s->gb) >> 3; - if(i<0 || i > BACKSTEP_SIZE || nb_frames<0){ - if(i<0) + if (i < 0 || i > BACKSTEP_SIZE || nb_frames < 0) { + if (i < 0) av_log(s->avctx, AV_LOG_ERROR, "invalid new backstep %d\n", i); - i= FFMIN(BACKSTEP_SIZE, buf_size - HEADER_SIZE); + i = FFMIN(BACKSTEP_SIZE, buf_size - HEADER_SIZE); } - assert(i <= buf_size - HEADER_SIZE && i>= 0); + assert(i <= buf_size - HEADER_SIZE && i >= 0); memcpy(s->last_buf + s->last_buf_size, s->gb.buffer + buf_size - HEADER_SIZE - i, i); s->last_buf_size += i; + } - break; + /* get output buffer */ + if (!samples) { + s->frame.nb_samples = s->avctx->frame_size; + if ((ret = s->avctx->get_buffer(s->avctx, &s->frame)) < 0) { + av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (OUT_INT *)s->frame.data[0]; } /* apply the synthesis filter */ - for(ch=0;chnb_channels;ch++) { + for (ch = 0; ch < s->nb_channels; ch++) { samples_ptr = samples + ch; - for(i=0;impadsp, s->synth_buf[ch], &(s->synth_buf_offset[ch]), @@ -1770,85 +1622,87 @@ return nb_frames * 32 * sizeof(OUT_INT) * s->nb_channels; } -static int decode_frame(AVCodecContext * avctx, - void *data, int *data_size, +static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; + const uint8_t *buf = avpkt->data; + int buf_size = avpkt->size; MPADecodeContext *s = avctx->priv_data; uint32_t header; int out_size; - OUT_INT *out_samples = data; - if(buf_size < HEADER_SIZE) - return -1; + if (buf_size < HEADER_SIZE) + return AVERROR_INVALIDDATA; header = AV_RB32(buf); - if(ff_mpa_check_header(header) < 0){ + if (ff_mpa_check_header(header) < 0) { av_log(avctx, AV_LOG_ERROR, "Header missing\n"); - return -1; + return AVERROR_INVALIDDATA; } - if (ff_mpegaudio_decode_header((MPADecodeHeader *)s, header) == 1) { + if (avpriv_mpegaudio_decode_header((MPADecodeHeader *)s, header) == 1) { /* free format: prepare to compute frame size */ s->frame_size = -1; - return -1; + return AVERROR_INVALIDDATA; } /* update codec info */ - avctx->channels = s->nb_channels; + avctx->channels = s->nb_channels; avctx->channel_layout = s->nb_channels == 1 ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO; if (!avctx->bit_rate) avctx->bit_rate = s->bit_rate; avctx->sub_id = s->layer; - if(*data_size < 1152*avctx->channels*sizeof(OUT_INT)) - return -1; - *data_size = 0; - - if(s->frame_size<=0 || s->frame_size > buf_size){ + if (s->frame_size <= 0 || s->frame_size > buf_size) { av_log(avctx, AV_LOG_ERROR, "incomplete frame\n"); - return -1; - }else if(s->frame_size < buf_size){ + return AVERROR_INVALIDDATA; + } else if (s->frame_size < buf_size) { av_log(avctx, AV_LOG_ERROR, "incorrect frame size\n"); buf_size= s->frame_size; } - out_size = mp_decode_frame(s, out_samples, buf, buf_size); - if(out_size>=0){ - *data_size = out_size; + out_size = mp_decode_frame(s, NULL, buf, buf_size); + if (out_size >= 0) { + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; avctx->sample_rate = s->sample_rate; //FIXME maybe move the other codec info stuff from above here too - }else - av_log(avctx, AV_LOG_DEBUG, "Error while decoding MPEG audio frame.\n"); //FIXME return -1 / but also return the number of bytes consumed + } else { + av_log(avctx, AV_LOG_ERROR, "Error while decoding MPEG audio frame.\n"); + /* Only return an error if the bad frame makes up the whole packet. + If there is more data in the packet, just consume the bad frame + instead of returning an error, which would discard the whole + packet. */ + *got_frame_ptr = 0; + if (buf_size == avpkt->size) + return out_size; + } s->frame_size = 0; return buf_size; } -static void flush(AVCodecContext *avctx){ +static void flush(AVCodecContext *avctx) +{ MPADecodeContext *s = avctx->priv_data; memset(s->synth_buf, 0, sizeof(s->synth_buf)); - s->last_buf_size= 0; + s->last_buf_size = 0; } #if CONFIG_MP3ADU_DECODER || CONFIG_MP3ADUFLOAT_DECODER -static int decode_frame_adu(AVCodecContext * avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int decode_frame_adu(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; + const uint8_t *buf = avpkt->data; + int buf_size = avpkt->size; MPADecodeContext *s = avctx->priv_data; uint32_t header; int len, out_size; - OUT_INT *out_samples = data; len = buf_size; // Discard too short frames if (buf_size < HEADER_SIZE) { - *data_size = 0; - return buf_size; + av_log(avctx, AV_LOG_ERROR, "Packet is too small\n"); + return AVERROR_INVALIDDATA; } @@ -1859,27 +1713,30 @@ header = AV_RB32(buf) | 0xffe00000; if (ff_mpa_check_header(header) < 0) { // Bad header, discard frame - *data_size = 0; - return buf_size; + av_log(avctx, AV_LOG_ERROR, "Invalid frame header\n"); + return AVERROR_INVALIDDATA; } - ff_mpegaudio_decode_header((MPADecodeHeader *)s, header); + avpriv_mpegaudio_decode_header((MPADecodeHeader *)s, header); /* update codec info */ avctx->sample_rate = s->sample_rate; - avctx->channels = s->nb_channels; + avctx->channels = s->nb_channels; if (!avctx->bit_rate) avctx->bit_rate = s->bit_rate; avctx->sub_id = s->layer; s->frame_size = len; - if (avctx->parse_only) { +#if FF_API_PARSE_FRAME + if (avctx->parse_only) out_size = buf_size; - } else { - out_size = mp_decode_frame(s, out_samples, buf, buf_size); - } + else +#endif + out_size = mp_decode_frame(s, NULL, buf, buf_size); + + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; - *data_size = out_size; return buf_size; } #endif /* CONFIG_MP3ADU_DECODER || CONFIG_MP3ADUFLOAT_DECODER */ @@ -1890,28 +1747,58 @@ * Context for MP3On4 decoder */ typedef struct MP3On4DecodeContext { - int frames; ///< number of mp3 frames per block (number of mp3 decoder instances) - int syncword; ///< syncword patch - const uint8_t *coff; ///< channels offsets in output buffer + AVFrame *frame; + int frames; ///< number of mp3 frames per block (number of mp3 decoder instances) + int syncword; ///< syncword patch + const uint8_t *coff; ///< channel offsets in output buffer MPADecodeContext *mp3decctx[5]; ///< MPADecodeContext for every decoder instance + OUT_INT *decoded_buf; ///< output buffer for decoded samples } MP3On4DecodeContext; #include "mpeg4audio.h" /* Next 3 arrays are indexed by channel config number (passed via codecdata) */ -static const uint8_t mp3Frames[8] = {0,1,1,2,3,3,4,5}; /* number of mp3 decoder instances */ -/* offsets into output buffer, assume output order is FL FR BL BR C LFE */ + +/* number of mp3 decoder instances */ +static const uint8_t mp3Frames[8] = { 0, 1, 1, 2, 3, 3, 4, 5 }; + +/* offsets into output buffer, assume output order is FL FR C LFE BL BR SL SR */ static const uint8_t chan_offset[8][5] = { - {0}, - {0}, // C - {0}, // FLR - {2,0}, // C FLR - {2,0,3}, // C FLR BS - {4,0,2}, // C FLR BLRS - {4,0,2,5}, // C FLR BLRS LFE - {4,0,2,6,5}, // C FLR BLRS BLR LFE + { 0 }, + { 0 }, // C + { 0 }, // FLR + { 2, 0 }, // C FLR + { 2, 0, 3 }, // C FLR BS + { 2, 0, 3 }, // C FLR BLRS + { 2, 0, 4, 3 }, // C FLR BLRS LFE + { 2, 0, 6, 4, 3 }, // C FLR BLRS BLR LFE }; +/* mp3on4 channel layouts */ +static const int16_t chan_layout[8] = { + 0, + AV_CH_LAYOUT_MONO, + AV_CH_LAYOUT_STEREO, + AV_CH_LAYOUT_SURROUND, + AV_CH_LAYOUT_4POINT0, + AV_CH_LAYOUT_5POINT0, + AV_CH_LAYOUT_5POINT1, + AV_CH_LAYOUT_7POINT1 +}; + +static av_cold int decode_close_mp3on4(AVCodecContext * avctx) +{ + MP3On4DecodeContext *s = avctx->priv_data; + int i; + + for (i = 0; i < s->frames; i++) + av_free(s->mp3decctx[i]); + + av_freep(&s->decoded_buf); + + return 0; +} + static int decode_init_mp3on4(AVCodecContext * avctx) { @@ -1921,17 +1808,19 @@ if ((avctx->extradata_size < 2) || (avctx->extradata == NULL)) { av_log(avctx, AV_LOG_ERROR, "Codec extradata missing or too short.\n"); - return -1; + return AVERROR_INVALIDDATA; } - ff_mpeg4audio_get_config(&cfg, avctx->extradata, avctx->extradata_size); + avpriv_mpeg4audio_get_config(&cfg, avctx->extradata, + avctx->extradata_size * 8, 1); if (!cfg.chan_config || cfg.chan_config > 7) { av_log(avctx, AV_LOG_ERROR, "Invalid channel config number.\n"); - return -1; + return AVERROR_INVALIDDATA; } - s->frames = mp3Frames[cfg.chan_config]; - s->coff = chan_offset[cfg.chan_config]; - avctx->channels = ff_mpeg4audio_channels[cfg.chan_config]; + s->frames = mp3Frames[cfg.chan_config]; + s->coff = chan_offset[cfg.chan_config]; + avctx->channels = ff_mpeg4audio_channels[cfg.chan_config]; + avctx->channel_layout = chan_layout[cfg.chan_config]; if (cfg.sample_rate < 16000) s->syncword = 0xffe00000; @@ -1945,9 +1834,12 @@ */ // Allocate zeroed memory for the first decoder context s->mp3decctx[0] = av_mallocz(sizeof(MPADecodeContext)); + if (!s->mp3decctx[0]) + goto alloc_fail; // Put decoder context in place to make init_decode() happy avctx->priv_data = s->mp3decctx[0]; decode_init(avctx); + s->frame = avctx->coded_frame; // Restore mp3on4 context pointer avctx->priv_data = s; s->mp3decctx[0]->adu_mode = 1; // Set adu mode @@ -1957,84 +1849,110 @@ */ for (i = 1; i < s->frames; i++) { s->mp3decctx[i] = av_mallocz(sizeof(MPADecodeContext)); + if (!s->mp3decctx[i]) + goto alloc_fail; s->mp3decctx[i]->adu_mode = 1; s->mp3decctx[i]->avctx = avctx; + s->mp3decctx[i]->mpadsp = s->mp3decctx[0]->mpadsp; + } + + /* Allocate buffer for multi-channel output if needed */ + if (s->frames > 1) { + s->decoded_buf = av_malloc(MPA_FRAME_SIZE * MPA_MAX_CHANNELS * + sizeof(*s->decoded_buf)); + if (!s->decoded_buf) + goto alloc_fail; } return 0; +alloc_fail: + decode_close_mp3on4(avctx); + return AVERROR(ENOMEM); } -static av_cold int decode_close_mp3on4(AVCodecContext * avctx) +static void flush_mp3on4(AVCodecContext *avctx) { - MP3On4DecodeContext *s = avctx->priv_data; int i; + MP3On4DecodeContext *s = avctx->priv_data; - for (i = 0; i < s->frames; i++) - av_free(s->mp3decctx[i]); - - return 0; + for (i = 0; i < s->frames; i++) { + MPADecodeContext *m = s->mp3decctx[i]; + memset(m->synth_buf, 0, sizeof(m->synth_buf)); + m->last_buf_size = 0; + } } -static int decode_frame_mp3on4(AVCodecContext * avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int decode_frame_mp3on4(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; + const uint8_t *buf = avpkt->data; + int buf_size = avpkt->size; MP3On4DecodeContext *s = avctx->priv_data; MPADecodeContext *m; int fsize, len = buf_size, out_size = 0; uint32_t header; - OUT_INT *out_samples = data; - OUT_INT decoded_buf[MPA_FRAME_SIZE * MPA_MAX_CHANNELS]; + OUT_INT *out_samples; OUT_INT *outptr, *bp; - int fr, j, n; + int fr, j, n, ch, ret; - if(*data_size < MPA_FRAME_SIZE * MPA_MAX_CHANNELS * s->frames * sizeof(OUT_INT)) - return -1; + /* get output buffer */ + s->frame->nb_samples = MPA_FRAME_SIZE; + if ((ret = avctx->get_buffer(avctx, s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + out_samples = (OUT_INT *)s->frame->data[0]; - *data_size = 0; // Discard too short frames if (buf_size < HEADER_SIZE) - return -1; + return AVERROR_INVALIDDATA; // If only one decoder interleave is not needed - outptr = s->frames == 1 ? out_samples : decoded_buf; + outptr = s->frames == 1 ? out_samples : s->decoded_buf; avctx->bit_rate = 0; + ch = 0; for (fr = 0; fr < s->frames; fr++) { fsize = AV_RB16(buf) >> 4; fsize = FFMIN3(fsize, len, MPA_MAX_CODED_FRAME_SIZE); - m = s->mp3decctx[fr]; - assert (m != NULL); + m = s->mp3decctx[fr]; + assert(m != NULL); header = (AV_RB32(buf) & 0x000fffff) | s->syncword; // patch header if (ff_mpa_check_header(header) < 0) // Bad header, discard block break; - ff_mpegaudio_decode_header((MPADecodeHeader *)m, header); + avpriv_mpegaudio_decode_header((MPADecodeHeader *)m, header); + + if (ch + m->nb_channels > avctx->channels) { + av_log(avctx, AV_LOG_ERROR, "frame channel count exceeds codec " + "channel count\n"); + return AVERROR_INVALIDDATA; + } + ch += m->nb_channels; + out_size += mp_decode_frame(m, outptr, buf, fsize); - buf += fsize; - len -= fsize; + buf += fsize; + len -= fsize; - if(s->frames > 1) { + if (s->frames > 1) { n = m->avctx->frame_size*m->nb_channels; /* interleave output data */ bp = out_samples + s->coff[fr]; - if(m->nb_channels == 1) { - for(j = 0; j < n; j++) { - *bp = decoded_buf[j]; + if (m->nb_channels == 1) { + for (j = 0; j < n; j++) { + *bp = s->decoded_buf[j]; bp += avctx->channels; } } else { - for(j = 0; j < n; j++) { - bp[0] = decoded_buf[j++]; - bp[1] = decoded_buf[j]; - bp += avctx->channels; + for (j = 0; j < n; j++) { + bp[0] = s->decoded_buf[j++]; + bp[1] = s->decoded_buf[j]; + bp += avctx->channels; } } } @@ -2044,89 +1962,95 @@ /* update codec info */ avctx->sample_rate = s->mp3decctx[0]->sample_rate; - *data_size = out_size; + s->frame->nb_samples = out_size / (avctx->channels * sizeof(OUT_INT)); + *got_frame_ptr = 1; + *(AVFrame *)data = *s->frame; + return buf_size; } #endif /* CONFIG_MP3ON4_DECODER || CONFIG_MP3ON4FLOAT_DECODER */ #if !CONFIG_FLOAT #if CONFIG_MP1_DECODER -AVCodec ff_mp1_decoder = -{ - "mp1", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP1, - sizeof(MPADecodeContext), - decode_init, - NULL, - NULL, - decode_frame, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"), +AVCodec ff_mp1_decoder = { + .name = "mp1", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP1, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame, +#if FF_API_PARSE_FRAME + .capabilities = CODEC_CAP_PARSE_ONLY | CODEC_CAP_DR1, +#else + .capabilities = CODEC_CAP_DR1, +#endif + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"), }; #endif #if CONFIG_MP2_DECODER -AVCodec ff_mp2_decoder = -{ - "mp2", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP2, - sizeof(MPADecodeContext), - decode_init, - NULL, - NULL, - decode_frame, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), +AVCodec ff_mp2_decoder = { + .name = "mp2", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP2, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame, +#if FF_API_PARSE_FRAME + .capabilities = CODEC_CAP_PARSE_ONLY | CODEC_CAP_DR1, +#else + .capabilities = CODEC_CAP_DR1, +#endif + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), }; #endif #if CONFIG_MP3_DECODER -AVCodec ff_mp3_decoder = -{ - "mp3", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP3, - sizeof(MPADecodeContext), - decode_init, - NULL, - NULL, - decode_frame, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"), +AVCodec ff_mp3_decoder = { + .name = "mp3", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP3, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame, +#if FF_API_PARSE_FRAME + .capabilities = CODEC_CAP_PARSE_ONLY | CODEC_CAP_DR1, +#else + .capabilities = CODEC_CAP_DR1, +#endif + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"), }; #endif #if CONFIG_MP3ADU_DECODER -AVCodec ff_mp3adu_decoder = -{ - "mp3adu", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP3ADU, - sizeof(MPADecodeContext), - decode_init, - NULL, - NULL, - decode_frame_adu, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"), +AVCodec ff_mp3adu_decoder = { + .name = "mp3adu", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP3ADU, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame_adu, +#if FF_API_PARSE_FRAME + .capabilities = CODEC_CAP_PARSE_ONLY | CODEC_CAP_DR1, +#else + .capabilities = CODEC_CAP_DR1, +#endif + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"), }; #endif #if CONFIG_MP3ON4_DECODER -AVCodec ff_mp3on4_decoder = -{ - "mp3on4", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP3ON4, - sizeof(MP3On4DecodeContext), - decode_init_mp3on4, - NULL, - decode_close_mp3on4, - decode_frame_mp3on4, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP3onMP4"), +AVCodec ff_mp3on4_decoder = { + .name = "mp3on4", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP3ON4, + .priv_data_size = sizeof(MP3On4DecodeContext), + .init = decode_init_mp3on4, + .close = decode_close_mp3on4, + .decode = decode_frame_mp3on4, + .capabilities = CODEC_CAP_DR1, + .flush = flush_mp3on4, + .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"), }; #endif #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodec_float.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodec_float.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodec_float.c 2011-06-01 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodec_float.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,81 +23,84 @@ #include "mpegaudiodec.c" #if CONFIG_MP1FLOAT_DECODER -AVCodec ff_mp1float_decoder = -{ - "mp1float", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP1, - sizeof(MPADecodeContext), - decode_init, - NULL, - .close = NULL, - decode_frame, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"), +AVCodec ff_mp1float_decoder = { + .name = "mp1float", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP1, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame, +#if FF_API_PARSE_FRAME + .capabilities = CODEC_CAP_PARSE_ONLY | CODEC_CAP_DR1, +#else + .capabilities = CODEC_CAP_DR1, +#endif + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"), }; #endif #if CONFIG_MP2FLOAT_DECODER -AVCodec ff_mp2float_decoder = -{ - "mp2float", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP2, - sizeof(MPADecodeContext), - decode_init, - NULL, - .close = NULL, - decode_frame, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), +AVCodec ff_mp2float_decoder = { + .name = "mp2float", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP2, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame, +#if FF_API_PARSE_FRAME + .capabilities = CODEC_CAP_PARSE_ONLY | CODEC_CAP_DR1, +#else + .capabilities = CODEC_CAP_DR1, +#endif + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), }; #endif #if CONFIG_MP3FLOAT_DECODER -AVCodec ff_mp3float_decoder = -{ - "mp3float", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP3, - sizeof(MPADecodeContext), - decode_init, - NULL, - .close = NULL, - decode_frame, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"), +AVCodec ff_mp3float_decoder = { + .name = "mp3float", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP3, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame, +#if FF_API_PARSE_FRAME + .capabilities = CODEC_CAP_PARSE_ONLY | CODEC_CAP_DR1, +#else + .capabilities = CODEC_CAP_DR1, +#endif + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"), }; #endif #if CONFIG_MP3ADUFLOAT_DECODER -AVCodec ff_mp3adufloat_decoder = -{ - "mp3adufloat", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP3ADU, - sizeof(MPADecodeContext), - decode_init, - NULL, - .close = NULL, - decode_frame_adu, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"), +AVCodec ff_mp3adufloat_decoder = { + .name = "mp3adufloat", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP3ADU, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame_adu, +#if FF_API_PARSE_FRAME + .capabilities = CODEC_CAP_PARSE_ONLY | CODEC_CAP_DR1, +#else + .capabilities = CODEC_CAP_DR1, +#endif + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"), }; #endif #if CONFIG_MP3ON4FLOAT_DECODER -AVCodec ff_mp3on4float_decoder = -{ - "mp3on4float", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP3ON4, - sizeof(MP3On4DecodeContext), - decode_init_mp3on4, - NULL, - decode_close_mp3on4, - decode_frame_mp3on4, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP3onMP4"), +AVCodec ff_mp3on4float_decoder = { + .name = "mp3on4float", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP3ON4, + .priv_data_size = sizeof(MP3On4DecodeContext), + .init = decode_init_mp3on4, + .close = decode_close_mp3on4, + .decode = decode_frame_mp3on4, + .capabilities = CODEC_CAP_DR1, + .flush = flush_mp3on4, + .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"), }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodecheader.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodecheader.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodecheader.c 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodecheader.c 2012-01-11 00:34:30.000000000 +0000 @@ -31,7 +31,7 @@ #include "mpegaudiodecheader.h" -int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header) +int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header) { int sample_rate, frame_size, mpeg25, padding; int sample_rate_index, bitrate_index; @@ -46,7 +46,7 @@ s->layer = 4 - ((header >> 17) & 3); /* extract frequency */ sample_rate_index = (header >> 10) & 3; - sample_rate = ff_mpa_freq_tab[sample_rate_index] >> (s->lsf + mpeg25); + sample_rate = avpriv_mpa_freq_tab[sample_rate_index] >> (s->lsf + mpeg25); sample_rate_index += 3 * (s->lsf + mpeg25); s->sample_rate_index = sample_rate_index; s->error_protection = ((header >> 16) & 1) ^ 1; @@ -67,7 +67,7 @@ s->nb_channels = 2; if (bitrate_index != 0) { - frame_size = ff_mpa_bitrate_tab[s->lsf][s->layer - 1][bitrate_index]; + frame_size = avpriv_mpa_bitrate_tab[s->lsf][s->layer - 1][bitrate_index]; s->bit_rate = frame_size * 1000; switch(s->layer) { case 1: @@ -109,14 +109,14 @@ return 0; } -int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bit_rate) +int avpriv_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bit_rate) { MPADecodeHeader s1, *s = &s1; if (ff_mpa_check_header(head) != 0) return -1; - if (ff_mpegaudio_decode_header(s, head) != 0) { + if (avpriv_mpegaudio_decode_header(s, head) != 0) { return -1; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodecheader.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodecheader.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodecheader.h 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodecheader.h 2012-01-11 00:34:30.000000000 +0000 @@ -50,11 +50,11 @@ /* header decoding. MUST check the header before because no consistency check is done there. Return 1 if free format found and that the frame size must be computed externally */ -int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header); +int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header); /* useful helper to get mpeg audio stream infos. Return -1 if error in header, otherwise the coded frame size in bytes */ -int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bitrate); +int avpriv_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bitrate); /* fast header check for resync */ static inline int ff_mpa_check_header(uint32_t header){ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodsp.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,6 +28,8 @@ DCTContext dct; ff_dct_init(&dct, 5, DCT_II); + ff_init_mpadsp_tabs_float(); + ff_init_mpadsp_tabs_fixed(); s->apply_window_float = ff_mpadsp_apply_window_float; s->apply_window_fixed = ff_mpadsp_apply_window_fixed; @@ -35,6 +37,9 @@ s->dct32_float = dct.dct32; s->dct32_fixed = ff_dct32_fixed; + s->imdct36_blocks_float = ff_imdct36_blocks_float; + s->imdct36_blocks_fixed = ff_imdct36_blocks_fixed; + if (ARCH_ARM) ff_mpadsp_init_arm(s); if (HAVE_MMX) ff_mpadsp_init_mmx(s); if (HAVE_ALTIVEC) ff_mpadsp_init_altivec(s); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodsp.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodsp.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodsp.h 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodsp.h 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ #define AVCODEC_MPEGAUDIODSP_H #include +#include "libavutil/common.h" typedef struct MPADSPContext { void (*apply_window_float)(float *synth_buf, float *window, @@ -28,6 +29,10 @@ int *dither_state, int16_t *samples, int incr); void (*dct32_float)(float *dst, const float *src); void (*dct32_fixed)(int *dst, const int *src); + void (*imdct36_blocks_float)(float *out, float *buf, float *in, + int count, int switch_point, int block_type); + void (*imdct36_blocks_fixed)(int *out, int *buf, int *in, + int count, int switch_point, int block_type); } MPADSPContext; void ff_mpadsp_init(MPADSPContext *s); @@ -61,4 +66,19 @@ int *dither_state, int16_t *samples, int incr); +void ff_imdct36_blocks_float(float *out, float *buf, float *in, + int count, int switch_point, int block_type); + +void ff_imdct36_blocks_fixed(int *out, int *buf, int *in, + int count, int switch_point, int block_type); + +void ff_init_mpadsp_tabs_float(void); +void ff_init_mpadsp_tabs_fixed(void); + +/** For SSE implementation, MDCT_BUF_SIZE/2 should be 128-bit aligned */ +#define MDCT_BUF_SIZE FFALIGN(36, 2*4) + +extern int ff_mdct_win_fixed[8][MDCT_BUF_SIZE]; +extern float ff_mdct_win_float[8][MDCT_BUF_SIZE]; + #endif /* AVCODEC_MPEGAUDIODSP_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodsp_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodsp_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudiodsp_template.c 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudiodsp_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -39,7 +39,12 @@ #define MACS(rt, ra, rb) rt+=(ra)*(rb) #define MULS(ra, rb) ((ra)*(rb)) +#define MULH3(x, y, s) ((s)*(y)*(x)) #define MLSS(rt, ra, rb) rt-=(ra)*(rb) +#define MULLx(x, y, s) ((y)*(x)) +#define FIXHR(x) ((float)(x)) +#define FIXR(x) ((float)(x)) +#define SHR(a,b) ((a)*(1.0f/(1<<(b)))) #else @@ -57,8 +62,19 @@ # define MULS(ra, rb) MUL64(ra, rb) # define MACS(rt, ra, rb) MAC64(rt, ra, rb) # define MLSS(rt, ra, rb) MLS64(rt, ra, rb) +# define MULH3(x, y, s) MULH((s)*(x), y) +# define MULLx(x, y, s) MULL(x,y,s) +# define SHR(a,b) ((a)>>(b)) +# define FIXR(a) ((int)((a) * FRAC_ONE + 0.5)) +# define FIXHR(a) ((int)((a) * (1LL<<32) + 0.5)) #endif +/** Window for MDCT. Actually only the elements in [0,17] and + [MDCT_BUF_SIZE/2, MDCT_BUF_SIZE/2 + 17] are actually used. The rest + is just to preserve alignment for SIMD implementations. +*/ +DECLARE_ALIGNED(16, INTFLOAT, RENAME(ff_mdct_win))[8][MDCT_BUF_SIZE]; + DECLARE_ALIGNED(16, MPA_INT, RENAME(ff_mpa_synth_window))[512+256]; #define SUM8(op, sum, w, p) \ @@ -194,6 +210,7 @@ window[512 - i] = v; } + // Needed for avoiding shuffles in ASM implementations for(i=0; i < 8; i++) for(j=0; j < 16; j++) @@ -203,3 +220,181 @@ for(j=0; j < 16; j++) window[512+128+16*i+j] = window[64*i+48-j]; } + +void RENAME(ff_init_mpadsp_tabs)(void) +{ + int i, j; + /* compute mdct windows */ + for (i = 0; i < 36; i++) { + for (j = 0; j < 4; j++) { + double d; + + if (j == 2 && i % 3 != 1) + continue; + + d = sin(M_PI * (i + 0.5) / 36.0); + if (j == 1) { + if (i >= 30) d = 0; + else if (i >= 24) d = sin(M_PI * (i - 18 + 0.5) / 12.0); + else if (i >= 18) d = 1; + } else if (j == 3) { + if (i < 6) d = 0; + else if (i < 12) d = sin(M_PI * (i - 6 + 0.5) / 12.0); + else if (i < 18) d = 1; + } + //merge last stage of imdct into the window coefficients + d *= 0.5 / cos(M_PI * (2 * i + 19) / 72); + + if (j == 2) + RENAME(ff_mdct_win)[j][i/3] = FIXHR((d / (1<<5))); + else { + int idx = i < 18 ? i : i + (MDCT_BUF_SIZE/2 - 18); + RENAME(ff_mdct_win)[j][idx] = FIXHR((d / (1<<5))); + } + } + } + + /* NOTE: we do frequency inversion adter the MDCT by changing + the sign of the right window coefs */ + for (j = 0; j < 4; j++) { + for (i = 0; i < MDCT_BUF_SIZE; i += 2) { + RENAME(ff_mdct_win)[j + 4][i ] = RENAME(ff_mdct_win)[j][i ]; + RENAME(ff_mdct_win)[j + 4][i + 1] = -RENAME(ff_mdct_win)[j][i + 1]; + } + } +} +/* cos(pi*i/18) */ +#define C1 FIXHR(0.98480775301220805936/2) +#define C2 FIXHR(0.93969262078590838405/2) +#define C3 FIXHR(0.86602540378443864676/2) +#define C4 FIXHR(0.76604444311897803520/2) +#define C5 FIXHR(0.64278760968653932632/2) +#define C6 FIXHR(0.5/2) +#define C7 FIXHR(0.34202014332566873304/2) +#define C8 FIXHR(0.17364817766693034885/2) + +/* 0.5 / cos(pi*(2*i+1)/36) */ +static const INTFLOAT icos36[9] = { + FIXR(0.50190991877167369479), + FIXR(0.51763809020504152469), //0 + FIXR(0.55168895948124587824), + FIXR(0.61038729438072803416), + FIXR(0.70710678118654752439), //1 + FIXR(0.87172339781054900991), + FIXR(1.18310079157624925896), + FIXR(1.93185165257813657349), //2 + FIXR(5.73685662283492756461), +}; + +/* 0.5 / cos(pi*(2*i+1)/36) */ +static const INTFLOAT icos36h[9] = { + FIXHR(0.50190991877167369479/2), + FIXHR(0.51763809020504152469/2), //0 + FIXHR(0.55168895948124587824/2), + FIXHR(0.61038729438072803416/2), + FIXHR(0.70710678118654752439/2), //1 + FIXHR(0.87172339781054900991/2), + FIXHR(1.18310079157624925896/4), + FIXHR(1.93185165257813657349/4), //2 +// FIXHR(5.73685662283492756461), +}; + +/* using Lee like decomposition followed by hand coded 9 points DCT */ +static void imdct36(INTFLOAT *out, INTFLOAT *buf, INTFLOAT *in, INTFLOAT *win) +{ + int i, j; + INTFLOAT t0, t1, t2, t3, s0, s1, s2, s3; + INTFLOAT tmp[18], *tmp1, *in1; + + for (i = 17; i >= 1; i--) + in[i] += in[i-1]; + for (i = 17; i >= 3; i -= 2) + in[i] += in[i-2]; + + for (j = 0; j < 2; j++) { + tmp1 = tmp + j; + in1 = in + j; + + t2 = in1[2*4] + in1[2*8] - in1[2*2]; + + t3 = in1[2*0] + SHR(in1[2*6],1); + t1 = in1[2*0] - in1[2*6]; + tmp1[ 6] = t1 - SHR(t2,1); + tmp1[16] = t1 + t2; + + t0 = MULH3(in1[2*2] + in1[2*4] , C2, 2); + t1 = MULH3(in1[2*4] - in1[2*8] , -2*C8, 1); + t2 = MULH3(in1[2*2] + in1[2*8] , -C4, 2); + + tmp1[10] = t3 - t0 - t2; + tmp1[ 2] = t3 + t0 + t1; + tmp1[14] = t3 + t2 - t1; + + tmp1[ 4] = MULH3(in1[2*5] + in1[2*7] - in1[2*1], -C3, 2); + t2 = MULH3(in1[2*1] + in1[2*5], C1, 2); + t3 = MULH3(in1[2*5] - in1[2*7], -2*C7, 1); + t0 = MULH3(in1[2*3], C3, 2); + + t1 = MULH3(in1[2*1] + in1[2*7], -C5, 2); + + tmp1[ 0] = t2 + t3 + t0; + tmp1[12] = t2 + t1 - t0; + tmp1[ 8] = t3 - t1 - t0; + } + + i = 0; + for (j = 0; j < 4; j++) { + t0 = tmp[i]; + t1 = tmp[i + 2]; + s0 = t1 + t0; + s2 = t1 - t0; + + t2 = tmp[i + 1]; + t3 = tmp[i + 3]; + s1 = MULH3(t3 + t2, icos36h[ j], 2); + s3 = MULLx(t3 - t2, icos36 [8 - j], FRAC_BITS); + + t0 = s0 + s1; + t1 = s0 - s1; + out[(9 + j) * SBLIMIT] = MULH3(t1, win[ 9 + j], 1) + buf[4*(9 + j)]; + out[(8 - j) * SBLIMIT] = MULH3(t1, win[ 8 - j], 1) + buf[4*(8 - j)]; + buf[4 * ( 9 + j )] = MULH3(t0, win[MDCT_BUF_SIZE/2 + 9 + j], 1); + buf[4 * ( 8 - j )] = MULH3(t0, win[MDCT_BUF_SIZE/2 + 8 - j], 1); + + t0 = s2 + s3; + t1 = s2 - s3; + out[(9 + 8 - j) * SBLIMIT] = MULH3(t1, win[ 9 + 8 - j], 1) + buf[4*(9 + 8 - j)]; + out[ j * SBLIMIT] = MULH3(t1, win[ j], 1) + buf[4*( j)]; + buf[4 * ( 9 + 8 - j )] = MULH3(t0, win[MDCT_BUF_SIZE/2 + 9 + 8 - j], 1); + buf[4 * ( j )] = MULH3(t0, win[MDCT_BUF_SIZE/2 + j], 1); + i += 4; + } + + s0 = tmp[16]; + s1 = MULH3(tmp[17], icos36h[4], 2); + t0 = s0 + s1; + t1 = s0 - s1; + out[(9 + 4) * SBLIMIT] = MULH3(t1, win[ 9 + 4], 1) + buf[4*(9 + 4)]; + out[(8 - 4) * SBLIMIT] = MULH3(t1, win[ 8 - 4], 1) + buf[4*(8 - 4)]; + buf[4 * ( 9 + 4 )] = MULH3(t0, win[MDCT_BUF_SIZE/2 + 9 + 4], 1); + buf[4 * ( 8 - 4 )] = MULH3(t0, win[MDCT_BUF_SIZE/2 + 8 - 4], 1); +} + +void RENAME(ff_imdct36_blocks)(INTFLOAT *out, INTFLOAT *buf, INTFLOAT *in, + int count, int switch_point, int block_type) +{ + int j; + for (j=0 ; j < count; j++) { + /* apply window & overlap with previous buffer */ + + /* select window */ + int win_idx = (switch_point && j < 2) ? 0 : block_type; + INTFLOAT *win = RENAME(ff_mdct_win)[win_idx + (4 & -(j & 1))]; + + imdct36(out, buf, in, win); + + in += 18; + buf += ((j&3) != 3 ? 1 : (72-3)); + out++; + } +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudioenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudioenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudioenc.c 2011-06-01 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudioenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,7 @@ */ #include "avcodec.h" +#include "internal.h" #include "put_bits.h" #define FRAC_BITS 15 /* fractional bits for sb_samples and dct */ @@ -83,9 +84,9 @@ /* encoding freq */ s->lsf = 0; for(i=0;i<3;i++) { - if (ff_mpa_freq_tab[i] == freq) + if (avpriv_mpa_freq_tab[i] == freq) break; - if ((ff_mpa_freq_tab[i] / 2) == freq) { + if ((avpriv_mpa_freq_tab[i] / 2) == freq) { s->lsf = 1; break; } @@ -98,7 +99,7 @@ /* encoding bitrate & frequency */ for(i=0;i<15;i++) { - if (ff_mpa_bitrate_tab[s->lsf][1][i] == bitrate) + if (avpriv_mpa_bitrate_tab[s->lsf][1][i] == bitrate) break; } if (i == 15){ @@ -315,8 +316,6 @@ int tmp1[32]; int *out; - // print_pow1(samples, 1152); - offset = s->samples_offset[ch]; out = &s->sb_samples[ch][0][0][0]; for(j=0;j<36;j++) { @@ -360,8 +359,6 @@ } } s->samples_offset[ch] = offset; - - // print_pow(s->sb_samples, 1152); } static void compute_scale_factors(unsigned char scale_code[SBLIMIT], @@ -763,16 +760,21 @@ return 0; } +static const AVCodecDefault mp2_defaults[] = { + { "b", "128k" }, + { NULL }, +}; + AVCodec ff_mp2_encoder = { - "mp2", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP2, - sizeof(MpegAudioContext), - MPA_encode_init, - MPA_encode_frame, - MPA_encode_close, - NULL, + .name = "mp2", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP2, + .priv_data_size = sizeof(MpegAudioContext), + .init = MPA_encode_init, + .encode = MPA_encode_frame, + .close = MPA_encode_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .supported_samplerates= (const int[]){44100, 48000, 32000, 22050, 24000, 16000, 0}, .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), + .defaults = mp2_defaults, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudio_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudio_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegaudio_parser.c 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegaudio_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -64,7 +64,7 @@ state= (state<<8) + buf[i++]; - ret = ff_mpa_decode_header(avctx, state, &sr, &channels, &frame_size, &bit_rate); + ret = avpriv_mpa_decode_header(avctx, state, &sr, &channels, &frame_size, &bit_rate); if (ret < 4) { s->header_count= -2; } else { @@ -100,9 +100,8 @@ AVCodecParser ff_mpegaudio_parser = { - { CODEC_ID_MP1, CODEC_ID_MP2, CODEC_ID_MP3 }, - sizeof(MpegAudioParseContext), - NULL, - mpegaudio_parse, - ff_parse_close, + .codec_ids = { CODEC_ID_MP1, CODEC_ID_MP2, CODEC_ID_MP3 }, + .priv_data_size = sizeof(MpegAudioParseContext), + .parser_parse = mpegaudio_parse, + .parser_close = ff_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo.c 2012-01-11 00:34:30.000000000 +0000 @@ -66,44 +66,61 @@ //#define DEBUG -static const uint8_t ff_default_chroma_qscale_table[32]={ -// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 +static const uint8_t ff_default_chroma_qscale_table[32] = { +// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; -const uint8_t ff_mpeg1_dc_scale_table[128]={ -// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +const uint8_t ff_mpeg1_dc_scale_table[128] = { +// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, }; -static const uint8_t mpeg2_dc_scale_table1[128]={ -// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, +static const uint8_t mpeg2_dc_scale_table1[128] = { +// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, }; -static const uint8_t mpeg2_dc_scale_table2[128]={ -// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +static const uint8_t mpeg2_dc_scale_table2[128] = { +// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, }; -static const uint8_t mpeg2_dc_scale_table3[128]={ -// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +static const uint8_t mpeg2_dc_scale_table3[128] = { +// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; -const uint8_t * const ff_mpeg2_dc_scale_table[4]={ +const uint8_t *const ff_mpeg2_dc_scale_table[4] = { ff_mpeg1_dc_scale_table, mpeg2_dc_scale_table1, mpeg2_dc_scale_table2, @@ -118,53 +135,59 @@ const enum PixelFormat ff_hwaccel_pixfmt_list_420[] = { PIX_FMT_DXVA2_VLD, PIX_FMT_VAAPI_VLD, + PIX_FMT_VDA_VLD, PIX_FMT_YUV420P, PIX_FMT_NONE }; -const uint8_t *ff_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){ +const uint8_t *avpriv_mpv_find_start_code(const uint8_t *restrict p, + const uint8_t *end, + uint32_t * restrict state) +{ int i; - assert(p<=end); - if(p>=end) + assert(p <= end); + if (p >= end) return end; - for(i=0; i<3; i++){ - uint32_t tmp= *state << 8; - *state= tmp + *(p++); - if(tmp == 0x100 || p==end) + for (i = 0; i < 3; i++) { + uint32_t tmp = *state << 8; + *state = tmp + *(p++); + if (tmp == 0x100 || p == end) return p; } - while(p 1 ) p+= 3; - else if(p[-2] ) p+= 2; - else if(p[-3]|(p[-1]-1)) p++; - else{ + while (p < end) { + if (p[-1] > 1 ) p += 3; + else if (p[-2] ) p += 2; + else if (p[-3]|(p[-1]-1)) p++; + else { p++; break; } } - p= FFMIN(p, end)-4; - *state= AV_RB32(p); + p = FFMIN(p, end) - 4; + *state = AV_RB32(p); - return p+4; + return p + 4; } /* init common dct for both encoder and decoder */ av_cold int ff_dct_common_init(MpegEncContext *s) { + dsputil_init(&s->dsp, s->avctx); + s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_c; s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_c; s->dct_unquantize_mpeg1_intra = dct_unquantize_mpeg1_intra_c; s->dct_unquantize_mpeg1_inter = dct_unquantize_mpeg1_inter_c; s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_c; - if(s->flags & CODEC_FLAG_BITEXACT) + if (s->flags & CODEC_FLAG_BITEXACT) s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_bitexact; s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c; -#if HAVE_MMX +#if HAVE_MMX MPV_common_init_mmx(s); #elif ARCH_ALPHA MPV_common_init_axp(s); @@ -181,12 +204,12 @@ #endif /* load & permutate scantables - note: only wmv uses different ones - */ - if(s->alternate_scan){ + * note: only wmv uses different ones + */ + if (s->alternate_scan) { ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable , ff_alternate_vertical_scan); ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable , ff_alternate_vertical_scan); - }else{ + } else { ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable , ff_zigzag_direct); ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable , ff_zigzag_direct); } @@ -196,9 +219,10 @@ return 0; } -void ff_copy_picture(Picture *dst, Picture *src){ +void ff_copy_picture(Picture *dst, Picture *src) +{ *dst = *src; - dst->type= FF_BUFFER_TYPE_COPY; + dst->f.type = FF_BUFFER_TYPE_COPY; } /** @@ -206,8 +230,14 @@ */ static void free_frame_buffer(MpegEncContext *s, Picture *pic) { - ff_thread_release_buffer(s->avctx, (AVFrame*)pic); - av_freep(&pic->hwaccel_picture_private); + /* Windows Media Image codecs allocate internal buffers with different + * dimensions; ignore user defined callbacks for these + */ + if (s->codec_id != CODEC_ID_WMV3IMAGE && s->codec_id != CODEC_ID_VC1IMAGE) + ff_thread_release_buffer(s->avctx, (AVFrame *) pic); + else + avcodec_default_release_buffer(s->avctx, (AVFrame *) pic); + av_freep(&pic->f.hwaccel_picture_private); } /** @@ -218,32 +248,39 @@ int r; if (s->avctx->hwaccel) { - assert(!pic->hwaccel_picture_private); + assert(!pic->f.hwaccel_picture_private); if (s->avctx->hwaccel->priv_data_size) { - pic->hwaccel_picture_private = av_mallocz(s->avctx->hwaccel->priv_data_size); - if (!pic->hwaccel_picture_private) { + pic->f.hwaccel_picture_private = av_mallocz(s->avctx->hwaccel->priv_data_size); + if (!pic->f.hwaccel_picture_private) { av_log(s->avctx, AV_LOG_ERROR, "alloc_frame_buffer() failed (hwaccel private data allocation)\n"); return -1; } } } - r = ff_thread_get_buffer(s->avctx, (AVFrame*)pic); + if (s->codec_id != CODEC_ID_WMV3IMAGE && s->codec_id != CODEC_ID_VC1IMAGE) + r = ff_thread_get_buffer(s->avctx, (AVFrame *) pic); + else + r = avcodec_default_get_buffer(s->avctx, (AVFrame *) pic); - if (r<0 || !pic->age || !pic->type || !pic->data[0]) { - av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (%d %d %d %p)\n", r, pic->age, pic->type, pic->data[0]); - av_freep(&pic->hwaccel_picture_private); + if (r < 0 || !pic->f.type || !pic->f.data[0]) { + av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (%d %d %p)\n", + r, pic->f.type, pic->f.data[0]); + av_freep(&pic->f.hwaccel_picture_private); return -1; } - if (s->linesize && (s->linesize != pic->linesize[0] || s->uvlinesize != pic->linesize[1])) { - av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (stride changed)\n"); + if (s->linesize && (s->linesize != pic->f.linesize[0] || + s->uvlinesize != pic->f.linesize[1])) { + av_log(s->avctx, AV_LOG_ERROR, + "get_buffer() failed (stride changed)\n"); free_frame_buffer(s, pic); return -1; } - if (pic->linesize[1] != pic->linesize[2]) { - av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (uv stride mismatch)\n"); + if (pic->f.linesize[1] != pic->f.linesize[2]) { + av_log(s->avctx, AV_LOG_ERROR, + "get_buffer() failed (uv stride mismatch)\n"); free_frame_buffer(s, pic); return -1; } @@ -252,145 +289,170 @@ } /** - * allocates a Picture - * The pixels are allocated/set by calling get_buffer() if shared=0 + * Allocate a Picture. + * The pixels are allocated/set by calling get_buffer() if shared = 0 */ -int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared){ - const int big_mb_num= s->mb_stride*(s->mb_height+1) + 1; //the +1 is needed so memset(,,stride*height) does not sig11 - const int mb_array_size= s->mb_stride*s->mb_height; - const int b8_array_size= s->b8_stride*s->mb_height*2; - const int b4_array_size= s->b4_stride*s->mb_height*4; +int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared) +{ + const int big_mb_num = s->mb_stride * (s->mb_height + 1) + 1; + + // the + 1 is needed so memset(,,stride*height) does not sig11 + + const int mb_array_size = s->mb_stride * s->mb_height; + const int b8_array_size = s->b8_stride * s->mb_height * 2; + const int b4_array_size = s->b4_stride * s->mb_height * 4; int i; - int r= -1; + int r = -1; - if(shared){ - assert(pic->data[0]); - assert(pic->type == 0 || pic->type == FF_BUFFER_TYPE_SHARED); - pic->type= FF_BUFFER_TYPE_SHARED; - }else{ - assert(!pic->data[0]); + if (shared) { + assert(pic->f.data[0]); + assert(pic->f.type == 0 || pic->f.type == FF_BUFFER_TYPE_SHARED); + pic->f.type = FF_BUFFER_TYPE_SHARED; + } else { + assert(!pic->f.data[0]); if (alloc_frame_buffer(s, pic) < 0) return -1; - s->linesize = pic->linesize[0]; - s->uvlinesize= pic->linesize[1]; + s->linesize = pic->f.linesize[0]; + s->uvlinesize = pic->f.linesize[1]; } - if(pic->qscale_table==NULL){ + if (pic->f.qscale_table == NULL) { if (s->encoding) { - FF_ALLOCZ_OR_GOTO(s->avctx, pic->mb_var , mb_array_size * sizeof(int16_t) , fail) - FF_ALLOCZ_OR_GOTO(s->avctx, pic->mc_mb_var, mb_array_size * sizeof(int16_t) , fail) - FF_ALLOCZ_OR_GOTO(s->avctx, pic->mb_mean , mb_array_size * sizeof(int8_t ) , fail) - } - - FF_ALLOCZ_OR_GOTO(s->avctx, pic->mbskip_table , mb_array_size * sizeof(uint8_t)+2, fail) //the +2 is for the slice end check - FF_ALLOCZ_OR_GOTO(s->avctx, pic->qscale_table , mb_array_size * sizeof(uint8_t) , fail) - FF_ALLOCZ_OR_GOTO(s->avctx, pic->mb_type_base , (big_mb_num + s->mb_stride) * sizeof(uint32_t), fail) - pic->mb_type= pic->mb_type_base + 2*s->mb_stride+1; - if(s->out_format == FMT_H264){ - for(i=0; i<2; i++){ - FF_ALLOCZ_OR_GOTO(s->avctx, pic->motion_val_base[i], 2 * (b4_array_size+4) * sizeof(int16_t), fail) - pic->motion_val[i]= pic->motion_val_base[i]+4; - FF_ALLOCZ_OR_GOTO(s->avctx, pic->ref_index[i], 4*mb_array_size * sizeof(uint8_t), fail) - } - pic->motion_subsample_log2= 2; - }else if(s->out_format == FMT_H263 || s->encoding || (s->avctx->debug&FF_DEBUG_MV) || (s->avctx->debug_mv)){ - for(i=0; i<2; i++){ - FF_ALLOCZ_OR_GOTO(s->avctx, pic->motion_val_base[i], 2 * (b8_array_size+4) * sizeof(int16_t), fail) - pic->motion_val[i]= pic->motion_val_base[i]+4; - FF_ALLOCZ_OR_GOTO(s->avctx, pic->ref_index[i], 4*mb_array_size * sizeof(uint8_t), fail) - } - pic->motion_subsample_log2= 3; - } - if(s->avctx->debug&FF_DEBUG_DCT_COEFF) { - FF_ALLOCZ_OR_GOTO(s->avctx, pic->dct_coeff, 64 * mb_array_size * sizeof(DCTELEM)*6, fail) - } - pic->qstride= s->mb_stride; - FF_ALLOCZ_OR_GOTO(s->avctx, pic->pan_scan , 1 * sizeof(AVPanScan), fail) - } - - /* It might be nicer if the application would keep track of these - * but it would require an API change. */ - memmove(s->prev_pict_types+1, s->prev_pict_types, PREV_PICT_TYPES_BUFFER_SIZE-1); - s->prev_pict_types[0]= s->dropable ? AV_PICTURE_TYPE_B : s->pict_type; - if(pic->age < PREV_PICT_TYPES_BUFFER_SIZE && s->prev_pict_types[pic->age] == AV_PICTURE_TYPE_B) - pic->age= INT_MAX; // Skipped MBs in B-frames are quite rare in MPEG-1/2 and it is a bit tricky to skip them anyway. - pic->owner2 = NULL; + FF_ALLOCZ_OR_GOTO(s->avctx, pic->mb_var, + mb_array_size * sizeof(int16_t), fail) + FF_ALLOCZ_OR_GOTO(s->avctx, pic->mc_mb_var, + mb_array_size * sizeof(int16_t), fail) + FF_ALLOCZ_OR_GOTO(s->avctx, pic->mb_mean, + mb_array_size * sizeof(int8_t ), fail) + } + + FF_ALLOCZ_OR_GOTO(s->avctx, pic->f.mbskip_table, + mb_array_size * sizeof(uint8_t) + 2, fail)// the + 2 is for the slice end check + FF_ALLOCZ_OR_GOTO(s->avctx, pic->qscale_table_base, + (big_mb_num + s->mb_stride) * sizeof(uint8_t), + fail) + FF_ALLOCZ_OR_GOTO(s->avctx, pic->mb_type_base, + (big_mb_num + s->mb_stride) * sizeof(uint32_t), + fail) + pic->f.mb_type = pic->mb_type_base + 2 * s->mb_stride + 1; + pic->f.qscale_table = pic->qscale_table_base + 2 * s->mb_stride + 1; + if (s->out_format == FMT_H264) { + for (i = 0; i < 2; i++) { + FF_ALLOCZ_OR_GOTO(s->avctx, pic->motion_val_base[i], + 2 * (b4_array_size + 4) * sizeof(int16_t), + fail) + pic->f.motion_val[i] = pic->motion_val_base[i] + 4; + FF_ALLOCZ_OR_GOTO(s->avctx, pic->f.ref_index[i], + 4 * mb_array_size * sizeof(uint8_t), fail) + } + pic->f.motion_subsample_log2 = 2; + } else if (s->out_format == FMT_H263 || s->encoding || + (s->avctx->debug & FF_DEBUG_MV) || s->avctx->debug_mv) { + for (i = 0; i < 2; i++) { + FF_ALLOCZ_OR_GOTO(s->avctx, pic->motion_val_base[i], + 2 * (b8_array_size + 4) * sizeof(int16_t), + fail) + pic->f.motion_val[i] = pic->motion_val_base[i] + 4; + FF_ALLOCZ_OR_GOTO(s->avctx, pic->f.ref_index[i], + 4 * mb_array_size * sizeof(uint8_t), fail) + } + pic->f.motion_subsample_log2 = 3; + } + if (s->avctx->debug&FF_DEBUG_DCT_COEFF) { + FF_ALLOCZ_OR_GOTO(s->avctx, pic->f.dct_coeff, + 64 * mb_array_size * sizeof(DCTELEM) * 6, fail) + } + pic->f.qstride = s->mb_stride; + FF_ALLOCZ_OR_GOTO(s->avctx, pic->f.pan_scan, + 1 * sizeof(AVPanScan), fail) + } + + pic->owner2 = s; return 0; -fail: //for the FF_ALLOCZ_OR_GOTO macro - if(r>=0) +fail: // for the FF_ALLOCZ_OR_GOTO macro + if (r >= 0) free_frame_buffer(s, pic); return -1; } /** - * deallocates a picture + * Deallocate a picture. */ -static void free_picture(MpegEncContext *s, Picture *pic){ +static void free_picture(MpegEncContext *s, Picture *pic) +{ int i; - if(pic->data[0] && pic->type!=FF_BUFFER_TYPE_SHARED){ + if (pic->f.data[0] && pic->f.type != FF_BUFFER_TYPE_SHARED) { free_frame_buffer(s, pic); } av_freep(&pic->mb_var); av_freep(&pic->mc_mb_var); av_freep(&pic->mb_mean); - av_freep(&pic->mbskip_table); - av_freep(&pic->qscale_table); + av_freep(&pic->f.mbskip_table); + av_freep(&pic->qscale_table_base); av_freep(&pic->mb_type_base); - av_freep(&pic->dct_coeff); - av_freep(&pic->pan_scan); - pic->mb_type= NULL; - for(i=0; i<2; i++){ + av_freep(&pic->f.dct_coeff); + av_freep(&pic->f.pan_scan); + pic->f.mb_type = NULL; + for (i = 0; i < 2; i++) { av_freep(&pic->motion_val_base[i]); - av_freep(&pic->ref_index[i]); + av_freep(&pic->f.ref_index[i]); } - if(pic->type == FF_BUFFER_TYPE_SHARED){ - for(i=0; i<4; i++){ - pic->base[i]= - pic->data[i]= NULL; + if (pic->f.type == FF_BUFFER_TYPE_SHARED) { + for (i = 0; i < 4; i++) { + pic->f.base[i] = + pic->f.data[i] = NULL; } - pic->type= 0; + pic->f.type = 0; } } -static int init_duplicate_context(MpegEncContext *s, MpegEncContext *base){ +static int init_duplicate_context(MpegEncContext *s, MpegEncContext *base) +{ int y_size = s->b8_stride * (2 * s->mb_height + 1); int c_size = s->mb_stride * (s->mb_height + 1); int yc_size = y_size + 2 * c_size; int i; - // edge emu needs blocksize + filter length - 1 (=17x17 for halfpel / 21x21 for h264) - FF_ALLOCZ_OR_GOTO(s->avctx, s->allocated_edge_emu_buffer, (s->width+64)*2*21*2, fail); //(width + edge + align)*interlaced*MBsize*tolerance - s->edge_emu_buffer= s->allocated_edge_emu_buffer + (s->width+64)*2*21; - - //FIXME should be linesize instead of s->width*2 but that is not known before get_buffer() - FF_ALLOCZ_OR_GOTO(s->avctx, s->me.scratchpad, (s->width+64)*4*16*2*sizeof(uint8_t), fail) - s->me.temp= s->me.scratchpad; - s->rd_scratchpad= s->me.scratchpad; - s->b_scratchpad= s->me.scratchpad; - s->obmc_scratchpad= s->me.scratchpad + 16; + // edge emu needs blocksize + filter length - 1 + // (= 17x17 for halfpel / 21x21 for h264) + FF_ALLOCZ_OR_GOTO(s->avctx, s->edge_emu_buffer, + (s->width + 64) * 2 * 21 * 2, fail); // (width + edge + align)*interlaced*MBsize*tolerance + + // FIXME should be linesize instead of s->width * 2 + // but that is not known before get_buffer() + FF_ALLOCZ_OR_GOTO(s->avctx, s->me.scratchpad, + (s->width + 64) * 4 * 16 * 2 * sizeof(uint8_t), fail) + s->me.temp = s->me.scratchpad; + s->rd_scratchpad = s->me.scratchpad; + s->b_scratchpad = s->me.scratchpad; + s->obmc_scratchpad = s->me.scratchpad + 16; if (s->encoding) { - FF_ALLOCZ_OR_GOTO(s->avctx, s->me.map , ME_MAP_SIZE*sizeof(uint32_t), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->me.score_map, ME_MAP_SIZE*sizeof(uint32_t), fail) - if(s->avctx->noise_reduction){ - FF_ALLOCZ_OR_GOTO(s->avctx, s->dct_error_sum, 2 * 64 * sizeof(int), fail) + FF_ALLOCZ_OR_GOTO(s->avctx, s->me.map, + ME_MAP_SIZE * sizeof(uint32_t), fail) + FF_ALLOCZ_OR_GOTO(s->avctx, s->me.score_map, + ME_MAP_SIZE * sizeof(uint32_t), fail) + if (s->avctx->noise_reduction) { + FF_ALLOCZ_OR_GOTO(s->avctx, s->dct_error_sum, + 2 * 64 * sizeof(int), fail) } } - FF_ALLOCZ_OR_GOTO(s->avctx, s->blocks, 64*12*2 * sizeof(DCTELEM), fail) - s->block= s->blocks[0]; + FF_ALLOCZ_OR_GOTO(s->avctx, s->blocks, 64 * 12 * 2 * sizeof(DCTELEM), fail) + s->block = s->blocks[0]; - for(i=0;i<12;i++){ + for (i = 0; i < 12; i++) { s->pblocks[i] = &s->block[i]; } if (s->out_format == FMT_H263) { /* ac values */ - FF_ALLOCZ_OR_GOTO(s->avctx, s->ac_val_base, yc_size * sizeof(int16_t) * 16, fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->ac_val_base, + yc_size * sizeof(int16_t) * 16, fail); s->ac_val[0] = s->ac_val_base + s->b8_stride + 1; s->ac_val[1] = s->ac_val_base + y_size + s->mb_stride + 1; s->ac_val[2] = s->ac_val[1] + c_size; @@ -398,30 +460,32 @@ return 0; fail: - return -1; //free() through MPV_common_end() + return -1; // free() through MPV_common_end() } -static void free_duplicate_context(MpegEncContext *s){ - if(s==NULL) return; +static void free_duplicate_context(MpegEncContext *s) +{ + if (s == NULL) + return; - av_freep(&s->allocated_edge_emu_buffer); s->edge_emu_buffer= NULL; + av_freep(&s->edge_emu_buffer); av_freep(&s->me.scratchpad); - s->me.temp= - s->rd_scratchpad= - s->b_scratchpad= - s->obmc_scratchpad= NULL; + s->me.temp = + s->rd_scratchpad = + s->b_scratchpad = + s->obmc_scratchpad = NULL; av_freep(&s->dct_error_sum); av_freep(&s->me.map); av_freep(&s->me.score_map); av_freep(&s->blocks); av_freep(&s->ac_val_base); - s->block= NULL; + s->block = NULL; } -static void backup_duplicate_context(MpegEncContext *bak, MpegEncContext *src){ -#define COPY(a) bak->a= src->a - COPY(allocated_edge_emu_buffer); +static void backup_duplicate_context(MpegEncContext *bak, MpegEncContext *src) +{ +#define COPY(a) bak->a = src->a COPY(edge_emu_buffer); COPY(me.scratchpad); COPY(me.temp); @@ -446,28 +510,33 @@ #undef COPY } -void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src){ +void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src) +{ MpegEncContext bak; int i; - //FIXME copy only needed parts -//START_TIMER + // FIXME copy only needed parts + // START_TIMER backup_duplicate_context(&bak, dst); memcpy(dst, src, sizeof(MpegEncContext)); backup_duplicate_context(dst, &bak); - for(i=0;i<12;i++){ + for (i = 0; i < 12; i++) { dst->pblocks[i] = &dst->block[i]; } -//STOP_TIMER("update_duplicate_context") //about 10k cycles / 0.01 sec for 1000frames on 1ghz with 2 threads + // STOP_TIMER("update_duplicate_context") + // about 10k cycles / 0.01 sec for 1000frames on 1ghz with 2 threads } -int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src) +int ff_mpeg_update_thread_context(AVCodecContext *dst, + const AVCodecContext *src) { MpegEncContext *s = dst->priv_data, *s1 = src->priv_data; - if(dst == src || !s1->context_initialized) return 0; + if (dst == src || !s1->context_initialized) + return 0; - //FIXME can parameters change on I-frames? in that case dst may need a reinit - if(!s->context_initialized){ + // FIXME can parameters change on I-frames? + // in that case dst may need a reinit + if (!s->context_initialized) { memcpy(s, s1, sizeof(MpegEncContext)); s->avctx = dst; @@ -489,46 +558,53 @@ s->input_picture_number = s1->input_picture_number; memcpy(s->picture, s1->picture, s1->picture_count * sizeof(Picture)); - memcpy(&s->last_picture, &s1->last_picture, (char*)&s1->last_picture_ptr - (char*)&s1->last_picture); - - s->last_picture_ptr = REBASE_PICTURE(s1->last_picture_ptr, s, s1); - s->current_picture_ptr = REBASE_PICTURE(s1->current_picture_ptr, s, s1); - s->next_picture_ptr = REBASE_PICTURE(s1->next_picture_ptr, s, s1); + memcpy(&s->last_picture, &s1->last_picture, + (char *) &s1->last_picture_ptr - (char *) &s1->last_picture); - memcpy(s->prev_pict_types, s1->prev_pict_types, PREV_PICT_TYPES_BUFFER_SIZE); + s->last_picture_ptr = REBASE_PICTURE(s1->last_picture_ptr, s, s1); + s->current_picture_ptr = REBASE_PICTURE(s1->current_picture_ptr, s, s1); + s->next_picture_ptr = REBASE_PICTURE(s1->next_picture_ptr, s, s1); - //Error/bug resilience + // Error/bug resilience s->next_p_frame_damaged = s1->next_p_frame_damaged; s->workaround_bugs = s1->workaround_bugs; - //MPEG4 timing info - memcpy(&s->time_increment_bits, &s1->time_increment_bits, (char*)&s1->shape - (char*)&s1->time_increment_bits); + // MPEG4 timing info + memcpy(&s->time_increment_bits, &s1->time_increment_bits, + (char *) &s1->shape - (char *) &s1->time_increment_bits); + + // B-frame info + s->max_b_frames = s1->max_b_frames; + s->low_delay = s1->low_delay; + s->dropable = s1->dropable; + + // DivX handling (doesn't work) + s->divx_packed = s1->divx_packed; + + if (s1->bitstream_buffer) { + if (s1->bitstream_buffer_size + + FF_INPUT_BUFFER_PADDING_SIZE > s->allocated_bitstream_buffer_size) + av_fast_malloc(&s->bitstream_buffer, + &s->allocated_bitstream_buffer_size, + s1->allocated_bitstream_buffer_size); + s->bitstream_buffer_size = s1->bitstream_buffer_size; + memcpy(s->bitstream_buffer, s1->bitstream_buffer, + s1->bitstream_buffer_size); + memset(s->bitstream_buffer + s->bitstream_buffer_size, 0, + FF_INPUT_BUFFER_PADDING_SIZE); + } + + // MPEG2/interlacing info + memcpy(&s->progressive_sequence, &s1->progressive_sequence, + (char *) &s1->rtp_mode - (char *) &s1->progressive_sequence); + + if (!s1->first_field) { + s->last_pict_type = s1->pict_type; + if (s1->current_picture_ptr) + s->last_lambda_for[s1->pict_type] = s1->current_picture_ptr->f.quality; - //B-frame info - s->max_b_frames = s1->max_b_frames; - s->low_delay = s1->low_delay; - s->dropable = s1->dropable; - - //DivX handling (doesn't work) - s->divx_packed = s1->divx_packed; - - if(s1->bitstream_buffer){ - if (s1->bitstream_buffer_size + FF_INPUT_BUFFER_PADDING_SIZE > s->allocated_bitstream_buffer_size) - av_fast_malloc(&s->bitstream_buffer, &s->allocated_bitstream_buffer_size, s1->allocated_bitstream_buffer_size); - s->bitstream_buffer_size = s1->bitstream_buffer_size; - memcpy(s->bitstream_buffer, s1->bitstream_buffer, s1->bitstream_buffer_size); - memset(s->bitstream_buffer+s->bitstream_buffer_size, 0, FF_INPUT_BUFFER_PADDING_SIZE); - } - - //MPEG2/interlacing info - memcpy(&s->progressive_sequence, &s1->progressive_sequence, (char*)&s1->rtp_mode - (char*)&s1->progressive_sequence); - - if(!s1->first_field){ - s->last_pict_type= s1->pict_type; - if (s1->current_picture_ptr) s->last_lambda_for[s1->pict_type] = s1->current_picture_ptr->quality; - - if(s1->pict_type!=FF_B_TYPE){ - s->last_non_b_pict_type= s1->pict_type; + if (s1->pict_type != AV_PICTURE_TYPE_B) { + s->last_non_b_pict_type = s1->pict_type; } } @@ -536,35 +612,42 @@ } /** - * sets the given MpegEncContext to common defaults (same for encoding and decoding). - * the changed fields will not depend upon the prior state of the MpegEncContext. + * Set the given MpegEncContext to common defaults + * (same for encoding and decoding). + * The changed fields will not depend upon the + * prior state of the MpegEncContext. */ -void MPV_common_defaults(MpegEncContext *s){ - s->y_dc_scale_table= - s->c_dc_scale_table= ff_mpeg1_dc_scale_table; - s->chroma_qscale_table= ff_default_chroma_qscale_table; - s->progressive_frame= 1; - s->progressive_sequence= 1; - s->picture_structure= PICT_FRAME; - - s->coded_picture_number = 0; - s->picture_number = 0; - s->input_picture_number = 0; +void MPV_common_defaults(MpegEncContext *s) +{ + s->y_dc_scale_table = + s->c_dc_scale_table = ff_mpeg1_dc_scale_table; + s->chroma_qscale_table = ff_default_chroma_qscale_table; + s->progressive_frame = 1; + s->progressive_sequence = 1; + s->picture_structure = PICT_FRAME; + + s->coded_picture_number = 0; + s->picture_number = 0; + s->input_picture_number = 0; s->picture_in_gop_number = 0; - s->f_code = 1; - s->b_code = 1; + s->f_code = 1; + s->b_code = 1; - s->picture_range_start = 0; - s->picture_range_end = MAX_PICTURE_COUNT; + s->picture_range_start = 0; + s->picture_range_end = MAX_PICTURE_COUNT; + + s->slice_context_count = 1; } /** - * sets the given MpegEncContext to defaults for decoding. - * the changed fields will not depend upon the prior state of the MpegEncContext. + * Set the given MpegEncContext to defaults for decoding. + * the changed fields will not depend upon + * the prior state of the MpegEncContext. */ -void MPV_decode_defaults(MpegEncContext *s){ +void MPV_decode_defaults(MpegEncContext *s) +{ MPV_common_defaults(s); } @@ -574,158 +657,212 @@ */ av_cold int MPV_common_init(MpegEncContext *s) { - int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y, threads; + int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y; + int nb_slices = (HAVE_THREADS && + s->avctx->active_thread_type & FF_THREAD_SLICE) ? + s->avctx->thread_count : 1; - if(s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence) + if (s->encoding && s->avctx->slices) + nb_slices = s->avctx->slices; + + if (s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence) s->mb_height = (s->height + 31) / 32 * 2; else if (s->codec_id != CODEC_ID_H264) s->mb_height = (s->height + 15) / 16; - if(s->avctx->pix_fmt == PIX_FMT_NONE){ - av_log(s->avctx, AV_LOG_ERROR, "decoding to PIX_FMT_NONE is not supported.\n"); + if (s->avctx->pix_fmt == PIX_FMT_NONE) { + av_log(s->avctx, AV_LOG_ERROR, + "decoding to PIX_FMT_NONE is not supported.\n"); return -1; } - if((s->encoding || (s->avctx->active_thread_type & FF_THREAD_SLICE)) && - (s->avctx->thread_count > MAX_THREADS || (s->avctx->thread_count > s->mb_height && s->mb_height))){ - av_log(s->avctx, AV_LOG_ERROR, "too many threads\n"); - return -1; + if (nb_slices > MAX_THREADS || (nb_slices > s->mb_height && s->mb_height)) { + int max_slices; + if (s->mb_height) + max_slices = FFMIN(MAX_THREADS, s->mb_height); + else + max_slices = MAX_THREADS; + av_log(s->avctx, AV_LOG_WARNING, "too many threads/slices (%d)," + " reducing to %d\n", nb_slices, max_slices); + nb_slices = max_slices; } - if((s->width || s->height) && av_image_check_size(s->width, s->height, 0, s->avctx)) + if ((s->width || s->height) && + av_image_check_size(s->width, s->height, 0, s->avctx)) return -1; - dsputil_init(&s->dsp, s->avctx); ff_dct_common_init(s); - s->flags= s->avctx->flags; - s->flags2= s->avctx->flags2; + s->flags = s->avctx->flags; + s->flags2 = s->avctx->flags2; if (s->width && s->height) { - s->mb_width = (s->width + 15) / 16; - s->mb_stride = s->mb_width + 1; - s->b8_stride = s->mb_width*2 + 1; - s->b4_stride = s->mb_width*4 + 1; - mb_array_size= s->mb_height * s->mb_stride; - mv_table_size= (s->mb_height+2) * s->mb_stride + 1; + s->mb_width = (s->width + 15) / 16; + s->mb_stride = s->mb_width + 1; + s->b8_stride = s->mb_width * 2 + 1; + s->b4_stride = s->mb_width * 4 + 1; + mb_array_size = s->mb_height * s->mb_stride; + mv_table_size = (s->mb_height + 2) * s->mb_stride + 1; /* set chroma shifts */ - avcodec_get_chroma_sub_sample(s->avctx->pix_fmt,&(s->chroma_x_shift), - &(s->chroma_y_shift) ); + avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &s->chroma_x_shift, + &s->chroma_y_shift); - /* set default edge pos, will be overriden in decode_header if needed */ - s->h_edge_pos= s->mb_width*16; - s->v_edge_pos= s->mb_height*16; - - s->mb_num = s->mb_width * s->mb_height; - - s->block_wrap[0]= - s->block_wrap[1]= - s->block_wrap[2]= - s->block_wrap[3]= s->b8_stride; - s->block_wrap[4]= - s->block_wrap[5]= s->mb_stride; - - y_size = s->b8_stride * (2 * s->mb_height + 1); - c_size = s->mb_stride * (s->mb_height + 1); - yc_size = y_size + 2 * c_size; + /* set default edge pos, will be overriden + * in decode_header if needed */ + s->h_edge_pos = s->mb_width * 16; + s->v_edge_pos = s->mb_height * 16; + + s->mb_num = s->mb_width * s->mb_height; + + s->block_wrap[0] = + s->block_wrap[1] = + s->block_wrap[2] = + s->block_wrap[3] = s->b8_stride; + s->block_wrap[4] = + s->block_wrap[5] = s->mb_stride; + + y_size = s->b8_stride * (2 * s->mb_height + 1); + c_size = s->mb_stride * (s->mb_height + 1); + yc_size = y_size + 2 * c_size; /* convert fourcc to upper case */ - s->codec_tag = ff_toupper4(s->avctx->codec_tag); + s->codec_tag = avpriv_toupper4(s->avctx->codec_tag); - s->stream_codec_tag = ff_toupper4(s->avctx->stream_codec_tag); + s->stream_codec_tag = avpriv_toupper4(s->avctx->stream_codec_tag); - s->avctx->coded_frame= (AVFrame*)&s->current_picture; + s->avctx->coded_frame = (AVFrame *)&s->current_picture; - FF_ALLOCZ_OR_GOTO(s->avctx, s->mb_index2xy, (s->mb_num+1)*sizeof(int), fail) //error ressilience code looks cleaner with this - for(y=0; ymb_height; y++){ - for(x=0; xmb_width; x++){ - s->mb_index2xy[ x + y*s->mb_width ] = x + y*s->mb_stride; - } - } - s->mb_index2xy[ s->mb_height*s->mb_width ] = (s->mb_height-1)*s->mb_stride + s->mb_width; //FIXME really needed? + FF_ALLOCZ_OR_GOTO(s->avctx, s->mb_index2xy, (s->mb_num + 1) * sizeof(int), + fail); // error ressilience code looks cleaner with this + for (y = 0; y < s->mb_height; y++) + for (x = 0; x < s->mb_width; x++) + s->mb_index2xy[x + y * s->mb_width] = x + y * s->mb_stride; + + s->mb_index2xy[s->mb_height * s->mb_width] = + (s->mb_height - 1) * s->mb_stride + s->mb_width; // FIXME really needed? if (s->encoding) { /* Allocate MV tables */ - FF_ALLOCZ_OR_GOTO(s->avctx, s->p_mv_table_base , mv_table_size * 2 * sizeof(int16_t), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->b_forw_mv_table_base , mv_table_size * 2 * sizeof(int16_t), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->b_back_mv_table_base , mv_table_size * 2 * sizeof(int16_t), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->b_bidir_forw_mv_table_base , mv_table_size * 2 * sizeof(int16_t), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->b_bidir_back_mv_table_base , mv_table_size * 2 * sizeof(int16_t), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->b_direct_mv_table_base , mv_table_size * 2 * sizeof(int16_t), fail) - s->p_mv_table = s->p_mv_table_base + s->mb_stride + 1; - s->b_forw_mv_table = s->b_forw_mv_table_base + s->mb_stride + 1; - s->b_back_mv_table = s->b_back_mv_table_base + s->mb_stride + 1; - s->b_bidir_forw_mv_table= s->b_bidir_forw_mv_table_base + s->mb_stride + 1; - s->b_bidir_back_mv_table= s->b_bidir_back_mv_table_base + s->mb_stride + 1; - s->b_direct_mv_table = s->b_direct_mv_table_base + s->mb_stride + 1; - - if(s->msmpeg4_version){ - FF_ALLOCZ_OR_GOTO(s->avctx, s->ac_stats, 2*2*(MAX_LEVEL+1)*(MAX_RUN+1)*2*sizeof(int), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->p_mv_table_base, + mv_table_size * 2 * sizeof(int16_t), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->b_forw_mv_table_base, + mv_table_size * 2 * sizeof(int16_t), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->b_back_mv_table_base, + mv_table_size * 2 * sizeof(int16_t), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->b_bidir_forw_mv_table_base, + mv_table_size * 2 * sizeof(int16_t), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->b_bidir_back_mv_table_base, + mv_table_size * 2 * sizeof(int16_t), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->b_direct_mv_table_base, + mv_table_size * 2 * sizeof(int16_t), fail); + s->p_mv_table = s->p_mv_table_base + + s->mb_stride + 1; + s->b_forw_mv_table = s->b_forw_mv_table_base + + s->mb_stride + 1; + s->b_back_mv_table = s->b_back_mv_table_base + + s->mb_stride + 1; + s->b_bidir_forw_mv_table = s->b_bidir_forw_mv_table_base + + s->mb_stride + 1; + s->b_bidir_back_mv_table = s->b_bidir_back_mv_table_base + + s->mb_stride + 1; + s->b_direct_mv_table = s->b_direct_mv_table_base + + s->mb_stride + 1; + + if (s->msmpeg4_version) { + FF_ALLOCZ_OR_GOTO(s->avctx, s->ac_stats, + 2 * 2 * (MAX_LEVEL + 1) * + (MAX_RUN + 1) * 2 * sizeof(int), fail); } FF_ALLOCZ_OR_GOTO(s->avctx, s->avctx->stats_out, 256, fail); /* Allocate MB type table */ - FF_ALLOCZ_OR_GOTO(s->avctx, s->mb_type , mb_array_size * sizeof(uint16_t), fail) //needed for encoding - - FF_ALLOCZ_OR_GOTO(s->avctx, s->lambda_table, mb_array_size * sizeof(int), fail) + FF_ALLOCZ_OR_GOTO(s->avctx, s->mb_type, mb_array_size * + sizeof(uint16_t), fail); // needed for encoding - FF_ALLOCZ_OR_GOTO(s->avctx, s->q_intra_matrix , 64*32 * sizeof(int), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->q_inter_matrix , 64*32 * sizeof(int), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->q_intra_matrix16, 64*32*2 * sizeof(uint16_t), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->q_inter_matrix16, 64*32*2 * sizeof(uint16_t), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->input_picture, MAX_PICTURE_COUNT * sizeof(Picture*), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->reordered_input_picture, MAX_PICTURE_COUNT * sizeof(Picture*), fail) + FF_ALLOCZ_OR_GOTO(s->avctx, s->lambda_table, mb_array_size * + sizeof(int), fail); - if(s->avctx->noise_reduction){ - FF_ALLOCZ_OR_GOTO(s->avctx, s->dct_offset, 2 * 64 * sizeof(uint16_t), fail) + FF_ALLOCZ_OR_GOTO(s->avctx, s->q_intra_matrix, + 64 * 32 * sizeof(int), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->q_inter_matrix, + 64 * 32 * sizeof(int), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->q_intra_matrix16, + 64 * 32 * 2 * sizeof(uint16_t), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->q_inter_matrix16, + 64 * 32 * 2 * sizeof(uint16_t), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->input_picture, + MAX_PICTURE_COUNT * sizeof(Picture *), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->reordered_input_picture, + MAX_PICTURE_COUNT * sizeof(Picture *), fail); + + if (s->avctx->noise_reduction) { + FF_ALLOCZ_OR_GOTO(s->avctx, s->dct_offset, + 2 * 64 * sizeof(uint16_t), fail); } } } s->picture_count = MAX_PICTURE_COUNT * FFMAX(1, s->avctx->thread_count); - FF_ALLOCZ_OR_GOTO(s->avctx, s->picture, s->picture_count * sizeof(Picture), fail) - for(i = 0; i < s->picture_count; i++) { - avcodec_get_frame_defaults((AVFrame *)&s->picture[i]); + FF_ALLOCZ_OR_GOTO(s->avctx, s->picture, + s->picture_count * sizeof(Picture), fail); + for (i = 0; i < s->picture_count; i++) { + avcodec_get_frame_defaults((AVFrame *) &s->picture[i]); } if (s->width && s->height) { - FF_ALLOCZ_OR_GOTO(s->avctx, s->error_status_table, mb_array_size*sizeof(uint8_t), fail) + FF_ALLOCZ_OR_GOTO(s->avctx, s->error_status_table, + mb_array_size * sizeof(uint8_t), fail); - if(s->codec_id==CODEC_ID_MPEG4 || (s->flags & CODEC_FLAG_INTERLACED_ME)){ + if (s->codec_id == CODEC_ID_MPEG4 || + (s->flags & CODEC_FLAG_INTERLACED_ME)) { /* interlaced direct mode decoding tables */ - for(i=0; i<2; i++){ + for (i = 0; i < 2; i++) { int j, k; - for(j=0; j<2; j++){ - for(k=0; k<2; k++){ - FF_ALLOCZ_OR_GOTO(s->avctx, s->b_field_mv_table_base[i][j][k], mv_table_size * 2 * sizeof(int16_t), fail) - s->b_field_mv_table[i][j][k] = s->b_field_mv_table_base[i][j][k] + s->mb_stride + 1; - } - FF_ALLOCZ_OR_GOTO(s->avctx, s->b_field_select_table [i][j], mb_array_size * 2 * sizeof(uint8_t), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->p_field_mv_table_base[i][j], mv_table_size * 2 * sizeof(int16_t), fail) - s->p_field_mv_table[i][j] = s->p_field_mv_table_base[i][j]+ s->mb_stride + 1; + for (j = 0; j < 2; j++) { + for (k = 0; k < 2; k++) { + FF_ALLOCZ_OR_GOTO(s->avctx, + s->b_field_mv_table_base[i][j][k], + mv_table_size * 2 * sizeof(int16_t), + fail); + s->b_field_mv_table[i][j][k] = s->b_field_mv_table_base[i][j][k] + + s->mb_stride + 1; + } + FF_ALLOCZ_OR_GOTO(s->avctx, s->b_field_select_table [i][j], + mb_array_size * 2 * sizeof(uint8_t), + fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->p_field_mv_table_base[i][j], + mv_table_size * 2 * sizeof(int16_t), + fail); + s->p_field_mv_table[i][j] = s->p_field_mv_table_base[i][j] + + s->mb_stride + 1; } - FF_ALLOCZ_OR_GOTO(s->avctx, s->p_field_select_table[i], mb_array_size * 2 * sizeof(uint8_t), fail) + FF_ALLOCZ_OR_GOTO(s->avctx, s->p_field_select_table[i], + mb_array_size * 2 * sizeof(uint8_t), + fail); } } if (s->out_format == FMT_H263) { /* cbp values */ FF_ALLOCZ_OR_GOTO(s->avctx, s->coded_block_base, y_size, fail); - s->coded_block= s->coded_block_base + s->b8_stride + 1; + s->coded_block = s->coded_block_base + s->b8_stride + 1; /* cbp, ac_pred, pred_dir */ - FF_ALLOCZ_OR_GOTO(s->avctx, s->cbp_table , mb_array_size * sizeof(uint8_t), fail) - FF_ALLOCZ_OR_GOTO(s->avctx, s->pred_dir_table, mb_array_size * sizeof(uint8_t), fail) + FF_ALLOCZ_OR_GOTO(s->avctx, s->cbp_table, + mb_array_size * sizeof(uint8_t), fail); + FF_ALLOCZ_OR_GOTO(s->avctx, s->pred_dir_table, + mb_array_size * sizeof(uint8_t), fail); } if (s->h263_pred || s->h263_plus || !s->encoding) { /* dc values */ - //MN: we need these for error resilience of intra-frames - FF_ALLOCZ_OR_GOTO(s->avctx, s->dc_val_base, yc_size * sizeof(int16_t), fail); + // MN: we need these for error resilience of intra-frames + FF_ALLOCZ_OR_GOTO(s->avctx, s->dc_val_base, + yc_size * sizeof(int16_t), fail); s->dc_val[0] = s->dc_val_base + s->b8_stride + 1; s->dc_val[1] = s->dc_val_base + y_size + s->mb_stride + 1; s->dc_val[2] = s->dc_val[1] + c_size; - for(i=0;idc_val_base[i] = 1024; } @@ -734,41 +871,46 @@ memset(s->mbintra_table, 1, mb_array_size); /* init macroblock skip table */ - FF_ALLOCZ_OR_GOTO(s->avctx, s->mbskip_table, mb_array_size+2, fail); - //Note the +1 is for a quicker mpeg4 slice_end detection - FF_ALLOCZ_OR_GOTO(s->avctx, s->prev_pict_types, PREV_PICT_TYPES_BUFFER_SIZE, fail); - - s->parse_context.state= -1; - if((s->avctx->debug&(FF_DEBUG_VIS_QP|FF_DEBUG_VIS_MB_TYPE)) || (s->avctx->debug_mv)){ - s->visualization_buffer[0] = av_malloc((s->mb_width*16 + 2*EDGE_WIDTH) * s->mb_height*16 + 2*EDGE_WIDTH); - s->visualization_buffer[1] = av_malloc((s->mb_width*16 + 2*EDGE_WIDTH) * s->mb_height*16 + 2*EDGE_WIDTH); - s->visualization_buffer[2] = av_malloc((s->mb_width*16 + 2*EDGE_WIDTH) * s->mb_height*16 + 2*EDGE_WIDTH); + FF_ALLOCZ_OR_GOTO(s->avctx, s->mbskip_table, mb_array_size + 2, fail); + // Note the + 1 is for a quicker mpeg4 slice_end detection + + s->parse_context.state = -1; + if ((s->avctx->debug & (FF_DEBUG_VIS_QP | FF_DEBUG_VIS_MB_TYPE)) || + s->avctx->debug_mv) { + s->visualization_buffer[0] = av_malloc((s->mb_width * 16 + + 2 * EDGE_WIDTH) * s->mb_height * 16 + 2 * EDGE_WIDTH); + s->visualization_buffer[1] = av_malloc((s->mb_width * 16 + + 2 * EDGE_WIDTH) * s->mb_height * 16 + 2 * EDGE_WIDTH); + s->visualization_buffer[2] = av_malloc((s->mb_width * 16 + + 2 * EDGE_WIDTH) * s->mb_height * 16 + 2 * EDGE_WIDTH); } } s->context_initialized = 1; - s->thread_context[0]= s; + s->thread_context[0] = s; if (s->width && s->height) { - if (s->encoding || (HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_SLICE)) { - threads = s->avctx->thread_count; - - for(i=1; ithread_context[i]= av_malloc(sizeof(MpegEncContext)); - memcpy(s->thread_context[i], s, sizeof(MpegEncContext)); - } + if (nb_slices > 1) { + for (i = 1; i < nb_slices; i++) { + s->thread_context[i] = av_malloc(sizeof(MpegEncContext)); + memcpy(s->thread_context[i], s, sizeof(MpegEncContext)); + } - for(i=0; ithread_context[i], s) < 0) + for (i = 0; i < nb_slices; i++) { + if (init_duplicate_context(s->thread_context[i], s) < 0) + goto fail; + s->thread_context[i]->start_mb_y = + (s->mb_height * (i) + nb_slices / 2) / nb_slices; + s->thread_context[i]->end_mb_y = + (s->mb_height * (i + 1) + nb_slices / 2) / nb_slices; + } + } else { + if (init_duplicate_context(s, s) < 0) goto fail; - s->thread_context[i]->start_mb_y= (s->mb_height*(i ) + s->avctx->thread_count/2) / s->avctx->thread_count; - s->thread_context[i]->end_mb_y = (s->mb_height*(i+1) + s->avctx->thread_count/2) / s->avctx->thread_count; + s->start_mb_y = 0; + s->end_mb_y = s->mb_height; } - } else { - if(init_duplicate_context(s, s) < 0) goto fail; - s->start_mb_y = 0; - s->end_mb_y = s->mb_height; - } + s->slice_context_count = nb_slices; } return 0; @@ -782,17 +924,18 @@ { int i, j, k; - if (s->encoding || (HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_SLICE)) { - for(i=0; iavctx->thread_count; i++){ + if (s->slice_context_count > 1) { + for (i = 0; i < s->slice_context_count; i++) { free_duplicate_context(s->thread_context[i]); } - for(i=1; iavctx->thread_count; i++){ + for (i = 1; i < s->slice_context_count; i++) { av_freep(&s->thread_context[i]); } + s->slice_context_count = 1; } else free_duplicate_context(s); av_freep(&s->parse_context.buffer); - s->parse_context.buffer_size=0; + s->parse_context.buffer_size = 0; av_freep(&s->mb_type); av_freep(&s->p_mv_table_base); @@ -801,21 +944,21 @@ av_freep(&s->b_bidir_forw_mv_table_base); av_freep(&s->b_bidir_back_mv_table_base); av_freep(&s->b_direct_mv_table_base); - s->p_mv_table= NULL; - s->b_forw_mv_table= NULL; - s->b_back_mv_table= NULL; - s->b_bidir_forw_mv_table= NULL; - s->b_bidir_back_mv_table= NULL; - s->b_direct_mv_table= NULL; - for(i=0; i<2; i++){ - for(j=0; j<2; j++){ - for(k=0; k<2; k++){ + s->p_mv_table = NULL; + s->b_forw_mv_table = NULL; + s->b_back_mv_table = NULL; + s->b_bidir_forw_mv_table = NULL; + s->b_bidir_back_mv_table = NULL; + s->b_direct_mv_table = NULL; + for (i = 0; i < 2; i++) { + for (j = 0; j < 2; j++) { + for (k = 0; k < 2; k++) { av_freep(&s->b_field_mv_table_base[i][j][k]); - s->b_field_mv_table[i][j][k]=NULL; + s->b_field_mv_table[i][j][k] = NULL; } av_freep(&s->b_field_select_table[i][j]); av_freep(&s->p_field_mv_table_base[i][j]); - s->p_field_mv_table[i][j]=NULL; + s->p_field_mv_table[i][j] = NULL; } av_freep(&s->p_field_select_table[i]); } @@ -827,9 +970,8 @@ av_freep(&s->pred_dir_table); av_freep(&s->mbskip_table); - av_freep(&s->prev_pict_types); av_freep(&s->bitstream_buffer); - s->allocated_bitstream_buffer_size=0; + s->allocated_bitstream_buffer_size = 0; av_freep(&s->avctx->stats_out); av_freep(&s->ac_stats); @@ -844,37 +986,38 @@ av_freep(&s->reordered_input_picture); av_freep(&s->dct_offset); - if(s->picture && !s->avctx->is_copy){ - for(i=0; ipicture_count; i++){ + if (s->picture && !s->avctx->internal->is_copy) { + for (i = 0; i < s->picture_count; i++) { free_picture(s, &s->picture[i]); } } av_freep(&s->picture); - s->context_initialized = 0; - s->last_picture_ptr= - s->next_picture_ptr= - s->current_picture_ptr= NULL; - s->linesize= s->uvlinesize= 0; + s->context_initialized = 0; + s->last_picture_ptr = + s->next_picture_ptr = + s->current_picture_ptr = NULL; + s->linesize = s->uvlinesize = 0; - for(i=0; i<3; i++) + for (i = 0; i < 3; i++) av_freep(&s->visualization_buffer[i]); - if(!(s->avctx->active_thread_type&FF_THREAD_FRAME)) + if (!(s->avctx->active_thread_type & FF_THREAD_FRAME)) avcodec_default_free_buffers(s->avctx); } -void init_rl(RLTable *rl, uint8_t static_store[2][2*MAX_RUN + MAX_LEVEL + 3]) +void init_rl(RLTable *rl, + uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3]) { - int8_t max_level[MAX_RUN+1], max_run[MAX_LEVEL+1]; - uint8_t index_run[MAX_RUN+1]; + int8_t max_level[MAX_RUN + 1], max_run[MAX_LEVEL + 1]; + uint8_t index_run[MAX_RUN + 1]; int last, run, level, start, end, i; /* If table is static, we can quit if rl->max_level[0] is not NULL */ - if(static_store && rl->max_level[0]) + if (static_store && rl->max_level[0]) return; /* compute max_level[], max_run[] and index_run[] */ - for(last=0;last<2;last++) { + for (last = 0; last < 2; last++) { if (last == 0) { start = 0; end = rl->last; @@ -886,8 +1029,8 @@ memset(max_level, 0, MAX_RUN + 1); memset(max_run, 0, MAX_LEVEL + 1); memset(index_run, rl->n, MAX_RUN + 1); - for(i=start;itable_run[i]; + for (i = start; i < end; i++) { + run = rl->table_run[i]; level = rl->table_level[i]; if (index_run[run] == rl->n) index_run[run] = i; @@ -896,17 +1039,17 @@ if (run > max_run[level]) max_run[level] = run; } - if(static_store) + if (static_store) rl->max_level[last] = static_store[last]; else rl->max_level[last] = av_malloc(MAX_RUN + 1); memcpy(rl->max_level[last], max_level, MAX_RUN + 1); - if(static_store) - rl->max_run[last] = static_store[last] + MAX_RUN + 1; + if (static_store) + rl->max_run[last] = static_store[last] + MAX_RUN + 1; else - rl->max_run[last] = av_malloc(MAX_LEVEL + 1); + rl->max_run[last] = av_malloc(MAX_LEVEL + 1); memcpy(rl->max_run[last], max_run, MAX_LEVEL + 1); - if(static_store) + if (static_store) rl->index_run[last] = static_store[last] + MAX_RUN + MAX_LEVEL + 2; else rl->index_run[last] = av_malloc(MAX_RUN + 1); @@ -918,108 +1061,104 @@ { int i, q; - for(q=0; q<32; q++){ - int qmul= q*2; - int qadd= (q-1)|1; - - if(q==0){ - qmul=1; - qadd=0; - } - for(i=0; ivlc.table_size; i++){ - int code= rl->vlc.table[i][0]; - int len = rl->vlc.table[i][1]; + for (q = 0; q < 32; q++) { + int qmul = q * 2; + int qadd = (q - 1) | 1; + + if (q == 0) { + qmul = 1; + qadd = 0; + } + for (i = 0; i < rl->vlc.table_size; i++) { + int code = rl->vlc.table[i][0]; + int len = rl->vlc.table[i][1]; int level, run; - if(len==0){ // illegal code - run= 66; - level= MAX_LEVEL; - }else if(len<0){ //more bits needed - run= 0; - level= code; - }else{ - if(code==rl->n){ //esc - run= 66; - level= 0; - }else{ - run= rl->table_run [code] + 1; - level= rl->table_level[code] * qmul + qadd; - if(code >= rl->last) run+=192; + if (len == 0) { // illegal code + run = 66; + level = MAX_LEVEL; + } else if (len < 0) { // more bits needed + run = 0; + level = code; + } else { + if (code == rl->n) { // esc + run = 66; + level = 0; + } else { + run = rl->table_run[code] + 1; + level = rl->table_level[code] * qmul + qadd; + if (code >= rl->last) run += 192; } } - rl->rl_vlc[q][i].len= len; - rl->rl_vlc[q][i].level= level; - rl->rl_vlc[q][i].run= run; + rl->rl_vlc[q][i].len = len; + rl->rl_vlc[q][i].level = level; + rl->rl_vlc[q][i].run = run; } } } -void ff_release_unused_pictures(MpegEncContext *s, int remove_current) +void ff_release_unused_pictures(MpegEncContext*s, int remove_current) { int i; /* release non reference frames */ - for(i=0; ipicture_count; i++){ - if(s->picture[i].data[0] && !s->picture[i].reference - && (!s->picture[i].owner2 || s->picture[i].owner2 == s) - && (remove_current || &s->picture[i] != s->current_picture_ptr) - /*&& s->picture[i].type!=FF_BUFFER_TYPE_SHARED*/){ + for (i = 0; i < s->picture_count; i++) { + if (s->picture[i].f.data[0] && !s->picture[i].f.reference && + (!s->picture[i].owner2 || s->picture[i].owner2 == s) && + (remove_current || &s->picture[i] != s->current_picture_ptr) + /* && s->picture[i].type!= FF_BUFFER_TYPE_SHARED */) { free_frame_buffer(s, &s->picture[i]); } } } -int ff_find_unused_picture(MpegEncContext *s, int shared){ +int ff_find_unused_picture(MpegEncContext *s, int shared) +{ int i; - if(shared){ - for(i=s->picture_range_start; ipicture_range_end; i++){ - if(s->picture[i].data[0]==NULL && s->picture[i].type==0) return i; + if (shared) { + for (i = s->picture_range_start; i < s->picture_range_end; i++) { + if (s->picture[i].f.data[0] == NULL && s->picture[i].f.type == 0) + return i; } - }else{ - for(i=s->picture_range_start; ipicture_range_end; i++){ - if(s->picture[i].data[0]==NULL && s->picture[i].type!=0) return i; //FIXME + } else { + for (i = s->picture_range_start; i < s->picture_range_end; i++) { + if (s->picture[i].f.data[0] == NULL && s->picture[i].f.type != 0) + return i; // FIXME } - for(i=s->picture_range_start; ipicture_range_end; i++){ - if(s->picture[i].data[0]==NULL) return i; + for (i = s->picture_range_start; i < s->picture_range_end; i++) { + if (s->picture[i].f.data[0] == NULL) + return i; } } - av_log(s->avctx, AV_LOG_FATAL, "Internal error, picture buffer overflow\n"); - /* We could return -1, but the codec would crash trying to draw into a - * non-existing frame anyway. This is safer than waiting for a random crash. - * Also the return of this is never useful, an encoder must only allocate - * as much as allowed in the specification. This has no relationship to how - * much libavcodec could allocate (and MAX_PICTURE_COUNT is always large - * enough for such valid streams). - * Plus, a decoder has to check stream validity and remove frames if too - * many reference frames are around. Waiting for "OOM" is not correct at - * all. Similarly, missing reference frames have to be replaced by - * interpolated/MC frames, anything else is a bug in the codec ... - */ - abort(); - return -1; + return AVERROR_INVALIDDATA; } -static void update_noise_reduction(MpegEncContext *s){ +static void update_noise_reduction(MpegEncContext *s) +{ int intra, i; - for(intra=0; intra<2; intra++){ - if(s->dct_count[intra] > (1<<16)){ - for(i=0; i<64; i++){ - s->dct_error_sum[intra][i] >>=1; + for (intra = 0; intra < 2; intra++) { + if (s->dct_count[intra] > (1 << 16)) { + for (i = 0; i < 64; i++) { + s->dct_error_sum[intra][i] >>= 1; } s->dct_count[intra] >>= 1; } - for(i=0; i<64; i++){ - s->dct_offset[intra][i]= (s->avctx->noise_reduction * s->dct_count[intra] + s->dct_error_sum[intra][i]/2) / (s->dct_error_sum[intra][i]+1); + for (i = 0; i < 64; i++) { + s->dct_offset[intra][i] = (s->avctx->noise_reduction * + s->dct_count[intra] + + s->dct_error_sum[intra][i] / 2) / + (s->dct_error_sum[intra][i] + 1); } } } /** - * generic function for encode/decode called after coding/decoding the header and before a frame is coded/decoded + * generic function for encode/decode called after coding/decoding + * the header and before a frame is coded/decoded. */ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) { @@ -1027,291 +1166,341 @@ Picture *pic; s->mb_skipped = 0; - assert(s->last_picture_ptr==NULL || s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3); + assert(s->last_picture_ptr == NULL || s->out_format != FMT_H264 || + s->codec_id == CODEC_ID_SVQ3); - /* mark&release old frames */ - if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr && s->last_picture_ptr != s->next_picture_ptr && s->last_picture_ptr->data[0]) { - if(s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3){ - free_frame_buffer(s, s->last_picture_ptr); + /* mark & release old frames */ + if (s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3) { + if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr && + s->last_picture_ptr != s->next_picture_ptr && + s->last_picture_ptr->f.data[0]) { + if (s->last_picture_ptr->owner2 == s) + free_frame_buffer(s, s->last_picture_ptr); + } /* release forgotten pictures */ - /* if(mpeg124/h263) */ - if(!s->encoding){ - for(i=0; ipicture_count; i++){ - if(s->picture[i].data[0] && &s->picture[i] != s->next_picture_ptr && s->picture[i].reference){ - av_log(avctx, AV_LOG_ERROR, "releasing zombie picture\n"); + /* if (mpeg124/h263) */ + if (!s->encoding) { + for (i = 0; i < s->picture_count; i++) { + if (s->picture[i].owner2 == s && s->picture[i].f.data[0] && + &s->picture[i] != s->last_picture_ptr && + &s->picture[i] != s->next_picture_ptr && + s->picture[i].f.reference) { + if (!(avctx->active_thread_type & FF_THREAD_FRAME)) + av_log(avctx, AV_LOG_ERROR, + "releasing zombie picture\n"); free_frame_buffer(s, &s->picture[i]); } } } - } } - if(!s->encoding){ + if (!s->encoding) { ff_release_unused_pictures(s, 1); - if(s->current_picture_ptr && s->current_picture_ptr->data[0]==NULL) - pic= s->current_picture_ptr; //we already have a unused image (maybe it was set before reading the header) - else{ - i= ff_find_unused_picture(s, 0); - pic= &s->picture[i]; + if (s->current_picture_ptr && + s->current_picture_ptr->f.data[0] == NULL) { + // we already have a unused image + // (maybe it was set before reading the header) + pic = s->current_picture_ptr; + } else { + i = ff_find_unused_picture(s, 0); + pic = &s->picture[i]; } - pic->reference= 0; - if (!s->dropable){ + pic->f.reference = 0; + if (!s->dropable) { if (s->codec_id == CODEC_ID_H264) - pic->reference = s->picture_structure; + pic->f.reference = s->picture_structure; else if (s->pict_type != AV_PICTURE_TYPE_B) - pic->reference = 3; + pic->f.reference = 3; } - pic->coded_picture_number= s->coded_picture_number++; + pic->f.coded_picture_number = s->coded_picture_number++; - if(ff_alloc_picture(s, pic, 0) < 0) + if (ff_alloc_picture(s, pic, 0) < 0) return -1; - s->current_picture_ptr= pic; - //FIXME use only the vars from current_pic - s->current_picture_ptr->top_field_first= s->top_field_first; - if(s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO) { - if(s->picture_structure != PICT_FRAME) - s->current_picture_ptr->top_field_first= (s->picture_structure == PICT_TOP_FIELD) == s->first_field; - } - s->current_picture_ptr->interlaced_frame= !s->progressive_frame && !s->progressive_sequence; - s->current_picture_ptr->field_picture= s->picture_structure != PICT_FRAME; - } - - s->current_picture_ptr->pict_type= s->pict_type; -// if(s->flags && CODEC_FLAG_QSCALE) - // s->current_picture_ptr->quality= s->new_picture_ptr->quality; - s->current_picture_ptr->key_frame= s->pict_type == AV_PICTURE_TYPE_I; + s->current_picture_ptr = pic; + // FIXME use only the vars from current_pic + s->current_picture_ptr->f.top_field_first = s->top_field_first; + if (s->codec_id == CODEC_ID_MPEG1VIDEO || + s->codec_id == CODEC_ID_MPEG2VIDEO) { + if (s->picture_structure != PICT_FRAME) + s->current_picture_ptr->f.top_field_first = + (s->picture_structure == PICT_TOP_FIELD) == s->first_field; + } + s->current_picture_ptr->f.interlaced_frame = !s->progressive_frame && + !s->progressive_sequence; + s->current_picture_ptr->field_picture = s->picture_structure != PICT_FRAME; + } + + s->current_picture_ptr->f.pict_type = s->pict_type; + // if (s->flags && CODEC_FLAG_QSCALE) + // s->current_picture_ptr->quality = s->new_picture_ptr->quality; + s->current_picture_ptr->f.key_frame = s->pict_type == AV_PICTURE_TYPE_I; ff_copy_picture(&s->current_picture, s->current_picture_ptr); if (s->pict_type != AV_PICTURE_TYPE_B) { - s->last_picture_ptr= s->next_picture_ptr; - if(!s->dropable) - s->next_picture_ptr= s->current_picture_ptr; - } -/* av_log(s->avctx, AV_LOG_DEBUG, "L%p N%p C%p L%p N%p C%p type:%d drop:%d\n", s->last_picture_ptr, s->next_picture_ptr,s->current_picture_ptr, - s->last_picture_ptr ? s->last_picture_ptr->data[0] : NULL, - s->next_picture_ptr ? s->next_picture_ptr->data[0] : NULL, - s->current_picture_ptr ? s->current_picture_ptr->data[0] : NULL, - s->pict_type, s->dropable);*/ - - if(s->codec_id != CODEC_ID_H264){ - if((s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL) && - (s->pict_type!=AV_PICTURE_TYPE_I || s->picture_structure != PICT_FRAME)){ + s->last_picture_ptr = s->next_picture_ptr; + if (!s->dropable) + s->next_picture_ptr = s->current_picture_ptr; + } + /* av_log(s->avctx, AV_LOG_DEBUG, "L%p N%p C%p L%p N%p C%p type:%d drop:%d\n", + s->last_picture_ptr, s->next_picture_ptr,s->current_picture_ptr, + s->last_picture_ptr ? s->last_picture_ptr->f.data[0] : NULL, + s->next_picture_ptr ? s->next_picture_ptr->f.data[0] : NULL, + s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL, + s->pict_type, s->dropable); */ + + if (s->codec_id != CODEC_ID_H264) { + if ((s->last_picture_ptr == NULL || + s->last_picture_ptr->f.data[0] == NULL) && + (s->pict_type != AV_PICTURE_TYPE_I || + s->picture_structure != PICT_FRAME)) { if (s->pict_type != AV_PICTURE_TYPE_I) - av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n"); + av_log(avctx, AV_LOG_ERROR, + "warning: first frame is no keyframe\n"); else if (s->picture_structure != PICT_FRAME) - av_log(avctx, AV_LOG_INFO, "allocate dummy last picture for field based first keyframe\n"); + av_log(avctx, AV_LOG_INFO, + "allocate dummy last picture for field based first keyframe\n"); /* Allocate a dummy frame */ - i= ff_find_unused_picture(s, 0); - s->last_picture_ptr= &s->picture[i]; - if(ff_alloc_picture(s, s->last_picture_ptr, 0) < 0) + i = ff_find_unused_picture(s, 0); + s->last_picture_ptr = &s->picture[i]; + if (ff_alloc_picture(s, s->last_picture_ptr, 0) < 0) return -1; - ff_thread_report_progress((AVFrame*)s->last_picture_ptr, INT_MAX, 0); - ff_thread_report_progress((AVFrame*)s->last_picture_ptr, INT_MAX, 1); - } - if((s->next_picture_ptr==NULL || s->next_picture_ptr->data[0]==NULL) && s->pict_type==AV_PICTURE_TYPE_B){ + ff_thread_report_progress((AVFrame *) s->last_picture_ptr, + INT_MAX, 0); + ff_thread_report_progress((AVFrame *) s->last_picture_ptr, + INT_MAX, 1); + } + if ((s->next_picture_ptr == NULL || + s->next_picture_ptr->f.data[0] == NULL) && + s->pict_type == AV_PICTURE_TYPE_B) { /* Allocate a dummy frame */ - i= ff_find_unused_picture(s, 0); - s->next_picture_ptr= &s->picture[i]; - if(ff_alloc_picture(s, s->next_picture_ptr, 0) < 0) + i = ff_find_unused_picture(s, 0); + s->next_picture_ptr = &s->picture[i]; + if (ff_alloc_picture(s, s->next_picture_ptr, 0) < 0) return -1; - ff_thread_report_progress((AVFrame*)s->next_picture_ptr, INT_MAX, 0); - ff_thread_report_progress((AVFrame*)s->next_picture_ptr, INT_MAX, 1); + ff_thread_report_progress((AVFrame *) s->next_picture_ptr, + INT_MAX, 0); + ff_thread_report_progress((AVFrame *) s->next_picture_ptr, + INT_MAX, 1); } } - if(s->last_picture_ptr) ff_copy_picture(&s->last_picture, s->last_picture_ptr); - if(s->next_picture_ptr) ff_copy_picture(&s->next_picture, s->next_picture_ptr); + if (s->last_picture_ptr) + ff_copy_picture(&s->last_picture, s->last_picture_ptr); + if (s->next_picture_ptr) + ff_copy_picture(&s->next_picture, s->next_picture_ptr); + + if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME) && + (s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3)) { + if (s->next_picture_ptr) + s->next_picture_ptr->owner2 = s; + if (s->last_picture_ptr) + s->last_picture_ptr->owner2 = s; + } - assert(s->pict_type == AV_PICTURE_TYPE_I || (s->last_picture_ptr && s->last_picture_ptr->data[0])); + assert(s->pict_type == AV_PICTURE_TYPE_I || (s->last_picture_ptr && + s->last_picture_ptr->f.data[0])); - if(s->picture_structure!=PICT_FRAME && s->out_format != FMT_H264){ + if (s->picture_structure!= PICT_FRAME && s->out_format != FMT_H264) { int i; - for(i=0; i<4; i++){ - if(s->picture_structure == PICT_BOTTOM_FIELD){ - s->current_picture.data[i] += s->current_picture.linesize[i]; + for (i = 0; i < 4; i++) { + if (s->picture_structure == PICT_BOTTOM_FIELD) { + s->current_picture.f.data[i] += + s->current_picture.f.linesize[i]; } - s->current_picture.linesize[i] *= 2; - s->last_picture.linesize[i] *=2; - s->next_picture.linesize[i] *=2; + s->current_picture.f.linesize[i] *= 2; + s->last_picture.f.linesize[i] *= 2; + s->next_picture.f.linesize[i] *= 2; } } - s->error_recognition= avctx->error_recognition; + s->err_recognition = avctx->err_recognition; - /* set dequantizer, we can't do it during init as it might change for mpeg4 - and we can't do it in the header decode as init is not called for mpeg4 there yet */ - if(s->mpeg_quant || s->codec_id == CODEC_ID_MPEG2VIDEO){ + /* set dequantizer, we can't do it during init as + * it might change for mpeg4 and we can't do it in the header + * decode as init is not called for mpeg4 there yet */ + if (s->mpeg_quant || s->codec_id == CODEC_ID_MPEG2VIDEO) { s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra; s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter; - }else if(s->out_format == FMT_H263 || s->out_format == FMT_H261){ + } else if (s->out_format == FMT_H263 || s->out_format == FMT_H261) { s->dct_unquantize_intra = s->dct_unquantize_h263_intra; s->dct_unquantize_inter = s->dct_unquantize_h263_inter; - }else{ + } else { s->dct_unquantize_intra = s->dct_unquantize_mpeg1_intra; s->dct_unquantize_inter = s->dct_unquantize_mpeg1_inter; } - if(s->dct_error_sum){ + if (s->dct_error_sum) { assert(s->avctx->noise_reduction && s->encoding); - update_noise_reduction(s); } - if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) + if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) return ff_xvmc_field_start(s, avctx); return 0; } -/* generic function for encode/decode called after a frame has been coded/decoded */ +/* generic function for encode/decode called after a + * frame has been coded/decoded. */ void MPV_frame_end(MpegEncContext *s) { int i; /* redraw edges for the frame if decoding didn't complete */ - //just to make sure that all data is rendered. - if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration){ + // just to make sure that all data is rendered. + if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) { ff_xvmc_field_end(s); - }else if((s->error_count || s->encoding) - && !s->avctx->hwaccel - && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) - && s->unrestricted_mv - && s->current_picture.reference - && !s->intra_only - && !(s->flags&CODEC_FLAG_EMU_EDGE)) { - int hshift = av_pix_fmt_descriptors[s->avctx->pix_fmt].log2_chroma_w; - int vshift = av_pix_fmt_descriptors[s->avctx->pix_fmt].log2_chroma_h; - s->dsp.draw_edges(s->current_picture.data[0], s->linesize , - s->h_edge_pos , s->v_edge_pos, - EDGE_WIDTH , EDGE_WIDTH , EDGE_TOP | EDGE_BOTTOM); - s->dsp.draw_edges(s->current_picture.data[1], s->uvlinesize, - s->h_edge_pos>>hshift, s->v_edge_pos>>vshift, - EDGE_WIDTH>>hshift, EDGE_WIDTH>>vshift, EDGE_TOP | EDGE_BOTTOM); - s->dsp.draw_edges(s->current_picture.data[2], s->uvlinesize, - s->h_edge_pos>>hshift, s->v_edge_pos>>vshift, - EDGE_WIDTH>>hshift, EDGE_WIDTH>>vshift, EDGE_TOP | EDGE_BOTTOM); + } else if ((s->error_count || s->encoding) && + !s->avctx->hwaccel && + !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) && + s->unrestricted_mv && + s->current_picture.f.reference && + !s->intra_only && + !(s->flags & CODEC_FLAG_EMU_EDGE)) { + int hshift = av_pix_fmt_descriptors[s->avctx->pix_fmt].log2_chroma_w; + int vshift = av_pix_fmt_descriptors[s->avctx->pix_fmt].log2_chroma_h; + s->dsp.draw_edges(s->current_picture.f.data[0], s->linesize, + s->h_edge_pos, s->v_edge_pos, + EDGE_WIDTH, EDGE_WIDTH, + EDGE_TOP | EDGE_BOTTOM); + s->dsp.draw_edges(s->current_picture.f.data[1], s->uvlinesize, + s->h_edge_pos >> hshift, s->v_edge_pos >> vshift, + EDGE_WIDTH >> hshift, EDGE_WIDTH >> vshift, + EDGE_TOP | EDGE_BOTTOM); + s->dsp.draw_edges(s->current_picture.f.data[2], s->uvlinesize, + s->h_edge_pos >> hshift, s->v_edge_pos >> vshift, + EDGE_WIDTH >> hshift, EDGE_WIDTH >> vshift, + EDGE_TOP | EDGE_BOTTOM); } emms_c(); - s->last_pict_type = s->pict_type; - s->last_lambda_for[s->pict_type]= s->current_picture_ptr->quality; - if(s->pict_type!=AV_PICTURE_TYPE_B){ - s->last_non_b_pict_type= s->pict_type; + s->last_pict_type = s->pict_type; + s->last_lambda_for [s->pict_type] = s->current_picture_ptr->f.quality; + if (s->pict_type!= AV_PICTURE_TYPE_B) { + s->last_non_b_pict_type = s->pict_type; } #if 0 - /* copy back current_picture variables */ - for(i=0; ipicture[i].data[0] == s->current_picture.data[0]){ - s->picture[i]= s->current_picture; + /* copy back current_picture variables */ + for (i = 0; i < MAX_PICTURE_COUNT; i++) { + if (s->picture[i].f.data[0] == s->current_picture.f.data[0]) { + s->picture[i] = s->current_picture; break; } } - assert(iencoding){ + if (s->encoding) { /* release non-reference frames */ - for(i=0; ipicture_count; i++){ - if(s->picture[i].data[0] && !s->picture[i].reference /*&& s->picture[i].type!=FF_BUFFER_TYPE_SHARED*/){ + for (i = 0; i < s->picture_count; i++) { + if (s->picture[i].f.data[0] && !s->picture[i].f.reference + /* && s->picture[i].type != FF_BUFFER_TYPE_SHARED */) { free_frame_buffer(s, &s->picture[i]); } } } // clear copies, to avoid confusion #if 0 - memset(&s->last_picture, 0, sizeof(Picture)); - memset(&s->next_picture, 0, sizeof(Picture)); + memset(&s->last_picture, 0, sizeof(Picture)); + memset(&s->next_picture, 0, sizeof(Picture)); memset(&s->current_picture, 0, sizeof(Picture)); #endif - s->avctx->coded_frame= (AVFrame*)s->current_picture_ptr; + s->avctx->coded_frame = (AVFrame *) s->current_picture_ptr; - if (s->codec_id != CODEC_ID_H264 && s->current_picture.reference) { - ff_thread_report_progress((AVFrame*)s->current_picture_ptr, s->mb_height-1, 0); + if (s->codec_id != CODEC_ID_H264 && s->current_picture.f.reference) { + ff_thread_report_progress((AVFrame *) s->current_picture_ptr, + s->mb_height - 1, 0); } } /** - * draws an line from (ex, ey) -> (sx, sy). + * Draw a line from (ex, ey) -> (sx, sy). * @param w width of the image * @param h height of the image * @param stride stride/linesize of the image * @param color color of the arrow */ -static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color){ +static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, + int w, int h, int stride, int color) +{ int x, y, fr, f; - sx= av_clip(sx, 0, w-1); - sy= av_clip(sy, 0, h-1); - ex= av_clip(ex, 0, w-1); - ey= av_clip(ey, 0, h-1); + sx = av_clip(sx, 0, w - 1); + sy = av_clip(sy, 0, h - 1); + ex = av_clip(ex, 0, w - 1); + ey = av_clip(ey, 0, h - 1); - buf[sy*stride + sx]+= color; + buf[sy * stride + sx] += color; - if(FFABS(ex - sx) > FFABS(ey - sy)){ - if(sx > ex){ + if (FFABS(ex - sx) > FFABS(ey - sy)) { + if (sx > ex) { FFSWAP(int, sx, ex); FFSWAP(int, sy, ey); } - buf+= sx + sy*stride; - ex-= sx; - f= ((ey-sy)<<16)/ex; - for(x= 0; x <= ex; x++){ - y = (x*f)>>16; - fr= (x*f)&0xFFFF; - buf[ y *stride + x]+= (color*(0x10000-fr))>>16; - buf[(y+1)*stride + x]+= (color* fr )>>16; + buf += sx + sy * stride; + ex -= sx; + f = ((ey - sy) << 16) / ex; + for (x = 0; x = ex; x++) { + y = (x * f) >> 16; + fr = (x * f) & 0xFFFF; + buf[y * stride + x] += (color * (0x10000 - fr)) >> 16; + buf[(y + 1) * stride + x] += (color * fr ) >> 16; } - }else{ - if(sy > ey){ + } else { + if (sy > ey) { FFSWAP(int, sx, ex); FFSWAP(int, sy, ey); } - buf+= sx + sy*stride; - ey-= sy; - if(ey) f= ((ex-sx)<<16)/ey; - else f= 0; - for(y= 0; y <= ey; y++){ - x = (y*f)>>16; - fr= (y*f)&0xFFFF; - buf[y*stride + x ]+= (color*(0x10000-fr))>>16; - buf[y*stride + x+1]+= (color* fr )>>16; + buf += sx + sy * stride; + ey -= sy; + if (ey) + f = ((ex - sx) << 16) / ey; + else + f = 0; + for (y = 0; y = ey; y++) { + x = (y * f) >> 16; + fr = (y * f) & 0xFFFF; + buf[y * stride + x] += (color * (0x10000 - fr)) >> 16; + buf[y * stride + x + 1] += (color * fr ) >> 16; } } } /** - * draws an arrow from (ex, ey) -> (sx, sy). + * Draw an arrow from (ex, ey) -> (sx, sy). * @param w width of the image * @param h height of the image * @param stride stride/linesize of the image * @param color color of the arrow */ -static void draw_arrow(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color){ +static void draw_arrow(uint8_t *buf, int sx, int sy, int ex, + int ey, int w, int h, int stride, int color) +{ int dx,dy; - sx= av_clip(sx, -100, w+100); - sy= av_clip(sy, -100, h+100); - ex= av_clip(ex, -100, w+100); - ey= av_clip(ey, -100, h+100); - - dx= ex - sx; - dy= ey - sy; - - if(dx*dx + dy*dy > 3*3){ - int rx= dx + dy; - int ry= -dx + dy; - int length= ff_sqrt((rx*rx + ry*ry)<<8); - - //FIXME subpixel accuracy - rx= ROUNDED_DIV(rx*3<<4, length); - ry= ROUNDED_DIV(ry*3<<4, length); + sx = av_clip(sx, -100, w + 100); + sy = av_clip(sy, -100, h + 100); + ex = av_clip(ex, -100, w + 100); + ey = av_clip(ey, -100, h + 100); + + dx = ex - sx; + dy = ey - sy; + + if (dx * dx + dy * dy > 3 * 3) { + int rx = dx + dy; + int ry = -dx + dy; + int length = ff_sqrt((rx * rx + ry * ry) << 8); + + // FIXME subpixel accuracy + rx = ROUNDED_DIV(rx * 3 << 4, length); + ry = ROUNDED_DIV(ry * 3 << 4, length); draw_line(buf, sx, sy, sx + rx, sy + ry, w, h, stride, color); draw_line(buf, sx, sy, sx - ry, sy + rx, w, h, stride, color); @@ -1320,305 +1509,354 @@ } /** - * prints debuging info for the given picture. + * Print debugging info for the given picture. */ -void ff_print_debug_info(MpegEncContext *s, AVFrame *pict){ - - if(s->avctx->hwaccel || !pict || !pict->mb_type) return; +void ff_print_debug_info(MpegEncContext *s, AVFrame *pict) +{ + if (s->avctx->hwaccel || !pict || !pict->mb_type) + return; - if(s->avctx->debug&(FF_DEBUG_SKIP | FF_DEBUG_QP | FF_DEBUG_MB_TYPE)){ + if (s->avctx->debug & (FF_DEBUG_SKIP | FF_DEBUG_QP | FF_DEBUG_MB_TYPE)) { int x,y; av_log(s->avctx,AV_LOG_DEBUG,"New frame, type: "); switch (pict->pict_type) { - case AV_PICTURE_TYPE_I: av_log(s->avctx,AV_LOG_DEBUG,"I\n"); break; - case AV_PICTURE_TYPE_P: av_log(s->avctx,AV_LOG_DEBUG,"P\n"); break; - case AV_PICTURE_TYPE_B: av_log(s->avctx,AV_LOG_DEBUG,"B\n"); break; - case AV_PICTURE_TYPE_S: av_log(s->avctx,AV_LOG_DEBUG,"S\n"); break; - case AV_PICTURE_TYPE_SI: av_log(s->avctx,AV_LOG_DEBUG,"SI\n"); break; - case AV_PICTURE_TYPE_SP: av_log(s->avctx,AV_LOG_DEBUG,"SP\n"); break; - } - for(y=0; ymb_height; y++){ - for(x=0; xmb_width; x++){ - if(s->avctx->debug&FF_DEBUG_SKIP){ - int count= s->mbskip_table[x + y*s->mb_stride]; - if(count>9) count=9; + case AV_PICTURE_TYPE_I: + av_log(s->avctx,AV_LOG_DEBUG,"I\n"); + break; + case AV_PICTURE_TYPE_P: + av_log(s->avctx,AV_LOG_DEBUG,"P\n"); + break; + case AV_PICTURE_TYPE_B: + av_log(s->avctx,AV_LOG_DEBUG,"B\n"); + break; + case AV_PICTURE_TYPE_S: + av_log(s->avctx,AV_LOG_DEBUG,"S\n"); + break; + case AV_PICTURE_TYPE_SI: + av_log(s->avctx,AV_LOG_DEBUG,"SI\n"); + break; + case AV_PICTURE_TYPE_SP: + av_log(s->avctx,AV_LOG_DEBUG,"SP\n"); + break; + } + for (y = 0; y < s->mb_height; y++) { + for (x = 0; x < s->mb_width; x++) { + if (s->avctx->debug & FF_DEBUG_SKIP) { + int count = s->mbskip_table[x + y * s->mb_stride]; + if (count > 9) + count = 9; av_log(s->avctx, AV_LOG_DEBUG, "%1d", count); } - if(s->avctx->debug&FF_DEBUG_QP){ - av_log(s->avctx, AV_LOG_DEBUG, "%2d", pict->qscale_table[x + y*s->mb_stride]); + if (s->avctx->debug & FF_DEBUG_QP) { + av_log(s->avctx, AV_LOG_DEBUG, "%2d", + pict->qscale_table[x + y * s->mb_stride]); } - if(s->avctx->debug&FF_DEBUG_MB_TYPE){ - int mb_type= pict->mb_type[x + y*s->mb_stride]; - //Type & MV direction - if(IS_PCM(mb_type)) + if (s->avctx->debug & FF_DEBUG_MB_TYPE) { + int mb_type = pict->mb_type[x + y * s->mb_stride]; + // Type & MV direction + if (IS_PCM(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "P"); - else if(IS_INTRA(mb_type) && IS_ACPRED(mb_type)) + else if (IS_INTRA(mb_type) && IS_ACPRED(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "A"); - else if(IS_INTRA4x4(mb_type)) + else if (IS_INTRA4x4(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "i"); - else if(IS_INTRA16x16(mb_type)) + else if (IS_INTRA16x16(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "I"); - else if(IS_DIRECT(mb_type) && IS_SKIP(mb_type)) + else if (IS_DIRECT(mb_type) && IS_SKIP(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "d"); - else if(IS_DIRECT(mb_type)) + else if (IS_DIRECT(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "D"); - else if(IS_GMC(mb_type) && IS_SKIP(mb_type)) + else if (IS_GMC(mb_type) && IS_SKIP(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "g"); - else if(IS_GMC(mb_type)) + else if (IS_GMC(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "G"); - else if(IS_SKIP(mb_type)) + else if (IS_SKIP(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "S"); - else if(!USES_LIST(mb_type, 1)) + else if (!USES_LIST(mb_type, 1)) av_log(s->avctx, AV_LOG_DEBUG, ">"); - else if(!USES_LIST(mb_type, 0)) + else if (!USES_LIST(mb_type, 0)) av_log(s->avctx, AV_LOG_DEBUG, "<"); - else{ + else { assert(USES_LIST(mb_type, 0) && USES_LIST(mb_type, 1)); av_log(s->avctx, AV_LOG_DEBUG, "X"); } - //segmentation - if(IS_8X8(mb_type)) + // segmentation + if (IS_8X8(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "+"); - else if(IS_16X8(mb_type)) + else if (IS_16X8(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "-"); - else if(IS_8X16(mb_type)) + else if (IS_8X16(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "|"); - else if(IS_INTRA(mb_type) || IS_16X16(mb_type)) + else if (IS_INTRA(mb_type) || IS_16X16(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, " "); else av_log(s->avctx, AV_LOG_DEBUG, "?"); - if(IS_INTERLACED(mb_type)) + if (IS_INTERLACED(mb_type)) av_log(s->avctx, AV_LOG_DEBUG, "="); else av_log(s->avctx, AV_LOG_DEBUG, " "); } -// av_log(s->avctx, AV_LOG_DEBUG, " "); + // av_log(s->avctx, AV_LOG_DEBUG, " "); } av_log(s->avctx, AV_LOG_DEBUG, "\n"); } } - if((s->avctx->debug&(FF_DEBUG_VIS_QP|FF_DEBUG_VIS_MB_TYPE)) || (s->avctx->debug_mv)){ - const int shift= 1 + s->quarter_sample; + if ((s->avctx->debug & (FF_DEBUG_VIS_QP | FF_DEBUG_VIS_MB_TYPE)) || + (s->avctx->debug_mv)) { + const int shift = 1 + s->quarter_sample; int mb_y; uint8_t *ptr; int i; int h_chroma_shift, v_chroma_shift, block_height; - const int width = s->avctx->width; - const int height= s->avctx->height; - const int mv_sample_log2= 4 - pict->motion_subsample_log2; - const int mv_stride= (s->mb_width << mv_sample_log2) + (s->codec_id == CODEC_ID_H264 ? 0 : 1); - s->low_delay=0; //needed to see the vectors without trashing the buffers - - avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &h_chroma_shift, &v_chroma_shift); - for(i=0; i<3; i++){ - memcpy(s->visualization_buffer[i], pict->data[i], (i==0) ? pict->linesize[i]*height:pict->linesize[i]*height >> v_chroma_shift); - pict->data[i]= s->visualization_buffer[i]; - } - pict->type= FF_BUFFER_TYPE_COPY; - ptr= pict->data[0]; - block_height = 16>>v_chroma_shift; + const int width = s->avctx->width; + const int height = s->avctx->height; + const int mv_sample_log2 = 4 - pict->motion_subsample_log2; + const int mv_stride = (s->mb_width << mv_sample_log2) + + (s->codec_id == CODEC_ID_H264 ? 0 : 1); + s->low_delay = 0; // needed to see the vectors without trashing the buffers + + avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, + &h_chroma_shift, &v_chroma_shift); + for (i = 0; i < 3; i++) { + memcpy(s->visualization_buffer[i], pict->data[i], + (i == 0) ? pict->linesize[i] * height: + pict->linesize[i] * height >> v_chroma_shift); + pict->data[i] = s->visualization_buffer[i]; + } + pict->type = FF_BUFFER_TYPE_COPY; + ptr = pict->data[0]; + block_height = 16 >> v_chroma_shift; - for(mb_y=0; mb_ymb_height; mb_y++){ + for (mb_y = 0; mb_y < s->mb_height; mb_y++) { int mb_x; - for(mb_x=0; mb_xmb_width; mb_x++){ - const int mb_index= mb_x + mb_y*s->mb_stride; - if((s->avctx->debug_mv) && pict->motion_val){ - int type; - for(type=0; type<3; type++){ - int direction = 0; - switch (type) { - case 0: if ((!(s->avctx->debug_mv&FF_DEBUG_VIS_MV_P_FOR)) || (pict->pict_type!=AV_PICTURE_TYPE_P)) + for (mb_x = 0; mb_x < s->mb_width; mb_x++) { + const int mb_index = mb_x + mb_y * s->mb_stride; + if ((s->avctx->debug_mv) && pict->motion_val) { + int type; + for (type = 0; type < 3; type++) { + int direction = 0; + switch (type) { + case 0: + if ((!(s->avctx->debug_mv & FF_DEBUG_VIS_MV_P_FOR)) || + (pict->pict_type!= AV_PICTURE_TYPE_P)) continue; - direction = 0; - break; - case 1: if ((!(s->avctx->debug_mv&FF_DEBUG_VIS_MV_B_FOR)) || (pict->pict_type!=AV_PICTURE_TYPE_B)) + direction = 0; + break; + case 1: + if ((!(s->avctx->debug_mv & FF_DEBUG_VIS_MV_B_FOR)) || + (pict->pict_type!= AV_PICTURE_TYPE_B)) continue; - direction = 0; - break; - case 2: if ((!(s->avctx->debug_mv&FF_DEBUG_VIS_MV_B_BACK)) || (pict->pict_type!=AV_PICTURE_TYPE_B)) + direction = 0; + break; + case 2: + if ((!(s->avctx->debug_mv & FF_DEBUG_VIS_MV_B_BACK)) || + (pict->pict_type!= AV_PICTURE_TYPE_B)) continue; - direction = 1; - break; - } - if(!USES_LIST(pict->mb_type[mb_index], direction)) - continue; - - if(IS_8X8(pict->mb_type[mb_index])){ - int i; - for(i=0; i<4; i++){ - int sx= mb_x*16 + 4 + 8*(i&1); - int sy= mb_y*16 + 4 + 8*(i>>1); - int xy= (mb_x*2 + (i&1) + (mb_y*2 + (i>>1))*mv_stride) << (mv_sample_log2-1); - int mx= (pict->motion_val[direction][xy][0]>>shift) + sx; - int my= (pict->motion_val[direction][xy][1]>>shift) + sy; - draw_arrow(ptr, sx, sy, mx, my, width, height, s->linesize, 100); - } - }else if(IS_16X8(pict->mb_type[mb_index])){ - int i; - for(i=0; i<2; i++){ - int sx=mb_x*16 + 8; - int sy=mb_y*16 + 4 + 8*i; - int xy= (mb_x*2 + (mb_y*2 + i)*mv_stride) << (mv_sample_log2-1); - int mx=(pict->motion_val[direction][xy][0]>>shift); - int my=(pict->motion_val[direction][xy][1]>>shift); - - if(IS_INTERLACED(pict->mb_type[mb_index])) - my*=2; - - draw_arrow(ptr, sx, sy, mx+sx, my+sy, width, height, s->linesize, 100); - } - }else if(IS_8X16(pict->mb_type[mb_index])){ - int i; - for(i=0; i<2; i++){ - int sx=mb_x*16 + 4 + 8*i; - int sy=mb_y*16 + 8; - int xy= (mb_x*2 + i + mb_y*2*mv_stride) << (mv_sample_log2-1); - int mx=(pict->motion_val[direction][xy][0]>>shift); - int my=(pict->motion_val[direction][xy][1]>>shift); - - if(IS_INTERLACED(pict->mb_type[mb_index])) - my*=2; + direction = 1; + break; + } + if (!USES_LIST(pict->mb_type[mb_index], direction)) + continue; - draw_arrow(ptr, sx, sy, mx+sx, my+sy, width, height, s->linesize, 100); - } - }else{ - int sx= mb_x*16 + 8; - int sy= mb_y*16 + 8; - int xy= (mb_x + mb_y*mv_stride) << mv_sample_log2; - int mx= (pict->motion_val[direction][xy][0]>>shift) + sx; - int my= (pict->motion_val[direction][xy][1]>>shift) + sy; - draw_arrow(ptr, sx, sy, mx, my, width, height, s->linesize, 100); + if (IS_8X8(pict->mb_type[mb_index])) { + int i; + for (i = 0; i < 4; i++) { + int sx = mb_x * 16 + 4 + 8 * (i & 1); + int sy = mb_y * 16 + 4 + 8 * (i >> 1); + int xy = (mb_x * 2 + (i & 1) + + (mb_y * 2 + (i >> 1)) * mv_stride) << (mv_sample_log2 - 1); + int mx = (pict->motion_val[direction][xy][0] >> shift) + sx; + int my = (pict->motion_val[direction][xy][1] >> shift) + sy; + draw_arrow(ptr, sx, sy, mx, my, width, + height, s->linesize, 100); + } + } else if (IS_16X8(pict->mb_type[mb_index])) { + int i; + for (i = 0; i < 2; i++) { + int sx = mb_x * 16 + 8; + int sy = mb_y * 16 + 4 + 8 * i; + int xy = (mb_x * 2 + (mb_y * 2 + i) * mv_stride) << (mv_sample_log2 - 1); + int mx = (pict->motion_val[direction][xy][0] >> shift); + int my = (pict->motion_val[direction][xy][1] >> shift); + + if (IS_INTERLACED(pict->mb_type[mb_index])) + my *= 2; + + draw_arrow(ptr, sx, sy, mx + sx, my + sy, width, + height, s->linesize, 100); + } + } else if (IS_8X16(pict->mb_type[mb_index])) { + int i; + for (i = 0; i < 2; i++) { + int sx = mb_x * 16 + 4 + 8 * i; + int sy = mb_y * 16 + 8; + int xy = (mb_x * 2 + i + mb_y * 2 * mv_stride) << (mv_sample_log2 - 1); + int mx = pict->motion_val[direction][xy][0] >> shift; + int my = pict->motion_val[direction][xy][1] >> shift; + + if (IS_INTERLACED(pict->mb_type[mb_index])) + my *= 2; + + draw_arrow(ptr, sx, sy, mx + sx, my + sy, width, + height, s->linesize, 100); + } + } else { + int sx = mb_x * 16 + 8; + int sy = mb_y * 16 + 8; + int xy = (mb_x + mb_y * mv_stride) << mv_sample_log2; + int mx = pict->motion_val[direction][xy][0] >> shift + sx; + int my = pict->motion_val[direction][xy][1] >> shift + sy; + draw_arrow(ptr, sx, sy, mx, my, width, height, s->linesize, 100); + } } - } } - if((s->avctx->debug&FF_DEBUG_VIS_QP) && pict->motion_val){ - uint64_t c= (pict->qscale_table[mb_index]*128/31) * 0x0101010101010101ULL; + if ((s->avctx->debug & FF_DEBUG_VIS_QP) && pict->motion_val) { + uint64_t c = (pict->qscale_table[mb_index] * 128 / 31) * + 0x0101010101010101ULL; int y; - for(y=0; ydata[1] + 8*mb_x + (block_height*mb_y + y)*pict->linesize[1])= c; - *(uint64_t*)(pict->data[2] + 8*mb_x + (block_height*mb_y + y)*pict->linesize[2])= c; + for (y = 0; y < block_height; y++) { + *(uint64_t *)(pict->data[1] + 8 * mb_x + + (block_height * mb_y + y) * + pict->linesize[1]) = c; + *(uint64_t *)(pict->data[2] + 8 * mb_x + + (block_height * mb_y + y) * + pict->linesize[2]) = c; } } - if((s->avctx->debug&FF_DEBUG_VIS_MB_TYPE) && pict->motion_val){ - int mb_type= pict->mb_type[mb_index]; + if ((s->avctx->debug & FF_DEBUG_VIS_MB_TYPE) && + pict->motion_val) { + int mb_type = pict->mb_type[mb_index]; uint64_t u,v; int y; -#define COLOR(theta, r)\ -u= (int)(128 + r*cos(theta*3.141592/180));\ -v= (int)(128 + r*sin(theta*3.141592/180)); - - - u=v=128; - if(IS_PCM(mb_type)){ - COLOR(120,48) - }else if((IS_INTRA(mb_type) && IS_ACPRED(mb_type)) || IS_INTRA16x16(mb_type)){ - COLOR(30,48) - }else if(IS_INTRA4x4(mb_type)){ - COLOR(90,48) - }else if(IS_DIRECT(mb_type) && IS_SKIP(mb_type)){ -// COLOR(120,48) - }else if(IS_DIRECT(mb_type)){ - COLOR(150,48) - }else if(IS_GMC(mb_type) && IS_SKIP(mb_type)){ - COLOR(170,48) - }else if(IS_GMC(mb_type)){ - COLOR(190,48) - }else if(IS_SKIP(mb_type)){ -// COLOR(180,48) - }else if(!USES_LIST(mb_type, 1)){ - COLOR(240,48) - }else if(!USES_LIST(mb_type, 0)){ - COLOR(0,48) - }else{ +#define COLOR(theta, r) \ + u = (int)(128 + r * cos(theta * 3.141592 / 180)); \ + v = (int)(128 + r * sin(theta * 3.141592 / 180)); + + + u = v = 128; + if (IS_PCM(mb_type)) { + COLOR(120, 48) + } else if ((IS_INTRA(mb_type) && IS_ACPRED(mb_type)) || + IS_INTRA16x16(mb_type)) { + COLOR(30, 48) + } else if (IS_INTRA4x4(mb_type)) { + COLOR(90, 48) + } else if (IS_DIRECT(mb_type) && IS_SKIP(mb_type)) { + // COLOR(120, 48) + } else if (IS_DIRECT(mb_type)) { + COLOR(150, 48) + } else if (IS_GMC(mb_type) && IS_SKIP(mb_type)) { + COLOR(170, 48) + } else if (IS_GMC(mb_type)) { + COLOR(190, 48) + } else if (IS_SKIP(mb_type)) { + // COLOR(180, 48) + } else if (!USES_LIST(mb_type, 1)) { + COLOR(240, 48) + } else if (!USES_LIST(mb_type, 0)) { + COLOR(0, 48) + } else { assert(USES_LIST(mb_type, 0) && USES_LIST(mb_type, 1)); COLOR(300,48) } - u*= 0x0101010101010101ULL; - v*= 0x0101010101010101ULL; - for(y=0; ydata[1] + 8*mb_x + (block_height*mb_y + y)*pict->linesize[1])= u; - *(uint64_t*)(pict->data[2] + 8*mb_x + (block_height*mb_y + y)*pict->linesize[2])= v; - } - - //segmentation - if(IS_8X8(mb_type) || IS_16X8(mb_type)){ - *(uint64_t*)(pict->data[0] + 16*mb_x + 0 + (16*mb_y + 8)*pict->linesize[0])^= 0x8080808080808080ULL; - *(uint64_t*)(pict->data[0] + 16*mb_x + 8 + (16*mb_y + 8)*pict->linesize[0])^= 0x8080808080808080ULL; - } - if(IS_8X8(mb_type) || IS_8X16(mb_type)){ - for(y=0; y<16; y++) - pict->data[0][16*mb_x + 8 + (16*mb_y + y)*pict->linesize[0]]^= 0x80; - } - if(IS_8X8(mb_type) && mv_sample_log2 >= 2){ - int dm= 1 << (mv_sample_log2-2); - for(i=0; i<4; i++){ - int sx= mb_x*16 + 8*(i&1); - int sy= mb_y*16 + 8*(i>>1); - int xy= (mb_x*2 + (i&1) + (mb_y*2 + (i>>1))*mv_stride) << (mv_sample_log2-1); - //FIXME bidir - int32_t *mv = (int32_t*)&pict->motion_val[0][xy]; - if(mv[0] != mv[dm] || mv[dm*mv_stride] != mv[dm*(mv_stride+1)]) - for(y=0; y<8; y++) - pict->data[0][sx + 4 + (sy + y)*pict->linesize[0]]^= 0x80; - if(mv[0] != mv[dm*mv_stride] || mv[dm] != mv[dm*(mv_stride+1)]) - *(uint64_t*)(pict->data[0] + sx + (sy + 4)*pict->linesize[0])^= 0x8080808080808080ULL; + u *= 0x0101010101010101ULL; + v *= 0x0101010101010101ULL; + for (y = 0; y < block_height; y++) { + *(uint64_t *)(pict->data[1] + 8 * mb_x + + (block_height * mb_y + y) * pict->linesize[1]) = u; + *(uint64_t *)(pict->data[2] + 8 * mb_x + + (block_height * mb_y + y) * pict->linesize[2]) = v; + } + + // segmentation + if (IS_8X8(mb_type) || IS_16X8(mb_type)) { + *(uint64_t *)(pict->data[0] + 16 * mb_x + 0 + + (16 * mb_y + 8) * pict->linesize[0]) ^= 0x8080808080808080ULL; + *(uint64_t *)(pict->data[0] + 16 * mb_x + 8 + + (16 * mb_y + 8) * pict->linesize[0]) ^= 0x8080808080808080ULL; + } + if (IS_8X8(mb_type) || IS_8X16(mb_type)) { + for (y = 0; y < 16; y++) + pict->data[0][16 * mb_x + 8 + (16 * mb_y + y) * + pict->linesize[0]] ^= 0x80; + } + if (IS_8X8(mb_type) && mv_sample_log2 >= 2) { + int dm = 1 << (mv_sample_log2 - 2); + for (i = 0; i < 4; i++) { + int sx = mb_x * 16 + 8 * (i & 1); + int sy = mb_y * 16 + 8 * (i >> 1); + int xy = (mb_x * 2 + (i & 1) + + (mb_y * 2 + (i >> 1)) * mv_stride) << (mv_sample_log2 - 1); + // FIXME bidir + int32_t *mv = (int32_t *) &pict->motion_val[0][xy]; + if (mv[0] != mv[dm] || + mv[dm * mv_stride] != mv[dm * (mv_stride + 1)]) + for (y = 0; y < 8; y++) + pict->data[0][sx + 4 + (sy + y) * pict->linesize[0]] ^= 0x80; + if (mv[0] != mv[dm * mv_stride] || mv[dm] != mv[dm * (mv_stride + 1)]) + *(uint64_t *)(pict->data[0] + sx + (sy + 4) * + pict->linesize[0]) ^= 0x8080808080808080ULL; } } - if(IS_INTERLACED(mb_type) && s->codec_id == CODEC_ID_H264){ + if (IS_INTERLACED(mb_type) && + s->codec_id == CODEC_ID_H264) { // hmm } } - s->mbskip_table[mb_index]=0; + s->mbskip_table[mb_index] = 0; } } } } static inline int hpel_motion_lowres(MpegEncContext *s, - uint8_t *dest, uint8_t *src, - int field_based, int field_select, - int src_x, int src_y, - int width, int height, int stride, - int h_edge_pos, int v_edge_pos, - int w, int h, h264_chroma_mc_func *pix_op, - int motion_x, int motion_y) -{ - const int lowres= s->avctx->lowres; - const int op_index= FFMIN(lowres, 2); - const int s_mask= (2<avctx->lowres; + const int op_index = FFMIN(lowres, 2); + const int s_mask = (2 << lowres) - 1; + int emu = 0; int sx, sy; - if(s->quarter_sample){ - motion_x/=2; - motion_y/=2; - } - - sx= motion_x & s_mask; - sy= motion_y & s_mask; - src_x += motion_x >> (lowres+1); - src_y += motion_y >> (lowres+1); - - src += src_y * stride + src_x; - - if( (unsigned)src_x > h_edge_pos - (!!sx) - w - || (unsigned)src_y >(v_edge_pos >> field_based) - (!!sy) - h){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, w+1, (h+1)<edge_emu_buffer; - emu=1; - } - - sx= (sx << 2) >> lowres; - sy= (sy << 2) >> lowres; - if(field_select) + if (s->quarter_sample) { + motion_x /= 2; + motion_y /= 2; + } + + sx = motion_x & s_mask; + sy = motion_y & s_mask; + src_x += motion_x >> lowres + 1; + src_y += motion_y >> lowres + 1; + + src += src_y * stride + src_x; + + if ((unsigned)src_x > h_edge_pos - (!!sx) - w || + (unsigned)src_y > (v_edge_pos >> field_based) - (!!sy) - h) { + s->dsp.emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, w + 1, + (h + 1) << field_based, src_x, + src_y << field_based, + h_edge_pos, + v_edge_pos); + src = s->edge_emu_buffer; + emu = 1; + } + + sx = (sx << 2) >> lowres; + sy = (sy << 2) >> lowres; + if (field_select) src += s->linesize; pix_op[op_index](dest, src, stride, h, sx, sy); return emu; @@ -1626,149 +1864,170 @@ /* apply one mpeg motion vector to the three components */ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s, - uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, - int field_based, int bottom_field, int field_select, - uint8_t **ref_picture, h264_chroma_mc_func *pix_op, - int motion_x, int motion_y, int h, int mb_y) + uint8_t *dest_y, + uint8_t *dest_cb, + uint8_t *dest_cr, + int field_based, + int bottom_field, + int field_select, + uint8_t **ref_picture, + h264_chroma_mc_func *pix_op, + int motion_x, int motion_y, + int h, int mb_y) { uint8_t *ptr_y, *ptr_cb, *ptr_cr; - int mx, my, src_x, src_y, uvsrc_x, uvsrc_y, uvlinesize, linesize, sx, sy, uvsx, uvsy; - const int lowres= s->avctx->lowres; - const int op_index= FFMIN(lowres, 2); - const int block_s= 8>>lowres; - const int s_mask= (2<avctx->lowres; + const int op_index = FFMIN(lowres, 2); + const int block_s = 8>>lowres; + const int s_mask = (2 << lowres) - 1; const int h_edge_pos = s->h_edge_pos >> lowres; const int v_edge_pos = s->v_edge_pos >> lowres; - linesize = s->current_picture.linesize[0] << field_based; - uvlinesize = s->current_picture.linesize[1] << field_based; + linesize = s->current_picture.f.linesize[0] << field_based; + uvlinesize = s->current_picture.f.linesize[1] << field_based; - if(s->quarter_sample){ //FIXME obviously not perfect but qpel will not work in lowres anyway - motion_x/=2; - motion_y/=2; + // FIXME obviously not perfect but qpel will not work in lowres anyway + if (s->quarter_sample) { + motion_x /= 2; + motion_y /= 2; } - if(field_based){ - motion_y += (bottom_field - field_select)*((1<mb_x*2*block_s + (motion_x >> (lowres+1)); - src_y =( mb_y*2*block_s>>field_based) + (motion_y >> (lowres+1)); + sx = motion_x & s_mask; + sy = motion_y & s_mask; + src_x = s->mb_x * 2 * block_s + (motion_x >> lowres + 1); + src_y = (mb_y * 2 * block_s >> field_based) + (motion_y >> lowres + 1); if (s->out_format == FMT_H263) { - uvsx = ((motion_x>>1) & s_mask) | (sx&1); - uvsy = ((motion_y>>1) & s_mask) | (sy&1); - uvsrc_x = src_x>>1; - uvsrc_y = src_y>>1; - }else if(s->out_format == FMT_H261){//even chroma mv's are full pel in H261 - mx = motion_x / 4; - my = motion_y / 4; - uvsx = (2*mx) & s_mask; - uvsy = (2*my) & s_mask; - uvsrc_x = s->mb_x*block_s + (mx >> lowres); - uvsrc_y = mb_y*block_s + (my >> lowres); + uvsx = ((motion_x >> 1) & s_mask) | (sx & 1); + uvsy = ((motion_y >> 1) & s_mask) | (sy & 1); + uvsrc_x = src_x >> 1; + uvsrc_y = src_y >> 1; + } else if (s->out_format == FMT_H261) { + // even chroma mv's are full pel in H261 + mx = motion_x / 4; + my = motion_y / 4; + uvsx = (2 * mx) & s_mask; + uvsy = (2 * my) & s_mask; + uvsrc_x = s->mb_x * block_s + (mx >> lowres); + uvsrc_y = mb_y * block_s + (my >> lowres); } else { - mx = motion_x / 2; - my = motion_y / 2; - uvsx = mx & s_mask; - uvsy = my & s_mask; - uvsrc_x = s->mb_x*block_s + (mx >> (lowres+1)); - uvsrc_y =( mb_y*block_s>>field_based) + (my >> (lowres+1)); + mx = motion_x / 2; + my = motion_y / 2; + uvsx = mx & s_mask; + uvsy = my & s_mask; + uvsrc_x = s->mb_x * block_s + (mx >> lowres + 1); + uvsrc_y = (mb_y * block_s >> field_based) + (my >> lowres + 1); } - ptr_y = ref_picture[0] + src_y * linesize + src_x; + ptr_y = ref_picture[0] + src_y * linesize + src_x; ptr_cb = ref_picture[1] + uvsrc_y * uvlinesize + uvsrc_x; ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x; - if( (unsigned)src_x > h_edge_pos - (!!sx) - 2*block_s - || (unsigned)src_y >(v_edge_pos >> field_based) - (!!sy) - h){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based, - src_x, src_y<edge_emu_buffer; - if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ - uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize; - s->dsp.emulated_edge_mc(uvbuf , ptr_cb, s->uvlinesize, 9, 9+field_based, - uvsrc_x, uvsrc_y<>1, v_edge_pos>>1); - s->dsp.emulated_edge_mc(uvbuf+16, ptr_cr, s->uvlinesize, 9, 9+field_based, - uvsrc_x, uvsrc_y<>1, v_edge_pos>>1); - ptr_cb= uvbuf; - ptr_cr= uvbuf+16; - } + if ((unsigned) src_x > h_edge_pos - (!!sx) - 2 * block_s || + (unsigned) src_y > (v_edge_pos >> field_based) - (!!sy) - h) { + s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y, + s->linesize, 17, 17 + field_based, + src_x, src_y << field_based, h_edge_pos, + v_edge_pos); + ptr_y = s->edge_emu_buffer; + if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) { + uint8_t *uvbuf = s->edge_emu_buffer + 18 * s->linesize; + s->dsp.emulated_edge_mc(uvbuf , ptr_cb, s->uvlinesize, 9, + 9 + field_based, + uvsrc_x, uvsrc_y << field_based, + h_edge_pos >> 1, v_edge_pos >> 1); + s->dsp.emulated_edge_mc(uvbuf + 16, ptr_cr, s->uvlinesize, 9, + 9 + field_based, + uvsrc_x, uvsrc_y << field_based, + h_edge_pos >> 1, v_edge_pos >> 1); + ptr_cb = uvbuf; + ptr_cr = uvbuf + 16; + } } - if(bottom_field){ //FIXME use this for field pix too instead of the obnoxious hack which changes picture.data - dest_y += s->linesize; - dest_cb+= s->uvlinesize; - dest_cr+= s->uvlinesize; - } - - if(field_select){ - ptr_y += s->linesize; - ptr_cb+= s->uvlinesize; - ptr_cr+= s->uvlinesize; - } - - sx= (sx << 2) >> lowres; - sy= (sy << 2) >> lowres; - pix_op[lowres-1](dest_y, ptr_y, linesize, h, sx, sy); - - if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ - uvsx= (uvsx << 2) >> lowres; - uvsy= (uvsy << 2) >> lowres; - pix_op[op_index](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy); - pix_op[op_index](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy); + // FIXME use this for field pix too instead of the obnoxious hack which changes picture.f.data + if (bottom_field) { + dest_y += s->linesize; + dest_cb += s->uvlinesize; + dest_cr += s->uvlinesize; + } + + if (field_select) { + ptr_y += s->linesize; + ptr_cb += s->uvlinesize; + ptr_cr += s->uvlinesize; + } + + sx = (sx << 2) >> lowres; + sy = (sy << 2) >> lowres; + pix_op[lowres - 1](dest_y, ptr_y, linesize, h, sx, sy); + + if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) { + uvsx = (uvsx << 2) >> lowres; + uvsy = (uvsy << 2) >> lowres; + pix_op[op_index](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift, + uvsx, uvsy); + pix_op[op_index](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift, + uvsx, uvsy); } - //FIXME h261 lowres loop filter + // FIXME h261 lowres loop filter } static inline void chroma_4mv_motion_lowres(MpegEncContext *s, - uint8_t *dest_cb, uint8_t *dest_cr, - uint8_t **ref_picture, - h264_chroma_mc_func *pix_op, - int mx, int my){ - const int lowres= s->avctx->lowres; - const int op_index= FFMIN(lowres, 2); - const int block_s= 8>>lowres; - const int s_mask= (2<h_edge_pos >> (lowres+1); - const int v_edge_pos = s->v_edge_pos >> (lowres+1); - int emu=0, src_x, src_y, offset, sx, sy; + uint8_t *dest_cb, uint8_t *dest_cr, + uint8_t **ref_picture, + h264_chroma_mc_func * pix_op, + int mx, int my) +{ + const int lowres = s->avctx->lowres; + const int op_index = FFMIN(lowres, 2); + const int block_s = 8 >> lowres; + const int s_mask = (2 << lowres) - 1; + const int h_edge_pos = s->h_edge_pos >> lowres + 1; + const int v_edge_pos = s->v_edge_pos >> lowres + 1; + int emu = 0, src_x, src_y, offset, sx, sy; uint8_t *ptr; - if(s->quarter_sample){ - mx/=2; - my/=2; + if (s->quarter_sample) { + mx /= 2; + my /= 2; } /* In case of 8X8, we construct a single chroma motion vector with a special rounding */ - mx= ff_h263_round_chroma(mx); - my= ff_h263_round_chroma(my); + mx = ff_h263_round_chroma(mx); + my = ff_h263_round_chroma(my); - sx= mx & s_mask; - sy= my & s_mask; - src_x = s->mb_x*block_s + (mx >> (lowres+1)); - src_y = s->mb_y*block_s + (my >> (lowres+1)); + sx = mx & s_mask; + sy = my & s_mask; + src_x = s->mb_x * block_s + (mx >> lowres + 1); + src_y = s->mb_y * block_s + (my >> lowres + 1); offset = src_y * s->uvlinesize + src_x; ptr = ref_picture[1] + offset; - if(s->flags&CODEC_FLAG_EMU_EDGE){ - if( (unsigned)src_x > h_edge_pos - (!!sx) - block_s - || (unsigned)src_y > v_edge_pos - (!!sy) - block_s){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9, src_x, src_y, h_edge_pos, v_edge_pos); - ptr= s->edge_emu_buffer; - emu=1; + if (s->flags & CODEC_FLAG_EMU_EDGE) { + if ((unsigned) src_x > h_edge_pos - (!!sx) - block_s || + (unsigned) src_y > v_edge_pos - (!!sy) - block_s) { + s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, + 9, 9, src_x, src_y, h_edge_pos, v_edge_pos); + ptr = s->edge_emu_buffer; + emu = 1; } } - sx= (sx << 2) >> lowres; - sy= (sy << 2) >> lowres; + sx = (sx << 2) >> lowres; + sy = (sy << 2) >> lowres; pix_op[op_index](dest_cb, ptr, s->uvlinesize, block_s, sx, sy); ptr = ref_picture[2] + offset; - if(emu){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9, src_x, src_y, h_edge_pos, v_edge_pos); - ptr= s->edge_emu_buffer; + if (emu) { + s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9, + src_x, src_y, h_edge_pos, v_edge_pos); + ptr = s->edge_emu_buffer; } pix_op[op_index](dest_cr, ptr, s->uvlinesize, block_s, sx, sy); } @@ -1785,117 +2044,133 @@ * the motion vectors are taken from s->mv and the MV type from s->mv_type */ static inline void MPV_motion_lowres(MpegEncContext *s, - uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, - int dir, uint8_t **ref_picture, - h264_chroma_mc_func *pix_op) + uint8_t *dest_y, uint8_t *dest_cb, + uint8_t *dest_cr, + int dir, uint8_t **ref_picture, + h264_chroma_mc_func *pix_op) { int mx, my; int mb_x, mb_y, i; - const int lowres= s->avctx->lowres; - const int block_s= 8>>lowres; + const int lowres = s->avctx->lowres; + const int block_s = 8 >>lowres; mb_x = s->mb_x; mb_y = s->mb_y; - switch(s->mv_type) { + switch (s->mv_type) { case MV_TYPE_16X16: mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr, - 0, 0, 0, - ref_picture, pix_op, - s->mv[dir][0][0], s->mv[dir][0][1], 2*block_s, mb_y); + 0, 0, 0, + ref_picture, pix_op, + s->mv[dir][0][0], s->mv[dir][0][1], + 2 * block_s, mb_y); break; case MV_TYPE_8X8: mx = 0; my = 0; - for(i=0;i<4;i++) { - hpel_motion_lowres(s, dest_y + ((i & 1) + (i >> 1) * s->linesize)*block_s, - ref_picture[0], 0, 0, - (2*mb_x + (i & 1))*block_s, (2*mb_y + (i >>1))*block_s, - s->width, s->height, s->linesize, - s->h_edge_pos >> lowres, s->v_edge_pos >> lowres, - block_s, block_s, pix_op, - s->mv[dir][i][0], s->mv[dir][i][1]); - - mx += s->mv[dir][i][0]; - my += s->mv[dir][i][1]; - } - - if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)) - chroma_4mv_motion_lowres(s, dest_cb, dest_cr, ref_picture, pix_op, mx, my); + for (i = 0; i < 4; i++) { + hpel_motion_lowres(s, dest_y + ((i & 1) + (i >> 1) * + s->linesize) * block_s, + ref_picture[0], 0, 0, + (2 * mb_x + (i & 1)) * block_s, + (2 * mb_y + (i >> 1)) * block_s, + s->width, s->height, s->linesize, + s->h_edge_pos >> lowres, s->v_edge_pos >> lowres, + block_s, block_s, pix_op, + s->mv[dir][i][0], s->mv[dir][i][1]); + + mx += s->mv[dir][i][0]; + my += s->mv[dir][i][1]; + } + + if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) + chroma_4mv_motion_lowres(s, dest_cb, dest_cr, ref_picture, + pix_op, mx, my); break; case MV_TYPE_FIELD: if (s->picture_structure == PICT_FRAME) { /* top field */ mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr, - 1, 0, s->field_select[dir][0], - ref_picture, pix_op, - s->mv[dir][0][0], s->mv[dir][0][1], block_s, mb_y); + 1, 0, s->field_select[dir][0], + ref_picture, pix_op, + s->mv[dir][0][0], s->mv[dir][0][1], + block_s, mb_y); /* bottom field */ mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr, - 1, 1, s->field_select[dir][1], - ref_picture, pix_op, - s->mv[dir][1][0], s->mv[dir][1][1], block_s, mb_y); + 1, 1, s->field_select[dir][1], + ref_picture, pix_op, + s->mv[dir][1][0], s->mv[dir][1][1], + block_s, mb_y); } else { - if(s->picture_structure != s->field_select[dir][0] + 1 && s->pict_type != AV_PICTURE_TYPE_B && !s->first_field){ - ref_picture= s->current_picture_ptr->data; - } + if (s->picture_structure != s->field_select[dir][0] + 1 && + s->pict_type != AV_PICTURE_TYPE_B && !s->first_field) { + ref_picture = s->current_picture_ptr->f.data; + } mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr, - 0, 0, s->field_select[dir][0], - ref_picture, pix_op, - s->mv[dir][0][0], s->mv[dir][0][1], 2*block_s, mb_y>>1); - } + 0, 0, s->field_select[dir][0], + ref_picture, pix_op, + s->mv[dir][0][0], + s->mv[dir][0][1], 2 * block_s, mb_y >> 1); + } break; case MV_TYPE_16X8: - for(i=0; i<2; i++){ - uint8_t ** ref2picture; + for (i = 0; i < 2; i++) { + uint8_t **ref2picture; - if(s->picture_structure == s->field_select[dir][i] + 1 || s->pict_type == AV_PICTURE_TYPE_B || s->first_field){ - ref2picture= ref_picture; - }else{ - ref2picture= s->current_picture_ptr->data; + if (s->picture_structure == s->field_select[dir][i] + 1 || + s->pict_type == AV_PICTURE_TYPE_B || s->first_field) { + ref2picture = ref_picture; + } else { + ref2picture = s->current_picture_ptr->f.data; } mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr, - 0, 0, s->field_select[dir][i], - ref2picture, pix_op, - s->mv[dir][i][0], s->mv[dir][i][1] + 2*block_s*i, block_s, mb_y>>1); - - dest_y += 2*block_s*s->linesize; - dest_cb+= (2*block_s>>s->chroma_y_shift)*s->uvlinesize; - dest_cr+= (2*block_s>>s->chroma_y_shift)*s->uvlinesize; + 0, 0, s->field_select[dir][i], + ref2picture, pix_op, + s->mv[dir][i][0], s->mv[dir][i][1] + + 2 * block_s * i, block_s, mb_y >> 1); + + dest_y += 2 * block_s * s->linesize; + dest_cb += (2 * block_s >> s->chroma_y_shift) * s->uvlinesize; + dest_cr += (2 * block_s >> s->chroma_y_shift) * s->uvlinesize; } break; case MV_TYPE_DMV: - if(s->picture_structure == PICT_FRAME){ - for(i=0; i<2; i++){ + if (s->picture_structure == PICT_FRAME) { + for (i = 0; i < 2; i++) { int j; - for(j=0; j<2; j++){ + for (j = 0; j < 2; j++) { mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr, - 1, j, j^i, - ref_picture, pix_op, - s->mv[dir][2*i + j][0], s->mv[dir][2*i + j][1], block_s, mb_y); + 1, j, j ^ i, + ref_picture, pix_op, + s->mv[dir][2 * i + j][0], + s->mv[dir][2 * i + j][1], + block_s, mb_y); } pix_op = s->dsp.avg_h264_chroma_pixels_tab; } - }else{ - for(i=0; i<2; i++){ + } else { + for (i = 0; i < 2; i++) { mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr, - 0, 0, s->picture_structure != i+1, - ref_picture, pix_op, - s->mv[dir][2*i][0],s->mv[dir][2*i][1],2*block_s, mb_y>>1); + 0, 0, s->picture_structure != i + 1, + ref_picture, pix_op, + s->mv[dir][2 * i][0],s->mv[dir][2 * i][1], + 2 * block_s, mb_y >> 1); // after put we make avg of the same block pix_op = s->dsp.avg_h264_chroma_pixels_tab; - //opposite parity is always in the same frame if this is second field - if(!s->first_field){ - ref_picture = s->current_picture_ptr->data; + // opposite parity is always in the same + // frame if this is second field + if (!s->first_field) { + ref_picture = s->current_picture_ptr->f.data; } } } - break; - default: assert(0); + break; + default: + assert(0); } } @@ -1964,7 +2239,7 @@ } /** - * cleans dc, ac, coded_block for the current non intra MB + * Clean dc, ac, coded_block for the current non-intra MB. */ void ff_clean_intra_table_entries(MpegEncContext *s) { @@ -2019,7 +2294,7 @@ if(s->avctx->debug&FF_DEBUG_DCT_COEFF) { /* save DCT coefficients */ int i,j; - DCTELEM *dct = &s->current_picture.dct_coeff[mb_xy*64*6]; + DCTELEM *dct = &s->current_picture.f.dct_coeff[mb_xy * 64 * 6]; av_log(s->avctx, AV_LOG_DEBUG, "DCT coeffs of MB at %dx%d:\n", s->mb_x, s->mb_y); for(i=0; i<6; i++){ for(j=0; j<64; j++){ @@ -2030,7 +2305,7 @@ } } - s->current_picture.qscale_table[mb_xy]= s->qscale; + s->current_picture.f.qscale_table[mb_xy] = s->qscale; /* update DC predictors for P macroblocks */ if (!s->mb_intra) { @@ -2051,8 +2326,8 @@ int dct_linesize, dct_offset; op_pixels_func (*op_pix)[4]; qpel_mc_func (*op_qpix)[16]; - const int linesize= s->current_picture.linesize[0]; //not s->linesize as this would be wrong for field pics - const int uvlinesize= s->current_picture.linesize[1]; + const int linesize = s->current_picture.f.linesize[0]; //not s->linesize as this would be wrong for field pics + const int uvlinesize = s->current_picture.f.linesize[1]; const int readable= s->pict_type != AV_PICTURE_TYPE_B || s->encoding || s->avctx->draw_horiz_band || lowres_flag; const int block_size= lowres_flag ? 8>>s->avctx->lowres : 8; @@ -2060,31 +2335,20 @@ /* skip only during decoding as we might trash the buffers during encoding a bit */ if(!s->encoding){ uint8_t *mbskip_ptr = &s->mbskip_table[mb_xy]; - const int age= s->current_picture.age; - - assert(age); if (s->mb_skipped) { s->mb_skipped= 0; assert(s->pict_type!=AV_PICTURE_TYPE_I); - - (*mbskip_ptr) ++; /* indicate that this time we skipped it */ - if(*mbskip_ptr >99) *mbskip_ptr= 99; - - /* if previous was skipped too, then nothing to do ! */ - if (*mbskip_ptr >= age && s->current_picture.reference){ - return; - } - } else if(!s->current_picture.reference){ - (*mbskip_ptr) ++; /* increase counter so the age can be compared cleanly */ - if(*mbskip_ptr >99) *mbskip_ptr= 99; + *mbskip_ptr = 1; + } else if(!s->current_picture.f.reference) { + *mbskip_ptr = 1; } else{ *mbskip_ptr = 0; /* not skipped */ } } dct_linesize = linesize << s->interlaced_dct; - dct_offset =(s->interlaced_dct)? linesize : linesize*block_size; + dct_offset = s->interlaced_dct ? linesize : linesize * block_size; if(readable){ dest_y= s->dest[0]; @@ -2101,7 +2365,7 @@ /* decoding or more than one mb_type (MC was already done otherwise) */ if(!s->encoding){ - if(HAVE_PTHREADS && s->avctx->active_thread_type&FF_THREAD_FRAME) { + if(HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_FRAME) { if (s->mv_dir & MV_DIR_FORWARD) { ff_thread_await_progress((AVFrame*)s->last_picture_ptr, MPV_lowest_referenced_row(s, 0), 0); } @@ -2114,11 +2378,11 @@ h264_chroma_mc_func *op_pix = s->dsp.put_h264_chroma_pixels_tab; if (s->mv_dir & MV_DIR_FORWARD) { - MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.data, op_pix); + MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f.data, op_pix); op_pix = s->dsp.avg_h264_chroma_pixels_tab; } if (s->mv_dir & MV_DIR_BACKWARD) { - MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.data, op_pix); + MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f.data, op_pix); } }else{ op_qpix= s->me.qpel_put; @@ -2128,12 +2392,12 @@ op_pix = s->dsp.put_no_rnd_pixels_tab; } if (s->mv_dir & MV_DIR_FORWARD) { - MPV_motion(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.data, op_pix, op_qpix); + MPV_motion(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f.data, op_pix, op_qpix); op_pix = s->dsp.avg_pixels_tab; op_qpix= s->me.qpel_avg; } if (s->mv_dir & MV_DIR_BACKWARD) { - MPV_motion(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.data, op_pix, op_qpix); + MPV_motion(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f.data, op_pix, op_qpix); } } } @@ -2180,7 +2444,7 @@ }else{ //chroma422 dct_linesize = uvlinesize << s->interlaced_dct; - dct_offset =(s->interlaced_dct)? uvlinesize : uvlinesize*8; + dct_offset = s->interlaced_dct ? uvlinesize : uvlinesize * 8; add_dct(s, block[4], 4, dest_cb, dct_linesize); add_dct(s, block[5], 5, dest_cr, dct_linesize); @@ -2232,7 +2496,7 @@ }else{ dct_linesize = uvlinesize << s->interlaced_dct; - dct_offset =(s->interlaced_dct)? uvlinesize : uvlinesize*8; + dct_offset = s->interlaced_dct ? uvlinesize : uvlinesize * 8; s->dsp.idct_put(dest_cb, dct_linesize, block[4]); s->dsp.idct_put(dest_cr, dct_linesize, block[5]); @@ -2269,7 +2533,6 @@ } /** - * * @param h is the normal height, this will be reduced automatically if needed for the last row */ void ff_draw_horiz_band(MpegEncContext *s, int y, int h){ @@ -2282,7 +2545,7 @@ if (!s->avctx->hwaccel && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) && s->unrestricted_mv - && s->current_picture.reference + && s->current_picture.f.reference && !s->intra_only && !(s->flags&CODEC_FLAG_EMU_EDGE)) { int sides = 0, edge_h; @@ -2293,12 +2556,15 @@ edge_h= FFMIN(h, s->v_edge_pos - y); - s->dsp.draw_edges(s->current_picture_ptr->data[0] + y *s->linesize , s->linesize, - s->h_edge_pos , edge_h , EDGE_WIDTH , EDGE_WIDTH , sides); - s->dsp.draw_edges(s->current_picture_ptr->data[1] + (y>>vshift)*s->uvlinesize, s->uvlinesize, - s->h_edge_pos>>hshift, edge_h>>hshift, EDGE_WIDTH>>hshift, EDGE_WIDTH>>vshift, sides); - s->dsp.draw_edges(s->current_picture_ptr->data[2] + (y>>vshift)*s->uvlinesize, s->uvlinesize, - s->h_edge_pos>>hshift, edge_h>>hshift, EDGE_WIDTH>>hshift, EDGE_WIDTH>>vshift, sides); + s->dsp.draw_edges(s->current_picture_ptr->f.data[0] + y *s->linesize, + s->linesize, s->h_edge_pos, edge_h, + EDGE_WIDTH, EDGE_WIDTH, sides); + s->dsp.draw_edges(s->current_picture_ptr->f.data[1] + (y>>vshift)*s->uvlinesize, + s->uvlinesize, s->h_edge_pos>>hshift, edge_h>>vshift, + EDGE_WIDTH>>hshift, EDGE_WIDTH>>vshift, sides); + s->dsp.draw_edges(s->current_picture_ptr->f.data[2] + (y>>vshift)*s->uvlinesize, + s->uvlinesize, s->h_edge_pos>>hshift, edge_h>>vshift, + EDGE_WIDTH>>hshift, EDGE_WIDTH>>vshift, sides); } h= FFMIN(h, s->avctx->height - y); @@ -2307,7 +2573,8 @@ if (s->avctx->draw_horiz_band) { AVFrame *src; - int offset[4]; + int offset[AV_NUM_DATA_POINTERS]; + int i; if(s->pict_type==AV_PICTURE_TYPE_B || s->low_delay || (s->avctx->slice_flags&SLICE_FLAG_CODED_ORDER)) src= (AVFrame*)s->current_picture_ptr; @@ -2317,15 +2584,14 @@ return; if(s->pict_type==AV_PICTURE_TYPE_B && s->picture_structure == PICT_FRAME && s->out_format != FMT_H264){ - offset[0]= - offset[1]= - offset[2]= - offset[3]= 0; + for (i = 0; i < AV_NUM_DATA_POINTERS; i++) + offset[i] = 0; }else{ offset[0]= y * s->linesize; offset[1]= offset[2]= (y >> s->chroma_y_shift) * s->uvlinesize; - offset[3]= 0; + for (i = 3; i < AV_NUM_DATA_POINTERS; i++) + offset[i] = 0; } emms_c(); @@ -2336,8 +2602,8 @@ } void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename - const int linesize= s->current_picture.linesize[0]; //not s->linesize as this would be wrong for field pics - const int uvlinesize= s->current_picture.linesize[1]; + const int linesize = s->current_picture.f.linesize[0]; //not s->linesize as this would be wrong for field pics + const int uvlinesize = s->current_picture.f.linesize[1]; const int mb_size= 4 - s->avctx->lowres; s->block_index[0]= s->b8_stride*(s->mb_y*2 ) - 2 + s->mb_x*2; @@ -2348,9 +2614,9 @@ s->block_index[5]= s->mb_stride*(s->mb_y + s->mb_height + 2) + s->b8_stride*s->mb_height*2 + s->mb_x - 1; //block_index is not used by mpeg2, so it is not affected by chroma_format - s->dest[0] = s->current_picture.data[0] + ((s->mb_x - 1) << mb_size); - s->dest[1] = s->current_picture.data[1] + ((s->mb_x - 1) << (mb_size - s->chroma_x_shift)); - s->dest[2] = s->current_picture.data[2] + ((s->mb_x - 1) << (mb_size - s->chroma_x_shift)); + s->dest[0] = s->current_picture.f.data[0] + ((s->mb_x - 1) << mb_size); + s->dest[1] = s->current_picture.f.data[1] + ((s->mb_x - 1) << (mb_size - s->chroma_x_shift)); + s->dest[2] = s->current_picture.f.data[2] + ((s->mb_x - 1) << (mb_size - s->chroma_x_shift)); if(!(s->pict_type==AV_PICTURE_TYPE_B && s->avctx->draw_horiz_band && s->picture_structure==PICT_FRAME)) { @@ -2375,14 +2641,14 @@ return; for(i=0; ipicture_count; i++){ - if(s->picture[i].data[0] && ( s->picture[i].type == FF_BUFFER_TYPE_INTERNAL - || s->picture[i].type == FF_BUFFER_TYPE_USER)) + if (s->picture[i].f.data[0] && + (s->picture[i].f.type == FF_BUFFER_TYPE_INTERNAL || + s->picture[i].f.type == FF_BUFFER_TYPE_USER)) free_frame_buffer(s, &s->picture[i]); } s->current_picture_ptr = s->last_picture_ptr = s->next_picture_ptr = NULL; s->mb_x= s->mb_y= 0; - s->closed_gop= 0; s->parse_context.state= -1; s->parse_context.frame_start_found= 0; @@ -2631,6 +2897,6 @@ void MPV_report_decode_progress(MpegEncContext *s) { - if (s->pict_type != FF_B_TYPE && !s->partitioned_frame && !s->error_occurred) + if (s->pict_type != AV_PICTURE_TYPE_B && !s->partitioned_frame && !s->error_occurred) ff_thread_report_progress((AVFrame*)s->current_picture_ptr, s->mb_y, 0); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo_common.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo_common.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo_common.h 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo_common.h 2012-01-11 00:34:30.000000000 +0000 @@ -42,14 +42,14 @@ int dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow); /** - * allocates a Picture - * The pixels are allocated/set by calling get_buffer() if shared=0 + * Allocate a Picture. + * The pixels are allocated/set by calling get_buffer() if shared = 0. */ int alloc_picture(MpegEncContext *s, Picture *pic, int shared); /** - * sets the given MpegEncContext to common defaults (same for encoding and decoding). - * the changed fields will not depend upon the prior state of the MpegEncContext. + * Set the given MpegEncContext to common defaults (same for encoding and decoding). + * The changed fields will not depend upon the prior state of the MpegEncContext. */ void MPV_common_defaults(MpegEncContext *s); @@ -255,8 +255,8 @@ #endif v_edge_pos = s->v_edge_pos >> field_based; - linesize = s->current_picture.linesize[0] << field_based; - uvlinesize = s->current_picture.linesize[1] << field_based; + linesize = s->current_picture.f.linesize[0] << field_based; + uvlinesize = s->current_picture.f.linesize[1] << field_based; dxy = ((motion_y & 1) << 1) | (motion_x & 1); src_x = s->mb_x* 16 + (motion_x >> 1); @@ -585,7 +585,7 @@ if (src_y == (s->height >> 1)) dxy &= ~2; - offset = (src_y * (s->uvlinesize)) + src_x; + offset = src_y * s->uvlinesize + src_x; ptr = ref_picture[1] + offset; if(s->flags&CODEC_FLAG_EMU_EDGE){ if( (unsigned)src_x > (s->h_edge_pos>>1) - (dxy &1) - 8 @@ -657,30 +657,30 @@ assert(!s->mb_skipped); - memcpy(mv_cache[1][1], s->current_picture.motion_val[0][mot_xy ], sizeof(int16_t)*4); - memcpy(mv_cache[2][1], s->current_picture.motion_val[0][mot_xy+mot_stride], sizeof(int16_t)*4); - memcpy(mv_cache[3][1], s->current_picture.motion_val[0][mot_xy+mot_stride], sizeof(int16_t)*4); + memcpy(mv_cache[1][1], s->current_picture.f.motion_val[0][mot_xy ], sizeof(int16_t) * 4); + memcpy(mv_cache[2][1], s->current_picture.f.motion_val[0][mot_xy + mot_stride], sizeof(int16_t) * 4); + memcpy(mv_cache[3][1], s->current_picture.f.motion_val[0][mot_xy + mot_stride], sizeof(int16_t) * 4); - if(mb_y==0 || IS_INTRA(s->current_picture.mb_type[xy-s->mb_stride])){ + if (mb_y == 0 || IS_INTRA(s->current_picture.f.mb_type[xy - s->mb_stride])) { memcpy(mv_cache[0][1], mv_cache[1][1], sizeof(int16_t)*4); }else{ - memcpy(mv_cache[0][1], s->current_picture.motion_val[0][mot_xy-mot_stride], sizeof(int16_t)*4); + memcpy(mv_cache[0][1], s->current_picture.f.motion_val[0][mot_xy - mot_stride], sizeof(int16_t) * 4); } - if(mb_x==0 || IS_INTRA(s->current_picture.mb_type[xy-1])){ + if (mb_x == 0 || IS_INTRA(s->current_picture.f.mb_type[xy - 1])) { AV_COPY32(mv_cache[1][0], mv_cache[1][1]); AV_COPY32(mv_cache[2][0], mv_cache[2][1]); }else{ - AV_COPY32(mv_cache[1][0], s->current_picture.motion_val[0][mot_xy-1]); - AV_COPY32(mv_cache[2][0], s->current_picture.motion_val[0][mot_xy-1+mot_stride]); + AV_COPY32(mv_cache[1][0], s->current_picture.f.motion_val[0][mot_xy - 1]); + AV_COPY32(mv_cache[2][0], s->current_picture.f.motion_val[0][mot_xy - 1 + mot_stride]); } - if(mb_x+1>=s->mb_width || IS_INTRA(s->current_picture.mb_type[xy+1])){ + if (mb_x + 1 >= s->mb_width || IS_INTRA(s->current_picture.f.mb_type[xy + 1])) { AV_COPY32(mv_cache[1][3], mv_cache[1][2]); AV_COPY32(mv_cache[2][3], mv_cache[2][2]); }else{ - AV_COPY32(mv_cache[1][3], s->current_picture.motion_val[0][mot_xy+2]); - AV_COPY32(mv_cache[2][3], s->current_picture.motion_val[0][mot_xy+2+mot_stride]); + AV_COPY32(mv_cache[1][3], s->current_picture.f.motion_val[0][mot_xy + 2]); + AV_COPY32(mv_cache[2][3], s->current_picture.f.motion_val[0][mot_xy + 2 + mot_stride]); } mx = 0; @@ -817,7 +817,7 @@ } } else { if(s->picture_structure != s->field_select[dir][0] + 1 && s->pict_type != AV_PICTURE_TYPE_B && !s->first_field){ - ref_picture= s->current_picture_ptr->data; + ref_picture = s->current_picture_ptr->f.data; } mpeg_motion(s, dest_y, dest_cb, dest_cr, @@ -834,7 +834,7 @@ || s->pict_type == AV_PICTURE_TYPE_B || s->first_field){ ref2picture= ref_picture; }else{ - ref2picture= s->current_picture_ptr->data; + ref2picture = s->current_picture_ptr->f.data; } mpeg_motion(s, dest_y, dest_cb, dest_cr, @@ -871,7 +871,7 @@ //opposite parity is always in the same frame if this is second field if(!s->first_field){ - ref_picture = s->current_picture_ptr->data; + ref_picture = s->current_picture_ptr->f.data; } } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo_enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo_enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo_enc.c 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo_enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,6 +28,8 @@ */ #include "libavutil/intmath.h" +#include "libavutil/mathematics.h" +#include "libavutil/opt.h" #include "avcodec.h" #include "dsputil.h" #include "mpegvideo.h" @@ -57,156 +59,188 @@ //#define DEBUG -static uint8_t default_mv_penalty[MAX_FCODE+1][MAX_MV*2+1]; -static uint8_t default_fcode_tab[MAX_MV*2+1]; +static uint8_t default_mv_penalty[MAX_FCODE + 1][MAX_MV * 2 + 1]; +static uint8_t default_fcode_tab[MAX_MV * 2 + 1]; -void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64], uint16_t (*qmat16)[2][64], - const uint16_t *quant_matrix, int bias, int qmin, int qmax, int intra) +void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64], + uint16_t (*qmat16)[2][64], + const uint16_t *quant_matrix, + int bias, int qmin, int qmax, int intra) { int qscale; - int shift=0; + int shift = 0; - for(qscale=qmin; qscale<=qmax; qscale++){ + for (qscale = qmin; qscale <= qmax; qscale++) { int i; - if (dsp->fdct == ff_jpeg_fdct_islow + if (dsp->fdct == ff_jpeg_fdct_islow_8 || + dsp->fdct == ff_jpeg_fdct_islow_10 #ifdef FAAN_POSTSCALE || dsp->fdct == ff_faandct #endif ) { - for(i=0;i<64;i++) { - const int j= dsp->idct_permutation[i]; - /* 16 <= qscale * quant_matrix[i] <= 7905 */ - /* 19952 <= ff_aanscales[i] * qscale * quant_matrix[i] <= 249205026 */ - /* (1 << 36) / 19952 >= (1 << 36) / (ff_aanscales[i] * qscale * quant_matrix[i]) >= (1 << 36) / 249205026 */ - /* 3444240 >= (1 << 36) / (ff_aanscales[i] * qscale * quant_matrix[i]) >= 275 */ + for (i = 0; i < 64; i++) { + const int j = dsp->idct_permutation[i]; + /* 16 <= qscale * quant_matrix[i] <= 7905 + * Assume x = ff_aanscales[i] * qscale * quant_matrix[i] + * 19952 <= x <= 249205026 + * (1 << 36) / 19952 >= (1 << 36) / (x) >= (1 << 36) / 249205026 + * 3444240 >= (1 << 36) / (x) >= 275 */ qmat[qscale][i] = (int)((UINT64_C(1) << QMAT_SHIFT) / - (qscale * quant_matrix[j])); + (qscale * quant_matrix[j])); } } else if (dsp->fdct == fdct_ifast #ifndef FAAN_POSTSCALE || dsp->fdct == ff_faandct #endif ) { - for(i=0;i<64;i++) { - const int j= dsp->idct_permutation[i]; - /* 16 <= qscale * quant_matrix[i] <= 7905 */ - /* 19952 <= ff_aanscales[i] * qscale * quant_matrix[i] <= 249205026 */ - /* (1 << 36) / 19952 >= (1 << 36) / (ff_aanscales[i] * qscale * quant_matrix[i]) >= (1<<36)/249205026 */ - /* 3444240 >= (1 << 36) / (ff_aanscales[i] * qscale * quant_matrix[i]) >= 275 */ + for (i = 0; i < 64; i++) { + const int j = dsp->idct_permutation[i]; + /* 16 <= qscale * quant_matrix[i] <= 7905 + * Assume x = ff_aanscales[i] * qscale * quant_matrix[i] + * 19952 <= x <= 249205026 + * (1 << 36) / 19952 >= (1 << 36) / (x) >= (1 << 36) / 249205026 + * 3444240 >= (1 << 36) / (x) >= 275 */ qmat[qscale][i] = (int)((UINT64_C(1) << (QMAT_SHIFT + 14)) / - (ff_aanscales[i] * qscale * quant_matrix[j])); + (ff_aanscales[i] * qscale * + quant_matrix[j])); } } else { - for(i=0;i<64;i++) { - const int j= dsp->idct_permutation[i]; + for (i = 0; i < 64; i++) { + const int j = dsp->idct_permutation[i]; /* We can safely suppose that 16 <= quant_matrix[i] <= 255 - So 16 <= qscale * quant_matrix[i] <= 7905 - so (1<<19) / 16 >= (1<<19) / (qscale * quant_matrix[i]) >= (1<<19) / 7905 - so 32768 >= (1<<19) / (qscale * quant_matrix[i]) >= 67 - */ - qmat[qscale][i] = (int)((UINT64_C(1) << QMAT_SHIFT) / (qscale * quant_matrix[j])); -// qmat [qscale][i] = (1 << QMAT_SHIFT_MMX) / (qscale * quant_matrix[i]); - qmat16[qscale][0][i] = (1 << QMAT_SHIFT_MMX) / (qscale * quant_matrix[j]); - - if(qmat16[qscale][0][i]==0 || qmat16[qscale][0][i]==128*256) qmat16[qscale][0][i]=128*256-1; - qmat16[qscale][1][i]= ROUNDED_DIV(bias<<(16-QUANT_BIAS_SHIFT), qmat16[qscale][0][i]); + * Assume x = qscale * quant_matrix[i] + * So 16 <= x <= 7905 + * so (1 << 19) / 16 >= (1 << 19) / (x) >= (1 << 19) / 7905 + * so 32768 >= (1 << 19) / (x) >= 67 */ + qmat[qscale][i] = (int)((UINT64_C(1) << QMAT_SHIFT) / + (qscale * quant_matrix[j])); + //qmat [qscale][i] = (1 << QMAT_SHIFT_MMX) / + // (qscale * quant_matrix[i]); + qmat16[qscale][0][i] = (1 << QMAT_SHIFT_MMX) / + (qscale * quant_matrix[j]); + + if (qmat16[qscale][0][i] == 0 || + qmat16[qscale][0][i] == 128 * 256) + qmat16[qscale][0][i] = 128 * 256 - 1; + qmat16[qscale][1][i] = + ROUNDED_DIV(bias << (16 - QUANT_BIAS_SHIFT), + qmat16[qscale][0][i]); } } - for(i=intra; i<64; i++){ - int64_t max= 8191; + for (i = intra; i < 64; i++) { + int64_t max = 8191; if (dsp->fdct == fdct_ifast #ifndef FAAN_POSTSCALE - || dsp->fdct == ff_faandct + || dsp->fdct == ff_faandct #endif - ) { - max = (8191LL*ff_aanscales[i]) >> 14; + ) { + max = (8191LL * ff_aanscales[i]) >> 14; } - while(((max * qmat[qscale][i]) >> shift) > INT_MAX){ + while (((max * qmat[qscale][i]) >> shift) > INT_MAX) { shift++; } } } - if(shift){ - av_log(NULL, AV_LOG_INFO, "Warning, QMAT_SHIFT is larger than %d, overflows possible\n", QMAT_SHIFT - shift); + if (shift) { + av_log(NULL, AV_LOG_INFO, + "Warning, QMAT_SHIFT is larger than %d, overflows possible\n", + QMAT_SHIFT - shift); } } -static inline void update_qscale(MpegEncContext *s){ - s->qscale= (s->lambda*139 + FF_LAMBDA_SCALE*64) >> (FF_LAMBDA_SHIFT + 7); - s->qscale= av_clip(s->qscale, s->avctx->qmin, s->avctx->qmax); +static inline void update_qscale(MpegEncContext *s) +{ + s->qscale = (s->lambda * 139 + FF_LAMBDA_SCALE * 64) >> + (FF_LAMBDA_SHIFT + 7); + s->qscale = av_clip(s->qscale, s->avctx->qmin, s->avctx->qmax); - s->lambda2= (s->lambda*s->lambda + FF_LAMBDA_SCALE/2) >> FF_LAMBDA_SHIFT; + s->lambda2 = (s->lambda * s->lambda + FF_LAMBDA_SCALE / 2) >> + FF_LAMBDA_SHIFT; } -void ff_write_quant_matrix(PutBitContext *pb, uint16_t *matrix){ +void ff_write_quant_matrix(PutBitContext *pb, uint16_t *matrix) +{ int i; - if(matrix){ + if (matrix) { put_bits(pb, 1, 1); - for(i=0;i<64;i++) { - put_bits(pb, 8, matrix[ ff_zigzag_direct[i] ]); + for (i = 0; i < 64; i++) { + put_bits(pb, 8, matrix[ff_zigzag_direct[i]]); } - }else + } else put_bits(pb, 1, 0); } /** * init s->current_picture.qscale_table from s->lambda_table */ -void ff_init_qscale_tab(MpegEncContext *s){ - int8_t * const qscale_table= s->current_picture.qscale_table; +void ff_init_qscale_tab(MpegEncContext *s) +{ + int8_t * const qscale_table = s->current_picture.f.qscale_table; int i; - for(i=0; imb_num; i++){ - unsigned int lam= s->lambda_table[ s->mb_index2xy[i] ]; - int qp= (lam*139 + FF_LAMBDA_SCALE*64) >> (FF_LAMBDA_SHIFT + 7); - qscale_table[ s->mb_index2xy[i] ]= av_clip(qp, s->avctx->qmin, s->avctx->qmax); + for (i = 0; i < s->mb_num; i++) { + unsigned int lam = s->lambda_table[s->mb_index2xy[i]]; + int qp = (lam * 139 + FF_LAMBDA_SCALE * 64) >> (FF_LAMBDA_SHIFT + 7); + qscale_table[s->mb_index2xy[i]] = av_clip(qp, s->avctx->qmin, + s->avctx->qmax); } } -static void copy_picture_attributes(MpegEncContext *s, AVFrame *dst, AVFrame *src){ +static void copy_picture_attributes(MpegEncContext *s, + AVFrame *dst, + AVFrame *src) +{ int i; dst->pict_type = src->pict_type; dst->quality = src->quality; dst->coded_picture_number = src->coded_picture_number; dst->display_picture_number = src->display_picture_number; -// dst->reference = src->reference; + //dst->reference = src->reference; dst->pts = src->pts; dst->interlaced_frame = src->interlaced_frame; dst->top_field_first = src->top_field_first; - if(s->avctx->me_threshold){ - if(!src->motion_val[0]) + if (s->avctx->me_threshold) { + if (!src->motion_val[0]) av_log(s->avctx, AV_LOG_ERROR, "AVFrame.motion_val not set!\n"); - if(!src->mb_type) + if (!src->mb_type) av_log(s->avctx, AV_LOG_ERROR, "AVFrame.mb_type not set!\n"); - if(!src->ref_index[0]) + if (!src->ref_index[0]) av_log(s->avctx, AV_LOG_ERROR, "AVFrame.ref_index not set!\n"); - if(src->motion_subsample_log2 != dst->motion_subsample_log2) - av_log(s->avctx, AV_LOG_ERROR, "AVFrame.motion_subsample_log2 doesn't match! (%d!=%d)\n", - src->motion_subsample_log2, dst->motion_subsample_log2); + if (src->motion_subsample_log2 != dst->motion_subsample_log2) + av_log(s->avctx, AV_LOG_ERROR, + "AVFrame.motion_subsample_log2 doesn't match! (%d!=%d)\n", + src->motion_subsample_log2, dst->motion_subsample_log2); - memcpy(dst->mb_type, src->mb_type, s->mb_stride * s->mb_height * sizeof(dst->mb_type[0])); + memcpy(dst->mb_type, src->mb_type, + s->mb_stride * s->mb_height * sizeof(dst->mb_type[0])); - for(i=0; i<2; i++){ - int stride= ((16*s->mb_width )>>src->motion_subsample_log2) + 1; - int height= ((16*s->mb_height)>>src->motion_subsample_log2); + for (i = 0; i < 2; i++) { + int stride = ((16 * s->mb_width ) >> + src->motion_subsample_log2) + 1; + int height = ((16 * s->mb_height) >> src->motion_subsample_log2); - if(src->motion_val[i] && src->motion_val[i] != dst->motion_val[i]){ - memcpy(dst->motion_val[i], src->motion_val[i], 2*stride*height*sizeof(int16_t)); + if (src->motion_val[i] && + src->motion_val[i] != dst->motion_val[i]) { + memcpy(dst->motion_val[i], src->motion_val[i], + 2 * stride * height * sizeof(int16_t)); } - if(src->ref_index[i] && src->ref_index[i] != dst->ref_index[i]){ - memcpy(dst->ref_index[i], src->ref_index[i], s->mb_stride*4*s->mb_height*sizeof(int8_t)); + if (src->ref_index[i] && src->ref_index[i] != dst->ref_index[i]) { + memcpy(dst->ref_index[i], src->ref_index[i], + s->mb_stride * 4 * s->mb_height * sizeof(int8_t)); } } } } -static void update_duplicate_context_after_me(MpegEncContext *dst, MpegEncContext *src){ +static void update_duplicate_context_after_me(MpegEncContext *dst, + MpegEncContext *src) +{ #define COPY(a) dst->a= src->a COPY(pict_type); COPY(current_picture); @@ -217,25 +251,26 @@ COPY(lambda2); COPY(picture_in_gop_number); COPY(gop_picture_number); - COPY(frame_pred_frame_dct); //FIXME don't set in encode_header - COPY(progressive_frame); //FIXME don't set in encode_header - COPY(partitioned_frame); //FIXME don't set in encode_header + COPY(frame_pred_frame_dct); // FIXME don't set in encode_header + COPY(progressive_frame); // FIXME don't set in encode_header + COPY(partitioned_frame); // FIXME don't set in encode_header #undef COPY } /** - * sets the given MpegEncContext to defaults for encoding. + * Set the given MpegEncContext to defaults for encoding. * the changed fields will not depend upon the prior state of the MpegEncContext. */ -static void MPV_encode_defaults(MpegEncContext *s){ +static void MPV_encode_defaults(MpegEncContext *s) +{ int i; MPV_common_defaults(s); - for(i=-16; i<16; i++){ - default_fcode_tab[i + MAX_MV]= 1; + for (i = -16; i < 16; i++) { + default_fcode_tab[i + MAX_MV] = 1; } - s->me.mv_penalty= default_mv_penalty; - s->fcode_tab= default_fcode_tab; + s->me.mv_penalty = default_mv_penalty; + s->fcode_tab = default_fcode_tab; } /* init video encoder */ @@ -249,27 +284,38 @@ switch (avctx->codec_id) { case CODEC_ID_MPEG2VIDEO: - if(avctx->pix_fmt != PIX_FMT_YUV420P && avctx->pix_fmt != PIX_FMT_YUV422P){ - av_log(avctx, AV_LOG_ERROR, "only YUV420 and YUV422 are supported\n"); + if (avctx->pix_fmt != PIX_FMT_YUV420P && + avctx->pix_fmt != PIX_FMT_YUV422P) { + av_log(avctx, AV_LOG_ERROR, + "only YUV420 and YUV422 are supported\n"); return -1; } break; case CODEC_ID_LJPEG: - if(avctx->pix_fmt != PIX_FMT_YUVJ420P && avctx->pix_fmt != PIX_FMT_YUVJ422P && avctx->pix_fmt != PIX_FMT_YUVJ444P && avctx->pix_fmt != PIX_FMT_BGRA && - ((avctx->pix_fmt != PIX_FMT_YUV420P && avctx->pix_fmt != PIX_FMT_YUV422P && avctx->pix_fmt != PIX_FMT_YUV444P) || avctx->strict_std_compliance>FF_COMPLIANCE_UNOFFICIAL)){ + if (avctx->pix_fmt != PIX_FMT_YUVJ420P && + avctx->pix_fmt != PIX_FMT_YUVJ422P && + avctx->pix_fmt != PIX_FMT_YUVJ444P && + avctx->pix_fmt != PIX_FMT_BGRA && + ((avctx->pix_fmt != PIX_FMT_YUV420P && + avctx->pix_fmt != PIX_FMT_YUV422P && + avctx->pix_fmt != PIX_FMT_YUV444P) || + avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL)) { av_log(avctx, AV_LOG_ERROR, "colorspace not supported in LJPEG\n"); return -1; } break; case CODEC_ID_MJPEG: - if(avctx->pix_fmt != PIX_FMT_YUVJ420P && avctx->pix_fmt != PIX_FMT_YUVJ422P && - ((avctx->pix_fmt != PIX_FMT_YUV420P && avctx->pix_fmt != PIX_FMT_YUV422P) || avctx->strict_std_compliance>FF_COMPLIANCE_UNOFFICIAL)){ + if (avctx->pix_fmt != PIX_FMT_YUVJ420P && + avctx->pix_fmt != PIX_FMT_YUVJ422P && + ((avctx->pix_fmt != PIX_FMT_YUV420P && + avctx->pix_fmt != PIX_FMT_YUV422P) || + avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL)) { av_log(avctx, AV_LOG_ERROR, "colorspace not supported in jpeg\n"); return -1; } break; default: - if(avctx->pix_fmt != PIX_FMT_YUV420P){ + if (avctx->pix_fmt != PIX_FMT_YUV420P) { av_log(avctx, AV_LOG_ERROR, "only YUV420 is supported\n"); return -1; } @@ -288,31 +334,36 @@ } s->bit_rate = avctx->bit_rate; - s->width = avctx->width; - s->height = avctx->height; - if(avctx->gop_size > 600 && avctx->strict_std_compliance>FF_COMPLIANCE_EXPERIMENTAL){ - av_log(avctx, AV_LOG_ERROR, "Warning keyframe interval too large! reducing it ...\n"); - avctx->gop_size=600; - } - s->gop_size = avctx->gop_size; - s->avctx = avctx; - s->flags= avctx->flags; - s->flags2= avctx->flags2; - s->max_b_frames= avctx->max_b_frames; - s->codec_id= avctx->codec->id; - s->luma_elim_threshold = avctx->luma_elim_threshold; - s->chroma_elim_threshold= avctx->chroma_elim_threshold; - s->strict_std_compliance= avctx->strict_std_compliance; - s->data_partitioning= avctx->flags & CODEC_FLAG_PART; - s->quarter_sample= (avctx->flags & CODEC_FLAG_QPEL)!=0; - s->mpeg_quant= avctx->mpeg_quant; - s->rtp_mode= !!avctx->rtp_payload_size; - s->intra_dc_precision= avctx->intra_dc_precision; + s->width = avctx->width; + s->height = avctx->height; + if (avctx->gop_size > 600 && + avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) { + av_log(avctx, AV_LOG_ERROR, + "Warning keyframe interval too large! reducing it ...\n"); + avctx->gop_size = 600; + } + s->gop_size = avctx->gop_size; + s->avctx = avctx; + s->flags = avctx->flags; + s->flags2 = avctx->flags2; + s->max_b_frames = avctx->max_b_frames; + s->codec_id = avctx->codec->id; + s->luma_elim_threshold = avctx->luma_elim_threshold; + s->chroma_elim_threshold = avctx->chroma_elim_threshold; + s->strict_std_compliance = avctx->strict_std_compliance; +#if FF_API_MPEGVIDEO_GLOBAL_OPTS + if (avctx->flags & CODEC_FLAG_PART) + s->data_partitioning = 1; +#endif + s->quarter_sample = (avctx->flags & CODEC_FLAG_QPEL) != 0; + s->mpeg_quant = avctx->mpeg_quant; + s->rtp_mode = !!avctx->rtp_payload_size; + s->intra_dc_precision = avctx->intra_dc_precision; s->user_specified_pts = AV_NOPTS_VALUE; if (s->gop_size <= 1) { s->intra_only = 1; - s->gop_size = 12; + s->gop_size = 12; } else { s->intra_only = 0; } @@ -322,384 +373,462 @@ /* Fixed QSCALE */ s->fixed_qscale = !!(avctx->flags & CODEC_FLAG_QSCALE); - s->adaptive_quant= ( s->avctx->lumi_masking - || s->avctx->dark_masking - || s->avctx->temporal_cplx_masking - || s->avctx->spatial_cplx_masking - || s->avctx->p_masking - || s->avctx->border_masking - || (s->flags&CODEC_FLAG_QP_RD)) - && !s->fixed_qscale; - - s->obmc= !!(s->flags & CODEC_FLAG_OBMC); - s->loop_filter= !!(s->flags & CODEC_FLAG_LOOP_FILTER); - s->alternate_scan= !!(s->flags & CODEC_FLAG_ALT_SCAN); - s->intra_vlc_format= !!(s->flags2 & CODEC_FLAG2_INTRA_VLC); - s->q_scale_type= !!(s->flags2 & CODEC_FLAG2_NON_LINEAR_QUANT); + s->adaptive_quant = (s->avctx->lumi_masking || + s->avctx->dark_masking || + s->avctx->temporal_cplx_masking || + s->avctx->spatial_cplx_masking || + s->avctx->p_masking || + s->avctx->border_masking || + (s->flags & CODEC_FLAG_QP_RD)) && + !s->fixed_qscale; + + s->loop_filter = !!(s->flags & CODEC_FLAG_LOOP_FILTER); +#if FF_API_MPEGVIDEO_GLOBAL_OPTS + s->alternate_scan = !!(s->flags & CODEC_FLAG_ALT_SCAN); + s->intra_vlc_format = !!(s->flags2 & CODEC_FLAG2_INTRA_VLC); + s->q_scale_type = !!(s->flags2 & CODEC_FLAG2_NON_LINEAR_QUANT); + s->obmc = !!(s->flags & CODEC_FLAG_OBMC); +#endif - if(avctx->rc_max_rate && !avctx->rc_buffer_size){ - av_log(avctx, AV_LOG_ERROR, "a vbv buffer size is needed, for encoding with a maximum bitrate\n"); + if (avctx->rc_max_rate && !avctx->rc_buffer_size) { + av_log(avctx, AV_LOG_ERROR, + "a vbv buffer size is needed, " + "for encoding with a maximum bitrate\n"); return -1; } - if(avctx->rc_min_rate && avctx->rc_max_rate != avctx->rc_min_rate){ - av_log(avctx, AV_LOG_INFO, "Warning min_rate > 0 but min_rate != max_rate isn't recommended!\n"); + if (avctx->rc_min_rate && avctx->rc_max_rate != avctx->rc_min_rate) { + av_log(avctx, AV_LOG_INFO, + "Warning min_rate > 0 but min_rate != max_rate isn't recommended!\n"); } - if(avctx->rc_min_rate && avctx->rc_min_rate > avctx->bit_rate){ + if (avctx->rc_min_rate && avctx->rc_min_rate > avctx->bit_rate) { av_log(avctx, AV_LOG_ERROR, "bitrate below min bitrate\n"); return -1; } - if(avctx->rc_max_rate && avctx->rc_max_rate < avctx->bit_rate){ + if (avctx->rc_max_rate && avctx->rc_max_rate < avctx->bit_rate) { av_log(avctx, AV_LOG_INFO, "bitrate above max bitrate\n"); return -1; } - if(avctx->rc_max_rate && avctx->rc_max_rate == avctx->bit_rate && avctx->rc_max_rate != avctx->rc_min_rate){ - av_log(avctx, AV_LOG_INFO, "impossible bitrate constraints, this will fail\n"); + if (avctx->rc_max_rate && + avctx->rc_max_rate == avctx->bit_rate && + avctx->rc_max_rate != avctx->rc_min_rate) { + av_log(avctx, AV_LOG_INFO, + "impossible bitrate constraints, this will fail\n"); } - if(avctx->rc_buffer_size && avctx->bit_rate*(int64_t)avctx->time_base.num > avctx->rc_buffer_size * (int64_t)avctx->time_base.den){ + if (avctx->rc_buffer_size && + avctx->bit_rate * (int64_t)avctx->time_base.num > + avctx->rc_buffer_size * (int64_t)avctx->time_base.den) { av_log(avctx, AV_LOG_ERROR, "VBV buffer too small for bitrate\n"); return -1; } - if(!s->fixed_qscale && avctx->bit_rate*av_q2d(avctx->time_base) > avctx->bit_rate_tolerance){ - av_log(avctx, AV_LOG_ERROR, "bitrate tolerance too small for bitrate\n"); + if (!s->fixed_qscale && + avctx->bit_rate * av_q2d(avctx->time_base) > + avctx->bit_rate_tolerance) { + av_log(avctx, AV_LOG_ERROR, + "bitrate tolerance too small for bitrate\n"); return -1; } - if( s->avctx->rc_max_rate && s->avctx->rc_min_rate == s->avctx->rc_max_rate - && (s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO) - && 90000LL * (avctx->rc_buffer_size-1) > s->avctx->rc_max_rate*0xFFFFLL){ - - av_log(avctx, AV_LOG_INFO, "Warning vbv_delay will be set to 0xFFFF (=VBR) as the specified vbv buffer is too large for the given bitrate!\n"); + if (s->avctx->rc_max_rate && + s->avctx->rc_min_rate == s->avctx->rc_max_rate && + (s->codec_id == CODEC_ID_MPEG1VIDEO || + s->codec_id == CODEC_ID_MPEG2VIDEO) && + 90000LL * (avctx->rc_buffer_size - 1) > + s->avctx->rc_max_rate * 0xFFFFLL) { + av_log(avctx, AV_LOG_INFO, + "Warning vbv_delay will be set to 0xFFFF (=VBR) as the " + "specified vbv buffer is too large for the given bitrate!\n"); } - if((s->flags & CODEC_FLAG_4MV) && s->codec_id != CODEC_ID_MPEG4 - && s->codec_id != CODEC_ID_H263 && s->codec_id != CODEC_ID_H263P && s->codec_id != CODEC_ID_FLV1){ + if ((s->flags & CODEC_FLAG_4MV) && s->codec_id != CODEC_ID_MPEG4 && + s->codec_id != CODEC_ID_H263 && s->codec_id != CODEC_ID_H263P && + s->codec_id != CODEC_ID_FLV1) { av_log(avctx, AV_LOG_ERROR, "4MV not supported by codec\n"); return -1; } - if(s->obmc && s->avctx->mb_decision != FF_MB_DECISION_SIMPLE){ - av_log(avctx, AV_LOG_ERROR, "OBMC is only supported with simple mb decision\n"); + if (s->obmc && s->avctx->mb_decision != FF_MB_DECISION_SIMPLE) { + av_log(avctx, AV_LOG_ERROR, + "OBMC is only supported with simple mb decision\n"); return -1; } - if(s->obmc && s->codec_id != CODEC_ID_H263 && s->codec_id != CODEC_ID_H263P){ +#if FF_API_MPEGVIDEO_GLOBAL_OPTS + if (s->obmc && s->codec_id != CODEC_ID_H263 && + s->codec_id != CODEC_ID_H263P) { av_log(avctx, AV_LOG_ERROR, "OBMC is only supported with H263(+)\n"); return -1; } +#endif - if(s->quarter_sample && s->codec_id != CODEC_ID_MPEG4){ + if (s->quarter_sample && s->codec_id != CODEC_ID_MPEG4) { av_log(avctx, AV_LOG_ERROR, "qpel not supported by codec\n"); return -1; } - if(s->data_partitioning && s->codec_id != CODEC_ID_MPEG4){ - av_log(avctx, AV_LOG_ERROR, "data partitioning not supported by codec\n"); +#if FF_API_MPEGVIDEO_GLOBAL_OPTS + if (s->data_partitioning && s->codec_id != CODEC_ID_MPEG4) { + av_log(avctx, AV_LOG_ERROR, + "data partitioning not supported by codec\n"); return -1; } +#endif - if(s->max_b_frames && s->codec_id != CODEC_ID_MPEG4 && s->codec_id != CODEC_ID_MPEG1VIDEO && s->codec_id != CODEC_ID_MPEG2VIDEO){ + if (s->max_b_frames && + s->codec_id != CODEC_ID_MPEG4 && + s->codec_id != CODEC_ID_MPEG1VIDEO && + s->codec_id != CODEC_ID_MPEG2VIDEO) { av_log(avctx, AV_LOG_ERROR, "b frames not supported by codec\n"); return -1; } - if ((s->codec_id == CODEC_ID_MPEG4 || s->codec_id == CODEC_ID_H263 || + if ((s->codec_id == CODEC_ID_MPEG4 || + s->codec_id == CODEC_ID_H263 || s->codec_id == CODEC_ID_H263P) && - (avctx->sample_aspect_ratio.num > 255 || avctx->sample_aspect_ratio.den > 255)) { - av_log(avctx, AV_LOG_ERROR, "Invalid pixel aspect ratio %i/%i, limit is 255/255\n", + (avctx->sample_aspect_ratio.num > 255 || + avctx->sample_aspect_ratio.den > 255)) { + av_log(avctx, AV_LOG_ERROR, + "Invalid pixel aspect ratio %i/%i, limit is 255/255\n", avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den); return -1; } - if((s->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME|CODEC_FLAG_ALT_SCAN)) - && s->codec_id != CODEC_ID_MPEG4 && s->codec_id != CODEC_ID_MPEG2VIDEO){ + if ((s->flags & (CODEC_FLAG_INTERLACED_DCT | CODEC_FLAG_INTERLACED_ME | + CODEC_FLAG_ALT_SCAN)) && + s->codec_id != CODEC_ID_MPEG4 && s->codec_id != CODEC_ID_MPEG2VIDEO) { av_log(avctx, AV_LOG_ERROR, "interlacing not supported by codec\n"); return -1; } - if(s->mpeg_quant && s->codec_id != CODEC_ID_MPEG4){ //FIXME mpeg2 uses that too - av_log(avctx, AV_LOG_ERROR, "mpeg2 style quantization not supported by codec\n"); + // FIXME mpeg2 uses that too + if (s->mpeg_quant && s->codec_id != CODEC_ID_MPEG4) { + av_log(avctx, AV_LOG_ERROR, + "mpeg2 style quantization not supported by codec\n"); return -1; } - if((s->flags & CODEC_FLAG_CBP_RD) && !avctx->trellis){ + if ((s->flags & CODEC_FLAG_CBP_RD) && !avctx->trellis) { av_log(avctx, AV_LOG_ERROR, "CBP RD needs trellis quant\n"); return -1; } - if((s->flags & CODEC_FLAG_QP_RD) && s->avctx->mb_decision != FF_MB_DECISION_RD){ + if ((s->flags & CODEC_FLAG_QP_RD) && + s->avctx->mb_decision != FF_MB_DECISION_RD) { av_log(avctx, AV_LOG_ERROR, "QP RD needs mbd=2\n"); return -1; } - if(s->avctx->scenechange_threshold < 1000000000 && (s->flags & CODEC_FLAG_CLOSED_GOP)){ - av_log(avctx, AV_LOG_ERROR, "closed gop with scene change detection are not supported yet, set threshold to 1000000000\n"); + if (s->avctx->scenechange_threshold < 1000000000 && + (s->flags & CODEC_FLAG_CLOSED_GOP)) { + av_log(avctx, AV_LOG_ERROR, + "closed gop with scene change detection are not supported yet, " + "set threshold to 1000000000\n"); return -1; } - if((s->flags2 & CODEC_FLAG2_INTRA_VLC) && s->codec_id != CODEC_ID_MPEG2VIDEO){ - av_log(avctx, AV_LOG_ERROR, "intra vlc table not supported by codec\n"); + if ((s->flags2 & CODEC_FLAG2_INTRA_VLC) && + s->codec_id != CODEC_ID_MPEG2VIDEO) { + av_log(avctx, AV_LOG_ERROR, + "intra vlc table not supported by codec\n"); return -1; } - if(s->flags & CODEC_FLAG_LOW_DELAY){ - if (s->codec_id != CODEC_ID_MPEG2VIDEO){ - av_log(avctx, AV_LOG_ERROR, "low delay forcing is only available for mpeg2\n"); + if (s->flags & CODEC_FLAG_LOW_DELAY) { + if (s->codec_id != CODEC_ID_MPEG2VIDEO) { + av_log(avctx, AV_LOG_ERROR, + "low delay forcing is only available for mpeg2\n"); return -1; } - if (s->max_b_frames != 0){ - av_log(avctx, AV_LOG_ERROR, "b frames cannot be used with low delay\n"); + if (s->max_b_frames != 0) { + av_log(avctx, AV_LOG_ERROR, + "b frames cannot be used with low delay\n"); return -1; } } - if(s->q_scale_type == 1){ - if(s->codec_id != CODEC_ID_MPEG2VIDEO){ - av_log(avctx, AV_LOG_ERROR, "non linear quant is only available for mpeg2\n"); + if (s->q_scale_type == 1) { +#if FF_API_MPEGVIDEO_GLOBAL_OPTS + if (s->codec_id != CODEC_ID_MPEG2VIDEO) { + av_log(avctx, AV_LOG_ERROR, + "non linear quant is only available for mpeg2\n"); return -1; } - if(avctx->qmax > 12){ - av_log(avctx, AV_LOG_ERROR, "non linear quant only supports qmax <= 12 currently\n"); +#endif + if (avctx->qmax > 12) { + av_log(avctx, AV_LOG_ERROR, + "non linear quant only supports qmax <= 12 currently\n"); return -1; } } - if(s->avctx->thread_count > 1 && s->codec_id != CODEC_ID_MPEG4 - && s->codec_id != CODEC_ID_MPEG1VIDEO && s->codec_id != CODEC_ID_MPEG2VIDEO - && (s->codec_id != CODEC_ID_H263P || !(s->flags & CODEC_FLAG_H263P_SLICE_STRUCT))){ - av_log(avctx, AV_LOG_ERROR, "multi threaded encoding not supported by codec\n"); + if (s->avctx->thread_count > 1 && + s->codec_id != CODEC_ID_MPEG4 && + s->codec_id != CODEC_ID_MPEG1VIDEO && + s->codec_id != CODEC_ID_MPEG2VIDEO && + (s->codec_id != CODEC_ID_H263P || + !(s->flags & CODEC_FLAG_H263P_SLICE_STRUCT))) { + av_log(avctx, AV_LOG_ERROR, + "multi threaded encoding not supported by codec\n"); return -1; } - if(s->avctx->thread_count < 1){ - av_log(avctx, AV_LOG_ERROR, "automatic thread number detection not supported by codec, patch welcome\n"); + if (s->avctx->thread_count < 1) { + av_log(avctx, AV_LOG_ERROR, + "automatic thread number detection not supported by codec," + "patch welcome\n"); return -1; } - if(s->avctx->thread_count > 1) - s->rtp_mode= 1; + if (s->avctx->thread_count > 1) + s->rtp_mode = 1; - if(!avctx->time_base.den || !avctx->time_base.num){ + if (!avctx->time_base.den || !avctx->time_base.num) { av_log(avctx, AV_LOG_ERROR, "framerate not set\n"); return -1; } - i= (INT_MAX/2+128)>>8; - if(avctx->me_threshold >= i){ - av_log(avctx, AV_LOG_ERROR, "me_threshold too large, max is %d\n", i - 1); + i = (INT_MAX / 2 + 128) >> 8; + if (avctx->me_threshold >= i) { + av_log(avctx, AV_LOG_ERROR, "me_threshold too large, max is %d\n", + i - 1); return -1; } - if(avctx->mb_threshold >= i){ - av_log(avctx, AV_LOG_ERROR, "mb_threshold too large, max is %d\n", i - 1); + if (avctx->mb_threshold >= i) { + av_log(avctx, AV_LOG_ERROR, "mb_threshold too large, max is %d\n", + i - 1); return -1; } - if(avctx->b_frame_strategy && (avctx->flags&CODEC_FLAG_PASS2)){ - av_log(avctx, AV_LOG_INFO, "notice: b_frame_strategy only affects the first pass\n"); + if (avctx->b_frame_strategy && (avctx->flags & CODEC_FLAG_PASS2)) { + av_log(avctx, AV_LOG_INFO, + "notice: b_frame_strategy only affects the first pass\n"); avctx->b_frame_strategy = 0; } - i= av_gcd(avctx->time_base.den, avctx->time_base.num); - if(i > 1){ + i = av_gcd(avctx->time_base.den, avctx->time_base.num); + if (i > 1) { av_log(avctx, AV_LOG_INFO, "removing common factors from framerate\n"); avctx->time_base.den /= i; avctx->time_base.num /= i; -// return -1; + //return -1; } - if(s->mpeg_quant || s->codec_id==CODEC_ID_MPEG1VIDEO || s->codec_id==CODEC_ID_MPEG2VIDEO || s->codec_id==CODEC_ID_MJPEG){ - s->intra_quant_bias= 3<<(QUANT_BIAS_SHIFT-3); //(a + x*3/8)/x - s->inter_quant_bias= 0; - }else{ - s->intra_quant_bias=0; - s->inter_quant_bias=-(1<<(QUANT_BIAS_SHIFT-2)); //(a - x/4)/x - } - - if(avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS) - s->intra_quant_bias= avctx->intra_quant_bias; - if(avctx->inter_quant_bias != FF_DEFAULT_QUANT_BIAS) - s->inter_quant_bias= avctx->inter_quant_bias; - - avcodec_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift, &chroma_v_shift); - - if(avctx->codec_id == CODEC_ID_MPEG4 && s->avctx->time_base.den > (1<<16)-1){ - av_log(avctx, AV_LOG_ERROR, "timebase %d/%d not supported by MPEG 4 standard, " - "the maximum admitted value for the timebase denominator is %d\n", - s->avctx->time_base.num, s->avctx->time_base.den, (1<<16)-1); + if (s->mpeg_quant || s->codec_id == CODEC_ID_MPEG1VIDEO || + s->codec_id == CODEC_ID_MPEG2VIDEO || s->codec_id == CODEC_ID_MJPEG) { + // (a + x * 3 / 8) / x + s->intra_quant_bias = 3 << (QUANT_BIAS_SHIFT - 3); + s->inter_quant_bias = 0; + } else { + s->intra_quant_bias = 0; + // (a - x / 4) / x + s->inter_quant_bias = -(1 << (QUANT_BIAS_SHIFT - 2)); + } + + if (avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS) + s->intra_quant_bias = avctx->intra_quant_bias; + if (avctx->inter_quant_bias != FF_DEFAULT_QUANT_BIAS) + s->inter_quant_bias = avctx->inter_quant_bias; + + avcodec_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift, + &chroma_v_shift); + + if (avctx->codec_id == CODEC_ID_MPEG4 && + s->avctx->time_base.den > (1 << 16) - 1) { + av_log(avctx, AV_LOG_ERROR, + "timebase %d/%d not supported by MPEG 4 standard, " + "the maximum admitted value for the timebase denominator " + "is %d\n", s->avctx->time_base.num, s->avctx->time_base.den, + (1 << 16) - 1); return -1; } s->time_increment_bits = av_log2(s->avctx->time_base.den - 1) + 1; - switch(avctx->codec->id) { + switch (avctx->codec->id) { case CODEC_ID_MPEG1VIDEO: s->out_format = FMT_MPEG1; - s->low_delay= !!(s->flags & CODEC_FLAG_LOW_DELAY); - avctx->delay= s->low_delay ? 0 : (s->max_b_frames + 1); + s->low_delay = !!(s->flags & CODEC_FLAG_LOW_DELAY); + avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1); break; case CODEC_ID_MPEG2VIDEO: s->out_format = FMT_MPEG1; - s->low_delay= !!(s->flags & CODEC_FLAG_LOW_DELAY); - avctx->delay= s->low_delay ? 0 : (s->max_b_frames + 1); - s->rtp_mode= 1; + s->low_delay = !!(s->flags & CODEC_FLAG_LOW_DELAY); + avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1); + s->rtp_mode = 1; break; case CODEC_ID_LJPEG: case CODEC_ID_MJPEG: s->out_format = FMT_MJPEG; s->intra_only = 1; /* force intra only for jpeg */ - if(avctx->codec->id == CODEC_ID_LJPEG && avctx->pix_fmt == PIX_FMT_BGRA){ + if (avctx->codec->id == CODEC_ID_LJPEG && + avctx->pix_fmt == PIX_FMT_BGRA) { s->mjpeg_vsample[0] = s->mjpeg_hsample[0] = s->mjpeg_vsample[1] = s->mjpeg_hsample[1] = s->mjpeg_vsample[2] = s->mjpeg_hsample[2] = 1; - }else{ + } else { s->mjpeg_vsample[0] = 2; - s->mjpeg_vsample[1] = 2>>chroma_v_shift; - s->mjpeg_vsample[2] = 2>>chroma_v_shift; + s->mjpeg_vsample[1] = 2 >> chroma_v_shift; + s->mjpeg_vsample[2] = 2 >> chroma_v_shift; s->mjpeg_hsample[0] = 2; - s->mjpeg_hsample[1] = 2>>chroma_h_shift; - s->mjpeg_hsample[2] = 2>>chroma_h_shift; + s->mjpeg_hsample[1] = 2 >> chroma_h_shift; + s->mjpeg_hsample[2] = 2 >> chroma_h_shift; } - if (!(CONFIG_MJPEG_ENCODER || CONFIG_LJPEG_ENCODER) - || ff_mjpeg_encode_init(s) < 0) + if (!(CONFIG_MJPEG_ENCODER || CONFIG_LJPEG_ENCODER) || + ff_mjpeg_encode_init(s) < 0) return -1; - avctx->delay=0; - s->low_delay=1; + avctx->delay = 0; + s->low_delay = 1; break; case CODEC_ID_H261: - if (!CONFIG_H261_ENCODER) return -1; + if (!CONFIG_H261_ENCODER) + return -1; if (ff_h261_get_picture_format(s->width, s->height) < 0) { - av_log(avctx, AV_LOG_ERROR, "The specified picture size of %dx%d is not valid for the H.261 codec.\nValid sizes are 176x144, 352x288\n", s->width, s->height); + av_log(avctx, AV_LOG_ERROR, + "The specified picture size of %dx%d is not valid for the " + "H.261 codec.\nValid sizes are 176x144, 352x288\n", + s->width, s->height); return -1; } s->out_format = FMT_H261; - avctx->delay=0; - s->low_delay=1; + avctx->delay = 0; + s->low_delay = 1; break; case CODEC_ID_H263: - if (!CONFIG_H263_ENCODER) return -1; - if (ff_match_2uint16(h263_format, FF_ARRAY_ELEMS(h263_format), s->width, s->height) == 8) { - av_log(avctx, AV_LOG_INFO, "The specified picture size of %dx%d is not valid for the H.263 codec.\nValid sizes are 128x96, 176x144, 352x288, 704x576, and 1408x1152. Try H.263+.\n", s->width, s->height); + if (!CONFIG_H263_ENCODER) + return -1; + if (ff_match_2uint16(h263_format, FF_ARRAY_ELEMS(h263_format), + s->width, s->height) == 8) { + av_log(avctx, AV_LOG_INFO, + "The specified picture size of %dx%d is not valid for " + "the H.263 codec.\nValid sizes are 128x96, 176x144, " + "352x288, 704x576, and 1408x1152." + "Try H.263+.\n", s->width, s->height); return -1; } s->out_format = FMT_H263; - s->obmc= (avctx->flags & CODEC_FLAG_OBMC) ? 1:0; - avctx->delay=0; - s->low_delay=1; + avctx->delay = 0; + s->low_delay = 1; break; case CODEC_ID_H263P: s->out_format = FMT_H263; - s->h263_plus = 1; + s->h263_plus = 1; /* Fx */ - s->umvplus = (avctx->flags & CODEC_FLAG_H263P_UMV) ? 1:0; - s->h263_aic= (avctx->flags & CODEC_FLAG_AC_PRED) ? 1:0; - s->modified_quant= s->h263_aic; - s->alt_inter_vlc= (avctx->flags & CODEC_FLAG_H263P_AIV) ? 1:0; - s->obmc= (avctx->flags & CODEC_FLAG_OBMC) ? 1:0; - s->loop_filter= (avctx->flags & CODEC_FLAG_LOOP_FILTER) ? 1:0; - s->unrestricted_mv= s->obmc || s->loop_filter || s->umvplus; - s->h263_slice_structured= (s->flags & CODEC_FLAG_H263P_SLICE_STRUCT) ? 1:0; +#if FF_API_MPEGVIDEO_GLOBAL_OPTS + if (avctx->flags & CODEC_FLAG_H263P_UMV) + s->umvplus = 1; + if (avctx->flags & CODEC_FLAG_H263P_AIV) + s->alt_inter_vlc = 1; + if (avctx->flags & CODEC_FLAG_H263P_SLICE_STRUCT) + s->h263_slice_structured = 1; +#endif + s->h263_aic = (avctx->flags & CODEC_FLAG_AC_PRED) ? 1 : 0; + s->modified_quant = s->h263_aic; + s->loop_filter = (avctx->flags & CODEC_FLAG_LOOP_FILTER) ? 1 : 0; + s->unrestricted_mv = s->obmc || s->loop_filter || s->umvplus; /* /Fx */ /* These are just to be sure */ - avctx->delay=0; - s->low_delay=1; + avctx->delay = 0; + s->low_delay = 1; break; case CODEC_ID_FLV1: - s->out_format = FMT_H263; - s->h263_flv = 2; /* format = 1; 11-bit codes */ + s->out_format = FMT_H263; + s->h263_flv = 2; /* format = 1; 11-bit codes */ s->unrestricted_mv = 1; - s->rtp_mode=0; /* don't allow GOB */ - avctx->delay=0; - s->low_delay=1; + s->rtp_mode = 0; /* don't allow GOB */ + avctx->delay = 0; + s->low_delay = 1; break; case CODEC_ID_RV10: s->out_format = FMT_H263; - avctx->delay=0; - s->low_delay=1; + avctx->delay = 0; + s->low_delay = 1; break; case CODEC_ID_RV20: - s->out_format = FMT_H263; - avctx->delay=0; - s->low_delay=1; - s->modified_quant=1; - s->h263_aic=1; - s->h263_plus=1; - s->loop_filter=1; - s->unrestricted_mv= 0; + s->out_format = FMT_H263; + avctx->delay = 0; + s->low_delay = 1; + s->modified_quant = 1; + s->h263_aic = 1; + s->h263_plus = 1; + s->loop_filter = 1; + s->unrestricted_mv = 0; break; case CODEC_ID_MPEG4: - s->out_format = FMT_H263; - s->h263_pred = 1; + s->out_format = FMT_H263; + s->h263_pred = 1; s->unrestricted_mv = 1; - s->low_delay= s->max_b_frames ? 0 : 1; - avctx->delay= s->low_delay ? 0 : (s->max_b_frames + 1); + s->low_delay = s->max_b_frames ? 0 : 1; + avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1); break; case CODEC_ID_MSMPEG4V2: - s->out_format = FMT_H263; - s->h263_pred = 1; + s->out_format = FMT_H263; + s->h263_pred = 1; s->unrestricted_mv = 1; - s->msmpeg4_version= 2; - avctx->delay=0; - s->low_delay=1; + s->msmpeg4_version = 2; + avctx->delay = 0; + s->low_delay = 1; break; case CODEC_ID_MSMPEG4V3: - s->out_format = FMT_H263; - s->h263_pred = 1; - s->unrestricted_mv = 1; - s->msmpeg4_version= 3; - s->flipflop_rounding=1; - avctx->delay=0; - s->low_delay=1; + s->out_format = FMT_H263; + s->h263_pred = 1; + s->unrestricted_mv = 1; + s->msmpeg4_version = 3; + s->flipflop_rounding = 1; + avctx->delay = 0; + s->low_delay = 1; break; case CODEC_ID_WMV1: - s->out_format = FMT_H263; - s->h263_pred = 1; - s->unrestricted_mv = 1; - s->msmpeg4_version= 4; - s->flipflop_rounding=1; - avctx->delay=0; - s->low_delay=1; + s->out_format = FMT_H263; + s->h263_pred = 1; + s->unrestricted_mv = 1; + s->msmpeg4_version = 4; + s->flipflop_rounding = 1; + avctx->delay = 0; + s->low_delay = 1; break; case CODEC_ID_WMV2: - s->out_format = FMT_H263; - s->h263_pred = 1; - s->unrestricted_mv = 1; - s->msmpeg4_version= 5; - s->flipflop_rounding=1; - avctx->delay=0; - s->low_delay=1; + s->out_format = FMT_H263; + s->h263_pred = 1; + s->unrestricted_mv = 1; + s->msmpeg4_version = 5; + s->flipflop_rounding = 1; + avctx->delay = 0; + s->low_delay = 1; break; default: return -1; } - avctx->has_b_frames= !s->low_delay; + avctx->has_b_frames = !s->low_delay; s->encoding = 1; - s->progressive_frame= - s->progressive_sequence= !(avctx->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME|CODEC_FLAG_ALT_SCAN)); + s->progressive_frame = + s->progressive_sequence = !(avctx->flags & (CODEC_FLAG_INTERLACED_DCT | + CODEC_FLAG_INTERLACED_ME | + CODEC_FLAG_ALT_SCAN)); /* init */ if (MPV_common_init(s) < 0) return -1; - if(!s->dct_quantize) + if (!s->dct_quantize) s->dct_quantize = dct_quantize_c; - if(!s->denoise_dct) - s->denoise_dct = denoise_dct_c; + if (!s->denoise_dct) + s->denoise_dct = denoise_dct_c; s->fast_dct_quantize = s->dct_quantize; - if(avctx->trellis) - s->dct_quantize = dct_quantize_trellis_c; + if (avctx->trellis) + s->dct_quantize = dct_quantize_trellis_c; - if((CONFIG_H263P_ENCODER || CONFIG_RV20_ENCODER) && s->modified_quant) - s->chroma_qscale_table= ff_h263_chroma_qscale_table; + if ((CONFIG_H263P_ENCODER || CONFIG_RV20_ENCODER) && s->modified_quant) + s->chroma_qscale_table = ff_h263_chroma_qscale_table; - s->quant_precision=5; + s->quant_precision = 5; ff_set_cmp(&s->dsp, s->dsp.ildct_cmp, s->avctx->ildct_cmp); ff_set_cmp(&s->dsp, s->dsp.frame_skip_cmp, s->avctx->frame_skip_cmp); @@ -715,22 +844,23 @@ ff_mpeg1_encode_init(s); /* init q matrix */ - for(i=0;i<64;i++) { - int j= s->dsp.idct_permutation[i]; - if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->mpeg_quant){ + for (i = 0; i < 64; i++) { + int j = s->dsp.idct_permutation[i]; + if (CONFIG_MPEG4_ENCODER && s->codec_id == CODEC_ID_MPEG4 && + s->mpeg_quant) { s->intra_matrix[j] = ff_mpeg4_default_intra_matrix[i]; s->inter_matrix[j] = ff_mpeg4_default_non_intra_matrix[i]; - }else if(s->out_format == FMT_H263 || s->out_format == FMT_H261){ + } else if (s->out_format == FMT_H263 || s->out_format == FMT_H261) { s->intra_matrix[j] = s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i]; - }else - { /* mpeg1/2 */ + } else { + /* mpeg1/2 */ s->intra_matrix[j] = ff_mpeg1_default_intra_matrix[i]; s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i]; } - if(s->avctx->intra_matrix) + if (s->avctx->intra_matrix) s->intra_matrix[j] = s->avctx->intra_matrix[i]; - if(s->avctx->inter_matrix) + if (s->avctx->inter_matrix) s->inter_matrix[j] = s->avctx->inter_matrix[i]; } @@ -738,12 +868,14 @@ /* for mjpeg, we do include qscale in the matrix */ if (s->out_format != FMT_MJPEG) { ff_convert_matrix(&s->dsp, s->q_intra_matrix, s->q_intra_matrix16, - s->intra_matrix, s->intra_quant_bias, avctx->qmin, 31, 1); + s->intra_matrix, s->intra_quant_bias, avctx->qmin, + 31, 1); ff_convert_matrix(&s->dsp, s->q_inter_matrix, s->q_inter_matrix16, - s->inter_matrix, s->inter_quant_bias, avctx->qmin, 31, 0); + s->inter_matrix, s->inter_quant_bias, avctx->qmin, + 31, 0); } - if(ff_rate_control_init(s) < 0) + if (ff_rate_control_init(s) < 0) return -1; return 0; @@ -756,7 +888,8 @@ ff_rate_control_uninit(s); MPV_common_end(s); - if ((CONFIG_MJPEG_ENCODER || CONFIG_LJPEG_ENCODER) && s->out_format == FMT_MJPEG) + if ((CONFIG_MJPEG_ENCODER || CONFIG_LJPEG_ENCODER) && + s->out_format == FMT_MJPEG) ff_mjpeg_encode_close(s); av_freep(&avctx->extradata); @@ -764,129 +897,148 @@ return 0; } -static int get_sae(uint8_t *src, int ref, int stride){ +static int get_sae(uint8_t *src, int ref, int stride) +{ int x,y; - int acc=0; + int acc = 0; - for(y=0; y<16; y++){ - for(x=0; x<16; x++){ - acc+= FFABS(src[x+y*stride] - ref); + for (y = 0; y < 16; y++) { + for (x = 0; x < 16; x++) { + acc += FFABS(src[x + y * stride] - ref); } } return acc; } -static int get_intra_count(MpegEncContext *s, uint8_t *src, uint8_t *ref, int stride){ +static int get_intra_count(MpegEncContext *s, uint8_t *src, + uint8_t *ref, int stride) +{ int x, y, w, h; - int acc=0; + int acc = 0; - w= s->width &~15; - h= s->height&~15; + w = s->width & ~15; + h = s->height & ~15; - for(y=0; ydsp.sad[0](NULL, src + offset, ref + offset, stride, 16); - int mean= (s->dsp.pix_sum(src + offset, stride) + 128)>>8; - int sae = get_sae(src + offset, mean, stride); + for (y = 0; y < h; y += 16) { + for (x = 0; x < w; x += 16) { + int offset = x + y * stride; + int sad = s->dsp.sad[0](NULL, src + offset, ref + offset, stride, + 16); + int mean = (s->dsp.pix_sum(src + offset, stride) + 128) >> 8; + int sae = get_sae(src + offset, mean, stride); - acc+= sae + 500 < sad; + acc += sae + 500 < sad; } } return acc; } -static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg){ - AVFrame *pic=NULL; +static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg) +{ + AVFrame *pic = NULL; int64_t pts; int i; - const int encoding_delay= s->max_b_frames; - int direct=1; + const int encoding_delay = s->max_b_frames; + int direct = 1; - if(pic_arg){ - pts= pic_arg->pts; - pic_arg->display_picture_number= s->input_picture_number++; - - if(pts != AV_NOPTS_VALUE){ - if(s->user_specified_pts != AV_NOPTS_VALUE){ - int64_t time= pts; - int64_t last= s->user_specified_pts; - - if(time <= last){ - av_log(s->avctx, AV_LOG_ERROR, "Error, Invalid timestamp=%"PRId64", last=%"PRId64"\n", pts, s->user_specified_pts); + if (pic_arg) { + pts = pic_arg->pts; + pic_arg->display_picture_number = s->input_picture_number++; + + if (pts != AV_NOPTS_VALUE) { + if (s->user_specified_pts != AV_NOPTS_VALUE) { + int64_t time = pts; + int64_t last = s->user_specified_pts; + + if (time <= last) { + av_log(s->avctx, AV_LOG_ERROR, + "Error, Invalid timestamp=%"PRId64", " + "last=%"PRId64"\n", pts, s->user_specified_pts); return -1; } } - s->user_specified_pts= pts; - }else{ - if(s->user_specified_pts != AV_NOPTS_VALUE){ - s->user_specified_pts= - pts= s->user_specified_pts + 1; - av_log(s->avctx, AV_LOG_INFO, "Warning: AVFrame.pts=? trying to guess (%"PRId64")\n", pts); - }else{ - pts= pic_arg->display_picture_number; + s->user_specified_pts = pts; + } else { + if (s->user_specified_pts != AV_NOPTS_VALUE) { + s->user_specified_pts = + pts = s->user_specified_pts + 1; + av_log(s->avctx, AV_LOG_INFO, + "Warning: AVFrame.pts=? trying to guess (%"PRId64")\n", + pts); + } else { + pts = pic_arg->display_picture_number; } } } - if(pic_arg){ - if(encoding_delay && !(s->flags&CODEC_FLAG_INPUT_PRESERVED)) direct=0; - if(pic_arg->linesize[0] != s->linesize) direct=0; - if(pic_arg->linesize[1] != s->uvlinesize) direct=0; - if(pic_arg->linesize[2] != s->uvlinesize) direct=0; + if (pic_arg) { + if (encoding_delay && !(s->flags & CODEC_FLAG_INPUT_PRESERVED)) + direct = 0; + if (pic_arg->linesize[0] != s->linesize) + direct = 0; + if (pic_arg->linesize[1] != s->uvlinesize) + direct = 0; + if (pic_arg->linesize[2] != s->uvlinesize) + direct = 0; -// av_log(AV_LOG_DEBUG, "%d %d %d %d\n",pic_arg->linesize[0], pic_arg->linesize[1], s->linesize, s->uvlinesize); + //av_log(AV_LOG_DEBUG, "%d %d %d %d\n",pic_arg->linesize[0], + // pic_arg->linesize[1], s->linesize, s->uvlinesize); - if(direct){ - i= ff_find_unused_picture(s, 1); + if (direct) { + i = ff_find_unused_picture(s, 1); + if (i < 0) + return i; - pic= (AVFrame*)&s->picture[i]; - pic->reference= 3; + pic = (AVFrame *) &s->picture[i]; + pic->reference = 3; - for(i=0; i<4; i++){ - pic->data[i]= pic_arg->data[i]; - pic->linesize[i]= pic_arg->linesize[i]; + for (i = 0; i < 4; i++) { + pic->data[i] = pic_arg->data[i]; + pic->linesize[i] = pic_arg->linesize[i]; } - if(ff_alloc_picture(s, (Picture*)pic, 1) < 0){ + if (ff_alloc_picture(s, (Picture *) pic, 1) < 0) { return -1; } - }else{ - i= ff_find_unused_picture(s, 0); + } else { + i = ff_find_unused_picture(s, 0); + if (i < 0) + return i; - pic= (AVFrame*)&s->picture[i]; - pic->reference= 3; + pic = (AVFrame *) &s->picture[i]; + pic->reference = 3; - if(ff_alloc_picture(s, (Picture*)pic, 0) < 0){ + if (ff_alloc_picture(s, (Picture *) pic, 0) < 0) { return -1; } - if( pic->data[0] + INPLACE_OFFSET == pic_arg->data[0] - && pic->data[1] + INPLACE_OFFSET == pic_arg->data[1] - && pic->data[2] + INPLACE_OFFSET == pic_arg->data[2]){ - // empty - }else{ + if (pic->data[0] + INPLACE_OFFSET == pic_arg->data[0] && + pic->data[1] + INPLACE_OFFSET == pic_arg->data[1] && + pic->data[2] + INPLACE_OFFSET == pic_arg->data[2]) { + // empty + } else { int h_chroma_shift, v_chroma_shift; - avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &h_chroma_shift, &v_chroma_shift); + avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &h_chroma_shift, + &v_chroma_shift); - for(i=0; i<3; i++){ - int src_stride= pic_arg->linesize[i]; - int dst_stride= i ? s->uvlinesize : s->linesize; - int h_shift= i ? h_chroma_shift : 0; - int v_shift= i ? v_chroma_shift : 0; - int w= s->width >>h_shift; - int h= s->height>>v_shift; - uint8_t *src= pic_arg->data[i]; - uint8_t *dst= pic->data[i]; - - if(!s->avctx->rc_buffer_size) - dst +=INPLACE_OFFSET; - - if(src_stride==dst_stride) - memcpy(dst, src, src_stride*h); - else{ - while(h--){ + for (i = 0; i < 3; i++) { + int src_stride = pic_arg->linesize[i]; + int dst_stride = i ? s->uvlinesize : s->linesize; + int h_shift = i ? h_chroma_shift : 0; + int v_shift = i ? v_chroma_shift : 0; + int w = s->width >> h_shift; + int h = s->height >> v_shift; + uint8_t *src = pic_arg->data[i]; + uint8_t *dst = pic->data[i]; + + if (!s->avctx->rc_buffer_size) + dst += INPLACE_OFFSET; + + if (src_stride == dst_stride) + memcpy(dst, src, src_stride * h); + else { + while (h--) { memcpy(dst, src, w); dst += dst_stride; src += src_stride; @@ -896,146 +1048,166 @@ } } copy_picture_attributes(s, pic, pic_arg); - pic->pts= pts; //we set this here to avoid modifiying pic_arg + pic->pts = pts; // we set this here to avoid modifiying pic_arg } /* shift buffer entries */ - for(i=1; iencoding_delay+1*/; i++) - s->input_picture[i-1]= s->input_picture[i]; + for (i = 1; i < MAX_PICTURE_COUNT /*s->encoding_delay + 1*/; i++) + s->input_picture[i - 1] = s->input_picture[i]; - s->input_picture[encoding_delay]= (Picture*)pic; + s->input_picture[encoding_delay] = (Picture*) pic; return 0; } -static int skip_check(MpegEncContext *s, Picture *p, Picture *ref){ +static int skip_check(MpegEncContext *s, Picture *p, Picture *ref) +{ int x, y, plane; - int score=0; - int64_t score64=0; + int score = 0; + int64_t score64 = 0; - for(plane=0; plane<3; plane++){ - const int stride= p->linesize[plane]; - const int bw= plane ? 1 : 2; - for(y=0; ymb_height*bw; y++){ - for(x=0; xmb_width*bw; x++){ - int off= p->type == FF_BUFFER_TYPE_SHARED ? 0: 16; - int v= s->dsp.frame_skip_cmp[1](s, p->data[plane] + 8*(x + y*stride)+off, ref->data[plane] + 8*(x + y*stride), stride, 8); + for (plane = 0; plane < 3; plane++) { + const int stride = p->f.linesize[plane]; + const int bw = plane ? 1 : 2; + for (y = 0; y < s->mb_height * bw; y++) { + for (x = 0; x < s->mb_width * bw; x++) { + int off = p->f.type == FF_BUFFER_TYPE_SHARED ? 0 : 16; + uint8_t *dptr = p->f.data[plane] + 8 * (x + y * stride) + off; + uint8_t *rptr = ref->f.data[plane] + 8 * (x + y * stride); + int v = s->dsp.frame_skip_cmp[1](s, dptr, rptr, stride, 8); - switch(s->avctx->frame_skip_exp){ - case 0: score= FFMAX(score, v); break; - case 1: score+= FFABS(v);break; - case 2: score+= v*v;break; - case 3: score64+= FFABS(v*v*(int64_t)v);break; - case 4: score64+= v*v*(int64_t)(v*v);break; + switch (s->avctx->frame_skip_exp) { + case 0: score = FFMAX(score, v); break; + case 1: score += FFABS(v); break; + case 2: score += v * v; break; + case 3: score64 += FFABS(v * v * (int64_t)v); break; + case 4: score64 += v * v * (int64_t)(v * v); break; } } } } - if(score) score64= score; + if (score) + score64 = score; - if(score64 < s->avctx->frame_skip_threshold) + if (score64 < s->avctx->frame_skip_threshold) return 1; - if(score64 < ((s->avctx->frame_skip_factor * (int64_t)s->lambda)>>8)) + if (score64 < ((s->avctx->frame_skip_factor * (int64_t)s->lambda) >> 8)) return 1; return 0; } -static int estimate_best_b_count(MpegEncContext *s){ - AVCodec *codec= avcodec_find_encoder(s->avctx->codec_id); - AVCodecContext *c= avcodec_alloc_context(); - AVFrame input[FF_MAX_B_FRAMES+2]; - const int scale= s->avctx->brd_scale; +static int estimate_best_b_count(MpegEncContext *s) +{ + AVCodec *codec = avcodec_find_encoder(s->avctx->codec_id); + AVCodecContext *c = avcodec_alloc_context3(NULL); + AVFrame input[FF_MAX_B_FRAMES + 2]; + const int scale = s->avctx->brd_scale; int i, j, out_size, p_lambda, b_lambda, lambda2; - int outbuf_size= s->width * s->height; //FIXME - uint8_t *outbuf= av_malloc(outbuf_size); - int64_t best_rd= INT64_MAX; - int best_b_count= -1; - - assert(scale>=0 && scale <=3); - -// emms_c(); - p_lambda= s->last_lambda_for[AV_PICTURE_TYPE_P]; //s->next_picture_ptr->quality; - b_lambda= s->last_lambda_for[AV_PICTURE_TYPE_B]; //p_lambda *FFABS(s->avctx->b_quant_factor) + s->avctx->b_quant_offset; - if(!b_lambda) b_lambda= p_lambda; //FIXME we should do this somewhere else - lambda2= (b_lambda*b_lambda + (1<> FF_LAMBDA_SHIFT; - - c->width = s->width >> scale; - c->height= s->height>> scale; - c->flags= CODEC_FLAG_QSCALE | CODEC_FLAG_PSNR | CODEC_FLAG_INPUT_PRESERVED /*| CODEC_FLAG_EMU_EDGE*/; - c->flags|= s->avctx->flags & CODEC_FLAG_QPEL; - c->mb_decision= s->avctx->mb_decision; - c->me_cmp= s->avctx->me_cmp; - c->mb_cmp= s->avctx->mb_cmp; - c->me_sub_cmp= s->avctx->me_sub_cmp; - c->pix_fmt = PIX_FMT_YUV420P; - c->time_base= s->avctx->time_base; - c->max_b_frames= s->max_b_frames; - - if (avcodec_open(c, codec) < 0) - return -1; - - for(i=0; imax_b_frames+2; i++){ - int ysize= c->width*c->height; - int csize= (c->width/2)*(c->height/2); - Picture pre_input, *pre_input_ptr= i ? s->input_picture[i-1] : s->next_picture_ptr; - - avcodec_get_frame_defaults(&input[i]); - input[i].data[0]= av_malloc(ysize + 2*csize); - input[i].data[1]= input[i].data[0] + ysize; - input[i].data[2]= input[i].data[1] + csize; - input[i].linesize[0]= c->width; - input[i].linesize[1]= - input[i].linesize[2]= c->width/2; + int outbuf_size = s->width * s->height; // FIXME + uint8_t *outbuf = av_malloc(outbuf_size); + int64_t best_rd = INT64_MAX; + int best_b_count = -1; + + assert(scale >= 0 && scale <= 3); + + //emms_c(); + //s->next_picture_ptr->quality; + p_lambda = s->last_lambda_for[AV_PICTURE_TYPE_P]; + //p_lambda * FFABS(s->avctx->b_quant_factor) + s->avctx->b_quant_offset; + b_lambda = s->last_lambda_for[AV_PICTURE_TYPE_B]; + if (!b_lambda) // FIXME we should do this somewhere else + b_lambda = p_lambda; + lambda2 = (b_lambda * b_lambda + (1 << FF_LAMBDA_SHIFT) / 2) >> + FF_LAMBDA_SHIFT; + + c->width = s->width >> scale; + c->height = s->height >> scale; + c->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_PSNR | + CODEC_FLAG_INPUT_PRESERVED /*| CODEC_FLAG_EMU_EDGE*/; + c->flags |= s->avctx->flags & CODEC_FLAG_QPEL; + c->mb_decision = s->avctx->mb_decision; + c->me_cmp = s->avctx->me_cmp; + c->mb_cmp = s->avctx->mb_cmp; + c->me_sub_cmp = s->avctx->me_sub_cmp; + c->pix_fmt = PIX_FMT_YUV420P; + c->time_base = s->avctx->time_base; + c->max_b_frames = s->max_b_frames; - if(pre_input_ptr && (!i || s->input_picture[i-1])) { - pre_input= *pre_input_ptr; + if (avcodec_open2(c, codec, NULL) < 0) + return -1; - if(pre_input.type != FF_BUFFER_TYPE_SHARED && i) { - pre_input.data[0]+=INPLACE_OFFSET; - pre_input.data[1]+=INPLACE_OFFSET; - pre_input.data[2]+=INPLACE_OFFSET; - } + for (i = 0; i < s->max_b_frames + 2; i++) { + int ysize = c->width * c->height; + int csize = (c->width / 2) * (c->height / 2); + Picture pre_input, *pre_input_ptr = i ? s->input_picture[i - 1] : + s->next_picture_ptr; - s->dsp.shrink[scale](input[i].data[0], input[i].linesize[0], pre_input.data[0], pre_input.linesize[0], c->width, c->height); - s->dsp.shrink[scale](input[i].data[1], input[i].linesize[1], pre_input.data[1], pre_input.linesize[1], c->width>>1, c->height>>1); - s->dsp.shrink[scale](input[i].data[2], input[i].linesize[2], pre_input.data[2], pre_input.linesize[2], c->width>>1, c->height>>1); + avcodec_get_frame_defaults(&input[i]); + input[i].data[0] = av_malloc(ysize + 2 * csize); + input[i].data[1] = input[i].data[0] + ysize; + input[i].data[2] = input[i].data[1] + csize; + input[i].linesize[0] = c->width; + input[i].linesize[1] = + input[i].linesize[2] = c->width / 2; + + if (pre_input_ptr && (!i || s->input_picture[i - 1])) { + pre_input = *pre_input_ptr; + + if (pre_input.f.type != FF_BUFFER_TYPE_SHARED && i) { + pre_input.f.data[0] += INPLACE_OFFSET; + pre_input.f.data[1] += INPLACE_OFFSET; + pre_input.f.data[2] += INPLACE_OFFSET; + } + + s->dsp.shrink[scale](input[i].data[0], input[i].linesize[0], + pre_input.f.data[0], pre_input.f.linesize[0], + c->width, c->height); + s->dsp.shrink[scale](input[i].data[1], input[i].linesize[1], + pre_input.f.data[1], pre_input.f.linesize[1], + c->width >> 1, c->height >> 1); + s->dsp.shrink[scale](input[i].data[2], input[i].linesize[2], + pre_input.f.data[2], pre_input.f.linesize[2], + c->width >> 1, c->height >> 1); } } - for(j=0; jmax_b_frames+1; j++){ - int64_t rd=0; + for (j = 0; j < s->max_b_frames + 1; j++) { + int64_t rd = 0; - if(!s->input_picture[j]) + if (!s->input_picture[j]) break; - c->error[0]= c->error[1]= c->error[2]= 0; + c->error[0] = c->error[1] = c->error[2] = 0; - input[0].pict_type= AV_PICTURE_TYPE_I; - input[0].quality= 1 * FF_QP2LAMBDA; - out_size = avcodec_encode_video(c, outbuf, outbuf_size, &input[0]); -// rd += (out_size * lambda2) >> FF_LAMBDA_SHIFT; - - for(i=0; imax_b_frames+1; i++){ - int is_p= i % (j+1) == j || i==s->max_b_frames; - - input[i+1].pict_type= is_p ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_B; - input[i+1].quality= is_p ? p_lambda : b_lambda; - out_size = avcodec_encode_video(c, outbuf, outbuf_size, &input[i+1]); + input[0].pict_type = AV_PICTURE_TYPE_I; + input[0].quality = 1 * FF_QP2LAMBDA; + out_size = avcodec_encode_video(c, outbuf, + outbuf_size, &input[0]); + //rd += (out_size * lambda2) >> FF_LAMBDA_SHIFT; + + for (i = 0; i < s->max_b_frames + 1; i++) { + int is_p = i % (j + 1) == j || i == s->max_b_frames; + + input[i + 1].pict_type = is_p ? + AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_B; + input[i + 1].quality = is_p ? p_lambda : b_lambda; + out_size = avcodec_encode_video(c, outbuf, outbuf_size, + &input[i + 1]); rd += (out_size * lambda2) >> (FF_LAMBDA_SHIFT - 3); } /* get the delayed frames */ - while(out_size){ + while (out_size) { out_size = avcodec_encode_video(c, outbuf, outbuf_size, NULL); rd += (out_size * lambda2) >> (FF_LAMBDA_SHIFT - 3); } rd += c->error[0] + c->error[1] + c->error[2]; - if(rd < best_rd){ - best_rd= rd; - best_b_count= j; + if (rd < best_rd) { + best_rd = rd; + best_b_count = j; } } @@ -1043,43 +1215,50 @@ avcodec_close(c); av_freep(&c); - for(i=0; imax_b_frames+2; i++){ + for (i = 0; i < s->max_b_frames + 2; i++) { av_freep(&input[i].data[0]); } return best_b_count; } -static int select_input_picture(MpegEncContext *s){ +static int select_input_picture(MpegEncContext *s) +{ int i; - for(i=1; ireordered_input_picture[i-1]= s->reordered_input_picture[i]; - s->reordered_input_picture[MAX_PICTURE_COUNT-1]= NULL; + for (i = 1; i < MAX_PICTURE_COUNT; i++) + s->reordered_input_picture[i - 1] = s->reordered_input_picture[i]; + s->reordered_input_picture[MAX_PICTURE_COUNT - 1] = NULL; /* set next picture type & ordering */ - if(s->reordered_input_picture[0]==NULL && s->input_picture[0]){ - if(/*s->picture_in_gop_number >= s->gop_size ||*/ s->next_picture_ptr==NULL || s->intra_only){ - s->reordered_input_picture[0]= s->input_picture[0]; - s->reordered_input_picture[0]->pict_type= AV_PICTURE_TYPE_I; - s->reordered_input_picture[0]->coded_picture_number= s->coded_picture_number++; - }else{ + if (s->reordered_input_picture[0] == NULL && s->input_picture[0]) { + if (/*s->picture_in_gop_number >= s->gop_size ||*/ + s->next_picture_ptr == NULL || s->intra_only) { + s->reordered_input_picture[0] = s->input_picture[0]; + s->reordered_input_picture[0]->f.pict_type = AV_PICTURE_TYPE_I; + s->reordered_input_picture[0]->f.coded_picture_number = + s->coded_picture_number++; + } else { int b_frames; - if(s->avctx->frame_skip_threshold || s->avctx->frame_skip_factor){ - if(s->picture_in_gop_number < s->gop_size && skip_check(s, s->input_picture[0], s->next_picture_ptr)){ - //FIXME check that te gop check above is +-1 correct -//av_log(NULL, AV_LOG_DEBUG, "skip %p %"PRId64"\n", s->input_picture[0]->data[0], s->input_picture[0]->pts); - - if(s->input_picture[0]->type == FF_BUFFER_TYPE_SHARED){ - for(i=0; i<4; i++) - s->input_picture[0]->data[i]= NULL; - s->input_picture[0]->type= 0; - }else{ - assert( s->input_picture[0]->type==FF_BUFFER_TYPE_USER - || s->input_picture[0]->type==FF_BUFFER_TYPE_INTERNAL); + if (s->avctx->frame_skip_threshold || s->avctx->frame_skip_factor) { + if (s->picture_in_gop_number < s->gop_size && + skip_check(s, s->input_picture[0], s->next_picture_ptr)) { + // FIXME check that te gop check above is +-1 correct + //av_log(NULL, AV_LOG_DEBUG, "skip %p %"PRId64"\n", + // s->input_picture[0]->f.data[0], + // s->input_picture[0]->pts); + + if (s->input_picture[0]->f.type == FF_BUFFER_TYPE_SHARED) { + for (i = 0; i < 4; i++) + s->input_picture[0]->f.data[i] = NULL; + s->input_picture[0]->f.type = 0; + } else { + assert(s->input_picture[0]->f.type == FF_BUFFER_TYPE_USER || + s->input_picture[0]->f.type == FF_BUFFER_TYPE_INTERNAL); - s->avctx->release_buffer(s->avctx, (AVFrame*)s->input_picture[0]); + s->avctx->release_buffer(s->avctx, + (AVFrame *) s->input_picture[0]); } emms_c(); @@ -1089,134 +1268,157 @@ } } - if(s->flags&CODEC_FLAG_PASS2){ - for(i=0; imax_b_frames+1; i++){ - int pict_num= s->input_picture[0]->display_picture_number + i; + if (s->flags & CODEC_FLAG_PASS2) { + for (i = 0; i < s->max_b_frames + 1; i++) { + int pict_num = s->input_picture[0]->f.display_picture_number + i; - if(pict_num >= s->rc_context.num_entries) + if (pict_num >= s->rc_context.num_entries) break; - if(!s->input_picture[i]){ - s->rc_context.entry[pict_num-1].new_pict_type = AV_PICTURE_TYPE_P; + if (!s->input_picture[i]) { + s->rc_context.entry[pict_num - 1].new_pict_type = AV_PICTURE_TYPE_P; break; } - s->input_picture[i]->pict_type= + s->input_picture[i]->f.pict_type = s->rc_context.entry[pict_num].new_pict_type; } } - if(s->avctx->b_frame_strategy==0){ - b_frames= s->max_b_frames; - while(b_frames && !s->input_picture[b_frames]) b_frames--; - }else if(s->avctx->b_frame_strategy==1){ - for(i=1; imax_b_frames+1; i++){ - if(s->input_picture[i] && s->input_picture[i]->b_frame_score==0){ - s->input_picture[i]->b_frame_score= - get_intra_count(s, s->input_picture[i ]->data[0], - s->input_picture[i-1]->data[0], s->linesize) + 1; + if (s->avctx->b_frame_strategy == 0) { + b_frames = s->max_b_frames; + while (b_frames && !s->input_picture[b_frames]) + b_frames--; + } else if (s->avctx->b_frame_strategy == 1) { + for (i = 1; i < s->max_b_frames + 1; i++) { + if (s->input_picture[i] && + s->input_picture[i]->b_frame_score == 0) { + s->input_picture[i]->b_frame_score = + get_intra_count(s, + s->input_picture[i ]->f.data[0], + s->input_picture[i - 1]->f.data[0], + s->linesize) + 1; } } - for(i=0; imax_b_frames+1; i++){ - if(s->input_picture[i]==NULL || s->input_picture[i]->b_frame_score - 1 > s->mb_num/s->avctx->b_sensitivity) break; + for (i = 0; i < s->max_b_frames + 1; i++) { + if (s->input_picture[i] == NULL || + s->input_picture[i]->b_frame_score - 1 > + s->mb_num / s->avctx->b_sensitivity) + break; } - b_frames= FFMAX(0, i-1); + b_frames = FFMAX(0, i - 1); /* reset scores */ - for(i=0; iinput_picture[i]->b_frame_score=0; + for (i = 0; i < b_frames + 1; i++) { + s->input_picture[i]->b_frame_score = 0; } - }else if(s->avctx->b_frame_strategy==2){ - b_frames= estimate_best_b_count(s); - }else{ + } else if (s->avctx->b_frame_strategy == 2) { + b_frames = estimate_best_b_count(s); + } else { av_log(s->avctx, AV_LOG_ERROR, "illegal b frame strategy\n"); - b_frames=0; + b_frames = 0; } emms_c(); -//static int b_count=0; -//b_count+= b_frames; -//av_log(s->avctx, AV_LOG_DEBUG, "b_frames: %d\n", b_count); - - for(i= b_frames - 1; i>=0; i--){ - int type= s->input_picture[i]->pict_type; - if(type && type != AV_PICTURE_TYPE_B) - b_frames= i; - } - if(s->input_picture[b_frames]->pict_type == AV_PICTURE_TYPE_B && b_frames == s->max_b_frames){ - av_log(s->avctx, AV_LOG_ERROR, "warning, too many b frames in a row\n"); - } - - if(s->picture_in_gop_number + b_frames >= s->gop_size){ - if((s->flags2 & CODEC_FLAG2_STRICT_GOP) && s->gop_size > s->picture_in_gop_number){ - b_frames= s->gop_size - s->picture_in_gop_number - 1; - }else{ - if(s->flags & CODEC_FLAG_CLOSED_GOP) - b_frames=0; - s->input_picture[b_frames]->pict_type= AV_PICTURE_TYPE_I; - } - } - - if( (s->flags & CODEC_FLAG_CLOSED_GOP) - && b_frames - && s->input_picture[b_frames]->pict_type== AV_PICTURE_TYPE_I) + //static int b_count = 0; + //b_count += b_frames; + //av_log(s->avctx, AV_LOG_DEBUG, "b_frames: %d\n", b_count); + + for (i = b_frames - 1; i >= 0; i--) { + int type = s->input_picture[i]->f.pict_type; + if (type && type != AV_PICTURE_TYPE_B) + b_frames = i; + } + if (s->input_picture[b_frames]->f.pict_type == AV_PICTURE_TYPE_B && + b_frames == s->max_b_frames) { + av_log(s->avctx, AV_LOG_ERROR, + "warning, too many b frames in a row\n"); + } + + if (s->picture_in_gop_number + b_frames >= s->gop_size) { + if ((s->flags2 & CODEC_FLAG2_STRICT_GOP) && + s->gop_size > s->picture_in_gop_number) { + b_frames = s->gop_size - s->picture_in_gop_number - 1; + } else { + if (s->flags & CODEC_FLAG_CLOSED_GOP) + b_frames = 0; + s->input_picture[b_frames]->f.pict_type = AV_PICTURE_TYPE_I; + } + } + + if ((s->flags & CODEC_FLAG_CLOSED_GOP) && b_frames && + s->input_picture[b_frames]->f.pict_type == AV_PICTURE_TYPE_I) b_frames--; - s->reordered_input_picture[0]= s->input_picture[b_frames]; - if(s->reordered_input_picture[0]->pict_type != AV_PICTURE_TYPE_I) - s->reordered_input_picture[0]->pict_type= AV_PICTURE_TYPE_P; - s->reordered_input_picture[0]->coded_picture_number= s->coded_picture_number++; - for(i=0; ireordered_input_picture[i+1]= s->input_picture[i]; - s->reordered_input_picture[i+1]->pict_type= AV_PICTURE_TYPE_B; - s->reordered_input_picture[i+1]->coded_picture_number= s->coded_picture_number++; + s->reordered_input_picture[0] = s->input_picture[b_frames]; + if (s->reordered_input_picture[0]->f.pict_type != AV_PICTURE_TYPE_I) + s->reordered_input_picture[0]->f.pict_type = AV_PICTURE_TYPE_P; + s->reordered_input_picture[0]->f.coded_picture_number = + s->coded_picture_number++; + for (i = 0; i < b_frames; i++) { + s->reordered_input_picture[i + 1] = s->input_picture[i]; + s->reordered_input_picture[i + 1]->f.pict_type = + AV_PICTURE_TYPE_B; + s->reordered_input_picture[i + 1]->f.coded_picture_number = + s->coded_picture_number++; } } } no_output_pic: - if(s->reordered_input_picture[0]){ - s->reordered_input_picture[0]->reference= s->reordered_input_picture[0]->pict_type!=AV_PICTURE_TYPE_B ? 3 : 0; + if (s->reordered_input_picture[0]) { + s->reordered_input_picture[0]->f.reference = + s->reordered_input_picture[0]->f.pict_type != + AV_PICTURE_TYPE_B ? 3 : 0; ff_copy_picture(&s->new_picture, s->reordered_input_picture[0]); - if(s->reordered_input_picture[0]->type == FF_BUFFER_TYPE_SHARED || s->avctx->rc_buffer_size){ - // input is a shared pix, so we can't modifiy it -> alloc a new one & ensure that the shared one is reuseable - - int i= ff_find_unused_picture(s, 0); - Picture *pic= &s->picture[i]; + if (s->reordered_input_picture[0]->f.type == FF_BUFFER_TYPE_SHARED || + s->avctx->rc_buffer_size) { + // input is a shared pix, so we can't modifiy it -> alloc a new + // one & ensure that the shared one is reuseable + + Picture *pic; + int i = ff_find_unused_picture(s, 0); + if (i < 0) + return i; + pic = &s->picture[i]; - pic->reference = s->reordered_input_picture[0]->reference; - if(ff_alloc_picture(s, pic, 0) < 0){ + pic->f.reference = s->reordered_input_picture[0]->f.reference; + if (ff_alloc_picture(s, pic, 0) < 0) { return -1; } /* mark us unused / free shared pic */ - if(s->reordered_input_picture[0]->type == FF_BUFFER_TYPE_INTERNAL) - s->avctx->release_buffer(s->avctx, (AVFrame*)s->reordered_input_picture[0]); - for(i=0; i<4; i++) - s->reordered_input_picture[0]->data[i]= NULL; - s->reordered_input_picture[0]->type= 0; + if (s->reordered_input_picture[0]->f.type == FF_BUFFER_TYPE_INTERNAL) + s->avctx->release_buffer(s->avctx, + (AVFrame *) s->reordered_input_picture[0]); + for (i = 0; i < 4; i++) + s->reordered_input_picture[0]->f.data[i] = NULL; + s->reordered_input_picture[0]->f.type = 0; - copy_picture_attributes(s, (AVFrame*)pic, (AVFrame*)s->reordered_input_picture[0]); + copy_picture_attributes(s, (AVFrame *) pic, + (AVFrame *) s->reordered_input_picture[0]); - s->current_picture_ptr= pic; - }else{ + s->current_picture_ptr = pic; + } else { // input is not a shared pix -> reuse buffer for current_pix - assert( s->reordered_input_picture[0]->type==FF_BUFFER_TYPE_USER - || s->reordered_input_picture[0]->type==FF_BUFFER_TYPE_INTERNAL); - - s->current_picture_ptr= s->reordered_input_picture[0]; - for(i=0; i<4; i++){ - s->new_picture.data[i]+= INPLACE_OFFSET; + assert(s->reordered_input_picture[0]->f.type == + FF_BUFFER_TYPE_USER || + s->reordered_input_picture[0]->f.type == + FF_BUFFER_TYPE_INTERNAL); + + s->current_picture_ptr = s->reordered_input_picture[0]; + for (i = 0; i < 4; i++) { + s->new_picture.f.data[i] += INPLACE_OFFSET; } } ff_copy_picture(&s->current_picture, s->current_picture_ptr); - s->picture_number= s->new_picture.display_picture_number; -//printf("dpn:%d\n", s->picture_number); - }else{ - memset(&s->new_picture, 0, sizeof(Picture)); + s->picture_number = s->new_picture.f.display_picture_number; + //printf("dpn:%d\n", s->picture_number); + } else { + memset(&s->new_picture, 0, sizeof(Picture)); } return 0; } @@ -1225,33 +1427,35 @@ unsigned char *buf, int buf_size, void *data) { MpegEncContext *s = avctx->priv_data; - AVFrame *pic_arg = data; - int i, stuffing_count, context_count = avctx->thread_count; - - for(i=0; ithread_context[i]->start_mb_y; - int end_y= s->thread_context[i]-> end_mb_y; - int h= s->mb_height; - uint8_t *start= buf + (size_t)(((int64_t) buf_size)*start_y/h); - uint8_t *end = buf + (size_t)(((int64_t) buf_size)* end_y/h); + AVFrame *pic_arg = data; + int i, stuffing_count; + int context_count = s->slice_context_count; + + for (i = 0; i < context_count; i++) { + int start_y = s->thread_context[i]->start_mb_y; + int end_y = s->thread_context[i]-> end_mb_y; + int h = s->mb_height; + uint8_t *start = buf + (size_t)(((int64_t) buf_size) * start_y / h); + uint8_t *end = buf + (size_t)(((int64_t) buf_size) * end_y / h); init_put_bits(&s->thread_context[i]->pb, start, end - start); } s->picture_in_gop_number++; - if(load_input_picture(s, pic_arg) < 0) + if (load_input_picture(s, pic_arg) < 0) return -1; - if(select_input_picture(s) < 0){ + if (select_input_picture(s) < 0) { return -1; } /* output? */ - if(s->new_picture.data[0]){ - s->pict_type= s->new_picture.pict_type; -//emms_c(); -//printf("qs:%f %f %d\n", s->new_picture.quality, s->current_picture.quality, s->qscale); + if (s->new_picture.f.data[0]) { + s->pict_type = s->new_picture.f.pict_type; + //emms_c(); + //printf("qs:%f %f %d\n", s->new_picture.quality, + // s->current_picture.quality, s->qscale); MPV_frame_start(s, avctx); vbv_retry: if (encode_picture(s, s->picture_number) < 0) @@ -1263,7 +1467,8 @@ avctx->i_tex_bits = s->i_tex_bits; avctx->p_tex_bits = s->p_tex_bits; avctx->i_count = s->i_count; - avctx->p_count = s->mb_num - s->i_count - s->skip_count; //FIXME f/b_count in avctx + // FIXME f/b_count in avctx + avctx->p_count = s->mb_num - s->i_count - s->skip_count; avctx->skip_count = s->skip_count; MPV_frame_end(s); @@ -1271,29 +1476,37 @@ if (CONFIG_MJPEG_ENCODER && s->out_format == FMT_MJPEG) ff_mjpeg_encode_picture_trailer(s); - if(avctx->rc_buffer_size){ - RateControlContext *rcc= &s->rc_context; - int max_size= rcc->buffer_index * avctx->rc_max_available_vbv_use; - - if(put_bits_count(&s->pb) > max_size && s->lambda < s->avctx->lmax){ - s->next_lambda= FFMAX(s->lambda+1, s->lambda*(s->qscale+1) / s->qscale); - if(s->adaptive_quant){ + if (avctx->rc_buffer_size) { + RateControlContext *rcc = &s->rc_context; + int max_size = rcc->buffer_index * avctx->rc_max_available_vbv_use; + + if (put_bits_count(&s->pb) > max_size && + s->lambda < s->avctx->lmax) { + s->next_lambda = FFMAX(s->lambda + 1, s->lambda * + (s->qscale + 1) / s->qscale); + if (s->adaptive_quant) { int i; - for(i=0; imb_height*s->mb_stride; i++) - s->lambda_table[i]= FFMAX(s->lambda_table[i]+1, s->lambda_table[i]*(s->qscale+1) / s->qscale); - } - s->mb_skipped = 0; //done in MPV_frame_start() - if(s->pict_type==AV_PICTURE_TYPE_P){ //done in encode_picture() so we must undo it - if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4) + for (i = 0; i < s->mb_height * s->mb_stride; i++) + s->lambda_table[i] = + FFMAX(s->lambda_table[i] + 1, + s->lambda_table[i] * (s->qscale + 1) / + s->qscale); + } + s->mb_skipped = 0; // done in MPV_frame_start() + // done in encode_picture() so we must undo it + if (s->pict_type == AV_PICTURE_TYPE_P) { + if (s->flipflop_rounding || + s->codec_id == CODEC_ID_H263P || + s->codec_id == CODEC_ID_MPEG4) s->no_rounding ^= 1; } - if(s->pict_type!=AV_PICTURE_TYPE_B){ - s->time_base= s->last_time_base; - s->last_non_b_time= s->time - s->pp_time; - } -// av_log(NULL, AV_LOG_ERROR, "R:%d ", s->next_lambda); - for(i=0; ithread_context[i]->pb; + if (s->pict_type != AV_PICTURE_TYPE_B) { + s->time_base = s->last_time_base; + s->last_non_b_time = s->time - s->pp_time; + } + //av_log(NULL, AV_LOG_ERROR, "R:%d ", s->next_lambda); + for (i = 0; i < context_count; i++) { + PutBitContext *pb = &s->thread_context[i]->pb; init_put_bits(pb, pb->buf, pb->buf_end - pb->buf); } goto vbv_retry; @@ -1302,30 +1515,33 @@ assert(s->avctx->rc_max_rate); } - if(s->flags&CODEC_FLAG_PASS1) + if (s->flags & CODEC_FLAG_PASS1) ff_write_pass1_stats(s); - for(i=0; i<4; i++){ - s->current_picture_ptr->error[i]= s->current_picture.error[i]; - avctx->error[i] += s->current_picture_ptr->error[i]; + for (i = 0; i < 4; i++) { + s->current_picture_ptr->f.error[i] = s->current_picture.f.error[i]; + avctx->error[i] += s->current_picture_ptr->f.error[i]; } - if(s->flags&CODEC_FLAG_PASS1) - assert(avctx->header_bits + avctx->mv_bits + avctx->misc_bits + avctx->i_tex_bits + avctx->p_tex_bits == put_bits_count(&s->pb)); + if (s->flags & CODEC_FLAG_PASS1) + assert(avctx->header_bits + avctx->mv_bits + avctx->misc_bits + + avctx->i_tex_bits + avctx->p_tex_bits == + put_bits_count(&s->pb)); flush_put_bits(&s->pb); s->frame_bits = put_bits_count(&s->pb); - stuffing_count= ff_vbv_update(s, s->frame_bits); - if(stuffing_count){ - if(s->pb.buf_end - s->pb.buf - (put_bits_count(&s->pb)>>3) < stuffing_count + 50){ + stuffing_count = ff_vbv_update(s, s->frame_bits); + if (stuffing_count) { + if (s->pb.buf_end - s->pb.buf - (put_bits_count(&s->pb) >> 3) < + stuffing_count + 50) { av_log(s->avctx, AV_LOG_ERROR, "stuffing too large\n"); return -1; } - switch(s->codec_id){ + switch (s->codec_id) { case CODEC_ID_MPEG1VIDEO: case CODEC_ID_MPEG2VIDEO: - while(stuffing_count--){ + while (stuffing_count--) { put_bits(&s->pb, 8, 0); } break; @@ -1333,7 +1549,7 @@ put_bits(&s->pb, 16, 0); put_bits(&s->pb, 16, 0x1C3); stuffing_count -= 4; - while(stuffing_count--){ + while (stuffing_count--) { put_bits(&s->pb, 8, 0xFF); } break; @@ -1345,245 +1561,281 @@ } /* update mpeg1/2 vbv_delay for CBR */ - if(s->avctx->rc_max_rate && s->avctx->rc_min_rate == s->avctx->rc_max_rate && s->out_format == FMT_MPEG1 - && 90000LL * (avctx->rc_buffer_size-1) <= s->avctx->rc_max_rate*0xFFFFLL){ + if (s->avctx->rc_max_rate && + s->avctx->rc_min_rate == s->avctx->rc_max_rate && + s->out_format == FMT_MPEG1 && + 90000LL * (avctx->rc_buffer_size - 1) <= + s->avctx->rc_max_rate * 0xFFFFLL) { int vbv_delay, min_delay; - double inbits = s->avctx->rc_max_rate*av_q2d(s->avctx->time_base); - int minbits= s->frame_bits - 8*(s->vbv_delay_ptr - s->pb.buf - 1); - double bits = s->rc_context.buffer_index + minbits - inbits; + double inbits = s->avctx->rc_max_rate * + av_q2d(s->avctx->time_base); + int minbits = s->frame_bits - 8 * + (s->vbv_delay_ptr - s->pb.buf - 1); + double bits = s->rc_context.buffer_index + minbits - inbits; + + if (bits < 0) + av_log(s->avctx, AV_LOG_ERROR, + "Internal error, negative bits\n"); + + assert(s->repeat_first_field == 0); + + vbv_delay = bits * 90000 / s->avctx->rc_max_rate; + min_delay = (minbits * 90000LL + s->avctx->rc_max_rate - 1) / + s->avctx->rc_max_rate; - if(bits<0) - av_log(s->avctx, AV_LOG_ERROR, "Internal error, negative bits\n"); - - assert(s->repeat_first_field==0); - - vbv_delay= bits * 90000 / s->avctx->rc_max_rate; - min_delay= (minbits * 90000LL + s->avctx->rc_max_rate - 1)/ s->avctx->rc_max_rate; - - vbv_delay= FFMAX(vbv_delay, min_delay); + vbv_delay = FFMAX(vbv_delay, min_delay); assert(vbv_delay < 0xFFFF); s->vbv_delay_ptr[0] &= 0xF8; - s->vbv_delay_ptr[0] |= vbv_delay>>13; - s->vbv_delay_ptr[1] = vbv_delay>>5; + s->vbv_delay_ptr[0] |= vbv_delay >> 13; + s->vbv_delay_ptr[1] = vbv_delay >> 5; s->vbv_delay_ptr[2] &= 0x07; - s->vbv_delay_ptr[2] |= vbv_delay<<3; - avctx->vbv_delay = vbv_delay*300; + s->vbv_delay_ptr[2] |= vbv_delay << 3; + avctx->vbv_delay = vbv_delay * 300; } - s->total_bits += s->frame_bits; + s->total_bits += s->frame_bits; avctx->frame_bits = s->frame_bits; - }else{ + } else { assert((put_bits_ptr(&s->pb) == s->pb.buf)); - s->frame_bits=0; + s->frame_bits = 0; } - assert((s->frame_bits&7)==0); + assert((s->frame_bits & 7) == 0); - return s->frame_bits/8; + return s->frame_bits / 8; } -static inline void dct_single_coeff_elimination(MpegEncContext *s, int n, int threshold) +static inline void dct_single_coeff_elimination(MpegEncContext *s, + int n, int threshold) { - static const char tab[64]= - {3,2,2,1,1,1,1,1, - 1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0}; - int score=0; - int run=0; + static const char tab[64] = { + 3, 2, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 + }; + int score = 0; + int run = 0; int i; - DCTELEM *block= s->block[n]; - const int last_index= s->block_last_index[n]; + DCTELEM *block = s->block[n]; + const int last_index = s->block_last_index[n]; int skip_dc; - if(threshold<0){ - skip_dc=0; - threshold= -threshold; - }else - skip_dc=1; + if (threshold < 0) { + skip_dc = 0; + threshold = -threshold; + } else + skip_dc = 1; /* Are all we could set to zero already zero? */ - if(last_index<=skip_dc - 1) return; + if (last_index <= skip_dc - 1) + return; - for(i=0; i<=last_index; i++){ + for (i = 0; i <= last_index; i++) { const int j = s->intra_scantable.permutated[i]; const int level = FFABS(block[j]); - if(level==1){ - if(skip_dc && i==0) continue; - score+= tab[run]; - run=0; - }else if(level>1){ + if (level == 1) { + if (skip_dc && i == 0) + continue; + score += tab[run]; + run = 0; + } else if (level > 1) { return; - }else{ + } else { run++; } } - if(score >= threshold) return; - for(i=skip_dc; i<=last_index; i++){ + if (score >= threshold) + return; + for (i = skip_dc; i <= last_index; i++) { const int j = s->intra_scantable.permutated[i]; - block[j]=0; + block[j] = 0; } - if(block[0]) s->block_last_index[n]= 0; - else s->block_last_index[n]= -1; + if (block[0]) + s->block_last_index[n] = 0; + else + s->block_last_index[n] = -1; } -static inline void clip_coeffs(MpegEncContext *s, DCTELEM *block, int last_index) +static inline void clip_coeffs(MpegEncContext *s, DCTELEM *block, + int last_index) { int i; - const int maxlevel= s->max_qcoeff; - const int minlevel= s->min_qcoeff; - int overflow=0; + const int maxlevel = s->max_qcoeff; + const int minlevel = s->min_qcoeff; + int overflow = 0; - if(s->mb_intra){ - i=1; //skip clipping of intra dc - }else - i=0; + if (s->mb_intra) { + i = 1; // skip clipping of intra dc + } else + i = 0; - for(;i<=last_index; i++){ - const int j= s->intra_scantable.permutated[i]; + for (; i <= last_index; i++) { + const int j = s->intra_scantable.permutated[i]; int level = block[j]; - if (level>maxlevel){ - level=maxlevel; + if (level > maxlevel) { + level = maxlevel; overflow++; - }else if(levelavctx->mb_decision == FF_MB_DECISION_SIMPLE) - av_log(s->avctx, AV_LOG_INFO, "warning, clipping %d dct coefficients to %d..%d\n", overflow, minlevel, maxlevel); + if (overflow && s->avctx->mb_decision == FF_MB_DECISION_SIMPLE) + av_log(s->avctx, AV_LOG_INFO, + "warning, clipping %d dct coefficients to %d..%d\n", + overflow, minlevel, maxlevel); } -static void get_visual_weight(int16_t *weight, uint8_t *ptr, int stride){ +static void get_visual_weight(int16_t *weight, uint8_t *ptr, int stride) +{ int x, y; -//FIXME optimize - for(y=0; y<8; y++){ - for(x=0; x<8; x++){ + // FIXME optimize + for (y = 0; y < 8; y++) { + for (x = 0; x < 8; x++) { int x2, y2; - int sum=0; - int sqr=0; - int count=0; - - for(y2= FFMAX(y-1, 0); y2 < FFMIN(8, y+2); y2++){ - for(x2= FFMAX(x-1, 0); x2 < FFMIN(8, x+2); x2++){ - int v= ptr[x2 + y2*stride]; + int sum = 0; + int sqr = 0; + int count = 0; + + for (y2 = FFMAX(y - 1, 0); y2 < FFMIN(8, y + 2); y2++) { + for (x2= FFMAX(x - 1, 0); x2 < FFMIN(8, x + 2); x2++) { + int v = ptr[x2 + y2 * stride]; sum += v; - sqr += v*v; + sqr += v * v; count++; } } - weight[x + 8*y]= (36*ff_sqrt(count*sqr - sum*sum)) / count; + weight[x + 8 * y]= (36 * ff_sqrt(count * sqr - sum * sum)) / count; } } } -static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x, int motion_y, int mb_block_height, int mb_block_count) +static av_always_inline void encode_mb_internal(MpegEncContext *s, + int motion_x, int motion_y, + int mb_block_height, + int mb_block_count) { int16_t weight[8][64]; DCTELEM orig[8][64]; - const int mb_x= s->mb_x; - const int mb_y= s->mb_y; + const int mb_x = s->mb_x; + const int mb_y = s->mb_y; int i; int skip_dct[8]; - int dct_offset = s->linesize*8; //default for progressive frames + int dct_offset = s->linesize * 8; // default for progressive frames uint8_t *ptr_y, *ptr_cb, *ptr_cr; int wrap_y, wrap_c; - for(i=0; iskipdct; + for (i = 0; i < mb_block_count; i++) + skip_dct[i] = s->skipdct; - if(s->adaptive_quant){ - const int last_qp= s->qscale; - const int mb_xy= mb_x + mb_y*s->mb_stride; + if (s->adaptive_quant) { + const int last_qp = s->qscale; + const int mb_xy = mb_x + mb_y * s->mb_stride; - s->lambda= s->lambda_table[mb_xy]; + s->lambda = s->lambda_table[mb_xy]; update_qscale(s); - if(!(s->flags&CODEC_FLAG_QP_RD)){ - s->qscale= s->current_picture_ptr->qscale_table[mb_xy]; - s->dquant= s->qscale - last_qp; - - if(s->out_format==FMT_H263){ - s->dquant= av_clip(s->dquant, -2, 2); - - if(s->codec_id==CODEC_ID_MPEG4){ - if(!s->mb_intra){ - if(s->pict_type == AV_PICTURE_TYPE_B){ - if(s->dquant&1 || s->mv_dir&MV_DIRECT) - s->dquant= 0; + if (!(s->flags & CODEC_FLAG_QP_RD)) { + s->qscale = s->current_picture_ptr->f.qscale_table[mb_xy]; + s->dquant = s->qscale - last_qp; + + if (s->out_format == FMT_H263) { + s->dquant = av_clip(s->dquant, -2, 2); + + if (s->codec_id == CODEC_ID_MPEG4) { + if (!s->mb_intra) { + if (s->pict_type == AV_PICTURE_TYPE_B) { + if (s->dquant & 1 || s->mv_dir & MV_DIRECT) + s->dquant = 0; } - if(s->mv_type==MV_TYPE_8X8) - s->dquant=0; + if (s->mv_type == MV_TYPE_8X8) + s->dquant = 0; } } } } ff_set_qscale(s, last_qp + s->dquant); - }else if(s->flags&CODEC_FLAG_QP_RD) + } else if (s->flags & CODEC_FLAG_QP_RD) ff_set_qscale(s, s->qscale + s->dquant); wrap_y = s->linesize; wrap_c = s->uvlinesize; - ptr_y = s->new_picture.data[0] + (mb_y * 16 * wrap_y) + mb_x * 16; - ptr_cb = s->new_picture.data[1] + (mb_y * mb_block_height * wrap_c) + mb_x * 8; - ptr_cr = s->new_picture.data[2] + (mb_y * mb_block_height * wrap_c) + mb_x * 8; - - if(mb_x*16+16 > s->width || mb_y*16+16 > s->height){ - uint8_t *ebuf= s->edge_emu_buffer + 32; - s->dsp.emulated_edge_mc(ebuf , ptr_y , wrap_y,16,16,mb_x*16,mb_y*16, s->width , s->height); - ptr_y= ebuf; - s->dsp.emulated_edge_mc(ebuf+18*wrap_y , ptr_cb, wrap_c, 8, mb_block_height, mb_x*8, mb_y*8, s->width>>1, s->height>>1); - ptr_cb= ebuf+18*wrap_y; - s->dsp.emulated_edge_mc(ebuf+18*wrap_y+8, ptr_cr, wrap_c, 8, mb_block_height, mb_x*8, mb_y*8, s->width>>1, s->height>>1); - ptr_cr= ebuf+18*wrap_y+8; + ptr_y = s->new_picture.f.data[0] + + (mb_y * 16 * wrap_y) + mb_x * 16; + ptr_cb = s->new_picture.f.data[1] + + (mb_y * mb_block_height * wrap_c) + mb_x * 8; + ptr_cr = s->new_picture.f.data[2] + + (mb_y * mb_block_height * wrap_c) + mb_x * 8; + + if (mb_x * 16 + 16 > s->width || mb_y * 16 + 16 > s->height) { + uint8_t *ebuf = s->edge_emu_buffer + 32; + s->dsp.emulated_edge_mc(ebuf, ptr_y, wrap_y, 16, 16, mb_x * 16, + mb_y * 16, s->width, s->height); + ptr_y = ebuf; + s->dsp.emulated_edge_mc(ebuf + 18 * wrap_y, ptr_cb, wrap_c, 8, + mb_block_height, mb_x * 8, mb_y * 8, + s->width >> 1, s->height >> 1); + ptr_cb = ebuf + 18 * wrap_y; + s->dsp.emulated_edge_mc(ebuf + 18 * wrap_y + 8, ptr_cr, wrap_c, 8, + mb_block_height, mb_x * 8, mb_y * 8, + s->width >> 1, s->height >> 1); + ptr_cr = ebuf + 18 * wrap_y + 8; } if (s->mb_intra) { - if(s->flags&CODEC_FLAG_INTERLACED_DCT){ + if (s->flags & CODEC_FLAG_INTERLACED_DCT) { int progressive_score, interlaced_score; - s->interlaced_dct=0; - progressive_score= s->dsp.ildct_cmp[4](s, ptr_y , NULL, wrap_y, 8) - +s->dsp.ildct_cmp[4](s, ptr_y + wrap_y*8, NULL, wrap_y, 8) - 400; - - if(progressive_score > 0){ - interlaced_score = s->dsp.ildct_cmp[4](s, ptr_y , NULL, wrap_y*2, 8) - +s->dsp.ildct_cmp[4](s, ptr_y + wrap_y , NULL, wrap_y*2, 8); - if(progressive_score > interlaced_score){ - s->interlaced_dct=1; + s->interlaced_dct = 0; + progressive_score = s->dsp.ildct_cmp[4](s, ptr_y, + NULL, wrap_y, 8) + + s->dsp.ildct_cmp[4](s, ptr_y + wrap_y * 8, + NULL, wrap_y, 8) - 400; + + if (progressive_score > 0) { + interlaced_score = s->dsp.ildct_cmp[4](s, ptr_y, + NULL, wrap_y * 2, 8) + + s->dsp.ildct_cmp[4](s, ptr_y + wrap_y, + NULL, wrap_y * 2, 8); + if (progressive_score > interlaced_score) { + s->interlaced_dct = 1; - dct_offset= wrap_y; - wrap_y<<=1; + dct_offset = wrap_y; + wrap_y <<= 1; if (s->chroma_format == CHROMA_422) - wrap_c<<=1; + wrap_c <<= 1; } } } - s->dsp.get_pixels(s->block[0], ptr_y , wrap_y); - s->dsp.get_pixels(s->block[1], ptr_y + 8, wrap_y); - s->dsp.get_pixels(s->block[2], ptr_y + dct_offset , wrap_y); - s->dsp.get_pixels(s->block[3], ptr_y + dct_offset + 8, wrap_y); + s->dsp.get_pixels(s->block[0], ptr_y , wrap_y); + s->dsp.get_pixels(s->block[1], ptr_y + 8 , wrap_y); + s->dsp.get_pixels(s->block[2], ptr_y + dct_offset , wrap_y); + s->dsp.get_pixels(s->block[3], ptr_y + dct_offset + 8 , wrap_y); - if(s->flags&CODEC_FLAG_GRAY){ - skip_dct[4]= 1; - skip_dct[5]= 1; - }else{ + if (s->flags & CODEC_FLAG_GRAY) { + skip_dct[4] = 1; + skip_dct[5] = 1; + } else { s->dsp.get_pixels(s->block[4], ptr_cb, wrap_c); s->dsp.get_pixels(s->block[5], ptr_cr, wrap_c); - if(!s->chroma_y_shift){ /* 422 */ - s->dsp.get_pixels(s->block[6], ptr_cb + (dct_offset>>1), wrap_c); - s->dsp.get_pixels(s->block[7], ptr_cr + (dct_offset>>1), wrap_c); + if (!s->chroma_y_shift) { /* 422 */ + s->dsp.get_pixels(s->block[6], + ptr_cb + (dct_offset >> 1), wrap_c); + s->dsp.get_pixels(s->block[7], + ptr_cr + (dct_offset >> 1), wrap_c); } } - }else{ + } else { op_pixels_func (*op_pix)[4]; qpel_mc_func (*op_qpix)[16]; uint8_t *dest_y, *dest_cb, *dest_cr; @@ -1592,146 +1844,197 @@ dest_cb = s->dest[1]; dest_cr = s->dest[2]; - if ((!s->no_rounding) || s->pict_type==AV_PICTURE_TYPE_B){ - op_pix = s->dsp.put_pixels_tab; - op_qpix= s->dsp.put_qpel_pixels_tab; - }else{ - op_pix = s->dsp.put_no_rnd_pixels_tab; - op_qpix= s->dsp.put_no_rnd_qpel_pixels_tab; + if ((!s->no_rounding) || s->pict_type == AV_PICTURE_TYPE_B) { + op_pix = s->dsp.put_pixels_tab; + op_qpix = s->dsp.put_qpel_pixels_tab; + } else { + op_pix = s->dsp.put_no_rnd_pixels_tab; + op_qpix = s->dsp.put_no_rnd_qpel_pixels_tab; } if (s->mv_dir & MV_DIR_FORWARD) { - MPV_motion(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.data, op_pix, op_qpix); - op_pix = s->dsp.avg_pixels_tab; - op_qpix= s->dsp.avg_qpel_pixels_tab; + MPV_motion(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f.data, + op_pix, op_qpix); + op_pix = s->dsp.avg_pixels_tab; + op_qpix = s->dsp.avg_qpel_pixels_tab; } if (s->mv_dir & MV_DIR_BACKWARD) { - MPV_motion(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.data, op_pix, op_qpix); + MPV_motion(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f.data, + op_pix, op_qpix); } - if(s->flags&CODEC_FLAG_INTERLACED_DCT){ + if (s->flags & CODEC_FLAG_INTERLACED_DCT) { int progressive_score, interlaced_score; - s->interlaced_dct=0; - progressive_score= s->dsp.ildct_cmp[0](s, dest_y , ptr_y , wrap_y, 8) - +s->dsp.ildct_cmp[0](s, dest_y + wrap_y*8, ptr_y + wrap_y*8, wrap_y, 8) - 400; + s->interlaced_dct = 0; + progressive_score = s->dsp.ildct_cmp[0](s, dest_y, + ptr_y, wrap_y, + 8) + + s->dsp.ildct_cmp[0](s, dest_y + wrap_y * 8, + ptr_y + wrap_y * 8, wrap_y, + 8) - 400; + + if (s->avctx->ildct_cmp == FF_CMP_VSSE) + progressive_score -= 400; + + if (progressive_score > 0) { + interlaced_score = s->dsp.ildct_cmp[0](s, dest_y, + ptr_y, + wrap_y * 2, 8) + + s->dsp.ildct_cmp[0](s, dest_y + wrap_y, + ptr_y + wrap_y, + wrap_y * 2, 8); - if(s->avctx->ildct_cmp == FF_CMP_VSSE) progressive_score -= 400; + if (progressive_score > interlaced_score) { + s->interlaced_dct = 1; - if(progressive_score>0){ - interlaced_score = s->dsp.ildct_cmp[0](s, dest_y , ptr_y , wrap_y*2, 8) - +s->dsp.ildct_cmp[0](s, dest_y + wrap_y , ptr_y + wrap_y , wrap_y*2, 8); - - if(progressive_score > interlaced_score){ - s->interlaced_dct=1; - - dct_offset= wrap_y; - wrap_y<<=1; + dct_offset = wrap_y; + wrap_y <<= 1; if (s->chroma_format == CHROMA_422) - wrap_c<<=1; + wrap_c <<= 1; } } } - s->dsp.diff_pixels(s->block[0], ptr_y , dest_y , wrap_y); - s->dsp.diff_pixels(s->block[1], ptr_y + 8, dest_y + 8, wrap_y); - s->dsp.diff_pixels(s->block[2], ptr_y + dct_offset , dest_y + dct_offset , wrap_y); - s->dsp.diff_pixels(s->block[3], ptr_y + dct_offset + 8, dest_y + dct_offset + 8, wrap_y); + s->dsp.diff_pixels(s->block[0], ptr_y, dest_y, wrap_y); + s->dsp.diff_pixels(s->block[1], ptr_y + 8, dest_y + 8, wrap_y); + s->dsp.diff_pixels(s->block[2], ptr_y + dct_offset, + dest_y + dct_offset, wrap_y); + s->dsp.diff_pixels(s->block[3], ptr_y + dct_offset + 8, + dest_y + dct_offset + 8, wrap_y); - if(s->flags&CODEC_FLAG_GRAY){ - skip_dct[4]= 1; - skip_dct[5]= 1; - }else{ + if (s->flags & CODEC_FLAG_GRAY) { + skip_dct[4] = 1; + skip_dct[5] = 1; + } else { s->dsp.diff_pixels(s->block[4], ptr_cb, dest_cb, wrap_c); s->dsp.diff_pixels(s->block[5], ptr_cr, dest_cr, wrap_c); - if(!s->chroma_y_shift){ /* 422 */ - s->dsp.diff_pixels(s->block[6], ptr_cb + (dct_offset>>1), dest_cb + (dct_offset>>1), wrap_c); - s->dsp.diff_pixels(s->block[7], ptr_cr + (dct_offset>>1), dest_cr + (dct_offset>>1), wrap_c); + if (!s->chroma_y_shift) { /* 422 */ + s->dsp.diff_pixels(s->block[6], ptr_cb + (dct_offset >> 1), + dest_cb + (dct_offset >> 1), wrap_c); + s->dsp.diff_pixels(s->block[7], ptr_cr + (dct_offset >> 1), + dest_cr + (dct_offset >> 1), wrap_c); } } /* pre quantization */ - if(s->current_picture.mc_mb_var[s->mb_stride*mb_y+ mb_x]<2*s->qscale*s->qscale){ - //FIXME optimize - if(s->dsp.sad[1](NULL, ptr_y , dest_y , wrap_y, 8) < 20*s->qscale) skip_dct[0]= 1; - if(s->dsp.sad[1](NULL, ptr_y + 8, dest_y + 8, wrap_y, 8) < 20*s->qscale) skip_dct[1]= 1; - if(s->dsp.sad[1](NULL, ptr_y +dct_offset , dest_y +dct_offset , wrap_y, 8) < 20*s->qscale) skip_dct[2]= 1; - if(s->dsp.sad[1](NULL, ptr_y +dct_offset+ 8, dest_y +dct_offset+ 8, wrap_y, 8) < 20*s->qscale) skip_dct[3]= 1; - if(s->dsp.sad[1](NULL, ptr_cb , dest_cb , wrap_c, 8) < 20*s->qscale) skip_dct[4]= 1; - if(s->dsp.sad[1](NULL, ptr_cr , dest_cr , wrap_c, 8) < 20*s->qscale) skip_dct[5]= 1; - if(!s->chroma_y_shift){ /* 422 */ - if(s->dsp.sad[1](NULL, ptr_cb +(dct_offset>>1), dest_cb +(dct_offset>>1), wrap_c, 8) < 20*s->qscale) skip_dct[6]= 1; - if(s->dsp.sad[1](NULL, ptr_cr +(dct_offset>>1), dest_cr +(dct_offset>>1), wrap_c, 8) < 20*s->qscale) skip_dct[7]= 1; + if (s->current_picture.mc_mb_var[s->mb_stride * mb_y + mb_x] < + 2 * s->qscale * s->qscale) { + // FIXME optimize + if (s->dsp.sad[1](NULL, ptr_y , dest_y, + wrap_y, 8) < 20 * s->qscale) + skip_dct[0] = 1; + if (s->dsp.sad[1](NULL, ptr_y + 8, + dest_y + 8, wrap_y, 8) < 20 * s->qscale) + skip_dct[1] = 1; + if (s->dsp.sad[1](NULL, ptr_y + dct_offset, + dest_y + dct_offset, wrap_y, 8) < 20 * s->qscale) + skip_dct[2] = 1; + if (s->dsp.sad[1](NULL, ptr_y + dct_offset + 8, + dest_y + dct_offset + 8, + wrap_y, 8) < 20 * s->qscale) + skip_dct[3] = 1; + if (s->dsp.sad[1](NULL, ptr_cb, dest_cb, + wrap_c, 8) < 20 * s->qscale) + skip_dct[4] = 1; + if (s->dsp.sad[1](NULL, ptr_cr, dest_cr, + wrap_c, 8) < 20 * s->qscale) + skip_dct[5] = 1; + if (!s->chroma_y_shift) { /* 422 */ + if (s->dsp.sad[1](NULL, ptr_cb + (dct_offset >> 1), + dest_cb + (dct_offset >> 1), + wrap_c, 8) < 20 * s->qscale) + skip_dct[6] = 1; + if (s->dsp.sad[1](NULL, ptr_cr + (dct_offset >> 1), + dest_cr + (dct_offset >> 1), + wrap_c, 8) < 20 * s->qscale) + skip_dct[7] = 1; } } } - if(s->avctx->quantizer_noise_shaping){ - if(!skip_dct[0]) get_visual_weight(weight[0], ptr_y , wrap_y); - if(!skip_dct[1]) get_visual_weight(weight[1], ptr_y + 8, wrap_y); - if(!skip_dct[2]) get_visual_weight(weight[2], ptr_y + dct_offset , wrap_y); - if(!skip_dct[3]) get_visual_weight(weight[3], ptr_y + dct_offset + 8, wrap_y); - if(!skip_dct[4]) get_visual_weight(weight[4], ptr_cb , wrap_c); - if(!skip_dct[5]) get_visual_weight(weight[5], ptr_cr , wrap_c); - if(!s->chroma_y_shift){ /* 422 */ - if(!skip_dct[6]) get_visual_weight(weight[6], ptr_cb + (dct_offset>>1), wrap_c); - if(!skip_dct[7]) get_visual_weight(weight[7], ptr_cr + (dct_offset>>1), wrap_c); + if (s->avctx->quantizer_noise_shaping) { + if (!skip_dct[0]) + get_visual_weight(weight[0], ptr_y , wrap_y); + if (!skip_dct[1]) + get_visual_weight(weight[1], ptr_y + 8, wrap_y); + if (!skip_dct[2]) + get_visual_weight(weight[2], ptr_y + dct_offset , wrap_y); + if (!skip_dct[3]) + get_visual_weight(weight[3], ptr_y + dct_offset + 8, wrap_y); + if (!skip_dct[4]) + get_visual_weight(weight[4], ptr_cb , wrap_c); + if (!skip_dct[5]) + get_visual_weight(weight[5], ptr_cr , wrap_c); + if (!s->chroma_y_shift) { /* 422 */ + if (!skip_dct[6]) + get_visual_weight(weight[6], ptr_cb + (dct_offset >> 1), + wrap_c); + if (!skip_dct[7]) + get_visual_weight(weight[7], ptr_cr + (dct_offset >> 1), + wrap_c); } - memcpy(orig[0], s->block[0], sizeof(DCTELEM)*64*mb_block_count); + memcpy(orig[0], s->block[0], sizeof(DCTELEM) * 64 * mb_block_count); } /* DCT & quantize */ - assert(s->out_format!=FMT_MJPEG || s->qscale==8); + assert(s->out_format != FMT_MJPEG || s->qscale == 8); { - for(i=0;iblock_last_index[i] = s->dct_quantize(s, s->block[i], i, s->qscale, &overflow); - // FIXME we could decide to change to quantizer instead of clipping - // JS: I don't think that would be a good idea it could lower quality instead - // of improve it. Just INTRADC clipping deserves changes in quantizer - if (overflow) clip_coeffs(s, s->block[i], s->block_last_index[i]); - }else - s->block_last_index[i]= -1; - } - if(s->avctx->quantizer_noise_shaping){ - for(i=0;iblock_last_index[i] = dct_quantize_refine(s, s->block[i], weight[i], orig[i], i, s->qscale); + // FIXME we could decide to change to quantizer instead of + // clipping + // JS: I don't think that would be a good idea it could lower + // quality instead of improve it. Just INTRADC clipping + // deserves changes in quantizer + if (overflow) + clip_coeffs(s, s->block[i], s->block_last_index[i]); + } else + s->block_last_index[i] = -1; + } + if (s->avctx->quantizer_noise_shaping) { + for (i = 0; i < mb_block_count; i++) { + if (!skip_dct[i]) { + s->block_last_index[i] = + dct_quantize_refine(s, s->block[i], weight[i], + orig[i], i, s->qscale); } } } - if(s->luma_elim_threshold && !s->mb_intra) - for(i=0; i<4; i++) + if (s->luma_elim_threshold && !s->mb_intra) + for (i = 0; i < 4; i++) dct_single_coeff_elimination(s, i, s->luma_elim_threshold); - if(s->chroma_elim_threshold && !s->mb_intra) - for(i=4; ichroma_elim_threshold && !s->mb_intra) + for (i = 4; i < mb_block_count; i++) dct_single_coeff_elimination(s, i, s->chroma_elim_threshold); - if(s->flags & CODEC_FLAG_CBP_RD){ - for(i=0;iblock_last_index[i] == -1) - s->coded_score[i]= INT_MAX/256; + if (s->flags & CODEC_FLAG_CBP_RD) { + for (i = 0; i < mb_block_count; i++) { + if (s->block_last_index[i] == -1) + s->coded_score[i] = INT_MAX / 256; } } } - if((s->flags&CODEC_FLAG_GRAY) && s->mb_intra){ - s->block_last_index[4]= - s->block_last_index[5]= 0; - s->block[4][0]= - s->block[5][0]= (1024 + s->c_dc_scale/2)/ s->c_dc_scale; + if ((s->flags & CODEC_FLAG_GRAY) && s->mb_intra) { + s->block_last_index[4] = + s->block_last_index[5] = 0; + s->block[4][0] = + s->block[5][0] = (1024 + s->c_dc_scale / 2) / s->c_dc_scale; } - //non c quantize code returns incorrect block_last_index FIXME - if(s->alternate_scan && s->dct_quantize != dct_quantize_c){ - for(i=0; ialternate_scan && s->dct_quantize != dct_quantize_c) { + for (i = 0; i < mb_block_count; i++) { int j; - if(s->block_last_index[i]>0){ - for(j=63; j>0; j--){ - if(s->block[i][ s->intra_scantable.permutated[j] ]) break; + if (s->block_last_index[i] > 0) { + for (j = 63; j > 0; j--) { + if (s->block[i][s->intra_scantable.permutated[j]]) + break; } - s->block_last_index[i]= j; + s->block_last_index[i] = j; } } } @@ -1787,12 +2090,12 @@ static inline void copy_context_before_encode(MpegEncContext *d, MpegEncContext *s, int type){ int i; - memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster then a loop? + memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster than a loop? /* mpeg1 */ d->mb_skip_run= s->mb_skip_run; for(i=0; i<3; i++) - d->last_dc[i]= s->last_dc[i]; + d->last_dc[i] = s->last_dc[i]; /* statistics */ d->mv_bits= s->mv_bits; @@ -1816,12 +2119,12 @@ int i; memcpy(d->mv, s->mv, 2*4*2*sizeof(int)); - memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster then a loop? + memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster than a loop? /* mpeg1 */ d->mb_skip_run= s->mb_skip_run; for(i=0; i<3; i++) - d->last_dc[i]= s->last_dc[i]; + d->last_dc[i] = s->last_dc[i]; /* statistics */ d->mv_bits= s->mv_bits; @@ -1932,18 +2235,18 @@ if(w==16 && h==16) if(s->avctx->mb_cmp == FF_CMP_NSSE){ - return s->dsp.nsse[0](s, s->new_picture.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], s->linesize, 16) - +s->dsp.nsse[1](s, s->new_picture.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], s->uvlinesize, 8) - +s->dsp.nsse[1](s, s->new_picture.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], s->uvlinesize, 8); + return s->dsp.nsse[0](s, s->new_picture.f.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], s->linesize, 16) + +s->dsp.nsse[1](s, s->new_picture.f.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], s->uvlinesize, 8) + +s->dsp.nsse[1](s, s->new_picture.f.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], s->uvlinesize, 8); }else{ - return s->dsp.sse[0](NULL, s->new_picture.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], s->linesize, 16) - +s->dsp.sse[1](NULL, s->new_picture.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], s->uvlinesize, 8) - +s->dsp.sse[1](NULL, s->new_picture.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], s->uvlinesize, 8); + return s->dsp.sse[0](NULL, s->new_picture.f.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], s->linesize, 16) + +s->dsp.sse[1](NULL, s->new_picture.f.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], s->uvlinesize, 8) + +s->dsp.sse[1](NULL, s->new_picture.f.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], s->uvlinesize, 8); } else - return sse(s, s->new_picture.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], w, h, s->linesize) - +sse(s, s->new_picture.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], w>>1, h>>1, s->uvlinesize) - +sse(s, s->new_picture.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], w>>1, h>>1, s->uvlinesize); + return sse(s, s->new_picture.f.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], w, h, s->linesize) + +sse(s, s->new_picture.f.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], w>>1, h>>1, s->uvlinesize) + +sse(s, s->new_picture.f.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], w>>1, h>>1, s->uvlinesize); } static int pre_estimate_motion_thread(AVCodecContext *c, void *arg){ @@ -2002,11 +2305,11 @@ for(mb_x=0; mb_x < s->mb_width; mb_x++) { int xx = mb_x * 16; int yy = mb_y * 16; - uint8_t *pix = s->new_picture.data[0] + (yy * s->linesize) + xx; + uint8_t *pix = s->new_picture.f.data[0] + (yy * s->linesize) + xx; int varc; int sum = s->dsp.pix_sum(pix, s->linesize); - varc = (s->dsp.pix_norm1(pix, s->linesize) - (((unsigned)(sum*sum))>>8) + 500 + 128)>>8; + varc = (s->dsp.pix_norm1(pix, s->linesize) - (((unsigned)sum*sum)>>8) + 500 + 128)>>8; s->current_picture.mb_var [s->mb_stride * mb_y + mb_x] = varc; s->current_picture.mb_mean[s->mb_stride * mb_y + mb_x] = (sum+128)>>8; @@ -2027,7 +2330,7 @@ ff_mjpeg_encode_stuffing(&s->pb); } - align_put_bits(&s->pb); + avpriv_align_put_bits(&s->pb); flush_put_bits(&s->pb); if((s->flags&CODEC_FLAG_PASS1) && !s->partitioned_frame) @@ -2069,7 +2372,7 @@ /* note: quant matrix value (8) is implied here */ s->last_dc[i] = 128 << s->intra_dc_precision; - s->current_picture.error[i] = 0; + s->current_picture.f.error[i] = 0; } s->mb_skip_run = 0; memset(s->last_mv, 0, sizeof(s->last_mv)); @@ -2170,9 +2473,7 @@ int d= 100 / s->avctx->error_rate; if(r % d == 0){ current_packet_size=0; -#ifndef ALT_BITSTREAM_WRITER s->pb.buf_ptr= s->ptr_lastgob; -#endif assert(put_bits_ptr(&s->pb) == s->ptr_lastgob); } } @@ -2272,8 +2573,8 @@ s->mv_type = MV_TYPE_8X8; s->mb_intra= 0; for(i=0; i<4; i++){ - s->mv[0][i][0] = s->current_picture.motion_val[0][s->block_index[i]][0]; - s->mv[0][i][1] = s->current_picture.motion_val[0][s->block_index[i]][1]; + s->mv[0][i][0] = s->current_picture.f.motion_val[0][s->block_index[i]][0]; + s->mv[0][i][1] = s->current_picture.f.motion_val[0][s->block_index[i]][1]; } encode_mb_hq(s, &backup_s, &best_s, CANDIDATE_MB_TYPE_INTER4V, pb, pb2, tex_pb, &dmin, &next_block, 0, 0); @@ -2459,24 +2760,24 @@ } } - s->current_picture.qscale_table[xy]= best_s.qscale; + s->current_picture.f.qscale_table[xy] = best_s.qscale; copy_context_after_encode(s, &best_s, -1); pb_bits_count= put_bits_count(&s->pb); flush_put_bits(&s->pb); - ff_copy_bits(&backup_s.pb, bit_buf[next_block^1], pb_bits_count); + avpriv_copy_bits(&backup_s.pb, bit_buf[next_block^1], pb_bits_count); s->pb= backup_s.pb; if(s->data_partitioning){ pb2_bits_count= put_bits_count(&s->pb2); flush_put_bits(&s->pb2); - ff_copy_bits(&backup_s.pb2, bit_buf2[next_block^1], pb2_bits_count); + avpriv_copy_bits(&backup_s.pb2, bit_buf2[next_block^1], pb2_bits_count); s->pb2= backup_s.pb2; tex_pb_bits_count= put_bits_count(&s->tex_pb); flush_put_bits(&s->tex_pb); - ff_copy_bits(&backup_s.tex_pb, bit_buf_tex[next_block^1], tex_pb_bits_count); + avpriv_copy_bits(&backup_s.tex_pb, bit_buf_tex[next_block^1], tex_pb_bits_count); s->tex_pb= backup_s.tex_pb; } s->last_bits= put_bits_count(&s->pb); @@ -2526,8 +2827,8 @@ s->mv_type = MV_TYPE_8X8; s->mb_intra= 0; for(i=0; i<4; i++){ - s->mv[0][i][0] = s->current_picture.motion_val[0][s->block_index[i]][0]; - s->mv[0][i][1] = s->current_picture.motion_val[0][s->block_index[i]][1]; + s->mv[0][i][0] = s->current_picture.f.motion_val[0][s->block_index[i]][0]; + s->mv[0][i][1] = s->current_picture.f.motion_val[0][s->block_index[i]][1]; } break; case CANDIDATE_MB_TYPE_DIRECT: @@ -2628,14 +2929,14 @@ if(s->mb_x*16 + 16 > s->width ) w= s->width - s->mb_x*16; if(s->mb_y*16 + 16 > s->height) h= s->height- s->mb_y*16; - s->current_picture.error[0] += sse( - s, s->new_picture.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, + s->current_picture.f.error[0] += sse( + s, s->new_picture.f.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], w, h, s->linesize); - s->current_picture.error[1] += sse( - s, s->new_picture.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*chr_h, + s->current_picture.f.error[1] += sse( + s, s->new_picture.f.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*chr_h, s->dest[1], w>>1, h>>s->chroma_y_shift, s->uvlinesize); - s->current_picture.error[2] += sse( - s, s->new_picture.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*chr_h, + s->current_picture.f.error[2] += sse( + s, s->new_picture.f.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*chr_h, s->dest[2], w>>1, h>>s->chroma_y_shift, s->uvlinesize); } if(s->loop_filter){ @@ -2686,9 +2987,9 @@ MERGE(misc_bits); MERGE(error_count); MERGE(padding_bug_score); - MERGE(current_picture.error[0]); - MERGE(current_picture.error[1]); - MERGE(current_picture.error[2]); + MERGE(current_picture.f.error[0]); + MERGE(current_picture.f.error[1]); + MERGE(current_picture.f.error[2]); if(dst->avctx->noise_reduction){ for(i=0; i<64; i++){ @@ -2699,19 +3000,19 @@ assert(put_bits_count(&src->pb) % 8 ==0); assert(put_bits_count(&dst->pb) % 8 ==0); - ff_copy_bits(&dst->pb, src->pb.buf, put_bits_count(&src->pb)); + avpriv_copy_bits(&dst->pb, src->pb.buf, put_bits_count(&src->pb)); flush_put_bits(&dst->pb); } static int estimate_qp(MpegEncContext *s, int dry_run){ if (s->next_lambda){ - s->current_picture_ptr->quality= - s->current_picture.quality = s->next_lambda; + s->current_picture_ptr->f.quality = + s->current_picture.f.quality = s->next_lambda; if(!dry_run) s->next_lambda= 0; } else if (!s->fixed_qscale) { - s->current_picture_ptr->quality= - s->current_picture.quality = ff_rate_estimate_qscale(s, dry_run); - if (s->current_picture.quality < 0) + s->current_picture_ptr->f.quality = + s->current_picture.f.quality = ff_rate_estimate_qscale(s, dry_run); + if (s->current_picture.f.quality < 0) return -1; } @@ -2734,7 +3035,7 @@ s->lambda= s->lambda_table[0]; //FIXME broken }else - s->lambda= s->current_picture.quality; + s->lambda = s->current_picture.f.quality; //printf("%d %d\n", s->avctx->global_quality, s->current_picture.quality); update_qscale(s); return 0; @@ -2742,8 +3043,8 @@ /* must be called before writing the header */ static void set_frame_distances(MpegEncContext * s){ - assert(s->current_picture_ptr->pts != AV_NOPTS_VALUE); - s->time= s->current_picture_ptr->pts*s->avctx->time_base.num; + assert(s->current_picture_ptr->f.pts != AV_NOPTS_VALUE); + s->time = s->current_picture_ptr->f.pts * s->avctx->time_base.num; if(s->pict_type==AV_PICTURE_TYPE_B){ s->pb_time= s->pp_time - (s->last_non_b_time - s->time); @@ -2759,7 +3060,7 @@ { int i; int bits; - int context_count = s->avctx->thread_count; + int context_count = s->slice_context_count; s->picture_number = picture_number; @@ -2917,12 +3218,12 @@ } //FIXME var duplication - s->current_picture_ptr->key_frame= - s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I; //FIXME pic_ptr - s->current_picture_ptr->pict_type= - s->current_picture.pict_type= s->pict_type; + s->current_picture_ptr->f.key_frame = + s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I; //FIXME pic_ptr + s->current_picture_ptr->f.pict_type = + s->current_picture.f.pict_type = s->pict_type; - if(s->current_picture.key_frame) + if (s->current_picture.f.key_frame) s->picture_in_gop_number=0; s->last_bits= put_bits_count(&s->pb); @@ -3769,63 +4070,94 @@ return last_non_zero; } +#define OFFSET(x) offsetof(MpegEncContext, x) +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption h263_options[] = { + { "obmc", "use overlapped block motion compensation.", OFFSET(obmc), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, + { "structured_slices","Write slice start position at every GOB header instead of just GOB number.", OFFSET(h263_slice_structured), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE}, + { NULL }, +}; + +static const AVClass h263_class = { + .class_name = "H.263 encoder", + .item_name = av_default_item_name, + .option = h263_options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVCodec ff_h263_encoder = { - "h263", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_H263, - sizeof(MpegEncContext), - MPV_encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "h263", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_H263, + .priv_data_size = sizeof(MpegEncContext), + .init = MPV_encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996"), + .priv_class = &h263_class, +}; + +static const AVOption h263p_options[] = { + { "umv", "Use unlimited motion vectors.", OFFSET(umvplus), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, + { "aiv", "Use alternative inter VLC.", OFFSET(alt_inter_vlc), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, + { "obmc", "use overlapped block motion compensation.", OFFSET(obmc), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, + { "structured_slices", "Write slice start position at every GOB header instead of just GOB number.", OFFSET(h263_slice_structured), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE}, + { NULL }, +}; +static const AVClass h263p_class = { + .class_name = "H.263p encoder", + .item_name = av_default_item_name, + .option = h263p_options, + .version = LIBAVUTIL_VERSION_INT, }; AVCodec ff_h263p_encoder = { - "h263p", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_H263P, - sizeof(MpegEncContext), - MPV_encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "h263p", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_H263P, + .priv_data_size = sizeof(MpegEncContext), + .init = MPV_encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .capabilities = CODEC_CAP_SLICE_THREADS, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"), + .priv_class = &h263p_class, }; AVCodec ff_msmpeg4v2_encoder = { - "msmpeg4v2", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MSMPEG4V2, - sizeof(MpegEncContext), - MPV_encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "msmpeg4v2", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MSMPEG4V2, + .priv_data_size = sizeof(MpegEncContext), + .init = MPV_encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"), }; AVCodec ff_msmpeg4v3_encoder = { - "msmpeg4", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MSMPEG4V3, - sizeof(MpegEncContext), - MPV_encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "msmpeg4", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MSMPEG4V3, + .priv_data_size = sizeof(MpegEncContext), + .init = MPV_encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"), }; AVCodec ff_wmv1_encoder = { - "wmv1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_WMV1, - sizeof(MpegEncContext), - MPV_encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "wmv1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_WMV1, + .priv_data_size = sizeof(MpegEncContext), + .init = MPV_encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 7"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo.h 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo.h 2012-01-11 00:34:30.000000000 +0000 @@ -28,6 +28,7 @@ #ifndef AVCODEC_MPEGVIDEO_H #define AVCODEC_MPEGVIDEO_H +#include "avcodec.h" #include "dsputil.h" #include "get_bits.h" #include "put_bits.h" @@ -82,12 +83,13 @@ * Picture. */ typedef struct Picture{ - FF_COMMON_FRAME + struct AVFrame f; /** * halfpel luma planes. */ uint8_t *interpolated[3]; + int8_t *qscale_table_base; int16_t (*motion_val_base[2])[2]; uint32_t *mb_type_base; #define MB_TYPE_INTRA MB_TYPE_INTRA4x4 //default mb_type if there is just one type @@ -125,7 +127,7 @@ int ref_poc[2][2][16]; ///< h264 POCs of the frames used as reference (FIXME need per slice) int ref_count[2][2]; ///< number of entries in ref_poc (FIXME need per slice) int mbaff; ///< h264 1 -> MBAFF frame 0-> not MBAFF - int field_picture; ///< whether or not the picture was encoded in seperate fields + int field_picture; ///< whether or not the picture was encoded in separate fields int mb_var_sum; ///< sum of MB variance for current frame int mc_mb_var_sum; ///< motion compensated MB variance for current frame @@ -152,9 +154,9 @@ int best_bits; uint32_t *map; ///< map to avoid duplicate evaluations uint32_t *score_map; ///< map to store the scores - int map_generation; + unsigned map_generation; int pre_penalty_factor; - int penalty_factor; /*!< an estimate of the bits required to + int penalty_factor; /**< an estimate of the bits required to code a given mv value, e.g. (1,0) takes more bits than (0,0). We have to estimate whether any reduction in @@ -197,6 +199,7 @@ * MpegEncContext. */ typedef struct MpegEncContext { + AVClass *class; struct AVCodecContext *avctx; /* the following parameters must be initialized before encoding */ int width, height;///< picture size. must be a multiple of 16 @@ -231,8 +234,6 @@ int coded_picture_number; ///< used to set pic->coded_picture_number, should not be used for/by anything else int picture_number; //FIXME remove, unclear definition int picture_in_gop_number; ///< 0-> first pic in gop, ... - int b_frames_since_non_b; ///< used for encoding, relative to not yet reordered input - int64_t user_specified_pts;///< last non zero pts from AVFrame which was passed into avcodec_encode_video() int mb_width, mb_height; ///< number of MBs horizontally & vertically int mb_stride; ///< mb_width+1 used for some arrays to allow simple addressing of left & top MBs without sig11 int b8_stride; ///< 2*mb_width+1 used for some 8x8 block arrays to allow simple addressing @@ -259,12 +260,15 @@ /* WARNING: changes above this line require updates to hardcoded * offsets used in asm. */ + int64_t user_specified_pts;///< last non zero pts from AVFrame which was passed into avcodec_encode_video() + /** bit output */ PutBitContext pb; int start_mb_y; ///< start mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y) int end_mb_y; ///< end mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y) struct MpegEncContext *thread_context[MAX_THREADS]; + int slice_context_count; ///< number of used thread_contexts /** * copy of the previous picture structure. @@ -295,11 +299,10 @@ Picture *current_picture_ptr; ///< pointer to the current picture int picture_count; ///< number of allocated pictures (MAX_PICTURE_COUNT * avctx->thread_count) int picture_range_start, picture_range_end; ///< the part of picture that this context can allocate in - uint8_t *visualization_buffer[3]; //< temporary buffer vor MV visualization + uint8_t *visualization_buffer[3]; ///< temporary buffer vor MV visualization int last_dc[3]; ///< last DC values for MPEG1 int16_t *dc_val_base; int16_t *dc_val[3]; ///< used for mpeg4 DC prediction, all 3 arrays must be continuous - int16_t dc_cache[4*5]; const uint8_t *y_dc_scale_table; ///< qscale -> y_dc_scale table const uint8_t *c_dc_scale_table; ///< qscale -> c_dc_scale table const uint8_t *chroma_qscale_table; ///< qscale -> chroma_qscale (h263) @@ -307,16 +310,13 @@ uint8_t *coded_block; ///< used for coded block pattern prediction (msmpeg4v3, wmv1) int16_t (*ac_val_base)[16]; int16_t (*ac_val[3])[16]; ///< used for for mpeg4 AC prediction, all 3 arrays must be continuous - uint8_t *prev_pict_types; ///< previous picture types in bitstream order, used for mb skip -#define PREV_PICT_TYPES_BUFFER_SIZE 256 int mb_skipped; ///< MUST BE SET only during DECODING uint8_t *mbskip_table; /**< used to avoid copy if macroblock skipped (for black regions for example) and used for b-frame encoding & decoding (contains skip table of next P Frame) */ uint8_t *mbintra_table; ///< used to avoid setting {ac, dc, cbp}-pred stuff to zero on inter MB decoding uint8_t *cbp_table; ///< used to store cbp, ac_pred for partitioned decoding uint8_t *pred_dir_table; ///< used to store pred_dir for partitioned decoding - uint8_t *allocated_edge_emu_buffer; - uint8_t *edge_emu_buffer; ///< points into the middle of allocated_edge_emu_buffer + uint8_t *edge_emu_buffer; ///< temporary buffer for if MVs point to out-of-frame data uint8_t *rd_scratchpad; ///< scratchpad for rate distortion mb decision uint8_t *obmc_scratchpad; uint8_t *b_scratchpad; ///< scratchpad used for writing into write only buffers @@ -328,7 +328,6 @@ int *lambda_table; int adaptive_quant; ///< use adaptive quantization int dquant; ///< qscale difference to prev qscale - int closed_gop; ///< MPEG1/2 GOP is closed int pict_type; ///< AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ... int last_pict_type; //FIXME removes int last_non_b_pict_type; ///< used for mpeg4 gmc b-frames & ratecontrol @@ -340,7 +339,6 @@ /* motion compensation */ int unrestricted_mv; ///< mv can point outside of the coded picture int h263_long_vectors; ///< use horrible h263v1 long vector mode - int decode; ///< if 0 then decoding will be skipped (for encoding b frames for example) DSPContext dsp; ///< pointers for accelerated dsp functions int f_code; ///< forward MV resolution @@ -435,7 +433,6 @@ uint8_t *inter_ac_vlc_length; uint8_t *inter_ac_vlc_last_length; uint8_t *luma_dc_vlc_length; - uint8_t *chroma_dc_vlc_length; #define UNI_AC_ENC_INDEX(run,level) ((run)*128 + (level)) int coded_score[8]; @@ -455,7 +452,6 @@ void *opaque; ///< private data for the user /* bit rate control */ - int64_t wanted_bits; int64_t total_bits; int frame_bits; ///< bits used for the current frame int next_lambda; ///< next lambda used for retrying to encode a frame @@ -477,20 +473,22 @@ int error_count, error_occurred; uint8_t *error_status_table; ///< table of the error status of each MB #define VP_START 1 ///< current MB is the first after a resync marker -#define AC_ERROR 2 -#define DC_ERROR 4 -#define MV_ERROR 8 -#define AC_END 16 -#define DC_END 32 -#define MV_END 64 -//FIXME some prefix? +#define ER_AC_ERROR 2 +#define ER_DC_ERROR 4 +#define ER_MV_ERROR 8 +#define ER_AC_END 16 +#define ER_DC_END 32 +#define ER_MV_END 64 + +#define ER_MB_ERROR (ER_AC_ERROR|ER_DC_ERROR|ER_MV_ERROR) +#define ER_MB_END (ER_AC_END|ER_DC_END|ER_MV_END) int resync_mb_x; ///< x position of last resync marker int resync_mb_y; ///< y position of last resync marker GetBitContext last_resync_gb; ///< used to search for the next resync marker int mb_num_left; ///< number of MBs left in this video packet (for partitioned Slices only) int next_p_frame_damaged; ///< set if the next p frame is damaged, to avoid showing trashed b frames - int error_recognition; + int err_recognition; ParseContext parse_context; @@ -640,6 +638,8 @@ int interlaced_dct; int first_slice; int first_field; ///< is 1 for the first field of a field picture 0 otherwise + int drop_frame_timecode; ///< timecode is in drop frame format. + int scan_offset; ///< reserve space for SVCD scan offset user data. /* RTP specific */ int rtp_mode; @@ -714,7 +714,7 @@ int MPV_lowest_referenced_row(MpegEncContext *s, int dir); void MPV_report_decode_progress(MpegEncContext *s); int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src); -const uint8_t *ff_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state); +const uint8_t *avpriv_mpv_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state); void ff_set_qscale(MpegEncContext * s, int qscale); void ff_er_frame_start(MpegEncContext *s); @@ -729,8 +729,8 @@ void ff_copy_picture(Picture *dst, Picture *src); /** - * allocates a Picture - * The pixels are allocated/set by calling get_buffer() if shared=0 + * Allocate a Picture. + * The pixels are allocated/set by calling get_buffer() if shared = 0. */ int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo_parser.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -40,7 +40,7 @@ while (buf < buf_end) { start_code= -1; - buf= ff_find_start_code(buf, buf_end, &start_code); + buf= avpriv_mpv_find_start_code(buf, buf_end, &start_code); bytes_left = buf_end - buf; switch(start_code) { case PICTURE_START_CODE: @@ -57,8 +57,8 @@ did_set_size=1; } frame_rate_index = buf[3] & 0xf; - pc->frame_rate.den = avctx->time_base.den = ff_frame_rate_tab[frame_rate_index].num; - pc->frame_rate.num = avctx->time_base.num = ff_frame_rate_tab[frame_rate_index].den; + pc->frame_rate.den = avctx->time_base.den = avpriv_frame_rate_tab[frame_rate_index].num; + pc->frame_rate.num = avctx->time_base.num = avpriv_frame_rate_tab[frame_rate_index].den; avctx->bit_rate = ((buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6))*400; avctx->codec_id = CODEC_ID_MPEG1VIDEO; avctx->sub_id = 1; @@ -174,10 +174,9 @@ } AVCodecParser ff_mpegvideo_parser = { - { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO }, - sizeof(ParseContext1), - NULL, - mpegvideo_parse, - ff_parse1_close, - mpegvideo_split, + .codec_ids = { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO }, + .priv_data_size = sizeof(ParseContext1), + .parser_parse = mpegvideo_parse, + .parser_close = ff_parse1_close, + .split = mpegvideo_split, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo_xvmc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo_xvmc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mpegvideo_xvmc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mpegvideo_xvmc.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,7 +41,7 @@ */ void ff_xvmc_init_block(MpegEncContext *s) { - struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.data[2]; + struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.f.data[2]; assert(render && render->xvmc_id == AV_XVMC_ID); s->block = (DCTELEM (*)[64])(render->data_blocks + render->next_free_data_block_num * 64); @@ -73,7 +73,7 @@ */ int ff_xvmc_field_start(MpegEncContext *s, AVCodecContext *avctx) { - struct xvmc_pix_fmt *last, *next, *render = (struct xvmc_pix_fmt*)s->current_picture.data[2]; + struct xvmc_pix_fmt *last, *next, *render = (struct xvmc_pix_fmt*)s->current_picture.f.data[2]; const int mb_block_count = 4 + (1 << s->chroma_format); assert(avctx); @@ -113,7 +113,7 @@ case AV_PICTURE_TYPE_I: return 0; // no prediction from other frames case AV_PICTURE_TYPE_B: - next = (struct xvmc_pix_fmt*)s->next_picture.data[2]; + next = (struct xvmc_pix_fmt*)s->next_picture.f.data[2]; if (!next) return -1; if (next->xvmc_id != AV_XVMC_ID) @@ -121,7 +121,7 @@ render->p_future_surface = next->p_surface; // no return here, going to set forward prediction case AV_PICTURE_TYPE_P: - last = (struct xvmc_pix_fmt*)s->last_picture.data[2]; + last = (struct xvmc_pix_fmt*)s->last_picture.f.data[2]; if (!last) last = render; // predict second field from the first if (last->xvmc_id != AV_XVMC_ID) @@ -141,7 +141,7 @@ */ void ff_xvmc_field_end(MpegEncContext *s) { - struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.data[2]; + struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.f.data[2]; assert(render); if (render->filled_mv_blocks_num > 0) @@ -179,10 +179,10 @@ // Do I need to export quant when I could not perform postprocessing? // Anyway, it doesn't hurt. - s->current_picture.qscale_table[mb_xy] = s->qscale; + s->current_picture.f.qscale_table[mb_xy] = s->qscale; // start of XVMC-specific code - render = (struct xvmc_pix_fmt*)s->current_picture.data[2]; + render = (struct xvmc_pix_fmt*)s->current_picture.f.data[2]; assert(render); assert(render->xvmc_id == AV_XVMC_ID); assert(render->mv_blocks); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msgsmdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msgsmdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msgsmdec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msgsmdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "avcodec.h" #include "msgsmdec.h" #include "gsmdec_template.c" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msmpeg4.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msmpeg4.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msmpeg4.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msmpeg4.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * MSMPEG4 backend for ffmpeg encoder and decoder + * MSMPEG4 backend for encoder and decoder * Copyright (c) 2001 Fabrice Bellard * Copyright (c) 2002-2004 Michael Niedermayer * @@ -24,7 +24,7 @@ /** * @file - * MSMPEG4 backend for ffmpeg encoder and decoder. + * MSMPEG4 backend for encoder and decoder */ #include "avcodec.h" @@ -62,10 +62,6 @@ /* vc1 externs */ extern const uint8_t wmv3_dc_scale_table[32]; -#ifdef DEBUG -int frame_count = 0; -#endif - #include "msmpeg4data.h" #if CONFIG_ENCODERS //strangely gcc includes this even if it is not referenced @@ -270,7 +266,7 @@ for(i=0; ipb); + avpriv_align_put_bits(&s->pb); put_bits(&s->pb, 2, s->pict_type - 1); put_bits(&s->pb, 5, s->qscale); @@ -780,10 +776,10 @@ }else{ if(n<4){ wrap= s->linesize; - dest= s->current_picture.data[0] + (((n>>1) + 2*s->mb_y) * 8* wrap ) + ((n&1) + 2*s->mb_x) * 8; + dest= s->current_picture.f.data[0] + (((n >> 1) + 2*s->mb_y) * 8* wrap ) + ((n & 1) + 2*s->mb_x) * 8; }else{ wrap= s->uvlinesize; - dest= s->current_picture.data[n-3] + (s->mb_y * 8 * wrap) + s->mb_x * 8; + dest= s->current_picture.f.data[n - 3] + (s->mb_y * 8 * wrap) + s->mb_x * 8; } if(s->mb_x==0) a= (1024 + (scale>>1))/scale; else a= get_dc(dest-8, wrap, scale*8); @@ -1172,7 +1168,7 @@ { int cbp, code, i; uint8_t *coded_val; - uint32_t * const mb_type_ptr= &s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ]; + uint32_t * const mb_type_ptr = &s->current_picture.f.mb_type[s->mb_x + s->mb_y*s->mb_stride]; if (s->pict_type == AV_PICTURE_TYPE_P) { if (s->use_skip_mb_code) { @@ -1695,7 +1691,7 @@ if(s->msmpeg4_version<=3){ last= SHOW_UBITS(re, &s->gb, 1); SKIP_CACHE(re, &s->gb, 1); run= SHOW_UBITS(re, &s->gb, 6); SKIP_CACHE(re, &s->gb, 6); - level= SHOW_SBITS(re, &s->gb, 8); LAST_SKIP_CACHE(re, &s->gb, 8); + level= SHOW_SBITS(re, &s->gb, 8); SKIP_COUNTER(re, &s->gb, 1+6+8); }else{ int sign; @@ -1814,7 +1810,7 @@ i-= 192; if(i&(~63)){ const int left= get_bits_left(&s->gb); - if(((i+192 == 64 && level/qmul==-1) || s->error_recognition<=1) && left>=0){ + if(((i+192 == 64 && level/qmul==-1) || !(s->err_recognition&AV_EF_BITSTREAM)) && left>=0){ av_log(s->avctx, AV_LOG_ERROR, "ignoring overflow at %d %d\n", s->mb_x, s->mb_y); break; }else{ @@ -1884,60 +1880,56 @@ } AVCodec ff_msmpeg4v1_decoder = { - "msmpeg4v1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MSMPEG4V1, - sizeof(MpegEncContext), - ff_msmpeg4_decode_init, - NULL, - ff_h263_decode_end, - ff_h263_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, + .name = "msmpeg4v1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MSMPEG4V1, + .priv_data_size = sizeof(MpegEncContext), + .init = ff_msmpeg4_decode_init, + .close = ff_h263_decode_end, + .decode = ff_h263_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, .max_lowres= 3, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"), .pix_fmts= ff_pixfmt_list_420, }; AVCodec ff_msmpeg4v2_decoder = { - "msmpeg4v2", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MSMPEG4V2, - sizeof(MpegEncContext), - ff_msmpeg4_decode_init, - NULL, - ff_h263_decode_end, - ff_h263_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, + .name = "msmpeg4v2", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MSMPEG4V2, + .priv_data_size = sizeof(MpegEncContext), + .init = ff_msmpeg4_decode_init, + .close = ff_h263_decode_end, + .decode = ff_h263_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, .max_lowres= 3, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"), .pix_fmts= ff_pixfmt_list_420, }; AVCodec ff_msmpeg4v3_decoder = { - "msmpeg4", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MSMPEG4V3, - sizeof(MpegEncContext), - ff_msmpeg4_decode_init, - NULL, - ff_h263_decode_end, - ff_h263_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, + .name = "msmpeg4", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MSMPEG4V3, + .priv_data_size = sizeof(MpegEncContext), + .init = ff_msmpeg4_decode_init, + .close = ff_h263_decode_end, + .decode = ff_h263_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, .max_lowres= 3, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"), .pix_fmts= ff_pixfmt_list_420, }; AVCodec ff_wmv1_decoder = { - "wmv1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_WMV1, - sizeof(MpegEncContext), - ff_msmpeg4_decode_init, - NULL, - ff_h263_decode_end, - ff_h263_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, + .name = "wmv1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_WMV1, + .priv_data_size = sizeof(MpegEncContext), + .init = ff_msmpeg4_decode_init, + .close = ff_h263_decode_end, + .decode = ff_h263_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, .max_lowres= 3, .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 7"), .pix_fmts= ff_pixfmt_list_420, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msmpeg4data.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msmpeg4data.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msmpeg4data.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msmpeg4data.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * MSMPEG4 backend for ffmpeg encoder and decoder + * MSMPEG4 backend for encoder and decoder * copyright (c) 2001 Fabrice Bellard * copyright (c) 2002-2004 Michael Niedermayer * diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msmpeg4data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msmpeg4data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msmpeg4data.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msmpeg4data.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * MSMPEG4 backend for ffmpeg encoder and decoder + * MSMPEG4 backend for encoder and decoder * copyright (c) 2001 Fabrice Bellard * copyright (c) 2002-2004 Michael Niedermayer * diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msmpeg4.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msmpeg4.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msmpeg4.h 2011-05-25 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msmpeg4.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * MSMPEG4 backend for ffmpeg encoder and decoder + * MSMPEG4 backend for encoder and decoder * copyright (c) 2007 Aurelien Jacobs * * This file is part of Libav. @@ -19,10 +19,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/** - * @file - */ - #ifndef AVCODEC_MSMPEG4_H #define AVCODEC_MSMPEG4_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msrle.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msrle.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msrle.c 2011-04-16 05:56:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msrle.c 2012-01-11 00:34:30.000000000 +0000 @@ -145,14 +145,13 @@ } AVCodec ff_msrle_decoder = { - "msrle", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MSRLE, - sizeof(MsrleContext), - msrle_decode_init, - NULL, - msrle_decode_end, - msrle_decode_frame, - CODEC_CAP_DR1, + .name = "msrle", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MSRLE, + .priv_data_size = sizeof(MsrleContext), + .init = msrle_decode_init, + .close = msrle_decode_end, + .decode = msrle_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name= NULL_IF_CONFIG_SMALL("Microsoft RLE"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msrledec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msrledec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msrledec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msrledec.c 2012-01-11 00:34:30.000000000 +0000 @@ -138,8 +138,8 @@ uint32_t av_uninit(pix32); unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3); - output = pic->data[0] + (avctx->height - 1) * pic->linesize[0]; - output_end = pic->data[0] + (avctx->height) * pic->linesize[0]; + output = pic->data[0] + (avctx->height - 1) * pic->linesize[0]; + output_end = pic->data[0] + avctx->height * pic->linesize[0]; while(src < data + srcsize) { p1 = *src++; if(p1 == 0) { //Escape code diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msvideo1.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msvideo1.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/msvideo1.c 2011-04-16 05:56:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/msvideo1.c 2012-01-11 00:34:30.000000000 +0000 @@ -334,14 +334,13 @@ } AVCodec ff_msvideo1_decoder = { - "msvideo1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_MSVIDEO1, - sizeof(Msvideo1Context), - msvideo1_decode_init, - NULL, - msvideo1_decode_end, - msvideo1_decode_frame, - CODEC_CAP_DR1, + .name = "msvideo1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_MSVIDEO1, + .priv_data_size = sizeof(Msvideo1Context), + .init = msvideo1_decode_init, + .close = msvideo1_decode_end, + .decode = msvideo1_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name= NULL_IF_CONFIG_SMALL("Microsoft Video 1"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mxpegdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mxpegdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/mxpegdec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/mxpegdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -47,9 +47,7 @@ s->picture[0].reference = s->picture[1].reference = 3; s->jpg.picture_ptr = &s->picture[0]; - ff_mjpeg_decode_init(avctx); - - return 0; + return ff_mjpeg_decode_init(avctx); } static int mxpeg_decode_app(MXpegDecodeContext *s, @@ -275,9 +273,13 @@ return AVERROR(ENOMEM); } - ff_mjpeg_decode_sos(jpg, s->mxm_bitmask, reference_ptr); + ret = ff_mjpeg_decode_sos(jpg, s->mxm_bitmask, reference_ptr); + if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE)) + return ret; } else { - ff_mjpeg_decode_sos(jpg, NULL, NULL); + ret = ff_mjpeg_decode_sos(jpg, NULL, NULL); + if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE)) + return ret; } break; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/nellymoser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/nellymoser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/nellymoser.c 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/nellymoser.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,7 +35,7 @@ #include "avcodec.h" #include "dsputil.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" const float ff_nelly_dequantization_table[127] = { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/nellymoserdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/nellymoserdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/nellymoserdec.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/nellymoserdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,14 +41,15 @@ #include "fmtconvert.h" #include "sinewin.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" typedef struct NellyMoserDecodeContext { AVCodecContext* avctx; - DECLARE_ALIGNED(32, float, float_buf)[NELLY_SAMPLES]; - float state[128]; + AVFrame frame; + float *float_buf; + DECLARE_ALIGNED(16, float, state)[NELLY_BUF_LEN]; AVLFG random_state; GetBitContext gb; float scale_bias; @@ -58,23 +59,6 @@ DECLARE_ALIGNED(32, float, imdct_out)[NELLY_BUF_LEN * 2]; } NellyMoserDecodeContext; -static void overlap_and_window(NellyMoserDecodeContext *s, float *state, float *audio, float *a_in) -{ - int bot, top; - - bot = 0; - top = NELLY_BUF_LEN-1; - - while (bot < NELLY_BUF_LEN) { - audio[bot] = a_in [bot]*ff_sine_128[bot] - +state[bot]*ff_sine_128[top]; - - bot++; - top--; - } - memcpy(state, a_in + NELLY_BUF_LEN, sizeof(float)*NELLY_BUF_LEN); -} - static void nelly_decode_block(NellyMoserDecodeContext *s, const unsigned char block[NELLY_BLOCK_LEN], float audio[NELLY_SAMPLES]) @@ -125,7 +109,9 @@ s->imdct_ctx.imdct_calc(&s->imdct_ctx, s->imdct_out, aptr); /* XXX: overlapping and windowing should be part of a more generic imdct function */ - overlap_and_window(s, s->state, aptr, s->imdct_out); + s->dsp.vector_fmul_reverse(s->state, s->state, ff_sine_128, NELLY_BUF_LEN); + s->dsp.vector_fmul_add(aptr, s->imdct_out, ff_sine_128, s->state, NELLY_BUF_LEN); + memcpy(s->state, s->imdct_out + NELLY_BUF_LEN, sizeof(float)*NELLY_BUF_LEN); } } @@ -137,38 +123,52 @@ ff_mdct_init(&s->imdct_ctx, 8, 1, 1.0); dsputil_init(&s->dsp, avctx); - ff_fmt_convert_init(&s->fmt_conv, avctx); - s->scale_bias = 1.0/(1*8); + if (avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT) { + s->scale_bias = 1.0/(32768*8); + avctx->sample_fmt = AV_SAMPLE_FMT_FLT; + } else { + s->scale_bias = 1.0/(1*8); + avctx->sample_fmt = AV_SAMPLE_FMT_S16; + ff_fmt_convert_init(&s->fmt_conv, avctx); + s->float_buf = av_mallocz(NELLY_SAMPLES * sizeof(*s->float_buf)); + if (!s->float_buf) { + av_log(avctx, AV_LOG_ERROR, "error allocating float buffer\n"); + return AVERROR(ENOMEM); + } + } /* Generate overlap window */ if (!ff_sine_128[127]) ff_init_ff_sine_windows(7); - avctx->sample_fmt = AV_SAMPLE_FMT_S16; avctx->channel_layout = AV_CH_LAYOUT_MONO; + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } -static int decode_tag(AVCodecContext * avctx, - void *data, int *data_size, - AVPacket *avpkt) { +static int decode_tag(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) +{ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; NellyMoserDecodeContext *s = avctx->priv_data; - int blocks, i; - int16_t* samples; - *data_size = 0; - samples = (int16_t*)data; - - if (buf_size < avctx->block_align) - return buf_size; - - if (buf_size % 64) { - av_log(avctx, AV_LOG_ERROR, "Tag size %d.\n", buf_size); - return buf_size; + int blocks, i, ret; + int16_t *samples_s16; + float *samples_flt; + + blocks = buf_size / NELLY_BLOCK_LEN; + if (blocks <= 0) { + av_log(avctx, AV_LOG_ERROR, "Packet is too small\n"); + return AVERROR_INVALIDDATA; + } + if (buf_size % NELLY_BLOCK_LEN) { + av_log(avctx, AV_LOG_WARNING, "Leftover bytes: %d.\n", + buf_size % NELLY_BLOCK_LEN); } - blocks = buf_size / 64; /* Normal numbers of blocks for sample rates: * 8000 Hz - 1 * 11025 Hz - 2 @@ -177,31 +177,54 @@ * 44100 Hz - 8 */ + /* get output buffer */ + s->frame.nb_samples = NELLY_SAMPLES * blocks; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples_s16 = (int16_t *)s->frame.data[0]; + samples_flt = (float *)s->frame.data[0]; + for (i=0 ; ifloat_buf); - s->fmt_conv.float_to_int16(&samples[i*NELLY_SAMPLES], s->float_buf, NELLY_SAMPLES); - *data_size += NELLY_SAMPLES*sizeof(int16_t); + if (avctx->sample_fmt == SAMPLE_FMT_FLT) { + nelly_decode_block(s, buf, samples_flt); + samples_flt += NELLY_SAMPLES; + } else { + nelly_decode_block(s, buf, s->float_buf); + s->fmt_conv.float_to_int16(samples_s16, s->float_buf, NELLY_SAMPLES); + samples_s16 += NELLY_SAMPLES; + } + buf += NELLY_BLOCK_LEN; } + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return buf_size; } static av_cold int decode_end(AVCodecContext * avctx) { NellyMoserDecodeContext *s = avctx->priv_data; + av_freep(&s->float_buf); ff_mdct_end(&s->imdct_ctx); + return 0; } AVCodec ff_nellymoser_decoder = { - "nellymoser", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_NELLYMOSER, - sizeof(NellyMoserDecodeContext), - decode_init, - NULL, - decode_end, - decode_tag, + .name = "nellymoser", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_NELLYMOSER, + .priv_data_size = sizeof(NellyMoserDecodeContext), + .init = decode_init, + .close = decode_end, + .decode = decode_tag, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_PARAM_CHANGE, .long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"), + .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT, + AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_NONE }, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/nellymoserenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/nellymoserenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/nellymoserenc.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/nellymoserenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,6 +35,7 @@ * http://wiki.multimedia.cx/index.php?title=Nellymoser */ +#include "libavutil/mathematics.h" #include "nellymoser.h" #include "avcodec.h" #include "dsputil.h" @@ -146,7 +147,7 @@ avctx->frame_size = NELLY_SAMPLES; s->avctx = avctx; - ff_mdct_init(&s->mdct_ctx, 8, 0, 1.0); + ff_mdct_init(&s->mdct_ctx, 8, 0, 32768.0); dsputil_init(&s->dsp, avctx); /* Generate overlap window */ @@ -352,17 +353,15 @@ static int encode_frame(AVCodecContext *avctx, uint8_t *frame, int buf_size, void *data) { NellyMoserEncodeContext *s = avctx->priv_data; - const int16_t *samples = data; + const float *samples = data; int i; if (s->last_frame) return 0; if (data) { - for (i = 0; i < avctx->frame_size; i++) { - s->buf[s->bufsel][i] = samples[i]; - } - for (; i < NELLY_SAMPLES; i++) { + memcpy(s->buf[s->bufsel], samples, avctx->frame_size * sizeof(*samples)); + for (i = avctx->frame_size; i < NELLY_SAMPLES; i++) { s->buf[s->bufsel][i] = 0; } s->bufsel = 1 - s->bufsel; @@ -393,5 +392,5 @@ .close = encode_end, .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY, .long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"), - .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, + .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/nuv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/nuv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/nuv.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/nuv.c 2012-01-11 00:34:30.000000000 +0000 @@ -63,11 +63,11 @@ }; /** - * \brief copy frame data from buffer to AVFrame, handling stride. - * \param f destination AVFrame - * \param src source buffer, does not use any line-stride - * \param width width of the video frame - * \param height height of the video frame + * @brief copy frame data from buffer to AVFrame, handling stride. + * @param f destination AVFrame + * @param src source buffer, does not use any line-stride + * @param width width of the video frame + * @param height height of the video frame */ static void copy_frame(AVFrame *f, const uint8_t *src, int width, int height) { @@ -77,7 +77,7 @@ } /** - * \brief extract quantization tables from codec data into our context + * @brief extract quantization tables from codec data into our context */ static int get_quant(AVCodecContext *avctx, NuvContext *c, const uint8_t *buf, int size) { @@ -94,7 +94,7 @@ } /** - * \brief set quantization tables from a quality value + * @brief set quantization tables from a quality value */ static void get_quant_quality(NuvContext *c, int quality) { int i; @@ -107,8 +107,8 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height, int quality) { NuvContext *c = avctx->priv_data; - width = (width + 1) & ~1; - height = (height + 1) & ~1; + width = FFALIGN(width, 2); + height = FFALIGN(height, 2); if (quality >= 0) get_quant_quality(c, quality); if (width != c->width || height != c->height) { @@ -184,9 +184,9 @@ } if (c->codec_frameheader) { int w, h, q; - if (buf_size < 12) { - av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame\n"); - return -1; + if (buf[0] != 'V' || buf_size < 12) { + av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame (wrong codec_tag?)\n"); + return AVERROR_INVALIDDATA; } w = AV_RL16(&buf[6]); h = AV_RL16(&buf[8]); @@ -273,15 +273,14 @@ } AVCodec ff_nuv_decoder = { - "nuv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_NUV, - sizeof(NuvContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "nuv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_NUV, + .priv_data_size = sizeof(NuvContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo/RTJPEG"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/opt.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/opt.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/opt.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/opt.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,3 +1,21 @@ +/* + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + /** * @file * This header is provided for compatibility only and will be removed diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/options.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/options.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/options.c 2011-06-19 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/options.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,8 @@ */ #include "avcodec.h" +#include "internal.h" +#include "libavutil/avassert.h" #include "libavutil/opt.h" #include /* FLT_MIN, FLT_MAX */ @@ -37,22 +39,27 @@ return "NULL"; } -static const AVOption *opt_find(void *obj, const char *name, const char *unit, int opt_flags, int search_flags) +static void *codec_child_next(void *obj, void *prev) { AVCodecContext *s = obj; - AVCodec *c = NULL; + if (!prev && s->codec && s->codec->priv_class && s->priv_data) + return s->priv_data; + return NULL; +} - if (s->priv_data) { - if (s->codec->priv_class) - return av_opt_find(s->priv_data, name, unit, opt_flags, search_flags); - return NULL; - } +static const AVClass *codec_child_class_next(const AVClass *prev) +{ + AVCodec *c = NULL; - while ((c = av_codec_next(c))) { - const AVOption *o; - if (c->priv_class && (o = av_opt_find(&c->priv_class, name, unit, opt_flags, search_flags))) - return o; - } + /* find the codec that corresponds to prev */ + while (prev && (c = av_codec_next(c))) + if (c->priv_class == prev) + break; + + /* find next codec with priv options */ + while (c = av_codec_next(c)) + if (c->priv_class) + return c->priv_class; return NULL; } @@ -68,404 +75,457 @@ #define AV_CODEC_DEFAULT_BITRATE 200*1000 static const AVOption options[]={ -{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), FF_OPT_TYPE_INT, {.dbl = AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, V|E}, -{"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), FF_OPT_TYPE_INT, {.dbl = 64*1000 }, INT_MIN, INT_MAX, A|E}, -{"bt", "set video bitrate tolerance (in bits/s)", OFFSET(bit_rate_tolerance), FF_OPT_TYPE_INT, {.dbl = AV_CODEC_DEFAULT_BITRATE*20 }, 1, INT_MAX, V|E}, -{"flags", NULL, OFFSET(flags), FF_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, 0, UINT_MAX, V|A|E|D, "flags"}, -{"mv4", "use four motion vector by macroblock (mpeg4)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_4MV }, INT_MIN, INT_MAX, V|E, "flags"}, -{"obmc", "use overlapped block motion compensation (h263+)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_OBMC }, INT_MIN, INT_MAX, V|E, "flags"}, -{"qpel", "use 1/4 pel motion compensation", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_QPEL }, INT_MIN, INT_MAX, V|E, "flags"}, -{"loop", "use loop filter", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_LOOP_FILTER }, INT_MIN, INT_MAX, V|E, "flags"}, -{"qscale", "use fixed qscale", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_QSCALE }, INT_MIN, INT_MAX, 0, "flags"}, -{"gmc", "use gmc", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_GMC }, INT_MIN, INT_MAX, V|E, "flags"}, -{"mv0", "always try a mb with mv=<0,0>", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_MV0 }, INT_MIN, INT_MAX, V|E, "flags"}, -{"part", "use data partitioning", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_PART }, INT_MIN, INT_MAX, V|E, "flags"}, -{"input_preserved", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_INPUT_PRESERVED }, INT_MIN, INT_MAX, 0, "flags"}, -{"pass1", "use internal 2pass ratecontrol in first pass mode", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_PASS1 }, INT_MIN, INT_MAX, 0, "flags"}, -{"pass2", "use internal 2pass ratecontrol in second pass mode", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, 0, "flags"}, -{"extern_huff", "use external huffman table (for mjpeg)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_EXTERN_HUFF }, INT_MIN, INT_MAX, 0, "flags"}, -{"gray", "only decode/encode grayscale", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_GRAY }, INT_MIN, INT_MAX, V|E|D, "flags"}, -{"emu_edge", "don't draw edges", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_EMU_EDGE }, INT_MIN, INT_MAX, 0, "flags"}, -{"psnr", "error[?] variables will be set during encoding", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_PSNR }, INT_MIN, INT_MAX, V|E, "flags"}, -{"truncated", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_TRUNCATED }, INT_MIN, INT_MAX, 0, "flags"}, -{"naq", "normalize adaptive quantization", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_NORMALIZE_AQP }, INT_MIN, INT_MAX, V|E, "flags"}, -{"ildct", "use interlaced dct", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_INTERLACED_DCT }, INT_MIN, INT_MAX, V|E, "flags"}, -{"low_delay", "force low delay", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_LOW_DELAY }, INT_MIN, INT_MAX, V|D|E, "flags"}, -{"alt", "enable alternate scantable (mpeg2/mpeg4)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_ALT_SCAN }, INT_MIN, INT_MAX, V|E, "flags"}, -{"global_header", "place global headers in extradata instead of every keyframe", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_GLOBAL_HEADER }, INT_MIN, INT_MAX, V|A|E, "flags"}, -{"bitexact", "use only bitexact stuff (except (i)dct)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_BITEXACT }, INT_MIN, INT_MAX, A|V|S|D|E, "flags"}, -{"aic", "h263 advanced intra coding / mpeg4 ac prediction", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_AC_PRED }, INT_MIN, INT_MAX, V|E, "flags"}, -{"umv", "use unlimited motion vectors", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_H263P_UMV }, INT_MIN, INT_MAX, V|E, "flags"}, -{"cbp", "use rate distortion optimization for cbp", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_CBP_RD }, INT_MIN, INT_MAX, V|E, "flags"}, -{"qprd", "use rate distortion optimization for qp selection", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_QP_RD }, INT_MIN, INT_MAX, V|E, "flags"}, -{"aiv", "h263 alternative inter vlc", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_H263P_AIV }, INT_MIN, INT_MAX, V|E, "flags"}, -{"slice", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_H263P_SLICE_STRUCT }, INT_MIN, INT_MAX, V|E, "flags"}, -{"ilme", "interlaced motion estimation", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_INTERLACED_ME }, INT_MIN, INT_MAX, V|E, "flags"}, -{"scan_offset", "will reserve space for svcd scan offset user data", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_SVCD_SCAN_OFFSET }, INT_MIN, INT_MAX, V|E, "flags"}, -{"cgop", "closed gop", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_CLOSED_GOP }, INT_MIN, INT_MAX, V|E, "flags"}, -{"fast", "allow non spec compliant speedup tricks", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_FAST }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"sgop", "strictly enforce gop size", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_STRICT_GOP }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"noout", "skip bitstream encoding", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_NO_OUTPUT }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"local_header", "place global headers at every keyframe instead of in extradata", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_LOCAL_HEADER }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"sub_id", NULL, OFFSET(sub_id), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"me_method", "set motion estimation method", OFFSET(me_method), FF_OPT_TYPE_INT, {.dbl = ME_EPZS }, INT_MIN, INT_MAX, V|E, "me_method"}, -{"zero", "zero motion estimation (fastest)", 0, FF_OPT_TYPE_CONST, {.dbl = ME_ZERO }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"full", "full motion estimation (slowest)", 0, FF_OPT_TYPE_CONST, {.dbl = ME_FULL }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"epzs", "EPZS motion estimation (default)", 0, FF_OPT_TYPE_CONST, {.dbl = ME_EPZS }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"esa", "esa motion estimation (alias for full)", 0, FF_OPT_TYPE_CONST, {.dbl = ME_FULL }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"tesa", "tesa motion estimation", 0, FF_OPT_TYPE_CONST, {.dbl = ME_TESA }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"dia", "dia motion estimation (alias for epzs)", 0, FF_OPT_TYPE_CONST, {.dbl = ME_EPZS }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"log", "log motion estimation", 0, FF_OPT_TYPE_CONST, {.dbl = ME_LOG }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"phods", "phods motion estimation", 0, FF_OPT_TYPE_CONST, {.dbl = ME_PHODS }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"x1", "X1 motion estimation", 0, FF_OPT_TYPE_CONST, {.dbl = ME_X1 }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"hex", "hex motion estimation", 0, FF_OPT_TYPE_CONST, {.dbl = ME_HEX }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"umh", "umh motion estimation", 0, FF_OPT_TYPE_CONST, {.dbl = ME_UMH }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"iter", "iter motion estimation", 0, FF_OPT_TYPE_CONST, {.dbl = ME_ITER }, INT_MIN, INT_MAX, V|E, "me_method" }, -{"extradata_size", NULL, OFFSET(extradata_size), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"time_base", NULL, OFFSET(time_base), FF_OPT_TYPE_RATIONAL, {.dbl = 0}, INT_MIN, INT_MAX}, -{"g", "set the group of picture size", OFFSET(gop_size), FF_OPT_TYPE_INT, {.dbl = 12 }, INT_MIN, INT_MAX, V|E}, -{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"ac", "set number of audio channels", OFFSET(channels), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"cutoff", "set cutoff bandwidth", OFFSET(cutoff), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, A|E}, -{"frame_size", NULL, OFFSET(frame_size), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, A|E}, -{"frame_number", NULL, OFFSET(frame_number), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"delay", NULL, OFFSET(delay), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"qcomp", "video quantizer scale compression (VBR)", OFFSET(qcompress), FF_OPT_TYPE_FLOAT, {.dbl = 0.5 }, -FLT_MAX, FLT_MAX, V|E}, -{"qblur", "video quantizer scale blur (VBR)", OFFSET(qblur), FF_OPT_TYPE_FLOAT, {.dbl = 0.5 }, 0, FLT_MAX, V|E}, -{"qmin", "min video quantizer scale (VBR)", OFFSET(qmin), FF_OPT_TYPE_INT, {.dbl = 2 }, 0, 69, V|E}, -{"qmax", "max video quantizer scale (VBR)", OFFSET(qmax), FF_OPT_TYPE_INT, {.dbl = 31 }, 0, 69, V|E}, -{"qdiff", "max difference between the quantizer scale (VBR)", OFFSET(max_qdiff), FF_OPT_TYPE_INT, {.dbl = 3 }, INT_MIN, INT_MAX, V|E}, -{"bf", "use 'frames' B frames", OFFSET(max_b_frames), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, FF_MAX_B_FRAMES, V|E}, -{"b_qfactor", "qp factor between p and b frames", OFFSET(b_quant_factor), FF_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E}, -{"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"b_strategy", "strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), FF_OPT_TYPE_INT, {.dbl = 0 }, INT_MIN, INT_MAX, V|E}, -{"wpredp", "weighted prediction analysis method", OFFSET(weighted_p_pred), FF_OPT_TYPE_INT, {.dbl = 0 }, INT_MIN, INT_MAX, V|E}, -{"ps", "rtp payload size in bytes", OFFSET(rtp_payload_size), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"mv_bits", NULL, OFFSET(mv_bits), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"header_bits", NULL, OFFSET(header_bits), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"i_tex_bits", NULL, OFFSET(i_tex_bits), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"p_tex_bits", NULL, OFFSET(p_tex_bits), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"i_count", NULL, OFFSET(i_count), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"p_count", NULL, OFFSET(p_count), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"skip_count", NULL, OFFSET(skip_count), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"misc_bits", NULL, OFFSET(misc_bits), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"frame_bits", NULL, OFFSET(frame_bits), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"codec_tag", NULL, OFFSET(codec_tag), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"bug", "workaround not auto detected encoder bugs", OFFSET(workaround_bugs), FF_OPT_TYPE_FLAGS, {.dbl = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"}, -{"autodetect", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"}, -{"old_msmpeg4", "some old lavc generated msmpeg4v3 files (no autodetection)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_OLD_MSMPEG4 }, INT_MIN, INT_MAX, V|D, "bug"}, -{"xvid_ilace", "Xvid interlacing bug (autodetected if fourcc==XVIX)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_XVID_ILACE }, INT_MIN, INT_MAX, V|D, "bug"}, -{"ump4", "(autodetected if fourcc==UMP4)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_UMP4 }, INT_MIN, INT_MAX, V|D, "bug"}, -{"no_padding", "padding bug (autodetected)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_NO_PADDING }, INT_MIN, INT_MAX, V|D, "bug"}, -{"amv", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_AMV }, INT_MIN, INT_MAX, V|D, "bug"}, -{"ac_vlc", "illegal vlc bug (autodetected per fourcc)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_AC_VLC }, INT_MIN, INT_MAX, V|D, "bug"}, -{"qpel_chroma", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_QPEL_CHROMA }, INT_MIN, INT_MAX, V|D, "bug"}, -{"std_qpel", "old standard qpel (autodetected per fourcc/version)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_STD_QPEL }, INT_MIN, INT_MAX, V|D, "bug"}, -{"qpel_chroma2", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_QPEL_CHROMA2 }, INT_MIN, INT_MAX, V|D, "bug"}, -{"direct_blocksize", "direct-qpel-blocksize bug (autodetected per fourcc/version)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_DIRECT_BLOCKSIZE }, INT_MIN, INT_MAX, V|D, "bug"}, -{"edge", "edge padding bug (autodetected per fourcc/version)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_EDGE }, INT_MIN, INT_MAX, V|D, "bug"}, -{"hpel_chroma", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_HPEL_CHROMA }, INT_MIN, INT_MAX, V|D, "bug"}, -{"dc_clip", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_DC_CLIP }, INT_MIN, INT_MAX, V|D, "bug"}, -{"ms", "workaround various bugs in microsofts broken decoders", 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_MS }, INT_MIN, INT_MAX, V|D, "bug"}, -{"trunc", "trancated frames", 0, FF_OPT_TYPE_CONST, {.dbl = FF_BUG_TRUNCATED}, INT_MIN, INT_MAX, V|D, "bug"}, -{"lelim", "single coefficient elimination threshold for luminance (negative values also consider dc coefficient)", OFFSET(luma_elim_threshold), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"celim", "single coefficient elimination threshold for chrominance (negative values also consider dc coefficient)", OFFSET(chroma_elim_threshold), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"strict", "how strictly to follow the standards", OFFSET(strict_std_compliance), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, A|V|D|E, "strict"}, -{"very", "strictly conform to a older more strict version of the spec or reference software", 0, FF_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_VERY_STRICT }, INT_MIN, INT_MAX, V|D|E, "strict"}, -{"strict", "strictly conform to all the things in the spec no matter what consequences", 0, FF_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_STRICT }, INT_MIN, INT_MAX, V|D|E, "strict"}, -{"normal", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_NORMAL }, INT_MIN, INT_MAX, V|D|E, "strict"}, -{"unofficial", "allow unofficial extensions", 0, FF_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_UNOFFICIAL }, INT_MIN, INT_MAX, V|D|E, "strict"}, -{"experimental", "allow non standardized experimental things", 0, FF_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_EXPERIMENTAL }, INT_MIN, INT_MAX, V|D|E, "strict"}, -{"b_qoffset", "qp offset between P and B frames", OFFSET(b_quant_offset), FF_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E}, -{"er", "set error detection aggressivity", OFFSET(error_recognition), FF_OPT_TYPE_INT, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, A|V|D, "er"}, -{"careful", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, V|D, "er"}, -{"compliant", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_ER_COMPLIANT }, INT_MIN, INT_MAX, V|D, "er"}, -{"aggressive", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_ER_AGGRESSIVE }, INT_MIN, INT_MAX, V|D, "er"}, -{"very_aggressive", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_ER_VERY_AGGRESSIVE }, INT_MIN, INT_MAX, V|D, "er"}, -{"has_b_frames", NULL, OFFSET(has_b_frames), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"block_align", NULL, OFFSET(block_align), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"parse_only", NULL, OFFSET(parse_only), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"mpeg_quant", "use MPEG quantizers instead of H.263", OFFSET(mpeg_quant), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"stats_out", NULL, OFFSET(stats_out), FF_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX}, -{"stats_in", NULL, OFFSET(stats_in), FF_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX}, -{"qsquish", "how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function)", OFFSET(rc_qsquish), FF_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, 0, 99, V|E}, -{"rc_qmod_amp", "experimental quantizer modulation", OFFSET(rc_qmod_amp), FF_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E}, -{"rc_qmod_freq", "experimental quantizer modulation", OFFSET(rc_qmod_freq), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"rc_override_count", NULL, OFFSET(rc_override_count), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"rc_eq", "set rate control equation", OFFSET(rc_eq), FF_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, V|E}, -{"maxrate", "set max video bitrate tolerance (in bits/s)", OFFSET(rc_max_rate), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"minrate", "set min video bitrate tolerance (in bits/s)", OFFSET(rc_min_rate), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"bufsize", "set ratecontrol buffer size (in bits)", OFFSET(rc_buffer_size), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, A|V|E}, -{"rc_buf_aggressivity", "currently useless", OFFSET(rc_buffer_aggressivity), FF_OPT_TYPE_FLOAT, {.dbl = 1.0 }, -FLT_MAX, FLT_MAX, V|E}, -{"i_qfactor", "qp factor between P and I frames", OFFSET(i_quant_factor), FF_OPT_TYPE_FLOAT, {.dbl = -0.8 }, -FLT_MAX, FLT_MAX, V|E}, -{"i_qoffset", "qp offset between P and I frames", OFFSET(i_quant_offset), FF_OPT_TYPE_FLOAT, {.dbl = 0.0 }, -FLT_MAX, FLT_MAX, V|E}, -{"rc_init_cplx", "initial complexity for 1-pass encoding", OFFSET(rc_initial_cplx), FF_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E}, -{"dct", "DCT algorithm", OFFSET(dct_algo), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, V|E, "dct"}, -{"auto", "autoselect a good one (default)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DCT_AUTO }, INT_MIN, INT_MAX, V|E, "dct"}, -{"fastint", "fast integer", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DCT_FASTINT }, INT_MIN, INT_MAX, V|E, "dct"}, -{"int", "accurate integer", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DCT_INT }, INT_MIN, INT_MAX, V|E, "dct"}, -{"mmx", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_DCT_MMX }, INT_MIN, INT_MAX, V|E, "dct"}, -{"mlib", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_DCT_MLIB }, INT_MIN, INT_MAX, V|E, "dct"}, -{"altivec", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_DCT_ALTIVEC }, INT_MIN, INT_MAX, V|E, "dct"}, -{"faan", "floating point AAN DCT", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DCT_FAAN }, INT_MIN, INT_MAX, V|E, "dct"}, -{"lumi_mask", "compresses bright areas stronger than medium ones", OFFSET(lumi_masking), FF_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, -{"tcplx_mask", "temporal complexity masking", OFFSET(temporal_cplx_masking), FF_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, -{"scplx_mask", "spatial complexity masking", OFFSET(spatial_cplx_masking), FF_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, -{"p_mask", "inter masking", OFFSET(p_masking), FF_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, -{"dark_mask", "compresses dark areas stronger than medium ones", OFFSET(dark_masking), FF_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, -{"idct", "select IDCT implementation", OFFSET(idct_algo), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, V|E|D, "idct"}, -{"auto", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_AUTO }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"int", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_INT }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"simple", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLE }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"simplemmx", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEMMX }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"libmpeg2mmx", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_LIBMPEG2MMX }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"ps2", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_PS2 }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"mlib", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_MLIB }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"arm", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_ARM }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"altivec", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_ALTIVEC }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"sh4", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_SH4 }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"simplearm", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEARM }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"simplearmv5te", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEARMV5TE }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"simplearmv6", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEARMV6 }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"simpleneon", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLENEON }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"simplealpha", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEALPHA }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"h264", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_H264 }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"vp3", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_VP3 }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"ipp", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_IPP }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"xvidmmx", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_XVIDMMX }, INT_MIN, INT_MAX, V|E|D, "idct"}, -{"faani", "floating point AAN IDCT", 0, FF_OPT_TYPE_CONST, {.dbl = FF_IDCT_FAAN }, INT_MIN, INT_MAX, V|D|E, "idct"}, -{"slice_count", NULL, OFFSET(slice_count), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"ec", "set error concealment strategy", OFFSET(error_concealment), FF_OPT_TYPE_FLAGS, {.dbl = 3 }, INT_MIN, INT_MAX, V|D, "ec"}, -{"guess_mvs", "iterative motion vector (MV) search (slow)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_EC_GUESS_MVS }, INT_MIN, INT_MAX, V|D, "ec"}, -{"deblock", "use strong deblock filter for damaged MBs", 0, FF_OPT_TYPE_CONST, {.dbl = FF_EC_DEBLOCK }, INT_MIN, INT_MAX, V|D, "ec"}, -{"bits_per_coded_sample", NULL, OFFSET(bits_per_coded_sample), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"pred", "prediction method", OFFSET(prediction_method), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "pred"}, -{"left", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PRED_LEFT }, INT_MIN, INT_MAX, V|E, "pred"}, -{"plane", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PRED_PLANE }, INT_MIN, INT_MAX, V|E, "pred"}, -{"median", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PRED_MEDIAN }, INT_MIN, INT_MAX, V|E, "pred"}, -{"aspect", "sample aspect ratio", OFFSET(sample_aspect_ratio), FF_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E}, -{"debug", "print specific debug info", OFFSET(debug), FF_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, 0, INT_MAX, V|A|S|E|D, "debug"}, -{"pict", "picture info", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_PICT_INFO }, INT_MIN, INT_MAX, V|D, "debug"}, -{"rc", "rate control", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_RC }, INT_MIN, INT_MAX, V|E, "debug"}, -{"bitstream", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_BITSTREAM }, INT_MIN, INT_MAX, V|D, "debug"}, -{"mb_type", "macroblock (MB) type", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_MB_TYPE }, INT_MIN, INT_MAX, V|D, "debug"}, -{"qp", "per-block quantization parameter (QP)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_QP }, INT_MIN, INT_MAX, V|D, "debug"}, -{"mv", "motion vector", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_MV }, INT_MIN, INT_MAX, V|D, "debug"}, -{"dct_coeff", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_DCT_COEFF }, INT_MIN, INT_MAX, V|D, "debug"}, -{"skip", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_SKIP }, INT_MIN, INT_MAX, V|D, "debug"}, -{"startcode", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_STARTCODE }, INT_MIN, INT_MAX, V|D, "debug"}, -{"pts", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_PTS }, INT_MIN, INT_MAX, V|D, "debug"}, -{"er", "error recognition", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_ER }, INT_MIN, INT_MAX, V|D, "debug"}, -{"mmco", "memory management control operations (H.264)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_MMCO }, INT_MIN, INT_MAX, V|D, "debug"}, -{"bugs", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_BUGS }, INT_MIN, INT_MAX, V|D, "debug"}, -{"vis_qp", "visualize quantization parameter (QP), lower QP are tinted greener", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_VIS_QP }, INT_MIN, INT_MAX, V|D, "debug"}, -{"vis_mb_type", "visualize block types", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_VIS_MB_TYPE }, INT_MIN, INT_MAX, V|D, "debug"}, -{"buffers", "picture buffer allocations", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_BUFFERS }, INT_MIN, INT_MAX, V|D, "debug"}, -{"thread_ops", "threading operations", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_THREADS }, INT_MIN, INT_MAX, V|D, "debug"}, -{"vismv", "visualize motion vectors (MVs)", OFFSET(debug_mv), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, V|D, "debug_mv"}, -{"pf", "forward predicted MVs of P-frames", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_VIS_MV_P_FOR }, INT_MIN, INT_MAX, V|D, "debug_mv"}, -{"bf", "forward predicted MVs of B-frames", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_VIS_MV_B_FOR }, INT_MIN, INT_MAX, V|D, "debug_mv"}, -{"bb", "backward predicted MVs of B-frames", 0, FF_OPT_TYPE_CONST, {.dbl = FF_DEBUG_VIS_MV_B_BACK }, INT_MIN, INT_MAX, V|D, "debug_mv"}, -{"cmp", "full pel me compare function", OFFSET(me_cmp), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"subcmp", "sub pel me compare function", OFFSET(me_sub_cmp), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"mbcmp", "macroblock compare function", OFFSET(mb_cmp), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"ildctcmp", "interlaced dct compare function", OFFSET(ildct_cmp), FF_OPT_TYPE_INT, {.dbl = FF_CMP_VSAD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"dia_size", "diamond type & size for motion estimation", OFFSET(dia_size), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"last_pred", "amount of motion predictors from the previous frame", OFFSET(last_predictor_count), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"preme", "pre motion estimation", OFFSET(pre_me), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"precmp", "pre motion estimation compare function", OFFSET(me_pre_cmp), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"sad", "sum of absolute differences, fast (default)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_SAD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"sse", "sum of squared errors", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_SSE }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"satd", "sum of absolute Hadamard transformed differences", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_SATD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"dct", "sum of absolute DCT transformed differences", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_DCT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"psnr", "sum of squared quantization errors (avoid, low quality)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_PSNR }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"bit", "number of bits needed for the block", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_BIT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"rd", "rate distortion optimal, slow", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_RD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"zero", "0", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_ZERO }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"vsad", "sum of absolute vertical differences", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_VSAD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"vsse", "sum of squared vertical differences", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_VSSE }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"nsse", "noise preserving sum of squared differences", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_NSSE }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.dbl = AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, V|A|E}, +{"ab", "this option is deprecated, use b", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.dbl = AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, A|E}, +{"bt", "set video bitrate tolerance (in bits/s)", OFFSET(bit_rate_tolerance), AV_OPT_TYPE_INT, {.dbl = AV_CODEC_DEFAULT_BITRATE*20 }, 1, INT_MAX, V|E}, +{"flags", NULL, OFFSET(flags), AV_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, 0, UINT_MAX, V|A|E|D, "flags"}, +{"mv4", "use four motion vector by macroblock (mpeg4)", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_4MV }, INT_MIN, INT_MAX, V|E, "flags"}, +#if FF_API_MPEGVIDEO_GLOBAL_OPTS +{"obmc", "use overlapped block motion compensation (h263+)", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_OBMC }, INT_MIN, INT_MAX, V|E, "flags"}, +#endif +{"qpel", "use 1/4 pel motion compensation", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_QPEL }, INT_MIN, INT_MAX, V|E, "flags"}, +{"loop", "use loop filter", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_LOOP_FILTER }, INT_MIN, INT_MAX, V|E, "flags"}, +{"qscale", "use fixed qscale", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_QSCALE }, INT_MIN, INT_MAX, 0, "flags"}, +{"gmc", "use gmc", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_GMC }, INT_MIN, INT_MAX, V|E, "flags"}, +{"mv0", "always try a mb with mv=<0,0>", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_MV0 }, INT_MIN, INT_MAX, V|E, "flags"}, +#if FF_API_MPEGVIDEO_GLOBAL_OPTS +{"part", "use data partitioning", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_PART }, INT_MIN, INT_MAX, V|E, "flags"}, +#endif +{"input_preserved", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_INPUT_PRESERVED }, INT_MIN, INT_MAX, 0, "flags"}, +{"pass1", "use internal 2pass ratecontrol in first pass mode", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_PASS1 }, INT_MIN, INT_MAX, 0, "flags"}, +{"pass2", "use internal 2pass ratecontrol in second pass mode", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, 0, "flags"}, +#if FF_API_MJPEG_GLOBAL_OPTS +{"extern_huff", "use external huffman table (for mjpeg)", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_EXTERN_HUFF }, INT_MIN, INT_MAX, 0, "flags"}, +#endif +{"gray", "only decode/encode grayscale", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_GRAY }, INT_MIN, INT_MAX, V|E|D, "flags"}, +{"emu_edge", "don't draw edges", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_EMU_EDGE }, INT_MIN, INT_MAX, 0, "flags"}, +{"psnr", "error[?] variables will be set during encoding", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_PSNR }, INT_MIN, INT_MAX, V|E, "flags"}, +{"truncated", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_TRUNCATED }, INT_MIN, INT_MAX, 0, "flags"}, +{"naq", "normalize adaptive quantization", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_NORMALIZE_AQP }, INT_MIN, INT_MAX, V|E, "flags"}, +{"ildct", "use interlaced dct", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_INTERLACED_DCT }, INT_MIN, INT_MAX, V|E, "flags"}, +{"low_delay", "force low delay", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_LOW_DELAY }, INT_MIN, INT_MAX, V|D|E, "flags"}, +#if FF_API_MPEGVIDEO_GLOBAL_OPTS +{"alt", "enable alternate scantable (mpeg2/mpeg4)", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_ALT_SCAN }, INT_MIN, INT_MAX, V|E, "flags"}, +#endif +{"global_header", "place global headers in extradata instead of every keyframe", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_GLOBAL_HEADER }, INT_MIN, INT_MAX, V|A|E, "flags"}, +{"bitexact", "use only bitexact stuff (except (i)dct)", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_BITEXACT }, INT_MIN, INT_MAX, A|V|S|D|E, "flags"}, +{"aic", "h263 advanced intra coding / mpeg4 ac prediction", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_AC_PRED }, INT_MIN, INT_MAX, V|E, "flags"}, +#if FF_API_MPEGVIDEO_GLOBAL_OPTS +{"umv", "use unlimited motion vectors", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_H263P_UMV }, INT_MIN, INT_MAX, V|E, "flags"}, +#endif +{"cbp", "use rate distortion optimization for cbp", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_CBP_RD }, INT_MIN, INT_MAX, V|E, "flags"}, +{"qprd", "use rate distortion optimization for qp selection", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_QP_RD }, INT_MIN, INT_MAX, V|E, "flags"}, +#if FF_API_MPEGVIDEO_GLOBAL_OPTS +{"aiv", "h263 alternative inter vlc", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_H263P_AIV }, INT_MIN, INT_MAX, V|E, "flags"}, +{"slice", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_H263P_SLICE_STRUCT }, INT_MIN, INT_MAX, V|E, "flags"}, +#endif +{"ilme", "interlaced motion estimation", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_INTERLACED_ME }, INT_MIN, INT_MAX, V|E, "flags"}, +#if FF_API_MPEGVIDEO_GLOBAL_OPTS +{"scan_offset", "will reserve space for svcd scan offset user data", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_SVCD_SCAN_OFFSET }, INT_MIN, INT_MAX, V|E, "flags"}, +#endif +{"cgop", "closed gop", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_CLOSED_GOP }, INT_MIN, INT_MAX, V|E, "flags"}, +{"fast", "allow non spec compliant speedup tricks", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_FAST }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"sgop", "strictly enforce gop size", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_STRICT_GOP }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"noout", "skip bitstream encoding", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_NO_OUTPUT }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"local_header", "place global headers at every keyframe instead of in extradata", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_LOCAL_HEADER }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"sub_id", NULL, OFFSET(sub_id), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"me_method", "set motion estimation method", OFFSET(me_method), AV_OPT_TYPE_INT, {.dbl = ME_EPZS }, INT_MIN, INT_MAX, V|E, "me_method"}, +{"zero", "zero motion estimation (fastest)", 0, AV_OPT_TYPE_CONST, {.dbl = ME_ZERO }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"full", "full motion estimation (slowest)", 0, AV_OPT_TYPE_CONST, {.dbl = ME_FULL }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"epzs", "EPZS motion estimation (default)", 0, AV_OPT_TYPE_CONST, {.dbl = ME_EPZS }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"esa", "esa motion estimation (alias for full)", 0, AV_OPT_TYPE_CONST, {.dbl = ME_FULL }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"tesa", "tesa motion estimation", 0, AV_OPT_TYPE_CONST, {.dbl = ME_TESA }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"dia", "dia motion estimation (alias for epzs)", 0, AV_OPT_TYPE_CONST, {.dbl = ME_EPZS }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"log", "log motion estimation", 0, AV_OPT_TYPE_CONST, {.dbl = ME_LOG }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"phods", "phods motion estimation", 0, AV_OPT_TYPE_CONST, {.dbl = ME_PHODS }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"x1", "X1 motion estimation", 0, AV_OPT_TYPE_CONST, {.dbl = ME_X1 }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"hex", "hex motion estimation", 0, AV_OPT_TYPE_CONST, {.dbl = ME_HEX }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"umh", "umh motion estimation", 0, AV_OPT_TYPE_CONST, {.dbl = ME_UMH }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"iter", "iter motion estimation", 0, AV_OPT_TYPE_CONST, {.dbl = ME_ITER }, INT_MIN, INT_MAX, V|E, "me_method" }, +{"extradata_size", NULL, OFFSET(extradata_size), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, INT_MIN, INT_MAX}, +{"g", "set the group of picture size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.dbl = 12 }, INT_MIN, INT_MAX, V|E}, +{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, A|D|E}, +{"ac", "set number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, A|D|E}, +{"cutoff", "set cutoff bandwidth", OFFSET(cutoff), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, A|E}, +{"frame_size", NULL, OFFSET(frame_size), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, A|E}, +{"frame_number", NULL, OFFSET(frame_number), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"delay", NULL, OFFSET(delay), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"qcomp", "video quantizer scale compression (VBR)", OFFSET(qcompress), AV_OPT_TYPE_FLOAT, {.dbl = 0.5 }, -FLT_MAX, FLT_MAX, V|E}, +{"qblur", "video quantizer scale blur (VBR)", OFFSET(qblur), AV_OPT_TYPE_FLOAT, {.dbl = 0.5 }, -1, FLT_MAX, V|E}, +{"qmin", "min video quantizer scale (VBR)", OFFSET(qmin), AV_OPT_TYPE_INT, {.dbl = 2 }, -1, 69, V|E}, +{"qmax", "max video quantizer scale (VBR)", OFFSET(qmax), AV_OPT_TYPE_INT, {.dbl = 31 }, -1, 69, V|E}, +{"qdiff", "max difference between the quantizer scale (VBR)", OFFSET(max_qdiff), AV_OPT_TYPE_INT, {.dbl = 3 }, INT_MIN, INT_MAX, V|E}, +{"bf", "use 'frames' B frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, -1, FF_MAX_B_FRAMES, V|E}, +{"b_qfactor", "qp factor between p and b frames", OFFSET(b_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E}, +{"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"b_strategy", "strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.dbl = 0 }, INT_MIN, INT_MAX, V|E}, +#if FF_API_X264_GLOBAL_OPTS +{"wpredp", "weighted prediction analysis method", OFFSET(weighted_p_pred), AV_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, V|E}, +#endif +{"ps", "rtp payload size in bytes", OFFSET(rtp_payload_size), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"mv_bits", NULL, OFFSET(mv_bits), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"header_bits", NULL, OFFSET(header_bits), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"i_tex_bits", NULL, OFFSET(i_tex_bits), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"p_tex_bits", NULL, OFFSET(p_tex_bits), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"i_count", NULL, OFFSET(i_count), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"p_count", NULL, OFFSET(p_count), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"skip_count", NULL, OFFSET(skip_count), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"misc_bits", NULL, OFFSET(misc_bits), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"frame_bits", NULL, OFFSET(frame_bits), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"codec_tag", NULL, OFFSET(codec_tag), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"bug", "workaround not auto detected encoder bugs", OFFSET(workaround_bugs), AV_OPT_TYPE_FLAGS, {.dbl = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"}, +{"autodetect", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"}, +{"old_msmpeg4", "some old lavc generated msmpeg4v3 files (no autodetection)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_OLD_MSMPEG4 }, INT_MIN, INT_MAX, V|D, "bug"}, +{"xvid_ilace", "Xvid interlacing bug (autodetected if fourcc==XVIX)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_XVID_ILACE }, INT_MIN, INT_MAX, V|D, "bug"}, +{"ump4", "(autodetected if fourcc==UMP4)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_UMP4 }, INT_MIN, INT_MAX, V|D, "bug"}, +{"no_padding", "padding bug (autodetected)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_NO_PADDING }, INT_MIN, INT_MAX, V|D, "bug"}, +{"amv", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_AMV }, INT_MIN, INT_MAX, V|D, "bug"}, +{"ac_vlc", "illegal vlc bug (autodetected per fourcc)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_AC_VLC }, INT_MIN, INT_MAX, V|D, "bug"}, +{"qpel_chroma", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_QPEL_CHROMA }, INT_MIN, INT_MAX, V|D, "bug"}, +{"std_qpel", "old standard qpel (autodetected per fourcc/version)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_STD_QPEL }, INT_MIN, INT_MAX, V|D, "bug"}, +{"qpel_chroma2", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_QPEL_CHROMA2 }, INT_MIN, INT_MAX, V|D, "bug"}, +{"direct_blocksize", "direct-qpel-blocksize bug (autodetected per fourcc/version)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_DIRECT_BLOCKSIZE }, INT_MIN, INT_MAX, V|D, "bug"}, +{"edge", "edge padding bug (autodetected per fourcc/version)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_EDGE }, INT_MIN, INT_MAX, V|D, "bug"}, +{"hpel_chroma", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_HPEL_CHROMA }, INT_MIN, INT_MAX, V|D, "bug"}, +{"dc_clip", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_DC_CLIP }, INT_MIN, INT_MAX, V|D, "bug"}, +{"ms", "workaround various bugs in microsofts broken decoders", 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_MS }, INT_MIN, INT_MAX, V|D, "bug"}, +{"trunc", "trancated frames", 0, AV_OPT_TYPE_CONST, {.dbl = FF_BUG_TRUNCATED}, INT_MIN, INT_MAX, V|D, "bug"}, +{"lelim", "single coefficient elimination threshold for luminance (negative values also consider dc coefficient)", OFFSET(luma_elim_threshold), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"celim", "single coefficient elimination threshold for chrominance (negative values also consider dc coefficient)", OFFSET(chroma_elim_threshold), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"strict", "how strictly to follow the standards", OFFSET(strict_std_compliance), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, A|V|D|E, "strict"}, +{"very", "strictly conform to a older more strict version of the spec or reference software", 0, AV_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_VERY_STRICT }, INT_MIN, INT_MAX, V|D|E, "strict"}, +{"strict", "strictly conform to all the things in the spec no matter what consequences", 0, AV_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_STRICT }, INT_MIN, INT_MAX, V|D|E, "strict"}, +{"normal", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_NORMAL }, INT_MIN, INT_MAX, V|D|E, "strict"}, +{"unofficial", "allow unofficial extensions", 0, AV_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_UNOFFICIAL }, INT_MIN, INT_MAX, V|D|E, "strict"}, +{"experimental", "allow non standardized experimental things", 0, AV_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_EXPERIMENTAL }, INT_MIN, INT_MAX, V|D|E, "strict"}, +{"b_qoffset", "qp offset between P and B frames", OFFSET(b_quant_offset), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E}, +#if FF_API_ER +{"er", "set error detection aggressivity", OFFSET(error_recognition), AV_OPT_TYPE_INT, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, A|V|D, "er"}, +{"careful", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, V|D, "er"}, +{"compliant", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_COMPLIANT }, INT_MIN, INT_MAX, V|D, "er"}, +{"aggressive", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_AGGRESSIVE }, INT_MIN, INT_MAX, V|D, "er"}, +{"very_aggressive", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_VERY_AGGRESSIVE }, INT_MIN, INT_MAX, V|D, "er"}, +{"explode", "abort decoding on error recognition", 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_EXPLODE }, INT_MIN, INT_MAX, V|D, "er"}, +#endif /* FF_API_ER */ +{"err_filter", "set error detection filter flags", OFFSET(err_recognition), AV_OPT_TYPE_FLAGS, {.dbl = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, A|V|D, "err_filter"}, +{"crccheck", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, V|D, "err_filter"}, +{"bitstream", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AV_EF_BITSTREAM }, INT_MIN, INT_MAX, V|D, "err_filter"}, +{"buffer", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AV_EF_BUFFER }, INT_MIN, INT_MAX, V|D, "err_filter"}, +{"explode", "abort decoding on minor error recognition", 0, AV_OPT_TYPE_CONST, {.dbl = AV_EF_EXPLODE }, INT_MIN, INT_MAX, V|D, "err_filter"}, +{"has_b_frames", NULL, OFFSET(has_b_frames), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"block_align", NULL, OFFSET(block_align), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"parse_only", NULL, OFFSET(parse_only), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"mpeg_quant", "use MPEG quantizers instead of H.263", OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"stats_out", NULL, OFFSET(stats_out), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX}, +{"stats_in", NULL, OFFSET(stats_in), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX}, +{"qsquish", "how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function)", OFFSET(rc_qsquish), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, 0, 99, V|E}, +{"rc_qmod_amp", "experimental quantizer modulation", OFFSET(rc_qmod_amp), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E}, +{"rc_qmod_freq", "experimental quantizer modulation", OFFSET(rc_qmod_freq), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"rc_override_count", NULL, OFFSET(rc_override_count), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"rc_eq", "set rate control equation", OFFSET(rc_eq), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, V|E}, +{"maxrate", "set max video bitrate tolerance (in bits/s)", OFFSET(rc_max_rate), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"minrate", "set min video bitrate tolerance (in bits/s)", OFFSET(rc_min_rate), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"bufsize", "set ratecontrol buffer size (in bits)", OFFSET(rc_buffer_size), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, A|V|E}, +{"rc_buf_aggressivity", "currently useless", OFFSET(rc_buffer_aggressivity), AV_OPT_TYPE_FLOAT, {.dbl = 1.0 }, -FLT_MAX, FLT_MAX, V|E}, +{"i_qfactor", "qp factor between P and I frames", OFFSET(i_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = -0.8 }, -FLT_MAX, FLT_MAX, V|E}, +{"i_qoffset", "qp offset between P and I frames", OFFSET(i_quant_offset), AV_OPT_TYPE_FLOAT, {.dbl = 0.0 }, -FLT_MAX, FLT_MAX, V|E}, +{"rc_init_cplx", "initial complexity for 1-pass encoding", OFFSET(rc_initial_cplx), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E}, +{"dct", "DCT algorithm", OFFSET(dct_algo), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, V|E, "dct"}, +{"auto", "autoselect a good one (default)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_AUTO }, INT_MIN, INT_MAX, V|E, "dct"}, +{"fastint", "fast integer", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_FASTINT }, INT_MIN, INT_MAX, V|E, "dct"}, +{"int", "accurate integer", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_INT }, INT_MIN, INT_MAX, V|E, "dct"}, +{"mmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_MMX }, INT_MIN, INT_MAX, V|E, "dct"}, +{"mlib", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_MLIB }, INT_MIN, INT_MAX, V|E, "dct"}, +{"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_ALTIVEC }, INT_MIN, INT_MAX, V|E, "dct"}, +{"faan", "floating point AAN DCT", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DCT_FAAN }, INT_MIN, INT_MAX, V|E, "dct"}, +{"lumi_mask", "compresses bright areas stronger than medium ones", OFFSET(lumi_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, +{"tcplx_mask", "temporal complexity masking", OFFSET(temporal_cplx_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, +{"scplx_mask", "spatial complexity masking", OFFSET(spatial_cplx_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, +{"p_mask", "inter masking", OFFSET(p_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, +{"dark_mask", "compresses dark areas stronger than medium ones", OFFSET(dark_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, +{"idct", "select IDCT implementation", OFFSET(idct_algo), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, V|E|D, "idct"}, +{"auto", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_AUTO }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"int", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_INT }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simple", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLE }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simplemmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEMMX }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"libmpeg2mmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_LIBMPEG2MMX }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"ps2", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_PS2 }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"mlib", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_MLIB }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"arm", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_ARM }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_ALTIVEC }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"sh4", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SH4 }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simplearm", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEARM }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simplearmv5te", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEARMV5TE }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simplearmv6", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEARMV6 }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simpleneon", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLENEON }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simplealpha", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEALPHA }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"h264", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_H264 }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"vp3", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_VP3 }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"ipp", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_IPP }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"xvidmmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_XVIDMMX }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"faani", "floating point AAN IDCT", 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_FAAN }, INT_MIN, INT_MAX, V|D|E, "idct"}, +{"slice_count", NULL, OFFSET(slice_count), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"ec", "set error concealment strategy", OFFSET(error_concealment), AV_OPT_TYPE_FLAGS, {.dbl = 3 }, INT_MIN, INT_MAX, V|D, "ec"}, +{"guess_mvs", "iterative motion vector (MV) search (slow)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_EC_GUESS_MVS }, INT_MIN, INT_MAX, V|D, "ec"}, +{"deblock", "use strong deblock filter for damaged MBs", 0, AV_OPT_TYPE_CONST, {.dbl = FF_EC_DEBLOCK }, INT_MIN, INT_MAX, V|D, "ec"}, +{"bits_per_coded_sample", NULL, OFFSET(bits_per_coded_sample), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"pred", "prediction method", OFFSET(prediction_method), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "pred"}, +{"left", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PRED_LEFT }, INT_MIN, INT_MAX, V|E, "pred"}, +{"plane", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PRED_PLANE }, INT_MIN, INT_MAX, V|E, "pred"}, +{"median", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PRED_MEDIAN }, INT_MIN, INT_MAX, V|E, "pred"}, +{"aspect", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E}, +{"debug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, 0, INT_MAX, V|A|S|E|D, "debug"}, +{"pict", "picture info", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_PICT_INFO }, INT_MIN, INT_MAX, V|D, "debug"}, +{"rc", "rate control", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_RC }, INT_MIN, INT_MAX, V|E, "debug"}, +{"bitstream", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_BITSTREAM }, INT_MIN, INT_MAX, V|D, "debug"}, +{"mb_type", "macroblock (MB) type", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_MB_TYPE }, INT_MIN, INT_MAX, V|D, "debug"}, +{"qp", "per-block quantization parameter (QP)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_QP }, INT_MIN, INT_MAX, V|D, "debug"}, +{"mv", "motion vector", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_MV }, INT_MIN, INT_MAX, V|D, "debug"}, +{"dct_coeff", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_DCT_COEFF }, INT_MIN, INT_MAX, V|D, "debug"}, +{"skip", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_SKIP }, INT_MIN, INT_MAX, V|D, "debug"}, +{"startcode", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_STARTCODE }, INT_MIN, INT_MAX, V|D, "debug"}, +{"pts", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_PTS }, INT_MIN, INT_MAX, V|D, "debug"}, +{"er", "error recognition", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_ER }, INT_MIN, INT_MAX, V|D, "debug"}, +{"mmco", "memory management control operations (H.264)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_MMCO }, INT_MIN, INT_MAX, V|D, "debug"}, +{"bugs", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_BUGS }, INT_MIN, INT_MAX, V|D, "debug"}, +{"vis_qp", "visualize quantization parameter (QP), lower QP are tinted greener", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_VIS_QP }, INT_MIN, INT_MAX, V|D, "debug"}, +{"vis_mb_type", "visualize block types", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_VIS_MB_TYPE }, INT_MIN, INT_MAX, V|D, "debug"}, +{"buffers", "picture buffer allocations", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_BUFFERS }, INT_MIN, INT_MAX, V|D, "debug"}, +{"thread_ops", "threading operations", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_THREADS }, INT_MIN, INT_MAX, V|D, "debug"}, +{"vismv", "visualize motion vectors (MVs)", OFFSET(debug_mv), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, V|D, "debug_mv"}, +{"pf", "forward predicted MVs of P-frames", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_VIS_MV_P_FOR }, INT_MIN, INT_MAX, V|D, "debug_mv"}, +{"bf", "forward predicted MVs of B-frames", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_VIS_MV_B_FOR }, INT_MIN, INT_MAX, V|D, "debug_mv"}, +{"bb", "backward predicted MVs of B-frames", 0, AV_OPT_TYPE_CONST, {.dbl = FF_DEBUG_VIS_MV_B_BACK }, INT_MIN, INT_MAX, V|D, "debug_mv"}, +{"cmp", "full pel me compare function", OFFSET(me_cmp), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"subcmp", "sub pel me compare function", OFFSET(me_sub_cmp), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"mbcmp", "macroblock compare function", OFFSET(mb_cmp), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"ildctcmp", "interlaced dct compare function", OFFSET(ildct_cmp), AV_OPT_TYPE_INT, {.dbl = FF_CMP_VSAD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"dia_size", "diamond type & size for motion estimation", OFFSET(dia_size), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"last_pred", "amount of motion predictors from the previous frame", OFFSET(last_predictor_count), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"preme", "pre motion estimation", OFFSET(pre_me), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"precmp", "pre motion estimation compare function", OFFSET(me_pre_cmp), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"sad", "sum of absolute differences, fast (default)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_SAD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"sse", "sum of squared errors", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_SSE }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"satd", "sum of absolute Hadamard transformed differences", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_SATD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"dct", "sum of absolute DCT transformed differences", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_DCT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"psnr", "sum of squared quantization errors (avoid, low quality)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_PSNR }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"bit", "number of bits needed for the block", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_BIT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"rd", "rate distortion optimal, slow", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_RD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"zero", "0", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_ZERO }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"vsad", "sum of absolute vertical differences", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_VSAD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"vsse", "sum of squared vertical differences", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_VSSE }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"nsse", "noise preserving sum of squared differences", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_NSSE }, INT_MIN, INT_MAX, V|E, "cmp_func"}, #if CONFIG_SNOW_ENCODER -{"w53", "5/3 wavelet, only used in snow", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_W53 }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"w97", "9/7 wavelet, only used in snow", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_W97 }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"w53", "5/3 wavelet, only used in snow", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_W53 }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"w97", "9/7 wavelet, only used in snow", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_W97 }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +#endif +{"dctmax", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"chroma", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_CMP_CHROMA }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"pre_dia_size", "diamond type & size for motion estimation pre-pass", OFFSET(pre_dia_size), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"subq", "sub pel motion estimation quality", OFFSET(me_subpel_quality), AV_OPT_TYPE_INT, {.dbl = 8 }, INT_MIN, INT_MAX, V|E}, +{"dtg_active_format", NULL, OFFSET(dtg_active_format), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"me_range", "limit motion vectors range (1023 for DivX player)", OFFSET(me_range), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"ibias", "intra quant bias", OFFSET(intra_quant_bias), AV_OPT_TYPE_INT, {.dbl = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E}, +{"pbias", "inter quant bias", OFFSET(inter_quant_bias), AV_OPT_TYPE_INT, {.dbl = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E}, +{"color_table_id", NULL, OFFSET(color_table_id), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"global_quality", NULL, OFFSET(global_quality), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, +{"coder", NULL, OFFSET(coder_type), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "coder"}, +{"vlc", "variable length coder / huffman coder", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_VLC }, INT_MIN, INT_MAX, V|E, "coder"}, +{"ac", "arithmetic coder", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_AC }, INT_MIN, INT_MAX, V|E, "coder"}, +{"raw", "raw (no encoding)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_RAW }, INT_MIN, INT_MAX, V|E, "coder"}, +{"rle", "run-length coder", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_RLE }, INT_MIN, INT_MAX, V|E, "coder"}, +{"deflate", "deflate-based coder", 0, AV_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_DEFLATE }, INT_MIN, INT_MAX, V|E, "coder"}, +{"context", "context model", OFFSET(context_model), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"slice_flags", NULL, OFFSET(slice_flags), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"xvmc_acceleration", NULL, OFFSET(xvmc_acceleration), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"mbd", "macroblock decision algorithm (high quality mode)", OFFSET(mb_decision), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "mbd"}, +{"simple", "use mbcmp (default)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_MB_DECISION_SIMPLE }, INT_MIN, INT_MAX, V|E, "mbd"}, +{"bits", "use fewest bits", 0, AV_OPT_TYPE_CONST, {.dbl = FF_MB_DECISION_BITS }, INT_MIN, INT_MAX, V|E, "mbd"}, +{"rd", "use best rate distortion", 0, AV_OPT_TYPE_CONST, {.dbl = FF_MB_DECISION_RD }, INT_MIN, INT_MAX, V|E, "mbd"}, +{"stream_codec_tag", NULL, OFFSET(stream_codec_tag), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"sc_threshold", "scene change threshold", OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"lmin", "min lagrange factor (VBR)", OFFSET(lmin), AV_OPT_TYPE_INT, {.dbl = 2*FF_QP2LAMBDA }, 0, INT_MAX, V|E}, +{"lmax", "max lagrange factor (VBR)", OFFSET(lmax), AV_OPT_TYPE_INT, {.dbl = 31*FF_QP2LAMBDA }, 0, INT_MAX, V|E}, +{"nr", "noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"rc_init_occupancy", "number of bits which should be loaded into the rc buffer before decoding starts", OFFSET(rc_initial_buffer_occupancy), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"inter_threshold", NULL, OFFSET(inter_threshold), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#if FF_API_X264_GLOBAL_OPTS +#define X264_DEFAULTS CODEC_FLAG2_FASTPSKIP|CODEC_FLAG2_PSY|CODEC_FLAG2_MBTREE +#else +#define X264_DEFAULTS 0 #endif -{"dctmax", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"chroma", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_CMP_CHROMA }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"pre_dia_size", "diamond type & size for motion estimation pre-pass", OFFSET(pre_dia_size), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"subq", "sub pel motion estimation quality", OFFSET(me_subpel_quality), FF_OPT_TYPE_INT, {.dbl = 8 }, INT_MIN, INT_MAX, V|E}, -{"dtg_active_format", NULL, OFFSET(dtg_active_format), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"me_range", "limit motion vectors range (1023 for DivX player)", OFFSET(me_range), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"ibias", "intra quant bias", OFFSET(intra_quant_bias), FF_OPT_TYPE_INT, {.dbl = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E}, -{"pbias", "inter quant bias", OFFSET(inter_quant_bias), FF_OPT_TYPE_INT, {.dbl = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E}, -{"color_table_id", NULL, OFFSET(color_table_id), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"internal_buffer_count", NULL, OFFSET(internal_buffer_count), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"global_quality", NULL, OFFSET(global_quality), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"coder", NULL, OFFSET(coder_type), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "coder"}, -{"vlc", "variable length coder / huffman coder", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_VLC }, INT_MIN, INT_MAX, V|E, "coder"}, -{"ac", "arithmetic coder", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_AC }, INT_MIN, INT_MAX, V|E, "coder"}, -{"raw", "raw (no encoding)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_RAW }, INT_MIN, INT_MAX, V|E, "coder"}, -{"rle", "run-length coder", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_RLE }, INT_MIN, INT_MAX, V|E, "coder"}, -{"deflate", "deflate-based coder", 0, FF_OPT_TYPE_CONST, {.dbl = FF_CODER_TYPE_DEFLATE }, INT_MIN, INT_MAX, V|E, "coder"}, -{"context", "context model", OFFSET(context_model), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"slice_flags", NULL, OFFSET(slice_flags), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"xvmc_acceleration", NULL, OFFSET(xvmc_acceleration), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"mbd", "macroblock decision algorithm (high quality mode)", OFFSET(mb_decision), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "mbd"}, -{"simple", "use mbcmp (default)", 0, FF_OPT_TYPE_CONST, {.dbl = FF_MB_DECISION_SIMPLE }, INT_MIN, INT_MAX, V|E, "mbd"}, -{"bits", "use fewest bits", 0, FF_OPT_TYPE_CONST, {.dbl = FF_MB_DECISION_BITS }, INT_MIN, INT_MAX, V|E, "mbd"}, -{"rd", "use best rate distortion", 0, FF_OPT_TYPE_CONST, {.dbl = FF_MB_DECISION_RD }, INT_MIN, INT_MAX, V|E, "mbd"}, -{"stream_codec_tag", NULL, OFFSET(stream_codec_tag), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"sc_threshold", "scene change threshold", OFFSET(scenechange_threshold), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"lmin", "min lagrange factor (VBR)", OFFSET(lmin), FF_OPT_TYPE_INT, {.dbl = 2*FF_QP2LAMBDA }, 0, INT_MAX, V|E}, -{"lmax", "max lagrange factor (VBR)", OFFSET(lmax), FF_OPT_TYPE_INT, {.dbl = 31*FF_QP2LAMBDA }, 0, INT_MAX, V|E}, -{"nr", "noise reduction", OFFSET(noise_reduction), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"rc_init_occupancy", "number of bits which should be loaded into the rc buffer before decoding starts", OFFSET(rc_initial_buffer_occupancy), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"inter_threshold", NULL, OFFSET(inter_threshold), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"flags2", NULL, OFFSET(flags2), FF_OPT_TYPE_FLAGS, {.dbl = CODEC_FLAG2_FASTPSKIP|CODEC_FLAG2_BIT_RESERVOIR|CODEC_FLAG2_PSY|CODEC_FLAG2_MBTREE }, 0, UINT_MAX, V|A|E|D, "flags2"}, -{"error", NULL, OFFSET(error_rate), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#if FF_API_LAME_GLOBAL_OPTS +#define LAME_DEFAULTS CODEC_FLAG2_BIT_RESERVOIR +#else +#define LAME_DEFAULTS 0 +#endif +{"flags2", NULL, OFFSET(flags2), AV_OPT_TYPE_FLAGS, {.dbl = X264_DEFAULTS|LAME_DEFAULTS }, 0, UINT_MAX, V|A|E|D, "flags2"}, +{"error", NULL, OFFSET(error_rate), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, #if FF_API_ANTIALIAS_ALGO -{"antialias", "MP3 antialias algorithm", OFFSET(antialias_algo), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|D, "aa"}, -{"auto", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_AA_AUTO }, INT_MIN, INT_MAX, V|D, "aa"}, -{"fastint", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_AA_FASTINT }, INT_MIN, INT_MAX, V|D, "aa"}, -{"int", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_AA_INT }, INT_MIN, INT_MAX, V|D, "aa"}, -{"float", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_AA_FLOAT }, INT_MIN, INT_MAX, V|D, "aa"}, -#endif -{"qns", "quantizer noise shaping", OFFSET(quantizer_noise_shaping), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"threads", NULL, OFFSET(thread_count), FF_OPT_TYPE_INT, {.dbl = 1 }, INT_MIN, INT_MAX, V|E|D}, -{"me_threshold", "motion estimaton threshold", OFFSET(me_threshold), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"mb_threshold", "macroblock threshold", OFFSET(mb_threshold), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"dc", "intra_dc_precision", OFFSET(intra_dc_precision), FF_OPT_TYPE_INT, {.dbl = 0 }, INT_MIN, INT_MAX, V|E}, -{"nssew", "nsse weight", OFFSET(nsse_weight), FF_OPT_TYPE_INT, {.dbl = 8 }, INT_MIN, INT_MAX, V|E}, -{"skip_top", "number of macroblock rows at the top which are skipped", OFFSET(skip_top), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|D}, -{"skip_bottom", "number of macroblock rows at the bottom which are skipped", OFFSET(skip_bottom), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|D}, -{"profile", NULL, OFFSET(profile), FF_OPT_TYPE_INT, {.dbl = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "profile"}, -{"unknown", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "profile"}, -{"aac_main", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PROFILE_AAC_MAIN }, INT_MIN, INT_MAX, A|E, "profile"}, -{"aac_low", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PROFILE_AAC_LOW }, INT_MIN, INT_MAX, A|E, "profile"}, -{"aac_ssr", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PROFILE_AAC_SSR }, INT_MIN, INT_MAX, A|E, "profile"}, -{"aac_ltp", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PROFILE_AAC_LTP }, INT_MIN, INT_MAX, A|E, "profile"}, -{"dts", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PROFILE_DTS }, INT_MIN, INT_MAX, A|E, "profile"}, -{"dts_es", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PROFILE_DTS_ES }, INT_MIN, INT_MAX, A|E, "profile"}, -{"dts_96_24", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PROFILE_DTS_96_24 }, INT_MIN, INT_MAX, A|E, "profile"}, -{"dts_hd_hra", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PROFILE_DTS_HD_HRA }, INT_MIN, INT_MAX, A|E, "profile"}, -{"dts_hd_ma", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_PROFILE_DTS_HD_MA }, INT_MIN, INT_MAX, A|E, "profile"}, -{"level", NULL, OFFSET(level), FF_OPT_TYPE_INT, {.dbl = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"}, -{"unknown", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"}, -{"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, V|A|D}, -{"skip_threshold", "frame skip threshold", OFFSET(frame_skip_threshold), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"skip_factor", "frame skip factor", OFFSET(frame_skip_factor), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"skip_exp", "frame skip exponent", OFFSET(frame_skip_exp), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"skipcmp", "frame skip compare function", OFFSET(frame_skip_cmp), FF_OPT_TYPE_INT, {.dbl = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -{"border_mask", "increases the quantizer for macroblocks close to borders", OFFSET(border_masking), FF_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E}, -{"mblmin", "min macroblock lagrange factor (VBR)", OFFSET(mb_lmin), FF_OPT_TYPE_INT, {.dbl = FF_QP2LAMBDA * 2 }, 1, FF_LAMBDA_MAX, V|E}, -{"mblmax", "max macroblock lagrange factor (VBR)", OFFSET(mb_lmax), FF_OPT_TYPE_INT, {.dbl = FF_QP2LAMBDA * 31 }, 1, FF_LAMBDA_MAX, V|E}, -{"mepc", "motion estimation bitrate penalty compensation (1.0 = 256)", OFFSET(me_penalty_compensation), FF_OPT_TYPE_INT, {.dbl = 256 }, INT_MIN, INT_MAX, V|E}, -{"skip_loop_filter", NULL, OFFSET(skip_loop_filter), FF_OPT_TYPE_INT, {.dbl = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"skip_idct" , NULL, OFFSET(skip_idct) , FF_OPT_TYPE_INT, {.dbl = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"skip_frame" , NULL, OFFSET(skip_frame) , FF_OPT_TYPE_INT, {.dbl = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"none" , NULL, 0, FF_OPT_TYPE_CONST, {.dbl = AVDISCARD_NONE }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"default" , NULL, 0, FF_OPT_TYPE_CONST, {.dbl = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"noref" , NULL, 0, FF_OPT_TYPE_CONST, {.dbl = AVDISCARD_NONREF }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"bidir" , NULL, 0, FF_OPT_TYPE_CONST, {.dbl = AVDISCARD_BIDIR }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"nokey" , NULL, 0, FF_OPT_TYPE_CONST, {.dbl = AVDISCARD_NONKEY }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"all" , NULL, 0, FF_OPT_TYPE_CONST, {.dbl = AVDISCARD_ALL }, INT_MIN, INT_MAX, V|D, "avdiscard"}, -{"bidir_refine", "refine the two motion vectors used in bidirectional macroblocks", OFFSET(bidir_refine), FF_OPT_TYPE_INT, {.dbl = 1 }, 0, 4, V|E}, -{"brd_scale", "downscales frames for dynamic B-frame decision", OFFSET(brd_scale), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, 10, V|E}, -{"crf", "enables constant quality mode, and selects the quality (x264)", OFFSET(crf), FF_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, 0, 51, V|E}, -{"cqp", "constant quantization parameter rate control method", OFFSET(cqp), FF_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, V|E}, -{"keyint_min", "minimum interval between IDR-frames (x264)", OFFSET(keyint_min), FF_OPT_TYPE_INT, {.dbl = 25 }, INT_MIN, INT_MAX, V|E}, -{"refs", "reference frames to consider for motion compensation (Snow)", OFFSET(refs), FF_OPT_TYPE_INT, {.dbl = 1 }, INT_MIN, INT_MAX, V|E}, -{"chromaoffset", "chroma qp offset from luma", OFFSET(chromaoffset), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"bframebias", "influences how often B-frames are used", OFFSET(bframebias), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"trellis", "rate-distortion optimal quantization", OFFSET(trellis), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, -{"directpred", "direct mv prediction mode - 0 (none), 1 (spatial), 2 (temporal), 3 (auto)", OFFSET(directpred), FF_OPT_TYPE_INT, {.dbl = 2 }, INT_MIN, INT_MAX, V|E}, -{"bpyramid", "allows B-frames to be used as references for predicting", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_BPYRAMID }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"wpred", "weighted biprediction for b-frames (H.264)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_WPRED }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"mixed_refs", "one reference per partition, as opposed to one reference per macroblock", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_MIXED_REFS }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"dct8x8", "high profile 8x8 transform (H.264)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_8X8DCT }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"fastpskip", "fast pskip (H.264)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_FASTPSKIP }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"aud", "access unit delimiters (H.264)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_AUD }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"skiprd", "RD optimal MB level residual skipping", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_SKIP_RD }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"complexityblur", "reduce fluctuations in qp (before curve compression)", OFFSET(complexityblur), FF_OPT_TYPE_FLOAT, {.dbl = 20.0 }, FLT_MIN, FLT_MAX, V|E}, -{"deblockalpha", "in-loop deblocking filter alphac0 parameter", OFFSET(deblockalpha), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, -6, 6, V|E}, -{"deblockbeta", "in-loop deblocking filter beta parameter", OFFSET(deblockbeta), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, -6, 6, V|E}, -{"partitions", "macroblock subpartition sizes to consider", OFFSET(partitions), FF_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "partitions"}, -{"parti4x4", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = X264_PART_I4X4 }, INT_MIN, INT_MAX, V|E, "partitions"}, -{"parti8x8", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = X264_PART_I8X8 }, INT_MIN, INT_MAX, V|E, "partitions"}, -{"partp4x4", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = X264_PART_P4X4 }, INT_MIN, INT_MAX, V|E, "partitions"}, -{"partp8x8", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = X264_PART_P8X8 }, INT_MIN, INT_MAX, V|E, "partitions"}, -{"partb8x8", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = X264_PART_B8X8 }, INT_MIN, INT_MAX, V|E, "partitions"}, -{"sc_factor", "multiplied by qscale for each frame and added to scene_change_score", OFFSET(scenechange_factor), FF_OPT_TYPE_INT, {.dbl = 6 }, 0, INT_MAX, V|E}, -{"mv0_threshold", NULL, OFFSET(mv0_threshold), FF_OPT_TYPE_INT, {.dbl = 256 }, 0, INT_MAX, V|E}, -{"ivlc", "intra vlc table", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_INTRA_VLC }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"b_sensitivity", "adjusts sensitivity of b_frame_strategy 1", OFFSET(b_sensitivity), FF_OPT_TYPE_INT, {.dbl = 40 }, 1, INT_MAX, V|E}, -{"compression_level", NULL, OFFSET(compression_level), FF_OPT_TYPE_INT, {.dbl = FF_COMPRESSION_DEFAULT }, INT_MIN, INT_MAX, V|A|E}, -{"min_prediction_order", NULL, OFFSET(min_prediction_order), FF_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, -{"max_prediction_order", NULL, OFFSET(max_prediction_order), FF_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, +{"antialias", "MP3 antialias algorithm", OFFSET(antialias_algo), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|D, "aa"}, +{"auto", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_AA_AUTO }, INT_MIN, INT_MAX, V|D, "aa"}, +{"fastint", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_AA_FASTINT }, INT_MIN, INT_MAX, V|D, "aa"}, +{"int", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_AA_INT }, INT_MIN, INT_MAX, V|D, "aa"}, +{"float", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_AA_FLOAT }, INT_MIN, INT_MAX, V|D, "aa"}, +#endif +{"qns", "quantizer noise shaping", OFFSET(quantizer_noise_shaping), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"threads", NULL, OFFSET(thread_count), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, V|E|D, "threads"}, +{"auto", "detect a good number of threads", 0, AV_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, V|E|D, "threads"}, +{"me_threshold", "motion estimaton threshold", OFFSET(me_threshold), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"mb_threshold", "macroblock threshold", OFFSET(mb_threshold), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"dc", "intra_dc_precision", OFFSET(intra_dc_precision), AV_OPT_TYPE_INT, {.dbl = 0 }, INT_MIN, INT_MAX, V|E}, +{"nssew", "nsse weight", OFFSET(nsse_weight), AV_OPT_TYPE_INT, {.dbl = 8 }, INT_MIN, INT_MAX, V|E}, +{"skip_top", "number of macroblock rows at the top which are skipped", OFFSET(skip_top), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|D}, +{"skip_bottom", "number of macroblock rows at the bottom which are skipped", OFFSET(skip_bottom), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|D}, +{"profile", NULL, OFFSET(profile), AV_OPT_TYPE_INT, {.dbl = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "profile"}, +{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "profile"}, +{"aac_main", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PROFILE_AAC_MAIN }, INT_MIN, INT_MAX, A|E, "profile"}, +{"aac_low", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PROFILE_AAC_LOW }, INT_MIN, INT_MAX, A|E, "profile"}, +{"aac_ssr", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PROFILE_AAC_SSR }, INT_MIN, INT_MAX, A|E, "profile"}, +{"aac_ltp", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PROFILE_AAC_LTP }, INT_MIN, INT_MAX, A|E, "profile"}, +{"dts", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PROFILE_DTS }, INT_MIN, INT_MAX, A|E, "profile"}, +{"dts_es", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PROFILE_DTS_ES }, INT_MIN, INT_MAX, A|E, "profile"}, +{"dts_96_24", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PROFILE_DTS_96_24 }, INT_MIN, INT_MAX, A|E, "profile"}, +{"dts_hd_hra", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PROFILE_DTS_HD_HRA }, INT_MIN, INT_MAX, A|E, "profile"}, +{"dts_hd_ma", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PROFILE_DTS_HD_MA }, INT_MIN, INT_MAX, A|E, "profile"}, +{"level", NULL, OFFSET(level), AV_OPT_TYPE_INT, {.dbl = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"}, +{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"}, +{"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, V|A|D}, +{"skip_threshold", "frame skip threshold", OFFSET(frame_skip_threshold), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"skip_factor", "frame skip factor", OFFSET(frame_skip_factor), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"skip_exp", "frame skip exponent", OFFSET(frame_skip_exp), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"skipcmp", "frame skip compare function", OFFSET(frame_skip_cmp), AV_OPT_TYPE_INT, {.dbl = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"border_mask", "increases the quantizer for macroblocks close to borders", OFFSET(border_masking), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E}, +{"mblmin", "min macroblock lagrange factor (VBR)", OFFSET(mb_lmin), AV_OPT_TYPE_INT, {.dbl = FF_QP2LAMBDA * 2 }, 1, FF_LAMBDA_MAX, V|E}, +{"mblmax", "max macroblock lagrange factor (VBR)", OFFSET(mb_lmax), AV_OPT_TYPE_INT, {.dbl = FF_QP2LAMBDA * 31 }, 1, FF_LAMBDA_MAX, V|E}, +{"mepc", "motion estimation bitrate penalty compensation (1.0 = 256)", OFFSET(me_penalty_compensation), AV_OPT_TYPE_INT, {.dbl = 256 }, INT_MIN, INT_MAX, V|E}, +{"skip_loop_filter", NULL, OFFSET(skip_loop_filter), AV_OPT_TYPE_INT, {.dbl = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"skip_idct" , NULL, OFFSET(skip_idct) , AV_OPT_TYPE_INT, {.dbl = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"skip_frame" , NULL, OFFSET(skip_frame) , AV_OPT_TYPE_INT, {.dbl = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"none" , NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AVDISCARD_NONE }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"default" , NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"noref" , NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AVDISCARD_NONREF }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"bidir" , NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AVDISCARD_BIDIR }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"nokey" , NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AVDISCARD_NONKEY }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"all" , NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AVDISCARD_ALL }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"bidir_refine", "refine the two motion vectors used in bidirectional macroblocks", OFFSET(bidir_refine), AV_OPT_TYPE_INT, {.dbl = 1 }, 0, 4, V|E}, +{"brd_scale", "downscales frames for dynamic B-frame decision", OFFSET(brd_scale), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, 10, V|E}, +#if FF_API_X264_GLOBAL_OPTS +{"crf", "enables constant quality mode, and selects the quality (x264)", OFFSET(crf), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, 0, 51, V|E}, +{"cqp", "constant quantization parameter rate control method", OFFSET(cqp), AV_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, V|E}, +#endif +{"keyint_min", "minimum interval between IDR-frames (x264)", OFFSET(keyint_min), AV_OPT_TYPE_INT, {.dbl = 25 }, INT_MIN, INT_MAX, V|E}, +{"refs", "reference frames to consider for motion compensation (Snow)", OFFSET(refs), AV_OPT_TYPE_INT, {.dbl = 1 }, INT_MIN, INT_MAX, V|E}, +{"chromaoffset", "chroma qp offset from luma", OFFSET(chromaoffset), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#if FF_API_X264_GLOBAL_OPTS +{"bframebias", "influences how often B-frames are used", OFFSET(bframebias), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#endif +{"trellis", "rate-distortion optimal quantization", OFFSET(trellis), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, +#if FF_API_X264_GLOBAL_OPTS +{"directpred", "direct mv prediction mode - 0 (none), 1 (spatial), 2 (temporal), 3 (auto)", OFFSET(directpred), AV_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, V|E}, +{"bpyramid", "allows B-frames to be used as references for predicting", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_BPYRAMID }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"wpred", "weighted biprediction for b-frames (H.264)", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_WPRED }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"mixed_refs", "one reference per partition, as opposed to one reference per macroblock", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_MIXED_REFS }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"dct8x8", "high profile 8x8 transform (H.264)", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_8X8DCT }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"fastpskip", "fast pskip (H.264)", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_FASTPSKIP }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"aud", "access unit delimiters (H.264)", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_AUD }, INT_MIN, INT_MAX, V|E, "flags2"}, +#endif +{"skiprd", "RD optimal MB level residual skipping", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_SKIP_RD }, INT_MIN, INT_MAX, V|E, "flags2"}, +#if FF_API_X264_GLOBAL_OPTS +{"complexityblur", "reduce fluctuations in qp (before curve compression)", OFFSET(complexityblur), AV_OPT_TYPE_FLOAT, {.dbl = -1 }, -1, FLT_MAX, V|E}, +{"deblockalpha", "in-loop deblocking filter alphac0 parameter", OFFSET(deblockalpha), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, -6, 6, V|E}, +{"deblockbeta", "in-loop deblocking filter beta parameter", OFFSET(deblockbeta), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, -6, 6, V|E}, +{"partitions", "macroblock subpartition sizes to consider", OFFSET(partitions), AV_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E, "partitions"}, +{"parti4x4", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = X264_PART_I4X4 }, INT_MIN, INT_MAX, V|E, "partitions"}, +{"parti8x8", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = X264_PART_I8X8 }, INT_MIN, INT_MAX, V|E, "partitions"}, +{"partp4x4", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = X264_PART_P4X4 }, INT_MIN, INT_MAX, V|E, "partitions"}, +{"partp8x8", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = X264_PART_P8X8 }, INT_MIN, INT_MAX, V|E, "partitions"}, +{"partb8x8", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = X264_PART_B8X8 }, INT_MIN, INT_MAX, V|E, "partitions"}, +#endif +{"sc_factor", "multiplied by qscale for each frame and added to scene_change_score", OFFSET(scenechange_factor), AV_OPT_TYPE_INT, {.dbl = 6 }, 0, INT_MAX, V|E}, +{"mv0_threshold", NULL, OFFSET(mv0_threshold), AV_OPT_TYPE_INT, {.dbl = 256 }, 0, INT_MAX, V|E}, +#if FF_API_MPEGVIDEO_GLOBAL_OPTS +{"ivlc", "intra vlc table", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_INTRA_VLC }, INT_MIN, INT_MAX, V|E, "flags2"}, +#endif +{"b_sensitivity", "adjusts sensitivity of b_frame_strategy 1", OFFSET(b_sensitivity), AV_OPT_TYPE_INT, {.dbl = 40 }, 1, INT_MAX, V|E}, +{"compression_level", NULL, OFFSET(compression_level), AV_OPT_TYPE_INT, {.dbl = FF_COMPRESSION_DEFAULT }, INT_MIN, INT_MAX, V|A|E}, +{"min_prediction_order", NULL, OFFSET(min_prediction_order), AV_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, +{"max_prediction_order", NULL, OFFSET(max_prediction_order), AV_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, #if FF_API_FLAC_GLOBAL_OPTS -{"lpc_coeff_precision", "deprecated, use flac-specific options", OFFSET(lpc_coeff_precision), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, A|E}, -{"prediction_order_method", "deprecated, use flac-specific options", OFFSET(prediction_order_method), FF_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, -{"min_partition_order", "deprecated, use flac-specific options", OFFSET(min_partition_order), FF_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, -{"max_partition_order", "deprecated, use flac-specific options", OFFSET(max_partition_order), FF_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, -#endif -{"timecode_frame_start", "GOP timecode frame start number, in non drop frame format", OFFSET(timecode_frame_start), FF_OPT_TYPE_INT64, {.dbl = 0 }, 0, INT64_MAX, V|E}, -{"drop_frame_timecode", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_DROP_FRAME_TIMECODE }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"non_linear_q", "use non linear quantizer", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_NON_LINEAR_QUANT }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"lpc_coeff_precision", "deprecated, use flac-specific options", OFFSET(lpc_coeff_precision), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, A|E}, +{"prediction_order_method", "deprecated, use flac-specific options", OFFSET(prediction_order_method), AV_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, +{"min_partition_order", "deprecated, use flac-specific options", OFFSET(min_partition_order), AV_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, +{"max_partition_order", "deprecated, use flac-specific options", OFFSET(max_partition_order), AV_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, +#endif +{"timecode_frame_start", "GOP timecode frame start number, in non drop frame format", OFFSET(timecode_frame_start), AV_OPT_TYPE_INT64, {.dbl = 0 }, 0, INT64_MAX, V|E}, +#if FF_API_MPEGVIDEO_GLOBAL_OPTS +{"drop_frame_timecode", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_DROP_FRAME_TIMECODE }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"non_linear_q", "use non linear quantizer", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_NON_LINEAR_QUANT }, INT_MIN, INT_MAX, V|E, "flags2"}, +#endif #if FF_API_REQUEST_CHANNELS -{"request_channels", "set desired number of audio channels", OFFSET(request_channels), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, A|D}, +{"request_channels", "set desired number of audio channels", OFFSET(request_channels), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, A|D}, +#endif +#if FF_API_DRC_SCALE +{"drc_scale", "percentage of dynamic range compression to apply", OFFSET(drc_scale), AV_OPT_TYPE_FLOAT, {.dbl = 0.0 }, 0.0, 1.0, A|D}, +#endif +#if FF_API_LAME_GLOBAL_OPTS +{"reservoir", "use bit reservoir", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_BIT_RESERVOIR }, INT_MIN, INT_MAX, A|E, "flags2"}, #endif -{"drc_scale", "percentage of dynamic range compression to apply", OFFSET(drc_scale), FF_OPT_TYPE_FLOAT, {.dbl = 1.0 }, 0.0, 1.0, A|D}, -{"reservoir", "use bit reservoir", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_BIT_RESERVOIR }, INT_MIN, INT_MAX, A|E, "flags2"}, -{"mbtree", "use macroblock tree ratecontrol (x264 only)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_MBTREE }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, -{"channel_layout", NULL, OFFSET(channel_layout), FF_OPT_TYPE_INT64, {.dbl = DEFAULT }, 0, INT64_MAX, A|E|D, "channel_layout"}, -{"request_channel_layout", NULL, OFFSET(request_channel_layout), FF_OPT_TYPE_INT64, {.dbl = DEFAULT }, 0, INT64_MAX, A|D, "request_channel_layout"}, -{"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), FF_OPT_TYPE_FLOAT, {.dbl = 1.0/3 }, 0.0, FLT_MAX, V|E}, -{"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use), FF_OPT_TYPE_FLOAT, {.dbl = 3 }, 0.0, FLT_MAX, V|E}, -{"ticks_per_frame", NULL, OFFSET(ticks_per_frame), FF_OPT_TYPE_INT, {.dbl = 1 }, 1, INT_MAX, A|V|E|D}, -{"color_primaries", NULL, OFFSET(color_primaries), FF_OPT_TYPE_INT, {.dbl = AVCOL_PRI_UNSPECIFIED }, 1, AVCOL_PRI_NB-1, V|E|D}, -{"color_trc", NULL, OFFSET(color_trc), FF_OPT_TYPE_INT, {.dbl = AVCOL_TRC_UNSPECIFIED }, 1, AVCOL_TRC_NB-1, V|E|D}, -{"colorspace", NULL, OFFSET(colorspace), FF_OPT_TYPE_INT, {.dbl = AVCOL_SPC_UNSPECIFIED }, 1, AVCOL_SPC_NB-1, V|E|D}, -{"color_range", NULL, OFFSET(color_range), FF_OPT_TYPE_INT, {.dbl = AVCOL_RANGE_UNSPECIFIED }, 0, AVCOL_RANGE_NB-1, V|E|D}, -{"chroma_sample_location", NULL, OFFSET(chroma_sample_location), FF_OPT_TYPE_INT, {.dbl = AVCHROMA_LOC_UNSPECIFIED }, 0, AVCHROMA_LOC_NB-1, V|E|D}, -{"psy", "use psycho visual optimization", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_PSY }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"psy_rd", "specify psycho visual strength", OFFSET(psy_rd), FF_OPT_TYPE_FLOAT, {.dbl = 1.0 }, 0, FLT_MAX, V|E}, -{"psy_trellis", "specify psycho visual trellis", OFFSET(psy_trellis), FF_OPT_TYPE_FLOAT, {.dbl = 0 }, 0, FLT_MAX, V|E}, -{"aq_mode", "specify aq method", OFFSET(aq_mode), FF_OPT_TYPE_INT, {.dbl = 1 }, 0, INT_MAX, V|E}, -{"aq_strength", "specify aq strength", OFFSET(aq_strength), FF_OPT_TYPE_FLOAT, {.dbl = 1.0 }, 0, FLT_MAX, V|E}, -{"rc_lookahead", "specify number of frames to look ahead for frametype", OFFSET(rc_lookahead), FF_OPT_TYPE_INT, {.dbl = 40 }, 0, INT_MAX, V|E}, -{"ssim", "ssim will be calculated during encoding", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_SSIM }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"intra_refresh", "use periodic insertion of intra blocks instead of keyframes", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_INTRA_REFRESH }, INT_MIN, INT_MAX, V|E, "flags2"}, -{"crf_max", "in crf mode, prevents vbv from lowering quality beyond this point", OFFSET(crf_max), FF_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, 0, 51, V|E}, -{"log_level_offset", "set the log level offset", OFFSET(log_level_offset), FF_OPT_TYPE_INT, {.dbl = 0 }, INT_MIN, INT_MAX }, +#if FF_API_X264_GLOBAL_OPTS +{"mbtree", "use macroblock tree ratecontrol (x264 only)", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_MBTREE }, INT_MIN, INT_MAX, V|E, "flags2"}, +#endif +{"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX}, +{"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_INT64, {.dbl = DEFAULT }, 0, INT64_MAX, A|E|D, "channel_layout"}, +{"request_channel_layout", NULL, OFFSET(request_channel_layout), AV_OPT_TYPE_INT64, {.dbl = DEFAULT }, 0, INT64_MAX, A|D, "request_channel_layout"}, +{"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), AV_OPT_TYPE_FLOAT, {.dbl = 1.0/3 }, 0.0, FLT_MAX, V|E}, +{"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use), AV_OPT_TYPE_FLOAT, {.dbl = 3 }, 0.0, FLT_MAX, V|E}, +{"ticks_per_frame", NULL, OFFSET(ticks_per_frame), AV_OPT_TYPE_INT, {.dbl = 1 }, 1, INT_MAX, A|V|E|D}, +{"color_primaries", NULL, OFFSET(color_primaries), AV_OPT_TYPE_INT, {.dbl = AVCOL_PRI_UNSPECIFIED }, 1, AVCOL_PRI_NB-1, V|E|D}, +{"color_trc", NULL, OFFSET(color_trc), AV_OPT_TYPE_INT, {.dbl = AVCOL_TRC_UNSPECIFIED }, 1, AVCOL_TRC_NB-1, V|E|D}, +{"colorspace", NULL, OFFSET(colorspace), AV_OPT_TYPE_INT, {.dbl = AVCOL_SPC_UNSPECIFIED }, 1, AVCOL_SPC_NB-1, V|E|D}, +{"color_range", NULL, OFFSET(color_range), AV_OPT_TYPE_INT, {.dbl = AVCOL_RANGE_UNSPECIFIED }, 0, AVCOL_RANGE_NB-1, V|E|D}, +{"chroma_sample_location", NULL, OFFSET(chroma_sample_location), AV_OPT_TYPE_INT, {.dbl = AVCHROMA_LOC_UNSPECIFIED }, 0, AVCHROMA_LOC_NB-1, V|E|D}, +#if FF_API_X264_GLOBAL_OPTS +{"psy", "use psycho visual optimization", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_PSY }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"psy_rd", "specify psycho visual strength", OFFSET(psy_rd), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1, FLT_MAX, V|E}, +{"psy_trellis", "specify psycho visual trellis", OFFSET(psy_trellis), AV_OPT_TYPE_FLOAT, {.dbl = -1 }, -1, FLT_MAX, V|E}, +{"aq_mode", "specify aq method", OFFSET(aq_mode), AV_OPT_TYPE_INT, {.dbl = -1 }, -1, INT_MAX, V|E}, +{"aq_strength", "specify aq strength", OFFSET(aq_strength), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1, FLT_MAX, V|E}, +{"rc_lookahead", "specify number of frames to look ahead for frametype", OFFSET(rc_lookahead), AV_OPT_TYPE_INT, {.dbl = -1 }, -1, INT_MAX, V|E}, +{"ssim", "ssim will be calculated during encoding", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_SSIM }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"intra_refresh", "use periodic insertion of intra blocks instead of keyframes", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_INTRA_REFRESH }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"crf_max", "in crf mode, prevents vbv from lowering quality beyond this point", OFFSET(crf_max), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, 0, 51, V|E}, +#endif +{"log_level_offset", "set the log level offset", OFFSET(log_level_offset), AV_OPT_TYPE_INT, {.dbl = 0 }, INT_MIN, INT_MAX }, #if FF_API_FLAC_GLOBAL_OPTS -{"lpc_type", "deprecated, use flac-specific options", OFFSET(lpc_type), FF_OPT_TYPE_INT, {.dbl = AV_LPC_TYPE_DEFAULT }, AV_LPC_TYPE_DEFAULT, AV_LPC_TYPE_NB-1, A|E}, -{"none", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = AV_LPC_TYPE_NONE }, INT_MIN, INT_MAX, A|E, "lpc_type"}, -{"fixed", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = AV_LPC_TYPE_FIXED }, INT_MIN, INT_MAX, A|E, "lpc_type"}, -{"levinson", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = AV_LPC_TYPE_LEVINSON }, INT_MIN, INT_MAX, A|E, "lpc_type"}, -{"cholesky", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = AV_LPC_TYPE_CHOLESKY }, INT_MIN, INT_MAX, A|E, "lpc_type"}, -{"lpc_passes", "deprecated, use flac-specific options", OFFSET(lpc_passes), FF_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, -#endif -{"slices", "number of slices, used in parallelized decoding", OFFSET(slices), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, V|E}, -{"thread_type", "select multithreading type", OFFSET(thread_type), FF_OPT_TYPE_INT, {.dbl = FF_THREAD_SLICE|FF_THREAD_FRAME }, 0, INT_MAX, V|E|D, "thread_type"}, -{"slice", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_THREAD_SLICE }, INT_MIN, INT_MAX, V|E|D, "thread_type"}, -{"frame", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_THREAD_FRAME }, INT_MIN, INT_MAX, V|E|D, "thread_type"}, -{"vbv_delay", "initial buffer fill time in periods of 27Mhz clock", 0, FF_OPT_TYPE_INT64, {.dbl = 0 }, 0, INT64_MAX}, -{"audio_service_type", "audio service type", OFFSET(audio_service_type), FF_OPT_TYPE_INT, {.dbl = AV_AUDIO_SERVICE_TYPE_MAIN }, 0, AV_AUDIO_SERVICE_TYPE_NB-1, A|E, "audio_service_type"}, -{"ma", "Main Audio Service", 0, FF_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_MAIN }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, -{"ef", "Effects", 0, FF_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_EFFECTS }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, -{"vi", "Visually Impaired", 0, FF_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, -{"hi", "Hearing Impaired", 0, FF_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, -{"di", "Dialogue", 0, FF_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_DIALOGUE }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, -{"co", "Commentary", 0, FF_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_COMMENTARY }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, -{"em", "Emergency", 0, FF_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_EMERGENCY }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, -{"vo", "Voice Over", 0, FF_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_VOICE_OVER }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, -{"ka", "Karaoke", 0, FF_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_KARAOKE }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, -{"request_sample_fmt", NULL, OFFSET(request_sample_fmt), FF_OPT_TYPE_INT, {.dbl = AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE, AV_SAMPLE_FMT_NB-1, A|D, "request_sample_fmt"}, -{"u8" , "8-bit unsigned integer", 0, FF_OPT_TYPE_CONST, {.dbl = AV_SAMPLE_FMT_U8 }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, -{"s16", "16-bit signed integer", 0, FF_OPT_TYPE_CONST, {.dbl = AV_SAMPLE_FMT_S16 }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, -{"s32", "32-bit signed integer", 0, FF_OPT_TYPE_CONST, {.dbl = AV_SAMPLE_FMT_S32 }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, -{"flt", "32-bit float", 0, FF_OPT_TYPE_CONST, {.dbl = AV_SAMPLE_FMT_FLT }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, -{"dbl", "64-bit double", 0, FF_OPT_TYPE_CONST, {.dbl = AV_SAMPLE_FMT_DBL }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, +{"lpc_type", "deprecated, use flac-specific options", OFFSET(lpc_type), AV_OPT_TYPE_INT, {.dbl = AV_LPC_TYPE_DEFAULT }, AV_LPC_TYPE_DEFAULT, AV_LPC_TYPE_NB-1, A|E}, +{"none", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AV_LPC_TYPE_NONE }, INT_MIN, INT_MAX, A|E, "lpc_type"}, +{"fixed", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AV_LPC_TYPE_FIXED }, INT_MIN, INT_MAX, A|E, "lpc_type"}, +{"levinson", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AV_LPC_TYPE_LEVINSON }, INT_MIN, INT_MAX, A|E, "lpc_type"}, +{"cholesky", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = AV_LPC_TYPE_CHOLESKY }, INT_MIN, INT_MAX, A|E, "lpc_type"}, +{"lpc_passes", "deprecated, use flac-specific options", OFFSET(lpc_passes), AV_OPT_TYPE_INT, {.dbl = -1 }, INT_MIN, INT_MAX, A|E}, +#endif +{"slices", "number of slices, used in parallelized encoding", OFFSET(slices), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, V|E}, +{"thread_type", "select multithreading type", OFFSET(thread_type), AV_OPT_TYPE_FLAGS, {.dbl = FF_THREAD_SLICE|FF_THREAD_FRAME }, 0, INT_MAX, V|E|D, "thread_type"}, +{"slice", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_THREAD_SLICE }, INT_MIN, INT_MAX, V|E|D, "thread_type"}, +{"frame", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_THREAD_FRAME }, INT_MIN, INT_MAX, V|E|D, "thread_type"}, +{"audio_service_type", "audio service type", OFFSET(audio_service_type), AV_OPT_TYPE_INT, {.dbl = AV_AUDIO_SERVICE_TYPE_MAIN }, 0, AV_AUDIO_SERVICE_TYPE_NB-1, A|E, "audio_service_type"}, +{"ma", "Main Audio Service", 0, AV_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_MAIN }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"ef", "Effects", 0, AV_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_EFFECTS }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"vi", "Visually Impaired", 0, AV_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"hi", "Hearing Impaired", 0, AV_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"di", "Dialogue", 0, AV_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_DIALOGUE }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"co", "Commentary", 0, AV_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_COMMENTARY }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"em", "Emergency", 0, AV_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_EMERGENCY }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"vo", "Voice Over", 0, AV_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_VOICE_OVER }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"ka", "Karaoke", 0, AV_OPT_TYPE_CONST, {.dbl = AV_AUDIO_SERVICE_TYPE_KARAOKE }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"request_sample_fmt", NULL, OFFSET(request_sample_fmt), AV_OPT_TYPE_INT, {.dbl = AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE, AV_SAMPLE_FMT_NB-1, A|D, "request_sample_fmt"}, +{"u8" , "8-bit unsigned integer", 0, AV_OPT_TYPE_CONST, {.dbl = AV_SAMPLE_FMT_U8 }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, +{"s16", "16-bit signed integer", 0, AV_OPT_TYPE_CONST, {.dbl = AV_SAMPLE_FMT_S16 }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, +{"s32", "32-bit signed integer", 0, AV_OPT_TYPE_CONST, {.dbl = AV_SAMPLE_FMT_S32 }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, +{"flt", "32-bit float", 0, AV_OPT_TYPE_CONST, {.dbl = AV_SAMPLE_FMT_FLT }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, +{"dbl", "64-bit double", 0, AV_OPT_TYPE_CONST, {.dbl = AV_SAMPLE_FMT_DBL }, INT_MIN, INT_MAX, A|D, "request_sample_fmt"}, {NULL}, }; @@ -476,40 +536,43 @@ #undef D #undef DEFAULT -static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options, LIBAVUTIL_VERSION_INT, OFFSET(log_level_offset), .opt_find = opt_find}; +static const AVClass av_codec_context_class = { + .class_name = "AVCodecContext", + .item_name = context_to_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, + .log_level_offset_offset = OFFSET(log_level_offset), + .child_next = codec_child_next, + .child_class_next = codec_child_class_next, +}; +#if FF_API_ALLOC_CONTEXT void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType codec_type){ - int flags=0; - memset(s, 0, sizeof(AVCodecContext)); - - s->av_class= &av_codec_context_class; - + avcodec_get_context_defaults3(s, NULL); s->codec_type = codec_type; - if(codec_type == AVMEDIA_TYPE_AUDIO) - flags= AV_OPT_FLAG_AUDIO_PARAM; - else if(codec_type == AVMEDIA_TYPE_VIDEO) - flags= AV_OPT_FLAG_VIDEO_PARAM; - else if(codec_type == AVMEDIA_TYPE_SUBTITLE) - flags= AV_OPT_FLAG_SUBTITLE_PARAM; - av_opt_set_defaults2(s, flags, flags); - - s->time_base= (AVRational){0,1}; - s->get_buffer= avcodec_default_get_buffer; - s->release_buffer= avcodec_default_release_buffer; - s->get_format= avcodec_default_get_format; - s->execute= avcodec_default_execute; - s->execute2= avcodec_default_execute2; - s->sample_aspect_ratio= (AVRational){0,1}; - s->pix_fmt= PIX_FMT_NONE; - s->sample_fmt= AV_SAMPLE_FMT_NONE; - - s->palctrl = NULL; - s->reget_buffer= avcodec_default_reget_buffer; - s->reordered_opaque= AV_NOPTS_VALUE; } +#endif int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec){ - avcodec_get_context_defaults2(s, codec ? codec->type : AVMEDIA_TYPE_UNKNOWN); + memset(s, 0, sizeof(AVCodecContext)); + + s->av_class = &av_codec_context_class; + + s->codec_type = codec ? codec->type : AVMEDIA_TYPE_UNKNOWN; + av_opt_set_defaults(s); + + s->time_base = (AVRational){0,1}; + s->get_buffer = avcodec_default_get_buffer; + s->release_buffer = avcodec_default_release_buffer; + s->get_format = avcodec_default_get_format; + s->execute = avcodec_default_execute; + s->execute2 = avcodec_default_execute2; + s->sample_aspect_ratio = (AVRational){0,1}; + s->pix_fmt = PIX_FMT_NONE; + s->sample_fmt = AV_SAMPLE_FMT_NONE; + + s->reget_buffer = avcodec_default_reget_buffer; + s->reordered_opaque = AV_NOPTS_VALUE; if(codec && codec->priv_data_size){ if(!s->priv_data){ s->priv_data= av_mallocz(codec->priv_data_size); @@ -518,10 +581,19 @@ } } if(codec->priv_class){ - *(AVClass**)s->priv_data= codec->priv_class; + *(const AVClass**)s->priv_data = codec->priv_class; av_opt_set_defaults(s->priv_data); } } + if (codec && codec->defaults) { + int ret; + const AVCodecDefault *d = codec->defaults; + while (d->key) { + ret = av_opt_set(s, d->key, d->value, 0); + av_assert0(ret >= 0); + d++; + } + } return 0; } @@ -538,6 +610,7 @@ return avctx; } +#if FF_API_ALLOC_CONTEXT AVCodecContext *avcodec_alloc_context2(enum AVMediaType codec_type){ AVCodecContext *avctx= av_malloc(sizeof(AVCodecContext)); @@ -555,6 +628,7 @@ AVCodecContext *avcodec_alloc_context(void){ return avcodec_alloc_context2(AVMEDIA_TYPE_UNKNOWN); } +#endif int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) { @@ -569,11 +643,10 @@ /* set values specific to opened codecs back to their default state */ dest->priv_data = NULL; dest->codec = NULL; - dest->palctrl = NULL; dest->slice_offset = NULL; - dest->internal_buffer = NULL; dest->hwaccel = NULL; dest->thread_opaque = NULL; + dest->internal = NULL; /* reallocate values that should be allocated separately */ dest->rc_eq = NULL; @@ -613,3 +686,8 @@ av_freep(&dest->rc_eq); return AVERROR(ENOMEM); } + +const AVClass *avcodec_get_class(void) +{ + return &av_codec_context_class; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pamenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pamenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pamenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pamenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -109,12 +109,12 @@ AVCodec ff_pam_encoder = { - "pam", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PAM, - sizeof(PNMContext), - ff_pnm_init, - pam_encode_frame, + .name = "pam", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PAM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .encode = pam_encode_frame, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/parser.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -216,7 +216,7 @@ /*****************************************************/ /** - * combines the (truncated) bitstream to a complete frame + * Combine the (truncated) bitstream to a complete frame. * @return -1 if no complete frame could be created, AVERROR(ENOMEM) if there was a memory allocation error */ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pcm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pcm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pcm.c 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pcm.c 2012-01-11 00:34:30.000000000 +0000 @@ -95,11 +95,6 @@ samples = data; dst = frame; - if (avctx->sample_fmt!=avctx->codec->sample_fmts[0]) { - av_log(avctx, AV_LOG_ERROR, "invalid sample_fmt\n"); - return -1; - } - switch(avctx->codec->id) { case CODEC_ID_PCM_U32LE: ENCODE(uint32_t, le32, samples, dst, n, 0, 0x80000000) @@ -176,14 +171,6 @@ memcpy(dst, samples, n*sample_size); dst += n*sample_size; break; - case CODEC_ID_PCM_ZORK: - for(;n>0;n--) { - v= *samples++ >> 8; - if(v<0) v = -v; - else v+= 128; - *dst++ = v; - } - break; case CODEC_ID_PCM_ALAW: for(;n>0;n--) { v = *samples++; @@ -205,6 +192,7 @@ } typedef struct PCMDecode { + AVFrame frame; short table[256]; } PCMDecode; @@ -213,6 +201,11 @@ PCMDecode *s = avctx->priv_data; int i; + if (avctx->channels <= 0 || avctx->channels > MAX_CHANNELS) { + av_log(avctx, AV_LOG_ERROR, "PCM channels out of bounds\n"); + return AVERROR(EINVAL); + } + switch(avctx->codec->id) { case CODEC_ID_PCM_ALAW: for(i=0;i<256;i++) @@ -231,12 +224,15 @@ if (avctx->sample_fmt == AV_SAMPLE_FMT_S32) avctx->bits_per_raw_sample = av_get_bits_per_sample(avctx->codec->id); + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } /** * Read PCM samples macro - * @param type Datatype of native machine format + * @param size Data size of native machine format * @param endian bytestream_get_xxx() endian suffix * @param src Source pointer (variable name) * @param dst Destination pointer (variable name) @@ -244,53 +240,41 @@ * @param shift Bitshift (bits) * @param offset Sample value offset */ -#define DECODE(type, endian, src, dst, n, shift, offset) \ - dst_##type = (type*)dst; \ +#define DECODE(size, endian, src, dst, n, shift, offset) \ for(;n>0;n--) { \ - register type v = bytestream_get_##endian(&src); \ - *dst_##type++ = (v - offset) << shift; \ - } \ - dst = (short*)dst_##type; - -static int pcm_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) + uint##size##_t v = bytestream_get_##endian(&src); \ + AV_WN##size##A(dst, (v - offset) << shift); \ + dst += size / 8; \ + } + +static int pcm_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { - const uint8_t *buf = avpkt->data; + const uint8_t *src = avpkt->data; int buf_size = avpkt->size; PCMDecode *s = avctx->priv_data; - int sample_size, c, n, i; - short *samples; - const uint8_t *src, *src8, *src2[MAX_CHANNELS]; - uint8_t *dstu8; - int16_t *dst_int16_t; + int sample_size, c, n, ret, samples_per_block; + uint8_t *samples; int32_t *dst_int32_t; - int64_t *dst_int64_t; - uint16_t *dst_uint16_t; - uint32_t *dst_uint32_t; - - samples = data; - src = buf; - - if (avctx->sample_fmt!=avctx->codec->sample_fmts[0]) { - av_log(avctx, AV_LOG_ERROR, "invalid sample_fmt\n"); - return -1; - } - - if(avctx->channels <= 0 || avctx->channels > MAX_CHANNELS){ - av_log(avctx, AV_LOG_ERROR, "PCM channels out of bounds\n"); - return -1; - } sample_size = av_get_bits_per_sample(avctx->codec_id)/8; /* av_get_bits_per_sample returns 0 for CODEC_ID_PCM_DVD */ - if (CODEC_ID_PCM_DVD == avctx->codec_id) + samples_per_block = 1; + if (CODEC_ID_PCM_DVD == avctx->codec_id) { + if (avctx->bits_per_coded_sample != 20 && + avctx->bits_per_coded_sample != 24) { + av_log(avctx, AV_LOG_ERROR, "PCM DVD unsupported sample depth\n"); + return AVERROR(EINVAL); + } /* 2 samples are interleaved per block in PCM_DVD */ + samples_per_block = 2; sample_size = avctx->bits_per_coded_sample * 2 / 8; - else if (avctx->codec_id == CODEC_ID_PCM_LXF) + } else if (avctx->codec_id == CODEC_ID_PCM_LXF) { /* we process 40-bit blocks per channel for LXF */ + samples_per_block = 2; sample_size = 5; + } if (sample_size == 0) { av_log(avctx, AV_LOG_ERROR, "Invalid sample_size\n"); @@ -307,70 +291,78 @@ buf_size -= buf_size % n; } - buf_size= FFMIN(buf_size, *data_size/2); - *data_size=0; - n = buf_size/sample_size; + /* get output buffer */ + s->frame.nb_samples = n * samples_per_block / avctx->channels; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = s->frame.data[0]; + switch(avctx->codec->id) { case CODEC_ID_PCM_U32LE: - DECODE(uint32_t, le32, src, samples, n, 0, 0x80000000) + DECODE(32, le32, src, samples, n, 0, 0x80000000) break; case CODEC_ID_PCM_U32BE: - DECODE(uint32_t, be32, src, samples, n, 0, 0x80000000) + DECODE(32, be32, src, samples, n, 0, 0x80000000) break; case CODEC_ID_PCM_S24LE: - DECODE(int32_t, le24, src, samples, n, 8, 0) + DECODE(32, le24, src, samples, n, 8, 0) break; case CODEC_ID_PCM_S24BE: - DECODE(int32_t, be24, src, samples, n, 8, 0) + DECODE(32, be24, src, samples, n, 8, 0) break; case CODEC_ID_PCM_U24LE: - DECODE(uint32_t, le24, src, samples, n, 8, 0x800000) + DECODE(32, le24, src, samples, n, 8, 0x800000) break; case CODEC_ID_PCM_U24BE: - DECODE(uint32_t, be24, src, samples, n, 8, 0x800000) + DECODE(32, be24, src, samples, n, 8, 0x800000) break; case CODEC_ID_PCM_S24DAUD: for(;n>0;n--) { uint32_t v = bytestream_get_be24(&src); v >>= 4; // sync flags are here - *samples++ = av_reverse[(v >> 8) & 0xff] + - (av_reverse[v & 0xff] << 8); + AV_WN16A(samples, av_reverse[(v >> 8) & 0xff] + + (av_reverse[v & 0xff] << 8)); + samples += 2; } break; case CODEC_ID_PCM_S16LE_PLANAR: + { + const uint8_t *src2[MAX_CHANNELS]; n /= avctx->channels; for(c=0;cchannels;c++) src2[c] = &src[c*n*2]; for(;n>0;n--) - for(c=0;cchannels;c++) - *samples++ = bytestream_get_le16(&src2[c]); - src = src2[avctx->channels-1]; + for(c=0;cchannels;c++) { + AV_WN16A(samples, bytestream_get_le16(&src2[c])); + samples += 2; + } break; + } case CODEC_ID_PCM_U16LE: - DECODE(uint16_t, le16, src, samples, n, 0, 0x8000) + DECODE(16, le16, src, samples, n, 0, 0x8000) break; case CODEC_ID_PCM_U16BE: - DECODE(uint16_t, be16, src, samples, n, 0, 0x8000) + DECODE(16, be16, src, samples, n, 0, 0x8000) break; case CODEC_ID_PCM_S8: - dstu8= (uint8_t*)samples; for(;n>0;n--) { - *dstu8++ = *src++ + 128; + *samples++ = *src++ + 128; } - samples= (short*)dstu8; break; #if HAVE_BIGENDIAN case CODEC_ID_PCM_F64LE: - DECODE(int64_t, le64, src, samples, n, 0, 0) + DECODE(64, le64, src, samples, n, 0, 0) break; case CODEC_ID_PCM_S32LE: case CODEC_ID_PCM_F32LE: - DECODE(int32_t, le32, src, samples, n, 0, 0) + DECODE(32, le32, src, samples, n, 0, 0) break; case CODEC_ID_PCM_S16LE: - DECODE(int16_t, le16, src, samples, n, 0, 0) + DECODE(16, le16, src, samples, n, 0, 0) break; case CODEC_ID_PCM_F64BE: case CODEC_ID_PCM_F32BE: @@ -378,14 +370,14 @@ case CODEC_ID_PCM_S16BE: #else case CODEC_ID_PCM_F64BE: - DECODE(int64_t, be64, src, samples, n, 0, 0) + DECODE(64, be64, src, samples, n, 0, 0) break; case CODEC_ID_PCM_F32BE: case CODEC_ID_PCM_S32BE: - DECODE(int32_t, be32, src, samples, n, 0, 0) + DECODE(32, be32, src, samples, n, 0, 0) break; case CODEC_ID_PCM_S16BE: - DECODE(int16_t, be16, src, samples, n, 0, 0) + DECODE(16, be16, src, samples, n, 0, 0) break; case CODEC_ID_PCM_F64LE: case CODEC_ID_PCM_F32LE: @@ -394,25 +386,26 @@ #endif /* HAVE_BIGENDIAN */ case CODEC_ID_PCM_U8: memcpy(samples, src, n*sample_size); - src += n*sample_size; - samples = (short*)((uint8_t*)data + n*sample_size); break; case CODEC_ID_PCM_ZORK: - for(;n>0;n--) { - int x= *src++; - if(x&128) x-= 128; - else x = -x; - *samples++ = x << 8; + for (; n > 0; n--) { + int v = *src++; + if (v < 128) + v = 128 - v; + *samples++ = v; } break; case CODEC_ID_PCM_ALAW: case CODEC_ID_PCM_MULAW: for(;n>0;n--) { - *samples++ = s->table[*src++]; + AV_WN16A(samples, s->table[*src++]); + samples += 2; } break; case CODEC_ID_PCM_DVD: - dst_int32_t = data; + { + const uint8_t *src8; + dst_int32_t = (int32_t *)s->frame.data[0]; n /= avctx->channels; switch (avctx->bits_per_coded_sample) { case 20: @@ -437,15 +430,14 @@ src = src8; } break; - default: - av_log(avctx, AV_LOG_ERROR, "PCM DVD unsupported sample depth\n"); - return -1; - break; } - samples = (short *) dst_int32_t; break; + } case CODEC_ID_PCM_LXF: - dst_int32_t = data; + { + int i; + const uint8_t *src8; + dst_int32_t = (int32_t *)s->frame.data[0]; n /= avctx->channels; //unpack and de-planerize for (i = 0; i < n; i++) { @@ -461,14 +453,16 @@ ((src8[2] & 0xF0) << 8) | (src8[4] << 4) | (src8[3] >> 4); } } - src += n * avctx->channels * 5; - samples = (short *) dst_int32_t; break; + } default: return -1; } - *data_size = (uint8_t *)samples - (uint8_t *)data; - return src - buf; + + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + + return buf_size; } #if CONFIG_ENCODERS @@ -496,6 +490,7 @@ .priv_data_size = sizeof(PCMDecode), \ .init = pcm_decode_init, \ .decode = pcm_decode_frame, \ + .capabilities = CODEC_CAP_DR1, \ .sample_fmts = (const enum AVSampleFormat[]){sample_fmt_,AV_SAMPLE_FMT_NONE}, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ } @@ -531,4 +526,4 @@ PCM_CODEC (CODEC_ID_PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian"); PCM_CODEC (CODEC_ID_PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian"); PCM_CODEC (CODEC_ID_PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian"); -PCM_CODEC (CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_S16, pcm_zork, "PCM Zork"); +PCM_DECODER(CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork"); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pcm-mpeg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pcm-mpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pcm-mpeg.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pcm-mpeg.c 2012-01-11 00:34:30.000000000 +0000 @@ -119,17 +119,30 @@ return 0; } -static int pcm_bluray_decode_frame(AVCodecContext *avctx, - void *data, - int *data_size, - AVPacket *avpkt) +typedef struct PCMBRDecode { + AVFrame frame; +} PCMBRDecode; + +static av_cold int pcm_bluray_decode_init(AVCodecContext * avctx) +{ + PCMBRDecode *s = avctx->priv_data; + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + + return 0; +} + +static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *src = avpkt->data; int buf_size = avpkt->size; + PCMBRDecode *s = avctx->priv_data; int num_source_channels, channel, retval; - int sample_size, samples, output_size; - int16_t *dst16 = data; - int32_t *dst32 = data; + int sample_size, samples; + int16_t *dst16; + int32_t *dst32; if (buf_size < 4) { av_log(avctx, AV_LOG_ERROR, "PCM packet too small\n"); @@ -146,15 +159,14 @@ sample_size = (num_source_channels * avctx->bits_per_coded_sample) >> 3; samples = buf_size / sample_size; - output_size = samples * avctx->channels * - (avctx->sample_fmt == AV_SAMPLE_FMT_S32 ? 4 : 2); - if (output_size > *data_size) { - av_log(avctx, AV_LOG_ERROR, - "Insufficient output buffer space (%d bytes, needed %d bytes)\n", - *data_size, output_size); - return -1; + /* get output buffer */ + s->frame.nb_samples = samples; + if ((retval = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return retval; } - *data_size = output_size; + dst16 = (int16_t *)s->frame.data[0]; + dst32 = (int32_t *)s->frame.data[0]; if (samples) { switch (avctx->channel_layout) { @@ -165,7 +177,7 @@ samples *= num_source_channels; if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) { #if HAVE_BIGENDIAN - memcpy(dst16, src, output_size); + memcpy(dst16, src, buf_size); #else do { *dst16++ = bytestream_get_be16(&src); @@ -289,22 +301,24 @@ } } + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + retval = src - avpkt->data; if (avctx->debug & FF_DEBUG_BITSTREAM) av_dlog(avctx, "pcm_bluray_decode_frame: decoded %d -> %d bytes\n", - retval, *data_size); + retval, buf_size); return retval; } AVCodec ff_pcm_bluray_decoder = { - "pcm_bluray", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_PCM_BLURAY, - 0, - NULL, - NULL, - NULL, - pcm_bluray_decode_frame, + .name = "pcm_bluray", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_PCM_BLURAY, + .priv_data_size = sizeof(PCMBRDecode), + .init = pcm_bluray_decode_init, + .decode = pcm_bluray_decode_frame, + .capabilities = CODEC_CAP_DR1, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for Blu-ray media"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pcx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pcx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pcx.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pcx.c 2012-01-11 00:34:30.000000000 +0000 @@ -248,15 +248,13 @@ } AVCodec ff_pcx_decoder = { - "pcx", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PCX, - sizeof(PCXContext), - pcx_init, - NULL, - pcx_end, - pcx_decode_frame, - CODEC_CAP_DR1, - NULL, + .name = "pcx", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PCX, + .priv_data_size = sizeof(PCXContext), + .init = pcx_init, + .close = pcx_end, + .decode = pcx_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pcxenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pcxenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pcxenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pcxenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,10 +20,10 @@ */ /** - * PCX image encoder * @file + * PCX image encoder * @author Daniel Verkamp - * @sa http://www.qzx.com/pc-gpe/pcx.txt + * @see http://www.qzx.com/pc-gpe/pcx.txt */ #include "avcodec.h" @@ -190,13 +190,12 @@ } AVCodec ff_pcx_encoder = { - "pcx", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PCX, - sizeof(PCXContext), - pcx_encode_init, - pcx_encode_frame, - NULL, + .name = "pcx", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PCX, + .priv_data_size = sizeof(PCXContext), + .init = pcx_encode_init, + .encode = pcx_encode_frame, .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_RGB24, PIX_FMT_RGB8, PIX_FMT_BGR8, PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, PIX_FMT_GRAY8, PIX_FMT_PAL8, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pgssubdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pgssubdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pgssubdec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pgssubdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -198,7 +198,7 @@ /* Make sure the bitmap is not too large */ if (avctx->width < width || avctx->height < height) { - av_log(avctx, AV_LOG_ERROR, "Bitmap dimensions larger then video.\n"); + av_log(avctx, AV_LOG_ERROR, "Bitmap dimensions larger than video.\n"); return -1; } @@ -469,13 +469,12 @@ } AVCodec ff_pgssub_decoder = { - "pgssub", - AVMEDIA_TYPE_SUBTITLE, - CODEC_ID_HDMV_PGS_SUBTITLE, - sizeof(PGSSubContext), - init_decoder, - NULL, - close_decoder, - decode, + .name = "pgssub", + .type = AVMEDIA_TYPE_SUBTITLE, + .id = CODEC_ID_HDMV_PGS_SUBTITLE, + .priv_data_size = sizeof(PGSSubContext), + .init = init_decoder, + .close = close_decoder, + .decode = decode, .long_name = NULL_IF_CONFIG_SMALL("HDMV Presentation Graphic Stream subtitles"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pictordec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pictordec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pictordec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pictordec.c 2012-01-11 00:34:30.000000000 +0000 @@ -238,14 +238,12 @@ } AVCodec ff_pictor_decoder = { - "pictor", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PICTOR, - sizeof(PicContext), - NULL, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "pictor", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PICTOR, + .priv_data_size = sizeof(PicContext), + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Pictor/PC Paint"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pngdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pngdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pngdec.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pngdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -657,16 +657,13 @@ } AVCodec ff_png_decoder = { - "png", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PNG, - sizeof(PNGDecContext), - png_dec_init, - NULL, - png_dec_end, - decode_frame, - CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/, - NULL, - .max_lowres = 5, + .name = "png", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PNG, + .priv_data_size = sizeof(PNGDecContext), + .init = png_dec_init, + .close = png_dec_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/, .long_name = NULL_IF_CONFIG_SMALL("PNG image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pngenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pngenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pngenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pngenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -437,13 +437,12 @@ } AVCodec ff_png_encoder = { - "png", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PNG, - sizeof(PNGEncContext), - png_enc_init, - encode_frame, - NULL, //encode_end, + .name = "png", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PNG, + .priv_data_size = sizeof(PNGEncContext), + .init = png_enc_init, + .encode = encode_frame, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_PAL8, PIX_FMT_GRAY8, PIX_FMT_MONOBLACK, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("PNG image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pnmdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pnmdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pnmdec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pnmdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -189,85 +189,75 @@ #if CONFIG_PGM_DECODER AVCodec ff_pgm_decoder = { - "pgm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PGM, - sizeof(PNMContext), - ff_pnm_init, - NULL, - ff_pnm_end, - pnm_decode_frame, - CODEC_CAP_DR1, + .name = "pgm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PGM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .close = ff_pnm_end, + .decode = pnm_decode_frame, + .capabilities = CODEC_CAP_DR1, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_GRAY8, PIX_FMT_GRAY16BE, PIX_FMT_NONE}, - .max_lowres = 5, .long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), }; #endif #if CONFIG_PGMYUV_DECODER AVCodec ff_pgmyuv_decoder = { - "pgmyuv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PGMYUV, - sizeof(PNMContext), - ff_pnm_init, - NULL, - ff_pnm_end, - pnm_decode_frame, - CODEC_CAP_DR1, + .name = "pgmyuv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PGMYUV, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .close = ff_pnm_end, + .decode = pnm_decode_frame, + .capabilities = CODEC_CAP_DR1, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, - .max_lowres = 5, .long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), }; #endif #if CONFIG_PPM_DECODER AVCodec ff_ppm_decoder = { - "ppm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PPM, - sizeof(PNMContext), - ff_pnm_init, - NULL, - ff_pnm_end, - pnm_decode_frame, - CODEC_CAP_DR1, + .name = "ppm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PPM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .close = ff_pnm_end, + .decode = pnm_decode_frame, + .capabilities = CODEC_CAP_DR1, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB48BE, PIX_FMT_NONE}, - .max_lowres = 5, .long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), }; #endif #if CONFIG_PBM_DECODER AVCodec ff_pbm_decoder = { - "pbm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PBM, - sizeof(PNMContext), - ff_pnm_init, - NULL, - ff_pnm_end, - pnm_decode_frame, - CODEC_CAP_DR1, + .name = "pbm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PBM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .close = ff_pnm_end, + .decode = pnm_decode_frame, + .capabilities = CODEC_CAP_DR1, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_MONOWHITE, PIX_FMT_NONE}, - .max_lowres = 5, .long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), }; #endif #if CONFIG_PAM_DECODER AVCodec ff_pam_decoder = { - "pam", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PAM, - sizeof(PNMContext), - ff_pnm_init, - NULL, - ff_pnm_end, - pnm_decode_frame, - CODEC_CAP_DR1, + .name = "pam", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PAM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .close = ff_pnm_end, + .decode = pnm_decode_frame, + .capabilities = CODEC_CAP_DR1, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, PIX_FMT_NONE}, - .max_lowres = 5, .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pnmenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pnmenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pnmenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pnmenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -114,12 +114,12 @@ #if CONFIG_PGM_ENCODER AVCodec ff_pgm_encoder = { - "pgm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PGM, - sizeof(PNMContext), - ff_pnm_init, - pnm_encode_frame, + .name = "pgm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PGM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .encode = pnm_encode_frame, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_GRAY8, PIX_FMT_GRAY16BE, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), }; @@ -127,12 +127,12 @@ #if CONFIG_PGMYUV_ENCODER AVCodec ff_pgmyuv_encoder = { - "pgmyuv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PGMYUV, - sizeof(PNMContext), - ff_pnm_init, - pnm_encode_frame, + .name = "pgmyuv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PGMYUV, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .encode = pnm_encode_frame, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), }; @@ -140,12 +140,12 @@ #if CONFIG_PPM_ENCODER AVCodec ff_ppm_encoder = { - "ppm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PPM, - sizeof(PNMContext), - ff_pnm_init, - pnm_encode_frame, + .name = "ppm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PPM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .encode = pnm_encode_frame, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB48BE, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), }; @@ -153,12 +153,12 @@ #if CONFIG_PBM_ENCODER AVCodec ff_pbm_encoder = { - "pbm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PBM, - sizeof(PNMContext), - ff_pnm_init, - pnm_encode_frame, + .name = "pbm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PBM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .encode = pnm_encode_frame, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_MONOWHITE, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pnm_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pnm_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pnm_parser.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pnm_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -84,9 +84,9 @@ } AVCodecParser ff_pnm_parser = { - { CODEC_ID_PGM, CODEC_ID_PGMYUV, CODEC_ID_PPM, CODEC_ID_PBM, CODEC_ID_PAM}, - sizeof(ParseContext), - NULL, - pnm_parse, - ff_parse_close, + .codec_ids = { CODEC_ID_PGM, CODEC_ID_PGMYUV, CODEC_ID_PPM, + CODEC_ID_PBM, CODEC_ID_PAM }, + .priv_data_size = sizeof(ParseContext), + .parser_parse = pnm_parse, + .parser_close = ff_parse_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/asm.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/asm.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/asm.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/asm.S 2012-01-11 00:34:30.000000000 +0000 @@ -44,10 +44,13 @@ L(\name): .endm -.macro movrel rd, sym +.macro movrel rd, sym, gp ld \rd, \sym@got(r2) .endm +.macro get_got rd +.endm + #else /* ARCH_PPC64 */ #define PTR .int @@ -65,15 +68,25 @@ \name: .endm -.macro movrel rd, sym +.macro movrel rd, sym, gp #if CONFIG_PIC - lwz \rd, \sym@got(r2) + lwz \rd, \sym@got(\gp) #else lis \rd, \sym@ha la \rd, \sym@l(\rd) #endif .endm +.macro get_got rd +#if CONFIG_PIC + bcl 20, 31, .Lgot\@ +.Lgot\@: + mflr \rd + addis \rd, \rd, _GLOBAL_OFFSET_TABLE_ - .Lgot\@@ha + addi \rd, \rd, _GLOBAL_OFFSET_TABLE_ - .Lgot\@@l +#endif +.endm + #endif /* ARCH_PPC64 */ #if HAVE_IBM_ASM diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/dsputil_altivec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/dsputil_altivec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/dsputil_altivec.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/dsputil_altivec.c 2012-01-11 00:34:30.000000000 +0000 @@ -627,16 +627,6 @@ // it's faster than -funroll-loops, but using // -funroll-loops w/ this is bad - 74 cycles again. // all this is on a 7450, tuning for the 7450 -#if 0 - for (i = 0; i < h; i++) { - pixelsv1 = vec_ld(0, pixels); - pixelsv2 = vec_ld(16, pixels); - vec_st(vec_perm(pixelsv1, pixelsv2, perm), - 0, block); - pixels+=line_size; - block +=line_size; - } -#else for (i = 0; i < h; i += 4) { pixelsv1 = vec_ld( 0, pixels); pixelsv2 = vec_ld(15, pixels); @@ -657,7 +647,6 @@ pixels+=line_size_4; block +=line_size_4; } -#endif } /* next one assumes that ((line_size % 16) == 0) */ @@ -1384,7 +1373,7 @@ void dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx) { - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; c->pix_abs[0][1] = sad16_x2_altivec; c->pix_abs[0][2] = sad16_y2_altivec; @@ -1398,11 +1387,10 @@ c->sse[0]= sse16_altivec; c->pix_sum = pix_sum_altivec; c->diff_pixels = diff_pixels_altivec; - c->get_pixels = get_pixels_altivec; - if (!high_bit_depth) - c->clear_block = clear_block_altivec; c->add_bytes= add_bytes_altivec; if (!high_bit_depth) { + c->get_pixels = get_pixels_altivec; + c->clear_block = clear_block_altivec; c->put_pixels_tab[0][0] = put_pixels16_altivec; /* the two functions do the same thing, so use the same code */ c->put_no_rnd_pixels_tab[0][0] = put_pixels16_altivec; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/dsputil_ppc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/dsputil_ppc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/dsputil_ppc.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/dsputil_ppc.c 2012-01-11 00:34:30.000000000 +0000 @@ -48,7 +48,6 @@ { register int misal = ((unsigned long)blocks & 0x00000010); register int i = 0; -#if 1 if (misal) { ((unsigned long*)blocks)[0] = 0L; ((unsigned long*)blocks)[1] = 0L; @@ -66,9 +65,6 @@ ((unsigned long*)blocks)[191] = 0L; i += 16; } -#else - memset(blocks, 0, sizeof(DCTELEM)*6*64); -#endif } /* same as above, when dcbzl clear a whole 128B cache line @@ -78,7 +74,6 @@ { register int misal = ((unsigned long)blocks & 0x0000007f); register int i = 0; -#if 1 if (misal) { // we could probably also optimize this case, // but there's not much point as the machines @@ -89,9 +84,6 @@ for ( ; i < sizeof(DCTELEM)*6*64 ; i += 128) { __asm__ volatile("dcbzl %0,%1" : : "b" (blocks), "r" (i) : "memory"); } -#else - memset(blocks, 0, sizeof(DCTELEM)*6*64); -#endif } #else static void clear_blocks_dcbz128_ppc(DCTELEM *blocks) @@ -153,7 +145,7 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) { - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; // Common optimizations whether AltiVec is available or not c->prefetch = prefetch_ppc; @@ -180,13 +172,14 @@ c->gmc1 = gmc1_altivec; #if CONFIG_ENCODERS - if (avctx->dct_algo == FF_DCT_AUTO || - avctx->dct_algo == FF_DCT_ALTIVEC) { + if (avctx->bits_per_raw_sample <= 8 && + (avctx->dct_algo == FF_DCT_AUTO || + avctx->dct_algo == FF_DCT_ALTIVEC)) { c->fdct = fdct_altivec; } #endif //CONFIG_ENCODERS - if (avctx->lowres==0) { + if (avctx->lowres == 0 && avctx->bits_per_raw_sample <= 8) { if ((avctx->idct_algo == FF_IDCT_AUTO) || (avctx->idct_algo == FF_IDCT_ALTIVEC)) { c->idct_put = idct_put_altivec; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/fdct_altivec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/fdct_altivec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/fdct_altivec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/fdct_altivec.c 2012-01-11 00:34:30.000000000 +0000 @@ -265,7 +265,6 @@ * conversion to vector float. The following code section takes advantage * of this. */ -#if 1 /* fdct rows {{{ */ x0 = ((vector float)vec_add(vs16(b00), vs16(b70))); x7 = ((vector float)vec_sub(vs16(b00), vs16(b70))); @@ -389,29 +388,6 @@ b31 = vec_add(b31, x2); b11 = vec_add(b11, x3); /* }}} */ -#else - /* convert to float {{{ */ -#define CTF(n) \ - vs32(b##n##1) = vec_unpackl(vs16(b##n##0)); \ - vs32(b##n##0) = vec_unpackh(vs16(b##n##0)); \ - b##n##1 = vec_ctf(vs32(b##n##1), 0); \ - b##n##0 = vec_ctf(vs32(b##n##0), 0); \ - - CTF(0); - CTF(1); - CTF(2); - CTF(3); - CTF(4); - CTF(5); - CTF(6); - CTF(7); - -#undef CTF - /* }}} */ - - FDCTROW(b00, b10, b20, b30, b40, b50, b60, b70); - FDCTROW(b01, b11, b21, b31, b41, b51, b61, b71); -#endif /* 8x8 matrix transpose (vector float[8][2]) {{{ */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/fft_altivec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/fft_altivec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/fft_altivec.c 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/fft_altivec.c 2012-01-11 00:34:30.000000000 +0000 @@ -141,7 +141,9 @@ { #if HAVE_GNU_AS s->fft_calc = ff_fft_calc_interleave_altivec; - s->imdct_calc = ff_imdct_calc_altivec; - s->imdct_half = ff_imdct_half_altivec; + if (s->mdct_bits >= 5) { + s->imdct_calc = ff_imdct_calc_altivec; + s->imdct_half = ff_imdct_half_altivec; + } #endif } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/fft_altivec_s.S mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/fft_altivec_s.S --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/fft_altivec_s.S 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/fft_altivec_s.S 2012-01-11 00:34:30.000000000 +0000 @@ -353,6 +353,7 @@ mflr r0 stp r0, 2*PS(r1) stpu r1, -(160+16*PS)(r1) + get_got r11 addi r6, r1, 16*PS stvm r6, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29 mfvrsave r0 @@ -360,14 +361,14 @@ li r6, 0xfffffffc mtvrsave r6 - movrel r6, fft_data + movrel r6, fft_data, r11 lvm r6, v14, v15, v16, v17, v18, v19, v20, v21 lvm r6, v22, v23, v24, v25, v26, v27, v28, v29 li r9, 16 - movrel r12, X(ff_cos_tabs) + movrel r12, X(ff_cos_tabs), r11 - movrel r6, fft_dispatch_tab\interleave\()_altivec + movrel r6, fft_dispatch_tab\interleave\()_altivec, r11 lwz r3, 0(r3) subi r3, r3, 2 slwi r3, r3, 2+ARCH_PPC64 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/h264_altivec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/h264_altivec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/h264_altivec.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/h264_altivec.c 2012-01-11 00:34:30.000000000 +0000 @@ -616,8 +616,8 @@ *(dst_int+15*int_dst_stride) = *(src_int + 15); } -/** \brief performs a 6x16 transpose of data in src, and stores it to dst - \todo FIXME: see if we can't spare some vec_lvsl() by them factorizing +/** @brief performs a 6x16 transpose of data in src, and stores it to dst + @todo FIXME: see if we can't spare some vec_lvsl() by them factorizing out of unaligned_load() */ #define readAndTranspose16x6(src, src_stride, r8, r9, r10, r11, r12, r13) {\ register vec_u8 r0 = unaligned_load(0, src); \ @@ -843,7 +843,8 @@ } static av_always_inline -void weight_h264_WxH_altivec(uint8_t *block, int stride, int log2_denom, int weight, int offset, int w, int h) +void weight_h264_W_altivec(uint8_t *block, int stride, int height, + int log2_denom, int weight, int offset, int w) { int y, aligned; vec_u8 vblock; @@ -864,7 +865,7 @@ voffset = vec_splat(vtemp, 5); aligned = !((unsigned long)block & 0xf); - for (y=0; ycodec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) { if (!high_bit_depth) { @@ -999,12 +999,13 @@ } } -void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth) +void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) { if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) { if (bit_depth == 8) { c->h264_idct_add = ff_h264_idct_add_altivec; - c->h264_idct_add8 = ff_h264_idct_add8_altivec; + if (chroma_format_idc == 1) + c->h264_idct_add8 = ff_h264_idct_add8_altivec; c->h264_idct_add16 = ff_h264_idct_add16_altivec; c->h264_idct_add16intra = ff_h264_idct_add16intra_altivec; c->h264_idct_dc_add= h264_idct_dc_add_altivec; @@ -1014,16 +1015,10 @@ c->h264_v_loop_filter_luma= h264_v_loop_filter_luma_altivec; c->h264_h_loop_filter_luma= h264_h_loop_filter_luma_altivec; - c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels16x16_altivec; - c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels16x8_altivec; - c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels8x16_altivec; - c->weight_h264_pixels_tab[3] = ff_weight_h264_pixels8x8_altivec; - c->weight_h264_pixels_tab[4] = ff_weight_h264_pixels8x4_altivec; - c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels16x16_altivec; - c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels16x8_altivec; - c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels8x16_altivec; - c->biweight_h264_pixels_tab[3] = ff_biweight_h264_pixels8x8_altivec; - c->biweight_h264_pixels_tab[4] = ff_biweight_h264_pixels8x4_altivec; + c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels16_altivec; + c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels8_altivec; + c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels16_altivec; + c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels8_altivec; } } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/mpegvideo_altivec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/mpegvideo_altivec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/mpegvideo_altivec.c 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/mpegvideo_altivec.c 2012-01-11 00:34:30.000000000 +0000 @@ -268,10 +268,10 @@ vec_ste(baseVector, 0, &oldBaseValue); qmat = (vector signed int*)s->q_intra_matrix[qscale]; - biasAddr = &(s->intra_quant_bias); + biasAddr = &s->intra_quant_bias; } else { qmat = (vector signed int*)s->q_inter_matrix[qscale]; - biasAddr = &(s->inter_quant_bias); + biasAddr = &s->inter_quant_bias; } // Load the bias vector (We add 0.5 to the bias so that we're @@ -361,8 +361,8 @@ vector signed int max_q_int, min_q_int; vector signed short max_q, min_q; - LOAD4(max_q_int, &(s->max_qcoeff)); - LOAD4(min_q_int, &(s->min_qcoeff)); + LOAD4(max_q_int, &s->max_qcoeff); + LOAD4(min_q_int, &s->min_qcoeff); max_q = vec_pack(max_q_int, max_q_int); min_q = vec_pack(min_q_int, min_q_int); @@ -515,21 +515,6 @@ qaddv = vec_splat((vec_s16)vec_lde(0, &qadd8), 0); nqaddv = vec_sub(vczero, qaddv); -#if 0 // block *is* 16 bytes-aligned, it seems. - // first make sure block[j] is 16 bytes-aligned - for(j = 0; (j <= nCoeffs) && ((((unsigned long)block) + (j << 1)) & 0x0000000F) ; j++) { - level = block[j]; - if (level) { - if (level < 0) { - level = level * qmul - qadd; - } else { - level = level * qmul + qadd; - } - block[j] = level; - } - } -#endif - // vectorize all the 16 bytes-aligned blocks // of 8 elements for(; (j + 7) <= nCoeffs ; j+=8) { @@ -573,15 +558,6 @@ { if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) return; - if (s->avctx->lowres==0) { - if ((s->avctx->idct_algo == FF_IDCT_AUTO) || - (s->avctx->idct_algo == FF_IDCT_ALTIVEC)) { - s->dsp.idct_put = idct_put_altivec; - s->dsp.idct_add = idct_add_altivec; - s->dsp.idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; - } - } - // Test to make sure that the dct required alignments are met. if ((((long)(s->q_intra_matrix) & 0x0f) != 0) || (((long)(s->q_inter_matrix) & 0x0f) != 0)) { @@ -599,9 +575,6 @@ if ((s->avctx->dct_algo == FF_DCT_AUTO) || (s->avctx->dct_algo == FF_DCT_ALTIVEC)) { -#if 0 /* seems to cause trouble under some circumstances */ - s->dct_quantize = dct_quantize_altivec; -#endif s->dct_unquantize_h263_intra = dct_unquantize_h263_altivec; s->dct_unquantize_h263_inter = dct_unquantize_h263_altivec; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/util_altivec.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/util_altivec.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ppc/util_altivec.h 2011-03-20 09:30:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ppc/util_altivec.h 2012-01-11 00:34:30.000000000 +0000 @@ -94,7 +94,7 @@ } while (0) -/** \brief loads unaligned vector \a *src with offset \a offset +/** @brief loads unaligned vector @a *src with offset @a offset and returns it */ static inline vector unsigned char unaligned_load(int offset, uint8_t *src) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/proresdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/proresdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/proresdec.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/proresdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,706 @@ +/* + * Apple ProRes compatible decoder + * + * Copyright (c) 2010-2011 Maxim Poliakovski + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * This is a decoder for Apple ProRes 422 SD/HQ/LT/Proxy and ProRes 4444. + * It is used for storing and editing high definition video data in Apple's Final Cut Pro. + * + * @see http://wiki.multimedia.cx/index.php?title=Apple_ProRes + */ + +#define LONG_BITSTREAM_READER // some ProRes vlc codes require up to 28 bits to be read at once + +#include + +#include "libavutil/intmath.h" +#include "avcodec.h" +#include "proresdsp.h" +#include "get_bits.h" + +typedef struct { + const uint8_t *index; ///< pointers to the data of this slice + int slice_num; + int x_pos, y_pos; + int slice_width; + DECLARE_ALIGNED(16, DCTELEM, blocks[8 * 4 * 64]); +} ProresThreadData; + +typedef struct { + ProresDSPContext dsp; + AVFrame picture; + ScanTable scantable; + int scantable_type; ///< -1 = uninitialized, 0 = progressive, 1/2 = interlaced + + int frame_type; ///< 0 = progressive, 1 = top-field first, 2 = bottom-field first + int pic_format; ///< 2 = 422, 3 = 444 + uint8_t qmat_luma[64]; ///< dequantization matrix for luma + uint8_t qmat_chroma[64]; ///< dequantization matrix for chroma + int qmat_changed; ///< 1 - global quantization matrices changed + int prev_slice_sf; ///< scalefactor of the previous decoded slice + DECLARE_ALIGNED(16, int16_t, qmat_luma_scaled[64]); + DECLARE_ALIGNED(16, int16_t, qmat_chroma_scaled[64]); + int total_slices; ///< total number of slices in a picture + ProresThreadData *slice_data; + int pic_num; + int chroma_factor; + int mb_chroma_factor; + int num_chroma_blocks; ///< number of chrominance blocks in a macroblock + int num_x_slices; + int num_y_slices; + int slice_width_factor; + int slice_height_factor; + int num_x_mbs; + int num_y_mbs; + int alpha_info; +} ProresContext; + + +static const uint8_t progressive_scan[64] = { + 0, 1, 8, 9, 2, 3, 10, 11, + 16, 17, 24, 25, 18, 19, 26, 27, + 4, 5, 12, 20, 13, 6, 7, 14, + 21, 28, 29, 22, 15, 23, 30, 31, + 32, 33, 40, 48, 41, 34, 35, 42, + 49, 56, 57, 50, 43, 36, 37, 44, + 51, 58, 59, 52, 45, 38, 39, 46, + 53, 60, 61, 54, 47, 55, 62, 63 +}; + +static const uint8_t interlaced_scan[64] = { + 0, 8, 1, 9, 16, 24, 17, 25, + 2, 10, 3, 11, 18, 26, 19, 27, + 32, 40, 33, 34, 41, 48, 56, 49, + 42, 35, 43, 50, 57, 58, 51, 59, + 4, 12, 5, 6, 13, 20, 28, 21, + 14, 7, 15, 22, 29, 36, 44, 37, + 30, 23, 31, 38, 45, 52, 60, 53, + 46, 39, 47, 54, 61, 62, 55, 63 +}; + + +static av_cold int decode_init(AVCodecContext *avctx) +{ + ProresContext *ctx = avctx->priv_data; + + ctx->total_slices = 0; + ctx->slice_data = NULL; + + avctx->bits_per_raw_sample = PRORES_BITS_PER_SAMPLE; + ff_proresdsp_init(&ctx->dsp); + + avctx->coded_frame = &ctx->picture; + avcodec_get_frame_defaults(&ctx->picture); + ctx->picture.type = AV_PICTURE_TYPE_I; + ctx->picture.key_frame = 1; + + ctx->scantable_type = -1; // set scantable type to uninitialized + memset(ctx->qmat_luma, 4, 64); + memset(ctx->qmat_chroma, 4, 64); + ctx->prev_slice_sf = 0; + + return 0; +} + + +static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, + const int data_size, AVCodecContext *avctx) +{ + int hdr_size, version, width, height, flags; + const uint8_t *ptr; + + hdr_size = AV_RB16(buf); + if (hdr_size > data_size) { + av_log(avctx, AV_LOG_ERROR, "frame data too small\n"); + return AVERROR_INVALIDDATA; + } + + version = AV_RB16(buf + 2); + if (version >= 2) { + av_log(avctx, AV_LOG_ERROR, + "unsupported header version: %d\n", version); + return AVERROR_INVALIDDATA; + } + + width = AV_RB16(buf + 8); + height = AV_RB16(buf + 10); + if (width != avctx->width || height != avctx->height) { + av_log(avctx, AV_LOG_ERROR, + "picture dimension changed: old: %d x %d, new: %d x %d\n", + avctx->width, avctx->height, width, height); + return AVERROR_INVALIDDATA; + } + + ctx->frame_type = (buf[12] >> 2) & 3; + if (ctx->frame_type > 2) { + av_log(avctx, AV_LOG_ERROR, + "unsupported frame type: %d\n", ctx->frame_type); + return AVERROR_INVALIDDATA; + } + + ctx->chroma_factor = (buf[12] >> 6) & 3; + ctx->mb_chroma_factor = ctx->chroma_factor + 2; + ctx->num_chroma_blocks = (1 << ctx->chroma_factor) >> 1; + switch (ctx->chroma_factor) { + case 2: + avctx->pix_fmt = PIX_FMT_YUV422P10; + break; + case 3: + avctx->pix_fmt = PIX_FMT_YUV444P10; + break; + default: + av_log(avctx, AV_LOG_ERROR, + "unsupported picture format: %d\n", ctx->pic_format); + return AVERROR_INVALIDDATA; + } + + if (ctx->scantable_type != ctx->frame_type) { + if (!ctx->frame_type) + ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, + progressive_scan); + else + ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, + interlaced_scan); + ctx->scantable_type = ctx->frame_type; + } + + if (ctx->frame_type) { /* if interlaced */ + ctx->picture.interlaced_frame = 1; + ctx->picture.top_field_first = ctx->frame_type & 1; + } + + ctx->alpha_info = buf[17] & 0xf; + if (ctx->alpha_info) + av_log_missing_feature(avctx, "alpha channel", 0); + + ctx->qmat_changed = 0; + ptr = buf + 20; + flags = buf[19]; + if (flags & 2) { + if (ptr - buf > hdr_size - 64) { + av_log(avctx, AV_LOG_ERROR, "header data too small\n"); + return AVERROR_INVALIDDATA; + } + if (memcmp(ctx->qmat_luma, ptr, 64)) { + memcpy(ctx->qmat_luma, ptr, 64); + ctx->qmat_changed = 1; + } + ptr += 64; + } else { + memset(ctx->qmat_luma, 4, 64); + ctx->qmat_changed = 1; + } + + if (flags & 1) { + if (ptr - buf > hdr_size - 64) { + av_log(avctx, AV_LOG_ERROR, "header data too small\n"); + return -1; + } + if (memcmp(ctx->qmat_chroma, ptr, 64)) { + memcpy(ctx->qmat_chroma, ptr, 64); + ctx->qmat_changed = 1; + } + } else { + memset(ctx->qmat_chroma, 4, 64); + ctx->qmat_changed = 1; + } + + return hdr_size; +} + + +static int decode_picture_header(ProresContext *ctx, const uint8_t *buf, + const int data_size, AVCodecContext *avctx) +{ + int i, hdr_size, pic_data_size, num_slices; + int slice_width_factor, slice_height_factor; + int remainder, num_x_slices; + const uint8_t *data_ptr, *index_ptr; + + hdr_size = data_size > 0 ? buf[0] >> 3 : 0; + if (hdr_size < 8 || hdr_size > data_size) { + av_log(avctx, AV_LOG_ERROR, "picture header too small\n"); + return AVERROR_INVALIDDATA; + } + + pic_data_size = AV_RB32(buf + 1); + if (pic_data_size > data_size) { + av_log(avctx, AV_LOG_ERROR, "picture data too small\n"); + return AVERROR_INVALIDDATA; + } + + slice_width_factor = buf[7] >> 4; + slice_height_factor = buf[7] & 0xF; + if (slice_width_factor > 3 || slice_height_factor) { + av_log(avctx, AV_LOG_ERROR, + "unsupported slice dimension: %d x %d\n", + 1 << slice_width_factor, 1 << slice_height_factor); + return AVERROR_INVALIDDATA; + } + + ctx->slice_width_factor = slice_width_factor; + ctx->slice_height_factor = slice_height_factor; + + ctx->num_x_mbs = (avctx->width + 15) >> 4; + ctx->num_y_mbs = (avctx->height + + (1 << (4 + ctx->picture.interlaced_frame)) - 1) >> + (4 + ctx->picture.interlaced_frame); + + remainder = ctx->num_x_mbs & ((1 << slice_width_factor) - 1); + num_x_slices = (ctx->num_x_mbs >> slice_width_factor) + (remainder & 1) + + ((remainder >> 1) & 1) + ((remainder >> 2) & 1); + + num_slices = num_x_slices * ctx->num_y_mbs; + if (num_slices != AV_RB16(buf + 5)) { + av_log(avctx, AV_LOG_ERROR, "invalid number of slices\n"); + return AVERROR_INVALIDDATA; + } + + if (ctx->total_slices != num_slices) { + av_freep(&ctx->slice_data); + ctx->slice_data = av_malloc((num_slices + 1) * sizeof(ctx->slice_data[0])); + if (!ctx->slice_data) + return AVERROR(ENOMEM); + ctx->total_slices = num_slices; + } + + if (hdr_size + num_slices * 2 > data_size) { + av_log(avctx, AV_LOG_ERROR, "slice table too small\n"); + return AVERROR_INVALIDDATA; + } + + /* parse slice table allowing quick access to the slice data */ + index_ptr = buf + hdr_size; + data_ptr = index_ptr + num_slices * 2; + + for (i = 0; i < num_slices; i++) { + ctx->slice_data[i].index = data_ptr; + data_ptr += AV_RB16(index_ptr + i * 2); + } + ctx->slice_data[i].index = data_ptr; + + if (data_ptr > buf + data_size) { + av_log(avctx, AV_LOG_ERROR, "out of slice data\n"); + return -1; + } + + return pic_data_size; +} + + +/** + * Read an unsigned rice/exp golomb codeword. + */ +static inline int decode_vlc_codeword(GetBitContext *gb, uint8_t codebook) +{ + unsigned int rice_order, exp_order, switch_bits; + unsigned int buf, code; + int log, prefix_len, len; + + OPEN_READER(re, gb); + UPDATE_CACHE(re, gb); + buf = GET_CACHE(re, gb); + + /* number of prefix bits to switch between Rice and expGolomb */ + switch_bits = (codebook & 3) + 1; + rice_order = codebook >> 5; /* rice code order */ + exp_order = (codebook >> 2) & 7; /* exp golomb code order */ + + log = 31 - av_log2(buf); /* count prefix bits (zeroes) */ + + if (log < switch_bits) { /* ok, we got a rice code */ + if (!rice_order) { + /* shortcut for faster decoding of rice codes without remainder */ + code = log; + LAST_SKIP_BITS(re, gb, log + 1); + } else { + prefix_len = log + 1; + code = (log << rice_order) + NEG_USR32(buf << prefix_len, rice_order); + LAST_SKIP_BITS(re, gb, prefix_len + rice_order); + } + } else { /* otherwise we got a exp golomb code */ + len = (log << 1) - switch_bits + exp_order + 1; + code = NEG_USR32(buf, len) - (1 << exp_order) + (switch_bits << rice_order); + LAST_SKIP_BITS(re, gb, len); + } + + CLOSE_READER(re, gb); + + return code; +} + +#define LSB2SIGN(x) (-((x) & 1)) +#define TOSIGNED(x) (((x) >> 1) ^ LSB2SIGN(x)) + +#define FIRST_DC_CB 0xB8 // rice_order = 5, exp_golomb_order = 6, switch_bits = 0 + +static uint8_t dc_codebook[4] = { + 0x04, // rice_order = 0, exp_golomb_order = 1, switch_bits = 0 + 0x28, // rice_order = 1, exp_golomb_order = 2, switch_bits = 0 + 0x4D, // rice_order = 2, exp_golomb_order = 3, switch_bits = 1 + 0x70 // rice_order = 3, exp_golomb_order = 4, switch_bits = 0 +}; + + +/** + * Decode DC coefficients for all blocks in a slice. + */ +static inline void decode_dc_coeffs(GetBitContext *gb, DCTELEM *out, + int nblocks) +{ + DCTELEM prev_dc; + int i, sign; + int16_t delta; + unsigned int code; + + code = decode_vlc_codeword(gb, FIRST_DC_CB); + out[0] = prev_dc = TOSIGNED(code); + + out += 64; /* move to the DC coeff of the next block */ + delta = 3; + + for (i = 1; i < nblocks; i++, out += 64) { + code = decode_vlc_codeword(gb, dc_codebook[FFMIN(FFABS(delta), 3)]); + + sign = -(((delta >> 15) & 1) ^ (code & 1)); + delta = (((code + 1) >> 1) ^ sign) - sign; + prev_dc += delta; + out[0] = prev_dc; + } +} + + +static uint8_t ac_codebook[7] = { + 0x04, // rice_order = 0, exp_golomb_order = 1, switch_bits = 0 + 0x28, // rice_order = 1, exp_golomb_order = 2, switch_bits = 0 + 0x4C, // rice_order = 2, exp_golomb_order = 3, switch_bits = 0 + 0x05, // rice_order = 0, exp_golomb_order = 1, switch_bits = 1 + 0x29, // rice_order = 1, exp_golomb_order = 2, switch_bits = 1 + 0x06, // rice_order = 0, exp_golomb_order = 1, switch_bits = 2 + 0x0A, // rice_order = 0, exp_golomb_order = 2, switch_bits = 2 +}; + +/** + * Lookup tables for adaptive switching between codebooks + * according with previous run/level value. + */ +static uint8_t run_to_cb_index[16] = + { 5, 5, 3, 3, 0, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 2 }; + +static uint8_t lev_to_cb_index[10] = { 0, 6, 3, 5, 0, 1, 1, 1, 1, 2 }; + + +/** + * Decode AC coefficients for all blocks in a slice. + */ +static inline void decode_ac_coeffs(GetBitContext *gb, DCTELEM *out, + int blocks_per_slice, + int plane_size_factor, + const uint8_t *scan) +{ + int pos, block_mask, run, level, sign, run_cb_index, lev_cb_index; + int max_coeffs, bits_left; + + /* set initial prediction values */ + run = 4; + level = 2; + + max_coeffs = blocks_per_slice << 6; + block_mask = blocks_per_slice - 1; + + for (pos = blocks_per_slice - 1; pos < max_coeffs;) { + run_cb_index = run_to_cb_index[FFMIN(run, 15)]; + lev_cb_index = lev_to_cb_index[FFMIN(level, 9)]; + + bits_left = get_bits_left(gb); + if (bits_left <= 0 || (bits_left <= 8 && !show_bits(gb, bits_left))) + return; + + run = decode_vlc_codeword(gb, ac_codebook[run_cb_index]); + + bits_left = get_bits_left(gb); + if (bits_left <= 0 || (bits_left <= 8 && !show_bits(gb, bits_left))) + return; + + level = decode_vlc_codeword(gb, ac_codebook[lev_cb_index]) + 1; + + pos += run + 1; + if (pos >= max_coeffs) + break; + + sign = get_sbits(gb, 1); + out[((pos & block_mask) << 6) + scan[pos >> plane_size_factor]] = + (level ^ sign) - sign; + } +} + + +/** + * Decode a slice plane (luma or chroma). + */ +static void decode_slice_plane(ProresContext *ctx, ProresThreadData *td, + const uint8_t *buf, + int data_size, uint16_t *out_ptr, + int linesize, int mbs_per_slice, + int blocks_per_mb, int plane_size_factor, + const int16_t *qmat) +{ + GetBitContext gb; + DCTELEM *block_ptr; + int mb_num, blocks_per_slice; + + blocks_per_slice = mbs_per_slice * blocks_per_mb; + + memset(td->blocks, 0, 8 * 4 * 64 * sizeof(*td->blocks)); + + init_get_bits(&gb, buf, data_size << 3); + + decode_dc_coeffs(&gb, td->blocks, blocks_per_slice); + + decode_ac_coeffs(&gb, td->blocks, blocks_per_slice, + plane_size_factor, ctx->scantable.permutated); + + /* inverse quantization, inverse transform and output */ + block_ptr = td->blocks; + + for (mb_num = 0; mb_num < mbs_per_slice; mb_num++, out_ptr += blocks_per_mb * 4) { + ctx->dsp.idct_put(out_ptr, linesize, block_ptr, qmat); + block_ptr += 64; + if (blocks_per_mb > 2) { + ctx->dsp.idct_put(out_ptr + 8, linesize, block_ptr, qmat); + block_ptr += 64; + } + ctx->dsp.idct_put(out_ptr + linesize * 4, linesize, block_ptr, qmat); + block_ptr += 64; + if (blocks_per_mb > 2) { + ctx->dsp.idct_put(out_ptr + linesize * 4 + 8, linesize, block_ptr, qmat); + block_ptr += 64; + } + } +} + + +static int decode_slice(AVCodecContext *avctx, void *tdata) +{ + ProresThreadData *td = tdata; + ProresContext *ctx = avctx->priv_data; + int mb_x_pos = td->x_pos; + int mb_y_pos = td->y_pos; + int pic_num = ctx->pic_num; + int slice_num = td->slice_num; + int mbs_per_slice = td->slice_width; + const uint8_t *buf; + uint8_t *y_data, *u_data, *v_data; + AVFrame *pic = avctx->coded_frame; + int i, sf, slice_width_factor; + int slice_data_size, hdr_size, y_data_size, u_data_size, v_data_size; + int y_linesize, u_linesize, v_linesize; + + buf = ctx->slice_data[slice_num].index; + slice_data_size = ctx->slice_data[slice_num + 1].index - buf; + + slice_width_factor = av_log2(mbs_per_slice); + + y_data = pic->data[0]; + u_data = pic->data[1]; + v_data = pic->data[2]; + y_linesize = pic->linesize[0]; + u_linesize = pic->linesize[1]; + v_linesize = pic->linesize[2]; + + if (pic->interlaced_frame) { + if (!(pic_num ^ pic->top_field_first)) { + y_data += y_linesize; + u_data += u_linesize; + v_data += v_linesize; + } + y_linesize <<= 1; + u_linesize <<= 1; + v_linesize <<= 1; + } + + if (slice_data_size < 6) { + av_log(avctx, AV_LOG_ERROR, "slice data too small\n"); + return AVERROR_INVALIDDATA; + } + + /* parse slice header */ + hdr_size = buf[0] >> 3; + y_data_size = AV_RB16(buf + 2); + u_data_size = AV_RB16(buf + 4); + v_data_size = hdr_size > 7 ? AV_RB16(buf + 6) : + slice_data_size - y_data_size - u_data_size - hdr_size; + + if (hdr_size + y_data_size + u_data_size + v_data_size > slice_data_size || + v_data_size < 0 || hdr_size < 6) { + av_log(avctx, AV_LOG_ERROR, "invalid data size\n"); + return AVERROR_INVALIDDATA; + } + + sf = av_clip(buf[1], 1, 224); + sf = sf > 128 ? (sf - 96) << 2 : sf; + + /* scale quantization matrixes according with slice's scale factor */ + /* TODO: this can be SIMD-optimized a lot */ + if (ctx->qmat_changed || sf != ctx->prev_slice_sf) { + ctx->prev_slice_sf = sf; + for (i = 0; i < 64; i++) { + ctx->qmat_luma_scaled[ctx->dsp.idct_permutation[i]] = ctx->qmat_luma[i] * sf; + ctx->qmat_chroma_scaled[ctx->dsp.idct_permutation[i]] = ctx->qmat_chroma[i] * sf; + } + } + + /* decode luma plane */ + decode_slice_plane(ctx, td, buf + hdr_size, y_data_size, + (uint16_t*) (y_data + (mb_y_pos << 4) * y_linesize + + (mb_x_pos << 5)), y_linesize, + mbs_per_slice, 4, slice_width_factor + 2, + ctx->qmat_luma_scaled); + + /* decode U chroma plane */ + decode_slice_plane(ctx, td, buf + hdr_size + y_data_size, u_data_size, + (uint16_t*) (u_data + (mb_y_pos << 4) * u_linesize + + (mb_x_pos << ctx->mb_chroma_factor)), + u_linesize, mbs_per_slice, ctx->num_chroma_blocks, + slice_width_factor + ctx->chroma_factor - 1, + ctx->qmat_chroma_scaled); + + /* decode V chroma plane */ + decode_slice_plane(ctx, td, buf + hdr_size + y_data_size + u_data_size, + v_data_size, + (uint16_t*) (v_data + (mb_y_pos << 4) * v_linesize + + (mb_x_pos << ctx->mb_chroma_factor)), + v_linesize, mbs_per_slice, ctx->num_chroma_blocks, + slice_width_factor + ctx->chroma_factor - 1, + ctx->qmat_chroma_scaled); + + return 0; +} + + +static int decode_picture(ProresContext *ctx, int pic_num, + AVCodecContext *avctx) +{ + int slice_num, slice_width, x_pos, y_pos; + + slice_num = 0; + + ctx->pic_num = pic_num; + for (y_pos = 0; y_pos < ctx->num_y_mbs; y_pos++) { + slice_width = 1 << ctx->slice_width_factor; + + for (x_pos = 0; x_pos < ctx->num_x_mbs && slice_width; + x_pos += slice_width) { + while (ctx->num_x_mbs - x_pos < slice_width) + slice_width >>= 1; + + ctx->slice_data[slice_num].slice_num = slice_num; + ctx->slice_data[slice_num].x_pos = x_pos; + ctx->slice_data[slice_num].y_pos = y_pos; + ctx->slice_data[slice_num].slice_width = slice_width; + + slice_num++; + } + } + + return avctx->execute(avctx, decode_slice, + ctx->slice_data, NULL, slice_num, + sizeof(ctx->slice_data[0])); +} + + +#define FRAME_ID MKBETAG('i', 'c', 'p', 'f') +#define MOVE_DATA_PTR(nbytes) buf += (nbytes); buf_size -= (nbytes) + +static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, + AVPacket *avpkt) +{ + ProresContext *ctx = avctx->priv_data; + AVFrame *picture = avctx->coded_frame; + const uint8_t *buf = avpkt->data; + int buf_size = avpkt->size; + int frame_hdr_size, pic_num, pic_data_size; + + /* check frame atom container */ + if (buf_size < 28 || buf_size < AV_RB32(buf) || + AV_RB32(buf + 4) != FRAME_ID) { + av_log(avctx, AV_LOG_ERROR, "invalid frame\n"); + return AVERROR_INVALIDDATA; + } + + MOVE_DATA_PTR(8); + + frame_hdr_size = decode_frame_header(ctx, buf, buf_size, avctx); + if (frame_hdr_size < 0) + return AVERROR_INVALIDDATA; + + MOVE_DATA_PTR(frame_hdr_size); + + if (picture->data[0]) + avctx->release_buffer(avctx, picture); + + picture->reference = 0; + if (avctx->get_buffer(avctx, picture) < 0) + return -1; + + for (pic_num = 0; ctx->picture.interlaced_frame - pic_num + 1; pic_num++) { + pic_data_size = decode_picture_header(ctx, buf, buf_size, avctx); + if (pic_data_size < 0) + return AVERROR_INVALIDDATA; + + if (decode_picture(ctx, pic_num, avctx)) + return -1; + + MOVE_DATA_PTR(pic_data_size); + } + + *data_size = sizeof(AVPicture); + *(AVFrame*) data = *avctx->coded_frame; + + return avpkt->size; +} + + +static av_cold int decode_close(AVCodecContext *avctx) +{ + ProresContext *ctx = avctx->priv_data; + + if (ctx->picture.data[0]) + avctx->release_buffer(avctx, &ctx->picture); + + av_freep(&ctx->slice_data); + + return 0; +} + + +AVCodec ff_prores_decoder = { + .name = "prores", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PRORES, + .priv_data_size = sizeof(ProresContext), + .init = decode_init, + .close = decode_close, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_SLICE_THREADS, + .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)") +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/proresdsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/proresdsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/proresdsp.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/proresdsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Apple ProRes compatible decoder + * + * Copyright (c) 2010-2011 Maxim Poliakovski + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "proresdsp.h" +#include "simple_idct.h" + +#define BIAS (1 << (PRORES_BITS_PER_SAMPLE - 1)) ///< bias value for converting signed pixels into unsigned ones +#define CLIP_MIN (1 << (PRORES_BITS_PER_SAMPLE - 8)) ///< minimum value for clipping resulting pixels +#define CLIP_MAX (1 << PRORES_BITS_PER_SAMPLE) - CLIP_MIN - 1 ///< maximum value for clipping resulting pixels + +#define CLIP_AND_BIAS(x) (av_clip((x) + BIAS, CLIP_MIN, CLIP_MAX)) + +/** + * Add bias value, clamp and output pixels of a slice + */ +static void put_pixels(uint16_t *dst, int stride, const DCTELEM *in) +{ + int x, y, src_offset, dst_offset; + + for (y = 0, dst_offset = 0; y < 8; y++, dst_offset += stride) { + for (x = 0; x < 8; x++) { + src_offset = (y << 3) + x; + + dst[dst_offset + x] = CLIP_AND_BIAS(in[src_offset]); + } + } +} + +static void prores_idct_put_c(uint16_t *out, int linesize, DCTELEM *block, const int16_t *qmat) +{ + ff_prores_idct(block, qmat); + put_pixels(out, linesize >> 1, block); +} + +void ff_proresdsp_init(ProresDSPContext *dsp) +{ + dsp->idct_put = prores_idct_put_c; + dsp->idct_permutation_type = FF_NO_IDCT_PERM; + + if (HAVE_MMX) ff_proresdsp_x86_init(dsp); + + ff_init_scantable_permutation(dsp->idct_permutation, + dsp->idct_permutation_type); +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/proresdsp.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/proresdsp.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/proresdsp.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/proresdsp.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,40 @@ +/* + * Apple ProRes compatible decoder + * + * Copyright (c) 2010-2011 Maxim Poliakovski + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PRORESDSP_H +#define AVCODEC_PRORESDSP_H + +#include "dsputil.h" + +#define PRORES_BITS_PER_SAMPLE 10 ///< output precision of prores decoder + +typedef struct { + int idct_permutation_type; + uint8_t idct_permutation[64]; + void (* idct_put) (uint16_t *out, int linesize, DCTELEM *block, const int16_t *qmat); +} ProresDSPContext; + +void ff_proresdsp_init(ProresDSPContext *dsp); + +void ff_proresdsp_x86_init(ProresDSPContext *dsp); + +#endif /* AVCODEC_PRORESDSP_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ps2/dsputil_mmi.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ps2/dsputil_mmi.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ps2/dsputil_mmi.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ps2/dsputil_mmi.c 2012-01-11 00:34:30.000000000 +0000 @@ -142,7 +142,7 @@ void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx) { const int idct_algo= avctx->idct_algo; - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; if (!high_bit_depth) { c->clear_blocks = clear_blocks_mmi; @@ -152,11 +152,12 @@ c->put_pixels_tab[0][0] = put_pixels16_mmi; c->put_no_rnd_pixels_tab[0][0] = put_pixels16_mmi; - } c->get_pixels = get_pixels_mmi; + } - if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_PS2){ + if (avctx->bits_per_raw_sample <= 8 && + (idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_PS2)) { c->idct_put= ff_mmi_idct_put; c->idct_add= ff_mmi_idct_add; c->idct = ff_mmi_idct; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/psymodel.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/psymodel.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/psymodel.c 2011-05-09 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/psymodel.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,16 +25,31 @@ extern const FFPsyModel ff_aac_psy_model; -av_cold int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, - int num_lens, - const uint8_t **bands, const int* num_bands) +av_cold int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, int num_lens, + const uint8_t **bands, const int* num_bands, + int num_groups, const uint8_t *group_map) { + int i, j, k = 0; + ctx->avctx = avctx; - ctx->psy_bands = av_mallocz(sizeof(FFPsyBand) * PSY_MAX_BANDS * avctx->channels); + ctx->ch = av_mallocz(sizeof(ctx->ch[0]) * avctx->channels * 2); + ctx->group = av_mallocz(sizeof(ctx->group[0]) * num_groups); ctx->bands = av_malloc (sizeof(ctx->bands[0]) * num_lens); ctx->num_bands = av_malloc (sizeof(ctx->num_bands[0]) * num_lens); memcpy(ctx->bands, bands, sizeof(ctx->bands[0]) * num_lens); memcpy(ctx->num_bands, num_bands, sizeof(ctx->num_bands[0]) * num_lens); + + /* assign channels to groups (with virtual channels for coupling) */ + for (i = 0; i < num_groups; i++) { + /* NOTE: Add 1 to handle the AAC chan_config without modification. + * This has the side effect of allowing an array of 0s to map + * to one channel per group. + */ + ctx->group[i].num_ch = group_map[i] + 1; + for (j = 0; j < ctx->group[i].num_ch * 2; j++) + ctx->group[i].ch[j] = &ctx->ch[k++]; + } + switch (ctx->avctx->codec_id) { case CODEC_ID_AAC: ctx->model = &ff_aac_psy_model; @@ -45,13 +60,24 @@ return 0; } +FFPsyChannelGroup *ff_psy_find_group(FFPsyContext *ctx, int channel) +{ + int i = 0, ch = 0; + + while (ch <= channel) + ch += ctx->group[i++].num_ch; + + return &ctx->group[i-1]; +} + av_cold void ff_psy_end(FFPsyContext *ctx) { if (ctx->model->end) ctx->model->end(ctx); av_freep(&ctx->bands); av_freep(&ctx->num_bands); - av_freep(&ctx->psy_bands); + av_freep(&ctx->group); + av_freep(&ctx->ch); } typedef struct FFPsyPreprocessContext{ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/psymodel.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/psymodel.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/psymodel.h 2011-05-09 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/psymodel.h 2012-01-11 00:34:30.000000000 +0000 @@ -41,6 +41,23 @@ } FFPsyBand; /** + * single channel psychoacoustic information + */ +typedef struct FFPsyChannel { + FFPsyBand psy_bands[PSY_MAX_BANDS]; ///< channel bands information + float entropy; ///< total PE for this channel +} FFPsyChannel; + +/** + * psychoacoustic information for an arbitrary group of channels + */ +typedef struct FFPsyChannelGroup { + FFPsyChannel *ch[PSY_MAX_CHANS]; ///< pointers to the individual channels in the group + uint8_t num_ch; ///< number of channels in this group + uint8_t coupling[PSY_MAX_BANDS]; ///< allow coupling for this band in the group +} FFPsyChannelGroup; + +/** * windowing related information */ typedef struct FFPsyWindowInfo { @@ -58,14 +75,14 @@ AVCodecContext *avctx; ///< encoder context const struct FFPsyModel *model; ///< encoder-specific model functions - FFPsyBand *psy_bands; ///< frame bands information + FFPsyChannel *ch; ///< single channel information + FFPsyChannelGroup *group; ///< channel group information + int num_groups; ///< number of channel groups uint8_t **bands; ///< scalefactor band sizes for possible frame sizes int *num_bands; ///< number of scalefactor bands for possible frame sizes int num_lens; ///< number of scalefactor band sets - float pe[PSY_MAX_CHANS]; ///< total PE for each channel in the frame - struct { int size; ///< size of the bitresevoir in bits int bits; ///< number of bits used in the bitresevoir @@ -95,14 +112,14 @@ FFPsyWindowInfo (*window)(FFPsyContext *ctx, const int16_t *audio, const int16_t *la, int channel, int prev_type); /** - * Perform psychoacoustic analysis and set band info (threshold, energy). + * Perform psychoacoustic analysis and set band info (threshold, energy) for a group of channels. * - * @param ctx model context - * @param channel audio channel number - * @param coeffs pointer to the transformed coefficients - * @param wi window information + * @param ctx model context + * @param channel channel number of the first channel in the group to perform analysis on + * @param coeffs array of pointers to the transformed coefficients + * @param wi window information for the channels in the group */ - void (*analyze)(FFPsyContext *ctx, int channel, const float *coeffs, const FFPsyWindowInfo *wi); + void (*analyze)(FFPsyContext *ctx, int channel, const float **coeffs, const FFPsyWindowInfo *wi); void (*end) (FFPsyContext *apc); } FFPsyModel; @@ -115,12 +132,24 @@ * @param num_lens number of possible frame lengths * @param bands scalefactor band lengths for all frame lengths * @param num_bands number of scalefactor bands for all frame lengths + * @param num_groups number of channel groups + * @param group_map array with # of channels in group - 1, for each group * * @return zero if successful, a negative value if not */ -av_cold int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, - int num_lens, - const uint8_t **bands, const int* num_bands); +av_cold int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, int num_lens, + const uint8_t **bands, const int* num_bands, + int num_groups, const uint8_t *group_map); + +/** + * Determine what group a channel belongs to. + * + * @param ctx psymodel context + * @param channel channel to locate the group for + * + * @return pointer to the FFPsyChannelGroup this channel belongs to + */ +FFPsyChannelGroup *ff_psy_find_group(FFPsyContext *ctx, int channel); /** * Cleanup model context at the end. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pthread.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pthread.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/pthread.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/pthread.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,11 +29,36 @@ * @see doc/multithreading.txt */ -#include +#include "config.h" + +#if HAVE_SCHED_GETAFFINITY +#define _GNU_SOURCE +#include +#endif +#if HAVE_GETPROCESSAFFINITYMASK +#include +#endif +#if HAVE_SYSCTL +#if HAVE_SYS_PARAM_H +#include +#endif +#include +#include +#endif +#if HAVE_SYSCONF +#include +#endif #include "avcodec.h" +#include "internal.h" #include "thread.h" +#if HAVE_PTHREADS +#include +#elif HAVE_W32THREADS +#include "w32pthreads.h" +#endif + typedef int (action_func)(AVCodecContext *c, void *arg); typedef int (action_func2)(AVCodecContext *c, void *arg, int jobnr, int threadnr); @@ -64,6 +89,7 @@ struct FrameThreadContext *parent; pthread_t thread; + int thread_init; pthread_cond_t input_cond; ///< Used to wait for a new packet from the main thread. pthread_cond_t progress_cond; ///< Used by child threads to wait for progress to change. pthread_cond_t output_cond; ///< Used by the main thread to wait for frames to finish. @@ -126,6 +152,45 @@ int die; ///< Set when threads should exit. } FrameThreadContext; + +/* H264 slice threading seems to be buggy with more than 16 threads, + * limit the number of threads to 16 for automatic detection */ +#define MAX_AUTO_THREADS 16 + +static int get_logical_cpus(AVCodecContext *avctx) +{ + int ret, nb_cpus = 1; +#if HAVE_SCHED_GETAFFINITY && defined(CPU_COUNT) + cpu_set_t cpuset; + + CPU_ZERO(&cpuset); + + ret = sched_getaffinity(0, sizeof(cpuset), &cpuset); + if (!ret) { + nb_cpus = CPU_COUNT(&cpuset); + } +#elif HAVE_GETPROCESSAFFINITYMASK + DWORD_PTR proc_aff, sys_aff; + ret = GetProcessAffinityMask(GetCurrentProcess(), &proc_aff, &sys_aff); + if (ret) + nb_cpus = av_popcount64(proc_aff); +#elif HAVE_SYSCTL && defined(HW_NCPU) + int mib[2] = { CTL_HW, HW_NCPU }; + size_t len = sizeof(nb_cpus); + + ret = sysctl(mib, 2, &nb_cpus, &len, NULL, 0); + if (ret == -1) + nb_cpus = 0; +#elif HAVE_SYSCONF && defined(_SC_NPROC_ONLN) + nb_cpus = sysconf(_SC_NPROC_ONLN); +#elif HAVE_SYSCONF && defined(_SC_NPROCESSORS_ONLN) + nb_cpus = sysconf(_SC_NPROCESSORS_ONLN); +#endif + av_log(avctx, AV_LOG_DEBUG, "detected %d logical cores\n", nb_cpus); + return nb_cpus; +} + + static void* attribute_align_arg worker(void *v) { AVCodecContext *avctx = v; @@ -230,8 +295,19 @@ ThreadContext *c; int thread_count = avctx->thread_count; - if (thread_count <= 1) + if (!thread_count) { + int nb_cpus = get_logical_cpus(avctx); + // use number of cores + 1 as thread count if there is more than one + if (nb_cpus > 1) + thread_count = avctx->thread_count = FFMIN(nb_cpus + 1, MAX_AUTO_THREADS); + else + thread_count = avctx->thread_count = 1; + } + + if (thread_count <= 1) { + avctx->active_thread_type = 0; return 0; + } c = av_mallocz(sizeof(ThreadContext)); if (!c) @@ -315,7 +391,7 @@ } /** - * Updates the next thread's AVCodecContext with values from the reference thread's context. + * Update the next thread's AVCodecContext with values from the reference thread's context. * * @param dst The destination context. * @param src The source context. @@ -332,6 +408,9 @@ dst->height = src->height; dst->pix_fmt = src->pix_fmt; + dst->coded_width = src->coded_width; + dst->coded_height = src->coded_height; + dst->has_b_frames = src->has_b_frames; dst->idct_algo = src->idct_algo; dst->slice_count = src->slice_count; @@ -354,8 +433,7 @@ } if (for_user) { - dst->coded_frame = src->coded_frame; - dst->has_b_frames += src->thread_count - 1; + dst->coded_frame = src->coded_frame; } else { if (dst->codec->update_thread_context) err = dst->codec->update_thread_context(dst, src); @@ -408,9 +486,10 @@ FrameThreadContext *fctx = p->parent; while (p->num_released_buffers > 0) { - AVFrame *f = &p->released_buffers[--p->num_released_buffers]; + AVFrame *f; pthread_mutex_lock(&fctx->buffer_mutex); + f = &p->released_buffers[--p->num_released_buffers]; free_progress(f); f->thread_opaque = NULL; @@ -481,6 +560,7 @@ } fctx->prev_thread = p; + fctx->next_decoding++; return 0; } @@ -503,8 +583,6 @@ err = submit_packet(p, avpkt); if (err) return err; - fctx->next_decoding++; - /* * If we're still receiving the initial packets, don't return a frame. */ @@ -513,7 +591,7 @@ if (fctx->next_decoding >= (avctx->thread_count-1)) fctx->delaying = 0; *got_picture_ptr=0; - return 0; + return avpkt->size; } /* @@ -536,6 +614,10 @@ *picture = p->frame; *got_picture_ptr = p->got_frame; picture->pkt_dts = p->avpkt.dts; + picture->sample_aspect_ratio = avctx->sample_aspect_ratio; + picture->width = avctx->width; + picture->height = avctx->height; + picture->format = avctx->pix_fmt; /* * A later call with avkpt->size == 0 may loop over all threads, @@ -554,7 +636,8 @@ fctx->next_finished = finished; - return p->result; + /* return the size of the consumed packet if no error occurred */ + return (p->result >= 0) ? avpkt->size : p->result; } void ff_thread_report_progress(AVFrame *f, int n, int field) @@ -629,7 +712,7 @@ park_frame_worker_threads(fctx, thread_count); - if (fctx->prev_thread) + if (fctx->prev_thread && fctx->prev_thread != fctx->threads) update_context_from_thread(fctx->threads->avctx, fctx->prev_thread->avctx, 0); fctx->die = 1; @@ -641,7 +724,8 @@ pthread_cond_signal(&p->input_cond); pthread_mutex_unlock(&p->mutex); - pthread_join(p->thread, NULL); + if (p->thread_init) + pthread_join(p->thread, NULL); if (codec->close) codec->close(p->avctx); @@ -663,8 +747,10 @@ pthread_cond_destroy(&p->output_cond); av_freep(&p->avpkt.data); - if (i) + if (i) { av_freep(&p->avctx->priv_data); + av_freep(&p->avctx->internal); + } av_freep(&p->avctx); } @@ -682,6 +768,15 @@ FrameThreadContext *fctx; int i, err = 0; + if (!thread_count) { + int nb_cpus = get_logical_cpus(avctx); + // use number of cores + 1 as thread count if there is more than one + if (nb_cpus > 1) + thread_count = avctx->thread_count = FFMIN(nb_cpus + 1, MAX_AUTO_THREADS); + else + thread_count = avctx->thread_count = 1; + } + if (thread_count <= 1) { avctx->active_thread_type = 0; return 0; @@ -706,6 +801,11 @@ p->parent = fctx; p->avctx = copy; + if (!copy) { + err = AVERROR(ENOMEM); + goto error; + } + *copy = *src; copy->thread_opaque = p; copy->pkt = &p->avpkt; @@ -718,9 +818,19 @@ update_context_from_thread(avctx, copy, 1); } else { - copy->is_copy = 1; copy->priv_data = av_malloc(codec->priv_data_size); + if (!copy->priv_data) { + err = AVERROR(ENOMEM); + goto error; + } memcpy(copy->priv_data, src->priv_data, codec->priv_data_size); + copy->internal = av_malloc(sizeof(AVCodecInternal)); + if (!copy->internal) { + err = AVERROR(ENOMEM); + goto error; + } + *copy->internal = *src->internal; + copy->internal->is_copy = 1; if (codec->init_thread_copy) err = codec->init_thread_copy(copy); @@ -728,7 +838,8 @@ if (err) goto error; - pthread_create(&p->thread, NULL, frame_worker_thread, p); + if (!pthread_create(&p->thread, NULL, frame_worker_thread, p)) + p->thread_init = 1; } return 0; @@ -746,9 +857,12 @@ if (!avctx->thread_opaque) return; park_frame_worker_threads(fctx, avctx->thread_count); - - if (fctx->prev_thread) - update_context_from_thread(fctx->threads->avctx, fctx->prev_thread->avctx, 0); + if (fctx->prev_thread) { + if (fctx->prev_thread != &fctx->threads[0]) + update_context_from_thread(fctx->threads[0].avctx, fctx->prev_thread->avctx, 0); + if (avctx->codec->flush) + avctx->codec->flush(fctx->threads[0].avctx); + } fctx->next_decoding = fctx->next_finished = 0; fctx->delaying = 1; @@ -823,19 +937,13 @@ pthread_mutex_unlock(&p->parent->buffer_mutex); - /* - * Buffer age is difficult to keep track of between - * multiple threads, and the optimizations it allows - * are not worth the effort. It is disabled for now. - */ - f->age = INT_MAX; - return err; } void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f) { PerThreadContext *p = avctx->thread_opaque; + FrameThreadContext *fctx; if (!(avctx->active_thread_type&FF_THREAD_FRAME)) { avctx->release_buffer(avctx, f); @@ -848,10 +956,12 @@ } if(avctx->debug & FF_DEBUG_BUFFERS) - av_log(avctx, AV_LOG_DEBUG, "thread_release_buffer called on pic %p, %d buffers used\n", - f, f->owner->internal_buffer_count); + av_log(avctx, AV_LOG_DEBUG, "thread_release_buffer called on pic %p\n", f); + fctx = p->parent; + pthread_mutex_lock(&fctx->buffer_mutex); p->released_buffers[p->num_released_buffers++] = *f; + pthread_mutex_unlock(&fctx->buffer_mutex); memset(f->data, 0, sizeof(f->data)); } @@ -877,6 +987,9 @@ } else if (avctx->codec->capabilities & CODEC_CAP_SLICE_THREADS && avctx->thread_type & FF_THREAD_SLICE) { avctx->active_thread_type = FF_THREAD_SLICE; + } else if (!(avctx->codec->capabilities & CODEC_CAP_AUTO_THREADS)) { + avctx->thread_count = 1; + avctx->active_thread_type = 0; } } @@ -887,6 +1000,10 @@ return -1; } +#if HAVE_W32THREADS + w32thread_init(); +#endif + if (avctx->codec) { validate_thread_parameters(avctx); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ptx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ptx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ptx.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ptx.c 2012-01-11 00:34:30.000000000 +0000 @@ -39,12 +39,15 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; + const uint8_t *buf_end = avpkt->data + avpkt->size; PTXContext * const s = avctx->priv_data; AVFrame *picture = data; AVFrame * const p = &s->picture; unsigned int offset, w, h, y, stride, bytes_per_pixel; uint8_t *ptr; + if (buf_end - buf < 14) + return AVERROR_INVALIDDATA; offset = AV_RL16(buf); w = AV_RL16(buf+8); h = AV_RL16(buf+10); @@ -57,6 +60,8 @@ avctx->pix_fmt = PIX_FMT_RGB555; + if (buf_end - buf < offset) + return AVERROR_INVALIDDATA; if (offset != 0x2c) av_log_ask_for_sample(avctx, "offset != 0x2c\n"); @@ -79,7 +84,7 @@ ptr = p->data[0]; stride = p->linesize[0]; - for (y=0; y= w * bytes_per_pixel; y++) { #if HAVE_BIGENDIAN unsigned int x; for (x=0; xpicture; *data_size = sizeof(AVPicture); + if (y < h) { + av_log(avctx, AV_LOG_WARNING, "incomplete packet\n"); + return avpkt->size; + } + return offset + w*h*bytes_per_pixel; } @@ -107,15 +117,13 @@ } AVCodec ff_ptx_decoder = { - "ptx", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PTX, - sizeof(PTXContext), - ptx_init, - NULL, - ptx_end, - ptx_decode_frame, - CODEC_CAP_DR1, - NULL, + .name = "ptx", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PTX, + .priv_data_size = sizeof(PTXContext), + .init = ptx_init, + .close = ptx_end, + .decode = ptx_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("V.Flash PTX image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/put_bits.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/put_bits.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/put_bits.h 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/put_bits.h 2012-01-11 00:34:30.000000000 +0000 @@ -36,19 +36,10 @@ #include "mathops.h" #include "config.h" -//#define ALT_BITSTREAM_WRITER -//#define ALIGNED_BITSTREAM_WRITER - -/* buf and buf_end must be present and used by every alternative writer. */ typedef struct PutBitContext { -#ifdef ALT_BITSTREAM_WRITER - uint8_t *buf, *buf_end; - int index; -#else uint32_t bit_buf; int bit_left; uint8_t *buf, *buf_ptr, *buf_end; -#endif int size_in_bits; } PutBitContext; @@ -68,15 +59,9 @@ s->size_in_bits= 8*buffer_size; s->buf = buffer; s->buf_end = s->buf + buffer_size; -#ifdef ALT_BITSTREAM_WRITER - s->index=0; - ((uint32_t*)(s->buf))[0]=0; -// memset(buffer, 0, buffer_size); -#else s->buf_ptr = s->buf; s->bit_left=32; s->bit_buf=0; -#endif } /** @@ -84,11 +69,7 @@ */ static inline int put_bits_count(PutBitContext *s) { -#ifdef ALT_BITSTREAM_WRITER - return s->index; -#else return (s->buf_ptr - s->buf) * 8 + 32 - s->bit_left; -#endif } /** @@ -96,11 +77,9 @@ */ static inline void flush_put_bits(PutBitContext *s) { -#ifdef ALT_BITSTREAM_WRITER - align_put_bits(s); -#else #ifndef BITSTREAM_WRITER_LE - s->bit_buf<<= s->bit_left; + if (s->bit_left < 32) + s->bit_buf<<= s->bit_left; #endif while (s->bit_left < 32) { /* XXX: should test end of buffer */ @@ -115,18 +94,17 @@ } s->bit_left=32; s->bit_buf=0; -#endif } -#if defined(ALT_BITSTREAM_WRITER) || defined(BITSTREAM_WRITER_LE) -#define align_put_bits align_put_bits_unsupported_here +#ifdef BITSTREAM_WRITER_LE +#define avpriv_align_put_bits align_put_bits_unsupported_here #define ff_put_string ff_put_string_unsupported_here -#define ff_copy_bits ff_copy_bits_unsupported_here +#define avpriv_copy_bits avpriv_copy_bits_unsupported_here #else /** * Pad the bitstream with zeros up to the next byte boundary. */ -void align_put_bits(PutBitContext *s); +void avpriv_align_put_bits(PutBitContext *s); /** * Put the string string in the bitstream. @@ -140,7 +118,7 @@ * * @param length the number of bits of src to copy */ -void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length); +void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length); #endif /** @@ -148,7 +126,6 @@ * Use put_bits32 to write 32 bits. */ static inline void put_bits(PutBitContext *s, int n, unsigned int value) -#ifndef ALT_BITSTREAM_WRITER { unsigned int bit_buf; int bit_left; @@ -164,12 +141,7 @@ #ifdef BITSTREAM_WRITER_LE bit_buf |= value << (32 - bit_left); if (n >= bit_left) { -#if !HAVE_FAST_UNALIGNED - if (3 & (intptr_t) s->buf_ptr) { - AV_WL32(s->buf_ptr, bit_buf); - } else -#endif - *(uint32_t *)s->buf_ptr = av_le2ne32(bit_buf); + AV_WL32(s->buf_ptr, bit_buf); s->buf_ptr+=4; bit_buf = (bit_left==32)?0:value >> bit_left; bit_left+=32; @@ -182,12 +154,7 @@ } else { bit_buf<<=bit_left; bit_buf |= value >> (n - bit_left); -#if !HAVE_FAST_UNALIGNED - if (3 & (intptr_t) s->buf_ptr) { - AV_WB32(s->buf_ptr, bit_buf); - } else -#endif - *(uint32_t *)s->buf_ptr = av_be2ne32(bit_buf); + AV_WB32(s->buf_ptr, bit_buf); //printf("bitbuf = %08x\n", bit_buf); s->buf_ptr+=4; bit_left+=32 - n; @@ -198,70 +165,6 @@ s->bit_buf = bit_buf; s->bit_left = bit_left; } -#else /* ALT_BITSTREAM_WRITER defined */ -{ -# ifdef ALIGNED_BITSTREAM_WRITER -# if ARCH_X86 - __asm__ volatile( - "movl %0, %%ecx \n\t" - "xorl %%eax, %%eax \n\t" - "shrdl %%cl, %1, %%eax \n\t" - "shrl %%cl, %1 \n\t" - "movl %0, %%ecx \n\t" - "shrl $3, %%ecx \n\t" - "andl $0xFFFFFFFC, %%ecx \n\t" - "bswapl %1 \n\t" - "orl %1, (%2, %%ecx) \n\t" - "bswapl %%eax \n\t" - "addl %3, %0 \n\t" - "movl %%eax, 4(%2, %%ecx) \n\t" - : "=&r" (s->index), "=&r" (value) - : "r" (s->buf), "r" (n), "0" (s->index), "1" (value<<(-n)) - : "%eax", "%ecx" - ); -# else - int index= s->index; - uint32_t *ptr= ((uint32_t *)s->buf)+(index>>5); - - value<<= 32-n; - - ptr[0] |= av_be2ne32(value>>(index&31)); - ptr[1] = av_be2ne32(value<<(32-(index&31))); -//if(n>24) printf("%d %d\n", n, value); - index+= n; - s->index= index; -# endif -# else //ALIGNED_BITSTREAM_WRITER -# if ARCH_X86 - __asm__ volatile( - "movl $7, %%ecx \n\t" - "andl %0, %%ecx \n\t" - "addl %3, %%ecx \n\t" - "negl %%ecx \n\t" - "shll %%cl, %1 \n\t" - "bswapl %1 \n\t" - "movl %0, %%ecx \n\t" - "shrl $3, %%ecx \n\t" - "orl %1, (%%ecx, %2) \n\t" - "addl %3, %0 \n\t" - "movl $0, 4(%%ecx, %2) \n\t" - : "=&r" (s->index), "=&r" (value) - : "r" (s->buf), "r" (n), "0" (s->index), "1" (value) - : "%ecx" - ); -# else - int index= s->index; - uint32_t *ptr= (uint32_t*)(((uint8_t *)s->buf)+(index>>3)); - - ptr[0] |= av_be2ne32(value<<(32-n-(index&7) )); - ptr[1] = 0; -//if(n>24) printf("%d %d\n", n, value); - index+= n; - s->index= index; -# endif -# endif //!ALIGNED_BITSTREAM_WRITER -} -#endif static inline void put_sbits(PutBitContext *pb, int n, int32_t value) { @@ -292,11 +195,7 @@ */ static inline uint8_t* put_bits_ptr(PutBitContext *s) { -#ifdef ALT_BITSTREAM_WRITER - return s->buf + (s->index>>3); -#else return s->buf_ptr; -#endif } /** @@ -306,13 +205,8 @@ static inline void skip_put_bytes(PutBitContext *s, int n) { assert((put_bits_count(s)&7)==0); -#ifdef ALT_BITSTREAM_WRITER - FIXME may need some cleaning of the buffer - s->index += n<<3; -#else assert(s->bit_left==32); s->buf_ptr += n; -#endif } /** @@ -322,13 +216,9 @@ */ static inline void skip_put_bits(PutBitContext *s, int n) { -#ifdef ALT_BITSTREAM_WRITER - s->index += n; -#else s->bit_left -= n; s->buf_ptr-= 4*(s->bit_left>>5); s->bit_left &= 31; -#endif } /** diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qcelpdata.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qcelpdata.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qcelpdata.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qcelpdata.h 2012-01-11 00:34:30.000000000 +0000 @@ -38,18 +38,18 @@ * QCELP unpacked data frame */ typedef struct { -/// @defgroup qcelp_codebook_parameters QCELP excitation codebook parameters +/// @name QCELP excitation codebook parameters /// @{ - uint8_t cbsign[16]; ///!< sign of the codebook gain for each codebook subframe - uint8_t cbgain[16]; ///!< unsigned codebook gain for each codebook subframe - uint8_t cindex[16]; ///!< codebook index for each codebook subframe + uint8_t cbsign[16]; ///< sign of the codebook gain for each codebook subframe + uint8_t cbgain[16]; ///< unsigned codebook gain for each codebook subframe + uint8_t cindex[16]; ///< codebook index for each codebook subframe /// @} -/// @defgroup qcelp_pitch_parameters QCELP pitch prediction parameters +/// @name QCELP pitch prediction parameters /// @{ - uint8_t plag[4]; ///!< pitch lag for each pitch subframe - uint8_t pfrac[4]; ///!< fractional pitch lag for each pitch subframe - uint8_t pgain[4]; ///!< pitch gain for each pitch subframe + uint8_t plag[4]; ///< pitch lag for each pitch subframe + uint8_t pfrac[4]; ///< fractional pitch lag for each pitch subframe + uint8_t pgain[4]; ///< pitch gain for each pitch subframe /// @} /** @@ -74,9 +74,9 @@ static const float qcelp_hammsinc_table[4] = { -0.006822, 0.041249, -0.143459, 0.588863}; typedef struct { - uint8_t index; /*!< index into the QCELPContext structure */ - uint8_t bitpos; /*!< position of the lowest bit in the value's byte */ - uint8_t bitlen; /*!< number of bits to read */ + uint8_t index; /**< index into the QCELPContext structure */ + uint8_t bitpos; /**< position of the lowest bit in the value's byte */ + uint8_t bitlen; /**< number of bits to read */ } QCELPBitmap; #define QCELP_OF(variable, bit, len) {offsetof(QCELPFrame, variable), bit, len} @@ -266,7 +266,7 @@ * the QCELPContext */ static const QCELPBitmap * const qcelp_unpacking_bitmaps_per_rate[5] = { - NULL, ///!< for SILENCE rate + NULL, ///< for SILENCE rate qcelp_rate_octave_bitmap, qcelp_rate_quarter_bitmap, qcelp_rate_half_bitmap, @@ -274,7 +274,7 @@ }; static const uint16_t qcelp_unpacking_bitmaps_lengths[5] = { - 0, ///!< for SILENCE rate + 0, ///< for SILENCE rate FF_ARRAY_ELEMS(qcelp_rate_octave_bitmap), FF_ARRAY_ELEMS(qcelp_rate_quarter_bitmap), FF_ARRAY_ELEMS(qcelp_rate_half_bitmap), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qcelpdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qcelpdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qcelpdec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qcelpdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -44,9 +44,8 @@ #undef NDEBUG #include -typedef enum -{ - I_F_Q = -1, /*!< insufficient frame quality */ +typedef enum { + I_F_Q = -1, /**< insufficient frame quality */ SILENCE, RATE_OCTAVE, RATE_QUARTER, @@ -54,16 +53,16 @@ RATE_FULL } qcelp_packet_rate; -typedef struct -{ +typedef struct { + AVFrame avframe; GetBitContext gb; qcelp_packet_rate bitrate; - QCELPFrame frame; /*!< unpacked data frame */ + QCELPFrame frame; /**< unpacked data frame */ uint8_t erasure_count; - uint8_t octave_count; /*!< count the consecutive RATE_OCTAVE frames */ + uint8_t octave_count; /**< count the consecutive RATE_OCTAVE frames */ float prev_lspf[10]; - float predictor_lspf[10];/*!< LSP predictor for RATE_OCTAVE and I_F_Q */ + float predictor_lspf[10];/**< LSP predictor for RATE_OCTAVE and I_F_Q */ float pitch_synthesis_filter_mem[303]; float pitch_pre_filter_mem[303]; float rnd_fir_filter_mem[180]; @@ -94,8 +93,11 @@ avctx->sample_fmt = AV_SAMPLE_FMT_FLT; - for(i=0; i<10; i++) - q->prev_lspf[i] = (i+1)/11.; + for (i = 0; i < 10; i++) + q->prev_lspf[i] = (i + 1) / 11.; + + avcodec_get_frame_defaults(&q->avframe); + avctx->coded_frame = &q->avframe; return 0; } @@ -117,79 +119,70 @@ float tmp_lspf, smooth, erasure_coeff; const float *predictors; - if(q->bitrate == RATE_OCTAVE || q->bitrate == I_F_Q) - { - predictors = (q->prev_bitrate != RATE_OCTAVE && - q->prev_bitrate != I_F_Q ? - q->prev_lspf : q->predictor_lspf); + if (q->bitrate == RATE_OCTAVE || q->bitrate == I_F_Q) { + predictors = q->prev_bitrate != RATE_OCTAVE && + q->prev_bitrate != I_F_Q ? q->prev_lspf + : q->predictor_lspf; - if(q->bitrate == RATE_OCTAVE) - { + if (q->bitrate == RATE_OCTAVE) { q->octave_count++; - for(i=0; i<10; i++) - { + for (i = 0; i < 10; i++) { q->predictor_lspf[i] = lspf[i] = (q->frame.lspv[i] ? QCELP_LSP_SPREAD_FACTOR - : -QCELP_LSP_SPREAD_FACTOR) - + predictors[i] * QCELP_LSP_OCTAVE_PREDICTOR - + (i + 1) * ((1 - QCELP_LSP_OCTAVE_PREDICTOR)/11); - } - smooth = (q->octave_count < 10 ? .875 : 0.1); - }else - { + : -QCELP_LSP_SPREAD_FACTOR) + + predictors[i] * QCELP_LSP_OCTAVE_PREDICTOR + + (i + 1) * ((1 - QCELP_LSP_OCTAVE_PREDICTOR) / 11); + } + smooth = q->octave_count < 10 ? .875 : 0.1; + } else { erasure_coeff = QCELP_LSP_OCTAVE_PREDICTOR; assert(q->bitrate == I_F_Q); - if(q->erasure_count > 1) - erasure_coeff *= (q->erasure_count < 4 ? 0.9 : 0.7); + if (q->erasure_count > 1) + erasure_coeff *= q->erasure_count < 4 ? 0.9 : 0.7; - for(i=0; i<10; i++) - { + for (i = 0; i < 10; i++) { q->predictor_lspf[i] = - lspf[i] = (i + 1) * ( 1 - erasure_coeff)/11 - + erasure_coeff * predictors[i]; + lspf[i] = (i + 1) * (1 - erasure_coeff) / 11 + + erasure_coeff * predictors[i]; } smooth = 0.125; } // Check the stability of the LSP frequencies. lspf[0] = FFMAX(lspf[0], QCELP_LSP_SPREAD_FACTOR); - for(i=1; i<10; i++) - lspf[i] = FFMAX(lspf[i], (lspf[i-1] + QCELP_LSP_SPREAD_FACTOR)); + for (i = 1; i < 10; i++) + lspf[i] = FFMAX(lspf[i], lspf[i - 1] + QCELP_LSP_SPREAD_FACTOR); - lspf[9] = FFMIN(lspf[9], (1.0 - QCELP_LSP_SPREAD_FACTOR)); - for(i=9; i>0; i--) - lspf[i-1] = FFMIN(lspf[i-1], (lspf[i] - QCELP_LSP_SPREAD_FACTOR)); + lspf[9] = FFMIN(lspf[9], 1.0 - QCELP_LSP_SPREAD_FACTOR); + for (i = 9; i > 0; i--) + lspf[i - 1] = FFMIN(lspf[i - 1], lspf[i] - QCELP_LSP_SPREAD_FACTOR); // Low-pass filter the LSP frequencies. - ff_weighted_vector_sumf(lspf, lspf, q->prev_lspf, smooth, 1.0-smooth, 10); - }else - { + ff_weighted_vector_sumf(lspf, lspf, q->prev_lspf, smooth, 1.0 - smooth, 10); + } else { q->octave_count = 0; tmp_lspf = 0.; - for(i=0; i<5 ; i++) - { - lspf[2*i+0] = tmp_lspf += qcelp_lspvq[i][q->frame.lspv[i]][0] * 0.0001; - lspf[2*i+1] = tmp_lspf += qcelp_lspvq[i][q->frame.lspv[i]][1] * 0.0001; + for (i = 0; i < 5; i++) { + lspf[2 * i + 0] = tmp_lspf += qcelp_lspvq[i][q->frame.lspv[i]][0] * 0.0001; + lspf[2 * i + 1] = tmp_lspf += qcelp_lspvq[i][q->frame.lspv[i]][1] * 0.0001; } // Check for badly received packets. - if(q->bitrate == RATE_QUARTER) - { - if(lspf[9] <= .70 || lspf[9] >= .97) + if (q->bitrate == RATE_QUARTER) { + if (lspf[9] <= .70 || lspf[9] >= .97) return -1; - for(i=3; i<10; i++) - if(fabs(lspf[i] - lspf[i-2]) < .08) + for (i = 3; i < 10; i++) + if (fabs(lspf[i] - lspf[i - 2]) < .08) return -1; - }else - { - if(lspf[9] <= .66 || lspf[9] >= .985) + } else { + if (lspf[9] <= .66 || lspf[9] >= .985) return -1; - for(i=4; i<10; i++) - if (fabs(lspf[i] - lspf[i-4]) < .0931) + for (i = 4; i < 10; i++) + if (fabs(lspf[i] - lspf[i - 4]) < .0931) return -1; } } @@ -204,82 +197,72 @@ * * TIA/EIA/IS-733 2.4.6.2 */ -static void decode_gain_and_index(QCELPContext *q, - float *gain) { - int i, subframes_count, g1[16]; +static void decode_gain_and_index(QCELPContext *q, float *gain) +{ + int i, subframes_count, g1[16]; float slope; - if(q->bitrate >= RATE_QUARTER) - { - switch(q->bitrate) - { - case RATE_FULL: subframes_count = 16; break; - case RATE_HALF: subframes_count = 4; break; - default: subframes_count = 5; + if (q->bitrate >= RATE_QUARTER) { + switch (q->bitrate) { + case RATE_FULL: subframes_count = 16; break; + case RATE_HALF: subframes_count = 4; break; + default: subframes_count = 5; } - for(i=0; iframe.cbgain[i]; - if(q->bitrate == RATE_FULL && !((i+1) & 3)) - { - g1[i] += av_clip((g1[i-1] + g1[i-2] + g1[i-3]) / 3 - 6, 0, 32); + if (q->bitrate == RATE_FULL && !((i + 1) & 3)) { + g1[i] += av_clip((g1[i - 1] + g1[i - 2] + g1[i - 3]) / 3 - 6, 0, 32); } gain[i] = qcelp_g12ga[g1[i]]; - if(q->frame.cbsign[i]) - { + if (q->frame.cbsign[i]) { gain[i] = -gain[i]; - q->frame.cindex[i] = (q->frame.cindex[i]-89) & 127; + q->frame.cindex[i] = (q->frame.cindex[i] - 89) & 127; } } - q->prev_g1[0] = g1[i-2]; - q->prev_g1[1] = g1[i-1]; - q->last_codebook_gain = qcelp_g12ga[g1[i-1]]; + q->prev_g1[0] = g1[i - 2]; + q->prev_g1[1] = g1[i - 1]; + q->last_codebook_gain = qcelp_g12ga[g1[i - 1]]; - if(q->bitrate == RATE_QUARTER) - { + if (q->bitrate == RATE_QUARTER) { // Provide smoothing of the unvoiced excitation energy. - gain[7] = gain[4]; - gain[6] = 0.4*gain[3] + 0.6*gain[4]; - gain[5] = gain[3]; - gain[4] = 0.8*gain[2] + 0.2*gain[3]; - gain[3] = 0.2*gain[1] + 0.8*gain[2]; - gain[2] = gain[1]; - gain[1] = 0.6*gain[0] + 0.4*gain[1]; - } - }else if (q->bitrate != SILENCE) - { - if(q->bitrate == RATE_OCTAVE) - { - g1[0] = 2 * q->frame.cbgain[0] - + av_clip((q->prev_g1[0] + q->prev_g1[1]) / 2 - 5, 0, 54); + gain[7] = gain[4]; + gain[6] = 0.4 * gain[3] + 0.6 * gain[4]; + gain[5] = gain[3]; + gain[4] = 0.8 * gain[2] + 0.2 * gain[3]; + gain[3] = 0.2 * gain[1] + 0.8 * gain[2]; + gain[2] = gain[1]; + gain[1] = 0.6 * gain[0] + 0.4 * gain[1]; + } + } else if (q->bitrate != SILENCE) { + if (q->bitrate == RATE_OCTAVE) { + g1[0] = 2 * q->frame.cbgain[0] + + av_clip((q->prev_g1[0] + q->prev_g1[1]) / 2 - 5, 0, 54); subframes_count = 8; - }else - { + } else { assert(q->bitrate == I_F_Q); g1[0] = q->prev_g1[1]; - switch(q->erasure_count) - { - case 1 : break; - case 2 : g1[0] -= 1; break; - case 3 : g1[0] -= 2; break; - default: g1[0] -= 6; + switch (q->erasure_count) { + case 1 : break; + case 2 : g1[0] -= 1; break; + case 3 : g1[0] -= 2; break; + default: g1[0] -= 6; } - if(g1[0] < 0) + if (g1[0] < 0) g1[0] = 0; subframes_count = 4; } // This interpolation is done to produce smoother background noise. - slope = 0.5*(qcelp_g12ga[g1[0]] - q->last_codebook_gain) / subframes_count; - for(i=1; i<=subframes_count; i++) - gain[i-1] = q->last_codebook_gain + slope * i; - - q->last_codebook_gain = gain[i-2]; - q->prev_g1[0] = q->prev_g1[1]; - q->prev_g1[1] = g1[0]; + slope = 0.5 * (qcelp_g12ga[g1[0]] - q->last_codebook_gain) / subframes_count; + for (i = 1; i <= subframes_count; i++) + gain[i - 1] = q->last_codebook_gain + slope * i; + + q->last_codebook_gain = gain[i - 2]; + q->prev_g1[0] = q->prev_g1[1]; + q->prev_g1[1] = g1[0]; } } @@ -294,14 +277,13 @@ */ static int codebook_sanity_check_for_rate_quarter(const uint8_t *cbgain) { - int i, diff, prev_diff=0; + int i, diff, prev_diff = 0; - for(i=1; i<5; i++) - { + for (i = 1; i < 5; i++) { diff = cbgain[i] - cbgain[i-1]; - if(FFABS(diff) > 10) + if (FFABS(diff) > 10) return -1; - else if(FFABS(diff - prev_diff) > 12) + else if (FFABS(diff - prev_diff) > 12) return -1; prev_diff = diff; } @@ -332,81 +314,74 @@ static void compute_svector(QCELPContext *q, const float *gain, float *cdn_vector) { - int i, j, k; + int i, j, k; uint16_t cbseed, cindex; - float *rnd, tmp_gain, fir_filter_value; + float *rnd, tmp_gain, fir_filter_value; - switch(q->bitrate) - { - case RATE_FULL: - for(i=0; i<16; i++) - { - tmp_gain = gain[i] * QCELP_RATE_FULL_CODEBOOK_RATIO; - cindex = -q->frame.cindex[i]; - for(j=0; j<10; j++) - *cdn_vector++ = tmp_gain * qcelp_rate_full_codebook[cindex++ & 127]; - } + switch (q->bitrate) { + case RATE_FULL: + for (i = 0; i < 16; i++) { + tmp_gain = gain[i] * QCELP_RATE_FULL_CODEBOOK_RATIO; + cindex = -q->frame.cindex[i]; + for (j = 0; j < 10; j++) + *cdn_vector++ = tmp_gain * qcelp_rate_full_codebook[cindex++ & 127]; + } break; - case RATE_HALF: - for(i=0; i<4; i++) - { - tmp_gain = gain[i] * QCELP_RATE_HALF_CODEBOOK_RATIO; - cindex = -q->frame.cindex[i]; - for (j = 0; j < 40; j++) + case RATE_HALF: + for (i = 0; i < 4; i++) { + tmp_gain = gain[i] * QCELP_RATE_HALF_CODEBOOK_RATIO; + cindex = -q->frame.cindex[i]; + for (j = 0; j < 40; j++) *cdn_vector++ = tmp_gain * qcelp_rate_half_codebook[cindex++ & 127]; - } + } break; - case RATE_QUARTER: - cbseed = (0x0003 & q->frame.lspv[4])<<14 | - (0x003F & q->frame.lspv[3])<< 8 | - (0x0060 & q->frame.lspv[2])<< 1 | - (0x0007 & q->frame.lspv[1])<< 3 | - (0x0038 & q->frame.lspv[0])>> 3 ; - rnd = q->rnd_fir_filter_mem + 20; - for(i=0; i<8; i++) - { - tmp_gain = gain[i] * (QCELP_SQRT1887 / 32768.0); - for(k=0; k<20; k++) - { - cbseed = 521 * cbseed + 259; - *rnd = (int16_t)cbseed; + case RATE_QUARTER: + cbseed = (0x0003 & q->frame.lspv[4]) << 14 | + (0x003F & q->frame.lspv[3]) << 8 | + (0x0060 & q->frame.lspv[2]) << 1 | + (0x0007 & q->frame.lspv[1]) << 3 | + (0x0038 & q->frame.lspv[0]) >> 3; + rnd = q->rnd_fir_filter_mem + 20; + for (i = 0; i < 8; i++) { + tmp_gain = gain[i] * (QCELP_SQRT1887 / 32768.0); + for (k = 0; k < 20; k++) { + cbseed = 521 * cbseed + 259; + *rnd = (int16_t) cbseed; // FIR filter - fir_filter_value = 0.0; - for(j=0; j<10; j++) - fir_filter_value += qcelp_rnd_fir_coefs[j ] - * (rnd[-j ] + rnd[-20+j]); - - fir_filter_value += qcelp_rnd_fir_coefs[10] * rnd[-10]; - *cdn_vector++ = tmp_gain * fir_filter_value; - rnd++; - } + fir_filter_value = 0.0; + for (j = 0; j < 10; j++) + fir_filter_value += qcelp_rnd_fir_coefs[j] * + (rnd[-j] + rnd[-20+j]); + + fir_filter_value += qcelp_rnd_fir_coefs[10] * rnd[-10]; + *cdn_vector++ = tmp_gain * fir_filter_value; + rnd++; } - memcpy(q->rnd_fir_filter_mem, q->rnd_fir_filter_mem + 160, 20 * sizeof(float)); + } + memcpy(q->rnd_fir_filter_mem, q->rnd_fir_filter_mem + 160, + 20 * sizeof(float)); break; - case RATE_OCTAVE: - cbseed = q->first16bits; - for(i=0; i<8; i++) - { - tmp_gain = gain[i] * (QCELP_SQRT1887 / 32768.0); - for(j=0; j<20; j++) - { - cbseed = 521 * cbseed + 259; - *cdn_vector++ = tmp_gain * (int16_t)cbseed; - } + case RATE_OCTAVE: + cbseed = q->first16bits; + for (i = 0; i < 8; i++) { + tmp_gain = gain[i] * (QCELP_SQRT1887 / 32768.0); + for (j = 0; j < 20; j++) { + cbseed = 521 * cbseed + 259; + *cdn_vector++ = tmp_gain * (int16_t) cbseed; } + } break; - case I_F_Q: - cbseed = -44; // random codebook index - for(i=0; i<4; i++) - { - tmp_gain = gain[i] * QCELP_RATE_FULL_CODEBOOK_RATIO; - for(j=0; j<40; j++) - *cdn_vector++ = tmp_gain * qcelp_rate_full_codebook[cbseed++ & 127]; - } + case I_F_Q: + cbseed = -44; // random codebook index + for (i = 0; i < 4; i++) { + tmp_gain = gain[i] * QCELP_RATE_FULL_CODEBOOK_RATIO; + for (j = 0; j < 40; j++) + *cdn_vector++ = tmp_gain * qcelp_rate_full_codebook[cbseed++ & 127]; + } break; - case SILENCE: - memset(cdn_vector, 0, 160 * sizeof(float)); + case SILENCE: + memset(cdn_vector, 0, 160 * sizeof(float)); break; } } @@ -420,8 +395,7 @@ * * TIA/EIA/IS-733 2.4.8.3, 2.4.8.6 */ -static void apply_gain_ctrl(float *v_out, const float *v_ref, - const float *v_in) +static void apply_gain_ctrl(float *v_out, const float *v_ref, const float *v_in) { int i; @@ -453,24 +427,20 @@ const float gain[4], const uint8_t *lag, const uint8_t pfrac[4]) { - int i, j; - float *v_lag, *v_out; + int i, j; + float *v_lag, *v_out; const float *v_len; v_out = memory + 143; // Output vector starts at memory[143]. - for(i=0; i<4; i++) - { - if(gain[i]) - { + for (i = 0; i < 4; i++) { + if (gain[i]) { v_lag = memory + 143 + 40 * i - lag[i]; - for(v_len=v_in+40; v_inbitrate >= RATE_HALF || - q->bitrate == SILENCE || - (q->bitrate == I_F_Q && (q->prev_bitrate >= RATE_HALF))) - { - - if(q->bitrate >= RATE_HALF) - { + if (q->bitrate >= RATE_HALF || q->bitrate == SILENCE || + (q->bitrate == I_F_Q && (q->prev_bitrate >= RATE_HALF))) { + if (q->bitrate >= RATE_HALF) { // Compute gain & lag for the whole frame. - for(i=0; i<4; i++) - { + for (i = 0; i < 4; i++) { q->pitch_gain[i] = q->frame.plag[i] ? (q->frame.pgain[i] + 1) * 0.25 : 0.0; q->pitch_lag[i] = q->frame.plag[i] + 16; } - }else - { + } else { float max_pitch_gain; - if (q->bitrate == I_F_Q) - { + if (q->bitrate == I_F_Q) { if (q->erasure_count < 3) max_pitch_gain = 0.9 - 0.3 * (q->erasure_count - 1); else max_pitch_gain = 0.0; - }else - { + } else { assert(q->bitrate == SILENCE); max_pitch_gain = 1.0; } - for(i=0; i<4; i++) + for (i = 0; i < 4; i++) q->pitch_gain[i] = FFMIN(q->pitch_gain[i], max_pitch_gain); memset(q->frame.pfrac, 0, sizeof(q->frame.pfrac)); @@ -544,19 +505,17 @@ q->pitch_lag, q->frame.pfrac); // pitch prefilter update - for(i=0; i<4; i++) + for (i = 0; i < 4; i++) q->pitch_gain[i] = 0.5 * FFMIN(q->pitch_gain[i], 1.0); - v_pre_filtered = do_pitchfilter(q->pitch_pre_filter_mem, - v_synthesis_filtered, - q->pitch_gain, q->pitch_lag, - q->frame.pfrac); + v_pre_filtered = do_pitchfilter(q->pitch_pre_filter_mem, + v_synthesis_filtered, + q->pitch_gain, q->pitch_lag, + q->frame.pfrac); apply_gain_ctrl(cdn_vector, v_synthesis_filtered, v_pre_filtered); - }else - { - memcpy(q->pitch_synthesis_filter_mem, cdn_vector + 17, - 143 * sizeof(float)); + } else { + memcpy(q->pitch_synthesis_filter_mem, cdn_vector + 17, 143 * sizeof(float)); memcpy(q->pitch_pre_filter_mem, cdn_vector + 17, 143 * sizeof(float)); memset(q->pitch_gain, 0, sizeof(q->pitch_gain)); memset(q->pitch_lag, 0, sizeof(q->pitch_lag)); @@ -579,16 +538,15 @@ { double lsp[10]; double bandwidth_expansion_coeff = QCELP_BANDWIDTH_EXPANSION_COEFF; - int i; + int i; - for (i=0; i<10; i++) + for (i = 0; i < 10; i++) lsp[i] = cos(M_PI * lspf[i]); ff_acelp_lspd2lpc(lsp, lpc, 5); - for (i=0; i<10; i++) - { - lpc[i] *= bandwidth_expansion_coeff; + for (i = 0; i < 10; i++) { + lpc[i] *= bandwidth_expansion_coeff; bandwidth_expansion_coeff *= QCELP_BANDWIDTH_EXPANSION_COEFF; } } @@ -610,34 +568,32 @@ float interpolated_lspf[10]; float weight; - if(q->bitrate >= RATE_QUARTER) + if (q->bitrate >= RATE_QUARTER) weight = 0.25 * (subframe_num + 1); - else if(q->bitrate == RATE_OCTAVE && !subframe_num) + else if (q->bitrate == RATE_OCTAVE && !subframe_num) weight = 0.625; else weight = 1.0; - if(weight != 1.0) - { + if (weight != 1.0) { ff_weighted_vector_sumf(interpolated_lspf, curr_lspf, q->prev_lspf, weight, 1.0 - weight, 10); lspf2lpc(interpolated_lspf, lpc); - }else if(q->bitrate >= RATE_QUARTER || - (q->bitrate == I_F_Q && !subframe_num)) + } else if (q->bitrate >= RATE_QUARTER || + (q->bitrate == I_F_Q && !subframe_num)) lspf2lpc(curr_lspf, lpc); - else if(q->bitrate == SILENCE && !subframe_num) + else if (q->bitrate == SILENCE && !subframe_num) lspf2lpc(q->prev_lspf, lpc); } static qcelp_packet_rate buf_size2bitrate(const int buf_size) { - switch(buf_size) - { - case 35: return RATE_FULL; - case 17: return RATE_HALF; - case 8: return RATE_QUARTER; - case 4: return RATE_OCTAVE; - case 1: return SILENCE; + switch (buf_size) { + case 35: return RATE_FULL; + case 17: return RATE_HALF; + case 8: return RATE_QUARTER; + case 4: return RATE_OCTAVE; + case 1: return SILENCE; } return I_F_Q; @@ -655,39 +611,34 @@ * * TIA/EIA/IS-733 2.4.8.7.1 */ -static qcelp_packet_rate determine_bitrate(AVCodecContext *avctx, const int buf_size, - const uint8_t **buf) +static qcelp_packet_rate determine_bitrate(AVCodecContext *avctx, + const int buf_size, + const uint8_t **buf) { qcelp_packet_rate bitrate; - if((bitrate = buf_size2bitrate(buf_size)) >= 0) - { - if(bitrate > **buf) - { + if ((bitrate = buf_size2bitrate(buf_size)) >= 0) { + if (bitrate > **buf) { QCELPContext *q = avctx->priv_data; - if (!q->warned_buf_mismatch_bitrate) - { + if (!q->warned_buf_mismatch_bitrate) { av_log(avctx, AV_LOG_WARNING, "Claimed bitrate and buffer size mismatch.\n"); q->warned_buf_mismatch_bitrate = 1; } bitrate = **buf; - }else if(bitrate < **buf) - { + } else if (bitrate < **buf) { av_log(avctx, AV_LOG_ERROR, "Buffer is too small for the claimed bitrate.\n"); return I_F_Q; } (*buf)++; - }else if((bitrate = buf_size2bitrate(buf_size + 1)) >= 0) - { + } else if ((bitrate = buf_size2bitrate(buf_size + 1)) >= 0) { av_log(avctx, AV_LOG_WARNING, "Bitrate byte is missing, guessing the bitrate from packet size.\n"); - }else + } else return I_F_Q; - if(bitrate == SILENCE) - { + if (bitrate == SILENCE) { //FIXME: Remove experimental warning when tested with samples. av_log_ask_for_sample(avctx, "'Blank frame handling is experimental."); } @@ -697,8 +648,8 @@ static void warn_insufficient_frame_quality(AVCodecContext *avctx, const char *message) { - av_log(avctx, AV_LOG_WARNING, "Frame #%d, IFQ: %s\n", avctx->frame_number, - message); + av_log(avctx, AV_LOG_WARNING, "Frame #%d, IFQ: %s\n", + avctx->frame_number, message); } static void postfilter(QCELPContext *q, float *samples, float *lpc) @@ -720,75 +671,76 @@ ff_celp_lp_zero_synthesis_filterf(zero_out, lpc_s, q->formant_mem + 10, 160, 10); - memcpy(pole_out, q->postfilter_synth_mem, sizeof(float) * 10); + memcpy(pole_out, q->postfilter_synth_mem, sizeof(float) * 10); ff_celp_lp_synthesis_filterf(pole_out + 10, lpc_p, zero_out, 160, 10); memcpy(q->postfilter_synth_mem, pole_out + 160, sizeof(float) * 10); ff_tilt_compensation(&q->postfilter_tilt_mem, 0.3, pole_out + 10, 160); ff_adaptive_gain_control(samples, pole_out + 10, - ff_dot_productf(q->formant_mem + 10, q->formant_mem + 10, 160), - 160, 0.9375, &q->postfilter_agc_mem); + ff_dot_productf(q->formant_mem + 10, + q->formant_mem + 10, 160), + 160, 0.9375, &q->postfilter_agc_mem); } -static int qcelp_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - AVPacket *avpkt) +static int qcelp_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; - QCELPContext *q = avctx->priv_data; - float *outbuffer = data; - int i; + int buf_size = avpkt->size; + QCELPContext *q = avctx->priv_data; + float *outbuffer; + int i, ret; float quantized_lspf[10], lpc[10]; float gain[16]; float *formant_mem; - if((q->bitrate = determine_bitrate(avctx, buf_size, &buf)) == I_F_Q) - { + /* get output buffer */ + q->avframe.nb_samples = 160; + if ((ret = avctx->get_buffer(avctx, &q->avframe)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + outbuffer = (float *)q->avframe.data[0]; + + if ((q->bitrate = determine_bitrate(avctx, buf_size, &buf)) == I_F_Q) { warn_insufficient_frame_quality(avctx, "bitrate cannot be determined."); goto erasure; } - if(q->bitrate == RATE_OCTAVE && - (q->first16bits = AV_RB16(buf)) == 0xFFFF) - { + if (q->bitrate == RATE_OCTAVE && + (q->first16bits = AV_RB16(buf)) == 0xFFFF) { warn_insufficient_frame_quality(avctx, "Bitrate is 1/8 and first 16 bits are on."); goto erasure; } - if(q->bitrate > SILENCE) - { + if (q->bitrate > SILENCE) { const QCELPBitmap *bitmaps = qcelp_unpacking_bitmaps_per_rate[q->bitrate]; - const QCELPBitmap *bitmaps_end = qcelp_unpacking_bitmaps_per_rate[q->bitrate] - + qcelp_unpacking_bitmaps_lengths[q->bitrate]; - uint8_t *unpacked_data = (uint8_t *)&q->frame; + const QCELPBitmap *bitmaps_end = qcelp_unpacking_bitmaps_per_rate[q->bitrate] + + qcelp_unpacking_bitmaps_lengths[q->bitrate]; + uint8_t *unpacked_data = (uint8_t *)&q->frame; - init_get_bits(&q->gb, buf, 8*buf_size); + init_get_bits(&q->gb, buf, 8 * buf_size); memset(&q->frame, 0, sizeof(QCELPFrame)); - for(; bitmaps < bitmaps_end; bitmaps++) + for (; bitmaps < bitmaps_end; bitmaps++) unpacked_data[bitmaps->index] |= get_bits(&q->gb, bitmaps->bitlen) << bitmaps->bitpos; // Check for erasures/blanks on rates 1, 1/4 and 1/8. - if(q->frame.reserved) - { + if (q->frame.reserved) { warn_insufficient_frame_quality(avctx, "Wrong data in reserved frame area."); goto erasure; } - if(q->bitrate == RATE_QUARTER && - codebook_sanity_check_for_rate_quarter(q->frame.cbgain)) - { + if (q->bitrate == RATE_QUARTER && + codebook_sanity_check_for_rate_quarter(q->frame.cbgain)) { warn_insufficient_frame_quality(avctx, "Codebook gain sanity check failed."); goto erasure; } - if(q->bitrate >= RATE_HALF) - { - for(i=0; i<4; i++) - { - if(q->frame.pfrac[i] && q->frame.plag[i] >= 124) - { + if (q->bitrate >= RATE_HALF) { + for (i = 0; i < 4; i++) { + if (q->frame.pfrac[i] && q->frame.plag[i] >= 124) { warn_insufficient_frame_quality(avctx, "Cannot initialize pitch filter."); goto erasure; } @@ -799,17 +751,14 @@ decode_gain_and_index(q, gain); compute_svector(q, gain, outbuffer); - if(decode_lspf(q, quantized_lspf) < 0) - { + if (decode_lspf(q, quantized_lspf) < 0) { warn_insufficient_frame_quality(avctx, "Badly received packets in frame."); goto erasure; } - apply_pitch_filters(q, outbuffer); - if(q->bitrate == I_F_Q) - { + if (q->bitrate == I_F_Q) { erasure: q->bitrate = I_F_Q; q->erasure_count++; @@ -817,15 +766,13 @@ compute_svector(q, gain, outbuffer); decode_lspf(q, quantized_lspf); apply_pitch_filters(q, outbuffer); - }else + } else q->erasure_count = 0; formant_mem = q->formant_mem + 10; - for(i=0; i<4; i++) - { + for (i = 0; i < 4; i++) { interpolate_lpc(q, quantized_lspf, lpc, i); - ff_celp_lp_synthesis_filterf(formant_mem, lpc, outbuffer + i * 40, 40, - 10); + ff_celp_lp_synthesis_filterf(formant_mem, lpc, outbuffer + i * 40, 40, 10); formant_mem += 40; } @@ -835,20 +782,21 @@ memcpy(q->formant_mem, q->formant_mem + 160, 10 * sizeof(float)); memcpy(q->prev_lspf, quantized_lspf, sizeof(q->prev_lspf)); - q->prev_bitrate = q->bitrate; + q->prev_bitrate = q->bitrate; - *data_size = 160 * sizeof(*outbuffer); + *got_frame_ptr = 1; + *(AVFrame *)data = q->avframe; - return *data_size; + return buf_size; } -AVCodec ff_qcelp_decoder = -{ - .name = "qcelp", - .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_QCELP, - .init = qcelp_decode_init, - .decode = qcelp_decode_frame, +AVCodec ff_qcelp_decoder = { + .name = "qcelp", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_QCELP, + .init = qcelp_decode_init, + .decode = qcelp_decode_frame, + .capabilities = CODEC_CAP_DR1, .priv_data_size = sizeof(QCELPContext), - .long_name = NULL_IF_CONFIG_SMALL("QCELP / PureVoice"), + .long_name = NULL_IF_CONFIG_SMALL("QCELP / PureVoice"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qdm2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qdm2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qdm2.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qdm2.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,7 @@ * @file * QDM2 decoder * @author Ewald Snel, Benjamin Larsson, Alex Beregszaszi, Roberto Togni + * * The decoder is not perfect yet, there are still some distortions * especially on files encoded with 16 or 8 subbands. */ @@ -34,7 +35,7 @@ #include #include -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "avcodec.h" #include "get_bits.h" #include "dsputil.h" @@ -76,6 +77,7 @@ #define SAMPLES_NEEDED_2(why) \ av_log (NULL,AV_LOG_INFO,"This file triggers some missing code. Please contact the developers.\nPosition: %s\n",why); +#define QDM2_MAX_FRAME_SIZE 512 typedef int8_t sb_int8_array[2][30][64]; @@ -128,6 +130,8 @@ * QDM2 decoder context */ typedef struct { + AVFrame frame; + /// Parameters from codec header, do not change during playback int nb_channels; ///< number of channels int channels; ///< number of channels @@ -168,7 +172,7 @@ /// I/O data const uint8_t *compressed_data; int compressed_size; - float output_buffer[1024]; + float output_buffer[QDM2_MAX_FRAME_SIZE * 2]; /// Synthesis filter MPADSPContext mpadsp; @@ -1353,6 +1357,8 @@ return; local_int_14 = (offset >> local_int_8); + if (local_int_14 >= FF_ARRAY_ELEMS(fft_level_index_table)) + return; if (q->nb_channels > 1) { channel = get_bits1(gb); @@ -1797,6 +1803,8 @@ avctx->channels = s->nb_channels = s->channels = AV_RB32(extradata); extradata += 4; + if (s->channels > MPA_MAX_CHANNELS) + return AVERROR_INVALIDDATA; avctx->sample_rate = AV_RB32(extradata); extradata += 4; @@ -1818,6 +1826,8 @@ // something like max decodable tones s->group_order = av_log2(s->group_size) + 1; s->frame_size = s->group_size / 16; // 16 iterations per super block + if (s->frame_size > QDM2_MAX_FRAME_SIZE) + return AVERROR_INVALIDDATA; s->sub_sampling = s->fft_order - 7; s->frequency_range = 255 / (1 << (2 - s->sub_sampling)); @@ -1867,6 +1877,9 @@ avctx->sample_fmt = AV_SAMPLE_FMT_S16; + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + // dump_context(s); return 0; } @@ -1944,23 +1957,27 @@ } -static int qdm2_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int qdm2_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; QDM2Context *s = avctx->priv_data; - int16_t *out = data; - int i; + int16_t *out; + int i, ret; if(!buf) return 0; if(buf_size < s->checksum_size) return -1; - av_log(avctx, AV_LOG_DEBUG, "decode(%d): %p[%d] -> %p[%d]\n", - buf_size, buf, s->checksum_size, data, *data_size); + /* get output buffer */ + s->frame.nb_samples = 16 * s->frame_size; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + out = (int16_t *)s->frame.data[0]; for (i = 0; i < 16; i++) { if (qdm2_decode(s, buf, out) < 0) @@ -1968,7 +1985,8 @@ out += s->channels * s->frame_size; } - *data_size = (uint8_t*)out - (uint8_t*)data; + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; return s->checksum_size; } @@ -1982,5 +2000,6 @@ .init = qdm2_decode_init, .close = qdm2_decode_close, .decode = qdm2_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("QDesign Music Codec 2"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qdm2_tablegen.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qdm2_tablegen.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qdm2_tablegen.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qdm2_tablegen.h 2012-01-11 00:34:30.000000000 +0000 @@ -90,7 +90,7 @@ static av_cold void init_noise_samples(void) { int i; - int random_seed = 0; + unsigned random_seed = 0; float delta = 1.0 / 16384.0; for (i = 0; i < 128;i++) { random_seed = random_seed * 214013 + 2531011; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qdrw.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qdrw.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qdrw.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qdrw.c 2012-01-11 00:34:30.000000000 +0000 @@ -37,6 +37,7 @@ AVPacket *avpkt) { const uint8_t *buf = avpkt->data; + const uint8_t *buf_end = avpkt->data + avpkt->size; int buf_size = avpkt->size; QdrawContext * const a = avctx->priv_data; AVFrame * const p= (AVFrame*)&a->pic; @@ -59,6 +60,8 @@ outdata = a->pic.data[0]; + if (buf_end - buf < 0x68 + 4) + return AVERROR_INVALIDDATA; buf += 0x68; /* jump to palette */ colors = AV_RB32(buf); buf += 4; @@ -67,6 +70,8 @@ av_log(avctx, AV_LOG_ERROR, "Error color count - %i(0x%X)\n", colors, colors); return -1; } + if (buf_end - buf < (colors + 1) * 8) + return AVERROR_INVALIDDATA; pal = (uint32_t*)p->data[1]; for (i = 0; i <= colors; i++) { @@ -89,6 +94,8 @@ } p->palette_has_changed = 1; + if (buf_end - buf < 18) + return AVERROR_INVALIDDATA; buf += 18; /* skip unneeded data */ for (i = 0; i < avctx->height; i++) { int size, left, code, pix; @@ -100,6 +107,9 @@ out = outdata; size = AV_RB16(buf); /* size of packed line */ buf += 2; + if (buf_end - buf < size) + return AVERROR_INVALIDDATA; + left = size; next = buf + size; while (left > 0) { @@ -115,6 +125,8 @@ } else { /* copy */ if ((out + code) > (outdata + a->pic.linesize[0])) break; + if (buf_end - buf < code + 1) + return AVERROR_INVALIDDATA; memcpy(out, buf, code + 1); out += code + 1; buf += code + 1; @@ -151,14 +163,13 @@ } AVCodec ff_qdraw_decoder = { - "qdraw", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_QDRAW, - sizeof(QdrawContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "qdraw", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_QDRAW, + .priv_data_size = sizeof(QdrawContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Apple QuickDraw"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qpeg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qpeg.c 2011-04-29 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qpeg.c 2012-01-11 00:34:30.000000000 +0000 @@ -307,14 +307,13 @@ } AVCodec ff_qpeg_decoder = { - "qpeg", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_QPEG, - sizeof(QpegContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "qpeg", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_QPEG, + .priv_data_size = sizeof(QpegContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Q-team QPEG"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qtrle.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qtrle.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qtrle.c 2011-04-16 05:56:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qtrle.c 2012-01-11 00:34:30.000000000 +0000 @@ -328,7 +328,6 @@ int rle_code; int pixel_ptr; int row_inc = s->frame.linesize[0]; - unsigned char a, r, g, b; unsigned int argb; unsigned char *rgb = s->frame.data[0]; int pixel_limit = s->frame.linesize[0] * s->avctx->height; @@ -347,16 +346,13 @@ /* decode the run length code */ rle_code = -rle_code; CHECK_STREAM_PTR(4); - a = s->buf[stream_ptr++]; - r = s->buf[stream_ptr++]; - g = s->buf[stream_ptr++]; - b = s->buf[stream_ptr++]; - argb = (a << 24) | (r << 16) | (g << 8) | (b << 0); + argb = AV_RB32(s->buf + stream_ptr); + stream_ptr += 4; CHECK_PIXEL_PTR(rle_code * 4); while (rle_code--) { - *(unsigned int *)(&rgb[pixel_ptr]) = argb; + AV_WN32A(rgb + pixel_ptr, argb); pixel_ptr += 4; } } else { @@ -365,13 +361,10 @@ /* copy pixels directly to output */ while (rle_code--) { - a = s->buf[stream_ptr++]; - r = s->buf[stream_ptr++]; - g = s->buf[stream_ptr++]; - b = s->buf[stream_ptr++]; - argb = (a << 24) | (r << 16) | (g << 8) | (b << 0); - *(unsigned int *)(&rgb[pixel_ptr]) = argb; - pixel_ptr += 4; + argb = AV_RB32(s->buf + stream_ptr); + AV_WN32A(rgb + pixel_ptr, argb); + stream_ptr += 4; + pixel_ptr += 4; } } } @@ -542,15 +535,14 @@ } AVCodec ff_qtrle_decoder = { - "qtrle", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_QTRLE, - sizeof(QtrleContext), - qtrle_decode_init, - NULL, - qtrle_decode_end, - qtrle_decode_frame, - CODEC_CAP_DR1, + .name = "qtrle", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_QTRLE, + .priv_data_size = sizeof(QtrleContext), + .init = qtrle_decode_init, + .close = qtrle_decode_end, + .decode = qtrle_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qtrleenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qtrleenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/qtrleenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/qtrleenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -322,13 +322,13 @@ } AVCodec ff_qtrle_encoder = { - "qtrle", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_QTRLE, - sizeof(QtrleEncContext), - qtrle_encode_init, - qtrle_encode_frame, - qtrle_encode_end, + .name = "qtrle", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_QTRLE, + .priv_data_size = sizeof(QtrleEncContext), + .init = qtrle_encode_init, + .encode = qtrle_encode_frame, + .close = qtrle_encode_end, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB555BE, PIX_FMT_ARGB, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/r210dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/r210dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/r210dec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/r210dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -98,29 +98,25 @@ #if CONFIG_R210_DECODER AVCodec ff_r210_decoder = { - "r210", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_R210, - 0, - decode_init, - NULL, - decode_close, - decode_frame, - CODEC_CAP_DR1, + .name = "r210", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_R210, + .init = decode_init, + .close = decode_close, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"), }; #endif #if CONFIG_R10K_DECODER AVCodec ff_r10k_decoder = { - "r10k", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_R10K, - 0, - decode_init, - NULL, - decode_close, - decode_frame, - CODEC_CAP_DR1, + .name = "r10k", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_R10K, + .init = decode_init, + .close = decode_close, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"), }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra144.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra144.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra144.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra144.c 2012-01-11 00:34:30.000000000 +0000 @@ -1544,22 +1544,22 @@ int ff_eval_refl(int *refl, const int16_t *coefs, AVCodecContext *avctx) { int b, i, j; - int buffer1[10]; - int buffer2[10]; + int buffer1[LPC_ORDER]; + int buffer2[LPC_ORDER]; int *bp1 = buffer1; int *bp2 = buffer2; - for (i=0; i < 10; i++) + for (i=0; i < LPC_ORDER; i++) buffer2[i] = coefs[i]; - refl[9] = bp2[9]; + refl[LPC_ORDER-1] = bp2[LPC_ORDER-1]; - if ((unsigned) bp2[9] + 0x1000 > 0x1fff) { + if ((unsigned) bp2[LPC_ORDER-1] + 0x1000 > 0x1fff) { av_log(avctx, AV_LOG_ERROR, "Overflow. Broken sample?\n"); return 1; } - for (i=8; i >= 0; i--) { + for (i = LPC_ORDER-2; i >= 0; i--) { b = 0x1000-((bp2[i+1] * bp2[i+1]) >> 12); if (!b) @@ -1584,12 +1584,12 @@ */ void ff_eval_coefs(int *coefs, const int *refl) { - int buffer[10]; + int buffer[LPC_ORDER]; int *b1 = buffer; int *b2 = coefs; int i, j; - for (i=0; i < 10; i++) { + for (i=0; i < LPC_ORDER; i++) { b1[i] = refl[i] << 4; for (j=0; j < i; j++) @@ -1598,7 +1598,7 @@ FFSWAP(int *, b1, b2); } - for (i=0; i < 10; i++) + for (i=0; i < LPC_ORDER; i++) coefs[i] >>= 4; } @@ -1606,7 +1606,7 @@ { int i; - for (i=0; i < 10; i++) + for (i = 0; i < LPC_ORDER; i++) *out++ = *inp++; } @@ -1629,9 +1629,9 @@ { int i; unsigned int res = 0x10000; - int b = 10; + int b = LPC_ORDER; - for (i=0; i < 10; i++) { + for (i = 0; i < LPC_ORDER; i++) { res = (((0x1000000 - data[i]*data[i]) >> 12) * res) >> 12; if (res == 0) @@ -1648,13 +1648,13 @@ int ff_interp(RA144Context *ractx, int16_t *out, int a, int copyold, int energy) { - int work[10]; + int work[LPC_ORDER]; int b = NBLOCKS - a; int i; // Interpolate block coefficients from the this frame's forth block and // last frame's forth block. - for (i=0; i<10; i++) + for (i = 0; i < LPC_ORDER; i++) out[i] = (a * ractx->lpc_coef[0][i] + b * ractx->lpc_coef[1][i])>> 2; if (ff_eval_refl(work, out, ractx->avctx)) { @@ -1690,7 +1690,7 @@ int cba_idx, int cb1_idx, int cb2_idx, int gval, int gain) { - uint16_t buffer_a[40]; + uint16_t buffer_a[BLOCKSIZE]; uint16_t *block; int m[3]; @@ -1711,10 +1711,10 @@ ff_add_wav(block, gain, cba_idx, m, cba_idx? buffer_a: NULL, ff_cb1_vects[cb1_idx], ff_cb2_vects[cb2_idx]); - memcpy(ractx->curr_sblock, ractx->curr_sblock + 40, - 10*sizeof(*ractx->curr_sblock)); + memcpy(ractx->curr_sblock, ractx->curr_sblock + BLOCKSIZE, + LPC_ORDER*sizeof(*ractx->curr_sblock)); - if (ff_celp_lp_synthesis_filter(ractx->curr_sblock + 10, lpc_coefs, - block, BLOCKSIZE, 10, 1, 0xfff)) - memset(ractx->curr_sblock, 0, 50*sizeof(*ractx->curr_sblock)); + if (ff_celp_lp_synthesis_filter(ractx->curr_sblock + LPC_ORDER, lpc_coefs, + block, BLOCKSIZE, LPC_ORDER, 1, 0xfff)) + memset(ractx->curr_sblock, 0, (LPC_ORDER+BLOCKSIZE)*sizeof(*ractx->curr_sblock)); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra144dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra144dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra144dec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra144dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -38,6 +38,10 @@ ractx->lpc_coef[1] = ractx->lpc_tables[1]; avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + avcodec_get_frame_defaults(&ractx->frame); + avctx->coded_frame = &ractx->frame; + return 0; } @@ -54,34 +58,40 @@ } /** Uncompress one block (20 bytes -> 160*2 bytes). */ -static int ra144_decode_frame(AVCodecContext * avctx, void *vdata, - int *data_size, AVPacket *avpkt) +static int ra144_decode_frame(AVCodecContext * avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - static const uint8_t sizes[10] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2}; - unsigned int refl_rms[4]; // RMS of the reflection coefficients - uint16_t block_coefs[4][10]; // LPC coefficients of each sub-block - unsigned int lpc_refl[10]; // LPC reflection coefficients of the frame + static const uint8_t sizes[LPC_ORDER] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2}; + unsigned int refl_rms[NBLOCKS]; // RMS of the reflection coefficients + uint16_t block_coefs[NBLOCKS][LPC_ORDER]; // LPC coefficients of each sub-block + unsigned int lpc_refl[LPC_ORDER]; // LPC reflection coefficients of the frame int i, j; - int16_t *data = vdata; + int ret; + int16_t *samples; unsigned int energy; RA144Context *ractx = avctx->priv_data; GetBitContext gb; - if (*data_size < 2*160) - return -1; + /* get output buffer */ + ractx->frame.nb_samples = NBLOCKS * BLOCKSIZE; + if ((ret = avctx->get_buffer(avctx, &ractx->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (int16_t *)ractx->frame.data[0]; - if(buf_size < 20) { + if(buf_size < FRAMESIZE) { av_log(avctx, AV_LOG_ERROR, "Frame too small (%d bytes). Truncated file?\n", buf_size); - *data_size = 0; + *got_frame_ptr = 0; return buf_size; } - init_get_bits(&gb, buf, 20 * 8); + init_get_bits(&gb, buf, FRAMESIZE * 8); - for (i=0; i<10; i++) + for (i = 0; i < LPC_ORDER; i++) lpc_refl[i] = ff_lpc_refl_cb[i][get_bits(&gb, sizes[i])]; ff_eval_coefs(ractx->lpc_coef[0], lpc_refl); @@ -98,11 +108,11 @@ ff_int_to_int16(block_coefs[3], ractx->lpc_coef[0]); - for (i=0; i < 4; i++) { + for (i=0; i < NBLOCKS; i++) { do_output_subblock(ractx, block_coefs[i], refl_rms[i], &gb); for (j=0; j < BLOCKSIZE; j++) - *data++ = av_clip_int16(ractx->curr_sblock[j + 10] << 2); + *samples++ = av_clip_int16(ractx->curr_sblock[j + 10] << 2); } ractx->old_energy = energy; @@ -110,19 +120,19 @@ FFSWAP(unsigned int *, ractx->lpc_coef[0], ractx->lpc_coef[1]); - *data_size = 2*160; - return 20; + *got_frame_ptr = 1; + *(AVFrame *)data = ractx->frame; + + return FRAMESIZE; } -AVCodec ff_ra_144_decoder = -{ - "real_144", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_RA_144, - sizeof(RA144Context), - ra144_decode_init, - NULL, - NULL, - ra144_decode_frame, - .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"), +AVCodec ff_ra_144_decoder = { + .name = "real_144", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_RA_144, + .priv_data_size = sizeof(RA144Context), + .init = ra144_decode_init, + .decode = ra144_decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra144enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra144enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra144enc.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra144enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -214,7 +214,7 @@ ff_celp_lp_synthesis_filterf(work, coefs, exc, BLOCKSIZE, LPC_ORDER); for (i = 0; i < BLOCKSIZE; i++) data[i] -= best_gain * work[i]; - return (best_vect - BLOCKSIZE / 2 + 1); + return best_vect - BLOCKSIZE / 2 + 1; } @@ -477,7 +477,10 @@ * The filter is unstable: use the coefficients of the previous frame. */ ff_int_to_int16(block_coefs[NBLOCKS - 1], ractx->lpc_coef[1]); - ff_eval_refl(lpc_refl, block_coefs[NBLOCKS - 1], avctx); + if (ff_eval_refl(lpc_refl, block_coefs[NBLOCKS - 1], avctx)) { + /* the filter is still unstable. set reflection coeffs to zero. */ + memset(lpc_refl, 0, sizeof(lpc_refl)); + } } init_put_bits(&pb, frame, buf_size); for (i = 0; i < LPC_ORDER; i++) { @@ -508,14 +511,15 @@ } -AVCodec ff_ra_144_encoder = -{ - "real_144", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_RA_144, - sizeof(RA144Context), - ra144_encode_init, - ra144_encode_frame, - ra144_encode_close, - .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K) encoder"), +AVCodec ff_ra_144_encoder = { + .name = "real_144", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_RA_144, + .priv_data_size = sizeof(RA144Context), + .init = ra144_encode_init, + .encode = ra144_encode_frame, + .close = ra144_encode_close, + .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_NONE }, + .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K) encoder"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra144.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra144.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra144.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra144.h 2012-01-11 00:34:30.000000000 +0000 @@ -34,6 +34,7 @@ typedef struct { AVCodecContext *avctx; + AVFrame frame; LPCContext lpc_ctx; unsigned int old_energy; ///< previous frame energy diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra288.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra288.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra288.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra288.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,20 +20,26 @@ */ #include "avcodec.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" #include "ra288.h" #include "lpc.h" #include "celp_math.h" #include "celp_filters.h" +#include "dsputil.h" #define MAX_BACKWARD_FILTER_ORDER 36 #define MAX_BACKWARD_FILTER_LEN 40 #define MAX_BACKWARD_FILTER_NONREC 35 +#define RA288_BLOCK_SIZE 5 +#define RA288_BLOCKS_PER_FRAME 32 + typedef struct { - float sp_lpc[36]; ///< LPC coefficients for speech data (spec: A) - float gain_lpc[10]; ///< LPC coefficients for gain (spec: GB) + AVFrame frame; + DSPContext dsp; + DECLARE_ALIGNED(16, float, sp_lpc)[FFALIGN(36, 8)]; ///< LPC coefficients for speech data (spec: A) + DECLARE_ALIGNED(16, float, gain_lpc)[FFALIGN(10, 8)]; ///< LPC coefficients for gain (spec: GB) /** speech data history (spec: SB). * Its first 70 coefficients are updated only at backward filtering. @@ -54,14 +60,14 @@ static av_cold int ra288_decode_init(AVCodecContext *avctx) { + RA288Context *ractx = avctx->priv_data; avctx->sample_fmt = AV_SAMPLE_FMT_FLT; - return 0; -} + dsputil_init(&ractx->dsp, avctx); -static void apply_window(float *tgt, const float *m1, const float *m2, int n) -{ - while (n--) - *tgt++ = *m1++ * *m2++; + avcodec_get_frame_defaults(&ractx->frame); + avctx->coded_frame = &ractx->frame; + + return 0; } static void convolve(float *tgt, const float *src, int len, int n) @@ -120,15 +126,18 @@ * @param out2 pointer to the recursive part of the output * @param window pointer to the windowing function table */ -static void do_hybrid_window(int order, int n, int non_rec, float *out, +static void do_hybrid_window(RA288Context *ractx, + int order, int n, int non_rec, float *out, float *hist, float *out2, const float *window) { int i; float buffer1[MAX_BACKWARD_FILTER_ORDER + 1]; float buffer2[MAX_BACKWARD_FILTER_ORDER + 1]; - float work[MAX_BACKWARD_FILTER_ORDER + MAX_BACKWARD_FILTER_LEN + MAX_BACKWARD_FILTER_NONREC]; + LOCAL_ALIGNED_16(float, work, [FFALIGN(MAX_BACKWARD_FILTER_ORDER + + MAX_BACKWARD_FILTER_LEN + + MAX_BACKWARD_FILTER_NONREC, 8)]); - apply_window(work, window, hist, order + n + non_rec); + ractx->dsp.vector_fmul(work, window, hist, FFALIGN(order + n + non_rec, 8)); convolve(buffer1, work + order , n , order); convolve(buffer2, work + order + n, non_rec, order); @@ -145,27 +154,28 @@ /** * Backward synthesis filter, find the LPC coefficients from past speech data. */ -static void backward_filter(float *hist, float *rec, const float *window, +static void backward_filter(RA288Context *ractx, + float *hist, float *rec, const float *window, float *lpc, const float *tab, int order, int n, int non_rec, int move_size) { float temp[MAX_BACKWARD_FILTER_ORDER+1]; - do_hybrid_window(order, n, non_rec, temp, hist, rec, window); + do_hybrid_window(ractx, order, n, non_rec, temp, hist, rec, window); if (!compute_lpc_coefs(temp, order, lpc, 0, 1, 1)) - apply_window(lpc, lpc, tab, order); + ractx->dsp.vector_fmul(lpc, lpc, tab, FFALIGN(order, 8)); memmove(hist, hist + n, move_size*sizeof(*hist)); } static int ra288_decode_frame(AVCodecContext * avctx, void *data, - int *data_size, AVPacket *avpkt) + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - float *out = data; - int i, j; + float *out; + int i, ret; RA288Context *ractx = avctx->priv_data; GetBitContext gb; @@ -173,45 +183,50 @@ av_log(avctx, AV_LOG_ERROR, "Error! Input buffer is too small [%d<%d]\n", buf_size, avctx->block_align); - return 0; + return AVERROR_INVALIDDATA; } - if (*data_size < 32*5*4) - return -1; + /* get output buffer */ + ractx->frame.nb_samples = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME; + if ((ret = avctx->get_buffer(avctx, &ractx->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + out = (float *)ractx->frame.data[0]; init_get_bits(&gb, buf, avctx->block_align * 8); - for (i=0; i < 32; i++) { + for (i=0; i < RA288_BLOCKS_PER_FRAME; i++) { float gain = amptable[get_bits(&gb, 3)]; int cb_coef = get_bits(&gb, 6 + (i&1)); decode(ractx, gain, cb_coef); - for (j=0; j < 5; j++) - *(out++) = ractx->sp_hist[70 + 36 + j]; + memcpy(out, &ractx->sp_hist[70 + 36], RA288_BLOCK_SIZE * sizeof(*out)); + out += RA288_BLOCK_SIZE; if ((i & 7) == 3) { - backward_filter(ractx->sp_hist, ractx->sp_rec, syn_window, + backward_filter(ractx, ractx->sp_hist, ractx->sp_rec, syn_window, ractx->sp_lpc, syn_bw_tab, 36, 40, 35, 70); - backward_filter(ractx->gain_hist, ractx->gain_rec, gain_window, + backward_filter(ractx, ractx->gain_hist, ractx->gain_rec, gain_window, ractx->gain_lpc, gain_bw_tab, 10, 8, 20, 28); } } - *data_size = (char *)out - (char *)data; + *got_frame_ptr = 1; + *(AVFrame *)data = ractx->frame; + return avctx->block_align; } -AVCodec ff_ra_288_decoder = -{ - "real_288", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_RA_288, - sizeof(RA288Context), - ra288_decode_init, - NULL, - NULL, - ra288_decode_frame, - .long_name = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"), +AVCodec ff_ra_288_decoder = { + .name = "real_288", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_RA_288, + .priv_data_size = sizeof(RA288Context), + .init = ra288_decode_init, + .decode = ra288_decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra288.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra288.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ra288.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ra288.h 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,7 @@ #define AVCODEC_RA288_H #include +#include "dsputil.h" static const float amptable[8]={ 0.515625, 0.90234375, 1.57910156, 2.76342773, @@ -96,7 +97,7 @@ { 3746, -606, 53, -269, -3301}, { 606, 2018, -1316, 4064, 398} }; -static const float syn_window[111]={ +DECLARE_ALIGNED(16, static const float, syn_window)[FFALIGN(111, 8)]={ 0.576690972, 0.580838025, 0.585013986, 0.589219987, 0.59345597, 0.597723007, 0.602020264, 0.606384277, 0.610748291, 0.615142822, 0.619598389, 0.624084473, 0.628570557, 0.633117676, 0.637695313, 0.642272949, 0.646911621, 0.651580811, @@ -118,7 +119,7 @@ 0.142852783, 0.0954284668,0.0477600098 }; -static const float gain_window[38]={ +DECLARE_ALIGNED(16, static const float, gain_window)[FFALIGN(38, 8)]={ 0.505699992, 0.524200022, 0.54339999, 0.563300014, 0.583953857, 0.60534668, 0.627502441, 0.650482178, 0.674316406, 0.699005127, 0.724578857, 0.75112915, 0.778625488, 0.807128906, 0.836669922, 0.86730957, 0.899078369, 0.932006836, @@ -129,7 +130,7 @@ }; /** synthesis bandwidth broadening table */ -static const float syn_bw_tab[36]={ +DECLARE_ALIGNED(16, static const float, syn_bw_tab)[FFALIGN(36, 8)] = { 0.98828125, 0.976699829, 0.965254128, 0.953942537, 0.942763507, 0.931715488, 0.920796931, 0.910006344, 0.899342179, 0.888803005, 0.878387332, 0.868093729, 0.857920766, 0.847867012, 0.837931097, 0.828111589, 0.818407178, 0.808816493, @@ -139,7 +140,7 @@ }; /** gain bandwidth broadening table */ -static const float gain_bw_tab[10]={ +DECLARE_ALIGNED(16, static const float, gain_bw_tab)[FFALIGN(10, 8)] = { 0.90625, 0.821289063, 0.74432373, 0.674499512, 0.61126709, 0.553955078, 0.50201416, 0.454956055, 0.41229248, 0.373657227 }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ratecontrol.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ratecontrol.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ratecontrol.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ratecontrol.c 2012-01-11 00:34:30.000000000 +0000 @@ -44,9 +44,9 @@ void ff_write_pass1_stats(MpegEncContext *s){ snprintf(s->avctx->stats_out, 256, "in:%d out:%d type:%d q:%d itex:%d ptex:%d mv:%d misc:%d fcode:%d bcode:%d mc-var:%d var:%d icount:%d skipcount:%d hbits:%d;\n", - s->current_picture_ptr->display_picture_number, s->current_picture_ptr->coded_picture_number, s->pict_type, - s->current_picture.quality, s->i_tex_bits, s->p_tex_bits, s->mv_bits, s->misc_bits, - s->f_code, s->b_code, s->current_picture.mc_mb_var_sum, s->current_picture.mb_var_sum, s->i_count, s->skip_count, s->header_bits); + s->current_picture_ptr->f.display_picture_number, s->current_picture_ptr->f.coded_picture_number, s->pict_type, + s->current_picture.f.quality, s->i_tex_bits, s->p_tex_bits, s->mv_bits, s->misc_bits, + s->f_code, s->b_code, s->current_picture.mc_mb_var_sum, s->current_picture.mb_var_sum, s->i_count, s->skip_count, s->header_bits); } static inline double qp2bits(RateControlEntry *rce, double qp){ @@ -300,7 +300,7 @@ } /** - * modifies the bitrate curve from pass1 for one frame + * Modify the bitrate curve from pass1 for one frame. */ static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_factor, int frame_num){ RateControlContext *rcc= &s->rc_context; @@ -404,7 +404,7 @@ } /** - * gets the qmin & qmax for pict_type + * Get the qmin & qmax for pict_type. */ static void get_qminmax(int *qmin_ret, int *qmax_ret, MpegEncContext *s, int pict_type){ int qmin= s->avctx->lmin; @@ -707,10 +707,10 @@ //if(dts_pic) // av_log(NULL, AV_LOG_ERROR, "%Ld %Ld %Ld %d\n", s->current_picture_ptr->pts, s->user_specified_pts, dts_pic->pts, picture_number); - if(!dts_pic || dts_pic->pts == AV_NOPTS_VALUE) + if (!dts_pic || dts_pic->f.pts == AV_NOPTS_VALUE) wanted_bits= (uint64_t)(s->bit_rate*(double)picture_number/fps); else - wanted_bits= (uint64_t)(s->bit_rate*(double)dts_pic->pts/fps); + wanted_bits = (uint64_t)(s->bit_rate*(double)dts_pic->f.pts / fps); } diff= s->total_bits - wanted_bits; @@ -861,7 +861,9 @@ /* find qscale */ for(i=0; inum_entries; i++){ + RateControlEntry *rce= &rcc->entry[i]; qscale[i]= get_qscale(s, &rcc->entry[i], rate_factor, i); + rcc->last_qscale_for[rce->pict_type] = qscale[i]; } assert(filter_size%2==1); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/raw.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/raw.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/raw.c 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/raw.c 2012-01-11 00:34:30.000000000 +0000 @@ -36,6 +36,7 @@ { PIX_FMT_YUV411P, MKTAG('Y', '4', '1', 'B') }, { PIX_FMT_YUV422P, MKTAG('Y', '4', '2', 'B') }, { PIX_FMT_YUV422P, MKTAG('P', '4', '2', '2') }, + { PIX_FMT_YUV422P, MKTAG('Y', 'V', '1', '6') }, /* yuvjXXX formats are deprecated hacks specific to libav*, they are identical to yuvXXX */ { PIX_FMT_YUVJ420P, MKTAG('I', '4', '2', '0') }, /* Planar formats */ @@ -44,7 +45,7 @@ { PIX_FMT_YUVJ422P, MKTAG('Y', '4', '2', 'B') }, { PIX_FMT_YUVJ422P, MKTAG('P', '4', '2', '2') }, { PIX_FMT_GRAY8, MKTAG('Y', '8', '0', '0') }, - { PIX_FMT_GRAY8, MKTAG(' ', ' ', 'Y', '8') }, + { PIX_FMT_GRAY8, MKTAG('Y', '8', ' ', ' ') }, { PIX_FMT_YUYV422, MKTAG('Y', 'U', 'Y', '2') }, /* Packed formats */ { PIX_FMT_YUYV422, MKTAG('Y', '4', '2', '2') }, @@ -107,6 +108,12 @@ { PIX_FMT_BGR48BE, MKTAG( 48, 'B', 'G', 'R') }, { PIX_FMT_GRAY16LE, MKTAG('Y', '1', 0 , 16 ) }, { PIX_FMT_GRAY16BE, MKTAG(16 , 0 , '1', 'Y') }, + { PIX_FMT_YUV420P10LE, MKTAG('Y', '3', 11 , 10 ) }, + { PIX_FMT_YUV420P10BE, MKTAG(10 , 11 , '3', 'Y') }, + { PIX_FMT_YUV422P10LE, MKTAG('Y', '3', 10 , 10 ) }, + { PIX_FMT_YUV422P10BE, MKTAG(10 , 10 , '3', 'Y') }, + { PIX_FMT_YUV444P10LE, MKTAG('Y', '3', 0 , 10 ) }, + { PIX_FMT_YUV444P10BE, MKTAG(10 , 0 , '3', 'Y') }, { PIX_FMT_YUV420P16LE, MKTAG('Y', '3', 11 , 16 ) }, { PIX_FMT_YUV420P16BE, MKTAG(16 , 11 , '3', 'Y') }, { PIX_FMT_YUV422P16LE, MKTAG('Y', '3', 10 , 16 ) }, @@ -135,6 +142,7 @@ /* special */ { PIX_FMT_RGB565LE,MKTAG( 3 , 0 , 0 , 0 ) }, /* flipped RGB565LE */ + { PIX_FMT_YUV444P, MKTAG('Y', 'V', '2', '4') }, /* YUV444P, swapped UV */ { PIX_FMT_NONE, 0 }, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rawdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rawdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rawdec.c 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rawdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -59,6 +59,7 @@ { PIX_FMT_RGB555BE, 16 }, { PIX_FMT_RGB24, 24 }, { PIX_FMT_ARGB, 32 }, + { PIX_FMT_MONOWHITE,33 }, { PIX_FMT_NONE, 0 }, }; @@ -122,6 +123,7 @@ AVFrame * frame = (AVFrame *) data; AVPicture * picture = (AVPicture *) data; + frame->pict_type = avctx->coded_frame->pict_type; frame->interlaced_frame = avctx->coded_frame->interlaced_frame; frame->top_field_first = avctx->coded_frame->top_field_first; frame->reordered_opaque = avctx->reordered_opaque; @@ -202,13 +204,12 @@ } AVCodec ff_rawvideo_decoder = { - "rawvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_RAWVIDEO, - sizeof(RawVideoContext), - raw_init_decoder, - NULL, - raw_close_decoder, - raw_decode, + .name = "rawvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_RAWVIDEO, + .priv_data_size = sizeof(RawVideoContext), + .init = raw_init_decoder, + .close = raw_close_decoder, + .decode = raw_decode, .long_name = NULL_IF_CONFIG_SMALL("raw video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rawenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rawenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rawenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rawenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -56,11 +56,11 @@ } AVCodec ff_rawvideo_encoder = { - "rawvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_RAWVIDEO, - sizeof(AVFrame), - raw_init_encoder, - raw_encode, + .name = "rawvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_RAWVIDEO, + .priv_data_size = sizeof(AVFrame), + .init = raw_init_encoder, + .encode = raw_encode, .long_name = NULL_IF_CONFIG_SMALL("raw video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/resample2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/resample2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/resample2.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/resample2.c 2012-01-11 00:34:30.000000000 +0000 @@ -90,7 +90,7 @@ } /** - * builds a polyphase filterbank. + * Build a polyphase filterbank. * @param factor resampling factor * @param scale wanted sum of coefficients for each filter * @param type 0->cubic, 1->blackman nuttall windowed sinc, 2..16->kaiser windowed sinc beta=2..16 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/resample.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/resample.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/resample.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/resample.c 2012-01-11 00:34:30.000000000 +0000 @@ -162,9 +162,10 @@ MAX_CHANNELS); return NULL; } - if (output_channels > 2 && - !(output_channels == 6 && input_channels == 2) && - output_channels != input_channels) { + if (output_channels != input_channels && + (input_channels > 2 || + output_channels > 2 && + !(output_channels == 6 && input_channels == 2))) { av_log(NULL, AV_LOG_ERROR, "Resampling output channel count must be 1 or 2 for mono input; 1, 2 or 6 for stereo input; or N for N channel input.\n"); return NULL; @@ -213,7 +214,6 @@ } } -#define TAPS 16 s->resample_context = av_resample_init(output_rate, input_rate, filter_length, log2_phase_count, linear, cutoff); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rl2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rl2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rl2.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rl2.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,11 +20,10 @@ */ /** - * RL2 Video Decoder * @file + * RL2 Video Decoder * @author Sascha Sommer (saschasommer@freenet.de) - * For more information about the RL2 format, visit: - * http://wiki.multimedia.cx/index.php?title=RL2 + * @see http://wiki.multimedia.cx/index.php?title=RL2 */ #include @@ -220,15 +219,14 @@ AVCodec ff_rl2_decoder = { - "rl2", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_RL2, - sizeof(Rl2Context), - rl2_decode_init, - NULL, - rl2_decode_end, - rl2_decode_frame, - CODEC_CAP_DR1, + .name = "rl2", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_RL2, + .priv_data_size = sizeof(Rl2Context), + .init = rl2_decode_init, + .close = rl2_decode_end, + .decode = rl2_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("RL2 video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/roqaudioenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/roqaudioenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/roqaudioenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/roqaudioenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -154,14 +154,13 @@ } AVCodec ff_roq_dpcm_encoder = { - "roq_dpcm", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_ROQ_DPCM, - sizeof(ROQDPCMContext), - roq_dpcm_encode_init, - roq_dpcm_encode_frame, - roq_dpcm_encode_close, - NULL, + .name = "roq_dpcm", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_ROQ_DPCM, + .priv_data_size = sizeof(ROQDPCMContext), + .init = roq_dpcm_encode_init, + .encode = roq_dpcm_encode_frame, + .close = roq_dpcm_encode_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("id RoQ DPCM"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/roqvideodec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/roqvideodec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/roqvideodec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/roqvideodec.c 2012-01-11 00:34:30.000000000 +0000 @@ -175,6 +175,7 @@ RoqContext *s = avctx->priv_data; int copy= !s->current_frame->data[0]; + s->current_frame->reference = 3; if (avctx->reget_buffer(avctx, s->current_frame)) { av_log(avctx, AV_LOG_ERROR, " RoQ: get_buffer() failed\n"); return -1; @@ -211,14 +212,13 @@ } AVCodec ff_roq_decoder = { - "roqvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ROQ, - sizeof(RoqContext), - roq_decode_init, - NULL, - roq_decode_end, - roq_decode_frame, - CODEC_CAP_DR1, + .name = "roqvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ROQ, + .priv_data_size = sizeof(RoqContext), + .init = roq_decode_init, + .close = roq_decode_end, + .decode = roq_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("id RoQ video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/roqvideoenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/roqvideoenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/roqvideoenc.c 2011-03-23 03:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/roqvideoenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -1065,16 +1065,15 @@ return 0; } -AVCodec ff_roq_encoder = -{ - "roqvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ROQ, - sizeof(RoqContext), - roq_encode_init, - roq_encode_frame, - roq_encode_end, +AVCodec ff_roq_encoder = { + .name = "roqvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ROQ, + .priv_data_size = sizeof(RoqContext), + .init = roq_encode_init, + .encode = roq_encode_frame, + .close = roq_encode_end, .supported_framerates = (const AVRational[]){{30,1}, {0,0}}, - .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV444P, PIX_FMT_NONE}, - .long_name = NULL_IF_CONFIG_SMALL("id RoQ video"), + .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV444P, PIX_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("id RoQ video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rpza.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rpza.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rpza.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rpza.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,8 +30,8 @@ * Note that this decoder reads big endian RGB555 pixel values from the * bytestream, arranges them in the host's endian order, and outputs * them to the final rendered map in the same host endian order. This is - * intended behavior as the ffmpeg documentation states that RGB555 pixels - * shall be stored in native CPU endianness. + * intended behavior as the libavcodec documentation states that RGB555 + * pixels shall be stored in native CPU endianness. */ #include @@ -276,14 +276,13 @@ } AVCodec ff_rpza_decoder = { - "rpza", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_RPZA, - sizeof(RpzaContext), - rpza_decode_init, - NULL, - rpza_decode_end, - rpza_decode_frame, - CODEC_CAP_DR1, + .name = "rpza", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_RPZA, + .priv_data_size = sizeof(RpzaContext), + .init = rpza_decode_init, + .close = rpza_decode_end, + .decode = rpza_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("QuickTime video (RPZA)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rtjpeg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rtjpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rtjpeg.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rtjpeg.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,18 +27,18 @@ i = scan[coeff--]; \ block[i] = (c) * quant[i]; -//! aligns the bitstream to the give power of two +/// aligns the bitstream to the given power of two #define ALIGN(a) \ n = (-get_bits_count(gb)) & (a - 1); \ if (n) {skip_bits(gb, n);} /** - * \brief read one block from stream - * \param gb contains stream data - * \param block where data is written to - * \param scan array containing the mapping stream address -> block position - * \param quant quantization factors - * \return 0 means the block is not coded, < 0 means an error occurred. + * @brief read one block from stream + * @param gb contains stream data + * @param block where data is written to + * @param scan array containing the mapping stream address -> block position + * @param quant quantization factors + * @return 0 means the block is not coded, < 0 means an error occurred. * * Note: GetBitContext is used to make the code simpler, since all data is * aligned this could be done faster in a different way, e.g. as it is done @@ -56,7 +56,7 @@ // number of non-zero coefficients coeff = get_bits(gb, 6); - if (get_bits_count(gb) + (coeff << 1) >= gb->size_in_bits) + if (get_bits_left(gb) < (coeff << 1)) return -1; // normally we would only need to clear the (63 - coeff) last values, @@ -73,7 +73,7 @@ // 4 bits per coefficient ALIGN(4); - if (get_bits_count(gb) + (coeff << 2) >= gb->size_in_bits) + if (get_bits_left(gb) < (coeff << 2)) return -1; while (coeff) { ac = get_sbits(gb, 4); @@ -84,7 +84,7 @@ // 8 bits per coefficient ALIGN(8); - if (get_bits_count(gb) + (coeff << 3) >= gb->size_in_bits) + if (get_bits_left(gb) < (coeff << 3)) return -1; while (coeff) { ac = get_sbits(gb, 8); @@ -96,13 +96,13 @@ } /** - * \brief decode one rtjpeg YUV420 frame - * \param c context, must be initialized via rtjpeg_decode_init - * \param f AVFrame to place decoded frame into. If parts of the frame + * @brief decode one rtjpeg YUV420 frame + * @param c context, must be initialized via rtjpeg_decode_init + * @param f AVFrame to place decoded frame into. If parts of the frame * are not coded they are left unchanged, so consider initializing it - * \param buf buffer containing input data - * \param buf_size length of input data in bytes - * \return number of bytes consumed from the input buffer + * @param buf buffer containing input data + * @param buf_size length of input data in bytes + * @return number of bytes consumed from the input buffer */ int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, const uint8_t *buf, int buf_size) { @@ -114,24 +114,25 @@ init_get_bits(&gb, buf, buf_size * 8); for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { +#define BLOCK(quant, dst, stride) do { \ + int res = get_block(&gb, block, c->scan, quant); \ + if (res < 0) \ + return res; \ + if (res > 0) \ + c->dsp->idct_put(dst, stride, block); \ +} while (0) DCTELEM *block = c->block; - if (get_block(&gb, block, c->scan, c->lquant) > 0) - c->dsp->idct_put(y1, f->linesize[0], block); + BLOCK(c->lquant, y1, f->linesize[0]); y1 += 8; - if (get_block(&gb, block, c->scan, c->lquant) > 0) - c->dsp->idct_put(y1, f->linesize[0], block); + BLOCK(c->lquant, y1, f->linesize[0]); y1 += 8; - if (get_block(&gb, block, c->scan, c->lquant) > 0) - c->dsp->idct_put(y2, f->linesize[0], block); + BLOCK(c->lquant, y2, f->linesize[0]); y2 += 8; - if (get_block(&gb, block, c->scan, c->lquant) > 0) - c->dsp->idct_put(y2, f->linesize[0], block); + BLOCK(c->lquant, y2, f->linesize[0]); y2 += 8; - if (get_block(&gb, block, c->scan, c->cquant) > 0) - c->dsp->idct_put(u, f->linesize[1], block); + BLOCK(c->cquant, u, f->linesize[1]); u += 8; - if (get_block(&gb, block, c->scan, c->cquant) > 0) - c->dsp->idct_put(v, f->linesize[2], block); + BLOCK(c->cquant, v, f->linesize[2]); v += 8; } y1 += 2 * 8 * (f->linesize[0] - w); @@ -143,15 +144,15 @@ } /** - * \brief initialize an RTJpegContext, may be called multiple times - * \param c context to initialize - * \param dsp specifies the idct to use for decoding - * \param width width of image, will be rounded down to the nearest multiple + * @brief initialize an RTJpegContext, may be called multiple times + * @param c context to initialize + * @param dsp specifies the idct to use for decoding + * @param width width of image, will be rounded down to the nearest multiple * of 16 for decoding - * \param height height of image, will be rounded down to the nearest multiple + * @param height height of image, will be rounded down to the nearest multiple * of 16 for decoding - * \param lquant luma quantization table to use - * \param cquant chroma quantization table to use + * @param lquant luma quantization table to use + * @param cquant chroma quantization table to use */ void rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp, int width, int height, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv10.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv10.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv10.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv10.c 2012-01-11 00:34:30.000000000 +0000 @@ -34,6 +34,10 @@ //#define DEBUG +#define RV_GET_MAJOR_VER(x) ((x) >> 28) +#define RV_GET_MINOR_VER(x) (((x) >> 20) & 0xFF) +#define RV_GET_MICRO_VER(x) (((x) >> 12) & 0xFF) + #define DC_VLC_BITS 14 //FIXME find a better solution static const uint16_t rv_lum_code[256] = @@ -292,13 +296,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) { int seq, mb_pos, i; - - if(s->avctx->sub_id == 0x30202002 || s->avctx->sub_id == 0x30203002){ - if (get_bits(&s->gb, 3)){ - av_log(s->avctx, AV_LOG_ERROR, "unknown triplet set\n"); - return -1; - } - } + int rpr_bits; i= get_bits(&s->gb, 2); switch(i){ @@ -317,7 +315,7 @@ } if (get_bits1(&s->gb)){ - av_log(s->avctx, AV_LOG_ERROR, "unknown bit set\n"); + av_log(s->avctx, AV_LOG_ERROR, "reserved bit set\n"); return -1; } @@ -326,23 +324,21 @@ av_log(s->avctx, AV_LOG_ERROR, "error, qscale:0\n"); return -1; } - if(s->avctx->sub_id == 0x30203002){ - if (get_bits1(&s->gb)){ - av_log(s->avctx, AV_LOG_ERROR, "unknown bit2 set\n"); - return -1; - } - } - if(s->avctx->has_b_frames){ - int f, new_w, new_h; - int v= s->avctx->extradata_size >= 4 ? 7&((uint8_t*)s->avctx->extradata)[1] : 0; + if(RV_GET_MINOR_VER(s->avctx->sub_id) >= 2) + s->loop_filter = get_bits1(&s->gb); - if (get_bits1(&s->gb)){ - av_log(s->avctx, AV_LOG_ERROR, "unknown bit3 set\n"); - } - seq= get_bits(&s->gb, 13)<<2; + if(RV_GET_MINOR_VER(s->avctx->sub_id) <= 1) + seq = get_bits(&s->gb, 8) << 7; + else + seq = get_bits(&s->gb, 13) << 2; - f= get_bits(&s->gb, av_log2(v)+1); + rpr_bits = s->avctx->extradata[1] & 7; + if(rpr_bits){ + int f, new_w, new_h; + rpr_bits = FFMIN((rpr_bits >> 1) + 1, 3); + + f = get_bits(&s->gb, rpr_bits); if(f){ new_w= 4*((uint8_t*)s->avctx->extradata)[6+2*f]; @@ -364,19 +360,12 @@ } if(s->avctx->debug & FF_DEBUG_PICT_INFO){ - av_log(s->avctx, AV_LOG_DEBUG, "F %d/%d\n", f, v); + av_log(s->avctx, AV_LOG_DEBUG, "F %d/%d\n", f, rpr_bits); } - }else{ - seq= get_bits(&s->gb, 8)*128; } -// if(s->avctx->sub_id <= 0x20201002){ //0x20201002 definitely needs this - mb_pos= ff_h263_decode_mba(s); -/* }else{ - mb_pos= get_bits(&s->gb, av_log2(s->mb_num-1)+1); - s->mb_x= mb_pos % s->mb_width; - s->mb_y= mb_pos / s->mb_width; - }*/ + mb_pos = ff_h263_decode_mba(s); + //av_log(s->avctx, AV_LOG_DEBUG, "%d\n", seq); seq |= s->time &~0x7FFF; if(seq - s->time > 0x4000) seq -= 0x8000; @@ -403,6 +392,9 @@ av_log(s->avctx, AV_LOG_DEBUG, "\n");*/ s->no_rounding= get_bits1(&s->gb); + if(RV_GET_MINOR_VER(s->avctx->sub_id) <= 1 && s->pict_type == AV_PICTURE_TYPE_B) + skip_bits(&s->gb, 5); // binary decoder reads 3+2 bits here but they don't seem to be used + s->f_code = 1; s->unrestricted_mv = 1; s->h263_aic= s->pict_type == AV_PICTURE_TYPE_I; @@ -427,6 +419,7 @@ { MpegEncContext *s = avctx->priv_data; static int done=0; + int major_ver, minor_ver, micro_ver; if (avctx->extradata_size < 8) { av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n"); @@ -438,6 +431,7 @@ s->avctx= avctx; s->out_format = FMT_H263; s->codec_id= avctx->codec_id; + avctx->flags |= CODEC_FLAG_EMU_EDGE; s->orig_width = s->width = avctx->coded_width; s->orig_height= s->height = avctx->coded_height; @@ -445,32 +439,27 @@ s->h263_long_vectors= ((uint8_t*)avctx->extradata)[3] & 1; avctx->sub_id= AV_RB32((uint8_t*)avctx->extradata + 4); - if (avctx->sub_id == 0x10000000) { - s->rv10_version= 0; - s->low_delay=1; - } else if (avctx->sub_id == 0x10001000) { - s->rv10_version= 3; - s->low_delay=1; - } else if (avctx->sub_id == 0x10002000) { - s->rv10_version= 3; - s->low_delay=1; - s->obmc=1; - } else if (avctx->sub_id == 0x10003000) { - s->rv10_version= 3; - s->low_delay=1; - } else if (avctx->sub_id == 0x10003001) { - s->rv10_version= 3; - s->low_delay=1; - } else if ( avctx->sub_id == 0x20001000 - || (avctx->sub_id >= 0x20100000 && avctx->sub_id < 0x201a0000)) { - s->low_delay=1; - } else if ( avctx->sub_id == 0x30202002 - || avctx->sub_id == 0x30203002 - || (avctx->sub_id >= 0x20200002 && avctx->sub_id < 0x20300000)) { - s->low_delay=0; - s->avctx->has_b_frames=1; - } else + major_ver = RV_GET_MAJOR_VER(avctx->sub_id); + minor_ver = RV_GET_MINOR_VER(avctx->sub_id); + micro_ver = RV_GET_MICRO_VER(avctx->sub_id); + + s->low_delay = 1; + switch (major_ver) { + case 1: + s->rv10_version = micro_ver ? 3 : 1; + s->obmc = micro_ver == 2; + break; + case 2: + if (minor_ver >= 2) { + s->low_delay = 0; + s->avctx->has_b_frames = 1; + } + break; + default: av_log(s->avctx, AV_LOG_ERROR, "unknown header %X\n", avctx->sub_id); + av_log_missing_feature(avctx, "RV1/2 version", 1); + return AVERROR_PATCHWELCOME; + } if(avctx->debug & FF_DEBUG_PICT_INFO){ av_log(avctx, AV_LOG_DEBUG, "ver:%X ver0:%X\n", avctx->sub_id, avctx->extradata_size >= 4 ? ((uint32_t*)avctx->extradata)[0] : -1); @@ -542,6 +531,11 @@ if(MPV_frame_start(s, avctx) < 0) return -1; ff_er_frame_start(s); + } else { + if (s->current_picture_ptr->f.pict_type != s->pict_type) { + av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n"); + return -1; + } } av_dlog(avctx, "qscale=%d\n", s->qscale); @@ -615,7 +609,7 @@ if(ret == SLICE_END) break; } - ff_er_add_slice(s, start_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END|DC_END|MV_END); + ff_er_add_slice(s, start_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END); return s->gb.size_in_bits; } @@ -691,30 +685,28 @@ } AVCodec ff_rv10_decoder = { - "rv10", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_RV10, - sizeof(MpegEncContext), - rv10_decode_init, - NULL, - rv10_decode_end, - rv10_decode_frame, - CODEC_CAP_DR1, + .name = "rv10", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_RV10, + .priv_data_size = sizeof(MpegEncContext), + .init = rv10_decode_init, + .close = rv10_decode_end, + .decode = rv10_decode_frame, + .capabilities = CODEC_CAP_DR1, .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"), .pix_fmts= ff_pixfmt_list_420, }; AVCodec ff_rv20_decoder = { - "rv20", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_RV20, - sizeof(MpegEncContext), - rv10_decode_init, - NULL, - rv10_decode_end, - rv10_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DELAY, + .name = "rv20", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_RV20, + .priv_data_size = sizeof(MpegEncContext), + .init = rv10_decode_init, + .close = rv10_decode_end, + .decode = rv10_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY, .flush= ff_mpeg_flush, .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv10enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv10enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv10enc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv10enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -32,7 +32,7 @@ { int full_frame= 0; - align_put_bits(&s->pb); + avpriv_align_put_bits(&s->pb); put_bits(&s->pb, 1, 1); /* marker */ @@ -57,13 +57,13 @@ } AVCodec ff_rv10_encoder = { - "rv10", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_RV10, - sizeof(MpegEncContext), - MPV_encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "rv10", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_RV10, + .priv_data_size = sizeof(MpegEncContext), + .init = MPV_encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("RealVideo 1.0"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv20enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv20enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv20enc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv20enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -58,13 +58,13 @@ } AVCodec ff_rv20_encoder = { - "rv20", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_RV20, - sizeof(MpegEncContext), - MPV_encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "rv20", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_RV20, + .priv_data_size = sizeof(MpegEncContext), + .init = MPV_encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("RealVideo 2.0"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv30.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv30.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv30.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv30.c 2012-01-11 00:34:30.000000000 +0000 @@ -142,7 +142,7 @@ mb_pos = row * s->mb_stride; for(mb_x = 0; mb_x < s->mb_width; mb_x++, mb_pos++){ - int mbtype = s->current_picture_ptr->mb_type[mb_pos]; + int mbtype = s->current_picture_ptr->f.mb_type[mb_pos]; if(IS_INTRA(mbtype) || IS_SEPARATE_DC(mbtype)) r->deblock_coefs[mb_pos] = 0xFFFF; if(IS_INTRA(mbtype)) @@ -154,11 +154,11 @@ */ mb_pos = row * s->mb_stride; for(mb_x = 0; mb_x < s->mb_width; mb_x++, mb_pos++){ - cur_lim = rv30_loop_filt_lim[s->current_picture_ptr->qscale_table[mb_pos]]; + cur_lim = rv30_loop_filt_lim[s->current_picture_ptr->f.qscale_table[mb_pos]]; if(mb_x) - left_lim = rv30_loop_filt_lim[s->current_picture_ptr->qscale_table[mb_pos - 1]]; + left_lim = rv30_loop_filt_lim[s->current_picture_ptr->f.qscale_table[mb_pos - 1]]; for(j = 0; j < 16; j += 4){ - Y = s->current_picture_ptr->data[0] + mb_x*16 + (row*16 + j) * s->linesize + 4 * !mb_x; + Y = s->current_picture_ptr->f.data[0] + mb_x*16 + (row*16 + j) * s->linesize + 4 * !mb_x; for(i = !mb_x; i < 4; i++, Y += 4){ int ij = i + j; loc_lim = 0; @@ -178,7 +178,7 @@ if(mb_x) left_cbp = (r->cbp_chroma[mb_pos - 1] >> (k*4)) & 0xF; for(j = 0; j < 8; j += 4){ - C = s->current_picture_ptr->data[k+1] + mb_x*8 + (row*8 + j) * s->uvlinesize + 4 * !mb_x; + C = s->current_picture_ptr->f.data[k + 1] + mb_x*8 + (row*8 + j) * s->uvlinesize + 4 * !mb_x; for(i = !mb_x; i < 2; i++, C += 4){ int ij = i + (j >> 1); loc_lim = 0; @@ -196,11 +196,11 @@ } mb_pos = row * s->mb_stride; for(mb_x = 0; mb_x < s->mb_width; mb_x++, mb_pos++){ - cur_lim = rv30_loop_filt_lim[s->current_picture_ptr->qscale_table[mb_pos]]; + cur_lim = rv30_loop_filt_lim[s->current_picture_ptr->f.qscale_table[mb_pos]]; if(row) - top_lim = rv30_loop_filt_lim[s->current_picture_ptr->qscale_table[mb_pos - s->mb_stride]]; + top_lim = rv30_loop_filt_lim[s->current_picture_ptr->f.qscale_table[mb_pos - s->mb_stride]]; for(j = 4*!row; j < 16; j += 4){ - Y = s->current_picture_ptr->data[0] + mb_x*16 + (row*16 + j) * s->linesize; + Y = s->current_picture_ptr->f.data[0] + mb_x*16 + (row*16 + j) * s->linesize; for(i = 0; i < 4; i++, Y += 4){ int ij = i + j; loc_lim = 0; @@ -220,7 +220,7 @@ if(row) top_cbp = (r->cbp_chroma[mb_pos - s->mb_stride] >> (k*4)) & 0xF; for(j = 4*!row; j < 8; j += 4){ - C = s->current_picture_ptr->data[k+1] + mb_x*8 + (row*8 + j) * s->uvlinesize; + C = s->current_picture_ptr->f.data[k+1] + mb_x*8 + (row*8 + j) * s->uvlinesize; for(i = 0; i < 2; i++, C += 4){ int ij = i + (j >> 1); loc_lim = 0; @@ -256,6 +256,7 @@ if(avctx->extradata_size - 8 < (r->rpr - 1) * 2){ av_log(avctx, AV_LOG_ERROR, "Insufficient extradata - need at least %d bytes, got %d\n", 6 + r->rpr * 2, avctx->extradata_size); + return AVERROR(EINVAL); } r->parse_slice_header = rv30_parse_slice_header; r->decode_intra_types = rv30_decode_intra_types; @@ -267,16 +268,17 @@ } AVCodec ff_rv30_decoder = { - "rv30", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_RV30, - sizeof(RV34DecContext), - rv30_decode_init, - NULL, - ff_rv34_decode_end, - ff_rv34_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DELAY, - .flush = ff_mpeg_flush, - .long_name = NULL_IF_CONFIG_SMALL("RealVideo 3.0"), - .pix_fmts= ff_pixfmt_list_420, + .name = "rv30", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_RV30, + .priv_data_size = sizeof(RV34DecContext), + .init = rv30_decode_init, + .close = ff_rv34_decode_end, + .decode = ff_rv34_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_FRAME_THREADS, + .flush = ff_mpeg_flush, + .long_name = NULL_IF_CONFIG_SMALL("RealVideo 3.0"), + .pix_fmts = ff_pixfmt_list_420, + .init_thread_copy = ONLY_IF_THREADS_ENABLED(ff_rv34_decode_init_thread_copy), + .update_thread_context = ONLY_IF_THREADS_ENABLED(ff_rv34_decode_update_thread_context), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv30dsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv30dsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv30dsp.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv30dsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,13 +26,14 @@ #include "avcodec.h" #include "dsputil.h" +#include "rv34dsp.h" #define RV30_LOWPASS(OPNAME, OP) \ static av_unused void OPNAME ## rv30_tpel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, const int C1, const int C2){\ - const int h=8;\ + const int h = 8;\ uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\ int i;\ - for(i=0; i>4);\ OP(dst[1], (-(src[ 0]+src[3]) + src[1]*C1 + src[2]*C2 + 8)>>4);\ @@ -42,28 +43,28 @@ OP(dst[5], (-(src[ 4]+src[7]) + src[5]*C1 + src[6]*C2 + 8)>>4);\ OP(dst[6], (-(src[ 5]+src[8]) + src[6]*C1 + src[7]*C2 + 8)>>4);\ OP(dst[7], (-(src[ 6]+src[9]) + src[7]*C1 + src[8]*C2 + 8)>>4);\ - dst+=dstStride;\ - src+=srcStride;\ + dst += dstStride;\ + src += srcStride;\ }\ }\ \ static void OPNAME ## rv30_tpel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, const int C1, const int C2){\ - const int w=8;\ + const int w = 8;\ uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\ int i;\ - for(i=0; i>4);\ OP(dst[1*dstStride], (-(src0+src3) + src1*C1 + src2*C2 + 8)>>4);\ OP(dst[2*dstStride], (-(src1+src4) + src2*C1 + src3*C2 + 8)>>4);\ @@ -251,41 +252,49 @@ RV30_MC(avg_, 8) RV30_MC(avg_, 16) -av_cold void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx) { - c->put_rv30_tpel_pixels_tab[0][ 0] = c->put_h264_qpel_pixels_tab[0][0]; - c->put_rv30_tpel_pixels_tab[0][ 1] = put_rv30_tpel16_mc10_c; - c->put_rv30_tpel_pixels_tab[0][ 2] = put_rv30_tpel16_mc20_c; - c->put_rv30_tpel_pixels_tab[0][ 4] = put_rv30_tpel16_mc01_c; - c->put_rv30_tpel_pixels_tab[0][ 5] = put_rv30_tpel16_mc11_c; - c->put_rv30_tpel_pixels_tab[0][ 6] = put_rv30_tpel16_mc21_c; - c->put_rv30_tpel_pixels_tab[0][ 8] = put_rv30_tpel16_mc02_c; - c->put_rv30_tpel_pixels_tab[0][ 9] = put_rv30_tpel16_mc12_c; - c->put_rv30_tpel_pixels_tab[0][10] = put_rv30_tpel16_mc22_c; - c->avg_rv30_tpel_pixels_tab[0][ 0] = c->avg_h264_qpel_pixels_tab[0][0]; - c->avg_rv30_tpel_pixels_tab[0][ 1] = avg_rv30_tpel16_mc10_c; - c->avg_rv30_tpel_pixels_tab[0][ 2] = avg_rv30_tpel16_mc20_c; - c->avg_rv30_tpel_pixels_tab[0][ 4] = avg_rv30_tpel16_mc01_c; - c->avg_rv30_tpel_pixels_tab[0][ 5] = avg_rv30_tpel16_mc11_c; - c->avg_rv30_tpel_pixels_tab[0][ 6] = avg_rv30_tpel16_mc21_c; - c->avg_rv30_tpel_pixels_tab[0][ 8] = avg_rv30_tpel16_mc02_c; - c->avg_rv30_tpel_pixels_tab[0][ 9] = avg_rv30_tpel16_mc12_c; - c->avg_rv30_tpel_pixels_tab[0][10] = avg_rv30_tpel16_mc22_c; - c->put_rv30_tpel_pixels_tab[1][ 0] = c->put_h264_qpel_pixels_tab[1][0]; - c->put_rv30_tpel_pixels_tab[1][ 1] = put_rv30_tpel8_mc10_c; - c->put_rv30_tpel_pixels_tab[1][ 2] = put_rv30_tpel8_mc20_c; - c->put_rv30_tpel_pixels_tab[1][ 4] = put_rv30_tpel8_mc01_c; - c->put_rv30_tpel_pixels_tab[1][ 5] = put_rv30_tpel8_mc11_c; - c->put_rv30_tpel_pixels_tab[1][ 6] = put_rv30_tpel8_mc21_c; - c->put_rv30_tpel_pixels_tab[1][ 8] = put_rv30_tpel8_mc02_c; - c->put_rv30_tpel_pixels_tab[1][ 9] = put_rv30_tpel8_mc12_c; - c->put_rv30_tpel_pixels_tab[1][10] = put_rv30_tpel8_mc22_c; - c->avg_rv30_tpel_pixels_tab[1][ 0] = c->avg_h264_qpel_pixels_tab[1][0]; - c->avg_rv30_tpel_pixels_tab[1][ 1] = avg_rv30_tpel8_mc10_c; - c->avg_rv30_tpel_pixels_tab[1][ 2] = avg_rv30_tpel8_mc20_c; - c->avg_rv30_tpel_pixels_tab[1][ 4] = avg_rv30_tpel8_mc01_c; - c->avg_rv30_tpel_pixels_tab[1][ 5] = avg_rv30_tpel8_mc11_c; - c->avg_rv30_tpel_pixels_tab[1][ 6] = avg_rv30_tpel8_mc21_c; - c->avg_rv30_tpel_pixels_tab[1][ 8] = avg_rv30_tpel8_mc02_c; - c->avg_rv30_tpel_pixels_tab[1][ 9] = avg_rv30_tpel8_mc12_c; - c->avg_rv30_tpel_pixels_tab[1][10] = avg_rv30_tpel8_mc22_c; +av_cold void ff_rv30dsp_init(RV34DSPContext *c, DSPContext* dsp) { + + ff_rv34dsp_init(c, dsp); + + c->put_pixels_tab[0][ 0] = dsp->put_h264_qpel_pixels_tab[0][0]; + c->put_pixels_tab[0][ 1] = put_rv30_tpel16_mc10_c; + c->put_pixels_tab[0][ 2] = put_rv30_tpel16_mc20_c; + c->put_pixels_tab[0][ 4] = put_rv30_tpel16_mc01_c; + c->put_pixels_tab[0][ 5] = put_rv30_tpel16_mc11_c; + c->put_pixels_tab[0][ 6] = put_rv30_tpel16_mc21_c; + c->put_pixels_tab[0][ 8] = put_rv30_tpel16_mc02_c; + c->put_pixels_tab[0][ 9] = put_rv30_tpel16_mc12_c; + c->put_pixels_tab[0][10] = put_rv30_tpel16_mc22_c; + c->avg_pixels_tab[0][ 0] = dsp->avg_h264_qpel_pixels_tab[0][0]; + c->avg_pixels_tab[0][ 1] = avg_rv30_tpel16_mc10_c; + c->avg_pixels_tab[0][ 2] = avg_rv30_tpel16_mc20_c; + c->avg_pixels_tab[0][ 4] = avg_rv30_tpel16_mc01_c; + c->avg_pixels_tab[0][ 5] = avg_rv30_tpel16_mc11_c; + c->avg_pixels_tab[0][ 6] = avg_rv30_tpel16_mc21_c; + c->avg_pixels_tab[0][ 8] = avg_rv30_tpel16_mc02_c; + c->avg_pixels_tab[0][ 9] = avg_rv30_tpel16_mc12_c; + c->avg_pixels_tab[0][10] = avg_rv30_tpel16_mc22_c; + c->put_pixels_tab[1][ 0] = dsp->put_h264_qpel_pixels_tab[1][0]; + c->put_pixels_tab[1][ 1] = put_rv30_tpel8_mc10_c; + c->put_pixels_tab[1][ 2] = put_rv30_tpel8_mc20_c; + c->put_pixels_tab[1][ 4] = put_rv30_tpel8_mc01_c; + c->put_pixels_tab[1][ 5] = put_rv30_tpel8_mc11_c; + c->put_pixels_tab[1][ 6] = put_rv30_tpel8_mc21_c; + c->put_pixels_tab[1][ 8] = put_rv30_tpel8_mc02_c; + c->put_pixels_tab[1][ 9] = put_rv30_tpel8_mc12_c; + c->put_pixels_tab[1][10] = put_rv30_tpel8_mc22_c; + c->avg_pixels_tab[1][ 0] = dsp->avg_h264_qpel_pixels_tab[1][0]; + c->avg_pixels_tab[1][ 1] = avg_rv30_tpel8_mc10_c; + c->avg_pixels_tab[1][ 2] = avg_rv30_tpel8_mc20_c; + c->avg_pixels_tab[1][ 4] = avg_rv30_tpel8_mc01_c; + c->avg_pixels_tab[1][ 5] = avg_rv30_tpel8_mc11_c; + c->avg_pixels_tab[1][ 6] = avg_rv30_tpel8_mc21_c; + c->avg_pixels_tab[1][ 8] = avg_rv30_tpel8_mc02_c; + c->avg_pixels_tab[1][ 9] = avg_rv30_tpel8_mc12_c; + c->avg_pixels_tab[1][10] = avg_rv30_tpel8_mc22_c; + + c->put_chroma_pixels_tab[0] = dsp->put_h264_chroma_pixels_tab[0]; + c->put_chroma_pixels_tab[1] = dsp->put_h264_chroma_pixels_tab[1]; + c->avg_chroma_pixels_tab[0] = dsp->avg_h264_chroma_pixels_tab[0]; + c->avg_chroma_pixels_tab[1] = dsp->avg_h264_chroma_pixels_tab[1]; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,12 +24,16 @@ * RV30/40 decoder common data */ +#include "libavutil/internal.h" + #include "avcodec.h" #include "dsputil.h" #include "mpegvideo.h" #include "golomb.h" +#include "internal.h" #include "mathops.h" #include "rectangle.h" +#include "thread.h" #include "rv34vlc.h" #include "rv34data.h" @@ -62,8 +66,10 @@ static RV34VLC intra_vlcs[NUM_INTRA_TABLES], inter_vlcs[NUM_INTER_TABLES]; +static int rv34_decode_mv(RV34DecContext *r, int block_type); + /** - * @defgroup vlc RV30/40 VLC generating functions + * @name RV30/40 VLC generating functions * @{ */ @@ -169,84 +175,8 @@ /** @} */ // vlc group - -/** - * @defgroup transform RV30/40 inverse transform functions - * @{ - */ - -static av_always_inline void rv34_row_transform(int temp[16], DCTELEM *block) -{ - int i; - - for(i=0; i<4; i++){ - const int z0= 13*(block[i+8*0] + block[i+8*2]); - const int z1= 13*(block[i+8*0] - block[i+8*2]); - const int z2= 7* block[i+8*1] - 17*block[i+8*3]; - const int z3= 17* block[i+8*1] + 7*block[i+8*3]; - - temp[4*i+0]= z0+z3; - temp[4*i+1]= z1+z2; - temp[4*i+2]= z1-z2; - temp[4*i+3]= z0-z3; - } -} - -/** - * Real Video 3.0/4.0 inverse transform - * Code is almost the same as in SVQ3, only scaling is different. - */ -static void rv34_inv_transform(DCTELEM *block){ - int temp[16]; - int i; - - rv34_row_transform(temp, block); - - for(i=0; i<4; i++){ - const int z0= 13*(temp[4*0+i] + temp[4*2+i]) + 0x200; - const int z1= 13*(temp[4*0+i] - temp[4*2+i]) + 0x200; - const int z2= 7* temp[4*1+i] - 17*temp[4*3+i]; - const int z3= 17* temp[4*1+i] + 7*temp[4*3+i]; - - block[i*8+0]= (z0 + z3)>>10; - block[i*8+1]= (z1 + z2)>>10; - block[i*8+2]= (z1 - z2)>>10; - block[i*8+3]= (z0 - z3)>>10; - } - -} - -/** - * RealVideo 3.0/4.0 inverse transform for DC block - * - * Code is almost the same as rv34_inv_transform() - * but final coefficients are multiplied by 1.5 and have no rounding. - */ -static void rv34_inv_transform_noround(DCTELEM *block){ - int temp[16]; - int i; - - rv34_row_transform(temp, block); - - for(i=0; i<4; i++){ - const int z0= 13*(temp[4*0+i] + temp[4*2+i]); - const int z1= 13*(temp[4*0+i] - temp[4*2+i]); - const int z2= 7* temp[4*1+i] - 17*temp[4*3+i]; - const int z3= 17* temp[4*1+i] + 7*temp[4*3+i]; - - block[i*8+0]= ((z0 + z3)*3)>>11; - block[i*8+1]= ((z1 + z2)*3)>>11; - block[i*8+2]= ((z1 - z2)*3)>>11; - block[i*8+3]= ((z0 - z3)*3)>>11; - } - -} - -/** @} */ // transform - - /** - * @defgroup block RV30/40 4x4 block decoding functions + * @name RV30/40 4x4 block decoding functions * @{ */ @@ -286,7 +216,7 @@ /** * Get one coefficient value from the bistream and store it. */ -static inline void decode_coeff(DCTELEM *dst, int coef, int esc, GetBitContext *gb, VLC* vlc) +static inline void decode_coeff(DCTELEM *dst, int coef, int esc, GetBitContext *gb, VLC* vlc, int q) { if(coef){ if(coef == esc){ @@ -299,14 +229,34 @@ } if(get_bits1(gb)) coef = -coef; - *dst = coef; + *dst = (coef*q + 8) >> 4; } } /** * Decode 2x2 subblock of coefficients. */ -static inline void decode_subblock(DCTELEM *dst, int code, const int is_block2, GetBitContext *gb, VLC *vlc) +static inline void decode_subblock(DCTELEM *dst, int code, const int is_block2, GetBitContext *gb, VLC *vlc, int q) +{ + int coeffs[4]; + + coeffs[0] = modulo_three_table[code][0]; + coeffs[1] = modulo_three_table[code][1]; + coeffs[2] = modulo_three_table[code][2]; + coeffs[3] = modulo_three_table[code][3]; + decode_coeff(dst , coeffs[0], 3, gb, vlc, q); + if(is_block2){ + decode_coeff(dst+8, coeffs[1], 2, gb, vlc, q); + decode_coeff(dst+1, coeffs[2], 2, gb, vlc, q); + }else{ + decode_coeff(dst+1, coeffs[1], 2, gb, vlc, q); + decode_coeff(dst+8, coeffs[2], 2, gb, vlc, q); + } + decode_coeff(dst+9, coeffs[3], 2, gb, vlc, q); +} + +static inline void decode_subblock3(DCTELEM *dst, int code, const int is_block2, GetBitContext *gb, VLC *vlc, + int q_dc, int q_ac1, int q_ac2) { int coeffs[4]; @@ -314,15 +264,15 @@ coeffs[1] = modulo_three_table[code][1]; coeffs[2] = modulo_three_table[code][2]; coeffs[3] = modulo_three_table[code][3]; - decode_coeff(dst , coeffs[0], 3, gb, vlc); + decode_coeff(dst , coeffs[0], 3, gb, vlc, q_dc); if(is_block2){ - decode_coeff(dst+8, coeffs[1], 2, gb, vlc); - decode_coeff(dst+1, coeffs[2], 2, gb, vlc); + decode_coeff(dst+8, coeffs[1], 2, gb, vlc, q_ac1); + decode_coeff(dst+1, coeffs[2], 2, gb, vlc, q_ac1); }else{ - decode_coeff(dst+1, coeffs[1], 2, gb, vlc); - decode_coeff(dst+8, coeffs[2], 2, gb, vlc); + decode_coeff(dst+1, coeffs[1], 2, gb, vlc, q_ac1); + decode_coeff(dst+8, coeffs[2], 2, gb, vlc, q_ac1); } - decode_coeff(dst+9, coeffs[3], 2, gb, vlc); + decode_coeff(dst+9, coeffs[3], 2, gb, vlc, q_ac2); } /** @@ -336,7 +286,7 @@ * o--o */ -static inline void rv34_decode_block(DCTELEM *dst, GetBitContext *gb, RV34VLC *rvlc, int fc, int sc) +static inline void rv34_decode_block(DCTELEM *dst, GetBitContext *gb, RV34VLC *rvlc, int fc, int sc, int q_dc, int q_ac1, int q_ac2) { int code, pattern; @@ -345,55 +295,25 @@ pattern = code & 0x7; code >>= 3; - decode_subblock(dst, code, 0, gb, &rvlc->coefficient); + decode_subblock3(dst, code, 0, gb, &rvlc->coefficient, q_dc, q_ac1, q_ac2); if(pattern & 4){ code = get_vlc2(gb, rvlc->second_pattern[sc].table, 9, 2); - decode_subblock(dst + 2, code, 0, gb, &rvlc->coefficient); + decode_subblock(dst + 2, code, 0, gb, &rvlc->coefficient, q_ac2); } if(pattern & 2){ // Looks like coefficients 1 and 2 are swapped for this block code = get_vlc2(gb, rvlc->second_pattern[sc].table, 9, 2); - decode_subblock(dst + 8*2, code, 1, gb, &rvlc->coefficient); + decode_subblock(dst + 8*2, code, 1, gb, &rvlc->coefficient, q_ac2); } if(pattern & 1){ code = get_vlc2(gb, rvlc->third_pattern[sc].table, 9, 2); - decode_subblock(dst + 8*2+2, code, 0, gb, &rvlc->coefficient); + decode_subblock(dst + 8*2+2, code, 0, gb, &rvlc->coefficient, q_ac2); } } /** - * Dequantize ordinary 4x4 block. - * @todo optimize - */ -static inline void rv34_dequant4x4(DCTELEM *block, int Qdc, int Q) -{ - int i, j; - - block[0] = (block[0] * Qdc + 8) >> 4; - for(i = 0; i < 4; i++) - for(j = !i; j < 4; j++) - block[j + i*8] = (block[j + i*8] * Q + 8) >> 4; -} - -/** - * Dequantize 4x4 block of DC values for 16x16 macroblock. - * @todo optimize - */ -static inline void rv34_dequant4x4_16x16(DCTELEM *block, int Qdc, int Q) -{ - int i; - - for(i = 0; i < 3; i++) - block[rv34_dezigzag[i]] = (block[rv34_dezigzag[i]] * Qdc + 8) >> 4; - for(; i < 16; i++) - block[rv34_dezigzag[i]] = (block[rv34_dezigzag[i]] * Q + 8) >> 4; -} -/** @} */ //block functions - - -/** - * @defgroup rv3040_bitstream RV30/40 bitstream parsing + * @name RV30/40 bitstream parsing * @{ */ @@ -422,20 +342,75 @@ } /** - * Decode quantizer difference and return modified quantizer. + * Decode macroblock header and return CBP in case of success, -1 otherwise. */ -static inline int rv34_decode_dquant(GetBitContext *gb, int quant) +static int rv34_decode_mb_header(RV34DecContext *r, int8_t *intra_types) { - if(get_bits1(gb)) - return rv34_dquant_tab[get_bits1(gb)][quant]; - else - return get_bits(gb, 5); + MpegEncContext *s = &r->s; + GetBitContext *gb = &s->gb; + int mb_pos = s->mb_x + s->mb_y * s->mb_stride; + int i, t; + + if(!r->si.type){ + r->is16 = get_bits1(gb); + if(!r->is16 && !r->rv30){ + if(!get_bits1(gb)) + av_log(s->avctx, AV_LOG_ERROR, "Need DQUANT\n"); + } + s->current_picture_ptr->f.mb_type[mb_pos] = r->is16 ? MB_TYPE_INTRA16x16 : MB_TYPE_INTRA; + r->block_type = r->is16 ? RV34_MB_TYPE_INTRA16x16 : RV34_MB_TYPE_INTRA; + }else{ + r->block_type = r->decode_mb_info(r); + if(r->block_type == -1) + return -1; + s->current_picture_ptr->f.mb_type[mb_pos] = rv34_mb_type_to_lavc[r->block_type]; + r->mb_type[mb_pos] = r->block_type; + if(r->block_type == RV34_MB_SKIP){ + if(s->pict_type == AV_PICTURE_TYPE_P) + r->mb_type[mb_pos] = RV34_MB_P_16x16; + if(s->pict_type == AV_PICTURE_TYPE_B) + r->mb_type[mb_pos] = RV34_MB_B_DIRECT; + } + r->is16 = !!IS_INTRA16x16(s->current_picture_ptr->f.mb_type[mb_pos]); + rv34_decode_mv(r, r->block_type); + if(r->block_type == RV34_MB_SKIP){ + fill_rectangle(intra_types, 4, 4, r->intra_types_stride, 0, sizeof(intra_types[0])); + return 0; + } + r->chroma_vlc = 1; + r->luma_vlc = 0; + } + if(IS_INTRA(s->current_picture_ptr->f.mb_type[mb_pos])){ + if(r->is16){ + t = get_bits(gb, 2); + fill_rectangle(intra_types, 4, 4, r->intra_types_stride, t, sizeof(intra_types[0])); + r->luma_vlc = 2; + }else{ + if(r->decode_intra_types(r, gb, intra_types) < 0) + return -1; + r->luma_vlc = 1; + } + r->chroma_vlc = 0; + r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 0); + }else{ + for(i = 0; i < 16; i++) + intra_types[(i & 3) + (i>>2) * r->intra_types_stride] = 0; + r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 1); + if(r->mb_type[mb_pos] == RV34_MB_P_MIX16x16){ + r->is16 = 1; + r->chroma_vlc = 1; + r->luma_vlc = 2; + r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 0); + } + } + + return rv34_decode_cbp(gb, r->cur_vlcs, r->is16); } /** @} */ //bitstream functions /** - * @defgroup mv motion vector related code (prediction, reconstruction, motion compensation) + * @name motion vector related code (prediction, reconstruction, motion compensation) * @{ */ @@ -470,27 +445,27 @@ c_off = -1; if(r->avail_cache[avail_index - 1]){ - A[0] = s->current_picture_ptr->motion_val[0][mv_pos-1][0]; - A[1] = s->current_picture_ptr->motion_val[0][mv_pos-1][1]; + A[0] = s->current_picture_ptr->f.motion_val[0][mv_pos-1][0]; + A[1] = s->current_picture_ptr->f.motion_val[0][mv_pos-1][1]; } if(r->avail_cache[avail_index - 4]){ - B[0] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride][0]; - B[1] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride][1]; + B[0] = s->current_picture_ptr->f.motion_val[0][mv_pos-s->b8_stride][0]; + B[1] = s->current_picture_ptr->f.motion_val[0][mv_pos-s->b8_stride][1]; }else{ B[0] = A[0]; B[1] = A[1]; } if(!r->avail_cache[avail_index - 4 + c_off]){ if(r->avail_cache[avail_index - 4] && (r->avail_cache[avail_index - 1] || r->rv30)){ - C[0] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride-1][0]; - C[1] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride-1][1]; + C[0] = s->current_picture_ptr->f.motion_val[0][mv_pos-s->b8_stride-1][0]; + C[1] = s->current_picture_ptr->f.motion_val[0][mv_pos-s->b8_stride-1][1]; }else{ C[0] = A[0]; C[1] = A[1]; } }else{ - C[0] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride+c_off][0]; - C[1] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride+c_off][1]; + C[0] = s->current_picture_ptr->f.motion_val[0][mv_pos-s->b8_stride+c_off][0]; + C[1] = s->current_picture_ptr->f.motion_val[0][mv_pos-s->b8_stride+c_off][1]; } mx = mid_pred(A[0], B[0], C[0]); my = mid_pred(A[1], B[1], C[1]); @@ -498,8 +473,8 @@ my += r->dmv[dmv_no][1]; for(j = 0; j < part_sizes_h[block_type]; j++){ for(i = 0; i < part_sizes_w[block_type]; i++){ - s->current_picture_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][0] = mx; - s->current_picture_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][1] = my; + s->current_picture_ptr->f.motion_val[0][mv_pos + i + j*s->b8_stride][0] = mx; + s->current_picture_ptr->f.motion_val[0][mv_pos + i + j*s->b8_stride][1] = my; } } } @@ -511,12 +486,8 @@ */ static int calc_add_mv(RV34DecContext *r, int dir, int val) { - int refdist = GET_PTS_DIFF(r->next_pts, r->last_pts); - int dist = dir ? -GET_PTS_DIFF(r->next_pts, r->cur_pts) : GET_PTS_DIFF(r->cur_pts, r->last_pts); - int mul; + int mul = dir ? -r->weight2 : r->weight1; - if(!refdist) return 0; - mul = (dist << 14) / refdist; return (val * mul + 0x2000) >> 14; } @@ -554,28 +525,28 @@ int i, j; Picture *cur_pic = s->current_picture_ptr; const int mask = dir ? MB_TYPE_L1 : MB_TYPE_L0; - int type = cur_pic->mb_type[mb_pos]; + int type = cur_pic->f.mb_type[mb_pos]; memset(A, 0, sizeof(A)); memset(B, 0, sizeof(B)); memset(C, 0, sizeof(C)); if((r->avail_cache[6-1] & type) & mask){ - A[0] = cur_pic->motion_val[dir][mv_pos - 1][0]; - A[1] = cur_pic->motion_val[dir][mv_pos - 1][1]; + A[0] = cur_pic->f.motion_val[dir][mv_pos - 1][0]; + A[1] = cur_pic->f.motion_val[dir][mv_pos - 1][1]; has_A = 1; } if((r->avail_cache[6-4] & type) & mask){ - B[0] = cur_pic->motion_val[dir][mv_pos - s->b8_stride][0]; - B[1] = cur_pic->motion_val[dir][mv_pos - s->b8_stride][1]; + B[0] = cur_pic->f.motion_val[dir][mv_pos - s->b8_stride][0]; + B[1] = cur_pic->f.motion_val[dir][mv_pos - s->b8_stride][1]; has_B = 1; } if(r->avail_cache[6-4] && (r->avail_cache[6-2] & type) & mask){ - C[0] = cur_pic->motion_val[dir][mv_pos - s->b8_stride + 2][0]; - C[1] = cur_pic->motion_val[dir][mv_pos - s->b8_stride + 2][1]; + C[0] = cur_pic->f.motion_val[dir][mv_pos - s->b8_stride + 2][0]; + C[1] = cur_pic->f.motion_val[dir][mv_pos - s->b8_stride + 2][1]; has_C = 1; }else if((s->mb_x+1) == s->mb_width && (r->avail_cache[6-5] & type) & mask){ - C[0] = cur_pic->motion_val[dir][mv_pos - s->b8_stride - 1][0]; - C[1] = cur_pic->motion_val[dir][mv_pos - s->b8_stride - 1][1]; + C[0] = cur_pic->f.motion_val[dir][mv_pos - s->b8_stride - 1][0]; + C[1] = cur_pic->f.motion_val[dir][mv_pos - s->b8_stride - 1][1]; has_C = 1; } @@ -586,12 +557,12 @@ for(j = 0; j < 2; j++){ for(i = 0; i < 2; i++){ - cur_pic->motion_val[dir][mv_pos + i + j*s->b8_stride][0] = mx; - cur_pic->motion_val[dir][mv_pos + i + j*s->b8_stride][1] = my; + cur_pic->f.motion_val[dir][mv_pos + i + j*s->b8_stride][0] = mx; + cur_pic->f.motion_val[dir][mv_pos + i + j*s->b8_stride][1] = my; } } if(block_type == RV34_MB_B_BACKWARD || block_type == RV34_MB_B_FORWARD){ - ZERO8x2(cur_pic->motion_val[!dir][mv_pos], s->b8_stride); + ZERO8x2(cur_pic->f.motion_val[!dir][mv_pos], s->b8_stride); } } @@ -608,27 +579,27 @@ int avail_index = avail_indexes[0]; if(r->avail_cache[avail_index - 1]){ - A[0] = s->current_picture_ptr->motion_val[0][mv_pos-1][0]; - A[1] = s->current_picture_ptr->motion_val[0][mv_pos-1][1]; + A[0] = s->current_picture_ptr->f.motion_val[0][mv_pos - 1][0]; + A[1] = s->current_picture_ptr->f.motion_val[0][mv_pos - 1][1]; } if(r->avail_cache[avail_index - 4]){ - B[0] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride][0]; - B[1] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride][1]; + B[0] = s->current_picture_ptr->f.motion_val[0][mv_pos - s->b8_stride][0]; + B[1] = s->current_picture_ptr->f.motion_val[0][mv_pos - s->b8_stride][1]; }else{ B[0] = A[0]; B[1] = A[1]; } if(!r->avail_cache[avail_index - 4 + 2]){ if(r->avail_cache[avail_index - 4] && (r->avail_cache[avail_index - 1])){ - C[0] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride-1][0]; - C[1] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride-1][1]; + C[0] = s->current_picture_ptr->f.motion_val[0][mv_pos - s->b8_stride - 1][0]; + C[1] = s->current_picture_ptr->f.motion_val[0][mv_pos - s->b8_stride - 1][1]; }else{ C[0] = A[0]; C[1] = A[1]; } }else{ - C[0] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride+2][0]; - C[1] = s->current_picture_ptr->motion_val[0][mv_pos-s->b8_stride+2][1]; + C[0] = s->current_picture_ptr->f.motion_val[0][mv_pos - s->b8_stride + 2][0]; + C[1] = s->current_picture_ptr->f.motion_val[0][mv_pos - s->b8_stride + 2][1]; } mx = mid_pred(A[0], B[0], C[0]); my = mid_pred(A[1], B[1], C[1]); @@ -637,8 +608,8 @@ for(j = 0; j < 2; j++){ for(i = 0; i < 2; i++){ for(k = 0; k < 2; k++){ - s->current_picture_ptr->motion_val[k][mv_pos + i + j*s->b8_stride][0] = mx; - s->current_picture_ptr->motion_val[k][mv_pos + i + j*s->b8_stride][1] = my; + s->current_picture_ptr->f.motion_val[k][mv_pos + i + j*s->b8_stride][0] = mx; + s->current_picture_ptr->f.motion_val[k][mv_pos + i + j*s->b8_stride][1] = my; } } } @@ -664,7 +635,7 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type, const int xoff, const int yoff, int mv_off, const int width, const int height, int dir, - const int thirdpel, + const int thirdpel, int weighted, qpel_mc_func (*qpel_mc)[16], h264_chroma_mc_func (*chroma_mc)) { @@ -676,24 +647,24 @@ if(thirdpel){ int chroma_mx, chroma_my; - mx = (s->current_picture_ptr->motion_val[dir][mv_pos][0] + (3 << 24)) / 3 - (1 << 24); - my = (s->current_picture_ptr->motion_val[dir][mv_pos][1] + (3 << 24)) / 3 - (1 << 24); - lx = (s->current_picture_ptr->motion_val[dir][mv_pos][0] + (3 << 24)) % 3; - ly = (s->current_picture_ptr->motion_val[dir][mv_pos][1] + (3 << 24)) % 3; - chroma_mx = (s->current_picture_ptr->motion_val[dir][mv_pos][0] + 1) >> 1; - chroma_my = (s->current_picture_ptr->motion_val[dir][mv_pos][1] + 1) >> 1; + mx = (s->current_picture_ptr->f.motion_val[dir][mv_pos][0] + (3 << 24)) / 3 - (1 << 24); + my = (s->current_picture_ptr->f.motion_val[dir][mv_pos][1] + (3 << 24)) / 3 - (1 << 24); + lx = (s->current_picture_ptr->f.motion_val[dir][mv_pos][0] + (3 << 24)) % 3; + ly = (s->current_picture_ptr->f.motion_val[dir][mv_pos][1] + (3 << 24)) % 3; + chroma_mx = s->current_picture_ptr->f.motion_val[dir][mv_pos][0] / 2; + chroma_my = s->current_picture_ptr->f.motion_val[dir][mv_pos][1] / 2; umx = (chroma_mx + (3 << 24)) / 3 - (1 << 24); umy = (chroma_my + (3 << 24)) / 3 - (1 << 24); uvmx = chroma_coeffs[(chroma_mx + (3 << 24)) % 3]; uvmy = chroma_coeffs[(chroma_my + (3 << 24)) % 3]; }else{ int cx, cy; - mx = s->current_picture_ptr->motion_val[dir][mv_pos][0] >> 2; - my = s->current_picture_ptr->motion_val[dir][mv_pos][1] >> 2; - lx = s->current_picture_ptr->motion_val[dir][mv_pos][0] & 3; - ly = s->current_picture_ptr->motion_val[dir][mv_pos][1] & 3; - cx = s->current_picture_ptr->motion_val[dir][mv_pos][0] / 2; - cy = s->current_picture_ptr->motion_val[dir][mv_pos][1] / 2; + mx = s->current_picture_ptr->f.motion_val[dir][mv_pos][0] >> 2; + my = s->current_picture_ptr->f.motion_val[dir][mv_pos][1] >> 2; + lx = s->current_picture_ptr->f.motion_val[dir][mv_pos][0] & 3; + ly = s->current_picture_ptr->f.motion_val[dir][mv_pos][1] & 3; + cx = s->current_picture_ptr->f.motion_val[dir][mv_pos][0] / 2; + cy = s->current_picture_ptr->f.motion_val[dir][mv_pos][1] / 2; umx = cx >> 2; umy = cy >> 2; uvmx = (cx & 3) << 1; @@ -702,10 +673,18 @@ if(uvmx == 6 && uvmy == 6) uvmx = uvmy = 4; } + + if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME)) { + /* wait for the referenced mb row to be finished */ + int mb_row = FFMIN(s->mb_height - 1, s->mb_y + ((yoff + my + 21) >> 4)); + AVFrame *f = dir ? &s->next_picture_ptr->f : &s->last_picture_ptr->f; + ff_thread_await_progress(f, mb_row, 0); + } + dxy = ly*4 + lx; - srcY = dir ? s->next_picture_ptr->data[0] : s->last_picture_ptr->data[0]; - srcU = dir ? s->next_picture_ptr->data[1] : s->last_picture_ptr->data[1]; - srcV = dir ? s->next_picture_ptr->data[2] : s->last_picture_ptr->data[2]; + srcY = dir ? s->next_picture_ptr->f.data[0] : s->last_picture_ptr->f.data[0]; + srcU = dir ? s->next_picture_ptr->f.data[1] : s->last_picture_ptr->f.data[1]; + srcV = dir ? s->next_picture_ptr->f.data[2] : s->last_picture_ptr->f.data[2]; src_x = s->mb_x * 16 + xoff + mx; src_y = s->mb_y * 16 + yoff + my; uvsrc_x = s->mb_x * 8 + (xoff >> 1) + umx; @@ -713,9 +692,10 @@ srcY += src_y * s->linesize + src_x; srcU += uvsrc_y * s->uvlinesize + uvsrc_x; srcV += uvsrc_y * s->uvlinesize + uvsrc_x; - if( (unsigned)(src_x - !!lx*2) > s->h_edge_pos - !!lx*2 - (width <<3) - 4 - || (unsigned)(src_y - !!ly*2) > s->v_edge_pos - !!ly*2 - (height<<3) - 4){ - uint8_t *uvbuf= s->edge_emu_buffer + 22 * s->linesize; + if(s->h_edge_pos - (width << 3) < 6 || s->v_edge_pos - (height << 3) < 6 || + (unsigned)(src_x - !!lx*2) > s->h_edge_pos - !!lx*2 - (width <<3) - 4 || + (unsigned)(src_y - !!ly*2) > s->v_edge_pos - !!ly*2 - (height<<3) - 4) { + uint8_t *uvbuf = s->edge_emu_buffer + 22 * s->linesize; srcY -= 2 + 2*s->linesize; s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, (width<<3)+6, (height<<3)+6, @@ -728,9 +708,15 @@ srcU = uvbuf; srcV = uvbuf + 16; } - Y = s->dest[0] + xoff + yoff *s->linesize; - U = s->dest[1] + (xoff>>1) + (yoff>>1)*s->uvlinesize; - V = s->dest[2] + (xoff>>1) + (yoff>>1)*s->uvlinesize; + if(!weighted){ + Y = s->dest[0] + xoff + yoff *s->linesize; + U = s->dest[1] + (xoff>>1) + (yoff>>1)*s->uvlinesize; + V = s->dest[2] + (xoff>>1) + (yoff>>1)*s->uvlinesize; + }else{ + Y = r->tmp_b_block_y [dir] + xoff + yoff *s->linesize; + U = r->tmp_b_block_uv[dir*2] + (xoff>>1) + (yoff>>1)*s->uvlinesize; + V = r->tmp_b_block_uv[dir*2+1] + (xoff>>1) + (yoff>>1)*s->uvlinesize; + } if(block_type == RV34_MB_P_16x8){ qpel_mc[1][dxy](Y, srcY, s->linesize); @@ -751,43 +737,70 @@ const int xoff, const int yoff, int mv_off, const int width, const int height, int dir) { - rv34_mc(r, block_type, xoff, yoff, mv_off, width, height, dir, r->rv30, - r->rv30 ? r->s.dsp.put_rv30_tpel_pixels_tab - : r->s.dsp.put_rv40_qpel_pixels_tab, - r->rv30 ? r->s.dsp.put_h264_chroma_pixels_tab - : r->s.dsp.put_rv40_chroma_pixels_tab); + rv34_mc(r, block_type, xoff, yoff, mv_off, width, height, dir, r->rv30, 0, + r->rdsp.put_pixels_tab, + r->rdsp.put_chroma_pixels_tab); +} + +static void rv4_weight(RV34DecContext *r) +{ + r->rdsp.rv40_weight_pixels_tab[0](r->s.dest[0], + r->tmp_b_block_y[0], + r->tmp_b_block_y[1], + r->weight1, + r->weight2, + r->s.linesize); + r->rdsp.rv40_weight_pixels_tab[1](r->s.dest[1], + r->tmp_b_block_uv[0], + r->tmp_b_block_uv[2], + r->weight1, + r->weight2, + r->s.uvlinesize); + r->rdsp.rv40_weight_pixels_tab[1](r->s.dest[2], + r->tmp_b_block_uv[1], + r->tmp_b_block_uv[3], + r->weight1, + r->weight2, + r->s.uvlinesize); } static void rv34_mc_2mv(RV34DecContext *r, const int block_type) { - rv34_mc(r, block_type, 0, 0, 0, 2, 2, 0, r->rv30, - r->rv30 ? r->s.dsp.put_rv30_tpel_pixels_tab - : r->s.dsp.put_rv40_qpel_pixels_tab, - r->rv30 ? r->s.dsp.put_h264_chroma_pixels_tab - : r->s.dsp.put_rv40_chroma_pixels_tab); - rv34_mc(r, block_type, 0, 0, 0, 2, 2, 1, r->rv30, - r->rv30 ? r->s.dsp.avg_rv30_tpel_pixels_tab - : r->s.dsp.avg_rv40_qpel_pixels_tab, - r->rv30 ? r->s.dsp.avg_h264_chroma_pixels_tab - : r->s.dsp.avg_rv40_chroma_pixels_tab); + int weighted = !r->rv30 && block_type != RV34_MB_B_BIDIR && r->weight1 != 8192; + + rv34_mc(r, block_type, 0, 0, 0, 2, 2, 0, r->rv30, weighted, + r->rdsp.put_pixels_tab, + r->rdsp.put_chroma_pixels_tab); + if(!weighted){ + rv34_mc(r, block_type, 0, 0, 0, 2, 2, 1, r->rv30, 0, + r->rdsp.avg_pixels_tab, + r->rdsp.avg_chroma_pixels_tab); + }else{ + rv34_mc(r, block_type, 0, 0, 0, 2, 2, 1, r->rv30, 1, + r->rdsp.put_pixels_tab, + r->rdsp.put_chroma_pixels_tab); + rv4_weight(r); + } } static void rv34_mc_2mv_skip(RV34DecContext *r) { int i, j; + int weighted = !r->rv30 && r->weight1 != 8192; + for(j = 0; j < 2; j++) for(i = 0; i < 2; i++){ rv34_mc(r, RV34_MB_P_8x8, i*8, j*8, i+j*r->s.b8_stride, 1, 1, 0, r->rv30, - r->rv30 ? r->s.dsp.put_rv30_tpel_pixels_tab - : r->s.dsp.put_rv40_qpel_pixels_tab, - r->rv30 ? r->s.dsp.put_h264_chroma_pixels_tab - : r->s.dsp.put_rv40_chroma_pixels_tab); + weighted, + r->rdsp.put_pixels_tab, + r->rdsp.put_chroma_pixels_tab); rv34_mc(r, RV34_MB_P_8x8, i*8, j*8, i+j*r->s.b8_stride, 1, 1, 1, r->rv30, - r->rv30 ? r->s.dsp.avg_rv30_tpel_pixels_tab - : r->s.dsp.avg_rv40_qpel_pixels_tab, - r->rv30 ? r->s.dsp.avg_h264_chroma_pixels_tab - : r->s.dsp.avg_rv40_chroma_pixels_tab); + weighted, + weighted ? r->rdsp.put_pixels_tab : r->rdsp.avg_pixels_tab, + weighted ? r->rdsp.put_chroma_pixels_tab : r->rdsp.avg_chroma_pixels_tab); } + if(weighted) + rv4_weight(r); } /** number of motion vectors in each macroblock type */ @@ -813,31 +826,35 @@ switch(block_type){ case RV34_MB_TYPE_INTRA: case RV34_MB_TYPE_INTRA16x16: - ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); + ZERO8x2(s->current_picture_ptr->f.motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); return 0; case RV34_MB_SKIP: if(s->pict_type == AV_PICTURE_TYPE_P){ - ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); + ZERO8x2(s->current_picture_ptr->f.motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); rv34_mc_1mv (r, block_type, 0, 0, 0, 2, 2, 0); break; } case RV34_MB_B_DIRECT: //surprisingly, it uses motion scheme from next reference frame - next_bt = s->next_picture_ptr->mb_type[s->mb_x + s->mb_y * s->mb_stride]; + /* wait for the current mb row to be finished */ + if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME)) + ff_thread_await_progress(&s->next_picture_ptr->f, s->mb_y - 1, 0); + + next_bt = s->next_picture_ptr->f.mb_type[s->mb_x + s->mb_y * s->mb_stride]; if(IS_INTRA(next_bt) || IS_SKIP(next_bt)){ - ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); - ZERO8x2(s->current_picture_ptr->motion_val[1][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); + ZERO8x2(s->current_picture_ptr->f.motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); + ZERO8x2(s->current_picture_ptr->f.motion_val[1][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); }else for(j = 0; j < 2; j++) for(i = 0; i < 2; i++) for(k = 0; k < 2; k++) for(l = 0; l < 2; l++) - s->current_picture_ptr->motion_val[l][mv_pos + i + j*s->b8_stride][k] = calc_add_mv(r, l, s->next_picture_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][k]); + s->current_picture_ptr->f.motion_val[l][mv_pos + i + j*s->b8_stride][k] = calc_add_mv(r, l, s->next_picture_ptr->f.motion_val[0][mv_pos + i + j*s->b8_stride][k]); if(!(IS_16X8(next_bt) || IS_8X16(next_bt) || IS_8X8(next_bt))) //we can use whole macroblock MC rv34_mc_2mv(r, block_type); else rv34_mc_2mv_skip(r); - ZERO8x2(s->current_picture_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); + ZERO8x2(s->current_picture_ptr->f.motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); break; case RV34_MB_P_16x16: case RV34_MB_P_MIX16x16: @@ -885,7 +902,7 @@ /** @} */ // mv group /** - * @defgroup recons Macroblock reconstruction functions + * @name Macroblock reconstruction functions * @{ */ /** mapping of RV30/40 intra prediction types to standard H.264 types */ @@ -923,7 +940,7 @@ if(itype == VERT_LEFT_PRED) itype = VERT_LEFT_PRED_RV40_NODOWN; } if(!right && up){ - topleft = dst[-stride + 3] * 0x01010101; + topleft = dst[-stride + 3] * 0x01010101u; prev = (uint8_t*)&topleft; } r->h.pred4x4[itype](dst, prev, stride); @@ -1027,79 +1044,6 @@ } } -/** @} */ // recons group - -/** - * @addtogroup bitstream - * Decode macroblock header and return CBP in case of success, -1 otherwise. - */ -static int rv34_decode_mb_header(RV34DecContext *r, int8_t *intra_types) -{ - MpegEncContext *s = &r->s; - GetBitContext *gb = &s->gb; - int mb_pos = s->mb_x + s->mb_y * s->mb_stride; - int i, t; - - if(!r->si.type){ - r->is16 = get_bits1(gb); - if(!r->is16 && !r->rv30){ - if(!get_bits1(gb)) - av_log(s->avctx, AV_LOG_ERROR, "Need DQUANT\n"); - } - s->current_picture_ptr->mb_type[mb_pos] = r->is16 ? MB_TYPE_INTRA16x16 : MB_TYPE_INTRA; - r->block_type = r->is16 ? RV34_MB_TYPE_INTRA16x16 : RV34_MB_TYPE_INTRA; - }else{ - r->block_type = r->decode_mb_info(r); - if(r->block_type == -1) - return -1; - s->current_picture_ptr->mb_type[mb_pos] = rv34_mb_type_to_lavc[r->block_type]; - r->mb_type[mb_pos] = r->block_type; - if(r->block_type == RV34_MB_SKIP){ - if(s->pict_type == AV_PICTURE_TYPE_P) - r->mb_type[mb_pos] = RV34_MB_P_16x16; - if(s->pict_type == AV_PICTURE_TYPE_B) - r->mb_type[mb_pos] = RV34_MB_B_DIRECT; - } - r->is16 = !!IS_INTRA16x16(s->current_picture_ptr->mb_type[mb_pos]); - rv34_decode_mv(r, r->block_type); - if(r->block_type == RV34_MB_SKIP){ - fill_rectangle(intra_types, 4, 4, r->intra_types_stride, 0, sizeof(intra_types[0])); - return 0; - } - r->chroma_vlc = 1; - r->luma_vlc = 0; - } - if(IS_INTRA(s->current_picture_ptr->mb_type[mb_pos])){ - if(r->is16){ - t = get_bits(gb, 2); - fill_rectangle(intra_types, 4, 4, r->intra_types_stride, t, sizeof(intra_types[0])); - r->luma_vlc = 2; - }else{ - if(r->decode_intra_types(r, gb, intra_types) < 0) - return -1; - r->luma_vlc = 1; - } - r->chroma_vlc = 0; - r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 0); - }else{ - for(i = 0; i < 16; i++) - intra_types[(i & 3) + (i>>2) * r->intra_types_stride] = 0; - r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 1); - if(r->mb_type[mb_pos] == RV34_MB_P_MIX16x16){ - r->is16 = 1; - r->chroma_vlc = 1; - r->luma_vlc = 2; - r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 0); - } - } - - return rv34_decode_cbp(gb, r->cur_vlcs, r->is16); -} - -/** - * @addtogroup recons - * @{ - */ /** * mask for retrieving all bits in coded block pattern * corresponding to one 8x8 block @@ -1109,6 +1053,8 @@ #define U_CBP_MASK 0x0F0000 #define V_CBP_MASK 0xF00000 +/** @} */ // recons group + static void rv34_apply_differences(RV34DecContext *r, int cbp) { @@ -1142,7 +1088,7 @@ MpegEncContext *s = &r->s; int hmvmask = 0, vmvmask = 0, i, j; int midx = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride; - int16_t (*motion_val)[2] = &s->current_picture_ptr->motion_val[0][midx]; + int16_t (*motion_val)[2] = &s->current_picture_ptr->f.motion_val[0][midx]; for(j = 0; j < 16; j += 8){ for(i = 0; i < 2; i++){ if(is_mv_diff_gt_3(motion_val + i, 1)) @@ -1172,8 +1118,9 @@ MpegEncContext *s = &r->s; GetBitContext *gb = &s->gb; int cbp, cbp2; + int q_dc, q_ac; int i, blknum, blkoff; - DCTELEM block16[64]; + LOCAL_ALIGNED_16(DCTELEM, block16, [64]); int luma_dc_quant; int dist; int mb_pos = s->mb_x + s->mb_y * s->mb_stride; @@ -1184,14 +1131,14 @@ dist = (s->mb_x - s->resync_mb_x) + (s->mb_y - s->resync_mb_y) * s->mb_width; if(s->mb_x && dist) r->avail_cache[5] = - r->avail_cache[9] = s->current_picture_ptr->mb_type[mb_pos - 1]; + r->avail_cache[9] = s->current_picture_ptr->f.mb_type[mb_pos - 1]; if(dist >= s->mb_width) r->avail_cache[2] = - r->avail_cache[3] = s->current_picture_ptr->mb_type[mb_pos - s->mb_stride]; + r->avail_cache[3] = s->current_picture_ptr->f.mb_type[mb_pos - s->mb_stride]; if(((s->mb_x+1) < s->mb_width) && dist >= s->mb_width - 1) - r->avail_cache[4] = s->current_picture_ptr->mb_type[mb_pos - s->mb_stride + 1]; + r->avail_cache[4] = s->current_picture_ptr->f.mb_type[mb_pos - s->mb_stride + 1]; if(s->mb_x && dist > s->mb_width) - r->avail_cache[1] = s->current_picture_ptr->mb_type[mb_pos - s->mb_stride - 1]; + r->avail_cache[1] = s->current_picture_ptr->f.mb_type[mb_pos - s->mb_stride - 1]; s->qscale = r->si.quant; cbp = cbp2 = rv34_decode_mb_header(r, intra_types); @@ -1201,41 +1148,44 @@ r->deblock_coefs[mb_pos] = 0xFFFF; else r->deblock_coefs[mb_pos] = rv34_set_deblock_coef(r) | r->cbp_luma[mb_pos]; - s->current_picture_ptr->qscale_table[mb_pos] = s->qscale; + s->current_picture_ptr->f.qscale_table[mb_pos] = s->qscale; if(cbp == -1) return -1; luma_dc_quant = r->block_type == RV34_MB_P_MIX16x16 ? r->luma_dc_quant_p[s->qscale] : r->luma_dc_quant_i[s->qscale]; if(r->is16){ - memset(block16, 0, sizeof(block16)); - rv34_decode_block(block16, gb, r->cur_vlcs, 3, 0); - rv34_dequant4x4_16x16(block16, rv34_qscale_tab[luma_dc_quant],rv34_qscale_tab[s->qscale]); - rv34_inv_transform_noround(block16); + q_dc = rv34_qscale_tab[luma_dc_quant]; + q_ac = rv34_qscale_tab[s->qscale]; + memset(block16, 0, 64 * sizeof(*block16)); + rv34_decode_block(block16, gb, r->cur_vlcs, 3, 0, q_dc, q_dc, q_ac); + r->rdsp.rv34_inv_transform_tab[1](block16); } + q_ac = rv34_qscale_tab[s->qscale]; for(i = 0; i < 16; i++, cbp >>= 1){ if(!r->is16 && !(cbp & 1)) continue; blknum = ((i & 2) >> 1) + ((i & 8) >> 2); blkoff = ((i & 1) << 2) + ((i & 4) << 3); if(cbp & 1) - rv34_decode_block(s->block[blknum] + blkoff, gb, r->cur_vlcs, r->luma_vlc, 0); - rv34_dequant4x4(s->block[blknum] + blkoff, rv34_qscale_tab[s->qscale],rv34_qscale_tab[s->qscale]); + rv34_decode_block(s->block[blknum] + blkoff, gb, + r->cur_vlcs, r->luma_vlc, 0, q_ac, q_ac, q_ac); if(r->is16) //FIXME: optimize s->block[blknum][blkoff] = block16[(i & 3) | ((i & 0xC) << 1)]; - rv34_inv_transform(s->block[blknum] + blkoff); + r->rdsp.rv34_inv_transform_tab[0](s->block[blknum] + blkoff); } if(r->block_type == RV34_MB_P_MIX16x16) r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 1); + q_dc = rv34_qscale_tab[rv34_chroma_quant[1][s->qscale]]; + q_ac = rv34_qscale_tab[rv34_chroma_quant[0][s->qscale]]; for(; i < 24; i++, cbp >>= 1){ if(!(cbp & 1)) continue; blknum = ((i & 4) >> 2) + 4; blkoff = ((i & 1) << 2) + ((i & 2) << 4); - rv34_decode_block(s->block[blknum] + blkoff, gb, r->cur_vlcs, r->chroma_vlc, 1); - rv34_dequant4x4(s->block[blknum] + blkoff, rv34_qscale_tab[rv34_chroma_quant[1][s->qscale]],rv34_qscale_tab[rv34_chroma_quant[0][s->qscale]]); - rv34_inv_transform(s->block[blknum] + blkoff); + rv34_decode_block(s->block[blknum] + blkoff, gb, r->cur_vlcs, r->chroma_vlc, 1, q_dc, q_ac, q_ac); + r->rdsp.rv34_inv_transform_tab[0](s->block[blknum] + blkoff); } - if(IS_INTRA(s->current_picture_ptr->mb_type[mb_pos])) + if (IS_INTRA(s->current_picture_ptr->f.mb_type[mb_pos])) rv34_output_macroblock(r, intra_types, cbp2, r->is16); else rv34_apply_differences(r, cbp2); @@ -1252,21 +1202,12 @@ return 1; if(r->s.mb_skip_run > 1) return 0; - bits = r->bits - get_bits_count(&s->gb); + bits = get_bits_left(&s->gb); if(bits < 0 || (bits < 8 && !show_bits(&s->gb, bits))) return 1; return 0; } -static inline int slice_compare(SliceInfo *si1, SliceInfo *si2) -{ - return si1->type != si2->type || - si1->start >= si2->start || - si1->width != si2->width || - si1->height != si2->height|| - si1->pts != si2->pts; -} - static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int buf_size) { MpegEncContext *s = &r->s; @@ -1297,22 +1238,51 @@ r->cbp_luma = av_realloc(r->cbp_luma, r->s.mb_stride * r->s.mb_height * sizeof(*r->cbp_luma)); r->cbp_chroma = av_realloc(r->cbp_chroma, r->s.mb_stride * r->s.mb_height * sizeof(*r->cbp_chroma)); r->deblock_coefs = av_realloc(r->deblock_coefs, r->s.mb_stride * r->s.mb_height * sizeof(*r->deblock_coefs)); + av_freep(&r->tmp_b_block_base); } s->pict_type = r->si.type ? r->si.type : AV_PICTURE_TYPE_I; if(MPV_frame_start(s, s->avctx) < 0) return -1; ff_er_frame_start(s); + if (!r->tmp_b_block_base) { + int i; + + r->tmp_b_block_base = av_malloc(s->linesize * 48); + for (i = 0; i < 2; i++) + r->tmp_b_block_y[i] = r->tmp_b_block_base + i * 16 * s->linesize; + for (i = 0; i < 4; i++) + r->tmp_b_block_uv[i] = r->tmp_b_block_base + 32 * s->linesize + + (i >> 1) * 8 * s->uvlinesize + (i & 1) * 16; + } r->cur_pts = r->si.pts; if(s->pict_type != AV_PICTURE_TYPE_B){ r->last_pts = r->next_pts; r->next_pts = r->cur_pts; + }else{ + int refdist = GET_PTS_DIFF(r->next_pts, r->last_pts); + int dist0 = GET_PTS_DIFF(r->cur_pts, r->last_pts); + int dist1 = GET_PTS_DIFF(r->next_pts, r->cur_pts); + + if(!refdist){ + r->weight1 = r->weight2 = 8192; + }else{ + r->weight1 = (dist0 << 14) / refdist; + r->weight2 = (dist1 << 14) / refdist; + } } s->mb_x = s->mb_y = 0; + ff_thread_finish_setup(s->avctx); + } else { + int slice_type = r->si.type ? r->si.type : AV_PICTURE_TYPE_I; + + if (slice_type != s->pict_type) { + av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n"); + return AVERROR_INVALIDDATA; + } } r->si.end = end; s->qscale = r->si.quant; - r->bits = buf_size*8; s->mb_num_left = r->si.end - r->si.start; r->s.mb_skip_run = 0; @@ -1324,8 +1294,8 @@ } memset(r->intra_types_hist, -1, r->intra_types_stride * 4 * 2 * sizeof(*r->intra_types_hist)); s->first_slice_line = 1; - s->resync_mb_x= s->mb_x; - s->resync_mb_y= s->mb_y; + s->resync_mb_x = s->mb_x; + s->resync_mb_y = s->mb_y; ff_init_block_index(s); while(!check_slice_end(r, s)) { @@ -1333,7 +1303,7 @@ s->dsp.clear_blocks(s->block[0]); if(rv34_decode_macroblock(r, r->intra_types + s->mb_x * 4 + 4) < 0){ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_ERROR|DC_ERROR|MV_ERROR); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_ERROR); return -1; } if (++s->mb_x == s->mb_width) { @@ -1346,12 +1316,17 @@ if(r->loop_filter && s->mb_y >= 2) r->loop_filter(r, s->mb_y - 2); + + if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME)) + ff_thread_report_progress(&s->current_picture_ptr->f, + s->mb_y - 2, 0); + } if(s->mb_x == s->resync_mb_x) s->first_slice_line=0; s->mb_num_left--; } - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END|DC_END|MV_END); + ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END); return s->mb_y == s->mb_height; } @@ -1367,11 +1342,11 @@ MpegEncContext *s = &r->s; MPV_decode_defaults(s); - s->avctx= avctx; + s->avctx = avctx; s->out_format = FMT_H263; - s->codec_id= avctx->codec_id; + s->codec_id = avctx->codec_id; - s->width = avctx->width; + s->width = avctx->width; s->height = avctx->height; r->s.avctx = avctx; @@ -1384,7 +1359,16 @@ if (MPV_common_init(s) < 0) return -1; - ff_h264_pred_init(&r->h, CODEC_ID_RV40, 8); + ff_h264_pred_init(&r->h, CODEC_ID_RV40, 8, 1); + +#if CONFIG_RV30_DECODER + if (avctx->codec_id == CODEC_ID_RV30) + ff_rv30dsp_init(&r->rdsp, &r->s.dsp); +#endif +#if CONFIG_RV40_DECODER + if (avctx->codec_id == CODEC_ID_RV40) + ff_rv40dsp_init(&r->rdsp, &r->s.dsp); +#endif r->intra_types_stride = 4*s->mb_stride + 4; r->intra_types_hist = av_malloc(r->intra_types_stride * 4 * 2 * sizeof(*r->intra_types_hist)); @@ -1402,6 +1386,71 @@ return 0; } +int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx) +{ + RV34DecContext *r = avctx->priv_data; + + r->s.avctx = avctx; + + if (avctx->internal->is_copy) { + r->cbp_chroma = av_malloc(r->s.mb_stride * r->s.mb_height * + sizeof(*r->cbp_chroma)); + r->cbp_luma = av_malloc(r->s.mb_stride * r->s.mb_height * + sizeof(*r->cbp_luma)); + r->deblock_coefs = av_malloc(r->s.mb_stride * r->s.mb_height * + sizeof(*r->deblock_coefs)); + r->intra_types_hist = av_malloc(r->intra_types_stride * 4 * 2 * + sizeof(*r->intra_types_hist)); + r->mb_type = av_malloc(r->s.mb_stride * r->s.mb_height * + sizeof(*r->mb_type)); + + if (!(r->cbp_chroma && r->cbp_luma && r->deblock_coefs && + r->intra_types_hist && r->mb_type)) { + av_freep(&r->cbp_chroma); + av_freep(&r->cbp_luma); + av_freep(&r->deblock_coefs); + av_freep(&r->intra_types_hist); + av_freep(&r->mb_type); + r->intra_types = NULL; + return AVERROR(ENOMEM); + } + + r->intra_types = r->intra_types_hist + r->intra_types_stride * 4; + r->tmp_b_block_base = NULL; + + memset(r->mb_type, 0, r->s.mb_stride * r->s.mb_height * + sizeof(*r->mb_type)); + + MPV_common_init(&r->s); + } + return 0; +} + +int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src) +{ + RV34DecContext *r = dst->priv_data, *r1 = src->priv_data; + MpegEncContext * const s = &r->s, * const s1 = &r1->s; + int err; + + if (dst == src || !s1->context_initialized) + return 0; + + if ((err = ff_mpeg_update_thread_context(dst, src))) + return err; + + r->cur_pts = r1->cur_pts; + r->last_pts = r1->last_pts; + r->next_pts = r1->next_pts; + + memset(&r->si, 0, sizeof(r->si)); + + /* necessary since it is it the condition checked for in decode_slice + * to call MPV_frame_start. cmp. comment at the end of decode_frame */ + s->current_picture_ptr = NULL; + + return 0; +} + static int get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n) { if(avctx->slice_count) return avctx->slice_offset[n]; @@ -1427,8 +1476,8 @@ if (buf_size == 0) { /* special case for last picture */ if (s->low_delay==0 && s->next_picture_ptr) { - *pict= *(AVFrame*)s->next_picture_ptr; - s->next_picture_ptr= NULL; + *pict = *(AVFrame*)s->next_picture_ptr; + s->next_picture_ptr = NULL; *data_size = sizeof(AVFrame); } @@ -1439,41 +1488,48 @@ slice_count = (*buf++) + 1; slices_hdr = buf + 4; buf += 8 * slice_count; + buf_size -= 1 + 8 * slice_count; }else slice_count = avctx->slice_count; //parse first slice header to check whether this frame can be decoded - if(get_slice_offset(avctx, slices_hdr, 0) > buf_size){ - av_log(avctx, AV_LOG_ERROR, "Slice offset is greater than frame size\n"); + if(get_slice_offset(avctx, slices_hdr, 0) < 0 || + get_slice_offset(avctx, slices_hdr, 0) > buf_size){ + av_log(avctx, AV_LOG_ERROR, "Slice offset is invalid\n"); return -1; } - init_get_bits(&s->gb, buf+get_slice_offset(avctx, slices_hdr, 0), buf_size-get_slice_offset(avctx, slices_hdr, 0)); + init_get_bits(&s->gb, buf+get_slice_offset(avctx, slices_hdr, 0), (buf_size-get_slice_offset(avctx, slices_hdr, 0))*8); if(r->parse_slice_header(r, &r->s.gb, &si) < 0 || si.start){ av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n"); return -1; } - if((!s->last_picture_ptr || !s->last_picture_ptr->data[0]) && si.type == AV_PICTURE_TYPE_B) + if ((!s->last_picture_ptr || !s->last_picture_ptr->f.data[0]) && si.type == AV_PICTURE_TYPE_B) return -1; if( (avctx->skip_frame >= AVDISCARD_NONREF && si.type==AV_PICTURE_TYPE_B) || (avctx->skip_frame >= AVDISCARD_NONKEY && si.type!=AV_PICTURE_TYPE_I) || avctx->skip_frame >= AVDISCARD_ALL) - return buf_size; + return avpkt->size; - for(i=0; i buf_size){ - av_log(avctx, AV_LOG_ERROR, "Slice offset is greater than frame size\n"); + if(offset < 0 || offset > buf_size){ + av_log(avctx, AV_LOG_ERROR, "Slice offset is invalid\n"); break; } r->si.end = s->mb_width * s->mb_height; if(i+1 < slice_count){ + if (get_slice_offset(avctx, slices_hdr, i+1) < 0 || + get_slice_offset(avctx, slices_hdr, i+1) > buf_size) { + av_log(avctx, AV_LOG_ERROR, "Slice offset is invalid\n"); + break; + } init_get_bits(&s->gb, buf+get_slice_offset(avctx, slices_hdr, i+1), (buf_size-get_slice_offset(avctx, slices_hdr, i+1))*8); if(r->parse_slice_header(r, &r->s.gb, &si) < 0){ if(i+2 < slice_count) @@ -1483,30 +1539,37 @@ }else r->si.end = si.start; } + if (size < 0 || size > buf_size - offset) { + av_log(avctx, AV_LOG_ERROR, "Slice size is invalid\n"); + break; + } last = rv34_decode_slice(r, r->si.end, buf + offset, size); s->mb_num_left = r->s.mb_x + r->s.mb_y*r->s.mb_width - r->si.start; if(last) break; } - if(last){ + if(last && s->current_picture_ptr){ if(r->loop_filter) r->loop_filter(r, s->mb_height - 1); + if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME)) + ff_thread_report_progress(&s->current_picture_ptr->f, + s->mb_height - 1, 0); ff_er_frame_end(s); MPV_frame_end(s); if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { - *pict= *(AVFrame*)s->current_picture_ptr; + *pict = *(AVFrame*)s->current_picture_ptr; } else if (s->last_picture_ptr != NULL) { - *pict= *(AVFrame*)s->last_picture_ptr; + *pict = *(AVFrame*)s->last_picture_ptr; } if(s->last_picture_ptr || s->low_delay){ *data_size = sizeof(AVFrame); ff_print_debug_info(s, pict); } - s->current_picture_ptr= NULL; //so we can detect if frame_end wasnt called (find some nicer solution...) + s->current_picture_ptr = NULL; //so we can detect if frame_end wasnt called (find some nicer solution...) } - return buf_size; + return avpkt->size; } av_cold int ff_rv34_decode_end(AVCodecContext *avctx) @@ -1517,6 +1580,7 @@ av_freep(&r->intra_types_hist); r->intra_types = NULL; + av_freep(&r->tmp_b_block_base); av_freep(&r->mb_type); av_freep(&r->cbp_luma); av_freep(&r->cbp_chroma); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34data.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34data.h 2012-01-11 00:34:30.000000000 +0000 @@ -101,16 +101,6 @@ }; /** - * 4x4 dezigzag pattern - */ -static const uint8_t rv34_dezigzag[16] = { - 0, 1, 8, 16, - 9, 2, 3, 10, - 17, 24, 25, 18, - 11, 19, 26, 27 -}; - -/** * tables used to translate a quantizer value into a VLC set for decoding * The first table is used for intraframes. */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34dsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34dsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34dsp.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34dsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * RV30/40 decoder common dsp functions + * Copyright (c) 2007 Mike Melanson, Konstantin Shishkov + * Copyright (c) 2011 Janne Grunau + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * RV30/40 decoder common dsp functions + */ +#include "dsputil.h" +#include "rv34dsp.h" + +/** + * @name RV30/40 inverse transform functions + * @{ + */ + +static av_always_inline void rv34_row_transform(int temp[16], DCTELEM *block) +{ + int i; + + for(i = 0; i < 4; i++){ + const int z0 = 13*(block[i+8*0] + block[i+8*2]); + const int z1 = 13*(block[i+8*0] - block[i+8*2]); + const int z2 = 7* block[i+8*1] - 17*block[i+8*3]; + const int z3 = 17* block[i+8*1] + 7*block[i+8*3]; + + temp[4*i+0] = z0 + z3; + temp[4*i+1] = z1 + z2; + temp[4*i+2] = z1 - z2; + temp[4*i+3] = z0 - z3; + } +} + +/** + * Real Video 3.0/4.0 inverse transform + * Code is almost the same as in SVQ3, only scaling is different. + */ +static void rv34_inv_transform_c(DCTELEM *block){ + int temp[16]; + int i; + + rv34_row_transform(temp, block); + + for(i = 0; i < 4; i++){ + const int z0 = 13*(temp[4*0+i] + temp[4*2+i]) + 0x200; + const int z1 = 13*(temp[4*0+i] - temp[4*2+i]) + 0x200; + const int z2 = 7* temp[4*1+i] - 17*temp[4*3+i]; + const int z3 = 17* temp[4*1+i] + 7*temp[4*3+i]; + + block[i*8+0] = (z0 + z3) >> 10; + block[i*8+1] = (z1 + z2) >> 10; + block[i*8+2] = (z1 - z2) >> 10; + block[i*8+3] = (z0 - z3) >> 10; + } +} + +/** + * RealVideo 3.0/4.0 inverse transform for DC block + * + * Code is almost the same as rv34_inv_transform() + * but final coefficients are multiplied by 1.5 and have no rounding. + */ +static void rv34_inv_transform_noround_c(DCTELEM *block){ + int temp[16]; + int i; + + rv34_row_transform(temp, block); + + for(i = 0; i < 4; i++){ + const int z0 = 13*(temp[4*0+i] + temp[4*2+i]); + const int z1 = 13*(temp[4*0+i] - temp[4*2+i]); + const int z2 = 7* temp[4*1+i] - 17*temp[4*3+i]; + const int z3 = 17* temp[4*1+i] + 7*temp[4*3+i]; + + block[i*8+0] = ((z0 + z3) * 3) >> 11; + block[i*8+1] = ((z1 + z2) * 3) >> 11; + block[i*8+2] = ((z1 - z2) * 3) >> 11; + block[i*8+3] = ((z0 - z3) * 3) >> 11; + } +} + +/** @} */ // transform + + +av_cold void ff_rv34dsp_init(RV34DSPContext *c, DSPContext* dsp) { + c->rv34_inv_transform_tab[0] = rv34_inv_transform_c; + c->rv34_inv_transform_tab[1] = rv34_inv_transform_noround_c; + + if (HAVE_NEON) + ff_rv34dsp_init_neon(c, dsp); +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34dsp.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34dsp.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34dsp.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34dsp.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * RV30/40 decoder motion compensation functions + * Copyright (c) 2008 Konstantin Shishkov + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * RV30/40 decoder motion compensation functions + */ + +#ifndef AVCODEC_RV34DSP_H +#define AVCODEC_RV34DSP_H + +#include "dsputil.h" + +typedef void (*rv40_weight_func)(uint8_t *dst/*align width (8 or 16)*/, + uint8_t *src1/*align width (8 or 16)*/, + uint8_t *src2/*align width (8 or 16)*/, + int w1, int w2, int stride); + +typedef void (*rv34_inv_transform_func)(DCTELEM *block); + +typedef void (*rv40_weak_loop_filter_func)(uint8_t *src, int stride, + int filter_p1, int filter_q1, + int alpha, int beta, + int lims, int lim_q1, int lim_p1); + +typedef void (*rv40_strong_loop_filter_func)(uint8_t *src, int stride, + int alpha, int lims, + int dmode, int chroma); + +typedef int (*rv40_loop_filter_strength_func)(uint8_t *src, int stride, + int beta, int beta2, int edge, + int *p1, int *q1); + +typedef struct RV34DSPContext { + qpel_mc_func put_pixels_tab[4][16]; + qpel_mc_func avg_pixels_tab[4][16]; + h264_chroma_mc_func put_chroma_pixels_tab[3]; + h264_chroma_mc_func avg_chroma_pixels_tab[3]; + rv40_weight_func rv40_weight_pixels_tab[2]; + rv34_inv_transform_func rv34_inv_transform_tab[2]; + rv40_weak_loop_filter_func rv40_weak_loop_filter[2]; + rv40_strong_loop_filter_func rv40_strong_loop_filter[2]; + rv40_loop_filter_strength_func rv40_loop_filter_strength[2]; +} RV34DSPContext; + +void ff_rv30dsp_init(RV34DSPContext *c, DSPContext* dsp); +void ff_rv34dsp_init(RV34DSPContext *c, DSPContext* dsp); +void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp); + +void ff_rv34dsp_init_neon(RV34DSPContext *c, DSPContext *dsp); + +void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp); +void ff_rv40dsp_init_neon(RV34DSPContext *c, DSPContext *dsp); + +#endif /* AVCODEC_RV34DSP_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34.h 2012-01-11 00:34:30.000000000 +0000 @@ -32,6 +32,7 @@ #include "mpegvideo.h" #include "h264pred.h" +#include "rv34dsp.h" #define MB_TYPE_SEPARATE_DC 0x01000000 #define IS_SEPARATE_DC(a) ((a) & MB_TYPE_SEPARATE_DC) @@ -83,6 +84,7 @@ /** decoder context */ typedef struct RV34DecContext{ MpegEncContext s; + RV34DSPContext rdsp; int8_t *intra_types_hist;///< old block types, used for prediction int8_t *intra_types; ///< block types int intra_types_stride;///< block types array stride @@ -90,7 +92,6 @@ const uint8_t *luma_dc_quant_p;///< luma subblock DC quantizer for interframes RV34VLC *cur_vlcs; ///< VLC set used for current frame decoding - int bits; ///< slice size in bits H264PredContext h; ///< functions for 4x4 and 16x16 intra block prediction SliceInfo si; ///< current slice information @@ -105,6 +106,7 @@ int rpr; ///< one field size in RV30 slice header int cur_pts, last_pts, next_pts; + int weight1, weight2; ///< B frame distance fractions (0.14) used in motion compensation uint16_t *cbp_luma; ///< CBP values for luma subblocks uint8_t *cbp_chroma; ///< CBP values for chroma subblocks @@ -113,6 +115,11 @@ /** 8x8 block available flags (for MV prediction) */ DECLARE_ALIGNED(8, uint32_t, avail_cache)[3*4]; + /** temporary blocks for RV4 weighted MC */ + uint8_t *tmp_b_block_y[2]; + uint8_t *tmp_b_block_uv[4]; + uint8_t *tmp_b_block_base; + int (*parse_slice_header)(struct RV34DecContext *r, GetBitContext *gb, SliceInfo *si); int (*decode_mb_info)(struct RV34DecContext *r); int (*decode_intra_types)(struct RV34DecContext *r, GetBitContext *gb, int8_t *dst); @@ -126,5 +133,7 @@ int ff_rv34_decode_init(AVCodecContext *avctx); int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt); int ff_rv34_decode_end(AVCodecContext *avctx); +int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx); +int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src); #endif /* AVCODEC_RV34_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv34_parser.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv34_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,93 @@ +/* + * RV30/40 parser + * Copyright (c) 2011 Konstantin Shishkov + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * RV30/40 parser + */ + +#include "parser.h" +#include "libavutil/intreadwrite.h" + +typedef struct { + ParseContext pc; + int64_t key_dts; + int key_pts; +} RV34ParseContext; + +static const int rv_to_av_frame_type[4] = { + AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, +}; + +static int rv34_parse(AVCodecParserContext *s, + AVCodecContext *avctx, + const uint8_t **poutbuf, int *poutbuf_size, + const uint8_t *buf, int buf_size) +{ + RV34ParseContext *pc = s->priv_data; + int type, pts, hdr; + + if (buf_size < 13 + *buf * 8) { + *poutbuf = buf; + *poutbuf_size = buf_size; + return buf_size; + } + + hdr = AV_RB32(buf + 9 + *buf * 8); + if (avctx->codec_id == CODEC_ID_RV30) { + type = (hdr >> 27) & 3; + pts = (hdr >> 7) & 0x1FFF; + } else { + type = (hdr >> 29) & 3; + pts = (hdr >> 6) & 0x1FFF; + } + + if (type != 3 && s->pts != AV_NOPTS_VALUE) { + pc->key_dts = s->pts; + pc->key_pts = pts; + } else { + if (type != 3) + s->pts = pc->key_dts + ((pts - pc->key_pts) & 0x1FFF); + else + s->pts = pc->key_dts - ((pc->key_pts - pts) & 0x1FFF); + } + s->pict_type = rv_to_av_frame_type[type]; + + *poutbuf = buf; + *poutbuf_size = buf_size; + return buf_size; +} + +#ifdef CONFIG_RV30_PARSER +AVCodecParser ff_rv30_parser = { + .codec_ids = { CODEC_ID_RV30 }, + .priv_data_size = sizeof(RV34ParseContext), + .parser_parse = rv34_parse, +}; +#endif + +#ifdef CONFIG_RV40_PARSER +AVCodecParser ff_rv40_parser = { + .codec_ids = { CODEC_ID_RV40 }, + .priv_data_size = sizeof(RV34ParseContext), + .parser_parse = rv34_parse, +}; +#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv40.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv40.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv40.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv40.c 2012-01-11 00:34:30.000000000 +0000 @@ -271,148 +271,6 @@ return 0; } -#define CLIP_SYMM(a, b) av_clip(a, -(b), b) -/** - * weaker deblocking very similar to the one described in 4.4.2 of JVT-A003r1 - */ -static inline void rv40_weak_loop_filter(uint8_t *src, const int step, - const int filter_p1, const int filter_q1, - const int alpha, const int beta, - const int lim_p0q0, - const int lim_q1, const int lim_p1, - const int diff_p1p0, const int diff_q1q0, - const int diff_p1p2, const int diff_q1q2) -{ - uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; - int t, u, diff; - - t = src[0*step] - src[-1*step]; - if(!t) - return; - u = (alpha * FFABS(t)) >> 7; - if(u > 3 - (filter_p1 && filter_q1)) - return; - - t <<= 2; - if(filter_p1 && filter_q1) - t += src[-2*step] - src[1*step]; - diff = CLIP_SYMM((t + 4) >> 3, lim_p0q0); - src[-1*step] = cm[src[-1*step] + diff]; - src[ 0*step] = cm[src[ 0*step] - diff]; - if(FFABS(diff_p1p2) <= beta && filter_p1){ - t = (diff_p1p0 + diff_p1p2 - diff) >> 1; - src[-2*step] = cm[src[-2*step] - CLIP_SYMM(t, lim_p1)]; - } - if(FFABS(diff_q1q2) <= beta && filter_q1){ - t = (diff_q1q0 + diff_q1q2 + diff) >> 1; - src[ 1*step] = cm[src[ 1*step] - CLIP_SYMM(t, lim_q1)]; - } -} - -static av_always_inline void rv40_adaptive_loop_filter(uint8_t *src, const int step, - const int stride, const int dmode, - const int lim_q1, const int lim_p1, - const int alpha, - const int beta, const int beta2, - const int chroma, const int edge) -{ - int diff_p1p0[4], diff_q1q0[4], diff_p1p2[4], diff_q1q2[4]; - int sum_p1p0 = 0, sum_q1q0 = 0, sum_p1p2 = 0, sum_q1q2 = 0; - uint8_t *ptr; - int flag_strong0 = 1, flag_strong1 = 1; - int filter_p1, filter_q1; - int i; - int lims; - - for(i = 0, ptr = src; i < 4; i++, ptr += stride){ - diff_p1p0[i] = ptr[-2*step] - ptr[-1*step]; - diff_q1q0[i] = ptr[ 1*step] - ptr[ 0*step]; - sum_p1p0 += diff_p1p0[i]; - sum_q1q0 += diff_q1q0[i]; - } - filter_p1 = FFABS(sum_p1p0) < (beta<<2); - filter_q1 = FFABS(sum_q1q0) < (beta<<2); - if(!filter_p1 && !filter_q1) - return; - - for(i = 0, ptr = src; i < 4; i++, ptr += stride){ - diff_p1p2[i] = ptr[-2*step] - ptr[-3*step]; - diff_q1q2[i] = ptr[ 1*step] - ptr[ 2*step]; - sum_p1p2 += diff_p1p2[i]; - sum_q1q2 += diff_q1q2[i]; - } - - if(edge){ - flag_strong0 = filter_p1 && (FFABS(sum_p1p2) < beta2); - flag_strong1 = filter_q1 && (FFABS(sum_q1q2) < beta2); - }else{ - flag_strong0 = flag_strong1 = 0; - } - - lims = filter_p1 + filter_q1 + ((lim_q1 + lim_p1) >> 1) + 1; - if(flag_strong0 && flag_strong1){ /* strong filtering */ - for(i = 0; i < 4; i++, src += stride){ - int sflag, p0, q0, p1, q1; - int t = src[0*step] - src[-1*step]; - - if(!t) continue; - sflag = (alpha * FFABS(t)) >> 7; - if(sflag > 1) continue; - - p0 = (25*src[-3*step] + 26*src[-2*step] - + 26*src[-1*step] - + 26*src[ 0*step] + 25*src[ 1*step] + rv40_dither_l[dmode + i]) >> 7; - q0 = (25*src[-2*step] + 26*src[-1*step] - + 26*src[ 0*step] - + 26*src[ 1*step] + 25*src[ 2*step] + rv40_dither_r[dmode + i]) >> 7; - if(sflag){ - p0 = av_clip(p0, src[-1*step] - lims, src[-1*step] + lims); - q0 = av_clip(q0, src[ 0*step] - lims, src[ 0*step] + lims); - } - p1 = (25*src[-4*step] + 26*src[-3*step] - + 26*src[-2*step] - + 26*p0 + 25*src[ 0*step] + rv40_dither_l[dmode + i]) >> 7; - q1 = (25*src[-1*step] + 26*q0 - + 26*src[ 1*step] - + 26*src[ 2*step] + 25*src[ 3*step] + rv40_dither_r[dmode + i]) >> 7; - if(sflag){ - p1 = av_clip(p1, src[-2*step] - lims, src[-2*step] + lims); - q1 = av_clip(q1, src[ 1*step] - lims, src[ 1*step] + lims); - } - src[-2*step] = p1; - src[-1*step] = p0; - src[ 0*step] = q0; - src[ 1*step] = q1; - if(!chroma){ - src[-3*step] = (25*src[-1*step] + 26*src[-2*step] + 51*src[-3*step] + 26*src[-4*step] + 64) >> 7; - src[ 2*step] = (25*src[ 0*step] + 26*src[ 1*step] + 51*src[ 2*step] + 26*src[ 3*step] + 64) >> 7; - } - } - }else if(filter_p1 && filter_q1){ - for(i = 0; i < 4; i++, src += stride) - rv40_weak_loop_filter(src, step, 1, 1, alpha, beta, lims, lim_q1, lim_p1, - diff_p1p0[i], diff_q1q0[i], diff_p1p2[i], diff_q1q2[i]); - }else{ - for(i = 0; i < 4; i++, src += stride) - rv40_weak_loop_filter(src, step, filter_p1, filter_q1, - alpha, beta, lims>>1, lim_q1>>1, lim_p1>>1, - diff_p1p0[i], diff_q1q0[i], diff_p1p2[i], diff_q1q2[i]); - } -} - -static void rv40_v_loop_filter(uint8_t *src, int stride, int dmode, - int lim_q1, int lim_p1, - int alpha, int beta, int beta2, int chroma, int edge){ - rv40_adaptive_loop_filter(src, 1, stride, dmode, lim_q1, lim_p1, - alpha, beta, beta2, chroma, edge); -} -static void rv40_h_loop_filter(uint8_t *src, int stride, int dmode, - int lim_q1, int lim_p1, - int alpha, int beta, int beta2, int chroma, int edge){ - rv40_adaptive_loop_filter(src, stride, 1, dmode, lim_q1, lim_p1, - alpha, beta, beta2, chroma, edge); -} - enum RV40BlockPos{ POS_CUR, POS_TOP, @@ -436,6 +294,34 @@ static const int neighbour_offs_x[4] = { 0, 0, -1, 0 }; static const int neighbour_offs_y[4] = { 0, -1, 0, 1 }; +static void rv40_adaptive_loop_filter(RV34DSPContext *rdsp, + uint8_t *src, int stride, int dmode, + int lim_q1, int lim_p1, + int alpha, int beta, int beta2, + int chroma, int edge, int dir) +{ + int filter_p1, filter_q1; + int strong; + int lims; + + strong = rdsp->rv40_loop_filter_strength[dir](src, stride, beta, beta2, + edge, &filter_p1, &filter_q1); + + lims = filter_p1 + filter_q1 + ((lim_q1 + lim_p1) >> 1) + 1; + + if (strong) { + rdsp->rv40_strong_loop_filter[dir](src, stride, alpha, + lims, dmode, chroma); + } else if (filter_p1 & filter_q1) { + rdsp->rv40_weak_loop_filter[dir](src, stride, 1, 1, alpha, beta, + lims, lim_q1, lim_p1); + } else if (filter_p1 | filter_q1) { + rdsp->rv40_weak_loop_filter[dir](src, stride, filter_p1, filter_q1, + alpha, beta, lims >> 1, lim_q1 >> 1, + lim_p1 >> 1); + } +} + /** * RV40 loop filtering function */ @@ -475,7 +361,7 @@ mb_pos = row * s->mb_stride; for(mb_x = 0; mb_x < s->mb_width; mb_x++, mb_pos++){ - int mbtype = s->current_picture_ptr->mb_type[mb_pos]; + int mbtype = s->current_picture_ptr->f.mb_type[mb_pos]; if(IS_INTRA(mbtype) || IS_SEPARATE_DC(mbtype)) r->cbp_luma [mb_pos] = r->deblock_coefs[mb_pos] = 0xFFFF; if(IS_INTRA(mbtype)) @@ -489,7 +375,7 @@ int avail[4]; int y_to_deblock, c_to_deblock[2]; - q = s->current_picture_ptr->qscale_table[mb_pos]; + q = s->current_picture_ptr->f.qscale_table[mb_pos]; alpha = rv40_alpha_tab[q]; beta = rv40_beta_tab [q]; betaY = betaC = beta * 3; @@ -504,7 +390,7 @@ if(avail[i]){ int pos = mb_pos + neighbour_offs_x[i] + neighbour_offs_y[i]*s->mb_stride; mvmasks[i] = r->deblock_coefs[pos]; - mbtype [i] = s->current_picture_ptr->mb_type[pos]; + mbtype [i] = s->current_picture_ptr->f.mb_type[pos]; cbp [i] = r->cbp_luma[pos]; uvcbp[i][0] = r->cbp_chroma[pos] & 0xF; uvcbp[i][1] = r->cbp_chroma[pos] >> 4; @@ -563,7 +449,7 @@ } for(j = 0; j < 16; j += 4){ - Y = s->current_picture_ptr->data[0] + mb_x*16 + (row*16 + j) * s->linesize; + Y = s->current_picture_ptr->f.data[0] + mb_x*16 + (row*16 + j) * s->linesize; for(i = 0; i < 4; i++, Y += 4){ int ij = i + j; int clip_cur = y_to_deblock & (MASK_CUR << ij) ? clip[POS_CUR] : 0; @@ -572,10 +458,11 @@ // if bottom block is coded then we can filter its top edge // (or bottom edge of this block, which is the same) if(y_h_deblock & (MASK_BOTTOM << ij)){ - rv40_h_loop_filter(Y+4*s->linesize, s->linesize, dither, - y_to_deblock & (MASK_BOTTOM << ij) ? clip[POS_CUR] : 0, - clip_cur, - alpha, beta, betaY, 0, 0); + rv40_adaptive_loop_filter(&r->rdsp, Y+4*s->linesize, + s->linesize, dither, + y_to_deblock & (MASK_BOTTOM << ij) ? clip[POS_CUR] : 0, + clip_cur, alpha, beta, betaY, + 0, 0, 0); } // filter left block edge in ordinary mode (with low filtering strength) if(y_v_deblock & (MASK_CUR << ij) && (i || !(mb_strong[POS_CUR] || mb_strong[POS_LEFT]))){ @@ -583,64 +470,64 @@ clip_left = mvmasks[POS_LEFT] & (MASK_RIGHT << j) ? clip[POS_LEFT] : 0; else clip_left = y_to_deblock & (MASK_CUR << (ij-1)) ? clip[POS_CUR] : 0; - rv40_v_loop_filter(Y, s->linesize, dither, - clip_cur, - clip_left, - alpha, beta, betaY, 0, 0); + rv40_adaptive_loop_filter(&r->rdsp, Y, s->linesize, dither, + clip_cur, + clip_left, + alpha, beta, betaY, 0, 0, 1); } // filter top edge of the current macroblock when filtering strength is high if(!j && y_h_deblock & (MASK_CUR << i) && (mb_strong[POS_CUR] || mb_strong[POS_TOP])){ - rv40_h_loop_filter(Y, s->linesize, dither, + rv40_adaptive_loop_filter(&r->rdsp, Y, s->linesize, dither, clip_cur, mvmasks[POS_TOP] & (MASK_TOP << i) ? clip[POS_TOP] : 0, - alpha, beta, betaY, 0, 1); + alpha, beta, betaY, 0, 1, 0); } // filter left block edge in edge mode (with high filtering strength) if(y_v_deblock & (MASK_CUR << ij) && !i && (mb_strong[POS_CUR] || mb_strong[POS_LEFT])){ clip_left = mvmasks[POS_LEFT] & (MASK_RIGHT << j) ? clip[POS_LEFT] : 0; - rv40_v_loop_filter(Y, s->linesize, dither, + rv40_adaptive_loop_filter(&r->rdsp, Y, s->linesize, dither, clip_cur, clip_left, - alpha, beta, betaY, 0, 1); + alpha, beta, betaY, 0, 1, 1); } } } for(k = 0; k < 2; k++){ for(j = 0; j < 2; j++){ - C = s->current_picture_ptr->data[k+1] + mb_x*8 + (row*8 + j*4) * s->uvlinesize; + C = s->current_picture_ptr->f.data[k + 1] + mb_x*8 + (row*8 + j*4) * s->uvlinesize; for(i = 0; i < 2; i++, C += 4){ int ij = i + j*2; int clip_cur = c_to_deblock[k] & (MASK_CUR << ij) ? clip[POS_CUR] : 0; if(c_h_deblock[k] & (MASK_CUR << (ij+2))){ int clip_bot = c_to_deblock[k] & (MASK_CUR << (ij+2)) ? clip[POS_CUR] : 0; - rv40_h_loop_filter(C+4*s->uvlinesize, s->uvlinesize, i*8, + rv40_adaptive_loop_filter(&r->rdsp, C+4*s->uvlinesize, s->uvlinesize, i*8, clip_bot, clip_cur, - alpha, beta, betaC, 1, 0); + alpha, beta, betaC, 1, 0, 0); } if((c_v_deblock[k] & (MASK_CUR << ij)) && (i || !(mb_strong[POS_CUR] || mb_strong[POS_LEFT]))){ if(!i) clip_left = uvcbp[POS_LEFT][k] & (MASK_CUR << (2*j+1)) ? clip[POS_LEFT] : 0; else clip_left = c_to_deblock[k] & (MASK_CUR << (ij-1)) ? clip[POS_CUR] : 0; - rv40_v_loop_filter(C, s->uvlinesize, j*8, + rv40_adaptive_loop_filter(&r->rdsp, C, s->uvlinesize, j*8, clip_cur, clip_left, - alpha, beta, betaC, 1, 0); + alpha, beta, betaC, 1, 0, 1); } if(!j && c_h_deblock[k] & (MASK_CUR << ij) && (mb_strong[POS_CUR] || mb_strong[POS_TOP])){ int clip_top = uvcbp[POS_TOP][k] & (MASK_CUR << (ij+2)) ? clip[POS_TOP] : 0; - rv40_h_loop_filter(C, s->uvlinesize, i*8, + rv40_adaptive_loop_filter(&r->rdsp, C, s->uvlinesize, i*8, clip_cur, clip_top, - alpha, beta, betaC, 1, 1); + alpha, beta, betaC, 1, 1, 0); } if(c_v_deblock[k] & (MASK_CUR << ij) && !i && (mb_strong[POS_CUR] || mb_strong[POS_LEFT])){ clip_left = uvcbp[POS_LEFT][k] & (MASK_CUR << (2*j+1)) ? clip[POS_LEFT] : 0; - rv40_v_loop_filter(C, s->uvlinesize, j*8, + rv40_adaptive_loop_filter(&r->rdsp, C, s->uvlinesize, j*8, clip_cur, clip_left, - alpha, beta, betaC, 1, 1); + alpha, beta, betaC, 1, 1, 1); } } } @@ -669,16 +556,17 @@ } AVCodec ff_rv40_decoder = { - "rv40", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_RV40, - sizeof(RV34DecContext), - rv40_decode_init, - NULL, - ff_rv34_decode_end, - ff_rv34_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DELAY, - .flush = ff_mpeg_flush, - .long_name = NULL_IF_CONFIG_SMALL("RealVideo 4.0"), - .pix_fmts= ff_pixfmt_list_420, + .name = "rv40", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_RV40, + .priv_data_size = sizeof(RV34DecContext), + .init = rv40_decode_init, + .close = ff_rv34_decode_end, + .decode = ff_rv34_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_FRAME_THREADS, + .flush = ff_mpeg_flush, + .long_name = NULL_IF_CONFIG_SMALL("RealVideo 4.0"), + .pix_fmts = ff_pixfmt_list_420, + .init_thread_copy = ONLY_IF_THREADS_ENABLED(ff_rv34_decode_init_thread_copy), + .update_thread_context = ONLY_IF_THREADS_ENABLED(ff_rv34_decode_update_thread_context), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv40data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv40data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv40data.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv40data.h 2012-01-11 00:34:30.000000000 +0000 @@ -65,23 +65,9 @@ }; /** - * @defgroup loopfilter coefficients used by the RV40 loop filter + * @name Coefficients used by the RV40 loop filter * @{ */ -/** - * dither values for deblocking filter - left/top values - */ -static const uint8_t rv40_dither_l[16] = { - 0x40, 0x50, 0x20, 0x60, 0x30, 0x50, 0x40, 0x30, - 0x50, 0x40, 0x50, 0x30, 0x60, 0x20, 0x50, 0x40 -}; -/** - * dither values for deblocking filter - right/bottom values - */ -static const uint8_t rv40_dither_r[16] = { - 0x40, 0x30, 0x60, 0x20, 0x50, 0x30, 0x30, 0x40, - 0x40, 0x40, 0x50, 0x30, 0x20, 0x60, 0x30, 0x40 -}; /** alpha parameter for RV40 loop filter - almost the same as in JVT-A003r1 */ static const uint8_t rv40_alpha_tab[32] = { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv40dsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv40dsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/rv40dsp.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/rv40dsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,13 +26,14 @@ #include "avcodec.h" #include "dsputil.h" +#include "rv34dsp.h" #define RV40_LOWPASS(OPNAME, OP) \ static av_unused void OPNAME ## rv40_qpel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride,\ const int h, const int C1, const int C2, const int SHIFT){\ uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\ int i;\ - for(i=0; i> SHIFT);\ OP(dst[1], (src[-1] + src[ 4] - 5*(src[ 0]+src[3]) + src[1]*C1 + src[2]*C2 + (1<<(SHIFT-1))) >> SHIFT);\ @@ -42,8 +43,8 @@ OP(dst[5], (src[ 3] + src[ 8] - 5*(src[ 4]+src[7]) + src[5]*C1 + src[6]*C2 + (1<<(SHIFT-1))) >> SHIFT);\ OP(dst[6], (src[ 4] + src[ 9] - 5*(src[ 5]+src[8]) + src[6]*C1 + src[7]*C2 + (1<<(SHIFT-1))) >> SHIFT);\ OP(dst[7], (src[ 5] + src[10] - 5*(src[ 6]+src[9]) + src[7]*C1 + src[8]*C2 + (1<<(SHIFT-1))) >> SHIFT);\ - dst+=dstStride;\ - src+=srcStride;\ + dst += dstStride;\ + src += srcStride;\ }\ }\ \ @@ -51,21 +52,21 @@ const int w, const int C1, const int C2, const int SHIFT){\ uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\ int i;\ - for(i=0; i> SHIFT);\ OP(dst[1*dstStride], (srcA + src4 - 5*(src0+src3) + src1*C1 + src2*C2 + (1<<(SHIFT-1))) >> SHIFT);\ OP(dst[2*dstStride], (src0 + src5 - 5*(src1+src4) + src2*C1 + src3*C2 + (1<<(SHIFT-1))) >> SHIFT);\ @@ -105,10 +106,6 @@ OPNAME ## rv40_qpel ## SIZE ## _h_lowpass(dst, src, stride, stride, SIZE, 52, 20, 6);\ }\ \ -static void OPNAME ## rv40_qpel ## SIZE ## _mc20_c(uint8_t *dst, uint8_t *src, int stride){\ - OPNAME ## rv40_qpel ## SIZE ## _h_lowpass(dst, src, stride, stride, SIZE, 20, 20, 5);\ -}\ -\ static void OPNAME ## rv40_qpel ## SIZE ## _mc30_c(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## rv40_qpel ## SIZE ## _h_lowpass(dst, src, stride, stride, SIZE, 20, 52, 6);\ }\ @@ -119,46 +116,42 @@ \ static void OPNAME ## rv40_qpel ## SIZE ## _mc11_c(uint8_t *dst, uint8_t *src, int stride){\ uint8_t full[SIZE*(SIZE+5)];\ - uint8_t * const full_mid= full + SIZE*2;\ + uint8_t * const full_mid = full + SIZE*2;\ put_rv40_qpel ## SIZE ## _h_lowpass(full, src - 2*stride, SIZE, stride, SIZE+5, 52, 20, 6);\ OPNAME ## rv40_qpel ## SIZE ## _v_lowpass(dst, full_mid, stride, SIZE, SIZE, 52, 20, 6);\ }\ \ static void OPNAME ## rv40_qpel ## SIZE ## _mc21_c(uint8_t *dst, uint8_t *src, int stride){\ uint8_t full[SIZE*(SIZE+5)];\ - uint8_t * const full_mid= full + SIZE*2;\ + uint8_t * const full_mid = full + SIZE*2;\ put_rv40_qpel ## SIZE ## _h_lowpass(full, src - 2*stride, SIZE, stride, SIZE+5, 20, 20, 5);\ OPNAME ## rv40_qpel ## SIZE ## _v_lowpass(dst, full_mid, stride, SIZE, SIZE, 52, 20, 6);\ }\ \ static void OPNAME ## rv40_qpel ## SIZE ## _mc31_c(uint8_t *dst, uint8_t *src, int stride){\ uint8_t full[SIZE*(SIZE+5)];\ - uint8_t * const full_mid= full + SIZE*2;\ + uint8_t * const full_mid = full + SIZE*2;\ put_rv40_qpel ## SIZE ## _h_lowpass(full, src - 2*stride, SIZE, stride, SIZE+5, 20, 52, 6);\ OPNAME ## rv40_qpel ## SIZE ## _v_lowpass(dst, full_mid, stride, SIZE, SIZE, 52, 20, 6);\ }\ \ -static void OPNAME ## rv40_qpel ## SIZE ## _mc02_c(uint8_t *dst, uint8_t *src, int stride){\ - OPNAME ## rv40_qpel ## SIZE ## _v_lowpass(dst, src, stride, stride, SIZE, 20, 20, 5);\ -}\ -\ static void OPNAME ## rv40_qpel ## SIZE ## _mc12_c(uint8_t *dst, uint8_t *src, int stride){\ uint8_t full[SIZE*(SIZE+5)];\ - uint8_t * const full_mid= full + SIZE*2;\ + uint8_t * const full_mid = full + SIZE*2;\ put_rv40_qpel ## SIZE ## _h_lowpass(full, src - 2*stride, SIZE, stride, SIZE+5, 52, 20, 6);\ OPNAME ## rv40_qpel ## SIZE ## _v_lowpass(dst, full_mid, stride, SIZE, SIZE, 20, 20, 5);\ }\ \ static void OPNAME ## rv40_qpel ## SIZE ## _mc22_c(uint8_t *dst, uint8_t *src, int stride){\ uint8_t full[SIZE*(SIZE+5)];\ - uint8_t * const full_mid= full + SIZE*2;\ + uint8_t * const full_mid = full + SIZE*2;\ put_rv40_qpel ## SIZE ## _h_lowpass(full, src - 2*stride, SIZE, stride, SIZE+5, 20, 20, 5);\ OPNAME ## rv40_qpel ## SIZE ## _v_lowpass(dst, full_mid, stride, SIZE, SIZE, 20, 20, 5);\ }\ \ static void OPNAME ## rv40_qpel ## SIZE ## _mc32_c(uint8_t *dst, uint8_t *src, int stride){\ uint8_t full[SIZE*(SIZE+5)];\ - uint8_t * const full_mid= full + SIZE*2;\ + uint8_t * const full_mid = full + SIZE*2;\ put_rv40_qpel ## SIZE ## _h_lowpass(full, src - 2*stride, SIZE, stride, SIZE+5, 20, 52, 6);\ OPNAME ## rv40_qpel ## SIZE ## _v_lowpass(dst, full_mid, stride, SIZE, SIZE, 20, 20, 5);\ }\ @@ -169,14 +162,14 @@ \ static void OPNAME ## rv40_qpel ## SIZE ## _mc13_c(uint8_t *dst, uint8_t *src, int stride){\ uint8_t full[SIZE*(SIZE+5)];\ - uint8_t * const full_mid= full + SIZE*2;\ + uint8_t * const full_mid = full + SIZE*2;\ put_rv40_qpel ## SIZE ## _h_lowpass(full, src - 2*stride, SIZE, stride, SIZE+5, 52, 20, 6);\ OPNAME ## rv40_qpel ## SIZE ## _v_lowpass(dst, full_mid, stride, SIZE, SIZE, 20, 52, 6);\ }\ \ static void OPNAME ## rv40_qpel ## SIZE ## _mc23_c(uint8_t *dst, uint8_t *src, int stride){\ uint8_t full[SIZE*(SIZE+5)];\ - uint8_t * const full_mid= full + SIZE*2;\ + uint8_t * const full_mid = full + SIZE*2;\ put_rv40_qpel ## SIZE ## _h_lowpass(full, src - 2*stride, SIZE, stride, SIZE+5, 20, 20, 5);\ OPNAME ## rv40_qpel ## SIZE ## _v_lowpass(dst, full_mid, stride, SIZE, SIZE, 20, 52, 6);\ }\ @@ -205,50 +198,50 @@ #define RV40_CHROMA_MC(OPNAME, OP)\ static void OPNAME ## rv40_chroma_mc4_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y){\ - const int A=(8-x)*(8-y);\ - const int B=( x)*(8-y);\ - const int C=(8-x)*( y);\ - const int D=( x)*( y);\ + const int A = (8-x) * (8-y);\ + const int B = ( x) * (8-y);\ + const int C = (8-x) * ( y);\ + const int D = ( x) * ( y);\ int i;\ int bias = rv40_bias[y>>1][x>>1];\ \ assert(x<8 && y<8 && x>=0 && y>=0);\ \ if(D){\ - for(i=0; i>1][x>>1];\ \ assert(x<8 && y<8 && x>=0 && y>=0);\ \ if(D){\ - for(i=0; iput_rv40_qpel_pixels_tab[0][ 0] = c->put_h264_qpel_pixels_tab[0][0]; - c->put_rv40_qpel_pixels_tab[0][ 1] = put_rv40_qpel16_mc10_c; - c->put_rv40_qpel_pixels_tab[0][ 2] = put_rv40_qpel16_mc20_c; - c->put_rv40_qpel_pixels_tab[0][ 3] = put_rv40_qpel16_mc30_c; - c->put_rv40_qpel_pixels_tab[0][ 4] = put_rv40_qpel16_mc01_c; - c->put_rv40_qpel_pixels_tab[0][ 5] = put_rv40_qpel16_mc11_c; - c->put_rv40_qpel_pixels_tab[0][ 6] = put_rv40_qpel16_mc21_c; - c->put_rv40_qpel_pixels_tab[0][ 7] = put_rv40_qpel16_mc31_c; - c->put_rv40_qpel_pixels_tab[0][ 8] = put_rv40_qpel16_mc02_c; - c->put_rv40_qpel_pixels_tab[0][ 9] = put_rv40_qpel16_mc12_c; - c->put_rv40_qpel_pixels_tab[0][10] = put_rv40_qpel16_mc22_c; - c->put_rv40_qpel_pixels_tab[0][11] = put_rv40_qpel16_mc32_c; - c->put_rv40_qpel_pixels_tab[0][12] = put_rv40_qpel16_mc03_c; - c->put_rv40_qpel_pixels_tab[0][13] = put_rv40_qpel16_mc13_c; - c->put_rv40_qpel_pixels_tab[0][14] = put_rv40_qpel16_mc23_c; - c->avg_rv40_qpel_pixels_tab[0][ 0] = c->avg_h264_qpel_pixels_tab[0][0]; - c->avg_rv40_qpel_pixels_tab[0][ 1] = avg_rv40_qpel16_mc10_c; - c->avg_rv40_qpel_pixels_tab[0][ 2] = avg_rv40_qpel16_mc20_c; - c->avg_rv40_qpel_pixels_tab[0][ 3] = avg_rv40_qpel16_mc30_c; - c->avg_rv40_qpel_pixels_tab[0][ 4] = avg_rv40_qpel16_mc01_c; - c->avg_rv40_qpel_pixels_tab[0][ 5] = avg_rv40_qpel16_mc11_c; - c->avg_rv40_qpel_pixels_tab[0][ 6] = avg_rv40_qpel16_mc21_c; - c->avg_rv40_qpel_pixels_tab[0][ 7] = avg_rv40_qpel16_mc31_c; - c->avg_rv40_qpel_pixels_tab[0][ 8] = avg_rv40_qpel16_mc02_c; - c->avg_rv40_qpel_pixels_tab[0][ 9] = avg_rv40_qpel16_mc12_c; - c->avg_rv40_qpel_pixels_tab[0][10] = avg_rv40_qpel16_mc22_c; - c->avg_rv40_qpel_pixels_tab[0][11] = avg_rv40_qpel16_mc32_c; - c->avg_rv40_qpel_pixels_tab[0][12] = avg_rv40_qpel16_mc03_c; - c->avg_rv40_qpel_pixels_tab[0][13] = avg_rv40_qpel16_mc13_c; - c->avg_rv40_qpel_pixels_tab[0][14] = avg_rv40_qpel16_mc23_c; - c->put_rv40_qpel_pixels_tab[1][ 0] = c->put_h264_qpel_pixels_tab[1][0]; - c->put_rv40_qpel_pixels_tab[1][ 1] = put_rv40_qpel8_mc10_c; - c->put_rv40_qpel_pixels_tab[1][ 2] = put_rv40_qpel8_mc20_c; - c->put_rv40_qpel_pixels_tab[1][ 3] = put_rv40_qpel8_mc30_c; - c->put_rv40_qpel_pixels_tab[1][ 4] = put_rv40_qpel8_mc01_c; - c->put_rv40_qpel_pixels_tab[1][ 5] = put_rv40_qpel8_mc11_c; - c->put_rv40_qpel_pixels_tab[1][ 6] = put_rv40_qpel8_mc21_c; - c->put_rv40_qpel_pixels_tab[1][ 7] = put_rv40_qpel8_mc31_c; - c->put_rv40_qpel_pixels_tab[1][ 8] = put_rv40_qpel8_mc02_c; - c->put_rv40_qpel_pixels_tab[1][ 9] = put_rv40_qpel8_mc12_c; - c->put_rv40_qpel_pixels_tab[1][10] = put_rv40_qpel8_mc22_c; - c->put_rv40_qpel_pixels_tab[1][11] = put_rv40_qpel8_mc32_c; - c->put_rv40_qpel_pixels_tab[1][12] = put_rv40_qpel8_mc03_c; - c->put_rv40_qpel_pixels_tab[1][13] = put_rv40_qpel8_mc13_c; - c->put_rv40_qpel_pixels_tab[1][14] = put_rv40_qpel8_mc23_c; - c->avg_rv40_qpel_pixels_tab[1][ 0] = c->avg_h264_qpel_pixels_tab[1][0]; - c->avg_rv40_qpel_pixels_tab[1][ 1] = avg_rv40_qpel8_mc10_c; - c->avg_rv40_qpel_pixels_tab[1][ 2] = avg_rv40_qpel8_mc20_c; - c->avg_rv40_qpel_pixels_tab[1][ 3] = avg_rv40_qpel8_mc30_c; - c->avg_rv40_qpel_pixels_tab[1][ 4] = avg_rv40_qpel8_mc01_c; - c->avg_rv40_qpel_pixels_tab[1][ 5] = avg_rv40_qpel8_mc11_c; - c->avg_rv40_qpel_pixels_tab[1][ 6] = avg_rv40_qpel8_mc21_c; - c->avg_rv40_qpel_pixels_tab[1][ 7] = avg_rv40_qpel8_mc31_c; - c->avg_rv40_qpel_pixels_tab[1][ 8] = avg_rv40_qpel8_mc02_c; - c->avg_rv40_qpel_pixels_tab[1][ 9] = avg_rv40_qpel8_mc12_c; - c->avg_rv40_qpel_pixels_tab[1][10] = avg_rv40_qpel8_mc22_c; - c->avg_rv40_qpel_pixels_tab[1][11] = avg_rv40_qpel8_mc32_c; - c->avg_rv40_qpel_pixels_tab[1][12] = avg_rv40_qpel8_mc03_c; - c->avg_rv40_qpel_pixels_tab[1][13] = avg_rv40_qpel8_mc13_c; - c->avg_rv40_qpel_pixels_tab[1][14] = avg_rv40_qpel8_mc23_c; - - c->put_rv40_chroma_pixels_tab[0]= put_rv40_chroma_mc8_c; - c->put_rv40_chroma_pixels_tab[1]= put_rv40_chroma_mc4_c; - c->avg_rv40_chroma_pixels_tab[0]= avg_rv40_chroma_mc8_c; - c->avg_rv40_chroma_pixels_tab[1]= avg_rv40_chroma_mc4_c; +#define RV40_WEIGHT_FUNC(size) \ +static void rv40_weight_func_ ## size (uint8_t *dst, uint8_t *src1, uint8_t *src2, int w1, int w2, int stride)\ +{\ + int i, j;\ +\ + for (j = 0; j < size; j++) {\ + for (i = 0; i < size; i++)\ + dst[i] = (((w2 * src1[i]) >> 9) + ((w1 * src2[i]) >> 9) + 0x10) >> 5;\ + src1 += stride;\ + src2 += stride;\ + dst += stride;\ + }\ +} + +RV40_WEIGHT_FUNC(16) +RV40_WEIGHT_FUNC(8) + +/** + * dither values for deblocking filter - left/top values + */ +static const uint8_t rv40_dither_l[16] = { + 0x40, 0x50, 0x20, 0x60, 0x30, 0x50, 0x40, 0x30, + 0x50, 0x40, 0x50, 0x30, 0x60, 0x20, 0x50, 0x40 +}; + +/** + * dither values for deblocking filter - right/bottom values + */ +static const uint8_t rv40_dither_r[16] = { + 0x40, 0x30, 0x60, 0x20, 0x50, 0x30, 0x30, 0x40, + 0x40, 0x40, 0x50, 0x30, 0x20, 0x60, 0x30, 0x40 +}; + +#define CLIP_SYMM(a, b) av_clip(a, -(b), b) +/** + * weaker deblocking very similar to the one described in 4.4.2 of JVT-A003r1 + */ +static av_always_inline void rv40_weak_loop_filter(uint8_t *src, + const int step, + const int stride, + const int filter_p1, + const int filter_q1, + const int alpha, + const int beta, + const int lim_p0q0, + const int lim_q1, + const int lim_p1) +{ + uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; + int i, t, u, diff; + + for (i = 0; i < 4; i++, src += stride) { + int diff_p1p0 = src[-2*step] - src[-1*step]; + int diff_q1q0 = src[ 1*step] - src[ 0*step]; + int diff_p1p2 = src[-2*step] - src[-3*step]; + int diff_q1q2 = src[ 1*step] - src[ 2*step]; + + t = src[0*step] - src[-1*step]; + if (!t) + continue; + + u = (alpha * FFABS(t)) >> 7; + if (u > 3 - (filter_p1 && filter_q1)) + continue; + + t <<= 2; + if (filter_p1 && filter_q1) + t += src[-2*step] - src[1*step]; + + diff = CLIP_SYMM((t + 4) >> 3, lim_p0q0); + src[-1*step] = cm[src[-1*step] + diff]; + src[ 0*step] = cm[src[ 0*step] - diff]; + + if (filter_p1 && FFABS(diff_p1p2) <= beta) { + t = (diff_p1p0 + diff_p1p2 - diff) >> 1; + src[-2*step] = cm[src[-2*step] - CLIP_SYMM(t, lim_p1)]; + } + + if (filter_q1 && FFABS(diff_q1q2) <= beta) { + t = (diff_q1q0 + diff_q1q2 + diff) >> 1; + src[ 1*step] = cm[src[ 1*step] - CLIP_SYMM(t, lim_q1)]; + } + } +} + +static void rv40_h_weak_loop_filter(uint8_t *src, const int stride, + const int filter_p1, const int filter_q1, + const int alpha, const int beta, + const int lim_p0q0, const int lim_q1, + const int lim_p1) +{ + rv40_weak_loop_filter(src, stride, 1, filter_p1, filter_q1, + alpha, beta, lim_p0q0, lim_q1, lim_p1); +} + +static void rv40_v_weak_loop_filter(uint8_t *src, const int stride, + const int filter_p1, const int filter_q1, + const int alpha, const int beta, + const int lim_p0q0, const int lim_q1, + const int lim_p1) +{ + rv40_weak_loop_filter(src, 1, stride, filter_p1, filter_q1, + alpha, beta, lim_p0q0, lim_q1, lim_p1); +} + +static av_always_inline void rv40_strong_loop_filter(uint8_t *src, + const int step, + const int stride, + const int alpha, + const int lims, + const int dmode, + const int chroma) +{ + int i; + + for(i = 0; i < 4; i++, src += stride){ + int sflag, p0, q0, p1, q1; + int t = src[0*step] - src[-1*step]; + + if (!t) + continue; + + sflag = (alpha * FFABS(t)) >> 7; + if (sflag > 1) + continue; + + p0 = (25*src[-3*step] + 26*src[-2*step] + 26*src[-1*step] + + 26*src[ 0*step] + 25*src[ 1*step] + + rv40_dither_l[dmode + i]) >> 7; + + q0 = (25*src[-2*step] + 26*src[-1*step] + 26*src[ 0*step] + + 26*src[ 1*step] + 25*src[ 2*step] + + rv40_dither_r[dmode + i]) >> 7; + + if (sflag) { + p0 = av_clip(p0, src[-1*step] - lims, src[-1*step] + lims); + q0 = av_clip(q0, src[ 0*step] - lims, src[ 0*step] + lims); + } + + p1 = (25*src[-4*step] + 26*src[-3*step] + 26*src[-2*step] + 26*p0 + + 25*src[ 0*step] + rv40_dither_l[dmode + i]) >> 7; + q1 = (25*src[-1*step] + 26*q0 + 26*src[ 1*step] + 26*src[ 2*step] + + 25*src[ 3*step] + rv40_dither_r[dmode + i]) >> 7; + + if (sflag) { + p1 = av_clip(p1, src[-2*step] - lims, src[-2*step] + lims); + q1 = av_clip(q1, src[ 1*step] - lims, src[ 1*step] + lims); + } + + src[-2*step] = p1; + src[-1*step] = p0; + src[ 0*step] = q0; + src[ 1*step] = q1; + + if(!chroma){ + src[-3*step] = (25*src[-1*step] + 26*src[-2*step] + + 51*src[-3*step] + 26*src[-4*step] + 64) >> 7; + src[ 2*step] = (25*src[ 0*step] + 26*src[ 1*step] + + 51*src[ 2*step] + 26*src[ 3*step] + 64) >> 7; + } + } +} + +static void rv40_h_strong_loop_filter(uint8_t *src, const int stride, + const int alpha, const int lims, + const int dmode, const int chroma) +{ + rv40_strong_loop_filter(src, stride, 1, alpha, lims, dmode, chroma); +} + +static void rv40_v_strong_loop_filter(uint8_t *src, const int stride, + const int alpha, const int lims, + const int dmode, const int chroma) +{ + rv40_strong_loop_filter(src, 1, stride, alpha, lims, dmode, chroma); +} + +static av_always_inline int rv40_loop_filter_strength(uint8_t *src, + int step, int stride, + int beta, int beta2, + int edge, + int *p1, int *q1) +{ + int sum_p1p0 = 0, sum_q1q0 = 0, sum_p1p2 = 0, sum_q1q2 = 0; + int strong0 = 0, strong1 = 0; + uint8_t *ptr; + int i; + + for (i = 0, ptr = src; i < 4; i++, ptr += stride) { + sum_p1p0 += ptr[-2*step] - ptr[-1*step]; + sum_q1q0 += ptr[ 1*step] - ptr[ 0*step]; + } + + *p1 = FFABS(sum_p1p0) < (beta << 2); + *q1 = FFABS(sum_q1q0) < (beta << 2); + + if(!*p1 && !*q1) + return 0; + + if (!edge) + return 0; + + for (i = 0, ptr = src; i < 4; i++, ptr += stride) { + sum_p1p2 += ptr[-2*step] - ptr[-3*step]; + sum_q1q2 += ptr[ 1*step] - ptr[ 2*step]; + } + + strong0 = *p1 && (FFABS(sum_p1p2) < beta2); + strong1 = *q1 && (FFABS(sum_q1q2) < beta2); + + return strong0 && strong1; +} + +static int rv40_h_loop_filter_strength(uint8_t *src, int stride, + int beta, int beta2, int edge, + int *p1, int *q1) +{ + return rv40_loop_filter_strength(src, stride, 1, beta, beta2, edge, p1, q1); +} + +static int rv40_v_loop_filter_strength(uint8_t *src, int stride, + int beta, int beta2, int edge, + int *p1, int *q1) +{ + return rv40_loop_filter_strength(src, 1, stride, beta, beta2, edge, p1, q1); +} + +av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp) { + + ff_rv34dsp_init(c, dsp); + + c->put_pixels_tab[0][ 0] = dsp->put_h264_qpel_pixels_tab[0][0]; + c->put_pixels_tab[0][ 1] = put_rv40_qpel16_mc10_c; + c->put_pixels_tab[0][ 2] = dsp->put_h264_qpel_pixels_tab[0][2]; + c->put_pixels_tab[0][ 3] = put_rv40_qpel16_mc30_c; + c->put_pixels_tab[0][ 4] = put_rv40_qpel16_mc01_c; + c->put_pixels_tab[0][ 5] = put_rv40_qpel16_mc11_c; + c->put_pixels_tab[0][ 6] = put_rv40_qpel16_mc21_c; + c->put_pixels_tab[0][ 7] = put_rv40_qpel16_mc31_c; + c->put_pixels_tab[0][ 8] = dsp->put_h264_qpel_pixels_tab[0][8]; + c->put_pixels_tab[0][ 9] = put_rv40_qpel16_mc12_c; + c->put_pixels_tab[0][10] = put_rv40_qpel16_mc22_c; + c->put_pixels_tab[0][11] = put_rv40_qpel16_mc32_c; + c->put_pixels_tab[0][12] = put_rv40_qpel16_mc03_c; + c->put_pixels_tab[0][13] = put_rv40_qpel16_mc13_c; + c->put_pixels_tab[0][14] = put_rv40_qpel16_mc23_c; + c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_c; + c->avg_pixels_tab[0][ 0] = dsp->avg_h264_qpel_pixels_tab[0][0]; + c->avg_pixels_tab[0][ 1] = avg_rv40_qpel16_mc10_c; + c->avg_pixels_tab[0][ 2] = dsp->avg_h264_qpel_pixels_tab[0][2]; + c->avg_pixels_tab[0][ 3] = avg_rv40_qpel16_mc30_c; + c->avg_pixels_tab[0][ 4] = avg_rv40_qpel16_mc01_c; + c->avg_pixels_tab[0][ 5] = avg_rv40_qpel16_mc11_c; + c->avg_pixels_tab[0][ 6] = avg_rv40_qpel16_mc21_c; + c->avg_pixels_tab[0][ 7] = avg_rv40_qpel16_mc31_c; + c->avg_pixels_tab[0][ 8] = dsp->avg_h264_qpel_pixels_tab[0][8]; + c->avg_pixels_tab[0][ 9] = avg_rv40_qpel16_mc12_c; + c->avg_pixels_tab[0][10] = avg_rv40_qpel16_mc22_c; + c->avg_pixels_tab[0][11] = avg_rv40_qpel16_mc32_c; + c->avg_pixels_tab[0][12] = avg_rv40_qpel16_mc03_c; + c->avg_pixels_tab[0][13] = avg_rv40_qpel16_mc13_c; + c->avg_pixels_tab[0][14] = avg_rv40_qpel16_mc23_c; + c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_c; + c->put_pixels_tab[1][ 0] = dsp->put_h264_qpel_pixels_tab[1][0]; + c->put_pixels_tab[1][ 1] = put_rv40_qpel8_mc10_c; + c->put_pixels_tab[1][ 2] = dsp->put_h264_qpel_pixels_tab[1][2]; + c->put_pixels_tab[1][ 3] = put_rv40_qpel8_mc30_c; + c->put_pixels_tab[1][ 4] = put_rv40_qpel8_mc01_c; + c->put_pixels_tab[1][ 5] = put_rv40_qpel8_mc11_c; + c->put_pixels_tab[1][ 6] = put_rv40_qpel8_mc21_c; + c->put_pixels_tab[1][ 7] = put_rv40_qpel8_mc31_c; + c->put_pixels_tab[1][ 8] = dsp->put_h264_qpel_pixels_tab[1][8]; + c->put_pixels_tab[1][ 9] = put_rv40_qpel8_mc12_c; + c->put_pixels_tab[1][10] = put_rv40_qpel8_mc22_c; + c->put_pixels_tab[1][11] = put_rv40_qpel8_mc32_c; + c->put_pixels_tab[1][12] = put_rv40_qpel8_mc03_c; + c->put_pixels_tab[1][13] = put_rv40_qpel8_mc13_c; + c->put_pixels_tab[1][14] = put_rv40_qpel8_mc23_c; + c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_c; + c->avg_pixels_tab[1][ 0] = dsp->avg_h264_qpel_pixels_tab[1][0]; + c->avg_pixels_tab[1][ 1] = avg_rv40_qpel8_mc10_c; + c->avg_pixels_tab[1][ 2] = dsp->avg_h264_qpel_pixels_tab[1][2]; + c->avg_pixels_tab[1][ 3] = avg_rv40_qpel8_mc30_c; + c->avg_pixels_tab[1][ 4] = avg_rv40_qpel8_mc01_c; + c->avg_pixels_tab[1][ 5] = avg_rv40_qpel8_mc11_c; + c->avg_pixels_tab[1][ 6] = avg_rv40_qpel8_mc21_c; + c->avg_pixels_tab[1][ 7] = avg_rv40_qpel8_mc31_c; + c->avg_pixels_tab[1][ 8] = dsp->avg_h264_qpel_pixels_tab[1][8]; + c->avg_pixels_tab[1][ 9] = avg_rv40_qpel8_mc12_c; + c->avg_pixels_tab[1][10] = avg_rv40_qpel8_mc22_c; + c->avg_pixels_tab[1][11] = avg_rv40_qpel8_mc32_c; + c->avg_pixels_tab[1][12] = avg_rv40_qpel8_mc03_c; + c->avg_pixels_tab[1][13] = avg_rv40_qpel8_mc13_c; + c->avg_pixels_tab[1][14] = avg_rv40_qpel8_mc23_c; + c->avg_pixels_tab[1][15] = ff_avg_rv40_qpel8_mc33_c; + + c->put_chroma_pixels_tab[0] = put_rv40_chroma_mc8_c; + c->put_chroma_pixels_tab[1] = put_rv40_chroma_mc4_c; + c->avg_chroma_pixels_tab[0] = avg_rv40_chroma_mc8_c; + c->avg_chroma_pixels_tab[1] = avg_rv40_chroma_mc4_c; + + c->rv40_weight_pixels_tab[0] = rv40_weight_func_16; + c->rv40_weight_pixels_tab[1] = rv40_weight_func_8; + + c->rv40_weak_loop_filter[0] = rv40_h_weak_loop_filter; + c->rv40_weak_loop_filter[1] = rv40_v_weak_loop_filter; + c->rv40_strong_loop_filter[0] = rv40_h_strong_loop_filter; + c->rv40_strong_loop_filter[1] = rv40_v_strong_loop_filter; + c->rv40_loop_filter_strength[0] = rv40_h_loop_filter_strength; + c->rv40_loop_filter_strength[1] = rv40_v_loop_filter_strength; + + if (HAVE_MMX) + ff_rv40dsp_init_x86(c, dsp); + if (HAVE_NEON) + ff_rv40dsp_init_neon(c, dsp); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/s302m.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/s302m.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/s302m.c 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/s302m.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,10 @@ #define AES3_HEADER_LEN 4 +typedef struct S302MDecodeContext { + AVFrame frame; +} S302MDecodeContext; + static int s302m_parse_frame_header(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { @@ -58,9 +62,9 @@ /* Set output properties */ avctx->bits_per_coded_sample = bits; if (bits > 16) - avctx->sample_fmt = SAMPLE_FMT_S32; + avctx->sample_fmt = AV_SAMPLE_FMT_S32; else - avctx->sample_fmt = SAMPLE_FMT_S16; + avctx->sample_fmt = AV_SAMPLE_FMT_S16; avctx->channels = channels; avctx->sample_rate = 48000; @@ -73,10 +77,12 @@ } static int s302m_decode_frame(AVCodecContext *avctx, void *data, - int *data_size, AVPacket *avpkt) + int *got_frame_ptr, AVPacket *avpkt) { + S302MDecodeContext *s = avctx->priv_data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; + int block_size, ret; int frame_size = s302m_parse_frame_header(avctx, buf, buf_size); if (frame_size < 0) @@ -85,11 +91,18 @@ buf_size -= AES3_HEADER_LEN; buf += AES3_HEADER_LEN; - if (*data_size < 4 * buf_size * 8 / (avctx->bits_per_coded_sample + 4)) - return -1; + /* get output buffer */ + block_size = (avctx->bits_per_coded_sample + 4) / 4; + s->frame.nb_samples = 2 * (buf_size / block_size) / avctx->channels; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + + buf_size = (s->frame.nb_samples * avctx->channels / 2) * block_size; if (avctx->bits_per_coded_sample == 24) { - uint32_t *o = data; + uint32_t *o = (uint32_t *)s->frame.data[0]; for (; buf_size > 6; buf_size -= 7) { *o++ = (av_reverse[buf[2]] << 24) | (av_reverse[buf[1]] << 16) | @@ -100,9 +113,8 @@ (av_reverse[buf[3] & 0x0f] << 4); buf += 7; } - *data_size = (uint8_t*) o - (uint8_t*) data; } else if (avctx->bits_per_coded_sample == 20) { - uint32_t *o = data; + uint32_t *o = (uint32_t *)s->frame.data[0]; for (; buf_size > 5; buf_size -= 6) { *o++ = (av_reverse[buf[2] & 0xf0] << 28) | (av_reverse[buf[1]] << 20) | @@ -112,9 +124,8 @@ (av_reverse[buf[3]] << 12); buf += 6; } - *data_size = (uint8_t*) o - (uint8_t*) data; } else { - uint16_t *o = data; + uint16_t *o = (uint16_t *)s->frame.data[0]; for (; buf_size > 4; buf_size -= 5) { *o++ = (av_reverse[buf[1]] << 8) | av_reverse[buf[0]]; @@ -123,10 +134,22 @@ (av_reverse[buf[2]] >> 4); buf += 5; } - *data_size = (uint8_t*) o - (uint8_t*) data; } - return buf - avpkt->data; + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + + return avpkt->size; +} + +static int s302m_decode_init(AVCodecContext *avctx) +{ + S302MDecodeContext *s = avctx->priv_data; + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + + return 0; } @@ -134,7 +157,9 @@ .name = "s302m", .type = AVMEDIA_TYPE_AUDIO, .id = CODEC_ID_S302M, - .priv_data_size = 0, + .priv_data_size = sizeof(S302MDecodeContext), + .init = s302m_decode_init, .decode = s302m_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("SMPTE 302M"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/s3tc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/s3tc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/s3tc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/s3tc.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,7 +28,7 @@ static inline void dxt1_decode_pixels(const uint8_t *s, uint32_t *d, unsigned int qstride, unsigned int flag, uint64_t alpha) { - unsigned int x, y, c0, c1, a = (!flag * 255) << 24; + unsigned int x, y, c0, c1, a = (!flag * 255u) << 24; unsigned int rb0, rb1, rb2, rb3, g0, g1, g2, g3; uint32_t colors[4], pixels; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/s3tc.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/s3tc.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/s3tc.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/s3tc.h 2012-01-11 00:34:30.000000000 +0000 @@ -29,8 +29,8 @@ /** * Decode DXT1 encoded data to RGB32 - * @param *src source buffer, has to be aligned on a 4-byte boundary - * @param *dst destination buffer + * @param src source buffer, has to be aligned on a 4-byte boundary + * @param dst destination buffer * @param w width of output image * @param h height of output image * @param stride line size of output image @@ -40,8 +40,8 @@ const unsigned int stride); /** * Decode DXT3 encoded data to RGB32 - * @param *src source buffer, has to be aligned on a 4-byte boundary - * @param *dst destination buffer + * @param src source buffer, has to be aligned on a 4-byte boundary + * @param dst destination buffer * @param w width of output image * @param h height of output image * @param stride line size of output image diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sbr.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sbr.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sbr.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sbr.h 2012-01-11 00:34:30.000000000 +0000 @@ -42,7 +42,7 @@ uint8_t bs_xover_band; /** - * @defgroup bs_header_extra_1 Variables associated with bs_header_extra_1 + * @name Variables associated with bs_header_extra_1 * @{ */ uint8_t bs_freq_scale; @@ -58,7 +58,7 @@ */ typedef struct { /** - * @defgroup aac_bitstream Main bitstream data variables + * @name Main bitstream data variables * @{ */ unsigned bs_frame_class; @@ -74,7 +74,7 @@ /** @} */ /** - * @defgroup state State variables + * @name State variables * @{ */ DECLARE_ALIGNED(16, float, synthesis_filterbank_samples)[SBR_SYNTHESIS_BUF_SIZE]; @@ -116,7 +116,7 @@ SpectrumParameters spectrum_params; int bs_amp_res_header; /** - * @defgroup bs_header_extra_2 variables associated with bs_header_extra_2 + * @name Variables associated with bs_header_extra_2 * @{ */ unsigned bs_limiter_bands; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sgidec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sgidec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sgidec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sgidec.c 2012-01-11 00:34:30.000000000 +0000 @@ -260,14 +260,13 @@ } AVCodec ff_sgi_decoder = { - "sgi", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_SGI, - sizeof(SgiState), - sgi_init, - NULL, - sgi_end, - decode_frame, + .name = "sgi", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_SGI, + .priv_data_size = sizeof(SgiState), + .init = sgi_init, + .close = sgi_end, + .decode = decode_frame, .long_name = NULL_IF_CONFIG_SMALL("SGI image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sgienc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sgienc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sgienc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sgienc.c 2012-01-11 00:34:30.000000000 +0000 @@ -160,13 +160,12 @@ } AVCodec ff_sgi_encoder = { - "sgi", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_SGI, - sizeof(SgiContext), - encode_init, - encode_frame, - NULL, + .name = "sgi", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_SGI, + .priv_data_size = sizeof(SgiContext), + .init = encode_init, + .encode = encode_frame, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGBA, PIX_FMT_GRAY8, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("SGI image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sh4/dsputil_align.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sh4/dsputil_align.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sh4/dsputil_align.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sh4/dsputil_align.c 2012-01-11 00:34:30.000000000 +0000 @@ -333,7 +333,7 @@ void dsputil_init_align(DSPContext* c, AVCodecContext *avctx) { - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; if (!high_bit_depth) { c->put_pixels_tab[0][0] = put_rnd_pixels16_o; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sh4/dsputil_sh4.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sh4/dsputil_sh4.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sh4/dsputil_sh4.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sh4/dsputil_sh4.c 2012-01-11 00:34:30.000000000 +0000 @@ -92,12 +92,13 @@ void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx) { const int idct_algo= avctx->idct_algo; - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; dsputil_init_align(c,avctx); if (!high_bit_depth) c->clear_blocks = clear_blocks_sh4; - if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SH4){ + if (avctx->bits_per_raw_sample <= 8 && + (idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SH4)) { c->idct_put = idct_put; c->idct_add = idct_add; c->idct = idct_sh4; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/shorten.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/shorten.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/shorten.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/shorten.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,6 +28,7 @@ #include #include "avcodec.h" +#include "bytestream.h" #include "get_bits.h" #include "golomb.h" @@ -69,12 +70,16 @@ #define FN_ZERO 8 #define FN_VERBATIM 9 +/** indicates if the FN_* command is audio or non-audio */ +static const uint8_t is_audio_command[10] = { 1, 1, 1, 1, 0, 0, 0, 1, 1, 0 }; + #define VERBATIM_CKSIZE_SIZE 5 #define VERBATIM_BYTE_SIZE 8 #define CANONICAL_HEADER_SIZE 44 typedef struct ShortenContext { AVCodecContext *avctx; + AVFrame frame; GetBitContext gb; int min_framesize, max_framesize; @@ -98,6 +103,8 @@ int blocksize; int bitindex; int32_t lpcqoffset; + int got_header; + int got_quit_command; } ShortenContext; static av_cold int shorten_decode_init(AVCodecContext * avctx) @@ -106,6 +113,9 @@ s->avctx = avctx; avctx->sample_fmt = AV_SAMPLE_FMT_S16; + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } @@ -113,6 +123,7 @@ { int i, chan; int *coeffs; + void *tmp_ptr; for (chan=0; chanchannels; chan++) { if(FFMAX(1, s->nmean) >= UINT_MAX/sizeof(int32_t)){ @@ -124,9 +135,15 @@ return -1; } - s->offset[chan] = av_realloc(s->offset[chan], sizeof(int32_t)*FFMAX(1, s->nmean)); - - s->decoded[chan] = av_realloc(s->decoded[chan], sizeof(int32_t)*(s->blocksize + s->nwrap)); + tmp_ptr = av_realloc(s->offset[chan], sizeof(int32_t)*FFMAX(1, s->nmean)); + if (!tmp_ptr) + return AVERROR(ENOMEM); + s->offset[chan] = tmp_ptr; + + tmp_ptr = av_realloc(s->decoded[chan], sizeof(int32_t)*(s->blocksize + s->nwrap)); + if (!tmp_ptr) + return AVERROR(ENOMEM); + s->decoded[chan] = tmp_ptr; for (i=0; inwrap; i++) s->decoded[chan][i] = 0; s->decoded[chan] += s->nwrap; @@ -155,11 +172,11 @@ if (s->bitshift != 0) for (i = 0; i < s->blocksize; i++) - buffer[s->nwrap + i] <<= s->bitshift; + buffer[i] <<= s->bitshift; } -static void init_offset(ShortenContext *s) +static int init_offset(ShortenContext *s) { int32_t mean = 0; int chan, i; @@ -173,55 +190,46 @@ break; default: av_log(s->avctx, AV_LOG_ERROR, "unknown audio type"); - abort(); + return AVERROR_INVALIDDATA; } for (chan = 0; chan < s->channels; chan++) for (i = 0; i < nblock; i++) s->offset[chan][i] = mean; + return 0; } -static inline int get_le32(GetBitContext *gb) -{ - return av_bswap32(get_bits_long(gb, 32)); -} - -static inline short get_le16(GetBitContext *gb) -{ - return av_bswap16(get_bits_long(gb, 16)); -} - -static int decode_wave_header(AVCodecContext *avctx, uint8_t *header, int header_size) +static int decode_wave_header(AVCodecContext *avctx, const uint8_t *header, + int header_size) { - GetBitContext hb; int len; short wave_format; - init_get_bits(&hb, header, header_size*8); - if (get_le32(&hb) != MKTAG('R','I','F','F')) { + + if (bytestream_get_le32(&header) != MKTAG('R','I','F','F')) { av_log(avctx, AV_LOG_ERROR, "missing RIFF tag\n"); return -1; } - skip_bits_long(&hb, 32); /* chunk_size */ + header += 4; /* chunk size */; - if (get_le32(&hb) != MKTAG('W','A','V','E')) { + if (bytestream_get_le32(&header) != MKTAG('W','A','V','E')) { av_log(avctx, AV_LOG_ERROR, "missing WAVE tag\n"); return -1; } - while (get_le32(&hb) != MKTAG('f','m','t',' ')) { - len = get_le32(&hb); - skip_bits(&hb, 8*len); + while (bytestream_get_le32(&header) != MKTAG('f','m','t',' ')) { + len = bytestream_get_le32(&header); + header += len; } - len = get_le32(&hb); + len = bytestream_get_le32(&header); if (len < 16) { av_log(avctx, AV_LOG_ERROR, "fmt chunk was too short\n"); return -1; } - wave_format = get_le16(&hb); + wave_format = bytestream_get_le16(&header); switch (wave_format) { case WAVE_FORMAT_PCM: @@ -231,11 +239,11 @@ return -1; } - avctx->channels = get_le16(&hb); - avctx->sample_rate = get_le32(&hb); - avctx->bit_rate = get_le32(&hb) * 8; - avctx->block_align = get_le16(&hb); - avctx->bits_per_coded_sample = get_le16(&hb); + header += 2; // skip channels (already got from shorten header) + avctx->sample_rate = bytestream_get_le32(&header); + header += 4; // skip bit rate (represents original uncompressed bit rate) + header += 2; // skip block align (not needed) + avctx->bits_per_coded_sample = bytestream_get_le16(&header); if (avctx->bits_per_coded_sample != 16) { av_log(avctx, AV_LOG_ERROR, "unsupported number of bits per sample\n"); @@ -249,257 +257,342 @@ return 0; } -static int16_t * interleave_buffer(int16_t *samples, int nchan, int blocksize, int32_t **buffer) { +static void interleave_buffer(int16_t *samples, int nchan, int blocksize, + int32_t **buffer) +{ int i, chan; for (i=0; icoeffs; + int pred_order, sum, qshift, init_sum, i, j; + const int *coeffs; - for (i=0; igb, LPCQUANT); + if (command == FN_QLPC) { + /* read/validate prediction order */ + pred_order = get_ur_golomb_shorten(&s->gb, LPCQSIZE); + if (pred_order > s->nwrap) { + av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\n", pred_order); + return AVERROR(EINVAL); + } + /* read LPC coefficients */ + for (i=0; icoeffs[i] = get_sr_golomb_shorten(&s->gb, LPCQUANT); + coeffs = s->coeffs; + + qshift = LPCQUANT; + } else { + /* fixed LPC coeffs */ + pred_order = command; + coeffs = fixed_coeffs[pred_order-1]; + qshift = 0; + } + + /* subtract offset from previous samples to use in prediction */ + if (command == FN_QLPC && coffset) + for (i = -pred_order; i < 0; i++) + s->decoded[channel][i] -= coffset; + /* decode residual and do LPC prediction */ + init_sum = pred_order ? (command == FN_QLPC ? s->lpcqoffset : 0) : coffset; for (i=0; i < s->blocksize; i++) { - sum = s->lpcqoffset; + sum = init_sum; for (j=0; jdecoded[channel][i-j-1]; - s->decoded[channel][i] = get_sr_golomb_shorten(&s->gb, residual_size) + (sum >> LPCQUANT); + s->decoded[channel][i] = get_sr_golomb_shorten(&s->gb, residual_size) + (sum >> qshift); } + + /* add offset to current samples */ + if (command == FN_QLPC && coffset) + for (i = 0; i < s->blocksize; i++) + s->decoded[channel][i] += coffset; + + return 0; } +static int read_header(ShortenContext *s) +{ + int i, ret; + int maxnlpc = 0; + /* shorten signature */ + if (get_bits_long(&s->gb, 32) != AV_RB32("ajkg")) { + av_log(s->avctx, AV_LOG_ERROR, "missing shorten magic 'ajkg'\n"); + return -1; + } + + s->lpcqoffset = 0; + s->blocksize = DEFAULT_BLOCK_SIZE; + s->nmean = -1; + s->version = get_bits(&s->gb, 8); + s->internal_ftype = get_uint(s, TYPESIZE); + + s->channels = get_uint(s, CHANSIZE); + if (s->channels > MAX_CHANNELS) { + av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels); + return -1; + } + s->avctx->channels = s->channels; + + /* get blocksize if version > 0 */ + if (s->version > 0) { + int skip_bytes, blocksize; + + blocksize = get_uint(s, av_log2(DEFAULT_BLOCK_SIZE)); + if (!blocksize || blocksize > MAX_BLOCKSIZE) { + av_log(s->avctx, AV_LOG_ERROR, "invalid or unsupported block size: %d\n", + blocksize); + return AVERROR(EINVAL); + } + s->blocksize = blocksize; + + maxnlpc = get_uint(s, LPCQSIZE); + s->nmean = get_uint(s, 0); + + skip_bytes = get_uint(s, NSKIPSIZE); + for (i=0; igb, 8); + } + } + s->nwrap = FFMAX(NWRAP, maxnlpc); + + if ((ret = allocate_buffers(s)) < 0) + return ret; + + if ((ret = init_offset(s)) < 0) + return ret; + + if (s->version > 1) + s->lpcqoffset = V2LPCQOFFSET; + + if (get_ur_golomb_shorten(&s->gb, FNSIZE) != FN_VERBATIM) { + av_log(s->avctx, AV_LOG_ERROR, "missing verbatim section at beginning of stream\n"); + return -1; + } + + s->header_size = get_ur_golomb_shorten(&s->gb, VERBATIM_CKSIZE_SIZE); + if (s->header_size >= OUT_BUFFER_SIZE || s->header_size < CANONICAL_HEADER_SIZE) { + av_log(s->avctx, AV_LOG_ERROR, "header is wrong size: %d\n", s->header_size); + return -1; + } + + for (i=0; iheader_size; i++) + s->header[i] = (char)get_ur_golomb_shorten(&s->gb, VERBATIM_BYTE_SIZE); -static int shorten_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) + if (decode_wave_header(s->avctx, s->header, s->header_size) < 0) + return -1; + + s->cur_chan = 0; + s->bitshift = 0; + + s->got_header = 1; + + return 0; +} + +static int shorten_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; ShortenContext *s = avctx->priv_data; int i, input_buf_size = 0; - int16_t *samples = data; + int ret; + + /* allocate internal bitstream buffer */ if(s->max_framesize == 0){ + void *tmp_ptr; s->max_framesize= 1024; // should hopefully be enough for the first header - s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize); + tmp_ptr = av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, + s->max_framesize); + if (!tmp_ptr) { + av_log(avctx, AV_LOG_ERROR, "error allocating bitstream buffer\n"); + return AVERROR(ENOMEM); + } + s->bitstream = tmp_ptr; } + /* append current packet data to bitstream buffer */ if(1 && s->max_framesize){//FIXME truncated buf_size= FFMIN(buf_size, s->max_framesize - s->bitstream_size); input_buf_size= buf_size; if(s->bitstream_index + s->bitstream_size + buf_size > s->allocated_bitstream_size){ - // printf("memmove\n"); memmove(s->bitstream, &s->bitstream[s->bitstream_index], s->bitstream_size); s->bitstream_index=0; } - memcpy(&s->bitstream[s->bitstream_index + s->bitstream_size], buf, buf_size); + if (buf) + memcpy(&s->bitstream[s->bitstream_index + s->bitstream_size], buf, buf_size); buf= &s->bitstream[s->bitstream_index]; buf_size += s->bitstream_size; s->bitstream_size= buf_size; - if(buf_size < s->max_framesize){ - *data_size = 0; + /* do not decode until buffer has at least max_framesize bytes or + the end of the file has been reached */ + if (buf_size < s->max_framesize && avpkt->data) { + *got_frame_ptr = 0; return input_buf_size; } } + /* init and position bitstream reader */ init_get_bits(&s->gb, buf, buf_size*8); skip_bits(&s->gb, s->bitindex); - if (!s->blocksize) - { - int maxnlpc = 0; - /* shorten signature */ - if (get_bits_long(&s->gb, 32) != AV_RB32("ajkg")) { - av_log(s->avctx, AV_LOG_ERROR, "missing shorten magic 'ajkg'\n"); - return -1; - } - - s->lpcqoffset = 0; - s->blocksize = DEFAULT_BLOCK_SIZE; - s->channels = 1; - s->nmean = -1; - s->version = get_bits(&s->gb, 8); - s->internal_ftype = get_uint(s, TYPESIZE); - - s->channels = get_uint(s, CHANSIZE); - if (s->channels > MAX_CHANNELS) { - av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels); - return -1; - } - - /* get blocksize if version > 0 */ - if (s->version > 0) { - int skip_bytes; - s->blocksize = get_uint(s, av_log2(DEFAULT_BLOCK_SIZE)); - maxnlpc = get_uint(s, LPCQSIZE); - s->nmean = get_uint(s, 0); - - skip_bytes = get_uint(s, NSKIPSIZE); - for (i=0; igb, 8); - } - } - s->nwrap = FFMAX(NWRAP, maxnlpc); - - if (allocate_buffers(s)) - return -1; - init_offset(s); - - if (s->version > 1) - s->lpcqoffset = V2LPCQOFFSET; + /* process header or next subblock */ + if (!s->got_header) { + if ((ret = read_header(s)) < 0) + return ret; + *got_frame_ptr = 0; + goto finish_frame; + } + + /* if quit command was read previously, don't decode anything */ + if (s->got_quit_command) { + *got_frame_ptr = 0; + return avpkt->size; + } - if (get_ur_golomb_shorten(&s->gb, FNSIZE) != FN_VERBATIM) { - av_log(s->avctx, AV_LOG_ERROR, "missing verbatim section at beginning of stream\n"); - return -1; - } + s->cur_chan = 0; + while (s->cur_chan < s->channels) { + int cmd; + int len; - s->header_size = get_ur_golomb_shorten(&s->gb, VERBATIM_CKSIZE_SIZE); - if (s->header_size >= OUT_BUFFER_SIZE || s->header_size < CANONICAL_HEADER_SIZE) { - av_log(s->avctx, AV_LOG_ERROR, "header is wrong size: %d\n", s->header_size); - return -1; + if (get_bits_left(&s->gb) < 3+FNSIZE) { + *got_frame_ptr = 0; + break; } - for (i=0; iheader_size; i++) - s->header[i] = (char)get_ur_golomb_shorten(&s->gb, VERBATIM_BYTE_SIZE); - - if (decode_wave_header(avctx, s->header, s->header_size) < 0) - return -1; - - s->cur_chan = 0; - s->bitshift = 0; - } - else - { - int cmd; - int len; cmd = get_ur_golomb_shorten(&s->gb, FNSIZE); - switch (cmd) { - case FN_ZERO: - case FN_DIFF0: - case FN_DIFF1: - case FN_DIFF2: - case FN_DIFF3: - case FN_QLPC: - { - int residual_size = 0; - int channel = s->cur_chan; - int32_t coffset; - if (cmd != FN_ZERO) { - residual_size = get_ur_golomb_shorten(&s->gb, ENERGYSIZE); - /* this is a hack as version 0 differed in defintion of get_sr_golomb_shorten */ - if (s->version == 0) - residual_size--; - } - if (s->nmean == 0) - coffset = s->offset[channel][0]; - else { - int32_t sum = (s->version < 2) ? 0 : s->nmean / 2; - for (i=0; inmean; i++) - sum += s->offset[channel][i]; - coffset = sum / s->nmean; - if (s->version >= 2) - coffset >>= FFMIN(1, s->bitshift); - } - switch (cmd) { - case FN_ZERO: - for (i=0; iblocksize; i++) - s->decoded[channel][i] = 0; - break; - case FN_DIFF0: - for (i=0; iblocksize; i++) - s->decoded[channel][i] = get_sr_golomb_shorten(&s->gb, residual_size) + coffset; - break; - case FN_DIFF1: - for (i=0; iblocksize; i++) - s->decoded[channel][i] = get_sr_golomb_shorten(&s->gb, residual_size) + s->decoded[channel][i - 1]; - break; - case FN_DIFF2: - for (i=0; iblocksize; i++) - s->decoded[channel][i] = get_sr_golomb_shorten(&s->gb, residual_size) + 2*s->decoded[channel][i-1] - - s->decoded[channel][i-2]; - break; - case FN_DIFF3: - for (i=0; iblocksize; i++) - s->decoded[channel][i] = get_sr_golomb_shorten(&s->gb, residual_size) + 3*s->decoded[channel][i-1] - - 3*s->decoded[channel][i-2] - + s->decoded[channel][i-3]; - break; - case FN_QLPC: - { - int pred_order = get_ur_golomb_shorten(&s->gb, LPCQSIZE); - if (pred_order > s->nwrap) { - av_log(avctx, AV_LOG_ERROR, - "invalid pred_order %d\n", - pred_order); - return -1; - } - for (i=0; idecoded[channel][i - pred_order] -= coffset; - decode_subframe_lpc(s, channel, residual_size, pred_order); - if (coffset != 0) - for (i=0; i < s->blocksize; i++) - s->decoded[channel][i] += coffset; - } + if (cmd > FN_VERBATIM) { + av_log(avctx, AV_LOG_ERROR, "unknown shorten function %d\n", cmd); + *got_frame_ptr = 0; + break; + } + + if (!is_audio_command[cmd]) { + /* process non-audio command */ + switch (cmd) { + case FN_VERBATIM: + len = get_ur_golomb_shorten(&s->gb, VERBATIM_CKSIZE_SIZE); + while (len--) { + get_ur_golomb_shorten(&s->gb, VERBATIM_BYTE_SIZE); } - if (s->nmean > 0) { - int32_t sum = (s->version < 2) ? 0 : s->blocksize / 2; - for (i=0; iblocksize; i++) - sum += s->decoded[channel][i]; - - for (i=1; inmean; i++) - s->offset[channel][i-1] = s->offset[channel][i]; - - if (s->version < 2) - s->offset[channel][s->nmean - 1] = sum / s->blocksize; - else - s->offset[channel][s->nmean - 1] = (sum / s->blocksize) << s->bitshift; + break; + case FN_BITSHIFT: + s->bitshift = get_ur_golomb_shorten(&s->gb, BITSHIFTSIZE); + break; + case FN_BLOCKSIZE: { + int blocksize = get_uint(s, av_log2(s->blocksize)); + if (blocksize > s->blocksize) { + av_log(avctx, AV_LOG_ERROR, "Increasing block size is not supported\n"); + return AVERROR_PATCHWELCOME; } - for (i=-s->nwrap; i<0; i++) - s->decoded[channel][i] = s->decoded[channel][i + s->blocksize]; - - fix_bitshift(s, s->decoded[channel]); - - s->cur_chan++; - if (s->cur_chan == s->channels) { - samples = interleave_buffer(samples, s->channels, s->blocksize, s->decoded); - s->cur_chan = 0; - goto frame_done; + if (!blocksize || blocksize > MAX_BLOCKSIZE) { + av_log(avctx, AV_LOG_ERROR, "invalid or unsupported " + "block size: %d\n", blocksize); + return AVERROR(EINVAL); } + s->blocksize = blocksize; break; } + case FN_QUIT: + s->got_quit_command = 1; + break; + } + if (cmd == FN_BLOCKSIZE || cmd == FN_QUIT) { + *got_frame_ptr = 0; break; - case FN_VERBATIM: - len = get_ur_golomb_shorten(&s->gb, VERBATIM_CKSIZE_SIZE); - while (len--) { - get_ur_golomb_shorten(&s->gb, VERBATIM_BYTE_SIZE); + } + } else { + /* process audio command */ + int residual_size = 0; + int channel = s->cur_chan; + int32_t coffset; + + /* get Rice code for residual decoding */ + if (cmd != FN_ZERO) { + residual_size = get_ur_golomb_shorten(&s->gb, ENERGYSIZE); + /* this is a hack as version 0 differed in defintion of get_sr_golomb_shorten */ + if (s->version == 0) + residual_size--; + } + + /* calculate sample offset using means from previous blocks */ + if (s->nmean == 0) + coffset = s->offset[channel][0]; + else { + int32_t sum = (s->version < 2) ? 0 : s->nmean / 2; + for (i=0; inmean; i++) + sum += s->offset[channel][i]; + coffset = sum / s->nmean; + if (s->version >= 2) + coffset >>= FFMIN(1, s->bitshift); + } + + /* decode samples for this channel */ + if (cmd == FN_ZERO) { + for (i=0; iblocksize; i++) + s->decoded[channel][i] = 0; + } else { + if ((ret = decode_subframe_lpc(s, cmd, channel, residual_size, coffset)) < 0) + return ret; + } + + /* update means with info from the current block */ + if (s->nmean > 0) { + int32_t sum = (s->version < 2) ? 0 : s->blocksize / 2; + for (i=0; iblocksize; i++) + sum += s->decoded[channel][i]; + + for (i=1; inmean; i++) + s->offset[channel][i-1] = s->offset[channel][i]; + + if (s->version < 2) + s->offset[channel][s->nmean - 1] = sum / s->blocksize; + else + s->offset[channel][s->nmean - 1] = (sum / s->blocksize) << s->bitshift; + } + + /* copy wrap samples for use with next block */ + for (i=-s->nwrap; i<0; i++) + s->decoded[channel][i] = s->decoded[channel][i + s->blocksize]; + + /* shift samples to add in unused zero bits which were removed + during encoding */ + fix_bitshift(s, s->decoded[channel]); + + /* if this is the last channel in the block, output the samples */ + s->cur_chan++; + if (s->cur_chan == s->channels) { + /* get output buffer */ + s->frame.nb_samples = s->blocksize; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; } - break; - case FN_BITSHIFT: - s->bitshift = get_ur_golomb_shorten(&s->gb, BITSHIFTSIZE); - break; - case FN_BLOCKSIZE: - s->blocksize = get_uint(s, av_log2(s->blocksize)); - break; - case FN_QUIT: - *data_size = 0; - return buf_size; - break; - default: - av_log(avctx, AV_LOG_ERROR, "unknown shorten function %d\n", cmd); - return -1; - break; + /* interleave output */ + interleave_buffer((int16_t *)s->frame.data[0], s->channels, + s->blocksize, s->decoded); + + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + } } } -frame_done: - *data_size = (int8_t *)samples - (int8_t *)data; + if (s->cur_chan < s->channels) + *got_frame_ptr = 0; - // s->last_blocksize = s->blocksize; +finish_frame: s->bitindex = get_bits_count(&s->gb) - 8*((get_bits_count(&s->gb))/8); i= (get_bits_count(&s->gb))/8; if (i > buf_size) { @@ -528,25 +621,18 @@ } av_freep(&s->bitstream); av_freep(&s->coeffs); - return 0; -} -static void shorten_flush(AVCodecContext *avctx){ - ShortenContext *s = avctx->priv_data; - - s->bitstream_size= - s->bitstream_index= 0; + return 0; } AVCodec ff_shorten_decoder = { - "shorten", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_SHORTEN, - sizeof(ShortenContext), - shorten_decode_init, - NULL, - shorten_decode_close, - shorten_decode_frame, - .flush= shorten_flush, + .name = "shorten", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_SHORTEN, + .priv_data_size = sizeof(ShortenContext), + .init = shorten_decode_init, + .close = shorten_decode_close, + .decode = shorten_decode_frame, + .capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1, .long_name= NULL_IF_CONFIG_SMALL("Shorten"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/simple_idct.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/simple_idct.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/simple_idct.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/simple_idct.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,378 +25,19 @@ * simpleidct in C. */ -/* - based upon some outcommented c code from mpeg2dec (idct_mmx.c - written by Aaron Holtzman ) - */ +#include "libavutil/intreadwrite.h" #include "avcodec.h" #include "dsputil.h" #include "mathops.h" #include "simple_idct.h" -#if 0 -#define W1 2841 /* 2048*sqrt (2)*cos (1*pi/16) */ -#define W2 2676 /* 2048*sqrt (2)*cos (2*pi/16) */ -#define W3 2408 /* 2048*sqrt (2)*cos (3*pi/16) */ -#define W4 2048 /* 2048*sqrt (2)*cos (4*pi/16) */ -#define W5 1609 /* 2048*sqrt (2)*cos (5*pi/16) */ -#define W6 1108 /* 2048*sqrt (2)*cos (6*pi/16) */ -#define W7 565 /* 2048*sqrt (2)*cos (7*pi/16) */ -#define ROW_SHIFT 8 -#define COL_SHIFT 17 -#else -#define W1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 -#define W2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 -#define W3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 -#define W4 16383 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 -#define W5 12873 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 -#define W6 8867 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 -#define W7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 -#define ROW_SHIFT 11 -#define COL_SHIFT 20 // 6 -#endif - -static inline void idctRowCondDC (DCTELEM * row) -{ - int a0, a1, a2, a3, b0, b1, b2, b3; -#if HAVE_FAST_64BIT - uint64_t temp; -#else - uint32_t temp; -#endif - -#if HAVE_FAST_64BIT -#if HAVE_BIGENDIAN -#define ROW0_MASK 0xffff000000000000LL -#else -#define ROW0_MASK 0xffffLL -#endif - if(sizeof(DCTELEM)==2){ - if ( ((((uint64_t *)row)[0] & ~ROW0_MASK) | - ((uint64_t *)row)[1]) == 0) { - temp = (row[0] << 3) & 0xffff; - temp += temp << 16; - temp += temp << 32; - ((uint64_t *)row)[0] = temp; - ((uint64_t *)row)[1] = temp; - return; - } - }else{ - if (!(row[1]|row[2]|row[3]|row[4]|row[5]|row[6]|row[7])) { - row[0]=row[1]=row[2]=row[3]=row[4]=row[5]=row[6]=row[7]= row[0] << 3; - return; - } - } -#else - if(sizeof(DCTELEM)==2){ - if (!(((uint32_t*)row)[1] | - ((uint32_t*)row)[2] | - ((uint32_t*)row)[3] | - row[1])) { - temp = (row[0] << 3) & 0xffff; - temp += temp << 16; - ((uint32_t*)row)[0]=((uint32_t*)row)[1] = - ((uint32_t*)row)[2]=((uint32_t*)row)[3] = temp; - return; - } - }else{ - if (!(row[1]|row[2]|row[3]|row[4]|row[5]|row[6]|row[7])) { - row[0]=row[1]=row[2]=row[3]=row[4]=row[5]=row[6]=row[7]= row[0] << 3; - return; - } - } -#endif - - a0 = (W4 * row[0]) + (1 << (ROW_SHIFT - 1)); - a1 = a0; - a2 = a0; - a3 = a0; - - /* no need to optimize : gcc does it */ - a0 += W2 * row[2]; - a1 += W6 * row[2]; - a2 -= W6 * row[2]; - a3 -= W2 * row[2]; - - b0 = MUL16(W1, row[1]); - MAC16(b0, W3, row[3]); - b1 = MUL16(W3, row[1]); - MAC16(b1, -W7, row[3]); - b2 = MUL16(W5, row[1]); - MAC16(b2, -W1, row[3]); - b3 = MUL16(W7, row[1]); - MAC16(b3, -W5, row[3]); - -#if HAVE_FAST_64BIT - temp = ((uint64_t*)row)[1]; -#else - temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3]; -#endif - if (temp != 0) { - a0 += W4*row[4] + W6*row[6]; - a1 += - W4*row[4] - W2*row[6]; - a2 += - W4*row[4] + W2*row[6]; - a3 += W4*row[4] - W6*row[6]; - - MAC16(b0, W5, row[5]); - MAC16(b0, W7, row[7]); - - MAC16(b1, -W1, row[5]); - MAC16(b1, -W5, row[7]); - - MAC16(b2, W7, row[5]); - MAC16(b2, W3, row[7]); - - MAC16(b3, W3, row[5]); - MAC16(b3, -W1, row[7]); - } - - row[0] = (a0 + b0) >> ROW_SHIFT; - row[7] = (a0 - b0) >> ROW_SHIFT; - row[1] = (a1 + b1) >> ROW_SHIFT; - row[6] = (a1 - b1) >> ROW_SHIFT; - row[2] = (a2 + b2) >> ROW_SHIFT; - row[5] = (a2 - b2) >> ROW_SHIFT; - row[3] = (a3 + b3) >> ROW_SHIFT; - row[4] = (a3 - b3) >> ROW_SHIFT; -} - -static inline void idctSparseColPut (uint8_t *dest, int line_size, - DCTELEM * col) -{ - int a0, a1, a2, a3, b0, b1, b2, b3; - uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; - - /* XXX: I did that only to give same values as previous code */ - a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4)); - a1 = a0; - a2 = a0; - a3 = a0; - - a0 += + W2*col[8*2]; - a1 += + W6*col[8*2]; - a2 += - W6*col[8*2]; - a3 += - W2*col[8*2]; - - b0 = MUL16(W1, col[8*1]); - b1 = MUL16(W3, col[8*1]); - b2 = MUL16(W5, col[8*1]); - b3 = MUL16(W7, col[8*1]); - - MAC16(b0, + W3, col[8*3]); - MAC16(b1, - W7, col[8*3]); - MAC16(b2, - W1, col[8*3]); - MAC16(b3, - W5, col[8*3]); - - if(col[8*4]){ - a0 += + W4*col[8*4]; - a1 += - W4*col[8*4]; - a2 += - W4*col[8*4]; - a3 += + W4*col[8*4]; - } - - if (col[8*5]) { - MAC16(b0, + W5, col[8*5]); - MAC16(b1, - W1, col[8*5]); - MAC16(b2, + W7, col[8*5]); - MAC16(b3, + W3, col[8*5]); - } - - if(col[8*6]){ - a0 += + W6*col[8*6]; - a1 += - W2*col[8*6]; - a2 += + W2*col[8*6]; - a3 += - W6*col[8*6]; - } - - if (col[8*7]) { - MAC16(b0, + W7, col[8*7]); - MAC16(b1, - W5, col[8*7]); - MAC16(b2, + W3, col[8*7]); - MAC16(b3, - W1, col[8*7]); - } - - dest[0] = cm[(a0 + b0) >> COL_SHIFT]; - dest += line_size; - dest[0] = cm[(a1 + b1) >> COL_SHIFT]; - dest += line_size; - dest[0] = cm[(a2 + b2) >> COL_SHIFT]; - dest += line_size; - dest[0] = cm[(a3 + b3) >> COL_SHIFT]; - dest += line_size; - dest[0] = cm[(a3 - b3) >> COL_SHIFT]; - dest += line_size; - dest[0] = cm[(a2 - b2) >> COL_SHIFT]; - dest += line_size; - dest[0] = cm[(a1 - b1) >> COL_SHIFT]; - dest += line_size; - dest[0] = cm[(a0 - b0) >> COL_SHIFT]; -} - -static inline void idctSparseColAdd (uint8_t *dest, int line_size, - DCTELEM * col) -{ - int a0, a1, a2, a3, b0, b1, b2, b3; - uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; - - /* XXX: I did that only to give same values as previous code */ - a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4)); - a1 = a0; - a2 = a0; - a3 = a0; - - a0 += + W2*col[8*2]; - a1 += + W6*col[8*2]; - a2 += - W6*col[8*2]; - a3 += - W2*col[8*2]; - - b0 = MUL16(W1, col[8*1]); - b1 = MUL16(W3, col[8*1]); - b2 = MUL16(W5, col[8*1]); - b3 = MUL16(W7, col[8*1]); - - MAC16(b0, + W3, col[8*3]); - MAC16(b1, - W7, col[8*3]); - MAC16(b2, - W1, col[8*3]); - MAC16(b3, - W5, col[8*3]); - - if(col[8*4]){ - a0 += + W4*col[8*4]; - a1 += - W4*col[8*4]; - a2 += - W4*col[8*4]; - a3 += + W4*col[8*4]; - } - - if (col[8*5]) { - MAC16(b0, + W5, col[8*5]); - MAC16(b1, - W1, col[8*5]); - MAC16(b2, + W7, col[8*5]); - MAC16(b3, + W3, col[8*5]); - } - - if(col[8*6]){ - a0 += + W6*col[8*6]; - a1 += - W2*col[8*6]; - a2 += + W2*col[8*6]; - a3 += - W6*col[8*6]; - } - - if (col[8*7]) { - MAC16(b0, + W7, col[8*7]); - MAC16(b1, - W5, col[8*7]); - MAC16(b2, + W3, col[8*7]); - MAC16(b3, - W1, col[8*7]); - } - - dest[0] = cm[dest[0] + ((a0 + b0) >> COL_SHIFT)]; - dest += line_size; - dest[0] = cm[dest[0] + ((a1 + b1) >> COL_SHIFT)]; - dest += line_size; - dest[0] = cm[dest[0] + ((a2 + b2) >> COL_SHIFT)]; - dest += line_size; - dest[0] = cm[dest[0] + ((a3 + b3) >> COL_SHIFT)]; - dest += line_size; - dest[0] = cm[dest[0] + ((a3 - b3) >> COL_SHIFT)]; - dest += line_size; - dest[0] = cm[dest[0] + ((a2 - b2) >> COL_SHIFT)]; - dest += line_size; - dest[0] = cm[dest[0] + ((a1 - b1) >> COL_SHIFT)]; - dest += line_size; - dest[0] = cm[dest[0] + ((a0 - b0) >> COL_SHIFT)]; -} - -static inline void idctSparseCol (DCTELEM * col) -{ - int a0, a1, a2, a3, b0, b1, b2, b3; - - /* XXX: I did that only to give same values as previous code */ - a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4)); - a1 = a0; - a2 = a0; - a3 = a0; - - a0 += + W2*col[8*2]; - a1 += + W6*col[8*2]; - a2 += - W6*col[8*2]; - a3 += - W2*col[8*2]; - - b0 = MUL16(W1, col[8*1]); - b1 = MUL16(W3, col[8*1]); - b2 = MUL16(W5, col[8*1]); - b3 = MUL16(W7, col[8*1]); - - MAC16(b0, + W3, col[8*3]); - MAC16(b1, - W7, col[8*3]); - MAC16(b2, - W1, col[8*3]); - MAC16(b3, - W5, col[8*3]); - - if(col[8*4]){ - a0 += + W4*col[8*4]; - a1 += - W4*col[8*4]; - a2 += - W4*col[8*4]; - a3 += + W4*col[8*4]; - } - - if (col[8*5]) { - MAC16(b0, + W5, col[8*5]); - MAC16(b1, - W1, col[8*5]); - MAC16(b2, + W7, col[8*5]); - MAC16(b3, + W3, col[8*5]); - } - - if(col[8*6]){ - a0 += + W6*col[8*6]; - a1 += - W2*col[8*6]; - a2 += + W2*col[8*6]; - a3 += - W6*col[8*6]; - } - - if (col[8*7]) { - MAC16(b0, + W7, col[8*7]); - MAC16(b1, - W5, col[8*7]); - MAC16(b2, + W3, col[8*7]); - MAC16(b3, - W1, col[8*7]); - } - - col[0 ] = ((a0 + b0) >> COL_SHIFT); - col[8 ] = ((a1 + b1) >> COL_SHIFT); - col[16] = ((a2 + b2) >> COL_SHIFT); - col[24] = ((a3 + b3) >> COL_SHIFT); - col[32] = ((a3 - b3) >> COL_SHIFT); - col[40] = ((a2 - b2) >> COL_SHIFT); - col[48] = ((a1 - b1) >> COL_SHIFT); - col[56] = ((a0 - b0) >> COL_SHIFT); -} - -void ff_simple_idct_put(uint8_t *dest, int line_size, DCTELEM *block) -{ - int i; - for(i=0; i<8; i++) - idctRowCondDC(block + i*8); - - for(i=0; i<8; i++) - idctSparseColPut(dest + i, line_size, block + i); -} - -void ff_simple_idct_add(uint8_t *dest, int line_size, DCTELEM *block) -{ - int i; - for(i=0; i<8; i++) - idctRowCondDC(block + i*8); - - for(i=0; i<8; i++) - idctSparseColAdd(dest + i, line_size, block + i); -} - -void ff_simple_idct(DCTELEM *block) -{ - int i; - for(i=0; i<8; i++) - idctRowCondDC(block + i*8); - - for(i=0; i<8; i++) - idctSparseCol(block + i); -} +#define BIT_DEPTH 8 +#include "simple_idct_template.c" +#undef BIT_DEPTH + +#define BIT_DEPTH 10 +#include "simple_idct_template.c" +#undef BIT_DEPTH /* 2x4x8 idct */ @@ -467,7 +108,7 @@ /* IDCT8 on each line */ for(i=0; i<8; i++) { - idctRowCondDC(block + i*8); + idctRowCondDC_8(block + i*8, 0); } /* IDCT4 and store */ @@ -542,7 +183,7 @@ /* IDCT8 on each line */ for(i=0; i<4; i++) { - idctRowCondDC(block + i*8); + idctRowCondDC_8(block + i*8, 0); } /* IDCT4 and store */ @@ -562,7 +203,7 @@ /* IDCT8 and store */ for(i=0; i<4; i++){ - idctSparseColAdd(dest + i, line_size, block + i); + idctSparseColAdd_8(dest + i, line_size, block + i); } } @@ -580,3 +221,17 @@ idct4col_add(dest + i, line_size, block + i); } } + +void ff_prores_idct(DCTELEM *block, const int16_t *qmat) +{ + int i; + + for (i = 0; i < 64; i++) + block[i] *= qmat[i]; + + for (i = 0; i < 8; i++) + idctRowCondDC_10(block + i*8, 2); + + for (i = 0; i < 8; i++) + idctSparseCol_10(block + i); +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/simple_idct.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/simple_idct.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/simple_idct.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/simple_idct.h 2012-01-11 00:34:30.000000000 +0000 @@ -31,12 +31,23 @@ #include #include "dsputil.h" -void ff_simple_idct_put(uint8_t *dest, int line_size, DCTELEM *block); -void ff_simple_idct_add(uint8_t *dest, int line_size, DCTELEM *block); +void ff_simple_idct_put_8(uint8_t *dest, int line_size, DCTELEM *block); +void ff_simple_idct_add_8(uint8_t *dest, int line_size, DCTELEM *block); +void ff_simple_idct_8(DCTELEM *block); + +void ff_simple_idct_put_10(uint8_t *dest, int line_size, DCTELEM *block); +void ff_simple_idct_add_10(uint8_t *dest, int line_size, DCTELEM *block); +void ff_simple_idct_10(DCTELEM *block); +/** + * Special version of ff_simple_idct_10() which does dequantization + * and scales by a factor of 2 more between the two IDCTs to account + * for larger scale of input coefficients. + */ +void ff_prores_idct(DCTELEM *block, const int16_t *qmat); + void ff_simple_idct_mmx(int16_t *block); void ff_simple_idct_add_mmx(uint8_t *dest, int line_size, int16_t *block); void ff_simple_idct_put_mmx(uint8_t *dest, int line_size, int16_t *block); -void ff_simple_idct(DCTELEM *block); void ff_simple_idct248_put(uint8_t *dest, int line_size, DCTELEM *block); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/simple_idct_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/simple_idct_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/simple_idct_template.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/simple_idct_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,326 @@ +/* + * Simple IDCT + * + * Copyright (c) 2001 Michael Niedermayer + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * simpleidct in C. + */ + +/* + based upon some outcommented c code from mpeg2dec (idct_mmx.c + written by Aaron Holtzman ) + */ + +#include "bit_depth_template.c" + +#undef W1 +#undef W2 +#undef W3 +#undef W4 +#undef W5 +#undef W6 +#undef W7 +#undef ROW_SHIFT +#undef COL_SHIFT +#undef DC_SHIFT +#undef MUL +#undef MAC + +#if BIT_DEPTH == 8 + +#define W1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 +#define W2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 +#define W3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 +#define W4 16383 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 +#define W5 12873 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 +#define W6 8867 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 +#define W7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 + +#define ROW_SHIFT 11 +#define COL_SHIFT 20 +#define DC_SHIFT 3 + +#define MUL(a, b) MUL16(a, b) +#define MAC(a, b, c) MAC16(a, b, c) + +#elif BIT_DEPTH == 10 + +#define W1 90901 +#define W2 85627 +#define W3 77062 +#define W4 65535 +#define W5 51491 +#define W6 35468 +#define W7 18081 + +#define ROW_SHIFT 15 +#define COL_SHIFT 20 +#define DC_SHIFT 1 + +#define MUL(a, b) ((a) * (b)) +#define MAC(a, b, c) ((a) += (b) * (c)) + +#else + +#error "Unsupported bitdepth" + +#endif + +static inline void FUNC(idctRowCondDC)(DCTELEM *row, int extra_shift) +{ + int a0, a1, a2, a3, b0, b1, b2, b3; + +#if HAVE_FAST_64BIT +#define ROW0_MASK (0xffffLL << 48 * HAVE_BIGENDIAN) + if (((((uint64_t *)row)[0] & ~ROW0_MASK) | ((uint64_t *)row)[1]) == 0) { + uint64_t temp; + if (DC_SHIFT - extra_shift > 0) { + temp = (row[0] << (DC_SHIFT - extra_shift)) & 0xffff; + } else { + temp = (row[0] >> (extra_shift - DC_SHIFT)) & 0xffff; + } + temp += temp << 16; + temp += temp << 32; + ((uint64_t *)row)[0] = temp; + ((uint64_t *)row)[1] = temp; + return; + } +#else + if (!(((uint32_t*)row)[1] | + ((uint32_t*)row)[2] | + ((uint32_t*)row)[3] | + row[1])) { + uint32_t temp; + if (DC_SHIFT - extra_shift > 0) { + temp = (row[0] << (DC_SHIFT - extra_shift)) & 0xffff; + } else { + temp = (row[0] >> (extra_shift - DC_SHIFT)) & 0xffff; + } + temp += temp << 16; + ((uint32_t*)row)[0]=((uint32_t*)row)[1] = + ((uint32_t*)row)[2]=((uint32_t*)row)[3] = temp; + return; + } +#endif + + a0 = (W4 * row[0]) + (1 << (ROW_SHIFT - 1)); + a1 = a0; + a2 = a0; + a3 = a0; + + a0 += W2 * row[2]; + a1 += W6 * row[2]; + a2 -= W6 * row[2]; + a3 -= W2 * row[2]; + + b0 = MUL(W1, row[1]); + MAC(b0, W3, row[3]); + b1 = MUL(W3, row[1]); + MAC(b1, -W7, row[3]); + b2 = MUL(W5, row[1]); + MAC(b2, -W1, row[3]); + b3 = MUL(W7, row[1]); + MAC(b3, -W5, row[3]); + + if (AV_RN64A(row + 4)) { + a0 += W4*row[4] + W6*row[6]; + a1 += - W4*row[4] - W2*row[6]; + a2 += - W4*row[4] + W2*row[6]; + a3 += W4*row[4] - W6*row[6]; + + MAC(b0, W5, row[5]); + MAC(b0, W7, row[7]); + + MAC(b1, -W1, row[5]); + MAC(b1, -W5, row[7]); + + MAC(b2, W7, row[5]); + MAC(b2, W3, row[7]); + + MAC(b3, W3, row[5]); + MAC(b3, -W1, row[7]); + } + + row[0] = (a0 + b0) >> (ROW_SHIFT + extra_shift); + row[7] = (a0 - b0) >> (ROW_SHIFT + extra_shift); + row[1] = (a1 + b1) >> (ROW_SHIFT + extra_shift); + row[6] = (a1 - b1) >> (ROW_SHIFT + extra_shift); + row[2] = (a2 + b2) >> (ROW_SHIFT + extra_shift); + row[5] = (a2 - b2) >> (ROW_SHIFT + extra_shift); + row[3] = (a3 + b3) >> (ROW_SHIFT + extra_shift); + row[4] = (a3 - b3) >> (ROW_SHIFT + extra_shift); +} + +#define IDCT_COLS do { \ + a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4)); \ + a1 = a0; \ + a2 = a0; \ + a3 = a0; \ + \ + a0 += W2*col[8*2]; \ + a1 += W6*col[8*2]; \ + a2 += -W6*col[8*2]; \ + a3 += -W2*col[8*2]; \ + \ + b0 = MUL(W1, col[8*1]); \ + b1 = MUL(W3, col[8*1]); \ + b2 = MUL(W5, col[8*1]); \ + b3 = MUL(W7, col[8*1]); \ + \ + MAC(b0, W3, col[8*3]); \ + MAC(b1, -W7, col[8*3]); \ + MAC(b2, -W1, col[8*3]); \ + MAC(b3, -W5, col[8*3]); \ + \ + if (col[8*4]) { \ + a0 += W4*col[8*4]; \ + a1 += -W4*col[8*4]; \ + a2 += -W4*col[8*4]; \ + a3 += W4*col[8*4]; \ + } \ + \ + if (col[8*5]) { \ + MAC(b0, W5, col[8*5]); \ + MAC(b1, -W1, col[8*5]); \ + MAC(b2, W7, col[8*5]); \ + MAC(b3, W3, col[8*5]); \ + } \ + \ + if (col[8*6]) { \ + a0 += W6*col[8*6]; \ + a1 += -W2*col[8*6]; \ + a2 += W2*col[8*6]; \ + a3 += -W6*col[8*6]; \ + } \ + \ + if (col[8*7]) { \ + MAC(b0, W7, col[8*7]); \ + MAC(b1, -W5, col[8*7]); \ + MAC(b2, W3, col[8*7]); \ + MAC(b3, -W1, col[8*7]); \ + } \ + } while (0) + +static inline void FUNC(idctSparseColPut)(pixel *dest, int line_size, + DCTELEM *col) +{ + int a0, a1, a2, a3, b0, b1, b2, b3; + INIT_CLIP; + + IDCT_COLS; + + dest[0] = CLIP((a0 + b0) >> COL_SHIFT); + dest += line_size; + dest[0] = CLIP((a1 + b1) >> COL_SHIFT); + dest += line_size; + dest[0] = CLIP((a2 + b2) >> COL_SHIFT); + dest += line_size; + dest[0] = CLIP((a3 + b3) >> COL_SHIFT); + dest += line_size; + dest[0] = CLIP((a3 - b3) >> COL_SHIFT); + dest += line_size; + dest[0] = CLIP((a2 - b2) >> COL_SHIFT); + dest += line_size; + dest[0] = CLIP((a1 - b1) >> COL_SHIFT); + dest += line_size; + dest[0] = CLIP((a0 - b0) >> COL_SHIFT); +} + +static inline void FUNC(idctSparseColAdd)(pixel *dest, int line_size, + DCTELEM *col) +{ + int a0, a1, a2, a3, b0, b1, b2, b3; + INIT_CLIP; + + IDCT_COLS; + + dest[0] = CLIP(dest[0] + ((a0 + b0) >> COL_SHIFT)); + dest += line_size; + dest[0] = CLIP(dest[0] + ((a1 + b1) >> COL_SHIFT)); + dest += line_size; + dest[0] = CLIP(dest[0] + ((a2 + b2) >> COL_SHIFT)); + dest += line_size; + dest[0] = CLIP(dest[0] + ((a3 + b3) >> COL_SHIFT)); + dest += line_size; + dest[0] = CLIP(dest[0] + ((a3 - b3) >> COL_SHIFT)); + dest += line_size; + dest[0] = CLIP(dest[0] + ((a2 - b2) >> COL_SHIFT)); + dest += line_size; + dest[0] = CLIP(dest[0] + ((a1 - b1) >> COL_SHIFT)); + dest += line_size; + dest[0] = CLIP(dest[0] + ((a0 - b0) >> COL_SHIFT)); +} + +static inline void FUNC(idctSparseCol)(DCTELEM *col) +{ + int a0, a1, a2, a3, b0, b1, b2, b3; + + IDCT_COLS; + + col[0 ] = ((a0 + b0) >> COL_SHIFT); + col[8 ] = ((a1 + b1) >> COL_SHIFT); + col[16] = ((a2 + b2) >> COL_SHIFT); + col[24] = ((a3 + b3) >> COL_SHIFT); + col[32] = ((a3 - b3) >> COL_SHIFT); + col[40] = ((a2 - b2) >> COL_SHIFT); + col[48] = ((a1 - b1) >> COL_SHIFT); + col[56] = ((a0 - b0) >> COL_SHIFT); +} + +void FUNC(ff_simple_idct_put)(uint8_t *dest_, int line_size, DCTELEM *block) +{ + pixel *dest = (pixel *)dest_; + int i; + + line_size /= sizeof(pixel); + + for (i = 0; i < 8; i++) + FUNC(idctRowCondDC)(block + i*8, 0); + + for (i = 0; i < 8; i++) + FUNC(idctSparseColPut)(dest + i, line_size, block + i); +} + +void FUNC(ff_simple_idct_add)(uint8_t *dest_, int line_size, DCTELEM *block) +{ + pixel *dest = (pixel *)dest_; + int i; + + line_size /= sizeof(pixel); + + for (i = 0; i < 8; i++) + FUNC(idctRowCondDC)(block + i*8, 0); + + for (i = 0; i < 8; i++) + FUNC(idctSparseColAdd)(dest + i, line_size, block + i); +} + +void FUNC(ff_simple_idct)(DCTELEM *block) +{ + int i; + + for (i = 0; i < 8; i++) + FUNC(idctRowCondDC)(block + i*8, 0); + + for (i = 0; i < 8; i++) + FUNC(idctSparseCol)(block + i); +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sipr.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sipr.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sipr.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sipr.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,7 +27,7 @@ #include "libavutil/mathematics.h" #include "avcodec.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" #include "dsputil.h" @@ -194,14 +194,16 @@ { int i, j; - parms->ma_pred_switch = get_bits(pgb, p->ma_predictor_bits); + if (p->ma_predictor_bits) + parms->ma_pred_switch = get_bits(pgb, p->ma_predictor_bits); for (i = 0; i < 5; i++) parms->vq_indexes[i] = get_bits(pgb, p->vq_indexes_bits[i]); for (i = 0; i < p->subframe_count; i++) { parms->pitch_delay[i] = get_bits(pgb, p->pitch_delay_bits[i]); - parms->gp_index[i] = get_bits(pgb, p->gp_index_bits); + if (p->gp_index_bits) + parms->gp_index[i] = get_bits(pgb, p->gp_index_bits); for (j = 0; j < p->number_of_fc_indexes; j++) parms->fc_indexes[i][j] = get_bits(pgb, p->fc_index_bits[j]); @@ -478,15 +480,24 @@ SiprContext *ctx = avctx->priv_data; int i; - if (avctx->bit_rate > 12200) ctx->mode = MODE_16k; - else if (avctx->bit_rate > 7500 ) ctx->mode = MODE_8k5; - else if (avctx->bit_rate > 5750 ) ctx->mode = MODE_6k5; - else ctx->mode = MODE_5k0; + switch (avctx->block_align) { + case 20: ctx->mode = MODE_16k; break; + case 19: ctx->mode = MODE_8k5; break; + case 29: ctx->mode = MODE_6k5; break; + case 37: ctx->mode = MODE_5k0; break; + default: + av_log(avctx, AV_LOG_ERROR, "Invalid block_align: %d\n", avctx->block_align); + return AVERROR(EINVAL); + } av_log(avctx, AV_LOG_DEBUG, "Mode: %s\n", modes[ctx->mode].mode_name); - if (ctx->mode == MODE_16k) + if (ctx->mode == MODE_16k) { ff_sipr_init_16k(ctx); + ctx->decode_frame = ff_sipr_decode_frame_16k; + } else { + ctx->decode_frame = decode_frame; + } for (i = 0; i < LP_FILTER_ORDER; i++) ctx->lsp_history[i] = cos((i+1) * M_PI / (LP_FILTER_ORDER + 1)); @@ -496,66 +507,64 @@ avctx->sample_fmt = AV_SAMPLE_FMT_FLT; + avcodec_get_frame_defaults(&ctx->frame); + avctx->coded_frame = &ctx->frame; + return 0; } -static int sipr_decode_frame(AVCodecContext *avctx, void *datap, - int *data_size, AVPacket *avpkt) +static int sipr_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { SiprContext *ctx = avctx->priv_data; const uint8_t *buf=avpkt->data; SiprParameters parm; const SiprModeParam *mode_par = &modes[ctx->mode]; GetBitContext gb; - float *data = datap; + float *samples; int subframe_size = ctx->mode == MODE_16k ? L_SUBFR_16k : SUBFR_SIZE; - int i; + int i, ret; ctx->avctx = avctx; if (avpkt->size < (mode_par->bits_per_frame >> 3)) { av_log(avctx, AV_LOG_ERROR, "Error processing packet: packet size (%d) too small\n", avpkt->size); - - *data_size = 0; return -1; } - if (*data_size < subframe_size * mode_par->subframe_count * sizeof(float)) { - av_log(avctx, AV_LOG_ERROR, - "Error processing packet: output buffer (%d) too small\n", - *data_size); - *data_size = 0; - return -1; + /* get output buffer */ + ctx->frame.nb_samples = mode_par->frames_per_packet * subframe_size * + mode_par->subframe_count; + if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; } + samples = (float *)ctx->frame.data[0]; init_get_bits(&gb, buf, mode_par->bits_per_frame); for (i = 0; i < mode_par->frames_per_packet; i++) { decode_parameters(&parm, &gb, mode_par); - if (ctx->mode == MODE_16k) - ff_sipr_decode_frame_16k(ctx, &parm, data); - else - decode_frame(ctx, &parm, data); + ctx->decode_frame(ctx, &parm, samples); - data += subframe_size * mode_par->subframe_count; + samples += subframe_size * mode_par->subframe_count; } - *data_size = mode_par->frames_per_packet * subframe_size * - mode_par->subframe_count * sizeof(float); + *got_frame_ptr = 1; + *(AVFrame *)data = ctx->frame; return mode_par->bits_per_frame >> 3; } AVCodec ff_sipr_decoder = { - "sipr", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_SIPR, - sizeof(SiprContext), - sipr_decoder_init, - NULL, - NULL, - sipr_decode_frame, + .name = "sipr", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_SIPR, + .priv_data_size = sizeof(SiprContext), + .init = sipr_decoder_init, + .decode = sipr_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("RealAudio SIPR / ACELP.NET"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sipr.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sipr.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sipr.h 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sipr.h 2012-01-11 00:34:30.000000000 +0000 @@ -53,8 +53,18 @@ MODE_COUNT } SiprMode; -typedef struct { +typedef struct SiprParameters { + int ma_pred_switch; ///< switched moving average predictor + int vq_indexes[5]; + int pitch_delay[5]; ///< pitch delay + int gp_index[5]; ///< adaptive-codebook gain indexes + int16_t fc_indexes[5][10]; ///< fixed-codebook indexes + int gc_index[5]; ///< fixed-codebook gain indexes +} SiprParameters; + +typedef struct SiprContext { AVCodecContext *avctx; + AVFrame frame; SiprMode mode; @@ -85,16 +95,10 @@ float mem_preemph[LP_FILTER_ORDER_16k]; float synth[LP_FILTER_ORDER_16k]; double lsp_history_16k[16]; -} SiprContext; -typedef struct { - int ma_pred_switch; ///< switched moving average predictor - int vq_indexes[5]; - int pitch_delay[5]; ///< pitch delay - int gp_index[5]; ///< adaptive-codebook gain indexes - int16_t fc_indexes[5][10]; ///< fixed-codebook indexes - int gc_index[5]; ///< fixed-codebook gain indexes -} SiprParameters; + void (*decode_frame)(struct SiprContext *ctx, SiprParameters *params, + float *out_data); +} SiprContext; extern const float ff_pow_0_5[16]; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/smacker.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/smacker.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/smacker.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/smacker.c 2012-01-11 00:34:30.000000000 +0000 @@ -33,8 +33,9 @@ #include "avcodec.h" #include "libavutil/audioconvert.h" +#include "mathops.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" #include "bytestream.h" @@ -134,11 +135,13 @@ return -1; } b1 = get_bits_count(gb); - i1 = get_vlc2(gb, ctx->v1->table, SMKTREE_BITS, 3); + i1 = ctx->v1->table ? get_vlc2(gb, ctx->v1->table, SMKTREE_BITS, 3) : 0; b1 = get_bits_count(gb) - b1; b2 = get_bits_count(gb); - i2 = get_vlc2(gb, ctx->v2->table, SMKTREE_BITS, 3); + i2 = ctx->v2->table ? get_vlc2(gb, ctx->v2->table, SMKTREE_BITS, 3) : 0; b2 = get_bits_count(gb) - b2; + if (i1 < 0 || i2 < 0) + return -1; val = ctx->recode1[i1] | (ctx->recode2[i2] << 8); if(val == ctx->escapes[0]) { ctx->last[0] = hc->current; @@ -290,7 +293,8 @@ smk->mmap_tbl[0] = 0; smk->mmap_last[0] = smk->mmap_last[1] = smk->mmap_last[2] = 1; } else { - smacker_decode_header_tree(smk, &gb, &smk->mmap_tbl, smk->mmap_last, mmap_size); + if (smacker_decode_header_tree(smk, &gb, &smk->mmap_tbl, smk->mmap_last, mmap_size)) + return -1; } if(!get_bits1(&gb)) { av_log(smk->avctx, AV_LOG_INFO, "Skipping MCLR tree\n"); @@ -298,7 +302,8 @@ smk->mclr_tbl[0] = 0; smk->mclr_last[0] = smk->mclr_last[1] = smk->mclr_last[2] = 1; } else { - smacker_decode_header_tree(smk, &gb, &smk->mclr_tbl, smk->mclr_last, mclr_size); + if (smacker_decode_header_tree(smk, &gb, &smk->mclr_tbl, smk->mclr_last, mclr_size)) + return -1; } if(!get_bits1(&gb)) { av_log(smk->avctx, AV_LOG_INFO, "Skipping FULL tree\n"); @@ -306,7 +311,8 @@ smk->full_tbl[0] = 0; smk->full_last[0] = smk->full_last[1] = smk->full_last[2] = 1; } else { - smacker_decode_header_tree(smk, &gb, &smk->full_tbl, smk->full_last, full_size); + if (smacker_decode_header_tree(smk, &gb, &smk->full_tbl, smk->full_last, full_size)) + return -1; } if(!get_bits1(&gb)) { av_log(smk->avctx, AV_LOG_INFO, "Skipping TYPE tree\n"); @@ -314,7 +320,8 @@ smk->type_tbl[0] = 0; smk->type_last[0] = smk->type_last[1] = smk->type_last[2] = 1; } else { - smacker_decode_header_tree(smk, &gb, &smk->type_tbl, smk->type_last, type_size); + if (smacker_decode_header_tree(smk, &gb, &smk->type_tbl, smk->type_last, type_size)) + return -1; } return 0; @@ -522,8 +529,8 @@ return -1; } - decode_header_trees(c); - + if (decode_header_trees(c)) + return -1; return 0; } @@ -551,47 +558,81 @@ } +typedef struct SmackerAudioContext { + AVFrame frame; +} SmackerAudioContext; + static av_cold int smka_decode_init(AVCodecContext *avctx) { + SmackerAudioContext *s = avctx->priv_data; + + if (avctx->channels < 1 || avctx->channels > 2) { + av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n"); + return AVERROR(EINVAL); + } avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; avctx->sample_fmt = avctx->bits_per_coded_sample == 8 ? AV_SAMPLE_FMT_U8 : AV_SAMPLE_FMT_S16; + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } /** * Decode Smacker audio data */ -static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) +static int smka_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { + SmackerAudioContext *s = avctx->priv_data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; GetBitContext gb; HuffContext h[4]; VLC vlc[4]; - int16_t *samples = data; - int8_t *samples8 = data; + int16_t *samples; + uint8_t *samples8; int val; - int i, res; + int i, res, ret; int unp_size; int bits, stereo; int pred[2] = {0, 0}; + if (buf_size <= 4) { + av_log(avctx, AV_LOG_ERROR, "packet is too small\n"); + return AVERROR(EINVAL); + } + unp_size = AV_RL32(buf); init_get_bits(&gb, buf + 4, (buf_size - 4) * 8); if(!get_bits1(&gb)){ av_log(avctx, AV_LOG_INFO, "Sound: no data\n"); - *data_size = 0; + *got_frame_ptr = 0; return 1; } stereo = get_bits1(&gb); bits = get_bits1(&gb); - if (unp_size & 0xC0000000 || unp_size > *data_size) { - av_log(avctx, AV_LOG_ERROR, "Frame is too large to fit in buffer\n"); - return -1; + if (stereo ^ (avctx->channels != 1)) { + av_log(avctx, AV_LOG_ERROR, "channels mismatch\n"); + return AVERROR(EINVAL); + } + if (bits && avctx->sample_fmt == AV_SAMPLE_FMT_U8) { + av_log(avctx, AV_LOG_ERROR, "sample format mismatch\n"); + return AVERROR(EINVAL); } + /* get output buffer */ + s->frame.nb_samples = unp_size / (avctx->channels * (bits + 1)); + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (int16_t *)s->frame.data[0]; + samples8 = s->frame.data[0]; + memset(vlc, 0, sizeof(VLC) * 4); memset(h, 0, sizeof(HuffContext) * 4); // Initialize @@ -618,9 +659,9 @@ if(bits) { //decode 16-bit data for(i = stereo; i >= 0; i--) pred[i] = av_bswap16(get_bits(&gb, 16)); - for(i = 0; i < stereo; i++) + for(i = 0; i <= stereo; i++) *samples++ = pred[i]; - for(i = 0; i < unp_size / 2; i++) { + for(; i < unp_size / 2; i++) { if(i & stereo) { if(vlc[2].table) res = get_vlc2(&gb, vlc[2].table, SMKTREE_BITS, 3); @@ -632,8 +673,8 @@ else res = 0; val |= h[3].values[res] << 8; - pred[1] += (int16_t)val; - *samples++ = pred[1]; + pred[1] += sign_extend(val, 16); + *samples++ = av_clip_int16(pred[1]); } else { if(vlc[0].table) res = get_vlc2(&gb, vlc[0].table, SMKTREE_BITS, 3); @@ -645,30 +686,30 @@ else res = 0; val |= h[1].values[res] << 8; - pred[0] += val; - *samples++ = pred[0]; + pred[0] += sign_extend(val, 16); + *samples++ = av_clip_int16(pred[0]); } } } else { //8-bit data for(i = stereo; i >= 0; i--) pred[i] = get_bits(&gb, 8); - for(i = 0; i < stereo; i++) + for(i = 0; i <= stereo; i++) *samples8++ = pred[i]; - for(i = 0; i < unp_size; i++) { + for(; i < unp_size; i++) { if(i & stereo){ if(vlc[1].table) res = get_vlc2(&gb, vlc[1].table, SMKTREE_BITS, 3); else res = 0; - pred[1] += (int8_t)h[1].values[res]; - *samples8++ = pred[1]; + pred[1] += sign_extend(h[1].values[res], 8); + *samples8++ = av_clip_uint8(pred[1]); } else { if(vlc[0].table) res = get_vlc2(&gb, vlc[0].table, SMKTREE_BITS, 3); else res = 0; - pred[0] += (int8_t)h[0].values[res]; - *samples8++ = pred[0]; + pred[0] += sign_extend(h[0].values[res], 8); + *samples8++ = av_clip_uint8(pred[0]); } } } @@ -681,32 +722,32 @@ av_free(h[i].values); } - *data_size = unp_size; + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return buf_size; } AVCodec ff_smacker_decoder = { - "smackvid", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_SMACKVIDEO, - sizeof(SmackVContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "smackvid", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_SMACKVIDEO, + .priv_data_size = sizeof(SmackVContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Smacker video"), }; AVCodec ff_smackaud_decoder = { - "smackaud", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_SMACKAUDIO, - 0, - smka_decode_init, - NULL, - NULL, - smka_decode_frame, + .name = "smackaud", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_SMACKAUDIO, + .priv_data_size = sizeof(SmackerAudioContext), + .init = smka_decode_init, + .decode = smka_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Smacker audio"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/smc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/smc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/smc.c 2011-04-16 05:56:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/smc.c 2012-01-11 00:34:30.000000000 +0000 @@ -475,14 +475,13 @@ } AVCodec ff_smc_decoder = { - "smc", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_SMC, - sizeof(SmcContext), - smc_decode_init, - NULL, - smc_decode_end, - smc_decode_frame, - CODEC_CAP_DR1, + .name = "smc", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_SMC, + .priv_data_size = sizeof(SmcContext), + .init = smc_decode_init, + .close = smc_decode_end, + .decode = smc_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("QuickTime Graphics (SMC)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/snow.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/snow.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/snow.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/snow.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,751 +19,56 @@ */ #include "libavutil/intmath.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" #include "avcodec.h" #include "dsputil.h" #include "dwt.h" #include "snow.h" +#include "snowdata.h" #include "rangecoder.h" #include "mathops.h" - -#include "mpegvideo.h" #include "h263.h" #undef NDEBUG #include -static const int8_t quant3[256]={ - 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, -}; -static const int8_t quant3b[256]={ - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, --1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -}; -static const int8_t quant3bA[256]={ - 0, 0, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, - 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, -}; -static const int8_t quant5[256]={ - 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-1,-1, -}; -static const int8_t quant7[256]={ - 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-2,-2,-2,-2,-2,-2,-2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, --2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-1, -}; -static const int8_t quant9[256]={ - 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-3,-3,-3,-3, --3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-2,-2,-2,-2,-1,-1, -}; -static const int8_t quant11[256]={ - 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5, --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5, --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5, --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5, --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5, --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-4,-4, --4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, --4,-4,-4,-4,-4,-3,-3,-3,-3,-3,-3,-3,-2,-2,-2,-1, -}; -static const int8_t quant13[256]={ - 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6, --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6, --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6, --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6, --6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-6,-5, --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5, --5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5, --4,-4,-4,-4,-4,-4,-4,-4,-4,-3,-3,-3,-3,-2,-2,-1, -}; - -#if 0 //64*cubic -static const uint8_t obmc32[1024]={ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 4, 4, 4, 4, 8, 8, 12, 12, 12, 16, 16, 16, 16, 16, 16, 16, 16, 12, 12, 12, 8, 8, 4, 4, 4, 4, 0, 0, 0, - 0, 0, 4, 4, 8, 8, 12, 16, 16, 20, 24, 24, 28, 28, 32, 32, 32, 32, 28, 28, 24, 24, 20, 16, 16, 12, 8, 8, 4, 4, 0, 0, - 0, 0, 4, 8, 8, 12, 16, 24, 28, 32, 36, 40, 44, 48, 48, 48, 48, 48, 48, 44, 40, 36, 32, 28, 24, 16, 12, 8, 8, 4, 0, 0, - 0, 4, 4, 8, 12, 20, 24, 32, 40, 44, 52, 56, 60, 64, 68, 72, 72, 68, 64, 60, 56, 52, 44, 40, 32, 24, 20, 12, 8, 4, 4, 0, - 0, 4, 4, 12, 16, 24, 32, 40, 52, 60, 68, 76, 80, 88, 88, 92, 92, 88, 88, 80, 76, 68, 60, 52, 40, 32, 24, 16, 12, 4, 4, 0, - 0, 4, 8, 16, 24, 32, 40, 52, 64, 76, 84, 92,100,108,112,116,116,112,108,100, 92, 84, 76, 64, 52, 40, 32, 24, 16, 8, 4, 0, - 0, 4, 8, 16, 28, 40, 52, 64, 76, 88,100,112,124,132,136,140,140,136,132,124,112,100, 88, 76, 64, 52, 40, 28, 16, 8, 4, 0, - 0, 4, 12, 20, 32, 44, 60, 76, 88,104,120,132,144,152,160,164,164,160,152,144,132,120,104, 88, 76, 60, 44, 32, 20, 12, 4, 0, - 0, 4, 12, 24, 36, 48, 68, 84,100,120,136,152,164,176,180,184,184,180,176,164,152,136,120,100, 84, 68, 48, 36, 24, 12, 4, 0, - 0, 4, 12, 24, 40, 56, 76, 92,112,132,152,168,180,192,204,208,208,204,192,180,168,152,132,112, 92, 76, 56, 40, 24, 12, 4, 0, - 0, 4, 16, 28, 44, 60, 80,100,124,144,164,180,196,208,220,224,224,220,208,196,180,164,144,124,100, 80, 60, 44, 28, 16, 4, 0, - 0, 8, 16, 28, 48, 64, 88,108,132,152,176,192,208,224,232,240,240,232,224,208,192,176,152,132,108, 88, 64, 48, 28, 16, 8, 0, - 0, 4, 16, 32, 48, 68, 88,112,136,160,180,204,220,232,244,248,248,244,232,220,204,180,160,136,112, 88, 68, 48, 32, 16, 4, 0, - 1, 8, 16, 32, 48, 72, 92,116,140,164,184,208,224,240,248,255,255,248,240,224,208,184,164,140,116, 92, 72, 48, 32, 16, 8, 1, - 1, 8, 16, 32, 48, 72, 92,116,140,164,184,208,224,240,248,255,255,248,240,224,208,184,164,140,116, 92, 72, 48, 32, 16, 8, 1, - 0, 4, 16, 32, 48, 68, 88,112,136,160,180,204,220,232,244,248,248,244,232,220,204,180,160,136,112, 88, 68, 48, 32, 16, 4, 0, - 0, 8, 16, 28, 48, 64, 88,108,132,152,176,192,208,224,232,240,240,232,224,208,192,176,152,132,108, 88, 64, 48, 28, 16, 8, 0, - 0, 4, 16, 28, 44, 60, 80,100,124,144,164,180,196,208,220,224,224,220,208,196,180,164,144,124,100, 80, 60, 44, 28, 16, 4, 0, - 0, 4, 12, 24, 40, 56, 76, 92,112,132,152,168,180,192,204,208,208,204,192,180,168,152,132,112, 92, 76, 56, 40, 24, 12, 4, 0, - 0, 4, 12, 24, 36, 48, 68, 84,100,120,136,152,164,176,180,184,184,180,176,164,152,136,120,100, 84, 68, 48, 36, 24, 12, 4, 0, - 0, 4, 12, 20, 32, 44, 60, 76, 88,104,120,132,144,152,160,164,164,160,152,144,132,120,104, 88, 76, 60, 44, 32, 20, 12, 4, 0, - 0, 4, 8, 16, 28, 40, 52, 64, 76, 88,100,112,124,132,136,140,140,136,132,124,112,100, 88, 76, 64, 52, 40, 28, 16, 8, 4, 0, - 0, 4, 8, 16, 24, 32, 40, 52, 64, 76, 84, 92,100,108,112,116,116,112,108,100, 92, 84, 76, 64, 52, 40, 32, 24, 16, 8, 4, 0, - 0, 4, 4, 12, 16, 24, 32, 40, 52, 60, 68, 76, 80, 88, 88, 92, 92, 88, 88, 80, 76, 68, 60, 52, 40, 32, 24, 16, 12, 4, 4, 0, - 0, 4, 4, 8, 12, 20, 24, 32, 40, 44, 52, 56, 60, 64, 68, 72, 72, 68, 64, 60, 56, 52, 44, 40, 32, 24, 20, 12, 8, 4, 4, 0, - 0, 0, 4, 8, 8, 12, 16, 24, 28, 32, 36, 40, 44, 48, 48, 48, 48, 48, 48, 44, 40, 36, 32, 28, 24, 16, 12, 8, 8, 4, 0, 0, - 0, 0, 4, 4, 8, 8, 12, 16, 16, 20, 24, 24, 28, 28, 32, 32, 32, 32, 28, 28, 24, 24, 20, 16, 16, 12, 8, 8, 4, 4, 0, 0, - 0, 0, 0, 4, 4, 4, 4, 8, 8, 12, 12, 12, 16, 16, 16, 16, 16, 16, 16, 16, 12, 12, 12, 8, 8, 4, 4, 4, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -//error:0.000022 -}; -static const uint8_t obmc16[256]={ - 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, - 0, 4, 4, 8, 16, 20, 20, 24, 24, 20, 20, 16, 8, 4, 4, 0, - 0, 4, 16, 24, 36, 44, 52, 60, 60, 52, 44, 36, 24, 16, 4, 0, - 0, 8, 24, 44, 60, 80, 96,104,104, 96, 80, 60, 44, 24, 8, 0, - 0, 16, 36, 60, 92,116,136,152,152,136,116, 92, 60, 36, 16, 0, - 0, 20, 44, 80,116,152,180,196,196,180,152,116, 80, 44, 20, 0, - 4, 20, 52, 96,136,180,212,228,228,212,180,136, 96, 52, 20, 4, - 4, 24, 60,104,152,196,228,248,248,228,196,152,104, 60, 24, 4, - 4, 24, 60,104,152,196,228,248,248,228,196,152,104, 60, 24, 4, - 4, 20, 52, 96,136,180,212,228,228,212,180,136, 96, 52, 20, 4, - 0, 20, 44, 80,116,152,180,196,196,180,152,116, 80, 44, 20, 0, - 0, 16, 36, 60, 92,116,136,152,152,136,116, 92, 60, 36, 16, 0, - 0, 8, 24, 44, 60, 80, 96,104,104, 96, 80, 60, 44, 24, 8, 0, - 0, 4, 16, 24, 36, 44, 52, 60, 60, 52, 44, 36, 24, 16, 4, 0, - 0, 4, 4, 8, 16, 20, 20, 24, 24, 20, 20, 16, 8, 4, 4, 0, - 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, -//error:0.000033 -}; -#elif 1 // 64*linear -static const uint8_t obmc32[1024]={ - 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, - 0, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 20, 20, 20, 16, 16, 16, 12, 12, 8, 8, 8, 4, 4, 4, 0, - 0, 4, 8, 8, 12, 12, 16, 20, 20, 24, 28, 28, 32, 32, 36, 40, 40, 36, 32, 32, 28, 28, 24, 20, 20, 16, 12, 12, 8, 8, 4, 0, - 0, 4, 8, 12, 16, 20, 24, 28, 28, 32, 36, 40, 44, 48, 52, 56, 56, 52, 48, 44, 40, 36, 32, 28, 28, 24, 20, 16, 12, 8, 4, 0, - 4, 8, 12, 16, 20, 24, 28, 32, 40, 44, 48, 52, 56, 60, 64, 68, 68, 64, 60, 56, 52, 48, 44, 40, 32, 28, 24, 20, 16, 12, 8, 4, - 4, 8, 12, 20, 24, 32, 36, 40, 48, 52, 56, 64, 68, 76, 80, 84, 84, 80, 76, 68, 64, 56, 52, 48, 40, 36, 32, 24, 20, 12, 8, 4, - 4, 8, 16, 24, 28, 36, 44, 48, 56, 60, 68, 76, 80, 88, 96,100,100, 96, 88, 80, 76, 68, 60, 56, 48, 44, 36, 28, 24, 16, 8, 4, - 4, 12, 20, 28, 32, 40, 48, 56, 64, 72, 80, 88, 92,100,108,116,116,108,100, 92, 88, 80, 72, 64, 56, 48, 40, 32, 28, 20, 12, 4, - 4, 12, 20, 28, 40, 48, 56, 64, 72, 80, 88, 96,108,116,124,132,132,124,116,108, 96, 88, 80, 72, 64, 56, 48, 40, 28, 20, 12, 4, - 4, 16, 24, 32, 44, 52, 60, 72, 80, 92,100,108,120,128,136,148,148,136,128,120,108,100, 92, 80, 72, 60, 52, 44, 32, 24, 16, 4, - 4, 16, 28, 36, 48, 56, 68, 80, 88,100,112,120,132,140,152,164,164,152,140,132,120,112,100, 88, 80, 68, 56, 48, 36, 28, 16, 4, - 4, 16, 28, 40, 52, 64, 76, 88, 96,108,120,132,144,156,168,180,180,168,156,144,132,120,108, 96, 88, 76, 64, 52, 40, 28, 16, 4, - 8, 20, 32, 44, 56, 68, 80, 92,108,120,132,144,156,168,180,192,192,180,168,156,144,132,120,108, 92, 80, 68, 56, 44, 32, 20, 8, - 8, 20, 32, 48, 60, 76, 88,100,116,128,140,156,168,184,196,208,208,196,184,168,156,140,128,116,100, 88, 76, 60, 48, 32, 20, 8, - 8, 20, 36, 52, 64, 80, 96,108,124,136,152,168,180,196,212,224,224,212,196,180,168,152,136,124,108, 96, 80, 64, 52, 36, 20, 8, - 8, 24, 40, 56, 68, 84,100,116,132,148,164,180,192,208,224,240,240,224,208,192,180,164,148,132,116,100, 84, 68, 56, 40, 24, 8, - 8, 24, 40, 56, 68, 84,100,116,132,148,164,180,192,208,224,240,240,224,208,192,180,164,148,132,116,100, 84, 68, 56, 40, 24, 8, - 8, 20, 36, 52, 64, 80, 96,108,124,136,152,168,180,196,212,224,224,212,196,180,168,152,136,124,108, 96, 80, 64, 52, 36, 20, 8, - 8, 20, 32, 48, 60, 76, 88,100,116,128,140,156,168,184,196,208,208,196,184,168,156,140,128,116,100, 88, 76, 60, 48, 32, 20, 8, - 8, 20, 32, 44, 56, 68, 80, 92,108,120,132,144,156,168,180,192,192,180,168,156,144,132,120,108, 92, 80, 68, 56, 44, 32, 20, 8, - 4, 16, 28, 40, 52, 64, 76, 88, 96,108,120,132,144,156,168,180,180,168,156,144,132,120,108, 96, 88, 76, 64, 52, 40, 28, 16, 4, - 4, 16, 28, 36, 48, 56, 68, 80, 88,100,112,120,132,140,152,164,164,152,140,132,120,112,100, 88, 80, 68, 56, 48, 36, 28, 16, 4, - 4, 16, 24, 32, 44, 52, 60, 72, 80, 92,100,108,120,128,136,148,148,136,128,120,108,100, 92, 80, 72, 60, 52, 44, 32, 24, 16, 4, - 4, 12, 20, 28, 40, 48, 56, 64, 72, 80, 88, 96,108,116,124,132,132,124,116,108, 96, 88, 80, 72, 64, 56, 48, 40, 28, 20, 12, 4, - 4, 12, 20, 28, 32, 40, 48, 56, 64, 72, 80, 88, 92,100,108,116,116,108,100, 92, 88, 80, 72, 64, 56, 48, 40, 32, 28, 20, 12, 4, - 4, 8, 16, 24, 28, 36, 44, 48, 56, 60, 68, 76, 80, 88, 96,100,100, 96, 88, 80, 76, 68, 60, 56, 48, 44, 36, 28, 24, 16, 8, 4, - 4, 8, 12, 20, 24, 32, 36, 40, 48, 52, 56, 64, 68, 76, 80, 84, 84, 80, 76, 68, 64, 56, 52, 48, 40, 36, 32, 24, 20, 12, 8, 4, - 4, 8, 12, 16, 20, 24, 28, 32, 40, 44, 48, 52, 56, 60, 64, 68, 68, 64, 60, 56, 52, 48, 44, 40, 32, 28, 24, 20, 16, 12, 8, 4, - 0, 4, 8, 12, 16, 20, 24, 28, 28, 32, 36, 40, 44, 48, 52, 56, 56, 52, 48, 44, 40, 36, 32, 28, 28, 24, 20, 16, 12, 8, 4, 0, - 0, 4, 8, 8, 12, 12, 16, 20, 20, 24, 28, 28, 32, 32, 36, 40, 40, 36, 32, 32, 28, 28, 24, 20, 20, 16, 12, 12, 8, 8, 4, 0, - 0, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 20, 20, 20, 16, 16, 16, 12, 12, 8, 8, 8, 4, 4, 4, 0, - 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, - //error:0.000020 -}; -static const uint8_t obmc16[256]={ - 0, 4, 4, 8, 8, 12, 12, 16, 16, 12, 12, 8, 8, 4, 4, 0, - 4, 8, 16, 20, 28, 32, 40, 44, 44, 40, 32, 28, 20, 16, 8, 4, - 4, 16, 24, 36, 44, 56, 64, 76, 76, 64, 56, 44, 36, 24, 16, 4, - 8, 20, 36, 48, 64, 76, 92,104,104, 92, 76, 64, 48, 36, 20, 8, - 8, 28, 44, 64, 80,100,116,136,136,116,100, 80, 64, 44, 28, 8, - 12, 32, 56, 76,100,120,144,164,164,144,120,100, 76, 56, 32, 12, - 12, 40, 64, 92,116,144,168,196,196,168,144,116, 92, 64, 40, 12, - 16, 44, 76,104,136,164,196,224,224,196,164,136,104, 76, 44, 16, - 16, 44, 76,104,136,164,196,224,224,196,164,136,104, 76, 44, 16, - 12, 40, 64, 92,116,144,168,196,196,168,144,116, 92, 64, 40, 12, - 12, 32, 56, 76,100,120,144,164,164,144,120,100, 76, 56, 32, 12, - 8, 28, 44, 64, 80,100,116,136,136,116,100, 80, 64, 44, 28, 8, - 8, 20, 36, 48, 64, 76, 92,104,104, 92, 76, 64, 48, 36, 20, 8, - 4, 16, 24, 36, 44, 56, 64, 76, 76, 64, 56, 44, 36, 24, 16, 4, - 4, 8, 16, 20, 28, 32, 40, 44, 44, 40, 32, 28, 20, 16, 8, 4, - 0, 4, 4, 8, 8, 12, 12, 16, 16, 12, 12, 8, 8, 4, 4, 0, -//error:0.000015 -}; -#else //64*cos -static const uint8_t obmc32[1024]={ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 4, 4, 4, 4, 8, 8, 12, 12, 12, 12, 16, 16, 16, 16, 16, 16, 12, 12, 12, 12, 8, 8, 4, 4, 4, 4, 0, 0, 0, - 0, 0, 4, 4, 4, 8, 8, 12, 16, 20, 20, 24, 28, 28, 28, 28, 28, 28, 28, 28, 24, 20, 20, 16, 12, 8, 8, 4, 4, 4, 0, 0, - 0, 0, 4, 4, 8, 12, 16, 20, 24, 28, 36, 40, 44, 44, 48, 48, 48, 48, 44, 44, 40, 36, 28, 24, 20, 16, 12, 8, 4, 4, 0, 0, - 0, 0, 4, 8, 12, 20, 24, 32, 36, 44, 48, 56, 60, 64, 68, 68, 68, 68, 64, 60, 56, 48, 44, 36, 32, 24, 20, 12, 8, 4, 0, 0, - 0, 4, 4, 8, 16, 24, 32, 40, 48, 60, 68, 76, 80, 84, 88, 92, 92, 88, 84, 80, 76, 68, 60, 48, 40, 32, 24, 16, 8, 4, 4, 0, - 0, 4, 8, 12, 20, 32, 40, 52, 64, 76, 84, 96,104,108,112,116,116,112,108,104, 96, 84, 76, 64, 52, 40, 32, 20, 12, 8, 4, 0, - 0, 4, 8, 16, 24, 36, 48, 64, 76, 92,104,116,124,132,136,140,140,136,132,124,116,104, 92, 76, 64, 48, 36, 24, 16, 8, 4, 0, - 0, 4, 12, 20, 28, 44, 60, 76, 92,104,120,136,148,156,160,164,164,160,156,148,136,120,104, 92, 76, 60, 44, 28, 20, 12, 4, 0, - 0, 4, 12, 20, 36, 48, 68, 84,104,120,140,152,168,176,184,188,188,184,176,168,152,140,120,104, 84, 68, 48, 36, 20, 12, 4, 0, - 0, 4, 12, 24, 36, 56, 76, 96,116,136,152,172,184,196,204,208,208,204,196,184,172,152,136,116, 96, 76, 56, 36, 24, 12, 4, 0, - 0, 4, 12, 24, 44, 60, 80,104,124,148,168,184,200,212,224,228,228,224,212,200,184,168,148,124,104, 80, 60, 44, 24, 12, 4, 0, - 0, 4, 12, 28, 44, 64, 84,108,132,156,176,196,212,228,236,240,240,236,228,212,196,176,156,132,108, 84, 64, 44, 28, 12, 4, 0, - 0, 4, 16, 28, 48, 68, 88,112,136,160,184,204,224,236,244,252,252,244,236,224,204,184,160,136,112, 88, 68, 48, 28, 16, 4, 0, - 1, 4, 16, 28, 48, 68, 92,116,140,164,188,208,228,240,252,255,255,252,240,228,208,188,164,140,116, 92, 68, 48, 28, 16, 4, 1, - 1, 4, 16, 28, 48, 68, 92,116,140,164,188,208,228,240,252,255,255,252,240,228,208,188,164,140,116, 92, 68, 48, 28, 16, 4, 1, - 0, 4, 16, 28, 48, 68, 88,112,136,160,184,204,224,236,244,252,252,244,236,224,204,184,160,136,112, 88, 68, 48, 28, 16, 4, 0, - 0, 4, 12, 28, 44, 64, 84,108,132,156,176,196,212,228,236,240,240,236,228,212,196,176,156,132,108, 84, 64, 44, 28, 12, 4, 0, - 0, 4, 12, 24, 44, 60, 80,104,124,148,168,184,200,212,224,228,228,224,212,200,184,168,148,124,104, 80, 60, 44, 24, 12, 4, 0, - 0, 4, 12, 24, 36, 56, 76, 96,116,136,152,172,184,196,204,208,208,204,196,184,172,152,136,116, 96, 76, 56, 36, 24, 12, 4, 0, - 0, 4, 12, 20, 36, 48, 68, 84,104,120,140,152,168,176,184,188,188,184,176,168,152,140,120,104, 84, 68, 48, 36, 20, 12, 4, 0, - 0, 4, 12, 20, 28, 44, 60, 76, 92,104,120,136,148,156,160,164,164,160,156,148,136,120,104, 92, 76, 60, 44, 28, 20, 12, 4, 0, - 0, 4, 8, 16, 24, 36, 48, 64, 76, 92,104,116,124,132,136,140,140,136,132,124,116,104, 92, 76, 64, 48, 36, 24, 16, 8, 4, 0, - 0, 4, 8, 12, 20, 32, 40, 52, 64, 76, 84, 96,104,108,112,116,116,112,108,104, 96, 84, 76, 64, 52, 40, 32, 20, 12, 8, 4, 0, - 0, 4, 4, 8, 16, 24, 32, 40, 48, 60, 68, 76, 80, 84, 88, 92, 92, 88, 84, 80, 76, 68, 60, 48, 40, 32, 24, 16, 8, 4, 4, 0, - 0, 0, 4, 8, 12, 20, 24, 32, 36, 44, 48, 56, 60, 64, 68, 68, 68, 68, 64, 60, 56, 48, 44, 36, 32, 24, 20, 12, 8, 4, 0, 0, - 0, 0, 4, 4, 8, 12, 16, 20, 24, 28, 36, 40, 44, 44, 48, 48, 48, 48, 44, 44, 40, 36, 28, 24, 20, 16, 12, 8, 4, 4, 0, 0, - 0, 0, 4, 4, 4, 8, 8, 12, 16, 20, 20, 24, 28, 28, 28, 28, 28, 28, 28, 28, 24, 20, 20, 16, 12, 8, 8, 4, 4, 4, 0, 0, - 0, 0, 0, 4, 4, 4, 4, 8, 8, 12, 12, 12, 12, 16, 16, 16, 16, 16, 16, 12, 12, 12, 12, 8, 8, 4, 4, 4, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -//error:0.000022 -}; -static const uint8_t obmc16[256]={ - 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, - 0, 0, 4, 8, 12, 16, 20, 20, 20, 20, 16, 12, 8, 4, 0, 0, - 0, 4, 12, 24, 32, 44, 52, 56, 56, 52, 44, 32, 24, 12, 4, 0, - 0, 8, 24, 40, 60, 80, 96,104,104, 96, 80, 60, 40, 24, 8, 0, - 0, 12, 32, 64, 92,120,140,152,152,140,120, 92, 64, 32, 12, 0, - 4, 16, 44, 80,120,156,184,196,196,184,156,120, 80, 44, 16, 4, - 4, 20, 52, 96,140,184,216,232,232,216,184,140, 96, 52, 20, 4, - 0, 20, 56,104,152,196,232,252,252,232,196,152,104, 56, 20, 0, - 0, 20, 56,104,152,196,232,252,252,232,196,152,104, 56, 20, 0, - 4, 20, 52, 96,140,184,216,232,232,216,184,140, 96, 52, 20, 4, - 4, 16, 44, 80,120,156,184,196,196,184,156,120, 80, 44, 16, 4, - 0, 12, 32, 64, 92,120,140,152,152,140,120, 92, 64, 32, 12, 0, - 0, 8, 24, 40, 60, 80, 96,104,104, 96, 80, 60, 40, 24, 8, 0, - 0, 4, 12, 24, 32, 44, 52, 56, 56, 52, 44, 32, 24, 12, 4, 0, - 0, 0, 4, 8, 12, 16, 20, 20, 20, 20, 16, 12, 8, 4, 0, 0, - 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, -//error:0.000022 -}; -#endif /* 0 */ - -//linear *64 -static const uint8_t obmc8[64]={ - 4, 12, 20, 28, 28, 20, 12, 4, - 12, 36, 60, 84, 84, 60, 36, 12, - 20, 60,100,140,140,100, 60, 20, - 28, 84,140,196,196,140, 84, 28, - 28, 84,140,196,196,140, 84, 28, - 20, 60,100,140,140,100, 60, 20, - 12, 36, 60, 84, 84, 60, 36, 12, - 4, 12, 20, 28, 28, 20, 12, 4, -//error:0.000000 -}; - -//linear *64 -static const uint8_t obmc4[16]={ - 16, 48, 48, 16, - 48,144,144, 48, - 48,144,144, 48, - 16, 48, 48, 16, -//error:0.000000 -}; - -static const uint8_t * const obmc_tab[4]={ - obmc32, obmc16, obmc8, obmc4 -}; - -static int scale_mv_ref[MAX_REF_FRAMES][MAX_REF_FRAMES]; - -typedef struct BlockNode{ - int16_t mx; - int16_t my; - uint8_t ref; - uint8_t color[3]; - uint8_t type; -//#define TYPE_SPLIT 1 -#define BLOCK_INTRA 1 -#define BLOCK_OPT 2 -//#define TYPE_NOCOLOR 4 - uint8_t level; //FIXME merge into type? -}BlockNode; - -static const BlockNode null_block= { //FIXME add border maybe - .color= {128,128,128}, - .mx= 0, - .my= 0, - .ref= 0, - .type= 0, - .level= 0, -}; - -#define LOG2_MB_SIZE 4 -#define MB_SIZE (1<=el; i--){ - put_rac(c, state+22+9, (a>>i)&1); //22..31 - } - for(; i>=0; i--){ - put_rac(c, state+22+i, (a>>i)&1); //22..31 - } - - if(is_signed) - put_rac(c, state+11 + el, v < 0); //11..21 -#else - - put_rac(c, state+0, 0); - if(e<=9){ - for(i=0; i=0; i--){ - put_rac(c, state+22+i, (a>>i)&1); //22..31 - } - - if(is_signed) - put_rac(c, state+11 + e, v < 0); //11..21 - }else{ - for(i=0; i=0; i--){ - put_rac(c, state+22+FFMIN(i,9), (a>>i)&1); //22..31 - } - - if(is_signed) - put_rac(c, state+11 + 10, v < 0); //11..21 - } -#endif /* 1 */ - }else{ - put_rac(c, state+0, 1); - } -} - -static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){ - if(get_rac(c, state+0)) - return 0; - else{ - int i, e, a; - e= 0; - while(get_rac(c, state+1 + FFMIN(e,9))){ //1..10 - e++; - } - - a= 1; - for(i=e-1; i>=0; i--){ - a += a + get_rac(c, state+22 + FFMIN(i,9)); //22..31 - } - - e= -(is_signed && get_rac(c, state+11 + FFMIN(e,10))); //11..21 - return (a^e)-e; - } -} - -static inline void put_symbol2(RangeCoder *c, uint8_t *state, int v, int log2){ - int i; - int r= log2>=0 ? 1<=0); - assert(log2>=-4); - - while(v >= r){ - put_rac(c, state+4+log2, 1); - v -= r; - log2++; - if(log2>0) r+=r; - } - put_rac(c, state+4+log2, 0); - - for(i=log2-1; i>=0; i--){ - put_rac(c, state+31-i, (v>>i)&1); - } -} - -static inline int get_symbol2(RangeCoder *c, uint8_t *state, int log2){ - int i; - int r= log2>=0 ? 1<=-4); - - while(get_rac(c, state+4+log2)){ - v+= r; - log2++; - if(log2>0) r+=r; - } - - for(i=log2-1; i>=0; i--){ - v+= get_rac(c, state+31-i)<width; - const int h= b->height; - int x,y; - - int run, runs; - x_and_coeff *xc= b->x_coeff; - x_and_coeff *prev_xc= NULL; - x_and_coeff *prev2_xc= xc; - x_and_coeff *parent_xc= parent ? parent->x_coeff : NULL; - x_and_coeff *prev_parent_xc= parent_xc; - - runs= get_symbol2(&s->c, b->state[30], 0); - if(runs-- > 0) run= get_symbol2(&s->c, b->state[1], 3); - else run= INT_MAX; - - for(y=0; yx == 0){ - rt= prev_xc->coeff; - } - for(x=0; xx <= x) - prev_xc++; - if(prev_xc->x == x + 1) - rt= prev_xc->coeff; - else - rt=0; - } - if(parent_xc){ - if(x>>1 > parent_xc->x){ - parent_xc++; - } - if(x>>1 == parent_xc->x){ - p= parent_xc->coeff; - } - } - if(/*ll|*/l|lt|t|rt|p){ - int context= av_log2(/*FFABS(ll) + */3*(l>>1) + (lt>>1) + (t&~1) + (rt>>1) + (p>>1)); - - v=get_rac(&s->c, &b->state[0][context]); - if(v){ - v= 2*(get_symbol2(&s->c, b->state[context + 2], context-4) + 1); - v+=get_rac(&s->c, &b->state[0][16 + 1 + 3 + quant3bA[l&0xFF] + 3*quant3bA[t&0xFF]]); - - xc->x=x; - (xc++)->coeff= v; - } - }else{ - if(!run){ - if(runs-- > 0) run= get_symbol2(&s->c, b->state[1], 3); - else run= INT_MAX; - v= 2*(get_symbol2(&s->c, b->state[0 + 2], 0-4) + 1); - v+=get_rac(&s->c, &b->state[0][16 + 1 + 3]); +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){ + int y, x; + IDWTELEM * dst; + for(y=0; y>1); + const uint8_t *obmc3= obmc1+ obmc_stride*(obmc_stride>>1); + const uint8_t *obmc4= obmc3+ (obmc_stride>>1); + dst = slice_buffer_get_line(sb, src_y + y); + for(x=0; xx=x; - (xc++)->coeff= v; - }else{ - int max_run; - run--; - v=0; - - if(y) max_run= FFMIN(run, prev_xc->x - x - 2); - else max_run= FFMIN(run, w-x-1); - if(parent_xc) - max_run= FFMIN(max_run, 2*parent_xc->x - x - 1); - x+= max_run; - run-= max_run; - } + v <<= 8 - LOG2_OBMC_MAX; + if(FRAC_BITS != 8){ + v >>= 8 - FRAC_BITS; } - } - (xc++)->x= w+1; //end marker - prev_xc= prev2_xc; - prev2_xc= xc; - - if(parent_xc){ - if(y&1){ - while(parent_xc->x != parent->width+1) - parent_xc++; - parent_xc++; - prev_parent_xc= parent_xc; + if(add){ + v += dst[x + src_x]; + v = (v + (1<<(FRAC_BITS-1))) >> FRAC_BITS; + if(v&(~255)) v= ~(v>>31); + dst8[x + y*src_stride] = v; }else{ - parent_xc= prev_parent_xc; + dst[x + src_x] -= v; } } } - - (xc++)->x= w+1; //end marker -} - -static inline void decode_subband_slice_buffered(SnowContext *s, SubBand *b, slice_buffer * sb, int start_y, int h, int save_state[1]){ - const int w= b->width; - int y; - const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); - int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); - int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; - int new_index = 0; - - if(b->ibuf == s->spatial_idwt_buffer || s->qlog == LOSSLESS_QLOG){ - qadd= 0; - qmul= 1<stride_line + b->buf_y_offset) + b->buf_x_offset; - memset(line, 0, b->width*sizeof(IDWTELEM)); - v = b->x_coeff[new_index].coeff; - x = b->x_coeff[new_index++].x; - while(x < w){ - register int t= ( (v>>1)*qmul + qadd)>>QEXPSHIFT; - register int u= -(v&1); - line[x] = (t^u) - u; - - v = b->x_coeff[new_index].coeff; - x = b->x_coeff[new_index++].x; - } - } - - /* Save our variables for the next slice. */ - save_state[0] = new_index; - - return; } -static void reset_contexts(SnowContext *s){ //FIXME better initial contexts +void ff_snow_reset_contexts(SnowContext *s){ //FIXME better initial contexts int plane_index, level, orientation; for(plane_index=0; plane_index<3; plane_index++){ @@ -777,7 +82,7 @@ memset(s->block_state, MID_STATE, sizeof(s->block_state)); } -static int alloc_blocks(SnowContext *s){ +int ff_snow_alloc_blocks(SnowContext *s){ int w= -((-s->avctx->width )>>LOG2_MB_SIZE); int h= -((-s->avctx->height)>>LOG2_MB_SIZE); @@ -789,137 +94,15 @@ return 0; } -static inline void copy_rac_state(RangeCoder *d, RangeCoder *s){ - uint8_t *bytestream= d->bytestream; - uint8_t *bytestream_start= d->bytestream_start; - *d= *s; - d->bytestream= bytestream; - d->bytestream_start= bytestream_start; -} - -static inline void set_blocks(SnowContext *s, int level, int x, int y, int l, int cb, int cr, int mx, int my, int ref, int type){ - const int w= s->b_width << s->block_max_depth; - const int rem_depth= s->block_max_depth - level; - const int index= (x + y*w) << rem_depth; - const int block_w= 1<block[index + i + j*w]= block; - } - } -} - -static inline void init_ref(MotionEstContext *c, uint8_t *src[3], uint8_t *ref[3], uint8_t *ref2[3], int x, int y, int ref_index){ - const int offset[3]= { - y*c-> stride + x, - ((y*c->uvstride + x)>>1), - ((y*c->uvstride + x)>>1), - }; +static void init_qexp(void){ int i; - for(i=0; i<3; i++){ - c->src[0][i]= src [i]; - c->ref[0][i]= ref [i] + offset[i]; - } - assert(!ref_index); -} - -static inline void pred_mv(SnowContext *s, int *mx, int *my, int ref, - const BlockNode *left, const BlockNode *top, const BlockNode *tr){ - if(s->ref_frames == 1){ - *mx = mid_pred(left->mx, top->mx, tr->mx); - *my = mid_pred(left->my, top->my, tr->my); - }else{ - const int *scale = scale_mv_ref[ref]; - *mx = mid_pred((left->mx * scale[left->ref] + 128) >>8, - (top ->mx * scale[top ->ref] + 128) >>8, - (tr ->mx * scale[tr ->ref] + 128) >>8); - *my = mid_pred((left->my * scale[left->ref] + 128) >>8, - (top ->my * scale[top ->ref] + 128) >>8, - (tr ->my * scale[tr ->ref] + 128) >>8); - } -} - -static av_always_inline int same_block(BlockNode *a, BlockNode *b){ - if((a->type&BLOCK_INTRA) && (b->type&BLOCK_INTRA)){ - return !((a->color[0] - b->color[0]) | (a->color[1] - b->color[1]) | (a->color[2] - b->color[2])); - }else{ - return !((a->mx - b->mx) | (a->my - b->my) | (a->ref - b->ref) | ((a->type ^ b->type)&BLOCK_INTRA)); - } -} - -static void decode_q_branch(SnowContext *s, int level, int x, int y){ - const int w= s->b_width << s->block_max_depth; - const int rem_depth= s->block_max_depth - level; - const int index= (x + y*w) << rem_depth; - int trx= (x+1)<block[index-1] : &null_block; - const BlockNode *top = y ? &s->block[index-w] : &null_block; - const BlockNode *tl = y && x ? &s->block[index-w-1] : left; - const BlockNode *tr = y && trxblock[index-w+(1<level + 2*top->level + tl->level + tr->level; - - if(s->keyframe){ - set_blocks(s, level, x, y, null_block.color[0], null_block.color[1], null_block.color[2], null_block.mx, null_block.my, null_block.ref, BLOCK_INTRA); - return; - } - - if(level==s->block_max_depth || get_rac(&s->c, &s->block_state[4 + s_context])){ - int type, mx, my; - int l = left->color[0]; - int cb= left->color[1]; - int cr= left->color[2]; - int ref = 0; - int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref); - int mx_context= av_log2(2*FFABS(left->mx - top->mx)) + 0*av_log2(2*FFABS(tr->mx - top->mx)); - int my_context= av_log2(2*FFABS(left->my - top->my)) + 0*av_log2(2*FFABS(tr->my - top->my)); - - type= get_rac(&s->c, &s->block_state[1 + left->type + top->type]) ? BLOCK_INTRA : 0; - - if(type){ - pred_mv(s, &mx, &my, 0, left, top, tr); - l += get_symbol(&s->c, &s->block_state[32], 1); - cb+= get_symbol(&s->c, &s->block_state[64], 1); - cr+= get_symbol(&s->c, &s->block_state[96], 1); - }else{ - if(s->ref_frames > 1) - ref= get_symbol(&s->c, &s->block_state[128 + 1024 + 32*ref_context], 0); - pred_mv(s, &mx, &my, ref, left, top, tr); - mx+= get_symbol(&s->c, &s->block_state[128 + 32*(mx_context + 16*!!ref)], 1); - my+= get_symbol(&s->c, &s->block_state[128 + 32*(my_context + 16*!!ref)], 1); - } - set_blocks(s, level, x, y, l, cb, cr, mx, my, ref, type); - }else{ - decode_q_branch(s, level+1, 2*x+0, 2*y+0); - decode_q_branch(s, level+1, 2*x+1, 2*y+0); - decode_q_branch(s, level+1, 2*x+0, 2*y+1); - decode_q_branch(s, level+1, 2*x+1, 2*y+1); - } -} + double v=128; -static void decode_blocks(SnowContext *s){ - int x, y; - int w= s->b_width; - int h= s->b_height; - - for(y=0; ytype & BLOCK_INTRA){ int x, y; - const int color = block->color[plane_index]; - const int color4= color*0x01010101; + const unsigned color = block->color[plane_index]; + const unsigned color4 = color*0x01010101; if(b_w==32){ for(y=0; y < b_h; y++){ *(uint32_t*)&dst[0 + y*stride]= color4; @@ -1199,530 +367,71 @@ } } -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){ - int y, x; - IDWTELEM * dst; - for(y=0; y>1); - const uint8_t *obmc3= obmc1+ obmc_stride*(obmc_stride>>1); - const uint8_t *obmc4= obmc3+ (obmc_stride>>1); - dst = slice_buffer_get_line(sb, src_y + y); - for(x=0; x>= 8 - FRAC_BITS; - } - if(add){ - v += dst[x + src_x]; - v = (v + (1<<(FRAC_BITS-1))) >> FRAC_BITS; - if(v&(~255)) v= ~(v>>31); - dst8[x + y*src_stride] = v; - }else{ - dst[x + src_x] -= v; - } - } - } +#define mca(dx,dy,b_w)\ +static void mc_block_hpel ## dx ## dy ## b_w(uint8_t *dst, const uint8_t *src, int stride, int h){\ + assert(h==b_w);\ + mc_block(NULL, dst, src-(HTAPS_MAX/2-1)-(HTAPS_MAX/2-1)*stride, stride, b_w, b_w, dx, dy);\ } -//FIXME name cleanup (b_w, block_w, b_width stuff) -static av_always_inline void add_yblock(SnowContext *s, int sliced, slice_buffer *sb, IDWTELEM *dst, uint8_t *dst8, const uint8_t *obmc, int src_x, int src_y, int b_w, int b_h, int w, int h, int dst_stride, int src_stride, int obmc_stride, int b_x, int b_y, int add, int offset_dst, int plane_index){ - const int b_width = s->b_width << s->block_max_depth; - const int b_height= s->b_height << s->block_max_depth; - const int b_stride= b_width; - BlockNode *lt= &s->block[b_x + b_y*b_stride]; - BlockNode *rt= lt+1; - BlockNode *lb= lt+b_stride; - BlockNode *rb= lb+1; - uint8_t *block[4]; - int tmp_step= src_stride >= 7*MB_SIZE ? MB_SIZE : MB_SIZE*src_stride; - uint8_t *tmp = s->scratchbuf; - uint8_t *ptmp; - int x,y; - - if(b_x<0){ - lt= rt; - lb= rb; - }else if(b_x + 1 >= b_width){ - rt= lt; - rb= lb; - } - if(b_y<0){ - lt= lb; - rt= rb; - }else if(b_y + 1 >= b_height){ - lb= lt; - rb= rt; - } +mca( 0, 0,16) +mca( 8, 0,16) +mca( 0, 8,16) +mca( 8, 8,16) +mca( 0, 0,8) +mca( 8, 0,8) +mca( 0, 8,8) +mca( 8, 8,8) - if(src_x<0){ //FIXME merge with prev & always round internal width up to *16 - obmc -= src_x; - b_w += src_x; - if(!sliced && !offset_dst) - dst -= src_x; - src_x=0; - }else if(src_x + b_w > w){ - b_w = w - src_x; - } - if(src_y<0){ - obmc -= src_y*obmc_stride; - b_h += src_y; - if(!sliced && !offset_dst) - dst -= src_y*dst_stride; - src_y=0; - }else if(src_y + b_h> h){ - b_h = h - src_y; - } +av_cold int ff_snow_common_init(AVCodecContext *avctx){ + SnowContext *s = avctx->priv_data; + int width, height; + int i, j; - if(b_w<=0 || b_h<=0) return; + s->avctx= avctx; + s->max_ref_frames=1; //just make sure its not an invalid value in case of no initial keyframe - assert(src_stride > 2*MB_SIZE + 5); + dsputil_init(&s->dsp, avctx); + ff_dwt_init(&s->dwt); - if(!sliced && offset_dst) - dst += src_x + src_y*dst_stride; - dst8+= src_x + src_y*src_stride; -// src += src_x + src_y*src_stride; - - ptmp= tmp + 3*tmp_step; - block[0]= ptmp; - ptmp+=tmp_step; - pred_block(s, block[0], tmp, src_stride, src_x, src_y, b_w, b_h, lt, plane_index, w, h); +#define mcf(dx,dy)\ + s->dsp.put_qpel_pixels_tab [0][dy+dx/4]=\ + s->dsp.put_no_rnd_qpel_pixels_tab[0][dy+dx/4]=\ + s->dsp.put_h264_qpel_pixels_tab[0][dy+dx/4];\ + s->dsp.put_qpel_pixels_tab [1][dy+dx/4]=\ + s->dsp.put_no_rnd_qpel_pixels_tab[1][dy+dx/4]=\ + s->dsp.put_h264_qpel_pixels_tab[1][dy+dx/4]; - if(same_block(lt, rt)){ - block[1]= block[0]; - }else{ - block[1]= ptmp; - ptmp+=tmp_step; - pred_block(s, block[1], tmp, src_stride, src_x, src_y, b_w, b_h, rt, plane_index, w, h); - } + mcf( 0, 0) + mcf( 4, 0) + mcf( 8, 0) + mcf(12, 0) + mcf( 0, 4) + mcf( 4, 4) + mcf( 8, 4) + mcf(12, 4) + mcf( 0, 8) + mcf( 4, 8) + mcf( 8, 8) + mcf(12, 8) + mcf( 0,12) + mcf( 4,12) + mcf( 8,12) + mcf(12,12) - if(same_block(lt, lb)){ - block[2]= block[0]; - }else if(same_block(rt, lb)){ - block[2]= block[1]; - }else{ - block[2]= ptmp; - ptmp+=tmp_step; - pred_block(s, block[2], tmp, src_stride, src_x, src_y, b_w, b_h, lb, plane_index, w, h); - } - - if(same_block(lt, rb) ){ - block[3]= block[0]; - }else if(same_block(rt, rb)){ - block[3]= block[1]; - }else if(same_block(lb, rb)){ - block[3]= block[2]; - }else{ - block[3]= ptmp; - pred_block(s, block[3], tmp, src_stride, src_x, src_y, b_w, b_h, rb, plane_index, w, h); - } -#if 0 - for(y=0; y>1); - for(x=0; x>1); - for(x=0; x>1); - uint8_t *obmc4= obmc3+ (obmc_stride>>1); - for(x=0; xdwt.inner_add_yblock(obmc, obmc_stride, block, b_w, b_h, src_x,src_y, src_stride, sb, add, dst8); - }else{ - for(y=0; y>1); - const uint8_t *obmc3= obmc1+ obmc_stride*(obmc_stride>>1); - const uint8_t *obmc4= obmc3+ (obmc_stride>>1); - for(x=0; x>= 8 - FRAC_BITS; - } - if(add){ - v += dst[x + y*dst_stride]; - v = (v + (1<<(FRAC_BITS-1))) >> FRAC_BITS; - if(v&(~255)) v= ~(v>>31); - dst8[x + y*src_stride] = v; - }else{ - dst[x + y*dst_stride] -= v; - } - } - } - } -#endif /* 0 */ -} - -static av_always_inline void predict_slice_buffered(SnowContext *s, slice_buffer * sb, IDWTELEM * old_buffer, int plane_index, int add, int mb_y){ - Plane *p= &s->plane[plane_index]; - const int mb_w= s->b_width << s->block_max_depth; - const int mb_h= s->b_height << s->block_max_depth; - int x, y, mb_x; - int block_size = MB_SIZE >> s->block_max_depth; - int block_w = plane_index ? block_size/2 : block_size; - const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; - int obmc_stride= plane_index ? block_size : 2*block_size; - int ref_stride= s->current_picture.linesize[plane_index]; - uint8_t *dst8= s->current_picture.data[plane_index]; - int w= p->width; - int h= p->height; - - if(s->keyframe || (s->avctx->debug&512)){ - if(mb_y==mb_h) - return; - - if(add){ - for(y=block_w*mb_y; yline[y]; - for(x=0; x>= FRAC_BITS; - if(v&(~255)) v= ~(v>>31); - dst8[x + y*ref_stride]= v; - } - } - }else{ - for(y=block_w*mb_y; yline[y]; - for(x=0; xplane[plane_index]; - const int mb_w= s->b_width << s->block_max_depth; - const int mb_h= s->b_height << s->block_max_depth; - int x, y, mb_x; - int block_size = MB_SIZE >> s->block_max_depth; - int block_w = plane_index ? block_size/2 : block_size; - const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; - const int obmc_stride= plane_index ? block_size : 2*block_size; - int ref_stride= s->current_picture.linesize[plane_index]; - uint8_t *dst8= s->current_picture.data[plane_index]; - int w= p->width; - int h= p->height; - - if(s->keyframe || (s->avctx->debug&512)){ - if(mb_y==mb_h) - return; - - if(add){ - for(y=block_w*mb_y; y>= FRAC_BITS; - if(v&(~255)) v= ~(v>>31); - dst8[x + y*ref_stride]= v; - } - } - }else{ - for(y=block_w*mb_y; yb_height << s->block_max_depth; - int mb_y; - for(mb_y=0; mb_y<=mb_h; mb_y++) - predict_slice(s, buf, plane_index, add, mb_y); -} - -static void dequantize_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, IDWTELEM *src, int stride, int start_y, int end_y){ - const int w= b->width; - const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); - const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); - const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; - int x,y; - - if(s->qlog == LOSSLESS_QLOG) return; - - for(y=start_y; ystride_line) + b->buf_y_offset) + b->buf_x_offset; - for(x=0; x>(QEXPSHIFT)); //FIXME try different bias - }else if(i>0){ - line[x]= (( i*qmul + qadd)>>(QEXPSHIFT)); - } - } - } -} - -static void correlate_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, IDWTELEM *src, int stride, int inverse, int use_median, int start_y, int end_y){ - const int w= b->width; - int x,y; - - IDWTELEM * line=0; // silence silly "could be used without having been initialized" warning - IDWTELEM * prev; - - if (start_y != 0) - line = slice_buffer_get_line(sb, ((start_y - 1) * b->stride_line) + b->buf_y_offset) + b->buf_x_offset; - - for(y=start_y; ystride_line) + b->buf_y_offset) + b->buf_x_offset; - for(x=0; xspatial_decomposition_count; level++){ - for(orientation=level ? 1:0; orientation<4; orientation++){ - int q; - if (plane_index==2) q= s->plane[1].band[level][orientation].qlog; - else if(orientation==2) q= s->plane[plane_index].band[level][1].qlog; - else q= get_symbol(&s->c, s->header_state, 1); - s->plane[plane_index].band[level][orientation].qlog= q; - } - } - } -} - -#define GET_S(dst, check) \ - tmp= get_symbol(&s->c, s->header_state, 0);\ - if(!(check)){\ - av_log(s->avctx, AV_LOG_ERROR, "Error " #dst " is %d\n", tmp);\ - return -1;\ - }\ - dst= tmp; - -static int decode_header(SnowContext *s){ - int plane_index, tmp; - uint8_t kstate[32]; - - memset(kstate, MID_STATE, sizeof(kstate)); - - s->keyframe= get_rac(&s->c, kstate); - if(s->keyframe || s->always_reset){ - reset_contexts(s); - s->spatial_decomposition_type= - s->qlog= - s->qbias= - s->mv_scale= - s->block_max_depth= 0; - } - if(s->keyframe){ - GET_S(s->version, tmp <= 0U) - s->always_reset= get_rac(&s->c, s->header_state); - s->temporal_decomposition_type= get_symbol(&s->c, s->header_state, 0); - s->temporal_decomposition_count= get_symbol(&s->c, s->header_state, 0); - GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS) - s->colorspace_type= get_symbol(&s->c, s->header_state, 0); - s->chroma_h_shift= get_symbol(&s->c, s->header_state, 0); - s->chroma_v_shift= get_symbol(&s->c, s->header_state, 0); - s->spatial_scalability= get_rac(&s->c, s->header_state); -// s->rate_scalability= get_rac(&s->c, s->header_state); - GET_S(s->max_ref_frames, tmp < (unsigned)MAX_REF_FRAMES) - s->max_ref_frames++; - - decode_qlogs(s); - } - - if(!s->keyframe){ - if(get_rac(&s->c, s->header_state)){ - for(plane_index=0; plane_index<2; plane_index++){ - int htaps, i, sum=0; - Plane *p= &s->plane[plane_index]; - p->diag_mc= get_rac(&s->c, s->header_state); - htaps= get_symbol(&s->c, s->header_state, 0)*2 + 2; - if((unsigned)htaps > HTAPS_MAX || htaps==0) - return -1; - p->htaps= htaps; - for(i= htaps/2; i; i--){ - p->hcoeff[i]= get_symbol(&s->c, s->header_state, 0) * (1-2*(i&1)); - sum += p->hcoeff[i]; - } - p->hcoeff[0]= 32-sum; - } - s->plane[2].diag_mc= s->plane[1].diag_mc; - s->plane[2].htaps = s->plane[1].htaps; - memcpy(s->plane[2].hcoeff, s->plane[1].hcoeff, sizeof(s->plane[1].hcoeff)); - } - if(get_rac(&s->c, s->header_state)){ - GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS) - decode_qlogs(s); - } - } - - s->spatial_decomposition_type+= get_symbol(&s->c, s->header_state, 1); - if(s->spatial_decomposition_type > 1U){ - av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_type %d not supported", s->spatial_decomposition_type); - return -1; - } - if(FFMIN(s->avctx-> width>>s->chroma_h_shift, - s->avctx->height>>s->chroma_v_shift) >> (s->spatial_decomposition_count-1) <= 0){ - av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_count %d too large for size", s->spatial_decomposition_count); - return -1; - } - - s->qlog += get_symbol(&s->c, s->header_state, 1); - s->mv_scale += get_symbol(&s->c, s->header_state, 1); - s->qbias += get_symbol(&s->c, s->header_state, 1); - s->block_max_depth+= get_symbol(&s->c, s->header_state, 1); - if(s->block_max_depth > 1 || s->block_max_depth < 0){ - av_log(s->avctx, AV_LOG_ERROR, "block_max_depth= %d is too large", s->block_max_depth); - s->block_max_depth= 0; - return -1; - } - - return 0; -} - -static void init_qexp(void){ - int i; - double v=128; - - for(i=0; ipriv_data; - int width, height; - int i, j; - - s->avctx= avctx; - s->max_ref_frames=1; //just make sure its not an invalid value in case of no initial keyframe - - dsputil_init(&s->dsp, avctx); - ff_dwt_init(&s->dwt); - -#define mcf(dx,dy)\ - s->dsp.put_qpel_pixels_tab [0][dy+dx/4]=\ - s->dsp.put_no_rnd_qpel_pixels_tab[0][dy+dx/4]=\ - s->dsp.put_h264_qpel_pixels_tab[0][dy+dx/4];\ - s->dsp.put_qpel_pixels_tab [1][dy+dx/4]=\ - s->dsp.put_no_rnd_qpel_pixels_tab[1][dy+dx/4]=\ - s->dsp.put_h264_qpel_pixels_tab[1][dy+dx/4]; - - mcf( 0, 0) - mcf( 4, 0) - mcf( 8, 0) - mcf(12, 0) - mcf( 0, 4) - mcf( 4, 4) - mcf( 8, 4) - mcf(12, 4) - mcf( 0, 8) - mcf( 4, 8) - mcf( 8, 8) - mcf(12, 8) - mcf( 0,12) - mcf( 4,12) - mcf( 8,12) - mcf(12,12) - -#define mcfh(dx,dy)\ - s->dsp.put_pixels_tab [0][dy/4+dx/8]=\ - s->dsp.put_no_rnd_pixels_tab[0][dy/4+dx/8]=\ - mc_block_hpel ## dx ## dy ## 16;\ - s->dsp.put_pixels_tab [1][dy/4+dx/8]=\ - s->dsp.put_no_rnd_pixels_tab[1][dy/4+dx/8]=\ - mc_block_hpel ## dx ## dy ## 8; +#define mcfh(dx,dy)\ + s->dsp.put_pixels_tab [0][dy/4+dx/8]=\ + s->dsp.put_no_rnd_pixels_tab[0][dy/4+dx/8]=\ + mc_block_hpel ## dx ## dy ## 16;\ + s->dsp.put_pixels_tab [1][dy/4+dx/8]=\ + s->dsp.put_no_rnd_pixels_tab[1][dy/4+dx/8]=\ + mc_block_hpel ## dx ## dy ## 8; mcfh(0, 0) mcfh(8, 0) mcfh(0, 8) mcfh(8, 8) - if(!qexp[0]) - init_qexp(); + init_qexp(); // dec += FFMAX(s->chroma_h_shift, s->chroma_v_shift); @@ -1742,7 +451,7 @@ return 0; } -static int common_init_after_header(AVCodecContext *avctx){ +int ff_snow_common_init_after_header(AVCodecContext *avctx) { SnowContext *s = avctx->priv_data; int plane_index, level, orientation; @@ -1795,130 +504,11 @@ return 0; } -#define QUANTIZE2 0 - -#if QUANTIZE2==1 -#define Q2_STEP 8 - -static void find_sse(SnowContext *s, Plane *p, int *score, int score_stride, IDWTELEM *r0, IDWTELEM *r1, int level, int orientation){ - SubBand *b= &p->band[level][orientation]; - int x, y; - int xo=0; - int yo=0; - int step= 1 << (s->spatial_decomposition_count - level); - - if(orientation&1) - xo= step>>1; - if(orientation&2) - yo= step>>1; - - //FIXME bias for nonzero ? - //FIXME optimize - memset(score, 0, sizeof(*score)*score_stride*((p->height + Q2_STEP-1)/Q2_STEP)); - for(y=0; yheight; y++){ - for(x=0; xwidth; x++){ - int sx= (x-xo + step/2) / step / Q2_STEP; - int sy= (y-yo + step/2) / step / Q2_STEP; - int v= r0[x + y*p->width] - r1[x + y*p->width]; - assert(sx>=0 && sy>=0 && sx < score_stride); - v= ((v+8)>>4)<<4; - score[sx + sy*score_stride] += v*v; - assert(score[sx + sy*score_stride] >= 0); - } - } -} - -static void dequantize_all(SnowContext *s, Plane *p, IDWTELEM *buffer, int width, int height){ - int level, orientation; - - for(level=0; levelspatial_decomposition_count; level++){ - for(orientation=level ? 1 : 0; orientation<4; orientation++){ - SubBand *b= &p->band[level][orientation]; - IDWTELEM *dst= buffer + (b->ibuf - s->spatial_idwt_buffer); - - dequantize(s, b, dst, b->stride); - } - } -} - -static void dwt_quantize(SnowContext *s, Plane *p, DWTELEM *buffer, int width, int height, int stride, int type){ - int level, orientation, ys, xs, x, y, pass; - IDWTELEM best_dequant[height * stride]; - IDWTELEM idwt2_buffer[height * stride]; - const int score_stride= (width + 10)/Q2_STEP; - int best_score[(width + 10)/Q2_STEP * (height + 10)/Q2_STEP]; //FIXME size - int score[(width + 10)/Q2_STEP * (height + 10)/Q2_STEP]; //FIXME size - int threshold= (s->m.lambda * s->m.lambda) >> 6; - - //FIXME pass the copy cleanly ? - -// memcpy(dwt_buffer, buffer, height * stride * sizeof(DWTELEM)); - ff_spatial_dwt(buffer, width, height, stride, type, s->spatial_decomposition_count); - - for(level=0; levelspatial_decomposition_count; level++){ - for(orientation=level ? 1 : 0; orientation<4; orientation++){ - SubBand *b= &p->band[level][orientation]; - IDWTELEM *dst= best_dequant + (b->ibuf - s->spatial_idwt_buffer); - DWTELEM *src= buffer + (b-> buf - s->spatial_dwt_buffer); - assert(src == b->buf); // code does not depend on this but it is true currently - - quantize(s, b, dst, src, b->stride, s->qbias); - } - } - for(pass=0; pass<1; pass++){ - if(s->qbias == 0) //keyframe - continue; - for(level=0; levelspatial_decomposition_count; level++){ - for(orientation=level ? 1 : 0; orientation<4; orientation++){ - SubBand *b= &p->band[level][orientation]; - IDWTELEM *dst= idwt2_buffer + (b->ibuf - s->spatial_idwt_buffer); - IDWTELEM *best_dst= best_dequant + (b->ibuf - s->spatial_idwt_buffer); - - for(ys= 0; ysspatial_decomposition_count); - find_sse(s, p, best_score, score_stride, idwt2_buffer, s->spatial_idwt_buffer, level, orientation); - memcpy(idwt2_buffer, best_dequant, height * stride * sizeof(IDWTELEM)); - for(y=ys; yheight; y+= Q2_STEP){ - for(x=xs; xwidth; x+= Q2_STEP){ - if(dst[x + y*b->stride]<0) dst[x + y*b->stride]++; - if(dst[x + y*b->stride]>0) dst[x + y*b->stride]--; - //FIXME try more than just -- - } - } - dequantize_all(s, p, idwt2_buffer, width, height); - ff_spatial_idwt(idwt2_buffer, width, height, stride, type, s->spatial_decomposition_count); - find_sse(s, p, score, score_stride, idwt2_buffer, s->spatial_idwt_buffer, level, orientation); - for(y=ys; yheight; y+= Q2_STEP){ - for(x=xs; xwidth; x+= Q2_STEP){ - int score_idx= x/Q2_STEP + (y/Q2_STEP)*score_stride; - if(score[score_idx] <= best_score[score_idx] + threshold){ - best_score[score_idx]= score[score_idx]; - if(best_dst[x + y*b->stride]<0) best_dst[x + y*b->stride]++; - if(best_dst[x + y*b->stride]>0) best_dst[x + y*b->stride]--; - //FIXME copy instead - } - } - } - } - } - } - } - } - memcpy(s->spatial_idwt_buffer, best_dequant, height * stride * sizeof(IDWTELEM)); //FIXME work with that directly instead of copy at the end -} - -#endif /* QUANTIZE2==1 */ - #define USE_HALFPEL_PLANE 0 static void halfpel_interpol(SnowContext *s, uint8_t *halfpel[4][4], AVFrame *frame){ int p,x,y; - assert(!(s->avctx->flags & CODEC_FLAG_EMU_EDGE)); - for(p=0; p<3; p++){ int is_chroma= !!p; int w= s->avctx->width >>is_chroma; @@ -1926,9 +516,9 @@ int ls= frame->linesize[p]; uint8_t *src= frame->data[p]; - halfpel[1][p]= (uint8_t*)av_malloc(ls * (h+2*EDGE_WIDTH)) + EDGE_WIDTH*(1+ls); - halfpel[2][p]= (uint8_t*)av_malloc(ls * (h+2*EDGE_WIDTH)) + EDGE_WIDTH*(1+ls); - halfpel[3][p]= (uint8_t*)av_malloc(ls * (h+2*EDGE_WIDTH)) + EDGE_WIDTH*(1+ls); + halfpel[1][p] = (uint8_t*) av_malloc(ls * (h + 2 * EDGE_WIDTH)) + EDGE_WIDTH * (1 + ls); + halfpel[2][p] = (uint8_t*) av_malloc(ls * (h + 2 * EDGE_WIDTH)) + EDGE_WIDTH * (1 + ls); + halfpel[3][p] = (uint8_t*) av_malloc(ls * (h + 2 * EDGE_WIDTH)) + EDGE_WIDTH * (1 + ls); halfpel[0][p]= src; for(y=0; ypriv_data; int i; @@ -1970,12 +561,12 @@ } } -static int frame_start(SnowContext *s){ +int ff_snow_frame_start(SnowContext *s){ AVFrame tmp; int w= s->avctx->width; //FIXME round up to x16 ? int h= s->avctx->height; - if(s->current_picture.data[0]){ + if (s->current_picture.data[0] && !(s->avctx->flags&CODEC_FLAG_EMU_EDGE)) { s->dsp.draw_edges(s->current_picture.data[0], s->current_picture.linesize[0], w , h , EDGE_WIDTH , EDGE_WIDTH , EDGE_TOP | EDGE_BOTTOM); @@ -1987,7 +578,7 @@ EDGE_WIDTH/2, EDGE_WIDTH/2, EDGE_TOP | EDGE_BOTTOM); } - release_buffer(s->avctx); + ff_snow_release_buffer(s->avctx); tmp= s->last_picture[s->max_ref_frames-1]; memmove(s->last_picture+1, s->last_picture, (s->max_ref_frames-1)*sizeof(AVFrame)); @@ -2022,7 +613,8 @@ return 0; } -static av_cold void common_end(SnowContext *s){ +av_cold void ff_snow_common_end(SnowContext *s) +{ int plane_index, level, orientation, i; av_freep(&s->spatial_dwt_buffer); @@ -2059,2095 +651,3 @@ s->avctx->release_buffer(s->avctx, &s->current_picture); } -static av_cold int decode_init(AVCodecContext *avctx) -{ - avctx->pix_fmt= PIX_FMT_YUV420P; - - common_init(avctx); - - return 0; -} - -static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ - const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; - SnowContext *s = avctx->priv_data; - RangeCoder * const c= &s->c; - int bytes_read; - AVFrame *picture = data; - int level, orientation, plane_index; - - ff_init_range_decoder(c, buf, buf_size); - ff_build_rac_states(c, 0.05*(1LL<<32), 256-8); - - s->current_picture.pict_type= AV_PICTURE_TYPE_I; //FIXME I vs. P - if(decode_header(s)<0) - return -1; - common_init_after_header(avctx); - - // realloc slice buffer for the case that spatial_decomposition_count changed - ff_slice_buffer_destroy(&s->sb); - ff_slice_buffer_init(&s->sb, s->plane[0].height, (MB_SIZE >> s->block_max_depth) + s->spatial_decomposition_count * 8 + 1, s->plane[0].width, s->spatial_idwt_buffer); - - for(plane_index=0; plane_index<3; plane_index++){ - Plane *p= &s->plane[plane_index]; - p->fast_mc= p->diag_mc && p->htaps==6 && p->hcoeff[0]==40 - && p->hcoeff[1]==-10 - && p->hcoeff[2]==2; - } - - alloc_blocks(s); - - if(frame_start(s) < 0) - return -1; - //keyframe flag duplication mess FIXME - if(avctx->debug&FF_DEBUG_PICT_INFO) - av_log(avctx, AV_LOG_ERROR, "keyframe:%d qlog:%d\n", s->keyframe, s->qlog); - - decode_blocks(s); - - for(plane_index=0; plane_index<3; plane_index++){ - Plane *p= &s->plane[plane_index]; - int w= p->width; - int h= p->height; - int x, y; - int decode_state[MAX_DECOMPOSITIONS][4][1]; /* Stored state info for unpack_coeffs. 1 variable per instance. */ - - if(s->avctx->debug&2048){ - memset(s->spatial_dwt_buffer, 0, sizeof(DWTELEM)*w*h); - predict_plane(s, s->spatial_idwt_buffer, plane_index, 1); - - for(y=0; ycurrent_picture.data[plane_index][y*s->current_picture.linesize[plane_index] + x]; - s->mconly_picture.data[plane_index][y*s->mconly_picture.linesize[plane_index] + x]= v; - } - } - } - - { - for(level=0; levelspatial_decomposition_count; level++){ - for(orientation=level ? 1 : 0; orientation<4; orientation++){ - SubBand *b= &p->band[level][orientation]; - unpack_coeffs(s, b, b->parent, orientation); - } - } - } - - { - const int mb_h= s->b_height << s->block_max_depth; - const int block_size = MB_SIZE >> s->block_max_depth; - const int block_w = plane_index ? block_size/2 : block_size; - int mb_y; - DWTCompose cs[MAX_DECOMPOSITIONS]; - int yd=0, yq=0; - int y; - int end_y; - - ff_spatial_idwt_buffered_init(cs, &s->sb, w, h, 1, s->spatial_decomposition_type, s->spatial_decomposition_count); - for(mb_y=0; mb_y<=mb_h; mb_y++){ - - int slice_starty = block_w*mb_y; - int slice_h = block_w*(mb_y+1); - if (!(s->keyframe || s->avctx->debug&512)){ - slice_starty = FFMAX(0, slice_starty - (block_w >> 1)); - slice_h -= (block_w >> 1); - } - - for(level=0; levelspatial_decomposition_count; level++){ - for(orientation=level ? 1 : 0; orientation<4; orientation++){ - SubBand *b= &p->band[level][orientation]; - int start_y; - int end_y; - int our_mb_start = mb_y; - int our_mb_end = (mb_y + 1); - const int extra= 3; - start_y = (mb_y ? ((block_w * our_mb_start) >> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + extra: 0); - end_y = (((block_w * our_mb_end) >> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + extra); - if (!(s->keyframe || s->avctx->debug&512)){ - start_y = FFMAX(0, start_y - (block_w >> (1+s->spatial_decomposition_count - level))); - end_y = FFMAX(0, end_y - (block_w >> (1+s->spatial_decomposition_count - level))); - } - start_y = FFMIN(b->height, start_y); - end_y = FFMIN(b->height, end_y); - - if (start_y != end_y){ - if (orientation == 0){ - SubBand * correlate_band = &p->band[0][0]; - int correlate_end_y = FFMIN(b->height, end_y + 1); - int correlate_start_y = FFMIN(b->height, (start_y ? start_y + 1 : 0)); - decode_subband_slice_buffered(s, correlate_band, &s->sb, correlate_start_y, correlate_end_y, decode_state[0][0]); - correlate_slice_buffered(s, &s->sb, correlate_band, correlate_band->ibuf, correlate_band->stride, 1, 0, correlate_start_y, correlate_end_y); - dequantize_slice_buffered(s, &s->sb, correlate_band, correlate_band->ibuf, correlate_band->stride, start_y, end_y); - } - else - decode_subband_slice_buffered(s, b, &s->sb, start_y, end_y, decode_state[level][orientation]); - } - } - } - - for(; yddwt, cs, &s->sb, w, h, 1, s->spatial_decomposition_type, s->spatial_decomposition_count, yd); - } - - if(s->qlog == LOSSLESS_QLOG){ - for(; yqsb, yq); - for(x=0; xsb, s->spatial_idwt_buffer, plane_index, 1, mb_y); - - y = FFMIN(p->height, slice_starty); - end_y = FFMIN(p->height, slice_h); - while(y < end_y) - ff_slice_buffer_release(&s->sb, y++); - } - - ff_slice_buffer_flush(&s->sb); - } - - } - - emms_c(); - - release_buffer(avctx); - - if(!(s->avctx->debug&2048)) - *picture= s->current_picture; - else - *picture= s->mconly_picture; - - *data_size = sizeof(AVFrame); - - bytes_read= c->bytestream - c->bytestream_start; - if(bytes_read ==0) av_log(s->avctx, AV_LOG_ERROR, "error at end of frame\n"); //FIXME - - return bytes_read; -} - -static av_cold int decode_end(AVCodecContext *avctx) -{ - SnowContext *s = avctx->priv_data; - - ff_slice_buffer_destroy(&s->sb); - - common_end(s); - - return 0; -} - -AVCodec ff_snow_decoder = { - "snow", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_SNOW, - sizeof(SnowContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/, - NULL, - .long_name = NULL_IF_CONFIG_SMALL("Snow"), -}; - -#if CONFIG_SNOW_ENCODER -static av_cold int encode_init(AVCodecContext *avctx) -{ - SnowContext *s = avctx->priv_data; - int plane_index; - - if(avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL){ - av_log(avctx, AV_LOG_ERROR, "This codec is under development, files encoded with it may not be decodable with future versions!!!\n" - "Use vstrict=-2 / -strict -2 to use it anyway.\n"); - return -1; - } - - if(avctx->prediction_method == DWT_97 - && (avctx->flags & CODEC_FLAG_QSCALE) - && avctx->global_quality == 0){ - av_log(avctx, AV_LOG_ERROR, "The 9/7 wavelet is incompatible with lossless mode.\n"); - return -1; - } - - s->spatial_decomposition_type= avctx->prediction_method; //FIXME add decorrelator type r transform_type - - s->mv_scale = (avctx->flags & CODEC_FLAG_QPEL) ? 2 : 4; - s->block_max_depth= (avctx->flags & CODEC_FLAG_4MV ) ? 1 : 0; - - for(plane_index=0; plane_index<3; plane_index++){ - s->plane[plane_index].diag_mc= 1; - s->plane[plane_index].htaps= 6; - s->plane[plane_index].hcoeff[0]= 40; - s->plane[plane_index].hcoeff[1]= -10; - s->plane[plane_index].hcoeff[2]= 2; - s->plane[plane_index].fast_mc= 1; - } - - common_init(avctx); - alloc_blocks(s); - - s->version=0; - - s->m.avctx = avctx; - s->m.flags = avctx->flags; - s->m.bit_rate= avctx->bit_rate; - - s->m.me.temp = - s->m.me.scratchpad= av_mallocz((avctx->width+64)*2*16*2*sizeof(uint8_t)); - s->m.me.map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t)); - s->m.me.score_map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t)); - s->m.obmc_scratchpad= av_mallocz(MB_SIZE*MB_SIZE*12*sizeof(uint32_t)); - h263_encode_init(&s->m); //mv_penalty - - s->max_ref_frames = FFMAX(FFMIN(avctx->refs, MAX_REF_FRAMES), 1); - - if(avctx->flags&CODEC_FLAG_PASS1){ - if(!avctx->stats_out) - avctx->stats_out = av_mallocz(256); - } - if((avctx->flags&CODEC_FLAG_PASS2) || !(avctx->flags&CODEC_FLAG_QSCALE)){ - if(ff_rate_control_init(&s->m) < 0) - return -1; - } - s->pass1_rc= !(avctx->flags & (CODEC_FLAG_QSCALE|CODEC_FLAG_PASS2)); - - avctx->coded_frame= &s->current_picture; - switch(avctx->pix_fmt){ -// case PIX_FMT_YUV444P: -// case PIX_FMT_YUV422P: - case PIX_FMT_YUV420P: - case PIX_FMT_GRAY8: -// case PIX_FMT_YUV411P: -// case PIX_FMT_YUV410P: - s->colorspace_type= 0; - break; -/* case PIX_FMT_RGB32: - s->colorspace= 1; - break;*/ - default: - av_log(avctx, AV_LOG_ERROR, "pixel format not supported\n"); - return -1; - } -// avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift); - s->chroma_h_shift= 1; - s->chroma_v_shift= 1; - - ff_set_cmp(&s->dsp, s->dsp.me_cmp, s->avctx->me_cmp); - ff_set_cmp(&s->dsp, s->dsp.me_sub_cmp, s->avctx->me_sub_cmp); - - s->avctx->get_buffer(s->avctx, &s->input_picture); - - if(s->avctx->me_method == ME_ITER){ - int i; - int size= s->b_width * s->b_height << 2*s->block_max_depth; - for(i=0; imax_ref_frames; i++){ - s->ref_mvs[i]= av_mallocz(size*sizeof(int16_t[2])); - s->ref_scores[i]= av_mallocz(size*sizeof(uint32_t)); - } - } - - return 0; -} - -//near copy & paste from dsputil, FIXME -static int pix_sum(uint8_t * pix, int line_size, int w) -{ - int s, i, j; - - s = 0; - for (i = 0; i < w; i++) { - for (j = 0; j < w; j++) { - s += pix[0]; - pix ++; - } - pix += line_size - w; - } - return s; -} - -//near copy & paste from dsputil, FIXME -static int pix_norm1(uint8_t * pix, int line_size, int w) -{ - int s, i, j; - uint32_t *sq = ff_squareTbl + 256; - - s = 0; - for (i = 0; i < w; i++) { - for (j = 0; j < w; j ++) { - s += sq[pix[0]]; - pix ++; - } - pix += line_size - w; - } - return s; -} - -//FIXME copy&paste -#define P_LEFT P[1] -#define P_TOP P[2] -#define P_TOPRIGHT P[3] -#define P_MEDIAN P[4] -#define P_MV1 P[9] -#define FLAG_QPEL 1 //must be 1 - -static int encode_q_branch(SnowContext *s, int level, int x, int y){ - uint8_t p_buffer[1024]; - uint8_t i_buffer[1024]; - uint8_t p_state[sizeof(s->block_state)]; - uint8_t i_state[sizeof(s->block_state)]; - RangeCoder pc, ic; - uint8_t *pbbak= s->c.bytestream; - uint8_t *pbbak_start= s->c.bytestream_start; - int score, score2, iscore, i_len, p_len, block_s, sum, base_bits; - const int w= s->b_width << s->block_max_depth; - const int h= s->b_height << s->block_max_depth; - const int rem_depth= s->block_max_depth - level; - const int index= (x + y*w) << rem_depth; - const int block_w= 1<<(LOG2_MB_SIZE - level); - int trx= (x+1)<block[index-1] : &null_block; - const BlockNode *top = y ? &s->block[index-w] : &null_block; - const BlockNode *right = trxblock[index+1] : &null_block; - const BlockNode *bottom= tryblock[index+w] : &null_block; - const BlockNode *tl = y && x ? &s->block[index-w-1] : left; - const BlockNode *tr = y && trxblock[index-w+(1<color[0]; - int pcb= left->color[1]; - int pcr= left->color[2]; - int pmx, pmy; - int mx=0, my=0; - int l,cr,cb; - const int stride= s->current_picture.linesize[0]; - const int uvstride= s->current_picture.linesize[1]; - uint8_t *current_data[3]= { s->input_picture.data[0] + (x + y* stride)*block_w, - s->input_picture.data[1] + (x + y*uvstride)*block_w/2, - s->input_picture.data[2] + (x + y*uvstride)*block_w/2}; - int P[10][2]; - int16_t last_mv[3][2]; - int qpel= !!(s->avctx->flags & CODEC_FLAG_QPEL); //unused - const int shift= 1+qpel; - MotionEstContext *c= &s->m.me; - int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref); - int mx_context= av_log2(2*FFABS(left->mx - top->mx)); - int my_context= av_log2(2*FFABS(left->my - top->my)); - int s_context= 2*left->level + 2*top->level + tl->level + tr->level; - int ref, best_ref, ref_score, ref_mx, ref_my; - - assert(sizeof(s->block_state) >= 256); - if(s->keyframe){ - set_blocks(s, level, x, y, pl, pcb, pcr, 0, 0, 0, BLOCK_INTRA); - return 0; - } - -// clip predictors / edge ? - - P_LEFT[0]= left->mx; - P_LEFT[1]= left->my; - P_TOP [0]= top->mx; - P_TOP [1]= top->my; - P_TOPRIGHT[0]= tr->mx; - P_TOPRIGHT[1]= tr->my; - - last_mv[0][0]= s->block[index].mx; - last_mv[0][1]= s->block[index].my; - last_mv[1][0]= right->mx; - last_mv[1][1]= right->my; - last_mv[2][0]= bottom->mx; - last_mv[2][1]= bottom->my; - - s->m.mb_stride=2; - s->m.mb_x= - s->m.mb_y= 0; - c->skip= 0; - - assert(c-> stride == stride); - assert(c->uvstride == uvstride); - - c->penalty_factor = get_penalty_factor(s->lambda, s->lambda2, c->avctx->me_cmp); - c->sub_penalty_factor= get_penalty_factor(s->lambda, s->lambda2, c->avctx->me_sub_cmp); - c->mb_penalty_factor = get_penalty_factor(s->lambda, s->lambda2, c->avctx->mb_cmp); - c->current_mv_penalty= c->mv_penalty[s->m.f_code=1] + MAX_MV; - - c->xmin = - x*block_w - 16+3; - c->ymin = - y*block_w - 16+3; - c->xmax = - (x+1)*block_w + (w<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-3; - c->ymax = - (y+1)*block_w + (h<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-3; - - if(P_LEFT[0] > (c->xmax<xmax< (c->ymax<ymax< (c->xmax<xmax< (c->ymax<ymax<xmin<xmin< (c->xmax<xmax< (c->ymax<ymax<pred_x= P_LEFT[0]; - c->pred_y= P_LEFT[1]; - } else { - c->pred_x = P_MEDIAN[0]; - c->pred_y = P_MEDIAN[1]; - } - - score= INT_MAX; - best_ref= 0; - for(ref=0; refref_frames; ref++){ - init_ref(c, current_data, s->last_picture[ref].data, NULL, block_w*x, block_w*y, 0); - - ref_score= ff_epzs_motion_search(&s->m, &ref_mx, &ref_my, P, 0, /*ref_index*/ 0, last_mv, - (1<<16)>>shift, level-LOG2_MB_SIZE+4, block_w); - - assert(ref_mx >= c->xmin); - assert(ref_mx <= c->xmax); - assert(ref_my >= c->ymin); - assert(ref_my <= c->ymax); - - ref_score= c->sub_motion_search(&s->m, &ref_mx, &ref_my, ref_score, 0, 0, level-LOG2_MB_SIZE+4, block_w); - ref_score= ff_get_mb_score(&s->m, ref_mx, ref_my, 0, 0, level-LOG2_MB_SIZE+4, block_w, 0); - ref_score+= 2*av_log2(2*ref)*c->penalty_factor; - if(s->ref_mvs[ref]){ - s->ref_mvs[ref][index][0]= ref_mx; - s->ref_mvs[ref][index][1]= ref_my; - s->ref_scores[ref][index]= ref_score; - } - if(score > ref_score){ - score= ref_score; - best_ref= ref; - mx= ref_mx; - my= ref_my; - } - } - //FIXME if mb_cmp != SSE then intra cannot be compared currently and mb_penalty vs. lambda2 - - // subpel search - base_bits= get_rac_count(&s->c) - 8*(s->c.bytestream - s->c.bytestream_start); - pc= s->c; - pc.bytestream_start= - pc.bytestream= p_buffer; //FIXME end/start? and at the other stoo - memcpy(p_state, s->block_state, sizeof(s->block_state)); - - if(level!=s->block_max_depth) - put_rac(&pc, &p_state[4 + s_context], 1); - put_rac(&pc, &p_state[1 + left->type + top->type], 0); - if(s->ref_frames > 1) - put_symbol(&pc, &p_state[128 + 1024 + 32*ref_context], best_ref, 0); - pred_mv(s, &pmx, &pmy, best_ref, left, top, tr); - put_symbol(&pc, &p_state[128 + 32*(mx_context + 16*!!best_ref)], mx - pmx, 1); - put_symbol(&pc, &p_state[128 + 32*(my_context + 16*!!best_ref)], my - pmy, 1); - p_len= pc.bytestream - pc.bytestream_start; - score += (s->lambda2*(get_rac_count(&pc)-base_bits))>>FF_LAMBDA_SHIFT; - - block_s= block_w*block_w; - sum = pix_sum(current_data[0], stride, block_w); - l= (sum + block_s/2)/block_s; - iscore = pix_norm1(current_data[0], stride, block_w) - 2*l*sum + l*l*block_s; - - block_s= block_w*block_w>>2; - sum = pix_sum(current_data[1], uvstride, block_w>>1); - cb= (sum + block_s/2)/block_s; -// iscore += pix_norm1(¤t_mb[1][0], uvstride, block_w>>1) - 2*cb*sum + cb*cb*block_s; - sum = pix_sum(current_data[2], uvstride, block_w>>1); - cr= (sum + block_s/2)/block_s; -// iscore += pix_norm1(¤t_mb[2][0], uvstride, block_w>>1) - 2*cr*sum + cr*cr*block_s; - - ic= s->c; - ic.bytestream_start= - ic.bytestream= i_buffer; //FIXME end/start? and at the other stoo - memcpy(i_state, s->block_state, sizeof(s->block_state)); - if(level!=s->block_max_depth) - put_rac(&ic, &i_state[4 + s_context], 1); - put_rac(&ic, &i_state[1 + left->type + top->type], 1); - put_symbol(&ic, &i_state[32], l-pl , 1); - put_symbol(&ic, &i_state[64], cb-pcb, 1); - put_symbol(&ic, &i_state[96], cr-pcr, 1); - i_len= ic.bytestream - ic.bytestream_start; - iscore += (s->lambda2*(get_rac_count(&ic)-base_bits))>>FF_LAMBDA_SHIFT; - -// assert(score==256*256*256*64-1); - assert(iscore < 255*255*256 + s->lambda2*10); - assert(iscore >= 0); - assert(l>=0 && l<=255); - assert(pl>=0 && pl<=255); - - if(level==0){ - int varc= iscore >> 8; - int vard= score >> 8; - if (vard <= 64 || vard < varc) - c->scene_change_score+= ff_sqrt(vard) - ff_sqrt(varc); - else - c->scene_change_score+= s->m.qscale; - } - - if(level!=s->block_max_depth){ - put_rac(&s->c, &s->block_state[4 + s_context], 0); - score2 = encode_q_branch(s, level+1, 2*x+0, 2*y+0); - score2+= encode_q_branch(s, level+1, 2*x+1, 2*y+0); - score2+= encode_q_branch(s, level+1, 2*x+0, 2*y+1); - score2+= encode_q_branch(s, level+1, 2*x+1, 2*y+1); - score2+= s->lambda2>>FF_LAMBDA_SHIFT; //FIXME exact split overhead - - if(score2 < score && score2 < iscore) - return score2; - } - - if(iscore < score){ - pred_mv(s, &pmx, &pmy, 0, left, top, tr); - memcpy(pbbak, i_buffer, i_len); - s->c= ic; - s->c.bytestream_start= pbbak_start; - s->c.bytestream= pbbak + i_len; - set_blocks(s, level, x, y, l, cb, cr, pmx, pmy, 0, BLOCK_INTRA); - memcpy(s->block_state, i_state, sizeof(s->block_state)); - return iscore; - }else{ - memcpy(pbbak, p_buffer, p_len); - s->c= pc; - s->c.bytestream_start= pbbak_start; - s->c.bytestream= pbbak + p_len; - set_blocks(s, level, x, y, pl, pcb, pcr, mx, my, best_ref, 0); - memcpy(s->block_state, p_state, sizeof(s->block_state)); - return score; - } -} - -static void encode_q_branch2(SnowContext *s, int level, int x, int y){ - const int w= s->b_width << s->block_max_depth; - const int rem_depth= s->block_max_depth - level; - const int index= (x + y*w) << rem_depth; - int trx= (x+1)<block[index]; - const BlockNode *left = x ? &s->block[index-1] : &null_block; - const BlockNode *top = y ? &s->block[index-w] : &null_block; - const BlockNode *tl = y && x ? &s->block[index-w-1] : left; - const BlockNode *tr = y && trxblock[index-w+(1<color[0]; - int pcb= left->color[1]; - int pcr= left->color[2]; - int pmx, pmy; - int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref); - int mx_context= av_log2(2*FFABS(left->mx - top->mx)) + 16*!!b->ref; - int my_context= av_log2(2*FFABS(left->my - top->my)) + 16*!!b->ref; - int s_context= 2*left->level + 2*top->level + tl->level + tr->level; - - if(s->keyframe){ - set_blocks(s, level, x, y, pl, pcb, pcr, 0, 0, 0, BLOCK_INTRA); - return; - } - - if(level!=s->block_max_depth){ - if(same_block(b,b+1) && same_block(b,b+w) && same_block(b,b+w+1)){ - put_rac(&s->c, &s->block_state[4 + s_context], 1); - }else{ - put_rac(&s->c, &s->block_state[4 + s_context], 0); - encode_q_branch2(s, level+1, 2*x+0, 2*y+0); - encode_q_branch2(s, level+1, 2*x+1, 2*y+0); - encode_q_branch2(s, level+1, 2*x+0, 2*y+1); - encode_q_branch2(s, level+1, 2*x+1, 2*y+1); - return; - } - } - if(b->type & BLOCK_INTRA){ - pred_mv(s, &pmx, &pmy, 0, left, top, tr); - put_rac(&s->c, &s->block_state[1 + (left->type&1) + (top->type&1)], 1); - put_symbol(&s->c, &s->block_state[32], b->color[0]-pl , 1); - put_symbol(&s->c, &s->block_state[64], b->color[1]-pcb, 1); - put_symbol(&s->c, &s->block_state[96], b->color[2]-pcr, 1); - set_blocks(s, level, x, y, b->color[0], b->color[1], b->color[2], pmx, pmy, 0, BLOCK_INTRA); - }else{ - pred_mv(s, &pmx, &pmy, b->ref, left, top, tr); - put_rac(&s->c, &s->block_state[1 + (left->type&1) + (top->type&1)], 0); - if(s->ref_frames > 1) - put_symbol(&s->c, &s->block_state[128 + 1024 + 32*ref_context], b->ref, 0); - put_symbol(&s->c, &s->block_state[128 + 32*mx_context], b->mx - pmx, 1); - put_symbol(&s->c, &s->block_state[128 + 32*my_context], b->my - pmy, 1); - set_blocks(s, level, x, y, pl, pcb, pcr, b->mx, b->my, b->ref, 0); - } -} - -static int get_dc(SnowContext *s, int mb_x, int mb_y, int plane_index){ - int i, x2, y2; - Plane *p= &s->plane[plane_index]; - const int block_size = MB_SIZE >> s->block_max_depth; - const int block_w = plane_index ? block_size/2 : block_size; - const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; - const int obmc_stride= plane_index ? block_size : 2*block_size; - const int ref_stride= s->current_picture.linesize[plane_index]; - uint8_t *src= s-> input_picture.data[plane_index]; - IDWTELEM *dst= (IDWTELEM*)s->m.obmc_scratchpad + plane_index*block_size*block_size*4; //FIXME change to unsigned - const int b_stride = s->b_width << s->block_max_depth; - const int w= p->width; - const int h= p->height; - int index= mb_x + mb_y*b_stride; - BlockNode *b= &s->block[index]; - BlockNode backup= *b; - int ab=0; - int aa=0; - - b->type|= BLOCK_INTRA; - b->color[plane_index]= 0; - memset(dst, 0, obmc_stride*obmc_stride*sizeof(IDWTELEM)); - - for(i=0; i<4; i++){ - int mb_x2= mb_x + (i &1) - 1; - int mb_y2= mb_y + (i>>1) - 1; - int x= block_w*mb_x2 + block_w/2; - int y= block_w*mb_y2 + block_w/2; - - add_yblock(s, 0, NULL, dst + ((i&1)+(i>>1)*obmc_stride)*block_w, NULL, obmc, - x, y, block_w, block_w, w, h, obmc_stride, ref_stride, obmc_stride, mb_x2, mb_y2, 0, 0, plane_index); - - for(y2= FFMAX(y, 0); y2h) obmc_v += obmc[index - block_w*obmc_stride]; - if(x+block_w>w) obmc_v += obmc[index - block_w]; - //FIXME precalculate this or simplify it somehow else - - d = -dst[index] + (1<<(FRAC_BITS-1)); - dst[index] = d; - ab += (src[x2 + y2*ref_stride] - (d>>FRAC_BITS)) * obmc_v; - aa += obmc_v * obmc_v; //FIXME precalculate this - } - } - } - *b= backup; - - return av_clip(((ab<b_width << s->block_max_depth; - const int b_height = s->b_height<< s->block_max_depth; - int index= x + y*b_stride; - const BlockNode *b = &s->block[index]; - const BlockNode *left = x ? &s->block[index-1] : &null_block; - const BlockNode *top = y ? &s->block[index-b_stride] : &null_block; - const BlockNode *tl = y && x ? &s->block[index-b_stride-1] : left; - const BlockNode *tr = y && x+wblock[index-b_stride+w] : tl; - int dmx, dmy; -// int mx_context= av_log2(2*FFABS(left->mx - top->mx)); -// int my_context= av_log2(2*FFABS(left->my - top->my)); - - if(x<0 || x>=b_stride || y>=b_height) - return 0; -/* -1 0 0 -01X 1-2 1 -001XX 3-6 2-3 -0001XXX 7-14 4-7 -00001XXXX 15-30 8-15 -*/ -//FIXME try accurate rate -//FIXME intra and inter predictors if surrounding blocks are not the same type - if(b->type & BLOCK_INTRA){ - return 3+2*( av_log2(2*FFABS(left->color[0] - b->color[0])) - + av_log2(2*FFABS(left->color[1] - b->color[1])) - + av_log2(2*FFABS(left->color[2] - b->color[2]))); - }else{ - pred_mv(s, &dmx, &dmy, b->ref, left, top, tr); - dmx-= b->mx; - dmy-= b->my; - return 2*(1 + av_log2(2*FFABS(dmx)) //FIXME kill the 2* can be merged in lambda - + av_log2(2*FFABS(dmy)) - + av_log2(2*b->ref)); - } -} - -static int get_block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index, const uint8_t *obmc_edged){ - Plane *p= &s->plane[plane_index]; - const int block_size = MB_SIZE >> s->block_max_depth; - const int block_w = plane_index ? block_size/2 : block_size; - const int obmc_stride= plane_index ? block_size : 2*block_size; - const int ref_stride= s->current_picture.linesize[plane_index]; - uint8_t *dst= s->current_picture.data[plane_index]; - uint8_t *src= s-> input_picture.data[plane_index]; - IDWTELEM *pred= (IDWTELEM*)s->m.obmc_scratchpad + plane_index*block_size*block_size*4; - uint8_t *cur = s->scratchbuf; - uint8_t tmp[ref_stride*(2*MB_SIZE+HTAPS_MAX-1)]; - const int b_stride = s->b_width << s->block_max_depth; - const int b_height = s->b_height<< s->block_max_depth; - const int w= p->width; - const int h= p->height; - int distortion; - int rate= 0; - const int penalty_factor= get_penalty_factor(s->lambda, s->lambda2, s->avctx->me_cmp); - int sx= block_w*mb_x - block_w/2; - int sy= block_w*mb_y - block_w/2; - int x0= FFMAX(0,-sx); - int y0= FFMAX(0,-sy); - int x1= FFMIN(block_w*2, w-sx); - int y1= FFMIN(block_w*2, h-sy); - int i,x,y; - - pred_block(s, cur, tmp, ref_stride, sx, sy, block_w*2, block_w*2, &s->block[mb_x + mb_y*b_stride], plane_index, w, h); - - for(y=y0; y= LOG2_OBMC_MAX - int v = (cur1[x] * obmc1[x]) << (FRAC_BITS - LOG2_OBMC_MAX); -#else - int v = (cur1[x] * obmc1[x] + (1<<(LOG2_OBMC_MAX - FRAC_BITS-1))) >> (LOG2_OBMC_MAX - FRAC_BITS); -#endif - v = (v + pred1[x]) >> FRAC_BITS; - if(v&(~255)) v= ~(v>>31); - dst1[x] = v; - } - } - - /* copy the regions where obmc[] = (uint8_t)256 */ - if(LOG2_OBMC_MAX == 8 - && (mb_x == 0 || mb_x == b_stride-1) - && (mb_y == 0 || mb_y == b_height-1)){ - if(mb_x == 0) - x1 = block_w; - else - x0 = block_w; - if(mb_y == 0) - y1 = block_w; - else - y0 = block_w; - for(y=y0; yavctx->me_cmp == FF_CMP_W97) - distortion = ff_w97_32_c(&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, 32); - else if(s->avctx->me_cmp == FF_CMP_W53) - distortion = ff_w53_32_c(&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, 32); - else{ - distortion = 0; - for(i=0; i<4; i++){ - int off = sx+16*(i&1) + (sy+16*(i>>1))*ref_stride; - distortion += s->dsp.me_cmp[0](&s->m, src + off, dst + off, ref_stride, 16); - } - } - }else{ - assert(block_w==8); - distortion = s->dsp.me_cmp[0](&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, block_w*2); - } - - if(plane_index==0){ - for(i=0; i<4; i++){ -/* ..RRr - * .RXx. - * rxx.. - */ - rate += get_block_bits(s, mb_x + (i&1) - (i>>1), mb_y + (i>>1), 1); - } - if(mb_x == b_stride-2) - rate += get_block_bits(s, mb_x + 1, mb_y + 1, 1); - } - return distortion + rate*penalty_factor; -} - -static int get_4block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index){ - int i, y2; - Plane *p= &s->plane[plane_index]; - const int block_size = MB_SIZE >> s->block_max_depth; - const int block_w = plane_index ? block_size/2 : block_size; - const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; - const int obmc_stride= plane_index ? block_size : 2*block_size; - const int ref_stride= s->current_picture.linesize[plane_index]; - uint8_t *dst= s->current_picture.data[plane_index]; - uint8_t *src= s-> input_picture.data[plane_index]; - //FIXME zero_dst is const but add_yblock changes dst if add is 0 (this is never the case for dst=zero_dst - // const has only been removed from zero_dst to suppress a warning - static IDWTELEM zero_dst[4096]; //FIXME - const int b_stride = s->b_width << s->block_max_depth; - const int w= p->width; - const int h= p->height; - int distortion= 0; - int rate= 0; - const int penalty_factor= get_penalty_factor(s->lambda, s->lambda2, s->avctx->me_cmp); - - for(i=0; i<9; i++){ - int mb_x2= mb_x + (i%3) - 1; - int mb_y2= mb_y + (i/3) - 1; - int x= block_w*mb_x2 + block_w/2; - int y= block_w*mb_y2 + block_w/2; - - add_yblock(s, 0, NULL, zero_dst, dst, obmc, - x, y, block_w, block_w, w, h, /*dst_stride*/0, ref_stride, obmc_stride, mb_x2, mb_y2, 1, 1, plane_index); - - //FIXME find a cleaner/simpler way to skip the outside stuff - for(y2= y; y2<0; y2++) - memcpy(dst + x + y2*ref_stride, src + x + y2*ref_stride, block_w); - for(y2= h; y2 w){ - for(y2= y; y2dsp.me_cmp[block_w==8](&s->m, src + x + y*ref_stride, dst + x + y*ref_stride, ref_stride, block_w); - } - - if(plane_index==0){ - BlockNode *b= &s->block[mb_x+mb_y*b_stride]; - int merged= same_block(b,b+1) && same_block(b,b+b_stride) && same_block(b,b+b_stride+1); - -/* ..RRRr - * .RXXx. - * .RXXx. - * rxxx. - */ - if(merged) - rate = get_block_bits(s, mb_x, mb_y, 2); - for(i=merged?4:0; i<9; i++){ - static const int dxy[9][2] = {{0,0},{1,0},{0,1},{1,1},{2,0},{2,1},{-1,2},{0,2},{1,2}}; - rate += get_block_bits(s, mb_x + dxy[i][0], mb_y + dxy[i][1], 1); - } - } - return distortion + rate*penalty_factor; -} - -static int encode_subband_c0run(SnowContext *s, SubBand *b, IDWTELEM *src, IDWTELEM *parent, int stride, int orientation){ - const int w= b->width; - const int h= b->height; - int x, y; - - if(1){ - int run=0; - int runs[w*h]; - int run_index=0; - int max_index; - - for(y=0; y 1){ - if(orientation==1) ll= src[y + (x-2)*stride]; - else ll= src[x - 2 + y*stride]; - }*/ - } - if(parent){ - int px= x>>1; - int py= y>>1; - if(pxparent->width && pyparent->height) - p= parent[px + py*2*stride]; - } - if(!(/*ll|*/l|lt|t|rt|p)){ - if(v){ - runs[run_index++]= run; - run=0; - }else{ - run++; - } - } - } - } - max_index= run_index; - runs[run_index++]= run; - run_index=0; - run= runs[run_index++]; - - put_symbol2(&s->c, b->state[30], max_index, 0); - if(run_index <= max_index) - put_symbol2(&s->c, b->state[1], run, 3); - - for(y=0; yc.bytestream_end - s->c.bytestream < w*40){ - av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n"); - return -1; - } - for(x=0; x 1){ - if(orientation==1) ll= src[y + (x-2)*stride]; - else ll= src[x - 2 + y*stride]; - }*/ - } - if(parent){ - int px= x>>1; - int py= y>>1; - if(pxparent->width && pyparent->height) - p= parent[px + py*2*stride]; - } - if(/*ll|*/l|lt|t|rt|p){ - int context= av_log2(/*FFABS(ll) + */3*FFABS(l) + FFABS(lt) + 2*FFABS(t) + FFABS(rt) + FFABS(p)); - - put_rac(&s->c, &b->state[0][context], !!v); - }else{ - if(!run){ - run= runs[run_index++]; - - if(run_index <= max_index) - put_symbol2(&s->c, b->state[1], run, 3); - assert(v); - }else{ - run--; - assert(!v); - } - } - if(v){ - int context= av_log2(/*FFABS(ll) + */3*FFABS(l) + FFABS(lt) + 2*FFABS(t) + FFABS(rt) + FFABS(p)); - int l2= 2*FFABS(l) + (l<0); - int t2= 2*FFABS(t) + (t<0); - - put_symbol2(&s->c, b->state[context + 2], FFABS(v)-1, context-4); - put_rac(&s->c, &b->state[0][16 + 1 + 3 + quant3bA[l2&0xFF] + 3*quant3bA[t2&0xFF]], v<0); - } - } - } - } - return 0; -} - -static int encode_subband(SnowContext *s, SubBand *b, IDWTELEM *src, IDWTELEM *parent, int stride, int orientation){ -// encode_subband_qtree(s, b, src, parent, stride, orientation); -// encode_subband_z0run(s, b, src, parent, stride, orientation); - return encode_subband_c0run(s, b, src, parent, stride, orientation); -// encode_subband_dzr(s, b, src, parent, stride, orientation); -} - -static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, const uint8_t *obmc_edged, int *best_rd){ - const int b_stride= s->b_width << s->block_max_depth; - BlockNode *block= &s->block[mb_x + mb_y * b_stride]; - BlockNode backup= *block; - int rd, index, value; - - assert(mb_x>=0 && mb_y>=0); - assert(mb_xcolor[0] = p[0]; - block->color[1] = p[1]; - block->color[2] = p[2]; - block->type |= BLOCK_INTRA; - }else{ - index= (p[0] + 31*p[1]) & (ME_CACHE_SIZE-1); - value= s->me_cache_generation + (p[0]>>10) + (p[1]<<6) + (block->ref<<12); - if(s->me_cache[index] == value) - return 0; - s->me_cache[index]= value; - - block->mx= p[0]; - block->my= p[1]; - block->type &= ~BLOCK_INTRA; - } - - rd= get_block_rd(s, mb_x, mb_y, 0, obmc_edged); - -//FIXME chroma - if(rd < *best_rd){ - *best_rd= rd; - return 1; - }else{ - *block= backup; - return 0; - } -} - -/* special case for int[2] args we discard afterwards, - * fixes compilation problem with gcc 2.95 */ -static av_always_inline int check_block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, const uint8_t *obmc_edged, int *best_rd){ - int p[2] = {p0, p1}; - return check_block(s, mb_x, mb_y, p, 0, obmc_edged, best_rd); -} - -static av_always_inline int check_4block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, int ref, int *best_rd){ - const int b_stride= s->b_width << s->block_max_depth; - BlockNode *block= &s->block[mb_x + mb_y * b_stride]; - BlockNode backup[4]= {block[0], block[1], block[b_stride], block[b_stride+1]}; - int rd, index, value; - - assert(mb_x>=0 && mb_y>=0); - assert(mb_xme_cache_generation + (p0>>10) + (p1<<6) + (block->ref<<12); - if(s->me_cache[index] == value) - return 0; - s->me_cache[index]= value; - - block->mx= p0; - block->my= p1; - block->ref= ref; - block->type &= ~BLOCK_INTRA; - block[1]= block[b_stride]= block[b_stride+1]= *block; - - rd= get_4block_rd(s, mb_x, mb_y, 0); - -//FIXME chroma - if(rd < *best_rd){ - *best_rd= rd; - return 1; - }else{ - block[0]= backup[0]; - block[1]= backup[1]; - block[b_stride]= backup[2]; - block[b_stride+1]= backup[3]; - return 0; - } -} - -static void iterative_me(SnowContext *s){ - int pass, mb_x, mb_y; - const int b_width = s->b_width << s->block_max_depth; - const int b_height= s->b_height << s->block_max_depth; - const int b_stride= b_width; - int color[3]; - - { - RangeCoder r = s->c; - uint8_t state[sizeof(s->block_state)]; - memcpy(state, s->block_state, sizeof(s->block_state)); - for(mb_y= 0; mb_yb_height; mb_y++) - for(mb_x= 0; mb_xb_width; mb_x++) - encode_q_branch(s, 0, mb_x, mb_y); - s->c = r; - memcpy(s->block_state, state, sizeof(s->block_state)); - } - - for(pass=0; pass<25; pass++){ - int change= 0; - - for(mb_y= 0; mb_yblock[index]; - BlockNode *tb = mb_y ? &s->block[index-b_stride ] : NULL; - BlockNode *lb = mb_x ? &s->block[index -1] : NULL; - BlockNode *rb = mb_x+1block[index +1] : NULL; - BlockNode *bb = mb_y+1block[index+b_stride ] : NULL; - BlockNode *tlb= mb_x && mb_y ? &s->block[index-b_stride-1] : NULL; - BlockNode *trb= mb_x+1block[index-b_stride+1] : NULL; - BlockNode *blb= mb_x && mb_y+1block[index+b_stride-1] : NULL; - BlockNode *brb= mb_x+1block[index+b_stride+1] : NULL; - const int b_w= (MB_SIZE >> s->block_max_depth); - uint8_t obmc_edged[b_w*2][b_w*2]; - - if(pass && (block->type & BLOCK_OPT)) - continue; - block->type |= BLOCK_OPT; - - backup= *block; - - if(!s->me_cache_generation) - memset(s->me_cache, 0, sizeof(s->me_cache)); - s->me_cache_generation += 1<<22; - - //FIXME precalculate - { - int x, y; - memcpy(obmc_edged, obmc_tab[s->block_max_depth], b_w*b_w*4); - if(mb_x==0) - for(y=0; y input_picture.data[0]; - uint8_t *dst= s->current_picture.data[0]; - const int stride= s->current_picture.linesize[0]; - const int block_w= MB_SIZE >> s->block_max_depth; - const int sx= block_w*mb_x - block_w/2; - const int sy= block_w*mb_y - block_w/2; - const int w= s->plane[0].width; - const int h= s->plane[0].height; - int y; - - for(y=sy; y<0; y++) - memcpy(dst + sx + y*stride, src + sx + y*stride, block_w*2); - for(y=h; y w){ - for(y=sy; y 0 && (block->type&BLOCK_INTRA)){ - int color0[3]= {block->color[0], block->color[1], block->color[2]}; - check_block(s, mb_x, mb_y, color0, 1, *obmc_edged, &best_rd); - }else - check_block_inter(s, mb_x, mb_y, block->mx, block->my, *obmc_edged, &best_rd); - - ref_b= *block; - ref_rd= best_rd; - for(ref=0; ref < s->ref_frames; ref++){ - int16_t (*mvr)[2]= &s->ref_mvs[ref][index]; - if(s->ref_scores[ref][index] > s->ref_scores[ref_b.ref][index]*3/2) //FIXME tune threshold - continue; - block->ref= ref; - best_rd= INT_MAX; - - check_block_inter(s, mb_x, mb_y, mvr[0][0], mvr[0][1], *obmc_edged, &best_rd); - check_block_inter(s, mb_x, mb_y, 0, 0, *obmc_edged, &best_rd); - if(tb) - check_block_inter(s, mb_x, mb_y, mvr[-b_stride][0], mvr[-b_stride][1], *obmc_edged, &best_rd); - if(lb) - check_block_inter(s, mb_x, mb_y, mvr[-1][0], mvr[-1][1], *obmc_edged, &best_rd); - if(rb) - check_block_inter(s, mb_x, mb_y, mvr[1][0], mvr[1][1], *obmc_edged, &best_rd); - if(bb) - check_block_inter(s, mb_x, mb_y, mvr[b_stride][0], mvr[b_stride][1], *obmc_edged, &best_rd); - - /* fullpel ME */ - //FIXME avoid subpel interpolation / round to nearest integer - do{ - dia_change=0; - for(i=0; iavctx->dia_size, 1); i++){ - for(j=0; jmx+4*(i-j), block->my+(4*j), *obmc_edged, &best_rd); - dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my-(4*j), *obmc_edged, &best_rd); - dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+4*(i-j), block->my-(4*j), *obmc_edged, &best_rd); - dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my+(4*j), *obmc_edged, &best_rd); - } - } - }while(dia_change); - /* subpel ME */ - do{ - static const int square[8][2]= {{+1, 0},{-1, 0},{ 0,+1},{ 0,-1},{+1,+1},{-1,-1},{+1,-1},{-1,+1},}; - dia_change=0; - for(i=0; i<8; i++) - dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+square[i][0], block->my+square[i][1], *obmc_edged, &best_rd); - }while(dia_change); - //FIXME or try the standard 2 pass qpel or similar - - mvr[0][0]= block->mx; - mvr[0][1]= block->my; - if(ref_rd > best_rd){ - ref_rd= best_rd; - ref_b= *block; - } - } - best_rd= ref_rd; - *block= ref_b; - check_block(s, mb_x, mb_y, color, 1, *obmc_edged, &best_rd); - //FIXME RD style color selection - if(!same_block(block, &backup)){ - if(tb ) tb ->type &= ~BLOCK_OPT; - if(lb ) lb ->type &= ~BLOCK_OPT; - if(rb ) rb ->type &= ~BLOCK_OPT; - if(bb ) bb ->type &= ~BLOCK_OPT; - if(tlb) tlb->type &= ~BLOCK_OPT; - if(trb) trb->type &= ~BLOCK_OPT; - if(blb) blb->type &= ~BLOCK_OPT; - if(brb) brb->type &= ~BLOCK_OPT; - change ++; - } - } - } - av_log(s->avctx, AV_LOG_ERROR, "pass:%d changed:%d\n", pass, change); - if(!change) - break; - } - - if(s->block_max_depth == 1){ - int change= 0; - for(mb_y= 0; mb_yblock[index]; - b[1]= b[0]+1; - b[2]= b[0]+b_stride; - b[3]= b[2]+1; - if(same_block(b[0], b[1]) && - same_block(b[0], b[2]) && - same_block(b[0], b[3])) - continue; - - if(!s->me_cache_generation) - memset(s->me_cache, 0, sizeof(s->me_cache)); - s->me_cache_generation += 1<<22; - - init_rd= best_rd= get_4block_rd(s, mb_x, mb_y, 0); - - //FIXME more multiref search? - check_4block_inter(s, mb_x, mb_y, - (b[0]->mx + b[1]->mx + b[2]->mx + b[3]->mx + 2) >> 2, - (b[0]->my + b[1]->my + b[2]->my + b[3]->my + 2) >> 2, 0, &best_rd); - - for(i=0; i<4; i++) - if(!(b[i]->type&BLOCK_INTRA)) - check_4block_inter(s, mb_x, mb_y, b[i]->mx, b[i]->my, b[i]->ref, &best_rd); - - if(init_rd != best_rd) - change++; - } - } - av_log(s->avctx, AV_LOG_ERROR, "pass:4mv changed:%d\n", change*4); - } -} - -static void encode_blocks(SnowContext *s, int search){ - int x, y; - int w= s->b_width; - int h= s->b_height; - - if(s->avctx->me_method == ME_ITER && !s->keyframe && search) - iterative_me(s); - - for(y=0; yc.bytestream_end - s->c.bytestream < w*MB_SIZE*MB_SIZE*3){ //FIXME nicer limit - av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n"); - return; - } - for(x=0; xavctx->me_method == ME_ITER || !search) - encode_q_branch2(s, 0, x, y); - else - encode_q_branch (s, 0, x, y); - } - } -} - -static void quantize(SnowContext *s, SubBand *b, IDWTELEM *dst, DWTELEM *src, int stride, int bias){ - const int w= b->width; - const int h= b->height; - const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); - const int qmul= qexp[qlog&(QROOT-1)]<<((qlog>>QSHIFT) + ENCODER_EXTRA_BITS); - int x,y, thres1, thres2; - - if(s->qlog == LOSSLESS_QLOG){ - for(y=0; y>3; - thres1= ((qmul - bias)>>QEXPSHIFT) - 1; - thres2= 2*thres1; - - if(!bias){ - for(y=0; y thres2){ - if(i>=0){ - i<<= QEXPSHIFT; - i/= qmul; //FIXME optimize - dst[x + y*stride]= i; - }else{ - i= -i; - i<<= QEXPSHIFT; - i/= qmul; //FIXME optimize - dst[x + y*stride]= -i; - } - }else - dst[x + y*stride]= 0; - } - } - }else{ - for(y=0; y thres2){ - if(i>=0){ - i<<= QEXPSHIFT; - i= (i + bias) / qmul; //FIXME optimize - dst[x + y*stride]= i; - }else{ - i= -i; - i<<= QEXPSHIFT; - i= (i + bias) / qmul; //FIXME optimize - dst[x + y*stride]= -i; - } - }else - dst[x + y*stride]= 0; - } - } - } -} - -static void dequantize(SnowContext *s, SubBand *b, IDWTELEM *src, int stride){ - const int w= b->width; - const int h= b->height; - const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); - const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); - const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; - int x,y; - - if(s->qlog == LOSSLESS_QLOG) return; - - for(y=0; y>(QEXPSHIFT)); //FIXME try different bias - }else if(i>0){ - src[x + y*stride]= (( i*qmul + qadd)>>(QEXPSHIFT)); - } - } - } -} - -static void decorrelate(SnowContext *s, SubBand *b, IDWTELEM *src, int stride, int inverse, int use_median){ - const int w= b->width; - const int h= b->height; - int x,y; - - for(y=h-1; y>=0; y--){ - for(x=w-1; x>=0; x--){ - int i= x + y*stride; - - if(x){ - if(use_median){ - if(y && x+1width; - const int h= b->height; - int x,y; - - for(y=0; yspatial_decomposition_count; level++){ - for(orientation=level ? 1:0; orientation<4; orientation++){ - if(orientation==2) continue; - put_symbol(&s->c, s->header_state, s->plane[plane_index].band[level][orientation].qlog, 1); - } - } - } -} - -static void encode_header(SnowContext *s){ - int plane_index, i; - uint8_t kstate[32]; - - memset(kstate, MID_STATE, sizeof(kstate)); - - put_rac(&s->c, kstate, s->keyframe); - if(s->keyframe || s->always_reset){ - reset_contexts(s); - s->last_spatial_decomposition_type= - s->last_qlog= - s->last_qbias= - s->last_mv_scale= - s->last_block_max_depth= 0; - for(plane_index=0; plane_index<2; plane_index++){ - Plane *p= &s->plane[plane_index]; - p->last_htaps=0; - p->last_diag_mc=0; - memset(p->last_hcoeff, 0, sizeof(p->last_hcoeff)); - } - } - if(s->keyframe){ - put_symbol(&s->c, s->header_state, s->version, 0); - put_rac(&s->c, s->header_state, s->always_reset); - put_symbol(&s->c, s->header_state, s->temporal_decomposition_type, 0); - put_symbol(&s->c, s->header_state, s->temporal_decomposition_count, 0); - put_symbol(&s->c, s->header_state, s->spatial_decomposition_count, 0); - put_symbol(&s->c, s->header_state, s->colorspace_type, 0); - put_symbol(&s->c, s->header_state, s->chroma_h_shift, 0); - put_symbol(&s->c, s->header_state, s->chroma_v_shift, 0); - put_rac(&s->c, s->header_state, s->spatial_scalability); -// put_rac(&s->c, s->header_state, s->rate_scalability); - put_symbol(&s->c, s->header_state, s->max_ref_frames-1, 0); - - encode_qlogs(s); - } - - if(!s->keyframe){ - int update_mc=0; - for(plane_index=0; plane_index<2; plane_index++){ - Plane *p= &s->plane[plane_index]; - update_mc |= p->last_htaps != p->htaps; - update_mc |= p->last_diag_mc != p->diag_mc; - update_mc |= !!memcmp(p->last_hcoeff, p->hcoeff, sizeof(p->hcoeff)); - } - put_rac(&s->c, s->header_state, update_mc); - if(update_mc){ - for(plane_index=0; plane_index<2; plane_index++){ - Plane *p= &s->plane[plane_index]; - put_rac(&s->c, s->header_state, p->diag_mc); - put_symbol(&s->c, s->header_state, p->htaps/2-1, 0); - for(i= p->htaps/2; i; i--) - put_symbol(&s->c, s->header_state, FFABS(p->hcoeff[i]), 0); - } - } - if(s->last_spatial_decomposition_count != s->spatial_decomposition_count){ - put_rac(&s->c, s->header_state, 1); - put_symbol(&s->c, s->header_state, s->spatial_decomposition_count, 0); - encode_qlogs(s); - }else - put_rac(&s->c, s->header_state, 0); - } - - put_symbol(&s->c, s->header_state, s->spatial_decomposition_type - s->last_spatial_decomposition_type, 1); - put_symbol(&s->c, s->header_state, s->qlog - s->last_qlog , 1); - put_symbol(&s->c, s->header_state, s->mv_scale - s->last_mv_scale, 1); - put_symbol(&s->c, s->header_state, s->qbias - s->last_qbias , 1); - put_symbol(&s->c, s->header_state, s->block_max_depth - s->last_block_max_depth, 1); - -} - -static void update_last_header_values(SnowContext *s){ - int plane_index; - - if(!s->keyframe){ - for(plane_index=0; plane_index<2; plane_index++){ - Plane *p= &s->plane[plane_index]; - p->last_diag_mc= p->diag_mc; - p->last_htaps = p->htaps; - memcpy(p->last_hcoeff, p->hcoeff, sizeof(p->hcoeff)); - } - } - - s->last_spatial_decomposition_type = s->spatial_decomposition_type; - s->last_qlog = s->qlog; - s->last_qbias = s->qbias; - s->last_mv_scale = s->mv_scale; - s->last_block_max_depth = s->block_max_depth; - s->last_spatial_decomposition_count = s->spatial_decomposition_count; -} - -static int qscale2qlog(int qscale){ - return rint(QROOT*log(qscale / (float)FF_QP2LAMBDA)/log(2)) - + 61*QROOT/8; //<64 >60 -} - -static int ratecontrol_1pass(SnowContext *s, AVFrame *pict) -{ - /* Estimate the frame's complexity as a sum of weighted dwt coefficients. - * FIXME we know exact mv bits at this point, - * but ratecontrol isn't set up to include them. */ - uint32_t coef_sum= 0; - int level, orientation, delta_qlog; - - for(level=0; levelspatial_decomposition_count; level++){ - for(orientation=level ? 1 : 0; orientation<4; orientation++){ - SubBand *b= &s->plane[0].band[level][orientation]; - IDWTELEM *buf= b->ibuf; - const int w= b->width; - const int h= b->height; - const int stride= b->stride; - const int qlog= av_clip(2*QROOT + b->qlog, 0, QROOT*16); - const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); - const int qdiv= (1<<16)/qmul; - int x, y; - //FIXME this is ugly - for(y=0; ybuf[x+y*stride]; - if(orientation==0) - decorrelate(s, b, buf, stride, 1, 0); - for(y=0; y> 16; - } - } - - /* ugly, ratecontrol just takes a sqrt again */ - coef_sum = (uint64_t)coef_sum * coef_sum >> 16; - assert(coef_sum < INT_MAX); - - if(pict->pict_type == AV_PICTURE_TYPE_I){ - s->m.current_picture.mb_var_sum= coef_sum; - s->m.current_picture.mc_mb_var_sum= 0; - }else{ - s->m.current_picture.mc_mb_var_sum= coef_sum; - s->m.current_picture.mb_var_sum= 0; - } - - pict->quality= ff_rate_estimate_qscale(&s->m, 1); - if (pict->quality < 0) - return INT_MIN; - s->lambda= pict->quality * 3/2; - delta_qlog= qscale2qlog(pict->quality) - s->qlog; - s->qlog+= delta_qlog; - return delta_qlog; -} - -static void calculate_visual_weight(SnowContext *s, Plane *p){ - int width = p->width; - int height= p->height; - int level, orientation, x, y; - - for(level=0; levelspatial_decomposition_count; level++){ - for(orientation=level ? 1 : 0; orientation<4; orientation++){ - SubBand *b= &p->band[level][orientation]; - IDWTELEM *ibuf= b->ibuf; - int64_t error=0; - - memset(s->spatial_idwt_buffer, 0, sizeof(*s->spatial_idwt_buffer)*width*height); - ibuf[b->width/2 + b->height/2*b->stride]= 256*16; - ff_spatial_idwt(s->spatial_idwt_buffer, width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count); - for(y=0; yspatial_idwt_buffer[x + y*width]*16; - error += d*d; - } - } - - b->qlog= (int)(log(352256.0/sqrt(error)) / log(pow(2.0, 1.0/QROOT))+0.5); - } - } -} - -static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ - SnowContext *s = avctx->priv_data; - RangeCoder * const c= &s->c; - AVFrame *pict = data; - const int width= s->avctx->width; - const int height= s->avctx->height; - int level, orientation, plane_index, i, y; - uint8_t rc_header_bak[sizeof(s->header_state)]; - uint8_t rc_block_bak[sizeof(s->block_state)]; - - ff_init_range_encoder(c, buf, buf_size); - ff_build_rac_states(c, 0.05*(1LL<<32), 256-8); - - for(i=0; i<3; i++){ - int shift= !!i; - for(y=0; y<(height>>shift); y++) - memcpy(&s->input_picture.data[i][y * s->input_picture.linesize[i]], - &pict->data[i][y * pict->linesize[i]], - width>>shift); - } - s->new_picture = *pict; - - s->m.picture_number= avctx->frame_number; - if(avctx->flags&CODEC_FLAG_PASS2){ - s->m.pict_type = - pict->pict_type= s->m.rc_context.entry[avctx->frame_number].new_pict_type; - s->keyframe= pict->pict_type==AV_PICTURE_TYPE_I; - if(!(avctx->flags&CODEC_FLAG_QSCALE)) { - pict->quality= ff_rate_estimate_qscale(&s->m, 0); - if (pict->quality < 0) - return -1; - } - }else{ - s->keyframe= avctx->gop_size==0 || avctx->frame_number % avctx->gop_size == 0; - s->m.pict_type= - pict->pict_type= s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; - } - - if(s->pass1_rc && avctx->frame_number == 0) - pict->quality= 2*FF_QP2LAMBDA; - if(pict->quality){ - s->qlog= qscale2qlog(pict->quality); - s->lambda = pict->quality * 3/2; - } - if(s->qlog < 0 || (!pict->quality && (avctx->flags & CODEC_FLAG_QSCALE))){ - s->qlog= LOSSLESS_QLOG; - s->lambda = 0; - }//else keep previous frame's qlog until after motion estimation - - frame_start(s); - - s->m.current_picture_ptr= &s->m.current_picture; - s->m.last_picture.pts= s->m.current_picture.pts; - s->m.current_picture.pts= pict->pts; - if(pict->pict_type == AV_PICTURE_TYPE_P){ - int block_width = (width +15)>>4; - int block_height= (height+15)>>4; - int stride= s->current_picture.linesize[0]; - - assert(s->current_picture.data[0]); - assert(s->last_picture[0].data[0]); - - s->m.avctx= s->avctx; - s->m.current_picture.data[0]= s->current_picture.data[0]; - s->m. last_picture.data[0]= s->last_picture[0].data[0]; - s->m. new_picture.data[0]= s-> input_picture.data[0]; - s->m. last_picture_ptr= &s->m. last_picture; - s->m.linesize= - s->m. last_picture.linesize[0]= - s->m. new_picture.linesize[0]= - s->m.current_picture.linesize[0]= stride; - s->m.uvlinesize= s->current_picture.linesize[1]; - s->m.width = width; - s->m.height= height; - s->m.mb_width = block_width; - s->m.mb_height= block_height; - s->m.mb_stride= s->m.mb_width+1; - s->m.b8_stride= 2*s->m.mb_width+1; - s->m.f_code=1; - s->m.pict_type= pict->pict_type; - s->m.me_method= s->avctx->me_method; - s->m.me.scene_change_score=0; - s->m.flags= s->avctx->flags; - s->m.quarter_sample= (s->avctx->flags & CODEC_FLAG_QPEL)!=0; - s->m.out_format= FMT_H263; - s->m.unrestricted_mv= 1; - - s->m.lambda = s->lambda; - s->m.qscale= (s->m.lambda*139 + FF_LAMBDA_SCALE*64) >> (FF_LAMBDA_SHIFT + 7); - s->lambda2= s->m.lambda2= (s->m.lambda*s->m.lambda + FF_LAMBDA_SCALE/2) >> FF_LAMBDA_SHIFT; - - s->m.dsp= s->dsp; //move - ff_init_me(&s->m); - s->dsp= s->m.dsp; - } - - if(s->pass1_rc){ - memcpy(rc_header_bak, s->header_state, sizeof(s->header_state)); - memcpy(rc_block_bak, s->block_state, sizeof(s->block_state)); - } - -redo_frame: - - if(pict->pict_type == AV_PICTURE_TYPE_I) - s->spatial_decomposition_count= 5; - else - s->spatial_decomposition_count= 5; - - s->m.pict_type = pict->pict_type; - s->qbias= pict->pict_type == AV_PICTURE_TYPE_P ? 2 : 0; - - common_init_after_header(avctx); - - if(s->last_spatial_decomposition_count != s->spatial_decomposition_count){ - for(plane_index=0; plane_index<3; plane_index++){ - calculate_visual_weight(s, &s->plane[plane_index]); - } - } - - encode_header(s); - s->m.misc_bits = 8*(s->c.bytestream - s->c.bytestream_start); - encode_blocks(s, 1); - s->m.mv_bits = 8*(s->c.bytestream - s->c.bytestream_start) - s->m.misc_bits; - - for(plane_index=0; plane_index<3; plane_index++){ - Plane *p= &s->plane[plane_index]; - int w= p->width; - int h= p->height; - int x, y; -// int bits= put_bits_count(&s->c.pb); - - if(!(avctx->flags2 & CODEC_FLAG2_MEMC_ONLY)){ - //FIXME optimize - if(pict->data[plane_index]) //FIXME gray hack - for(y=0; yspatial_idwt_buffer[y*w + x]= pict->data[plane_index][y*pict->linesize[plane_index] + x]<spatial_idwt_buffer, plane_index, 0); - - if( plane_index==0 - && pict->pict_type == AV_PICTURE_TYPE_P - && !(avctx->flags&CODEC_FLAG_PASS2) - && s->m.me.scene_change_score > s->avctx->scenechange_threshold){ - ff_init_range_encoder(c, buf, buf_size); - ff_build_rac_states(c, 0.05*(1LL<<32), 256-8); - pict->pict_type= AV_PICTURE_TYPE_I; - s->keyframe=1; - s->current_picture.key_frame=1; - goto redo_frame; - } - - if(s->qlog == LOSSLESS_QLOG){ - for(y=0; yspatial_dwt_buffer[y*w + x]= (s->spatial_idwt_buffer[y*w + x] + (1<<(FRAC_BITS-1))-1)>>FRAC_BITS; - } - } - }else{ - for(y=0; yspatial_dwt_buffer[y*w + x]=s->spatial_idwt_buffer[y*w + x]<spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type); - else*/ - ff_spatial_dwt(s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count); - - if(s->pass1_rc && plane_index==0){ - int delta_qlog = ratecontrol_1pass(s, pict); - if (delta_qlog <= INT_MIN) - return -1; - if(delta_qlog){ - //reordering qlog in the bitstream would eliminate this reset - ff_init_range_encoder(c, buf, buf_size); - memcpy(s->header_state, rc_header_bak, sizeof(s->header_state)); - memcpy(s->block_state, rc_block_bak, sizeof(s->block_state)); - encode_header(s); - encode_blocks(s, 0); - } - } - - for(level=0; levelspatial_decomposition_count; level++){ - for(orientation=level ? 1 : 0; orientation<4; orientation++){ - SubBand *b= &p->band[level][orientation]; - - if(!QUANTIZE2) - quantize(s, b, b->ibuf, b->buf, b->stride, s->qbias); - if(orientation==0) - decorrelate(s, b, b->ibuf, b->stride, pict->pict_type == AV_PICTURE_TYPE_P, 0); - encode_subband(s, b, b->ibuf, b->parent ? b->parent->ibuf : NULL, b->stride, orientation); - assert(b->parent==NULL || b->parent->stride == b->stride*2); - if(orientation==0) - correlate(s, b, b->ibuf, b->stride, 1, 0); - } - } - - for(level=0; levelspatial_decomposition_count; level++){ - for(orientation=level ? 1 : 0; orientation<4; orientation++){ - SubBand *b= &p->band[level][orientation]; - - dequantize(s, b, b->ibuf, b->stride); - } - } - - ff_spatial_idwt(s->spatial_idwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count); - if(s->qlog == LOSSLESS_QLOG){ - for(y=0; yspatial_idwt_buffer[y*w + x]<<=FRAC_BITS; - } - } - } - predict_plane(s, s->spatial_idwt_buffer, plane_index, 1); - }else{ - //ME/MC only - if(pict->pict_type == AV_PICTURE_TYPE_I){ - for(y=0; ycurrent_picture.data[plane_index][y*s->current_picture.linesize[plane_index] + x]= - pict->data[plane_index][y*pict->linesize[plane_index] + x]; - } - } - }else{ - memset(s->spatial_idwt_buffer, 0, sizeof(IDWTELEM)*w*h); - predict_plane(s, s->spatial_idwt_buffer, plane_index, 1); - } - } - if(s->avctx->flags&CODEC_FLAG_PSNR){ - int64_t error= 0; - - if(pict->data[plane_index]) //FIXME gray hack - for(y=0; ycurrent_picture.data[plane_index][y*s->current_picture.linesize[plane_index] + x] - pict->data[plane_index][y*pict->linesize[plane_index] + x]; - error += d*d; - } - } - s->avctx->error[plane_index] += error; - s->current_picture.error[plane_index] = error; - } - - } - - update_last_header_values(s); - - release_buffer(avctx); - - s->current_picture.coded_picture_number = avctx->frame_number; - s->current_picture.pict_type = pict->pict_type; - s->current_picture.quality = pict->quality; - s->m.frame_bits = 8*(s->c.bytestream - s->c.bytestream_start); - s->m.p_tex_bits = s->m.frame_bits - s->m.misc_bits - s->m.mv_bits; - s->m.current_picture.display_picture_number = - s->m.current_picture.coded_picture_number = avctx->frame_number; - s->m.current_picture.quality = pict->quality; - s->m.total_bits += 8*(s->c.bytestream - s->c.bytestream_start); - if(s->pass1_rc) - if (ff_rate_estimate_qscale(&s->m, 0) < 0) - return -1; - if(avctx->flags&CODEC_FLAG_PASS1) - ff_write_pass1_stats(&s->m); - s->m.last_pict_type = s->m.pict_type; - avctx->frame_bits = s->m.frame_bits; - avctx->mv_bits = s->m.mv_bits; - avctx->misc_bits = s->m.misc_bits; - avctx->p_tex_bits = s->m.p_tex_bits; - - emms_c(); - - return ff_rac_terminate(c); -} - -static av_cold int encode_end(AVCodecContext *avctx) -{ - SnowContext *s = avctx->priv_data; - - common_end(s); - if (s->input_picture.data[0]) - avctx->release_buffer(avctx, &s->input_picture); - av_free(avctx->stats_out); - - return 0; -} - -AVCodec ff_snow_encoder = { - "snow", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_SNOW, - sizeof(SnowContext), - encode_init, - encode_frame, - encode_end, - .long_name = NULL_IF_CONFIG_SMALL("Snow"), -}; -#endif - - -#ifdef TEST -#undef malloc -#undef free -#undef printf - -#include "libavutil/lfg.h" - -int main(void){ - int width=256; - int height=256; - int buffer[2][width*height]; - SnowContext s; - int i; - AVLFG prng; - s.spatial_decomposition_count=6; - s.spatial_decomposition_type=1; - - av_lfg_init(&prng, 1); - - printf("testing 5/3 DWT\n"); - for(i=0; i20) printf("fsck: %6d %12d %7d\n",i, buffer[0][i], buffer[1][i]); - -#if 0 - printf("testing AC coder\n"); - memset(s.header_state, 0, sizeof(s.header_state)); - ff_init_range_encoder(&s.c, buffer[0], 256*256); - ff_init_cabac_states(&s.c, ff_h264_lps_range, ff_h264_mps_state, ff_h264_lps_state, 64); - - for(i=-256; i<256; i++){ - put_symbol(&s.c, s.header_state, i*i*i/3*FFABS(i), 1); - } - ff_rac_terminate(&s.c); - - memset(s.header_state, 0, sizeof(s.header_state)); - ff_init_range_decoder(&s.c, buffer[0], 256*256); - ff_init_cabac_states(&s.c, ff_h264_lps_range, ff_h264_mps_state, ff_h264_lps_state, 64); - - for(i=-256; i<256; i++){ - int j; - j= get_symbol(&s.c, s.header_state, 1); - if(j!=i*i*i/3*FFABS(i)) printf("fsck: %d != %d\n", i, j); - } -#endif - { - int level, orientation, x, y; - int64_t errors[8][4]; - int64_t g=0; - - memset(errors, 0, sizeof(errors)); - s.spatial_decomposition_count=3; - s.spatial_decomposition_type=0; - for(level=0; level> (s.spatial_decomposition_count-level); - int h= height >> (s.spatial_decomposition_count-level); - int stride= width << (s.spatial_decomposition_count-level); - DWTELEM *buf= buffer[0]; - int64_t error=0; - - if(orientation&1) buf+=w; - if(orientation>1) buf+=stride>>1; - - memset(buffer[0], 0, sizeof(int)*width*height); - buf[w/2 + h/2*stride]= 256*256; - ff_spatial_idwt(buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count); - for(y=0; y> (s.spatial_decomposition_count-level); - //int h= height >> (s.spatial_decomposition_count-level); - int stride= width << (s.spatial_decomposition_count-level); - DWTELEM *buf= buffer[0]; - int64_t error=0; - - buf+=w; - buf+=stride>>1; - - memset(buffer[0], 0, sizeof(int)*width*height); -#if 1 - for(y=0; y + * Copyright (C) 2006 Robert Edele + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SNOWDATA_H +#define AVCODEC_SNOWDATA_H + +#include "snow.h" + +static const uint8_t obmc32[1024]={ + 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, + 0, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 20, 20, 20, 16, 16, 16, 12, 12, 8, 8, 8, 4, 4, 4, 0, + 0, 4, 8, 8, 12, 12, 16, 20, 20, 24, 28, 28, 32, 32, 36, 40, 40, 36, 32, 32, 28, 28, 24, 20, 20, 16, 12, 12, 8, 8, 4, 0, + 0, 4, 8, 12, 16, 20, 24, 28, 28, 32, 36, 40, 44, 48, 52, 56, 56, 52, 48, 44, 40, 36, 32, 28, 28, 24, 20, 16, 12, 8, 4, 0, + 4, 8, 12, 16, 20, 24, 28, 32, 40, 44, 48, 52, 56, 60, 64, 68, 68, 64, 60, 56, 52, 48, 44, 40, 32, 28, 24, 20, 16, 12, 8, 4, + 4, 8, 12, 20, 24, 32, 36, 40, 48, 52, 56, 64, 68, 76, 80, 84, 84, 80, 76, 68, 64, 56, 52, 48, 40, 36, 32, 24, 20, 12, 8, 4, + 4, 8, 16, 24, 28, 36, 44, 48, 56, 60, 68, 76, 80, 88, 96,100,100, 96, 88, 80, 76, 68, 60, 56, 48, 44, 36, 28, 24, 16, 8, 4, + 4, 12, 20, 28, 32, 40, 48, 56, 64, 72, 80, 88, 92,100,108,116,116,108,100, 92, 88, 80, 72, 64, 56, 48, 40, 32, 28, 20, 12, 4, + 4, 12, 20, 28, 40, 48, 56, 64, 72, 80, 88, 96,108,116,124,132,132,124,116,108, 96, 88, 80, 72, 64, 56, 48, 40, 28, 20, 12, 4, + 4, 16, 24, 32, 44, 52, 60, 72, 80, 92,100,108,120,128,136,148,148,136,128,120,108,100, 92, 80, 72, 60, 52, 44, 32, 24, 16, 4, + 4, 16, 28, 36, 48, 56, 68, 80, 88,100,112,120,132,140,152,164,164,152,140,132,120,112,100, 88, 80, 68, 56, 48, 36, 28, 16, 4, + 4, 16, 28, 40, 52, 64, 76, 88, 96,108,120,132,144,156,168,180,180,168,156,144,132,120,108, 96, 88, 76, 64, 52, 40, 28, 16, 4, + 8, 20, 32, 44, 56, 68, 80, 92,108,120,132,144,156,168,180,192,192,180,168,156,144,132,120,108, 92, 80, 68, 56, 44, 32, 20, 8, + 8, 20, 32, 48, 60, 76, 88,100,116,128,140,156,168,184,196,208,208,196,184,168,156,140,128,116,100, 88, 76, 60, 48, 32, 20, 8, + 8, 20, 36, 52, 64, 80, 96,108,124,136,152,168,180,196,212,224,224,212,196,180,168,152,136,124,108, 96, 80, 64, 52, 36, 20, 8, + 8, 24, 40, 56, 68, 84,100,116,132,148,164,180,192,208,224,240,240,224,208,192,180,164,148,132,116,100, 84, 68, 56, 40, 24, 8, + 8, 24, 40, 56, 68, 84,100,116,132,148,164,180,192,208,224,240,240,224,208,192,180,164,148,132,116,100, 84, 68, 56, 40, 24, 8, + 8, 20, 36, 52, 64, 80, 96,108,124,136,152,168,180,196,212,224,224,212,196,180,168,152,136,124,108, 96, 80, 64, 52, 36, 20, 8, + 8, 20, 32, 48, 60, 76, 88,100,116,128,140,156,168,184,196,208,208,196,184,168,156,140,128,116,100, 88, 76, 60, 48, 32, 20, 8, + 8, 20, 32, 44, 56, 68, 80, 92,108,120,132,144,156,168,180,192,192,180,168,156,144,132,120,108, 92, 80, 68, 56, 44, 32, 20, 8, + 4, 16, 28, 40, 52, 64, 76, 88, 96,108,120,132,144,156,168,180,180,168,156,144,132,120,108, 96, 88, 76, 64, 52, 40, 28, 16, 4, + 4, 16, 28, 36, 48, 56, 68, 80, 88,100,112,120,132,140,152,164,164,152,140,132,120,112,100, 88, 80, 68, 56, 48, 36, 28, 16, 4, + 4, 16, 24, 32, 44, 52, 60, 72, 80, 92,100,108,120,128,136,148,148,136,128,120,108,100, 92, 80, 72, 60, 52, 44, 32, 24, 16, 4, + 4, 12, 20, 28, 40, 48, 56, 64, 72, 80, 88, 96,108,116,124,132,132,124,116,108, 96, 88, 80, 72, 64, 56, 48, 40, 28, 20, 12, 4, + 4, 12, 20, 28, 32, 40, 48, 56, 64, 72, 80, 88, 92,100,108,116,116,108,100, 92, 88, 80, 72, 64, 56, 48, 40, 32, 28, 20, 12, 4, + 4, 8, 16, 24, 28, 36, 44, 48, 56, 60, 68, 76, 80, 88, 96,100,100, 96, 88, 80, 76, 68, 60, 56, 48, 44, 36, 28, 24, 16, 8, 4, + 4, 8, 12, 20, 24, 32, 36, 40, 48, 52, 56, 64, 68, 76, 80, 84, 84, 80, 76, 68, 64, 56, 52, 48, 40, 36, 32, 24, 20, 12, 8, 4, + 4, 8, 12, 16, 20, 24, 28, 32, 40, 44, 48, 52, 56, 60, 64, 68, 68, 64, 60, 56, 52, 48, 44, 40, 32, 28, 24, 20, 16, 12, 8, 4, + 0, 4, 8, 12, 16, 20, 24, 28, 28, 32, 36, 40, 44, 48, 52, 56, 56, 52, 48, 44, 40, 36, 32, 28, 28, 24, 20, 16, 12, 8, 4, 0, + 0, 4, 8, 8, 12, 12, 16, 20, 20, 24, 28, 28, 32, 32, 36, 40, 40, 36, 32, 32, 28, 28, 24, 20, 20, 16, 12, 12, 8, 8, 4, 0, + 0, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 20, 20, 20, 16, 16, 16, 12, 12, 8, 8, 8, 4, 4, 4, 0, + 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, + //error:0.000020 +}; +static const uint8_t obmc16[256]={ + 0, 4, 4, 8, 8, 12, 12, 16, 16, 12, 12, 8, 8, 4, 4, 0, + 4, 8, 16, 20, 28, 32, 40, 44, 44, 40, 32, 28, 20, 16, 8, 4, + 4, 16, 24, 36, 44, 56, 64, 76, 76, 64, 56, 44, 36, 24, 16, 4, + 8, 20, 36, 48, 64, 76, 92,104,104, 92, 76, 64, 48, 36, 20, 8, + 8, 28, 44, 64, 80,100,116,136,136,116,100, 80, 64, 44, 28, 8, + 12, 32, 56, 76,100,120,144,164,164,144,120,100, 76, 56, 32, 12, + 12, 40, 64, 92,116,144,168,196,196,168,144,116, 92, 64, 40, 12, + 16, 44, 76,104,136,164,196,224,224,196,164,136,104, 76, 44, 16, + 16, 44, 76,104,136,164,196,224,224,196,164,136,104, 76, 44, 16, + 12, 40, 64, 92,116,144,168,196,196,168,144,116, 92, 64, 40, 12, + 12, 32, 56, 76,100,120,144,164,164,144,120,100, 76, 56, 32, 12, + 8, 28, 44, 64, 80,100,116,136,136,116,100, 80, 64, 44, 28, 8, + 8, 20, 36, 48, 64, 76, 92,104,104, 92, 76, 64, 48, 36, 20, 8, + 4, 16, 24, 36, 44, 56, 64, 76, 76, 64, 56, 44, 36, 24, 16, 4, + 4, 8, 16, 20, 28, 32, 40, 44, 44, 40, 32, 28, 20, 16, 8, 4, + 0, 4, 4, 8, 8, 12, 12, 16, 16, 12, 12, 8, 8, 4, 4, 0, +//error:0.000015 +}; + +//linear *64 +static const uint8_t obmc8[64]={ + 4, 12, 20, 28, 28, 20, 12, 4, + 12, 36, 60, 84, 84, 60, 36, 12, + 20, 60,100,140,140,100, 60, 20, + 28, 84,140,196,196,140, 84, 28, + 28, 84,140,196,196,140, 84, 28, + 20, 60,100,140,140,100, 60, 20, + 12, 36, 60, 84, 84, 60, 36, 12, + 4, 12, 20, 28, 28, 20, 12, 4, +//error:0.000000 +}; + +//linear *64 +static const uint8_t obmc4[16]={ + 16, 48, 48, 16, + 48,144,144, 48, + 48,144,144, 48, + 16, 48, 48, 16, +//error:0.000000 +}; + +const int8_t quant3bA[256]={ + 0, 0, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, +}; + +const uint8_t * const obmc_tab[4]= { + obmc32, obmc16, obmc8, obmc4 +}; + +/* runtime generated tables */ +uint8_t qexp[QROOT]; +int scale_mv_ref[MAX_REF_FRAMES][MAX_REF_FRAMES]; + + +#endif /* AVCODEC_SNOW_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/snowdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/snowdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/snowdec.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/snowdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,546 @@ +/* + * Copyright (C) 2004 Michael Niedermayer + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/intmath.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" +#include "avcodec.h" +#include "dsputil.h" +#include "dwt.h" +#include "snow.h" + +#include "rangecoder.h" +#include "mathops.h" + +#include "mpegvideo.h" +#include "h263.h" + +#undef NDEBUG +#include + +static av_always_inline void predict_slice_buffered(SnowContext *s, slice_buffer * sb, IDWTELEM * old_buffer, int plane_index, int add, int mb_y){ + Plane *p= &s->plane[plane_index]; + const int mb_w= s->b_width << s->block_max_depth; + const int mb_h= s->b_height << s->block_max_depth; + int x, y, mb_x; + int block_size = MB_SIZE >> s->block_max_depth; + int block_w = plane_index ? block_size/2 : block_size; + const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; + int obmc_stride= plane_index ? block_size : 2*block_size; + int ref_stride= s->current_picture.linesize[plane_index]; + uint8_t *dst8= s->current_picture.data[plane_index]; + int w= p->width; + int h= p->height; + + if(s->keyframe || (s->avctx->debug&512)){ + if(mb_y==mb_h) + return; + + if(add){ + for(y=block_w*mb_y; yline[y]; + for(x=0; x>= FRAC_BITS; + if(v&(~255)) v= ~(v>>31); + dst8[x + y*ref_stride]= v; + } + } + }else{ + for(y=block_w*mb_y; yline[y]; + for(x=0; xwidth; + int y; + const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); + int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); + int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; + int new_index = 0; + + if(b->ibuf == s->spatial_idwt_buffer || s->qlog == LOSSLESS_QLOG){ + qadd= 0; + qmul= 1<stride_line + b->buf_y_offset) + b->buf_x_offset; + memset(line, 0, b->width*sizeof(IDWTELEM)); + v = b->x_coeff[new_index].coeff; + x = b->x_coeff[new_index++].x; + while(x < w){ + register int t= ( (v>>1)*qmul + qadd)>>QEXPSHIFT; + register int u= -(v&1); + line[x] = (t^u) - u; + + v = b->x_coeff[new_index].coeff; + x = b->x_coeff[new_index++].x; + } + } + + /* Save our variables for the next slice. */ + save_state[0] = new_index; + + return; +} + +static void decode_q_branch(SnowContext *s, int level, int x, int y){ + const int w= s->b_width << s->block_max_depth; + const int rem_depth= s->block_max_depth - level; + const int index= (x + y*w) << rem_depth; + int trx= (x+1)<block[index-1] : &null_block; + const BlockNode *top = y ? &s->block[index-w] : &null_block; + const BlockNode *tl = y && x ? &s->block[index-w-1] : left; + const BlockNode *tr = y && trxblock[index-w+(1<level + 2*top->level + tl->level + tr->level; + + if(s->keyframe){ + set_blocks(s, level, x, y, null_block.color[0], null_block.color[1], null_block.color[2], null_block.mx, null_block.my, null_block.ref, BLOCK_INTRA); + return; + } + + if(level==s->block_max_depth || get_rac(&s->c, &s->block_state[4 + s_context])){ + int type, mx, my; + int l = left->color[0]; + int cb= left->color[1]; + int cr= left->color[2]; + int ref = 0; + int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref); + int mx_context= av_log2(2*FFABS(left->mx - top->mx)) + 0*av_log2(2*FFABS(tr->mx - top->mx)); + int my_context= av_log2(2*FFABS(left->my - top->my)) + 0*av_log2(2*FFABS(tr->my - top->my)); + + type= get_rac(&s->c, &s->block_state[1 + left->type + top->type]) ? BLOCK_INTRA : 0; + + if(type){ + pred_mv(s, &mx, &my, 0, left, top, tr); + l += get_symbol(&s->c, &s->block_state[32], 1); + cb+= get_symbol(&s->c, &s->block_state[64], 1); + cr+= get_symbol(&s->c, &s->block_state[96], 1); + }else{ + if(s->ref_frames > 1) + ref= get_symbol(&s->c, &s->block_state[128 + 1024 + 32*ref_context], 0); + pred_mv(s, &mx, &my, ref, left, top, tr); + mx+= get_symbol(&s->c, &s->block_state[128 + 32*(mx_context + 16*!!ref)], 1); + my+= get_symbol(&s->c, &s->block_state[128 + 32*(my_context + 16*!!ref)], 1); + } + set_blocks(s, level, x, y, l, cb, cr, mx, my, ref, type); + }else{ + decode_q_branch(s, level+1, 2*x+0, 2*y+0); + decode_q_branch(s, level+1, 2*x+1, 2*y+0); + decode_q_branch(s, level+1, 2*x+0, 2*y+1); + decode_q_branch(s, level+1, 2*x+1, 2*y+1); + } +} + +static void dequantize_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, IDWTELEM *src, int stride, int start_y, int end_y){ + const int w= b->width; + const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); + const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); + const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; + int x,y; + + if(s->qlog == LOSSLESS_QLOG) return; + + for(y=start_y; ystride_line) + b->buf_y_offset) + b->buf_x_offset; + for(x=0; x>(QEXPSHIFT)); //FIXME try different bias + }else if(i>0){ + line[x]= (( i*qmul + qadd)>>(QEXPSHIFT)); + } + } + } +} + +static void correlate_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, IDWTELEM *src, int stride, int inverse, int use_median, int start_y, int end_y){ + const int w= b->width; + int x,y; + + IDWTELEM * line=0; // silence silly "could be used without having been initialized" warning + IDWTELEM * prev; + + if (start_y != 0) + line = slice_buffer_get_line(sb, ((start_y - 1) * b->stride_line) + b->buf_y_offset) + b->buf_x_offset; + + for(y=start_y; ystride_line) + b->buf_y_offset) + b->buf_x_offset; + for(x=0; xspatial_decomposition_count; level++){ + for(orientation=level ? 1:0; orientation<4; orientation++){ + int q; + if (plane_index==2) q= s->plane[1].band[level][orientation].qlog; + else if(orientation==2) q= s->plane[plane_index].band[level][1].qlog; + else q= get_symbol(&s->c, s->header_state, 1); + s->plane[plane_index].band[level][orientation].qlog= q; + } + } + } +} + +#define GET_S(dst, check) \ + tmp= get_symbol(&s->c, s->header_state, 0);\ + if(!(check)){\ + av_log(s->avctx, AV_LOG_ERROR, "Error " #dst " is %d\n", tmp);\ + return -1;\ + }\ + dst= tmp; + +static int decode_header(SnowContext *s){ + int plane_index, tmp; + uint8_t kstate[32]; + + memset(kstate, MID_STATE, sizeof(kstate)); + + s->keyframe= get_rac(&s->c, kstate); + if(s->keyframe || s->always_reset){ + ff_snow_reset_contexts(s); + s->spatial_decomposition_type= + s->qlog= + s->qbias= + s->mv_scale= + s->block_max_depth= 0; + } + if(s->keyframe){ + GET_S(s->version, tmp <= 0U) + s->always_reset= get_rac(&s->c, s->header_state); + s->temporal_decomposition_type= get_symbol(&s->c, s->header_state, 0); + s->temporal_decomposition_count= get_symbol(&s->c, s->header_state, 0); + GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS) + s->colorspace_type= get_symbol(&s->c, s->header_state, 0); + s->chroma_h_shift= get_symbol(&s->c, s->header_state, 0); + s->chroma_v_shift= get_symbol(&s->c, s->header_state, 0); + s->spatial_scalability= get_rac(&s->c, s->header_state); +// s->rate_scalability= get_rac(&s->c, s->header_state); + GET_S(s->max_ref_frames, tmp < (unsigned)MAX_REF_FRAMES) + s->max_ref_frames++; + + decode_qlogs(s); + } + + if(!s->keyframe){ + if(get_rac(&s->c, s->header_state)){ + for(plane_index=0; plane_index<2; plane_index++){ + int htaps, i, sum=0; + Plane *p= &s->plane[plane_index]; + p->diag_mc= get_rac(&s->c, s->header_state); + htaps= get_symbol(&s->c, s->header_state, 0)*2 + 2; + if((unsigned)htaps > HTAPS_MAX || htaps==0) + return -1; + p->htaps= htaps; + for(i= htaps/2; i; i--){ + p->hcoeff[i]= get_symbol(&s->c, s->header_state, 0) * (1-2*(i&1)); + sum += p->hcoeff[i]; + } + p->hcoeff[0]= 32-sum; + } + s->plane[2].diag_mc= s->plane[1].diag_mc; + s->plane[2].htaps = s->plane[1].htaps; + memcpy(s->plane[2].hcoeff, s->plane[1].hcoeff, sizeof(s->plane[1].hcoeff)); + } + if(get_rac(&s->c, s->header_state)){ + GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS) + decode_qlogs(s); + } + } + + s->spatial_decomposition_type+= get_symbol(&s->c, s->header_state, 1); + if(s->spatial_decomposition_type > 1U){ + av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_type %d not supported", s->spatial_decomposition_type); + return -1; + } + if(FFMIN(s->avctx-> width>>s->chroma_h_shift, + s->avctx->height>>s->chroma_v_shift) >> (s->spatial_decomposition_count-1) <= 0){ + av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_count %d too large for size", s->spatial_decomposition_count); + return -1; + } + + s->qlog += get_symbol(&s->c, s->header_state, 1); + s->mv_scale += get_symbol(&s->c, s->header_state, 1); + s->qbias += get_symbol(&s->c, s->header_state, 1); + s->block_max_depth+= get_symbol(&s->c, s->header_state, 1); + if(s->block_max_depth > 1 || s->block_max_depth < 0){ + av_log(s->avctx, AV_LOG_ERROR, "block_max_depth= %d is too large", s->block_max_depth); + s->block_max_depth= 0; + return -1; + } + + return 0; +} + +static av_cold int decode_init(AVCodecContext *avctx) +{ + avctx->pix_fmt= PIX_FMT_YUV420P; + + ff_snow_common_init(avctx); + + return 0; +} + +static void decode_blocks(SnowContext *s){ + int x, y; + int w= s->b_width; + int h= s->b_height; + + for(y=0; ydata; + int buf_size = avpkt->size; + SnowContext *s = avctx->priv_data; + RangeCoder * const c= &s->c; + int bytes_read; + AVFrame *picture = data; + int level, orientation, plane_index; + + ff_init_range_decoder(c, buf, buf_size); + ff_build_rac_states(c, 0.05*(1LL<<32), 256-8); + + s->current_picture.pict_type= AV_PICTURE_TYPE_I; //FIXME I vs. P + if(decode_header(s)<0) + return -1; + ff_snow_common_init_after_header(avctx); + + // realloc slice buffer for the case that spatial_decomposition_count changed + ff_slice_buffer_destroy(&s->sb); + ff_slice_buffer_init(&s->sb, s->plane[0].height, (MB_SIZE >> s->block_max_depth) + s->spatial_decomposition_count * 8 + 1, s->plane[0].width, s->spatial_idwt_buffer); + + for(plane_index=0; plane_index<3; plane_index++){ + Plane *p= &s->plane[plane_index]; + p->fast_mc= p->diag_mc && p->htaps==6 && p->hcoeff[0]==40 + && p->hcoeff[1]==-10 + && p->hcoeff[2]==2; + } + + ff_snow_alloc_blocks(s); + + if(ff_snow_frame_start(s) < 0) + return -1; + //keyframe flag duplication mess FIXME + if(avctx->debug&FF_DEBUG_PICT_INFO) + av_log(avctx, AV_LOG_ERROR, "keyframe:%d qlog:%d\n", s->keyframe, s->qlog); + + decode_blocks(s); + + for(plane_index=0; plane_index<3; plane_index++){ + Plane *p= &s->plane[plane_index]; + int w= p->width; + int h= p->height; + int x, y; + int decode_state[MAX_DECOMPOSITIONS][4][1]; /* Stored state info for unpack_coeffs. 1 variable per instance. */ + + if(s->avctx->debug&2048){ + memset(s->spatial_dwt_buffer, 0, sizeof(DWTELEM)*w*h); + predict_plane(s, s->spatial_idwt_buffer, plane_index, 1); + + for(y=0; ycurrent_picture.data[plane_index][y*s->current_picture.linesize[plane_index] + x]; + s->mconly_picture.data[plane_index][y*s->mconly_picture.linesize[plane_index] + x]= v; + } + } + } + + { + for(level=0; levelspatial_decomposition_count; level++){ + for(orientation=level ? 1 : 0; orientation<4; orientation++){ + SubBand *b= &p->band[level][orientation]; + unpack_coeffs(s, b, b->parent, orientation); + } + } + } + + { + const int mb_h= s->b_height << s->block_max_depth; + const int block_size = MB_SIZE >> s->block_max_depth; + const int block_w = plane_index ? block_size/2 : block_size; + int mb_y; + DWTCompose cs[MAX_DECOMPOSITIONS]; + int yd=0, yq=0; + int y; + int end_y; + + ff_spatial_idwt_buffered_init(cs, &s->sb, w, h, 1, s->spatial_decomposition_type, s->spatial_decomposition_count); + for(mb_y=0; mb_y<=mb_h; mb_y++){ + + int slice_starty = block_w*mb_y; + int slice_h = block_w*(mb_y+1); + if (!(s->keyframe || s->avctx->debug&512)){ + slice_starty = FFMAX(0, slice_starty - (block_w >> 1)); + slice_h -= (block_w >> 1); + } + + for(level=0; levelspatial_decomposition_count; level++){ + for(orientation=level ? 1 : 0; orientation<4; orientation++){ + SubBand *b= &p->band[level][orientation]; + int start_y; + int end_y; + int our_mb_start = mb_y; + int our_mb_end = (mb_y + 1); + const int extra= 3; + start_y = (mb_y ? ((block_w * our_mb_start) >> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + extra: 0); + end_y = (((block_w * our_mb_end) >> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + extra); + if (!(s->keyframe || s->avctx->debug&512)){ + start_y = FFMAX(0, start_y - (block_w >> (1+s->spatial_decomposition_count - level))); + end_y = FFMAX(0, end_y - (block_w >> (1+s->spatial_decomposition_count - level))); + } + start_y = FFMIN(b->height, start_y); + end_y = FFMIN(b->height, end_y); + + if (start_y != end_y){ + if (orientation == 0){ + SubBand * correlate_band = &p->band[0][0]; + int correlate_end_y = FFMIN(b->height, end_y + 1); + int correlate_start_y = FFMIN(b->height, (start_y ? start_y + 1 : 0)); + decode_subband_slice_buffered(s, correlate_band, &s->sb, correlate_start_y, correlate_end_y, decode_state[0][0]); + correlate_slice_buffered(s, &s->sb, correlate_band, correlate_band->ibuf, correlate_band->stride, 1, 0, correlate_start_y, correlate_end_y); + dequantize_slice_buffered(s, &s->sb, correlate_band, correlate_band->ibuf, correlate_band->stride, start_y, end_y); + } + else + decode_subband_slice_buffered(s, b, &s->sb, start_y, end_y, decode_state[level][orientation]); + } + } + } + + for(; yddwt, cs, &s->sb, w, h, 1, s->spatial_decomposition_type, s->spatial_decomposition_count, yd); + } + + if(s->qlog == LOSSLESS_QLOG){ + for(; yqsb, yq); + for(x=0; xsb, s->spatial_idwt_buffer, plane_index, 1, mb_y); + + y = FFMIN(p->height, slice_starty); + end_y = FFMIN(p->height, slice_h); + while(y < end_y) + ff_slice_buffer_release(&s->sb, y++); + } + + ff_slice_buffer_flush(&s->sb); + } + + } + + emms_c(); + + ff_snow_release_buffer(avctx); + + if(!(s->avctx->debug&2048)) + *picture= s->current_picture; + else + *picture= s->mconly_picture; + + *data_size = sizeof(AVFrame); + + bytes_read= c->bytestream - c->bytestream_start; + if(bytes_read ==0) av_log(s->avctx, AV_LOG_ERROR, "error at end of frame\n"); //FIXME + + return bytes_read; +} + +static av_cold int decode_end(AVCodecContext *avctx) +{ + SnowContext *s = avctx->priv_data; + + ff_slice_buffer_destroy(&s->sb); + + ff_snow_common_end(s); + + return 0; +} + +AVCodec ff_snow_decoder = { + .name = "snow", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_SNOW, + .priv_data_size = sizeof(SnowContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/, + .long_name = NULL_IF_CONFIG_SMALL("Snow"), +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/snowenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/snowenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/snowenc.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/snowenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,1917 @@ +/* + * Copyright (C) 2004 Michael Niedermayer + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/intmath.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" +#include "avcodec.h" +#include "dsputil.h" +#include "dwt.h" +#include "snow.h" + +#include "rangecoder.h" +#include "mathops.h" + +#include "mpegvideo.h" +#include "h263.h" + +#undef NDEBUG +#include + +#define QUANTIZE2 0 + +#if QUANTIZE2==1 +#define Q2_STEP 8 + +static void find_sse(SnowContext *s, Plane *p, int *score, int score_stride, IDWTELEM *r0, IDWTELEM *r1, int level, int orientation){ + SubBand *b= &p->band[level][orientation]; + int x, y; + int xo=0; + int yo=0; + int step= 1 << (s->spatial_decomposition_count - level); + + if(orientation&1) + xo= step>>1; + if(orientation&2) + yo= step>>1; + + //FIXME bias for nonzero ? + //FIXME optimize + memset(score, 0, sizeof(*score)*score_stride*((p->height + Q2_STEP-1)/Q2_STEP)); + for(y=0; yheight; y++){ + for(x=0; xwidth; x++){ + int sx= (x-xo + step/2) / step / Q2_STEP; + int sy= (y-yo + step/2) / step / Q2_STEP; + int v= r0[x + y*p->width] - r1[x + y*p->width]; + assert(sx>=0 && sy>=0 && sx < score_stride); + v= ((v+8)>>4)<<4; + score[sx + sy*score_stride] += v*v; + assert(score[sx + sy*score_stride] >= 0); + } + } +} + +static void dequantize_all(SnowContext *s, Plane *p, IDWTELEM *buffer, int width, int height){ + int level, orientation; + + for(level=0; levelspatial_decomposition_count; level++){ + for(orientation=level ? 1 : 0; orientation<4; orientation++){ + SubBand *b= &p->band[level][orientation]; + IDWTELEM *dst= buffer + (b->ibuf - s->spatial_idwt_buffer); + + dequantize(s, b, dst, b->stride); + } + } +} + +static void dwt_quantize(SnowContext *s, Plane *p, DWTELEM *buffer, int width, int height, int stride, int type){ + int level, orientation, ys, xs, x, y, pass; + IDWTELEM best_dequant[height * stride]; + IDWTELEM idwt2_buffer[height * stride]; + const int score_stride= (width + 10)/Q2_STEP; + int best_score[(width + 10)/Q2_STEP * (height + 10)/Q2_STEP]; //FIXME size + int score[(width + 10)/Q2_STEP * (height + 10)/Q2_STEP]; //FIXME size + int threshold= (s->m.lambda * s->m.lambda) >> 6; + + //FIXME pass the copy cleanly ? + +// memcpy(dwt_buffer, buffer, height * stride * sizeof(DWTELEM)); + ff_spatial_dwt(buffer, width, height, stride, type, s->spatial_decomposition_count); + + for(level=0; levelspatial_decomposition_count; level++){ + for(orientation=level ? 1 : 0; orientation<4; orientation++){ + SubBand *b= &p->band[level][orientation]; + IDWTELEM *dst= best_dequant + (b->ibuf - s->spatial_idwt_buffer); + DWTELEM *src= buffer + (b-> buf - s->spatial_dwt_buffer); + assert(src == b->buf); // code does not depend on this but it is true currently + + quantize(s, b, dst, src, b->stride, s->qbias); + } + } + for(pass=0; pass<1; pass++){ + if(s->qbias == 0) //keyframe + continue; + for(level=0; levelspatial_decomposition_count; level++){ + for(orientation=level ? 1 : 0; orientation<4; orientation++){ + SubBand *b= &p->band[level][orientation]; + IDWTELEM *dst= idwt2_buffer + (b->ibuf - s->spatial_idwt_buffer); + IDWTELEM *best_dst= best_dequant + (b->ibuf - s->spatial_idwt_buffer); + + for(ys= 0; ysspatial_decomposition_count); + find_sse(s, p, best_score, score_stride, idwt2_buffer, s->spatial_idwt_buffer, level, orientation); + memcpy(idwt2_buffer, best_dequant, height * stride * sizeof(IDWTELEM)); + for(y=ys; yheight; y+= Q2_STEP){ + for(x=xs; xwidth; x+= Q2_STEP){ + if(dst[x + y*b->stride]<0) dst[x + y*b->stride]++; + if(dst[x + y*b->stride]>0) dst[x + y*b->stride]--; + //FIXME try more than just -- + } + } + dequantize_all(s, p, idwt2_buffer, width, height); + ff_spatial_idwt(idwt2_buffer, width, height, stride, type, s->spatial_decomposition_count); + find_sse(s, p, score, score_stride, idwt2_buffer, s->spatial_idwt_buffer, level, orientation); + for(y=ys; yheight; y+= Q2_STEP){ + for(x=xs; xwidth; x+= Q2_STEP){ + int score_idx= x/Q2_STEP + (y/Q2_STEP)*score_stride; + if(score[score_idx] <= best_score[score_idx] + threshold){ + best_score[score_idx]= score[score_idx]; + if(best_dst[x + y*b->stride]<0) best_dst[x + y*b->stride]++; + if(best_dst[x + y*b->stride]>0) best_dst[x + y*b->stride]--; + //FIXME copy instead + } + } + } + } + } + } + } + } + memcpy(s->spatial_idwt_buffer, best_dequant, height * stride * sizeof(IDWTELEM)); //FIXME work with that directly instead of copy at the end +} + +#endif /* QUANTIZE2==1 */ + +#if CONFIG_SNOW_ENCODER +static av_cold int encode_init(AVCodecContext *avctx) +{ + SnowContext *s = avctx->priv_data; + int plane_index; + + if(avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL){ + av_log(avctx, AV_LOG_ERROR, "This codec is under development, files encoded with it may not be decodable with future versions!!!\n" + "Use vstrict=-2 / -strict -2 to use it anyway.\n"); + return -1; + } + + if(avctx->prediction_method == DWT_97 + && (avctx->flags & CODEC_FLAG_QSCALE) + && avctx->global_quality == 0){ + av_log(avctx, AV_LOG_ERROR, "The 9/7 wavelet is incompatible with lossless mode.\n"); + return -1; + } + + s->spatial_decomposition_type= avctx->prediction_method; //FIXME add decorrelator type r transform_type + + s->mv_scale = (avctx->flags & CODEC_FLAG_QPEL) ? 2 : 4; + s->block_max_depth= (avctx->flags & CODEC_FLAG_4MV ) ? 1 : 0; + + for(plane_index=0; plane_index<3; plane_index++){ + s->plane[plane_index].diag_mc= 1; + s->plane[plane_index].htaps= 6; + s->plane[plane_index].hcoeff[0]= 40; + s->plane[plane_index].hcoeff[1]= -10; + s->plane[plane_index].hcoeff[2]= 2; + s->plane[plane_index].fast_mc= 1; + } + + ff_snow_common_init(avctx); + ff_snow_alloc_blocks(s); + + s->version=0; + + s->m.avctx = avctx; + s->m.flags = avctx->flags; + s->m.bit_rate= avctx->bit_rate; + + s->m.me.temp = + s->m.me.scratchpad= av_mallocz((avctx->width+64)*2*16*2*sizeof(uint8_t)); + s->m.me.map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t)); + s->m.me.score_map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t)); + s->m.obmc_scratchpad= av_mallocz(MB_SIZE*MB_SIZE*12*sizeof(uint32_t)); + h263_encode_init(&s->m); //mv_penalty + + s->max_ref_frames = FFMAX(FFMIN(avctx->refs, MAX_REF_FRAMES), 1); + + if(avctx->flags&CODEC_FLAG_PASS1){ + if(!avctx->stats_out) + avctx->stats_out = av_mallocz(256); + } + if((avctx->flags&CODEC_FLAG_PASS2) || !(avctx->flags&CODEC_FLAG_QSCALE)){ + if(ff_rate_control_init(&s->m) < 0) + return -1; + } + s->pass1_rc= !(avctx->flags & (CODEC_FLAG_QSCALE|CODEC_FLAG_PASS2)); + + avctx->coded_frame= &s->current_picture; + switch(avctx->pix_fmt){ +// case PIX_FMT_YUV444P: +// case PIX_FMT_YUV422P: + case PIX_FMT_YUV420P: + case PIX_FMT_GRAY8: +// case PIX_FMT_YUV411P: +// case PIX_FMT_YUV410P: + s->colorspace_type= 0; + break; +/* case PIX_FMT_RGB32: + s->colorspace= 1; + break;*/ + default: + av_log(avctx, AV_LOG_ERROR, "pixel format not supported\n"); + return -1; + } +// avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift); + s->chroma_h_shift= 1; + s->chroma_v_shift= 1; + + ff_set_cmp(&s->dsp, s->dsp.me_cmp, s->avctx->me_cmp); + ff_set_cmp(&s->dsp, s->dsp.me_sub_cmp, s->avctx->me_sub_cmp); + + s->avctx->get_buffer(s->avctx, &s->input_picture); + + if(s->avctx->me_method == ME_ITER){ + int i; + int size= s->b_width * s->b_height << 2*s->block_max_depth; + for(i=0; imax_ref_frames; i++){ + s->ref_mvs[i]= av_mallocz(size*sizeof(int16_t[2])); + s->ref_scores[i]= av_mallocz(size*sizeof(uint32_t)); + } + } + + return 0; +} + +//near copy & paste from dsputil, FIXME +static int pix_sum(uint8_t * pix, int line_size, int w) +{ + int s, i, j; + + s = 0; + for (i = 0; i < w; i++) { + for (j = 0; j < w; j++) { + s += pix[0]; + pix ++; + } + pix += line_size - w; + } + return s; +} + +//near copy & paste from dsputil, FIXME +static int pix_norm1(uint8_t * pix, int line_size, int w) +{ + int s, i, j; + uint32_t *sq = ff_squareTbl + 256; + + s = 0; + for (i = 0; i < w; i++) { + for (j = 0; j < w; j ++) { + s += sq[pix[0]]; + pix ++; + } + pix += line_size - w; + } + return s; +} + +//FIXME copy&paste +#define P_LEFT P[1] +#define P_TOP P[2] +#define P_TOPRIGHT P[3] +#define P_MEDIAN P[4] +#define P_MV1 P[9] +#define FLAG_QPEL 1 //must be 1 + +static int encode_q_branch(SnowContext *s, int level, int x, int y){ + uint8_t p_buffer[1024]; + uint8_t i_buffer[1024]; + uint8_t p_state[sizeof(s->block_state)]; + uint8_t i_state[sizeof(s->block_state)]; + RangeCoder pc, ic; + uint8_t *pbbak= s->c.bytestream; + uint8_t *pbbak_start= s->c.bytestream_start; + int score, score2, iscore, i_len, p_len, block_s, sum, base_bits; + const int w= s->b_width << s->block_max_depth; + const int h= s->b_height << s->block_max_depth; + const int rem_depth= s->block_max_depth - level; + const int index= (x + y*w) << rem_depth; + const int block_w= 1<<(LOG2_MB_SIZE - level); + int trx= (x+1)<block[index-1] : &null_block; + const BlockNode *top = y ? &s->block[index-w] : &null_block; + const BlockNode *right = trxblock[index+1] : &null_block; + const BlockNode *bottom= tryblock[index+w] : &null_block; + const BlockNode *tl = y && x ? &s->block[index-w-1] : left; + const BlockNode *tr = y && trxblock[index-w+(1<color[0]; + int pcb= left->color[1]; + int pcr= left->color[2]; + int pmx, pmy; + int mx=0, my=0; + int l,cr,cb; + const int stride= s->current_picture.linesize[0]; + const int uvstride= s->current_picture.linesize[1]; + uint8_t *current_data[3]= { s->input_picture.data[0] + (x + y* stride)*block_w, + s->input_picture.data[1] + (x + y*uvstride)*block_w/2, + s->input_picture.data[2] + (x + y*uvstride)*block_w/2}; + int P[10][2]; + int16_t last_mv[3][2]; + int qpel= !!(s->avctx->flags & CODEC_FLAG_QPEL); //unused + const int shift= 1+qpel; + MotionEstContext *c= &s->m.me; + int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref); + int mx_context= av_log2(2*FFABS(left->mx - top->mx)); + int my_context= av_log2(2*FFABS(left->my - top->my)); + int s_context= 2*left->level + 2*top->level + tl->level + tr->level; + int ref, best_ref, ref_score, ref_mx, ref_my; + + assert(sizeof(s->block_state) >= 256); + if(s->keyframe){ + set_blocks(s, level, x, y, pl, pcb, pcr, 0, 0, 0, BLOCK_INTRA); + return 0; + } + +// clip predictors / edge ? + + P_LEFT[0]= left->mx; + P_LEFT[1]= left->my; + P_TOP [0]= top->mx; + P_TOP [1]= top->my; + P_TOPRIGHT[0]= tr->mx; + P_TOPRIGHT[1]= tr->my; + + last_mv[0][0]= s->block[index].mx; + last_mv[0][1]= s->block[index].my; + last_mv[1][0]= right->mx; + last_mv[1][1]= right->my; + last_mv[2][0]= bottom->mx; + last_mv[2][1]= bottom->my; + + s->m.mb_stride=2; + s->m.mb_x= + s->m.mb_y= 0; + c->skip= 0; + + assert(c-> stride == stride); + assert(c->uvstride == uvstride); + + c->penalty_factor = get_penalty_factor(s->lambda, s->lambda2, c->avctx->me_cmp); + c->sub_penalty_factor= get_penalty_factor(s->lambda, s->lambda2, c->avctx->me_sub_cmp); + c->mb_penalty_factor = get_penalty_factor(s->lambda, s->lambda2, c->avctx->mb_cmp); + c->current_mv_penalty= c->mv_penalty[s->m.f_code=1] + MAX_MV; + + c->xmin = - x*block_w - 16+3; + c->ymin = - y*block_w - 16+3; + c->xmax = - (x+1)*block_w + (w<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-3; + c->ymax = - (y+1)*block_w + (h<<(LOG2_MB_SIZE - s->block_max_depth)) + 16-3; + + if(P_LEFT[0] > (c->xmax<xmax< (c->ymax<ymax< (c->xmax<xmax< (c->ymax<ymax<xmin<xmin< (c->xmax<xmax< (c->ymax<ymax<pred_x= P_LEFT[0]; + c->pred_y= P_LEFT[1]; + } else { + c->pred_x = P_MEDIAN[0]; + c->pred_y = P_MEDIAN[1]; + } + + score= INT_MAX; + best_ref= 0; + for(ref=0; refref_frames; ref++){ + init_ref(c, current_data, s->last_picture[ref].data, NULL, block_w*x, block_w*y, 0); + + ref_score= ff_epzs_motion_search(&s->m, &ref_mx, &ref_my, P, 0, /*ref_index*/ 0, last_mv, + (1<<16)>>shift, level-LOG2_MB_SIZE+4, block_w); + + assert(ref_mx >= c->xmin); + assert(ref_mx <= c->xmax); + assert(ref_my >= c->ymin); + assert(ref_my <= c->ymax); + + ref_score= c->sub_motion_search(&s->m, &ref_mx, &ref_my, ref_score, 0, 0, level-LOG2_MB_SIZE+4, block_w); + ref_score= ff_get_mb_score(&s->m, ref_mx, ref_my, 0, 0, level-LOG2_MB_SIZE+4, block_w, 0); + ref_score+= 2*av_log2(2*ref)*c->penalty_factor; + if(s->ref_mvs[ref]){ + s->ref_mvs[ref][index][0]= ref_mx; + s->ref_mvs[ref][index][1]= ref_my; + s->ref_scores[ref][index]= ref_score; + } + if(score > ref_score){ + score= ref_score; + best_ref= ref; + mx= ref_mx; + my= ref_my; + } + } + //FIXME if mb_cmp != SSE then intra cannot be compared currently and mb_penalty vs. lambda2 + + // subpel search + base_bits= get_rac_count(&s->c) - 8*(s->c.bytestream - s->c.bytestream_start); + pc= s->c; + pc.bytestream_start= + pc.bytestream= p_buffer; //FIXME end/start? and at the other stoo + memcpy(p_state, s->block_state, sizeof(s->block_state)); + + if(level!=s->block_max_depth) + put_rac(&pc, &p_state[4 + s_context], 1); + put_rac(&pc, &p_state[1 + left->type + top->type], 0); + if(s->ref_frames > 1) + put_symbol(&pc, &p_state[128 + 1024 + 32*ref_context], best_ref, 0); + pred_mv(s, &pmx, &pmy, best_ref, left, top, tr); + put_symbol(&pc, &p_state[128 + 32*(mx_context + 16*!!best_ref)], mx - pmx, 1); + put_symbol(&pc, &p_state[128 + 32*(my_context + 16*!!best_ref)], my - pmy, 1); + p_len= pc.bytestream - pc.bytestream_start; + score += (s->lambda2*(get_rac_count(&pc)-base_bits))>>FF_LAMBDA_SHIFT; + + block_s= block_w*block_w; + sum = pix_sum(current_data[0], stride, block_w); + l= (sum + block_s/2)/block_s; + iscore = pix_norm1(current_data[0], stride, block_w) - 2*l*sum + l*l*block_s; + + block_s= block_w*block_w>>2; + sum = pix_sum(current_data[1], uvstride, block_w>>1); + cb= (sum + block_s/2)/block_s; +// iscore += pix_norm1(¤t_mb[1][0], uvstride, block_w>>1) - 2*cb*sum + cb*cb*block_s; + sum = pix_sum(current_data[2], uvstride, block_w>>1); + cr= (sum + block_s/2)/block_s; +// iscore += pix_norm1(¤t_mb[2][0], uvstride, block_w>>1) - 2*cr*sum + cr*cr*block_s; + + ic= s->c; + ic.bytestream_start= + ic.bytestream= i_buffer; //FIXME end/start? and at the other stoo + memcpy(i_state, s->block_state, sizeof(s->block_state)); + if(level!=s->block_max_depth) + put_rac(&ic, &i_state[4 + s_context], 1); + put_rac(&ic, &i_state[1 + left->type + top->type], 1); + put_symbol(&ic, &i_state[32], l-pl , 1); + put_symbol(&ic, &i_state[64], cb-pcb, 1); + put_symbol(&ic, &i_state[96], cr-pcr, 1); + i_len= ic.bytestream - ic.bytestream_start; + iscore += (s->lambda2*(get_rac_count(&ic)-base_bits))>>FF_LAMBDA_SHIFT; + +// assert(score==256*256*256*64-1); + assert(iscore < 255*255*256 + s->lambda2*10); + assert(iscore >= 0); + assert(l>=0 && l<=255); + assert(pl>=0 && pl<=255); + + if(level==0){ + int varc= iscore >> 8; + int vard= score >> 8; + if (vard <= 64 || vard < varc) + c->scene_change_score+= ff_sqrt(vard) - ff_sqrt(varc); + else + c->scene_change_score+= s->m.qscale; + } + + if(level!=s->block_max_depth){ + put_rac(&s->c, &s->block_state[4 + s_context], 0); + score2 = encode_q_branch(s, level+1, 2*x+0, 2*y+0); + score2+= encode_q_branch(s, level+1, 2*x+1, 2*y+0); + score2+= encode_q_branch(s, level+1, 2*x+0, 2*y+1); + score2+= encode_q_branch(s, level+1, 2*x+1, 2*y+1); + score2+= s->lambda2>>FF_LAMBDA_SHIFT; //FIXME exact split overhead + + if(score2 < score && score2 < iscore) + return score2; + } + + if(iscore < score){ + pred_mv(s, &pmx, &pmy, 0, left, top, tr); + memcpy(pbbak, i_buffer, i_len); + s->c= ic; + s->c.bytestream_start= pbbak_start; + s->c.bytestream= pbbak + i_len; + set_blocks(s, level, x, y, l, cb, cr, pmx, pmy, 0, BLOCK_INTRA); + memcpy(s->block_state, i_state, sizeof(s->block_state)); + return iscore; + }else{ + memcpy(pbbak, p_buffer, p_len); + s->c= pc; + s->c.bytestream_start= pbbak_start; + s->c.bytestream= pbbak + p_len; + set_blocks(s, level, x, y, pl, pcb, pcr, mx, my, best_ref, 0); + memcpy(s->block_state, p_state, sizeof(s->block_state)); + return score; + } +} + +static void encode_q_branch2(SnowContext *s, int level, int x, int y){ + const int w= s->b_width << s->block_max_depth; + const int rem_depth= s->block_max_depth - level; + const int index= (x + y*w) << rem_depth; + int trx= (x+1)<block[index]; + const BlockNode *left = x ? &s->block[index-1] : &null_block; + const BlockNode *top = y ? &s->block[index-w] : &null_block; + const BlockNode *tl = y && x ? &s->block[index-w-1] : left; + const BlockNode *tr = y && trxblock[index-w+(1<color[0]; + int pcb= left->color[1]; + int pcr= left->color[2]; + int pmx, pmy; + int ref_context= av_log2(2*left->ref) + av_log2(2*top->ref); + int mx_context= av_log2(2*FFABS(left->mx - top->mx)) + 16*!!b->ref; + int my_context= av_log2(2*FFABS(left->my - top->my)) + 16*!!b->ref; + int s_context= 2*left->level + 2*top->level + tl->level + tr->level; + + if(s->keyframe){ + set_blocks(s, level, x, y, pl, pcb, pcr, 0, 0, 0, BLOCK_INTRA); + return; + } + + if(level!=s->block_max_depth){ + if(same_block(b,b+1) && same_block(b,b+w) && same_block(b,b+w+1)){ + put_rac(&s->c, &s->block_state[4 + s_context], 1); + }else{ + put_rac(&s->c, &s->block_state[4 + s_context], 0); + encode_q_branch2(s, level+1, 2*x+0, 2*y+0); + encode_q_branch2(s, level+1, 2*x+1, 2*y+0); + encode_q_branch2(s, level+1, 2*x+0, 2*y+1); + encode_q_branch2(s, level+1, 2*x+1, 2*y+1); + return; + } + } + if(b->type & BLOCK_INTRA){ + pred_mv(s, &pmx, &pmy, 0, left, top, tr); + put_rac(&s->c, &s->block_state[1 + (left->type&1) + (top->type&1)], 1); + put_symbol(&s->c, &s->block_state[32], b->color[0]-pl , 1); + put_symbol(&s->c, &s->block_state[64], b->color[1]-pcb, 1); + put_symbol(&s->c, &s->block_state[96], b->color[2]-pcr, 1); + set_blocks(s, level, x, y, b->color[0], b->color[1], b->color[2], pmx, pmy, 0, BLOCK_INTRA); + }else{ + pred_mv(s, &pmx, &pmy, b->ref, left, top, tr); + put_rac(&s->c, &s->block_state[1 + (left->type&1) + (top->type&1)], 0); + if(s->ref_frames > 1) + put_symbol(&s->c, &s->block_state[128 + 1024 + 32*ref_context], b->ref, 0); + put_symbol(&s->c, &s->block_state[128 + 32*mx_context], b->mx - pmx, 1); + put_symbol(&s->c, &s->block_state[128 + 32*my_context], b->my - pmy, 1); + set_blocks(s, level, x, y, pl, pcb, pcr, b->mx, b->my, b->ref, 0); + } +} + +static int get_dc(SnowContext *s, int mb_x, int mb_y, int plane_index){ + int i, x2, y2; + Plane *p= &s->plane[plane_index]; + const int block_size = MB_SIZE >> s->block_max_depth; + const int block_w = plane_index ? block_size/2 : block_size; + const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; + const int obmc_stride= plane_index ? block_size : 2*block_size; + const int ref_stride= s->current_picture.linesize[plane_index]; + uint8_t *src= s-> input_picture.data[plane_index]; + IDWTELEM *dst= (IDWTELEM*)s->m.obmc_scratchpad + plane_index*block_size*block_size*4; //FIXME change to unsigned + const int b_stride = s->b_width << s->block_max_depth; + const int w= p->width; + const int h= p->height; + int index= mb_x + mb_y*b_stride; + BlockNode *b= &s->block[index]; + BlockNode backup= *b; + int ab=0; + int aa=0; + + b->type|= BLOCK_INTRA; + b->color[plane_index]= 0; + memset(dst, 0, obmc_stride*obmc_stride*sizeof(IDWTELEM)); + + for(i=0; i<4; i++){ + int mb_x2= mb_x + (i &1) - 1; + int mb_y2= mb_y + (i>>1) - 1; + int x= block_w*mb_x2 + block_w/2; + int y= block_w*mb_y2 + block_w/2; + + add_yblock(s, 0, NULL, dst + ((i&1)+(i>>1)*obmc_stride)*block_w, NULL, obmc, + x, y, block_w, block_w, w, h, obmc_stride, ref_stride, obmc_stride, mb_x2, mb_y2, 0, 0, plane_index); + + for(y2= FFMAX(y, 0); y2h) obmc_v += obmc[index - block_w*obmc_stride]; + if(x+block_w>w) obmc_v += obmc[index - block_w]; + //FIXME precalculate this or simplify it somehow else + + d = -dst[index] + (1<<(FRAC_BITS-1)); + dst[index] = d; + ab += (src[x2 + y2*ref_stride] - (d>>FRAC_BITS)) * obmc_v; + aa += obmc_v * obmc_v; //FIXME precalculate this + } + } + } + *b= backup; + + return av_clip(((ab<b_width << s->block_max_depth; + const int b_height = s->b_height<< s->block_max_depth; + int index= x + y*b_stride; + const BlockNode *b = &s->block[index]; + const BlockNode *left = x ? &s->block[index-1] : &null_block; + const BlockNode *top = y ? &s->block[index-b_stride] : &null_block; + const BlockNode *tl = y && x ? &s->block[index-b_stride-1] : left; + const BlockNode *tr = y && x+wblock[index-b_stride+w] : tl; + int dmx, dmy; +// int mx_context= av_log2(2*FFABS(left->mx - top->mx)); +// int my_context= av_log2(2*FFABS(left->my - top->my)); + + if(x<0 || x>=b_stride || y>=b_height) + return 0; +/* +1 0 0 +01X 1-2 1 +001XX 3-6 2-3 +0001XXX 7-14 4-7 +00001XXXX 15-30 8-15 +*/ +//FIXME try accurate rate +//FIXME intra and inter predictors if surrounding blocks are not the same type + if(b->type & BLOCK_INTRA){ + return 3+2*( av_log2(2*FFABS(left->color[0] - b->color[0])) + + av_log2(2*FFABS(left->color[1] - b->color[1])) + + av_log2(2*FFABS(left->color[2] - b->color[2]))); + }else{ + pred_mv(s, &dmx, &dmy, b->ref, left, top, tr); + dmx-= b->mx; + dmy-= b->my; + return 2*(1 + av_log2(2*FFABS(dmx)) //FIXME kill the 2* can be merged in lambda + + av_log2(2*FFABS(dmy)) + + av_log2(2*b->ref)); + } +} + +static int get_block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index, const uint8_t *obmc_edged){ + Plane *p= &s->plane[plane_index]; + const int block_size = MB_SIZE >> s->block_max_depth; + const int block_w = plane_index ? block_size/2 : block_size; + const int obmc_stride= plane_index ? block_size : 2*block_size; + const int ref_stride= s->current_picture.linesize[plane_index]; + uint8_t *dst= s->current_picture.data[plane_index]; + uint8_t *src= s-> input_picture.data[plane_index]; + IDWTELEM *pred= (IDWTELEM*)s->m.obmc_scratchpad + plane_index*block_size*block_size*4; + uint8_t *cur = s->scratchbuf; + uint8_t tmp[ref_stride*(2*MB_SIZE+HTAPS_MAX-1)]; + const int b_stride = s->b_width << s->block_max_depth; + const int b_height = s->b_height<< s->block_max_depth; + const int w= p->width; + const int h= p->height; + int distortion; + int rate= 0; + const int penalty_factor= get_penalty_factor(s->lambda, s->lambda2, s->avctx->me_cmp); + int sx= block_w*mb_x - block_w/2; + int sy= block_w*mb_y - block_w/2; + int x0= FFMAX(0,-sx); + int y0= FFMAX(0,-sy); + int x1= FFMIN(block_w*2, w-sx); + int y1= FFMIN(block_w*2, h-sy); + int i,x,y; + + ff_snow_pred_block(s, cur, tmp, ref_stride, sx, sy, block_w*2, block_w*2, &s->block[mb_x + mb_y*b_stride], plane_index, w, h); + + for(y=y0; y= LOG2_OBMC_MAX + int v = (cur1[x] * obmc1[x]) << (FRAC_BITS - LOG2_OBMC_MAX); +#else + int v = (cur1[x] * obmc1[x] + (1<<(LOG2_OBMC_MAX - FRAC_BITS-1))) >> (LOG2_OBMC_MAX - FRAC_BITS); +#endif + v = (v + pred1[x]) >> FRAC_BITS; + if(v&(~255)) v= ~(v>>31); + dst1[x] = v; + } + } + + /* copy the regions where obmc[] = (uint8_t)256 */ + if(LOG2_OBMC_MAX == 8 + && (mb_x == 0 || mb_x == b_stride-1) + && (mb_y == 0 || mb_y == b_height-1)){ + if(mb_x == 0) + x1 = block_w; + else + x0 = block_w; + if(mb_y == 0) + y1 = block_w; + else + y0 = block_w; + for(y=y0; yavctx->me_cmp == FF_CMP_W97) + distortion = ff_w97_32_c(&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, 32); + else if(s->avctx->me_cmp == FF_CMP_W53) + distortion = ff_w53_32_c(&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, 32); + else{ + distortion = 0; + for(i=0; i<4; i++){ + int off = sx+16*(i&1) + (sy+16*(i>>1))*ref_stride; + distortion += s->dsp.me_cmp[0](&s->m, src + off, dst + off, ref_stride, 16); + } + } + }else{ + assert(block_w==8); + distortion = s->dsp.me_cmp[0](&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, block_w*2); + } + + if(plane_index==0){ + for(i=0; i<4; i++){ +/* ..RRr + * .RXx. + * rxx.. + */ + rate += get_block_bits(s, mb_x + (i&1) - (i>>1), mb_y + (i>>1), 1); + } + if(mb_x == b_stride-2) + rate += get_block_bits(s, mb_x + 1, mb_y + 1, 1); + } + return distortion + rate*penalty_factor; +} + +static int get_4block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index){ + int i, y2; + Plane *p= &s->plane[plane_index]; + const int block_size = MB_SIZE >> s->block_max_depth; + const int block_w = plane_index ? block_size/2 : block_size; + const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; + const int obmc_stride= plane_index ? block_size : 2*block_size; + const int ref_stride= s->current_picture.linesize[plane_index]; + uint8_t *dst= s->current_picture.data[plane_index]; + uint8_t *src= s-> input_picture.data[plane_index]; + //FIXME zero_dst is const but add_yblock changes dst if add is 0 (this is never the case for dst=zero_dst + // const has only been removed from zero_dst to suppress a warning + static IDWTELEM zero_dst[4096]; //FIXME + const int b_stride = s->b_width << s->block_max_depth; + const int w= p->width; + const int h= p->height; + int distortion= 0; + int rate= 0; + const int penalty_factor= get_penalty_factor(s->lambda, s->lambda2, s->avctx->me_cmp); + + for(i=0; i<9; i++){ + int mb_x2= mb_x + (i%3) - 1; + int mb_y2= mb_y + (i/3) - 1; + int x= block_w*mb_x2 + block_w/2; + int y= block_w*mb_y2 + block_w/2; + + add_yblock(s, 0, NULL, zero_dst, dst, obmc, + x, y, block_w, block_w, w, h, /*dst_stride*/0, ref_stride, obmc_stride, mb_x2, mb_y2, 1, 1, plane_index); + + //FIXME find a cleaner/simpler way to skip the outside stuff + for(y2= y; y2<0; y2++) + memcpy(dst + x + y2*ref_stride, src + x + y2*ref_stride, block_w); + for(y2= h; y2 w){ + for(y2= y; y2dsp.me_cmp[block_w==8](&s->m, src + x + y*ref_stride, dst + x + y*ref_stride, ref_stride, block_w); + } + + if(plane_index==0){ + BlockNode *b= &s->block[mb_x+mb_y*b_stride]; + int merged= same_block(b,b+1) && same_block(b,b+b_stride) && same_block(b,b+b_stride+1); + +/* ..RRRr + * .RXXx. + * .RXXx. + * rxxx. + */ + if(merged) + rate = get_block_bits(s, mb_x, mb_y, 2); + for(i=merged?4:0; i<9; i++){ + static const int dxy[9][2] = {{0,0},{1,0},{0,1},{1,1},{2,0},{2,1},{-1,2},{0,2},{1,2}}; + rate += get_block_bits(s, mb_x + dxy[i][0], mb_y + dxy[i][1], 1); + } + } + return distortion + rate*penalty_factor; +} + +static int encode_subband_c0run(SnowContext *s, SubBand *b, IDWTELEM *src, IDWTELEM *parent, int stride, int orientation){ + const int w= b->width; + const int h= b->height; + int x, y; + + if(1){ + int run=0; + int runs[w*h]; + int run_index=0; + int max_index; + + for(y=0; y 1){ + if(orientation==1) ll= src[y + (x-2)*stride]; + else ll= src[x - 2 + y*stride]; + }*/ + } + if(parent){ + int px= x>>1; + int py= y>>1; + if(pxparent->width && pyparent->height) + p= parent[px + py*2*stride]; + } + if(!(/*ll|*/l|lt|t|rt|p)){ + if(v){ + runs[run_index++]= run; + run=0; + }else{ + run++; + } + } + } + } + max_index= run_index; + runs[run_index++]= run; + run_index=0; + run= runs[run_index++]; + + put_symbol2(&s->c, b->state[30], max_index, 0); + if(run_index <= max_index) + put_symbol2(&s->c, b->state[1], run, 3); + + for(y=0; yc.bytestream_end - s->c.bytestream < w*40){ + av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n"); + return -1; + } + for(x=0; x 1){ + if(orientation==1) ll= src[y + (x-2)*stride]; + else ll= src[x - 2 + y*stride]; + }*/ + } + if(parent){ + int px= x>>1; + int py= y>>1; + if(pxparent->width && pyparent->height) + p= parent[px + py*2*stride]; + } + if(/*ll|*/l|lt|t|rt|p){ + int context= av_log2(/*FFABS(ll) + */3*FFABS(l) + FFABS(lt) + 2*FFABS(t) + FFABS(rt) + FFABS(p)); + + put_rac(&s->c, &b->state[0][context], !!v); + }else{ + if(!run){ + run= runs[run_index++]; + + if(run_index <= max_index) + put_symbol2(&s->c, b->state[1], run, 3); + assert(v); + }else{ + run--; + assert(!v); + } + } + if(v){ + int context= av_log2(/*FFABS(ll) + */3*FFABS(l) + FFABS(lt) + 2*FFABS(t) + FFABS(rt) + FFABS(p)); + int l2= 2*FFABS(l) + (l<0); + int t2= 2*FFABS(t) + (t<0); + + put_symbol2(&s->c, b->state[context + 2], FFABS(v)-1, context-4); + put_rac(&s->c, &b->state[0][16 + 1 + 3 + quant3bA[l2&0xFF] + 3*quant3bA[t2&0xFF]], v<0); + } + } + } + } + return 0; +} + +static int encode_subband(SnowContext *s, SubBand *b, IDWTELEM *src, IDWTELEM *parent, int stride, int orientation){ +// encode_subband_qtree(s, b, src, parent, stride, orientation); +// encode_subband_z0run(s, b, src, parent, stride, orientation); + return encode_subband_c0run(s, b, src, parent, stride, orientation); +// encode_subband_dzr(s, b, src, parent, stride, orientation); +} + +static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, const uint8_t *obmc_edged, int *best_rd){ + const int b_stride= s->b_width << s->block_max_depth; + BlockNode *block= &s->block[mb_x + mb_y * b_stride]; + BlockNode backup= *block; + unsigned value; + int rd, index; + + assert(mb_x>=0 && mb_y>=0); + assert(mb_xcolor[0] = p[0]; + block->color[1] = p[1]; + block->color[2] = p[2]; + block->type |= BLOCK_INTRA; + }else{ + index= (p[0] + 31*p[1]) & (ME_CACHE_SIZE-1); + value= s->me_cache_generation + (p[0]>>10) + (p[1]<<6) + (block->ref<<12); + if(s->me_cache[index] == value) + return 0; + s->me_cache[index]= value; + + block->mx= p[0]; + block->my= p[1]; + block->type &= ~BLOCK_INTRA; + } + + rd= get_block_rd(s, mb_x, mb_y, 0, obmc_edged); + +//FIXME chroma + if(rd < *best_rd){ + *best_rd= rd; + return 1; + }else{ + *block= backup; + return 0; + } +} + +/* special case for int[2] args we discard afterwards, + * fixes compilation problem with gcc 2.95 */ +static av_always_inline int check_block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, const uint8_t *obmc_edged, int *best_rd){ + int p[2] = {p0, p1}; + return check_block(s, mb_x, mb_y, p, 0, obmc_edged, best_rd); +} + +static av_always_inline int check_4block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, int ref, int *best_rd){ + const int b_stride= s->b_width << s->block_max_depth; + BlockNode *block= &s->block[mb_x + mb_y * b_stride]; + BlockNode backup[4]= {block[0], block[1], block[b_stride], block[b_stride+1]}; + unsigned value; + int rd, index; + + assert(mb_x>=0 && mb_y>=0); + assert(mb_xme_cache_generation + (p0>>10) + (p1<<6) + (block->ref<<12); + if(s->me_cache[index] == value) + return 0; + s->me_cache[index]= value; + + block->mx= p0; + block->my= p1; + block->ref= ref; + block->type &= ~BLOCK_INTRA; + block[1]= block[b_stride]= block[b_stride+1]= *block; + + rd= get_4block_rd(s, mb_x, mb_y, 0); + +//FIXME chroma + if(rd < *best_rd){ + *best_rd= rd; + return 1; + }else{ + block[0]= backup[0]; + block[1]= backup[1]; + block[b_stride]= backup[2]; + block[b_stride+1]= backup[3]; + return 0; + } +} + +static void iterative_me(SnowContext *s){ + int pass, mb_x, mb_y; + const int b_width = s->b_width << s->block_max_depth; + const int b_height= s->b_height << s->block_max_depth; + const int b_stride= b_width; + int color[3]; + + { + RangeCoder r = s->c; + uint8_t state[sizeof(s->block_state)]; + memcpy(state, s->block_state, sizeof(s->block_state)); + for(mb_y= 0; mb_yb_height; mb_y++) + for(mb_x= 0; mb_xb_width; mb_x++) + encode_q_branch(s, 0, mb_x, mb_y); + s->c = r; + memcpy(s->block_state, state, sizeof(s->block_state)); + } + + for(pass=0; pass<25; pass++){ + int change= 0; + + for(mb_y= 0; mb_yblock[index]; + BlockNode *tb = mb_y ? &s->block[index-b_stride ] : NULL; + BlockNode *lb = mb_x ? &s->block[index -1] : NULL; + BlockNode *rb = mb_x+1block[index +1] : NULL; + BlockNode *bb = mb_y+1block[index+b_stride ] : NULL; + BlockNode *tlb= mb_x && mb_y ? &s->block[index-b_stride-1] : NULL; + BlockNode *trb= mb_x+1block[index-b_stride+1] : NULL; + BlockNode *blb= mb_x && mb_y+1block[index+b_stride-1] : NULL; + BlockNode *brb= mb_x+1block[index+b_stride+1] : NULL; + const int b_w= (MB_SIZE >> s->block_max_depth); + uint8_t obmc_edged[b_w*2][b_w*2]; + + if(pass && (block->type & BLOCK_OPT)) + continue; + block->type |= BLOCK_OPT; + + backup= *block; + + if(!s->me_cache_generation) + memset(s->me_cache, 0, sizeof(s->me_cache)); + s->me_cache_generation += 1<<22; + + //FIXME precalculate + { + int x, y; + memcpy(obmc_edged, obmc_tab[s->block_max_depth], b_w*b_w*4); + if(mb_x==0) + for(y=0; y input_picture.data[0]; + uint8_t *dst= s->current_picture.data[0]; + const int stride= s->current_picture.linesize[0]; + const int block_w= MB_SIZE >> s->block_max_depth; + const int sx= block_w*mb_x - block_w/2; + const int sy= block_w*mb_y - block_w/2; + const int w= s->plane[0].width; + const int h= s->plane[0].height; + int y; + + for(y=sy; y<0; y++) + memcpy(dst + sx + y*stride, src + sx + y*stride, block_w*2); + for(y=h; y w){ + for(y=sy; y 0 && (block->type&BLOCK_INTRA)){ + int color0[3]= {block->color[0], block->color[1], block->color[2]}; + check_block(s, mb_x, mb_y, color0, 1, *obmc_edged, &best_rd); + }else + check_block_inter(s, mb_x, mb_y, block->mx, block->my, *obmc_edged, &best_rd); + + ref_b= *block; + ref_rd= best_rd; + for(ref=0; ref < s->ref_frames; ref++){ + int16_t (*mvr)[2]= &s->ref_mvs[ref][index]; + if(s->ref_scores[ref][index] > s->ref_scores[ref_b.ref][index]*3/2) //FIXME tune threshold + continue; + block->ref= ref; + best_rd= INT_MAX; + + check_block_inter(s, mb_x, mb_y, mvr[0][0], mvr[0][1], *obmc_edged, &best_rd); + check_block_inter(s, mb_x, mb_y, 0, 0, *obmc_edged, &best_rd); + if(tb) + check_block_inter(s, mb_x, mb_y, mvr[-b_stride][0], mvr[-b_stride][1], *obmc_edged, &best_rd); + if(lb) + check_block_inter(s, mb_x, mb_y, mvr[-1][0], mvr[-1][1], *obmc_edged, &best_rd); + if(rb) + check_block_inter(s, mb_x, mb_y, mvr[1][0], mvr[1][1], *obmc_edged, &best_rd); + if(bb) + check_block_inter(s, mb_x, mb_y, mvr[b_stride][0], mvr[b_stride][1], *obmc_edged, &best_rd); + + /* fullpel ME */ + //FIXME avoid subpel interpolation / round to nearest integer + do{ + dia_change=0; + for(i=0; iavctx->dia_size, 1); i++){ + for(j=0; jmx+4*(i-j), block->my+(4*j), *obmc_edged, &best_rd); + dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my-(4*j), *obmc_edged, &best_rd); + dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+4*(i-j), block->my-(4*j), *obmc_edged, &best_rd); + dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my+(4*j), *obmc_edged, &best_rd); + } + } + }while(dia_change); + /* subpel ME */ + do{ + static const int square[8][2]= {{+1, 0},{-1, 0},{ 0,+1},{ 0,-1},{+1,+1},{-1,-1},{+1,-1},{-1,+1},}; + dia_change=0; + for(i=0; i<8; i++) + dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+square[i][0], block->my+square[i][1], *obmc_edged, &best_rd); + }while(dia_change); + //FIXME or try the standard 2 pass qpel or similar + + mvr[0][0]= block->mx; + mvr[0][1]= block->my; + if(ref_rd > best_rd){ + ref_rd= best_rd; + ref_b= *block; + } + } + best_rd= ref_rd; + *block= ref_b; + check_block(s, mb_x, mb_y, color, 1, *obmc_edged, &best_rd); + //FIXME RD style color selection + if(!same_block(block, &backup)){ + if(tb ) tb ->type &= ~BLOCK_OPT; + if(lb ) lb ->type &= ~BLOCK_OPT; + if(rb ) rb ->type &= ~BLOCK_OPT; + if(bb ) bb ->type &= ~BLOCK_OPT; + if(tlb) tlb->type &= ~BLOCK_OPT; + if(trb) trb->type &= ~BLOCK_OPT; + if(blb) blb->type &= ~BLOCK_OPT; + if(brb) brb->type &= ~BLOCK_OPT; + change ++; + } + } + } + av_log(s->avctx, AV_LOG_ERROR, "pass:%d changed:%d\n", pass, change); + if(!change) + break; + } + + if(s->block_max_depth == 1){ + int change= 0; + for(mb_y= 0; mb_yblock[index]; + b[1]= b[0]+1; + b[2]= b[0]+b_stride; + b[3]= b[2]+1; + if(same_block(b[0], b[1]) && + same_block(b[0], b[2]) && + same_block(b[0], b[3])) + continue; + + if(!s->me_cache_generation) + memset(s->me_cache, 0, sizeof(s->me_cache)); + s->me_cache_generation += 1<<22; + + init_rd= best_rd= get_4block_rd(s, mb_x, mb_y, 0); + + //FIXME more multiref search? + check_4block_inter(s, mb_x, mb_y, + (b[0]->mx + b[1]->mx + b[2]->mx + b[3]->mx + 2) >> 2, + (b[0]->my + b[1]->my + b[2]->my + b[3]->my + 2) >> 2, 0, &best_rd); + + for(i=0; i<4; i++) + if(!(b[i]->type&BLOCK_INTRA)) + check_4block_inter(s, mb_x, mb_y, b[i]->mx, b[i]->my, b[i]->ref, &best_rd); + + if(init_rd != best_rd) + change++; + } + } + av_log(s->avctx, AV_LOG_ERROR, "pass:4mv changed:%d\n", change*4); + } +} + +static void encode_blocks(SnowContext *s, int search){ + int x, y; + int w= s->b_width; + int h= s->b_height; + + if(s->avctx->me_method == ME_ITER && !s->keyframe && search) + iterative_me(s); + + for(y=0; yc.bytestream_end - s->c.bytestream < w*MB_SIZE*MB_SIZE*3){ //FIXME nicer limit + av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n"); + return; + } + for(x=0; xavctx->me_method == ME_ITER || !search) + encode_q_branch2(s, 0, x, y); + else + encode_q_branch (s, 0, x, y); + } + } +} + +static void quantize(SnowContext *s, SubBand *b, IDWTELEM *dst, DWTELEM *src, int stride, int bias){ + const int w= b->width; + const int h= b->height; + const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); + const int qmul= qexp[qlog&(QROOT-1)]<<((qlog>>QSHIFT) + ENCODER_EXTRA_BITS); + int x,y, thres1, thres2; + + if(s->qlog == LOSSLESS_QLOG){ + for(y=0; y>3; + thres1= ((qmul - bias)>>QEXPSHIFT) - 1; + thres2= 2*thres1; + + if(!bias){ + for(y=0; y thres2){ + if(i>=0){ + i<<= QEXPSHIFT; + i/= qmul; //FIXME optimize + dst[x + y*stride]= i; + }else{ + i= -i; + i<<= QEXPSHIFT; + i/= qmul; //FIXME optimize + dst[x + y*stride]= -i; + } + }else + dst[x + y*stride]= 0; + } + } + }else{ + for(y=0; y thres2){ + if(i>=0){ + i<<= QEXPSHIFT; + i= (i + bias) / qmul; //FIXME optimize + dst[x + y*stride]= i; + }else{ + i= -i; + i<<= QEXPSHIFT; + i= (i + bias) / qmul; //FIXME optimize + dst[x + y*stride]= -i; + } + }else + dst[x + y*stride]= 0; + } + } + } +} + +static void dequantize(SnowContext *s, SubBand *b, IDWTELEM *src, int stride){ + const int w= b->width; + const int h= b->height; + const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); + const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); + const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; + int x,y; + + if(s->qlog == LOSSLESS_QLOG) return; + + for(y=0; y>(QEXPSHIFT)); //FIXME try different bias + }else if(i>0){ + src[x + y*stride]= (( i*qmul + qadd)>>(QEXPSHIFT)); + } + } + } +} + +static void decorrelate(SnowContext *s, SubBand *b, IDWTELEM *src, int stride, int inverse, int use_median){ + const int w= b->width; + const int h= b->height; + int x,y; + + for(y=h-1; y>=0; y--){ + for(x=w-1; x>=0; x--){ + int i= x + y*stride; + + if(x){ + if(use_median){ + if(y && x+1width; + const int h= b->height; + int x,y; + + for(y=0; yspatial_decomposition_count; level++){ + for(orientation=level ? 1:0; orientation<4; orientation++){ + if(orientation==2) continue; + put_symbol(&s->c, s->header_state, s->plane[plane_index].band[level][orientation].qlog, 1); + } + } + } +} + +static void encode_header(SnowContext *s){ + int plane_index, i; + uint8_t kstate[32]; + + memset(kstate, MID_STATE, sizeof(kstate)); + + put_rac(&s->c, kstate, s->keyframe); + if(s->keyframe || s->always_reset){ + ff_snow_reset_contexts(s); + s->last_spatial_decomposition_type= + s->last_qlog= + s->last_qbias= + s->last_mv_scale= + s->last_block_max_depth= 0; + for(plane_index=0; plane_index<2; plane_index++){ + Plane *p= &s->plane[plane_index]; + p->last_htaps=0; + p->last_diag_mc=0; + memset(p->last_hcoeff, 0, sizeof(p->last_hcoeff)); + } + } + if(s->keyframe){ + put_symbol(&s->c, s->header_state, s->version, 0); + put_rac(&s->c, s->header_state, s->always_reset); + put_symbol(&s->c, s->header_state, s->temporal_decomposition_type, 0); + put_symbol(&s->c, s->header_state, s->temporal_decomposition_count, 0); + put_symbol(&s->c, s->header_state, s->spatial_decomposition_count, 0); + put_symbol(&s->c, s->header_state, s->colorspace_type, 0); + put_symbol(&s->c, s->header_state, s->chroma_h_shift, 0); + put_symbol(&s->c, s->header_state, s->chroma_v_shift, 0); + put_rac(&s->c, s->header_state, s->spatial_scalability); +// put_rac(&s->c, s->header_state, s->rate_scalability); + put_symbol(&s->c, s->header_state, s->max_ref_frames-1, 0); + + encode_qlogs(s); + } + + if(!s->keyframe){ + int update_mc=0; + for(plane_index=0; plane_index<2; plane_index++){ + Plane *p= &s->plane[plane_index]; + update_mc |= p->last_htaps != p->htaps; + update_mc |= p->last_diag_mc != p->diag_mc; + update_mc |= !!memcmp(p->last_hcoeff, p->hcoeff, sizeof(p->hcoeff)); + } + put_rac(&s->c, s->header_state, update_mc); + if(update_mc){ + for(plane_index=0; plane_index<2; plane_index++){ + Plane *p= &s->plane[plane_index]; + put_rac(&s->c, s->header_state, p->diag_mc); + put_symbol(&s->c, s->header_state, p->htaps/2-1, 0); + for(i= p->htaps/2; i; i--) + put_symbol(&s->c, s->header_state, FFABS(p->hcoeff[i]), 0); + } + } + if(s->last_spatial_decomposition_count != s->spatial_decomposition_count){ + put_rac(&s->c, s->header_state, 1); + put_symbol(&s->c, s->header_state, s->spatial_decomposition_count, 0); + encode_qlogs(s); + }else + put_rac(&s->c, s->header_state, 0); + } + + put_symbol(&s->c, s->header_state, s->spatial_decomposition_type - s->last_spatial_decomposition_type, 1); + put_symbol(&s->c, s->header_state, s->qlog - s->last_qlog , 1); + put_symbol(&s->c, s->header_state, s->mv_scale - s->last_mv_scale, 1); + put_symbol(&s->c, s->header_state, s->qbias - s->last_qbias , 1); + put_symbol(&s->c, s->header_state, s->block_max_depth - s->last_block_max_depth, 1); + +} + +static void update_last_header_values(SnowContext *s){ + int plane_index; + + if(!s->keyframe){ + for(plane_index=0; plane_index<2; plane_index++){ + Plane *p= &s->plane[plane_index]; + p->last_diag_mc= p->diag_mc; + p->last_htaps = p->htaps; + memcpy(p->last_hcoeff, p->hcoeff, sizeof(p->hcoeff)); + } + } + + s->last_spatial_decomposition_type = s->spatial_decomposition_type; + s->last_qlog = s->qlog; + s->last_qbias = s->qbias; + s->last_mv_scale = s->mv_scale; + s->last_block_max_depth = s->block_max_depth; + s->last_spatial_decomposition_count = s->spatial_decomposition_count; +} + +static int qscale2qlog(int qscale){ + return rint(QROOT*log(qscale / (float)FF_QP2LAMBDA)/log(2)) + + 61*QROOT/8; ///< 64 > 60 +} + +static int ratecontrol_1pass(SnowContext *s, AVFrame *pict) +{ + /* Estimate the frame's complexity as a sum of weighted dwt coefficients. + * FIXME we know exact mv bits at this point, + * but ratecontrol isn't set up to include them. */ + uint32_t coef_sum= 0; + int level, orientation, delta_qlog; + + for(level=0; levelspatial_decomposition_count; level++){ + for(orientation=level ? 1 : 0; orientation<4; orientation++){ + SubBand *b= &s->plane[0].band[level][orientation]; + IDWTELEM *buf= b->ibuf; + const int w= b->width; + const int h= b->height; + const int stride= b->stride; + const int qlog= av_clip(2*QROOT + b->qlog, 0, QROOT*16); + const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); + const int qdiv= (1<<16)/qmul; + int x, y; + //FIXME this is ugly + for(y=0; ybuf[x+y*stride]; + if(orientation==0) + decorrelate(s, b, buf, stride, 1, 0); + for(y=0; y> 16; + } + } + + /* ugly, ratecontrol just takes a sqrt again */ + coef_sum = (uint64_t)coef_sum * coef_sum >> 16; + assert(coef_sum < INT_MAX); + + if(pict->pict_type == AV_PICTURE_TYPE_I){ + s->m.current_picture.mb_var_sum= coef_sum; + s->m.current_picture.mc_mb_var_sum= 0; + }else{ + s->m.current_picture.mc_mb_var_sum= coef_sum; + s->m.current_picture.mb_var_sum= 0; + } + + pict->quality= ff_rate_estimate_qscale(&s->m, 1); + if (pict->quality < 0) + return INT_MIN; + s->lambda= pict->quality * 3/2; + delta_qlog= qscale2qlog(pict->quality) - s->qlog; + s->qlog+= delta_qlog; + return delta_qlog; +} + +static void calculate_visual_weight(SnowContext *s, Plane *p){ + int width = p->width; + int height= p->height; + int level, orientation, x, y; + + for(level=0; levelspatial_decomposition_count; level++){ + for(orientation=level ? 1 : 0; orientation<4; orientation++){ + SubBand *b= &p->band[level][orientation]; + IDWTELEM *ibuf= b->ibuf; + int64_t error=0; + + memset(s->spatial_idwt_buffer, 0, sizeof(*s->spatial_idwt_buffer)*width*height); + ibuf[b->width/2 + b->height/2*b->stride]= 256*16; + ff_spatial_idwt(s->spatial_idwt_buffer, width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count); + for(y=0; yspatial_idwt_buffer[x + y*width]*16; + error += d*d; + } + } + + b->qlog= (int)(log(352256.0/sqrt(error)) / log(pow(2.0, 1.0/QROOT))+0.5); + } + } +} + +static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ + SnowContext *s = avctx->priv_data; + RangeCoder * const c= &s->c; + AVFrame *pict = data; + const int width= s->avctx->width; + const int height= s->avctx->height; + int level, orientation, plane_index, i, y; + uint8_t rc_header_bak[sizeof(s->header_state)]; + uint8_t rc_block_bak[sizeof(s->block_state)]; + + ff_init_range_encoder(c, buf, buf_size); + ff_build_rac_states(c, 0.05*(1LL<<32), 256-8); + + for(i=0; i<3; i++){ + int shift= !!i; + for(y=0; y<(height>>shift); y++) + memcpy(&s->input_picture.data[i][y * s->input_picture.linesize[i]], + &pict->data[i][y * pict->linesize[i]], + width>>shift); + } + s->new_picture = *pict; + + s->m.picture_number= avctx->frame_number; + if(avctx->flags&CODEC_FLAG_PASS2){ + s->m.pict_type = + pict->pict_type= s->m.rc_context.entry[avctx->frame_number].new_pict_type; + s->keyframe= pict->pict_type==AV_PICTURE_TYPE_I; + if(!(avctx->flags&CODEC_FLAG_QSCALE)) { + pict->quality= ff_rate_estimate_qscale(&s->m, 0); + if (pict->quality < 0) + return -1; + } + }else{ + s->keyframe= avctx->gop_size==0 || avctx->frame_number % avctx->gop_size == 0; + s->m.pict_type= + pict->pict_type= s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; + } + + if(s->pass1_rc && avctx->frame_number == 0) + pict->quality= 2*FF_QP2LAMBDA; + if(pict->quality){ + s->qlog= qscale2qlog(pict->quality); + s->lambda = pict->quality * 3/2; + } + if(s->qlog < 0 || (!pict->quality && (avctx->flags & CODEC_FLAG_QSCALE))){ + s->qlog= LOSSLESS_QLOG; + s->lambda = 0; + }//else keep previous frame's qlog until after motion estimation + + ff_snow_frame_start(s); + + s->m.current_picture_ptr= &s->m.current_picture; + s->m.last_picture.f.pts = s->m.current_picture.f.pts; + s->m.current_picture.f.pts = pict->pts; + if(pict->pict_type == AV_PICTURE_TYPE_P){ + int block_width = (width +15)>>4; + int block_height= (height+15)>>4; + int stride= s->current_picture.linesize[0]; + + assert(s->current_picture.data[0]); + assert(s->last_picture[0].data[0]); + + s->m.avctx= s->avctx; + s->m.current_picture.f.data[0] = s->current_picture.data[0]; + s->m. last_picture.f.data[0] = s->last_picture[0].data[0]; + s->m. new_picture.f.data[0] = s-> input_picture.data[0]; + s->m. last_picture_ptr= &s->m. last_picture; + s->m.linesize= + s->m. last_picture.f.linesize[0] = + s->m. new_picture.f.linesize[0] = + s->m.current_picture.f.linesize[0] = stride; + s->m.uvlinesize= s->current_picture.linesize[1]; + s->m.width = width; + s->m.height= height; + s->m.mb_width = block_width; + s->m.mb_height= block_height; + s->m.mb_stride= s->m.mb_width+1; + s->m.b8_stride= 2*s->m.mb_width+1; + s->m.f_code=1; + s->m.pict_type= pict->pict_type; + s->m.me_method= s->avctx->me_method; + s->m.me.scene_change_score=0; + s->m.flags= s->avctx->flags; + s->m.quarter_sample= (s->avctx->flags & CODEC_FLAG_QPEL)!=0; + s->m.out_format= FMT_H263; + s->m.unrestricted_mv= 1; + + s->m.lambda = s->lambda; + s->m.qscale= (s->m.lambda*139 + FF_LAMBDA_SCALE*64) >> (FF_LAMBDA_SHIFT + 7); + s->lambda2= s->m.lambda2= (s->m.lambda*s->m.lambda + FF_LAMBDA_SCALE/2) >> FF_LAMBDA_SHIFT; + + s->m.dsp= s->dsp; //move + ff_init_me(&s->m); + s->dsp= s->m.dsp; + } + + if(s->pass1_rc){ + memcpy(rc_header_bak, s->header_state, sizeof(s->header_state)); + memcpy(rc_block_bak, s->block_state, sizeof(s->block_state)); + } + +redo_frame: + + if(pict->pict_type == AV_PICTURE_TYPE_I) + s->spatial_decomposition_count= 5; + else + s->spatial_decomposition_count= 5; + + s->m.pict_type = pict->pict_type; + s->qbias= pict->pict_type == AV_PICTURE_TYPE_P ? 2 : 0; + + ff_snow_common_init_after_header(avctx); + + if(s->last_spatial_decomposition_count != s->spatial_decomposition_count){ + for(plane_index=0; plane_index<3; plane_index++){ + calculate_visual_weight(s, &s->plane[plane_index]); + } + } + + encode_header(s); + s->m.misc_bits = 8*(s->c.bytestream - s->c.bytestream_start); + encode_blocks(s, 1); + s->m.mv_bits = 8*(s->c.bytestream - s->c.bytestream_start) - s->m.misc_bits; + + for(plane_index=0; plane_index<3; plane_index++){ + Plane *p= &s->plane[plane_index]; + int w= p->width; + int h= p->height; + int x, y; +// int bits= put_bits_count(&s->c.pb); + + if (!s->memc_only) { + //FIXME optimize + if(pict->data[plane_index]) //FIXME gray hack + for(y=0; yspatial_idwt_buffer[y*w + x]= pict->data[plane_index][y*pict->linesize[plane_index] + x]<spatial_idwt_buffer, plane_index, 0); + + if( plane_index==0 + && pict->pict_type == AV_PICTURE_TYPE_P + && !(avctx->flags&CODEC_FLAG_PASS2) + && s->m.me.scene_change_score > s->avctx->scenechange_threshold){ + ff_init_range_encoder(c, buf, buf_size); + ff_build_rac_states(c, 0.05*(1LL<<32), 256-8); + pict->pict_type= AV_PICTURE_TYPE_I; + s->keyframe=1; + s->current_picture.key_frame=1; + goto redo_frame; + } + + if(s->qlog == LOSSLESS_QLOG){ + for(y=0; yspatial_dwt_buffer[y*w + x]= (s->spatial_idwt_buffer[y*w + x] + (1<<(FRAC_BITS-1))-1)>>FRAC_BITS; + } + } + }else{ + for(y=0; yspatial_dwt_buffer[y*w + x]=s->spatial_idwt_buffer[y*w + x]<spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type); + else*/ + ff_spatial_dwt(s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count); + + if(s->pass1_rc && plane_index==0){ + int delta_qlog = ratecontrol_1pass(s, pict); + if (delta_qlog <= INT_MIN) + return -1; + if(delta_qlog){ + //reordering qlog in the bitstream would eliminate this reset + ff_init_range_encoder(c, buf, buf_size); + memcpy(s->header_state, rc_header_bak, sizeof(s->header_state)); + memcpy(s->block_state, rc_block_bak, sizeof(s->block_state)); + encode_header(s); + encode_blocks(s, 0); + } + } + + for(level=0; levelspatial_decomposition_count; level++){ + for(orientation=level ? 1 : 0; orientation<4; orientation++){ + SubBand *b= &p->band[level][orientation]; + + if(!QUANTIZE2) + quantize(s, b, b->ibuf, b->buf, b->stride, s->qbias); + if(orientation==0) + decorrelate(s, b, b->ibuf, b->stride, pict->pict_type == AV_PICTURE_TYPE_P, 0); + encode_subband(s, b, b->ibuf, b->parent ? b->parent->ibuf : NULL, b->stride, orientation); + assert(b->parent==NULL || b->parent->stride == b->stride*2); + if(orientation==0) + correlate(s, b, b->ibuf, b->stride, 1, 0); + } + } + + for(level=0; levelspatial_decomposition_count; level++){ + for(orientation=level ? 1 : 0; orientation<4; orientation++){ + SubBand *b= &p->band[level][orientation]; + + dequantize(s, b, b->ibuf, b->stride); + } + } + + ff_spatial_idwt(s->spatial_idwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count); + if(s->qlog == LOSSLESS_QLOG){ + for(y=0; yspatial_idwt_buffer[y*w + x]<<=FRAC_BITS; + } + } + } + predict_plane(s, s->spatial_idwt_buffer, plane_index, 1); + }else{ + //ME/MC only + if(pict->pict_type == AV_PICTURE_TYPE_I){ + for(y=0; ycurrent_picture.data[plane_index][y*s->current_picture.linesize[plane_index] + x]= + pict->data[plane_index][y*pict->linesize[plane_index] + x]; + } + } + }else{ + memset(s->spatial_idwt_buffer, 0, sizeof(IDWTELEM)*w*h); + predict_plane(s, s->spatial_idwt_buffer, plane_index, 1); + } + } + if(s->avctx->flags&CODEC_FLAG_PSNR){ + int64_t error= 0; + + if(pict->data[plane_index]) //FIXME gray hack + for(y=0; ycurrent_picture.data[plane_index][y*s->current_picture.linesize[plane_index] + x] - pict->data[plane_index][y*pict->linesize[plane_index] + x]; + error += d*d; + } + } + s->avctx->error[plane_index] += error; + s->current_picture.error[plane_index] = error; + } + + } + + update_last_header_values(s); + + ff_snow_release_buffer(avctx); + + s->current_picture.coded_picture_number = avctx->frame_number; + s->current_picture.pict_type = pict->pict_type; + s->current_picture.quality = pict->quality; + s->m.frame_bits = 8*(s->c.bytestream - s->c.bytestream_start); + s->m.p_tex_bits = s->m.frame_bits - s->m.misc_bits - s->m.mv_bits; + s->m.current_picture.f.display_picture_number = + s->m.current_picture.f.coded_picture_number = avctx->frame_number; + s->m.current_picture.f.quality = pict->quality; + s->m.total_bits += 8*(s->c.bytestream - s->c.bytestream_start); + if(s->pass1_rc) + if (ff_rate_estimate_qscale(&s->m, 0) < 0) + return -1; + if(avctx->flags&CODEC_FLAG_PASS1) + ff_write_pass1_stats(&s->m); + s->m.last_pict_type = s->m.pict_type; + avctx->frame_bits = s->m.frame_bits; + avctx->mv_bits = s->m.mv_bits; + avctx->misc_bits = s->m.misc_bits; + avctx->p_tex_bits = s->m.p_tex_bits; + + emms_c(); + + return ff_rac_terminate(c); +} + +static av_cold int encode_end(AVCodecContext *avctx) +{ + SnowContext *s = avctx->priv_data; + + ff_snow_common_end(s); + if (s->input_picture.data[0]) + avctx->release_buffer(avctx, &s->input_picture); + av_free(avctx->stats_out); + + return 0; +} + +#define OFFSET(x) offsetof(SnowContext, x) +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "memc_only", "Only do ME/MC (I frames -> ref, P frame -> ME+MC).", OFFSET(memc_only), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE }, + { NULL }, +}; + +static const AVClass snowenc_class = { + .class_name = "snow encoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +AVCodec ff_snow_encoder = { + .name = "snow", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_SNOW, + .priv_data_size = sizeof(SnowContext), + .init = encode_init, + .encode = encode_frame, + .close = encode_end, + .long_name = NULL_IF_CONFIG_SMALL("Snow"), + .priv_class = &snowenc_class, +}; +#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/snow.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/snow.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/snow.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/snow.h 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,10 @@ #include "dsputil.h" #include "dwt.h" +#include "rangecoder.h" +#include "mathops.h" +#include "mpegvideo.h" + #define MID_STATE 128 #define MAX_PLANES 4 @@ -36,6 +40,138 @@ #define LOG2_OBMC_MAX 8 #define OBMC_MAX (1<<(LOG2_OBMC_MAX)) +typedef struct BlockNode{ + int16_t mx; + int16_t my; + uint8_t ref; + uint8_t color[3]; + uint8_t type; +//#define TYPE_SPLIT 1 +#define BLOCK_INTRA 1 +#define BLOCK_OPT 2 +//#define TYPE_NOCOLOR 4 + uint8_t level; //FIXME merge into type? +}BlockNode; + +static const BlockNode null_block= { //FIXME add border maybe + .color= {128,128,128}, + .mx= 0, + .my= 0, + .ref= 0, + .type= 0, + .level= 0, +}; + +#define LOG2_MB_SIZE 4 +#define MB_SIZE (1<b_width << s->block_max_depth; + const int rem_depth= s->block_max_depth - level; + const int index= (x + y*w) << rem_depth; + const int block_w= 1<block[index + i + j*w]= block; + } + } +} + +static inline void pred_mv(SnowContext *s, int *mx, int *my, int ref, + const BlockNode *left, const BlockNode *top, const BlockNode *tr){ + if(s->ref_frames == 1){ + *mx = mid_pred(left->mx, top->mx, tr->mx); + *my = mid_pred(left->my, top->my, tr->my); + }else{ + const int *scale = scale_mv_ref[ref]; + *mx = mid_pred((left->mx * scale[left->ref] + 128) >>8, + (top ->mx * scale[top ->ref] + 128) >>8, + (tr ->mx * scale[tr ->ref] + 128) >>8); + *my = mid_pred((left->my * scale[left->ref] + 128) >>8, + (top ->my * scale[top ->ref] + 128) >>8, + (tr ->my * scale[tr ->ref] + 128) >>8); + } +} + +static av_always_inline int same_block(BlockNode *a, BlockNode *b){ + if((a->type&BLOCK_INTRA) && (b->type&BLOCK_INTRA)){ + return !((a->color[0] - b->color[0]) | (a->color[1] - b->color[1]) | (a->color[2] - b->color[2])); + }else{ + return !((a->mx - b->mx) | (a->my - b->my) | (a->ref - b->ref) | ((a->type ^ b->type)&BLOCK_INTRA)); + } +} + +//FIXME name cleanup (b_w, block_w, b_width stuff) +//XXX should we really inline it? +static av_always_inline void add_yblock(SnowContext *s, int sliced, slice_buffer *sb, IDWTELEM *dst, uint8_t *dst8, const uint8_t *obmc, int src_x, int src_y, int b_w, int b_h, int w, int h, int dst_stride, int src_stride, int obmc_stride, int b_x, int b_y, int add, int offset_dst, int plane_index){ + const int b_width = s->b_width << s->block_max_depth; + const int b_height= s->b_height << s->block_max_depth; + const int b_stride= b_width; + BlockNode *lt= &s->block[b_x + b_y*b_stride]; + BlockNode *rt= lt+1; + BlockNode *lb= lt+b_stride; + BlockNode *rb= lb+1; + uint8_t *block[4]; + int tmp_step= src_stride >= 7*MB_SIZE ? MB_SIZE : MB_SIZE*src_stride; + uint8_t *tmp = s->scratchbuf; + uint8_t *ptmp; + int x,y; + + if(b_x<0){ + lt= rt; + lb= rb; + }else if(b_x + 1 >= b_width){ + rt= lt; + rb= lb; + } + if(b_y<0){ + lt= lb; + rt= rb; + }else if(b_y + 1 >= b_height){ + lb= lt; + rb= rt; + } + + if(src_x<0){ //FIXME merge with prev & always round internal width up to *16 + obmc -= src_x; + b_w += src_x; + if(!sliced && !offset_dst) + dst -= src_x; + src_x=0; + }else if(src_x + b_w > w){ + b_w = w - src_x; + } + if(src_y<0){ + obmc -= src_y*obmc_stride; + b_h += src_y; + if(!sliced && !offset_dst) + dst -= src_y*dst_stride; + src_y=0; + }else if(src_y + b_h> h){ + b_h = h - src_y; + } + + if(b_w<=0 || b_h<=0) return; + + assert(src_stride > 2*MB_SIZE + 5); + + if(!sliced && offset_dst) + dst += src_x + src_y*dst_stride; + dst8+= src_x + src_y*src_stride; +// src += src_x + src_y*src_stride; + + ptmp= tmp + 3*tmp_step; + block[0]= ptmp; + ptmp+=tmp_step; + ff_snow_pred_block(s, block[0], tmp, src_stride, src_x, src_y, b_w, b_h, lt, plane_index, w, h); + + if(same_block(lt, rt)){ + block[1]= block[0]; + }else{ + block[1]= ptmp; + ptmp+=tmp_step; + ff_snow_pred_block(s, block[1], tmp, src_stride, src_x, src_y, b_w, b_h, rt, plane_index, w, h); + } + + if(same_block(lt, lb)){ + block[2]= block[0]; + }else if(same_block(rt, lb)){ + block[2]= block[1]; + }else{ + block[2]= ptmp; + ptmp+=tmp_step; + ff_snow_pred_block(s, block[2], tmp, src_stride, src_x, src_y, b_w, b_h, lb, plane_index, w, h); + } + + if(same_block(lt, rb) ){ + block[3]= block[0]; + }else if(same_block(rt, rb)){ + block[3]= block[1]; + }else if(same_block(lb, rb)){ + block[3]= block[2]; + }else{ + block[3]= ptmp; + ff_snow_pred_block(s, block[3], tmp, src_stride, src_x, src_y, b_w, b_h, rb, plane_index, w, h); + } + if(sliced){ + s->dwt.inner_add_yblock(obmc, obmc_stride, block, b_w, b_h, src_x,src_y, src_stride, sb, add, dst8); + }else{ + for(y=0; y>1); + const uint8_t *obmc3= obmc1+ obmc_stride*(obmc_stride>>1); + const uint8_t *obmc4= obmc3+ (obmc_stride>>1); + for(x=0; x>= 8 - FRAC_BITS; + } + if(add){ + v += dst[x + y*dst_stride]; + v = (v + (1<<(FRAC_BITS-1))) >> FRAC_BITS; + if(v&(~255)) v= ~(v>>31); + dst8[x + y*src_stride] = v; + }else{ + dst[x + y*dst_stride] -= v; + } + } + } + } +} + +static av_always_inline void predict_slice(SnowContext *s, IDWTELEM *buf, int plane_index, int add, int mb_y){ + Plane *p= &s->plane[plane_index]; + const int mb_w= s->b_width << s->block_max_depth; + const int mb_h= s->b_height << s->block_max_depth; + int x, y, mb_x; + int block_size = MB_SIZE >> s->block_max_depth; + int block_w = plane_index ? block_size/2 : block_size; + const uint8_t *obmc = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth]; + const int obmc_stride= plane_index ? block_size : 2*block_size; + int ref_stride= s->current_picture.linesize[plane_index]; + uint8_t *dst8= s->current_picture.data[plane_index]; + int w= p->width; + int h= p->height; + + if(s->keyframe || (s->avctx->debug&512)){ + if(mb_y==mb_h) + return; + + if(add){ + for(y=block_w*mb_y; y>= FRAC_BITS; + if(v&(~255)) v= ~(v>>31); + dst8[x + y*ref_stride]= v; + } + } + }else{ + for(y=block_w*mb_y; yb_height << s->block_max_depth; + int mb_y; + for(mb_y=0; mb_y<=mb_h; mb_y++) + predict_slice(s, buf, plane_index, add, mb_y); +} + +static inline void set_blocks(SnowContext *s, int level, int x, int y, int l, int cb, int cr, int mx, int my, int ref, int type){ + const int w= s->b_width << s->block_max_depth; + const int rem_depth= s->block_max_depth - level; + const int index= (x + y*w) << rem_depth; + const int block_w= 1<block[index + i + j*w]= block; + } + } +} + +static inline void init_ref(MotionEstContext *c, uint8_t *src[3], uint8_t *ref[3], uint8_t *ref2[3], int x, int y, int ref_index){ + const int offset[3]= { + y*c-> stride + x, + ((y*c->uvstride + x)>>1), + ((y*c->uvstride + x)>>1), + }; + int i; + for(i=0; i<3; i++){ + c->src[0][i]= src [i]; + c->ref[0][i]= ref [i] + offset[i]; + } + assert(!ref_index); +} + + +/* bitstream functions */ + +extern const int8_t quant3bA[256]; + +#define QEXPSHIFT (7-FRAC_BITS+8) //FIXME try to change this to 0 + +static inline void put_symbol(RangeCoder *c, uint8_t *state, int v, int is_signed){ + int i; + + if(v){ + const int a= FFABS(v); + const int e= av_log2(a); + const int el= FFMIN(e, 10); + put_rac(c, state+0, 0); + + for(i=0; i=el; i--){ + put_rac(c, state+22+9, (a>>i)&1); //22..31 + } + for(; i>=0; i--){ + put_rac(c, state+22+i, (a>>i)&1); //22..31 + } + + if(is_signed) + put_rac(c, state+11 + el, v < 0); //11..21 + }else{ + put_rac(c, state+0, 1); + } +} + +static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){ + if(get_rac(c, state+0)) + return 0; + else{ + int i, e, a; + e= 0; + while(get_rac(c, state+1 + FFMIN(e,9))){ //1..10 + e++; + } + + a= 1; + for(i=e-1; i>=0; i--){ + a += a + get_rac(c, state+22 + FFMIN(i,9)); //22..31 + } + + e= -(is_signed && get_rac(c, state+11 + FFMIN(e,10))); //11..21 + return (a^e)-e; + } +} + +static inline void put_symbol2(RangeCoder *c, uint8_t *state, int v, int log2){ + int i; + int r= log2>=0 ? 1<=0); + assert(log2>=-4); + + while(v >= r){ + put_rac(c, state+4+log2, 1); + v -= r; + log2++; + if(log2>0) r+=r; + } + put_rac(c, state+4+log2, 0); + + for(i=log2-1; i>=0; i--){ + put_rac(c, state+31-i, (v>>i)&1); + } +} + +static inline int get_symbol2(RangeCoder *c, uint8_t *state, int log2){ + int i; + int r= log2>=0 ? 1<=-4); + + while(get_rac(c, state+4+log2)){ + v+= r; + log2++; + if(log2>0) r+=r; + } + + for(i=log2-1; i>=0; i--){ + v+= get_rac(c, state+31-i)<width; + const int h= b->height; + int x,y; + + int run, runs; + x_and_coeff *xc= b->x_coeff; + x_and_coeff *prev_xc= NULL; + x_and_coeff *prev2_xc= xc; + x_and_coeff *parent_xc= parent ? parent->x_coeff : NULL; + x_and_coeff *prev_parent_xc= parent_xc; + + runs= get_symbol2(&s->c, b->state[30], 0); + if(runs-- > 0) run= get_symbol2(&s->c, b->state[1], 3); + else run= INT_MAX; + + for(y=0; yx == 0){ + rt= prev_xc->coeff; + } + for(x=0; xx <= x) + prev_xc++; + if(prev_xc->x == x + 1) + rt= prev_xc->coeff; + else + rt=0; + } + if(parent_xc){ + if(x>>1 > parent_xc->x){ + parent_xc++; + } + if(x>>1 == parent_xc->x){ + p= parent_xc->coeff; + } + } + if(/*ll|*/l|lt|t|rt|p){ + int context= av_log2(/*FFABS(ll) + */3*(l>>1) + (lt>>1) + (t&~1) + (rt>>1) + (p>>1)); + + v=get_rac(&s->c, &b->state[0][context]); + if(v){ + v= 2*(get_symbol2(&s->c, b->state[context + 2], context-4) + 1); + v+=get_rac(&s->c, &b->state[0][16 + 1 + 3 + quant3bA[l&0xFF] + 3*quant3bA[t&0xFF]]); + + xc->x=x; + (xc++)->coeff= v; + } + }else{ + if(!run){ + if(runs-- > 0) run= get_symbol2(&s->c, b->state[1], 3); + else run= INT_MAX; + v= 2*(get_symbol2(&s->c, b->state[0 + 2], 0-4) + 1); + v+=get_rac(&s->c, &b->state[0][16 + 1 + 3]); + + xc->x=x; + (xc++)->coeff= v; + }else{ + int max_run; + run--; + v=0; + + if(y) max_run= FFMIN(run, prev_xc->x - x - 2); + else max_run= FFMIN(run, w-x-1); + if(parent_xc) + max_run= FFMIN(max_run, 2*parent_xc->x - x - 1); + x+= max_run; + run-= max_run; + } + } + } + (xc++)->x= w+1; //end marker + prev_xc= prev2_xc; + prev2_xc= xc; + + if(parent_xc){ + if(y&1){ + while(parent_xc->x != parent->width+1) + parent_xc++; + parent_xc++; + prev_parent_xc= parent_xc; + }else{ + parent_xc= prev_parent_xc; + } + } + } + + (xc++)->x= w+1; //end marker +} + #endif /* AVCODEC_SNOW_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sp5xdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sp5xdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sp5xdec.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sp5xdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -94,29 +94,25 @@ } AVCodec ff_sp5x_decoder = { - "sp5x", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_SP5X, - sizeof(MJpegDecodeContext), - ff_mjpeg_decode_init, - NULL, - ff_mjpeg_decode_end, - sp5x_decode_frame, - CODEC_CAP_DR1, - NULL, - .max_lowres = 5, + .name = "sp5x", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_SP5X, + .priv_data_size = sizeof(MJpegDecodeContext), + .init = ff_mjpeg_decode_init, + .close = ff_mjpeg_decode_end, + .decode = sp5x_decode_frame, + .capabilities = CODEC_CAP_DR1, + .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"), }; AVCodec ff_amv_decoder = { - "amv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_AMV, - sizeof(MJpegDecodeContext), - ff_mjpeg_decode_init, - NULL, - ff_mjpeg_decode_end, - sp5x_decode_frame, - 0, + .name = "amv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_AMV, + .priv_data_size = sizeof(MJpegDecodeContext), + .init = ff_mjpeg_decode_init, + .close = ff_mjpeg_decode_end, + .decode = sp5x_decode_frame, .long_name = NULL_IF_CONFIG_SMALL("AMV Video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sp5x.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sp5x.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sp5x.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sp5x.h 2012-01-11 00:34:30.000000000 +0000 @@ -235,100 +235,4 @@ 124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124 } }; -#if 0 -/* 4NF-M, not ZigZag */ -static const uint8_t sp5x_quant_table_orig[18][64] = -{ - /* index 0, Q50 */ - { 16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, - 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, - 18, 22, 37, 56, 68,109,103, 77, 24, 35, 55, 64, 81,104,113, 92, - 49, 64, 78, 87,103,121,120,101, 72, 92, 95, 98,112,100,103, 99 }, - { 17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, - 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 }, - - /* index 1, Q70 */ - { 10, 7, 6, 10, 14, 24, 31, 37, 7, 7, 8, 11, 16, 35, 36, 33, - 8, 8, 10, 14, 24, 34, 41, 34, 8, 10, 13, 17, 31, 52, 48, 37, - 11, 13, 22, 34, 41, 65, 62, 46, 14, 21, 33, 38, 49, 62, 68, 55, - 29, 38, 47, 52, 62, 73, 72, 61, 43, 55, 57, 59, 67, 60, 62, 59 }, - { 10, 11, 14, 28, 59, 59, 59, 59, 11, 13, 16, 40, 59, 59, 59, 59, - 14, 16, 34, 59, 59, 59, 59, 59, 28, 40, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59 }, - - /* index 2, Q80 */ - { 6, 4, 4, 6, 10, 16, 20, 24, 5, 5, 6, 8, 10, 23, 24, 22, - 6, 5, 6, 10, 16, 23, 28, 22, 6, 7, 9, 12, 20, 35, 32, 25, - 7, 9, 15, 22, 27, 44, 41, 31, 10, 14, 22, 26, 32, 42, 45, 37, - 20, 26, 31, 35, 41, 48, 48, 40, 29, 37, 38, 39, 45, 40, 41, 40 }, - { 7, 7, 10, 19, 40, 40, 40, 40, 7, 8, 10, 26, 40, 40, 40, 40, - 10, 10, 22, 40, 40, 40, 40, 40, 19, 26, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40 }, - - /* index 3, Q85 */ - { 5, 3, 3, 5, 7, 12, 15, 18, 4, 4, 4, 6, 8, 17, 18, 17, - 4, 4, 5, 7, 12, 17, 21, 17, 4, 5, 7, 9, 15, 26, 24, 19, - 5, 7, 11, 17, 20, 33, 31, 23, 7, 11, 17, 19, 24, 31, 34, 28, - 15, 19, 23, 26, 31, 36, 36, 30, 22, 28, 29, 29, 34, 30, 31, 30 }, - { 5, 5, 7, 14, 30, 30, 30, 30, 5, 6, 8, 20, 30, 30, 30, 30, - 7, 8, 17, 30, 30, 30, 30, 30, 14, 20, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30 }, - - /* index 4, Q90 */ - { 3, 2, 2, 3, 5, 8, 10, 12, 2, 2, 3, 4, 5, 12, 12, 11, - 3, 3, 3, 5, 8, 11, 14, 11, 3, 3, 4, 6, 10, 17, 16, 12, - 4, 4, 7, 11, 14, 22, 21, 15, 5, 7, 11, 13, 16, 21, 23, 18, - 10, 13, 16, 17, 21, 24, 24, 20, 14, 18, 19, 20, 22, 20, 21, 20 }, - { 3, 4, 5, 9, 20, 20, 20, 20, 4, 4, 5, 13, 20, 20, 20, 20, - 5, 5, 11, 20, 20, 20, 20, 20, 9, 13, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 }, - - /* index 5, Q60 */ - { 13, 9, 8, 13, 19, 32, 41, 49, 10, 10, 11, 15, 21, 46, 48, 44, - 11, 10, 13, 19, 32, 46, 55, 45, 11, 14, 18, 23, 41, 70, 64, 50, - 14, 18, 30, 45, 54, 87, 82, 62, 19, 28, 44, 51, 65, 83, 90, 74, - 39, 51, 62, 70, 82, 97, 96, 81, 58, 74, 76, 78, 90, 80, 82, 79 }, - { 14, 14, 19, 38, 79, 79, 79, 79, 14, 17, 21, 53, 79, 79, 79, 79, - 19, 21, 45, 79, 79, 79, 79, 79, 38, 53, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79 }, - - /* index 6, Q25 */ - { 32, 22, 20, 32, 48, 80,102,122, 24, 24, 28, 38, 52,116,120,110, - 28, 26, 32, 48, 80,114,138,112, 28, 34, 44, 58,102,174,160,124, - 36, 44, 74,112,136,218,206,154, 48, 70,110,128,162,208,226,184, - 98,128,156,174,206,242,240,202,144,184,190,196,224,200,206,198 }, - { 34, 36, 48, 94,198,198,198,198, 36, 42, 52,132,198,198,198,198, - 48, 52,112,198,198,198,198,198, 94,132,198,198,198,198,198,198, - 198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198, - 198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198 }, - - /* index 7, Q95 */ - { 2, 1, 1, 2, 2, 4, 5, 6, 1, 1, 1, 2, 3, 6, 6, 6, - 1, 1, 2, 2, 4, 6, 7, 6, 1, 2, 2, 3, 5, 9, 8, 6, - 2, 2, 4, 6, 7, 11, 10, 8, 2, 4, 6, 6, 8, 10, 11, 9, - 5, 6, 8, 9, 10, 12, 12, 10, 7, 9, 10, 10, 11, 10, 10, 10 }, - { 2, 2, 2, 5, 10, 10, 10, 10, 2, 2, 3, 7, 10, 10, 10, 10, - 2, 3, 6, 10, 10, 10, 10, 10, 5, 7, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 }, - - /* index 8, Q93 */ - { 2, 2, 1, 2, 3, 6, 7, 9, 2, 2, 2, 3, 4, 8, 8, 8, - 2, 2, 2, 3, 6, 8, 10, 8, 2, 2, 3, 4, 7, 12, 11, 9, - 3, 3, 5, 8, 10, 15, 14, 11, 3, 5, 8, 9, 11, 15, 16, 13, - 7, 9, 11, 12, 14, 17, 17, 14, 10, 13, 13, 14, 16, 14, 14, 14 }, - { 2, 3, 3, 7, 14, 14, 14, 14, 3, 3, 4, 9, 14, 14, 14, 14, - 3, 4, 8, 14, 14, 14, 14, 14, 7, 9, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 } -}; -#endif - #endif /* AVCODEC_SP5X_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sparc/dsputil_vis.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sparc/dsputil_vis.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sparc/dsputil_vis.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sparc/dsputil_vis.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,7 +19,7 @@ */ /* The *no_round* functions have been added by James A. Morrison, 2003,2004. - The vis code from libmpeg2 was adapted for ffmpeg by James A. Morrison. + The vis code from libmpeg2 was adapted for libavcodec by James A. Morrison. */ #include "config.h" @@ -3953,10 +3953,11 @@ { /* VIS-specific optimizations */ int accel = vis_level (); - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; if (accel & ACCEL_SPARC_VIS) { - if(avctx->idct_algo==FF_IDCT_SIMPLEVIS){ + if (avctx->bits_per_raw_sample <= 8 && + avctx->idct_algo == FF_IDCT_SIMPLEVIS) { c->idct_put = ff_simple_idct_put_vis; c->idct_add = ff_simple_idct_add_vis; c->idct = ff_simple_idct_vis; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sunrast.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sunrast.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/sunrast.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/sunrast.c 2012-01-11 00:34:30.000000000 +0000 @@ -46,6 +46,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; + const uint8_t *buf_end = avpkt->data + avpkt->size; SUNRASTContext * const s = avctx->priv_data; AVFrame *picture = data; AVFrame * const p = &s->picture; @@ -53,6 +54,9 @@ uint8_t *ptr; const uint8_t *bufstart = buf; + if (avpkt->size < 32) + return AVERROR_INVALIDDATA; + if (AV_RB32(buf) != 0x59a66a95) { av_log(avctx, AV_LOG_ERROR, "this is not sunras encoded data\n"); return -1; @@ -64,21 +68,25 @@ type = AV_RB32(buf+20); maptype = AV_RB32(buf+24); maplength = AV_RB32(buf+28); + buf += 32; if (type == RT_FORMAT_TIFF || type == RT_FORMAT_IFF) { av_log(avctx, AV_LOG_ERROR, "unsupported (compression) type\n"); return -1; } - if (type > RT_FORMAT_IFF) { + if (type < RT_OLD || type > RT_FORMAT_IFF) { av_log(avctx, AV_LOG_ERROR, "invalid (compression) type\n"); return -1; } + if (av_image_check_size(w, h, 0, avctx)) { + av_log(avctx, AV_LOG_ERROR, "invalid image size\n"); + return -1; + } if (maptype & ~1) { av_log(avctx, AV_LOG_ERROR, "invalid colormap type\n"); return -1; } - buf += 32; switch (depth) { case 1: @@ -98,8 +106,6 @@ if (p->data[0]) avctx->release_buffer(avctx, p); - if (av_image_check_size(w, h, 0, avctx)) - return -1; if (w != avctx->width || h != avctx->height) avcodec_set_dimensions(avctx, w, h); if (avctx->get_buffer(avctx, p) < 0) { @@ -109,6 +115,9 @@ p->pict_type = AV_PICTURE_TYPE_I; + if (buf_end - buf < maplength) + return AVERROR_INVALIDDATA; + if (depth != 8 && maplength) { av_log(avctx, AV_LOG_WARNING, "useless colormap found or file is corrupted, trying to recover\n"); @@ -143,8 +152,11 @@ uint8_t *end = ptr + h*stride; x = 0; - while (ptr != end) { + while (ptr != end && buf < buf_end) { run = 1; + if (buf_end - buf < 1) + return AVERROR_INVALIDDATA; + if ((value = *buf++) == 0x80) { run = *buf++ + 1; if (run != 1) @@ -163,6 +175,8 @@ } } else { for (y=0; y 0)\ + bit_cache = get_bits (bitbuf, 4*stages);\ /* calculate codebook entries for this vector */\ for (j=0; j < stages; j++) {\ entries[j] = (((bit_cache >> (4*(stages - j - 1))) & 0xF) + 16*j) << (level + 1);\ @@ -317,9 +318,9 @@ /* add median of motion vector predictors and clip result */ if (i == 1) - mv->y = ((diff + mid_pred(pmv[0]->y, pmv[1]->y, pmv[2]->y)) << 26) >> 26; + mv->y = sign_extend(diff + mid_pred(pmv[0]->y, pmv[1]->y, pmv[2]->y), 6); else - mv->x = ((diff + mid_pred(pmv[0]->x, pmv[1]->x, pmv[2]->x)) << 26) >> 26; + mv->x = sign_extend(diff + mid_pred(pmv[0]->x, pmv[1]->x, pmv[2]->x), 6); } return 0; @@ -658,6 +659,7 @@ av_dlog(s->avctx, "Error in svq1_decode_frame_header %i\n",result); return result; } + avcodec_set_dimensions(avctx, s->width, s->height); //FIXME this avoids some confusion for "B frames" without 2 references //this should be removed after libavcodec can handle more flexible picture types & ordering @@ -689,12 +691,12 @@ linesize= s->uvlinesize; } - current = s->current_picture.data[i]; + current = s->current_picture.f.data[i]; if(s->pict_type==AV_PICTURE_TYPE_B){ - previous = s->next_picture.data[i]; + previous = s->next_picture.f.data[i]; }else{ - previous = s->last_picture.data[i]; + previous = s->last_picture.f.data[i]; } if (s->pict_type == AV_PICTURE_TYPE_I) { @@ -808,15 +810,14 @@ AVCodec ff_svq1_decoder = { - "svq1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_SVQ1, - sizeof(MpegEncContext), - svq1_decode_init, - NULL, - svq1_decode_end, - svq1_decode_frame, - CODEC_CAP_DR1, + .name = "svq1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_SVQ1, + .priv_data_size = sizeof(MpegEncContext), + .init = svq1_decode_init, + .close = svq1_decode_end, + .decode = svq1_decode_frame, + .capabilities = CODEC_CAP_DR1, .flush= ff_mpeg_flush, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV410P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/svq1enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/svq1enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/svq1enc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/svq1enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -113,10 +113,6 @@ #define QUALITY_THRESHOLD 100 #define THRESHOLD_MULTIPLIER 0.6 -#if HAVE_ALTIVEC -#undef vector -#endif - static int encode_block(SVQ1Context *s, uint8_t *src, uint8_t *ref, uint8_t *decoded, int stride, int level, int threshold, int lambda, int intra){ int count, y, x, i, j, split, best_mean, best_score, best_count; int best_vector[6]; @@ -160,7 +156,7 @@ } best_count=0; - best_score -= ((block_sum[0]*block_sum[0])>>(level+3)); + best_score -= (int)(((unsigned)block_sum[0]*block_sum[0])>>(level+3)); best_mean= (block_sum[0] + (size>>1)) >> (level+3); if(level<4){ @@ -284,11 +280,11 @@ s->m.avctx= s->avctx; s->m.current_picture_ptr= &s->m.current_picture; s->m.last_picture_ptr = &s->m.last_picture; - s->m.last_picture.data[0]= ref_plane; + s->m.last_picture.f.data[0] = ref_plane; s->m.linesize= - s->m.last_picture.linesize[0]= - s->m.new_picture.linesize[0]= - s->m.current_picture.linesize[0]= stride; + s->m.last_picture.f.linesize[0] = + s->m.new_picture.f.linesize[0] = + s->m.current_picture.f.linesize[0] = stride; s->m.width= width; s->m.height= height; s->m.mb_width= block_width; @@ -318,9 +314,9 @@ s->m.current_picture.mb_mean= (uint8_t *)s->dummy; s->m.current_picture.mb_var= (uint16_t*)s->dummy; s->m.current_picture.mc_mb_var= (uint16_t*)s->dummy; - s->m.current_picture.mb_type= s->dummy; + s->m.current_picture.f.mb_type = s->dummy; - s->m.current_picture.motion_val[0]= s->motion_val8[plane] + 2; + s->m.current_picture.f.motion_val[0] = s->motion_val8[plane] + 2; s->m.p_mv_table= s->motion_val16[plane] + s->m.mb_stride + 1; s->m.dsp= s->dsp; //move ff_init_me(&s->m); @@ -328,7 +324,7 @@ s->m.me.dia_size= s->avctx->dia_size; s->m.first_slice_line=1; for (y = 0; y < block_height; y++) { - s->m.new_picture.data[0]= src - y*16*stride; //ugly + s->m.new_picture.f.data[0] = src - y*16*stride; //ugly s->m.mb_y= y; for(i=0; i<16 && i + 16*yrd_total += score[best]; for(i=5; i>=0; i--){ - ff_copy_bits(&s->pb, reorder_buffer[best][i], count[best][i]); + avpriv_copy_bits(&s->pb, reorder_buffer[best][i], count[best][i]); } if(best==0){ s->dsp.put_pixels_tab[0][0](decoded, temp, stride, 16); @@ -540,7 +536,7 @@ return -1; } -// align_put_bits(&s->pb); +// avpriv_align_put_bits(&s->pb); while(put_bits_count(&s->pb) & 31) put_bits(&s->pb, 1, 0); @@ -573,13 +569,13 @@ AVCodec ff_svq1_encoder = { - "svq1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_SVQ1, - sizeof(SVQ1Context), - svq1_encode_init, - svq1_encode_frame, - svq1_encode_end, + .name = "svq1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_SVQ1, + .priv_data_size = sizeof(SVQ1Context), + .init = svq1_encode_init, + .encode = svq1_encode_frame, + .close = svq1_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV410P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/svq3.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/svq3.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/svq3.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/svq3.c 2012-01-11 00:34:30.000000000 +0000 @@ -288,8 +288,8 @@ } /* form component predictions */ - dest = s->current_picture.data[0] + x + y*s->linesize; - src = pic->data[0] + mx + my*s->linesize; + dest = s->current_picture.f.data[0] + x + y*s->linesize; + src = pic->f.data[0] + mx + my*s->linesize; if (emu) { s->dsp.emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, (width + 1), (height + 1), @@ -309,8 +309,8 @@ blocksize++; for (i = 1; i < 3; i++) { - dest = s->current_picture.data[i] + (x >> 1) + (y >> 1)*s->uvlinesize; - src = pic->data[i] + mx + my*s->uvlinesize; + dest = s->current_picture.f.data[i] + (x >> 1) + (y >> 1) * s->uvlinesize; + src = pic->f.data[i] + mx + my * s->uvlinesize; if (emu) { s->dsp.emulated_edge_mc(s->edge_emu_buffer, src, s->uvlinesize, (width + 1), (height + 1), @@ -347,8 +347,8 @@ if (mode != PREDICT_MODE) { pred_motion(h, k, (part_width >> 2), dir, 1, &mx, &my); } else { - mx = s->next_picture.motion_val[0][b_xy][0]<<1; - my = s->next_picture.motion_val[0][b_xy][1]<<1; + mx = s->next_picture.f.motion_val[0][b_xy][0] << 1; + my = s->next_picture.f.motion_val[0][b_xy][1] << 1; if (dir == 0) { mx = ((mx * h->frame_num_offset) / h->prev_frame_num_offset + 1) >> 1; @@ -425,7 +425,9 @@ } /* write back motion vectors */ - fill_rectangle(s->current_picture.motion_val[dir][b_xy], part_width>>2, part_height>>2, h->b_stride, pack16to32(mx,my), 4); + fill_rectangle(s->current_picture.f.motion_val[dir][b_xy], + part_width >> 2, part_height >> 2, h->b_stride, + pack16to32(mx, my), 4); } } @@ -448,7 +450,7 @@ h->topright_samples_available = 0xFFFF; if (mb_type == 0) { /* SKIP */ - if (s->pict_type == AV_PICTURE_TYPE_P || s->next_picture.mb_type[mb_xy] == -1) { + if (s->pict_type == AV_PICTURE_TYPE_P || s->next_picture.f.mb_type[mb_xy] == -1) { svq3_mc_dir_part(s, 16*s->mb_x, 16*s->mb_y, 16, 16, 0, 0, 0, 0, 0, 0); if (s->pict_type == AV_PICTURE_TYPE_B) { @@ -457,7 +459,7 @@ mb_type = MB_TYPE_SKIP; } else { - mb_type = FFMIN(s->next_picture.mb_type[mb_xy], 6); + mb_type = FFMIN(s->next_picture.f.mb_type[mb_xy], 6); if (svq3_mc_dir(h, mb_type, PREDICT_MODE, 0, 0) < 0) return -1; if (svq3_mc_dir(h, mb_type, PREDICT_MODE, 1, 1) < 0) @@ -486,7 +488,7 @@ for (m = 0; m < 2; m++) { if (s->mb_x > 0 && h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - 1]+6] != -1) { for (i = 0; i < 4; i++) { - *(uint32_t *) h->mv_cache[m][scan8[0] - 1 + i*8] = *(uint32_t *) s->current_picture.motion_val[m][b_xy - 1 + i*h->b_stride]; + *(uint32_t *) h->mv_cache[m][scan8[0] - 1 + i*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - 1 + i*h->b_stride]; } } else { for (i = 0; i < 4; i++) { @@ -494,18 +496,18 @@ } } if (s->mb_y > 0) { - memcpy(h->mv_cache[m][scan8[0] - 1*8], s->current_picture.motion_val[m][b_xy - h->b_stride], 4*2*sizeof(int16_t)); + memcpy(h->mv_cache[m][scan8[0] - 1*8], s->current_picture.f.motion_val[m][b_xy - h->b_stride], 4*2*sizeof(int16_t)); memset(&h->ref_cache[m][scan8[0] - 1*8], (h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride]] == -1) ? PART_NOT_AVAILABLE : 1, 4); if (s->mb_x < (s->mb_width - 1)) { - *(uint32_t *) h->mv_cache[m][scan8[0] + 4 - 1*8] = *(uint32_t *) s->current_picture.motion_val[m][b_xy - h->b_stride + 4]; + *(uint32_t *) h->mv_cache[m][scan8[0] + 4 - 1*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - h->b_stride + 4]; h->ref_cache[m][scan8[0] + 4 - 1*8] = (h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride + 1]+6] == -1 || h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride ] ] == -1) ? PART_NOT_AVAILABLE : 1; }else h->ref_cache[m][scan8[0] + 4 - 1*8] = PART_NOT_AVAILABLE; if (s->mb_x > 0) { - *(uint32_t *) h->mv_cache[m][scan8[0] - 1 - 1*8] = *(uint32_t *) s->current_picture.motion_val[m][b_xy - h->b_stride - 1]; + *(uint32_t *) h->mv_cache[m][scan8[0] - 1 - 1*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - h->b_stride - 1]; h->ref_cache[m][scan8[0] - 1 - 1*8] = (h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride - 1]+3] == -1) ? PART_NOT_AVAILABLE : 1; }else h->ref_cache[m][scan8[0] - 1 - 1*8] = PART_NOT_AVAILABLE; @@ -526,7 +528,7 @@ return -1; } else { for (i = 0; i < 4; i++) { - memset(s->current_picture.motion_val[0][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t)); + memset(s->current_picture.f.motion_val[0][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t)); } } if (mb_type != 1) { @@ -534,7 +536,7 @@ return -1; } else { for (i = 0; i < 4; i++) { - memset(s->current_picture.motion_val[1][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t)); + memset(s->current_picture.f.motion_val[1][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t)); } } } @@ -589,7 +591,7 @@ } } - ff_h264_write_back_intra_pred_mode(h); + write_back_intra_pred_mode(h); if (mb_type == 8) { ff_h264_check_intra4x4_pred_mode(h); @@ -621,11 +623,11 @@ if (!IS_INTER(mb_type) && s->pict_type != AV_PICTURE_TYPE_I) { for (i = 0; i < 4; i++) { - memset(s->current_picture.motion_val[0][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t)); + memset(s->current_picture.f.motion_val[0][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t)); } if (s->pict_type == AV_PICTURE_TYPE_B) { for (i = 0; i < 4; i++) { - memset(s->current_picture.motion_val[1][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t)); + memset(s->current_picture.f.motion_val[1][b_xy + i*h->b_stride], 0, 4*2*sizeof(int16_t)); } } } @@ -706,7 +708,7 @@ } h->cbp= cbp; - s->current_picture.mb_type[mb_xy] = mb_type; + s->current_picture.f.mb_type[mb_xy] = mb_type; if (IS_INTRA(mb_type)) { h->chroma_pred_mode = ff_h264_check_intra_pred_mode(h, DC_PRED8x8); @@ -922,7 +924,10 @@ h->b_stride = 4*s->mb_width; - ff_h264_alloc_tables(h); + if (ff_h264_alloc_tables(h) < 0) { + av_log(avctx, AV_LOG_ERROR, "svq3 memory allocation failed\n"); + return AVERROR(ENOMEM); + } } return 0; @@ -966,8 +971,8 @@ } /* for skipping the frame */ - s->current_picture.pict_type = s->pict_type; - s->current_picture.key_frame = (s->pict_type == AV_PICTURE_TYPE_I); + s->current_picture.f.pict_type = s->pict_type; + s->current_picture.f.key_frame = (s->pict_type == AV_PICTURE_TYPE_I); /* Skip B-frames if we do not have reference frames. */ if (s->last_picture_ptr == NULL && s->pict_type == AV_PICTURE_TYPE_B) @@ -1051,7 +1056,7 @@ } if (s->pict_type != AV_PICTURE_TYPE_B && !s->low_delay) { - s->current_picture.mb_type[s->mb_x + s->mb_y*s->mb_stride] = + s->current_picture.f.mb_type[s->mb_x + s->mb_y * s->mb_stride] = (s->pict_type == AV_PICTURE_TYPE_P && mb_type < 8) ? (mb_type - 1) : -1; } } @@ -1089,15 +1094,14 @@ } AVCodec ff_svq3_decoder = { - "svq3", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_SVQ3, - sizeof(SVQ3Context), - svq3_decode_init, - NULL, - svq3_decode_end, - svq3_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_DELAY, + .name = "svq3", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_SVQ3, + .priv_data_size = sizeof(SVQ3Context), + .init = svq3_decode_init, + .close = svq3_decode_end, + .decode = svq3_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_DELAY, .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3"), .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_NONE}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tableprint.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tableprint.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tableprint.h 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tableprint.h 2012-01-11 00:34:30.000000000 +0000 @@ -56,9 +56,9 @@ } /** - * \defgroup printfuncs Predefined functions for printing tables + * @name Predefined functions for printing tables * - * \{ + * @{ */ void write_int8_t_array (const int8_t *, int); void write_uint8_t_array (const uint8_t *, int); @@ -69,7 +69,7 @@ void write_uint8_t_2d_array (const void *, int, int); void write_uint32_t_2d_array(const void *, int, int); void write_float_2d_array (const void *, int, int); -/** \} */ // end of printfuncs group +/** @} */ // end of printfuncs group #define WRITE_ARRAY(prefix, type, name) \ do { \ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/targa.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/targa.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/targa.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/targa.c 2012-01-11 00:34:30.000000000 +0000 @@ -254,15 +254,13 @@ } AVCodec ff_targa_decoder = { - "targa", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_TARGA, - sizeof(TargaContext), - targa_init, - NULL, - targa_end, - decode_frame, - CODEC_CAP_DR1, - NULL, + .name = "targa", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_TARGA, + .priv_data_size = sizeof(TargaContext), + .init = targa_init, + .close = targa_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/thread.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/thread.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/thread.h 2011-04-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/thread.h 2012-01-11 00:34:30.000000000 +0000 @@ -31,17 +31,20 @@ #include "avcodec.h" /** - * Waits for decoding threads to finish and resets internal - * state. Called by avcodec_flush_buffers(). + * Wait for decoding threads to finish and reset internal state. + * Called by avcodec_flush_buffers(). * * @param avctx The context. */ void ff_thread_flush(AVCodecContext *avctx); /** - * Submits a new frame to a decoding thread. + * Submit a new frame to a decoding thread. * Returns the next available frame in picture. *got_picture_ptr * will be 0 if none is available. + * The return value on success is the size of the consumed packet for + * compatiblity with avcodec_decode_video2(). This means the decoder + * has to consume the full packet. * * Parameters are the same as avcodec_decode_video2(). */ @@ -59,8 +62,7 @@ void ff_thread_finish_setup(AVCodecContext *avctx); /** - * Notifies later decoding threads when part of their reference picture - * is ready. + * Notify later decoding threads when part of their reference picture is ready. * Call this when some part of the picture is finished decoding. * Later calls with lower values of progress have no effect. * @@ -72,7 +74,7 @@ void ff_thread_report_progress(AVFrame *f, int progress, int field); /** - * Waits for earlier decoding threads to finish reference pictures + * Wait for earlier decoding threads to finish reference pictures. * Call this before accessing some part of a picture, with a given * value for progress, and it will return after the responsible decoding * thread calls ff_thread_report_progress() with the same or diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tiertexseqv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tiertexseqv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tiertexseqv.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tiertexseqv.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,7 +25,7 @@ */ #include "avcodec.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" @@ -35,15 +35,19 @@ } SeqVideoContext; -static const unsigned char *seq_unpack_rle_block(const unsigned char *src, unsigned char *dst, int dst_size) +static const unsigned char *seq_unpack_rle_block(const unsigned char *src, + const unsigned char *src_end, + unsigned char *dst, int dst_size) { int i, len, sz; GetBitContext gb; int code_table[64]; - /* get the rle codes (at most 64 bytes) */ - init_get_bits(&gb, src, 64 * 8); + /* get the rle codes */ + init_get_bits(&gb, src, (src_end - src) * 8); for (i = 0, sz = 0; i < 64 && sz < dst_size; i++) { + if (get_bits_left(&gb) < 4) + return NULL; code_table[i] = get_sbits(&gb, 4); sz += FFABS(code_table[i]); } @@ -54,8 +58,12 @@ len = code_table[i]; if (len < 0) { len = -len; + if (src_end - src < 1) + return NULL; memset(dst, *src++, FFMIN(len, dst_size)); } else { + if (src_end - src < len) + return NULL; memcpy(dst, src, FFMIN(len, dst_size)); src += len; } @@ -65,25 +73,30 @@ return src; } -static const unsigned char *seq_decode_op1(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst) +static const unsigned char *seq_decode_op1(SeqVideoContext *seq, + const unsigned char *src, + const unsigned char *src_end, + unsigned char *dst) { const unsigned char *color_table; int b, i, len, bits; GetBitContext gb; unsigned char block[8 * 8]; + if (src_end - src < 1) + return NULL; len = *src++; if (len & 0x80) { switch (len & 3) { case 1: - src = seq_unpack_rle_block(src, block, sizeof(block)); + src = seq_unpack_rle_block(src, src_end, block, sizeof(block)); for (b = 0; b < 8; b++) { memcpy(dst, &block[b * 8], 8); dst += seq->frame.linesize[0]; } break; case 2: - src = seq_unpack_rle_block(src, block, sizeof(block)); + src = seq_unpack_rle_block(src, src_end, block, sizeof(block)); for (i = 0; i < 8; i++) { for (b = 0; b < 8; b++) dst[b * seq->frame.linesize[0]] = block[i * 8 + b]; @@ -92,9 +105,13 @@ break; } } else { + if (len <= 0) + return NULL; + bits = ff_log2_tab[len - 1] + 1; + if (src_end - src < len + 8 * bits) + return NULL; color_table = src; src += len; - bits = ff_log2_tab[len - 1] + 1; init_get_bits(&gb, src, bits * 8 * 8); src += bits * 8; for (b = 0; b < 8; b++) { for (i = 0; i < 8; i++) @@ -106,10 +123,16 @@ return src; } -static const unsigned char *seq_decode_op2(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst) +static const unsigned char *seq_decode_op2(SeqVideoContext *seq, + const unsigned char *src, + const unsigned char *src_end, + unsigned char *dst) { int i; + if (src_end - src < 8 * 8) + return NULL; + for (i = 0; i < 8; i++) { memcpy(dst, src, 8); src += 8; @@ -119,11 +142,16 @@ return src; } -static const unsigned char *seq_decode_op3(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst) +static const unsigned char *seq_decode_op3(SeqVideoContext *seq, + const unsigned char *src, + const unsigned char *src_end, + unsigned char *dst) { int pos, offset; do { + if (src_end - src < 2) + return NULL; pos = *src++; offset = ((pos >> 3) & 7) * seq->frame.linesize[0] + (pos & 7); dst[offset] = *src++; @@ -132,8 +160,9 @@ return src; } -static void seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size) +static int seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size) { + const unsigned char *data_end = data + data_size; GetBitContext gb; int flags, i, j, x, y, op; unsigned char c[3]; @@ -144,6 +173,8 @@ if (flags & 1) { palette = (uint32_t *)seq->frame.data[1]; + if (data_end - data < 256 * 3) + return AVERROR_INVALIDDATA; for (i = 0; i < 256; i++) { for (j = 0; j < 3; j++, data++) c[j] = (*data << 2) | (*data >> 4); @@ -153,6 +184,8 @@ } if (flags & 2) { + if (data_end - data < 128) + return AVERROR_INVALIDDATA; init_get_bits(&gb, data, 128 * 8); data += 128; for (y = 0; y < 128; y += 8) for (x = 0; x < 256; x += 8) { @@ -160,17 +193,20 @@ op = get_bits(&gb, 2); switch (op) { case 1: - data = seq_decode_op1(seq, data, dst); + data = seq_decode_op1(seq, data, data_end, dst); break; case 2: - data = seq_decode_op2(seq, data, dst); + data = seq_decode_op2(seq, data, data_end, dst); break; case 3: - data = seq_decode_op3(seq, data, dst); + data = seq_decode_op3(seq, data, data_end, dst); break; } + if (!data) + return AVERROR_INVALIDDATA; } } + return 0; } static av_cold int seqvideo_decode_init(AVCodecContext *avctx) @@ -201,7 +237,8 @@ return -1; } - seqvideo_decode(seq, buf, buf_size); + if (seqvideo_decode(seq, buf, buf_size)) + return AVERROR_INVALIDDATA; *data_size = sizeof(AVFrame); *(AVFrame *)data = seq->frame; @@ -220,14 +257,13 @@ } AVCodec ff_tiertexseqvideo_decoder = { - "tiertexseqvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_TIERTEXSEQVIDEO, - sizeof(SeqVideoContext), - seqvideo_decode_init, - NULL, - seqvideo_decode_end, - seqvideo_decode_frame, - CODEC_CAP_DR1, + .name = "tiertexseqvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_TIERTEXSEQVIDEO, + .priv_data_size = sizeof(SeqVideoContext), + .init = seqvideo_decode_init, + .close = seqvideo_decode_end, + .decode = seqvideo_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tiff.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tiff.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tiff.c 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tiff.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,10 +20,11 @@ */ /** - * TIFF image decoder * @file + * TIFF image decoder * @author Konstantin Shishkov */ + #include "avcodec.h" #if CONFIG_ZLIB #include @@ -172,6 +173,8 @@ } switch(s->compr){ case TIFF_RAW: + if (ssrc + size - src < width) + return AVERROR_INVALIDDATA; if (!s->fill_order) { memcpy(dst, src, width); } else { @@ -279,6 +282,8 @@ uint32_t *pal; const uint8_t *rp, *gp, *bp; + if (end_buf - buf < 12) + return -1; tag = tget_short(&buf, s->le); type = tget_short(&buf, s->le); count = tget_long(&buf, s->le); @@ -338,7 +343,7 @@ case TIFF_SHORT: case TIFF_LONG: s->bpp = 0; - for(i = 0; i < count; i++) s->bpp += tget(&buf, type, s->le); + for(i = 0; i < count && buf < end_buf; i++) s->bpp += tget(&buf, type, s->le); break; default: s->bpp = -1; @@ -452,6 +457,8 @@ case TIFF_PAL: pal = (uint32_t *) s->palette; off = type_sizes[type]; + if (count / 3 > 256 || end_buf - buf < count / 3 * off * 3) + return -1; rp = buf; gp = buf + count / 3 * off; bp = buf + count / 3 * off * 2; @@ -494,12 +501,16 @@ AVFrame *picture = data; AVFrame * const p= (AVFrame*)&s->picture; const uint8_t *orig_buf = buf, *end_buf = buf + buf_size; - int id, le, off, ret; + unsigned off; + int id, le, ret; int i, j, entries; - int stride, soff, ssize; + int stride; + unsigned soff, ssize; uint8_t *dst; //parse image header + if (end_buf - buf < 8) + return AVERROR_INVALIDDATA; id = AV_RL16(buf); buf += 2; if(id == 0x4949) le = 1; else if(id == 0x4D4D) le = 0; @@ -519,9 +530,9 @@ } /* parse image file directory */ off = tget_long(&buf, le); - if(orig_buf + off + 14 >= end_buf){ + if (off >= UINT_MAX - 14 || end_buf - orig_buf < off + 14) { av_log(avctx, AV_LOG_ERROR, "IFD offset is greater than image size\n"); - return -1; + return AVERROR_INVALIDDATA; } buf = orig_buf + off; entries = tget_short(&buf, le); @@ -545,23 +556,23 @@ stride = p->linesize[0]; dst = p->data[0]; for(i = 0; i < s->height; i += s->rps){ - if(s->stripsizes) + if(s->stripsizes) { + if (s->stripsizes >= end_buf) + return AVERROR_INVALIDDATA; ssize = tget(&s->stripsizes, s->sstype, s->le); - else + } else ssize = s->stripsize; - if (ssize > buf_size) { - av_log(avctx, AV_LOG_ERROR, "Buffer size is smaller than strip size\n"); - return -1; - } - if(s->stripdata){ + if (s->stripdata >= end_buf) + return AVERROR_INVALIDDATA; soff = tget(&s->stripdata, s->sot, s->le); }else soff = s->stripoff; - if (soff < 0) { - av_log(avctx, AV_LOG_ERROR, "Invalid stripoff: %d\n", soff); - return AVERROR(EINVAL); + + if (soff > buf_size || ssize > buf_size - soff) { + av_log(avctx, AV_LOG_ERROR, "Invalid strip size/offset\n"); + return -1; } if(tiff_unpack_strip(s, dst, stride, orig_buf + soff, ssize, FFMIN(s->rps, s->height - i)) < 0) break; @@ -620,15 +631,13 @@ } AVCodec ff_tiff_decoder = { - "tiff", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_TIFF, - sizeof(TiffContext), - tiff_init, - NULL, - tiff_end, - decode_frame, - CODEC_CAP_DR1, - NULL, + .name = "tiff", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_TIFF, + .priv_data_size = sizeof(TiffContext), + .init = tiff_init, + .close = tiff_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("TIFF image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tiffenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tiffenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tiffenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tiffenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,10 +20,14 @@ */ /** - * TIFF image encoder * @file + * TIFF image encoder * @author Bartlomiej Wolowiec */ + +#include "libavutil/log.h" +#include "libavutil/opt.h" + #include "avcodec.h" #if CONFIG_ZLIB #include @@ -42,6 +46,7 @@ }; typedef struct TiffEncoderContext { + AVClass *class; ///< for private options AVCodecContext *avctx; AVFrame picture; @@ -216,6 +221,7 @@ uint8_t *yuv_line = NULL; int shift_h, shift_v; + s->avctx = avctx; s->buf_start = buf; s->buf = &ptr; s->buf_size = buf_size; @@ -225,7 +231,11 @@ p->key_frame = 1; avctx->coded_frame= &s->picture; - s->compr = TIFF_PACKBITS; +#if FF_API_TIFFENC_COMPLEVEL + if (avctx->compression_level != FF_COMPRESSION_DEFAULT) + av_log(avctx, AV_LOG_WARNING, "Using compression_level to set compression " + "algorithm is deprecated. Please use the compression_algo private " + "option instead.\n"); if (avctx->compression_level == 0) { s->compr = TIFF_RAW; } else if(avctx->compression_level == 2) { @@ -235,6 +245,7 @@ s->compr = TIFF_DEFLATE; #endif } +#endif s->width = avctx->width; s->height = avctx->height; @@ -442,17 +453,32 @@ return ret; } +#define OFFSET(x) offsetof(TiffEncoderContext, x) +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "compression_algo", NULL, OFFSET(compr), AV_OPT_TYPE_INT, {TIFF_PACKBITS}, TIFF_RAW, TIFF_DEFLATE, VE, "compression_algo" }, + { "packbits", NULL, 0, AV_OPT_TYPE_CONST, {TIFF_PACKBITS}, 0, 0, VE, "compression_algo" }, + { "raw", NULL, 0, AV_OPT_TYPE_CONST, {TIFF_RAW}, 0, 0, VE, "compression_algo" }, + { "lzw", NULL, 0, AV_OPT_TYPE_CONST, {TIFF_LZW}, 0, 0, VE, "compression_algo" }, +#if CONFIG_ZLIB + { "deflate", NULL, 0, AV_OPT_TYPE_CONST, {TIFF_DEFLATE}, 0, 0, VE, "compression_algo" }, +#endif + { NULL }, +}; + +static const AVClass tiffenc_class = { + .class_name = "TIFF encoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVCodec ff_tiff_encoder = { - "tiff", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_TIFF, - sizeof(TiffEncoderContext), - NULL, - encode_frame, - NULL, - NULL, - 0, - NULL, + .name = "tiff", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_TIFF, + .priv_data_size = sizeof(TiffEncoderContext), + .encode = encode_frame, .pix_fmts = (const enum PixelFormat[]) {PIX_FMT_RGB24, PIX_FMT_PAL8, PIX_FMT_GRAY8, PIX_FMT_MONOBLACK, PIX_FMT_MONOWHITE, @@ -461,4 +487,5 @@ PIX_FMT_YUV411P, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("TIFF image"), + .priv_class = &tiffenc_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tiff.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tiff.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tiff.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tiff.h 2012-01-11 00:34:30.000000000 +0000 @@ -20,10 +20,11 @@ */ /** - * TIFF tables * @file + * TIFF tables * @author Konstantin Shishkov */ + #ifndef AVCODEC_TIFF_H #define AVCODEC_TIFF_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tmv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tmv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tmv.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tmv.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,10 +20,10 @@ */ /** - * 8088flex TMV video decoder * @file + * 8088flex TMV video decoder * @author Daniel Verkamp - * @sa http://www.oldskool.org/pc/8088_Corruption + * @see http://www.oldskool.org/pc/8088_Corruption */ #include "avcodec.h" @@ -82,6 +82,12 @@ return avpkt->size; } +static av_cold int tmv_decode_init(AVCodecContext *avctx) +{ + avctx->pix_fmt = PIX_FMT_PAL8; + return 0; +} + static av_cold int tmv_decode_close(AVCodecContext *avctx) { TMVContext *tmv = avctx->priv_data; @@ -97,6 +103,7 @@ .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_TMV, .priv_data_size = sizeof(TMVContext), + .init = tmv_decode_init, .close = tmv_decode_close, .decode = tmv_decode_frame, .capabilities = CODEC_CAP_DR1, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/truemotion1.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/truemotion1.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/truemotion1.c 2011-04-22 04:56:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/truemotion1.c 2012-01-11 00:34:30.000000000 +0000 @@ -892,14 +892,13 @@ } AVCodec ff_truemotion1_decoder = { - "truemotion1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_TRUEMOTION1, - sizeof(TrueMotion1Context), - truemotion1_decode_init, - NULL, - truemotion1_decode_end, - truemotion1_decode_frame, - CODEC_CAP_DR1, + .name = "truemotion1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_TRUEMOTION1, + .priv_data_size = sizeof(TrueMotion1Context), + .init = truemotion1_decode_init, + .close = truemotion1_decode_end, + .decode = truemotion1_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 1.0"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/truemotion1data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/truemotion1data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/truemotion1data.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/truemotion1data.h 2012-01-11 00:34:30.000000000 +0000 @@ -2,9 +2,9 @@ * Duck Truemotion v1 Decoding Tables * * Data in this file was originally part of VpVision from On2 which is - * distributed under the GNU GPL. It is redistributed with ffmpeg under the - * GNU LGPL using the common understanding that data tables necessary for - * decoding algorithms are not necessarily licensable. + * distributed under the GNU GPL. It is redistributed with libavcodec under + * the GNU LGPL using the common understanding that data tables necessary + * for decoding algorithms are not necessarily copyrightable. * * This file is part of Libav. * diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/truemotion2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/truemotion2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/truemotion2.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/truemotion2.c 2012-01-11 00:34:30.000000000 +0000 @@ -272,6 +272,8 @@ len = AV_RB32(buf); buf += 4; cur += 4; } if(len > 0) { + if (skip <= cur) + return -1; init_get_bits(&ctx->gb, buf, (skip - cur) * 8); if(tm2_read_deltas(ctx, stream_id) == -1) return -1; @@ -286,6 +288,8 @@ buf += 4; cur += 4; buf += 4; cur += 4; /* unused by decoder */ + if (skip <= cur) + return -1; init_get_bits(&ctx->gb, buf, (skip - cur) * 8); if(tm2_build_huff_table(ctx, &codes) == -1) return -1; @@ -303,6 +307,8 @@ ctx->tok_lens[stream_id] = toks; len = AV_RB32(buf); buf += 4; cur += 4; if(len > 0) { + if (skip <= cur) + return -1; init_get_bits(&ctx->gb, buf, (skip - cur) * 8); for(i = 0; i < toks; i++) { if (get_bits_left(&ctx->gb) <= 0) { @@ -864,14 +870,13 @@ } AVCodec ff_truemotion2_decoder = { - "truemotion2", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_TRUEMOTION2, - sizeof(TM2Context), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "truemotion2", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_TRUEMOTION2, + .priv_data_size = sizeof(TM2Context), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 2.0"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/truespeech.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/truespeech.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/truespeech.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/truespeech.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,8 @@ #include "libavutil/intreadwrite.h" #include "avcodec.h" +#include "dsputil.h" +#include "get_bits.h" #include "truespeech_data.h" /** @@ -32,14 +34,17 @@ * TrueSpeech decoder context */ typedef struct { + AVFrame frame; + DSPContext dsp; /* input data */ - int16_t vector[8]; //< input vector: 5/5/4/4/4/3/3/3 - int offset1[2]; //< 8-bit value, used in one copying offset - int offset2[4]; //< 7-bit value, encodes offsets for copying and for two-point filter - int pulseoff[4]; //< 4-bit offset of pulse values block - int pulsepos[4]; //< 27-bit variable, encodes 7 pulse positions - int pulseval[4]; //< 7x2-bit pulse values - int flag; //< 1-bit flag, shows how to choose filters + uint8_t buffer[32]; + int16_t vector[8]; ///< input vector: 5/5/4/4/4/3/3/3 + int offset1[2]; ///< 8-bit value, used in one copying offset + int offset2[4]; ///< 7-bit value, encodes offsets for copying and for two-point filter + int pulseoff[4]; ///< 4-bit offset of pulse values block + int pulsepos[4]; ///< 27-bit variable, encodes 7 pulse positions + int pulseval[4]; ///< 7x2-bit pulse values + int flag; ///< 1-bit flag, shows how to choose filters /* temporary data */ int filtbuf[146]; // some big vector used for storing filters int prevfilt[8]; // filter from previous frame @@ -54,100 +59,69 @@ static av_cold int truespeech_decode_init(AVCodecContext * avctx) { -// TSContext *c = avctx->priv_data; + TSContext *c = avctx->priv_data; + + if (avctx->channels != 1) { + av_log_ask_for_sample(avctx, "Unsupported channel count: %d\n", avctx->channels); + return AVERROR(EINVAL); + } avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + dsputil_init(&c->dsp, avctx); + + avcodec_get_frame_defaults(&c->frame); + avctx->coded_frame = &c->frame; + return 0; } static void truespeech_read_frame(TSContext *dec, const uint8_t *input) { - uint32_t t; - - /* first dword */ - t = AV_RL32(input); - input += 4; - - dec->flag = t & 1; - - dec->vector[0] = ts_codebook[0][(t >> 1) & 0x1F]; - dec->vector[1] = ts_codebook[1][(t >> 6) & 0x1F]; - dec->vector[2] = ts_codebook[2][(t >> 11) & 0xF]; - dec->vector[3] = ts_codebook[3][(t >> 15) & 0xF]; - dec->vector[4] = ts_codebook[4][(t >> 19) & 0xF]; - dec->vector[5] = ts_codebook[5][(t >> 23) & 0x7]; - dec->vector[6] = ts_codebook[6][(t >> 26) & 0x7]; - dec->vector[7] = ts_codebook[7][(t >> 29) & 0x7]; - - /* second dword */ - t = AV_RL32(input); - input += 4; - - dec->offset2[0] = (t >> 0) & 0x7F; - dec->offset2[1] = (t >> 7) & 0x7F; - dec->offset2[2] = (t >> 14) & 0x7F; - dec->offset2[3] = (t >> 21) & 0x7F; - - dec->offset1[0] = ((t >> 28) & 0xF) << 4; - - /* third dword */ - t = AV_RL32(input); - input += 4; - - dec->pulseval[0] = (t >> 0) & 0x3FFF; - dec->pulseval[1] = (t >> 14) & 0x3FFF; - - dec->offset1[1] = (t >> 28) & 0x0F; - - /* fourth dword */ - t = AV_RL32(input); - input += 4; - - dec->pulseval[2] = (t >> 0) & 0x3FFF; - dec->pulseval[3] = (t >> 14) & 0x3FFF; - - dec->offset1[1] |= ((t >> 28) & 0x0F) << 4; - - /* fifth dword */ - t = AV_RL32(input); - input += 4; - - dec->pulsepos[0] = (t >> 4) & 0x7FFFFFF; + GetBitContext gb; - dec->pulseoff[0] = (t >> 0) & 0xF; - - dec->offset1[0] |= (t >> 31) & 1; - - /* sixth dword */ - t = AV_RL32(input); - input += 4; - - dec->pulsepos[1] = (t >> 4) & 0x7FFFFFF; - - dec->pulseoff[1] = (t >> 0) & 0xF; - - dec->offset1[0] |= ((t >> 31) & 1) << 1; - - /* seventh dword */ - t = AV_RL32(input); - input += 4; - - dec->pulsepos[2] = (t >> 4) & 0x7FFFFFF; - - dec->pulseoff[2] = (t >> 0) & 0xF; - - dec->offset1[0] |= ((t >> 31) & 1) << 2; - - /* eighth dword */ - t = AV_RL32(input); - input += 4; - - dec->pulsepos[3] = (t >> 4) & 0x7FFFFFF; - - dec->pulseoff[3] = (t >> 0) & 0xF; - - dec->offset1[0] |= ((t >> 31) & 1) << 3; + dec->dsp.bswap_buf((uint32_t *)dec->buffer, (const uint32_t *)input, 8); + init_get_bits(&gb, dec->buffer, 32 * 8); + dec->vector[7] = ts_codebook[7][get_bits(&gb, 3)]; + dec->vector[6] = ts_codebook[6][get_bits(&gb, 3)]; + dec->vector[5] = ts_codebook[5][get_bits(&gb, 3)]; + dec->vector[4] = ts_codebook[4][get_bits(&gb, 4)]; + dec->vector[3] = ts_codebook[3][get_bits(&gb, 4)]; + dec->vector[2] = ts_codebook[2][get_bits(&gb, 4)]; + dec->vector[1] = ts_codebook[1][get_bits(&gb, 5)]; + dec->vector[0] = ts_codebook[0][get_bits(&gb, 5)]; + dec->flag = get_bits1(&gb); + + dec->offset1[0] = get_bits(&gb, 4) << 4; + dec->offset2[3] = get_bits(&gb, 7); + dec->offset2[2] = get_bits(&gb, 7); + dec->offset2[1] = get_bits(&gb, 7); + dec->offset2[0] = get_bits(&gb, 7); + + dec->offset1[1] = get_bits(&gb, 4); + dec->pulseval[1] = get_bits(&gb, 14); + dec->pulseval[0] = get_bits(&gb, 14); + + dec->offset1[1] |= get_bits(&gb, 4) << 4; + dec->pulseval[3] = get_bits(&gb, 14); + dec->pulseval[2] = get_bits(&gb, 14); + + dec->offset1[0] |= get_bits1(&gb); + dec->pulsepos[0] = get_bits_long(&gb, 27); + dec->pulseoff[0] = get_bits(&gb, 4); + + dec->offset1[0] |= get_bits1(&gb) << 1; + dec->pulsepos[1] = get_bits_long(&gb, 27); + dec->pulseoff[1] = get_bits(&gb, 4); + + dec->offset1[0] |= get_bits1(&gb) << 2; + dec->pulsepos[2] = get_bits_long(&gb, 27); + dec->pulseoff[2] = get_bits(&gb, 4); + + dec->offset1[0] |= get_bits1(&gb) << 3; + dec->pulsepos[3] = get_bits_long(&gb, 27); + dec->pulseoff[3] = get_bits(&gb, 4); } static void truespeech_correlate_filter(TSContext *dec) @@ -157,7 +131,7 @@ for(i = 0; i < 8; i++){ if(i > 0){ - memcpy(tmp, dec->cvector, i * 2); + memcpy(tmp, dec->cvector, i * sizeof(*tmp)); for(j = 0; j < i; j++) dec->cvector[j] = ((tmp[i - j - 1] * dec->vector[i]) + (dec->cvector[j] << 15) + 0x4000) >> 15; @@ -199,12 +173,13 @@ t = dec->offset2[quart]; if(t == 127){ - memset(dec->newvec, 0, 60 * 2); + memset(dec->newvec, 0, 60 * sizeof(*dec->newvec)); return; } for(i = 0; i < 146; i++) tmp[i] = dec->filtbuf[i]; off = (t / 25) + dec->offset1[quart >> 1] + 18; + off = av_clip(off, 0, 145); ptr0 = tmp + 145 - off; ptr1 = tmp + 146; filter = (const int16_t*)ts_order2_coeffs + (t % 25) * 2; @@ -224,7 +199,7 @@ int16_t *ptr2; int coef; - memset(out, 0, 60 * 2); + memset(out, 0, 60 * sizeof(*out)); for(i = 0; i < 7; i++) { t = dec->pulseval[quart] & 3; dec->pulseval[quart] >>= 2; @@ -263,8 +238,7 @@ { int i; - for(i = 0; i < 86; i++) - dec->filtbuf[i] = dec->filtbuf[i + 60]; + memmove(dec->filtbuf, &dec->filtbuf[60], 86 * sizeof(*dec->filtbuf)); for(i = 0; i < 60; i++){ dec->filtbuf[i + 86] = out[i] + dec->newvec[i] - (dec->newvec[i] >> 3); out[i] += dec->newvec[i]; @@ -330,65 +304,66 @@ c->prevfilt[i] = c->cvector[i]; } -static int truespeech_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int truespeech_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; TSContext *c = avctx->priv_data; int i, j; - short *samples = data; - int consumed = 0; - int16_t out_buf[240]; - int iterations; + int16_t *samples; + int iterations, ret; - if (!buf_size) - return 0; + iterations = buf_size / 32; - if (buf_size < 32) { + if (!iterations) { av_log(avctx, AV_LOG_ERROR, "Too small input buffer (%d bytes), need at least 32 bytes\n", buf_size); return -1; } - iterations = FFMIN(buf_size / 32, *data_size / 480); + + /* get output buffer */ + c->frame.nb_samples = iterations * 240; + if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (int16_t *)c->frame.data[0]; + + memset(samples, 0, iterations * 240 * sizeof(*samples)); + for(j = 0; j < iterations; j++) { - truespeech_read_frame(c, buf + consumed); - consumed += 32; + truespeech_read_frame(c, buf); + buf += 32; truespeech_correlate_filter(c); truespeech_filters_merge(c); - memset(out_buf, 0, 240 * 2); for(i = 0; i < 4; i++) { truespeech_apply_twopoint_filter(c, i); - truespeech_place_pulses(c, out_buf + i * 60, i); - truespeech_update_filters(c, out_buf + i * 60, i); - truespeech_synth(c, out_buf + i * 60, i); + truespeech_place_pulses (c, samples, i); + truespeech_update_filters(c, samples, i); + truespeech_synth (c, samples, i); + samples += 60; } truespeech_save_prevvec(c); - - /* finally output decoded frame */ - for(i = 0; i < 240; i++) - *samples++ = out_buf[i]; - } - *data_size = consumed * 15; + *got_frame_ptr = 1; + *(AVFrame *)data = c->frame; - return consumed; + return buf_size; } AVCodec ff_truespeech_decoder = { - "truespeech", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_TRUESPEECH, - sizeof(TSContext), - truespeech_decode_init, - NULL, - NULL, - truespeech_decode_frame, + .name = "truespeech", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_TRUESPEECH, + .priv_data_size = sizeof(TSContext), + .init = truespeech_decode_init, + .decode = truespeech_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("DSP Group TrueSpeech"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tscc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tscc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tscc.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tscc.c 2012-01-11 00:34:30.000000000 +0000 @@ -88,7 +88,7 @@ return -1; } - zret = inflateReset(&(c->zstream)); + zret = inflateReset(&c->zstream); if (zret != Z_OK) { av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", zret); return -1; @@ -97,7 +97,7 @@ c->zstream.avail_in = len; c->zstream.next_out = c->decomp_buf; c->zstream.avail_out = c->decomp_size; - zret = inflate(&(c->zstream), Z_FINISH); + zret = inflate(&c->zstream, Z_FINISH); // Z_DATA_ERROR means empty picture if ((zret != Z_OK) && (zret != Z_STREAM_END) && (zret != Z_DATA_ERROR)) { av_log(avctx, AV_LOG_ERROR, "Inflate error: %d\n", zret); @@ -143,7 +143,7 @@ c->height = avctx->height; // Needed if zlib unused or init aborted before inflateInit - memset(&(c->zstream), 0, sizeof(z_stream)); + memset(&c->zstream, 0, sizeof(z_stream)); switch(avctx->bits_per_coded_sample){ case 8: avctx->pix_fmt = PIX_FMT_PAL8; break; case 16: avctx->pix_fmt = PIX_FMT_RGB555; break; @@ -155,7 +155,7 @@ return -1; } c->bpp = avctx->bits_per_coded_sample; - // buffer size for RLE 'best' case when 2-byte code preceeds each pixel and there may be padding after it too + // buffer size for RLE 'best' case when 2-byte code precedes each pixel and there may be padding after it too c->decomp_size = (((avctx->width * c->bpp + 7) >> 3) + 3 * avctx->width + 2) * avctx->height + 2; /* Allocate decompression buffer */ @@ -169,7 +169,7 @@ c->zstream.zalloc = Z_NULL; c->zstream.zfree = Z_NULL; c->zstream.opaque = Z_NULL; - zret = inflateInit(&(c->zstream)); + zret = inflateInit(&c->zstream); if (zret != Z_OK) { av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret); return 1; @@ -193,21 +193,20 @@ if (c->pic.data[0]) avctx->release_buffer(avctx, &c->pic); - inflateEnd(&(c->zstream)); + inflateEnd(&c->zstream); return 0; } AVCodec ff_tscc_decoder = { - "camtasia", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_TSCC, - sizeof(CamtasiaContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Capture Codec"), + .name = "camtasia", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_TSCC, + .priv_data_size = sizeof(CamtasiaContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Capture Codec"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tta.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tta.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/tta.c 2011-04-22 04:56:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/tta.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,19 +22,19 @@ /** * @file * TTA (The Lossless True Audio) decoder - * (www.true-audio.com or tta.corecodec.org) + * @see http://www.true-audio.com/ + * @see http://tta.corecodec.org/ * @author Alex Beregszaszi - * */ -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE //#define DEBUG #include #include "avcodec.h" #include "get_bits.h" -#define FORMAT_INT 1 -#define FORMAT_FLOAT 3 +#define FORMAT_SIMPLE 1 +#define FORMAT_ENCRYPTED 2 #define MAX_ORDER 16 typedef struct TTAFilter { @@ -56,9 +56,10 @@ typedef struct TTAContext { AVCodecContext *avctx; + AVFrame frame; GetBitContext gb; - int flags, channels, bps, is_float, data_length; + int format, channels, bps, data_length; int frame_length, last_frame_length, total_frames; int32_t *decode_buffer; @@ -66,23 +67,6 @@ TTAChannel *ch_ctx; } TTAContext; -#if 0 -static inline int shift_1(int i) -{ - if (i < 32) - return 1 << i; - else - return 0x80000000; // 16 << 31 -} - -static inline int shift_16(int i) -{ - if (i < 28) - return 16 << i; - else - return 0x80000000; // 16 << 27 -} -#else static const uint32_t shift_1[] = { 0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010, 0x00000020, 0x00000040, 0x00000080, @@ -97,7 +81,6 @@ }; static const uint32_t * const shift_16 = shift_1 + 4; -#endif static const int32_t ttafilter_configs[4][2] = { {10, 1}, @@ -200,7 +183,7 @@ int ret = 0; // count ones - while(get_bits1(gb)) + while (get_bits_left(gb) > 0 && get_bits1(gb)) ret++; return ret; } @@ -216,61 +199,60 @@ if (avctx->extradata_size < 30) return -1; - init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size); + init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size * 8); if (show_bits_long(&s->gb, 32) == AV_RL32("TTA1")) { /* signature */ skip_bits(&s->gb, 32); -// if (get_bits_long(&s->gb, 32) != av_bswap32(AV_RL32("TTA1"))) { -// av_log(s->avctx, AV_LOG_ERROR, "Missing magic\n"); -// return -1; -// } - - s->flags = get_bits(&s->gb, 16); - if (s->flags != 1 && s->flags != 3) - { - av_log(s->avctx, AV_LOG_ERROR, "Invalid flags\n"); + + s->format = get_bits(&s->gb, 16); + if (s->format > 2) { + av_log(s->avctx, AV_LOG_ERROR, "Invalid format\n"); return -1; } - s->is_float = (s->flags == FORMAT_FLOAT); + if (s->format == FORMAT_ENCRYPTED) { + av_log_missing_feature(s->avctx, "Encrypted TTA", 0); + return AVERROR(EINVAL); + } avctx->channels = s->channels = get_bits(&s->gb, 16); avctx->bits_per_coded_sample = get_bits(&s->gb, 16); s->bps = (avctx->bits_per_coded_sample + 7) / 8; avctx->sample_rate = get_bits_long(&s->gb, 32); - if(avctx->sample_rate > 1000000){ //prevent FRAME_TIME * avctx->sample_rate from overflowing and sanity check - av_log(avctx, AV_LOG_ERROR, "sample_rate too large\n"); - return -1; - } s->data_length = get_bits_long(&s->gb, 32); skip_bits(&s->gb, 32); // CRC32 of header - if (s->is_float) - { - avctx->sample_fmt = AV_SAMPLE_FMT_FLT; - av_log_ask_for_sample(s->avctx, "Unsupported sample format.\n"); - return -1; + if (s->channels == 0) { + av_log(s->avctx, AV_LOG_ERROR, "Invalid number of channels\n"); + return AVERROR_INVALIDDATA; } - else switch(s->bps) { -// case 1: avctx->sample_fmt = AV_SAMPLE_FMT_U8; break; - case 2: avctx->sample_fmt = AV_SAMPLE_FMT_S16; break; -// case 3: avctx->sample_fmt = AV_SAMPLE_FMT_S24; break; - case 4: avctx->sample_fmt = AV_SAMPLE_FMT_S32; break; - default: - av_log_ask_for_sample(s->avctx, - "Invalid/unsupported sample format.\n"); - return -1; + + switch(s->bps) { + case 2: + avctx->sample_fmt = AV_SAMPLE_FMT_S16; + avctx->bits_per_raw_sample = 16; + break; + case 3: + avctx->sample_fmt = AV_SAMPLE_FMT_S32; + avctx->bits_per_raw_sample = 24; + break; + default: + av_log(avctx, AV_LOG_ERROR, "Invalid/unsupported sample format.\n"); + return AVERROR_INVALIDDATA; } - // FIXME: horribly broken, but directly from reference source -#define FRAME_TIME 1.04489795918367346939 - s->frame_length = (int)(FRAME_TIME * avctx->sample_rate); + // prevent overflow + if (avctx->sample_rate > 0x7FFFFF) { + av_log(avctx, AV_LOG_ERROR, "sample_rate too large\n"); + return AVERROR(EINVAL); + } + s->frame_length = 256 * avctx->sample_rate / 245; s->last_frame_length = s->data_length % s->frame_length; s->total_frames = s->data_length / s->frame_length + (s->last_frame_length ? 1 : 0); - av_log(s->avctx, AV_LOG_DEBUG, "flags: %x chans: %d bps: %d rate: %d block: %d\n", - s->flags, avctx->channels, avctx->bits_per_coded_sample, avctx->sample_rate, + av_log(s->avctx, AV_LOG_DEBUG, "format: %d chans: %d bps: %d rate: %d block: %d\n", + s->format, avctx->channels, avctx->bits_per_coded_sample, avctx->sample_rate, avctx->block_align); av_log(s->avctx, AV_LOG_DEBUG, "data_length: %d frame_length: %d last: %d total: %d\n", s->data_length, s->frame_length, s->last_frame_length, s->total_frames); @@ -285,165 +267,159 @@ return -1; } - s->decode_buffer = av_mallocz(sizeof(int32_t)*s->frame_length*s->channels); + if (s->bps == 2) { + s->decode_buffer = av_mallocz(sizeof(int32_t)*s->frame_length*s->channels); + if (!s->decode_buffer) + return AVERROR(ENOMEM); + } s->ch_ctx = av_malloc(avctx->channels * sizeof(*s->ch_ctx)); - if (!s->ch_ctx) + if (!s->ch_ctx) { + av_freep(&s->decode_buffer); return AVERROR(ENOMEM); + } } else { av_log(avctx, AV_LOG_ERROR, "Wrong extradata present\n"); return -1; } + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } -static int tta_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int tta_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; TTAContext *s = avctx->priv_data; - int i; + int i, ret; + int cur_chan = 0, framelen = s->frame_length; + int32_t *p; init_get_bits(&s->gb, buf, buf_size*8); - { - int cur_chan = 0, framelen = s->frame_length; - int32_t *p; - if (*data_size < (framelen * s->channels * 2)) { - av_log(avctx, AV_LOG_ERROR, "Output buffer size is too small.\n"); - return -1; + // FIXME: seeking + s->total_frames--; + if (!s->total_frames && s->last_frame_length) + framelen = s->last_frame_length; + + /* get output buffer */ + s->frame.nb_samples = framelen; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + + // decode directly to output buffer for 24-bit sample format + if (s->bps == 3) + s->decode_buffer = s->frame.data[0]; + + // init per channel states + for (i = 0; i < s->channels; i++) { + s->ch_ctx[i].predictor = 0; + ttafilter_init(&s->ch_ctx[i].filter, ttafilter_configs[s->bps-1][0], ttafilter_configs[s->bps-1][1]); + rice_init(&s->ch_ctx[i].rice, 10, 10); + } + + for (p = s->decode_buffer; p < s->decode_buffer + (framelen * s->channels); p++) { + int32_t *predictor = &s->ch_ctx[cur_chan].predictor; + TTAFilter *filter = &s->ch_ctx[cur_chan].filter; + TTARice *rice = &s->ch_ctx[cur_chan].rice; + uint32_t unary, depth, k; + int32_t value; + + unary = tta_get_unary(&s->gb); + + if (unary == 0) { + depth = 0; + k = rice->k0; + } else { + depth = 1; + k = rice->k1; + unary--; } - // FIXME: seeking - s->total_frames--; - if (!s->total_frames && s->last_frame_length) - framelen = s->last_frame_length; - - // init per channel states - for (i = 0; i < s->channels; i++) { - s->ch_ctx[i].predictor = 0; - ttafilter_init(&s->ch_ctx[i].filter, ttafilter_configs[s->bps-1][0], ttafilter_configs[s->bps-1][1]); - rice_init(&s->ch_ctx[i].rice, 10, 10); - } - - for (p = s->decode_buffer; p < s->decode_buffer + (framelen * s->channels); p++) { - int32_t *predictor = &s->ch_ctx[cur_chan].predictor; - TTAFilter *filter = &s->ch_ctx[cur_chan].filter; - TTARice *rice = &s->ch_ctx[cur_chan].rice; - uint32_t unary, depth, k; - int32_t value; - - unary = tta_get_unary(&s->gb); - - if (unary == 0) { - depth = 0; - k = rice->k0; - } else { - depth = 1; - k = rice->k1; - unary--; - } - if (get_bits_left(&s->gb) < k) - return -1; + if (get_bits_left(&s->gb) < k) + return -1; - if (k) { - if (k > MIN_CACHE_BITS) - return -1; - value = (unary << k) + get_bits(&s->gb, k); - } else - value = unary; - - // FIXME: copy paste from original - switch (depth) { - case 1: - rice->sum1 += value - (rice->sum1 >> 4); - if (rice->k1 > 0 && rice->sum1 < shift_16[rice->k1]) - rice->k1--; - else if(rice->sum1 > shift_16[rice->k1 + 1]) - rice->k1++; - value += shift_1[rice->k0]; - default: - rice->sum0 += value - (rice->sum0 >> 4); - if (rice->k0 > 0 && rice->sum0 < shift_16[rice->k0]) - rice->k0--; - else if(rice->sum0 > shift_16[rice->k0 + 1]) - rice->k0++; - } + if (k) { + if (k > MIN_CACHE_BITS) + return -1; + value = (unary << k) + get_bits(&s->gb, k); + } else + value = unary; + + // FIXME: copy paste from original + switch (depth) { + case 1: + rice->sum1 += value - (rice->sum1 >> 4); + if (rice->k1 > 0 && rice->sum1 < shift_16[rice->k1]) + rice->k1--; + else if(rice->sum1 > shift_16[rice->k1 + 1]) + rice->k1++; + value += shift_1[rice->k0]; + default: + rice->sum0 += value - (rice->sum0 >> 4); + if (rice->k0 > 0 && rice->sum0 < shift_16[rice->k0]) + rice->k0--; + else if(rice->sum0 > shift_16[rice->k0 + 1]) + rice->k0++; + } - // extract coded value + // extract coded value #define UNFOLD(x) (((x)&1) ? (++(x)>>1) : (-(x)>>1)) - *p = UNFOLD(value); + *p = UNFOLD(value); - // run hybrid filter - ttafilter_process(filter, p, 0); + // run hybrid filter + ttafilter_process(filter, p, 0); - // fixed order prediction + // fixed order prediction #define PRED(x, k) (int32_t)((((uint64_t)x << k) - x) >> k) - switch (s->bps) { - case 1: *p += PRED(*predictor, 4); break; - case 2: - case 3: *p += PRED(*predictor, 5); break; - case 4: *p += *predictor; break; - } - *predictor = *p; - -#if 0 - // extract 32bit float from last two int samples - if (s->is_float && ((p - data) & 1)) { - uint32_t neg = *p & 0x80000000; - uint32_t hi = *(p - 1); - uint32_t lo = abs(*p) - 1; - - hi += (hi || lo) ? 0x3f80 : 0; - // SWAP16: swap all the 16 bits - *(p - 1) = (hi << 16) | SWAP16(lo) | neg; - } -#endif + switch (s->bps) { + case 1: *p += PRED(*predictor, 4); break; + case 2: + case 3: *p += PRED(*predictor, 5); break; + case 4: *p += *predictor; break; + } + *predictor = *p; - /*if ((get_bits_count(&s->gb)+7)/8 > buf_size) - { - av_log(NULL, AV_LOG_INFO, "overread!!\n"); - break; - }*/ - - // flip channels - if (cur_chan < (s->channels-1)) - cur_chan++; - else { - // decorrelate in case of stereo integer - if (!s->is_float && (s->channels > 1)) { - int32_t *r = p - 1; - for (*p += *r / 2; r > p - s->channels; r--) - *r = *(r + 1) - *r; - } - cur_chan = 0; + // flip channels + if (cur_chan < (s->channels-1)) + cur_chan++; + else { + // decorrelate in case of stereo integer + if (s->channels > 1) { + int32_t *r = p - 1; + for (*p += *r / 2; r > p - s->channels; r--) + *r = *(r + 1) - *r; } + cur_chan = 0; } + } - if (get_bits_left(&s->gb) < 32) - return -1; - skip_bits(&s->gb, 32); // frame crc + if (get_bits_left(&s->gb) < 32) + return -1; + skip_bits(&s->gb, 32); // frame crc - // convert to output buffer - switch(s->bps) { - case 2: { - uint16_t *samples = data; - for (p = s->decode_buffer; p < s->decode_buffer + (framelen * s->channels); p++) { -// *samples++ = (unsigned char)*p; -// *samples++ = (unsigned char)(*p >> 8); - *samples++ = *p; - } - *data_size = (uint8_t *)samples - (uint8_t *)data; - break; - } - default: - av_log(s->avctx, AV_LOG_ERROR, "Error, only 16bit samples supported!\n"); - } + // convert to output buffer + if (s->bps == 2) { + int16_t *samples = (int16_t *)s->frame.data[0]; + for (p = s->decode_buffer; p < s->decode_buffer + (framelen * s->channels); p++) + *samples++ = *p; + } else { + // shift samples for 24-bit sample format + int32_t *samples = (int32_t *)s->frame.data[0]; + for (i = 0; i < framelen * s->channels; i++) + *samples++ <<= 8; + // reset decode buffer + s->decode_buffer = NULL; } -// return get_bits_count(&s->gb)+7)/8; + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return buf_size; } @@ -457,13 +433,13 @@ } AVCodec ff_tta_decoder = { - "tta", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_TTA, - sizeof(TTAContext), - tta_decode_init, - NULL, - tta_decode_close, - tta_decode_frame, + .name = "tta", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_TTA, + .priv_data_size = sizeof(TTAContext), + .init = tta_decode_init, + .close = tta_decode_close, + .decode = tta_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("True Audio (TTA)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/twinvq.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/twinvq.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/twinvq.c 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/twinvq.c 2012-01-11 00:34:30.000000000 +0000 @@ -174,6 +174,7 @@ typedef struct TwinContext { AVCodecContext *avctx; + AVFrame frame; DSPContext dsp; FFTContext mdct_ctx[3]; @@ -195,6 +196,7 @@ float *curr_frame; ///< non-interleaved output float *prev_frame; ///< non-interleaved previous frame int last_block_pos[2]; + int discarded_packets; float *cos_tabs[3]; @@ -411,7 +413,7 @@ * a*b == 200 and the nearest integer is ill-defined, use a table to emulate * the following broken float-based implementation used by the binary decoder: * - * \code + * @code * static int very_broken_op(int a, int b) * { * static float test; // Ugh, force gcc to do the division first... @@ -419,7 +421,7 @@ * test = a/400.; * return b * test + 0.5; * } - * \endcode + * @endcode * * @note if this function is replaced by just ROUNDED_DIV(a*b,400.), the stddev * between the original file (before encoding with Yamaha encoder) and the @@ -665,8 +667,9 @@ float *out) { const ModeTab *mtab = tctx->mtab; + int size1, size2; float *prev_buf = tctx->prev_frame + tctx->last_block_pos[0]; - int i, j; + int i; for (i = 0; i < tctx->avctx->channels; i++) { imdct_and_window(tctx, ftype, wtype, @@ -675,27 +678,27 @@ i); } + if (!out) + return; + + size2 = tctx->last_block_pos[0]; + size1 = mtab->size - size2; if (tctx->avctx->channels == 2) { - for (i = 0; i < mtab->size - tctx->last_block_pos[0]; i++) { - float f1 = prev_buf[ i]; - float f2 = prev_buf[2*mtab->size + i]; - out[2*i ] = f1 + f2; - out[2*i + 1] = f1 - f2; - } - for (j = 0; i < mtab->size; j++,i++) { - float f1 = tctx->curr_frame[ j]; - float f2 = tctx->curr_frame[2*mtab->size + j]; - out[2*i ] = f1 + f2; - out[2*i + 1] = f1 - f2; - } + tctx->dsp.butterflies_float_interleave(out, prev_buf, + &prev_buf[2*mtab->size], + size1); + + out += 2 * size1; + + tctx->dsp.butterflies_float_interleave(out, tctx->curr_frame, + &tctx->curr_frame[2*mtab->size], + size2); } else { - memcpy(out, prev_buf, - (mtab->size - tctx->last_block_pos[0]) * sizeof(*out)); + memcpy(out, prev_buf, size1 * sizeof(*out)); - out += mtab->size - tctx->last_block_pos[0]; + out += size1; - memcpy(out, tctx->curr_frame, - (tctx->last_block_pos[0]) * sizeof(*out)); + memcpy(out, tctx->curr_frame, size2 * sizeof(*out)); } } @@ -813,16 +816,16 @@ } static int twin_decode_frame(AVCodecContext * avctx, void *data, - int *data_size, AVPacket *avpkt) + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; TwinContext *tctx = avctx->priv_data; GetBitContext gb; const ModeTab *mtab = tctx->mtab; - float *out = data; + float *out = NULL; enum FrameType ftype; - int window_type; + int window_type, ret; static const enum FrameType wtype_to_ftype_table[] = { FT_LONG, FT_LONG, FT_SHORT, FT_LONG, FT_MEDIUM, FT_LONG, FT_LONG, FT_MEDIUM, FT_MEDIUM @@ -831,8 +834,17 @@ if (buf_size*8 < avctx->bit_rate*mtab->size/avctx->sample_rate + 8) { av_log(avctx, AV_LOG_ERROR, "Frame too small (%d bytes). Truncated file?\n", buf_size); - *data_size = 0; - return buf_size; + return AVERROR(EINVAL); + } + + /* get output buffer */ + if (tctx->discarded_packets >= 2) { + tctx->frame.nb_samples = mtab->size; + if ((ret = avctx->get_buffer(avctx, &tctx->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + out = (float *)tctx->frame.data[0]; } init_get_bits(&gb, buf, buf_size * 8); @@ -852,12 +864,14 @@ FFSWAP(float*, tctx->curr_frame, tctx->prev_frame); - if (tctx->avctx->frame_number < 2) { - *data_size=0; + if (tctx->discarded_packets < 2) { + tctx->discarded_packets++; + *got_frame_ptr = 0; return buf_size; } - *data_size = mtab->size*avctx->channels*4; + *got_frame_ptr = 1; + *(AVFrame *)data = tctx->frame;; return buf_size; } @@ -865,9 +879,9 @@ /** * Init IMDCT and windowing tables */ -static av_cold void init_mdct_win(TwinContext *tctx) +static av_cold int init_mdct_win(TwinContext *tctx) { - int i,j; + int i, j, ret; const ModeTab *mtab = tctx->mtab; int size_s = mtab->size / mtab->fmode[FT_SHORT].sub; int size_m = mtab->size / mtab->fmode[FT_MEDIUM].sub; @@ -876,20 +890,29 @@ for (i = 0; i < 3; i++) { int bsize = tctx->mtab->size/tctx->mtab->fmode[i].sub; - ff_mdct_init(&tctx->mdct_ctx[i], av_log2(bsize) + 1, 1, - -sqrt(norm/bsize) / (1<<15)); - } - - tctx->tmp_buf = av_malloc(mtab->size * sizeof(*tctx->tmp_buf)); - - tctx->spectrum = av_malloc(2*mtab->size*channels*sizeof(float)); - tctx->curr_frame = av_malloc(2*mtab->size*channels*sizeof(float)); - tctx->prev_frame = av_malloc(2*mtab->size*channels*sizeof(float)); + if ((ret = ff_mdct_init(&tctx->mdct_ctx[i], av_log2(bsize) + 1, 1, + -sqrt(norm/bsize) / (1<<15)))) + return ret; + } + + FF_ALLOC_OR_GOTO(tctx->avctx, tctx->tmp_buf, + mtab->size * sizeof(*tctx->tmp_buf), alloc_fail); + + FF_ALLOC_OR_GOTO(tctx->avctx, tctx->spectrum, + 2 * mtab->size * channels * sizeof(*tctx->spectrum), + alloc_fail); + FF_ALLOC_OR_GOTO(tctx->avctx, tctx->curr_frame, + 2 * mtab->size * channels * sizeof(*tctx->curr_frame), + alloc_fail); + FF_ALLOC_OR_GOTO(tctx->avctx, tctx->prev_frame, + 2 * mtab->size * channels * sizeof(*tctx->prev_frame), + alloc_fail); for (i = 0; i < 3; i++) { int m = 4*mtab->size/mtab->fmode[i].sub; double freq = 2*M_PI/m; - tctx->cos_tabs[i] = av_malloc((m/4)*sizeof(*tctx->cos_tabs)); + FF_ALLOC_OR_GOTO(tctx->avctx, tctx->cos_tabs[i], + (m / 4) * sizeof(*tctx->cos_tabs[i]), alloc_fail); for (j = 0; j <= m/8; j++) tctx->cos_tabs[i][j] = cos((2*j + 1)*freq); @@ -901,6 +924,10 @@ ff_init_ff_sine_windows(av_log2(size_m)); ff_init_ff_sine_windows(av_log2(size_s/2)); ff_init_ff_sine_windows(av_log2(mtab->size)); + + return 0; +alloc_fail: + return AVERROR(ENOMEM); } /** @@ -938,14 +965,14 @@ /** * Interpret the input data as in the following table: * - * \verbatim + * @verbatim * * abcdefgh * ijklmnop * qrstuvw * x123456 * - * \endverbatim + * @endverbatim * * and transpose it, giving the output * aiqxbjr1cks2dlt3emu4fvn5gow6hp @@ -1062,20 +1089,54 @@ construct_perm_table(tctx, frametype); } +static av_cold int twin_decode_close(AVCodecContext *avctx) +{ + TwinContext *tctx = avctx->priv_data; + int i; + + for (i = 0; i < 3; i++) { + ff_mdct_end(&tctx->mdct_ctx[i]); + av_free(tctx->cos_tabs[i]); + } + + + av_free(tctx->curr_frame); + av_free(tctx->spectrum); + av_free(tctx->prev_frame); + av_free(tctx->tmp_buf); + + return 0; +} + static av_cold int twin_decode_init(AVCodecContext *avctx) { + int ret; TwinContext *tctx = avctx->priv_data; - int isampf = avctx->sample_rate/1000; - int ibps = avctx->bit_rate/(1000 * avctx->channels); + int isampf, ibps; tctx->avctx = avctx; avctx->sample_fmt = AV_SAMPLE_FMT_FLT; + if (!avctx->extradata || avctx->extradata_size < 12) { + av_log(avctx, AV_LOG_ERROR, "Missing or incomplete extradata\n"); + return AVERROR_INVALIDDATA; + } + avctx->channels = AV_RB32(avctx->extradata ) + 1; + avctx->bit_rate = AV_RB32(avctx->extradata + 4) * 1000; + isampf = AV_RB32(avctx->extradata + 8); + switch (isampf) { + case 44: avctx->sample_rate = 44100; break; + case 22: avctx->sample_rate = 22050; break; + case 11: avctx->sample_rate = 11025; break; + default: avctx->sample_rate = isampf * 1000; break; + } + if (avctx->channels > CHANNELS_MAX) { av_log(avctx, AV_LOG_ERROR, "Unsupported number of channels: %i\n", avctx->channels); return -1; } + ibps = avctx->bit_rate / (1000 * avctx->channels); switch ((isampf << 8) + ibps) { case (8 <<8) + 8: tctx->mtab = &mode_08_08; break; @@ -1093,42 +1154,29 @@ } dsputil_init(&tctx->dsp, avctx); - init_mdct_win(tctx); + if ((ret = init_mdct_win(tctx))) { + av_log(avctx, AV_LOG_ERROR, "Error initializing MDCT\n"); + twin_decode_close(avctx); + return ret; + } init_bitstream_params(tctx); memset_float(tctx->bark_hist[0][0], 0.1, FF_ARRAY_ELEMS(tctx->bark_hist)); - return 0; -} - -static av_cold int twin_decode_close(AVCodecContext *avctx) -{ - TwinContext *tctx = avctx->priv_data; - int i; - - for (i = 0; i < 3; i++) { - ff_mdct_end(&tctx->mdct_ctx[i]); - av_free(tctx->cos_tabs[i]); - } - - - av_free(tctx->curr_frame); - av_free(tctx->spectrum); - av_free(tctx->prev_frame); - av_free(tctx->tmp_buf); + avcodec_get_frame_defaults(&tctx->frame); + avctx->coded_frame = &tctx->frame; return 0; } -AVCodec ff_twinvq_decoder = -{ - "twinvq", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_TWINVQ, - sizeof(TwinContext), - twin_decode_init, - NULL, - twin_decode_close, - twin_decode_frame, - .long_name = NULL_IF_CONFIG_SMALL("VQF TwinVQ"), +AVCodec ff_twinvq_decoder = { + .name = "twinvq", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_TWINVQ, + .priv_data_size = sizeof(TwinContext), + .init = twin_decode_init, + .close = twin_decode_close, + .decode = twin_decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("VQF TwinVQ"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/txd.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/txd.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/txd.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/txd.c 2012-01-11 00:34:30.000000000 +0000 @@ -108,7 +108,8 @@ } else if (depth == 16) { switch (d3d_format) { case 0: - if (!flags&1) goto unsupported; + if (!(flags & 1)) + goto unsupported; case FF_S3TC_DXT1: ff_decode_dxt1(cur, ptr, w, h, stride); break; @@ -156,15 +157,13 @@ } AVCodec ff_txd_decoder = { - "txd", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_TXD, - sizeof(TXDContext), - txd_init, - NULL, - txd_end, - txd_decode_frame, - CODEC_CAP_DR1, - NULL, + .name = "txd", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_TXD, + .priv_data_size = sizeof(TXDContext), + .init = txd_init, + .close = txd_end, + .decode = txd_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Renderware TXD (TeXture Dictionary) image"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ulti.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ulti.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ulti.c 2011-04-29 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ulti.c 2012-01-11 00:34:30.000000000 +0000 @@ -38,6 +38,7 @@ int width, height, blocks; AVFrame frame; const uint8_t *ulti_codebook; + GetByteContext gb; } UltimotionDecodeContext; static av_cold int ulti_decode_init(AVCodecContext *avctx) @@ -231,16 +232,20 @@ return -1; } + bytestream2_init(&s->gb, buf, buf_size); + while(!done) { int idx; if(blocks >= s->blocks || y >= s->height) break;//all blocks decoded - idx = *buf++; + if (bytestream2_get_bytes_left(&s->gb) < 1) + goto err; + idx = bytestream2_get_byteu(&s->gb); if((idx & 0xF8) == 0x70) { switch(idx) { case 0x70: //change modifier - modifier = *buf++; + modifier = bytestream2_get_byte(&s->gb); if(modifier>1) av_log(avctx, AV_LOG_INFO, "warning: modifier must be 0 or 1, got %i\n", modifier); break; @@ -254,7 +259,7 @@ done = 1; break; case 0x74: //skip some blocks - skip = *buf++; + skip = bytestream2_get_byte(&s->gb); if ((blocks + skip) >= s->blocks) break; blocks += skip; @@ -280,20 +285,22 @@ chroma = 0; } else { cf = 0; - if (idx) - chroma = *buf++; + if (idx) { + chroma = bytestream2_get_byte(&s->gb); + } } for (i = 0; i < 4; i++) { // for every subblock code = (idx >> (6 - i*2)) & 3; //extract 2 bits if(!code) //skip subblock continue; - if(cf) - chroma = *buf++; + if(cf) { + chroma = bytestream2_get_byte(&s->gb); + } tx = x + block_coords[i * 2]; ty = y + block_coords[(i * 2) + 1]; switch(code) { case 1: - tmp = *buf++; + tmp = bytestream2_get_byte(&s->gb); angle = angle_by_index[(tmp >> 6) & 0x3]; @@ -313,7 +320,7 @@ case 2: if (modifier) { // unpack four luma samples - tmp = bytestream_get_be24(&buf); + tmp = bytestream2_get_be24(&s->gb); Y[0] = (tmp >> 18) & 0x3F; Y[1] = (tmp >> 12) & 0x3F; @@ -321,7 +328,7 @@ Y[3] = tmp & 0x3F; angle = 16; } else { // retrieve luma samples from codebook - tmp = bytestream_get_be16(&buf); + tmp = bytestream2_get_be16(&s->gb); angle = (tmp >> 12) & 0xF; tmp &= 0xFFF; @@ -337,25 +344,27 @@ if (modifier) { // all 16 luma samples uint8_t Luma[16]; - tmp = bytestream_get_be24(&buf); + if (bytestream2_get_bytes_left(&s->gb) < 12) + goto err; + tmp = bytestream2_get_be24u(&s->gb); Luma[0] = (tmp >> 18) & 0x3F; Luma[1] = (tmp >> 12) & 0x3F; Luma[2] = (tmp >> 6) & 0x3F; Luma[3] = tmp & 0x3F; - tmp = bytestream_get_be24(&buf); + tmp = bytestream2_get_be24u(&s->gb); Luma[4] = (tmp >> 18) & 0x3F; Luma[5] = (tmp >> 12) & 0x3F; Luma[6] = (tmp >> 6) & 0x3F; Luma[7] = tmp & 0x3F; - tmp = bytestream_get_be24(&buf); + tmp = bytestream2_get_be24u(&s->gb); Luma[8] = (tmp >> 18) & 0x3F; Luma[9] = (tmp >> 12) & 0x3F; Luma[10] = (tmp >> 6) & 0x3F; Luma[11] = tmp & 0x3F; - tmp = bytestream_get_be24(&buf); + tmp = bytestream2_get_be24u(&s->gb); Luma[12] = (tmp >> 18) & 0x3F; Luma[13] = (tmp >> 12) & 0x3F; Luma[14] = (tmp >> 6) & 0x3F; @@ -363,21 +372,23 @@ ulti_convert_yuv(&s->frame, tx, ty, Luma, chroma); } else { - tmp = *buf++; + if (bytestream2_get_bytes_left(&s->gb) < 4) + goto err; + tmp = bytestream2_get_byteu(&s->gb); if(tmp & 0x80) { angle = (tmp >> 4) & 0x7; - tmp = (tmp << 8) + *buf++; + tmp = (tmp << 8) + bytestream2_get_byteu(&s->gb); Y[0] = (tmp >> 6) & 0x3F; Y[1] = tmp & 0x3F; - Y[2] = (*buf++) & 0x3F; - Y[3] = (*buf++) & 0x3F; + Y[2] = bytestream2_get_byteu(&s->gb) & 0x3F; + Y[3] = bytestream2_get_byteu(&s->gb) & 0x3F; ulti_grad(&s->frame, tx, ty, Y, chroma, angle); //draw block } else { // some patterns int f0, f1; - f0 = *buf++; + f0 = bytestream2_get_byteu(&s->gb); f1 = tmp; - Y[0] = (*buf++) & 0x3F; - Y[1] = (*buf++) & 0x3F; + Y[0] = bytestream2_get_byteu(&s->gb) & 0x3F; + Y[1] = bytestream2_get_byteu(&s->gb) & 0x3F; ulti_pattern(&s->frame, tx, ty, f1, f0, Y[0], Y[1], chroma); } } @@ -399,19 +410,22 @@ *(AVFrame*)data= s->frame; return buf_size; + +err: + av_log(avctx, AV_LOG_ERROR, + "Insufficient data\n"); + return AVERROR_INVALIDDATA; } AVCodec ff_ulti_decoder = { - "ultimotion", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ULTI, - sizeof(UltimotionDecodeContext), - ulti_decode_init, - NULL, - ulti_decode_end, - ulti_decode_frame, - CODEC_CAP_DR1, - NULL, + .name = "ultimotion", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ULTI, + .priv_data_size = sizeof(UltimotionDecodeContext), + .init = ulti_decode_init, + .close = ulti_decode_end, + .decode = ulti_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("IBM UltiMotion"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/utils.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/utils.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/utils.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/utils.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,12 +26,13 @@ */ #include "libavutil/avstring.h" -#include "libavutil/integer.h" #include "libavutil/crc.h" +#include "libavutil/mathematics.h" #include "libavutil/pixdesc.h" #include "libavutil/audioconvert.h" #include "libavutil/imgutils.h" #include "libavutil/samplefmt.h" +#include "libavutil/dict.h" #include "avcodec.h" #include "dsputil.h" #include "libavutil/opt.h" @@ -39,6 +40,7 @@ #include "thread.h" #include "audioconvert.h" #include "internal.h" +#include "bytestream.h" #include #include #include @@ -47,6 +49,7 @@ static int volatile entangled_thread_counter=0; static int (*ff_lockmgr_cb)(void **mutex, enum AVLockOp op); static void *codec_mutex; +static void *avformat_mutex; void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size) { @@ -84,6 +87,20 @@ else return first_avcodec; } +#if !FF_API_AVCODEC_INIT +static +#endif +void avcodec_init(void) +{ + static int initialized = 0; + + if (initialized != 0) + return; + initialized = 1; + + dsputil_static_init(); +} + void avcodec_register(AVCodec *codec) { AVCodec **p; @@ -92,6 +109,9 @@ while (*p != NULL) p = &(*p)->next; *p = codec; codec->next = NULL; + + if (codec->init_static_data) + codec->init_static_data(codec); } unsigned avcodec_get_edge_width(void) @@ -106,18 +126,12 @@ s->height= -((-height)>>s->lowres); } -typedef struct InternalBuffer{ - int last_pic_num; - uint8_t *base[4]; - uint8_t *data[4]; - int linesize[4]; - int width, height; - enum PixelFormat pix_fmt; -}InternalBuffer; - #define INTERNAL_BUFFER_SIZE (32+1) -void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[4]){ +void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, + int linesize_align[AV_NUM_DATA_POINTERS]) +{ + int i; int w_align= 1; int h_align= 1; @@ -128,6 +142,7 @@ case PIX_FMT_YUV422P: case PIX_FMT_YUV440P: case PIX_FMT_YUV444P: + case PIX_FMT_GBRP: case PIX_FMT_GRAY8: case PIX_FMT_GRAY16BE: case PIX_FMT_GRAY16LE: @@ -140,12 +155,20 @@ case PIX_FMT_YUV420P9BE: case PIX_FMT_YUV420P10LE: case PIX_FMT_YUV420P10BE: + case PIX_FMT_YUV422P9LE: + case PIX_FMT_YUV422P9BE: case PIX_FMT_YUV422P10LE: case PIX_FMT_YUV422P10BE: - w_align= 16; //FIXME check for non mpeg style codecs and use less alignment - h_align= 16; - if(s->codec_id == CODEC_ID_MPEG2VIDEO || s->codec_id == CODEC_ID_MJPEG || s->codec_id == CODEC_ID_AMV || s->codec_id == CODEC_ID_THP || s->codec_id == CODEC_ID_H264) - h_align= 32; // interlaced is rounded up to 2 MBs + case PIX_FMT_YUV444P9LE: + case PIX_FMT_YUV444P9BE: + case PIX_FMT_YUV444P10LE: + case PIX_FMT_YUV444P10BE: + case PIX_FMT_GBRP9LE: + case PIX_FMT_GBRP9BE: + case PIX_FMT_GBRP10LE: + case PIX_FMT_GBRP10BE: + w_align = 16; //FIXME assume 16 pixel per macroblock + h_align = 16 * 2; // interlaced needs 2 macroblocks height break; case PIX_FMT_YUV411P: case PIX_FMT_UYYVYY411: @@ -188,10 +211,8 @@ *height+=2; // some of the optimized chroma MC reads one line too much // which is also done in mpeg decoders with lowres > 0 - linesize_align[0] = - linesize_align[1] = - linesize_align[2] = - linesize_align[3] = STRIDE_ALIGN; + for (i = 0; i < AV_NUM_DATA_POINTERS; i++) + linesize_align[i] = STRIDE_ALIGN; //STRIDE_ALIGN is 8 for SSE* but this does not work for SVQ1 chroma planes //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 @@ -200,16 +221,15 @@ if(s->codec_id == CODEC_ID_SVQ1 || s->codec_id == CODEC_ID_VP5 || s->codec_id == CODEC_ID_VP6 || s->codec_id == CODEC_ID_VP6F || s->codec_id == CODEC_ID_VP6A) { - linesize_align[0] = - linesize_align[1] = - linesize_align[2] = 16; + for (i = 0; i < AV_NUM_DATA_POINTERS; i++) + linesize_align[i] = 16; } #endif } void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){ int chroma_shift = av_pix_fmt_descriptors[s->pix_fmt].log2_chroma_w; - int linesize_align[4]; + int linesize_align[AV_NUM_DATA_POINTERS]; int align; avcodec_align_dimensions2(s, width, height, linesize_align); align = FFMAX(linesize_align[0], linesize_align[3]); @@ -219,39 +239,132 @@ *width=FFALIGN(*width, align); } -int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ +static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame) +{ + AVCodecInternal *avci = avctx->internal; + InternalBuffer *buf; + int buf_size, ret, i, needs_extended_data; + + buf_size = av_samples_get_buffer_size(NULL, avctx->channels, + frame->nb_samples, avctx->sample_fmt, + 32); + if (buf_size < 0) + return AVERROR(EINVAL); + + needs_extended_data = av_sample_fmt_is_planar(avctx->sample_fmt) && + avctx->channels > AV_NUM_DATA_POINTERS; + + /* allocate InternalBuffer if needed */ + if (!avci->buffer) { + avci->buffer = av_mallocz(sizeof(InternalBuffer)); + if (!avci->buffer) + return AVERROR(ENOMEM); + } + buf = avci->buffer; + + /* if there is a previously-used internal buffer, check its size and + channel count to see if we can reuse it */ + if (buf->extended_data) { + /* if current buffer is too small, free it */ + if (buf->extended_data[0] && buf_size > buf->audio_data_size) { + av_free(buf->extended_data[0]); + if (buf->extended_data != buf->data) + av_free(&buf->extended_data); + buf->extended_data = NULL; + buf->data[0] = NULL; + } + /* if number of channels has changed, reset and/or free extended data + pointers but leave data buffer in buf->data[0] for reuse */ + if (buf->nb_channels != avctx->channels) { + if (buf->extended_data != buf->data) + av_free(buf->extended_data); + buf->extended_data = NULL; + } + } + + /* if there is no previous buffer or the previous buffer cannot be used + as-is, allocate a new buffer and/or rearrange the channel pointers */ + if (!buf->extended_data) { + /* if the channel pointers will fit, just set extended_data to data, + otherwise allocate the extended_data channel pointers */ + if (needs_extended_data) { + buf->extended_data = av_mallocz(avctx->channels * + sizeof(*buf->extended_data)); + if (!buf->extended_data) + return AVERROR(ENOMEM); + } else { + buf->extended_data = buf->data; + } + + /* if there is a previous buffer and it is large enough, reuse it and + just fill-in new channel pointers and linesize, otherwise allocate + a new buffer */ + if (buf->extended_data[0]) { + ret = av_samples_fill_arrays(buf->extended_data, &buf->linesize[0], + buf->extended_data[0], avctx->channels, + frame->nb_samples, avctx->sample_fmt, + 32); + } else { + ret = av_samples_alloc(buf->extended_data, &buf->linesize[0], + avctx->channels, frame->nb_samples, + avctx->sample_fmt, 32); + } + if (ret) + return ret; + + /* if data was not used for extended_data, we need to copy as many of + the extended_data channel pointers as will fit */ + if (needs_extended_data) { + for (i = 0; i < AV_NUM_DATA_POINTERS; i++) + buf->data[i] = buf->extended_data[i]; + } + buf->audio_data_size = buf_size; + buf->nb_channels = avctx->channels; + } + + /* copy InternalBuffer info to the AVFrame */ + frame->type = FF_BUFFER_TYPE_INTERNAL; + frame->extended_data = buf->extended_data; + frame->linesize[0] = buf->linesize[0]; + memcpy(frame->data, buf->data, sizeof(frame->data)); + + if (avctx->pkt) frame->pkt_pts = avctx->pkt->pts; + else frame->pkt_pts = AV_NOPTS_VALUE; + frame->reordered_opaque = avctx->reordered_opaque; + + if (avctx->debug & FF_DEBUG_BUFFERS) + av_log(avctx, AV_LOG_DEBUG, "default_get_buffer called on frame %p, " + "internal audio buffer used\n", frame); + + return 0; +} + +static int video_get_buffer(AVCodecContext *s, AVFrame *pic) +{ int i; int w= s->width; int h= s->height; InternalBuffer *buf; - int *picture_number; + AVCodecInternal *avci = s->internal; if(pic->data[0]!=NULL) { av_log(s, AV_LOG_ERROR, "pic->data[0]!=NULL in avcodec_default_get_buffer\n"); return -1; } - if(s->internal_buffer_count >= INTERNAL_BUFFER_SIZE) { - av_log(s, AV_LOG_ERROR, "internal_buffer_count overflow (missing release_buffer?)\n"); + if(avci->buffer_count >= INTERNAL_BUFFER_SIZE) { + av_log(s, AV_LOG_ERROR, "buffer_count overflow (missing release_buffer?)\n"); return -1; } if(av_image_check_size(w, h, 0, s)) return -1; - if(s->internal_buffer==NULL){ - s->internal_buffer= av_mallocz((INTERNAL_BUFFER_SIZE+1)*sizeof(InternalBuffer)); + if (!avci->buffer) { + avci->buffer = av_mallocz((INTERNAL_BUFFER_SIZE+1) * + sizeof(InternalBuffer)); } -#if 0 - s->internal_buffer= av_fast_realloc( - s->internal_buffer, - &s->internal_buffer_size, - sizeof(InternalBuffer)*FFMAX(99, s->internal_buffer_count+1)/*FIXME*/ - ); -#endif - buf= &((InternalBuffer*)s->internal_buffer)[s->internal_buffer_count]; - picture_number= &(((InternalBuffer*)s->internal_buffer)[INTERNAL_BUFFER_SIZE]).last_pic_num; //FIXME ugly hack - (*picture_number)++; + buf = &avci->buffer[avci->buffer_count]; if(buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)){ if(s->active_thread_type&FF_THREAD_FRAME) { @@ -259,22 +372,19 @@ return -1; } - for(i=0; i<4; i++){ + for (i = 0; i < AV_NUM_DATA_POINTERS; i++) { av_freep(&buf->base[i]); buf->data[i]= NULL; } } - if(buf->base[0]){ - pic->age= *picture_number - buf->last_pic_num; - buf->last_pic_num= *picture_number; - }else{ + if (!buf->base[0]) { int h_chroma_shift, v_chroma_shift; int size[4] = {0}; int tmpsize; int unaligned; AVPicture picture; - int stride_align[4]; + int stride_align[AV_NUM_DATA_POINTERS]; const int pixel_size = av_pix_fmt_descriptors[s->pix_fmt].comp[0].step_minus1+1; avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift); @@ -307,7 +417,6 @@ size[i] = picture.data[i+1] - picture.data[i]; size[i] = tmpsize - (picture.data[i] - picture.data[0]); - buf->last_pic_num= -256*256*256*64; memset(buf->base, 0, sizeof(buf->base)); memset(buf->data, 0, sizeof(buf->data)); @@ -327,67 +436,91 @@ else buf->data[i] = buf->base[i] + FFALIGN((buf->linesize[i]*EDGE_WIDTH>>v_shift) + (pixel_size*EDGE_WIDTH>>h_shift), stride_align[i]); } + for (; i < AV_NUM_DATA_POINTERS; i++) { + buf->base[i] = buf->data[i] = NULL; + buf->linesize[i] = 0; + } if(size[1] && !size[2]) ff_set_systematic_pal2((uint32_t*)buf->data[1], s->pix_fmt); buf->width = s->width; buf->height = s->height; buf->pix_fmt= s->pix_fmt; - pic->age= 256*256*256*64; } pic->type= FF_BUFFER_TYPE_INTERNAL; - for(i=0; i<4; i++){ + for (i = 0; i < AV_NUM_DATA_POINTERS; i++) { pic->base[i]= buf->base[i]; pic->data[i]= buf->data[i]; pic->linesize[i]= buf->linesize[i]; } - s->internal_buffer_count++; + pic->extended_data = pic->data; + avci->buffer_count++; if(s->pkt) pic->pkt_pts= s->pkt->pts; else pic->pkt_pts= AV_NOPTS_VALUE; pic->reordered_opaque= s->reordered_opaque; if(s->debug&FF_DEBUG_BUFFERS) - av_log(s, AV_LOG_DEBUG, "default_get_buffer called on pic %p, %d buffers used\n", pic, s->internal_buffer_count); + av_log(s, AV_LOG_DEBUG, "default_get_buffer called on pic %p, %d " + "buffers used\n", pic, avci->buffer_count); return 0; } +int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame) +{ + switch (avctx->codec_type) { + case AVMEDIA_TYPE_VIDEO: + return video_get_buffer(avctx, frame); + case AVMEDIA_TYPE_AUDIO: + return audio_get_buffer(avctx, frame); + default: + return -1; + } +} + void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){ int i; InternalBuffer *buf, *last; + AVCodecInternal *avci = s->internal; + + assert(s->codec_type == AVMEDIA_TYPE_VIDEO); assert(pic->type==FF_BUFFER_TYPE_INTERNAL); - assert(s->internal_buffer_count); + assert(avci->buffer_count); - if(s->internal_buffer){ - buf = NULL; /* avoids warning */ - for(i=0; iinternal_buffer_count; i++){ //just 3-5 checks so is not worth to optimize - buf= &((InternalBuffer*)s->internal_buffer)[i]; - if(buf->data[0] == pic->data[0]) - break; - } - assert(i < s->internal_buffer_count); - s->internal_buffer_count--; - last = &((InternalBuffer*)s->internal_buffer)[s->internal_buffer_count]; + if (avci->buffer) { + buf = NULL; /* avoids warning */ + for (i = 0; i < avci->buffer_count; i++) { //just 3-5 checks so is not worth to optimize + buf = &avci->buffer[i]; + if (buf->data[0] == pic->data[0]) + break; + } + assert(i < avci->buffer_count); + avci->buffer_count--; + last = &avci->buffer[avci->buffer_count]; - FFSWAP(InternalBuffer, *buf, *last); + if (buf != last) + FFSWAP(InternalBuffer, *buf, *last); } - for(i=0; i<4; i++){ + for (i = 0; i < AV_NUM_DATA_POINTERS; i++) { pic->data[i]=NULL; // pic->base[i]=NULL; } //printf("R%X\n", pic->opaque); if(s->debug&FF_DEBUG_BUFFERS) - av_log(s, AV_LOG_DEBUG, "default_release_buffer called on pic %p, %d buffers used\n", pic, s->internal_buffer_count); + av_log(s, AV_LOG_DEBUG, "default_release_buffer called on pic %p, %d " + "buffers used\n", pic, avci->buffer_count); } int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){ AVFrame temp_pic; int i; + assert(s->codec_type == AVMEDIA_TYPE_VIDEO); + /* If no picture return a new buffer */ if(pic->data[0] == NULL) { /* We will copy from buffer, so must be readable */ @@ -407,7 +540,7 @@ * Not internal type and reget_buffer not overridden, emulate cr buffer */ temp_pic = *pic; - for(i = 0; i < 4; i++) + for(i = 0; i < AV_NUM_DATA_POINTERS; i++) pic->data[i] = pic->base[i] = NULL; pic->opaque = NULL; /* Allocate new frame */ @@ -451,6 +584,8 @@ pic->pts= AV_NOPTS_VALUE; pic->key_frame= 1; + pic->sample_aspect_ratio = (AVRational){0, 1}; + pic->format = -1; /* unknown */ } AVFrame *avcodec_alloc_frame(void){ @@ -463,9 +598,20 @@ return pic; } +#if FF_API_AVCODEC_OPEN int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec) { + return avcodec_open2(avctx, codec, NULL); +} +#endif + +int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options) +{ int ret = 0; + AVDictionary *tmp = NULL; + + if (options) + av_dict_copy(&tmp, *options, 0); /* If there is a user-supplied mutex locking routine, call it. */ if (ff_lockmgr_cb) { @@ -485,6 +631,12 @@ goto end; } + avctx->internal = av_mallocz(sizeof(AVCodecInternal)); + if (!avctx->internal) { + ret = AVERROR(ENOMEM); + goto end; + } + if (codec->priv_data_size > 0) { if(!avctx->priv_data){ avctx->priv_data = av_mallocz(codec->priv_data_size); @@ -492,14 +644,18 @@ ret = AVERROR(ENOMEM); goto end; } - if(codec->priv_class){ //this can be droped once all user apps use avcodec_get_context_defaults3() + if (codec->priv_class) { *(AVClass**)avctx->priv_data= codec->priv_class; av_opt_set_defaults(avctx->priv_data); } } + if (codec->priv_class && (ret = av_opt_set_dict(avctx->priv_data, &tmp)) < 0) + goto free_and_end; } else { avctx->priv_data = NULL; } + if ((ret = av_opt_set_dict(avctx, &tmp)) < 0) + goto free_and_end; if(avctx->coded_width && avctx->coded_height) avcodec_set_dimensions(avctx, avctx->coded_width, avctx->coded_height); @@ -537,6 +693,16 @@ goto free_and_end; } avctx->frame_number = 0; +#if FF_API_ER + + av_log(avctx, AV_LOG_DEBUG, "err{or,}_recognition separate: %d; %d\n", + avctx->error_recognition, avctx->err_recognition); + /* FF_ER_CAREFUL (==1) implies AV_EF_CRCCHECK (== 1<<1 - 1), + FF_ER_COMPLIANT (==2) implies AV_EF_{CRCCHECK,BITSTREAM} (== 1<<2 - 1), et cetera} */ + avctx->err_recognition |= (1<<(avctx->error_recognition-(avctx->error_recognition>=FF_ER_VERY_AGGRESSIVE))) - 1; + av_log(avctx, AV_LOG_DEBUG, "err{or,}_recognition combined: %d; %d\n", + avctx->error_recognition, avctx->err_recognition); +#endif if (HAVE_THREADS && !avctx->thread_opaque) { ret = ff_thread_init(avctx); @@ -544,6 +710,8 @@ goto free_and_end; } } + if (!HAVE_THREADS && !(codec->capabilities & CODEC_CAP_AUTO_THREADS)) + avctx->thread_count = 1; if (avctx->codec->max_lowres < avctx->lowres) { av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n", @@ -611,9 +779,16 @@ if (ff_lockmgr_cb) { (*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE); } + if (options) { + av_dict_free(options); + *options = tmp; + } + return ret; free_and_end: + av_dict_free(&tmp); av_freep(&avctx->priv_data); + av_freep(&avctx->internal); avctx->codec= NULL; goto end; } @@ -667,6 +842,48 @@ return ret; } +static void apply_param_change(AVCodecContext *avctx, AVPacket *avpkt) +{ + int size = 0; + const uint8_t *data; + uint32_t flags; + + if (!(avctx->codec->capabilities & CODEC_CAP_PARAM_CHANGE)) + return; + + data = av_packet_get_side_data(avpkt, AV_PKT_DATA_PARAM_CHANGE, &size); + if (!data || size < 4) + return; + flags = bytestream_get_le32(&data); + size -= 4; + if (size < 4) /* Required for any of the changes */ + return; + if (flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) { + avctx->channels = bytestream_get_le32(&data); + size -= 4; + } + if (flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT) { + if (size < 8) + return; + avctx->channel_layout = bytestream_get_le64(&data); + size -= 8; + } + if (size < 4) + return; + if (flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE) { + avctx->sample_rate = bytestream_get_le32(&data); + size -= 4; + } + if (flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS) { + if (size < 8) + return; + avctx->width = bytestream_get_le32(&data); + avctx->height = bytestream_get_le32(&data); + avcodec_set_dimensions(avctx, avctx->width, avctx->height); + size -= 8; + } +} + int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, AVPacket *avpkt) @@ -678,15 +895,20 @@ return -1; avctx->pkt = avpkt; + apply_param_change(avctx, avpkt); if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type&FF_THREAD_FRAME)){ - if (HAVE_PTHREADS && avctx->active_thread_type&FF_THREAD_FRAME) + if (HAVE_THREADS && avctx->active_thread_type&FF_THREAD_FRAME) ret = ff_thread_decode_frame(avctx, picture, got_picture_ptr, avpkt); else { ret = avctx->codec->decode(avctx, picture, got_picture_ptr, avpkt); picture->pkt_dts= avpkt->dts; + picture->sample_aspect_ratio = avctx->sample_aspect_ratio; + picture->width = avctx->width; + picture->height = avctx->height; + picture->format = avctx->pix_fmt; } emms_c(); //needed to avoid an emms_c() call before every return; @@ -699,31 +921,77 @@ return ret; } +#if FF_API_OLD_DECODE_AUDIO int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket *avpkt) { - int ret; + AVFrame frame; + int ret, got_frame = 0; + + if (avctx->get_buffer != avcodec_default_get_buffer) { + av_log(avctx, AV_LOG_ERROR, "A custom get_buffer() cannot be used with " + "avcodec_decode_audio3()\n"); + return AVERROR(EINVAL); + } + + ret = avcodec_decode_audio4(avctx, &frame, &got_frame, avpkt); + + if (ret >= 0 && got_frame) { + int ch, plane_size; + int planar = av_sample_fmt_is_planar(avctx->sample_fmt); + int data_size = av_samples_get_buffer_size(&plane_size, avctx->channels, + frame.nb_samples, + avctx->sample_fmt, 1); + if (*frame_size_ptr < data_size) { + av_log(avctx, AV_LOG_ERROR, "output buffer size is too small for " + "the current frame (%d < %d)\n", *frame_size_ptr, data_size); + return AVERROR(EINVAL); + } + + memcpy(samples, frame.extended_data[0], plane_size); + + if (planar && avctx->channels > 1) { + uint8_t *out = ((uint8_t *)samples) + plane_size; + for (ch = 1; ch < avctx->channels; ch++) { + memcpy(out, frame.extended_data[ch], plane_size); + out += plane_size; + } + } + *frame_size_ptr = data_size; + } else { + *frame_size_ptr = 0; + } + return ret; +} +#endif + +int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, + AVFrame *frame, + int *got_frame_ptr, + AVPacket *avpkt) +{ + int ret = 0; + + *got_frame_ptr = 0; avctx->pkt = avpkt; - if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){ - //FIXME remove the check below _after_ ensuring that all audio check that the available space is enough - if(*frame_size_ptr < AVCODEC_MAX_AUDIO_FRAME_SIZE){ - av_log(avctx, AV_LOG_ERROR, "buffer smaller than AVCODEC_MAX_AUDIO_FRAME_SIZE\n"); - return -1; - } - if(*frame_size_ptr < FF_MIN_BUFFER_SIZE || - *frame_size_ptr < avctx->channels * avctx->frame_size * sizeof(int16_t)){ - av_log(avctx, AV_LOG_ERROR, "buffer %d too small\n", *frame_size_ptr); - return -1; - } + if (!avpkt->data && avpkt->size) { + av_log(avctx, AV_LOG_ERROR, "invalid packet: NULL data, size != 0\n"); + return AVERROR(EINVAL); + } - ret = avctx->codec->decode(avctx, samples, frame_size_ptr, avpkt); - avctx->frame_number++; - }else{ - ret= 0; - *frame_size_ptr=0; + apply_param_change(avctx, avpkt); + + if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size) { + ret = avctx->codec->decode(avctx, frame, got_frame_ptr, avpkt); + if (ret >= 0 && *got_frame_ptr) { + avctx->frame_number++; + frame->pkt_dts = avpkt->dts; + if (frame->format == AV_SAMPLE_FMT_NONE) + frame->format = avctx->sample_fmt; + } } return ret; } @@ -783,6 +1051,7 @@ avctx->codec->close(avctx); avcodec_default_free_buffers(avctx); avctx->coded_frame = NULL; + av_freep(&avctx->internal); if (avctx->codec && avctx->codec->priv_class) av_opt_free(avctx->priv_data); av_opt_free(avctx); @@ -1039,42 +1308,66 @@ return LICENSE_PREFIX LIBAV_LICENSE + sizeof(LICENSE_PREFIX) - 1; } -void avcodec_init(void) -{ - static int initialized = 0; - - if (initialized != 0) - return; - initialized = 1; - - dsputil_static_init(); -} - void avcodec_flush_buffers(AVCodecContext *avctx) { - if(HAVE_PTHREADS && avctx->active_thread_type&FF_THREAD_FRAME) + if(HAVE_THREADS && avctx->active_thread_type&FF_THREAD_FRAME) ff_thread_flush(avctx); - if(avctx->codec->flush) + else if(avctx->codec->flush) avctx->codec->flush(avctx); } -void avcodec_default_free_buffers(AVCodecContext *s){ +static void video_free_buffers(AVCodecContext *s) +{ + AVCodecInternal *avci = s->internal; int i, j; - if(s->internal_buffer==NULL) return; + if (!avci->buffer) + return; - if (s->internal_buffer_count) - av_log(s, AV_LOG_WARNING, "Found %i unreleased buffers!\n", s->internal_buffer_count); + if (avci->buffer_count) + av_log(s, AV_LOG_WARNING, "Found %i unreleased buffers!\n", + avci->buffer_count); for(i=0; iinternal_buffer)[i]; + InternalBuffer *buf = &avci->buffer[i]; for(j=0; j<4; j++){ av_freep(&buf->base[j]); buf->data[j]= NULL; } } - av_freep(&s->internal_buffer); + av_freep(&avci->buffer); + + avci->buffer_count=0; +} + +static void audio_free_buffers(AVCodecContext *avctx) +{ + AVCodecInternal *avci = avctx->internal; + InternalBuffer *buf; + + if (!avci->buffer) + return; + buf = avci->buffer; + + if (buf->extended_data) { + av_free(buf->extended_data[0]); + if (buf->extended_data != buf->data) + av_free(buf->extended_data); + } + av_freep(&avci->buffer); +} - s->internal_buffer_count=0; +void avcodec_default_free_buffers(AVCodecContext *avctx) +{ + switch (avctx->codec_type) { + case AVMEDIA_TYPE_VIDEO: + video_free_buffers(avctx); + break; + case AVMEDIA_TYPE_AUDIO: + audio_free_buffers(avctx); + break; + default: + break; + } } #if FF_API_OLD_FF_PICT_TYPES @@ -1092,10 +1385,12 @@ case CODEC_ID_ADPCM_SBPRO_4: case CODEC_ID_ADPCM_CT: case CODEC_ID_ADPCM_IMA_WAV: + case CODEC_ID_ADPCM_IMA_QT: + case CODEC_ID_ADPCM_SWF: case CODEC_ID_ADPCM_MS: case CODEC_ID_ADPCM_YAMAHA: - return 4; case CODEC_ID_ADPCM_G722: + return 4; case CODEC_ID_PCM_ALAW: case CODEC_ID_PCM_MULAW: case CODEC_ID_PCM_S8: @@ -1219,6 +1514,8 @@ if (ff_lockmgr_cb) { if (ff_lockmgr_cb(&codec_mutex, AV_LOCK_DESTROY)) return -1; + if (ff_lockmgr_cb(&avformat_mutex, AV_LOCK_DESTROY)) + return -1; } ff_lockmgr_cb = cb; @@ -1226,11 +1523,31 @@ if (ff_lockmgr_cb) { if (ff_lockmgr_cb(&codec_mutex, AV_LOCK_CREATE)) return -1; + if (ff_lockmgr_cb(&avformat_mutex, AV_LOCK_CREATE)) + return -1; } return 0; } -unsigned int ff_toupper4(unsigned int x) +int avpriv_lock_avformat(void) +{ + if (ff_lockmgr_cb) { + if ((*ff_lockmgr_cb)(&avformat_mutex, AV_LOCK_OBTAIN)) + return -1; + } + return 0; +} + +int avpriv_unlock_avformat(void) +{ + if (ff_lockmgr_cb) { + if ((*ff_lockmgr_cb)(&avformat_mutex, AV_LOCK_RELEASE)) + return -1; + } + return 0; +} + +unsigned int avpriv_toupper4(unsigned int x) { return toupper( x &0xFF) + (toupper((x>>8 )&0xFF)<<8 ) @@ -1238,7 +1555,7 @@ + (toupper((x>>24)&0xFF)<<24); } -#if !HAVE_PTHREADS +#if !HAVE_THREADS int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f) { @@ -1272,3 +1589,17 @@ return ff_thread_init(s); } #endif + +enum AVMediaType avcodec_get_type(enum CodecID codec_id) +{ + if (codec_id <= CODEC_ID_NONE) + return AVMEDIA_TYPE_UNKNOWN; + else if (codec_id < CODEC_ID_FIRST_AUDIO) + return AVMEDIA_TYPE_VIDEO; + else if (codec_id < CODEC_ID_FIRST_SUBTITLE) + return AVMEDIA_TYPE_AUDIO; + else if (codec_id < CODEC_ID_FIRST_UNKNOWN) + return AVMEDIA_TYPE_SUBTITLE; + + return AVMEDIA_TYPE_UNKNOWN; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/utvideo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/utvideo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/utvideo.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/utvideo.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,581 @@ +/* + * Ut Video decoder + * Copyright (c) 2011 Konstantin Shishkov + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Ut Video decoder + */ + +#include + +#include "libavutil/intreadwrite.h" +#include "avcodec.h" +#include "bytestream.h" +#include "get_bits.h" +#include "dsputil.h" +#include "thread.h" + +enum { + PRED_NONE = 0, + PRED_LEFT, + PRED_GRADIENT, + PRED_MEDIAN, +}; + +typedef struct UtvideoContext { + AVCodecContext *avctx; + AVFrame pic; + DSPContext dsp; + + uint32_t frame_info_size, flags, frame_info; + int planes; + int slices; + int compression; + int interlaced; + int frame_pred; + + uint8_t *slice_bits; + int slice_bits_size; +} UtvideoContext; + +typedef struct HuffEntry { + uint8_t sym; + uint8_t len; +} HuffEntry; + +static int huff_cmp(const void *a, const void *b) +{ + const HuffEntry *aa = a, *bb = b; + return (aa->len - bb->len)*256 + aa->sym - bb->sym; +} + +static int build_huff(const uint8_t *src, VLC *vlc, int *fsym) +{ + int i; + HuffEntry he[256]; + int last; + uint32_t codes[256]; + uint8_t bits[256]; + uint8_t syms[256]; + uint32_t code; + + *fsym = -1; + for (i = 0; i < 256; i++) { + he[i].sym = i; + he[i].len = *src++; + } + qsort(he, 256, sizeof(*he), huff_cmp); + + if (!he[0].len) { + *fsym = he[0].sym; + return 0; + } + if (he[0].len > 32) + return -1; + + last = 255; + while (he[last].len == 255 && last) + last--; + + code = 1; + for (i = last; i >= 0; i--) { + codes[i] = code >> (32 - he[i].len); + bits[i] = he[i].len; + syms[i] = he[i].sym; + code += 0x80000000u >> (he[i].len - 1); + } + + return init_vlc_sparse(vlc, FFMIN(he[last].len, 9), last + 1, + bits, sizeof(*bits), sizeof(*bits), + codes, sizeof(*codes), sizeof(*codes), + syms, sizeof(*syms), sizeof(*syms), 0); +} + +static int decode_plane(UtvideoContext *c, int plane_no, + uint8_t *dst, int step, int stride, + int width, int height, + const uint8_t *src, int src_size, int use_pred) +{ + int i, j, slice, pix; + int sstart, send; + VLC vlc; + GetBitContext gb; + int prev, fsym; + const int cmask = ~(!plane_no && c->avctx->pix_fmt == PIX_FMT_YUV420P); + + if (build_huff(src, &vlc, &fsym)) { + av_log(c->avctx, AV_LOG_ERROR, "Cannot build Huffman codes\n"); + return AVERROR_INVALIDDATA; + } + if (fsym >= 0) { // build_huff reported a symbol to fill slices with + send = 0; + for (slice = 0; slice < c->slices; slice++) { + uint8_t *dest; + + sstart = send; + send = (height * (slice + 1) / c->slices) & cmask; + dest = dst + sstart * stride; + + prev = 0x80; + for (j = sstart; j < send; j++) { + for (i = 0; i < width * step; i += step) { + pix = fsym; + if (use_pred) { + prev += pix; + pix = prev; + } + dest[i] = pix; + } + dest += stride; + } + } + return 0; + } + + src += 256; + src_size -= 256; + + send = 0; + for (slice = 0; slice < c->slices; slice++) { + uint8_t *dest; + int slice_data_start, slice_data_end, slice_size; + + sstart = send; + send = (height * (slice + 1) / c->slices) & cmask; + dest = dst + sstart * stride; + + // slice offset and size validation was done earlier + slice_data_start = slice ? AV_RL32(src + slice * 4 - 4) : 0; + slice_data_end = AV_RL32(src + slice * 4); + slice_size = slice_data_end - slice_data_start; + + if (!slice_size) { + for (j = sstart; j < send; j++) { + for (i = 0; i < width * step; i += step) + dest[i] = 0x80; + dest += stride; + } + continue; + } + + memcpy(c->slice_bits, src + slice_data_start + c->slices * 4, slice_size); + memset(c->slice_bits + slice_size, 0, FF_INPUT_BUFFER_PADDING_SIZE); + c->dsp.bswap_buf((uint32_t*)c->slice_bits, (uint32_t*)c->slice_bits, + (slice_data_end - slice_data_start + 3) >> 2); + init_get_bits(&gb, c->slice_bits, slice_size * 8); + + prev = 0x80; + for (j = sstart; j < send; j++) { + for (i = 0; i < width * step; i += step) { + if (get_bits_left(&gb) <= 0) { + av_log(c->avctx, AV_LOG_ERROR, "Slice decoding ran out of bits\n"); + goto fail; + } + pix = get_vlc2(&gb, vlc.table, vlc.bits, 4); + if (pix < 0) { + av_log(c->avctx, AV_LOG_ERROR, "Decoding error\n"); + goto fail; + } + if (use_pred) { + prev += pix; + pix = prev; + } + dest[i] = pix; + } + dest += stride; + } + if (get_bits_left(&gb) > 32) + av_log(c->avctx, AV_LOG_WARNING, "%d bits left after decoding slice\n", + get_bits_left(&gb)); + } + + free_vlc(&vlc); + + return 0; +fail: + free_vlc(&vlc); + return AVERROR_INVALIDDATA; +} + +static const int rgb_order[4] = { 1, 2, 0, 3 }; + +static void restore_rgb_planes(uint8_t *src, int step, int stride, int width, int height) +{ + int i, j; + uint8_t r, g, b; + + for (j = 0; j < height; j++) { + for (i = 0; i < width * step; i += step) { + r = src[i]; + g = src[i + 1]; + b = src[i + 2]; + src[i] = r + g - 0x80; + src[i + 2] = b + g - 0x80; + } + src += stride; + } +} + +static void restore_median(uint8_t *src, int step, int stride, + int width, int height, int slices, int rmode) +{ + int i, j, slice; + int A, B, C; + uint8_t *bsrc; + int slice_start, slice_height; + const int cmask = ~rmode; + + for (slice = 0; slice < slices; slice++) { + slice_start = ((slice * height) / slices) & cmask; + slice_height = ((((slice + 1) * height) / slices) & cmask) - slice_start; + + bsrc = src + slice_start * stride; + + // first line - left neighbour prediction + bsrc[0] += 0x80; + A = bsrc[0]; + for (i = step; i < width * step; i += step) { + bsrc[i] += A; + A = bsrc[i]; + } + bsrc += stride; + if (slice_height == 1) + continue; + // second line - first element has top predition, the rest uses median + C = bsrc[-stride]; + bsrc[0] += C; + A = bsrc[0]; + for (i = step; i < width * step; i += step) { + B = bsrc[i - stride]; + bsrc[i] += mid_pred(A, B, (uint8_t)(A + B - C)); + C = B; + A = bsrc[i]; + } + bsrc += stride; + // the rest of lines use continuous median prediction + for (j = 2; j < slice_height; j++) { + for (i = 0; i < width * step; i += step) { + B = bsrc[i - stride]; + bsrc[i] += mid_pred(A, B, (uint8_t)(A + B - C)); + C = B; + A = bsrc[i]; + } + bsrc += stride; + } + } +} + +/* UtVideo interlaced mode treats every two lines as a single one, + * so restoring function should take care of possible padding between + * two parts of the same "line". + */ +static void restore_median_il(uint8_t *src, int step, int stride, + int width, int height, int slices, int rmode) +{ + int i, j, slice; + int A, B, C; + uint8_t *bsrc; + int slice_start, slice_height; + const int cmask = ~(rmode ? 3 : 1); + const int stride2 = stride << 1; + + for (slice = 0; slice < slices; slice++) { + slice_start = ((slice * height) / slices) & cmask; + slice_height = ((((slice + 1) * height) / slices) & cmask) - slice_start; + slice_height >>= 1; + + bsrc = src + slice_start * stride; + + // first line - left neighbour prediction + bsrc[0] += 0x80; + A = bsrc[0]; + for (i = step; i < width * step; i += step) { + bsrc[i] += A; + A = bsrc[i]; + } + for (i = 0; i < width * step; i += step) { + bsrc[stride + i] += A; + A = bsrc[stride + i]; + } + bsrc += stride2; + if (slice_height == 1) + continue; + // second line - first element has top predition, the rest uses median + C = bsrc[-stride2]; + bsrc[0] += C; + A = bsrc[0]; + for (i = step; i < width * step; i += step) { + B = bsrc[i - stride2]; + bsrc[i] += mid_pred(A, B, (uint8_t)(A + B - C)); + C = B; + A = bsrc[i]; + } + for (i = 0; i < width * step; i += step) { + B = bsrc[i - stride]; + bsrc[stride + i] += mid_pred(A, B, (uint8_t)(A + B - C)); + C = B; + A = bsrc[stride + i]; + } + bsrc += stride2; + // the rest of lines use continuous median prediction + for (j = 2; j < slice_height; j++) { + for (i = 0; i < width * step; i += step) { + B = bsrc[i - stride2]; + bsrc[i] += mid_pred(A, B, (uint8_t)(A + B - C)); + C = B; + A = bsrc[i]; + } + for (i = 0; i < width * step; i += step) { + B = bsrc[i - stride]; + bsrc[i + stride] += mid_pred(A, B, (uint8_t)(A + B - C)); + C = B; + A = bsrc[i + stride]; + } + bsrc += stride2; + } + } +} + +static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) +{ + const uint8_t *buf = avpkt->data; + int buf_size = avpkt->size; + const uint8_t *buf_end = buf + buf_size; + UtvideoContext *c = avctx->priv_data; + const uint8_t *ptr; + int i, j; + const uint8_t *plane_start[5]; + int plane_size, max_slice_size = 0, slice_start, slice_end, slice_size; + int ret; + + if (c->pic.data[0]) + ff_thread_release_buffer(avctx, &c->pic); + + c->pic.reference = 1; + c->pic.buffer_hints = FF_BUFFER_HINTS_VALID; + if ((ret = ff_thread_get_buffer(avctx, &c->pic)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + + ff_thread_finish_setup(avctx); + + /* parse plane structure to retrieve frame flags and validate slice offsets */ + ptr = buf; + for (i = 0; i < c->planes; i++) { + plane_start[i] = ptr; + if (buf_end - ptr < 256 + 4 * c->slices) { + av_log(avctx, AV_LOG_ERROR, "Insufficient data for a plane\n"); + return AVERROR_INVALIDDATA; + } + ptr += 256; + slice_start = 0; + slice_end = 0; + for (j = 0; j < c->slices; j++) { + slice_end = bytestream_get_le32(&ptr); + slice_size = slice_end - slice_start; + if (slice_size < 0) { + av_log(avctx, AV_LOG_ERROR, "Incorrect slice size\n"); + return AVERROR_INVALIDDATA; + } + slice_start = slice_end; + max_slice_size = FFMAX(max_slice_size, slice_size); + } + plane_size = slice_end; + if (buf_end - ptr < plane_size) { + av_log(avctx, AV_LOG_ERROR, "Plane size is bigger than available data\n"); + return AVERROR_INVALIDDATA; + } + ptr += plane_size; + } + plane_start[c->planes] = ptr; + if (buf_end - ptr < c->frame_info_size) { + av_log(avctx, AV_LOG_ERROR, "Not enough data for frame information\n"); + return AVERROR_INVALIDDATA; + } + c->frame_info = AV_RL32(ptr); + av_log(avctx, AV_LOG_DEBUG, "frame information flags %X\n", c->frame_info); + + c->frame_pred = (c->frame_info >> 8) & 3; + + if (c->frame_pred == PRED_GRADIENT) { + av_log_ask_for_sample(avctx, "Frame uses gradient prediction\n"); + return AVERROR_PATCHWELCOME; + } + + av_fast_malloc(&c->slice_bits, &c->slice_bits_size, + max_slice_size + FF_INPUT_BUFFER_PADDING_SIZE); + + if (!c->slice_bits) { + av_log(avctx, AV_LOG_ERROR, "Cannot allocate temporary buffer\n"); + return AVERROR(ENOMEM); + } + + switch (c->avctx->pix_fmt) { + case PIX_FMT_RGB24: + case PIX_FMT_RGBA: + for (i = 0; i < c->planes; i++) { + ret = decode_plane(c, i, c->pic.data[0] + rgb_order[i], c->planes, + c->pic.linesize[0], avctx->width, avctx->height, + plane_start[i], plane_start[i + 1] - plane_start[i], + c->frame_pred == PRED_LEFT); + if (ret) + return ret; + if (c->frame_pred == PRED_MEDIAN) + restore_median(c->pic.data[0] + rgb_order[i], c->planes, + c->pic.linesize[0], avctx->width, avctx->height, + c->slices, 0); + } + restore_rgb_planes(c->pic.data[0], c->planes, c->pic.linesize[0], + avctx->width, avctx->height); + break; + case PIX_FMT_YUV420P: + for (i = 0; i < 3; i++) { + ret = decode_plane(c, i, c->pic.data[i], 1, + c->pic.linesize[i], avctx->width >> !!i, avctx->height >> !!i, + plane_start[i], plane_start[i + 1] - plane_start[i], + c->frame_pred == PRED_LEFT); + if (ret) + return ret; + if (c->frame_pred == PRED_MEDIAN) { + if (!c->interlaced) { + restore_median(c->pic.data[i], 1, c->pic.linesize[i], + avctx->width >> !!i, avctx->height >> !!i, + c->slices, !i); + } else { + restore_median_il(c->pic.data[i], 1, c->pic.linesize[i], + avctx->width >> !!i, + avctx->height >> !!i, + c->slices, !i); + } + } + } + break; + case PIX_FMT_YUV422P: + for (i = 0; i < 3; i++) { + ret = decode_plane(c, i, c->pic.data[i], 1, + c->pic.linesize[i], avctx->width >> !!i, avctx->height, + plane_start[i], plane_start[i + 1] - plane_start[i], + c->frame_pred == PRED_LEFT); + if (ret) + return ret; + if (c->frame_pred == PRED_MEDIAN) { + if (!c->interlaced) { + restore_median(c->pic.data[i], 1, c->pic.linesize[i], + avctx->width >> !!i, avctx->height, + c->slices, 0); + } else { + restore_median_il(c->pic.data[i], 1, c->pic.linesize[i], + avctx->width >> !!i, avctx->height, + c->slices, 0); + } + } + } + break; + } + + *data_size = sizeof(AVFrame); + *(AVFrame*)data = c->pic; + + /* always report that the buffer was completely consumed */ + return buf_size; +} + +static av_cold int decode_init(AVCodecContext *avctx) +{ + UtvideoContext * const c = avctx->priv_data; + + c->avctx = avctx; + + dsputil_init(&c->dsp, avctx); + + if (avctx->extradata_size < 16) { + av_log(avctx, AV_LOG_ERROR, "Insufficient extradata size %d, should be at least 16\n", + avctx->extradata_size); + return AVERROR_INVALIDDATA; + } + + av_log(avctx, AV_LOG_DEBUG, "Encoder version %d.%d.%d.%d\n", + avctx->extradata[3], avctx->extradata[2], + avctx->extradata[1], avctx->extradata[0]); + av_log(avctx, AV_LOG_DEBUG, "Original format %X\n", AV_RB32(avctx->extradata + 4)); + c->frame_info_size = AV_RL32(avctx->extradata + 8); + c->flags = AV_RL32(avctx->extradata + 12); + + if (c->frame_info_size != 4) + av_log_ask_for_sample(avctx, "Frame info is not 4 bytes\n"); + av_log(avctx, AV_LOG_DEBUG, "Encoding parameters %08X\n", c->flags); + c->slices = (c->flags >> 24) + 1; + c->compression = c->flags & 1; + c->interlaced = c->flags & 0x800; + + c->slice_bits_size = 0; + + switch (avctx->codec_tag) { + case MKTAG('U', 'L', 'R', 'G'): + c->planes = 3; + avctx->pix_fmt = PIX_FMT_RGB24; + break; + case MKTAG('U', 'L', 'R', 'A'): + c->planes = 4; + avctx->pix_fmt = PIX_FMT_RGBA; + break; + case MKTAG('U', 'L', 'Y', '0'): + c->planes = 3; + avctx->pix_fmt = PIX_FMT_YUV420P; + break; + case MKTAG('U', 'L', 'Y', '2'): + c->planes = 3; + avctx->pix_fmt = PIX_FMT_YUV422P; + break; + default: + av_log(avctx, AV_LOG_ERROR, "Unknown Ut Video FOURCC provided (%08X)\n", + avctx->codec_tag); + return AVERROR_INVALIDDATA; + } + + return 0; +} + +static av_cold int decode_end(AVCodecContext *avctx) +{ + UtvideoContext * const c = avctx->priv_data; + + if (c->pic.data[0]) + ff_thread_release_buffer(avctx, &c->pic); + + av_freep(&c->slice_bits); + + return 0; +} + +AVCodec ff_utvideo_decoder = { + .name = "utvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_UTVIDEO, + .priv_data_size = sizeof(UtvideoContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, + .long_name = NULL_IF_CONFIG_SMALL("Ut Video"), +}; + diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/v210dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/v210dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/v210dec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/v210dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,7 +30,7 @@ av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n"); return -1; } - avctx->pix_fmt = PIX_FMT_YUV422P16; + avctx->pix_fmt = PIX_FMT_YUV422P10; avctx->bits_per_raw_sample = 10; avctx->coded_frame = avcodec_alloc_frame(); @@ -68,10 +68,10 @@ #define READ_PIXELS(a, b, c) \ do { \ - val = av_le2ne32(*src++); \ - *a++ = val << 6; \ - *b++ = (val >> 4) & 0xFFC0; \ - *c++ = (val >> 14) & 0xFFC0; \ + val = av_le2ne32(*src++); \ + *a++ = val & 0x3FF; \ + *b++ = (val >> 10) & 0x3FF; \ + *c++ = (val >> 20) & 0x3FF; \ } while (0) for (h = 0; h < avctx->height; h++) { @@ -87,15 +87,15 @@ READ_PIXELS(u, y, v); val = av_le2ne32(*src++); - *y++ = val << 6; + *y++ = val & 0x3FF; } if (w < avctx->width - 3) { - *u++ = (val >> 4) & 0xFFC0; - *y++ = (val >> 14) & 0xFFC0; + *u++ = (val >> 10) & 0x3FF; + *y++ = (val >> 20) & 0x3FF; val = av_le2ne32(*src++); - *v++ = val << 6; - *y++ = (val >> 4) & 0xFFC0; + *v++ = val & 0x3FF; + *y++ = (val >> 10) & 0x3FF; } psrc += stride; @@ -121,14 +121,12 @@ } AVCodec ff_v210_decoder = { - "v210", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_V210, - 0, - decode_init, - NULL, - decode_close, - decode_frame, - CODEC_CAP_DR1, + .name = "v210", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_V210, + .init = decode_init, + .close = decode_close, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/v210enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/v210enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/v210enc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/v210enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -31,8 +31,8 @@ return -1; } - if (avctx->pix_fmt != PIX_FMT_YUV422P16) { - av_log(avctx, AV_LOG_ERROR, "v210 needs YUV422P16\n"); + if (avctx->pix_fmt != PIX_FMT_YUV422P10) { + av_log(avctx, AV_LOG_ERROR, "v210 needs YUV422P10\n"); return -1; } @@ -66,11 +66,13 @@ return -1; } +#define CLIP(v) av_clip(v, 4, 1019) + #define WRITE_PIXELS(a, b, c) \ do { \ - val = (*a++ >> 6) | \ - ((*b++ & 0xFFC0) << 4); \ - val|= (*c++ & 0xFFC0) << 14; \ + val = CLIP(*a++); \ + val |= (CLIP(*b++) << 10) | \ + (CLIP(*c++) << 20); \ bytestream_put_le32(&p, val); \ } while (0) @@ -85,17 +87,15 @@ if (w < avctx->width - 1) { WRITE_PIXELS(u, y, v); - val = *y++ >> 6; + val = CLIP(*y++); if (w == avctx->width - 2) bytestream_put_le32(&p, val); } if (w < avctx->width - 3) { - val |=((*u++ & 0xFFC0) << 4) | - ((*y++ & 0xFFC0) << 14); + val |= (CLIP(*u++) << 10) | (CLIP(*y++) << 20); bytestream_put_le32(&p, val); - val = (*v++ >> 6) | - (*y++ & 0xFFC0) << 4; + val = CLIP(*v++) | (CLIP(*y++) << 10); bytestream_put_le32(&p, val); } @@ -118,13 +118,12 @@ } AVCodec ff_v210_encoder = { - "v210", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_V210, - 0, - encode_init, - encode_frame, - encode_close, - .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV422P16, PIX_FMT_NONE}, + .name = "v210", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_V210, + .init = encode_init, + .encode = encode_frame, + .close = encode_close, + .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV422P10, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/v210x.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/v210x.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/v210x.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/v210x.c 2012-01-11 00:34:30.000000000 +0000 @@ -133,14 +133,12 @@ } AVCodec ff_v210x_decoder = { - "v210x", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_V210X, - 0, - decode_init, - NULL, - decode_close, - decode_frame, - CODEC_CAP_DR1, + .name = "v210x", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_V210X, + .init = decode_init, + .close = decode_close, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/v410dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/v410dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/v410dec.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/v410dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,118 @@ +/* + * v410 decoder + * + * Copyright (c) 2011 Derek Buitenhuis + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/intreadwrite.h" +#include "avcodec.h" + +static av_cold int v410_decode_init(AVCodecContext *avctx) +{ + avctx->pix_fmt = PIX_FMT_YUV444P10; + avctx->bits_per_raw_sample = 10; + + if (avctx->width & 1) { + av_log(avctx, AV_LOG_ERROR, "v410 requires even width.\n"); + return AVERROR_INVALIDDATA; + } + + avctx->coded_frame = avcodec_alloc_frame(); + + if (!avctx->coded_frame) { + av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n"); + return AVERROR(ENOMEM); + } + + return 0; +} + +static int v410_decode_frame(AVCodecContext *avctx, void *data, + int *data_size, AVPacket *avpkt) +{ + AVFrame *pic = avctx->coded_frame; + uint8_t *src = avpkt->data; + uint16_t *y, *u, *v; + uint32_t val; + int i, j; + + if (pic->data[0]) + avctx->release_buffer(avctx, pic); + + if (avpkt->size < 4 * avctx->height * avctx->width) { + av_log(avctx, AV_LOG_ERROR, "Insufficient input data.\n"); + return AVERROR(EINVAL); + } + + pic->reference = 0; + + if (avctx->get_buffer(avctx, pic) < 0) { + av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n"); + return AVERROR(ENOMEM); + } + + pic->key_frame = 1; + pic->pict_type = FF_I_TYPE; + + y = (uint16_t *)pic->data[0]; + u = (uint16_t *)pic->data[1]; + v = (uint16_t *)pic->data[2]; + + for (i = 0; i < avctx->height; i++) { + for (j = 0; j < avctx->width; j++) { + val = AV_RL32(src); + + u[j] = (val >> 2) & 0x3FF; + y[j] = (val >> 12) & 0x3FF; + v[j] = (val >> 22); + + src += 4; + } + + y += pic->linesize[0] >> 1; + u += pic->linesize[1] >> 1; + v += pic->linesize[2] >> 1; + } + + *data_size = sizeof(AVFrame); + *(AVFrame *)data = *pic; + + return avpkt->size; +} + +static av_cold int v410_decode_close(AVCodecContext *avctx) +{ + if (avctx->coded_frame->data[0]) + avctx->release_buffer(avctx, avctx->coded_frame); + + av_freep(&avctx->coded_frame); + + return 0; +} + +AVCodec ff_v410_decoder = { + .name = "v410", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_V410, + .init = v410_decode_init, + .decode = v410_decode_frame, + .close = v410_decode_close, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:4:4 10-bit"), +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/v410enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/v410enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/v410enc.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/v410enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,99 @@ +/* + * v410 encoder + * + * Copyright (c) 2011 Derek Buitenhuis + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/intreadwrite.h" +#include "avcodec.h" + +static av_cold int v410_encode_init(AVCodecContext *avctx) +{ + if (avctx->width & 1) { + av_log(avctx, AV_LOG_ERROR, "v410 requires even width.\n"); + return AVERROR_INVALIDDATA; + } + + avctx->coded_frame = avcodec_alloc_frame(); + + if (!avctx->coded_frame) { + av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n"); + return AVERROR(ENOMEM); + } + + return 0; +} + +static int v410_encode_frame(AVCodecContext *avctx, uint8_t *buf, + int buf_size, void *data) +{ + AVFrame *pic = data; + uint8_t *dst = buf; + uint16_t *y, *u, *v; + uint32_t val; + int i, j; + int output_size = 0; + + if (buf_size < avctx->width * avctx->height * 4) { + av_log(avctx, AV_LOG_ERROR, "Out buffer is too small.\n"); + return AVERROR(ENOMEM); + } + + avctx->coded_frame->reference = 0; + avctx->coded_frame->key_frame = 1; + avctx->coded_frame->pict_type = FF_I_TYPE; + + y = (uint16_t *)pic->data[0]; + u = (uint16_t *)pic->data[1]; + v = (uint16_t *)pic->data[2]; + + for (i = 0; i < avctx->height; i++) { + for (j = 0; j < avctx->width; j++) { + val = u[j] << 2; + val |= y[j] << 12; + val |= (uint32_t) v[j] << 22; + AV_WL32(dst, val); + dst += 4; + output_size += 4; + } + y += pic->linesize[0] >> 1; + u += pic->linesize[1] >> 1; + v += pic->linesize[2] >> 1; + } + + return output_size; +} + +static av_cold int v410_encode_close(AVCodecContext *avctx) +{ + av_freep(&avctx->coded_frame); + + return 0; +} + +AVCodec ff_v410_encoder = { + .name = "v410", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_V410, + .init = v410_encode_init, + .encode = v410_encode_frame, + .close = v410_encode_close, + .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV444P10, PIX_FMT_NONE }, + .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:4:4 10-bit"), +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,7 +24,7 @@ #include "vaapi_internal.h" /** - * \addtogroup VAAPI_Decoding + * @addtogroup VAAPI_Decoding * * @{ */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi.h 2012-01-11 00:34:30.000000000 +0000 @@ -27,8 +27,8 @@ #include /** - * \defgroup VAAPI_Decoding VA API Decoding - * \ingroup Decoder + * @defgroup VAAPI_Decoding VA API Decoding + * @ingroup Decoder * @{ */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi_h264.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi_h264.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi_h264.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi_h264.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,9 +23,10 @@ #include "vaapi_internal.h" #include "h264.h" -/** @file - * This file implements the glue code between Libav's and VA API's - * structures for H.264 decoding. +/** + * @file + * This file implements the glue code between Libav's and VA API's + * structures for H.264 decoding. */ /** @@ -54,7 +55,7 @@ int pic_structure) { if (pic_structure == 0) - pic_structure = pic->reference; + pic_structure = pic->f.reference; pic_structure &= PICT_FRAME; /* PICT_TOP_FIELD|PICT_BOTTOM_FIELD */ va_pic->picture_id = ff_vaapi_get_surface_id(pic); @@ -63,7 +64,7 @@ va_pic->flags = 0; if (pic_structure != PICT_FRAME) va_pic->flags |= (pic_structure & PICT_TOP_FIELD) ? VA_PICTURE_H264_TOP_FIELD : VA_PICTURE_H264_BOTTOM_FIELD; - if (pic->reference) + if (pic->f.reference) va_pic->flags |= pic->long_ref ? VA_PICTURE_H264_LONG_TERM_REFERENCE : VA_PICTURE_H264_SHORT_TERM_REFERENCE; va_pic->TopFieldOrderCnt = 0; @@ -133,13 +134,13 @@ for (i = 0; i < h->short_ref_count; i++) { Picture * const pic = h->short_ref[i]; - if (pic && pic->reference && dpb_add(&dpb, pic) < 0) + if (pic && pic->f.reference && dpb_add(&dpb, pic) < 0) return -1; } for (i = 0; i < 16; i++) { Picture * const pic = h->long_ref[i]; - if (pic && pic->reference && dpb_add(&dpb, pic) < 0) + if (pic && pic->f.reference && dpb_add(&dpb, pic) < 0) return -1; } return 0; @@ -159,7 +160,7 @@ { unsigned int i, n = 0; for (i = 0; i < ref_count; i++) - if (ref_list[i].reference) + if (ref_list[i].f.reference) fill_vaapi_pic(&RefPicList[n++], &ref_list[i], 0); for (; n < 32; n++) @@ -340,9 +341,7 @@ .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_H264, .pix_fmt = PIX_FMT_VAAPI_VLD, - .capabilities = 0, .start_frame = start_frame, .end_frame = end_frame, .decode_slice = decode_slice, - .priv_data_size = 0, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi_internal.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi_internal.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi_internal.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi_internal.h 2012-01-11 00:34:30.000000000 +0000 @@ -30,7 +30,7 @@ #include "mpegvideo.h" /** - * \addtogroup VAAPI_Decoding + * @addtogroup VAAPI_Decoding * * @{ */ @@ -38,7 +38,7 @@ /** Extract VASurfaceID from a Picture */ static inline VASurfaceID ff_vaapi_get_surface_id(Picture *pic) { - return (uintptr_t)pic->data[3]; + return (uintptr_t)pic->f.data[3]; } /** Common AVHWAccel.end_frame() implementation */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi_mpeg2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi_mpeg2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi_mpeg2.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi_mpeg2.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,8 +26,8 @@ /** Reconstruct bitstream f_code */ static inline int mpeg2_get_f_code(MpegEncContext *s) { - return ((s->mpeg_f_code[0][0] << 12) | (s->mpeg_f_code[0][1] << 8) | - (s->mpeg_f_code[1][0] << 4) | s->mpeg_f_code[1][1]); + return (s->mpeg_f_code[0][0] << 12) | (s->mpeg_f_code[0][1] << 8) | + (s->mpeg_f_code[1][0] << 4) | s->mpeg_f_code[1][1]; } /** Determine frame start: first field for field picture or frame picture */ @@ -109,14 +109,14 @@ MpegEncContext * const s = avctx->priv_data; VASliceParameterBufferMPEG2 *slice_param; GetBitContext gb; - uint32_t start_code, quantiser_scale_code, intra_slice_flag, macroblock_offset; + uint32_t quantiser_scale_code, intra_slice_flag, macroblock_offset; av_dlog(avctx, "vaapi_mpeg2_decode_slice(): buffer %p, size %d\n", buffer, size); /* Determine macroblock_offset */ init_get_bits(&gb, buffer, 8 * size); - start_code = get_bits(&gb, 32); - assert((start_code & 0xffffff00) == 0x00000100); + if (get_bits_long(&gb, 32) >> 8 != 1) /* start code */ + return AVERROR_INVALIDDATA; quantiser_scale_code = get_bits(&gb, 5); intra_slice_flag = get_bits1(&gb); if (intra_slice_flag) { @@ -143,9 +143,7 @@ .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_MPEG2VIDEO, .pix_fmt = PIX_FMT_VAAPI_VLD, - .capabilities = 0, .start_frame = vaapi_mpeg2_start_frame, .end_frame = vaapi_mpeg2_end_frame, .decode_slice = vaapi_mpeg2_decode_slice, - .priv_data_size = 0, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi_mpeg4.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi_mpeg4.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi_mpeg4.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi_mpeg4.c 2012-01-11 00:34:30.000000000 +0000 @@ -79,7 +79,7 @@ pic_param->quant_precision = s->quant_precision; pic_param->vop_fields.value = 0; /* reset all bits */ pic_param->vop_fields.bits.vop_coding_type = s->pict_type - AV_PICTURE_TYPE_I; - pic_param->vop_fields.bits.backward_reference_vop_coding_type = s->pict_type == AV_PICTURE_TYPE_B ? s->next_picture.pict_type - AV_PICTURE_TYPE_I : 0; + pic_param->vop_fields.bits.backward_reference_vop_coding_type = s->pict_type == AV_PICTURE_TYPE_B ? s->next_picture.f.pict_type - AV_PICTURE_TYPE_I : 0; pic_param->vop_fields.bits.vop_rounding_type = s->no_rounding; pic_param->vop_fields.bits.intra_dc_vlc_thr = mpeg4_get_intra_dc_vlc_thr(s); pic_param->vop_fields.bits.top_field_first = s->top_field_first; @@ -98,7 +98,7 @@ pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture); /* Fill in VAIQMatrixBufferMPEG4 */ - /* Only the first inverse quantisation method uses the weighthing matrices */ + /* Only the first inverse quantisation method uses the weighting matrices */ if (pic_param->vol_fields.bits.quant_type) { iq_matrix = ff_vaapi_alloc_iq_matrix(vactx, sizeof(VAIQMatrixBufferMPEG4)); if (!iq_matrix) @@ -155,11 +155,9 @@ .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_MPEG4, .pix_fmt = PIX_FMT_VAAPI_VLD, - .capabilities = 0, .start_frame = vaapi_mpeg4_start_frame, .end_frame = vaapi_mpeg4_end_frame, .decode_slice = vaapi_mpeg4_decode_slice, - .priv_data_size = 0, }; #endif @@ -169,10 +167,8 @@ .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_H263, .pix_fmt = PIX_FMT_VAAPI_VLD, - .capabilities = 0, .start_frame = vaapi_mpeg4_start_frame, .end_frame = vaapi_mpeg4_end_frame, .decode_slice = vaapi_mpeg4_decode_slice, - .priv_data_size = 0, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi_vc1.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi_vc1.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vaapi_vc1.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vaapi_vc1.c 2012-01-11 00:34:30.000000000 +0000 @@ -42,10 +42,10 @@ { if (v->mv_type_is_raw) return 0; - return (v->s.pict_type == AV_PICTURE_TYPE_P && - (v->mv_mode == MV_PMODE_MIXED_MV || - (v->mv_mode == MV_PMODE_INTENSITY_COMP && - v->mv_mode2 == MV_PMODE_MIXED_MV))); + return v->s.pict_type == AV_PICTURE_TYPE_P && + (v->mv_mode == MV_PMODE_MIXED_MV || + (v->mv_mode == MV_PMODE_INTENSITY_COMP && + v->mv_mode2 == MV_PMODE_MIXED_MV)); } /** Check whether the SKIPMB bitplane is present */ @@ -53,8 +53,8 @@ { if (v->skip_is_raw) return 0; - return (v->s.pict_type == AV_PICTURE_TYPE_P || - (v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type)); + return v->s.pict_type == AV_PICTURE_TYPE_P || + (v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type); } /** Check whether the DIRECTMB bitplane is present */ @@ -70,9 +70,9 @@ { if (v->acpred_is_raw) return 0; - return (v->profile == PROFILE_ADVANCED && - (v->s.pict_type == AV_PICTURE_TYPE_I || - (v->s.pict_type == AV_PICTURE_TYPE_B && v->bi_type))); + return v->profile == PROFILE_ADVANCED && + (v->s.pict_type == AV_PICTURE_TYPE_I || + (v->s.pict_type == AV_PICTURE_TYPE_B && v->bi_type)); } /** Check whether the OVERFLAGS bitplane is present */ @@ -80,11 +80,11 @@ { if (v->overflg_is_raw) return 0; - return (v->profile == PROFILE_ADVANCED && - (v->s.pict_type == AV_PICTURE_TYPE_I || - (v->s.pict_type == AV_PICTURE_TYPE_B && v->bi_type)) && - (v->overlap && v->pq <= 8) && - v->condover == CONDOVER_SELECT); + return v->profile == PROFILE_ADVANCED && + (v->s.pict_type == AV_PICTURE_TYPE_I || + (v->s.pict_type == AV_PICTURE_TYPE_B && v->bi_type)) && + (v->overlap && v->pq <= 8) && + v->condover == CONDOVER_SELECT; } /** Reconstruct bitstream PTYPE (7.1.1.4, index into Table-35) */ @@ -116,6 +116,18 @@ return 0; } +/** Reconstruct bitstream TTFRM (7.1.1.41, Table-53) */ +static inline int vc1_get_TTFRM(VC1Context *v) +{ + switch (v->ttfrm) { + case TT_8X8: return 0; + case TT_8X4: return 1; + case TT_4X8: return 2; + case TT_4X4: return 3; + } + return 0; +} + /** Pack Libav bitplanes into a VABitPlaneBuffer element */ static inline void vc1_pack_bitplanes(uint8_t *bitplane, int n, const uint8_t *ff_bp[3], int x, int y, int stride) { @@ -239,7 +251,7 @@ pic_param->transform_fields.value = 0; /* reset all bits */ pic_param->transform_fields.bits.variable_sized_transform_flag = v->vstransform; pic_param->transform_fields.bits.mb_level_transform_type_flag = v->ttmbf; - pic_param->transform_fields.bits.frame_level_transform_type = v->ttfrm; + pic_param->transform_fields.bits.frame_level_transform_type = vc1_get_TTFRM(v); pic_param->transform_fields.bits.transform_ac_codingset_idx1 = v->c_ac_table_index; pic_param->transform_fields.bits.transform_ac_codingset_idx2 = v->y_ac_table_index; pic_param->transform_fields.bits.intra_transform_dc_table = v->s.dc_table_index; @@ -334,11 +346,9 @@ .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_WMV3, .pix_fmt = PIX_FMT_VAAPI_VLD, - .capabilities = 0, .start_frame = vaapi_vc1_start_frame, .end_frame = vaapi_vc1_end_frame, .decode_slice = vaapi_vc1_decode_slice, - .priv_data_size = 0, }; #endif @@ -347,9 +357,7 @@ .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_VC1, .pix_fmt = PIX_FMT_VAAPI_VLD, - .capabilities = 0, .start_frame = vaapi_vc1_start_frame, .end_frame = vaapi_vc1_end_frame, .decode_slice = vaapi_vc1_decode_slice, - .priv_data_size = 0, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vb.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vb.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vb.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vb.c 2012-01-11 00:34:30.000000000 +0000 @@ -288,14 +288,13 @@ } AVCodec ff_vb_decoder = { - "vb", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VB, - sizeof(VBDecContext), - decode_init, - NULL, - decode_end, - decode_frame, + .name = "vb", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VB, + .priv_data_size = sizeof(VBDecContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, .long_name = NULL_IF_CONFIG_SMALL("Beam Software VB"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vble.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vble.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vble.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vble.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,229 @@ +/* + * VBLE Decoder + * Copyright (c) 2011 Derek Buitenhuis + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * VBLE Decoder + */ + +#define BITSTREAM_READER_LE + +#include "avcodec.h" +#include "dsputil.h" +#include "get_bits.h" + +typedef struct { + AVCodecContext *avctx; + DSPContext dsp; + + int size; + uint8_t *val; /* First holds the lengths of vlc symbols and then their values */ +} VBLEContext; + +static uint8_t vble_read_reverse_unary(GetBitContext *gb) +{ + /* At most we need to read 9 bits total to get indices up to 8 */ + uint8_t val = show_bits(gb, 8); + + if (val) { + val = 7 - av_log2_16bit(av_reverse[val]); + skip_bits(gb, val + 1); + return val; + } else { + skip_bits(gb, 8); + if (get_bits1(gb)) + return 8; + } + + /* Return something larger than 8 on error */ + return UINT8_MAX; +} + +static int vble_unpack(VBLEContext *ctx, GetBitContext *gb) +{ + int i; + + /* Read all the lengths in first */ + for (i = 0; i < ctx->size; i++) { + ctx->val[i] = vble_read_reverse_unary(gb); + + if (ctx->val[i] == UINT8_MAX) + return -1; + } + + for (i = 0; i < ctx->size; i++) { + /* Check we have enough bits left */ + if (get_bits_left(gb) < ctx->val[i]) + return -1; + + /* get_bits can't take a length of 0 */ + if (ctx->val[i]) + ctx->val[i] = (1 << ctx->val[i]) + get_bits(gb, ctx->val[i]) - 1; + } + + return 0; +} + +static void vble_restore_plane(VBLEContext *ctx, int plane, int offset, + int width, int height) +{ + AVFrame *pic = ctx->avctx->coded_frame; + uint8_t *dst = pic->data[plane]; + uint8_t *val = ctx->val + offset; + int stride = pic->linesize[plane]; + int i, j, left, left_top; + + for (i = 0; i < height; i++) { + for (j = 0; j < width; j++) + val[j] = (val[j] >> 1) ^ -(val[j] & 1); + + if (i) { + left = 0; + left_top = dst[-stride]; + ctx->dsp.add_hfyu_median_prediction(dst, dst-stride, val, + width, &left, &left_top); + } else { + dst[0] = val[0]; + for (j = 1; j < width; j++) + dst[j] = val[j] + dst[j - 1]; + } + dst += stride; + val += width; + } +} + +static int vble_decode_frame(AVCodecContext *avctx, void *data, int *data_size, + AVPacket *avpkt) +{ + VBLEContext *ctx = avctx->priv_data; + AVFrame *pic = avctx->coded_frame; + GetBitContext gb; + const uint8_t *src = avpkt->data; + int version; + int offset = 0; + int width_uv = avctx->width / 2, height_uv = avctx->height / 2; + + pic->reference = 0; + + /* Clear buffer if need be */ + if (pic->data[0]) + avctx->release_buffer(avctx, pic); + + /* Allocate buffer */ + if (avctx->get_buffer(avctx, pic) < 0) { + av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n"); + return AVERROR(ENOMEM); + } + + /* Set flags */ + pic->key_frame = 1; + pic->pict_type = FF_I_TYPE; + + /* Version should always be 1 */ + version = AV_RL32(src); + + if (version != 1) { + av_log(avctx, AV_LOG_ERROR, "Unsupported VBLE Version: %d\n", version); + return AVERROR_INVALIDDATA; + } + + init_get_bits(&gb, src + 4, (avpkt->size - 4) * 8); + + /* Unpack */ + if (vble_unpack(ctx, &gb) < 0) { + av_log(avctx, AV_LOG_ERROR, "Invalid Code\n"); + return AVERROR_INVALIDDATA; + } + + /* Restore planes. Should be almost identical to Huffyuv's. */ + vble_restore_plane(ctx, 0, offset, avctx->width, avctx->height); + + /* Chroma */ + if (!(ctx->avctx->flags & CODEC_FLAG_GRAY)) { + offset += avctx->width * avctx->height; + vble_restore_plane(ctx, 1, offset, width_uv, height_uv); + + offset += width_uv * height_uv; + vble_restore_plane(ctx, 2, offset, width_uv, height_uv); + } + + *data_size = sizeof(AVFrame); + *(AVFrame *)data = *pic; + + return avpkt->size; +} + +static av_cold int vble_decode_close(AVCodecContext *avctx) +{ + VBLEContext *ctx = avctx->priv_data; + AVFrame *pic = avctx->coded_frame; + + if (pic->data[0]) + avctx->release_buffer(avctx, pic); + + av_freep(&avctx->coded_frame); + av_freep(&ctx->val); + + return 0; +} + +static av_cold int vble_decode_init(AVCodecContext *avctx) +{ + VBLEContext *ctx = avctx->priv_data; + + /* Stash for later use */ + ctx->avctx = avctx; + dsputil_init(&ctx->dsp, avctx); + + avctx->pix_fmt = PIX_FMT_YUV420P; + avctx->bits_per_raw_sample = 8; + avctx->coded_frame = avcodec_alloc_frame(); + + if (!avctx->coded_frame) { + av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n"); + return AVERROR(ENOMEM); + } + + ctx->size = avpicture_get_size(avctx->pix_fmt, + avctx->width, avctx->height); + + ctx->val = av_malloc(ctx->size * sizeof(*ctx->val)); + + if (!ctx->val) { + av_log(avctx, AV_LOG_ERROR, "Could not allocate values buffer.\n"); + vble_decode_close(avctx); + return AVERROR(ENOMEM); + } + + return 0; +} + +AVCodec ff_vble_decoder = { + .name = "vble", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VBLE, + .priv_data_size = sizeof(VBLEContext), + .init = vble_decode_init, + .close = vble_decode_close, + .decode = vble_decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("VBLE Lossless Codec"), +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1.c 2011-05-05 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * VC-1 and WMV3 decoder common code + * Copyright (c) 2011 Mashiat Sarker Shakkhar * Copyright (c) 2006-2007 Konstantin Shishkov * Partly based on vc9.c (c) 2005 Anonymous, Alex Beregszaszi, Michael Niedermayer * @@ -25,6 +26,7 @@ * VC-1 and WMV3 decoder common code * */ + #include "internal.h" #include "dsputil.h" #include "avcodec.h" @@ -40,7 +42,7 @@ /***********************************************************************/ /** - * @defgroup vc1bitplane VC-1 Bitplane decoding + * @name VC-1 Bitplane decoding * @see 8.7, p56 * @{ */ @@ -66,14 +68,16 @@ * @param[in] height Height of this buffer * @param[in] stride of this buffer */ -static void decode_rowskip(uint8_t* plane, int width, int height, int stride, GetBitContext *gb){ +static void decode_rowskip(uint8_t* plane, int width, int height, int stride, + GetBitContext *gb) +{ int x, y; - for (y=0; ys.mb_width; - height = v->s.mb_height; + width = v->s.mb_width; + height = v->s.mb_height >> v->field_mode; stride = v->s.mb_stride; invert = get_bits1(gb); imode = get_vlc2(gb, ff_vc1_imode_vlc.table, VC1_IMODE_VLC_BITS, 1); *raw_flag = 0; - switch (imode) - { + switch (imode) { case IMODE_RAW: //Data is actually read in the MB layer (same for all tests == "raw") *raw_flag = 1; //invert ignored return invert; case IMODE_DIFF2: case IMODE_NORM2: - if ((height * width) & 1) - { + if ((height * width) & 1) { *planep++ = get_bits1(gb); - offset = 1; + offset = 1; } - else offset = 0; + else + offset = 0; // decode bitplane as one long line for (y = offset; y < height * width; y += 2) { code = get_vlc2(gb, ff_vc1_norm2_vlc.table, VC1_NORM2_VLC_BITS, 1); *planep++ = code & 1; offset++; - if(offset == width) { - offset = 0; + if (offset == width) { + offset = 0; planep += stride - width; } *planep++ = code >> 1; offset++; - if(offset == width) { - offset = 0; + if (offset == width) { + offset = 0; planep += stride - width; } } break; case IMODE_DIFF6: case IMODE_NORM6: - if(!(height % 3) && (width % 3)) { // use 2x3 decoding - for(y = 0; y < height; y+= 3) { - for(x = width & 1; x < width; x += 2) { + if (!(height % 3) && (width % 3)) { // use 2x3 decoding + for (y = 0; y < height; y += 3) { + for (x = width & 1; x < width; x += 2) { code = get_vlc2(gb, ff_vc1_norm6_vlc.table, VC1_NORM6_VLC_BITS, 2); - if(code < 0){ + if (code < 0) { av_log(v->s.avctx, AV_LOG_DEBUG, "invalid NORM-6 VLC\n"); return -1; } - planep[x + 0] = (code >> 0) & 1; - planep[x + 1] = (code >> 1) & 1; - planep[x + 0 + stride] = (code >> 2) & 1; - planep[x + 1 + stride] = (code >> 3) & 1; + planep[x + 0] = (code >> 0) & 1; + planep[x + 1] = (code >> 1) & 1; + planep[x + 0 + stride] = (code >> 2) & 1; + planep[x + 1 + stride] = (code >> 3) & 1; planep[x + 0 + stride * 2] = (code >> 4) & 1; planep[x + 1 + stride * 2] = (code >> 5) & 1; } planep += stride * 3; } - if(width & 1) decode_colskip(data, 1, height, stride, &v->s.gb); + if (width & 1) + decode_colskip(data, 1, height, stride, &v->s.gb); } else { // 3x2 planep += (height & 1) * stride; - for(y = height & 1; y < height; y += 2) { - for(x = width % 3; x < width; x += 3) { + for (y = height & 1; y < height; y += 2) { + for (x = width % 3; x < width; x += 3) { code = get_vlc2(gb, ff_vc1_norm6_vlc.table, VC1_NORM6_VLC_BITS, 2); - if(code < 0){ + if (code < 0) { av_log(v->s.avctx, AV_LOG_DEBUG, "invalid NORM-6 VLC\n"); return -1; } - planep[x + 0] = (code >> 0) & 1; - planep[x + 1] = (code >> 1) & 1; - planep[x + 2] = (code >> 2) & 1; + planep[x + 0] = (code >> 0) & 1; + planep[x + 1] = (code >> 1) & 1; + planep[x + 2] = (code >> 2) & 1; planep[x + 0 + stride] = (code >> 3) & 1; planep[x + 1 + stride] = (code >> 4) & 1; planep[x + 2 + stride] = (code >> 5) & 1; @@ -192,8 +198,10 @@ planep += stride * 2; } x = width % 3; - if(x) decode_colskip(data , x, height , stride, &v->s.gb); - if(height & 1) decode_rowskip(data+x, width - x, 1, stride, &v->s.gb); + if (x) + decode_colskip(data, x, height, stride, &v->s.gb); + if (height & 1) + decode_rowskip(data + x, width - x, 1, stride, &v->s.gb); } break; case IMODE_ROWSKIP: @@ -202,33 +210,30 @@ case IMODE_COLSKIP: decode_colskip(data, width, height, stride, &v->s.gb); break; - default: break; + default: + break; } /* Applying diff operator */ - if (imode == IMODE_DIFF2 || imode == IMODE_DIFF6) - { + if (imode == IMODE_DIFF2 || imode == IMODE_DIFF6) { planep = data; planep[0] ^= invert; - for (x=1; xdquant == 2) - { + if (v->dquant == 2) { pqdiff = get_bits(gb, 3); - if (pqdiff == 7) v->altpq = get_bits(gb, 5); - else v->altpq = v->pq + pqdiff + 1; - } - else - { + if (pqdiff == 7) + v->altpq = get_bits(gb, 5); + else + v->altpq = v->pq + pqdiff + 1; + } else { v->dquantfrm = get_bits1(gb); - if ( v->dquantfrm ) - { + if (v->dquantfrm) { v->dqprofile = get_bits(gb, 2); - switch (v->dqprofile) - { + switch (v->dqprofile) { case DQPROFILE_SINGLE_EDGE: case DQPROFILE_DOUBLE_EDGES: v->dqsbedge = get_bits(gb, 2); break; case DQPROFILE_ALL_MBS: v->dqbilevel = get_bits1(gb); - if(!v->dqbilevel) + if (!v->dqbilevel) v->halfpq = 0; - default: break; //Forbidden ? + default: + break; //Forbidden ? } - if (v->dqbilevel || v->dqprofile != DQPROFILE_ALL_MBS) - { + if (v->dqbilevel || v->dqprofile != DQPROFILE_ALL_MBS) { pqdiff = get_bits(gb, 3); - if (pqdiff == 7) v->altpq = get_bits(gb, 5); - else v->altpq = v->pq + pqdiff + 1; + if (pqdiff == 7) + v->altpq = get_bits(gb, 5); + else + v->altpq = v->pq + pqdiff + 1; } } } @@ -291,80 +295,69 @@ { av_log(avctx, AV_LOG_DEBUG, "Header: %0X\n", show_bits(gb, 32)); v->profile = get_bits(gb, 2); - if (v->profile == PROFILE_COMPLEX) - { + if (v->profile == PROFILE_COMPLEX) { av_log(avctx, AV_LOG_WARNING, "WMV3 Complex Profile is not fully supported\n"); } - if (v->profile == PROFILE_ADVANCED) - { + if (v->profile == PROFILE_ADVANCED) { v->zz_8x4 = ff_vc1_adv_progressive_8x4_zz; v->zz_4x8 = ff_vc1_adv_progressive_4x8_zz; return decode_sequence_header_adv(v, gb); - } - else - { + } else { v->zz_8x4 = wmv2_scantableA; v->zz_4x8 = wmv2_scantableB; v->res_y411 = get_bits1(gb); v->res_sprite = get_bits1(gb); - if (v->res_y411) - { + if (v->res_y411) { av_log(avctx, AV_LOG_ERROR, "Old interlaced mode is not supported\n"); return -1; } - if (v->res_sprite) { - av_log(avctx, AV_LOG_ERROR, "WMVP is not fully supported\n"); - } } // (fps-2)/4 (->30) v->frmrtq_postproc = get_bits(gb, 3); //common // (bitrate-32kbps)/64kbps v->bitrtq_postproc = get_bits(gb, 5); //common - v->s.loop_filter = get_bits1(gb); //common - if(v->s.loop_filter == 1 && v->profile == PROFILE_SIMPLE) - { + v->s.loop_filter = get_bits1(gb); //common + if (v->s.loop_filter == 1 && v->profile == PROFILE_SIMPLE) { av_log(avctx, AV_LOG_ERROR, "LOOPFILTER shall not be enabled in Simple Profile\n"); } - if(v->s.avctx->skip_loop_filter >= AVDISCARD_ALL) + if (v->s.avctx->skip_loop_filter >= AVDISCARD_ALL) v->s.loop_filter = 0; - v->res_x8 = get_bits1(gb); //reserved - v->multires = get_bits1(gb); - v->res_fasttx = get_bits1(gb); - if (!v->res_fasttx) - { - v->vc1dsp.vc1_inv_trans_8x8 = ff_simple_idct; - v->vc1dsp.vc1_inv_trans_8x4 = ff_simple_idct84_add; - v->vc1dsp.vc1_inv_trans_4x8 = ff_simple_idct48_add; - v->vc1dsp.vc1_inv_trans_4x4 = ff_simple_idct44_add; - v->vc1dsp.vc1_inv_trans_8x8_dc = ff_simple_idct_add; + v->res_x8 = get_bits1(gb); //reserved + v->multires = get_bits1(gb); + v->res_fasttx = get_bits1(gb); + if (!v->res_fasttx) { + v->vc1dsp.vc1_inv_trans_8x8 = ff_simple_idct_8; + v->vc1dsp.vc1_inv_trans_8x4 = ff_simple_idct84_add; + v->vc1dsp.vc1_inv_trans_4x8 = ff_simple_idct48_add; + v->vc1dsp.vc1_inv_trans_4x4 = ff_simple_idct44_add; + v->vc1dsp.vc1_inv_trans_8x8_dc = ff_simple_idct_add_8; v->vc1dsp.vc1_inv_trans_8x4_dc = ff_simple_idct84_add; v->vc1dsp.vc1_inv_trans_4x8_dc = ff_simple_idct48_add; v->vc1dsp.vc1_inv_trans_4x4_dc = ff_simple_idct44_add; } - v->fastuvmc = get_bits1(gb); //common - if (!v->profile && !v->fastuvmc) - { + v->fastuvmc = get_bits1(gb); //common + if (!v->profile && !v->fastuvmc) { av_log(avctx, AV_LOG_ERROR, "FASTUVMC unavailable in Simple Profile\n"); return -1; } - v->extended_mv = get_bits1(gb); //common + v->extended_mv = get_bits1(gb); //common if (!v->profile && v->extended_mv) { av_log(avctx, AV_LOG_ERROR, "Extended MVs unavailable in Simple Profile\n"); return -1; } - v->dquant = get_bits(gb, 2); //common - v->vstransform = get_bits1(gb); //common + v->dquant = get_bits(gb, 2); //common + v->vstransform = get_bits1(gb); //common - v->res_transtab = get_bits1(gb); + v->res_transtab = get_bits1(gb); if (v->res_transtab) { av_log(avctx, AV_LOG_ERROR, @@ -372,12 +365,11 @@ return -1; } - v->overlap = get_bits1(gb); //common + v->overlap = get_bits1(gb); //common v->s.resync_marker = get_bits1(gb); - v->rangered = get_bits1(gb); - if (v->rangered && v->profile == PROFILE_SIMPLE) - { + v->rangered = get_bits1(gb); + if (v->rangered && v->profile == PROFILE_SIMPLE) { av_log(avctx, AV_LOG_INFO, "RANGERED should be set to 0 in Simple Profile\n"); } @@ -401,8 +393,7 @@ } else { v->res_rtm_flag = get_bits1(gb); //reserved } - if (!v->res_rtm_flag) - { + if (!v->res_rtm_flag) { // av_log(avctx, AV_LOG_ERROR, // "0 for reserved RES_RTM_FLAG is forbidden\n"); av_log(avctx, AV_LOG_ERROR, @@ -410,17 +401,17 @@ //return -1; } //TODO: figure out what they mean (always 0x402F) - if(!v->res_fasttx) skip_bits(gb, 16); + if (!v->res_fasttx) + skip_bits(gb, 16); av_log(avctx, AV_LOG_DEBUG, - "Profile %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n" - "LoopFilter=%i, MultiRes=%i, FastUVMC=%i, Extended MV=%i\n" - "Rangered=%i, VSTransform=%i, Overlap=%i, SyncMarker=%i\n" - "DQuant=%i, Quantizer mode=%i, Max B frames=%i\n", - v->profile, v->frmrtq_postproc, v->bitrtq_postproc, - v->s.loop_filter, v->multires, v->fastuvmc, v->extended_mv, - v->rangered, v->vstransform, v->overlap, v->s.resync_marker, - v->dquant, v->quantizer_mode, avctx->max_b_frames - ); + "Profile %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n" + "LoopFilter=%i, MultiRes=%i, FastUVMC=%i, Extended MV=%i\n" + "Rangered=%i, VSTransform=%i, Overlap=%i, SyncMarker=%i\n" + "DQuant=%i, Quantizer mode=%i, Max B frames=%i\n", + v->profile, v->frmrtq_postproc, v->bitrtq_postproc, + v->s.loop_filter, v->multires, v->fastuvmc, v->extended_mv, + v->rangered, v->vstransform, v->overlap, v->s.resync_marker, + v->dquant, v->quantizer_mode, avctx->max_b_frames); return 0; } @@ -428,98 +419,104 @@ { v->res_rtm_flag = 1; v->level = get_bits(gb, 3); - if(v->level >= 5) - { + if (v->level >= 5) { av_log(v->s.avctx, AV_LOG_ERROR, "Reserved LEVEL %i\n",v->level); } v->chromaformat = get_bits(gb, 2); - if (v->chromaformat != 1) - { + if (v->chromaformat != 1) { av_log(v->s.avctx, AV_LOG_ERROR, "Only 4:2:0 chroma format supported\n"); return -1; } // (fps-2)/4 (->30) - v->frmrtq_postproc = get_bits(gb, 3); //common + v->frmrtq_postproc = get_bits(gb, 3); //common // (bitrate-32kbps)/64kbps - v->bitrtq_postproc = get_bits(gb, 5); //common - v->postprocflag = get_bits1(gb); //common + v->bitrtq_postproc = get_bits(gb, 5); //common + v->postprocflag = get_bits1(gb); //common - v->s.avctx->coded_width = (get_bits(gb, 12) + 1) << 1; + v->s.avctx->coded_width = (get_bits(gb, 12) + 1) << 1; v->s.avctx->coded_height = (get_bits(gb, 12) + 1) << 1; - v->s.avctx->width = v->s.avctx->coded_width; - v->s.avctx->height = v->s.avctx->coded_height; - v->broadcast = get_bits1(gb); - v->interlace = get_bits1(gb); - v->tfcntrflag = get_bits1(gb); - v->finterpflag = get_bits1(gb); + v->s.avctx->width = v->s.avctx->coded_width; + v->s.avctx->height = v->s.avctx->coded_height; + v->broadcast = get_bits1(gb); + v->interlace = get_bits1(gb); + v->tfcntrflag = get_bits1(gb); + v->finterpflag = get_bits1(gb); skip_bits1(gb); // reserved - v->s.h_edge_pos = v->s.avctx->coded_width; - v->s.v_edge_pos = v->s.avctx->coded_height; - av_log(v->s.avctx, AV_LOG_DEBUG, - "Advanced Profile level %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n" - "LoopFilter=%i, ChromaFormat=%i, Pulldown=%i, Interlace: %i\n" - "TFCTRflag=%i, FINTERPflag=%i\n", - v->level, v->frmrtq_postproc, v->bitrtq_postproc, - v->s.loop_filter, v->chromaformat, v->broadcast, v->interlace, - v->tfcntrflag, v->finterpflag - ); + "Advanced Profile level %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n" + "LoopFilter=%i, ChromaFormat=%i, Pulldown=%i, Interlace: %i\n" + "TFCTRflag=%i, FINTERPflag=%i\n", + v->level, v->frmrtq_postproc, v->bitrtq_postproc, + v->s.loop_filter, v->chromaformat, v->broadcast, v->interlace, + v->tfcntrflag, v->finterpflag); v->psf = get_bits1(gb); - if(v->psf) { //PsF, 6.1.13 + if (v->psf) { //PsF, 6.1.13 av_log(v->s.avctx, AV_LOG_ERROR, "Progressive Segmented Frame mode: not supported (yet)\n"); return -1; } v->s.max_b_frames = v->s.avctx->max_b_frames = 7; - if(get_bits1(gb)) { //Display Info - decoding is not affected by it + if (get_bits1(gb)) { //Display Info - decoding is not affected by it int w, h, ar = 0; av_log(v->s.avctx, AV_LOG_DEBUG, "Display extended info:\n"); - v->s.avctx->width = w = get_bits(gb, 14) + 1; - v->s.avctx->height = h = get_bits(gb, 14) + 1; + w = get_bits(gb, 14) + 1; + h = get_bits(gb, 14) + 1; av_log(v->s.avctx, AV_LOG_DEBUG, "Display dimensions: %ix%i\n", w, h); - if(get_bits1(gb)) + if (get_bits1(gb)) ar = get_bits(gb, 4); - if(ar && ar < 14){ + if (ar && ar < 14) { v->s.avctx->sample_aspect_ratio = ff_vc1_pixel_aspect[ar]; - }else if(ar == 15){ - w = get_bits(gb, 8); - h = get_bits(gb, 8); + } else if (ar == 15) { + w = get_bits(gb, 8) + 1; + h = get_bits(gb, 8) + 1; v->s.avctx->sample_aspect_ratio = (AVRational){w, h}; - } - av_log(v->s.avctx, AV_LOG_DEBUG, "Aspect: %i:%i\n", v->s.avctx->sample_aspect_ratio.num, v->s.avctx->sample_aspect_ratio.den); + } else { + av_reduce(&v->s.avctx->sample_aspect_ratio.num, + &v->s.avctx->sample_aspect_ratio.den, + v->s.avctx->height * w, + v->s.avctx->width * h, + 1 << 30); + } + av_log(v->s.avctx, AV_LOG_DEBUG, "Aspect: %i:%i\n", + v->s.avctx->sample_aspect_ratio.num, + v->s.avctx->sample_aspect_ratio.den); - if(get_bits1(gb)){ //framerate stuff - if(get_bits1(gb)) { + if (get_bits1(gb)) { //framerate stuff + if (get_bits1(gb)) { v->s.avctx->time_base.num = 32; v->s.avctx->time_base.den = get_bits(gb, 16) + 1; } else { int nr, dr; nr = get_bits(gb, 8); dr = get_bits(gb, 4); - if(nr && nr < 8 && dr && dr < 3){ + if (nr && nr < 8 && dr && dr < 3) { v->s.avctx->time_base.num = ff_vc1_fps_dr[dr - 1]; v->s.avctx->time_base.den = ff_vc1_fps_nr[nr - 1] * 1000; } } + if (v->broadcast) { // Pulldown may be present + v->s.avctx->time_base.den *= 2; + v->s.avctx->ticks_per_frame = 2; + } } - if(get_bits1(gb)){ - v->color_prim = get_bits(gb, 8); + if (get_bits1(gb)) { + v->color_prim = get_bits(gb, 8); v->transfer_char = get_bits(gb, 8); - v->matrix_coef = get_bits(gb, 8); + v->matrix_coef = get_bits(gb, 8); } } v->hrd_param_flag = get_bits1(gb); - if(v->hrd_param_flag) { + if (v->hrd_param_flag) { int i; v->hrd_num_leaky_buckets = get_bits(gb, 5); skip_bits(gb, 4); //bitrate exponent skip_bits(gb, 4); //buffer size exponent - for(i = 0; i < v->hrd_num_leaky_buckets; i++) { + for (i = 0; i < v->hrd_num_leaky_buckets; i++) { skip_bits(gb, 16); //hrd_rate[n] skip_bits(gb, 16); //hrd_buffer[n] } @@ -532,45 +529,45 @@ int i; av_log(avctx, AV_LOG_DEBUG, "Entry point: %08X\n", show_bits_long(gb, 32)); - v->broken_link = get_bits1(gb); - v->closed_entry = get_bits1(gb); - v->panscanflag = get_bits1(gb); - v->refdist_flag = get_bits1(gb); - v->s.loop_filter = get_bits1(gb); - v->fastuvmc = get_bits1(gb); - v->extended_mv = get_bits1(gb); - v->dquant = get_bits(gb, 2); - v->vstransform = get_bits1(gb); - v->overlap = get_bits1(gb); + v->broken_link = get_bits1(gb); + v->closed_entry = get_bits1(gb); + v->panscanflag = get_bits1(gb); + v->refdist_flag = get_bits1(gb); + v->s.loop_filter = get_bits1(gb); + v->fastuvmc = get_bits1(gb); + v->extended_mv = get_bits1(gb); + v->dquant = get_bits(gb, 2); + v->vstransform = get_bits1(gb); + v->overlap = get_bits1(gb); v->quantizer_mode = get_bits(gb, 2); - if(v->hrd_param_flag){ - for(i = 0; i < v->hrd_num_leaky_buckets; i++) { + if (v->hrd_param_flag) { + for (i = 0; i < v->hrd_num_leaky_buckets; i++) { skip_bits(gb, 8); //hrd_full[n] } } - if(get_bits1(gb)){ - avctx->coded_width = (get_bits(gb, 12)+1)<<1; - avctx->coded_height = (get_bits(gb, 12)+1)<<1; + if (get_bits1(gb)) { + avctx->width = avctx->coded_width = (get_bits(gb, 12) + 1) << 1; + avctx->height = avctx->coded_height = (get_bits(gb, 12) + 1) << 1; } - if(v->extended_mv) + if (v->extended_mv) v->extended_dmv = get_bits1(gb); - if((v->range_mapy_flag = get_bits1(gb))) { + if ((v->range_mapy_flag = get_bits1(gb))) { av_log(avctx, AV_LOG_ERROR, "Luma scaling is not supported, expect wrong picture\n"); v->range_mapy = get_bits(gb, 3); } - if((v->range_mapuv_flag = get_bits1(gb))) { + if ((v->range_mapuv_flag = get_bits1(gb))) { av_log(avctx, AV_LOG_ERROR, "Chroma scaling is not supported, expect wrong picture\n"); v->range_mapuv = get_bits(gb, 3); } av_log(avctx, AV_LOG_DEBUG, "Entry point info:\n" - "BrokenLink=%i, ClosedEntry=%i, PanscanFlag=%i\n" - "RefDist=%i, Postproc=%i, FastUVMC=%i, ExtMV=%i\n" - "DQuant=%i, VSTransform=%i, Overlap=%i, Qmode=%i\n", - v->broken_link, v->closed_entry, v->panscanflag, v->refdist_flag, v->s.loop_filter, - v->fastuvmc, v->extended_mv, v->dquant, v->vstransform, v->overlap, v->quantizer_mode); + "BrokenLink=%i, ClosedEntry=%i, PanscanFlag=%i\n" + "RefDist=%i, Postproc=%i, FastUVMC=%i, ExtMV=%i\n" + "DQuant=%i, VSTransform=%i, Overlap=%i, Qmode=%i\n", + v->broken_link, v->closed_entry, v->panscanflag, v->refdist_flag, v->s.loop_filter, + v->fastuvmc, v->extended_mv, v->dquant, v->vstransform, v->overlap, v->quantizer_mode); return 0; } @@ -579,41 +576,48 @@ { int pqindex, lowquant, status; - if(v->finterpflag) v->interpfrm = get_bits1(gb); + if (v->finterpflag) + v->interpfrm = get_bits1(gb); skip_bits(gb, 2); //framecnt unused v->rangeredfrm = 0; - if (v->rangered) v->rangeredfrm = get_bits1(gb); + if (v->rangered) + v->rangeredfrm = get_bits1(gb); v->s.pict_type = get_bits1(gb); if (v->s.avctx->max_b_frames) { if (!v->s.pict_type) { - if (get_bits1(gb)) v->s.pict_type = AV_PICTURE_TYPE_I; - else v->s.pict_type = AV_PICTURE_TYPE_B; - } else v->s.pict_type = AV_PICTURE_TYPE_P; - } else v->s.pict_type = v->s.pict_type ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I; + if (get_bits1(gb)) + v->s.pict_type = AV_PICTURE_TYPE_I; + else + v->s.pict_type = AV_PICTURE_TYPE_B; + } else + v->s.pict_type = AV_PICTURE_TYPE_P; + } else + v->s.pict_type = v->s.pict_type ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I; v->bi_type = 0; - if(v->s.pict_type == AV_PICTURE_TYPE_B) { + if (v->s.pict_type == AV_PICTURE_TYPE_B) { v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); - v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index]; - if(v->bfraction == 0) { + v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index]; + if (v->bfraction == 0) { v->s.pict_type = AV_PICTURE_TYPE_BI; } } - if(v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) + if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) skip_bits(gb, 7); // skip buffer fullness - if(v->parse_only) + if (v->parse_only) return 0; /* calculate RND */ - if(v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) + if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) v->rnd = 1; - if(v->s.pict_type == AV_PICTURE_TYPE_P) + if (v->s.pict_type == AV_PICTURE_TYPE_P) v->rnd ^= 1; /* Quantizer stuff */ pqindex = get_bits(gb, 5); - if(!pqindex) return -1; + if (!pqindex) + return -1; if (v->quantizer_mode == QUANT_FRAME_IMPLICIT) v->pq = ff_vc1_pquant_table[0][pqindex]; else @@ -625,63 +629,69 @@ if (v->quantizer_mode == QUANT_NON_UNIFORM) v->pquantizer = 0; v->pqindex = pqindex; - if (pqindex < 9) v->halfpq = get_bits1(gb); - else v->halfpq = 0; + if (pqindex < 9) + v->halfpq = get_bits1(gb); + else + v->halfpq = 0; if (v->quantizer_mode == QUANT_FRAME_EXPLICIT) v->pquantizer = get_bits1(gb); v->dquantfrm = 0; - if (v->extended_mv == 1) v->mvrange = get_unary(gb, 0, 3); + if (v->extended_mv == 1) + v->mvrange = get_unary(gb, 0, 3); v->k_x = v->mvrange + 9 + (v->mvrange >> 1); //k_x can be 9 10 12 13 v->k_y = v->mvrange + 8; //k_y can be 8 9 10 11 v->range_x = 1 << (v->k_x - 1); v->range_y = 1 << (v->k_y - 1); - if (v->multires && v->s.pict_type != AV_PICTURE_TYPE_B) v->respic = get_bits(gb, 2); + if (v->multires && v->s.pict_type != AV_PICTURE_TYPE_B) + v->respic = get_bits(gb, 2); - if(v->res_x8 && (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI)){ + if (v->res_x8 && (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI)) { v->x8_type = get_bits1(gb); - }else v->x8_type = 0; + } else + v->x8_type = 0; //av_log(v->s.avctx, AV_LOG_INFO, "%c Frame: QP=[%i]%i (+%i/2) %i\n", // (v->s.pict_type == AV_PICTURE_TYPE_P) ? 'P' : ((v->s.pict_type == AV_PICTURE_TYPE_I) ? 'I' : 'B'), pqindex, v->pq, v->halfpq, v->rangeredfrm); - if(v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_P) v->use_ic = 0; + if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_P) + v->use_ic = 0; - switch(v->s.pict_type) { + switch (v->s.pict_type) { case AV_PICTURE_TYPE_P: - if (v->pq < 5) v->tt_index = 0; - else if(v->pq < 13) v->tt_index = 1; - else v->tt_index = 2; + if (v->pq < 5) v->tt_index = 0; + else if (v->pq < 13) v->tt_index = 1; + else v->tt_index = 2; lowquant = (v->pq > 12) ? 0 : 1; v->mv_mode = ff_vc1_mv_pmode_table[lowquant][get_unary(gb, 1, 4)]; - if (v->mv_mode == MV_PMODE_INTENSITY_COMP) - { + if (v->mv_mode == MV_PMODE_INTENSITY_COMP) { int scale, shift, i; v->mv_mode2 = ff_vc1_mv_pmode_table2[lowquant][get_unary(gb, 1, 3)]; v->lumscale = get_bits(gb, 6); v->lumshift = get_bits(gb, 6); - v->use_ic = 1; + v->use_ic = 1; /* fill lookup tables for intensity compensation */ - if(!v->lumscale) { + if (!v->lumscale) { scale = -64; shift = (255 - v->lumshift * 2) << 6; - if(v->lumshift > 31) + if (v->lumshift > 31) shift += 128 << 6; } else { scale = v->lumscale + 32; - if(v->lumshift > 31) + if (v->lumshift > 31) shift = (v->lumshift - 64) << 6; else shift = v->lumshift << 6; } - for(i = 0; i < 256; i++) { - v->luty[i] = av_clip_uint8((scale * i + shift + 32) >> 6); + for (i = 0; i < 256; i++) { + v->luty[i] = av_clip_uint8((scale * i + shift + 32) >> 6); v->lutuv[i] = av_clip_uint8((scale * (i - 128) + 128*64 + 32) >> 6); } } - if(v->mv_mode == MV_PMODE_1MV_HPEL || v->mv_mode == MV_PMODE_1MV_HPEL_BILIN) + v->qs_last = v->s.quarter_sample; + if (v->mv_mode == MV_PMODE_1MV_HPEL || v->mv_mode == MV_PMODE_1MV_HPEL_BILIN) v->s.quarter_sample = 0; - else if(v->mv_mode == MV_PMODE_INTENSITY_COMP) { - if(v->mv_mode2 == MV_PMODE_1MV_HPEL || v->mv_mode2 == MV_PMODE_1MV_HPEL_BILIN) + else if (v->mv_mode == MV_PMODE_INTENSITY_COMP) { + if (v->mv_mode2 == MV_PMODE_1MV_HPEL || v->mv_mode2 == MV_PMODE_1MV_HPEL_BILIN) v->s.quarter_sample = 0; else v->s.quarter_sample = 1; @@ -689,12 +699,12 @@ v->s.quarter_sample = 1; v->s.mspel = !(v->mv_mode == MV_PMODE_1MV_HPEL_BILIN || (v->mv_mode == MV_PMODE_INTENSITY_COMP && v->mv_mode2 == MV_PMODE_1MV_HPEL_BILIN)); - if ((v->mv_mode == MV_PMODE_INTENSITY_COMP && - v->mv_mode2 == MV_PMODE_MIXED_MV) - || v->mv_mode == MV_PMODE_MIXED_MV) - { + if ((v->mv_mode == MV_PMODE_INTENSITY_COMP && + v->mv_mode2 == MV_PMODE_MIXED_MV) || + v->mv_mode == MV_PMODE_MIXED_MV) { status = bitplane_decoding(v->mv_type_mb_plane, &v->mv_type_is_raw, v); - if (status < 0) return -1; + if (status < 0) + return -1; av_log(v->s.avctx, AV_LOG_DEBUG, "MB MV Type plane encoding: " "Imode: %i, Invert: %i\n", status>>1, status&1); } else { @@ -702,7 +712,8 @@ memset(v->mv_type_mb_plane, 0, v->s.mb_stride * v->s.mb_height); } status = bitplane_decoding(v->s.mbskip_table, &v->skip_is_raw, v); - if (status < 0) return -1; + if (status < 0) + return -1; av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: " "Imode: %i, Invert: %i\n", status>>1, status&1); @@ -710,18 +721,15 @@ v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)]; - if (v->dquant) - { + if (v->dquant) { av_log(v->s.avctx, AV_LOG_DEBUG, "VOP DQuant info\n"); vop_dquant_decoding(v); } v->ttfrm = 0; //FIXME Is that so ? - if (v->vstransform) - { + if (v->vstransform) { v->ttmbf = get_bits1(gb); - if (v->ttmbf) - { + if (v->ttmbf) { v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)]; } } else { @@ -730,38 +738,38 @@ } break; case AV_PICTURE_TYPE_B: - if (v->pq < 5) v->tt_index = 0; - else if(v->pq < 13) v->tt_index = 1; - else v->tt_index = 2; + if (v->pq < 5) v->tt_index = 0; + else if (v->pq < 13) v->tt_index = 1; + else v->tt_index = 2; - v->mv_mode = get_bits1(gb) ? MV_PMODE_1MV : MV_PMODE_1MV_HPEL_BILIN; + v->mv_mode = get_bits1(gb) ? MV_PMODE_1MV : MV_PMODE_1MV_HPEL_BILIN; + v->qs_last = v->s.quarter_sample; v->s.quarter_sample = (v->mv_mode == MV_PMODE_1MV); - v->s.mspel = v->s.quarter_sample; + v->s.mspel = v->s.quarter_sample; status = bitplane_decoding(v->direct_mb_plane, &v->dmb_is_raw, v); - if (status < 0) return -1; + if (status < 0) + return -1; av_log(v->s.avctx, AV_LOG_DEBUG, "MB Direct Type plane encoding: " "Imode: %i, Invert: %i\n", status>>1, status&1); status = bitplane_decoding(v->s.mbskip_table, &v->skip_is_raw, v); - if (status < 0) return -1; + if (status < 0) + return -1; av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: " "Imode: %i, Invert: %i\n", status>>1, status&1); v->s.mv_table_index = get_bits(gb, 2); - v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)]; + v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)]; - if (v->dquant) - { + if (v->dquant) { av_log(v->s.avctx, AV_LOG_DEBUG, "VOP DQuant info\n"); vop_dquant_decoding(v); } v->ttfrm = 0; - if (v->vstransform) - { + if (v->vstransform) { v->ttmbf = get_bits1(gb); - if (v->ttmbf) - { + if (v->ttmbf) { v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)]; } } else { @@ -771,85 +779,154 @@ break; } - if(!v->x8_type) - { + if (!v->x8_type) { /* AC Syntax */ v->c_ac_table_index = decode012(gb); - if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) - { + if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) { v->y_ac_table_index = decode012(gb); } /* DC Syntax */ v->s.dc_table_index = get_bits1(gb); } - if(v->s.pict_type == AV_PICTURE_TYPE_BI) { + if (v->s.pict_type == AV_PICTURE_TYPE_BI) { v->s.pict_type = AV_PICTURE_TYPE_B; - v->bi_type = 1; + v->bi_type = 1; } return 0; } +/* fill lookup tables for intensity compensation */ +#define INIT_LUT(lumscale, lumshift, luty, lutuv) \ + if (!lumscale) { \ + scale = -64; \ + shift = (255 - lumshift * 2) << 6; \ + if (lumshift > 31) \ + shift += 128 << 6; \ + } else { \ + scale = lumscale + 32; \ + if (lumshift > 31) \ + shift = (lumshift - 64) << 6; \ + else \ + shift = lumshift << 6; \ + } \ + for (i = 0; i < 256; i++) { \ + luty[i] = av_clip_uint8((scale * i + shift + 32) >> 6); \ + lutuv[i] = av_clip_uint8((scale * (i - 128) + 128*64 + 32) >> 6); \ + } + int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) { int pqindex, lowquant; int status; + int mbmodetab, imvtab, icbptab, twomvbptab, fourmvbptab; /* useful only for debugging */ + int scale, shift, i; /* for initializing LUT for intensity compensation */ v->p_frame_skipped = 0; + if (v->second_field) { + v->s.pict_type = (v->fptype & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I; + if (v->fptype & 4) + v->s.pict_type = (v->fptype & 1) ? AV_PICTURE_TYPE_BI : AV_PICTURE_TYPE_B; + v->s.current_picture_ptr->f.pict_type = v->s.pict_type; + if (!v->pic_header_flag) + goto parse_common_info; + } - if(v->interlace){ + v->field_mode = 0; + if (v->interlace) { v->fcm = decode012(gb); - if(v->fcm){ - if(!v->warn_interlaced++) - av_log(v->s.avctx, AV_LOG_ERROR, "Interlaced frames/fields support is not implemented\n"); - return -1; + if (v->fcm) { + if (v->fcm == ILACE_FIELD) + v->field_mode = 1; + if (!v->warn_interlaced++) + av_log(v->s.avctx, AV_LOG_ERROR, + "Interlaced frames/fields support is incomplete\n"); } + } else { + v->fcm = PROGRESSIVE; } - switch(get_unary(gb, 0, 4)) { - case 0: - v->s.pict_type = AV_PICTURE_TYPE_P; - break; - case 1: - v->s.pict_type = AV_PICTURE_TYPE_B; - break; - case 2: - v->s.pict_type = AV_PICTURE_TYPE_I; - break; - case 3: - v->s.pict_type = AV_PICTURE_TYPE_BI; - break; - case 4: - v->s.pict_type = AV_PICTURE_TYPE_P; // skipped pic - v->p_frame_skipped = 1; - return 0; + + if (v->field_mode) { + v->fptype = get_bits(gb, 3); + v->s.pict_type = (v->fptype & 2) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I; + if (v->fptype & 4) // B-picture + v->s.pict_type = (v->fptype & 2) ? AV_PICTURE_TYPE_BI : AV_PICTURE_TYPE_B; + } else { + switch (get_unary(gb, 0, 4)) { + case 0: + v->s.pict_type = AV_PICTURE_TYPE_P; + break; + case 1: + v->s.pict_type = AV_PICTURE_TYPE_B; + break; + case 2: + v->s.pict_type = AV_PICTURE_TYPE_I; + break; + case 3: + v->s.pict_type = AV_PICTURE_TYPE_BI; + break; + case 4: + v->s.pict_type = AV_PICTURE_TYPE_P; // skipped pic + v->p_frame_skipped = 1; + break; + } } - if(v->tfcntrflag) + if (v->tfcntrflag) skip_bits(gb, 8); - if(v->broadcast) { - if(!v->interlace || v->psf) { + if (v->broadcast) { + if (!v->interlace || v->psf) { v->rptfrm = get_bits(gb, 2); } else { v->tff = get_bits1(gb); - v->rptfrm = get_bits1(gb); + v->rff = get_bits1(gb); } } - if(v->panscanflag) { + if (v->panscanflag) { av_log_missing_feature(v->s.avctx, "Pan-scan", 0); //... } + if (v->p_frame_skipped) { + return 0; + } v->rnd = get_bits1(gb); - if(v->interlace) + if (v->interlace) v->uvsamp = get_bits1(gb); - if(v->finterpflag) v->interpfrm = get_bits1(gb); - if(v->s.pict_type == AV_PICTURE_TYPE_B) { + if (v->field_mode) { + if (!v->refdist_flag) + v->refdist = 0; + else { + if ((v->s.pict_type != AV_PICTURE_TYPE_B) + && (v->s.pict_type != AV_PICTURE_TYPE_BI)) { + v->refdist = get_bits(gb, 2); + if (v->refdist == 3) + v->refdist += get_unary(gb, 0, 16); + } else { + v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); + v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index]; + v->frfd = (v->bfraction * v->refdist) >> 8; + v->brfd = v->refdist - v->frfd - 1; + if (v->brfd < 0) + v->brfd = 0; + } + } + goto parse_common_info; + } + if (v->finterpflag) + v->interpfrm = get_bits1(gb); + if (v->s.pict_type == AV_PICTURE_TYPE_B) { v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); - v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index]; - if(v->bfraction == 0) { + v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index]; + if (v->bfraction == 0) { v->s.pict_type = AV_PICTURE_TYPE_BI; /* XXX: should not happen here */ } } + + parse_common_info: + if (v->field_mode) + v->cur_field_type = !(v->tff ^ v->second_field); pqindex = get_bits(gb, 5); - if(!pqindex) return -1; + if (!pqindex) + return -1; v->pqindex = pqindex; if (v->quantizer_mode == QUANT_FRAME_IMPLICIT) v->pq = ff_vc1_pquant_table[0][pqindex]; @@ -862,118 +939,193 @@ if (v->quantizer_mode == QUANT_NON_UNIFORM) v->pquantizer = 0; v->pqindex = pqindex; - if (pqindex < 9) v->halfpq = get_bits1(gb); - else v->halfpq = 0; + if (pqindex < 9) + v->halfpq = get_bits1(gb); + else + v->halfpq = 0; if (v->quantizer_mode == QUANT_FRAME_EXPLICIT) v->pquantizer = get_bits1(gb); - if(v->postprocflag) + if (v->postprocflag) v->postproc = get_bits(gb, 2); - if(v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_P) v->use_ic = 0; + if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_P) + v->use_ic = 0; - if(v->parse_only) + if (v->parse_only) return 0; - switch(v->s.pict_type) { + switch (v->s.pict_type) { case AV_PICTURE_TYPE_I: case AV_PICTURE_TYPE_BI: + if (v->fcm == ILACE_FRAME) { //interlace frame picture + status = bitplane_decoding(v->fieldtx_plane, &v->fieldtx_is_raw, v); + if (status < 0) + return -1; + av_log(v->s.avctx, AV_LOG_DEBUG, "FIELDTX plane encoding: " + "Imode: %i, Invert: %i\n", status>>1, status&1); + } status = bitplane_decoding(v->acpred_plane, &v->acpred_is_raw, v); - if (status < 0) return -1; + if (status < 0) + return -1; av_log(v->s.avctx, AV_LOG_DEBUG, "ACPRED plane encoding: " - "Imode: %i, Invert: %i\n", status>>1, status&1); + "Imode: %i, Invert: %i\n", status>>1, status&1); v->condover = CONDOVER_NONE; - if(v->overlap && v->pq <= 8) { + if (v->overlap && v->pq <= 8) { v->condover = decode012(gb); - if(v->condover == CONDOVER_SELECT) { + if (v->condover == CONDOVER_SELECT) { status = bitplane_decoding(v->over_flags_plane, &v->overflg_is_raw, v); - if (status < 0) return -1; + if (status < 0) + return -1; av_log(v->s.avctx, AV_LOG_DEBUG, "CONDOVER plane encoding: " - "Imode: %i, Invert: %i\n", status>>1, status&1); + "Imode: %i, Invert: %i\n", status>>1, status&1); } } break; case AV_PICTURE_TYPE_P: - if (v->extended_mv) v->mvrange = get_unary(gb, 0, 3); - else v->mvrange = 0; + if (v->field_mode) { + v->numref = get_bits1(gb); + if (!v->numref) { + v->reffield = get_bits1(gb); + v->ref_field_type[0] = v->reffield ^ !v->cur_field_type; + } + } + if (v->extended_mv) + v->mvrange = get_unary(gb, 0, 3); + else + v->mvrange = 0; + if (v->interlace) { + if (v->extended_dmv) + v->dmvrange = get_unary(gb, 0, 3); + else + v->dmvrange = 0; + if (v->fcm == ILACE_FRAME) { // interlaced frame picture + v->fourmvswitch = get_bits1(gb); + v->intcomp = get_bits1(gb); + if (v->intcomp) { + v->lumscale = get_bits(gb, 6); + v->lumshift = get_bits(gb, 6); + INIT_LUT(v->lumscale, v->lumshift, v->luty, v->lutuv); + } + status = bitplane_decoding(v->s.mbskip_table, &v->skip_is_raw, v); + av_log(v->s.avctx, AV_LOG_DEBUG, "SKIPMB plane encoding: " + "Imode: %i, Invert: %i\n", status>>1, status&1); + mbmodetab = get_bits(gb, 2); + if (v->fourmvswitch) + v->mbmode_vlc = &ff_vc1_intfr_4mv_mbmode_vlc[mbmodetab]; + else + v->mbmode_vlc = &ff_vc1_intfr_non4mv_mbmode_vlc[mbmodetab]; + imvtab = get_bits(gb, 2); + v->imv_vlc = &ff_vc1_1ref_mvdata_vlc[imvtab]; + // interlaced p-picture cbpcy range is [1, 63] + icbptab = get_bits(gb, 3); + v->cbpcy_vlc = &ff_vc1_icbpcy_vlc[icbptab]; + twomvbptab = get_bits(gb, 2); + v->twomvbp_vlc = &ff_vc1_2mv_block_pattern_vlc[twomvbptab]; + if (v->fourmvswitch) { + fourmvbptab = get_bits(gb, 2); + v->fourmvbp_vlc = &ff_vc1_4mv_block_pattern_vlc[fourmvbptab]; + } + } + } v->k_x = v->mvrange + 9 + (v->mvrange >> 1); //k_x can be 9 10 12 13 v->k_y = v->mvrange + 8; //k_y can be 8 9 10 11 v->range_x = 1 << (v->k_x - 1); v->range_y = 1 << (v->k_y - 1); - if (v->pq < 5) v->tt_index = 0; - else if(v->pq < 13) v->tt_index = 1; - else v->tt_index = 2; - - lowquant = (v->pq > 12) ? 0 : 1; - v->mv_mode = ff_vc1_mv_pmode_table[lowquant][get_unary(gb, 1, 4)]; - if (v->mv_mode == MV_PMODE_INTENSITY_COMP) - { - int scale, shift, i; - v->mv_mode2 = ff_vc1_mv_pmode_table2[lowquant][get_unary(gb, 1, 3)]; - v->lumscale = get_bits(gb, 6); - v->lumshift = get_bits(gb, 6); - /* fill lookup tables for intensity compensation */ - if(!v->lumscale) { - scale = -64; - shift = (255 - v->lumshift * 2) << 6; - if(v->lumshift > 31) - shift += 128 << 6; - } else { - scale = v->lumscale + 32; - if(v->lumshift > 31) - shift = (v->lumshift - 64) << 6; - else - shift = v->lumshift << 6; - } - for(i = 0; i < 256; i++) { - v->luty[i] = av_clip_uint8((scale * i + shift + 32) >> 6); - v->lutuv[i] = av_clip_uint8((scale * (i - 128) + 128*64 + 32) >> 6); + if (v->pq < 5) + v->tt_index = 0; + else if (v->pq < 13) + v->tt_index = 1; + else + v->tt_index = 2; + if (v->fcm != ILACE_FRAME) { + int mvmode; + mvmode = get_unary(gb, 1, 4); + lowquant = (v->pq > 12) ? 0 : 1; + v->mv_mode = ff_vc1_mv_pmode_table[lowquant][mvmode]; + if (v->mv_mode == MV_PMODE_INTENSITY_COMP) { + int mvmode2; + mvmode2 = get_unary(gb, 1, 3); + v->mv_mode2 = ff_vc1_mv_pmode_table2[lowquant][mvmode2]; + if (v->field_mode) + v->intcompfield = decode210(gb); + v->lumscale = get_bits(gb, 6); + v->lumshift = get_bits(gb, 6); + INIT_LUT(v->lumscale, v->lumshift, v->luty, v->lutuv); + if ((v->field_mode) && !v->intcompfield) { + v->lumscale2 = get_bits(gb, 6); + v->lumshift2 = get_bits(gb, 6); + INIT_LUT(v->lumscale2, v->lumshift2, v->luty2, v->lutuv2); + } + v->use_ic = 1; } - v->use_ic = 1; - } - if(v->mv_mode == MV_PMODE_1MV_HPEL || v->mv_mode == MV_PMODE_1MV_HPEL_BILIN) - v->s.quarter_sample = 0; - else if(v->mv_mode == MV_PMODE_INTENSITY_COMP) { - if(v->mv_mode2 == MV_PMODE_1MV_HPEL || v->mv_mode2 == MV_PMODE_1MV_HPEL_BILIN) + v->qs_last = v->s.quarter_sample; + if (v->mv_mode == MV_PMODE_1MV_HPEL || v->mv_mode == MV_PMODE_1MV_HPEL_BILIN) v->s.quarter_sample = 0; - else + else if (v->mv_mode == MV_PMODE_INTENSITY_COMP) { + if (v->mv_mode2 == MV_PMODE_1MV_HPEL || v->mv_mode2 == MV_PMODE_1MV_HPEL_BILIN) + v->s.quarter_sample = 0; + else + v->s.quarter_sample = 1; + } else v->s.quarter_sample = 1; - } else - v->s.quarter_sample = 1; - v->s.mspel = !(v->mv_mode == MV_PMODE_1MV_HPEL_BILIN || (v->mv_mode == MV_PMODE_INTENSITY_COMP && v->mv_mode2 == MV_PMODE_1MV_HPEL_BILIN)); - - if ((v->mv_mode == MV_PMODE_INTENSITY_COMP && + v->s.mspel = !(v->mv_mode == MV_PMODE_1MV_HPEL_BILIN + || (v->mv_mode == MV_PMODE_INTENSITY_COMP + && v->mv_mode2 == MV_PMODE_1MV_HPEL_BILIN)); + } + if (v->fcm == PROGRESSIVE) { // progressive + if ((v->mv_mode == MV_PMODE_INTENSITY_COMP && v->mv_mode2 == MV_PMODE_MIXED_MV) - || v->mv_mode == MV_PMODE_MIXED_MV) - { - status = bitplane_decoding(v->mv_type_mb_plane, &v->mv_type_is_raw, v); - if (status < 0) return -1; - av_log(v->s.avctx, AV_LOG_DEBUG, "MB MV Type plane encoding: " + || v->mv_mode == MV_PMODE_MIXED_MV) { + status = bitplane_decoding(v->mv_type_mb_plane, &v->mv_type_is_raw, v); + if (status < 0) + return -1; + av_log(v->s.avctx, AV_LOG_DEBUG, "MB MV Type plane encoding: " + "Imode: %i, Invert: %i\n", status>>1, status&1); + } else { + v->mv_type_is_raw = 0; + memset(v->mv_type_mb_plane, 0, v->s.mb_stride * v->s.mb_height); + } + status = bitplane_decoding(v->s.mbskip_table, &v->skip_is_raw, v); + if (status < 0) + return -1; + av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: " "Imode: %i, Invert: %i\n", status>>1, status&1); - } else { - v->mv_type_is_raw = 0; - memset(v->mv_type_mb_plane, 0, v->s.mb_stride * v->s.mb_height); - } - status = bitplane_decoding(v->s.mbskip_table, &v->skip_is_raw, v); - if (status < 0) return -1; - av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: " - "Imode: %i, Invert: %i\n", status>>1, status&1); - /* Hopefully this is correct for P frames */ - v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables - v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)]; - if (v->dquant) - { + /* Hopefully this is correct for P frames */ + v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables + v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)]; + } else if (v->fcm == ILACE_FRAME) { // frame interlaced + v->qs_last = v->s.quarter_sample; + v->s.quarter_sample = 1; + v->s.mspel = 1; + } else { // field interlaced + mbmodetab = get_bits(gb, 3); + imvtab = get_bits(gb, 2 + v->numref); + if (!v->numref) + v->imv_vlc = &ff_vc1_1ref_mvdata_vlc[imvtab]; + else + v->imv_vlc = &ff_vc1_2ref_mvdata_vlc[imvtab]; + icbptab = get_bits(gb, 3); + v->cbpcy_vlc = &ff_vc1_icbpcy_vlc[icbptab]; + if ((v->mv_mode == MV_PMODE_INTENSITY_COMP && + v->mv_mode2 == MV_PMODE_MIXED_MV) || v->mv_mode == MV_PMODE_MIXED_MV) { + fourmvbptab = get_bits(gb, 2); + v->fourmvbp_vlc = &ff_vc1_4mv_block_pattern_vlc[fourmvbptab]; + v->mbmode_vlc = &ff_vc1_if_mmv_mbmode_vlc[mbmodetab]; + } else { + v->mbmode_vlc = &ff_vc1_if_1mv_mbmode_vlc[mbmodetab]; + } + } + if (v->dquant) { av_log(v->s.avctx, AV_LOG_DEBUG, "VOP DQuant info\n"); vop_dquant_decoding(v); } v->ttfrm = 0; //FIXME Is that so ? - if (v->vstransform) - { + if (v->vstransform) { v->ttmbf = get_bits1(gb); - if (v->ttmbf) - { + if (v->ttmbf) { v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)]; } } else { @@ -982,45 +1134,82 @@ } break; case AV_PICTURE_TYPE_B: - if (v->extended_mv) v->mvrange = get_unary(gb, 0, 3); - else v->mvrange = 0; - v->k_x = v->mvrange + 9 + (v->mvrange >> 1); //k_x can be 9 10 12 13 - v->k_y = v->mvrange + 8; //k_y can be 8 9 10 11 + // TODO: implement interlaced frame B picture decoding + if (v->fcm == ILACE_FRAME) + return -1; + if (v->extended_mv) + v->mvrange = get_unary(gb, 0, 3); + else + v->mvrange = 0; + v->k_x = v->mvrange + 9 + (v->mvrange >> 1); //k_x can be 9 10 12 13 + v->k_y = v->mvrange + 8; //k_y can be 8 9 10 11 v->range_x = 1 << (v->k_x - 1); v->range_y = 1 << (v->k_y - 1); - if (v->pq < 5) v->tt_index = 0; - else if(v->pq < 13) v->tt_index = 1; - else v->tt_index = 2; - - v->mv_mode = get_bits1(gb) ? MV_PMODE_1MV : MV_PMODE_1MV_HPEL_BILIN; - v->s.quarter_sample = (v->mv_mode == MV_PMODE_1MV); - v->s.mspel = v->s.quarter_sample; - - status = bitplane_decoding(v->direct_mb_plane, &v->dmb_is_raw, v); - if (status < 0) return -1; - av_log(v->s.avctx, AV_LOG_DEBUG, "MB Direct Type plane encoding: " - "Imode: %i, Invert: %i\n", status>>1, status&1); - status = bitplane_decoding(v->s.mbskip_table, &v->skip_is_raw, v); - if (status < 0) return -1; - av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: " - "Imode: %i, Invert: %i\n", status>>1, status&1); + if (v->pq < 5) + v->tt_index = 0; + else if (v->pq < 13) + v->tt_index = 1; + else + v->tt_index = 2; - v->s.mv_table_index = get_bits(gb, 2); - v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)]; + if (v->field_mode) { + int mvmode; + if (v->extended_dmv) + v->dmvrange = get_unary(gb, 0, 3); + mvmode = get_unary(gb, 1, 3); + lowquant = (v->pq > 12) ? 0 : 1; + v->mv_mode = ff_vc1_mv_pmode_table2[lowquant][mvmode]; + v->qs_last = v->s.quarter_sample; + v->s.quarter_sample = (v->mv_mode == MV_PMODE_1MV || v->mv_mode == MV_PMODE_MIXED_MV); + v->s.mspel = !(v->mv_mode == MV_PMODE_1MV_HPEL_BILIN || v->mv_mode == MV_PMODE_1MV_HPEL); + status = bitplane_decoding(v->forward_mb_plane, &v->fmb_is_raw, v); + if (status < 0) + return -1; + av_log(v->s.avctx, AV_LOG_DEBUG, "MB Forward Type plane encoding: " + "Imode: %i, Invert: %i\n", status>>1, status&1); + mbmodetab = get_bits(gb, 3); + if (v->mv_mode == MV_PMODE_MIXED_MV) + v->mbmode_vlc = &ff_vc1_if_mmv_mbmode_vlc[mbmodetab]; + else + v->mbmode_vlc = &ff_vc1_if_1mv_mbmode_vlc[mbmodetab]; + imvtab = get_bits(gb, 3); + v->imv_vlc = &ff_vc1_2ref_mvdata_vlc[imvtab]; + icbptab = get_bits(gb, 3); + v->cbpcy_vlc = &ff_vc1_icbpcy_vlc[icbptab]; + if (v->mv_mode == MV_PMODE_MIXED_MV) { + fourmvbptab = get_bits(gb, 2); + v->fourmvbp_vlc = &ff_vc1_4mv_block_pattern_vlc[fourmvbptab]; + } + v->numref = 1; // interlaced field B pictures are always 2-ref + } else { + v->mv_mode = get_bits1(gb) ? MV_PMODE_1MV : MV_PMODE_1MV_HPEL_BILIN; + v->qs_last = v->s.quarter_sample; + v->s.quarter_sample = (v->mv_mode == MV_PMODE_1MV); + v->s.mspel = v->s.quarter_sample; + status = bitplane_decoding(v->direct_mb_plane, &v->dmb_is_raw, v); + if (status < 0) + return -1; + av_log(v->s.avctx, AV_LOG_DEBUG, "MB Direct Type plane encoding: " + "Imode: %i, Invert: %i\n", status>>1, status&1); + status = bitplane_decoding(v->s.mbskip_table, &v->skip_is_raw, v); + if (status < 0) + return -1; + av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: " + "Imode: %i, Invert: %i\n", status>>1, status&1); + v->s.mv_table_index = get_bits(gb, 2); + v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)]; + } - if (v->dquant) - { + if (v->dquant) { av_log(v->s.avctx, AV_LOG_DEBUG, "VOP DQuant info\n"); vop_dquant_decoding(v); } v->ttfrm = 0; - if (v->vstransform) - { + if (v->vstransform) { v->ttmbf = get_bits1(gb); - if (v->ttmbf) - { + if (v->ttmbf) { v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)]; } } else { @@ -1032,19 +1221,19 @@ /* AC Syntax */ v->c_ac_table_index = decode012(gb); - if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) - { + if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) { v->y_ac_table_index = decode012(gb); } /* DC Syntax */ v->s.dc_table_index = get_bits1(gb); - if ((v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) && v->dquant) { + if ((v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) + && v->dquant) { av_log(v->s.avctx, AV_LOG_DEBUG, "VOP DQuant info\n"); vop_dquant_decoding(v); } v->bi_type = 0; - if(v->s.pict_type == AV_PICTURE_TYPE_BI) { + if (v->s.pict_type == AV_PICTURE_TYPE_BI) { v->s.pict_type = AV_PICTURE_TYPE_B; v->bi_type = 1; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1data.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1data.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1data.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1data.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * VC-1 and WMV3 decoder + * copyright (c) 2011 Mashiat Sarker Shakkhar * copyright (c) 2006 Konstantin Shishkov * (c) 2005 anonymous, Alex Beregszaszi, Michael Niedermayer * @@ -31,38 +32,70 @@ /** Table for conversion between TTBLK and TTMB */ const int ff_vc1_ttblk_to_tt[3][8] = { - { TT_8X4, TT_4X8, TT_8X8, TT_4X4, TT_8X4_TOP, TT_8X4_BOTTOM, TT_4X8_RIGHT, TT_4X8_LEFT }, - { TT_8X8, TT_4X8_RIGHT, TT_4X8_LEFT, TT_4X4, TT_8X4, TT_4X8, TT_8X4_BOTTOM, TT_8X4_TOP }, - { TT_8X8, TT_4X8, TT_4X4, TT_8X4_BOTTOM, TT_4X8_RIGHT, TT_4X8_LEFT, TT_8X4, TT_8X4_TOP } + { TT_8X4, TT_4X8, TT_8X8, TT_4X4, TT_8X4_TOP, TT_8X4_BOTTOM, TT_4X8_RIGHT, TT_4X8_LEFT }, + { TT_8X8, TT_4X8_RIGHT, TT_4X8_LEFT, TT_4X4, TT_8X4, TT_4X8, TT_8X4_BOTTOM, TT_8X4_TOP }, + { TT_8X8, TT_4X8, TT_4X4, TT_8X4_BOTTOM, TT_4X8_RIGHT, TT_4X8_LEFT, TT_8X4, TT_8X4_TOP } }; const int ff_vc1_ttfrm_to_tt[4] = { TT_8X8, TT_8X4, TT_4X8, TT_4X4 }; /** MV P mode - the 5th element is only used for mode 1 */ const uint8_t ff_vc1_mv_pmode_table[2][5] = { - { MV_PMODE_1MV_HPEL_BILIN, MV_PMODE_1MV, MV_PMODE_1MV_HPEL, MV_PMODE_INTENSITY_COMP, MV_PMODE_MIXED_MV }, - { MV_PMODE_1MV, MV_PMODE_MIXED_MV, MV_PMODE_1MV_HPEL, MV_PMODE_INTENSITY_COMP, MV_PMODE_1MV_HPEL_BILIN } + { MV_PMODE_1MV_HPEL_BILIN, MV_PMODE_1MV, MV_PMODE_1MV_HPEL, MV_PMODE_INTENSITY_COMP, MV_PMODE_MIXED_MV }, + { MV_PMODE_1MV, MV_PMODE_MIXED_MV, MV_PMODE_1MV_HPEL, MV_PMODE_INTENSITY_COMP, MV_PMODE_1MV_HPEL_BILIN } }; const uint8_t ff_vc1_mv_pmode_table2[2][4] = { - { MV_PMODE_1MV_HPEL_BILIN, MV_PMODE_1MV, MV_PMODE_1MV_HPEL, MV_PMODE_MIXED_MV }, - { MV_PMODE_1MV, MV_PMODE_MIXED_MV, MV_PMODE_1MV_HPEL, MV_PMODE_1MV_HPEL_BILIN } + { MV_PMODE_1MV_HPEL_BILIN, MV_PMODE_1MV, MV_PMODE_1MV_HPEL, MV_PMODE_MIXED_MV }, + { MV_PMODE_1MV, MV_PMODE_MIXED_MV, MV_PMODE_1MV_HPEL, MV_PMODE_1MV_HPEL_BILIN } +}; + +/* MBMODE table for interlaced frame P-picture */ +const uint8_t ff_vc1_mbmode_intfrp[2][15][4] = { + { /* 1: 4-MV, 0: non-4-MV */ + /* Type, FIELDTX, 1-MV Differential present, Residuals (CBP) present */ + /* Table 164 - Table 167 */ + { MV_PMODE_INTFR_1MV , 0, 1, 1 }, + { MV_PMODE_INTFR_1MV , 1, 1, 1 }, + { MV_PMODE_INTFR_1MV , 0, 1, 0 }, + { MV_PMODE_INTFR_1MV , 0, 0, 1 }, + { MV_PMODE_INTFR_1MV , 1, 0, 1 }, + { MV_PMODE_INTFR_2MV_FIELD, 0, 0, 1 }, + { MV_PMODE_INTFR_2MV_FIELD, 1, 0, 1 }, + { MV_PMODE_INTFR_2MV_FIELD, 0, 0, 0 }, + { MV_PMODE_INTFR_INTRA , 0, 0, 0 } + }, + { + /* Table 160 - Table 163 */ + { MV_PMODE_INTFR_1MV , 0, 1, 1 }, + { MV_PMODE_INTFR_1MV , 1, 1, 1 }, + { MV_PMODE_INTFR_1MV , 0, 1, 0 }, + { MV_PMODE_INTFR_1MV , 0, 0, 1 }, + { MV_PMODE_INTFR_1MV , 1, 0, 1 }, + { MV_PMODE_INTFR_2MV_FIELD, 0, 0, 1 }, + { MV_PMODE_INTFR_2MV_FIELD, 1, 0, 1 }, + { MV_PMODE_INTFR_2MV_FIELD, 0, 0, 0 }, + { MV_PMODE_INTFR_4MV , 0, 0, 1 }, + { MV_PMODE_INTFR_4MV , 1, 0, 1 }, + { MV_PMODE_INTFR_4MV , 0, 0, 0 }, + { MV_PMODE_INTFR_4MV_FIELD, 0, 0, 1 }, + { MV_PMODE_INTFR_4MV_FIELD, 1, 0, 1 }, + { MV_PMODE_INTFR_4MV_FIELD, 0, 0, 0 }, + { MV_PMODE_INTFR_INTRA , 0, 0, 0 } + } }; const int ff_vc1_fps_nr[5] = { 24, 25, 30, 50, 60 }, - ff_vc1_fps_dr[2] = { 1000, 1001 }; + ff_vc1_fps_dr[2] = { 1000, 1001 }; const uint8_t ff_vc1_pquant_table[3][32] = { - { /* Implicit quantizer */ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 29, 31 - }, - { /* Explicit quantizer, pquantizer uniform */ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 - }, - { /* Explicit quantizer, pquantizer non-uniform */ - 0, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 31 - } + /* Implicit quantizer */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 29, 31 }, + /* Explicit quantizer, pquantizer uniform */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }, + /* Explicit quantizer, pquantizer non-uniform */ + { 0, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 31 } }; /** @name VC-1 VLC tables and defines @@ -84,38 +117,57 @@ VLC ff_vc1_mv_diff_vlc[4]; #define VC1_CBPCY_P_VLC_BITS 9 //14 VLC ff_vc1_cbpcy_p_vlc[4]; +#define VC1_ICBPCY_VLC_BITS 9 +VLC ff_vc1_icbpcy_vlc[8]; #define VC1_4MV_BLOCK_PATTERN_VLC_BITS 6 VLC ff_vc1_4mv_block_pattern_vlc[4]; +#define VC1_2MV_BLOCK_PATTERN_VLC_BITS 3 +VLC ff_vc1_2mv_block_pattern_vlc[4]; #define VC1_TTBLK_VLC_BITS 5 VLC ff_vc1_ttblk_vlc[3]; #define VC1_SUBBLKPAT_VLC_BITS 6 VLC ff_vc1_subblkpat_vlc[3]; +#define VC1_INTFR_4MV_MBMODE_VLC_BITS 9 +VLC ff_vc1_intfr_4mv_mbmode_vlc[4]; +#define VC1_INTFR_NON4MV_MBMODE_VLC_BITS 6 +VLC ff_vc1_intfr_non4mv_mbmode_vlc[4]; +#define VC1_IF_MMV_MBMODE_VLC_BITS 5 +VLC ff_vc1_if_mmv_mbmode_vlc[8]; +#define VC1_IF_1MV_MBMODE_VLC_BITS 5 +VLC ff_vc1_if_1mv_mbmode_vlc[8]; +#define VC1_1REF_MVDATA_VLC_BITS 9 +VLC ff_vc1_1ref_mvdata_vlc[4]; +#define VC1_2REF_MVDATA_VLC_BITS 9 +VLC ff_vc1_2ref_mvdata_vlc[8]; VLC ff_vc1_ac_coeff_table[8]; + +#define VC1_IF_MBMODE_VLC_BITS 5 // as a placeholder for VC1_IF_MMV_MBMODE_VLC_BITS + // or VC1_IF_1MV_MBMODE_VLC_BITS since they are the same //@} -#if B_FRACTION_DEN==840 //original bfraction from vc9data.h, not conforming to standard +#if B_FRACTION_DEN == 840 // original bfraction from vc9data.h, not conforming to standard /* bfraction is fractional, we scale to the GCD 3*5*7*8 = 840 */ const int16_t ff_vc1_bfraction_lut[23] = { - 420 /*1/2*/, 280 /*1/3*/, 560 /*2/3*/, 210 /*1/4*/, - 630 /*3/4*/, 168 /*1/5*/, 336 /*2/5*/, - 504 /*3/5*/, 672 /*4/5*/, 140 /*1/6*/, 700 /*5/6*/, - 120 /*1/7*/, 240 /*2/7*/, 360 /*3/7*/, 480 /*4/7*/, - 600 /*5/7*/, 720 /*6/7*/, 105 /*1/8*/, 315 /*3/8*/, - 525 /*5/8*/, 735 /*7/8*/, - -1 /*inv.*/, 0 /*BI fm*/ + 420 /*1/2*/, 280 /*1/3*/, 560 /*2/3*/, 210 /*1/4*/, + 630 /*3/4*/, 168 /*1/5*/, 336 /*2/5*/, + 504 /*3/5*/, 672 /*4/5*/, 140 /*1/6*/, 700 /*5/6*/, + 120 /*1/7*/, 240 /*2/7*/, 360 /*3/7*/, 480 /*4/7*/, + 600 /*5/7*/, 720 /*6/7*/, 105 /*1/8*/, 315 /*3/8*/, + 525 /*5/8*/, 735 /*7/8*/, + -1 /*inv.*/, 0 /*BI fm*/ }; #else /* pre-computed scales for all bfractions and base=256 */ const int16_t ff_vc1_bfraction_lut[23] = { - 128 /*1/2*/, 85 /*1/3*/, 170 /*2/3*/, 64 /*1/4*/, - 192 /*3/4*/, 51 /*1/5*/, 102 /*2/5*/, - 153 /*3/5*/, 204 /*4/5*/, 43 /*1/6*/, 215 /*5/6*/, - 37 /*1/7*/, 74 /*2/7*/, 111 /*3/7*/, 148 /*4/7*/, - 185 /*5/7*/, 222 /*6/7*/, 32 /*1/8*/, 96 /*3/8*/, - 160 /*5/8*/, 224 /*7/8*/, - -1 /*inv.*/, 0 /*BI fm*/ + 128 /*1/2*/, 85 /*1/3*/, 170 /*2/3*/, 64 /*1/4*/, + 192 /*3/4*/, 51 /*1/5*/, 102 /*2/5*/, + 153 /*3/5*/, 204 /*4/5*/, 43 /*1/6*/, 215 /*5/6*/, + 37 /*1/7*/, 74 /*2/7*/, 111 /*3/7*/, 148 /*4/7*/, + 185 /*5/7*/, 222 /*6/7*/, 32 /*1/8*/, 96 /*3/8*/, + 160 /*5/8*/, 224 /*7/8*/, + -1 /*inv.*/, 0 /*BI fm*/ }; #endif @@ -129,154 +181,477 @@ 7, 7 }; const uint8_t ff_vc1_bfraction_codes[23] = { - 0, 1, 2, 3, - 4, 5, 6, - 112, 113, 114, 115, - 116, 117, 118, 119, - 120, 121, 122, 123, - 124, 125, - 126, 127 + 0, 1, 2, 3, + 4, 5, 6, + 112, 113, 114, 115, + 116, 117, 118, 119, + 120, 121, 122, 123, + 124, 125, + 126, 127 }; //Same as H.264 -const AVRational ff_vc1_pixel_aspect[16]={ - {0, 1}, - {1, 1}, - {12, 11}, - {10, 11}, - {16, 11}, - {40, 33}, - {24, 11}, - {20, 11}, - {32, 11}, - {80, 33}, - {18, 11}, - {15, 11}, - {64, 33}, - {160, 99}, - {0, 1}, - {0, 1} +const AVRational ff_vc1_pixel_aspect[16] = { + { 0, 1 }, + { 1, 1 }, + { 12, 11 }, + { 10, 11 }, + { 16, 11 }, + { 40, 33 }, + { 24, 11 }, + { 20, 11 }, + { 32, 11 }, + { 80, 33 }, + { 18, 11 }, + { 15, 11 }, + { 64, 33 }, + { 160, 99 }, + { 0, 1 }, + { 0, 1 } }; /* BitPlane IMODE - such a small table... */ const uint8_t ff_vc1_imode_codes[7] = { - 0, 2, 1, 3, 1, 2, 3 + 0, 2, 1, 3, 1, 2, 3 }; const uint8_t ff_vc1_imode_bits[7] = { - 4, 2, 3, 2, 4, 3, 3 + 4, 2, 3, 2, 4, 3, 3 }; /* Normal-2 imode */ const uint8_t ff_vc1_norm2_codes[4] = { - 0, 4, 5, 3 + 0, 4, 5, 3 }; const uint8_t ff_vc1_norm2_bits[4] = { - 1, 3, 3, 2 + 1, 3, 3, 2 }; const uint16_t ff_vc1_norm6_codes[64] = { -0x001, 0x002, 0x003, 0x000, 0x004, 0x001, 0x002, 0x047, 0x005, 0x003, 0x004, 0x04B, 0x005, 0x04D, 0x04E, 0x30E, -0x006, 0x006, 0x007, 0x053, 0x008, 0x055, 0x056, 0x30D, 0x009, 0x059, 0x05A, 0x30C, 0x05C, 0x30B, 0x30A, 0x037, -0x007, 0x00A, 0x00B, 0x043, 0x00C, 0x045, 0x046, 0x309, 0x00D, 0x049, 0x04A, 0x308, 0x04C, 0x307, 0x306, 0x036, -0x00E, 0x051, 0x052, 0x305, 0x054, 0x304, 0x303, 0x035, 0x058, 0x302, 0x301, 0x034, 0x300, 0x033, 0x032, 0x007, + 0x001, 0x002, 0x003, 0x000, 0x004, 0x001, 0x002, 0x047, 0x005, 0x003, 0x004, 0x04B, 0x005, 0x04D, 0x04E, 0x30E, + 0x006, 0x006, 0x007, 0x053, 0x008, 0x055, 0x056, 0x30D, 0x009, 0x059, 0x05A, 0x30C, 0x05C, 0x30B, 0x30A, 0x037, + 0x007, 0x00A, 0x00B, 0x043, 0x00C, 0x045, 0x046, 0x309, 0x00D, 0x049, 0x04A, 0x308, 0x04C, 0x307, 0x306, 0x036, + 0x00E, 0x051, 0x052, 0x305, 0x054, 0x304, 0x303, 0x035, 0x058, 0x302, 0x301, 0x034, 0x300, 0x033, 0x032, 0x007, }; const uint8_t ff_vc1_norm6_bits[64] = { - 1, 4, 4, 8, 4, 8, 8, 10, 4, 8, 8, 10, 8, 10, 10, 13, - 4, 8, 8, 10, 8, 10, 10, 13, 8, 10, 10, 13, 10, 13, 13, 9, - 4, 8, 8, 10, 8, 10, 10, 13, 8, 10, 10, 13, 10, 13, 13, 9, - 8, 10, 10, 13, 10, 13, 13, 9, 10, 13, 13, 9, 13, 9, 9, 6, -}; -#if 0 -/* Normal-6 imode */ -const uint8_t ff_vc1_norm6_spec[64][5] = { -{ 0, 1, 1 }, -{ 1, 2, 4 }, -{ 2, 3, 4 }, -{ 3, 0, 8 }, -{ 4, 4, 4 }, -{ 5, 1, 8 }, -{ 6, 2, 8 }, -{ 7, 2, 5, 7, 5 }, -{ 8, 5, 4 }, -{ 9, 3, 8 }, -{10, 4, 8 }, -{11, 2, 5, 11, 5 }, -{12, 5, 8 }, -{13, 2, 5, 13, 5 }, -{14, 2, 5, 14, 5 }, -{15, 3, 5, 14, 8 }, -{16, 6, 4 }, -{17, 6, 8 }, -{18, 7, 8 }, -{19, 2, 5, 19, 5 }, -{20, 8, 8 }, -{21, 2, 5, 21, 5 }, -{22, 2, 5, 22, 5 }, -{23, 3, 5, 13, 8 }, -{24, 9, 8 }, -{25, 2, 5, 25, 5 }, -{26, 2, 5, 26, 5 }, -{27, 3, 5, 12, 8 }, -{28, 2, 5, 28, 5 }, -{29, 3, 5, 11, 8 }, -{30, 3, 5, 10, 8 }, -{31, 3, 5, 7, 4 }, -{32, 7, 4 }, -{33, 10, 8 }, -{34, 11, 8 }, -{35, 2, 5, 3, 5 }, -{36, 12, 8 }, -{37, 2, 5, 5, 5 }, -{38, 2, 5, 6, 5 }, -{39, 3, 5, 9, 8 }, -{40, 13, 8 }, -{41, 2, 5, 9, 5 }, -{42, 2, 5, 10, 5 }, -{43, 3, 5, 8, 8 }, -{44, 2, 5, 12, 5 }, -{45, 3, 5, 7, 8 }, -{46, 3, 5, 6, 8 }, -{47, 3, 5, 6, 4 }, -{48, 14, 8 }, -{49, 2, 5, 17, 5 }, -{50, 2, 5, 18, 5 }, -{51, 3, 5, 5, 8 }, -{52, 2, 5, 20, 5 }, -{53, 3, 5, 4, 8 }, -{54, 3, 5, 3, 8 }, -{55, 3, 5, 5, 4 }, -{56, 2, 5, 24, 5 }, -{57, 3, 5, 2, 8 }, -{58, 3, 5, 1, 8 }, -{59, 3, 5, 4, 4 }, -{60, 3, 5, 0, 8 }, -{61, 3, 5, 3, 4 }, -{62, 3, 5, 2, 4 }, -{63, 3, 5, 1, 1 }, + 1, 4, 4, 8, 4, 8, 8, 10, 4, 8, 8, 10, 8, 10, 10, 13, + 4, 8, 8, 10, 8, 10, 10, 13, 8, 10, 10, 13, 10, 13, 13, 9, + 4, 8, 8, 10, 8, 10, 10, 13, 8, 10, 10, 13, 10, 13, 13, 9, + 8, 10, 10, 13, 10, 13, 13, 9, 10, 13, 13, 9, 13, 9, 9, 6, }; -#endif /* 4MV Block pattern VLC tables */ const uint8_t ff_vc1_4mv_block_pattern_codes[4][16] = { - { 14, 58, 59, 25, 12, 26, 15, 15, 13, 24, 27, 0, 28, 1, 2, 2}, - { 8, 18, 19, 4, 20, 5, 30, 11, 21, 31, 6, 12, 7, 13, 14, 0}, - { 15, 6, 7, 2, 8, 3, 28, 9, 10, 29, 4, 11, 5, 12, 13, 0}, - { 0, 11, 12, 4, 13, 5, 30, 16, 14, 31, 6, 17, 7, 18, 19, 10} + { 14, 58, 59, 25, 12, 26, 15, 15, 13, 24, 27, 0, 28, 1, 2, 2 }, + { 8, 18, 19, 4, 20, 5, 30, 11, 21, 31, 6, 12, 7, 13, 14, 0 }, + { 15, 6, 7, 2, 8, 3, 28, 9, 10, 29, 4, 11, 5, 12, 13, 0 }, + { 0, 11, 12, 4, 13, 5, 30, 16, 14, 31, 6, 17, 7, 18, 19, 10 } }; const uint8_t ff_vc1_4mv_block_pattern_bits[4][16] = { - { 5, 6, 6, 5, 5, 5, 5, 4, 5, 5, 5, 3, 5, 3, 3, 2}, - { 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 4, 4, 4, 4, 4, 2}, - { 4, 4, 4, 4, 4, 4, 5, 4, 4, 5, 4, 4, 4, 4, 4, 3}, - { 2, 4, 4, 4, 4, 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 4} + { 5, 6, 6, 5, 5, 5, 5, 4, 5, 5, 5, 3, 5, 3, 3, 2 }, + { 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 4, 4, 4, 4, 4, 2 }, + { 4, 4, 4, 4, 4, 4, 5, 4, 4, 5, 4, 4, 4, 4, 4, 3 }, + { 2, 4, 4, 4, 4, 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 4 } +}; + +/* 2MV Block pattern VLC tables */ +const uint8_t ff_vc1_2mv_block_pattern_codes[4][4] = { + { 2, 1, 0, 3 }, { 1, 0, 2, 3 }, { 2, 0, 3, 1 }, { 1, 3, 2, 0 } +}; + +const uint8_t ff_vc1_2mv_block_pattern_bits[4][4] = { + { 2, 2, 2, 2 }, { 1, 2, 3, 3 }, { 3, 2, 3, 1 }, { 1, 3, 3, 2 } +}; + +/* Interlaced frame picture 4MV MBMODE VLC tables (p. 246, p. 360) */ +const uint16_t ff_vc1_intfr_4mv_mbmode_codes[4][15] = { + { 22, 17, 0, 47, 32, 10, 1, 3, 67, 133, 132, 92, 19, 93, 18 }, + { 3, 45, 0, 7, 23, 6, 1, 2, 10, 39, 44, 8, 18, 77, 76 }, + { 15, 6, 28, 9, 41, 6, 2, 15, 14, 8, 40, 29, 0, 21, 11 }, + { 7, 198, 1, 2, 193, 13, 25, 0, 97, 1599, 98, 398, 798, 192, 1598 } +}; + +const uint8_t ff_vc1_intfr_4mv_mbmode_bits[4][15] = { + { 5, 5, 2, 6, 6, 4, 2, 2, 7, 8, 8, 7, 5, 7, 5 }, + { 3, 6, 3, 3, 5, 3, 3, 3, 4, 6, 6, 4, 5, 7, 7 }, + { 4, 3, 5, 5, 7, 4, 2, 5, 5, 5, 7, 5, 2, 6, 5 }, + { 4, 9, 1, 3, 9, 5, 6, 2, 8, 12, 8, 10, 11, 9, 12 } +}; + +/* Interlaced frame picture NON-4MV MBMODE VLC tables (p. 363) */ +const uint8_t ff_vc1_intfr_non4mv_mbmode_codes[4][9] = { + { 9, 22, 0, 17, 16, 10, 1, 3, 23 }, + { 7, 0, 5, 2, 1, 1, 6, 3, 4 }, + { 1, 0, 10, 23, 44, 8, 3, 9, 45 }, + { 7, 97, 1, 2, 49, 13, 25, 0, 96 } +}; + +const uint8_t ff_vc1_intfr_non4mv_mbmode_bits[4][9] = { + { 4, 5, 2, 5, 5, 4, 2, 2, 5 }, + { 3, 4, 6, 2, 3, 2, 3, 5, 6 }, + { 2, 2, 4, 5, 6, 4, 2, 4, 6 }, + { 4, 8, 1, 3, 7, 5, 6, 2, 8 } +}; + +/* Interlaced field picture MBMODE VLC tables (p. 356 - 11.4.1, 11.4.2) */ +/* mixed-MV */ +const uint8_t ff_vc1_if_mmv_mbmode_codes[8][8] = { + { 16, 17, 3, 3, 0, 5, 9, 2 }, + { 8, 9, 3, 6, 7, 0, 5, 2 }, + { 16, 17, 5, 3, 0, 3, 9, 2 }, + { 56, 57, 15, 4, 5, 6, 29, 0 }, + { 52, 53, 27, 14, 15, 2, 12, 0 }, + { 56, 57, 29, 5, 6, 0, 15, 4 }, + { 16, 17, 6, 7, 0, 1, 9, 5 }, + { 56, 57, 0, 5, 6, 29, 4, 15 } +}; +const uint8_t ff_vc1_if_mmv_mbmode_bits[8][8] = { + { 6, 6, 2, 3, 2, 4, 5, 2 }, + { 5, 5, 3, 3, 3, 2, 4, 2 }, + { 6, 6, 4, 3, 2, 2, 5, 2 }, + { 6, 6, 4, 3, 3, 3, 5, 1 }, + { 6, 6, 5, 4, 4, 2, 4, 1 }, + { 6, 6, 5, 3, 3, 1, 4, 3 }, + { 5, 5, 3, 3, 2, 2, 4, 3 }, + { 6, 6, 1, 3, 3, 5, 3, 4 } +}; +/* 1MV */ +const uint8_t ff_vc1_if_1mv_mbmode_codes[8][6] = { + { 0, 1, 1, 1, 1, 1 }, + { 0, 1, 1, 1, 1, 1 }, + { 16, 17, 3, 0, 9, 5 }, + { 20, 21, 3, 11, 0, 4 }, + { 4, 5, 2, 3, 3, 0 }, + { 4, 5, 3, 2, 0, 3 }, + { 0, 1, 1, 1, 1, 1 }, + { 16, 17, 9, 5, 3, 0 } +}; +const uint8_t ff_vc1_if_1mv_mbmode_bits[8][6] = { + { 5, 5, 1, 3, 2, 4 }, + { 5, 5, 1, 2, 3, 4 }, + { 5, 5, 2, 1, 4, 3 }, + { 5, 5, 2, 4, 1, 3 }, + { 4, 4, 2, 3, 2, 2 }, + { 4, 4, 3, 2, 2, 2 }, + { 5, 5, 3, 4, 1, 2 }, + { 5, 5, 4, 3, 2, 1 } +}; + +/* Interlaced frame/field picture MVDATA VLC tables */ + +/* 1-reference tables */ +const uint32_t ff_vc1_1ref_mvdata_codes[4][72] = { /* uint32_t may be too big */ + { + 0x00005, 0x0000C, 0x0001E, 0x00012, 0x0000C, 0x00034, 0x00075, 0x00070, + 0x00000, 0x00008, 0x0001B, 0x00008, 0x0001D, 0x0007C, 0x000D6, 0x001DE, + 0x001AF, 0x00005, 0x0001B, 0x00026, 0x0001E, 0x00012, 0x00076, 0x0004D, + 0x001F6, 0x001F4, 0x00039, 0x0007F, 0x00027, 0x0006A, 0x00071, 0x00035, + 0x00071, 0x00068, 0x001DC, 0x00027, 0x00073, 0x000FF, 0x000E8, 0x000E9, + 0x0007E, 0x001F9, 0x001F5, 0x001FD, 0x0003E, 0x001CA, 0x003F9, 0x0004C, + 0x00069, 0x001FA, 0x001DF, 0x001F7, 0x00070, 0x001DD, 0x00E4D, 0x00727, + 0x00392, 0x001C8, 0x001CB, 0x003F8, 0x001AE, 0x001F8, 0x001FB, 0x0E4CE, + 0x0E4CF, 0x07260, 0x07261, 0x07262, 0x07263, 0x07264, 0x07265, 0x07266 + }, + { + 0x00007, 0x00001, 0x00007, 0x00016, 0x00001, 0x00045, 0x00018, 0x002B6, + 0x00006, 0x00004, 0x00017, 0x00010, 0x00029, 0x0002C, 0x0015A, 0x00066, + 0x0019E, 0x00009, 0x00028, 0x00017, 0x00000, 0x0002A, 0x00004, 0x0005B, + 0x000B5, 0x000CE, 0x00006, 0x00044, 0x0000F, 0x00046, 0x0000E, 0x000AC, + 0x00032, 0x00037, 0x011EB, 0x0000A, 0x0001A, 0x0011F, 0x00016, 0x00014, + 0x0002B, 0x00168, 0x00055, 0x023D5, 0x00057, 0x0002F, 0x00036, 0x0002E, + 0x00169, 0x00054, 0x0047B, 0x0019F, 0x02B7D, 0x0008E, 0x00ADE, 0x00479, + 0x0056E, 0x008F4, 0x015BF, 0x00478, 0x023D4, 0x0ADF1, 0x056F9, 0xADF0E, + 0xADF0F, 0x56F80, 0x56F81, 0x56F82, 0x56F83, 0x56F84, 0x56F85, 0x56F86 + }, + { + 0x00002, 0x00006, 0x00007, 0x0000D, 0x00007, 0x00030, 0x000FF, 0x001F0, + 0x00002, 0x00000, 0x00005, 0x00019, 0x0001E, 0x00007, 0x00063, 0x000FD, + 0x00023, 0x0000E, 0x0001B, 0x0001A, 0x00006, 0x00009, 0x00018, 0x000C5, + 0x00033, 0x001F1, 0x00002, 0x003FB, 0x001F3, 0x00022, 0x001FC, 0x00042, + 0x00623, 0x00083, 0x00620, 0x0007D, 0x00040, 0x00043, 0x003E4, 0x003E5, + 0x00191, 0x00FE9, 0x00105, 0x00208, 0x000FC, 0x00624, 0x00622, 0x00190, + 0x00626, 0x007F5, 0x00C4B, 0x01FD0, 0x0104D, 0x00065, 0x00C42, 0x000C9, + 0x00627, 0x00C43, 0x00C4A, 0x0104E, 0x01FD1, 0x0104F, 0x00412, 0x104CE, + 0x104CF, 0x08260, 0x08261, 0x08262, 0x08263, 0x08264, 0x08265, 0x08266 + }, + { + 0x0000D, 0x00001, 0x00004, 0x00000, 0x00017, 0x00005, 0x0007F, 0x0004D, + 0x00003, 0x00011, 0x0003E, 0x0003B, 0x00017, 0x00067, 0x0004A, 0x000C3, + 0x000F2, 0x0000A, 0x0002C, 0x00032, 0x0003D, 0x00015, 0x00028, 0x00093, + 0x000CC, 0x00096, 0x00003, 0x00075, 0x00020, 0x0002D, 0x00021, 0x00029, + 0x00090, 0x001D0, 0x001FB, 0x0001C, 0x0004C, 0x00060, 0x00009, 0x00008, + 0x0002D, 0x0009F, 0x001FA, 0x0013D, 0x00031, 0x000FC, 0x00058, 0x00092, + 0x000F0, 0x000F1, 0x000CD, 0x00185, 0x00165, 0x0004E, 0x00091, 0x000E9, + 0x00184, 0x001D1, 0x001E6, 0x00097, 0x001E7, 0x000B3, 0x0013C, 0x0164E, + 0x0164F, 0x00B20, 0x00B21, 0x00B22, 0x00B23, 0x00B24, 0x00B25, 0x00B26 + } +}; + +const uint8_t ff_vc1_1ref_mvdata_bits[4][72] = { + { + 3, 4, 5, 5, 5, 6, 7, 7, 2, 4, 5, 5, 6, 7, 8, 9, 9, 4, + 6, 6, 6, 6, 7, 8, 9, 9, 6, 8, 7, 7, 7, 7, 8, 8, 9, 6, + 8, 8, 8, 8, 8, 9, 9, 9, 7, 10, 10, 8, 8, 9, 9, 9, 8, 9, + 13, 12, 11, 10, 10, 10, 9, 9, 9, 17, 17, 16, 16, 16, 16, 16, 16, 16 + }, + { + 3, 3, 4, 5, 5, 7, 8, 10, 3, 4, 5, 5, 6, 7, 9, 10, 12, 4, + 6, 6, 5, 6, 6, 8, 9, 11, 4, 7, 7, 7, 7, 8, 9, 9, 13, 5, + 8, 9, 8, 8, 9, 10, 10, 14, 7, 9, 9, 9, 10, 10, 11, 12, 14, 8, + 12, 11, 11, 12, 13, 11, 14, 16, 15, 20, 20, 19, 19, 19, 19, 19, 19, 19 + }, + { + 3, 4, 4, 4, 5, 6, 8, 9, 2, 4, 5, 5, 5, 6, 7, 8, 8, 4, + 7, 7, 6, 6, 7, 8, 8, 9, 5, 10, 9, 8, 9, 9, 11, 10, 11, 7, + 9, 9, 10, 10, 11, 12, 11, 12, 8, 11, 11, 11, 11, 11, 12, 13, 15, 9, + 12, 10, 11, 12, 12, 15, 13, 15, 13, 19, 19, 18, 18, 18, 18, 18, 18, 18 + }, + { + 4, 4, 4, 4, 5, 5, 7, 7, 3, 5, 6, 6, 6, 7, 7, 8, 8, 4, + 6, 6, 6, 6, 7, 8, 8, 8, 4, 7, 6, 6, 6, 7, 8, 9, 9, 5, + 7, 7, 6, 6, 7, 8, 9, 9, 6, 8, 8, 8, 8, 8, 8, 9, 10, 7, + 8, 8, 9, 9, 9, 8, 9, 9, 9, 14, 14, 13, 13, 13, 13, 13, 13, 13 + } }; -const uint8_t wmv3_dc_scale_table[32]={ - 0, 2, 4, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21 +/* 2-reference tables */ +const uint32_t ff_vc1_2ref_mvdata_codes[8][126] = { /* table 132 - table 139 */ + { + 0x0000C, 0x0001C, 0x0000B, 0x00000, 0x0000E, 0x0002A, 0x00050, 0x00368, + 0x00002, 0x0001A, 0x00004, 0x0003A, 0x0001D, 0x0006C, 0x000EF, 0x001BC, + 0x0015F, 0x0000F, 0x00003, 0x0001C, 0x0000D, 0x0000B, 0x0003E, 0x000A7, + 0x00146, 0x00199, 0x00006, 0x0001F, 0x00004, 0x0003C, 0x00007, 0x001BE, + 0x0008B, 0x0002C, 0x007B3, 0x00005, 0x000DB, 0x00056, 0x000EC, 0x00052, + 0x001BD, 0x00078, 0x000CF, 0x00573, 0x00009, 0x00023, 0x000ED, 0x00018, + 0x00006, 0x00044, 0x000F5, 0x00079, 0x006D2, 0x0006E, 0x0002B, 0x0015D, + 0x00017, 0x0037F, 0x00144, 0x000CE, 0x00028, 0x000AB, 0x00010, 0x001B5, + 0x000F7, 0x000A6, 0x0007B, 0x00028, 0x001ED, 0x001E9, 0x006FD, 0x00004, + 0x000F5, 0x00029, 0x0028A, 0x0028B, 0x0028F, 0x00DF9, 0x00335, 0x01E85, + 0x000EE, 0x002BD, 0x0002B, 0x003D8, 0x003D1, 0x00198, 0x001E9, 0x0051D, + 0x000B4, 0x0003F, 0x00455, 0x0022B, 0x00229, 0x00451, 0x00578, 0x007B2, + 0x00570, 0x00155, 0x00032, 0x003D0, 0x00054, 0x006D3, 0x00571, 0x00454, + 0x00334, 0x01BF1, 0x000B7, 0x00029, 0x01E84, 0x0016C, 0x0019B, 0x01BF0, + 0x00579, 0x00F43, 0x000B5, 0x008A1, 0x0002A, 0x0016D, 0x008A0, 0x007A0, + 0x003D1, 0x00AE5, 0x00154, 0x00AE4, 0x00A39, 0x00A38 + }, + { + 0x00003, 0x00009, 0x00016, 0x00010, 0x000D7, 0x00335, 0x00574, 0x00555, + 0x00000, 0x0001D, 0x00009, 0x00017, 0x0002C, 0x000AD, 0x00374, 0x006B3, + 0x00577, 0x0000F, 0x00018, 0x0000A, 0x0002E, 0x00022, 0x0017C, 0x00E7B, + 0x01B89, 0x015D8, 0x00008, 0x00034, 0x0006D, 0x00023, 0x001C2, 0x00376, + 0x002D3, 0x01C4A, 0x0330A, 0x00014, 0x0006A, 0x00072, 0x0006C, 0x000E3, + 0x0019B, 0x0073F, 0x01CF0, 0x00B41, 0x00032, 0x000E6, 0x000E0, 0x000CF, + 0x000AB, 0x0019C, 0x002AB, 0x00E2B, 0x015D9, 0x0006F, 0x001C3, 0x000AF, + 0x000BF, 0x000AC, 0x0017D, 0x006E3, 0x00E29, 0x01984, 0x00054, 0x000B5, + 0x0017A, 0x001AD, 0x00199, 0x00178, 0x00358, 0x002D2, 0x01C4B, 0x0005B, + 0x002A8, 0x00331, 0x00388, 0x0038B, 0x00370, 0x00713, 0x00CC3, 0x01CF1, + 0x001B9, 0x005EF, 0x00738, 0x002F2, 0x0033B, 0x002B9, 0x006EB, 0x00570, + 0x00E24, 0x0039D, 0x005A2, 0x005A3, 0x00E7D, 0x005EE, 0x00739, 0x00554, + 0x00AA5, 0x00AA4, 0x00377, 0x01CF5, 0x00BCE, 0x00E79, 0x00660, 0x00674, + 0x006EA, 0x00E7C, 0x00D65, 0x002F6, 0x015DA, 0x01B88, 0x005A1, 0x01CF4, + 0x005E6, 0x00E28, 0x00575, 0x00D64, 0x00334, 0x0330B, 0x015DB, 0x00B40, + 0x00BCF, 0x00DC5, 0x00E2A, 0x00675, 0x00571, 0x00553 + }, + { + 0x00004, 0x00002, 0x00010, 0x00003, 0x00017, 0x00045, 0x0003E, 0x0007E, + 0x00003, 0x00002, 0x00028, 0x0001E, 0x00015, 0x00047, 0x00002, 0x0014D, + 0x00060, 0x0000B, 0x00026, 0x00024, 0x00014, 0x00032, 0x0006F, 0x000C3, + 0x00531, 0x006E5, 0x00015, 0x0003F, 0x0002D, 0x00001, 0x0013E, 0x000DD, + 0x000F6, 0x00305, 0x00331, 0x0000E, 0x00003, 0x00034, 0x00033, 0x0001A, + 0x0014A, 0x000C5, 0x000F4, 0x006E4, 0x00001, 0x0003C, 0x0007D, 0x0008D, + 0x0009D, 0x00031, 0x0006E, 0x00296, 0x000CD, 0x00025, 0x00149, 0x00032, + 0x00089, 0x00036, 0x00088, 0x0006F, 0x00003, 0x0031D, 0x0000E, 0x001AA, + 0x0027E, 0x00061, 0x0014E, 0x0014F, 0x00067, 0x000FF, 0x00183, 0x00036, + 0x00357, 0x000F5, 0x000C6, 0x000C2, 0x00299, 0x00119, 0x00231, 0x00350, + 0x0002C, 0x0018F, 0x00530, 0x00297, 0x00004, 0x001B8, 0x000C0, 0x0027A, + 0x00311, 0x0009C, 0x00621, 0x00199, 0x0031C, 0x000F7, 0x003E3, 0x00356, + 0x00189, 0x00005, 0x0006B, 0x008C2, 0x00330, 0x004FF, 0x004F0, 0x00351, + 0x004F2, 0x001F2, 0x00373, 0x00000, 0x00C41, 0x008C3, 0x009EC, 0x003E2, + 0x00304, 0x004F7, 0x004F1, 0x001F0, 0x00148, 0x00C40, 0x009ED, 0x008C0, + 0x008C1, 0x004F3, 0x004FE, 0x000FE, 0x001F3, 0x001A9 + }, + { + 0x00000, 0x00004, 0x0002F, 0x00052, 0x00010, 0x000AD, 0x0050B, 0x00190, + 0x00003, 0x00016, 0x00007, 0x0000D, 0x000BB, 0x00173, 0x000C9, 0x0050F, + 0x0172C, 0x00003, 0x00011, 0x00005, 0x00043, 0x00023, 0x0004B, 0x0032E, + 0x02E5B, 0x00482, 0x00009, 0x0002A, 0x00014, 0x0002A, 0x00108, 0x005CA, + 0x0065A, 0x02136, 0x02132, 0x0000B, 0x00013, 0x00041, 0x000B8, 0x00174, + 0x00100, 0x014DA, 0x0404E, 0x01437, 0x0002B, 0x00085, 0x000A7, 0x000A0, + 0x0014C, 0x0029A, 0x0032C, 0x02133, 0x0142A, 0x00051, 0x00284, 0x000AC, + 0x00102, 0x00045, 0x00044, 0x0081B, 0x0065E, 0x00CB7, 0x00018, 0x0050C, + 0x00212, 0x002E4, 0x00203, 0x00094, 0x00122, 0x0081A, 0x00655, 0x00033, + 0x002BA, 0x00246, 0x00242, 0x00A6E, 0x0040C, 0x00808, 0x02134, 0x0404F, + 0x00175, 0x00405, 0x00247, 0x0012A, 0x00A14, 0x002BB, 0x00191, 0x0084F, + 0x01438, 0x000AF, 0x00B97, 0x00483, 0x0143B, 0x0032B, 0x00243, 0x0142B, + 0x00958, 0x029BF, 0x00049, 0x00A6C, 0x014DB, 0x004AD, 0x014DE, 0x0084E, + 0x01434, 0x00257, 0x02E5A, 0x00207, 0x01435, 0x01439, 0x00CB6, 0x0143A, + 0x00194, 0x00654, 0x02135, 0x0537C, 0x0015C, 0x00240, 0x01012, 0x0537D, + 0x00959, 0x01098, 0x01436, 0x0065F, 0x02026, 0x02137 + }, + { + 0x00005, 0x00019, 0x00016, 0x00011, 0x0003E, 0x0005E, 0x000EF, 0x000E2, + 0x00000, 0x00039, 0x0002B, 0x00026, 0x00028, 0x00012, 0x000C2, 0x000ED, + 0x0011D, 0x0000D, 0x00031, 0x0002A, 0x00025, 0x00020, 0x0005C, 0x001ED, + 0x0024D, 0x00770, 0x00006, 0x0007A, 0x00060, 0x0004F, 0x00048, 0x00039, + 0x00186, 0x00213, 0x00EC6, 0x0000F, 0x00026, 0x0005F, 0x00075, 0x00070, + 0x00027, 0x001DB, 0x003C6, 0x0078F, 0x0003F, 0x000A6, 0x000F0, 0x0003A, + 0x00052, 0x0004E, 0x000E3, 0x001D9, 0x0030F, 0x00010, 0x001DD, 0x000A7, + 0x000F7, 0x00022, 0x00092, 0x003C4, 0x002EF, 0x00762, 0x00079, 0x0008F, + 0x001DA, 0x00087, 0x000E8, 0x000BA, 0x00176, 0x000EE, 0x003B0, 0x00085, + 0x00119, 0x0030E, 0x00108, 0x001D2, 0x0010C, 0x00773, 0x00424, 0x00434, + 0x00071, 0x005DD, 0x001C1, 0x003A7, 0x00127, 0x0008D, 0x0021B, 0x007B2, + 0x001DF, 0x003D8, 0x00764, 0x00EE4, 0x003B3, 0x0074D, 0x001D8, 0x005DC, + 0x0084A, 0x00499, 0x003C5, 0x01D8E, 0x00765, 0x00435, 0x00771, 0x001C2, + 0x00118, 0x003BC, 0x00381, 0x00387, 0x07B33, 0x01097, 0x01096, 0x01ECD, + 0x00E99, 0x00F1C, 0x00F1D, 0x00EE5, 0x0011C, 0x07B32, 0x03D98, 0x01D8F, + 0x00E98, 0x00F67, 0x003BD, 0x00380, 0x00498, 0x00386 + }, + { + 0x0000D, 0x00010, 0x0002E, 0x00039, 0x0000D, 0x00074, 0x000ED, 0x000B6, + 0x00001, 0x00002, 0x00000, 0x00030, 0x00029, 0x00070, 0x000F3, 0x0008C, + 0x00166, 0x00009, 0x00033, 0x00078, 0x00006, 0x000C4, 0x0000B, 0x00163, + 0x000CC, 0x005BE, 0x0001F, 0x0002F, 0x00064, 0x00018, 0x000C6, 0x0000A, + 0x00162, 0x002C0, 0x00EF3, 0x00007, 0x0000F, 0x000E3, 0x000CA, 0x000B2, + 0x0018F, 0x003AE, 0x0075F, 0x00C51, 0x00015, 0x00047, 0x000EE, 0x000E2, + 0x000EA, 0x00009, 0x0016A, 0x002C3, 0x0059D, 0x0003D, 0x00008, 0x001D9, + 0x00032, 0x0000E, 0x0016E, 0x0032C, 0x0065B, 0x0196B, 0x00002, 0x0000F, + 0x001D8, 0x0008D, 0x000B4, 0x001E4, 0x00067, 0x00317, 0x00794, 0x00022, + 0x003BE, 0x00315, 0x00034, 0x00037, 0x002DE, 0x0006C, 0x00EFE, 0x0066C, + 0x00028, 0x003CB, 0x003AC, 0x00035, 0x0016B, 0x003BD, 0x002C1, 0x0062C, + 0x01DFE, 0x0000E, 0x0059E, 0x005BF, 0x000DA, 0x00629, 0x00584, 0x00EB7, + 0x00B0A, 0x0066D, 0x0000C, 0x0077E, 0x0059C, 0x00778, 0x0075E, 0x0075A, + 0x0062D, 0x00337, 0x00334, 0x00197, 0x01E57, 0x01DE4, 0x0196A, 0x01E56, + 0x00C50, 0x00B3F, 0x01E54, 0x00B0B, 0x0018E, 0x001B6, 0x01E55, 0x00CB4, + 0x00B3E, 0x00EB6, 0x01DE5, 0x01DFF, 0x00335, 0x001B7 + }, + { + 0x00001, 0x0000B, 0x00019, 0x0006F, 0x0002A, 0x00075, 0x007EB, 0x00163, + 0x00001, 0x0000E, 0x0001A, 0x0003E, 0x0001C, 0x0002D, 0x00164, 0x007EC, + 0x00165, 0x00004, 0x00006, 0x00036, 0x0007F, 0x000AE, 0x00158, 0x0015C, + 0x0056D, 0xFD510, 0x00000, 0x00004, 0x0007B, 0x000F3, 0x0003B, 0x007ED, + 0x002B3, 0x002CC, 0x0056E, 0x00018, 0x0003E, 0x00017, 0x0001E, 0x000AF, + 0x003F7, 0x0056F, 0x002CD, 0xFD511, 0x00014, 0x000AD, 0x000AA, 0x00014, + 0x000A8, 0x00153, 0x000E8, 0x001FE, 0x00DCF, 0x00078, 0x001B8, 0x00152, + 0x000FE, 0x002B1, 0x0015D, 0x00160, 0xFD512, 0xFD513, 0x0007A, 0x002B0, + 0x001E5, 0x000E9, 0x000FC, 0x006E6, 0x00DC8, 0x00584, 0xFD514, 0x000AB, + 0x00DDE, 0x00159, 0x003F4, 0x00DC9, 0x00DCA, 0x001FA, 0xFD515, 0xFD516, + 0x000FC, 0x001FF, 0x001E4, 0x000AF, 0x0015A, 0x00167, 0x00DCB, 0x00585, + 0xFD517, 0x003F7, 0x03F55, 0xFD518, 0x00DDC, 0x00586, 0x03F56, 0xFD519, + 0x03F57, 0xFD51A, 0x001BA, 0x00587, 0x00588, 0x00DDF, 0x002B2, 0xFD51B, + 0x00DCE, 0x003F6, 0xFD51C, 0x00FD4, 0xFD51D, 0xFD51E, 0xFD51F, 0x7EA80, + 0x7EA81, 0x0056C, 0x7EA82, 0x7EA83, 0x00376, 0x00589, 0x0058A, 0x7EA84, + 0x7EA85, 0x00DDD, 0x7EA86, 0x7EA87, 0x0058B, 0x07EA9 + }, + { + 0x00003, 0x0000E, 0x0000F, 0x0007E, 0x00062, 0x000C6, 0x00CD9, 0x0063E, + 0x00002, 0x00002, 0x00000, 0x00018, 0x0000C, 0x00069, 0x00039, 0x00707, + 0x00C7E, 0x00002, 0x0000D, 0x0001B, 0x0000F, 0x0019A, 0x00647, 0x01A37, + 0x346C4, 0x0346D, 0x00001, 0x0001E, 0x0007F, 0x0000A, 0x000E1, 0x00661, + 0x00CE4, 0x346C5, 0x346C6, 0x0001D, 0x00030, 0x0000D, 0x000CB, 0x00199, + 0x00320, 0x0008E, 0x0652E, 0x346C7, 0x0003E, 0x00039, 0x00035, 0x00033, + 0x0019F, 0x001C0, 0x00CDA, 0x346C8, 0x346C9, 0x0000B, 0x000D0, 0x0019E, + 0x00022, 0x00038, 0x0018E, 0x0031E, 0x03294, 0x0023C, 0x00032, 0x00012, + 0x00013, 0x00071, 0x0019D, 0x00020, 0x00C87, 0x00CC0, 0x346CA, 0x00338, + 0x00653, 0x001A2, 0x0032A, 0x00322, 0x00CE7, 0x00084, 0x0011F, 0x346CB, + 0x00325, 0x00649, 0x0032B, 0x00077, 0x00648, 0x00642, 0x00C86, 0x00C8C, + 0x346CC, 0x0003A, 0x019B7, 0x00043, 0x00327, 0x0008C, 0x0008D, 0x00C8D, + 0x346CD, 0x346CE, 0x00337, 0x00CE5, 0x00085, 0x00326, 0x00347, 0x00CA4, + 0x00C7F, 0x00D1A, 0x346CF, 0x00328, 0x1A360, 0x1A361, 0x00CD8, 0x0068C, + 0x03295, 0x03296, 0x0652F, 0x066D8, 0x00331, 0x00706, 0x0023D, 0x00076, + 0x00CC1, 0x00382, 0x00CE6, 0x066D9, 0x066DA, 0x066DB + } +}; + +const uint8_t ff_vc1_2ref_mvdata_bits[8][126] = { + { + 4, 5, 5, 5, 6, 7, 8, 10, 2, 5, 5, 6, 6, 7, 8, 9, + 10, 4, 5, 6, 6, 7, 8, 9, 10, 11, 4, 6, 6, 7, 7, 9, + 9, 10, 12, 5, 8, 8, 8, 8, 9, 9, 10, 12, 5, 7, 8, 7, + 7, 8, 9, 9, 11, 7, 9, 10, 9, 10, 10, 10, 10, 12, 6, 9, + 9, 9, 9, 9, 10, 10, 11, 7, 10, 10, 11, 11, 11, 12, 12, 14, + 8, 11, 10, 11, 11, 11, 11, 12, 12, 8, 12, 11, 11, 12, 12, 12, + 12, 13, 8, 12, 11, 11, 12, 12, 12, 13, 12, 9, 14, 13, 11, 13, + 12, 13, 12, 13, 9, 13, 13, 12, 12, 13, 13, 13, 13, 13 + }, + { + 3, 4, 5, 6, 8, 10, 11, 11, 2, 5, 5, 6, 7, 8, 10, 11, + 11, 4, 5, 5, 6, 7, 9, 12, 13, 13, 4, 6, 7, 7, 9, 10, + 11, 13, 14, 5, 7, 7, 7, 8, 9, 11, 13, 13, 6, 8, 8, 8, + 8, 9, 10, 12, 13, 7, 9, 8, 8, 8, 9, 11, 12, 13, 7, 9, + 9, 9, 9, 9, 10, 11, 13, 8, 10, 10, 10, 10, 10, 11, 12, 13, + 9, 11, 11, 10, 10, 10, 11, 11, 12, 10, 12, 12, 12, 11, 11, 11, + 12, 12, 10, 13, 12, 12, 11, 11, 11, 12, 12, 10, 13, 13, 12, 13, + 11, 12, 11, 12, 10, 14, 13, 13, 12, 12, 12, 11, 11, 11 + }, + { + 4, 4, 5, 5, 6, 7, 8, 9, 2, 5, 6, 6, 6, 7, 7, 9, + 9, 4, 6, 6, 6, 7, 8, 9, 11, 12, 5, 7, 7, 7, 9, 9, + 10, 11, 12, 5, 7, 7, 7, 7, 9, 9, 10, 12, 5, 8, 8, 8, + 8, 8, 9, 10, 10, 6, 9, 8, 8, 8, 8, 9, 9, 11, 6, 10, + 10, 9, 9, 9, 9, 10, 10, 7, 11, 10, 9, 9, 10, 9, 10, 11, + 7, 10, 11, 10, 10, 10, 9, 10, 11, 8, 12, 11, 11, 10, 11, 11, + 10, 10, 8, 12, 12, 11, 11, 11, 11, 10, 11, 8, 13, 12, 12, 11, + 11, 11, 11, 10, 9, 13, 12, 12, 12, 11, 11, 10, 10, 10 + }, + { + 3, 4, 6, 7, 7, 9, 11, 11, 2, 5, 5, 6, 8, 9, 10, 11, + 13, 3, 5, 5, 7, 8, 9, 12, 14, 13, 4, 6, 6, 7, 9, 11, + 13, 14, 14, 5, 7, 7, 8, 9, 9, 13, 15, 13, 6, 8, 8, 8, + 9, 10, 12, 14, 13, 7, 10, 9, 9, 9, 9, 12, 13, 14, 7, 11, + 10, 10, 10, 10, 11, 12, 13, 8, 11, 12, 12, 12, 11, 12, 14, 15, + 9, 11, 12, 11, 12, 11, 11, 12, 13, 9, 12, 13, 13, 12, 12, 13, + 14, 14, 9, 12, 13, 13, 13, 12, 13, 12, 14, 10, 13, 13, 14, 13, + 11, 13, 14, 15, 10, 12, 13, 15, 14, 13, 13, 13, 14, 14 + }, + { + 4, 5, 5, 5, 6, 7, 8, 8, 2, 6, 6, 6, 6, 6, 8, 9, + 10, 4, 6, 6, 6, 6, 7, 9, 10, 11, 4, 7, 7, 7, 7, 7, + 9, 10, 12, 5, 7, 7, 7, 7, 7, 9, 10, 11, 6, 8, 8, 7, + 7, 7, 8, 9, 10, 6, 9, 8, 8, 7, 8, 10, 10, 11, 7, 9, + 9, 8, 8, 8, 9, 9, 10, 8, 10, 10, 9, 9, 9, 11, 11, 11, + 8, 11, 10, 10, 9, 9, 10, 11, 10, 10, 12, 12, 11, 11, 10, 11, + 12, 11, 10, 13, 12, 11, 11, 10, 10, 11, 11, 11, 15, 13, 13, 13, + 12, 12, 12, 12, 10, 15, 14, 13, 12, 12, 11, 11, 11, 11 + }, + { + 4, 5, 6, 6, 6, 7, 8, 8, 2, 4, 5, 6, 6, 7, 8, 8, + 9, 4, 6, 7, 7, 8, 8, 9, 10, 11, 5, 6, 7, 7, 8, 8, + 9, 10, 12, 5, 7, 8, 8, 8, 9, 10, 11, 12, 5, 7, 8, 8, + 8, 8, 9, 10, 11, 6, 8, 9, 8, 8, 9, 10, 11, 13, 5, 8, + 9, 8, 8, 9, 9, 10, 11, 6, 10, 10, 9, 9, 10, 10, 12, 13, + 6, 10, 10, 9, 9, 10, 10, 11, 13, 7, 11, 11, 11, 11, 11, 12, + 12, 13, 7, 11, 11, 11, 11, 11, 11, 12, 12, 9, 13, 13, 13, 13, + 12, 12, 13, 12, 9, 12, 13, 12, 12, 12, 13, 13, 12, 12 + }, + { + 3, 5, 6, 8, 9, 10, 12, 12, 1, 5, 6, 7, 8, 9, 12, 12, + 12, 4, 6, 7, 8, 9, 12, 12, 14, 21, 4, 6, 8, 9, 9, 12, + 13, 13, 14, 6, 9, 8, 8, 9, 13, 14, 13, 21, 6, 9, 9, 8, + 9, 10, 11, 12, 13, 8, 10, 10, 11, 11, 12, 12, 21, 21, 8, 11, + 10, 11, 11, 12, 13, 14, 21, 9, 13, 10, 11, 13, 13, 12, 21, 21, + 9, 12, 10, 11, 12, 12, 13, 14, 21, 11, 15, 21, 13, 14, 15, 21, + 15, 21, 10, 14, 14, 13, 13, 21, 13, 13, 21, 13, 21, 21, 21, 20, + 20, 14, 20, 20, 11, 14, 14, 20, 20, 13, 20, 20, 14, 16 + }, + { + 2, 5, 6, 8, 9, 10, 13, 13, 2, 4, 5, 6, 8, 9, 10, 13, + 14, 3, 5, 7, 8, 10, 12, 15, 20, 16, 4, 6, 8, 8, 10, 12, + 13, 20, 20, 7, 8, 8, 9, 10, 11, 12, 16, 20, 7, 8, 8, 8, + 10, 11, 13, 20, 20, 8, 10, 10, 10, 10, 11, 12, 15, 14, 8, 9, + 9, 9, 10, 10, 13, 13, 20, 11, 12, 11, 11, 11, 13, 12, 13, 20, + 11, 12, 11, 11, 12, 12, 13, 13, 20, 10, 14, 11, 11, 12, 12, 13, + 20, 20, 11, 13, 12, 11, 12, 13, 14, 14, 20, 11, 19, 19, 13, 13, + 15, 15, 16, 16, 11, 13, 14, 11, 13, 12, 13, 16, 16, 16 + } +}; + +const uint8_t wmv3_dc_scale_table[32] = { + 0, 2, 4, 8, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, + 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21 }; /* P-Picture CBPCY VLC tables */ -#if 1 // Looks like original tables are not conforming to standard at all. Are they used for old WMV? +// Looks like original tables are not conforming to standard at all. Are they used for old WMV? const uint16_t ff_vc1_cbpcy_p_codes[4][64] = { { 0, 6, 15, 13, 13, 11, 3, 13, 5, 8, 49, 10, 12, 114, 102, 119, @@ -330,60 +705,141 @@ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8 } }; -#else -const uint16_t ff_vc1_cbpcy_p_codes[4][64] = { + +/* Interlaced CBPCY VLC tables (Table 124 - Table 131) */ +const uint16_t ff_vc1_icbpcy_p_codes[8][63] = { { - 0, 1, 1, 4, 5, 1, 12, 4, 13, 14, 10, 11, 12, 7, 13, 2, - 15, 1, 96, 1, 49, 97, 2, 100, 3, 4, 5, 101, 102, 52, 53, 4, - 6, 7, 54, 103, 8, 9, 10, 110, 11, 12, 111, 56, 114, 58, 115, 5, - 13, 7, 8, 9, 10, 11, 12, 30, 13, 14, 15, 118, 119, 62, 63, 3 + 0x2F1A, 0x2F1B, 0x178C, 0x0090, 0x02A8, 0x02A9, 0x0BC7, 0x0091, + 0x02AA, 0x02AB, 0x05E0, 0x004A, 0x0096, 0x0097, 0x00BD, 0x0092, + 0x02AC, 0x02AD, 0x05E1, 0x0098, 0x0132, 0x0133, 0x0179, 0x0134, + 0x026A, 0x026B, 0x02FC, 0x004E, 0x0040, 0x0041, 0x002B, 0x0093, + 0x02AE, 0x02AF, 0x05E2, 0x0136, 0x026E, 0x026F, 0x02FD, 0x009E, + 0x013E, 0x013F, 0x017F, 0x0050, 0x0042, 0x0043, 0x002C, 0x0051, + 0x00A4, 0x00A5, 0x00BE, 0x0053, 0x0044, 0x0045, 0x002D, 0x0054, + 0x0046, 0x0047, 0x002E, 0x0003, 0x0000, 0x0001, 0x0001 + }, + { + 0x0041, 0x0042, 0x0100, 0x0043, 0x0088, 0x0089, 0x0101, 0x0045, + 0x008C, 0x008D, 0x0102, 0x0010, 0x0022, 0x0023, 0x0024, 0x0047, + 0x0010, 0x0011, 0x0103, 0x0025, 0x0058, 0x0059, 0x005A, 0x005B, + 0x005A, 0x005B, 0x005C, 0x000C, 0x0030, 0x0031, 0x0019, 0x0009, + 0x0014, 0x0015, 0x002C, 0x005C, 0x005D, 0x005E, 0x005F, 0x0026, + 0x005D, 0x005E, 0x005F, 0x000D, 0x0034, 0x0035, 0x001B, 0x0014, + 0x0027, 0x002A, 0x002B, 0x000E, 0x0038, 0x0039, 0x001D, 0x000F, + 0x003C, 0x003D, 0x001F, 0x0005, 0x0009, 0x0000, 0x0003 + }, + { + 0x0032, 0x0033, 0x001A, 0x0026, 0x00E4, 0x00E5, 0x01E6, 0x0027, + 0x00E6, 0x00E7, 0x01E7, 0x000E, 0x0063, 0x006C, 0x0077, 0x0028, + 0x00E8, 0x00E9, 0x01E8, 0x007B, 0x00DA, 0x00DB, 0x00EC, 0x00F5, + 0x01B8, 0x01B9, 0x01DA, 0x0021, 0x004B, 0x0054, 0x002B, 0x0029, + 0x00EA, 0x00EB, 0x01E9, 0x004A, 0x01BA, 0x01BB, 0x01DB, 0x0020, + 0x00DE, 0x00DF, 0x00F2, 0x0022, 0x0055, 0x0058, 0x002D, 0x000F, + 0x0070, 0x0071, 0x0078, 0x0023, 0x0059, 0x005C, 0x002F, 0x0024, + 0x005D, 0x0062, 0x0030, 0x0002, 0x001F, 0x0006, 0x0000 + }, + { + 0x0028, 0x0029, 0x009D, 0x0000, 0x01EA, 0x01EB, 0x01EC, 0x0001, + 0x01ED, 0x01EE, 0x01EF, 0x0005, 0x00F0, 0x00F1, 0x003B, 0x0002, + 0x01F0, 0x01F1, 0x01F2, 0x003F, 0x015C, 0x015D, 0x0099, 0x0010, + 0x03D0, 0x03D1, 0x0130, 0x000F, 0x009E, 0x009F, 0x00FB, 0x0003, + 0x01F3, 0x01F4, 0x01F5, 0x0011, 0x03D2, 0x03D3, 0x0131, 0x0009, + 0x015E, 0x015F, 0x009C, 0x0010, 0x00A8, 0x00A9, 0x0038, 0x0006, + 0x00F2, 0x00F3, 0x004D, 0x0011, 0x00AA, 0x00AB, 0x0039, 0x0012, + 0x00AC, 0x00AD, 0x003A, 0x0006, 0x0016, 0x0017, 0x000E + }, + { + 0x003C, 0x003D, 0x001F, 0x000A, 0x0061, 0x0062, 0x0002, 0x000B, + 0x0063, 0x0064, 0x0003, 0x0007, 0x0003, 0x0004, 0x000B, 0x000C, + 0x0065, 0x0066, 0x0004, 0x0012, 0x000A, 0x000B, 0x0014, 0x001B, + 0x0018, 0x0019, 0x0034, 0x002C, 0x0067, 0x0068, 0x0035, 0x000D, + 0x0069, 0x006C, 0x0005, 0x0060, 0x001A, 0x001B, 0x0035, 0x0013, + 0x000E, 0x000F, 0x0015, 0x002D, 0x006D, 0x006E, 0x0038, 0x0008, + 0x0008, 0x0009, 0x000C, 0x002E, 0x006F, 0x0072, 0x003A, 0x002F, + 0x0073, 0x0000, 0x003B, 0x0007, 0x0014, 0x0015, 0x0004 + }, + { + 0x0038, 0x0039, 0x009D, 0x000A, 0x0091, 0x0092, 0x0093, 0x000B, + 0x0094, 0x0095, 0x0096, 0x0003, 0x00EE, 0x00EF, 0x0036, 0x000C, + 0x0097, 0x0098, 0x0099, 0x0008, 0x01E4, 0x01E5, 0x006A, 0x0018, + 0x03CC, 0x03CD, 0x00D6, 0x000E, 0x009E, 0x009F, 0x00F5, 0x000D, + 0x009A, 0x009B, 0x009C, 0x0019, 0x03CE, 0x03CF, 0x00D7, 0x0009, + 0x01E8, 0x01E9, 0x0090, 0x000F, 0x00E8, 0x00E9, 0x00F6, 0x0005, + 0x00F0, 0x00F1, 0x0037, 0x0010, 0x00EA, 0x00EB, 0x00F7, 0x0011, + 0x00EC, 0x00ED, 0x0034, 0x0000, 0x003E, 0x003F, 0x0002 + }, + { + 0x003C, 0x003D, 0x01CF, 0x0000, 0x00BF, 0x00E0, 0x01FC, 0x0001, + 0x00E1, 0x00E2, 0x01FD, 0x0009, 0x01F1, 0x01F2, 0x01F3, 0x0002, + 0x00E3, 0x00E4, 0x01FE, 0x0011, 0x03EE, 0x03EF, 0x03F0, 0x0021, + 0x07E2, 0x07E3, 0x07E4, 0x0018, 0x03F7, 0x03FE, 0x03FF, 0x0003, + 0x00E5, 0x00E6, 0x0080, 0x002E, 0x07E5, 0x07E6, 0x07E7, 0x0016, + 0x03F4, 0x03F5, 0x03F6, 0x0019, 0x0102, 0x0103, 0x0104, 0x000A, + 0x01F4, 0x01F5, 0x01F6, 0x001A, 0x0105, 0x0106, 0x0107, 0x001B, + 0x0178, 0x0179, 0x01CE, 0x001D, 0x00BD, 0x00BE, 0x01F0 + }, + { + 0x0003, 0x0004, 0x01B6, 0x0004, 0x002E, 0x002F, 0x000E, 0x0005, + 0x0030, 0x0031, 0x000F, 0x0003, 0x000A, 0x000B, 0x0014, 0x0006, + 0x0032, 0x0033, 0x0010, 0x0005, 0x0030, 0x0031, 0x0032, 0x0009, + 0x0066, 0x0067, 0x0068, 0x001D, 0x01B7, 0x01B8, 0x01B9, 0x0007, + 0x0034, 0x0035, 0x0011, 0x0016, 0x0069, 0x006A, 0x006B, 0x000A, + 0x0036, 0x0037, 0x00D8, 0x001E, 0x01BA, 0x01BB, 0x01BC, 0x0004, + 0x0015, 0x0016, 0x0017, 0x001F, 0x01BD, 0x01BE, 0x01BF, 0x0000, + 0x0010, 0x0011, 0x0012, 0x001C, 0x00D9, 0x00DA, 0x0013 + } +}; + +const uint8_t ff_vc1_icbpcy_p_bits[8][63] = { + { + 15, 15, 14, 9, 11, 11, 13, 9, 11, 11, 12, 8, 9, 9, 9, 9, + 11, 11, 12, 9, 10, 10, 10, 10, 11, 11, 11, 8, 8, 8, 7, 9, + 11, 11, 12, 10, 11, 11, 11, 9, 10, 10, 10, 8, 8, 8, 7, 8, + 9, 9, 9, 8, 8, 8, 7, 8, 8, 8, 7, 3, 3, 3, 1 }, { - 0, 1, 2, 1, 3, 1, 16, 17, 5, 18, 12, 19, 13, 1, 28, 58, - 1, 1, 1, 2, 3, 2, 3, 236, 237, 4, 5, 238, 6, 7, 239, 8, - 9, 240, 10, 11, 121, 122, 12, 13, 14, 15, 241, 246, 16, 17, 124, 63, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 247, 125 + 7, 7, 9, 7, 8, 8, 9, 7, 8, 8, 9, 6, 7, 7, 7, 7, + 7, 7, 9, 7, 8, 8, 8, 8, 9, 9, 9, 6, 7, 7, 6, 6, + 7, 7, 8, 8, 9, 9, 9, 7, 8, 8, 8, 6, 7, 7, 6, 6, + 7, 7, 7, 6, 7, 7, 6, 6, 7, 7, 6, 3, 4, 3, 2 }, { - 0, 1, 2, 3, 2, 3, 1, 4, 5, 24, 7, 13, 16, 17, 9, 5, - 25, 1, 1, 1, 2, 3, 96, 194, 1, 2, 98, 99, 195, 200, 101, 26, - 201, 102, 412, 413, 414, 54, 220, 111, 221, 3, 224, 113, 225, 114, 230, 29, - 231, 415, 240, 4, 241, 484, 5, 243, 3, 244, 245, 485, 492, 493, 247, 31 + 6, 6, 5, 6, 8, 8, 9, 6, 8, 8, 9, 5, 7, 7, 7, 6, + 8, 8, 9, 7, 8, 8, 8, 8, 9, 9, 9, 6, 7, 7, 6, 6, + 8, 8, 9, 7, 9, 9, 9, 6, 8, 8, 8, 6, 7, 7, 6, 5, + 7, 7, 7, 6, 7, 7, 6, 6, 7, 7, 6, 3, 5, 4, 2 }, { - 0, 1, 1, 1, 2, 2, 3, 4, 3, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 28, 29, 30, 31 - } -}; -const uint8_t ff_vc1_cbpcy_p_bits[4][64] = { + 6, 6, 8, 4, 9, 9, 9, 4, 9, 9, 9, 4, 8, 8, 7, 4, + 9, 9, 9, 6, 9, 9, 8, 6, 10, 10, 9, 5, 8, 8, 8, 4, + 9, 9, 9, 6, 10, 10, 9, 5, 9, 9, 8, 5, 8, 8, 7, 4, + 8, 8, 7, 5, 8, 8, 7, 5, 8, 8, 7, 3, 5, 5, 4 + }, { - 13, 6, 5, 6, 6, 7, 7, 5, 7, 7, 6, 6, 6, 5, 6, 3, - 7, 8, 8, 13, 7, 8, 13, 8, 13, 13, 13, 8, 8, 7, 7, 3, - 13, 13, 7, 8, 13, 13, 13, 8, 13, 13, 8, 7, 8, 7, 8, 3, - 13, 12, 12, 12, 12, 12, 12, 6, 12, 12, 12, 8, 8, 7, 7, 2 + 6, 6, 5, 5, 7, 7, 7, 5, 7, 7, 7, 5, 6, 6, 6, 5, + 7, 7, 7, 6, 7, 7, 7, 7, 8, 8, 8, 6, 7, 7, 6, 5, + 7, 7, 7, 7, 8, 8, 8, 6, 7, 7, 7, 6, 7, 7, 6, 5, + 6, 6, 6, 6, 7, 7, 6, 6, 7, 6, 6, 4, 5, 5, 3 }, { - 14, 3, 3, 5, 3, 4, 5, 5, 3, 5, 4, 5, 4, 6, 5, 6, - 8, 14, 13, 8, 8, 13, 13, 8, 8, 13, 13, 8, 13, 13, 8, 13, - 13, 8, 13, 13, 7, 7, 13, 13, 13, 13, 8, 8, 13, 13, 7, 6, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 8, 7 + 6, 6, 8, 4, 8, 8, 8, 4, 8, 8, 8, 4, 8, 8, 7, 4, + 8, 8, 8, 5, 9, 9, 8, 6, 10, 10, 9, 5, 8, 8, 8, 4, + 8, 8, 8, 6, 10, 10, 9, 5, 9, 9, 8, 5, 8, 8, 8, 4, + 8, 8, 7, 5, 8, 8, 8, 5, 8, 8, 7, 3, 6, 6, 4 }, { - 13, 5, 5, 5, 4, 4, 6, 4, 4, 6, 4, 5, 5, 5, 4, 3, - 6, 8, 10, 9, 8, 8, 7, 8, 13, 13, 7, 7, 8, 8, 7, 5, - 8, 7, 9, 9, 9, 6, 8, 7, 8, 13, 8, 7, 8, 7, 8, 5, - 8, 9, 8, 13, 8, 9, 13, 8, 12, 8, 8, 9, 9, 9, 8, 5 + 6, 6, 9, 3, 8, 8, 9, 3, 8, 8, 9, 4, 9, 9, 9, 3, + 8, 8, 9, 5, 10, 10, 10, 6, 11, 11, 11, 5, 10, 10, 10, 3, + 8, 8, 8, 6, 11, 11, 11, 5, 10, 10, 10, 5, 9, 9, 9, 4, + 9, 9, 9, 5, 9, 9, 9, 5, 9, 9, 9, 5, 8, 8, 9 }, { - 9, 2, 3, 9, 2, 9, 9, 9, 2, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8 + 6, 6, 10, 3, 7, 7, 7, 3, 7, 7, 7, 4, 8, 8, 8, 3, + 7, 7, 7, 5, 9, 9, 9, 6, 10, 10, 10, 6, 10, 10, 10, 3, + 7, 7, 7, 6, 10, 10, 10, 5, 9, 9, 9, 6, 10, 10, 10, 4, + 8, 8, 8, 6, 10, 10, 10, 5, 9, 9, 9, 6, 9, 9, 9 } }; -#endif /* MacroBlock Transform Type: 7.1.3.11, p89 * 8x8:B @@ -455,26 +911,26 @@ /* TTBLK (Transform Type per Block) tables */ const uint8_t ff_vc1_ttblk_codes[3][8] = { - { 0, 1, 3, 5, 16, 17, 18, 19}, - { 3, 0, 1, 2, 3, 5, 8, 9}, - { 1, 0, 1, 4, 6, 7, 10, 11} + { 0, 1, 3, 5, 16, 17, 18, 19 }, + { 3, 0, 1, 2, 3, 5, 8, 9 }, + { 1, 0, 1, 4, 6, 7, 10, 11 } }; const uint8_t ff_vc1_ttblk_bits[3][8] = { - { 2, 2, 2, 3, 5, 5, 5, 5}, - { 2, 3, 3, 3, 3, 3, 4, 4}, - { 2, 3, 3, 3, 3, 3, 4, 4} + { 2, 2, 2, 3, 5, 5, 5, 5 }, + { 2, 3, 3, 3, 3, 3, 4, 4 }, + { 2, 3, 3, 3, 3, 3, 4, 4 } }; /* SUBBLKPAT tables, p93-94, reordered */ const uint8_t ff_vc1_subblkpat_codes[3][15] = { - { 14, 12, 7, 11, 9, 26, 2, 10, 27, 8, 0, 6, 1, 15, 1}, - { 14, 0, 8, 15, 10, 4, 23, 13, 5, 9, 25, 3, 24, 22, 1}, - { 5, 6, 2, 2, 8, 0, 28, 3, 1, 3, 29, 1, 19, 18, 15} + { 14, 12, 7, 11, 9, 26, 2, 10, 27, 8, 0, 6, 1, 15, 1 }, + { 14, 0, 8, 15, 10, 4, 23, 13, 5, 9, 25, 3, 24, 22, 1 }, + { 5, 6, 2, 2, 8, 0, 28, 3, 1, 3, 29, 1, 19, 18, 15 } }; const uint8_t ff_vc1_subblkpat_bits[3][15] = { - { 5, 5, 5, 5, 5, 6, 4, 5, 6, 5, 4, 5, 4, 5, 1}, - { 4, 3, 4, 4, 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 2}, - { 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4} + { 5, 5, 5, 5, 5, 6, 4, 5, 6, 5, 4, 5, 4, 5, 1}, + { 4, 3, 4, 4, 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 2}, + { 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4} }; /* MV differential tables, p265 */ @@ -563,83 +1019,113 @@ /* DC differentials low+hi-mo, p217 are the same as in msmpeg4data .h */ /* Table 232 */ -const int8_t ff_vc1_simple_progressive_4x4_zz [16] = -{ - 0, 8, 16, 1, - 9, 24, 17, 2, - 10, 18, 25, 3, - 11, 26, 19, 27 -}; - -const int8_t ff_vc1_adv_progressive_8x4_zz [32] = /* Table 233 */ -{ - 0, 8, 1, 16, 2, 9, 10, 3, - 24, 17, 4, 11, 18, 12, 5, 19, - 25, 13, 20, 26, 27, 6, 21, 28, - 14, 22, 29, 7, 30, 15, 23, 31 -}; - -const int8_t ff_vc1_adv_progressive_4x8_zz [32] = /* Table 234 */ -{ - 0, 1, 8, 2, - 9, 16, 17, 24, - 10, 32, 25, 18, - 40, 3, 33, 26, - 48, 11, 56, 41, - 34, 49, 57, 42, - 19, 50, 27, 58, - 35, 43, 51, 59 -}; - -const int8_t ff_vc1_adv_interlaced_8x8_zz [64] = /* Table 235 */ -{ - 0, 8, 1, 16, 24, 9, 2, 32, - 40, 48, 56, 17, 10, 3, 25, 18, - 11, 4, 33, 41, 49, 57, 26, 34, - 42, 50, 58, 19, 12, 5, 27, 20, - 13, 6, 35, 28, 21, 14, 7, 15, - 22, 29, 36, 43, 51, 59, 60, 52, - 44, 37, 30, 23, 31, 38, 45, 53, - 61, 62, 54, 46, 39, 47, 55, 63 -}; - -const int8_t ff_vc1_adv_interlaced_8x4_zz [32] = /* Table 236 */ -{ - 0, 8, 16, 24, 1, 9, 2, 17, - 25, 10, 3, 18, 26, 4, 11, 19, - 12, 5, 13, 20, 27, 6, 21, 28, - 14, 22, 29, 7, 30, 15, 23, 31 -}; - -const int8_t ff_vc1_adv_interlaced_4x8_zz [32] = /* Table 237 */ -{ - 0, 1, 2, 8, - 16, 9, 24, 17, - 10, 3, 32, 40, - 48, 56, 25, 18, - 33, 26, 41, 34, - 49, 57, 11, 42, - 19, 50, 27, 58, - 35, 43, 51, 59 -}; - -const int8_t ff_vc1_adv_interlaced_4x4_zz [16] = /* Table 238 */ -{ - 0, 8, 16, 24, - 1, 9, 17, 2, - 25, 10, 18, 3, - 26, 11, 19, 27 +const int8_t ff_vc1_simple_progressive_4x4_zz [16] = { + 0, 8, 16, 1, + 9, 24, 17, 2, + 10, 18, 25, 3, + 11, 26, 19, 27 +}; + +const int8_t ff_vc1_adv_progressive_8x4_zz [32] = { /* Table 233 */ + 0, 8, 1, 16, 2, 9, 10, 3, + 24, 17, 4, 11, 18, 12, 5, 19, + 25, 13, 20, 26, 27, 6, 21, 28, + 14, 22, 29, 7, 30, 15, 23, 31 +}; + +const int8_t ff_vc1_adv_progressive_4x8_zz [32] = { /* Table 234 */ + 0, 1, 8, 2, + 9, 16, 17, 24, + 10, 32, 25, 18, + 40, 3, 33, 26, + 48, 11, 56, 41, + 34, 49, 57, 42, + 19, 50, 27, 58, + 35, 43, 51, 59 +}; + +const int8_t ff_vc1_adv_interlaced_8x8_zz [64] = { /* Table 235 */ + 0, 8, 1, 16, 24, 9, 2, 32, + 40, 48, 56, 17, 10, 3, 25, 18, + 11, 4, 33, 41, 49, 57, 26, 34, + 42, 50, 58, 19, 12, 5, 27, 20, + 13, 6, 35, 28, 21, 14, 7, 15, + 22, 29, 36, 43, 51, 59, 60, 52, + 44, 37, 30, 23, 31, 38, 45, 53, + 61, 62, 54, 46, 39, 47, 55, 63 +}; + +const int8_t ff_vc1_adv_interlaced_8x4_zz [32] = { /* Table 236 */ + 0, 8, 16, 24, 1, 9, 2, 17, + 25, 10, 3, 18, 26, 4, 11, 19, + 12, 5, 13, 20, 27, 6, 21, 28, + 14, 22, 29, 7, 30, 15, 23, 31 +}; + +const int8_t ff_vc1_adv_interlaced_4x8_zz [32] = { /* Table 237 */ + 0, 1, 2, 8, + 16, 9, 24, 17, + 10, 3, 32, 40, + 48, 56, 25, 18, + 33, 26, 41, 34, + 49, 57, 11, 42, + 19, 50, 27, 58, + 35, 43, 51, 59 +}; + +const int8_t ff_vc1_adv_interlaced_4x4_zz [16] = { /* Table 238 */ + 0, 8, 16, 24, + 1, 9, 17, 2, + 25, 10, 18, 3, + 26, 11, 19, 27 }; /* DQScale as specified in 8.1.3.9 - almost identical to 0x40000/i */ const int32_t ff_vc1_dqscale[63] = { -0x40000, 0x20000, 0x15555, 0x10000, 0xCCCD, 0xAAAB, 0x9249, 0x8000, - 0x71C7, 0x6666, 0x5D17, 0x5555, 0x4EC5, 0x4925, 0x4444, 0x4000, - 0x3C3C, 0x38E4, 0x35E5, 0x3333, 0x30C3, 0x2E8C, 0x2C86, 0x2AAB, - 0x28F6, 0x2762, 0x25ED, 0x2492, 0x234F, 0x2222, 0x2108, 0x2000, - 0x1F08, 0x1E1E, 0x1D42, 0x1C72, 0x1BAD, 0x1AF3, 0x1A42, 0x199A, - 0x18FA, 0x1862, 0x17D0, 0x1746, 0x16C1, 0x1643, 0x15CA, 0x1555, - 0x14E6, 0x147B, 0x1414, 0x13B1, 0x1352, 0x12F7, 0x129E, 0x1249, - 0x11F7, 0x11A8, 0x115B, 0x1111, 0x10C9, 0x1084, 0x1000 + 0x40000, 0x20000, 0x15555, 0x10000, 0xCCCD, 0xAAAB, 0x9249, 0x8000, + 0x71C7, 0x6666, 0x5D17, 0x5555, 0x4EC5, 0x4925, 0x4444, 0x4000, + 0x3C3C, 0x38E4, 0x35E5, 0x3333, 0x30C3, 0x2E8C, 0x2C86, 0x2AAB, + 0x28F6, 0x2762, 0x25ED, 0x2492, 0x234F, 0x2222, 0x2108, 0x2000, + 0x1F08, 0x1E1E, 0x1D42, 0x1C72, 0x1BAD, 0x1AF3, 0x1A42, 0x199A, + 0x18FA, 0x1862, 0x17D0, 0x1746, 0x16C1, 0x1643, 0x15CA, 0x1555, + 0x14E6, 0x147B, 0x1414, 0x13B1, 0x1352, 0x12F7, 0x129E, 0x1249, + 0x11F7, 0x11A8, 0x115B, 0x1111, 0x10C9, 0x1084, 0x1000 +}; + +/* P Interlaced field picture MV predictor scaling values (Table 114) */ +const uint16_t vc1_field_mvpred_scales[2][7][4] = { +// Refdist: +// 0 1 2 3 or greater + { // current field is first + { 128, 192, 213, 224 }, // SCALEOPP + { 512, 341, 307, 293 }, // SCALESAME1 + { 219, 236, 242, 245 }, // SCALESAME2 + { 32, 48, 53, 56 }, // SCALEZONE1_X + { 8, 12, 13, 14 }, // SCALEZONE1_Y + { 37, 20, 14, 11 }, // ZONE1OFFSET_X + { 10, 5, 4, 3 } // ZONE1OFFSET_Y + }, + { // current field is second + { 128, 64, 43, 32 }, // SCALEOPP + { 512, 1024, 1536, 2048 }, // SCALESAME1 + { 219, 204, 200, 198 }, // SCALESAME2 + { 32, 16, 11, 8 }, // SCALEZONE1_X + { 8, 4, 3, 2 }, // SCALEZONE1_Y + { 37, 52, 56, 58 }, // ZONE1OFFSET_X + { 10, 13, 14, 15 } // ZONE1OFFSET_Y + } +}; + +/* B Interlaced field picture backward MV predictor scaling values for first field (Table 115) */ +const uint16_t vc1_b_field_mvpred_scales[7][4] = { + // BRFD: + // 0 1 2 3 or greater + { 171, 205, 219, 228 }, // SCALESAME + { 384, 320, 299, 288 }, // SCALEOPP1 + { 230, 239, 244, 246 }, // SCALEOPP2 + { 43, 51, 55, 57 }, // SCALEZONE1_X + { 11, 13, 14, 14 }, // SCALEZONE1_Y + { 26, 17, 12, 10 }, // ZONE1OFFSET_X + { 7, 4, 3, 3 } // ZONE1OFFSET_Y }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1data.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1data.h 2012-01-11 00:34:30.000000000 +0000 @@ -44,6 +44,9 @@ extern const int ff_vc1_fps_nr[5], ff_vc1_fps_dr[2]; extern const uint8_t ff_vc1_pquant_table[3][32]; +/* MBMODE table for interlaced frame P-picture */ +extern const uint8_t ff_vc1_mbmode_intfrp[2][15][4]; + /** @name VC-1 VLC tables and defines * @todo TODO move this into the context */ @@ -63,31 +66,40 @@ extern VLC ff_vc1_mv_diff_vlc[4]; #define VC1_CBPCY_P_VLC_BITS 9 //14 extern VLC ff_vc1_cbpcy_p_vlc[4]; +#define VC1_ICBPCY_VLC_BITS 9 +extern VLC ff_vc1_icbpcy_vlc[8]; #define VC1_4MV_BLOCK_PATTERN_VLC_BITS 6 extern VLC ff_vc1_4mv_block_pattern_vlc[4]; +#define VC1_2MV_BLOCK_PATTERN_VLC_BITS 3 +extern VLC ff_vc1_2mv_block_pattern_vlc[4]; #define VC1_TTBLK_VLC_BITS 5 extern VLC ff_vc1_ttblk_vlc[3]; #define VC1_SUBBLKPAT_VLC_BITS 6 extern VLC ff_vc1_subblkpat_vlc[3]; +#define VC1_INTFR_4MV_MBMODE_VLC_BITS 9 +extern VLC ff_vc1_intfr_4mv_mbmode_vlc[4]; +#define VC1_INTFR_NON4MV_MBMODE_VLC_BITS 6 +extern VLC ff_vc1_intfr_non4mv_mbmode_vlc[4]; +#define VC1_IF_MMV_MBMODE_VLC_BITS 5 +extern VLC ff_vc1_if_mmv_mbmode_vlc[8]; +#define VC1_IF_1MV_MBMODE_VLC_BITS 5 +extern VLC ff_vc1_if_1mv_mbmode_vlc[8]; +#define VC1_1REF_MVDATA_VLC_BITS 9 +extern VLC ff_vc1_1ref_mvdata_vlc[4]; +#define VC1_2REF_MVDATA_VLC_BITS 9 +extern VLC ff_vc1_2ref_mvdata_vlc[8]; extern VLC ff_vc1_ac_coeff_table[8]; + +#define VC1_IF_MBMODE_VLC_BITS 5 //@} -#if 0 //original bfraction from vc9data.h, not conforming to standard -/* Denominator used for ff_vc1_bfraction_lut */ -#define B_FRACTION_DEN 840 - -/* bfraction is fractional, we scale to the GCD 3*5*7*8 = 840 */ -extern const int16_t ff_vc1_bfraction_lut[23]; -#else /* Denominator used for ff_vc1_bfraction_lut */ #define B_FRACTION_DEN 256 /* pre-computed scales for all bfractions and base=256 */ extern const int16_t ff_vc1_bfraction_lut[23]; -#endif - extern const uint8_t ff_vc1_bfraction_bits[23]; extern const uint8_t ff_vc1_bfraction_codes[23]; @@ -110,12 +122,20 @@ extern const uint8_t ff_vc1_4mv_block_pattern_codes[4][16]; extern const uint8_t ff_vc1_4mv_block_pattern_bits[4][16]; +/* 2MV Block pattern VLC tables */ +extern const uint8_t ff_vc1_2mv_block_pattern_codes[4][4]; +extern const uint8_t ff_vc1_2mv_block_pattern_bits[4][4]; + extern const uint8_t wmv3_dc_scale_table[32]; /* P-Picture CBPCY VLC tables */ extern const uint16_t ff_vc1_cbpcy_p_codes[4][64]; extern const uint8_t ff_vc1_cbpcy_p_bits[4][64]; +/* Interlaced CBPCY VLC tables (Table 124 - Table 131) */ +extern const uint16_t ff_vc1_icbpcy_p_codes[8][63]; +extern const uint8_t ff_vc1_icbpcy_p_bits[8][63]; + /* MacroBlock Transform Type: 7.1.3.11, p89 * 8x8:B * 8x4:B:btm 8x4:B:top 8x4:B:both, @@ -140,6 +160,26 @@ extern const uint16_t ff_vc1_mv_diff_codes[4][73]; extern const uint8_t ff_vc1_mv_diff_bits[4][73]; +/* Interlaced frame picture MBMODE VLC tables (p. 246, p. 360) */ +extern const uint16_t ff_vc1_intfr_4mv_mbmode_codes[4][15]; +extern const uint8_t ff_vc1_intfr_4mv_mbmode_bits[4][15]; +extern const uint8_t ff_vc1_intfr_non4mv_mbmode_codes[4][9]; +extern const uint8_t ff_vc1_intfr_non4mv_mbmode_bits[4][9]; + +/* Interlaced field picture MBMODE VLC tables (p. 356 - 11.4.1, 11.4.2) */ +extern const uint8_t ff_vc1_if_mmv_mbmode_codes[8][8]; +extern const uint8_t ff_vc1_if_mmv_mbmode_bits[8][8]; +extern const uint8_t ff_vc1_if_1mv_mbmode_codes[8][6]; +extern const uint8_t ff_vc1_if_1mv_mbmode_bits[8][6]; + +/* Interlaced frame/field picture MVDATA VLC tables */ +/* 1-reference tables */ +extern const uint32_t ff_vc1_1ref_mvdata_codes[4][72]; +extern const uint8_t ff_vc1_1ref_mvdata_bits[4][72]; +/* 2-reference tables */ +extern const uint32_t ff_vc1_2ref_mvdata_codes[8][126]; +extern const uint8_t ff_vc1_2ref_mvdata_bits[8][126]; + /* DC differentials low+hi-mo, p217 are the same as in msmpeg4data .h */ /* Scantables/ZZ scan are at 11.9 (p262) and 8.1.1.12 (p10) */ @@ -150,8 +190,14 @@ extern const int8_t ff_vc1_adv_interlaced_8x4_zz [32]; extern const int8_t ff_vc1_adv_interlaced_4x8_zz [32]; extern const int8_t ff_vc1_adv_interlaced_4x4_zz [16]; +extern const int8_t ff_vc1_intra_horz_8x8_zz [64]; +extern const int8_t ff_vc1_intra_vert_8x8_zz [64]; /* DQScale as specified in 8.1.3.9 - almost identical to 0x40000/i */ extern const int32_t ff_vc1_dqscale[63]; +/* P Interlaced field picture MV predictor scaling values (Table 114) */ +extern const uint16_t vc1_field_mvpred_scales[2][7][4]; +/* B Interlaced field picture backward MV predictor scaling values for first field (Table 115) */ +extern const uint16_t vc1_b_field_mvpred_scales[7][4]; #endif /* AVCODEC_VC1DATA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1dec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * VC-1 and WMV3 decoder + * Copyright (c) 2011 Mashiat Sarker Shakkhar * Copyright (c) 2006-2007 Konstantin Shishkov * Partly based on vc9.c (c) 2005 Anonymous, Alex Beregszaszi, Michael Niedermayer * @@ -23,8 +24,8 @@ /** * @file * VC-1 and WMV3 decoder - * */ + #include "internal.h" #include "dsputil.h" #include "avcodec.h" @@ -45,15 +46,22 @@ #define MB_INTRA_VLC_BITS 9 #define DC_VLC_BITS 9 #define AC_VLC_BITS 9 -static const uint16_t table_mb_intra[64][2]; static const uint16_t vlc_offs[] = { - 0, 520, 552, 616, 1128, 1160, 1224, 1740, 1772, 1836, 1900, 2436, - 2986, 3050, 3610, 4154, 4218, 4746, 5326, 5390, 5902, 6554, 7658, 8620, - 9262, 10202, 10756, 11310, 12228, 15078 + 0, 520, 552, 616, 1128, 1160, 1224, 1740, 1772, 1836, 1900, 2436, + 2986, 3050, 3610, 4154, 4218, 4746, 5326, 5390, 5902, 6554, 7658, 8342, + 9304, 9988, 10630, 11234, 12174, 13006, 13560, 14232, 14786, 15432, 16350, 17522, + 20372, 21818, 22330, 22394, 23166, 23678, 23742, 24820, 25332, 25396, 26460, 26980, + 27048, 27592, 27600, 27608, 27616, 27624, 28224, 28258, 28290, 28802, 28834, 28866, + 29378, 29412, 29444, 29960, 29994, 30026, 30538, 30572, 30604, 31120, 31154, 31186, + 31714, 31746, 31778, 32306, 32340, 32372 }; +// offset tables for interlaced picture MVDATA decoding +static const int offset_table1[9] = { 0, 1, 2, 4, 8, 16, 32, 64, 128 }; +static const int offset_table2[9] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 }; + /** * Init VC-1 specific tables and VC1Context members * @param v The VC1Context to initialize @@ -63,73 +71,123 @@ { static int done = 0; int i = 0; - static VLC_TYPE vlc_table[15078][2]; + static VLC_TYPE vlc_table[32372][2]; v->hrd_rate = v->hrd_buffer = NULL; /* VLC tables */ - if(!done) - { + if (!done) { INIT_VLC_STATIC(&ff_vc1_bfraction_vlc, VC1_BFRACTION_VLC_BITS, 23, - ff_vc1_bfraction_bits, 1, 1, - ff_vc1_bfraction_codes, 1, 1, 1 << VC1_BFRACTION_VLC_BITS); + ff_vc1_bfraction_bits, 1, 1, + ff_vc1_bfraction_codes, 1, 1, 1 << VC1_BFRACTION_VLC_BITS); INIT_VLC_STATIC(&ff_vc1_norm2_vlc, VC1_NORM2_VLC_BITS, 4, - ff_vc1_norm2_bits, 1, 1, - ff_vc1_norm2_codes, 1, 1, 1 << VC1_NORM2_VLC_BITS); + ff_vc1_norm2_bits, 1, 1, + ff_vc1_norm2_codes, 1, 1, 1 << VC1_NORM2_VLC_BITS); INIT_VLC_STATIC(&ff_vc1_norm6_vlc, VC1_NORM6_VLC_BITS, 64, - ff_vc1_norm6_bits, 1, 1, - ff_vc1_norm6_codes, 2, 2, 556); + ff_vc1_norm6_bits, 1, 1, + ff_vc1_norm6_codes, 2, 2, 556); INIT_VLC_STATIC(&ff_vc1_imode_vlc, VC1_IMODE_VLC_BITS, 7, - ff_vc1_imode_bits, 1, 1, - ff_vc1_imode_codes, 1, 1, 1 << VC1_IMODE_VLC_BITS); - for (i=0; i<3; i++) - { - ff_vc1_ttmb_vlc[i].table = &vlc_table[vlc_offs[i*3+0]]; - ff_vc1_ttmb_vlc[i].table_allocated = vlc_offs[i*3+1] - vlc_offs[i*3+0]; + ff_vc1_imode_bits, 1, 1, + ff_vc1_imode_codes, 1, 1, 1 << VC1_IMODE_VLC_BITS); + for (i = 0; i < 3; i++) { + ff_vc1_ttmb_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 0]]; + ff_vc1_ttmb_vlc[i].table_allocated = vlc_offs[i * 3 + 1] - vlc_offs[i * 3 + 0]; init_vlc(&ff_vc1_ttmb_vlc[i], VC1_TTMB_VLC_BITS, 16, ff_vc1_ttmb_bits[i], 1, 1, ff_vc1_ttmb_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); - ff_vc1_ttblk_vlc[i].table = &vlc_table[vlc_offs[i*3+1]]; - ff_vc1_ttblk_vlc[i].table_allocated = vlc_offs[i*3+2] - vlc_offs[i*3+1]; + ff_vc1_ttblk_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 1]]; + ff_vc1_ttblk_vlc[i].table_allocated = vlc_offs[i * 3 + 2] - vlc_offs[i * 3 + 1]; init_vlc(&ff_vc1_ttblk_vlc[i], VC1_TTBLK_VLC_BITS, 8, ff_vc1_ttblk_bits[i], 1, 1, ff_vc1_ttblk_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); - ff_vc1_subblkpat_vlc[i].table = &vlc_table[vlc_offs[i*3+2]]; - ff_vc1_subblkpat_vlc[i].table_allocated = vlc_offs[i*3+3] - vlc_offs[i*3+2]; + ff_vc1_subblkpat_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 2]]; + ff_vc1_subblkpat_vlc[i].table_allocated = vlc_offs[i * 3 + 3] - vlc_offs[i * 3 + 2]; init_vlc(&ff_vc1_subblkpat_vlc[i], VC1_SUBBLKPAT_VLC_BITS, 15, ff_vc1_subblkpat_bits[i], 1, 1, ff_vc1_subblkpat_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); } - for(i=0; i<4; i++) - { - ff_vc1_4mv_block_pattern_vlc[i].table = &vlc_table[vlc_offs[i*3+9]]; - ff_vc1_4mv_block_pattern_vlc[i].table_allocated = vlc_offs[i*3+10] - vlc_offs[i*3+9]; + for (i = 0; i < 4; i++) { + ff_vc1_4mv_block_pattern_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 9]]; + ff_vc1_4mv_block_pattern_vlc[i].table_allocated = vlc_offs[i * 3 + 10] - vlc_offs[i * 3 + 9]; init_vlc(&ff_vc1_4mv_block_pattern_vlc[i], VC1_4MV_BLOCK_PATTERN_VLC_BITS, 16, ff_vc1_4mv_block_pattern_bits[i], 1, 1, ff_vc1_4mv_block_pattern_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); - ff_vc1_cbpcy_p_vlc[i].table = &vlc_table[vlc_offs[i*3+10]]; - ff_vc1_cbpcy_p_vlc[i].table_allocated = vlc_offs[i*3+11] - vlc_offs[i*3+10]; + ff_vc1_cbpcy_p_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 10]]; + ff_vc1_cbpcy_p_vlc[i].table_allocated = vlc_offs[i * 3 + 11] - vlc_offs[i * 3 + 10]; init_vlc(&ff_vc1_cbpcy_p_vlc[i], VC1_CBPCY_P_VLC_BITS, 64, ff_vc1_cbpcy_p_bits[i], 1, 1, ff_vc1_cbpcy_p_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); - ff_vc1_mv_diff_vlc[i].table = &vlc_table[vlc_offs[i*3+11]]; - ff_vc1_mv_diff_vlc[i].table_allocated = vlc_offs[i*3+12] - vlc_offs[i*3+11]; + ff_vc1_mv_diff_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 11]]; + ff_vc1_mv_diff_vlc[i].table_allocated = vlc_offs[i * 3 + 12] - vlc_offs[i * 3 + 11]; init_vlc(&ff_vc1_mv_diff_vlc[i], VC1_MV_DIFF_VLC_BITS, 73, ff_vc1_mv_diff_bits[i], 1, 1, ff_vc1_mv_diff_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); } - for(i=0; i<8; i++){ - ff_vc1_ac_coeff_table[i].table = &vlc_table[vlc_offs[i+21]]; - ff_vc1_ac_coeff_table[i].table_allocated = vlc_offs[i+22] - vlc_offs[i+21]; + for (i = 0; i < 8; i++) { + ff_vc1_ac_coeff_table[i].table = &vlc_table[vlc_offs[i * 2 + 21]]; + ff_vc1_ac_coeff_table[i].table_allocated = vlc_offs[i * 2 + 22] - vlc_offs[i * 2 + 21]; init_vlc(&ff_vc1_ac_coeff_table[i], AC_VLC_BITS, vc1_ac_sizes[i], &vc1_ac_tables[i][0][1], 8, 4, &vc1_ac_tables[i][0][0], 8, 4, INIT_VLC_USE_NEW_STATIC); + /* initialize interlaced MVDATA tables (2-Ref) */ + ff_vc1_2ref_mvdata_vlc[i].table = &vlc_table[vlc_offs[i * 2 + 22]]; + ff_vc1_2ref_mvdata_vlc[i].table_allocated = vlc_offs[i * 2 + 23] - vlc_offs[i * 2 + 22]; + init_vlc(&ff_vc1_2ref_mvdata_vlc[i], VC1_2REF_MVDATA_VLC_BITS, 126, + ff_vc1_2ref_mvdata_bits[i], 1, 1, + ff_vc1_2ref_mvdata_codes[i], 4, 4, INIT_VLC_USE_NEW_STATIC); + } + for (i = 0; i < 4; i++) { + /* initialize 4MV MBMODE VLC tables for interlaced frame P picture */ + ff_vc1_intfr_4mv_mbmode_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 37]]; + ff_vc1_intfr_4mv_mbmode_vlc[i].table_allocated = vlc_offs[i * 3 + 38] - vlc_offs[i * 3 + 37]; + init_vlc(&ff_vc1_intfr_4mv_mbmode_vlc[i], VC1_INTFR_4MV_MBMODE_VLC_BITS, 15, + ff_vc1_intfr_4mv_mbmode_bits[i], 1, 1, + ff_vc1_intfr_4mv_mbmode_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); + /* initialize NON-4MV MBMODE VLC tables for the same */ + ff_vc1_intfr_non4mv_mbmode_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 38]]; + ff_vc1_intfr_non4mv_mbmode_vlc[i].table_allocated = vlc_offs[i * 3 + 39] - vlc_offs[i * 3 + 38]; + init_vlc(&ff_vc1_intfr_non4mv_mbmode_vlc[i], VC1_INTFR_NON4MV_MBMODE_VLC_BITS, 9, + ff_vc1_intfr_non4mv_mbmode_bits[i], 1, 1, + ff_vc1_intfr_non4mv_mbmode_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + /* initialize interlaced MVDATA tables (1-Ref) */ + ff_vc1_1ref_mvdata_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 39]]; + ff_vc1_1ref_mvdata_vlc[i].table_allocated = vlc_offs[i * 3 + 40] - vlc_offs[i * 3 + 39]; + init_vlc(&ff_vc1_1ref_mvdata_vlc[i], VC1_1REF_MVDATA_VLC_BITS, 72, + ff_vc1_1ref_mvdata_bits[i], 1, 1, + ff_vc1_1ref_mvdata_codes[i], 4, 4, INIT_VLC_USE_NEW_STATIC); + } + for (i = 0; i < 4; i++) { + /* Initialize 2MV Block pattern VLC tables */ + ff_vc1_2mv_block_pattern_vlc[i].table = &vlc_table[vlc_offs[i + 49]]; + ff_vc1_2mv_block_pattern_vlc[i].table_allocated = vlc_offs[i + 50] - vlc_offs[i + 49]; + init_vlc(&ff_vc1_2mv_block_pattern_vlc[i], VC1_2MV_BLOCK_PATTERN_VLC_BITS, 4, + ff_vc1_2mv_block_pattern_bits[i], 1, 1, + ff_vc1_2mv_block_pattern_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + } + for (i = 0; i < 8; i++) { + /* Initialize interlaced CBPCY VLC tables (Table 124 - Table 131) */ + ff_vc1_icbpcy_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 53]]; + ff_vc1_icbpcy_vlc[i].table_allocated = vlc_offs[i * 3 + 54] - vlc_offs[i * 3 + 53]; + init_vlc(&ff_vc1_icbpcy_vlc[i], VC1_ICBPCY_VLC_BITS, 63, + ff_vc1_icbpcy_p_bits[i], 1, 1, + ff_vc1_icbpcy_p_codes[i], 2, 2, INIT_VLC_USE_NEW_STATIC); + /* Initialize interlaced field picture MBMODE VLC tables */ + ff_vc1_if_mmv_mbmode_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 54]]; + ff_vc1_if_mmv_mbmode_vlc[i].table_allocated = vlc_offs[i * 3 + 55] - vlc_offs[i * 3 + 54]; + init_vlc(&ff_vc1_if_mmv_mbmode_vlc[i], VC1_IF_MMV_MBMODE_VLC_BITS, 8, + ff_vc1_if_mmv_mbmode_bits[i], 1, 1, + ff_vc1_if_mmv_mbmode_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); + ff_vc1_if_1mv_mbmode_vlc[i].table = &vlc_table[vlc_offs[i * 3 + 55]]; + ff_vc1_if_1mv_mbmode_vlc[i].table_allocated = vlc_offs[i * 3 + 56] - vlc_offs[i * 3 + 55]; + init_vlc(&ff_vc1_if_1mv_mbmode_vlc[i], VC1_IF_1MV_MBMODE_VLC_BITS, 6, + ff_vc1_if_1mv_mbmode_bits[i], 1, 1, + ff_vc1_if_1mv_mbmode_codes[i], 1, 1, INIT_VLC_USE_NEW_STATIC); } done = 1; } /* Other defaults */ - v->pq = -1; + v->pq = -1; v->mvrange = 0; /* 7.1.1.18, p80 */ return 0; @@ -137,7 +195,7 @@ /***********************************************************************/ /** - * @defgroup vc1bitplane VC-1 Bitplane decoding + * @name VC-1 Bitplane decoding * @see 8.7, p56 * @{ */ @@ -163,6 +221,9 @@ static void vc1_put_signed_blocks_clamped(VC1Context *v) { MpegEncContext *s = &v->s; + int topleft_mb_pos, top_mb_pos; + int stride_y, fieldtx; + int v_dist; /* The put pixels loop is always one MB row behind the decoding loop, * because we can only put pixels when overlap filtering is done, and @@ -173,18 +234,22 @@ * of the right MB edge, we need the next MB present. */ if (!s->first_slice_line) { if (s->mb_x) { + topleft_mb_pos = (s->mb_y - 1) * s->mb_stride + s->mb_x - 1; + fieldtx = v->fieldtx_plane[topleft_mb_pos]; + stride_y = s->linesize << fieldtx; + v_dist = (16 - fieldtx) >> (fieldtx == 0); s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][0], s->dest[0] - 16 * s->linesize - 16, - s->linesize); + stride_y); s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][1], s->dest[0] - 16 * s->linesize - 8, - s->linesize); + stride_y); s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][2], - s->dest[0] - 8 * s->linesize - 16, - s->linesize); + s->dest[0] - v_dist * s->linesize - 16, + stride_y); s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][3], - s->dest[0] - 8 * s->linesize - 8, - s->linesize); + s->dest[0] - v_dist * s->linesize - 8, + stride_y); s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][4], s->dest[1] - 8 * s->uvlinesize - 8, s->uvlinesize); @@ -193,18 +258,22 @@ s->uvlinesize); } if (s->mb_x == s->mb_width - 1) { + top_mb_pos = (s->mb_y - 1) * s->mb_stride + s->mb_x; + fieldtx = v->fieldtx_plane[top_mb_pos]; + stride_y = s->linesize << fieldtx; + v_dist = fieldtx ? 15 : 8; s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][0], s->dest[0] - 16 * s->linesize, - s->linesize); + stride_y); s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][1], s->dest[0] - 16 * s->linesize + 8, - s->linesize); + stride_y); s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][2], - s->dest[0] - 8 * s->linesize, - s->linesize); + s->dest[0] - v_dist * s->linesize, + stride_y); s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][3], - s->dest[0] - 8 * s->linesize + 8, - s->linesize); + s->dest[0] - v_dist * s->linesize + 8, + stride_y); s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][4], s->dest[1] - 8 * s->uvlinesize, s->uvlinesize); @@ -233,17 +302,17 @@ if (!s->first_slice_line) { v->vc1dsp.vc1_v_loop_filter16(s->dest[0], s->linesize, pq); if (s->mb_x) - v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16*s->linesize, s->linesize, pq); - v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16*s->linesize+8, s->linesize, pq); - for(j = 0; j < 2; j++){ - v->vc1dsp.vc1_v_loop_filter8(s->dest[j+1], s->uvlinesize, pq); + v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize, s->linesize, pq); + v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize + 8, s->linesize, pq); + for (j = 0; j < 2; j++) { + v->vc1dsp.vc1_v_loop_filter8(s->dest[j + 1], s->uvlinesize, pq); if (s->mb_x) - v->vc1dsp.vc1_h_loop_filter8(s->dest[j+1]-8*s->uvlinesize, s->uvlinesize, pq); + v->vc1dsp.vc1_h_loop_filter8(s->dest[j + 1] - 8 * s->uvlinesize, s->uvlinesize, pq); } } - v->vc1dsp.vc1_v_loop_filter16(s->dest[0] + 8*s->linesize, s->linesize, pq); + v->vc1dsp.vc1_v_loop_filter16(s->dest[0] + 8 * s->linesize, s->linesize, pq); - if (s->mb_y == s->mb_height-1) { + if (s->mb_y == s->end_mb_y - 1) { if (s->mb_x) { v->vc1dsp.vc1_h_loop_filter16(s->dest[0], s->linesize, pq); v->vc1dsp.vc1_h_loop_filter8(s->dest[1], s->uvlinesize, pq); @@ -268,10 +337,10 @@ if (s->mb_x >= 2) v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 32 * s->linesize - 16, s->linesize, pq); v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 32 * s->linesize - 8, s->linesize, pq); - for(j = 0; j < 2; j++) { - v->vc1dsp.vc1_v_loop_filter8(s->dest[j+1] - 8 * s->uvlinesize - 8, s->uvlinesize, pq); + for (j = 0; j < 2; j++) { + v->vc1dsp.vc1_v_loop_filter8(s->dest[j + 1] - 8 * s->uvlinesize - 8, s->uvlinesize, pq); if (s->mb_x >= 2) { - v->vc1dsp.vc1_h_loop_filter8(s->dest[j+1] - 16 * s->uvlinesize - 8, s->uvlinesize, pq); + v->vc1dsp.vc1_h_loop_filter8(s->dest[j + 1] - 16 * s->uvlinesize - 8, s->uvlinesize, pq); } } } @@ -285,24 +354,24 @@ if (s->mb_x) v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 32 * s->linesize, s->linesize, pq); v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 32 * s->linesize + 8, s->linesize, pq); - for(j = 0; j < 2; j++) { - v->vc1dsp.vc1_v_loop_filter8(s->dest[j+1] - 8 * s->uvlinesize, s->uvlinesize, pq); + for (j = 0; j < 2; j++) { + v->vc1dsp.vc1_v_loop_filter8(s->dest[j + 1] - 8 * s->uvlinesize, s->uvlinesize, pq); if (s->mb_x >= 2) { - v->vc1dsp.vc1_h_loop_filter8(s->dest[j+1] - 16 * s->uvlinesize, s->uvlinesize, pq); + v->vc1dsp.vc1_h_loop_filter8(s->dest[j + 1] - 16 * s->uvlinesize, s->uvlinesize, pq); } } } v->vc1dsp.vc1_v_loop_filter16(s->dest[0] - 8 * s->linesize, s->linesize, pq); } - if (s->mb_y == s->mb_height) { + if (s->mb_y == s->end_mb_y) { if (s->mb_x) { if (s->mb_x >= 2) v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize - 16, s->linesize, pq); v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize - 8, s->linesize, pq); if (s->mb_x >= 2) { - for(j = 0; j < 2; j++) { - v->vc1dsp.vc1_h_loop_filter8(s->dest[j+1] - 8 * s->uvlinesize - 8, s->uvlinesize, pq); + for (j = 0; j < 2; j++) { + v->vc1dsp.vc1_h_loop_filter8(s->dest[j + 1] - 8 * s->uvlinesize - 8, s->uvlinesize, pq); } } } @@ -312,8 +381,8 @@ v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize, s->linesize, pq); v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16 * s->linesize + 8, s->linesize, pq); if (s->mb_x) { - for(j = 0; j < 2; j++) { - v->vc1dsp.vc1_h_loop_filter8(s->dest[j+1] - 8 * s->uvlinesize, s->uvlinesize, pq); + for (j = 0; j < 2; j++) { + v->vc1dsp.vc1_h_loop_filter8(s->dest[j + 1] - 8 * s->uvlinesize, s->uvlinesize, pq); } } } @@ -338,14 +407,14 @@ * running the V overlap. Therefore, the V overlap makes us trail by one * MB col and the H overlap filter makes us trail by one MB row. This * is reflected in the time at which we run the put_pixels loop. */ - if(v->condover == CONDOVER_ALL || v->pq >= 9 || v->over_flags_plane[mb_pos]) { - if(s->mb_x && (v->condover == CONDOVER_ALL || v->pq >= 9 || - v->over_flags_plane[mb_pos - 1])) { + if (v->condover == CONDOVER_ALL || v->pq >= 9 || v->over_flags_plane[mb_pos]) { + if (s->mb_x && (v->condover == CONDOVER_ALL || v->pq >= 9 || + v->over_flags_plane[mb_pos - 1])) { v->vc1dsp.vc1_h_s_overlap(v->block[v->left_blk_idx][1], v->block[v->cur_blk_idx][0]); v->vc1dsp.vc1_h_s_overlap(v->block[v->left_blk_idx][3], v->block[v->cur_blk_idx][2]); - if(!(s->flags & CODEC_FLAG_GRAY)) { + if (!(s->flags & CODEC_FLAG_GRAY)) { v->vc1dsp.vc1_h_s_overlap(v->block[v->left_blk_idx][4], v->block[v->cur_blk_idx][4]); v->vc1dsp.vc1_h_s_overlap(v->block[v->left_blk_idx][5], @@ -358,13 +427,13 @@ v->block[v->cur_blk_idx][3]); if (s->mb_x == s->mb_width - 1) { - if(!s->first_slice_line && (v->condover == CONDOVER_ALL || v->pq >= 9 || - v->over_flags_plane[mb_pos - s->mb_stride])) { + if (!s->first_slice_line && (v->condover == CONDOVER_ALL || v->pq >= 9 || + v->over_flags_plane[mb_pos - s->mb_stride])) { v->vc1dsp.vc1_v_s_overlap(v->block[v->top_blk_idx][2], v->block[v->cur_blk_idx][0]); v->vc1dsp.vc1_v_s_overlap(v->block[v->top_blk_idx][3], v->block[v->cur_blk_idx][1]); - if(!(s->flags & CODEC_FLAG_GRAY)) { + if (!(s->flags & CODEC_FLAG_GRAY)) { v->vc1dsp.vc1_v_s_overlap(v->block[v->top_blk_idx][4], v->block[v->cur_blk_idx][4]); v->vc1dsp.vc1_v_s_overlap(v->block[v->top_blk_idx][5], @@ -378,13 +447,13 @@ } } if (s->mb_x && (v->condover == CONDOVER_ALL || v->over_flags_plane[mb_pos - 1])) { - if(!s->first_slice_line && (v->condover == CONDOVER_ALL || v->pq >= 9 || - v->over_flags_plane[mb_pos - s->mb_stride - 1])) { + if (!s->first_slice_line && (v->condover == CONDOVER_ALL || v->pq >= 9 || + v->over_flags_plane[mb_pos - s->mb_stride - 1])) { v->vc1dsp.vc1_v_s_overlap(v->block[v->topleft_blk_idx][2], v->block[v->left_blk_idx][0]); v->vc1dsp.vc1_v_s_overlap(v->block[v->topleft_blk_idx][3], v->block[v->left_blk_idx][1]); - if(!(s->flags & CODEC_FLAG_GRAY)) { + if (!(s->flags & CODEC_FLAG_GRAY)) { v->vc1dsp.vc1_v_s_overlap(v->block[v->topleft_blk_idx][4], v->block[v->left_blk_idx][4]); v->vc1dsp.vc1_v_s_overlap(v->block[v->topleft_blk_idx][5], @@ -404,377 +473,680 @@ static void vc1_mc_1mv(VC1Context *v, int dir) { MpegEncContext *s = &v->s; - DSPContext *dsp = &v->s.dsp; + DSPContext *dsp = &v->s.dsp; uint8_t *srcY, *srcU, *srcV; int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y; - - if(!v->s.last_picture.data[0])return; + int off, off_uv; + int v_edge_pos = s->v_edge_pos >> v->field_mode; + if (!v->field_mode && !v->s.last_picture.f.data[0]) + return; mx = s->mv[dir][0][0]; my = s->mv[dir][0][1]; // store motion vectors for further use in B frames - if(s->pict_type == AV_PICTURE_TYPE_P) { - s->current_picture.motion_val[1][s->block_index[0]][0] = mx; - s->current_picture.motion_val[1][s->block_index[0]][1] = my; + if (s->pict_type == AV_PICTURE_TYPE_P) { + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0] = mx; + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1] = my; } + uvmx = (mx + ((mx & 3) == 3)) >> 1; uvmy = (my + ((my & 3) == 3)) >> 1; v->luma_mv[s->mb_x][0] = uvmx; v->luma_mv[s->mb_x][1] = uvmy; - if(v->fastuvmc) { - uvmx = uvmx + ((uvmx<0)?(uvmx&1):-(uvmx&1)); - uvmy = uvmy + ((uvmy<0)?(uvmy&1):-(uvmy&1)); - } - if(!dir) { - srcY = s->last_picture.data[0]; - srcU = s->last_picture.data[1]; - srcV = s->last_picture.data[2]; - } else { - srcY = s->next_picture.data[0]; - srcU = s->next_picture.data[1]; - srcV = s->next_picture.data[2]; + + if (v->field_mode && + v->cur_field_type != v->ref_field_type[dir]) { + my = my - 2 + 4 * v->cur_field_type; + uvmy = uvmy - 2 + 4 * v->cur_field_type; + } + + // fastuvmc shall be ignored for interlaced frame picture + if (v->fastuvmc && (v->fcm != ILACE_FRAME)) { + uvmx = uvmx + ((uvmx < 0) ? (uvmx & 1) : -(uvmx & 1)); + uvmy = uvmy + ((uvmy < 0) ? (uvmy & 1) : -(uvmy & 1)); + } + if (v->field_mode) { // interlaced field picture + if (!dir) { + if ((v->cur_field_type != v->ref_field_type[dir]) && v->cur_field_type) { + srcY = s->current_picture.f.data[0]; + srcU = s->current_picture.f.data[1]; + srcV = s->current_picture.f.data[2]; + } else { + srcY = s->last_picture.f.data[0]; + srcU = s->last_picture.f.data[1]; + srcV = s->last_picture.f.data[2]; + } + } else { + srcY = s->next_picture.f.data[0]; + srcU = s->next_picture.f.data[1]; + srcV = s->next_picture.f.data[2]; + } + } else { + if (!dir) { + srcY = s->last_picture.f.data[0]; + srcU = s->last_picture.f.data[1]; + srcV = s->last_picture.f.data[2]; + } else { + srcY = s->next_picture.f.data[0]; + srcU = s->next_picture.f.data[1]; + srcV = s->next_picture.f.data[2]; + } } - src_x = s->mb_x * 16 + (mx >> 2); - src_y = s->mb_y * 16 + (my >> 2); - uvsrc_x = s->mb_x * 8 + (uvmx >> 2); - uvsrc_y = s->mb_y * 8 + (uvmy >> 2); + src_x = s->mb_x * 16 + (mx >> 2); + src_y = s->mb_y * 16 + (my >> 2); + uvsrc_x = s->mb_x * 8 + (uvmx >> 2); + uvsrc_y = s->mb_y * 8 + (uvmy >> 2); - if(v->profile != PROFILE_ADVANCED){ + if (v->profile != PROFILE_ADVANCED) { src_x = av_clip( src_x, -16, s->mb_width * 16); src_y = av_clip( src_y, -16, s->mb_height * 16); uvsrc_x = av_clip(uvsrc_x, -8, s->mb_width * 8); uvsrc_y = av_clip(uvsrc_y, -8, s->mb_height * 8); - }else{ + } else { src_x = av_clip( src_x, -17, s->avctx->coded_width); src_y = av_clip( src_y, -18, s->avctx->coded_height + 1); uvsrc_x = av_clip(uvsrc_x, -8, s->avctx->coded_width >> 1); uvsrc_y = av_clip(uvsrc_y, -8, s->avctx->coded_height >> 1); } - srcY += src_y * s->linesize + src_x; + srcY += src_y * s->linesize + src_x; srcU += uvsrc_y * s->uvlinesize + uvsrc_x; srcV += uvsrc_y * s->uvlinesize + uvsrc_x; + if (v->field_mode && v->ref_field_type[dir]) { + srcY += s->current_picture_ptr->f.linesize[0]; + srcU += s->current_picture_ptr->f.linesize[1]; + srcV += s->current_picture_ptr->f.linesize[2]; + } + /* for grayscale we should not try to read from unknown area */ - if(s->flags & CODEC_FLAG_GRAY) { + if (s->flags & CODEC_FLAG_GRAY) { srcU = s->edge_emu_buffer + 18 * s->linesize; srcV = s->edge_emu_buffer + 18 * s->linesize; } - if(v->rangeredfrm || (v->mv_mode == MV_PMODE_INTENSITY_COMP) - || (unsigned)(src_x - s->mspel) > s->h_edge_pos - (mx&3) - 16 - s->mspel*3 - || (unsigned)(src_y - s->mspel) > s->v_edge_pos - (my&3) - 16 - s->mspel*3){ - uint8_t *uvbuf= s->edge_emu_buffer + 19 * s->linesize; + if (v->rangeredfrm || (v->mv_mode == MV_PMODE_INTENSITY_COMP) + || s->h_edge_pos < 22 || v_edge_pos < 22 + || (unsigned)(src_x - s->mspel) > s->h_edge_pos - (mx&3) - 16 - s->mspel * 3 + || (unsigned)(src_y - s->mspel) > v_edge_pos - (my&3) - 16 - s->mspel * 3) { + uint8_t *uvbuf = s->edge_emu_buffer + 19 * s->linesize; srcY -= s->mspel * (1 + s->linesize); - s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 17+s->mspel*2, 17+s->mspel*2, - src_x - s->mspel, src_y - s->mspel, s->h_edge_pos, s->v_edge_pos); + s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, + 17 + s->mspel * 2, 17 + s->mspel * 2, + src_x - s->mspel, src_y - s->mspel, + s->h_edge_pos, v_edge_pos); srcY = s->edge_emu_buffer; - s->dsp.emulated_edge_mc(uvbuf , srcU, s->uvlinesize, 8+1, 8+1, - uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1); - s->dsp.emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, 8+1, 8+1, - uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1); + s->dsp.emulated_edge_mc(uvbuf , srcU, s->uvlinesize, 8 + 1, 8 + 1, + uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, v_edge_pos >> 1); + s->dsp.emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, 8 + 1, 8 + 1, + uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, v_edge_pos >> 1); srcU = uvbuf; srcV = uvbuf + 16; /* if we deal with range reduction we need to scale source blocks */ - if(v->rangeredfrm) { + if (v->rangeredfrm) { int i, j; uint8_t *src, *src2; src = srcY; - for(j = 0; j < 17 + s->mspel*2; j++) { - for(i = 0; i < 17 + s->mspel*2; i++) src[i] = ((src[i] - 128) >> 1) + 128; + for (j = 0; j < 17 + s->mspel * 2; j++) { + for (i = 0; i < 17 + s->mspel * 2; i++) + src[i] = ((src[i] - 128) >> 1) + 128; src += s->linesize; } - src = srcU; src2 = srcV; - for(j = 0; j < 9; j++) { - for(i = 0; i < 9; i++) { - src[i] = ((src[i] - 128) >> 1) + 128; + src = srcU; + src2 = srcV; + for (j = 0; j < 9; j++) { + for (i = 0; i < 9; i++) { + src[i] = ((src[i] - 128) >> 1) + 128; src2[i] = ((src2[i] - 128) >> 1) + 128; } - src += s->uvlinesize; + src += s->uvlinesize; src2 += s->uvlinesize; } } /* if we deal with intensity compensation we need to scale source blocks */ - if(v->mv_mode == MV_PMODE_INTENSITY_COMP) { + if (v->mv_mode == MV_PMODE_INTENSITY_COMP) { int i, j; uint8_t *src, *src2; src = srcY; - for(j = 0; j < 17 + s->mspel*2; j++) { - for(i = 0; i < 17 + s->mspel*2; i++) src[i] = v->luty[src[i]]; + for (j = 0; j < 17 + s->mspel * 2; j++) { + for (i = 0; i < 17 + s->mspel * 2; i++) + src[i] = v->luty[src[i]]; src += s->linesize; } - src = srcU; src2 = srcV; - for(j = 0; j < 9; j++) { - for(i = 0; i < 9; i++) { - src[i] = v->lutuv[src[i]]; + src = srcU; + src2 = srcV; + for (j = 0; j < 9; j++) { + for (i = 0; i < 9; i++) { + src[i] = v->lutuv[src[i]]; src2[i] = v->lutuv[src2[i]]; } - src += s->uvlinesize; + src += s->uvlinesize; src2 += s->uvlinesize; } } srcY += s->mspel * (1 + s->linesize); } - if(s->mspel) { + if (v->field_mode && v->cur_field_type) { + off = s->current_picture_ptr->f.linesize[0]; + off_uv = s->current_picture_ptr->f.linesize[1]; + } else { + off = 0; + off_uv = 0; + } + if (s->mspel) { dxy = ((my & 3) << 2) | (mx & 3); - v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] , srcY , s->linesize, v->rnd); - v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8, srcY + 8, s->linesize, v->rnd); + v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + off , srcY , s->linesize, v->rnd); + v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + off + 8, srcY + 8, s->linesize, v->rnd); srcY += s->linesize * 8; - v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize , srcY , s->linesize, v->rnd); - v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize + 8, srcY + 8, s->linesize, v->rnd); + v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + off + 8 * s->linesize , srcY , s->linesize, v->rnd); + v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + off + 8 * s->linesize + 8, srcY + 8, s->linesize, v->rnd); } else { // hpel mc - always used for luma dxy = (my & 2) | ((mx & 2) >> 1); - - if(!v->rnd) - dsp->put_pixels_tab[0][dxy](s->dest[0], srcY, s->linesize, 16); + if (!v->rnd) + dsp->put_pixels_tab[0][dxy](s->dest[0] + off, srcY, s->linesize, 16); else - dsp->put_no_rnd_pixels_tab[0][dxy](s->dest[0], srcY, s->linesize, 16); + dsp->put_no_rnd_pixels_tab[0][dxy](s->dest[0] + off, srcY, s->linesize, 16); } - if(s->flags & CODEC_FLAG_GRAY) return; + if (s->flags & CODEC_FLAG_GRAY) return; /* Chroma MC always uses qpel bilinear */ - uvmx = (uvmx&3)<<1; - uvmy = (uvmy&3)<<1; - if(!v->rnd){ - dsp->put_h264_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy); - dsp->put_h264_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy); - }else{ - v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy); - v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy); + uvmx = (uvmx & 3) << 1; + uvmy = (uvmy & 3) << 1; + if (!v->rnd) { + dsp->put_h264_chroma_pixels_tab[0](s->dest[1] + off_uv, srcU, s->uvlinesize, 8, uvmx, uvmy); + dsp->put_h264_chroma_pixels_tab[0](s->dest[2] + off_uv, srcV, s->uvlinesize, 8, uvmx, uvmy); + } else { + v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1] + off_uv, srcU, s->uvlinesize, 8, uvmx, uvmy); + v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2] + off_uv, srcV, s->uvlinesize, 8, uvmx, uvmy); + } +} + +static inline int median4(int a, int b, int c, int d) +{ + if (a < b) { + if (c < d) return (FFMIN(b, d) + FFMAX(a, c)) / 2; + else return (FFMIN(b, c) + FFMAX(a, d)) / 2; + } else { + if (c < d) return (FFMIN(a, d) + FFMAX(b, c)) / 2; + else return (FFMIN(a, c) + FFMAX(b, d)) / 2; } } /** Do motion compensation for 4-MV macroblock - luminance block */ -static void vc1_mc_4mv_luma(VC1Context *v, int n) +static void vc1_mc_4mv_luma(VC1Context *v, int n, int dir) { MpegEncContext *s = &v->s; DSPContext *dsp = &v->s.dsp; uint8_t *srcY; int dxy, mx, my, src_x, src_y; int off; + int fieldmv = (v->fcm == ILACE_FRAME) ? v->blk_mv_type[s->block_index[n]] : 0; + int v_edge_pos = s->v_edge_pos >> v->field_mode; + + if (!v->field_mode && !v->s.last_picture.f.data[0]) + return; - if(!v->s.last_picture.data[0])return; - mx = s->mv[0][n][0]; - my = s->mv[0][n][1]; - srcY = s->last_picture.data[0]; + mx = s->mv[dir][n][0]; + my = s->mv[dir][n][1]; - off = s->linesize * 4 * (n&2) + (n&1) * 8; + if (!dir) { + if (v->field_mode) { + if ((v->cur_field_type != v->ref_field_type[dir]) && v->cur_field_type) + srcY = s->current_picture.f.data[0]; + else + srcY = s->last_picture.f.data[0]; + } else + srcY = s->last_picture.f.data[0]; + } else + srcY = s->next_picture.f.data[0]; - src_x = s->mb_x * 16 + (n&1) * 8 + (mx >> 2); - src_y = s->mb_y * 16 + (n&2) * 4 + (my >> 2); + if (v->field_mode) { + if (v->cur_field_type != v->ref_field_type[dir]) + my = my - 2 + 4 * v->cur_field_type; + } + + if (s->pict_type == AV_PICTURE_TYPE_P && n == 3 && v->field_mode) { + int same_count = 0, opp_count = 0, k; + int chosen_mv[2][4][2], f; + int tx, ty; + for (k = 0; k < 4; k++) { + f = v->mv_f[0][s->block_index[k] + v->blocks_off]; + chosen_mv[f][f ? opp_count : same_count][0] = s->mv[0][k][0]; + chosen_mv[f][f ? opp_count : same_count][1] = s->mv[0][k][1]; + opp_count += f; + same_count += 1 - f; + } + f = opp_count > same_count; + switch (f ? opp_count : same_count) { + case 4: + tx = median4(chosen_mv[f][0][0], chosen_mv[f][1][0], + chosen_mv[f][2][0], chosen_mv[f][3][0]); + ty = median4(chosen_mv[f][0][1], chosen_mv[f][1][1], + chosen_mv[f][2][1], chosen_mv[f][3][1]); + break; + case 3: + tx = mid_pred(chosen_mv[f][0][0], chosen_mv[f][1][0], chosen_mv[f][2][0]); + ty = mid_pred(chosen_mv[f][0][1], chosen_mv[f][1][1], chosen_mv[f][2][1]); + break; + case 2: + tx = (chosen_mv[f][0][0] + chosen_mv[f][1][0]) / 2; + ty = (chosen_mv[f][0][1] + chosen_mv[f][1][1]) / 2; + break; + } + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0] = tx; + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1] = ty; + for (k = 0; k < 4; k++) + v->mv_f[1][s->block_index[k] + v->blocks_off] = f; + } + + if (v->fcm == ILACE_FRAME) { // not sure if needed for other types of picture + int qx, qy; + int width = s->avctx->coded_width; + int height = s->avctx->coded_height >> 1; + qx = (s->mb_x * 16) + (mx >> 2); + qy = (s->mb_y * 8) + (my >> 3); + + if (qx < -17) + mx -= 4 * (qx + 17); + else if (qx > width) + mx -= 4 * (qx - width); + if (qy < -18) + my -= 8 * (qy + 18); + else if (qy > height + 1) + my -= 8 * (qy - height - 1); + } - if(v->profile != PROFILE_ADVANCED){ - src_x = av_clip( src_x, -16, s->mb_width * 16); - src_y = av_clip( src_y, -16, s->mb_height * 16); - }else{ - src_x = av_clip( src_x, -17, s->avctx->coded_width); - src_y = av_clip( src_y, -18, s->avctx->coded_height + 1); + if ((v->fcm == ILACE_FRAME) && fieldmv) + off = ((n > 1) ? s->linesize : 0) + (n & 1) * 8; + else + off = s->linesize * 4 * (n & 2) + (n & 1) * 8; + if (v->field_mode && v->cur_field_type) + off += s->current_picture_ptr->f.linesize[0]; + + src_x = s->mb_x * 16 + (n & 1) * 8 + (mx >> 2); + if (!fieldmv) + src_y = s->mb_y * 16 + (n & 2) * 4 + (my >> 2); + else + src_y = s->mb_y * 16 + ((n > 1) ? 1 : 0) + (my >> 2); + + if (v->profile != PROFILE_ADVANCED) { + src_x = av_clip(src_x, -16, s->mb_width * 16); + src_y = av_clip(src_y, -16, s->mb_height * 16); + } else { + src_x = av_clip(src_x, -17, s->avctx->coded_width); + if (v->fcm == ILACE_FRAME) { + if (src_y & 1) + src_y = av_clip(src_y, -17, s->avctx->coded_height + 1); + else + src_y = av_clip(src_y, -18, s->avctx->coded_height); + } else { + src_y = av_clip(src_y, -18, s->avctx->coded_height + 1); + } } srcY += src_y * s->linesize + src_x; + if (v->field_mode && v->ref_field_type[dir]) + srcY += s->current_picture_ptr->f.linesize[0]; - if(v->rangeredfrm || (v->mv_mode == MV_PMODE_INTENSITY_COMP) - || (unsigned)(src_x - s->mspel) > s->h_edge_pos - (mx&3) - 8 - s->mspel*2 - || (unsigned)(src_y - s->mspel) > s->v_edge_pos - (my&3) - 8 - s->mspel*2){ - srcY -= s->mspel * (1 + s->linesize); - s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 9+s->mspel*2, 9+s->mspel*2, - src_x - s->mspel, src_y - s->mspel, s->h_edge_pos, s->v_edge_pos); + if (fieldmv && !(src_y & 1)) + v_edge_pos--; + if (fieldmv && (src_y & 1) && src_y < 4) + src_y--; + if (v->rangeredfrm || (v->mv_mode == MV_PMODE_INTENSITY_COMP) + || s->h_edge_pos < 13 || v_edge_pos < 23 + || (unsigned)(src_x - s->mspel) > s->h_edge_pos - (mx & 3) - 8 - s->mspel * 2 + || (unsigned)(src_y - (s->mspel << fieldmv)) > v_edge_pos - (my & 3) - ((8 + s->mspel * 2) << fieldmv)) { + srcY -= s->mspel * (1 + (s->linesize << fieldmv)); + /* check emulate edge stride and offset */ + s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, + 9 + s->mspel * 2, (9 + s->mspel * 2) << fieldmv, + src_x - s->mspel, src_y - (s->mspel << fieldmv), + s->h_edge_pos, v_edge_pos); srcY = s->edge_emu_buffer; /* if we deal with range reduction we need to scale source blocks */ - if(v->rangeredfrm) { + if (v->rangeredfrm) { int i, j; uint8_t *src; src = srcY; - for(j = 0; j < 9 + s->mspel*2; j++) { - for(i = 0; i < 9 + s->mspel*2; i++) src[i] = ((src[i] - 128) >> 1) + 128; - src += s->linesize; + for (j = 0; j < 9 + s->mspel * 2; j++) { + for (i = 0; i < 9 + s->mspel * 2; i++) + src[i] = ((src[i] - 128) >> 1) + 128; + src += s->linesize << fieldmv; } } /* if we deal with intensity compensation we need to scale source blocks */ - if(v->mv_mode == MV_PMODE_INTENSITY_COMP) { + if (v->mv_mode == MV_PMODE_INTENSITY_COMP) { int i, j; uint8_t *src; src = srcY; - for(j = 0; j < 9 + s->mspel*2; j++) { - for(i = 0; i < 9 + s->mspel*2; i++) src[i] = v->luty[src[i]]; - src += s->linesize; + for (j = 0; j < 9 + s->mspel * 2; j++) { + for (i = 0; i < 9 + s->mspel * 2; i++) + src[i] = v->luty[src[i]]; + src += s->linesize << fieldmv; } } - srcY += s->mspel * (1 + s->linesize); + srcY += s->mspel * (1 + (s->linesize << fieldmv)); } - if(s->mspel) { + if (s->mspel) { dxy = ((my & 3) << 2) | (mx & 3); - v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + off, srcY, s->linesize, v->rnd); + v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + off, srcY, s->linesize << fieldmv, v->rnd); } else { // hpel mc - always used for luma dxy = (my & 2) | ((mx & 2) >> 1); - if(!v->rnd) + if (!v->rnd) dsp->put_pixels_tab[1][dxy](s->dest[0] + off, srcY, s->linesize, 8); else dsp->put_no_rnd_pixels_tab[1][dxy](s->dest[0] + off, srcY, s->linesize, 8); } } -static inline int median4(int a, int b, int c, int d) +static av_always_inline int get_chroma_mv(int *mvx, int *mvy, int *a, int flag, int *tx, int *ty) { - if(a < b) { - if(c < d) return (FFMIN(b, d) + FFMAX(a, c)) / 2; - else return (FFMIN(b, c) + FFMAX(a, d)) / 2; + int idx, i; + static const int count[16] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}; + + idx = ((a[3] != flag) << 3) + | ((a[2] != flag) << 2) + | ((a[1] != flag) << 1) + | (a[0] != flag); + if (!idx) { + *tx = median4(mvx[0], mvx[1], mvx[2], mvx[3]); + *ty = median4(mvy[0], mvy[1], mvy[2], mvy[3]); + return 4; + } else if (count[idx] == 1) { + switch (idx) { + case 0x1: + *tx = mid_pred(mvx[1], mvx[2], mvx[3]); + *ty = mid_pred(mvy[1], mvy[2], mvy[3]); + return 3; + case 0x2: + *tx = mid_pred(mvx[0], mvx[2], mvx[3]); + *ty = mid_pred(mvy[0], mvy[2], mvy[3]); + return 3; + case 0x4: + *tx = mid_pred(mvx[0], mvx[1], mvx[3]); + *ty = mid_pred(mvy[0], mvy[1], mvy[3]); + return 3; + case 0x8: + *tx = mid_pred(mvx[0], mvx[1], mvx[2]); + *ty = mid_pred(mvy[0], mvy[1], mvy[2]); + return 3; + } + } else if (count[idx] == 2) { + int t1 = 0, t2 = 0; + for (i = 0; i < 3; i++) + if (!a[i]) { + t1 = i; + break; + } + for (i = t1 + 1; i < 4; i++) + if (!a[i]) { + t2 = i; + break; + } + *tx = (mvx[t1] + mvx[t2]) / 2; + *ty = (mvy[t1] + mvy[t2]) / 2; + return 2; } else { - if(c < d) return (FFMIN(a, d) + FFMAX(b, c)) / 2; - else return (FFMIN(a, c) + FFMAX(b, d)) / 2; + return 0; } + return -1; } - /** Do motion compensation for 4-MV macroblock - both chroma blocks */ -static void vc1_mc_4mv_chroma(VC1Context *v) +static void vc1_mc_4mv_chroma(VC1Context *v, int dir) { MpegEncContext *s = &v->s; - DSPContext *dsp = &v->s.dsp; + DSPContext *dsp = &v->s.dsp; uint8_t *srcU, *srcV; int uvmx, uvmy, uvsrc_x, uvsrc_y; - int i, idx, tx = 0, ty = 0; - int mvx[4], mvy[4], intra[4]; - static const int count[16] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}; + int k, tx = 0, ty = 0; + int mvx[4], mvy[4], intra[4], mv_f[4]; + int valid_count; + int chroma_ref_type = v->cur_field_type, off = 0; + int v_edge_pos = s->v_edge_pos >> v->field_mode; - if(!v->s.last_picture.data[0])return; - if(s->flags & CODEC_FLAG_GRAY) return; + if (!v->field_mode && !v->s.last_picture.f.data[0]) + return; + if (s->flags & CODEC_FLAG_GRAY) + return; - for(i = 0; i < 4; i++) { - mvx[i] = s->mv[0][i][0]; - mvy[i] = s->mv[0][i][1]; - intra[i] = v->mb_type[0][s->block_index[i]]; + for (k = 0; k < 4; k++) { + mvx[k] = s->mv[dir][k][0]; + mvy[k] = s->mv[dir][k][1]; + intra[k] = v->mb_type[0][s->block_index[k]]; + if (v->field_mode) + mv_f[k] = v->mv_f[dir][s->block_index[k] + v->blocks_off]; } /* calculate chroma MV vector from four luma MVs */ - idx = (intra[3] << 3) | (intra[2] << 2) | (intra[1] << 1) | intra[0]; - if(!idx) { // all blocks are inter - tx = median4(mvx[0], mvx[1], mvx[2], mvx[3]); - ty = median4(mvy[0], mvy[1], mvy[2], mvy[3]); - } else if(count[idx] == 1) { // 3 inter blocks - switch(idx) { - case 0x1: - tx = mid_pred(mvx[1], mvx[2], mvx[3]); - ty = mid_pred(mvy[1], mvy[2], mvy[3]); - break; - case 0x2: - tx = mid_pred(mvx[0], mvx[2], mvx[3]); - ty = mid_pred(mvy[0], mvy[2], mvy[3]); - break; - case 0x4: - tx = mid_pred(mvx[0], mvx[1], mvx[3]); - ty = mid_pred(mvy[0], mvy[1], mvy[3]); - break; - case 0x8: - tx = mid_pred(mvx[0], mvx[1], mvx[2]); - ty = mid_pred(mvy[0], mvy[1], mvy[2]); - break; + if (!v->field_mode || (v->field_mode && !v->numref)) { + valid_count = get_chroma_mv(mvx, mvy, intra, 0, &tx, &ty); + if (!valid_count) { + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0] = 0; + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1] = 0; + v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0; + return; //no need to do MC for intra blocks } - } else if(count[idx] == 2) { - int t1 = 0, t2 = 0; - for(i=0; i<3;i++) if(!intra[i]) {t1 = i; break;} - for(i= t1+1; i<4; i++)if(!intra[i]) {t2 = i; break;} - tx = (mvx[t1] + mvx[t2]) / 2; - ty = (mvy[t1] + mvy[t2]) / 2; - } else { - s->current_picture.motion_val[1][s->block_index[0]][0] = 0; - s->current_picture.motion_val[1][s->block_index[0]][1] = 0; - v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0; - return; //no need to do MC for inter blocks - } + } else { + int dominant = 0; + if (mv_f[0] + mv_f[1] + mv_f[2] + mv_f[3] > 2) + dominant = 1; + valid_count = get_chroma_mv(mvx, mvy, mv_f, dominant, &tx, &ty); + if (dominant) + chroma_ref_type = !v->cur_field_type; + } + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0] = tx; + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1] = ty; + uvmx = (tx + ((tx & 3) == 3)) >> 1; + uvmy = (ty + ((ty & 3) == 3)) >> 1; - s->current_picture.motion_val[1][s->block_index[0]][0] = tx; - s->current_picture.motion_val[1][s->block_index[0]][1] = ty; - uvmx = (tx + ((tx&3) == 3)) >> 1; - uvmy = (ty + ((ty&3) == 3)) >> 1; v->luma_mv[s->mb_x][0] = uvmx; v->luma_mv[s->mb_x][1] = uvmy; - if(v->fastuvmc) { - uvmx = uvmx + ((uvmx<0)?(uvmx&1):-(uvmx&1)); - uvmy = uvmy + ((uvmy<0)?(uvmy&1):-(uvmy&1)); - } + + if (v->fastuvmc) { + uvmx = uvmx + ((uvmx < 0) ? (uvmx & 1) : -(uvmx & 1)); + uvmy = uvmy + ((uvmy < 0) ? (uvmy & 1) : -(uvmy & 1)); + } + // Field conversion bias + if (v->cur_field_type != chroma_ref_type) + uvmy += 2 - 4 * chroma_ref_type; uvsrc_x = s->mb_x * 8 + (uvmx >> 2); uvsrc_y = s->mb_y * 8 + (uvmy >> 2); - if(v->profile != PROFILE_ADVANCED){ - uvsrc_x = av_clip(uvsrc_x, -8, s->mb_width * 8); - uvsrc_y = av_clip(uvsrc_y, -8, s->mb_height * 8); - }else{ - uvsrc_x = av_clip(uvsrc_x, -8, s->avctx->coded_width >> 1); - uvsrc_y = av_clip(uvsrc_y, -8, s->avctx->coded_height >> 1); + if (v->profile != PROFILE_ADVANCED) { + uvsrc_x = av_clip(uvsrc_x, -8, s->mb_width * 8); + uvsrc_y = av_clip(uvsrc_y, -8, s->mb_height * 8); + } else { + uvsrc_x = av_clip(uvsrc_x, -8, s->avctx->coded_width >> 1); + uvsrc_y = av_clip(uvsrc_y, -8, s->avctx->coded_height >> 1); } - srcU = s->last_picture.data[1] + uvsrc_y * s->uvlinesize + uvsrc_x; - srcV = s->last_picture.data[2] + uvsrc_y * s->uvlinesize + uvsrc_x; - if(v->rangeredfrm || (v->mv_mode == MV_PMODE_INTENSITY_COMP) - || (unsigned)uvsrc_x > (s->h_edge_pos >> 1) - 9 - || (unsigned)uvsrc_y > (s->v_edge_pos >> 1) - 9){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer , srcU, s->uvlinesize, 8+1, 8+1, - uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1); - s->dsp.emulated_edge_mc(s->edge_emu_buffer + 16, srcV, s->uvlinesize, 8+1, 8+1, - uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1); + if (!dir) { + if (v->field_mode) { + if ((v->cur_field_type != chroma_ref_type) && v->cur_field_type) { + srcU = s->current_picture.f.data[1] + uvsrc_y * s->uvlinesize + uvsrc_x; + srcV = s->current_picture.f.data[2] + uvsrc_y * s->uvlinesize + uvsrc_x; + } else { + srcU = s->last_picture.f.data[1] + uvsrc_y * s->uvlinesize + uvsrc_x; + srcV = s->last_picture.f.data[2] + uvsrc_y * s->uvlinesize + uvsrc_x; + } + } else { + srcU = s->last_picture.f.data[1] + uvsrc_y * s->uvlinesize + uvsrc_x; + srcV = s->last_picture.f.data[2] + uvsrc_y * s->uvlinesize + uvsrc_x; + } + } else { + srcU = s->next_picture.f.data[1] + uvsrc_y * s->uvlinesize + uvsrc_x; + srcV = s->next_picture.f.data[2] + uvsrc_y * s->uvlinesize + uvsrc_x; + } + + if (v->field_mode) { + if (chroma_ref_type) { + srcU += s->current_picture_ptr->f.linesize[1]; + srcV += s->current_picture_ptr->f.linesize[2]; + } + off = v->cur_field_type ? s->current_picture_ptr->f.linesize[1] : 0; + } + + if (v->rangeredfrm || (v->mv_mode == MV_PMODE_INTENSITY_COMP) + || s->h_edge_pos < 18 || v_edge_pos < 18 + || (unsigned)uvsrc_x > (s->h_edge_pos >> 1) - 9 + || (unsigned)uvsrc_y > (v_edge_pos >> 1) - 9) { + s->dsp.emulated_edge_mc(s->edge_emu_buffer , srcU, s->uvlinesize, + 8 + 1, 8 + 1, uvsrc_x, uvsrc_y, + s->h_edge_pos >> 1, v_edge_pos >> 1); + s->dsp.emulated_edge_mc(s->edge_emu_buffer + 16, srcV, s->uvlinesize, + 8 + 1, 8 + 1, uvsrc_x, uvsrc_y, + s->h_edge_pos >> 1, v_edge_pos >> 1); srcU = s->edge_emu_buffer; srcV = s->edge_emu_buffer + 16; /* if we deal with range reduction we need to scale source blocks */ - if(v->rangeredfrm) { + if (v->rangeredfrm) { int i, j; uint8_t *src, *src2; - src = srcU; src2 = srcV; - for(j = 0; j < 9; j++) { - for(i = 0; i < 9; i++) { - src[i] = ((src[i] - 128) >> 1) + 128; + src = srcU; + src2 = srcV; + for (j = 0; j < 9; j++) { + for (i = 0; i < 9; i++) { + src[i] = ((src[i] - 128) >> 1) + 128; src2[i] = ((src2[i] - 128) >> 1) + 128; } - src += s->uvlinesize; + src += s->uvlinesize; src2 += s->uvlinesize; } } /* if we deal with intensity compensation we need to scale source blocks */ - if(v->mv_mode == MV_PMODE_INTENSITY_COMP) { + if (v->mv_mode == MV_PMODE_INTENSITY_COMP) { int i, j; uint8_t *src, *src2; - src = srcU; src2 = srcV; - for(j = 0; j < 9; j++) { - for(i = 0; i < 9; i++) { - src[i] = v->lutuv[src[i]]; + src = srcU; + src2 = srcV; + for (j = 0; j < 9; j++) { + for (i = 0; i < 9; i++) { + src[i] = v->lutuv[src[i]]; src2[i] = v->lutuv[src2[i]]; } - src += s->uvlinesize; + src += s->uvlinesize; src2 += s->uvlinesize; } } } /* Chroma MC always uses qpel bilinear */ - uvmx = (uvmx&3)<<1; - uvmy = (uvmy&3)<<1; - if(!v->rnd){ - dsp->put_h264_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy); - dsp->put_h264_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy); - }else{ - v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy); - v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy); + uvmx = (uvmx & 3) << 1; + uvmy = (uvmy & 3) << 1; + if (!v->rnd) { + dsp->put_h264_chroma_pixels_tab[0](s->dest[1] + off, srcU, s->uvlinesize, 8, uvmx, uvmy); + dsp->put_h264_chroma_pixels_tab[0](s->dest[2] + off, srcV, s->uvlinesize, 8, uvmx, uvmy); + } else { + v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1] + off, srcU, s->uvlinesize, 8, uvmx, uvmy); + v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2] + off, srcV, s->uvlinesize, 8, uvmx, uvmy); + } +} + +/** Do motion compensation for 4-MV field chroma macroblock (both U and V) + */ +static void vc1_mc_4mv_chroma4(VC1Context *v) +{ + MpegEncContext *s = &v->s; + DSPContext *dsp = &v->s.dsp; + uint8_t *srcU, *srcV; + int uvsrc_x, uvsrc_y; + int uvmx_field[4], uvmy_field[4]; + int i, off, tx, ty; + int fieldmv = v->blk_mv_type[s->block_index[0]]; + static const int s_rndtblfield[16] = { 0, 0, 1, 2, 4, 4, 5, 6, 2, 2, 3, 8, 6, 6, 7, 12 }; + int v_dist = fieldmv ? 1 : 4; // vertical offset for lower sub-blocks + int v_edge_pos = s->v_edge_pos >> 1; + + if (!v->s.last_picture.f.data[0]) + return; + if (s->flags & CODEC_FLAG_GRAY) + return; + + for (i = 0; i < 4; i++) { + tx = s->mv[0][i][0]; + uvmx_field[i] = (tx + ((tx & 3) == 3)) >> 1; + ty = s->mv[0][i][1]; + if (fieldmv) + uvmy_field[i] = (ty >> 4) * 8 + s_rndtblfield[ty & 0xF]; + else + uvmy_field[i] = (ty + ((ty & 3) == 3)) >> 1; + } + + for (i = 0; i < 4; i++) { + off = (i & 1) * 4 + ((i & 2) ? v_dist * s->uvlinesize : 0); + uvsrc_x = s->mb_x * 8 + (i & 1) * 4 + (uvmx_field[i] >> 2); + uvsrc_y = s->mb_y * 8 + ((i & 2) ? v_dist : 0) + (uvmy_field[i] >> 2); + // FIXME: implement proper pull-back (see vc1cropmv.c, vc1CROPMV_ChromaPullBack()) + uvsrc_x = av_clip(uvsrc_x, -8, s->avctx->coded_width >> 1); + uvsrc_y = av_clip(uvsrc_y, -8, s->avctx->coded_height >> 1); + srcU = s->last_picture.f.data[1] + uvsrc_y * s->uvlinesize + uvsrc_x; + srcV = s->last_picture.f.data[2] + uvsrc_y * s->uvlinesize + uvsrc_x; + uvmx_field[i] = (uvmx_field[i] & 3) << 1; + uvmy_field[i] = (uvmy_field[i] & 3) << 1; + + if (fieldmv && !(uvsrc_y & 1)) + v_edge_pos--; + if (fieldmv && (uvsrc_y & 1) && uvsrc_y < 2) + uvsrc_y--; + if ((v->mv_mode == MV_PMODE_INTENSITY_COMP) + || s->h_edge_pos < 10 || v_edge_pos < (5 << fieldmv) + || (unsigned)uvsrc_x > (s->h_edge_pos >> 1) - 5 + || (unsigned)uvsrc_y > v_edge_pos - (5 << fieldmv)) { + s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcU, s->uvlinesize, + 5, (5 << fieldmv), uvsrc_x, uvsrc_y, + s->h_edge_pos >> 1, v_edge_pos); + s->dsp.emulated_edge_mc(s->edge_emu_buffer + 16, srcV, s->uvlinesize, + 5, (5 << fieldmv), uvsrc_x, uvsrc_y, + s->h_edge_pos >> 1, v_edge_pos); + srcU = s->edge_emu_buffer; + srcV = s->edge_emu_buffer + 16; + + /* if we deal with intensity compensation we need to scale source blocks */ + if (v->mv_mode == MV_PMODE_INTENSITY_COMP) { + int i, j; + uint8_t *src, *src2; + + src = srcU; + src2 = srcV; + for (j = 0; j < 5; j++) { + for (i = 0; i < 5; i++) { + src[i] = v->lutuv[src[i]]; + src2[i] = v->lutuv[src2[i]]; + } + src += s->uvlinesize << 1; + src2 += s->uvlinesize << 1; + } + } + } + if (!v->rnd) { + dsp->put_h264_chroma_pixels_tab[1](s->dest[1] + off, srcU, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]); + dsp->put_h264_chroma_pixels_tab[1](s->dest[2] + off, srcV, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]); + } else { + v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[1](s->dest[1] + off, srcU, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]); + v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[1](s->dest[2] + off, srcV, s->uvlinesize << fieldmv, 4, uvmx_field[i], uvmy_field[i]); + } } } /***********************************************************************/ /** - * @defgroup vc1block VC-1 Block-level functions + * @name VC-1 Block-level functions * @see 7.1.4, p91 and 8.1.1.7, p(1)04 * @{ */ @@ -784,37 +1156,34 @@ * @brief Get macroblock-level quantizer scale */ #define GET_MQUANT() \ - if (v->dquantfrm) \ - { \ - int edges = 0; \ - if (v->dqprofile == DQPROFILE_ALL_MBS) \ - { \ - if (v->dqbilevel) \ - { \ - mquant = (get_bits1(gb)) ? v->altpq : v->pq; \ - } \ - else \ - { \ - mqdiff = get_bits(gb, 3); \ - if (mqdiff != 7) mquant = v->pq + mqdiff; \ - else mquant = get_bits(gb, 5); \ - } \ - } \ - if(v->dqprofile == DQPROFILE_SINGLE_EDGE) \ - edges = 1 << v->dqsbedge; \ - else if(v->dqprofile == DQPROFILE_DOUBLE_EDGES) \ - edges = (3 << v->dqsbedge) % 15; \ - else if(v->dqprofile == DQPROFILE_FOUR_EDGES) \ - edges = 15; \ - if((edges&1) && !s->mb_x) \ - mquant = v->altpq; \ - if((edges&2) && s->first_slice_line) \ - mquant = v->altpq; \ - if((edges&4) && s->mb_x == (s->mb_width - 1)) \ - mquant = v->altpq; \ - if((edges&8) && s->mb_y == (s->mb_height - 1)) \ - mquant = v->altpq; \ - } + if (v->dquantfrm) { \ + int edges = 0; \ + if (v->dqprofile == DQPROFILE_ALL_MBS) { \ + if (v->dqbilevel) { \ + mquant = (get_bits1(gb)) ? v->altpq : v->pq; \ + } else { \ + mqdiff = get_bits(gb, 3); \ + if (mqdiff != 7) \ + mquant = v->pq + mqdiff; \ + else \ + mquant = get_bits(gb, 5); \ + } \ + } \ + if (v->dqprofile == DQPROFILE_SINGLE_EDGE) \ + edges = 1 << v->dqsbedge; \ + else if (v->dqprofile == DQPROFILE_DOUBLE_EDGES) \ + edges = (3 << v->dqsbedge) % 15; \ + else if (v->dqprofile == DQPROFILE_FOUR_EDGES) \ + edges = 15; \ + if ((edges&1) && !s->mb_x) \ + mquant = v->altpq; \ + if ((edges&2) && s->first_slice_line) \ + mquant = v->altpq; \ + if ((edges&4) && s->mb_x == (s->mb_width - 1)) \ + mquant = v->altpq; \ + if ((edges&8) && s->mb_y == (s->mb_height - 1)) \ + mquant = v->altpq; \ + } /** * @def GET_MVDATA(_dmv_x, _dmv_y) @@ -823,96 +1192,346 @@ * @param _dmv_x Horizontal differential for decoded MV * @param _dmv_y Vertical differential for decoded MV */ -#define GET_MVDATA(_dmv_x, _dmv_y) \ - index = 1 + get_vlc2(gb, ff_vc1_mv_diff_vlc[s->mv_table_index].table,\ - VC1_MV_DIFF_VLC_BITS, 2); \ - if (index > 36) \ - { \ - mb_has_coeffs = 1; \ - index -= 37; \ - } \ - else mb_has_coeffs = 0; \ - s->mb_intra = 0; \ - if (!index) { _dmv_x = _dmv_y = 0; } \ - else if (index == 35) \ - { \ - _dmv_x = get_bits(gb, v->k_x - 1 + s->quarter_sample); \ - _dmv_y = get_bits(gb, v->k_y - 1 + s->quarter_sample); \ - } \ - else if (index == 36) \ - { \ - _dmv_x = 0; \ - _dmv_y = 0; \ - s->mb_intra = 1; \ - } \ - else \ - { \ - index1 = index%6; \ - if (!s->quarter_sample && index1 == 5) val = 1; \ - else val = 0; \ - if(size_table[index1] - val > 0) \ - val = get_bits(gb, size_table[index1] - val); \ - else val = 0; \ - sign = 0 - (val&1); \ - _dmv_x = (sign ^ ((val>>1) + offset_table[index1])) - sign; \ - \ - index1 = index/6; \ - if (!s->quarter_sample && index1 == 5) val = 1; \ - else val = 0; \ - if(size_table[index1] - val > 0) \ - val = get_bits(gb, size_table[index1] - val); \ - else val = 0; \ - sign = 0 - (val&1); \ - _dmv_y = (sign ^ ((val>>1) + offset_table[index1])) - sign; \ - } +#define GET_MVDATA(_dmv_x, _dmv_y) \ + index = 1 + get_vlc2(gb, ff_vc1_mv_diff_vlc[s->mv_table_index].table, \ + VC1_MV_DIFF_VLC_BITS, 2); \ + if (index > 36) { \ + mb_has_coeffs = 1; \ + index -= 37; \ + } else \ + mb_has_coeffs = 0; \ + s->mb_intra = 0; \ + if (!index) { \ + _dmv_x = _dmv_y = 0; \ + } else if (index == 35) { \ + _dmv_x = get_bits(gb, v->k_x - 1 + s->quarter_sample); \ + _dmv_y = get_bits(gb, v->k_y - 1 + s->quarter_sample); \ + } else if (index == 36) { \ + _dmv_x = 0; \ + _dmv_y = 0; \ + s->mb_intra = 1; \ + } else { \ + index1 = index % 6; \ + if (!s->quarter_sample && index1 == 5) val = 1; \ + else val = 0; \ + if (size_table[index1] - val > 0) \ + val = get_bits(gb, size_table[index1] - val); \ + else val = 0; \ + sign = 0 - (val&1); \ + _dmv_x = (sign ^ ((val>>1) + offset_table[index1])) - sign; \ + \ + index1 = index / 6; \ + if (!s->quarter_sample && index1 == 5) val = 1; \ + else val = 0; \ + if (size_table[index1] - val > 0) \ + val = get_bits(gb, size_table[index1] - val); \ + else val = 0; \ + sign = 0 - (val & 1); \ + _dmv_y = (sign ^ ((val >> 1) + offset_table[index1])) - sign; \ + } + +static av_always_inline void get_mvdata_interlaced(VC1Context *v, int *dmv_x, + int *dmv_y, int *pred_flag) +{ + int index, index1; + int extend_x = 0, extend_y = 0; + GetBitContext *gb = &v->s.gb; + int bits, esc; + int val, sign; + const int* offs_tab; + + if (v->numref) { + bits = VC1_2REF_MVDATA_VLC_BITS; + esc = 125; + } else { + bits = VC1_1REF_MVDATA_VLC_BITS; + esc = 71; + } + switch (v->dmvrange) { + case 1: + extend_x = 1; + break; + case 2: + extend_y = 1; + break; + case 3: + extend_x = extend_y = 1; + break; + } + index = get_vlc2(gb, v->imv_vlc->table, bits, 3); + if (index == esc) { + *dmv_x = get_bits(gb, v->k_x); + *dmv_y = get_bits(gb, v->k_y); + if (v->numref) { + *pred_flag = *dmv_y & 1; + *dmv_y = (*dmv_y + *pred_flag) >> 1; + } + } + else { + if (extend_x) + offs_tab = offset_table2; + else + offs_tab = offset_table1; + index1 = (index + 1) % 9; + if (index1 != 0) { + val = get_bits(gb, index1 + extend_x); + sign = 0 -(val & 1); + *dmv_x = (sign ^ ((val >> 1) + offs_tab[index1])) - sign; + } else + *dmv_x = 0; + if (extend_y) + offs_tab = offset_table2; + else + offs_tab = offset_table1; + index1 = (index + 1) / 9; + if (index1 > v->numref) { + val = get_bits(gb, (index1 + (extend_y << v->numref)) >> v->numref); + sign = 0 - (val & 1); + *dmv_y = (sign ^ ((val >> 1) + offs_tab[index1 >> v->numref])) - sign; + } else + *dmv_y = 0; + if (v->numref) + *pred_flag = index1 & 1; + } +} + +static av_always_inline int scaleforsame_x(VC1Context *v, int n /* MV */, int dir) +{ + int scaledvalue, refdist; + int scalesame1, scalesame2; + int scalezone1_x, zone1offset_x; + int table_index = dir ^ v->second_field; + + if (v->s.pict_type != AV_PICTURE_TYPE_B) + refdist = v->refdist; + else + refdist = dir ? v->brfd : v->frfd; + if (refdist > 3) + refdist = 3; + scalesame1 = vc1_field_mvpred_scales[table_index][1][refdist]; + scalesame2 = vc1_field_mvpred_scales[table_index][2][refdist]; + scalezone1_x = vc1_field_mvpred_scales[table_index][3][refdist]; + zone1offset_x = vc1_field_mvpred_scales[table_index][5][refdist]; + + if (FFABS(n) > 255) + scaledvalue = n; + else { + if (FFABS(n) < scalezone1_x) + scaledvalue = (n * scalesame1) >> 8; + else { + if (n < 0) + scaledvalue = ((n * scalesame2) >> 8) - zone1offset_x; + else + scaledvalue = ((n * scalesame2) >> 8) + zone1offset_x; + } + } + return av_clip(scaledvalue, -v->range_x, v->range_x - 1); +} + +static av_always_inline int scaleforsame_y(VC1Context *v, int i, int n /* MV */, int dir) +{ + int scaledvalue, refdist; + int scalesame1, scalesame2; + int scalezone1_y, zone1offset_y; + int table_index = dir ^ v->second_field; + + if (v->s.pict_type != AV_PICTURE_TYPE_B) + refdist = v->refdist; + else + refdist = dir ? v->brfd : v->frfd; + if (refdist > 3) + refdist = 3; + scalesame1 = vc1_field_mvpred_scales[table_index][1][refdist]; + scalesame2 = vc1_field_mvpred_scales[table_index][2][refdist]; + scalezone1_y = vc1_field_mvpred_scales[table_index][4][refdist]; + zone1offset_y = vc1_field_mvpred_scales[table_index][6][refdist]; + + if (FFABS(n) > 63) + scaledvalue = n; + else { + if (FFABS(n) < scalezone1_y) + scaledvalue = (n * scalesame1) >> 8; + else { + if (n < 0) + scaledvalue = ((n * scalesame2) >> 8) - zone1offset_y; + else + scaledvalue = ((n * scalesame2) >> 8) + zone1offset_y; + } + } + + if (v->cur_field_type && !v->ref_field_type[dir]) + return av_clip(scaledvalue, -v->range_y / 2 + 1, v->range_y / 2); + else + return av_clip(scaledvalue, -v->range_y / 2, v->range_y / 2 - 1); +} + +static av_always_inline int scaleforopp_x(VC1Context *v, int n /* MV */) +{ + int scalezone1_x, zone1offset_x; + int scaleopp1, scaleopp2, brfd; + int scaledvalue; + + brfd = FFMIN(v->brfd, 3); + scalezone1_x = vc1_b_field_mvpred_scales[3][brfd]; + zone1offset_x = vc1_b_field_mvpred_scales[5][brfd]; + scaleopp1 = vc1_b_field_mvpred_scales[1][brfd]; + scaleopp2 = vc1_b_field_mvpred_scales[2][brfd]; + + if (FFABS(n) > 255) + scaledvalue = n; + else { + if (FFABS(n) < scalezone1_x) + scaledvalue = (n * scaleopp1) >> 8; + else { + if (n < 0) + scaledvalue = ((n * scaleopp2) >> 8) - zone1offset_x; + else + scaledvalue = ((n * scaleopp2) >> 8) + zone1offset_x; + } + } + return av_clip(scaledvalue, -v->range_x, v->range_x - 1); +} + +static av_always_inline int scaleforopp_y(VC1Context *v, int n /* MV */, int dir) +{ + int scalezone1_y, zone1offset_y; + int scaleopp1, scaleopp2, brfd; + int scaledvalue; + + brfd = FFMIN(v->brfd, 3); + scalezone1_y = vc1_b_field_mvpred_scales[4][brfd]; + zone1offset_y = vc1_b_field_mvpred_scales[6][brfd]; + scaleopp1 = vc1_b_field_mvpred_scales[1][brfd]; + scaleopp2 = vc1_b_field_mvpred_scales[2][brfd]; + + if (FFABS(n) > 63) + scaledvalue = n; + else { + if (FFABS(n) < scalezone1_y) + scaledvalue = (n * scaleopp1) >> 8; + else { + if (n < 0) + scaledvalue = ((n * scaleopp2) >> 8) - zone1offset_y; + else + scaledvalue = ((n * scaleopp2) >> 8) + zone1offset_y; + } + } + if (v->cur_field_type && !v->ref_field_type[dir]) { + return av_clip(scaledvalue, -v->range_y / 2 + 1, v->range_y / 2); + } else { + return av_clip(scaledvalue, -v->range_y / 2, v->range_y / 2 - 1); + } +} + +static av_always_inline int scaleforsame(VC1Context *v, int i, int n /* MV */, + int dim, int dir) +{ + int brfd, scalesame; + int hpel = 1 - v->s.quarter_sample; + + n >>= hpel; + if (v->s.pict_type != AV_PICTURE_TYPE_B || v->second_field || !dir) { + if (dim) + n = scaleforsame_y(v, i, n, dir) << hpel; + else + n = scaleforsame_x(v, n, dir) << hpel; + return n; + } + brfd = FFMIN(v->brfd, 3); + scalesame = vc1_b_field_mvpred_scales[0][brfd]; + + n = (n * scalesame >> 8) << hpel; + return n; +} + +static av_always_inline int scaleforopp(VC1Context *v, int n /* MV */, + int dim, int dir) +{ + int refdist, scaleopp; + int hpel = 1 - v->s.quarter_sample; + + n >>= hpel; + if (v->s.pict_type == AV_PICTURE_TYPE_B && !v->second_field && dir == 1) { + if (dim) + n = scaleforopp_y(v, n, dir) << hpel; + else + n = scaleforopp_x(v, n) << hpel; + return n; + } + if (v->s.pict_type != AV_PICTURE_TYPE_B) + refdist = FFMIN(v->refdist, 3); + else + refdist = dir ? v->brfd : v->frfd; + scaleopp = vc1_field_mvpred_scales[dir ^ v->second_field][0][refdist]; + + n = (n * scaleopp >> 8) << hpel; + return n; +} /** Predict and set motion vector */ -static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, int mv1, int r_x, int r_y, uint8_t* is_intra) +static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, + int mv1, int r_x, int r_y, uint8_t* is_intra, + int pred_flag, int dir) { MpegEncContext *s = &v->s; int xy, wrap, off = 0; int16_t *A, *B, *C; int px, py; int sum; - + int mixedmv_pic, num_samefield = 0, num_oppfield = 0; + int opposit, a_f, b_f, c_f; + int16_t field_predA[2]; + int16_t field_predB[2]; + int16_t field_predC[2]; + int a_valid, b_valid, c_valid; + int hybridmv_thresh, y_bias = 0; + + if (v->mv_mode == MV_PMODE_MIXED_MV || + ((v->mv_mode == MV_PMODE_INTENSITY_COMP) && (v->mv_mode2 == MV_PMODE_MIXED_MV))) + mixedmv_pic = 1; + else + mixedmv_pic = 0; /* scale MV difference to be quad-pel */ dmv_x <<= 1 - s->quarter_sample; dmv_y <<= 1 - s->quarter_sample; wrap = s->b8_stride; - xy = s->block_index[n]; + xy = s->block_index[n]; - if(s->mb_intra){ - s->mv[0][n][0] = s->current_picture.motion_val[0][xy][0] = 0; - s->mv[0][n][1] = s->current_picture.motion_val[0][xy][1] = 0; - s->current_picture.motion_val[1][xy][0] = 0; - s->current_picture.motion_val[1][xy][1] = 0; - if(mv1) { /* duplicate motion data for 1-MV block */ - s->current_picture.motion_val[0][xy + 1][0] = 0; - s->current_picture.motion_val[0][xy + 1][1] = 0; - s->current_picture.motion_val[0][xy + wrap][0] = 0; - s->current_picture.motion_val[0][xy + wrap][1] = 0; - s->current_picture.motion_val[0][xy + wrap + 1][0] = 0; - s->current_picture.motion_val[0][xy + wrap + 1][1] = 0; + if (s->mb_intra) { + s->mv[0][n][0] = s->current_picture.f.motion_val[0][xy + v->blocks_off][0] = 0; + s->mv[0][n][1] = s->current_picture.f.motion_val[0][xy + v->blocks_off][1] = 0; + s->current_picture.f.motion_val[1][xy + v->blocks_off][0] = 0; + s->current_picture.f.motion_val[1][xy + v->blocks_off][1] = 0; + if (mv1) { /* duplicate motion data for 1-MV block */ + s->current_picture.f.motion_val[0][xy + 1 + v->blocks_off][0] = 0; + s->current_picture.f.motion_val[0][xy + 1 + v->blocks_off][1] = 0; + s->current_picture.f.motion_val[0][xy + wrap + v->blocks_off][0] = 0; + s->current_picture.f.motion_val[0][xy + wrap + v->blocks_off][1] = 0; + s->current_picture.f.motion_val[0][xy + wrap + 1 + v->blocks_off][0] = 0; + s->current_picture.f.motion_val[0][xy + wrap + 1 + v->blocks_off][1] = 0; v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0; - s->current_picture.motion_val[1][xy + 1][0] = 0; - s->current_picture.motion_val[1][xy + 1][1] = 0; - s->current_picture.motion_val[1][xy + wrap][0] = 0; - s->current_picture.motion_val[1][xy + wrap][1] = 0; - s->current_picture.motion_val[1][xy + wrap + 1][0] = 0; - s->current_picture.motion_val[1][xy + wrap + 1][1] = 0; + s->current_picture.f.motion_val[1][xy + 1 + v->blocks_off][0] = 0; + s->current_picture.f.motion_val[1][xy + 1 + v->blocks_off][1] = 0; + s->current_picture.f.motion_val[1][xy + wrap][0] = 0; + s->current_picture.f.motion_val[1][xy + wrap + v->blocks_off][1] = 0; + s->current_picture.f.motion_val[1][xy + wrap + 1 + v->blocks_off][0] = 0; + s->current_picture.f.motion_val[1][xy + wrap + 1 + v->blocks_off][1] = 0; } return; } - C = s->current_picture.motion_val[0][xy - 1]; - A = s->current_picture.motion_val[0][xy - wrap]; - if(mv1) - off = (s->mb_x == (s->mb_width - 1)) ? -1 : 2; - else { + C = s->current_picture.f.motion_val[dir][xy - 1 + v->blocks_off]; + A = s->current_picture.f.motion_val[dir][xy - wrap + v->blocks_off]; + if (mv1) { + if (v->field_mode && mixedmv_pic) + off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2; + else + off = (s->mb_x == (s->mb_width - 1)) ? -1 : 2; + } else { //in 4-MV mode different blocks have different B predictor position - switch(n){ + switch (n) { case 0: off = (s->mb_x > 0) ? -1 : 1; break; @@ -926,79 +1545,404 @@ off = -1; } } - B = s->current_picture.motion_val[0][xy - wrap + off]; + B = s->current_picture.f.motion_val[dir][xy - wrap + off + v->blocks_off]; - if(!s->first_slice_line || (n==2 || n==3)) { // predictor A is not out of bounds - if(s->mb_width == 1) { - px = A[0]; - py = A[1]; - } else { - px = mid_pred(A[0], B[0], C[0]); - py = mid_pred(A[1], B[1], C[1]); + a_valid = !s->first_slice_line || (n == 2 || n == 3); + b_valid = a_valid && (s->mb_width > 1); + c_valid = s->mb_x || (n == 1 || n == 3); + if (v->field_mode) { + a_valid = a_valid && !is_intra[xy - wrap]; + b_valid = b_valid && !is_intra[xy - wrap + off]; + c_valid = c_valid && !is_intra[xy - 1]; + } + + if (a_valid) { + a_f = v->mv_f[dir][xy - wrap + v->blocks_off]; + num_oppfield += a_f; + num_samefield += 1 - a_f; + field_predA[0] = A[0]; + field_predA[1] = A[1]; + } else { + field_predA[0] = field_predA[1] = 0; + a_f = 0; + } + if (b_valid) { + b_f = v->mv_f[dir][xy - wrap + off + v->blocks_off]; + num_oppfield += b_f; + num_samefield += 1 - b_f; + field_predB[0] = B[0]; + field_predB[1] = B[1]; + } else { + field_predB[0] = field_predB[1] = 0; + b_f = 0; + } + if (c_valid) { + c_f = v->mv_f[dir][xy - 1 + v->blocks_off]; + num_oppfield += c_f; + num_samefield += 1 - c_f; + field_predC[0] = C[0]; + field_predC[1] = C[1]; + } else { + field_predC[0] = field_predC[1] = 0; + c_f = 0; + } + + if (v->field_mode) { + if (num_samefield <= num_oppfield) + opposit = 1 - pred_flag; + else + opposit = pred_flag; + } else + opposit = 0; + if (opposit) { + if (a_valid && !a_f) { + field_predA[0] = scaleforopp(v, field_predA[0], 0, dir); + field_predA[1] = scaleforopp(v, field_predA[1], 1, dir); + } + if (b_valid && !b_f) { + field_predB[0] = scaleforopp(v, field_predB[0], 0, dir); + field_predB[1] = scaleforopp(v, field_predB[1], 1, dir); + } + if (c_valid && !c_f) { + field_predC[0] = scaleforopp(v, field_predC[0], 0, dir); + field_predC[1] = scaleforopp(v, field_predC[1], 1, dir); } - } else if(s->mb_x || (n==1 || n==3)) { // predictor C is not out of bounds - px = C[0]; - py = C[1]; + v->mv_f[dir][xy + v->blocks_off] = 1; + v->ref_field_type[dir] = !v->cur_field_type; } else { - px = py = 0; + if (a_valid && a_f) { + field_predA[0] = scaleforsame(v, n, field_predA[0], 0, dir); + field_predA[1] = scaleforsame(v, n, field_predA[1], 1, dir); + } + if (b_valid && b_f) { + field_predB[0] = scaleforsame(v, n, field_predB[0], 0, dir); + field_predB[1] = scaleforsame(v, n, field_predB[1], 1, dir); + } + if (c_valid && c_f) { + field_predC[0] = scaleforsame(v, n, field_predC[0], 0, dir); + field_predC[1] = scaleforsame(v, n, field_predC[1], 1, dir); + } + v->mv_f[dir][xy + v->blocks_off] = 0; + v->ref_field_type[dir] = v->cur_field_type; + } + + if (a_valid) { + px = field_predA[0]; + py = field_predA[1]; + } else if (c_valid) { + px = field_predC[0]; + py = field_predC[1]; + } else if (b_valid) { + px = field_predB[0]; + py = field_predB[1]; + } else { + px = 0; + py = 0; + } + + if (num_samefield + num_oppfield > 1) { + px = mid_pred(field_predA[0], field_predB[0], field_predC[0]); + py = mid_pred(field_predA[1], field_predB[1], field_predC[1]); } + /* Pullback MV as specified in 8.3.5.3.4 */ - { + if (!v->field_mode) { int qx, qy, X, Y; - qx = (s->mb_x << 6) + ((n==1 || n==3) ? 32 : 0); - qy = (s->mb_y << 6) + ((n==2 || n==3) ? 32 : 0); - X = (s->mb_width << 6) - 4; - Y = (s->mb_height << 6) - 4; - if(mv1) { - if(qx + px < -60) px = -60 - qx; - if(qy + py < -60) py = -60 - qy; - } else { - if(qx + px < -28) px = -28 - qx; - if(qy + py < -28) py = -28 - qy; - } - if(qx + px > X) px = X - qx; - if(qy + py > Y) py = Y - qy; - } - /* Calculate hybrid prediction as specified in 8.3.5.3.5 */ - if((!s->first_slice_line || (n==2 || n==3)) && (s->mb_x || (n==1 || n==3))) { - if(is_intra[xy - wrap]) - sum = FFABS(px) + FFABS(py); - else - sum = FFABS(px - A[0]) + FFABS(py - A[1]); - if(sum > 32) { - if(get_bits1(&s->gb)) { - px = A[0]; - py = A[1]; - } else { - px = C[0]; - py = C[1]; - } + qx = (s->mb_x << 6) + ((n == 1 || n == 3) ? 32 : 0); + qy = (s->mb_y << 6) + ((n == 2 || n == 3) ? 32 : 0); + X = (s->mb_width << 6) - 4; + Y = (s->mb_height << 6) - 4; + if (mv1) { + if (qx + px < -60) px = -60 - qx; + if (qy + py < -60) py = -60 - qy; } else { - if(is_intra[xy - 1]) + if (qx + px < -28) px = -28 - qx; + if (qy + py < -28) py = -28 - qy; + } + if (qx + px > X) px = X - qx; + if (qy + py > Y) py = Y - qy; + } + + if (!v->field_mode || s->pict_type != AV_PICTURE_TYPE_B) { + /* Calculate hybrid prediction as specified in 8.3.5.3.5 (also 10.3.5.4.3.5) */ + hybridmv_thresh = 32; + if (a_valid && c_valid) { + if (is_intra[xy - wrap]) sum = FFABS(px) + FFABS(py); else - sum = FFABS(px - C[0]) + FFABS(py - C[1]); - if(sum > 32) { - if(get_bits1(&s->gb)) { + sum = FFABS(px - field_predA[0]) + FFABS(py - field_predA[1]); + if (sum > hybridmv_thresh) { + if (get_bits1(&s->gb)) { // read HYBRIDPRED bit + px = field_predA[0]; + py = field_predA[1]; + } else { + px = field_predC[0]; + py = field_predC[1]; + } + } else { + if (is_intra[xy - 1]) + sum = FFABS(px) + FFABS(py); + else + sum = FFABS(px - field_predC[0]) + FFABS(py - field_predC[1]); + if (sum > hybridmv_thresh) { + if (get_bits1(&s->gb)) { + px = field_predA[0]; + py = field_predA[1]; + } else { + px = field_predC[0]; + py = field_predC[1]; + } + } + } + } + } + + if (v->field_mode && !s->quarter_sample) { + r_x <<= 1; + r_y <<= 1; + } + if (v->field_mode && v->numref) + r_y >>= 1; + if (v->field_mode && v->cur_field_type && v->ref_field_type[dir] == 0) + y_bias = 1; + /* store MV using signed modulus of MV range defined in 4.11 */ + s->mv[dir][n][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x; + s->mv[dir][n][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1] = ((py + dmv_y + r_y - y_bias) & ((r_y << 1) - 1)) - r_y + y_bias; + if (mv1) { /* duplicate motion data for 1-MV block */ + s->current_picture.f.motion_val[dir][xy + 1 + v->blocks_off][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0]; + s->current_picture.f.motion_val[dir][xy + 1 + v->blocks_off][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1]; + s->current_picture.f.motion_val[dir][xy + wrap + v->blocks_off][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0]; + s->current_picture.f.motion_val[dir][xy + wrap + v->blocks_off][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1]; + s->current_picture.f.motion_val[dir][xy + wrap + 1 + v->blocks_off][0] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][0]; + s->current_picture.f.motion_val[dir][xy + wrap + 1 + v->blocks_off][1] = s->current_picture.f.motion_val[dir][xy + v->blocks_off][1]; + v->mv_f[dir][xy + 1 + v->blocks_off] = v->mv_f[dir][xy + v->blocks_off]; + v->mv_f[dir][xy + wrap + v->blocks_off] = v->mv_f[dir][xy + wrap + 1 + v->blocks_off] = v->mv_f[dir][xy + v->blocks_off]; + } +} + +/** Predict and set motion vector for interlaced frame picture MBs + */ +static inline void vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, + int mvn, int r_x, int r_y, uint8_t* is_intra) +{ + MpegEncContext *s = &v->s; + int xy, wrap, off = 0; + int A[2], B[2], C[2]; + int px, py; + int a_valid = 0, b_valid = 0, c_valid = 0; + int field_a, field_b, field_c; // 0: same, 1: opposit + int total_valid, num_samefield, num_oppfield; + int pos_c, pos_b, n_adj; + + wrap = s->b8_stride; + xy = s->block_index[n]; + + if (s->mb_intra) { + s->mv[0][n][0] = s->current_picture.f.motion_val[0][xy][0] = 0; + s->mv[0][n][1] = s->current_picture.f.motion_val[0][xy][1] = 0; + s->current_picture.f.motion_val[1][xy][0] = 0; + s->current_picture.f.motion_val[1][xy][1] = 0; + if (mvn == 1) { /* duplicate motion data for 1-MV block */ + s->current_picture.f.motion_val[0][xy + 1][0] = 0; + s->current_picture.f.motion_val[0][xy + 1][1] = 0; + s->current_picture.f.motion_val[0][xy + wrap][0] = 0; + s->current_picture.f.motion_val[0][xy + wrap][1] = 0; + s->current_picture.f.motion_val[0][xy + wrap + 1][0] = 0; + s->current_picture.f.motion_val[0][xy + wrap + 1][1] = 0; + v->luma_mv[s->mb_x][0] = v->luma_mv[s->mb_x][1] = 0; + s->current_picture.f.motion_val[1][xy + 1][0] = 0; + s->current_picture.f.motion_val[1][xy + 1][1] = 0; + s->current_picture.f.motion_val[1][xy + wrap][0] = 0; + s->current_picture.f.motion_val[1][xy + wrap][1] = 0; + s->current_picture.f.motion_val[1][xy + wrap + 1][0] = 0; + s->current_picture.f.motion_val[1][xy + wrap + 1][1] = 0; + } + return; + } + + off = ((n == 0) || (n == 1)) ? 1 : -1; + /* predict A */ + if (s->mb_x || (n == 1) || (n == 3)) { + if ((v->blk_mv_type[xy]) // current block (MB) has a field MV + || (!v->blk_mv_type[xy] && !v->blk_mv_type[xy - 1])) { // or both have frame MV + A[0] = s->current_picture.f.motion_val[0][xy - 1][0]; + A[1] = s->current_picture.f.motion_val[0][xy - 1][1]; + a_valid = 1; + } else { // current block has frame mv and cand. has field MV (so average) + A[0] = (s->current_picture.f.motion_val[0][xy - 1][0] + + s->current_picture.f.motion_val[0][xy - 1 + off * wrap][0] + 1) >> 1; + A[1] = (s->current_picture.f.motion_val[0][xy - 1][1] + + s->current_picture.f.motion_val[0][xy - 1 + off * wrap][1] + 1) >> 1; + a_valid = 1; + } + if (!(n & 1) && v->is_intra[s->mb_x - 1]) { + a_valid = 0; + A[0] = A[1] = 0; + } + } else + A[0] = A[1] = 0; + /* Predict B and C */ + B[0] = B[1] = C[0] = C[1] = 0; + if (n == 0 || n == 1 || v->blk_mv_type[xy]) { + if (!s->first_slice_line) { + if (!v->is_intra[s->mb_x - s->mb_stride]) { + b_valid = 1; + n_adj = n | 2; + pos_b = s->block_index[n_adj] - 2 * wrap; + if (v->blk_mv_type[pos_b] && v->blk_mv_type[xy]) { + n_adj = (n & 2) | (n & 1); + } + B[0] = s->current_picture.f.motion_val[0][s->block_index[n_adj] - 2 * wrap][0]; + B[1] = s->current_picture.f.motion_val[0][s->block_index[n_adj] - 2 * wrap][1]; + if (v->blk_mv_type[pos_b] && !v->blk_mv_type[xy]) { + B[0] = (B[0] + s->current_picture.f.motion_val[0][s->block_index[n_adj ^ 2] - 2 * wrap][0] + 1) >> 1; + B[1] = (B[1] + s->current_picture.f.motion_val[0][s->block_index[n_adj ^ 2] - 2 * wrap][1] + 1) >> 1; + } + } + if (s->mb_width > 1) { + if (!v->is_intra[s->mb_x - s->mb_stride + 1]) { + c_valid = 1; + n_adj = 2; + pos_c = s->block_index[2] - 2 * wrap + 2; + if (v->blk_mv_type[pos_c] && v->blk_mv_type[xy]) { + n_adj = n & 2; + } + C[0] = s->current_picture.f.motion_val[0][s->block_index[n_adj] - 2 * wrap + 2][0]; + C[1] = s->current_picture.f.motion_val[0][s->block_index[n_adj] - 2 * wrap + 2][1]; + if (v->blk_mv_type[pos_c] && !v->blk_mv_type[xy]) { + C[0] = (1 + C[0] + (s->current_picture.f.motion_val[0][s->block_index[n_adj ^ 2] - 2 * wrap + 2][0])) >> 1; + C[1] = (1 + C[1] + (s->current_picture.f.motion_val[0][s->block_index[n_adj ^ 2] - 2 * wrap + 2][1])) >> 1; + } + if (s->mb_x == s->mb_width - 1) { + if (!v->is_intra[s->mb_x - s->mb_stride - 1]) { + c_valid = 1; + n_adj = 3; + pos_c = s->block_index[3] - 2 * wrap - 2; + if (v->blk_mv_type[pos_c] && v->blk_mv_type[xy]) { + n_adj = n | 1; + } + C[0] = s->current_picture.f.motion_val[0][s->block_index[n_adj] - 2 * wrap - 2][0]; + C[1] = s->current_picture.f.motion_val[0][s->block_index[n_adj] - 2 * wrap - 2][1]; + if (v->blk_mv_type[pos_c] && !v->blk_mv_type[xy]) { + C[0] = (1 + C[0] + s->current_picture.f.motion_val[0][s->block_index[1] - 2 * wrap - 2][0]) >> 1; + C[1] = (1 + C[1] + s->current_picture.f.motion_val[0][s->block_index[1] - 2 * wrap - 2][1]) >> 1; + } + } else + c_valid = 0; + } + } + } + } + } else { + pos_b = s->block_index[1]; + b_valid = 1; + B[0] = s->current_picture.f.motion_val[0][pos_b][0]; + B[1] = s->current_picture.f.motion_val[0][pos_b][1]; + pos_c = s->block_index[0]; + c_valid = 1; + C[0] = s->current_picture.f.motion_val[0][pos_c][0]; + C[1] = s->current_picture.f.motion_val[0][pos_c][1]; + } + + total_valid = a_valid + b_valid + c_valid; + // check if predictor A is out of bounds + if (!s->mb_x && !(n == 1 || n == 3)) { + A[0] = A[1] = 0; + } + // check if predictor B is out of bounds + if ((s->first_slice_line && v->blk_mv_type[xy]) || (s->first_slice_line && !(n & 2))) { + B[0] = B[1] = C[0] = C[1] = 0; + } + if (!v->blk_mv_type[xy]) { + if (s->mb_width == 1) { + px = B[0]; + py = B[1]; + } else { + if (total_valid >= 2) { + px = mid_pred(A[0], B[0], C[0]); + py = mid_pred(A[1], B[1], C[1]); + } else if (total_valid) { + if (a_valid) { px = A[0]; py = A[1]; } + if (b_valid) { px = B[0]; py = B[1]; } + if (c_valid) { px = C[0]; py = C[1]; } + } else + px = py = 0; + } + } else { + if (a_valid) + field_a = (A[1] & 4) ? 1 : 0; + else + field_a = 0; + if (b_valid) + field_b = (B[1] & 4) ? 1 : 0; + else + field_b = 0; + if (c_valid) + field_c = (C[1] & 4) ? 1 : 0; + else + field_c = 0; + + num_oppfield = field_a + field_b + field_c; + num_samefield = total_valid - num_oppfield; + if (total_valid == 3) { + if ((num_samefield == 3) || (num_oppfield == 3)) { + px = mid_pred(A[0], B[0], C[0]); + py = mid_pred(A[1], B[1], C[1]); + } else if (num_samefield >= num_oppfield) { + /* take one MV from same field set depending on priority + the check for B may not be necessary */ + px = !field_a ? A[0] : B[0]; + py = !field_a ? A[1] : B[1]; + } else { + px = field_a ? A[0] : B[0]; + py = field_a ? A[1] : B[1]; + } + } else if (total_valid == 2) { + if (num_samefield >= num_oppfield) { + if (!field_a && a_valid) { + px = A[0]; + py = A[1]; + } else if (!field_b && b_valid) { + px = B[0]; + py = B[1]; + } else if (c_valid) { + px = C[0]; + py = C[1]; + } else px = py = 0; + } else { + if (field_a && a_valid) { px = A[0]; py = A[1]; - } else { + } else if (field_b && b_valid) { + px = B[0]; + py = B[1]; + } else if (c_valid) { px = C[0]; py = C[1]; } } - } + } else if (total_valid == 1) { + px = (a_valid) ? A[0] : ((b_valid) ? B[0] : C[0]); + py = (a_valid) ? A[1] : ((b_valid) ? B[1] : C[1]); + } else + px = py = 0; } + /* store MV using signed modulus of MV range defined in 4.11 */ - s->mv[0][n][0] = s->current_picture.motion_val[0][xy][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x; - s->mv[0][n][1] = s->current_picture.motion_val[0][xy][1] = ((py + dmv_y + r_y) & ((r_y << 1) - 1)) - r_y; - if(mv1) { /* duplicate motion data for 1-MV block */ - s->current_picture.motion_val[0][xy + 1][0] = s->current_picture.motion_val[0][xy][0]; - s->current_picture.motion_val[0][xy + 1][1] = s->current_picture.motion_val[0][xy][1]; - s->current_picture.motion_val[0][xy + wrap][0] = s->current_picture.motion_val[0][xy][0]; - s->current_picture.motion_val[0][xy + wrap][1] = s->current_picture.motion_val[0][xy][1]; - s->current_picture.motion_val[0][xy + wrap + 1][0] = s->current_picture.motion_val[0][xy][0]; - s->current_picture.motion_val[0][xy + wrap + 1][1] = s->current_picture.motion_val[0][xy][1]; + s->mv[0][n][0] = s->current_picture.f.motion_val[0][xy][0] = ((px + dmv_x + r_x) & ((r_x << 1) - 1)) - r_x; + s->mv[0][n][1] = s->current_picture.f.motion_val[0][xy][1] = ((py + dmv_y + r_y) & ((r_y << 1) - 1)) - r_y; + if (mvn == 1) { /* duplicate motion data for 1-MV block */ + s->current_picture.f.motion_val[0][xy + 1 ][0] = s->current_picture.f.motion_val[0][xy][0]; + s->current_picture.f.motion_val[0][xy + 1 ][1] = s->current_picture.f.motion_val[0][xy][1]; + s->current_picture.f.motion_val[0][xy + wrap ][0] = s->current_picture.f.motion_val[0][xy][0]; + s->current_picture.f.motion_val[0][xy + wrap ][1] = s->current_picture.f.motion_val[0][xy][1]; + s->current_picture.f.motion_val[0][xy + wrap + 1][0] = s->current_picture.f.motion_val[0][xy][0]; + s->current_picture.f.motion_val[0][xy + wrap + 1][1] = s->current_picture.f.motion_val[0][xy][1]; + } else if (mvn == 2) { /* duplicate motion data for 2-Field MV block */ + s->current_picture.f.motion_val[0][xy + 1][0] = s->current_picture.f.motion_val[0][xy][0]; + s->current_picture.f.motion_val[0][xy + 1][1] = s->current_picture.f.motion_val[0][xy][1]; + s->mv[0][n + 1][0] = s->mv[0][n][0]; + s->mv[0][n + 1][1] = s->mv[0][n][1]; } } @@ -1010,112 +1954,138 @@ DSPContext *dsp = &v->s.dsp; uint8_t *srcY, *srcU, *srcV; int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y; + int off, off_uv; + int v_edge_pos = s->v_edge_pos >> v->field_mode; - if(!v->s.next_picture.data[0])return; + if (!v->field_mode && !v->s.next_picture.f.data[0]) + return; - mx = s->mv[1][0][0]; - my = s->mv[1][0][1]; + mx = s->mv[1][0][0]; + my = s->mv[1][0][1]; uvmx = (mx + ((mx & 3) == 3)) >> 1; uvmy = (my + ((my & 3) == 3)) >> 1; - if(v->fastuvmc) { - uvmx = uvmx + ((uvmx<0)?-(uvmx&1):(uvmx&1)); - uvmy = uvmy + ((uvmy<0)?-(uvmy&1):(uvmy&1)); - } - srcY = s->next_picture.data[0]; - srcU = s->next_picture.data[1]; - srcV = s->next_picture.data[2]; - - src_x = s->mb_x * 16 + (mx >> 2); - src_y = s->mb_y * 16 + (my >> 2); - uvsrc_x = s->mb_x * 8 + (uvmx >> 2); - uvsrc_y = s->mb_y * 8 + (uvmy >> 2); + if (v->field_mode) { + if (v->cur_field_type != v->ref_field_type[1]) + my = my - 2 + 4 * v->cur_field_type; + uvmy = uvmy - 2 + 4 * v->cur_field_type; + } + if (v->fastuvmc) { + uvmx = uvmx + ((uvmx < 0) ? -(uvmx & 1) : (uvmx & 1)); + uvmy = uvmy + ((uvmy < 0) ? -(uvmy & 1) : (uvmy & 1)); + } + srcY = s->next_picture.f.data[0]; + srcU = s->next_picture.f.data[1]; + srcV = s->next_picture.f.data[2]; + + src_x = s->mb_x * 16 + (mx >> 2); + src_y = s->mb_y * 16 + (my >> 2); + uvsrc_x = s->mb_x * 8 + (uvmx >> 2); + uvsrc_y = s->mb_y * 8 + (uvmy >> 2); - if(v->profile != PROFILE_ADVANCED){ + if (v->profile != PROFILE_ADVANCED) { src_x = av_clip( src_x, -16, s->mb_width * 16); src_y = av_clip( src_y, -16, s->mb_height * 16); uvsrc_x = av_clip(uvsrc_x, -8, s->mb_width * 8); uvsrc_y = av_clip(uvsrc_y, -8, s->mb_height * 8); - }else{ + } else { src_x = av_clip( src_x, -17, s->avctx->coded_width); src_y = av_clip( src_y, -18, s->avctx->coded_height + 1); uvsrc_x = av_clip(uvsrc_x, -8, s->avctx->coded_width >> 1); uvsrc_y = av_clip(uvsrc_y, -8, s->avctx->coded_height >> 1); } - srcY += src_y * s->linesize + src_x; + srcY += src_y * s->linesize + src_x; srcU += uvsrc_y * s->uvlinesize + uvsrc_x; srcV += uvsrc_y * s->uvlinesize + uvsrc_x; + if (v->field_mode && v->ref_field_type[1]) { + srcY += s->current_picture_ptr->f.linesize[0]; + srcU += s->current_picture_ptr->f.linesize[1]; + srcV += s->current_picture_ptr->f.linesize[2]; + } + /* for grayscale we should not try to read from unknown area */ - if(s->flags & CODEC_FLAG_GRAY) { + if (s->flags & CODEC_FLAG_GRAY) { srcU = s->edge_emu_buffer + 18 * s->linesize; srcV = s->edge_emu_buffer + 18 * s->linesize; } - if(v->rangeredfrm - || (unsigned)(src_x - s->mspel) > s->h_edge_pos - (mx&3) - 16 - s->mspel*3 - || (unsigned)(src_y - s->mspel) > s->v_edge_pos - (my&3) - 16 - s->mspel*3){ - uint8_t *uvbuf= s->edge_emu_buffer + 19 * s->linesize; + if (v->rangeredfrm || s->h_edge_pos < 22 || v_edge_pos < 22 + || (unsigned)(src_x - s->mspel) > s->h_edge_pos - (mx & 3) - 16 - s->mspel * 3 + || (unsigned)(src_y - s->mspel) > v_edge_pos - (my & 3) - 16 - s->mspel * 3) { + uint8_t *uvbuf = s->edge_emu_buffer + 19 * s->linesize; srcY -= s->mspel * (1 + s->linesize); - s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 17+s->mspel*2, 17+s->mspel*2, - src_x - s->mspel, src_y - s->mspel, s->h_edge_pos, s->v_edge_pos); + s->dsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, + 17 + s->mspel * 2, 17 + s->mspel * 2, + src_x - s->mspel, src_y - s->mspel, + s->h_edge_pos, v_edge_pos); srcY = s->edge_emu_buffer; - s->dsp.emulated_edge_mc(uvbuf , srcU, s->uvlinesize, 8+1, 8+1, - uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1); - s->dsp.emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, 8+1, 8+1, - uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, s->v_edge_pos >> 1); + s->dsp.emulated_edge_mc(uvbuf , srcU, s->uvlinesize, 8 + 1, 8 + 1, + uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, v_edge_pos >> 1); + s->dsp.emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, 8 + 1, 8 + 1, + uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, v_edge_pos >> 1); srcU = uvbuf; srcV = uvbuf + 16; /* if we deal with range reduction we need to scale source blocks */ - if(v->rangeredfrm) { + if (v->rangeredfrm) { int i, j; uint8_t *src, *src2; src = srcY; - for(j = 0; j < 17 + s->mspel*2; j++) { - for(i = 0; i < 17 + s->mspel*2; i++) src[i] = ((src[i] - 128) >> 1) + 128; + for (j = 0; j < 17 + s->mspel * 2; j++) { + for (i = 0; i < 17 + s->mspel * 2; i++) + src[i] = ((src[i] - 128) >> 1) + 128; src += s->linesize; } - src = srcU; src2 = srcV; - for(j = 0; j < 9; j++) { - for(i = 0; i < 9; i++) { - src[i] = ((src[i] - 128) >> 1) + 128; + src = srcU; + src2 = srcV; + for (j = 0; j < 9; j++) { + for (i = 0; i < 9; i++) { + src[i] = ((src[i] - 128) >> 1) + 128; src2[i] = ((src2[i] - 128) >> 1) + 128; } - src += s->uvlinesize; + src += s->uvlinesize; src2 += s->uvlinesize; } } srcY += s->mspel * (1 + s->linesize); } - if(s->mspel) { + if (v->field_mode && v->cur_field_type) { + off = s->current_picture_ptr->f.linesize[0]; + off_uv = s->current_picture_ptr->f.linesize[1]; + } else { + off = 0; + off_uv = 0; + } + + if (s->mspel) { dxy = ((my & 3) << 2) | (mx & 3); - v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] , srcY , s->linesize, v->rnd); - v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8, srcY + 8, s->linesize, v->rnd); + v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + off , srcY , s->linesize, v->rnd); + v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + off + 8, srcY + 8, s->linesize, v->rnd); srcY += s->linesize * 8; - v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize , srcY , s->linesize, v->rnd); - v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize + 8, srcY + 8, s->linesize, v->rnd); + v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + off + 8 * s->linesize , srcY , s->linesize, v->rnd); + v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + off + 8 * s->linesize + 8, srcY + 8, s->linesize, v->rnd); } else { // hpel mc dxy = (my & 2) | ((mx & 2) >> 1); - if(!v->rnd) - dsp->avg_pixels_tab[0][dxy](s->dest[0], srcY, s->linesize, 16); + if (!v->rnd) + dsp->avg_pixels_tab[0][dxy](s->dest[0] + off, srcY, s->linesize, 16); else - dsp->avg_no_rnd_pixels_tab[0][dxy](s->dest[0], srcY, s->linesize, 16); + dsp->avg_no_rnd_pixels_tab[0][dxy](s->dest[0] + off, srcY, s->linesize, 16); } - if(s->flags & CODEC_FLAG_GRAY) return; + if (s->flags & CODEC_FLAG_GRAY) return; /* Chroma MC always uses qpel blilinear */ - uvmx = (uvmx&3)<<1; - uvmy = (uvmy&3)<<1; - if(!v->rnd){ - dsp->avg_h264_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy); - dsp->avg_h264_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy); - }else{ - v->vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy); - v->vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy); + uvmx = (uvmx & 3) << 1; + uvmy = (uvmy & 3) << 1; + if (!v->rnd) { + dsp->avg_h264_chroma_pixels_tab[0](s->dest[1] + off_uv, srcU, s->uvlinesize, 8, uvmx, uvmy); + dsp->avg_h264_chroma_pixels_tab[0](s->dest[2] + off_uv, srcV, s->uvlinesize, 8, uvmx, uvmy); + } else { + v->vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1] + off_uv, srcU, s->uvlinesize, 8, uvmx, uvmy); + v->vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2] + off_uv, srcV, s->uvlinesize, 8, uvmx, uvmy); } } @@ -1124,47 +2094,67 @@ int n = bfrac; #if B_FRACTION_DEN==256 - if(inv) + if (inv) n -= 256; - if(!qs) + if (!qs) return 2 * ((value * n + 255) >> 9); return (value * n + 128) >> 8; #else - if(inv) + if (inv) n -= B_FRACTION_DEN; - if(!qs) + if (!qs) return 2 * ((value * n + B_FRACTION_DEN - 1) / (2 * B_FRACTION_DEN)); return (value * n + B_FRACTION_DEN/2) / B_FRACTION_DEN; #endif } +static av_always_inline int scale_mv_intfi(int value, int bfrac, int inv, + int qs, int qs_last) +{ + int n = bfrac; + + if (inv) + n -= 256; + n <<= !qs_last; + if (!qs) + return (value * n + 255) >> 9; + else + return (value * n + 128) >> 8; +} + /** Reconstruct motion vector for B-frame and do motion compensation */ -static inline void vc1_b_mc(VC1Context *v, int dmv_x[2], int dmv_y[2], int direct, int mode) +static inline void vc1_b_mc(VC1Context *v, int dmv_x[2], int dmv_y[2], + int direct, int mode) { - if(v->use_ic) { + if (v->use_ic) { v->mv_mode2 = v->mv_mode; - v->mv_mode = MV_PMODE_INTENSITY_COMP; + v->mv_mode = MV_PMODE_INTENSITY_COMP; } - if(direct) { + if (direct) { vc1_mc_1mv(v, 0); vc1_interp_mc(v); - if(v->use_ic) v->mv_mode = v->mv_mode2; + if (v->use_ic) + v->mv_mode = v->mv_mode2; return; } - if(mode == BMV_TYPE_INTERPOLATED) { + if (mode == BMV_TYPE_INTERPOLATED) { vc1_mc_1mv(v, 0); vc1_interp_mc(v); - if(v->use_ic) v->mv_mode = v->mv_mode2; + if (v->use_ic) + v->mv_mode = v->mv_mode2; return; } - if(v->use_ic && (mode == BMV_TYPE_BACKWARD)) v->mv_mode = v->mv_mode2; + if (v->use_ic && (mode == BMV_TYPE_BACKWARD)) + v->mv_mode = v->mv_mode2; vc1_mc_1mv(v, (mode == BMV_TYPE_BACKWARD)); - if(v->use_ic) v->mv_mode = v->mv_mode2; + if (v->use_ic) + v->mv_mode = v->mv_mode2; } -static inline void vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2], int direct, int mvtype) +static inline void vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2], + int direct, int mvtype) { MpegEncContext *s = &v->s; int xy, wrap, off = 0; @@ -1185,47 +2175,49 @@ wrap = s->b8_stride; xy = s->block_index[0]; - if(s->mb_intra) { - s->current_picture.motion_val[0][xy][0] = - s->current_picture.motion_val[0][xy][1] = - s->current_picture.motion_val[1][xy][0] = - s->current_picture.motion_val[1][xy][1] = 0; + if (s->mb_intra) { + s->current_picture.f.motion_val[0][xy + v->blocks_off][0] = + s->current_picture.f.motion_val[0][xy + v->blocks_off][1] = + s->current_picture.f.motion_val[1][xy + v->blocks_off][0] = + s->current_picture.f.motion_val[1][xy + v->blocks_off][1] = 0; return; } - s->mv[0][0][0] = scale_mv(s->next_picture.motion_val[1][xy][0], v->bfraction, 0, s->quarter_sample); - s->mv[0][0][1] = scale_mv(s->next_picture.motion_val[1][xy][1], v->bfraction, 0, s->quarter_sample); - s->mv[1][0][0] = scale_mv(s->next_picture.motion_val[1][xy][0], v->bfraction, 1, s->quarter_sample); - s->mv[1][0][1] = scale_mv(s->next_picture.motion_val[1][xy][1], v->bfraction, 1, s->quarter_sample); - - /* Pullback predicted motion vectors as specified in 8.4.5.4 */ - s->mv[0][0][0] = av_clip(s->mv[0][0][0], -60 - (s->mb_x << 6), (s->mb_width << 6) - 4 - (s->mb_x << 6)); - s->mv[0][0][1] = av_clip(s->mv[0][0][1], -60 - (s->mb_y << 6), (s->mb_height << 6) - 4 - (s->mb_y << 6)); - s->mv[1][0][0] = av_clip(s->mv[1][0][0], -60 - (s->mb_x << 6), (s->mb_width << 6) - 4 - (s->mb_x << 6)); - s->mv[1][0][1] = av_clip(s->mv[1][0][1], -60 - (s->mb_y << 6), (s->mb_height << 6) - 4 - (s->mb_y << 6)); - if(direct) { - s->current_picture.motion_val[0][xy][0] = s->mv[0][0][0]; - s->current_picture.motion_val[0][xy][1] = s->mv[0][0][1]; - s->current_picture.motion_val[1][xy][0] = s->mv[1][0][0]; - s->current_picture.motion_val[1][xy][1] = s->mv[1][0][1]; + if (!v->field_mode) { + s->mv[0][0][0] = scale_mv(s->next_picture.f.motion_val[1][xy][0], v->bfraction, 0, s->quarter_sample); + s->mv[0][0][1] = scale_mv(s->next_picture.f.motion_val[1][xy][1], v->bfraction, 0, s->quarter_sample); + s->mv[1][0][0] = scale_mv(s->next_picture.f.motion_val[1][xy][0], v->bfraction, 1, s->quarter_sample); + s->mv[1][0][1] = scale_mv(s->next_picture.f.motion_val[1][xy][1], v->bfraction, 1, s->quarter_sample); + + /* Pullback predicted motion vectors as specified in 8.4.5.4 */ + s->mv[0][0][0] = av_clip(s->mv[0][0][0], -60 - (s->mb_x << 6), (s->mb_width << 6) - 4 - (s->mb_x << 6)); + s->mv[0][0][1] = av_clip(s->mv[0][0][1], -60 - (s->mb_y << 6), (s->mb_height << 6) - 4 - (s->mb_y << 6)); + s->mv[1][0][0] = av_clip(s->mv[1][0][0], -60 - (s->mb_x << 6), (s->mb_width << 6) - 4 - (s->mb_x << 6)); + s->mv[1][0][1] = av_clip(s->mv[1][0][1], -60 - (s->mb_y << 6), (s->mb_height << 6) - 4 - (s->mb_y << 6)); + } + if (direct) { + s->current_picture.f.motion_val[0][xy + v->blocks_off][0] = s->mv[0][0][0]; + s->current_picture.f.motion_val[0][xy + v->blocks_off][1] = s->mv[0][0][1]; + s->current_picture.f.motion_val[1][xy + v->blocks_off][0] = s->mv[1][0][0]; + s->current_picture.f.motion_val[1][xy + v->blocks_off][1] = s->mv[1][0][1]; return; } - if((mvtype == BMV_TYPE_FORWARD) || (mvtype == BMV_TYPE_INTERPOLATED)) { - C = s->current_picture.motion_val[0][xy - 2]; - A = s->current_picture.motion_val[0][xy - wrap*2]; + if ((mvtype == BMV_TYPE_FORWARD) || (mvtype == BMV_TYPE_INTERPOLATED)) { + C = s->current_picture.f.motion_val[0][xy - 2]; + A = s->current_picture.f.motion_val[0][xy - wrap * 2]; off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2; - B = s->current_picture.motion_val[0][xy - wrap*2 + off]; + B = s->current_picture.f.motion_val[0][xy - wrap * 2 + off]; - if(!s->mb_x) C[0] = C[1] = 0; - if(!s->first_slice_line) { // predictor A is not out of bounds - if(s->mb_width == 1) { + if (!s->mb_x) C[0] = C[1] = 0; + if (!s->first_slice_line) { // predictor A is not out of bounds + if (s->mb_width == 1) { px = A[0]; py = A[1]; } else { px = mid_pred(A[0], B[0], C[0]); py = mid_pred(A[1], B[1], C[1]); } - } else if(s->mb_x) { // predictor C is not out of bounds + } else if (s->mb_x) { // predictor C is not out of bounds px = C[0]; py = C[1]; } else { @@ -1234,34 +2226,34 @@ /* Pullback MV as specified in 8.3.5.3.4 */ { int qx, qy, X, Y; - if(v->profile < PROFILE_ADVANCED) { + if (v->profile < PROFILE_ADVANCED) { qx = (s->mb_x << 5); qy = (s->mb_y << 5); - X = (s->mb_width << 5) - 4; - Y = (s->mb_height << 5) - 4; - if(qx + px < -28) px = -28 - qx; - if(qy + py < -28) py = -28 - qy; - if(qx + px > X) px = X - qx; - if(qy + py > Y) py = Y - qy; + X = (s->mb_width << 5) - 4; + Y = (s->mb_height << 5) - 4; + if (qx + px < -28) px = -28 - qx; + if (qy + py < -28) py = -28 - qy; + if (qx + px > X) px = X - qx; + if (qy + py > Y) py = Y - qy; } else { qx = (s->mb_x << 6); qy = (s->mb_y << 6); - X = (s->mb_width << 6) - 4; - Y = (s->mb_height << 6) - 4; - if(qx + px < -60) px = -60 - qx; - if(qy + py < -60) py = -60 - qy; - if(qx + px > X) px = X - qx; - if(qy + py > Y) py = Y - qy; + X = (s->mb_width << 6) - 4; + Y = (s->mb_height << 6) - 4; + if (qx + px < -60) px = -60 - qx; + if (qy + py < -60) py = -60 - qy; + if (qx + px > X) px = X - qx; + if (qy + py > Y) py = Y - qy; } } /* Calculate hybrid prediction as specified in 8.3.5.3.5 */ - if(0 && !s->first_slice_line && s->mb_x) { - if(is_intra[xy - wrap]) + if (0 && !s->first_slice_line && s->mb_x) { + if (is_intra[xy - wrap]) sum = FFABS(px) + FFABS(py); else sum = FFABS(px - A[0]) + FFABS(py - A[1]); - if(sum > 32) { - if(get_bits1(&s->gb)) { + if (sum > 32) { + if (get_bits1(&s->gb)) { px = A[0]; py = A[1]; } else { @@ -1269,12 +2261,12 @@ py = C[1]; } } else { - if(is_intra[xy - 2]) + if (is_intra[xy - 2]) sum = FFABS(px) + FFABS(py); else sum = FFABS(px - C[0]) + FFABS(py - C[1]); - if(sum > 32) { - if(get_bits1(&s->gb)) { + if (sum > 32) { + if (get_bits1(&s->gb)) { px = A[0]; py = A[1]; } else { @@ -1288,22 +2280,23 @@ s->mv[0][0][0] = ((px + dmv_x[0] + r_x) & ((r_x << 1) - 1)) - r_x; s->mv[0][0][1] = ((py + dmv_y[0] + r_y) & ((r_y << 1) - 1)) - r_y; } - if((mvtype == BMV_TYPE_BACKWARD) || (mvtype == BMV_TYPE_INTERPOLATED)) { - C = s->current_picture.motion_val[1][xy - 2]; - A = s->current_picture.motion_val[1][xy - wrap*2]; + if ((mvtype == BMV_TYPE_BACKWARD) || (mvtype == BMV_TYPE_INTERPOLATED)) { + C = s->current_picture.f.motion_val[1][xy - 2]; + A = s->current_picture.f.motion_val[1][xy - wrap * 2]; off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2; - B = s->current_picture.motion_val[1][xy - wrap*2 + off]; + B = s->current_picture.f.motion_val[1][xy - wrap * 2 + off]; - if(!s->mb_x) C[0] = C[1] = 0; - if(!s->first_slice_line) { // predictor A is not out of bounds - if(s->mb_width == 1) { + if (!s->mb_x) + C[0] = C[1] = 0; + if (!s->first_slice_line) { // predictor A is not out of bounds + if (s->mb_width == 1) { px = A[0]; py = A[1]; } else { px = mid_pred(A[0], B[0], C[0]); py = mid_pred(A[1], B[1], C[1]); } - } else if(s->mb_x) { // predictor C is not out of bounds + } else if (s->mb_x) { // predictor C is not out of bounds px = C[0]; py = C[1]; } else { @@ -1312,34 +2305,34 @@ /* Pullback MV as specified in 8.3.5.3.4 */ { int qx, qy, X, Y; - if(v->profile < PROFILE_ADVANCED) { + if (v->profile < PROFILE_ADVANCED) { qx = (s->mb_x << 5); qy = (s->mb_y << 5); - X = (s->mb_width << 5) - 4; - Y = (s->mb_height << 5) - 4; - if(qx + px < -28) px = -28 - qx; - if(qy + py < -28) py = -28 - qy; - if(qx + px > X) px = X - qx; - if(qy + py > Y) py = Y - qy; + X = (s->mb_width << 5) - 4; + Y = (s->mb_height << 5) - 4; + if (qx + px < -28) px = -28 - qx; + if (qy + py < -28) py = -28 - qy; + if (qx + px > X) px = X - qx; + if (qy + py > Y) py = Y - qy; } else { qx = (s->mb_x << 6); qy = (s->mb_y << 6); - X = (s->mb_width << 6) - 4; - Y = (s->mb_height << 6) - 4; - if(qx + px < -60) px = -60 - qx; - if(qy + py < -60) py = -60 - qy; - if(qx + px > X) px = X - qx; - if(qy + py > Y) py = Y - qy; + X = (s->mb_width << 6) - 4; + Y = (s->mb_height << 6) - 4; + if (qx + px < -60) px = -60 - qx; + if (qy + py < -60) py = -60 - qy; + if (qx + px > X) px = X - qx; + if (qy + py > Y) py = Y - qy; } } /* Calculate hybrid prediction as specified in 8.3.5.3.5 */ - if(0 && !s->first_slice_line && s->mb_x) { - if(is_intra[xy - wrap]) + if (0 && !s->first_slice_line && s->mb_x) { + if (is_intra[xy - wrap]) sum = FFABS(px) + FFABS(py); else sum = FFABS(px - A[0]) + FFABS(py - A[1]); - if(sum > 32) { - if(get_bits1(&s->gb)) { + if (sum > 32) { + if (get_bits1(&s->gb)) { px = A[0]; py = A[1]; } else { @@ -1347,12 +2340,12 @@ py = C[1]; } } else { - if(is_intra[xy - 2]) + if (is_intra[xy - 2]) sum = FFABS(px) + FFABS(py); else sum = FFABS(px - C[0]) + FFABS(py - C[1]); - if(sum > 32) { - if(get_bits1(&s->gb)) { + if (sum > 32) { + if (get_bits1(&s->gb)) { px = A[0]; py = A[1]; } else { @@ -1367,10 +2360,67 @@ s->mv[1][0][0] = ((px + dmv_x[1] + r_x) & ((r_x << 1) - 1)) - r_x; s->mv[1][0][1] = ((py + dmv_y[1] + r_y) & ((r_y << 1) - 1)) - r_y; } - s->current_picture.motion_val[0][xy][0] = s->mv[0][0][0]; - s->current_picture.motion_val[0][xy][1] = s->mv[0][0][1]; - s->current_picture.motion_val[1][xy][0] = s->mv[1][0][0]; - s->current_picture.motion_val[1][xy][1] = s->mv[1][0][1]; + s->current_picture.f.motion_val[0][xy][0] = s->mv[0][0][0]; + s->current_picture.f.motion_val[0][xy][1] = s->mv[0][0][1]; + s->current_picture.f.motion_val[1][xy][0] = s->mv[1][0][0]; + s->current_picture.f.motion_val[1][xy][1] = s->mv[1][0][1]; +} + +static inline void vc1_pred_b_mv_intfi(VC1Context *v, int n, int *dmv_x, int *dmv_y, int mv1, int *pred_flag) +{ + int dir = (v->bmvtype == BMV_TYPE_BACKWARD) ? 1 : 0; + MpegEncContext *s = &v->s; + int mb_pos = s->mb_x + s->mb_y * s->mb_stride; + + if (v->bmvtype == BMV_TYPE_DIRECT) { + int total_opp, k, f; + if (s->next_picture.f.mb_type[mb_pos + v->mb_off] != MB_TYPE_INTRA) { + s->mv[0][0][0] = scale_mv_intfi(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0], + v->bfraction, 0, s->quarter_sample, v->qs_last); + s->mv[0][0][1] = scale_mv_intfi(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1], + v->bfraction, 0, s->quarter_sample, v->qs_last); + s->mv[1][0][0] = scale_mv_intfi(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0], + v->bfraction, 1, s->quarter_sample, v->qs_last); + s->mv[1][0][1] = scale_mv_intfi(s->next_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1], + v->bfraction, 1, s->quarter_sample, v->qs_last); + + total_opp = v->mv_f_next[0][s->block_index[0] + v->blocks_off] + + v->mv_f_next[0][s->block_index[1] + v->blocks_off] + + v->mv_f_next[0][s->block_index[2] + v->blocks_off] + + v->mv_f_next[0][s->block_index[3] + v->blocks_off]; + f = (total_opp > 2) ? 1 : 0; + } else { + s->mv[0][0][0] = s->mv[0][0][1] = 0; + s->mv[1][0][0] = s->mv[1][0][1] = 0; + f = 0; + } + v->ref_field_type[0] = v->ref_field_type[1] = v->cur_field_type ^ f; + for (k = 0; k < 4; k++) { + s->current_picture.f.motion_val[0][s->block_index[k] + v->blocks_off][0] = s->mv[0][0][0]; + s->current_picture.f.motion_val[0][s->block_index[k] + v->blocks_off][1] = s->mv[0][0][1]; + s->current_picture.f.motion_val[1][s->block_index[k] + v->blocks_off][0] = s->mv[1][0][0]; + s->current_picture.f.motion_val[1][s->block_index[k] + v->blocks_off][1] = s->mv[1][0][1]; + v->mv_f[0][s->block_index[k] + v->blocks_off] = f; + v->mv_f[1][s->block_index[k] + v->blocks_off] = f; + } + return; + } + if (v->bmvtype == BMV_TYPE_INTERPOLATED) { + vc1_pred_mv(v, 0, dmv_x[0], dmv_y[0], 1, v->range_x, v->range_y, v->mb_type[0], pred_flag[0], 0); + vc1_pred_mv(v, 0, dmv_x[1], dmv_y[1], 1, v->range_x, v->range_y, v->mb_type[0], pred_flag[1], 1); + return; + } + if (dir) { // backward + vc1_pred_mv(v, n, dmv_x[1], dmv_y[1], mv1, v->range_x, v->range_y, v->mb_type[0], pred_flag[1], 1); + if (n == 3 || mv1) { + vc1_pred_mv(v, 0, dmv_x[0], dmv_y[0], 1, v->range_x, v->range_y, v->mb_type[0], 0, 0); + } + } else { // forward + vc1_pred_mv(v, n, dmv_x[0], dmv_y[0], mv1, v->range_x, v->range_y, v->mb_type[0], pred_flag[0], 0); + if (n == 3 || mv1) { + vc1_pred_mv(v, 0, dmv_x[1], dmv_y[1], 1, v->range_x, v->range_y, v->mb_type[0], 0, 1); + } + } } /** Get predicted DC value for I-frames only @@ -1383,23 +2433,23 @@ * @param dir_ptr Prediction direction for use in AC prediction */ static inline int vc1_i_pred_dc(MpegEncContext *s, int overlap, int pq, int n, - int16_t **dc_val_ptr, int *dir_ptr) + int16_t **dc_val_ptr, int *dir_ptr) { int a, b, c, wrap, pred, scale; int16_t *dc_val; static const uint16_t dcpred[32] = { - -1, 1024, 512, 341, 256, 205, 171, 146, 128, - 114, 102, 93, 85, 79, 73, 68, 64, - 60, 57, 54, 51, 49, 47, 45, 43, - 41, 39, 38, 37, 35, 34, 33 + -1, 1024, 512, 341, 256, 205, 171, 146, 128, + 114, 102, 93, 85, 79, 73, 68, 64, + 60, 57, 54, 51, 49, 47, 45, 43, + 41, 39, 38, 37, 35, 34, 33 }; /* find prediction - wmv3_dc_scale always used here in fact */ - if (n < 4) scale = s->y_dc_scale; - else scale = s->c_dc_scale; + if (n < 4) scale = s->y_dc_scale; + else scale = s->c_dc_scale; - wrap = s->block_wrap[n]; - dc_val= s->dc_val[0] + s->block_index[n]; + wrap = s->block_wrap[n]; + dc_val = s->dc_val[0] + s->block_index[n]; /* B A * C X @@ -1408,25 +2458,26 @@ b = dc_val[ - 1 - wrap]; a = dc_val[ - wrap]; - if (pq < 9 || !overlap) - { + if (pq < 9 || !overlap) { /* Set outer values */ - if (s->first_slice_line && (n!=2 && n!=3)) b=a=dcpred[scale]; - if (s->mb_x == 0 && (n!=1 && n!=3)) b=c=dcpred[scale]; - } - else - { + if (s->first_slice_line && (n != 2 && n != 3)) + b = a = dcpred[scale]; + if (s->mb_x == 0 && (n != 1 && n != 3)) + b = c = dcpred[scale]; + } else { /* Set outer values */ - if (s->first_slice_line && (n!=2 && n!=3)) b=a=0; - if (s->mb_x == 0 && (n!=1 && n!=3)) b=c=0; + if (s->first_slice_line && (n != 2 && n != 3)) + b = a = 0; + if (s->mb_x == 0 && (n != 1 && n != 3)) + b = c = 0; } if (abs(a - b) <= abs(b - c)) { - pred = c; - *dir_ptr = 1;//left + pred = c; + *dir_ptr = 1; // left } else { - pred = a; - *dir_ptr = 0;//top + pred = a; + *dir_ptr = 0; // top } /* update predictor */ @@ -1456,7 +2507,7 @@ int q1, q2 = 0; wrap = s->block_wrap[n]; - dc_val= s->dc_val[0] + s->block_index[n]; + dc_val = s->dc_val[0] + s->block_index[n]; /* B A * C X @@ -1465,43 +2516,45 @@ b = dc_val[ - 1 - wrap]; a = dc_val[ - wrap]; /* scale predictors if needed */ - q1 = s->current_picture.qscale_table[mb_pos]; - if(c_avail && (n!= 1 && n!=3)) { - q2 = s->current_picture.qscale_table[mb_pos - 1]; - if(q2 && q2 != q1) + q1 = s->current_picture.f.qscale_table[mb_pos]; + if (c_avail && (n != 1 && n != 3)) { + q2 = s->current_picture.f.qscale_table[mb_pos - 1]; + if (q2 && q2 != q1) c = (c * s->y_dc_scale_table[q2] * ff_vc1_dqscale[s->y_dc_scale_table[q1] - 1] + 0x20000) >> 18; } - if(a_avail && (n!= 2 && n!=3)) { - q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride]; - if(q2 && q2 != q1) + if (a_avail && (n != 2 && n != 3)) { + q2 = s->current_picture.f.qscale_table[mb_pos - s->mb_stride]; + if (q2 && q2 != q1) a = (a * s->y_dc_scale_table[q2] * ff_vc1_dqscale[s->y_dc_scale_table[q1] - 1] + 0x20000) >> 18; } - if(a_avail && c_avail && (n!=3)) { + if (a_avail && c_avail && (n != 3)) { int off = mb_pos; - if(n != 1) off--; - if(n != 2) off -= s->mb_stride; - q2 = s->current_picture.qscale_table[off]; - if(q2 && q2 != q1) + if (n != 1) + off--; + if (n != 2) + off -= s->mb_stride; + q2 = s->current_picture.f.qscale_table[off]; + if (q2 && q2 != q1) b = (b * s->y_dc_scale_table[q2] * ff_vc1_dqscale[s->y_dc_scale_table[q1] - 1] + 0x20000) >> 18; } - if(a_avail && c_avail) { - if(abs(a - b) <= abs(b - c)) { - pred = c; - *dir_ptr = 1;//left + if (a_avail && c_avail) { + if (abs(a - b) <= abs(b - c)) { + pred = c; + *dir_ptr = 1; // left } else { - pred = a; - *dir_ptr = 0;//top + pred = a; + *dir_ptr = 0; // top } - } else if(a_avail) { - pred = a; - *dir_ptr = 0;//top - } else if(c_avail) { - pred = c; - *dir_ptr = 1;//left + } else if (a_avail) { + pred = a; + *dir_ptr = 0; // top + } else if (c_avail) { + pred = c; + *dir_ptr = 1; // left } else { - pred = 0; - *dir_ptr = 1;//left + pred = 0; + *dir_ptr = 1; // left } /* update predictor */ @@ -1512,16 +2565,17 @@ /** @} */ // Block group /** - * @defgroup vc1_std_mb VC1 Macroblock-level functions in Simple/Main Profiles + * @name VC1 Macroblock-level functions in Simple/Main Profiles * @see 7.1.4, p91 and 8.1.1.7, p(1)04 * @{ */ -static inline int vc1_coded_block_pred(MpegEncContext * s, int n, uint8_t **coded_block_ptr) +static inline int vc1_coded_block_pred(MpegEncContext * s, int n, + uint8_t **coded_block_ptr) { int xy, wrap, pred, a, b, c; - xy = s->block_index[n]; + xy = s->block_index[n]; wrap = s->b8_stride; /* B C @@ -1552,61 +2606,62 @@ * @param codingset set of VLC to decode data * @see 8.1.3.4 */ -static void vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, int *value, int codingset) +static void vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, + int *value, int codingset) { GetBitContext *gb = &v->s.gb; int index, escape, run = 0, level = 0, lst = 0; index = get_vlc2(gb, ff_vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3); if (index != vc1_ac_sizes[codingset] - 1) { - run = vc1_index_decode_table[codingset][index][0]; + run = vc1_index_decode_table[codingset][index][0]; level = vc1_index_decode_table[codingset][index][1]; - lst = index >= vc1_last_decode_table[codingset] || get_bits_left(gb) < 0; - if(get_bits1(gb)) + lst = index >= vc1_last_decode_table[codingset] || get_bits_left(gb) < 0; + if (get_bits1(gb)) level = -level; } else { escape = decode210(gb); if (escape != 2) { index = get_vlc2(gb, ff_vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3); - run = vc1_index_decode_table[codingset][index][0]; + run = vc1_index_decode_table[codingset][index][0]; level = vc1_index_decode_table[codingset][index][1]; - lst = index >= vc1_last_decode_table[codingset]; - if(escape == 0) { - if(lst) + lst = index >= vc1_last_decode_table[codingset]; + if (escape == 0) { + if (lst) level += vc1_last_delta_level_table[codingset][run]; else level += vc1_delta_level_table[codingset][run]; } else { - if(lst) + if (lst) run += vc1_last_delta_run_table[codingset][level] + 1; else run += vc1_delta_run_table[codingset][level] + 1; } - if(get_bits1(gb)) + if (get_bits1(gb)) level = -level; } else { int sign; lst = get_bits1(gb); - if(v->s.esc3_level_length == 0) { - if(v->pq < 8 || v->dquantfrm) { // table 59 + if (v->s.esc3_level_length == 0) { + if (v->pq < 8 || v->dquantfrm) { // table 59 v->s.esc3_level_length = get_bits(gb, 3); - if(!v->s.esc3_level_length) + if (!v->s.esc3_level_length) v->s.esc3_level_length = get_bits(gb, 2) + 8; - } else { //table 60 + } else { // table 60 v->s.esc3_level_length = get_unary(gb, 1, 6) + 2; } v->s.esc3_run_length = 3 + get_bits(gb, 2); } - run = get_bits(gb, v->s.esc3_run_length); - sign = get_bits1(gb); + run = get_bits(gb, v->s.esc3_run_length); + sign = get_bits1(gb); level = get_bits(gb, v->s.esc3_level_length); - if(sign) + if (sign) level = -level; } } - *last = lst; - *skip = run; + *last = lst; + *skip = run; *value = level; } @@ -1617,7 +2672,8 @@ * @param coded are AC coeffs present or not * @param codingset set of VLC to decode data */ -static int vc1_decode_i_block(VC1Context *v, DCTELEM block[64], int n, int coded, int codingset) +static int vc1_decode_i_block(VC1Context *v, DCTELEM block[64], int n, + int coded, int codingset) { GetBitContext *gb = &v->s.gb; MpegEncContext *s = &v->s; @@ -1633,25 +2689,21 @@ } else { dcdiff = get_vlc2(&s->gb, ff_msmp4_dc_chroma_vlc[s->dc_table_index].table, DC_VLC_BITS, 3); } - if (dcdiff < 0){ + if (dcdiff < 0) { av_log(s->avctx, AV_LOG_ERROR, "Illegal DC VLC\n"); return -1; } - if (dcdiff) - { - if (dcdiff == 119 /* ESC index value */) - { + if (dcdiff) { + if (dcdiff == 119 /* ESC index value */) { /* TODO: Optimize */ - if (v->pq == 1) dcdiff = get_bits(gb, 10); + if (v->pq == 1) dcdiff = get_bits(gb, 10); else if (v->pq == 2) dcdiff = get_bits(gb, 9); - else dcdiff = get_bits(gb, 8); - } - else - { + else dcdiff = get_bits(gb, 8); + } else { if (v->pq == 1) - dcdiff = (dcdiff<<2) + get_bits(gb, 2) - 3; + dcdiff = (dcdiff << 2) + get_bits(gb, 2) - 3; else if (v->pq == 2) - dcdiff = (dcdiff<<1) + get_bits1(gb) - 1; + dcdiff = (dcdiff << 1) + get_bits1(gb) - 1; } if (get_bits1(gb)) dcdiff = -dcdiff; @@ -1672,7 +2724,7 @@ goto not_coded; } - //AC Decoding + // AC Decoding i = 1; { @@ -1683,87 +2735,87 @@ scale = v->pq * 2 + v->halfpq; - if(v->s.ac_pred) { - if(!dc_pred_dir) + if (v->s.ac_pred) { + if (!dc_pred_dir) zz_table = v->zz_8x8[2]; else zz_table = v->zz_8x8[3]; } else zz_table = v->zz_8x8[1]; - ac_val = s->ac_val[0][0] + s->block_index[n] * 16; + ac_val = s->ac_val[0][0] + s->block_index[n] * 16; ac_val2 = ac_val; - if(dc_pred_dir) //left + if (dc_pred_dir) // left ac_val -= 16; - else //top + else // top ac_val -= 16 * s->block_wrap[n]; while (!last) { vc1_decode_ac_coeff(v, &last, &skip, &value, codingset); i += skip; - if(i > 63) + if (i > 63) break; block[zz_table[i++]] = value; } /* apply AC prediction if needed */ - if(s->ac_pred) { - if(dc_pred_dir) { //left - for(k = 1; k < 8; k++) + if (s->ac_pred) { + if (dc_pred_dir) { // left + for (k = 1; k < 8; k++) block[k << v->left_blk_sh] += ac_val[k]; - } else { //top - for(k = 1; k < 8; k++) + } else { // top + for (k = 1; k < 8; k++) block[k << v->top_blk_sh] += ac_val[k + 8]; } } /* save AC coeffs for further prediction */ - for(k = 1; k < 8; k++) { + for (k = 1; k < 8; k++) { ac_val2[k] = block[k << v->left_blk_sh]; ac_val2[k + 8] = block[k << v->top_blk_sh]; } /* scale AC coeffs */ - for(k = 1; k < 64; k++) - if(block[k]) { + for (k = 1; k < 64; k++) + if (block[k]) { block[k] *= scale; - if(!v->pquantizer) + if (!v->pquantizer) block[k] += (block[k] < 0) ? -v->pq : v->pq; } - if(s->ac_pred) i = 63; + if (s->ac_pred) i = 63; } not_coded: - if(!coded) { + if (!coded) { int k, scale; - ac_val = s->ac_val[0][0] + s->block_index[n] * 16; + ac_val = s->ac_val[0][0] + s->block_index[n] * 16; ac_val2 = ac_val; i = 0; scale = v->pq * 2 + v->halfpq; memset(ac_val2, 0, 16 * 2); - if(dc_pred_dir) {//left + if (dc_pred_dir) { // left ac_val -= 16; - if(s->ac_pred) + if (s->ac_pred) memcpy(ac_val2, ac_val, 8 * 2); - } else {//top + } else { // top ac_val -= 16 * s->block_wrap[n]; - if(s->ac_pred) + if (s->ac_pred) memcpy(ac_val2 + 8, ac_val + 8, 8 * 2); } /* apply AC prediction if needed */ - if(s->ac_pred) { - if(dc_pred_dir) { //left - for(k = 1; k < 8; k++) { + if (s->ac_pred) { + if (dc_pred_dir) { //left + for (k = 1; k < 8; k++) { block[k << v->left_blk_sh] = ac_val[k] * scale; - if(!v->pquantizer && block[k << v->left_blk_sh]) + if (!v->pquantizer && block[k << v->left_blk_sh]) block[k << v->left_blk_sh] += (block[k << v->left_blk_sh] < 0) ? -v->pq : v->pq; } - } else { //top - for(k = 1; k < 8; k++) { + } else { // top + for (k = 1; k < 8; k++) { block[k << v->top_blk_sh] = ac_val[k + 8] * scale; - if(!v->pquantizer && block[k << v->top_blk_sh]) + if (!v->pquantizer && block[k << v->top_blk_sh]) block[k << v->top_blk_sh] += (block[k << v->top_blk_sh] < 0) ? -v->pq : v->pq; } } @@ -1783,7 +2835,8 @@ * @param codingset set of VLC to decode data * @param mquant quantizer value for this macroblock */ -static int vc1_decode_i_block_adv(VC1Context *v, DCTELEM block[64], int n, int coded, int codingset, int mquant) +static int vc1_decode_i_block_adv(VC1Context *v, DCTELEM block[64], int n, + int coded, int codingset, int mquant) { GetBitContext *gb = &v->s.gb; MpegEncContext *s = &v->s; @@ -1804,25 +2857,21 @@ } else { dcdiff = get_vlc2(&s->gb, ff_msmp4_dc_chroma_vlc[s->dc_table_index].table, DC_VLC_BITS, 3); } - if (dcdiff < 0){ + if (dcdiff < 0) { av_log(s->avctx, AV_LOG_ERROR, "Illegal DC VLC\n"); return -1; } - if (dcdiff) - { - if (dcdiff == 119 /* ESC index value */) - { + if (dcdiff) { + if (dcdiff == 119 /* ESC index value */) { /* TODO: Optimize */ - if (mquant == 1) dcdiff = get_bits(gb, 10); + if (mquant == 1) dcdiff = get_bits(gb, 10); else if (mquant == 2) dcdiff = get_bits(gb, 9); - else dcdiff = get_bits(gb, 8); - } - else - { + else dcdiff = get_bits(gb, 8); + } else { if (mquant == 1) - dcdiff = (dcdiff<<2) + get_bits(gb, 2) - 3; + dcdiff = (dcdiff << 2) + get_bits(gb, 2) - 3; else if (mquant == 2) - dcdiff = (dcdiff<<1) + get_bits1(gb) - 1; + dcdiff = (dcdiff << 1) + get_bits1(gb) - 1; } if (get_bits1(gb)) dcdiff = -dcdiff; @@ -1843,122 +2892,136 @@ i = 1; /* check if AC is needed at all */ - if(!a_avail && !c_avail) use_pred = 0; - ac_val = s->ac_val[0][0] + s->block_index[n] * 16; + if (!a_avail && !c_avail) + use_pred = 0; + ac_val = s->ac_val[0][0] + s->block_index[n] * 16; ac_val2 = ac_val; scale = mquant * 2 + ((mquant == v->pq) ? v->halfpq : 0); - if(dc_pred_dir) //left + if (dc_pred_dir) // left ac_val -= 16; - else //top + else // top ac_val -= 16 * s->block_wrap[n]; - q1 = s->current_picture.qscale_table[mb_pos]; - if(dc_pred_dir && c_avail && mb_pos) q2 = s->current_picture.qscale_table[mb_pos - 1]; - if(!dc_pred_dir && a_avail && mb_pos >= s->mb_stride) q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride]; - if(dc_pred_dir && n==1) q2 = q1; - if(!dc_pred_dir && n==2) q2 = q1; - if(n==3) q2 = q1; + q1 = s->current_picture.f.qscale_table[mb_pos]; + if ( dc_pred_dir && c_avail && mb_pos) + q2 = s->current_picture.f.qscale_table[mb_pos - 1]; + if (!dc_pred_dir && a_avail && mb_pos >= s->mb_stride) + q2 = s->current_picture.f.qscale_table[mb_pos - s->mb_stride]; + if ( dc_pred_dir && n == 1) + q2 = q1; + if (!dc_pred_dir && n == 2) + q2 = q1; + if (n == 3) + q2 = q1; - if(coded) { + if (coded) { int last = 0, skip, value; const uint8_t *zz_table; int k; - if(v->s.ac_pred) { - if(!dc_pred_dir) - zz_table = v->zz_8x8[2]; + if (v->s.ac_pred) { + if (!use_pred && v->fcm == ILACE_FRAME) { + zz_table = v->zzi_8x8; + } else { + if (!dc_pred_dir) // top + zz_table = v->zz_8x8[2]; + else // left + zz_table = v->zz_8x8[3]; + } + } else { + if (v->fcm != ILACE_FRAME) + zz_table = v->zz_8x8[1]; else - zz_table = v->zz_8x8[3]; - } else - zz_table = v->zz_8x8[1]; + zz_table = v->zzi_8x8; + } while (!last) { vc1_decode_ac_coeff(v, &last, &skip, &value, codingset); i += skip; - if(i > 63) + if (i > 63) break; block[zz_table[i++]] = value; } /* apply AC prediction if needed */ - if(use_pred) { + if (use_pred) { /* scale predictors if needed*/ - if(q2 && q1!=q2) { + if (q2 && q1 != q2) { q1 = q1 * 2 + ((q1 == v->pq) ? v->halfpq : 0) - 1; q2 = q2 * 2 + ((q2 == v->pq) ? v->halfpq : 0) - 1; - if(dc_pred_dir) { //left - for(k = 1; k < 8; k++) + if (dc_pred_dir) { // left + for (k = 1; k < 8; k++) block[k << v->left_blk_sh] += (ac_val[k] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18; - } else { //top - for(k = 1; k < 8; k++) + } else { // top + for (k = 1; k < 8; k++) block[k << v->top_blk_sh] += (ac_val[k + 8] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18; } } else { - if(dc_pred_dir) { //left - for(k = 1; k < 8; k++) + if (dc_pred_dir) { //left + for (k = 1; k < 8; k++) block[k << v->left_blk_sh] += ac_val[k]; } else { //top - for(k = 1; k < 8; k++) + for (k = 1; k < 8; k++) block[k << v->top_blk_sh] += ac_val[k + 8]; } } } /* save AC coeffs for further prediction */ - for(k = 1; k < 8; k++) { + for (k = 1; k < 8; k++) { ac_val2[k ] = block[k << v->left_blk_sh]; ac_val2[k + 8] = block[k << v->top_blk_sh]; } /* scale AC coeffs */ - for(k = 1; k < 64; k++) - if(block[k]) { + for (k = 1; k < 64; k++) + if (block[k]) { block[k] *= scale; - if(!v->pquantizer) + if (!v->pquantizer) block[k] += (block[k] < 0) ? -mquant : mquant; } - if(use_pred) i = 63; + if (use_pred) i = 63; } else { // no AC coeffs int k; memset(ac_val2, 0, 16 * 2); - if(dc_pred_dir) {//left - if(use_pred) { + if (dc_pred_dir) { // left + if (use_pred) { memcpy(ac_val2, ac_val, 8 * 2); - if(q2 && q1!=q2) { + if (q2 && q1 != q2) { q1 = q1 * 2 + ((q1 == v->pq) ? v->halfpq : 0) - 1; q2 = q2 * 2 + ((q2 == v->pq) ? v->halfpq : 0) - 1; - for(k = 1; k < 8; k++) + for (k = 1; k < 8; k++) ac_val2[k] = (ac_val2[k] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18; } } - } else {//top - if(use_pred) { + } else { // top + if (use_pred) { memcpy(ac_val2 + 8, ac_val + 8, 8 * 2); - if(q2 && q1!=q2) { + if (q2 && q1 != q2) { q1 = q1 * 2 + ((q1 == v->pq) ? v->halfpq : 0) - 1; q2 = q2 * 2 + ((q2 == v->pq) ? v->halfpq : 0) - 1; - for(k = 1; k < 8; k++) + for (k = 1; k < 8; k++) ac_val2[k + 8] = (ac_val2[k + 8] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18; } } } /* apply AC prediction if needed */ - if(use_pred) { - if(dc_pred_dir) { //left - for(k = 1; k < 8; k++) { + if (use_pred) { + if (dc_pred_dir) { // left + for (k = 1; k < 8; k++) { block[k << v->left_blk_sh] = ac_val2[k] * scale; - if(!v->pquantizer && block[k << v->left_blk_sh]) + if (!v->pquantizer && block[k << v->left_blk_sh]) block[k << v->left_blk_sh] += (block[k << v->left_blk_sh] < 0) ? -mquant : mquant; } - } else { //top - for(k = 1; k < 8; k++) { + } else { // top + for (k = 1; k < 8; k++) { block[k << v->top_blk_sh] = ac_val2[k + 8] * scale; - if(!v->pquantizer && block[k << v->top_blk_sh]) + if (!v->pquantizer && block[k << v->top_blk_sh]) block[k << v->top_blk_sh] += (block[k << v->top_blk_sh] < 0) ? -mquant : mquant; } } @@ -1978,7 +3041,8 @@ * @param mquant block quantizer * @param codingset set of VLC to decode data */ -static int vc1_decode_intra_block(VC1Context *v, DCTELEM block[64], int n, int coded, int mquant, int codingset) +static int vc1_decode_intra_block(VC1Context *v, DCTELEM block[64], int n, + int coded, int mquant, int codingset) { GetBitContext *gb = &v->s.gb; MpegEncContext *s = &v->s; @@ -1996,7 +3060,7 @@ s->dsp.clear_block(block); /* XXX: Guard against dumb values of mquant */ - mquant = (mquant < 1) ? 0 : ( (mquant>31) ? 31 : mquant ); + mquant = (mquant < 1) ? 0 : ((mquant > 31) ? 31 : mquant); /* Set DC scale - y and c use the same */ s->y_dc_scale = s->y_dc_scale_table[mquant]; @@ -2008,25 +3072,21 @@ } else { dcdiff = get_vlc2(&s->gb, ff_msmp4_dc_chroma_vlc[s->dc_table_index].table, DC_VLC_BITS, 3); } - if (dcdiff < 0){ + if (dcdiff < 0) { av_log(s->avctx, AV_LOG_ERROR, "Illegal DC VLC\n"); return -1; } - if (dcdiff) - { - if (dcdiff == 119 /* ESC index value */) - { + if (dcdiff) { + if (dcdiff == 119 /* ESC index value */) { /* TODO: Optimize */ - if (mquant == 1) dcdiff = get_bits(gb, 10); + if (mquant == 1) dcdiff = get_bits(gb, 10); else if (mquant == 2) dcdiff = get_bits(gb, 9); - else dcdiff = get_bits(gb, 8); - } - else - { + else dcdiff = get_bits(gb, 8); + } else { if (mquant == 1) - dcdiff = (dcdiff<<2) + get_bits(gb, 2) - 3; + dcdiff = (dcdiff << 2) + get_bits(gb, 2) - 3; else if (mquant == 2) - dcdiff = (dcdiff<<1) + get_bits1(gb) - 1; + dcdiff = (dcdiff << 1) + get_bits1(gb) - 1; } if (get_bits1(gb)) dcdiff = -dcdiff; @@ -2048,115 +3108,130 @@ i = 1; /* check if AC is needed at all and adjust direction if needed */ - if(!a_avail) dc_pred_dir = 1; - if(!c_avail) dc_pred_dir = 0; - if(!a_avail && !c_avail) use_pred = 0; + if (!a_avail) dc_pred_dir = 1; + if (!c_avail) dc_pred_dir = 0; + if (!a_avail && !c_avail) use_pred = 0; ac_val = s->ac_val[0][0] + s->block_index[n] * 16; ac_val2 = ac_val; scale = mquant * 2 + v->halfpq; - if(dc_pred_dir) //left + if (dc_pred_dir) //left ac_val -= 16; else //top ac_val -= 16 * s->block_wrap[n]; - q1 = s->current_picture.qscale_table[mb_pos]; - if(dc_pred_dir && c_avail && mb_pos) q2 = s->current_picture.qscale_table[mb_pos - 1]; - if(!dc_pred_dir && a_avail && mb_pos >= s->mb_stride) q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride]; - if(dc_pred_dir && n==1) q2 = q1; - if(!dc_pred_dir && n==2) q2 = q1; - if(n==3) q2 = q1; + q1 = s->current_picture.f.qscale_table[mb_pos]; + if (dc_pred_dir && c_avail && mb_pos) + q2 = s->current_picture.f.qscale_table[mb_pos - 1]; + if (!dc_pred_dir && a_avail && mb_pos >= s->mb_stride) + q2 = s->current_picture.f.qscale_table[mb_pos - s->mb_stride]; + if ( dc_pred_dir && n == 1) + q2 = q1; + if (!dc_pred_dir && n == 2) + q2 = q1; + if (n == 3) q2 = q1; - if(coded) { + if (coded) { int last = 0, skip, value; int k; while (!last) { vc1_decode_ac_coeff(v, &last, &skip, &value, codingset); i += skip; - if(i > 63) + if (i > 63) break; - block[v->zz_8x8[0][i++]] = value; + if (v->fcm == PROGRESSIVE) + block[v->zz_8x8[0][i++]] = value; + else { + if (use_pred && (v->fcm == ILACE_FRAME)) { + if (!dc_pred_dir) // top + block[v->zz_8x8[2][i++]] = value; + else // left + block[v->zz_8x8[3][i++]] = value; + } else { + block[v->zzi_8x8[i++]] = value; + } + } } /* apply AC prediction if needed */ - if(use_pred) { + if (use_pred) { /* scale predictors if needed*/ - if(q2 && q1!=q2) { + if (q2 && q1 != q2) { q1 = q1 * 2 + ((q1 == v->pq) ? v->halfpq : 0) - 1; q2 = q2 * 2 + ((q2 == v->pq) ? v->halfpq : 0) - 1; - if(dc_pred_dir) { //left - for(k = 1; k < 8; k++) + if (dc_pred_dir) { // left + for (k = 1; k < 8; k++) block[k << v->left_blk_sh] += (ac_val[k] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18; } else { //top - for(k = 1; k < 8; k++) + for (k = 1; k < 8; k++) block[k << v->top_blk_sh] += (ac_val[k + 8] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18; } } else { - if(dc_pred_dir) { //left - for(k = 1; k < 8; k++) + if (dc_pred_dir) { // left + for (k = 1; k < 8; k++) block[k << v->left_blk_sh] += ac_val[k]; - } else { //top - for(k = 1; k < 8; k++) + } else { // top + for (k = 1; k < 8; k++) block[k << v->top_blk_sh] += ac_val[k + 8]; } } } /* save AC coeffs for further prediction */ - for(k = 1; k < 8; k++) { + for (k = 1; k < 8; k++) { ac_val2[k ] = block[k << v->left_blk_sh]; ac_val2[k + 8] = block[k << v->top_blk_sh]; } /* scale AC coeffs */ - for(k = 1; k < 64; k++) - if(block[k]) { + for (k = 1; k < 64; k++) + if (block[k]) { block[k] *= scale; - if(!v->pquantizer) + if (!v->pquantizer) block[k] += (block[k] < 0) ? -mquant : mquant; } - if(use_pred) i = 63; + if (use_pred) i = 63; } else { // no AC coeffs int k; memset(ac_val2, 0, 16 * 2); - if(dc_pred_dir) {//left - if(use_pred) { + if (dc_pred_dir) { // left + if (use_pred) { memcpy(ac_val2, ac_val, 8 * 2); - if(q2 && q1!=q2) { + if (q2 && q1 != q2) { q1 = q1 * 2 + ((q1 == v->pq) ? v->halfpq : 0) - 1; q2 = q2 * 2 + ((q2 == v->pq) ? v->halfpq : 0) - 1; - for(k = 1; k < 8; k++) + for (k = 1; k < 8; k++) ac_val2[k] = (ac_val2[k] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18; } } - } else {//top - if(use_pred) { + } else { // top + if (use_pred) { memcpy(ac_val2 + 8, ac_val + 8, 8 * 2); - if(q2 && q1!=q2) { + if (q2 && q1 != q2) { q1 = q1 * 2 + ((q1 == v->pq) ? v->halfpq : 0) - 1; q2 = q2 * 2 + ((q2 == v->pq) ? v->halfpq : 0) - 1; - for(k = 1; k < 8; k++) + for (k = 1; k < 8; k++) ac_val2[k + 8] = (ac_val2[k + 8] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18; } } } /* apply AC prediction if needed */ - if(use_pred) { - if(dc_pred_dir) { //left - for(k = 1; k < 8; k++) { + if (use_pred) { + if (dc_pred_dir) { // left + for (k = 1; k < 8; k++) { block[k << v->left_blk_sh] = ac_val2[k] * scale; - if(!v->pquantizer && block[k << v->left_blk_sh]) + if (!v->pquantizer && block[k << v->left_blk_sh]) block[k << v->left_blk_sh] += (block[k << v->left_blk_sh] < 0) ? -mquant : mquant; } - } else { //top - for(k = 1; k < 8; k++) { + } else { // top + for (k = 1; k < 8; k++) { block[k << v->top_blk_sh] = ac_val2[k + 8] * scale; - if(!v->pquantizer && block[k << v->top_blk_sh]) + if (!v->pquantizer && block[k << v->top_blk_sh]) block[k << v->top_blk_sh] += (block[k << v->top_blk_sh] < 0) ? -mquant : mquant; } } @@ -2170,8 +3245,10 @@ /** Decode P block */ -static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquant, int ttmb, int first_block, - uint8_t *dst, int linesize, int skip_block, int *ttmb_out) +static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, + int mquant, int ttmb, int first_block, + uint8_t *dst, int linesize, int skip_block, + int *ttmb_out) { MpegEncContext *s = &v->s; GetBitContext *gb = &s->gb; @@ -2183,50 +3260,56 @@ s->dsp.clear_block(block); - if(ttmb == -1) { + if (ttmb == -1) { ttblk = ff_vc1_ttblk_to_tt[v->tt_index][get_vlc2(gb, ff_vc1_ttblk_vlc[v->tt_index].table, VC1_TTBLK_VLC_BITS, 1)]; } - if(ttblk == TT_4X4) { + if (ttblk == TT_4X4) { subblkpat = ~(get_vlc2(gb, ff_vc1_subblkpat_vlc[v->tt_index].table, VC1_SUBBLKPAT_VLC_BITS, 1) + 1); } - if((ttblk != TT_8X8 && ttblk != TT_4X4) + if ((ttblk != TT_8X8 && ttblk != TT_4X4) && ((v->ttmbf || (ttmb != -1 && (ttmb & 8) && !first_block)) || (!v->res_rtm_flag && !first_block))) { subblkpat = decode012(gb); - if(subblkpat) subblkpat ^= 3; //swap decoded pattern bits - if(ttblk == TT_8X4_TOP || ttblk == TT_8X4_BOTTOM) ttblk = TT_8X4; - if(ttblk == TT_4X8_RIGHT || ttblk == TT_4X8_LEFT) ttblk = TT_4X8; + if (subblkpat) + subblkpat ^= 3; // swap decoded pattern bits + if (ttblk == TT_8X4_TOP || ttblk == TT_8X4_BOTTOM) + ttblk = TT_8X4; + if (ttblk == TT_4X8_RIGHT || ttblk == TT_4X8_LEFT) + ttblk = TT_4X8; } scale = 2 * mquant + ((v->pq == mquant) ? v->halfpq : 0); // convert transforms like 8X4_TOP to generic TT and SUBBLKPAT - if(ttblk == TT_8X4_TOP || ttblk == TT_8X4_BOTTOM) { + if (ttblk == TT_8X4_TOP || ttblk == TT_8X4_BOTTOM) { subblkpat = 2 - (ttblk == TT_8X4_TOP); - ttblk = TT_8X4; + ttblk = TT_8X4; } - if(ttblk == TT_4X8_RIGHT || ttblk == TT_4X8_LEFT) { + if (ttblk == TT_4X8_RIGHT || ttblk == TT_4X8_LEFT) { subblkpat = 2 - (ttblk == TT_4X8_LEFT); - ttblk = TT_4X8; + ttblk = TT_4X8; } - switch(ttblk) { + switch (ttblk) { case TT_8X8: - pat = 0xF; - i = 0; + pat = 0xF; + i = 0; last = 0; while (!last) { vc1_decode_ac_coeff(v, &last, &skip, &value, v->codingset2); i += skip; - if(i > 63) + if (i > 63) break; - idx = v->zz_8x8[0][i++]; + if (!v->fcm) + idx = v->zz_8x8[0][i++]; + else + idx = v->zzi_8x8[i++]; block[idx] = value * scale; - if(!v->pquantizer) + if (!v->pquantizer) block[idx] += (block[idx] < 0) ? -mquant : mquant; } - if(!skip_block){ - if(i==1) + if (!skip_block) { + if (i == 1) v->vc1dsp.vc1_inv_trans_8x8_dc(dst, linesize, block); - else{ + else { v->vc1dsp.vc1_inv_trans_8x8(block); s->dsp.add_pixels_clamped(block, dst, linesize); } @@ -2234,71 +3317,80 @@ break; case TT_4X4: pat = ~subblkpat & 0xF; - for(j = 0; j < 4; j++) { + for (j = 0; j < 4; j++) { last = subblkpat & (1 << (3 - j)); - i = 0; - off = (j & 1) * 4 + (j & 2) * 16; + i = 0; + off = (j & 1) * 4 + (j & 2) * 16; while (!last) { vc1_decode_ac_coeff(v, &last, &skip, &value, v->codingset2); i += skip; - if(i > 15) + if (i > 15) break; - idx = ff_vc1_simple_progressive_4x4_zz[i++]; + if (!v->fcm) + idx = ff_vc1_simple_progressive_4x4_zz[i++]; + else + idx = ff_vc1_adv_interlaced_4x4_zz[i++]; block[idx + off] = value * scale; - if(!v->pquantizer) + if (!v->pquantizer) block[idx + off] += (block[idx + off] < 0) ? -mquant : mquant; } - if(!(subblkpat & (1 << (3 - j))) && !skip_block){ - if(i==1) - v->vc1dsp.vc1_inv_trans_4x4_dc(dst + (j&1)*4 + (j&2)*2*linesize, linesize, block + off); + if (!(subblkpat & (1 << (3 - j))) && !skip_block) { + if (i == 1) + v->vc1dsp.vc1_inv_trans_4x4_dc(dst + (j & 1) * 4 + (j & 2) * 2 * linesize, linesize, block + off); else - v->vc1dsp.vc1_inv_trans_4x4(dst + (j&1)*4 + (j&2)*2*linesize, linesize, block + off); + v->vc1dsp.vc1_inv_trans_4x4(dst + (j & 1) * 4 + (j & 2) * 2 * linesize, linesize, block + off); } } break; case TT_8X4: - pat = ~((subblkpat & 2)*6 + (subblkpat & 1)*3) & 0xF; - for(j = 0; j < 2; j++) { + pat = ~((subblkpat & 2) * 6 + (subblkpat & 1) * 3) & 0xF; + for (j = 0; j < 2; j++) { last = subblkpat & (1 << (1 - j)); - i = 0; - off = j * 32; + i = 0; + off = j * 32; while (!last) { vc1_decode_ac_coeff(v, &last, &skip, &value, v->codingset2); i += skip; - if(i > 31) + if (i > 31) break; - idx = v->zz_8x4[i++]+off; + if (!v->fcm) + idx = v->zz_8x4[i++] + off; + else + idx = ff_vc1_adv_interlaced_8x4_zz[i++] + off; block[idx] = value * scale; - if(!v->pquantizer) + if (!v->pquantizer) block[idx] += (block[idx] < 0) ? -mquant : mquant; } - if(!(subblkpat & (1 << (1 - j))) && !skip_block){ - if(i==1) - v->vc1dsp.vc1_inv_trans_8x4_dc(dst + j*4*linesize, linesize, block + off); + if (!(subblkpat & (1 << (1 - j))) && !skip_block) { + if (i == 1) + v->vc1dsp.vc1_inv_trans_8x4_dc(dst + j * 4 * linesize, linesize, block + off); else - v->vc1dsp.vc1_inv_trans_8x4(dst + j*4*linesize, linesize, block + off); + v->vc1dsp.vc1_inv_trans_8x4(dst + j * 4 * linesize, linesize, block + off); } } break; case TT_4X8: - pat = ~(subblkpat*5) & 0xF; - for(j = 0; j < 2; j++) { + pat = ~(subblkpat * 5) & 0xF; + for (j = 0; j < 2; j++) { last = subblkpat & (1 << (1 - j)); - i = 0; - off = j * 4; + i = 0; + off = j * 4; while (!last) { vc1_decode_ac_coeff(v, &last, &skip, &value, v->codingset2); i += skip; - if(i > 31) + if (i > 31) break; - idx = v->zz_4x8[i++]+off; + if (!v->fcm) + idx = v->zz_4x8[i++] + off; + else + idx = ff_vc1_adv_interlaced_4x8_zz[i++] + off; block[idx] = value * scale; - if(!v->pquantizer) + if (!v->pquantizer) block[idx] += (block[idx] < 0) ? -mquant : mquant; } - if(!(subblkpat & (1 << (1 - j))) && !skip_block){ - if(i==1) - v->vc1dsp.vc1_inv_trans_4x8_dc(dst + j*4, linesize, block + off); + if (!(subblkpat & (1 << (1 - j))) && !skip_block) { + if (i == 1) + v->vc1dsp.vc1_inv_trans_4x8_dc(dst + j * 4, linesize, block + off); else v->vc1dsp.vc1_inv_trans_4x8(dst + j*4, linesize, block + off); } @@ -2317,35 +3409,35 @@ static av_always_inline void vc1_apply_p_v_loop_filter(VC1Context *v, int block_num) { - MpegEncContext *s = &v->s; + MpegEncContext *s = &v->s; int mb_cbp = v->cbp[s->mb_x - s->mb_stride], block_cbp = mb_cbp >> (block_num * 4), bottom_cbp, mb_is_intra = v->is_intra[s->mb_x - s->mb_stride], block_is_intra = mb_is_intra >> (block_num * 4), bottom_is_intra; - int idx, linesize = block_num > 3 ? s->uvlinesize : s->linesize, ttblk; + int idx, linesize = block_num > 3 ? s->uvlinesize : s->linesize, ttblk; uint8_t *dst; - if(block_num > 3) { + if (block_num > 3) { dst = s->dest[block_num - 3]; } else { dst = s->dest[0] + (block_num & 1) * 8 + ((block_num & 2) * 4 - 8) * linesize; } - if (s->mb_y != s->mb_height || block_num < 2) { + if (s->mb_y != s->end_mb_y || block_num < 2) { int16_t (*mv)[2]; int mv_stride; - if(block_num > 3) { + if (block_num > 3) { bottom_cbp = v->cbp[s->mb_x] >> (block_num * 4); bottom_is_intra = v->is_intra[s->mb_x] >> (block_num * 4); mv = &v->luma_mv[s->mb_x - s->mb_stride]; mv_stride = s->mb_stride; } else { - bottom_cbp = (block_num < 2) ? (mb_cbp >> ((block_num + 2) * 4)) : - (v->cbp[s->mb_x] >> ((block_num - 2) * 4)); - bottom_is_intra = (block_num < 2) ? (mb_is_intra >> ((block_num + 2) * 4)) : - (v->is_intra[s->mb_x] >> ((block_num - 2) * 4)); + bottom_cbp = (block_num < 2) ? (mb_cbp >> ((block_num + 2) * 4)) + : (v->cbp[s->mb_x] >> ((block_num - 2) * 4)); + bottom_is_intra = (block_num < 2) ? (mb_is_intra >> ((block_num + 2) * 4)) + : (v->is_intra[s->mb_x] >> ((block_num - 2) * 4)); mv_stride = s->b8_stride; - mv = &s->current_picture.motion_val[0][s->block_index[block_num] - 2 * mv_stride]; + mv = &s->current_picture.f.motion_val[0][s->block_index[block_num] - 2 * mv_stride]; } if (bottom_is_intra & 1 || block_is_intra & 1 || @@ -2353,7 +3445,7 @@ v->vc1dsp.vc1_v_loop_filter8(dst, linesize, v->pq); } else { idx = ((bottom_cbp >> 2) | block_cbp) & 3; - if(idx == 3) { + if (idx == 3) { v->vc1dsp.vc1_v_loop_filter8(dst, linesize, v->pq); } else if (idx) { if (idx == 1) @@ -2365,7 +3457,7 @@ } dst -= 4 * linesize; - ttblk = (v->ttblk[s->mb_x - s->mb_stride] >> (block_num * 4)) & 0xf; + ttblk = (v->ttblk[s->mb_x - s->mb_stride] >> (block_num * 4)) & 0xF; if (ttblk == TT_4X4 || ttblk == TT_8X4) { idx = (block_cbp | (block_cbp >> 2)) & 3; if (idx == 3) { @@ -2381,12 +3473,12 @@ static av_always_inline void vc1_apply_p_h_loop_filter(VC1Context *v, int block_num) { - MpegEncContext *s = &v->s; + MpegEncContext *s = &v->s; int mb_cbp = v->cbp[s->mb_x - 1 - s->mb_stride], block_cbp = mb_cbp >> (block_num * 4), right_cbp, mb_is_intra = v->is_intra[s->mb_x - 1 - s->mb_stride], block_is_intra = mb_is_intra >> (block_num * 4), right_is_intra; - int idx, linesize = block_num > 3 ? s->uvlinesize : s->linesize, ttblk; + int idx, linesize = block_num > 3 ? s->uvlinesize : s->linesize, ttblk; uint8_t *dst; if (block_num > 3) { @@ -2398,16 +3490,16 @@ if (s->mb_x != s->mb_width || !(block_num & 5)) { int16_t (*mv)[2]; - if(block_num > 3) { + if (block_num > 3) { right_cbp = v->cbp[s->mb_x - s->mb_stride] >> (block_num * 4); right_is_intra = v->is_intra[s->mb_x - s->mb_stride] >> (block_num * 4); mv = &v->luma_mv[s->mb_x - s->mb_stride - 1]; - }else{ - right_cbp = (block_num & 1) ? (v->cbp[s->mb_x - s->mb_stride] >> ((block_num - 1) * 4)) : - (mb_cbp >> ((block_num + 1) * 4)); - right_is_intra = (block_num & 1) ? (v->is_intra[s->mb_x - s->mb_stride] >> ((block_num - 1) * 4)) : - (mb_is_intra >> ((block_num + 1) * 4)); - mv = &s->current_picture.motion_val[0][s->block_index[block_num] - s->b8_stride * 2 - 2]; + } else { + right_cbp = (block_num & 1) ? (v->cbp[s->mb_x - s->mb_stride] >> ((block_num - 1) * 4)) + : (mb_cbp >> ((block_num + 1) * 4)); + right_is_intra = (block_num & 1) ? (v->is_intra[s->mb_x - s->mb_stride] >> ((block_num - 1) * 4)) + : (mb_is_intra >> ((block_num + 1) * 4)); + mv = &s->current_picture.f.motion_val[0][s->block_index[block_num] - s->b8_stride * 2 - 2]; } if (block_is_intra & 1 || right_is_intra & 1 || mv[0][0] != mv[1][0] || mv[0][1] != mv[1][1]) { v->vc1dsp.vc1_h_loop_filter8(dst, linesize, v->pq); @@ -2417,9 +3509,9 @@ v->vc1dsp.vc1_h_loop_filter8(dst, linesize, v->pq); } else if (idx) { if (idx == 1) - v->vc1dsp.vc1_h_loop_filter4(dst+4*linesize, linesize, v->pq); + v->vc1dsp.vc1_h_loop_filter4(dst + 4 * linesize, linesize, v->pq); else - v->vc1dsp.vc1_h_loop_filter4(dst, linesize, v->pq); + v->vc1dsp.vc1_h_loop_filter4(dst, linesize, v->pq); } } } @@ -2432,9 +3524,9 @@ v->vc1dsp.vc1_h_loop_filter8(dst, linesize, v->pq); } else if (idx) { if (idx == 1) - v->vc1dsp.vc1_h_loop_filter4(dst + linesize*4, linesize, v->pq); + v->vc1dsp.vc1_h_loop_filter4(dst + linesize * 4, linesize, v->pq); else - v->vc1dsp.vc1_h_loop_filter4(dst, linesize, v->pq); + v->vc1dsp.vc1_h_loop_filter4(dst, linesize, v->pq); } } } @@ -2448,7 +3540,7 @@ vc1_apply_p_v_loop_filter(v, i); } - /* V always preceedes H, therefore we run H one MB before V; + /* V always precedes H, therefore we run H one MB before V; * at the end of a row, we catch up to complete the row */ if (s->mb_x) { for (i = 0; i < 6; i++) { @@ -2464,7 +3556,7 @@ } } -/** Decode one P-frame MB (in Simple/Main profile) +/** Decode one P-frame MB */ static int vc1_decode_p_mb(VC1Context *v) { @@ -2485,7 +3577,7 @@ int skipped, fourmv; int block_cbp = 0, pat, block_tt = 0, block_intra = 0; - mquant = v->pq; /* Loosy initialization */ + mquant = v->pq; /* lossy initialization */ if (v->mv_type_is_raw) fourmv = get_bits1(gb); @@ -2496,208 +3588,543 @@ else skipped = v->s.mbskip_table[mb_pos]; - if (!fourmv) /* 1MV mode */ - { - if (!skipped) - { + if (!fourmv) { /* 1MV mode */ + if (!skipped) { GET_MVDATA(dmv_x, dmv_y); if (s->mb_intra) { - s->current_picture.motion_val[1][s->block_index[0]][0] = 0; - s->current_picture.motion_val[1][s->block_index[0]][1] = 0; + s->current_picture.f.motion_val[1][s->block_index[0]][0] = 0; + s->current_picture.f.motion_val[1][s->block_index[0]][1] = 0; } - s->current_picture.mb_type[mb_pos] = s->mb_intra ? MB_TYPE_INTRA : MB_TYPE_16x16; - vc1_pred_mv(v, 0, dmv_x, dmv_y, 1, v->range_x, v->range_y, v->mb_type[0]); + s->current_picture.f.mb_type[mb_pos] = s->mb_intra ? MB_TYPE_INTRA : MB_TYPE_16x16; + vc1_pred_mv(v, 0, dmv_x, dmv_y, 1, v->range_x, v->range_y, v->mb_type[0], 0, 0); /* FIXME Set DC val for inter block ? */ - if (s->mb_intra && !mb_has_coeffs) - { + if (s->mb_intra && !mb_has_coeffs) { GET_MQUANT(); s->ac_pred = get_bits1(gb); - cbp = 0; - } - else if (mb_has_coeffs) - { - if (s->mb_intra) s->ac_pred = get_bits1(gb); + cbp = 0; + } else if (mb_has_coeffs) { + if (s->mb_intra) + s->ac_pred = get_bits1(gb); cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); GET_MQUANT(); - } - else - { + } else { mquant = v->pq; - cbp = 0; + cbp = 0; } - s->current_picture.qscale_table[mb_pos] = mquant; + s->current_picture.f.qscale_table[mb_pos] = mquant; if (!v->ttmbf && !s->mb_intra && mb_has_coeffs) ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2); - if(!s->mb_intra) vc1_mc_1mv(v, 0); + if (!s->mb_intra) vc1_mc_1mv(v, 0); dst_idx = 0; - for (i=0; i<6; i++) - { + for (i = 0; i < 6; i++) { s->dc_val[0][s->block_index[i]] = 0; dst_idx += i >> 2; val = ((cbp >> (5 - i)) & 1); off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize); v->mb_type[0][s->block_index[i]] = s->mb_intra; - if(s->mb_intra) { + if (s->mb_intra) { /* check if prediction blocks A and C are available */ v->a_avail = v->c_avail = 0; - if(i == 2 || i == 3 || !s->first_slice_line) + if (i == 2 || i == 3 || !s->first_slice_line) v->a_avail = v->mb_type[0][s->block_index[i] - s->block_wrap[i]]; - if(i == 1 || i == 3 || s->mb_x) + if (i == 1 || i == 3 || s->mb_x) v->c_avail = v->mb_type[0][s->block_index[i] - 1]; - vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset); - if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; + vc1_decode_intra_block(v, s->block[i], i, val, mquant, + (i & 4) ? v->codingset2 : v->codingset); + if ((i>3) && (s->flags & CODEC_FLAG_GRAY)) + continue; v->vc1dsp.vc1_inv_trans_8x8(s->block[i]); - if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; + if (v->rangeredfrm) + for (j = 0; j < 64; j++) + s->block[i][j] <<= 1; s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize); - if(v->pq >= 9 && v->overlap) { - if(v->c_avail) + if (v->pq >= 9 && v->overlap) { + if (v->c_avail) v->vc1dsp.vc1_h_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize); - if(v->a_avail) + if (v->a_avail) v->vc1dsp.vc1_v_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize); } - block_cbp |= 0xF << (i << 2); + block_cbp |= 0xF << (i << 2); block_intra |= 1 << i; - } else if(val) { - pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block, s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize, (i&4) && (s->flags & CODEC_FLAG_GRAY), &block_tt); + } else if (val) { + pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block, + s->dest[dst_idx] + off, (i & 4) ? s->uvlinesize : s->linesize, + (i & 4) && (s->flags & CODEC_FLAG_GRAY), &block_tt); block_cbp |= pat << (i << 2); - if(!v->ttmbf && ttmb < 8) ttmb = -1; + if (!v->ttmbf && ttmb < 8) + ttmb = -1; first_block = 0; } } - } - else //Skipped - { + } else { // skipped s->mb_intra = 0; - for(i = 0; i < 6; i++) { + for (i = 0; i < 6; i++) { v->mb_type[0][s->block_index[i]] = 0; - s->dc_val[0][s->block_index[i]] = 0; + s->dc_val[0][s->block_index[i]] = 0; } - s->current_picture.mb_type[mb_pos] = MB_TYPE_SKIP; - s->current_picture.qscale_table[mb_pos] = 0; - vc1_pred_mv(v, 0, 0, 0, 1, v->range_x, v->range_y, v->mb_type[0]); + s->current_picture.f.mb_type[mb_pos] = MB_TYPE_SKIP; + s->current_picture.f.qscale_table[mb_pos] = 0; + vc1_pred_mv(v, 0, 0, 0, 1, v->range_x, v->range_y, v->mb_type[0], 0, 0); vc1_mc_1mv(v, 0); } - } //1MV mode - else //4MV mode - { - if (!skipped /* unskipped MB */) - { + } else { // 4MV mode + if (!skipped /* unskipped MB */) { int intra_count = 0, coded_inter = 0; int is_intra[6], is_coded[6]; /* Get CBPCY */ cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); - for (i=0; i<6; i++) - { + for (i = 0; i < 6; i++) { val = ((cbp >> (5 - i)) & 1); s->dc_val[0][s->block_index[i]] = 0; - s->mb_intra = 0; - if(i < 4) { + s->mb_intra = 0; + if (i < 4) { dmv_x = dmv_y = 0; - s->mb_intra = 0; + s->mb_intra = 0; mb_has_coeffs = 0; - if(val) { + if (val) { GET_MVDATA(dmv_x, dmv_y); } - vc1_pred_mv(v, i, dmv_x, dmv_y, 0, v->range_x, v->range_y, v->mb_type[0]); - if(!s->mb_intra) vc1_mc_4mv_luma(v, i); + vc1_pred_mv(v, i, dmv_x, dmv_y, 0, v->range_x, v->range_y, v->mb_type[0], 0, 0); + if (!s->mb_intra) + vc1_mc_4mv_luma(v, i, 0); intra_count += s->mb_intra; - is_intra[i] = s->mb_intra; - is_coded[i] = mb_has_coeffs; + is_intra[i] = s->mb_intra; + is_coded[i] = mb_has_coeffs; } - if(i&4){ + if (i & 4) { is_intra[i] = (intra_count >= 3); is_coded[i] = val; } - if(i == 4) vc1_mc_4mv_chroma(v); + if (i == 4) + vc1_mc_4mv_chroma(v, 0); v->mb_type[0][s->block_index[i]] = is_intra[i]; - if(!coded_inter) coded_inter = !is_intra[i] & is_coded[i]; + if (!coded_inter) + coded_inter = !is_intra[i] & is_coded[i]; } // if there are no coded blocks then don't do anything more dst_idx = 0; - if(!intra_count && !coded_inter) + if (!intra_count && !coded_inter) goto end; GET_MQUANT(); - s->current_picture.qscale_table[mb_pos] = mquant; + s->current_picture.f.qscale_table[mb_pos] = mquant; /* test if block is intra and has pred */ { int intrapred = 0; - for(i=0; i<6; i++) - if(is_intra[i]) { - if(((!s->first_slice_line || (i==2 || i==3)) && v->mb_type[0][s->block_index[i] - s->block_wrap[i]]) - || ((s->mb_x || (i==1 || i==3)) && v->mb_type[0][s->block_index[i] - 1])) { + for (i = 0; i < 6; i++) + if (is_intra[i]) { + if (((!s->first_slice_line || (i == 2 || i == 3)) && v->mb_type[0][s->block_index[i] - s->block_wrap[i]]) + || ((s->mb_x || (i == 1 || i == 3)) && v->mb_type[0][s->block_index[i] - 1])) { intrapred = 1; break; } } - if(intrapred)s->ac_pred = get_bits1(gb); - else s->ac_pred = 0; + if (intrapred) + s->ac_pred = get_bits1(gb); + else + s->ac_pred = 0; } if (!v->ttmbf && coded_inter) ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2); - for (i=0; i<6; i++) - { - dst_idx += i >> 2; - off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize); + for (i = 0; i < 6; i++) { + dst_idx += i >> 2; + off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize); s->mb_intra = is_intra[i]; if (is_intra[i]) { /* check if prediction blocks A and C are available */ v->a_avail = v->c_avail = 0; - if(i == 2 || i == 3 || !s->first_slice_line) + if (i == 2 || i == 3 || !s->first_slice_line) v->a_avail = v->mb_type[0][s->block_index[i] - s->block_wrap[i]]; - if(i == 1 || i == 3 || s->mb_x) + if (i == 1 || i == 3 || s->mb_x) v->c_avail = v->mb_type[0][s->block_index[i] - 1]; - vc1_decode_intra_block(v, s->block[i], i, is_coded[i], mquant, (i&4)?v->codingset2:v->codingset); - if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; + vc1_decode_intra_block(v, s->block[i], i, is_coded[i], mquant, + (i & 4) ? v->codingset2 : v->codingset); + if ((i>3) && (s->flags & CODEC_FLAG_GRAY)) + continue; v->vc1dsp.vc1_inv_trans_8x8(s->block[i]); - if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; - s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize); - if(v->pq >= 9 && v->overlap) { - if(v->c_avail) + if (v->rangeredfrm) + for (j = 0; j < 64; j++) + s->block[i][j] <<= 1; + s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, + (i & 4) ? s->uvlinesize : s->linesize); + if (v->pq >= 9 && v->overlap) { + if (v->c_avail) v->vc1dsp.vc1_h_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize); - if(v->a_avail) + if (v->a_avail) v->vc1dsp.vc1_v_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize); } - block_cbp |= 0xF << (i << 2); + block_cbp |= 0xF << (i << 2); block_intra |= 1 << i; - } else if(is_coded[i]) { - pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block, s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize, (i&4) && (s->flags & CODEC_FLAG_GRAY), &block_tt); + } else if (is_coded[i]) { + pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, + first_block, s->dest[dst_idx] + off, + (i & 4) ? s->uvlinesize : s->linesize, + (i & 4) && (s->flags & CODEC_FLAG_GRAY), + &block_tt); block_cbp |= pat << (i << 2); - if(!v->ttmbf && ttmb < 8) ttmb = -1; + if (!v->ttmbf && ttmb < 8) + ttmb = -1; first_block = 0; } } - } - else //Skipped MB - { - s->mb_intra = 0; - s->current_picture.qscale_table[mb_pos] = 0; - for (i=0; i<6; i++) { + } else { // skipped MB + s->mb_intra = 0; + s->current_picture.f.qscale_table[mb_pos] = 0; + for (i = 0; i < 6; i++) { v->mb_type[0][s->block_index[i]] = 0; - s->dc_val[0][s->block_index[i]] = 0; + s->dc_val[0][s->block_index[i]] = 0; } - for (i=0; i<4; i++) - { - vc1_pred_mv(v, i, 0, 0, 0, v->range_x, v->range_y, v->mb_type[0]); - vc1_mc_4mv_luma(v, i); + for (i = 0; i < 4; i++) { + vc1_pred_mv(v, i, 0, 0, 0, v->range_x, v->range_y, v->mb_type[0], 0, 0); + vc1_mc_4mv_luma(v, i, 0); } - vc1_mc_4mv_chroma(v); - s->current_picture.qscale_table[mb_pos] = 0; + vc1_mc_4mv_chroma(v, 0); + s->current_picture.f.qscale_table[mb_pos] = 0; } } end: - v->cbp[s->mb_x] = block_cbp; - v->ttblk[s->mb_x] = block_tt; + v->cbp[s->mb_x] = block_cbp; + v->ttblk[s->mb_x] = block_tt; v->is_intra[s->mb_x] = block_intra; return 0; } +/* Decode one macroblock in an interlaced frame p picture */ + +static int vc1_decode_p_mb_intfr(VC1Context *v) +{ + MpegEncContext *s = &v->s; + GetBitContext *gb = &s->gb; + int i; + int mb_pos = s->mb_x + s->mb_y * s->mb_stride; + int cbp = 0; /* cbp decoding stuff */ + int mqdiff, mquant; /* MB quantization */ + int ttmb = v->ttfrm; /* MB Transform type */ + + int mb_has_coeffs = 1; /* last_flag */ + int dmv_x, dmv_y; /* Differential MV components */ + int val; /* temp value */ + int first_block = 1; + int dst_idx, off; + int skipped, fourmv = 0, twomv = 0; + int block_cbp = 0, pat, block_tt = 0; + int idx_mbmode = 0, mvbp; + int stride_y, fieldtx; + + mquant = v->pq; /* Loosy initialization */ + + if (v->skip_is_raw) + skipped = get_bits1(gb); + else + skipped = v->s.mbskip_table[mb_pos]; + if (!skipped) { + if (v->fourmvswitch) + idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_INTFR_4MV_MBMODE_VLC_BITS, 2); // try getting this done + else + idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_INTFR_NON4MV_MBMODE_VLC_BITS, 2); // in a single line + switch (ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][0]) { + /* store the motion vector type in a flag (useful later) */ + case MV_PMODE_INTFR_4MV: + fourmv = 1; + v->blk_mv_type[s->block_index[0]] = 0; + v->blk_mv_type[s->block_index[1]] = 0; + v->blk_mv_type[s->block_index[2]] = 0; + v->blk_mv_type[s->block_index[3]] = 0; + break; + case MV_PMODE_INTFR_4MV_FIELD: + fourmv = 1; + v->blk_mv_type[s->block_index[0]] = 1; + v->blk_mv_type[s->block_index[1]] = 1; + v->blk_mv_type[s->block_index[2]] = 1; + v->blk_mv_type[s->block_index[3]] = 1; + break; + case MV_PMODE_INTFR_2MV_FIELD: + twomv = 1; + v->blk_mv_type[s->block_index[0]] = 1; + v->blk_mv_type[s->block_index[1]] = 1; + v->blk_mv_type[s->block_index[2]] = 1; + v->blk_mv_type[s->block_index[3]] = 1; + break; + case MV_PMODE_INTFR_1MV: + v->blk_mv_type[s->block_index[0]] = 0; + v->blk_mv_type[s->block_index[1]] = 0; + v->blk_mv_type[s->block_index[2]] = 0; + v->blk_mv_type[s->block_index[3]] = 0; + break; + } + if (ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][0] == MV_PMODE_INTFR_INTRA) { // intra MB + s->current_picture.f.motion_val[1][s->block_index[0]][0] = 0; + s->current_picture.f.motion_val[1][s->block_index[0]][1] = 0; + s->current_picture.f.mb_type[mb_pos] = MB_TYPE_INTRA; + s->mb_intra = v->is_intra[s->mb_x] = 1; + for (i = 0; i < 6; i++) + v->mb_type[0][s->block_index[i]] = 1; + fieldtx = v->fieldtx_plane[mb_pos] = get_bits1(gb); + mb_has_coeffs = get_bits1(gb); + if (mb_has_coeffs) + cbp = 1 + get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); + v->s.ac_pred = v->acpred_plane[mb_pos] = get_bits1(gb); + GET_MQUANT(); + s->current_picture.f.qscale_table[mb_pos] = mquant; + /* Set DC scale - y and c use the same (not sure if necessary here) */ + s->y_dc_scale = s->y_dc_scale_table[mquant]; + s->c_dc_scale = s->c_dc_scale_table[mquant]; + dst_idx = 0; + for (i = 0; i < 6; i++) { + s->dc_val[0][s->block_index[i]] = 0; + dst_idx += i >> 2; + val = ((cbp >> (5 - i)) & 1); + v->mb_type[0][s->block_index[i]] = s->mb_intra; + v->a_avail = v->c_avail = 0; + if (i == 2 || i == 3 || !s->first_slice_line) + v->a_avail = v->mb_type[0][s->block_index[i] - s->block_wrap[i]]; + if (i == 1 || i == 3 || s->mb_x) + v->c_avail = v->mb_type[0][s->block_index[i] - 1]; + + vc1_decode_intra_block(v, s->block[i], i, val, mquant, + (i & 4) ? v->codingset2 : v->codingset); + if ((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; + v->vc1dsp.vc1_inv_trans_8x8(s->block[i]); + if (i < 4) { + stride_y = s->linesize << fieldtx; + off = (fieldtx) ? ((i & 1) * 8) + ((i & 2) >> 1) * s->linesize : (i & 1) * 8 + 4 * (i & 2) * s->linesize; + } else { + stride_y = s->uvlinesize; + off = 0; + } + s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, stride_y); + //TODO: loop filter + } + + } else { // inter MB + mb_has_coeffs = ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][3]; + if (mb_has_coeffs) + cbp = 1 + get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); + if (ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][0] == MV_PMODE_INTFR_2MV_FIELD) { + v->twomvbp = get_vlc2(gb, v->twomvbp_vlc->table, VC1_2MV_BLOCK_PATTERN_VLC_BITS, 1); + } else { + if ((ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][0] == MV_PMODE_INTFR_4MV) + || (ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][0] == MV_PMODE_INTFR_4MV_FIELD)) { + v->fourmvbp = get_vlc2(gb, v->fourmvbp_vlc->table, VC1_4MV_BLOCK_PATTERN_VLC_BITS, 1); + } + } + s->mb_intra = v->is_intra[s->mb_x] = 0; + for (i = 0; i < 6; i++) + v->mb_type[0][s->block_index[i]] = 0; + fieldtx = v->fieldtx_plane[mb_pos] = ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][1]; + /* for all motion vector read MVDATA and motion compensate each block */ + dst_idx = 0; + if (fourmv) { + mvbp = v->fourmvbp; + for (i = 0; i < 6; i++) { + if (i < 4) { + dmv_x = dmv_y = 0; + val = ((mvbp >> (3 - i)) & 1); + if (val) { + get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + } + vc1_pred_mv_intfr(v, i, dmv_x, dmv_y, 0, v->range_x, v->range_y, v->mb_type[0]); + vc1_mc_4mv_luma(v, i, 0); + } else if (i == 4) { + vc1_mc_4mv_chroma4(v); + } + } + } else if (twomv) { + mvbp = v->twomvbp; + dmv_x = dmv_y = 0; + if (mvbp & 2) { + get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + } + vc1_pred_mv_intfr(v, 0, dmv_x, dmv_y, 2, v->range_x, v->range_y, v->mb_type[0]); + vc1_mc_4mv_luma(v, 0, 0); + vc1_mc_4mv_luma(v, 1, 0); + dmv_x = dmv_y = 0; + if (mvbp & 1) { + get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + } + vc1_pred_mv_intfr(v, 2, dmv_x, dmv_y, 2, v->range_x, v->range_y, v->mb_type[0]); + vc1_mc_4mv_luma(v, 2, 0); + vc1_mc_4mv_luma(v, 3, 0); + vc1_mc_4mv_chroma4(v); + } else { + mvbp = ff_vc1_mbmode_intfrp[v->fourmvswitch][idx_mbmode][2]; + if (mvbp) { + get_mvdata_interlaced(v, &dmv_x, &dmv_y, 0); + } + vc1_pred_mv_intfr(v, 0, dmv_x, dmv_y, 1, v->range_x, v->range_y, v->mb_type[0]); + vc1_mc_1mv(v, 0); + } + if (cbp) + GET_MQUANT(); // p. 227 + s->current_picture.f.qscale_table[mb_pos] = mquant; + if (!v->ttmbf && cbp) + ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2); + for (i = 0; i < 6; i++) { + s->dc_val[0][s->block_index[i]] = 0; + dst_idx += i >> 2; + val = ((cbp >> (5 - i)) & 1); + if (!fieldtx) + off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize); + else + off = (i & 4) ? 0 : ((i & 1) * 8 + ((i > 1) * s->linesize)); + if (val) { + pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, + first_block, s->dest[dst_idx] + off, + (i & 4) ? s->uvlinesize : (s->linesize << fieldtx), + (i & 4) && (s->flags & CODEC_FLAG_GRAY), &block_tt); + block_cbp |= pat << (i << 2); + if (!v->ttmbf && ttmb < 8) + ttmb = -1; + first_block = 0; + } + } + } + } else { // skipped + s->mb_intra = v->is_intra[s->mb_x] = 0; + for (i = 0; i < 6; i++) { + v->mb_type[0][s->block_index[i]] = 0; + s->dc_val[0][s->block_index[i]] = 0; + } + s->current_picture.f.mb_type[mb_pos] = MB_TYPE_SKIP; + s->current_picture.f.qscale_table[mb_pos] = 0; + v->blk_mv_type[s->block_index[0]] = 0; + v->blk_mv_type[s->block_index[1]] = 0; + v->blk_mv_type[s->block_index[2]] = 0; + v->blk_mv_type[s->block_index[3]] = 0; + vc1_pred_mv_intfr(v, 0, 0, 0, 1, v->range_x, v->range_y, v->mb_type[0]); + vc1_mc_1mv(v, 0); + } + if (s->mb_x == s->mb_width - 1) + memmove(v->is_intra_base, v->is_intra, sizeof(v->is_intra_base[0])*s->mb_stride); + return 0; +} + +static int vc1_decode_p_mb_intfi(VC1Context *v) +{ + MpegEncContext *s = &v->s; + GetBitContext *gb = &s->gb; + int i; + int mb_pos = s->mb_x + s->mb_y * s->mb_stride; + int cbp = 0; /* cbp decoding stuff */ + int mqdiff, mquant; /* MB quantization */ + int ttmb = v->ttfrm; /* MB Transform type */ + + int mb_has_coeffs = 1; /* last_flag */ + int dmv_x, dmv_y; /* Differential MV components */ + int val; /* temp values */ + int first_block = 1; + int dst_idx, off; + int pred_flag; + int block_cbp = 0, pat, block_tt = 0; + int idx_mbmode = 0; + + mquant = v->pq; /* Loosy initialization */ + + idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_IF_MBMODE_VLC_BITS, 2); + if (idx_mbmode <= 1) { // intra MB + s->mb_intra = v->is_intra[s->mb_x] = 1; + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0] = 0; + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1] = 0; + s->current_picture.f.mb_type[mb_pos + v->mb_off] = MB_TYPE_INTRA; + GET_MQUANT(); + s->current_picture.f.qscale_table[mb_pos] = mquant; + /* Set DC scale - y and c use the same (not sure if necessary here) */ + s->y_dc_scale = s->y_dc_scale_table[mquant]; + s->c_dc_scale = s->c_dc_scale_table[mquant]; + v->s.ac_pred = v->acpred_plane[mb_pos] = get_bits1(gb); + mb_has_coeffs = idx_mbmode & 1; + if (mb_has_coeffs) + cbp = 1 + get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_ICBPCY_VLC_BITS, 2); + dst_idx = 0; + for (i = 0; i < 6; i++) { + s->dc_val[0][s->block_index[i]] = 0; + v->mb_type[0][s->block_index[i]] = 1; + dst_idx += i >> 2; + val = ((cbp >> (5 - i)) & 1); + v->a_avail = v->c_avail = 0; + if (i == 2 || i == 3 || !s->first_slice_line) + v->a_avail = v->mb_type[0][s->block_index[i] - s->block_wrap[i]]; + if (i == 1 || i == 3 || s->mb_x) + v->c_avail = v->mb_type[0][s->block_index[i] - 1]; + + vc1_decode_intra_block(v, s->block[i], i, val, mquant, + (i & 4) ? v->codingset2 : v->codingset); + if ((i>3) && (s->flags & CODEC_FLAG_GRAY)) + continue; + v->vc1dsp.vc1_inv_trans_8x8(s->block[i]); + off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize); + off += v->cur_field_type ? ((i & 4) ? s->current_picture_ptr->f.linesize[1] : s->current_picture_ptr->f.linesize[0]) : 0; + s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i & 4) ? s->uvlinesize : s->linesize); + // TODO: loop filter + } + } else { + s->mb_intra = v->is_intra[s->mb_x] = 0; + s->current_picture.f.mb_type[mb_pos + v->mb_off] = MB_TYPE_16x16; + for (i = 0; i < 6; i++) v->mb_type[0][s->block_index[i]] = 0; + if (idx_mbmode <= 5) { // 1-MV + dmv_x = dmv_y = 0; + if (idx_mbmode & 1) { + get_mvdata_interlaced(v, &dmv_x, &dmv_y, &pred_flag); + } + vc1_pred_mv(v, 0, dmv_x, dmv_y, 1, v->range_x, v->range_y, v->mb_type[0], pred_flag, 0); + vc1_mc_1mv(v, 0); + mb_has_coeffs = !(idx_mbmode & 2); + } else { // 4-MV + v->fourmvbp = get_vlc2(gb, v->fourmvbp_vlc->table, VC1_4MV_BLOCK_PATTERN_VLC_BITS, 1); + for (i = 0; i < 6; i++) { + if (i < 4) { + dmv_x = dmv_y = pred_flag = 0; + val = ((v->fourmvbp >> (3 - i)) & 1); + if (val) { + get_mvdata_interlaced(v, &dmv_x, &dmv_y, &pred_flag); + } + vc1_pred_mv(v, i, dmv_x, dmv_y, 0, v->range_x, v->range_y, v->mb_type[0], pred_flag, 0); + vc1_mc_4mv_luma(v, i, 0); + } else if (i == 4) + vc1_mc_4mv_chroma(v, 0); + } + mb_has_coeffs = idx_mbmode & 1; + } + if (mb_has_coeffs) + cbp = 1 + get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); + if (cbp) { + GET_MQUANT(); + } + s->current_picture.f.qscale_table[mb_pos] = mquant; + if (!v->ttmbf && cbp) { + ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2); + } + dst_idx = 0; + for (i = 0; i < 6; i++) { + s->dc_val[0][s->block_index[i]] = 0; + dst_idx += i >> 2; + val = ((cbp >> (5 - i)) & 1); + off = (i & 4) ? 0 : (i & 1) * 8 + (i & 2) * 4 * s->linesize; + if (v->cur_field_type) + off += (i & 4) ? s->current_picture_ptr->f.linesize[1] : s->current_picture_ptr->f.linesize[0]; + if (val) { + pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, + first_block, s->dest[dst_idx] + off, + (i & 4) ? s->uvlinesize : s->linesize, + (i & 4) && (s->flags & CODEC_FLAG_GRAY), + &block_tt); + block_cbp |= pat << (i << 2); + if (!v->ttmbf && ttmb < 8) ttmb = -1; + first_block = 0; + } + } + } + if (s->mb_x == s->mb_width - 1) + memmove(v->is_intra_base, v->is_intra, sizeof(v->is_intra_base[0]) * s->mb_stride); + return 0; +} + /** Decode one B-frame MB (in Main profile) */ static void vc1_decode_b_mb(VC1Context *v) @@ -2718,7 +4145,7 @@ int dmv_x[2], dmv_y[2]; int bmvtype = BMV_TYPE_BACKWARD; - mquant = v->pq; /* Loosy initialization */ + mquant = v->pq; /* lossy initialization */ s->mb_intra = 0; if (v->dmb_is_raw) @@ -2731,11 +4158,11 @@ skipped = v->s.mbskip_table[mb_pos]; dmv_x[0] = dmv_x[1] = dmv_y[0] = dmv_y[1] = 0; - for(i = 0; i < 6; i++) { + for (i = 0; i < 6; i++) { v->mb_type[0][s->block_index[i]] = 0; - s->dc_val[0][s->block_index[i]] = 0; + s->dc_val[0][s->block_index[i]] = 0; } - s->current_picture.qscale_table[mb_pos] = 0; + s->current_picture.f.qscale_table[mb_pos] = 0; if (!direct) { if (!skipped) { @@ -2743,9 +4170,9 @@ dmv_x[1] = dmv_x[0]; dmv_y[1] = dmv_y[0]; } - if(skipped || !s->mb_intra) { + if (skipped || !s->mb_intra) { bmvtype = decode012(gb); - switch(bmvtype) { + switch (bmvtype) { case 0: bmvtype = (v->bfraction >= (B_FRACTION_DEN/2)) ? BMV_TYPE_BACKWARD : BMV_TYPE_FORWARD; break; @@ -2753,16 +4180,17 @@ bmvtype = (v->bfraction >= (B_FRACTION_DEN/2)) ? BMV_TYPE_FORWARD : BMV_TYPE_BACKWARD; break; case 2: - bmvtype = BMV_TYPE_INTERPOLATED; + bmvtype = BMV_TYPE_INTERPOLATED; dmv_x[0] = dmv_y[0] = 0; } } } - for(i = 0; i < 6; i++) + for (i = 0; i < 6; i++) v->mb_type[0][s->block_index[i]] = s->mb_intra; if (skipped) { - if(direct) bmvtype = BMV_TYPE_INTERPOLATED; + if (direct) + bmvtype = BMV_TYPE_INTERPOLATED; vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype); vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype); return; @@ -2771,29 +4199,29 @@ cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); GET_MQUANT(); s->mb_intra = 0; - s->current_picture.qscale_table[mb_pos] = mquant; - if(!v->ttmbf) + s->current_picture.f.qscale_table[mb_pos] = mquant; + if (!v->ttmbf) ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2); dmv_x[0] = dmv_y[0] = dmv_x[1] = dmv_y[1] = 0; vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype); vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype); } else { - if(!mb_has_coeffs && !s->mb_intra) { + if (!mb_has_coeffs && !s->mb_intra) { /* no coded blocks - effectively skipped */ vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype); vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype); return; } - if(s->mb_intra && !mb_has_coeffs) { + if (s->mb_intra && !mb_has_coeffs) { GET_MQUANT(); - s->current_picture.qscale_table[mb_pos] = mquant; + s->current_picture.f.qscale_table[mb_pos] = mquant; s->ac_pred = get_bits1(gb); cbp = 0; vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype); } else { - if(bmvtype == BMV_TYPE_INTERPOLATED) { + if (bmvtype == BMV_TYPE_INTERPOLATED) { GET_MVDATA(dmv_x[0], dmv_y[0]); - if(!mb_has_coeffs) { + if (!mb_has_coeffs) { /* interpolated skipped block */ vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype); vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype); @@ -2801,43 +4229,206 @@ } } vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype); - if(!s->mb_intra) { + if (!s->mb_intra) { vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype); } - if(s->mb_intra) + if (s->mb_intra) s->ac_pred = get_bits1(gb); cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); GET_MQUANT(); - s->current_picture.qscale_table[mb_pos] = mquant; - if(!v->ttmbf && !s->mb_intra && mb_has_coeffs) + s->current_picture.f.qscale_table[mb_pos] = mquant; + if (!v->ttmbf && !s->mb_intra && mb_has_coeffs) ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2); } } dst_idx = 0; - for (i=0; i<6; i++) - { + for (i = 0; i < 6; i++) { s->dc_val[0][s->block_index[i]] = 0; dst_idx += i >> 2; val = ((cbp >> (5 - i)) & 1); off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize); v->mb_type[0][s->block_index[i]] = s->mb_intra; - if(s->mb_intra) { + if (s->mb_intra) { /* check if prediction blocks A and C are available */ v->a_avail = v->c_avail = 0; - if(i == 2 || i == 3 || !s->first_slice_line) + if (i == 2 || i == 3 || !s->first_slice_line) + v->a_avail = v->mb_type[0][s->block_index[i] - s->block_wrap[i]]; + if (i == 1 || i == 3 || s->mb_x) + v->c_avail = v->mb_type[0][s->block_index[i] - 1]; + + vc1_decode_intra_block(v, s->block[i], i, val, mquant, + (i & 4) ? v->codingset2 : v->codingset); + if ((i>3) && (s->flags & CODEC_FLAG_GRAY)) + continue; + v->vc1dsp.vc1_inv_trans_8x8(s->block[i]); + if (v->rangeredfrm) + for (j = 0; j < 64; j++) + s->block[i][j] <<= 1; + s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize); + } else if (val) { + vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, + first_block, s->dest[dst_idx] + off, + (i & 4) ? s->uvlinesize : s->linesize, + (i & 4) && (s->flags & CODEC_FLAG_GRAY), NULL); + if (!v->ttmbf && ttmb < 8) + ttmb = -1; + first_block = 0; + } + } +} + +/** Decode one B-frame MB (in interlaced field B picture) + */ +static void vc1_decode_b_mb_intfi(VC1Context *v) +{ + MpegEncContext *s = &v->s; + GetBitContext *gb = &s->gb; + int i, j; + int mb_pos = s->mb_x + s->mb_y * s->mb_stride; + int cbp = 0; /* cbp decoding stuff */ + int mqdiff, mquant; /* MB quantization */ + int ttmb = v->ttfrm; /* MB Transform type */ + int mb_has_coeffs = 0; /* last_flag */ + int val; /* temp value */ + int first_block = 1; + int dst_idx, off; + int fwd; + int dmv_x[2], dmv_y[2], pred_flag[2]; + int bmvtype = BMV_TYPE_BACKWARD; + int idx_mbmode, interpmvp; + + mquant = v->pq; /* Loosy initialization */ + s->mb_intra = 0; + + idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_IF_MBMODE_VLC_BITS, 2); + if (idx_mbmode <= 1) { // intra MB + s->mb_intra = v->is_intra[s->mb_x] = 1; + s->current_picture.f.motion_val[1][s->block_index[0]][0] = 0; + s->current_picture.f.motion_val[1][s->block_index[0]][1] = 0; + s->current_picture.f.mb_type[mb_pos + v->mb_off] = MB_TYPE_INTRA; + GET_MQUANT(); + s->current_picture.f.qscale_table[mb_pos] = mquant; + /* Set DC scale - y and c use the same (not sure if necessary here) */ + s->y_dc_scale = s->y_dc_scale_table[mquant]; + s->c_dc_scale = s->c_dc_scale_table[mquant]; + v->s.ac_pred = v->acpred_plane[mb_pos] = get_bits1(gb); + mb_has_coeffs = idx_mbmode & 1; + if (mb_has_coeffs) + cbp = 1 + get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_ICBPCY_VLC_BITS, 2); + dst_idx = 0; + for (i = 0; i < 6; i++) { + s->dc_val[0][s->block_index[i]] = 0; + dst_idx += i >> 2; + val = ((cbp >> (5 - i)) & 1); + v->mb_type[0][s->block_index[i]] = s->mb_intra; + v->a_avail = v->c_avail = 0; + if (i == 2 || i == 3 || !s->first_slice_line) v->a_avail = v->mb_type[0][s->block_index[i] - s->block_wrap[i]]; - if(i == 1 || i == 3 || s->mb_x) + if (i == 1 || i == 3 || s->mb_x) v->c_avail = v->mb_type[0][s->block_index[i] - 1]; - vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset); - if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue; + vc1_decode_intra_block(v, s->block[i], i, val, mquant, + (i & 4) ? v->codingset2 : v->codingset); + if ((i>3) && (s->flags & CODEC_FLAG_GRAY)) + continue; v->vc1dsp.vc1_inv_trans_8x8(s->block[i]); - if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1; - s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize); - } else if(val) { - vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block, s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize, (i&4) && (s->flags & CODEC_FLAG_GRAY), NULL); - if(!v->ttmbf && ttmb < 8) ttmb = -1; - first_block = 0; + if (v->rangeredfrm) + for (j = 0; j < 64; j++) + s->block[i][j] <<= 1; + off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize); + off += v->cur_field_type ? ((i & 4) ? s->current_picture_ptr->f.linesize[1] : s->current_picture_ptr->f.linesize[0]) : 0; + s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i & 4) ? s->uvlinesize : s->linesize); + // TODO: yet to perform loop filter + } + } else { + s->mb_intra = v->is_intra[s->mb_x] = 0; + s->current_picture.f.mb_type[mb_pos + v->mb_off] = MB_TYPE_16x16; + for (i = 0; i < 6; i++) v->mb_type[0][s->block_index[i]] = 0; + if (v->fmb_is_raw) + fwd = v->forward_mb_plane[mb_pos] = get_bits1(gb); + else + fwd = v->forward_mb_plane[mb_pos]; + if (idx_mbmode <= 5) { // 1-MV + dmv_x[0] = dmv_x[1] = dmv_y[0] = dmv_y[1] = 0; + pred_flag[0] = pred_flag[1] = 0; + if (fwd) + bmvtype = BMV_TYPE_FORWARD; + else { + bmvtype = decode012(gb); + switch (bmvtype) { + case 0: + bmvtype = BMV_TYPE_BACKWARD; + break; + case 1: + bmvtype = BMV_TYPE_DIRECT; + break; + case 2: + bmvtype = BMV_TYPE_INTERPOLATED; + interpmvp = get_bits1(gb); + } + } + v->bmvtype = bmvtype; + if (bmvtype != BMV_TYPE_DIRECT && idx_mbmode & 1) { + get_mvdata_interlaced(v, &dmv_x[bmvtype == BMV_TYPE_BACKWARD], &dmv_y[bmvtype == BMV_TYPE_BACKWARD], &pred_flag[bmvtype == BMV_TYPE_BACKWARD]); + } + if (bmvtype == BMV_TYPE_INTERPOLATED && interpmvp) { + get_mvdata_interlaced(v, &dmv_x[1], &dmv_y[1], &pred_flag[1]); + } + if (bmvtype == BMV_TYPE_DIRECT) { + dmv_x[0] = dmv_y[0] = pred_flag[0] = 0; + dmv_x[1] = dmv_y[1] = pred_flag[0] = 0; + } + vc1_pred_b_mv_intfi(v, 0, dmv_x, dmv_y, 1, pred_flag); + vc1_b_mc(v, dmv_x, dmv_y, (bmvtype == BMV_TYPE_DIRECT), bmvtype); + mb_has_coeffs = !(idx_mbmode & 2); + } else { // 4-MV + if (fwd) + bmvtype = BMV_TYPE_FORWARD; + v->bmvtype = bmvtype; + v->fourmvbp = get_vlc2(gb, v->fourmvbp_vlc->table, VC1_4MV_BLOCK_PATTERN_VLC_BITS, 1); + for (i = 0; i < 6; i++) { + if (i < 4) { + dmv_x[0] = dmv_y[0] = pred_flag[0] = 0; + dmv_x[1] = dmv_y[1] = pred_flag[1] = 0; + val = ((v->fourmvbp >> (3 - i)) & 1); + if (val) { + get_mvdata_interlaced(v, &dmv_x[bmvtype == BMV_TYPE_BACKWARD], + &dmv_y[bmvtype == BMV_TYPE_BACKWARD], + &pred_flag[bmvtype == BMV_TYPE_BACKWARD]); + } + vc1_pred_b_mv_intfi(v, i, dmv_x, dmv_y, 0, pred_flag); + vc1_mc_4mv_luma(v, i, bmvtype == BMV_TYPE_BACKWARD); + } else if (i == 4) + vc1_mc_4mv_chroma(v, bmvtype == BMV_TYPE_BACKWARD); + } + mb_has_coeffs = idx_mbmode & 1; + } + if (mb_has_coeffs) + cbp = 1 + get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); + if (cbp) { + GET_MQUANT(); + } + s->current_picture.f.qscale_table[mb_pos] = mquant; + if (!v->ttmbf && cbp) { + ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2); + } + dst_idx = 0; + for (i = 0; i < 6; i++) { + s->dc_val[0][s->block_index[i]] = 0; + dst_idx += i >> 2; + val = ((cbp >> (5 - i)) & 1); + off = (i & 4) ? 0 : (i & 1) * 8 + (i & 2) * 4 * s->linesize; + if (v->cur_field_type) + off += (i & 4) ? s->current_picture_ptr->f.linesize[1] : s->current_picture_ptr->f.linesize[0]; + if (val) { + vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, + first_block, s->dest[dst_idx] + off, + (i & 4) ? s->uvlinesize : s->linesize, + (i & 4) && (s->flags & CODEC_FLAG_GRAY), NULL); + if (!v->ttmbf && ttmb < 8) + ttmb = -1; + first_block = 0; + } } } } @@ -2853,7 +4444,7 @@ int mb_pos; /* select codingmode used for VLC tables selection */ - switch(v->y_ac_table_index){ + switch (v->y_ac_table_index) { case 0: v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA; break; @@ -2865,7 +4456,7 @@ break; } - switch(v->c_ac_table_index){ + switch (v->c_ac_table_index) { case 0: v->codingset2 = (v->pqindex <= 8) ? CS_HIGH_RATE_INTER : CS_LOW_MOT_INTER; break; @@ -2883,12 +4474,12 @@ //do frame decode s->mb_x = s->mb_y = 0; - s->mb_intra = 1; + s->mb_intra = 1; s->first_slice_line = 1; - for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) { + for (s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) { s->mb_x = 0; ff_init_block_index(s); - for(; s->mb_x < s->mb_width; s->mb_x++) { + for (; s->mb_x < s->mb_width; s->mb_x++) { uint8_t *dst[6]; ff_update_block_index(s); dst[0] = s->dest[0]; @@ -2899,53 +4490,58 @@ dst[5] = s->dest[2]; s->dsp.clear_blocks(s->block[0]); mb_pos = s->mb_x + s->mb_y * s->mb_width; - s->current_picture.mb_type[mb_pos] = MB_TYPE_INTRA; - s->current_picture.qscale_table[mb_pos] = v->pq; - s->current_picture.motion_val[1][s->block_index[0]][0] = 0; - s->current_picture.motion_val[1][s->block_index[0]][1] = 0; + s->current_picture.f.mb_type[mb_pos] = MB_TYPE_INTRA; + s->current_picture.f.qscale_table[mb_pos] = v->pq; + s->current_picture.f.motion_val[1][s->block_index[0]][0] = 0; + s->current_picture.f.motion_val[1][s->block_index[0]][1] = 0; // do actual MB decoding and displaying cbp = get_vlc2(&v->s.gb, ff_msmp4_mb_i_vlc.table, MB_INTRA_VLC_BITS, 2); v->s.ac_pred = get_bits1(&v->s.gb); - for(k = 0; k < 6; k++) { + for (k = 0; k < 6; k++) { val = ((cbp >> (5 - k)) & 1); if (k < 4) { - int pred = vc1_coded_block_pred(&v->s, k, &coded_val); - val = val ^ pred; + int pred = vc1_coded_block_pred(&v->s, k, &coded_val); + val = val ^ pred; *coded_val = val; } cbp |= val << (5 - k); - vc1_decode_i_block(v, s->block[k], k, val, (k<4)? v->codingset : v->codingset2); + vc1_decode_i_block(v, s->block[k], k, val, (k < 4) ? v->codingset : v->codingset2); - if (k > 3 && (s->flags & CODEC_FLAG_GRAY)) continue; + if (k > 3 && (s->flags & CODEC_FLAG_GRAY)) + continue; v->vc1dsp.vc1_inv_trans_8x8(s->block[k]); - if(v->pq >= 9 && v->overlap) { - if (v->rangeredfrm) for(j = 0; j < 64; j++) s->block[k][j] <<= 1; + if (v->pq >= 9 && v->overlap) { + if (v->rangeredfrm) + for (j = 0; j < 64; j++) + s->block[k][j] <<= 1; s->dsp.put_signed_pixels_clamped(s->block[k], dst[k], k & 4 ? s->uvlinesize : s->linesize); } else { - if (v->rangeredfrm) for(j = 0; j < 64; j++) s->block[k][j] = (s->block[k][j] - 64) << 1; + if (v->rangeredfrm) + for (j = 0; j < 64; j++) + s->block[k][j] = (s->block[k][j] - 64) << 1; s->dsp.put_pixels_clamped(s->block[k], dst[k], k & 4 ? s->uvlinesize : s->linesize); } } - if(v->pq >= 9 && v->overlap) { - if(s->mb_x) { + if (v->pq >= 9 && v->overlap) { + if (s->mb_x) { v->vc1dsp.vc1_h_overlap(s->dest[0], s->linesize); v->vc1dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize, s->linesize); - if(!(s->flags & CODEC_FLAG_GRAY)) { + if (!(s->flags & CODEC_FLAG_GRAY)) { v->vc1dsp.vc1_h_overlap(s->dest[1], s->uvlinesize); v->vc1dsp.vc1_h_overlap(s->dest[2], s->uvlinesize); } } v->vc1dsp.vc1_h_overlap(s->dest[0] + 8, s->linesize); v->vc1dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize); - if(!s->first_slice_line) { + if (!s->first_slice_line) { v->vc1dsp.vc1_v_overlap(s->dest[0], s->linesize); v->vc1dsp.vc1_v_overlap(s->dest[0] + 8, s->linesize); - if(!(s->flags & CODEC_FLAG_GRAY)) { + if (!(s->flags & CODEC_FLAG_GRAY)) { v->vc1dsp.vc1_v_overlap(s->dest[1], s->uvlinesize); v->vc1dsp.vc1_v_overlap(s->dest[2], s->uvlinesize); } @@ -2953,24 +4549,25 @@ v->vc1dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize, s->linesize); v->vc1dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize); } - if(v->s.loop_filter) vc1_loop_filter_iblk(v, v->pq); + if (v->s.loop_filter) vc1_loop_filter_iblk(v, v->pq); - if(get_bits_count(&s->gb) > v->bits) { - ff_er_add_slice(s, 0, 0, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)); - av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i\n", get_bits_count(&s->gb), v->bits); + if (get_bits_count(&s->gb) > v->bits) { + ff_er_add_slice(s, 0, 0, s->mb_x, s->mb_y, ER_MB_ERROR); + av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i\n", + get_bits_count(&s->gb), v->bits); return; } } if (!v->s.loop_filter) ff_draw_horiz_band(s, s->mb_y * 16, 16); else if (s->mb_y) - ff_draw_horiz_band(s, (s->mb_y-1) * 16, 16); + ff_draw_horiz_band(s, (s->mb_y - 1) * 16, 16); s->first_slice_line = 0; } if (v->s.loop_filter) - ff_draw_horiz_band(s, (s->mb_height-1)*16, 16); - ff_er_add_slice(s, 0, 0, s->mb_width - 1, s->mb_height - 1, (AC_END|DC_END|MV_END)); + ff_draw_horiz_band(s, (s->mb_height - 1) * 16, 16); + ff_er_add_slice(s, 0, 0, s->mb_width - 1, s->mb_height - 1, ER_MB_END); } /** Decode blocks of I-frame for advanced profile @@ -2987,7 +4584,7 @@ GetBitContext *gb = &s->gb; /* select codingmode used for VLC tables selection */ - switch(v->y_ac_table_index){ + switch (v->y_ac_table_index) { case 0: v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA; break; @@ -2999,7 +4596,7 @@ break; } - switch(v->c_ac_table_index){ + switch (v->c_ac_table_index) { case 0: v->codingset2 = (v->pqindex <= 8) ? CS_HIGH_RATE_INTER : CS_LOW_MOT_INTER; break; @@ -3011,32 +4608,34 @@ break; } - //do frame decode - s->mb_x = s->mb_y = 0; - s->mb_intra = 1; + // do frame decode + s->mb_x = s->mb_y = 0; + s->mb_intra = 1; s->first_slice_line = 1; - s->mb_y = s->start_mb_y; + s->mb_y = s->start_mb_y; if (s->start_mb_y) { s->mb_x = 0; ff_init_block_index(s); - memset(&s->coded_block[s->block_index[0]-s->b8_stride], 0, - s->b8_stride * sizeof(*s->coded_block)); + memset(&s->coded_block[s->block_index[0] - s->b8_stride], 0, + (1 + s->b8_stride) * sizeof(*s->coded_block)); } - for(; s->mb_y < s->end_mb_y; s->mb_y++) { + for (; s->mb_y < s->end_mb_y; s->mb_y++) { s->mb_x = 0; ff_init_block_index(s); - for(;s->mb_x < s->mb_width; s->mb_x++) { + for (;s->mb_x < s->mb_width; s->mb_x++) { DCTELEM (*block)[64] = v->block[v->cur_blk_idx]; ff_update_block_index(s); s->dsp.clear_blocks(block[0]); mb_pos = s->mb_x + s->mb_y * s->mb_stride; - s->current_picture.mb_type[mb_pos] = MB_TYPE_INTRA; - s->current_picture.motion_val[1][s->block_index[0]][0] = 0; - s->current_picture.motion_val[1][s->block_index[0]][1] = 0; + s->current_picture.f.mb_type[mb_pos + v->mb_off] = MB_TYPE_INTRA; + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][0] = 0; + s->current_picture.f.motion_val[1][s->block_index[0] + v->blocks_off][1] = 0; // do actual MB decoding and displaying + if (v->fieldtx_is_raw) + v->fieldtx_plane[mb_pos] = get_bits1(&v->s.gb); cbp = get_vlc2(&v->s.gb, ff_msmp4_mb_i_vlc.table, MB_INTRA_VLC_BITS, 2); - if(v->acpred_is_raw) + if ( v->acpred_is_raw) v->s.ac_pred = get_bits1(&v->s.gb); else v->s.ac_pred = v->acpred_plane[mb_pos]; @@ -3046,37 +4645,41 @@ GET_MQUANT(); - s->current_picture.qscale_table[mb_pos] = mquant; + s->current_picture.f.qscale_table[mb_pos] = mquant; /* Set DC scale - y and c use the same */ s->y_dc_scale = s->y_dc_scale_table[mquant]; s->c_dc_scale = s->c_dc_scale_table[mquant]; - for(k = 0; k < 6; k++) { + for (k = 0; k < 6; k++) { val = ((cbp >> (5 - k)) & 1); if (k < 4) { - int pred = vc1_coded_block_pred(&v->s, k, &coded_val); - val = val ^ pred; + int pred = vc1_coded_block_pred(&v->s, k, &coded_val); + val = val ^ pred; *coded_val = val; } cbp |= val << (5 - k); - v->a_avail = !s->first_slice_line || (k==2 || k==3); - v->c_avail = !!s->mb_x || (k==1 || k==3); + v->a_avail = !s->first_slice_line || (k == 2 || k == 3); + v->c_avail = !!s->mb_x || (k == 1 || k == 3); - vc1_decode_i_block_adv(v, block[k], k, val, (k<4)? v->codingset : v->codingset2, mquant); + vc1_decode_i_block_adv(v, block[k], k, val, + (k < 4) ? v->codingset : v->codingset2, mquant); - if (k > 3 && (s->flags & CODEC_FLAG_GRAY)) continue; + if (k > 3 && (s->flags & CODEC_FLAG_GRAY)) + continue; v->vc1dsp.vc1_inv_trans_8x8(block[k]); } vc1_smooth_overlap_filter_iblk(v); vc1_put_signed_blocks_clamped(v); - if(v->s.loop_filter) vc1_loop_filter_iblk_delayed(v, v->pq); + if (v->s.loop_filter) vc1_loop_filter_iblk_delayed(v, v->pq); - if(get_bits_count(&s->gb) > v->bits) { - ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)); - av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i\n", get_bits_count(&s->gb), v->bits); + if (get_bits_count(&s->gb) > v->bits) { + // TODO: may need modification to handle slice coding + ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR); + av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i\n", + get_bits_count(&s->gb), v->bits); return; } } @@ -3090,14 +4693,16 @@ /* raw bottom MB row */ s->mb_x = 0; ff_init_block_index(s); - for(;s->mb_x < s->mb_width; s->mb_x++) { + for (;s->mb_x < s->mb_width; s->mb_x++) { ff_update_block_index(s); vc1_put_signed_blocks_clamped(v); - if(v->s.loop_filter) vc1_loop_filter_iblk_delayed(v, v->pq); + if (v->s.loop_filter) + vc1_loop_filter_iblk_delayed(v, v->pq); } if (v->s.loop_filter) - ff_draw_horiz_band(s, (s->mb_height-1)*16, 16); - ff_er_add_slice(s, 0, s->start_mb_y, s->mb_width - 1, s->end_mb_y - 1, (AC_END|DC_END|MV_END)); + ff_draw_horiz_band(s, (s->end_mb_y-1)*16, 16); + ff_er_add_slice(s, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, + (s->end_mb_y << v->field_mode) - 1, ER_MB_END); } static void vc1_decode_p_blocks(VC1Context *v) @@ -3106,7 +4711,7 @@ int apply_loop_filter; /* select codingmode used for VLC tables selection */ - switch(v->c_ac_table_index){ + switch (v->c_ac_table_index) { case 0: v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA; break; @@ -3118,7 +4723,7 @@ break; } - switch(v->c_ac_table_index){ + switch (v->c_ac_table_index) { case 0: v->codingset2 = (v->pqindex <= 8) ? CS_HIGH_RATE_INTER : CS_LOW_MOT_INTER; break; @@ -3130,29 +4735,35 @@ break; } - apply_loop_filter = s->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY); + apply_loop_filter = s->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY); s->first_slice_line = 1; memset(v->cbp_base, 0, sizeof(v->cbp_base[0])*2*s->mb_stride); - for(s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) { + for (s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) { s->mb_x = 0; ff_init_block_index(s); - for(; s->mb_x < s->mb_width; s->mb_x++) { + for (; s->mb_x < s->mb_width; s->mb_x++) { ff_update_block_index(s); - vc1_decode_p_mb(v); - if (s->mb_y != s->start_mb_y && apply_loop_filter) + if (v->fcm == ILACE_FIELD) + vc1_decode_p_mb_intfi(v); + else if (v->fcm == ILACE_FRAME) + vc1_decode_p_mb_intfr(v); + else vc1_decode_p_mb(v); + if (s->mb_y != s->start_mb_y && apply_loop_filter && v->fcm == PROGRESSIVE) vc1_apply_p_loop_filter(v); - if(get_bits_count(&s->gb) > v->bits || get_bits_count(&s->gb) < 0) { - ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)); - av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i at %ix%i\n", get_bits_count(&s->gb), v->bits,s->mb_x,s->mb_y); + if (get_bits_count(&s->gb) > v->bits || get_bits_count(&s->gb) < 0) { + // TODO: may need modification to handle slice coding + ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR); + av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i at %ix%i\n", + get_bits_count(&s->gb), v->bits, s->mb_x, s->mb_y); return; } } - memmove(v->cbp_base, v->cbp, sizeof(v->cbp_base[0])*s->mb_stride); - memmove(v->ttblk_base, v->ttblk, sizeof(v->ttblk_base[0])*s->mb_stride); - memmove(v->is_intra_base, v->is_intra, sizeof(v->is_intra_base[0])*s->mb_stride); - memmove(v->luma_mv_base, v->luma_mv, sizeof(v->luma_mv_base[0])*s->mb_stride); - if (s->mb_y != s->start_mb_y) ff_draw_horiz_band(s, (s->mb_y-1) * 16, 16); + memmove(v->cbp_base, v->cbp, sizeof(v->cbp_base[0]) * s->mb_stride); + memmove(v->ttblk_base, v->ttblk, sizeof(v->ttblk_base[0]) * s->mb_stride); + memmove(v->is_intra_base, v->is_intra, sizeof(v->is_intra_base[0]) * s->mb_stride); + memmove(v->luma_mv_base, v->luma_mv, sizeof(v->luma_mv_base[0]) * s->mb_stride); + if (s->mb_y != s->start_mb_y) ff_draw_horiz_band(s, (s->mb_y - 1) * 16, 16); s->first_slice_line = 0; } if (apply_loop_filter) { @@ -3164,8 +4775,9 @@ } } if (s->end_mb_y >= s->start_mb_y) - ff_draw_horiz_band(s, (s->end_mb_y-1) * 16, 16); - ff_er_add_slice(s, 0, s->start_mb_y, s->mb_width - 1, s->end_mb_y - 1, (AC_END|DC_END|MV_END)); + ff_draw_horiz_band(s, (s->end_mb_y - 1) * 16, 16); + ff_er_add_slice(s, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, + (s->end_mb_y << v->field_mode) - 1, ER_MB_END); } static void vc1_decode_b_blocks(VC1Context *v) @@ -3173,7 +4785,7 @@ MpegEncContext *s = &v->s; /* select codingmode used for VLC tables selection */ - switch(v->c_ac_table_index){ + switch (v->c_ac_table_index) { case 0: v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA; break; @@ -3185,7 +4797,7 @@ break; } - switch(v->c_ac_table_index){ + switch (v->c_ac_table_index) { case 0: v->codingset2 = (v->pqindex <= 8) ? CS_HIGH_RATE_INTER : CS_LOW_MOT_INTER; break; @@ -3198,44 +4810,50 @@ } s->first_slice_line = 1; - for(s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) { + for (s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) { s->mb_x = 0; ff_init_block_index(s); - for(; s->mb_x < s->mb_width; s->mb_x++) { + for (; s->mb_x < s->mb_width; s->mb_x++) { ff_update_block_index(s); - vc1_decode_b_mb(v); - if(get_bits_count(&s->gb) > v->bits || get_bits_count(&s->gb) < 0) { - ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)); - av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i at %ix%i\n", get_bits_count(&s->gb), v->bits,s->mb_x,s->mb_y); + if (v->fcm == ILACE_FIELD) + vc1_decode_b_mb_intfi(v); + else + vc1_decode_b_mb(v); + if (get_bits_count(&s->gb) > v->bits || get_bits_count(&s->gb) < 0) { + // TODO: may need modification to handle slice coding + ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR); + av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i at %ix%i\n", + get_bits_count(&s->gb), v->bits, s->mb_x, s->mb_y); return; } - if(v->s.loop_filter) vc1_loop_filter_iblk(v, v->pq); + if (v->s.loop_filter) vc1_loop_filter_iblk(v, v->pq); } if (!v->s.loop_filter) ff_draw_horiz_band(s, s->mb_y * 16, 16); else if (s->mb_y) - ff_draw_horiz_band(s, (s->mb_y-1) * 16, 16); + ff_draw_horiz_band(s, (s->mb_y - 1) * 16, 16); s->first_slice_line = 0; } if (v->s.loop_filter) - ff_draw_horiz_band(s, (s->mb_height-1)*16, 16); - ff_er_add_slice(s, 0, s->start_mb_y, s->mb_width - 1, s->end_mb_y - 1, (AC_END|DC_END|MV_END)); + ff_draw_horiz_band(s, (s->end_mb_y - 1) * 16, 16); + ff_er_add_slice(s, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, + (s->end_mb_y << v->field_mode) - 1, ER_MB_END); } static void vc1_decode_skip_blocks(VC1Context *v) { MpegEncContext *s = &v->s; - ff_er_add_slice(s, 0, 0, s->mb_width - 1, s->mb_height - 1, (AC_END|DC_END|MV_END)); + ff_er_add_slice(s, 0, s->start_mb_y, s->mb_width - 1, s->end_mb_y - 1, ER_MB_END); s->first_slice_line = 1; - for(s->mb_y = 0; s->mb_y < s->mb_height; s->mb_y++) { + for (s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) { s->mb_x = 0; ff_init_block_index(s); ff_update_block_index(s); - memcpy(s->dest[0], s->last_picture.data[0] + s->mb_y * 16 * s->linesize, s->linesize * 16); - memcpy(s->dest[1], s->last_picture.data[1] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8); - memcpy(s->dest[2], s->last_picture.data[2] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8); + memcpy(s->dest[0], s->last_picture.f.data[0] + s->mb_y * 16 * s->linesize, s->linesize * 16); + memcpy(s->dest[1], s->last_picture.f.data[1] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8); + memcpy(s->dest[2], s->last_picture.f.data[2] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8); ff_draw_horiz_band(s, s->mb_y * 16, 16); s->first_slice_line = 0; } @@ -3246,147 +4864,376 @@ { v->s.esc3_level_length = 0; - if(v->x8_type){ - ff_intrax8_decode_picture(&v->x8, 2*v->pq+v->halfpq, v->pq*(!v->pquantizer) ); - }else{ - v->cur_blk_idx = 0; - v->left_blk_idx = -1; - v->topleft_blk_idx = 1; - v->top_blk_idx = 2; - switch(v->s.pict_type) { + if (v->x8_type) { + ff_intrax8_decode_picture(&v->x8, 2*v->pq + v->halfpq, v->pq * !v->pquantizer); + } else { + v->cur_blk_idx = 0; + v->left_blk_idx = -1; + v->topleft_blk_idx = 1; + v->top_blk_idx = 2; + switch (v->s.pict_type) { case AV_PICTURE_TYPE_I: - if(v->profile == PROFILE_ADVANCED) + if (v->profile == PROFILE_ADVANCED) vc1_decode_i_blocks_adv(v); else vc1_decode_i_blocks(v); break; case AV_PICTURE_TYPE_P: - if(v->p_frame_skipped) + if (v->p_frame_skipped) vc1_decode_skip_blocks(v); else vc1_decode_p_blocks(v); break; case AV_PICTURE_TYPE_B: - if(v->bi_type){ - if(v->profile == PROFILE_ADVANCED) + if (v->bi_type) { + if (v->profile == PROFILE_ADVANCED) vc1_decode_i_blocks_adv(v); else vc1_decode_i_blocks(v); - }else + } else vc1_decode_b_blocks(v); break; } } } -static inline float get_float_val(GetBitContext* gb) +#if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER + +typedef struct { + /** + * Transform coefficients for both sprites in 16.16 fixed point format, + * in the order they appear in the bitstream: + * x scale + * rotation 1 (unused) + * x offset + * rotation 2 (unused) + * y scale + * y offset + * alpha + */ + int coefs[2][7]; + + int effect_type, effect_flag; + int effect_pcount1, effect_pcount2; ///< amount of effect parameters stored in effect_params + int effect_params1[15], effect_params2[10]; ///< effect parameters in 16.16 fixed point format +} SpriteData; + +static inline int get_fp_val(GetBitContext* gb) { - return (float)get_bits_long(gb, 30) / (1<<15) - (1<<14); + return (get_bits_long(gb, 30) - (1 << 29)) << 1; } -static void vc1_sprite_parse_transform(VC1Context *v, GetBitContext* gb, float c[7]) +static void vc1_sprite_parse_transform(GetBitContext* gb, int c[7]) { - c[1] = c[3] = 0.0f; + c[1] = c[3] = 0; switch (get_bits(gb, 2)) { case 0: - c[0] = 1.0f; - c[2] = get_float_val(gb); - c[4] = 1.0f; + c[0] = 1 << 16; + c[2] = get_fp_val(gb); + c[4] = 1 << 16; break; case 1: - c[0] = c[4] = get_float_val(gb); - c[2] = get_float_val(gb); + c[0] = c[4] = get_fp_val(gb); + c[2] = get_fp_val(gb); break; case 2: - c[0] = get_float_val(gb); - c[2] = get_float_val(gb); - c[4] = get_float_val(gb); + c[0] = get_fp_val(gb); + c[2] = get_fp_val(gb); + c[4] = get_fp_val(gb); break; case 3: - av_log_ask_for_sample(v->s.avctx, NULL); - c[0] = get_float_val(gb); - c[1] = get_float_val(gb); - c[2] = get_float_val(gb); - c[3] = get_float_val(gb); - c[4] = get_float_val(gb); + c[0] = get_fp_val(gb); + c[1] = get_fp_val(gb); + c[2] = get_fp_val(gb); + c[3] = get_fp_val(gb); + c[4] = get_fp_val(gb); break; } - c[5] = get_float_val(gb); + c[5] = get_fp_val(gb); if (get_bits1(gb)) - c[6] = get_float_val(gb); + c[6] = get_fp_val(gb); else - c[6] = 1.0f; + c[6] = 1 << 16; } -static void vc1_parse_sprites(VC1Context *v, GetBitContext* gb) +static void vc1_parse_sprites(VC1Context *v, GetBitContext* gb, SpriteData* sd) { - int effect_type, effect_flag, effect_pcount1, effect_pcount2, i; - float effect_params1[14], effect_params2[10]; - - float coefs[2][7]; - vc1_sprite_parse_transform(v, gb, coefs[0]); - av_log(v->s.avctx, AV_LOG_DEBUG, "S1:"); - for (i = 0; i < 7; i++) - av_log(v->s.avctx, AV_LOG_DEBUG, " %.3f", coefs[0][i]); - av_log(v->s.avctx, AV_LOG_DEBUG, "\n"); + AVCodecContext *avctx = v->s.avctx; + int sprite, i; - if (v->two_sprites) { - vc1_sprite_parse_transform(v, gb, coefs[1]); - av_log(v->s.avctx, AV_LOG_DEBUG, "S2:"); + for (sprite = 0; sprite <= v->two_sprites; sprite++) { + vc1_sprite_parse_transform(gb, sd->coefs[sprite]); + if (sd->coefs[sprite][1] || sd->coefs[sprite][3]) + av_log_ask_for_sample(avctx, "Rotation coefficients are not zero"); + av_log(avctx, AV_LOG_DEBUG, sprite ? "S2:" : "S1:"); for (i = 0; i < 7; i++) - av_log(v->s.avctx, AV_LOG_DEBUG, " %.3f", coefs[1][i]); - av_log(v->s.avctx, AV_LOG_DEBUG, "\n"); + av_log(avctx, AV_LOG_DEBUG, " %d.%.3d", + sd->coefs[sprite][i] / (1<<16), + (abs(sd->coefs[sprite][i]) & 0xFFFF) * 1000 / (1 << 16)); + av_log(avctx, AV_LOG_DEBUG, "\n"); } + skip_bits(gb, 2); - if (effect_type = get_bits_long(gb, 30)){ - switch (effect_pcount1 = get_bits(gb, 4)) { - case 2: - effect_params1[0] = get_float_val(gb); - effect_params1[1] = get_float_val(gb); - break; + if (sd->effect_type = get_bits_long(gb, 30)) { + switch (sd->effect_pcount1 = get_bits(gb, 4)) { case 7: - vc1_sprite_parse_transform(v, gb, effect_params1); + vc1_sprite_parse_transform(gb, sd->effect_params1); break; case 14: - vc1_sprite_parse_transform(v, gb, effect_params1); - vc1_sprite_parse_transform(v, gb, &effect_params1[7]); + vc1_sprite_parse_transform(gb, sd->effect_params1); + vc1_sprite_parse_transform(gb, sd->effect_params1 + 7); break; default: - av_log_ask_for_sample(v->s.avctx, NULL); - return; + for (i = 0; i < sd->effect_pcount1; i++) + sd->effect_params1[i] = get_fp_val(gb); } - if (effect_type != 13 || effect_params1[0] != coefs[0][6]) { + if (sd->effect_type != 13 || sd->effect_params1[0] != sd->coefs[0][6]) { // effect 13 is simple alpha blending and matches the opacity above - av_log(v->s.avctx, AV_LOG_DEBUG, "Effect: %d; params: ", effect_type); - for (i = 0; i < effect_pcount1; i++) - av_log(v->s.avctx, AV_LOG_DEBUG, " %.3f", effect_params1[i]); - av_log(v->s.avctx, AV_LOG_DEBUG, "\n"); + av_log(avctx, AV_LOG_DEBUG, "Effect: %d; params: ", sd->effect_type); + for (i = 0; i < sd->effect_pcount1; i++) + av_log(avctx, AV_LOG_DEBUG, " %d.%.2d", + sd->effect_params1[i] / (1 << 16), + (abs(sd->effect_params1[i]) & 0xFFFF) * 1000 / (1 << 16)); + av_log(avctx, AV_LOG_DEBUG, "\n"); } - effect_pcount2 = get_bits(gb, 16); - if (effect_pcount2 > 10) { - av_log(v->s.avctx, AV_LOG_ERROR, "Too many effect parameters\n"); + sd->effect_pcount2 = get_bits(gb, 16); + if (sd->effect_pcount2 > 10) { + av_log(avctx, AV_LOG_ERROR, "Too many effect parameters\n"); return; - } else if (effect_pcount2) { - i = 0; - av_log(v->s.avctx, AV_LOG_DEBUG, "Effect params 2: "); - while (i < effect_pcount2){ - effect_params2[i] = get_float_val(gb); - av_log(v->s.avctx, AV_LOG_DEBUG, " %.3f", effect_params2[i]); - i++; + } else if (sd->effect_pcount2) { + i = -1; + av_log(avctx, AV_LOG_DEBUG, "Effect params 2: "); + while (++i < sd->effect_pcount2) { + sd->effect_params2[i] = get_fp_val(gb); + av_log(avctx, AV_LOG_DEBUG, " %d.%.2d", + sd->effect_params2[i] / (1 << 16), + (abs(sd->effect_params2[i]) & 0xFFFF) * 1000 / (1 << 16)); } - av_log(v->s.avctx, AV_LOG_DEBUG, "\n"); + av_log(avctx, AV_LOG_DEBUG, "\n"); } } - if (effect_flag = get_bits1(gb)) - av_log(v->s.avctx, AV_LOG_DEBUG, "Effect flag set\n"); + if (sd->effect_flag = get_bits1(gb)) + av_log(avctx, AV_LOG_DEBUG, "Effect flag set\n"); if (get_bits_count(gb) >= gb->size_in_bits + - (v->s.avctx->codec_id == CODEC_ID_WMV3 ? 64 : 0)) - av_log(v->s.avctx, AV_LOG_ERROR, "Buffer overrun\n"); + (avctx->codec_id == CODEC_ID_WMV3IMAGE ? 64 : 0)) + av_log(avctx, AV_LOG_ERROR, "Buffer overrun\n"); if (get_bits_count(gb) < gb->size_in_bits - 8) - av_log(v->s.avctx, AV_LOG_WARNING, "Buffer not fully read\n"); + av_log(avctx, AV_LOG_WARNING, "Buffer not fully read\n"); +} + +static void vc1_draw_sprites(VC1Context *v, SpriteData* sd) +{ + int i, plane, row, sprite; + int sr_cache[2][2] = { { -1, -1 }, { -1, -1 } }; + uint8_t* src_h[2][2]; + int xoff[2], xadv[2], yoff[2], yadv[2], alpha; + int ysub[2]; + MpegEncContext *s = &v->s; + + for (i = 0; i < 2; i++) { + xoff[i] = av_clip(sd->coefs[i][2], 0, v->sprite_width-1 << 16); + xadv[i] = sd->coefs[i][0]; + if (xadv[i] != 1<<16 || (v->sprite_width << 16) - (v->output_width << 16) - xoff[i]) + xadv[i] = av_clip(xadv[i], 0, ((v->sprite_width<<16) - xoff[i] - 1) / v->output_width); + + yoff[i] = av_clip(sd->coefs[i][5], 0, v->sprite_height-1 << 16); + yadv[i] = av_clip(sd->coefs[i][4], 0, ((v->sprite_height << 16) - yoff[i]) / v->output_height); + } + alpha = av_clip(sd->coefs[1][6], 0, (1<<16) - 1); + + for (plane = 0; plane < (s->flags&CODEC_FLAG_GRAY ? 1 : 3); plane++) { + int width = v->output_width>>!!plane; + + for (row = 0; row < v->output_height>>!!plane; row++) { + uint8_t *dst = v->sprite_output_frame.data[plane] + + v->sprite_output_frame.linesize[plane] * row; + + for (sprite = 0; sprite <= v->two_sprites; sprite++) { + uint8_t *iplane = s->current_picture.f.data[plane]; + int iline = s->current_picture.f.linesize[plane]; + int ycoord = yoff[sprite] + yadv[sprite] * row; + int yline = ycoord >> 16; + ysub[sprite] = ycoord & 0xFFFF; + if (sprite) { + iplane = s->last_picture.f.data[plane]; + iline = s->last_picture.f.linesize[plane]; + } + if (!(xoff[sprite] & 0xFFFF) && xadv[sprite] == 1 << 16) { + src_h[sprite][0] = iplane + (xoff[sprite] >> 16) + yline * iline; + if (ysub[sprite]) + src_h[sprite][1] = iplane + (xoff[sprite] >> 16) + (yline + 1) * iline; + } else { + if (sr_cache[sprite][0] != yline) { + if (sr_cache[sprite][1] == yline) { + FFSWAP(uint8_t*, v->sr_rows[sprite][0], v->sr_rows[sprite][1]); + FFSWAP(int, sr_cache[sprite][0], sr_cache[sprite][1]); + } else { + v->vc1dsp.sprite_h(v->sr_rows[sprite][0], iplane + yline * iline, xoff[sprite], xadv[sprite], width); + sr_cache[sprite][0] = yline; + } + } + if (ysub[sprite] && sr_cache[sprite][1] != yline + 1) { + v->vc1dsp.sprite_h(v->sr_rows[sprite][1], iplane + (yline + 1) * iline, xoff[sprite], xadv[sprite], width); + sr_cache[sprite][1] = yline + 1; + } + src_h[sprite][0] = v->sr_rows[sprite][0]; + src_h[sprite][1] = v->sr_rows[sprite][1]; + } + } + + if (!v->two_sprites) { + if (ysub[0]) { + v->vc1dsp.sprite_v_single(dst, src_h[0][0], src_h[0][1], ysub[0], width); + } else { + memcpy(dst, src_h[0][0], width); + } + } else { + if (ysub[0] && ysub[1]) { + v->vc1dsp.sprite_v_double_twoscale(dst, src_h[0][0], src_h[0][1], ysub[0], + src_h[1][0], src_h[1][1], ysub[1], alpha, width); + } else if (ysub[0]) { + v->vc1dsp.sprite_v_double_onescale(dst, src_h[0][0], src_h[0][1], ysub[0], + src_h[1][0], alpha, width); + } else if (ysub[1]) { + v->vc1dsp.sprite_v_double_onescale(dst, src_h[1][0], src_h[1][1], ysub[1], + src_h[0][0], (1<<16)-1-alpha, width); + } else { + v->vc1dsp.sprite_v_double_noscale(dst, src_h[0][0], src_h[1][0], alpha, width); + } + } + } + + if (!plane) { + for (i = 0; i < 2; i++) { + xoff[i] >>= 1; + yoff[i] >>= 1; + } + } + + } +} + + +static int vc1_decode_sprites(VC1Context *v, GetBitContext* gb) +{ + MpegEncContext *s = &v->s; + AVCodecContext *avctx = s->avctx; + SpriteData sd; + + vc1_parse_sprites(v, gb, &sd); + + if (!s->current_picture.f.data[0]) { + av_log(avctx, AV_LOG_ERROR, "Got no sprites\n"); + return -1; + } + + if (v->two_sprites && (!s->last_picture_ptr || !s->last_picture.f.data[0])) { + av_log(avctx, AV_LOG_WARNING, "Need two sprites, only got one\n"); + v->two_sprites = 0; + } + + if (v->sprite_output_frame.data[0]) + avctx->release_buffer(avctx, &v->sprite_output_frame); + + v->sprite_output_frame.buffer_hints = FF_BUFFER_HINTS_VALID; + v->sprite_output_frame.reference = 0; + if (avctx->get_buffer(avctx, &v->sprite_output_frame) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return -1; + } + + vc1_draw_sprites(v, &sd); + + return 0; +} + +static void vc1_sprite_flush(AVCodecContext *avctx) +{ + VC1Context *v = avctx->priv_data; + MpegEncContext *s = &v->s; + AVFrame *f = &s->current_picture.f; + int plane, i; + + /* Windows Media Image codecs have a convergence interval of two keyframes. + Since we can't enforce it, clear to black the missing sprite. This is + wrong but it looks better than doing nothing. */ + + if (f->data[0]) + for (plane = 0; plane < (s->flags&CODEC_FLAG_GRAY ? 1 : 3); plane++) + for (i = 0; i < v->sprite_height>>!!plane; i++) + memset(f->data[plane] + i * f->linesize[plane], + plane ? 128 : 0, f->linesize[plane]); +} + +#endif + +static av_cold int vc1_decode_init_alloc_tables(VC1Context *v) +{ + MpegEncContext *s = &v->s; + int i; + + /* Allocate mb bitplanes */ + v->mv_type_mb_plane = av_malloc (s->mb_stride * s->mb_height); + v->direct_mb_plane = av_malloc (s->mb_stride * s->mb_height); + v->forward_mb_plane = av_malloc (s->mb_stride * s->mb_height); + v->fieldtx_plane = av_mallocz(s->mb_stride * s->mb_height); + v->acpred_plane = av_malloc (s->mb_stride * s->mb_height); + v->over_flags_plane = av_malloc (s->mb_stride * s->mb_height); + + v->n_allocated_blks = s->mb_width + 2; + v->block = av_malloc(sizeof(*v->block) * v->n_allocated_blks); + v->cbp_base = av_malloc(sizeof(v->cbp_base[0]) * 2 * s->mb_stride); + v->cbp = v->cbp_base + s->mb_stride; + v->ttblk_base = av_malloc(sizeof(v->ttblk_base[0]) * 2 * s->mb_stride); + v->ttblk = v->ttblk_base + s->mb_stride; + v->is_intra_base = av_mallocz(sizeof(v->is_intra_base[0]) * 2 * s->mb_stride); + v->is_intra = v->is_intra_base + s->mb_stride; + v->luma_mv_base = av_malloc(sizeof(v->luma_mv_base[0]) * 2 * s->mb_stride); + v->luma_mv = v->luma_mv_base + s->mb_stride; + + /* allocate block type info in that way so it could be used with s->block_index[] */ + v->mb_type_base = av_malloc(s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride * (s->mb_height + 1) * 2); + v->mb_type[0] = v->mb_type_base + s->b8_stride + 1; + v->mb_type[1] = v->mb_type_base + s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride + 1; + v->mb_type[2] = v->mb_type[1] + s->mb_stride * (s->mb_height + 1); + + /* allocate memory to store block level MV info */ + v->blk_mv_type_base = av_mallocz( s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride * (s->mb_height + 1) * 2); + v->blk_mv_type = v->blk_mv_type_base + s->b8_stride + 1; + v->mv_f_base = av_mallocz(2 * (s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride * (s->mb_height + 1) * 2)); + v->mv_f[0] = v->mv_f_base + s->b8_stride + 1; + v->mv_f[1] = v->mv_f[0] + (s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride * (s->mb_height + 1) * 2); + v->mv_f_last_base = av_mallocz(2 * (s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride * (s->mb_height + 1) * 2)); + v->mv_f_last[0] = v->mv_f_last_base + s->b8_stride + 1; + v->mv_f_last[1] = v->mv_f_last[0] + (s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride * (s->mb_height + 1) * 2); + v->mv_f_next_base = av_mallocz(2 * (s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride * (s->mb_height + 1) * 2)); + v->mv_f_next[0] = v->mv_f_next_base + s->b8_stride + 1; + v->mv_f_next[1] = v->mv_f_next[0] + (s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride * (s->mb_height + 1) * 2); + + /* Init coded blocks info */ + if (v->profile == PROFILE_ADVANCED) { +// if (alloc_bitplane(&v->over_flags_plane, s->mb_width, s->mb_height) < 0) +// return -1; +// if (alloc_bitplane(&v->ac_pred_plane, s->mb_width, s->mb_height) < 0) +// return -1; + } + + ff_intrax8_common_init(&v->x8,s); + + if (s->avctx->codec_id == CODEC_ID_WMV3IMAGE || s->avctx->codec_id == CODEC_ID_VC1IMAGE) { + for (i = 0; i < 4; i++) + if (!(v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width))) return -1; + } + + if (!v->mv_type_mb_plane || !v->direct_mb_plane || !v->acpred_plane || !v->over_flags_plane || + !v->block || !v->cbp_base || !v->ttblk_base || !v->is_intra_base || !v->luma_mv_base || + !v->mb_type_base) + return -1; + + return 0; } /** Initialize a VC1/WMV3 decoder @@ -3398,9 +5245,14 @@ VC1Context *v = avctx->priv_data; MpegEncContext *s = &v->s; GetBitContext gb; - int i, cur_width, cur_height; + int i; + + /* save the container output size for WMImage */ + v->output_width = avctx->width; + v->output_height = avctx->height; - if (!avctx->extradata_size || !avctx->extradata) return -1; + if (!avctx->extradata_size || !avctx->extradata) + return -1; if (!(avctx->flags & CODEC_FLAG_GRAY)) avctx->pix_fmt = avctx->get_format(avctx, avctx->codec->pix_fmts); else @@ -3408,21 +5260,17 @@ avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); v->s.avctx = avctx; avctx->flags |= CODEC_FLAG_EMU_EDGE; - v->s.flags |= CODEC_FLAG_EMU_EDGE; + v->s.flags |= CODEC_FLAG_EMU_EDGE; - if(avctx->idct_algo==FF_IDCT_AUTO){ - avctx->idct_algo=FF_IDCT_WMV2; + if (avctx->idct_algo == FF_IDCT_AUTO) { + avctx->idct_algo = FF_IDCT_WMV2; } - if(ff_msmpeg4_decode_init(avctx) < 0) + if (vc1_init_common(v) < 0) return -1; - if (vc1_init_common(v) < 0) return -1; ff_vc1dsp_init(&v->vc1dsp); - cur_width = avctx->coded_width = avctx->width; - cur_height = avctx->coded_height = avctx->height; - if (avctx->codec_id == CODEC_ID_WMV3) - { + if (avctx->codec_id == CODEC_ID_WMV3 || avctx->codec_id == CODEC_ID_WMV3IMAGE) { int count = 0; // looks like WMV3 has a sequence header stored in the extradata @@ -3436,13 +5284,10 @@ return -1; count = avctx->extradata_size*8 - get_bits_count(&gb); - if (count>0) - { + if (count > 0) { av_log(avctx, AV_LOG_INFO, "Extra data: %i bits left, value: %X\n", count, get_bits(&gb, count)); - } - else if (count < 0) - { + } else if (count < 0) { av_log(avctx, AV_LOG_INFO, "Read %i bits in overflow\n", -count); } } else { // VC1/WVC1/WVP2 @@ -3453,30 +5298,31 @@ uint8_t *buf2 = NULL; int seq_initialized = 0, ep_initialized = 0; - if(avctx->extradata_size < 16) { + if (avctx->extradata_size < 16) { av_log(avctx, AV_LOG_ERROR, "Extradata size too small: %i\n", avctx->extradata_size); return -1; } - buf2 = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); + buf2 = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); start = find_next_marker(start, end); // in WVC1 extradata first byte is its size, but can be 0 in mkv - next = start; - for(; next < end; start = next){ + next = start; + for (; next < end; start = next) { next = find_next_marker(start + 4, end); size = next - start - 4; - if(size <= 0) continue; + if (size <= 0) + continue; buf2_size = vc1_unescape_buffer(start + 4, size, buf2); init_get_bits(&gb, buf2, buf2_size * 8); - switch(AV_RB32(start)){ + switch (AV_RB32(start)) { case VC1_CODE_SEQHDR: - if(vc1_decode_sequence_header(avctx, v, &gb) < 0){ + if (vc1_decode_sequence_header(avctx, v, &gb) < 0) { av_free(buf2); return -1; } seq_initialized = 1; break; case VC1_CODE_ENTRYPOINT: - if(vc1_decode_entry_point(avctx, v, &gb) < 0){ + if (vc1_decode_entry_point(avctx, v, &gb) < 0) { av_free(buf2); return -1; } @@ -3485,42 +5331,30 @@ } } av_free(buf2); - if(!seq_initialized || !ep_initialized){ + if (!seq_initialized || !ep_initialized) { av_log(avctx, AV_LOG_ERROR, "Incomplete extradata\n"); return -1; } v->res_sprite = (avctx->codec_tag == MKTAG('W','V','P','2')); } - // Sequence header information may not have been parsed - // yet when ff_msmpeg4_decode_init was called the fist time - // above. If sequence information changes, we need to call - // it again. - if (cur_width != avctx->width || - cur_height != avctx->height) { - MPV_common_end(s); - if(ff_msmpeg4_decode_init(avctx) < 0) - return -1; - avctx->coded_width = avctx->width; - avctx->coded_height = avctx->height; - } avctx->profile = v->profile; if (v->profile == PROFILE_ADVANCED) avctx->level = v->level; - avctx->has_b_frames= !!(avctx->max_b_frames); - s->low_delay = !avctx->has_b_frames; + avctx->has_b_frames = !!avctx->max_b_frames; - s->mb_width = (avctx->coded_width+15)>>4; - s->mb_height = (avctx->coded_height+15)>>4; + s->mb_width = (avctx->coded_width + 15) >> 4; + s->mb_height = (avctx->coded_height + 15) >> 4; if (v->profile == PROFILE_ADVANCED || v->res_fasttx) { - for (i = 0; i < 64; i++) { -#define transpose(x) ((x>>3) | ((x&7)<<3)) + for (i = 0; i < 64; i++) { +#define transpose(x) ((x >> 3) | ((x & 7) << 3)) v->zz_8x8[0][i] = transpose(wmv1_scantable[0][i]); v->zz_8x8[1][i] = transpose(wmv1_scantable[1][i]); v->zz_8x8[2][i] = transpose(wmv1_scantable[2][i]); v->zz_8x8[3][i] = transpose(wmv1_scantable[3][i]); + v->zzi_8x8[i] = transpose(ff_vc1_adv_interlaced_8x8_zz[i]); } v->left_blk_sh = 0; v->top_blk_sh = 3; @@ -3530,39 +5364,55 @@ v->top_blk_sh = 0; } - /* Allocate mb bitplanes */ - v->mv_type_mb_plane = av_malloc(s->mb_stride * s->mb_height); - v->direct_mb_plane = av_malloc(s->mb_stride * s->mb_height); - v->acpred_plane = av_malloc(s->mb_stride * s->mb_height); - v->over_flags_plane = av_malloc(s->mb_stride * s->mb_height); - - v->n_allocated_blks = s->mb_width + 2; - v->block = av_malloc(sizeof(*v->block) * v->n_allocated_blks); - v->cbp_base = av_malloc(sizeof(v->cbp_base[0]) * 2 * s->mb_stride); - v->cbp = v->cbp_base + s->mb_stride; - v->ttblk_base = av_malloc(sizeof(v->ttblk_base[0]) * 2 * s->mb_stride); - v->ttblk = v->ttblk_base + s->mb_stride; - v->is_intra_base = av_malloc(sizeof(v->is_intra_base[0]) * 2 * s->mb_stride); - v->is_intra = v->is_intra_base + s->mb_stride; - v->luma_mv_base = av_malloc(sizeof(v->luma_mv_base[0]) * 2 * s->mb_stride); - v->luma_mv = v->luma_mv_base + s->mb_stride; - - /* allocate block type info in that way so it could be used with s->block_index[] */ - v->mb_type_base = av_malloc(s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride * (s->mb_height + 1) * 2); - v->mb_type[0] = v->mb_type_base + s->b8_stride + 1; - v->mb_type[1] = v->mb_type_base + s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride + 1; - v->mb_type[2] = v->mb_type[1] + s->mb_stride * (s->mb_height + 1); - - /* Init coded blocks info */ - if (v->profile == PROFILE_ADVANCED) - { -// if (alloc_bitplane(&v->over_flags_plane, s->mb_width, s->mb_height) < 0) -// return -1; -// if (alloc_bitplane(&v->ac_pred_plane, s->mb_width, s->mb_height) < 0) -// return -1; + if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) { + v->sprite_width = avctx->coded_width; + v->sprite_height = avctx->coded_height; + + avctx->coded_width = avctx->width = v->output_width; + avctx->coded_height = avctx->height = v->output_height; + + // prevent 16.16 overflows + if (v->sprite_width > 1 << 14 || + v->sprite_height > 1 << 14 || + v->output_width > 1 << 14 || + v->output_height > 1 << 14) return -1; } + return 0; +} - ff_intrax8_common_init(&v->x8,s); +/** Close a VC1/WMV3 decoder + * @warning Initial try at using MpegEncContext stuff + */ +static av_cold int vc1_decode_end(AVCodecContext *avctx) +{ + VC1Context *v = avctx->priv_data; + int i; + + if ((avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) + && v->sprite_output_frame.data[0]) + avctx->release_buffer(avctx, &v->sprite_output_frame); + for (i = 0; i < 4; i++) + av_freep(&v->sr_rows[i >> 1][i & 1]); + av_freep(&v->hrd_rate); + av_freep(&v->hrd_buffer); + MPV_common_end(&v->s); + av_freep(&v->mv_type_mb_plane); + av_freep(&v->direct_mb_plane); + av_freep(&v->forward_mb_plane); + av_freep(&v->fieldtx_plane); + av_freep(&v->acpred_plane); + av_freep(&v->over_flags_plane); + av_freep(&v->mb_type_base); + av_freep(&v->blk_mv_type_base); + av_freep(&v->mv_f_base); + av_freep(&v->mv_f_last_base); + av_freep(&v->mv_f_next_base); + av_freep(&v->block); + av_freep(&v->cbp_base); + av_freep(&v->ttblk_base); + av_freep(&v->is_intra_base); // FIXME use v->mb_type[] + av_freep(&v->luma_mv_base); + ff_intrax8_common_end(&v->x8); return 0; } @@ -3570,9 +5420,8 @@ /** Decode a VC1/WMV3 frame * @todo TODO: Handle VC-1 IDUs (Transport level?) */ -static int vc1_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int vc1_decode_frame(AVCodecContext *avctx, void *data, + int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size, n_slices = 0, i; @@ -3581,18 +5430,19 @@ AVFrame *pict = data; uint8_t *buf2 = NULL; const uint8_t *buf_start = buf; + int mb_height, n_slices1; struct { uint8_t *buf; GetBitContext gb; int mby_start; - } *slices = NULL; + } *slices = NULL, *tmp; /* no supplementary picture */ if (buf_size == 0 || (buf_size == 4 && AV_RB32(buf) == VC1_CODE_ENDOFSEQ)) { /* special case for last picture */ - if (s->low_delay==0 && s->next_picture_ptr) { - *pict= *(AVFrame*)s->next_picture_ptr; - s->next_picture_ptr= NULL; + if (s->low_delay == 0 && s->next_picture_ptr) { + *pict = *(AVFrame*)s->next_picture_ptr; + s->next_picture_ptr = NULL; *data_size = sizeof(AVFrame); } @@ -3600,14 +5450,7 @@ return 0; } - /* We need to set current_picture_ptr before reading the header, - * otherwise we cannot store anything in there. */ - if(s->current_picture_ptr==NULL || s->current_picture_ptr->data[0]){ - int i= ff_find_unused_picture(s, 0); - s->current_picture_ptr= &s->picture[i]; - } - - if (s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ + if (s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) { if (v->profile < PROFILE_ADVANCED) avctx->pix_fmt = PIX_FMT_VDPAU_WMV3; else @@ -3615,37 +5458,58 @@ } //for advanced profile we may need to parse and unescape data - if (avctx->codec_id == CODEC_ID_VC1) { + if (avctx->codec_id == CODEC_ID_VC1 || avctx->codec_id == CODEC_ID_VC1IMAGE) { int buf_size2 = 0; buf2 = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE); - if(IS_MARKER(AV_RB32(buf))){ /* frame starts with marker and needs to be parsed */ + if (IS_MARKER(AV_RB32(buf))) { /* frame starts with marker and needs to be parsed */ const uint8_t *start, *end, *next; int size; next = buf; - for(start = buf, end = buf + buf_size; next < end; start = next){ + for (start = buf, end = buf + buf_size; next < end; start = next) { next = find_next_marker(start + 4, end); size = next - start - 4; - if(size <= 0) continue; - switch(AV_RB32(start)){ + if (size <= 0) continue; + switch (AV_RB32(start)) { case VC1_CODE_FRAME: if (avctx->hwaccel || s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) buf_start = start; buf_size2 = vc1_unescape_buffer(start + 4, size, buf2); break; + case VC1_CODE_FIELD: { + int buf_size3; + slices = av_realloc(slices, sizeof(*slices) * (n_slices+1)); + if (!slices) + goto err; + slices[n_slices].buf = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE); + if (!slices[n_slices].buf) + goto err; + buf_size3 = vc1_unescape_buffer(start + 4, size, + slices[n_slices].buf); + init_get_bits(&slices[n_slices].gb, slices[n_slices].buf, + buf_size3 << 3); + /* assuming that the field marker is at the exact middle, + hope it's correct */ + slices[n_slices].mby_start = s->mb_height >> 1; + n_slices1 = n_slices - 1; // index of the last slice of the first field + n_slices++; + break; + } case VC1_CODE_ENTRYPOINT: /* it should be before frame data */ buf_size2 = vc1_unescape_buffer(start + 4, size, buf2); - init_get_bits(&s->gb, buf2, buf_size2*8); + init_get_bits(&s->gb, buf2, buf_size2 * 8); vc1_decode_entry_point(avctx, v, &s->gb); break; case VC1_CODE_SLICE: { int buf_size3; slices = av_realloc(slices, sizeof(*slices) * (n_slices+1)); - if (!slices) goto err; + if (!slices) + goto err; slices[n_slices].buf = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE); - if (!slices[n_slices].buf) goto err; + if (!slices[n_slices].buf) + goto err; buf_size3 = vc1_unescape_buffer(start + 4, size, slices[n_slices].buf); init_get_bits(&slices[n_slices].gb, slices[n_slices].buf, @@ -3656,21 +5520,31 @@ } } } - }else if(v->interlace && ((buf[0] & 0xC0) == 0xC0)){ /* WVC1 interlaced stores both fields divided by marker */ + } else if (v->interlace && ((buf[0] & 0xC0) == 0xC0)) { /* WVC1 interlaced stores both fields divided by marker */ const uint8_t *divider; + int buf_size3; divider = find_next_marker(buf, buf + buf_size); - if((divider == (buf + buf_size)) || AV_RB32(divider) != VC1_CODE_FIELD){ + if ((divider == (buf + buf_size)) || AV_RB32(divider) != VC1_CODE_FIELD) { av_log(avctx, AV_LOG_ERROR, "Error in WVC1 interlaced frame\n"); goto err; + } else { // found field marker, unescape second field + tmp = av_realloc(slices, sizeof(*slices) * (n_slices+1)); + if (!tmp) + goto err; + slices = tmp; + slices[n_slices].buf = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE); + if (!slices[n_slices].buf) + goto err; + buf_size3 = vc1_unescape_buffer(divider + 4, buf + buf_size - divider - 4, slices[n_slices].buf); + init_get_bits(&slices[n_slices].gb, slices[n_slices].buf, + buf_size3 << 3); + slices[n_slices].mby_start = s->mb_height >> 1; + n_slices1 = n_slices - 1; + n_slices++; } - buf_size2 = vc1_unescape_buffer(buf, divider - buf, buf2); - // TODO - if(!v->warn_interlaced++) - av_log(v->s.avctx, AV_LOG_ERROR, "Interlaced WVC1 support is not implemented\n"); - goto err; - }else{ + } else { buf_size2 = vc1_unescape_buffer(buf, buf_size, buf2); } init_get_bits(&s->gb, buf2, buf_size2*8); @@ -3678,54 +5552,107 @@ init_get_bits(&s->gb, buf, buf_size*8); if (v->res_sprite) { - v->new_sprite = !get_bits1(&s->gb); - v->two_sprites = get_bits1(&s->gb); - if (!v->new_sprite) - goto end; + v->new_sprite = !get_bits1(&s->gb); + v->two_sprites = get_bits1(&s->gb); + /* res_sprite means a Windows Media Image stream, CODEC_ID_*IMAGE means + we're using the sprite compositor. These are intentionally kept separate + so you can get the raw sprites by using the wmv3 decoder for WMVP or + the vc1 one for WVP2 */ + if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) { + if (v->new_sprite) { + // switch AVCodecContext parameters to those of the sprites + avctx->width = avctx->coded_width = v->sprite_width; + avctx->height = avctx->coded_height = v->sprite_height; + } else { + goto image; + } + } + } + + if (s->context_initialized && + (s->width != avctx->coded_width || + s->height != avctx->coded_height)) { + vc1_decode_end(avctx); + } + + if (!s->context_initialized) { + if (ff_msmpeg4_decode_init(avctx) < 0 || vc1_decode_init_alloc_tables(v) < 0) + return -1; + + s->low_delay = !avctx->has_b_frames || v->res_sprite; + + if (v->profile == PROFILE_ADVANCED) { + s->h_edge_pos = avctx->coded_width; + s->v_edge_pos = avctx->coded_height; + } + } + + /* We need to set current_picture_ptr before reading the header, + * otherwise we cannot store anything in there. */ + if (s->current_picture_ptr == NULL || s->current_picture_ptr->f.data[0]) { + int i = ff_find_unused_picture(s, 0); + if (i < 0) + goto err; + s->current_picture_ptr = &s->picture[i]; } // do parse frame header - if(v->profile < PROFILE_ADVANCED) { - if(vc1_parse_frame_header(v, &s->gb) == -1) { + v->pic_header_flag = 0; + if (v->profile < PROFILE_ADVANCED) { + if (vc1_parse_frame_header(v, &s->gb) == -1) { goto err; } } else { - if(vc1_parse_frame_header_adv(v, &s->gb) == -1) { + if (vc1_parse_frame_header_adv(v, &s->gb) == -1) { goto err; } } - if (v->res_sprite && s->pict_type!=AV_PICTURE_TYPE_I) { - av_log(v->s.avctx, AV_LOG_WARNING, "Sprite decoder: expected I-frame\n"); + if ((avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) + && s->pict_type != AV_PICTURE_TYPE_I) { + av_log(v->s.avctx, AV_LOG_ERROR, "Sprite decoder: expected I-frame\n"); + goto err; + } + + // process pulldown flags + s->current_picture_ptr->f.repeat_pict = 0; + // Pulldown flags are only valid when 'broadcast' has been set. + // So ticks_per_frame will be 2 + if (v->rff) { + // repeat field + s->current_picture_ptr->f.repeat_pict = 1; + } else if (v->rptfrm) { + // repeat frames + s->current_picture_ptr->f.repeat_pict = v->rptfrm * 2; } // for skipping the frame - s->current_picture.pict_type= s->pict_type; - s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I; + s->current_picture.f.pict_type = s->pict_type; + s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I; /* skip B-frames if we don't have reference frames */ - if(s->last_picture_ptr==NULL && (s->pict_type==AV_PICTURE_TYPE_B || s->dropable)){ + if (s->last_picture_ptr == NULL && (s->pict_type == AV_PICTURE_TYPE_B || s->dropable)) { goto err; } - if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B) - || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I) - || avctx->skip_frame >= AVDISCARD_ALL) { + if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) || + (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I) || + avctx->skip_frame >= AVDISCARD_ALL) { goto end; } - if(s->next_p_frame_damaged){ - if(s->pict_type==AV_PICTURE_TYPE_B) + if (s->next_p_frame_damaged) { + if (s->pict_type == AV_PICTURE_TYPE_B) goto end; else - s->next_p_frame_damaged=0; + s->next_p_frame_damaged = 0; } - if(MPV_frame_start(s, avctx) < 0) { + if (MPV_frame_start(s, avctx) < 0) { goto err; } - s->me.qpel_put= s->dsp.put_qpel_pixels_tab; - s->me.qpel_avg= s->dsp.avg_qpel_pixels_tab; + s->me.qpel_put = s->dsp.put_qpel_pixels_tab; + s->me.qpel_avg = s->dsp.avg_qpel_pixels_tab; if ((CONFIG_VC1_VDPAU_DECODER) &&s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) @@ -3741,38 +5668,96 @@ ff_er_frame_start(s); v->bits = buf_size * 8; + if (v->field_mode) { + uint8_t *tmp[2]; + s->current_picture.f.linesize[0] <<= 1; + s->current_picture.f.linesize[1] <<= 1; + s->current_picture.f.linesize[2] <<= 1; + s->linesize <<= 1; + s->uvlinesize <<= 1; + tmp[0] = v->mv_f_last[0]; + tmp[1] = v->mv_f_last[1]; + v->mv_f_last[0] = v->mv_f_next[0]; + v->mv_f_last[1] = v->mv_f_next[1]; + v->mv_f_next[0] = v->mv_f[0]; + v->mv_f_next[1] = v->mv_f[1]; + v->mv_f[0] = tmp[0]; + v->mv_f[1] = tmp[1]; + } + mb_height = s->mb_height >> v->field_mode; for (i = 0; i <= n_slices; i++) { - if (i && get_bits1(&s->gb)) - vc1_parse_frame_header_adv(v, &s->gb); - s->start_mb_y = (i == 0) ? 0 : FFMAX(0, slices[i-1].mby_start); - s->end_mb_y = (i == n_slices) ? s->mb_height : FFMIN(s->mb_height, slices[i].mby_start); + if (i > 0 && slices[i - 1].mby_start >= mb_height) { + v->second_field = 1; + v->blocks_off = s->mb_width * s->mb_height << 1; + v->mb_off = s->mb_stride * s->mb_height >> 1; + } else { + v->second_field = 0; + v->blocks_off = 0; + v->mb_off = 0; + } + if (i) { + v->pic_header_flag = 0; + if (v->field_mode && i == n_slices1 + 2) + vc1_parse_frame_header_adv(v, &s->gb); + else if (get_bits1(&s->gb)) { + v->pic_header_flag = 1; + vc1_parse_frame_header_adv(v, &s->gb); + } + } + s->start_mb_y = (i == 0) ? 0 : FFMAX(0, slices[i-1].mby_start % mb_height); + if (!v->field_mode || v->second_field) + s->end_mb_y = (i == n_slices ) ? mb_height : FFMIN(mb_height, slices[i].mby_start % mb_height); + else + s->end_mb_y = (i == n_slices1 + 1) ? mb_height : FFMIN(mb_height, slices[i].mby_start % mb_height); vc1_decode_blocks(v); - if (i != n_slices) s->gb = slices[i].gb; + if (i != n_slices) + s->gb = slices[i].gb; + } + if (v->field_mode) { + v->second_field = 0; + if (s->pict_type == AV_PICTURE_TYPE_B) { + memcpy(v->mv_f_base, v->mv_f_next_base, + 2 * (s->b8_stride * (s->mb_height * 2 + 1) + s->mb_stride * (s->mb_height + 1) * 2)); + } + s->current_picture.f.linesize[0] >>= 1; + s->current_picture.f.linesize[1] >>= 1; + s->current_picture.f.linesize[2] >>= 1; + s->linesize >>= 1; + s->uvlinesize >>= 1; } //av_log(s->avctx, AV_LOG_INFO, "Consumed %i/%i bits\n", get_bits_count(&s->gb), s->gb.size_in_bits); -// if(get_bits_count(&s->gb) > buf_size * 8) +// if (get_bits_count(&s->gb) > buf_size * 8) // return -1; ff_er_frame_end(s); } MPV_frame_end(s); -assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type); -assert(s->current_picture.pict_type == s->pict_type); - if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { - *pict= *(AVFrame*)s->current_picture_ptr; - } else if (s->last_picture_ptr != NULL) { - *pict= *(AVFrame*)s->last_picture_ptr; - } - - if(s->last_picture_ptr || s->low_delay){ + if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) { +image: + avctx->width = avctx->coded_width = v->output_width; + avctx->height = avctx->coded_height = v->output_height; + if (avctx->skip_frame >= AVDISCARD_NONREF) + goto end; +#if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER + if (vc1_decode_sprites(v, &s->gb)) + goto err; +#endif + *pict = v->sprite_output_frame; *data_size = sizeof(AVFrame); - ff_print_debug_info(s, pict); + } else { + if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { + *pict = *(AVFrame*)s->current_picture_ptr; + } else if (s->last_picture_ptr != NULL) { + *pict = *(AVFrame*)s->last_picture_ptr; + } + if (s->last_picture_ptr || s->low_delay) { + *data_size = sizeof(AVFrame); + ff_print_debug_info(s, pict); + } } end: - if (v->res_sprite) - vc1_parse_sprites(v, &s->gb); av_free(buf2); for (i = 0; i < n_slices; i++) av_free(slices[i].buf); @@ -3788,30 +5773,6 @@ } -/** Close a VC1/WMV3 decoder - * @warning Initial try at using MpegEncContext stuff - */ -static av_cold int vc1_decode_end(AVCodecContext *avctx) -{ - VC1Context *v = avctx->priv_data; - - av_freep(&v->hrd_rate); - av_freep(&v->hrd_buffer); - MPV_common_end(&v->s); - av_freep(&v->mv_type_mb_plane); - av_freep(&v->direct_mb_plane); - av_freep(&v->acpred_plane); - av_freep(&v->over_flags_plane); - av_freep(&v->mb_type_base); - av_freep(&v->block); - av_freep(&v->cbp_base); - av_freep(&v->ttblk_base); - av_freep(&v->is_intra_base); // FIXME use v->mb_type[] - av_freep(&v->luma_mv_base); - ff_intrax8_common_end(&v->x8); - return 0; -} - static const AVProfile profiles[] = { { FF_PROFILE_VC1_SIMPLE, "Simple" }, { FF_PROFILE_VC1_MAIN, "Main" }, @@ -3821,71 +5782,95 @@ }; AVCodec ff_vc1_decoder = { - "vc1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VC1, - sizeof(VC1Context), - vc1_decode_init, - NULL, - vc1_decode_end, - vc1_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DELAY, - NULL, - .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"), - .pix_fmts = ff_hwaccel_pixfmt_list_420, - .profiles = NULL_IF_CONFIG_SMALL(profiles) + .name = "vc1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VC1, + .priv_data_size = sizeof(VC1Context), + .init = vc1_decode_init, + .close = vc1_decode_end, + .decode = vc1_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY, + .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"), + .pix_fmts = ff_hwaccel_pixfmt_list_420, + .profiles = NULL_IF_CONFIG_SMALL(profiles) }; #if CONFIG_WMV3_DECODER AVCodec ff_wmv3_decoder = { - "wmv3", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_WMV3, - sizeof(VC1Context), - vc1_decode_init, - NULL, - vc1_decode_end, - vc1_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DELAY, - NULL, - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9"), - .pix_fmts = ff_hwaccel_pixfmt_list_420, - .profiles = NULL_IF_CONFIG_SMALL(profiles) + .name = "wmv3", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_WMV3, + .priv_data_size = sizeof(VC1Context), + .init = vc1_decode_init, + .close = vc1_decode_end, + .decode = vc1_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY, + .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9"), + .pix_fmts = ff_hwaccel_pixfmt_list_420, + .profiles = NULL_IF_CONFIG_SMALL(profiles) }; #endif #if CONFIG_WMV3_VDPAU_DECODER AVCodec ff_wmv3_vdpau_decoder = { - "wmv3_vdpau", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_WMV3, - sizeof(VC1Context), - vc1_decode_init, - NULL, - vc1_decode_end, - vc1_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, - NULL, - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 VDPAU"), - .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_WMV3, PIX_FMT_NONE}, - .profiles = NULL_IF_CONFIG_SMALL(profiles) + .name = "wmv3_vdpau", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_WMV3, + .priv_data_size = sizeof(VC1Context), + .init = vc1_decode_init, + .close = vc1_decode_end, + .decode = vc1_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, + .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 VDPAU"), + .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_WMV3, PIX_FMT_NONE}, + .profiles = NULL_IF_CONFIG_SMALL(profiles) }; #endif #if CONFIG_VC1_VDPAU_DECODER AVCodec ff_vc1_vdpau_decoder = { - "vc1_vdpau", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VC1, - sizeof(VC1Context), - vc1_decode_init, - NULL, - vc1_decode_end, - vc1_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, - NULL, - .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"), - .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_VC1, PIX_FMT_NONE}, - .profiles = NULL_IF_CONFIG_SMALL(profiles) + .name = "vc1_vdpau", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VC1, + .priv_data_size = sizeof(VC1Context), + .init = vc1_decode_init, + .close = vc1_decode_end, + .decode = vc1_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, + .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"), + .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_VC1, PIX_FMT_NONE}, + .profiles = NULL_IF_CONFIG_SMALL(profiles) +}; +#endif + +#if CONFIG_WMV3IMAGE_DECODER +AVCodec ff_wmv3image_decoder = { + .name = "wmv3image", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_WMV3IMAGE, + .priv_data_size = sizeof(VC1Context), + .init = vc1_decode_init, + .close = vc1_decode_end, + .decode = vc1_decode_frame, + .capabilities = CODEC_CAP_DR1, + .flush = vc1_sprite_flush, + .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 Image"), + .pix_fmts = ff_pixfmt_list_420 +}; +#endif + +#if CONFIG_VC1IMAGE_DECODER +AVCodec ff_vc1image_decoder = { + .name = "vc1image", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VC1IMAGE, + .priv_data_size = sizeof(VC1Context), + .init = vc1_decode_init, + .close = vc1_decode_end, + .decode = vc1_decode_frame, + .capabilities = CODEC_CAP_DR1, + .flush = vc1_sprite_flush, + .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 Image v2"), + .pix_fmts = ff_pixfmt_list_420 }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1dsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1dsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1dsp.c 2011-05-05 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1dsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -550,8 +550,8 @@ return 0; /* should not occur */ \ } -VC1_MSPEL_FILTER_16B(ver, uint8_t); -VC1_MSPEL_FILTER_16B(hor, int16_t); +VC1_MSPEL_FILTER_16B(ver, uint8_t) +VC1_MSPEL_FILTER_16B(hor, int16_t) /** Filter used to interpolate fractional pel values @@ -688,6 +688,26 @@ } } +static void put_no_rnd_vc1_chroma_mc4_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y){ + const int A=(8-x)*(8-y); + const int B=( x)*(8-y); + const int C=(8-x)*( y); + const int D=( x)*( y); + int i; + + assert(x<8 && y<8 && x>=0 && y>=0); + + for(i=0; i> 6; + dst[1] = (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2] + 32 - 4) >> 6; + dst[2] = (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3] + 32 - 4) >> 6; + dst[3] = (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4] + 32 - 4) >> 6; + dst+= stride; + src+= stride; + } +} + #define avg2(a,b) ((a+b+1)>>1) static void avg_no_rnd_vc1_chroma_mc8_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y){ const int A=(8-x)*(8-y); @@ -713,6 +733,66 @@ } } +#if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER + +static void sprite_h_c(uint8_t *dst, const uint8_t *src, int offset, int advance, int count) +{ + while (count--) { + int a = src[(offset >> 16) ]; + int b = src[(offset >> 16) + 1]; + *dst++ = a + ((b - a) * (offset&0xFFFF) >> 16); + offset += advance; + } +} + +static av_always_inline void sprite_v_template(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1, + int two_sprites, const uint8_t *src2a, const uint8_t *src2b, int offset2, + int alpha, int scaled, int width) +{ + int a1, b1, a2, b2; + while (width--) { + a1 = *src1a++; + if (scaled) { + b1 = *src1b++; + a1 = a1 + ((b1 - a1) * offset1 >> 16); + } + if (two_sprites) { + a2 = *src2a++; + if (scaled > 1) { + b2 = *src2b++; + a2 = a2 + ((b2 - a2) * offset2 >> 16); + } + a1 = a1 + ((a2 - a1) * alpha >> 16); + } + *dst++ = a1; + } +} + +static void sprite_v_single_c(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset, int width) +{ + sprite_v_template(dst, src1a, src1b, offset, 0, NULL, NULL, 0, 0, 1, width); +} + +static void sprite_v_double_noscale_c(uint8_t *dst, const uint8_t *src1a, const uint8_t *src2a, int alpha, int width) +{ + sprite_v_template(dst, src1a, NULL, 0, 1, src2a, NULL, 0, alpha, 0, width); +} + +static void sprite_v_double_onescale_c(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1, + const uint8_t *src2a, int alpha, int width) +{ + sprite_v_template(dst, src1a, src1b, offset1, 1, src2a, NULL, 0, alpha, 1, width); +} + +static void sprite_v_double_twoscale_c(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1, + const uint8_t *src2a, const uint8_t *src2b, int offset2, + int alpha, int width) +{ + sprite_v_template(dst, src1a, src1b, offset1, 1, src2a, src2b, offset2, alpha, 2, width); +} + +#endif + av_cold void ff_vc1dsp_init(VC1DSPContext* dsp) { dsp->vc1_inv_trans_8x8 = vc1_inv_trans_8x8_c; dsp->vc1_inv_trans_4x8 = vc1_inv_trans_4x8_c; @@ -769,6 +849,15 @@ dsp->put_no_rnd_vc1_chroma_pixels_tab[0]= put_no_rnd_vc1_chroma_mc8_c; dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= avg_no_rnd_vc1_chroma_mc8_c; + dsp->put_no_rnd_vc1_chroma_pixels_tab[1] = put_no_rnd_vc1_chroma_mc4_c; + +#if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER + dsp->sprite_h = sprite_h_c; + dsp->sprite_v_single = sprite_v_single_c; + dsp->sprite_v_double_noscale = sprite_v_double_noscale_c; + dsp->sprite_v_double_onescale = sprite_v_double_onescale_c; + dsp->sprite_v_double_twoscale = sprite_v_double_twoscale_c; +#endif if (HAVE_ALTIVEC) ff_vc1dsp_init_altivec(dsp); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1dsp.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1dsp.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1dsp.h 2011-05-05 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1dsp.h 2012-01-11 00:34:30.000000000 +0000 @@ -60,6 +60,16 @@ /* This is really one func used in VC-1 decoding */ h264_chroma_mc_func put_no_rnd_vc1_chroma_pixels_tab[3]; h264_chroma_mc_func avg_no_rnd_vc1_chroma_pixels_tab[3]; + + /* Windows Media Image functions */ + void (*sprite_h)(uint8_t *dst, const uint8_t *src, int offset, int advance, int count); + void (*sprite_v_single)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset, int width); + void (*sprite_v_double_noscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src2a, int alpha, int width); + void (*sprite_v_double_onescale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1, + const uint8_t *src2a, int alpha, int width); + void (*sprite_v_double_twoscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1, + const uint8_t *src2a, const uint8_t *src2b, int offset2, + int alpha, int width); } VC1DSPContext; void ff_vc1dsp_init(VC1DSPContext* c); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1.h 2011-05-05 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1.h 2012-01-11 00:34:30.000000000 +0000 @@ -30,7 +30,7 @@ /** Markers used in VC-1 AP frame data */ //@{ -enum VC1Code{ +enum VC1Code { VC1_CODE_RES0 = 0x00000100, VC1_CODE_ENDOFSEQ = 0x0000010A, VC1_CODE_SLICE, @@ -105,12 +105,25 @@ }; //@} +/** MBMODE for interlaced frame P-picture */ +//@{ +enum MBModesIntfr { + MV_PMODE_INTFR_1MV, + MV_PMODE_INTFR_2MV_FIELD, + MV_PMODE_INTFR_2MV, + MV_PMODE_INTFR_4MV_FIELD, + MV_PMODE_INTFR_4MV, + MV_PMODE_INTFR_INTRA, +}; +//@} + /** @name MV types for B frames */ //@{ enum BMVTypes { BMV_TYPE_BACKWARD, BMV_TYPE_FORWARD, - BMV_TYPE_INTERPOLATED + BMV_TYPE_INTERPOLATED, + BMV_TYPE_DIRECT }; //@} @@ -120,10 +133,10 @@ TT_8X8, TT_8X4_BOTTOM, TT_8X4_TOP, - TT_8X4, //Both halves + TT_8X4, // both halves TT_4X8_RIGHT, TT_4X8_LEFT, - TT_4X8, //Both halves + TT_4X8, // both halves TT_4X4 }; //@} @@ -148,6 +161,16 @@ }; //@} +/** + * FCM Frame Coding Mode + * @note some content might be marked interlaced + * but have fcm set to 0 as well (e.g. HD-DVD) + */ +enum FrameCodingMode { + PROGRESSIVE = 0, ///< in the bitstream is reported as 00b + ILACE_FRAME, ///< in the bitstream is reported as 10b + ILACE_FIELD ///< in the bitstream is reported as 11b +}; /** The VC1 Context * @todo Change size wherever another size is more efficient @@ -211,16 +234,16 @@ /** Frame decoding info for all profiles */ //@{ - uint8_t mv_mode; ///< MV coding monde - uint8_t mv_mode2; ///< Secondary MV coding mode (B frames) - int k_x; ///< Number of bits for MVs (depends on MV range) - int k_y; ///< Number of bits for MVs (depends on MV range) - int range_x, range_y; ///< MV range - uint8_t pq, altpq; ///< Current/alternate frame quantizer scale - uint8_t zz_8x8[4][64];///< Zigzag table for TT_8x8, permuted for IDCT + uint8_t mv_mode; ///< MV coding monde + uint8_t mv_mode2; ///< Secondary MV coding mode (B frames) + int k_x; ///< Number of bits for MVs (depends on MV range) + int k_y; ///< Number of bits for MVs (depends on MV range) + int range_x, range_y; ///< MV range + uint8_t pq, altpq; ///< Current/alternate frame quantizer scale + uint8_t zz_8x8[4][64]; ///< Zigzag table for TT_8x8, permuted for IDCT int left_blk_sh, top_blk_sh; ///< Either 3 or 0, positions of l/t in blk[] - const uint8_t* zz_8x4;///< Zigzag scan table for TT_8x4 coding mode - const uint8_t* zz_4x8;///< Zigzag scan table for TT_4x8 coding mode + const uint8_t* zz_8x4; ///< Zigzag scan table for TT_8x4 coding mode + const uint8_t* zz_4x8; ///< Zigzag scan table for TT_4x8 coding mode /** pquant parameters */ //@{ uint8_t dquantfrm; @@ -232,15 +255,15 @@ * @see 8.1.1.10, p(1)10 */ //@{ - int c_ac_table_index; ///< Chroma index from ACFRM element - int y_ac_table_index; ///< Luma index from AC2FRM element + int c_ac_table_index; ///< Chroma index from ACFRM element + int y_ac_table_index; ///< Luma index from AC2FRM element //@} - int ttfrm; ///< Transform type info present at frame level - uint8_t ttmbf; ///< Transform type flag + int ttfrm; ///< Transform type info present at frame level + uint8_t ttmbf; ///< Transform type flag int *ttblk_base, *ttblk; ///< Transform type at the block level - int codingset; ///< index of current table set from 11.8 to use for luma block decoding - int codingset2; ///< index of current table set from 11.8 to use for chroma block decoding - int pqindex; ///< raw pqindex used in coding set selection + int codingset; ///< index of current table set from 11.8 to use for luma block decoding + int codingset2; ///< index of current table set from 11.8 to use for chroma block decoding + int pqindex; ///< raw pqindex used in coding set selection int a_avail, c_avail; uint8_t *mb_type_base, *mb_type[3]; @@ -260,28 +283,30 @@ * -# 2 -> [-512, 511.f] x [-128, 127.f] * -# 3 -> [-1024, 1023.f] x [-256, 255.f] */ - uint8_t mvrange; - uint8_t pquantizer; ///< Uniform (over sequence) quantizer in use - VLC *cbpcy_vlc; ///< CBPCY VLC table - int tt_index; ///< Index for Transform Type tables - uint8_t* mv_type_mb_plane; ///< bitplane for mv_type == (4MV) - uint8_t* direct_mb_plane; ///< bitplane for "direct" MBs - int mv_type_is_raw; ///< mv type mb plane is not coded - int dmb_is_raw; ///< direct mb plane is raw - int skip_is_raw; ///< skip mb plane is not coded - uint8_t luty[256], lutuv[256]; // lookup tables used for intensity compensation - int use_ic; ///< use intensity compensation in B-frames - int rnd; ///< rounding control + uint8_t mvrange; ///< Extended MV range flag + uint8_t pquantizer; ///< Uniform (over sequence) quantizer in use + VLC *cbpcy_vlc; ///< CBPCY VLC table + int tt_index; ///< Index for Transform Type tables (to decode TTMB) + uint8_t* mv_type_mb_plane; ///< bitplane for mv_type == (4MV) + uint8_t* direct_mb_plane; ///< bitplane for "direct" MBs + uint8_t* forward_mb_plane; ///< bitplane for "forward" MBs + int mv_type_is_raw; ///< mv type mb plane is not coded + int dmb_is_raw; ///< direct mb plane is raw + int fmb_is_raw; ///< forward mb plane is raw + int skip_is_raw; ///< skip mb plane is not coded + uint8_t luty[256], lutuv[256]; ///< lookup tables used for intensity compensation + int use_ic; ///< use intensity compensation in B-frames + int rnd; ///< rounding control /** Frame decoding info for S/M profiles only */ //@{ - uint8_t rangeredfrm; ///< out_sample = CLIP((in_sample-128)*2+128) + uint8_t rangeredfrm; ///< out_sample = CLIP((in_sample-128)*2+128) uint8_t interpfrm; //@} /** Frame decoding info for Advanced profile */ //@{ - uint8_t fcm; ///< 0->Progressive, 2->Frame-Interlace, 3->Field-Interlace + enum FrameCodingMode fcm; uint8_t numpanscanwin; uint8_t tfcntr; uint8_t rptfrm, tff, rff; @@ -307,10 +332,51 @@ uint8_t range_mapuv; //@} + /** Frame decoding info for interlaced picture */ + uint8_t dmvrange; ///< Extended differential MV range flag + int fourmvswitch; + int intcomp; + uint8_t lumscale2; ///< for interlaced field P picture + uint8_t lumshift2; + uint8_t luty2[256], lutuv2[256]; // lookup tables used for intensity compensation + VLC* mbmode_vlc; + VLC* imv_vlc; + VLC* twomvbp_vlc; + VLC* fourmvbp_vlc; + uint8_t twomvbp; + uint8_t fourmvbp; + uint8_t* fieldtx_plane; + int fieldtx_is_raw; + int8_t zzi_8x8[64]; + uint8_t *blk_mv_type_base, *blk_mv_type; ///< 0: frame MV, 1: field MV (interlaced frame) + uint8_t *mv_f_base, *mv_f[2]; ///< 0: MV obtained from same field, 1: opposite field + uint8_t *mv_f_last_base, *mv_f_last[2]; + uint8_t *mv_f_next_base, *mv_f_next[2]; + int field_mode; ///< 1 for interlaced field pictures + int fptype; + int second_field; + int refdist; ///< distance of the current picture from reference + int numref; ///< number of past field pictures used as reference + // 0 corresponds to 1 and 1 corresponds to 2 references + int reffield; ///< if numref = 0 (1 reference) then reffield decides which + // field to use among the two fields from previous frame + int intcompfield; ///< which of the two fields to be intensity compensated + // 0: both fields, 1: bottom field, 2: top field + int cur_field_type; ///< 0: top, 1: bottom + int ref_field_type[2]; ///< forward and backward reference field type (top or bottom) + int blocks_off, mb_off; + int qs_last; ///< if qpel has been used in the previous (tr.) picture + int bmvtype; + int frfd, brfd; ///< reference frame distance (forward or backward) + int pic_header_flag; + /** Frame decoding info for sprite modes */ //@{ int new_sprite; int two_sprites; + AVFrame sprite_output_frame; + int output_width, output_height, sprite_width, sprite_height; + uint8_t* sr_rows[2][2]; ///< Sprite resizer line cache //@} int p_frame_skipped; @@ -322,11 +388,11 @@ uint32_t *cbp_base, *cbp; uint8_t *is_intra_base, *is_intra; int16_t (*luma_mv_base)[2], (*luma_mv)[2]; - uint8_t bfraction_lut_index;///< Index for BFRACTION value (see Table 40, reproduced into ff_vc1_bfraction_lut[]) - uint8_t broken_link; ///< Broken link flag (BROKEN_LINK syntax element) - uint8_t closed_entry; ///< Closed entry point flag (CLOSED_ENTRY syntax element) + uint8_t bfraction_lut_index; ///< Index for BFRACTION value (see Table 40, reproduced into ff_vc1_bfraction_lut[]) + uint8_t broken_link; ///< Broken link flag (BROKEN_LINK syntax element) + uint8_t closed_entry; ///< Closed entry point flag (CLOSED_ENTRY syntax element) - int parse_only; ///< Context is used within parser + int parse_only; ///< Context is used within parser int warn_interlaced; } VC1Context; @@ -338,11 +404,12 @@ { uint32_t mrk = 0xFFFFFFFF; - if(end-src < 4) return end; - while(src < end){ + if (end-src < 4) + return end; + while (src < end) { mrk = (mrk << 8) | *src++; - if(IS_MARKER(mrk)) - return src-4; + if (IS_MARKER(mrk)) + return src - 4; } return end; } @@ -351,12 +418,13 @@ { int dsize = 0, i; - if(size < 4){ - for(dsize = 0; dsize < size; dsize++) *dst++ = *src++; + if (size < 4) { + for (dsize = 0; dsize < size; dsize++) + *dst++ = *src++; return size; } - for(i = 0; i < size; i++, src++) { - if(src[0] == 3 && i >= 2 && !src[-1] && !src[-2] && i < size-1 && src[1] < 4) { + for (i = 0; i < size; i++, src++) { + if (src[0] == 3 && i >= 2 && !src[-1] && !src[-2] && i < size-1 && src[1] < 4) { dst[dsize++] = src[1]; src++; i++; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vc1_parser.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vc1_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -45,6 +45,7 @@ vpc->v.s.avctx = avctx; vpc->v.parse_only = 1; next = buf; + s->repeat_pict = 0; for(start = buf, end = buf + buf_size; next < end; start = next){ int buf2_size, size; @@ -73,6 +74,20 @@ else s->pict_type = vpc->v.s.pict_type; + if (avctx->ticks_per_frame > 1){ + // process pulldown flags + s->repeat_pict = 1; + // Pulldown flags are only valid when 'broadcast' has been set. + // So ticks_per_frame will be 2 + if (vpc->v.rff){ + // repeat field + s->repeat_pict = 2; + }else if (vpc->v.rptfrm){ + // repeat frames + s->repeat_pict = vpc->v.rptfrm * 2 + 1; + } + } + break; } } @@ -81,7 +96,7 @@ } /** - * finds the end of the current frame in the bitstream. + * Find the end of the current frame in the bitstream. * @return the position of the first byte of the next frame, or -1 */ static int vc1_find_frame_end(ParseContext *pc, const uint8_t *buf, @@ -169,11 +184,18 @@ return 0; } +static int vc1_parse_init(AVCodecParserContext *s) +{ + VC1ParseContext *vpc = s->priv_data; + vpc->v.s.slice_context_count = 1; + return 0; +} + AVCodecParser ff_vc1_parser = { - { CODEC_ID_VC1 }, - sizeof(VC1ParseContext), - NULL, - vc1_parse, - ff_parse1_close, - vc1_split, + .codec_ids = { CODEC_ID_VC1 }, + .priv_data_size = sizeof(VC1ParseContext), + .parser_init = vc1_parse_init, + .parser_parse = vc1_parse, + .parser_close = ff_parse1_close, + .split = vc1_split, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vcr1.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vcr1.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vcr1.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vcr1.c 2012-01-11 00:34:30.000000000 +0000 @@ -114,8 +114,6 @@ *picture= *(AVFrame*)&a->picture; *data_size = sizeof(AVPicture); - emms_c(); - return buf_size; } @@ -130,9 +128,7 @@ p->pict_type= AV_PICTURE_TYPE_I; p->key_frame= 1; - emms_c(); - - align_put_bits(&a->pb); + avpriv_align_put_bits(&a->pb); while(get_bit_count(&a->pb)&31) put_bits(&a->pb, 8, 0); @@ -177,27 +173,25 @@ #endif AVCodec ff_vcr1_decoder = { - "vcr1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VCR1, - sizeof(VCR1Context), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "vcr1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VCR1, + .priv_data_size = sizeof(VCR1Context), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"), }; #if CONFIG_VCR1_ENCODER AVCodec ff_vcr1_encoder = { - "vcr1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VCR1, - sizeof(VCR1Context), - encode_init, - encode_frame, - //encode_end, + .name = "vcr1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VCR1, + .priv_data_size = sizeof(VCR1Context), + .init = encode_init, + .encode = encode_frame, .long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"), }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vda.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vda.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vda.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vda.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,259 @@ +/* + * VDA hardware acceleration + * + * copyright (c) 2011 Sebastien Zwickert + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include +#include + +#include "libavutil/avutil.h" +#include "vda_internal.h" + +/* helper to create a dictionary according to the given pts */ +static CFDictionaryRef vda_dictionary_with_pts(int64_t i_pts) +{ + CFStringRef key = CFSTR("FF_VDA_DECODER_PTS_KEY"); + CFNumberRef value = CFNumberCreate(kCFAllocatorDefault, + kCFNumberSInt64Type, &i_pts); + CFDictionaryRef user_info = CFDictionaryCreate(kCFAllocatorDefault, + (const void **)&key, + (const void **)&value, + 1, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + CFRelease(value); + return user_info; +} + +/* helper to retrieve the pts from the given dictionary */ +static int64_t vda_pts_from_dictionary(CFDictionaryRef user_info) +{ + CFNumberRef pts; + int64_t outValue = 0; + + if (!user_info) + return 0; + + pts = CFDictionaryGetValue(user_info, CFSTR("FF_VDA_DECODER_PTS_KEY")); + + if (pts) + CFNumberGetValue(pts, kCFNumberSInt64Type, &outValue); + + return outValue; +} + +/* Remove and release all frames from the queue. */ +static void vda_clear_queue(struct vda_context *vda_ctx) +{ + vda_frame *top_frame; + + pthread_mutex_lock(&vda_ctx->queue_mutex); + + while (vda_ctx->queue) { + top_frame = vda_ctx->queue; + vda_ctx->queue = top_frame->next_frame; + ff_vda_release_vda_frame(top_frame); + } + + pthread_mutex_unlock(&vda_ctx->queue_mutex); +} + +/* Decoder callback that adds the VDA frame to the queue in display order. */ +static void vda_decoder_callback(void *vda_hw_ctx, + CFDictionaryRef user_info, + OSStatus status, + uint32_t infoFlags, + CVImageBufferRef image_buffer) +{ + struct vda_context *vda_ctx = vda_hw_ctx; + vda_frame *new_frame; + vda_frame *queue_walker; + + if (!image_buffer) + return; + + if (vda_ctx->cv_pix_fmt_type != CVPixelBufferGetPixelFormatType(image_buffer)) + return; + + if (!(new_frame = av_mallocz(sizeof(vda_frame)))) + return; + new_frame->next_frame = NULL; + new_frame->cv_buffer = CVPixelBufferRetain(image_buffer); + new_frame->pts = vda_pts_from_dictionary(user_info); + + pthread_mutex_lock(&vda_ctx->queue_mutex); + + queue_walker = vda_ctx->queue; + + if (!queue_walker || new_frame->pts < queue_walker->pts) { + /* we have an empty queue, or this frame earlier than the current queue head */ + new_frame->next_frame = queue_walker; + vda_ctx->queue = new_frame; + } else { + /* walk the queue and insert this frame where it belongs in display order */ + vda_frame *next_frame; + while (1) { + next_frame = queue_walker->next_frame; + if (!next_frame || new_frame->pts < next_frame->pts) { + new_frame->next_frame = next_frame; + queue_walker->next_frame = new_frame; + break; + } + queue_walker = next_frame; + } + } + + pthread_mutex_unlock(&vda_ctx->queue_mutex); +} + +int ff_vda_create_decoder(struct vda_context *vda_ctx, + uint8_t *extradata, + int extradata_size) +{ + OSStatus status = kVDADecoderNoErr; + CFNumberRef height; + CFNumberRef width; + CFNumberRef format; + CFDataRef avc_data; + CFMutableDictionaryRef config_info; + CFMutableDictionaryRef buffer_attributes; + CFMutableDictionaryRef io_surface_properties; + CFNumberRef cv_pix_fmt; + + pthread_mutex_init(&vda_ctx->queue_mutex, NULL); + + config_info = CFDictionaryCreateMutable(kCFAllocatorDefault, + 4, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + + height = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &vda_ctx->height); + width = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &vda_ctx->width); + format = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &vda_ctx->format); + avc_data = CFDataCreate(kCFAllocatorDefault, extradata, extradata_size); + + CFDictionarySetValue(config_info, kVDADecoderConfiguration_Height, height); + CFDictionarySetValue(config_info, kVDADecoderConfiguration_Width, width); + CFDictionarySetValue(config_info, kVDADecoderConfiguration_SourceFormat, format); + CFDictionarySetValue(config_info, kVDADecoderConfiguration_avcCData, avc_data); + + buffer_attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, + 2, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + io_surface_properties = CFDictionaryCreateMutable(kCFAllocatorDefault, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + cv_pix_fmt = CFNumberCreate(kCFAllocatorDefault, + kCFNumberSInt32Type, + &vda_ctx->cv_pix_fmt_type); + CFDictionarySetValue(buffer_attributes, + kCVPixelBufferPixelFormatTypeKey, + cv_pix_fmt); + CFDictionarySetValue(buffer_attributes, + kCVPixelBufferIOSurfacePropertiesKey, + io_surface_properties); + + status = VDADecoderCreate(config_info, + buffer_attributes, + vda_decoder_callback, + vda_ctx, + &vda_ctx->decoder); + + CFRelease(height); + CFRelease(width); + CFRelease(format); + CFRelease(avc_data); + CFRelease(config_info); + CFRelease(io_surface_properties); + CFRelease(cv_pix_fmt); + CFRelease(buffer_attributes); + + if (kVDADecoderNoErr != status) + return status; + + return 0; +} + +int ff_vda_destroy_decoder(struct vda_context *vda_ctx) +{ + OSStatus status = kVDADecoderNoErr; + + if (vda_ctx->decoder) + status = VDADecoderDestroy(vda_ctx->decoder); + + vda_clear_queue(vda_ctx); + + pthread_mutex_destroy(&vda_ctx->queue_mutex); + + if (kVDADecoderNoErr != status) + return status; + + return 0; +} + +vda_frame *ff_vda_queue_pop(struct vda_context *vda_ctx) +{ + vda_frame *top_frame; + + if (!vda_ctx->queue) + return NULL; + + pthread_mutex_lock(&vda_ctx->queue_mutex); + top_frame = vda_ctx->queue; + vda_ctx->queue = top_frame->next_frame; + pthread_mutex_unlock(&vda_ctx->queue_mutex); + + return top_frame; +} + +void ff_vda_release_vda_frame(vda_frame *frame) +{ + if (frame) { + CVPixelBufferRelease(frame->cv_buffer); + av_freep(&frame); + } +} + +int ff_vda_decoder_decode(struct vda_context *vda_ctx, + uint8_t *bitstream, + int bitstream_size, + int64_t frame_pts) +{ + OSStatus status = kVDADecoderNoErr; + CFDictionaryRef user_info; + CFDataRef coded_frame; + + coded_frame = CFDataCreate(kCFAllocatorDefault, bitstream, bitstream_size); + user_info = vda_dictionary_with_pts(frame_pts); + status = VDADecoderDecode(vda_ctx->decoder, 0, coded_frame, user_info); + + CFRelease(user_info); + CFRelease(coded_frame); + + if (kVDADecoderNoErr != status) + return status; + + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vda.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vda.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vda.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vda.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,144 @@ +/* + * VDA HW acceleration + * + * copyright (c) 2011 Sebastien Zwickert + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VDA_H +#define AVCODEC_VDA_H + +#include +#include + +// emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes +// http://openradar.appspot.com/8026390 +#undef __GNUC_STDC_INLINE__ + +#define Picture QuickdrawPicture +#include +#undef Picture + +/** + * This structure is used to store a decoded frame information and data. + */ +typedef struct vda_frame { + /** + * The PTS of the frame. + * + * - encoding: unused + * - decoding: Set/Unset by libavcodec. + */ + int64_t pts; + + /** + * The CoreVideo buffer that contains the decoded data. + * + * - encoding: unused + * - decoding: Set/Unset by libavcodec. + */ + CVPixelBufferRef cv_buffer; + + /** + * A pointer to the next frame. + * + * - encoding: unused + * - decoding: Set/Unset by libavcodec. + */ + struct vda_frame *next_frame; +} vda_frame; + +/** + * This structure is used to provide the necessary configurations and data + * to the VDA Libav HWAccel implementation. + * + * The application must make it available as AVCodecContext.hwaccel_context. + */ +struct vda_context { + /** + * VDA decoder object. + * + * - encoding: unused + * - decoding: Set/Unset by libavcodec. + */ + VDADecoder decoder; + + /** + * VDA frames queue ordered by presentation timestamp. + * + * - encoding: unused + * - decoding: Set/Unset by libavcodec. + */ + vda_frame *queue; + + /** + * Mutex for locking queue operations. + * + * - encoding: unused + * - decoding: Set/Unset by libavcodec. + */ + pthread_mutex_t queue_mutex; + + /** + * The frame width. + * + * - encoding: unused + * - decoding: Set/Unset by user. + */ + int width; + + /** + * The frame height. + * + * - encoding: unused + * - decoding: Set/Unset by user. + */ + int height; + + /** + * The frame format. + * + * - encoding: unused + * - decoding: Set/Unset by user. + */ + int format; + + /** + * The pixel format for output image buffers. + * + * - encoding: unused + * - decoding: Set/Unset by user. + */ + OSType cv_pix_fmt_type; +}; + +/** Create the video decoder. */ +int ff_vda_create_decoder(struct vda_context *vda_ctx, + uint8_t *extradata, + int extradata_size); + +/** Destroy the video decoder. */ +int ff_vda_destroy_decoder(struct vda_context *vda_ctx); + +/** Return the top frame of the queue. */ +vda_frame *ff_vda_queue_pop(struct vda_context *vda_ctx); + +/** Release the given frame. */ +void ff_vda_release_vda_frame(vda_frame *frame); + +#endif /* AVCODEC_VDA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vda_h264.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vda_h264.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vda_h264.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vda_h264.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * VDA H.264 hardware acceleration + * + * copyright (c) 2011 Sebastien Zwickert + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "h264.h" +#include "h264data.h" + +#include "vda_internal.h" + +/* This structure is used to store the bitstream of the current frame. */ +struct vda_picture_context { + uint8_t *bitstream; + int bitstream_size; +}; + +static int start_frame(AVCodecContext *avctx, + av_unused const uint8_t *buffer, + av_unused uint32_t size) +{ + const H264Context *h = avctx->priv_data; + struct vda_context *vda_ctx = avctx->hwaccel_context; + struct vda_picture_context *pic_ctx = h->s.current_picture_ptr->f.hwaccel_picture_private; + + if (!vda_ctx->decoder) + return -1; + + pic_ctx->bitstream = NULL; + pic_ctx->bitstream_size = 0; + + return 0; +} + +static int decode_slice(AVCodecContext *avctx, + const uint8_t *buffer, + uint32_t size) +{ + H264Context *h = avctx->priv_data; + struct vda_context *vda_ctx = avctx->hwaccel_context; + struct vda_picture_context *pic_ctx = h->s.current_picture_ptr->f.hwaccel_picture_private; + void *tmp; + + if (!vda_ctx->decoder) + return -1; + + tmp = av_realloc(pic_ctx->bitstream, pic_ctx->bitstream_size+size+4); + if (!tmp) + return AVERROR(ENOMEM); + + pic_ctx->bitstream = tmp; + + AV_WB32(pic_ctx->bitstream + pic_ctx->bitstream_size, size); + memcpy(pic_ctx->bitstream + pic_ctx->bitstream_size + 4, buffer, size); + + pic_ctx->bitstream_size += size + 4; + + return 0; +} + +static int end_frame(AVCodecContext *avctx) +{ + H264Context *h = avctx->priv_data; + struct vda_context *vda_ctx = avctx->hwaccel_context; + struct vda_picture_context *pic_ctx = h->s.current_picture_ptr->f.hwaccel_picture_private; + AVFrame *frame = &h->s.current_picture_ptr->f; + int status; + + if (!vda_ctx->decoder || !pic_ctx->bitstream) + return -1; + + status = ff_vda_decoder_decode(vda_ctx, pic_ctx->bitstream, + pic_ctx->bitstream_size, + frame->reordered_opaque); + + if (status) + av_log(avctx, AV_LOG_ERROR, "Failed to decode frame (%d)\n", status); + + av_freep(&pic_ctx->bitstream); + + return status; +} + +AVHWAccel ff_h264_vda_hwaccel = { + .name = "h264_vda", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_H264, + .pix_fmt = PIX_FMT_VDA_VLD, + .start_frame = start_frame, + .decode_slice = decode_slice, + .end_frame = end_frame, + .priv_data_size = sizeof(struct vda_picture_context), +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vda_internal.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vda_internal.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vda_internal.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vda_internal.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * VDA hardware acceleration + * + * copyright (c) 2011 Sebastien Zwickert + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VDA_INTERNAL_H +#define AVCODEC_VDA_INTERNAL_H + +#include "vda.h" + +/** + * @addtogroup VDA_Decoding + * + * @{ + */ + +/** Send frame data to the hardware decoder. */ +int ff_vda_decoder_decode(struct vda_context *vda_ctx, + uint8_t *bitstream, + int bitstream_size, + int64_t frame_pts); + +/* @} */ + +#endif /* AVCODEC_VDA_INTERNAL_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vdpau.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vdpau.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vdpau.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vdpau.c 2012-01-11 00:34:30.000000000 +0000 @@ -33,7 +33,7 @@ #include "vdpau_internal.h" /** - * \addtogroup VDPAU_Decoding + * @addtogroup VDPAU_Decoding * * @{ */ @@ -46,7 +46,7 @@ Picture *pic; int i, list, pic_frame_idx; - render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; + render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0]; assert(render); rf = &render->info.h264.referenceFrames[0]; @@ -58,11 +58,11 @@ for (i = 0; i < ls; ++i) { pic = lp[i]; - if (!pic || !pic->reference) + if (!pic || !pic->f.reference) continue; pic_frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; - render_ref = (struct vdpau_render_state *)pic->data[0]; + render_ref = (struct vdpau_render_state *)pic->f.data[0]; assert(render_ref); rf2 = &render->info.h264.referenceFrames[0]; @@ -76,8 +76,8 @@ ++rf2; } if (rf2 != rf) { - rf2->top_is_reference |= (pic->reference & PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE; - rf2->bottom_is_reference |= (pic->reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE; + rf2->top_is_reference |= (pic->f.reference & PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE; + rf2->bottom_is_reference |= (pic->f.reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE; continue; } @@ -86,8 +86,8 @@ rf->surface = render_ref->surface; rf->is_long_term = pic->long_ref; - rf->top_is_reference = (pic->reference & PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE; - rf->bottom_is_reference = (pic->reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE; + rf->top_is_reference = (pic->f.reference & PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE; + rf->bottom_is_reference = (pic->f.reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE; rf->field_order_cnt[0] = pic->field_poc[0]; rf->field_order_cnt[1] = pic->field_poc[1]; rf->frame_idx = pic_frame_idx; @@ -112,7 +112,7 @@ { struct vdpau_render_state *render; - render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; + render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0]; assert(render); render->bitstream_buffers= av_fast_realloc( @@ -133,7 +133,7 @@ struct vdpau_render_state *render; int i; - render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; + render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0]; assert(render); for (i = 0; i < 2; ++i) { @@ -151,14 +151,14 @@ H264Context *h = s->avctx->priv_data; struct vdpau_render_state *render; - render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; + render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0]; assert(render); render->info.h264.slice_count = h->slice_num; if (render->info.h264.slice_count < 1) return; - render->info.h264.is_reference = (s->current_picture_ptr->reference & 3) ? VDP_TRUE : VDP_FALSE; + render->info.h264.is_reference = (s->current_picture_ptr->f.reference & 3) ? VDP_TRUE : VDP_FALSE; render->info.h264.field_pic_flag = s->picture_structure != PICT_FRAME; render->info.h264.bottom_field_flag = s->picture_structure == PICT_BOTTOM_FIELD; render->info.h264.num_ref_frames = h->sps.ref_frame_count; @@ -183,7 +183,8 @@ render->info.h264.deblocking_filter_control_present_flag = h->pps.deblocking_filter_parameters_present; render->info.h264.redundant_pic_cnt_present_flag = h->pps.redundant_pic_cnt_present; memcpy(render->info.h264.scaling_lists_4x4, h->pps.scaling_matrix4, sizeof(render->info.h264.scaling_lists_4x4)); - memcpy(render->info.h264.scaling_lists_8x8, h->pps.scaling_matrix8, sizeof(render->info.h264.scaling_lists_8x8)); + memcpy(render->info.h264.scaling_lists_8x8[0], h->pps.scaling_matrix8[0], sizeof(render->info.h264.scaling_lists_8x8[0])); + memcpy(render->info.h264.scaling_lists_8x8[1], h->pps.scaling_matrix8[3], sizeof(render->info.h264.scaling_lists_8x8[0])); ff_draw_horiz_band(s, 0, s->avctx->height); render->bitstream_buffers_used = 0; @@ -197,7 +198,7 @@ if (!s->current_picture_ptr) return; - render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; + render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0]; assert(render); /* fill VdpPictureInfoMPEG1Or2 struct */ @@ -226,12 +227,12 @@ switch(s->pict_type){ case AV_PICTURE_TYPE_B: - next = (struct vdpau_render_state *)s->next_picture.data[0]; + next = (struct vdpau_render_state *)s->next_picture.f.data[0]; assert(next); render->info.mpeg.backward_reference = next->surface; // no return here, going to set forward prediction case AV_PICTURE_TYPE_P: - last = (struct vdpau_render_state *)s->last_picture.data[0]; + last = (struct vdpau_render_state *)s->last_picture.f.data[0]; if (!last) // FIXME: Does this test make sense? last = render; // predict second field from the first render->info.mpeg.forward_reference = last->surface; @@ -252,7 +253,7 @@ VC1Context *v = s->avctx->priv_data; struct vdpau_render_state *render, *last, *next; - render = (struct vdpau_render_state *)s->current_picture.data[0]; + render = (struct vdpau_render_state *)s->current_picture.f.data[0]; assert(render); /* fill LvPictureInfoVC1 struct */ @@ -296,12 +297,12 @@ switch(s->pict_type){ case AV_PICTURE_TYPE_B: - next = (struct vdpau_render_state *)s->next_picture.data[0]; + next = (struct vdpau_render_state *)s->next_picture.f.data[0]; assert(next); render->info.vc1.backward_reference = next->surface; // no break here, going to set forward prediction case AV_PICTURE_TYPE_P: - last = (struct vdpau_render_state *)s->last_picture.data[0]; + last = (struct vdpau_render_state *)s->last_picture.f.data[0]; if (!last) // FIXME: Does this test make sense? last = render; // predict second field from the first render->info.vc1.forward_reference = last->surface; @@ -323,7 +324,7 @@ if (!s->current_picture_ptr) return; - render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; + render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0]; assert(render); /* fill VdpPictureInfoMPEG4Part2 struct */ @@ -352,13 +353,13 @@ switch (s->pict_type) { case AV_PICTURE_TYPE_B: - next = (struct vdpau_render_state *)s->next_picture.data[0]; + next = (struct vdpau_render_state *)s->next_picture.f.data[0]; assert(next); render->info.mpeg4.backward_reference = next->surface; render->info.mpeg4.vop_coding_type = 2; // no break here, going to set forward prediction case AV_PICTURE_TYPE_P: - last = (struct vdpau_render_state *)s->last_picture.data[0]; + last = (struct vdpau_render_state *)s->last_picture.f.data[0]; assert(last); render->info.mpeg4.forward_reference = last->surface; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vdpau.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vdpau.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vdpau.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vdpau.h 2012-01-11 00:34:30.000000000 +0000 @@ -25,7 +25,7 @@ #define AVCODEC_VDPAU_H /** - * \defgroup Decoder VDPAU Decoder and Renderer + * @defgroup Decoder VDPAU Decoder and Renderer * * VDPAU hardware acceleration has two modules * - VDPAU decoding @@ -38,25 +38,25 @@ * and rendering (API calls) are done as part of the VDPAU * presentation (vo_vdpau.c) module. * - * \defgroup VDPAU_Decoding VDPAU Decoding - * \ingroup Decoder + * @defgroup VDPAU_Decoding VDPAU Decoding + * @ingroup Decoder * @{ */ #include #include -/** \brief The videoSurface is used for rendering. */ +/** @brief The videoSurface is used for rendering. */ #define FF_VDPAU_STATE_USED_FOR_RENDER 1 /** - * \brief The videoSurface is needed for reference/prediction. + * @brief The videoSurface is needed for reference/prediction. * The codec manipulates this. */ #define FF_VDPAU_STATE_USED_FOR_REFERENCE 2 /** - * \brief This structure is used as a callback between the Libav + * @brief This structure is used as a callback between the Libav * decoder (vd_) and presentation (vo_) module. * This is used for defining a video frame containing surface, * picture parameter, bitstream information etc which are passed diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/version.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/version.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/version.h 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/version.h 2012-01-11 00:34:30.000000000 +0000 @@ -21,8 +21,8 @@ #define AVCODEC_VERSION_H #define LIBAVCODEC_VERSION_MAJOR 53 -#define LIBAVCODEC_VERSION_MINOR 5 -#define LIBAVCODEC_VERSION_MICRO 0 +#define LIBAVCODEC_VERSION_MINOR 32 +#define LIBAVCODEC_VERSION_MICRO 2 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ @@ -68,5 +68,56 @@ #ifndef FF_API_GET_PIX_FMT_NAME #define FF_API_GET_PIX_FMT_NAME (LIBAVCODEC_VERSION_MAJOR < 54) #endif +#ifndef FF_API_ALLOC_CONTEXT +#define FF_API_ALLOC_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_AVCODEC_OPEN +#define FF_API_AVCODEC_OPEN (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_DRC_SCALE +#define FF_API_DRC_SCALE (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_ER +#define FF_API_ER (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_AVCODEC_INIT +#define FF_API_AVCODEC_INIT (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_X264_GLOBAL_OPTS +#define FF_API_X264_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_MPEGVIDEO_GLOBAL_OPTS +#define FF_API_MPEGVIDEO_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_LAME_GLOBAL_OPTS +#define FF_API_LAME_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_SNOW_GLOBAL_OPTS +#define FF_API_SNOW_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_MJPEG_GLOBAL_OPTS +#define FF_API_MJPEG_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_GET_ALPHA_INFO +#define FF_API_GET_ALPHA_INFO (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_PARSE_FRAME +#define FF_API_PARSE_FRAME (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_INTERNAL_CONTEXT +#define FF_API_INTERNAL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_TIFFENC_COMPLEVEL +#define FF_API_TIFFENC_COMPLEVEL (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_DATA_POINTERS +#define FF_API_DATA_POINTERS (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_OLD_DECODE_AUDIO +#define FF_API_OLD_DECODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_AVFRAME_AGE +#define FF_API_AVFRAME_AGE (LIBAVCODEC_VERSION_MAJOR < 54) +#endif #endif /* AVCODEC_VERSION_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vmdav.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vmdav.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vmdav.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vmdav.c 2012-01-11 00:34:30.000000000 +0000 @@ -72,9 +72,11 @@ #define QUEUE_SIZE 0x1000 #define QUEUE_MASK 0x0FFF -static void lz_unpack(const unsigned char *src, unsigned char *dest, int dest_len) +static void lz_unpack(const unsigned char *src, int src_len, + unsigned char *dest, int dest_len) { const unsigned char *s; + unsigned int s_len; unsigned char *d; unsigned char *d_end; unsigned char queue[QUEUE_SIZE]; @@ -87,13 +89,16 @@ unsigned int i, j; s = src; + s_len = src_len; d = dest; d_end = d + dest_len; dataleft = AV_RL32(s); - s += 4; + s += 4; s_len -= 4; memset(queue, 0x20, QUEUE_SIZE); + if (s_len < 4) + return; if (AV_RL32(s) == 0x56781234) { - s += 4; + s += 4; s_len -= 4; qpos = 0x111; speclen = 0xF + 3; } else { @@ -101,32 +106,41 @@ speclen = 100; /* no speclen */ } - while (dataleft > 0) { - tag = *s++; + while (dataleft > 0 && s_len > 0) { + tag = *s++; s_len--; if ((tag == 0xFF) && (dataleft > 8)) { - if (d + 8 > d_end) + if (d + 8 > d_end || s_len < 8) return; for (i = 0; i < 8; i++) { queue[qpos++] = *d++ = *s++; qpos &= QUEUE_MASK; } + s_len -= 8; dataleft -= 8; } else { for (i = 0; i < 8; i++) { if (dataleft == 0) break; if (tag & 0x01) { - if (d + 1 > d_end) + if (d + 1 > d_end || s_len < 1) return; queue[qpos++] = *d++ = *s++; qpos &= QUEUE_MASK; dataleft--; + s_len--; } else { + if (s_len < 2) + return; chainofs = *s++; chainofs |= ((*s & 0xF0) << 4); chainlen = (*s++ & 0x0F) + 3; - if (chainlen == speclen) + s_len -= 2; + if (chainlen == speclen) { + if (s_len < 1) + return; chainlen = *s++ + 0xF + 3; + s_len--; + } if (d + chainlen > d_end) return; for (j = 0; j < chainlen; j++) { @@ -143,7 +157,7 @@ } static int rle_unpack(const unsigned char *src, unsigned char *dest, - int src_len, int dest_len) + int src_count, int src_size, int dest_len) { const unsigned char *ps; unsigned char *pd; @@ -152,31 +166,40 @@ ps = src; pd = dest; - if (src_len & 1) + if (src_count & 1) { + if (src_size < 1) + return 0; *pd++ = *ps++; + src_size--; + } - src_len >>= 1; + src_count >>= 1; i = 0; do { + if (src_size < 1) + break; l = *ps++; + src_size--; if (l & 0x80) { l = (l & 0x7F) * 2; - if (pd + l > dest_end) + if (pd + l > dest_end || src_size < l) return ps - src; memcpy(pd, ps, l); ps += l; + src_size -= l; pd += l; } else { - if (pd + i > dest_end) + if (pd + i > dest_end || src_size < 2) return ps - src; for (i = 0; i < l; i++) { *pd++ = ps[0]; *pd++ = ps[1]; } ps += 2; + src_size -= 2; } i += l; - } while (i < src_len); + } while (i < src_count); return ps - src; } @@ -191,6 +214,7 @@ const unsigned char *p = s->buf + 16; const unsigned char *pb; + unsigned int pb_size; unsigned char meth; unsigned char *dp; /* pointer to current frame */ unsigned char *pp; /* pointer to previous frame */ @@ -204,6 +228,16 @@ frame_y = AV_RL16(&s->buf[8]); frame_width = AV_RL16(&s->buf[10]) - frame_x + 1; frame_height = AV_RL16(&s->buf[12]) - frame_y + 1; + if (frame_x < 0 || frame_width < 0 || + frame_x >= s->avctx->width || + frame_width > s->avctx->width || + frame_x + frame_width > s->avctx->width) + return; + if (frame_y < 0 || frame_height < 0 || + frame_y >= s->avctx->height || + frame_height > s->avctx->height || + frame_y + frame_height > s->avctx->height) + return; if ((frame_width == s->avctx->width && frame_height == s->avctx->height) && (frame_x || frame_y)) { @@ -216,8 +250,9 @@ /* if only a certain region will be updated, copy the entire previous * frame before the decode */ - if (frame_x || frame_y || (frame_width != s->avctx->width) || - (frame_height != s->avctx->height)) { + if (s->prev_frame.data[0] && + (frame_x || frame_y || (frame_width != s->avctx->width) || + (frame_height != s->avctx->height))) { memcpy(s->frame.data[0], s->prev_frame.data[0], s->avctx->height * s->frame.linesize[0]); @@ -235,14 +270,19 @@ } s->size -= (256 * 3 + 2); } - if (s->size >= 0) { + if (s->size > 0) { /* originally UnpackFrame in VAG's code */ pb = p; - meth = *pb++; + pb_size = s->buf + s->size - pb; + if (pb_size < 1) + return; + meth = *pb++; pb_size--; if (meth & 0x80) { - lz_unpack(pb, s->unpack_buffer, s->unpack_buffer_size); + lz_unpack(pb, pb_size, + s->unpack_buffer, s->unpack_buffer_size); meth &= 0x7F; pb = s->unpack_buffer; + pb_size = s->unpack_buffer_size; } dp = &s->frame.data[0][frame_y * s->frame.linesize[0] + frame_x]; @@ -252,17 +292,21 @@ for (i = 0; i < frame_height; i++) { ofs = 0; do { + if (pb_size < 1) + return; len = *pb++; + pb_size--; if (len & 0x80) { len = (len & 0x7F) + 1; - if (ofs + len > frame_width) + if (ofs + len > frame_width || pb_size < len) return; memcpy(&dp[ofs], pb, len); pb += len; + pb_size -= len; ofs += len; } else { /* interframe pixel copy */ - if (ofs + len + 1 > frame_width) + if (ofs + len + 1 > frame_width || !s->prev_frame.data[0]) return; memcpy(&dp[ofs], &pp[ofs], len + 1); ofs += len + 1; @@ -280,8 +324,11 @@ case 2: for (i = 0; i < frame_height; i++) { + if (pb_size < frame_width) + return; memcpy(dp, pb, frame_width); pb += frame_width; + pb_size -= frame_width; dp += s->frame.linesize[0]; pp += s->prev_frame.linesize[0]; } @@ -291,18 +338,27 @@ for (i = 0; i < frame_height; i++) { ofs = 0; do { + if (pb_size < 1) + return; len = *pb++; + pb_size--; if (len & 0x80) { len = (len & 0x7F) + 1; + if (pb_size < 1) + return; if (*pb++ == 0xFF) - len = rle_unpack(pb, &dp[ofs], len, frame_width - ofs); - else + len = rle_unpack(pb, &dp[ofs], len, pb_size, frame_width - ofs); + else { + if (pb_size < len) + return; memcpy(&dp[ofs], pb, len); + } pb += len; + pb_size -= 1 + len; ofs += len; } else { /* interframe pixel copy */ - if (ofs + len + 1 > frame_width) + if (ofs + len + 1 > frame_width || !s->prev_frame.data[0]) return; memcpy(&dp[ofs], &pp[ofs], len + 1); ofs += len + 1; @@ -417,9 +473,9 @@ #define BLOCK_TYPE_SILENCE 3 typedef struct VmdAudioContext { - AVCodecContext *avctx; + AVFrame frame; int out_bps; - int predictors[2]; + int chunk_size; } VmdAudioContext; static const uint16_t vmdaudio_table[128] = { @@ -442,13 +498,26 @@ { VmdAudioContext *s = avctx->priv_data; - s->avctx = avctx; + if (avctx->channels < 1 || avctx->channels > 2) { + av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n"); + return AVERROR(EINVAL); + } + if (avctx->block_align < 1) { + av_log(avctx, AV_LOG_ERROR, "invalid block align\n"); + return AVERROR(EINVAL); + } + if (avctx->bits_per_coded_sample == 16) avctx->sample_fmt = AV_SAMPLE_FMT_S16; else avctx->sample_fmt = AV_SAMPLE_FMT_U8; s->out_bps = av_get_bytes_per_sample(avctx->sample_fmt); + s->chunk_size = avctx->block_align + avctx->channels * (s->out_bps == 2); + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + av_log(avctx, AV_LOG_DEBUG, "%d channels, %d bits/sample, " "block align = %d, sample rate = %d\n", avctx->channels, avctx->bits_per_coded_sample, avctx->block_align, @@ -457,56 +526,50 @@ return 0; } -static void vmdaudio_decode_audio(VmdAudioContext *s, unsigned char *data, - const uint8_t *buf, int buf_size, int stereo) +static void decode_audio_s16(int16_t *out, const uint8_t *buf, int buf_size, + int channels) { - int i; - int chan = 0; - int16_t *out = (int16_t*)data; - - for(i = 0; i < buf_size; i++) { - if(buf[i] & 0x80) - s->predictors[chan] -= vmdaudio_table[buf[i] & 0x7F]; + int ch; + const uint8_t *buf_end = buf + buf_size; + int predictor[2]; + int st = channels - 1; + + /* decode initial raw sample */ + for (ch = 0; ch < channels; ch++) { + predictor[ch] = (int16_t)AV_RL16(buf); + buf += 2; + *out++ = predictor[ch]; + } + + /* decode DPCM samples */ + ch = 0; + while (buf < buf_end) { + uint8_t b = *buf++; + if (b & 0x80) + predictor[ch] -= vmdaudio_table[b & 0x7F]; else - s->predictors[chan] += vmdaudio_table[buf[i]]; - s->predictors[chan] = av_clip_int16(s->predictors[chan]); - out[i] = s->predictors[chan]; - chan ^= stereo; + predictor[ch] += vmdaudio_table[b]; + predictor[ch] = av_clip_int16(predictor[ch]); + *out++ = predictor[ch]; + ch ^= st; } } -static int vmdaudio_loadsound(VmdAudioContext *s, unsigned char *data, - const uint8_t *buf, int silent_chunks, int data_size) -{ - int silent_size = s->avctx->block_align * silent_chunks * s->out_bps; - - if (silent_chunks) { - memset(data, s->out_bps == 2 ? 0x00 : 0x80, silent_size); - data += silent_size; - } - if (s->avctx->bits_per_coded_sample == 16) - vmdaudio_decode_audio(s, data, buf, data_size, s->avctx->channels == 2); - else { - /* just copy the data */ - memcpy(data, buf, data_size); - } - - return silent_size + data_size * s->out_bps; -} - -static int vmdaudio_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; + const uint8_t *buf_end; int buf_size = avpkt->size; VmdAudioContext *s = avctx->priv_data; - int block_type, silent_chunks; - unsigned char *output_samples = (unsigned char *)data; + int block_type, silent_chunks, audio_chunks; + int ret; + uint8_t *output_samples_u8; + int16_t *output_samples_s16; if (buf_size < 16) { av_log(avctx, AV_LOG_WARNING, "skipping small junk packet\n"); - *data_size = 0; + *got_frame_ptr = 0; return buf_size; } @@ -518,10 +581,16 @@ buf += 16; buf_size -= 16; + /* get number of silent chunks */ silent_chunks = 0; if (block_type == BLOCK_TYPE_INITIAL) { - uint32_t flags = AV_RB32(buf); - silent_chunks = av_popcount(flags); + uint32_t flags; + if (buf_size < 4) { + av_log(avctx, AV_LOG_ERROR, "packet is too small\n"); + return AVERROR(EINVAL); + } + flags = AV_RB32(buf); + silent_chunks = av_popcount(flags); buf += 4; buf_size -= 4; } else if (block_type == BLOCK_TYPE_SILENCE) { @@ -530,10 +599,47 @@ } /* ensure output buffer is large enough */ - if (*data_size < (avctx->block_align*silent_chunks + buf_size) * s->out_bps) - return -1; + audio_chunks = buf_size / s->chunk_size; + + /* get output buffer */ + s->frame.nb_samples = ((silent_chunks + audio_chunks) * avctx->block_align) / avctx->channels; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + output_samples_u8 = s->frame.data[0]; + output_samples_s16 = (int16_t *)s->frame.data[0]; + + /* decode silent chunks */ + if (silent_chunks > 0) { + int silent_size = avctx->block_align * silent_chunks; + if (s->out_bps == 2) { + memset(output_samples_s16, 0x00, silent_size * 2); + output_samples_s16 += silent_size; + } else { + memset(output_samples_u8, 0x80, silent_size); + output_samples_u8 += silent_size; + } + } + + /* decode audio chunks */ + if (audio_chunks > 0) { + buf_end = buf + buf_size; + while (buf < buf_end) { + if (s->out_bps == 2) { + decode_audio_s16(output_samples_s16, buf, s->chunk_size, + avctx->channels); + output_samples_s16 += avctx->block_align; + } else { + memcpy(output_samples_u8, buf, s->chunk_size); + output_samples_u8 += avctx->block_align; + } + buf += s->chunk_size; + } + } - *data_size = vmdaudio_loadsound(s, output_samples, buf, silent_chunks, buf_size); + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; return avpkt->size; } @@ -544,26 +650,24 @@ */ AVCodec ff_vmdvideo_decoder = { - "vmdvideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VMDVIDEO, - sizeof(VmdVideoContext), - vmdvideo_decode_init, - NULL, - vmdvideo_decode_end, - vmdvideo_decode_frame, - CODEC_CAP_DR1, + .name = "vmdvideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VMDVIDEO, + .priv_data_size = sizeof(VmdVideoContext), + .init = vmdvideo_decode_init, + .close = vmdvideo_decode_end, + .decode = vmdvideo_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD video"), }; AVCodec ff_vmdaudio_decoder = { - "vmdaudio", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_VMDAUDIO, - sizeof(VmdAudioContext), - vmdaudio_decode_init, - NULL, - NULL, - vmdaudio_decode_frame, + .name = "vmdaudio", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_VMDAUDIO, + .priv_data_size = sizeof(VmdAudioContext), + .init = vmdaudio_decode_init, + .decode = vmdaudio_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD audio"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vmnc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vmnc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vmnc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vmnc.c 2012-01-11 00:34:30.000000000 +0000 @@ -509,15 +509,14 @@ } AVCodec ff_vmnc_decoder = { - "vmnc", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VMNC, - sizeof(VmncContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "vmnc", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VMNC, + .priv_data_size = sizeof(VmncContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("VMware Screen Codec / VMware Video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vorbis.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vorbis.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vorbis.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vorbis.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,8 +1,4 @@ -/** - * @file - * Common code for Vorbis I encoder and decoder - * @author Denes Balatoni ( dbalatoni programozo hu ) - * +/* * This file is part of Libav. * * Libav is free software; you can redistribute it and/or @@ -20,7 +16,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define ALT_BITSTREAM_READER_LE +/** + * @file + * Common code for Vorbis I encoder and decoder + * @author Denes Balatoni ( dbalatoni programozo hu ) + */ + +#define BITSTREAM_READER_LE #include "avcodec.h" #include "get_bits.h" @@ -150,7 +152,7 @@ } } -static inline void render_line_unrolled(intptr_t x, intptr_t y, int x1, +static inline void render_line_unrolled(intptr_t x, uint8_t y, int x1, intptr_t sy, int ady, int adx, float *buf) { @@ -173,7 +175,7 @@ } } -static void render_line(int x0, int y0, int x1, int y1, float *buf) +static void render_line(int x0, uint8_t y0, int x1, int y1, float *buf) { int dy = y1 - y0; int adx = x1 - x0; @@ -183,10 +185,10 @@ if (ady*2 <= adx) { // optimized common case render_line_unrolled(x0, y0, x1, sy, ady, adx, buf); } else { - int base = dy / adx; - int x = x0; - int y = y0; - int err = -adx; + int base = dy / adx; + int x = x0; + uint8_t y = y0; + int err = -adx; ady -= FFABS(base) * adx; while (++x < x1) { y += base; @@ -204,7 +206,8 @@ uint16_t *y_list, int *flag, int multiplier, float *out, int samples) { - int lx, ly, i; + int lx, i; + uint8_t ly; lx = 0; ly = y_list[0] * multiplier; for (i = 1; i < values; i++) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vorbis_data.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vorbis_data.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vorbis_data.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vorbis_data.c 2012-01-11 00:34:30.000000000 +0000 @@ -44,7 +44,7 @@ { 0, 2, 1, 6, 7, 4, 5, 3 }, }; -const int64_t ff_vorbis_channel_layouts[9] = { +const uint64_t ff_vorbis_channel_layouts[9] = { AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_SURROUND, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vorbisdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vorbisdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vorbisdec.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vorbisdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,8 +1,4 @@ -/** - * @file - * Vorbis I decoder - * @author Denes Balatoni ( dbalatoni programozo hu ) - * +/* * This file is part of Libav. * * Libav is free software; you can redistribute it and/or @@ -20,10 +16,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * Vorbis I decoder + * @author Denes Balatoni ( dbalatoni programozo hu ) + */ + #include #include -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "avcodec.h" #include "get_bits.h" #include "dsputil.h" @@ -119,6 +121,7 @@ typedef struct vorbis_context_s { AVCodecContext *avccontext; + AVFrame frame; GetBitContext gb; DSPContext dsp; FmtConvertContext fmt_conv; @@ -162,7 +165,7 @@ av_log(vc->avccontext, AV_LOG_ERROR,\ idx_err_str,\ (int)(idx), (int)(limit - 1), #idx, __FILE__, __LINE__);\ - return -1;\ + return AVERROR_INVALIDDATA;\ } #define GET_VALIDATED_INDEX(idx, bits, limit) \ {\ @@ -235,6 +238,7 @@ uint32_t *tmp_vlc_codes; GetBitContext *gb = &vc->gb; uint16_t *codebook_multiplicands; + int ret = 0; vc->codebook_count = get_bits(gb, 8) + 1; @@ -254,6 +258,7 @@ if (get_bits(gb, 24) != 0x564342) { av_log(vc->avccontext, AV_LOG_ERROR, " %u. Codebook setup data corrupt.\n", cb); + ret = AVERROR_INVALIDDATA; goto error; } @@ -262,6 +267,7 @@ av_log(vc->avccontext, AV_LOG_ERROR, " %u. Codebook's dimension is invalid (%d).\n", cb, codebook_setup->dimensions); + ret = AVERROR_INVALIDDATA; goto error; } entries = get_bits(gb, 24); @@ -269,6 +275,7 @@ av_log(vc->avccontext, AV_LOG_ERROR, " %u. Codebook has too many entries (%u).\n", cb, entries); + ret = AVERROR_INVALIDDATA; goto error; } @@ -326,6 +333,7 @@ } if (current_entry>used_entries) { av_log(vc->avccontext, AV_LOG_ERROR, " More codelengths than codes in codebook. \n"); + ret = AVERROR_INVALIDDATA; goto error; } } @@ -393,17 +401,20 @@ } if (j != used_entries) { av_log(vc->avccontext, AV_LOG_ERROR, "Bug in codevector vector building code. \n"); + ret = AVERROR_INVALIDDATA; goto error; } entries = used_entries; } else if (codebook_setup->lookup_type >= 2) { av_log(vc->avccontext, AV_LOG_ERROR, "Codebook lookup type not supported. \n"); + ret = AVERROR_INVALIDDATA; goto error; } // Initialize VLC table if (ff_vorbis_len2vlc(tmp_vlc_bits, tmp_vlc_codes, entries)) { av_log(vc->avccontext, AV_LOG_ERROR, " Invalid code lengths while generating vlcs. \n"); + ret = AVERROR_INVALIDDATA; goto error; } codebook_setup->maxdepth = 0; @@ -418,7 +429,11 @@ codebook_setup->maxdepth = (codebook_setup->maxdepth+codebook_setup->nb_bits - 1) / codebook_setup->nb_bits; - if (init_vlc(&codebook_setup->vlc, codebook_setup->nb_bits, entries, tmp_vlc_bits, sizeof(*tmp_vlc_bits), sizeof(*tmp_vlc_bits), tmp_vlc_codes, sizeof(*tmp_vlc_codes), sizeof(*tmp_vlc_codes), INIT_VLC_LE)) { + if ((ret = init_vlc(&codebook_setup->vlc, codebook_setup->nb_bits, + entries, tmp_vlc_bits, sizeof(*tmp_vlc_bits), + sizeof(*tmp_vlc_bits), tmp_vlc_codes, + sizeof(*tmp_vlc_codes), sizeof(*tmp_vlc_codes), + INIT_VLC_LE))) { av_log(vc->avccontext, AV_LOG_ERROR, " Error generating vlc tables. \n"); goto error; } @@ -434,7 +449,7 @@ av_free(tmp_vlc_bits); av_free(tmp_vlc_codes); av_free(codebook_multiplicands); - return -1; + return ret; } // Process time domain transforms part (unused in Vorbis I) @@ -452,7 +467,7 @@ if (vorbis_tdtransform) { av_log(vc->avccontext, AV_LOG_ERROR, "Vorbis time domain transform data nonzero. \n"); - return -1; + return AVERROR_INVALIDDATA; } } return 0; @@ -544,7 +559,7 @@ av_log(vc->avccontext, AV_LOG_ERROR, "Floor value is too large for blocksize: %u (%"PRIu32")\n", rangemax, vc->blocksize[1] / 2); - return -1; + return AVERROR_INVALIDDATA; } floor_setup->data.t1.list[0].x = 0; floor_setup->data.t1.list[1].x = rangemax; @@ -574,7 +589,7 @@ if (floor_setup->data.t0.amplitude_bits == 0) { av_log(vc->avccontext, AV_LOG_ERROR, "Floor 0 amplitude bits is 0.\n"); - return -1; + return AVERROR_INVALIDDATA; } floor_setup->data.t0.amplitude_offset = get_bits(gb, 8); floor_setup->data.t0.num_books = get_bits(gb, 4) + 1; @@ -583,7 +598,7 @@ floor_setup->data.t0.book_list = av_malloc(floor_setup->data.t0.num_books); if (!floor_setup->data.t0.book_list) - return -1; + return AVERROR(ENOMEM); /* read book indexes */ { int idx; @@ -604,7 +619,7 @@ av_malloc((floor_setup->data.t0.order + 1 + max_codebook_dim) * sizeof(*floor_setup->data.t0.lsp)); if (!floor_setup->data.t0.lsp) - return -1; + return AVERROR(ENOMEM); /* debug output parsed headers */ av_dlog(NULL, "floor0 order: %u\n", floor_setup->data.t0.order); @@ -628,7 +643,7 @@ } } else { av_log(vc->avccontext, AV_LOG_ERROR, "Invalid floor type!\n"); - return -1; + return AVERROR_INVALIDDATA; } } return 0; @@ -660,13 +675,13 @@ res_setup->partition_size = get_bits(gb, 24) + 1; /* Validations to prevent a buffer overflow later. */ if (res_setup->begin>res_setup->end || - res_setup->end > vc->avccontext->channels * vc->blocksize[1] / 2 || + res_setup->end > (res_setup->type == 2 ? vc->avccontext->channels : 1) * vc->blocksize[1] / 2 || (res_setup->end-res_setup->begin) / res_setup->partition_size > V_MAX_PARTITIONS) { av_log(vc->avccontext, AV_LOG_ERROR, "partition out of bounds: type, begin, end, size, blocksize: %"PRIu16", %"PRIu32", %"PRIu32", %u, %"PRIu32"\n", res_setup->type, res_setup->begin, res_setup->end, res_setup->partition_size, vc->blocksize[1] / 2); - return -1; + return AVERROR_INVALIDDATA; } res_setup->classifications = get_bits(gb, 6) + 1; @@ -731,7 +746,7 @@ if (get_bits(gb, 16)) { av_log(vc->avccontext, AV_LOG_ERROR, "Other mappings than type 0 are not compliant with the Vorbis I specification. \n"); - return -1; + return AVERROR_INVALIDDATA; } if (get_bits1(gb)) { mapping_setup->submaps = get_bits(gb, 4) + 1; @@ -758,7 +773,7 @@ if (get_bits(gb, 2)) { av_log(vc->avccontext, AV_LOG_ERROR, "%u. mapping setup data invalid.\n", i); - return -1; // following spec. + return AVERROR_INVALIDDATA; // following spec. } if (mapping_setup->submaps>1) { @@ -801,8 +816,7 @@ for (idx = 0; idx < n; ++idx) { map[idx] = floor(BARK((vf->rate * idx) / (2.0f * n)) * - ((vf->bark_map_size) / - BARK(vf->rate / 2.0f))); + (vf->bark_map_size / BARK(vf->rate / 2.0f))); if (vf->bark_map_size-1 < map[idx]) map[idx] = vf->bark_map_size - 1; } @@ -845,41 +859,42 @@ static int vorbis_parse_setup_hdr(vorbis_context *vc) { GetBitContext *gb = &vc->gb; + int ret; if ((get_bits(gb, 8) != 'v') || (get_bits(gb, 8) != 'o') || (get_bits(gb, 8) != 'r') || (get_bits(gb, 8) != 'b') || (get_bits(gb, 8) != 'i') || (get_bits(gb, 8) != 's')) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (no vorbis signature). \n"); - return -1; + return AVERROR_INVALIDDATA; } - if (vorbis_parse_setup_hdr_codebooks(vc)) { + if ((ret = vorbis_parse_setup_hdr_codebooks(vc))) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (codebooks). \n"); - return -2; + return ret; } - if (vorbis_parse_setup_hdr_tdtransforms(vc)) { + if ((ret = vorbis_parse_setup_hdr_tdtransforms(vc))) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (time domain transforms). \n"); - return -3; + return ret; } - if (vorbis_parse_setup_hdr_floors(vc)) { + if ((ret = vorbis_parse_setup_hdr_floors(vc))) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (floors). \n"); - return -4; + return ret; } - if (vorbis_parse_setup_hdr_residues(vc)) { + if ((ret = vorbis_parse_setup_hdr_residues(vc))) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (residues). \n"); - return -5; + return ret; } - if (vorbis_parse_setup_hdr_mappings(vc)) { + if ((ret = vorbis_parse_setup_hdr_mappings(vc))) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (mappings). \n"); - return -6; + return ret; } - if (vorbis_parse_setup_hdr_modes(vc)) { + if ((ret = vorbis_parse_setup_hdr_modes(vc))) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (modes). \n"); - return -7; + return ret; } if (!get_bits1(gb)) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (framing flag). \n"); - return -8; // framing flag bit unset error + return AVERROR_INVALIDDATA; // framing flag bit unset error } return 0; @@ -896,19 +911,19 @@ (get_bits(gb, 8) != 'r') || (get_bits(gb, 8) != 'b') || (get_bits(gb, 8) != 'i') || (get_bits(gb, 8) != 's')) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis id header packet corrupt (no vorbis signature). \n"); - return -1; + return AVERROR_INVALIDDATA; } vc->version = get_bits_long(gb, 32); //FIXME check 0 vc->audio_channels = get_bits(gb, 8); if (vc->audio_channels <= 0) { av_log(vc->avccontext, AV_LOG_ERROR, "Invalid number of channels\n"); - return -1; + return AVERROR_INVALIDDATA; } vc->audio_samplerate = get_bits_long(gb, 32); if (vc->audio_samplerate <= 0) { av_log(vc->avccontext, AV_LOG_ERROR, "Invalid samplerate\n"); - return -1; + return AVERROR_INVALIDDATA; } vc->bitrate_maximum = get_bits_long(gb, 32); vc->bitrate_nominal = get_bits_long(gb, 32); @@ -919,20 +934,14 @@ vc->blocksize[1] = (1 << bl1); if (bl0 > 13 || bl0 < 6 || bl1 > 13 || bl1 < 6 || bl1 < bl0) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis id header packet corrupt (illegal blocksize). \n"); - return -3; - } - // output format int16 - if (vc->blocksize[1] / 2 * vc->audio_channels * 2 > AVCODEC_MAX_AUDIO_FRAME_SIZE) { - av_log(vc->avccontext, AV_LOG_ERROR, "Vorbis channel count makes " - "output packets too large.\n"); - return -4; + return AVERROR_INVALIDDATA; } vc->win[0] = ff_vorbis_vwin[bl0 - 6]; vc->win[1] = ff_vorbis_vwin[bl1 - 6]; if ((get_bits1(gb)) == 0) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis id header packet corrupt (framing flag not set). \n"); - return -2; + return AVERROR_INVALIDDATA; } vc->channel_residues = av_malloc((vc->blocksize[1] / 2) * vc->audio_channels * sizeof(*vc->channel_residues)); @@ -960,13 +969,13 @@ static av_cold int vorbis_decode_init(AVCodecContext *avccontext) { - vorbis_context *vc = avccontext->priv_data ; + vorbis_context *vc = avccontext->priv_data; uint8_t *headers = avccontext->extradata; int headers_len = avccontext->extradata_size; uint8_t *header_start[3]; int header_len[3]; - GetBitContext *gb = &(vc->gb); - int hdr_type; + GetBitContext *gb = &vc->gb; + int hdr_type, ret; vc->avccontext = avccontext; dsputil_init(&vc->dsp, avccontext); @@ -982,24 +991,24 @@ if (!headers_len) { av_log(avccontext, AV_LOG_ERROR, "Extradata missing.\n"); - return -1; + return AVERROR_INVALIDDATA; } - if (ff_split_xiph_headers(headers, headers_len, 30, header_start, header_len) < 0) { + if ((ret = avpriv_split_xiph_headers(headers, headers_len, 30, header_start, header_len)) < 0) { av_log(avccontext, AV_LOG_ERROR, "Extradata corrupt.\n"); - return -1; + return ret; } init_get_bits(gb, header_start[0], header_len[0]*8); hdr_type = get_bits(gb, 8); if (hdr_type != 1) { av_log(avccontext, AV_LOG_ERROR, "First header is not the id header.\n"); - return -1; + return AVERROR_INVALIDDATA; } - if (vorbis_parse_id_hdr(vc)) { + if ((ret = vorbis_parse_id_hdr(vc))) { av_log(avccontext, AV_LOG_ERROR, "Id header corrupt.\n"); vorbis_free(vc); - return -1; + return ret; } init_get_bits(gb, header_start[2], header_len[2]*8); @@ -1007,12 +1016,12 @@ if (hdr_type != 5) { av_log(avccontext, AV_LOG_ERROR, "Third header is not the setup header.\n"); vorbis_free(vc); - return -1; + return AVERROR_INVALIDDATA; } - if (vorbis_parse_setup_hdr(vc)) { + if ((ret = vorbis_parse_setup_hdr(vc))) { av_log(avccontext, AV_LOG_ERROR, "Setup header corrupt.\n"); vorbis_free(vc); - return -1; + return ret; } if (vc->audio_channels > 8) @@ -1024,7 +1033,10 @@ avccontext->sample_rate = vc->audio_samplerate; avccontext->frame_size = FFMIN(vc->blocksize[0], vc->blocksize[1]) >> 2; - return 0 ; + avcodec_get_frame_defaults(&vc->frame); + avccontext->coded_frame = &vc->frame; + + return 0; } // Decode audiopackets ------------------------------------------------- @@ -1055,7 +1067,7 @@ codebook = vc->codebooks[vf->book_list[book_idx]]; /* Invalid codebook! */ if (!codebook.codevectors) - return -1; + return AVERROR_INVALIDDATA; while (lsp_lenorder) { int vec_off; @@ -1269,6 +1281,7 @@ uint8_t *do_not_decode, float *vec, unsigned vlen, + unsigned ch_left, int vr_type) { GetBitContext *gb = &vc->gb; @@ -1276,6 +1289,7 @@ unsigned ptns_to_read = vr->ptns_to_read; uint8_t *classifs = vr->classifs; unsigned pass, ch_used, i, j, k, l; + unsigned max_output = (ch - 1) * vlen; if (vr_type == 2) { for (j = 1; j < ch; ++j) @@ -1283,8 +1297,15 @@ if (do_not_decode[0]) return 0; ch_used = 1; + max_output += vr->end / ch; } else { ch_used = ch; + max_output += vr->end; + } + + if (max_output > ch_left * vlen) { + av_log(vc->avccontext, AV_LOG_ERROR, "Insufficient output buffer\n"); + return -1; } av_dlog(NULL, " residue type 0/1/2 decode begin, ch: %d cpc %d \n", ch, c_p_c); @@ -1411,17 +1432,18 @@ static inline int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr, unsigned ch, uint8_t *do_not_decode, - float *vec, unsigned vlen) + float *vec, unsigned vlen, + unsigned ch_left) { if (vr->type == 2) - return vorbis_residue_decode_internal(vc, vr, ch, do_not_decode, vec, vlen, 2); + return vorbis_residue_decode_internal(vc, vr, ch, do_not_decode, vec, vlen, ch_left, 2); else if (vr->type == 1) - return vorbis_residue_decode_internal(vc, vr, ch, do_not_decode, vec, vlen, 1); + return vorbis_residue_decode_internal(vc, vr, ch, do_not_decode, vec, vlen, ch_left, 1); else if (vr->type == 0) - return vorbis_residue_decode_internal(vc, vr, ch, do_not_decode, vec, vlen, 0); + return vorbis_residue_decode_internal(vc, vr, ch, do_not_decode, vec, vlen, ch_left, 0); else { av_log(vc->avccontext, AV_LOG_ERROR, " Invalid residue type while residue decode?! \n"); - return -1; + return AVERROR_INVALIDDATA; } } @@ -1466,10 +1488,12 @@ uint8_t res_chan[255]; unsigned res_num = 0; int retlen = 0; + unsigned ch_left = vc->audio_channels; + unsigned vlen; if (get_bits1(gb)) { av_log(vc->avccontext, AV_LOG_ERROR, "Not a Vorbis I audio packet.\n"); - return -1; // packet type not audio + return AVERROR_INVALIDDATA; // packet type not audio } if (vc->mode_count == 1) { @@ -1485,11 +1509,12 @@ blockflag = vc->modes[mode_number].blockflag; blocksize = vc->blocksize[blockflag]; + vlen = blocksize / 2; if (blockflag) skip_bits(gb, 2); // previous_window, next_window - memset(ch_res_ptr, 0, sizeof(float) * vc->audio_channels * blocksize / 2); //FIXME can this be removed ? - memset(ch_floor_ptr, 0, sizeof(float) * vc->audio_channels * blocksize / 2); //FIXME can this be removed ? + memset(ch_res_ptr, 0, sizeof(float) * vc->audio_channels * vlen); //FIXME can this be removed ? + memset(ch_floor_ptr, 0, sizeof(float) * vc->audio_channels * vlen); //FIXME can this be removed ? // Decode floor @@ -1506,10 +1531,10 @@ if (ret < 0) { av_log(vc->avccontext, AV_LOG_ERROR, "Invalid codebook in vorbis_floor_decode.\n"); - return -1; + return AVERROR_INVALIDDATA; } no_residue[i] = ret; - ch_floor_ptr += blocksize / 2; + ch_floor_ptr += vlen; } // Nonzero vector propagate @@ -1526,6 +1551,7 @@ for (i = 0; i < mapping->submaps; ++i) { vorbis_residue *residue; unsigned ch = 0; + int ret; for (j = 0; j < vc->audio_channels; ++j) { if ((mapping->submaps == 1) || (i == mapping->mux[j])) { @@ -1540,9 +1566,18 @@ } } residue = &vc->residues[mapping->submap_residue[i]]; - vorbis_residue_decode(vc, residue, ch, do_not_decode, ch_res_ptr, blocksize/2); + if (ch_left < ch) { + av_log(vc->avccontext, AV_LOG_ERROR, "Too many channels in vorbis_floor_decode.\n"); + return -1; + } + if (ch) { + ret = vorbis_residue_decode(vc, residue, ch, do_not_decode, ch_res_ptr, vlen, ch_left); + if (ret < 0) + return ret; + } - ch_res_ptr += ch * blocksize / 2; + ch_res_ptr += ch * vlen; + ch_left -= ch; } // Inverse coupling @@ -1596,40 +1631,39 @@ // Return the decoded audio packet through the standard api -static int vorbis_decode_frame(AVCodecContext *avccontext, - void *data, int *data_size, - AVPacket *avpkt) +static int vorbis_decode_frame(AVCodecContext *avccontext, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - vorbis_context *vc = avccontext->priv_data ; - GetBitContext *gb = &(vc->gb); + vorbis_context *vc = avccontext->priv_data; + GetBitContext *gb = &vc->gb; const float *channel_ptrs[255]; - int i, len; - - if (!buf_size) - return 0; + int i, len, ret; av_dlog(NULL, "packet length %d \n", buf_size); init_get_bits(gb, buf, buf_size*8); - len = vorbis_parse_audio_packet(vc); - - if (len <= 0) { - *data_size = 0; - return buf_size; - } + if ((len = vorbis_parse_audio_packet(vc)) <= 0) + return len; if (!vc->first_frame) { vc->first_frame = 1; - *data_size = 0; - return buf_size ; + *got_frame_ptr = 0; + return buf_size; } av_dlog(NULL, "parsed %d bytes %d bits, returned %d samples (*ch*bits) \n", get_bits_count(gb) / 8, get_bits_count(gb) % 8, len); + /* get output buffer */ + vc->frame.nb_samples = len; + if ((ret = avccontext->get_buffer(avccontext, &vc->frame)) < 0) { + av_log(avccontext, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + if (vc->audio_channels > 8) { for (i = 0; i < vc->audio_channels; i++) channel_ptrs[i] = vc->channel_floors + i * len; @@ -1640,15 +1674,17 @@ } if (avccontext->sample_fmt == AV_SAMPLE_FMT_FLT) - vc->fmt_conv.float_interleave(data, channel_ptrs, len, vc->audio_channels); + vc->fmt_conv.float_interleave((float *)vc->frame.data[0], channel_ptrs, + len, vc->audio_channels); else - vc->fmt_conv.float_to_int16_interleave(data, channel_ptrs, len, + vc->fmt_conv.float_to_int16_interleave((int16_t *)vc->frame.data[0], + channel_ptrs, len, vc->audio_channels); - *data_size = len * vc->audio_channels * - av_get_bytes_per_sample(avccontext->sample_fmt); + *got_frame_ptr = 1; + *(AVFrame *)data = vc->frame; - return buf_size ; + return buf_size; } // Close decoder @@ -1659,18 +1695,18 @@ vorbis_free(vc); - return 0 ; + return 0; } AVCodec ff_vorbis_decoder = { - "vorbis", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_VORBIS, - sizeof(vorbis_context), - vorbis_decode_init, - NULL, - vorbis_decode_close, - vorbis_decode_frame, + .name = "vorbis", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_VORBIS, + .priv_data_size = sizeof(vorbis_context), + .init = vorbis_decode_init, + .close = vorbis_decode_close, + .decode = vorbis_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Vorbis"), .channel_layouts = ff_vorbis_channel_layouts, .sample_fmts = (const enum AVSampleFormat[]) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vorbisenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vorbisenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vorbisenc.c 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vorbisenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -1103,13 +1103,13 @@ } AVCodec ff_vorbis_encoder = { - "vorbis", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_VORBIS, - sizeof(vorbis_enc_context), - vorbis_encode_init, - vorbis_encode_frame, - vorbis_encode_close, + .name = "vorbis", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_VORBIS, + .priv_data_size = sizeof(vorbis_enc_context), + .init = vorbis_encode_init, + .encode = vorbis_encode_frame, + .close = vorbis_encode_close, .capabilities= CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("Vorbis"), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vorbis.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vorbis.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vorbis.h 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vorbis.h 2012-01-11 00:34:30.000000000 +0000 @@ -27,7 +27,7 @@ extern const float * const ff_vorbis_vwin[8]; extern const uint8_t ff_vorbis_channel_layout_offsets[8][8]; extern const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8]; -extern const int64_t ff_vorbis_channel_layouts[9]; +extern const uint64_t ff_vorbis_channel_layouts[9]; typedef struct { uint16_t x; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp3.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp3.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp3.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp3.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,6 +35,7 @@ #include "libavutil/imgutils.h" #include "avcodec.h" +#include "internal.h" #include "dsputil.h" #include "get_bits.h" @@ -44,8 +45,6 @@ #define FRAGMENT_PIXELS 8 -static av_cold int vp3_decode_end(AVCodecContext *avctx); - //FIXME split things out into their own arrays typedef struct Vp3Fragment { int16_t dc; @@ -225,7 +224,7 @@ /* these arrays need to be on 16-byte boundaries since SSE2 operations * index into them */ - DECLARE_ALIGNED(16, int16_t, qmat)[3][2][3][64]; //priv_data; + + if (s->golden_frame.data[0]) { + if (s->golden_frame.data[0] == s->last_frame.data[0]) + memset(&s->last_frame, 0, sizeof(AVFrame)); + if (s->current_frame.data[0] == s->golden_frame.data[0]) + memset(&s->current_frame, 0, sizeof(AVFrame)); + ff_thread_release_buffer(avctx, &s->golden_frame); + } + if (s->last_frame.data[0]) { + if (s->current_frame.data[0] == s->last_frame.data[0]) + memset(&s->current_frame, 0, sizeof(AVFrame)); + ff_thread_release_buffer(avctx, &s->last_frame); + } + if (s->current_frame.data[0]) + ff_thread_release_buffer(avctx, &s->current_frame); +} + +static av_cold int vp3_decode_end(AVCodecContext *avctx) +{ + Vp3DecodeContext *s = avctx->priv_data; + int i; + + av_free(s->superblock_coding); + av_free(s->all_fragments); + av_free(s->coded_fragment_list[0]); + av_free(s->dct_tokens_base); + av_free(s->superblock_fragments); + av_free(s->macroblock_coding); + av_free(s->motion_val[0]); + av_free(s->motion_val[1]); + av_free(s->edge_emu_buffer); + + if (avctx->internal->is_copy) + return 0; + + for (i = 0; i < 16; i++) { + free_vlc(&s->dc_vlc[i]); + free_vlc(&s->ac_vlc_1[i]); + free_vlc(&s->ac_vlc_2[i]); + free_vlc(&s->ac_vlc_3[i]); + free_vlc(&s->ac_vlc_4[i]); + } + + free_vlc(&s->superblock_run_length_vlc); + free_vlc(&s->fragment_run_length_vlc); + free_vlc(&s->mode_code_vlc); + free_vlc(&s->motion_vector_vlc); + + /* release all frames */ + vp3_decode_flush(avctx); + + return 0; +} + /* * This function sets up all of the various blocks mappings: * superblocks <-> fragments, macroblocks <-> fragments, @@ -890,7 +946,7 @@ /* decode a VLC into a token */ token = get_vlc2(gb, vlc_table, 11, 3); /* use the token to get a zero run, a coefficient, and an eob run */ - if (token <= 6) { + if ((unsigned) token <= 6U) { eob_run = eob_run_base[token]; if (eob_run_get_bits[token]) eob_run += get_bits(gb, eob_run_get_bits[token]); @@ -908,7 +964,7 @@ coeff_i += eob_run; eob_run = 0; } - } else { + } else if (token >= 0) { bits_to_get = coeff_get_bits[token]; if (bits_to_get) bits_to_get = get_bits(gb, bits_to_get); @@ -942,6 +998,10 @@ for (i = coeff_index+1; i <= coeff_index+zero_run; i++) s->num_coded_frags[plane][i]--; coeff_i++; + } else { + av_log(s->avctx, AV_LOG_ERROR, + "Invalid token %d\n", token); + return -1; } } @@ -991,6 +1051,8 @@ /* unpack the Y plane DC coefficients */ residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_y_table], 0, 0, residual_eob_run); + if (residual_eob_run < 0) + return residual_eob_run; /* reverse prediction of the Y-plane DC coefficients */ reverse_dc_prediction(s, 0, s->fragment_width[0], s->fragment_height[0]); @@ -998,8 +1060,12 @@ /* unpack the C plane DC coefficients */ residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0, 1, residual_eob_run); + if (residual_eob_run < 0) + return residual_eob_run; residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0, 2, residual_eob_run); + if (residual_eob_run < 0) + return residual_eob_run; /* reverse prediction of the C-plane DC coefficients */ if (!(s->avctx->flags & CODEC_FLAG_GRAY)) @@ -1036,11 +1102,17 @@ for (i = 1; i <= 63; i++) { residual_eob_run = unpack_vlcs(s, gb, y_tables[i], i, 0, residual_eob_run); + if (residual_eob_run < 0) + return residual_eob_run; residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i, 1, residual_eob_run); + if (residual_eob_run < 0) + return residual_eob_run; residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i, 2, residual_eob_run); + if (residual_eob_run < 0) + return residual_eob_run; } return 0; @@ -1291,6 +1363,10 @@ case 1: // zero run s->dct_tokens[plane][i]++; i += (token >> 2) & 0x7f; + if (i > 63) { + av_log(s->avctx, AV_LOG_ERROR, "Coefficient index overflow\n"); + return i; + } block[perm[i]] = (token >> 9) * dequantizer[perm[i]]; i++; break; @@ -1302,6 +1378,8 @@ return i; } } while (i < 64); + // return value is expected to be a valid level + i--; end: // the actual DC+prediction is in the fragment structure block[0] = frag->dc * s->qmat[0][inter][plane][0]; @@ -1313,10 +1391,10 @@ */ static void vp3_draw_horiz_band(Vp3DecodeContext *s, int y) { - int h, cy; - int offset[4]; + int h, cy, i; + int offset[AV_NUM_DATA_POINTERS]; - if (HAVE_PTHREADS && s->avctx->active_thread_type&FF_THREAD_FRAME) { + if (HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_FRAME) { int y_flipped = s->flipped_image ? s->avctx->height-y : y; // At the end of the frame, report INT_MAX instead of the height of the frame. @@ -1340,7 +1418,8 @@ offset[0] = s->current_frame.linesize[0]*y; offset[1] = s->current_frame.linesize[1]*cy; offset[2] = s->current_frame.linesize[2]*cy; - offset[3] = 0; + for (i = 3; i < AV_NUM_DATA_POINTERS; i++) + offset[i] = 0; emms_c(); s->avctx->draw_horiz_band(s->avctx, &s->current_frame, offset, y, 3, h); @@ -1400,7 +1479,7 @@ int fragment_width = s->fragment_width[!!plane]; int fragment_height = s->fragment_height[!!plane]; int fragment_start = s->fragment_start[plane]; - int do_await = !plane && HAVE_PTHREADS && (s->avctx->active_thread_type&FF_THREAD_FRAME); + int do_await = !plane && HAVE_THREADS && (s->avctx->active_thread_type&FF_THREAD_FRAME); if (!s->flipped_image) stride = -stride; if (CONFIG_GRAY && plane && (s->avctx->flags & CODEC_FLAG_GRAY)) @@ -1493,7 +1572,10 @@ /* invert DCT and place (or add) in final output */ if (s->all_fragments[i].coding_method == MODE_INTRA) { - vp3_dequant(s, s->all_fragments + i, plane, 0, block); + int index; + index = vp3_dequant(s, s->all_fragments + i, plane, 0, block); + if (index > 63) + continue; if(s->avctx->idct_algo!=FF_IDCT_VP3) block[0] += 128<<3; s->dsp.idct_put( @@ -1501,7 +1583,10 @@ stride, block); } else { - if (vp3_dequant(s, s->all_fragments + i, plane, 1, block)) { + int index = vp3_dequant(s, s->all_fragments + i, plane, 1, block); + if (index > 63) + continue; + if (index > 0) { s->dsp.idct_add( output_plane + first_pixel, stride, @@ -1571,9 +1656,6 @@ return 0; } -/* - * This is the ffmpeg/libavcodec API init function. - */ static av_cold int vp3_decode_init(AVCodecContext *avctx) { Vp3DecodeContext *s = avctx->priv_data; @@ -1777,10 +1859,15 @@ Vp3DecodeContext *s = dst->priv_data, *s1 = src->priv_data; int qps_changed = 0, i, err; +#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field) + if (!s1->current_frame.data[0] ||s->width != s1->width - ||s->height!= s1->height) + ||s->height!= s1->height) { + if (s != s1) + copy_fields(s, s1, golden_frame, current_frame); return -1; + } if (s != s1) { // init tables if the first frame hasn't been decoded @@ -1796,8 +1883,6 @@ memcpy(s->motion_val[1], s1->motion_val[1], c_fragment_count * sizeof(*s->motion_val[1])); } -#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field) - // copy previous frame data copy_fields(s, s1, golden_frame, dsp); @@ -1822,9 +1907,6 @@ return 0; } -/* - * This is the ffmpeg/libavcodec API frame decode function. - */ static int vp3_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) @@ -1965,7 +2047,7 @@ *data_size=sizeof(AVFrame); *(AVFrame*)data= s->current_frame; - if (!HAVE_PTHREADS || !(s->avctx->active_thread_type&FF_THREAD_FRAME)) + if (!HAVE_THREADS || !(s->avctx->active_thread_type&FF_THREAD_FRAME)) update_frames(avctx); return buf_size; @@ -1973,59 +2055,12 @@ error: ff_thread_report_progress(&s->current_frame, INT_MAX, 0); - if (!HAVE_PTHREADS || !(s->avctx->active_thread_type&FF_THREAD_FRAME)) + if (!HAVE_THREADS || !(s->avctx->active_thread_type&FF_THREAD_FRAME)) avctx->release_buffer(avctx, &s->current_frame); return -1; } -/* - * This is the ffmpeg/libavcodec API module cleanup function. - */ -static av_cold int vp3_decode_end(AVCodecContext *avctx) -{ - Vp3DecodeContext *s = avctx->priv_data; - int i; - - if (avctx->is_copy && !s->current_frame.data[0]) - return 0; - - av_free(s->superblock_coding); - av_free(s->all_fragments); - av_free(s->coded_fragment_list[0]); - av_free(s->dct_tokens_base); - av_free(s->superblock_fragments); - av_free(s->macroblock_coding); - av_free(s->motion_val[0]); - av_free(s->motion_val[1]); - av_free(s->edge_emu_buffer); - - if (avctx->is_copy) return 0; - - for (i = 0; i < 16; i++) { - free_vlc(&s->dc_vlc[i]); - free_vlc(&s->ac_vlc_1[i]); - free_vlc(&s->ac_vlc_2[i]); - free_vlc(&s->ac_vlc_3[i]); - free_vlc(&s->ac_vlc_4[i]); - } - - free_vlc(&s->superblock_run_length_vlc); - free_vlc(&s->fragment_run_length_vlc); - free_vlc(&s->mode_code_vlc); - free_vlc(&s->motion_vector_vlc); - - /* release all frames */ - if (s->golden_frame.data[0]) - ff_thread_release_buffer(avctx, &s->golden_frame); - if (s->last_frame.data[0] && s->last_frame.type != FF_BUFFER_TYPE_COPY) - ff_thread_release_buffer(avctx, &s->last_frame); - /* no need to release the current_frame since it will always be pointing - * to the same frame as either the golden or last frame */ - - return 0; -} - static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb) { Vp3DecodeContext *s = avctx->priv_data; @@ -2060,6 +2095,23 @@ return 0; } +static int vp3_init_thread_copy(AVCodecContext *avctx) +{ + Vp3DecodeContext *s = avctx->priv_data; + + s->superblock_coding = NULL; + s->all_fragments = NULL; + s->coded_fragment_list[0] = NULL; + s->dct_tokens_base = NULL; + s->superblock_fragments = NULL; + s->macroblock_coding = NULL; + s->motion_val[0] = NULL; + s->motion_val[1] = NULL; + s->edge_emu_buffer = NULL; + + return 0; +} + #if CONFIG_THEORA_DECODER static const enum PixelFormat theora_pix_fmts[4] = { PIX_FMT_YUV420P, PIX_FMT_NONE, PIX_FMT_YUV422P, PIX_FMT_YUV444P @@ -2275,7 +2327,7 @@ return -1; } - if (ff_split_xiph_headers(avctx->extradata, avctx->extradata_size, + if (avpriv_split_xiph_headers(avctx->extradata, avctx->extradata_size, 42, header_start, header_len) < 0) { av_log(avctx, AV_LOG_ERROR, "Corrupt extradata\n"); return -1; @@ -2322,32 +2374,32 @@ } AVCodec ff_theora_decoder = { - "theora", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_THEORA, - sizeof(Vp3DecodeContext), - theora_decode_init, - NULL, - vp3_decode_end, - vp3_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS, - NULL, + .name = "theora", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_THEORA, + .priv_data_size = sizeof(Vp3DecodeContext), + .init = theora_decode_init, + .close = vp3_decode_end, + .decode = vp3_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS, + .flush = vp3_decode_flush, .long_name = NULL_IF_CONFIG_SMALL("Theora"), + .init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy), .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context) }; #endif AVCodec ff_vp3_decoder = { - "vp3", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VP3, - sizeof(Vp3DecodeContext), - vp3_decode_init, - NULL, - vp3_decode_end, - vp3_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS, - NULL, + .name = "vp3", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VP3, + .priv_data_size = sizeof(Vp3DecodeContext), + .init = vp3_decode_init, + .close = vp3_decode_end, + .decode = vp3_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS, + .flush = vp3_decode_flush, .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"), + .init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy), .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context) }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp3_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp3_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp3_parser.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp3_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -36,9 +36,7 @@ } AVCodecParser ff_vp3_parser = { - { CODEC_ID_THEORA, CODEC_ID_VP3, - CODEC_ID_VP6, CODEC_ID_VP6F, CODEC_ID_VP6A }, - 0, - NULL, - parse, + .codec_ids = { CODEC_ID_THEORA, CODEC_ID_VP3, CODEC_ID_VP6, + CODEC_ID_VP6F, CODEC_ID_VP6A }, + .parser_parse = parse, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp56.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp56.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp56.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp56.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,4 @@ -/** - * @file - * VP5 and VP6 compatible video decoder (common features) - * +/* * Copyright (C) 2006 Aurelien Jacobs * * This file is part of Libav. @@ -21,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP5 and VP6 compatible video decoder (common features) + */ + #include "avcodec.h" #include "bytestream.h" @@ -399,6 +401,8 @@ frame_current = s->framep[VP56_FRAME_CURRENT]; frame_ref = s->framep[ref_frame]; + if (mb_type != VP56_MB_INTRA && !frame_ref->data[0]) + return; ab = 6*is_alpha; b_max = 6 - 2*is_alpha; @@ -463,6 +467,7 @@ s->mb_height = (avctx->coded_height+15) / 16; if (s->mb_width > 1000 || s->mb_height > 1000) { + avcodec_set_dimensions(avctx, 0, 0); av_log(avctx, AV_LOG_ERROR, "picture too big\n"); return -1; } @@ -511,6 +516,18 @@ if (!res) return -1; + if (res == 2) { + int i; + for (i = 0; i < 4; i++) { + if (s->frames[i].data[0]) + avctx->release_buffer(avctx, &s->frames[i]); + } + if (is_alpha) { + avcodec_set_dimensions(avctx, 0, 0); + return -1; + } + } + if (!is_alpha) { p->reference = 1; if (avctx->get_buffer(avctx, p) < 0) { @@ -537,7 +554,8 @@ s->mb_type = VP56_MB_INTER_NOVEC_PF; } - s->parse_coeff_models(s); + if (s->parse_coeff_models(s)) + goto next; memset(s->prev_dc, 0, sizeof(s->prev_dc)); s->prev_dc[1][VP56_FRAME_CURRENT] = 128; @@ -601,6 +619,7 @@ } } + next: if (p->key_frame || golden_frame) { if (s->framep[VP56_FRAME_GOLDEN]->data[0] && s->framep[VP56_FRAME_GOLDEN] != s->framep[VP56_FRAME_GOLDEN2]) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp56data.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp56data.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp56data.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp56data.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,4 @@ -/** - * @file - * VP5 and VP6 compatible video decoder (common data) - * +/* * Copyright (C) 2006 Aurelien Jacobs * * This file is part of Libav. @@ -21,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP5 and VP6 compatible video decoder (common data) + */ + #include "vp56data.h" const uint8_t vp56_b2p[] = { 0, 0, 0, 0, 1, 2, 3, 3, 3, 3 }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp56data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp56data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp56data.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp56data.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,4 @@ -/** - * @file - * VP5 and VP6 compatible video decoder (common data) - * +/* * Copyright (C) 2006 Aurelien Jacobs * * This file is part of Libav. @@ -21,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP5 and VP6 compatible video decoder (common data) + */ + #ifndef AVCODEC_VP56DATA_H #define AVCODEC_VP56DATA_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp56.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp56.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp56.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp56.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,4 @@ -/** - * @file - * VP5 and VP6 compatible video decoder (common features) - * +/* * Copyright (C) 2006 Aurelien Jacobs * * This file is part of Libav. @@ -21,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP5 and VP6 compatible video decoder (common features) + */ + #ifndef AVCODEC_VP56_H #define AVCODEC_VP56_H @@ -28,7 +30,6 @@ #include "dsputil.h" #include "get_bits.h" #include "bytestream.h" -#include "cabac.h" #include "vp56dsp.h" typedef struct vp56_context VP56Context; @@ -46,7 +47,7 @@ typedef void (*VP56ParseCoeff)(VP56Context *s); typedef void (*VP56DefaultModelsInit)(VP56Context *s); typedef void (*VP56ParseVectorModels)(VP56Context *s); -typedef void (*VP56ParseCoeffModels)(VP56Context *s); +typedef int (*VP56ParseCoeffModels)(VP56Context *s); typedef int (*VP56ParseHeader)(VP56Context *s, const uint8_t *buf, int buf_size, int *golden_frame); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp5.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp5.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp5.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp5.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,4 @@ -/** - * @file - * VP5 compatible video decoder - * +/* * Copyright (C) 2006 Aurelien Jacobs * * This file is part of Libav. @@ -21,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP5 compatible video decoder + */ + #include #include @@ -116,7 +118,7 @@ model->vector_pdv[comp][node] = vp56_rac_gets_nn(c, 7); } -static void vp5_parse_coeff_models(VP56Context *s) +static int vp5_parse_coeff_models(VP56Context *s) { VP56RangeCoder *c = &s->c; VP56Model *model = s->modelp; @@ -160,6 +162,7 @@ for (ctx=0; ctx<6; ctx++) for (node=0; node<5; node++) model->coeff_acct[pt][ct][cg][ctx][node] = av_clip(((model->coeff_ract[pt][ct][cg][node] * vp5_ract_lc[ct][cg][node][ctx][0] + 128) >> 8) + vp5_ract_lc[ct][cg][node][ctx][1], 1, 254); + return 0; } static void vp5_parse_coeff(VP56Context *s) @@ -182,7 +185,8 @@ model1 = model->coeff_dccv[pt]; model2 = model->coeff_dcct[pt][ctx]; - for (coeff_idx=0; coeff_idx<64; ) { + coeff_idx = 0; + for (;;) { if (vp56_rac_get_prob(c, model2[0])) { if (vp56_rac_get_prob(c, model2[2])) { if (vp56_rac_get_prob(c, model2[3])) { @@ -219,8 +223,11 @@ ct = 0; s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 0; } + coeff_idx++; + if (coeff_idx >= 64) + break; - cg = vp5_coeff_groups[++coeff_idx]; + cg = vp5_coeff_groups[coeff_idx]; ctx = s->coeff_ctx[vp56_b6to4[b]][coeff_idx]; model1 = model->coeff_ract[pt][ct][cg]; model2 = cg > 2 ? model1 : model->coeff_acct[pt][ct][cg][ctx]; @@ -267,14 +274,13 @@ } AVCodec ff_vp5_decoder = { - "vp5", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VP5, - sizeof(VP56Context), - vp5_decode_init, - NULL, - ff_vp56_free, - ff_vp56_decode_frame, - CODEC_CAP_DR1, + .name = "vp5", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VP5, + .priv_data_size = sizeof(VP56Context), + .init = vp5_decode_init, + .close = ff_vp56_free, + .decode = ff_vp56_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("On2 VP5"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp5data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp5data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp5data.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp5data.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,4 @@ -/** - * @file - * VP5 compatible video decoder - * +/* * Copyright (C) 2006 Aurelien Jacobs * * This file is part of Libav. @@ -21,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP5 compatible video decoder + */ + #ifndef AVCODEC_VP5DATA_H #define AVCODEC_VP5DATA_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp6.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp6.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp6.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp6.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,13 +1,6 @@ -/** - * @file - * VP6 compatible video decoder - * +/* * Copyright (C) 2006 Aurelien Jacobs * - * The VP6F decoder accepts an optional 1 byte extradata. It is composed of: - * - upper 4bits: difference between encoded width and visible width - * - lower 4bits: difference between encoded height and visible height - * * This file is part of Libav. * * Libav is free software; you can redistribute it and/or @@ -25,6 +18,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP6 compatible video decoder + * + * The VP6F decoder accepts an optional 1 byte extradata. It is composed of: + * - upper 4 bits: difference between encoded width and visible width + * - lower 4 bits: difference between encoded height and visible height + */ + #include #include "avcodec.h" @@ -137,8 +139,11 @@ if (coeff_offset) { buf += coeff_offset; buf_size -= coeff_offset; - if (buf_size < 0) + if (buf_size < 0) { + if (s->framep[VP56_FRAME_CURRENT]->key_frame) + avcodec_set_dimensions(s->avctx, 0, 0); return 0; + } if (s->use_huffman) { s->parse_coeff = vp6_parse_coeff_huffman; init_get_bits(&s->gb, buf, buf_size<<3); @@ -213,8 +218,8 @@ return (a->count - b->count)*16 + (b->sym - a->sym); } -static void vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[], - const uint8_t *map, unsigned size, VLC *vlc) +static int vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[], + const uint8_t *map, unsigned size, VLC *vlc) { Node nodes[2*VP6_MAX_HUFF_SIZE], *tmp = &nodes[size]; int a, b, i; @@ -229,12 +234,12 @@ } free_vlc(vlc); - /* then build the huffman tree accodring to probabilities */ - ff_huff_build_tree(s->avctx, vlc, size, nodes, vp6_huff_cmp, - FF_HUFFMAN_FLAG_HNODE_FIRST); + /* then build the huffman tree according to probabilities */ + return ff_huff_build_tree(s->avctx, vlc, size, nodes, vp6_huff_cmp, + FF_HUFFMAN_FLAG_HNODE_FIRST); } -static void vp6_parse_coeff_models(VP56Context *s) +static int vp6_parse_coeff_models(VP56Context *s) { VP56RangeCoder *c = &s->c; VP56Model *model = s->modelp; @@ -279,15 +284,18 @@ if (s->use_huffman) { for (pt=0; pt<2; pt++) { - vp6_build_huff_tree(s, model->coeff_dccv[pt], - vp6_huff_coeff_map, 12, &s->dccv_vlc[pt]); - vp6_build_huff_tree(s, model->coeff_runv[pt], - vp6_huff_run_map, 9, &s->runv_vlc[pt]); + if (vp6_build_huff_tree(s, model->coeff_dccv[pt], + vp6_huff_coeff_map, 12, &s->dccv_vlc[pt])) + return -1; + if (vp6_build_huff_tree(s, model->coeff_runv[pt], + vp6_huff_run_map, 9, &s->runv_vlc[pt])) + return -1; for (ct=0; ct<3; ct++) for (cg = 0; cg < 6; cg++) - vp6_build_huff_tree(s, model->coeff_ract[pt][ct][cg], - vp6_huff_coeff_map, 12, - &s->ract_vlc[pt][ct][cg]); + if (vp6_build_huff_tree(s, model->coeff_ract[pt][ct][cg], + vp6_huff_coeff_map, 12, + &s->ract_vlc[pt][ct][cg])) + return -1; } memset(s->nb_null, 0, sizeof(s->nb_null)); } else { @@ -297,6 +305,7 @@ for (node=0; node<5; node++) model->coeff_dcct[pt][ctx][node] = av_clip(((model->coeff_dccv[pt][node] * vp6_dccv_lc[ctx][node][0] + 128) >> 8) + vp6_dccv_lc[ctx][node][1], 1, 255); } + return 0; } static void vp6_parse_vector_adjustment(VP56Context *s, VP56mv *vect) @@ -367,7 +376,7 @@ if (b > 3) pt = 1; vlc_coeff = &s->dccv_vlc[pt]; - for (coeff_idx=0; coeff_idx<64; ) { + for (coeff_idx = 0;;) { int run = 1; if (coeff_idx<2 && s->nb_null[coeff_idx][pt]) { s->nb_null[coeff_idx][pt]--; @@ -404,6 +413,8 @@ } } coeff_idx+=run; + if (coeff_idx >= 64) + break; cg = FFMIN(vp6_coeff_groups[coeff_idx], 3); vlc_coeff = &s->ract_vlc[pt][ct][cg]; } @@ -431,7 +442,8 @@ model1 = model->coeff_dccv[pt]; model2 = model->coeff_dcct[pt][ctx]; - for (coeff_idx=0; coeff_idx<64; ) { + coeff_idx = 0; + for (;;) { if ((coeff_idx>1 && ct==0) || vp56_rac_get_prob(c, model2[0])) { /* parse a coeff */ if (vp56_rac_get_prob(c, model2[2])) { @@ -472,8 +484,10 @@ run += vp56_rac_get_prob(c, model3[i+8]) << i; } } - - cg = vp6_coeff_groups[coeff_idx+=run]; + coeff_idx += run; + if (coeff_idx >= 64) + break; + cg = vp6_coeff_groups[coeff_idx]; model1 = model2 = model->coeff_ract[pt][ct][cg]; } @@ -607,42 +621,39 @@ } AVCodec ff_vp6_decoder = { - "vp6", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VP6, - sizeof(VP56Context), - vp6_decode_init, - NULL, - vp6_decode_free, - ff_vp56_decode_frame, - CODEC_CAP_DR1, + .name = "vp6", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VP6, + .priv_data_size = sizeof(VP56Context), + .init = vp6_decode_init, + .close = vp6_decode_free, + .decode = ff_vp56_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("On2 VP6"), }; /* flash version, not flipped upside-down */ AVCodec ff_vp6f_decoder = { - "vp6f", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VP6F, - sizeof(VP56Context), - vp6_decode_init, - NULL, - vp6_decode_free, - ff_vp56_decode_frame, - CODEC_CAP_DR1, + .name = "vp6f", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VP6F, + .priv_data_size = sizeof(VP56Context), + .init = vp6_decode_init, + .close = vp6_decode_free, + .decode = ff_vp56_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version)"), }; /* flash version, not flipped upside-down, with alpha channel */ AVCodec ff_vp6a_decoder = { - "vp6a", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VP6A, - sizeof(VP56Context), - vp6_decode_init, - NULL, - vp6_decode_free, - ff_vp56_decode_frame, - CODEC_CAP_DR1, + .name = "vp6a", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VP6A, + .priv_data_size = sizeof(VP56Context), + .init = vp6_decode_init, + .close = vp6_decode_free, + .decode = ff_vp56_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version, with alpha channel)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp6data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp6data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp6data.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp6data.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,4 @@ -/** - * @file - * VP6 compatible video decoder - * +/* * Copyright (C) 2006 Aurelien Jacobs * * This file is part of Libav. @@ -21,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP6 compatible video decoder + */ + #ifndef AVCODEC_VP6DATA_H #define AVCODEC_VP6DATA_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp6dsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp6dsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp6dsp.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp6dsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,4 @@ -/** - * @file - * VP6 DSP-oriented functions - * +/* * Copyright (C) 2006 Aurelien Jacobs * * This file is part of Libav. @@ -21,6 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP6 DSP-oriented functions + */ + #include "libavutil/common.h" #include "vp56dsp.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8.c 2011-06-01 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,6 +24,7 @@ #include "libavutil/imgutils.h" #include "avcodec.h" +#include "internal.h" #include "vp8.h" #include "vp8data.h" #include "rectangle.h" @@ -33,27 +34,76 @@ # include "arm/vp8.h" #endif -static void vp8_decode_flush(AVCodecContext *avctx) +static void free_buffers(VP8Context *s) +{ + av_freep(&s->macroblocks_base); + av_freep(&s->filter_strength); + av_freep(&s->intra4x4_pred_mode_top); + av_freep(&s->top_nnz); + av_freep(&s->edge_emu_buffer); + av_freep(&s->top_border); + + s->macroblocks = NULL; +} + +static int vp8_alloc_frame(VP8Context *s, AVFrame *f) +{ + int ret; + if ((ret = ff_thread_get_buffer(s->avctx, f)) < 0) + return ret; + if (s->num_maps_to_be_freed && !s->maps_are_invalid) { + f->ref_index[0] = s->segmentation_maps[--s->num_maps_to_be_freed]; + } else if (!(f->ref_index[0] = av_mallocz(s->mb_width * s->mb_height))) { + ff_thread_release_buffer(s->avctx, f); + return AVERROR(ENOMEM); + } + return 0; +} + +static void vp8_release_frame(VP8Context *s, AVFrame *f, int prefer_delayed_free, int can_direct_free) +{ + if (f->ref_index[0]) { + if (prefer_delayed_free) { + /* Upon a size change, we want to free the maps but other threads may still + * be using them, so queue them. Upon a seek, all threads are inactive so + * we want to cache one to prevent re-allocation in the next decoding + * iteration, but the rest we can free directly. */ + int max_queued_maps = can_direct_free ? 1 : FF_ARRAY_ELEMS(s->segmentation_maps); + if (s->num_maps_to_be_freed < max_queued_maps) { + s->segmentation_maps[s->num_maps_to_be_freed++] = f->ref_index[0]; + } else if (can_direct_free) /* vp8_decode_flush(), but our queue is full */ { + av_free(f->ref_index[0]); + } /* else: MEMLEAK (should never happen, but better that than crash) */ + f->ref_index[0] = NULL; + } else /* vp8_decode_free() */ { + av_free(f->ref_index[0]); + } + } + ff_thread_release_buffer(s->avctx, f); +} + +static void vp8_decode_flush_impl(AVCodecContext *avctx, + int prefer_delayed_free, int can_direct_free, int free_mem) { VP8Context *s = avctx->priv_data; int i; - if (!avctx->is_copy) { + if (!avctx->internal->is_copy) { for (i = 0; i < 5; i++) if (s->frames[i].data[0]) - ff_thread_release_buffer(avctx, &s->frames[i]); + vp8_release_frame(s, &s->frames[i], prefer_delayed_free, can_direct_free); } memset(s->framep, 0, sizeof(s->framep)); - av_freep(&s->macroblocks_base); - av_freep(&s->filter_strength); - av_freep(&s->intra4x4_pred_mode_top); - av_freep(&s->top_nnz); - av_freep(&s->edge_emu_buffer); - av_freep(&s->top_border); - av_freep(&s->segmentation_map); + if (free_mem) { + free_buffers(s); + s->maps_are_invalid = 1; + } +} - s->macroblocks = NULL; +static void vp8_decode_flush(AVCodecContext *avctx) +{ + vp8_decode_flush_impl(avctx, 1, 1, 0); } static int update_dimensions(VP8Context *s, int width, int height) @@ -63,7 +113,7 @@ if (av_image_check_size(width, height, 0, s->avctx)) return AVERROR_INVALIDDATA; - vp8_decode_flush(s->avctx); + vp8_decode_flush_impl(s->avctx, 1, 0, 1); avcodec_set_dimensions(s->avctx, width, height); } @@ -76,10 +126,9 @@ s->intra4x4_pred_mode_top = av_mallocz(s->mb_width*4); s->top_nnz = av_mallocz(s->mb_width*sizeof(*s->top_nnz)); s->top_border = av_mallocz((s->mb_width+1)*sizeof(*s->top_border)); - s->segmentation_map = av_mallocz(s->mb_width*s->mb_height); if (!s->macroblocks_base || !s->filter_strength || !s->intra4x4_pred_mode_top || - !s->top_nnz || !s->top_border || !s->segmentation_map) + !s->top_nnz || !s->top_border) return AVERROR(ENOMEM); s->macroblocks = s->macroblocks_base + 1; @@ -273,7 +322,7 @@ if (!s->macroblocks_base || /* first frame */ width != s->avctx->width || height != s->avctx->height) { - if ((ret = update_dimensions(s, width, height) < 0)) + if ((ret = update_dimensions(s, width, height)) < 0) return ret; } @@ -487,6 +536,7 @@ AV_ZERO32(&near_mv[0]); AV_ZERO32(&near_mv[1]); + AV_ZERO32(&near_mv[2]); /* Process MB on top, left and top-left */ #define MV_EDGE_CHECK(n)\ @@ -641,8 +691,6 @@ * @param block destination for block coefficients * @param probs probabilities to use when reading trees from the bitstream * @param i initial coeff index, 0 unless a separate DC block is coded - * @param zero_nhood the initial prediction context for number of surrounding - * all-zero blocks (only left/top, so 0-2) * @param qmul array holding the dc/ac dequant factor at position 0/1 * @return 0 if no coeffs were decoded * otherwise, the index of the last coeff decoded plus one @@ -701,6 +749,17 @@ } #endif +/** + * @param c arithmetic bitstream reader context + * @param block destination for block coefficients + * @param probs probabilities to use when reading trees from the bitstream + * @param i initial coeff index, 0 unless a separate DC block is coded + * @param zero_nhood the initial prediction context for number of surrounding + * all-zero blocks (only left/top, so 0-2) + * @param qmul array holding the dc/ac dequant factor at position 0/1 + * @return 0 if no coeffs were decoded + * otherwise, the index of the last coeff decoded plus one + */ static av_always_inline int decode_block_coeffs(VP56RangeCoder *c, DCTELEM block[16], uint8_t probs[16][3][NUM_DCT_TOKENS-1], @@ -910,7 +969,8 @@ int mb_x, int mb_y) { AVCodecContext *avctx = s->avctx; - int x, y, mode, nnz, tr; + int x, y, mode, nnz; + uint32_t tr; // for the first row, we need to run xchg_mb_border to init the top edge to 127 // otherwise, skip it if we aren't going to deblock @@ -939,7 +999,7 @@ // from the top macroblock if (!(!mb_y && avctx->flags & CODEC_FLAG_EMU_EDGE) && mb_x == s->mb_width-1) { - tr = tr_right[-1]*0x01010101; + tr = tr_right[-1]*0x01010101u; tr_right = (uint8_t *)&tr; } @@ -1034,12 +1094,11 @@ }; /** - * Generic MC function. + * luma MC function * * @param s VP8 decoding context - * @param luma 1 for luma (Y) planes, 0 for chroma (Cb/Cr) planes * @param dst target buffer for block data at block position - * @param src reference picture buffer at origin (0, 0) + * @param ref reference picture buffer at origin (0, 0) * @param mv motion vector (relative to block position) to get pixel data from * @param x_off horizontal position of block from origin (0, 0) * @param y_off vertical position of block from origin (0, 0) @@ -1083,6 +1142,23 @@ } } +/** + * chroma MC function + * + * @param s VP8 decoding context + * @param dst1 target buffer for block data at block position (U plane) + * @param dst2 target buffer for block data at block position (V plane) + * @param ref reference picture buffer at origin (0, 0) + * @param mv motion vector (relative to block position) to get pixel data from + * @param x_off horizontal position of block from origin (0, 0) + * @param y_off vertical position of block from origin (0, 0) + * @param block_w width of block (16, 8 or 4) + * @param block_h height of block (always same as block_w) + * @param width width of src/dst plane data + * @param height height of src/dst plane data + * @param linesize size of a single line of plane data, including padding + * @param mc_func motion compensation function pointers (bilinear or sixtap MC) + */ static av_always_inline void vp8_mc_chroma(VP8Context *s, uint8_t *dst1, uint8_t *dst2, AVFrame *ref, const VP56mv *mv, int x_off, int y_off, @@ -1476,17 +1552,29 @@ } } +static void release_queued_segmaps(VP8Context *s, int is_close) +{ + int leave_behind = is_close ? 0 : !s->maps_are_invalid; + while (s->num_maps_to_be_freed > leave_behind) + av_freep(&s->segmentation_maps[--s->num_maps_to_be_freed]); + s->maps_are_invalid = 0; +} + static int vp8_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { VP8Context *s = avctx->priv_data; int ret, mb_x, mb_y, i, y, referenced; enum AVDiscard skip_thresh; - AVFrame *av_uninit(curframe), *prev_frame = s->framep[VP56_FRAME_CURRENT]; + AVFrame *av_uninit(curframe), *prev_frame; + + release_queued_segmaps(s, 0); if ((ret = decode_frame_header(s, avpkt->data, avpkt->size)) < 0) return ret; + prev_frame = s->framep[VP56_FRAME_CURRENT]; + referenced = s->update_last || s->update_golden == VP56_FRAME_CURRENT || s->update_altref == VP56_FRAME_CURRENT; @@ -1506,7 +1594,7 @@ &s->frames[i] != s->framep[VP56_FRAME_PREVIOUS] && &s->frames[i] != s->framep[VP56_FRAME_GOLDEN] && &s->frames[i] != s->framep[VP56_FRAME_GOLDEN2]) - ff_thread_release_buffer(avctx, &s->frames[i]); + vp8_release_frame(s, &s->frames[i], 1, 0); // find a free buffer for (i = 0; i < 5; i++) @@ -1522,13 +1610,12 @@ abort(); } if (curframe->data[0]) - ff_thread_release_buffer(avctx, curframe); + vp8_release_frame(s, curframe, 1, 0); curframe->key_frame = s->keyframe; curframe->pict_type = s->keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; curframe->reference = referenced ? 3 : 0; - curframe->ref_index[0] = s->segmentation_map; - if ((ret = ff_thread_get_buffer(avctx, curframe))) { + if ((ret = vp8_alloc_frame(s, curframe))) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed!\n"); return ret; } @@ -1620,8 +1707,8 @@ s->dsp.prefetch(dst[0] + (mb_x&3)*4*s->linesize + 64, s->linesize, 4); s->dsp.prefetch(dst[1] + (mb_x&7)*s->uvlinesize + 64, dst[2] - dst[1], 2); - decode_mb_mode(s, mb, mb_x, mb_y, s->segmentation_map + mb_xy, - prev_frame ? prev_frame->ref_index[0] + mb_xy : NULL); + decode_mb_mode(s, mb, mb_x, mb_y, curframe->ref_index[0] + mb_xy, + prev_frame && prev_frame->ref_index[0] ? prev_frame->ref_index[0] + mb_xy : NULL); prefetch_motion(s, mb, mb_x, mb_y, mb_xy, VP56_FRAME_PREVIOUS); @@ -1696,7 +1783,7 @@ avctx->pix_fmt = PIX_FMT_YUV420P; dsputil_init(&s->dsp, avctx); - ff_h264_pred_init(&s->hpc, CODEC_ID_VP8, 8); + ff_h264_pred_init(&s->hpc, CODEC_ID_VP8, 8, 1); ff_vp8dsp_init(&s->vp8dsp); return 0; @@ -1704,7 +1791,8 @@ static av_cold int vp8_decode_free(AVCodecContext *avctx) { - vp8_decode_flush(avctx); + vp8_decode_flush_impl(avctx, 0, 1, 1); + release_queued_segmaps(avctx->priv_data, 1); return 0; } @@ -1724,6 +1812,12 @@ { VP8Context *s = dst->priv_data, *s_src = src->priv_data; + if (s->macroblocks_base && + (s_src->mb_width != s->mb_width || s_src->mb_height != s->mb_height)) { + free_buffers(s); + s->maps_are_invalid = 1; + } + s->prob[0] = s_src->prob[!s_src->update_probabilities]; s->segmentation = s_src->segmentation; s->lf_delta = s_src->lf_delta; @@ -1739,15 +1833,14 @@ } AVCodec ff_vp8_decoder = { - "vp8", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VP8, - sizeof(VP8Context), - vp8_decode_init, - NULL, - vp8_decode_free, - vp8_decode_frame, - CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, + .name = "vp8", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VP8, + .priv_data_size = sizeof(VP8Context), + .init = vp8_decode_init, + .close = vp8_decode_free, + .decode = vp8_decode_frame, + .capabilities = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, .flush = vp8_decode_flush, .long_name = NULL_IF_CONFIG_SMALL("On2 VP8"), .init_thread_copy = ONLY_IF_THREADS_ENABLED(vp8_decode_init_thread_copy), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8data.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8data.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8data.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8data.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,4 @@ -/** - * VP8 compatible video decoder - * +/* * Copyright (C) 2010 David Conrad * Copyright (C) 2010 Ronald S. Bultje * @@ -21,6 +19,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP8 compatible video decoder + */ + #ifndef AVCODEC_VP8DATA_H #define AVCODEC_VP8DATA_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8dsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8dsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8dsp.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8dsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,4 @@ -/** - * VP8 compatible video decoder - * +/* * Copyright (C) 2010 David Conrad * Copyright (C) 2010 Ronald S. Bultje * @@ -21,6 +19,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP8 compatible video decoder + */ + #include "dsputil.h" #include "vp8dsp.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8dsp.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8dsp.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8dsp.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8dsp.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,4 @@ -/** - * VP8 compatible video decoder - * +/* * Copyright (C) 2010 David Conrad * Copyright (C) 2010 Ronald S. Bultje * @@ -21,6 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * VP8 compatible video decoder + */ #ifndef AVCODEC_VP8DSP_H #define AVCODEC_VP8DSP_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8.h 2012-01-11 00:34:30.000000000 +0000 @@ -130,7 +130,6 @@ uint8_t *intra4x4_pred_mode_top; uint8_t intra4x4_pred_mode_left[4]; - uint8_t *segmentation_map; /** * Macroblocks can have one of 4 different quants in a frame when @@ -237,6 +236,16 @@ H264PredContext hpc; vp8_mc_func put_pixels_tab[3][3][3]; AVFrame frames[5]; + + /** + * A list of segmentation_map buffers that are to be free()'ed in + * the next decoding iteration. We can't free() them right away + * because the map may still be used by subsequent decoding threads. + * Unused if frame threading is off. + */ + uint8_t *segmentation_maps[5]; + int num_maps_to_be_freed; + int maps_are_invalid; } VP8Context; #endif /* AVCODEC_VP8_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8_parser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8_parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vp8_parser.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vp8_parser.c 2012-01-11 00:34:30.000000000 +0000 @@ -33,8 +33,6 @@ } AVCodecParser ff_vp8_parser = { - { CODEC_ID_VP8 }, - 0, - NULL, - parse, + .codec_ids = { CODEC_ID_VP8 }, + .parser_parse = parse, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vqavideo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vqavideo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/vqavideo.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/vqavideo.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,9 +21,9 @@ /** * @file - * VQA Video Decoder by Mike Melanson (melanson@pcisys.net) - * For more information about the VQA format, visit: - * http://wiki.multimedia.cx/index.php?title=VQA + * VQA Video Decoder + * @author Mike Melanson (melanson@pcisys.net) + * @see http://wiki.multimedia.cx/index.php?title=VQA * * The VQA video decoder outputs PAL8 or RGB555 colorspace data, depending * on the type of data in the file. @@ -600,14 +600,13 @@ } AVCodec ff_vqa_decoder = { - "vqavideo", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_WS_VQA, - sizeof(VqaContext), - vqa_decode_init, - NULL, - vqa_decode_end, - vqa_decode_frame, - CODEC_CAP_DR1, + .name = "vqavideo", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_WS_VQA, + .priv_data_size = sizeof(VqaContext), + .init = vqa_decode_init, + .close = vqa_decode_end, + .decode = vqa_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios VQA (Vector Quantized Animation) video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/w32pthreads.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/w32pthreads.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/w32pthreads.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/w32pthreads.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,268 @@ +/* + * Copyright (C) 2010-2011 x264 project + * + * Authors: Steven Walters + * Pegasys Inc. + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * w32threads to pthreads wrapper + */ + +#ifndef AVCODEC_W32PTHREADS_H +#define AVCODEC_W32PTHREADS_H + +/* Build up a pthread-like API using underlying Windows API. Have only static + * methods so as to not conflict with a potentially linked in pthread-win32 + * library. + * As most functions here are used without checking return values, + * only implement return values as necessary. */ + +#define WIN32_LEAN_AND_MEAN +#include +#include + +typedef struct { + void *handle; + void *(*func)(void* arg); + void *arg; + void *ret; +} pthread_t; + +/* the conditional variable api for windows 6.0+ uses critical sections and + * not mutexes */ +typedef CRITICAL_SECTION pthread_mutex_t; + +/* This is the CONDITIONAL_VARIABLE typedef for using Window's native + * conditional variables on kernels 6.0+. + * MinGW does not currently have this typedef. */ +typedef struct { + void *ptr; +} pthread_cond_t; + +/* function pointers to conditional variable API on windows 6.0+ kernels */ +static void (WINAPI *cond_broadcast)(pthread_cond_t *cond); +static void (WINAPI *cond_init)(pthread_cond_t *cond); +static void (WINAPI *cond_signal)(pthread_cond_t *cond); +static BOOL (WINAPI *cond_wait)(pthread_cond_t *cond, pthread_mutex_t *mutex, + DWORD milliseconds); + +static unsigned __stdcall attribute_align_arg win32thread_worker(void *arg) +{ + pthread_t *h = arg; + h->ret = h->func(h->arg); + return 0; +} + +static int pthread_create(pthread_t *thread, const void *unused_attr, + void *(*start_routine)(void*), void *arg) +{ + thread->func = start_routine; + thread->arg = arg; + thread->handle = (void*)_beginthreadex(NULL, 0, win32thread_worker, thread, + 0, NULL); + return !thread->handle; +} + +static void pthread_join(pthread_t thread, void **value_ptr) +{ + DWORD ret = WaitForSingleObject(thread.handle, INFINITE); + if (ret != WAIT_OBJECT_0) + return; + if (value_ptr) + *value_ptr = thread.ret; + CloseHandle(thread.handle); +} + +static inline int pthread_mutex_init(pthread_mutex_t *m, void* attr) +{ + InitializeCriticalSection(m); + return 0; +} +static inline int pthread_mutex_destroy(pthread_mutex_t *m) +{ + DeleteCriticalSection(m); + return 0; +} +static inline int pthread_mutex_lock(pthread_mutex_t *m) +{ + EnterCriticalSection(m); + return 0; +} +static inline int pthread_mutex_unlock(pthread_mutex_t *m) +{ + LeaveCriticalSection(m); + return 0; +} + +/* for pre-Windows 6.0 platforms we need to define and use our own condition + * variable and api */ +typedef struct { + pthread_mutex_t mtx_broadcast; + pthread_mutex_t mtx_waiter_count; + volatile int waiter_count; + HANDLE semaphore; + HANDLE waiters_done; + volatile int is_broadcast; +} win32_cond_t; + +static void pthread_cond_init(pthread_cond_t *cond, const void *unused_attr) +{ + win32_cond_t *win32_cond = NULL; + if (cond_init) { + cond_init(cond); + return; + } + + /* non native condition variables */ + win32_cond = av_mallocz(sizeof(win32_cond_t)); + if (!win32_cond) + return; + cond->ptr = win32_cond; + win32_cond->semaphore = CreateSemaphore(NULL, 0, 0x7fffffff, NULL); + if (!win32_cond->semaphore) + return; + win32_cond->waiters_done = CreateEvent(NULL, TRUE, FALSE, NULL); + if (!win32_cond->waiters_done) + return; + + pthread_mutex_init(&win32_cond->mtx_waiter_count, NULL); + pthread_mutex_init(&win32_cond->mtx_broadcast, NULL); +} + +static void pthread_cond_destroy(pthread_cond_t *cond) +{ + win32_cond_t *win32_cond = cond->ptr; + /* native condition variables do not destroy */ + if (cond_init) + return; + + /* non native condition variables */ + CloseHandle(win32_cond->semaphore); + CloseHandle(win32_cond->waiters_done); + pthread_mutex_destroy(&win32_cond->mtx_waiter_count); + pthread_mutex_destroy(&win32_cond->mtx_broadcast); + av_freep(&win32_cond); + cond->ptr = NULL; +} + +static void pthread_cond_broadcast(pthread_cond_t *cond) +{ + win32_cond_t *win32_cond = cond->ptr; + int have_waiter; + + if (cond_broadcast) { + cond_broadcast(cond); + return; + } + + /* non native condition variables */ + pthread_mutex_lock(&win32_cond->mtx_broadcast); + pthread_mutex_lock(&win32_cond->mtx_waiter_count); + have_waiter = 0; + + if (win32_cond->waiter_count) { + win32_cond->is_broadcast = 1; + have_waiter = 1; + } + + if (have_waiter) { + ReleaseSemaphore(win32_cond->semaphore, win32_cond->waiter_count, NULL); + pthread_mutex_unlock(&win32_cond->mtx_waiter_count); + WaitForSingleObject(win32_cond->waiters_done, INFINITE); + ResetEvent(win32_cond->waiters_done); + win32_cond->is_broadcast = 0; + } else + pthread_mutex_unlock(&win32_cond->mtx_waiter_count); + pthread_mutex_unlock(&win32_cond->mtx_broadcast); +} + +static void pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) +{ + win32_cond_t *win32_cond = cond->ptr; + int last_waiter; + if (cond_wait) { + cond_wait(cond, mutex, INFINITE); + return; + } + + /* non native condition variables */ + pthread_mutex_lock(&win32_cond->mtx_broadcast); + pthread_mutex_lock(&win32_cond->mtx_waiter_count); + win32_cond->waiter_count++; + pthread_mutex_unlock(&win32_cond->mtx_waiter_count); + pthread_mutex_unlock(&win32_cond->mtx_broadcast); + + // unlock the external mutex + pthread_mutex_unlock(mutex); + WaitForSingleObject(win32_cond->semaphore, INFINITE); + + pthread_mutex_lock(&win32_cond->mtx_waiter_count); + win32_cond->waiter_count--; + last_waiter = !win32_cond->waiter_count || !win32_cond->is_broadcast; + pthread_mutex_unlock(&win32_cond->mtx_waiter_count); + + if (last_waiter) + SetEvent(win32_cond->waiters_done); + + // lock the external mutex + return pthread_mutex_lock(mutex); +} + +static void pthread_cond_signal(pthread_cond_t *cond) +{ + win32_cond_t *win32_cond = cond->ptr; + int have_waiter; + if (cond_signal) { + cond_signal(cond); + return; + } + + pthread_mutex_lock(&win32_cond->mtx_broadcast); + + /* non-native condition variables */ + pthread_mutex_lock(&win32_cond->mtx_waiter_count); + have_waiter = win32_cond->waiter_count; + pthread_mutex_unlock(&win32_cond->mtx_waiter_count); + + if (have_waiter) { + ReleaseSemaphore(win32_cond->semaphore, 1, NULL); + WaitForSingleObject(win32_cond->waiters_done, INFINITE); + ResetEvent(win32_cond->waiters_done); + } + + pthread_mutex_unlock(&win32_cond->mtx_broadcast); +} + +static void w32thread_init(void) +{ + HANDLE kernel_dll = GetModuleHandle(TEXT("kernel32.dll")); + /* if one is available, then they should all be available */ + cond_init = + (void*)GetProcAddress(kernel_dll, "InitializeConditionVariable"); + cond_broadcast = + (void*)GetProcAddress(kernel_dll, "WakeAllConditionVariable"); + cond_signal = + (void*)GetProcAddress(kernel_dll, "WakeConditionVariable"); + cond_wait = + (void*)GetProcAddress(kernel_dll, "SleepConditionVariableCS"); +} + +#endif /* AVCODEC_W32PTHREADS_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/w32thread.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/w32thread.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/w32thread.c 2011-04-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/w32thread.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2004 Michael Niedermayer - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ -//#define DEBUG - -#include "avcodec.h" -#include "thread.h" - -#define WIN32_LEAN_AND_MEAN -#include -#include - -typedef struct ThreadContext{ - AVCodecContext *avctx; - HANDLE thread; - HANDLE work_sem; - HANDLE job_sem; - HANDLE done_sem; - int (*func)(AVCodecContext *c, void *arg); - int (*func2)(AVCodecContext *c, void *arg, int, int); - void *arg; - int argsize; - int *jobnr; - int *ret; - int threadnr; -}ThreadContext; - - -static unsigned WINAPI attribute_align_arg thread_func(void *v){ - ThreadContext *c= v; - - for(;;){ - int ret, jobnr; -//printf("thread_func %X enter wait\n", (int)v); fflush(stdout); - WaitForSingleObject(c->work_sem, INFINITE); - // avoid trying to access jobnr if we should quit - if (!c->func && !c->func2) - break; - WaitForSingleObject(c->job_sem, INFINITE); - jobnr = (*c->jobnr)++; - ReleaseSemaphore(c->job_sem, 1, 0); -//printf("thread_func %X after wait (func=%X)\n", (int)v, (int)c->func); fflush(stdout); - if(c->func) - ret= c->func(c->avctx, (uint8_t *)c->arg + jobnr*c->argsize); - else - ret= c->func2(c->avctx, c->arg, jobnr, c->threadnr); - if (c->ret) - c->ret[jobnr] = ret; -//printf("thread_func %X signal complete\n", (int)v); fflush(stdout); - ReleaseSemaphore(c->done_sem, 1, 0); - } - - return 0; -} - -/** - * Free what has been allocated by ff_thread_init(). - * Must be called after decoding has finished, especially do not call while avcodec_thread_execute() is running. - */ -void ff_thread_free(AVCodecContext *s){ - ThreadContext *c= s->thread_opaque; - int i; - - for(i=0; ithread_count; i++){ - - c[i].func= NULL; - c[i].func2= NULL; - } - ReleaseSemaphore(c[0].work_sem, s->thread_count, 0); - for(i=0; ithread_count; i++){ - WaitForSingleObject(c[i].thread, INFINITE); - if(c[i].thread) CloseHandle(c[i].thread); - } - if(c[0].work_sem) CloseHandle(c[0].work_sem); - if(c[0].job_sem) CloseHandle(c[0].job_sem); - if(c[0].done_sem) CloseHandle(c[0].done_sem); - - av_freep(&s->thread_opaque); -} - -static int avcodec_thread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size){ - ThreadContext *c= s->thread_opaque; - int i; - int jobnr = 0; - - assert(s == c->avctx); - - /* note, we can be certain that this is not called with the same AVCodecContext by different threads at the same time */ - - for(i=0; ithread_count; i++){ - c[i].arg= arg; - c[i].argsize= size; - c[i].func= func; - c[i].ret= ret; - c[i].jobnr = &jobnr; - } - ReleaseSemaphore(c[0].work_sem, count, 0); - for(i=0; ithread_opaque; - int i; - for(i=0; ithread_count; i++) - c[i].func2 = func; - avcodec_thread_execute(s, NULL, arg, ret, count, 0); -} - -int ff_thread_init(AVCodecContext *s){ - int i; - ThreadContext *c; - uint32_t threadid; - - if(!(s->thread_type & FF_THREAD_SLICE)){ - av_log(s, AV_LOG_WARNING, "The requested thread algorithm is not supported with this thread library.\n"); - return 0; - } - - s->active_thread_type= FF_THREAD_SLICE; - - if (s->thread_count <= 1) - return 0; - - assert(!s->thread_opaque); - c= av_mallocz(sizeof(ThreadContext)*s->thread_count); - s->thread_opaque= c; - if(!(c[0].work_sem = CreateSemaphore(NULL, 0, INT_MAX, NULL))) - goto fail; - if(!(c[0].job_sem = CreateSemaphore(NULL, 1, 1, NULL))) - goto fail; - if(!(c[0].done_sem = CreateSemaphore(NULL, 0, INT_MAX, NULL))) - goto fail; - - for(i=0; ithread_count; i++){ -//printf("init semaphors %d\n", i); fflush(stdout); - c[i].avctx= s; - c[i].work_sem = c[0].work_sem; - c[i].job_sem = c[0].job_sem; - c[i].done_sem = c[0].done_sem; - c[i].threadnr = i; - -//printf("create thread %d\n", i); fflush(stdout); - c[i].thread = (HANDLE)_beginthreadex(NULL, 0, thread_func, &c[i], 0, &threadid ); - if( !c[i].thread ) goto fail; - } -//printf("init done\n"); fflush(stdout); - - s->execute= avcodec_thread_execute; - s->execute2= avcodec_thread_execute2; - - return 0; -fail: - ff_thread_free(s); - return -1; -} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wavpack.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wavpack.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wavpack.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wavpack.c 2012-01-11 00:34:30.000000000 +0000 @@ -18,20 +18,22 @@ * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define ALT_BITSTREAM_READER_LE + +#define BITSTREAM_READER_LE + +#include "libavutil/audioconvert.h" #include "avcodec.h" #include "get_bits.h" #include "unary.h" -#include "libavutil/audioconvert.h" /** * @file * WavPack lossless audio decoder */ -#define WV_MONO 0x00000004 -#define WV_JOINT_STEREO 0x00000010 -#define WV_FALSE_STEREO 0x40000000 +#define WV_MONO 0x00000004 +#define WV_JOINT_STEREO 0x00000010 +#define WV_FALSE_STEREO 0x40000000 #define WV_HYBRID_MODE 0x00000008 #define WV_HYBRID_SHAPE 0x00000008 @@ -44,14 +46,14 @@ #define WV_FLT_ZERO_SENT 0x08 #define WV_FLT_ZERO_SIGN 0x10 -enum WP_ID_Flags{ +enum WP_ID_Flags { WP_IDF_MASK = 0x1F, WP_IDF_IGNORE = 0x20, WP_IDF_ODD = 0x40, WP_IDF_LONG = 0x80 }; -enum WP_ID{ +enum WP_ID { WP_ID_DUMMY = 0, WP_ID_ENCINFO, WP_ID_DECTERMS, @@ -110,13 +112,11 @@ int extra_bits; int and, or, shift; int post_shift; - int hybrid, hybrid_bitrate; + int hybrid, hybrid_bitrate, hybrid_maxclip; int float_flag; int float_shift; int float_max_exp; WvChannel ch[2]; - int samples_left; - int max_samples; int pos; SavedContext sc, extra_sc; } WavpackFrameContext; @@ -125,6 +125,7 @@ typedef struct WavpackContext { AVCodecContext *avctx; + AVFrame frame; WavpackFrameContext *fdec[WV_MAX_FRAME_DECODERS]; int fdec_num; @@ -133,7 +134,6 @@ int mkv_mode; int block; int samples; - int samples_left; int ch_offset; } WavpackContext; @@ -180,7 +180,7 @@ { int res, neg = 0; - if(val < 0){ + if (val < 0) { val = -val; neg = 1; } @@ -195,13 +195,13 @@ { int bits; - if(!val) + if (!val) return 0; - if(val == 1) + if (val == 1) return 256; val += val >> 9; bits = av_log2(val) + 1; - if(bits < 9) + if (bits < 9) return (bits << 8) + wp_log2_table[(val << (9 - bits)) & 0xFF]; else return (bits << 8) + wp_log2_table[(val >> (bits - 9)) & 0xFF]; @@ -211,33 +211,35 @@ // macros for manipulating median values #define GET_MED(n) ((c->median[n] >> 4) + 1) -#define DEC_MED(n) c->median[n] -= ((c->median[n] + (128>>n) - 2) / (128>>n)) * 2 -#define INC_MED(n) c->median[n] += ((c->median[n] + (128>>n)) / (128>>n)) * 5 +#define DEC_MED(n) c->median[n] -= ((c->median[n] + (128 >> n) - 2) / (128 >> n)) * 2 +#define INC_MED(n) c->median[n] += ((c->median[n] + (128 >> n) ) / (128 >> n)) * 5 // macros for applying weight #define UPDATE_WEIGHT_CLIP(weight, delta, samples, in) \ - if(samples && in){ \ - if((samples ^ in) < 0){ \ - weight -= delta; \ - if(weight < -1024) weight = -1024; \ - }else{ \ - weight += delta; \ - if(weight > 1024) weight = 1024; \ - } \ - } + if (samples && in) { \ + if ((samples ^ in) < 0) { \ + weight -= delta; \ + if (weight < -1024) \ + weight = -1024; \ + } else { \ + weight += delta; \ + if (weight > 1024) \ + weight = 1024; \ + } \ + } static av_always_inline int get_tail(GetBitContext *gb, int k) { int p, e, res; - if(k<1)return 0; + if (k < 1) + return 0; p = av_log2(k); e = (1 << (p + 1)) - k - 1; res = p ? get_bits(gb, p) : 0; - if(res >= e){ - res = (res<<1) - e + get_bits1(gb); - } + if (res >= e) + res = (res << 1) - e + get_bits1(gb); return res; } @@ -245,37 +247,38 @@ { int i, br[2], sl[2]; - for(i = 0; i <= ctx->stereo_in; i++){ + for (i = 0; i <= ctx->stereo_in; i++) { ctx->ch[i].bitrate_acc += ctx->ch[i].bitrate_delta; br[i] = ctx->ch[i].bitrate_acc >> 16; sl[i] = LEVEL_DECAY(ctx->ch[i].slow_level); } - if(ctx->stereo_in && ctx->hybrid_bitrate){ + if (ctx->stereo_in && ctx->hybrid_bitrate) { int balance = (sl[1] - sl[0] + br[1] + 1) >> 1; - if(balance > br[0]){ + if (balance > br[0]) { br[1] = br[0] << 1; br[0] = 0; - }else if(-balance > br[0]){ + } else if (-balance > br[0]) { br[0] <<= 1; br[1] = 0; - }else{ + } else { br[1] = br[0] + balance; br[0] = br[0] - balance; } } - for(i = 0; i <= ctx->stereo_in; i++){ - if(ctx->hybrid_bitrate){ - if(sl[i] - br[i] > -0x100) + for (i = 0; i <= ctx->stereo_in; i++) { + if (ctx->hybrid_bitrate) { + if (sl[i] - br[i] > -0x100) ctx->ch[i].error_limit = wp_exp2(sl[i] - br[i] + 0x100); else ctx->ch[i].error_limit = 0; - }else{ + } else { ctx->ch[i].error_limit = wp_exp2(br[i]); } } } -static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb, int channel, int *last) +static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb, + int channel, int *last) { int t, t2; int sign, base, add, ret; @@ -283,18 +286,26 @@ *last = 0; - if((ctx->ch[0].median[0] < 2U) && (ctx->ch[1].median[0] < 2U) && !ctx->zero && !ctx->one){ - if(ctx->zeroes){ + if ((ctx->ch[0].median[0] < 2U) && (ctx->ch[1].median[0] < 2U) && + !ctx->zero && !ctx->one) { + if (ctx->zeroes) { ctx->zeroes--; - if(ctx->zeroes){ + if (ctx->zeroes) { c->slow_level -= LEVEL_DECAY(c->slow_level); return 0; } - }else{ + } else { t = get_unary_0_33(gb); - if(t >= 2) t = get_bits(gb, t - 1) | (1 << (t-1)); + if (t >= 2) { + if (get_bits_left(gb) < t - 1) + goto error; + t = get_bits(gb, t - 1) | (1 << (t-1)); + } else { + if (get_bits_left(gb) < 0) + goto error; + } ctx->zeroes = t; - if(ctx->zeroes){ + if (ctx->zeroes) { memset(ctx->ch[0].median, 0, sizeof(ctx->ch[0].median)); memset(ctx->ch[1].median, 0, sizeof(ctx->ch[1].median)); c->slow_level -= LEVEL_DECAY(c->slow_level); @@ -303,95 +314,110 @@ } } - if(get_bits_count(gb) >= ctx->data_size){ - *last = 1; - return 0; - } - - if(ctx->zero){ + if (ctx->zero) { t = 0; ctx->zero = 0; - }else{ + } else { t = get_unary_0_33(gb); - if(get_bits_count(gb) >= ctx->data_size){ - *last = 1; - return 0; - } - if(t == 16) { + if (get_bits_left(gb) < 0) + goto error; + if (t == 16) { t2 = get_unary_0_33(gb); - if(t2 < 2) t += t2; - else t += get_bits(gb, t2 - 1) | (1 << (t2 - 1)); + if (t2 < 2) { + if (get_bits_left(gb) < 0) + goto error; + t += t2; + } else { + if (get_bits_left(gb) < t2 - 1) + goto error; + t += get_bits(gb, t2 - 1) | (1 << (t2 - 1)); + } } - if(ctx->one){ - ctx->one = t&1; - t = (t>>1) + 1; - }else{ - ctx->one = t&1; + if (ctx->one) { + ctx->one = t & 1; + t = (t >> 1) + 1; + } else { + ctx->one = t & 1; t >>= 1; } ctx->zero = !ctx->one; } - if(ctx->hybrid && !channel) + if (ctx->hybrid && !channel) update_error_limit(ctx); - if(!t){ + if (!t) { base = 0; - add = GET_MED(0) - 1; + add = GET_MED(0) - 1; DEC_MED(0); - }else if(t == 1){ + } else if (t == 1) { base = GET_MED(0); - add = GET_MED(1) - 1; + add = GET_MED(1) - 1; INC_MED(0); DEC_MED(1); - }else if(t == 2){ + } else if (t == 2) { base = GET_MED(0) + GET_MED(1); - add = GET_MED(2) - 1; + add = GET_MED(2) - 1; INC_MED(0); INC_MED(1); DEC_MED(2); - }else{ + } else { base = GET_MED(0) + GET_MED(1) + GET_MED(2) * (t - 2); - add = GET_MED(2) - 1; + add = GET_MED(2) - 1; INC_MED(0); INC_MED(1); INC_MED(2); } - if(!c->error_limit){ + if (!c->error_limit) { ret = base + get_tail(gb, add); - }else{ - int mid = (base*2 + add + 1) >> 1; - while(add > c->error_limit){ - if(get_bits1(gb)){ + if (get_bits_left(gb) <= 0) + goto error; + } else { + int mid = (base * 2 + add + 1) >> 1; + while (add > c->error_limit) { + if (get_bits_left(gb) <= 0) + goto error; + if (get_bits1(gb)) { add -= (mid - base); base = mid; - }else + } else add = mid - base - 1; - mid = (base*2 + add + 1) >> 1; + mid = (base * 2 + add + 1) >> 1; } ret = mid; } sign = get_bits1(gb); - if(ctx->hybrid_bitrate) + if (ctx->hybrid_bitrate) c->slow_level += wp_log2(ret) - LEVEL_DECAY(c->slow_level); return sign ? ~ret : ret; + +error: + *last = 1; + return 0; } -static inline int wv_get_value_integer(WavpackFrameContext *s, uint32_t *crc, int S) +static inline int wv_get_value_integer(WavpackFrameContext *s, uint32_t *crc, + int S) { int bit; - if(s->extra_bits){ + if (s->extra_bits){ S <<= s->extra_bits; - if(s->got_extra_bits){ + if (s->got_extra_bits && get_bits_left(&s->gb_extra_bits) >= s->extra_bits) { S |= get_bits(&s->gb_extra_bits, s->extra_bits); - *crc = *crc * 9 + (S&0xffff) * 3 + ((unsigned)S>>16); + *crc = *crc * 9 + (S & 0xffff) * 3 + ((unsigned)S >> 16); } } + bit = (S & s->and) | s->or; - return (((S + bit) << s->shift) - bit) << s->post_shift; + bit = (((S + bit) << s->shift) - bit) << s->post_shift; + + if (s->hybrid) + bit = av_clip(bit, -s->hybrid_maxclip - 1, s->hybrid_maxclip); + + return bit; } static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S) @@ -404,58 +430,58 @@ int sign; int exp = s->float_max_exp; - if(s->got_extra_bits){ - const int max_bits = 1 + 23 + 8 + 1; + if (s->got_extra_bits) { + const int max_bits = 1 + 23 + 8 + 1; const int left_bits = get_bits_left(&s->gb_extra_bits); - if(left_bits + 8 * FF_INPUT_BUFFER_PADDING_SIZE < max_bits) + if (left_bits + 8 * FF_INPUT_BUFFER_PADDING_SIZE < max_bits) return 0.0; } - if(S){ + if (S) { S <<= s->float_shift; sign = S < 0; - if(sign) + if (sign) S = -S; - if(S >= 0x1000000){ - if(s->got_extra_bits && get_bits1(&s->gb_extra_bits)){ + if (S >= 0x1000000) { + if (s->got_extra_bits && get_bits1(&s->gb_extra_bits)) S = get_bits(&s->gb_extra_bits, 23); - }else{ + else S = 0; - } exp = 255; - }else if(exp){ + } else if (exp) { int shift = 23 - av_log2(S); exp = s->float_max_exp; - if(exp <= shift){ + if (exp <= shift) shift = --exp; - } exp -= shift; - if(shift){ + if (shift) { S <<= shift; - if((s->float_flag & WV_FLT_SHIFT_ONES) || - (s->got_extra_bits && (s->float_flag & WV_FLT_SHIFT_SAME) && get_bits1(&s->gb_extra_bits)) ){ + if ((s->float_flag & WV_FLT_SHIFT_ONES) || + (s->got_extra_bits && (s->float_flag & WV_FLT_SHIFT_SAME) && + get_bits1(&s->gb_extra_bits))) { S |= (1 << shift) - 1; - } else if(s->got_extra_bits && (s->float_flag & WV_FLT_SHIFT_SENT)){ + } else if (s->got_extra_bits && + (s->float_flag & WV_FLT_SHIFT_SENT)) { S |= get_bits(&s->gb_extra_bits, shift); } } - }else{ + } else { exp = s->float_max_exp; } S &= 0x7fffff; - }else{ + } else { sign = 0; exp = 0; - if(s->got_extra_bits && (s->float_flag & WV_FLT_ZERO_SENT)){ - if(get_bits1(&s->gb_extra_bits)){ + if (s->got_extra_bits && (s->float_flag & WV_FLT_ZERO_SENT)) { + if (get_bits1(&s->gb_extra_bits)) { S = get_bits(&s->gb_extra_bits, 23); - if(s->float_max_exp >= 25) + if (s->float_max_exp >= 25) exp = get_bits(&s->gb_extra_bits, 8); sign = get_bits1(&s->gb_extra_bits); - }else{ - if(s->float_flag & WV_FLT_ZERO_SIGN) + } else { + if (s->float_flag & WV_FLT_ZERO_SIGN) sign = get_bits1(&s->gb_extra_bits); } } @@ -473,7 +499,8 @@ s->sc.crc = s->extra_sc.crc = 0xFFFFFFFF; } -static inline int wv_unpack_stereo(WavpackFrameContext *s, GetBitContext *gb, void *dst, const int type) +static inline int wv_unpack_stereo(WavpackFrameContext *s, GetBitContext *gb, + void *dst, const int type) { int i, j, count = 0; int last, t; @@ -486,71 +513,72 @@ float *dstfl = dst; const int channel_pad = s->avctx->channels - 2; - if(s->samples_left == s->samples) - s->one = s->zero = s->zeroes = 0; - do{ + s->one = s->zero = s->zeroes = 0; + do { L = wv_get_value(s, gb, 0, &last); - if(last) break; + if (last) + break; R = wv_get_value(s, gb, 1, &last); - if(last) break; - for(i = 0; i < s->terms; i++){ + if (last) + break; + for (i = 0; i < s->terms; i++) { t = s->decorr[i].value; - if(t > 0){ - if(t > 8){ - if(t & 1){ + if (t > 0) { + if (t > 8) { + if (t & 1) { A = 2 * s->decorr[i].samplesA[0] - s->decorr[i].samplesA[1]; B = 2 * s->decorr[i].samplesB[0] - s->decorr[i].samplesB[1]; - }else{ + } else { A = (3 * s->decorr[i].samplesA[0] - s->decorr[i].samplesA[1]) >> 1; B = (3 * s->decorr[i].samplesB[0] - s->decorr[i].samplesB[1]) >> 1; } s->decorr[i].samplesA[1] = s->decorr[i].samplesA[0]; s->decorr[i].samplesB[1] = s->decorr[i].samplesB[0]; j = 0; - }else{ + } else { A = s->decorr[i].samplesA[pos]; B = s->decorr[i].samplesB[pos]; j = (pos + t) & 7; } - if(type != AV_SAMPLE_FMT_S16){ + if (type != AV_SAMPLE_FMT_S16) { L2 = L + ((s->decorr[i].weightA * (int64_t)A + 512) >> 10); R2 = R + ((s->decorr[i].weightB * (int64_t)B + 512) >> 10); - }else{ + } else { L2 = L + ((s->decorr[i].weightA * A + 512) >> 10); R2 = R + ((s->decorr[i].weightB * B + 512) >> 10); } - if(A && L) s->decorr[i].weightA -= ((((L ^ A) >> 30) & 2) - 1) * s->decorr[i].delta; - if(B && R) s->decorr[i].weightB -= ((((R ^ B) >> 30) & 2) - 1) * s->decorr[i].delta; + if (A && L) s->decorr[i].weightA -= ((((L ^ A) >> 30) & 2) - 1) * s->decorr[i].delta; + if (B && R) s->decorr[i].weightB -= ((((R ^ B) >> 30) & 2) - 1) * s->decorr[i].delta; s->decorr[i].samplesA[j] = L = L2; s->decorr[i].samplesB[j] = R = R2; - }else if(t == -1){ - if(type != AV_SAMPLE_FMT_S16) + } else if (t == -1) { + if (type != AV_SAMPLE_FMT_S16) L2 = L + ((s->decorr[i].weightA * (int64_t)s->decorr[i].samplesA[0] + 512) >> 10); else L2 = L + ((s->decorr[i].weightA * s->decorr[i].samplesA[0] + 512) >> 10); UPDATE_WEIGHT_CLIP(s->decorr[i].weightA, s->decorr[i].delta, s->decorr[i].samplesA[0], L); L = L2; - if(type != AV_SAMPLE_FMT_S16) + if (type != AV_SAMPLE_FMT_S16) R2 = R + ((s->decorr[i].weightB * (int64_t)L2 + 512) >> 10); else R2 = R + ((s->decorr[i].weightB * L2 + 512) >> 10); UPDATE_WEIGHT_CLIP(s->decorr[i].weightB, s->decorr[i].delta, L2, R); R = R2; s->decorr[i].samplesA[0] = R; - }else{ - if(type != AV_SAMPLE_FMT_S16) + } else { + if (type != AV_SAMPLE_FMT_S16) R2 = R + ((s->decorr[i].weightB * (int64_t)s->decorr[i].samplesB[0] + 512) >> 10); else R2 = R + ((s->decorr[i].weightB * s->decorr[i].samplesB[0] + 512) >> 10); UPDATE_WEIGHT_CLIP(s->decorr[i].weightB, s->decorr[i].delta, s->decorr[i].samplesB[0], R); R = R2; - if(t == -3){ + if (t == -3) { R2 = s->decorr[i].samplesA[0]; s->decorr[i].samplesA[0] = R; } - if(type != AV_SAMPLE_FMT_S16) + if (type != AV_SAMPLE_FMT_S16) L2 = L + ((s->decorr[i].weightA * (int64_t)R2 + 512) >> 10); else L2 = L + ((s->decorr[i].weightA * R2 + 512) >> 10); @@ -560,15 +588,15 @@ } } pos = (pos + 1) & 7; - if(s->joint) + if (s->joint) L += (R -= (L >> 1)); crc = (crc * 3 + L) * 3 + R; - if(type == AV_SAMPLE_FMT_FLT){ + if (type == AV_SAMPLE_FMT_FLT) { *dstfl++ = wv_get_value_float(s, &crc_extra_bits, L); *dstfl++ = wv_get_value_float(s, &crc_extra_bits, R); dstfl += channel_pad; - } else if(type == AV_SAMPLE_FMT_S32){ + } else if (type == AV_SAMPLE_FMT_S32) { *dst32++ = wv_get_value_integer(s, &crc_extra_bits, L); *dst32++ = wv_get_value_integer(s, &crc_extra_bits, R); dst32 += channel_pad; @@ -578,32 +606,23 @@ dst16 += channel_pad; } count++; - }while(!last && count < s->max_samples); + } while (!last && count < s->samples); - s->samples_left -= count; - if(!s->samples_left){ - if(crc != s->CRC){ - av_log(s->avctx, AV_LOG_ERROR, "CRC error\n"); - return -1; - } - if(s->got_extra_bits && crc_extra_bits != s->crc_extra_bits){ - av_log(s->avctx, AV_LOG_ERROR, "Extra bits CRC error\n"); - return -1; - } - wv_reset_saved_context(s); - }else{ - s->pos = pos; - s->sc.crc = crc; - s->sc.bits_used = get_bits_count(&s->gb); - if(s->got_extra_bits){ - s->extra_sc.crc = crc_extra_bits; - s->extra_sc.bits_used = get_bits_count(&s->gb_extra_bits); - } + wv_reset_saved_context(s); + if (crc != s->CRC) { + av_log(s->avctx, AV_LOG_ERROR, "CRC error\n"); + return -1; } + if (s->got_extra_bits && crc_extra_bits != s->crc_extra_bits) { + av_log(s->avctx, AV_LOG_ERROR, "Extra bits CRC error\n"); + return -1; + } + return count * 2; } -static inline int wv_unpack_mono(WavpackFrameContext *s, GetBitContext *gb, void *dst, const int type) +static inline int wv_unpack_mono(WavpackFrameContext *s, GetBitContext *gb, + void *dst, const int type) { int i, j, count = 0; int last, t; @@ -616,79 +635,70 @@ float *dstfl = dst; const int channel_stride = s->avctx->channels; - if(s->samples_left == s->samples) - s->one = s->zero = s->zeroes = 0; - do{ + s->one = s->zero = s->zeroes = 0; + do { T = wv_get_value(s, gb, 0, &last); S = 0; - if(last) break; - for(i = 0; i < s->terms; i++){ + if (last) + break; + for (i = 0; i < s->terms; i++) { t = s->decorr[i].value; - if(t > 8){ - if(t & 1) - A = 2 * s->decorr[i].samplesA[0] - s->decorr[i].samplesA[1]; + if (t > 8) { + if (t & 1) + A = 2 * s->decorr[i].samplesA[0] - s->decorr[i].samplesA[1]; else A = (3 * s->decorr[i].samplesA[0] - s->decorr[i].samplesA[1]) >> 1; s->decorr[i].samplesA[1] = s->decorr[i].samplesA[0]; j = 0; - }else{ + } else { A = s->decorr[i].samplesA[pos]; j = (pos + t) & 7; } - if(type != AV_SAMPLE_FMT_S16) + if (type != AV_SAMPLE_FMT_S16) S = T + ((s->decorr[i].weightA * (int64_t)A + 512) >> 10); else S = T + ((s->decorr[i].weightA * A + 512) >> 10); - if(A && T) s->decorr[i].weightA -= ((((T ^ A) >> 30) & 2) - 1) * s->decorr[i].delta; + if (A && T) + s->decorr[i].weightA -= ((((T ^ A) >> 30) & 2) - 1) * s->decorr[i].delta; s->decorr[i].samplesA[j] = T = S; } pos = (pos + 1) & 7; crc = crc * 3 + S; - if(type == AV_SAMPLE_FMT_FLT){ + if (type == AV_SAMPLE_FMT_FLT) { *dstfl = wv_get_value_float(s, &crc_extra_bits, S); dstfl += channel_stride; - }else if(type == AV_SAMPLE_FMT_S32){ + } else if (type == AV_SAMPLE_FMT_S32) { *dst32 = wv_get_value_integer(s, &crc_extra_bits, S); dst32 += channel_stride; - }else{ + } else { *dst16 = wv_get_value_integer(s, &crc_extra_bits, S); dst16 += channel_stride; } count++; - }while(!last && count < s->max_samples); + } while (!last && count < s->samples); - s->samples_left -= count; - if(!s->samples_left){ - if(crc != s->CRC){ - av_log(s->avctx, AV_LOG_ERROR, "CRC error\n"); - return -1; - } - if(s->got_extra_bits && crc_extra_bits != s->crc_extra_bits){ - av_log(s->avctx, AV_LOG_ERROR, "Extra bits CRC error\n"); - return -1; - } - wv_reset_saved_context(s); - }else{ - s->pos = pos; - s->sc.crc = crc; - s->sc.bits_used = get_bits_count(&s->gb); - if(s->got_extra_bits){ - s->extra_sc.crc = crc_extra_bits; - s->extra_sc.bits_used = get_bits_count(&s->gb_extra_bits); - } + wv_reset_saved_context(s); + if (crc != s->CRC) { + av_log(s->avctx, AV_LOG_ERROR, "CRC error\n"); + return -1; + } + if (s->got_extra_bits && crc_extra_bits != s->crc_extra_bits) { + av_log(s->avctx, AV_LOG_ERROR, "Extra bits CRC error\n"); + return -1; } + return count; } static av_cold int wv_alloc_frame_context(WavpackContext *c) { - if(c->fdec_num == WV_MAX_FRAME_DECODERS) + if (c->fdec_num == WV_MAX_FRAME_DECODERS) return -1; c->fdec[c->fdec_num] = av_mallocz(sizeof(**c->fdec)); - if(!c->fdec[c->fdec_num]) + if (!c->fdec[c->fdec_num]) return -1; c->fdec_num++; c->fdec[c->fdec_num - 1]->avctx = c->avctx; @@ -702,25 +712,29 @@ WavpackContext *s = avctx->priv_data; s->avctx = avctx; - if(avctx->bits_per_coded_sample <= 16) + if (avctx->bits_per_coded_sample <= 16) avctx->sample_fmt = AV_SAMPLE_FMT_S16; else avctx->sample_fmt = AV_SAMPLE_FMT_S32; - if(avctx->channels <= 2 && !avctx->channel_layout) - avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; + if (avctx->channels <= 2 && !avctx->channel_layout) + avctx->channel_layout = (avctx->channels == 2) ? AV_CH_LAYOUT_STEREO : + AV_CH_LAYOUT_MONO; s->multichannel = avctx->channels > 2; /* lavf demuxer does not provide extradata, Matroska stores 0x403 there, use this to detect decoding mode for multichannel */ s->mkv_mode = 0; - if(s->multichannel && avctx->extradata && avctx->extradata_size == 2){ + if (s->multichannel && avctx->extradata && avctx->extradata_size == 2) { int ver = AV_RL16(avctx->extradata); - if(ver >= 0x402 && ver <= 0x410) + if (ver >= 0x402 && ver <= 0x410) s->mkv_mode = 1; } s->fdec_num = 0; + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } @@ -729,7 +743,7 @@ WavpackContext *s = avctx->priv_data; int i; - for(i = 0; i < s->fdec_num; i++) + for (i = 0; i < s->fdec_num; i++) av_freep(&s->fdec[i]); s->fdec_num = 0; @@ -737,117 +751,103 @@ } static int wavpack_decode_block(AVCodecContext *avctx, int block_no, - void *data, int *data_size, + void *data, int *got_frame_ptr, const uint8_t *buf, int buf_size) { WavpackContext *wc = avctx->priv_data; WavpackFrameContext *s; void *samples = data; int samplecount; - int got_terms = 0, got_weights = 0, got_samples = 0, got_entropy = 0, got_bs = 0, got_float = 0; - int got_hybrid = 0; - const uint8_t* orig_buf = buf; - const uint8_t* buf_end = buf + buf_size; + int got_terms = 0, got_weights = 0, got_samples = 0, + got_entropy = 0, got_bs = 0, got_float = 0, got_hybrid = 0; + const uint8_t *orig_buf = buf; + const uint8_t *buf_end = buf + buf_size; int i, j, id, size, ssize, weights, t; int bpp, chan, chmask; - if (buf_size == 0){ - *data_size = 0; + if (buf_size == 0) { + *got_frame_ptr = 0; return 0; } - if(block_no >= wc->fdec_num && wv_alloc_frame_context(wc) < 0){ + if (block_no >= wc->fdec_num && wv_alloc_frame_context(wc) < 0) { av_log(avctx, AV_LOG_ERROR, "Error creating frame decode context\n"); return -1; } s = wc->fdec[block_no]; - if(!s){ + if (!s) { av_log(avctx, AV_LOG_ERROR, "Context for block %d is not present\n", block_no); return -1; } - if(!s->samples_left){ - memset(s->decorr, 0, MAX_TERMS * sizeof(Decorr)); - memset(s->ch, 0, sizeof(s->ch)); - s->extra_bits = 0; - s->and = s->or = s->shift = 0; - s->got_extra_bits = 0; - } + memset(s->decorr, 0, MAX_TERMS * sizeof(Decorr)); + memset(s->ch, 0, sizeof(s->ch)); + s->extra_bits = 0; + s->and = s->or = s->shift = 0; + s->got_extra_bits = 0; - if(!wc->mkv_mode){ + if (!wc->mkv_mode) { s->samples = AV_RL32(buf); buf += 4; - if(!s->samples){ - *data_size = 0; - return buf_size; + if (!s->samples) { + *got_frame_ptr = 0; + return 0; } - }else{ + } else { s->samples = wc->samples; } s->frame_flags = AV_RL32(buf); buf += 4; - if(s->frame_flags&0x80){ - bpp = sizeof(float); - avctx->sample_fmt = AV_SAMPLE_FMT_FLT; - } else if((s->frame_flags&0x03) <= 1){ - bpp = 2; - avctx->sample_fmt = AV_SAMPLE_FMT_S16; - } else { - bpp = 4; - avctx->sample_fmt = AV_SAMPLE_FMT_S32; - } + bpp = av_get_bytes_per_sample(avctx->sample_fmt); samples = (uint8_t*)samples + bpp * wc->ch_offset; - s->stereo = !(s->frame_flags & WV_MONO); - s->stereo_in = (s->frame_flags & WV_FALSE_STEREO) ? 0 : s->stereo; - s->joint = s->frame_flags & WV_JOINT_STEREO; - s->hybrid = s->frame_flags & WV_HYBRID_MODE; - s->hybrid_bitrate = s->frame_flags & WV_HYBRID_BITRATE; - s->post_shift = 8 * (bpp-1-(s->frame_flags&0x03)) + ((s->frame_flags >> 13) & 0x1f); - s->CRC = AV_RL32(buf); buf += 4; - if(wc->mkv_mode) + s->stereo = !(s->frame_flags & WV_MONO); + s->stereo_in = (s->frame_flags & WV_FALSE_STEREO) ? 0 : s->stereo; + s->joint = s->frame_flags & WV_JOINT_STEREO; + s->hybrid = s->frame_flags & WV_HYBRID_MODE; + s->hybrid_bitrate = s->frame_flags & WV_HYBRID_BITRATE; + s->hybrid_maxclip = (1LL << ((((s->frame_flags & 0x03) + 1) << 3) - 1)) - 1; + s->post_shift = 8 * (bpp - 1 - (s->frame_flags & 0x03)) + + ((s->frame_flags >> 13) & 0x1f); + s->CRC = AV_RL32(buf); buf += 4; + if (wc->mkv_mode) buf += 4; //skip block size; wc->ch_offset += 1 + s->stereo; - s->max_samples = *data_size / (bpp * avctx->channels); - s->max_samples = FFMIN(s->max_samples, s->samples); - if(s->samples_left > 0){ - s->max_samples = FFMIN(s->max_samples, s->samples_left); - buf = buf_end; - } - // parse metadata blocks - while(buf < buf_end){ - id = *buf++; + while (buf < buf_end) { + id = *buf++; size = *buf++; - if(id & WP_IDF_LONG) { + if (id & WP_IDF_LONG) { size |= (*buf++) << 8; size |= (*buf++) << 16; } size <<= 1; // size is specified in words ssize = size; - if(id & WP_IDF_ODD) size--; - if(size < 0){ + if (id & WP_IDF_ODD) + size--; + if (size < 0) { av_log(avctx, AV_LOG_ERROR, "Got incorrect block %02X with size %i\n", id, size); break; } - if(buf + ssize > buf_end){ + if (buf + ssize > buf_end) { av_log(avctx, AV_LOG_ERROR, "Block size %i is out of bounds\n", size); break; } - if(id & WP_IDF_IGNORE){ + if (id & WP_IDF_IGNORE) { buf += ssize; continue; } - switch(id & WP_IDF_MASK){ + switch (id & WP_IDF_MASK) { case WP_ID_DECTERMS: - s->terms = size; - if(s->terms > MAX_TERMS){ + if (size > MAX_TERMS) { av_log(avctx, AV_LOG_ERROR, "Too many decorrelation terms\n"); + s->terms = 0; buf += ssize; continue; } - for(i = 0; i < s->terms; i++) { + s->terms = size; + for (i = 0; i < s->terms; i++) { s->decorr[s->terms - i - 1].value = (*buf & 0x1F) - 5; s->decorr[s->terms - i - 1].delta = *buf >> 5; buf++; @@ -855,56 +855,57 @@ got_terms = 1; break; case WP_ID_DECWEIGHTS: - if(!got_terms){ + if (!got_terms) { av_log(avctx, AV_LOG_ERROR, "No decorrelation terms met\n"); continue; } weights = size >> s->stereo_in; - if(weights > MAX_TERMS || weights > s->terms){ + if (weights > MAX_TERMS || weights > s->terms) { av_log(avctx, AV_LOG_ERROR, "Too many decorrelation weights\n"); buf += ssize; continue; } - for(i = 0; i < weights; i++) { + for (i = 0; i < weights; i++) { t = (int8_t)(*buf++); s->decorr[s->terms - i - 1].weightA = t << 3; - if(s->decorr[s->terms - i - 1].weightA > 0) - s->decorr[s->terms - i - 1].weightA += (s->decorr[s->terms - i - 1].weightA + 64) >> 7; - if(s->stereo_in){ + if (s->decorr[s->terms - i - 1].weightA > 0) + s->decorr[s->terms - i - 1].weightA += + (s->decorr[s->terms - i - 1].weightA + 64) >> 7; + if (s->stereo_in) { t = (int8_t)(*buf++); s->decorr[s->terms - i - 1].weightB = t << 3; - if(s->decorr[s->terms - i - 1].weightB > 0) - s->decorr[s->terms - i - 1].weightB += (s->decorr[s->terms - i - 1].weightB + 64) >> 7; + if (s->decorr[s->terms - i - 1].weightB > 0) + s->decorr[s->terms - i - 1].weightB += + (s->decorr[s->terms - i - 1].weightB + 64) >> 7; } } got_weights = 1; break; case WP_ID_DECSAMPLES: - if(!got_terms){ + if (!got_terms) { av_log(avctx, AV_LOG_ERROR, "No decorrelation terms met\n"); continue; } t = 0; - for(i = s->terms - 1; (i >= 0) && (t < size); i--) { - if(s->decorr[i].value > 8){ + for (i = s->terms - 1; (i >= 0) && (t < size); i--) { + if (s->decorr[i].value > 8) { s->decorr[i].samplesA[0] = wp_exp2(AV_RL16(buf)); buf += 2; s->decorr[i].samplesA[1] = wp_exp2(AV_RL16(buf)); buf += 2; - if(s->stereo_in){ + if (s->stereo_in) { s->decorr[i].samplesB[0] = wp_exp2(AV_RL16(buf)); buf += 2; s->decorr[i].samplesB[1] = wp_exp2(AV_RL16(buf)); buf += 2; t += 4; } t += 4; - }else if(s->decorr[i].value < 0){ + } else if (s->decorr[i].value < 0) { s->decorr[i].samplesA[0] = wp_exp2(AV_RL16(buf)); buf += 2; s->decorr[i].samplesB[0] = wp_exp2(AV_RL16(buf)); buf += 2; t += 4; - }else{ - for(j = 0; j < s->decorr[i].value; j++){ + } else { + for (j = 0; j < s->decorr[i].value; j++) { s->decorr[i].samplesA[j] = wp_exp2(AV_RL16(buf)); buf += 2; - if(s->stereo_in){ + if (s->stereo_in) s->decorr[i].samplesB[j] = wp_exp2(AV_RL16(buf)); buf += 2; - } } t += s->decorr[i].value * 2 * (s->stereo_in + 1); } @@ -912,13 +913,14 @@ got_samples = 1; break; case WP_ID_ENTROPY: - if(size != 6 * (s->stereo_in + 1)){ - av_log(avctx, AV_LOG_ERROR, "Entropy vars size should be %i, got %i", 6 * (s->stereo_in + 1), size); + if (size != 6 * (s->stereo_in + 1)) { + av_log(avctx, AV_LOG_ERROR, "Entropy vars size should be %i, " + "got %i", 6 * (s->stereo_in + 1), size); buf += ssize; continue; } - for(j = 0; j <= s->stereo_in; j++){ - for(i = 0; i < 3; i++){ + for (j = 0; j <= s->stereo_in; j++) { + for (i = 0; i < 3; i++) { s->ch[j].median[i] = wp_exp2(AV_RL16(buf)); buf += 2; } @@ -926,56 +928,56 @@ got_entropy = 1; break; case WP_ID_HYBRID: - if(s->hybrid_bitrate){ - for(i = 0; i <= s->stereo_in; i++){ + if (s->hybrid_bitrate) { + for (i = 0; i <= s->stereo_in; i++) { s->ch[i].slow_level = wp_exp2(AV_RL16(buf)); buf += 2; size -= 2; } } - for(i = 0; i < (s->stereo_in + 1); i++){ + for (i = 0; i < (s->stereo_in + 1); i++) { s->ch[i].bitrate_acc = AV_RL16(buf) << 16; buf += 2; size -= 2; } - if(size > 0){ - for(i = 0; i < (s->stereo_in + 1); i++){ + if (size > 0) { + for (i = 0; i < (s->stereo_in + 1); i++) { s->ch[i].bitrate_delta = wp_exp2((int16_t)AV_RL16(buf)); buf += 2; } - }else{ - for(i = 0; i < (s->stereo_in + 1); i++) + } else { + for (i = 0; i < (s->stereo_in + 1); i++) s->ch[i].bitrate_delta = 0; } got_hybrid = 1; break; case WP_ID_INT32INFO: - if(size != 4){ + if (size != 4) { av_log(avctx, AV_LOG_ERROR, "Invalid INT32INFO, size = %i, sent_bits = %i\n", size, *buf); buf += ssize; continue; } - if(buf[0]) + if (buf[0]) s->extra_bits = buf[0]; - else if(buf[1]) + else if (buf[1]) s->shift = buf[1]; - else if(buf[2]){ + else if (buf[2]){ s->and = s->or = 1; s->shift = buf[2]; - }else if(buf[3]){ - s->and = 1; + } else if(buf[3]) { + s->and = 1; s->shift = buf[3]; } buf += 4; break; case WP_ID_FLOATINFO: - if(size != 4){ + if (size != 4) { av_log(avctx, AV_LOG_ERROR, "Invalid FLOATINFO, size = %i\n", size); buf += ssize; continue; } - s->float_flag = buf[0]; - s->float_shift = buf[1]; + s->float_flag = buf[0]; + s->float_shift = buf[1]; s->float_max_exp = buf[2]; buf += 4; got_float = 1; @@ -989,8 +991,9 @@ got_bs = 1; break; case WP_ID_EXTRABITS: - if(size <= 4){ - av_log(avctx, AV_LOG_ERROR, "Invalid EXTRABITS, size = %i\n", size); + if (size <= 4) { + av_log(avctx, AV_LOG_ERROR, "Invalid EXTRABITS, size = %i\n", + size); buf += size; continue; } @@ -1002,136 +1005,128 @@ s->got_extra_bits = 1; break; case WP_ID_CHANINFO: - if(size <= 1){ + if (size <= 1) { av_log(avctx, AV_LOG_ERROR, "Insufficient channel information\n"); return -1; } chan = *buf++; - switch(size - 2){ - case 0: - chmask = *buf; - break; - case 1: - chmask = AV_RL16(buf); - break; - case 2: - chmask = AV_RL24(buf); - break; - case 3: - chmask = AV_RL32(buf); - break; + switch (size - 2) { + case 0: chmask = *buf; break; + case 1: chmask = AV_RL16(buf); break; + case 2: chmask = AV_RL24(buf); break; + case 3: chmask = AV_RL32(buf); break; case 5: chan |= (buf[1] & 0xF) << 8; chmask = AV_RL24(buf + 2); break; default: - av_log(avctx, AV_LOG_ERROR, "Invalid channel info size %d\n", size); - chan = avctx->channels; + av_log(avctx, AV_LOG_ERROR, "Invalid channel info size %d\n", + size); + chan = avctx->channels; chmask = avctx->channel_layout; } - if(chan != avctx->channels){ - av_log(avctx, AV_LOG_ERROR, "Block reports total %d channels, decoder believes it's %d channels\n", - chan, avctx->channels); + if (chan != avctx->channels) { + av_log(avctx, AV_LOG_ERROR, "Block reports total %d channels, " + "decoder believes it's %d channels\n", chan, + avctx->channels); return -1; } - if(!avctx->channel_layout) + if (!avctx->channel_layout) avctx->channel_layout = chmask; buf += size - 1; break; default: buf += size; } - if(id & WP_IDF_ODD) buf++; + if (id & WP_IDF_ODD) + buf++; } - if(!s->samples_left){ - if(!got_terms){ - av_log(avctx, AV_LOG_ERROR, "No block with decorrelation terms\n"); - return -1; - } - if(!got_weights){ - av_log(avctx, AV_LOG_ERROR, "No block with decorrelation weights\n"); - return -1; - } - if(!got_samples){ - av_log(avctx, AV_LOG_ERROR, "No block with decorrelation samples\n"); - return -1; - } - if(!got_entropy){ - av_log(avctx, AV_LOG_ERROR, "No block with entropy info\n"); - return -1; - } - if(s->hybrid && !got_hybrid){ - av_log(avctx, AV_LOG_ERROR, "Hybrid config not found\n"); - return -1; - } - if(!got_bs){ - av_log(avctx, AV_LOG_ERROR, "Packed samples not found\n"); - return -1; - } - if(!got_float && avctx->sample_fmt == AV_SAMPLE_FMT_FLT){ - av_log(avctx, AV_LOG_ERROR, "Float information not found\n"); - return -1; - } - if(s->got_extra_bits && avctx->sample_fmt != AV_SAMPLE_FMT_FLT){ - const int size = get_bits_left(&s->gb_extra_bits); - const int wanted = s->samples * s->extra_bits << s->stereo_in; - if(size < wanted){ - av_log(avctx, AV_LOG_ERROR, "Too small EXTRABITS\n"); - s->got_extra_bits = 0; - } - } - s->samples_left = s->samples; - }else{ - init_get_bits(&s->gb, orig_buf + s->sc.offset, s->sc.size); - skip_bits_long(&s->gb, s->sc.bits_used); - if(s->got_extra_bits){ - init_get_bits(&s->gb_extra_bits, orig_buf + s->extra_sc.offset, - s->extra_sc.size); - skip_bits_long(&s->gb_extra_bits, s->extra_sc.bits_used); + + if (!got_terms) { + av_log(avctx, AV_LOG_ERROR, "No block with decorrelation terms\n"); + return -1; + } + if (!got_weights) { + av_log(avctx, AV_LOG_ERROR, "No block with decorrelation weights\n"); + return -1; + } + if (!got_samples) { + av_log(avctx, AV_LOG_ERROR, "No block with decorrelation samples\n"); + return -1; + } + if (!got_entropy) { + av_log(avctx, AV_LOG_ERROR, "No block with entropy info\n"); + return -1; + } + if (s->hybrid && !got_hybrid) { + av_log(avctx, AV_LOG_ERROR, "Hybrid config not found\n"); + return -1; + } + if (!got_bs) { + av_log(avctx, AV_LOG_ERROR, "Packed samples not found\n"); + return -1; + } + if (!got_float && avctx->sample_fmt == AV_SAMPLE_FMT_FLT) { + av_log(avctx, AV_LOG_ERROR, "Float information not found\n"); + return -1; + } + if (s->got_extra_bits && avctx->sample_fmt != AV_SAMPLE_FMT_FLT) { + const int size = get_bits_left(&s->gb_extra_bits); + const int wanted = s->samples * s->extra_bits << s->stereo_in; + if (size < wanted) { + av_log(avctx, AV_LOG_ERROR, "Too small EXTRABITS\n"); + s->got_extra_bits = 0; } } - if(s->stereo_in){ - if(avctx->sample_fmt == AV_SAMPLE_FMT_S16) + if (s->stereo_in) { + if (avctx->sample_fmt == AV_SAMPLE_FMT_S16) samplecount = wv_unpack_stereo(s, &s->gb, samples, AV_SAMPLE_FMT_S16); - else if(avctx->sample_fmt == AV_SAMPLE_FMT_S32) + else if (avctx->sample_fmt == AV_SAMPLE_FMT_S32) samplecount = wv_unpack_stereo(s, &s->gb, samples, AV_SAMPLE_FMT_S32); else samplecount = wv_unpack_stereo(s, &s->gb, samples, AV_SAMPLE_FMT_FLT); + + if (samplecount < 0) + return -1; + samplecount >>= 1; - }else{ + } else { const int channel_stride = avctx->channels; - if(avctx->sample_fmt == AV_SAMPLE_FMT_S16) + if (avctx->sample_fmt == AV_SAMPLE_FMT_S16) samplecount = wv_unpack_mono(s, &s->gb, samples, AV_SAMPLE_FMT_S16); - else if(avctx->sample_fmt == AV_SAMPLE_FMT_S32) + else if (avctx->sample_fmt == AV_SAMPLE_FMT_S32) samplecount = wv_unpack_mono(s, &s->gb, samples, AV_SAMPLE_FMT_S32); else samplecount = wv_unpack_mono(s, &s->gb, samples, AV_SAMPLE_FMT_FLT); - if(s->stereo && avctx->sample_fmt == AV_SAMPLE_FMT_S16){ + if (samplecount < 0) + return -1; + + if (s->stereo && avctx->sample_fmt == AV_SAMPLE_FMT_S16) { int16_t *dst = (int16_t*)samples + 1; int16_t *src = (int16_t*)samples; int cnt = samplecount; - while(cnt--){ + while (cnt--) { *dst = *src; src += channel_stride; dst += channel_stride; } - }else if(s->stereo && avctx->sample_fmt == AV_SAMPLE_FMT_S32){ + } else if (s->stereo && avctx->sample_fmt == AV_SAMPLE_FMT_S32) { int32_t *dst = (int32_t*)samples + 1; int32_t *src = (int32_t*)samples; int cnt = samplecount; - while(cnt--){ + while (cnt--) { *dst = *src; src += channel_stride; dst += channel_stride; } - }else if(s->stereo){ + } else if (s->stereo) { float *dst = (float*)samples + 1; float *src = (float*)samples; int cnt = samplecount; - while(cnt--){ + while (cnt--) { *dst = *src; src += channel_stride; dst += channel_stride; @@ -1139,65 +1134,109 @@ } } - wc->samples_left = s->samples_left; + *got_frame_ptr = 1; return samplecount * bpp; } -static int wavpack_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static void wavpack_decode_flush(AVCodecContext *avctx) { WavpackContext *s = avctx->priv_data; + int i; + + for (i = 0; i < s->fdec_num; i++) + wv_reset_saved_context(s->fdec[i]); +} + +static int wavpack_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) +{ + WavpackContext *s = avctx->priv_data; const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; - int frame_size; + int buf_size = avpkt->size; + int frame_size, ret, frame_flags; int samplecount = 0; - s->block = 0; - s->samples_left = 0; + s->block = 0; s->ch_offset = 0; - if(s->mkv_mode){ - s->samples = AV_RL32(buf); buf += 4; + /* determine number of samples */ + if (s->mkv_mode) { + s->samples = AV_RL32(buf); buf += 4; + frame_flags = AV_RL32(buf); + } else { + if (s->multichannel) { + s->samples = AV_RL32(buf + 4); + frame_flags = AV_RL32(buf + 8); + } else { + s->samples = AV_RL32(buf); + frame_flags = AV_RL32(buf + 4); + } + } + if (s->samples <= 0) { + av_log(avctx, AV_LOG_ERROR, "Invalid number of samples: %d\n", + s->samples); + return AVERROR(EINVAL); + } + + if (frame_flags & 0x80) { + avctx->sample_fmt = AV_SAMPLE_FMT_FLT; + } else if ((frame_flags & 0x03) <= 1) { + avctx->sample_fmt = AV_SAMPLE_FMT_S16; + } else { + avctx->sample_fmt = AV_SAMPLE_FMT_S32; + } + + /* get output buffer */ + s->frame.nb_samples = s->samples; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; } - while(buf_size > 0){ - if(!s->multichannel){ + + while (buf_size > 0) { + if (!s->multichannel) { frame_size = buf_size; - }else{ - if(!s->mkv_mode){ + } else { + if (!s->mkv_mode) { frame_size = AV_RL32(buf) - 12; buf += 4; buf_size -= 4; - }else{ - if(buf_size < 12) //MKV files can have zero flags after last block + } else { + if (buf_size < 12) //MKV files can have zero flags after last block break; frame_size = AV_RL32(buf + 8) + 12; } } - if(frame_size < 0 || frame_size > buf_size){ - av_log(avctx, AV_LOG_ERROR, "Block %d has invalid size (size %d vs. %d bytes left)\n", - s->block, frame_size, buf_size); + if (frame_size < 0 || frame_size > buf_size) { + av_log(avctx, AV_LOG_ERROR, "Block %d has invalid size (size %d " + "vs. %d bytes left)\n", s->block, frame_size, buf_size); + wavpack_decode_flush(avctx); return -1; } - if((samplecount = wavpack_decode_block(avctx, s->block, data, - data_size, buf, frame_size)) < 0) + if ((samplecount = wavpack_decode_block(avctx, s->block, + s->frame.data[0], got_frame_ptr, + buf, frame_size)) < 0) { + wavpack_decode_flush(avctx); return -1; + } s->block++; buf += frame_size; buf_size -= frame_size; } - *data_size = samplecount * avctx->channels; - return s->samples_left > 0 ? 0 : avpkt->size; + if (*got_frame_ptr) + *(AVFrame *)data = s->frame; + + return avpkt->size; } AVCodec ff_wavpack_decoder = { - "wavpack", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_WAVPACK, - sizeof(WavpackContext), - wavpack_decode_init, - NULL, - wavpack_decode_end, - wavpack_decode_frame, - .capabilities = CODEC_CAP_SUBFRAMES, - .long_name = NULL_IF_CONFIG_SMALL("WavPack"), + .name = "wavpack", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_WAVPACK, + .priv_data_size = sizeof(WavpackContext), + .init = wavpack_decode_init, + .close = wavpack_decode_end, + .decode = wavpack_decode_frame, + .flush = wavpack_decode_flush, + .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("WavPack"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wma.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wma.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wma.c 2011-03-21 03:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wma.c 2012-01-11 00:34:30.000000000 +0000 @@ -137,6 +137,9 @@ /* compute MDCT block size */ s->frame_len_bits = ff_wma_get_frame_len_bits(s->sample_rate, s->version, 0); + s->next_block_len_bits = s->frame_len_bits; + s->prev_block_len_bits = s->frame_len_bits; + s->block_len_bits = s->frame_len_bits; s->frame_len = 1 << s->frame_len_bits; if (s->use_variable_block_len) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmadec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmadec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmadec.c 2011-05-01 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmadec.c 2012-01-11 00:34:30.000000000 +0000 @@ -124,6 +124,10 @@ } avctx->sample_fmt = AV_SAMPLE_FMT_S16; + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } @@ -797,14 +801,13 @@ return 0; } -static int wma_decode_superframe(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int wma_decode_superframe(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; WMACodecContext *s = avctx->priv_data; - int nb_frames, bit_offset, i, pos, len; + int nb_frames, bit_offset, i, pos, len, ret; uint8_t *q; int16_t *samples; @@ -818,20 +821,25 @@ return 0; buf_size = s->block_align; - samples = data; - init_get_bits(&s->gb, buf, buf_size*8); if (s->use_bit_reservoir) { /* read super frame header */ skip_bits(&s->gb, 4); /* super frame index */ - nb_frames = get_bits(&s->gb, 4) - 1; + nb_frames = get_bits(&s->gb, 4) - (s->last_superframe_len <= 0); + } else { + nb_frames = 1; + } - if((nb_frames+1) * s->nb_channels * s->frame_len * sizeof(int16_t) > *data_size){ - av_log(s->avctx, AV_LOG_ERROR, "Insufficient output space\n"); - goto fail; - } + /* get output buffer */ + s->frame.nb_samples = nb_frames * s->frame_len; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = (int16_t *)s->frame.data[0]; + if (s->use_bit_reservoir) { bit_offset = get_bits(&s->gb, s->byte_offset_bits + 3); if (s->last_superframe_len > 0) { @@ -860,6 +868,7 @@ if (wma_decode_frame(s, samples) < 0) goto fail; samples += s->nb_channels * s->frame_len; + nb_frames--; } /* read each frame starting from bit_offset */ @@ -888,10 +897,6 @@ s->last_superframe_len = len; memcpy(s->last_superframe, buf + pos, len); } else { - if(s->nb_channels * s->frame_len * sizeof(int16_t) > *data_size){ - av_log(s->avctx, AV_LOG_ERROR, "Insufficient output space\n"); - goto fail; - } /* single frame decode */ if (wma_decode_frame(s, samples) < 0) goto fail; @@ -900,7 +905,9 @@ //av_log(NULL, AV_LOG_ERROR, "%d %d %d %d outbytes:%d eaten:%d\n", s->frame_len_bits, s->block_len_bits, s->frame_len, s->block_len, (int8_t *)samples - (int8_t *)data, s->block_align); - *data_size = (int8_t *)samples - (int8_t *)data; + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return s->block_align; fail: /* when error, we reset the bit reservoir */ @@ -916,30 +923,28 @@ s->last_superframe_len= 0; } -AVCodec ff_wmav1_decoder = -{ - "wmav1", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_WMAV1, - sizeof(WMACodecContext), - wma_decode_init, - NULL, - ff_wma_end, - wma_decode_superframe, - .flush=flush, - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"), +AVCodec ff_wmav1_decoder = { + .name = "wmav1", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_WMAV1, + .priv_data_size = sizeof(WMACodecContext), + .init = wma_decode_init, + .close = ff_wma_end, + .decode = wma_decode_superframe, + .flush = flush, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"), }; -AVCodec ff_wmav2_decoder = -{ - "wmav2", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_WMAV2, - sizeof(WMACodecContext), - wma_decode_init, - NULL, - ff_wma_end, - wma_decode_superframe, - .flush=flush, - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"), +AVCodec ff_wmav2_decoder = { + .name = "wmav2", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_WMAV2, + .priv_data_size = sizeof(WMACodecContext), + .init = wma_decode_init, + .close = ff_wma_end, + .decode = wma_decode_superframe, + .flush = flush, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmaenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmaenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmaenc.c 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmaenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -311,7 +311,7 @@ put_bits(&s->pb, s->coef_vlcs[tindex]->huffbits[1], s->coef_vlcs[tindex]->huffcodes[1]); } if (s->version == 1 && s->nb_channels >= 2) { - align_put_bits(&s->pb); + avpriv_align_put_bits(&s->pb); } } return 0; @@ -327,7 +327,7 @@ return INT_MAX; } - align_put_bits(&s->pb); + avpriv_align_put_bits(&s->pb); return put_bits_count(&s->pb)/8 - s->block_align; } @@ -390,28 +390,26 @@ return put_bits_ptr(&s->pb) - s->pb.buf; } -AVCodec ff_wmav1_encoder = -{ - "wmav1", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_WMAV1, - sizeof(WMACodecContext), - encode_init, - encode_superframe, - ff_wma_end, - .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"), +AVCodec ff_wmav1_encoder = { + .name = "wmav1", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_WMAV1, + .priv_data_size = sizeof(WMACodecContext), + .init = encode_init, + .encode = encode_superframe, + .close = ff_wma_end, + .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"), }; -AVCodec ff_wmav2_encoder = -{ - "wmav2", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_WMAV2, - sizeof(WMACodecContext), - encode_init, - encode_superframe, - ff_wma_end, - .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"), +AVCodec ff_wmav2_encoder = { + .name = "wmav2", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_WMAV2, + .priv_data_size = sizeof(WMACodecContext), + .init = encode_init, + .encode = encode_superframe, + .close = ff_wma_end, + .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wma.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wma.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wma.h 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wma.h 2012-01-11 00:34:30.000000000 +0000 @@ -65,6 +65,7 @@ typedef struct WMACodecContext { AVCodecContext* avctx; + AVFrame frame; GetBitContext gb; PutBitContext pb; int sample_rate; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmaprodec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmaprodec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmaprodec.c 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmaprodec.c 2012-01-11 00:34:30.000000000 +0000 @@ -86,12 +86,15 @@ * subframe in order to reconstruct the output samples. */ +#include "libavutil/intfloat.h" +#include "libavutil/intreadwrite.h" #include "avcodec.h" #include "internal.h" #include "get_bits.h" #include "put_bits.h" #include "wmaprodata.h" #include "dsputil.h" +#include "fmtconvert.h" #include "sinewin.h" #include "wma.h" @@ -165,7 +168,9 @@ typedef struct WMAProDecodeCtx { /* generic decoder variables */ AVCodecContext* avctx; ///< codec context for av_log + AVFrame frame; ///< AVFrame for decoded output DSPContext dsp; ///< accelerated DSP functions + FmtConvertContext fmt_conv; uint8_t frame_data[MAX_FRAMESIZE + FF_INPUT_BUFFER_PADDING_SIZE];///< compressed frame data PutBitContext pb; ///< context for filling the frame_data buffer @@ -206,8 +211,6 @@ uint32_t frame_num; ///< current frame number (not used for decoding) GetBitContext gb; ///< bitstream reader context int buf_bit_size; ///< buffer size in bits - float* samples; ///< current samplebuffer pointer - float* samples_end; ///< maximum samplebuffer pointer uint8_t drc_gain; ///< gain for the DRC tool int8_t skip_frame; ///< skip output step int8_t parsed_all_subframes; ///< all subframes decoded? @@ -279,6 +282,7 @@ s->avctx = avctx; dsputil_init(&s->dsp, avctx); + ff_fmt_convert_init(&s->fmt_conv, avctx); init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE); avctx->sample_fmt = AV_SAMPLE_FMT_FLT; @@ -309,10 +313,6 @@ s->samples_per_frame = 1 << ff_wma_get_frame_len_bits(avctx->sample_rate, 3, s->decode_flags); - /** init previous block len */ - for (i = 0; i < avctx->channels; i++) - s->channel[i].prev_block_len = s->samples_per_frame; - /** subframe info */ log2_max_num_subframes = ((s->decode_flags & 0x38) >> 3); s->max_num_subframes = 1 << log2_max_num_subframes; @@ -332,6 +332,18 @@ s->num_channels = avctx->channels; + if (s->num_channels < 0) { + av_log(avctx, AV_LOG_ERROR, "invalid number of channels %d\n", s->num_channels); + return AVERROR_INVALIDDATA; + } else if (s->num_channels > WMAPRO_MAX_CHANNELS) { + av_log_ask_for_sample(avctx, "unsupported number of channels\n"); + return AVERROR_PATCHWELCOME; + } + + /** init previous block len */ + for (i = 0; i < s->num_channels; i++) + s->channel[i].prev_block_len = s->samples_per_frame; + /** extract lfe channel position */ s->lfe_channel = -1; @@ -343,14 +355,6 @@ } } - if (s->num_channels < 0) { - av_log(avctx, AV_LOG_ERROR, "invalid number of channels %d\n", s->num_channels); - return AVERROR_INVALIDDATA; - } else if (s->num_channels > WMAPRO_MAX_CHANNELS) { - av_log_ask_for_sample(avctx, "unsupported number of channels\n"); - return AVERROR_PATCHWELCOME; - } - INIT_VLC_STATIC(&sf_vlc, SCALEVLCBITS, HUFF_SCALE_SIZE, scale_huffbits, 1, 1, scale_huffcodes, 2, 2, 616); @@ -449,6 +453,10 @@ dump_context(s); avctx->channel_layout = channel_mask; + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; + return 0; } @@ -767,7 +775,7 @@ /* Integers 0..15 as single-precision floats. The table saves a costly int to float conversion, and storing the values as integers allows fast sign-flipping. */ - static const int fval_tab[16] = { + static const uint32_t fval_tab[16] = { 0x00000000, 0x3f800000, 0x40000000, 0x40400000, 0x40800000, 0x40a00000, 0x40c00000, 0x40e00000, 0x41000000, 0x41100000, 0x41200000, 0x41300000, @@ -799,7 +807,7 @@ 4 vector coded large values) */ while ((s->transmit_num_vec_coeffs || !rl_mode) && (cur_coeff + 3 < ci->num_vec_coeffs)) { - int vals[4]; + uint32_t vals[4]; int i; unsigned int idx; @@ -809,15 +817,15 @@ for (i = 0; i < 4; i += 2) { idx = get_vlc2(&s->gb, vec2_vlc.table, VLCBITS, VEC2MAXDEPTH); if (idx == HUFF_VEC2_SIZE - 1) { - int v0, v1; + uint32_t v0, v1; v0 = get_vlc2(&s->gb, vec1_vlc.table, VLCBITS, VEC1MAXDEPTH); if (v0 == HUFF_VEC1_SIZE - 1) v0 += ff_wma_get_large_val(&s->gb); v1 = get_vlc2(&s->gb, vec1_vlc.table, VLCBITS, VEC1MAXDEPTH); if (v1 == HUFF_VEC1_SIZE - 1) v1 += ff_wma_get_large_val(&s->gb); - ((float*)vals)[i ] = v0; - ((float*)vals)[i+1] = v1; + vals[i ] = av_float2int(v0); + vals[i+1] = av_float2int(v1); } else { vals[i] = fval_tab[symbol_to_vec2[idx] >> 4 ]; vals[i+1] = fval_tab[symbol_to_vec2[idx] & 0xF]; @@ -833,8 +841,8 @@ /** decode sign */ for (i = 0; i < 4; i++) { if (vals[i]) { - int sign = get_bits1(&s->gb) - 1; - *(uint32_t*)&ci->coeffs[cur_coeff] = vals[i] ^ sign<<31; + uint32_t sign = get_bits1(&s->gb) - 1; + AV_WN32A(&ci->coeffs[cur_coeff], vals[i] ^ sign << 31); num_zeros = 0; } else { ci->coeffs[cur_coeff] = 0; @@ -1275,21 +1283,15 @@ *@return 0 if the trailer bit indicates that this is the last frame, * 1 if there are additional frames */ -static int decode_frame(WMAProDecodeCtx *s) +static int decode_frame(WMAProDecodeCtx *s, int *got_frame_ptr) { + AVCodecContext *avctx = s->avctx; GetBitContext* gb = &s->gb; int more_frames = 0; int len = 0; - int i; - - /** check for potential output buffer overflow */ - if (s->num_channels * s->samples_per_frame > s->samples_end - s->samples) { - /** return an error if no frame could be decoded at all */ - av_log(s->avctx, AV_LOG_ERROR, - "not enough space for the output samples\n"); - s->packet_loss = 1; - return 0; - } + int i, ret; + const float *out_ptr[WMAPRO_MAX_CHANNELS]; + float *samples; /** get frame length */ if (s->len_prefix) @@ -1355,19 +1357,22 @@ } } + /* get output buffer */ + s->frame.nb_samples = s->samples_per_frame; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + s->packet_loss = 1; + return 0; + } + samples = (float *)s->frame.data[0]; + /** interleave samples and write them to the output buffer */ - for (i = 0; i < s->num_channels; i++) { - float* ptr = s->samples + i; - int incr = s->num_channels; - float* iptr = s->channel[i].out; - float* iend = iptr + s->samples_per_frame; - - // FIXME should create/use a DSP function here - while (iptr < iend) { - *ptr = *iptr++; - ptr += incr; - } + for (i = 0; i < s->num_channels; i++) + out_ptr[i] = s->channel[i].out; + s->fmt_conv.float_interleave(samples, out_ptr, s->samples_per_frame, + s->num_channels); + for (i = 0; i < s->num_channels; i++) { /** reuse second half of the IMDCT output for the next frame */ memcpy(&s->channel[i].out[0], &s->channel[i].out[s->samples_per_frame], @@ -1376,8 +1381,10 @@ if (s->skip_frame) { s->skip_frame = 0; - } else - s->samples += s->num_channels * s->samples_per_frame; + *got_frame_ptr = 0; + } else { + *got_frame_ptr = 1; + } if (s->len_prefix) { if (len != (get_bits_count(gb) - s->frame_offset) + 2) { @@ -1419,7 +1426,7 @@ *@param s codec context *@param gb bitstream reader context *@param len length of the partial frame - *@param append decides wether to reset the buffer or not + *@param append decides whether to reset the buffer or not */ static void save_bits(WMAProDecodeCtx *s, GetBitContext* gb, int len, int append) @@ -1446,14 +1453,14 @@ s->num_saved_bits += len; if (!append) { - ff_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), + avpriv_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), s->num_saved_bits); } else { int align = 8 - (get_bits_count(gb) & 7); align = FFMIN(align, len); put_bits(&s->pb, align, get_bits(gb, align)); len -= align; - ff_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), len); + avpriv_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), len); } skip_bits_long(gb, len); @@ -1474,8 +1481,8 @@ *@param avpkt input packet *@return number of bytes that were read from the input buffer */ -static int decode_packet(AVCodecContext *avctx, - void *data, int *data_size, AVPacket* avpkt) +static int decode_packet(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket* avpkt) { WMAProDecodeCtx *s = avctx->priv_data; GetBitContext* gb = &s->pgb; @@ -1484,9 +1491,7 @@ int num_bits_prev_frame; int packet_sequence_number; - s->samples = data; - s->samples_end = (float*)((int8_t*)data + *data_size); - *data_size = 0; + *got_frame_ptr = 0; if (s->packet_done || s->packet_loss) { s->packet_done = 0; @@ -1533,7 +1538,7 @@ /** decode the cross packet frame if it is valid */ if (!s->packet_loss) - decode_frame(s); + decode_frame(s, got_frame_ptr); } else if (s->num_saved_bits - s->frame_offset) { av_dlog(avctx, "ignoring %x previously saved bits\n", s->num_saved_bits - s->frame_offset); @@ -1556,7 +1561,7 @@ (frame_size = show_bits(gb, s->log2_frame_size)) && frame_size <= remaining_bits(s, gb)) { save_bits(s, gb, frame_size, 0); - s->packet_done = !decode_frame(s); + s->packet_done = !decode_frame(s, got_frame_ptr); } else if (!s->len_prefix && s->num_saved_bits > get_bits_count(&s->gb)) { /** when the frames do not have a length prefix, we don't know @@ -1566,7 +1571,7 @@ therefore we save the incoming packet first, then we append the "previous frame" data from the next packet so that we get a buffer that only contains full frames */ - s->packet_done = !decode_frame(s); + s->packet_done = !decode_frame(s, got_frame_ptr); } else s->packet_done = 1; } @@ -1578,10 +1583,14 @@ save_bits(s, gb, remaining_bits(s, gb), 0); } - *data_size = (int8_t *)s->samples - (int8_t *)data; s->packet_offset = get_bits_count(gb) & 7; + if (s->packet_loss) + return AVERROR_INVALIDDATA; + + if (*got_frame_ptr) + *(AVFrame *)data = s->frame; - return (s->packet_loss) ? AVERROR_INVALIDDATA : get_bits_count(gb) >> 3; + return get_bits_count(gb) >> 3; } /** @@ -1605,15 +1614,14 @@ *@brief wmapro decoder */ AVCodec ff_wmapro_decoder = { - "wmapro", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_WMAPRO, - sizeof(WMAProDecodeCtx), - decode_init, - NULL, - decode_end, - decode_packet, - .capabilities = CODEC_CAP_SUBFRAMES, + .name = "wmapro", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_WMAPRO, + .priv_data_size = sizeof(WMAProDecodeCtx), + .init = decode_init, + .close = decode_end, + .decode = decode_packet, + .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1, .flush= flush, .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 9 Professional"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmavoice.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmavoice.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmavoice.c 2011-05-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmavoice.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,8 @@ * @author Ronald S. Bultje */ +#define UNCHECKED_BITSTREAM_READER 1 + #include #include "avcodec.h" #include "get_bits.h" @@ -128,11 +130,10 @@ */ typedef struct { /** - * @defgroup struct_global Global values - * Global values, specified in the stream header / extradata or used - * all over. + * @name Global values specified in the stream header / extradata or used all over. * @{ */ + AVFrame frame; GetBitContext gb; ///< packet bitreader. During decoder init, ///< it contains the extradata from the ///< demuxer. During decoding, it contains @@ -182,14 +183,15 @@ /** * @} - * @defgroup struct_packet Packet values - * Packet values, specified in the packet header or related to a packet. + * + * @name Packet values specified in the packet header or related to a packet. + * * A packet is considered to be a single unit of data provided to this * decoder by the demuxer. * @{ */ int spillover_nbits; ///< number of bits of the previous packet's - ///< last superframe preceeding this + ///< last superframe preceding this ///< packet's first full superframe (useful ///< for re-synchronization also) int has_residual_lsps; ///< if set, superframes contain one set of @@ -213,7 +215,8 @@ /** * @} - * @defgroup struct_frame Frame and superframe values + * + * @name Frame and superframe values * Superframe and frame data - these can change from frame to frame, * although some of them do in that case serve as a cache / history for * the next frame or superframe. @@ -256,7 +259,9 @@ float synth_history[MAX_LSPS]; ///< see #excitation_history /** * @} - * @defgroup post_filter Postfilter values + * + * @name Postfilter values + * * Variables used for postfilter implementation, mostly history for * smoothing and so on, and context variables for FFT/iFFT. * @{ @@ -399,6 +404,10 @@ s->min_pitch_val = ((ctx->sample_rate << 8) / 400 + 50) >> 8; s->max_pitch_val = ((ctx->sample_rate << 8) * 37 / 2000 + 50) >> 8; pitch_range = s->max_pitch_val - s->min_pitch_val; + if (pitch_range <= 0) { + av_log(ctx, AV_LOG_ERROR, "Invalid pitch range; broken extradata?\n"); + return -1; + } s->pitch_nbits = av_ceil_log2(pitch_range); s->last_pitch_val = 40; s->last_acb_type = ACB_TYPE_NONE; @@ -420,6 +429,10 @@ s->block_conv_table[2] = (pitch_range * 44) >> 6; s->block_conv_table[3] = s->max_pitch_val - 1; s->block_delta_pitch_hrange = (pitch_range >> 3) & ~0xF; + if (s->block_delta_pitch_hrange <= 0) { + av_log(ctx, AV_LOG_ERROR, "Invalid delta pitch hrange; broken extradata?\n"); + return -1; + } s->block_delta_pitch_nbits = 1 + av_ceil_log2(s->block_delta_pitch_hrange); s->block_pitch_range = s->block_conv_table[2] + s->block_conv_table[3] + 1 + @@ -428,11 +441,14 @@ ctx->sample_fmt = AV_SAMPLE_FMT_FLT; + avcodec_get_frame_defaults(&s->frame); + ctx->coded_frame = &s->frame; + return 0; } /** - * @defgroup postfilter Postfilter functions + * @name Postfilter functions * Postfilter functions (gain control, wiener denoise filter, DC filter, * kalman smoothening, plus surrounding code to wrap it) * @{ @@ -825,7 +841,7 @@ } /** - * @defgroup lsp_dequant LSP dequantization routines + * @name LSP dequantization routines * LSP dequantization routines, for 10/16LSPs and independent/residual coding. * @note we assume enough bits are available, caller should check. * lsp10i() consumes 24 bits; lsp10r() consumes an additional 24 bits; @@ -969,7 +985,7 @@ /** * @} - * @defgroup aw Pitch-adaptive window coding functions + * @name Pitch-adaptive window coding functions * The next few functions are for pitch-adaptive window coding. * @{ */ @@ -1075,7 +1091,7 @@ int excl_range = s->aw_pulse_range; // always 16 or 24 uint16_t *use_mask_ptr = &use_mask[idx >> 4]; int first_sh = 16 - (idx & 15); - *use_mask_ptr++ &= 0xFFFF << first_sh; + *use_mask_ptr++ &= 0xFFFFu << first_sh; excl_range -= first_sh; if (excl_range >= 16) { *use_mask_ptr++ = 0; @@ -1715,8 +1731,7 @@ * @return 0 on success, <0 on error or 1 if there was not enough data to * fully parse the superframe */ -static int synth_superframe(AVCodecContext *ctx, - float *samples, int *data_size) +static int synth_superframe(AVCodecContext *ctx, int *got_frame_ptr) { WMAVoiceContext *s = ctx->priv_data; GetBitContext *gb = &s->gb, s_gb; @@ -1726,6 +1741,7 @@ wmavoice_mean_lsf16[s->lsp_def_mode] : wmavoice_mean_lsf10[s->lsp_def_mode]; float excitation[MAX_SIGNAL_HISTORY + MAX_SFRAMESIZE + 12]; float synth[MAX_LSPS + MAX_SFRAMESIZE]; + float *samples; memcpy(synth, s->synth_history, s->lsps * sizeof(*synth)); @@ -1738,7 +1754,10 @@ s->sframe_cache_size = 0; } - if ((res = check_bits_for_superframe(gb, s)) == 1) return 1; + if ((res = check_bits_for_superframe(gb, s)) == 1) { + *got_frame_ptr = 0; + return 1; + } /* First bit is speech/music bit, it differentiates between WMAVoice * speech samples (the actual codec) and WMAVoice music samples, which @@ -1779,7 +1798,16 @@ stabilize_lsps(lsps[n], s->lsps); } - /* Parse frames, optionally preceeded by per-frame (independent) LSPs. */ + /* get output buffer */ + s->frame.nb_samples = 480; + if ((res = ctx->get_buffer(ctx, &s->frame)) < 0) { + av_log(ctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return res; + } + s->frame.nb_samples = n_samples; + samples = (float *)s->frame.data[0]; + + /* Parse frames, optionally preceded by per-frame (independent) LSPs. */ for (n = 0; n < 3; n++) { if (!s->has_residual_lsps) { int m; @@ -1798,8 +1826,10 @@ &samples[n * MAX_FRAMESIZE], lsps[n], n == 0 ? s->prev_lsps : lsps[n - 1], &excitation[s->history_nsamples + n * MAX_FRAMESIZE], - &synth[s->lsps + n * MAX_FRAMESIZE]))) + &synth[s->lsps + n * MAX_FRAMESIZE]))) { + *got_frame_ptr = 0; return res; + } } /* Statistics? FIXME - we don't check for length, a slight overrun @@ -1810,8 +1840,7 @@ skip_bits(gb, 10 * (res + 1)); } - /* Specify nr. of output samples */ - *data_size = n_samples * sizeof(float); + *got_frame_ptr = 1; /* Update history */ memcpy(s->prev_lsps, lsps[2], @@ -1862,7 +1891,7 @@ * @param size size of the source data, in bytes * @param gb bit I/O context specifying the current position in the source. * data. This function might use this to align the bit position to - * a whole-byte boundary before calling #ff_copy_bits() on aligned + * a whole-byte boundary before calling #avpriv_copy_bits() on aligned * source data * @param nbits the amount of bits to copy from source to target * @@ -1878,10 +1907,12 @@ rmn_bits = rmn_bytes = get_bits_left(gb); if (rmn_bits < nbits) return; + if (nbits > pb->size_in_bits - put_bits_count(pb)) + return; rmn_bits &= 7; rmn_bytes >>= 3; if ((rmn_bits = FFMIN(rmn_bits, nbits)) > 0) put_bits(pb, rmn_bits, get_bits(gb, rmn_bits)); - ff_copy_bits(pb, data + size - rmn_bytes, + avpriv_copy_bits(pb, data + size - rmn_bytes, FFMIN(nbits - rmn_bits, rmn_bytes << 3)); } @@ -1897,28 +1928,22 @@ * For more information about frames, see #synth_superframe(). */ static int wmavoice_decode_packet(AVCodecContext *ctx, void *data, - int *data_size, AVPacket *avpkt) + int *got_frame_ptr, AVPacket *avpkt) { WMAVoiceContext *s = ctx->priv_data; GetBitContext *gb = &s->gb; int size, res, pos; - if (*data_size < 480 * sizeof(float)) { - av_log(ctx, AV_LOG_ERROR, - "Output buffer too small (%d given - %zu needed)\n", - *data_size, 480 * sizeof(float)); - return -1; - } - *data_size = 0; - /* Packets are sometimes a multiple of ctx->block_align, with a packet * header at each ctx->block_align bytes. However, Libav's ASF demuxer * feeds us ASF packets, which may concatenate multiple "codec" packets * in a single "muxer" packet, so we artificially emulate that by * capping the packet size at ctx->block_align. */ for (size = avpkt->size; size > ctx->block_align; size -= ctx->block_align); - if (!size) + if (!size) { + *got_frame_ptr = 0; return 0; + } init_get_bits(&s->gb, avpkt->data, size << 3); /* size == ctx->block_align is used to indicate whether we are dealing with @@ -1937,10 +1962,11 @@ copy_bits(&s->pb, avpkt->data, size, gb, s->spillover_nbits); flush_put_bits(&s->pb); s->sframe_cache_size += s->spillover_nbits; - if ((res = synth_superframe(ctx, data, data_size)) == 0 && - *data_size > 0) { + if ((res = synth_superframe(ctx, got_frame_ptr)) == 0 && + *got_frame_ptr) { cnt += s->spillover_nbits; s->skip_bits_next = cnt & 7; + *(AVFrame *)data = s->frame; return cnt >> 3; } else skip_bits_long (gb, s->spillover_nbits - cnt + @@ -1955,11 +1981,12 @@ s->sframe_cache_size = 0; s->skip_bits_next = 0; pos = get_bits_left(gb); - if ((res = synth_superframe(ctx, data, data_size)) < 0) { + if ((res = synth_superframe(ctx, got_frame_ptr)) < 0) { return res; - } else if (*data_size > 0) { + } else if (*got_frame_ptr) { int cnt = get_bits_count(gb); s->skip_bits_next = cnt & 7; + *(AVFrame *)data = s->frame; return cnt >> 3; } else if ((s->sframe_cache_size = pos) > 0) { /* rewind bit reader to start of last (incomplete) superframe... */ @@ -2020,15 +2047,14 @@ } AVCodec ff_wmavoice_decoder = { - "wmavoice", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_WMAVOICE, - sizeof(WMAVoiceContext), - wmavoice_decode_init, - NULL, - wmavoice_decode_end, - wmavoice_decode_packet, - CODEC_CAP_SUBFRAMES, + .name = "wmavoice", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_WMAVOICE, + .priv_data_size = sizeof(WMAVoiceContext), + .init = wmavoice_decode_init, + .close = wmavoice_decode_end, + .decode = wmavoice_decode_packet, + .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1, .flush = wmavoice_flush, .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Voice"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmv2dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmv2dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmv2dec.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmv2dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -32,7 +32,7 @@ static void parse_mb_skip(Wmv2Context * w){ int mb_x, mb_y; MpegEncContext * const s= &w->s; - uint32_t * const mb_type= s->current_picture_ptr->mb_type; + uint32_t * const mb_type = s->current_picture_ptr->f.mb_type; w->skip_type= get_bits(&s->gb, 2); switch(w->skip_type){ @@ -257,11 +257,11 @@ wrap = s->b8_stride; xy = s->block_index[0]; - mot_val = s->current_picture.motion_val[0][xy]; + mot_val = s->current_picture.f.motion_val[0][xy]; - A = s->current_picture.motion_val[0][xy - 1]; - B = s->current_picture.motion_val[0][xy - wrap]; - C = s->current_picture.motion_val[0][xy + 2 - wrap]; + A = s->current_picture.f.motion_val[0][xy - 1]; + B = s->current_picture.f.motion_val[0][xy - wrap]; + C = s->current_picture.f.motion_val[0][xy + 2 - wrap]; if(s->mb_x && !s->first_slice_line && !s->mspel && w->top_left_mv_flag) diff= FFMAX(FFABS(A[0] - B[0]), FFABS(A[1] - B[1])); @@ -343,7 +343,7 @@ if(w->j_type) return 0; if (s->pict_type == AV_PICTURE_TYPE_P) { - if(IS_SKIP(s->current_picture.mb_type[s->mb_y * s->mb_stride + s->mb_x])){ + if (IS_SKIP(s->current_picture.f.mb_type[s->mb_y * s->mb_stride + s->mb_x])) { /* skip mb */ s->mb_intra = 0; for(i=0;i<6;i++) @@ -471,15 +471,14 @@ } AVCodec ff_wmv2_decoder = { - "wmv2", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_WMV2, - sizeof(Wmv2Context), - wmv2_decode_init, - NULL, - wmv2_decode_end, - ff_h263_decode_frame, - CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, + .name = "wmv2", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_WMV2, + .priv_data_size = sizeof(Wmv2Context), + .init = wmv2_decode_init, + .close = wmv2_decode_end, + .decode = ff_h263_decode_frame, + .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, .max_lowres = 3, .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"), .pix_fmts= ff_pixfmt_list_420, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmv2enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmv2enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wmv2enc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wmv2enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -212,13 +212,13 @@ } AVCodec ff_wmv2_encoder = { - "wmv2", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_WMV2, - sizeof(Wmv2Context), - wmv2_encode_init, - MPV_encode_picture, - MPV_encode_end, + .name = "wmv2", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_WMV2, + .priv_data_size = sizeof(Wmv2Context), + .init = wmv2_encode_init, + .encode = MPV_encode_picture, + .close = MPV_encode_end, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 8"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wnv1.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wnv1.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/wnv1.c 2011-04-23 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/wnv1.c 2012-01-11 00:34:30.000000000 +0000 @@ -157,14 +157,13 @@ } AVCodec ff_wnv1_decoder = { - "wnv1", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_WNV1, - sizeof(WNV1Context), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "wnv1", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_WNV1, + .priv_data_size = sizeof(WNV1Context), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ws-snd1.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ws-snd1.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/ws-snd1.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/ws-snd1.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,98 +25,133 @@ /** * @file - * Westwood SNDx codecs. + * Westwood SNDx codecs * * Reference documents about VQA format and its audio codecs * can be found here: * http://www.multimedia.cx */ -static const int8_t ws_adpcm_2bit[] = { -2, -1, 0, 1}; static const int8_t ws_adpcm_4bit[] = { -9, -8, -6, -5, -4, -3, -2, -1, - 0, 1, 2, 3, 4, 5, 6, 8 }; + 0, 1, 2, 3, 4, 5, 6, 8 +}; -#define CLIP8(a) if(a>127)a=127;if(a<-128)a=-128; +typedef struct WSSndContext { + AVFrame frame; +} WSSndContext; -static av_cold int ws_snd_decode_init(AVCodecContext * avctx) +static av_cold int ws_snd_decode_init(AVCodecContext *avctx) { -// WSSNDContext *c = avctx->priv_data; + WSSndContext *s = avctx->priv_data; + + if (avctx->channels != 1) { + av_log_ask_for_sample(avctx, "unsupported number of channels\n"); + return AVERROR(EINVAL); + } + + avctx->sample_fmt = AV_SAMPLE_FMT_U8; + + avcodec_get_frame_defaults(&s->frame); + avctx->coded_frame = &s->frame; - avctx->sample_fmt = AV_SAMPLE_FMT_S16; return 0; } -static int ws_snd_decode_frame(AVCodecContext *avctx, - void *data, int *data_size, - AVPacket *avpkt) +static int ws_snd_decode_frame(AVCodecContext *avctx, void *data, + int *got_frame_ptr, AVPacket *avpkt) { + WSSndContext *s = avctx->priv_data; const uint8_t *buf = avpkt->data; - int buf_size = avpkt->size; -// WSSNDContext *c = avctx->priv_data; + int buf_size = avpkt->size; - int in_size, out_size; - int sample = 0; - int i; - short *samples = data; + int in_size, out_size, ret; + int sample = 128; + uint8_t *samples; + uint8_t *samples_end; if (!buf_size) return 0; + if (buf_size < 4) { + av_log(avctx, AV_LOG_ERROR, "packet is too small\n"); + return AVERROR(EINVAL); + } + out_size = AV_RL16(&buf[0]); - *data_size = out_size * 2; - in_size = AV_RL16(&buf[2]); + in_size = AV_RL16(&buf[2]); buf += 4; - if (out_size > *data_size) { - av_log(avctx, AV_LOG_ERROR, "Frame is too large to fit in buffer\n"); - return -1; - } if (in_size > buf_size) { av_log(avctx, AV_LOG_ERROR, "Frame data is larger than input buffer\n"); return -1; } + + /* get output buffer */ + s->frame.nb_samples = out_size; + if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + return ret; + } + samples = s->frame.data[0]; + samples_end = samples + out_size; + if (in_size == out_size) { - for (i = 0; i < out_size; i++) - *samples++ = (*buf++ - 0x80) << 8; + memcpy(samples, buf, out_size); + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; return buf_size; } - while (out_size > 0) { - int code; + while (samples < samples_end && buf - avpkt->data < buf_size) { + int code, smp, size; uint8_t count; - code = (*buf) >> 6; - count = (*buf) & 0x3F; + code = *buf >> 6; + count = *buf & 0x3F; buf++; - switch(code) { + + /* make sure we don't write past the output buffer */ + switch (code) { + case 0: smp = 4; break; + case 1: smp = 2; break; + case 2: smp = (count & 0x20) ? 1 : count + 1; break; + default: smp = count + 1; break; + } + if (samples_end - samples < smp) + break; + + /* make sure we don't read past the input buffer */ + size = ((code == 2 && (count & 0x20)) || code == 3) ? 0 : count + 1; + if ((buf - avpkt->data) + size > buf_size) + break; + + switch (code) { case 0: /* ADPCM 2-bit */ for (count++; count > 0; count--) { code = *buf++; - sample += ws_adpcm_2bit[code & 0x3]; - CLIP8(sample); - *samples++ = sample << 8; - sample += ws_adpcm_2bit[(code >> 2) & 0x3]; - CLIP8(sample); - *samples++ = sample << 8; - sample += ws_adpcm_2bit[(code >> 4) & 0x3]; - CLIP8(sample); - *samples++ = sample << 8; - sample += ws_adpcm_2bit[(code >> 6) & 0x3]; - CLIP8(sample); - *samples++ = sample << 8; - out_size -= 4; + sample += ( code & 0x3) - 2; + sample = av_clip_uint8(sample); + *samples++ = sample; + sample += ((code >> 2) & 0x3) - 2; + sample = av_clip_uint8(sample); + *samples++ = sample; + sample += ((code >> 4) & 0x3) - 2; + sample = av_clip_uint8(sample); + *samples++ = sample; + sample += (code >> 6) - 2; + sample = av_clip_uint8(sample); + *samples++ = sample; } break; case 1: /* ADPCM 4-bit */ for (count++; count > 0; count--) { code = *buf++; sample += ws_adpcm_4bit[code & 0xF]; - CLIP8(sample); - *samples++ = sample << 8; + sample = av_clip_uint8(sample); + *samples++ = sample; sample += ws_adpcm_4bit[code >> 4]; - CLIP8(sample); - *samples++ = sample << 8; - out_size -= 2; + sample = av_clip_uint8(sample); + *samples++ = sample; } break; case 2: /* no compression */ @@ -125,35 +160,35 @@ t = count; t <<= 3; sample += t >> 3; - *samples++ = sample << 8; - out_size--; + sample = av_clip_uint8(sample); + *samples++ = sample; } else { /* copy */ - for (count++; count > 0; count--) { - *samples++ = (*buf++ - 0x80) << 8; - out_size--; - } - sample = buf[-1] - 0x80; + memcpy(samples, buf, smp); + samples += smp; + buf += smp; + sample = buf[-1]; } break; default: /* run */ - for(count++; count > 0; count--) { - *samples++ = sample << 8; - out_size--; - } + memset(samples, sample, smp); + samples += smp; } } + s->frame.nb_samples = samples - s->frame.data[0]; + *got_frame_ptr = 1; + *(AVFrame *)data = s->frame; + return buf_size; } AVCodec ff_ws_snd1_decoder = { - "ws_snd1", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_WESTWOOD_SND1, - 0, - ws_snd_decode_init, - NULL, - NULL, - ws_snd_decode_frame, + .name = "ws_snd1", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_WESTWOOD_SND1, + .priv_data_size = sizeof(WSSndContext), + .init = ws_snd_decode_init, + .decode = ws_snd_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Westwood Audio (SND1)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/ac3dsp.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/ac3dsp.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/ac3dsp.asm 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/ac3dsp.asm 2012-01-11 00:34:30.000000000 +0000 @@ -32,6 +32,11 @@ pw_bap_mul1: dw 21846, 21846, 0, 32768, 21846, 21846, 0, 32768 pw_bap_mul2: dw 5, 7, 0, 7, 5, 7, 0, 7 +; used in ff_ac3_extract_exponents() +pd_1: times 4 dd 1 +pd_151: times 4 dd 151 +pb_shuf_4dwb: db 0, 4, 8, 12 + SECTION .text ;----------------------------------------------------------------------------- @@ -346,3 +351,100 @@ movd eax, m0 add eax, sumd RET + +;------------------------------------------------------------------------------ +; void ff_ac3_extract_exponents(uint8_t *exp, int32_t *coef, int nb_coefs) +;------------------------------------------------------------------------------ + +%macro PABSD_MMX 2 ; src/dst, tmp + pxor %2, %2 + pcmpgtd %2, %1 + pxor %1, %2 + psubd %1, %2 +%endmacro + +%macro PABSD_SSSE3 1-2 ; src/dst, unused + pabsd %1, %1 +%endmacro + +%ifdef HAVE_AMD3DNOW +INIT_MMX +cglobal ac3_extract_exponents_3dnow, 3,3,0, exp, coef, len + add expq, lenq + lea coefq, [coefq+4*lenq] + neg lenq + movq m3, [pd_1] + movq m4, [pd_151] +.loop: + movq m0, [coefq+4*lenq ] + movq m1, [coefq+4*lenq+8] + PABSD_MMX m0, m2 + PABSD_MMX m1, m2 + pslld m0, 1 + por m0, m3 + pi2fd m2, m0 + psrld m2, 23 + movq m0, m4 + psubd m0, m2 + pslld m1, 1 + por m1, m3 + pi2fd m2, m1 + psrld m2, 23 + movq m1, m4 + psubd m1, m2 + packssdw m0, m0 + packuswb m0, m0 + packssdw m1, m1 + packuswb m1, m1 + punpcklwd m0, m1 + movd [expq+lenq], m0 + add lenq, 4 + jl .loop + REP_RET +%endif + +%macro AC3_EXTRACT_EXPONENTS 1 +cglobal ac3_extract_exponents_%1, 3,3,5, exp, coef, len + add expq, lenq + lea coefq, [coefq+4*lenq] + neg lenq + mova m2, [pd_1] + mova m3, [pd_151] +%ifidn %1, ssse3 ; + movd m4, [pb_shuf_4dwb] +%endif +.loop: + ; move 4 32-bit coefs to xmm0 + mova m0, [coefq+4*lenq] + ; absolute value + PABSD m0, m1 + ; convert to float and extract exponents + pslld m0, 1 + por m0, m2 + cvtdq2ps m1, m0 + psrld m1, 23 + mova m0, m3 + psubd m0, m1 + ; move the lowest byte in each of 4 dwords to the low dword +%ifidn %1, ssse3 + pshufb m0, m4 +%else + packssdw m0, m0 + packuswb m0, m0 +%endif + movd [expq+lenq], m0 + + add lenq, 4 + jl .loop + REP_RET +%endmacro + +%ifdef HAVE_SSE +INIT_XMM +%define PABSD PABSD_MMX +AC3_EXTRACT_EXPONENTS sse2 +%ifdef HAVE_SSSE3 +%define PABSD PABSD_SSSE3 +AC3_EXTRACT_EXPONENTS ssse3 +%endif +%endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/ac3dsp_mmx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/ac3dsp_mmx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/ac3dsp_mmx.c 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/ac3dsp_mmx.c 2012-01-11 00:34:30.000000000 +0000 @@ -44,11 +44,15 @@ extern int ff_ac3_compute_mantissa_size_sse2(uint16_t mant_cnt[6][16]); +extern void ff_ac3_extract_exponents_3dnow(uint8_t *exp, int32_t *coef, int nb_coefs); +extern void ff_ac3_extract_exponents_sse2 (uint8_t *exp, int32_t *coef, int nb_coefs); +extern void ff_ac3_extract_exponents_ssse3(uint8_t *exp, int32_t *coef, int nb_coefs); + av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact) { +#if HAVE_YASM int mm_flags = av_get_cpu_flags(); -#if HAVE_YASM if (mm_flags & AV_CPU_FLAG_MMX) { c->ac3_exponent_min = ff_ac3_exponent_min_mmx; c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx; @@ -56,6 +60,7 @@ c->ac3_rshift_int32 = ff_ac3_rshift_int32_mmx; } if (mm_flags & AV_CPU_FLAG_3DNOW && HAVE_AMD3DNOW) { + c->extract_exponents = ff_ac3_extract_exponents_3dnow; if (!bit_exact) { c->float_to_fixed24 = ff_float_to_fixed24_3dnow; } @@ -72,6 +77,7 @@ c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_sse2; c->float_to_fixed24 = ff_float_to_fixed24_sse2; c->compute_mantissa_size = ff_ac3_compute_mantissa_size_sse2; + c->extract_exponents = ff_ac3_extract_exponents_sse2; if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) { c->ac3_lshift_int16 = ff_ac3_lshift_int16_sse2; c->ac3_rshift_int32 = ff_ac3_rshift_int32_sse2; @@ -79,6 +85,9 @@ } if (mm_flags & AV_CPU_FLAG_SSSE3 && HAVE_SSSE3) { c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_ssse3; + if (!(mm_flags & AV_CPU_FLAG_ATOM)) { + c->extract_exponents = ff_ac3_extract_exponents_ssse3; + } } #endif } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/cabac.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/cabac.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/cabac.h 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/cabac.h 2012-01-11 00:34:30.000000000 +0000 @@ -27,17 +27,17 @@ #include "config.h" #if HAVE_FAST_CMOV -#define BRANCHLESS_GET_CABAC_UPDATE(ret, cabac, statep, low, lowword, range, tmp)\ +#define BRANCHLESS_GET_CABAC_UPDATE(ret, statep, low, lowword, range, tmp)\ "mov "tmp" , %%ecx \n\t"\ "shl $17 , "tmp" \n\t"\ "cmp "low" , "tmp" \n\t"\ "cmova %%ecx , "range" \n\t"\ "sbb %%ecx , %%ecx \n\t"\ "and %%ecx , "tmp" \n\t"\ - "sub "tmp" , "low" \n\t"\ - "xor %%ecx , "ret" \n\t" + "xor %%ecx , "ret" \n\t"\ + "sub "tmp" , "low" \n\t" #else /* HAVE_FAST_CMOV */ -#define BRANCHLESS_GET_CABAC_UPDATE(ret, cabac, statep, low, lowword, range, tmp)\ +#define BRANCHLESS_GET_CABAC_UPDATE(ret, statep, low, lowword, range, tmp)\ "mov "tmp" , %%ecx \n\t"\ "shl $17 , "tmp" \n\t"\ "sub "low" , "tmp" \n\t"\ @@ -51,70 +51,62 @@ "xor "tmp" , "ret" \n\t" #endif /* HAVE_FAST_CMOV */ -#define BRANCHLESS_GET_CABAC(ret, cabac, statep, low, lowword, range, tmp, tmpbyte, byte) \ +#define BRANCHLESS_GET_CABAC(ret, statep, low, lowword, range, tmp, tmpbyte, byte) \ "movzbl "statep" , "ret" \n\t"\ "mov "range" , "tmp" \n\t"\ "and $0xC0 , "range" \n\t"\ "movzbl "MANGLE(ff_h264_lps_range)"("ret", "range", 2), "range" \n\t"\ "sub "range" , "tmp" \n\t"\ - BRANCHLESS_GET_CABAC_UPDATE(ret, cabac, statep, low, lowword, \ - range, tmp) \ + BRANCHLESS_GET_CABAC_UPDATE(ret, statep, low, lowword, range, tmp) \ "movzbl " MANGLE(ff_h264_norm_shift) "("range"), %%ecx \n\t"\ "shl %%cl , "range" \n\t"\ "movzbl "MANGLE(ff_h264_mlps_state)"+128("ret"), "tmp" \n\t"\ - "mov "tmpbyte" , "statep" \n\t"\ "shl %%cl , "low" \n\t"\ + "mov "tmpbyte" , "statep" \n\t"\ "test "lowword" , "lowword" \n\t"\ " jnz 1f \n\t"\ - "mov "byte"("cabac"), %%"REG_c" \n\t"\ + "mov "byte" , %%"REG_c" \n\t"\ + "add"OPSIZE" $2 , "byte" \n\t"\ "movzwl (%%"REG_c") , "tmp" \n\t"\ - "bswap "tmp" \n\t"\ - "shr $15 , "tmp" \n\t"\ - "sub $0xFFFF , "tmp" \n\t"\ - "add $2 , %%"REG_c" \n\t"\ - "mov %%"REG_c" , "byte "("cabac") \n\t"\ "lea -1("low") , %%ecx \n\t"\ "xor "low" , %%ecx \n\t"\ "shr $15 , %%ecx \n\t"\ + "bswap "tmp" \n\t"\ + "shr $15 , "tmp" \n\t"\ "movzbl " MANGLE(ff_h264_norm_shift) "(%%ecx), %%ecx \n\t"\ + "sub $0xFFFF , "tmp" \n\t"\ "neg %%ecx \n\t"\ "add $7 , %%ecx \n\t"\ "shl %%cl , "tmp" \n\t"\ "add "tmp" , "low" \n\t"\ "1: \n\t" -#if ARCH_X86 && HAVE_7REGS && !defined(BROKEN_RELOCATIONS) +#if HAVE_7REGS && !defined(BROKEN_RELOCATIONS) #define get_cabac_inline get_cabac_inline_x86 static av_always_inline int get_cabac_inline_x86(CABACContext *c, uint8_t *const state) { - int bit, low, range, tmp; + int bit, tmp; __asm__ volatile( - "movl %a6(%5), %2 \n\t" - "movl %a7(%5), %1 \n\t" - BRANCHLESS_GET_CABAC("%0", "%5", "(%4)", "%1", "%w1", "%2", - "%3", "%b3", "%a8") - "movl %2, %a6(%5) \n\t" - "movl %1, %a7(%5) \n\t" - - :"=&r"(bit), "=&r"(low), "=&r"(range), "=&q"(tmp) - :"r"(state), "r"(c), - "i"(offsetof(CABACContext, range)), "i"(offsetof(CABACContext, low)), - "i"(offsetof(CABACContext, bytestream)) + BRANCHLESS_GET_CABAC("%0", "(%5)", "%1", "%w1", "%2", + "%3", "%b3", "%4") + :"=&r"(bit), "+&r"(c->low), "+&r"(c->range), "=&q"(tmp), + "+m"(c->bytestream) + :"r"(state) : "%"REG_c, "memory" ); return bit & 1; } -#endif /* ARCH_X86 && HAVE_7REGS && !defined(BROKEN_RELOCATIONS) */ +#endif /* HAVE_7REGS && !defined(BROKEN_RELOCATIONS) */ #define get_cabac_bypass_sign get_cabac_bypass_sign_x86 static av_always_inline int get_cabac_bypass_sign_x86(CABACContext *c, int val) { x86_reg tmp; __asm__ volatile( - "movl %a3(%2), %k1 \n\t" - "movl %a4(%2), %%eax \n\t" + "movl %4, %k1 \n\t" + "movl %2, %%eax \n\t" "shl $17, %k1 \n\t" "add %%eax, %%eax \n\t" "sub %k1, %%eax \n\t" @@ -125,22 +117,20 @@ "sub %%edx, %%ecx \n\t" "test %%ax, %%ax \n\t" " jnz 1f \n\t" - "mov %a5(%2), %1 \n\t" + "mov %3, %1 \n\t" "subl $0xFFFF, %%eax \n\t" "movzwl (%1), %%edx \n\t" "bswap %%edx \n\t" "shrl $15, %%edx \n\t" "add $2, %1 \n\t" "addl %%edx, %%eax \n\t" - "mov %1, %a5(%2) \n\t" + "mov %1, %3 \n\t" "1: \n\t" - "movl %%eax, %a4(%2) \n\t" + "movl %%eax, %2 \n\t" - :"+c"(val), "=&r"(tmp) - :"r"(c), - "i"(offsetof(CABACContext, range)), "i"(offsetof(CABACContext, low)), - "i"(offsetof(CABACContext, bytestream)) - : "%eax", "%edx", "memory" + :"+c"(val), "=&r"(tmp), "+m"(c->low), "+m"(c->bytestream) + :"m"(c->range) + : "%eax", "%edx" ); return val; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/dct32_sse.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/dct32_sse.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/dct32_sse.asm 2011-05-25 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/dct32_sse.asm 2012-01-11 00:34:30.000000000 +0000 @@ -63,6 +63,13 @@ mulps %1, %3 %endmacro +%macro BUTTERFLY0_SSE2 5 + pshufd %4, %1, %5 + xorps %1, %2 + addps %1, %4 + mulps %1, %3 +%endmacro + %macro BUTTERFLY0_AVX 5 vshufps %4, %1, %1, %5 vxorps %1, %1, %2 @@ -405,18 +412,17 @@ INIT_XMM +%macro DCT32_FUNC 1 ; void ff_dct32_float_sse(FFTSample *out, const FFTSample *in) -cglobal dct32_float_sse, 2,3,16, out, in, tmp +cglobal dct32_float_%1, 2,3,16, out, in, tmp ; pass 1 movaps m0, [inq+0] - movaps m1, [inq+112] - shufps m1, m1, 0x1b + LOAD_INV m1, [inq+112] BUTTERFLY m0, m1, [ps_cos_vec], m3 movaps m7, [inq+64] - movaps m4, [inq+48] - shufps m4, m4, 0x1b + LOAD_INV m4, [inq+48] BUTTERFLY m7, m4, [ps_cos_vec+32], m3 ; pass 2 @@ -427,13 +433,11 @@ ; pass 1 movaps m1, [inq+16] - movaps m6, [inq+96] - shufps m6, m6, 0x1b + LOAD_INV m6, [inq+96] BUTTERFLY m1, m6, [ps_cos_vec+16], m3 movaps m4, [inq+80] - movaps m5, [inq+32] - shufps m5, m5, 0x1b + LOAD_INV m5, [inq+32] BUTTERFLY m4, m5, [ps_cos_vec+48], m3 ; pass 2 @@ -492,3 +496,20 @@ PASS5 PASS6 RET +%endmacro + +%macro LOAD_INV_SSE 2 + movaps %1, %2 + shufps %1, %1, 0x1b +%endmacro + +%define LOAD_INV LOAD_INV_SSE +DCT32_FUNC sse + +%macro LOAD_INV_SSE2 2 + pshufd %1, %2, 0x1b +%endmacro + +%define LOAD_INV LOAD_INV_SSE2 +%define BUTTERFLY0 BUTTERFLY0_SSE2 +DCT32_FUNC sse2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/dnxhd_mmx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/dnxhd_mmx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/dnxhd_mmx.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/dnxhd_mmx.c 2012-01-11 00:34:30.000000000 +0000 @@ -53,6 +53,7 @@ void ff_dnxhd_init_mmx(DNXHDEncContext *ctx) { if (av_get_cpu_flags() & AV_CPU_FLAG_SSE2) { - ctx->get_pixels_8x4_sym = get_pixels_8x4_sym_sse2; + if (ctx->cid_table->bit_depth == 8) + ctx->get_pixels_8x4_sym = get_pixels_8x4_sym_sse2; } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/dsputilenc_mmx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/dsputilenc_mmx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/dsputilenc_mmx.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/dsputilenc_mmx.c 2012-01-11 00:34:30.000000000 +0000 @@ -1098,10 +1098,12 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) { int mm_flags = av_get_cpu_flags(); + int bit_depth = avctx->bits_per_raw_sample; if (mm_flags & AV_CPU_FLAG_MMX) { const int dct_algo = avctx->dct_algo; - if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){ + if (avctx->bits_per_raw_sample <= 8 && + (dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX)) { if(mm_flags & AV_CPU_FLAG_SSE2){ c->fdct = ff_fdct_sse2; }else if(mm_flags & AV_CPU_FLAG_MMX2){ @@ -1111,7 +1113,8 @@ } } - c->get_pixels = get_pixels_mmx; + if (bit_depth <= 8) + c->get_pixels = get_pixels_mmx; c->diff_pixels = diff_pixels_mmx; c->pix_sum = pix_sum16_mmx; @@ -1158,7 +1161,8 @@ } if(mm_flags & AV_CPU_FLAG_SSE2){ - c->get_pixels = get_pixels_sse2; + if (bit_depth <= 8) + c->get_pixels = get_pixels_sse2; c->sum_abs_dctelem= sum_abs_dctelem_sse2; #if HAVE_YASM && HAVE_ALIGNED_STACK c->hadamard8_diff[0]= ff_hadamard8_diff16_sse2; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/dsputil_mmx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/dsputil_mmx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/dsputil_mmx.c 2011-06-19 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/dsputil_mmx.c 2012-01-11 00:34:30.000000000 +0000 @@ -42,7 +42,7 @@ DECLARE_ALIGNED(16, const uint64_t, ff_pdw_80000000)[2] = {0x8000000080000000ULL, 0x8000000080000000ULL}; -DECLARE_ALIGNED(8, const uint64_t, ff_pw_1 ) = 0x0001000100010001ULL; +DECLARE_ALIGNED(16, const xmm_reg, ff_pw_1 ) = {0x0001000100010001ULL, 0x0001000100010001ULL}; DECLARE_ALIGNED(16, const xmm_reg, ff_pw_2 ) = {0x0002000200020002ULL, 0x0002000200020002ULL}; DECLARE_ALIGNED(16, const xmm_reg, ff_pw_3 ) = {0x0003000300030003ULL, 0x0003000300030003ULL}; DECLARE_ALIGNED(16, const xmm_reg, ff_pw_4 ) = {0x0004000400040004ULL, 0x0004000400040004ULL}; @@ -64,6 +64,8 @@ DECLARE_ALIGNED(8, const uint64_t, ff_pw_96 ) = 0x0060006000600060ULL; DECLARE_ALIGNED(8, const uint64_t, ff_pw_128) = 0x0080008000800080ULL; DECLARE_ALIGNED(8, const uint64_t, ff_pw_255) = 0x00ff00ff00ff00ffULL; +DECLARE_ALIGNED(16, const xmm_reg, ff_pw_512) = {0x0200020002000200ULL, 0x0200020002000200ULL}; +DECLARE_ALIGNED(16, const xmm_reg, ff_pw_1019)= {0x03FB03FB03FB03FBULL, 0x03FB03FB03FB03FBULL}; DECLARE_ALIGNED(16, const xmm_reg, ff_pb_0 ) = {0x0000000000000000ULL, 0x0000000000000000ULL}; DECLARE_ALIGNED(16, const xmm_reg, ff_pb_1 ) = {0x0101010101010101ULL, 0x0101010101010101ULL}; @@ -456,12 +458,12 @@ "movdqu (%1,%3), %%xmm1 \n\t" "movdqu (%1,%3,2), %%xmm2 \n\t" "movdqu (%1,%4), %%xmm3 \n\t" + "lea (%1,%3,4), %1 \n\t" "movdqa %%xmm0, (%2) \n\t" "movdqa %%xmm1, (%2,%3) \n\t" "movdqa %%xmm2, (%2,%3,2) \n\t" "movdqa %%xmm3, (%2,%4) \n\t" "subl $4, %0 \n\t" - "lea (%1,%3,4), %1 \n\t" "lea (%2,%3,4), %2 \n\t" "jnz 1b \n\t" : "+g"(h), "+r" (pixels), "+r" (block) @@ -478,6 +480,7 @@ "movdqu (%1,%3), %%xmm1 \n\t" "movdqu (%1,%3,2), %%xmm2 \n\t" "movdqu (%1,%4), %%xmm3 \n\t" + "lea (%1,%3,4), %1 \n\t" "pavgb (%2), %%xmm0 \n\t" "pavgb (%2,%3), %%xmm1 \n\t" "pavgb (%2,%3,2), %%xmm2 \n\t" @@ -487,7 +490,6 @@ "movdqa %%xmm2, (%2,%3,2) \n\t" "movdqa %%xmm3, (%2,%4) \n\t" "subl $4, %0 \n\t" - "lea (%1,%3,4), %1 \n\t" "lea (%2,%3,4), %2 \n\t" "jnz 1b \n\t" : "+g"(h), "+r" (pixels), "+r" (block) @@ -602,7 +604,7 @@ dst[i] = src1[i] + src2[i]; } -#if HAVE_7REGS && HAVE_TEN_OPERANDS +#if HAVE_7REGS static void add_hfyu_median_prediction_cmov(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, int *left, int *left_top) { x86_reg w2 = -w; x86_reg x; @@ -1665,10 +1667,6 @@ QPEL_2TAP(avg_, 8, 3dnow) -#if 0 -static void just_return(void) { return; } -#endif - #if HAVE_YASM typedef void emu_edge_core_func (uint8_t *buf, const uint8_t *src, x86_reg linesize, x86_reg start_y, @@ -1879,7 +1877,7 @@ int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height) { gmc(dst, src, stride, h, ox, oy, dxx, dxy, dyx, dyy, shift, r, - width, height, &ff_emulated_edge_mc); + width, height, &ff_emulated_edge_mc_8); } #endif @@ -1899,29 +1897,17 @@ void ff_put_h264_chroma_mc8_mmx_rnd (uint8_t *dst, uint8_t *src, int stride, int h, int x, int y); -void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, uint8_t *src, - int stride, int h, int x, int y); void ff_avg_h264_chroma_mc8_mmx2_rnd (uint8_t *dst, uint8_t *src, int stride, int h, int x, int y); -void ff_avg_rv40_chroma_mc8_mmx2 (uint8_t *dst, uint8_t *src, - int stride, int h, int x, int y); void ff_avg_h264_chroma_mc8_3dnow_rnd (uint8_t *dst, uint8_t *src, int stride, int h, int x, int y); -void ff_avg_rv40_chroma_mc8_3dnow (uint8_t *dst, uint8_t *src, - int stride, int h, int x, int y); void ff_put_h264_chroma_mc4_mmx (uint8_t *dst, uint8_t *src, int stride, int h, int x, int y); -void ff_put_rv40_chroma_mc4_mmx (uint8_t *dst, uint8_t *src, - int stride, int h, int x, int y); void ff_avg_h264_chroma_mc4_mmx2 (uint8_t *dst, uint8_t *src, int stride, int h, int x, int y); -void ff_avg_rv40_chroma_mc4_mmx2 (uint8_t *dst, uint8_t *src, - int stride, int h, int x, int y); void ff_avg_h264_chroma_mc4_3dnow (uint8_t *dst, uint8_t *src, int stride, int h, int x, int y); -void ff_avg_rv40_chroma_mc4_3dnow (uint8_t *dst, uint8_t *src, - int stride, int h, int x, int y); void ff_put_h264_chroma_mc2_mmx2 (uint8_t *dst, uint8_t *src, int stride, int h, int x, int y); @@ -2429,10 +2415,24 @@ float ff_scalarproduct_float_sse(const float *v1, const float *v2, int order); +void ff_vector_clip_int32_mmx (int32_t *dst, const int32_t *src, int32_t min, + int32_t max, unsigned int len); +void ff_vector_clip_int32_sse2 (int32_t *dst, const int32_t *src, int32_t min, + int32_t max, unsigned int len); +void ff_vector_clip_int32_int_sse2(int32_t *dst, const int32_t *src, int32_t min, + int32_t max, unsigned int len); +void ff_vector_clip_int32_sse4 (int32_t *dst, const int32_t *src, int32_t min, + int32_t max, unsigned int len); + +extern void ff_butterflies_float_interleave_sse(float *dst, const float *src0, + const float *src1, int len); +extern void ff_butterflies_float_interleave_avx(float *dst, const float *src0, + const float *src1, int len); + void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) { int mm_flags = av_get_cpu_flags(); - const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8; + const int high_bit_depth = avctx->bits_per_raw_sample > 8; const int bit_depth = avctx->bits_per_raw_sample; if (avctx->dsp_mask) { @@ -2460,7 +2460,7 @@ if (mm_flags & AV_CPU_FLAG_MMX) { const int idct_algo= avctx->idct_algo; - if(avctx->lowres==0){ + if (avctx->lowres == 0 && avctx->bits_per_raw_sample <= 8) { if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SIMPLEMMX){ c->idct_put= ff_simple_idct_put_mmx; c->idct_add= ff_simple_idct_add_mmx; @@ -2563,13 +2563,12 @@ } #if HAVE_YASM - if (!high_bit_depth) { + if (!high_bit_depth && CONFIG_H264CHROMA) { c->put_h264_chroma_pixels_tab[0]= ff_put_h264_chroma_mc8_mmx_rnd; c->put_h264_chroma_pixels_tab[1]= ff_put_h264_chroma_mc4_mmx; } - c->put_rv40_chroma_pixels_tab[0]= ff_put_rv40_chroma_mc8_mmx; - c->put_rv40_chroma_pixels_tab[1]= ff_put_rv40_chroma_mc4_mmx; + c->vector_clip_int32 = ff_vector_clip_int32_mmx; #endif if (mm_flags & AV_CPU_FLAG_MMX2) { @@ -2616,56 +2615,65 @@ c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_mmx2; } -#define SET_QPEL_FUNCS(PFX, IDX, SIZE, CPU) \ - c->PFX ## _pixels_tab[IDX][ 0] = PFX ## SIZE ## _mc00_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][ 1] = PFX ## SIZE ## _mc10_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][ 2] = PFX ## SIZE ## _mc20_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][ 3] = PFX ## SIZE ## _mc30_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][ 4] = PFX ## SIZE ## _mc01_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][ 5] = PFX ## SIZE ## _mc11_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][ 6] = PFX ## SIZE ## _mc21_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][ 7] = PFX ## SIZE ## _mc31_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][ 8] = PFX ## SIZE ## _mc02_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][ 9] = PFX ## SIZE ## _mc12_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][10] = PFX ## SIZE ## _mc22_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][11] = PFX ## SIZE ## _mc32_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][12] = PFX ## SIZE ## _mc03_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][13] = PFX ## SIZE ## _mc13_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][14] = PFX ## SIZE ## _mc23_ ## CPU; \ - c->PFX ## _pixels_tab[IDX][15] = PFX ## SIZE ## _mc33_ ## CPU - - SET_QPEL_FUNCS(put_qpel, 0, 16, mmx2); - SET_QPEL_FUNCS(put_qpel, 1, 8, mmx2); - SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, mmx2); - SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, mmx2); - SET_QPEL_FUNCS(avg_qpel, 0, 16, mmx2); - SET_QPEL_FUNCS(avg_qpel, 1, 8, mmx2); +#define SET_QPEL_FUNCS(PFX, IDX, SIZE, CPU, PREFIX) \ + c->PFX ## _pixels_tab[IDX][ 0] = PREFIX ## PFX ## SIZE ## _mc00_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][ 1] = PREFIX ## PFX ## SIZE ## _mc10_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][ 2] = PREFIX ## PFX ## SIZE ## _mc20_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][ 3] = PREFIX ## PFX ## SIZE ## _mc30_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][ 4] = PREFIX ## PFX ## SIZE ## _mc01_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][ 5] = PREFIX ## PFX ## SIZE ## _mc11_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][ 6] = PREFIX ## PFX ## SIZE ## _mc21_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][ 7] = PREFIX ## PFX ## SIZE ## _mc31_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][ 8] = PREFIX ## PFX ## SIZE ## _mc02_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][ 9] = PREFIX ## PFX ## SIZE ## _mc12_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][10] = PREFIX ## PFX ## SIZE ## _mc22_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][11] = PREFIX ## PFX ## SIZE ## _mc32_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][12] = PREFIX ## PFX ## SIZE ## _mc03_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][13] = PREFIX ## PFX ## SIZE ## _mc13_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][14] = PREFIX ## PFX ## SIZE ## _mc23_ ## CPU; \ + c->PFX ## _pixels_tab[IDX][15] = PREFIX ## PFX ## SIZE ## _mc33_ ## CPU + + SET_QPEL_FUNCS(put_qpel, 0, 16, mmx2, ); + SET_QPEL_FUNCS(put_qpel, 1, 8, mmx2, ); + SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, mmx2, ); + SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, mmx2, ); + SET_QPEL_FUNCS(avg_qpel, 0, 16, mmx2, ); + SET_QPEL_FUNCS(avg_qpel, 1, 8, mmx2, ); if (!high_bit_depth) { - SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmx2); - SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmx2); - SET_QPEL_FUNCS(put_h264_qpel, 2, 4, mmx2); - SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, mmx2); - SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, mmx2); - SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, mmx2); + SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmx2, ); + SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmx2, ); + SET_QPEL_FUNCS(put_h264_qpel, 2, 4, mmx2, ); + SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, mmx2, ); + SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, mmx2, ); + SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, mmx2, ); + } + else if (bit_depth == 10) { +#if HAVE_YASM +#if !ARCH_X86_64 + SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_mmxext, ff_); + SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_mmxext, ff_); + SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_mmxext, ff_); + SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_mmxext, ff_); +#endif + SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 10_mmxext, ff_); + SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 10_mmxext, ff_); +#endif } - SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, mmx2); - SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, mmx2); - SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, mmx2); - SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, mmx2); + SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, mmx2, ); + SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, mmx2, ); + SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, mmx2, ); + SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, mmx2, ); #if HAVE_YASM - c->avg_rv40_chroma_pixels_tab[0]= ff_avg_rv40_chroma_mc8_mmx2; - c->avg_rv40_chroma_pixels_tab[1]= ff_avg_rv40_chroma_mc4_mmx2; - - if (!high_bit_depth) { + if (!high_bit_depth && CONFIG_H264CHROMA) { c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_mmx2_rnd; c->avg_h264_chroma_pixels_tab[1]= ff_avg_h264_chroma_mc4_mmx2; c->avg_h264_chroma_pixels_tab[2]= ff_avg_h264_chroma_mc2_mmx2; c->put_h264_chroma_pixels_tab[2]= ff_put_h264_chroma_mc2_mmx2; } - if (bit_depth == 10) { + if (bit_depth == 10 && CONFIG_H264CHROMA) { c->put_h264_chroma_pixels_tab[2]= ff_put_h264_chroma_mc2_10_mmxext; c->avg_h264_chroma_pixels_tab[2]= ff_avg_h264_chroma_mc2_10_mmxext; c->put_h264_chroma_pixels_tab[1]= ff_put_h264_chroma_mc4_10_mmxext; @@ -2674,13 +2682,13 @@ c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmx2; #endif -#if HAVE_7REGS && HAVE_TEN_OPERANDS - if( mm_flags&AV_CPU_FLAG_3DNOW ) +#if HAVE_7REGS + if (HAVE_AMD3DNOW && (mm_flags & AV_CPU_FLAG_3DNOW)) c->add_hfyu_median_prediction = add_hfyu_median_prediction_cmov; #endif c->add_png_paeth_prediction= add_png_paeth_prediction_mmx2; - } else if (mm_flags & AV_CPU_FLAG_3DNOW) { + } else if (HAVE_AMD3DNOW && (mm_flags & AV_CPU_FLAG_3DNOW)) { c->prefetch = prefetch_3dnow; if (!high_bit_depth) { @@ -2714,35 +2722,33 @@ c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_3dnow; } - SET_QPEL_FUNCS(put_qpel, 0, 16, 3dnow); - SET_QPEL_FUNCS(put_qpel, 1, 8, 3dnow); - SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, 3dnow); - SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, 3dnow); - SET_QPEL_FUNCS(avg_qpel, 0, 16, 3dnow); - SET_QPEL_FUNCS(avg_qpel, 1, 8, 3dnow); + SET_QPEL_FUNCS(put_qpel, 0, 16, 3dnow, ); + SET_QPEL_FUNCS(put_qpel, 1, 8, 3dnow, ); + SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, 3dnow, ); + SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, 3dnow, ); + SET_QPEL_FUNCS(avg_qpel, 0, 16, 3dnow, ); + SET_QPEL_FUNCS(avg_qpel, 1, 8, 3dnow, ); if (!high_bit_depth) { - SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 3dnow); - SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 3dnow); - SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 3dnow); - SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 3dnow); - SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 3dnow); - SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 3dnow); + SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 3dnow, ); + SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 3dnow, ); + SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 3dnow, ); + SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 3dnow, ); + SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 3dnow, ); + SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 3dnow, ); } - SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, 3dnow); - SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, 3dnow); - SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, 3dnow); - SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, 3dnow); + SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, 3dnow, ); + SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, 3dnow, ); + SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, 3dnow, ); + SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, 3dnow, ); #if HAVE_YASM - if (!high_bit_depth) { + if (!high_bit_depth && CONFIG_H264CHROMA) { c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_3dnow_rnd; c->avg_h264_chroma_pixels_tab[1]= ff_avg_h264_chroma_mc4_3dnow; } - c->avg_rv40_chroma_pixels_tab[0]= ff_avg_rv40_chroma_mc8_3dnow; - c->avg_rv40_chroma_pixels_tab[1]= ff_avg_rv40_chroma_mc4_3dnow; #endif } @@ -2763,23 +2769,38 @@ } if(mm_flags & AV_CPU_FLAG_SSE2){ if (!high_bit_depth) { - H264_QPEL_FUNCS(0, 1, sse2); - H264_QPEL_FUNCS(0, 2, sse2); - H264_QPEL_FUNCS(0, 3, sse2); - H264_QPEL_FUNCS(1, 1, sse2); - H264_QPEL_FUNCS(1, 2, sse2); - H264_QPEL_FUNCS(1, 3, sse2); - H264_QPEL_FUNCS(2, 1, sse2); - H264_QPEL_FUNCS(2, 2, sse2); - H264_QPEL_FUNCS(2, 3, sse2); - H264_QPEL_FUNCS(3, 1, sse2); - H264_QPEL_FUNCS(3, 2, sse2); - H264_QPEL_FUNCS(3, 3, sse2); + H264_QPEL_FUNCS(0, 1, sse2); + H264_QPEL_FUNCS(0, 2, sse2); + H264_QPEL_FUNCS(0, 3, sse2); + H264_QPEL_FUNCS(1, 1, sse2); + H264_QPEL_FUNCS(1, 2, sse2); + H264_QPEL_FUNCS(1, 3, sse2); + H264_QPEL_FUNCS(2, 1, sse2); + H264_QPEL_FUNCS(2, 2, sse2); + H264_QPEL_FUNCS(2, 3, sse2); + H264_QPEL_FUNCS(3, 1, sse2); + H264_QPEL_FUNCS(3, 2, sse2); + H264_QPEL_FUNCS(3, 3, sse2); } #if HAVE_YASM +#define H264_QPEL_FUNCS_10(x, y, CPU)\ + c->put_h264_qpel_pixels_tab[0][x+y*4] = ff_put_h264_qpel16_mc##x##y##_10_##CPU;\ + c->put_h264_qpel_pixels_tab[1][x+y*4] = ff_put_h264_qpel8_mc##x##y##_10_##CPU;\ + c->avg_h264_qpel_pixels_tab[0][x+y*4] = ff_avg_h264_qpel16_mc##x##y##_10_##CPU;\ + c->avg_h264_qpel_pixels_tab[1][x+y*4] = ff_avg_h264_qpel8_mc##x##y##_10_##CPU; if (bit_depth == 10) { - c->put_h264_chroma_pixels_tab[0]= ff_put_h264_chroma_mc8_10_sse2; - c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_10_sse2; + SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_sse2, ff_); + SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_sse2, ff_); + SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_sse2, ff_); + SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_sse2, ff_); + H264_QPEL_FUNCS_10(1, 0, sse2_cache64) + H264_QPEL_FUNCS_10(2, 0, sse2_cache64) + H264_QPEL_FUNCS_10(3, 0, sse2_cache64) + + if (CONFIG_H264CHROMA) { + c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_sse2; + c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_10_sse2; + } } #endif } @@ -2799,9 +2820,16 @@ H264_QPEL_FUNCS(3, 2, ssse3); H264_QPEL_FUNCS(3, 3, ssse3); } +#if HAVE_YASM + else if (bit_depth == 10) { + H264_QPEL_FUNCS_10(1, 0, ssse3_cache64) + H264_QPEL_FUNCS_10(2, 0, ssse3_cache64) + H264_QPEL_FUNCS_10(3, 0, ssse3_cache64) + } +#endif c->add_png_paeth_prediction= add_png_paeth_prediction_ssse3; #if HAVE_YASM - if (!high_bit_depth) { + if (!high_bit_depth && CONFIG_H264CHROMA) { c->put_h264_chroma_pixels_tab[0]= ff_put_h264_chroma_mc8_ssse3_rnd; c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_ssse3_rnd; c->put_h264_chroma_pixels_tab[1]= ff_put_h264_chroma_mc4_ssse3; @@ -2814,11 +2842,11 @@ } #endif - if(mm_flags & AV_CPU_FLAG_3DNOW){ + if (HAVE_AMD3DNOW && (mm_flags & AV_CPU_FLAG_3DNOW)) { c->vorbis_inverse_coupling = vorbis_inverse_coupling_3dnow; c->vector_fmul = vector_fmul_3dnow; } - if(mm_flags & AV_CPU_FLAG_3DNOWEXT){ + if (HAVE_AMD3DNOWEXT && (mm_flags & AV_CPU_FLAG_3DNOWEXT)) { c->vector_fmul_reverse = vector_fmul_reverse_3dnow2; #if HAVE_6REGS c->vector_fmul_window = vector_fmul_window_3dnow2; @@ -2847,14 +2875,24 @@ c->vector_clipf = vector_clipf_sse; #if HAVE_YASM c->scalarproduct_float = ff_scalarproduct_float_sse; + c->butterflies_float_interleave = ff_butterflies_float_interleave_sse; + + if (!high_bit_depth) + c->emulated_edge_mc = emulated_edge_mc_sse; + c->gmc = gmc_sse; #endif } - if(mm_flags & AV_CPU_FLAG_3DNOW) + if (HAVE_AMD3DNOW && (mm_flags & AV_CPU_FLAG_3DNOW)) c->vector_fmul_add = vector_fmul_add_3dnow; // faster than sse if(mm_flags & AV_CPU_FLAG_SSE2){ #if HAVE_YASM c->scalarproduct_int16 = ff_scalarproduct_int16_sse2; c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_sse2; + if (mm_flags & AV_CPU_FLAG_ATOM) { + c->vector_clip_int32 = ff_vector_clip_int32_int_sse2; + } else { + c->vector_clip_int32 = ff_vector_clip_int32_sse2; + } if (avctx->flags & CODEC_FLAG_BITEXACT) { c->apply_window_int16 = ff_apply_window_int16_sse2_ba; } else { @@ -2862,10 +2900,6 @@ c->apply_window_int16 = ff_apply_window_int16_sse2; } } - - if (!high_bit_depth) - c->emulated_edge_mc = emulated_edge_mc_sse; - c->gmc= gmc_sse; #endif } if (mm_flags & AV_CPU_FLAG_SSSE3) { @@ -2880,51 +2914,32 @@ } #endif } + + if (mm_flags & AV_CPU_FLAG_SSE4 && HAVE_SSE) { +#if HAVE_YASM + c->vector_clip_int32 = ff_vector_clip_int32_sse4; +#endif + } + #if HAVE_AVX && HAVE_YASM if (mm_flags & AV_CPU_FLAG_AVX) { if (bit_depth == 10) { - c->put_h264_chroma_pixels_tab[0]= ff_put_h264_chroma_mc8_10_avx; - c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_10_avx; + //AVX implies !cache64. + //TODO: Port cache(32|64) detection from x264. + H264_QPEL_FUNCS_10(1, 0, sse2) + H264_QPEL_FUNCS_10(2, 0, sse2) + H264_QPEL_FUNCS_10(3, 0, sse2) + + if (CONFIG_H264CHROMA) { + c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_avx; + c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_10_avx; + } } + c->butterflies_float_interleave = ff_butterflies_float_interleave_avx; } #endif } if (CONFIG_ENCODERS) dsputilenc_init_mmx(c, avctx); - -#if 0 - // for speed testing - get_pixels = just_return; - put_pixels_clamped = just_return; - add_pixels_clamped = just_return; - - pix_abs16x16 = just_return; - pix_abs16x16_x2 = just_return; - pix_abs16x16_y2 = just_return; - pix_abs16x16_xy2 = just_return; - - put_pixels_tab[0] = just_return; - put_pixels_tab[1] = just_return; - put_pixels_tab[2] = just_return; - put_pixels_tab[3] = just_return; - - put_no_rnd_pixels_tab[0] = just_return; - put_no_rnd_pixels_tab[1] = just_return; - put_no_rnd_pixels_tab[2] = just_return; - put_no_rnd_pixels_tab[3] = just_return; - - avg_pixels_tab[0] = just_return; - avg_pixels_tab[1] = just_return; - avg_pixels_tab[2] = just_return; - avg_pixels_tab[3] = just_return; - - avg_no_rnd_pixels_tab[0] = just_return; - avg_no_rnd_pixels_tab[1] = just_return; - avg_no_rnd_pixels_tab[2] = just_return; - avg_no_rnd_pixels_tab[3] = just_return; - - //av_fdct = just_return; - //ff_idct = just_return; -#endif } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/dsputil_yasm.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/dsputil_yasm.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/dsputil_yasm.asm 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/dsputil_yasm.asm 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ ;****************************************************************************** %include "x86inc.asm" +%include "x86util.asm" SECTION_RODATA pb_f: times 16 db 15 @@ -496,14 +497,14 @@ ; ... and then the same for left/right extend also. See below for loop ; function implementations. Fast are fixed-width, slow is variable-width -%macro EMU_EDGE_FUNC 1 +%macro EMU_EDGE_FUNC 0 %ifdef ARCH_X86_64 %define w_reg r10 -cglobal emu_edge_core_%1, 6, 7, 1 +cglobal emu_edge_core, 6, 7, 1 mov r11, r5 ; save block_h %else %define w_reg r6 -cglobal emu_edge_core_%1, 2, 7, 0 +cglobal emu_edge_core, 2, 7, 0 mov r4, r4m ; end_y mov r5, r5m ; block_h %endif @@ -629,18 +630,18 @@ ; - if (%2 & 3 == 3) fills 2 bytes into r6, and 1 into ebx ; - else fills remaining bytes into ebx ; writing data out is in the same way -%macro READ_NUM_BYTES 3 +%macro READ_NUM_BYTES 2 %assign %%src_off 0 ; offset in source buffer %assign %%smidx 0 ; mmx register idx %assign %%sxidx 0 ; xmm register idx -%ifnidn %3, mmx +%if cpuflag(sse) %rep %2/16 - movdqu xmm %+ %%sxidx, [r1+%%src_off] + movups xmm %+ %%sxidx, [r1+%%src_off] %assign %%src_off %%src_off+16 %assign %%sxidx %%sxidx+1 %endrep ; %2/16 -%endif ; !mmx +%endif %ifdef ARCH_X86_64 %if (%2-%%src_off) == 8 @@ -678,14 +679,14 @@ %endif ; (%2-%%src_off) == 1/2/3 %endmacro ; READ_NUM_BYTES -%macro WRITE_NUM_BYTES 3 +%macro WRITE_NUM_BYTES 2 %assign %%dst_off 0 ; offset in destination buffer %assign %%dmidx 0 ; mmx register idx %assign %%dxidx 0 ; xmm register idx -%ifnidn %3, mmx +%if cpuflag(sse) %rep %2/16 - movdqu [r0+%%dst_off], xmm %+ %%dxidx + movups [r0+%%dst_off], xmm %+ %%dxidx %assign %%dst_off %%dst_off+16 %assign %%dxidx %%dxidx+1 %endrep ; %2/16 @@ -733,7 +734,7 @@ ; those out into the destination buffer ; r0=buf,r1=src,r2=linesize,r3(64)/r3m(32)=start_x,r4=end_y,r5=block_h ; r6(eax/64)/r3(ebx/32)=val_reg -%macro VERTICAL_EXTEND 1 +%macro VERTICAL_EXTEND 0 %assign %%n 1 %rep 22 ALIGN 128 @@ -746,9 +747,9 @@ cmp dword r3m, 0 je .emuedge_copy_body_ %+ %%n %+ _loop %endif ; ARCH_X86_64/32 - READ_NUM_BYTES top, %%n, %1 ; read bytes + READ_NUM_BYTES top, %%n ; read bytes .emuedge_extend_top_ %+ %%n %+ _loop: ; do { - WRITE_NUM_BYTES top, %%n, %1 ; write bytes + WRITE_NUM_BYTES top, %%n ; write bytes add r0 , r2 ; dst += linesize %ifdef ARCH_X86_64 dec r3d @@ -759,8 +760,8 @@ ; copy body pixels .emuedge_copy_body_ %+ %%n %+ _loop: ; do { - READ_NUM_BYTES body, %%n, %1 ; read bytes - WRITE_NUM_BYTES body, %%n, %1 ; write bytes + READ_NUM_BYTES body, %%n ; read bytes + WRITE_NUM_BYTES body, %%n ; write bytes add r0 , r2 ; dst += linesize add r1 , r2 ; src += linesize dec r4d @@ -770,9 +771,9 @@ test r5 , r5 ; if (!block_h) jz .emuedge_v_extend_end_ %+ %%n ; goto end sub r1 , r2 ; src -= linesize - READ_NUM_BYTES bottom, %%n, %1 ; read bytes + READ_NUM_BYTES bottom, %%n ; read bytes .emuedge_extend_bottom_ %+ %%n %+ _loop: ; do { - WRITE_NUM_BYTES bottom, %%n, %1 ; write bytes + WRITE_NUM_BYTES bottom, %%n ; write bytes add r0 , r2 ; dst += linesize dec r5d jnz .emuedge_extend_bottom_ %+ %%n %+ _loop ; } while (--block_h) @@ -795,17 +796,17 @@ ; lowest two bytes of the register (so val*0x0101), and are splatted ; into each byte of mm0 as well if n_pixels >= 8 -%macro READ_V_PIXEL 3 +%macro READ_V_PIXEL 2 mov vall, %2 mov valh, vall %if %1 >= 8 movd mm0, vald -%ifidn %3, mmx +%if cpuflag(mmx2) + pshufw mm0, mm0, 0 +%else ; mmx punpcklwd mm0, mm0 punpckldq mm0, mm0 -%else ; !mmx - pshufw mm0, mm0, 0 -%endif ; mmx +%endif ; sse %endif ; %1 >= 8 %endmacro @@ -830,13 +831,13 @@ %endmacro ; r0=buf+block_h*linesize, r1=start_x, r2=linesize, r5=block_h, r6/r3=val -%macro LEFT_EXTEND 1 +%macro LEFT_EXTEND 0 %assign %%n 2 %rep 11 ALIGN 64 .emuedge_extend_left_ %+ %%n: ; do { sub r0, r2 ; dst -= linesize - READ_V_PIXEL %%n, [r0+r1], %1 ; read pixels + READ_V_PIXEL %%n, [r0+r1] ; read pixels WRITE_V_PIXEL %%n, r0 ; write pixels dec r5 jnz .emuedge_extend_left_ %+ %%n ; } while (--block_h) @@ -850,19 +851,19 @@ %endmacro ; LEFT_EXTEND ; r3/r0=buf+block_h*linesize, r2=linesize, r11/r5=block_h, r0/r6=end_x, r6/r3=val -%macro RIGHT_EXTEND 1 +%macro RIGHT_EXTEND 0 %assign %%n 2 %rep 11 ALIGN 64 .emuedge_extend_right_ %+ %%n: ; do { %ifdef ARCH_X86_64 sub r3, r2 ; dst -= linesize - READ_V_PIXEL %%n, [r3+w_reg-1], %1 ; read pixels + READ_V_PIXEL %%n, [r3+w_reg-1] ; read pixels WRITE_V_PIXEL %%n, r3+r4-%%n ; write pixels dec r11 %else ; ARCH_X86_32 sub r0, r2 ; dst -= linesize - READ_V_PIXEL %%n, [r0+w_reg-1], %1 ; read pixels + READ_V_PIXEL %%n, [r0+w_reg-1] ; read pixels WRITE_V_PIXEL %%n, r0+r4-%%n ; write pixels dec r5 %endif ; ARCH_X86_64/32 @@ -904,17 +905,17 @@ .%1_skip_%4_px: %endmacro -%macro V_COPY_ROW 3 +%macro V_COPY_ROW 2 %ifidn %1, bottom sub r1, linesize %endif .%1_copy_loop: xor cnt_reg, cnt_reg -%ifidn %3, mmx +%if notcpuflag(sse) %define linesize r2m V_COPY_NPX %1, mm0, movq, 8, 0xFFFFFFF8 -%else ; !mmx - V_COPY_NPX %1, xmm0, movdqu, 16, 0xFFFFFFF0 +%else ; sse + V_COPY_NPX %1, xmm0, movups, 16, 0xFFFFFFF0 %ifdef ARCH_X86_64 %define linesize r2 V_COPY_NPX %1, rax , mov, 8 @@ -922,7 +923,7 @@ %define linesize r2m V_COPY_NPX %1, mm0, movq, 8 %endif ; ARCH_X86_64/32 -%endif ; mmx +%endif ; sse V_COPY_NPX %1, vald, mov, 4 V_COPY_NPX %1, valw, mov, 2 V_COPY_NPX %1, vall, mov, 1 @@ -935,7 +936,7 @@ jnz .%1_copy_loop %endmacro -%macro SLOW_V_EXTEND 1 +%macro SLOW_V_EXTEND 0 .slow_v_extend_loop: ; r0=buf,r1=src,r2(64)/r2m(32)=linesize,r3(64)/r3m(32)=start_x,r4=end_y,r5=block_h ; r11(64)/r3(later-64)/r2(32)=cnt_reg,r6(64)/r3(32)=val_reg,r10(64)/r6(32)=w=end_x-start_x @@ -944,16 +945,16 @@ test r3, r3 %define cnt_reg r11 jz .do_body_copy ; if (!start_y) goto do_body_copy - V_COPY_ROW top, r3, %1 + V_COPY_ROW top, r3 %else cmp dword r3m, 0 %define cnt_reg r2 je .do_body_copy ; if (!start_y) goto do_body_copy - V_COPY_ROW top, dword r3m, %1 + V_COPY_ROW top, dword r3m %endif .do_body_copy: - V_COPY_ROW body, r4, %1 + V_COPY_ROW body, r4 %ifdef ARCH_X86_64 pop r11 ; restore old value of block_h @@ -965,7 +966,7 @@ %else jz .skip_bottom_extend %endif - V_COPY_ROW bottom, r5, %1 + V_COPY_ROW bottom, r5 %ifdef ARCH_X86_32 .skip_bottom_extend: mov r2, r2m @@ -973,12 +974,12 @@ jmp .v_extend_end %endmacro -%macro SLOW_LEFT_EXTEND 1 +%macro SLOW_LEFT_EXTEND 0 .slow_left_extend_loop: ; r0=buf+block_h*linesize,r2=linesize,r6(64)/r3(32)=val,r5=block_h,r4=cntr,r10/r6=start_x mov r4, 8 sub r0, linesize - READ_V_PIXEL 8, [r0+w_reg], %1 + READ_V_PIXEL 8, [r0+w_reg] .left_extend_8px_loop: movq [r0+r4-8], mm0 add r4, 8 @@ -1001,7 +1002,7 @@ jmp .right_extend %endmacro -%macro SLOW_RIGHT_EXTEND 1 +%macro SLOW_RIGHT_EXTEND 0 .slow_right_extend_loop: ; r3(64)/r0(32)=buf+block_h*linesize,r2=linesize,r4=block_w,r11(64)/r5(32)=block_h, ; r10(64)/r6(32)=end_x,r6/r3=val,r1=cntr @@ -1014,7 +1015,7 @@ %endif lea r1, [r4-8] sub buf_reg, linesize - READ_V_PIXEL 8, [buf_reg+w_reg-1], %1 + READ_V_PIXEL 8, [buf_reg+w_reg-1] .right_extend_8px_loop: movq [buf_reg+r1], mm0 sub r1, 8 @@ -1035,16 +1036,145 @@ %endmacro %macro emu_edge 1 -EMU_EDGE_FUNC %1 -VERTICAL_EXTEND %1 -LEFT_EXTEND %1 -RIGHT_EXTEND %1 -SLOW_V_EXTEND %1 -SLOW_LEFT_EXTEND %1 -SLOW_RIGHT_EXTEND %1 +INIT_XMM %1 +EMU_EDGE_FUNC +VERTICAL_EXTEND +LEFT_EXTEND +RIGHT_EXTEND +SLOW_V_EXTEND +SLOW_LEFT_EXTEND +SLOW_RIGHT_EXTEND %endmacro emu_edge sse %ifdef ARCH_X86_32 emu_edge mmx %endif + +;----------------------------------------------------------------------------- +; void ff_vector_clip_int32(int32_t *dst, const int32_t *src, int32_t min, +; int32_t max, unsigned int len) +;----------------------------------------------------------------------------- + +; %1 = number of xmm registers used +; %2 = number of inline load/process/store loops per asm loop +; %3 = process 4*mmsize (%3=0) or 8*mmsize (%3=1) bytes per loop +; %4 = CLIPD function takes min/max as float instead of int (CLIPD_SSE2) +; %5 = suffix +%macro VECTOR_CLIP_INT32 4-5 +cglobal vector_clip_int32%5, 5,5,%2, dst, src, min, max, len +%if %4 + cvtsi2ss m4, minm + cvtsi2ss m5, maxm +%else + movd m4, minm + movd m5, maxm +%endif + SPLATD m4 + SPLATD m5 +.loop: +%assign %%i 1 +%rep %2 + mova m0, [srcq+mmsize*0*%%i] + mova m1, [srcq+mmsize*1*%%i] + mova m2, [srcq+mmsize*2*%%i] + mova m3, [srcq+mmsize*3*%%i] +%if %3 + mova m7, [srcq+mmsize*4*%%i] + mova m8, [srcq+mmsize*5*%%i] + mova m9, [srcq+mmsize*6*%%i] + mova m10, [srcq+mmsize*7*%%i] +%endif + CLIPD m0, m4, m5, m6 + CLIPD m1, m4, m5, m6 + CLIPD m2, m4, m5, m6 + CLIPD m3, m4, m5, m6 +%if %3 + CLIPD m7, m4, m5, m6 + CLIPD m8, m4, m5, m6 + CLIPD m9, m4, m5, m6 + CLIPD m10, m4, m5, m6 +%endif + mova [dstq+mmsize*0*%%i], m0 + mova [dstq+mmsize*1*%%i], m1 + mova [dstq+mmsize*2*%%i], m2 + mova [dstq+mmsize*3*%%i], m3 +%if %3 + mova [dstq+mmsize*4*%%i], m7 + mova [dstq+mmsize*5*%%i], m8 + mova [dstq+mmsize*6*%%i], m9 + mova [dstq+mmsize*7*%%i], m10 +%endif +%assign %%i %%i+1 +%endrep + add srcq, mmsize*4*(%2+%3) + add dstq, mmsize*4*(%2+%3) + sub lend, mmsize*(%2+%3) + jg .loop + REP_RET +%endmacro + +INIT_MMX mmx +%define SPLATD SPLATD_MMX +%define CLIPD CLIPD_MMX +VECTOR_CLIP_INT32 0, 1, 0, 0 +INIT_XMM sse2 +%define SPLATD SPLATD_SSE2 +VECTOR_CLIP_INT32 6, 1, 0, 0, _int +%define CLIPD CLIPD_SSE2 +VECTOR_CLIP_INT32 6, 2, 0, 1 +INIT_XMM sse4 +%define CLIPD CLIPD_SSE41 +%ifdef m8 +VECTOR_CLIP_INT32 11, 1, 1, 0 +%else +VECTOR_CLIP_INT32 6, 1, 0, 0 +%endif + +;----------------------------------------------------------------------------- +; void ff_butterflies_float_interleave(float *dst, const float *src0, +; const float *src1, int len); +;----------------------------------------------------------------------------- + +%macro BUTTERFLIES_FLOAT_INTERLEAVE 0 +cglobal butterflies_float_interleave, 4,4,3, dst, src0, src1, len +%ifdef ARCH_X86_64 + movsxd lenq, lend +%endif + test lenq, lenq + jz .end + shl lenq, 2 + lea src0q, [src0q + lenq] + lea src1q, [src1q + lenq] + lea dstq, [ dstq + 2*lenq] + neg lenq +.loop: + mova m0, [src0q + lenq] + mova m1, [src1q + lenq] + subps m2, m0, m1 + addps m0, m0, m1 + unpcklps m1, m0, m2 + unpckhps m0, m0, m2 +%if cpuflag(avx) + vextractf128 [dstq + 2*lenq ], m1, 0 + vextractf128 [dstq + 2*lenq + 16], m0, 0 + vextractf128 [dstq + 2*lenq + 32], m1, 1 + vextractf128 [dstq + 2*lenq + 48], m0, 1 +%else + mova [dstq + 2*lenq ], m1 + mova [dstq + 2*lenq + mmsize], m0 +%endif + add lenq, mmsize + jl .loop +%if mmsize == 32 + vzeroupper + RET +%endif +.end: + REP_RET +%endmacro + +INIT_XMM sse +BUTTERFLIES_FLOAT_INTERLEAVE +INIT_YMM avx +BUTTERFLIES_FLOAT_INTERLEAVE diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fft_3dn2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fft_3dn2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fft_3dn2.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fft_3dn2.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,7 @@ #include "libavcodec/dsputil.h" #include "fft.h" -DECLARE_ALIGNED(8, static const int, m1m1)[2] = { 1<<31, 1<<31 }; +DECLARE_ALIGNED(8, static const unsigned int, m1m1)[2] = { 1U<<31, 1U<<31 }; #ifdef EMULATE_3DNOWEXT #define PSWAPD(s,d)\ @@ -70,7 +70,7 @@ in1 = input; in2 = input + n2 - 1; #ifdef EMULATE_3DNOWEXT - __asm__ volatile("movd %0, %%mm7" ::"r"(1<<31)); + __asm__ volatile("movd %0, %%mm7" ::"r"(1U<<31)); #endif for(k = 0; k < n4; k++) { // FIXME a single block is faster, but gcc 2.95 and 3.4.x on 32bit can't compile it diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fft.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fft.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fft.c 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fft.c 2012-01-11 00:34:30.000000000 +0000 @@ -60,6 +60,8 @@ int has_vectors = av_get_cpu_flags(); if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX) s->dct32 = ff_dct32_float_avx; + else if (has_vectors & AV_CPU_FLAG_SSE2 && HAVE_SSE) + s->dct32 = ff_dct32_float_sse2; else if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE) s->dct32 = ff_dct32_float_sse; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fft.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fft.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fft.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fft.h 2012-01-11 00:34:30.000000000 +0000 @@ -35,6 +35,7 @@ void ff_imdct_half_sse(FFTContext *s, FFTSample *output, const FFTSample *input); void ff_imdct_half_avx(FFTContext *s, FFTSample *output, const FFTSample *input); void ff_dct32_float_sse(FFTSample *out, const FFTSample *in); +void ff_dct32_float_sse2(FFTSample *out, const FFTSample *in); void ff_dct32_float_avx(FFTSample *out, const FFTSample *in); #endif /* AVCODEC_X86_FFT_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fft_sse.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fft_sse.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fft_sse.c 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fft_sse.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,8 +24,8 @@ #include "fft.h" #include "config.h" -DECLARE_ASM_CONST(16, int, ff_m1m1m1m1)[4] = - { 1 << 31, 1 << 31, 1 << 31, 1 << 31 }; +DECLARE_ASM_CONST(16, unsigned int, ff_m1m1m1m1)[4] = + { 1U << 31, 1U << 31, 1U << 31, 1U << 31 }; void ff_fft_dispatch_sse(FFTComplex *z, int nbits); void ff_fft_dispatch_interleave_sse(FFTComplex *z, int nbits); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fmtconvert.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fmtconvert.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fmtconvert.asm 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fmtconvert.asm 2012-01-11 00:34:30.000000000 +0000 @@ -24,6 +24,150 @@ SECTION_TEXT +;--------------------------------------------------------------------------------- +; void int32_to_float_fmul_scalar(float *dst, const int *src, float mul, int len); +;--------------------------------------------------------------------------------- +%macro INT32_TO_FLOAT_FMUL_SCALAR 2 +%ifdef UNIX64 +cglobal int32_to_float_fmul_scalar_%1, 3,3,%2, dst, src, len +%else +cglobal int32_to_float_fmul_scalar_%1, 4,4,%2, dst, src, mul, len +%endif +%ifdef WIN64 + SWAP 0, 2 +%elifdef ARCH_X86_32 + movss m0, mulm +%endif + SPLATD m0 + shl lenq, 2 + add srcq, lenq + add dstq, lenq + neg lenq +.loop: +%ifidn %1, sse2 + cvtdq2ps m1, [srcq+lenq ] + cvtdq2ps m2, [srcq+lenq+16] +%else + cvtpi2ps m1, [srcq+lenq ] + cvtpi2ps m3, [srcq+lenq+ 8] + cvtpi2ps m2, [srcq+lenq+16] + cvtpi2ps m4, [srcq+lenq+24] + movlhps m1, m3 + movlhps m2, m4 +%endif + mulps m1, m0 + mulps m2, m0 + mova [dstq+lenq ], m1 + mova [dstq+lenq+16], m2 + add lenq, 32 + jl .loop + REP_RET +%endmacro + +INIT_XMM +%define SPLATD SPLATD_SSE +%define movdqa movaps +INT32_TO_FLOAT_FMUL_SCALAR sse, 5 +%undef movdqa +%define SPLATD SPLATD_SSE2 +INT32_TO_FLOAT_FMUL_SCALAR sse2, 3 +%undef SPLATD + + +;------------------------------------------------------------------------------ +; void ff_float_to_int16(int16_t *dst, const float *src, long len); +;------------------------------------------------------------------------------ +%macro FLOAT_TO_INT16 2 +cglobal float_to_int16_%1, 3,3,%2, dst, src, len + add lenq, lenq + lea srcq, [srcq+2*lenq] + add dstq, lenq + neg lenq +.loop: +%ifidn %1, sse2 + cvtps2dq m0, [srcq+2*lenq ] + cvtps2dq m1, [srcq+2*lenq+16] + packssdw m0, m1 + mova [dstq+lenq], m0 +%else + cvtps2pi m0, [srcq+2*lenq ] + cvtps2pi m1, [srcq+2*lenq+ 8] + cvtps2pi m2, [srcq+2*lenq+16] + cvtps2pi m3, [srcq+2*lenq+24] + packssdw m0, m1 + packssdw m2, m3 + mova [dstq+lenq ], m0 + mova [dstq+lenq+8], m2 +%endif + add lenq, 16 + js .loop +%ifnidn %1, sse2 + emms +%endif + REP_RET +%endmacro + +INIT_XMM +FLOAT_TO_INT16 sse2, 2 +INIT_MMX +FLOAT_TO_INT16 sse, 0 +%define cvtps2pi pf2id +FLOAT_TO_INT16 3dnow, 0 +%undef cvtps2pi + + +;------------------------------------------------------------------------------- +; void ff_float_to_int16_interleave2(int16_t *dst, const float **src, long len); +;------------------------------------------------------------------------------- +%macro FLOAT_TO_INT16_INTERLEAVE2 1 +cglobal float_to_int16_interleave2_%1, 3,4,2, dst, src0, src1, len + lea lenq, [4*r2q] + mov src1q, [src0q+gprsize] + mov src0q, [src0q] + add dstq, lenq + add src0q, lenq + add src1q, lenq + neg lenq +.loop: +%ifidn %1, sse2 + cvtps2dq m0, [src0q+lenq] + cvtps2dq m1, [src1q+lenq] + packssdw m0, m1 + movhlps m1, m0 + punpcklwd m0, m1 + mova [dstq+lenq], m0 +%else + cvtps2pi m0, [src0q+lenq ] + cvtps2pi m1, [src0q+lenq+8] + cvtps2pi m2, [src1q+lenq ] + cvtps2pi m3, [src1q+lenq+8] + packssdw m0, m1 + packssdw m2, m3 + mova m1, m0 + punpcklwd m0, m2 + punpckhwd m1, m2 + mova [dstq+lenq ], m0 + mova [dstq+lenq+8], m1 +%endif + add lenq, 16 + js .loop +%ifnidn %1, sse2 + emms +%endif + REP_RET +%endmacro + +INIT_MMX +%define cvtps2pi pf2id +FLOAT_TO_INT16_INTERLEAVE2 3dnow +%undef cvtps2pi +%define movdqa movaps +FLOAT_TO_INT16_INTERLEAVE2 sse +%undef movdqa +INIT_XMM +FLOAT_TO_INT16_INTERLEAVE2 sse2 + + %macro PSWAPD_SSE 2 pshufw %1, %2, 0x4e %endmacro diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fmtconvert_mmx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fmtconvert_mmx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/fmtconvert_mmx.c 2011-05-19 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/fmtconvert_mmx.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,133 +26,32 @@ #include "libavutil/x86_cpu.h" #include "libavcodec/fmtconvert.h" -static void int32_to_float_fmul_scalar_sse(float *dst, const int *src, float mul, int len) -{ - x86_reg i = -4*len; - __asm__ volatile( - "movss %3, %%xmm4 \n" - "shufps $0, %%xmm4, %%xmm4 \n" - "1: \n" - "cvtpi2ps (%2,%0), %%xmm0 \n" - "cvtpi2ps 8(%2,%0), %%xmm1 \n" - "cvtpi2ps 16(%2,%0), %%xmm2 \n" - "cvtpi2ps 24(%2,%0), %%xmm3 \n" - "movlhps %%xmm1, %%xmm0 \n" - "movlhps %%xmm3, %%xmm2 \n" - "mulps %%xmm4, %%xmm0 \n" - "mulps %%xmm4, %%xmm2 \n" - "movaps %%xmm0, (%1,%0) \n" - "movaps %%xmm2, 16(%1,%0) \n" - "add $32, %0 \n" - "jl 1b \n" - :"+r"(i) - :"r"(dst+len), "r"(src+len), "m"(mul) - ); -} - -static void int32_to_float_fmul_scalar_sse2(float *dst, const int *src, float mul, int len) -{ - x86_reg i = -4*len; - __asm__ volatile( - "movss %3, %%xmm4 \n" - "shufps $0, %%xmm4, %%xmm4 \n" - "1: \n" - "cvtdq2ps (%2,%0), %%xmm0 \n" - "cvtdq2ps 16(%2,%0), %%xmm1 \n" - "mulps %%xmm4, %%xmm0 \n" - "mulps %%xmm4, %%xmm1 \n" - "movaps %%xmm0, (%1,%0) \n" - "movaps %%xmm1, 16(%1,%0) \n" - "add $32, %0 \n" - "jl 1b \n" - :"+r"(i) - :"r"(dst+len), "r"(src+len), "m"(mul) - ); -} - -static void float_to_int16_3dnow(int16_t *dst, const float *src, long len){ - x86_reg reglen = len; - // not bit-exact: pf2id uses different rounding than C and SSE - __asm__ volatile( - "add %0 , %0 \n\t" - "lea (%2,%0,2) , %2 \n\t" - "add %0 , %1 \n\t" - "neg %0 \n\t" - "1: \n\t" - "pf2id (%2,%0,2) , %%mm0 \n\t" - "pf2id 8(%2,%0,2) , %%mm1 \n\t" - "pf2id 16(%2,%0,2) , %%mm2 \n\t" - "pf2id 24(%2,%0,2) , %%mm3 \n\t" - "packssdw %%mm1 , %%mm0 \n\t" - "packssdw %%mm3 , %%mm2 \n\t" - "movq %%mm0 , (%1,%0) \n\t" - "movq %%mm2 , 8(%1,%0) \n\t" - "add $16 , %0 \n\t" - " js 1b \n\t" - "femms \n\t" - :"+r"(reglen), "+r"(dst), "+r"(src) - ); -} +#if HAVE_YASM -static void float_to_int16_sse(int16_t *dst, const float *src, long len){ - x86_reg reglen = len; - __asm__ volatile( - "add %0 , %0 \n\t" - "lea (%2,%0,2) , %2 \n\t" - "add %0 , %1 \n\t" - "neg %0 \n\t" - "1: \n\t" - "cvtps2pi (%2,%0,2) , %%mm0 \n\t" - "cvtps2pi 8(%2,%0,2) , %%mm1 \n\t" - "cvtps2pi 16(%2,%0,2) , %%mm2 \n\t" - "cvtps2pi 24(%2,%0,2) , %%mm3 \n\t" - "packssdw %%mm1 , %%mm0 \n\t" - "packssdw %%mm3 , %%mm2 \n\t" - "movq %%mm0 , (%1,%0) \n\t" - "movq %%mm2 , 8(%1,%0) \n\t" - "add $16 , %0 \n\t" - " js 1b \n\t" - "emms \n\t" - :"+r"(reglen), "+r"(dst), "+r"(src) - ); -} +void ff_int32_to_float_fmul_scalar_sse (float *dst, const int *src, float mul, int len); +void ff_int32_to_float_fmul_scalar_sse2(float *dst, const int *src, float mul, int len); -static void float_to_int16_sse2(int16_t *dst, const float *src, long len){ - x86_reg reglen = len; - __asm__ volatile( - "add %0 , %0 \n\t" - "lea (%2,%0,2) , %2 \n\t" - "add %0 , %1 \n\t" - "neg %0 \n\t" - "1: \n\t" - "cvtps2dq (%2,%0,2) , %%xmm0 \n\t" - "cvtps2dq 16(%2,%0,2) , %%xmm1 \n\t" - "packssdw %%xmm1 , %%xmm0 \n\t" - "movdqa %%xmm0 , (%1,%0) \n\t" - "add $16 , %0 \n\t" - " js 1b \n\t" - :"+r"(reglen), "+r"(dst), "+r"(src) - ); -} +void ff_float_to_int16_3dnow(int16_t *dst, const float *src, long len); +void ff_float_to_int16_sse (int16_t *dst, const float *src, long len); +void ff_float_to_int16_sse2 (int16_t *dst, const float *src, long len); + +void ff_float_to_int16_interleave2_3dnow(int16_t *dst, const float **src, long len); +void ff_float_to_int16_interleave2_sse (int16_t *dst, const float **src, long len); +void ff_float_to_int16_interleave2_sse2 (int16_t *dst, const float **src, long 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_3dn2(int16_t *dst, const float **src, int len); -#if !HAVE_YASM -#define ff_float_to_int16_interleave6_sse(a,b,c) float_to_int16_interleave_misc_sse(a,b,c,6) -#define ff_float_to_int16_interleave6_3dnow(a,b,c) float_to_int16_interleave_misc_3dnow(a,b,c,6) -#define ff_float_to_int16_interleave6_3dn2(a,b,c) float_to_int16_interleave_misc_3dnow(a,b,c,6) -#endif #define ff_float_to_int16_interleave6_sse2 ff_float_to_int16_interleave6_sse -#define FLOAT_TO_INT16_INTERLEAVE(cpu, body) \ +#define FLOAT_TO_INT16_INTERLEAVE(cpu) \ /* gcc pessimizes register allocation if this is in the same function as float_to_int16_interleave_sse2*/\ static av_noinline void float_to_int16_interleave_misc_##cpu(int16_t *dst, const float **src, long len, int channels){\ DECLARE_ALIGNED(16, int16_t, tmp)[len];\ int i,j,c;\ for(c=0; cfloat_interleave = float_interleave_mmx; -#endif - if(mm_flags & AV_CPU_FLAG_3DNOW){ + if (HAVE_AMD3DNOW && mm_flags & AV_CPU_FLAG_3DNOW) { if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ - c->float_to_int16 = float_to_int16_3dnow; + c->float_to_int16 = ff_float_to_int16_3dnow; c->float_to_int16_interleave = float_to_int16_interleave_3dnow; } } - if(mm_flags & AV_CPU_FLAG_3DNOWEXT){ + if (HAVE_AMD3DNOWEXT && mm_flags & AV_CPU_FLAG_3DNOWEXT) { if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ c->float_to_int16_interleave = float_to_int16_interleave_3dn2; } } - if(mm_flags & AV_CPU_FLAG_SSE){ - c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse; - c->float_to_int16 = float_to_int16_sse; + if (HAVE_SSE && mm_flags & AV_CPU_FLAG_SSE) { + c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse; + c->float_to_int16 = ff_float_to_int16_sse; c->float_to_int16_interleave = float_to_int16_interleave_sse; -#if HAVE_YASM c->float_interleave = float_interleave_sse; -#endif } - if(mm_flags & AV_CPU_FLAG_SSE2){ - c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse2; - c->float_to_int16 = float_to_int16_sse2; + if (HAVE_SSE && mm_flags & AV_CPU_FLAG_SSE2) { + c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse2; + c->float_to_int16 = ff_float_to_int16_sse2; c->float_to_int16_interleave = float_to_int16_interleave_sse2; } } +#endif } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_chromamc.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_chromamc.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_chromamc.asm 2011-05-15 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_chromamc.asm 2012-01-11 00:34:30.000000000 +0000 @@ -72,17 +72,17 @@ .next4rows movq mm0, [r1 ] movq mm1, [r1+r2] + add r1, r4 CHROMAMC_AVG mm0, [r0 ] CHROMAMC_AVG mm1, [r0+r2] movq [r0 ], mm0 movq [r0+r2], mm1 add r0, r4 - add r1, r4 movq mm0, [r1 ] movq mm1, [r1+r2] + add r1, r4 CHROMAMC_AVG mm0, [r0 ] CHROMAMC_AVG mm1, [r0+r2] - add r1, r4 movq [r0 ], mm0 movq [r0+r2], mm1 add r0, r4 @@ -472,8 +472,8 @@ mov r6d, r4d shl r4d, 8 sub r4, r6 - add r4, 8 ; x*288+8 = x<<8 | (8-x) mov r6, 8 + add r4, 8 ; x*288+8 = x<<8 | (8-x) sub r6d, r5d imul r6, r4 ; (8-y)*(x*255+8) = (8-y)*x<<8 | (8-y)*(8-x) imul r4d, r5d ; y *(x*255+8) = y *x<<8 | y *(8-x) @@ -481,24 +481,23 @@ movd m7, r6d movd m6, r4d movdqa m5, [rnd_2d_%2] + movq m0, [r1 ] + movq m1, [r1+1] pshuflw m7, m7, 0 pshuflw m6, m6, 0 + punpcklbw m0, m1 movlhps m7, m7 movlhps m6, m6 - movq m0, [r1 ] - movq m1, [r1 +1] - punpcklbw m0, m1 - add r1, r2 .next2rows - movq m1, [r1 ] - movq m2, [r1 +1] - movq m3, [r1+r2 ] - movq m4, [r1+r2+1] + movq m1, [r1+r2*1 ] + movq m2, [r1+r2*1+1] + movq m3, [r1+r2*2 ] + movq m4, [r1+r2*2+1] lea r1, [r1+r2*2] punpcklbw m1, m2 - punpcklbw m3, m4 movdqa m2, m1 + punpcklbw m3, m4 movdqa m4, m3 pmaddubsw m0, m7 pmaddubsw m1, m6 @@ -508,8 +507,8 @@ paddw m2, m5 paddw m1, m0 paddw m3, m2 - movdqa m0, m4 psrlw m1, 6 + movdqa m0, m4 psrlw m3, 6 %ifidn %1, avg movq m2, [r0 ] @@ -576,6 +575,7 @@ movq m1, [r1+r2 ] movdqa m2, m1 movq m3, [r1+r2*2] + lea r1, [r1+r2*2] punpcklbw m0, m1 punpcklbw m2, m3 pmaddubsw m0, m7 @@ -594,7 +594,6 @@ movhps [r0+r2], m0 sub r3d, 2 lea r0, [r0+r2*2] - lea r1, [r1+r2*2] jg .next2yrows REP_RET %endmacro @@ -607,8 +606,8 @@ mov r6, r4 shl r4d, 8 sub r4d, r6d - add r4d, 8 ; x*288+8 mov r6, 8 + add r4d, 8 ; x*288+8 sub r6d, r5d imul r6d, r4d ; (8-y)*(x*255+8) = (8-y)*x<<8 | (8-y)*(8-x) imul r4d, r5d ; y *(x*255+8) = y *x<<8 | y *(8-x) @@ -616,17 +615,16 @@ movd m7, r6d movd m6, r4d movq m5, [pw_32] + movd m0, [r1 ] pshufw m7, m7, 0 + punpcklbw m0, [r1+1] pshufw m6, m6, 0 - movd m0, [r1 ] - punpcklbw m0, [r1 +1] - add r1, r2 .next2rows - movd m1, [r1 ] - movd m3, [r1+r2 ] - punpcklbw m1, [r1 +1] - punpcklbw m3, [r1+r2+1] + movd m1, [r1+r2*1 ] + movd m3, [r1+r2*2 ] + punpcklbw m1, [r1+r2*1+1] + punpcklbw m3, [r1+r2*2+1] lea r1, [r1+r2*2] movq m2, m1 movq m4, m3 @@ -638,8 +636,8 @@ paddw m2, m5 paddw m1, m0 paddw m3, m2 - movq m0, m4 psrlw m1, 6 + movq m0, m4 psrlw m3, 6 packuswb m1, m1 packuswb m3, m3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_deblock.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_deblock.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_deblock.asm 2011-05-15 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_deblock.asm 2012-01-11 00:34:30.000000000 +0000 @@ -240,17 +240,17 @@ ; out: m1=p0' m2=q0' ; clobbers: m0,3-6 %macro DEBLOCK_P0_Q0 0 - pxor m5, m1, m2 ; p0^q0 - pand m5, [pb_1] ; (p0^q0)&1 pcmpeqb m4, m4 + pxor m5, m1, m2 ; p0^q0 pxor m3, m4 + pand m5, [pb_1] ; (p0^q0)&1 pavgb m3, m0 ; (p1 - q1 + 256)>>1 - pavgb m3, [pb_3] ; (((p1 - q1 + 256)>>1)+4)>>1 = 64+2+(p1-q1)>>2 pxor m4, m1 + pavgb m3, [pb_3] ; (((p1 - q1 + 256)>>1)+4)>>1 = 64+2+(p1-q1)>>2 pavgb m4, m2 ; (q0 - p0 + 256)>>1 pavgb m3, m5 - paddusb m3, m4 ; d+128+33 mova m6, [pb_A1] + paddusb m3, m4 ; d+128+33 psubusb m6, m3 psubusb m3, [pb_A1] pminub m6, m7 @@ -411,16 +411,16 @@ LOAD_MASK r2, r3 mov r3, r4mp + pcmpeqb m3, m3 movd m4, [r3] ; tc0 punpcklbw m4, m4 punpcklbw m4, m4 ; tc = 4x tc0[3], 4x tc0[2], 4x tc0[1], 4x tc0[0] mova [esp+%3], m4 ; tc - pcmpeqb m3, m3 pcmpgtb m4, m3 + mova m3, [r4] ; p2 pand m4, m7 mova [esp], m4 ; mask - mova m3, [r4] ; p2 DIFF_GT2 m1, m3, m5, m6, m7 ; |p2-p0| > beta-1 pand m6, m4 pand m4, [esp+%3] ; tc @@ -430,11 +430,10 @@ mova m4, [r0+2*r1] ; q2 DIFF_GT2 m2, m4, m5, m6, m3 ; |q2-q0| > beta-1 - mova m5, [esp] ; mask - pand m6, m5 + pand m6, [esp] ; mask mova m5, [esp+%3] ; tc - pand m5, m6 psubb m7, m6 + pand m5, m6 mova m3, [r0+r1] LUMA_Q1 m3, m4, [r0+2*r1], [r0+r1], m5, m6 @@ -482,10 +481,10 @@ ; transpose 16x4 -> original space (only the middle 4 rows were changed by the filter) mov r0, r0mp sub r0, 2 - lea r1, [r0+r4] movq m0, [pix_tmp+0x10] movq m1, [pix_tmp+0x20] + lea r1, [r0+r4] movq m2, [pix_tmp+0x30] movq m3, [pix_tmp+0x40] TRANSPOSE8x4B_STORE PASS8ROWS(r0, r1, r3, r4) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264dsp_mmx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264dsp_mmx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264dsp_mmx.c 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264dsp_mmx.c 2012-01-11 00:34:30.000000000 +0000 @@ -298,66 +298,57 @@ /***********************************/ /* weighted prediction */ -#define H264_WEIGHT(W, H, OPT) \ -void ff_h264_weight_ ## W ## x ## H ## _ ## OPT(uint8_t *dst, \ - int stride, int log2_denom, int weight, int offset); - -#define H264_BIWEIGHT(W, H, OPT) \ -void ff_h264_biweight_ ## W ## x ## H ## _ ## OPT(uint8_t *dst, \ - uint8_t *src, int stride, int log2_denom, int weightd, \ +#define H264_WEIGHT(W, OPT) \ +void ff_h264_weight_ ## W ## _ ## OPT(uint8_t *dst, \ + int stride, int height, int log2_denom, int weight, int offset); + +#define H264_BIWEIGHT(W, OPT) \ +void ff_h264_biweight_ ## W ## _ ## OPT(uint8_t *dst, \ + uint8_t *src, int stride, int height, int log2_denom, int weightd, \ int weights, int offset); -#define H264_BIWEIGHT_MMX(W,H) \ -H264_WEIGHT (W, H, mmx2) \ -H264_BIWEIGHT(W, H, mmx2) - -#define H264_BIWEIGHT_MMX_SSE(W,H) \ -H264_BIWEIGHT_MMX(W, H) \ -H264_WEIGHT (W, H, sse2) \ -H264_BIWEIGHT (W, H, sse2) \ -H264_BIWEIGHT (W, H, ssse3) - -H264_BIWEIGHT_MMX_SSE(16, 16) -H264_BIWEIGHT_MMX_SSE(16, 8) -H264_BIWEIGHT_MMX_SSE( 8, 16) -H264_BIWEIGHT_MMX_SSE( 8, 8) -H264_BIWEIGHT_MMX_SSE( 8, 4) -H264_BIWEIGHT_MMX ( 4, 8) -H264_BIWEIGHT_MMX ( 4, 4) -H264_BIWEIGHT_MMX ( 4, 2) - -#define H264_WEIGHT_10(W, H, DEPTH, OPT) \ -void ff_h264_weight_ ## W ## x ## H ## _ ## DEPTH ## _ ## OPT(uint8_t *dst, \ - int stride, int log2_denom, int weight, int offset); - -#define H264_BIWEIGHT_10(W, H, DEPTH, OPT) \ -void ff_h264_biweight_ ## W ## x ## H ## _ ## DEPTH ## _ ## OPT \ - (uint8_t *dst, uint8_t *src, int stride, int log2_denom, \ +#define H264_BIWEIGHT_MMX(W) \ +H264_WEIGHT (W, mmx2) \ +H264_BIWEIGHT(W, mmx2) + +#define H264_BIWEIGHT_MMX_SSE(W) \ +H264_BIWEIGHT_MMX(W) \ +H264_WEIGHT (W, sse2) \ +H264_BIWEIGHT (W, sse2) \ +H264_BIWEIGHT (W, ssse3) + +H264_BIWEIGHT_MMX_SSE(16) +H264_BIWEIGHT_MMX_SSE( 8) +H264_BIWEIGHT_MMX ( 4) + +#define H264_WEIGHT_10(W, DEPTH, OPT) \ +void ff_h264_weight_ ## W ## _ ## DEPTH ## _ ## OPT(uint8_t *dst, \ + int stride, int height, int log2_denom, int weight, int offset); + +#define H264_BIWEIGHT_10(W, DEPTH, OPT) \ +void ff_h264_biweight_ ## W ## _ ## DEPTH ## _ ## OPT \ + (uint8_t *dst, uint8_t *src, int stride, int height, int log2_denom, \ int weightd, int weights, int offset); -#define H264_BIWEIGHT_10_SSE(W, H, DEPTH) \ -H264_WEIGHT_10 (W, H, DEPTH, sse2) \ -H264_WEIGHT_10 (W, H, DEPTH, sse4) \ -H264_BIWEIGHT_10(W, H, DEPTH, sse2) \ -H264_BIWEIGHT_10(W, H, DEPTH, sse4) - -H264_BIWEIGHT_10_SSE(16, 16, 10) -H264_BIWEIGHT_10_SSE(16, 8, 10) -H264_BIWEIGHT_10_SSE( 8, 16, 10) -H264_BIWEIGHT_10_SSE( 8, 8, 10) -H264_BIWEIGHT_10_SSE( 8, 4, 10) -H264_BIWEIGHT_10_SSE( 4, 8, 10) -H264_BIWEIGHT_10_SSE( 4, 4, 10) -H264_BIWEIGHT_10_SSE( 4, 2, 10) +#define H264_BIWEIGHT_10_SSE(W, DEPTH) \ +H264_WEIGHT_10 (W, DEPTH, sse2) \ +H264_WEIGHT_10 (W, DEPTH, sse4) \ +H264_BIWEIGHT_10(W, DEPTH, sse2) \ +H264_BIWEIGHT_10(W, DEPTH, sse4) + +H264_BIWEIGHT_10_SSE(16, 10) +H264_BIWEIGHT_10_SSE( 8, 10) +H264_BIWEIGHT_10_SSE( 4, 10) -void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth) +void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) { int mm_flags = av_get_cpu_flags(); - if (bit_depth == 8) { - if (mm_flags & AV_CPU_FLAG_MMX2) { + if (chroma_format_idc == 1 && mm_flags & AV_CPU_FLAG_MMX2) { c->h264_loop_filter_strength= h264_loop_filter_strength_mmx2; } + + if (bit_depth == 8) { #if HAVE_YASM if (mm_flags & AV_CPU_FLAG_MMX) { c->h264_idct_dc_add = @@ -367,7 +358,8 @@ c->h264_idct_add16 = ff_h264_idct_add16_8_mmx; c->h264_idct8_add4 = ff_h264_idct8_add4_8_mmx; - c->h264_idct_add8 = ff_h264_idct_add8_8_mmx; + if (chroma_format_idc == 1) + c->h264_idct_add8 = ff_h264_idct_add8_8_mmx; c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmx; c->h264_luma_dc_dequant_idct= ff_h264_luma_dc_dequant_idct_mmx; @@ -376,57 +368,45 @@ c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmx2; c->h264_idct_add16 = ff_h264_idct_add16_8_mmx2; c->h264_idct8_add4 = ff_h264_idct8_add4_8_mmx2; - c->h264_idct_add8 = ff_h264_idct_add8_8_mmx2; + if (chroma_format_idc == 1) + c->h264_idct_add8 = ff_h264_idct_add8_8_mmx2; c->h264_idct_add16intra= ff_h264_idct_add16intra_8_mmx2; c->h264_v_loop_filter_chroma= ff_deblock_v_chroma_8_mmxext; - c->h264_h_loop_filter_chroma= ff_deblock_h_chroma_8_mmxext; c->h264_v_loop_filter_chroma_intra= ff_deblock_v_chroma_intra_8_mmxext; - c->h264_h_loop_filter_chroma_intra= ff_deblock_h_chroma_intra_8_mmxext; + if (chroma_format_idc == 1) { + c->h264_h_loop_filter_chroma= ff_deblock_h_chroma_8_mmxext; + c->h264_h_loop_filter_chroma_intra= ff_deblock_h_chroma_intra_8_mmxext; + } #if ARCH_X86_32 c->h264_v_loop_filter_luma= ff_deblock_v_luma_8_mmxext; c->h264_h_loop_filter_luma= ff_deblock_h_luma_8_mmxext; c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_mmxext; c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_mmxext; #endif - c->weight_h264_pixels_tab[0]= ff_h264_weight_16x16_mmx2; - c->weight_h264_pixels_tab[1]= ff_h264_weight_16x8_mmx2; - c->weight_h264_pixels_tab[2]= ff_h264_weight_8x16_mmx2; - c->weight_h264_pixels_tab[3]= ff_h264_weight_8x8_mmx2; - c->weight_h264_pixels_tab[4]= ff_h264_weight_8x4_mmx2; - c->weight_h264_pixels_tab[5]= ff_h264_weight_4x8_mmx2; - c->weight_h264_pixels_tab[6]= ff_h264_weight_4x4_mmx2; - c->weight_h264_pixels_tab[7]= ff_h264_weight_4x2_mmx2; - - c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_mmx2; - c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_mmx2; - c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_mmx2; - c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_mmx2; - c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_mmx2; - c->biweight_h264_pixels_tab[5]= ff_h264_biweight_4x8_mmx2; - c->biweight_h264_pixels_tab[6]= ff_h264_biweight_4x4_mmx2; - c->biweight_h264_pixels_tab[7]= ff_h264_biweight_4x2_mmx2; + c->weight_h264_pixels_tab[0]= ff_h264_weight_16_mmx2; + c->weight_h264_pixels_tab[1]= ff_h264_weight_8_mmx2; + c->weight_h264_pixels_tab[2]= ff_h264_weight_4_mmx2; + + c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16_mmx2; + c->biweight_h264_pixels_tab[1]= ff_h264_biweight_8_mmx2; + c->biweight_h264_pixels_tab[2]= ff_h264_biweight_4_mmx2; if (mm_flags&AV_CPU_FLAG_SSE2) { c->h264_idct8_add = ff_h264_idct8_add_8_sse2; c->h264_idct_add16 = ff_h264_idct_add16_8_sse2; c->h264_idct8_add4 = ff_h264_idct8_add4_8_sse2; - c->h264_idct_add8 = ff_h264_idct_add8_8_sse2; + if (chroma_format_idc == 1) + c->h264_idct_add8 = ff_h264_idct_add8_8_sse2; c->h264_idct_add16intra = ff_h264_idct_add16intra_8_sse2; c->h264_luma_dc_dequant_idct= ff_h264_luma_dc_dequant_idct_sse2; - c->weight_h264_pixels_tab[0]= ff_h264_weight_16x16_sse2; - c->weight_h264_pixels_tab[1]= ff_h264_weight_16x8_sse2; - c->weight_h264_pixels_tab[2]= ff_h264_weight_8x16_sse2; - c->weight_h264_pixels_tab[3]= ff_h264_weight_8x8_sse2; - c->weight_h264_pixels_tab[4]= ff_h264_weight_8x4_sse2; - - c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_sse2; - c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_sse2; - c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_sse2; - c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_sse2; - c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_sse2; + c->weight_h264_pixels_tab[0]= ff_h264_weight_16_sse2; + c->weight_h264_pixels_tab[1]= ff_h264_weight_8_sse2; + + c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16_sse2; + c->biweight_h264_pixels_tab[1]= ff_h264_biweight_8_sse2; #if HAVE_ALIGNED_STACK c->h264_v_loop_filter_luma = ff_deblock_v_luma_8_sse2; @@ -436,11 +416,8 @@ #endif } if (mm_flags&AV_CPU_FLAG_SSSE3) { - c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_ssse3; - c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_ssse3; - c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_ssse3; - c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_ssse3; - c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_ssse3; + c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16_ssse3; + c->biweight_h264_pixels_tab[1]= ff_h264_biweight_8_ssse3; } if (mm_flags&AV_CPU_FLAG_AVX) { #if HAVE_ALIGNED_STACK @@ -471,30 +448,21 @@ c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_sse2; c->h264_idct_add16 = ff_h264_idct_add16_10_sse2; - c->h264_idct_add8 = ff_h264_idct_add8_10_sse2; + if (chroma_format_idc == 1) + c->h264_idct_add8 = ff_h264_idct_add8_10_sse2; c->h264_idct_add16intra= ff_h264_idct_add16intra_10_sse2; #if HAVE_ALIGNED_STACK c->h264_idct8_add = ff_h264_idct8_add_10_sse2; c->h264_idct8_add4 = ff_h264_idct8_add4_10_sse2; #endif - c->weight_h264_pixels_tab[0] = ff_h264_weight_16x16_10_sse2; - c->weight_h264_pixels_tab[1] = ff_h264_weight_16x8_10_sse2; - c->weight_h264_pixels_tab[2] = ff_h264_weight_8x16_10_sse2; - c->weight_h264_pixels_tab[3] = ff_h264_weight_8x8_10_sse2; - c->weight_h264_pixels_tab[4] = ff_h264_weight_8x4_10_sse2; - c->weight_h264_pixels_tab[5] = ff_h264_weight_4x8_10_sse2; - c->weight_h264_pixels_tab[6] = ff_h264_weight_4x4_10_sse2; - c->weight_h264_pixels_tab[7] = ff_h264_weight_4x2_10_sse2; - - c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16x16_10_sse2; - c->biweight_h264_pixels_tab[1] = ff_h264_biweight_16x8_10_sse2; - c->biweight_h264_pixels_tab[2] = ff_h264_biweight_8x16_10_sse2; - c->biweight_h264_pixels_tab[3] = ff_h264_biweight_8x8_10_sse2; - c->biweight_h264_pixels_tab[4] = ff_h264_biweight_8x4_10_sse2; - c->biweight_h264_pixels_tab[5] = ff_h264_biweight_4x8_10_sse2; - c->biweight_h264_pixels_tab[6] = ff_h264_biweight_4x4_10_sse2; - c->biweight_h264_pixels_tab[7] = ff_h264_biweight_4x2_10_sse2; + c->weight_h264_pixels_tab[0] = ff_h264_weight_16_10_sse2; + c->weight_h264_pixels_tab[1] = ff_h264_weight_8_10_sse2; + c->weight_h264_pixels_tab[2] = ff_h264_weight_4_10_sse2; + + c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_10_sse2; + c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_10_sse2; + c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_10_sse2; c->h264_v_loop_filter_chroma= ff_deblock_v_chroma_10_sse2; c->h264_v_loop_filter_chroma_intra= ff_deblock_v_chroma_intra_10_sse2; @@ -506,23 +474,13 @@ #endif } if (mm_flags&AV_CPU_FLAG_SSE4) { - c->weight_h264_pixels_tab[0] = ff_h264_weight_16x16_10_sse4; - c->weight_h264_pixels_tab[1] = ff_h264_weight_16x8_10_sse4; - c->weight_h264_pixels_tab[2] = ff_h264_weight_8x16_10_sse4; - c->weight_h264_pixels_tab[3] = ff_h264_weight_8x8_10_sse4; - c->weight_h264_pixels_tab[4] = ff_h264_weight_8x4_10_sse4; - c->weight_h264_pixels_tab[5] = ff_h264_weight_4x8_10_sse4; - c->weight_h264_pixels_tab[6] = ff_h264_weight_4x4_10_sse4; - c->weight_h264_pixels_tab[7] = ff_h264_weight_4x2_10_sse4; - - c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16x16_10_sse4; - c->biweight_h264_pixels_tab[1] = ff_h264_biweight_16x8_10_sse4; - c->biweight_h264_pixels_tab[2] = ff_h264_biweight_8x16_10_sse4; - c->biweight_h264_pixels_tab[3] = ff_h264_biweight_8x8_10_sse4; - c->biweight_h264_pixels_tab[4] = ff_h264_biweight_8x4_10_sse4; - c->biweight_h264_pixels_tab[5] = ff_h264_biweight_4x8_10_sse4; - c->biweight_h264_pixels_tab[6] = ff_h264_biweight_4x4_10_sse4; - c->biweight_h264_pixels_tab[7] = ff_h264_biweight_4x2_10_sse4; + c->weight_h264_pixels_tab[0] = ff_h264_weight_16_10_sse4; + c->weight_h264_pixels_tab[1] = ff_h264_weight_8_10_sse4; + c->weight_h264_pixels_tab[2] = ff_h264_weight_4_10_sse4; + + c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_10_sse4; + c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_10_sse4; + c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_10_sse4; } #if HAVE_AVX if (mm_flags&AV_CPU_FLAG_AVX) { @@ -531,7 +489,8 @@ c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_avx; c->h264_idct_add16 = ff_h264_idct_add16_10_avx; - c->h264_idct_add8 = ff_h264_idct_add8_10_avx; + if (chroma_format_idc == 1) + c->h264_idct_add8 = ff_h264_idct_add8_10_avx; c->h264_idct_add16intra= ff_h264_idct_add16intra_10_avx; #if HAVE_ALIGNED_STACK c->h264_idct8_add = ff_h264_idct8_add_10_avx; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_i386.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_i386.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_i386.h 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_i386.h 2012-01-11 00:34:30.000000000 +0000 @@ -36,7 +36,7 @@ //FIXME use some macros to avoid duplicating get_cabac (cannot be done yet //as that would make optimization work hard) -#if ARCH_X86 && HAVE_7REGS && !defined(BROKEN_RELOCATIONS) +#if HAVE_7REGS && !defined(BROKEN_RELOCATIONS) static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *significant_coeff_ctx_base, int *index, x86_reg last_off){ @@ -45,23 +45,18 @@ int minusindex= 4-(intptr_t)index; int bit; x86_reg coeff_count; - int low; - int range; __asm__ volatile( - "movl %a11(%6), %5 \n\t" - "movl %a12(%6), %3 \n\t" - "2: \n\t" - BRANCHLESS_GET_CABAC("%4", "%6", "(%1)", "%3", - "%w3", "%5", "%k0", "%b0", "%a13") + BRANCHLESS_GET_CABAC("%4", "(%1)", "%3", + "%w3", "%5", "%k0", "%b0", "%6") "test $1, %4 \n\t" " jz 3f \n\t" "add %10, %1 \n\t" - BRANCHLESS_GET_CABAC("%4", "%6", "(%1)", "%3", - "%w3", "%5", "%k0", "%b0", "%a13") + BRANCHLESS_GET_CABAC("%4", "(%1)", "%3", + "%w3", "%5", "%k0", "%b0", "%6") "sub %10, %1 \n\t" "mov %2, %0 \n\t" @@ -72,8 +67,7 @@ "test $1, %4 \n\t" " jnz 4f \n\t" - "add $4, %0 \n\t" - "mov %0, %2 \n\t" + "add"OPSIZE" $4, %2 \n\t" "3: \n\t" "add $1, %1 \n\t" @@ -86,14 +80,10 @@ "4: \n\t" "add %9, %k0 \n\t" "shr $2, %k0 \n\t" - - "movl %5, %a11(%6) \n\t" - "movl %3, %a12(%6) \n\t" :"=&q"(coeff_count), "+r"(significant_coeff_ctx_base), "+m"(index), - "=&r"(low), "=&r"(bit), "=&r"(range) - :"r"(c), "m"(minusstart), "m"(end), "m"(minusindex), "m"(last_off), - "i"(offsetof(CABACContext, range)), "i"(offsetof(CABACContext, low)), - "i"(offsetof(CABACContext, bytestream)) + "+&r"(c->low), "=&r"(bit), "+&r"(c->range), + "+m"(c->bytestream) + :"m"(minusstart), "m"(end), "m"(minusindex), "m"(last_off) : "%"REG_c, "memory" ); return coeff_count; @@ -101,18 +91,13 @@ static int decode_significance_8x8_x86(CABACContext *c, uint8_t *significant_coeff_ctx_base, - int *index, x86_reg last_off, const uint8_t *sig_off){ + int *index, uint8_t *last_coeff_ctx_base, const uint8_t *sig_off){ int minusindex= 4-(intptr_t)index; int bit; x86_reg coeff_count; - int low; - int range; x86_reg last=0; x86_reg state; __asm__ volatile( - "movl %a12(%7), %5 \n\t" - "movl %a13(%7), %3 \n\t" - "mov %1, %6 \n\t" "2: \n\t" @@ -120,19 +105,18 @@ "movzbl (%0, %6), %k6 \n\t" "add %9, %6 \n\t" - BRANCHLESS_GET_CABAC("%4", "%7", "(%6)", "%3", - "%w3", "%5", "%k0", "%b0", "%a14") + BRANCHLESS_GET_CABAC("%4", "(%6)", "%3", + "%w3", "%5", "%k0", "%b0", "%7") "mov %1, %k6 \n\t" "test $1, %4 \n\t" " jz 3f \n\t" "movzbl "MANGLE(last_coeff_flag_offset_8x8)"(%k6), %k6\n\t" - "add %9, %6 \n\t" "add %11, %6 \n\t" - BRANCHLESS_GET_CABAC("%4", "%7", "(%6)", "%3", - "%w3", "%5", "%k0", "%b0", "%a14") + BRANCHLESS_GET_CABAC("%4", "(%6)", "%3", + "%w3", "%5", "%k0", "%b0", "%7") "mov %2, %0 \n\t" "mov %1, %k6 \n\t" @@ -141,8 +125,7 @@ "test $1, %4 \n\t" " jnz 4f \n\t" - "add $4, %0 \n\t" - "mov %0, %2 \n\t" + "add"OPSIZE" $4, %2 \n\t" "3: \n\t" "addl $1, %k6 \n\t" @@ -154,18 +137,13 @@ "4: \n\t" "addl %8, %k0 \n\t" "shr $2, %k0 \n\t" - - "movl %5, %a12(%7) \n\t" - "movl %3, %a13(%7) \n\t" - :"=&q"(coeff_count),"+m"(last), "+m"(index), "=&r"(low), "=&r"(bit), - "=&r"(range), "=&r"(state) - :"r"(c), "m"(minusindex), "m"(significant_coeff_ctx_base), "m"(sig_off), "m"(last_off), - "i"(offsetof(CABACContext, range)), "i"(offsetof(CABACContext, low)), - "i"(offsetof(CABACContext, bytestream)) + :"=&q"(coeff_count),"+m"(last), "+m"(index), "+&r"(c->low), "=&r"(bit), + "+&r"(c->range), "=&r"(state), "+m"(c->bytestream) + :"m"(minusindex), "m"(significant_coeff_ctx_base), "m"(sig_off), "m"(last_coeff_ctx_base) : "%"REG_c, "memory" ); return coeff_count; } -#endif /* ARCH_X86 && HAVE_7REGS && !defined(BROKEN_RELOCATIONS) */ +#endif /* HAVE_7REGS && !defined(BROKEN_RELOCATIONS) */ #endif /* AVCODEC_X86_H264_I386_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_idct.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_idct.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_idct.asm 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_idct.asm 2012-01-11 00:34:30.000000000 +0000 @@ -82,10 +82,10 @@ RET %macro IDCT8_1D 2 - mova m4, m5 mova m0, m1 - psraw m4, 1 psraw m1, 1 + mova m4, m5 + psraw m4, 1 paddw m4, m5 paddw m1, m0 paddw m4, m7 @@ -95,16 +95,16 @@ psubw m0, m3 psubw m5, m3 + psraw m3, 1 paddw m0, m7 psubw m5, m7 - psraw m3, 1 psraw m7, 1 psubw m0, m3 psubw m5, m7 - mova m3, m4 mova m7, m1 psraw m1, 2 + mova m3, m4 psraw m3, 2 paddw m3, m0 psraw m0, 2 @@ -113,12 +113,12 @@ psubw m0, m4 psubw m7, m5 - mova m4, m2 mova m5, m6 - psraw m4, 1 psraw m6, 1 - psubw m4, m5 + mova m4, m2 + psraw m4, 1 paddw m6, m2 + psubw m4, m5 mova m2, %1 mova m5, %2 @@ -337,7 +337,7 @@ test r6, r6 jz .skipblock mov r6d, dword [r1+r5*4] - lea r6, [r0+r6] + add r6, r0 add word [r2], 32 IDCT8_ADD_MMX_START r2 , rsp IDCT8_ADD_MMX_START r2+8, rsp+64 @@ -391,7 +391,7 @@ REP_RET .no_dc mov r6d, dword [r1+r5*4] - lea r6, [r0+r6] + add r6, r0 IDCT4_ADD r6, r2, r3 .skipblock inc r5 @@ -414,7 +414,7 @@ test r6, r6 jz .skipblock mov r6d, dword [r1+r5*4] - lea r6, [r0+r6] + add r6, r0 IDCT4_ADD r6, r2, r3 .skipblock inc r5 @@ -456,7 +456,7 @@ %define dst_regd r1d %endif mov dst_regd, dword [r1+r5*4] - lea dst_reg, [r0+dst_reg] + add dst_reg, r0 DC_ADD_MMX2_OP movh, dst_reg, r3, r6 %ifndef ARCH_X86_64 mov r1, r1m @@ -513,7 +513,7 @@ RET .no_dc mov r6d, dword [r1+r5*4] - lea r6, [r0+r6] + add r6, r0 add word [r2], 32 IDCT8_ADD_MMX_START r2 , rsp IDCT8_ADD_MMX_START r2+8, rsp+64 @@ -558,7 +558,7 @@ %define dst_regd r1d %endif mov dst_regd, dword [r1+r5*4] - lea dst_reg, [r0+dst_reg] + add dst_reg, r0 DC_ADD_MMX2_OP mova, dst_reg, r3, r6 lea dst_reg, [dst_reg+r3*4] DC_ADD_MMX2_OP mova, dst_reg, r3, r6 @@ -573,7 +573,7 @@ .no_dc INIT_XMM mov dst_regd, dword [r1+r5*4] - lea dst_reg, [r0+dst_reg] + add dst_reg, r0 IDCT8_ADD_SSE dst_reg, r2, r3, r6 %ifndef ARCH_X86_64 mov r1, r1m diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_intrapred_10bit.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_intrapred_10bit.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_intrapred_10bit.asm 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_intrapred_10bit.asm 2012-01-11 00:34:30.000000000 +0000 @@ -27,11 +27,23 @@ SECTION_RODATA -SECTION .text - +cextern pw_16 +cextern pw_8 cextern pw_4 +cextern pw_2 cextern pw_1 +pw_m32101234: dw -3, -2, -1, 0, 1, 2, 3, 4 +pw_m3: times 8 dw -3 +pw_pixel_max: times 8 dw ((1 << 10)-1) +pw_512: times 8 dw 512 +pd_17: times 4 dd 17 +pd_16: times 4 dd 16 + +SECTION .text + +; dest, left, right, src +; output: %1 = (t[n-1] + t[n]*2 + t[n+1] + 2) >> 2 %macro PRED4x4_LOWPASS 4 paddw %2, %3 psrlw %2, 1 @@ -52,13 +64,11 @@ movq m3, [r0] punpckhdq m1, m2 PALIGNR m3, m1, 10, m1 - mova m1, m3 movhps m4, [r1+r2*1-8] - PALIGNR m3, m4, 14, m4 - mova m2, m3 + PALIGNR m0, m3, m4, 14, m4 movhps m4, [r1+r2*2-8] - PALIGNR m3, m4, 14, m4 - PRED4x4_LOWPASS m0, m3, m1, m2 + PALIGNR m2, m0, m4, 14, m4 + PRED4x4_LOWPASS m0, m2, m3, m0 movq [r1+r2*2], m0 psrldq m0, 2 movq [r1+r2*1], m0 @@ -92,22 +102,20 @@ pavgw m5, m0 movhps m1, [r0+r2*1-8] PALIGNR m0, m1, 14, m1 ; ....t3t2t1t0ltl0 - mova m1, m0 movhps m2, [r0+r2*2-8] - PALIGNR m0, m2, 14, m2 ; ..t3t2t1t0ltl0l1 - mova m2, m0 + PALIGNR m1, m0, m2, 14, m2 ; ..t3t2t1t0ltl0l1 movhps m3, [r1+r2*1-8] - PALIGNR m0, m3, 14, m3 ; t3t2t1t0ltl0l1l2 - PRED4x4_LOWPASS m3, m1, m0, m2 - pslldq m1, m3, 12 - psrldq m3, 4 + PALIGNR m2, m1, m3, 14, m3 ; t3t2t1t0ltl0l1l2 + PRED4x4_LOWPASS m1, m0, m2, m1 + pslldq m0, m1, 12 + psrldq m1, 4 movq [r0+r2*1], m5 - movq [r0+r2*2], m3 - PALIGNR m5, m1, 14, m2 - pslldq m1, 2 + movq [r0+r2*2], m1 + PALIGNR m5, m0, 14, m2 + pslldq m0, 2 movq [r1+r2*1], m5 - PALIGNR m3, m1, 14, m1 - movq [r1+r2*2], m3 + PALIGNR m1, m0, 14, m0 + movq [r1+r2*2], m1 RET %endmacro @@ -140,9 +148,9 @@ punpckhdq m1, m2 ; l0 l1 l2 l3 punpckhqdq m1, m0 ; t2 t1 t0 lt l0 l1 l2 l3 psrldq m0, m1, 4 ; .. .. t2 t1 t0 lt l0 l1 - psrldq m2, m1, 2 ; .. t2 t1 t0 lt l0 l1 l2 - pavgw m5, m1, m2 - PRED4x4_LOWPASS m3, m1, m0, m2 + psrldq m3, m1, 2 ; .. t2 t1 t0 lt l0 l1 l2 + pavgw m5, m1, m3 + PRED4x4_LOWPASS m3, m1, m0, m3 punpcklwd m5, m3 psrldq m3, 8 PALIGNR m3, m5, 12, m4 @@ -208,17 +216,15 @@ ;----------------------------------------------------------------------------- ; void pred4x4_down_left(pixel *src, const pixel *topright, int stride) ;----------------------------------------------------------------------------- -;TODO: more AVX here %macro PRED4x4_DL 1 cglobal pred4x4_down_left_10_%1, 3,3 sub r0, r2 - movq m1, [r0] - movhps m1, [r1] - pslldq m5, m1, 2 - pxor m2, m5, m1 - psrldq m2, 2 - pxor m3, m1, m2 - PRED4x4_LOWPASS m0, m5, m3, m1 + movq m0, [r0] + movhps m0, [r1] + psrldq m2, m0, 2 + pslldq m3, m0, 2 + pshufhw m2, m2, 10100100b + PRED4x4_LOWPASS m0, m3, m2, m0 lea r1, [r0+r2*2] movhps [r1+r2*2], m0 psrldq m0, 2 @@ -245,10 +251,10 @@ sub r0, r2 movu m1, [r0] movhps m1, [r1] - psrldq m3, m1, 2 + psrldq m0, m1, 2 psrldq m2, m1, 4 - pavgw m4, m3, m1 - PRED4x4_LOWPASS m0, m1, m2, m3 + pavgw m4, m0, m1 + PRED4x4_LOWPASS m0, m1, m2, m0 lea r1, [r0+r2*2] movq [r0+r2*1], m4 movq [r0+r2*2], m0 @@ -286,13 +292,13 @@ pavgw m2, m0 pshufw m5, m0, 11111110b - PRED4x4_LOWPASS m3, m0, m5, m1 + PRED4x4_LOWPASS m1, m0, m5, m1 movq m6, m2 - punpcklwd m6, m3 + punpcklwd m6, m1 movq [r0+r2*1], m6 psrlq m2, 16 - psrlq m3, 16 - punpcklwd m2, m3 + psrlq m1, 16 + punpcklwd m2, m1 movq [r0+r2*2], m2 psrlq m2, 32 movd [r1+r2*1], m2 @@ -321,7 +327,7 @@ ;----------------------------------------------------------------------------- INIT_XMM cglobal pred8x8_horizontal_10_sse2, 2,3 - mov r2, 4 + mov r2d, 4 .loop: movq m0, [r0+r1*0-8] movq m1, [r0+r1*1-8] @@ -332,6 +338,871 @@ mova [r0+r1*0], m0 mova [r0+r1*1], m1 lea r0, [r0+r1*2] - dec r2 + dec r2d jg .loop REP_RET + +;----------------------------------------------------------------------------- +; void predict_8x8_dc(pixel *src, int stride) +;----------------------------------------------------------------------------- +%macro MOV8 2-3 +; sort of a hack, but it works +%if mmsize==8 + movq [%1+0], %2 + movq [%1+8], %3 +%else + movdqa [%1], %2 +%endif +%endmacro + +%macro PRED8x8_DC 2 +cglobal pred8x8_dc_10_%1, 2,6 + sub r0, r1 + pxor m4, m4 + movq m0, [r0+0] + movq m1, [r0+8] +%if mmsize==16 + punpcklwd m0, m1 + movhlps m1, m0 + paddw m0, m1 +%else + pshufw m2, m0, 00001110b + pshufw m3, m1, 00001110b + paddw m0, m2 + paddw m1, m3 + punpcklwd m0, m1 +%endif + %2 m2, m0, 00001110b + paddw m0, m2 + + lea r5, [r1*3] + lea r4, [r0+r1*4] + movzx r2d, word [r0+r1*1-2] + movzx r3d, word [r0+r1*2-2] + add r2d, r3d + movzx r3d, word [r0+r5*1-2] + add r2d, r3d + movzx r3d, word [r4-2] + add r2d, r3d + movd m2, r2d ; s2 + + movzx r2d, word [r4+r1*1-2] + movzx r3d, word [r4+r1*2-2] + add r2d, r3d + movzx r3d, word [r4+r5*1-2] + add r2d, r3d + movzx r3d, word [r4+r1*4-2] + add r2d, r3d + movd m3, r2d ; s3 + + punpcklwd m2, m3 + punpckldq m0, m2 ; s0, s1, s2, s3 + %2 m3, m0, 11110110b ; s2, s1, s3, s3 + %2 m0, m0, 01110100b ; s0, s1, s3, s1 + paddw m0, m3 + psrlw m0, 2 + pavgw m0, m4 ; s0+s2, s1, s3, s1+s3 +%if mmsize==16 + punpcklwd m0, m0 + pshufd m3, m0, 11111010b + punpckldq m0, m0 + SWAP 0,1 +%else + pshufw m1, m0, 0x00 + pshufw m2, m0, 0x55 + pshufw m3, m0, 0xaa + pshufw m4, m0, 0xff +%endif + MOV8 r0+r1*1, m1, m2 + MOV8 r0+r1*2, m1, m2 + MOV8 r0+r5*1, m1, m2 + MOV8 r0+r1*4, m1, m2 + MOV8 r4+r1*1, m3, m4 + MOV8 r4+r1*2, m3, m4 + MOV8 r4+r5*1, m3, m4 + MOV8 r4+r1*4, m3, m4 + RET +%endmacro + +INIT_MMX +PRED8x8_DC mmxext, pshufw +INIT_XMM +PRED8x8_DC sse2 , pshuflw + +;----------------------------------------------------------------------------- +; void pred8x8_top_dc(pixel *src, int stride) +;----------------------------------------------------------------------------- +INIT_XMM +cglobal pred8x8_top_dc_10_sse2, 2,4 + sub r0, r1 + mova m0, [r0] + pshuflw m1, m0, 0x4e + pshufhw m1, m1, 0x4e + paddw m0, m1 + pshuflw m1, m0, 0xb1 + pshufhw m1, m1, 0xb1 + paddw m0, m1 + lea r2, [r1*3] + lea r3, [r0+r1*4] + paddw m0, [pw_2] + psrlw m0, 2 + mova [r0+r1*1], m0 + mova [r0+r1*2], m0 + mova [r0+r2*1], m0 + mova [r0+r1*4], m0 + mova [r3+r1*1], m0 + mova [r3+r1*2], m0 + mova [r3+r2*1], m0 + mova [r3+r1*4], m0 + RET + +;----------------------------------------------------------------------------- +; void pred8x8_plane(pixel *src, int stride) +;----------------------------------------------------------------------------- +INIT_XMM +cglobal pred8x8_plane_10_sse2, 2,7,7 + sub r0, r1 + lea r2, [r1*3] + lea r3, [r0+r1*4] + mova m2, [r0] + pmaddwd m2, [pw_m32101234] + HADDD m2, m1 + movd m0, [r0-4] + psrld m0, 14 + psubw m2, m0 ; H + movd m0, [r3+r1*4-4] + movd m1, [r0+12] + paddw m0, m1 + psllw m0, 4 ; 16*(src[7*stride-1] + src[-stride+7]) + movzx r4d, word [r3+r1*1-2] ; src[4*stride-1] + movzx r5d, word [r0+r2*1-2] ; src[2*stride-1] + sub r4d, r5d + movzx r6d, word [r3+r1*2-2] ; src[5*stride-1] + movzx r5d, word [r0+r1*2-2] ; src[1*stride-1] + sub r6d, r5d + lea r4d, [r4+r6*2] + movzx r5d, word [r3+r2*1-2] ; src[6*stride-1] + movzx r6d, word [r0+r1*1-2] ; src[0*stride-1] + sub r5d, r6d + lea r5d, [r5*3] + add r4d, r5d + movzx r6d, word [r3+r1*4-2] ; src[7*stride-1] + movzx r5d, word [r0+r1*0-2] ; src[ -stride-1] + sub r6d, r5d + lea r4d, [r4+r6*4] + movd m3, r4d ; V + punpckldq m2, m3 + pmaddwd m2, [pd_17] + paddd m2, [pd_16] + psrad m2, 5 ; b, c + + mova m3, [pw_pixel_max] + pxor m1, m1 + SPLATW m0, m0, 1 + SPLATW m4, m2, 2 + SPLATW m2, m2, 0 + pmullw m2, [pw_m32101234] ; b + pmullw m5, m4, [pw_m3] ; c + paddw m5, [pw_16] + mov r2d, 8 + add r0, r1 +.loop: + paddsw m6, m2, m5 + paddsw m6, m0 + psraw m6, 5 + CLIPW m6, m1, m3 + mova [r0], m6 + paddw m5, m4 + add r0, r1 + dec r2d + jg .loop + REP_RET + + +;----------------------------------------------------------------------------- +; void pred8x8l_128_dc(pixel *src, int has_topleft, int has_topright, int stride) +;----------------------------------------------------------------------------- +%macro PRED8x8L_128_DC 1 +cglobal pred8x8l_128_dc_10_%1, 4,4 + mova m0, [pw_512] ; (1<<(BIT_DEPTH-1)) + lea r1, [r3*3] + lea r2, [r0+r3*4] + MOV8 r0+r3*0, m0, m0 + MOV8 r0+r3*1, m0, m0 + MOV8 r0+r3*2, m0, m0 + MOV8 r0+r1*1, m0, m0 + MOV8 r2+r3*0, m0, m0 + MOV8 r2+r3*1, m0, m0 + MOV8 r2+r3*2, m0, m0 + MOV8 r2+r1*1, m0, m0 + RET +%endmacro + +INIT_MMX +PRED8x8L_128_DC mmxext +INIT_XMM +PRED8x8L_128_DC sse2 + +;----------------------------------------------------------------------------- +; void pred8x8l_top_dc(pixel *src, int has_topleft, int has_topright, int stride) +;----------------------------------------------------------------------------- +%macro PRED8x8L_TOP_DC 1 +cglobal pred8x8l_top_dc_10_%1, 4,4,6 + sub r0, r3 + mova m0, [r0] + shr r1d, 14 + shr r2d, 13 + neg r1 + pslldq m1, m0, 2 + psrldq m2, m0, 2 + pinsrw m1, [r0+r1], 0 + pinsrw m2, [r0+r2+14], 7 + lea r1, [r3*3] + lea r2, [r0+r3*4] + PRED4x4_LOWPASS m0, m2, m1, m0 + HADDW m0, m1 + paddw m0, [pw_4] + psrlw m0, 3 + SPLATW m0, m0, 0 + mova [r0+r3*1], m0 + mova [r0+r3*2], m0 + mova [r0+r1*1], m0 + mova [r0+r3*4], m0 + mova [r2+r3*1], m0 + mova [r2+r3*2], m0 + mova [r2+r1*1], m0 + mova [r2+r3*4], m0 + RET +%endmacro + +INIT_XMM +PRED8x8L_TOP_DC sse2 +%ifdef HAVE_AVX +INIT_AVX +PRED8x8L_TOP_DC avx +%endif + +;----------------------------------------------------------------------------- +;void pred8x8l_dc(pixel *src, int has_topleft, int has_topright, int stride) +;----------------------------------------------------------------------------- +;TODO: see if scalar is faster +%macro PRED8x8L_DC 1 +cglobal pred8x8l_dc_10_%1, 4,6,6 + sub r0, r3 + lea r4, [r0+r3*4] + lea r5, [r3*3] + mova m0, [r0+r3*2-16] + punpckhwd m0, [r0+r3*1-16] + mova m1, [r4+r3*0-16] + punpckhwd m1, [r0+r5*1-16] + punpckhdq m1, m0 + mova m2, [r4+r3*2-16] + punpckhwd m2, [r4+r3*1-16] + mova m3, [r4+r3*4-16] + punpckhwd m3, [r4+r5*1-16] + punpckhdq m3, m2 + punpckhqdq m3, m1 + mova m0, [r0] + shr r1d, 14 + shr r2d, 13 + neg r1 + pslldq m1, m0, 2 + psrldq m2, m0, 2 + pinsrw m1, [r0+r1], 0 + pinsrw m2, [r0+r2+14], 7 + not r1 + and r1, r3 + pslldq m4, m3, 2 + psrldq m5, m3, 2 + pshuflw m4, m4, 11100101b + pinsrw m5, [r0+r1-2], 7 + PRED4x4_LOWPASS m3, m4, m5, m3 + PRED4x4_LOWPASS m0, m2, m1, m0 + paddw m0, m3 + HADDW m0, m1 + paddw m0, [pw_8] + psrlw m0, 4 + SPLATW m0, m0 + mova [r0+r3*1], m0 + mova [r0+r3*2], m0 + mova [r0+r5*1], m0 + mova [r0+r3*4], m0 + mova [r4+r3*1], m0 + mova [r4+r3*2], m0 + mova [r4+r5*1], m0 + mova [r4+r3*4], m0 + RET +%endmacro + +INIT_XMM +PRED8x8L_DC sse2 +%ifdef HAVE_AVX +INIT_AVX +PRED8x8L_DC avx +%endif + +;----------------------------------------------------------------------------- +; void pred8x8l_vertical(pixel *src, int has_topleft, int has_topright, int stride) +;----------------------------------------------------------------------------- +%macro PRED8x8L_VERTICAL 1 +cglobal pred8x8l_vertical_10_%1, 4,4,6 + sub r0, r3 + mova m0, [r0] + shr r1d, 14 + shr r2d, 13 + neg r1 + pslldq m1, m0, 2 + psrldq m2, m0, 2 + pinsrw m1, [r0+r1], 0 + pinsrw m2, [r0+r2+14], 7 + lea r1, [r3*3] + lea r2, [r0+r3*4] + PRED4x4_LOWPASS m0, m2, m1, m0 + mova [r0+r3*1], m0 + mova [r0+r3*2], m0 + mova [r0+r1*1], m0 + mova [r0+r3*4], m0 + mova [r2+r3*1], m0 + mova [r2+r3*2], m0 + mova [r2+r1*1], m0 + mova [r2+r3*4], m0 + RET +%endmacro + +INIT_XMM +PRED8x8L_VERTICAL sse2 +%ifdef HAVE_AVX +INIT_AVX +PRED8x8L_VERTICAL avx +%endif + +;----------------------------------------------------------------------------- +; void pred8x8l_horizontal(uint8_t *src, int has_topleft, int has_topright, int stride) +;----------------------------------------------------------------------------- +%macro PRED8x8L_HORIZONTAL 1 +cglobal pred8x8l_horizontal_10_%1, 4,4,5 + mova m0, [r0-16] + shr r1d, 14 + dec r1 + and r1, r3 + sub r1, r3 + punpckhwd m0, [r0+r1-16] + mova m1, [r0+r3*2-16] + punpckhwd m1, [r0+r3*1-16] + lea r2, [r0+r3*4] + lea r1, [r3*3] + punpckhdq m1, m0 + mova m2, [r2+r3*0-16] + punpckhwd m2, [r0+r1-16] + mova m3, [r2+r3*2-16] + punpckhwd m3, [r2+r3*1-16] + punpckhdq m3, m2 + punpckhqdq m3, m1 + PALIGNR m4, m3, [r2+r1-16], 14, m0 + pslldq m0, m4, 2 + pshuflw m0, m0, 11100101b + PRED4x4_LOWPASS m4, m3, m0, m4 + punpckhwd m3, m4, m4 + punpcklwd m4, m4 + pshufd m0, m3, 0xff + pshufd m1, m3, 0xaa + pshufd m2, m3, 0x55 + pshufd m3, m3, 0x00 + mova [r0+r3*0], m0 + mova [r0+r3*1], m1 + mova [r0+r3*2], m2 + mova [r0+r1*1], m3 + pshufd m0, m4, 0xff + pshufd m1, m4, 0xaa + pshufd m2, m4, 0x55 + pshufd m3, m4, 0x00 + mova [r2+r3*0], m0 + mova [r2+r3*1], m1 + mova [r2+r3*2], m2 + mova [r2+r1*1], m3 + RET +%endmacro + +INIT_XMM +%define PALIGNR PALIGNR_MMX +PRED8x8L_HORIZONTAL sse2 +%define PALIGNR PALIGNR_SSSE3 +PRED8x8L_HORIZONTAL ssse3 +%ifdef HAVE_AVX +INIT_AVX +PRED8x8L_HORIZONTAL avx +%endif + +;----------------------------------------------------------------------------- +;void pred8x8l_down_left(pixel *src, int has_topleft, int has_topright, int stride) +;----------------------------------------------------------------------------- +%macro PRED8x8L_DOWN_LEFT 1 +cglobal pred8x8l_down_left_10_%1, 4,4,7 + sub r0, r3 + mova m3, [r0] + shr r1d, 14 + neg r1 + shr r2d, 13 + pslldq m1, m3, 2 + psrldq m2, m3, 2 + pinsrw m1, [r0+r1], 0 + pinsrw m2, [r0+r2+14], 7 + PRED4x4_LOWPASS m6, m2, m1, m3 + jz .fix_tr ; flags from shr r2d + mova m1, [r0+16] + psrldq m5, m1, 2 + PALIGNR m2, m1, m3, 14, m3 + pshufhw m5, m5, 10100100b + PRED4x4_LOWPASS m1, m2, m5, m1 +.do_topright: + lea r1, [r3*3] + psrldq m5, m1, 14 + lea r2, [r0+r3*4] + PALIGNR m2, m1, m6, 2, m0 + PALIGNR m3, m1, m6, 14, m0 + PALIGNR m5, m1, 2, m0 + pslldq m4, m6, 2 + PRED4x4_LOWPASS m6, m4, m2, m6 + PRED4x4_LOWPASS m1, m3, m5, m1 + mova [r2+r3*4], m1 + PALIGNR m1, m6, 14, m2 + pslldq m6, 2 + mova [r2+r1*1], m1 + PALIGNR m1, m6, 14, m2 + pslldq m6, 2 + mova [r2+r3*2], m1 + PALIGNR m1, m6, 14, m2 + pslldq m6, 2 + mova [r2+r3*1], m1 + PALIGNR m1, m6, 14, m2 + pslldq m6, 2 + mova [r0+r3*4], m1 + PALIGNR m1, m6, 14, m2 + pslldq m6, 2 + mova [r0+r1*1], m1 + PALIGNR m1, m6, 14, m2 + pslldq m6, 2 + mova [r0+r3*2], m1 + PALIGNR m1, m6, 14, m6 + mova [r0+r3*1], m1 + RET +.fix_tr: + punpckhwd m3, m3 + pshufd m1, m3, 0xFF + jmp .do_topright +%endmacro + +INIT_XMM +%define PALIGNR PALIGNR_MMX +PRED8x8L_DOWN_LEFT sse2 +%define PALIGNR PALIGNR_SSSE3 +PRED8x8L_DOWN_LEFT ssse3 +%ifdef HAVE_AVX +INIT_AVX +PRED8x8L_DOWN_LEFT avx +%endif + +;----------------------------------------------------------------------------- +;void pred8x8l_down_right(pixel *src, int has_topleft, int has_topright, int stride) +;----------------------------------------------------------------------------- +%macro PRED8x8L_DOWN_RIGHT 1 +; standard forbids this when has_topleft is false +; no need to check +cglobal pred8x8l_down_right_10_%1, 4,5,8 + sub r0, r3 + lea r4, [r0+r3*4] + lea r1, [r3*3] + mova m0, [r0+r3*1-16] + punpckhwd m0, [r0+r3*0-16] + mova m1, [r0+r1*1-16] + punpckhwd m1, [r0+r3*2-16] + punpckhdq m1, m0 + mova m2, [r4+r3*1-16] + punpckhwd m2, [r4+r3*0-16] + mova m3, [r4+r1*1-16] + punpckhwd m3, [r4+r3*2-16] + punpckhdq m3, m2 + punpckhqdq m3, m1 + mova m0, [r4+r3*4-16] + mova m1, [r0] + PALIGNR m4, m3, m0, 14, m0 + PALIGNR m1, m3, 2, m2 + pslldq m0, m4, 2 + pshuflw m0, m0, 11100101b + PRED4x4_LOWPASS m6, m1, m4, m3 + PRED4x4_LOWPASS m4, m3, m0, m4 + mova m3, [r0] + shr r2d, 13 + pslldq m1, m3, 2 + psrldq m2, m3, 2 + pinsrw m1, [r0-2], 0 + pinsrw m2, [r0+r2+14], 7 + PRED4x4_LOWPASS m3, m2, m1, m3 + PALIGNR m2, m3, m6, 2, m0 + PALIGNR m5, m3, m6, 14, m0 + psrldq m7, m3, 2 + PRED4x4_LOWPASS m6, m4, m2, m6 + PRED4x4_LOWPASS m3, m5, m7, m3 + mova [r4+r3*4], m6 + PALIGNR m3, m6, 14, m2 + pslldq m6, 2 + mova [r0+r3*1], m3 + PALIGNR m3, m6, 14, m2 + pslldq m6, 2 + mova [r0+r3*2], m3 + PALIGNR m3, m6, 14, m2 + pslldq m6, 2 + mova [r0+r1*1], m3 + PALIGNR m3, m6, 14, m2 + pslldq m6, 2 + mova [r0+r3*4], m3 + PALIGNR m3, m6, 14, m2 + pslldq m6, 2 + mova [r4+r3*1], m3 + PALIGNR m3, m6, 14, m2 + pslldq m6, 2 + mova [r4+r3*2], m3 + PALIGNR m3, m6, 14, m6 + mova [r4+r1*1], m3 + RET +%endmacro + +INIT_XMM +%define PALIGNR PALIGNR_MMX +PRED8x8L_DOWN_RIGHT sse2 +%define PALIGNR PALIGNR_SSSE3 +PRED8x8L_DOWN_RIGHT ssse3 +%ifdef HAVE_AVX +INIT_AVX +PRED8x8L_DOWN_RIGHT avx +%endif + +;----------------------------------------------------------------------------- +; void pred8x8l_vertical_right(pixel *src, int has_topleft, int has_topright, int stride) +;----------------------------------------------------------------------------- +%macro PRED8x8L_VERTICAL_RIGHT 1 +; likewise with 8x8l_down_right +cglobal pred8x8l_vertical_right_10_%1, 4,5,7 + sub r0, r3 + lea r4, [r0+r3*4] + lea r1, [r3*3] + mova m0, [r0+r3*1-16] + punpckhwd m0, [r0+r3*0-16] + mova m1, [r0+r1*1-16] + punpckhwd m1, [r0+r3*2-16] + punpckhdq m1, m0 + mova m2, [r4+r3*1-16] + punpckhwd m2, [r4+r3*0-16] + mova m3, [r4+r1*1-16] + punpckhwd m3, [r4+r3*2-16] + punpckhdq m3, m2 + punpckhqdq m3, m1 + mova m0, [r4+r3*4-16] + mova m1, [r0] + PALIGNR m4, m3, m0, 14, m0 + PALIGNR m1, m3, 2, m2 + PRED4x4_LOWPASS m3, m1, m4, m3 + mova m2, [r0] + shr r2d, 13 + pslldq m1, m2, 2 + psrldq m5, m2, 2 + pinsrw m1, [r0-2], 0 + pinsrw m5, [r0+r2+14], 7 + PRED4x4_LOWPASS m2, m5, m1, m2 + PALIGNR m6, m2, m3, 12, m1 + PALIGNR m5, m2, m3, 14, m0 + PRED4x4_LOWPASS m0, m6, m2, m5 + pavgw m2, m5 + mova [r0+r3*2], m0 + mova [r0+r3*1], m2 + pslldq m6, m3, 4 + pslldq m1, m3, 2 + PRED4x4_LOWPASS m1, m3, m6, m1 + PALIGNR m2, m1, 14, m4 + mova [r0+r1*1], m2 + pslldq m1, 2 + PALIGNR m0, m1, 14, m3 + mova [r0+r3*4], m0 + pslldq m1, 2 + PALIGNR m2, m1, 14, m4 + mova [r4+r3*1], m2 + pslldq m1, 2 + PALIGNR m0, m1, 14, m3 + mova [r4+r3*2], m0 + pslldq m1, 2 + PALIGNR m2, m1, 14, m4 + mova [r4+r1*1], m2 + pslldq m1, 2 + PALIGNR m0, m1, 14, m1 + mova [r4+r3*4], m0 + RET +%endmacro + +INIT_XMM +%define PALIGNR PALIGNR_MMX +PRED8x8L_VERTICAL_RIGHT sse2 +%define PALIGNR PALIGNR_SSSE3 +PRED8x8L_VERTICAL_RIGHT ssse3 +%ifdef HAVE_AVX +INIT_AVX +PRED8x8L_VERTICAL_RIGHT avx +%endif + +;----------------------------------------------------------------------------- +; void pred8x8l_horizontal_up(pixel *src, int has_topleft, int has_topright, int stride) +;----------------------------------------------------------------------------- +%macro PRED8x8L_HORIZONTAL_UP 1 +cglobal pred8x8l_horizontal_up_10_%1, 4,4,6 + mova m0, [r0+r3*0-16] + punpckhwd m0, [r0+r3*1-16] + shr r1d, 14 + dec r1 + and r1, r3 + sub r1, r3 + mova m4, [r0+r1*1-16] + lea r1, [r3*3] + lea r2, [r0+r3*4] + mova m1, [r0+r3*2-16] + punpckhwd m1, [r0+r1*1-16] + punpckhdq m0, m1 + mova m2, [r2+r3*0-16] + punpckhwd m2, [r2+r3*1-16] + mova m3, [r2+r3*2-16] + punpckhwd m3, [r2+r1*1-16] + punpckhdq m2, m3 + punpckhqdq m0, m2 + PALIGNR m1, m0, m4, 14, m4 + psrldq m2, m0, 2 + pshufhw m2, m2, 10100100b + PRED4x4_LOWPASS m0, m1, m2, m0 + psrldq m1, m0, 2 + psrldq m2, m0, 4 + pshufhw m1, m1, 10100100b + pshufhw m2, m2, 01010100b + pavgw m4, m0, m1 + PRED4x4_LOWPASS m1, m2, m0, m1 + punpckhwd m5, m4, m1 + punpcklwd m4, m1 + mova [r2+r3*0], m5 + mova [r0+r3*0], m4 + pshufd m0, m5, 11111001b + pshufd m1, m5, 11111110b + pshufd m2, m5, 11111111b + mova [r2+r3*1], m0 + mova [r2+r3*2], m1 + mova [r2+r1*1], m2 + PALIGNR m2, m5, m4, 4, m0 + PALIGNR m3, m5, m4, 8, m1 + PALIGNR m5, m5, m4, 12, m4 + mova [r0+r3*1], m2 + mova [r0+r3*2], m3 + mova [r0+r1*1], m5 + RET +%endmacro + +INIT_XMM +%define PALIGNR PALIGNR_MMX +PRED8x8L_HORIZONTAL_UP sse2 +%define PALIGNR PALIGNR_SSSE3 +PRED8x8L_HORIZONTAL_UP ssse3 +%ifdef HAVE_AVX +INIT_AVX +PRED8x8L_HORIZONTAL_UP avx +%endif + + +;----------------------------------------------------------------------------- +; void pred16x16_vertical(pixel *src, int stride) +;----------------------------------------------------------------------------- +%macro MOV16 3-5 + mova [%1+ 0], %2 + mova [%1+mmsize], %3 +%if mmsize==8 + mova [%1+ 16], %4 + mova [%1+ 24], %5 +%endif +%endmacro + +%macro PRED16x16_VERTICAL 1 +cglobal pred16x16_vertical_10_%1, 2,3 + sub r0, r1 + mov r2d, 8 + mova m0, [r0+ 0] + mova m1, [r0+mmsize] +%if mmsize==8 + mova m2, [r0+16] + mova m3, [r0+24] +%endif +.loop: + MOV16 r0+r1*1, m0, m1, m2, m3 + MOV16 r0+r1*2, m0, m1, m2, m3 + lea r0, [r0+r1*2] + dec r2d + jg .loop + REP_RET +%endmacro + +INIT_MMX +PRED16x16_VERTICAL mmxext +INIT_XMM +PRED16x16_VERTICAL sse2 + +;----------------------------------------------------------------------------- +; void pred16x16_horizontal(pixel *src, int stride) +;----------------------------------------------------------------------------- +%macro PRED16x16_HORIZONTAL 1 +cglobal pred16x16_horizontal_10_%1, 2,3 + mov r2d, 8 +.vloop: + movd m0, [r0+r1*0-4] + movd m1, [r0+r1*1-4] + SPLATW m0, m0, 1 + SPLATW m1, m1, 1 + MOV16 r0+r1*0, m0, m0, m0, m0 + MOV16 r0+r1*1, m1, m1, m1, m1 + lea r0, [r0+r1*2] + dec r2d + jg .vloop + REP_RET +%endmacro + +INIT_MMX +PRED16x16_HORIZONTAL mmxext +INIT_XMM +PRED16x16_HORIZONTAL sse2 + +;----------------------------------------------------------------------------- +; void pred16x16_dc(pixel *src, int stride) +;----------------------------------------------------------------------------- +%macro PRED16x16_DC 1 +cglobal pred16x16_dc_10_%1, 2,6 + mov r5, r0 + sub r0, r1 + mova m0, [r0+0] + paddw m0, [r0+mmsize] +%if mmsize==8 + paddw m0, [r0+16] + paddw m0, [r0+24] +%endif + HADDW m0, m2 + + lea r0, [r0+r1-2] + movzx r3d, word [r0] + movzx r4d, word [r0+r1] +%rep 7 + lea r0, [r0+r1*2] + movzx r2d, word [r0] + add r3d, r2d + movzx r2d, word [r0+r1] + add r4d, r2d +%endrep + lea r3d, [r3+r4+16] + + movd m1, r3d + paddw m0, m1 + psrlw m0, 5 + SPLATW m0, m0 + mov r3d, 8 +.loop: + MOV16 r5+r1*0, m0, m0, m0, m0 + MOV16 r5+r1*1, m0, m0, m0, m0 + lea r5, [r5+r1*2] + dec r3d + jg .loop + REP_RET +%endmacro + +INIT_MMX +PRED16x16_DC mmxext +INIT_XMM +PRED16x16_DC sse2 + +;----------------------------------------------------------------------------- +; void pred16x16_top_dc(pixel *src, int stride) +;----------------------------------------------------------------------------- +%macro PRED16x16_TOP_DC 1 +cglobal pred16x16_top_dc_10_%1, 2,3 + sub r0, r1 + mova m0, [r0+0] + paddw m0, [r0+mmsize] +%if mmsize==8 + paddw m0, [r0+16] + paddw m0, [r0+24] +%endif + HADDW m0, m2 + + SPLATW m0, m0 + paddw m0, [pw_8] + psrlw m0, 4 + mov r2d, 8 +.loop: + MOV16 r0+r1*1, m0, m0, m0, m0 + MOV16 r0+r1*2, m0, m0, m0, m0 + lea r0, [r0+r1*2] + dec r2d + jg .loop + REP_RET +%endmacro + +INIT_MMX +PRED16x16_TOP_DC mmxext +INIT_XMM +PRED16x16_TOP_DC sse2 + +;----------------------------------------------------------------------------- +; void pred16x16_left_dc(pixel *src, int stride) +;----------------------------------------------------------------------------- +%macro PRED16x16_LEFT_DC 1 +cglobal pred16x16_left_dc_10_%1, 2,6 + mov r5, r0 + + sub r0, 2 + movzx r3d, word [r0] + movzx r4d, word [r0+r1] +%rep 7 + lea r0, [r0+r1*2] + movzx r2d, word [r0] + add r3d, r2d + movzx r2d, word [r0+r1] + add r4d, r2d +%endrep + lea r3d, [r3+r4+8] + shr r3d, 4 + + movd m0, r3d + SPLATW m0, m0 + mov r3d, 8 +.loop: + MOV16 r5+r1*0, m0, m0, m0, m0 + MOV16 r5+r1*1, m0, m0, m0, m0 + lea r5, [r5+r1*2] + dec r3d + jg .loop + REP_RET +%endmacro + +INIT_MMX +PRED16x16_LEFT_DC mmxext +INIT_XMM +PRED16x16_LEFT_DC sse2 + +;----------------------------------------------------------------------------- +; void pred16x16_128_dc(pixel *src, int stride) +;----------------------------------------------------------------------------- +%macro PRED16x16_128_DC 1 +cglobal pred16x16_128_dc_10_%1, 2,3 + mova m0, [pw_512] + mov r2d, 8 +.loop: + MOV16 r0+r1*0, m0, m0, m0, m0 + MOV16 r0+r1*1, m0, m0, m0, m0 + lea r0, [r0+r1*2] + dec r2d + jg .loop + REP_RET +%endmacro + +INIT_MMX +PRED16x16_128_DC mmxext +INIT_XMM +PRED16x16_128_DC sse2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_intrapred.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_intrapred.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_intrapred.asm 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_intrapred.asm 2012-01-11 00:34:30.000000000 +0000 @@ -2611,12 +2611,11 @@ punpckldq m1, [r1] movq m2, m1 movq m3, m1 - movq m4, m1 psllq m1, 8 pxor m2, m1 psrlq m2, 8 - pxor m3, m2 - PRED4x4_LOWPASS m0, m1, m3, m4, m5 + pxor m2, m3 + PRED4x4_LOWPASS m0, m1, m2, m3, m4 lea r1, [r0+r2*2] psrlq m0, 8 movd [r0+r2*1], m0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_intrapred_init.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_intrapred_init.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_intrapred_init.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_intrapred_init.c 2012-01-11 00:34:30.000000000 +0000 @@ -43,9 +43,56 @@ #define PRED8x8(TYPE, DEPTH, OPT) \ void ff_pred8x8_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride); +PRED8x8(dc, 10, mmxext) +PRED8x8(dc, 10, sse2) +PRED8x8(top_dc, 10, sse2) +PRED8x8(plane, 10, sse2) PRED8x8(vertical, 10, sse2) PRED8x8(horizontal, 10, sse2) +#define PRED8x8L(TYPE, DEPTH, OPT)\ +void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int has_topleft, int has_topright, int stride); + +PRED8x8L(dc, 10, sse2) +PRED8x8L(dc, 10, avx) +PRED8x8L(128_dc, 10, mmxext) +PRED8x8L(128_dc, 10, sse2) +PRED8x8L(top_dc, 10, sse2) +PRED8x8L(top_dc, 10, avx) +PRED8x8L(vertical, 10, sse2) +PRED8x8L(vertical, 10, avx) +PRED8x8L(horizontal, 10, sse2) +PRED8x8L(horizontal, 10, ssse3) +PRED8x8L(horizontal, 10, avx) +PRED8x8L(down_left, 10, sse2) +PRED8x8L(down_left, 10, ssse3) +PRED8x8L(down_left, 10, avx) +PRED8x8L(down_right, 10, sse2) +PRED8x8L(down_right, 10, ssse3) +PRED8x8L(down_right, 10, avx) +PRED8x8L(vertical_right, 10, sse2) +PRED8x8L(vertical_right, 10, ssse3) +PRED8x8L(vertical_right, 10, avx) +PRED8x8L(horizontal_up, 10, sse2) +PRED8x8L(horizontal_up, 10, ssse3) +PRED8x8L(horizontal_up, 10, avx) + +#define PRED16x16(TYPE, DEPTH, OPT)\ +void ff_pred16x16_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride); + +PRED16x16(dc, 10, mmxext) +PRED16x16(dc, 10, sse2) +PRED16x16(top_dc, 10, mmxext) +PRED16x16(top_dc, 10, sse2) +PRED16x16(128_dc, 10, mmxext) +PRED16x16(128_dc, 10, sse2) +PRED16x16(left_dc, 10, mmxext) +PRED16x16(left_dc, 10, sse2) +PRED16x16(vertical, 10, mmxext) +PRED16x16(vertical, 10, sse2) +PRED16x16(horizontal, 10, mmxext) +PRED16x16(horizontal, 10, sse2) + void ff_pred16x16_vertical_mmx (uint8_t *src, int stride); void ff_pred16x16_vertical_sse (uint8_t *src, int stride); void ff_pred16x16_horizontal_mmx (uint8_t *src, int stride); @@ -120,23 +167,26 @@ void ff_pred4x4_tm_vp8_ssse3 (uint8_t *src, const uint8_t *topright, int stride); void ff_pred4x4_vertical_vp8_mmxext(uint8_t *src, const uint8_t *topright, int stride); -void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth) +void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc) { +#if HAVE_YASM int mm_flags = av_get_cpu_flags(); -#if HAVE_YASM if (bit_depth == 8) { if (mm_flags & AV_CPU_FLAG_MMX) { h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_mmx; h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_mmx; - h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_mmx; - h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmx; + if (chroma_format_idc == 1) { + h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_mmx; + h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmx; + } if (codec_id == CODEC_ID_VP8) { h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmx; h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_mmx; h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_mmx; } else { - h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx; + if (chroma_format_idc == 1) + h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx; if (codec_id == CODEC_ID_SVQ3) { h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_mmx; } else if (codec_id == CODEC_ID_RV40) { @@ -150,7 +200,8 @@ if (mm_flags & AV_CPU_FLAG_MMX2) { h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_mmxext; h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_mmxext; - h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmxext; + if (chroma_format_idc == 1) + h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmxext; h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_mmxext; h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_mmxext; h->pred8x8l [HOR_PRED ] = ff_pred8x8l_horizontal_mmxext; @@ -174,8 +225,10 @@ h->pred4x4 [HOR_UP_PRED ] = ff_pred4x4_horizontal_up_mmxext; } if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) { - h->pred8x8 [TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_mmxext; - h->pred8x8 [DC_PRED8x8 ] = ff_pred8x8_dc_mmxext; + if (chroma_format_idc == 1) { + h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_mmxext; + h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_mmxext; + } } if (codec_id == CODEC_ID_VP8) { h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmxext; @@ -184,7 +237,8 @@ h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_mmxext; h->pred4x4 [VERT_PRED ] = ff_pred4x4_vertical_vp8_mmxext; } else { - h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx2; + if (chroma_format_idc == 1) + h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx2; if (codec_id == CODEC_ID_SVQ3) { h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_mmx2; } else if (codec_id == CODEC_ID_RV40) { @@ -210,7 +264,8 @@ h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_sse2; h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_sse2; } else { - h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_plane_sse2; + if (chroma_format_idc == 1) + h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_sse2; if (codec_id == CODEC_ID_SVQ3) { h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_sse2; } else if (codec_id == CODEC_ID_RV40) { @@ -224,7 +279,8 @@ if (mm_flags & AV_CPU_FLAG_SSSE3) { h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_ssse3; h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_ssse3; - h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_ssse3; + if (chroma_format_idc == 1) + h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_ssse3; h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_ssse3; h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_ssse3; h->pred8x8l [HOR_PRED ] = ff_pred8x8l_horizontal_ssse3; @@ -239,7 +295,8 @@ h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_ssse3; h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_ssse3; } else { - h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_ssse3; + if (chroma_format_idc == 1) + h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_ssse3; if (codec_id == CODEC_ID_SVQ3) { h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_ssse3; } else if (codec_id == CODEC_ID_RV40) { @@ -253,6 +310,18 @@ if (mm_flags & AV_CPU_FLAG_MMX2) { h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmxext; h->pred4x4[HOR_UP_PRED ] = ff_pred4x4_horizontal_up_10_mmxext; + + if (chroma_format_idc == 1) + h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_mmxext; + + h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_mmxext; + + h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_10_mmxext; + h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_10_mmxext; + h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_10_mmxext; + h->pred16x16[LEFT_DC_PRED8x8 ] = ff_pred16x16_left_dc_10_mmxext; + h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_mmxext; + h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_mmxext; } if (mm_flags & AV_CPU_FLAG_SSE2) { h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_sse2; @@ -261,20 +330,58 @@ h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_sse2; h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_sse2; - h->pred8x8[VERT_PRED8x8 ] = ff_pred8x8_vertical_10_sse2; - h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_horizontal_10_sse2; + if (chroma_format_idc == 1) { + h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_sse2; + h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_10_sse2; + h->pred8x8[PLANE_PRED8x8 ] = ff_pred8x8_plane_10_sse2; + h->pred8x8[VERT_PRED8x8 ] = ff_pred8x8_vertical_10_sse2; + h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_horizontal_10_sse2; + } + + h->pred8x8l[VERT_PRED ] = ff_pred8x8l_vertical_10_sse2; + h->pred8x8l[HOR_PRED ] = ff_pred8x8l_horizontal_10_sse2; + h->pred8x8l[DC_PRED ] = ff_pred8x8l_dc_10_sse2; + h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_sse2; + h->pred8x8l[TOP_DC_PRED ] = ff_pred8x8l_top_dc_10_sse2; + h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_sse2; + h->pred8x8l[DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_10_sse2; + h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_sse2; + h->pred8x8l[HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_10_sse2; + + h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_10_sse2; + h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_10_sse2; + h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_10_sse2; + h->pred16x16[LEFT_DC_PRED8x8 ] = ff_pred16x16_left_dc_10_sse2; + h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_sse2; + h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_sse2; } if (mm_flags & AV_CPU_FLAG_SSSE3) { h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_ssse3; h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_ssse3; h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_ssse3; + + h->pred8x8l[HOR_PRED ] = ff_pred8x8l_horizontal_10_ssse3; + h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_ssse3; + h->pred8x8l[DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_10_ssse3; + h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_ssse3; + h->pred8x8l[HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_10_ssse3; } #if HAVE_AVX if (mm_flags & AV_CPU_FLAG_AVX) { h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_avx; h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_avx; + h->pred4x4[VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_10_avx; h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_avx; h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_avx; + + h->pred8x8l[VERT_PRED ] = ff_pred8x8l_vertical_10_avx; + h->pred8x8l[HOR_PRED ] = ff_pred8x8l_horizontal_10_avx; + h->pred8x8l[DC_PRED ] = ff_pred8x8l_dc_10_avx; + h->pred8x8l[TOP_DC_PRED ] = ff_pred8x8l_top_dc_10_avx; + h->pred8x8l[DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_10_avx; + h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_avx; + h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_avx; + h->pred8x8l[HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_10_avx; } #endif /* HAVE_AVX */ } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_qpel_10bit.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_qpel_10bit.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_qpel_10bit.asm 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_qpel_10bit.asm 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,891 @@ +;***************************************************************************** +;* MMX/SSE2/AVX-optimized 10-bit H.264 qpel code +;***************************************************************************** +;* Copyright (C) 2011 x264 project +;* +;* Authors: Daniel Kang +;* +;* This file is part of Libav. +;* +;* Libav is free software; you can redistribute it and/or +;* modify it under the terms of the GNU Lesser General Public +;* License as published by the Free Software Foundation; either +;* version 2.1 of the License, or (at your option) any later version. +;* +;* Libav is distributed in the hope that it will be useful, +;* but WITHOUT ANY WARRANTY; without even the implied warranty of +;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;* Lesser General Public License for more details. +;* +;* You should have received a copy of the GNU Lesser General Public +;* License along with Libav; if not, write to the Free Software +;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;****************************************************************************** + +%include "x86inc.asm" +%include "x86util.asm" + +SECTION_RODATA 32 + +cextern pw_16 +cextern pw_1 +cextern pb_0 + +pw_pixel_max: times 8 dw ((1 << 10)-1) + +pad10: times 8 dw 10*1023 +pad20: times 8 dw 20*1023 +pad30: times 8 dw 30*1023 +depad: times 4 dd 32*20*1023 + 512 +depad2: times 8 dw 20*1023 + 16*1022 + 16 +unpad: times 8 dw 16*1022/32 ; needs to be mod 16 + +tap1: times 4 dw 1, -5 +tap2: times 4 dw 20, 20 +tap3: times 4 dw -5, 1 +pd_0f: times 4 dd 0xffff + +SECTION .text + + +%macro AVG_MOV 2 + pavgw %2, %1 + mova %1, %2 +%endmacro + +%macro ADDW 3 +%if mmsize == 8 + paddw %1, %2 +%else + movu %3, %2 + paddw %1, %3 +%endif +%endmacro + +%macro FILT_H 4 + paddw %1, %4 + psubw %1, %2 ; a-b + psraw %1, 2 ; (a-b)/4 + psubw %1, %2 ; (a-b)/4-b + paddw %1, %3 ; (a-b)/4-b+c + psraw %1, 2 ; ((a-b)/4-b+c)/4 + paddw %1, %3 ; ((a-b)/4-b+c)/4+c = (a-5*b+20*c)/16 +%endmacro + +%macro PRELOAD_V 0 + lea r3, [r2*3] + sub r1, r3 + movu m0, [r1+r2] + movu m1, [r1+r2*2] + add r1, r3 + movu m2, [r1] + movu m3, [r1+r2] + movu m4, [r1+r2*2] + add r1, r3 +%endmacro + +%macro FILT_V 8 + movu %6, [r1] + paddw %1, %6 + mova %7, %2 + paddw %7, %5 + mova %8, %3 + paddw %8, %4 + FILT_H %1, %7, %8, [pw_16] + psraw %1, 1 + CLIPW %1, [pb_0], [pw_pixel_max] +%endmacro + +%macro MC 1 +%define OP_MOV mova +INIT_MMX +%1 mmxext, put, 4 +INIT_XMM +%1 sse2 , put, 8 + +%define OP_MOV AVG_MOV +INIT_MMX +%1 mmxext, avg, 4 +INIT_XMM +%1 sse2 , avg, 8 +%endmacro + +%macro MCAxA 8 +%ifdef ARCH_X86_64 +%ifnidn %1,mmxext +MCAxA_OP %1,%2,%3,%4,%5,%6,%7,%8 +%endif +%else +MCAxA_OP %1,%2,%3,%4,%5,%6,%7,%8 +%endif +%endmacro + +%macro MCAxA_OP 8 +cglobal %2_h264_qpel%5_%3_10_%1, %6,%7,%8 +%ifdef ARCH_X86_32 + call stub_%2_h264_qpel%4_%3_10_%1 + mov r0, r0m + mov r1, r1m + add r0, %4*2 + add r1, %4*2 + call stub_%2_h264_qpel%4_%3_10_%1 + mov r0, r0m + mov r1, r1m + lea r0, [r0+r2*%4] + lea r1, [r1+r2*%4] + call stub_%2_h264_qpel%4_%3_10_%1 + mov r0, r0m + mov r1, r1m + lea r0, [r0+r2*%4+%4*2] + lea r1, [r1+r2*%4+%4*2] + call stub_%2_h264_qpel%4_%3_10_%1 + RET +%else ; ARCH_X86_64 + mov r10, r0 + mov r11, r1 + call stub_%2_h264_qpel%4_%3_10_%1 + lea r0, [r10+%4*2] + lea r1, [r11+%4*2] + call stub_%2_h264_qpel%4_%3_10_%1 + lea r0, [r10+r2*%4] + lea r1, [r11+r2*%4] + call stub_%2_h264_qpel%4_%3_10_%1 + lea r0, [r10+r2*%4+%4*2] + lea r1, [r11+r2*%4+%4*2] +%ifndef UNIX64 ; fall through to function + call stub_%2_h264_qpel%4_%3_10_%1 + RET +%endif +%endif +%endmacro + +;cpu, put/avg, mc, 4/8, ... +%macro cglobal_mc 7 +%assign i %4*2 +MCAxA %1, %2, %3, %4, i, %5,%6,%7 + +cglobal %2_h264_qpel%4_%3_10_%1, %5,%6,%7 +%ifndef UNIX64 ; no prologue or epilogue for UNIX64 + call stub_%2_h264_qpel%4_%3_10_%1 + RET +%endif + +stub_%2_h264_qpel%4_%3_10_%1: +%endmacro + +;----------------------------------------------------------------------------- +; void h264_qpel_mc00(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro COPY4 0 + movu m0, [r1 ] + OP_MOV [r0 ], m0 + movu m0, [r1+r2 ] + OP_MOV [r0+r2 ], m0 + movu m0, [r1+r2*2] + OP_MOV [r0+r2*2], m0 + movu m0, [r1+r3 ] + OP_MOV [r0+r3 ], m0 +%endmacro + +%macro MC00 1 +INIT_MMX +cglobal_mc mmxext, %1, mc00, 4, 3,4,0 + lea r3, [r2*3] + COPY4 + ret + +INIT_XMM +cglobal %1_h264_qpel8_mc00_10_sse2, 3,4 + lea r3, [r2*3] + COPY4 + lea r0, [r0+r2*4] + lea r1, [r1+r2*4] + COPY4 + RET + +cglobal %1_h264_qpel16_mc00_10_sse2, 3,4 + mov r3d, 8 +.loop: + movu m0, [r1 ] + movu m1, [r1 +16] + OP_MOV [r0 ], m0 + OP_MOV [r0 +16], m1 + movu m0, [r1+r2 ] + movu m1, [r1+r2+16] + OP_MOV [r0+r2 ], m0 + OP_MOV [r0+r2+16], m1 + lea r0, [r0+r2*2] + lea r1, [r1+r2*2] + dec r3d + jg .loop + REP_RET +%endmacro + +%define OP_MOV mova +MC00 put + +%define OP_MOV AVG_MOV +MC00 avg + +;----------------------------------------------------------------------------- +; void h264_qpel_mc20(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro MC_CACHE 1 +%define OP_MOV mova +%define PALIGNR PALIGNR_MMX +INIT_MMX +%1 mmxext , put, 4 +INIT_XMM +%1 sse2_cache64 , put, 8 +%define PALIGNR PALIGNR_SSSE3 +%1 ssse3_cache64, put, 8 +%1 sse2 , put, 8, 0 + +%define OP_MOV AVG_MOV +%define PALIGNR PALIGNR_MMX +INIT_MMX +%1 mmxext , avg, 4 +INIT_XMM +%1 sse2_cache64 , avg, 8 +%define PALIGNR PALIGNR_SSSE3 +%1 ssse3_cache64, avg, 8 +%1 sse2 , avg, 8, 0 +%endmacro + +%macro MC20 3-4 +cglobal_mc %1, %2, mc20, %3, 3,4,9 + mov r3d, %3 + mova m1, [pw_pixel_max] +%if num_mmregs > 8 + mova m8, [pw_16] + %define p16 m8 +%else + %define p16 [pw_16] +%endif +.nextrow +%if %0 == 4 + movu m2, [r1-4] + movu m3, [r1-2] + movu m4, [r1+0] + ADDW m2, [r1+6], m5 + ADDW m3, [r1+4], m5 + ADDW m4, [r1+2], m5 +%else ; movu is slow on these processors +%if mmsize==16 + movu m2, [r1-4] + movu m0, [r1+6] + mova m6, m0 + psrldq m0, 6 + + paddw m6, m2 + PALIGNR m3, m0, m2, 2, m5 + PALIGNR m7, m0, m2, 8, m5 + paddw m3, m7 + PALIGNR m4, m0, m2, 4, m5 + PALIGNR m7, m0, m2, 6, m5 + paddw m4, m7 + SWAP 2, 6 +%else + movu m2, [r1-4] + movu m6, [r1+4] + PALIGNR m3, m6, m2, 2, m5 + paddw m3, m6 + PALIGNR m4, m6, m2, 4, m5 + PALIGNR m7, m6, m2, 6, m5 + paddw m4, m7 + paddw m2, [r1+6] +%endif +%endif + + FILT_H m2, m3, m4, p16 + psraw m2, 1 + pxor m0, m0 + CLIPW m2, m0, m1 + OP_MOV [r0], m2 + add r0, r2 + add r1, r2 + dec r3d + jg .nextrow + rep ret +%endmacro + +MC_CACHE MC20 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc30(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro MC30 3-4 +cglobal_mc %1, %2, mc30, %3, 3,5,9 + lea r4, [r1+2] + jmp stub_%2_h264_qpel%3_mc10_10_%1.body +%endmacro + +MC_CACHE MC30 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc10(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro MC10 3-4 +cglobal_mc %1, %2, mc10, %3, 3,5,9 + mov r4, r1 +.body + mov r3d, %3 + mova m1, [pw_pixel_max] +%if num_mmregs > 8 + mova m8, [pw_16] + %define p16 m8 +%else + %define p16 [pw_16] +%endif +.nextrow +%if %0 == 4 + movu m2, [r1-4] + movu m3, [r1-2] + movu m4, [r1+0] + ADDW m2, [r1+6], m5 + ADDW m3, [r1+4], m5 + ADDW m4, [r1+2], m5 +%else ; movu is slow on these processors +%if mmsize==16 + movu m2, [r1-4] + movu m0, [r1+6] + mova m6, m0 + psrldq m0, 6 + + paddw m6, m2 + PALIGNR m3, m0, m2, 2, m5 + PALIGNR m7, m0, m2, 8, m5 + paddw m3, m7 + PALIGNR m4, m0, m2, 4, m5 + PALIGNR m7, m0, m2, 6, m5 + paddw m4, m7 + SWAP 2, 6 +%else + movu m2, [r1-4] + movu m6, [r1+4] + PALIGNR m3, m6, m2, 2, m5 + paddw m3, m6 + PALIGNR m4, m6, m2, 4, m5 + PALIGNR m7, m6, m2, 6, m5 + paddw m4, m7 + paddw m2, [r1+6] +%endif +%endif + + FILT_H m2, m3, m4, p16 + psraw m2, 1 + pxor m0, m0 + CLIPW m2, m0, m1 + movu m3, [r4] + pavgw m2, m3 + OP_MOV [r0], m2 + add r0, r2 + add r1, r2 + add r4, r2 + dec r3d + jg .nextrow + rep ret +%endmacro + +MC_CACHE MC10 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc02(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro V_FILT 11 +v_filt%9_%10_10_%11: + add r4, r2 +.no_addr4: + FILT_V m0, m1, m2, m3, m4, m5, m6, m7 + add r1, r2 + add r0, r2 + ret +%endmacro + +INIT_MMX +RESET_MM_PERMUTATION +%assign i 0 +%rep 4 +V_FILT m0, m1, m2, m3, m4, m5, m6, m7, 4, i, mmxext +SWAP 0,1,2,3,4,5 +%assign i i+1 +%endrep + +INIT_XMM +RESET_MM_PERMUTATION +%assign i 0 +%rep 6 +V_FILT m0, m1, m2, m3, m4, m5, m6, m7, 8, i, sse2 +SWAP 0,1,2,3,4,5 +%assign i i+1 +%endrep + +%macro MC02 3 +cglobal_mc %1, %2, mc02, %3, 3,4,8 + PRELOAD_V + + sub r0, r2 +%assign j 0 +%rep %3 + %assign i (j % 6) + call v_filt%3_ %+ i %+ _10_%1.no_addr4 + OP_MOV [r0], m0 + SWAP 0,1,2,3,4,5 + %assign j j+1 +%endrep + ret +%endmacro + +MC MC02 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc01(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro MC01 3 +cglobal_mc %1, %2, mc01, %3, 3,5,8 + mov r4, r1 +.body + PRELOAD_V + + sub r4, r2 + sub r0, r2 +%assign j 0 +%rep %3 + %assign i (j % 6) + call v_filt%3_ %+ i %+ _10_%1 + movu m7, [r4] + pavgw m0, m7 + OP_MOV [r0], m0 + SWAP 0,1,2,3,4,5 + %assign j j+1 +%endrep + ret +%endmacro + +MC MC01 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc03(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro MC03 3 +cglobal_mc %1, %2, mc03, %3, 3,5,8 + lea r4, [r1+r2] + jmp stub_%2_h264_qpel%3_mc01_10_%1.body +%endmacro + +MC MC03 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc11(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro H_FILT_AVG 3-4 +h_filt%2_%3_10_%1: +;FILT_H with fewer registers and averaged with the FILT_V result +;m6,m7 are tmp registers, m0 is the FILT_V result, the rest are to be used next in the next iteration +;unfortunately I need three registers, so m5 will have to be re-read from memory + movu m5, [r4-4] + ADDW m5, [r4+6], m7 + movu m6, [r4-2] + ADDW m6, [r4+4], m7 + paddw m5, [pw_16] + psubw m5, m6 ; a-b + psraw m5, 2 ; (a-b)/4 + psubw m5, m6 ; (a-b)/4-b + movu m6, [r4+0] + ADDW m6, [r4+2], m7 + paddw m5, m6 ; (a-b)/4-b+c + psraw m5, 2 ; ((a-b)/4-b+c)/4 + paddw m5, m6 ; ((a-b)/4-b+c)/4+c = (a-5*b+20*c)/16 + psraw m5, 1 + CLIPW m5, [pb_0], [pw_pixel_max] +;avg FILT_V, FILT_H + pavgw m0, m5 +%if %0!=4 + movu m5, [r1+r5] +%endif + ret +%endmacro + +INIT_MMX +RESET_MM_PERMUTATION +%assign i 0 +%rep 3 +H_FILT_AVG mmxext, 4, i +SWAP 0,1,2,3,4,5 +%assign i i+1 +%endrep +H_FILT_AVG mmxext, 4, i, 0 + +INIT_XMM +RESET_MM_PERMUTATION +%assign i 0 +%rep 6 +%if i==1 +H_FILT_AVG sse2, 8, i, 0 +%else +H_FILT_AVG sse2, 8, i +%endif +SWAP 0,1,2,3,4,5 +%assign i i+1 +%endrep + +%macro MC11 3 +; this REALLY needs x86_64 +cglobal_mc %1, %2, mc11, %3, 3,6,8 + mov r4, r1 +.body + PRELOAD_V + + sub r0, r2 + sub r4, r2 + mov r5, r2 + neg r5 +%assign j 0 +%rep %3 + %assign i (j % 6) + call v_filt%3_ %+ i %+ _10_%1 + call h_filt%3_ %+ i %+ _10_%1 +%if %3==8 && i==1 + movu m5, [r1+r5] +%endif + OP_MOV [r0], m0 + SWAP 0,1,2,3,4,5 + %assign j j+1 +%endrep + ret +%endmacro + +MC MC11 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc31(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro MC31 3 +cglobal_mc %1, %2, mc31, %3, 3,6,8 + mov r4, r1 + add r1, 2 + jmp stub_%2_h264_qpel%3_mc11_10_%1.body +%endmacro + +MC MC31 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc13(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro MC13 3 +cglobal_mc %1, %2, mc13, %3, 3,7,12 + lea r4, [r1+r2] + jmp stub_%2_h264_qpel%3_mc11_10_%1.body +%endmacro + +MC MC13 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc33(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro MC33 3 +cglobal_mc %1, %2, mc33, %3, 3,6,8 + lea r4, [r1+r2] + add r1, 2 + jmp stub_%2_h264_qpel%3_mc11_10_%1.body +%endmacro + +MC MC33 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc22(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro FILT_H2 3 + psubw %1, %2 ; a-b + psubw %2, %3 ; b-c + psllw %2, 2 + psubw %1, %2 ; a-5*b+4*c + psllw %3, 4 + paddw %1, %3 ; a-5*b+20*c +%endmacro + +%macro FILT_VNRD 8 + movu %6, [r1] + paddw %1, %6 + mova %7, %2 + paddw %7, %5 + mova %8, %3 + paddw %8, %4 + FILT_H2 %1, %7, %8 +%endmacro + +%macro HV 2 +%ifidn %1,sse2 +%define PAD 12 +%define COUNT 2 +%else +%define PAD 0 +%define COUNT 3 +%endif +put_hv%2_10_%1: + neg r2 ; This actually saves instructions + lea r1, [r1+r2*2-mmsize+PAD] + lea r4, [rsp+PAD+gprsize] + mov r3d, COUNT +.v_loop: + movu m0, [r1] + sub r1, r2 + movu m1, [r1] + sub r1, r2 + movu m2, [r1] + sub r1, r2 + movu m3, [r1] + sub r1, r2 + movu m4, [r1] + sub r1, r2 +%assign i 0 +%rep %2-1 + FILT_VNRD m0, m1, m2, m3, m4, m5, m6, m7 + psubw m0, [pad20] + movu [r4+i*mmsize*3], m0 + sub r1, r2 + SWAP 0,1,2,3,4,5 +%assign i i+1 +%endrep + FILT_VNRD m0, m1, m2, m3, m4, m5, m6, m7 + psubw m0, [pad20] + movu [r4+i*mmsize*3], m0 + add r4, mmsize + lea r1, [r1+r2*8+mmsize] +%if %2==8 + lea r1, [r1+r2*4] +%endif + dec r3d + jg .v_loop + neg r2 + ret +%endmacro + +INIT_MMX +HV mmxext, 4 +INIT_XMM +HV sse2 , 8 + +%macro H_LOOP 2 +%if num_mmregs > 8 + %define s1 m8 + %define s2 m9 + %define s3 m10 + %define d1 m11 +%else + %define s1 [tap1] + %define s2 [tap2] + %define s3 [tap3] + %define d1 [depad] +%endif +h%2_loop_op_%1: + movu m1, [r1+mmsize-4] + movu m2, [r1+mmsize-2] + mova m3, [r1+mmsize+0] + movu m4, [r1+mmsize+2] + movu m5, [r1+mmsize+4] + movu m6, [r1+mmsize+6] +%if num_mmregs > 8 + pmaddwd m1, s1 + pmaddwd m2, s1 + pmaddwd m3, s2 + pmaddwd m4, s2 + pmaddwd m5, s3 + pmaddwd m6, s3 + paddd m1, d1 + paddd m2, d1 +%else + mova m0, s1 + pmaddwd m1, m0 + pmaddwd m2, m0 + mova m0, s2 + pmaddwd m3, m0 + pmaddwd m4, m0 + mova m0, s3 + pmaddwd m5, m0 + pmaddwd m6, m0 + mova m0, d1 + paddd m1, m0 + paddd m2, m0 +%endif + paddd m3, m5 + paddd m4, m6 + paddd m1, m3 + paddd m2, m4 + psrad m1, 10 + psrad m2, 10 + pslld m2, 16 + pand m1, [pd_0f] + por m1, m2 +%if num_mmregs <= 8 + pxor m0, m0 +%endif + CLIPW m1, m0, m7 + add r1, mmsize*3 + ret +%endmacro + +INIT_MMX +H_LOOP mmxext, 4 +INIT_XMM +H_LOOP sse2 , 8 + +%macro MC22 3 +cglobal_mc %1, %2, mc22, %3, 3,7,12 +%define PAD mmsize*8*4*2 ; SIZE*16*4*sizeof(pixel) + mov r6, rsp ; backup stack pointer + and rsp, ~(mmsize-1) ; align stack + sub rsp, PAD + + call put_hv%3_10_%1 + + mov r3d, %3 + mova m7, [pw_pixel_max] +%if num_mmregs > 8 + pxor m0, m0 + mova m8, [tap1] + mova m9, [tap2] + mova m10, [tap3] + mova m11, [depad] +%endif + mov r1, rsp +.h_loop: + call h%3_loop_op_%1 + + OP_MOV [r0], m1 + add r0, r2 + dec r3d + jg .h_loop + + mov rsp, r6 ; restore stack pointer + ret +%endmacro + +MC MC22 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc12(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro MC12 3 +cglobal_mc %1, %2, mc12, %3, 3,7,12 +%define PAD mmsize*8*4*2 ; SIZE*16*4*sizeof(pixel) + mov r6, rsp ; backup stack pointer + and rsp, ~(mmsize-1) ; align stack + sub rsp, PAD + + call put_hv%3_10_%1 + + xor r4d, r4d +.body + mov r3d, %3 + pxor m0, m0 + mova m7, [pw_pixel_max] +%if num_mmregs > 8 + mova m8, [tap1] + mova m9, [tap2] + mova m10, [tap3] + mova m11, [depad] +%endif + mov r1, rsp +.h_loop: + call h%3_loop_op_%1 + + movu m3, [r1+r4-2*mmsize] ; movu needed for mc32, etc + paddw m3, [depad2] + psrlw m3, 5 + psubw m3, [unpad] + CLIPW m3, m0, m7 + pavgw m1, m3 + + OP_MOV [r0], m1 + add r0, r2 + dec r3d + jg .h_loop + + mov rsp, r6 ; restore stack pointer + ret +%endmacro + +MC MC12 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc32(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro MC32 3 +cglobal_mc %1, %2, mc32, %3, 3,7,12 +%define PAD mmsize*8*3*2 ; SIZE*16*4*sizeof(pixel) + mov r6, rsp ; backup stack pointer + and rsp, ~(mmsize-1) ; align stack + sub rsp, PAD + + call put_hv%3_10_%1 + + mov r4d, 2 ; sizeof(pixel) + jmp stub_%2_h264_qpel%3_mc12_10_%1.body +%endmacro + +MC MC32 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc21(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro H_NRD 2 +put_h%2_10_%1: + add rsp, gprsize + mov r3d, %2 + xor r4d, r4d + mova m6, [pad20] +.nextrow + movu m2, [r5-4] + movu m3, [r5-2] + movu m4, [r5+0] + ADDW m2, [r5+6], m5 + ADDW m3, [r5+4], m5 + ADDW m4, [r5+2], m5 + + FILT_H2 m2, m3, m4 + psubw m2, m6 + mova [rsp+r4], m2 + add r4d, mmsize*3 + add r5, r2 + dec r3d + jg .nextrow + sub rsp, gprsize + ret +%endmacro + +INIT_MMX +H_NRD mmxext, 4 +INIT_XMM +H_NRD sse2 , 8 + +%macro MC21 3 +cglobal_mc %1, %2, mc21, %3, 3,7,12 + mov r5, r1 +.body +%define PAD mmsize*8*3*2 ; SIZE*16*4*sizeof(pixel) + mov r6, rsp ; backup stack pointer + and rsp, ~(mmsize-1) ; align stack + + sub rsp, PAD + call put_h%3_10_%1 + + sub rsp, PAD + call put_hv%3_10_%1 + + mov r4d, PAD-mmsize ; H buffer + jmp stub_%2_h264_qpel%3_mc12_10_%1.body +%endmacro + +MC MC21 + +;----------------------------------------------------------------------------- +; void h264_qpel_mc23(uint8_t *dst, uint8_t *src, int stride) +;----------------------------------------------------------------------------- +%macro MC23 3 +cglobal_mc %1, %2, mc23, %3, 3,7,12 + lea r5, [r1+r2] + jmp stub_%2_h264_qpel%3_mc21_10_%1.body +%endmacro + +MC MC23 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_qpel_mmx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_qpel_mmx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_qpel_mmx.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_qpel_mmx.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2004-2005 Michael Niedermayer, Loren Merritt + * Copyright (c) 2011 Daniel Kang * * This file is part of Libav. * @@ -398,7 +399,7 @@ "2: \n\t"\ \ : "+a"(src), "+c"(dst)\ - : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\ + : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\ : "memory"\ );\ src += 4-(h+5)*srcStride;\ @@ -446,7 +447,7 @@ QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\ "2: \n\t"\ : "+a"(src)\ - : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)\ + : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)\ : "memory"\ );\ tmp += 4;\ @@ -823,7 +824,7 @@ "2: \n\t"\ \ : "+a"(src), "+c"(dst)\ - : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\ + : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\ : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", \ "%xmm4", "%xmm5", "%xmm6", "%xmm7",)\ "memory"\ @@ -878,7 +879,7 @@ QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48) "2: \n\t" : "+a"(src) - : "c"(tmp), "S"((x86_reg)srcStride), "g"(size) + : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size) : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7",) "memory" @@ -1199,3 +1200,100 @@ H264_MC_816(H264_MC_H, ssse3) H264_MC_816(H264_MC_HV, ssse3) #endif + + + +//10bit +#define LUMA_MC_OP(OP, NUM, DEPTH, TYPE, OPT) \ +void ff_ ## OP ## _h264_qpel ## NUM ## _ ## TYPE ## _ ## DEPTH ## _ ## OPT \ + (uint8_t *dst, uint8_t *src, int stride); + +#define LUMA_MC_ALL(DEPTH, TYPE, OPT) \ + LUMA_MC_OP(put, 4, DEPTH, TYPE, OPT) \ + LUMA_MC_OP(avg, 4, DEPTH, TYPE, OPT) \ + LUMA_MC_OP(put, 8, DEPTH, TYPE, OPT) \ + LUMA_MC_OP(avg, 8, DEPTH, TYPE, OPT) \ + LUMA_MC_OP(put, 16, DEPTH, TYPE, OPT) \ + LUMA_MC_OP(avg, 16, DEPTH, TYPE, OPT) + +#define LUMA_MC_816(DEPTH, TYPE, OPT) \ + LUMA_MC_OP(put, 8, DEPTH, TYPE, OPT) \ + LUMA_MC_OP(avg, 8, DEPTH, TYPE, OPT) \ + LUMA_MC_OP(put, 16, DEPTH, TYPE, OPT) \ + LUMA_MC_OP(avg, 16, DEPTH, TYPE, OPT) + +LUMA_MC_ALL(10, mc00, mmxext) +LUMA_MC_ALL(10, mc10, mmxext) +LUMA_MC_ALL(10, mc20, mmxext) +LUMA_MC_ALL(10, mc30, mmxext) +LUMA_MC_ALL(10, mc01, mmxext) +LUMA_MC_ALL(10, mc11, mmxext) +LUMA_MC_ALL(10, mc21, mmxext) +LUMA_MC_ALL(10, mc31, mmxext) +LUMA_MC_ALL(10, mc02, mmxext) +LUMA_MC_ALL(10, mc12, mmxext) +LUMA_MC_ALL(10, mc22, mmxext) +LUMA_MC_ALL(10, mc32, mmxext) +LUMA_MC_ALL(10, mc03, mmxext) +LUMA_MC_ALL(10, mc13, mmxext) +LUMA_MC_ALL(10, mc23, mmxext) +LUMA_MC_ALL(10, mc33, mmxext) + +LUMA_MC_816(10, mc00, sse2) +LUMA_MC_816(10, mc10, sse2) +LUMA_MC_816(10, mc10, sse2_cache64) +LUMA_MC_816(10, mc10, ssse3_cache64) +LUMA_MC_816(10, mc20, sse2) +LUMA_MC_816(10, mc20, sse2_cache64) +LUMA_MC_816(10, mc20, ssse3_cache64) +LUMA_MC_816(10, mc30, sse2) +LUMA_MC_816(10, mc30, sse2_cache64) +LUMA_MC_816(10, mc30, ssse3_cache64) +LUMA_MC_816(10, mc01, sse2) +LUMA_MC_816(10, mc11, sse2) +LUMA_MC_816(10, mc21, sse2) +LUMA_MC_816(10, mc31, sse2) +LUMA_MC_816(10, mc02, sse2) +LUMA_MC_816(10, mc12, sse2) +LUMA_MC_816(10, mc22, sse2) +LUMA_MC_816(10, mc32, sse2) +LUMA_MC_816(10, mc03, sse2) +LUMA_MC_816(10, mc13, sse2) +LUMA_MC_816(10, mc23, sse2) +LUMA_MC_816(10, mc33, sse2) + +#define QPEL16_OPMC(OP, MC, MMX)\ +void ff_ ## OP ## _h264_qpel16_ ## MC ## _10_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ + ff_ ## OP ## _h264_qpel8_ ## MC ## _10_ ## MMX(dst , src , stride);\ + ff_ ## OP ## _h264_qpel8_ ## MC ## _10_ ## MMX(dst+16, src+16, stride);\ + src += 8*stride;\ + dst += 8*stride;\ + ff_ ## OP ## _h264_qpel8_ ## MC ## _10_ ## MMX(dst , src , stride);\ + ff_ ## OP ## _h264_qpel8_ ## MC ## _10_ ## MMX(dst+16, src+16, stride);\ +} + +#define QPEL16_OP(MC, MMX)\ +QPEL16_OPMC(put, MC, MMX)\ +QPEL16_OPMC(avg, MC, MMX) + +#define QPEL16(MMX)\ +QPEL16_OP(mc00, MMX)\ +QPEL16_OP(mc01, MMX)\ +QPEL16_OP(mc02, MMX)\ +QPEL16_OP(mc03, MMX)\ +QPEL16_OP(mc10, MMX)\ +QPEL16_OP(mc11, MMX)\ +QPEL16_OP(mc12, MMX)\ +QPEL16_OP(mc13, MMX)\ +QPEL16_OP(mc20, MMX)\ +QPEL16_OP(mc21, MMX)\ +QPEL16_OP(mc22, MMX)\ +QPEL16_OP(mc23, MMX)\ +QPEL16_OP(mc30, MMX)\ +QPEL16_OP(mc31, MMX)\ +QPEL16_OP(mc32, MMX)\ +QPEL16_OP(mc33, MMX) + +#if ARCH_X86_32 && HAVE_YASM // ARCH_X86_64 implies sse2+ +QPEL16(mmxext) +#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_weight_10bit.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_weight_10bit.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/h264_weight_10bit.asm 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/h264_weight_10bit.asm 2012-01-11 00:34:30.000000000 +0000 @@ -36,33 +36,27 @@ SECTION .text ;----------------------------------------------------------------------------- -; void h264_weight(uint8_t *dst, int stride, int log2_denom, +; void h264_weight(uint8_t *dst, int stride, int height, int log2_denom, ; int weight, int offset); ;----------------------------------------------------------------------------- -%ifdef ARCH_X86_32 -DECLARE_REG_TMP 2 -%else -DECLARE_REG_TMP 10 -%endif - -%macro WEIGHT_PROLOGUE 1 - mov t0, %1 +%macro WEIGHT_PROLOGUE 0 .prologue - PROLOGUE 0,5,8 + PROLOGUE 0,6,8 movifnidn r0, r0mp movifnidn r1d, r1m - movifnidn r3d, r3m + movifnidn r2d, r2m movifnidn r4d, r4m + movifnidn r5d, r5m %endmacro %macro WEIGHT_SETUP 1 mova m0, [pw_1] - movd m2, r2m + movd m2, r3m pslld m0, m2 ; 1< * * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/idct_sse2_xvid.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/idct_sse2_xvid.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/idct_sse2_xvid.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/idct_sse2_xvid.c 2012-01-11 00:34:30.000000000 +0000 @@ -43,7 +43,7 @@ #include "idct_xvid.h" #include "dsputil_mmx.h" -/*! +/** * @file * @brief SSE2 idct compatible with xvidmmx */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/idct_xvid.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/idct_xvid.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/idct_xvid.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/idct_xvid.h 2012-01-11 00:34:30.000000000 +0000 @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/*! +/** * @file * header for Xvid IDCT functions */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/imdct36_sse.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/imdct36_sse.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/imdct36_sse.asm 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/imdct36_sse.asm 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,721 @@ +;****************************************************************************** +;* 36 point SSE-optimized IMDCT transform +;* Copyright (c) 2011 Vitor Sessak +;* +;* This file is part of Libav. +;* +;* Libav is free software; you can redistribute it and/or +;* modify it under the terms of the GNU Lesser General Public +;* License as published by the Free Software Foundation; either +;* version 2.1 of the License, or (at your option) any later version. +;* +;* Libav is distributed in the hope that it will be useful, +;* but WITHOUT ANY WARRANTY; without even the implied warranty of +;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;* Lesser General Public License for more details. +;* +;* You should have received a copy of the GNU Lesser General Public +;* License along with Libav; if not, write to the Free Software +;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;****************************************************************************** + +%include "libavutil/x86/x86inc.asm" +%include "libavutil/x86/x86util.asm" + +SECTION_RODATA + +align 16 +ps_mask: dd 0, ~0, ~0, ~0 +ps_mask2: dd 0, ~0, 0, ~0 +ps_mask3: dd 0, 0, 0, ~0 +ps_mask4: dd 0, ~0, 0, 0 + +ps_val1: dd -0.5, -0.5, -0.8660254038, -0.8660254038 +ps_val2: dd 1.0, 1.0, 0.8660254038, 0.8660254038 +ps_val3: dd 0.1736481777, 0.1736481777, 0.3420201433, 0.3420201433 +ps_val4: dd -0.7660444431, -0.7660444431, 0.8660254038, 0.8660254038 +ps_val5: dd -0.9396926208, -0.9396926208, -0.9848077530, -0.9848077530 +ps_val6: dd 0.5, 0.5, -0.6427876097, -0.6427876097 +ps_val7: dd 1.0, 1.0, -0.6427876097, -0.6427876097 + +ps_p1p1m1m1: dd 0, 0, 0x80000000, 0x80000000 +ps_p1m1p1m1: dd 0, 0x80000000, 0, 0x80000000 + +ps_cosh: dd 1.0, 0.50190991877167369479, 1.0, 5.73685662283492756461 + dd 1.0, 0.51763809020504152469, 1.0, 1.93185165257813657349 + dd 1.0, 0.55168895948124587824, -1.0, -1.18310079157624925896 + dd 1.0, 0.61038729438072803416, -1.0, -0.87172339781054900991 + dd 1.0, 0.70710678118654752439, 0.0, 0.0 + +ps_cosh_sse3: dd 1.0, -0.50190991877167369479, 1.0, -5.73685662283492756461 + dd 1.0, -0.51763809020504152469, 1.0, -1.93185165257813657349 + dd 1.0, -0.55168895948124587824, -1.0, 1.18310079157624925896 + dd 1.0, -0.61038729438072803416, -1.0, 0.87172339781054900991 + dd 1.0, 0.70710678118654752439, 0.0, 0.0 + +costabs: times 4 dd 0.98480773 + times 4 dd 0.93969262 + times 4 dd 0.86602539 + times 4 dd -0.76604444 + times 4 dd -0.64278764 + times 4 dd 0.50000000 + times 4 dd -0.50000000 + times 4 dd -0.34202015 + times 4 dd -0.17364818 + times 4 dd 0.50190992 + times 4 dd 0.51763808 + times 4 dd 0.55168896 + times 4 dd 0.61038726 + times 4 dd 0.70710677 + times 4 dd 0.87172341 + times 4 dd 1.18310082 + times 4 dd 1.93185163 + times 4 dd 5.73685646 + +%define SBLIMIT 32 +SECTION_TEXT + +%macro PSHUFD 3 +%if cpuflag(sse2) && notcpuflag(avx) + pshufd %1, %2, %3 +%else + shufps %1, %2, %2, %3 +%endif +%endmacro + +; input %2={x1,x2,x3,x4}, %3={y1,y2,y3,y4} +; output %1={x3,x4,y1,y2} +%macro BUILDINVHIGHLOW 3 +%if cpuflag(avx) + shufps %1, %2, %3, 0x4e +%else + movlhps %1, %3 + movhlps %1, %2 +%endif +%endmacro + +; input %2={x1,x2,x3,x4}, %3={y1,y2,y3,y4} +; output %1={x4,y1,y2,y3} +%macro ROTLEFT 3 +%if cpuflag(ssse3) + palignr %1, %3, %2, 12 +%else + BUILDINVHIGHLOW %1, %2, %3 + shufps %1, %1, %3, 0x99 +%endif +%endmacro + +%macro INVERTHL 2 +%if cpuflag(sse2) + PSHUFD %1, %2, 0x4e +%else + movhlps %1, %2 + movlhps %1, %2 +%endif +%endmacro + +%macro BUTTERF 3 + INVERTHL %2, %1 + xorps %1, [ps_p1p1m1m1] + addps %1, %2 +%if cpuflag(sse3) + mulps %1, %1, [ps_cosh_sse3 + %3] + PSHUFD %2, %1, 0xb1 + addsubps %1, %1, %2 +%else + mulps %1, [ps_cosh + %3] + PSHUFD %2, %1, 0xb1 + xorps %1, [ps_p1m1p1m1] + addps %1, %2 +%endif +%endmacro + +%macro STORE 4 + movhlps %2, %1 + movss [%3 ], %1 + movss [%3 + 2*%4], %2 + shufps %1, %1, 0xb1 + movss [%3 + %4], %1 + movhlps %2, %1 + movss [%3 + 3*%4], %2 +%endmacro + +%macro LOAD 4 + movlps %1, [%3 ] + movhps %1, [%3 + %4] + movlps %2, [%3 + 2*%4] + movhps %2, [%3 + 3*%4] + shufps %1, %2, 0x88 +%endmacro + +%macro LOADA64 2 +%if cpuflag(avx) + movu %1, [%2] +%else + movlps %1, [%2] + movhps %1, [%2 + 8] +%endif +%endmacro + +%macro DEFINE_IMDCT 0 +cglobal imdct36_float, 4,4,9, out, buf, in, win + + ; for(i=17;i>=1;i--) in[i] += in[i-1]; + LOADA64 m0, inq + LOADA64 m1, inq + 16 + + ROTLEFT m5, m0, m1 + + PSHUFD m6, m0, 0x93 + andps m6, m6, [ps_mask] + addps m0, m0, m6 + + LOADA64 m2, inq + 32 + + ROTLEFT m7, m1, m2 + + addps m1, m1, m5 + LOADA64 m3, inq + 48 + + ROTLEFT m5, m2, m3 + + xorps m4, m4, m4 + movlps m4, [inq+64] + BUILDINVHIGHLOW m6, m3, m4 + shufps m6, m6, m4, 0xa9 + + addps m4, m4, m6 + addps m2, m2, m7 + addps m3, m3, m5 + + ; for(i=17;i>=3;i-=2) in[i] += in[i-2]; + movlhps m5, m5, m0 + andps m5, m5, [ps_mask3] + + BUILDINVHIGHLOW m7, m0, m1 + andps m7, m7, [ps_mask2] + + addps m0, m0, m5 + + BUILDINVHIGHLOW m6, m1, m2 + andps m6, m6, [ps_mask2] + + addps m1, m1, m7 + + BUILDINVHIGHLOW m7, m2, m3 + andps m7, m7, [ps_mask2] + + addps m2, m2, m6 + + movhlps m6, m6, m3 + andps m6, m6, [ps_mask4] + + addps m3, m3, m7 + addps m4, m4, m6 + + ; Populate tmp[] + movlhps m6, m1, m5 ; zero out high values + subps m6, m6, m4 + + subps m5, m0, m3 + +%ifdef ARCH_X86_64 + SWAP m5, m8 +%endif + + mulps m7, m2, [ps_val1] + +%ifdef ARCH_X86_64 + mulps m5, m8, [ps_val2] +%else + mulps m5, m5, [ps_val2] +%endif + addps m7, m7, m5 + + mulps m5, m6, [ps_val1] + subps m7, m7, m5 + +%ifdef ARCH_X86_64 + SWAP m5, m8 +%else + subps m5, m0, m3 +%endif + + subps m5, m5, m6 + addps m5, m5, m2 + + shufps m6, m4, m3, 0xe4 + subps m6, m6, m2 + mulps m6, m6, [ps_val3] + + addps m4, m4, m1 + mulps m4, m4, [ps_val4] + + shufps m1, m1, m0, 0xe4 + addps m1, m1, m2 + mulps m1, m1, [ps_val5] + + mulps m3, m3, [ps_val6] + mulps m0, m0, [ps_val7] + addps m0, m0, m3 + + xorps m2, m1, [ps_p1p1m1m1] + subps m2, m2, m4 + addps m2, m2, m0 + + addps m3, m4, m0 + subps m3, m3, m6 + xorps m3, m3, [ps_p1p1m1m1] + + shufps m0, m0, m4, 0xe4 + subps m0, m0, m1 + addps m0, m0, m6 + + BUILDINVHIGHLOW m4, m2, m3 + shufps m3, m3, m2, 0x4e + + ; we have tmp = {SwAPLH(m0), SwAPLH(m7), m3, m4, m5} + + BUTTERF m0, m1, 0 + BUTTERF m7, m2, 16 + BUTTERF m3, m6, 32 + BUTTERF m4, m1, 48 + + mulps m5, m5, [ps_cosh + 64] + PSHUFD m1, m5, 0xe1 + xorps m5, m5, [ps_p1m1p1m1] + addps m5, m5, m1 + + ; permutates: + ; m0 0 1 2 3 => 2 6 10 14 m1 + ; m7 4 5 6 7 => 3 7 11 15 m2 + ; m3 8 9 10 11 => 17 13 9 5 m3 + ; m4 12 13 14 15 => 16 12 8 4 m5 + ; m5 16 17 xx xx => 0 1 xx xx m0 + + unpckhps m1, m0, m7 + unpckhps m6, m3, m4 + movhlps m2, m6, m1 + movlhps m1, m1, m6 + + unpcklps m5, m5, m4 + unpcklps m3, m3, m7 + movhlps m4, m3, m5 + movlhps m5, m5, m3 + SWAP m4, m3 + ; permutation done + + PSHUFD m6, m2, 0xb1 + movss m4, [bufq + 4*68] + movss m7, [bufq + 4*64] + unpcklps m7, m7, m4 + mulps m6, m6, [winq + 16*4] + addps m6, m6, m7 + movss [outq + 64*SBLIMIT], m6 + shufps m6, m6, m6, 0xb1 + movss [outq + 68*SBLIMIT], m6 + + mulps m6, m3, [winq + 4*4] + LOAD m4, m7, bufq + 4*16, 16 + addps m6, m6, m4 + STORE m6, m7, outq + 16*SBLIMIT, 4*SBLIMIT + + shufps m4, m0, m3, 0xb5 + mulps m4, m4, [winq + 8*4] + LOAD m7, m6, bufq + 4*32, 16 + addps m4, m4, m7 + STORE m4, m6, outq + 32*SBLIMIT, 4*SBLIMIT + + shufps m3, m3, m2, 0xb1 + mulps m3, m3, [winq + 12*4] + LOAD m7, m6, bufq + 4*48, 16 + addps m3, m3, m7 + STORE m3, m7, outq + 48*SBLIMIT, 4*SBLIMIT + + mulps m2, m2, [winq] + LOAD m6, m7, bufq, 16 + addps m2, m2, m6 + STORE m2, m7, outq, 4*SBLIMIT + + mulps m4, m1, [winq + 20*4] + STORE m4, m7, bufq, 16 + + mulps m3, m5, [winq + 24*4] + STORE m3, m7, bufq + 4*16, 16 + + shufps m0, m0, m5, 0xb0 + mulps m0, m0, [winq + 28*4] + STORE m0, m7, bufq + 4*32, 16 + + shufps m5, m5, m1, 0xb1 + mulps m5, m5, [winq + 32*4] + STORE m5, m7, bufq + 4*48, 16 + + shufps m1, m1, m1, 0xb1 + mulps m1, m1, [winq + 36*4] + movss [bufq + 4*64], m1 + shufps m1, m1, 0xb1 + movss [bufq + 4*68], m1 + RET +%endmacro + +INIT_XMM sse +DEFINE_IMDCT + +INIT_XMM sse2 +DEFINE_IMDCT + +INIT_XMM sse3 +DEFINE_IMDCT + +INIT_XMM ssse3 +DEFINE_IMDCT + +INIT_XMM avx +DEFINE_IMDCT + +INIT_XMM sse + +%ifdef ARCH_X86_64 +%define SPILL SWAP +%define UNSPILL SWAP +%define SPILLED(x) m %+ x +%else +%define SPILLED(x) [tmpq+(x-8)*16 + 32*4] +%macro SPILL 2 ; xmm#, mempos + movaps SPILLED(%2), m%1 +%endmacro +%macro UNSPILL 2 + movaps m%1, SPILLED(%2) +%endmacro +%endif + +%macro DEFINE_FOUR_IMDCT 0 +cglobal four_imdct36_float, 5,5,8, out, buf, in, win, tmp + movlps m0, [inq+64] + movhps m0, [inq+64 + 72] + movlps m3, [inq+64 + 2*72] + movhps m3, [inq+64 + 3*72] + + shufps m5, m0, m3, 0xdd + shufps m0, m0, m3, 0x88 + + mova m1, [inq+48] + movu m6, [inq+48 + 72] + mova m7, [inq+48 + 2*72] + movu m3, [inq+48 + 3*72] + + TRANSPOSE4x4PS 1, 6, 7, 3, 4 + + addps m4, m6, m7 + mova [tmpq+4*28], m4 + + addps m7, m3 + addps m6, m1 + addps m3, m0 + addps m0, m5 + addps m0, m7 + addps m7, m6 + mova [tmpq+4*12], m7 + SPILL 3, 12 + + mova m4, [inq+32] + movu m5, [inq+32 + 72] + mova m2, [inq+32 + 2*72] + movu m7, [inq+32 + 3*72] + + TRANSPOSE4x4PS 4, 5, 2, 7, 3 + + addps m1, m7 + SPILL 1, 11 + + addps m3, m5, m2 + SPILL 3, 13 + + addps m7, m2 + addps m5, m4 + addps m6, m7 + mova [tmpq], m6 + addps m7, m5 + mova [tmpq+4*16], m7 + + mova m2, [inq+16] + movu m7, [inq+16 + 72] + mova m1, [inq+16 + 2*72] + movu m6, [inq+16 + 3*72] + + TRANSPOSE4x4PS 2, 7, 1, 6, 3 + + addps m4, m6 + addps m6, m1 + addps m1, m7 + addps m7, m2 + addps m5, m6 + SPILL 5, 15 + addps m6, m7 + mulps m6, [costabs + 16*2] + mova [tmpq+4*8], m6 + SPILL 1, 10 + SPILL 0, 14 + + mova m1, [inq] + movu m6, [inq + 72] + mova m3, [inq + 2*72] + movu m5, [inq + 3*72] + + TRANSPOSE4x4PS 1, 6, 3, 5, 0 + + addps m2, m5 + addps m5, m3 + addps m7, m5 + addps m3, m6 + addps m6, m1 + SPILL 7, 8 + addps m5, m6 + SPILL 6, 9 + addps m6, m4, SPILLED(12) + subps m6, m2 + UNSPILL 7, 11 + SPILL 5, 11 + subps m5, m1, m7 + mulps m7, [costabs + 16*5] + addps m7, m1 + mulps m0, m6, [costabs + 16*6] + addps m0, m5 + mova [tmpq+4*24], m0 + addps m6, m5 + mova [tmpq+4*4], m6 + addps m6, m4, m2 + mulps m6, [costabs + 16*1] + subps m4, SPILLED(12) + mulps m4, [costabs + 16*8] + addps m2, SPILLED(12) + mulps m2, [costabs + 16*3] + subps m5, m7, m6 + subps m5, m2 + addps m6, m7 + addps m6, m4 + addps m7, m2 + subps m7, m4 + mova [tmpq+4*20], m7 + mova m2, [tmpq+4*28] + mova [tmpq+4*28], m5 + UNSPILL 7, 13 + subps m5, m7, m2 + mulps m5, [costabs + 16*7] + UNSPILL 1, 10 + mulps m1, [costabs + 16*2] + addps m4, m3, m2 + mulps m4, [costabs + 16*4] + addps m2, m7 + addps m7, m3 + mulps m7, [costabs] + subps m3, m2 + mulps m3, [costabs + 16*2] + addps m2, m7, m5 + addps m2, m1 + SPILL 2, 10 + addps m7, m4 + subps m7, m1 + SPILL 7, 12 + subps m5, m4 + subps m5, m1 + UNSPILL 0, 14 + SPILL 5, 13 + addps m1, m0, SPILLED(15) + subps m1, SPILLED(8) + mova m4, [costabs + 16*5] + mulps m4, [tmpq] + UNSPILL 2, 9 + addps m4, m2 + subps m2, [tmpq] + mulps m5, m1, [costabs + 16*6] + addps m5, m2 + SPILL 5, 9 + addps m2, m1 + SPILL 2, 14 + UNSPILL 5, 15 + subps m7, m5, m0 + addps m5, SPILLED(8) + mulps m5, [costabs + 16*1] + mulps m7, [costabs + 16*8] + addps m0, SPILLED(8) + mulps m0, [costabs + 16*3] + subps m2, m4, m5 + subps m2, m0 + SPILL 2, 15 + addps m5, m4 + addps m5, m7 + addps m4, m0 + subps m4, m7 + SPILL 4, 8 + mova m7, [tmpq+4*16] + mova m2, [tmpq+4*12] + addps m0, m7, m2 + subps m0, SPILLED(11) + mulps m0, [costabs + 16*2] + addps m4, m7, SPILLED(11) + mulps m4, [costabs] + subps m7, m2 + mulps m7, [costabs + 16*7] + addps m2, SPILLED(11) + mulps m2, [costabs + 16*4] + addps m1, m7, [tmpq+4*8] + addps m1, m4 + addps m4, m2 + subps m4, [tmpq+4*8] + SPILL 4, 11 + subps m7, m2 + subps m7, [tmpq+4*8] + addps m4, m6, SPILLED(10) + subps m6, SPILLED(10) + addps m2, m5, m1 + mulps m2, [costabs + 16*9] + subps m5, m1 + mulps m5, [costabs + 16*17] + subps m1, m4, m2 + addps m4, m2 + mulps m2, m1, [winq+4*36] + addps m2, [bufq+4*36] + mova [outq+1152], m2 + mulps m1, [winq+4*32] + addps m1, [bufq+4*32] + mova [outq+1024], m1 + mulps m1, m4, [winq+4*116] + mova [bufq+4*36], m1 + mulps m4, [winq+4*112] + mova [bufq+4*32], m4 + addps m2, m6, m5 + subps m6, m5 + mulps m1, m6, [winq+4*68] + addps m1, [bufq+4*68] + mova [outq+2176], m1 + mulps m6, [winq] + addps m6, [bufq] + mova [outq], m6 + mulps m1, m2, [winq+4*148] + mova [bufq+4*68], m1 + mulps m2, [winq+4*80] + mova [bufq], m2 + addps m5, m3, [tmpq+4*24] + mova m2, [tmpq+4*24] + subps m2, m3 + mova m1, SPILLED(9) + subps m1, m0 + mulps m1, [costabs + 16*10] + addps m0, SPILLED(9) + mulps m0, [costabs + 16*16] + addps m6, m5, m1 + subps m5, m1 + mulps m3, m5, [winq+4*40] + addps m3, [bufq+4*40] + mova [outq+1280], m3 + mulps m5, [winq+4*28] + addps m5, [bufq+4*28] + mova [outq+896], m5 + mulps m1, m6, [winq+4*120] + mova [bufq+4*40], m1 + mulps m6, [winq+4*108] + mova [bufq+4*28], m6 + addps m1, m2, m0 + subps m2, m0 + mulps m5, m2, [winq+4*64] + addps m5, [bufq+4*64] + mova [outq+2048], m5 + mulps m2, [winq+4*4] + addps m2, [bufq+4*4] + mova [outq+128], m2 + mulps m0, m1, [winq+4*144] + mova [bufq+4*64], m0 + mulps m1, [winq+4*84] + mova [bufq+4*4], m1 + mova m1, [tmpq+4*28] + mova m5, m1 + addps m1, SPILLED(13) + subps m5, SPILLED(13) + UNSPILL 3, 15 + addps m2, m7, m3 + mulps m2, [costabs + 16*11] + subps m3, m7 + mulps m3, [costabs + 16*15] + addps m0, m2, m1 + subps m1, m2 + SWAP m0, m2 + mulps m6, m1, [winq+4*44] + addps m6, [bufq+4*44] + mova [outq+1408], m6 + mulps m1, [winq+4*24] + addps m1, [bufq+4*24] + mova [outq+768], m1 + mulps m0, m2, [winq+4*124] + mova [bufq+4*44], m0 + mulps m2, [winq+4*104] + mova [bufq+4*24], m2 + addps m0, m5, m3 + subps m5, m3 + mulps m1, m5, [winq+4*60] + addps m1, [bufq+4*60] + mova [outq+1920], m1 + mulps m5, [winq+4*8] + addps m5, [bufq+4*8] + mova [outq+256], m5 + mulps m1, m0, [winq+4*140] + mova [bufq+4*60], m1 + mulps m0, [winq+4*88] + mova [bufq+4*8], m0 + mova m1, [tmpq+4*20] + addps m1, SPILLED(12) + mova m2, [tmpq+4*20] + subps m2, SPILLED(12) + UNSPILL 7, 8 + subps m0, m7, SPILLED(11) + addps m7, SPILLED(11) + mulps m4, m7, [costabs + 16*12] + mulps m0, [costabs + 16*14] + addps m5, m1, m4 + subps m1, m4 + mulps m7, m1, [winq+4*48] + addps m7, [bufq+4*48] + mova [outq+1536], m7 + mulps m1, [winq+4*20] + addps m1, [bufq+4*20] + mova [outq+640], m1 + mulps m1, m5, [winq+4*128] + mova [bufq+4*48], m1 + mulps m5, [winq+4*100] + mova [bufq+4*20], m5 + addps m6, m2, m0 + subps m2, m0 + mulps m1, m2, [winq+4*56] + addps m1, [bufq+4*56] + mova [outq+1792], m1 + mulps m2, [winq+4*12] + addps m2, [bufq+4*12] + mova [outq+384], m2 + mulps m0, m6, [winq+4*136] + mova [bufq+4*56], m0 + mulps m6, [winq+4*92] + mova [bufq+4*12], m6 + UNSPILL 0, 14 + mulps m0, [costabs + 16*13] + mova m3, [tmpq+4*4] + addps m2, m0, m3 + subps m3, m0 + mulps m0, m3, [winq+4*52] + addps m0, [bufq+4*52] + mova [outq+1664], m0 + mulps m3, [winq+4*16] + addps m3, [bufq+4*16] + mova [outq+512], m3 + mulps m0, m2, [winq+4*132] + mova [bufq+4*52], m0 + mulps m2, [winq+4*96] + mova [bufq+4*16], m2 + RET +%endmacro + +INIT_XMM sse +DEFINE_FOUR_IMDCT + +INIT_XMM avx +DEFINE_FOUR_IMDCT diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/Makefile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/Makefile 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/Makefile 2012-01-11 00:34:30.000000000 +0000 @@ -9,6 +9,9 @@ YASM-OBJS-$(CONFIG_FFT) += x86/fft_mmx.o \ $(YASM-OBJS-FFT-yes) +YASM-OBJS-$(CONFIG_H264CHROMA) += x86/h264_chromamc.o \ + x86/h264_chromamc_10bit.o + MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_mmx.o YASM-OBJS-$(CONFIG_H264DSP) += x86/h264_deblock.o \ x86/h264_deblock_10bit.o \ @@ -21,16 +24,22 @@ x86/h264_intrapred_10bit.o MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o +MMX-OBJS-$(CONFIG_RV40_DECODER) += x86/rv40dsp.o \ + YASM-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_yasm.o MMX-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp_mmx.o YASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp.o MMX-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp_mmx.o +MMX-OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhd_mmx.o MMX-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/mpegaudiodec_mmx.o +YASM-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/imdct36_sse.o MMX-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_mmx.o YASM-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_yasm.o MMX-OBJS-$(CONFIG_GPL) += x86/idct_mmx.o MMX-OBJS-$(CONFIG_LPC) += x86/lpc_mmx.o +YASM-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp.o +MMX-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp-init.o MMX-OBJS-$(CONFIG_DWT) += x86/snowdsp_mmx.o MMX-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_mmx.o YASM-OBJS-$(CONFIG_VP3_DECODER) += x86/vp3dsp.o @@ -44,14 +53,12 @@ MMX-OBJS-$(HAVE_YASM) += x86/dsputil_yasm.o \ x86/deinterlace.o \ x86/fmtconvert.o \ - x86/h264_chromamc.o \ - x86/h264_chromamc_10bit.o \ + x86/h264_qpel_10bit.o \ $(YASM-OBJS-yes) MMX-OBJS-$(CONFIG_FFT) += x86/fft.o -OBJS-$(HAVE_MMX) += x86/dnxhd_mmx.o \ - x86/dsputil_mmx.o \ +OBJS-$(HAVE_MMX) += x86/dsputil_mmx.o \ x86/fdct_mmx.o \ x86/fmtconvert_mmx.o \ x86/idct_mmx_xvid.o \ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/mlpdsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/mlpdsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/mlpdsp.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/mlpdsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,7 @@ #include "libavcodec/dsputil.h" #include "libavcodec/mlp.h" -#if HAVE_7REGS && HAVE_TEN_OPERANDS +#if HAVE_7REGS extern void ff_mlp_firorder_8; extern void ff_mlp_firorder_7; @@ -171,11 +171,11 @@ ); } -#endif /* HAVE_7REGS && HAVE_TEN_OPERANDS */ +#endif /* HAVE_7REGS */ void ff_mlp_init_x86(DSPContext* c, AVCodecContext *avctx) { -#if HAVE_7REGS && HAVE_TEN_OPERANDS +#if HAVE_7REGS c->mlp_filter_channel = mlp_filter_channel_x86; #endif } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/mpegaudiodec_mmx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/mpegaudiodec_mmx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/mpegaudiodec_mmx.c 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/mpegaudiodec_mmx.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,6 +24,18 @@ #include "libavcodec/dsputil.h" #include "libavcodec/mpegaudiodsp.h" +void ff_imdct36_float_sse(float *out, float *buf, float *in, float *win); +void ff_imdct36_float_sse2(float *out, float *buf, float *in, float *win); +void ff_imdct36_float_sse3(float *out, float *buf, float *in, float *win); +void ff_imdct36_float_ssse3(float *out, float *buf, float *in, float *win); +void ff_imdct36_float_avx(float *out, float *buf, float *in, float *win); +void ff_four_imdct36_float_sse(float *out, float *buf, float *in, float *win, + float *tmpbuf); +void ff_four_imdct36_float_avx(float *out, float *buf, float *in, float *win, + float *tmpbuf); + +DECLARE_ALIGNED(16, static float, mdct_win_sse)[2][4][4*40]; + #define MACS(rt, ra, rb) rt+=(ra)*(rb) #define MLSS(rt, ra, rb) rt-=(ra)*(rb) @@ -147,11 +159,79 @@ *out = sum; } + +#define DECL_IMDCT_BLOCKS(CPU1, CPU2) \ +static void imdct36_blocks_ ## CPU1(float *out, float *buf, float *in, \ + int count, int switch_point, int block_type) \ +{ \ + int align_end = count - (count & 3); \ + int j; \ + for (j = 0; j < align_end; j+= 4) { \ + LOCAL_ALIGNED_16(float, tmpbuf, [1024]); \ + float *win = mdct_win_sse[switch_point && j < 4][block_type]; \ + /* apply window & overlap with previous buffer */ \ + \ + /* select window */ \ + ff_four_imdct36_float_ ## CPU2(out, buf, in, win, tmpbuf); \ + in += 4*18; \ + buf += 4*18; \ + out += 4; \ + } \ + for (; j < count; j++) { \ + /* apply window & overlap with previous buffer */ \ + \ + /* select window */ \ + int win_idx = (switch_point && j < 2) ? 0 : block_type; \ + float *win = ff_mdct_win_float[win_idx + (4 & -(j & 1))]; \ + \ + ff_imdct36_float_ ## CPU1(out, buf, in, win); \ + \ + in += 18; \ + buf++; \ + out++; \ + } \ +} + +DECL_IMDCT_BLOCKS(sse,sse) +DECL_IMDCT_BLOCKS(sse2,sse) +DECL_IMDCT_BLOCKS(sse3,sse) +DECL_IMDCT_BLOCKS(ssse3,sse) +DECL_IMDCT_BLOCKS(avx,avx) + void ff_mpadsp_init_mmx(MPADSPContext *s) { int mm_flags = av_get_cpu_flags(); + int i, j; + for (j = 0; j < 4; j++) { + for (i = 0; i < 40; i ++) { + mdct_win_sse[0][j][4*i ] = ff_mdct_win_float[j ][i]; + mdct_win_sse[0][j][4*i + 1] = ff_mdct_win_float[j + 4][i]; + mdct_win_sse[0][j][4*i + 2] = ff_mdct_win_float[j ][i]; + mdct_win_sse[0][j][4*i + 3] = ff_mdct_win_float[j + 4][i]; + mdct_win_sse[1][j][4*i ] = ff_mdct_win_float[0 ][i]; + mdct_win_sse[1][j][4*i + 1] = ff_mdct_win_float[4 ][i]; + mdct_win_sse[1][j][4*i + 2] = ff_mdct_win_float[j ][i]; + mdct_win_sse[1][j][4*i + 3] = ff_mdct_win_float[j + 4][i]; + } + } + if (mm_flags & AV_CPU_FLAG_SSE2) { s->apply_window_float = apply_window_mp3; } +#if HAVE_YASM + if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) { + s->imdct36_blocks_float = imdct36_blocks_avx; +#if HAVE_SSE + } else if (mm_flags & AV_CPU_FLAG_SSSE3) { + s->imdct36_blocks_float = imdct36_blocks_ssse3; + } else if (mm_flags & AV_CPU_FLAG_SSE3) { + s->imdct36_blocks_float = imdct36_blocks_sse3; + } else if (mm_flags & AV_CPU_FLAG_SSE2) { + s->imdct36_blocks_float = imdct36_blocks_sse2; + } else if (mm_flags & AV_CPU_FLAG_SSE) { + s->imdct36_blocks_float = imdct36_blocks_sse; +#endif /* HAVE_SSE */ + } +#endif /* HAVE_YASM */ } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/mpegvideo_mmx_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/mpegvideo_mmx_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/mpegvideo_mmx_template.c 2011-05-01 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/mpegvideo_mmx_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -98,7 +98,7 @@ x86_reg last_non_zero_p1; int level=0, q; //=0 is because gcc says uninitialized ... const uint16_t *qmat, *bias; - DECLARE_ALIGNED(16, int16_t, temp_block)[64]; + LOCAL_ALIGNED_16(int16_t, temp_block, [64]); assert((7&(int)(&temp_block[0])) == 0); //did gcc align it correctly? diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/proresdsp.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/proresdsp.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/proresdsp.asm 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/proresdsp.asm 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,432 @@ +;****************************************************************************** +;* x86-SIMD-optimized IDCT for prores +;* this is identical to "simple" IDCT except for the clip range +;* +;* Copyright (c) 2011 Ronald S. Bultje +;* +;* This file is part of Libav. +;* +;* Libav is free software; you can redistribute it and/or +;* modify it under the terms of the GNU Lesser General Public +;* License as published by the Free Software Foundation; either +;* version 2.1 of the License, or (at your option) any later version. +;* +;* Libav is distributed in the hope that it will be useful, +;* but WITHOUT ANY WARRANTY; without even the implied warranty of +;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;* Lesser General Public License for more details. +;* +;* You should have received a copy of the GNU Lesser General Public +;* License along with Libav; if not, write to the Free Software +;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;****************************************************************************** + +%include "x86inc.asm" +%include "x86util.asm" + +%define W1sh2 22725 ; W1 = 90901 = 22725<<2 + 1 +%define W2sh2 21407 ; W2 = 85627 = 21407<<2 - 1 +%define W3sh2 19265 ; W3 = 77062 = 19265<<2 + 2 +%define W4sh2 16384 ; W4 = 65535 = 16384<<2 - 1 +%define W5sh2 12873 ; W5 = 51491 = 12873<<2 - 1 +%define W6sh2 8867 ; W6 = 35468 = 8867<<2 +%define W7sh2 4520 ; W7 = 18081 = 4520<<2 + 1 + +%ifdef ARCH_X86_64 + +SECTION_RODATA + +w4_plus_w2: times 4 dw W4sh2, +W2sh2 +w4_min_w2: times 4 dw W4sh2, -W2sh2 +w4_plus_w6: times 4 dw W4sh2, +W6sh2 +w4_min_w6: times 4 dw W4sh2, -W6sh2 +w1_plus_w3: times 4 dw W1sh2, +W3sh2 +w3_min_w1: times 4 dw W3sh2, -W1sh2 +w7_plus_w3: times 4 dw W7sh2, +W3sh2 +w3_min_w7: times 4 dw W3sh2, -W7sh2 +w1_plus_w5: times 4 dw W1sh2, +W5sh2 +w5_min_w1: times 4 dw W5sh2, -W1sh2 +w5_plus_w7: times 4 dw W5sh2, +W7sh2 +w7_min_w5: times 4 dw W7sh2, -W5sh2 +row_round: times 8 dw (1<<14) + +cextern pw_4 +cextern pw_8 +cextern pw_512 +cextern pw_1019 + +section .text align=16 + +; interleave data while maintaining source +; %1=type, %2=dstlo, %3=dsthi, %4=src, %5=interleave +%macro SBUTTERFLY3 5 + punpckl%1 m%2, m%4, m%5 + punpckh%1 m%3, m%4, m%5 +%endmacro + +; %1/%2=src1/dst1, %3/%4=dst2, %5/%6=src2, %7=shift +; action: %3/%4 = %1/%2 - %5/%6; %1/%2 += %5/%6 +; %1/%2/%3/%4 >>= %7; dword -> word (in %1/%3) +%macro SUMSUB_SHPK 7 + psubd %3, %1, %5 ; { a0 - b0 }[0-3] + psubd %4, %2, %6 ; { a0 - b0 }[4-7] + paddd %1, %5 ; { a0 + b0 }[0-3] + paddd %2, %6 ; { a0 + b0 }[4-7] + psrad %1, %7 + psrad %2, %7 + psrad %3, %7 + psrad %4, %7 + packssdw %1, %2 ; row[0] + packssdw %3, %4 ; row[7] +%endmacro + +; %1 = row or col (for rounding variable) +; %2 = number of bits to shift at the end +; %3 = optimization +%macro IDCT_1D 3 + ; a0 = (W4 * row[0]) + (1 << (15 - 1)); + ; a1 = a0; + ; a2 = a0; + ; a3 = a0; + ; a0 += W2 * row[2]; + ; a1 += W6 * row[2]; + ; a2 -= W6 * row[2]; + ; a3 -= W2 * row[2]; +%ifidn %1, col + paddw m10,[pw_8] +%endif + SBUTTERFLY3 wd, 0, 1, 10, 8 ; { row[0], row[2] }[0-3]/[4-7] +%ifidn %1, row + psubw m10,[row_round] +%endif + SIGNEXTEND m8, m9, m14 ; { row[2] }[0-3] / [4-7] + SIGNEXTEND m10, m11, m14 ; { row[0] }[0-3] / [4-7] + pmaddwd m2, m0, [w4_plus_w6] + pmaddwd m3, m1, [w4_plus_w6] + pmaddwd m4, m0, [w4_min_w6] + pmaddwd m5, m1, [w4_min_w6] + pmaddwd m6, m0, [w4_min_w2] + pmaddwd m7, m1, [w4_min_w2] + pmaddwd m0, [w4_plus_w2] + pmaddwd m1, [w4_plus_w2] + pslld m2, 2 + pslld m3, 2 + pslld m4, 2 + pslld m5, 2 + pslld m6, 2 + pslld m7, 2 + pslld m0, 2 + pslld m1, 2 + + ; a0: -1*row[0]-1*row[2] + ; a1: -1*row[0] + ; a2: -1*row[0] + ; a3: -1*row[0]+1*row[2] + psubd m2, m10 ; a1[0-3] + psubd m3, m11 ; a1[4-7] + psubd m4, m10 ; a2[0-3] + psubd m5, m11 ; a2[4-7] + psubd m0, m10 + psubd m1, m11 + psubd m6, m10 + psubd m7, m11 + psubd m0, m8 ; a0[0-3] + psubd m1, m9 ; a0[4-7] + paddd m6, m8 ; a3[0-3] + paddd m7, m9 ; a3[4-7] + + ; a0 += W4*row[4] + W6*row[6]; i.e. -1*row[4] + ; a1 -= W4*row[4] + W2*row[6]; i.e. -1*row[4]-1*row[6] + ; a2 -= W4*row[4] - W2*row[6]; i.e. -1*row[4]+1*row[6] + ; a3 += W4*row[4] - W6*row[6]; i.e. -1*row[4] + SBUTTERFLY3 wd, 8, 9, 13, 12 ; { row[4], row[6] }[0-3]/[4-7] + SIGNEXTEND m13, m14, m10 ; { row[4] }[0-3] / [4-7] + pmaddwd m10, m8, [w4_plus_w6] + pmaddwd m11, m9, [w4_plus_w6] + pslld m10, 2 + pslld m11, 2 + psubd m10, m13 + psubd m11, m14 + paddd m0, m10 ; a0[0-3] + paddd m1, m11 ; a0[4-7] + pmaddwd m10, m8, [w4_min_w6] + pmaddwd m11, m9, [w4_min_w6] + pslld m10, 2 + pslld m11, 2 + psubd m10, m13 + psubd m11, m14 + paddd m6, m10 ; a3[0-3] + paddd m7, m11 ; a3[4-7] + pmaddwd m10, m8, [w4_min_w2] + pmaddwd m11, m9, [w4_min_w2] + pmaddwd m8, [w4_plus_w2] + pmaddwd m9, [w4_plus_w2] + pslld m10, 2 + pslld m11, 2 + pslld m8, 2 + pslld m9, 2 + psubd m10, m13 + psubd m11, m14 + psubd m8, m13 + psubd m9, m14 + psubd m4, m10 ; a2[0-3] intermediate + psubd m5, m11 ; a2[4-7] intermediate + psubd m2, m8 ; a1[0-3] intermediate + psubd m3, m9 ; a1[4-7] intermediate + SIGNEXTEND m12, m13, m10 ; { row[6] }[0-3] / [4-7] + psubd m4, m12 ; a2[0-3] + psubd m5, m13 ; a2[4-7] + paddd m2, m12 ; a1[0-3] + paddd m3, m13 ; a1[4-7] + + ; load/store + mova [r2+ 0], m0 + mova [r2+ 32], m2 + mova [r2+ 64], m4 + mova [r2+ 96], m6 + mova m10,[r2+ 16] ; { row[1] }[0-7] + mova m8, [r2+ 48] ; { row[3] }[0-7] + mova m13,[r2+ 80] ; { row[5] }[0-7] + mova m14,[r2+112] ; { row[7] }[0-7] + mova [r2+ 16], m1 + mova [r2+ 48], m3 + mova [r2+ 80], m5 + mova [r2+112], m7 +%ifidn %1, row + pmullw m10,[r3+ 16] + pmullw m8, [r3+ 48] + pmullw m13,[r3+ 80] + pmullw m14,[r3+112] +%endif + + ; b0 = MUL(W1, row[1]); + ; MAC(b0, W3, row[3]); + ; b1 = MUL(W3, row[1]); + ; MAC(b1, -W7, row[3]); + ; b2 = MUL(W5, row[1]); + ; MAC(b2, -W1, row[3]); + ; b3 = MUL(W7, row[1]); + ; MAC(b3, -W5, row[3]); + SBUTTERFLY3 wd, 0, 1, 10, 8 ; { row[1], row[3] }[0-3]/[4-7] + SIGNEXTEND m10, m11, m12 ; { row[1] }[0-3] / [4-7] + SIGNEXTEND m8, m9, m12 ; { row[3] }[0-3] / [4-7] + pmaddwd m2, m0, [w3_min_w7] + pmaddwd m3, m1, [w3_min_w7] + pmaddwd m4, m0, [w5_min_w1] + pmaddwd m5, m1, [w5_min_w1] + pmaddwd m6, m0, [w7_min_w5] + pmaddwd m7, m1, [w7_min_w5] + pmaddwd m0, [w1_plus_w3] + pmaddwd m1, [w1_plus_w3] + pslld m2, 2 + pslld m3, 2 + pslld m4, 2 + pslld m5, 2 + pslld m6, 2 + pslld m7, 2 + pslld m0, 2 + pslld m1, 2 + + ; b0: +1*row[1]+2*row[3] + ; b1: +2*row[1]-1*row[3] + ; b2: -1*row[1]-1*row[3] + ; b3: +1*row[1]+1*row[3] + psubd m2, m8 + psubd m3, m9 + paddd m0, m8 + paddd m1, m9 + paddd m8, m10 ; { row[1] + row[3] }[0-3] + paddd m9, m11 ; { row[1] + row[3] }[4-7] + paddd m10, m10 + paddd m11, m11 + paddd m0, m8 ; b0[0-3] + paddd m1, m9 ; b0[4-7] + paddd m2, m10 ; b1[0-3] + paddd m3, m11 ; b2[4-7] + psubd m4, m8 ; b2[0-3] + psubd m5, m9 ; b2[4-7] + paddd m6, m8 ; b3[0-3] + paddd m7, m9 ; b3[4-7] + + ; MAC(b0, W5, row[5]); + ; MAC(b0, W7, row[7]); + ; MAC(b1, -W1, row[5]); + ; MAC(b1, -W5, row[7]); + ; MAC(b2, W7, row[5]); + ; MAC(b2, W3, row[7]); + ; MAC(b3, W3, row[5]); + ; MAC(b3, -W1, row[7]); + SBUTTERFLY3 wd, 8, 9, 13, 14 ; { row[5], row[7] }[0-3]/[4-7] + SIGNEXTEND m13, m12, m11 ; { row[5] }[0-3] / [4-7] + SIGNEXTEND m14, m11, m10 ; { row[7] }[0-3] / [4-7] + + ; b0: -1*row[5]+1*row[7] + ; b1: -1*row[5]+1*row[7] + ; b2: +1*row[5]+2*row[7] + ; b3: +2*row[5]-1*row[7] + paddd m4, m13 + paddd m5, m12 + paddd m6, m13 + paddd m7, m12 + psubd m13, m14 ; { row[5] - row[7] }[0-3] + psubd m12, m11 ; { row[5] - row[7] }[4-7] + paddd m14, m14 + paddd m11, m11 + psubd m0, m13 + psubd m1, m12 + psubd m2, m13 + psubd m3, m12 + paddd m4, m14 + paddd m5, m11 + paddd m6, m13 + paddd m7, m12 + + pmaddwd m10, m8, [w1_plus_w5] + pmaddwd m11, m9, [w1_plus_w5] + pmaddwd m12, m8, [w5_plus_w7] + pmaddwd m13, m9, [w5_plus_w7] + pslld m10, 2 + pslld m11, 2 + pslld m12, 2 + pslld m13, 2 + psubd m2, m10 ; b1[0-3] + psubd m3, m11 ; b1[4-7] + paddd m0, m12 ; b0[0-3] + paddd m1, m13 ; b0[4-7] + pmaddwd m12, m8, [w7_plus_w3] + pmaddwd m13, m9, [w7_plus_w3] + pmaddwd m8, [w3_min_w1] + pmaddwd m9, [w3_min_w1] + pslld m12, 2 + pslld m13, 2 + pslld m8, 2 + pslld m9, 2 + paddd m4, m12 ; b2[0-3] + paddd m5, m13 ; b2[4-7] + paddd m6, m8 ; b3[0-3] + paddd m7, m9 ; b3[4-7] + + ; row[0] = (a0 + b0) >> 15; + ; row[7] = (a0 - b0) >> 15; + ; row[1] = (a1 + b1) >> 15; + ; row[6] = (a1 - b1) >> 15; + ; row[2] = (a2 + b2) >> 15; + ; row[5] = (a2 - b2) >> 15; + ; row[3] = (a3 + b3) >> 15; + ; row[4] = (a3 - b3) >> 15; + mova m8, [r2+ 0] ; a0[0-3] + mova m9, [r2+16] ; a0[4-7] + SUMSUB_SHPK m8, m9, m10, m11, m0, m1, %2 + mova m0, [r2+32] ; a1[0-3] + mova m1, [r2+48] ; a1[4-7] + SUMSUB_SHPK m0, m1, m9, m11, m2, m3, %2 + mova m1, [r2+64] ; a2[0-3] + mova m2, [r2+80] ; a2[4-7] + SUMSUB_SHPK m1, m2, m11, m3, m4, m5, %2 + mova m2, [r2+96] ; a3[0-3] + mova m3, [r2+112] ; a3[4-7] + SUMSUB_SHPK m2, m3, m4, m5, m6, m7, %2 +%endmacro + +; void prores_idct_put_10_(uint8_t *pixels, int stride, +; DCTELEM *block, const int16_t *qmat); +%macro idct_put_fn 2 +cglobal prores_idct_put_10_%1, 4, 4, %2 + movsxd r1, r1d + pxor m15, m15 ; zero + + ; for (i = 0; i < 8; i++) + ; idctRowCondDC(block + i*8); + mova m10,[r2+ 0] ; { row[0] }[0-7] + mova m8, [r2+32] ; { row[2] }[0-7] + mova m13,[r2+64] ; { row[4] }[0-7] + mova m12,[r2+96] ; { row[6] }[0-7] + + pmullw m10,[r3+ 0] + pmullw m8, [r3+32] + pmullw m13,[r3+64] + pmullw m12,[r3+96] + + IDCT_1D row, 17, %1 + + ; transpose for second part of IDCT + TRANSPOSE8x8W 8, 0, 1, 2, 4, 11, 9, 10, 3 + mova [r2+ 16], m0 + mova [r2+ 48], m2 + mova [r2+ 80], m11 + mova [r2+112], m10 + SWAP 8, 10 + SWAP 1, 8 + SWAP 4, 13 + SWAP 9, 12 + + ; for (i = 0; i < 8; i++) + ; idctSparseColAdd(dest + i, line_size, block + i); + IDCT_1D col, 20, %1 + + ; clip/store + mova m6, [pw_512] + mova m3, [pw_4] + mova m5, [pw_1019] + paddw m8, m6 + paddw m0, m6 + paddw m1, m6 + paddw m2, m6 + paddw m4, m6 + paddw m11, m6 + paddw m9, m6 + paddw m10, m6 + pmaxsw m8, m3 + pmaxsw m0, m3 + pmaxsw m1, m3 + pmaxsw m2, m3 + pmaxsw m4, m3 + pmaxsw m11, m3 + pmaxsw m9, m3 + pmaxsw m10, m3 + pminsw m8, m5 + pminsw m0, m5 + pminsw m1, m5 + pminsw m2, m5 + pminsw m4, m5 + pminsw m11, m5 + pminsw m9, m5 + pminsw m10, m5 + + lea r2, [r1*3] + mova [r0 ], m8 + mova [r0+r1 ], m0 + mova [r0+r1*2], m1 + mova [r0+r2 ], m2 + lea r0, [r0+r1*4] + mova [r0 ], m4 + mova [r0+r1 ], m11 + mova [r0+r1*2], m9 + mova [r0+r2 ], m10 + RET +%endmacro + +%macro signextend_sse2 3 ; dstlow, dsthigh, tmp + pxor %3, %3 + pcmpgtw %3, %1 + mova %2, %1 + punpcklwd %1, %3 + punpckhwd %2, %3 +%endmacro + +%macro signextend_sse4 2-3 ; dstlow, dsthigh + movhlps %2, %1 + pmovsxwd %1, %1 + pmovsxwd %2, %2 +%endmacro + +INIT_XMM +%define SIGNEXTEND signextend_sse2 +idct_put_fn sse2, 16 +INIT_XMM +%define SIGNEXTEND signextend_sse4 +idct_put_fn sse4, 16 +INIT_AVX +idct_put_fn avx, 16 + +%endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/proresdsp-init.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/proresdsp-init.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/proresdsp-init.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/proresdsp-init.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,54 @@ +/* + * Apple ProRes compatible decoder + * + * Copyright (c) 2010-2011 Maxim Poliakovski + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavcodec/proresdsp.h" + +void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize, + DCTELEM *block, const int16_t *qmat); +void ff_prores_idct_put_10_sse4(uint16_t *dst, int linesize, + DCTELEM *block, const int16_t *qmat); +void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize, + DCTELEM *block, const int16_t *qmat); + +void ff_proresdsp_x86_init(ProresDSPContext *dsp) +{ +#if ARCH_X86_64 && HAVE_YASM + int flags = av_get_cpu_flags(); + + if (flags & AV_CPU_FLAG_SSE2) { + dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; + dsp->idct_put = ff_prores_idct_put_10_sse2; + } + + if (flags & AV_CPU_FLAG_SSE4) { + dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; + dsp->idct_put = ff_prores_idct_put_10_sse4; + } + +#if HAVE_AVX + if (flags & AV_CPU_FLAG_AVX) { + dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; + dsp->idct_put = ff_prores_idct_put_10_avx; + } +#endif /* HAVE_AVX */ +#endif /* ARCH_X86_64 && HAVE_YASM */ +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/rv40dsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/rv40dsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/rv40dsp.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/rv40dsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * RV40 decoder motion compensation functions x86-optimised + * Copyright (c) 2008 Konstantin Shishkov + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * RV40 decoder motion compensation functions x86-optimised + */ + +#include "libavcodec/rv34dsp.h" + +void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, uint8_t *src, + int stride, int h, int x, int y); +void ff_avg_rv40_chroma_mc8_mmx2 (uint8_t *dst, uint8_t *src, + int stride, int h, int x, int y); +void ff_avg_rv40_chroma_mc8_3dnow(uint8_t *dst, uint8_t *src, + int stride, int h, int x, int y); + +void ff_put_rv40_chroma_mc4_mmx (uint8_t *dst, uint8_t *src, + int stride, int h, int x, int y); +void ff_avg_rv40_chroma_mc4_mmx2 (uint8_t *dst, uint8_t *src, + int stride, int h, int x, int y); +void ff_avg_rv40_chroma_mc4_3dnow(uint8_t *dst, uint8_t *src, + int stride, int h, int x, int y); + +void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp) +{ + av_unused int mm_flags = av_get_cpu_flags(); + +#if HAVE_YASM + if (mm_flags & AV_CPU_FLAG_MMX) { + c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx; + c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx; + } + if (mm_flags & AV_CPU_FLAG_MMX2) { + c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmx2; + c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_mmx2; + } else if (mm_flags & AV_CPU_FLAG_3DNOW) { + c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow; + c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_3dnow; + } +#endif +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/simple_idct_mmx.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/simple_idct_mmx.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/simple_idct_mmx.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/simple_idct_mmx.c 2012-01-11 00:34:30.000000000 +0000 @@ -37,11 +37,7 @@ #define C1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 #define C2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 #define C3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 -#if 0 -#define C4 16384 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 -#else #define C4 16383 //cos(i*M_PI/16)*sqrt(2)*(1<<14) - 0.5 -#endif #define C5 12873 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 #define C6 8867 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 #define C7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 @@ -80,135 +76,6 @@ C3, -C1, C3, -C1 }; -#if 0 -static void unused_var_killer(void) -{ - int a= wm1010 + d40000; - temp[0]=a; -} - -static void inline idctCol (int16_t * col, int16_t *input) -{ -#undef C0 -#undef C1 -#undef C2 -#undef C3 -#undef C4 -#undef C5 -#undef C6 -#undef C7 - int a0, a1, a2, a3, b0, b1, b2, b3; - const int C0 = 23170; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C1 = 22725; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C2 = 21407; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C3 = 19266; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C4 = 16383; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C5 = 12873; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C6 = 8867; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C7 = 4520; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 -/* - if( !(col[8*1] | col[8*2] |col[8*3] |col[8*4] |col[8*5] |col[8*6] | col[8*7])) { - col[8*0] = col[8*1] = col[8*2] = col[8*3] = col[8*4] = - col[8*5] = col[8*6] = col[8*7] = col[8*0]<<3; - return; - }*/ - -col[8*0] = input[8*0 + 0]; -col[8*1] = input[8*2 + 0]; -col[8*2] = input[8*0 + 1]; -col[8*3] = input[8*2 + 1]; -col[8*4] = input[8*4 + 0]; -col[8*5] = input[8*6 + 0]; -col[8*6] = input[8*4 + 1]; -col[8*7] = input[8*6 + 1]; - - a0 = C4*col[8*0] + C2*col[8*2] + C4*col[8*4] + C6*col[8*6] + (1<<(COL_SHIFT-1)); - a1 = C4*col[8*0] + C6*col[8*2] - C4*col[8*4] - C2*col[8*6] + (1<<(COL_SHIFT-1)); - a2 = C4*col[8*0] - C6*col[8*2] - C4*col[8*4] + C2*col[8*6] + (1<<(COL_SHIFT-1)); - a3 = C4*col[8*0] - C2*col[8*2] + C4*col[8*4] - C6*col[8*6] + (1<<(COL_SHIFT-1)); - - b0 = C1*col[8*1] + C3*col[8*3] + C5*col[8*5] + C7*col[8*7]; - b1 = C3*col[8*1] - C7*col[8*3] - C1*col[8*5] - C5*col[8*7]; - b2 = C5*col[8*1] - C1*col[8*3] + C7*col[8*5] + C3*col[8*7]; - b3 = C7*col[8*1] - C5*col[8*3] + C3*col[8*5] - C1*col[8*7]; - - col[8*0] = (a0 + b0) >> COL_SHIFT; - col[8*1] = (a1 + b1) >> COL_SHIFT; - col[8*2] = (a2 + b2) >> COL_SHIFT; - col[8*3] = (a3 + b3) >> COL_SHIFT; - col[8*4] = (a3 - b3) >> COL_SHIFT; - col[8*5] = (a2 - b2) >> COL_SHIFT; - col[8*6] = (a1 - b1) >> COL_SHIFT; - col[8*7] = (a0 - b0) >> COL_SHIFT; -} - -static void inline idctRow (int16_t * output, int16_t * input) -{ - int16_t row[8]; - - int a0, a1, a2, a3, b0, b1, b2, b3; - const int C0 = 23170; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C1 = 22725; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C2 = 21407; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C3 = 19266; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C4 = 16383; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C5 = 12873; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C6 = 8867; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - const int C7 = 4520; //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 - -row[0] = input[0]; -row[2] = input[1]; -row[4] = input[4]; -row[6] = input[5]; -row[1] = input[8]; -row[3] = input[9]; -row[5] = input[12]; -row[7] = input[13]; - - if( !(row[1] | row[2] |row[3] |row[4] |row[5] |row[6] | row[7]) ) { - row[0] = row[1] = row[2] = row[3] = row[4] = - row[5] = row[6] = row[7] = row[0]<<3; - output[0] = row[0]; - output[2] = row[1]; - output[4] = row[2]; - output[6] = row[3]; - output[8] = row[4]; - output[10] = row[5]; - output[12] = row[6]; - output[14] = row[7]; - return; - } - - a0 = C4*row[0] + C2*row[2] + C4*row[4] + C6*row[6] + (1<<(ROW_SHIFT-1)); - a1 = C4*row[0] + C6*row[2] - C4*row[4] - C2*row[6] + (1<<(ROW_SHIFT-1)); - a2 = C4*row[0] - C6*row[2] - C4*row[4] + C2*row[6] + (1<<(ROW_SHIFT-1)); - a3 = C4*row[0] - C2*row[2] + C4*row[4] - C6*row[6] + (1<<(ROW_SHIFT-1)); - - b0 = C1*row[1] + C3*row[3] + C5*row[5] + C7*row[7]; - b1 = C3*row[1] - C7*row[3] - C1*row[5] - C5*row[7]; - b2 = C5*row[1] - C1*row[3] + C7*row[5] + C3*row[7]; - b3 = C7*row[1] - C5*row[3] + C3*row[5] - C1*row[7]; - - row[0] = (a0 + b0) >> ROW_SHIFT; - row[1] = (a1 + b1) >> ROW_SHIFT; - row[2] = (a2 + b2) >> ROW_SHIFT; - row[3] = (a3 + b3) >> ROW_SHIFT; - row[4] = (a3 - b3) >> ROW_SHIFT; - row[5] = (a2 - b2) >> ROW_SHIFT; - row[6] = (a1 - b1) >> ROW_SHIFT; - row[7] = (a0 - b0) >> ROW_SHIFT; - - output[0] = row[0]; - output[2] = row[1]; - output[4] = row[2]; - output[6] = row[3]; - output[8] = row[4]; - output[10] = row[5]; - output[12] = row[6]; - output[14] = row[7]; -} -#endif - static inline void idct(int16_t *block) { DECLARE_ALIGNED(8, int64_t, align_tmp)[16]; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/vc1dsp_yasm.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/vc1dsp_yasm.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/vc1dsp_yasm.asm 2011-05-15 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/vc1dsp_yasm.asm 2012-01-11 00:34:30.000000000 +0000 @@ -227,7 +227,7 @@ imul r2, 0x01010101 %endmacro -; I dont know why the sign extension is needed... +; I do not know why the sign extension is needed... %macro PSIGNW_SRA_MMX 2 psraw %2, 15 PSIGNW_MMX %1, %2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/vp8dsp-init.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/vp8dsp-init.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/vp8dsp-init.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/vp8dsp-init.c 2012-01-11 00:34:30.000000000 +0000 @@ -283,9 +283,9 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c) { +#if HAVE_YASM int mm_flags = av_get_cpu_flags(); -#if HAVE_YASM if (mm_flags & AV_CPU_FLAG_MMX) { c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx; c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_mmx; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/x86inc.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/x86inc.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/x86inc.asm 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/x86inc.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,905 +0,0 @@ -;***************************************************************************** -;* x86inc.asm -;***************************************************************************** -;* Copyright (C) 2005-2011 x264 project -;* -;* Authors: Loren Merritt -;* Anton Mitrofanov -;* Jason Garrett-Glaser -;* -;* Permission to use, copy, modify, and/or distribute this software for any -;* purpose with or without fee is hereby granted, provided that the above -;* copyright notice and this permission notice appear in all copies. -;* -;* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -;* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -;* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -;* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -;* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -;* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -;* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -;***************************************************************************** - -; This is a header file for the x264ASM assembly language, which uses -; NASM/YASM syntax combined with a large number of macros to provide easy -; abstraction between different calling conventions (x86_32, win64, linux64). -; It also has various other useful features to simplify writing the kind of -; DSP functions that are most often used in x264. - -; Unlike the rest of x264, this file is available under an ISC license, as it -; has significant usefulness outside of x264 and we want it to be available -; to the largest audience possible. Of course, if you modify it for your own -; purposes to add a new feature, we strongly encourage contributing a patch -; as this feature might be useful for others as well. Send patches or ideas -; to x264-devel@videolan.org . - -%define program_name ff - -%ifdef ARCH_X86_64 - %ifidn __OUTPUT_FORMAT__,win32 - %define WIN64 - %else - %define UNIX64 - %endif -%endif - -%ifdef PREFIX - %define mangle(x) _ %+ x -%else - %define mangle(x) x -%endif - -; FIXME: All of the 64bit asm functions that take a stride as an argument -; via register, assume that the high dword of that register is filled with 0. -; This is true in practice (since we never do any 64bit arithmetic on strides, -; and x264's strides are all positive), but is not guaranteed by the ABI. - -; Name of the .rodata section. -; Kludge: Something on OS X fails to align .rodata even given an align attribute, -; so use a different read-only section. -%macro SECTION_RODATA 0-1 16 - %ifidn __OUTPUT_FORMAT__,macho64 - SECTION .text align=%1 - %elifidn __OUTPUT_FORMAT__,macho - SECTION .text align=%1 - fakegot: - %elifidn __OUTPUT_FORMAT__,aout - section .text - %else - SECTION .rodata align=%1 - %endif -%endmacro - -; aout does not support align= -%macro SECTION_TEXT 0-1 16 - %ifidn __OUTPUT_FORMAT__,aout - SECTION .text - %else - SECTION .text align=%1 - %endif -%endmacro - -%ifdef WIN64 - %define PIC -%elifndef ARCH_X86_64 -; x86_32 doesn't require PIC. -; Some distros prefer shared objects to be PIC, but nothing breaks if -; the code contains a few textrels, so we'll skip that complexity. - %undef PIC -%endif -%ifdef PIC - default rel -%endif - -; Macros to eliminate most code duplication between x86_32 and x86_64: -; Currently this works only for leaf functions which load all their arguments -; into registers at the start, and make no other use of the stack. Luckily that -; covers most of x264's asm. - -; PROLOGUE: -; %1 = number of arguments. loads them from stack if needed. -; %2 = number of registers used. pushes callee-saved regs if needed. -; %3 = number of xmm registers used. pushes callee-saved xmm regs if needed. -; %4 = list of names to define to registers -; PROLOGUE can also be invoked by adding the same options to cglobal - -; e.g. -; cglobal foo, 2,3,0, dst, src, tmp -; declares a function (foo), taking two args (dst and src) and one local variable (tmp) - -; TODO Some functions can use some args directly from the stack. If they're the -; last args then you can just not declare them, but if they're in the middle -; we need more flexible macro. - -; RET: -; Pops anything that was pushed by PROLOGUE - -; REP_RET: -; Same, but if it doesn't pop anything it becomes a 2-byte ret, for athlons -; which are slow when a normal ret follows a branch. - -; registers: -; rN and rNq are the native-size register holding function argument N -; rNd, rNw, rNb are dword, word, and byte size -; rNm is the original location of arg N (a register or on the stack), dword -; rNmp is native size - -%macro DECLARE_REG 6 - %define r%1q %2 - %define r%1d %3 - %define r%1w %4 - %define r%1b %5 - %define r%1m %6 - %ifid %6 ; i.e. it's a register - %define r%1mp %2 - %elifdef ARCH_X86_64 ; memory - %define r%1mp qword %6 - %else - %define r%1mp dword %6 - %endif - %define r%1 %2 -%endmacro - -%macro DECLARE_REG_SIZE 2 - %define r%1q r%1 - %define e%1q r%1 - %define r%1d e%1 - %define e%1d e%1 - %define r%1w %1 - %define e%1w %1 - %define r%1b %2 - %define e%1b %2 -%ifndef ARCH_X86_64 - %define r%1 e%1 -%endif -%endmacro - -DECLARE_REG_SIZE ax, al -DECLARE_REG_SIZE bx, bl -DECLARE_REG_SIZE cx, cl -DECLARE_REG_SIZE dx, dl -DECLARE_REG_SIZE si, sil -DECLARE_REG_SIZE di, dil -DECLARE_REG_SIZE bp, bpl - -; t# defines for when per-arch register allocation is more complex than just function arguments - -%macro DECLARE_REG_TMP 1-* - %assign %%i 0 - %rep %0 - CAT_XDEFINE t, %%i, r%1 - %assign %%i %%i+1 - %rotate 1 - %endrep -%endmacro - -%macro DECLARE_REG_TMP_SIZE 0-* - %rep %0 - %define t%1q t%1 %+ q - %define t%1d t%1 %+ d - %define t%1w t%1 %+ w - %define t%1b t%1 %+ b - %rotate 1 - %endrep -%endmacro - -DECLARE_REG_TMP_SIZE 0,1,2,3,4,5,6,7,8,9 - -%ifdef ARCH_X86_64 - %define gprsize 8 -%else - %define gprsize 4 -%endif - -%macro PUSH 1 - push %1 - %assign stack_offset stack_offset+gprsize -%endmacro - -%macro POP 1 - pop %1 - %assign stack_offset stack_offset-gprsize -%endmacro - -%macro SUB 2 - sub %1, %2 - %ifidn %1, rsp - %assign stack_offset stack_offset+(%2) - %endif -%endmacro - -%macro ADD 2 - add %1, %2 - %ifidn %1, rsp - %assign stack_offset stack_offset-(%2) - %endif -%endmacro - -%macro movifnidn 2 - %ifnidn %1, %2 - mov %1, %2 - %endif -%endmacro - -%macro movsxdifnidn 2 - %ifnidn %1, %2 - movsxd %1, %2 - %endif -%endmacro - -%macro ASSERT 1 - %if (%1) == 0 - %error assert failed - %endif -%endmacro - -%macro DEFINE_ARGS 0-* - %ifdef n_arg_names - %assign %%i 0 - %rep n_arg_names - CAT_UNDEF arg_name %+ %%i, q - CAT_UNDEF arg_name %+ %%i, d - CAT_UNDEF arg_name %+ %%i, w - CAT_UNDEF arg_name %+ %%i, b - CAT_UNDEF arg_name %+ %%i, m - CAT_UNDEF arg_name, %%i - %assign %%i %%i+1 - %endrep - %endif - - %assign %%i 0 - %rep %0 - %xdefine %1q r %+ %%i %+ q - %xdefine %1d r %+ %%i %+ d - %xdefine %1w r %+ %%i %+ w - %xdefine %1b r %+ %%i %+ b - %xdefine %1m r %+ %%i %+ m - CAT_XDEFINE arg_name, %%i, %1 - %assign %%i %%i+1 - %rotate 1 - %endrep - %assign n_arg_names %%i -%endmacro - -%ifdef WIN64 ; Windows x64 ;================================================= - -DECLARE_REG 0, rcx, ecx, cx, cl, ecx -DECLARE_REG 1, rdx, edx, dx, dl, edx -DECLARE_REG 2, r8, r8d, r8w, r8b, r8d -DECLARE_REG 3, r9, r9d, r9w, r9b, r9d -DECLARE_REG 4, rdi, edi, di, dil, [rsp + stack_offset + 40] -DECLARE_REG 5, rsi, esi, si, sil, [rsp + stack_offset + 48] -DECLARE_REG 6, rax, eax, ax, al, [rsp + stack_offset + 56] -%define r7m [rsp + stack_offset + 64] -%define r8m [rsp + stack_offset + 72] - -%macro LOAD_IF_USED 2 ; reg_id, number_of_args - %if %1 < %2 - mov r%1, [rsp + stack_offset + 8 + %1*8] - %endif -%endmacro - -%macro PROLOGUE 2-4+ 0 ; #args, #regs, #xmm_regs, arg_names... - ASSERT %2 >= %1 - %assign regs_used %2 - ASSERT regs_used <= 7 - %if regs_used > 4 - push r4 - push r5 - %assign stack_offset stack_offset+16 - %endif - WIN64_SPILL_XMM %3 - LOAD_IF_USED 4, %1 - LOAD_IF_USED 5, %1 - LOAD_IF_USED 6, %1 - DEFINE_ARGS %4 -%endmacro - -%macro WIN64_SPILL_XMM 1 - %assign xmm_regs_used %1 - ASSERT xmm_regs_used <= 16 - %if xmm_regs_used > 6 - sub rsp, (xmm_regs_used-6)*16+16 - %assign stack_offset stack_offset+(xmm_regs_used-6)*16+16 - %assign %%i xmm_regs_used - %rep (xmm_regs_used-6) - %assign %%i %%i-1 - movdqa [rsp + (%%i-6)*16+8], xmm %+ %%i - %endrep - %endif -%endmacro - -%macro WIN64_RESTORE_XMM_INTERNAL 1 - %if xmm_regs_used > 6 - %assign %%i xmm_regs_used - %rep (xmm_regs_used-6) - %assign %%i %%i-1 - movdqa xmm %+ %%i, [%1 + (%%i-6)*16+8] - %endrep - add %1, (xmm_regs_used-6)*16+16 - %endif -%endmacro - -%macro WIN64_RESTORE_XMM 1 - WIN64_RESTORE_XMM_INTERNAL %1 - %assign stack_offset stack_offset-(xmm_regs_used-6)*16+16 - %assign xmm_regs_used 0 -%endmacro - -%macro RET 0 - WIN64_RESTORE_XMM_INTERNAL rsp - %if regs_used > 4 - pop r5 - pop r4 - %endif - ret -%endmacro - -%macro REP_RET 0 - %if regs_used > 4 || xmm_regs_used > 6 - RET - %else - rep ret - %endif -%endmacro - -%elifdef ARCH_X86_64 ; *nix x64 ;============================================= - -DECLARE_REG 0, rdi, edi, di, dil, edi -DECLARE_REG 1, rsi, esi, si, sil, esi -DECLARE_REG 2, rdx, edx, dx, dl, edx -DECLARE_REG 3, rcx, ecx, cx, cl, ecx -DECLARE_REG 4, r8, r8d, r8w, r8b, r8d -DECLARE_REG 5, r9, r9d, r9w, r9b, r9d -DECLARE_REG 6, rax, eax, ax, al, [rsp + stack_offset + 8] -%define r7m [rsp + stack_offset + 16] -%define r8m [rsp + stack_offset + 24] - -%macro LOAD_IF_USED 2 ; reg_id, number_of_args - %if %1 < %2 - mov r%1, [rsp - 40 + %1*8] - %endif -%endmacro - -%macro PROLOGUE 2-4+ ; #args, #regs, #xmm_regs, arg_names... - ASSERT %2 >= %1 - ASSERT %2 <= 7 - LOAD_IF_USED 6, %1 - DEFINE_ARGS %4 -%endmacro - -%macro RET 0 - ret -%endmacro - -%macro REP_RET 0 - rep ret -%endmacro - -%else ; X86_32 ;============================================================== - -DECLARE_REG 0, eax, eax, ax, al, [esp + stack_offset + 4] -DECLARE_REG 1, ecx, ecx, cx, cl, [esp + stack_offset + 8] -DECLARE_REG 2, edx, edx, dx, dl, [esp + stack_offset + 12] -DECLARE_REG 3, ebx, ebx, bx, bl, [esp + stack_offset + 16] -DECLARE_REG 4, esi, esi, si, null, [esp + stack_offset + 20] -DECLARE_REG 5, edi, edi, di, null, [esp + stack_offset + 24] -DECLARE_REG 6, ebp, ebp, bp, null, [esp + stack_offset + 28] -%define r7m [esp + stack_offset + 32] -%define r8m [esp + stack_offset + 36] -%define rsp esp - -%macro PUSH_IF_USED 1 ; reg_id - %if %1 < regs_used - push r%1 - %assign stack_offset stack_offset+4 - %endif -%endmacro - -%macro POP_IF_USED 1 ; reg_id - %if %1 < regs_used - pop r%1 - %endif -%endmacro - -%macro LOAD_IF_USED 2 ; reg_id, number_of_args - %if %1 < %2 - mov r%1, [esp + stack_offset + 4 + %1*4] - %endif -%endmacro - -%macro PROLOGUE 2-4+ ; #args, #regs, #xmm_regs, arg_names... - ASSERT %2 >= %1 - %assign regs_used %2 - ASSERT regs_used <= 7 - PUSH_IF_USED 3 - PUSH_IF_USED 4 - PUSH_IF_USED 5 - PUSH_IF_USED 6 - LOAD_IF_USED 0, %1 - LOAD_IF_USED 1, %1 - LOAD_IF_USED 2, %1 - LOAD_IF_USED 3, %1 - LOAD_IF_USED 4, %1 - LOAD_IF_USED 5, %1 - LOAD_IF_USED 6, %1 - DEFINE_ARGS %4 -%endmacro - -%macro RET 0 - POP_IF_USED 6 - POP_IF_USED 5 - POP_IF_USED 4 - POP_IF_USED 3 - ret -%endmacro - -%macro REP_RET 0 - %if regs_used > 3 - RET - %else - rep ret - %endif -%endmacro - -%endif ;====================================================================== - -%ifndef WIN64 -%macro WIN64_SPILL_XMM 1 -%endmacro -%macro WIN64_RESTORE_XMM 1 -%endmacro -%endif - - - -;============================================================================= -; arch-independent part -;============================================================================= - -%assign function_align 16 - -; Symbol prefix for C linkage -%macro cglobal 1-2+ - %xdefine %1 mangle(program_name %+ _ %+ %1) - %xdefine %1.skip_prologue %1 %+ .skip_prologue - %ifidn __OUTPUT_FORMAT__,elf - global %1:function hidden - %else - global %1 - %endif - align function_align - %1: - RESET_MM_PERMUTATION ; not really needed, but makes disassembly somewhat nicer - %assign stack_offset 0 - %if %0 > 1 - PROLOGUE %2 - %endif -%endmacro - -%macro cextern 1 - %xdefine %1 mangle(program_name %+ _ %+ %1) - extern %1 -%endmacro - -;like cextern, but without the prefix -%macro cextern_naked 1 - %xdefine %1 mangle(%1) - extern %1 -%endmacro - -%macro const 2+ - %xdefine %1 mangle(program_name %+ _ %+ %1) - global %1 - %1: %2 -%endmacro - -; This is needed for ELF, otherwise the GNU linker assumes the stack is -; executable by default. -%ifidn __OUTPUT_FORMAT__,elf -SECTION .note.GNU-stack noalloc noexec nowrite progbits -%endif - -; merge mmx and sse* - -%macro CAT_XDEFINE 3 - %xdefine %1%2 %3 -%endmacro - -%macro CAT_UNDEF 2 - %undef %1%2 -%endmacro - -%macro INIT_MMX 0 - %assign avx_enabled 0 - %define RESET_MM_PERMUTATION INIT_MMX - %define mmsize 8 - %define num_mmregs 8 - %define mova movq - %define movu movq - %define movh movd - %define movnta movntq - %assign %%i 0 - %rep 8 - CAT_XDEFINE m, %%i, mm %+ %%i - CAT_XDEFINE nmm, %%i, %%i - %assign %%i %%i+1 - %endrep - %rep 8 - CAT_UNDEF m, %%i - CAT_UNDEF nmm, %%i - %assign %%i %%i+1 - %endrep -%endmacro - -%macro INIT_XMM 0 - %assign avx_enabled 0 - %define RESET_MM_PERMUTATION INIT_XMM - %define mmsize 16 - %define num_mmregs 8 - %ifdef ARCH_X86_64 - %define num_mmregs 16 - %endif - %define mova movdqa - %define movu movdqu - %define movh movq - %define movnta movntdq - %assign %%i 0 - %rep num_mmregs - CAT_XDEFINE m, %%i, xmm %+ %%i - CAT_XDEFINE nxmm, %%i, %%i - %assign %%i %%i+1 - %endrep -%endmacro - -%macro INIT_AVX 0 - INIT_XMM - %assign avx_enabled 1 - %define PALIGNR PALIGNR_SSSE3 - %define RESET_MM_PERMUTATION INIT_AVX -%endmacro - -%macro INIT_YMM 0 - %assign avx_enabled 1 - %define RESET_MM_PERMUTATION INIT_YMM - %define mmsize 32 - %define num_mmregs 8 - %ifdef ARCH_X86_64 - %define num_mmregs 16 - %endif - %define mova vmovaps - %define movu vmovups - %assign %%i 0 - %rep num_mmregs - CAT_XDEFINE m, %%i, ymm %+ %%i - CAT_XDEFINE nymm, %%i, %%i - %assign %%i %%i+1 - %endrep -%endmacro - -INIT_MMX - -; I often want to use macros that permute their arguments. e.g. there's no -; efficient way to implement butterfly or transpose or dct without swapping some -; arguments. -; -; I would like to not have to manually keep track of the permutations: -; If I insert a permutation in the middle of a function, it should automatically -; change everything that follows. For more complex macros I may also have multiple -; implementations, e.g. the SSE2 and SSSE3 versions may have different permutations. -; -; Hence these macros. Insert a PERMUTE or some SWAPs at the end of a macro that -; permutes its arguments. It's equivalent to exchanging the contents of the -; registers, except that this way you exchange the register names instead, so it -; doesn't cost any cycles. - -%macro PERMUTE 2-* ; takes a list of pairs to swap -%rep %0/2 - %xdefine tmp%2 m%2 - %xdefine ntmp%2 nm%2 - %rotate 2 -%endrep -%rep %0/2 - %xdefine m%1 tmp%2 - %xdefine nm%1 ntmp%2 - %undef tmp%2 - %undef ntmp%2 - %rotate 2 -%endrep -%endmacro - -%macro SWAP 2-* ; swaps a single chain (sometimes more concise than pairs) -%rep %0-1 -%ifdef m%1 - %xdefine tmp m%1 - %xdefine m%1 m%2 - %xdefine m%2 tmp - CAT_XDEFINE n, m%1, %1 - CAT_XDEFINE n, m%2, %2 -%else - ; If we were called as "SWAP m0,m1" rather than "SWAP 0,1" infer the original numbers here. - ; Be careful using this mode in nested macros though, as in some cases there may be - ; other copies of m# that have already been dereferenced and don't get updated correctly. - %xdefine %%n1 n %+ %1 - %xdefine %%n2 n %+ %2 - %xdefine tmp m %+ %%n1 - CAT_XDEFINE m, %%n1, m %+ %%n2 - CAT_XDEFINE m, %%n2, tmp - CAT_XDEFINE n, m %+ %%n1, %%n1 - CAT_XDEFINE n, m %+ %%n2, %%n2 -%endif - %undef tmp - %rotate 1 -%endrep -%endmacro - -; If SAVE_MM_PERMUTATION is placed at the end of a function and given the -; function name, then any later calls to that function will automatically -; load the permutation, so values can be returned in mmregs. -%macro SAVE_MM_PERMUTATION 1 ; name to save as - %assign %%i 0 - %rep num_mmregs - CAT_XDEFINE %1_m, %%i, m %+ %%i - %assign %%i %%i+1 - %endrep -%endmacro - -%macro LOAD_MM_PERMUTATION 1 ; name to load from - %assign %%i 0 - %rep num_mmregs - CAT_XDEFINE m, %%i, %1_m %+ %%i - CAT_XDEFINE n, m %+ %%i, %%i - %assign %%i %%i+1 - %endrep -%endmacro - -%macro call 1 - call %1 - %ifdef %1_m0 - LOAD_MM_PERMUTATION %1 - %endif -%endmacro - -; Substitutions that reduce instruction size but are functionally equivalent -%macro add 2 - %ifnum %2 - %if %2==128 - sub %1, -128 - %else - add %1, %2 - %endif - %else - add %1, %2 - %endif -%endmacro - -%macro sub 2 - %ifnum %2 - %if %2==128 - add %1, -128 - %else - sub %1, %2 - %endif - %else - sub %1, %2 - %endif -%endmacro - -;============================================================================= -; AVX abstraction layer -;============================================================================= - -%assign i 0 -%rep 16 - %if i < 8 - CAT_XDEFINE sizeofmm, i, 8 - %endif - CAT_XDEFINE sizeofxmm, i, 16 - CAT_XDEFINE sizeofymm, i, 32 -%assign i i+1 -%endrep -%undef i - -;%1 == instruction -;%2 == 1 if float, 0 if int -;%3 == 0 if 3-operand (xmm, xmm, xmm), 1 if 4-operand (xmm, xmm, xmm, imm) -;%4 == number of operands given -;%5+: operands -%macro RUN_AVX_INSTR 6-7+ - %if sizeof%5==32 - v%1 %5, %6, %7 - %else - %if sizeof%5==8 - %define %%regmov movq - %elif %2 - %define %%regmov movaps - %else - %define %%regmov movdqa - %endif - - %if %4>=3+%3 - %ifnidn %5, %6 - %if avx_enabled && sizeof%5==16 - v%1 %5, %6, %7 - %else - %%regmov %5, %6 - %1 %5, %7 - %endif - %else - %1 %5, %7 - %endif - %elif %3 - %1 %5, %6, %7 - %else - %1 %5, %6 - %endif - %endif -%endmacro - -;%1 == instruction -;%2 == 1 if float, 0 if int -;%3 == 0 if 3-operand (xmm, xmm, xmm), 1 if 4-operand (xmm, xmm, xmm, imm) -%macro AVX_INSTR 3 - %macro %1 2-8 fnord, fnord, fnord, %1, %2, %3 - %ifidn %3, fnord - RUN_AVX_INSTR %6, %7, %8, 2, %1, %2 - %elifidn %4, fnord - RUN_AVX_INSTR %6, %7, %8, 3, %1, %2, %3 - %elifidn %5, fnord - RUN_AVX_INSTR %6, %7, %8, 4, %1, %2, %3, %4 - %else - RUN_AVX_INSTR %6, %7, %8, 5, %1, %2, %3, %4, %5 - %endif - %endmacro -%endmacro - -AVX_INSTR addpd, 1, 0 -AVX_INSTR addps, 1, 0 -AVX_INSTR addsd, 1, 0 -AVX_INSTR addss, 1, 0 -AVX_INSTR addsubpd, 1, 0 -AVX_INSTR addsubps, 1, 0 -AVX_INSTR andpd, 1, 0 -AVX_INSTR andps, 1, 0 -AVX_INSTR andnpd, 1, 0 -AVX_INSTR andnps, 1, 0 -AVX_INSTR blendpd, 1, 0 -AVX_INSTR blendps, 1, 0 -AVX_INSTR blendvpd, 1, 0 -AVX_INSTR blendvps, 1, 0 -AVX_INSTR cmppd, 1, 0 -AVX_INSTR cmpps, 1, 0 -AVX_INSTR cmpsd, 1, 0 -AVX_INSTR cmpss, 1, 0 -AVX_INSTR divpd, 1, 0 -AVX_INSTR divps, 1, 0 -AVX_INSTR divsd, 1, 0 -AVX_INSTR divss, 1, 0 -AVX_INSTR dppd, 1, 0 -AVX_INSTR dpps, 1, 0 -AVX_INSTR haddpd, 1, 0 -AVX_INSTR haddps, 1, 0 -AVX_INSTR hsubpd, 1, 0 -AVX_INSTR hsubps, 1, 0 -AVX_INSTR maxpd, 1, 0 -AVX_INSTR maxps, 1, 0 -AVX_INSTR maxsd, 1, 0 -AVX_INSTR maxss, 1, 0 -AVX_INSTR minpd, 1, 0 -AVX_INSTR minps, 1, 0 -AVX_INSTR minsd, 1, 0 -AVX_INSTR minss, 1, 0 -AVX_INSTR mpsadbw, 0, 1 -AVX_INSTR mulpd, 1, 0 -AVX_INSTR mulps, 1, 0 -AVX_INSTR mulsd, 1, 0 -AVX_INSTR mulss, 1, 0 -AVX_INSTR orpd, 1, 0 -AVX_INSTR orps, 1, 0 -AVX_INSTR packsswb, 0, 0 -AVX_INSTR packssdw, 0, 0 -AVX_INSTR packuswb, 0, 0 -AVX_INSTR packusdw, 0, 0 -AVX_INSTR paddb, 0, 0 -AVX_INSTR paddw, 0, 0 -AVX_INSTR paddd, 0, 0 -AVX_INSTR paddq, 0, 0 -AVX_INSTR paddsb, 0, 0 -AVX_INSTR paddsw, 0, 0 -AVX_INSTR paddusb, 0, 0 -AVX_INSTR paddusw, 0, 0 -AVX_INSTR palignr, 0, 1 -AVX_INSTR pand, 0, 0 -AVX_INSTR pandn, 0, 0 -AVX_INSTR pavgb, 0, 0 -AVX_INSTR pavgw, 0, 0 -AVX_INSTR pblendvb, 0, 0 -AVX_INSTR pblendw, 0, 1 -AVX_INSTR pcmpestri, 0, 0 -AVX_INSTR pcmpestrm, 0, 0 -AVX_INSTR pcmpistri, 0, 0 -AVX_INSTR pcmpistrm, 0, 0 -AVX_INSTR pcmpeqb, 0, 0 -AVX_INSTR pcmpeqw, 0, 0 -AVX_INSTR pcmpeqd, 0, 0 -AVX_INSTR pcmpeqq, 0, 0 -AVX_INSTR pcmpgtb, 0, 0 -AVX_INSTR pcmpgtw, 0, 0 -AVX_INSTR pcmpgtd, 0, 0 -AVX_INSTR pcmpgtq, 0, 0 -AVX_INSTR phaddw, 0, 0 -AVX_INSTR phaddd, 0, 0 -AVX_INSTR phaddsw, 0, 0 -AVX_INSTR phsubw, 0, 0 -AVX_INSTR phsubd, 0, 0 -AVX_INSTR phsubsw, 0, 0 -AVX_INSTR pmaddwd, 0, 0 -AVX_INSTR pmaddubsw, 0, 0 -AVX_INSTR pmaxsb, 0, 0 -AVX_INSTR pmaxsw, 0, 0 -AVX_INSTR pmaxsd, 0, 0 -AVX_INSTR pmaxub, 0, 0 -AVX_INSTR pmaxuw, 0, 0 -AVX_INSTR pmaxud, 0, 0 -AVX_INSTR pminsb, 0, 0 -AVX_INSTR pminsw, 0, 0 -AVX_INSTR pminsd, 0, 0 -AVX_INSTR pminub, 0, 0 -AVX_INSTR pminuw, 0, 0 -AVX_INSTR pminud, 0, 0 -AVX_INSTR pmulhuw, 0, 0 -AVX_INSTR pmulhrsw, 0, 0 -AVX_INSTR pmulhw, 0, 0 -AVX_INSTR pmullw, 0, 0 -AVX_INSTR pmulld, 0, 0 -AVX_INSTR pmuludq, 0, 0 -AVX_INSTR pmuldq, 0, 0 -AVX_INSTR por, 0, 0 -AVX_INSTR psadbw, 0, 0 -AVX_INSTR pshufb, 0, 0 -AVX_INSTR psignb, 0, 0 -AVX_INSTR psignw, 0, 0 -AVX_INSTR psignd, 0, 0 -AVX_INSTR psllw, 0, 0 -AVX_INSTR pslld, 0, 0 -AVX_INSTR psllq, 0, 0 -AVX_INSTR pslldq, 0, 0 -AVX_INSTR psraw, 0, 0 -AVX_INSTR psrad, 0, 0 -AVX_INSTR psrlw, 0, 0 -AVX_INSTR psrld, 0, 0 -AVX_INSTR psrlq, 0, 0 -AVX_INSTR psrldq, 0, 0 -AVX_INSTR psubb, 0, 0 -AVX_INSTR psubw, 0, 0 -AVX_INSTR psubd, 0, 0 -AVX_INSTR psubq, 0, 0 -AVX_INSTR psubsb, 0, 0 -AVX_INSTR psubsw, 0, 0 -AVX_INSTR psubusb, 0, 0 -AVX_INSTR psubusw, 0, 0 -AVX_INSTR punpckhbw, 0, 0 -AVX_INSTR punpckhwd, 0, 0 -AVX_INSTR punpckhdq, 0, 0 -AVX_INSTR punpckhqdq, 0, 0 -AVX_INSTR punpcklbw, 0, 0 -AVX_INSTR punpcklwd, 0, 0 -AVX_INSTR punpckldq, 0, 0 -AVX_INSTR punpcklqdq, 0, 0 -AVX_INSTR pxor, 0, 0 -AVX_INSTR shufps, 0, 1 -AVX_INSTR subpd, 1, 0 -AVX_INSTR subps, 1, 0 -AVX_INSTR subsd, 1, 0 -AVX_INSTR subss, 1, 0 -AVX_INSTR unpckhpd, 1, 0 -AVX_INSTR unpckhps, 1, 0 -AVX_INSTR unpcklpd, 1, 0 -AVX_INSTR unpcklps, 1, 0 -AVX_INSTR xorpd, 1, 0 -AVX_INSTR xorps, 1, 0 - -; 3DNow instructions, for sharing code between AVX, SSE and 3DN -AVX_INSTR pfadd, 1, 0 -AVX_INSTR pfsub, 1, 0 -AVX_INSTR pfmul, 1, 0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/x86util.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/x86util.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/x86/x86util.asm 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/x86/x86util.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,534 +0,0 @@ -;***************************************************************************** -;* x86util.asm -;***************************************************************************** -;* Copyright (C) 2008-2010 x264 project -;* -;* Authors: Loren Merritt -;* Holger Lubitz -;* -;* This file is part of Libav. -;* -;* Libav is free software; you can redistribute it and/or -;* modify it under the terms of the GNU Lesser General Public -;* License as published by the Free Software Foundation; either -;* version 2.1 of the License, or (at your option) any later version. -;* -;* Libav is distributed in the hope that it will be useful, -;* but WITHOUT ANY WARRANTY; without even the implied warranty of -;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;* Lesser General Public License for more details. -;* -;* You should have received a copy of the GNU Lesser General Public -;* License along with Libav; if not, write to the Free Software -;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -;****************************************************************************** - -%macro SBUTTERFLY 4 -%if avx_enabled == 0 - mova m%4, m%2 - punpckl%1 m%2, m%3 - punpckh%1 m%4, m%3 -%else - punpckh%1 m%4, m%2, m%3 - punpckl%1 m%2, m%3 -%endif - SWAP %3, %4 -%endmacro - -%macro SBUTTERFLY2 4 - punpckl%1 m%4, m%2, m%3 - punpckh%1 m%2, m%2, m%3 - SWAP %2, %4, %3 -%endmacro - -%macro SBUTTERFLYPS 3 - movaps m%3, m%1 - unpcklps m%1, m%2 - unpckhps m%3, m%2 - SWAP %2, %3 -%endmacro - -%macro TRANSPOSE4x4B 5 - SBUTTERFLY bw, %1, %2, %5 - SBUTTERFLY bw, %3, %4, %5 - SBUTTERFLY wd, %1, %3, %5 - SBUTTERFLY wd, %2, %4, %5 - SWAP %2, %3 -%endmacro - -%macro TRANSPOSE4x4W 5 - SBUTTERFLY wd, %1, %2, %5 - SBUTTERFLY wd, %3, %4, %5 - SBUTTERFLY dq, %1, %3, %5 - SBUTTERFLY dq, %2, %4, %5 - SWAP %2, %3 -%endmacro - -%macro TRANSPOSE2x4x4W 5 - SBUTTERFLY wd, %1, %2, %5 - SBUTTERFLY wd, %3, %4, %5 - SBUTTERFLY dq, %1, %3, %5 - SBUTTERFLY dq, %2, %4, %5 - SBUTTERFLY qdq, %1, %2, %5 - SBUTTERFLY qdq, %3, %4, %5 -%endmacro - -%macro TRANSPOSE4x4D 5 - SBUTTERFLY dq, %1, %2, %5 - SBUTTERFLY dq, %3, %4, %5 - SBUTTERFLY qdq, %1, %3, %5 - SBUTTERFLY qdq, %2, %4, %5 - SWAP %2, %3 -%endmacro - -; identical behavior to TRANSPOSE4x4D, but using SSE1 float ops -%macro TRANSPOSE4x4PS 5 - SBUTTERFLYPS %1, %2, %5 - SBUTTERFLYPS %3, %4, %5 - movaps m%5, m%1 - movlhps m%1, m%3 - movhlps m%3, m%5 - movaps m%5, m%2 - movlhps m%2, m%4 - movhlps m%4, m%5 - SWAP %2, %3 -%endmacro - -%macro TRANSPOSE8x8W 9-11 -%ifdef ARCH_X86_64 - SBUTTERFLY wd, %1, %2, %9 - SBUTTERFLY wd, %3, %4, %9 - SBUTTERFLY wd, %5, %6, %9 - SBUTTERFLY wd, %7, %8, %9 - SBUTTERFLY dq, %1, %3, %9 - SBUTTERFLY dq, %2, %4, %9 - SBUTTERFLY dq, %5, %7, %9 - SBUTTERFLY dq, %6, %8, %9 - SBUTTERFLY qdq, %1, %5, %9 - SBUTTERFLY qdq, %2, %6, %9 - SBUTTERFLY qdq, %3, %7, %9 - SBUTTERFLY qdq, %4, %8, %9 - SWAP %2, %5 - SWAP %4, %7 -%else -; in: m0..m7, unless %11 in which case m6 is in %9 -; out: m0..m7, unless %11 in which case m4 is in %10 -; spills into %9 and %10 -%if %0<11 - movdqa %9, m%7 -%endif - SBUTTERFLY wd, %1, %2, %7 - movdqa %10, m%2 - movdqa m%7, %9 - SBUTTERFLY wd, %3, %4, %2 - SBUTTERFLY wd, %5, %6, %2 - SBUTTERFLY wd, %7, %8, %2 - SBUTTERFLY dq, %1, %3, %2 - movdqa %9, m%3 - movdqa m%2, %10 - SBUTTERFLY dq, %2, %4, %3 - SBUTTERFLY dq, %5, %7, %3 - SBUTTERFLY dq, %6, %8, %3 - SBUTTERFLY qdq, %1, %5, %3 - SBUTTERFLY qdq, %2, %6, %3 - movdqa %10, m%2 - movdqa m%3, %9 - SBUTTERFLY qdq, %3, %7, %2 - SBUTTERFLY qdq, %4, %8, %2 - SWAP %2, %5 - SWAP %4, %7 -%if %0<11 - movdqa m%5, %10 -%endif -%endif -%endmacro - -; PABSW macros assume %1 != %2, while ABS1/2 macros work in-place -%macro PABSW_MMX 2 - pxor %1, %1 - pcmpgtw %1, %2 - pxor %2, %1 - psubw %2, %1 - SWAP %1, %2 -%endmacro - -%macro PSIGNW_MMX 2 - pxor %1, %2 - psubw %1, %2 -%endmacro - -%macro PABSW_MMX2 2 - pxor %1, %1 - psubw %1, %2 - pmaxsw %1, %2 -%endmacro - -%macro PABSW_SSSE3 2 - pabsw %1, %2 -%endmacro - -%macro PSIGNW_SSSE3 2 - psignw %1, %2 -%endmacro - -%macro ABS1_MMX 2 ; a, tmp - pxor %2, %2 - pcmpgtw %2, %1 - pxor %1, %2 - psubw %1, %2 -%endmacro - -%macro ABS2_MMX 4 ; a, b, tmp0, tmp1 - pxor %3, %3 - pxor %4, %4 - pcmpgtw %3, %1 - pcmpgtw %4, %2 - pxor %1, %3 - pxor %2, %4 - psubw %1, %3 - psubw %2, %4 -%endmacro - -%macro ABS1_MMX2 2 ; a, tmp - pxor %2, %2 - psubw %2, %1 - pmaxsw %1, %2 -%endmacro - -%macro ABS2_MMX2 4 ; a, b, tmp0, tmp1 - pxor %3, %3 - pxor %4, %4 - psubw %3, %1 - psubw %4, %2 - pmaxsw %1, %3 - pmaxsw %2, %4 -%endmacro - -%macro ABS1_SSSE3 2 - pabsw %1, %1 -%endmacro - -%macro ABS2_SSSE3 4 - pabsw %1, %1 - pabsw %2, %2 -%endmacro - -%macro ABSB_MMX 2 - pxor %2, %2 - psubb %2, %1 - pminub %1, %2 -%endmacro - -%macro ABSB2_MMX 4 - pxor %3, %3 - pxor %4, %4 - psubb %3, %1 - psubb %4, %2 - pminub %1, %3 - pminub %2, %4 -%endmacro - -%macro ABSD2_MMX 4 - pxor %3, %3 - pxor %4, %4 - pcmpgtd %3, %1 - pcmpgtd %4, %2 - pxor %1, %3 - pxor %2, %4 - psubd %1, %3 - psubd %2, %4 -%endmacro - -%macro ABSB_SSSE3 2 - pabsb %1, %1 -%endmacro - -%macro ABSB2_SSSE3 4 - pabsb %1, %1 - pabsb %2, %2 -%endmacro - -%macro ABS4 6 - ABS2 %1, %2, %5, %6 - ABS2 %3, %4, %5, %6 -%endmacro - -%define ABS1 ABS1_MMX -%define ABS2 ABS2_MMX -%define ABSB ABSB_MMX -%define ABSB2 ABSB2_MMX - -%macro SPLATB_MMX 3 - movd %1, [%2-3] ;to avoid crossing a cacheline - punpcklbw %1, %1 - SPLATW %1, %1, 3 -%endmacro - -%macro SPLATB_SSSE3 3 - movd %1, [%2-3] - pshufb %1, %3 -%endmacro - -%macro PALIGNR_MMX 4-5 ; [dst,] src1, src2, imm, tmp - %define %%dst %1 -%if %0==5 -%ifnidn %1, %2 - mova %%dst, %2 -%endif - %rotate 1 -%endif -%ifnidn %4, %2 - mova %4, %2 -%endif -%if mmsize==8 - psllq %%dst, (8-%3)*8 - psrlq %4, %3*8 -%else - pslldq %%dst, 16-%3 - psrldq %4, %3 -%endif - por %%dst, %4 -%endmacro - -%macro PALIGNR_SSSE3 4-5 -%if %0==5 - palignr %1, %2, %3, %4 -%else - palignr %1, %2, %3 -%endif -%endmacro - -%macro DEINTB 5 ; mask, reg1, mask, reg2, optional src to fill masks from -%ifnum %5 - pand m%3, m%5, m%4 ; src .. y6 .. y4 - pand m%1, m%5, m%2 ; dst .. y6 .. y4 -%else - mova m%1, %5 - pand m%3, m%1, m%4 ; src .. y6 .. y4 - pand m%1, m%1, m%2 ; dst .. y6 .. y4 -%endif - psrlw m%2, 8 ; dst .. y7 .. y5 - psrlw m%4, 8 ; src .. y7 .. y5 -%endmacro - -%macro SUMSUB_BA 3-4 -%if %0==3 - padd%1 m%2, m%3 - padd%1 m%3, m%3 - psub%1 m%3, m%2 -%else -%if avx_enabled == 0 - mova m%4, m%2 - padd%1 m%2, m%3 - psub%1 m%3, m%4 -%else - padd%1 m%4, m%2, m%3 - psub%1 m%3, m%2 - SWAP %2, %4 -%endif -%endif -%endmacro - -%macro SUMSUB_BADC 5-6 -%if %0==6 - SUMSUB_BA %1, %2, %3, %6 - SUMSUB_BA %1, %4, %5, %6 -%else - padd%1 m%2, m%3 - padd%1 m%4, m%5 - padd%1 m%3, m%3 - padd%1 m%5, m%5 - psub%1 m%3, m%2 - psub%1 m%5, m%4 -%endif -%endmacro - -%macro SUMSUB2_AB 4 -%ifnum %3 - psub%1 m%4, m%2, m%3 - psub%1 m%4, m%3 - padd%1 m%2, m%2 - padd%1 m%2, m%3 -%else - mova m%4, m%2 - padd%1 m%2, m%2 - padd%1 m%2, %3 - psub%1 m%4, %3 - psub%1 m%4, %3 -%endif -%endmacro - -%macro SUMSUB2_BA 4 -%if avx_enabled == 0 - mova m%4, m%2 - padd%1 m%2, m%3 - padd%1 m%2, m%3 - psub%1 m%3, m%4 - psub%1 m%3, m%4 -%else - padd%1 m%4, m%2, m%3 - padd%1 m%4, m%3 - psub%1 m%3, m%2 - psub%1 m%3, m%2 - SWAP %2, %4 -%endif -%endmacro - -%macro SUMSUBD2_AB 5 -%ifnum %4 - psra%1 m%5, m%2, 1 ; %3: %3>>1 - psra%1 m%4, m%3, 1 ; %2: %2>>1 - padd%1 m%4, m%2 ; %3: %3>>1+%2 - psub%1 m%5, m%3 ; %2: %2>>1-%3 - SWAP %2, %5 - SWAP %3, %4 -%else - mova %5, m%2 - mova %4, m%3 - psra%1 m%3, 1 ; %3: %3>>1 - psra%1 m%2, 1 ; %2: %2>>1 - padd%1 m%3, %5 ; %3: %3>>1+%2 - psub%1 m%2, %4 ; %2: %2>>1-%3 -%endif -%endmacro - -%macro DCT4_1D 5 -%ifnum %5 - SUMSUB_BADC w, %4, %1, %3, %2, %5 - SUMSUB_BA w, %3, %4, %5 - SUMSUB2_AB w, %1, %2, %5 - SWAP %1, %3, %4, %5, %2 -%else - SUMSUB_BADC w, %4, %1, %3, %2 - SUMSUB_BA w, %3, %4 - mova [%5], m%2 - SUMSUB2_AB w, %1, [%5], %2 - SWAP %1, %3, %4, %2 -%endif -%endmacro - -%macro IDCT4_1D 6-7 -%ifnum %6 - SUMSUBD2_AB %1, %3, %5, %7, %6 - ; %3: %3>>1-%5 %5: %3+%5>>1 - SUMSUB_BA %1, %4, %2, %7 - ; %4: %2+%4 %2: %2-%4 - SUMSUB_BADC %1, %5, %4, %3, %2, %7 - ; %5: %2+%4 + (%3+%5>>1) - ; %4: %2+%4 - (%3+%5>>1) - ; %3: %2-%4 + (%3>>1-%5) - ; %2: %2-%4 - (%3>>1-%5) -%else -%ifidn %1, w - SUMSUBD2_AB %1, %3, %5, [%6], [%6+16] -%else - SUMSUBD2_AB %1, %3, %5, [%6], [%6+32] -%endif - SUMSUB_BA %1, %4, %2 - SUMSUB_BADC %1, %5, %4, %3, %2 -%endif - SWAP %2, %5, %4 - ; %2: %2+%4 + (%3+%5>>1) row0 - ; %3: %2-%4 + (%3>>1-%5) row1 - ; %4: %2-%4 - (%3>>1-%5) row2 - ; %5: %2+%4 - (%3+%5>>1) row3 -%endmacro - - -%macro LOAD_DIFF 5 -%ifidn %3, none - movh %1, %4 - movh %2, %5 - punpcklbw %1, %2 - punpcklbw %2, %2 - psubw %1, %2 -%else - movh %1, %4 - punpcklbw %1, %3 - movh %2, %5 - punpcklbw %2, %3 - psubw %1, %2 -%endif -%endmacro - -%macro STORE_DCT 6 - movq [%5+%6+ 0], m%1 - movq [%5+%6+ 8], m%2 - movq [%5+%6+16], m%3 - movq [%5+%6+24], m%4 - movhps [%5+%6+32], m%1 - movhps [%5+%6+40], m%2 - movhps [%5+%6+48], m%3 - movhps [%5+%6+56], m%4 -%endmacro - -%macro LOAD_DIFF_8x4P 7-10 r0,r2,0 ; 4x dest, 2x temp, 2x pointer, increment? - LOAD_DIFF m%1, m%5, m%7, [%8], [%9] - LOAD_DIFF m%2, m%6, m%7, [%8+r1], [%9+r3] - LOAD_DIFF m%3, m%5, m%7, [%8+2*r1], [%9+2*r3] - LOAD_DIFF m%4, m%6, m%7, [%8+r4], [%9+r5] -%if %10 - lea %8, [%8+4*r1] - lea %9, [%9+4*r3] -%endif -%endmacro - -%macro DIFFx2 6-7 - movh %3, %5 - punpcklbw %3, %4 - psraw %1, 6 - paddsw %1, %3 - movh %3, %6 - punpcklbw %3, %4 - psraw %2, 6 - paddsw %2, %3 - packuswb %2, %1 -%endmacro - -%macro STORE_DIFF 4 - movh %2, %4 - punpcklbw %2, %3 - psraw %1, 6 - paddsw %1, %2 - packuswb %1, %1 - movh %4, %1 -%endmacro - -%macro STORE_DIFFx2 8 ; add1, add2, reg1, reg2, zero, shift, source, stride - movh %3, [%7] - movh %4, [%7+%8] - punpcklbw %3, %5 - punpcklbw %4, %5 - psraw %1, %6 - psraw %2, %6 - paddw %3, %1 - paddw %4, %2 - packuswb %3, %5 - packuswb %4, %5 - movh [%7], %3 - movh [%7+%8], %4 -%endmacro - -%macro PMINUB_MMX 3 ; dst, src, tmp - mova %3, %1 - psubusb %3, %2 - psubb %1, %3 -%endmacro - -%macro PMINUB_MMXEXT 3 ; dst, src, ignored - pminub %1, %2 -%endmacro - -%macro SPLATW 2-3 0 -%if mmsize == 16 - pshuflw %1, %2, (%3)*0x55 - punpcklqdq %1, %1 -%else - pshufw %1, %2, (%3)*0x55 -%endif -%endmacro - -%macro CLIPW 3 ;(dst, min, max) - pmaxsw %1, %2 - pminsw %1, %3 -%endmacro diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xan.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xan.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xan.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xan.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,7 +35,7 @@ #include "libavutil/intreadwrite.h" #include "avcodec.h" #include "bytestream.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" // for av_memcpy_backptr #include "libavutil/lzo.h" @@ -95,22 +95,29 @@ return 0; } -static int xan_huffman_decode(unsigned char *dest, const unsigned char *src, - int dest_len) +static int xan_huffman_decode(unsigned char *dest, int dest_len, + const unsigned char *src, int src_len) { unsigned char byte = *src++; unsigned char ival = byte + 0x16; const unsigned char * ptr = src + byte*2; + int ptr_len = src_len - 1 - byte*2; unsigned char val = ival; unsigned char *dest_end = dest + dest_len; GetBitContext gb; - init_get_bits(&gb, ptr, 0); // FIXME: no src size available + if (ptr_len < 0) + return AVERROR_INVALIDDATA; - while ( val != 0x16 ) { - val = src[val - 0x17 + get_bits1(&gb) * byte]; + init_get_bits(&gb, ptr, ptr_len * 8); - if ( val < 0x16 ) { + while (val != 0x16) { + unsigned idx = val - 0x17 + get_bits1(&gb) * byte; + if (idx >= 2 * byte) + return -1; + val = src[idx]; + + if (val < 0x16) { if (dest >= dest_end) return 0; *dest++ = val; @@ -126,40 +133,41 @@ * * @param dest destination buffer of dest_len, must be padded with at least 130 bytes */ -static void xan_unpack(unsigned char *dest, const unsigned char *src, int dest_len) +static void xan_unpack(unsigned char *dest, int dest_len, + const unsigned char *src, int src_len) { unsigned char opcode; int size; + unsigned char *dest_org = dest; unsigned char *dest_end = dest + dest_len; + const unsigned char *src_end = src + src_len; - while (dest < dest_end) { + while (dest < dest_end && src < src_end) { opcode = *src++; if (opcode < 0xe0) { int size2, back; - if ( (opcode & 0x80) == 0 ) { - + if ((opcode & 0x80) == 0) { size = opcode & 3; back = ((opcode & 0x60) << 3) + *src++ + 1; size2 = ((opcode & 0x1c) >> 2) + 3; - - } else if ( (opcode & 0x40) == 0 ) { - + } else if ((opcode & 0x40) == 0) { size = *src >> 6; back = (bytestream_get_be16(&src) & 0x3fff) + 1; size2 = (opcode & 0x3f) + 4; - } else { - size = opcode & 3; back = ((opcode & 0x10) << 12) + bytestream_get_be16(&src) + 1; size2 = ((opcode & 0x0c) << 6) + *src++ + 5; - if (size + size2 > dest_end - dest) - return; } + + if (dest_end - dest < size + size2 || + dest + size - dest_org < back || + src_end - src < size) + return; memcpy(dest, src, size); dest += size; src += size; av_memcpy_backptr(dest, back, size2); dest += size2; @@ -167,6 +175,8 @@ int finish = opcode >= 0xfc; size = finish ? opcode & 3 : ((opcode & 0x1f) << 2) + 4; + if (dest_end - dest < size || src_end - src < size) + return; memcpy(dest, src, size); dest += size; src += size; if (finish) return; @@ -189,7 +199,7 @@ line_inc = stride - width; index = y * stride + x; current_x = x; - while(pixel_count && (index < s->frame_size)) { + while (pixel_count && index < s->frame_size) { int count = FFMIN(pixel_count, width - current_x); memcpy(palette_plane + index, pixel_buffer, count); pixel_count -= count; @@ -204,8 +214,9 @@ } } -static inline void xan_wc3_copy_pixel_run(XanContext *s, - int x, int y, int pixel_count, int motion_x, int motion_y) +static inline void xan_wc3_copy_pixel_run(XanContext *s, int x, int y, + int pixel_count, int motion_x, + int motion_y) { int stride; int line_inc; @@ -214,18 +225,28 @@ int width = s->avctx->width; unsigned char *palette_plane, *prev_palette_plane; + if (y + motion_y < 0 || y + motion_y >= s->avctx->height || + x + motion_x < 0 || x + motion_x >= s->avctx->width) + return; + palette_plane = s->current_frame.data[0]; prev_palette_plane = s->last_frame.data[0]; + if (!prev_palette_plane) + prev_palette_plane = palette_plane; stride = s->current_frame.linesize[0]; line_inc = stride - width; curframe_index = y * stride + x; curframe_x = x; prevframe_index = (y + motion_y) * stride + x + motion_x; prevframe_x = x + motion_x; - while(pixel_count && (curframe_index < s->frame_size)) { - int count = FFMIN3(pixel_count, width - curframe_x, width - prevframe_x); + while (pixel_count && + curframe_index < s->frame_size && + prevframe_index < s->frame_size) { + int count = FFMIN3(pixel_count, width - curframe_x, + width - prevframe_x); - memcpy(palette_plane + curframe_index, prev_palette_plane + prevframe_index, count); + memcpy(palette_plane + curframe_index, + prev_palette_plane + prevframe_index, count); pixel_count -= count; curframe_index += count; prevframe_index += count; @@ -244,9 +265,9 @@ } } -static void xan_wc3_decode_frame(XanContext *s) { +static int xan_wc3_decode_frame(XanContext *s) { - int width = s->avctx->width; + int width = s->avctx->width; int height = s->avctx->height; int total_pixels = width * height; unsigned char opcode; @@ -256,6 +277,7 @@ int x, y; unsigned char *opcode_buffer = s->buffer1; + unsigned char *opcode_buffer_end = s->buffer1 + s->buffer1_size; int opcode_buffer_size = s->buffer1_size; const unsigned char *imagedata_buffer = s->buffer2; @@ -264,22 +286,44 @@ const unsigned char *size_segment; const unsigned char *vector_segment; const unsigned char *imagedata_segment; + int huffman_offset, size_offset, vector_offset, imagedata_offset, + imagedata_size; + + if (s->size < 8) + return AVERROR_INVALIDDATA; - huffman_segment = s->buf + AV_RL16(&s->buf[0]); - size_segment = s->buf + AV_RL16(&s->buf[2]); - vector_segment = s->buf + AV_RL16(&s->buf[4]); - imagedata_segment = s->buf + AV_RL16(&s->buf[6]); - - xan_huffman_decode(opcode_buffer, huffman_segment, opcode_buffer_size); - - if (imagedata_segment[0] == 2) - xan_unpack(s->buffer2, &imagedata_segment[1], s->buffer2_size); - else + huffman_offset = AV_RL16(&s->buf[0]); + size_offset = AV_RL16(&s->buf[2]); + vector_offset = AV_RL16(&s->buf[4]); + imagedata_offset = AV_RL16(&s->buf[6]); + + if (huffman_offset >= s->size || + size_offset >= s->size || + vector_offset >= s->size || + imagedata_offset >= s->size) + return AVERROR_INVALIDDATA; + + huffman_segment = s->buf + huffman_offset; + size_segment = s->buf + size_offset; + vector_segment = s->buf + vector_offset; + imagedata_segment = s->buf + imagedata_offset; + + if (xan_huffman_decode(opcode_buffer, opcode_buffer_size, + huffman_segment, s->size - huffman_offset) < 0) + return AVERROR_INVALIDDATA; + + if (imagedata_segment[0] == 2) { + xan_unpack(s->buffer2, s->buffer2_size, + &imagedata_segment[1], s->size - imagedata_offset - 1); + imagedata_size = s->buffer2_size; + } else { + imagedata_size = s->size - imagedata_offset - 1; imagedata_buffer = &imagedata_segment[1]; + } /* use the decoded data segments to build the frame */ x = y = 0; - while (total_pixels) { + while (total_pixels && opcode_buffer < opcode_buffer_end) { opcode = *opcode_buffer++; size = 0; @@ -329,6 +373,9 @@ break; } + if (size > total_pixels) + break; + if (opcode < 12) { flag ^= 1; if (flag) { @@ -336,8 +383,11 @@ xan_wc3_copy_pixel_run(s, x, y, size, 0, 0); } else { /* output a run of pixels from imagedata_buffer */ + if (imagedata_size < size) + break; xan_wc3_output_pixel_run(s, imagedata_buffer, x, y, size); imagedata_buffer += size; + imagedata_size -= size; } } else { /* run-based motion compensation from last frame */ @@ -356,6 +406,7 @@ y += (x + size) / width; x = (x + size) % width; } + return 0; } #if RUNTIME_GAMMA @@ -466,7 +517,8 @@ return AVERROR_INVALIDDATA; if (s->palettes_count >= PALETTES_MAX) return AVERROR_INVALIDDATA; - tmpptr = av_realloc(s->palettes, (s->palettes_count + 1) * AVPALETTE_SIZE); + tmpptr = av_realloc(s->palettes, + (s->palettes_count + 1) * AVPALETTE_SIZE); if (!tmpptr) return AVERROR(ENOMEM); s->palettes = tmpptr; @@ -503,6 +555,11 @@ } buf_size = buf_end - buf; } + if (s->palettes_count <= 0) { + av_log(s->avctx, AV_LOG_ERROR, "No palette found\n"); + return AVERROR_INVALIDDATA; + } + if ((ret = avctx->get_buffer(avctx, &s->current_frame))) { av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return ret; @@ -512,12 +569,14 @@ if (!s->frame_size) s->frame_size = s->current_frame.linesize[0] * s->avctx->height; - memcpy(s->current_frame.data[1], s->palettes + s->cur_palette * AVPALETTE_COUNT, AVPALETTE_SIZE); + memcpy(s->current_frame.data[1], + s->palettes + s->cur_palette * AVPALETTE_COUNT, AVPALETTE_SIZE); s->buf = buf; s->size = buf_size; - xan_wc3_decode_frame(s); + if (xan_wc3_decode_frame(s) < 0) + return AVERROR_INVALIDDATA; /* release the last frame if it is allocated */ if (s->last_frame.data[0]) @@ -551,15 +610,13 @@ } AVCodec ff_xan_wc3_decoder = { - "xan_wc3", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_XAN_WC3, - sizeof(XanContext), - xan_decode_init, - NULL, - xan_decode_end, - xan_decode_frame, - CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("Wing Commander III / Xan"), + .name = "xan_wc3", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_XAN_WC3, + .priv_data_size = sizeof(XanContext), + .init = xan_decode_init, + .close = xan_decode_end, + .decode = xan_decode_frame, + .capabilities = CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("Wing Commander III / Xan"), }; - diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xiph.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xiph.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xiph.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xiph.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,7 +21,7 @@ #include "libavutil/intreadwrite.h" #include "xiph.h" -int ff_split_xiph_headers(uint8_t *extradata, int extradata_size, +int avpriv_split_xiph_headers(uint8_t *extradata, int extradata_size, int first_header_size, uint8_t *header_start[3], int header_len[3]) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xiph.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xiph.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xiph.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xiph.h 2012-01-11 00:34:30.000000000 +0000 @@ -36,8 +36,8 @@ * @param[out] header_len The sizes of each of the three headers. * @return On error a negative value is returned, on success zero. */ -int ff_split_xiph_headers(uint8_t *extradata, int extradata_size, - int first_header_size, uint8_t *header_start[3], - int header_len[3]); +int avpriv_split_xiph_headers(uint8_t *extradata, int extradata_size, + int first_header_size, uint8_t *header_start[3], + int header_len[3]); #endif /* AVCODEC_XIPH_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xl.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xl.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xl.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xl.c 2012-01-11 00:34:30.000000000 +0000 @@ -68,6 +68,12 @@ V = a->pic.data[2]; stride = avctx->width - 4; + + if (buf_size < avctx->width * avctx->height) { + av_log(avctx, AV_LOG_ERROR, "Packet is too small\n"); + return AVERROR_INVALIDDATA; + } + for (i = 0; i < avctx->height; i++) { /* lines are stored in reversed order */ buf += stride; @@ -139,14 +145,13 @@ } AVCodec ff_xl_decoder = { - "xl", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_VIXL, - sizeof(VideoXLContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "xl", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_VIXL, + .priv_data_size = sizeof(VideoXLContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Miro VideoXL"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xsubdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xsubdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xsubdec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xsubdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -18,6 +18,8 @@ * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "libavutil/mathematics.h" #include "libavutil/imgutils.h" #include "avcodec.h" #include "get_bits.h" @@ -132,13 +134,10 @@ } AVCodec ff_xsub_decoder = { - "xsub", - AVMEDIA_TYPE_SUBTITLE, - CODEC_ID_XSUB, - 0, - decode_init, - NULL, - NULL, - decode_frame, + .name = "xsub", + .type = AVMEDIA_TYPE_SUBTITLE, + .id = CODEC_ID_XSUB, + .init = decode_init, + .decode = decode_frame, .long_name = NULL_IF_CONFIG_SMALL("XSUB"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xsubenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xsubenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xsubenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xsubenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -36,8 +36,8 @@ /** * Encode a single color run. At most 16 bits will be used. - * \param len length of the run, values > 255 mean "until end of line", may not be < 0. - * \param color color to encode, only the lowest two bits are used and all others must be 0. + * @param len length of the run, values > 255 mean "until end of line", may not be < 0. + * @param color color to encode, only the lowest two bits are used and all others must be 0. */ static void put_xsub_rle(PutBitContext *pb, int len, int color) { @@ -90,7 +90,7 @@ if (color != PADDING_COLOR && (PADDING + (w&1))) put_xsub_rle(pb, PADDING + (w&1), PADDING_COLOR); - align_put_bits(pb); + avpriv_align_put_bits(pb); bitmap += linesize; } @@ -194,7 +194,7 @@ // Enforce total height to be be multiple of 2 if (h->rects[0]->h & 1) { put_xsub_rle(&pb, h->rects[0]->w, PADDING_COLOR); - align_put_bits(&pb); + avpriv_align_put_bits(&pb); } flush_put_bits(&pb); @@ -211,12 +211,10 @@ } AVCodec ff_xsub_encoder = { - "xsub", - AVMEDIA_TYPE_SUBTITLE, - CODEC_ID_XSUB, - 0, - xsub_encoder_init, - xsub_encode, - NULL, + .name = "xsub", + .type = AVMEDIA_TYPE_SUBTITLE, + .id = CODEC_ID_XSUB, + .init = xsub_encoder_init, + .encode = xsub_encode, .long_name = NULL_IF_CONFIG_SMALL("DivX subtitles (XSUB)"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xxan.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xxan.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/xxan.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/xxan.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,7 @@ #include "avcodec.h" #include "libavutil/intreadwrite.h" #include "bytestream.h" -#define ALT_BITSTREAM_READER_LE +#define BITSTREAM_READER_LE #include "get_bits.h" // for av_memcpy_backptr #include "libavutil/lzo.h" @@ -415,15 +415,14 @@ } AVCodec ff_xan_wc4_decoder = { - "xan_wc4", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_XAN_WC4, - sizeof(XanContext), - xan_decode_init, - NULL, - xan_decode_end, - xan_decode_frame, - CODEC_CAP_DR1, + .name = "xan_wc4", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_XAN_WC4, + .priv_data_size = sizeof(XanContext), + .init = xan_decode_init, + .close = xan_decode_end, + .decode = xan_decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Wing Commander IV / Xxan"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/yop.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/yop.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/yop.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/yop.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,4 @@ -/** - * @file +/* * Psygnosis YOP decoder * * Copyright (C) 2010 Mohamed Naufal Basheer @@ -249,13 +248,12 @@ } AVCodec ff_yop_decoder = { - "yop", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_YOP, - sizeof(YopDecContext), - yop_decode_init, - NULL, - yop_decode_close, - yop_decode_frame, + .name = "yop", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_YOP, + .priv_data_size = sizeof(YopDecContext), + .init = yop_decode_init, + .close = yop_decode_close, + .decode = yop_decode_frame, .long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP Video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/zmbv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/zmbv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/zmbv.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/zmbv.c 2012-01-11 00:34:30.000000000 +0000 @@ -88,8 +88,8 @@ output = c->cur; prev = c->prev; - if(c->flags & ZMBV_DELTAPAL){ - for(i = 0; i < 768; i++) + if (c->flags & ZMBV_DELTAPAL) { + for (i = 0; i < 768; i++) c->pal[i] ^= *src++; } @@ -97,9 +97,9 @@ src += ((c->bx * c->by * 2 + 3) & ~3); block = 0; - for(y = 0; y < c->height; y += c->bh) { + for (y = 0; y < c->height; y += c->bh) { bh2 = ((c->height - y) > c->bh) ? c->bh : (c->height - y); - for(x = 0; x < c->width; x += c->bw) { + for (x = 0; x < c->width; x += c->bw) { uint8_t *out, *tprev; d = mvec[block] & 1; @@ -114,12 +114,12 @@ tprev = prev + x + dx + dy * c->width; mx = x + dx; my = y + dy; - for(j = 0; j < bh2; j++){ - if((my + j < 0) || (my + j >= c->height)) { + for (j = 0; j < bh2; j++) { + if (my + j < 0 || my + j >= c->height) { memset(out, 0, bw2); } else { - for(i = 0; i < bw2; i++){ - if((mx + i < 0) || (mx + i >= c->width)) + for (i = 0; i < bw2; i++) { + if (mx + i < 0 || mx + i >= c->width) out[i] = 0; else out[i] = tprev[i]; @@ -129,10 +129,10 @@ tprev += c->width; } - if(d) { /* apply XOR'ed difference */ + if (d) { /* apply XOR'ed difference */ out = output + x; - for(j = 0; j < bh2; j++){ - for(i = 0; i < bw2; i++) + for (j = 0; j < bh2; j++) { + for (i = 0; i < bw2; i++) out[i] ^= *src++; out += c->width; } @@ -141,8 +141,9 @@ output += c->width * c->bh; prev += c->width * c->bh; } - if(src - c->decomp_buf != c->decomp_len) - av_log(c->avctx, AV_LOG_ERROR, "Used %ti of %i bytes\n", src-c->decomp_buf, c->decomp_len); + if (src - c->decomp_buf != c->decomp_len) + av_log(c->avctx, AV_LOG_ERROR, "Used %ti of %i bytes\n", + src-c->decomp_buf, c->decomp_len); return 0; } @@ -168,9 +169,9 @@ src += ((c->bx * c->by * 2 + 3) & ~3); block = 0; - for(y = 0; y < c->height; y += c->bh) { + for (y = 0; y < c->height; y += c->bh) { bh2 = ((c->height - y) > c->bh) ? c->bh : (c->height - y); - for(x = 0; x < c->width; x += c->bw) { + for (x = 0; x < c->width; x += c->bw) { uint16_t *out, *tprev; d = mvec[block] & 1; @@ -185,12 +186,12 @@ tprev = prev + x + dx + dy * c->width; mx = x + dx; my = y + dy; - for(j = 0; j < bh2; j++){ - if((my + j < 0) || (my + j >= c->height)) { + for (j = 0; j < bh2; j++) { + if (my + j < 0 || my + j >= c->height) { memset(out, 0, bw2 * 2); } else { - for(i = 0; i < bw2; i++){ - if((mx + i < 0) || (mx + i >= c->width)) + for (i = 0; i < bw2; i++) { + if (mx + i < 0 || mx + i >= c->width) out[i] = 0; else out[i] = tprev[i]; @@ -200,10 +201,10 @@ tprev += c->width; } - if(d) { /* apply XOR'ed difference */ + if (d) { /* apply XOR'ed difference */ out = output + x; - for(j = 0; j < bh2; j++){ - for(i = 0; i < bw2; i++) { + for (j = 0; j < bh2; j++){ + for (i = 0; i < bw2; i++) { out[i] ^= *((uint16_t*)src); src += 2; } @@ -214,8 +215,9 @@ output += c->width * c->bh; prev += c->width * c->bh; } - if(src - c->decomp_buf != c->decomp_len) - av_log(c->avctx, AV_LOG_ERROR, "Used %ti of %i bytes\n", src-c->decomp_buf, c->decomp_len); + if (src - c->decomp_buf != c->decomp_len) + av_log(c->avctx, AV_LOG_ERROR, "Used %ti of %i bytes\n", + src-c->decomp_buf, c->decomp_len); return 0; } @@ -244,9 +246,9 @@ src += ((c->bx * c->by * 2 + 3) & ~3); block = 0; - for(y = 0; y < c->height; y += c->bh) { + for (y = 0; y < c->height; y += c->bh) { bh2 = ((c->height - y) > c->bh) ? c->bh : (c->height - y); - for(x = 0; x < c->width; x += c->bw) { + for (x = 0; x < c->width; x += c->bw) { uint8_t *out, *tprev; d = mvec[block] & 1; @@ -261,12 +263,12 @@ tprev = prev + (x + dx) * 3 + dy * stride; mx = x + dx; my = y + dy; - for(j = 0; j < bh2; j++){ - if((my + j < 0) || (my + j >= c->height)) { + for (j = 0; j < bh2; j++) { + if (my + j < 0 || my + j >= c->height) { memset(out, 0, bw2 * 3); } else { - for(i = 0; i < bw2; i++){ - if((mx + i < 0) || (mx + i >= c->width)) { + for (i = 0; i < bw2; i++){ + if (mx + i < 0 || mx + i >= c->width) { out[i * 3 + 0] = 0; out[i * 3 + 1] = 0; out[i * 3 + 2] = 0; @@ -281,10 +283,10 @@ tprev += stride; } - if(d) { /* apply XOR'ed difference */ + if (d) { /* apply XOR'ed difference */ out = output + x * 3; - for(j = 0; j < bh2; j++){ - for(i = 0; i < bw2; i++) { + for (j = 0; j < bh2; j++) { + for (i = 0; i < bw2; i++) { out[i * 3 + 0] ^= *src++; out[i * 3 + 1] ^= *src++; out[i * 3 + 2] ^= *src++; @@ -296,8 +298,9 @@ output += stride * c->bh; prev += stride * c->bh; } - if(src - c->decomp_buf != c->decomp_len) - av_log(c->avctx, AV_LOG_ERROR, "Used %i of %i bytes\n", src-c->decomp_buf, c->decomp_len); + if (src - c->decomp_buf != c->decomp_len) + av_log(c->avctx, AV_LOG_ERROR, "Used %i of %i bytes\n", + src-c->decomp_buf, c->decomp_len); return 0; } #endif //ZMBV_ENABLE_24BPP @@ -324,9 +327,9 @@ src += ((c->bx * c->by * 2 + 3) & ~3); block = 0; - for(y = 0; y < c->height; y += c->bh) { + for (y = 0; y < c->height; y += c->bh) { bh2 = ((c->height - y) > c->bh) ? c->bh : (c->height - y); - for(x = 0; x < c->width; x += c->bw) { + for (x = 0; x < c->width; x += c->bw) { uint32_t *out, *tprev; d = mvec[block] & 1; @@ -341,12 +344,12 @@ tprev = prev + x + dx + dy * c->width; mx = x + dx; my = y + dy; - for(j = 0; j < bh2; j++){ - if((my + j < 0) || (my + j >= c->height)) { + for (j = 0; j < bh2; j++) { + if (my + j < 0 || my + j >= c->height) { memset(out, 0, bw2 * 4); } else { - for(i = 0; i < bw2; i++){ - if((mx + i < 0) || (mx + i >= c->width)) + for (i = 0; i < bw2; i++){ + if (mx + i < 0 || mx + i >= c->width) out[i] = 0; else out[i] = tprev[i]; @@ -356,11 +359,11 @@ tprev += c->width; } - if(d) { /* apply XOR'ed difference */ + if (d) { /* apply XOR'ed difference */ out = output + x; - for(j = 0; j < bh2; j++){ - for(i = 0; i < bw2; i++) { - out[i] ^= *((uint32_t*)src); + for (j = 0; j < bh2; j++){ + for (i = 0; i < bw2; i++) { + out[i] ^= *((uint32_t *) src); src += 4; } out += c->width; @@ -368,10 +371,11 @@ } } output += c->width * c->bh; - prev += c->width * c->bh; + prev += c->width * c->bh; } - if(src - c->decomp_buf != c->decomp_len) - av_log(c->avctx, AV_LOG_ERROR, "Used %ti of %i bytes\n", src-c->decomp_buf, c->decomp_len); + if (src - c->decomp_buf != c->decomp_len) + av_log(c->avctx, AV_LOG_ERROR, "Used %ti of %i bytes\n", + src-c->decomp_buf, c->decomp_len); return 0; } @@ -401,12 +405,12 @@ int len = buf_size; int hi_ver, lo_ver; - if(c->pic.data[0]) + if (c->pic.data[0]) avctx->release_buffer(avctx, &c->pic); c->pic.reference = 1; c->pic.buffer_hints = FF_BUFFER_HINTS_VALID; - if(avctx->get_buffer(avctx, &c->pic) < 0){ + if (avctx->get_buffer(avctx, &c->pic) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return -1; } @@ -414,7 +418,7 @@ /* parse header */ c->flags = buf[0]; buf++; len--; - if(c->flags & ZMBV_KEYFRAME) { + if (c->flags & ZMBV_KEYFRAME) { hi_ver = buf[0]; lo_ver = buf[1]; c->comp = buf[2]; @@ -424,21 +428,26 @@ buf += 6; len -= 6; - av_log(avctx, AV_LOG_DEBUG, "Flags=%X ver=%i.%i comp=%i fmt=%i blk=%ix%i\n",c->flags,hi_ver,lo_ver,c->comp,c->fmt,c->bw,c->bh); - if(hi_ver != 0 || lo_ver != 1) { - av_log(avctx, AV_LOG_ERROR, "Unsupported version %i.%i\n", hi_ver, lo_ver); + av_log(avctx, AV_LOG_DEBUG, + "Flags=%X ver=%i.%i comp=%i fmt=%i blk=%ix%i\n", + c->flags,hi_ver,lo_ver,c->comp,c->fmt,c->bw,c->bh); + if (hi_ver != 0 || lo_ver != 1) { + av_log(avctx, AV_LOG_ERROR, "Unsupported version %i.%i\n", + hi_ver, lo_ver); return -1; } - if(c->bw == 0 || c->bh == 0) { - av_log(avctx, AV_LOG_ERROR, "Unsupported block size %ix%i\n", c->bw, c->bh); + if (c->bw == 0 || c->bh == 0) { + av_log(avctx, AV_LOG_ERROR, "Unsupported block size %ix%i\n", + c->bw, c->bh); return -1; } - if(c->comp != 0 && c->comp != 1) { - av_log(avctx, AV_LOG_ERROR, "Unsupported compression type %i\n", c->comp); + if (c->comp != 0 && c->comp != 1) { + av_log(avctx, AV_LOG_ERROR, "Unsupported compression type %i\n", + c->comp); return -1; } - switch(c->fmt) { + switch (c->fmt) { case ZMBV_FMT_8BPP: c->bpp = 8; c->decode_intra = zmbv_decode_intra; @@ -465,7 +474,8 @@ default: c->decode_intra = NULL; c->decode_xor = NULL; - av_log(avctx, AV_LOG_ERROR, "Unsupported (for now) format %i\n", c->fmt); + av_log(avctx, AV_LOG_ERROR, + "Unsupported (for now) format %i\n", c->fmt); return -1; } @@ -473,23 +483,23 @@ if (zret != Z_OK) { av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", zret); return -1; - } - - c->cur = av_realloc(c->cur, avctx->width * avctx->height * (c->bpp / 8)); - c->prev = av_realloc(c->prev, avctx->width * avctx->height * (c->bpp / 8)); - c->bx = (c->width + c->bw - 1) / c->bw; - c->by = (c->height+ c->bh - 1) / c->bh; - } - - if(c->decode_intra == NULL) { - av_log(avctx, AV_LOG_ERROR, "Error! Got no format or no keyframe!\n"); - return -1; - } + } - if(c->comp == 0) { //Uncompressed data - memcpy(c->decomp_buf, buf, len); - c->decomp_size = 1; - } else { // ZLIB-compressed data + c->cur = av_realloc(c->cur, avctx->width * avctx->height * (c->bpp / 8)); + c->prev = av_realloc(c->prev, avctx->width * avctx->height * (c->bpp / 8)); + c->bx = (c->width + c->bw - 1) / c->bw; + c->by = (c->height+ c->bh - 1) / c->bh; + } + + if (c->decode_intra == NULL) { + av_log(avctx, AV_LOG_ERROR, "Error! Got no format or no keyframe!\n"); + return -1; + } + + if (c->comp == 0) { //Uncompressed data + memcpy(c->decomp_buf, buf, len); + c->decomp_size = 1; + } else { // ZLIB-compressed data c->zstream.total_in = c->zstream.total_out = 0; c->zstream.next_in = buf; c->zstream.avail_in = len; @@ -498,14 +508,14 @@ inflate(&c->zstream, Z_FINISH); c->decomp_len = c->zstream.total_out; } - if(c->flags & ZMBV_KEYFRAME) { + if (c->flags & ZMBV_KEYFRAME) { c->pic.key_frame = 1; c->pic.pict_type = AV_PICTURE_TYPE_I; c->decode_intra(c); } else { c->pic.key_frame = 0; c->pic.pict_type = AV_PICTURE_TYPE_P; - if(c->decomp_len) + if (c->decomp_len) c->decode_xor(c); } @@ -516,10 +526,10 @@ out = c->pic.data[0]; src = c->cur; - switch(c->fmt) { + switch (c->fmt) { case ZMBV_FMT_8BPP: - for(j = 0; j < c->height; j++) { - for(i = 0; i < c->width; i++) { + for (j = 0; j < c->height; j++) { + for (i = 0; i < c->width; i++) { out[i * 3 + 0] = c->pal[(*src) * 3 + 0]; out[i * 3 + 1] = c->pal[(*src) * 3 + 1]; out[i * 3 + 2] = c->pal[(*src) * 3 + 2]; @@ -529,8 +539,8 @@ } break; case ZMBV_FMT_15BPP: - for(j = 0; j < c->height; j++) { - for(i = 0; i < c->width; i++) { + for (j = 0; j < c->height; j++) { + for (i = 0; i < c->width; i++) { uint16_t tmp = AV_RL16(src); src += 2; out[i * 3 + 0] = (tmp & 0x7C00) >> 7; @@ -541,8 +551,8 @@ } break; case ZMBV_FMT_16BPP: - for(j = 0; j < c->height; j++) { - for(i = 0; i < c->width; i++) { + for (j = 0; j < c->height; j++) { + for (i = 0; i < c->width; i++) { uint16_t tmp = AV_RL16(src); src += 2; out[i * 3 + 0] = (tmp & 0xF800) >> 8; @@ -554,7 +564,7 @@ break; #ifdef ZMBV_ENABLE_24BPP case ZMBV_FMT_24BPP: - for(j = 0; j < c->height; j++) { + for (j = 0; j < c->height; j++) { memcpy(out, src, c->width * 3); src += c->width * 3; out += c->pic.linesize[0]; @@ -562,8 +572,8 @@ break; #endif //ZMBV_ENABLE_24BPP case ZMBV_FMT_32BPP: - for(j = 0; j < c->height; j++) { - for(i = 0; i < c->width; i++) { + for (j = 0; j < c->height; j++) { + for (i = 0; i < c->width; i++) { uint32_t tmp = AV_RL32(src); src += 4; AV_WB24(out+(i*3), tmp); @@ -574,7 +584,7 @@ default: av_log(avctx, AV_LOG_ERROR, "Cannot handle format %i\n", c->fmt); } - memcpy(c->prev, c->cur, c->width * c->height * (c->bpp / 8)); + FFSWAP(uint8_t *, c->cur, c->prev); } *data_size = sizeof(AVFrame); *(AVFrame*)data = c->pic; @@ -603,7 +613,7 @@ c->bpp = avctx->bits_per_coded_sample; // Needed if zlib unused or init aborted before inflateInit - memset(&(c->zstream), 0, sizeof(z_stream)); + memset(&c->zstream, 0, sizeof(z_stream)); avctx->pix_fmt = PIX_FMT_RGB24; c->decomp_size = (avctx->width + 255) * 4 * (avctx->height + 64); @@ -611,7 +621,8 @@ /* Allocate decompression buffer */ if (c->decomp_size) { if ((c->decomp_buf = av_malloc(c->decomp_size)) == NULL) { - av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); + av_log(avctx, AV_LOG_ERROR, + "Can't allocate decompression buffer.\n"); return 1; } } @@ -619,7 +630,7 @@ c->zstream.zalloc = Z_NULL; c->zstream.zfree = Z_NULL; c->zstream.opaque = Z_NULL; - zret = inflateInit(&(c->zstream)); + zret = inflateInit(&c->zstream); if (zret != Z_OK) { av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret); return 1; @@ -643,7 +654,7 @@ if (c->pic.data[0]) avctx->release_buffer(avctx, &c->pic); - inflateEnd(&(c->zstream)); + inflateEnd(&c->zstream); av_freep(&c->cur); av_freep(&c->prev); @@ -651,15 +662,14 @@ } AVCodec ff_zmbv_decoder = { - "zmbv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ZMBV, - sizeof(ZmbvContext), - decode_init, - NULL, - decode_end, - decode_frame, - CODEC_CAP_DR1, + .name = "zmbv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ZMBV, + .priv_data_size = sizeof(ZmbvContext), + .init = decode_init, + .close = decode_end, + .decode = decode_frame, + .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/zmbvenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/zmbvenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavcodec/zmbvenc.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavcodec/zmbvenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -269,7 +269,7 @@ } // Needed if zlib unused or init aborted before deflateInit - memset(&(c->zstream), 0, sizeof(z_stream)); + memset(&c->zstream, 0, sizeof(z_stream)); c->comp_size = avctx->width * avctx->height + 1024 + ((avctx->width + ZMBV_BLOCK - 1) / ZMBV_BLOCK) * ((avctx->height + ZMBV_BLOCK - 1) / ZMBV_BLOCK) * 2 + 4; if ((c->work_buf = av_malloc(c->comp_size)) == NULL) { @@ -294,7 +294,7 @@ c->zstream.zalloc = Z_NULL; c->zstream.zfree = Z_NULL; c->zstream.opaque = Z_NULL; - zret = deflateInit(&(c->zstream), lvl); + zret = deflateInit(&c->zstream, lvl); if (zret != Z_OK) { av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret); return -1; @@ -317,20 +317,20 @@ av_freep(&c->comp_buf); av_freep(&c->work_buf); - deflateEnd(&(c->zstream)); + deflateEnd(&c->zstream); av_freep(&c->prev); return 0; } AVCodec ff_zmbv_encoder = { - "zmbv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_ZMBV, - sizeof(ZmbvEncContext), - encode_init, - encode_frame, - encode_end, + .name = "zmbv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_ZMBV, + .priv_data_size = sizeof(ZmbvEncContext), + .init = encode_init, + .encode = encode_frame, + .close = encode_end, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_PAL8, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/alldevices.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/alldevices.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/alldevices.c 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/alldevices.c 2012-01-11 00:34:30.000000000 +0000 @@ -45,6 +45,7 @@ REGISTER_INDEV (FBDEV, fbdev); REGISTER_INDEV (JACK, jack); REGISTER_INOUTDEV (OSS, oss); + REGISTER_INDEV (PULSE, pulse); REGISTER_INOUTDEV (SNDIO, sndio); REGISTER_INDEV (V4L2, v4l2); #if FF_API_V4L @@ -54,5 +55,6 @@ REGISTER_INDEV (X11_GRAB_DEVICE, x11_grab_device); /* external libraries */ + REGISTER_INDEV (LIBCDIO, libcdio); REGISTER_INDEV (LIBDC1394, libdc1394); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/alsa-audio-common.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/alsa-audio-common.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/alsa-audio-common.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/alsa-audio-common.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,19 +30,159 @@ #include #include "libavformat/avformat.h" +#include "libavutil/avassert.h" +#include "libavutil/audioconvert.h" #include "alsa-audio.h" static av_cold snd_pcm_format_t codec_id_to_pcm_format(int codec_id) { switch(codec_id) { + case CODEC_ID_PCM_F64LE: return SND_PCM_FORMAT_FLOAT64_LE; + case CODEC_ID_PCM_F64BE: return SND_PCM_FORMAT_FLOAT64_BE; + case CODEC_ID_PCM_F32LE: return SND_PCM_FORMAT_FLOAT_LE; + case CODEC_ID_PCM_F32BE: return SND_PCM_FORMAT_FLOAT_BE; + case CODEC_ID_PCM_S32LE: return SND_PCM_FORMAT_S32_LE; + case CODEC_ID_PCM_S32BE: return SND_PCM_FORMAT_S32_BE; + case CODEC_ID_PCM_U32LE: return SND_PCM_FORMAT_U32_LE; + case CODEC_ID_PCM_U32BE: return SND_PCM_FORMAT_U32_BE; + case CODEC_ID_PCM_S24LE: return SND_PCM_FORMAT_S24_3LE; + case CODEC_ID_PCM_S24BE: return SND_PCM_FORMAT_S24_3BE; + case CODEC_ID_PCM_U24LE: return SND_PCM_FORMAT_U24_3LE; + case CODEC_ID_PCM_U24BE: return SND_PCM_FORMAT_U24_3BE; case CODEC_ID_PCM_S16LE: return SND_PCM_FORMAT_S16_LE; case CODEC_ID_PCM_S16BE: return SND_PCM_FORMAT_S16_BE; + case CODEC_ID_PCM_U16LE: return SND_PCM_FORMAT_U16_LE; + case CODEC_ID_PCM_U16BE: return SND_PCM_FORMAT_U16_BE; case CODEC_ID_PCM_S8: return SND_PCM_FORMAT_S8; + case CODEC_ID_PCM_U8: return SND_PCM_FORMAT_U8; + case CODEC_ID_PCM_MULAW: return SND_PCM_FORMAT_MU_LAW; + case CODEC_ID_PCM_ALAW: return SND_PCM_FORMAT_A_LAW; default: return SND_PCM_FORMAT_UNKNOWN; } } +#define REORDER_OUT_50(NAME, TYPE) \ +static void alsa_reorder_ ## NAME ## _out_50(const void *in_v, void *out_v, int n) \ +{ \ + const TYPE *in = in_v; \ + TYPE *out = out_v; \ +\ + while (n-- > 0) { \ + out[0] = in[0]; \ + out[1] = in[1]; \ + out[2] = in[3]; \ + out[3] = in[4]; \ + out[4] = in[2]; \ + in += 5; \ + out += 5; \ + } \ +} + +#define REORDER_OUT_51(NAME, TYPE) \ +static void alsa_reorder_ ## NAME ## _out_51(const void *in_v, void *out_v, int n) \ +{ \ + const TYPE *in = in_v; \ + TYPE *out = out_v; \ +\ + while (n-- > 0) { \ + out[0] = in[0]; \ + out[1] = in[1]; \ + out[2] = in[4]; \ + out[3] = in[5]; \ + out[4] = in[2]; \ + out[5] = in[3]; \ + in += 6; \ + out += 6; \ + } \ +} + +#define REORDER_OUT_71(NAME, TYPE) \ +static void alsa_reorder_ ## NAME ## _out_71(const void *in_v, void *out_v, int n) \ +{ \ + const TYPE *in = in_v; \ + TYPE *out = out_v; \ +\ + while (n-- > 0) { \ + out[0] = in[0]; \ + out[1] = in[1]; \ + out[2] = in[4]; \ + out[3] = in[5]; \ + out[4] = in[2]; \ + out[5] = in[3]; \ + out[6] = in[6]; \ + out[7] = in[7]; \ + in += 8; \ + out += 8; \ + } \ +} + +REORDER_OUT_50(int8, int8_t) +REORDER_OUT_51(int8, int8_t) +REORDER_OUT_71(int8, int8_t) +REORDER_OUT_50(int16, int16_t) +REORDER_OUT_51(int16, int16_t) +REORDER_OUT_71(int16, int16_t) +REORDER_OUT_50(int32, int32_t) +REORDER_OUT_51(int32, int32_t) +REORDER_OUT_71(int32, int32_t) +REORDER_OUT_50(f32, float) +REORDER_OUT_51(f32, float) +REORDER_OUT_71(f32, float) + +#define FORMAT_I8 0 +#define FORMAT_I16 1 +#define FORMAT_I32 2 +#define FORMAT_F32 3 + +#define PICK_REORDER(layout)\ +switch(format) {\ + case FORMAT_I8: s->reorder_func = alsa_reorder_int8_out_ ##layout; break;\ + case FORMAT_I16: s->reorder_func = alsa_reorder_int16_out_ ##layout; break;\ + case FORMAT_I32: s->reorder_func = alsa_reorder_int32_out_ ##layout; break;\ + case FORMAT_F32: s->reorder_func = alsa_reorder_f32_out_ ##layout; break;\ +} + +static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout, int out) +{ + int format; + + /* reordering input is not currently supported */ + if (!out) + return AVERROR(ENOSYS); + + /* reordering is not needed for QUAD or 2_2 layout */ + if (layout == AV_CH_LAYOUT_QUAD || layout == AV_CH_LAYOUT_2_2) + return 0; + + switch (codec_id) { + case CODEC_ID_PCM_S8: + case CODEC_ID_PCM_U8: + case CODEC_ID_PCM_ALAW: + case CODEC_ID_PCM_MULAW: format = FORMAT_I8; break; + case CODEC_ID_PCM_S16LE: + case CODEC_ID_PCM_S16BE: + case CODEC_ID_PCM_U16LE: + case CODEC_ID_PCM_U16BE: format = FORMAT_I16; break; + case CODEC_ID_PCM_S32LE: + case CODEC_ID_PCM_S32BE: + case CODEC_ID_PCM_U32LE: + case CODEC_ID_PCM_U32BE: format = FORMAT_I32; break; + case CODEC_ID_PCM_F32LE: + case CODEC_ID_PCM_F32BE: format = FORMAT_F32; break; + default: return AVERROR(ENOSYS); + } + + if (layout == AV_CH_LAYOUT_5POINT0_BACK || layout == AV_CH_LAYOUT_5POINT0) + PICK_REORDER(50) + else if (layout == AV_CH_LAYOUT_5POINT1_BACK || layout == AV_CH_LAYOUT_5POINT1) + PICK_REORDER(51) + else if (layout == AV_CH_LAYOUT_7POINT1) + PICK_REORDER(71) + + return s->reorder_func ? 0 : AVERROR(ENOSYS); +} + av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode, unsigned int *sample_rate, int channels, enum CodecID *codec_id) @@ -54,6 +194,7 @@ snd_pcm_t *h; snd_pcm_hw_params_t *hw_params; snd_pcm_uframes_t buffer_size, period_size; + uint64_t layout = ctx->streams[0]->codec->channel_layout; if (ctx->filename[0] == 0) audio_device = "default"; else audio_device = ctx->filename; @@ -120,6 +261,7 @@ } snd_pcm_hw_params_get_buffer_size_max(hw_params, &buffer_size); + buffer_size = FFMIN(buffer_size, ALSA_BUFFER_SIZE_MAX); /* TODO: maybe use ctx->max_picture_buffer somehow */ res = snd_pcm_hw_params_set_buffer_size_near(h, hw_params, &buffer_size); if (res < 0) { @@ -129,6 +271,8 @@ } snd_pcm_hw_params_get_period_size_min(hw_params, &period_size, NULL); + if (!period_size) + period_size = buffer_size / 4; res = snd_pcm_hw_params_set_period_size_near(h, hw_params, &period_size, NULL); if (res < 0) { av_log(ctx, AV_LOG_ERROR, "cannot set ALSA period size (%s)\n", @@ -146,6 +290,21 @@ snd_pcm_hw_params_free(hw_params); + if (channels > 2 && layout) { + if (find_reorder_func(s, *codec_id, layout, mode == SND_PCM_STREAM_PLAYBACK) < 0) { + char name[128]; + av_get_channel_layout_string(name, sizeof(name), channels, layout); + av_log(ctx, AV_LOG_WARNING, "ALSA channel layout unknown or unimplemented for %s %s.\n", + name, mode == SND_PCM_STREAM_PLAYBACK ? "playback" : "capture"); + } + if (s->reorder_func) { + s->reorder_buf_size = buffer_size; + s->reorder_buf = av_malloc(s->reorder_buf_size * s->frame_size); + if (!s->reorder_buf) + goto fail1; + } + } + s->h = h; return 0; @@ -160,6 +319,7 @@ { AlsaData *s = s1->priv_data; + av_freep(&s->reorder_buf); snd_pcm_close(s->h); return 0; } @@ -184,3 +344,19 @@ } return err; } + +int ff_alsa_extend_reorder_buf(AlsaData *s, int min_size) +{ + int size = s->reorder_buf_size; + void *r; + + av_assert0(size != 0); + while (size < min_size) + size *= 2; + r = av_realloc(s->reorder_buf, size * s->frame_size); + if (!r) + return AVERROR(ENOMEM); + s->reorder_buf = r; + s->reorder_buf_size = size; + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/alsa-audio-dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/alsa-audio-dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/alsa-audio-dec.c 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/alsa-audio-dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -47,6 +47,7 @@ #include #include "libavformat/avformat.h" +#include "libavformat/internal.h" #include "libavutil/opt.h" #include "alsa-audio.h" @@ -60,15 +61,7 @@ enum CodecID codec_id; snd_pcm_sw_params_t *sw_params; -#if FF_API_FORMAT_PARAMETERS - if (ap->sample_rate > 0) - s->sample_rate = ap->sample_rate; - - if (ap->channels > 0) - s->channels = ap->channels; -#endif - - st = av_new_stream(s1, 0); + st = avformat_new_stream(s1, NULL); if (!st) { av_log(s1, AV_LOG_ERROR, "Cannot add stream\n"); @@ -110,7 +103,7 @@ st->codec->codec_id = codec_id; st->codec->sample_rate = s->sample_rate; st->codec->channels = s->channels; - av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ + avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ return 0; @@ -159,8 +152,8 @@ } static const AVOption options[] = { - { "sample_rate", "", offsetof(AlsaData, sample_rate), FF_OPT_TYPE_INT, {.dbl = 48000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, - { "channels", "", offsetof(AlsaData, channels), FF_OPT_TYPE_INT, {.dbl = 2}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { "sample_rate", "", offsetof(AlsaData, sample_rate), AV_OPT_TYPE_INT, {.dbl = 48000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { "channels", "", offsetof(AlsaData, channels), AV_OPT_TYPE_INT, {.dbl = 2}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, { NULL }, }; @@ -172,13 +165,12 @@ }; AVInputFormat ff_alsa_demuxer = { - "alsa", - NULL_IF_CONFIG_SMALL("ALSA audio input"), - sizeof(AlsaData), - NULL, - audio_read_header, - audio_read_packet, - ff_alsa_close, - .flags = AVFMT_NOFILE, - .priv_class = &alsa_demuxer_class, + .name = "alsa", + .long_name = NULL_IF_CONFIG_SMALL("ALSA audio input"), + .priv_data_size = sizeof(AlsaData), + .read_header = audio_read_header, + .read_packet = audio_read_packet, + .read_close = ff_alsa_close, + .flags = AVFMT_NOFILE, + .priv_class = &alsa_demuxer_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/alsa-audio-enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/alsa-audio-enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/alsa-audio-enc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/alsa-audio-enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -76,7 +76,15 @@ int size = pkt->size; uint8_t *buf = pkt->data; - while((res = snd_pcm_writei(s->h, buf, size / s->frame_size)) < 0) { + size /= s->frame_size; + if (s->reorder_func) { + if (size > s->reorder_buf_size) + if (ff_alsa_extend_reorder_buf(s, size)) + return AVERROR(ENOMEM); + s->reorder_func(buf, s->reorder_buf, size); + buf = s->reorder_buf; + } + while ((res = snd_pcm_writei(s->h, buf, size)) < 0) { if (res == -EAGAIN) { return AVERROR(EAGAIN); @@ -94,15 +102,13 @@ } AVOutputFormat ff_alsa_muxer = { - "alsa", - NULL_IF_CONFIG_SMALL("ALSA audio output"), - "", - "", - sizeof(AlsaData), - DEFAULT_CODEC_ID, - CODEC_ID_NONE, - audio_write_header, - audio_write_packet, - ff_alsa_close, - .flags = AVFMT_NOFILE, + .name = "alsa", + .long_name = NULL_IF_CONFIG_SMALL("ALSA audio output"), + .priv_data_size = sizeof(AlsaData), + .audio_codec = DEFAULT_CODEC_ID, + .video_codec = CODEC_ID_NONE, + .write_header = audio_write_header, + .write_packet = audio_write_packet, + .write_trailer = ff_alsa_close, + .flags = AVFMT_NOFILE, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/alsa-audio.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/alsa-audio.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/alsa-audio.h 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/alsa-audio.h 2012-01-11 00:34:30.000000000 +0000 @@ -40,6 +40,8 @@ other formats */ #define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE) +#define ALSA_BUFFER_SIZE_MAX 32768 + typedef struct { AVClass *class; snd_pcm_t *h; @@ -47,6 +49,9 @@ int period_size; ///< bytes per sample * channels int sample_rate; ///< sample rate set by user int channels; ///< number of channels set by user + void (*reorder_func)(const void *, void *, int); + void *reorder_buf; + int reorder_buf_size; ///< in frames } AlsaData; /** @@ -86,4 +91,6 @@ */ int ff_alsa_xrun_recover(AVFormatContext *s1, int err); +int ff_alsa_extend_reorder_buf(AlsaData *s, int size); + #endif /* AVDEVICE_ALSA_AUDIO_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/avdevice.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/avdevice.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/avdevice.h 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/avdevice.h 2012-01-11 00:34:30.000000000 +0000 @@ -19,10 +19,32 @@ #ifndef AVDEVICE_AVDEVICE_H #define AVDEVICE_AVDEVICE_H +/** + * @file + * @ingroup lavd + * Main libavdevice API header + */ + +/** + * @defgroup lavd Special devices muxing/demuxing library + * @{ + * Libavdevice is a complementary library to @ref libavf "libavformat". It + * provides various "special" platform-specific muxers and demuxers, e.g. for + * grabbing devices, audio capture and playback etc. As a consequence, the + * (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own + * I/O functions). The filename passed to avformat_open_input() often does not + * refer to an actually existing file, but has some special device-specific + * meaning - e.g. for the x11grab device it is the display name. + * + * To use libavdevice, simply call avdevice_register_all() to register all + * compiled muxers and demuxers. They all use standard libavformat API. + * @} + */ + #include "libavutil/avutil.h" #define LIBAVDEVICE_VERSION_MAJOR 53 -#define LIBAVDEVICE_VERSION_MINOR 0 +#define LIBAVDEVICE_VERSION_MINOR 2 #define LIBAVDEVICE_VERSION_MICRO 0 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/bktr.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/bktr.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/bktr.c 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/bktr.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,7 @@ */ #include "libavformat/avformat.h" +#include "libavformat/internal.h" #include "libavutil/log.h" #include "libavutil/opt.h" #include "libavutil/parseutils.h" @@ -47,7 +48,6 @@ #include #include #include -#include typedef struct { AVClass *class; @@ -248,22 +248,11 @@ VideoData *s = s1->priv_data; AVStream *st; int width, height; - AVRational fps; + AVRational framerate; int ret = 0; -#if FF_API_FORMAT_PARAMETERS - if (ap->standard) { - if (!strcasecmp(ap->standard, "pal")) - s->standard = PAL; - else if (!strcasecmp(ap->standard, "secam")) - s->standard = SECAM; - else if (!strcasecmp(ap->standard, "ntsc")) - s->standard = NTSC; - } -#endif - if ((ret = av_parse_video_size(&width, &height, s->video_size)) < 0) { - av_log(s1, AV_LOG_ERROR, "Couldn't parse video size.\n"); + av_log(s1, AV_LOG_ERROR, "Could not parse video size '%s'.\n", s->video_size); goto out; } @@ -277,41 +266,33 @@ ret = AVERROR(EINVAL); goto out; } - if ((ret = av_parse_video_rate(&fps, s->framerate)) < 0) { - av_log(s1, AV_LOG_ERROR, "Couldn't parse framerate.\n"); + if ((ret = av_parse_video_rate(&framerate, s->framerate)) < 0) { + av_log(s1, AV_LOG_ERROR, "Could not parse framerate '%s'.\n", s->framerate); goto out; } -#if FF_API_FORMAT_PARAMETERS - if (ap->width > 0) - width = ap->width; - if (ap->height > 0) - height = ap->height; - if (ap->time_base.num) - fps = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif - st = av_new_stream(s1, 0); + st = avformat_new_stream(s1, NULL); if (!st) { ret = AVERROR(ENOMEM); goto out; } - av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in use */ + avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in use */ s->width = width; s->height = height; - s->per_frame = ((uint64_t)1000000 * fps.den) / fps.num; + s->per_frame = ((uint64_t)1000000 * framerate.den) / framerate.num; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->pix_fmt = PIX_FMT_YUV420P; st->codec->codec_id = CODEC_ID_RAWVIDEO; st->codec->width = width; st->codec->height = height; - st->codec->time_base.den = fps.num; - st->codec->time_base.num = fps.den; + st->codec->time_base.den = framerate.num; + st->codec->time_base.num = framerate.den; if (bktr_init(s1->filename, width, height, s->standard, - &(s->video_fd), &(s->tuner_fd), -1, 0.0) < 0) { + &s->video_fd, &s->tuner_fd, -1, 0.0) < 0) { ret = AVERROR(EIO); goto out; } @@ -344,15 +325,15 @@ #define OFFSET(x) offsetof(VideoData, x) #define DEC AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { - { "standard", "", offsetof(VideoData, standard), FF_OPT_TYPE_INT, {.dbl = VIDEO_FORMAT}, PAL, NTSCJ, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "PAL", "", 0, FF_OPT_TYPE_CONST, {.dbl = PAL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "NTSC", "", 0, FF_OPT_TYPE_CONST, {.dbl = NTSC}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "SECAM", "", 0, FF_OPT_TYPE_CONST, {.dbl = SECAM}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "PALN", "", 0, FF_OPT_TYPE_CONST, {.dbl = PALN}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "PALM", "", 0, FF_OPT_TYPE_CONST, {.dbl = PALM}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "NTSCJ", "", 0, FF_OPT_TYPE_CONST, {.dbl = NTSCJ}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = "vga"}, 0, 0, DEC }, - { "framerate", "", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "standard", "", offsetof(VideoData, standard), AV_OPT_TYPE_INT, {.dbl = VIDEO_FORMAT}, PAL, NTSCJ, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "PAL", "", 0, AV_OPT_TYPE_CONST, {.dbl = PAL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "NTSC", "", 0, AV_OPT_TYPE_CONST, {.dbl = NTSC}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "SECAM", "", 0, AV_OPT_TYPE_CONST, {.dbl = SECAM}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "PALN", "", 0, AV_OPT_TYPE_CONST, {.dbl = PALN}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "PALM", "", 0, AV_OPT_TYPE_CONST, {.dbl = PALM}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "NTSCJ", "", 0, AV_OPT_TYPE_CONST, {.dbl = NTSCJ}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = "vga"}, 0, 0, DEC }, + { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, { NULL }, }; @@ -364,13 +345,12 @@ }; AVInputFormat ff_bktr_demuxer = { - "bktr", - NULL_IF_CONFIG_SMALL("video grab"), - sizeof(VideoData), - NULL, - grab_read_header, - grab_read_packet, - grab_read_close, - .flags = AVFMT_NOFILE, - .priv_class = &bktr_class, + .name = "bktr", + .long_name = NULL_IF_CONFIG_SMALL("video grab"), + .priv_data_size = sizeof(VideoData), + .read_header = grab_read_header, + .read_packet = grab_read_packet, + .read_close = grab_read_close, + .flags = AVFMT_NOFILE, + .priv_class = &bktr_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/dv1394.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/dv1394.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/dv1394.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/dv1394.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,7 +28,6 @@ #include #include #include -#include #include "libavutil/log.h" #include "libavutil/opt.h" @@ -86,22 +85,10 @@ { struct dv1394_data *dv = context->priv_data; - dv->dv_demux = dv_init_demux(context); + dv->dv_demux = avpriv_dv_init_demux(context); if (!dv->dv_demux) goto failed; -#if FF_API_FORMAT_PARAMETERS - if (ap->standard) { - if (!strcasecmp(ap->standard, "pal")) - dv->format = DV1394_PAL; - else - dv->format = DV1394_NTSC; - } - - if (ap->channel) - dv->channel = ap->channel; -#endif - /* Open and initialize DV1394 device */ dv->fd = open(context->filename, O_RDONLY); if (dv->fd < 0) { @@ -136,7 +123,7 @@ struct dv1394_data *dv = context->priv_data; int size; - size = dv_get_packet(dv->dv_demux, pkt); + size = avpriv_dv_get_packet(dv->dv_demux, pkt); if (size > 0) return size; @@ -198,7 +185,7 @@ av_dlog(context, "index %d, avail %d, done %d\n", dv->index, dv->avail, dv->done); - size = dv_produce_packet(dv->dv_demux, pkt, + size = avpriv_dv_produce_packet(dv->dv_demux, pkt, dv->ring + (dv->index * DV1394_PAL_FRAME_SIZE), DV1394_PAL_FRAME_SIZE); dv->index = (dv->index + 1) % DV1394_RING_FRAMES; @@ -226,10 +213,10 @@ } static const AVOption options[] = { - { "standard", "", offsetof(struct dv1394_data, format), FF_OPT_TYPE_INT, {.dbl = DV1394_NTSC}, DV1394_PAL, DV1394_NTSC, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "PAL", "", 0, FF_OPT_TYPE_CONST, {.dbl = DV1394_PAL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "NTSC", "", 0, FF_OPT_TYPE_CONST, {.dbl = DV1394_NTSC}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "channel", "", offsetof(struct dv1394_data, channel), FF_OPT_TYPE_INT, {.dbl = DV1394_DEFAULT_CHANNEL}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { "standard", "", offsetof(struct dv1394_data, format), AV_OPT_TYPE_INT, {.dbl = DV1394_NTSC}, DV1394_PAL, DV1394_NTSC, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "PAL", "", 0, AV_OPT_TYPE_CONST, {.dbl = DV1394_PAL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "NTSC", "", 0, AV_OPT_TYPE_CONST, {.dbl = DV1394_NTSC}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "channel", "", offsetof(struct dv1394_data, channel), AV_OPT_TYPE_INT, {.dbl = DV1394_DEFAULT_CHANNEL}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, { NULL }, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/fbdev.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/fbdev.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/fbdev.c 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/fbdev.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,7 +24,7 @@ * @file * Linux framebuffer input device, * inspired by code from fbgrab.c by Gunnar Monell. - * See also http://linux-fbdev.sourceforge.net/. + * @see http://linux-fbdev.sourceforge.net/ */ /* #define DEBUG */ @@ -43,6 +43,7 @@ #include "libavutil/parseutils.h" #include "libavutil/pixdesc.h" #include "libavformat/avformat.h" +#include "libavformat/internal.h" struct rgb_pixfmt_map_entry { int bits_per_pixel; @@ -79,12 +80,12 @@ typedef struct { AVClass *class; ///< class for private options int frame_size; ///< size in bytes of a grabbed frame - AVRational fps; ///< framerate + AVRational framerate_q; ///< framerate char *framerate; ///< framerate string set by a private option int64_t time_frame; ///< time for the next frame to output (in 1/1000000 units) int fd; ///< framebuffer device file descriptor - int width, heigth; ///< assumed frame resolution + int width, height; ///< assumed frame resolution int frame_linesize; ///< linesize of the output frame, it is assumed to be constant int bytes_per_pixel; @@ -102,19 +103,15 @@ enum PixelFormat pix_fmt; int ret, flags = O_RDONLY; - ret = av_parse_video_rate(&fbdev->fps, fbdev->framerate); + ret = av_parse_video_rate(&fbdev->framerate_q, fbdev->framerate); if (ret < 0) { - av_log(avctx, AV_LOG_ERROR, "Couldn't parse framerate.\n"); + av_log(avctx, AV_LOG_ERROR, "Could not parse framerate '%s'.\n", fbdev->framerate); return ret; } -#if FF_API_FORMAT_PARAMETERS - if (ap->time_base.num) - fbdev->fps = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif - if (!(st = av_new_stream(avctx, 0))) + if (!(st = avformat_new_stream(avctx, NULL))) return AVERROR(ENOMEM); - av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in microseconds */ + avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in microseconds */ /* NONBLOCK is ignored by the fbdev driver, only set for consistency */ if (avctx->flags & AVFMT_FLAG_NONBLOCK) @@ -151,10 +148,10 @@ } fbdev->width = fbdev->varinfo.xres; - fbdev->heigth = fbdev->varinfo.yres; + fbdev->height = fbdev->varinfo.yres; fbdev->bytes_per_pixel = (fbdev->varinfo.bits_per_pixel + 7) >> 3; fbdev->frame_linesize = fbdev->width * fbdev->bytes_per_pixel; - fbdev->frame_size = fbdev->frame_linesize * fbdev->heigth; + fbdev->frame_size = fbdev->frame_linesize * fbdev->height; fbdev->time_frame = AV_NOPTS_VALUE; fbdev->data = mmap(NULL, fbdev->fixinfo.smem_len, PROT_READ, MAP_SHARED, fbdev->fd, 0); if (fbdev->data == MAP_FAILED) { @@ -166,17 +163,17 @@ st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_RAWVIDEO; st->codec->width = fbdev->width; - st->codec->height = fbdev->heigth; + st->codec->height = fbdev->height; st->codec->pix_fmt = pix_fmt; - st->codec->time_base = (AVRational){fbdev->fps.den, fbdev->fps.num}; + st->codec->time_base = (AVRational){fbdev->framerate_q.den, fbdev->framerate_q.num}; st->codec->bit_rate = - fbdev->width * fbdev->heigth * fbdev->bytes_per_pixel * av_q2d(fbdev->fps) * 8; + fbdev->width * fbdev->height * fbdev->bytes_per_pixel * av_q2d(fbdev->framerate_q) * 8; av_log(avctx, AV_LOG_INFO, "w:%d h:%d bpp:%d pixfmt:%s fps:%d/%d bit_rate:%d\n", - fbdev->width, fbdev->heigth, fbdev->varinfo.bits_per_pixel, + fbdev->width, fbdev->height, fbdev->varinfo.bits_per_pixel, av_pix_fmt_descriptors[pix_fmt].name, - fbdev->fps.num, fbdev->fps.den, + fbdev->framerate_q.num, fbdev->framerate_q.den, st->codec->bit_rate); return 0; @@ -210,7 +207,7 @@ while (nanosleep(&ts, &ts) < 0 && errno == EINTR); } /* compute the time of the next frame */ - fbdev->time_frame += INT64_C(1000000) / av_q2d(fbdev->fps); + fbdev->time_frame += INT64_C(1000000) / av_q2d(fbdev->framerate_q); if ((ret = av_new_packet(pkt, fbdev->frame_size)) < 0) return ret; @@ -228,7 +225,7 @@ pout = pkt->data; // TODO it'd be nice if the lines were aligned - for (i = 0; i < fbdev->heigth; i++) { + for (i = 0; i < fbdev->height; i++) { memcpy(pout, pin, fbdev->frame_linesize); pin += fbdev->fixinfo.line_length; pout += fbdev->frame_linesize; @@ -250,7 +247,7 @@ #define OFFSET(x) offsetof(FBDevContext, x) #define DEC AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { - { "framerate","", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = "25"}, 0, 0, DEC }, + { "framerate","", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0, DEC }, { NULL }, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/jack_audio.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/jack_audio.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/jack_audio.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/jack_audio.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,9 +26,11 @@ #include "libavutil/log.h" #include "libavutil/fifo.h" +#include "libavutil/opt.h" #include "libavcodec/avcodec.h" #include "libavformat/avformat.h" -#include "libavformat/timefilter.h" +#include "libavformat/internal.h" +#include "timefilter.h" /** * Size of the internal FIFO buffers as a number of audio packets @@ -36,6 +38,7 @@ #define FIFO_PACKETS_NUM 16 typedef struct { + AVClass *class; jack_client_t * client; int activated; sem_t packet_count; @@ -136,7 +139,7 @@ return 0; } -static int start_jack(AVFormatContext *context, AVFormatParameters *params) +static int start_jack(AVFormatContext *context) { JackData *self = context->priv_data; jack_status_t status; @@ -153,7 +156,6 @@ sem_init(&self->packet_count, 0, 0); self->sample_rate = jack_get_sample_rate(self->client); - self->nports = params->channels; self->ports = av_malloc(self->nports * sizeof(*self->ports)); self->buffer_size = jack_get_buffer_size(self->client); @@ -225,13 +227,10 @@ AVStream *stream; int test; - if (params->sample_rate <= 0 || params->channels <= 0) - return -1; - - if ((test = start_jack(context, params))) + if ((test = start_jack(context))) return test; - stream = av_new_stream(context, 0); + stream = avformat_new_stream(context, NULL); if (!stream) { stop_jack(self); return AVERROR(ENOMEM); @@ -246,7 +245,7 @@ stream->codec->sample_rate = self->sample_rate; stream->codec->channels = self->nports; - av_set_pts_info(stream, 64, 1, 1000000); /* 64 bits pts in us */ + avpriv_set_pts_info(stream, 64, 1, 1000000); /* 64 bits pts in us */ return 0; } @@ -272,7 +271,7 @@ } } - /* Wait for a packet comming back from process_callback(), if one isn't available yet */ + /* Wait for a packet coming back from process_callback(), if one isn't available yet */ timeout.tv_sec = av_gettime() / 1000000 + 2; if (sem_timedwait(&self->packet_count, &timeout)) { if (errno == ETIMEDOUT) { @@ -314,13 +313,26 @@ return 0; } +#define OFFSET(x) offsetof(JackData, x) +static const AVOption options[] = { + { "channels", "Number of audio channels.", OFFSET(nports), AV_OPT_TYPE_INT, { 2 }, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { NULL }, +}; + +static const AVClass jack_indev_class = { + .class_name = "JACK indev", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVInputFormat ff_jack_demuxer = { - "jack", - NULL_IF_CONFIG_SMALL("JACK Audio Connection Kit"), - sizeof(JackData), - NULL, - audio_read_header, - audio_read_packet, - audio_read_close, - .flags = AVFMT_NOFILE, + .name = "jack", + .long_name = NULL_IF_CONFIG_SMALL("JACK Audio Connection Kit"), + .priv_data_size = sizeof(JackData), + .read_header = audio_read_header, + .read_packet = audio_read_packet, + .read_close = audio_read_close, + .flags = AVFMT_NOFILE, + .priv_class = &jack_indev_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/libcdio.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/libcdio.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/libcdio.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/libcdio.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2011 Anton Khirnov + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * libcdio CD grabbing + */ + +#include +#include + +#include "libavutil/log.h" +#include "libavutil/mem.h" +#include "libavutil/opt.h" + +#include "libavformat/avformat.h" +#include "libavformat/internal.h" + +/* cdio returns some malloced strings that need to be free()d */ +#undef free + +typedef struct CDIOContext { + cdrom_drive_t *drive; + cdrom_paranoia_t *paranoia; + int32_t last_sector; + + /* private options */ + int speed; + int paranoia_mode; +} CDIOContext; + +static av_cold int read_header(AVFormatContext *ctx, AVFormatParameters *ap) +{ + CDIOContext *s = ctx->priv_data; + AVStream *st; + int ret, i; + char *err = NULL; + + if (!(st = avformat_new_stream(ctx, NULL))) + return AVERROR(ENOMEM); + s->drive = cdio_cddap_identify(ctx->filename, CDDA_MESSAGE_LOGIT, &err); + if (!s->drive) { + av_log(ctx, AV_LOG_ERROR, "Could not open drive %s.\n", ctx->filename); + return AVERROR(EINVAL); + } + if (err) { + av_log(ctx, AV_LOG_VERBOSE, "%s\n", err); + free(err); + } + if ((ret = cdio_cddap_open(s->drive)) < 0 || !s->drive->opened) { + av_log(ctx, AV_LOG_ERROR, "Could not open disk in drive %s.\n", ctx->filename); + return AVERROR(EINVAL); + } + + cdio_cddap_verbose_set(s->drive, CDDA_MESSAGE_LOGIT, CDDA_MESSAGE_LOGIT); + if (s->speed) + cdio_cddap_speed_set(s->drive, s->speed); + + s->paranoia = cdio_paranoia_init(s->drive); + if (!s->paranoia) { + av_log(ctx, AV_LOG_ERROR, "Could not init paranoia.\n"); + return AVERROR(EINVAL); + } + cdio_paranoia_modeset(s->paranoia, s->paranoia_mode); + + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; + if (s->drive->bigendianp) + st->codec->codec_id = CODEC_ID_PCM_S16BE; + else + st->codec->codec_id = CODEC_ID_PCM_S16LE; + st->codec->sample_rate = 44100; + st->codec->channels = 2; + if (s->drive->audio_last_sector != CDIO_INVALID_LSN && + s->drive->audio_first_sector != CDIO_INVALID_LSN) + st->duration = s->drive->audio_last_sector - s->drive->audio_first_sector; + else if (s->drive->tracks) + st->duration = s->drive->disc_toc[s->drive->tracks].dwStartSector; + avpriv_set_pts_info(st, 64, CDIO_CD_FRAMESIZE_RAW, 2*st->codec->channels*st->codec->sample_rate); + + for (i = 0; i < s->drive->tracks; i++) { + char title[16]; + snprintf(title, sizeof(title), "track %02d", s->drive->disc_toc[i].bTrack); + avpriv_new_chapter(ctx, i, st->time_base, s->drive->disc_toc[i].dwStartSector, + s->drive->disc_toc[i+1].dwStartSector, title); + } + + s->last_sector = cdio_cddap_disc_lastsector(s->drive); + + return 0; +} + +static int read_packet(AVFormatContext *ctx, AVPacket *pkt) +{ + CDIOContext *s = ctx->priv_data; + int ret; + uint16_t *buf; + char *err = NULL; + + if (ctx->streams[0]->cur_dts > s->last_sector) + return AVERROR_EOF; + + buf = cdio_paranoia_read(s->paranoia, NULL); + if (!buf) + return AVERROR_EOF; + + if (err = cdio_cddap_errors(s->drive)) { + av_log(ctx, AV_LOG_ERROR, "%s\n", err); + free(err); + err = NULL; + } + if (err = cdio_cddap_messages(s->drive)) { + av_log(ctx, AV_LOG_VERBOSE, "%s\n", err); + free(err); + err = NULL; + } + + if ((ret = av_new_packet(pkt, CDIO_CD_FRAMESIZE_RAW)) < 0) + return ret; + memcpy(pkt->data, buf, CDIO_CD_FRAMESIZE_RAW); + return 0; +} + +static av_cold int read_close(AVFormatContext *ctx) +{ + CDIOContext *s = ctx->priv_data; + cdio_paranoia_free(s->paranoia); + cdio_cddap_close(s->drive); + return 0; +} + +static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, + int flags) +{ + CDIOContext *s = ctx->priv_data; + AVStream *st = ctx->streams[0]; + + cdio_paranoia_seek(s->paranoia, timestamp, SEEK_SET); + st->cur_dts = timestamp; + return 0; +} + +#define OFFSET(x) offsetof(CDIOContext, x) +#define DEC AV_OPT_FLAG_DECODING_PARAM +static const AVOption options[] = { + { "speed", "Drive reading speed.", OFFSET(speed), AV_OPT_TYPE_INT, { 0 }, 0, INT_MAX, DEC }, + { "paranoia_mode", "Error recovery mode.", OFFSET(paranoia_mode), AV_OPT_TYPE_FLAGS, { 0 }, INT_MIN, INT_MAX, DEC, "paranoia_mode" }, + { "verify", "Verify data integrity in overlap area", 0, AV_OPT_TYPE_CONST, { PARANOIA_MODE_VERIFY }, 0, 0, DEC, "paranoia_mode" }, + { "overlap", "Perform overlapped reads.", 0, AV_OPT_TYPE_CONST, { PARANOIA_MODE_OVERLAP }, 0, 0, DEC, "paranoia_mode" }, + { "neverskip", "Do not skip failed reads.", 0, AV_OPT_TYPE_CONST, { PARANOIA_MODE_NEVERSKIP }, 0, 0, DEC, "paranoia_mode" }, + { NULL }, +}; + +static const AVClass libcdio_class = { + .class_name = "libcdio indev", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +AVInputFormat ff_libcdio_demuxer = { + .name = "libcdio", + .read_header = read_header, + .read_packet = read_packet, + .read_close = read_close, + .read_seek = read_seek, + .priv_data_size = sizeof(CDIOContext), + .flags = AVFMT_NOFILE, + .priv_class = &libcdio_class, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/libdc1394.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/libdc1394.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/libdc1394.c 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/libdc1394.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,7 +22,9 @@ #include "config.h" #include "libavformat/avformat.h" +#include "libavformat/internal.h" #include "libavutil/log.h" +#include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "libavutil/parseutils.h" #include "libavutil/pixdesc.h" @@ -99,11 +101,11 @@ #define DEC AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { #if HAVE_LIBDC1394_1 - { "channel", "", offsetof(dc1394_data, channel), FF_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { "channel", "", offsetof(dc1394_data, channel), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, #endif - { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = "qvga"}, 0, 0, DEC }, - { "pixel_format", "", OFFSET(pixel_format), FF_OPT_TYPE_STRING, {.str = "uyvy422"}, 0, 0, DEC }, - { "framerate", "", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = "ntsc"}, 0, 0, DEC }, + { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = "qvga"}, 0, 0, DEC }, + { "pixel_format", "", OFFSET(pixel_format), AV_OPT_TYPE_STRING, {.str = "uyvy422"}, 0, 0, DEC }, + { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "ntsc"}, 0, 0, DEC }, { NULL }, }; @@ -134,23 +136,13 @@ } if ((ret = av_parse_video_size(&width, &height, dc1394->video_size)) < 0) { - av_log(c, AV_LOG_ERROR, "Couldn't parse video size.\n"); + av_log(c, AV_LOG_ERROR, "Could not parse video size '%s'.\n", dc1394->video_size); goto out; } if ((ret = av_parse_video_rate(&framerate, dc1394->framerate)) < 0) { - av_log(c, AV_LOG_ERROR, "Couldn't parse framerate.\n"); + av_log(c, AV_LOG_ERROR, "Could not parse framerate '%s'.\n", dc1394->framerate); goto out; } -#if FF_API_FORMAT_PARAMETERS - if (ap->width > 0) - width = ap->width; - if (ap->height > 0) - height = ap->height; - if (ap->pix_fmt) - pix_fmt = ap->pix_fmt; - if (ap->time_base.num) - framerate = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif dc1394->frame_rate = av_rescale(1000, framerate.num, framerate.den); for (fmt = dc1394_frame_formats; fmt->width; fmt++) @@ -169,12 +161,12 @@ } /* create a video stream */ - vst = av_new_stream(c, 0); + vst = avformat_new_stream(c, NULL); if (!vst) { ret = AVERROR(ENOMEM); goto out; } - av_set_pts_info(vst, 64, 1, 1000); + avpriv_set_pts_info(vst, 64, 1, 1000); vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_id = CODEC_ID_RAWVIDEO; vst->codec->time_base.den = framerate.num; @@ -211,11 +203,6 @@ if (dc1394_read_common(c,ap,&fmt,&fps) != 0) return -1; -#if FF_API_FORMAT_PARAMETERS - if (ap->channel) - dc1394->channel = ap->channel; -#endif - /* Now let us prep the hardware. */ dc1394->handle = dc1394_create_handle(0); /* FIXME: gotta have ap->port */ if (!dc1394->handle) { @@ -384,8 +371,8 @@ res = dc1394_capture_dequeue(dc1394->camera, DC1394_CAPTURE_POLICY_WAIT, &dc1394->frame); if (res == DC1394_SUCCESS) { - dc1394->packet.data = (uint8_t *)(dc1394->frame->image); - dc1394->packet.pts = (dc1394->current_frame * 1000000) / (dc1394->frame_rate); + dc1394->packet.data = (uint8_t *) dc1394->frame->image; + dc1394->packet.pts = dc1394->current_frame * 1000000 / dc1394->frame_rate; res = dc1394->frame->image_bytes; } else { av_log(c, AV_LOG_ERROR, "DMA capture failed\n"); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/Makefile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/Makefile 2011-03-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/Makefile 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,3 @@ -include $(SUBDIR)../config.mak - NAME = avdevice FFLIBS = avformat avcodec avutil @@ -15,9 +13,10 @@ OBJS-$(CONFIG_BKTR_INDEV) += bktr.o OBJS-$(CONFIG_DV1394_INDEV) += dv1394.o OBJS-$(CONFIG_FBDEV_INDEV) += fbdev.o -OBJS-$(CONFIG_JACK_INDEV) += jack_audio.o +OBJS-$(CONFIG_JACK_INDEV) += jack_audio.o timefilter.o OBJS-$(CONFIG_OSS_INDEV) += oss_audio.o OBJS-$(CONFIG_OSS_OUTDEV) += oss_audio.o +OBJS-$(CONFIG_PULSE_INDEV) += pulse.o OBJS-$(CONFIG_SNDIO_INDEV) += sndio_common.o sndio_dec.o OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_common.o sndio_enc.o OBJS-$(CONFIG_V4L2_INDEV) += v4l2.o @@ -26,9 +25,10 @@ OBJS-$(CONFIG_X11_GRAB_DEVICE_INDEV) += x11grab.o # external libraries +OBJS-$(CONFIG_LIBCDIO_INDEV) += libcdio.o OBJS-$(CONFIG_LIBDC1394_INDEV) += libdc1394.o SKIPHEADERS-$(HAVE_ALSA_ASOUNDLIB_H) += alsa-audio.h SKIPHEADERS-$(HAVE_SNDIO_H) += sndio_common.h -include $(SUBDIR)../subdir.mak +TESTPROGS = timefilter diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/oss_audio.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/oss_audio.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/oss_audio.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/oss_audio.c 2012-01-11 00:34:30.000000000 +0000 @@ -40,6 +40,7 @@ #include "libavutil/opt.h" #include "libavcodec/avcodec.h" #include "libavformat/avformat.h" +#include "libavformat/internal.h" #define AUDIO_BLOCK_SIZE 4096 @@ -80,13 +81,6 @@ fcntl(audio_fd, F_SETFL, O_NONBLOCK); s->frame_size = AUDIO_BLOCK_SIZE; -#if 0 - tmp = (NB_FRAGMENTS << 16) | FRAGMENT_BITS; - err = ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &tmp); - if (err < 0) { - perror("SNDCTL_DSP_SETFRAGMENT"); - } -#endif /* select format : favour native format */ err = ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &tmp); @@ -216,14 +210,7 @@ AVStream *st; int ret; -#if FF_API_FORMAT_PARAMETERS - if (ap->sample_rate > 0) - s->sample_rate = ap->sample_rate; - if (ap->channels > 0) - s->channels = ap->channels; -#endif - - st = av_new_stream(s1, 0); + st = avformat_new_stream(s1, NULL); if (!st) { return AVERROR(ENOMEM); } @@ -239,7 +226,7 @@ st->codec->sample_rate = s->sample_rate; st->codec->channels = s->channels; - av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ + avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ return 0; } @@ -296,8 +283,8 @@ #if CONFIG_OSS_INDEV static const AVOption options[] = { - { "sample_rate", "", offsetof(AudioData, sample_rate), FF_OPT_TYPE_INT, {.dbl = 48000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, - { "channels", "", offsetof(AudioData, channels), FF_OPT_TYPE_INT, {.dbl = 2}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { "sample_rate", "", offsetof(AudioData, sample_rate), AV_OPT_TYPE_INT, {.dbl = 48000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { "channels", "", offsetof(AudioData, channels), AV_OPT_TYPE_INT, {.dbl = 2}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, { NULL }, }; @@ -309,33 +296,30 @@ }; AVInputFormat ff_oss_demuxer = { - "oss", - NULL_IF_CONFIG_SMALL("Open Sound System capture"), - sizeof(AudioData), - NULL, - audio_read_header, - audio_read_packet, - audio_read_close, - .flags = AVFMT_NOFILE, - .priv_class = &oss_demuxer_class, + .name = "oss", + .long_name = NULL_IF_CONFIG_SMALL("Open Sound System capture"), + .priv_data_size = sizeof(AudioData), + .read_header = audio_read_header, + .read_packet = audio_read_packet, + .read_close = audio_read_close, + .flags = AVFMT_NOFILE, + .priv_class = &oss_demuxer_class, }; #endif #if CONFIG_OSS_OUTDEV AVOutputFormat ff_oss_muxer = { - "oss", - NULL_IF_CONFIG_SMALL("Open Sound System playback"), - "", - "", - sizeof(AudioData), + .name = "oss", + .long_name = NULL_IF_CONFIG_SMALL("Open Sound System playback"), + .priv_data_size = sizeof(AudioData), /* XXX: we make the assumption that the soundcard accepts this format */ /* XXX: find better solution with "preinit" method, needed also in other formats */ - AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE), - CODEC_ID_NONE, - audio_write_header, - audio_write_packet, - audio_write_trailer, - .flags = AVFMT_NOFILE, + .audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE), + .video_codec = CODEC_ID_NONE, + .write_header = audio_write_header, + .write_packet = audio_write_packet, + .write_trailer = audio_write_trailer, + .flags = AVFMT_NOFILE, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/pulse.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/pulse.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/pulse.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/pulse.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,191 @@ +/* + * Pulseaudio input + * Copyright (c) 2011 Luca Barbato + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * PulseAudio input using the simple API. + * @author Luca Barbato + */ + +#include +#include +#include + +#include "libavformat/avformat.h" +#include "libavformat/internal.h" +#include "libavutil/opt.h" + +#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE) + +typedef struct PulseData { + AVClass *class; + char *server; + char *name; + char *stream_name; + int sample_rate; + int channels; + int frame_size; + int fragment_size; + pa_simple *s; + int64_t pts; + int64_t frame_duration; +} PulseData; + +static pa_sample_format_t codec_id_to_pulse_format(int codec_id) { + switch (codec_id) { + case CODEC_ID_PCM_U8: return PA_SAMPLE_U8; + case CODEC_ID_PCM_ALAW: return PA_SAMPLE_ALAW; + case CODEC_ID_PCM_MULAW: return PA_SAMPLE_ULAW; + case CODEC_ID_PCM_S16LE: return PA_SAMPLE_S16LE; + case CODEC_ID_PCM_S16BE: return PA_SAMPLE_S16BE; + case CODEC_ID_PCM_F32LE: return PA_SAMPLE_FLOAT32LE; + case CODEC_ID_PCM_F32BE: return PA_SAMPLE_FLOAT32BE; + case CODEC_ID_PCM_S32LE: return PA_SAMPLE_S32LE; + case CODEC_ID_PCM_S32BE: return PA_SAMPLE_S32BE; + case CODEC_ID_PCM_S24LE: return PA_SAMPLE_S24LE; + case CODEC_ID_PCM_S24BE: return PA_SAMPLE_S24BE; + default: return PA_SAMPLE_INVALID; + } +} + +static av_cold int pulse_read_header(AVFormatContext *s, + AVFormatParameters *ap) +{ + PulseData *pd = s->priv_data; + AVStream *st; + char *device = NULL; + int ret; + enum CodecID codec_id = + s->audio_codec_id == CODEC_ID_NONE ? DEFAULT_CODEC_ID : s->audio_codec_id; + const pa_sample_spec ss = { codec_id_to_pulse_format(codec_id), + pd->sample_rate, + pd->channels }; + + pa_buffer_attr attr = { -1 }; + + st = avformat_new_stream(s, NULL); + + if (!st) { + av_log(s, AV_LOG_ERROR, "Cannot add stream\n"); + return AVERROR(ENOMEM); + } + + attr.fragsize = pd->fragment_size; + + if (strcmp(s->filename, "default")) + device = s->filename; + + pd->s = pa_simple_new(pd->server, pd->name, + PA_STREAM_RECORD, + device, pd->stream_name, &ss, + NULL, &attr, &ret); + + if (!pd->s) { + av_log(s, AV_LOG_ERROR, "pa_simple_new failed: %s\n", + pa_strerror(ret)); + return AVERROR(EIO); + } + /* take real parameters */ + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; + st->codec->codec_id = codec_id; + st->codec->sample_rate = pd->sample_rate; + st->codec->channels = pd->channels; + avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ + + pd->pts = AV_NOPTS_VALUE; + pd->frame_duration = (pd->frame_size * 1000000LL * 8) / + (pd->sample_rate * pd->channels * av_get_bits_per_sample(codec_id)); + + return 0; +} + +static int pulse_read_packet(AVFormatContext *s, AVPacket *pkt) +{ + PulseData *pd = s->priv_data; + int res; + pa_usec_t latency; + + if (av_new_packet(pkt, pd->frame_size) < 0) { + return AVERROR(ENOMEM); + } + + if ((pa_simple_read(pd->s, pkt->data, pkt->size, &res)) < 0) { + av_log(s, AV_LOG_ERROR, "pa_simple_read failed: %s\n", + pa_strerror(res)); + av_free_packet(pkt); + return AVERROR(EIO); + } + + if ((latency = pa_simple_get_latency(pd->s, &res)) == (pa_usec_t) -1) { + av_log(s, AV_LOG_ERROR, "pa_simple_get_latency() failed: %s\n", + pa_strerror(res)); + return AVERROR(EIO); + } + + if (pd->pts == AV_NOPTS_VALUE) { + pd->pts = -latency; + } + + pkt->pts = pd->pts; + + pd->pts += pd->frame_duration; + + return 0; +} + +static av_cold int pulse_close(AVFormatContext *s) +{ + PulseData *pd = s->priv_data; + pa_simple_free(pd->s); + return 0; +} + +#define OFFSET(a) offsetof(PulseData, a) +#define D AV_OPT_FLAG_DECODING_PARAM + +static const AVOption options[] = { + { "server", "pulse server name", OFFSET(server), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, D }, + { "name", "application name", OFFSET(name), AV_OPT_TYPE_STRING, {.str = "libav"}, 0, 0, D }, + { "stream_name", "stream description", OFFSET(stream_name), AV_OPT_TYPE_STRING, {.str = "record"}, 0, 0, D }, + { "sample_rate", "sample rate in Hz", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.dbl = 48000}, 1, INT_MAX, D }, + { "channels", "number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, {.dbl = 2}, 1, INT_MAX, D }, + { "frame_size", "number of bytes per frame", OFFSET(frame_size), AV_OPT_TYPE_INT, {.dbl = 1024}, 1, INT_MAX, D }, + { "fragment_size", "buffering size, affects latency and cpu usage", OFFSET(fragment_size), AV_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX, D }, + { NULL }, +}; + +static const AVClass pulse_demuxer_class = { + .class_name = "Pulse demuxer", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +AVInputFormat ff_pulse_demuxer = { + .name = "pulse", + .long_name = NULL_IF_CONFIG_SMALL("Pulse audio input"), + .priv_data_size = sizeof(PulseData), + .read_header = pulse_read_header, + .read_packet = pulse_read_packet, + .read_close = pulse_close, + .flags = AVFMT_NOFILE, + .priv_class = &pulse_demuxer_class, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/sndio_dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/sndio_dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/sndio_dec.c 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/sndio_dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,7 @@ #include #include "libavformat/avformat.h" +#include "libavformat/internal.h" #include "libavutil/opt.h" #include "sndio_common.h" @@ -34,14 +35,7 @@ AVStream *st; int ret; -#if FF_API_FORMAT_PARAMETERS - if (ap->sample_rate > 0) - s->sample_rate = ap->sample_rate; - if (ap->channels > 0) - s->channels = ap->channels; -#endif - - st = av_new_stream(s1, 0); + st = avformat_new_stream(s1, NULL); if (!st) return AVERROR(ENOMEM); @@ -55,7 +49,7 @@ st->codec->sample_rate = s->sample_rate; st->codec->channels = s->channels; - av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ + avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ return 0; } @@ -100,8 +94,8 @@ } static const AVOption options[] = { - { "sample_rate", "", offsetof(SndioData, sample_rate), FF_OPT_TYPE_INT, {.dbl = 48000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, - { "channels", "", offsetof(SndioData, channels), FF_OPT_TYPE_INT, {.dbl = 2}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { "sample_rate", "", offsetof(SndioData, sample_rate), AV_OPT_TYPE_INT, {.dbl = 48000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { "channels", "", offsetof(SndioData, channels), AV_OPT_TYPE_INT, {.dbl = 2}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, { NULL }, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/timefilter.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/timefilter.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/timefilter.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/timefilter.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,151 @@ +/* + * Delay Locked Loop based time filter + * Copyright (c) 2009 Samalyse + * Copyright (c) 2009 Michael Niedermayer + * Author: Olivier Guilyardi + * Michael Niedermayer + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#include "config.h" +#include "timefilter.h" +#include "libavutil/mem.h" + +struct TimeFilter { + /// Delay Locked Loop data. These variables refer to mathematical + /// concepts described in: http://www.kokkinizita.net/papers/usingdll.pdf + double cycle_time; + double feedback2_factor; + double feedback3_factor; + double clock_period; + int count; +}; + +TimeFilter * ff_timefilter_new(double clock_period, double feedback2_factor, double feedback3_factor) +{ + TimeFilter *self = av_mallocz(sizeof(TimeFilter)); + self->clock_period = clock_period; + self->feedback2_factor = feedback2_factor; + self->feedback3_factor = feedback3_factor; + return self; +} + +void ff_timefilter_destroy(TimeFilter *self) +{ + av_freep(&self); +} + +void ff_timefilter_reset(TimeFilter *self) +{ + self->count = 0; +} + +double ff_timefilter_update(TimeFilter *self, double system_time, double period) +{ + self->count++; + if (self->count==1) { + /// init loop + self->cycle_time = system_time; + } else { + double loop_error; + self->cycle_time += self->clock_period * period; + /// calculate loop error + loop_error = system_time - self->cycle_time; + + /// update loop + self->cycle_time += FFMAX(self->feedback2_factor, 1.0 / self->count) * loop_error; + self->clock_period += self->feedback3_factor * loop_error / period; + } + return self->cycle_time; +} + +#ifdef TEST +#include "libavutil/lfg.h" +#define LFG_MAX ((1LL << 32) - 1) + +#undef printf + +int main(void) +{ + AVLFG prng; + double n0,n1; +#define SAMPLES 1000 + double ideal[SAMPLES]; + double samples[SAMPLES]; +#if 1 + for(n0= 0; n0<40; n0=2*n0+1){ + for(n1= 0; n1<10; n1=2*n1+1){ +#else + {{ + n0=7; + n1=1; +#endif + double best_error= 1000000000; + double bestpar0=1; + double bestpar1=0.001; + int better, i; + + av_lfg_init(&prng, 123); + for(i=0; i + * Michael Niedermayer + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_TIMEFILTER_H +#define AVDEVICE_TIMEFILTER_H + +/** + * Opaque type representing a time filter state + * + * The purpose of this filter is to provide a way to compute accurate time + * stamps that can be compared to wall clock time, especially when dealing + * with two clocks: the system clock and a hardware device clock, such as + * a soundcard. + */ +typedef struct TimeFilter TimeFilter; + + +/** + * Create a new Delay Locked Loop time filter + * + * feedback2_factor and feedback3_factor are the factors used for the + * multiplications that are respectively performed in the second and third + * feedback paths of the loop. + * + * Unless you know what you are doing, you should set these as follow: + * + * o = 2 * M_PI * bandwidth * period + * feedback2_factor = sqrt(2 * o) + * feedback3_factor = o * o + * + * Where bandwidth is up to you to choose. Smaller values will filter out more + * of the jitter, but also take a longer time for the loop to settle. A good + * starting point is something between 0.3 and 3 Hz. + * + * @param clock_period period of the hardware clock in seconds + * (for example 1.0/44100) + * + * For more details about these parameters and background concepts please see: + * http://www.kokkinizita.net/papers/usingdll.pdf + */ +TimeFilter * ff_timefilter_new(double clock_period, double feedback2_factor, double feedback3_factor); + +/** + * Update the filter + * + * This function must be called in real time, at each process cycle. + * + * @param period the device cycle duration in clock_periods. For example, at + * 44.1kHz and a buffer size of 512 frames, period = 512 when clock_period + * was 1.0/44100, or 512/44100 if clock_period was 1. + * + * system_time, in seconds, should be the value of the system clock time, + * at (or as close as possible to) the moment the device hardware interrupt + * occurred (or any other event the device clock raises at the beginning of a + * cycle). + * + * @return the filtered time, in seconds + */ +double ff_timefilter_update(TimeFilter *self, double system_time, double period); + +/** + * Reset the filter + * + * This function should mainly be called in case of XRUN. + * + * Warning: after calling this, the filter is in an undetermined state until + * the next call to ff_timefilter_update() + */ +void ff_timefilter_reset(TimeFilter *); + +/** + * Free all resources associated with the filter + */ +void ff_timefilter_destroy(TimeFilter *); + +#endif /* AVDEVICE_TIMEFILTER_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/v4l2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/v4l2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/v4l2.c 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/v4l2.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,40 +30,41 @@ #undef __STRICT_ANSI__ //workaround due to broken kernel headers #include "config.h" #include "libavformat/avformat.h" +#include "libavformat/internal.h" #include #include #include #include #include +#include #if HAVE_SYS_VIDEOIO_H #include #else -#include #include #endif #include -#include #include "libavutil/imgutils.h" #include "libavutil/log.h" #include "libavutil/opt.h" #include "libavutil/parseutils.h" #include "libavutil/pixdesc.h" +#include "libavutil/avstring.h" +#include "libavutil/mathematics.h" static const int desired_video_buffers = 256; -enum io_method { - io_read, - io_mmap, - io_userptr -}; +#define V4L_ALLFORMATS 3 +#define V4L_RAWFORMATS 1 +#define V4L_COMPFORMATS 2 struct video_data { AVClass *class; int fd; int frame_format; /* V4L2_PIX_FMT_* */ - enum io_method io_method; int width, height; int frame_size; + int timeout; + int interlaced; int top_field_first; int buffers; @@ -71,8 +72,10 @@ unsigned int *buf_len; char *standard; int channel; - char *video_size; /**< String describing video size, set by a private option. */ + char *video_size; /**< String describing video size, + set by a private option. */ char *pixel_format; /**< Set by a private option. */ + int list_format; /**< Set by a private option. */ char *framerate; /**< Set by a private option. */ }; @@ -106,7 +109,7 @@ { PIX_FMT_NONE, CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG }, }; -static int device_open(AVFormatContext *ctx, uint32_t *capabilities) +static int device_open(AVFormatContext *ctx) { struct v4l2_capability cap; int fd; @@ -116,65 +119,89 @@ if (ctx->flags & AVFMT_FLAG_NONBLOCK) { flags |= O_NONBLOCK; } + fd = open(ctx->filename, flags, 0); if (fd < 0) { + err = errno; + av_log(ctx, AV_LOG_ERROR, "Cannot open video device %s : %s\n", - ctx->filename, strerror(errno)); + ctx->filename, strerror(err)); - return AVERROR(errno); + return AVERROR(err); } res = ioctl(fd, VIDIOC_QUERYCAP, &cap); - // ENOIOCTLCMD definition only availble on __KERNEL__ - if (res < 0 && ((err = errno) == 515)) { - av_log(ctx, AV_LOG_ERROR, "QUERYCAP not implemented, probably V4L device but not supporting V4L2\n"); - close(fd); - - return AVERROR(515); - } if (res < 0) { + err = errno; av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_QUERYCAP): %s\n", - strerror(errno)); - close(fd); + strerror(err)); - return AVERROR(err); + goto fail; + } + + av_log(ctx, AV_LOG_VERBOSE, "[%d]Capabilities: %x\n", + fd, cap.capabilities); + + if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { + av_log(ctx, AV_LOG_ERROR, "Not a video capture device.\n"); + err = ENODEV; + + goto fail; } - if ((cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == 0) { - av_log(ctx, AV_LOG_ERROR, "Not a video capture device\n"); - close(fd); - return AVERROR(ENODEV); + if (!(cap.capabilities & V4L2_CAP_STREAMING)) { + av_log(ctx, AV_LOG_ERROR, + "The device does not support the streaming I/O method.\n"); + err = ENOSYS; + + goto fail; } - *capabilities = cap.capabilities; return fd; + +fail: + close(fd); + return AVERROR(err); } -static int device_init(AVFormatContext *ctx, int *width, int *height, uint32_t pix_fmt) +static int device_init(AVFormatContext *ctx, int *width, int *height, + uint32_t pix_fmt) { struct video_data *s = ctx->priv_data; int fd = s->fd; - struct v4l2_format fmt; + struct v4l2_format fmt = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE }; + struct v4l2_pix_format *pix = &fmt.fmt.pix; + int res; - memset(&fmt, 0, sizeof(struct v4l2_format)); - fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - fmt.fmt.pix.width = *width; - fmt.fmt.pix.height = *height; - fmt.fmt.pix.pixelformat = pix_fmt; - fmt.fmt.pix.field = V4L2_FIELD_INTERLACED; + pix->width = *width; + pix->height = *height; + pix->pixelformat = pix_fmt; + pix->field = V4L2_FIELD_ANY; + res = ioctl(fd, VIDIOC_S_FMT, &fmt); + if ((*width != fmt.fmt.pix.width) || (*height != fmt.fmt.pix.height)) { - av_log(ctx, AV_LOG_INFO, "The V4L2 driver changed the video from %dx%d to %dx%d\n", *width, *height, fmt.fmt.pix.width, fmt.fmt.pix.height); + av_log(ctx, AV_LOG_INFO, + "The V4L2 driver changed the video from %dx%d to %dx%d\n", + *width, *height, fmt.fmt.pix.width, fmt.fmt.pix.height); *width = fmt.fmt.pix.width; *height = fmt.fmt.pix.height; } if (pix_fmt != fmt.fmt.pix.pixelformat) { - av_log(ctx, AV_LOG_DEBUG, "The V4L2 driver changed the pixel format from 0x%08X to 0x%08X\n", pix_fmt, fmt.fmt.pix.pixelformat); + av_log(ctx, AV_LOG_DEBUG, + "The V4L2 driver changed the pixel format " + "from 0x%08X to 0x%08X\n", + pix_fmt, fmt.fmt.pix.pixelformat); res = -1; } + if (fmt.fmt.pix.field == V4L2_FIELD_INTERLACED) { + av_log(ctx, AV_LOG_DEBUG, "The V4L2 driver using the interlaced mode"); + s->interlaced = 1; + } + return res; } @@ -237,16 +264,81 @@ return CODEC_ID_NONE; } +#if HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE +static void list_framesizes(AVFormatContext *ctx, int fd, uint32_t pixelformat) +{ + struct v4l2_frmsizeenum vfse = { .pixel_format = pixelformat }; + + while(!ioctl(fd, VIDIOC_ENUM_FRAMESIZES, &vfse)) { + switch (vfse.type) { + case V4L2_FRMSIZE_TYPE_DISCRETE: + av_log(ctx, AV_LOG_INFO, " %ux%u", + vfse.discrete.width, vfse.discrete.height); + break; + case V4L2_FRMSIZE_TYPE_CONTINUOUS: + case V4L2_FRMSIZE_TYPE_STEPWISE: + av_log(ctx, AV_LOG_INFO, " {%u-%u, %u}x{%u-%u, %u}", + vfse.stepwise.min_width, + vfse.stepwise.max_width, + vfse.stepwise.step_width, + vfse.stepwise.min_height, + vfse.stepwise.max_height, + vfse.stepwise.step_height); + } + vfse.index++; + } +} +#endif + +static void list_formats(AVFormatContext *ctx, int fd, int type) +{ + struct v4l2_fmtdesc vfd = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE }; + + while(!ioctl(fd, VIDIOC_ENUM_FMT, &vfd)) { + enum CodecID codec_id = fmt_v4l2codec(vfd.pixelformat); + enum PixelFormat pix_fmt = fmt_v4l2ff(vfd.pixelformat, codec_id); + + vfd.index++; + + if (!(vfd.flags & V4L2_FMT_FLAG_COMPRESSED) && + type & V4L_RAWFORMATS) { + const char *fmt_name = av_get_pix_fmt_name(pix_fmt); + av_log(ctx, AV_LOG_INFO, "R : %9s : %20s :", + fmt_name ? fmt_name : "Unsupported", + vfd.description); + } else if (vfd.flags & V4L2_FMT_FLAG_COMPRESSED && + type & V4L_COMPFORMATS) { + AVCodec *codec = avcodec_find_encoder(codec_id); + av_log(ctx, AV_LOG_INFO, "C : %9s : %20s :", + codec ? codec->name : "Unsupported", + vfd.description); + } else { + continue; + } + +#ifdef V4L2_FMT_FLAG_EMULATED + if (vfd.flags & V4L2_FMT_FLAG_EMULATED) { + av_log(ctx, AV_LOG_WARNING, "%s", "Emulated"); + continue; + } +#endif +#if HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE + list_framesizes(ctx, fd, vfd.pixelformat); +#endif + av_log(ctx, AV_LOG_INFO, "\n"); + } +} + static int mmap_init(AVFormatContext *ctx) { - struct video_data *s = ctx->priv_data; - struct v4l2_requestbuffers req; int i, res; + struct video_data *s = ctx->priv_data; + struct v4l2_requestbuffers req = { + .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, + .count = desired_video_buffers, + .memory = V4L2_MEMORY_MMAP + }; - memset(&req, 0, sizeof(struct v4l2_requestbuffers)); - req.count = desired_video_buffers; - req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - req.memory = V4L2_MEMORY_MMAP; res = ioctl(s->fd, VIDIOC_REQBUFS, &req); if (res < 0) { if (errno == EINVAL) { @@ -279,12 +371,12 @@ } for (i = 0; i < req.count; i++) { - struct v4l2_buffer buf; + struct v4l2_buffer buf = { + .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, + .index = i, + .memory = V4L2_MEMORY_MMAP + }; - memset(&buf, 0, sizeof(struct v4l2_buffer)); - buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - buf.memory = V4L2_MEMORY_MMAP; - buf.index = i; res = ioctl(s->fd, VIDIOC_QUERYBUF, &buf); if (res < 0) { av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_QUERYBUF)\n"); @@ -294,12 +386,16 @@ s->buf_len[i] = buf.length; if (s->frame_size > 0 && s->buf_len[i] < s->frame_size) { - av_log(ctx, AV_LOG_ERROR, "Buffer len [%d] = %d != %d\n", i, s->buf_len[i], s->frame_size); + av_log(ctx, AV_LOG_ERROR, + "Buffer len [%d] = %d != %d\n", + i, s->buf_len[i], s->frame_size); return -1; } - s->buf_start[i] = mmap (NULL, buf.length, - PROT_READ | PROT_WRITE, MAP_SHARED, s->fd, buf.m.offset); + s->buf_start[i] = mmap(NULL, buf.length, + PROT_READ | PROT_WRITE, MAP_SHARED, + s->fd, buf.m.offset); + if (s->buf_start[i] == MAP_FAILED) { av_log(ctx, AV_LOG_ERROR, "mmap: %s\n", strerror(errno)); @@ -310,22 +406,15 @@ return 0; } -static int read_init(AVFormatContext *ctx) -{ - return -1; -} - static void mmap_release_buffer(AVPacket *pkt) { - struct v4l2_buffer buf; + struct v4l2_buffer buf = { 0 }; int res, fd; struct buff_data *buf_descriptor = pkt->priv; - if (pkt->data == NULL) { - return; - } + if (pkt->data == NULL) + return; - memset(&buf, 0, sizeof(struct v4l2_buffer)); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; buf.index = buf_descriptor->index; @@ -333,9 +422,10 @@ av_free(buf_descriptor); res = ioctl(fd, VIDIOC_QBUF, &buf); - if (res < 0) { - av_log(NULL, AV_LOG_ERROR, "ioctl(VIDIOC_QBUF): %s\n", strerror(errno)); - } + if (res < 0) + av_log(NULL, AV_LOG_ERROR, "ioctl(VIDIOC_QBUF): %s\n", + strerror(errno)); + pkt->data = NULL; pkt->size = 0; } @@ -343,13 +433,20 @@ static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt) { struct video_data *s = ctx->priv_data; - struct v4l2_buffer buf; + struct v4l2_buffer buf = { + .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, + .memory = V4L2_MEMORY_MMAP + }; struct buff_data *buf_descriptor; + struct pollfd p = { .fd = s->fd, .events = POLLIN }; int res; - memset(&buf, 0, sizeof(struct v4l2_buffer)); - buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - buf.memory = V4L2_MEMORY_MMAP; + res = poll(&p, 1, s->timeout); + if (res < 0) + return AVERROR(errno); + + if (!(p.revents & (POLLIN | POLLERR | POLLHUP))) + return AVERROR(EAGAIN); /* FIXME: Some special treatment might be needed in case of loss of signal... */ while ((res = ioctl(s->fd, VIDIOC_DQBUF, &buf)) < 0 && (errno == EINTR)); @@ -359,13 +456,16 @@ return AVERROR(EAGAIN); } - av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_DQBUF): %s\n", strerror(errno)); + av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_DQBUF): %s\n", + strerror(errno)); return AVERROR(errno); } assert (buf.index < s->buffers); if (s->frame_size > 0 && buf.bytesused != s->frame_size) { - av_log(ctx, AV_LOG_ERROR, "The v4l2 frame is %d bytes, but %d bytes are expected\n", buf.bytesused, s->frame_size); + av_log(ctx, AV_LOG_ERROR, + "The v4l2 frame is %d bytes, but %d bytes are expected\n", + buf.bytesused, s->frame_size); return AVERROR_INVALIDDATA; } @@ -392,11 +492,6 @@ return s->buf_len[buf.index]; } -static int read_frame(AVFormatContext *ctx, AVPacket *pkt) -{ - return -1; -} - static int mmap_start(AVFormatContext *ctx) { struct video_data *s = ctx->priv_data; @@ -404,16 +499,16 @@ int i, res; for (i = 0; i < s->buffers; i++) { - struct v4l2_buffer buf; - - memset(&buf, 0, sizeof(struct v4l2_buffer)); - buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - buf.memory = V4L2_MEMORY_MMAP; - buf.index = i; + struct v4l2_buffer buf = { + .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, + .index = i, + .memory = V4L2_MEMORY_MMAP + }; res = ioctl(s->fd, VIDIOC_QBUF, &buf); if (res < 0) { - av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_QBUF): %s\n", strerror(errno)); + av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_QBUF): %s\n", + strerror(errno)); return AVERROR(errno); } @@ -422,7 +517,8 @@ type = V4L2_BUF_TYPE_VIDEO_CAPTURE; res = ioctl(s->fd, VIDIOC_STREAMON, &type); if (res < 0) { - av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_STREAMON): %s\n", strerror(errno)); + av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_STREAMON): %s\n", + strerror(errno)); return AVERROR(errno); } @@ -450,28 +546,23 @@ static int v4l2_set_parameters(AVFormatContext *s1, AVFormatParameters *ap) { struct video_data *s = s1->priv_data; - struct v4l2_input input; - struct v4l2_standard standard; + struct v4l2_input input = { 0 }; + struct v4l2_standard standard = { 0 }; struct v4l2_streamparm streamparm = { 0 }; struct v4l2_fract *tpf = &streamparm.parm.capture.timeperframe; + AVRational framerate_q = { 0 }; int i, ret; - AVRational fps; streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - if (s->framerate && (ret = av_parse_video_rate(&fps, s->framerate)) < 0) { - av_log(s1, AV_LOG_ERROR, "Couldn't parse framerate.\n"); + if (s->framerate && + (ret = av_parse_video_rate(&framerate_q, s->framerate)) < 0) { + av_log(s1, AV_LOG_ERROR, "Could not parse framerate '%s'.\n", + s->framerate); return ret; } -#if FF_API_FORMAT_PARAMETERS - if (ap->channel > 0) - s->channel = ap->channel; - if (ap->time_base.num) - fps = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif /* set tv video input */ - memset (&input, 0, sizeof (input)); input.index = s->channel; if (ioctl(s->fd, VIDIOC_ENUMINPUT, &input) < 0) { av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl enum input failed:\n"); @@ -481,74 +572,76 @@ av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set input_id: %d, input: %s\n", s->channel, input.name); if (ioctl(s->fd, VIDIOC_S_INPUT, &input.index) < 0) { - av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set input(%d) failed\n", + av_log(s1, AV_LOG_ERROR, + "The V4L2 driver ioctl set input(%d) failed\n", s->channel); return AVERROR(EIO); } -#if FF_API_FORMAT_PARAMETERS - if (ap->standard) { - av_freep(&s->standard); - s->standard = av_strdup(ap->standard); - } -#endif - if (s->standard) { av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s\n", s->standard); /* set tv standard */ - memset (&standard, 0, sizeof (standard)); for(i=0;;i++) { standard.index = i; if (ioctl(s->fd, VIDIOC_ENUMSTD, &standard) < 0) { - av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set standard(%s) failed\n", + av_log(s1, AV_LOG_ERROR, + "The V4L2 driver ioctl set standard(%s) failed\n", s->standard); return AVERROR(EIO); } - if (!strcasecmp(standard.name, s->standard)) { + if (!av_strcasecmp(standard.name, s->standard)) { break; } } - av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s, id: %"PRIu64"\n", + av_log(s1, AV_LOG_DEBUG, + "The V4L2 driver set standard: %s, id: %"PRIu64"\n", s->standard, (uint64_t)standard.id); if (ioctl(s->fd, VIDIOC_S_STD, &standard.id) < 0) { - av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set standard(%s) failed\n", + av_log(s1, AV_LOG_ERROR, + "The V4L2 driver ioctl set standard(%s) failed\n", s->standard); return AVERROR(EIO); } } - if (fps.num && fps.den) { + if (framerate_q.num && framerate_q.den) { av_log(s1, AV_LOG_DEBUG, "Setting time per frame to %d/%d\n", - fps.den, fps.num); - tpf->numerator = fps.den; - tpf->denominator = fps.num; + framerate_q.den, framerate_q.num); + tpf->numerator = framerate_q.den; + tpf->denominator = framerate_q.num; + if (ioctl(s->fd, VIDIOC_S_PARM, &streamparm) != 0) { av_log(s1, AV_LOG_ERROR, "ioctl set time per frame(%d/%d) failed\n", - fps.den, fps.num); + framerate_q.den, framerate_q.num); return AVERROR(EIO); } - if (fps.num != tpf->denominator || - fps.den != tpf->numerator) { + if (framerate_q.num != tpf->denominator || + framerate_q.den != tpf->numerator) { av_log(s1, AV_LOG_INFO, - "The driver changed the time per frame from %d/%d to %d/%d\n", - fps.den, fps.num, + "The driver changed the time per frame from " + "%d/%d to %d/%d\n", + framerate_q.den, framerate_q.num, tpf->numerator, tpf->denominator); } } else { - /* if timebase value is not set, read the timebase value from the driver */ if (ioctl(s->fd, VIDIOC_G_PARM, &streamparm) != 0) { - av_log(s1, AV_LOG_ERROR, "ioctl(VIDIOC_G_PARM): %s\n", strerror(errno)); + av_log(s1, AV_LOG_ERROR, "ioctl(VIDIOC_G_PARM): %s\n", + strerror(errno)); return AVERROR(errno); } } s1->streams[0]->codec->time_base.den = tpf->denominator; s1->streams[0]->codec->time_base.num = tpf->numerator; + s->timeout = 100 + + av_rescale_q(1, s1->streams[0]->codec->time_base, + (AVRational){1, 1000}); + return 0; } @@ -576,6 +669,7 @@ } } } + if (desired_format != 0) { *codec_id = fmt_v4l2codec(desired_format); assert(*codec_id != CODEC_ID_NONE); @@ -589,59 +683,75 @@ struct video_data *s = s1->priv_data; AVStream *st; int res = 0; - uint32_t desired_format, capabilities; + uint32_t desired_format; enum CodecID codec_id; enum PixelFormat pix_fmt = PIX_FMT_NONE; - st = av_new_stream(s1, 0); + st = avformat_new_stream(s1, NULL); if (!st) { res = AVERROR(ENOMEM); goto out; } - av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ - if (s->video_size && (res = av_parse_video_size(&s->width, &s->height, s->video_size)) < 0) { - av_log(s1, AV_LOG_ERROR, "Couldn't parse video size.\n"); + s->fd = device_open(s1); + if (s->fd < 0) { + res = s->fd; goto out; } - if (s->pixel_format && (pix_fmt = av_get_pix_fmt(s->pixel_format)) == PIX_FMT_NONE) { - av_log(s1, AV_LOG_ERROR, "No such pixel format: %s.\n", s->pixel_format); - res = AVERROR(EINVAL); + + if (s->list_format) { + list_formats(s1, s->fd, s->list_format); + res = AVERROR_EXIT; goto out; } -#if FF_API_FORMAT_PARAMETERS - if (ap->width > 0) - s->width = ap->width; - if (ap->height > 0) - s->height = ap->height; - if (ap->pix_fmt) - pix_fmt = ap->pix_fmt; -#endif - capabilities = 0; - s->fd = device_open(s1, &capabilities); - if (s->fd < 0) { - res = AVERROR(EIO); + avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ + + if (s->video_size && + (res = av_parse_video_size(&s->width, &s->height, s->video_size)) < 0) { + av_log(s1, AV_LOG_ERROR, "Could not parse video size '%s'.\n", + s->video_size); goto out; } - av_log(s1, AV_LOG_VERBOSE, "[%d]Capabilities: %x\n", s->fd, capabilities); + + if (s->pixel_format) { + AVCodec *codec = avcodec_find_decoder_by_name(s->pixel_format); + + if (codec) + s1->video_codec_id = codec->id; + + pix_fmt = av_get_pix_fmt(s->pixel_format); + + if (pix_fmt == PIX_FMT_NONE && !codec) { + av_log(s1, AV_LOG_ERROR, "No such input format: %s.\n", + s->pixel_format); + + res = AVERROR(EINVAL); + goto out; + } + } if (!s->width && !s->height) { struct v4l2_format fmt; - av_log(s1, AV_LOG_VERBOSE, "Querying the device for the current frame size\n"); + av_log(s1, AV_LOG_VERBOSE, + "Querying the device for the current frame size\n"); fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (ioctl(s->fd, VIDIOC_G_FMT, &fmt) < 0) { - av_log(s1, AV_LOG_ERROR, "ioctl(VIDIOC_G_FMT): %s\n", strerror(errno)); + av_log(s1, AV_LOG_ERROR, "ioctl(VIDIOC_G_FMT): %s\n", + strerror(errno)); res = AVERROR(errno); goto out; } + s->width = fmt.fmt.pix.width; s->height = fmt.fmt.pix.height; - av_log(s1, AV_LOG_VERBOSE, "Setting frame size to %dx%d\n", s->width, s->height); + av_log(s1, AV_LOG_VERBOSE, + "Setting frame size to %dx%d\n", s->width, s->height); } - desired_format = device_try_init(s1, pix_fmt, &s->width, &s->height, &codec_id); + desired_format = device_try_init(s1, pix_fmt, &s->width, &s->height, + &codec_id); if (desired_format == 0) { av_log(s1, AV_LOG_ERROR, "Cannot find a proper format for " "codec_id %d, pix_fmt %d.\n", s1->video_codec_id, pix_fmt); @@ -650,35 +760,32 @@ res = AVERROR(EIO); goto out; } + if ((res = av_image_check_size(s->width, s->height, 0, s1) < 0)) goto out; + s->frame_format = desired_format; if ((res = v4l2_set_parameters(s1, ap) < 0)) goto out; st->codec->pix_fmt = fmt_v4l2ff(desired_format, codec_id); - s->frame_size = avpicture_get_size(st->codec->pix_fmt, s->width, s->height); - if (capabilities & V4L2_CAP_STREAMING) { - s->io_method = io_mmap; - res = mmap_init(s1); - if (res == 0) { - res = mmap_start(s1); - } - } else { - s->io_method = io_read; - res = read_init(s1); - } - if (res < 0) { - close(s->fd); + s->frame_size = + avpicture_get_size(st->codec->pix_fmt, s->width, s->height); - res = AVERROR(EIO); + if ((res = mmap_init(s1)) || + (res = mmap_start(s1)) < 0) { + close(s->fd); goto out; } + s->top_field_first = first_field(s->fd); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = codec_id; + if (codec_id == CODEC_ID_RAWVIDEO) + st->codec->codec_tag = + avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt); st->codec->width = s->width; st->codec->height = s->height; st->codec->bit_rate = s->frame_size * 1/av_q2d(st->codec->time_base) * 8; @@ -690,26 +797,17 @@ static int v4l2_read_packet(AVFormatContext *s1, AVPacket *pkt) { struct video_data *s = s1->priv_data; + AVFrame *frame = s1->streams[0]->codec->coded_frame; int res; - if (s->io_method == io_mmap) { - av_init_packet(pkt); - res = mmap_read_frame(s1, pkt); - } else if (s->io_method == io_read) { - if (av_new_packet(pkt, s->frame_size) < 0) - return AVERROR(EIO); - - res = read_frame(s1, pkt); - } else { - return AVERROR(EIO); - } - if (res < 0) { + av_init_packet(pkt); + if ((res = mmap_read_frame(s1, pkt)) < 0) { return res; } - if (s1->streams[0]->codec->coded_frame) { - s1->streams[0]->codec->coded_frame->interlaced_frame = 1; - s1->streams[0]->codec->coded_frame->top_field_first = s->top_field_first; + if (frame && s->interlaced) { + frame->interlaced_frame = 1; + frame->top_field_first = s->top_field_first; } return pkt->size; @@ -719,9 +817,7 @@ { struct video_data *s = s1->priv_data; - if (s->io_method == io_mmap) { - mmap_close(s); - } + mmap_close(s); close(s->fd); return 0; @@ -730,11 +826,16 @@ #define OFFSET(x) offsetof(struct video_data, x) #define DEC AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { - { "standard", "", offsetof(struct video_data, standard), FF_OPT_TYPE_STRING, {.str = NULL }, 0, 0, AV_OPT_FLAG_DECODING_PARAM }, - { "channel", "", offsetof(struct video_data, channel), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, - { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, - { "pixel_format", "", OFFSET(pixel_format), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, - { "framerate", "", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "standard", "TV standard, used only by analog frame grabber", OFFSET(standard), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC }, + { "channel", "TV channel, used only by frame grabber", OFFSET(channel), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, DEC }, + { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "pixel_format", "Preferred pixel format", OFFSET(pixel_format), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "input_format", "Preferred pixel format (for raw video) or codec name", OFFSET(pixel_format), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "list_formats", "List available formats and exit", OFFSET(list_format), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, DEC, "list_formats" }, + { "all", "Show all available formats", OFFSET(list_format), AV_OPT_TYPE_CONST, {.dbl = V4L_ALLFORMATS }, 0, INT_MAX, DEC, "list_formats" }, + { "raw", "Show only non-compressed formats", OFFSET(list_format), AV_OPT_TYPE_CONST, {.dbl = V4L_RAWFORMATS }, 0, INT_MAX, DEC, "list_formats" }, + { "compressed", "Show only compressed formats", OFFSET(list_format), AV_OPT_TYPE_CONST, {.dbl = V4L_COMPFORMATS }, 0, INT_MAX, DEC, "list_formats" }, { NULL }, }; @@ -746,13 +847,12 @@ }; AVInputFormat ff_v4l2_demuxer = { - "video4linux2", - NULL_IF_CONFIG_SMALL("Video4Linux2 device grab"), - sizeof(struct video_data), - NULL, - v4l2_read_header, - v4l2_read_packet, - v4l2_read_close, - .flags = AVFMT_NOFILE, - .priv_class = &v4l2_class, + .name = "video4linux2", + .long_name = NULL_IF_CONFIG_SMALL("Video4Linux2 device grab"), + .priv_data_size = sizeof(struct video_data), + .read_header = v4l2_read_header, + .read_packet = v4l2_read_packet, + .read_close = v4l2_read_close, + .flags = AVFMT_NOFILE, + .priv_class = &v4l2_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/v4l.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/v4l.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/v4l.c 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/v4l.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,6 +30,7 @@ #include "libavutil/log.h" #include "libavutil/opt.h" #include "libavformat/avformat.h" +#include "libavformat/internal.h" #include "libavcodec/dsputil.h" #include #include @@ -39,7 +40,6 @@ #define _LINUX_TIME_H 1 #include #include -#include typedef struct { AVClass *class; @@ -98,10 +98,10 @@ s->video_win.width = ap->width; s->video_win.height = ap->height; - st = av_new_stream(s1, 0); + st = avformat_new_stream(s1, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ + avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ video_fd = open(s1->filename, O_RDWR); if (video_fd < 0) { @@ -142,16 +142,6 @@ /* set tv standard */ if (!ioctl(video_fd, VIDIOCGTUNER, &tuner)) { -#if FF_API_FORMAT_PARAMETERS - if (ap->standard) { - if (!strcasecmp(ap->standard, "pal")) - s->standard = VIDEO_MODE_PAL; - else if (!strcasecmp(ap->standard, "secam")) - s->standard = VIDEO_MODE_SECAM; - else - s->standard = VIDEO_MODE_NTSC; - } -#endif tuner.mode = s->standard; ioctl(video_fd, VIDIOCSTUNER, &tuner); } @@ -349,10 +339,10 @@ } static const AVOption options[] = { - { "standard", "", offsetof(VideoData, standard), FF_OPT_TYPE_INT, {.dbl = VIDEO_MODE_NTSC}, VIDEO_MODE_PAL, VIDEO_MODE_NTSC, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "PAL", "", 0, FF_OPT_TYPE_CONST, {.dbl = VIDEO_MODE_PAL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "SECAM", "", 0, FF_OPT_TYPE_CONST, {.dbl = VIDEO_MODE_SECAM}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, - { "NTSC", "", 0, FF_OPT_TYPE_CONST, {.dbl = VIDEO_MODE_NTSC}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "standard", "", offsetof(VideoData, standard), AV_OPT_TYPE_INT, {.dbl = VIDEO_MODE_NTSC}, VIDEO_MODE_PAL, VIDEO_MODE_NTSC, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "PAL", "", 0, AV_OPT_TYPE_CONST, {.dbl = VIDEO_MODE_PAL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "SECAM", "", 0, AV_OPT_TYPE_CONST, {.dbl = VIDEO_MODE_SECAM}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "NTSC", "", 0, AV_OPT_TYPE_CONST, {.dbl = VIDEO_MODE_NTSC}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, { NULL }, }; @@ -364,14 +354,13 @@ }; AVInputFormat ff_v4l_demuxer = { - "video4linux", - NULL_IF_CONFIG_SMALL("Video4Linux device grab"), - sizeof(VideoData), - NULL, - grab_read_header, - grab_read_packet, - grab_read_close, - .flags = AVFMT_NOFILE, - .priv_class = &v4l_class, + .name = "video4linux", + .long_name = NULL_IF_CONFIG_SMALL("Video4Linux device grab"), + .priv_data_size = sizeof(VideoData), + .read_header = grab_read_header, + .read_packet = grab_read_packet, + .read_close = grab_read_close, + .flags = AVFMT_NOFILE, + .priv_class = &v4l_class, }; #endif /* FF_API_V4L */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/vfwcap.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/vfwcap.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/vfwcap.c 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/vfwcap.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ */ #include "libavformat/avformat.h" +#include "libavformat/internal.h" #include "libavutil/log.h" #include "libavutil/opt.h" #include "libavutil/parseutils.h" @@ -249,7 +250,7 @@ DWORD biCompression; WORD biBitCount; int ret; - AVRational fps; + AVRational framerate_q; if (!strcmp(s->filename, "list")) { for (devnum = 0; devnum <= 9; devnum++) { @@ -267,11 +268,6 @@ return AVERROR(EIO); } -#if FF_API_FORMAT_PARAMETERS - if (ap->time_base.num) - fps = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif - ctx->hwnd = capCreateCaptureWindow(NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, 0); if(!ctx->hwnd) { av_log(s, AV_LOG_ERROR, "Could not create capture window.\n"); @@ -300,7 +296,7 @@ SetWindowLongPtr(ctx->hwnd, GWLP_USERDATA, (LONG_PTR) s); - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if(!st) { vfw_read_close(s); return AVERROR(ENOMEM); @@ -329,12 +325,6 @@ goto fail_bi; } } -#if FF_API_FORMAT_PARAMETERS - if (ap->width > 0) - bi->bmiHeader.biWidth = ap->width; - if (ap->height > 0) - bi->bmiHeader.biHeight = ap->height; -#endif if (0) { /* For testing yet unsupported compressions @@ -369,7 +359,7 @@ cparms.fYield = 1; // Spawn a background thread cparms.dwRequestMicroSecPerFrame = - (fps.den*1000000) / fps.num; + (framerate_q.den*1000000) / framerate_q.num; cparms.fAbortLeftMouse = 0; cparms.fAbortRightMouse = 0; cparms.fCaptureAudio = 0; @@ -381,7 +371,7 @@ goto fail_io; codec = st->codec; - codec->time_base = (AVRational){fps.den, fps.num}; + codec->time_base = (AVRational){framerate_q.den, framerate_q.num}; codec->codec_type = AVMEDIA_TYPE_VIDEO; codec->width = bi->bmiHeader.biWidth; codec->height = bi->bmiHeader.biHeight; @@ -407,7 +397,7 @@ } } - av_set_pts_info(st, 32, 1, 1000); + avpriv_set_pts_info(st, 32, 1, 1000); ctx->mutex = CreateMutex(NULL, 0, NULL); if(!ctx->mutex) { @@ -468,8 +458,8 @@ #define OFFSET(x) offsetof(struct vfw_ctx, x) #define DEC AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { - { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, - { "framerate", "", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = "ntsc"}, 0, 0, DEC }, + { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "ntsc"}, 0, 0, DEC }, { NULL }, }; @@ -481,13 +471,12 @@ }; AVInputFormat ff_vfwcap_demuxer = { - "vfwcap", - NULL_IF_CONFIG_SMALL("VFW video capture"), - sizeof(struct vfw_ctx), - NULL, - vfw_read_header, - vfw_read_packet, - vfw_read_close, - .flags = AVFMT_NOFILE, - .priv_class = &vfw_class, + .name = "vfwcap", + .long_name = NULL_IF_CONFIG_SMALL("VfW video capture"), + .priv_data_size = sizeof(struct vfw_ctx), + .read_header = vfw_read_header, + .read_packet = vfw_read_packet, + .read_close = vfw_read_close, + .flags = AVFMT_NOFILE, + .priv_class = &vfw_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/x11grab.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/x11grab.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavdevice/x11grab.c 2011-06-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavdevice/x11grab.c 2012-01-11 00:34:30.000000000 +0000 @@ -31,12 +31,14 @@ /** * @file - * X11 frame device demuxer by Clemens Fruhwirth - * and Edouard Gomez . + * X11 frame device demuxer + * @author Clemens Fruhwirth + * @author Edouard Gomez */ #include "config.h" #include "libavformat/avformat.h" +#include "libavformat/internal.h" #include "libavutil/log.h" #include "libavutil/opt.h" #include "libavutil/parseutils.h" @@ -47,6 +49,7 @@ #include #include #include +#include #include #include @@ -70,10 +73,75 @@ XImage *image; /**< X11 image holding the grab */ int use_shm; /**< !0 when using XShm extension */ XShmSegmentInfo shminfo; /**< When using XShm, keeps track of XShm infos */ - int nomouse; + int draw_mouse; /**< Set by a private option. */ + int follow_mouse; /**< Set by a private option. */ + int show_region; /**< set by a private option. */ char *framerate; /**< Set by a private option. */ + + Window region_win; /**< This is used by show_region option. */ }; +#define REGION_WIN_BORDER 3 +/** + * Draw grabbing region window + * + * @param s x11_grab context + */ +static void +x11grab_draw_region_win(struct x11_grab *s) +{ + Display *dpy = s->dpy; + int screen; + Window win = s->region_win; + GC gc; + + screen = DefaultScreen(dpy); + gc = XCreateGC(dpy, win, 0, 0); + XSetForeground(dpy, gc, WhitePixel(dpy, screen)); + XSetBackground(dpy, gc, BlackPixel(dpy, screen)); + XSetLineAttributes(dpy, gc, REGION_WIN_BORDER, LineDoubleDash, 0, 0); + XDrawRectangle(dpy, win, gc, + 1, 1, + (s->width + REGION_WIN_BORDER * 2) - 1 * 2 - 1, + (s->height + REGION_WIN_BORDER * 2) - 1 * 2 - 1); + XFreeGC(dpy, gc); +} + +/** + * Initialize grabbing region window + * + * @param s x11_grab context + */ +static void +x11grab_region_win_init(struct x11_grab *s) +{ + Display *dpy = s->dpy; + int screen; + XSetWindowAttributes attribs; + XRectangle rect; + + screen = DefaultScreen(dpy); + attribs.override_redirect = True; + s->region_win = XCreateWindow(dpy, RootWindow(dpy, screen), + s->x_off - REGION_WIN_BORDER, + s->y_off - REGION_WIN_BORDER, + s->width + REGION_WIN_BORDER * 2, + s->height + REGION_WIN_BORDER * 2, + 0, CopyFromParent, + InputOutput, CopyFromParent, + CWOverrideRedirect, &attribs); + rect.x = 0; + rect.y = 0; + rect.width = s->width; + rect.height = s->height; + XShapeCombineRectangles(dpy, s->region_win, + ShapeBounding, REGION_WIN_BORDER, REGION_WIN_BORDER, + &rect, 1, ShapeSubtract, 0); + XMapWindow(dpy, s->region_win); + XSelectInput(dpy, s->region_win, ExposureMask | StructureNotifyMask); + x11grab_draw_region_win(s); +} + /** * Initialize the x11 grab device demuxer (public device demuxer API). * @@ -95,6 +163,7 @@ XImage *image; int x_off = 0; int y_off = 0; + int screen; int use_shm; char *param, *offset; int ret = 0; @@ -104,7 +173,7 @@ offset = strchr(param, '+'); if (offset) { sscanf(offset, "%d,%d", &x_off, &y_off); - x11grab->nomouse= strstr(offset, "nomouse"); + x11grab->draw_mouse = !strstr(offset, "nomouse"); *offset= 0; } @@ -116,14 +185,6 @@ av_log(s1, AV_LOG_ERROR, "Could not parse framerate: %s.\n", x11grab->framerate); goto out; } -#if FF_API_FORMAT_PARAMETERS - if (ap->width > 0) - x11grab->width = ap->width; - if (ap->height > 0) - x11grab->height = ap->height; - if (ap->time_base.num) - framerate = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif av_log(s1, AV_LOG_INFO, "device: %s -> display: %s x: %d y: %d width: %d height: %d\n", s1->filename, param, x_off, y_off, x11grab->width, x11grab->height); @@ -134,12 +195,28 @@ goto out; } - st = av_new_stream(s1, 0); + st = avformat_new_stream(s1, NULL); if (!st) { ret = AVERROR(ENOMEM); goto out; } - av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ + avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ + + screen = DefaultScreen(dpy); + + if (x11grab->follow_mouse) { + int screen_w, screen_h; + Window w; + + screen_w = DisplayWidth(dpy, screen); + screen_h = DisplayHeight(dpy, screen); + XQueryPointer(dpy, RootWindow(dpy, screen), &w, &w, &x_off, &y_off, &ret, &ret, &ret); + x_off -= x11grab->width / 2; + y_off -= x11grab->height / 2; + x_off = FFMIN(FFMAX(x_off, 0), screen_w - x11grab->width); + y_off = FFMIN(FFMAX(y_off, 0), screen_h - x11grab->height); + av_log(s1, AV_LOG_INFO, "followmouse is enabled, resetting grabbing region to x: %d y: %d\n", x_off, y_off); + } use_shm = XShmQueryExtension(dpy); av_log(s1, AV_LOG_INFO, "shared memory extension %s found\n", use_shm ? "" : "not"); @@ -171,7 +248,7 @@ goto out; } } else { - image = XGetImage(dpy, RootWindow(dpy, DefaultScreen(dpy)), + image = XGetImage(dpy, RootWindow(dpy, screen), x_off,y_off, x11grab->width, x11grab->height, AllPlanes, ZPixmap); @@ -217,21 +294,6 @@ } break; case 32: -#if 0 - GetColorInfo (image, &c_info); - if ( c_info.alpha_mask == 0xff000000 && image->green_mask == 0x0000ff00) { - /* byte order is relevant here, not endianness - * endianness is handled by avcodec, but atm no such thing - * as having ABGR, instead of ARGB in a word. Since we - * need this for Solaris/SPARC, but need to do the conversion - * for every frame we do it outside of this loop, cf. below - * this matches both ARGB32 and ABGR32 */ - input_pixfmt = PIX_FMT_ARGB32; - } else { - av_log(s1, AV_LOG_ERROR,"image depth %i not supported ... aborting\n", image->bits_per_pixel); - return AVERROR(EIO); - } -#endif input_pixfmt = PIX_FMT_RGB32; break; default: @@ -389,6 +451,10 @@ int x_off = s->x_off; int y_off = s->y_off; + int screen; + Window root; + int follow_mouse = s->follow_mouse; + int64_t curtime, delay; struct timespec ts; @@ -415,17 +481,65 @@ pkt->size = s->frame_size; pkt->pts = curtime; + screen = DefaultScreen(dpy); + root = RootWindow(dpy, screen); + if (follow_mouse) { + int screen_w, screen_h; + int pointer_x, pointer_y, _; + Window w; + + screen_w = DisplayWidth(dpy, screen); + screen_h = DisplayHeight(dpy, screen); + XQueryPointer(dpy, root, &w, &w, &pointer_x, &pointer_y, &_, &_, &_); + if (follow_mouse == -1) { + // follow the mouse, put it at center of grabbing region + x_off += pointer_x - s->width / 2 - x_off; + y_off += pointer_y - s->height / 2 - y_off; + } else { + // follow the mouse, but only move the grabbing region when mouse + // reaches within certain pixels to the edge. + if (pointer_x > x_off + s->width - follow_mouse) { + x_off += pointer_x - (x_off + s->width - follow_mouse); + } else if (pointer_x < x_off + follow_mouse) + x_off -= (x_off + follow_mouse) - pointer_x; + if (pointer_y > y_off + s->height - follow_mouse) { + y_off += pointer_y - (y_off + s->height - follow_mouse); + } else if (pointer_y < y_off + follow_mouse) + y_off -= (y_off + follow_mouse) - pointer_y; + } + // adjust grabbing region position if it goes out of screen. + s->x_off = x_off = FFMIN(FFMAX(x_off, 0), screen_w - s->width); + s->y_off = y_off = FFMIN(FFMAX(y_off, 0), screen_h - s->height); + + if (s->show_region && s->region_win) + XMoveWindow(dpy, s->region_win, + s->x_off - REGION_WIN_BORDER, + s->y_off - REGION_WIN_BORDER); + } + + if (s->show_region) { + if (s->region_win) { + XEvent evt; + // clean up the events, and do the initinal draw or redraw. + for (evt.type = NoEventMask; XCheckMaskEvent(dpy, ExposureMask | StructureNotifyMask, &evt); ); + if (evt.type) + x11grab_draw_region_win(s); + } else { + x11grab_region_win_init(s); + } + } + if(s->use_shm) { - if (!XShmGetImage(dpy, RootWindow(dpy, DefaultScreen(dpy)), image, x_off, y_off, AllPlanes)) { + if (!XShmGetImage(dpy, root, image, x_off, y_off, AllPlanes)) { av_log (s1, AV_LOG_INFO, "XShmGetImage() failed\n"); } } else { - if (!xget_zpixmap(dpy, RootWindow(dpy, DefaultScreen(dpy)), image, x_off, y_off)) { + if (!xget_zpixmap(dpy, root, image, x_off, y_off)) { av_log (s1, AV_LOG_INFO, "XGetZPixmap() failed\n"); } } - if(!s->nomouse){ + if (s->draw_mouse) { paint_mouse_pointer(image, s); } @@ -456,6 +570,10 @@ x11grab->image = NULL; } + if (x11grab->region_win) { + XDestroyWindow(x11grab->dpy, x11grab->region_win); + } + /* Free X11 display */ XCloseDisplay(x11grab->dpy); return 0; @@ -464,8 +582,13 @@ #define OFFSET(x) offsetof(struct x11_grab, x) #define DEC AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { - { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = "vga"}, 0, 0, DEC }, - { "framerate", "", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = "ntsc"}, 0, 0, DEC }, + { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = "vga"}, 0, 0, DEC }, + { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "ntsc"}, 0, 0, DEC }, + { "draw_mouse", "Draw the mouse pointer.", OFFSET(draw_mouse), AV_OPT_TYPE_INT, { 1 }, 0, 1, DEC }, + { "follow_mouse", "Move the grabbing region when the mouse pointer reaches within specified amount of pixels to the edge of region.", + OFFSET(follow_mouse), AV_OPT_TYPE_INT, { 0 }, -1, INT_MAX, DEC, "follow_mouse" }, + { "centered", "Keep the mouse pointer at the center of grabbing region when following.", 0, AV_OPT_TYPE_CONST, { -1 }, INT_MIN, INT_MAX, DEC, "follow_mouse" }, + { "show_region", "Show the grabbing region.", OFFSET(show_region), AV_OPT_TYPE_INT, { 0 }, 0, 1, DEC }, { NULL }, }; @@ -477,15 +600,13 @@ }; /** x11 grabber device demuxer declaration */ -AVInputFormat ff_x11_grab_device_demuxer = -{ - "x11grab", - NULL_IF_CONFIG_SMALL("X11grab"), - sizeof(struct x11_grab), - NULL, - x11grab_read_header, - x11grab_read_packet, - x11grab_read_close, - .flags = AVFMT_NOFILE, - .priv_class = &x11_class, +AVInputFormat ff_x11_grab_device_demuxer = { + .name = "x11grab", + .long_name = NULL_IF_CONFIG_SMALL("X11grab"), + .priv_data_size = sizeof(struct x11_grab), + .read_header = x11grab_read_header, + .read_packet = x11grab_read_packet, + .read_close = x11grab_read_close, + .flags = AVFMT_NOFILE, + .priv_class = &x11_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/allfilters.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/allfilters.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/allfilters.c 2011-05-09 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/allfilters.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,9 +41,11 @@ REGISTER_FILTER (ANULLSINK, anullsink, asink); REGISTER_FILTER (BLACKFRAME, blackframe, vf); + REGISTER_FILTER (BOXBLUR, boxblur, vf); REGISTER_FILTER (COPY, copy, vf); REGISTER_FILTER (CROP, crop, vf); REGISTER_FILTER (CROPDETECT, cropdetect, vf); + REGISTER_FILTER (DELOGO, delogo, vf); REGISTER_FILTER (DRAWBOX, drawbox, vf); REGISTER_FILTER (DRAWTEXT, drawtext, vf); REGISTER_FILTER (FADE, fade, vf); @@ -54,6 +56,10 @@ REGISTER_FILTER (GRADFUN, gradfun, vf); REGISTER_FILTER (HFLIP, hflip, vf); REGISTER_FILTER (HQDN3D, hqdn3d, vf); + REGISTER_FILTER (LUT, lut, vf); + REGISTER_FILTER (LUTRGB, lutrgb, vf); + REGISTER_FILTER (LUTYUV, lutyuv, vf); + REGISTER_FILTER (NEGATE, negate, vf); REGISTER_FILTER (NOFORMAT, noformat, vf); REGISTER_FILTER (NULL, null, vf); REGISTER_FILTER (OCV, ocv, vf); @@ -61,21 +67,31 @@ REGISTER_FILTER (PAD, pad, vf); REGISTER_FILTER (PIXDESCTEST, pixdesctest, vf); REGISTER_FILTER (SCALE, scale, vf); + REGISTER_FILTER (SELECT, select, vf); REGISTER_FILTER (SETDAR, setdar, vf); REGISTER_FILTER (SETPTS, setpts, vf); REGISTER_FILTER (SETSAR, setsar, vf); REGISTER_FILTER (SETTB, settb, vf); + REGISTER_FILTER (SHOWINFO, showinfo, vf); REGISTER_FILTER (SLICIFY, slicify, vf); + REGISTER_FILTER (SPLIT, split, vf); REGISTER_FILTER (TRANSPOSE, transpose, vf); REGISTER_FILTER (UNSHARP, unsharp, vf); REGISTER_FILTER (VFLIP, vflip, vf); REGISTER_FILTER (YADIF, yadif, vf); - REGISTER_FILTER (BUFFER, buffer, vsrc); REGISTER_FILTER (COLOR, color, vsrc); REGISTER_FILTER (FREI0R, frei0r_src, vsrc); REGISTER_FILTER (MOVIE, movie, vsrc); REGISTER_FILTER (NULLSRC, nullsrc, vsrc); + REGISTER_FILTER (RGBTESTSRC, rgbtestsrc, vsrc); + REGISTER_FILTER (TESTSRC, testsrc, vsrc); REGISTER_FILTER (NULLSINK, nullsink, vsink); + + /* vsrc_buffer is a part of public API => registered unconditionally */ + { + extern AVFilter avfilter_vsrc_buffer; + avfilter_register(&avfilter_vsrc_buffer); + } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/asrc_anullsrc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/asrc_anullsrc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/asrc_anullsrc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/asrc_anullsrc.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,7 +25,7 @@ #include "libavutil/audioconvert.h" typedef struct { - int64_t channel_layout; + uint64_t channel_layout; int64_t sample_rate; } ANullContext; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/avfilter.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/avfilter.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/avfilter.c 2011-05-31 02:05:07.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/avfilter.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,7 @@ #include "libavutil/rational.h" #include "libavutil/audioconvert.h" #include "libavutil/imgutils.h" +#include "libavcodec/avcodec.h" #include "avfilter.h" #include "internal.h" @@ -332,8 +333,8 @@ picref->type = AVMEDIA_TYPE_VIDEO; pic->format = picref->format = format; - memcpy(pic->data, data, sizeof(pic->data)); - memcpy(pic->linesize, linesize, sizeof(pic->linesize)); + memcpy(pic->data, data, 4*sizeof(data[0])); + memcpy(pic->linesize, linesize, 4*sizeof(linesize[0])); memcpy(picref->data, pic->data, sizeof(picref->data)); memcpy(picref->linesize, pic->linesize, sizeof(picref->linesize)); @@ -349,7 +350,7 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, enum AVSampleFormat sample_fmt, int size, - int64_t channel_layout, int planar) + uint64_t channel_layout, int planar) { AVFilterBufferRef *ret = NULL; @@ -681,3 +682,21 @@ return ret; } +int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src) +{ + if (dst->type != AVMEDIA_TYPE_VIDEO) + return AVERROR(EINVAL); + + dst->pts = src->pts; + dst->format = src->format; + + dst->video->w = src->width; + dst->video->h = src->height; + dst->video->pixel_aspect = src->sample_aspect_ratio; + dst->video->interlaced = src->interlaced_frame; + dst->video->top_field_first = src->top_field_first; + dst->video->key_frame = src->key_frame; + dst->video->pict_type = src->pict_type; + + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/avfiltergraph.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/avfiltergraph.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/avfiltergraph.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/avfiltergraph.c 2012-01-11 00:34:30.000000000 +0000 @@ -90,7 +90,7 @@ av_log(log_ctx, AV_LOG_ERROR, "Input pad \"%s\" for the filter \"%s\" of type \"%s\" not connected to any source\n", filt->input_pads[j].name, filt->name, filt->filter->name); - return -1; + return AVERROR(EINVAL); } } @@ -99,7 +99,7 @@ av_log(log_ctx, AV_LOG_ERROR, "Output pad \"%s\" for the filter \"%s\" of type \"%s\" not connected to any destination\n", filt->output_pads[j].name, filt->name, filt->filter->name); - return -1; + return AVERROR(EINVAL); } } } @@ -178,7 +178,7 @@ av_log(log_ctx, AV_LOG_ERROR, "Impossible to convert between the formats supported by the filter " "'%s' and the filter '%s'\n", link->src->name, link->dst->name); - return -1; + return AVERROR(EINVAL); } } } @@ -216,9 +216,11 @@ int ff_avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx) { + int ret; + /* find supported formats from sub-filters, and merge along links */ - if (query_formats(graph, log_ctx)) - return -1; + if ((ret = query_formats(graph, log_ctx)) < 0) + return ret; /* Once everything is merged, it's possible that we'll still have * multiple valid media format choices. We pick the first one. */ @@ -227,7 +229,7 @@ return 0; } -int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx) +int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx) { int ret; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/avfiltergraph.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/avfiltergraph.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/avfiltergraph.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/avfiltergraph.h 2012-01-11 00:34:30.000000000 +0000 @@ -76,7 +76,7 @@ * @param log_ctx context used for logging * @return 0 in case of success, a negative AVERROR code otherwise */ -int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx); +int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx); /** * Free a graph, destroy its links, and set *graph to NULL. @@ -118,6 +118,6 @@ */ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, AVFilterInOut *inputs, AVFilterInOut *outputs, - AVClass *log_ctx); + void *log_ctx); #endif /* AVFILTER_AVFILTERGRAPH_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/avfilter.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/avfilter.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/avfilter.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/avfilter.h 2012-01-11 00:34:30.000000000 +0000 @@ -23,10 +23,14 @@ #define AVFILTER_AVFILTER_H #include "libavutil/avutil.h" +#include "libavutil/log.h" #include "libavutil/samplefmt.h" +#include "libavutil/pixfmt.h" +#include "libavutil/rational.h" +#include "libavcodec/avcodec.h" #define LIBAVFILTER_VERSION_MAJOR 2 -#define LIBAVFILTER_VERSION_MINOR 4 +#define LIBAVFILTER_VERSION_MINOR 14 #define LIBAVFILTER_VERSION_MICRO 0 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ @@ -97,7 +101,7 @@ * per reference properties must be separated out. */ typedef struct AVFilterBufferRefAudioProps { - int64_t channel_layout; ///< channel layout of audio buffer + uint64_t channel_layout; ///< channel layout of audio buffer int nb_samples; ///< number of audio samples int size; ///< audio buffer size uint32_t sample_rate; ///< audio buffer sample rate @@ -160,6 +164,7 @@ switch (src->type) { case AVMEDIA_TYPE_VIDEO: *dst->video = *src->video; break; case AVMEDIA_TYPE_AUDIO: *dst->audio = *src->audio; break; + default: break; } } @@ -373,7 +378,7 @@ */ AVFilterBufferRef *(*get_audio_buffer)(AVFilterLink *link, int perms, enum AVSampleFormat sample_fmt, int size, - int64_t channel_layout, int planar); + uint64_t channel_layout, int planar); /** * Callback called after the slices of a frame are completely sent. If @@ -462,7 +467,7 @@ /** default handler for get_audio_buffer() for audio inputs */ AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int perms, enum AVSampleFormat sample_fmt, int size, - int64_t channel_layout, int planar); + uint64_t channel_layout, int planar); /** * A helper for query_formats() which sets all links to the same list of @@ -493,7 +498,7 @@ /** get_audio_buffer() handler for filters which simply pass audio along */ AVFilterBufferRef *avfilter_null_get_audio_buffer(AVFilterLink *link, int perms, enum AVSampleFormat sample_fmt, int size, - int64_t channel_layout, int planar); + uint64_t channel_layout, int planar); /** * Filter definition. This defines the pads a filter contains, and all the @@ -586,7 +591,7 @@ int h; ///< agreed upon image height AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio /* These two parameters apply only to audio */ - int64_t channel_layout; ///< channel layout of current buffer (see libavutil/audioconvert.h) + uint64_t channel_layout; ///< channel layout of current buffer (see libavutil/audioconvert.h) int64_t sample_rate; ///< samples per second int format; ///< agreed upon media format @@ -685,7 +690,7 @@ */ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, enum AVSampleFormat sample_fmt, int size, - int64_t channel_layout, int planar); + uint64_t channel_layout, int planar); /** * Request an input frame from the filter at the other end of the link. @@ -705,7 +710,7 @@ int avfilter_poll_frame(AVFilterLink *link); /** - * Notifie the next filter of the start of a frame. + * Notify the next filter of the start of a frame. * * @param link the output link the frame will be sent over * @param picref A reference to the frame about to be sent. The data for this @@ -859,4 +864,12 @@ &f->output_pads, &f->outputs, p); } +/** + * Copy the frame properties of src to dst, without copying the actual + * image data. + * + * @return 0 on success, a negative number on error. + */ +int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src); + #endif /* AVFILTER_AVFILTER_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/buffersrc.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/buffersrc.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/buffersrc.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/buffersrc.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,38 @@ +/* + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_BUFFERSRC_H +#define AVFILTER_BUFFERSRC_H + +/** + * @file + * Memory buffer source API. + */ + +#include "avfilter.h" + +/** + * Add a buffer to the filtergraph s. + * + * @param buf buffer containing frame data to be passed down the filtergraph. + * This function will take ownership of buf, the user must not free it. + */ +int av_buffersrc_buffer(AVFilterContext *s, AVFilterBufferRef *buf); + +#endif /* AVFILTER_BUFFERSRC_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/defaults.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/defaults.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/defaults.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/defaults.c 2012-01-11 00:34:30.000000000 +0000 @@ -57,7 +57,7 @@ AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int perms, enum AVSampleFormat sample_fmt, int size, - int64_t channel_layout, int planar) + uint64_t channel_layout, int planar) { AVFilterBuffer *samples = av_mallocz(sizeof(AVFilterBuffer)); AVFilterBufferRef *ref = NULL; @@ -292,7 +292,7 @@ AVFilterBufferRef *avfilter_null_get_audio_buffer(AVFilterLink *link, int perms, enum AVSampleFormat sample_fmt, int size, - int64_t channel_layout, int packed) + uint64_t channel_layout, int packed) { return avfilter_get_audio_buffer(link->dst->outputs[0], perms, sample_fmt, size, channel_layout, packed); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/formats.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/formats.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/formats.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/formats.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ #include "libavutil/pixdesc.h" #include "avfilter.h" +#include "internal.h" /** * Add all refs from a to ret and destroy a. @@ -42,19 +43,21 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b) { AVFilterFormats *ret; - unsigned i, j, k = 0; + unsigned i, j, k = 0, m_count; ret = av_mallocz(sizeof(AVFilterFormats)); /* merge list of formats */ - ret->formats = av_malloc(sizeof(*ret->formats) * FFMIN(a->format_count, - b->format_count)); - for(i = 0; i < a->format_count; i ++) - for(j = 0; j < b->format_count; j ++) - if(a->formats[i] == b->formats[j]) - ret->formats[k++] = a->formats[i]; + m_count = FFMIN(a->format_count, b->format_count); + if (m_count) { + ret->formats = av_malloc(sizeof(*ret->formats) * m_count); + for(i = 0; i < a->format_count; i ++) + for(j = 0; j < b->format_count; j ++) + if(a->formats[i] == b->formats[j]) + ret->formats[k++] = a->formats[i]; - ret->format_count = k; + ret->format_count = k; + } /* check that there was at least one common format */ if(!ret->format_count) { av_free(ret->formats); @@ -70,6 +73,17 @@ return ret; } +int ff_fmt_is_in(int fmt, const int *fmts) +{ + const int *p; + + for (p = fmts; *p != PIX_FMT_NONE; p++) { + if (fmt == *p) + return 1; + } + return 0; +} + AVFilterFormats *avfilter_make_format_list(const int *fmts) { AVFilterFormats *formats; @@ -79,7 +93,8 @@ ; formats = av_mallocz(sizeof(AVFilterFormats)); - formats->formats = av_malloc(sizeof(*formats->formats) * count); + if (count) + formats->formats = av_malloc(sizeof(*formats->formats) * count); formats->format_count = count; memcpy(formats->formats, fmts, sizeof(*formats->formats) * count); @@ -94,7 +109,7 @@ return AVERROR(ENOMEM); fmts = av_realloc((*avff)->formats, - sizeof((*avff)->formats) * ((*avff)->format_count+1)); + sizeof(*(*avff)->formats) * ((*avff)->format_count+1)); if (!fmts) return AVERROR(ENOMEM); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/graphparser.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/graphparser.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/graphparser.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/graphparser.c 2012-01-11 00:34:30.000000000 +0000 @@ -36,7 +36,7 @@ */ static int link_filter(AVFilterContext *src, int srcpad, AVFilterContext *dst, int dstpad, - AVClass *log_ctx) + void *log_ctx) { int ret; if ((ret = avfilter_link(src, srcpad, dst, dstpad))) { @@ -55,7 +55,7 @@ * @return a pointer (that need to be freed after use) to the name * between parenthesis */ -static char *parse_link_name(const char **buf, AVClass *log_ctx) +static char *parse_link_name(const char **buf, void *log_ctx) { const char *start = *buf; char *name; @@ -83,8 +83,8 @@ * Create an instance of a filter, initialize and insert it in the * filtergraph in *ctx. * + * @param filt_ctx put here a filter context in case of successful creation and configuration, NULL otherwise. * @param ctx the filtergraph context - * @param put here a filter context in case of successful creation and configuration, NULL otherwise. * @param index an index which is supposed to be unique for each filter instance added to the filtergraph * @param filt_name the name of the filter to create * @param args the arguments provided to the filter during its initialization @@ -92,7 +92,7 @@ * @return 0 in case of success, a negative AVERROR code otherwise */ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int index, - const char *filt_name, const char *args, AVClass *log_ctx) + const char *filt_name, const char *args, void *log_ctx) { AVFilter *filt; char inst_name[30]; @@ -141,6 +141,8 @@ * corresponding filter instance which is added to graph with * create_filter(). * + * @param filt_ctx Pointer that is set to the created and configured filter + * context on success, set to NULL on failure. * @param filt_ctx put here a pointer to the created filter context on * success, NULL otherwise * @param buf pointer to the buffer to parse, *buf will be updated to @@ -151,7 +153,7 @@ * @return 0 in case of success, a negative AVERROR code otherwise */ static int parse_filter(AVFilterContext **filt_ctx, const char **buf, AVFilterGraph *graph, - int index, AVClass *log_ctx) + int index, void *log_ctx) { char *opts = NULL; char *name = av_get_token(buf, "=,;[\n"); @@ -201,7 +203,7 @@ static int link_filter_inouts(AVFilterContext *filt_ctx, AVFilterInOut **curr_inputs, - AVFilterInOut **open_inputs, AVClass *log_ctx) + AVFilterInOut **open_inputs, void *log_ctx) { int pad = filt_ctx->input_count, ret; @@ -249,7 +251,7 @@ } static int parse_inputs(const char **buf, AVFilterInOut **curr_inputs, - AVFilterInOut **open_outputs, AVClass *log_ctx) + AVFilterInOut **open_outputs, void *log_ctx) { int pad = 0; @@ -284,7 +286,7 @@ static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs, AVFilterInOut **open_inputs, - AVFilterInOut **open_outputs, AVClass *log_ctx) + AVFilterInOut **open_outputs, void *log_ctx) { int ret, pad = 0; @@ -329,7 +331,7 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, AVFilterInOut *open_inputs, - AVFilterInOut *open_outputs, AVClass *log_ctx) + AVFilterInOut *open_outputs, void *log_ctx) { int index = 0, ret; char chr = 0; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/internal.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/internal.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/internal.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/internal.h 2012-01-11 00:34:30.000000000 +0000 @@ -52,4 +52,7 @@ /** default handler for freeing audio/video buffer when there are no references left */ void ff_avfilter_default_free_buffer(AVFilterBuffer *buf); +/** Tell is a format is contained in the provided list terminated by -1. */ +int ff_fmt_is_in(int fmt, const int *fmts); + #endif /* AVFILTER_INTERNAL_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/Makefile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/Makefile 2011-05-09 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/Makefile 2012-01-11 00:34:30.000000000 +0000 @@ -1,11 +1,9 @@ -include $(SUBDIR)../config.mak - NAME = avfilter FFLIBS = avutil FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat avcodec FFLIBS-$(CONFIG_SCALE_FILTER) += swscale -HEADERS = avfilter.h avfiltergraph.h +HEADERS = avfilter.h avfiltergraph.h buffersrc.h vsrc_buffer.h OBJS = allfilters.o \ avfilter.o \ @@ -14,6 +12,7 @@ drawutils.o \ formats.o \ graphparser.o \ + vsrc_buffer.o OBJS-$(CONFIG_ANULL_FILTER) += af_anull.o @@ -22,9 +21,11 @@ OBJS-$(CONFIG_ANULLSINK_FILTER) += asink_anullsink.o OBJS-$(CONFIG_BLACKFRAME_FILTER) += vf_blackframe.o +OBJS-$(CONFIG_BOXBLUR_FILTER) += vf_boxblur.o OBJS-$(CONFIG_COPY_FILTER) += vf_copy.o OBJS-$(CONFIG_CROP_FILTER) += vf_crop.o OBJS-$(CONFIG_CROPDETECT_FILTER) += vf_cropdetect.o +OBJS-$(CONFIG_DELOGO_FILTER) += vf_delogo.o OBJS-$(CONFIG_DRAWBOX_FILTER) += vf_drawbox.o OBJS-$(CONFIG_DRAWTEXT_FILTER) += vf_drawtext.o OBJS-$(CONFIG_FADE_FILTER) += vf_fade.o @@ -35,6 +36,10 @@ OBJS-$(CONFIG_GRADFUN_FILTER) += vf_gradfun.o OBJS-$(CONFIG_HFLIP_FILTER) += vf_hflip.o OBJS-$(CONFIG_HQDN3D_FILTER) += vf_hqdn3d.o +OBJS-$(CONFIG_LUT_FILTER) += vf_lut.o +OBJS-$(CONFIG_LUTRGB_FILTER) += vf_lut.o +OBJS-$(CONFIG_LUTYUV_FILTER) += vf_lut.o +OBJS-$(CONFIG_NEGATE_FILTER) += vf_lut.o OBJS-$(CONFIG_NOFORMAT_FILTER) += vf_format.o OBJS-$(CONFIG_NULL_FILTER) += vf_null.o OBJS-$(CONFIG_OCV_FILTER) += vf_libopencv.o @@ -42,26 +47,30 @@ OBJS-$(CONFIG_PAD_FILTER) += vf_pad.o OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o OBJS-$(CONFIG_SCALE_FILTER) += vf_scale.o +OBJS-$(CONFIG_SELECT_FILTER) += vf_select.o OBJS-$(CONFIG_SETDAR_FILTER) += vf_aspect.o OBJS-$(CONFIG_SETPTS_FILTER) += vf_setpts.o OBJS-$(CONFIG_SETSAR_FILTER) += vf_aspect.o OBJS-$(CONFIG_SETTB_FILTER) += vf_settb.o +OBJS-$(CONFIG_SHOWINFO_FILTER) += vf_showinfo.o OBJS-$(CONFIG_SLICIFY_FILTER) += vf_slicify.o +OBJS-$(CONFIG_SPLIT_FILTER) += vf_split.o OBJS-$(CONFIG_TRANSPOSE_FILTER) += vf_transpose.o OBJS-$(CONFIG_UNSHARP_FILTER) += vf_unsharp.o OBJS-$(CONFIG_VFLIP_FILTER) += vf_vflip.o OBJS-$(CONFIG_YADIF_FILTER) += vf_yadif.o -OBJS-$(CONFIG_BUFFER_FILTER) += vsrc_buffer.o OBJS-$(CONFIG_COLOR_FILTER) += vsrc_color.o OBJS-$(CONFIG_FREI0R_SRC_FILTER) += vf_frei0r.o OBJS-$(CONFIG_MOVIE_FILTER) += vsrc_movie.o OBJS-$(CONFIG_NULLSRC_FILTER) += vsrc_nullsrc.o +OBJS-$(CONFIG_RGBTESTSRC_FILTER) += vsrc_testsrc.o +OBJS-$(CONFIG_TESTSRC_FILTER) += vsrc_testsrc.o OBJS-$(CONFIG_NULLSINK_FILTER) += vsink_nullsink.o --include $(SUBDIR)$(ARCH)/Makefile +-include $(SRC_PATH)/$(SUBDIR)$(ARCH)/Makefile DIRS = x86 -include $(SUBDIR)../subdir.mak +TOOLS = graph2dot lavfi-showfiltfmts diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_aspect.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_aspect.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_aspect.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_aspect.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,7 @@ * aspect ratio modification video filters */ +#include "libavutil/mathematics.h" #include "avfilter.h" typedef struct { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_boxblur.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_boxblur.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_boxblur.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_boxblur.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,350 @@ +/* + * Copyright (c) 2002 Michael Niedermayer + * Copyright (c) 2011 Stefano Sabatini + * + * This file is part of Libav. + * + * Libav 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. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with Libav; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/** + * @file + * Apply a boxblur filter to the input video. + * Ported from MPlayer libmpcodecs/vf_boxblur.c. + */ + +#include "libavutil/avstring.h" +#include "libavutil/eval.h" +#include "libavutil/pixdesc.h" +#include "avfilter.h" + +static const char *var_names[] = { + "w", + "h", + "cw", + "ch", + "hsub", + "vsub", + NULL +}; + +enum var_name { + VAR_W, + VAR_H, + VAR_CW, + VAR_CH, + VAR_HSUB, + VAR_VSUB, + VARS_NB +}; + +typedef struct { + int radius; + int power; +} FilterParam; + +typedef struct { + FilterParam luma_param; + FilterParam chroma_param; + FilterParam alpha_param; + char luma_radius_expr [256]; + char chroma_radius_expr[256]; + char alpha_radius_expr [256]; + + int hsub, vsub; + int radius[4]; + int power[4]; + uint8_t *temp[2]; ///< temporary buffer used in blur_power() +} BoxBlurContext; + +#define Y 0 +#define U 1 +#define V 2 +#define A 3 + +static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) +{ + BoxBlurContext *boxblur = ctx->priv; + int e; + + if (!args) { + av_log(ctx, AV_LOG_ERROR, + "Filter expects 2 or 4 or 6 arguments, none provided\n"); + return AVERROR(EINVAL); + } + + e = sscanf(args, "%255[^:]:%d:%255[^:]:%d:%255[^:]:%d", + boxblur->luma_radius_expr, &boxblur->luma_param .power, + boxblur->chroma_radius_expr, &boxblur->chroma_param.power, + boxblur->alpha_radius_expr, &boxblur->alpha_param .power); + + if (e != 2 && e != 4 && e != 6) { + av_log(ctx, AV_LOG_ERROR, + "Filter expects 2 or 4 or 6 params, provided %d\n", e); + return AVERROR(EINVAL); + } + + if (e < 4) { + boxblur->chroma_param.power = boxblur->luma_param.power; + av_strlcpy(boxblur->chroma_radius_expr, boxblur->luma_radius_expr, + sizeof(boxblur->chroma_radius_expr)); + } + if (e < 6) { + boxblur->alpha_param.power = boxblur->luma_param.power; + av_strlcpy(boxblur->alpha_radius_expr, boxblur->luma_radius_expr, + sizeof(boxblur->alpha_radius_expr)); + } + + return 0; +} + +static av_cold void uninit(AVFilterContext *ctx) +{ + BoxBlurContext *boxblur = ctx->priv; + + av_freep(&boxblur->temp[0]); + av_freep(&boxblur->temp[1]); +} + +static int query_formats(AVFilterContext *ctx) +{ + enum PixelFormat pix_fmts[] = { + PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, + PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_YUVA420P, + PIX_FMT_YUV440P, PIX_FMT_GRAY8, + PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, + PIX_FMT_YUVJ440P, + PIX_FMT_NONE + }; + + avfilter_set_common_formats(ctx, avfilter_make_format_list(pix_fmts)); + return 0; +} + +static int config_input(AVFilterLink *inlink) +{ + const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[inlink->format]; + AVFilterContext *ctx = inlink->dst; + BoxBlurContext *boxblur = ctx->priv; + int w = inlink->w, h = inlink->h; + int cw, ch; + double var_values[VARS_NB], res; + char *expr; + int ret; + + av_freep(&boxblur->temp[0]); + av_freep(&boxblur->temp[1]); + if (!(boxblur->temp[0] = av_malloc(FFMAX(w, h)))) + return AVERROR(ENOMEM); + if (!(boxblur->temp[1] = av_malloc(FFMAX(w, h)))) { + av_freep(&boxblur->temp[0]); + return AVERROR(ENOMEM); + } + + boxblur->hsub = desc->log2_chroma_w; + boxblur->vsub = desc->log2_chroma_h; + + var_values[VAR_W] = inlink->w; + var_values[VAR_H] = inlink->h; + var_values[VAR_CW] = cw = w>>boxblur->hsub; + var_values[VAR_CH] = ch = h>>boxblur->vsub; + var_values[VAR_HSUB] = 1<hsub; + var_values[VAR_VSUB] = 1<vsub; + +#define EVAL_RADIUS_EXPR(comp) \ + expr = boxblur->comp##_radius_expr; \ + ret = av_expr_parse_and_eval(&res, expr, var_names, var_values, \ + NULL, NULL, NULL, NULL, NULL, 0, ctx); \ + boxblur->comp##_param.radius = res; \ + if (ret < 0) { \ + av_log(NULL, AV_LOG_ERROR, \ + "Error when evaluating " #comp " radius expression '%s'\n", expr); \ + return ret; \ + } + EVAL_RADIUS_EXPR(luma); + EVAL_RADIUS_EXPR(chroma); + EVAL_RADIUS_EXPR(alpha); + + av_log(ctx, AV_LOG_DEBUG, + "luma_radius:%d luma_power:%d " + "chroma_radius:%d chroma_power:%d " + "alpha_radius:%d alpha_power:%d " + "w:%d chroma_w:%d h:%d chroma_h:%d\n", + boxblur->luma_param .radius, boxblur->luma_param .power, + boxblur->chroma_param.radius, boxblur->chroma_param.power, + boxblur->alpha_param .radius, boxblur->alpha_param .power, + w, cw, h, ch); + +#define CHECK_RADIUS_VAL(w_, h_, comp) \ + if (boxblur->comp##_param.radius < 0 || \ + 2*boxblur->comp##_param.radius > FFMIN(w_, h_)) { \ + av_log(ctx, AV_LOG_ERROR, \ + "Invalid " #comp " radius value %d, must be >= 0 and <= %d\n", \ + boxblur->comp##_param.radius, FFMIN(w_, h_)/2); \ + return AVERROR(EINVAL); \ + } + CHECK_RADIUS_VAL(w, h, luma); + CHECK_RADIUS_VAL(cw, ch, chroma); + CHECK_RADIUS_VAL(w, h, alpha); + + boxblur->radius[Y] = boxblur->luma_param.radius; + boxblur->radius[U] = boxblur->radius[V] = boxblur->chroma_param.radius; + boxblur->radius[A] = boxblur->alpha_param.radius; + + boxblur->power[Y] = boxblur->luma_param.power; + boxblur->power[U] = boxblur->power[V] = boxblur->chroma_param.power; + boxblur->power[A] = boxblur->alpha_param.power; + + return 0; +} + +static inline void blur(uint8_t *dst, int dst_step, const uint8_t *src, int src_step, + int len, int radius) +{ + /* Naive boxblur would sum source pixels from x-radius .. x+radius + * for destination pixel x. That would be O(radius*width). + * If you now look at what source pixels represent 2 consecutive + * output pixels, then you see they are almost identical and only + * differ by 2 pixels, like: + * src0 111111111 + * dst0 1 + * src1 111111111 + * dst1 1 + * src0-src1 1 -1 + * so when you know one output pixel you can find the next by just adding + * and subtracting 1 input pixel. + * The following code adopts this faster variant. + */ + const int length = radius*2 + 1; + const int inv = ((1<<16) + length/2)/length; + int x, sum = 0; + + for (x = 0; x < radius; x++) + sum += src[x*src_step]<<1; + sum += src[radius*src_step]; + + for (x = 0; x <= radius; x++) { + sum += src[(radius+x)*src_step] - src[(radius-x)*src_step]; + dst[x*dst_step] = (sum*inv + (1<<15))>>16; + } + + for (; x < len-radius; x++) { + sum += src[(radius+x)*src_step] - src[(x-radius-1)*src_step]; + dst[x*dst_step] = (sum*inv + (1<<15))>>16; + } + + for (; x < len; x++) { + sum += src[(2*len-radius-x-1)*src_step] - src[(x-radius-1)*src_step]; + dst[x*dst_step] = (sum*inv + (1<<15))>>16; + } +} + +static inline void blur_power(uint8_t *dst, int dst_step, const uint8_t *src, int src_step, + int len, int radius, int power, uint8_t *temp[2]) +{ + uint8_t *a = temp[0], *b = temp[1]; + + if (radius && power) { + blur(a, 1, src, src_step, len, radius); + for (; power > 2; power--) { + uint8_t *c; + blur(b, 1, a, 1, len, radius); + c = a; a = b; b = c; + } + if (power > 1) { + blur(dst, dst_step, a, 1, len, radius); + } else { + int i; + for (i = 0; i < len; i++) + dst[i*dst_step] = a[i]; + } + } else { + int i; + for (i = 0; i < len; i++) + dst[i*dst_step] = src[i*src_step]; + } +} + +static void hblur(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, + int w, int h, int radius, int power, uint8_t *temp[2]) +{ + int y; + + if (radius == 0 && dst == src) + return; + + for (y = 0; y < h; y++) + blur_power(dst + y*dst_linesize, 1, src + y*src_linesize, 1, + w, radius, power, temp); +} + +static void vblur(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, + int w, int h, int radius, int power, uint8_t *temp[2]) +{ + int x; + + if (radius == 0 && dst == src) + return; + + for (x = 0; x < w; x++) + blur_power(dst + x, dst_linesize, src + x, src_linesize, + h, radius, power, temp); +} + +static void draw_slice(AVFilterLink *inlink, int y0, int h0, int slice_dir) +{ + AVFilterContext *ctx = inlink->dst; + BoxBlurContext *boxblur = ctx->priv; + AVFilterLink *outlink = inlink->dst->outputs[0]; + AVFilterBufferRef *inpicref = inlink ->cur_buf; + AVFilterBufferRef *outpicref = outlink->out_buf; + int plane; + int cw = inlink->w >> boxblur->hsub, ch = h0 >> boxblur->vsub; + int w[4] = { inlink->w, cw, cw, inlink->w }; + int h[4] = { h0, ch, ch, h0 }; + + for (plane = 0; inpicref->data[plane] && plane < 4; plane++) + hblur(outpicref->data[plane], outpicref->linesize[plane], + inpicref ->data[plane], inpicref ->linesize[plane], + w[plane], h[plane], boxblur->radius[plane], boxblur->power[plane], + boxblur->temp); + + for (plane = 0; inpicref->data[plane] && plane < 4; plane++) + vblur(outpicref->data[plane], outpicref->linesize[plane], + outpicref->data[plane], outpicref->linesize[plane], + w[plane], h[plane], boxblur->radius[plane], boxblur->power[plane], + boxblur->temp); + + avfilter_draw_slice(outlink, y0, h0, slice_dir); +} + +AVFilter avfilter_vf_boxblur = { + .name = "boxblur", + .description = NULL_IF_CONFIG_SMALL("Blur the input."), + .priv_size = sizeof(BoxBlurContext), + .init = init, + .uninit = uninit, + .query_formats = query_formats, + + .inputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_input, + .draw_slice = draw_slice, + .min_perms = AV_PERM_READ }, + { .name = NULL}}, + .outputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, }, + { .name = NULL}}, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_crop.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_crop.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_crop.c 2011-05-31 02:05:07.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_crop.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,6 +30,7 @@ #include "libavutil/avstring.h" #include "libavutil/libm.h" #include "libavutil/imgutils.h" +#include "libavutil/mathematics.h" static const char *var_names[] = { "E", diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_delogo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_delogo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_delogo.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_delogo.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,284 @@ +/* + * Copyright (c) 2002 Jindrich Makovicka + * Copyright (c) 2011 Stefano Sabatini + * + * This file is part of Libav. + * + * Libav 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. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with Libav; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/** + * @file + * A very simple tv station logo remover + * Ported from MPlayer libmpcodecs/vf_delogo.c. + */ + +#include "libavutil/imgutils.h" +#include "libavutil/opt.h" +#include "libavutil/pixdesc.h" +#include "avfilter.h" + +/** + * Apply a simple delogo algorithm to the image in dst and put the + * result in src. + * + * The algorithm is only applied to the region specified by the logo + * parameters. + * + * @param w width of the input image + * @param h height of the input image + * @param logo_x x coordinate of the top left corner of the logo region + * @param logo_y y coordinate of the top left corner of the logo region + * @param logo_w width of the logo + * @param logo_h height of the logo + * @param band the size of the band around the processed area + * @param show show a rectangle around the processed area, useful for + * parameters tweaking + * @param direct if non-zero perform in-place processing + */ +static void apply_delogo(uint8_t *dst, int dst_linesize, + uint8_t *src, int src_linesize, + int w, int h, + int logo_x, int logo_y, int logo_w, int logo_h, + int band, int show, int direct) +{ + int x, y; + int interp, dist; + uint8_t *xdst, *xsrc; + + uint8_t *topleft, *botleft, *topright; + int xclipl, xclipr, yclipt, yclipb; + int logo_x1, logo_x2, logo_y1, logo_y2; + + xclipl = FFMAX(-logo_x, 0); + xclipr = FFMAX(logo_x+logo_w-w, 0); + yclipt = FFMAX(-logo_y, 0); + yclipb = FFMAX(logo_y+logo_h-h, 0); + + logo_x1 = logo_x + xclipl; + logo_x2 = logo_x + logo_w - xclipr; + logo_y1 = logo_y + yclipt; + logo_y2 = logo_y + logo_h - yclipb; + + topleft = src+logo_y1 * src_linesize+logo_x1; + topright = src+logo_y1 * src_linesize+logo_x2-1; + botleft = src+(logo_y2-1) * src_linesize+logo_x1; + + dst += (logo_y1+1)*dst_linesize; + src += (logo_y1+1)*src_linesize; + + if (!direct) + av_image_copy_plane(dst, dst_linesize, src, src_linesize, w, h); + + for (y = logo_y1+1; y < logo_y2-1; y++) { + for (x = logo_x1+1, + xdst = dst+logo_x1+1, + xsrc = src+logo_x1+1; x < logo_x2-1; x++, xdst++, xsrc++) { + interp = (topleft[src_linesize*(y-logo_y -yclipt)] + + topleft[src_linesize*(y-logo_y-1-yclipt)] + + topleft[src_linesize*(y-logo_y+1-yclipt)]) * (logo_w-(x-logo_x))/logo_w + + (topright[src_linesize*(y-logo_y-yclipt)] + + topright[src_linesize*(y-logo_y-1-yclipt)] + + topright[src_linesize*(y-logo_y+1-yclipt)]) * (x-logo_x)/logo_w + + (topleft[x-logo_x-xclipl] + + topleft[x-logo_x-1-xclipl] + + topleft[x-logo_x+1-xclipl]) * (logo_h-(y-logo_y))/logo_h + + (botleft[x-logo_x-xclipl] + + botleft[x-logo_x-1-xclipl] + + botleft[x-logo_x+1-xclipl]) * (y-logo_y)/logo_h; + interp /= 6; + + if (y >= logo_y+band && y < logo_y+logo_h-band && + x >= logo_x+band && x < logo_x+logo_w-band) { + *xdst = interp; + } else { + dist = 0; + if (x < logo_x+band) + dist = FFMAX(dist, logo_x-x+band); + else if (x >= logo_x+logo_w-band) + dist = FFMAX(dist, x-(logo_x+logo_w-1-band)); + + if (y < logo_y+band) + dist = FFMAX(dist, logo_y-y+band); + else if (y >= logo_y+logo_h-band) + dist = FFMAX(dist, y-(logo_y+logo_h-1-band)); + + *xdst = (*xsrc*dist + interp*(band-dist))/band; + if (show && (dist == band-1)) + *xdst = 0; + } + } + + dst += dst_linesize; + src += src_linesize; + } +} + +typedef struct { + const AVClass *class; + int x, y, w, h, band, show; +} DelogoContext; + +#define OFFSET(x) offsetof(DelogoContext, x) + +static const AVOption delogo_options[]= { + {"x", "set logo x position", OFFSET(x), FF_OPT_TYPE_INT, {-1}, -1, INT_MAX }, + {"y", "set logo y position", OFFSET(y), FF_OPT_TYPE_INT, {-1}, -1, INT_MAX }, + {"w", "set logo width", OFFSET(w), FF_OPT_TYPE_INT, {-1}, -1, INT_MAX }, + {"h", "set logo height", OFFSET(h), FF_OPT_TYPE_INT, {-1}, -1, INT_MAX }, + {"band", "set delogo area band size", OFFSET(band), FF_OPT_TYPE_INT, { 4}, -1, INT_MAX }, + {"t", "set delogo area band size", OFFSET(band), FF_OPT_TYPE_INT, { 4}, -1, INT_MAX }, + {"show", "show delogo area", OFFSET(show), FF_OPT_TYPE_INT, { 0}, 0, 1 }, + {NULL}, +}; + +static const char *delogo_get_name(void *ctx) +{ + return "delogo"; +} + +static const AVClass delogo_class = { + .class_name = "DelogoContext", + .item_name = delogo_get_name, + .option = delogo_options, +}; + +static int query_formats(AVFilterContext *ctx) +{ + enum PixelFormat pix_fmts[] = { + PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, + PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_YUV440P, + PIX_FMT_YUVA420P, PIX_FMT_GRAY8, + PIX_FMT_NONE + }; + + avfilter_set_common_formats(ctx, avfilter_make_format_list(pix_fmts)); + return 0; +} + +static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) +{ + DelogoContext *delogo = ctx->priv; + int ret = 0; + + delogo->class = &delogo_class; + av_opt_set_defaults(delogo); + + if (args) + ret = sscanf(args, "%d:%d:%d:%d:%d", + &delogo->x, &delogo->y, &delogo->w, &delogo->h, &delogo->band); + if (ret == 5) { + if (delogo->band < 0) + delogo->show = 1; + } else if ((ret = (av_set_options_string(delogo, args, "=", ":"))) < 0) { + av_log(ctx, AV_LOG_ERROR, "Error parsing options string: '%s'\n", args); + return ret; + } + +#define CHECK_UNSET_OPT(opt) \ + if (delogo->opt == -1) { \ + av_log(delogo, AV_LOG_ERROR, "Option %s was not set.\n", #opt); \ + return AVERROR(EINVAL); \ + } + CHECK_UNSET_OPT(x); + CHECK_UNSET_OPT(y); + CHECK_UNSET_OPT(w); + CHECK_UNSET_OPT(h); + + if (delogo->show) + delogo->band = 4; + + av_log(ctx, AV_LOG_DEBUG, "x:%d y:%d, w:%d h:%d band:%d show:%d\n", + delogo->x, delogo->y, delogo->w, delogo->h, delogo->band, delogo->show); + + delogo->w += delogo->band*2; + delogo->h += delogo->band*2; + delogo->x -= delogo->band; + delogo->y -= delogo->band; + + return 0; +} + +static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) +{ + AVFilterLink *outlink = inlink->dst->outputs[0]; + AVFilterBufferRef *outpicref; + + if (inpicref->perms & AV_PERM_PRESERVE) { + outpicref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, + outlink->w, outlink->h); + avfilter_copy_buffer_ref_props(outpicref, inpicref); + outpicref->video->w = outlink->w; + outpicref->video->h = outlink->h; + } else + outpicref = inpicref; + + outlink->out_buf = outpicref; + avfilter_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0)); +} + +static void null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) { } + +static void end_frame(AVFilterLink *inlink) +{ + DelogoContext *delogo = inlink->dst->priv; + AVFilterLink *outlink = inlink->dst->outputs[0]; + AVFilterBufferRef *inpicref = inlink ->cur_buf; + AVFilterBufferRef *outpicref = outlink->out_buf; + int direct = inpicref == outpicref; + int hsub0 = av_pix_fmt_descriptors[inlink->format].log2_chroma_w; + int vsub0 = av_pix_fmt_descriptors[inlink->format].log2_chroma_h; + int plane; + + for (plane = 0; plane < 4 && inpicref->data[plane]; plane++) { + int hsub = plane == 1 || plane == 2 ? hsub0 : 0; + int vsub = plane == 1 || plane == 2 ? vsub0 : 0; + + apply_delogo(outpicref->data[plane], outpicref->linesize[plane], + inpicref ->data[plane], inpicref ->linesize[plane], + inlink->w>>hsub, inlink->h>>vsub, + delogo->x>>hsub, delogo->y>>vsub, + delogo->w>>hsub, delogo->h>>vsub, + delogo->band>>FFMIN(hsub, vsub), + delogo->show, direct); + } + + avfilter_draw_slice(outlink, 0, inlink->h, 1); + avfilter_end_frame(outlink); + avfilter_unref_buffer(inpicref); + if (!direct) + avfilter_unref_buffer(outpicref); +} + +AVFilter avfilter_vf_delogo = { + .name = "delogo", + .description = NULL_IF_CONFIG_SMALL("Remove logo from input video."), + .priv_size = sizeof(DelogoContext), + .init = init, + .query_formats = query_formats, + + .inputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .get_video_buffer = avfilter_null_get_video_buffer, + .start_frame = start_frame, + .draw_slice = null_draw_slice, + .end_frame = end_frame, + .min_perms = AV_PERM_WRITE | AV_PERM_READ, + .rej_perms = AV_PERM_PRESERVE }, + { .name = NULL}}, + .outputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, }, + { .name = NULL}}, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_drawbox.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_drawbox.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_drawbox.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_drawbox.c 2012-01-11 00:34:30.000000000 +0000 @@ -34,7 +34,7 @@ typedef struct { int x, y, w, h; unsigned char yuv_color[4]; - int vsub, hsub; //< chroma subsampling + int vsub, hsub; ///< chroma subsampling } DrawBoxContext; static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_drawtext.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_drawtext.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_drawtext.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_drawtext.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,7 +22,7 @@ /** * @file - * drawtext filter, based on the original FFmpeg vhook/drawtext.c + * drawtext filter, based on the original vhook/drawtext.c * filter by Gustavo Sverzut Barbieri */ @@ -31,10 +31,14 @@ #include "libavutil/colorspace.h" #include "libavutil/file.h" +#include "libavutil/eval.h" #include "libavutil/opt.h" +#include "libavutil/mathematics.h" +#include "libavutil/random_seed.h" #include "libavutil/parseutils.h" #include "libavutil/pixdesc.h" #include "libavutil/tree.h" +#include "libavutil/lfg.h" #include "avfilter.h" #include "drawutils.h" @@ -45,6 +49,52 @@ #include FT_FREETYPE_H #include FT_GLYPH_H +static const char *var_names[] = { + "E", + "PHI", + "PI", + "main_w", "W", ///< width of the main video + "main_h", "H", ///< height of the main video + "text_w", "w", ///< width of the overlay text + "text_h", "h", ///< height of the overlay text + "x", + "y", + "n", ///< number of processed frames + "t", ///< timestamp expressed in seconds + NULL +}; + +static const char *fun2_names[] = { + "rand", +}; + +static double drand(void *opaque, double min, double max) +{ + return min + (max-min) / UINT_MAX * av_lfg_get(opaque); +} + +typedef double (*eval_func2)(void *, double a, double b); + +static const eval_func2 fun2[] = { + drand, + NULL +}; + +enum var_name { + VAR_E, + VAR_PHI, + VAR_PI, + VAR_MAIN_W, VAR_MW, + VAR_MAIN_H, VAR_MH, + VAR_TEXT_W, VAR_TW, + VAR_TEXT_H, VAR_TH, + VAR_X, + VAR_Y, + VAR_N, + VAR_T, + VAR_VARS_NB +}; + typedef struct { const AVClass *class; uint8_t *fontfile; ///< font to be used @@ -55,8 +105,8 @@ FT_Vector *positions; ///< positions for each element in the text size_t nb_positions; ///< number of elements of positions array char *textfile; ///< file with text to be drawn - unsigned int x; ///< x position to start drawing text - unsigned int y; ///< y position to start drawing text + int x, y; ///< position to start drawing text + int w, h; ///< dimension of the text block int shadowx, shadowy; unsigned int fontsize; ///< font size to use char *fontcolor_string; ///< font color as string @@ -81,42 +131,50 @@ int pixel_step[4]; ///< distance in bytes between the component of each pixel uint8_t rgba_map[4]; ///< map RGBA offsets to the positions in the packed RGBA format uint8_t *box_line[4]; ///< line used for filling the box background + char *x_expr, *y_expr; + AVExpr *x_pexpr, *y_pexpr; ///< parsed expressions for x and y + double var_values[VAR_VARS_NB]; + char *d_expr; + AVExpr *d_pexpr; + int draw; ///< set to zero to prevent drawing + AVLFG prng; ///< random } DrawTextContext; #define OFFSET(x) offsetof(DrawTextContext, x) static const AVOption drawtext_options[]= { -{"fontfile", "set font file", OFFSET(fontfile), FF_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, -{"text", "set text", OFFSET(text), FF_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, -{"textfile", "set text file", OFFSET(textfile), FF_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, -{"fontcolor","set foreground color", OFFSET(fontcolor_string), FF_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, -{"boxcolor", "set box color", OFFSET(boxcolor_string), FF_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, -{"shadowcolor", "set shadow color", OFFSET(shadowcolor_string), FF_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, -{"box", "set box", OFFSET(draw_box), FF_OPT_TYPE_INT, {.dbl=0}, 0, 1 }, -{"fontsize", "set font size", OFFSET(fontsize), FF_OPT_TYPE_INT, {.dbl=16}, 1, 72 }, -{"x", "set x", OFFSET(x), FF_OPT_TYPE_INT, {.dbl=0}, 0, INT_MAX }, -{"y", "set y", OFFSET(y), FF_OPT_TYPE_INT, {.dbl=0}, 0, INT_MAX }, -{"shadowx", "set x", OFFSET(shadowx), FF_OPT_TYPE_INT, {.dbl=0}, INT_MIN, INT_MAX }, -{"shadowy", "set y", OFFSET(shadowy), FF_OPT_TYPE_INT, {.dbl=0}, INT_MIN, INT_MAX }, -{"tabsize", "set tab size", OFFSET(tabsize), FF_OPT_TYPE_INT, {.dbl=4}, 0, INT_MAX }, +{"fontfile", "set font file", OFFSET(fontfile), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, +{"text", "set text", OFFSET(text), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, +{"textfile", "set text file", OFFSET(textfile), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, +{"fontcolor","set foreground color", OFFSET(fontcolor_string), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, +{"boxcolor", "set box color", OFFSET(boxcolor_string), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, +{"shadowcolor", "set shadow color", OFFSET(shadowcolor_string), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX }, +{"box", "set box", OFFSET(draw_box), AV_OPT_TYPE_INT, {.dbl=0}, 0, 1 }, +{"fontsize", "set font size", OFFSET(fontsize), AV_OPT_TYPE_INT, {.dbl=16}, 1, 72 }, +{"x", "set x", OFFSET(x_expr), AV_OPT_TYPE_STRING, {.str="0"}, CHAR_MIN, CHAR_MAX }, +{"y", "set y", OFFSET(y_expr), AV_OPT_TYPE_STRING, {.str="0"}, CHAR_MIN, CHAR_MAX }, +{"shadowx", "set x", OFFSET(shadowx), AV_OPT_TYPE_INT, {.dbl=0}, INT_MIN, INT_MAX }, +{"shadowy", "set y", OFFSET(shadowy), AV_OPT_TYPE_INT, {.dbl=0}, INT_MIN, INT_MAX }, +{"tabsize", "set tab size", OFFSET(tabsize), AV_OPT_TYPE_INT, {.dbl=4}, 0, INT_MAX }, +{"draw", "if false do not draw", OFFSET(d_expr), AV_OPT_TYPE_STRING, {.str="1"}, CHAR_MIN, CHAR_MAX }, /* FT_LOAD_* flags */ -{"ft_load_flags", "set font loading flags for libfreetype", OFFSET(ft_load_flags), FF_OPT_TYPE_FLAGS, {.dbl=FT_LOAD_DEFAULT|FT_LOAD_RENDER}, 0, INT_MAX, 0, "ft_load_flags" }, -{"default", "set default", 0, FF_OPT_TYPE_CONST, {FT_LOAD_DEFAULT}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"no_scale", "set no_scale", 0, FF_OPT_TYPE_CONST, {FT_LOAD_NO_SCALE}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"no_hinting", "set no_hinting", 0, FF_OPT_TYPE_CONST, {FT_LOAD_NO_HINTING}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"render", "set render", 0, FF_OPT_TYPE_CONST, {FT_LOAD_RENDER}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"no_bitmap", "set no_bitmap", 0, FF_OPT_TYPE_CONST, {FT_LOAD_NO_BITMAP}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"vertical_layout", "set vertical_layout", 0, FF_OPT_TYPE_CONST, {FT_LOAD_VERTICAL_LAYOUT}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"force_autohint", "set force_autohint", 0, FF_OPT_TYPE_CONST, {FT_LOAD_FORCE_AUTOHINT}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"crop_bitmap", "set crop_bitmap", 0, FF_OPT_TYPE_CONST, {FT_LOAD_CROP_BITMAP}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"pedantic", "set pedantic", 0, FF_OPT_TYPE_CONST, {FT_LOAD_PEDANTIC}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"ignore_global_advance_width", "set ignore_global_advance_width", 0, FF_OPT_TYPE_CONST, {FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"no_recurse", "set no_recurse", 0, FF_OPT_TYPE_CONST, {FT_LOAD_NO_RECURSE}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"ignore_transform", "set ignore_transform", 0, FF_OPT_TYPE_CONST, {FT_LOAD_IGNORE_TRANSFORM}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"monochrome", "set monochrome", 0, FF_OPT_TYPE_CONST, {FT_LOAD_MONOCHROME}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"linear_design", "set linear_design", 0, FF_OPT_TYPE_CONST, {FT_LOAD_LINEAR_DESIGN}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, -{"no_autohint", "set no_autohint", 0, FF_OPT_TYPE_CONST, {FT_LOAD_NO_AUTOHINT}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"ft_load_flags", "set font loading flags for libfreetype", OFFSET(ft_load_flags), AV_OPT_TYPE_FLAGS, {.dbl=FT_LOAD_DEFAULT|FT_LOAD_RENDER}, 0, INT_MAX, 0, "ft_load_flags" }, +{"default", "set default", 0, AV_OPT_TYPE_CONST, {FT_LOAD_DEFAULT}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"no_scale", "set no_scale", 0, AV_OPT_TYPE_CONST, {FT_LOAD_NO_SCALE}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"no_hinting", "set no_hinting", 0, AV_OPT_TYPE_CONST, {FT_LOAD_NO_HINTING}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"render", "set render", 0, AV_OPT_TYPE_CONST, {FT_LOAD_RENDER}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"no_bitmap", "set no_bitmap", 0, AV_OPT_TYPE_CONST, {FT_LOAD_NO_BITMAP}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"vertical_layout", "set vertical_layout", 0, AV_OPT_TYPE_CONST, {FT_LOAD_VERTICAL_LAYOUT}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"force_autohint", "set force_autohint", 0, AV_OPT_TYPE_CONST, {FT_LOAD_FORCE_AUTOHINT}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"crop_bitmap", "set crop_bitmap", 0, AV_OPT_TYPE_CONST, {FT_LOAD_CROP_BITMAP}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"pedantic", "set pedantic", 0, AV_OPT_TYPE_CONST, {FT_LOAD_PEDANTIC}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"ignore_global_advance_width", "set ignore_global_advance_width", 0, AV_OPT_TYPE_CONST, {FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"no_recurse", "set no_recurse", 0, AV_OPT_TYPE_CONST, {FT_LOAD_NO_RECURSE}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"ignore_transform", "set ignore_transform", 0, AV_OPT_TYPE_CONST, {FT_LOAD_IGNORE_TRANSFORM}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"monochrome", "set monochrome", 0, AV_OPT_TYPE_CONST, {FT_LOAD_MONOCHROME}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"linear_design", "set linear_design", 0, AV_OPT_TYPE_CONST, {FT_LOAD_LINEAR_DESIGN}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, +{"no_autohint", "set no_autohint", 0, AV_OPT_TYPE_CONST, {FT_LOAD_NO_AUTOHINT}, INT_MIN, INT_MAX, 0, "ft_load_flags" }, {NULL}, }; @@ -223,7 +281,7 @@ Glyph *glyph; dtext->class = &drawtext_class; - av_opt_set_defaults2(dtext, 0, 0); + av_opt_set_defaults(dtext); dtext->fontcolor_string = av_strdup("black"); dtext->boxcolor_string = av_strdup("white"); dtext->shadowcolor_string = av_strdup("black"); @@ -369,15 +427,167 @@ } +static inline int is_newline(uint32_t c) +{ + return c == '\n' || c == '\r' || c == '\f' || c == '\v'; +} + +static int dtext_prepare_text(AVFilterContext *ctx) +{ + DrawTextContext *dtext = ctx->priv; + uint32_t code = 0, prev_code = 0; + int x = 0, y = 0, i = 0, ret; + int text_height, baseline; + char *text = dtext->text; + uint8_t *p; + int str_w = 0, len; + int y_min = 32000, y_max = -32000; + FT_Vector delta; + Glyph *glyph = NULL, *prev_glyph = NULL; + Glyph dummy = { 0 }; + int width = ctx->inputs[0]->w; + int height = ctx->inputs[0]->h; + +#if HAVE_LOCALTIME_R + time_t now = time(0); + struct tm ltime; + uint8_t *buf = dtext->expanded_text; + int buf_size = dtext->expanded_text_size; + + if (!buf) + buf_size = 2*strlen(dtext->text)+1; + + localtime_r(&now, <ime); + + while ((buf = av_realloc(buf, buf_size))) { + *buf = 1; + if (strftime(buf, buf_size, dtext->text, <ime) != 0 || *buf == 0) + break; + buf_size *= 2; + } + + if (!buf) + return AVERROR(ENOMEM); + text = dtext->expanded_text = buf; + dtext->expanded_text_size = buf_size; +#endif + + if ((len = strlen(text)) > dtext->nb_positions) { + FT_Vector *p = av_realloc(dtext->positions, + len * sizeof(*dtext->positions)); + if (!p) { + av_freep(dtext->positions); + dtext->nb_positions = 0; + return AVERROR(ENOMEM); + } else { + dtext->positions = p; + dtext->nb_positions = len; + } + } + + /* load and cache glyphs */ + for (i = 0, p = text; *p; i++) { + GET_UTF8(code, *p++, continue;); + + /* get glyph */ + dummy.code = code; + glyph = av_tree_find(dtext->glyphs, &dummy, glyph_cmp, NULL); + if (!glyph) + ret = load_glyph(ctx, &glyph, code); + if (ret) return ret; + + y_min = FFMIN(glyph->bbox.yMin, y_min); + y_max = FFMAX(glyph->bbox.yMax, y_max); + } + text_height = y_max - y_min; + baseline = y_max; + + /* compute and save position for each glyph */ + glyph = NULL; + for (i = 0, p = text; *p; i++) { + GET_UTF8(code, *p++, continue;); + + /* skip the \n in the sequence \r\n */ + if (prev_code == '\r' && code == '\n') + continue; + + prev_code = code; + if (is_newline(code)) { + str_w = FFMAX(str_w, x - dtext->x); + y += text_height; + x = 0; + continue; + } + + /* get glyph */ + prev_glyph = glyph; + dummy.code = code; + glyph = av_tree_find(dtext->glyphs, &dummy, glyph_cmp, NULL); + + /* kerning */ + if (dtext->use_kerning && prev_glyph && glyph->code) { + FT_Get_Kerning(dtext->face, prev_glyph->code, glyph->code, + ft_kerning_default, &delta); + x += delta.x >> 6; + } + + if (x + glyph->bbox.xMax >= width) { + str_w = FFMAX(str_w, x); + y += text_height; + x = 0; + } + + /* save position */ + dtext->positions[i].x = x + glyph->bitmap_left; + dtext->positions[i].y = y - glyph->bitmap_top + baseline; + if (code == '\t') x = (x / dtext->tabsize + 1)*dtext->tabsize; + else x += glyph->advance; + } + + str_w = FFMIN(width - 1, FFMAX(str_w, x)); + y = FFMIN(y + text_height, height - 1); + + dtext->w = str_w; + dtext->h = y; + + return 0; +} + + static int config_input(AVFilterLink *inlink) { - DrawTextContext *dtext = inlink->dst->priv; + AVFilterContext *ctx = inlink->dst; + DrawTextContext *dtext = ctx->priv; const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format]; int ret; dtext->hsub = pix_desc->log2_chroma_w; dtext->vsub = pix_desc->log2_chroma_h; + dtext->var_values[VAR_E ] = M_E; + dtext->var_values[VAR_PHI] = M_PHI; + dtext->var_values[VAR_PI ] = M_PI; + + dtext->var_values[VAR_MAIN_W] = + dtext->var_values[VAR_MW] = ctx->inputs[0]->w; + dtext->var_values[VAR_MAIN_H] = + dtext->var_values[VAR_MH] = ctx->inputs[0]->h; + + dtext->var_values[VAR_X] = 0; + dtext->var_values[VAR_Y] = 0; + dtext->var_values[VAR_N] = 0; + dtext->var_values[VAR_T] = NAN; + + av_lfg_init(&dtext->prng, av_get_random_seed()); + + if ((ret = av_expr_parse(&dtext->x_pexpr, dtext->x_expr, var_names, + NULL, NULL, fun2_names, fun2, 0, ctx)) < 0 || + (ret = av_expr_parse(&dtext->y_pexpr, dtext->y_expr, var_names, + NULL, NULL, fun2_names, fun2, 0, ctx)) < 0 || + (ret = av_expr_parse(&dtext->d_pexpr, dtext->d_expr, var_names, + NULL, NULL, fun2_names, fun2, 0, ctx)) < 0) + return AVERROR(EINVAL); + if ((ret = ff_fill_line_with_color(dtext->box_line, dtext->pixel_step, inlink->w, dtext->boxcolor, @@ -398,7 +608,9 @@ dtext->shadowcolor[3] = rgba[3]; } - return 0; + dtext->draw = 1; + + return dtext_prepare_text(ctx); } #define GET_BITMAP_VAL(r, c) \ @@ -424,15 +636,10 @@ { int r, c, alpha; unsigned int luma_pos, chroma_pos1, chroma_pos2; - uint8_t src_val, dst_pixel[4]; + uint8_t src_val; for (r = 0; r < bitmap->rows && r+y < height; r++) { for (c = 0; c < bitmap->width && c+x < width; c++) { - /* get pixel in the picref (destination) */ - dst_pixel[0] = picref->data[0][ c+x + (y+r) * picref->linesize[0]]; - dst_pixel[1] = picref->data[1][((c+x) >> hsub) + ((y+r) >> vsub) * picref->linesize[1]]; - dst_pixel[2] = picref->data[2][((c+x) >> hsub) + ((y+r) >> vsub) * picref->linesize[2]]; - /* get intensity value in the glyph bitmap (source) */ src_val = GET_BITMAP_VAL(r, c); if (!src_val) @@ -460,18 +667,10 @@ { int r, c, alpha; uint8_t *p; - uint8_t src_val, dst_pixel[4]; + uint8_t src_val; for (r = 0; r < bitmap->rows && r+y < height; r++) { for (c = 0; c < bitmap->width && c+x < width; c++) { - /* get pixel in the picref (destination) */ - dst_pixel[0] = picref->data[0][(c+x + rgba_map[0]) * pixel_step + - (y+r) * picref->linesize[0]]; - dst_pixel[1] = picref->data[0][(c+x + rgba_map[1]) * pixel_step + - (y+r) * picref->linesize[0]]; - dst_pixel[2] = picref->data[0][(c+x + rgba_map[2]) * pixel_step + - (y+r) * picref->linesize[0]]; - /* get intensity value in the glyph bitmap (source) */ src_val = GET_BITMAP_VAL(r, c); if (!src_val) @@ -512,11 +711,6 @@ } } -static inline int is_newline(uint32_t c) -{ - return (c == '\n' || c == '\r' || c == '\f' || c == '\v'); -} - static int draw_glyphs(DrawTextContext *dtext, AVFilterBufferRef *picref, int width, int height, const uint8_t rgbcolor[4], const uint8_t yuvcolor[4], int x, int y) { @@ -559,127 +753,29 @@ int width, int height) { DrawTextContext *dtext = ctx->priv; - uint32_t code = 0, prev_code = 0; - int x = 0, y = 0, i = 0, ret; - int text_height, baseline; - char *text = dtext->text; - uint8_t *p; - int str_w = 0, len; - int y_min = 32000, y_max = -32000; - FT_Vector delta; - Glyph *glyph = NULL, *prev_glyph = NULL; - Glyph dummy = { 0 }; - -#if HAVE_LOCALTIME_R - time_t now = time(0); - struct tm ltime; - uint8_t *buf = dtext->expanded_text; - int buf_size = dtext->expanded_text_size; - - if (!buf) { - buf_size = 2*strlen(dtext->text)+1; - buf = av_malloc(buf_size); - } - - localtime_r(&now, <ime); - - do { - *buf = 1; - if (strftime(buf, buf_size, dtext->text, <ime) != 0 || *buf == 0) - break; - buf_size *= 2; - } while ((buf = av_realloc(buf, buf_size))); - - if (!buf) - return AVERROR(ENOMEM); - text = dtext->expanded_text = buf; - dtext->expanded_text_size = buf_size; -#endif - if ((len = strlen(text)) > dtext->nb_positions) { - if (!(dtext->positions = - av_realloc(dtext->positions, len*sizeof(*dtext->positions)))) - return AVERROR(ENOMEM); - dtext->nb_positions = len; - } - - x = dtext->x; - y = dtext->y; - - /* load and cache glyphs */ - for (i = 0, p = text; *p; i++) { - GET_UTF8(code, *p++, continue;); - - /* get glyph */ - dummy.code = code; - glyph = av_tree_find(dtext->glyphs, &dummy, glyph_cmp, NULL); - if (!glyph) - load_glyph(ctx, &glyph, code); - - y_min = FFMIN(glyph->bbox.yMin, y_min); - y_max = FFMAX(glyph->bbox.yMax, y_max); - } - text_height = y_max - y_min; - baseline = y_max; - - /* compute and save position for each glyph */ - glyph = NULL; - for (i = 0, p = text; *p; i++) { - GET_UTF8(code, *p++, continue;); - - /* skip the \n in the sequence \r\n */ - if (prev_code == '\r' && code == '\n') - continue; - - prev_code = code; - if (is_newline(code)) { - str_w = FFMAX(str_w, x - dtext->x); - y += text_height; - x = dtext->x; - continue; - } - - /* get glyph */ - prev_glyph = glyph; - dummy.code = code; - glyph = av_tree_find(dtext->glyphs, &dummy, glyph_cmp, NULL); - - /* kerning */ - if (dtext->use_kerning && prev_glyph && glyph->code) { - FT_Get_Kerning(dtext->face, prev_glyph->code, glyph->code, - ft_kerning_default, &delta); - x += delta.x >> 6; - } - - if (x + glyph->bbox.xMax >= width) { - str_w = FFMAX(str_w, x - dtext->x); - y += text_height; - x = dtext->x; - } - - /* save position */ - dtext->positions[i].x = x + glyph->bitmap_left; - dtext->positions[i].y = y - glyph->bitmap_top + baseline; - if (code == '\t') x = (x / dtext->tabsize + 1)*dtext->tabsize; - else x += glyph->advance; - } - - str_w = FFMIN(width - dtext->x - 1, FFMAX(str_w, x - dtext->x)); - y = FFMIN(y + text_height, height - 1); + int ret; /* draw box */ if (dtext->draw_box) - drawbox(picref, dtext->x, dtext->y, str_w, y-dtext->y, + drawbox(picref, dtext->x, dtext->y, dtext->w, dtext->h, dtext->box_line, dtext->pixel_step, dtext->boxcolor, - dtext->hsub, dtext->vsub, dtext->is_packed_rgb, dtext->rgba_map); + dtext->hsub, dtext->vsub, dtext->is_packed_rgb, + dtext->rgba_map); if (dtext->shadowx || dtext->shadowy) { - if ((ret = draw_glyphs(dtext, picref, width, height, dtext->shadowcolor_rgba, - dtext->shadowcolor, dtext->shadowx, dtext->shadowy)) < 0) + if ((ret = draw_glyphs(dtext, picref, width, height, + dtext->shadowcolor_rgba, + dtext->shadowcolor, + dtext->x + dtext->shadowx, + dtext->y + dtext->shadowy)) < 0) return ret; } - if ((ret = draw_glyphs(dtext, picref, width, height, dtext->fontcolor_rgba, - dtext->fontcolor, 0, 0)) < 0) + if ((ret = draw_glyphs(dtext, picref, width, height, + dtext->fontcolor_rgba, + dtext->fontcolor, + dtext->x, + dtext->y)) < 0) return ret; return 0; @@ -687,12 +783,74 @@ static void null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) { } +static inline int normalize_double(int *n, double d) +{ + int ret = 0; + + if (isnan(d)) { + ret = AVERROR(EINVAL); + } else if (d > INT_MAX || d < INT_MIN) { + *n = d > INT_MAX ? INT_MAX : INT_MIN; + ret = AVERROR(EINVAL); + } else + *n = round(d); + + return ret; +} + +static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) +{ + AVFilterContext *ctx = inlink->dst; + DrawTextContext *dtext = ctx->priv; + int fail = 0; + + if (dtext_prepare_text(ctx) < 0) { + av_log(ctx, AV_LOG_ERROR, "Can't draw text\n"); + fail = 1; + } + + dtext->var_values[VAR_T] = inpicref->pts == AV_NOPTS_VALUE ? + NAN : inpicref->pts * av_q2d(inlink->time_base); + dtext->var_values[VAR_X] = + av_expr_eval(dtext->x_pexpr, dtext->var_values, &dtext->prng); + dtext->var_values[VAR_Y] = + av_expr_eval(dtext->y_pexpr, dtext->var_values, &dtext->prng); + dtext->var_values[VAR_X] = + av_expr_eval(dtext->x_pexpr, dtext->var_values, &dtext->prng); + + dtext->draw = fail ? 0 : + av_expr_eval(dtext->d_pexpr, dtext->var_values, &dtext->prng); + + normalize_double(&dtext->x, dtext->var_values[VAR_X]); + normalize_double(&dtext->y, dtext->var_values[VAR_Y]); + + if (dtext->x < 0) dtext->x = 0; + if (dtext->y < 0) dtext->y = 0; + if ((unsigned)dtext->x + (unsigned)dtext->w > inlink->w) + dtext->x = inlink->w - dtext->w; + if ((unsigned)dtext->y + (unsigned)dtext->h > inlink->h) + dtext->y = inlink->h - dtext->h; + + dtext->x &= ~((1 << dtext->hsub) - 1); + dtext->y &= ~((1 << dtext->vsub) - 1); + + av_dlog(ctx, "n:%d t:%f x:%d y:%d x+w:%d y+h:%d\n", + (int)dtext->var_values[VAR_N], dtext->var_values[VAR_T], + dtext->x, dtext->y, dtext->x+dtext->w, dtext->y+dtext->h); + + avfilter_start_frame(inlink->dst->outputs[0], inpicref); +} + static void end_frame(AVFilterLink *inlink) { AVFilterLink *outlink = inlink->dst->outputs[0]; AVFilterBufferRef *picref = inlink->cur_buf; + DrawTextContext *dtext = inlink->dst->priv; + + if (dtext->draw) + draw_text(inlink->dst, picref, picref->video->w, picref->video->h); - draw_text(inlink->dst, picref, picref->video->w, picref->video->h); + dtext->var_values[VAR_N] += 1.0; avfilter_draw_slice(outlink, 0, picref->video->h, 1); avfilter_end_frame(outlink); @@ -709,7 +867,7 @@ .inputs = (AVFilterPad[]) {{ .name = "default", .type = AVMEDIA_TYPE_VIDEO, .get_video_buffer = avfilter_null_get_video_buffer, - .start_frame = avfilter_null_start_frame, + .start_frame = start_frame, .draw_slice = null_draw_slice, .end_frame = end_frame, .config_props = config_input, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_frei0r.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_frei0r.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_frei0r.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_frei0r.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,6 +28,7 @@ #include #include "libavutil/avstring.h" #include "libavutil/imgutils.h" +#include "libavutil/mathematics.h" #include "libavutil/parseutils.h" #include "avfilter.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_libopencv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_libopencv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_libopencv.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_libopencv.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,7 +26,7 @@ /* #define DEBUG */ #include -#include +#include #include "libavutil/avstring.h" #include "libavutil/file.h" #include "avfilter.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_lut.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_lut.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_lut.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_lut.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,394 @@ +/* + * Copyright (c) 2011 Stefano Sabatini + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Compute a look-up table for binding the input value to the output + * value, and apply it to input video. + */ + +#include "libavutil/eval.h" +#include "libavutil/mathematics.h" +#include "libavutil/opt.h" +#include "libavutil/pixdesc.h" +#include "avfilter.h" +#include "internal.h" + +static const char *var_names[] = { + "E", + "PHI", + "PI", + "w", ///< width of the input video + "h", ///< height of the input video + "val", ///< input value for the pixel + "maxval", ///< max value for the pixel + "minval", ///< min value for the pixel + "negval", ///< negated value + "clipval", + NULL +}; + +enum var_name { + VAR_E, + VAR_PHI, + VAR_PI, + VAR_W, + VAR_H, + VAR_VAL, + VAR_MAXVAL, + VAR_MINVAL, + VAR_NEGVAL, + VAR_CLIPVAL, + VAR_VARS_NB +}; + +typedef struct { + const AVClass *class; + uint8_t lut[4][256]; ///< lookup table for each component + char *comp_expr_str[4]; + AVExpr *comp_expr[4]; + int hsub, vsub; + double var_values[VAR_VARS_NB]; + int is_rgb, is_yuv; + int rgba_map[4]; + int step; + int negate_alpha; /* only used by negate */ +} LutContext; + +#define Y 0 +#define U 1 +#define V 2 +#define R 0 +#define G 1 +#define B 2 +#define A 3 + +#define OFFSET(x) offsetof(LutContext, x) + +static const AVOption lut_options[] = { + {"c0", "set component #0 expression", OFFSET(comp_expr_str[0]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX}, + {"c1", "set component #1 expression", OFFSET(comp_expr_str[1]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX}, + {"c2", "set component #2 expression", OFFSET(comp_expr_str[2]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX}, + {"c3", "set component #3 expression", OFFSET(comp_expr_str[3]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX}, + {"y", "set Y expression", OFFSET(comp_expr_str[Y]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX}, + {"u", "set U expression", OFFSET(comp_expr_str[U]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX}, + {"v", "set V expression", OFFSET(comp_expr_str[V]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX}, + {"r", "set R expression", OFFSET(comp_expr_str[R]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX}, + {"g", "set G expression", OFFSET(comp_expr_str[G]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX}, + {"b", "set B expression", OFFSET(comp_expr_str[B]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX}, + {"a", "set A expression", OFFSET(comp_expr_str[A]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX}, + {NULL}, +}; + +static const char *lut_get_name(void *ctx) +{ + return "lut"; +} + +static const AVClass lut_class = { + "LutContext", + lut_get_name, + lut_options +}; + +static int init(AVFilterContext *ctx, const char *args, void *opaque) +{ + LutContext *lut = ctx->priv; + int ret; + + lut->class = &lut_class; + av_opt_set_defaults(lut); + + lut->var_values[VAR_PHI] = M_PHI; + lut->var_values[VAR_PI] = M_PI; + lut->var_values[VAR_E ] = M_E; + + lut->is_rgb = !strcmp(ctx->filter->name, "lutrgb"); + lut->is_yuv = !strcmp(ctx->filter->name, "lutyuv"); + if (args && (ret = av_set_options_string(lut, args, "=", ":")) < 0) + return ret; + + return 0; +} + +static av_cold void uninit(AVFilterContext *ctx) +{ + LutContext *lut = ctx->priv; + int i; + + for (i = 0; i < 4; i++) { + av_expr_free(lut->comp_expr[i]); + lut->comp_expr[i] = NULL; + av_freep(&lut->comp_expr_str[i]); + } +} + +#define YUV_FORMATS \ + PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, \ + PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_YUV440P, \ + PIX_FMT_YUVA420P, \ + PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, \ + PIX_FMT_YUVJ440P + +#define RGB_FORMATS \ + PIX_FMT_ARGB, PIX_FMT_RGBA, \ + PIX_FMT_ABGR, PIX_FMT_BGRA, \ + PIX_FMT_RGB24, PIX_FMT_BGR24 + +static enum PixelFormat yuv_pix_fmts[] = { YUV_FORMATS, PIX_FMT_NONE }; +static enum PixelFormat rgb_pix_fmts[] = { RGB_FORMATS, PIX_FMT_NONE }; +static enum PixelFormat all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, PIX_FMT_NONE }; + +static int query_formats(AVFilterContext *ctx) +{ + LutContext *lut = ctx->priv; + + enum PixelFormat *pix_fmts = lut->is_rgb ? rgb_pix_fmts : + lut->is_yuv ? yuv_pix_fmts : all_pix_fmts; + + avfilter_set_common_formats(ctx, avfilter_make_format_list(pix_fmts)); + return 0; +} + +/** + * Clip value val in the minval - maxval range. + */ +static double clip(void *opaque, double val) +{ + LutContext *lut = opaque; + double minval = lut->var_values[VAR_MINVAL]; + double maxval = lut->var_values[VAR_MAXVAL]; + + return av_clip(val, minval, maxval); +} + +/** + * Compute gamma correction for value val, assuming the minval-maxval + * range, val is clipped to a value contained in the same interval. + */ +static double compute_gammaval(void *opaque, double gamma) +{ + LutContext *lut = opaque; + double val = lut->var_values[VAR_CLIPVAL]; + double minval = lut->var_values[VAR_MINVAL]; + double maxval = lut->var_values[VAR_MAXVAL]; + + return pow((val-minval)/(maxval-minval), gamma) * (maxval-minval)+minval; +} + +static double (* const funcs1[])(void *, double) = { + clip, + compute_gammaval, + NULL +}; + +static const char * const funcs1_names[] = { + "clip", + "gammaval", + NULL +}; + +static int config_props(AVFilterLink *inlink) +{ + AVFilterContext *ctx = inlink->dst; + LutContext *lut = ctx->priv; + const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[inlink->format]; + int min[4], max[4]; + int val, comp, ret; + + lut->hsub = desc->log2_chroma_w; + lut->vsub = desc->log2_chroma_h; + + lut->var_values[VAR_W] = inlink->w; + lut->var_values[VAR_H] = inlink->h; + + switch (inlink->format) { + case PIX_FMT_YUV410P: + case PIX_FMT_YUV411P: + case PIX_FMT_YUV420P: + case PIX_FMT_YUV422P: + case PIX_FMT_YUV440P: + case PIX_FMT_YUV444P: + case PIX_FMT_YUVA420P: + min[Y] = min[U] = min[V] = 16; + max[Y] = 235; + max[U] = max[V] = 240; + min[A] = 0; max[A] = 255; + break; + default: + min[0] = min[1] = min[2] = min[3] = 0; + max[0] = max[1] = max[2] = max[3] = 255; + } + + lut->is_yuv = lut->is_rgb = 0; + if (ff_fmt_is_in(inlink->format, yuv_pix_fmts)) lut->is_yuv = 1; + else if (ff_fmt_is_in(inlink->format, rgb_pix_fmts)) lut->is_rgb = 1; + + if (lut->is_rgb) { + switch (inlink->format) { + case PIX_FMT_ARGB: lut->rgba_map[A] = 0; lut->rgba_map[R] = 1; lut->rgba_map[G] = 2; lut->rgba_map[B] = 3; break; + case PIX_FMT_ABGR: lut->rgba_map[A] = 0; lut->rgba_map[B] = 1; lut->rgba_map[G] = 2; lut->rgba_map[R] = 3; break; + case PIX_FMT_RGBA: + case PIX_FMT_RGB24: lut->rgba_map[R] = 0; lut->rgba_map[G] = 1; lut->rgba_map[B] = 2; lut->rgba_map[A] = 3; break; + case PIX_FMT_BGRA: + case PIX_FMT_BGR24: lut->rgba_map[B] = 0; lut->rgba_map[G] = 1; lut->rgba_map[R] = 2; lut->rgba_map[A] = 3; break; + } + lut->step = av_get_bits_per_pixel(desc) >> 3; + } + + for (comp = 0; comp < desc->nb_components; comp++) { + double res; + + /* create the parsed expression */ + ret = av_expr_parse(&lut->comp_expr[comp], lut->comp_expr_str[comp], + var_names, funcs1_names, funcs1, NULL, NULL, 0, ctx); + if (ret < 0) { + av_log(ctx, AV_LOG_ERROR, + "Error when parsing the expression '%s' for the component %d.\n", + lut->comp_expr_str[comp], comp); + return AVERROR(EINVAL); + } + + /* compute the lut */ + lut->var_values[VAR_MAXVAL] = max[comp]; + lut->var_values[VAR_MINVAL] = min[comp]; + + for (val = 0; val < 256; val++) { + lut->var_values[VAR_VAL] = val; + lut->var_values[VAR_CLIPVAL] = av_clip(val, min[comp], max[comp]); + lut->var_values[VAR_NEGVAL] = + av_clip(min[comp] + max[comp] - lut->var_values[VAR_VAL], + min[comp], max[comp]); + + res = av_expr_eval(lut->comp_expr[comp], lut->var_values, lut); + if (isnan(res)) { + av_log(ctx, AV_LOG_ERROR, + "Error when evaluating the expression '%s' for the value %d for the component #%d.\n", + lut->comp_expr_str[comp], val, comp); + return AVERROR(EINVAL); + } + lut->lut[comp][val] = av_clip((int)res, min[comp], max[comp]); + av_log(ctx, AV_LOG_DEBUG, "val[%d][%d] = %d\n", comp, val, lut->lut[comp][val]); + } + } + + return 0; +} + +static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) +{ + AVFilterContext *ctx = inlink->dst; + LutContext *lut = ctx->priv; + AVFilterLink *outlink = ctx->outputs[0]; + AVFilterBufferRef *inpic = inlink ->cur_buf; + AVFilterBufferRef *outpic = outlink->out_buf; + uint8_t *inrow, *outrow, *inrow0, *outrow0; + int i, j, k, plane; + + if (lut->is_rgb) { + /* packed */ + inrow0 = inpic ->data[0] + y * inpic ->linesize[0]; + outrow0 = outpic->data[0] + y * outpic->linesize[0]; + + for (i = 0; i < h; i ++) { + inrow = inrow0; + outrow = outrow0; + for (j = 0; j < inlink->w; j++) { + for (k = 0; k < lut->step; k++) + outrow[k] = lut->lut[lut->rgba_map[k]][inrow[k]]; + outrow += lut->step; + inrow += lut->step; + } + inrow0 += inpic ->linesize[0]; + outrow0 += outpic->linesize[0]; + } + } else { + /* planar */ + for (plane = 0; plane < 4 && inpic->data[plane]; plane++) { + int vsub = plane == 1 || plane == 2 ? lut->vsub : 0; + int hsub = plane == 1 || plane == 2 ? lut->hsub : 0; + + inrow = inpic ->data[plane] + (y>>vsub) * inpic ->linesize[plane]; + outrow = outpic->data[plane] + (y>>vsub) * outpic->linesize[plane]; + + for (i = 0; i < h>>vsub; i ++) { + for (j = 0; j < inlink->w>>hsub; j++) + outrow[j] = lut->lut[plane][inrow[j]]; + inrow += inpic ->linesize[plane]; + outrow += outpic->linesize[plane]; + } + } + } + + avfilter_draw_slice(outlink, y, h, slice_dir); +} + +#define DEFINE_LUT_FILTER(name_, description_, init_) \ + AVFilter avfilter_vf_##name_ = { \ + .name = #name_, \ + .description = NULL_IF_CONFIG_SMALL(description_), \ + .priv_size = sizeof(LutContext), \ + \ + .init = init_, \ + .uninit = uninit, \ + .query_formats = query_formats, \ + \ + .inputs = (AVFilterPad[]) {{ .name = "default", \ + .type = AVMEDIA_TYPE_VIDEO, \ + .draw_slice = draw_slice, \ + .config_props = config_props, \ + .min_perms = AV_PERM_READ, }, \ + { .name = NULL}}, \ + .outputs = (AVFilterPad[]) {{ .name = "default", \ + .type = AVMEDIA_TYPE_VIDEO, }, \ + { .name = NULL}}, \ + } + +#if CONFIG_LUT_FILTER +DEFINE_LUT_FILTER(lut, "Compute and apply a lookup table to the RGB/YUV input video.", init); +#endif +#if CONFIG_LUTYUV_FILTER +DEFINE_LUT_FILTER(lutyuv, "Compute and apply a lookup table to the YUV input video.", init); +#endif +#if CONFIG_LUTRGB_FILTER +DEFINE_LUT_FILTER(lutrgb, "Compute and apply a lookup table to the RGB input video.", init); +#endif + +#if CONFIG_NEGATE_FILTER + +static int negate_init(AVFilterContext *ctx, const char *args, void *opaque) +{ + LutContext *lut = ctx->priv; + char lut_params[64]; + + if (args) + sscanf(args, "%d", &lut->negate_alpha); + + av_log(ctx, AV_LOG_DEBUG, "negate_alpha:%d\n", lut->negate_alpha); + + snprintf(lut_params, sizeof(lut_params), "c0=negval:c1=negval:c2=negval:a=%s", + lut->negate_alpha ? "negval" : "val"); + + return init(ctx, lut_params, opaque); +} + +DEFINE_LUT_FILTER(negate, "Negate input video.", negate_init); + +#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_overlay.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_overlay.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_overlay.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_overlay.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,6 +30,7 @@ #include "libavutil/avstring.h" #include "libavutil/pixdesc.h" #include "libavutil/imgutils.h" +#include "libavutil/mathematics.h" #include "internal.h" static const char *var_names[] = { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_pad.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_pad.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_pad.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_pad.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,7 +21,7 @@ /** * @file - * video padding filter and color source + * video padding filter */ #include "avfilter.h" @@ -32,6 +32,7 @@ #include "libavutil/avassert.h" #include "libavutil/imgutils.h" #include "libavutil/parseutils.h" +#include "libavutil/mathematics.h" #include "drawutils.h" static const char *var_names[] = { @@ -157,7 +158,7 @@ var_values[VAR_OUT_H] = var_values[VAR_OH] = NAN; var_values[VAR_A] = (float) inlink->w / inlink->h; var_values[VAR_HSUB] = 1<hsub; - var_values[VAR_VSUB] = 2<vsub; + var_values[VAR_VSUB] = 1<vsub; /* evaluate width and height */ av_expr_parse_and_eval(&res, (expr = pad->w_expr), diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_scale.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_scale.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_scale.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_scale.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,7 @@ #include "avfilter.h" #include "libavutil/avstring.h" #include "libavutil/eval.h" +#include "libavutil/mathematics.h" #include "libavutil/pixdesc.h" #include "libswscale/swscale.h" @@ -37,7 +38,8 @@ "in_h", "ih", "out_w", "ow", "out_h", "oh", - "a", + "a", "dar", + "sar", "hsub", "vsub", NULL @@ -51,7 +53,8 @@ VAR_IN_H, VAR_IH, VAR_OUT_W, VAR_OW, VAR_OUT_H, VAR_OH, - VAR_A, + VAR_A, VAR_DAR, + VAR_SAR, VAR_HSUB, VAR_VSUB, VARS_NB @@ -148,7 +151,9 @@ var_values[VAR_IN_H] = var_values[VAR_IH] = inlink->h; var_values[VAR_OUT_W] = var_values[VAR_OW] = NAN; var_values[VAR_OUT_H] = var_values[VAR_OH] = NAN; - var_values[VAR_A] = (float) inlink->w / inlink->h; + var_values[VAR_DAR] = var_values[VAR_A] = (float) inlink->w / inlink->h; + var_values[VAR_SAR] = inlink->sample_aspect_ratio.num ? + (float) inlink->sample_aspect_ratio.num / inlink->sample_aspect_ratio.den : 1; var_values[VAR_HSUB] = 1<format].log2_chroma_w; var_values[VAR_VSUB] = 1<format].log2_chroma_h; @@ -205,12 +210,22 @@ scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL; + if (scale->sws) + sws_freeContext(scale->sws); scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format, outlink->w, outlink->h, outlink->format, scale->flags, NULL, NULL, NULL); if (!scale->sws) return AVERROR(EINVAL); + + if (inlink->sample_aspect_ratio.num) + outlink->sample_aspect_ratio = av_mul_q((AVRational){outlink->h*inlink->w, + outlink->w*inlink->h}, + inlink->sample_aspect_ratio); + else + outlink->sample_aspect_ratio = inlink->sample_aspect_ratio; + return 0; fail: diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_select.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_select.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_select.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_select.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,353 @@ +/* + * Copyright (c) 2011 Stefano Sabatini + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * filter for selecting which frame passes in the filterchain + */ + +#include "libavutil/eval.h" +#include "libavutil/fifo.h" +#include "libavutil/mathematics.h" +#include "avfilter.h" + +static const char *var_names[] = { + "E", ///< Euler number + "PHI", ///< golden ratio + "PI", ///< greek pi + + "TB", ///< timebase + + "pts", ///< original pts in the file of the frame + "start_pts", ///< first PTS in the stream, expressed in TB units + "prev_pts", ///< previous frame PTS + "prev_selected_pts", ///< previous selected frame PTS + + "t", ///< first PTS in seconds + "start_t", ///< first PTS in the stream, expressed in seconds + "prev_t", ///< previous frame time + "prev_selected_t", ///< previously selected time + + "pict_type", ///< the type of picture in the movie + "I", + "P", + "B", + "S", + "SI", + "SP", + "BI", + + "interlace_type", ///< the frame interlace type + "PROGRESSIVE", + "TOPFIRST", + "BOTTOMFIRST", + + "n", ///< frame number (starting from zero) + "selected_n", ///< selected frame number (starting from zero) + "prev_selected_n", ///< number of the last selected frame + + "key", ///< tell if the frame is a key frame + "pos", ///< original position in the file of the frame + + NULL +}; + +enum var_name { + VAR_E, + VAR_PHI, + VAR_PI, + + VAR_TB, + + VAR_PTS, + VAR_START_PTS, + VAR_PREV_PTS, + VAR_PREV_SELECTED_PTS, + + VAR_T, + VAR_START_T, + VAR_PREV_T, + VAR_PREV_SELECTED_T, + + VAR_PICT_TYPE, + VAR_PICT_TYPE_I, + VAR_PICT_TYPE_P, + VAR_PICT_TYPE_B, + VAR_PICT_TYPE_S, + VAR_PICT_TYPE_SI, + VAR_PICT_TYPE_SP, + VAR_PICT_TYPE_BI, + + VAR_INTERLACE_TYPE, + VAR_INTERLACE_TYPE_P, + VAR_INTERLACE_TYPE_T, + VAR_INTERLACE_TYPE_B, + + VAR_N, + VAR_SELECTED_N, + VAR_PREV_SELECTED_N, + + VAR_KEY, + VAR_POS, + + VAR_VARS_NB +}; + +#define FIFO_SIZE 8 + +typedef struct { + AVExpr *expr; + double var_values[VAR_VARS_NB]; + double select; + int cache_frames; + AVFifoBuffer *pending_frames; ///< FIFO buffer of video frames +} SelectContext; + +static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) +{ + SelectContext *select = ctx->priv; + int ret; + + if ((ret = av_expr_parse(&select->expr, args ? args : "1", + var_names, NULL, NULL, NULL, NULL, 0, ctx)) < 0) { + av_log(ctx, AV_LOG_ERROR, "Error while parsing expression '%s'\n", args); + return ret; + } + + select->pending_frames = av_fifo_alloc(FIFO_SIZE*sizeof(AVFilterBufferRef*)); + if (!select->pending_frames) { + av_log(ctx, AV_LOG_ERROR, "Failed to allocate pending frames buffer.\n"); + return AVERROR(ENOMEM); + } + return 0; +} + +#define INTERLACE_TYPE_P 0 +#define INTERLACE_TYPE_T 1 +#define INTERLACE_TYPE_B 2 + +static int config_input(AVFilterLink *inlink) +{ + SelectContext *select = inlink->dst->priv; + + select->var_values[VAR_E] = M_E; + select->var_values[VAR_PHI] = M_PHI; + select->var_values[VAR_PI] = M_PI; + + select->var_values[VAR_N] = 0.0; + select->var_values[VAR_SELECTED_N] = 0.0; + + select->var_values[VAR_TB] = av_q2d(inlink->time_base); + + select->var_values[VAR_PREV_PTS] = NAN; + select->var_values[VAR_PREV_SELECTED_PTS] = NAN; + select->var_values[VAR_PREV_SELECTED_T] = NAN; + select->var_values[VAR_START_PTS] = NAN; + select->var_values[VAR_START_T] = NAN; + + select->var_values[VAR_PICT_TYPE_I] = AV_PICTURE_TYPE_I; + select->var_values[VAR_PICT_TYPE_P] = AV_PICTURE_TYPE_P; + select->var_values[VAR_PICT_TYPE_B] = AV_PICTURE_TYPE_B; + select->var_values[VAR_PICT_TYPE_SI] = AV_PICTURE_TYPE_SI; + select->var_values[VAR_PICT_TYPE_SP] = AV_PICTURE_TYPE_SP; + + select->var_values[VAR_INTERLACE_TYPE_P] = INTERLACE_TYPE_P; + select->var_values[VAR_INTERLACE_TYPE_T] = INTERLACE_TYPE_T; + select->var_values[VAR_INTERLACE_TYPE_B] = INTERLACE_TYPE_B;; + + return 0; +} + +#define D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d)) +#define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) + +static int select_frame(AVFilterContext *ctx, AVFilterBufferRef *picref) +{ + SelectContext *select = ctx->priv; + AVFilterLink *inlink = ctx->inputs[0]; + double res; + + if (isnan(select->var_values[VAR_START_PTS])) + select->var_values[VAR_START_PTS] = TS2D(picref->pts); + if (isnan(select->var_values[VAR_START_T])) + select->var_values[VAR_START_T] = TS2D(picref->pts) * av_q2d(inlink->time_base); + + select->var_values[VAR_PTS] = TS2D(picref->pts); + select->var_values[VAR_T ] = TS2D(picref->pts) * av_q2d(inlink->time_base); + select->var_values[VAR_POS] = picref->pos == -1 ? NAN : picref->pos; + select->var_values[VAR_PREV_PTS] = TS2D(picref ->pts); + + select->var_values[VAR_INTERLACE_TYPE] = + !picref->video->interlaced ? INTERLACE_TYPE_P : + picref->video->top_field_first ? INTERLACE_TYPE_T : INTERLACE_TYPE_B; + select->var_values[VAR_PICT_TYPE] = picref->video->pict_type; + + res = av_expr_eval(select->expr, select->var_values, NULL); + av_log(inlink->dst, AV_LOG_DEBUG, + "n:%d pts:%d t:%f pos:%d interlace_type:%c key:%d pict_type:%c " + "-> select:%f\n", + (int)select->var_values[VAR_N], + (int)select->var_values[VAR_PTS], + select->var_values[VAR_T], + (int)select->var_values[VAR_POS], + select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_P ? 'P' : + select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_T ? 'T' : + select->var_values[VAR_INTERLACE_TYPE] == INTERLACE_TYPE_B ? 'B' : '?', + (int)select->var_values[VAR_KEY], + av_get_picture_type_char(select->var_values[VAR_PICT_TYPE]), + res); + + select->var_values[VAR_N] += 1.0; + + if (res) { + select->var_values[VAR_PREV_SELECTED_N] = select->var_values[VAR_N]; + select->var_values[VAR_PREV_SELECTED_PTS] = select->var_values[VAR_PTS]; + select->var_values[VAR_PREV_SELECTED_T] = select->var_values[VAR_T]; + select->var_values[VAR_SELECTED_N] += 1.0; + } + return res; +} + +static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) +{ + SelectContext *select = inlink->dst->priv; + + select->select = select_frame(inlink->dst, picref); + if (select->select) { + /* frame was requested through poll_frame */ + if (select->cache_frames) { + if (!av_fifo_space(select->pending_frames)) + av_log(inlink->dst, AV_LOG_ERROR, + "Buffering limit reached, cannot cache more frames\n"); + else + av_fifo_generic_write(select->pending_frames, &picref, + sizeof(picref), NULL); + return; + } + avfilter_start_frame(inlink->dst->outputs[0], avfilter_ref_buffer(picref, ~0)); + } +} + +static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) +{ + SelectContext *select = inlink->dst->priv; + + if (select->select && !select->cache_frames) + avfilter_draw_slice(inlink->dst->outputs[0], y, h, slice_dir); +} + +static void end_frame(AVFilterLink *inlink) +{ + SelectContext *select = inlink->dst->priv; + AVFilterBufferRef *picref = inlink->cur_buf; + + if (select->select) { + if (select->cache_frames) + return; + avfilter_end_frame(inlink->dst->outputs[0]); + } + avfilter_unref_buffer(picref); +} + +static int request_frame(AVFilterLink *outlink) +{ + AVFilterContext *ctx = outlink->src; + SelectContext *select = ctx->priv; + AVFilterLink *inlink = outlink->src->inputs[0]; + select->select = 0; + + if (av_fifo_size(select->pending_frames)) { + AVFilterBufferRef *picref; + av_fifo_generic_read(select->pending_frames, &picref, sizeof(picref), NULL); + avfilter_start_frame(outlink, avfilter_ref_buffer(picref, ~0)); + avfilter_draw_slice(outlink, 0, outlink->h, 1); + avfilter_end_frame(outlink); + avfilter_unref_buffer(picref); + return 0; + } + + while (!select->select) { + int ret = avfilter_request_frame(inlink); + if (ret < 0) + return ret; + } + + return 0; +} + +static int poll_frame(AVFilterLink *outlink) +{ + SelectContext *select = outlink->src->priv; + AVFilterLink *inlink = outlink->src->inputs[0]; + int count, ret; + + if (!av_fifo_size(select->pending_frames)) { + if ((count = avfilter_poll_frame(inlink)) <= 0) + return count; + /* request frame from input, and apply select condition to it */ + select->cache_frames = 1; + while (count-- && av_fifo_space(select->pending_frames)) { + ret = avfilter_request_frame(inlink); + if (ret < 0) + break; + } + select->cache_frames = 0; + } + + return av_fifo_size(select->pending_frames)/sizeof(AVFilterBufferRef *); +} + +static av_cold void uninit(AVFilterContext *ctx) +{ + SelectContext *select = ctx->priv; + AVFilterBufferRef *picref; + + av_expr_free(select->expr); + select->expr = NULL; + + while (select->pending_frames && + av_fifo_generic_read(select->pending_frames, &picref, sizeof(picref), NULL) == sizeof(picref)) + avfilter_unref_buffer(picref); + av_fifo_free(select->pending_frames); + select->pending_frames = NULL; +} + +AVFilter avfilter_vf_select = { + .name = "select", + .description = NULL_IF_CONFIG_SMALL("Select frames to pass in output."), + .init = init, + .uninit = uninit, + + .priv_size = sizeof(SelectContext), + + .inputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .get_video_buffer = avfilter_null_get_video_buffer, + .config_props = config_input, + .start_frame = start_frame, + .draw_slice = draw_slice, + .end_frame = end_frame }, + { .name = NULL }}, + .outputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .poll_frame = poll_frame, + .request_frame = request_frame, }, + { .name = NULL}}, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_setpts.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_setpts.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_setpts.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_setpts.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,6 +27,7 @@ /* #define DEBUG */ #include "libavutil/eval.h" +#include "libavutil/mathematics.h" #include "avfilter.h" static const char *var_names[] = { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_settb.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_settb.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_settb.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_settb.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,7 @@ #include "libavutil/avstring.h" #include "libavutil/eval.h" +#include "libavutil/mathematics.h" #include "libavutil/rational.h" #include "avfilter.h" #include "internal.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_showinfo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_showinfo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_showinfo.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_showinfo.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2011 Stefano Sabatini + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * filter for showing textual video frame information + */ + +#include "libavutil/adler32.h" +#include "libavutil/imgutils.h" +#include "libavutil/pixdesc.h" +#include "avfilter.h" + +typedef struct { + unsigned int frame; +} ShowInfoContext; + +static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) +{ + ShowInfoContext *showinfo = ctx->priv; + showinfo->frame = 0; + return 0; +} + +static void end_frame(AVFilterLink *inlink) +{ + AVFilterContext *ctx = inlink->dst; + ShowInfoContext *showinfo = ctx->priv; + AVFilterBufferRef *picref = inlink->cur_buf; + uint32_t plane_checksum[4] = {0}, checksum = 0; + int i, plane, vsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_h; + + for (plane = 0; picref->data[plane] && plane < 4; plane++) { + size_t linesize = av_image_get_linesize(picref->format, picref->video->w, plane); + uint8_t *data = picref->data[plane]; + int h = plane == 1 || plane == 2 ? inlink->h >> vsub : inlink->h; + + for (i = 0; i < h; i++) { + plane_checksum[plane] = av_adler32_update(plane_checksum[plane], data, linesize); + checksum = av_adler32_update(checksum, data, linesize); + data += picref->linesize[plane]; + } + } + + av_log(ctx, AV_LOG_INFO, + "n:%d pts:%"PRId64" pts_time:%f pos:%"PRId64" " + "fmt:%s sar:%d/%d s:%dx%d i:%c iskey:%d type:%c " + "checksum:%u plane_checksum:[%u %u %u %u]\n", + showinfo->frame, + picref->pts, picref->pts * av_q2d(inlink->time_base), picref->pos, + av_pix_fmt_descriptors[picref->format].name, + picref->video->pixel_aspect.num, picref->video->pixel_aspect.den, + picref->video->w, picref->video->h, + !picref->video->interlaced ? 'P' : /* Progressive */ + picref->video->top_field_first ? 'T' : 'B', /* Top / Bottom */ + picref->video->key_frame, + av_get_picture_type_char(picref->video->pict_type), + checksum, plane_checksum[0], plane_checksum[1], plane_checksum[2], plane_checksum[3]); + + showinfo->frame++; + avfilter_end_frame(inlink->dst->outputs[0]); +} + +AVFilter avfilter_vf_showinfo = { + .name = "showinfo", + .description = NULL_IF_CONFIG_SMALL("Show textual information for each video frame."), + + .priv_size = sizeof(ShowInfoContext), + .init = init, + + .inputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .get_video_buffer = avfilter_null_get_video_buffer, + .start_frame = avfilter_null_start_frame, + .end_frame = end_frame, + .min_perms = AV_PERM_READ, }, + { .name = NULL}}, + + .outputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO }, + { .name = NULL}}, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_split.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_split.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_split.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_split.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2007 Bobby Bingham + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Video splitter + */ + +#include "avfilter.h" + +static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) +{ + avfilter_start_frame(inlink->dst->outputs[0], + avfilter_ref_buffer(picref, ~AV_PERM_WRITE)); + avfilter_start_frame(inlink->dst->outputs[1], + avfilter_ref_buffer(picref, ~AV_PERM_WRITE)); +} + +static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) +{ + avfilter_draw_slice(inlink->dst->outputs[0], y, h, slice_dir); + avfilter_draw_slice(inlink->dst->outputs[1], y, h, slice_dir); +} + +static void end_frame(AVFilterLink *inlink) +{ + avfilter_end_frame(inlink->dst->outputs[0]); + avfilter_end_frame(inlink->dst->outputs[1]); + + avfilter_unref_buffer(inlink->cur_buf); +} + +AVFilter avfilter_vf_split = { + .name = "split", + .description = NULL_IF_CONFIG_SMALL("Pass on the input to two outputs."), + + .inputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .get_video_buffer= avfilter_null_get_video_buffer, + .start_frame = start_frame, + .draw_slice = draw_slice, + .end_frame = end_frame, }, + { .name = NULL}}, + .outputs = (AVFilterPad[]) {{ .name = "output1", + .type = AVMEDIA_TYPE_VIDEO, }, + { .name = "output2", + .type = AVMEDIA_TYPE_VIDEO, }, + { .name = NULL}}, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_unsharp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_unsharp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_unsharp.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_unsharp.c 2012-01-11 00:34:30.000000000 +0000 @@ -44,8 +44,8 @@ #define MIN_SIZE 3 #define MAX_SIZE 13 -#define CHROMA_WIDTH(link) -((-link->w) >> av_pix_fmt_descriptors[link->format].log2_chroma_w) -#define CHROMA_HEIGHT(link) -((-link->h) >> av_pix_fmt_descriptors[link->format].log2_chroma_h) +/* right-shift and round-up */ +#define SHIFTUP(x,shift) (-((-(x))>>(shift))) typedef struct FilterParam { int msize_x; ///< matrix width @@ -61,15 +61,19 @@ typedef struct { FilterParam luma; ///< luma parameters (width, height, amount) FilterParam chroma; ///< chroma parameters (width, height, amount) + int hsub, vsub; } UnsharpContext; -static void unsharpen(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride, int width, int height, FilterParam *fp) +static void apply_unsharp( uint8_t *dst, int dst_stride, + const uint8_t *src, int src_stride, + int width, int height, FilterParam *fp) { uint32_t **sc = fp->sc; uint32_t sr[(MAX_SIZE * MAX_SIZE) - 1], tmp1, tmp2; int32_t res; int x, y, z; + const uint8_t *src2; if (!fp->amount) { if (dst_stride == src_stride) @@ -84,9 +88,12 @@ memset(sc[y], 0, sizeof(sc[y][0]) * (width + 2 * fp->steps_x)); for (y = -fp->steps_y; y < height + fp->steps_y; y++) { + if (y < height) + src2 = src; + memset(sr, 0, sizeof(sr[0]) * (2 * fp->steps_x - 1)); for (x = -fp->steps_x; x < width + fp->steps_x; x++) { - tmp1 = x <= 0 ? src[0] : x >= width ? src[width-1] : src[x]; + tmp1 = x <= 0 ? src2[0] : x >= width ? src2[width-1] : src2[x]; for (z = 0; z < fp->steps_x * 2; z += 2) { tmp2 = sr[z + 0] + tmp1; sr[z + 0] = tmp1; tmp1 = sr[z + 1] + tmp2; sr[z + 1] = tmp2; @@ -125,8 +132,8 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) { UnsharpContext *unsharp = ctx->priv; - int lmsize_x = 5, cmsize_x = 0; - int lmsize_y = 5, cmsize_y = 0; + int lmsize_x = 5, cmsize_x = 5; + int lmsize_y = 5, cmsize_y = 5; double lamount = 1.0f, camount = 0.0f; if (args) @@ -178,8 +185,11 @@ { UnsharpContext *unsharp = link->dst->priv; + unsharp->hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w; + unsharp->vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h; + init_filter_param(link->dst, &unsharp->luma, "luma", link->w); - init_filter_param(link->dst, &unsharp->chroma, "chroma", CHROMA_WIDTH(link)); + init_filter_param(link->dst, &unsharp->chroma, "chroma", SHIFTUP(link->w, unsharp->hsub)); return 0; } @@ -205,10 +215,12 @@ UnsharpContext *unsharp = link->dst->priv; AVFilterBufferRef *in = link->cur_buf; AVFilterBufferRef *out = link->dst->outputs[0]->out_buf; + int cw = SHIFTUP(link->w, unsharp->hsub); + int ch = SHIFTUP(link->h, unsharp->vsub); - unsharpen(out->data[0], in->data[0], out->linesize[0], in->linesize[0], link->w, link->h, &unsharp->luma); - unsharpen(out->data[1], in->data[1], out->linesize[1], in->linesize[1], CHROMA_WIDTH(link), CHROMA_HEIGHT(link), &unsharp->chroma); - unsharpen(out->data[2], in->data[2], out->linesize[2], in->linesize[2], CHROMA_WIDTH(link), CHROMA_HEIGHT(link), &unsharp->chroma); + apply_unsharp(out->data[0], out->linesize[0], in->data[0], in->linesize[0], link->w, link->h, &unsharp->luma); + apply_unsharp(out->data[1], out->linesize[1], in->data[1], in->linesize[1], cw, ch, &unsharp->chroma); + apply_unsharp(out->data[2], out->linesize[2], in->data[2], in->linesize[2], cw, ch, &unsharp->chroma); avfilter_unref_buffer(in); avfilter_draw_slice(link->dst->outputs[0], 0, link->h, 1); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_yadif.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_yadif.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vf_yadif.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vf_yadif.c 2012-01-11 00:34:30.000000000 +0000 @@ -38,14 +38,20 @@ int mode; /** - * 0: bottom field first - * 1: top field first + * 0: top field first + * 1: bottom field first * -1: auto-detection */ int parity; int frame_pending; + /** + * 0: deinterlace all frames + * 1: only deinterlace frames marked as interlaced + */ + int auto_enable; + AVFilterBufferRef *cur; AVFilterBufferRef *next; AVFilterBufferRef *prev; @@ -139,9 +145,9 @@ int w = dstpic->video->w; int h = dstpic->video->h; int refs = yadif->cur->linesize[i]; - int df = (yadif->csp->comp[i].depth_minus1+1) / 8; + int df = (yadif->csp->comp[i].depth_minus1 + 8) / 8; - if (i) { + if (i == 1 || i == 2) { /* Why is this not part of the per-plane description thing? */ w >>= yadif->csp->log2_chroma_w; h >>= yadif->csp->log2_chroma_h; @@ -197,13 +203,16 @@ tff = yadif->parity^1; } - if (is_second) + if (is_second) { yadif->out = avfilter_get_video_buffer(link, AV_PERM_WRITE | AV_PERM_PRESERVE | AV_PERM_REUSE, link->w, link->h); + avfilter_copy_buffer_ref_props(yadif->out, yadif->cur); + yadif->out->video->interlaced = 0; + } if (!yadif->csp) yadif->csp = &av_pix_fmt_descriptors[link->format]; - if (yadif->csp->comp[0].depth_minus1 == 15) + if (yadif->csp->comp[0].depth_minus1 / 8 == 1) yadif->filter_line = filter_line_c_16bit; filter(ctx, yadif->out, tff ^ !is_second, tff); @@ -242,6 +251,14 @@ if (!yadif->cur) return; + if (yadif->auto_enable && !yadif->cur->video->interlaced) { + yadif->out = avfilter_ref_buffer(yadif->cur, AV_PERM_READ); + avfilter_unref_buffer(yadif->prev); + yadif->prev = NULL; + avfilter_start_frame(ctx->outputs[0], yadif->out); + return; + } + if (!yadif->prev) yadif->prev = avfilter_ref_buffer(yadif->cur, AV_PERM_READ); @@ -261,6 +278,12 @@ if (!yadif->out) return; + if (yadif->auto_enable && !yadif->cur->video->interlaced) { + avfilter_draw_slice(ctx->outputs[0], 0, link->h, 1); + avfilter_end_frame(ctx->outputs[0]); + return; + } + return_frame(ctx, 0); } @@ -301,6 +324,9 @@ } assert(yadif->next || !val); + if (yadif->auto_enable && yadif->next && !yadif->next->video->interlaced) + return val; + return val * ((yadif->mode&1)+1); } @@ -328,9 +354,13 @@ AV_NE( PIX_FMT_GRAY16BE, PIX_FMT_GRAY16LE ), PIX_FMT_YUV440P, PIX_FMT_YUVJ440P, + AV_NE( PIX_FMT_YUV420P10BE, PIX_FMT_YUV420P10LE ), + AV_NE( PIX_FMT_YUV422P10BE, PIX_FMT_YUV422P10LE ), + AV_NE( PIX_FMT_YUV444P10BE, PIX_FMT_YUV444P10LE ), AV_NE( PIX_FMT_YUV420P16BE, PIX_FMT_YUV420P16LE ), AV_NE( PIX_FMT_YUV422P16BE, PIX_FMT_YUV422P16LE ), AV_NE( PIX_FMT_YUV444P16BE, PIX_FMT_YUV444P16LE ), + PIX_FMT_YUVA420P, PIX_FMT_NONE }; @@ -346,9 +376,10 @@ yadif->mode = 0; yadif->parity = -1; + yadif->auto_enable = 0; yadif->csp = NULL; - if (args) sscanf(args, "%d:%d", &yadif->mode, &yadif->parity); + if (args) sscanf(args, "%d:%d:%d", &yadif->mode, &yadif->parity, &yadif->auto_enable); yadif->filter_line = filter_line_c; if (HAVE_SSSE3 && cpu_flags & AV_CPU_FLAG_SSSE3) @@ -358,7 +389,7 @@ else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) yadif->filter_line = ff_yadif_filter_line_mmx; - av_log(ctx, AV_LOG_INFO, "mode:%d parity:%d\n", yadif->mode, yadif->parity); + av_log(ctx, AV_LOG_INFO, "mode:%d parity:%d auto_enable:%d\n", yadif->mode, yadif->parity, yadif->auto_enable); return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_buffer.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_buffer.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_buffer.c 2011-05-25 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_buffer.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,25 +24,30 @@ */ #include "avfilter.h" +#include "buffersrc.h" #include "vsrc_buffer.h" #include "libavutil/imgutils.h" typedef struct { - int64_t pts; - AVFrame frame; - int has_frame; + AVFilterBufferRef *buf; int h, w; enum PixelFormat pix_fmt; AVRational time_base; ///< time_base to set in the output link AVRational pixel_aspect; } BufferSourceContext; +#define CHECK_PARAM_CHANGE(s, c, width, height, format)\ + if (c->w != width || c->h != height || c->pix_fmt != format) {\ + av_log(s, AV_LOG_ERROR, "Changing frame properties on the fly is not supported.\n");\ + return AVERROR(EINVAL);\ + } + int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect) { BufferSourceContext *c = buffer_filter->priv; - if (c->has_frame) { + if (c->buf) { av_log(buffer_filter, AV_LOG_ERROR, "Buffering several frames is not supported. " "Please consume all available frames before adding a new one.\n" @@ -50,15 +55,35 @@ //return -1; } - memcpy(c->frame.data , frame->data , sizeof(frame->data)); - memcpy(c->frame.linesize, frame->linesize, sizeof(frame->linesize)); - c->frame.interlaced_frame= frame->interlaced_frame; - c->frame.top_field_first = frame->top_field_first; - c->frame.key_frame = frame->key_frame; - c->frame.pict_type = frame->pict_type; - c->pts = pts; - c->pixel_aspect = pixel_aspect; - c->has_frame = 1; + CHECK_PARAM_CHANGE(buffer_filter, c, frame->width, frame->height, frame->format); + + c->buf = avfilter_get_video_buffer(buffer_filter->outputs[0], AV_PERM_WRITE, + c->w, c->h); + av_image_copy(c->buf->data, c->buf->linesize, frame->data, frame->linesize, + c->pix_fmt, c->w, c->h); + + avfilter_copy_frame_props(c->buf, frame); + c->buf->pts = pts; + c->buf->video->pixel_aspect = pixel_aspect; + + return 0; +} + +int av_buffersrc_buffer(AVFilterContext *s, AVFilterBufferRef *buf) +{ + BufferSourceContext *c = s->priv; + + if (c->buf) { + av_log(s, AV_LOG_ERROR, + "Buffering several frames is not supported. " + "Please consume all available frames before adding a new one.\n" + ); + return AVERROR(EINVAL); + } + + CHECK_PARAM_CHANGE(s, c, buf->video->w, buf->video->h, buf->format); + + c->buf = buf; return 0; } @@ -113,36 +138,18 @@ static int request_frame(AVFilterLink *link) { BufferSourceContext *c = link->src->priv; - AVFilterBufferRef *picref; - if (!c->has_frame) { + if (!c->buf) { av_log(link->src, AV_LOG_ERROR, "request_frame() called with no available frame!\n"); //return -1; } - /* This picture will be needed unmodified later for decoding the next - * frame */ - picref = avfilter_get_video_buffer(link, AV_PERM_WRITE | AV_PERM_PRESERVE | - AV_PERM_REUSE2, - link->w, link->h); - - av_image_copy(picref->data, picref->linesize, - c->frame.data, c->frame.linesize, - picref->format, link->w, link->h); - - picref->pts = c->pts; - picref->video->pixel_aspect = c->pixel_aspect; - picref->video->interlaced = c->frame.interlaced_frame; - picref->video->top_field_first = c->frame.top_field_first; - picref->video->key_frame = c->frame.key_frame; - picref->video->pict_type = c->frame.pict_type; - avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0)); + avfilter_start_frame(link, avfilter_ref_buffer(c->buf, ~0)); avfilter_draw_slice(link, 0, link->h, 1); avfilter_end_frame(link); - avfilter_unref_buffer(picref); - - c->has_frame = 0; + avfilter_unref_buffer(c->buf); + c->buf = NULL; return 0; } @@ -150,7 +157,7 @@ static int poll_frame(AVFilterLink *link) { BufferSourceContext *c = link->src->priv; - return !!(c->has_frame); + return !!c->buf; } AVFilter avfilter_vsrc_buffer = { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_buffer.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_buffer.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_buffer.h 2011-05-25 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_buffer.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,4 @@ /* - * Memory buffer source filter * Copyright (c) 2008 Vitor Sessak * * This file is part of Libav. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_color.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_color.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_color.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_color.c 2012-01-11 00:34:30.000000000 +0000 @@ -18,10 +18,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * color source + */ + #include "avfilter.h" #include "libavutil/pixdesc.h" #include "libavutil/colorspace.h" #include "libavutil/imgutils.h" +#include "libavutil/mathematics.h" #include "libavutil/parseutils.h" #include "drawutils.h" @@ -124,6 +130,7 @@ is_packed_rgba ? "rgba" : "yuva"); inlink->w = color->w; inlink->h = color->h; + inlink->time_base = color->time_base; return 0; } @@ -133,8 +140,8 @@ ColorContext *color = link->src->priv; AVFilterBufferRef *picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, color->w, color->h); picref->video->pixel_aspect = (AVRational) {1, 1}; - picref->pts = av_rescale_q(color->pts++, color->time_base, AV_TIME_BASE_Q); - picref->pos = 0; + picref->pts = color->pts++; + picref->pos = -1; avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0)); ff_draw_rectangle(picref->data, picref->linesize, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_movie.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_movie.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_movie.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_movie.c 2012-01-11 00:34:30.000000000 +0000 @@ -57,12 +57,12 @@ #define OFFSET(x) offsetof(MovieContext, x) static const AVOption movie_options[]= { -{"format_name", "set format name", OFFSET(format_name), FF_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX }, -{"f", "set format name", OFFSET(format_name), FF_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX }, -{"stream_index", "set stream index", OFFSET(stream_index), FF_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX }, -{"si", "set stream index", OFFSET(stream_index), FF_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX }, -{"seek_point", "set seekpoint (seconds)", OFFSET(seek_point_d), FF_OPT_TYPE_DOUBLE, {.dbl = 0}, 0, (INT64_MAX-1) / 1000000 }, -{"sp", "set seekpoint (seconds)", OFFSET(seek_point_d), FF_OPT_TYPE_DOUBLE, {.dbl = 0}, 0, (INT64_MAX-1) / 1000000 }, +{"format_name", "set format name", OFFSET(format_name), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX }, +{"f", "set format name", OFFSET(format_name), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX }, +{"stream_index", "set stream index", OFFSET(stream_index), AV_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX }, +{"si", "set stream index", OFFSET(stream_index), AV_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX }, +{"seek_point", "set seekpoint (seconds)", OFFSET(seek_point_d), AV_OPT_TYPE_DOUBLE, {.dbl = 0}, 0, (INT64_MAX-1) / 1000000 }, +{"sp", "set seekpoint (seconds)", OFFSET(seek_point_d), AV_OPT_TYPE_DOUBLE, {.dbl = 0}, 0, (INT64_MAX-1) / 1000000 }, {NULL}, }; @@ -96,7 +96,7 @@ "Failed to avformat_open_input '%s'\n", movie->file_name); return ret; } - if ((ret = av_find_stream_info(movie->format_ctx)) < 0) + if ((ret = avformat_find_stream_info(movie->format_ctx, NULL)) < 0) av_log(ctx, AV_LOG_WARNING, "Failed to find stream info\n"); // if seeking requested, we execute it @@ -139,7 +139,7 @@ return AVERROR(EINVAL); } - if ((ret = avcodec_open(movie->codec_ctx, codec)) < 0) { + if ((ret = avcodec_open2(movie->codec_ctx, codec, NULL)) < 0) { av_log(ctx, AV_LOG_ERROR, "Failed to open codec\n"); return ret; } @@ -164,7 +164,7 @@ MovieContext *movie = ctx->priv; int ret; movie->class = &movie_class; - av_opt_set_defaults2(movie, 0, 0); + av_opt_set_defaults(movie); if (args) movie->file_name = av_get_token(&args, ":"); @@ -192,7 +192,7 @@ if (movie->codec_ctx) avcodec_close(movie->codec_ctx); if (movie->format_ctx) - av_close_input_file(movie->format_ctx); + avformat_close_input(&movie->format_ctx); avfilter_unref_buffer(movie->picref); av_freep(&movie->frame); } @@ -240,6 +240,7 @@ av_image_copy(movie->picref->data, movie->picref->linesize, movie->frame->data, movie->frame->linesize, movie->picref->format, outlink->w, outlink->h); + avfilter_copy_frame_props(movie->picref, movie->frame); /* FIXME: use a PTS correction mechanism as that in * ffplay.c when some API will be available for that */ @@ -248,12 +249,8 @@ movie->frame->pkt_dts : movie->frame->pkt_pts; movie->picref->pos = movie->frame->reordered_opaque; - movie->picref->video->pixel_aspect = st->sample_aspect_ratio.num ? - st->sample_aspect_ratio : movie->codec_ctx->sample_aspect_ratio; - movie->picref->video->interlaced = movie->frame->interlaced_frame; - movie->picref->video->top_field_first = movie->frame->top_field_first; - movie->picref->video->key_frame = movie->frame->key_frame; - movie->picref->video->pict_type = movie->frame->pict_type; + if (!movie->frame->sample_aspect_ratio.num) + movie->picref->video->pixel_aspect = st->sample_aspect_ratio; av_dlog(outlink->src, "movie_get_frame(): file:'%s' pts:%"PRId64" time:%lf pos:%"PRId64" aspect:%d/%d\n", movie->file_name, movie->picref->pts, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_nullsrc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_nullsrc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_nullsrc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_nullsrc.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,7 @@ #include "libavutil/avstring.h" #include "libavutil/eval.h" +#include "libavutil/mathematics.h" #include "libavutil/parseutils.h" #include "avfilter.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_testsrc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_testsrc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/vsrc_testsrc.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/vsrc_testsrc.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,499 @@ +/* + * Copyright (c) 2007 Nicolas George + * Copyright (c) 2011 Stefano Sabatini + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Misc test sources. + * + * testsrc is based on the test pattern generator demuxer by Nicolas George: + * http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2007-October/037845.html + * + * rgbtestsrc is ported from MPlayer libmpcodecs/vf_rgbtest.c by + * Michael Niedermayer. + */ + +#include + +#include "libavutil/mathematics.h" +#include "libavutil/opt.h" +#include "libavutil/intreadwrite.h" +#include "libavutil/parseutils.h" +#include "avfilter.h" + +typedef struct { + const AVClass *class; + int h, w; + unsigned int nb_frame; + AVRational time_base; + int64_t pts, max_pts; + char *size; ///< video frame size + char *rate; ///< video frame rate + char *duration; ///< total duration of the generated video + AVRational sar; ///< sample aspect ratio + + void (* fill_picture_fn)(AVFilterContext *ctx, AVFilterBufferRef *picref); + + /* only used by rgbtest */ + int rgba_map[4]; +} TestSourceContext; + +#define OFFSET(x) offsetof(TestSourceContext, x) + +static const AVOption testsrc_options[] = { + { "size", "set video size", OFFSET(size), FF_OPT_TYPE_STRING, {.str = "320x240"}}, + { "s", "set video size", OFFSET(size), FF_OPT_TYPE_STRING, {.str = "320x240"}}, + { "rate", "set video rate", OFFSET(rate), FF_OPT_TYPE_STRING, {.str = "25"}, }, + { "r", "set video rate", OFFSET(rate), FF_OPT_TYPE_STRING, {.str = "25"}, }, + { "duration", "set video duration", OFFSET(duration), FF_OPT_TYPE_STRING, {.str = NULL}, }, + { "sar", "set video sample aspect ratio", OFFSET(sar), FF_OPT_TYPE_RATIONAL, {1}, 0, INT_MAX }, + { NULL }, +}; + +static av_cold int init_common(AVFilterContext *ctx, const char *args, void *opaque) +{ + TestSourceContext *test = ctx->priv; + AVRational frame_rate_q; + int64_t duration = -1; + int ret = 0; + + av_opt_set_defaults(test); + + if ((ret = (av_set_options_string(test, args, "=", ":"))) < 0) { + av_log(ctx, AV_LOG_ERROR, "Error parsing options string: '%s'\n", args); + return ret; + } + + if ((ret = av_parse_video_size(&test->w, &test->h, test->size)) < 0) { + av_log(ctx, AV_LOG_ERROR, "Invalid frame size: '%s'\n", test->size); + return ret; + } + + if ((ret = av_parse_video_rate(&frame_rate_q, test->rate)) < 0 || + frame_rate_q.den <= 0 || frame_rate_q.num <= 0) { + av_log(ctx, AV_LOG_ERROR, "Invalid frame rate: '%s'\n", test->rate); + return ret; + } + + if ((test->duration) && (ret = av_parse_time(&duration, test->duration, 1)) < 0) { + av_log(ctx, AV_LOG_ERROR, "Invalid duration: '%s'\n", test->duration); + return ret; + } + + test->time_base.num = frame_rate_q.den; + test->time_base.den = frame_rate_q.num; + test->max_pts = duration >= 0 ? + av_rescale_q(duration, AV_TIME_BASE_Q, test->time_base) : -1; + test->nb_frame = 0; + test->pts = 0; + + av_log(ctx, AV_LOG_DEBUG, "size:%dx%d rate:%d/%d duration:%f sar:%d/%d\n", + test->w, test->h, frame_rate_q.num, frame_rate_q.den, + duration < 0 ? -1 : test->max_pts * av_q2d(test->time_base), + test->sar.num, test->sar.den); + return 0; +} + +static int config_props(AVFilterLink *outlink) +{ + TestSourceContext *test = outlink->src->priv; + + outlink->w = test->w; + outlink->h = test->h; + outlink->sample_aspect_ratio = test->sar; + outlink->time_base = test->time_base; + + return 0; +} + +static int request_frame(AVFilterLink *outlink) +{ + TestSourceContext *test = outlink->src->priv; + AVFilterBufferRef *picref; + + if (test->max_pts >= 0 && test->pts > test->max_pts) + return AVERROR_EOF; + picref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, + test->w, test->h); + picref->pts = test->pts++; + picref->pos = -1; + picref->video->key_frame = 1; + picref->video->interlaced = 0; + picref->video->pict_type = AV_PICTURE_TYPE_I; + picref->video->pixel_aspect = test->sar; + test->nb_frame++; + test->fill_picture_fn(outlink->src, picref); + + avfilter_start_frame(outlink, avfilter_ref_buffer(picref, ~0)); + avfilter_draw_slice(outlink, 0, picref->video->h, 1); + avfilter_end_frame(outlink); + avfilter_unref_buffer(picref); + + return 0; +} + +#if CONFIG_TESTSRC_FILTER + +static const char *testsrc_get_name(void *ctx) +{ + return "testsrc"; +} + +static const AVClass testsrc_class = { + .class_name = "TestSourceContext", + .item_name = testsrc_get_name, + .option = testsrc_options, +}; + +/** + * Fill a rectangle with value val. + * + * @param val the RGB value to set + * @param dst pointer to the destination buffer to fill + * @param dst_linesize linesize of destination + * @param segment_width width of the segment + * @param x horizontal coordinate where to draw the rectangle in the destination buffer + * @param y horizontal coordinate where to draw the rectangle in the destination buffer + * @param w width of the rectangle to draw, expressed as a number of segment_width units + * @param h height of the rectangle to draw, expressed as a number of segment_width units + */ +static void draw_rectangle(unsigned val, uint8_t *dst, int dst_linesize, unsigned segment_width, + unsigned x, unsigned y, unsigned w, unsigned h) +{ + int i; + int step = 3; + + dst += segment_width * (step * x + y * dst_linesize); + w *= segment_width * step; + h *= segment_width; + for (i = 0; i < h; i++) { + memset(dst, val, w); + dst += dst_linesize; + } +} + +static void draw_digit(int digit, uint8_t *dst, unsigned dst_linesize, + unsigned segment_width) +{ +#define TOP_HBAR 1 +#define MID_HBAR 2 +#define BOT_HBAR 4 +#define LEFT_TOP_VBAR 8 +#define LEFT_BOT_VBAR 16 +#define RIGHT_TOP_VBAR 32 +#define RIGHT_BOT_VBAR 64 + struct { + int x, y, w, h; + } segments[] = { + { 1, 0, 5, 1 }, /* TOP_HBAR */ + { 1, 6, 5, 1 }, /* MID_HBAR */ + { 1, 12, 5, 1 }, /* BOT_HBAR */ + { 0, 1, 1, 5 }, /* LEFT_TOP_VBAR */ + { 0, 7, 1, 5 }, /* LEFT_BOT_VBAR */ + { 6, 1, 1, 5 }, /* RIGHT_TOP_VBAR */ + { 6, 7, 1, 5 } /* RIGHT_BOT_VBAR */ + }; + static const unsigned char masks[10] = { + /* 0 */ TOP_HBAR |BOT_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR|RIGHT_TOP_VBAR|RIGHT_BOT_VBAR, + /* 1 */ RIGHT_TOP_VBAR|RIGHT_BOT_VBAR, + /* 2 */ TOP_HBAR|MID_HBAR|BOT_HBAR|LEFT_BOT_VBAR |RIGHT_TOP_VBAR, + /* 3 */ TOP_HBAR|MID_HBAR|BOT_HBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR, + /* 4 */ MID_HBAR |LEFT_TOP_VBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR, + /* 5 */ TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR |RIGHT_BOT_VBAR, + /* 6 */ TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR |RIGHT_BOT_VBAR, + /* 7 */ TOP_HBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR, + /* 8 */ TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR|LEFT_BOT_VBAR|RIGHT_TOP_VBAR|RIGHT_BOT_VBAR, + /* 9 */ TOP_HBAR|BOT_HBAR|MID_HBAR|LEFT_TOP_VBAR |RIGHT_TOP_VBAR|RIGHT_BOT_VBAR, + }; + unsigned mask = masks[digit]; + int i; + + draw_rectangle(0, dst, dst_linesize, segment_width, 0, 0, 8, 13); + for (i = 0; i < FF_ARRAY_ELEMS(segments); i++) + if (mask & (1<priv; + uint8_t *p, *p0; + int x, y; + int color, color_rest; + int icolor; + int radius; + int quad0, quad; + int dquad_x, dquad_y; + int grad, dgrad, rgrad, drgrad; + int seg_size; + int second; + int i; + uint8_t *data = picref->data[0]; + int width = picref->video->w; + int height = picref->video->h; + + /* draw colored bars and circle */ + radius = (width + height) / 4; + quad0 = width * width / 4 + height * height / 4 - radius * radius; + dquad_y = 1 - height; + p0 = data; + for (y = 0; y < height; y++) { + p = p0; + color = 0; + color_rest = 0; + quad = quad0; + dquad_x = 1 - width; + for (x = 0; x < width; x++) { + icolor = color; + if (quad < 0) + icolor ^= 7; + quad += dquad_x; + dquad_x += 2; + *(p++) = icolor & 1 ? 255 : 0; + *(p++) = icolor & 2 ? 255 : 0; + *(p++) = icolor & 4 ? 255 : 0; + color_rest += 8; + if (color_rest >= width) { + color_rest -= width; + color++; + } + } + quad0 += dquad_y; + dquad_y += 2; + p0 += picref->linesize[0]; + } + + /* draw sliding color line */ + p = data + picref->linesize[0] * height * 3/4; + grad = (256 * test->nb_frame * test->time_base.num / test->time_base.den) % + GRADIENT_SIZE; + rgrad = 0; + dgrad = GRADIENT_SIZE / width; + drgrad = GRADIENT_SIZE % width; + for (x = 0; x < width; x++) { + *(p++) = + grad < 256 || grad >= 5 * 256 ? 255 : + grad >= 2 * 256 && grad < 4 * 256 ? 0 : + grad < 2 * 256 ? 2 * 256 - 1 - grad : grad - 4 * 256; + *(p++) = + grad >= 4 * 256 ? 0 : + grad >= 1 * 256 && grad < 3 * 256 ? 255 : + grad < 1 * 256 ? grad : 4 * 256 - 1 - grad; + *(p++) = + grad < 2 * 256 ? 0 : + grad >= 3 * 256 && grad < 5 * 256 ? 255 : + grad < 3 * 256 ? grad - 2 * 256 : 6 * 256 - 1 - grad; + grad += dgrad; + rgrad += drgrad; + if (rgrad >= GRADIENT_SIZE) { + grad++; + rgrad -= GRADIENT_SIZE; + } + if (grad >= GRADIENT_SIZE) + grad -= GRADIENT_SIZE; + } + for (y = height / 8; y > 0; y--) { + memcpy(p, p - picref->linesize[0], 3 * width); + p += picref->linesize[0]; + } + + /* draw digits */ + seg_size = width / 80; + if (seg_size >= 1 && height >= 13 * seg_size) { + second = test->nb_frame * test->time_base.num / test->time_base.den; + x = width - (width - seg_size * 64) / 2; + y = (height - seg_size * 13) / 2; + p = data + (x*3 + y * picref->linesize[0]); + for (i = 0; i < 8; i++) { + p -= 3 * 8 * seg_size; + draw_digit(second % 10, p, picref->linesize[0], seg_size); + second /= 10; + if (second == 0) + break; + } + } +} + +static av_cold int test_init(AVFilterContext *ctx, const char *args, void *opaque) +{ + TestSourceContext *test = ctx->priv; + + test->class = &testsrc_class; + test->fill_picture_fn = test_fill_picture; + return init_common(ctx, args, opaque); +} + +static int test_query_formats(AVFilterContext *ctx) +{ + static const enum PixelFormat pix_fmts[] = { + PIX_FMT_RGB24, PIX_FMT_NONE + }; + avfilter_set_common_formats(ctx, avfilter_make_format_list(pix_fmts)); + return 0; +} + +AVFilter avfilter_vsrc_testsrc = { + .name = "testsrc", + .description = NULL_IF_CONFIG_SMALL("Generate test pattern."), + .priv_size = sizeof(TestSourceContext), + .init = test_init, + + .query_formats = test_query_formats, + + .inputs = (AVFilterPad[]) {{ .name = NULL}}, + + .outputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .request_frame = request_frame, + .config_props = config_props, }, + { .name = NULL }}, +}; + +#endif /* CONFIG_TESTSRC_FILTER */ + +#if CONFIG_RGBTESTSRC_FILTER + +static const char *rgbtestsrc_get_name(void *ctx) +{ + return "rgbtestsrc"; +} + +static const AVClass rgbtestsrc_class = { + .class_name = "RGBTestSourceContext", + .item_name = rgbtestsrc_get_name, + .option = testsrc_options, +}; + +#define R 0 +#define G 1 +#define B 2 +#define A 3 + +static void rgbtest_put_pixel(uint8_t *dst, int dst_linesize, + int x, int y, int r, int g, int b, enum PixelFormat fmt, + int rgba_map[4]) +{ + int32_t v; + uint8_t *p; + + switch (fmt) { + case PIX_FMT_BGR444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r >> 4) << 8) | ((g >> 4) << 4) | (b >> 4); break; + case PIX_FMT_RGB444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b >> 4) << 8) | ((g >> 4) << 4) | (r >> 4); break; + case PIX_FMT_BGR555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<10) | ((g>>3)<<5) | (b>>3); break; + case PIX_FMT_RGB555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<10) | ((g>>3)<<5) | (r>>3); break; + case PIX_FMT_BGR565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<11) | ((g>>2)<<5) | (b>>3); break; + case PIX_FMT_RGB565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<11) | ((g>>2)<<5) | (r>>3); break; + case PIX_FMT_RGB24: + case PIX_FMT_BGR24: + v = (r << (rgba_map[R]*8)) + (g << (rgba_map[G]*8)) + (b << (rgba_map[B]*8)); + p = dst + 3*x + y*dst_linesize; + AV_WL24(p, v); + break; + case PIX_FMT_RGBA: + case PIX_FMT_BGRA: + case PIX_FMT_ARGB: + case PIX_FMT_ABGR: + v = (r << (rgba_map[R]*8)) + (g << (rgba_map[G]*8)) + (b << (rgba_map[B]*8)); + p = dst + 4*x + y*dst_linesize; + AV_WL32(p, v); + break; + } +} + +static void rgbtest_fill_picture(AVFilterContext *ctx, AVFilterBufferRef *picref) +{ + TestSourceContext *test = ctx->priv; + int x, y, w = picref->video->w, h = picref->video->h; + + for (y = 0; y < h; y++) { + for (x = 0; x < picref->video->w; x++) { + int c = 256*x/w; + int r = 0, g = 0, b = 0; + + if (3*y < h ) r = c; + else if (3*y < 2*h) g = c; + else b = c; + + rgbtest_put_pixel(picref->data[0], picref->linesize[0], x, y, r, g, b, + ctx->outputs[0]->format, test->rgba_map); + } + } +} + +static av_cold int rgbtest_init(AVFilterContext *ctx, const char *args, void *opaque) +{ + TestSourceContext *test = ctx->priv; + + test->class = &rgbtestsrc_class; + test->fill_picture_fn = rgbtest_fill_picture; + return init_common(ctx, args, opaque); +} + +static int rgbtest_query_formats(AVFilterContext *ctx) +{ + static const enum PixelFormat pix_fmts[] = { + PIX_FMT_RGBA, PIX_FMT_ARGB, PIX_FMT_BGRA, PIX_FMT_ABGR, + PIX_FMT_BGR24, PIX_FMT_RGB24, + PIX_FMT_RGB444, PIX_FMT_BGR444, + PIX_FMT_RGB565, PIX_FMT_BGR565, + PIX_FMT_RGB555, PIX_FMT_BGR555, + PIX_FMT_NONE + }; + avfilter_set_common_formats(ctx, avfilter_make_format_list(pix_fmts)); + return 0; +} + +static int rgbtest_config_props(AVFilterLink *outlink) +{ + TestSourceContext *test = outlink->src->priv; + + switch (outlink->format) { + case PIX_FMT_ARGB: test->rgba_map[A] = 0; test->rgba_map[R] = 1; test->rgba_map[G] = 2; test->rgba_map[B] = 3; break; + case PIX_FMT_ABGR: test->rgba_map[A] = 0; test->rgba_map[B] = 1; test->rgba_map[G] = 2; test->rgba_map[R] = 3; break; + case PIX_FMT_RGBA: + case PIX_FMT_RGB24: test->rgba_map[R] = 0; test->rgba_map[G] = 1; test->rgba_map[B] = 2; test->rgba_map[A] = 3; break; + case PIX_FMT_BGRA: + case PIX_FMT_BGR24: test->rgba_map[B] = 0; test->rgba_map[G] = 1; test->rgba_map[R] = 2; test->rgba_map[A] = 3; break; + } + + return config_props(outlink); +} + +AVFilter avfilter_vsrc_rgbtestsrc = { + .name = "rgbtestsrc", + .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."), + .priv_size = sizeof(TestSourceContext), + .init = rgbtest_init, + + .query_formats = rgbtest_query_formats, + + .inputs = (AVFilterPad[]) {{ .name = NULL}}, + + .outputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .request_frame = request_frame, + .config_props = rgbtest_config_props, }, + { .name = NULL }}, +}; + +#endif /* CONFIG_RGBTESTSRC_FILTER */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/x86/gradfun.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/x86/gradfun.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavfilter/x86/gradfun.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavfilter/x86/gradfun.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,19 +1,21 @@ /* + * Copyright (C) 2009 Loren Merritt + * * This file is part of Libav. * - * Libav 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. + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * * Libav is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * 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 General Public License along - * with Libav; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "libavutil/cpu.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/4xm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/4xm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/4xm.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/4xm.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,7 +28,9 @@ */ #include "libavutil/intreadwrite.h" +#include "libavutil/intfloat.h" #include "avformat.h" +#include "internal.h" #define RIFF_TAG MKTAG('R', 'I', 'F', 'F') #define FOURXMV_TAG MKTAG('4', 'X', 'M', 'V') @@ -129,7 +131,7 @@ size = AV_RL32(&header[i + 4]); if (fourcc_tag == std__TAG) { - fourxm->fps = av_int2flt(AV_RL32(&header[i + 12])); + fourxm->fps = av_int2float(AV_RL32(&header[i + 12])); } else if (fourcc_tag == vtrk_TAG) { /* check that there is enough data */ if (size != vtrk_SIZE) { @@ -140,12 +142,12 @@ fourxm->height = AV_RL32(&header[i + 40]); /* allocate a new AVStream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st){ ret= AVERROR(ENOMEM); goto fail; } - av_set_pts_info(st, 60, 1, fourxm->fps); + avpriv_set_pts_info(st, 60, 1, fourxm->fps); fourxm->video_stream_index = st->index; @@ -172,13 +174,15 @@ goto fail; } if (current_track + 1 > fourxm->track_count) { - fourxm->track_count = current_track + 1; fourxm->tracks = av_realloc(fourxm->tracks, - fourxm->track_count * sizeof(AudioTrack)); + (current_track + 1) * sizeof(AudioTrack)); if (!fourxm->tracks) { - ret= AVERROR(ENOMEM); + ret = AVERROR(ENOMEM); goto fail; } + memset(&fourxm->tracks[fourxm->track_count], 0, + sizeof(AudioTrack) * (current_track + 1 - fourxm->track_count)); + fourxm->track_count = current_track + 1; } fourxm->tracks[current_track].adpcm = AV_RL32(&header[i + 12]); fourxm->tracks[current_track].channels = AV_RL32(&header[i + 36]); @@ -195,13 +199,14 @@ i += 8 + size; /* allocate a new AVStream */ - st = av_new_stream(s, current_track); + st = avformat_new_stream(s, NULL); if (!st){ ret= AVERROR(ENOMEM); goto fail; } - av_set_pts_info(st, 60, 1, fourxm->tracks[current_track].sample_rate); + st->id = current_track; + avpriv_set_pts_info(st, 60, 1, fourxm->tracks[current_track].sample_rate); fourxm->tracks[current_track].stream_index = st->index; @@ -344,11 +349,11 @@ } AVInputFormat ff_fourxm_demuxer = { - "4xm", - NULL_IF_CONFIG_SMALL("4X Technologies format"), - sizeof(FourxmDemuxContext), - fourxm_probe, - fourxm_read_header, - fourxm_read_packet, - fourxm_read_close, + .name = "4xm", + .long_name = NULL_IF_CONFIG_SMALL("4X Technologies format"), + .priv_data_size = sizeof(FourxmDemuxContext), + .read_probe = fourxm_probe, + .read_header = fourxm_read_header, + .read_packet = fourxm_read_packet, + .read_close = fourxm_read_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/a64.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/a64.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/a64.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/a64.c 2012-01-11 00:34:30.000000000 +0000 @@ -55,7 +55,6 @@ break; default: return AVERROR(EINVAL); - break; } avio_write(s->pb, header, 2); c->prev_pkt.size = 0; @@ -167,11 +166,10 @@ AVOutputFormat ff_a64_muxer = { .name = "a64", .long_name = NULL_IF_CONFIG_SMALL("a64 - video for Commodore 64"), - .mime_type = NULL, .extensions = "a64, A64", .priv_data_size = sizeof (A64Context), .video_codec = CODEC_ID_A64_MULTI, - a64_write_header, - a64_write_packet, - a64_write_trailer + .write_header = a64_write_header, + .write_packet = a64_write_packet, + .write_trailer = a64_write_trailer }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aacdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aacdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aacdec.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aacdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #include "rawdec.h" #include "id3v1.h" @@ -65,7 +66,7 @@ { AVStream *st; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -76,18 +77,17 @@ ff_id3v1_read(s); //LCM of all possible ADTS sample rates - av_set_pts_info(st, 64, 1, 28224000); + avpriv_set_pts_info(st, 64, 1, 28224000); return 0; } AVInputFormat ff_aac_demuxer = { - "aac", - NULL_IF_CONFIG_SMALL("raw ADTS AAC"), - 0, - adts_aac_probe, - adts_aac_read_header, - ff_raw_read_partial_packet, + .name = "aac", + .long_name = NULL_IF_CONFIG_SMALL("raw ADTS AAC"), + .read_probe = adts_aac_probe, + .read_header = adts_aac_read_header, + .read_packet = ff_raw_read_partial_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "aac", .value = CODEC_ID_AAC, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ac3dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ac3dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ac3dec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ac3dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,7 +41,7 @@ for(frames = 0; buf2 < end; frames++) { init_get_bits(&gbc, buf2, 54); - if(ff_ac3_parse_header(&gbc, &hdr) < 0) + if(avpriv_ac3_parse_header(&gbc, &hdr) < 0) break; if(buf2 + hdr.frame_size > end || av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, buf2 + 2, hdr.frame_size - 2)) @@ -71,12 +71,11 @@ } AVInputFormat ff_ac3_demuxer = { - "ac3", - NULL_IF_CONFIG_SMALL("raw AC-3"), - 0, - ac3_probe, - ff_raw_audio_read_header, - ff_raw_read_partial_packet, + .name = "ac3", + .long_name = NULL_IF_CONFIG_SMALL("raw AC-3"), + .read_probe = ac3_probe, + .read_header = ff_raw_audio_read_header, + .read_packet = ff_raw_read_partial_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "ac3", .value = CODEC_ID_AC3, @@ -90,12 +89,11 @@ } AVInputFormat ff_eac3_demuxer = { - "eac3", - NULL_IF_CONFIG_SMALL("raw E-AC-3"), - 0, - eac3_probe, - ff_raw_audio_read_header, - ff_raw_read_partial_packet, + .name = "eac3", + .long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"), + .read_probe = eac3_probe, + .read_header = ff_raw_audio_read_header, + .read_packet = ff_raw_read_partial_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "eac3", .value = CODEC_ID_EAC3, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/adtsenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/adtsenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/adtsenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/adtsenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,6 +27,8 @@ #include "avformat.h" #include "adts.h" +#define ADTS_MAX_FRAME_BYTES ((1 << 13) - 1) + int ff_adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, uint8_t *buf, int size) { GetBitContext gb; @@ -35,7 +37,7 @@ int off; init_get_bits(&gb, buf, size * 8); - off = ff_mpeg4audio_get_config(&m4ac, buf, size); + off = avpriv_mpeg4audio_get_config(&m4ac, buf, size * 8, 1); if (off < 0) return off; skip_bits_long(&gb, off); @@ -59,11 +61,15 @@ av_log(s, AV_LOG_ERROR, "Scalable configurations are not allowed in ADTS\n"); return -1; } + if (get_bits(&gb, 1)) { + av_log(s, AV_LOG_ERROR, "Extension flag is not allowed in ADTS\n"); + return -1; + } if (!adts->channel_conf) { init_put_bits(&pb, adts->pce_data, MAX_PCE_SIZE); put_bits(&pb, 3, 5); //ID_PCE - adts->pce_size = (ff_copy_pce_data(&pb, &gb) + 3) / 8; + adts->pce_size = (avpriv_copy_pce_data(&pb, &gb) + 3) / 8; flush_put_bits(&pb); } @@ -89,6 +95,13 @@ { PutBitContext pb; + unsigned full_frame_size = (unsigned)ADTS_HEADER_SIZE + size + pce_size; + if (full_frame_size > ADTS_MAX_FRAME_BYTES) { + av_log(NULL, AV_LOG_ERROR, "ADTS frame size too large: %u (max %d)\n", + full_frame_size, ADTS_MAX_FRAME_BYTES); + return AVERROR_INVALIDDATA; + } + init_put_bits(&pb, buf, ADTS_HEADER_SIZE); /* adts_fixed_header */ @@ -106,7 +119,7 @@ /* adts_variable_header */ put_bits(&pb, 1, 0); /* copyright_identification_bit */ put_bits(&pb, 1, 0); /* copyright_identification_start */ - put_bits(&pb, 13, ADTS_HEADER_SIZE + size + pce_size); /* aac_frame_length */ + put_bits(&pb, 13, full_frame_size); /* aac_frame_length */ put_bits(&pb, 11, 0x7ff); /* adts_buffer_fullness */ put_bits(&pb, 2, 0); /* number_of_raw_data_blocks_in_frame */ @@ -124,7 +137,10 @@ if (!pkt->size) return 0; if (adts->write_adts) { - ff_adts_write_frame_header(adts, buf, pkt->size, adts->pce_size); + int err = ff_adts_write_frame_header(adts, buf, pkt->size, + adts->pce_size); + if (err < 0) + return err; avio_write(pb, buf, ADTS_HEADER_SIZE); if (adts->pce_size) { avio_write(pb, adts->pce_data, adts->pce_size); @@ -138,13 +154,13 @@ } AVOutputFormat ff_adts_muxer = { - "adts", - NULL_IF_CONFIG_SMALL("ADTS AAC"), - "audio/aac", - "aac,adts", - sizeof(ADTSContext), - CODEC_ID_AAC, - CODEC_ID_NONE, - adts_write_header, - adts_write_packet, + .name = "adts", + .long_name = NULL_IF_CONFIG_SMALL("ADTS AAC"), + .mime_type = "audio/aac", + .extensions = "aac,adts", + .priv_data_size = sizeof(ADTSContext), + .audio_codec = CODEC_ID_AAC, + .video_codec = CODEC_ID_NONE, + .write_header = adts_write_header, + .write_packet = adts_write_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/adxdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/adxdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/adxdec.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/adxdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2011 Justin Ruggles + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * CRI ADX demuxer + */ + +#include "libavutil/intreadwrite.h" +#include "libavcodec/adx.h" +#include "avformat.h" +#include "internal.h" + +#define BLOCK_SIZE 18 +#define BLOCK_SAMPLES 32 + +typedef struct ADXDemuxerContext { + int header_size; +} ADXDemuxerContext; + +static int adx_read_packet(AVFormatContext *s, AVPacket *pkt) +{ + ADXDemuxerContext *c = s->priv_data; + AVCodecContext *avctx = s->streams[0]->codec; + int ret, size; + + size = BLOCK_SIZE * avctx->channels; + + pkt->pos = avio_tell(s->pb); + pkt->stream_index = 0; + + ret = av_get_packet(s->pb, pkt, size); + if (ret != size) { + av_free_packet(pkt); + return ret < 0 ? ret : AVERROR(EIO); + } + if (AV_RB16(pkt->data) & 0x8000) { + av_free_packet(pkt); + return AVERROR_EOF; + } + pkt->size = size; + pkt->duration = 1; + pkt->pts = (pkt->pos - c->header_size) / size; + + return 0; +} + +static int adx_read_header(AVFormatContext *s, AVFormatParameters *ap) +{ + ADXDemuxerContext *c = s->priv_data; + AVCodecContext *avctx; + int ret; + + AVStream *st = avformat_new_stream(s, NULL); + if (!st) + return AVERROR(ENOMEM); + avctx = s->streams[0]->codec; + + if (avio_rb16(s->pb) != 0x8000) + return AVERROR_INVALIDDATA; + c->header_size = avio_rb16(s->pb) + 4; + avio_seek(s->pb, -4, SEEK_CUR); + + avctx->extradata = av_mallocz(c->header_size + FF_INPUT_BUFFER_PADDING_SIZE); + if (!avctx->extradata) + return AVERROR(ENOMEM); + if (avio_read(s->pb, avctx->extradata, c->header_size) < c->header_size) { + av_freep(&avctx->extradata); + return AVERROR(EIO); + } + avctx->extradata_size = c->header_size; + + ret = avpriv_adx_decode_header(avctx, avctx->extradata, + avctx->extradata_size, &c->header_size, + NULL); + if (ret) + return ret; + + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; + st->codec->codec_id = s->iformat->value; + + avpriv_set_pts_info(st, 64, BLOCK_SAMPLES, avctx->sample_rate); + + return 0; +} + +AVInputFormat ff_adx_demuxer = { + .name = "adx", + .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"), + .priv_data_size = sizeof(ADXDemuxerContext), + .read_header = adx_read_header, + .read_packet = adx_read_packet, + .extensions = "adx", + .value = CODEC_ID_ADPCM_ADX, + .flags = AVFMT_GENERIC_INDEX, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aea.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aea.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aea.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aea.c 2012-01-11 00:34:30.000000000 +0000 @@ -57,7 +57,7 @@ static int aea_read_header(AVFormatContext *s, AVFormatParameters *ap) { - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -95,14 +95,12 @@ } AVInputFormat ff_aea_demuxer = { - "aea", - NULL_IF_CONFIG_SMALL("MD STUDIO audio"), - 0, - aea_read_probe, - aea_read_header, - aea_read_packet, - 0, - pcm_read_seek, + .name = "aea", + .long_name = NULL_IF_CONFIG_SMALL("MD STUDIO audio"), + .read_probe = aea_read_probe, + .read_header = aea_read_header, + .read_packet = aea_read_packet, + .read_seek = pcm_read_seek, .flags= AVFMT_GENERIC_INDEX, .extensions = "aea", }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aiffdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aiffdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aiffdec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aiffdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,9 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavutil/intfloat_readwrite.h" +#include "libavutil/mathematics.h" #include "libavutil/dict.h" #include "avformat.h" +#include "internal.h" #include "pcm.h" #include "aiff.h" @@ -87,7 +88,8 @@ static unsigned int get_aiff_header(AVIOContext *pb, AVCodecContext *codec, int size, unsigned version) { - AVExtFloat ext; + int exp; + uint64_t val; double sample_rate; unsigned int num_frames; @@ -98,8 +100,9 @@ num_frames = avio_rb32(pb); codec->bits_per_coded_sample = avio_rb16(pb); - avio_read(pb, (uint8_t*)&ext, sizeof(ext));/* Sample rate is in */ - sample_rate = av_ext2dbl(ext); /* 80 bits BE IEEE extended float */ + exp = avio_rb16(pb); + val = avio_rb64(pb); + sample_rate = ldexp(val, exp - 16383 - 63); codec->sample_rate = sample_rate; size -= 18; @@ -196,7 +199,7 @@ filesize -= 4; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -268,10 +271,7 @@ got_sound: /* Now positioned, get the sound data start and end */ - if (st->nb_frames) - s->file_size = st->nb_frames * st->codec->block_align; - - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); st->start_time = 0; st->duration = st->codec->frame_size ? st->nb_frames * st->codec->frame_size : st->nb_frames; @@ -313,13 +313,12 @@ } AVInputFormat ff_aiff_demuxer = { - "aiff", - NULL_IF_CONFIG_SMALL("Audio IFF"), - sizeof(AIFFInputContext), - aiff_probe, - aiff_read_header, - aiff_read_packet, - NULL, - pcm_read_seek, + .name = "aiff", + .long_name = NULL_IF_CONFIG_SMALL("Audio IFF"), + .priv_data_size = sizeof(AIFFInputContext), + .read_probe = aiff_probe, + .read_header = aiff_read_header, + .read_packet = aiff_read_packet, + .read_seek = pcm_read_seek, .codec_tag= (const AVCodecTag* const []){ff_codec_aiff_tags, 0}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aiffenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aiffenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aiffenc.c 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aiffenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,7 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/intfloat.h" #include "avformat.h" +#include "internal.h" #include "aiff.h" #include "avio_internal.h" @@ -34,7 +36,7 @@ AIFFOutputContext *aiff = s->priv_data; AVIOContext *pb = s->pb; AVCodecContext *enc = s->streams[0]->codec; - AVExtFloat sample_rate; + uint64_t sample_rate; int aifc = 0; /* First verify if format is ok */ @@ -80,8 +82,9 @@ avio_wb16(pb, enc->bits_per_coded_sample); /* Sample size */ - sample_rate = av_dbl2ext((double)enc->sample_rate); - avio_write(pb, (uint8_t*)&sample_rate, sizeof(sample_rate)); + sample_rate = av_double2int(enc->sample_rate); + avio_wb16(pb, (sample_rate >> 52) + (16383 - 1023)); + avio_wb64(pb, UINT64_C(1) << 63 | sample_rate << 11); if (aifc) { avio_wl32(pb, enc->codec_tag); @@ -95,7 +98,7 @@ avio_wb32(pb, 0); /* Data offset */ avio_wb32(pb, 0); /* Block-size (block align) */ - av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); + avpriv_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); /* Data is starting here */ avio_flush(pb); @@ -147,15 +150,15 @@ } AVOutputFormat ff_aiff_muxer = { - "aiff", - NULL_IF_CONFIG_SMALL("Audio IFF"), - "audio/aiff", - "aif,aiff,afc,aifc", - sizeof(AIFFOutputContext), - CODEC_ID_PCM_S16BE, - CODEC_ID_NONE, - aiff_write_header, - aiff_write_packet, - aiff_write_trailer, + .name = "aiff", + .long_name = NULL_IF_CONFIG_SMALL("Audio IFF"), + .mime_type = "audio/aiff", + .extensions = "aif,aiff,afc,aifc", + .priv_data_size = sizeof(AIFFOutputContext), + .audio_codec = CODEC_ID_PCM_S16BE, + .video_codec = CODEC_ID_NONE, + .write_header = aiff_write_header, + .write_packet = aiff_write_packet, + .write_trailer = aiff_write_trailer, .codec_tag= (const AVCodecTag* const []){ff_codec_aiff_tags, 0}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aiff.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aiff.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aiff.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aiff.h 2012-01-11 00:34:30.000000000 +0000 @@ -43,6 +43,7 @@ { CODEC_ID_MACE6, MKTAG('M','A','C','6') }, { CODEC_ID_GSM, MKTAG('G','S','M',' ') }, { CODEC_ID_ADPCM_G726, MKTAG('G','7','2','6') }, + { CODEC_ID_PCM_S16BE, MKTAG('t','w','o','s') }, { CODEC_ID_PCM_S16LE, MKTAG('s','o','w','t') }, { CODEC_ID_ADPCM_IMA_QT, MKTAG('i','m','a','4') }, { CODEC_ID_QDM2, MKTAG('Q','D','M','2') }, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/allformats.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/allformats.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/allformats.c 2011-04-23 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/allformats.c 2012-01-11 00:34:30.000000000 +0000 @@ -52,6 +52,7 @@ REGISTER_DEMUXER (AAC, aac); REGISTER_MUXDEMUX (AC3, ac3); REGISTER_MUXER (ADTS, adts); + REGISTER_MUXDEMUX (ADX, adx); REGISTER_DEMUXER (AEA, aea); REGISTER_MUXDEMUX (AIFF, aiff); REGISTER_MUXDEMUX (AMR, amr); @@ -70,6 +71,7 @@ REGISTER_DEMUXER (BETHSOFTVID, bethsoftvid); REGISTER_DEMUXER (BFI, bfi); REGISTER_DEMUXER (BINK, bink); + REGISTER_DEMUXER (BMV, bmv); REGISTER_DEMUXER (C93, c93); REGISTER_DEMUXER (CAF, caf); REGISTER_MUXDEMUX (CAVSVIDEO, cavsvideo); @@ -113,6 +115,7 @@ REGISTER_DEMUXER (IV8, iv8); REGISTER_MUXDEMUX (IVF, ivf); REGISTER_DEMUXER (JV, jv); + REGISTER_MUXDEMUX (LATM, latm); REGISTER_DEMUXER (LMLM4, lmlm4); REGISTER_DEMUXER (LXF, lxf); REGISTER_MUXDEMUX (M4V, m4v); @@ -153,7 +156,7 @@ REGISTER_MUXDEMUX (NUT, nut); REGISTER_DEMUXER (NUV, nuv); REGISTER_MUXDEMUX (OGG, ogg); - REGISTER_DEMUXER (OMA, oma); + REGISTER_MUXDEMUX (OMA, oma); REGISTER_MUXDEMUX (PCM_ALAW, pcm_alaw); REGISTER_MUXDEMUX (PCM_MULAW, pcm_mulaw); REGISTER_MUXDEMUX (PCM_F64BE, pcm_f64be); @@ -174,6 +177,7 @@ REGISTER_MUXDEMUX (PCM_U16BE, pcm_u16be); REGISTER_MUXDEMUX (PCM_U16LE, pcm_u16le); REGISTER_MUXDEMUX (PCM_U8, pcm_u8); + REGISTER_DEMUXER (PMP, pmp); REGISTER_MUXER (PSP, psp); REGISTER_DEMUXER (PVA, pva); REGISTER_DEMUXER (QCP, qcp); @@ -193,9 +197,11 @@ av_register_rdt_dynamic_payload_handlers(); #endif REGISTER_DEMUXER (SEGAFILM, segafilm); + REGISTER_MUXER (SEGMENT, segment); REGISTER_DEMUXER (SHORTEN, shorten); REGISTER_DEMUXER (SIFF, siff); REGISTER_DEMUXER (SMACKER, smacker); + REGISTER_DEMUXER (SMJPEG, smjpeg); REGISTER_DEMUXER (SOL, sol); REGISTER_MUXDEMUX (SOX, sox); REGISTER_MUXDEMUX (SPDIF, spdif); @@ -225,6 +231,7 @@ REGISTER_DEMUXER (WTV, wtv); REGISTER_DEMUXER (WV, wv); REGISTER_DEMUXER (XA, xa); + REGISTER_DEMUXER (XMV, xmv); REGISTER_DEMUXER (XWMA, xwma); REGISTER_DEMUXER (YOP, yop); REGISTER_MUXDEMUX (YUV4MPEGPIPE, yuv4mpegpipe); @@ -239,6 +246,8 @@ REGISTER_PROTOCOL (FILE, file); REGISTER_PROTOCOL (GOPHER, gopher); REGISTER_PROTOCOL (HTTP, http); + REGISTER_PROTOCOL (HTTPPROXY, httpproxy); + REGISTER_PROTOCOL (HTTPS, https); REGISTER_PROTOCOL (MMSH, mmsh); REGISTER_PROTOCOL (MMST, mmst); REGISTER_PROTOCOL (MD5, md5); @@ -252,5 +261,6 @@ #endif REGISTER_PROTOCOL (RTP, rtp); REGISTER_PROTOCOL (TCP, tcp); + REGISTER_PROTOCOL (TLS, tls); REGISTER_PROTOCOL (UDP, udp); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/amr.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/amr.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/amr.c 2011-03-23 03:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/amr.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,7 @@ */ #include "avformat.h" +#include "internal.h" static const char AMR_header [] = "#!AMR\n"; static const char AMRWB_header [] = "#!AMR-WB\n"; @@ -84,7 +85,7 @@ avio_read(pb, header, 6); - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) { return AVERROR(ENOMEM); @@ -111,7 +112,7 @@ } st->codec->channels = 1; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); return 0; } @@ -174,27 +175,24 @@ #if CONFIG_AMR_DEMUXER AVInputFormat ff_amr_demuxer = { - "amr", - NULL_IF_CONFIG_SMALL("3GPP AMR file format"), - 0, /*priv_data_size*/ - amr_probe, - amr_read_header, - amr_read_packet, - NULL, + .name = "amr", + .long_name = NULL_IF_CONFIG_SMALL("3GPP AMR file format"), + .read_probe = amr_probe, + .read_header = amr_read_header, + .read_packet = amr_read_packet, .flags = AVFMT_GENERIC_INDEX, }; #endif #if CONFIG_AMR_MUXER AVOutputFormat ff_amr_muxer = { - "amr", - NULL_IF_CONFIG_SMALL("3GPP AMR file format"), - "audio/amr", - "amr", - 0, - CODEC_ID_AMR_NB, - CODEC_ID_NONE, - amr_write_header, - amr_write_packet, + .name = "amr", + .long_name = NULL_IF_CONFIG_SMALL("3GPP AMR file format"), + .mime_type = "audio/amr", + .extensions = "amr", + .audio_codec = CODEC_ID_AMR_NB, + .video_codec = CODEC_ID_NONE, + .write_header = amr_write_header, + .write_packet = amr_write_packet, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/anm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/anm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/anm.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/anm.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" typedef struct { int base_record; @@ -97,7 +98,7 @@ return AVERROR_INVALIDDATA; /* video stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; @@ -128,7 +129,7 @@ avio_skip(pb, 32); /* record_types */ st->nb_frames = avio_rl32(pb); - av_set_pts_info(st, 64, 1, avio_rl16(pb)); + avpriv_set_pts_info(st, 64, 1, avio_rl16(pb)); avio_skip(pb, 58); /* color cycling and palette data */ @@ -136,16 +137,16 @@ st->codec->extradata = av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); if (!st->codec->extradata) { ret = AVERROR(ENOMEM); - goto close_and_return; + goto fail; } ret = avio_read(pb, st->codec->extradata, st->codec->extradata_size); if (ret < 0) - goto close_and_return; + goto fail; /* read page table */ ret = avio_seek(pb, anm->page_table_offset, SEEK_SET); if (ret < 0) - goto close_and_return; + goto fail; for (i = 0; i < MAX_PAGES; i++) { Page *p = &anm->pt[i]; @@ -158,7 +159,7 @@ anm->page = find_record(anm, 0); if (anm->page < 0) { ret = anm->page; - goto close_and_return; + goto fail; } anm->record = -1; @@ -168,8 +169,7 @@ av_log_ask_for_sample(s, NULL); ret = AVERROR_INVALIDDATA; -close_and_return: - av_close_input_stream(s); +fail: return ret; } @@ -226,10 +226,10 @@ } AVInputFormat ff_anm_demuxer = { - "anm", - NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"), - sizeof(AnmDemuxContext), - probe, - read_header, - read_packet, + .name = "anm", + .long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"), + .priv_data_size = sizeof(AnmDemuxContext), + .read_probe = probe, + .read_header = read_header, + .read_packet = read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/apc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/apc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/apc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/apc.c 2012-01-11 00:34:30.000000000 +0000 @@ -39,7 +39,7 @@ avio_rl32(pb); /* _APC */ avio_rl32(pb); /* 1.20 */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -81,10 +81,9 @@ } AVInputFormat ff_apc_demuxer = { - "apc", - NULL_IF_CONFIG_SMALL("CRYO APC format"), - 0, - apc_probe, - apc_read_header, - apc_read_packet, + .name = "apc", + .long_name = NULL_IF_CONFIG_SMALL("CRYO APC format"), + .read_probe = apc_probe, + .read_header = apc_read_header, + .read_packet = apc_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ape.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ape.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ape.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ape.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,6 +24,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #include "apetag.h" /* The earliest and latest file formats supported by this library */ @@ -129,9 +130,11 @@ } else { for (i = 0; i < ape_ctx->seektablelength / sizeof(uint32_t); i++) { if (i < ape_ctx->totalframes - 1) { - av_log(s, AV_LOG_DEBUG, "%8d %d (%d bytes)\n", i, ape_ctx->seektable[i], ape_ctx->seektable[i + 1] - ape_ctx->seektable[i]); + av_log(s, AV_LOG_DEBUG, "%8d %"PRIu32" (%"PRIu32" bytes)\n", + i, ape_ctx->seektable[i], + ape_ctx->seektable[i + 1] - ape_ctx->seektable[i]); } else { - av_log(s, AV_LOG_DEBUG, "%8d %d\n", i, ape_ctx->seektable[i]); + av_log(s, AV_LOG_DEBUG, "%8d %"PRIu32"\n", i, ape_ctx->seektable[i]); } } } @@ -169,7 +172,7 @@ ape->fileversion = avio_rl16(pb); if (ape->fileversion < APE_MIN_VERSION || ape->fileversion > APE_MAX_VERSION) { - av_log(s, AV_LOG_ERROR, "Unsupported file version - %"PRId16".%02"PRId16"\n", + av_log(s, AV_LOG_ERROR, "Unsupported file version - %d.%02d\n", ape->fileversion / 1000, (ape->fileversion % 1000) / 10); return -1; } @@ -253,7 +256,8 @@ return -1; } if (ape->seektablelength && (ape->seektablelength / sizeof(*ape->seektable)) < ape->totalframes) { - av_log(s, AV_LOG_ERROR, "Number of seek entries is less than number of frames: %ld vs. %"PRIu32"\n", + av_log(s, AV_LOG_ERROR, + "Number of seek entries is less than number of frames: %zu vs. %"PRIu32"\n", ape->seektablelength / sizeof(*ape->seektable), ape->totalframes); return AVERROR_INVALIDDATA; } @@ -270,6 +274,8 @@ if (ape->seektablelength > 0) { ape->seektable = av_malloc(ape->seektablelength); + if (!ape->seektable) + return AVERROR(ENOMEM); for (i = 0; i < ape->seektablelength / sizeof(uint32_t); i++) ape->seektable[i] = avio_rl32(pb); } @@ -308,7 +314,7 @@ ape->compressiontype); /* now we are ready: build format streams */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return -1; @@ -325,7 +331,7 @@ st->nb_frames = ape->totalframes; st->start_time = 0; st->duration = total_blocks / MAC_SUBFRAME_SIZE; - av_set_pts_info(st, 64, MAC_SUBFRAME_SIZE, ape->samplerate); + avpriv_set_pts_info(st, 64, MAC_SUBFRAME_SIZE, ape->samplerate); st->codec->extradata = av_malloc(APE_EXTRADATA_SIZE); st->codec->extradata_size = APE_EXTRADATA_SIZE; @@ -405,13 +411,13 @@ } AVInputFormat ff_ape_demuxer = { - "ape", - NULL_IF_CONFIG_SMALL("Monkey's Audio"), - sizeof(APEContext), - ape_probe, - ape_read_header, - ape_read_packet, - ape_read_close, - ape_read_seek, + .name = "ape", + .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"), + .priv_data_size = sizeof(APEContext), + .read_probe = ape_probe, + .read_header = ape_read_header, + .read_packet = ape_read_packet, + .read_close = ape_read_close, + .read_seek = ape_read_seek, .extensions = "ape,apl,mac" }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/applehttp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/applehttp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/applehttp.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/applehttp.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,6 +27,7 @@ #include "libavutil/avstring.h" #include "libavutil/intreadwrite.h" +#include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "libavutil/dict.h" #include "avformat.h" @@ -98,6 +99,8 @@ int cur_seq_no; int end_of_segment; int first_packet; + int64_t first_timestamp; + AVIOInterruptCB *interrupt_callback; } AppleHTTPContext; static int read_chomp_line(AVIOContext *s, char *buf, int maxlen) @@ -129,7 +132,7 @@ ffurl_close(var->input); if (var->ctx) { var->ctx->pb = NULL; - av_close_input_file(var->ctx); + avformat_close_input(&var->ctx); } av_free(var); } @@ -201,14 +204,15 @@ enum KeyType key_type = KEY_NONE; uint8_t iv[16] = ""; int has_iv = 0; - char key[MAX_URL_SIZE]; + char key[MAX_URL_SIZE] = ""; char line[1024]; const char *ptr; int close_in = 0; if (!in) { close_in = 1; - if ((ret = avio_open(&in, url, AVIO_FLAG_READ)) < 0) + if ((ret = avio_open2(&in, url, AVIO_FLAG_READ, + c->interrupt_callback, NULL)) < 0) return ret; } @@ -321,13 +325,15 @@ { struct segment *seg = var->segments[var->cur_seq_no - var->start_seq_no]; if (seg->key_type == KEY_NONE) { - return ffurl_open(&var->input, seg->url, AVIO_FLAG_READ); + return ffurl_open(&var->input, seg->url, AVIO_FLAG_READ, + &var->parent->interrupt_callback, NULL); } else if (seg->key_type == KEY_AES_128) { char iv[33], key[33], url[MAX_URL_SIZE]; int ret; if (strcmp(seg->key, var->key_url)) { URLContext *uc; - if (ffurl_open(&uc, seg->key, AVIO_FLAG_READ) == 0) { + if (ffurl_open(&uc, seg->key, AVIO_FLAG_READ, + &var->parent->interrupt_callback, NULL) == 0) { if (ffurl_read_complete(uc, var->key, sizeof(var->key)) != sizeof(var->key)) { av_log(NULL, AV_LOG_ERROR, "Unable to read key file %s\n", @@ -347,11 +353,12 @@ snprintf(url, sizeof(url), "crypto+%s", seg->url); else snprintf(url, sizeof(url), "crypto:%s", seg->url); - if ((ret = ffurl_alloc(&var->input, url, AVIO_FLAG_READ)) < 0) + if ((ret = ffurl_alloc(&var->input, url, AVIO_FLAG_READ, + &var->parent->interrupt_callback)) < 0) return ret; - av_set_string3(var->input->priv_data, "key", key, 0, NULL); - av_set_string3(var->input->priv_data, "iv", iv, 0, NULL); - if ((ret = ffurl_connect(var->input)) < 0) { + av_opt_set(var->input->priv_data, "key", key, 0); + av_opt_set(var->input->priv_data, "iv", iv, 0); + if ((ret = ffurl_connect(var->input, NULL)) < 0) { ffurl_close(var->input); var->input = NULL; return ret; @@ -369,13 +376,23 @@ restart: if (!v->input) { -reload: - /* If this is a live stream and target_duration has elapsed since + /* If this is a live stream and the reload interval has elapsed since * the last playlist reload, reload the variant playlists now. */ + int64_t reload_interval = v->n_segments > 0 ? + v->segments[v->n_segments - 1]->duration : + v->target_duration; + reload_interval *= 1000000; + +reload: if (!v->finished && - av_gettime() - v->last_load_time >= v->target_duration*1000000 && - (ret = parse_playlist(c, v->url, v, NULL)) < 0) + av_gettime() - v->last_load_time >= reload_interval) { + if ((ret = parse_playlist(c, v->url, v, NULL)) < 0) return ret; + /* If we need to reload the playlist again below (if + * there's still no more segments), switch to a reload + * interval of half the target duration. */ + reload_interval = v->target_duration * 500000; + } if (v->cur_seq_no < v->start_seq_no) { av_log(NULL, AV_LOG_WARNING, "skipping %d segments ahead, expired from playlists\n", @@ -385,9 +402,8 @@ if (v->cur_seq_no >= v->start_seq_no + v->n_segments) { if (v->finished) return AVERROR_EOF; - while (av_gettime() - v->last_load_time < - v->target_duration*1000000) { - if (url_interrupt_cb()) + while (av_gettime() - v->last_load_time < reload_interval) { + if (ff_check_interrupt(c->interrupt_callback)) return AVERROR_EXIT; usleep(100*1000); } @@ -411,7 +427,7 @@ c->end_of_segment = 1; c->cur_seq_no = v->cur_seq_no; - if (v->ctx) { + if (v->ctx && v->ctx->nb_streams) { v->needed = 0; for (i = v->stream_offset; i < v->stream_offset + v->ctx->nb_streams; i++) { @@ -432,6 +448,8 @@ AppleHTTPContext *c = s->priv_data; int ret = 0, i, j, stream_offset = 0; + c->interrupt_callback = &s->interrupt_callback; + if ((ret = parse_playlist(c, s->filename, NULL, s->pb)) < 0) goto fail; @@ -494,8 +512,15 @@ v->pb.seekable = 0; ret = av_probe_input_buffer(&v->pb, &in_fmt, v->segments[0]->url, NULL, 0, 0); - if (ret < 0) + if (ret < 0) { + /* Free the ctx - it isn't initialized properly at this point, + * so avformat_close_input shouldn't be called. If + * avformat_open_input fails below, it frees and zeros the + * context, so it doesn't need any special treatment like this. */ + avformat_free_context(v->ctx); + v->ctx = NULL; goto fail; + } v->ctx->pb = &v->pb; ret = avformat_open_input(&v->ctx, v->segments[0]->url, in_fmt, NULL); if (ret < 0) @@ -504,11 +529,12 @@ snprintf(bitrate_str, sizeof(bitrate_str), "%d", v->bandwidth); /* Create new AVStreams for each stream in this variant */ for (j = 0; j < v->ctx->nb_streams; j++) { - AVStream *st = av_new_stream(s, i); + AVStream *st = avformat_new_stream(s, NULL); if (!st) { ret = AVERROR(ENOMEM); goto fail; } + st->id = i; avcodec_copy_context(st->codec, v->ctx->streams[j]->codec); if (v->bandwidth) av_dict_set(&st->metadata, "variant_bitrate", bitrate_str, @@ -518,6 +544,7 @@ } c->first_packet = 1; + c->first_timestamp = AV_NOPTS_VALUE; return 0; fail: @@ -582,6 +609,9 @@ if (!var->pb.eof_reached) return ret; reset_packet(&var->pkt); + } else { + if (c->first_timestamp == AV_NOPTS_VALUE) + c->first_timestamp = var->pkt.dts; } } /* Check if this stream has the packet with the lowest dts */ @@ -630,7 +660,10 @@ for (i = 0; i < c->n_variants; i++) { /* Reset reading */ struct variant *var = c->variants[i]; - int64_t pos = 0; + int64_t pos = c->first_timestamp == AV_NOPTS_VALUE ? 0 : + av_rescale_rnd(c->first_timestamp, 1, + stream_index >= 0 ? s->streams[stream_index]->time_base.den : AV_TIME_BASE, + flags & AVSEEK_FLAG_BACKWARD ? AV_ROUND_DOWN : AV_ROUND_UP); if (var->input) { ffurl_close(var->input); var->input = NULL; @@ -667,12 +700,12 @@ } AVInputFormat ff_applehttp_demuxer = { - "applehttp", - NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming format"), - sizeof(AppleHTTPContext), - applehttp_probe, - applehttp_read_header, - applehttp_read_packet, - applehttp_close, - applehttp_read_seek, + .name = "applehttp", + .long_name = NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming format"), + .priv_data_size = sizeof(AppleHTTPContext), + .read_probe = applehttp_probe, + .read_header = applehttp_read_header, + .read_packet = applehttp_read_packet, + .read_close = applehttp_close, + .read_seek = applehttp_read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/applehttpproto.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/applehttpproto.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/applehttpproto.c 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/applehttpproto.c 2012-01-11 00:34:30.000000000 +0000 @@ -114,7 +114,8 @@ char line[1024]; const char *ptr; - if ((ret = avio_open(&in, url, AVIO_FLAG_READ)) < 0) + if ((ret = avio_open2(&in, url, AVIO_FLAG_READ, + &h->interrupt_callback, NULL)) < 0) return ret; read_chomp_line(in, line, sizeof(line)); @@ -173,19 +174,25 @@ return ret; } +static int applehttp_close(URLContext *h) +{ + AppleHTTPContext *s = h->priv_data; + + free_segment_list(s); + free_variant_list(s); + ffurl_close(s->seg_hd); + return 0; +} + static int applehttp_open(URLContext *h, const char *uri, int flags) { - AppleHTTPContext *s; + AppleHTTPContext *s = h->priv_data; int ret, i; const char *nested_url; if (flags & AVIO_FLAG_WRITE) return AVERROR(ENOSYS); - s = av_mallocz(sizeof(AppleHTTPContext)); - if (!s) - return AVERROR(ENOMEM); - h->priv_data = s; h->is_streamed = 1; if (av_strstart(uri, "applehttp+", &nested_url)) { @@ -228,7 +235,7 @@ return 0; fail: - av_free(s); + applehttp_close(h); return ret; } @@ -237,6 +244,7 @@ AppleHTTPContext *s = h->priv_data; const char *url; int ret; + int64_t reload_interval; start: if (s->seg_hd) { @@ -249,12 +257,21 @@ s->seg_hd = NULL; s->cur_seq_no++; } + reload_interval = s->n_segments > 0 ? + s->segments[s->n_segments - 1]->duration : + s->target_duration; + reload_interval *= 1000000; retry: if (!s->finished) { int64_t now = av_gettime(); - if (now - s->last_load_time >= s->target_duration*1000000) + if (now - s->last_load_time >= reload_interval) { if ((ret = parse_playlist(h, s->playlisturl)) < 0) return ret; + /* If we need to reload the playlist again below (if + * there's still no more segments), switch to a reload + * interval of half the target duration. */ + reload_interval = s->target_duration * 500000; + } } if (s->cur_seq_no < s->start_seq_no) { av_log(h, AV_LOG_WARNING, @@ -265,8 +282,8 @@ if (s->cur_seq_no - s->start_seq_no >= s->n_segments) { if (s->finished) return AVERROR_EOF; - while (av_gettime() - s->last_load_time < s->target_duration*1000000) { - if (url_interrupt_cb()) + while (av_gettime() - s->last_load_time < reload_interval) { + if (ff_check_interrupt(&h->interrupt_callback)) return AVERROR_EXIT; usleep(100*1000); } @@ -274,9 +291,10 @@ } url = s->segments[s->cur_seq_no - s->start_seq_no]->url, av_log(h, AV_LOG_DEBUG, "opening %s\n", url); - ret = ffurl_open(&s->seg_hd, url, AVIO_FLAG_READ); + ret = ffurl_open(&s->seg_hd, url, AVIO_FLAG_READ, + &h->interrupt_callback, NULL); if (ret < 0) { - if (url_interrupt_cb()) + if (ff_check_interrupt(&h->interrupt_callback)) return AVERROR_EXIT; av_log(h, AV_LOG_WARNING, "Unable to open %s\n", url); s->cur_seq_no++; @@ -285,21 +303,11 @@ goto start; } -static int applehttp_close(URLContext *h) -{ - AppleHTTPContext *s = h->priv_data; - - free_segment_list(s); - free_variant_list(s); - ffurl_close(s->seg_hd); - av_free(s); - return 0; -} - URLProtocol ff_applehttp_protocol = { - .name = "applehttp", - .url_open = applehttp_open, - .url_read = applehttp_read, - .url_close = applehttp_close, - .flags = URL_PROTOCOL_FLAG_NESTED_SCHEME, + .name = "applehttp", + .url_open = applehttp_open, + .url_read = applehttp_read, + .url_close = applehttp_close, + .flags = URL_PROTOCOL_FLAG_NESTED_SCHEME, + .priv_data_size = sizeof(AppleHTTPContext), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/asfcrypt.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/asfcrypt.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/asfcrypt.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/asfcrypt.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,9 +28,9 @@ #include "asfcrypt.h" /** - * \brief find multiplicative inverse modulo 2 ^ 32 - * \param v number to invert, must be odd! - * \return number so that result * v = 1 (mod 2^32) + * @brief find multiplicative inverse modulo 2 ^ 32 + * @param v number to invert, must be odd! + * @return number so that result * v = 1 (mod 2^32) */ static uint32_t inverse(uint32_t v) { // v ^ 3 gives the inverse (mod 16), could also be implemented @@ -45,9 +45,9 @@ } /** - * \brief read keys from keybuf into keys - * \param keybuf buffer containing the keys - * \param keys output key array containing the keys for encryption in + * @brief read keys from keybuf into keys + * @param keybuf buffer containing the keys + * @param keys output key array containing the keys for encryption in * native endianness */ static void multiswap_init(const uint8_t keybuf[48], uint32_t keys[12]) { @@ -57,9 +57,9 @@ } /** - * \brief invert the keys so that encryption become decryption keys and + * @brief invert the keys so that encryption become decryption keys and * the other way round. - * \param keys key array of ints to invert + * @param keys key array of ints to invert */ static void multiswap_invert_keys(uint32_t keys[12]) { int i; @@ -92,12 +92,12 @@ } /** - * \brief "MultiSwap" encryption - * \param keys 32 bit numbers in machine endianness, + * @brief "MultiSwap" encryption + * @param keys 32 bit numbers in machine endianness, * 0-4 and 6-10 must be inverted from decryption - * \param key another key, this one must be the same for the decryption - * \param data data to encrypt - * \return encrypted data + * @param key another key, this one must be the same for the decryption + * @param data data to encrypt + * @return encrypted data */ static uint64_t multiswap_enc(const uint32_t keys[12], uint64_t key, uint64_t data) { uint32_t a = data; @@ -114,12 +114,12 @@ } /** - * \brief "MultiSwap" decryption - * \param keys 32 bit numbers in machine endianness, + * @brief "MultiSwap" decryption + * @param keys 32 bit numbers in machine endianness, * 0-4 and 6-10 must be inverted from encryption - * \param key another key, this one must be the same as for the encryption - * \param data data to decrypt - * \return decrypted data + * @param key another key, this one must be the same as for the encryption + * @param data data to decrypt + * @return decrypted data */ static uint64_t multiswap_dec(const uint32_t keys[12], uint64_t key, uint64_t data) { uint32_t a; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/asfdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/asfdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/asfdec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/asfdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,8 +25,10 @@ #include "libavutil/common.h" #include "libavutil/avstring.h" #include "libavutil/dict.h" +#include "libavutil/mathematics.h" #include "libavcodec/mpegaudio.h" #include "avformat.h" +#include "internal.h" #include "avio_internal.h" #include "riff.h" #include "asf.h" @@ -84,13 +86,11 @@ 0x90, 0x08, 0x00, 0x33, 0xb1, 0xe5, 0xcf, 0x11, 0x89, 0xf4, 0x00, 0xa0, 0xc9, 0x03, 0x49, 0xcb }; +#ifdef DEBUG static const ff_asf_guid stream_bitrate_guid = { /* (http://get.to/sdp) */ 0xce, 0x75, 0xf8, 0x7b, 0x8d, 0x46, 0xd1, 0x11, 0x8d, 0x82, 0x00, 0x60, 0x97, 0xc9, 0xa2, 0xb2 }; -/**********************************/ -/* decoding */ -#ifdef DEBUG #define PRINT_IF_GUID(g,cmp) \ if (!ff_guidcmp(g, &cmp)) \ av_dlog(NULL, "(GUID: %s) ", #cmp) @@ -228,10 +228,10 @@ pos1 = avio_tell(pb); - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */ + avpriv_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */ asf_st = av_mallocz(sizeof(ASFStream)); if (!asf_st) return AVERROR(ENOMEM); @@ -363,7 +363,7 @@ /* Extract palette from extradata if bpp <= 8 */ /* This code assumes that extradata contains only palette */ - /* This is true for all paletted codecs implemented in ffmpeg */ + /* This is true for all paletted codecs implemented in libavcodec */ if (st->codec->extradata_size && (st->codec->bits_per_coded_sample <= 8)) { int av_unused i; #if HAVE_BIGENDIAN @@ -574,7 +574,7 @@ name_len = avio_rl32(pb); // name length if ((ret = avio_get_str16le(pb, name_len * 2, name, sizeof(name))) < name_len) avio_skip(pb, name_len - ret); - ff_new_chapter(s, i, (AVRational){1, 10000000}, pres_time, AV_NOPTS_VALUE, name ); + avpriv_new_chapter(s, i, (AVRational){1, 10000000}, pres_time, AV_NOPTS_VALUE, name ); } return 0; @@ -979,7 +979,7 @@ asf_st->packet_pos= asf->packet_pos; if (asf_st->pkt.data && asf_st->palette_changed) { uint8_t *pal; - pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE, + pal = av_packet_new_side_data(&asf_st->pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE); if (!pal) { av_log(s, AV_LOG_ERROR, "Cannot append palette to packet\n"); @@ -1101,8 +1101,6 @@ assert(asf->packet_size_left < FRAME_HEADER_SIZE || asf->packet_segments < 1); asf->packet_time_start = 0; } - - return 0; } // Added to support seeking after packets have been read @@ -1170,12 +1168,12 @@ //printf("asf_read_pts\n"); asf_reset_header(s); for(;;){ - if (av_read_frame(s, pkt) < 0){ + if (asf_read_packet(s, pkt) < 0){ av_log(s, AV_LOG_INFO, "asf_read_pts failed\n"); return AV_NOPTS_VALUE; } - pts= pkt->pts; + pts = pkt->dts; av_free_packet(pkt); if(pkt->flags&AV_PKT_FLAG_KEY){ @@ -1285,21 +1283,21 @@ } } /* no index or seeking by index failed */ - if(av_seek_frame_binary(s, stream_index, pts, flags)<0) + if (ff_seek_frame_binary(s, stream_index, pts, flags) < 0) return -1; asf_reset_header(s); return 0; } AVInputFormat ff_asf_demuxer = { - "asf", - NULL_IF_CONFIG_SMALL("ASF format"), - sizeof(ASFContext), - asf_probe, - asf_read_header, - asf_read_packet, - asf_read_close, - asf_read_seek, - asf_read_pts, + .name = "asf", + .long_name = NULL_IF_CONFIG_SMALL("ASF format"), + .priv_data_size = sizeof(ASFContext), + .read_probe = asf_probe, + .read_header = asf_read_header, + .read_packet = asf_read_packet, + .read_close = asf_read_close, + .read_seek = asf_read_seek, + .read_timestamp = asf_read_pts, .flags = AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/asfenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/asfenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/asfenc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/asfenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" +#include "internal.h" #include "riff.h" #include "asf.h" #include "avio_internal.h" @@ -321,7 +322,7 @@ for(n=0;nnb_streams;n++) { enc = s->streams[n]->codec; - av_set_pts_info(s->streams[n], 32, 1, 1000); /* 32 bit pts in ms */ + avpriv_set_pts_info(s->streams[n], 32, 1, 1000); /* 32 bit pts in ms */ bit_rate += enc->bit_rate; } @@ -434,10 +435,6 @@ if (enc->codec_type == AVMEDIA_TYPE_AUDIO) { /* WAVEFORMATEX header */ int wavsize = ff_put_wav_header(pb, enc); - if ((enc->codec_id != CODEC_ID_MP3) && (enc->codec_id != CODEC_ID_MP2) && (enc->codec_id != CODEC_ID_ADPCM_IMA_WAV) && (enc->extradata_size==0)) { - wavsize += 2; - avio_wl16(pb, 0); - } if (wavsize < 0) return -1; @@ -882,20 +879,20 @@ #if CONFIG_ASF_MUXER AVOutputFormat ff_asf_muxer = { - "asf", - NULL_IF_CONFIG_SMALL("ASF format"), - "video/x-ms-asf", - "asf,wmv,wma", - sizeof(ASFContext), + .name = "asf", + .long_name = NULL_IF_CONFIG_SMALL("ASF format"), + .mime_type = "video/x-ms-asf", + .extensions = "asf,wmv,wma", + .priv_data_size = sizeof(ASFContext), #if CONFIG_LIBMP3LAME - CODEC_ID_MP3, + .audio_codec = CODEC_ID_MP3, #else - CODEC_ID_MP2, + .audio_codec = CODEC_ID_MP2, #endif - CODEC_ID_MSMPEG4V3, - asf_write_header, - asf_write_packet, - asf_write_trailer, + .video_codec = CODEC_ID_MSMPEG4V3, + .write_header = asf_write_header, + .write_packet = asf_write_packet, + .write_trailer = asf_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, ff_codec_bmp_tags, ff_codec_wav_tags, 0}, }; @@ -903,20 +900,20 @@ #if CONFIG_ASF_STREAM_MUXER AVOutputFormat ff_asf_stream_muxer = { - "asf_stream", - NULL_IF_CONFIG_SMALL("ASF format"), - "video/x-ms-asf", - "asf,wmv,wma", - sizeof(ASFContext), + .name = "asf_stream", + .long_name = NULL_IF_CONFIG_SMALL("ASF format"), + .mime_type = "video/x-ms-asf", + .extensions = "asf,wmv,wma", + .priv_data_size = sizeof(ASFContext), #if CONFIG_LIBMP3LAME - CODEC_ID_MP3, + .audio_codec = CODEC_ID_MP3, #else - CODEC_ID_MP2, + .audio_codec = CODEC_ID_MP2, #endif - CODEC_ID_MSMPEG4V3, - asf_write_stream_header, - asf_write_packet, - asf_write_trailer, + .video_codec = CODEC_ID_MSMPEG4V3, + .write_header = asf_write_stream_header, + .write_packet = asf_write_packet, + .write_trailer = asf_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, ff_codec_bmp_tags, ff_codec_wav_tags, 0}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/assdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/assdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/assdec.c 2011-04-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/assdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/mathematics.h" #include "avformat.h" #include "internal.h" @@ -82,10 +83,10 @@ uint8_t *p, **dst[2]={0}; int pos[2]={0}; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return -1; - av_set_pts_info(st, 64, 1, 100); + avpriv_set_pts_info(st, 64, 1, 100); st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; st->codec->codec_id= CODEC_ID_SSA; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/au.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/au.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/au.c 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/au.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,6 +28,7 @@ */ #include "avformat.h" +#include "internal.h" #include "avio_internal.h" #include "pcm.h" #include "riff.h" @@ -35,7 +36,7 @@ /* if we don't know the size in advance */ #define AU_UNKNOWN_SIZE ((uint32_t)(~0)) -/* The ffmpeg codecs we support, and the IDs they have in the file */ +/* The libavcodec codecs we support, and the IDs they have in the file */ static const AVCodecTag codec_au_tags[] = { { CODEC_ID_PCM_MULAW, 1 }, { CODEC_ID_PCM_S8, 2 }, @@ -151,7 +152,7 @@ } /* now we are ready: build format streams */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return -1; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -159,7 +160,7 @@ st->codec->codec_id = codec; st->codec->channels = channels; st->codec->sample_rate = rate; - av_set_pts_info(st, 64, 1, rate); + avpriv_set_pts_info(st, 64, 1, rate); return 0; } @@ -185,30 +186,27 @@ #if CONFIG_AU_DEMUXER AVInputFormat ff_au_demuxer = { - "au", - NULL_IF_CONFIG_SMALL("SUN AU format"), - 0, - au_probe, - au_read_header, - au_read_packet, - NULL, - pcm_read_seek, + .name = "au", + .long_name = NULL_IF_CONFIG_SMALL("SUN AU format"), + .read_probe = au_probe, + .read_header = au_read_header, + .read_packet = au_read_packet, + .read_seek = pcm_read_seek, .codec_tag= (const AVCodecTag* const []){codec_au_tags, 0}, }; #endif #if CONFIG_AU_MUXER AVOutputFormat ff_au_muxer = { - "au", - NULL_IF_CONFIG_SMALL("SUN AU format"), - "audio/basic", - "au", - 0, - CODEC_ID_PCM_S16BE, - CODEC_ID_NONE, - au_write_header, - au_write_packet, - au_write_trailer, + .name = "au", + .long_name = NULL_IF_CONFIG_SMALL("SUN AU format"), + .mime_type = "audio/basic", + .extensions = "au", + .audio_codec = CODEC_ID_PCM_S16BE, + .video_codec = CODEC_ID_NONE, + .write_header = au_write_header, + .write_packet = au_write_packet, + .write_trailer = au_write_trailer, .codec_tag= (const AVCodecTag* const []){codec_au_tags, 0}, }; #endif //CONFIG_AU_MUXER diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/audiointerleave.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/audiointerleave.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/audiointerleave.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/audiointerleave.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ */ #include "libavutil/fifo.h" +#include "libavutil/mathematics.h" #include "avformat.h" #include "audiointerleave.h" #include "internal.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avc.c 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avc.c 2012-01-11 00:34:30.000000000 +0000 @@ -75,8 +75,11 @@ size = 0; nal_start = ff_avc_find_startcode(p, end); - while (nal_start < end) { - while(!*(nal_start++)); + for (;;) { + while (nal_start < end && !*(nal_start++)); + if (nal_start == end) + break; + nal_end = ff_avc_find_startcode(nal_start, end); avio_wb32(pb, nal_end - nal_start); avio_write(pb, nal_start, nal_end - nal_start); @@ -117,22 +120,26 @@ end = buf + len; /* look for sps and pps */ - while (buf < end) { - unsigned int size; + while (end - buf > 4) { + uint32_t size; uint8_t nal_type; - size = AV_RB32(buf); - nal_type = buf[4] & 0x1f; + size = FFMIN(AV_RB32(buf), end - buf - 4); + buf += 4; + nal_type = buf[0] & 0x1f; + if (nal_type == 7) { /* SPS */ - sps = buf + 4; + sps = buf; sps_size = size; } else if (nal_type == 8) { /* PPS */ - pps = buf + 4; + pps = buf; pps_size = size; } - buf += size + 4; + + buf += size; } - assert(sps); - assert(pps); + + if (!sps || !pps || sps_size < 4 || sps_size > UINT16_MAX || pps_size > UINT16_MAX) + return AVERROR_INVALIDDATA; avio_w8(pb, 1); /* version */ avio_w8(pb, sps[1]); /* profile */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avformat.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avformat.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avformat.h 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avformat.h 2012-01-11 00:34:30.000000000 +0000 @@ -21,26 +21,125 @@ #ifndef AVFORMAT_AVFORMAT_H #define AVFORMAT_AVFORMAT_H - -/** - * Return the LIBAVFORMAT_VERSION_INT constant. - */ -unsigned avformat_version(void); - /** - * Return the libavformat build-time configuration. + * @file + * @ingroup libavf + * Main libavformat public API header */ -const char *avformat_configuration(void); /** - * Return the libavformat license. + * @defgroup libavf I/O and Muxing/Demuxing Library + * @{ + * + * Libavformat (lavf) is a library for dealing with various media container + * formats. Its main two purposes are demuxing - i.e. splitting a media file + * into component streams, and the reverse process of muxing - writing supplied + * data in a specified container format. It also has an @ref lavf_io + * "I/O module" which supports a number of protocols for accessing the data (e.g. + * file, tcp, http and others). Before using lavf, you need to call + * av_register_all() to register all compiled muxers, demuxers and protocols. + * Unless you are absolutely sure you won't use libavformat's network + * capabilities, you should also call avformat_network_init(). + * + * A supported input format is described by an AVInputFormat struct, conversely + * an output format is described by AVOutputFormat. You can iterate over all + * registered input/output formats using the av_iformat_next() / + * av_oformat_next() functions. The protocols layer is not part of the public + * API, so you can only get the names of supported protocols with the + * avio_enum_protocols() function. + * + * Main lavf structure used for both muxing and demuxing is AVFormatContext, + * which exports all information about the file being read or written. As with + * most Libav structures, its size is not part of public ABI, so it cannot be + * allocated on stack or directly with av_malloc(). To create an + * AVFormatContext, use avformat_alloc_context() (some functions, like + * avformat_open_input() might do that for you). + * + * Most importantly an AVFormatContext contains: + * @li the @ref AVFormatContext.iformat "input" or @ref AVFormatContext.oformat + * "output" format. It is either autodetected or set by user for input; + * always set by user for output. + * @li an @ref AVFormatContext.streams "array" of AVStreams, which describe all + * elementary streams stored in the file. AVStreams are typically referred to + * using their index in this array. + * @li an @ref AVFormatContext.pb "I/O context". It is either opened by lavf or + * set by user for input, always set by user for output (unless you are dealing + * with an AVFMT_NOFILE format). + * + * @defgroup lavf_decoding Demuxing + * @{ + * Demuxers read a media file and split it into chunks of data (@em packets). A + * @ref AVPacket "packet" contains one or more frames which belong a single + * elementary stream. In lavf API this process is represented by the + * avformat_open_input() function for opening a file, av_read_frame() for + * reading a single packet and finally avformat_close_input(), which does the + * cleanup. + * + * @section lavf_decoding_open Opening a media file + * The minimum information required to open a file is its URL or filename, which + * is passed to avformat_open_input(), as in the following code: + * @code + * const char *url = "in.mp3"; + * AVFormatContext *s = NULL; + * int ret = avformat_open_input(&s, url, NULL, NULL); + * if (ret < 0) + * abort(); + * @endcode + * The above code attempts to allocate an AVFormatContext, open the + * specified file (autodetecting the format) and read the header, exporting the + * information stored there into s. Some formats do not have a header or do not + * store enough information there, so it is recommended that you call the + * avformat_find_stream_info() function which tries to read and decode a few + * frames to find missing information. + * + * In some cases you might want to preallocate an AVFormatContext yourself with + * avformat_alloc_context() and do some tweaking on it before passing it to + * avformat_open_input(). One such case is when you want to use custom functions + * for reading input data instead of lavf internal I/O layer. + * To do that, create your own AVIOContext with avio_alloc_context(), passing + * your reading callbacks to it. Then set the @em pb field of your + * AVFormatContext to newly created AVIOContext. + * + * After you have finished reading the file, you must close it with + * avformat_close_input(). It will free everything associated with the file. + * + * @section lavf_decoding_read Reading from an opened file + * + * @section lavf_decoding_seek Seeking + * @} + * + * @defgroup lavf_encoding Muxing + * @{ + * @} + * + * @defgroup lavf_io I/O Read/Write + * @{ + * @} + * + * @defgroup lavf_codec Demuxers + * @{ + * @defgroup lavf_codec_native Native Demuxers + * @{ + * @} + * @defgroup lavf_codec_wrappers External library wrappers + * @{ + * @} + * @} + * @defgroup lavf_protos I/O Protocols + * @{ + * @} + * @defgroup lavf_internal Internal + * @{ + * @} + * @} + * */ -const char *avformat_license(void); #include #include /* FILE */ #include "libavcodec/avcodec.h" #include "libavutil/dict.h" +#include "libavutil/log.h" #include "avio.h" #include "libavformat/version.h" @@ -48,63 +147,77 @@ struct AVFormatContext; -/* - * Public Metadata API. +/** + * @defgroup metadata_api Public Metadata API + * @{ + * @ingroup libavf * The metadata API allows libavformat to export metadata tags to a client - * application using a sequence of key/value pairs. Like all strings in Libav, - * metadata must be stored as UTF-8 encoded Unicode. Note that metadata + * application when demuxing. Conversely it allows a client application to + * set metadata when muxing. + * + * Metadata is exported or set as pairs of key/value strings in the 'metadata' + * fields of the AVFormatContext, AVStream, AVChapter and AVProgram structs + * using the @ref lavu_dict "AVDictionary" API. Like all strings in Libav, + * metadata is assumed to be UTF-8 encoded Unicode. Note that metadata * exported by demuxers isn't checked to be valid UTF-8 in most cases. + * * Important concepts to keep in mind: - * 1. Keys are unique; there can never be 2 tags with the same key. This is + * - Keys are unique; there can never be 2 tags with the same key. This is * also meant semantically, i.e., a demuxer should not knowingly produce * several keys that are literally different but semantically identical. * E.g., key=Author5, key=Author6. In this example, all authors must be * placed in the same tag. - * 2. Metadata is flat, not hierarchical; there are no subtags. If you + * - Metadata is flat, not hierarchical; there are no subtags. If you * want to store, e.g., the email address of the child of producer Alice * and actor Bob, that could have key=alice_and_bobs_childs_email_address. - * 3. Several modifiers can be applied to the tag name. This is done by + * - Several modifiers can be applied to the tag name. This is done by * appending a dash character ('-') and the modifier name in the order * they appear in the list below -- e.g. foo-eng-sort, not foo-sort-eng. - * a) language -- a tag whose value is localized for a particular language + * - language -- a tag whose value is localized for a particular language * is appended with the ISO 639-2/B 3-letter language code. * For example: Author-ger=Michael, Author-eng=Mike * The original/default language is in the unqualified "Author" tag. * A demuxer should set a default if it sets any translated tag. - * b) sorting -- a modified version of a tag that should be used for + * - sorting -- a modified version of a tag that should be used for * sorting will have '-sort' appended. E.g. artist="The Beatles", * artist-sort="Beatles, The". * - * 4. Demuxers attempt to export metadata in a generic format, however tags + * - Demuxers attempt to export metadata in a generic format, however tags * with no generic equivalents are left as they are stored in the container. * Follows a list of generic tag names: * - * album -- name of the set this work belongs to - * album_artist -- main creator of the set/album, if different from artist. - * e.g. "Various Artists" for compilation albums. - * artist -- main creator of the work - * comment -- any additional description of the file. - * composer -- who composed the work, if different from artist. - * copyright -- name of copyright holder. - * creation_time-- date when the file was created, preferably in ISO 8601. - * date -- date when the work was created, preferably in ISO 8601. - * disc -- number of a subset, e.g. disc in a multi-disc collection. - * encoder -- name/settings of the software/hardware that produced the file. - * encoded_by -- person/group who created the file. - * filename -- original name of the file. - * genre -- . - * language -- main language in which the work is performed, preferably - * in ISO 639-2 format. Multiple languages can be specified by - * separating them with commas. - * performer -- artist who performed the work, if different from artist. - * E.g for "Also sprach Zarathustra", artist would be "Richard - * Strauss" and performer "London Philharmonic Orchestra". - * publisher -- name of the label/publisher. - * service_name -- name of the service in broadcasting (channel name). - * service_provider -- name of the service provider in broadcasting. - * title -- name of the work. - * track -- number of this work in the set, can be in form current/total. - * variant_bitrate -- the total bitrate of the bitrate variant that the current stream is part of + @verbatim + album -- name of the set this work belongs to + album_artist -- main creator of the set/album, if different from artist. + e.g. "Various Artists" for compilation albums. + artist -- main creator of the work + comment -- any additional description of the file. + composer -- who composed the work, if different from artist. + copyright -- name of copyright holder. + creation_time-- date when the file was created, preferably in ISO 8601. + date -- date when the work was created, preferably in ISO 8601. + disc -- number of a subset, e.g. disc in a multi-disc collection. + encoder -- name/settings of the software/hardware that produced the file. + encoded_by -- person/group who created the file. + filename -- original name of the file. + genre -- . + language -- main language in which the work is performed, preferably + in ISO 639-2 format. Multiple languages can be specified by + separating them with commas. + performer -- artist who performed the work, if different from artist. + E.g for "Also sprach Zarathustra", artist would be "Richard + Strauss" and performer "London Philharmonic Orchestra". + publisher -- name of the label/publisher. + service_name -- name of the service in broadcasting (channel name). + service_provider -- name of the service provider in broadcasting. + title -- name of the work. + track -- number of this work in the set, can be in form current/total. + variant_bitrate -- the total bitrate of the bitrate variant that the current stream is part of + @endverbatim + * + * Look in the examples section for an application example how to use the Metadata API. + * + * @} */ #if FF_API_OLD_METADATA2 @@ -251,7 +364,7 @@ #endif } AVFormatParameters; -//! Demuxer will use avio_open, no opened file should be provided by the caller. +/// Demuxer will use avio_open, no opened file should be provided by the caller. #define AVFMT_NOFILE 0x0001 #define AVFMT_NEEDNUMBER 0x0002 /**< Needs '%d' in filename. */ #define AVFMT_SHOW_IDS 0x0008 /**< Show format stream IDs numbers. */ @@ -266,7 +379,12 @@ #define AVFMT_NOSTREAMS 0x1000 /**< Format does not require any streams */ #define AVFMT_NOBINSEARCH 0x2000 /**< Format does not allow to fallback to binary search via read_timestamp */ #define AVFMT_NOGENSEARCH 0x4000 /**< Format does not allow to fallback to generic search */ +#define AVFMT_NO_BYTE_SEEK 0x8000 /**< Format does not allow seeking by bytes */ +/** + * @addtogroup lavf_encoding + * @{ + */ typedef struct AVOutputFormat { const char *name; /** @@ -314,10 +432,25 @@ const AVClass *priv_class; ///< AVClass for the private context + /** + * Test if the given codec can be stored in this container. + * + * @return 1 if the codec is supported, 0 if it is not. + * A negative number if unknown. + */ + int (*query_codec)(enum CodecID id, int std_compliance); + /* private fields */ struct AVOutputFormat *next; } AVOutputFormat; +/** + * @} + */ +/** + * @addtogroup lavf_decoding + * @{ + */ typedef struct AVInputFormat { /** * A comma separated list of short names for the format. New names @@ -383,14 +516,16 @@ int stream_index, int64_t timestamp, int flags); #endif /** - * Gets the next timestamp in stream[stream_index].time_base units. + * Get the next timestamp in stream[stream_index].time_base units. * @return the timestamp or AV_NOPTS_VALUE if an error occurred */ int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit); /** - * Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER. + * Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, + * AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, + * AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK. */ int flags; @@ -437,6 +572,9 @@ /* private fields */ struct AVInputFormat *next; } AVInputFormat; +/** + * @} + */ enum AVStreamParseType { AVSTREAM_PARSE_NONE, @@ -494,8 +632,10 @@ AVRational r_frame_rate; void *priv_data; +#if FF_API_REORDER_PRIVATE /* internal data used in av_find_stream_info() */ int64_t first_dts; +#endif /** * encoding: pts generation when outputting stream @@ -510,17 +650,23 @@ * encoding: set by libavformat in av_write_header */ AVRational time_base; +#if FF_API_REORDER_PRIVATE int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */ +#endif +#if FF_API_STREAM_COPY /* ffmpeg.c private use */ - int stream_copy; /**< If set, just copy stream. */ + attribute_deprecated int stream_copy; /**< If set, just copy stream. */ +#endif enum AVDiscard discard; ///< Selects which packets can be discarded at will and do not need to be demuxed. +#if FF_API_AVSTREAM_QUALITY //FIXME move stuff to a flags field? /** * Quality, as it has been removed from AVCodecContext and put in AVVideoFrame. * MN: dunno if that is the right place for it */ - float quality; + attribute_deprecated float quality; +#endif /** * Decoding: pts of the first frame of the stream, in stream time base. @@ -537,6 +683,7 @@ */ int64_t duration; +#if FF_API_REORDER_PRIVATE /* av_read_frame() support */ enum AVStreamParseType need_parsing; struct AVCodecParserContext *parser; @@ -549,14 +696,17 @@ support seeking natively. */ int nb_index_entries; unsigned int index_entries_allocated_size; +#endif int64_t nb_frames; ///< number of frames in this stream if known or 0 int disposition; /**< AV_DISPOSITION_* bit field */ +#if FF_API_REORDER_PRIVATE AVProbeData probe_data; #define MAX_REORDER_DELAY 16 int64_t pts_buffer[MAX_REORDER_DELAY+1]; +#endif /** * sample aspect ratio (0 if unknown) @@ -567,6 +717,7 @@ AVDictionary *metadata; +#if FF_API_REORDER_PRIVATE /* Intended mostly for av_read_frame() support. Not supposed to be used by */ /* external applications; try to use something else if at all possible. */ const uint8_t *cur_ptr; @@ -592,22 +743,32 @@ /** * last packet in packet_buffer for this stream when muxing. - * used internally, NOT PART OF PUBLIC API, dont read or write from outside of libav* + * Used internally, NOT PART OF PUBLIC API, do not read or + * write from outside of libav* */ struct AVPacketList *last_in_packet_buffer; +#endif /** * Average framerate */ AVRational avg_frame_rate; + /***************************************************************** + * All fields below this line are not part of the public API. They + * may not be used outside of libavformat and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ + /** * Number of frames that have been demuxed during av_find_stream_info() */ int codec_info_nb_frames; /** - * Stream informations used internally by av_find_stream_info() + * Stream information used internally by av_find_stream_info() */ #define MAX_STD_TIMEBASES (60*12+5) struct { @@ -616,7 +777,51 @@ int duration_count; double duration_error[MAX_STD_TIMEBASES]; int64_t codec_info_duration; + int nb_decoded_frames; } *info; +#if !FF_API_REORDER_PRIVATE + const uint8_t *cur_ptr; + int cur_len; + AVPacket cur_pkt; + + // Timestamp generation support: + /** + * Timestamp corresponding to the last dts sync point. + * + * Initialized when AVCodecParserContext.dts_sync_point >= 0 and + * a DTS is received from the underlying container. Otherwise set to + * AV_NOPTS_VALUE by default. + */ + int64_t reference_dts; + int64_t first_dts; + int64_t cur_dts; + int last_IP_duration; + int64_t last_IP_pts; + + /** + * Number of packets to buffer for codec probing + */ +#define MAX_PROBE_PACKETS 2500 + int probe_packets; + + /** + * last packet in packet_buffer for this stream when muxing. + */ + struct AVPacketList *last_in_packet_buffer; + AVProbeData probe_data; +#define MAX_REORDER_DELAY 16 + int64_t pts_buffer[MAX_REORDER_DELAY+1]; + /* av_read_frame() support */ + enum AVStreamParseType need_parsing; + struct AVCodecParserContext *parser; + + AVIndexEntry *index_entries; /**< Only used if the format does not + support seeking natively. */ + int nb_index_entries; + unsigned int index_entries_allocated_size; + + int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */ +#endif } AVStream; #define AV_PROGRAM_RUNNING 1 @@ -651,22 +856,67 @@ * New fields can be added to the end with minor version bumps. * Removal, reordering and changes to existing fields require a major * version bump. - * sizeof(AVFormatContext) must not be used outside libav*. + * sizeof(AVFormatContext) must not be used outside libav*, use + * avformat_alloc_context() to create an AVFormatContext. */ typedef struct AVFormatContext { - const AVClass *av_class; /**< Set by avformat_alloc_context. */ - /* Can only be iformat or oformat, not both at the same time. */ + /** + * A class for logging and AVOptions. Set by avformat_alloc_context(). + * Exports (de)muxer private options if they exist. + */ + const AVClass *av_class; + + /** + * Can only be iformat or oformat, not both at the same time. + * + * decoding: set by avformat_open_input(). + * encoding: set by the user. + */ struct AVInputFormat *iformat; struct AVOutputFormat *oformat; + + /** + * Format private data. This is an AVOptions-enabled struct + * if and only if iformat/oformat.priv_class is not NULL. + */ void *priv_data; + + /* + * I/O context. + * + * decoding: either set by the user before avformat_open_input() (then + * the user must close it manually) or set by avformat_open_input(). + * encoding: set by the user. + * + * Do NOT set this field if AVFMT_NOFILE flag is set in + * iformat/oformat.flags. In such a case, the (de)muxer will handle + * I/O in some other way and this field will be NULL. + */ AVIOContext *pb; + + /** + * A list of all streams in the file. New streams are created with + * avformat_new_stream(). + * + * decoding: streams are created by libavformat in avformat_open_input(). + * If AVFMTCTX_NOHEADER is set in ctx_flags, then new streams may also + * appear in av_read_frame(). + * encoding: streams are created by the user before avformat_write_header(). + */ unsigned int nb_streams; AVStream **streams; + char filename[1024]; /**< input or output filename */ /* stream info */ - int64_t timestamp; +#if FF_API_TIMESTAMP + /** + * @deprecated use 'creation_time' metadata tag instead + */ + attribute_deprecated int64_t timestamp; +#endif int ctx_flags; /**< Format-specific flags, see AVFMTCTX_xx */ +#if FF_API_REORDER_PRIVATE /* private data for pts handling (do not modify directly). */ /** * This buffer is only needed when packets were already buffered but @@ -674,6 +924,7 @@ * streams. */ struct AVPacketList *packet_buffer; +#endif /** * Decoding: position of the first frame of the component, in @@ -685,15 +936,17 @@ /** * Decoding: duration of the stream, in AV_TIME_BASE fractional * seconds. Only set this value if you know none of the individual stream - * durations and also dont set any of them. This is deduced from the + * durations and also do not set any of them. This is deduced from the * AVStream values if not set. */ int64_t duration; +#if FF_API_FILESIZE /** * decoding: total file size, 0 if unknown */ - int64_t file_size; + attribute_deprecated int64_t file_size; +#endif /** * Decoding: total stream bitrate in bit/s, 0 if not @@ -702,23 +955,36 @@ */ int bit_rate; +#if FF_API_REORDER_PRIVATE /* av_read_frame() support */ AVStream *cur_st; /* av_seek_frame() support */ int64_t data_offset; /**< offset of the first packet */ +#endif - int mux_rate; +#if FF_API_MUXRATE + /** + * use mpeg muxer private options instead + */ + attribute_deprecated int mux_rate; +#endif unsigned int packet_size; - int preload; +#if FF_API_PRELOAD + attribute_deprecated int preload; +#endif int max_delay; +#if FF_API_LOOP_OUTPUT #define AVFMT_NOOUTPUTLOOP -1 #define AVFMT_INFINITEOUTPUTLOOP 0 /** * number of times to loop output in formats that support it + * + * @deprecated use the 'loop' private option in the gif muxer. */ - int loop_output; + attribute_deprecated int loop_output; +#endif int flags; #define AVFMT_FLAG_GENPTS 0x0001 ///< Generate missing pts even if it requires parsing future frames. @@ -731,8 +997,14 @@ #define AVFMT_FLAG_RTP_HINT 0x0040 ///< Deprecated, use the -movflags rtphint muxer specific AVOption instead #endif #define AVFMT_FLAG_CUSTOM_IO 0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it. +#define AVFMT_FLAG_DISCARD_CORRUPT 0x0100 ///< Discard frames marked corrupted - int loop_input; +#if FF_API_LOOP_INPUT + /** + * @deprecated, use the 'loop' img2 demuxer private option. + */ + attribute_deprecated int loop_input; +#endif /** * decoding: size of data to probe; encoding: unused. @@ -740,8 +1012,8 @@ unsigned int probesize; /** - * Maximum time (in AV_TIME_BASE units) during which the input should - * be analyzed in av_find_stream_info(). + * decoding: maximum time (in AV_TIME_BASE units) during which the input should + * be analyzed in avformat_find_stream_info(). */ int max_analyze_duration; @@ -796,6 +1068,7 @@ int debug; #define FF_FDEBUG_TS 0x0001 +#if FF_API_REORDER_PRIVATE /** * Raw packets from the demuxer, prior to parsing and decoding. * This buffer is used for buffering packets until the codec can @@ -806,15 +1079,18 @@ struct AVPacketList *raw_packet_buffer_end; struct AVPacketList *packet_buffer_end; +#endif AVDictionary *metadata; +#if FF_API_REORDER_PRIVATE /** * Remaining size available for raw_packet_buffer, in bytes. * NOT PART OF PUBLIC API */ #define RAW_PACKET_BUFFER_SIZE 2500000 int raw_packet_buffer_remaining_size; +#endif /** * Start time of the stream in real world time, in microseconds @@ -829,6 +1105,62 @@ * decoding: number of frames used to probe fps */ int fps_probe_size; + + /** + * Error recognition; higher values will detect more errors but may + * misdetect some more or less valid parts as errors. + * - encoding: unused + * - decoding: Set by user. + */ + int error_recognition; + + /** + * Custom interrupt callbacks for the I/O layer. + * + * decoding: set by the user before avformat_open_input(). + * encoding: set by the user before avformat_write_header() + * (mainly useful for AVFMT_NOFILE formats). The callback + * should also be passed to avio_open2() if it's used to + * open the file. + */ + AVIOInterruptCB interrupt_callback; + + /***************************************************************** + * All fields below this line are not part of the public API. They + * may not be used outside of libavformat and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ +#if !FF_API_REORDER_PRIVATE + /** + * Raw packets from the demuxer, prior to parsing and decoding. + * This buffer is used for buffering packets until the codec can + * be identified, as parsing cannot be done without knowing the + * codec. + */ + struct AVPacketList *raw_packet_buffer; + struct AVPacketList *raw_packet_buffer_end; + /** + * Remaining size available for raw_packet_buffer, in bytes. + */ +#define RAW_PACKET_BUFFER_SIZE 2500000 + int raw_packet_buffer_remaining_size; + + /** + * This buffer is only needed when packets were already buffered but + * not decoded, for example to get the codec parameters in MPEG + * streams. + */ + struct AVPacketList *packet_buffer; + struct AVPacketList *packet_buffer_end; + + /* av_read_frame() support */ + AVStream *cur_st; + + /* av_seek_frame() support */ + int64_t data_offset; /**< offset of the first packet */ +#endif } AVFormatContext; typedef struct AVPacketList { @@ -836,140 +1168,134 @@ struct AVPacketList *next; } AVPacketList; + /** - * If f is NULL, returns the first registered input format, - * if f is non-NULL, returns the next registered input format after f - * or NULL if f is the last one. + * @defgroup lavf_core Core functions + * @ingroup libavf + * + * Functions for querying libavformat capabilities, allocating core structures, + * etc. + * @{ */ -AVInputFormat *av_iformat_next(AVInputFormat *f); /** - * If f is NULL, returns the first registered output format, - * if f is non-NULL, returns the next registered output format after f - * or NULL if f is the last one. + * Return the LIBAVFORMAT_VERSION_INT constant. */ -AVOutputFormat *av_oformat_next(AVOutputFormat *f); +unsigned avformat_version(void); -#if FF_API_GUESS_IMG2_CODEC -attribute_deprecated enum CodecID av_guess_image2_codec(const char *filename); -#endif +/** + * Return the libavformat build-time configuration. + */ +const char *avformat_configuration(void); + +/** + * Return the libavformat license. + */ +const char *avformat_license(void); -/* XXX: Use automatic init with either ELF sections or C file parser */ -/* modules. */ +/** + * Initialize libavformat and register all the muxers, demuxers and + * protocols. If you do not call this function, then you can select + * exactly which formats you want to support. + * + * @see av_register_input_format() + * @see av_register_output_format() + * @see av_register_protocol() + */ +void av_register_all(void); -/* utils.c */ void av_register_input_format(AVInputFormat *format); void av_register_output_format(AVOutputFormat *format); /** - * Return the output format in the list of registered output formats - * which best matches the provided parameters, or return NULL if - * there is no match. + * Do global initialization of network components. This is optional, + * but recommended, since it avoids the overhead of implicitly + * doing the setup for each session. * - * @param short_name if non-NULL checks if short_name matches with the - * names of the registered formats - * @param filename if non-NULL checks if filename terminates with the - * extensions of the registered formats - * @param mime_type if non-NULL checks if mime_type matches with the - * MIME type of the registered formats + * Calling this function will become mandatory if using network + * protocols at some major version bump. */ -AVOutputFormat *av_guess_format(const char *short_name, - const char *filename, - const char *mime_type); +int avformat_network_init(void); /** - * Guess the codec ID based upon muxer and filename. + * Undo the initialization done by avformat_network_init. */ -enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, - const char *filename, const char *mime_type, - enum AVMediaType type); +int avformat_network_deinit(void); /** - * Send a nice hexadecimal dump of a buffer to the specified file stream. - * - * @param f The file stream pointer where the dump should be sent to. - * @param buf buffer - * @param size buffer size - * - * @see av_hex_dump_log, av_pkt_dump2, av_pkt_dump_log2 + * If f is NULL, returns the first registered input format, + * if f is non-NULL, returns the next registered input format after f + * or NULL if f is the last one. */ -void av_hex_dump(FILE *f, uint8_t *buf, int size); +AVInputFormat *av_iformat_next(AVInputFormat *f); /** - * Send a nice hexadecimal dump of a buffer to the log. - * - * @param avcl A pointer to an arbitrary struct of which the first field is a - * pointer to an AVClass struct. - * @param level The importance level of the message, lower values signifying - * higher importance. - * @param buf buffer - * @param size buffer size - * - * @see av_hex_dump, av_pkt_dump2, av_pkt_dump_log2 - */ -void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size); + * If f is NULL, returns the first registered output format, + * if f is non-NULL, returns the next registered output format after f + * or NULL if f is the last one. + */ +AVOutputFormat *av_oformat_next(AVOutputFormat *f); /** - * Send a nice dump of a packet to the specified file stream. - * - * @param f The file stream pointer where the dump should be sent to. - * @param pkt packet to dump - * @param dump_payload True if the payload must be displayed, too. - * @param st AVStream that the packet belongs to + * Allocate an AVFormatContext. + * avformat_free_context() can be used to free the context and everything + * allocated by the framework within it. */ -void av_pkt_dump2(FILE *f, AVPacket *pkt, int dump_payload, AVStream *st); - +AVFormatContext *avformat_alloc_context(void); /** - * Send a nice dump of a packet to the log. - * - * @param avcl A pointer to an arbitrary struct of which the first field is a - * pointer to an AVClass struct. - * @param level The importance level of the message, lower values signifying - * higher importance. - * @param pkt packet to dump - * @param dump_payload True if the payload must be displayed, too. - * @param st AVStream that the packet belongs to + * Free an AVFormatContext and all its streams. + * @param s context to free */ -void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload, - AVStream *st); - -#if FF_API_PKT_DUMP -attribute_deprecated void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); -attribute_deprecated void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, - int dump_payload); -#endif +void avformat_free_context(AVFormatContext *s); /** - * Initialize libavformat and register all the muxers, demuxers and - * protocols. If you do not call this function, then you can select - * exactly which formats you want to support. + * Get the AVClass for AVFormatContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. * - * @see av_register_input_format() - * @see av_register_output_format() - * @see av_register_protocol() + * @see av_opt_find(). */ -void av_register_all(void); +const AVClass *avformat_get_class(void); /** - * Get the CodecID for the given codec tag tag. - * If no codec id is found returns CODEC_ID_NONE. + * Add a new stream to a media file. * - * @param tags list of supported codec_id-codec_tag pairs, as stored - * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag + * When demuxing, it is called by the demuxer in read_header(). If the + * flag AVFMTCTX_NOHEADER is set in s.ctx_flags, then it may also + * be called in read_packet(). + * + * When muxing, should be called by the user before avformat_write_header(). + * + * @param c If non-NULL, the AVCodecContext corresponding to the new stream + * will be initialized to use this codec. This is needed for e.g. codec-specific + * defaults to be set, so codec should be provided if it is known. + * + * @return newly created stream or NULL on error. */ -enum CodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag); +AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c); + +AVProgram *av_new_program(AVFormatContext *s, int id); /** - * Get the codec tag for the given codec id id. - * If no codec tag is found returns 0. - * - * @param tags list of supported codec_id-codec_tag pairs, as stored - * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag + * @} */ -unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum CodecID id); -/* media file input */ + +#if FF_API_GUESS_IMG2_CODEC +attribute_deprecated enum CodecID av_guess_image2_codec(const char *filename); +#endif + +#if FF_API_PKT_DUMP +attribute_deprecated void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); +attribute_deprecated void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, + int dump_payload); +#endif + + +/** + * @addtogroup lavf_decoding + * @{ + */ /** * Find AVInputFormat based on the short name of the input format. @@ -1067,12 +1393,25 @@ */ int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options); +#if FF_API_FORMAT_PARAMETERS /** - * Allocate an AVFormatContext. - * avformat_free_context() can be used to free the context and everything - * allocated by the framework within it. + * Read packets of a media file to get stream information. This + * is useful for file formats with no headers such as MPEG. This + * function also computes the real framerate in case of MPEG-2 repeat + * frame mode. + * The logical file position is not changed by this function; + * examined packets may be buffered for later processing. + * + * @param ic media file handle + * @return >=0 if OK, AVERROR_xxx on error + * @todo Let the user decide somehow what information is needed so that + * we do not waste time getting stuff the user does not need. + * + * @deprecated use avformat_find_stream_info. */ -AVFormatContext *avformat_alloc_context(void); +attribute_deprecated +int av_find_stream_info(AVFormatContext *ic); +#endif /** * Read packets of a media file to get stream information. This @@ -1083,11 +1422,19 @@ * examined packets may be buffered for later processing. * * @param ic media file handle + * @param options If non-NULL, an ic.nb_streams long array of pointers to + * dictionaries, where i-th member contains options for + * codec corresponding to i-th stream. + * On return each dictionary will be filled with options that were not found. * @return >=0 if OK, AVERROR_xxx on error + * + * @note this function isn't guaranteed to open all the codecs, so + * options being non-empty at return is a perfectly normal behavior. + * * @todo Let the user decide somehow what information is needed so that * we do not waste time getting stuff the user does not need. */ -int av_find_stream_info(AVFormatContext *ic); +int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options); /** * Find the "best" stream in the file. @@ -1213,25 +1560,37 @@ */ int av_read_pause(AVFormatContext *s); +#if FF_API_FORMAT_PARAMETERS /** * Free a AVFormatContext allocated by av_open_input_stream. * @param s context to free + * @deprecated use av_close_input_file() */ +attribute_deprecated void av_close_input_stream(AVFormatContext *s); +#endif +#if FF_API_CLOSE_INPUT_FILE /** + * @deprecated use avformat_close_input() * Close a media file (but not its codecs). * * @param s media file handle */ +attribute_deprecated void av_close_input_file(AVFormatContext *s); +#endif /** - * Free an AVFormatContext and all its streams. - * @param s context to free + * Close an opened input AVFormatContext. Free it and all its contents + * and set *s to NULL. + */ +void avformat_close_input(AVFormatContext **s); +/** + * @} */ -void avformat_free_context(AVFormatContext *s); +#if FF_API_NEW_STREAM /** * Add a new stream to a media file. * @@ -1242,86 +1601,39 @@ * @param s media file handle * @param id file-format-dependent stream ID */ +attribute_deprecated AVStream *av_new_stream(AVFormatContext *s, int id); -AVProgram *av_new_program(AVFormatContext *s, int id); +#endif +#if FF_API_SET_PTS_INFO /** - * Set the pts for a given stream. If the new values would be invalid - * (<= 0), it leaves the AVStream unchanged. - * - * @param s stream - * @param pts_wrap_bits number of bits effectively used by the pts - * (used for wrap control, 33 is the value for MPEG) - * @param pts_num numerator to convert to seconds (MPEG: 1) - * @param pts_den denominator to convert to seconds (MPEG: 90000) + * @deprecated this function is not supposed to be called outside of lavf */ +attribute_deprecated void av_set_pts_info(AVStream *s, int pts_wrap_bits, unsigned int pts_num, unsigned int pts_den); +#endif #define AVSEEK_FLAG_BACKWARD 1 ///< seek backward #define AVSEEK_FLAG_BYTE 2 ///< seeking based on position in bytes #define AVSEEK_FLAG_ANY 4 ///< seek to any frame, even non-keyframes #define AVSEEK_FLAG_FRAME 8 ///< seeking based on frame number -int av_find_default_stream_index(AVFormatContext *s); - -/** - * Get the index for a specific timestamp. - * @param flags if AVSEEK_FLAG_BACKWARD then the returned index will correspond - * to the timestamp which is <= the requested one, if backward - * is 0, then it will be >= - * if AVSEEK_FLAG_ANY seek to any frame, only keyframes otherwise - * @return < 0 if no such timestamp could be found - */ -int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags); - -/** - * Add an index entry into a sorted list. Update the entry if the list - * already contains it. - * - * @param timestamp timestamp in the time base of the given stream - */ -int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, - int size, int distance, int flags); - -/** - * Perform a binary search using av_index_search_timestamp() and - * AVInputFormat.read_timestamp(). - * This is not supposed to be called directly by a user application, - * but by demuxers. - * @param target_ts target timestamp in the time base of the given stream - * @param stream_index stream number - */ +#if FF_API_SEEK_PUBLIC +attribute_deprecated int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags); - -/** - * Update cur_dts of all streams based on the given timestamp and AVStream. - * - * Stream ref_st unchanged, others set cur_dts in their native time base. - * Only needed for timestamp wrapping or if (dts not set and pts!=dts). - * @param timestamp new dts expressed in time_base of param ref_st - * @param ref_st reference stream giving time_base of param timestamp - */ +attribute_deprecated void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp); - -/** - * Perform a binary search using read_timestamp(). - * This is not supposed to be called directly by a user application, - * but by demuxers. - * @param target_ts target timestamp in the time base of the given stream - * @param stream_index stream number - */ +attribute_deprecated int64_t av_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, int64_t pos_min, int64_t pos_max, int64_t pos_limit, int64_t ts_min, int64_t ts_max, int flags, int64_t *ts_ret, int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )); +#endif -/** - * media file output - */ #if FF_API_FORMAT_PARAMETERS /** * @deprecated pass the options to avformat_write_header directly. @@ -1330,31 +1642,9 @@ #endif /** - * Split a URL string into components. - * - * The pointers to buffers for storing individual components may be null, - * in order to ignore that component. Buffers for components not found are - * set to empty strings. If the port is not found, it is set to a negative - * value. - * - * @param proto the buffer for the protocol - * @param proto_size the size of the proto buffer - * @param authorization the buffer for the authorization - * @param authorization_size the size of the authorization buffer - * @param hostname the buffer for the host name - * @param hostname_size the size of the hostname buffer - * @param port_ptr a pointer to store the port number in - * @param path the buffer for the path - * @param path_size the size of the path buffer - * @param url the URL to split + * @addtogroup lavf_encoding + * @{ */ -void av_url_split(char *proto, int proto_size, - char *authorization, int authorization_size, - char *hostname, int hostname_size, - int *port_ptr, - char *path, int path_size, - const char *url); - /** * Allocate the stream private data and write the stream header to * an output media file. @@ -1447,6 +1737,159 @@ */ int av_write_trailer(AVFormatContext *s); +/** + * Return the output format in the list of registered output formats + * which best matches the provided parameters, or return NULL if + * there is no match. + * + * @param short_name if non-NULL checks if short_name matches with the + * names of the registered formats + * @param filename if non-NULL checks if filename terminates with the + * extensions of the registered formats + * @param mime_type if non-NULL checks if mime_type matches with the + * MIME type of the registered formats + */ +AVOutputFormat *av_guess_format(const char *short_name, + const char *filename, + const char *mime_type); + +/** + * Guess the codec ID based upon muxer and filename. + */ +enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, + const char *filename, const char *mime_type, + enum AVMediaType type); + +/** + * @} + */ + + +/** + * @defgroup lavf_misc Utility functions + * @ingroup libavf + * @{ + * + * Miscelaneous utility functions related to both muxing and demuxing + * (or neither). + */ + +/** + * Send a nice hexadecimal dump of a buffer to the specified file stream. + * + * @param f The file stream pointer where the dump should be sent to. + * @param buf buffer + * @param size buffer size + * + * @see av_hex_dump_log, av_pkt_dump2, av_pkt_dump_log2 + */ +void av_hex_dump(FILE *f, uint8_t *buf, int size); + +/** + * Send a nice hexadecimal dump of a buffer to the log. + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct. + * @param level The importance level of the message, lower values signifying + * higher importance. + * @param buf buffer + * @param size buffer size + * + * @see av_hex_dump, av_pkt_dump2, av_pkt_dump_log2 + */ +void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size); + +/** + * Send a nice dump of a packet to the specified file stream. + * + * @param f The file stream pointer where the dump should be sent to. + * @param pkt packet to dump + * @param dump_payload True if the payload must be displayed, too. + * @param st AVStream that the packet belongs to + */ +void av_pkt_dump2(FILE *f, AVPacket *pkt, int dump_payload, AVStream *st); + + +/** + * Send a nice dump of a packet to the log. + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct. + * @param level The importance level of the message, lower values signifying + * higher importance. + * @param pkt packet to dump + * @param dump_payload True if the payload must be displayed, too. + * @param st AVStream that the packet belongs to + */ +void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload, + AVStream *st); + +/** + * Get the CodecID for the given codec tag tag. + * If no codec id is found returns CODEC_ID_NONE. + * + * @param tags list of supported codec_id-codec_tag pairs, as stored + * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag + */ +enum CodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag); + +/** + * Get the codec tag for the given codec id id. + * If no codec tag is found returns 0. + * + * @param tags list of supported codec_id-codec_tag pairs, as stored + * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag + */ +unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum CodecID id); + +int av_find_default_stream_index(AVFormatContext *s); + +/** + * Get the index for a specific timestamp. + * @param flags if AVSEEK_FLAG_BACKWARD then the returned index will correspond + * to the timestamp which is <= the requested one, if backward + * is 0, then it will be >= + * if AVSEEK_FLAG_ANY seek to any frame, only keyframes otherwise + * @return < 0 if no such timestamp could be found + */ +int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags); + +/** + * Add an index entry into a sorted list. Update the entry if the list + * already contains it. + * + * @param timestamp timestamp in the time base of the given stream + */ +int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, + int size, int distance, int flags); + + +/** + * Split a URL string into components. + * + * The pointers to buffers for storing individual components may be null, + * in order to ignore that component. Buffers for components not found are + * set to empty strings. If the port is not found, it is set to a negative + * value. + * + * @param proto the buffer for the protocol + * @param proto_size the size of the proto buffer + * @param authorization the buffer for the authorization + * @param authorization_size the size of the authorization buffer + * @param hostname the buffer for the host name + * @param hostname_size the size of the hostname buffer + * @param port_ptr a pointer to store the port number in + * @param path the buffer for the path + * @param path_size the size of the path buffer + * @param url the URL to split + */ +void av_url_split(char *proto, int proto_size, + char *authorization, int authorization_size, + char *hostname, int hostname_size, + int *port_ptr, + char *path, int path_size, + const char *url); + #if FF_API_DUMP_FORMAT attribute_deprecated void dump_format(AVFormatContext *ic, int index, @@ -1534,4 +1977,18 @@ */ int av_match_ext(const char *filename, const char *extensions); +/** + * Test if the given container can store a codec. + * + * @param std_compliance standards compliance level, one of FF_COMPLIANCE_* + * + * @return 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot. + * A negative number if this information is not available. + */ +int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance); + +/** + * @} + */ + #endif /* AVFORMAT_AVFORMAT_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avi.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avi.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avi.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avi.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* - * AVI common data - * Copyright (c) 2010 Anton Khirnov - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "avi.h" - -const AVMetadataConv ff_avi_metadata_conv[] = { - { "IART", "artist" }, - { "ICMT", "comment" }, - { "ICOP", "copyright" }, - { "ICRD", "date" }, - { "IGNR", "genre" }, - { "ILNG", "language" }, - { "INAM", "title" }, - { "IPRD", "album" }, - { "IPRT", "track" }, - { "ISFT", "encoder" }, - { "ITCH", "encoded_by"}, - { "strn", "title" }, - { 0 }, -}; - -const char ff_avi_tags[][5] = { - "IARL", "IART", "ICMS", "ICMT", "ICOP", "ICRD", "ICRP", "IDIM", "IDPI", - "IENG", "IGNR", "IKEY", "ILGT", "ILNG", "IMED", "INAM", "IPLT", "IPRD", - "IPRT", "ISBJ", "ISFT", "ISHP", "ISRC", "ISRF", "ITCH", - {0} -}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avidec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avidec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avidec.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avidec.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,11 +19,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include "libavutil/intreadwrite.h" +#include "libavutil/mathematics.h" #include "libavutil/bswap.h" #include "libavutil/dict.h" +#include "libavutil/avstring.h" #include "avformat.h" +#include "internal.h" #include "avi.h" #include "dv.h" #include "riff.h" @@ -78,6 +80,11 @@ { 0 } }; +static const AVMetadataConv avi_metadata_conv[] = { + { "strn", "title" }, + { 0 }, +}; + static int avi_load_index(AVFormatContext *s); static int guess_ni_flag(AVFormatContext *s); @@ -260,15 +267,6 @@ AV_DICT_DONT_STRDUP_VAL); } -static void avi_read_info(AVFormatContext *s, uint64_t end) -{ - while (avio_tell(s->pb) < end) { - uint32_t tag = avio_rl32(s->pb); - uint32_t size = avio_rl32(s->pb); - avi_read_tag(s, NULL, tag, size); - } -} - static const char months[12][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; @@ -280,7 +278,7 @@ if (sscanf(date, "%*3s%*[ ]%3s%*[ ]%2d%*[ ]%8s%*[ ]%4d", month, &day, time, &year) == 4) { for (i=0; i<12; i++) - if (!strcasecmp(month, months[i])) { + if (!av_strcasecmp(month, months[i])) { snprintf(buffer, sizeof(buffer), "%.4d-%.2d-%.2d %s", year, i+1, day, time); av_dict_set(metadata, "creation_time", buffer, 0); @@ -379,7 +377,7 @@ goto end_of_header; } else if (tag1 == MKTAG('I', 'N', 'F', 'O')) - avi_read_info(s, list_end); + ff_read_riff_info(s, size - 4); else if (tag1 == MKTAG('n', 'c', 'd', 't')) avi_read_nikon(s, list_end); @@ -425,10 +423,11 @@ break; }else{ stream_index++; - st = av_new_stream(s, stream_index); + st = avformat_new_stream(s, NULL); if (!st) goto fail; + st->id = stream_index; ast = av_mallocz(sizeof(AVIStream)); if (!ast) goto fail; @@ -460,7 +459,7 @@ av_freep(&s->streams[0]); s->nb_streams = 0; if (CONFIG_DV_DEMUXER) { - avi->dv_demux = dv_init_demux(s); + avi->dv_demux = avpriv_dv_init_demux(s); if (!avi->dv_demux) goto fail; } @@ -504,7 +503,7 @@ ast->scale = 1; } } - av_set_pts_info(st, 64, ast->scale, ast->rate); + avpriv_set_pts_info(st, 64, ast->scale, ast->rate); ast->cum_len=avio_rl32(pb); /* start */ st->nb_frames = avio_rl32(pb); @@ -666,8 +665,9 @@ break; case MKTAG('i', 'n', 'd', 'x'): i= avio_tell(pb); - if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX)){ - read_braindead_odml_indx(s, 0); + if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) && + read_braindead_odml_indx(s, 0) < 0 && s->error_recognition >= FF_ER_EXPLODE){ + goto fail; } avio_seek(pb, i+size, SEEK_SET); break; @@ -705,6 +705,7 @@ if(size > 1000000){ av_log(s, AV_LOG_ERROR, "Something went wrong during header parsing, " "I will ignore it and try to continue anyway.\n"); + if (s->error_recognition >= FF_ER_EXPLODE) goto fail; avi->movi_list = avio_tell(pb) - 4; avi->movi_end = avio_size(pb); goto end_of_header; @@ -741,7 +742,8 @@ clean_index(s); } - ff_metadata_conv_ctx(s, NULL, ff_avi_metadata_conv); + ff_metadata_conv_ctx(s, NULL, avi_metadata_conv); + ff_metadata_conv_ctx(s, NULL, ff_riff_info_conv); return 0; } @@ -783,7 +785,7 @@ *st->codec = *ast->sub_ctx->streams[0]->codec; ast->sub_ctx->streams[0]->codec->extradata = NULL; time_base = ast->sub_ctx->streams[0]->time_base; - av_set_pts_info(st, 64, time_base.num, time_base.den); + avpriv_set_pts_info(st, 64, time_base.num, time_base.den); } ast->sub_buffer = pkt->data; memset(pkt, 0, sizeof(*pkt)); @@ -836,17 +838,146 @@ } } -static int avi_read_packet(AVFormatContext *s, AVPacket *pkt) +static int avi_sync(AVFormatContext *s, int exit_early) { AVIContext *avi = s->priv_data; AVIOContext *pb = s->pb; - int n, d[8]; + int n; + unsigned int d[8]; unsigned int size; int64_t i, sync; + +start_sync: + memset(d, -1, sizeof(d)); + for(i=sync=avio_tell(pb); !pb->eof_reached; i++) { + int j; + + for(j=0; j<7; j++) + d[j]= d[j+1]; + d[7]= avio_r8(pb); + + size= d[4] + (d[5]<<8) + (d[6]<<16) + (d[7]<<24); + + n= get_stream_idx(d+2); +//av_log(s, AV_LOG_DEBUG, "%X %X %X %X %X %X %X %X %"PRId64" %d %d\n", d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n); + if(i + (uint64_t)size > avi->fsize || d[0] > 127) + continue; + + //parse ix## + if( (d[0] == 'i' && d[1] == 'x' && n < s->nb_streams) + //parse JUNK + ||(d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K') + ||(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')){ + avio_skip(pb, size); +//av_log(s, AV_LOG_DEBUG, "SKIP\n"); + goto start_sync; + } + + //parse stray LIST + if(d[0] == 'L' && d[1] == 'I' && d[2] == 'S' && d[3] == 'T'){ + avio_skip(pb, 4); + goto start_sync; + } + + n= get_stream_idx(d); + + if(!((i-avi->last_pkt_pos)&1) && get_stream_idx(d+1) < s->nb_streams) + continue; + + //detect ##ix chunk and skip + if(d[2] == 'i' && d[3] == 'x' && n < s->nb_streams){ + avio_skip(pb, size); + goto start_sync; + } + + //parse ##dc/##wb + if(n < s->nb_streams){ + AVStream *st; + AVIStream *ast; + st = s->streams[n]; + ast = st->priv_data; + + if(s->nb_streams>=2){ + AVStream *st1 = s->streams[1]; + AVIStream *ast1= st1->priv_data; + //workaround for broken small-file-bug402.avi + if( d[2] == 'w' && d[3] == 'b' + && n==0 + && st ->codec->codec_type == AVMEDIA_TYPE_VIDEO + && st1->codec->codec_type == AVMEDIA_TYPE_AUDIO + && ast->prefix == 'd'*256+'c' + && (d[2]*256+d[3] == ast1->prefix || !ast1->prefix_count) + ){ + n=1; + st = st1; + ast = ast1; + av_log(s, AV_LOG_WARNING, "Invalid stream + prefix combination, assuming audio.\n"); + } + } + + + if( (st->discard >= AVDISCARD_DEFAULT && size==0) + /*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & AV_PKT_FLAG_KEY))*/ //FIXME needs a little reordering + || st->discard >= AVDISCARD_ALL){ + if (!exit_early) { + ast->frame_offset += get_duration(ast, size); + } + avio_skip(pb, size); + goto start_sync; + } + + if (d[2] == 'p' && d[3] == 'c' && size<=4*256+4) { + int k = avio_r8(pb); + int last = (k + avio_r8(pb) - 1) & 0xFF; + + avio_rl16(pb); //flags + + for (; k <= last; k++) + ast->pal[k] = avio_rb32(pb)>>8;// b + (g << 8) + (r << 16); + ast->has_pal= 1; + goto start_sync; + } else if( ((ast->prefix_count<5 || sync+9 > i) && d[2]<128 && d[3]<128) || + d[2]*256+d[3] == ast->prefix /*|| + (d[2] == 'd' && d[3] == 'c') || + (d[2] == 'w' && d[3] == 'b')*/) { + + if (exit_early) + return 0; +//av_log(s, AV_LOG_DEBUG, "OK\n"); + if(d[2]*256+d[3] == ast->prefix) + ast->prefix_count++; + else{ + ast->prefix= d[2]*256+d[3]; + ast->prefix_count= 0; + } + + avi->stream_index= n; + ast->packet_size= size + 8; + ast->remaining= size; + + if(size || !ast->sample_size){ + uint64_t pos= avio_tell(pb) - 8; + if(!st->index_entries || !st->nb_index_entries || st->index_entries[st->nb_index_entries - 1].pos < pos){ + av_add_index_entry(st, pos, ast->frame_offset, size, 0, AVINDEX_KEYFRAME); + } + } + return 0; + } + } + } + + return AVERROR_EOF; +} + +static int avi_read_packet(AVFormatContext *s, AVPacket *pkt) +{ + AVIContext *avi = s->priv_data; + AVIOContext *pb = s->pb; + int err; void* dstr; if (CONFIG_DV_DEMUXER && avi->dv_demux) { - int size = dv_get_packet(avi->dv_demux, pkt); + int size = avpriv_dv_get_packet(avi->dv_demux, pkt); if (size >= 0) return size; } @@ -946,7 +1077,7 @@ if (CONFIG_DV_DEMUXER && avi->dv_demux) { dstr = pkt->destruct; - size = dv_produce_packet(avi->dv_demux, pkt, + size = avpriv_dv_produce_packet(avi->dv_demux, pkt, pkt->data, pkt->size); pkt->destruct = dstr; pkt->flags |= AV_PKT_FLAG_KEY; @@ -993,121 +1124,9 @@ return size; } - memset(d, -1, sizeof(int)*8); - for(i=sync=avio_tell(pb); !pb->eof_reached; i++) { - int j; - - for(j=0; j<7; j++) - d[j]= d[j+1]; - d[7]= avio_r8(pb); - - size= d[4] + (d[5]<<8) + (d[6]<<16) + (d[7]<<24); - - n= get_stream_idx(d+2); -//av_log(s, AV_LOG_DEBUG, "%X %X %X %X %X %X %X %X %"PRId64" %d %d\n", d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n); - if(i + (uint64_t)size > avi->fsize || d[0]<0) - continue; - - //parse ix## - if( (d[0] == 'i' && d[1] == 'x' && n < s->nb_streams) - //parse JUNK - ||(d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K') - ||(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')){ - avio_skip(pb, size); -//av_log(s, AV_LOG_DEBUG, "SKIP\n"); - goto resync; - } - - //parse stray LIST - if(d[0] == 'L' && d[1] == 'I' && d[2] == 'S' && d[3] == 'T'){ - avio_skip(pb, 4); - goto resync; - } - - n= get_stream_idx(d); - - if(!((i-avi->last_pkt_pos)&1) && get_stream_idx(d+1) < s->nb_streams) - continue; - - //detect ##ix chunk and skip - if(d[2] == 'i' && d[3] == 'x' && n < s->nb_streams){ - avio_skip(pb, size); - goto resync; - } - - //parse ##dc/##wb - if(n < s->nb_streams){ - AVStream *st; - AVIStream *ast; - st = s->streams[n]; - ast = st->priv_data; - - if(s->nb_streams>=2){ - AVStream *st1 = s->streams[1]; - AVIStream *ast1= st1->priv_data; - //workaround for broken small-file-bug402.avi - if( d[2] == 'w' && d[3] == 'b' - && n==0 - && st ->codec->codec_type == AVMEDIA_TYPE_VIDEO - && st1->codec->codec_type == AVMEDIA_TYPE_AUDIO - && ast->prefix == 'd'*256+'c' - && (d[2]*256+d[3] == ast1->prefix || !ast1->prefix_count) - ){ - n=1; - st = st1; - ast = ast1; - av_log(s, AV_LOG_WARNING, "Invalid stream + prefix combination, assuming audio.\n"); - } - } - - - if( (st->discard >= AVDISCARD_DEFAULT && size==0) - /*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & AV_PKT_FLAG_KEY))*/ //FIXME needs a little reordering - || st->discard >= AVDISCARD_ALL){ - ast->frame_offset += get_duration(ast, size); - avio_skip(pb, size); - goto resync; - } - - if (d[2] == 'p' && d[3] == 'c' && size<=4*256+4) { - int k = avio_r8(pb); - int last = (k + avio_r8(pb) - 1) & 0xFF; - - avio_rl16(pb); //flags - - for (; k <= last; k++) - ast->pal[k] = avio_rb32(pb)>>8;// b + (g << 8) + (r << 16); - ast->has_pal= 1; - goto resync; - } else if( ((ast->prefix_count<5 || sync+9 > i) && d[2]<128 && d[3]<128) || - d[2]*256+d[3] == ast->prefix /*|| - (d[2] == 'd' && d[3] == 'c') || - (d[2] == 'w' && d[3] == 'b')*/) { - -//av_log(s, AV_LOG_DEBUG, "OK\n"); - if(d[2]*256+d[3] == ast->prefix) - ast->prefix_count++; - else{ - ast->prefix= d[2]*256+d[3]; - ast->prefix_count= 0; - } - - avi->stream_index= n; - ast->packet_size= size + 8; - ast->remaining= size; - - if(size || !ast->sample_size){ - uint64_t pos= avio_tell(pb) - 8; - if(!st->index_entries || !st->nb_index_entries || st->index_entries[st->nb_index_entries - 1].pos < pos){ - av_add_index_entry(st, pos, ast->frame_offset, size, 0, AVINDEX_KEYFRAME); - } - } - goto resync; - } - } - } - - return AVERROR_EOF; + if ((err = avi_sync(s, 0)) < 0) + return err; + goto resync; } /* XXX: We make the implicit supposition that the positions are sorted @@ -1119,13 +1138,22 @@ int nb_index_entries, i; AVStream *st; AVIStream *ast; - unsigned int index, tag, flags, pos, len; + unsigned int index, tag, flags, pos, len, first_packet = 1; unsigned last_pos= -1; + int64_t idx1_pos, first_packet_pos = 0, data_offset = 0; nb_index_entries = size / 16; if (nb_index_entries <= 0) return -1; + idx1_pos = avio_tell(pb); + avio_seek(pb, avi->movi_list+4, SEEK_SET); + if (avi_sync(s, 1) == 0) { + first_packet_pos = avio_tell(pb) - 8; + } + avi->stream_index = -1; + avio_seek(pb, idx1_pos, SEEK_SET); + /* Read the entries and sort them in each stream component. */ for(i = 0; i < nb_index_entries; i++) { tag = avio_rl32(pb); @@ -1134,9 +1162,6 @@ len = avio_rl32(pb); av_dlog(s, "%d: tag=0x%x flags=0x%x pos=0x%x len=%d/", i, tag, flags, pos, len); - if(i==0 && pos > avi->movi_list) - avi->movi_list= 0; //FIXME better check - pos += avi->movi_list; index = ((tag & 0xff) - '0') * 10; index += ((tag >> 8) & 0xff) - '0'; @@ -1145,6 +1170,12 @@ st = s->streams[index]; ast = st->priv_data; + if(first_packet && first_packet_pos && len) { + data_offset = first_packet_pos - pos; + first_packet = 0; + } + pos += data_offset; + av_dlog(s, "%d cum_len=%"PRId64"\n", len, ast->cum_len); if(pb->eof_reached) @@ -1213,20 +1244,16 @@ (tag >> 16) & 0xff, (tag >> 24) & 0xff, size); - switch(tag) { - case MKTAG('i', 'd', 'x', '1'): - if (avi_read_idx1(s, size) < 0) - goto skip; + + if (tag == MKTAG('i', 'd', 'x', '1') && + avi_read_idx1(s, size) >= 0) { ret = 0; - goto the_end; - break; - default: - skip: - size += (size & 1); - if (avio_skip(pb, size) < 0) - goto the_end; // something is wrong here break; } + + size += (size & 1); + if (avio_skip(pb, size) < 0) + break; // something is wrong here } the_end: avio_seek(pb, pos, SEEK_SET); @@ -1338,7 +1365,7 @@ if (ast) { if (ast->sub_ctx) { av_freep(&ast->sub_ctx->pb); - av_close_input_file(ast->sub_ctx); + avformat_close_input(&ast->sub_ctx); } av_free(ast->sub_buffer); av_free_packet(&ast->sub_pkt); @@ -1364,12 +1391,12 @@ } AVInputFormat ff_avi_demuxer = { - "avi", - NULL_IF_CONFIG_SMALL("AVI format"), - sizeof(AVIContext), - avi_probe, - avi_read_header, - avi_read_packet, - avi_read_close, - avi_read_seek, + .name = "avi", + .long_name = NULL_IF_CONFIG_SMALL("AVI format"), + .priv_data_size = sizeof(AVIContext), + .read_probe = avi_probe, + .read_header = avi_read_header, + .read_packet = avi_read_packet, + .read_close = avi_read_close, + .read_seek = avi_read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avienc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avienc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avienc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avienc.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" +#include "internal.h" #include "avi.h" #include "avio_internal.h" #include "riff.h" @@ -256,7 +257,7 @@ avio_wl32(pb, au_scale); /* scale */ avio_wl32(pb, au_byterate); /* rate */ - av_set_pts_info(s->streams[i], 64, au_scale, au_byterate); + avpriv_set_pts_info(s->streams[i], 64, au_scale, au_byterate); avio_wl32(pb, 0); /* start */ avist->frames_hdr_strm = avio_tell(pb); /* remember this offset to fill later */ @@ -378,9 +379,9 @@ list2 = ff_start_tag(pb, "LIST"); ffio_wfourcc(pb, "INFO"); - ff_metadata_conv(&s->metadata, ff_avi_metadata_conv, NULL); - for (i = 0; *ff_avi_tags[i]; i++) { - if ((t = av_dict_get(s->metadata, ff_avi_tags[i], NULL, AV_DICT_MATCH_CASE))) + ff_metadata_conv(&s->metadata, ff_riff_info_conv, NULL); + for (i = 0; *ff_riff_tags[i]; i++) { + if ((t = av_dict_get(s->metadata, ff_riff_tags[i], NULL, AV_DICT_MATCH_CASE))) avi_write_info_tag(s->pb, t->key, t->value); } ff_end_tag(pb, list2); @@ -639,16 +640,20 @@ } AVOutputFormat ff_avi_muxer = { - "avi", - NULL_IF_CONFIG_SMALL("AVI format"), - "video/x-msvideo", - "avi", - sizeof(AVIContext), - CODEC_ID_MP2, - CODEC_ID_MPEG4, - avi_write_header, - avi_write_packet, - avi_write_trailer, + .name = "avi", + .long_name = NULL_IF_CONFIG_SMALL("AVI format"), + .mime_type = "video/x-msvideo", + .extensions = "avi", + .priv_data_size = sizeof(AVIContext), +#if CONFIG_LIBMP3LAME_ENCODER + .audio_codec = CODEC_ID_MP3, +#else + .audio_codec = CODEC_ID_AC3, +#endif + .video_codec = CODEC_ID_MPEG4, + .write_header = avi_write_header, + .write_packet = avi_write_packet, + .write_trailer = avi_write_trailer, .codec_tag= (const AVCodecTag* const []){ff_codec_bmp_tags, ff_codec_wav_tags, 0}, .flags= AVFMT_VARIABLE_FPS, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avi.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avi.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avi.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avi.h 2012-01-11 00:34:30.000000000 +0000 @@ -21,8 +21,6 @@ #ifndef AVFORMAT_AVI_H #define AVFORMAT_AVI_H -#include "metadata.h" - #define AVIF_HASINDEX 0x00000010 // Index at end of file? #define AVIF_MUSTUSEINDEX 0x00000020 #define AVIF_ISINTERLEAVED 0x00000100 @@ -37,11 +35,4 @@ /* index flags */ #define AVIIF_INDEX 0x10 -extern const AVMetadataConv ff_avi_metadata_conv[]; - -/** - * A list of AVI info tags. - */ -extern const char ff_avi_tags[][5]; - #endif /* AVFORMAT_AVI_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aviobuf.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aviobuf.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/aviobuf.c 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/aviobuf.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Buffered I/O for ffmpeg system + * buffered I/O * Copyright (c) 2000,2001 Fabrice Bellard * * This file is part of Libav. @@ -20,7 +20,10 @@ */ #include "libavutil/crc.h" +#include "libavutil/dict.h" #include "libavutil/intreadwrite.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" #include "avformat.h" #include "avio.h" #include "avio_internal.h" @@ -37,6 +40,31 @@ */ #define SHORT_SEEK_THRESHOLD 4096 +#if !FF_API_OLD_AVIO +static void *ffio_url_child_next(void *obj, void *prev) +{ + AVIOContext *s = obj; + return prev ? NULL : s->opaque; +} + +static const AVClass *ffio_url_child_class_next(const AVClass *prev) +{ + return prev ? NULL : &ffurl_context_class; +} + +static const AVOption ffio_url_options[] = { + { NULL }, +}; + +const AVClass ffio_url_class = { + .class_name = "AVIOContext", + .item_name = av_default_item_name, + .version = LIBAVUTIL_VERSION_INT, + .option = ffio_url_options, + .child_next = ffio_url_child_next, + .child_class_next = ffio_url_child_class_next, +}; +#endif static void fill_buffer(AVIOContext *s); static int url_resetbuf(AVIOContext *s, int flags); @@ -140,7 +168,7 @@ void avio_w8(AVIOContext *s, int b) { - *(s->buf_ptr)++ = b; + *s->buf_ptr++ = b; if (s->buf_ptr >= s->buf_end) flush_buffer(s); } @@ -537,6 +565,10 @@ int len= s->buffer_size - (dst - s->buffer); int max_buffer_size = s->max_packet_size ? s->max_packet_size : IO_BUFFER_SIZE; + /* can't fill the buffer without read_packet, just set EOF if appropiate */ + if (!s->read_packet && s->buf_ptr >= s->buf_end) + s->eof_reached = 1; + /* no need to do anything if EOF already reached */ if (s->eof_reached) return; @@ -769,13 +801,14 @@ { int i; + if (buflen <= 0) + return AVERROR(EINVAL); // reserve 1 byte for terminating 0 buflen = FFMIN(buflen - 1, maxlen); for (i = 0; i < buflen; i++) if (!(buf[i] = avio_r8(s))) return i + 1; - if (buflen) - buf[i] = 0; + buf[i] = 0; for (; i < maxlen; i++) if (!avio_r8(s)) return i + 1; @@ -787,6 +820,8 @@ {\ char* q = buf;\ int ret = 0;\ + if (buflen <= 0) \ + return AVERROR(EINVAL); \ while (ret + 1 < maxlen) {\ uint8_t tmp;\ uint32_t ch;\ @@ -838,19 +873,12 @@ if (!buffer) return AVERROR(ENOMEM); - *s = av_mallocz(sizeof(AVIOContext)); - if(!*s) { + *s = avio_alloc_context(buffer, buffer_size, h->flags & AVIO_FLAG_WRITE, h, + ffurl_read, ffurl_write, ffurl_seek); + if (!*s) { av_free(buffer); return AVERROR(ENOMEM); } - - if (ffio_init_context(*s, buffer, buffer_size, - h->flags & AVIO_FLAG_WRITE, h, - ffurl_read, ffurl_write, ffurl_seek) < 0) { - av_free(buffer); - av_freep(s); - return AVERROR(EIO); - } #if FF_API_OLD_AVIO (*s)->is_streamed = h->is_streamed; #endif @@ -860,6 +888,9 @@ (*s)->read_pause = (int (*)(void *, int))h->prot->url_read_pause; (*s)->read_seek = (int64_t (*)(void *, int, int64_t, int))h->prot->url_read_seek; } +#if !FF_API_OLD_AVIO + (*s)->av_class = &ffio_url_class; +#endif return 0; } @@ -933,10 +964,16 @@ int avio_open(AVIOContext **s, const char *filename, int flags) { + return avio_open2(s, filename, flags, NULL, NULL); +} + +int avio_open2(AVIOContext **s, const char *filename, int flags, + const AVIOInterruptCB *int_cb, AVDictionary **options) +{ URLContext *h; int err; - err = ffurl_open(&h, filename, flags); + err = ffurl_open(&h, filename, flags, int_cb, options); if (err < 0) return err; err = ffio_fdopen(s, h); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avio.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avio.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avio.c 2011-05-19 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avio.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Unbuffered io for ffmpeg system + * unbuffered I/O * Copyright (c) 2001 Fabrice Bellard * * This file is part of Libav. @@ -22,6 +22,7 @@ #include #include "libavutil/avstring.h" +#include "libavutil/dict.h" #include "libavutil/opt.h" #include "os_support.h" #include "avformat.h" @@ -30,6 +31,13 @@ #endif #include "url.h" +static URLProtocol *first_protocol = NULL; + +URLProtocol *ffurl_protocol_next(URLProtocol *prev) +{ + return prev ? prev->next : first_protocol; +} + /** @name Logging context. */ /*@{*/ static const char *urlcontext_to_name(void *ptr) @@ -38,32 +46,60 @@ if(h->prot) return h->prot->name; else return "NULL"; } + +static void *urlcontext_child_next(void *obj, void *prev) +{ + URLContext *h = obj; + if (!prev && h->priv_data && h->prot->priv_data_class) + return h->priv_data; + return NULL; +} + +static const AVClass *urlcontext_child_class_next(const AVClass *prev) +{ + URLProtocol *p = NULL; + + /* find the protocol that corresponds to prev */ + while (prev && (p = ffurl_protocol_next(p))) + if (p->priv_data_class == prev) + break; + + /* find next protocol with priv options */ + while (p = ffurl_protocol_next(p)) + if (p->priv_data_class) + return p->priv_data_class; + return NULL; + +} + static const AVOption options[] = {{NULL}}; -static const AVClass urlcontext_class = { +const AVClass ffurl_context_class = { .class_name = "URLContext", .item_name = urlcontext_to_name, .option = options, .version = LIBAVUTIL_VERSION_INT, + .child_next = urlcontext_child_next, + .child_class_next = urlcontext_child_class_next, }; /*@}*/ -static int default_interrupt_cb(void); -URLProtocol *first_protocol = NULL; +#if FF_API_OLD_INTERRUPT_CB +static int default_interrupt_cb(void); int (*url_interrupt_cb)(void) = default_interrupt_cb; +#endif #if FF_API_OLD_AVIO URLProtocol *av_protocol_next(URLProtocol *p) { - if(p) return p->next; - else return first_protocol; + return ffurl_protocol_next(p); } #endif const char *avio_enum_protocols(void **opaque, int output) { URLProtocol **p = opaque; - *p = *p ? (*p)->next : first_protocol; + *p = ffurl_protocol_next(*p); if (!*p) return NULL; if ((output && (*p)->url_write) || (!output && (*p)->url_read)) return (*p)->name; @@ -86,13 +122,14 @@ } static int url_alloc_for_protocol (URLContext **puc, struct URLProtocol *up, - const char *filename, int flags) + const char *filename, int flags, + const AVIOInterruptCB *int_cb) { URLContext *uc; int err; #if CONFIG_NETWORK - if (!ff_network_init()) + if (up->flags & URL_PROTOCOL_FLAG_NETWORK && !ff_network_init()) return AVERROR(EIO); #endif uc = av_mallocz(sizeof(URLContext) + strlen(filename) + 1); @@ -100,7 +137,7 @@ err = AVERROR(ENOMEM); goto fail; } - uc->av_class = &urlcontext_class; + uc->av_class = &ffurl_context_class; uc->filename = (char *) &uc[1]; strcpy(uc->filename, filename); uc->prot = up; @@ -114,20 +151,27 @@ av_opt_set_defaults(uc->priv_data); } } + if (int_cb) + uc->interrupt_callback = *int_cb; *puc = uc; return 0; fail: *puc = NULL; #if CONFIG_NETWORK - ff_network_close(); + if (up->flags & URL_PROTOCOL_FLAG_NETWORK) + ff_network_close(); #endif return err; } -int ffurl_connect(URLContext* uc) +int ffurl_connect(URLContext* uc, AVDictionary **options) { - int err = uc->prot->url_open(uc, uc->filename, uc->flags); + int err = +#if !FF_API_OLD_AVIO + uc->prot->url_open2 ? uc->prot->url_open2(uc, uc->filename, uc->flags, options) : +#endif + uc->prot->url_open(uc, uc->filename, uc->flags); if (err) return err; uc->is_connected = 1; @@ -145,10 +189,10 @@ { int ret; - ret = url_alloc_for_protocol(puc, up, filename, flags); + ret = url_alloc_for_protocol(puc, up, filename, flags, NULL); if (ret) goto fail; - ret = ffurl_connect(*puc); + ret = ffurl_connect(*puc, NULL); if (!ret) return 0; fail: @@ -158,15 +202,15 @@ } int url_alloc(URLContext **puc, const char *filename, int flags) { - return ffurl_alloc(puc, filename, flags); + return ffurl_alloc(puc, filename, flags, NULL); } int url_connect(URLContext* uc) { - return ffurl_connect(uc); + return ffurl_connect(uc, NULL); } int url_open(URLContext **puc, const char *filename, int flags) { - return ffurl_open(puc, filename, flags); + return ffurl_open(puc, filename, flags, NULL, NULL); } int url_read(URLContext *h, unsigned char *buf, int size) { @@ -219,9 +263,10 @@ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ "0123456789+-." -int ffurl_alloc(URLContext **puc, const char *filename, int flags) +int ffurl_alloc(URLContext **puc, const char *filename, int flags, + const AVIOInterruptCB *int_cb) { - URLProtocol *up; + URLProtocol *up = NULL; char proto_str[128], proto_nested[128], *ptr; size_t proto_len = strspn(filename, URL_SCHEME_CHARS); @@ -234,27 +279,30 @@ if ((ptr = strchr(proto_nested, '+'))) *ptr = '\0'; - up = first_protocol; - while (up != NULL) { + while (up = ffurl_protocol_next(up)) { if (!strcmp(proto_str, up->name)) - return url_alloc_for_protocol (puc, up, filename, flags); + return url_alloc_for_protocol (puc, up, filename, flags, int_cb); if (up->flags & URL_PROTOCOL_FLAG_NESTED_SCHEME && !strcmp(proto_nested, up->name)) - return url_alloc_for_protocol (puc, up, filename, flags); - up = up->next; + return url_alloc_for_protocol (puc, up, filename, flags, int_cb); } *puc = NULL; return AVERROR(ENOENT); } -int ffurl_open(URLContext **puc, const char *filename, int flags) +int ffurl_open(URLContext **puc, const char *filename, int flags, + const AVIOInterruptCB *int_cb, AVDictionary **options) { - int ret = ffurl_alloc(puc, filename, flags); + int ret = ffurl_alloc(puc, filename, flags, int_cb); if (ret) return ret; - ret = ffurl_connect(*puc); + if (options && (*puc)->prot->priv_data_class && + (ret = av_opt_set_dict((*puc)->priv_data, options)) < 0) + goto fail; + ret = ffurl_connect(*puc, options); if (!ret) return 0; +fail: ffurl_close(*puc); *puc = NULL; return ret; @@ -284,7 +332,7 @@ if (ret) fast_retries = FFMAX(fast_retries, 2); len += ret; - if (url_interrupt_cb()) + if (ff_check_interrupt(&h->interrupt_callback)) return AVERROR_EXIT; } return len; @@ -333,10 +381,14 @@ if (h->is_connected && h->prot->url_close) ret = h->prot->url_close(h); #if CONFIG_NETWORK - ff_network_close(); + if (h->prot->flags & URL_PROTOCOL_FLAG_NETWORK) + ff_network_close(); #endif - if (h->prot->priv_data_size) + if (h->prot->priv_data_size) { + if (h->prot->priv_data_class) + av_opt_free(h->priv_data); av_free(h->priv_data); + } av_free(h); return ret; } @@ -345,7 +397,7 @@ int url_exist(const char *filename) { URLContext *h; - if (ffurl_open(&h, filename, AVIO_FLAG_READ) < 0) + if (ffurl_open(&h, filename, AVIO_FLAG_READ, NULL, NULL) < 0) return 0; ffurl_close(h); return 1; @@ -355,14 +407,14 @@ int avio_check(const char *url, int flags) { URLContext *h; - int ret = ffurl_alloc(&h, url, flags); + int ret = ffurl_alloc(&h, url, flags, NULL); if (ret) return ret; if (h->prot->url_check) { ret = h->prot->url_check(h, flags); } else { - ret = ffurl_connect(h); + ret = ffurl_connect(h, NULL); if (ret >= 0) ret = flags; } @@ -393,6 +445,7 @@ return h->prot->url_get_file_handle(h); } +#if FF_API_OLD_INTERRUPT_CB static int default_interrupt_cb(void) { return 0; @@ -404,6 +457,19 @@ interrupt_cb = default_interrupt_cb; url_interrupt_cb = interrupt_cb; } +#endif + +int ff_check_interrupt(AVIOInterruptCB *cb) +{ + int ret; + if (cb && cb->callback && (ret = cb->callback(cb->opaque))) + return ret; +#if FF_API_OLD_INTERRUPT_CB + return url_interrupt_cb(); +#else + return 0; +#endif +} #if FF_API_OLD_AVIO int av_url_read_pause(URLContext *h, int pause) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avio.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avio.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avio.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avio.h 2012-01-11 00:34:30.000000000 +0000 @@ -22,12 +22,14 @@ /** * @file + * @ingroup lavf_io * Buffered I/O operations */ #include #include "libavutil/common.h" +#include "libavutil/dict.h" #include "libavutil/log.h" #include "libavformat/version.h" @@ -36,6 +38,22 @@ #define AVIO_SEEKABLE_NORMAL 0x0001 /**< Seeking works like for a local file */ /** + * Callback for checking whether to abort blocking functions. + * AVERROR_EXIT is returned in this case by the interrupted + * function. During blocking operations, callback is called with + * opaque as parameter. If the callback returns 1, the + * blocking operation will be aborted. + * + * No members can be added to this struct without a major bump, if + * new elements have been added after this struct in AVFormatContext + * or AVIOContext. + */ +typedef struct { + int (*callback)(void*); + void *opaque; +} AVIOInterruptCB; + +/** * Bytestream IO Context. * New fields can be added to the end with minor version bumps. * Removal, reordering and changes to existing fields require a major @@ -48,6 +66,21 @@ * function pointers specified in avio_alloc_context() */ typedef struct { +#if !FF_API_OLD_AVIO + /** + * A class for private options. + * + * If this AVIOContext is created by avio_open2(), av_class is set and + * passes the options down to protocols. + * + * If this AVIOContext is manually allocated, then av_class may be set by + * the caller. + * + * warning -- this field can be NULL, be sure to not pass this AVIOContext + * to any av_opt_* functions in that case. + */ + AVClass *av_class; +#endif unsigned char *buffer; /**< Start of the buffer. */ int buffer_size; /**< Maximum buffer size */ unsigned char *buf_ptr; /**< Current position in the buffer */ @@ -109,9 +142,11 @@ void *priv_data; char *filename; /**< specified URL */ int is_connected; + AVIOInterruptCB interrupt_callback; } URLContext; #define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */ +#define URL_PROTOCOL_FLAG_NETWORK 2 /*< The protocol uses network */ /** * @deprecated This struct is to be made private. Use the higher-level @@ -145,7 +180,7 @@ attribute_deprecated int url_poll(URLPollEntry *poll_table, int n, int timeout); /** - * @defgroup open_modes URL open modes + * @name URL open modes * The flags argument to url_open and cosins must be one of the following * constants, optionally ORed with other flags. * @{ @@ -176,8 +211,9 @@ /** * @defgroup old_url_funcs Old url_* functions - * @deprecated use the buffered API based on AVIOContext instead + * The following functions are deprecated. Use the buffered API based on #AVIOContext instead. * @{ + * @ingroup lavf_io */ attribute_deprecated int url_open_protocol (URLContext **puc, struct URLProtocol *up, const char *url, int flags); @@ -235,8 +271,9 @@ /** * @defgroup old_avio_funcs Old put_/get_*() functions - * @deprecated use the avio_ -prefixed functions instead. + * The following functions are deprecated. Use the "avio_"-prefixed functions instead. * @{ + * @ingroup lavf_io */ attribute_deprecated int get_buffer(AVIOContext *s, unsigned char *buf, int size); attribute_deprecated int get_partial_buffer(AVIOContext *s, unsigned char *buf, int size); @@ -272,8 +309,9 @@ /** * @defgroup old_url_f_funcs Old url_f* functions - * @deprecated use the avio_ -prefixed functions instead. + * The following functions are deprecated, use the "avio_"-prefixed functions instead. * @{ + * @ingroup lavf_io */ attribute_deprecated int url_fopen( AVIOContext **s, const char *url, int flags); attribute_deprecated int url_fclose(AVIOContext *s); @@ -284,11 +322,7 @@ #define URL_EOF (-1) attribute_deprecated int url_fgetc(AVIOContext *s); attribute_deprecated int url_setbufsize(AVIOContext *s, int buf_size); -#ifdef __GNUC__ -attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); -#else -attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...); -#endif +attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3); attribute_deprecated void put_flush_packet(AVIOContext *s); attribute_deprecated int url_open_dyn_buf(AVIOContext **s); attribute_deprecated int url_open_dyn_packet_buf(AVIOContext **s, int max_packet_size); @@ -360,13 +394,17 @@ */ int avio_check(const char *url, int flags); +#if FF_API_OLD_INTERRUPT_CB /** * The callback is called in blocking functions to test regulary if * asynchronous interruption is needed. AVERROR_EXIT is returned * in this case by the interrupted function. 'NULL' means no interrupt * callback is given. + * @deprecated Use interrupt_callback in AVFormatContext/avio_open2 + * instead. */ -void avio_set_interrupt_cb(int (*interrupt_cb)(void)); +attribute_deprecated void avio_set_interrupt_cb(int (*interrupt_cb)(void)); +#endif /** * Allocate and initialize an AVIOContext for buffered I/O. It must be later @@ -463,11 +501,7 @@ int64_t avio_size(AVIOContext *s); /** @warning currently size is limited */ -#ifdef __GNUC__ -int avio_printf(AVIOContext *s, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); -#else -int avio_printf(AVIOContext *s, const char *fmt, ...); -#endif +int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3); void avio_flush(AVIOContext *s); @@ -479,7 +513,7 @@ int avio_read(AVIOContext *s, unsigned char *buf, int size); /** - * @defgroup avio_read Functions for reading from AVIOContext. + * @name Functions for reading from AVIOContext * @{ * * @note return 0 if EOF, so you cannot use it if EOF handling is @@ -523,7 +557,7 @@ /** - * @defgroup open_modes URL open modes + * @name URL open modes * The flags argument to avio_open must be one of the following * constants, optionally ORed with other flags. * @{ @@ -565,6 +599,26 @@ int avio_open(AVIOContext **s, const char *url, int flags); /** + * Create and initialize a AVIOContext for accessing the + * resource indicated by url. + * @note When the resource indicated by url has been opened in + * read+write mode, the AVIOContext can be used only for writing. + * + * @param s Used to return the pointer to the created AVIOContext. + * In case of failure the pointed to value is set to NULL. + * @param flags flags which control how the resource indicated by url + * is to be opened + * @param int_cb an interrupt callback to be used at the protocols level + * @param options A dictionary filled with protocol-private options. On return + * this parameter will be destroyed and replaced with a dict containing options + * that were not found. May be NULL. + * @return 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + */ +int avio_open2(AVIOContext **s, const char *url, int flags, + const AVIOInterruptCB *int_cb, AVDictionary **options); + +/** * Close the resource accessed by the AVIOContext s and free it. * This function can only be used if s was opened by avio_open(). * diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avio_internal.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avio_internal.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avio_internal.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avio_internal.h 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,10 @@ #include "avio.h" #include "url.h" +#include "libavutil/log.h" + +extern const AVClass ffio_url_class; + int ffio_init_context(AVIOContext *s, unsigned char *buffer, int buffer_size, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avisynth.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avisynth.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avisynth.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avisynth.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * AVISynth support for ffmpeg system + * AVISynth support * Copyright (c) 2006 DivX, Inc. * * This file is part of Libav. @@ -20,6 +20,7 @@ */ #include "avformat.h" +#include "internal.h" #include "riff.h" #include @@ -84,7 +85,8 @@ if (AVIStreamReadFormat(stream->handle, 0, &wvfmt, &struct_size) != S_OK) continue; - st = av_new_stream(s, id); + st = avformat_new_stream(s, NULL); + st->id = id; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->block_align = wvfmt.nBlockAlign; @@ -110,7 +112,8 @@ if (AVIStreamReadFormat(stream->handle, 0, &imgfmt, &struct_size) != S_OK) continue; - st = av_new_stream(s, id); + st = avformat_new_stream(s, NULL); + st->id = id; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->r_frame_rate.num = stream->info.dwRate; st->r_frame_rate.den = stream->info.dwScale; @@ -135,7 +138,7 @@ st->codec->stream_codec_tag = stream->info.fccHandler; - av_set_pts_info(st, 64, info.dwScale, info.dwRate); + avpriv_set_pts_info(st, 64, info.dwScale, info.dwRate); st->start_time = stream->info.dwStart; } } @@ -208,15 +211,12 @@ } AVInputFormat ff_avisynth_demuxer = { - "avs", - NULL_IF_CONFIG_SMALL("AVISynth"), - sizeof(AVISynthContext), - NULL, - avisynth_read_header, - avisynth_read_packet, - avisynth_read_close, - avisynth_read_seek, - NULL, - 0, - "avs", + .name = "avs", + .long_name = NULL_IF_CONFIG_SMALL("AVISynth"), + .priv_data_size = sizeof(AVISynthContext), + .read_header = avisynth_read_header, + .read_packet = avisynth_read_packet, + .read_close = avisynth_read_close, + .read_seek = avisynth_read_seek, + .extensions = "avs", }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avlanguage.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avlanguage.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avlanguage.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avlanguage.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ #include "avlanguage.h" #include "libavutil/avstring.h" +#include "libavutil/common.h" #include #include #include @@ -736,7 +737,7 @@ { int i; const LangEntry *entry = NULL; - const int NB_CODESPACES = sizeof(lang_table_counts)/sizeof(*lang_table_counts); + const int NB_CODESPACES = FF_ARRAY_ELEMS(lang_table_counts); if (target_codespace >= NB_CODESPACES) return NULL; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avs.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avs.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/avs.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/avs.c 2012-01-11 00:34:30.000000000 +0000 @@ -163,10 +163,14 @@ sub_type = avio_r8(s->pb); type = avio_r8(s->pb); size = avio_rl16(s->pb); + if (size < 4) + return AVERROR_INVALIDDATA; avs->remaining_frame_size -= size; switch (type) { case AVS_PALETTE: + if (size - 4 > sizeof(palette)) + return AVERROR_INVALIDDATA; ret = avio_read(s->pb, palette, size - 4); if (ret < size - 4) return AVERROR(EIO); @@ -175,7 +179,7 @@ case AVS_VIDEO: if (!avs->st_video) { - avs->st_video = av_new_stream(s, AVS_VIDEO); + avs->st_video = avformat_new_stream(s, NULL); if (avs->st_video == NULL) return AVERROR(ENOMEM); avs->st_video->codec->codec_type = AVMEDIA_TYPE_VIDEO; @@ -192,7 +196,7 @@ case AVS_AUDIO: if (!avs->st_audio) { - avs->st_audio = av_new_stream(s, AVS_AUDIO); + avs->st_audio = avformat_new_stream(s, NULL); if (avs->st_audio == NULL) return AVERROR(ENOMEM); avs->st_audio->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -216,11 +220,11 @@ } AVInputFormat ff_avs_demuxer = { - "avs", - NULL_IF_CONFIG_SMALL("AVS format"), - sizeof(AvsFormat), - avs_probe, - avs_read_header, - avs_read_packet, - avs_read_close, + .name = "avs", + .long_name = NULL_IF_CONFIG_SMALL("AVS format"), + .priv_data_size = sizeof(AvsFormat), + .read_probe = avs_probe, + .read_header = avs_read_header, + .read_packet = avs_read_packet, + .read_close = avs_read_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/bethsoftvid.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/bethsoftvid.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/bethsoftvid.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/bethsoftvid.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,12 +23,13 @@ * @file * @brief Bethesda Softworks VID (.vid) file demuxer * @author Nicholas Tung [ntung (at. ntung com] (2007-03) - * @sa http://wiki.multimedia.cx/index.php?title=Bethsoft_VID - * @sa http://www.svatopluk.com/andux/docs/dfvid.html + * @see http://wiki.multimedia.cx/index.php?title=Bethsoft_VID + * @see http://www.svatopluk.com/andux/docs/dfvid.html */ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #include "libavcodec/bethsoftvideo.h" typedef struct BVID_DemuxContext @@ -70,10 +71,10 @@ avio_skip(pb, 5); vid->nframes = avio_rl16(pb); - stream = av_new_stream(s, 0); + stream = avformat_new_stream(s, NULL); if (!stream) return AVERROR(ENOMEM); - av_set_pts_info(stream, 32, 1, 60); // 16 ms increments, i.e. 60 fps + avpriv_set_pts_info(stream, 32, 1, 60); // 16 ms increments, i.e. 60 fps stream->codec->codec_type = AVMEDIA_TYPE_VIDEO; stream->codec->codec_id = CODEC_ID_BETHSOFTVID; stream->codec->width = avio_rl16(pb); @@ -83,7 +84,7 @@ avio_rl16(pb); // done with video codec, set up audio codec - stream = av_new_stream(s, 0); + stream = avformat_new_stream(s, NULL); if (!stream) return AVERROR(ENOMEM); stream->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -220,15 +221,13 @@ av_log(s, AV_LOG_ERROR, "unknown block (character = %c, decimal = %d, hex = %x)!!!\n", block_type, block_type, block_type); return -1; } - - return 0; } AVInputFormat ff_bethsoftvid_demuxer = { - "bethsoftvid", - NULL_IF_CONFIG_SMALL("Bethesda Softworks VID format"), - sizeof(BVID_DemuxContext), - vid_probe, - vid_read_header, - vid_read_packet, + .name = "bethsoftvid", + .long_name = NULL_IF_CONFIG_SMALL("Bethesda Softworks VID format"), + .priv_data_size = sizeof(BVID_DemuxContext), + .read_probe = vid_probe, + .read_header = vid_read_header, + .read_packet = vid_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/bfi.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/bfi.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/bfi.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/bfi.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,11 +23,12 @@ * @file * @brief Brute Force & Ignorance (.bfi) file demuxer * @author Sisir Koppaka ( sisir.koppaka at gmail dot com ) - * @sa http://wiki.multimedia.cx/index.php?title=BFI + * @see http://wiki.multimedia.cx/index.php?title=BFI */ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" typedef struct BFIContext { int nframes; @@ -55,12 +56,12 @@ int fps, chunk_header; /* Initialize the video codec... */ - vstream = av_new_stream(s, 0); + vstream = avformat_new_stream(s, NULL); if (!vstream) return AVERROR(ENOMEM); /* Initialize the audio codec... */ - astream = av_new_stream(s, 0); + astream = avformat_new_stream(s, NULL); if (!astream) return AVERROR(ENOMEM); @@ -86,7 +87,7 @@ astream->codec->sample_rate = avio_rl32(pb); /* Set up the video codec... */ - av_set_pts_info(vstream, 32, 1, fps); + avpriv_set_pts_info(vstream, 32, 1, fps); vstream->codec->codec_type = AVMEDIA_TYPE_VIDEO; vstream->codec->codec_id = CODEC_ID_BFI; vstream->codec->pix_fmt = PIX_FMT_PAL8; @@ -99,7 +100,7 @@ astream->codec->bit_rate = astream->codec->sample_rate * astream->codec->bits_per_coded_sample; avio_seek(pb, chunk_header - 3, SEEK_SET); - av_set_pts_info(astream, 64, 1, astream->codec->sample_rate); + avpriv_set_pts_info(astream, 64, 1, astream->codec->sample_rate); return 0; } @@ -159,10 +160,10 @@ } AVInputFormat ff_bfi_demuxer = { - "bfi", - NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"), - sizeof(BFIContext), - bfi_probe, - bfi_read_header, - bfi_read_packet, + .name = "bfi", + .long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"), + .priv_data_size = sizeof(BFIContext), + .read_probe = bfi_probe, + .read_header = bfi_read_header, + .read_packet = bfi_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/bink.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/bink.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/bink.c 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/bink.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,6 +30,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" enum BinkAudFlags { BINK_AUD_16BITS = 0x4000, ///< prefer 16-bit output @@ -78,7 +79,7 @@ uint16_t flags; int keyframe; - vst = av_new_stream(s, 0); + vst = avformat_new_stream(s, NULL); if (!vst) return AVERROR(ENOMEM); @@ -109,7 +110,7 @@ av_log(s, AV_LOG_ERROR, "invalid header: invalid fps (%d/%d)\n", fps_num, fps_den); return AVERROR(EIO); } - av_set_pts_info(vst, 64, fps_den, fps_num); + avpriv_set_pts_info(vst, 64, fps_den, fps_num); vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_id = CODEC_ID_BINKVIDEO; @@ -130,17 +131,22 @@ avio_skip(pb, 4 * bink->num_audio_tracks); for (i = 0; i < bink->num_audio_tracks; i++) { - ast = av_new_stream(s, 1); + ast = avformat_new_stream(s, NULL); if (!ast) return AVERROR(ENOMEM); ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; - ast->codec->codec_tag = vst->codec->codec_tag; + ast->codec->codec_tag = 0; ast->codec->sample_rate = avio_rl16(pb); - av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); + avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate); flags = avio_rl16(pb); ast->codec->codec_id = flags & BINK_AUD_USEDCT ? CODEC_ID_BINKAUDIO_DCT : CODEC_ID_BINKAUDIO_RDFT; ast->codec->channels = flags & BINK_AUD_STEREO ? 2 : 1; + ast->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE); + if (!ast->codec->extradata) + return AVERROR(ENOMEM); + ast->codec->extradata_size = 4; + AV_WL32(ast->codec->extradata, vst->codec->codec_tag); } for (i = 0; i < bink->num_audio_tracks; i++) @@ -259,12 +265,11 @@ } AVInputFormat ff_bink_demuxer = { - "bink", - NULL_IF_CONFIG_SMALL("Bink"), - sizeof(BinkDemuxContext), - probe, - read_header, - read_packet, - NULL, - read_seek, + .name = "bink", + .long_name = NULL_IF_CONFIG_SMALL("Bink"), + .priv_data_size = sizeof(BinkDemuxContext), + .read_probe = probe, + .read_header = read_header, + .read_packet = read_packet, + .read_seek = read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/bmv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/bmv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/bmv.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/bmv.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,137 @@ +/* + * Discworld II BMV demuxer + * Copyright (c) 2011 Konstantin Shishkov. + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "avformat.h" +#include "internal.h" + +enum BMVFlags { + BMV_NOP = 0, + BMV_END, + BMV_DELTA, + BMV_INTRA, + + BMV_AUDIO = 0x20, +}; + +typedef struct BMVContext { + uint8_t *packet; + int size; + int get_next; + int64_t audio_pos; +} BMVContext; + +static int bmv_read_header(AVFormatContext *s, AVFormatParameters *ap) +{ + AVStream *st, *ast; + BMVContext *c = s->priv_data; + + st = avformat_new_stream(s, 0); + if (!st) + return AVERROR(ENOMEM); + st->codec->codec_type = AVMEDIA_TYPE_VIDEO; + st->codec->codec_id = CODEC_ID_BMV_VIDEO; + st->codec->width = 640; + st->codec->height = 429; + st->codec->pix_fmt = PIX_FMT_PAL8; + avpriv_set_pts_info(st, 16, 1, 12); + ast = avformat_new_stream(s, 0); + if (!ast) + return AVERROR(ENOMEM); + ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; + ast->codec->codec_id = CODEC_ID_BMV_AUDIO; + ast->codec->channels = 2; + ast->codec->sample_rate = 22050; + avpriv_set_pts_info(ast, 16, 1, 22050); + + c->get_next = 1; + c->audio_pos = 0; + return 0; +} + +static int bmv_read_packet(AVFormatContext *s, AVPacket *pkt) +{ + BMVContext *c = s->priv_data; + int type; + void *tmp; + + while (c->get_next) { + if (s->pb->eof_reached) + return AVERROR_EOF; + type = avio_r8(s->pb); + if (type == BMV_NOP) + continue; + if (type == BMV_END) + return AVERROR_EOF; + c->size = avio_rl24(s->pb); + if (!c->size) + return AVERROR_INVALIDDATA; + tmp = av_realloc(c->packet, c->size + 1); + if (!tmp) + return AVERROR(ENOMEM); + c->packet = tmp; + c->packet[0] = type; + if (avio_read(s->pb, c->packet + 1, c->size) != c->size) + return AVERROR(EIO); + if (type & BMV_AUDIO) { + int audio_size = c->packet[1] * 65 + 1; + if (audio_size >= c->size) { + av_log(s, AV_LOG_ERROR, "Reported audio size %d is bigger than packet size (%d)\n", + audio_size, c->size); + return AVERROR_INVALIDDATA; + } + if (av_new_packet(pkt, audio_size) < 0) + return AVERROR(ENOMEM); + memcpy(pkt->data, c->packet + 1, pkt->size); + pkt->stream_index = 1; + pkt->pts = c->audio_pos; + pkt->duration = c->packet[1] * 32; + c->audio_pos += pkt->duration; + c->get_next = 0; + return pkt->size; + } else + break; + } + if (av_new_packet(pkt, c->size + 1) < 0) + return AVERROR(ENOMEM); + pkt->stream_index = 0; + c->get_next = 1; + memcpy(pkt->data, c->packet, pkt->size); + return pkt->size; +} + +static int bmv_read_close(AVFormatContext *s) +{ + BMVContext *c = s->priv_data; + + av_freep(&c->packet); + + return 0; +} + +AVInputFormat ff_bmv_demuxer = { + .name = "bmv", + .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV"), + .priv_data_size = sizeof(BMVContext), + .read_header = bmv_read_header, + .read_packet = bmv_read_packet, + .read_close = bmv_read_close, + .extensions = "bmv" +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/c93.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/c93.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/c93.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/c93.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ */ #include "avformat.h" +#include "internal.h" #include "voc.h" #include "libavutil/intreadwrite.h" @@ -79,7 +80,7 @@ /* Audio streams are added if audio packets are found */ s->ctx_flags |= AVFMTCTX_NOHEADER; - video = av_new_stream(s, 0); + video = avformat_new_stream(s, NULL); if (!video) return AVERROR(ENOMEM); @@ -89,7 +90,7 @@ video->codec->height = 192; /* 4:3 320x200 with 8 empty lines */ video->sample_aspect_ratio = (AVRational) { 5, 6 }; - av_set_pts_info(video, 64, 2, 25); + avpriv_set_pts_info(video, 64, 2, 25); video->nb_frames = framecount; video->duration = framecount; video->start_time = 0; @@ -117,7 +118,7 @@ datasize = avio_rl16(pb); if (datasize > 42) { if (!c93->audio) { - c93->audio = av_new_stream(s, 1); + c93->audio = avformat_new_stream(s, NULL); if (!c93->audio) return AVERROR(ENOMEM); c93->audio->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -193,10 +194,10 @@ } AVInputFormat ff_c93_demuxer = { - "c93", - NULL_IF_CONFIG_SMALL("Interplay C93"), - sizeof(C93DemuxContext), - probe, - read_header, - read_packet, + .name = "c93", + .long_name = NULL_IF_CONFIG_SMALL("Interplay C93"), + .priv_data_size = sizeof(C93DemuxContext), + .read_probe = probe, + .read_header = read_header, + .read_packet = read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/cafdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/cafdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/cafdec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/cafdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,9 +26,11 @@ */ #include "avformat.h" +#include "internal.h" #include "riff.h" #include "isom.h" #include "libavutil/intreadwrite.h" +#include "libavutil/intfloat.h" #include "libavutil/dict.h" #include "caf.h" @@ -60,13 +62,13 @@ int flags; /* new audio stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); /* parse format description */ st->codec->codec_type = AVMEDIA_TYPE_AUDIO; - st->codec->sample_rate = av_int2dbl(avio_rb64(pb)); + st->codec->sample_rate = av_int2double(avio_rb64(pb)); st->codec->codec_tag = avio_rb32(pb); flags = avio_rb32(pb); caf->bytes_per_packet = avio_rb32(pb); @@ -285,10 +287,8 @@ "block size or frame size are variable.\n"); return AVERROR_INVALIDDATA; } - s->file_size = avio_size(pb); - s->file_size = FFMAX(0, s->file_size); - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); st->start_time = 0; /* position the stream at the start of data */ @@ -383,13 +383,12 @@ } AVInputFormat ff_caf_demuxer = { - "caf", - NULL_IF_CONFIG_SMALL("Apple Core Audio Format"), - sizeof(CaffContext), - probe, - read_header, - read_packet, - NULL, - read_seek, + .name = "caf", + .long_name = NULL_IF_CONFIG_SMALL("Apple Core Audio Format"), + .priv_data_size = sizeof(CaffContext), + .read_probe = probe, + .read_header = read_header, + .read_packet = read_packet, + .read_seek = read_seek, .codec_tag = (const AVCodecTag*[]){ff_codec_caf_tags, 0}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/cdg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/cdg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/cdg.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/cdg.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,15 +20,18 @@ */ #include "avformat.h" +#include "internal.h" #define CDG_PACKET_SIZE 24 +#define CDG_COMMAND 0x09 +#define CDG_MASK 0x3F static int read_header(AVFormatContext *s, AVFormatParameters *ap) { AVStream *vst; int ret; - vst = av_new_stream(s, 0); + vst = avformat_new_stream(s, NULL); if (!vst) return AVERROR(ENOMEM); @@ -36,7 +39,7 @@ vst->codec->codec_id = CODEC_ID_CDGRAPHICS; /// 75 sectors/sec * 4 packets/sector = 300 packets/sec - av_set_pts_info(vst, 32, 1, 300); + avpriv_set_pts_info(vst, 32, 1, 300); ret = avio_size(s->pb); if (ret > 0) @@ -49,18 +52,21 @@ { int ret; - ret = av_get_packet(s->pb, pkt, CDG_PACKET_SIZE); + while (1) { + ret = av_get_packet(s->pb, pkt, CDG_PACKET_SIZE); + if (ret < 1 || (pkt->data[0] & CDG_MASK) == CDG_COMMAND) + break; + av_free_packet(pkt); + } pkt->stream_index = 0; return ret; } AVInputFormat ff_cdg_demuxer = { - "cdg", - NULL_IF_CONFIG_SMALL("CD Graphics Format"), - 0, - NULL, - read_header, - read_packet, + .name = "cdg", + .long_name = NULL_IF_CONFIG_SMALL("CD Graphics Format"), + .read_header = read_header, + .read_packet = read_packet, .extensions = "cdg" }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/concat.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/concat.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/concat.c 2011-04-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/concat.c 2012-01-11 00:34:30.000000000 +0000 @@ -50,7 +50,6 @@ err |= ffurl_close(nodes[i].uc); av_freep(&data->nodes); - av_freep(&h->priv_data); return err < 0 ? -1 : 0; } @@ -62,16 +61,11 @@ int64_t size; size_t len, i; URLContext *uc; - struct concat_data *data; + struct concat_data *data = h->priv_data; struct concat_nodes *nodes; av_strstart(uri, "concat:", &uri); - /* creating data */ - if (!(data = av_mallocz(sizeof(*data)))) - return AVERROR(ENOMEM); - h->priv_data = data; - for (i = 0, len = 1; uri[i]; i++) if (uri[i] == *AV_CAT_SEPARATOR) /* integer overflow */ @@ -81,7 +75,6 @@ } if (!(nodes = av_malloc(sizeof(*nodes) * len))) { - av_freep(&h->priv_data); return AVERROR(ENOMEM); } else data->nodes = nodes; @@ -101,7 +94,8 @@ uri += len + strspn(uri+len, AV_CAT_SEPARATOR); /* creating URLContext */ - if ((err = ffurl_open(&uc, node_uri, flags)) < 0) + if ((err = ffurl_open(&uc, node_uri, flags, + &h->interrupt_callback, NULL)) < 0) break; /* creating size */ @@ -190,9 +184,10 @@ } URLProtocol ff_concat_protocol = { - .name = "concat", - .url_open = concat_open, - .url_read = concat_read, - .url_seek = concat_seek, - .url_close = concat_close, + .name = "concat", + .url_open = concat_open, + .url_read = concat_read, + .url_seek = concat_seek, + .url_close = concat_close, + .priv_data_size = sizeof(struct concat_data), }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/crcenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/crcenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/crcenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/crcenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -55,14 +55,14 @@ } AVOutputFormat ff_crc_muxer = { - "crc", - NULL_IF_CONFIG_SMALL("CRC testing format"), - NULL, - "", - sizeof(CRCState), - CODEC_ID_PCM_S16LE, - CODEC_ID_RAWVIDEO, - crc_write_header, - crc_write_packet, - crc_write_trailer, + .name = "crc", + .long_name = NULL_IF_CONFIG_SMALL("CRC testing format"), + .extensions = "", + .priv_data_size = sizeof(CRCState), + .audio_codec = CODEC_ID_PCM_S16LE, + .video_codec = CODEC_ID_RAWVIDEO, + .write_header = crc_write_header, + .write_packet = crc_write_packet, + .write_trailer = crc_write_trailer, + .flags = AVFMT_NOTIMESTAMPS, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/crypto.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/crypto.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/crypto.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/crypto.c 2012-01-11 00:34:30.000000000 +0000 @@ -45,9 +45,10 @@ } CryptoContext; #define OFFSET(x) offsetof(CryptoContext, x) +#define D AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { - {"key", "AES decryption key", OFFSET(key), FF_OPT_TYPE_BINARY }, - {"iv", "AES decryption initialization vector", OFFSET(iv), FF_OPT_TYPE_BINARY }, + {"key", "AES decryption key", OFFSET(key), AV_OPT_TYPE_BINARY, .flags = D }, + {"iv", "AES decryption initialization vector", OFFSET(iv), AV_OPT_TYPE_BINARY, .flags = D }, { NULL } }; @@ -61,7 +62,7 @@ static int crypto_open(URLContext *h, const char *uri, int flags) { const char *nested_url; - int ret; + int ret = 0; CryptoContext *c = h->priv_data; if (!av_strstart(uri, "crypto+", &nested_url) && @@ -81,7 +82,8 @@ ret = AVERROR(ENOSYS); goto err; } - if ((ret = ffurl_open(&c->hd, nested_url, AVIO_FLAG_READ)) < 0) { + if ((ret = ffurl_open(&c->hd, nested_url, AVIO_FLAG_READ, + &h->interrupt_callback, NULL)) < 0) { av_log(h, AV_LOG_ERROR, "Unable to open input\n"); goto err; } @@ -95,10 +97,7 @@ h->is_streamed = 1; - return 0; err: - av_freep(&c->key); - av_freep(&c->iv); return ret; } @@ -157,8 +156,6 @@ if (c->hd) ffurl_close(c->hd); av_freep(&c->aes); - av_freep(&c->key); - av_freep(&c->iv); return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/cutils.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/cutils.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/cutils.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/cutils.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Various simple utilities for ffmpeg system + * various simple utilities for libavformat * Copyright (c) 2000, 2001, 2002 Fabrice Bellard * * This file is part of Libav. @@ -24,7 +24,7 @@ /* add one element to a dynamic array */ void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem) { - /* see similar ffmpeg.c:grow_array() */ + /* see similar avconv.c:grow_array() */ int nb, nb_alloc; intptr_t *tab; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/daud.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/daud.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/daud.c 2011-04-11 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/daud.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,7 +21,7 @@ #include "avformat.h" static int daud_header(AVFormatContext *s, AVFormatParameters *ap) { - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -71,30 +71,23 @@ #if CONFIG_DAUD_DEMUXER AVInputFormat ff_daud_demuxer = { - "daud", - NULL_IF_CONFIG_SMALL("D-Cinema audio format"), - 0, - NULL, - daud_header, - daud_packet, - NULL, - NULL, + .name = "daud", + .long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio format"), + .read_header = daud_header, + .read_packet = daud_packet, .extensions = "302", }; #endif #if CONFIG_DAUD_MUXER -AVOutputFormat ff_daud_muxer = -{ - "daud", - NULL_IF_CONFIG_SMALL("D-Cinema audio format"), - NULL, - "302", - 0, - CODEC_ID_PCM_S24DAUD, - CODEC_ID_NONE, - daud_write_header, - daud_write_packet, - .flags= AVFMT_NOTIMESTAMPS, +AVOutputFormat ff_daud_muxer = { + .name = "daud", + .long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio format"), + .extensions = "302", + .audio_codec = CODEC_ID_PCM_S24DAUD, + .video_codec = CODEC_ID_NONE, + .write_header = daud_write_header, + .write_packet = daud_write_packet, + .flags = AVFMT_NOTIMESTAMPS, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dfa.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dfa.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dfa.c 2011-03-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dfa.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" static int dfa_probe(AVProbeData *p) { @@ -45,7 +46,7 @@ avio_skip(pb, 2); // unused frames = avio_rl16(pb); - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -58,7 +59,7 @@ av_log(s, AV_LOG_WARNING, "Zero FPS reported, defaulting to 10\n"); mspf = 100; } - av_set_pts_info(st, 24, mspf, 1000); + avpriv_set_pts_info(st, 24, mspf, 1000); avio_skip(pb, 128 - 16); // padding st->duration = frames; @@ -109,11 +110,10 @@ } AVInputFormat ff_dfa_demuxer = { - "dfa", - NULL_IF_CONFIG_SMALL("Chronomaster DFA"), - 0, - dfa_probe, - dfa_read_header, - dfa_read_packet, + .name = "dfa", + .long_name = NULL_IF_CONFIG_SMALL("Chronomaster DFA"), + .read_probe = dfa_probe, + .read_header = dfa_read_header, + .read_packet = dfa_read_packet, .flags = AVFMT_GENERIC_INDEX, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dsicin.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dsicin.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dsicin.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dsicin.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" typedef struct CinFileHeader { @@ -107,11 +108,11 @@ cin->audio_buffer_size = 0; /* initialize the video decoder stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 32, 1, 12); + avpriv_set_pts_info(st, 32, 1, 12); cin->video_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_DSICINVIDEO; @@ -120,20 +121,19 @@ st->codec->height = hdr->video_frame_height; /* initialize the audio decoder stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 32, 1, 22050); + avpriv_set_pts_info(st, 32, 1, 22050); cin->audio_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_DSICINAUDIO; st->codec->codec_tag = 0; /* no tag */ st->codec->channels = 1; st->codec->sample_rate = 22050; - st->codec->bits_per_coded_sample = 16; + st->codec->bits_per_coded_sample = 8; st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample * st->codec->channels; - st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; return 0; } @@ -211,16 +211,17 @@ pkt->stream_index = cin->audio_stream_index; pkt->pts = cin->audio_stream_pts; - cin->audio_stream_pts += cin->audio_buffer_size * 2 / cin->file_header.audio_frame_size; + pkt->duration = cin->audio_buffer_size - (pkt->pts == 0); + cin->audio_stream_pts += pkt->duration; cin->audio_buffer_size = 0; return 0; } AVInputFormat ff_dsicin_demuxer = { - "dsicin", - NULL_IF_CONFIG_SMALL("Delphine Software International CIN format"), - sizeof(CinDemuxContext), - cin_probe, - cin_read_header, - cin_read_packet, + .name = "dsicin", + .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN format"), + .priv_data_size = sizeof(CinDemuxContext), + .read_probe = cin_probe, + .read_header = cin_read_header, + .read_packet = cin_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dtsdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dtsdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dtsdec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dtsdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -66,12 +66,11 @@ } AVInputFormat ff_dts_demuxer = { - "dts", - NULL_IF_CONFIG_SMALL("raw DTS"), - 0, - dts_probe, - ff_raw_audio_read_header, - ff_raw_read_partial_packet, + .name = "dts", + .long_name = NULL_IF_CONFIG_SMALL("raw DTS"), + .read_probe = dts_probe, + .read_header = ff_raw_audio_read_header, + .read_packet = ff_raw_read_partial_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "dts", .value = CODEC_ID_DTS, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dv.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dv.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,8 +30,10 @@ */ #include #include "avformat.h" +#include "internal.h" #include "libavcodec/dvdata.h" #include "libavutil/intreadwrite.h" +#include "libavutil/mathematics.h" #include "dv.h" struct DVDemuxContext { @@ -95,7 +97,7 @@ /* * There's a couple of assumptions being made here: * 1. By default we silence erroneous (0x8000/16bit 0x800/12bit) audio samples. - * We can pass them upwards when ffmpeg will be ready to deal with them. + * We can pass them upwards when libavcodec will be ready to deal with them. * 2. We don't do software emphasis. * 3. Audio is always returned as 16bit linear samples: 12bit nonlinear samples * are converted into 16bit linear ones. @@ -210,10 +212,10 @@ /* Dynamic handling of the audio streams in DV */ for (i = 0; i < ach; i++) { if (!c->ast[i]) { - c->ast[i] = av_new_stream(c->fctx, 0); + c->ast[i] = avformat_new_stream(c->fctx, NULL); if (!c->ast[i]) break; - av_set_pts_info(c->ast[i], 64, 1, 30000); + avpriv_set_pts_info(c->ast[i], 64, 1, 30000); c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO; c->ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE; @@ -243,7 +245,7 @@ if (c->sys) { avctx = c->vst->codec; - av_set_pts_info(c->vst, 64, c->sys->time_base.num, + avpriv_set_pts_info(c->vst, 64, c->sys->time_base.num, c->sys->time_base.den); avctx->time_base= c->sys->time_base; if (!avctx->width){ @@ -269,7 +271,7 @@ * The following 3 functions constitute our interface to the world */ -DVDemuxContext* dv_init_demux(AVFormatContext *s) +DVDemuxContext* avpriv_dv_init_demux(AVFormatContext *s) { DVDemuxContext *c; @@ -277,7 +279,7 @@ if (!c) return NULL; - c->vst = av_new_stream(s, 0); + c->vst = avformat_new_stream(s, NULL); if (!c->vst) { av_free(c); return NULL; @@ -298,7 +300,7 @@ return c; } -int dv_get_packet(DVDemuxContext *c, AVPacket *pkt) +int avpriv_dv_get_packet(DVDemuxContext *c, AVPacket *pkt) { int size = -1; int i; @@ -315,14 +317,14 @@ return size; } -int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, +int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, uint8_t* buf, int buf_size) { int size, i; uint8_t *ppcm[4] = {0}; if (buf_size < DV_PROFILE_BYTES || - !(c->sys = ff_dv_frame_profile(c->sys, buf, buf_size)) || + !(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) || buf_size < c->sys->frame_size) { return -1; /* Broken frame, or not enough data */ } @@ -368,7 +370,7 @@ int64_t timestamp, int flags) { // FIXME: sys may be wrong if last dv_read_packet() failed (buffer is junk) - const DVprofile* sys = ff_dv_codec_profile(c->vst->codec); + const DVprofile* sys = avpriv_dv_codec_profile(c->vst->codec); int64_t offset; int64_t size = avio_size(s->pb) - s->data_offset; int64_t max_offset = ((size-1) / sys->frame_size) * sys->frame_size; @@ -406,7 +408,7 @@ unsigned state, marker_pos = 0; RawDVContext *c = s->priv_data; - c->dv_demux = dv_init_demux(s); + c->dv_demux = avpriv_dv_init_demux(s); if (!c->dv_demux) return -1; @@ -431,7 +433,7 @@ avio_seek(s->pb, -DV_PROFILE_BYTES, SEEK_CUR) < 0) return AVERROR(EIO); - c->dv_demux->sys = ff_dv_frame_profile(c->dv_demux->sys, c->buf, DV_PROFILE_BYTES); + c->dv_demux->sys = avpriv_dv_frame_profile(c->dv_demux->sys, c->buf, DV_PROFILE_BYTES); if (!c->dv_demux->sys) { av_log(s, AV_LOG_ERROR, "Can't determine profile of DV input stream.\n"); return -1; @@ -449,7 +451,7 @@ int size; RawDVContext *c = s->priv_data; - size = dv_get_packet(c->dv_demux, pkt); + size = avpriv_dv_get_packet(c->dv_demux, pkt); if (size < 0) { if (!c->dv_demux->sys) @@ -458,7 +460,7 @@ if (avio_read(s->pb, c->buf, size) <= 0) return AVERROR(EIO); - size = dv_produce_packet(c->dv_demux, pkt, c->buf, size); + size = avpriv_dv_produce_packet(c->dv_demux, pkt, c->buf, size); } return size; @@ -519,14 +521,14 @@ #if CONFIG_DV_DEMUXER AVInputFormat ff_dv_demuxer = { - "dv", - NULL_IF_CONFIG_SMALL("DV video format"), - sizeof(RawDVContext), - dv_probe, - dv_read_header, - dv_read_packet, - dv_read_close, - dv_read_seek, + .name = "dv", + .long_name = NULL_IF_CONFIG_SMALL("DV video format"), + .priv_data_size = sizeof(RawDVContext), + .read_probe = dv_probe, + .read_header = dv_read_header, + .read_packet = dv_read_packet, + .read_close = dv_read_close, + .read_seek = dv_read_seek, .extensions = "dv,dif", }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dvenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dvenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dvenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dvenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,6 +35,7 @@ #include "libavcodec/dvdata.h" #include "dv.h" #include "libavutil/fifo.h" +#include "libavutil/mathematics.h" struct DVMuxContext { const DVprofile* sys; /* current DV profile, e.g.: 525/60, 625/50 */ @@ -42,7 +43,7 @@ AVStream *ast[2]; /* stereo audio streams */ AVFifoBuffer *audio_data[2]; /* FIFO for storing excessive amounts of PCM */ int frames; /* current frame number */ - time_t start_time; /* recording start time */ + int64_t start_time; /* recording start time */ int has_audio; /* frame under contruction has audio */ int has_video; /* frame under contruction has video */ uint8_t frame_buf[DV_MAX_FRAME_SIZE]; /* frame under contruction */ @@ -191,8 +192,8 @@ if (of*2 >= size) continue; - frame_ptr[d] = av_fifo_peek(c->audio_data[channel], of*2+1); // FIXME: maybe we have to admit - frame_ptr[d+1] = av_fifo_peek(c->audio_data[channel], of*2); // that DV is a big-endian PCM + frame_ptr[d] = *av_fifo_peek2(c->audio_data[channel], of*2+1); // FIXME: maybe we have to admit + frame_ptr[d+1] = *av_fifo_peek2(c->audio_data[channel], of*2); // that DV is a big-endian PCM } frame_ptr += 16 * 80; /* 15 Video DIFs + 1 Audio DIF */ } @@ -289,6 +290,7 @@ { DVMuxContext *c = s->priv_data; AVStream *vst = NULL; + AVDictionaryEntry *t; int i; /* we support at most 1 video and 2 audio streams */ @@ -323,7 +325,7 @@ c->ast[i]->codec->channels != 2)) goto bail_out; } - c->sys = ff_dv_codec_profile(vst->codec); + c->sys = avpriv_dv_codec_profile(vst->codec); if (!c->sys) goto bail_out; @@ -336,7 +338,13 @@ c->frames = 0; c->has_audio = 0; c->has_video = 0; - c->start_time = (time_t)s->timestamp; +#if FF_API_TIMESTAMP + if (s->timestamp) + c->start_time = s->timestamp; + else +#endif + if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) + c->start_time = ff_iso8601_to_unix_time(t->value); for (i=0; i < c->n_ast; i++) { if (c->ast[i] && !(c->audio_data[i]=av_fifo_alloc(100*AVCODEC_MAX_AUDIO_FRAME_SIZE))) { @@ -400,14 +408,13 @@ } AVOutputFormat ff_dv_muxer = { - "dv", - NULL_IF_CONFIG_SMALL("DV video format"), - NULL, - "dv", - sizeof(DVMuxContext), - CODEC_ID_PCM_S16LE, - CODEC_ID_DVVIDEO, - dv_write_header, - dv_write_packet, - dv_write_trailer, + .name = "dv", + .long_name = NULL_IF_CONFIG_SMALL("DV video format"), + .extensions = "dv", + .priv_data_size = sizeof(DVMuxContext), + .audio_codec = CODEC_ID_PCM_S16LE, + .video_codec = CODEC_ID_DVVIDEO, + .write_header = dv_write_header, + .write_packet = dv_write_packet, + .write_trailer = dv_write_trailer, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dv.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dv.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dv.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dv.h 2012-01-11 00:34:30.000000000 +0000 @@ -31,9 +31,9 @@ #include "avformat.h" typedef struct DVDemuxContext DVDemuxContext; -DVDemuxContext* dv_init_demux(AVFormatContext* s); -int dv_get_packet(DVDemuxContext*, AVPacket *); -int dv_produce_packet(DVDemuxContext*, AVPacket*, uint8_t*, int); +DVDemuxContext* avpriv_dv_init_demux(AVFormatContext* s); +int avpriv_dv_get_packet(DVDemuxContext*, AVPacket *); +int avpriv_dv_produce_packet(DVDemuxContext*, AVPacket*, uint8_t*, int); void dv_offset_reset(DVDemuxContext *c, int64_t frame_offset); typedef struct DVMuxContext DVMuxContext; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dxa.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dxa.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/dxa.c 2011-04-15 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/dxa.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #include "riff.h" #define DXA_EXTRA_SIZE 9 @@ -87,7 +88,7 @@ h = avio_rb16(pb); c->has_sound = 0; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return -1; @@ -100,7 +101,7 @@ avio_skip(pb, 16); fsize = avio_rl32(pb); - ast = av_new_stream(s, 0); + ast = avformat_new_stream(s, NULL); if (!ast) return -1; ret = ff_get_wav_header(pb, ast->codec, fsize); @@ -127,7 +128,7 @@ st->codec->width = w; st->codec->height = h; av_reduce(&den, &num, den, num, (1UL<<31)-1); - av_set_pts_info(st, 33, num, den); + avpriv_set_pts_info(st, 33, num, den); /* flags & 0x80 means that image is interlaced, * flags & 0x40 means that image has double height * either way set true height @@ -213,10 +214,10 @@ } AVInputFormat ff_dxa_demuxer = { - "dxa", - NULL_IF_CONFIG_SMALL("DXA"), - sizeof(DXAContext), - dxa_probe, - dxa_read_header, - dxa_read_packet, + .name = "dxa", + .long_name = NULL_IF_CONFIG_SMALL("DXA"), + .priv_data_size = sizeof(DXAContext), + .read_probe = dxa_probe, + .read_header = dxa_read_header, + .read_packet = dxa_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/eacdata.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/eacdata.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/eacdata.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/eacdata.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,6 +29,7 @@ */ #include "avformat.h" +#include "internal.h" typedef struct { unsigned int channels; @@ -64,7 +65,7 @@ sample_rate = avio_rb16(pb); avio_skip(pb, 12); - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -72,7 +73,7 @@ st->codec->codec_id = CODEC_ID_ADPCM_EA_XAS; st->codec->channels = cdata->channels; st->codec->sample_rate = sample_rate; - av_set_pts_info(st, 64, 1, sample_rate); + avpriv_set_pts_info(st, 64, 1, sample_rate); cdata->audio_pts = 0; return 0; @@ -91,11 +92,11 @@ } AVInputFormat ff_ea_cdata_demuxer = { - "ea_cdata", - NULL_IF_CONFIG_SMALL("Electronic Arts cdata"), - sizeof(CdataDemuxContext), - cdata_probe, - cdata_read_header, - cdata_read_packet, + .name = "ea_cdata", + .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts cdata"), + .priv_data_size = sizeof(CdataDemuxContext), + .read_probe = cdata_probe, + .read_header = cdata_read_header, + .read_packet = cdata_read_packet, .extensions = "cdata", }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/electronicarts.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/electronicarts.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/electronicarts.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/electronicarts.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,6 +27,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define SCHl_TAG MKTAG('S', 'C', 'H', 'l') #define SEAD_TAG MKTAG('S', 'E', 'A', 'D') /* Sxxx header */ @@ -410,7 +411,7 @@ if (ea->video_codec) { /* initialize the video decoder stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); ea->video_stream_index = st->index; @@ -433,12 +434,17 @@ ea->audio_codec = 0; return 1; } + if (ea->bytes <= 0) { + av_log(s, AV_LOG_ERROR, "Invalid number of bytes per sample: %d\n", ea->bytes); + ea->audio_codec = CODEC_ID_NONE; + return 1; + } /* initialize the audio decoder stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 33, 1, ea->sample_rate); + avpriv_set_pts_info(st, 33, 1, ea->sample_rate); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = ea->audio_codec; st->codec->codec_tag = 0; /* no tag */ @@ -569,10 +575,10 @@ } AVInputFormat ff_ea_demuxer = { - "ea", - NULL_IF_CONFIG_SMALL("Electronic Arts Multimedia Format"), - sizeof(EaDemuxContext), - ea_probe, - ea_read_header, - ea_read_packet, + .name = "ea", + .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Multimedia Format"), + .priv_data_size = sizeof(EaDemuxContext), + .read_probe = ea_probe, + .read_header = ea_read_header, + .read_packet = ea_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ffmdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ffmdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ffmdec.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ffmdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * FFM (ffserver live feed) demuxer + * FFM (avserver live feed) demuxer * Copyright (c) 2001 Fabrice Bellard * * This file is part of Libav. @@ -20,9 +20,11 @@ */ #include "libavutil/intreadwrite.h" +#include "libavutil/intfloat.h" #include "avformat.h" +#include "internal.h" #include "ffm.h" -#if CONFIG_FFSERVER +#if CONFIG_AVSERVER #include int64_t ffm_read_write_index(int fd) @@ -54,7 +56,7 @@ ffm->write_index = pos; ffm->file_size = file_size; } -#endif // CONFIG_FFSERVER +#endif // CONFIG_AVSERVER static int ffm_is_avail_data(AVFormatContext *s, int size) { @@ -289,18 +291,17 @@ for(i=0;icodec; /* generic info */ codec->codec_id = avio_rb32(pb); codec->codec_type = avio_r8(pb); /* codec_type */ codec->bit_rate = avio_rb32(pb); - st->quality = avio_rb32(pb); codec->flags = avio_rb32(pb); codec->flags2 = avio_rb32(pb); codec->debug = avio_rb32(pb); @@ -324,10 +325,10 @@ codec->rc_max_rate = avio_rb32(pb); codec->rc_min_rate = avio_rb32(pb); codec->rc_buffer_size = avio_rb32(pb); - codec->i_quant_factor = av_int2dbl(avio_rb64(pb)); - codec->b_quant_factor = av_int2dbl(avio_rb64(pb)); - codec->i_quant_offset = av_int2dbl(avio_rb64(pb)); - codec->b_quant_offset = av_int2dbl(avio_rb64(pb)); + codec->i_quant_factor = av_int2double(avio_rb64(pb)); + codec->b_quant_factor = av_int2double(avio_rb64(pb)); + codec->i_quant_offset = av_int2double(avio_rb64(pb)); + codec->b_quant_offset = av_int2double(avio_rb64(pb)); codec->dct_algo = avio_rb32(pb); codec->strict_std_compliance = avio_rb32(pb); codec->max_b_frames = avio_rb32(pb); @@ -339,22 +340,20 @@ codec->mb_decision = avio_rb32(pb); codec->nsse_weight = avio_rb32(pb); codec->frame_skip_cmp = avio_rb32(pb); - codec->rc_buffer_aggressivity = av_int2dbl(avio_rb64(pb)); + codec->rc_buffer_aggressivity = av_int2double(avio_rb64(pb)); codec->codec_tag = avio_rb32(pb); codec->thread_count = avio_r8(pb); codec->coder_type = avio_rb32(pb); codec->me_cmp = avio_rb32(pb); - codec->partitions = avio_rb32(pb); codec->me_subpel_quality = avio_rb32(pb); codec->me_range = avio_rb32(pb); codec->keyint_min = avio_rb32(pb); codec->scenechange_threshold = avio_rb32(pb); codec->b_frame_strategy = avio_rb32(pb); - codec->qcompress = av_int2dbl(avio_rb64(pb)); - codec->qblur = av_int2dbl(avio_rb64(pb)); + codec->qcompress = av_int2double(avio_rb64(pb)); + codec->qblur = av_int2double(avio_rb64(pb)); codec->max_qdiff = avio_rb32(pb); codec->refs = avio_rb32(pb); - codec->directpred = avio_rb32(pb); break; case AVMEDIA_TYPE_AUDIO: codec->sample_rate = avio_rb32(pb); @@ -509,12 +508,12 @@ } AVInputFormat ff_ffm_demuxer = { - "ffm", - NULL_IF_CONFIG_SMALL("FFM (FFserver live feed) format"), - sizeof(FFMContext), - ffm_probe, - ffm_read_header, - ffm_read_packet, - ffm_close, - ffm_seek, + .name = "ffm", + .long_name = NULL_IF_CONFIG_SMALL("FFM (AVserver live feed) format"), + .priv_data_size = sizeof(FFMContext), + .read_probe = ffm_probe, + .read_header = ffm_read_header, + .read_packet = ffm_read_packet, + .read_close = ffm_close, + .read_seek = ffm_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ffmenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ffmenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ffmenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ffmenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * FFM (ffserver live feed) muxer + * FFM (avserver live feed) muxer * Copyright (c) 2001 Fabrice Bellard * * This file is part of Libav. @@ -20,7 +20,9 @@ */ #include "libavutil/intreadwrite.h" +#include "libavutil/intfloat.h" #include "avformat.h" +#include "internal.h" #include "ffm.h" static void flush_packet(AVFormatContext *s) @@ -106,14 +108,13 @@ /* list of streams */ for(i=0;inb_streams;i++) { st = s->streams[i]; - av_set_pts_info(st, 64, 1, 1000000); + avpriv_set_pts_info(st, 64, 1, 1000000); codec = st->codec; /* generic info */ avio_wb32(pb, codec->codec_id); avio_w8(pb, codec->codec_type); avio_wb32(pb, codec->bit_rate); - avio_wb32(pb, st->quality); avio_wb32(pb, codec->flags); avio_wb32(pb, codec->flags2); avio_wb32(pb, codec->debug); @@ -136,10 +137,10 @@ avio_wb32(pb, codec->rc_max_rate); avio_wb32(pb, codec->rc_min_rate); avio_wb32(pb, codec->rc_buffer_size); - avio_wb64(pb, av_dbl2int(codec->i_quant_factor)); - avio_wb64(pb, av_dbl2int(codec->b_quant_factor)); - avio_wb64(pb, av_dbl2int(codec->i_quant_offset)); - avio_wb64(pb, av_dbl2int(codec->b_quant_offset)); + avio_wb64(pb, av_double2int(codec->i_quant_factor)); + avio_wb64(pb, av_double2int(codec->b_quant_factor)); + avio_wb64(pb, av_double2int(codec->i_quant_offset)); + avio_wb64(pb, av_double2int(codec->b_quant_offset)); avio_wb32(pb, codec->dct_algo); avio_wb32(pb, codec->strict_std_compliance); avio_wb32(pb, codec->max_b_frames); @@ -151,22 +152,20 @@ avio_wb32(pb, codec->mb_decision); avio_wb32(pb, codec->nsse_weight); avio_wb32(pb, codec->frame_skip_cmp); - avio_wb64(pb, av_dbl2int(codec->rc_buffer_aggressivity)); + avio_wb64(pb, av_double2int(codec->rc_buffer_aggressivity)); avio_wb32(pb, codec->codec_tag); avio_w8(pb, codec->thread_count); avio_wb32(pb, codec->coder_type); avio_wb32(pb, codec->me_cmp); - avio_wb32(pb, codec->partitions); avio_wb32(pb, codec->me_subpel_quality); avio_wb32(pb, codec->me_range); avio_wb32(pb, codec->keyint_min); avio_wb32(pb, codec->scenechange_threshold); avio_wb32(pb, codec->b_frame_strategy); - avio_wb64(pb, av_dbl2int(codec->qcompress)); - avio_wb64(pb, av_dbl2int(codec->qblur)); + avio_wb64(pb, av_double2int(codec->qcompress)); + avio_wb64(pb, av_double2int(codec->qblur)); avio_wb32(pb, codec->max_qdiff); avio_wb32(pb, codec->refs); - avio_wb32(pb, codec->directpred); break; case AVMEDIA_TYPE_AUDIO: avio_wb32(pb, codec->sample_rate); @@ -241,15 +240,14 @@ } AVOutputFormat ff_ffm_muxer = { - "ffm", - NULL_IF_CONFIG_SMALL("FFM (FFserver live feed) format"), - "", - "ffm", - sizeof(FFMContext), - /* not really used */ - CODEC_ID_MP2, - CODEC_ID_MPEG1VIDEO, - ffm_write_header, - ffm_write_packet, - ffm_write_trailer, + .name = "ffm", + .long_name = NULL_IF_CONFIG_SMALL("FFM (AVserver live feed) format"), + .mime_type = "", + .extensions = "ffm", + .priv_data_size = sizeof(FFMContext), + .audio_codec = CODEC_ID_MP2, + .video_codec = CODEC_ID_MPEG1VIDEO, + .write_header = ffm_write_header, + .write_packet = ffm_write_packet, + .write_trailer = ffm_write_trailer, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ffmetadec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ffmetadec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ffmetadec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ffmetadec.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/mathematics.h" #include "avformat.h" #include "ffmeta.h" #include "internal.h" @@ -74,7 +75,7 @@ end = AV_NOPTS_VALUE; } - return ff_new_chapter(s, s->nb_chapters, tb, start, end, NULL); + return avpriv_new_chapter(s, s->nb_chapters, tb, start, end, NULL); } static uint8_t *unescape(uint8_t *buf, int size) @@ -131,7 +132,7 @@ get_line(s->pb, line, sizeof(line)); if (!memcmp(line, ID_STREAM, strlen(ID_STREAM))) { - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); if (!st) return -1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ffm.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ffm.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ffm.h 2011-04-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ffm.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * FFM (ffserver live feed) common header + * FFM (avserver live feed) common header * Copyright (c) 2001 Fabrice Bellard * * This file is part of Libav. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/file.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/file.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/file.c 2011-05-05 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/file.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Buffered file io for ffmpeg system + * buffered file I/O * Copyright (c) 2001 Fabrice Bellard * * This file is part of Libav. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/filmstripdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/filmstripdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/filmstripdec.c 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/filmstripdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define RAND_TAG MKBETAG('R','a','n','d') @@ -49,7 +50,7 @@ return AVERROR_INVALIDDATA; } - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -67,7 +68,7 @@ st->codec->width = avio_rb16(pb); st->codec->height = avio_rb16(pb); film->leading = avio_rb16(pb); - av_set_pts_info(st, 64, 1, avio_rb16(pb)); + avpriv_set_pts_info(st, 64, 1, avio_rb16(pb)); avio_seek(pb, 0, SEEK_SET); @@ -99,13 +100,11 @@ } AVInputFormat ff_filmstrip_demuxer = { - "filmstrip", - NULL_IF_CONFIG_SMALL("Adobe Filmstrip"), - sizeof(FilmstripDemuxContext), - NULL, - read_header, - read_packet, - NULL, - read_seek, + .name = "filmstrip", + .long_name = NULL_IF_CONFIG_SMALL("Adobe Filmstrip"), + .priv_data_size = sizeof(FilmstripDemuxContext), + .read_header = read_header, + .read_packet = read_packet, + .read_seek = read_seek, .extensions = "flm", }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/filmstripenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/filmstripenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/filmstripenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/filmstripenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -72,14 +72,13 @@ } AVOutputFormat ff_filmstrip_muxer = { - "filmstrip", - NULL_IF_CONFIG_SMALL("Adobe Filmstrip"), - NULL, - "flm", - sizeof(FilmstripMuxContext), - CODEC_ID_NONE, - CODEC_ID_RAWVIDEO, - write_header, - write_packet, - write_trailer, + .name = "filmstrip", + .long_name = NULL_IF_CONFIG_SMALL("Adobe Filmstrip"), + .extensions = "flm", + .priv_data_size = sizeof(FilmstripMuxContext), + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_RAWVIDEO, + .write_header = write_header, + .write_packet = write_packet, + .write_trailer = write_trailer, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flacdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flacdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flacdec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flacdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,9 +21,11 @@ #include "libavcodec/flac.h" #include "avformat.h" +#include "internal.h" #include "rawdec.h" #include "oggdec.h" #include "vorbiscomment.h" +#include "libavcodec/bytestream.h" static int flac_read_header(AVFormatContext *s, AVFormatParameters *ap) @@ -31,7 +33,7 @@ int ret, metadata_last=0, metadata_type, metadata_size, found_streaminfo=0; uint8_t header[4]; uint8_t *buffer=NULL; - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -48,11 +50,12 @@ /* process metadata blocks */ while (!s->pb->eof_reached && !metadata_last) { avio_read(s->pb, header, 4); - ff_flac_parse_block_header(header, &metadata_last, &metadata_type, + avpriv_flac_parse_block_header(header, &metadata_last, &metadata_type, &metadata_size); switch (metadata_type) { /* allocate and read metadata block for supported types */ case FLAC_METADATA_TYPE_STREAMINFO: + case FLAC_METADATA_TYPE_CUESHEET: case FLAC_METADATA_TYPE_VORBIS_COMMENT: buffer = av_mallocz(metadata_size + FF_INPUT_BUFFER_PADDING_SIZE); if (!buffer) { @@ -87,14 +90,38 @@ buffer = NULL; /* get codec params from STREAMINFO header */ - ff_flac_parse_streaminfo(st->codec, &si, st->codec->extradata); + avpriv_flac_parse_streaminfo(st->codec, &si, st->codec->extradata); /* set time base and duration */ if (si.samplerate > 0) { - av_set_pts_info(st, 64, 1, si.samplerate); + avpriv_set_pts_info(st, 64, 1, si.samplerate); if (si.samples > 0) st->duration = si.samples; } + } else if (metadata_type == FLAC_METADATA_TYPE_CUESHEET) { + uint8_t isrc[13]; + uint64_t start; + const uint8_t *offset; + int i, chapters, track, ti; + if (metadata_size < 431) + return AVERROR_INVALIDDATA; + offset = buffer + 395; + chapters = bytestream_get_byte(&offset) - 1; + if (chapters <= 0) + return AVERROR_INVALIDDATA; + for (i = 0; i < chapters; i++) { + if (offset + 36 - buffer > metadata_size) + return AVERROR_INVALIDDATA; + start = bytestream_get_be64(&offset); + track = bytestream_get_byte(&offset); + bytestream_get_buffer(&offset, isrc, 12); + isrc[12] = 0; + offset += 14; + ti = bytestream_get_byte(&offset); + if (ti <= 0) return AVERROR_INVALIDDATA; + offset += ti * 12; + avpriv_new_chapter(s, track, st->time_base, start, AV_NOPTS_VALUE, isrc); + } } else { /* STREAMINFO must be the first block */ if (!found_streaminfo) { @@ -124,12 +151,11 @@ } AVInputFormat ff_flac_demuxer = { - "flac", - NULL_IF_CONFIG_SMALL("raw FLAC"), - 0, - flac_probe, - flac_read_header, - ff_raw_read_partial_packet, + .name = "flac", + .long_name = NULL_IF_CONFIG_SMALL("raw FLAC"), + .read_probe = flac_probe, + .read_header = flac_read_header, + .read_packet = ff_raw_read_partial_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "flac", .value = CODEC_ID_FLAC, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flacenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flacenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flacenc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flacenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -41,7 +41,7 @@ static int flac_write_block_comment(AVIOContext *pb, AVDictionary **m, int last_block, int bitexact) { - const char *vendor = bitexact ? "ffmpeg" : LIBAVFORMAT_IDENT; + const char *vendor = bitexact ? "Libav" : LIBAVFORMAT_IDENT; unsigned int len, count; uint8_t *p, *p0; @@ -94,7 +94,7 @@ enum FLACExtradataFormat format; int64_t file_size; - if (!ff_flac_is_extradata_valid(s->streams[0]->codec, &format, &streaminfo)) + if (!avpriv_flac_is_extradata_valid(s->streams[0]->codec, &format, &streaminfo)) return -1; if (pb->seekable) { @@ -118,15 +118,14 @@ } AVOutputFormat ff_flac_muxer = { - "flac", - NULL_IF_CONFIG_SMALL("raw FLAC"), - "audio/x-flac", - "flac", - 0, - CODEC_ID_FLAC, - CODEC_ID_NONE, - flac_write_header, - flac_write_packet, - flac_write_trailer, + .name = "flac", + .long_name = NULL_IF_CONFIG_SMALL("raw FLAC"), + .mime_type = "audio/x-flac", + .extensions = "flac", + .audio_codec = CODEC_ID_FLAC, + .video_codec = CODEC_ID_NONE, + .write_header = flac_write_header, + .write_packet = flac_write_packet, + .write_trailer = flac_write_trailer, .flags= AVFMT_NOTIMESTAMPS, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flacenc_header.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flacenc_header.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flacenc_header.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flacenc_header.c 2012-01-11 00:34:30.000000000 +0000 @@ -34,16 +34,14 @@ enum FLACExtradataFormat format; header[4] = last_block ? 0x80 : 0x00; - if (!ff_flac_is_extradata_valid(codec, &format, &streaminfo)) + if (!avpriv_flac_is_extradata_valid(codec, &format, &streaminfo)) return -1; - /* write "fLaC" stream marker and first metadata block header if needed */ - if (format == FLAC_EXTRADATA_FORMAT_STREAMINFO) { - avio_write(pb, header, 8); - } + /* write "fLaC" stream marker and first metadata block header */ + avio_write(pb, header, 8); - /* write STREAMINFO or full header */ - avio_write(pb, codec->extradata, codec->extradata_size); + /* write STREAMINFO */ + avio_write(pb, streaminfo, FLAC_STREAMINFO_SIZE); return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flic.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flic.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flic.c 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flic.c 2012-01-11 00:34:30.000000000 +0000 @@ -34,6 +34,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/audioconvert.h" #include "avformat.h" +#include "internal.h" #define FLIC_FILE_MAGIC_1 0xAF11 #define FLIC_FILE_MAGIC_2 0xAF12 @@ -105,7 +106,7 @@ speed = FLIC_DEFAULT_SPEED; /* initialize the decoder streams */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); flic->video_stream_index = st->index; @@ -145,7 +146,7 @@ */ if (AV_RL16(&preamble[4]) == FLIC_TFTD_CHUNK_AUDIO) { /* TFTD videos have an extra 22050 Hz 8-bit mono audio stream */ - ast = av_new_stream(s, 1); + ast = avformat_new_stream(s, NULL); if (!ast) return AVERROR(ENOMEM); @@ -167,10 +168,10 @@ /* Since the header information is incorrect we have to figure out the * framerate using block_align and the fact that the audio is 22050 Hz. * We usually have two cases: 2205 -> 10 fps and 1470 -> 15 fps */ - av_set_pts_info(st, 64, ast->codec->block_align, FLIC_TFTD_SAMPLE_RATE); - av_set_pts_info(ast, 64, 1, FLIC_TFTD_SAMPLE_RATE); + avpriv_set_pts_info(st, 64, ast->codec->block_align, FLIC_TFTD_SAMPLE_RATE); + avpriv_set_pts_info(ast, 64, 1, FLIC_TFTD_SAMPLE_RATE); } else if (AV_RL16(&header[0x10]) == FLIC_CHUNK_MAGIC_1) { - av_set_pts_info(st, 64, FLIC_MC_SPEED, 70); + avpriv_set_pts_info(st, 64, FLIC_MC_SPEED, 70); /* rewind the stream since the first chunk is at offset 12 */ avio_seek(pb, 12, SEEK_SET); @@ -182,10 +183,10 @@ memcpy(st->codec->extradata, header, 12); } else if (magic_number == FLIC_FILE_MAGIC_1) { - av_set_pts_info(st, 64, speed, 70); + avpriv_set_pts_info(st, 64, speed, 70); } else if ((magic_number == FLIC_FILE_MAGIC_2) || (magic_number == FLIC_FILE_MAGIC_3)) { - av_set_pts_info(st, 64, speed, 1000); + avpriv_set_pts_info(st, 64, speed, 1000); } else { av_log(s, AV_LOG_INFO, "Invalid or unsupported magic chunk in file\n"); return AVERROR_INVALIDDATA; @@ -261,10 +262,10 @@ } AVInputFormat ff_flic_demuxer = { - "flic", - NULL_IF_CONFIG_SMALL("FLI/FLC/FLX animation format"), - sizeof(FlicDemuxContext), - flic_probe, - flic_read_header, - flic_read_packet, + .name = "flic", + .long_name = NULL_IF_CONFIG_SMALL("FLI/FLC/FLX animation format"), + .priv_data_size = sizeof(FlicDemuxContext), + .read_probe = flic_probe, + .read_header = flic_read_header, + .read_packet = flic_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flvdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flvdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flvdec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flvdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,9 +26,12 @@ #include "libavutil/avstring.h" #include "libavutil/dict.h" +#include "libavutil/intfloat.h" +#include "libavutil/mathematics.h" #include "libavcodec/bytestream.h" #include "libavcodec/mpeg4audio.h" #include "avformat.h" +#include "internal.h" #include "avio_internal.h" #include "flv.h" @@ -38,6 +41,10 @@ typedef struct { int wrong_dts; ///< wrong dts due to negative cts + uint8_t *new_extradata[2]; + int new_extradata_size[2]; + int last_sample_rate; + int last_channels; } FLVContext; static int flv_probe(AVProbeData *p) @@ -51,8 +58,7 @@ return 0; } -static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, int flv_codecid) { - AVCodecContext *acodec = astream->codec; +static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, AVCodecContext *acodec, int flv_codecid) { switch(flv_codecid) { //no distinction between S16 and S8 PCM codec flags case FLV_CODECID_PCM: @@ -138,6 +144,18 @@ int64_t *filepositions = NULL; int ret = AVERROR(ENOSYS); int64_t initial_pos = avio_tell(ioc); + AVDictionaryEntry *creator = av_dict_get(s->metadata, "metadatacreator", + NULL, 0); + + if (creator && !strcmp(creator->value, "MEGA")) { + /* Files with this metadatacreator tag seem to have filepositions + * pointing at the 4 trailer bytes of the previous packet, + * which isn't the norm (nor what we expect here, nor what + * jwplayer + lighttpd expect, nor what flvtool2 produces). + * Just ignore the index in this case, instead of risking trying + * to adjust it to something that might or might not work. */ + return 0; + } while (avio_tell(ioc) < max_pos - 2 && amf_get_string(ioc, str_val, sizeof(str_val)) > 0) { int64_t* current_array; @@ -147,6 +165,9 @@ break; arraylen = avio_rb32(ioc); + if (arraylen >> 28) + break; + /* * Expect only 'times' or 'filepositions' sub-arrays in other case refuse to use such metadata * for indexing @@ -171,7 +192,7 @@ for (i = 0; i < arraylen && avio_tell(ioc) < max_pos - 1; i++) { if (avio_r8(ioc) != AMF_DATA_TYPE_NUMBER) goto finish; - num_val = av_int2dbl(avio_rb64(ioc)); + num_val = av_int2double(avio_rb64(ioc)); current_array[i] = num_val; } if (times && filepositions) { @@ -182,8 +203,8 @@ } } - if (timeslen == fileposlen) - for(i = 0; i < arraylen; i++) + if (!ret && timeslen == fileposlen) + for (i = 0; i < fileposlen; i++) av_add_index_entry(vstream, filepositions[i], times[i]*1000, 0, 0, AVINDEX_KEYFRAME); else av_log(s, AV_LOG_WARNING, "Invalid keyframes object, skipping.\n"); @@ -212,7 +233,7 @@ switch(amf_type) { case AMF_DATA_TYPE_NUMBER: - num_val = av_int2dbl(avio_rb64(ioc)); break; + num_val = av_int2double(avio_rb64(ioc)); break; case AMF_DATA_TYPE_BOOL: num_val = avio_r8(ioc); break; case AMF_DATA_TYPE_STRING: @@ -222,8 +243,9 @@ case AMF_DATA_TYPE_OBJECT: { unsigned int keylen; - if (key && !strcmp(KEYFRAMES_TAG, key) && depth == 1) - if (parse_keyframes_index(s, ioc, vstream, max_pos) < 0) + if ((vstream || astream) && key && !strcmp(KEYFRAMES_TAG, key) && depth == 1) + if (parse_keyframes_index(s, ioc, vstream ? vstream : astream, + max_pos) < 0) return -1; while(avio_tell(ioc) < max_pos - 2 && (keylen = avio_rb16(ioc))) { @@ -270,17 +292,35 @@ acodec = astream ? astream->codec : NULL; vcodec = vstream ? vstream->codec : NULL; + if (amf_type == AMF_DATA_TYPE_NUMBER) { + if (!strcmp(key, "duration")) + s->duration = num_val * AV_TIME_BASE; + else if (!strcmp(key, "videodatarate") && vcodec && 0 <= (int)(num_val * 1024.0)) + vcodec->bit_rate = num_val * 1024.0; + else if (!strcmp(key, "audiodatarate") && acodec && 0 <= (int)(num_val * 1024.0)) + acodec->bit_rate = num_val * 1024.0; + } + + if (!strcmp(key, "duration") || + !strcmp(key, "filesize") || + !strcmp(key, "width") || + !strcmp(key, "height") || + !strcmp(key, "videodatarate") || + !strcmp(key, "framerate") || + !strcmp(key, "videocodecid") || + !strcmp(key, "audiodatarate") || + !strcmp(key, "audiosamplerate") || + !strcmp(key, "audiosamplesize") || + !strcmp(key, "stereo") || + !strcmp(key, "audiocodecid")) + return 0; + if(amf_type == AMF_DATA_TYPE_BOOL) { av_strlcpy(str_val, num_val > 0 ? "true" : "false", sizeof(str_val)); av_dict_set(&s->metadata, key, str_val, 0); } else if(amf_type == AMF_DATA_TYPE_NUMBER) { snprintf(str_val, sizeof(str_val), "%.f", num_val); av_dict_set(&s->metadata, key, str_val, 0); - if(!strcmp(key, "duration")) s->duration = num_val * AV_TIME_BASE; - else if(!strcmp(key, "videodatarate") && vcodec && 0 <= (int)(num_val * 1024.0)) - vcodec->bit_rate = num_val * 1024.0; - else if(!strcmp(key, "audiodatarate") && acodec && 0 <= (int)(num_val * 1024.0)) - acodec->bit_rate = num_val * 1024.0; } else if (amf_type == AMF_DATA_TYPE_STRING) av_dict_set(&s->metadata, key, str_val, 0); } @@ -319,11 +359,12 @@ } static AVStream *create_stream(AVFormatContext *s, int is_audio){ - AVStream *st = av_new_stream(s, is_audio); + AVStream *st = avformat_new_stream(s, NULL); if (!st) return NULL; + st->id = is_audio; st->codec->codec_type = is_audio ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO; - av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */ + avpriv_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */ return st; } @@ -363,6 +404,14 @@ return 0; } +static int flv_read_close(AVFormatContext *s) +{ + FLVContext *flv = s->priv_data; + av_freep(&flv->new_extradata[0]); + av_freep(&flv->new_extradata[1]); + return 0; +} + static int flv_get_extradata(AVFormatContext *s, AVStream *st, int size) { av_free(st->codec->extradata); @@ -374,12 +423,25 @@ return 0; } +static int flv_queue_extradata(FLVContext *flv, AVIOContext *pb, int stream, + int size) +{ + av_free(flv->new_extradata[stream]); + flv->new_extradata[stream] = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE); + if (!flv->new_extradata[stream]) + return AVERROR(ENOMEM); + flv->new_extradata_size[stream] = size; + avio_read(pb, flv->new_extradata[stream], size); + return 0; +} + static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) { FLVContext *flv = s->priv_data; int ret, i, type, size, flags, is_audio; int64_t next, pos; int64_t dts, pts = AV_NOPTS_VALUE; + int sample_rate = 0, channels = 0; AVStream *st = NULL; for(;;avio_skip(s->pb, 4)){ /* pkt size is repeated at end. skip it */ @@ -464,13 +526,24 @@ } if(is_audio){ + int bits_per_coded_sample; + channels = (flags & FLV_AUDIO_CHANNEL_MASK) == FLV_STEREO ? 2 : 1; + sample_rate = (44100 << ((flags & FLV_AUDIO_SAMPLERATE_MASK) >> FLV_AUDIO_SAMPLERATE_OFFSET) >> 3); + bits_per_coded_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8; if(!st->codec->channels || !st->codec->sample_rate || !st->codec->bits_per_coded_sample) { - st->codec->channels = (flags & FLV_AUDIO_CHANNEL_MASK) == FLV_STEREO ? 2 : 1; - st->codec->sample_rate = (44100 << ((flags & FLV_AUDIO_SAMPLERATE_MASK) >> FLV_AUDIO_SAMPLERATE_OFFSET) >> 3); - st->codec->bits_per_coded_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8; + st->codec->channels = channels; + st->codec->sample_rate = sample_rate; + st->codec->bits_per_coded_sample = bits_per_coded_sample; } if(!st->codec->codec_id){ - flv_set_audio_codec(s, st, flags & FLV_AUDIO_CODECID_MASK); + flv_set_audio_codec(s, st, st->codec, flags & FLV_AUDIO_CODECID_MASK); + flv->last_sample_rate = st->codec->sample_rate; + flv->last_channels = st->codec->channels; + } else { + AVCodecContext ctx; + ctx.sample_rate = sample_rate; + flv_set_audio_codec(s, st, &ctx, flags & FLV_AUDIO_CODECID_MASK); + sample_rate = ctx.sample_rate; } }else{ size -= flv_set_video_codec(s, st, flags & FLV_VIDEO_CODECID_MASK); @@ -491,12 +564,18 @@ dts = AV_NOPTS_VALUE; } if (type == 0) { + if (st->codec->extradata) { + if ((ret = flv_queue_extradata(flv, s->pb, is_audio, size)) < 0) + return ret; + ret = AVERROR(EAGAIN); + goto leave; + } if ((ret = flv_get_extradata(s, st, size)) < 0) return ret; if (st->codec->codec_id == CODEC_ID_AAC) { MPEG4AudioConfig cfg; - ff_mpeg4audio_get_config(&cfg, st->codec->extradata, - st->codec->extradata_size); + avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata, + st->codec->extradata_size * 8, 1); st->codec->channels = cfg.channels; if (cfg.ext_sample_rate) st->codec->sample_rate = cfg.ext_sample_rate; @@ -527,6 +606,22 @@ pkt->dts = dts; pkt->pts = pts == AV_NOPTS_VALUE ? dts : pts; pkt->stream_index = st->index; + if (flv->new_extradata[is_audio]) { + uint8_t *side = av_packet_new_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, + flv->new_extradata_size[is_audio]); + if (side) { + memcpy(side, flv->new_extradata[is_audio], + flv->new_extradata_size[is_audio]); + av_freep(&flv->new_extradata[is_audio]); + flv->new_extradata_size[is_audio] = 0; + } + } + if (is_audio && (sample_rate != flv->last_sample_rate || + channels != flv->last_channels)) { + flv->last_sample_rate = sample_rate; + flv->last_channels = channels; + ff_add_param_change(pkt, channels, 0, sample_rate, 0, 0); + } if (is_audio || ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY)) pkt->flags |= AV_PKT_FLAG_KEY; @@ -570,16 +665,17 @@ #endif AVInputFormat ff_flv_demuxer = { - "flv", - NULL_IF_CONFIG_SMALL("FLV format"), - sizeof(FLVContext), - flv_probe, - flv_read_header, - flv_read_packet, + .name = "flv", + .long_name = NULL_IF_CONFIG_SMALL("FLV format"), + .priv_data_size = sizeof(FLVContext), + .read_probe = flv_probe, + .read_header = flv_read_header, + .read_packet = flv_read_packet, .read_seek = flv_read_seek, #if 0 .read_seek2 = flv_read_seek2, #endif + .read_close = flv_read_close, .extensions = "flv", .value = CODEC_ID_FLV1, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flvenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flvenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flvenc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flvenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -18,6 +18,8 @@ * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "libavutil/intfloat.h" #include "avformat.h" #include "flv.h" #include "internal.h" @@ -55,10 +57,13 @@ int64_t duration_offset; int64_t filesize_offset; int64_t duration; - int delay; ///< first dts delay for AVC - int64_t last_video_ts; + int64_t delay; ///< first dts delay (needed for AVC & Speex) } FLVContext; +typedef struct FLVStreamContext { + int64_t last_ts; ///< last timestamp for each stream +} FLVStreamContext; + static int get_audio_flags(AVCodecContext *enc){ int flags = (enc->bits_per_coded_sample == 16) ? FLV_SAMPLESSIZE_16BIT : FLV_SAMPLESSIZE_8BIT; @@ -73,11 +78,6 @@ av_log(enc, AV_LOG_ERROR, "flv only supports mono Speex audio\n"); return -1; } - if (enc->frame_size / 320 > 8) { - av_log(enc, AV_LOG_WARNING, "Warning: Speex stream has more than " - "8 frames per packet. Adobe Flash " - "Player cannot handle this!\n"); - } return FLV_CODECID_SPEEX | FLV_SAMPLERATE_11025HZ | FLV_SAMPLESSIZE_16BIT; } else { switch (enc->sample_rate) { @@ -90,6 +90,7 @@ case 11025: flags |= FLV_SAMPLERATE_11025HZ; break; + case 16000: //nellymoser only case 8000: //nellymoser only case 5512: //not mp3 if(enc->codec_id != CODEC_ID_MP3){ @@ -125,6 +126,8 @@ case CODEC_ID_NELLYMOSER: if (enc->sample_rate == 8000) { flags |= FLV_CODECID_NELLYMOSER_8KHZ_MONO | FLV_SAMPLESSIZE_16BIT; + } else if (enc->sample_rate == 16000) { + flags |= FLV_CODECID_NELLYMOSER_16KHZ_MONO | FLV_SAMPLESSIZE_16BIT; } else { flags |= FLV_CODECID_NELLYMOSER | FLV_SAMPLESSIZE_16BIT; } @@ -162,7 +165,7 @@ static void put_amf_double(AVIOContext *pb, double d) { avio_w8(pb, AMF_DATA_TYPE_NUMBER); - avio_wb64(pb, av_dbl2int(d)); + avio_wb64(pb, av_double2int(d)); } static void put_amf_bool(AVIOContext *pb, int b) { @@ -175,13 +178,14 @@ AVIOContext *pb = s->pb; FLVContext *flv = s->priv_data; AVCodecContext *audio_enc = NULL, *video_enc = NULL; - int i; + int i, metadata_count = 0; double framerate = 0.0; - int metadata_size_pos, data_size; + int64_t metadata_size_pos, data_size, metadata_count_pos; AVDictionaryEntry *tag = NULL; for(i=0; inb_streams; i++){ AVCodecContext *enc = s->streams[i]->codec; + FLVStreamContext *sc; if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { if (s->streams[i]->r_frame_rate.den && s->streams[i]->r_frame_rate.num) { framerate = av_q2d(s->streams[i]->r_frame_rate); @@ -198,8 +202,16 @@ if(get_audio_flags(enc)<0) return -1; } - av_set_pts_info(s->streams[i], 32, 1, 1000); /* 32 bit pts in ms */ + avpriv_set_pts_info(s->streams[i], 32, 1, 1000); /* 32 bit pts in ms */ + + sc = av_mallocz(sizeof(FLVStreamContext)); + if (!sc) + return AVERROR(ENOMEM); + s->streams[i]->priv_data = sc; + sc->last_ts = -1; } + flv->delay = AV_NOPTS_VALUE; + avio_write(pb, "FLV", 3); avio_w8(pb,1); avio_w8(pb, FLV_HEADER_FLAG_HASAUDIO * !!audio_enc @@ -218,8 +230,6 @@ } } - flv->last_video_ts = -1; - /* write meta_tag */ avio_w8(pb, 18); // tag type META metadata_size_pos= avio_tell(pb); @@ -235,7 +245,9 @@ /* mixed array (hash) with size and string/type/data tuples */ avio_w8(pb, AMF_DATA_TYPE_MIXEDARRAY); - avio_wb32(pb, 5*!!video_enc + 5*!!audio_enc + 2); // +2 for duration and file size + metadata_count_pos = avio_tell(pb); + metadata_count = 5*!!video_enc + 5*!!audio_enc + 2; // +2 for duration and file size + avio_wb32(pb, metadata_count); put_amf_string(pb, "duration"); flv->duration_offset= avio_tell(pb); @@ -279,6 +291,7 @@ put_amf_string(pb, tag->key); avio_w8(pb, AMF_DATA_TYPE_STRING); put_amf_string(pb, tag->value); + metadata_count++; } put_amf_string(pb, "filesize"); @@ -290,6 +303,10 @@ /* write total size of tag */ data_size= avio_tell(pb) - metadata_size_pos - 10; + + avio_seek(pb, metadata_count_pos, SEEK_SET); + avio_wb32(pb, metadata_count); + avio_seek(pb, metadata_size_pos, SEEK_SET); avio_wb24(pb, data_size); avio_skip(pb, data_size + 10 - 3); @@ -338,15 +355,16 @@ /* Add EOS tag */ for (i = 0; i < s->nb_streams; i++) { AVCodecContext *enc = s->streams[i]->codec; + FLVStreamContext *sc = s->streams[i]->priv_data; if (enc->codec_type == AVMEDIA_TYPE_VIDEO && enc->codec_id == CODEC_ID_H264) { - put_avc_eos_tag(pb, flv->last_video_ts); + put_avc_eos_tag(pb, sc->last_ts); } } file_size = avio_tell(pb); - /* update informations */ + /* update information */ avio_seek(pb, flv->duration_offset, SEEK_SET); put_amf_double(pb, flv->duration / (double)1000); avio_seek(pb, flv->filesize_offset, SEEK_SET); @@ -361,6 +379,7 @@ AVIOContext *pb = s->pb; AVCodecContext *enc = s->streams[pkt->stream_index]->codec; FLVContext *flv = s->priv_data; + FLVStreamContext *sc = s->streams[pkt->stream_index]->priv_data; unsigned ts; int size= pkt->size; uint8_t *data= NULL; @@ -396,20 +415,32 @@ } if (enc->codec_id == CODEC_ID_H264) { - /* check if extradata looks like mp4 formated */ + /* check if extradata looks like MP4 */ if (enc->extradata_size > 0 && *(uint8_t*)enc->extradata != 1) { if (ff_avc_parse_nal_units_buf(pkt->data, &data, &size) < 0) return -1; } - if (!flv->delay && pkt->dts < 0) - flv->delay = -pkt->dts; + } + if (flv->delay == AV_NOPTS_VALUE) + flv->delay = -pkt->dts; + if (pkt->dts < -flv->delay) { + av_log(s, AV_LOG_WARNING, "Packets are not in the proper order with " + "respect to DTS\n"); + return AVERROR(EINVAL); } ts = pkt->dts + flv->delay; // add delay to force positive dts - if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { - if (flv->last_video_ts < ts) - flv->last_video_ts = ts; + + /* check Speex packet duration */ + if (enc->codec_id == CODEC_ID_SPEEX && ts - sc->last_ts > 160) { + av_log(s, AV_LOG_WARNING, "Warning: Speex stream has more than " + "8 frames per packet. Adobe Flash " + "Player cannot handle this!\n"); } + + if (sc->last_ts < ts) + sc->last_ts = ts; + avio_wb24(pb,size + flags_size); avio_wb24(pb,ts); avio_w8(pb,(ts >> 24) & 0x7F); // timestamps are 32bits _signed_ @@ -439,20 +470,20 @@ } AVOutputFormat ff_flv_muxer = { - "flv", - NULL_IF_CONFIG_SMALL("FLV format"), - "video/x-flv", - "flv", - sizeof(FLVContext), + .name = "flv", + .long_name = NULL_IF_CONFIG_SMALL("FLV format"), + .mime_type = "video/x-flv", + .extensions = "flv", + .priv_data_size = sizeof(FLVContext), #if CONFIG_LIBMP3LAME - CODEC_ID_MP3, + .audio_codec = CODEC_ID_MP3, #else // CONFIG_LIBMP3LAME - CODEC_ID_ADPCM_SWF, + .audio_codec = CODEC_ID_ADPCM_SWF, #endif // CONFIG_LIBMP3LAME - CODEC_ID_FLV1, - flv_write_header, - flv_write_packet, - flv_write_trailer, + .video_codec = CODEC_ID_FLV1, + .write_header = flv_write_header, + .write_packet = flv_write_packet, + .write_trailer = flv_write_trailer, .codec_tag= (const AVCodecTag* const []){flv_video_codec_ids, flv_audio_codec_ids, 0}, .flags= AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flv.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flv.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/flv.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/flv.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,4 @@ -/** - * @file +/* * FLV common header * * Copyright (c) 2006 The Libav Project @@ -21,6 +20,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * FLV common header + */ + #ifndef AVFORMAT_FLV_H #define AVFORMAT_FLV_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/framecrcenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/framecrcenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/framecrcenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/framecrcenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -34,14 +34,11 @@ } AVOutputFormat ff_framecrc_muxer = { - "framecrc", - NULL_IF_CONFIG_SMALL("framecrc testing format"), - NULL, - "", - 0, - CODEC_ID_PCM_S16LE, - CODEC_ID_RAWVIDEO, - NULL, - framecrc_write_packet, - NULL, + .name = "framecrc", + .long_name = NULL_IF_CONFIG_SMALL("framecrc testing format"), + .extensions = "", + .audio_codec = CODEC_ID_PCM_S16LE, + .video_codec = CODEC_ID_RAWVIDEO, + .write_packet = framecrc_write_packet, + .flags = AVFMT_VARIABLE_FPS, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/gif.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/gif.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/gif.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/gif.c 2012-01-11 00:34:30.000000000 +0000 @@ -40,6 +40,8 @@ */ #include "avformat.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" /* The GIF format uses reversed order for bitstreams... */ /* at least they don't use PDP_ENDIAN :) */ @@ -245,8 +247,10 @@ } typedef struct { + AVClass *class; /** Class for private options. */ int64_t time, file_time; uint8_t buffer[100]; /* data chunks */ + int loop; } GIFContext; static int gif_write_header(AVFormatContext *s) @@ -254,7 +258,7 @@ GIFContext *gif = s->priv_data; AVIOContext *pb = s->pb; AVCodecContext *enc, *video_enc; - int i, width, height, loop_count /*, rate*/; + int i, width, height /*, rate*/; /* XXX: do we reject audio streams or just ignore them ? if(s->nb_streams > 1) @@ -276,7 +280,6 @@ } else { width = video_enc->width; height = video_enc->height; - loop_count = s->loop_output; // rate = video_enc->time_base.den; } @@ -285,7 +288,12 @@ return AVERROR(EIO); } - gif_image_write_header(pb, width, height, loop_count, NULL); +#if FF_API_LOOP_OUTPUT + if (s->loop_output) + gif->loop = s->loop_output; +#endif + + gif_image_write_header(pb, width, height, gif->loop, NULL); avio_flush(s->pb); return 0; @@ -340,15 +348,30 @@ return 0; } +#define OFFSET(x) offsetof(GIFContext, x) +#define ENC AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "loop", "Number of times to loop the output.", OFFSET(loop), AV_OPT_TYPE_INT, {0}, 0, 65535, ENC }, + { NULL }, +}; + +static const AVClass gif_muxer_class = { + .class_name = "GIF muxer", + .item_name = av_default_item_name, + .version = LIBAVUTIL_VERSION_INT, + .option = options, +}; + AVOutputFormat ff_gif_muxer = { - "gif", - NULL_IF_CONFIG_SMALL("GIF Animation"), - "image/gif", - "gif", - sizeof(GIFContext), - CODEC_ID_NONE, - CODEC_ID_RAWVIDEO, - gif_write_header, - gif_write_packet, - gif_write_trailer, + .name = "gif", + .long_name = NULL_IF_CONFIG_SMALL("GIF Animation"), + .mime_type = "image/gif", + .extensions = "gif", + .priv_data_size = sizeof(GIFContext), + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_RAWVIDEO, + .write_header = gif_write_header, + .write_packet = gif_write_packet, + .write_trailer = gif_write_trailer, + .priv_class = &gif_muxer_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/gopher.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/gopher.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/gopher.c 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/gopher.c 2012-01-11 00:34:30.000000000 +0000 @@ -72,24 +72,17 @@ ffurl_close(s->hd); s->hd = NULL; } - av_freep(&h->priv_data); return 0; } static int gopher_open(URLContext *h, const char *uri, int flags) { - GopherContext *s; + GopherContext *s = h->priv_data; char hostname[1024], auth[1024], path[1024], buf[1024]; int port, err; h->is_streamed = 1; - s = av_malloc(sizeof(GopherContext)); - if (!s) { - return AVERROR(ENOMEM); - } - h->priv_data = s; - /* needed in any case to build the host string */ av_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, path, sizeof(path), uri); @@ -100,7 +93,8 @@ ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, NULL); s->hd = NULL; - err = ffurl_open(&s->hd, buf, AVIO_FLAG_READ_WRITE); + err = ffurl_open(&s->hd, buf, AVIO_FLAG_READ_WRITE, + &h->interrupt_callback, NULL); if (err < 0) goto fail; @@ -121,9 +115,11 @@ URLProtocol ff_gopher_protocol = { - .name = "gopher", - .url_open = gopher_open, - .url_read = gopher_read, - .url_write = gopher_write, - .url_close = gopher_close, + .name = "gopher", + .url_open = gopher_open, + .url_read = gopher_read, + .url_write = gopher_write, + .url_close = gopher_close, + .priv_data_size = sizeof(GopherContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/gsmdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/gsmdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/gsmdec.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/gsmdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,133 @@ +/* + * RAW GSM demuxer + * Copyright (c) 2011 Justin Ruggles + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/mathematics.h" +#include "libavutil/opt.h" +#include "avformat.h" +#include "internal.h" + +#define GSM_BLOCK_SIZE 33 +#define GSM_BLOCK_SAMPLES 160 +#define GSM_SAMPLE_RATE 8000 + +typedef struct { + AVClass *class; + int sample_rate; +} GSMDemuxerContext; + +static int gsm_read_packet(AVFormatContext *s, AVPacket *pkt) +{ + int ret, size; + + size = GSM_BLOCK_SIZE * 32; + + pkt->pos = avio_tell(s->pb); + pkt->stream_index = 0; + + ret = av_get_packet(s->pb, pkt, size); + if (ret < GSM_BLOCK_SIZE) { + av_free_packet(pkt); + return ret < 0 ? ret : AVERROR(EIO); + } + pkt->size = ret; + pkt->duration = ret / GSM_BLOCK_SIZE; + pkt->pts = pkt->pos / GSM_BLOCK_SIZE; + + return 0; +} + +static int gsm_read_header(AVFormatContext *s, AVFormatParameters *ap) +{ + GSMDemuxerContext *c = s->priv_data; + AVStream *st = avformat_new_stream(s, NULL); + if (!st) + return AVERROR(ENOMEM); + + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; + st->codec->codec_id = s->iformat->value; + st->codec->channels = 1; + st->codec->sample_rate = c->sample_rate; + st->codec->block_align = GSM_BLOCK_SIZE; + st->codec->bit_rate = GSM_BLOCK_SIZE * 8 * c->sample_rate / GSM_BLOCK_SAMPLES; + + avpriv_set_pts_info(st, 64, GSM_BLOCK_SAMPLES, GSM_SAMPLE_RATE); + + return 0; +} + +static int gsm_read_seek2(AVFormatContext *s, int stream_index, int64_t min_ts, + int64_t ts, int64_t max_ts, int flags) +{ + GSMDemuxerContext *c = s->priv_data; + + /* convert timestamps to file positions */ + if (!(flags & AVSEEK_FLAG_BYTE)) { + if (stream_index < 0) { + AVRational bitrate_q = { GSM_BLOCK_SAMPLES, c->sample_rate * GSM_BLOCK_SIZE }; + ts = av_rescale_q(ts, AV_TIME_BASE_Q, bitrate_q); + min_ts = av_rescale_q(min_ts, AV_TIME_BASE_Q, bitrate_q); + max_ts = av_rescale_q(max_ts, AV_TIME_BASE_Q, bitrate_q); + } else { + ts *= GSM_BLOCK_SIZE; + min_ts *= GSM_BLOCK_SIZE; + max_ts *= GSM_BLOCK_SIZE; + } + } + /* round to nearest block boundary */ + ts = (ts + GSM_BLOCK_SIZE / 2) / GSM_BLOCK_SIZE * GSM_BLOCK_SIZE; + ts = FFMAX(0, ts); + + /* handle min/max */ + while (ts < min_ts) + ts += GSM_BLOCK_SIZE; + while (ts > max_ts) + ts -= GSM_BLOCK_SIZE; + if (ts < min_ts || ts > max_ts) + return -1; + + return avio_seek(s->pb, ts, SEEK_SET); +} + +static const AVOption options[] = { + { "sample_rate", "", offsetof(GSMDemuxerContext, sample_rate), + AV_OPT_TYPE_INT, {.dbl = GSM_SAMPLE_RATE}, 1, INT_MAX / GSM_BLOCK_SIZE, + AV_OPT_FLAG_DECODING_PARAM }, + { NULL }, +}; + +static const AVClass class = { + .class_name = "gsm demuxer", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +AVInputFormat ff_gsm_demuxer = { + .name = "gsm", + .long_name = NULL_IF_CONFIG_SMALL("raw GSM"), + .priv_data_size = sizeof(GSMDemuxerContext), + .read_header = gsm_read_header, + .read_packet = gsm_read_packet, + .read_seek2 = gsm_read_seek2, + .extensions = "gsm", + .value = CODEC_ID_GSM, + .priv_class = &class, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/gxf.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/gxf.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/gxf.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/gxf.c 2012-01-11 00:34:30.000000000 +0000 @@ -32,11 +32,11 @@ }; /** - * \brief parses a packet header, extracting type and length - * \param pb AVIOContext to read header from - * \param type detected packet type is stored here - * \param length detected packet length, excluding header is stored here - * \return 0 if header not found or contains invalid data, 1 otherwise + * @brief parses a packet header, extracting type and length + * @param pb AVIOContext to read header from + * @param type detected packet type is stored here + * @param length detected packet length, excluding header is stored here + * @return 0 if header not found or contains invalid data, 1 otherwise */ static int parse_packet_header(AVIOContext *pb, GXFPktType *type, int *length) { if (avio_rb32(pb)) @@ -58,7 +58,7 @@ } /** - * \brief check if file starts with a PKT_MAP header + * @brief check if file starts with a PKT_MAP header */ static int gxf_probe(AVProbeData *p) { static const uint8_t startcode[] = {0, 0, 0, 0, 1, 0xbc}; // start with map packet @@ -70,10 +70,10 @@ } /** - * \brief gets the stream index for the track with the specified id, creates new + * @brief gets the stream index for the track with the specified id, creates new * stream if not found - * \param id id of stream to find / add - * \param format stream format identifier + * @param id id of stream to find / add + * @param format stream format identifier */ static int get_sindex(AVFormatContext *s, int id, int format) { int i; @@ -81,9 +81,10 @@ i = ff_find_stream_index(s, id); if (i >= 0) return i; - st = av_new_stream(s, id); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); + st->id = id; switch (format) { case 3: case 4: @@ -153,9 +154,9 @@ } /** - * \brief filters out interesting tags from material information. - * \param len length of tag section, will be adjusted to contain remaining bytes - * \param si struct to store collected information into + * @brief filters out interesting tags from material information. + * @param len length of tag section, will be adjusted to contain remaining bytes + * @param si struct to store collected information into */ static void gxf_material_tags(AVIOContext *pb, int *len, struct gxf_stream_info *si) { si->first_field = AV_NOPTS_VALUE; @@ -179,20 +180,20 @@ } /** - * \brief convert fps tag value to AVRational fps - * \param fps fps value from tag - * \return fps as AVRational, or 0 / 0 if unknown + * @brief convert fps tag value to AVRational fps + * @param fps fps value from tag + * @return fps as AVRational, or 0 / 0 if unknown */ static AVRational fps_tag2avr(int32_t fps) { - extern const AVRational ff_frame_rate_tab[]; + extern const AVRational avpriv_frame_rate_tab[]; if (fps < 1 || fps > 9) fps = 9; - return ff_frame_rate_tab[9 - fps]; // values have opposite order + return avpriv_frame_rate_tab[9 - fps]; // values have opposite order } /** - * \brief convert UMF attributes flags to AVRational fps - * \param flags UMF flags to convert - * \return fps as AVRational, or 0 / 0 if unknown + * @brief convert UMF attributes flags to AVRational fps + * @param flags UMF flags to convert + * @return fps as AVRational, or 0 / 0 if unknown */ static AVRational fps_umf2avr(uint32_t flags) { static const AVRational map[] = {{50, 1}, {60000, 1001}, {24, 1}, @@ -202,9 +203,9 @@ } /** - * \brief filters out interesting tags from track information. - * \param len length of tag section, will be adjusted to contain remaining bytes - * \param si struct to store collected information into + * @brief filters out interesting tags from track information. + * @param len length of tag section, will be adjusted to contain remaining bytes + * @param si struct to store collected information into */ static void gxf_track_tags(AVIOContext *pb, int *len, struct gxf_stream_info *si) { si->frames_per_second = (AVRational){0, 0}; @@ -228,7 +229,7 @@ } /** - * \brief read index from FLT packet into stream 0 av_index + * @brief read index from FLT packet into stream 0 av_index */ static void gxf_read_index(AVFormatContext *s, int pkt_len) { AVIOContext *pb = s->pb; @@ -264,7 +265,7 @@ int map_len; int len; AVRational main_timebase = {0, 0}; - struct gxf_stream_info si; + struct gxf_stream_info *si = s->priv_data; int i; if (!parse_packet_header(pb, &pkt_type, &map_len) || pkt_type != PKT_MAP) { av_log(s, AV_LOG_ERROR, "map packet not found\n"); @@ -282,7 +283,7 @@ return 0; } map_len -= len; - gxf_material_tags(pb, &len, &si); + gxf_material_tags(pb, &len, si); avio_skip(pb, len); map_len -= 2; len = avio_rb16(pb); // length of track description @@ -300,7 +301,7 @@ track_id = avio_r8(pb); track_len = avio_rb16(pb); len -= track_len; - gxf_track_tags(pb, &track_len, &si); + gxf_track_tags(pb, &track_len, si); avio_skip(pb, track_len); if (!(track_type & 0x80)) { av_log(s, AV_LOG_ERROR, "invalid track type %x\n", track_type); @@ -316,12 +317,12 @@ if (idx < 0) continue; st = s->streams[idx]; if (!main_timebase.num || !main_timebase.den) { - main_timebase.num = si.frames_per_second.den; - main_timebase.den = si.frames_per_second.num * 2; + main_timebase.num = si->frames_per_second.den; + main_timebase.den = si->frames_per_second.num * 2; } - st->start_time = si.first_field; - if (si.first_field != AV_NOPTS_VALUE && si.last_field != AV_NOPTS_VALUE) - st->duration = si.last_field - si.first_field; + st->start_time = si->first_field; + if (si->first_field != AV_NOPTS_VALUE && si->last_field != AV_NOPTS_VALUE) + st->duration = si->last_field - si->first_field; } if (len < 0) av_log(s, AV_LOG_ERROR, "invalid track description length specified\n"); @@ -361,7 +362,7 @@ main_timebase = (AVRational){1001, 60000}; for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; - av_set_pts_info(st, 32, main_timebase.num, main_timebase.den); + avpriv_set_pts_info(st, 32, main_timebase.num, main_timebase.den); } return 0; } @@ -374,11 +375,11 @@ } /** - * \brief resync the stream on the next media packet with specified properties - * \param max_interval how many bytes to search for matching packet at most - * \param track track id the media packet must belong to, -1 for any - * \param timestamp minimum timestamp (== field number) the packet must have, -1 for any - * \return timestamp of packet found + * @brief resync the stream on the next media packet with specified properties + * @param max_interval how many bytes to search for matching packet at most + * @param track track id the media packet must belong to, -1 for any + * @param timestamp minimum timestamp (== field number) the packet must have, -1 for any + * @return timestamp of packet found */ static int64_t gxf_resync_media(AVFormatContext *s, uint64_t max_interval, int track, int timestamp) { uint32_t tmp; @@ -422,6 +423,8 @@ AVIOContext *pb = s->pb; GXFPktType pkt_type; int pkt_len; + struct gxf_stream_info *si = s->priv_data; + while (!pb->eof_reached) { AVStream *st; int track_type, track_id, ret; @@ -473,6 +476,11 @@ avio_skip(pb, skip); pkt->stream_index = stream_index; pkt->dts = field_nr; + + //set duration manually for DV or else lavf misdetects the frame rate + if (st->codec->codec_id == CODEC_ID_DVVIDEO) + pkt->duration = si->fields_per_frame; + return ret; } return AVERROR(EIO); @@ -516,13 +524,12 @@ } AVInputFormat ff_gxf_demuxer = { - "gxf", - NULL_IF_CONFIG_SMALL("GXF format"), - 0, - gxf_probe, - gxf_header, - gxf_packet, - NULL, - gxf_seek, - gxf_read_timestamp, + .name = "gxf", + .long_name = NULL_IF_CONFIG_SMALL("GXF format"), + .priv_data_size = sizeof(struct gxf_stream_info), + .read_probe = gxf_probe, + .read_header = gxf_header, + .read_packet = gxf_packet, + .read_seek = gxf_seek, + .read_timestamp = gxf_read_timestamp, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/gxfenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/gxfenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/gxfenc.c 2011-05-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/gxfenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,7 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/intfloat.h" +#include "libavutil/mathematics.h" #include "avformat.h" +#include "internal.h" #include "gxf.h" #include "riff.h" #include "audiointerleave.h" @@ -392,9 +395,20 @@ GXFContext *gxf = s->priv_data; AVIOContext *pb = s->pb; int timecode_base = gxf->time_base.den == 60000 ? 60 : 50; + int64_t timestamp = 0; + AVDictionaryEntry *t; + uint32_t timecode; + +#if FF_API_TIMESTAMP + if (s->timestamp) + timestamp = s->timestamp; + else +#endif + if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) + timestamp = ff_iso8601_to_unix_time(t->value); // XXX drop frame - uint32_t timecode = + timecode = gxf->nb_fields / (timecode_base * 3600) % 24 << 24 | // hours gxf->nb_fields / (timecode_base * 60) % 60 << 16 | // minutes gxf->nb_fields / timecode_base % 60 << 8 | // seconds @@ -407,8 +421,8 @@ avio_wl32(pb, gxf->nb_fields); /* mark out */ avio_wl32(pb, 0); /* timecode mark in */ avio_wl32(pb, timecode); /* timecode mark out */ - avio_wl64(pb, s->timestamp); /* modification time */ - avio_wl64(pb, s->timestamp); /* creation time */ + avio_wl64(pb, timestamp); /* modification time */ + avio_wl64(pb, timestamp); /* creation time */ avio_wl16(pb, 0); /* reserved */ avio_wl16(pb, 0); /* reserved */ avio_wl16(pb, gxf->audio_tracks); @@ -506,8 +520,8 @@ static int gxf_write_umf_media_audio(AVIOContext *pb, GXFStreamContext *sc) { - avio_wl64(pb, av_dbl2int(1)); /* sound level to begin to */ - avio_wl64(pb, av_dbl2int(1)); /* sound level to begin to */ + avio_wl64(pb, av_double2int(1)); /* sound level to begin to */ + avio_wl64(pb, av_double2int(1)); /* sound level to begin to */ avio_wl32(pb, 0); /* number of fields over which to ramp up sound level */ avio_wl32(pb, 0); /* number of fields over which to ramp down sound level */ avio_wl32(pb, 0); /* reserved */ @@ -663,7 +677,7 @@ } sc->track_type = 2; sc->sample_rate = st->codec->sample_rate; - av_set_pts_info(st, 64, 1, sc->sample_rate); + avpriv_set_pts_info(st, 64, 1, sc->sample_rate); sc->sample_size = 16; sc->frame_rate_index = -2; sc->lines_index = -2; @@ -693,7 +707,7 @@ "gxf muxer only accepts PAL or NTSC resolutions currently\n"); return -1; } - av_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den); + avpriv_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den); if (gxf_find_lines_index(st) < 0) sc->lines_index = -1; sc->sample_size = st->codec->bit_rate; @@ -931,17 +945,14 @@ } AVOutputFormat ff_gxf_muxer = { - "gxf", - NULL_IF_CONFIG_SMALL("GXF format"), - NULL, - "gxf", - sizeof(GXFContext), - CODEC_ID_PCM_S16LE, - CODEC_ID_MPEG2VIDEO, - gxf_write_header, - gxf_write_packet, - gxf_write_trailer, - 0, - NULL, - gxf_interleave_packet, + .name = "gxf", + .long_name = NULL_IF_CONFIG_SMALL("GXF format"), + .extensions = "gxf", + .priv_data_size = sizeof(GXFContext), + .audio_codec = CODEC_ID_PCM_S16LE, + .video_codec = CODEC_ID_MPEG2VIDEO, + .write_header = gxf_write_header, + .write_packet = gxf_write_packet, + .write_trailer = gxf_write_trailer, + .interleave_packet = gxf_interleave_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/httpauth.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/httpauth.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/httpauth.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/httpauth.c 2012-01-11 00:34:30.000000000 +0000 @@ -87,7 +87,7 @@ void ff_http_auth_handle_header(HTTPAuthState *state, const char *key, const char *value) { - if (!strcmp(key, "WWW-Authenticate")) { + if (!strcmp(key, "WWW-Authenticate") || !strcmp(key, "Proxy-Authenticate")) { const char *p; if (av_stristart(value, "Basic ", &p) && state->auth_type <= HTTP_AUTH_BASIC) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/http.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/http.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/http.c 2011-05-19 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/http.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * HTTP protocol for ffmpeg client + * HTTP protocol for avconv client * Copyright (c) 2000, 2001 Fabrice Bellard * * This file is part of Libav. @@ -22,7 +22,6 @@ #include "libavutil/avstring.h" #include "avformat.h" #include -#include #include "internal.h" #include "network.h" #include "http.h" @@ -31,7 +30,7 @@ #include "url.h" #include "libavutil/opt.h" -/* XXX: POST protocol is not completely implemented because ffmpeg uses +/* XXX: POST protocol is not completely implemented because avconv uses only a subset of it. */ /* used for protocol handling */ @@ -48,57 +47,54 @@ int64_t off, filesize; char location[MAX_URL_SIZE]; HTTPAuthState auth_state; - unsigned char headers[BUFFER_SIZE]; + HTTPAuthState proxy_auth_state; + char *headers; int willclose; /**< Set if the server correctly handles Connection: close and will close the connection after feeding us the content. */ + int chunked_post; } HTTPContext; #define OFFSET(x) offsetof(HTTPContext, x) +#define D AV_OPT_FLAG_DECODING_PARAM +#define E AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { -{"chunksize", "use chunked transfer-encoding for posts, -1 disables it, 0 enables it", OFFSET(chunksize), FF_OPT_TYPE_INT64, {.dbl = 0}, -1, 0 }, /* Default to 0, for chunked POSTs */ +{"chunked_post", "use chunked transfer-encoding for posts", OFFSET(chunked_post), AV_OPT_TYPE_INT, {.dbl = 1}, 0, 1, E }, +{"headers", "custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E }, {NULL} }; -static const AVClass httpcontext_class = { - .class_name = "HTTP", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, -}; - -static int http_connect(URLContext *h, const char *path, const char *hoststr, - const char *auth, int *new_location); - -void ff_http_set_headers(URLContext *h, const char *headers) -{ - HTTPContext *s = h->priv_data; - int len = strlen(headers); - - if (len && strcmp("\r\n", headers + len - 2)) - av_log(h, AV_LOG_ERROR, "No trailing CRLF found in HTTP header.\n"); - - av_strlcpy(s->headers, headers, sizeof(s->headers)); +#define HTTP_CLASS(flavor)\ +static const AVClass flavor ## _context_class = {\ + .class_name = #flavor,\ + .item_name = av_default_item_name,\ + .option = options,\ + .version = LIBAVUTIL_VERSION_INT,\ } -void ff_http_set_chunked_transfer_encoding(URLContext *h, int is_chunked) -{ - ((HTTPContext*)h->priv_data)->chunksize = is_chunked ? 0 : -1; -} +HTTP_CLASS(http); +HTTP_CLASS(https); + +static int http_connect(URLContext *h, const char *path, const char *local_path, + const char *hoststr, const char *auth, + const char *proxyauth, int *new_location); void ff_http_init_auth_state(URLContext *dest, const URLContext *src) { memcpy(&((HTTPContext*)dest->priv_data)->auth_state, &((HTTPContext*)src->priv_data)->auth_state, sizeof(HTTPAuthState)); + memcpy(&((HTTPContext*)dest->priv_data)->proxy_auth_state, + &((HTTPContext*)src->priv_data)->proxy_auth_state, + sizeof(HTTPAuthState)); } /* return non zero if error */ static int http_open_cnx(URLContext *h) { - const char *path, *proxy_path; - char hostname[1024], hoststr[1024]; - char auth[1024]; + const char *path, *proxy_path, *lower_proto = "tcp", *local_path; + char hostname[1024], hoststr[1024], proto[10]; + char auth[1024], proxyauth[1024] = ""; char path1[1024]; - char buf[1024]; + char buf[1024], urlbuf[1024]; int port, use_proxy, err, location_changed = 0, redirects = 0; - HTTPAuthType cur_auth_type; + HTTPAuthType cur_auth_type, cur_proxy_auth_type; HTTPContext *s = h->priv_data; URLContext *hd = NULL; @@ -109,31 +105,45 @@ /* fill the dest addr */ redo: /* needed in any case to build the host string */ - av_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, + av_url_split(proto, sizeof(proto), auth, sizeof(auth), + hostname, sizeof(hostname), &port, path1, sizeof(path1), s->location); ff_url_join(hoststr, sizeof(hoststr), NULL, NULL, hostname, port, NULL); - if (use_proxy) { - av_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, - NULL, 0, proxy_path); - path = s->location; - } else { - if (path1[0] == '\0') - path = "/"; - else - path = path1; + if (!strcmp(proto, "https")) { + lower_proto = "tls"; + use_proxy = 0; + if (port < 0) + port = 443; } if (port < 0) port = 80; - ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, NULL); - err = ffurl_open(&hd, buf, AVIO_FLAG_READ_WRITE); + if (path1[0] == '\0') + path = "/"; + else + path = path1; + local_path = path; + if (use_proxy) { + /* Reassemble the request URL without auth string - we don't + * want to leak the auth to the proxy. */ + ff_url_join(urlbuf, sizeof(urlbuf), proto, NULL, hostname, port, "%s", + path1); + path = urlbuf; + av_url_split(NULL, 0, proxyauth, sizeof(proxyauth), + hostname, sizeof(hostname), &port, NULL, 0, proxy_path); + } + + ff_url_join(buf, sizeof(buf), lower_proto, NULL, hostname, port, NULL); + err = ffurl_open(&hd, buf, AVIO_FLAG_READ_WRITE, + &h->interrupt_callback, NULL); if (err < 0) goto fail; s->hd = hd; cur_auth_type = s->auth_state.auth_type; - if (http_connect(h, path, hoststr, auth, &location_changed) < 0) + cur_proxy_auth_type = s->auth_state.auth_type; + if (http_connect(h, path, local_path, hoststr, auth, proxyauth, &location_changed) < 0) goto fail; if (s->http_code == 401) { if (cur_auth_type == HTTP_AUTH_NONE && s->auth_state.auth_type != HTTP_AUTH_NONE) { @@ -142,6 +152,14 @@ } else goto fail; } + if (s->http_code == 407) { + if (cur_proxy_auth_type == HTTP_AUTH_NONE && + s->proxy_auth_state.auth_type != HTTP_AUTH_NONE) { + ffurl_close(hd); + goto redo; + } else + goto fail; + } if ((s->http_code == 301 || s->http_code == 302 || s->http_code == 303 || s->http_code == 307) && location_changed == 1) { /* url moved, get next */ @@ -168,6 +186,12 @@ s->filesize = -1; av_strlcpy(s->location, uri, sizeof(s->location)); + if (s->headers) { + int len = strlen(s->headers); + if (len < 2 || strcmp("\r\n", s->headers + len - 2)) + av_log(h, AV_LOG_WARNING, "No trailing CRLF found in HTTP header.\n"); + } + return http_open_cnx(h); } static int http_getc(HTTPContext *s) @@ -233,7 +257,9 @@ /* error codes are 4xx and 5xx, but regard 401 as a success, so we * don't abort until all headers have been parsed. */ - if (s->http_code >= 400 && s->http_code < 600 && s->http_code != 401) { + if (s->http_code >= 400 && s->http_code < 600 && (s->http_code != 401 + || s->auth_state.auth_type != HTTP_AUTH_NONE) && + (s->http_code != 407 || s->proxy_auth_state.auth_type != HTTP_AUTH_NONE)) { end += strspn(end, SPACE_CHARS); av_log(h, AV_LOG_WARNING, "HTTP error %d %s\n", s->http_code, end); @@ -250,12 +276,12 @@ p++; while (isspace(*p)) p++; - if (!strcasecmp(tag, "Location")) { + if (!av_strcasecmp(tag, "Location")) { strcpy(s->location, p); *new_location = 1; - } else if (!strcasecmp (tag, "Content-Length") && s->filesize == -1) { + } else if (!av_strcasecmp (tag, "Content-Length") && s->filesize == -1) { s->filesize = atoll(p); - } else if (!strcasecmp (tag, "Content-Range")) { + } else if (!av_strcasecmp (tag, "Content-Range")) { /* "bytes $from-$to/$document_size" */ const char *slash; if (!strncmp (p, "bytes ", 6)) { @@ -265,14 +291,18 @@ s->filesize = atoll(slash+1); } h->is_streamed = 0; /* we _can_ in fact seek */ - } else if (!strcasecmp (tag, "Transfer-Encoding") && !strncasecmp(p, "chunked", 7)) { + } else if (!av_strcasecmp(tag, "Accept-Ranges") && !strncmp(p, "bytes", 5)) { + h->is_streamed = 0; + } else if (!av_strcasecmp (tag, "Transfer-Encoding") && !av_strncasecmp(p, "chunked", 7)) { s->filesize = -1; s->chunksize = 0; - } else if (!strcasecmp (tag, "WWW-Authenticate")) { + } else if (!av_strcasecmp (tag, "WWW-Authenticate")) { ff_http_auth_handle_header(&s->auth_state, tag, p); - } else if (!strcasecmp (tag, "Authentication-Info")) { + } else if (!av_strcasecmp (tag, "Authentication-Info")) { ff_http_auth_handle_header(&s->auth_state, tag, p); - } else if (!strcasecmp (tag, "Connection")) { + } else if (!av_strcasecmp (tag, "Proxy-Authenticate")) { + ff_http_auth_handle_header(&s->proxy_auth_state, tag, p); + } else if (!av_strcasecmp (tag, "Connection")) { if (!strcmp(p, "close")) s->willclose = 1; } @@ -283,25 +313,32 @@ static inline int has_header(const char *str, const char *header) { /* header + 2 to skip over CRLF prefix. (make sure you have one!) */ + if (!str) + return 0; return av_stristart(str, header + 2, NULL) || av_stristr(str, header); } -static int http_connect(URLContext *h, const char *path, const char *hoststr, - const char *auth, int *new_location) +static int http_connect(URLContext *h, const char *path, const char *local_path, + const char *hoststr, const char *auth, + const char *proxyauth, int *new_location) { HTTPContext *s = h->priv_data; int post, err; char line[1024]; char headers[1024] = ""; - char *authstr = NULL; + char *authstr = NULL, *proxyauthstr = NULL; int64_t off = s->off; int len = 0; + const char *method; /* send http header */ post = h->flags & AVIO_FLAG_WRITE; - authstr = ff_http_auth_create_response(&s->auth_state, auth, path, - post ? "POST" : "GET"); + method = post ? "POST" : "GET"; + authstr = ff_http_auth_create_response(&s->auth_state, auth, local_path, + method); + proxyauthstr = ff_http_auth_create_response(&s->proxy_auth_state, proxyauth, + local_path, method); /* set default headers if needed */ if (!has_header(s->headers, "\r\nUser-Agent: ")) @@ -310,7 +347,7 @@ if (!has_header(s->headers, "\r\nAccept: ")) len += av_strlcpy(headers + len, "Accept: */*\r\n", sizeof(headers) - len); - if (!has_header(s->headers, "\r\nRange: ")) + if (!has_header(s->headers, "\r\nRange: ") && !post) len += av_strlcatf(headers + len, sizeof(headers) - len, "Range: bytes=%"PRId64"-\r\n", s->off); if (!has_header(s->headers, "\r\nConnection: ")) @@ -321,21 +358,25 @@ "Host: %s\r\n", hoststr); /* now add in custom headers */ - av_strlcpy(headers+len, s->headers, sizeof(headers)-len); + if (s->headers) + av_strlcpy(headers + len, s->headers, sizeof(headers) - len); snprintf(s->buffer, sizeof(s->buffer), "%s %s HTTP/1.1\r\n" "%s" "%s" "%s" + "%s%s" "\r\n", - post ? "POST" : "GET", + method, path, - post && s->chunksize >= 0 ? "Transfer-Encoding: chunked\r\n" : "", + post && s->chunked_post ? "Transfer-Encoding: chunked\r\n" : "", headers, - authstr ? authstr : ""); + authstr ? authstr : "", + proxyauthstr ? "Proxy-" : "", proxyauthstr ? proxyauthstr : ""); av_freep(&authstr); + av_freep(&proxyauthstr); if (ffurl_write(s->hd, s->buffer, strlen(s->buffer)) < 0) return AVERROR(EIO); @@ -374,10 +415,33 @@ } -static int http_read(URLContext *h, uint8_t *buf, int size) +static int http_buf_read(URLContext *h, uint8_t *buf, int size) { HTTPContext *s = h->priv_data; int len; + /* read bytes from input buffer first */ + len = s->buf_end - s->buf_ptr; + if (len > 0) { + if (len > size) + len = size; + memcpy(buf, s->buf_ptr, len); + s->buf_ptr += len; + } else { + if (!s->willclose && s->filesize >= 0 && s->off >= s->filesize) + return AVERROR_EOF; + len = ffurl_read(s->hd, buf, size); + } + if (len > 0) { + s->off += len; + if (s->chunksize > 0) + s->chunksize -= len; + } + return len; +} + +static int http_read(URLContext *h, uint8_t *buf, int size) +{ + HTTPContext *s = h->priv_data; if (s->chunksize >= 0) { if (!s->chunksize) { @@ -400,24 +464,7 @@ } size = FFMIN(size, s->chunksize); } - /* read bytes from input buffer first */ - len = s->buf_end - s->buf_ptr; - if (len > 0) { - if (len > size) - len = size; - memcpy(buf, s->buf_ptr, len); - s->buf_ptr += len; - } else { - if (!s->willclose && s->filesize >= 0 && s->off >= s->filesize) - return AVERROR_EOF; - len = ffurl_read(s->hd, buf, size); - } - if (len > 0) { - s->off += len; - if (s->chunksize > 0) - s->chunksize -= len; - } - return len; + return http_buf_read(h, buf, size); } /* used only when posting data */ @@ -428,7 +475,7 @@ char crlf[] = "\r\n"; HTTPContext *s = h->priv_data; - if (s->chunksize == -1) { + if (!s->chunked_post) { /* non-chunked data is sent without any special encoding */ return ffurl_write(s->hd, buf, size); } @@ -454,7 +501,7 @@ HTTPContext *s = h->priv_data; /* signal end of chunked encoding if used */ - if ((h->flags & AVIO_FLAG_WRITE) && s->chunksize != -1) { + if ((h->flags & AVIO_FLAG_WRITE) && s->chunked_post) { ret = ffurl_write(s->hd, footer, sizeof(footer) - 1); ret = ret > 0 ? 0 : ret; } @@ -507,6 +554,7 @@ return ffurl_get_file_handle(s->hd); } +#if CONFIG_HTTP_PROTOCOL URLProtocol ff_http_protocol = { .name = "http", .url_open = http_open, @@ -516,5 +564,137 @@ .url_close = http_close, .url_get_file_handle = http_get_file_handle, .priv_data_size = sizeof(HTTPContext), - .priv_data_class = &httpcontext_class, + .priv_data_class = &http_context_class, + .flags = URL_PROTOCOL_FLAG_NETWORK, +}; +#endif +#if CONFIG_HTTPS_PROTOCOL +URLProtocol ff_https_protocol = { + .name = "https", + .url_open = http_open, + .url_read = http_read, + .url_write = http_write, + .url_seek = http_seek, + .url_close = http_close, + .url_get_file_handle = http_get_file_handle, + .priv_data_size = sizeof(HTTPContext), + .priv_data_class = &https_context_class, + .flags = URL_PROTOCOL_FLAG_NETWORK, +}; +#endif + +#if CONFIG_HTTPPROXY_PROTOCOL +static int http_proxy_close(URLContext *h) +{ + HTTPContext *s = h->priv_data; + if (s->hd) + ffurl_close(s->hd); + return 0; +} + +static int http_proxy_open(URLContext *h, const char *uri, int flags) +{ + HTTPContext *s = h->priv_data; + char hostname[1024], hoststr[1024]; + char auth[1024], pathbuf[1024], *path; + char line[1024], lower_url[100]; + int port, ret = 0; + HTTPAuthType cur_auth_type; + char *authstr; + + h->is_streamed = 1; + + av_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, + pathbuf, sizeof(pathbuf), uri); + ff_url_join(hoststr, sizeof(hoststr), NULL, NULL, hostname, port, NULL); + path = pathbuf; + if (*path == '/') + path++; + + ff_url_join(lower_url, sizeof(lower_url), "tcp", NULL, hostname, port, + NULL); +redo: + ret = ffurl_open(&s->hd, lower_url, AVIO_FLAG_READ_WRITE, + &h->interrupt_callback, NULL); + if (ret < 0) + return ret; + + authstr = ff_http_auth_create_response(&s->proxy_auth_state, auth, + path, "CONNECT"); + snprintf(s->buffer, sizeof(s->buffer), + "CONNECT %s HTTP/1.1\r\n" + "Host: %s\r\n" + "Connection: close\r\n" + "%s%s" + "\r\n", + path, + hoststr, + authstr ? "Proxy-" : "", authstr ? authstr : ""); + av_freep(&authstr); + + if ((ret = ffurl_write(s->hd, s->buffer, strlen(s->buffer))) < 0) + goto fail; + + s->buf_ptr = s->buffer; + s->buf_end = s->buffer; + s->line_count = 0; + s->filesize = -1; + cur_auth_type = s->proxy_auth_state.auth_type; + + for (;;) { + int new_loc; + // Note: This uses buffering, potentially reading more than the + // HTTP header. If tunneling a protocol where the server starts + // the conversation, we might buffer part of that here, too. + // Reading that requires using the proper ffurl_read() function + // on this URLContext, not using the fd directly (as the tls + // protocol does). This shouldn't be an issue for tls though, + // since the client starts the conversation there, so there + // is no extra data that we might buffer up here. + if (http_get_line(s, line, sizeof(line)) < 0) { + ret = AVERROR(EIO); + goto fail; + } + + av_dlog(h, "header='%s'\n", line); + + ret = process_line(h, line, s->line_count, &new_loc); + if (ret < 0) + goto fail; + if (ret == 0) + break; + s->line_count++; + } + if (s->http_code == 407 && cur_auth_type == HTTP_AUTH_NONE && + s->proxy_auth_state.auth_type != HTTP_AUTH_NONE) { + ffurl_close(s->hd); + s->hd = NULL; + goto redo; + } + + if (s->http_code < 400) + return 0; + ret = AVERROR(EIO); + +fail: + http_proxy_close(h); + return ret; +} + +static int http_proxy_write(URLContext *h, const uint8_t *buf, int size) +{ + HTTPContext *s = h->priv_data; + return ffurl_write(s->hd, buf, size); +} + +URLProtocol ff_httpproxy_protocol = { + .name = "httpproxy", + .url_open = http_proxy_open, + .url_read = http_buf_read, + .url_write = http_proxy_write, + .url_close = http_proxy_close, + .url_get_file_handle = http_get_file_handle, + .priv_data_size = sizeof(HTTPContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; +#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/http.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/http.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/http.h 2011-04-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/http.h 2012-01-11 00:34:30.000000000 +0000 @@ -25,32 +25,6 @@ #include "url.h" /** - * Set custom HTTP headers. - * A trailing CRLF ("\r\n") is required for custom headers. - * Passing in an empty header string ("\0") will reset to defaults. - * - * The following headers can be overriden by custom values, - * otherwise they will be set to their defaults. - * -User-Agent - * -Accept - * -Range - * -Host - * -Connection - * - * @param h URL context for this HTTP connection - * @param headers the custom headers to set - */ -void ff_http_set_headers(URLContext *h, const char *headers); - -/** - * Enable or disable chunked transfer encoding. (default is enabled) - * - * @param h URL context for this HTTP connection - * @param is_chunked 0 to disable chunking, nonzero otherwise. - */ -void ff_http_set_chunked_transfer_encoding(URLContext *h, int is_chunked); - -/** * Initialize the authentication state based on another HTTP URLContext. * This can be used to pre-initialize the authentication parameters if * they are known beforehand, to avoid having to do an initial failing diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/id3v2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/id3v2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/id3v2.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/id3v2.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,66 @@ #include "libavutil/dict.h" #include "avio_internal.h" +const AVMetadataConv ff_id3v2_34_metadata_conv[] = { + { "TALB", "album"}, + { "TCOM", "composer"}, + { "TCON", "genre"}, + { "TCOP", "copyright"}, + { "TENC", "encoded_by"}, + { "TIT2", "title"}, + { "TLAN", "language"}, + { "TPE1", "artist"}, + { "TPE2", "album_artist"}, + { "TPE3", "performer"}, + { "TPOS", "disc"}, + { "TPUB", "publisher"}, + { "TRCK", "track"}, + { "TSSE", "encoder"}, + { 0 } +}; + +const AVMetadataConv ff_id3v2_4_metadata_conv[] = { + { "TDRL", "date"}, + { "TDRC", "date"}, + { "TDEN", "creation_time"}, + { "TSOA", "album-sort"}, + { "TSOP", "artist-sort"}, + { "TSOT", "title-sort"}, + { 0 } +}; + +static const AVMetadataConv id3v2_2_metadata_conv[] = { + { "TAL", "album"}, + { "TCO", "genre"}, + { "TT2", "title"}, + { "TEN", "encoded_by"}, + { "TP1", "artist"}, + { "TP2", "album_artist"}, + { "TP3", "performer"}, + { "TRK", "track"}, + { 0 } +}; + + +const char ff_id3v2_tags[][4] = { + "TALB", "TBPM", "TCOM", "TCON", "TCOP", "TDLY", "TENC", "TEXT", + "TFLT", "TIT1", "TIT2", "TIT3", "TKEY", "TLAN", "TLEN", "TMED", + "TOAL", "TOFN", "TOLY", "TOPE", "TOWN", "TPE1", "TPE2", "TPE3", + "TPE4", "TPOS", "TPUB", "TRCK", "TRSN", "TRSO", "TSRC", "TSSE", + { 0 }, +}; + +const char ff_id3v2_4_tags[][4] = { + "TDEN", "TDOR", "TDRC", "TDRL", "TDTG", "TIPL", "TMCL", "TMOO", + "TPRO", "TSOA", "TSOP", "TSOT", "TSST", + { 0 }, +}; + +const char ff_id3v2_3_tags[][4] = { + "TDAT", "TIME", "TORY", "TRDA", "TSIZ", "TYER", + { 0 }, +}; + int ff_id3v2_match(const uint8_t *buf, const char * magic) { return buf[0] == magic[0] && @@ -59,81 +119,220 @@ return v; } -static void read_ttag(AVFormatContext *s, AVIOContext *pb, int taglen, const char *key) +/** + * Free GEOB type extra metadata. + */ +static void free_geobtag(void *obj) { - char *q, dst[512]; - const char *val = NULL; - int len, dstlen = sizeof(dst) - 1; - unsigned genre; - unsigned int (*get)(AVIOContext*) = avio_rb16; + ID3v2ExtraMetaGEOB *geob = obj; + av_free(geob->mime_type); + av_free(geob->file_name); + av_free(geob->description); + av_free(geob->data); + av_free(geob); +} - dst[0] = 0; - if (taglen < 1) - return; +/** + * Decode characters to UTF-8 according to encoding type. The decoded buffer is + * always null terminated. Stop reading when either *maxread bytes are read from + * pb or U+0000 character is found. + * + * @param dst Pointer where the address of the buffer with the decoded bytes is + * stored. Buffer must be freed by caller. + * @param maxread Pointer to maximum number of characters to read from the + * AVIOContext. After execution the value is decremented by the number of bytes + * actually read. + * @returns 0 if no error occurred, dst is uninitialized on error + */ +static int decode_str(AVFormatContext *s, AVIOContext *pb, int encoding, + uint8_t **dst, int *maxread) +{ + int ret; + uint8_t tmp; + uint32_t ch = 1; + int left = *maxread; + unsigned int (*get)(AVIOContext*) = avio_rb16; + AVIOContext *dynbuf; - taglen--; /* account for encoding type byte */ + if ((ret = avio_open_dyn_buf(&dynbuf)) < 0) { + av_log(s, AV_LOG_ERROR, "Error opening memory stream\n"); + return ret; + } - switch (avio_r8(pb)) { /* encoding type */ + switch (encoding) { case ID3v2_ENCODING_ISO8859: - q = dst; - while (taglen-- && q - dst < dstlen - 7) { - uint8_t tmp; - PUT_UTF8(avio_r8(pb), tmp, *q++ = tmp;) + while (left && ch) { + ch = avio_r8(pb); + PUT_UTF8(ch, tmp, avio_w8(dynbuf, tmp);) + left--; } - *q = 0; break; case ID3v2_ENCODING_UTF16BOM: - taglen -= 2; + if ((left -= 2) < 0) { + av_log(s, AV_LOG_ERROR, "Cannot read BOM value, input too short\n"); + avio_close_dyn_buf(dynbuf, dst); + av_freep(dst); + return AVERROR_INVALIDDATA; + } switch (avio_rb16(pb)) { case 0xfffe: get = avio_rl16; case 0xfeff: break; default: - av_log(s, AV_LOG_ERROR, "Incorrect BOM value in tag %s.\n", key); - return; + av_log(s, AV_LOG_ERROR, "Incorrect BOM value\n"); + avio_close_dyn_buf(dynbuf, dst); + av_freep(dst); + *maxread = left; + return AVERROR_INVALIDDATA; } // fall-through case ID3v2_ENCODING_UTF16BE: - q = dst; - while (taglen > 1 && q - dst < dstlen - 7) { - uint32_t ch; - uint8_t tmp; - - GET_UTF16(ch, ((taglen -= 2) >= 0 ? get(pb) : 0), break;) - PUT_UTF8(ch, tmp, *q++ = tmp;) + while ((left > 1) && ch) { + GET_UTF16(ch, ((left -= 2) >= 0 ? get(pb) : 0), break;) + PUT_UTF8(ch, tmp, avio_w8(dynbuf, tmp);) } - *q = 0; + if (left < 0) + left += 2; /* did not read last char from pb */ break; case ID3v2_ENCODING_UTF8: - len = FFMIN(taglen, dstlen); - avio_read(pb, dst, len); - dst[len] = 0; + while (left && ch) { + ch = avio_r8(pb); + avio_w8(dynbuf, ch); + left--; + } break; default: - av_log(s, AV_LOG_WARNING, "Unknown encoding in tag %s.\n", key); + av_log(s, AV_LOG_WARNING, "Unknown encoding\n"); + } + + if (ch) + avio_w8(dynbuf, 0); + + avio_close_dyn_buf(dynbuf, dst); + *maxread = left; + + return 0; +} + +/** + * Parse a text tag. + */ +static void read_ttag(AVFormatContext *s, AVIOContext *pb, int taglen, const char *key) +{ + uint8_t *dst; + int encoding, dict_flags = AV_DICT_DONT_OVERWRITE; + unsigned genre; + + if (taglen < 1) + return; + + encoding = avio_r8(pb); + taglen--; /* account for encoding type byte */ + + if (decode_str(s, pb, encoding, &dst, &taglen) < 0) { + av_log(s, AV_LOG_ERROR, "Error reading frame %s, skipped\n", key); + return; } if (!(strcmp(key, "TCON") && strcmp(key, "TCO")) && (sscanf(dst, "(%d)", &genre) == 1 || sscanf(dst, "%d", &genre) == 1) - && genre <= ID3v1_GENRE_MAX) - val = ff_id3v1_genre_str[genre]; - else if (!(strcmp(key, "TXXX") && strcmp(key, "TXX"))) { - /* dst now contains two 0-terminated strings */ - dst[dstlen] = 0; - len = strlen(dst); + && genre <= ID3v1_GENRE_MAX) { + av_freep(&dst); + dst = ff_id3v1_genre_str[genre]; + } else if (!(strcmp(key, "TXXX") && strcmp(key, "TXX"))) { + /* dst now contains the key, need to get value */ key = dst; - val = dst + FFMIN(len + 1, dstlen); + if (decode_str(s, pb, encoding, &dst, &taglen) < 0) { + av_log(s, AV_LOG_ERROR, "Error reading frame %s, skipped\n", key); + av_freep(&key); + return; + } + dict_flags |= AV_DICT_DONT_STRDUP_VAL | AV_DICT_DONT_STRDUP_KEY; } else if (*dst) - val = dst; + dict_flags |= AV_DICT_DONT_STRDUP_VAL; - if (val) - av_dict_set(&s->metadata, key, val, AV_DICT_DONT_OVERWRITE); + if (dst) + av_dict_set(&s->metadata, key, dst, dict_flags); +} + +/** + * Parse GEOB tag into a ID3v2ExtraMetaGEOB struct. + */ +static void read_geobtag(AVFormatContext *s, AVIOContext *pb, int taglen, char *tag, ID3v2ExtraMeta **extra_meta) +{ + ID3v2ExtraMetaGEOB *geob_data = NULL; + ID3v2ExtraMeta *new_extra = NULL; + char encoding; + unsigned int len; + + if (taglen < 1) + return; + + geob_data = av_mallocz(sizeof(ID3v2ExtraMetaGEOB)); + if (!geob_data) { + av_log(s, AV_LOG_ERROR, "Failed to alloc %zu bytes\n", sizeof(ID3v2ExtraMetaGEOB)); + return; + } + + new_extra = av_mallocz(sizeof(ID3v2ExtraMeta)); + if (!new_extra) { + av_log(s, AV_LOG_ERROR, "Failed to alloc %zu bytes\n", sizeof(ID3v2ExtraMeta)); + goto fail; + } + + /* read encoding type byte */ + encoding = avio_r8(pb); + taglen--; + + /* read MIME type (always ISO-8859) */ + if (decode_str(s, pb, ID3v2_ENCODING_ISO8859, &geob_data->mime_type, &taglen) < 0 + || taglen <= 0) + goto fail; + + /* read file name */ + if (decode_str(s, pb, encoding, &geob_data->file_name, &taglen) < 0 + || taglen <= 0) + goto fail; + + /* read content description */ + if (decode_str(s, pb, encoding, &geob_data->description, &taglen) < 0 + || taglen < 0) + goto fail; + + if (taglen) { + /* save encapsulated binary data */ + geob_data->data = av_malloc(taglen); + if (!geob_data->data) { + av_log(s, AV_LOG_ERROR, "Failed to alloc %d bytes\n", taglen); + goto fail; + } + if ((len = avio_read(pb, geob_data->data, taglen)) < taglen) + av_log(s, AV_LOG_WARNING, "Error reading GEOB frame, data truncated.\n"); + geob_data->datasize = len; + } else { + geob_data->data = NULL; + geob_data->datasize = 0; + } + + /* add data to the list */ + new_extra->tag = "GEOB"; + new_extra->data = geob_data; + new_extra->next = *extra_meta; + *extra_meta = new_extra; + + return; + +fail: + av_log(s, AV_LOG_ERROR, "Error reading frame %s, skipped\n", tag); + free_geobtag(geob_data); + av_free(new_extra); + return; } static int is_number(const char *str) @@ -182,7 +381,38 @@ av_dict_set(m, "date", date, 0); } -static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags) +typedef struct ID3v2EMFunc { + const char *tag3; + const char *tag4; + void (*read)(AVFormatContext*, AVIOContext*, int, char*, ID3v2ExtraMeta **); + void (*free)(void *obj); +} ID3v2EMFunc; + +static const ID3v2EMFunc id3v2_extra_meta_funcs[] = { + { "GEO", "GEOB", read_geobtag, free_geobtag }, + { NULL } +}; + +/** + * Get the corresponding ID3v2EMFunc struct for a tag. + * @param isv34 Determines if v2.2 or v2.3/4 strings are used + * @return A pointer to the ID3v2EMFunc struct if found, NULL otherwise. + */ +static const ID3v2EMFunc *get_extra_meta_func(const char *tag, int isv34) +{ + int i = 0; + while (id3v2_extra_meta_funcs[i].tag3) { + if (!memcmp(tag, + (isv34 ? id3v2_extra_meta_funcs[i].tag4 : + id3v2_extra_meta_funcs[i].tag3), + (isv34 ? 4 : 3))) + return &id3v2_extra_meta_funcs[i]; + i++; + } + return NULL; +} + +static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags, ID3v2ExtraMeta **extra_meta) { int isv34, tlen, unsync; char tag[5]; @@ -190,8 +420,10 @@ int taghdrlen; const char *reason = NULL; AVIOContext pb; + AVIOContext *pbx; unsigned char *buffer = NULL; int buffer_size = 0; + const ID3v2EMFunc *extra_func; switch (version) { case 2: @@ -237,13 +469,19 @@ tag[3] = 0; tlen = avio_rb24(s->pb); } - if (tlen <= 0 || tlen > len - taghdrlen) { + if (tlen < 0 || tlen > len - taghdrlen) { av_log(s, AV_LOG_WARNING, "Invalid size in frame %s, skipping the rest of tag.\n", tag); break; } len -= taghdrlen + tlen; next = avio_tell(s->pb) + tlen; + if (!tlen) { + if (tag[0]) + av_log(s, AV_LOG_DEBUG, "Invalid empty frame %s, skipping.\n", tag); + continue; + } + if (tflags & ID3v2_FLAG_DATALEN) { avio_rb32(s->pb); tlen -= 4; @@ -252,7 +490,8 @@ if (tflags & (ID3v2_FLAG_ENCRYPTION | ID3v2_FLAG_COMPRESSION)) { av_log(s, AV_LOG_WARNING, "Skipping encrypted/compressed ID3v2 frame %s.\n", tag); avio_skip(s->pb, tlen); - } else if (tag[0] == 'T') { + /* check for text tag or supported special meta tag */ + } else if (tag[0] == 'T' || (extra_meta && (extra_func = get_extra_meta_func(tag, isv34)))) { if (unsync || tunsync) { int i, j; av_fast_malloc(&buffer, &buffer_size, tlen); @@ -268,10 +507,17 @@ } } ffio_init_context(&pb, buffer, j, 0, NULL, NULL, NULL, NULL); - read_ttag(s, &pb, j, tag); + tlen = j; + pbx = &pb; // read from sync buffer } else { - read_ttag(s, s->pb, tlen, tag); + pbx = s->pb; // read straight from input } + if (tag[0] == 'T') + /* parse text tag */ + read_ttag(s, pbx, tlen, tag); + else + /* parse special meta tag */ + extra_func->read(s, pbx, tlen, tag, extra_meta); } else if (!tag[0]) { if (tag[1]) @@ -295,7 +541,7 @@ return; } -void ff_id3v2_read(AVFormatContext *s, const char *magic) +void ff_id3v2_read_all(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra_meta) { int len, ret; uint8_t buf[ID3v2_HEADER_SIZE]; @@ -315,73 +561,32 @@ ((buf[7] & 0x7f) << 14) | ((buf[8] & 0x7f) << 7) | (buf[9] & 0x7f); - ff_id3v2_parse(s, len, buf[3], buf[5]); + ff_id3v2_parse(s, len, buf[3], buf[5], extra_meta); } else { avio_seek(s->pb, off, SEEK_SET); } } while (found_header); ff_metadata_conv(&s->metadata, NULL, ff_id3v2_34_metadata_conv); - ff_metadata_conv(&s->metadata, NULL, ff_id3v2_2_metadata_conv); + ff_metadata_conv(&s->metadata, NULL, id3v2_2_metadata_conv); ff_metadata_conv(&s->metadata, NULL, ff_id3v2_4_metadata_conv); merge_date(&s->metadata); } -const AVMetadataConv ff_id3v2_34_metadata_conv[] = { - { "TALB", "album"}, - { "TCOM", "composer"}, - { "TCON", "genre"}, - { "TCOP", "copyright"}, - { "TENC", "encoded_by"}, - { "TIT2", "title"}, - { "TLAN", "language"}, - { "TPE1", "artist"}, - { "TPE2", "album_artist"}, - { "TPE3", "performer"}, - { "TPOS", "disc"}, - { "TPUB", "publisher"}, - { "TRCK", "track"}, - { "TSSE", "encoder"}, - { 0 } -}; - -const AVMetadataConv ff_id3v2_4_metadata_conv[] = { - { "TDRL", "date"}, - { "TDRC", "date"}, - { "TDEN", "creation_time"}, - { "TSOA", "album-sort"}, - { "TSOP", "artist-sort"}, - { "TSOT", "title-sort"}, - { 0 } -}; - -const AVMetadataConv ff_id3v2_2_metadata_conv[] = { - { "TAL", "album"}, - { "TCO", "genre"}, - { "TT2", "title"}, - { "TEN", "encoded_by"}, - { "TP1", "artist"}, - { "TP2", "album_artist"}, - { "TP3", "performer"}, - { "TRK", "track"}, - { 0 } -}; - - -const char ff_id3v2_tags[][4] = { - "TALB", "TBPM", "TCOM", "TCON", "TCOP", "TDLY", "TENC", "TEXT", - "TFLT", "TIT1", "TIT2", "TIT3", "TKEY", "TLAN", "TLEN", "TMED", - "TOAL", "TOFN", "TOLY", "TOPE", "TOWN", "TPE1", "TPE2", "TPE3", - "TPE4", "TPOS", "TPUB", "TRCK", "TRSN", "TRSO", "TSRC", "TSSE", - { 0 }, -}; +void ff_id3v2_read(AVFormatContext *s, const char *magic) +{ + ff_id3v2_read_all(s, magic, NULL); +} -const char ff_id3v2_4_tags[][4] = { - "TDEN", "TDOR", "TDRC", "TDRL", "TDTG", "TIPL", "TMCL", "TMOO", - "TPRO", "TSOA", "TSOP", "TSOT", "TSST", - { 0 }, -}; +void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta) +{ + ID3v2ExtraMeta *current = *extra_meta, *next; + const ID3v2EMFunc *extra_func; -const char ff_id3v2_3_tags[][4] = { - "TDAT", "TIME", "TORY", "TRDA", "TSIZ", "TYER", - { 0 }, -}; + while (current) { + if ((extra_func = get_extra_meta_func(current->tag, 1))) + extra_func->free(current->data); + next = current->next; + av_freep(¤t); + current = next; + } +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/id3v2enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/id3v2enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/id3v2enc.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/id3v2enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,146 @@ +/* + * ID3v2 header writer + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include "libavutil/dict.h" +#include "libavutil/intreadwrite.h" +#include "avformat.h" +#include "avio.h" +#include "id3v2.h" + +static void id3v2_put_size(AVFormatContext *s, int size) +{ + avio_w8(s->pb, size >> 21 & 0x7f); + avio_w8(s->pb, size >> 14 & 0x7f); + avio_w8(s->pb, size >> 7 & 0x7f); + avio_w8(s->pb, size & 0x7f); +} + +static int string_is_ascii(const uint8_t *str) +{ + while (*str && *str < 128) str++; + return !*str; +} + +/** + * Write a text frame with one (normal frames) or two (TXXX frames) strings + * according to encoding (only UTF-8 or UTF-16+BOM supported). + * @return number of bytes written or a negative error code. + */ +static int id3v2_put_ttag(AVFormatContext *s, const char *str1, const char *str2, + uint32_t tag, enum ID3v2Encoding enc) +{ + int len; + uint8_t *pb; + int (*put)(AVIOContext*, const char*); + AVIOContext *dyn_buf; + if (avio_open_dyn_buf(&dyn_buf) < 0) + return AVERROR(ENOMEM); + + /* check if the strings are ASCII-only and use UTF16 only if + * they're not */ + if (enc == ID3v2_ENCODING_UTF16BOM && string_is_ascii(str1) && + (!str2 || string_is_ascii(str2))) + enc = ID3v2_ENCODING_ISO8859; + + avio_w8(dyn_buf, enc); + if (enc == ID3v2_ENCODING_UTF16BOM) { + avio_wl16(dyn_buf, 0xFEFF); /* BOM */ + put = avio_put_str16le; + } else + put = avio_put_str; + + put(dyn_buf, str1); + if (str2) + put(dyn_buf, str2); + len = avio_close_dyn_buf(dyn_buf, &pb); + + avio_wb32(s->pb, tag); + id3v2_put_size(s, len); + avio_wb16(s->pb, 0); + avio_write(s->pb, pb, len); + + av_freep(&pb); + return len + ID3v2_HEADER_SIZE; +} + +static int id3v2_check_write_tag(AVFormatContext *s, AVDictionaryEntry *t, const char table[][4], + enum ID3v2Encoding enc) +{ + uint32_t tag; + int i; + + if (t->key[0] != 'T' || strlen(t->key) != 4) + return -1; + tag = AV_RB32(t->key); + for (i = 0; *table[i]; i++) + if (tag == AV_RB32(table[i])) + return id3v2_put_ttag(s, t->value, NULL, tag, enc); + return -1; +} + +int ff_id3v2_write(struct AVFormatContext *s, int id3v2_version, + const char *magic) +{ + int64_t size_pos, cur_pos; + AVDictionaryEntry *t = NULL; + + int totlen = 0, enc = id3v2_version == 3 ? ID3v2_ENCODING_UTF16BOM : + ID3v2_ENCODING_UTF8; + + + avio_wb32(s->pb, MKBETAG(magic[0], magic[1], magic[2], id3v2_version)); + avio_w8(s->pb, 0); + avio_w8(s->pb, 0); /* flags */ + + /* reserve space for size */ + size_pos = avio_tell(s->pb); + avio_wb32(s->pb, 0); + + ff_metadata_conv(&s->metadata, ff_id3v2_34_metadata_conv, NULL); + if (id3v2_version == 4) + ff_metadata_conv(&s->metadata, ff_id3v2_4_metadata_conv, NULL); + + while ((t = av_dict_get(s->metadata, "", t, AV_DICT_IGNORE_SUFFIX))) { + int ret; + + if ((ret = id3v2_check_write_tag(s, t, ff_id3v2_tags, enc)) > 0) { + totlen += ret; + continue; + } + if ((ret = id3v2_check_write_tag(s, t, id3v2_version == 3 ? + ff_id3v2_3_tags : ff_id3v2_4_tags, enc)) > 0) { + totlen += ret; + continue; + } + + /* unknown tag, write as TXXX frame */ + if ((ret = id3v2_put_ttag(s, t->key, t->value, MKBETAG('T', 'X', 'X', 'X'), enc)) < 0) + return ret; + totlen += ret; + } + + cur_pos = avio_tell(s->pb); + avio_seek(s->pb, size_pos, SEEK_SET); + id3v2_put_size(s, totlen); + avio_seek(s->pb, cur_pos, SEEK_SET); + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/id3v2.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/id3v2.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/id3v2.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/id3v2.h 2012-01-11 00:34:30.000000000 +0000 @@ -45,10 +45,24 @@ ID3v2_ENCODING_UTF8 = 3, }; +typedef struct ID3v2ExtraMeta { + const char *tag; + void *data; + struct ID3v2ExtraMeta *next; +} ID3v2ExtraMeta; + +typedef struct ID3v2ExtraMetaGEOB { + uint32_t datasize; + uint8_t *mime_type; + uint8_t *file_name; + uint8_t *description; + uint8_t *data; +} ID3v2ExtraMetaGEOB; + /** * Detect ID3v2 Header. * @param buf must be ID3v2_HEADER_SIZE byte long - * @param magic magic bytes to identify the header, machine byte order. + * @param magic magic bytes to identify the header. * If in doubt, use ID3v2_DEFAULT_MAGIC. */ int ff_id3v2_match(const uint8_t *buf, const char *magic); @@ -61,13 +75,33 @@ int ff_id3v2_tag_len(const uint8_t *buf); /** - * Read an ID3v2 tag + * Read an ID3v2 tag (text tags only) */ void ff_id3v2_read(AVFormatContext *s, const char *magic); +/** + * Read an ID3v2 tag, including supported extra metadata (currently only GEOB) + * @param extra_meta If not NULL, extra metadata is parsed into a list of + * ID3v2ExtraMeta structs and *extra_meta points to the head of the list + */ +void ff_id3v2_read_all(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra_meta); + +/** + * Write an ID3v2 tag. + * @param id3v2_version Subversion of ID3v2; supported values are 3 and 4 + * @param magic magic bytes to identify the header + * If in doubt, use ID3v2_DEFAULT_MAGIC. + */ +int ff_id3v2_write(struct AVFormatContext *s, int id3v2_version, const char *magic); + +/** + * Free memory allocated parsing special (non-text) metadata. + * @param extra_meta Pointer to a pointer to the head of a ID3v2ExtraMeta list, *extra_meta is set to NULL. + */ +void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta); + extern const AVMetadataConv ff_id3v2_34_metadata_conv[]; extern const AVMetadataConv ff_id3v2_4_metadata_conv[]; -extern const AVMetadataConv ff_id3v2_2_metadata_conv[]; /** * A list of text information frames allowed in both ID3 v2.3 and v2.4 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/idcin.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/idcin.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/idcin.c 2011-04-16 05:56:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/idcin.c 2012-01-11 00:34:30.000000000 +0000 @@ -70,6 +70,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define HUFFMAN_TABLE_SIZE (64 * 1024) #define IDCIN_FPS 14 @@ -153,10 +154,10 @@ bytes_per_sample = avio_rl32(pb); channels = avio_rl32(pb); - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 33, 1, IDCIN_FPS); + avpriv_set_pts_info(st, 33, 1, IDCIN_FPS); idcin->video_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_IDCIN; @@ -174,10 +175,10 @@ /* if sample rate is 0, assume no audio */ if (sample_rate) { idcin->audio_present = 1; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 33, 1, IDCIN_FPS); + avpriv_set_pts_info(st, 33, 1, IDCIN_FPS); idcin->audio_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_tag = 1; @@ -292,10 +293,10 @@ } AVInputFormat ff_idcin_demuxer = { - "idcin", - NULL_IF_CONFIG_SMALL("id Cinematic format"), - sizeof(IdcinDemuxContext), - idcin_probe, - idcin_read_header, - idcin_read_packet, + .name = "idcin", + .long_name = NULL_IF_CONFIG_SMALL("id Cinematic format"), + .priv_data_size = sizeof(IdcinDemuxContext), + .read_probe = idcin_probe, + .read_header = idcin_read_header, + .read_packet = idcin_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/idroqdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/idroqdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/idroqdec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/idroqdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,6 +29,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define RoQ_MAGIC_NUMBER 0x1084 #define RoQ_CHUNK_PREAMBLE_SIZE 8 @@ -43,6 +44,7 @@ typedef struct RoqDemuxContext { + int frame_rate; int width; int height; int audio_channels; @@ -69,29 +71,21 @@ { RoqDemuxContext *roq = s->priv_data; AVIOContext *pb = s->pb; - int framerate; - AVStream *st; unsigned char preamble[RoQ_CHUNK_PREAMBLE_SIZE]; /* get the main header */ if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) != RoQ_CHUNK_PREAMBLE_SIZE) return AVERROR(EIO); - framerate = AV_RL16(&preamble[6]); + roq->frame_rate = AV_RL16(&preamble[6]); /* init private context parameters */ roq->width = roq->height = roq->audio_channels = roq->video_pts = roq->audio_frame_count = 0; roq->audio_stream_index = -1; + roq->video_stream_index = -1; - st = av_new_stream(s, 0); - if (!st) - return AVERROR(ENOMEM); - av_set_pts_info(st, 63, 1, framerate); - roq->video_stream_index = st->index; - st->codec->codec_type = AVMEDIA_TYPE_VIDEO; - st->codec->codec_id = CODEC_ID_ROQ; - st->codec->codec_tag = 0; /* no fourcc */ + s->ctx_flags |= AVFMTCTX_NOHEADER; return 0; } @@ -127,8 +121,16 @@ switch (chunk_type) { case RoQ_INFO: - if (!roq->width || !roq->height) { - AVStream *st = s->streams[roq->video_stream_index]; + if (roq->video_stream_index == -1) { + AVStream *st = avformat_new_stream(s, NULL); + if (!st) + return AVERROR(ENOMEM); + avpriv_set_pts_info(st, 63, 1, roq->frame_rate); + roq->video_stream_index = st->index; + st->codec->codec_type = AVMEDIA_TYPE_VIDEO; + st->codec->codec_id = CODEC_ID_ROQ; + st->codec->codec_tag = 0; /* no fourcc */ + if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) != RoQ_CHUNK_PREAMBLE_SIZE) return AVERROR(EIO); st->codec->width = roq->width = AV_RL16(preamble); @@ -166,10 +168,10 @@ case RoQ_SOUND_MONO: case RoQ_SOUND_STEREO: if (roq->audio_stream_index == -1) { - AVStream *st = av_new_stream(s, 1); + AVStream *st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE); + avpriv_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE); roq->audio_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_ROQ_DPCM; @@ -209,7 +211,6 @@ default: av_log(s, AV_LOG_ERROR, " unknown RoQ chunk (%04X)\n", chunk_type); return AVERROR_INVALIDDATA; - break; } } @@ -217,10 +218,10 @@ } AVInputFormat ff_roq_demuxer = { - "RoQ", - NULL_IF_CONFIG_SMALL("id RoQ format"), - sizeof(RoqDemuxContext), - roq_probe, - roq_read_header, - roq_read_packet, + .name = "RoQ", + .long_name = NULL_IF_CONFIG_SMALL("id RoQ format"), + .priv_data_size = sizeof(RoqDemuxContext), + .read_probe = roq_probe, + .read_header = roq_read_header, + .read_packet = roq_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/idroqenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/idroqenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/idroqenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/idroqenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,15 +35,12 @@ return 0; } -AVOutputFormat ff_roq_muxer = -{ - "RoQ", - NULL_IF_CONFIG_SMALL("raw id RoQ format"), - NULL, - "roq", - 0, - CODEC_ID_ROQ_DPCM, - CODEC_ID_ROQ, - roq_write_header, - ff_raw_write_packet, +AVOutputFormat ff_roq_muxer = { + .name = "RoQ", + .long_name = NULL_IF_CONFIG_SMALL("raw id RoQ format"), + .extensions = "roq", + .audio_codec = CODEC_ID_ROQ_DPCM, + .video_codec = CODEC_ID_ROQ, + .write_header = roq_write_header, + .write_packet = ff_raw_write_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/iff.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/iff.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/iff.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/iff.c 2012-01-11 00:34:30.000000000 +0000 @@ -32,6 +32,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/dict.h" #include "avformat.h" +#include "internal.h" #define ID_8SVX MKTAG('8','S','V','X') #define ID_VHDR MKTAG('V','H','D','R') @@ -59,8 +60,6 @@ #define RIGHT 4 #define STEREO 6 -#define PACKET_SIZE 1024 - typedef enum { COMP_NONE, COMP_FIB, @@ -76,22 +75,9 @@ uint64_t body_pos; uint32_t body_size; uint32_t sent_bytes; - uint32_t audio_frame_count; } IffDemuxContext; -static void interleave_stereo(const uint8_t *src, uint8_t *dest, int size) -{ - uint8_t *end = dest + size; - size = size>>1; - - while(dest < end) { - *dest++ = *src; - *dest++ = *(src+size); - src++; - } -} - /* Metadata string read */ static int get_metadata(AVFormatContext *s, const char *const tag, @@ -130,7 +116,7 @@ uint32_t chunk_id, data_size; int compression = -1; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -231,11 +217,11 @@ switch(st->codec->codec_type) { case AVMEDIA_TYPE_AUDIO: - av_set_pts_info(st, 32, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate); switch(compression) { case COMP_NONE: - st->codec->codec_id = CODEC_ID_PCM_S8; + st->codec->codec_id = CODEC_ID_PCM_S8_PLANAR; break; case COMP_FIB: st->codec->codec_id = CODEC_ID_8SVX_FIB; @@ -278,48 +264,28 @@ { IffDemuxContext *iff = s->priv_data; AVIOContext *pb = s->pb; - AVStream *st = s->streams[0]; int ret; if(iff->sent_bytes >= iff->body_size) - return AVERROR(EIO); - - if(st->codec->channels == 2) { - uint8_t sample_buffer[PACKET_SIZE]; + return AVERROR_EOF; - ret = avio_read(pb, sample_buffer, PACKET_SIZE); - if(av_new_packet(pkt, PACKET_SIZE) < 0) { - av_log(s, AV_LOG_ERROR, "cannot allocate packet\n"); - return AVERROR(ENOMEM); - } - interleave_stereo(sample_buffer, pkt->data, PACKET_SIZE); - } else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { - ret = av_get_packet(pb, pkt, iff->body_size); - } else { - ret = av_get_packet(pb, pkt, PACKET_SIZE); - } + ret = av_get_packet(pb, pkt, iff->body_size); + if (ret < 0) + return ret; if(iff->sent_bytes == 0) pkt->flags |= AV_PKT_FLAG_KEY; + iff->sent_bytes = iff->body_size; - if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { - iff->sent_bytes += PACKET_SIZE; - } else { - iff->sent_bytes = iff->body_size; - } pkt->stream_index = 0; - if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { - pkt->pts = iff->audio_frame_count; - iff->audio_frame_count += ret / st->codec->channels; - } return ret; } AVInputFormat ff_iff_demuxer = { - "IFF", - NULL_IF_CONFIG_SMALL("IFF format"), - sizeof(IffDemuxContext), - iff_probe, - iff_read_header, - iff_read_packet, + .name = "IFF", + .long_name = NULL_IF_CONFIG_SMALL("IFF format"), + .priv_data_size = sizeof(IffDemuxContext), + .read_probe = iff_probe, + .read_header = iff_read_header, + .read_packet = iff_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/img2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/img2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/img2.c 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/img2.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,7 +29,6 @@ #include "avformat.h" #include "avio_internal.h" #include "internal.h" -#include typedef struct { const AVClass *class; /**< Class for private options. */ @@ -42,6 +41,7 @@ char *pixel_format; /**< Set by a private option. */ char *video_size; /**< Set by a private option. */ char *framerate; /**< Set by a private option. */ + int loop; } VideoData; typedef struct { @@ -120,7 +120,7 @@ str++; while (tags->id) { - if (!strcasecmp(str, tags->str)) + if (!av_strcasecmp(str, tags->str)) return tags->id; tags++; @@ -215,7 +215,7 @@ s1->ctx_flags |= AVFMTCTX_NOHEADER; - st = av_new_stream(s1, 0); + st = avformat_new_stream(s1, NULL); if (!st) { return AVERROR(ENOMEM); } @@ -232,15 +232,10 @@ av_log(s, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s->framerate); return ret; } -#if FF_API_FORMAT_PARAMETERS - if (ap->pix_fmt != PIX_FMT_NONE) - pix_fmt = ap->pix_fmt; - if (ap->width > 0) - width = ap->width; - if (ap->height > 0) - height = ap->height; - if (ap->time_base.num) - framerate = (AVRational){ap->time_base.den, ap->time_base.num}; + +#if FF_API_LOOP_INPUT + if (s1->loop_input) + s->loop = s1->loop_input; #endif av_strlcpy(s->path, s1->filename, sizeof(s->path)); @@ -255,7 +250,7 @@ st->need_parsing = AVSTREAM_PARSE_FULL; } - av_set_pts_info(st, 60, framerate.den, framerate.num); + avpriv_set_pts_info(st, 60, framerate.den, framerate.num); if (width && height) { st->codec->width = width; @@ -300,7 +295,7 @@ if (!s->is_pipe) { /* loop over input */ - if (s1->loop_input && s->img_number > s->img_last) { + if (s->loop && s->img_number > s->img_last) { s->img_number = s->img_first; } if (s->img_number > s->img_last) @@ -309,7 +304,8 @@ s->path, s->img_number)<0 && s->img_number > 1) return AVERROR(EIO); for(i=0; i<3; i++){ - if (avio_open(&f[i], filename, AVIO_FLAG_READ) < 0) { + if (avio_open2(&f[i], filename, AVIO_FLAG_READ, + &s1->interrupt_callback, NULL) < 0) { if(i==1) break; av_log(s1, AV_LOG_ERROR, "Could not open file : %s\n",filename); @@ -393,7 +389,8 @@ return AVERROR(EIO); } for(i=0; i<3; i++){ - if (avio_open(&pb[i], filename, AVIO_FLAG_WRITE) < 0) { + if (avio_open2(&pb[i], filename, AVIO_FLAG_WRITE, + &s->interrupt_callback, NULL) < 0) { av_log(s, AV_LOG_ERROR, "Could not open file : %s\n",filename); return AVERROR(EIO); } @@ -435,7 +432,7 @@ (!st->codec->extradata_size && AV_RL32(pkt->data+4) != MKTAG('j','P',' ',' '))){ // signature error: - av_log(s, AV_LOG_ERROR, "malformated jpeg2000 codestream\n"); + av_log(s, AV_LOG_ERROR, "malformed JPEG 2000 codestream\n"); return -1; } } @@ -455,21 +452,21 @@ #define OFFSET(x) offsetof(VideoData, x) #define DEC AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { - { "pixel_format", "", OFFSET(pixel_format), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, - { "video_size", "", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, - { "framerate", "", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = "25"}, 0, 0, DEC }, + { "pixel_format", "", OFFSET(pixel_format), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "video_size", "", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0, DEC }, + { "loop", "", OFFSET(loop), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, DEC }, { NULL }, }; +/* input */ +#if CONFIG_IMAGE2_DEMUXER static const AVClass img2_class = { .class_name = "image2 demuxer", .item_name = av_default_item_name, .option = options, .version = LIBAVUTIL_VERSION_INT, }; - -/* input */ -#if CONFIG_IMAGE2_DEMUXER AVInputFormat ff_image2_demuxer = { .name = "image2", .long_name = NULL_IF_CONFIG_SMALL("image2 sequence"), @@ -482,13 +479,19 @@ }; #endif #if CONFIG_IMAGE2PIPE_DEMUXER +static const AVClass img2pipe_class = { + .class_name = "image2pipe demuxer", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; AVInputFormat ff_image2pipe_demuxer = { .name = "image2pipe", .long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"), .priv_data_size = sizeof(VideoData), .read_header = read_header, .read_packet = read_packet, - .priv_class = &img2_class, + .priv_class = &img2pipe_class, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ingenientdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ingenientdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ingenientdec.c 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ingenientdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -58,15 +58,16 @@ return ret; } +FF_RAWVIDEO_DEMUXER_CLASS(ingenient) + AVInputFormat ff_ingenient_demuxer = { - "ingenient", - NULL_IF_CONFIG_SMALL("raw Ingenient MJPEG"), - sizeof(FFRawVideoDemuxerContext), - NULL, - ff_raw_video_read_header, - ingenient_read_packet, + .name = "ingenient", + .long_name = NULL_IF_CONFIG_SMALL("raw Ingenient MJPEG"), + .priv_data_size = sizeof(FFRawVideoDemuxerContext), + .read_header = ff_raw_video_read_header, + .read_packet = ingenient_read_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "cgi", // FIXME .value = CODEC_ID_MJPEG, - .priv_class = &ff_rawvideo_demuxer_class, + .priv_class = &ingenient_demuxer_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/internal.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/internal.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/internal.h 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/internal.h 2012-01-11 00:34:30.000000000 +0000 @@ -108,7 +108,7 @@ */ int ff_url_join(char *str, int size, const char *proto, const char *authorization, const char *hostname, - int port, const char *fmt, ...); + int port, const char *fmt, ...) av_printf_format(7, 8); /** * Append the media-specific SDP fragment for the media stream c @@ -157,14 +157,14 @@ /** * Read a whole line of text from AVIOContext. Stop reading after reaching - * either a \n, a \0 or EOF. The returned string is always \0 terminated, + * either a \\n, a \\0 or EOF. The returned string is always \\0-terminated, * and may be truncated if the buffer is too small. * * @param s the read-only AVIOContext * @param buf buffer to store the read line * @param maxlen size of the buffer * @return the length of the string written in the buffer, not including the - * final \0 + * final \\0 */ int ff_get_line(AVIOContext *s, char *buf, int maxlen); @@ -225,8 +225,8 @@ * * @return AVChapter or NULL on error */ -AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, - int64_t start, int64_t end, const char *title); +AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base, + int64_t start, int64_t end, const char *title); /** * Ensure the index uses less memory than the maximum specified in @@ -248,4 +248,63 @@ enum CodecID ff_guess_image2_codec(const char *filename); +/** + * Convert a date string in ISO8601 format to Unix timestamp. + */ +int64_t ff_iso8601_to_unix_time(const char *datestr); + +/** + * Perform a binary search using av_index_search_timestamp() and + * AVInputFormat.read_timestamp(). + * + * @param target_ts target timestamp in the time base of the given stream + * @param stream_index stream number + */ +int ff_seek_frame_binary(AVFormatContext *s, int stream_index, + int64_t target_ts, int flags); + +/** + * Update cur_dts of all streams based on the given timestamp and AVStream. + * + * Stream ref_st unchanged, others set cur_dts in their native time base. + * Only needed for timestamp wrapping or if (dts not set and pts!=dts). + * @param timestamp new dts expressed in time_base of param ref_st + * @param ref_st reference stream giving time_base of param timestamp + */ +void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp); + +/** + * Perform a binary search using read_timestamp(). + * + * @param target_ts target timestamp in the time base of the given stream + * @param stream_index stream number + */ +int64_t ff_gen_search(AVFormatContext *s, int stream_index, + int64_t target_ts, int64_t pos_min, + int64_t pos_max, int64_t pos_limit, + int64_t ts_min, int64_t ts_max, + int flags, int64_t *ts_ret, + int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )); + +/** + * Set the pts for a given stream. If the new values would be invalid + * (<= 0), it leaves the AVStream unchanged. + * + * @param s stream + * @param pts_wrap_bits number of bits effectively used by the pts + * (used for wrap control, 33 is the value for MPEG) + * @param pts_num numerator to convert to seconds (MPEG: 1) + * @param pts_den denominator to convert to seconds (MPEG: 90000) + */ +void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits, + unsigned int pts_num, unsigned int pts_den); + +/** + * Add side data to a packet for changing parameters to the given values. + * Parameters set to 0 aren't included in the change. + */ +int ff_add_param_change(AVPacket *pkt, int32_t channels, + uint64_t channel_layout, int32_t sample_rate, + int32_t width, int32_t height); + #endif /* AVFORMAT_INTERNAL_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ipmovie.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ipmovie.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ipmovie.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ipmovie.c 2012-01-11 00:34:30.000000000 +0000 @@ -34,6 +34,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define CHUNK_PREAMBLE_SIZE 4 #define OPCODE_PREAMBLE_SIZE 4 @@ -88,6 +89,7 @@ int64_t video_pts; uint32_t palette[256]; int has_palette; + int changed; unsigned int audio_bits; unsigned int audio_channels; @@ -115,6 +117,11 @@ int chunk_type; if (s->audio_chunk_offset) { + if (s->audio_type == CODEC_ID_NONE) { + av_log(NULL, AV_LOG_ERROR, "Can not read audio packet before" + "audio codec is known\n"); + return CHUNK_BAD; + } /* adjust for PCM audio by skipping chunk header */ if (s->audio_type != CODEC_ID_INTERPLAY_DPCM) { @@ -137,7 +144,7 @@ (s->audio_chunk_size / s->audio_channels / (s->audio_bits / 8)); else s->audio_frame_count += - (s->audio_chunk_size - 6) / s->audio_channels; + (s->audio_chunk_size - 6 - s->audio_channels) / s->audio_channels; av_dlog(NULL, "sending audio frame with pts %"PRId64" (%d audio frames)\n", pkt->pts, s->audio_frame_count); @@ -162,6 +169,10 @@ } } + if (s->changed) { + ff_add_param_change(pkt, 0, 0, 0, s->video_width, s->video_height); + s->changed = 0; + } pkt->pos= s->decode_map_chunk_offset; avio_seek(pb, s->decode_map_chunk_offset, SEEK_SET); s->decode_map_chunk_offset = 0; @@ -217,6 +228,7 @@ int first_color, last_color; int audio_flags; unsigned char r, g, b; + unsigned int width, height; /* see if there are any pending packets */ chunk_type = load_ipmovie_packet(s, pb, pkt); @@ -373,8 +385,16 @@ chunk_type = CHUNK_BAD; break; } - s->video_width = AV_RL16(&scratch[0]) * 8; - s->video_height = AV_RL16(&scratch[2]) * 8; + width = AV_RL16(&scratch[0]) * 8; + height = AV_RL16(&scratch[2]) * 8; + if (width != s->video_width) { + s->video_width = width; + s->changed++; + } + if (height != s->video_height) { + s->video_height = height; + s->changed++; + } if (opcode_version < 2 || !AV_RL16(&scratch[6])) { s->video_bpp = 8; } else { @@ -559,10 +579,10 @@ return AVERROR_INVALIDDATA; /* initialize the stream decoders */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 63, 1, 1000000); + avpriv_set_pts_info(st, 63, 1, 1000000); ipmovie->video_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_INTERPLAY_VIDEO; @@ -572,10 +592,10 @@ st->codec->bits_per_coded_sample = ipmovie->video_bpp; if (ipmovie->audio_type) { - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate); + avpriv_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate); ipmovie->audio_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = ipmovie->audio_type; @@ -616,10 +636,10 @@ } AVInputFormat ff_ipmovie_demuxer = { - "ipmovie", - NULL_IF_CONFIG_SMALL("Interplay MVE format"), - sizeof(IPMVEContext), - ipmovie_probe, - ipmovie_read_header, - ipmovie_read_packet, + .name = "ipmovie", + .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE format"), + .priv_data_size = sizeof(IPMVEContext), + .read_probe = ipmovie_probe, + .read_header = ipmovie_read_header, + .read_packet = ipmovie_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/isom.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/isom.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/isom.c 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/isom.c 2012-01-11 00:34:30.000000000 +0000 @@ -61,6 +61,8 @@ { CODEC_ID_VORBIS , 0xDD }, /* non standard, gpac uses it */ { CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* non standard, see unsupported-embedded-subs-2.mp4 */ { CODEC_ID_QCELP , 0xE1 }, + { CODEC_ID_MPEG4SYSTEMS, 0x01 }, + { CODEC_ID_MPEG4SYSTEMS, 0x02 }, { CODEC_ID_NONE , 0 }, }; @@ -88,6 +90,7 @@ { CODEC_ID_R10K, MKTAG('R', '1', '0', 'g') }, /* UNCOMPRESSED 10BIT RGB */ { CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, /* UNCOMPRESSED 10BIT RGB */ { CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, /* UNCOMPRESSED 10BIT 4:2:2 */ + { CODEC_ID_V410, MKTAG('v', '4', '1', '0') }, /* UNCOMPRESSED 10BIT 4:4:4 */ { CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') }, /* PhotoJPEG */ { CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') }, /* Motion-JPEG (format A) */ @@ -137,11 +140,18 @@ { CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') }, { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */ - { CODEC_ID_H264, MKTAG('a', 'i', '5', '5') }, /* AVC Intra 50 / 1080 interlace */ - { CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC Intra 50 / 720 */ - { CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC Intra 100 / 1080 interlace */ - { CODEC_ID_H264, MKTAG('a', 'i', '1', 'q') }, /* AVC Intra 100 / 720 */ - { CODEC_ID_H264, MKTAG('a', 'i', '1', '2') }, /* AVC Intra 100 / 1080 */ + { CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */ + { CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC-Intra 50M 720p25/50 */ + { CODEC_ID_H264, MKTAG('a', 'i', '5', '2') }, /* AVC-Intra 50M 1080p25/50 */ + { CODEC_ID_H264, MKTAG('a', 'i', '5', '3') }, /* AVC-Intra 50M 1080p24/30/60 */ + { CODEC_ID_H264, MKTAG('a', 'i', '5', '5') }, /* AVC-Intra 50M 1080i50 */ + { CODEC_ID_H264, MKTAG('a', 'i', '5', '6') }, /* AVC-Intra 50M 1080i60 */ + { CODEC_ID_H264, MKTAG('a', 'i', '1', 'p') }, /* AVC-Intra 100M 720p24/30/60 */ + { CODEC_ID_H264, MKTAG('a', 'i', '1', 'q') }, /* AVC-Intra 100M 720p25/50 */ + { CODEC_ID_H264, MKTAG('a', 'i', '1', '2') }, /* AVC-Intra 100M 1080p25/50 */ + { CODEC_ID_H264, MKTAG('a', 'i', '1', '3') }, /* AVC-Intra 100M 1080p24/30/60 */ + { CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 */ + { CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 */ { CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 Camcorder */ { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */ @@ -197,6 +207,8 @@ { CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') }, { CODEC_ID_DNXHD, MKTAG('A', 'V', 'd', 'n') }, /* AVID DNxHD */ + { CODEC_ID_FLV1, MKTAG('H', '2', '6', '3') }, /* Flash Media Server */ + { CODEC_ID_MSMPEG4V3, MKTAG('3', 'I', 'V', 'D') }, /* 3ivx DivX Doctor */ { CODEC_ID_RAWVIDEO, MKTAG('A', 'V', '1', 'x') }, /* AVID 1:1x */ { CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'u', 'p') }, { CODEC_ID_SGI, MKTAG('s', 'g', 'i', ' ') }, /* SGI */ @@ -212,60 +224,48 @@ }; const AVCodecTag codec_movaudio_tags[] = { - { CODEC_ID_PCM_S32BE, MKTAG('i', 'n', '3', '2') }, - { CODEC_ID_PCM_S32LE, MKTAG('i', 'n', '3', '2') }, - { CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4') }, - { CODEC_ID_PCM_S24LE, MKTAG('i', 'n', '2', '4') }, - { CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's') }, /* 16 bits */ - { CODEC_ID_PCM_S16LE, MKTAG('s', 'o', 'w', 't') }, /* */ - { CODEC_ID_PCM_S16LE, MKTAG('l', 'p', 'c', 'm') }, - { CODEC_ID_PCM_F32BE, MKTAG('f', 'l', '3', '2') }, - { CODEC_ID_PCM_F32LE, MKTAG('f', 'l', '3', '2') }, - { CODEC_ID_PCM_F64BE, MKTAG('f', 'l', '6', '4') }, - { CODEC_ID_PCM_F64LE, MKTAG('f', 'l', '6', '4') }, - { CODEC_ID_PCM_S8, MKTAG('s', 'o', 'w', 't') }, - { CODEC_ID_PCM_U8, MKTAG('r', 'a', 'w', ' ') }, /* 8 bits unsigned */ - { CODEC_ID_PCM_U8, MKTAG('N', 'O', 'N', 'E') }, /* uncompressed */ - { CODEC_ID_PCM_MULAW, MKTAG('u', 'l', 'a', 'w') }, /* */ - { CODEC_ID_PCM_ALAW, MKTAG('a', 'l', 'a', 'w') }, /* */ - - { CODEC_ID_ADPCM_IMA_QT, MKTAG('i', 'm', 'a', '4') }, /* IMA-4 ADPCM */ - - { CODEC_ID_MACE3, MKTAG('M', 'A', 'C', '3') }, /* Macintosh Audio Compression and Expansion 3:1 */ - { CODEC_ID_MACE6, MKTAG('M', 'A', 'C', '6') }, /* Macintosh Audio Compression and Expansion 6:1 */ - - { CODEC_ID_MP1, MKTAG('.', 'm', 'p', '1') }, /* MPEG layer 1 */ - { CODEC_ID_MP2, MKTAG('.', 'm', 'p', '2') }, /* MPEG layer 2 */ - - { CODEC_ID_MP3, MKTAG('.', 'm', 'p', '3') }, /* MPEG layer 3 */ /* sample files at http://www.3ivx.com/showcase.html use this tag */ - { CODEC_ID_MP3, 0x6D730055 }, /* MPEG layer 3 */ - -/* { CODEC_ID_OGG_VORBIS, MKTAG('O', 'g', 'g', 'S') }, *//* sample files at http://heroinewarrior.com/xmovie.php3 use this tag */ - - { CODEC_ID_AAC, MKTAG('m', 'p', '4', 'a') }, /* MPEG-4 AAC */ - { CODEC_ID_AC3, MKTAG('a', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F */ - { CODEC_ID_AC3, MKTAG('s', 'a', 'c', '3') }, /* Nero Recode */ - { CODEC_ID_DTS, MKTAG('d', 't', 's', 'c') }, /* mp4ra.org */ - { CODEC_ID_DTS, MKTAG('D', 'T', 'S', ' ') }, /* non-standard */ - - { CODEC_ID_AMR_NB, MKTAG('s', 'a', 'm', 'r') }, /* AMR-NB 3gp */ - { CODEC_ID_AMR_WB, MKTAG('s', 'a', 'w', 'b') }, /* AMR-WB 3gp */ - - { CODEC_ID_GSM, MKTAG('a', 'g', 's', 'm') }, - { CODEC_ID_ALAC, MKTAG('a', 'l', 'a', 'c') }, /* Apple Lossless */ - - { CODEC_ID_QCELP, MKTAG('Q','c','l','p') }, - { CODEC_ID_QCELP, MKTAG('Q','c','l','q') }, - { CODEC_ID_QCELP, MKTAG('s','q','c','p') }, /* ISO Media fourcc */ - - { CODEC_ID_QDMC, MKTAG('Q', 'D', 'M', 'C') }, /* QDMC */ - { CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2') }, /* QDM2 */ - - { CODEC_ID_DVAUDIO, MKTAG('v', 'd', 'v', 'a') }, - { CODEC_ID_DVAUDIO, MKTAG('d', 'v', 'c', 'a') }, - - { CODEC_ID_WMAV2, MKTAG('W', 'M', 'A', '2') }, - + { CODEC_ID_AAC, MKTAG('m', 'p', '4', 'a') }, + { CODEC_ID_AC3, MKTAG('a', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F */ + { CODEC_ID_AC3, MKTAG('s', 'a', 'c', '3') }, /* Nero Recode */ + { CODEC_ID_ADPCM_IMA_QT, MKTAG('i', 'm', 'a', '4') }, + { CODEC_ID_ALAC, MKTAG('a', 'l', 'a', 'c') }, + { CODEC_ID_AMR_NB, MKTAG('s', 'a', 'm', 'r') }, /* AMR-NB 3gp */ + { CODEC_ID_AMR_WB, MKTAG('s', 'a', 'w', 'b') }, /* AMR-WB 3gp */ + { CODEC_ID_DTS, MKTAG('d', 't', 's', 'c') }, /* mp4ra.org */ + { CODEC_ID_DTS, MKTAG('D', 'T', 'S', ' ') }, /* non-standard */ + { CODEC_ID_DVAUDIO, MKTAG('v', 'd', 'v', 'a') }, + { CODEC_ID_DVAUDIO, MKTAG('d', 'v', 'c', 'a') }, + { CODEC_ID_GSM, MKTAG('a', 'g', 's', 'm') }, + { CODEC_ID_MACE3, MKTAG('M', 'A', 'C', '3') }, + { CODEC_ID_MACE6, MKTAG('M', 'A', 'C', '6') }, + { CODEC_ID_MP1, MKTAG('.', 'm', 'p', '1') }, + { CODEC_ID_MP2, MKTAG('.', 'm', 'p', '2') }, + { CODEC_ID_MP3, MKTAG('.', 'm', 'p', '3') }, + { CODEC_ID_MP3, 0x6D730055 }, + { CODEC_ID_NELLYMOSER, MKTAG('n', 'm', 'o', 's') }, /* Flash Media Server */ + { CODEC_ID_PCM_ALAW, MKTAG('a', 'l', 'a', 'w') }, + { CODEC_ID_PCM_F32BE, MKTAG('f', 'l', '3', '2') }, + { CODEC_ID_PCM_F32LE, MKTAG('f', 'l', '3', '2') }, + { CODEC_ID_PCM_F64BE, MKTAG('f', 'l', '6', '4') }, + { CODEC_ID_PCM_F64LE, MKTAG('f', 'l', '6', '4') }, + { CODEC_ID_PCM_MULAW, MKTAG('u', 'l', 'a', 'w') }, + { CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's') }, + { CODEC_ID_PCM_S16LE, MKTAG('s', 'o', 'w', 't') }, + { CODEC_ID_PCM_S16LE, MKTAG('l', 'p', 'c', 'm') }, + { CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4') }, + { CODEC_ID_PCM_S24LE, MKTAG('i', 'n', '2', '4') }, + { CODEC_ID_PCM_S32BE, MKTAG('i', 'n', '3', '2') }, + { CODEC_ID_PCM_S32LE, MKTAG('i', 'n', '3', '2') }, + { CODEC_ID_PCM_S8, MKTAG('s', 'o', 'w', 't') }, + { CODEC_ID_PCM_U8, MKTAG('r', 'a', 'w', ' ') }, + { CODEC_ID_PCM_U8, MKTAG('N', 'O', 'N', 'E') }, + { CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'p') }, + { CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'q') }, + { CODEC_ID_QCELP, MKTAG('s', 'q', 'c', 'p') }, /* ISO Media fourcc */ + { CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2') }, + { CODEC_ID_QDMC, MKTAG('Q', 'D', 'M', 'C') }, + { CODEC_ID_SPEEX, MKTAG('s', 'p', 'e', 'x') }, /* Flash Media Server */ + { CODEC_ID_WMAV2, MKTAG('W', 'M', 'A', '2') }, { CODEC_ID_NONE, 0 }, }; @@ -372,6 +372,22 @@ return len; } +void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id) +{ + int flags; + if (es_id) *es_id = avio_rb16(pb); + else avio_rb16(pb); + flags = avio_r8(pb); + if (flags & 0x80) //streamDependenceFlag + avio_rb16(pb); + if (flags & 0x40) { //URL_Flag + int len = avio_r8(pb); + avio_skip(pb, len); + } + if (flags & 0x20) //OCRstreamFlag + avio_rb16(pb); +} + static const AVCodecTag mp4_audio_types[] = { { CODEC_ID_MP3ON4, AOT_PS }, /* old mp3on4 draft */ { CODEC_ID_MP3ON4, AOT_L1 }, /* layer 1 */ @@ -395,7 +411,7 @@ len = ff_mp4_read_descr(fc, pb, &tag); if (tag == MP4DecSpecificDescrTag) { av_dlog(fc, "Specific MPEG4 header len=%d\n", len); - if((uint64_t)len > (1<<30)) + if (!len || (uint64_t)len > (1<<30)) return -1; av_free(st->codec->extradata); st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE); @@ -405,11 +421,11 @@ st->codec->extradata_size = len; if (st->codec->codec_id == CODEC_ID_AAC) { MPEG4AudioConfig cfg; - ff_mpeg4audio_get_config(&cfg, st->codec->extradata, - st->codec->extradata_size); + avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata, + st->codec->extradata_size * 8, 1); st->codec->channels = cfg.channels; if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4 - st->codec->sample_rate = ff_mpa_freq_tab[cfg.sampling_index]; + st->codec->sample_rate = avpriv_mpa_freq_tab[cfg.sampling_index]; else if (cfg.ext_sample_rate) st->codec->sample_rate = cfg.ext_sample_rate; else diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/isom.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/isom.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/isom.h 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/isom.h 2012-01-11 00:34:30.000000000 +0000 @@ -146,11 +146,14 @@ int ff_mp4_read_descr_len(AVIOContext *pb); int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag); int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb); +void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id); +#define MP4ODescrTag 0x01 #define MP4IODescrTag 0x02 #define MP4ESDescrTag 0x03 #define MP4DecConfigDescrTag 0x04 #define MP4DecSpecificDescrTag 0x05 +#define MP4SLDescrTag 0x06 int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom); enum CodecID ff_mov_get_lpcm_codec_id(int bps, int flags); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/iss.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/iss.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/iss.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/iss.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,11 +23,11 @@ * @file * Funcom ISS file demuxer * @author Jaikrishnan Menon - * for more information on the .iss file format, visit: - * http://wiki.multimedia.cx/index.php?title=FunCom_ISS + * @see http://wiki.multimedia.cx/index.php?title=FunCom_ISS */ #include "avformat.h" +#include "internal.h" #include "libavutil/avstring.h" #define ISS_SIG "IMA_ADPCM_Sound" @@ -89,7 +89,7 @@ iss->sample_start_pos = avio_tell(pb); - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -102,7 +102,7 @@ st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * st->codec->bits_per_coded_sample; st->codec->block_align = iss->packet_size; - av_set_pts_info(st, 32, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate); return 0; } @@ -123,11 +123,11 @@ } AVInputFormat ff_iss_demuxer = { - "ISS", - NULL_IF_CONFIG_SMALL("Funcom ISS format"), - sizeof(IssDemuxContext), - iss_probe, - iss_read_header, - iss_read_packet, + .name = "ISS", + .long_name = NULL_IF_CONFIG_SMALL("Funcom ISS format"), + .priv_data_size = sizeof(IssDemuxContext), + .read_probe = iss_probe, + .read_header = iss_read_header, + .read_packet = iss_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/iv8.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/iv8.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/iv8.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/iv8.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,11 +19,12 @@ */ #include "avformat.h" +#include "internal.h" static int probe(AVProbeData *p) { - // the single file i have starts with that, i dont know if others do too + // the single file I have starts with that, I do not know if others do, too if( p->buf[0] == 1 && p->buf[1] == 1 && p->buf[2] == 3 @@ -40,14 +41,14 @@ { AVStream *st; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_MPEG4; st->need_parsing = AVSTREAM_PARSE_FULL; - av_set_pts_info(st, 64, 1, 90000); + avpriv_set_pts_info(st, 64, 1, 90000); return 0; @@ -55,42 +56,64 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) { - int ret, size, pts, type; -retry: - type= avio_rb16(s->pb); // 257 or 258 - size= avio_rb16(s->pb); - - avio_rb16(s->pb); //some flags, 0x80 indicates end of frame - avio_rb16(s->pb); //packet number - pts=avio_rb32(s->pb); - avio_rb32(s->pb); //6A 13 E3 88 - - size -= 12; - if(size<1) - return -1; - - if(type==258){ - avio_skip(s->pb, size); - goto retry; + int ret, size, pts, type, flags; + int first_pkt = 0; + int frame_complete = 0; + + while (!frame_complete) { + + type = avio_rb16(s->pb); // 257 or 258 + size = avio_rb16(s->pb); + flags = avio_rb16(s->pb); //some flags, 0x80 indicates end of frame + avio_rb16(s->pb); //packet number + pts = avio_rb32(s->pb); + avio_rb32(s->pb); //6A 13 E3 88 + + frame_complete = flags & 0x80; + + size -= 12; + if (size < 1) + return -1; + + if (type == 258) { + avio_skip(s->pb, size); + frame_complete = 0; + continue; + } + + if (!first_pkt) { + ret = av_get_packet(s->pb, pkt, size); + if (ret < 0) + return ret; + first_pkt = 1; + pkt->pts = pts; + pkt->pos -= 16; + } else { + ret = av_append_packet(s->pb, pkt, size); + if (ret < 0) { + av_log(s, AV_LOG_ERROR, "failed to grow packet\n"); + av_free_packet(pkt); + return ret; + } + } + if (ret < size) { + av_log(s, AV_LOG_ERROR, "Truncated packet! Read %d of %d bytes\n", + ret, size); + pkt->flags |= AV_PKT_FLAG_CORRUPT; + break; + } } - - ret= av_get_packet(s->pb, pkt, size); - - pkt->pts= pts; - pkt->pos-=16; - pkt->stream_index = 0; - return ret; + return 0; } AVInputFormat ff_iv8_demuxer = { - "iv8", - NULL_IF_CONFIG_SMALL("A format generated by IndigoVision 8000 video server"), - 0, - probe, - read_header, - read_packet, + .name = "iv8", + .long_name = NULL_IF_CONFIG_SMALL("A format generated by IndigoVision 8000 video server"), + .read_probe = probe, + .read_header = read_header, + .read_packet = read_packet, .flags= AVFMT_GENERIC_INDEX, .value = CODEC_ID_MPEG4, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ivfdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ivfdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ivfdec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ivfdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ */ #include "avformat.h" +#include "internal.h" #include "riff.h" #include "libavutil/intreadwrite.h" @@ -40,7 +41,7 @@ avio_rl16(s->pb); // version avio_rl16(s->pb); // header size - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -61,7 +62,7 @@ return AVERROR_INVALIDDATA; } - av_set_pts_info(st, 64, time_base.num, time_base.den); + avpriv_set_pts_info(st, 64, time_base.num, time_base.den); return 0; } @@ -80,12 +81,11 @@ } AVInputFormat ff_ivf_demuxer = { - "ivf", - NULL_IF_CONFIG_SMALL("On2 IVF"), - 0, - probe, - read_header, - read_packet, + .name = "ivf", + .long_name = NULL_IF_CONFIG_SMALL("On2 IVF"), + .read_probe = probe, + .read_header = read_header, + .read_packet = read_packet, .flags= AVFMT_GENERIC_INDEX, .codec_tag = (const AVCodecTag*[]){ff_codec_bmp_tags, 0}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/jvdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/jvdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/jvdec.c 2011-04-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/jvdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,6 +27,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define JV_PREAMBLE_SIZE 5 @@ -69,8 +70,8 @@ avio_skip(pb, 80); - ast = av_new_stream(s, 0); - vst = av_new_stream(s, 1); + ast = avformat_new_stream(s, NULL); + vst = avformat_new_stream(s, NULL); if (!ast || !vst) return AVERROR(ENOMEM); @@ -81,7 +82,7 @@ vst->codec->height = avio_rl16(pb); vst->nb_frames = ast->nb_index_entries = avio_rl16(pb); - av_set_pts_info(vst, 64, avio_rl16(pb), 1000); + avpriv_set_pts_info(vst, 64, avio_rl16(pb), 1000); avio_skip(pb, 4); @@ -90,7 +91,7 @@ ast->codec->codec_tag = 0; /* no fourcc */ ast->codec->sample_rate = avio_rl16(pb); ast->codec->channels = 1; - av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); + avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate); avio_skip(pb, 10); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/latmenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/latmenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/latmenc.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/latmenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,191 @@ +/* + * LATM/LOAS muxer + * Copyright (c) 2011 Kieran Kunhya + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavcodec/get_bits.h" +#include "libavcodec/put_bits.h" +#include "libavcodec/avcodec.h" +#include "libavcodec/mpeg4audio.h" +#include "libavutil/opt.h" +#include "avformat.h" + +typedef struct { + AVClass *av_class; + int off; + int channel_conf; + int object_type; + int counter; + int mod; +} LATMContext; + +static const AVOption options[] = { + {"smc-interval", "StreamMuxConfig interval.", + offsetof(LATMContext, mod), AV_OPT_TYPE_INT, {.dbl = 0x0014}, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM}, + {NULL}, +}; + +static const AVClass latm_muxer_class = { + .class_name = "LATM/LOAS muxer", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +static int latm_decode_extradata(LATMContext *ctx, uint8_t *buf, int size) +{ + GetBitContext gb; + MPEG4AudioConfig m4ac; + + init_get_bits(&gb, buf, size * 8); + ctx->off = avpriv_mpeg4audio_get_config(&m4ac, buf, size * 8, 1); + if (ctx->off < 0) + return ctx->off; + skip_bits_long(&gb, ctx->off); + + /* FIXME: are any formats not allowed in LATM? */ + + if (m4ac.object_type > AOT_SBR && m4ac.object_type != AOT_ALS) { + av_log(ctx, AV_LOG_ERROR, "Muxing MPEG-4 AOT %d in LATM is not supported\n", m4ac.object_type); + return AVERROR_INVALIDDATA; + } + ctx->channel_conf = m4ac.chan_config; + ctx->object_type = m4ac.object_type; + + return 0; +} + +static int latm_write_header(AVFormatContext *s) +{ + LATMContext *ctx = s->priv_data; + AVCodecContext *avctx = s->streams[0]->codec; + + if (avctx->extradata_size > 0 && + latm_decode_extradata(ctx, avctx->extradata, avctx->extradata_size) < 0) + return AVERROR_INVALIDDATA; + + return 0; +} + +static int latm_write_frame_header(AVFormatContext *s, PutBitContext *bs) +{ + LATMContext *ctx = s->priv_data; + AVCodecContext *avctx = s->streams[0]->codec; + GetBitContext gb; + int header_size; + + /* AudioMuxElement */ + put_bits(bs, 1, !!ctx->counter); + + if (!ctx->counter) { + init_get_bits(&gb, avctx->extradata, avctx->extradata_size * 8); + + /* StreamMuxConfig */ + put_bits(bs, 1, 0); /* audioMuxVersion */ + put_bits(bs, 1, 1); /* allStreamsSameTimeFraming */ + put_bits(bs, 6, 0); /* numSubFrames */ + put_bits(bs, 4, 0); /* numProgram */ + put_bits(bs, 3, 0); /* numLayer */ + + /* AudioSpecificConfig */ + if (ctx->object_type == AOT_ALS) { + header_size = avctx->extradata_size-(ctx->off + 7) >> 3; + avpriv_copy_bits(bs, &avctx->extradata[ctx->off], header_size); + } else { + avpriv_copy_bits(bs, avctx->extradata, ctx->off + 3); + + if (!ctx->channel_conf) { + avpriv_copy_pce_data(bs, &gb); + } + } + + put_bits(bs, 3, 0); /* frameLengthType */ + put_bits(bs, 8, 0xff); /* latmBufferFullness */ + + put_bits(bs, 1, 0); /* otherDataPresent */ + put_bits(bs, 1, 0); /* crcCheckPresent */ + } + + ctx->counter++; + ctx->counter %= ctx->mod; + + return 0; +} + +static int latm_write_packet(AVFormatContext *s, AVPacket *pkt) +{ + AVIOContext *pb = s->pb; + PutBitContext bs; + int i, len; + uint8_t loas_header[] = "\x56\xe0\x00"; + uint8_t *buf; + + if (pkt->size > 2 && pkt->data[0] == 0xff && (pkt->data[1] >> 4) == 0xf) { + av_log(s, AV_LOG_ERROR, "ADTS header detected - ADTS will not be incorrectly muxed into LATM\n"); + return AVERROR_INVALIDDATA; + } + + buf = av_malloc(pkt->size+1024); + if (!buf) + return AVERROR(ENOMEM); + + init_put_bits(&bs, buf, pkt->size+1024); + + latm_write_frame_header(s, &bs); + + /* PayloadLengthInfo() */ + for (i = 0; i <= pkt->size-255; i+=255) + put_bits(&bs, 8, 255); + + put_bits(&bs, 8, pkt->size-i); + + /* The LATM payload is written unaligned */ + + /* PayloadMux() */ + for (i = 0; i < pkt->size; i++) + put_bits(&bs, 8, pkt->data[i]); + + avpriv_align_put_bits(&bs); + flush_put_bits(&bs); + + len = put_bits_count(&bs) >> 3; + + loas_header[1] |= (len >> 8) & 0x1f; + loas_header[2] |= len & 0xff; + + avio_write(pb, loas_header, 3); + avio_write(pb, buf, len); + + av_free(buf); + + return 0; +} + +AVOutputFormat ff_latm_muxer = { + .name = "latm", + .long_name = NULL_IF_CONFIG_SMALL("LOAS/LATM"), + .mime_type = "audio/MP4A-LATM", + .extensions = "latm", + .priv_data_size = sizeof(LATMContext), + .audio_codec = CODEC_ID_AAC, + .video_codec = CODEC_ID_NONE, + .write_header = latm_write_header, + .write_packet = latm_write_packet, + .priv_class = &latm_muxer_class, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/libavformat.v mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/libavformat.v --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/libavformat.v 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/libavformat.v 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,29 @@ LIBAVFORMAT_$MAJOR { - global: *; - local: - ff_*_demuxer; - ff_*_muxer; - ff_*_protocol; + global: av*; + #FIXME those are for avserver + ff_inet_aton; + ff_socket_nonblock; + ffm_set_write_index; + ffm_read_write_index; + ffm_write_write_index; + ff_rtsp_parse_line; + ff_rtp_get_local_rtp_port; + ff_rtp_get_local_rtcp_port; + ffio_open_dyn_packet_buf; + url_open; + url_close; + url_write; + url_get_max_packet_size; + #those are deprecated, remove on next bump + find_info_tag; + parse_date; + dump_format; + url_*; + get_*; + put_*; + udp_set_remote_url; + udp_get_local_port; + init_checksum; + init_put_byte; + local: *; }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/libnut.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/libnut.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/libnut.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/libnut.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,7 @@ */ #include "avformat.h" +#include "internal.h" #include "riff.h" #include @@ -92,7 +93,7 @@ for (j = 0; j < s[i].fourcc_len; j++) s[i].fourcc[j] = (fourcc >> (j*8)) & 0xFF; ff_parse_specific_params(codec, &num, &ssize, &denom); - av_set_pts_info(avf->streams[i], 60, denom, num); + avpriv_set_pts_info(avf->streams[i], 60, denom, num); s[i].time_base.num = denom; s[i].time_base.den = num; @@ -151,16 +152,16 @@ } AVOutputFormat ff_libnut_muxer = { - "libnut", - "nut format", - "video/x-nut", - "nut", - sizeof(NUTContext), - CODEC_ID_VORBIS, - CODEC_ID_MPEG4, - nut_write_header, - nut_write_packet, - nut_write_trailer, + .name = "libnut", + .long_name = "nut format", + .mime_type = "video/x-nut", + .extensions = "nut", + .priv_data_size = sizeof(NUTContext), + .audio_codec = CODEC_ID_VORBIS, + .video_codec = CODEC_ID_MPEG4, + .write_header = nut_write_header, + .write_packet = nut_write_packet, + .write_trailer = nut_write_trailer, .flags = AVFMT_GLOBALHEADER, }; #endif /* CONFIG_LIBNUT_MUXER */ @@ -213,7 +214,7 @@ priv->s = s; for (i = 0; s[i].type != -1 && i < 2; i++) { - AVStream * st = av_new_stream(avf, i); + AVStream * st = avformat_new_stream(avf, NULL); int j; for (j = 0; j < s[i].fourcc_len && j < 8; j++) st->codec->codec_tag |= s[i].fourcc[j]<<(j*8); @@ -226,7 +227,7 @@ memcpy(st->codec->extradata, s[i].codec_specific, st->codec->extradata_size); } - av_set_pts_info(avf->streams[i], 60, s[i].time_base.num, s[i].time_base.den); + avpriv_set_pts_info(avf->streams[i], 60, s[i].time_base.num, s[i].time_base.den); st->start_time = 0; st->duration = s[i].max_pts; @@ -298,13 +299,13 @@ } AVInputFormat ff_libnut_demuxer = { - "libnut", - NULL_IF_CONFIG_SMALL("NUT format"), - sizeof(NUTContext), - nut_probe, - nut_read_header, - nut_read_packet, - nut_read_close, - nut_read_seek, + .name = "libnut", + .long_name = NULL_IF_CONFIG_SMALL("NUT format"), + .priv_data_size = sizeof(NUTContext), + .read_probe = nut_probe, + .read_header = nut_read_header, + .read_packet = nut_read_packet, + .read_close = nut_read_close, + .read_seek = nut_read_seek, .extensions = "nut", }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/librtmp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/librtmp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/librtmp.c 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/librtmp.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,6 +24,7 @@ * RTMP protocol based on http://rtmpdump.mplayerhq.hu/ librtmp */ +#include "libavutil/mathematics.h" #include "avformat.h" #include "url.h" @@ -51,7 +52,6 @@ RTMP *r = s->priv_data; RTMP_Close(r); - av_free(r); return 0; } @@ -69,13 +69,9 @@ */ static int rtmp_open(URLContext *s, const char *uri, int flags) { - RTMP *r; + RTMP *r = s->priv_data; int rc; - r = av_mallocz(sizeof(RTMP)); - if (!r) - return AVERROR(ENOMEM); - switch (av_log_get_level()) { default: case AV_LOG_FATAL: rc = RTMP_LOGCRIT; break; @@ -102,11 +98,9 @@ goto fail; } - s->priv_data = r; s->is_streamed = 1; return 0; fail: - av_free(r); return rc; } @@ -166,7 +160,9 @@ .url_close = rtmp_close, .url_read_pause = rtmp_read_pause, .url_read_seek = rtmp_read_seek, - .url_get_file_handle = rtmp_get_file_handle + .url_get_file_handle = rtmp_get_file_handle, + .priv_data_size = sizeof(RTMP), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; URLProtocol ff_rtmpt_protocol = { @@ -177,7 +173,9 @@ .url_close = rtmp_close, .url_read_pause = rtmp_read_pause, .url_read_seek = rtmp_read_seek, - .url_get_file_handle = rtmp_get_file_handle + .url_get_file_handle = rtmp_get_file_handle, + .priv_data_size = sizeof(RTMP), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; URLProtocol ff_rtmpe_protocol = { @@ -188,7 +186,9 @@ .url_close = rtmp_close, .url_read_pause = rtmp_read_pause, .url_read_seek = rtmp_read_seek, - .url_get_file_handle = rtmp_get_file_handle + .url_get_file_handle = rtmp_get_file_handle, + .priv_data_size = sizeof(RTMP), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; URLProtocol ff_rtmpte_protocol = { @@ -199,7 +199,9 @@ .url_close = rtmp_close, .url_read_pause = rtmp_read_pause, .url_read_seek = rtmp_read_seek, - .url_get_file_handle = rtmp_get_file_handle + .url_get_file_handle = rtmp_get_file_handle, + .priv_data_size = sizeof(RTMP), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; URLProtocol ff_rtmps_protocol = { @@ -210,5 +212,7 @@ .url_close = rtmp_close, .url_read_pause = rtmp_read_pause, .url_read_seek = rtmp_read_seek, - .url_get_file_handle = rtmp_get_file_handle + .url_get_file_handle = rtmp_get_file_handle, + .priv_data_size = sizeof(RTMP), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/lmlm4.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/lmlm4.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/lmlm4.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/lmlm4.c 2012-01-11 00:34:30.000000000 +0000 @@ -24,6 +24,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define LMLM4_I_FRAME 0x00 #define LMLM4_P_FRAME 0x01 @@ -60,14 +61,14 @@ static int lmlm4_read_header(AVFormatContext *s, AVFormatParameters *ap) { AVStream *st; - if (!(st = av_new_stream(s, 0))) + if (!(st = avformat_new_stream(s, NULL))) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_MPEG4; st->need_parsing = AVSTREAM_PARSE_HEADERS; - av_set_pts_info(st, 64, 1001, 30000); + avpriv_set_pts_info(st, 64, 1001, 30000); - if (!(st = av_new_stream(s, 1))) + if (!(st = avformat_new_stream(s, NULL))) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_MP2; @@ -118,10 +119,9 @@ } AVInputFormat ff_lmlm4_demuxer = { - "lmlm4", - NULL_IF_CONFIG_SMALL("lmlm4 raw format"), - 0, - lmlm4_probe, - lmlm4_read_header, - lmlm4_read_packet, + .name = "lmlm4", + .long_name = NULL_IF_CONFIG_SMALL("lmlm4 raw format"), + .read_probe = lmlm4_probe, + .read_header = lmlm4_read_header, + .read_packet = lmlm4_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/lxfdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/lxfdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/lxfdec.c 2011-04-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/lxfdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #include "riff.h" #define LXF_PACKET_HEADER_SIZE 60 @@ -174,14 +175,14 @@ //use audio packet size to determine video standard //for NTSC we have one 8008-sample audio frame per five video frames if (samples == LXF_SAMPLERATE * 5005 / 30000) { - av_set_pts_info(s->streams[0], 64, 1001, 30000); + avpriv_set_pts_info(s->streams[0], 64, 1001, 30000); } else { //assume PAL, but warn if we don't have 1920 samples if (samples != LXF_SAMPLERATE / 25) av_log(s, AV_LOG_WARNING, "video doesn't seem to be PAL or NTSC. guessing PAL\n"); - av_set_pts_info(s->streams[0], 64, 1, 25); + avpriv_set_pts_info(s->streams[0], 64, 1, 25); } //TODO: warning if track mask != (1 << channels) - 1? @@ -217,7 +218,7 @@ if ((ret = avio_read(pb, header_data, LXF_HEADER_DATA_SIZE)) != LXF_HEADER_DATA_SIZE) return ret < 0 ? ret : AVERROR_EOF; - if (!(st = av_new_stream(s, 0))) + if (!(st = avformat_new_stream(s, NULL))) return AVERROR(ENOMEM); st->duration = AV_RL32(&header_data[32]); @@ -243,14 +244,14 @@ av_log(s, AV_LOG_WARNING, "VBI data not yet supported\n"); if ((lxf->channels = (disk_params >> 2) & 0xF)) { - if (!(st = av_new_stream(s, 1))) + if (!(st = avformat_new_stream(s, NULL))) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->sample_rate = LXF_SAMPLERATE; st->codec->channels = lxf->channels; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); } if (format == 1) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/Makefile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/Makefile 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/Makefile 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,3 @@ -include $(SUBDIR)../config.mak - NAME = avformat FFLIBS = avcodec avutil @@ -16,11 +14,15 @@ seek.o \ utils.o \ +OBJS-$(CONFIG_NETWORK) += network.o + # muxers/demuxers OBJS-$(CONFIG_A64_MUXER) += a64.o OBJS-$(CONFIG_AAC_DEMUXER) += aacdec.o rawdec.o OBJS-$(CONFIG_AC3_DEMUXER) += ac3dec.o rawdec.o OBJS-$(CONFIG_AC3_MUXER) += rawenc.o +OBJS-$(CONFIG_ADX_DEMUXER) += adxdec.o +OBJS-$(CONFIG_ADX_MUXER) += rawenc.o OBJS-$(CONFIG_ADTS_MUXER) += adtsenc.o OBJS-$(CONFIG_AEA_DEMUXER) += aea.o pcm.o OBJS-$(CONFIG_AIFF_DEMUXER) += aiffdec.o riff.o pcm.o @@ -38,16 +40,18 @@ OBJS-$(CONFIG_ASS_MUXER) += assenc.o OBJS-$(CONFIG_AU_DEMUXER) += au.o pcm.o OBJS-$(CONFIG_AU_MUXER) += au.o -OBJS-$(CONFIG_AVI_DEMUXER) += avidec.o riff.o avi.o -OBJS-$(CONFIG_AVI_MUXER) += avienc.o riff.o avi.o +OBJS-$(CONFIG_AVI_DEMUXER) += avidec.o riff.o +OBJS-$(CONFIG_AVI_MUXER) += avienc.o riff.o OBJS-$(CONFIG_AVISYNTH) += avisynth.o OBJS-$(CONFIG_AVM2_MUXER) += swfenc.o OBJS-$(CONFIG_AVS_DEMUXER) += avs.o vocdec.o voc.o OBJS-$(CONFIG_BETHSOFTVID_DEMUXER) += bethsoftvid.o OBJS-$(CONFIG_BFI_DEMUXER) += bfi.o OBJS-$(CONFIG_BINK_DEMUXER) += bink.o +OBJS-$(CONFIG_BMV_DEMUXER) += bmv.o OBJS-$(CONFIG_C93_DEMUXER) += c93.o vocdec.o voc.o -OBJS-$(CONFIG_CAF_DEMUXER) += cafdec.o caf.o mov.o riff.o isom.o +OBJS-$(CONFIG_CAF_DEMUXER) += cafdec.o caf.o mov.o mov_chan.o \ + riff.o isom.o OBJS-$(CONFIG_CAVSVIDEO_DEMUXER) += cavsvideodec.o rawdec.o OBJS-$(CONFIG_CAVSVIDEO_MUXER) += rawenc.o OBJS-$(CONFIG_CDG_DEMUXER) += cdg.o @@ -87,7 +91,7 @@ OBJS-$(CONFIG_FRAMECRC_MUXER) += framecrcenc.o OBJS-$(CONFIG_FRAMEMD5_MUXER) += md5enc.o OBJS-$(CONFIG_GIF_MUXER) += gif.o -OBJS-$(CONFIG_GSM_DEMUXER) += rawdec.o +OBJS-$(CONFIG_GSM_DEMUXER) += gsmdec.o OBJS-$(CONFIG_GXF_DEMUXER) += gxf.o OBJS-$(CONFIG_GXF_MUXER) += gxfenc.o audiointerleave.o OBJS-$(CONFIG_G722_DEMUXER) += rawdec.o @@ -111,6 +115,8 @@ OBJS-$(CONFIG_IVF_DEMUXER) += ivfdec.o riff.o OBJS-$(CONFIG_IVF_MUXER) += ivfenc.o OBJS-$(CONFIG_JV_DEMUXER) += jvdec.o +OBJS-$(CONFIG_LATM_DEMUXER) += rawdec.o +OBJS-$(CONFIG_LATM_MUXER) += latmenc.o OBJS-$(CONFIG_LMLM4_DEMUXER) += lmlm4.o OBJS-$(CONFIG_LXF_DEMUXER) += lxfdec.o OBJS-$(CONFIG_M4V_DEMUXER) += m4vdec.o rawdec.o @@ -128,12 +134,13 @@ OBJS-$(CONFIG_MM_DEMUXER) += mm.o OBJS-$(CONFIG_MMF_DEMUXER) += mmf.o pcm.o OBJS-$(CONFIG_MMF_MUXER) += mmf.o riff.o -OBJS-$(CONFIG_MOV_DEMUXER) += mov.o riff.o isom.o +OBJS-$(CONFIG_MOV_DEMUXER) += mov.o riff.o isom.o mov_chan.o OBJS-$(CONFIG_MOV_MUXER) += movenc.o riff.o isom.o avc.o \ - movenchint.o rtpenc_chain.o + movenchint.o rtpenc_chain.o \ + mov_chan.o OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o -OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o +OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o OBJS-$(CONFIG_MPC_DEMUXER) += mpc.o apetag.o OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o OBJS-$(CONFIG_MPEG1SYSTEM_MUXER) += mpegenc.o @@ -161,6 +168,7 @@ OBJS-$(CONFIG_NUT_MUXER) += nutenc.o nut.o riff.o OBJS-$(CONFIG_NUV_DEMUXER) += nuv.o riff.o OBJS-$(CONFIG_OGG_DEMUXER) += oggdec.o \ + oggparsecelt.o \ oggparsedirac.o \ oggparseflac.o \ oggparseogm.o \ @@ -172,7 +180,8 @@ vorbiscomment.o OBJS-$(CONFIG_OGG_MUXER) += oggenc.o \ vorbiscomment.o -OBJS-$(CONFIG_OMA_DEMUXER) += oma.o pcm.o +OBJS-$(CONFIG_OMA_DEMUXER) += omadec.o pcm.o oma.o +OBJS-$(CONFIG_OMA_MUXER) += omaenc.o rawenc.o oma.o id3v2enc.o OBJS-$(CONFIG_PCM_ALAW_DEMUXER) += pcmdec.o pcm.o rawdec.o OBJS-$(CONFIG_PCM_ALAW_MUXER) += pcmenc.o rawenc.o OBJS-$(CONFIG_PCM_F32BE_DEMUXER) += pcmdec.o pcm.o rawdec.o @@ -213,6 +222,7 @@ OBJS-$(CONFIG_PCM_U32LE_MUXER) += pcmenc.o rawenc.o OBJS-$(CONFIG_PCM_U8_DEMUXER) += pcmdec.o pcm.o rawdec.o OBJS-$(CONFIG_PCM_U8_MUXER) += pcmenc.o rawenc.o +OBJS-$(CONFIG_PMP_DEMUXER) += pmpdec.o OBJS-$(CONFIG_PVA_DEMUXER) += pva.o OBJS-$(CONFIG_QCP_DEMUXER) += qcp.o OBJS-$(CONFIG_R3D_DEMUXER) += r3d.o @@ -242,6 +252,7 @@ rtpdec.o \ rtpdec_amr.o \ rtpdec_asf.o \ + rtpdec_g726.o \ rtpdec_h263.o \ rtpdec_h264.o \ rtpdec_latm.o \ @@ -259,9 +270,11 @@ OBJS-$(CONFIG_SAP_MUXER) += sapenc.o rtpenc_chain.o OBJS-$(CONFIG_SDP_DEMUXER) += rtsp.o OBJS-$(CONFIG_SEGAFILM_DEMUXER) += segafilm.o +OBJS-$(CONFIG_SEGMENT_MUXER) += segment.o OBJS-$(CONFIG_SHORTEN_DEMUXER) += rawdec.o OBJS-$(CONFIG_SIFF_DEMUXER) += siff.o OBJS-$(CONFIG_SMACKER_DEMUXER) += smacker.o +OBJS-$(CONFIG_SMJPEG_DEMUXER) += smjpeg.o OBJS-$(CONFIG_SOL_DEMUXER) += sol.o pcm.o OBJS-$(CONFIG_SOX_DEMUXER) += soxdec.o pcm.o OBJS-$(CONFIG_SOX_MUXER) += soxenc.o @@ -300,6 +313,7 @@ avlanguage.o mpegts.o isom.o riff.o OBJS-$(CONFIG_WV_DEMUXER) += wv.o apetag.o OBJS-$(CONFIG_XA_DEMUXER) += xa.o +OBJS-$(CONFIG_XMV_DEMUXER) += xmv.o riff.o OBJS-$(CONFIG_XWMA_DEMUXER) += xwma.o riff.o OBJS-$(CONFIG_YOP_DEMUXER) += yop.o OBJS-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg.o @@ -318,6 +332,8 @@ OBJS-$(CONFIG_FILE_PROTOCOL) += file.o OBJS-$(CONFIG_GOPHER_PROTOCOL) += gopher.o OBJS-$(CONFIG_HTTP_PROTOCOL) += http.o httpauth.o +OBJS-$(CONFIG_HTTPPROXY_PROTOCOL) += http.o httpauth.o +OBJS-$(CONFIG_HTTPS_PROTOCOL) += http.o httpauth.o OBJS-$(CONFIG_MMSH_PROTOCOL) += mmsh.o mms.o asf.o OBJS-$(CONFIG_MMST_PROTOCOL) += mmst.o mms.o asf.o OBJS-$(CONFIG_MD5_PROTOCOL) += md5proto.o @@ -330,14 +346,13 @@ OBJS-$(CONFIG_RTP_PROTOCOL) += rtpproto.o OBJS-$(CONFIG_TCP_PROTOCOL) += tcp.o +OBJS-$(CONFIG_TLS_PROTOCOL) += tls.o OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o -# libavdevice dependencies -OBJS-$(CONFIG_JACK_INDEV) += timefilter.o - -EXAMPLES = output -TESTPROGS = timefilter +SKIPHEADERS-$(CONFIG_NETWORK) += network.h rtsp.h -include $(SUBDIR)../subdir.mak +EXAMPLES = metadata output +TESTPROGS = seek +TOOLS = pktdumper probetest $(SUBDIR)output-example$(EXESUF): ELIBS = -lswscale diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/matroskadec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/matroskadec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/matroskadec.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/matroskadec.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,10 +22,10 @@ /** * @file * Matroska file demuxer - * by Ronald Bultje - * with a little help from Moritz Bunkus - * totally reworked by Aurelien Jacobs - * Specs available on the Matroska project page: http://www.matroska.org/. + * @author Ronald Bultje + * @author with a little help from Moritz Bunkus + * @author totally reworked by Aurelien Jacobs + * @see specs available on the Matroska project page: http://www.matroska.org/ */ #include @@ -38,7 +38,7 @@ #include "rm.h" #include "matroska.h" #include "libavcodec/mpeg4audio.h" -#include "libavutil/intfloat_readwrite.h" +#include "libavutil/intfloat.h" #include "libavutil/intreadwrite.h" #include "libavutil/avstring.h" #include "libavutil/lzo.h" @@ -244,6 +244,9 @@ /* What to skip before effectively reading a packet. */ int skip_to_keyframe; uint64_t skip_to_timecode; + + /* File has a CUES element, but we defer parsing until it is needed. */ + int cues_parsing_deferred; } MatroskaDemuxContext; typedef struct { @@ -621,9 +624,9 @@ if (size == 0) { *num = 0; } else if (size == 4) { - *num= av_int2flt(avio_rb32(pb)); - } else if(size==8){ - *num= av_int2dbl(avio_rb64(pb)); + *num = av_int2float(avio_rb32(pb)); + } else if (size == 8){ + *num = av_int2double(avio_rb64(pb)); } else return AVERROR_INVALIDDATA; @@ -798,11 +801,15 @@ uint32_t id = syntax->id; uint64_t length; int res; + void *newelem; data = (char *)data + syntax->data_offset; if (syntax->list_elem_size) { EbmlList *list = data; - list->elem = av_realloc(list->elem, (list->nb_elem+1)*syntax->list_elem_size); + newelem = av_realloc(list->elem, (list->nb_elem+1)*syntax->list_elem_size); + if (!newelem) + return AVERROR(ENOMEM); + list->elem = newelem; data = (char*)list->elem + list->nb_elem*syntax->list_elem_size; memset(data, 0, syntax->list_elem_size); list->nb_elem++; @@ -900,6 +907,8 @@ * Not fully fool-proof, but good enough. */ for (i = 0; i < FF_ARRAY_ELEMS(matroska_doctypes); i++) { int probelen = strlen(matroska_doctypes[i]); + if (total < probelen) + continue; for (n = 4+size; n <= 4+size+total-probelen; n++) if (!memcmp(p->buf+n, matroska_doctypes[i], probelen)) return AVPROBE_SCORE_MAX; @@ -930,6 +939,7 @@ uint8_t* data = *buf; int isize = *buf_size; uint8_t* pkt_data = NULL; + uint8_t* newpktdata; int pkt_size = isize; int result = 0; int olen; @@ -959,7 +969,12 @@ zstream.avail_in = isize; do { pkt_size *= 3; - pkt_data = av_realloc(pkt_data, pkt_size); + newpktdata = av_realloc(pkt_data, pkt_size); + if (!newpktdata) { + inflateEnd(&zstream); + goto failed; + } + pkt_data = newpktdata; zstream.avail_out = pkt_size - zstream.total_out; zstream.next_out = pkt_data + zstream.total_out; result = inflate(&zstream, Z_NO_FLUSH); @@ -980,7 +995,12 @@ bzstream.avail_in = isize; do { pkt_size *= 3; - pkt_data = av_realloc(pkt_data, pkt_size); + newpktdata = av_realloc(pkt_data, pkt_size); + if (!newpktdata) { + BZ2_bzDecompressEnd(&bzstream); + goto failed; + } + pkt_data = newpktdata; bzstream.avail_out = pkt_size - bzstream.total_out_lo32; bzstream.next_out = pkt_data + bzstream.total_out_lo32; result = BZ2_bzDecompress(&bzstream); @@ -1035,13 +1055,17 @@ } } -static void matroska_merge_packets(AVPacket *out, AVPacket *in) +static int matroska_merge_packets(AVPacket *out, AVPacket *in) { - out->data = av_realloc(out->data, out->size+in->size); + void *newdata = av_realloc(out->data, out->size+in->size); + if (!newdata) + return AVERROR(ENOMEM); + out->data = newdata; memcpy(out->data+out->size, in->data, in->size); out->size += in->size; av_destruct_packet(in); av_free(in); + return 0; } static void matroska_convert_tag(AVFormatContext *s, EbmlList *list, @@ -1110,7 +1134,7 @@ } } -static void matroska_execute_seekhead(MatroskaDemuxContext *matroska) +static int matroska_parse_seekhead_entry(MatroskaDemuxContext *matroska, int idx) { EbmlList *seekhead_list = &matroska->seekhead; MatroskaSeekhead *seekhead = seekhead_list->elem; @@ -1118,6 +1142,53 @@ int64_t before_pos = avio_tell(matroska->ctx->pb); uint32_t saved_id = matroska->current_id; MatroskaLevel level; + int64_t offset; + int ret = 0; + + if (idx >= seekhead_list->nb_elem + || seekhead[idx].id == MATROSKA_ID_SEEKHEAD + || seekhead[idx].id == MATROSKA_ID_CLUSTER) + return 0; + + /* seek */ + offset = seekhead[idx].pos + matroska->segment_start; + if (avio_seek(matroska->ctx->pb, offset, SEEK_SET) == offset) { + /* We don't want to lose our seekhead level, so we add + * a dummy. This is a crude hack. */ + if (matroska->num_levels == EBML_MAX_DEPTH) { + av_log(matroska->ctx, AV_LOG_INFO, + "Max EBML element depth (%d) reached, " + "cannot parse further.\n", EBML_MAX_DEPTH); + ret = AVERROR_INVALIDDATA; + } else { + level.start = 0; + level.length = (uint64_t)-1; + matroska->levels[matroska->num_levels] = level; + matroska->num_levels++; + matroska->current_id = 0; + + ret = ebml_parse(matroska, matroska_segment, matroska); + + /* remove dummy level */ + while (matroska->num_levels) { + uint64_t length = matroska->levels[--matroska->num_levels].length; + if (length == (uint64_t)-1) + break; + } + } + } + /* seek back */ + avio_seek(matroska->ctx->pb, before_pos, SEEK_SET); + matroska->level_up = level_up; + matroska->current_id = saved_id; + + return ret; +} + +static void matroska_execute_seekhead(MatroskaDemuxContext *matroska) +{ + EbmlList *seekhead_list = &matroska->seekhead; + int64_t before_pos = avio_tell(matroska->ctx->pb); int i; // we should not do any seeking in the streaming case @@ -1125,47 +1196,56 @@ (matroska->ctx->flags & AVFMT_FLAG_IGNIDX)) return; - for (i=0; inb_elem; i++) { - int64_t offset = seekhead[i].pos + matroska->segment_start; - - if (seekhead[i].pos <= before_pos - || seekhead[i].id == MATROSKA_ID_SEEKHEAD - || seekhead[i].id == MATROSKA_ID_CLUSTER) + for (i = 0; i < seekhead_list->nb_elem; i++) { + MatroskaSeekhead *seekhead = seekhead_list->elem; + if (seekhead[i].pos <= before_pos) continue; - /* seek */ - if (avio_seek(matroska->ctx->pb, offset, SEEK_SET) != offset) + // defer cues parsing until we actually need cue data. + if (seekhead[i].id == MATROSKA_ID_CUES) { + matroska->cues_parsing_deferred = 1; continue; + } - /* We don't want to lose our seekhead level, so we add - * a dummy. This is a crude hack. */ - if (matroska->num_levels == EBML_MAX_DEPTH) { - av_log(matroska->ctx, AV_LOG_INFO, - "Max EBML element depth (%d) reached, " - "cannot parse further.\n", EBML_MAX_DEPTH); + if (matroska_parse_seekhead_entry(matroska, i) < 0) break; - } + } +} - level.start = 0; - level.length = (uint64_t)-1; - matroska->levels[matroska->num_levels] = level; - matroska->num_levels++; - matroska->current_id = 0; +static void matroska_parse_cues(MatroskaDemuxContext *matroska) { + EbmlList *seekhead_list = &matroska->seekhead; + MatroskaSeekhead *seekhead = seekhead_list->elem; + EbmlList *index_list; + MatroskaIndex *index; + int index_scale = 1; + int i, j; - ebml_parse(matroska, matroska_segment, matroska); + for (i = 0; i < seekhead_list->nb_elem; i++) + if (seekhead[i].id == MATROSKA_ID_CUES) + break; + assert(i <= seekhead_list->nb_elem); - /* remove dummy level */ - while (matroska->num_levels) { - uint64_t length = matroska->levels[--matroska->num_levels].length; - if (length == (uint64_t)-1) - break; + matroska_parse_seekhead_entry(matroska, i); + + index_list = &matroska->index; + index = index_list->elem; + if (index_list->nb_elem + && index[0].time > 1E14/matroska->time_scale) { + av_log(matroska->ctx, AV_LOG_WARNING, "Working around broken index.\n"); + index_scale = matroska->time_scale; + } + for (i = 0; i < index_list->nb_elem; i++) { + EbmlList *pos_list = &index[i].pos; + MatroskaIndexPos *pos = pos_list->elem; + for (j = 0; j < pos_list->nb_elem; j++) { + MatroskaTrack *track = matroska_find_track_by_num(matroska, pos[j].track); + if (track && track->stream) + av_add_index_entry(track->stream, + pos[j].pos + matroska->segment_start, + index[i].time/index_scale, 0, 0, + AVINDEX_KEYFRAME); } } - - /* seek back */ - avio_seek(matroska->ctx->pb, before_pos, SEEK_SET); - matroska->level_up = level_up; - matroska->current_id = saved_id; } static int matroska_aac_profile(char *codec_id) @@ -1183,8 +1263,8 @@ { int sri; - for (sri=0; srichapters; MatroskaChapter *chapters; MatroskaTrack *tracks; - EbmlList *index_list; - MatroskaIndex *index; - int index_scale = 1; uint64_t max_start = 0; Ebml ebml = { 0 }; AVStream *st; @@ -1274,7 +1351,7 @@ } if (encodings_list->nb_elem > 1) { av_log(matroska->ctx, AV_LOG_ERROR, - "Multiple combined encodings no supported"); + "Multiple combined encodings not supported"); } else if (encodings_list->nb_elem == 1) { if (encodings[0].type || (encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP && @@ -1319,7 +1396,7 @@ } } - st = track->stream = av_new_stream(s, 0); + st = track->stream = avformat_new_stream(s, NULL); if (st == NULL) return AVERROR(ENOMEM); @@ -1429,7 +1506,7 @@ if (track->time_scale < 0.01) track->time_scale = 1.0; - av_set_pts_info(st, 64, matroska->time_scale*track->time_scale, 1000*1000*1000); /* 64 bit pts in ns */ + avpriv_set_pts_info(st, 64, matroska->time_scale*track->time_scale, 1000*1000*1000); /* 64 bit pts in ns */ st->codec->codec_id = codec_id; st->start_time = 0; @@ -1442,10 +1519,6 @@ if (track->flag_forced) st->disposition |= AV_DISPOSITION_FORCED; - if (track->default_duration) - av_reduce(&st->codec->time_base.num, &st->codec->time_base.den, - track->default_duration, 1000000000, 30000); - if (!st->codec->extradata) { if(extradata){ st->codec->extradata = extradata; @@ -1493,10 +1566,11 @@ attachements[j].bin.data && attachements[j].bin.size > 0)) { av_log(matroska->ctx, AV_LOG_ERROR, "incomplete attachment\n"); } else { - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); if (st == NULL) break; av_dict_set(&st->metadata, "filename",attachements[j].filename, 0); + av_dict_set(&st->metadata, "mimetype", attachements[j].mime, 0); st->codec->codec_id = CODEC_ID_NONE; st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT; st->codec->extradata = av_malloc(attachements[j].bin.size); @@ -1521,7 +1595,7 @@ if (chapters[i].start != AV_NOPTS_VALUE && chapters[i].uid && (max_start==0 || chapters[i].start > max_start)) { chapters[i].chapter = - ff_new_chapter(s, chapters[i].uid, (AVRational){1, 1000000000}, + avpriv_new_chapter(s, chapters[i].uid, (AVRational){1, 1000000000}, chapters[i].start, chapters[i].end, chapters[i].title); av_dict_set(&chapters[i].chapter->metadata, @@ -1529,27 +1603,6 @@ max_start = chapters[i].start; } - index_list = &matroska->index; - index = index_list->elem; - if (index_list->nb_elem - && index[0].time > 100000000000000/matroska->time_scale) { - av_log(matroska->ctx, AV_LOG_WARNING, "Working around broken index.\n"); - index_scale = matroska->time_scale; - } - for (i=0; inb_elem; i++) { - EbmlList *pos_list = &index[i].pos; - MatroskaIndexPos *pos = pos_list->elem; - for (j=0; jnb_elem; j++) { - MatroskaTrack *track = matroska_find_track_by_num(matroska, - pos[j].track); - if (track && track->stream) - av_add_index_entry(track->stream, - pos[j].pos + matroska->segment_start, - index[i].time/index_scale, 0, 0, - AVINDEX_KEYFRAME); - } - } - matroska_convert_tags(s); return 0; @@ -1566,11 +1619,13 @@ memcpy(pkt, matroska->packets[0], sizeof(AVPacket)); av_free(matroska->packets[0]); if (matroska->num_packets > 1) { + void *newpackets; memmove(&matroska->packets[0], &matroska->packets[1], (matroska->num_packets - 1) * sizeof(AVPacket *)); - matroska->packets = - av_realloc(matroska->packets, (matroska->num_packets - 1) * - sizeof(AVPacket *)); + newpackets = av_realloc(matroska->packets, + (matroska->num_packets - 1) * sizeof(AVPacket *)); + if (newpackets) + matroska->packets = newpackets; } else { av_freep(&matroska->packets); } @@ -1620,11 +1675,12 @@ size -= n; track = matroska_find_track_by_num(matroska, num); - if (size <= 3 || !track || !track->stream) { + if (!track || !track->stream) { av_log(matroska->ctx, AV_LOG_INFO, "Invalid stream %"PRIu64" or size %u\n", num, size); - return res; - } + return AVERROR_INVALIDDATA; + } else if (size <= 3) + return 0; st = track->stream; if (st->discard >= AVDISCARD_ALL) return res; @@ -1724,7 +1780,7 @@ lace_size[n] = lace_size[n - 1] + snum; total += lace_size[n]; } - lace_size[n] = size - total; + lace_size[laces - 1] = size - total; break; } } @@ -1860,7 +1916,7 @@ res = ebml_parse(matroska, matroska_clusters, &cluster); blocks_list = &cluster.blocks; blocks = blocks_list->elem; - for (i=0; inb_elem; i++) + for (i=0; inb_elem && !res; i++) if (blocks[i].bin.size > 0 && blocks[i].bin.data) { int is_keyframe = blocks[i].non_simple ? !blocks[i].reference : -1; if (!blocks[i].non_simple) @@ -1879,14 +1935,15 @@ static int matroska_read_packet(AVFormatContext *s, AVPacket *pkt) { MatroskaDemuxContext *matroska = s->priv_data; + int ret = 0; - while (matroska_deliver_packet(matroska, pkt)) { + while (!ret && matroska_deliver_packet(matroska, pkt)) { if (matroska->done) return AVERROR_EOF; - matroska_parse_cluster(matroska); + ret = matroska_parse_cluster(matroska); } - return 0; + return ret; } static int matroska_read_seek(AVFormatContext *s, int stream_index, @@ -1897,12 +1954,19 @@ AVStream *st = s->streams[stream_index]; int i, index, index_sub, index_min; + /* Parse the CUES now since we need the index data to seek. */ + if (matroska->cues_parsing_deferred) { + matroska_parse_cues(matroska); + matroska->cues_parsing_deferred = 0; + } + if (!st->nb_index_entries) return 0; timestamp = FFMAX(timestamp, st->index_entries[0].timestamp); if ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) { avio_seek(s->pb, st->index_entries[st->nb_index_entries-1].pos, SEEK_SET); + matroska->current_id = 0; while ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) { matroska_clear_queue(matroska); if (matroska_parse_cluster(matroska) < 0) @@ -1931,10 +1995,11 @@ } avio_seek(s->pb, st->index_entries[index_min].pos, SEEK_SET); + matroska->current_id = 0; matroska->skip_to_keyframe = !(flags & AVSEEK_FLAG_ANY); matroska->skip_to_timecode = st->index_entries[index].timestamp; matroska->done = 0; - av_update_cur_dts(s, st, st->index_entries[index].timestamp); + ff_update_cur_dts(s, st, st->index_entries[index].timestamp); return 0; } @@ -1955,12 +2020,12 @@ } AVInputFormat ff_matroska_demuxer = { - "matroska,webm", - NULL_IF_CONFIG_SMALL("Matroska/WebM file format"), - sizeof(MatroskaDemuxContext), - matroska_probe, - matroska_read_header, - matroska_read_packet, - matroska_read_close, - matroska_read_seek, + .name = "matroska,webm", + .long_name = NULL_IF_CONFIG_SMALL("Matroska/WebM file format"), + .priv_data_size = sizeof(MatroskaDemuxContext), + .read_probe = matroska_probe, + .read_header = matroska_read_header, + .read_packet = matroska_read_packet, + .read_close = matroska_read_close, + .read_seek = matroska_read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/matroskaenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/matroskaenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/matroskaenc.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/matroskaenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ */ #include "avformat.h" +#include "internal.h" #include "riff.h" #include "isom.h" #include "matroska.h" @@ -28,12 +29,14 @@ #include "avlanguage.h" #include "libavutil/samplefmt.h" #include "libavutil/intreadwrite.h" +#include "libavutil/intfloat.h" +#include "libavutil/mathematics.h" #include "libavutil/random_seed.h" #include "libavutil/lfg.h" #include "libavutil/dict.h" +#include "libavutil/avstring.h" #include "libavcodec/xiph.h" #include "libavcodec/mpeg4audio.h" -#include typedef struct ebml_master { int64_t pos; ///< absolute offset in the file where the master's elements start @@ -89,6 +92,8 @@ unsigned int audio_buffer_size; AVPacket cur_audio_pkt; + + int have_attachments; } MatroskaMuxContext; @@ -180,7 +185,7 @@ { put_ebml_id(pb, elementid); put_ebml_num(pb, 8, 0); - avio_wb64(pb, av_dbl2int(val)); + avio_wb64(pb, av_double2int(val)); } static void put_ebml_binary(AVIOContext *pb, unsigned int elementid, @@ -313,9 +318,12 @@ currentpos = avio_tell(pb); - if (seekhead->reserved_size > 0) - if (avio_seek(pb, seekhead->filepos, SEEK_SET) < 0) - return -1; + if (seekhead->reserved_size > 0) { + if (avio_seek(pb, seekhead->filepos, SEEK_SET) < 0) { + currentpos = -1; + goto fail; + } + } metaseek = start_ebml_master(pb, MATROSKA_ID_SEEKHEAD, seekhead->reserved_size); for (i = 0; i < seekhead->num_entries; i++) { @@ -339,6 +347,7 @@ currentpos = seekhead->filepos; } +fail: av_free(seekhead->entries); av_free(seekhead); @@ -419,7 +428,7 @@ else first_header_size = 42; - if (ff_split_xiph_headers(codec->extradata, codec->extradata_size, + if (avpriv_split_xiph_headers(codec->extradata, codec->extradata_size, first_header_size, header_start, header_len) < 0) { av_log(s, AV_LOG_ERROR, "Extradata corrupt.\n"); return -1; @@ -439,7 +448,8 @@ { MPEG4AudioConfig mp4ac; - if (ff_mpeg4audio_get_config(&mp4ac, codec->extradata, codec->extradata_size) < 0) { + if (avpriv_mpeg4audio_get_config(&mp4ac, codec->extradata, + codec->extradata_size * 8, 1) < 0) { av_log(s, AV_LOG_WARNING, "Error parsing AAC extradata, unable to determine samplerate.\n"); return; } @@ -526,6 +536,11 @@ int output_sample_rate = 0; AVDictionaryEntry *tag; + if (codec->codec_type == AVMEDIA_TYPE_ATTACHMENT) { + mkv->have_attachments = 1; + continue; + } + if (!bit_depth) bit_depth = av_get_bytes_per_sample(codec->sample_fmt) << 3; @@ -649,7 +664,7 @@ end_ebml_master(pb, track); // ms precision is the de-facto standard timescale for mkv files - av_set_pts_info(st, 64, 1, 1000); + avpriv_set_pts_info(st, 64, 1, 1000); } end_ebml_master(pb, tracks); return 0; @@ -751,7 +766,7 @@ end_ebml_master(s->pb, targets); while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX))) - if (strcasecmp(t->key, "title")) + if (av_strcasecmp(t->key, "title")) mkv_write_simpletag(s->pb, t); end_ebml_master(s->pb, tag); @@ -795,6 +810,68 @@ return 0; } +static int mkv_write_attachments(AVFormatContext *s) +{ + MatroskaMuxContext *mkv = s->priv_data; + AVIOContext *pb = s->pb; + ebml_master attachments; + AVLFG c; + int i, ret; + + if (!mkv->have_attachments) + return 0; + + av_lfg_init(&c, av_get_random_seed()); + + ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_ATTACHMENTS, avio_tell(pb)); + if (ret < 0) return ret; + + attachments = start_ebml_master(pb, MATROSKA_ID_ATTACHMENTS, 0); + + for (i = 0; i < s->nb_streams; i++) { + AVStream *st = s->streams[i]; + ebml_master attached_file; + AVDictionaryEntry *t; + const char *mimetype = NULL; + + if (st->codec->codec_type != AVMEDIA_TYPE_ATTACHMENT) + continue; + + attached_file = start_ebml_master(pb, MATROSKA_ID_ATTACHEDFILE, 0); + + if (t = av_dict_get(st->metadata, "title", NULL, 0)) + put_ebml_string(pb, MATROSKA_ID_FILEDESC, t->value); + if (!(t = av_dict_get(st->metadata, "filename", NULL, 0))) { + av_log(s, AV_LOG_ERROR, "Attachment stream %d has no filename tag.\n", i); + return AVERROR(EINVAL); + } + put_ebml_string(pb, MATROSKA_ID_FILENAME, t->value); + if (t = av_dict_get(st->metadata, "mimetype", NULL, 0)) + mimetype = t->value; + else if (st->codec->codec_id != CODEC_ID_NONE ) { + int i; + for (i = 0; ff_mkv_mime_tags[i].id != CODEC_ID_NONE; i++) + if (ff_mkv_mime_tags[i].id == st->codec->codec_id) { + mimetype = ff_mkv_mime_tags[i].str; + break; + } + } + if (!mimetype) { + av_log(s, AV_LOG_ERROR, "Attachment stream %d has no mimetype tag and " + "it cannot be deduced from the codec id.\n", i); + return AVERROR(EINVAL); + } + + put_ebml_string(pb, MATROSKA_ID_FILEMIMETYPE, mimetype); + put_ebml_binary(pb, MATROSKA_ID_FILEDATA, st->codec->extradata, st->codec->extradata_size); + put_ebml_uint(pb, MATROSKA_ID_FILEUID, av_lfg_get(&c)); + end_ebml_master(pb, attached_file); + } + end_ebml_master(pb, attachments); + + return 0; +} + static int mkv_write_header(AVFormatContext *s) { MatroskaMuxContext *mkv = s->priv_data; @@ -868,6 +945,9 @@ ret = mkv_write_tags(s); if (ret < 0) return ret; + + ret = mkv_write_attachments(s); + if (ret < 0) return ret; } if (!s->pb->seekable) @@ -930,7 +1010,7 @@ size -= start - data; sscanf(data, "Dialogue: %d,", &layer); i = snprintf(buffer, sizeof(buffer), "%"PRId64",%d,", - s->streams[pkt->stream_index]->nb_frames++, layer); + s->streams[pkt->stream_index]->nb_frames, layer); size = FFMIN(i+size, sizeof(buffer)); memcpy(buffer+i, start, size-i); @@ -1189,52 +1269,81 @@ return 0; } +static int mkv_query_codec(enum CodecID codec_id, int std_compliance) +{ + int i; + for (i = 0; ff_mkv_codec_tags[i].id != CODEC_ID_NONE; i++) + if (ff_mkv_codec_tags[i].id == codec_id) + return 1; + + if (std_compliance < FF_COMPLIANCE_NORMAL) { // mkv theoretically supports any + enum AVMediaType type = avcodec_get_type(codec_id); // video/audio through VFW/ACM + if (type == AVMEDIA_TYPE_VIDEO || type == AVMEDIA_TYPE_AUDIO) + return 1; + } + + return 0; +} + #if CONFIG_MATROSKA_MUXER AVOutputFormat ff_matroska_muxer = { - "matroska", - NULL_IF_CONFIG_SMALL("Matroska file format"), - "video/x-matroska", - "mkv", - sizeof(MatroskaMuxContext), - CODEC_ID_MP2, - CODEC_ID_MPEG4, - mkv_write_header, - mkv_write_packet, - mkv_write_trailer, - .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, - .codec_tag = (const AVCodecTag* const []){ff_codec_bmp_tags, ff_codec_wav_tags, 0}, - .subtitle_codec = CODEC_ID_TEXT, + .name = "matroska", + .long_name = NULL_IF_CONFIG_SMALL("Matroska file format"), + .mime_type = "video/x-matroska", + .extensions = "mkv", + .priv_data_size = sizeof(MatroskaMuxContext), +#if CONFIG_LIBVORBIS_ENCODER + .audio_codec = CODEC_ID_VORBIS, +#else + .audio_codec = CODEC_ID_AC3, +#endif +#if CONFIG_LIBX264_ENCODER + .video_codec = CODEC_ID_H264, +#else + .video_codec = CODEC_ID_MPEG4, +#endif + .write_header = mkv_write_header, + .write_packet = mkv_write_packet, + .write_trailer = mkv_write_trailer, + .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, + .codec_tag = (const AVCodecTag* const []){ff_codec_bmp_tags, ff_codec_wav_tags, 0}, + .subtitle_codec = CODEC_ID_SSA, + .query_codec = mkv_query_codec, }; #endif #if CONFIG_WEBM_MUXER AVOutputFormat ff_webm_muxer = { - "webm", - NULL_IF_CONFIG_SMALL("WebM file format"), - "video/webm", - "webm", - sizeof(MatroskaMuxContext), - CODEC_ID_VORBIS, - CODEC_ID_VP8, - mkv_write_header, - mkv_write_packet, - mkv_write_trailer, + .name = "webm", + .long_name = NULL_IF_CONFIG_SMALL("WebM file format"), + .mime_type = "video/webm", + .extensions = "webm", + .priv_data_size = sizeof(MatroskaMuxContext), + .audio_codec = CODEC_ID_VORBIS, + .video_codec = CODEC_ID_VP8, + .write_header = mkv_write_header, + .write_packet = mkv_write_packet, + .write_trailer = mkv_write_trailer, .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, }; #endif #if CONFIG_MATROSKA_AUDIO_MUXER AVOutputFormat ff_matroska_audio_muxer = { - "matroska", - NULL_IF_CONFIG_SMALL("Matroska file format"), - "audio/x-matroska", - "mka", - sizeof(MatroskaMuxContext), - CODEC_ID_MP2, - CODEC_ID_NONE, - mkv_write_header, - mkv_write_packet, - mkv_write_trailer, + .name = "matroska", + .long_name = NULL_IF_CONFIG_SMALL("Matroska file format"), + .mime_type = "audio/x-matroska", + .extensions = "mka", + .priv_data_size = sizeof(MatroskaMuxContext), +#if CONFIG_LIBVORBIS_ENCODER + .audio_codec = CODEC_ID_VORBIS, +#else + .audio_codec = CODEC_ID_AC3, +#endif + .video_codec = CODEC_ID_NONE, + .write_header = mkv_write_header, + .write_packet = mkv_write_packet, + .write_trailer = mkv_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){ff_codec_wav_tags, 0}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/md5enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/md5enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/md5enc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/md5enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -66,16 +66,16 @@ } AVOutputFormat ff_md5_muxer = { - "md5", - NULL_IF_CONFIG_SMALL("MD5 testing format"), - NULL, - "", - PRIVSIZE, - CODEC_ID_PCM_S16LE, - CODEC_ID_RAWVIDEO, - write_header, - write_packet, - write_trailer, + .name = "md5", + .long_name = NULL_IF_CONFIG_SMALL("MD5 testing format"), + .extensions = "", + .priv_data_size = PRIVSIZE, + .audio_codec = CODEC_ID_PCM_S16LE, + .video_codec = CODEC_ID_RAWVIDEO, + .write_header = write_header, + .write_packet = write_packet, + .write_trailer = write_trailer, + .flags = AVFMT_NOTIMESTAMPS, }; #endif @@ -96,15 +96,13 @@ } AVOutputFormat ff_framemd5_muxer = { - "framemd5", - NULL_IF_CONFIG_SMALL("Per-frame MD5 testing format"), - NULL, - "", - PRIVSIZE, - CODEC_ID_PCM_S16LE, - CODEC_ID_RAWVIDEO, - NULL, - framemd5_write_packet, - NULL, + .name = "framemd5", + .long_name = NULL_IF_CONFIG_SMALL("Per-frame MD5 testing format"), + .extensions = "", + .priv_data_size = PRIVSIZE, + .audio_codec = CODEC_ID_PCM_S16LE, + .video_codec = CODEC_ID_RAWVIDEO, + .write_packet = framemd5_write_packet, + .flags = AVFMT_VARIABLE_FPS, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/md5proto.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/md5proto.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/md5proto.c 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/md5proto.c 2012-01-11 00:34:30.000000000 +0000 @@ -36,7 +36,7 @@ return -1; } - if (!flags & AVIO_FLAG_WRITE) + if (!(flags & AVIO_FLAG_WRITE)) return AVERROR(EINVAL); av_md5_init(h->priv_data); @@ -65,7 +65,8 @@ av_strstart(filename, "md5:", &filename); if (*filename) { - err = ffurl_open(&out, filename, AVIO_FLAG_WRITE); + err = ffurl_open(&out, filename, AVIO_FLAG_WRITE, + &h->interrupt_callback, NULL); if (err) return err; err = ffurl_write(out, buf, i*2+1); @@ -78,16 +79,11 @@ return err; } -static int md5_get_handle(URLContext *h) -{ - return (intptr_t)h->priv_data; -} URLProtocol ff_md5_protocol = { .name = "md5", .url_open = md5_open, .url_write = md5_write, .url_close = md5_close, - .url_get_file_handle = md5_get_handle, .priv_data_size = PRIV_SIZE, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/metadata.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/metadata.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/metadata.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/metadata.c 2012-01-11 00:34:30.000000000 +0000 @@ -18,10 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include "avformat.h" #include "metadata.h" #include "libavutil/dict.h" +#include "libavutil/avstring.h" #if FF_API_OLD_METADATA2 AVDictionaryEntry * @@ -69,13 +69,13 @@ key = mtag->key; if (s_conv) for (sc=s_conv; sc->native; sc++) - if (!strcasecmp(key, sc->native)) { + if (!av_strcasecmp(key, sc->native)) { key = sc->generic; break; } if (d_conv) for (dc=d_conv; dc->native; dc++) - if (!strcasecmp(key, dc->generic)) { + if (!av_strcasecmp(key, dc->generic)) { key = dc->native; break; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/metadata-example.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/metadata-example.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/metadata-example.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/metadata-example.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2011 Reinhard Tartler + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * @file + * @example libavformat/metadata-example.c + * Shows how the metadata API can be used in application programs. + */ + +#include + +#include +#include + +int main (int argc, char **argv) +{ + AVFormatContext *fmt_ctx = NULL; + AVDictionaryEntry *tag = NULL; + int ret; + + if (argc != 2) { + printf("usage: %s \n" + "example program to demonstrate the use of the libavformat metadata API.\n" + "\n", argv[0]); + return 1; + } + + av_register_all(); + if ((ret = avformat_open_input(&fmt_ctx, argv[1], NULL, NULL))) + return ret; + + while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) + printf("%s=%s\n", tag->key, tag->value); + + avformat_free_context(fmt_ctx); + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mm.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mm.c 2012-01-11 00:34:30.000000000 +0000 @@ -33,6 +33,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define MM_PREAMBLE_SIZE 6 @@ -105,7 +106,7 @@ avio_skip(pb, length - 10); /* unknown data */ /* video stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; @@ -113,11 +114,11 @@ st->codec->codec_tag = 0; /* no fourcc */ st->codec->width = width; st->codec->height = height; - av_set_pts_info(st, 64, 1, frame_rate); + avpriv_set_pts_info(st, 64, 1, frame_rate); /* audio stream */ if (length == MM_HEADER_LEN_AV) { - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -125,7 +126,7 @@ st->codec->codec_id = CODEC_ID_PCM_U8; st->codec->channels = 1; st->codec->sample_rate = 8000; - av_set_pts_info(st, 64, 1, 8000); /* 8000 hz */ + avpriv_set_pts_info(st, 64, 1, 8000); /* 8000 hz */ } mm->audio_pts = 0; @@ -184,15 +185,13 @@ avio_skip(pb, length); } } - - return 0; } AVInputFormat ff_mm_demuxer = { - "mm", - NULL_IF_CONFIG_SMALL("American Laser Games MM format"), - sizeof(MmDemuxContext), - probe, - read_header, - read_packet, + .name = "mm", + .long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM format"), + .priv_data_size = sizeof(MmDemuxContext), + .read_probe = probe, + .read_header = read_header, + .read_packet = read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mmf.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mmf.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mmf.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mmf.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" +#include "internal.h" #include "avio_internal.h" #include "pcm.h" #include "riff.h" @@ -100,7 +101,7 @@ mmf->awapos = ff_start_tag(pb, "Awa\x01"); - av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); + avpriv_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); avio_flush(pb); @@ -241,7 +242,7 @@ } mmf->data_size = size; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -252,7 +253,7 @@ st->codec->bits_per_coded_sample = 4; st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); return 0; } @@ -291,27 +292,26 @@ #if CONFIG_MMF_DEMUXER AVInputFormat ff_mmf_demuxer = { - "mmf", - NULL_IF_CONFIG_SMALL("Yamaha SMAF"), - sizeof(MMFContext), - mmf_probe, - mmf_read_header, - mmf_read_packet, - NULL, - pcm_read_seek, + .name = "mmf", + .long_name = NULL_IF_CONFIG_SMALL("Yamaha SMAF"), + .priv_data_size = sizeof(MMFContext), + .read_probe = mmf_probe, + .read_header = mmf_read_header, + .read_packet = mmf_read_packet, + .read_seek = pcm_read_seek, }; #endif #if CONFIG_MMF_MUXER AVOutputFormat ff_mmf_muxer = { - "mmf", - NULL_IF_CONFIG_SMALL("Yamaha SMAF"), - "application/vnd.smaf", - "mmf", - sizeof(MMFContext), - CODEC_ID_ADPCM_YAMAHA, - CODEC_ID_NONE, - mmf_write_header, - mmf_write_packet, - mmf_write_trailer, + .name = "mmf", + .long_name = NULL_IF_CONFIG_SMALL("Yamaha SMAF"), + .mime_type = "application/vnd.smaf", + .extensions = "mmf", + .priv_data_size = sizeof(MMFContext), + .audio_codec = CODEC_ID_ADPCM_YAMAHA, + .video_codec = CODEC_ID_NONE, + .write_header = mmf_write_header, + .write_packet = mmf_write_packet, + .write_trailer = mmf_write_trailer, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mms.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mms.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mms.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mms.h 2012-01-11 00:34:30.000000000 +0000 @@ -33,7 +33,7 @@ /** Buffer for outgoing packets. */ /*@{*/ - uint8_t *write_out_ptr; ///< Pointer for writting the buffer. + uint8_t *write_out_ptr; ///< Pointer for writing the buffer. uint8_t out_buffer[512]; ///< Buffer for outgoing packet. /*@}*/ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mmsh.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mmsh.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mmsh.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mmsh.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,6 +28,7 @@ #include #include "libavutil/intreadwrite.h" #include "libavutil/avstring.h" +#include "libavutil/opt.h" #include "internal.h" #include "mms.h" #include "asf.h" @@ -67,7 +68,6 @@ ffurl_close(mms->mms_hd); av_free(mms->streams); av_free(mms->asf_header); - av_freep(&h->priv_data); return 0; } @@ -208,7 +208,6 @@ } } } - return 0; } static int mmsh_open(URLContext *h, const char *uri, int flags) @@ -217,12 +216,9 @@ char httpname[256], path[256], host[128], location[1024]; char *stream_selection = NULL; char headers[1024]; - MMSHContext *mmsh; + MMSHContext *mmsh = h->priv_data; MMSContext *mms; - mmsh = h->priv_data = av_mallocz(sizeof(MMSHContext)); - if (!h->priv_data) - return AVERROR(ENOMEM); mmsh->request_seq = h->is_streamed = 1; mms = &mmsh->mms; av_strlcpy(location, uri, sizeof(location)); @@ -233,7 +229,8 @@ port = 80; // default mmsh protocol port ff_url_join(httpname, sizeof(httpname), "http", NULL, host, port, "%s", path); - if (ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ) < 0) { + if (ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ, + &h->interrupt_callback) < 0) { return AVERROR(EIO); } @@ -246,9 +243,9 @@ CLIENTGUID "Connection: Close\r\n\r\n", host, port, mmsh->request_seq++); - ff_http_set_headers(mms->mms_hd, headers); + av_opt_set(mms->mms_hd->priv_data, "headers", headers, 0); - err = ffurl_connect(mms->mms_hd); + err = ffurl_connect(mms->mms_hd, NULL); if (err) { goto fail; } @@ -261,8 +258,9 @@ // close the socket and then reopen it for sending the second play request. ffurl_close(mms->mms_hd); memset(headers, 0, sizeof(headers)); - if (ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ) < 0) { - return AVERROR(EIO); + if ((err = ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ, + &h->interrupt_callback)) < 0) { + goto fail; } stream_selection = av_mallocz(mms->stream_num * 19 + 1); if (!stream_selection) @@ -292,9 +290,9 @@ goto fail; } av_dlog(NULL, "out_buffer is %s", headers); - ff_http_set_headers(mms->mms_hd, headers); + av_opt_set(mms->mms_hd->priv_data, "headers", headers, 0); - err = ffurl_connect(mms->mms_hd); + err = ffurl_connect(mms->mms_hd, NULL); if (err) { goto fail; } @@ -361,10 +359,10 @@ } URLProtocol ff_mmsh_protocol = { - .name = "mmsh", - .url_open = mmsh_open, - .url_read = mmsh_read, - .url_write = NULL, - .url_seek = NULL, - .url_close = mmsh_close, + .name = "mmsh", + .url_open = mmsh_open, + .url_read = mmsh_read, + .url_close = mmsh_close, + .priv_data_size = sizeof(MMSHContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mmst.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mmst.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mmst.c 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mmst.c 2012-01-11 00:34:30.000000000 +0000 @@ -470,7 +470,6 @@ /* free all separately allocated pointers in mms */ av_free(mms->streams); av_free(mms->asf_header); - av_freep(&h->priv_data); return 0; } @@ -502,15 +501,12 @@ static int mms_open(URLContext *h, const char *uri, int flags) { - MMSTContext *mmst; + MMSTContext *mmst = h->priv_data; MMSContext *mms; int port, err; char tcpname[256]; h->is_streamed = 1; - mmst = h->priv_data = av_mallocz(sizeof(MMSTContext)); - if (!h->priv_data) - return AVERROR(ENOMEM); mms = &mmst->mms; // only for MMS over TCP, so set proto = NULL @@ -523,7 +519,8 @@ // establish tcp connection. ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, mmst->host, port, NULL); - err = ffurl_open(&mms->mms_hd, tcpname, AVIO_FLAG_READ_WRITE); + err = ffurl_open(&mms->mms_hd, tcpname, AVIO_FLAG_READ_WRITE, + &h->interrupt_callback, NULL); if (err) goto fail; @@ -609,7 +606,7 @@ // copy the data to the packet buffer. result = ff_mms_read_data(mms, buf, size); if (result == 0) { - av_dlog(NULL, "read asf media paket size is zero!\n"); + av_dlog(NULL, "Read ASF media packet size is zero!\n"); break; } } @@ -623,8 +620,10 @@ } URLProtocol ff_mmst_protocol = { - .name = "mmst", - .url_open = mms_open, - .url_read = mms_read, - .url_close = mms_close, + .name = "mmst", + .url_open = mms_open, + .url_read = mms_read, + .url_close = mms_close, + .priv_data_size = sizeof(MMSTContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mov.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mov.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mov.c 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mov.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,13 +26,18 @@ //#define MOV_EXPORT_ALL_METADATA #include "libavutil/intreadwrite.h" +#include "libavutil/intfloat.h" +#include "libavutil/mathematics.h" #include "libavutil/avstring.h" #include "libavutil/dict.h" #include "avformat.h" +#include "internal.h" #include "avio_internal.h" #include "riff.h" #include "isom.h" #include "libavcodec/get_bits.h" +#include "id3v1.h" +#include "mov_chan.h" #if CONFIG_ZLIB #include @@ -41,21 +46,6 @@ /* * First version by Francois Revol revol@free.fr * Seek function by Gael Chardon gael.dev@4now.net - * - * Features and limitations: - * - reads most of the QT files I have (at least the structure), - * Sample QuickTime files with mp3 audio can be found at: http://www.3ivx.com/showcase.html - * - the code is quite ugly... maybe I won't do it recursive next time :-) - * - * Funny I didn't know about http://sourceforge.net/projects/qt-ffmpeg/ - * when coding this :) (it's a writer anyway) - * - * Reference documents: - * http://www.geocities.com/xhelmboyx/quicktime/formats/qtm-layout.txt - * Apple: - * http://developer.apple.com/documentation/QuickTime/QTFF/ - * http://developer.apple.com/documentation/QuickTime/QTFF/qtff.pdf - * QuickTime is a trademark of Apple (AFAIK :)) */ #include "qtpalette.h" @@ -64,13 +54,7 @@ #undef NDEBUG #include -/* XXX: it's the first time I make a recursive parser I think... sorry if it's ugly :P */ - /* those functions parse an atom */ -/* return code: - 0: continue to parse next atom - <0: error occurred, exit -*/ /* links atom IDs to parse functions */ typedef struct MOVParseTableEntry { uint32_t type; @@ -79,15 +63,64 @@ static const MOVParseTableEntry mov_default_parse_table[]; -static int mov_metadata_trkn(MOVContext *c, AVIOContext *pb, unsigned len) +static int mov_metadata_track_or_disc_number(MOVContext *c, AVIOContext *pb, + unsigned len, const char *key) { char buf[16]; + short current, total; avio_rb16(pb); // unknown - snprintf(buf, sizeof(buf), "%d", avio_rb16(pb)); - av_dict_set(&c->fc->metadata, "track", buf, 0); + current = avio_rb16(pb); + total = avio_rb16(pb); + if (!total) + snprintf(buf, sizeof(buf), "%d", current); + else + snprintf(buf, sizeof(buf), "%d/%d", current, total); + av_dict_set(&c->fc->metadata, key, buf, 0); + + return 0; +} + +static int mov_metadata_int8_bypass_padding(MOVContext *c, AVIOContext *pb, + unsigned len, const char *key) +{ + char buf[16]; + + /* bypass padding bytes */ + avio_r8(pb); + avio_r8(pb); + avio_r8(pb); + + snprintf(buf, sizeof(buf), "%d", avio_r8(pb)); + av_dict_set(&c->fc->metadata, key, buf, 0); - avio_rb16(pb); // total tracks + return 0; +} + +static int mov_metadata_int8_no_padding(MOVContext *c, AVIOContext *pb, + unsigned len, const char *key) +{ + char buf[16]; + + snprintf(buf, sizeof(buf), "%d", avio_r8(pb)); + av_dict_set(&c->fc->metadata, key, buf, 0); + + return 0; +} + +static int mov_metadata_gnre(MOVContext *c, AVIOContext *pb, + unsigned len, const char *key) +{ + short genre; + char buf[20]; + + avio_r8(pb); // unknown + + genre = avio_r8(pb); + if (genre < 1 || genre > ID3v1_GENRE_MAX) + return 0; + snprintf(buf, sizeof(buf), "%s", ff_id3v1_genre_str[genre-1]); + av_dict_set(&c->fc->metadata, key, buf, 0); return 0; } @@ -138,12 +171,13 @@ const char *key = NULL; uint16_t str_size, langcode = 0; uint32_t data_type = 0; - int (*parse)(MOVContext*, AVIOContext*, unsigned) = NULL; + int (*parse)(MOVContext*, AVIOContext*, unsigned, const char*) = NULL; switch (atom.type) { case MKTAG(0xa9,'n','a','m'): key = "title"; break; case MKTAG(0xa9,'a','u','t'): case MKTAG(0xa9,'A','R','T'): key = "artist"; break; + case MKTAG( 'a','A','R','T'): key = "album_artist"; break; case MKTAG(0xa9,'w','r','t'): key = "composer"; break; case MKTAG( 'c','p','r','t'): case MKTAG(0xa9,'c','p','y'): key = "copyright"; break; @@ -152,6 +186,8 @@ case MKTAG(0xa9,'a','l','b'): key = "album"; break; case MKTAG(0xa9,'d','a','y'): key = "date"; break; case MKTAG(0xa9,'g','e','n'): key = "genre"; break; + case MKTAG( 'g','n','r','e'): key = "genre"; + parse = mov_metadata_gnre; break; case MKTAG(0xa9,'t','o','o'): case MKTAG(0xa9,'s','w','r'): key = "encoder"; break; case MKTAG(0xa9,'e','n','c'): key = "encoder"; break; @@ -161,7 +197,19 @@ case MKTAG( 't','v','e','n'): key = "episode_id";break; case MKTAG( 't','v','n','n'): key = "network"; break; case MKTAG( 't','r','k','n'): key = "track"; - parse = mov_metadata_trkn; break; + parse = mov_metadata_track_or_disc_number; break; + case MKTAG( 'd','i','s','k'): key = "disc"; + parse = mov_metadata_track_or_disc_number; break; + case MKTAG( 't','v','e','s'): key = "episode_sort"; + parse = mov_metadata_int8_bypass_padding; break; + case MKTAG( 't','v','s','n'): key = "season_number"; + parse = mov_metadata_int8_bypass_padding; break; + case MKTAG( 's','t','i','k'): key = "media_type"; + parse = mov_metadata_int8_no_padding; break; + case MKTAG( 'h','d','v','d'): key = "hd_video"; + parse = mov_metadata_int8_no_padding; break; + case MKTAG( 'p','g','a','p'): key = "gapless_playback"; + parse = mov_metadata_int8_no_padding; break; } if (c->itunes_metadata && atom.size > 8) { @@ -196,7 +244,7 @@ str_size = FFMIN3(sizeof(str)-1, str_size, atom.size); if (parse) - parse(c, pb, str_size); + parse(c, pb, str_size, key); else { if (data_type == 3 || (data_type == 0 && langcode < 0x800)) { // MAC Encoded mov_read_mac_string(c, pb, str_size, str, sizeof(str)); @@ -244,7 +292,7 @@ avio_read(pb, str, str_len); str[str_len] = 0; - ff_new_chapter(c->fc, i, (AVRational){1,10000000}, start, AV_NOPTS_VALUE, str); + avpriv_new_chapter(c->fc, i, (AVRational){1,10000000}, start, AV_NOPTS_VALUE, str); } return 0; } @@ -261,7 +309,7 @@ int (*parse)(MOVContext*, AVIOContext*, MOVAtom) = NULL; a.size = atom.size; a.type=0; - if(atom.size >= 8) { + if (atom.size >= 8) { a.size = avio_rb32(pb); a.type = avio_rl32(pb); } @@ -278,7 +326,7 @@ break; } a.size -= 8; - if(a.size < 0) + if (a.size < 0) break; a.size = FFMIN(a.size, atom.size - total_size); @@ -445,11 +493,11 @@ if (type == MKTAG('v','i','d','e')) st->codec->codec_type = AVMEDIA_TYPE_VIDEO; - else if(type == MKTAG('s','o','u','n')) + else if (type == MKTAG('s','o','u','n')) st->codec->codec_type = AVMEDIA_TYPE_AUDIO; - else if(type == MKTAG('m','1','a',' ')) + else if (type == MKTAG('m','1','a',' ')) st->codec->codec_id = CODEC_ID_MP2; - else if(type == MKTAG('s','u','b','p')) + else if ((type == MKTAG('s','u','b','p')) || (type == MKTAG('c','l','c','p'))) st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; avio_rb32(pb); /* component manufacture */ @@ -471,8 +519,7 @@ avio_rb32(pb); /* version + flags */ ff_mp4_read_descr(fc, pb, &tag); if (tag == MP4ESDescrTag) { - avio_rb16(pb); /* ID */ - avio_r8(pb); /* priority */ + ff_mp4_parse_es_descr(pb, NULL); } else avio_rb16(pb); /* ID */ @@ -508,6 +555,59 @@ return 0; } +static int mov_read_chan(MOVContext *c, AVIOContext *pb, MOVAtom atom) +{ + AVStream *st; + uint8_t version; + uint32_t flags, layout_tag, bitmap, num_descr, label_mask; + int i; + + if (c->fc->nb_streams < 1) + return 0; + st = c->fc->streams[c->fc->nb_streams-1]; + + if (atom.size < 16) + return 0; + + version = avio_r8(pb); + flags = avio_rb24(pb); + + layout_tag = avio_rb32(pb); + bitmap = avio_rb32(pb); + num_descr = avio_rb32(pb); + + if (atom.size < 16ULL + num_descr * 20ULL) + return 0; + + av_dlog(c->fc, "chan: size=%ld version=%u flags=%u layout=%u bitmap=%u num_descr=%u\n", + atom.size, version, flags, layout_tag, bitmap, num_descr); + + label_mask = 0; + for (i = 0; i < num_descr; i++) { + uint32_t label, cflags; + float coords[3]; + label = avio_rb32(pb); // mChannelLabel + cflags = avio_rb32(pb); // mChannelFlags + AV_WN32(&coords[0], avio_rl32(pb)); // mCoordinates[0] + AV_WN32(&coords[1], avio_rl32(pb)); // mCoordinates[1] + AV_WN32(&coords[2], avio_rl32(pb)); // mCoordinates[2] + if (layout_tag == 0) { + uint32_t mask_incr = ff_mov_get_channel_label(label); + if (mask_incr == 0) { + label_mask = 0; + break; + } + label_mask |= mask_incr; + } + } + if (layout_tag == 0) + st->codec->channel_layout = label_mask; + else + st->codec->channel_layout = ff_mov_get_channel_layout(layout_tag, bitmap); + + return 0; +} + static int mov_read_wfex(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; @@ -547,7 +647,7 @@ /* this atom contains actual media data */ static int mov_read_mdat(MOVContext *c, AVIOContext *pb, MOVAtom atom) { - if(atom.size == 0) /* wrong one (MP4) */ + if (atom.size == 0) /* wrong one (MP4) */ return 0; c->found_mdat=1; return 0; /* now go for moov */ @@ -701,7 +801,7 @@ return 0; st = c->fc->streams[c->fc->nb_streams-1]; - if((uint64_t)atom.size > (1<<30)) + if ((uint64_t)atom.size > (1<<30)) return -1; // currently SVQ3 decoder expect full STSD header - so let's fake it @@ -749,6 +849,40 @@ return 0; } +static int mov_read_fiel(MOVContext *c, AVIOContext *pb, MOVAtom atom) +{ + AVStream *st; + unsigned mov_field_order; + enum AVFieldOrder decoded_field_order = AV_FIELD_UNKNOWN; + + if (c->fc->nb_streams < 1) // will happen with jp2 files + return 0; + st = c->fc->streams[c->fc->nb_streams-1]; + if (atom.size < 2) + return AVERROR_INVALIDDATA; + mov_field_order = avio_rb16(pb); + if ((mov_field_order & 0xFF00) == 0x0100) + decoded_field_order = AV_FIELD_PROGRESSIVE; + else if ((mov_field_order & 0xFF00) == 0x0200) { + switch (mov_field_order & 0xFF) { + case 0x01: decoded_field_order = AV_FIELD_TT; + break; + case 0x06: decoded_field_order = AV_FIELD_BB; + break; + case 0x09: decoded_field_order = AV_FIELD_TB; + break; + case 0x0E: decoded_field_order = AV_FIELD_BT; + break; + } + } + if (decoded_field_order == AV_FIELD_UNKNOWN && mov_field_order) { + av_log(NULL, AV_LOG_ERROR, "Unknown MOV field order 0x%04x\n", mov_field_order); + } + st->codec->field_order = decoded_field_order; + + return 0; +} + /* FIXME modify qdm2/svq3/h264 decoders to take full atom as extradata */ static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom) { @@ -760,10 +894,10 @@ return 0; st= c->fc->streams[c->fc->nb_streams-1]; size= (uint64_t)st->codec->extradata_size + atom.size + 8 + FF_INPUT_BUFFER_PADDING_SIZE; - if(size > INT_MAX || (uint64_t)atom.size > INT_MAX) + if (size > INT_MAX || (uint64_t)atom.size > INT_MAX) return -1; buf= av_realloc(st->codec->extradata, size); - if(!buf) + if (!buf) return -1; st->codec->extradata= buf; buf+= st->codec->extradata_size; @@ -782,7 +916,7 @@ return 0; st = c->fc->streams[c->fc->nb_streams-1]; - if((uint64_t)atom.size > (1<<30)) + if ((uint64_t)atom.size > (1<<30)) return -1; if (st->codec->codec_id == CODEC_ID_QDM2 || st->codec->codec_id == CODEC_ID_QDMC) { @@ -813,9 +947,18 @@ return 0; st = c->fc->streams[c->fc->nb_streams-1]; - if((uint64_t)atom.size > (1<<30)) + if ((uint64_t)atom.size > (1<<30)) return -1; + if (atom.size >= 10) { + // Broken files created by legacy versions of Libav and FFmpeg will + // wrap a whole fiel atom inside of a glbl atom. + unsigned size = avio_rb32(pb); + unsigned type = avio_rl32(pb); + avio_seek(pb, -8, SEEK_CUR); + if (type == MKTAG('f','i','e','l') && size == atom.size) + return mov_read_default(c, pb, atom); + } av_free(st->codec->extradata); st->codec->extradata = av_mallocz(atom.size + FF_INPUT_BUFFER_PADDING_SIZE); if (!st->codec->extradata) @@ -840,7 +983,7 @@ return 0; st = c->fc->streams[c->fc->nb_streams-1]; - if((uint64_t)atom.size > (1<<30)) + if ((uint64_t)atom.size > (1<<30)) return -1; av_free(st->codec->extradata); @@ -869,7 +1012,9 @@ entries = avio_rb32(pb); - if(entries >= UINT_MAX/sizeof(int64_t)) + if (!entries) + return 0; + if (entries >= UINT_MAX/sizeof(int64_t)) return -1; sc->chunk_offsets = av_malloc(entries * sizeof(int64_t)); @@ -878,10 +1023,10 @@ sc->chunk_count = entries; if (atom.type == MKTAG('s','t','c','o')) - for(i=0; ichunk_offsets[i] = avio_rb32(pb); else if (atom.type == MKTAG('c','o','6','4')) - for(i=0; ichunk_offsets[i] = avio_rb64(pb); else return -1; @@ -935,7 +1080,7 @@ st = c->fc->streams[c->fc->nb_streams-1]; sc = st->priv_data; - for(pseudo_stream_id=0; pseudo_stream_id 0) st->codec->codec_type = AVMEDIA_TYPE_VIDEO; - else if(st->codec->codec_type == AVMEDIA_TYPE_DATA){ + else if (st->codec->codec_type == AVMEDIA_TYPE_DATA){ id = ff_codec_get_id(ff_codec_movsubtitle_tags, format); - if(id > 0) + if (id > 0) st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; } } @@ -994,7 +1139,7 @@ (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff, (format >> 24) & 0xff, st->codec->codec_type); - if(st->codec->codec_type==AVMEDIA_TYPE_VIDEO) { + if (st->codec->codec_type==AVMEDIA_TYPE_VIDEO) { unsigned int color_depth, len; int color_greyscale; @@ -1097,7 +1242,7 @@ } sc->has_palette = 1; } - } else if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO) { + } else if (st->codec->codec_type==AVMEDIA_TYPE_AUDIO) { int bits_per_sample, flags; uint16_t version = avio_rb16(pb); @@ -1116,15 +1261,15 @@ //Read QT version 1 fields. In version 0 these do not exist. av_dlog(c->fc, "version =%d, isom =%d\n",version,c->isom); - if(!c->isom) { - if(version==1) { + if (!c->isom) { + if (version==1) { sc->samples_per_frame = avio_rb32(pb); avio_rb32(pb); /* bytes per packet */ sc->bytes_per_frame = avio_rb32(pb); avio_rb32(pb); /* bytes per sample */ - } else if(version==2) { + } else if (version==2) { avio_rb32(pb); /* sizeof struct only */ - st->codec->sample_rate = av_int2dbl(avio_rb64(pb)); /* float 64 */ + st->codec->sample_rate = av_int2double(avio_rb64(pb)); /* float 64 */ st->codec->channels = avio_rb32(pb); avio_rb32(pb); /* always 0x7F000000 */ st->codec->bits_per_coded_sample = avio_rb32(pb); /* bits per channel if sound is uncompressed */ @@ -1177,7 +1322,7 @@ st->codec->bits_per_coded_sample = bits_per_sample; sc->sample_size = (bits_per_sample >> 3) * st->codec->channels; } - } else if(st->codec->codec_type==AVMEDIA_TYPE_SUBTITLE){ + } else if (st->codec->codec_type==AVMEDIA_TYPE_SUBTITLE){ // ttxt stsd contains display flags, justification, background // color, fonts, and default styles, so fake an atom to read it MOVAtom fake_atom = { .size = size - (avio_tell(pb) - start_pos) }; @@ -1199,7 +1344,7 @@ avio_skip(pb, a.size); } - if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1) + if (st->codec->codec_type==AVMEDIA_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1) st->codec->sample_rate= sc->time_scale; /* special codec parameters handling */ @@ -1207,7 +1352,7 @@ #if CONFIG_DV_DEMUXER case CODEC_ID_DVAUDIO: c->dv_fctx = avformat_alloc_context(); - c->dv_demux = dv_init_demux(c->dv_fctx); + c->dv_demux = avpriv_dv_init_demux(c->dv_fctx); if (!c->dv_demux) { av_log(c->fc, AV_LOG_ERROR, "dv demux context init error\n"); return -1; @@ -1225,14 +1370,16 @@ st->codec->channels= 1; /* really needed */ break; case CODEC_ID_AMR_NB: - case CODEC_ID_AMR_WB: - st->codec->frame_size= sc->samples_per_frame; st->codec->channels= 1; /* really needed */ /* force sample rate for amr, stsd in 3gp does not store sample rate */ - if (st->codec->codec_id == CODEC_ID_AMR_NB) - st->codec->sample_rate = 8000; - else if (st->codec->codec_id == CODEC_ID_AMR_WB) - st->codec->sample_rate = 16000; + st->codec->sample_rate = 8000; + /* force frame_size, too, samples_per_frame isn't always set properly */ + st->codec->frame_size = 160; + break; + case CODEC_ID_AMR_WB: + st->codec->channels = 1; + st->codec->sample_rate = 16000; + st->codec->frame_size = 320; break; case CODEC_ID_MP2: case CODEC_ID_MP3: @@ -1288,14 +1435,16 @@ av_dlog(c->fc, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries); - if(entries >= UINT_MAX / sizeof(*sc->stsc_data)) + if (!entries) + return 0; + if (entries >= UINT_MAX / sizeof(*sc->stsc_data)) return -1; sc->stsc_data = av_malloc(entries * sizeof(*sc->stsc_data)); if (!sc->stsc_data) return AVERROR(ENOMEM); sc->stsc_count = entries; - for(i=0; istsc_data[i].first = avio_rb32(pb); sc->stsc_data[i].count = avio_rb32(pb); sc->stsc_data[i].id = avio_rb32(pb); @@ -1350,14 +1499,14 @@ av_dlog(c->fc, "keyframe_count = %d\n", entries); - if(entries >= UINT_MAX / sizeof(int)) + if (entries >= UINT_MAX / sizeof(int)) return -1; sc->keyframes = av_malloc(entries * sizeof(int)); if (!sc->keyframes) return AVERROR(ENOMEM); sc->keyframe_count = entries; - for(i=0; ikeyframes[i] = avio_rb32(pb); //av_dlog(c->fc, "keyframes[]=%d\n", sc->keyframes[i]); } @@ -1403,6 +1552,8 @@ return -1; } + if (!entries) + return 0; if (entries >= UINT_MAX / sizeof(int) || entries >= (UINT_MAX - 4) / field_size) return -1; sc->sample_sizes = av_malloc(entries * sizeof(int)); @@ -1425,7 +1576,7 @@ init_get_bits(&gb, buf, 8*num_bytes); - for(i=0; isample_sizes[i] = get_bits_long(&gb, field_size); av_free(buf); @@ -1449,16 +1600,21 @@ avio_rb24(pb); /* flags */ entries = avio_rb32(pb); - av_dlog(c->fc, "track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries); + av_dlog(c->fc, "track[%i].stts.entries = %i\n", + c->fc->nb_streams-1, entries); + + if (!entries) + return 0; + if (entries >= UINT_MAX / sizeof(*sc->stts_data)) + return AVERROR(EINVAL); - if(entries >= UINT_MAX / sizeof(*sc->stts_data)) - return -1; sc->stts_data = av_malloc(entries * sizeof(*sc->stts_data)); if (!sc->stts_data) return AVERROR(ENOMEM); + sc->stts_count = entries; - for(i=0; istts_data[i].count= sample_count; sc->stts_data[i].duration= sample_duration; - av_dlog(c->fc, "sample_count=%d, sample_duration=%d\n",sample_count,sample_duration); + av_dlog(c->fc, "sample_count=%d, sample_duration=%d\n", + sample_count, sample_duration); duration+=(int64_t)sample_duration*sample_count; total_sample_count+=sample_count; } st->nb_frames= total_sample_count; - if(duration) + if (duration) st->duration= duration; return 0; } @@ -1496,14 +1653,16 @@ av_dlog(c->fc, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries); - if(entries >= UINT_MAX / sizeof(*sc->ctts_data)) + if (!entries) + return 0; + if (entries >= UINT_MAX / sizeof(*sc->ctts_data)) return -1; sc->ctts_data = av_malloc(entries * sizeof(*sc->ctts_data)); if (!sc->ctts_data) return AVERROR(ENOMEM); sc->ctts_count = entries; - for(i=0; itime_offset < 0) sc->time_offset = av_rescale(sc->time_offset, sc->time_scale, mov->time_scale); current_dts = -sc->time_offset; - if (sc->ctts_data && sc->stts_data && + if (sc->ctts_data && sc->stts_data && sc->stts_data[0].duration && sc->ctts_data[0].duration / sc->stts_data[0].duration > 16) { /* more than 16 frames delay, dts are likely wrong this happens with files created by iMovie */ @@ -1555,6 +1714,8 @@ current_dts -= sc->dts_shift; + if (!sc->sample_count) + return; if (sc->sample_count >= UINT_MAX / sizeof(*st->index_entries)) return; st->index_entries = av_malloc(sc->sample_count*sizeof(*st->index_entries)); @@ -1586,7 +1747,7 @@ if (keyframe) distance = 0; sample_size = sc->sample_size > 0 ? sc->sample_size : sc->sample_sizes[current_sample]; - if(sc->pseudo_stream_id == -1 || + if (sc->pseudo_stream_id == -1 || sc->stsc_data[stsc_index].id - 1 == sc->pseudo_stream_id) { AVIndexEntry *e = &st->index_entries[st->nb_index_entries++]; e->pos = current_offset; @@ -1698,7 +1859,8 @@ } } -static int mov_open_dref(AVIOContext **pb, char *src, MOVDref *ref) +static int mov_open_dref(AVIOContext **pb, char *src, MOVDref *ref, + AVIOInterruptCB *int_cb) { /* try relative path, we do not try the absolute because it can leak information about our system to an attacker */ @@ -1733,7 +1895,7 @@ av_strlcat(filename, ref->path + l + 1, 1024); - if (!avio_open(pb, filename, AVIO_FLAG_READ)) + if (!avio_open2(pb, filename, AVIO_FLAG_READ, int_cb, NULL)) return 0; } } @@ -1747,8 +1909,9 @@ MOVStreamContext *sc; int ret; - st = av_new_stream(c->fc, c->fc->nb_streams); + st = avformat_new_stream(c->fc, NULL); if (!st) return AVERROR(ENOMEM); + st->id = c->fc->nb_streams; sc = av_mallocz(sizeof(MOVStreamContext)); if (!sc) return AVERROR(ENOMEM); @@ -1774,7 +1937,7 @@ sc->time_scale = 1; } - av_set_pts_info(st, 64, 1, sc->time_scale); + avpriv_set_pts_info(st, 64, 1, sc->time_scale); if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && !st->codec->frame_size && sc->stts_count == 1) { @@ -1787,7 +1950,7 @@ if (sc->dref_id-1 < sc->drefs_count && sc->drefs[sc->dref_id-1].path) { MOVDref *dref = &sc->drefs[sc->dref_id - 1]; - if (mov_open_dref(&sc->pb, c->fc->filename, dref) < 0) + if (mov_open_dref(&sc->pb, c->fc->filename, dref, &c->fc->interrupt_callback) < 0) av_log(c->fc, AV_LOG_ERROR, "stream %d, error opening alias: path='%s', dir='%s', " "filename='%s', volume='%s', nlvl_from=%d, nlvl_to=%d\n", @@ -2151,9 +2314,9 @@ return AVERROR(ENOMEM); } avio_read(pb, cmov_data, cmov_len); - if(uncompress (moov_data, (uLongf *) &moov_len, (const Bytef *)cmov_data, cmov_len) != Z_OK) + if (uncompress (moov_data, (uLongf *) &moov_len, (const Bytef *)cmov_data, cmov_len) != Z_OK) goto free_and_return; - if(ffio_init_context(&ctx, moov_data, moov_len, 0, NULL, NULL, NULL, NULL) != 0) + if (ffio_init_context(&ctx, moov_data, moov_len, 0, NULL, NULL, NULL, NULL) != 0) goto free_and_return; atom.type = MKTAG('m','o','o','v'); atom.size = moov_len; @@ -2182,10 +2345,10 @@ avio_rb24(pb); /* flags */ edit_count = avio_rb32(pb); /* entries */ - if((uint64_t)edit_count*12+8 > atom.size) + if ((uint64_t)edit_count*12+8 > atom.size) return -1; - for(i=0; i 1) + if (edit_count > 1) av_log(c->fc, AV_LOG_WARNING, "multiple edit list entries, " "a/v desync might occur, patch welcome\n"); @@ -2219,7 +2382,7 @@ { MKTAG('e','d','t','s'), mov_read_default }, { MKTAG('e','l','s','t'), mov_read_elst }, { MKTAG('e','n','d','a'), mov_read_enda }, -{ MKTAG('f','i','e','l'), mov_read_extradata }, +{ MKTAG('f','i','e','l'), mov_read_fiel }, { MKTAG('f','t','y','p'), mov_read_ftyp }, { MKTAG('g','l','b','l'), mov_read_glbl }, { MKTAG('h','d','l','r'), mov_read_hdlr }, @@ -2263,6 +2426,7 @@ { MKTAG('w','i','d','e'), mov_read_wide }, /* place holder */ { MKTAG('w','f','e','x'), mov_read_wfex }, { MKTAG('c','m','o','v'), mov_read_cmov }, +{ MKTAG('c','h','a','n'), mov_read_chan }, /* channel layout */ { 0, NULL } }; @@ -2274,7 +2438,7 @@ /* check file header */ offset = 0; - for(;;) { + for (;;) { /* ignore invalid offset */ if ((offset + 8) > (unsigned int)p->buf_size) return score; @@ -2308,7 +2472,6 @@ return score; } } - return score; } // must be done after parsing all trak because there's no order requirement @@ -2357,17 +2520,24 @@ // The samples could theoretically be in any encoding if there's an encd // atom following, but in practice are only utf-8 or utf-16, distinguished // instead by the presence of a BOM - ch = avio_rb16(sc->pb); - if (ch == 0xfeff) - avio_get_str16be(sc->pb, len, title, title_len); - else if (ch == 0xfffe) - avio_get_str16le(sc->pb, len, title, title_len); - else { - AV_WB16(title, ch); - avio_get_str(sc->pb, len - 2, title + 2, title_len - 2); + if (!len) { + title[0] = 0; + } else { + ch = avio_rb16(sc->pb); + if (ch == 0xfeff) + avio_get_str16be(sc->pb, len, title, title_len); + else if (ch == 0xfffe) + avio_get_str16le(sc->pb, len, title, title_len); + else { + AV_WB16(title, ch); + if (len == 1 || len == 2) + title[len] = 0; + else + avio_get_str(sc->pb, len - 2, title + 2, title_len - 2); + } } - ff_new_chapter(s, i, st->time_base, sample->timestamp, end, title); + avpriv_new_chapter(s, i, st->time_base, sample->timestamp, end, title); av_freep(&title); } finish: @@ -2383,7 +2553,7 @@ mov->fc = s; /* .mov and .mp4 aren't streamable anyway (only progressive download if moov is before mdat) */ - if(pb->seekable) + if (pb->seekable) atom.size = avio_size(pb); else atom.size = INT64_MAX; @@ -2475,10 +2645,10 @@ } #if CONFIG_DV_DEMUXER if (mov->dv_demux && sc->dv_audio_container) { - dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size); + avpriv_dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size); av_free(pkt->data); pkt->size = 0; - ret = dv_get_packet(mov->dv_demux, pkt); + ret = avpriv_dv_get_packet(mov->dv_demux, pkt); if (ret < 0) return ret; } @@ -2591,12 +2761,10 @@ av_freep(&sc->drefs); if (sc->pb && sc->pb != s->pb) avio_close(sc->pb); - - av_freep(&st->codec->palctrl); } if (mov->dv_demux) { - for(i = 0; i < mov->dv_fctx->nb_streams; i++) { + for (i = 0; i < mov->dv_fctx->nb_streams; i++) { av_freep(&mov->dv_fctx->streams[i]->codec); av_freep(&mov->dv_fctx->streams[i]); } @@ -2610,12 +2778,12 @@ } AVInputFormat ff_mov_demuxer = { - "mov,mp4,m4a,3gp,3g2,mj2", - NULL_IF_CONFIG_SMALL("QuickTime/MPEG-4/Motion JPEG 2000 format"), - sizeof(MOVContext), - mov_probe, - mov_read_header, - mov_read_packet, - mov_read_close, - mov_read_seek, + .name = "mov,mp4,m4a,3gp,3g2,mj2", + .long_name = NULL_IF_CONFIG_SMALL("QuickTime/MPEG-4/Motion JPEG 2000 format"), + .priv_data_size = sizeof(MOVContext), + .read_probe = mov_probe, + .read_header = mov_read_header, + .read_packet = mov_read_packet, + .read_close = mov_read_close, + .read_seek = mov_read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mov_chan.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mov_chan.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mov_chan.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mov_chan.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,517 @@ +/* + * Copyright (c) 2011 Justin Ruggles + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * mov 'chan' tag reading/writing. + * @author Justin Ruggles + */ + +#include + +#include "libavutil/audioconvert.h" +#include "libavcodec/avcodec.h" +#include "mov_chan.h" + +/** + * Channel Layout Tag + * This tells which channels are present in the audio stream and the order in + * which they appear. + * + * @note We're using the channel layout tag to indicate channel order + * when the value is greater than 0x10000. The Apple documentation has + * some contradictions as to how this is actually supposed to be handled. + * + * Core Audio File Format Spec: + * "The high 16 bits indicates a specific ordering of the channels." + * Core Audio Data Types Reference: + * "These identifiers specify the channels included in a layout but + * do not specify a particular ordering of those channels." + */ +enum MovChannelLayoutTag { + MOV_CH_LAYOUT_UNKNOWN = 0xFFFF0000, + MOV_CH_LAYOUT_USE_DESCRIPTIONS = ( 0 << 16) | 0, + MOV_CH_LAYOUT_USE_BITMAP = ( 1 << 16) | 0, + MOV_CH_LAYOUT_DISCRETEINORDER = (147 << 16) | 0, + MOV_CH_LAYOUT_MONO = (100 << 16) | 1, + MOV_CH_LAYOUT_STEREO = (101 << 16) | 2, + MOV_CH_LAYOUT_STEREOHEADPHONES = (102 << 16) | 2, + MOV_CH_LAYOUT_MATRIXSTEREO = (103 << 16) | 2, + MOV_CH_LAYOUT_MIDSIDE = (104 << 16) | 2, + MOV_CH_LAYOUT_XY = (105 << 16) | 2, + MOV_CH_LAYOUT_BINAURAL = (106 << 16) | 2, + MOV_CH_LAYOUT_AMBISONIC_B_FORMAT = (107 << 16) | 4, + MOV_CH_LAYOUT_QUADRAPHONIC = (108 << 16) | 4, + MOV_CH_LAYOUT_PENTAGONAL = (109 << 16) | 5, + MOV_CH_LAYOUT_HEXAGONAL = (110 << 16) | 6, + MOV_CH_LAYOUT_OCTAGONAL = (111 << 16) | 8, + MOV_CH_LAYOUT_CUBE = (112 << 16) | 8, + MOV_CH_LAYOUT_MPEG_3_0_A = (113 << 16) | 3, + MOV_CH_LAYOUT_MPEG_3_0_B = (114 << 16) | 3, + MOV_CH_LAYOUT_MPEG_4_0_A = (115 << 16) | 4, + MOV_CH_LAYOUT_MPEG_4_0_B = (116 << 16) | 4, + MOV_CH_LAYOUT_MPEG_5_0_A = (117 << 16) | 5, + MOV_CH_LAYOUT_MPEG_5_0_B = (118 << 16) | 5, + MOV_CH_LAYOUT_MPEG_5_0_C = (119 << 16) | 5, + MOV_CH_LAYOUT_MPEG_5_0_D = (120 << 16) | 5, + MOV_CH_LAYOUT_MPEG_5_1_A = (121 << 16) | 6, + MOV_CH_LAYOUT_MPEG_5_1_B = (122 << 16) | 6, + MOV_CH_LAYOUT_MPEG_5_1_C = (123 << 16) | 6, + MOV_CH_LAYOUT_MPEG_5_1_D = (124 << 16) | 6, + MOV_CH_LAYOUT_MPEG_6_1_A = (125 << 16) | 7, + MOV_CH_LAYOUT_MPEG_7_1_A = (126 << 16) | 8, + MOV_CH_LAYOUT_MPEG_7_1_B = (127 << 16) | 8, + MOV_CH_LAYOUT_MPEG_7_1_C = (128 << 16) | 8, + MOV_CH_LAYOUT_EMAGIC_DEFAULT_7_1 = (129 << 16) | 8, + MOV_CH_LAYOUT_SMPTE_DTV = (130 << 16) | 8, + MOV_CH_LAYOUT_ITU_2_1 = (131 << 16) | 3, + MOV_CH_LAYOUT_ITU_2_2 = (132 << 16) | 4, + MOV_CH_LAYOUT_DVD_4 = (133 << 16) | 3, + MOV_CH_LAYOUT_DVD_5 = (134 << 16) | 4, + MOV_CH_LAYOUT_DVD_6 = (135 << 16) | 5, + MOV_CH_LAYOUT_DVD_10 = (136 << 16) | 4, + MOV_CH_LAYOUT_DVD_11 = (137 << 16) | 5, + MOV_CH_LAYOUT_DVD_18 = (138 << 16) | 5, + MOV_CH_LAYOUT_AUDIOUNIT_6_0 = (139 << 16) | 6, + MOV_CH_LAYOUT_AUDIOUNIT_7_0 = (140 << 16) | 7, + MOV_CH_LAYOUT_AUDIOUNIT_7_0_FRONT = (148 << 16) | 7, + MOV_CH_LAYOUT_AAC_6_0 = (141 << 16) | 6, + MOV_CH_LAYOUT_AAC_6_1 = (142 << 16) | 7, + MOV_CH_LAYOUT_AAC_7_0 = (143 << 16) | 7, + MOV_CH_LAYOUT_AAC_OCTAGONAL = (144 << 16) | 8, + MOV_CH_LAYOUT_TMH_10_2_STD = (145 << 16) | 16, + MOV_CH_LAYOUT_TMH_10_2_FULL = (146 << 16) | 21, + MOV_CH_LAYOUT_AC3_1_0_1 = (149 << 16) | 2, + MOV_CH_LAYOUT_AC3_3_0 = (150 << 16) | 3, + MOV_CH_LAYOUT_AC3_3_1 = (151 << 16) | 4, + MOV_CH_LAYOUT_AC3_3_0_1 = (152 << 16) | 4, + MOV_CH_LAYOUT_AC3_2_1_1 = (153 << 16) | 4, + MOV_CH_LAYOUT_AC3_3_1_1 = (154 << 16) | 5, + MOV_CH_LAYOUT_EAC3_6_0_A = (155 << 16) | 6, + MOV_CH_LAYOUT_EAC3_7_0_A = (156 << 16) | 7, + MOV_CH_LAYOUT_EAC3_6_1_A = (157 << 16) | 7, + MOV_CH_LAYOUT_EAC3_6_1_B = (158 << 16) | 7, + MOV_CH_LAYOUT_EAC3_6_1_C = (159 << 16) | 7, + MOV_CH_LAYOUT_EAC3_7_1_A = (160 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_B = (161 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_C = (162 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_D = (163 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_E = (164 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_F = (165 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_G = (166 << 16) | 8, + MOV_CH_LAYOUT_EAC3_7_1_H = (167 << 16) | 8, + MOV_CH_LAYOUT_DTS_3_1 = (168 << 16) | 4, + MOV_CH_LAYOUT_DTS_4_1 = (169 << 16) | 5, + MOV_CH_LAYOUT_DTS_6_0_A = (170 << 16) | 6, + MOV_CH_LAYOUT_DTS_6_0_B = (171 << 16) | 6, + MOV_CH_LAYOUT_DTS_6_0_C = (172 << 16) | 6, + MOV_CH_LAYOUT_DTS_6_1_A = (173 << 16) | 7, + MOV_CH_LAYOUT_DTS_6_1_B = (174 << 16) | 7, + MOV_CH_LAYOUT_DTS_6_1_C = (175 << 16) | 7, + MOV_CH_LAYOUT_DTS_6_1_D = (182 << 16) | 7, + MOV_CH_LAYOUT_DTS_7_0 = (176 << 16) | 7, + MOV_CH_LAYOUT_DTS_7_1 = (177 << 16) | 8, + MOV_CH_LAYOUT_DTS_8_0_A = (178 << 16) | 8, + MOV_CH_LAYOUT_DTS_8_0_B = (179 << 16) | 8, + MOV_CH_LAYOUT_DTS_8_1_A = (180 << 16) | 9, + MOV_CH_LAYOUT_DTS_8_1_B = (181 << 16) | 9, +}; + +struct MovChannelLayoutMap { + uint32_t tag; + uint64_t layout; +}; + +static const struct MovChannelLayoutMap mov_ch_layout_map_misc[] = { + { MOV_CH_LAYOUT_USE_DESCRIPTIONS, 0 }, + { MOV_CH_LAYOUT_USE_BITMAP, 0 }, + { MOV_CH_LAYOUT_DISCRETEINORDER, 0 }, + { MOV_CH_LAYOUT_UNKNOWN, 0 }, + { MOV_CH_LAYOUT_TMH_10_2_STD, 0 }, // L, R, C, Vhc, Lsd, Rsd, + // Ls, Rs, Vhl, Vhr, Lw, Rw, + // Csd, Cs, LFE1, LFE2 + { MOV_CH_LAYOUT_TMH_10_2_FULL, 0 }, // L, R, C, Vhc, Lsd, Rsd, + // Ls, Rs, Vhl, Vhr, Lw, Rw, + // Csd, Cs, LFE1, LFE2, Lc, Rc, + // HI, VI, Haptic + { 0, 0 }, +}; + +static const struct MovChannelLayoutMap mov_ch_layout_map_1ch[] = { + { MOV_CH_LAYOUT_MONO, AV_CH_LAYOUT_MONO }, // C +}; + +static const struct MovChannelLayoutMap mov_ch_layout_map_2ch[] = { + { MOV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_STEREO }, // L, R + { MOV_CH_LAYOUT_STEREOHEADPHONES, AV_CH_LAYOUT_STEREO }, // L, R + { MOV_CH_LAYOUT_BINAURAL, AV_CH_LAYOUT_STEREO }, // L, R + { MOV_CH_LAYOUT_MIDSIDE, AV_CH_LAYOUT_STEREO }, // C, sides + { MOV_CH_LAYOUT_XY, AV_CH_LAYOUT_STEREO }, // X (left), Y (right) + + { MOV_CH_LAYOUT_MATRIXSTEREO, AV_CH_LAYOUT_STEREO_DOWNMIX }, // Lt, Rt + + { MOV_CH_LAYOUT_AC3_1_0_1, AV_CH_LAYOUT_MONO | // C, LFE + AV_CH_LOW_FREQUENCY }, + { 0, 0 }, +}; + +static const struct MovChannelLayoutMap mov_ch_layout_map_3ch[] = { + { MOV_CH_LAYOUT_MPEG_3_0_A, AV_CH_LAYOUT_SURROUND }, // L, R, C + { MOV_CH_LAYOUT_MPEG_3_0_B, AV_CH_LAYOUT_SURROUND }, // C, L, R + { MOV_CH_LAYOUT_AC3_3_0, AV_CH_LAYOUT_SURROUND }, // L, C, R + + { MOV_CH_LAYOUT_ITU_2_1, AV_CH_LAYOUT_2_1 }, // L, R, Cs + + { MOV_CH_LAYOUT_DVD_4, AV_CH_LAYOUT_2POINT1 }, // L, R, LFE + { 0, 0 }, +}; + +static const struct MovChannelLayoutMap mov_ch_layout_map_4ch[] = { + { MOV_CH_LAYOUT_AMBISONIC_B_FORMAT, 0 }, // W, X, Y, Z + + { MOV_CH_LAYOUT_QUADRAPHONIC, AV_CH_LAYOUT_QUAD }, // L, R, Rls, Rrs + + { MOV_CH_LAYOUT_MPEG_4_0_A, AV_CH_LAYOUT_4POINT0 }, // L, R, C, Cs + { MOV_CH_LAYOUT_MPEG_4_0_B, AV_CH_LAYOUT_4POINT0 }, // C, L, R, Cs + { MOV_CH_LAYOUT_AC3_3_1, AV_CH_LAYOUT_4POINT0 }, // L, C, R, Cs + + { MOV_CH_LAYOUT_ITU_2_2, AV_CH_LAYOUT_2_2 }, // L, R, Ls, Rs + + { MOV_CH_LAYOUT_DVD_5, AV_CH_LAYOUT_2_1 | // L, R, LFE, Cs + AV_CH_LOW_FREQUENCY }, + { MOV_CH_LAYOUT_AC3_2_1_1, AV_CH_LAYOUT_2_1 | // L, R, Cs, LFE + AV_CH_LOW_FREQUENCY }, + + { MOV_CH_LAYOUT_DVD_10, AV_CH_LAYOUT_3POINT1 }, // L, R, C, LFE + { MOV_CH_LAYOUT_AC3_3_0_1, AV_CH_LAYOUT_3POINT1 }, // L, C, R, LFE + { MOV_CH_LAYOUT_DTS_3_1, AV_CH_LAYOUT_3POINT1 }, // C, L, R, LFE + { 0, 0 }, +}; + +static const struct MovChannelLayoutMap mov_ch_layout_map_5ch[] = { + { MOV_CH_LAYOUT_PENTAGONAL, AV_CH_LAYOUT_5POINT0_BACK }, // L, R, Rls, Rrs, C + + { MOV_CH_LAYOUT_MPEG_5_0_A, AV_CH_LAYOUT_5POINT0 }, // L, R, C, Ls, Rs + { MOV_CH_LAYOUT_MPEG_5_0_B, AV_CH_LAYOUT_5POINT0 }, // L, R, Ls, Rs, C + { MOV_CH_LAYOUT_MPEG_5_0_C, AV_CH_LAYOUT_5POINT0 }, // L, C, R, Ls, Rs + { MOV_CH_LAYOUT_MPEG_5_0_D, AV_CH_LAYOUT_5POINT0 }, // C, L, R, Ls, Rs + + { MOV_CH_LAYOUT_DVD_6, AV_CH_LAYOUT_2_2 | // L, R, LFE, Ls, Rs + AV_CH_LOW_FREQUENCY }, + { MOV_CH_LAYOUT_DVD_18, AV_CH_LAYOUT_2_2 | // L, R, Ls, Rs, LFE + AV_CH_LOW_FREQUENCY }, + + { MOV_CH_LAYOUT_DVD_11, AV_CH_LAYOUT_4POINT1 }, // L, R, C, LFE, Cs + { MOV_CH_LAYOUT_AC3_3_1_1, AV_CH_LAYOUT_4POINT1 }, // L, C, R, Cs, LFE + { MOV_CH_LAYOUT_DTS_4_1, AV_CH_LAYOUT_4POINT1 }, // C, L, R, Cs, LFE + { 0, 0 }, +}; + +static const struct MovChannelLayoutMap mov_ch_layout_map_6ch[] = { + { MOV_CH_LAYOUT_HEXAGONAL, AV_CH_LAYOUT_HEXAGONAL }, // L, R, Rls, Rrs, C, Cs + { MOV_CH_LAYOUT_DTS_6_0_C, AV_CH_LAYOUT_HEXAGONAL }, // C, Cs, L, R, Rls, Rrs + + { MOV_CH_LAYOUT_MPEG_5_1_A, AV_CH_LAYOUT_5POINT1 }, // L, R, C, LFE, Ls, Rs + { MOV_CH_LAYOUT_MPEG_5_1_B, AV_CH_LAYOUT_5POINT1 }, // L, R, Ls, Rs, C, LFE + { MOV_CH_LAYOUT_MPEG_5_1_C, AV_CH_LAYOUT_5POINT1 }, // L, C, R, Ls, Rs, LFE + { MOV_CH_LAYOUT_MPEG_5_1_D, AV_CH_LAYOUT_5POINT1 }, // C, L, R, Ls, Rs, LFE + + { MOV_CH_LAYOUT_AUDIOUNIT_6_0, AV_CH_LAYOUT_6POINT0 }, // L, R, Ls, Rs, C, Cs + { MOV_CH_LAYOUT_AAC_6_0, AV_CH_LAYOUT_6POINT0 }, // C, L, R, Ls, Rs, Cs + { MOV_CH_LAYOUT_EAC3_6_0_A, AV_CH_LAYOUT_6POINT0 }, // L, C, R, Ls, Rs, Cs + + { MOV_CH_LAYOUT_DTS_6_0_A, AV_CH_LAYOUT_6POINT0_FRONT }, // Lc, Rc, L, R, Ls, Rs + + { MOV_CH_LAYOUT_DTS_6_0_B, AV_CH_LAYOUT_5POINT0_BACK | // C, L, R, Rls, Rrs, Ts + AV_CH_TOP_CENTER }, + { 0, 0 }, +}; + +static const struct MovChannelLayoutMap mov_ch_layout_map_7ch[] = { + { MOV_CH_LAYOUT_MPEG_6_1_A, AV_CH_LAYOUT_6POINT1 }, // L, R, C, LFE, Ls, Rs, Cs + { MOV_CH_LAYOUT_AAC_6_1, AV_CH_LAYOUT_6POINT1 }, // C, L, R, Ls, Rs, Cs, LFE + { MOV_CH_LAYOUT_EAC3_6_1_A, AV_CH_LAYOUT_6POINT1 }, // L, C, R, Ls, Rs, LFE, Cs + { MOV_CH_LAYOUT_DTS_6_1_D, AV_CH_LAYOUT_6POINT1 }, // C, L, R, Ls, Rs, LFE, Cs + + { MOV_CH_LAYOUT_AUDIOUNIT_7_0, AV_CH_LAYOUT_7POINT0 }, // L, R, Ls, Rs, C, Rls, Rrs + { MOV_CH_LAYOUT_AAC_7_0, AV_CH_LAYOUT_7POINT0 }, // C, L, R, Ls, Rs, Rls, Rrs + { MOV_CH_LAYOUT_EAC3_7_0_A, AV_CH_LAYOUT_7POINT0 }, // L, C, R, Ls, Rs, Rls, Rrs + + { MOV_CH_LAYOUT_AUDIOUNIT_7_0_FRONT, AV_CH_LAYOUT_7POINT0_FRONT }, // L, R, Ls, Rs, C, Lc, Rc + { MOV_CH_LAYOUT_DTS_7_0, AV_CH_LAYOUT_7POINT0_FRONT }, // Lc, C, Rc, L, R, Ls, Rs + + { MOV_CH_LAYOUT_EAC3_6_1_B, AV_CH_LAYOUT_5POINT1 | // L, C, R, Ls, Rs, LFE, Ts + AV_CH_TOP_CENTER }, + + { MOV_CH_LAYOUT_EAC3_6_1_C, AV_CH_LAYOUT_5POINT1 | // L, C, R, Ls, Rs, LFE, Vhc + AV_CH_TOP_FRONT_CENTER }, + + { MOV_CH_LAYOUT_DTS_6_1_A, AV_CH_LAYOUT_6POINT1_FRONT }, // Lc, Rc, L, R, Ls, Rs, LFE + + { MOV_CH_LAYOUT_DTS_6_1_B, AV_CH_LAYOUT_5POINT1_BACK | // C, L, R, Rls, Rrs, Ts, LFE + AV_CH_TOP_CENTER }, + + { MOV_CH_LAYOUT_DTS_6_1_C, AV_CH_LAYOUT_6POINT1_BACK }, // C, Cs, L, R, Rls, Rrs, LFE + { 0, 0 }, +}; + +static const struct MovChannelLayoutMap mov_ch_layout_map_8ch[] = { + { MOV_CH_LAYOUT_OCTAGONAL, AV_CH_LAYOUT_OCTAGONAL }, // L, R, Rls, Rrs, C, Cs, Ls, Rs + { MOV_CH_LAYOUT_AAC_OCTAGONAL, AV_CH_LAYOUT_OCTAGONAL }, // C, L, R, Ls, Rs, Rls, Rrs, Cs + + { MOV_CH_LAYOUT_CUBE, AV_CH_LAYOUT_QUAD | // L, R, Rls, Rrs, Vhl, Vhr, Rlt, Rrt + AV_CH_TOP_FRONT_LEFT | + AV_CH_TOP_FRONT_RIGHT | + AV_CH_TOP_BACK_LEFT | + AV_CH_TOP_BACK_RIGHT }, + + { MOV_CH_LAYOUT_MPEG_7_1_A, AV_CH_LAYOUT_7POINT1_WIDE }, // L, R, C, LFE, Ls, Rs, Lc, Rc + { MOV_CH_LAYOUT_MPEG_7_1_B, AV_CH_LAYOUT_7POINT1_WIDE }, // C, Lc, Rc, L, R, Ls, Rs, LFE + { MOV_CH_LAYOUT_EMAGIC_DEFAULT_7_1, AV_CH_LAYOUT_7POINT1_WIDE }, // L, R, Ls, Rs, C, LFE, Lc, Rc + { MOV_CH_LAYOUT_EAC3_7_1_B, AV_CH_LAYOUT_7POINT1_WIDE }, // L, C, R, Ls, Rs, LFE, Lc, Rc + { MOV_CH_LAYOUT_DTS_7_1, AV_CH_LAYOUT_7POINT1_WIDE }, // Lc, C, Rc, L, R, Ls, Rs, LFE + + { MOV_CH_LAYOUT_MPEG_7_1_C, AV_CH_LAYOUT_7POINT1 }, // L, R, C, LFE, Ls, Rs, Rls, Rrs + { MOV_CH_LAYOUT_EAC3_7_1_A, AV_CH_LAYOUT_7POINT1 }, // L, C, R, Ls, Rs, LFE, Rls, Rrs + + { MOV_CH_LAYOUT_SMPTE_DTV, AV_CH_LAYOUT_5POINT1 | // L, R, C, LFE, Ls, Rs, Lt, Rt + AV_CH_LAYOUT_STEREO_DOWNMIX }, + + { MOV_CH_LAYOUT_EAC3_7_1_C, AV_CH_LAYOUT_5POINT1 | // L, C, R, Ls, Rs, LFE, Lsd, Rsd + AV_CH_SURROUND_DIRECT_LEFT | + AV_CH_SURROUND_DIRECT_RIGHT }, + + { MOV_CH_LAYOUT_EAC3_7_1_D, AV_CH_LAYOUT_5POINT1 | // L, C, R, Ls, Rs, LFE, Lw, Rw + AV_CH_WIDE_LEFT | + AV_CH_WIDE_RIGHT }, + + { MOV_CH_LAYOUT_EAC3_7_1_E, AV_CH_LAYOUT_5POINT1 | // L, C, R, Ls, Rs, LFE, Vhl, Vhr + AV_CH_TOP_FRONT_LEFT | + AV_CH_TOP_FRONT_RIGHT }, + + { MOV_CH_LAYOUT_EAC3_7_1_F, AV_CH_LAYOUT_5POINT1 | // L, C, R, Ls, Rs, LFE, Cs, Ts + AV_CH_BACK_CENTER | + AV_CH_TOP_CENTER }, + + { MOV_CH_LAYOUT_EAC3_7_1_G, AV_CH_LAYOUT_5POINT1 | // L, C, R, Ls, Rs, LFE, Cs, Vhc + AV_CH_BACK_CENTER | + AV_CH_TOP_FRONT_CENTER }, + + { MOV_CH_LAYOUT_EAC3_7_1_H, AV_CH_LAYOUT_5POINT1 | // L, C, R, Ls, Rs, LFE, Ts, Vhc + AV_CH_TOP_CENTER | + AV_CH_TOP_FRONT_CENTER }, + + { MOV_CH_LAYOUT_DTS_8_0_A, AV_CH_LAYOUT_2_2 | // Lc, Rc, L, R, Ls, Rs, Rls, Rrs + AV_CH_BACK_LEFT | + AV_CH_BACK_RIGHT | + AV_CH_FRONT_LEFT_OF_CENTER | + AV_CH_FRONT_RIGHT_OF_CENTER }, + + { MOV_CH_LAYOUT_DTS_8_0_B, AV_CH_LAYOUT_5POINT0 | // Lc, C, Rc, L, R, Ls, Cs, Rs + AV_CH_FRONT_LEFT_OF_CENTER | + AV_CH_FRONT_RIGHT_OF_CENTER | + AV_CH_BACK_CENTER }, + { 0, 0 }, +}; + +static const struct MovChannelLayoutMap mov_ch_layout_map_9ch[] = { + { MOV_CH_LAYOUT_DTS_8_1_A, AV_CH_LAYOUT_2_2 | // Lc, Rc, L, R, Ls, Rs, Rls, Rrs, LFE + AV_CH_BACK_LEFT | + AV_CH_BACK_RIGHT | + AV_CH_FRONT_LEFT_OF_CENTER | + AV_CH_FRONT_RIGHT_OF_CENTER | + AV_CH_LOW_FREQUENCY }, + + { MOV_CH_LAYOUT_DTS_8_1_B, AV_CH_LAYOUT_7POINT1_WIDE | // Lc, C, Rc, L, R, Ls, Cs, Rs, LFE + AV_CH_BACK_CENTER }, + { 0, 0 }, +}; + +static const struct MovChannelLayoutMap *mov_ch_layout_map[] = { + mov_ch_layout_map_misc, + mov_ch_layout_map_1ch, + mov_ch_layout_map_2ch, + mov_ch_layout_map_3ch, + mov_ch_layout_map_4ch, + mov_ch_layout_map_5ch, + mov_ch_layout_map_6ch, + mov_ch_layout_map_7ch, + mov_ch_layout_map_8ch, + mov_ch_layout_map_9ch, +}; + +static const enum MovChannelLayoutTag mov_ch_layouts_aac[] = { + MOV_CH_LAYOUT_MONO, + MOV_CH_LAYOUT_STEREO, + MOV_CH_LAYOUT_AC3_1_0_1, + MOV_CH_LAYOUT_MPEG_3_0_B, + MOV_CH_LAYOUT_ITU_2_1, + MOV_CH_LAYOUT_DVD_4, + MOV_CH_LAYOUT_QUADRAPHONIC, + MOV_CH_LAYOUT_MPEG_4_0_B, + MOV_CH_LAYOUT_ITU_2_2, + MOV_CH_LAYOUT_AC3_2_1_1, + MOV_CH_LAYOUT_DTS_3_1, + MOV_CH_LAYOUT_MPEG_5_0_D, + MOV_CH_LAYOUT_DVD_18, + MOV_CH_LAYOUT_DTS_4_1, + MOV_CH_LAYOUT_MPEG_5_1_D, + MOV_CH_LAYOUT_AAC_6_0, + MOV_CH_LAYOUT_DTS_6_0_A, + MOV_CH_LAYOUT_AAC_6_1, + MOV_CH_LAYOUT_AAC_7_0, + MOV_CH_LAYOUT_DTS_6_1_A, + MOV_CH_LAYOUT_AAC_OCTAGONAL, + MOV_CH_LAYOUT_MPEG_7_1_B, + MOV_CH_LAYOUT_DTS_8_0_A, + 0, +}; + +static const enum MovChannelLayoutTag mov_ch_layouts_ac3[] = { + MOV_CH_LAYOUT_MONO, + MOV_CH_LAYOUT_STEREO, + MOV_CH_LAYOUT_AC3_1_0_1, + MOV_CH_LAYOUT_AC3_3_0, + MOV_CH_LAYOUT_ITU_2_1, + MOV_CH_LAYOUT_DVD_4, + MOV_CH_LAYOUT_AC3_3_1, + MOV_CH_LAYOUT_ITU_2_2, + MOV_CH_LAYOUT_AC3_2_1_1, + MOV_CH_LAYOUT_AC3_3_0_1, + MOV_CH_LAYOUT_MPEG_5_0_C, + MOV_CH_LAYOUT_DVD_18, + MOV_CH_LAYOUT_AC3_3_1_1, + MOV_CH_LAYOUT_MPEG_5_1_C, + 0, +}; + +static const enum MovChannelLayoutTag mov_ch_layouts_alac[] = { + MOV_CH_LAYOUT_MONO, + MOV_CH_LAYOUT_STEREO, + MOV_CH_LAYOUT_MPEG_3_0_B, + MOV_CH_LAYOUT_MPEG_4_0_B, + MOV_CH_LAYOUT_MPEG_5_0_D, + MOV_CH_LAYOUT_MPEG_5_1_D, + MOV_CH_LAYOUT_AAC_6_1, + MOV_CH_LAYOUT_MPEG_7_1_B, + 0, +}; + +static const struct { + enum CodecID codec_id; + const enum MovChannelLayoutTag *layouts; +} mov_codec_ch_layouts[] = { + { CODEC_ID_AAC, mov_ch_layouts_aac }, + { CODEC_ID_AC3, mov_ch_layouts_ac3 }, + { CODEC_ID_ALAC, mov_ch_layouts_alac }, + { CODEC_ID_NONE, NULL }, +}; + +uint64_t ff_mov_get_channel_layout(uint32_t tag, uint32_t bitmap) +{ + int i, channels; + const struct MovChannelLayoutMap *layout_map; + + /* use ff_mov_get_channel_label() to build a layout instead */ + if (tag == MOV_CH_LAYOUT_USE_DESCRIPTIONS) + return 0; + + /* handle the use of the channel bitmap */ + if (tag == MOV_CH_LAYOUT_USE_BITMAP) + return bitmap < 0x40000 ? bitmap : 0; + + /* get the layout map based on the channel count for the specified layout tag */ + channels = tag & 0xFFFF; + if (channels > 9) + channels = 0; + layout_map = mov_ch_layout_map[channels]; + + /* find the channel layout for the specified layout tag */ + for (i = 0; layout_map[i].tag != 0; i++) { + if (layout_map[i].tag == tag) + break; + } + return layout_map[i].layout; +} + +uint32_t ff_mov_get_channel_label(uint32_t label) +{ + if (label == 0) + return 0; + if (label <= 18) + return 1U << (label - 1); + if (label == 38) + return AV_CH_STEREO_LEFT; + if (label == 39) + return AV_CH_STEREO_RIGHT; + return 0; +} + +uint32_t ff_mov_get_channel_layout_tag(enum CodecID codec_id, + uint64_t channel_layout, + uint32_t *bitmap) +{ + int i, j; + uint32_t tag = 0; + const enum MovChannelLayoutTag *layouts = NULL; + + /* find the layout list for the specified codec */ + for (i = 0; mov_codec_ch_layouts[i].codec_id != CODEC_ID_NONE; i++) { + if (mov_codec_ch_layouts[i].codec_id == codec_id) + break; + } + if (mov_codec_ch_layouts[i].codec_id != CODEC_ID_NONE) + layouts = mov_codec_ch_layouts[i].layouts; + + if (layouts) { + int channels; + const struct MovChannelLayoutMap *layout_map; + + /* get the layout map based on the channel count */ + channels = av_get_channel_layout_nb_channels(channel_layout); + if (channels > 9) + channels = 0; + layout_map = mov_ch_layout_map[channels]; + + /* find the layout tag for the specified channel layout */ + for (i = 0; layouts[i] != 0; i++) { + if (layouts[i] & 0xFFFF != channels) + continue; + for (j = 0; layout_map[j].tag != 0; j++) { + if (layout_map[j].tag == layouts[i] && + layout_map[j].layout == channel_layout) + break; + } + if (layout_map[j].tag) + break; + } + tag = layouts[i]; + } + + /* if no tag was found, use channel bitmap as a backup if possible */ + if (tag == 0 && channel_layout > 0 && channel_layout < 0x40000) { + tag = MOV_CH_LAYOUT_USE_BITMAP; + *bitmap = (uint32_t)channel_layout; + } else + *bitmap = 0; + + /* TODO: set channel descriptions as a secondary backup */ + + return tag; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mov_chan.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mov_chan.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mov_chan.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mov_chan.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2011 Justin Ruggles + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * mov 'chan' tag reading/writing. + * @author Justin Ruggles + */ + +#ifndef AVFORMAT_MOV_CHAN_H +#define AVFORMAT_MOV_CHAN_H + +#include + +#include "libavcodec/avcodec.h" + +/** + * Get the channel layout for the specified channel layout tag. + * + * @param[in] tag channel layout tag + * @param[out] bitmap channel bitmap (only used if needed) + * @return channel layout + */ +uint64_t ff_mov_get_channel_layout(uint32_t tag, uint32_t bitmap); + +/** + * Get the channel layout for the specified channel layout tag. + * + * @param[in] tag channel label + * @return channel layout mask fragment + */ +uint32_t ff_mov_get_channel_label(uint32_t label); + +/** + * Get the channel layout tag for the specified codec id and channel layout. + * If the layout tag was not found, use a channel bitmap if possible. + * + * @param[in] codec_id codec id + * @param[in] channel_layout channel layout + * @param[out] bitmap channel bitmap + * @return channel layout tag + */ +uint32_t ff_mov_get_channel_layout_tag(enum CodecID codec_id, + uint64_t channel_layout, + uint32_t *bitmap); + +#endif /* AVFORMAT_MOV_CHAN_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/movenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/movenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/movenc.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/movenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -32,25 +32,32 @@ #include "libavcodec/put_bits.h" #include "internal.h" #include "libavutil/avstring.h" +#include "libavutil/intfloat.h" +#include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "libavutil/dict.h" #include "rtpenc.h" +#include "mov_chan.h" #undef NDEBUG #include static const AVOption options[] = { - { "movflags", "MOV muxer flags", offsetof(MOVMuxContext, flags), FF_OPT_TYPE_FLAGS, {.dbl = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, - { "rtphint", "Add RTP hint tracks", 0, FF_OPT_TYPE_CONST, {.dbl = FF_MOV_FLAG_RTP_HINT}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, + { "movflags", "MOV muxer flags", offsetof(MOVMuxContext, flags), AV_OPT_TYPE_FLAGS, {.dbl = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, + { "rtphint", "Add RTP hint tracks", 0, AV_OPT_TYPE_CONST, {.dbl = FF_MOV_FLAG_RTP_HINT}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, FF_RTP_FLAG_OPTS(MOVMuxContext, rtp_flags), + { "skip_iods", "Skip writing iods atom.", offsetof(MOVMuxContext, iods_skip), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM}, + { "iods_audio_profile", "iods audio profile atom.", offsetof(MOVMuxContext, iods_audio_profile), AV_OPT_TYPE_INT, {.dbl = -1}, -1, 255, AV_OPT_FLAG_ENCODING_PARAM}, + { "iods_video_profile", "iods video profile atom.", offsetof(MOVMuxContext, iods_video_profile), AV_OPT_TYPE_INT, {.dbl = -1}, -1, 255, AV_OPT_FLAG_ENCODING_PARAM}, { NULL }, }; -static const AVClass mov_muxer_class = { - .class_name = "MOV/3GP/MP4/3G2 muxer", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, +#define MOV_CLASS(flavor)\ +static const AVClass flavor ## _muxer_class = {\ + .class_name = #flavor " muxer",\ + .item_name = av_default_item_name,\ + .option = options,\ + .version = LIBAVUTIL_VERSION_INT,\ }; //FIXME support 64 bit variant with wide placeholders @@ -206,7 +213,7 @@ avio_wb32(pb, 11); ffio_wfourcc(pb, "dac3"); - init_get_bits(&gbc, track->vosData+4, track->vosLen-4); + init_get_bits(&gbc, track->vosData+4, (track->vosLen-4) * 8); fscod = get_bits(&gbc, 2); frmsizecod = get_bits(&gbc, 6); bsid = get_bits(&gbc, 5); @@ -239,7 +246,7 @@ /** * This function writes extradata "as is". - * Extradata must be formated like a valid atom (with size and tag) + * Extradata must be formatted like a valid atom (with size and tag). */ static int mov_write_extradata_tag(AVIOContext *pb, MOVTrack *track) { @@ -335,6 +342,31 @@ return updateSize(pb, pos); } +static int mov_write_chan_tag(AVIOContext *pb, MOVTrack *track) +{ + uint32_t layout_tag, bitmap; + int64_t pos = avio_tell(pb); + + layout_tag = ff_mov_get_channel_layout_tag(track->enc->codec_id, + track->enc->channel_layout, + &bitmap); + if (!layout_tag) { + av_log(track->enc, AV_LOG_WARNING, "not writing 'chan' tag due to " + "lack of channel information\n"); + return 0; + } + + avio_wb32(pb, 0); // Size + ffio_wfourcc(pb, "chan"); // Type + avio_w8(pb, 0); // Version + avio_wb24(pb, 0); // Flags + avio_wb32(pb, layout_tag); // mChannelLayoutTag + avio_wb32(pb, bitmap); // mChannelBitmap + avio_wb32(pb, 0); // mNumberChannelDescriptions + + return updateSize(pb, pos); +} + static int mov_write_wave_tag(AVIOContext *pb, MOVTrack *track) { int64_t pos = avio_tell(pb); @@ -357,6 +389,7 @@ } else if (track->enc->codec_id == CODEC_ID_AMR_NB) { mov_write_amr_tag(pb, track); } else if (track->enc->codec_id == CODEC_ID_AC3) { + mov_write_chan_tag(pb, track); mov_write_ac3_tag(pb, track); } else if (track->enc->codec_id == CODEC_ID_ALAC) { mov_write_extradata_tag(pb, track); @@ -415,15 +448,9 @@ uint32_t tag = track->tag; if (track->mode == MODE_MOV) { - if (track->timescale > UINT16_MAX) { - if (mov_get_lpcm_flags(track->enc->codec_id)) - tag = AV_RL32("lpcm"); - version = 2; - } else if (track->audio_vbr || mov_pcm_le_gt16(track->enc->codec_id) || - track->enc->codec_id == CODEC_ID_ADPCM_MS || - track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) { - version = 1; - } + if (mov_get_lpcm_flags(track->enc->codec_id)) + tag = AV_RL32("lpcm"); + version = 2; } avio_wb32(pb, 0); /* size */ @@ -444,40 +471,24 @@ avio_wb16(pb, 0); avio_wb32(pb, 0x00010000); avio_wb32(pb, 72); - avio_wb64(pb, av_dbl2int(track->timescale)); + avio_wb64(pb, av_double2int(track->timescale)); avio_wb32(pb, track->enc->channels); avio_wb32(pb, 0x7F000000); avio_wb32(pb, av_get_bits_per_sample(track->enc->codec_id)); avio_wb32(pb, mov_get_lpcm_flags(track->enc->codec_id)); avio_wb32(pb, track->sampleSize); - avio_wb32(pb, track->enc->frame_size); + avio_wb32(pb, track->audio_vbr ? track->enc->frame_size : 1); } else { - if (track->mode == MODE_MOV) { - avio_wb16(pb, track->enc->channels); - if (track->enc->codec_id == CODEC_ID_PCM_U8 || - track->enc->codec_id == CODEC_ID_PCM_S8) - avio_wb16(pb, 8); /* bits per sample */ - else - avio_wb16(pb, 16); - avio_wb16(pb, track->audio_vbr ? -2 : 0); /* compression ID */ - } else { /* reserved for mp4/3gp */ - avio_wb16(pb, 2); - avio_wb16(pb, 16); - avio_wb16(pb, 0); - } + /* reserved for mp4/3gp */ + avio_wb16(pb, 2); + avio_wb16(pb, 16); + avio_wb16(pb, 0); avio_wb16(pb, 0); /* packet size (= 0) */ avio_wb16(pb, track->timescale); /* Time scale */ avio_wb16(pb, 0); /* Reserved */ } - if(version == 1) { /* SoundDescription V1 extended info */ - avio_wb32(pb, track->enc->frame_size); /* Samples per packet */ - avio_wb32(pb, track->sampleSize / track->enc->channels); /* Bytes per packet */ - avio_wb32(pb, track->sampleSize); /* Bytes per frame */ - avio_wb32(pb, 2); /* Bytes per sample */ - } - if(track->mode == MODE_MOV && (track->enc->codec_id == CODEC_ID_AAC || track->enc->codec_id == CODEC_ID_AC3 || @@ -709,7 +720,7 @@ if (!tag) { // if no mac fcc found, try with Microsoft tags tag = ff_codec_get_tag(ff_codec_bmp_tags, track->enc->codec_id); if (tag) - av_log(s, AV_LOG_INFO, "Warning, using MS style video codec tag, " + av_log(s, AV_LOG_WARNING, "Using MS style video codec tag, " "the file may be unplayable!\n"); } } else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) { @@ -718,7 +729,7 @@ int ms_tag = ff_codec_get_tag(ff_codec_wav_tags, track->enc->codec_id); if (ms_tag) { tag = MKTAG('m', 's', ((ms_tag >> 8) & 0xff), (ms_tag & 0xff)); - av_log(s, AV_LOG_INFO, "Warning, using MS style audio codec tag, " + av_log(s, AV_LOG_WARNING, "Using MS style audio codec tag, " "the file may be unplayable!\n"); } } @@ -772,6 +783,23 @@ return 28; } +static const uint16_t fiel_data[] = { + 0x0000, 0x0100, 0x0201, 0x0206, 0x0209, 0x020e +}; + +static int mov_write_fiel_tag(AVIOContext *pb, MOVTrack *track) +{ + unsigned mov_field_order = 0; + if (track->enc->field_order < FF_ARRAY_ELEMS(fiel_data)) + mov_field_order = fiel_data[track->enc->field_order]; + else + return 0; + avio_wb32(pb, 10); + ffio_wfourcc(pb, "fiel"); + avio_wb16(pb, mov_field_order); + return 10; +} + static int mov_write_subtitle_tag(AVIOContext *pb, MOVTrack *track) { int64_t pos = avio_tell(pb); @@ -858,7 +886,9 @@ mov_write_avcc_tag(pb, track); if(track->mode == MODE_IPOD) mov_write_uuid_tag_ipod(pb); - } else if(track->vosLen > 0) + } else if (track->enc->field_order != AV_FIELD_UNKNOWN) + mov_write_fiel_tag(pb, track); + else if(track->vosLen > 0) mov_write_glbl_tag(pb, track); if (track->enc->sample_aspect_ratio.den && track->enc->sample_aspect_ratio.num && @@ -1214,7 +1244,8 @@ avio_wb32(pb, 0); /* reserved */ avio_wb32(pb, 0); /* reserved */ - avio_wb32(pb, 0x0); /* reserved (Layer & Alternate group) */ + avio_wb16(pb, 0); /* layer */ + avio_wb16(pb, st ? st->codec->codec_type : 0); /* alternate group) */ /* Volume, only for audio */ if(track->enc->codec_type == AVMEDIA_TYPE_AUDIO) avio_wb16(pb, 0x0100); @@ -1277,7 +1308,7 @@ avio_wb32(pb, track->enc->height << 16); return updateSize(pb, pos); -}; +} // This box seems important for the psp playback ... without it the movie seems to hang static int mov_write_edts_tag(AVIOContext *pb, MOVTrack *track) @@ -1398,21 +1429,34 @@ return updateSize(pb, pos); } -#if 0 -/* TODO: Not sorted out, but not necessary either */ static int mov_write_iods_tag(AVIOContext *pb, MOVMuxContext *mov) { - avio_wb32(pb, 0x15); /* size */ + int i, has_audio = 0, has_video = 0; + int64_t pos = avio_tell(pb); + int audio_profile = mov->iods_audio_profile; + int video_profile = mov->iods_video_profile; + for (i = 0; i < mov->nb_streams; i++) { + if(mov->tracks[i].entry > 0) { + has_audio |= mov->tracks[i].enc->codec_type == AVMEDIA_TYPE_AUDIO; + has_video |= mov->tracks[i].enc->codec_type == AVMEDIA_TYPE_VIDEO; + } + } + if (audio_profile < 0) + audio_profile = 0xFF - has_audio; + if (video_profile < 0) + video_profile = 0xFF - has_video; + avio_wb32(pb, 0x0); /* size */ ffio_wfourcc(pb, "iods"); avio_wb32(pb, 0); /* version & flags */ - avio_wb16(pb, 0x1007); - avio_w8(pb, 0); - avio_wb16(pb, 0x4fff); - avio_wb16(pb, 0xfffe); - avio_wb16(pb, 0x01ff); - return 0x15; + putDescr(pb, 0x10, 7); + avio_wb16(pb, 0x004f); + avio_w8(pb, 0xff); + avio_w8(pb, 0xff); + avio_w8(pb, audio_profile); + avio_w8(pb, video_profile); + avio_w8(pb, 0xff); + return updateSize(pb, pos); } -#endif static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov) { @@ -1820,7 +1864,8 @@ } mov_write_mvhd_tag(pb, mov); - //mov_write_iods_tag(pb, mov); + if (mov->mode != MODE_MOV && !mov->iods_skip) + mov_write_iods_tag(pb, mov); for (i=0; inb_streams; i++) { if(mov->tracks[i].entry > 0) { mov_write_trak_tag(pb, &(mov->tracks[i]), i < s->nb_streams ? s->streams[i] : NULL); @@ -1993,6 +2038,7 @@ AVCodecContext *enc = trk->enc; unsigned int samplesInChunk = 0; int size= pkt->size; + uint8_t *reformatted_data = NULL; if (!s->pb->seekable) return 0; /* Can't handle that */ if (!size) return 0; /* Discard 0 sized packets */ @@ -2000,7 +2046,7 @@ if (enc->codec_id == CODEC_ID_AMR_NB) { /* We must find out how many AMR blocks there are in one packet */ static uint16_t packed_size[16] = - {13, 14, 16, 18, 20, 21, 27, 32, 6, 0, 0, 0, 0, 0, 0, 0}; + {13, 14, 16, 18, 20, 21, 27, 32, 6, 0, 0, 0, 0, 0, 0, 1}; int len = 0; while (len < size && samplesInChunk < 100) { @@ -2011,9 +2057,6 @@ av_log(s, AV_LOG_ERROR, "fatal error, input is not a single packet, implement a AVParser for it\n"); return -1; } - } else if (enc->codec_id == CODEC_ID_ADPCM_MS || - enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) { - samplesInChunk = enc->frame_size; } else if (trk->sampleSize) samplesInChunk = size/trk->sampleSize; else @@ -2029,7 +2072,13 @@ if (enc->codec_id == CODEC_ID_H264 && trk->vosLen > 0 && *(uint8_t *)trk->vosData != 1) { /* from x264 or from bytestream h264 */ /* nal reformating needed */ - size = ff_avc_parse_nal_units(pb, pkt->data, pkt->size); + if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) { + ff_avc_parse_nal_units_buf(pkt->data, &reformatted_data, + &size); + avio_write(pb, reformatted_data, size); + } else { + size = ff_avc_parse_nal_units(pb, pkt->data, pkt->size); + } } else { avio_write(pb, pkt->data, size); } @@ -2084,7 +2133,9 @@ avio_flush(pb); if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) - ff_mov_add_hinted_packet(s, pkt, trk->hint_track, trk->entry); + ff_mov_add_hinted_packet(s, pkt, trk->hint_track, trk->entry, + reformatted_data, size); + av_free(reformatted_data); return 0; } @@ -2100,7 +2151,7 @@ track->mode = mov->mode; track->tag = MKTAG('t','e','x','t'); track->timescale = MOV_TIMESCALE; - track->enc = avcodec_alloc_context(); + track->enc = avcodec_alloc_context3(NULL); track->enc->codec_type = AVMEDIA_TYPE_SUBTITLE; for (i = 0; i < s->nb_chapters; i++) { @@ -2127,6 +2178,7 @@ { AVIOContext *pb = s->pb; MOVMuxContext *mov = s->priv_data; + AVDictionaryEntry *t; int i, hint_track = 0; if (!s->pb->seekable) { @@ -2219,21 +2271,21 @@ "or choose different container.\n"); }else if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO){ track->timescale = st->codec->sample_rate; - if(!st->codec->frame_size && !av_get_bits_per_sample(st->codec->codec_id)) { - av_log(s, AV_LOG_ERROR, "track %d: codec frame size is not set\n", i); - goto error; - }else if(st->codec->codec_id == CODEC_ID_ADPCM_MS || - st->codec->codec_id == CODEC_ID_ADPCM_IMA_WAV){ + /* set sampleSize for PCM and ADPCM */ + if (av_get_bits_per_sample(st->codec->codec_id)) { if (!st->codec->block_align) { - av_log(s, AV_LOG_ERROR, "track %d: codec block align is not set for adpcm\n", i); + av_log(s, AV_LOG_ERROR, "track %d: codec block align is not set\n", i); goto error; } track->sampleSize = st->codec->block_align; - }else if(st->codec->frame_size > 1){ /* assume compressed audio */ + } + /* set audio_vbr for compressed audio */ + if (av_get_bits_per_sample(st->codec->codec_id) < 8) { + if (!st->codec->frame_size) { + av_log(s, AV_LOG_ERROR, "track %d: codec frame size is not set\n", i); + goto error; + } track->audio_vbr = 1; - }else{ - st->codec->frame_size = 1; - track->sampleSize = (av_get_bits_per_sample(st->codec->codec_id) >> 3) * st->codec->channels; } if (track->mode != MODE_MOV) { if (track->timescale > UINT16_MAX) { @@ -2253,11 +2305,20 @@ if (!track->height) track->height = st->codec->height; - av_set_pts_info(st, 64, 1, track->timescale); + avpriv_set_pts_info(st, 64, 1, track->timescale); } mov_write_mdat_tag(pb, mov); - mov->time = s->timestamp + 0x7C25B080; //1970 based -> 1904 based + +#if FF_API_TIMESTAMP + if (s->timestamp) + mov->time = s->timestamp; + else +#endif + if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) + mov->time = ff_iso8601_to_unix_time(t->value); + if (mov->time) + mov->time += 0x7C25B080; // 1970 based -> 1904 based if (mov->chapter_track) mov_create_chapter_track(s, mov->chapter_track); @@ -2326,104 +2387,118 @@ } #if CONFIG_MOV_MUXER +MOV_CLASS(mov) AVOutputFormat ff_mov_muxer = { - "mov", - NULL_IF_CONFIG_SMALL("MOV format"), - NULL, - "mov", - sizeof(MOVMuxContext), - CODEC_ID_AAC, - CODEC_ID_MPEG4, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "mov", + .long_name = NULL_IF_CONFIG_SMALL("MOV format"), + .extensions = "mov", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AAC, +#if CONFIG_LIBX264_ENCODER + .video_codec = CODEC_ID_H264, +#else + .video_codec = CODEC_ID_MPEG4, +#endif + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){codec_movvideo_tags, codec_movaudio_tags, 0}, .priv_class = &mov_muxer_class, }; #endif #if CONFIG_TGP_MUXER +MOV_CLASS(tgp) AVOutputFormat ff_tgp_muxer = { - "3gp", - NULL_IF_CONFIG_SMALL("3GP format"), - NULL, - "3gp", - sizeof(MOVMuxContext), - CODEC_ID_AMR_NB, - CODEC_ID_H263, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "3gp", + .long_name = NULL_IF_CONFIG_SMALL("3GP format"), + .extensions = "3gp", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AMR_NB, + .video_codec = CODEC_ID_H263, + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){codec_3gp_tags, 0}, - .priv_class = &mov_muxer_class, + .priv_class = &tgp_muxer_class, }; #endif #if CONFIG_MP4_MUXER +MOV_CLASS(mp4) AVOutputFormat ff_mp4_muxer = { - "mp4", - NULL_IF_CONFIG_SMALL("MP4 format"), - "application/mp4", - "mp4", - sizeof(MOVMuxContext), - CODEC_ID_AAC, - CODEC_ID_MPEG4, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "mp4", + .long_name = NULL_IF_CONFIG_SMALL("MP4 format"), + .mime_type = "application/mp4", + .extensions = "mp4", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AAC, +#if CONFIG_LIBX264_ENCODER + .video_codec = CODEC_ID_H264, +#else + .video_codec = CODEC_ID_MPEG4, +#endif + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){ff_mp4_obj_type, 0}, - .priv_class = &mov_muxer_class, + .priv_class = &mp4_muxer_class, }; #endif #if CONFIG_PSP_MUXER +MOV_CLASS(psp) AVOutputFormat ff_psp_muxer = { - "psp", - NULL_IF_CONFIG_SMALL("PSP MP4 format"), - NULL, - "mp4,psp", - sizeof(MOVMuxContext), - CODEC_ID_AAC, - CODEC_ID_MPEG4, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "psp", + .long_name = NULL_IF_CONFIG_SMALL("PSP MP4 format"), + .extensions = "mp4,psp", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AAC, +#if CONFIG_LIBX264_ENCODER + .video_codec = CODEC_ID_H264, +#else + .video_codec = CODEC_ID_MPEG4, +#endif + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){ff_mp4_obj_type, 0}, - .priv_class = &mov_muxer_class, + .priv_class = &psp_muxer_class, }; #endif #if CONFIG_TG2_MUXER +MOV_CLASS(tg2) AVOutputFormat ff_tg2_muxer = { - "3g2", - NULL_IF_CONFIG_SMALL("3GP2 format"), - NULL, - "3g2", - sizeof(MOVMuxContext), - CODEC_ID_AMR_NB, - CODEC_ID_H263, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "3g2", + .long_name = NULL_IF_CONFIG_SMALL("3GP2 format"), + .extensions = "3g2", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AMR_NB, + .video_codec = CODEC_ID_H263, + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){codec_3gp_tags, 0}, - .priv_class = &mov_muxer_class, + .priv_class = &tg2_muxer_class, }; #endif #if CONFIG_IPOD_MUXER +MOV_CLASS(ipod) AVOutputFormat ff_ipod_muxer = { - "ipod", - NULL_IF_CONFIG_SMALL("iPod H.264 MP4 format"), - "application/mp4", - "m4v,m4a", - sizeof(MOVMuxContext), - CODEC_ID_AAC, - CODEC_ID_H264, - mov_write_header, - ff_mov_write_packet, - mov_write_trailer, + .name = "ipod", + .long_name = NULL_IF_CONFIG_SMALL("iPod H.264 MP4 format"), + .mime_type = "application/mp4", + .extensions = "m4v,m4a", + .priv_data_size = sizeof(MOVMuxContext), + .audio_codec = CODEC_ID_AAC, + .video_codec = CODEC_ID_H264, + .write_header = mov_write_header, + .write_packet = ff_mov_write_packet, + .write_trailer = mov_write_trailer, .flags = AVFMT_GLOBALHEADER, .codec_tag = (const AVCodecTag* const []){codec_ipod_tags, 0}, - .priv_class = &mov_muxer_class, + .priv_class = &ipod_muxer_class, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/movenc.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/movenc.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/movenc.h 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/movenc.h 2012-01-11 00:34:30.000000000 +0000 @@ -35,7 +35,7 @@ #define MODE_MOV 0x02 #define MODE_3GP 0x04 #define MODE_PSP 0x08 // example working PSP command line: -// ffmpeg -i testinput.avi -f psp -r 14.985 -s 320x240 -b 768 -ar 24000 -ab 32 M4V00001.MP4 +// avconv -i testinput.avi -f psp -r 14.985 -s 320x240 -b 768 -ar 24000 -ab 32 M4V00001.MP4 #define MODE_3G2 0x10 #define MODE_IPOD 0x20 @@ -112,6 +112,9 @@ int flags; int rtp_flags; + int iods_skip; + int iods_video_profile; + int iods_audio_profile; } MOVMuxContext; #define FF_MOV_FLAG_RTP_HINT 1 @@ -120,7 +123,8 @@ int ff_mov_init_hinting(AVFormatContext *s, int index, int src_index); int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt, - int track_index, int sample); + int track_index, int sample, + uint8_t *sample_data, int sample_size); void ff_mov_close_hinting(MOVTrack *track); #endif /* AVFORMAT_MOVENC_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/movenchint.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/movenchint.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/movenchint.c 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/movenchint.c 2012-01-11 00:34:30.000000000 +0000 @@ -36,7 +36,7 @@ track->tag = MKTAG('r','t','p',' '); track->src_track = src_index; - track->enc = avcodec_alloc_context(); + track->enc = avcodec_alloc_context3(NULL); if (!track->enc) goto fail; track->enc->codec_type = AVMEDIA_TYPE_DATA; @@ -95,11 +95,12 @@ * not copied. sample_queue_retain should be called before pkt->data * is reused/freed. */ -static void sample_queue_push(HintSampleQueue *queue, AVPacket *pkt, int sample) +static void sample_queue_push(HintSampleQueue *queue, uint8_t *data, int size, + int sample) { /* No need to keep track of smaller samples, since describing them * with immediates is more efficient. */ - if (pkt->size <= 14) + if (size <= 14) return; if (!queue->samples || queue->len >= queue->size) { HintSample* samples; @@ -109,8 +110,8 @@ return; queue->samples = samples; } - queue->samples[queue->len].data = pkt->data; - queue->samples[queue->len].size = pkt->size; + queue->samples[queue->len].data = data; + queue->samples[queue->len].size = size; queue->samples[queue->len].sample_number = sample; queue->samples[queue->len].offset = 0; queue->samples[queue->len].own_data = 0; @@ -386,7 +387,8 @@ } int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt, - int track_index, int sample) + int track_index, int sample, + uint8_t *sample_data, int sample_size) { MOVMuxContext *mov = s->priv_data; MOVTrack *trk = &mov->tracks[track_index]; @@ -402,7 +404,10 @@ if (!rtp_ctx->pb) return AVERROR(ENOMEM); - sample_queue_push(&trk->sample_queue, pkt, sample); + if (sample_data) + sample_queue_push(&trk->sample_queue, sample_data, sample_size, sample); + else + sample_queue_push(&trk->sample_queue, pkt->data, pkt->size, sample); /* Feed the packet to the RTP muxer */ ff_write_chained(rtp_ctx, 0, pkt, s); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mp3dec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mp3dec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mp3dec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mp3dec.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,7 +22,9 @@ #include "libavutil/avstring.h" #include "libavutil/intreadwrite.h" #include "libavutil/dict.h" +#include "libavutil/mathematics.h" #include "avformat.h" +#include "internal.h" #include "id3v2.h" #include "id3v1.h" #include "libavcodec/mpegaudiodecheader.h" @@ -50,7 +52,7 @@ for(frames = 0; buf2 < end; frames++) { header = AV_RB32(buf2); - fsize = ff_mpa_decode_header(&avctx, header, &sample_rate, &sample_rate, &sample_rate, &sample_rate); + fsize = avpriv_mpa_decode_header(&avctx, header, &sample_rate, &sample_rate, &sample_rate, &sample_rate); if(fsize < 0) break; buf2 += fsize; @@ -85,7 +87,7 @@ if(ff_mpa_check_header(v) < 0) return -1; - if (ff_mpegaudio_decode_header(&c, v) == 0) + if (avpriv_mpegaudio_decode_header(&c, v) == 0) vbrtag_size = c.frame_size; if(c.layer != 3) return -1; @@ -136,7 +138,7 @@ AVStream *st; int64_t off; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -146,7 +148,7 @@ st->start_time = 0; // lcm of all mp3 sample rates - av_set_pts_info(st, 64, 1, 14112000); + avpriv_set_pts_info(st, 64, 1, 14112000); off = avio_tell(s->pb); @@ -187,12 +189,11 @@ } AVInputFormat ff_mp3_demuxer = { - "mp3", - NULL_IF_CONFIG_SMALL("MPEG audio layer 2/3"), - 0, - mp3_read_probe, - mp3_read_header, - mp3_read_packet, + .name = "mp3", + .long_name = NULL_IF_CONFIG_SMALL("MPEG audio layer 2/3"), + .read_probe = mp3_read_probe, + .read_header = mp3_read_header, + .read_packet = mp3_read_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "mp2,mp3,m2a", /* XXX: use probe */ }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mp3enc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mp3enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mp3enc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mp3enc.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,12 +19,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include "avformat.h" +#include "avio_internal.h" #include "id3v1.h" #include "id3v2.h" #include "rawenc.h" #include "libavutil/avstring.h" +#include "libavcodec/mpegaudio.h" +#include "libavcodec/mpegaudiodata.h" +#include "libavcodec/mpegaudiodecheader.h" #include "libavutil/intreadwrite.h" #include "libavutil/opt.h" #include "libavutil/dict.h" @@ -60,7 +63,7 @@ buf[127] = 0xFF; /* default to unknown genre */ if ((tag = av_dict_get(s->metadata, "TCON", NULL, 0))) { //genre for(i = 0; i <= ID3v1_GENRE_MAX; i++) { - if (!strcasecmp(tag->value, ff_id3v1_genre_str[i])) { + if (!av_strcasecmp(tag->value, ff_id3v1_genre_str[i])) { buf[127] = i; count++; break; @@ -70,100 +73,55 @@ return count; } -/* simple formats */ - -static void id3v2_put_size(AVFormatContext *s, int size) -{ - avio_w8(s->pb, size >> 21 & 0x7f); - avio_w8(s->pb, size >> 14 & 0x7f); - avio_w8(s->pb, size >> 7 & 0x7f); - avio_w8(s->pb, size & 0x7f); -} - -static int string_is_ascii(const uint8_t *str) -{ - while (*str && *str < 128) str++; - return !*str; -} - -/** - * Write a text frame with one (normal frames) or two (TXXX frames) strings - * according to encoding (only UTF-8 or UTF-16+BOM supported). - * @return number of bytes written or a negative error code. - */ -static int id3v2_put_ttag(AVFormatContext *s, const char *str1, const char *str2, - uint32_t tag, enum ID3v2Encoding enc) -{ - int len; - uint8_t *pb; - int (*put)(AVIOContext*, const char*); - AVIOContext *dyn_buf; - if (avio_open_dyn_buf(&dyn_buf) < 0) - return AVERROR(ENOMEM); - - /* check if the strings are ASCII-only and use UTF16 only if - * they're not */ - if (enc == ID3v2_ENCODING_UTF16BOM && string_is_ascii(str1) && - (!str2 || string_is_ascii(str2))) - enc = ID3v2_ENCODING_ISO8859; - - avio_w8(dyn_buf, enc); - if (enc == ID3v2_ENCODING_UTF16BOM) { - avio_wl16(dyn_buf, 0xFEFF); /* BOM */ - put = avio_put_str16le; - } else - put = avio_put_str; - - put(dyn_buf, str1); - if (str2) - put(dyn_buf, str2); - len = avio_close_dyn_buf(dyn_buf, &pb); - - avio_wb32(s->pb, tag); - id3v2_put_size(s, len); - avio_wb16(s->pb, 0); - avio_write(s->pb, pb, len); - - av_freep(&pb); - return len + ID3v2_HEADER_SIZE; -} +typedef struct MP3Context { + const AVClass *class; + int id3v2_version; + int write_id3v1; + int64_t nb_frames_offset; +} MP3Context; static int mp3_write_trailer(struct AVFormatContext *s) { uint8_t buf[ID3v1_TAG_SIZE]; + MP3Context *mp3 = s->priv_data; /* write the id3v1 tag */ - if (id3v1_create_tag(s, buf) > 0) { + if (mp3 && mp3->write_id3v1 && id3v1_create_tag(s, buf) > 0) { avio_write(s->pb, buf, ID3v1_TAG_SIZE); - avio_flush(s->pb); } + + /* write number of frames */ + if (mp3 && mp3->nb_frames_offset) { + avio_seek(s->pb, mp3->nb_frames_offset, SEEK_SET); + avio_wb32(s->pb, s->streams[0]->nb_frames); + avio_seek(s->pb, 0, SEEK_END); + } + + avio_flush(s->pb); + return 0; } #if CONFIG_MP2_MUXER AVOutputFormat ff_mp2_muxer = { - "mp2", - NULL_IF_CONFIG_SMALL("MPEG audio layer 2"), - "audio/x-mpeg", - "mp2,m2a", - 0, - CODEC_ID_MP2, - CODEC_ID_NONE, - NULL, - ff_raw_write_packet, - mp3_write_trailer, + .name = "mp2", + .long_name = NULL_IF_CONFIG_SMALL("MPEG audio layer 2"), + .mime_type = "audio/x-mpeg", + .extensions = "mp2,m2a", + .audio_codec = CODEC_ID_MP2, + .video_codec = CODEC_ID_NONE, + .write_packet = ff_raw_write_packet, + .write_trailer = mp3_write_trailer, }; #endif #if CONFIG_MP3_MUXER -typedef struct MP3Context { - const AVClass *class; - int id3v2_version; -} MP3Context; static const AVOption options[] = { { "id3v2_version", "Select ID3v2 version to write. Currently 3 and 4 are supported.", - offsetof(MP3Context, id3v2_version), FF_OPT_TYPE_INT, {.dbl = 4}, 3, 4, AV_OPT_FLAG_ENCODING_PARAM}, + offsetof(MP3Context, id3v2_version), AV_OPT_TYPE_INT, {.dbl = 4}, 3, 4, AV_OPT_FLAG_ENCODING_PARAM}, + { "write_id3v1", "Enable ID3v1 writing. ID3v1 tags are written in UTF-8 which may not be supported by most software.", + offsetof(MP3Context, write_id3v1), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM}, { NULL }, }; @@ -174,19 +132,50 @@ .version = LIBAVUTIL_VERSION_INT, }; -static int id3v2_check_write_tag(AVFormatContext *s, AVDictionaryEntry *t, const char table[][4], - enum ID3v2Encoding enc) +/* insert a dummy frame containing number of frames */ +static void mp3_write_xing(AVFormatContext *s) { - uint32_t tag; - int i; + AVCodecContext *codec = s->streams[0]->codec; + MP3Context *mp3 = s->priv_data; + int bitrate_idx = 1; // 32 kbps + int64_t xing_offset = (codec->channels == 2) ? 32 : 17; + int32_t header; + MPADecodeHeader mpah; + int srate_idx, i, channels; + + for (i = 0; i < FF_ARRAY_ELEMS(avpriv_mpa_freq_tab); i++) + if (avpriv_mpa_freq_tab[i] == codec->sample_rate) { + srate_idx = i; + break; + } + if (i == FF_ARRAY_ELEMS(avpriv_mpa_freq_tab)) { + av_log(s, AV_LOG_ERROR, "Unsupported sample rate.\n"); + return; + } + + switch (codec->channels) { + case 1: channels = MPA_MONO; break; + case 2: channels = MPA_STEREO; break; + default: av_log(s, AV_LOG_ERROR, "Unsupported number of channels.\n"); return; + } + + /* dummy MPEG audio header */ + header = 0xff << 24; // sync + header |= (0x7 << 5 | 0x3 << 3 | 0x1 << 1 | 0x1) << 16; // sync/mpeg-1/layer 3/no crc*/ + header |= (bitrate_idx << 4 | srate_idx << 2) << 8; + header |= channels << 6; + avio_wb32(s->pb, header); + + avpriv_mpegaudio_decode_header(&mpah, header); + + ffio_fill(s->pb, 0, xing_offset); + ffio_wfourcc(s->pb, "Xing"); + avio_wb32(s->pb, 0x1); // only number of frames + mp3->nb_frames_offset = avio_tell(s->pb); + avio_wb32(s->pb, 0); - if (t->key[0] != 'T' || strlen(t->key) != 4) - return -1; - tag = AV_RB32(t->key); - for (i = 0; *table[i]; i++) - if (tag == AV_RB32(table[i])) - return id3v2_put_ttag(s, t->value, NULL, tag, enc); - return -1; + mpah.frame_size -= 4 + xing_offset + 4 + 4 + 4; + ffio_fill(s->pb, 0, mpah.frame_size); } /** @@ -196,62 +185,30 @@ static int mp3_write_header(struct AVFormatContext *s) { MP3Context *mp3 = s->priv_data; - AVDictionaryEntry *t = NULL; - int totlen = 0, enc = mp3->id3v2_version == 3 ? ID3v2_ENCODING_UTF16BOM : - ID3v2_ENCODING_UTF8; - int64_t size_pos, cur_pos; - - avio_wb32(s->pb, MKBETAG('I', 'D', '3', mp3->id3v2_version)); - avio_w8(s->pb, 0); - avio_w8(s->pb, 0); /* flags */ - - /* reserve space for size */ - size_pos = avio_tell(s->pb); - avio_wb32(s->pb, 0); + int ret; - ff_metadata_conv(&s->metadata, ff_id3v2_34_metadata_conv, NULL); - if (mp3->id3v2_version == 4) - ff_metadata_conv(&s->metadata, ff_id3v2_4_metadata_conv, NULL); - - while ((t = av_dict_get(s->metadata, "", t, AV_DICT_IGNORE_SUFFIX))) { - int ret; - - if ((ret = id3v2_check_write_tag(s, t, ff_id3v2_tags, enc)) > 0) { - totlen += ret; - continue; - } - if ((ret = id3v2_check_write_tag(s, t, mp3->id3v2_version == 3 ? - ff_id3v2_3_tags : ff_id3v2_4_tags, enc)) > 0) { - totlen += ret; - continue; - } - - /* unknown tag, write as TXXX frame */ - if ((ret = id3v2_put_ttag(s, t->key, t->value, MKBETAG('T', 'X', 'X', 'X'), enc)) < 0) - return ret; - totlen += ret; - } + ret = ff_id3v2_write(s, mp3->id3v2_version, ID3v2_DEFAULT_MAGIC); + if (ret < 0) + return ret; - cur_pos = avio_tell(s->pb); - avio_seek(s->pb, size_pos, SEEK_SET); - id3v2_put_size(s, totlen); - avio_seek(s->pb, cur_pos, SEEK_SET); + if (s->pb->seekable) + mp3_write_xing(s); return 0; } AVOutputFormat ff_mp3_muxer = { - "mp3", - NULL_IF_CONFIG_SMALL("MPEG audio layer 3"), - "audio/x-mpeg", - "mp3", - sizeof(MP3Context), - CODEC_ID_MP3, - CODEC_ID_NONE, - mp3_write_header, - ff_raw_write_packet, - mp3_write_trailer, - AVFMT_NOTIMESTAMPS, + .name = "mp3", + .long_name = NULL_IF_CONFIG_SMALL("MPEG audio layer 3"), + .mime_type = "audio/x-mpeg", + .extensions = "mp3", + .priv_data_size = sizeof(MP3Context), + .audio_codec = CODEC_ID_MP3, + .video_codec = CODEC_ID_NONE, + .write_header = mp3_write_header, + .write_packet = ff_raw_write_packet, + .write_trailer = mp3_write_trailer, + .flags = AVFMT_NOTIMESTAMPS, .priv_class = &mp3_muxer_class, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpc8.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpc8.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpc8.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpc8.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,7 @@ #include "libavcodec/get_bits.h" #include "libavcodec/unary.h" #include "avformat.h" +#include "internal.h" #include "avio_internal.h" /// Two-byte MPC tag @@ -222,7 +223,7 @@ c->samples = ffio_read_varlen(pb); ffio_read_varlen(pb); //silence samples at the beginning - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -235,7 +236,7 @@ st->codec->channels = (st->codec->extradata[1] >> 4) + 1; st->codec->sample_rate = mpc8_rate[st->codec->extradata[0] >> 5]; - av_set_pts_info(st, 32, 1152 << (st->codec->extradata[1]&3)*2, st->codec->sample_rate); + avpriv_set_pts_info(st, 32, 1152 << (st->codec->extradata[1]&3)*2, st->codec->sample_rate); st->duration = c->samples / (1152 << (st->codec->extradata[1]&3)*2); size -= avio_tell(pb) - pos; @@ -264,7 +265,7 @@ return AVERROR(EIO); mpc8_handle_chunk(s, tag, pos, size); } - return 0; + return AVERROR_EOF; } static int mpc8_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) @@ -281,12 +282,11 @@ AVInputFormat ff_mpc8_demuxer = { - "mpc8", - NULL_IF_CONFIG_SMALL("Musepack SV8"), - sizeof(MPCContext), - mpc8_probe, - mpc8_read_header, - mpc8_read_packet, - NULL, - mpc8_read_seek, + .name = "mpc8", + .long_name = NULL_IF_CONFIG_SMALL("Musepack SV8"), + .priv_data_size = sizeof(MPCContext), + .read_probe = mpc8_probe, + .read_header = mpc8_read_header, + .read_packet = mpc8_read_packet, + .read_seek = mpc8_read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpc.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ #include "libavcodec/get_bits.h" #include "avformat.h" +#include "internal.h" #include "apetag.h" #include "id3v1.h" #include "libavutil/dict.h" @@ -70,13 +71,21 @@ av_log(s, AV_LOG_ERROR, "Too many frames, seeking is not possible\n"); return -1; } - c->frames = av_malloc(c->fcount * sizeof(MPCFrame)); + if(c->fcount){ + c->frames = av_malloc(c->fcount * sizeof(MPCFrame)); + if(!c->frames){ + av_log(s, AV_LOG_ERROR, "Cannot allocate seektable\n"); + return AVERROR(ENOMEM); + } + }else{ + av_log(s, AV_LOG_WARNING, "Container reports no frames\n"); + } c->curframe = 0; c->lastframe = -1; c->curbits = 8; c->frames_noted = 0; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -88,7 +97,7 @@ st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE); avio_read(s->pb, st->codec->extradata, 16); st->codec->sample_rate = mpc_rate[st->codec->extradata[2] & 3]; - av_set_pts_info(st, 32, MPC_FRAMESIZE, st->codec->sample_rate); + avpriv_set_pts_info(st, 32, MPC_FRAMESIZE, st->codec->sample_rate); /* scan for seekpoints */ st->start_time = 0; st->duration = c->fcount; @@ -109,9 +118,10 @@ { MPCContext *c = s->priv_data; int ret, size, size2, curbits, cur = c->curframe; - int64_t tmp, pos; + unsigned tmp; + int64_t pos; - if (c->curframe >= c->fcount) + if (c->curframe >= c->fcount && c->fcount) return -1; if(c->curframe != c->lastframe + 1){ @@ -126,14 +136,13 @@ if(curbits <= 12){ size2 = (tmp >> (12 - curbits)) & 0xFFFFF; }else{ - tmp = (tmp << 32) | avio_rl32(s->pb); - size2 = (tmp >> (44 - curbits)) & 0xFFFFF; + size2 = (tmp << (curbits - 12) | avio_rl32(s->pb) >> (44 - curbits)) & 0xFFFFF; } curbits += 20; avio_seek(s->pb, pos, SEEK_SET); size = ((size2 + curbits + 31) & ~31) >> 3; - if(cur == c->frames_noted){ + if(cur == c->frames_noted && c->fcount){ c->frames[cur].pos = pos; c->frames[cur].size = size; c->frames[cur].skip = curbits - 20; @@ -146,7 +155,7 @@ return AVERROR(EIO); pkt->data[0] = curbits; - pkt->data[1] = (c->curframe > c->fcount); + pkt->data[1] = (c->curframe > c->fcount) && c->fcount; pkt->data[2] = 0; pkt->data[3] = 0; @@ -214,13 +223,13 @@ AVInputFormat ff_mpc_demuxer = { - "mpc", - NULL_IF_CONFIG_SMALL("Musepack"), - sizeof(MPCContext), - mpc_probe, - mpc_read_header, - mpc_read_packet, - mpc_read_close, - mpc_read_seek, + .name = "mpc", + .long_name = NULL_IF_CONFIG_SMALL("Musepack"), + .priv_data_size = sizeof(MPCContext), + .read_probe = mpc_probe, + .read_header = mpc_read_header, + .read_packet = mpc_read_packet, + .read_close = mpc_read_close, + .read_seek = mpc_read_seek, .extensions = "mpc", }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpeg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpeg.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpeg.c 2012-01-11 00:34:30.000000000 +0000 @@ -49,6 +49,10 @@ return pes1||pes2; } +static int check_pack_header(const uint8_t *buf) { + return (buf[1] & 0xC0) == 0x40 || (buf[1] & 0xF0) == 0x20; +} + static int mpegps_probe(AVProbeData *p) { uint32_t code= -1; @@ -61,9 +65,10 @@ if ((code & 0xffffff00) == 0x100) { int len= p->buf[i+1] << 8 | p->buf[i+2]; int pes= check_pes(p->buf+i, p->buf+p->buf_size); + int pack = check_pack_header(p->buf+i); if(code == SYSTEM_HEADER_START_CODE) sys++; - else if(code == PACK_START_CODE) pspack++; + else if(code == PACK_START_CODE && pack) pspack++; else if((code & 0xf0) == VIDEO_ID && pes) vid++; // skip pes payload to avoid start code emulation for private // and audio streams @@ -418,7 +423,7 @@ { MpegDemuxContext *m = s->priv_data; AVStream *st; - int len, startcode, i, es_type; + int len, startcode, i, es_type, ret; enum CodecID codec_id = CODEC_ID_NONE; enum AVMediaType type; int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work @@ -527,9 +532,10 @@ goto redo; } /* no stream found: add a new stream */ - st = av_new_stream(s, startcode); + st = avformat_new_stream(s, NULL); if (!st) goto skip; + st->id = startcode; st->codec->codec_type = type; st->codec->codec_id = codec_id; if (codec_id != CODEC_ID_PCM_S16BE) @@ -561,8 +567,7 @@ else if (st->codec->bits_per_coded_sample == 28) return AVERROR(EINVAL); } - av_new_packet(pkt, len); - avio_read(s->pb, pkt->data, pkt->size); + ret = av_get_packet(s->pb, pkt, len); pkt->pts = pts; pkt->dts = dts; pkt->pos = dummy_pos; @@ -571,7 +576,7 @@ pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0, pkt->size); - return 0; + return (ret < 0) ? ret : 0; } static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index, @@ -603,14 +608,12 @@ } AVInputFormat ff_mpegps_demuxer = { - "mpeg", - NULL_IF_CONFIG_SMALL("MPEG-PS format"), - sizeof(MpegDemuxContext), - mpegps_probe, - mpegps_read_header, - mpegps_read_packet, - NULL, - NULL, //mpegps_read_seek, - mpegps_read_dts, + .name = "mpeg", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-PS format"), + .priv_data_size = sizeof(MpegDemuxContext), + .read_probe = mpegps_probe, + .read_header = mpegps_read_header, + .read_packet = mpegps_read_packet, + .read_timestamp = mpegps_read_dts, .flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpegenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpegenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpegenc.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpegenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,8 +20,12 @@ */ #include "libavutil/fifo.h" +#include "libavutil/log.h" +#include "libavutil/mathematics.h" +#include "libavutil/opt.h" #include "libavcodec/put_bits.h" #include "avformat.h" +#include "internal.h" #include "mpeg.h" #define MAX_PAYLOAD_SIZE 4096 @@ -55,6 +59,7 @@ } StreamInfo; typedef struct { + const AVClass *class; int packet_size; /* required packet size */ int packet_number; int pack_header_freq; /* frequency (in packets^-1) at which we send pack headers */ @@ -73,6 +78,7 @@ double vcd_padding_bitrate; //FIXME floats int64_t vcd_padding_bytes_written; + int preload; } MpegMuxContext; extern AVOutputFormat ff_mpeg1vcd_muxer; @@ -331,7 +337,7 @@ goto fail; st->priv_data = stream; - av_set_pts_info(st, 64, 1, 90000); + avpriv_set_pts_info(st, 64, 1, 90000); switch(st->codec->codec_type) { case AVMEDIA_TYPE_AUDIO: @@ -415,12 +421,15 @@ video_bitrate += codec_rate; } +#if FF_API_MUXRATE if(ctx->mux_rate){ s->mux_rate= (ctx->mux_rate + (8 * 50) - 1) / (8 * 50); - } else { + } else +#endif + if (!s->mux_rate) { /* we increase slightly the bitrate to take into account the headers. XXX: compute it exactly */ - bitrate += bitrate*5/100; + bitrate += bitrate / 20; bitrate += 10000; s->mux_rate = (bitrate + (8 * 50) - 1) / (8 * 50); } @@ -1151,9 +1160,15 @@ StreamInfo *stream = st->priv_data; int64_t pts, dts; PacketDesc *pkt_desc; - const int preload= av_rescale(ctx->preload, 90000, AV_TIME_BASE); + int preload; const int is_iframe = st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (pkt->flags & AV_PKT_FLAG_KEY); +#if FF_API_PRELOAD + if (ctx->preload) + s->preload = ctx->preload; +#endif + preload = av_rescale(s->preload, 90000, AV_TIME_BASE); + pts= pkt->pts; dts= pkt->dts; @@ -1226,77 +1241,102 @@ return 0; } +#define OFFSET(x) offsetof(MpegMuxContext, x) +#define E AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "muxrate", NULL, OFFSET(mux_rate), AV_OPT_TYPE_INT, {0}, 0, INT_MAX, E }, + { "preload", "Initial demux-decode delay in microseconds.", OFFSET(preload), AV_OPT_TYPE_INT, {500000}, 0, INT_MAX, E}, + { NULL }, +}; + +#define MPEGENC_CLASS(flavor)\ +static const AVClass flavor ## _class = {\ + .class_name = #flavor " muxer",\ + .item_name = av_default_item_name,\ + .version = LIBAVUTIL_VERSION_INT,\ + .option = options,\ +}; + #if CONFIG_MPEG1SYSTEM_MUXER +MPEGENC_CLASS(mpeg) AVOutputFormat ff_mpeg1system_muxer = { - "mpeg", - NULL_IF_CONFIG_SMALL("MPEG-1 System format"), - "video/mpeg", - "mpg,mpeg", - sizeof(MpegMuxContext), - CODEC_ID_MP2, - CODEC_ID_MPEG1VIDEO, - mpeg_mux_init, - mpeg_mux_write_packet, - mpeg_mux_end, + .name = "mpeg", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 System format"), + .mime_type = "video/mpeg", + .extensions = "mpg,mpeg", + .priv_data_size = sizeof(MpegMuxContext), + .audio_codec = CODEC_ID_MP2, + .video_codec = CODEC_ID_MPEG1VIDEO, + .write_header = mpeg_mux_init, + .write_packet = mpeg_mux_write_packet, + .write_trailer = mpeg_mux_end, + .priv_class = &mpeg_class, }; #endif #if CONFIG_MPEG1VCD_MUXER +MPEGENC_CLASS(vcd) AVOutputFormat ff_mpeg1vcd_muxer = { - "vcd", - NULL_IF_CONFIG_SMALL("MPEG-1 System format (VCD)"), - "video/mpeg", - NULL, - sizeof(MpegMuxContext), - CODEC_ID_MP2, - CODEC_ID_MPEG1VIDEO, - mpeg_mux_init, - mpeg_mux_write_packet, - mpeg_mux_end, + .name = "vcd", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 System format (VCD)"), + .mime_type = "video/mpeg", + .priv_data_size = sizeof(MpegMuxContext), + .audio_codec = CODEC_ID_MP2, + .video_codec = CODEC_ID_MPEG1VIDEO, + .write_header = mpeg_mux_init, + .write_packet = mpeg_mux_write_packet, + .write_trailer = mpeg_mux_end, + .priv_class = &vcd_class, }; #endif #if CONFIG_MPEG2VOB_MUXER +MPEGENC_CLASS(vob) AVOutputFormat ff_mpeg2vob_muxer = { - "vob", - NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"), - "video/mpeg", - "vob", - sizeof(MpegMuxContext), - CODEC_ID_MP2, - CODEC_ID_MPEG2VIDEO, - mpeg_mux_init, - mpeg_mux_write_packet, - mpeg_mux_end, + .name = "vob", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"), + .mime_type = "video/mpeg", + .extensions = "vob", + .priv_data_size = sizeof(MpegMuxContext), + .audio_codec = CODEC_ID_MP2, + .video_codec = CODEC_ID_MPEG2VIDEO, + .write_header = mpeg_mux_init, + .write_packet = mpeg_mux_write_packet, + .write_trailer = mpeg_mux_end, + .priv_class = &vob_class, }; #endif /* Same as mpeg2vob_mux except that the pack size is 2324 */ #if CONFIG_MPEG2SVCD_MUXER +MPEGENC_CLASS(svcd) AVOutputFormat ff_mpeg2svcd_muxer = { - "svcd", - NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"), - "video/mpeg", - "vob", - sizeof(MpegMuxContext), - CODEC_ID_MP2, - CODEC_ID_MPEG2VIDEO, - mpeg_mux_init, - mpeg_mux_write_packet, - mpeg_mux_end, + .name = "svcd", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"), + .mime_type = "video/mpeg", + .extensions = "vob", + .priv_data_size = sizeof(MpegMuxContext), + .audio_codec = CODEC_ID_MP2, + .video_codec = CODEC_ID_MPEG2VIDEO, + .write_header = mpeg_mux_init, + .write_packet = mpeg_mux_write_packet, + .write_trailer = mpeg_mux_end, + .priv_class = &svcd_class, }; #endif /* Same as mpeg2vob_mux except the 'is_dvd' flag is set to produce NAV pkts */ #if CONFIG_MPEG2DVD_MUXER +MPEGENC_CLASS(dvd) AVOutputFormat ff_mpeg2dvd_muxer = { - "dvd", - NULL_IF_CONFIG_SMALL("MPEG-2 PS format (DVD VOB)"), - "video/mpeg", - "dvd", - sizeof(MpegMuxContext), - CODEC_ID_MP2, - CODEC_ID_MPEG2VIDEO, - mpeg_mux_init, - mpeg_mux_write_packet, - mpeg_mux_end, + .name = "dvd", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 PS format (DVD VOB)"), + .mime_type = "video/mpeg", + .extensions = "dvd", + .priv_data_size = sizeof(MpegMuxContext), + .audio_codec = CODEC_ID_MP2, + .video_codec = CODEC_ID_MPEG2VIDEO, + .write_header = mpeg_mux_init, + .write_packet = mpeg_mux_write_packet, + .write_trailer = mpeg_mux_end, + .priv_class = &dvd_class, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpegts.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpegts.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpegts.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpegts.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,8 +25,10 @@ #include "libavutil/intreadwrite.h" #include "libavutil/log.h" #include "libavutil/dict.h" +#include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "libavcodec/bytestream.h" +#include "libavcodec/get_bits.h" #include "avformat.h" #include "mpegts.h" #include "internal.h" @@ -41,6 +43,8 @@ #define MAX_PES_PAYLOAD 200*1024 +#define MAX_MP4_DESCR_COUNT 16 + enum MpegTSFilterType { MPEGTS_PES, MPEGTS_SECTION, @@ -71,6 +75,7 @@ struct MpegTSFilter { int pid; + int es_id; int last_cc; /* last cc code (-1 if first packet) */ enum MpegTSFilterType type; union { @@ -125,7 +130,7 @@ }; static const AVOption options[] = { - {"compute_pcr", "Compute exact PCR for each transport stream packet.", offsetof(MpegTSContext, mpeg2ts_compute_pcr), FF_OPT_TYPE_INT, + {"compute_pcr", "Compute exact PCR for each transport stream packet.", offsetof(MpegTSContext, mpeg2ts_compute_pcr), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM }, { NULL }, }; @@ -163,6 +168,7 @@ enum MpegTSState state; /* used to get the format */ int data_index; + int flags; /**< copied to the AVPacket flags */ int total_size; int pes_header_size; int extended_stream_id; @@ -170,6 +176,7 @@ int64_t ts_packet_pos; /**< position of first TS packet of this PES packet */ uint8_t header[MAX_PES_HEADER_SIZE]; uint8_t *buffer; + SLConfigDescr sl; } PESContext; extern AVInputFormat ff_mpegts_demuxer; @@ -221,11 +228,11 @@ } /** - * \brief discard_pid() decides if the pid is to be discarded according + * @brief discard_pid() decides if the pid is to be discarded according * to caller's programs selection - * \param ts : - TS context - * \param pid : - pid - * \return 1 if the pid is only comprised in programs that have .discard=AVDISCARD_ALL + * @param ts : - TS context + * @param pid : - pid + * @return 1 if the pid is only comprised in programs that have .discard=AVDISCARD_ALL * 0 otherwise */ static int discard_pid(MpegTSContext *ts, unsigned int pid) @@ -313,6 +320,7 @@ ts->pids[pid] = filter; filter->type = MPEGTS_SECTION; filter->pid = pid; + filter->es_id = -1; filter->last_cc = -1; sec = &filter->u.section_filter; sec->section_cb = section_cb; @@ -341,6 +349,7 @@ ts->pids[pid] = filter; filter->type = MPEGTS_PES; filter->pid = pid; + filter->es_id = -1; filter->last_cc = -1; pes = &filter->u.pes_filter; pes->pes_cb = pes_cb; @@ -359,7 +368,7 @@ PESContext *pes = filter->u.pes_filter.opaque; av_freep(&pes->buffer); /* referenced private data will be freed later in - * av_close_input_stream */ + * avformat_close_input */ if (!((PESContext *)filter->u.pes_filter.opaque)->st) { av_freep(&filter->u.pes_filter.opaque); } @@ -447,7 +456,7 @@ return c; } -/* read and allocate a DVB string preceeded by its length */ +/* read and allocate a DVB string preceded by its length */ static char *getstr8(const uint8_t **pp, const uint8_t *p_end) { int len; @@ -568,7 +577,7 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes, uint32_t stream_type, uint32_t prog_reg_desc) { - av_set_pts_info(st, 33, 1, 90000); + avpriv_set_pts_info(st, 33, 1, 90000); st->priv_data = pes; st->codec->codec_type = AVMEDIA_TYPE_DATA; st->codec->codec_id = CODEC_ID_NONE; @@ -596,13 +605,14 @@ return AVERROR(ENOMEM); memcpy(sub_pes, pes, sizeof(*sub_pes)); - sub_st = av_new_stream(pes->stream, pes->pid); + sub_st = avformat_new_stream(pes->stream, NULL); if (!sub_st) { av_free(sub_pes); return AVERROR(ENOMEM); } - av_set_pts_info(sub_st, 33, 1, 90000); + sub_st->id = pes->pid; + avpriv_set_pts_info(sub_st, 33, 1, 90000); sub_st->priv_data = sub_pes; sub_st->codec->codec_type = AVMEDIA_TYPE_AUDIO; sub_st->codec->codec_id = CODEC_ID_AC3; @@ -623,6 +633,12 @@ pkt->destruct = av_destruct_packet; pkt->data = pes->buffer; pkt->size = pes->data_index; + + if(pes->total_size != MAX_PES_PAYLOAD && + pes->pes_header_size + pes->data_index != pes->total_size + PES_START_SIZE) { + av_log(pes->stream, AV_LOG_WARNING, "PES packet size mismatch\n"); + pes->flags |= AV_PKT_FLAG_CORRUPT; + } memset(pkt->data+pkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE); // Separate out the AC3 substream from an HDMV combined TrueHD/AC3 PID @@ -634,12 +650,92 @@ pkt->dts = pes->dts; /* store position of first TS packet of this PES packet */ pkt->pos = pes->ts_packet_pos; + pkt->flags = pes->flags; /* reset pts values */ pes->pts = AV_NOPTS_VALUE; pes->dts = AV_NOPTS_VALUE; pes->buffer = NULL; pes->data_index = 0; + pes->flags = 0; +} + +static uint64_t get_bits64(GetBitContext *gb, int bits) +{ + uint64_t ret = 0; + while (bits > 17) { + ret <<= 17; + ret |= get_bits(gb, 17); + bits -= 17; + } + ret <<= bits; + ret |= get_bits(gb, bits); + return ret; +} + +static int read_sl_header(PESContext *pes, SLConfigDescr *sl, const uint8_t *buf, int buf_size) +{ + GetBitContext gb; + int au_start_flag = 0, au_end_flag = 0, ocr_flag = 0, idle_flag = 0; + int padding_flag = 0, padding_bits = 0, inst_bitrate_flag = 0; + int dts_flag = -1, cts_flag = -1; + int64_t dts = AV_NOPTS_VALUE, cts = AV_NOPTS_VALUE; + init_get_bits(&gb, buf, buf_size*8); + + if (sl->use_au_start) + au_start_flag = get_bits1(&gb); + if (sl->use_au_end) + au_end_flag = get_bits1(&gb); + if (!sl->use_au_start && !sl->use_au_end) + au_start_flag = au_end_flag = 1; + if (sl->ocr_len > 0) + ocr_flag = get_bits1(&gb); + if (sl->use_idle) + idle_flag = get_bits1(&gb); + if (sl->use_padding) + padding_flag = get_bits1(&gb); + if (padding_flag) + padding_bits = get_bits(&gb, 3); + + if (!idle_flag && (!padding_flag || padding_bits != 0)) { + if (sl->packet_seq_num_len) + skip_bits_long(&gb, sl->packet_seq_num_len); + if (sl->degr_prior_len) + if (get_bits1(&gb)) + skip_bits(&gb, sl->degr_prior_len); + if (ocr_flag) + skip_bits_long(&gb, sl->ocr_len); + if (au_start_flag) { + if (sl->use_rand_acc_pt) + get_bits1(&gb); + if (sl->au_seq_num_len > 0) + skip_bits_long(&gb, sl->au_seq_num_len); + if (sl->use_timestamps) { + dts_flag = get_bits1(&gb); + cts_flag = get_bits1(&gb); + } + } + if (sl->inst_bitrate_len) + inst_bitrate_flag = get_bits1(&gb); + if (dts_flag == 1) + dts = get_bits64(&gb, sl->timestamp_len); + if (cts_flag == 1) + cts = get_bits64(&gb, sl->timestamp_len); + if (sl->au_len > 0) + skip_bits_long(&gb, sl->au_len); + if (inst_bitrate_flag) + skip_bits_long(&gb, sl->inst_bitrate_len); + } + + if (dts != AV_NOPTS_VALUE) + pes->dts = dts; + if (cts != AV_NOPTS_VALUE) + pes->pts = cts; + + if (sl->timestamp_len && sl->timestamp_res) + avpriv_set_pts_info(pes->st, sl->timestamp_len, 1, sl->timestamp_res); + + return (get_bits_count(&gb) + 7) >> 3; } /* return non zero if a packet could be constructed */ @@ -690,9 +786,10 @@ /* stream not present in PMT */ if (!pes->st) { - pes->st = av_new_stream(ts->stream, pes->pid); + pes->st = avformat_new_stream(ts->stream, NULL); if (!pes->st) return AVERROR(ENOMEM); + pes->st->id = pes->pid; mpegts_set_stream_info(pes->st, pes, 0, 0); } @@ -792,6 +889,12 @@ /* we got the full header. We parse it and get the payload */ pes->state = MPEGTS_PAYLOAD; pes->data_index = 0; + if (pes->stream_type == 0x12) { + int sl_header_bytes = read_sl_header(pes, &pes->sl, p, buf_size); + pes->pes_header_size += sl_header_bytes; + p += sl_header_bytes; + buf_size -= sl_header_bytes; + } } break; case MPEGTS_PAYLOAD: @@ -816,9 +919,9 @@ * decreases demuxer delay for infrequent packets like subtitles from * a couple of seconds to milliseconds for properly muxed files. * total_size is the number of bytes following pes_packet_length - * in the pes header, i.e. not counting the first 6 bytes */ + * in the pes header, i.e. not counting the first PES_START_SIZE bytes */ if (!ts->stop_parse && pes->total_size < MAX_PES_PAYLOAD && - pes->pes_header_size + pes->data_index == pes->total_size + 6) { + pes->pes_header_size + pes->data_index == pes->total_size + PES_START_SIZE) { ts->stop_parse = 1; new_pes_packet(pes, ts->pkt); } @@ -856,49 +959,289 @@ return pes; } +#define MAX_LEVEL 4 +typedef struct { + AVFormatContext *s; + AVIOContext pb; + Mp4Descr *descr; + Mp4Descr *active_descr; + int descr_count; + int max_descr_count; + int level; +} MP4DescrParseContext; + +static int init_MP4DescrParseContext( + MP4DescrParseContext *d, AVFormatContext *s, const uint8_t *buf, + unsigned size, Mp4Descr *descr, int max_descr_count) +{ + int ret; + if (size > (1<<30)) + return AVERROR_INVALIDDATA; + + if ((ret = ffio_init_context(&d->pb, (unsigned char*)buf, size, 0, + NULL, NULL, NULL, NULL)) < 0) + return ret; + + d->s = s; + d->level = 0; + d->descr_count = 0; + d->descr = descr; + d->active_descr = NULL; + d->max_descr_count = max_descr_count; + + return 0; +} + +static void update_offsets(AVIOContext *pb, int64_t *off, int *len) { + int64_t new_off = avio_tell(pb); + (*len) -= new_off - *off; + *off = new_off; +} + +static int parse_mp4_descr(MP4DescrParseContext *d, int64_t off, int len, + int target_tag); + +static int parse_mp4_descr_arr(MP4DescrParseContext *d, int64_t off, int len) +{ + while (len > 0) { + if (parse_mp4_descr(d, off, len, 0) < 0) + return -1; + update_offsets(&d->pb, &off, &len); + } + return 0; +} + +static int parse_MP4IODescrTag(MP4DescrParseContext *d, int64_t off, int len) +{ + avio_rb16(&d->pb); // ID + avio_r8(&d->pb); + avio_r8(&d->pb); + avio_r8(&d->pb); + avio_r8(&d->pb); + avio_r8(&d->pb); + update_offsets(&d->pb, &off, &len); + return parse_mp4_descr_arr(d, off, len); +} + +static int parse_MP4ODescrTag(MP4DescrParseContext *d, int64_t off, int len) +{ + int id_flags; + if (len < 2) + return 0; + id_flags = avio_rb16(&d->pb); + if (!(id_flags & 0x0020)) { //URL_Flag + update_offsets(&d->pb, &off, &len); + return parse_mp4_descr_arr(d, off, len); //ES_Descriptor[] + } else { + return 0; + } +} + +static int parse_MP4ESDescrTag(MP4DescrParseContext *d, int64_t off, int len) +{ + int es_id = 0; + if (d->descr_count >= d->max_descr_count) + return -1; + ff_mp4_parse_es_descr(&d->pb, &es_id); + d->active_descr = d->descr + (d->descr_count++); + + d->active_descr->es_id = es_id; + update_offsets(&d->pb, &off, &len); + parse_mp4_descr(d, off, len, MP4DecConfigDescrTag); + update_offsets(&d->pb, &off, &len); + if (len > 0) + parse_mp4_descr(d, off, len, MP4SLDescrTag); + d->active_descr = NULL; + return 0; +} + +static int parse_MP4DecConfigDescrTag(MP4DescrParseContext *d, int64_t off, int len) +{ + Mp4Descr *descr = d->active_descr; + if (!descr) + return -1; + d->active_descr->dec_config_descr = av_malloc(len); + if (!descr->dec_config_descr) + return AVERROR(ENOMEM); + descr->dec_config_descr_len = len; + avio_read(&d->pb, descr->dec_config_descr, len); + return 0; +} + +static int parse_MP4SLDescrTag(MP4DescrParseContext *d, int64_t off, int len) +{ + Mp4Descr *descr = d->active_descr; + int predefined; + if (!descr) + return -1; + + predefined = avio_r8(&d->pb); + if (!predefined) { + int lengths; + int flags = avio_r8(&d->pb); + descr->sl.use_au_start = !!(flags & 0x80); + descr->sl.use_au_end = !!(flags & 0x40); + descr->sl.use_rand_acc_pt = !!(flags & 0x20); + descr->sl.use_padding = !!(flags & 0x08); + descr->sl.use_timestamps = !!(flags & 0x04); + descr->sl.use_idle = !!(flags & 0x02); + descr->sl.timestamp_res = avio_rb32(&d->pb); + avio_rb32(&d->pb); + descr->sl.timestamp_len = avio_r8(&d->pb); + descr->sl.ocr_len = avio_r8(&d->pb); + descr->sl.au_len = avio_r8(&d->pb); + descr->sl.inst_bitrate_len = avio_r8(&d->pb); + lengths = avio_rb16(&d->pb); + descr->sl.degr_prior_len = lengths >> 12; + descr->sl.au_seq_num_len = (lengths >> 7) & 0x1f; + descr->sl.packet_seq_num_len = (lengths >> 2) & 0x1f; + } else { + av_log_missing_feature(d->s, "Predefined SLConfigDescriptor\n", 0); + } + return 0; +} + +static int parse_mp4_descr(MP4DescrParseContext *d, int64_t off, int len, + int target_tag) { + int tag; + int len1 = ff_mp4_read_descr(d->s, &d->pb, &tag); + update_offsets(&d->pb, &off, &len); + if (len < 0 || len1 > len || len1 <= 0) { + av_log(d->s, AV_LOG_ERROR, "Tag %x length violation new length %d bytes remaining %d\n", tag, len1, len); + return -1; + } + + if (d->level++ >= MAX_LEVEL) { + av_log(d->s, AV_LOG_ERROR, "Maximum MP4 descriptor level exceeded\n"); + goto done; + } + + if (target_tag && tag != target_tag) { + av_log(d->s, AV_LOG_ERROR, "Found tag %x expected %x\n", tag, target_tag); + goto done; + } + + switch (tag) { + case MP4IODescrTag: + parse_MP4IODescrTag(d, off, len1); + break; + case MP4ODescrTag: + parse_MP4ODescrTag(d, off, len1); + break; + case MP4ESDescrTag: + parse_MP4ESDescrTag(d, off, len1); + break; + case MP4DecConfigDescrTag: + parse_MP4DecConfigDescrTag(d, off, len1); + break; + case MP4SLDescrTag: + parse_MP4SLDescrTag(d, off, len1); + break; + } + +done: + d->level--; + avio_seek(&d->pb, off + len1, SEEK_SET); + return 0; +} + static int mp4_read_iods(AVFormatContext *s, const uint8_t *buf, unsigned size, - int *es_id, uint8_t **dec_config_descr, - int *dec_config_descr_size) + Mp4Descr *descr, int *descr_count, int max_descr_count) { + MP4DescrParseContext d; + if (init_MP4DescrParseContext(&d, s, buf, size, descr, max_descr_count) < 0) + return -1; + + parse_mp4_descr(&d, avio_tell(&d.pb), size, MP4IODescrTag); + + *descr_count = d.descr_count; + return 0; +} + +static int mp4_read_od(AVFormatContext *s, const uint8_t *buf, unsigned size, + Mp4Descr *descr, int *descr_count, int max_descr_count) +{ + MP4DescrParseContext d; + if (init_MP4DescrParseContext(&d, s, buf, size, descr, max_descr_count) < 0) + return -1; + + parse_mp4_descr_arr(&d, avio_tell(&d.pb), size); + + *descr_count = d.descr_count; + return 0; +} + +static void m4sl_cb(MpegTSFilter *filter, const uint8_t *section, int section_len) +{ + MpegTSContext *ts = filter->u.section_filter.opaque; + SectionHeader h; + const uint8_t *p, *p_end; AVIOContext pb; - int tag; - unsigned len; + Mp4Descr mp4_descr[MAX_MP4_DESCR_COUNT] = {{ 0 }}; + int mp4_descr_count = 0; + int i, pid; + AVFormatContext *s = ts->stream; - ffio_init_context(&pb, buf, size, 0, NULL, NULL, NULL, NULL); + p_end = section + section_len - 4; + p = section; + if (parse_section_header(&h, &p, p_end) < 0) + return; + if (h.tid != M4OD_TID) + return; + + mp4_read_od(s, p, (unsigned)(p_end - p), mp4_descr, &mp4_descr_count, MAX_MP4_DESCR_COUNT); - len = ff_mp4_read_descr(s, &pb, &tag); - if (tag == MP4IODescrTag) { - avio_rb16(&pb); // ID - avio_r8(&pb); - avio_r8(&pb); - avio_r8(&pb); - avio_r8(&pb); - avio_r8(&pb); - len = ff_mp4_read_descr(s, &pb, &tag); - if (tag == MP4ESDescrTag) { - *es_id = avio_rb16(&pb); /* ES_ID */ - av_dlog(s, "ES_ID %#x\n", *es_id); - avio_r8(&pb); /* priority */ - len = ff_mp4_read_descr(s, &pb, &tag); - if (tag == MP4DecConfigDescrTag) { - *dec_config_descr = av_malloc(len); - if (!*dec_config_descr) - return AVERROR(ENOMEM); - *dec_config_descr_size = len; - avio_read(&pb, *dec_config_descr, len); + for (pid = 0; pid < NB_PID_MAX; pid++) { + if (!ts->pids[pid]) + continue; + for (i = 0; i < mp4_descr_count; i++) { + PESContext *pes; + AVStream *st; + if (ts->pids[pid]->es_id != mp4_descr[i].es_id) + continue; + if (!(ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES)) { + av_log(s, AV_LOG_ERROR, "pid %x is not PES\n", pid); + continue; + } + pes = ts->pids[pid]->u.pes_filter.opaque; + st = pes->st; + if (!st) { + continue; + } + + pes->sl = mp4_descr[i].sl; + + ffio_init_context(&pb, mp4_descr[i].dec_config_descr, + mp4_descr[i].dec_config_descr_len, 0, NULL, NULL, NULL, NULL); + ff_mp4_read_dec_config_descr(s, st, &pb); + if (st->codec->codec_id == CODEC_ID_AAC && + st->codec->extradata_size > 0) + st->need_parsing = 0; + if (st->codec->codec_id == CODEC_ID_H264 && + st->codec->extradata_size > 0) + st->need_parsing = 0; + + if (st->codec->codec_id <= CODEC_ID_NONE) { + } else if (st->codec->codec_id < CODEC_ID_FIRST_AUDIO) { + st->codec->codec_type = AVMEDIA_TYPE_VIDEO; + } else if (st->codec->codec_id < CODEC_ID_FIRST_SUBTITLE) { + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; + } else if (st->codec->codec_id < CODEC_ID_FIRST_UNKNOWN) { + st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; } } } - return 0; + for (i = 0; i < mp4_descr_count; i++) + av_free(mp4_descr[i].dec_config_descr); } int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type, const uint8_t **pp, const uint8_t *desc_list_end, - int mp4_dec_config_descr_len, int mp4_es_id, int pid, - uint8_t *mp4_dec_config_descr) + Mp4Descr *mp4_descr, int mp4_descr_count, int pid, + MpegTSContext *ts) { const uint8_t *desc_end; - int desc_len, desc_tag; + int desc_len, desc_tag, desc_es_id; char language[252]; int i; @@ -919,13 +1262,31 @@ mpegts_find_stream_type(st, desc_tag, DESC_types); switch(desc_tag) { + case 0x1E: /* SL descriptor */ + desc_es_id = get16(pp, desc_end); + if (ts && ts->pids[pid]) + ts->pids[pid]->es_id = desc_es_id; + for (i = 0; i < mp4_descr_count; i++) + if (mp4_descr[i].dec_config_descr_len && + mp4_descr[i].es_id == desc_es_id) { + AVIOContext pb; + ffio_init_context(&pb, mp4_descr[i].dec_config_descr, + mp4_descr[i].dec_config_descr_len, 0, NULL, NULL, NULL, NULL); + ff_mp4_read_dec_config_descr(fc, st, &pb); + if (st->codec->codec_id == CODEC_ID_AAC && + st->codec->extradata_size > 0) + st->need_parsing = 0; + if (st->codec->codec_id == CODEC_ID_MPEG4SYSTEMS) + mpegts_open_section_filter(ts, pid, m4sl_cb, ts, 1); + } + break; case 0x1F: /* FMC descriptor */ get16(pp, desc_end); - if (st->codec->codec_id == CODEC_ID_AAC_LATM && - mp4_dec_config_descr_len && mp4_es_id == pid) { + if (mp4_descr_count > 0 && st->codec->codec_id == CODEC_ID_AAC_LATM && + mp4_descr->dec_config_descr_len && mp4_descr->es_id == pid) { AVIOContext pb; - ffio_init_context(&pb, mp4_dec_config_descr, - mp4_dec_config_descr_len, 0, NULL, NULL, NULL, NULL); + ffio_init_context(&pb, mp4_descr->dec_config_descr, + mp4_descr->dec_config_descr_len, 0, NULL, NULL, NULL, NULL); ff_mp4_read_dec_config_descr(fc, st, &pb); if (st->codec->codec_id == CODEC_ID_AAC && st->codec->extradata_size > 0) @@ -1009,9 +1370,10 @@ int program_info_length, pcr_pid, pid, stream_type; int desc_list_len; uint32_t prog_reg_desc = 0; /* registration descriptor */ - uint8_t *mp4_dec_config_descr = NULL; - int mp4_dec_config_descr_len = 0; - int mp4_es_id = 0; + + Mp4Descr mp4_descr[MAX_MP4_DESCR_COUNT] = {{ 0 }}; + int mp4_descr_count = 0; + int i; av_dlog(ts->stream, "PMT: len %i\n", section_len); hex_dump_debug(ts->stream, (uint8_t *)section, section_len); @@ -1053,8 +1415,8 @@ get8(&p, p_end); // scope get8(&p, p_end); // label len -= 2; - mp4_read_iods(ts->stream, p, len, &mp4_es_id, - &mp4_dec_config_descr, &mp4_dec_config_descr_len); + mp4_read_iods(ts->stream, p, len, mp4_descr + mp4_descr_count, + &mp4_descr_count, MAX_MP4_DESCR_COUNT); } else if (tag == 0x05 && len >= 4) { // registration descriptor prog_reg_desc = bytestream_get_le32(&p); len -= 4; @@ -1071,6 +1433,7 @@ for(;;) { st = 0; + pes = NULL; stream_type = get8(&p, p_end); if (stream_type < 0) break; @@ -1078,23 +1441,36 @@ if (pid < 0) break; - /* now create ffmpeg stream */ + /* now create stream */ if (ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES) { pes = ts->pids[pid]->u.pes_filter.opaque; - if (!pes->st) - pes->st = av_new_stream(pes->stream, pes->pid); + if (!pes->st) { + pes->st = avformat_new_stream(pes->stream, NULL); + pes->st->id = pes->pid; + } st = pes->st; - } else { + } else if (stream_type != 0x13) { if (ts->pids[pid]) mpegts_close_filter(ts, ts->pids[pid]); //wrongly added sdt filter probably pes = add_pes_stream(ts, pid, pcr_pid); - if (pes) - st = av_new_stream(pes->stream, pes->pid); + if (pes) { + st = avformat_new_stream(pes->stream, NULL); + st->id = pes->pid; + } + } else { + int idx = ff_find_stream_index(ts->stream, pid); + if (idx >= 0) { + st = ts->stream->streams[idx]; + } else { + st = avformat_new_stream(ts->stream, NULL); + st->id = pid; + st->codec->codec_type = AVMEDIA_TYPE_DATA; + } } if (!st) goto out; - if (!pes->stream_type) + if (pes && !pes->stream_type) mpegts_set_stream_info(st, pes, stream_type, prog_reg_desc); add_pid_to_pmt(ts, h->id, pid); @@ -1109,10 +1485,10 @@ break; for(;;) { if (ff_parse_mpeg2_descriptor(ts->stream, st, stream_type, &p, desc_list_end, - mp4_dec_config_descr_len, mp4_es_id, pid, mp4_dec_config_descr) < 0) + mp4_descr, mp4_descr_count, pid, ts) < 0) break; - if (prog_reg_desc == AV_RL32("HDMV") && stream_type == 0x83 && pes->sub_st) { + if (pes && prog_reg_desc == AV_RL32("HDMV") && stream_type == 0x83 && pes->sub_st) { ff_program_add_stream_index(ts->stream, h->id, pes->sub_st->index); pes->sub_st->codec->codec_tag = st->codec->codec_tag; } @@ -1121,7 +1497,8 @@ } out: - av_free(mp4_dec_config_descr); + for (i = 0; i < mp4_descr_count; i++) + av_free(mp4_descr[i].dec_config_descr); } static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len) @@ -1247,7 +1624,8 @@ { AVFormatContext *s = ts->stream; MpegTSFilter *tss; - int len, pid, cc, cc_ok, afc, is_start; + int len, pid, cc, expected_cc, cc_ok, afc, is_start, is_discontinuity, + has_adaptation, has_payload; const uint8_t *p, *p_end; int64_t pos; @@ -1263,20 +1641,39 @@ if (!tss) return 0; + afc = (packet[3] >> 4) & 3; + if (afc == 0) /* reserved value */ + return 0; + has_adaptation = afc & 2; + has_payload = afc & 1; + is_discontinuity = has_adaptation + && packet[4] != 0 /* with length > 0 */ + && (packet[5] & 0x80); /* and discontinuity indicated */ + /* continuity check (currently not used) */ cc = (packet[3] & 0xf); - cc_ok = (tss->last_cc < 0) || ((((tss->last_cc + 1) & 0x0f) == cc)); + expected_cc = has_payload ? (tss->last_cc + 1) & 0x0f : tss->last_cc; + cc_ok = pid == 0x1FFF // null packet PID + || is_discontinuity + || tss->last_cc < 0 + || expected_cc == cc; + tss->last_cc = cc; + if (!cc_ok) { + av_log(ts->stream, AV_LOG_WARNING, + "Continuity check failed for pid %d expected %d got %d\n", + pid, expected_cc, cc); + if(tss->type == MPEGTS_PES) { + PESContext *pc = tss->u.pes_filter.opaque; + pc->flags |= AV_PKT_FLAG_CORRUPT; + } + } - /* skip adaptation field */ - afc = (packet[3] >> 4) & 3; - p = packet + 4; - if (afc == 0) /* reserved value */ - return 0; - if (afc == 2) /* adaptation field only */ + if (!has_payload) return 0; - if (afc == 3) { - /* skip adapation field */ + p = packet + 4; + if (has_adaptation) { + /* skip adaptation field */ p += p[0] + 1; } /* if past the end of packet, ignore */ @@ -1354,7 +1751,7 @@ len = avio_read(pb, buf, TS_PACKET_SIZE); if (len != TS_PACKET_SIZE) return len < 0 ? len : AVERROR_EOF; - /* check paquet sync byte */ + /* check packet sync byte */ if (buf[0] != 0x47) { /* find a new packet start */ avio_seek(pb, -TS_PACKET_SIZE, SEEK_CUR); @@ -1376,7 +1773,24 @@ { AVFormatContext *s = ts->stream; uint8_t packet[TS_PACKET_SIZE]; - int packet_num, ret; + int packet_num, ret = 0; + + if (avio_tell(s->pb) != ts->last_pos) { + int i; + av_dlog(ts->stream, "Skipping after seek\n"); + /* seek detected, flush pes buffer */ + for (i = 0; i < NB_PID_MAX; i++) { + if (ts->pids[i]) { + if (ts->pids[i]->type == MPEGTS_PES) { + PESContext *pes = ts->pids[i]->u.pes_filter.opaque; + av_freep(&pes->buffer); + pes->data_index = 0; + pes->state = MPEGTS_SKIP; /* skip until pes header */ + } + ts->pids[i]->last_cc = -1; + } + } + } ts->stop_parse = 0; packet_num = 0; @@ -1388,12 +1802,13 @@ break; ret = read_packet(s, packet, ts->raw_packet_size); if (ret != 0) - return ret; + break; ret = handle_packet(ts, packet); if (ret != 0) - return ret; + break; } - return 0; + ts->last_pos = avio_tell(s->pb); + return ret; } static int mpegts_probe(AVProbeData *p) @@ -1464,17 +1879,6 @@ int len; int64_t pos; -#if FF_API_FORMAT_PARAMETERS - if (ap) { - if (ap->mpeg2ts_compute_pcr) - ts->mpeg2ts_compute_pcr = ap->mpeg2ts_compute_pcr; - if(ap->mpeg2ts_raw){ - av_log(s, AV_LOG_ERROR, "use mpegtsraw_demuxer!\n"); - return -1; - } - } -#endif - /* read the first 1024 bytes to get packet size */ pos = avio_tell(pb); len = avio_read(pb, buf, sizeof(buf)); @@ -1489,8 +1893,8 @@ if (s->iformat == &ff_mpegts_demuxer) { /* normal demux */ - /* first do a scaning to get all the services */ - if (avio_seek(pb, pos, SEEK_SET) < 0) + /* first do a scan to get all the services */ + if (pb->seekable && avio_seek(pb, pos, SEEK_SET) < 0) av_log(s, AV_LOG_ERROR, "Unable to seek back to the start\n"); mpegts_open_section_filter(ts, SDT_PID, sdt_cb, ts, 1); @@ -1514,10 +1918,10 @@ /* only read packets */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) goto fail; - av_set_pts_info(st, 60, 1, 27000000); + avpriv_set_pts_info(st, 60, 1, 27000000); st->codec->codec_type = AVMEDIA_TYPE_DATA; st->codec->codec_id = CODEC_ID_MPEG2TS; @@ -1611,18 +2015,6 @@ MpegTSContext *ts = s->priv_data; int ret, i; - if (avio_tell(s->pb) != ts->last_pos) { - /* seek detected, flush pes buffer */ - for (i = 0; i < NB_PID_MAX; i++) { - if (ts->pids[i] && ts->pids[i]->type == MPEGTS_PES) { - PESContext *pes = ts->pids[i]->u.pes_filter.opaque; - av_freep(&pes->buffer); - pes->data_index = 0; - pes->state = MPEGTS_SKIP; /* skip until pes header */ - } - } - } - ts->pkt = pkt; ret = handle_packets(ts, 0); if (ret < 0) { @@ -1640,8 +2032,6 @@ } } - ts->last_pos = avio_tell(s->pb); - return ret; } @@ -1740,7 +2130,7 @@ ts_adj = target_ts; stream_index_gen_search = stream_index; } - pos = av_gen_search(s, stream_index_gen_search, ts_adj, + pos = ff_gen_search(s, stream_index_gen_search, ts_adj, 0, INT64_MAX, -1, AV_NOPTS_VALUE, AV_NOPTS_VALUE, @@ -1788,7 +2178,7 @@ uint8_t buf[TS_PACKET_SIZE]; int64_t pos; - if(av_seek_frame_binary(s, stream_index, target_ts, flags) < 0) + if (ff_seek_frame_binary(s, stream_index, target_ts, flags) < 0) return -1; pos= avio_tell(s->pb); @@ -1862,15 +2252,15 @@ } AVInputFormat ff_mpegts_demuxer = { - "mpegts", - NULL_IF_CONFIG_SMALL("MPEG-2 transport stream format"), - sizeof(MpegTSContext), - mpegts_probe, - mpegts_read_header, - mpegts_read_packet, - mpegts_read_close, - read_seek, - mpegts_get_pcr, + .name = "mpegts", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 transport stream format"), + .priv_data_size = sizeof(MpegTSContext), + .read_probe = mpegts_probe, + .read_header = mpegts_read_header, + .read_packet = mpegts_read_packet, + .read_close = mpegts_read_close, + .read_seek = read_seek, + .read_timestamp = mpegts_get_pcr, .flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT, #ifdef USE_SYNCPOINT_SEARCH .read_seek2 = read_seek2, @@ -1878,15 +2268,14 @@ }; AVInputFormat ff_mpegtsraw_demuxer = { - "mpegtsraw", - NULL_IF_CONFIG_SMALL("MPEG-2 raw transport stream format"), - sizeof(MpegTSContext), - NULL, - mpegts_read_header, - mpegts_raw_read_packet, - mpegts_read_close, - read_seek, - mpegts_get_pcr, + .name = "mpegtsraw", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 raw transport stream format"), + .priv_data_size = sizeof(MpegTSContext), + .read_header = mpegts_read_header, + .read_packet = mpegts_raw_read_packet, + .read_close = mpegts_read_close, + .read_seek = read_seek, + .read_timestamp = mpegts_get_pcr, .flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT, #ifdef USE_SYNCPOINT_SEARCH .read_seek2 = read_seek2, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpegtsenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpegtsenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpegtsenc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpegtsenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,7 @@ #include "libavutil/bswap.h" #include "libavutil/crc.h" #include "libavutil/dict.h" +#include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "libavcodec/mpegvideo.h" #include "avformat.h" @@ -67,6 +68,7 @@ int tsid; int64_t first_pcr; int mux_rate; ///< set to 1 when VBR + int pes_payload_size; int transport_stream_id; int original_network_id; @@ -76,17 +78,24 @@ int start_pid; } MpegTSWrite; +/* a PES packet header is generated every DEFAULT_PES_HEADER_FREQ packets */ +#define DEFAULT_PES_HEADER_FREQ 16 +#define DEFAULT_PES_PAYLOAD_SIZE ((DEFAULT_PES_HEADER_FREQ - 1) * 184 + 170) + static const AVOption options[] = { { "mpegts_transport_stream_id", "Set transport_stream_id field.", - offsetof(MpegTSWrite, transport_stream_id), FF_OPT_TYPE_INT, {.dbl = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM}, + offsetof(MpegTSWrite, transport_stream_id), AV_OPT_TYPE_INT, {.dbl = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM}, { "mpegts_original_network_id", "Set original_network_id field.", - offsetof(MpegTSWrite, original_network_id), FF_OPT_TYPE_INT, {.dbl = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM}, + offsetof(MpegTSWrite, original_network_id), AV_OPT_TYPE_INT, {.dbl = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM}, { "mpegts_service_id", "Set service_id field.", - offsetof(MpegTSWrite, service_id), FF_OPT_TYPE_INT, {.dbl = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM}, + offsetof(MpegTSWrite, service_id), AV_OPT_TYPE_INT, {.dbl = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM}, { "mpegts_pmt_start_pid", "Set the first pid of the PMT.", - offsetof(MpegTSWrite, pmt_start_pid), FF_OPT_TYPE_INT, {.dbl = 0x1000 }, 0x1000, 0x1f00, AV_OPT_FLAG_ENCODING_PARAM}, + offsetof(MpegTSWrite, pmt_start_pid), AV_OPT_TYPE_INT, {.dbl = 0x1000 }, 0x1000, 0x1f00, AV_OPT_FLAG_ENCODING_PARAM}, { "mpegts_start_pid", "Set the first pid.", - offsetof(MpegTSWrite, start_pid), FF_OPT_TYPE_INT, {.dbl = 0x0100 }, 0x0100, 0x0f00, AV_OPT_FLAG_ENCODING_PARAM}, + offsetof(MpegTSWrite, start_pid), AV_OPT_TYPE_INT, {.dbl = 0x0100 }, 0x0100, 0x0f00, AV_OPT_FLAG_ENCODING_PARAM}, + { "muxrate", NULL, offsetof(MpegTSWrite, mux_rate), AV_OPT_TYPE_INT, {1}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, + { "pes_payload_size", "Minimum PES packet payload in bytes", + offsetof(MpegTSWrite, pes_payload_size), AV_OPT_TYPE_INT, {DEFAULT_PES_PAYLOAD_SIZE}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM}, { NULL }, }; @@ -186,10 +195,6 @@ #define DEFAULT_PROVIDER_NAME "Libav" #define DEFAULT_SERVICE_NAME "Service01" -/* a PES packet header is generated every DEFAULT_PES_HEADER_FREQ packets */ -#define DEFAULT_PES_HEADER_FREQ 16 -#define DEFAULT_PES_PAYLOAD_SIZE ((DEFAULT_PES_HEADER_FREQ - 1) * 184 + 170) - /* we retransmit the SI info at this rate */ #define SDT_RETRANS_TIME 500 #define PAT_RETRANS_TIME 100 @@ -199,11 +204,12 @@ struct MpegTSService *service; int pid; /* stream associated pid */ int cc; - int payload_index; + int payload_size; int first_pts_check; ///< first pts check needed int64_t payload_pts; int64_t payload_dts; - uint8_t payload[DEFAULT_PES_PAYLOAD_SIZE]; + int payload_flags; + uint8_t *payload; ADTSContext *adts; } MpegTSWriteStream; @@ -450,6 +456,9 @@ const char *provider_name; int *pids; + // round up to a whole number of TS packets + ts->pes_payload_size = (ts->pes_payload_size + 14 + 183) / 184 * 184 - 14; + ts->tsid = ts->transport_stream_id; ts->onid = ts->original_network_id; /* allocate a single DVB service */ @@ -481,11 +490,14 @@ /* assign pids to each stream */ for(i = 0;i < s->nb_streams; i++) { st = s->streams[i]; - av_set_pts_info(st, 33, 1, 90000); + avpriv_set_pts_info(st, 33, 1, 90000); ts_st = av_mallocz(sizeof(MpegTSWriteStream)); if (!ts_st) goto fail; st->priv_data = ts_st; + ts_st->payload = av_mallocz(ts->pes_payload_size); + if (!ts_st->payload) + goto fail; ts_st->service = service; /* MPEG pid values < 16 are reserved. Applications which set st->id in * this range are assigned a calculated pid. */ @@ -521,10 +533,10 @@ st->codec->extradata_size > 0) { ts_st->adts = av_mallocz(sizeof(*ts_st->adts)); if (!ts_st->adts) - return AVERROR(ENOMEM); + goto fail; if (ff_adts_decode_extradata(s, ts_st->adts, st->codec->extradata, st->codec->extradata_size) < 0) - return -1; + goto fail; } } @@ -537,7 +549,10 @@ service->pcr_pid = ts_st->pid; } - ts->mux_rate = s->mux_rate ? s->mux_rate : 1; +#if FF_API_MUXRATE + if (s->mux_rate) + ts->mux_rate = s->mux_rate; +#endif if (ts->mux_rate > 1) { service->pcr_packet_period = (ts->mux_rate * PCR_RETRANS_TIME) / @@ -589,7 +604,13 @@ fail: av_free(pids); for(i = 0;i < s->nb_streams; i++) { + MpegTSWriteStream *ts_st; st = s->streams[i]; + ts_st = st->priv_data; + if (ts_st) { + av_freep(&ts_st->payload); + av_freep(&ts_st->adts); + } av_freep(&st->priv_data); } return -1; @@ -620,7 +641,7 @@ ts->first_pcr; } -static uint8_t* write_pcr_bits(uint8_t *buf, int64_t pcr) +static int write_pcr_bits(uint8_t *buf, int64_t pcr) { int64_t pcr_low = pcr % 300, pcr_high = pcr / 300; @@ -631,7 +652,7 @@ *buf++ = pcr_high << 7 | pcr_low >> 8 | 0x7e; *buf++ = pcr_low; - return buf; + return 6; } /* Write a single null transport stream packet */ @@ -667,7 +688,7 @@ *q++ = 0x10; /* Adaptation flags: PCR present */ /* PCR coded into 6 bytes */ - q = write_pcr_bits(q, get_pcr(ts, s->pb)); + q += write_pcr_bits(q, get_pcr(ts, s->pb)); /* stuffing bytes */ memset(q, 0xFF, TS_PACKET_SIZE - (q - buf)); @@ -688,6 +709,39 @@ *q++ = val; } +/* Set an adaptation field flag in an MPEG-TS packet*/ +static void set_af_flag(uint8_t *pkt, int flag) +{ + // expect at least one flag to set + assert(flag); + + if ((pkt[3] & 0x20) == 0) { + // no AF yet, set adaptation field flag + pkt[3] |= 0x20; + // 1 byte length, no flags + pkt[4] = 1; + pkt[5] = 0; + } + pkt[5] |= flag; +} + +/* Extend the adaptation field by size bytes */ +static void extend_af(uint8_t *pkt, int size) +{ + // expect already existing adaptation field + assert(pkt[3] & 0x20); + pkt[4] += size; +} + +/* Get a pointer to MPEG-TS payload (right after TS packet header) */ +static uint8_t *get_ts_payload_start(uint8_t *pkt) +{ + if (pkt[3] & 0x20) + return pkt + 5 + pkt[4]; + else + return pkt + 4; +} + /* Add a pes header to the front of payload, and segment into an integer number of * ts packets. The final ts packet is padded using an over-sized adaptation header * to exactly fill the last ts packet. @@ -695,7 +749,7 @@ */ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, const uint8_t *payload, int payload_size, - int64_t pts, int64_t dts) + int64_t pts, int64_t dts, int key) { MpegTSWriteStream *ts_st = st->priv_data; MpegTSWrite *ts = s->priv_data; @@ -740,8 +794,17 @@ *q++ = val; *q++ = ts_st->pid; ts_st->cc = (ts_st->cc + 1) & 0xf; - *q++ = 0x10 | ts_st->cc | (write_pcr ? 0x20 : 0); + *q++ = 0x10 | ts_st->cc; // payload indicator + CC + if (key && is_start && pts != AV_NOPTS_VALUE) { + // set Random Access for key frames + if (ts_st->pid == ts_st->service->pcr_pid) + write_pcr = 1; + set_af_flag(buf, 0x40); + q = get_ts_payload_start(buf); + } if (write_pcr) { + set_af_flag(buf, 0x10); + q = get_ts_payload_start(buf); // add 11, pcr references the last byte of program clock reference base if (ts->mux_rate > 1) pcr = get_pcr(ts, s->pb); @@ -749,9 +812,8 @@ pcr = (dts - delay)*300; if (dts != AV_NOPTS_VALUE && dts < pcr / 300) av_log(s, AV_LOG_WARNING, "dts < pcr, TS is invalid\n"); - *q++ = 7; /* AFC length */ - *q++ = 0x10; /* flags: PCR present */ - q = write_pcr_bits(q, pcr); + extend_af(buf, write_pcr_bits(q, pcr)); + q = get_ts_payload_start(buf); } if (is_start) { int pes_extension = 0; @@ -877,6 +939,7 @@ int size = pkt->size; uint8_t *buf= pkt->data; uint8_t *data= NULL; + MpegTSWrite *ts = s->priv_data; MpegTSWriteStream *ts_st = st->priv_data; const uint64_t delay = av_rescale(s->max_delay, 90000, AV_TIME_BASE)*2; int64_t dts = AV_NOPTS_VALUE, pts = AV_NOPTS_VALUE; @@ -897,13 +960,13 @@ uint32_t state = -1; if (pkt->size < 5 || AV_RB32(pkt->data) != 0x0000001) { - av_log(s, AV_LOG_ERROR, "h264 bitstream malformated, " + av_log(s, AV_LOG_ERROR, "H.264 bitstream malformed, " "no startcode found, use -vbsf h264_mp4toannexb\n"); return -1; } do { - p = ff_find_start_code(p, buf_end, &state); + p = avpriv_mpv_find_start_code(p, buf_end, &state); //av_log(s, AV_LOG_INFO, "nal %d\n", state & 0x1f); } while (p < buf_end && (state & 0x1f) != 9 && (state & 0x1f) != 5 && (state & 0x1f) != 1); @@ -924,7 +987,7 @@ return -1; if ((AV_RB16(pkt->data) & 0xfff0) != 0xfff0) { ADTSContext *adts = ts_st->adts; - int new_size; + int new_size, err; if (!adts) { av_log(s, AV_LOG_ERROR, "aac bitstream not in adts format " "and extradata missing\n"); @@ -936,7 +999,12 @@ data = av_malloc(new_size); if (!data) return AVERROR(ENOMEM); - ff_adts_write_frame_header(adts, data, pkt->size, adts->pce_size); + err = ff_adts_write_frame_header(adts, data, pkt->size, + adts->pce_size); + if (err < 0) { + av_free(data); + return err; + } if (adts->pce_size) { memcpy(data+ADTS_HEADER_SIZE, adts->pce_data, adts->pce_size); adts->pce_size = 0; @@ -949,24 +1017,34 @@ if (st->codec->codec_type != AVMEDIA_TYPE_AUDIO) { // for video and subtitle, write a single pes packet - mpegts_write_pes(s, st, buf, size, pts, dts); + mpegts_write_pes(s, st, buf, size, pts, dts, pkt->flags & AV_PKT_FLAG_KEY); av_free(data); return 0; } - if (ts_st->payload_index + size > DEFAULT_PES_PAYLOAD_SIZE) { - mpegts_write_pes(s, st, ts_st->payload, ts_st->payload_index, - ts_st->payload_pts, ts_st->payload_dts); - ts_st->payload_index = 0; + if (ts_st->payload_size + size > ts->pes_payload_size) { + if (ts_st->payload_size) { + mpegts_write_pes(s, st, ts_st->payload, ts_st->payload_size, + ts_st->payload_pts, ts_st->payload_dts, + ts_st->payload_flags & AV_PKT_FLAG_KEY); + ts_st->payload_size = 0; + } + if (size > ts->pes_payload_size) { + mpegts_write_pes(s, st, buf, size, pts, dts, + pkt->flags & AV_PKT_FLAG_KEY); + av_free(data); + return 0; + } } - if (!ts_st->payload_index) { + if (!ts_st->payload_size) { ts_st->payload_pts = pts; ts_st->payload_dts = dts; + ts_st->payload_flags = pkt->flags; } - memcpy(ts_st->payload + ts_st->payload_index, buf, size); - ts_st->payload_index += size; + memcpy(ts_st->payload + ts_st->payload_size, buf, size); + ts_st->payload_size += size; av_free(data); @@ -985,10 +1063,12 @@ for(i = 0; i < s->nb_streams; i++) { st = s->streams[i]; ts_st = st->priv_data; - if (ts_st->payload_index > 0) { - mpegts_write_pes(s, st, ts_st->payload, ts_st->payload_index, - ts_st->payload_pts, ts_st->payload_dts); + if (ts_st->payload_size > 0) { + mpegts_write_pes(s, st, ts_st->payload, ts_st->payload_size, + ts_st->payload_pts, ts_st->payload_dts, + ts_st->payload_flags & AV_PKT_FLAG_KEY); } + av_freep(&ts_st->payload); av_freep(&ts_st->adts); } avio_flush(s->pb); @@ -1005,15 +1085,15 @@ } AVOutputFormat ff_mpegts_muxer = { - "mpegts", - NULL_IF_CONFIG_SMALL("MPEG-2 transport stream format"), - "video/x-mpegts", - "ts,m2t", - sizeof(MpegTSWrite), - CODEC_ID_MP2, - CODEC_ID_MPEG2VIDEO, - mpegts_write_header, - mpegts_write_packet, - mpegts_write_end, + .name = "mpegts", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 transport stream format"), + .mime_type = "video/x-mpegts", + .extensions = "ts,m2t", + .priv_data_size = sizeof(MpegTSWrite), + .audio_codec = CODEC_ID_MP2, + .video_codec = CODEC_ID_MPEG2VIDEO, + .write_header = mpegts_write_header, + .write_packet = mpegts_write_packet, + .write_trailer = mpegts_write_end, .priv_class = &mpegts_muxer_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpegts.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpegts.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpegts.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpegts.h 2012-01-11 00:34:30.000000000 +0000 @@ -39,6 +39,7 @@ /* table ids */ #define PAT_TID 0x00 #define PMT_TID 0x02 +#define M4OD_TID 0x05 #define SDT_TID 0x42 #define STREAM_TYPE_VIDEO_MPEG1 0x01 @@ -64,6 +65,30 @@ const uint8_t *buf, int len); void ff_mpegts_parse_close(MpegTSContext *ts); +typedef struct { + int use_au_start; + int use_au_end; + int use_rand_acc_pt; + int use_padding; + int use_timestamps; + int use_idle; + int timestamp_res; + int timestamp_len; + int ocr_len; + int au_len; + int inst_bitrate_len; + int degr_prior_len; + int au_seq_num_len; + int packet_seq_num_len; +} SLConfigDescr; + +typedef struct { + int es_id; + int dec_config_descr_len; + uint8_t *dec_config_descr; + SLConfigDescr sl; +} Mp4Descr; + /** * Parse an MPEG-2 descriptor * @param[in] fc Format context (used for logging only) @@ -79,7 +104,7 @@ */ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type, const uint8_t **pp, const uint8_t *desc_list_end, - int mp4_dec_config_descr_len, int mp4_es_id, int pid, - uint8_t *mp4_dec_config_descr); + Mp4Descr *mp4_descr, int mp4_descr_count, int pid, + MpegTSContext *ts); #endif /* AVFORMAT_MPEGTS_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpjpeg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpjpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mpjpeg.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mpjpeg.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,7 +22,7 @@ /* Multipart JPEG */ -#define BOUNDARY_TAG "ffserver" +#define BOUNDARY_TAG "avserver" static int mpjpeg_write_header(AVFormatContext *s) { @@ -54,14 +54,13 @@ } AVOutputFormat ff_mpjpeg_muxer = { - "mpjpeg", - NULL_IF_CONFIG_SMALL("MIME multipart JPEG format"), - "multipart/x-mixed-replace;boundary=" BOUNDARY_TAG, - "mjpg", - 0, - CODEC_ID_NONE, - CODEC_ID_MJPEG, - mpjpeg_write_header, - mpjpeg_write_packet, - mpjpeg_write_trailer, + .name = "mpjpeg", + .long_name = NULL_IF_CONFIG_SMALL("MIME multipart JPEG format"), + .mime_type = "multipart/x-mixed-replace;boundary=" BOUNDARY_TAG, + .extensions = "mjpg", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_MJPEG, + .write_header = mpjpeg_write_header, + .write_packet = mpjpeg_write_packet, + .write_trailer = mpjpeg_write_trailer, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/msnwc_tcp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/msnwc_tcp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/msnwc_tcp.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/msnwc_tcp.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ #include "libavcodec/bytestream.h" #include "avformat.h" +#include "internal.h" #define HEADER_SIZE 24 @@ -75,7 +76,7 @@ AVCodecContext *codec; AVStream *st; - st = av_new_stream(ctx, 0); + st = avformat_new_stream(ctx, NULL); if(!st) return AVERROR(ENOMEM); @@ -84,7 +85,7 @@ codec->codec_id = CODEC_ID_MIMIC; codec->codec_tag = MKTAG('M', 'L', '2', '0'); - av_set_pts_info(st, 32, 1, 1000); + avpriv_set_pts_info(st, 32, 1, 1000); /* Some files start with "connected\r\n\r\n". * So skip until we find the first byte of struct size */ @@ -131,10 +132,9 @@ } AVInputFormat ff_msnwc_tcp_demuxer = { - "msnwctcp", - NULL_IF_CONFIG_SMALL("MSN TCP Webcam stream"), - 0, - msnwc_tcp_probe, - msnwc_tcp_read_header, - msnwc_tcp_read_packet, + .name = "msnwctcp", + .long_name = NULL_IF_CONFIG_SMALL("MSN TCP Webcam stream"), + .read_probe = msnwc_tcp_probe, + .read_header = msnwc_tcp_read_header, + .read_packet = msnwc_tcp_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mtv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mtv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mtv.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mtv.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,13 +27,12 @@ #include "libavutil/bswap.h" #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define MTV_ASUBCHUNK_DATA_SIZE 500 #define MTV_HEADER_SIZE 512 #define MTV_AUDIO_PADDING_SIZE 12 #define AUDIO_SAMPLING_RATE 44100 -#define VIDEO_SID 0 -#define AUDIO_SID 1 typedef struct MTVDemuxContext { @@ -54,7 +53,7 @@ static int mtv_probe(AVProbeData *p) { /* Magic is 'AMV' */ - if(*(p->buf) != 'A' || *(p->buf+1) != 'M' || *(p->buf+2) != 'V') + if (*p->buf != 'A' || *(p->buf + 1) != 'M' || *(p->buf + 2) != 'V') return 0; /* Check for nonzero in bpp and (width|height) header fields */ @@ -107,6 +106,12 @@ avio_skip(pb, 4); audio_subsegments = avio_rl16(pb); + + if (audio_subsegments == 0) { + av_log_ask_for_sample(s, "MTV files without audio are not supported\n"); + return AVERROR_INVALIDDATA; + } + mtv->full_segment_size = audio_subsegments * (MTV_AUDIO_PADDING_SIZE + MTV_ASUBCHUNK_DATA_SIZE) + mtv->img_segment_size; @@ -118,11 +123,11 @@ // video - raw rgb565 - st = av_new_stream(s, VIDEO_SID); + st = avformat_new_stream(s, NULL); if(!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 64, 1, mtv->video_fps); + avpriv_set_pts_info(st, 64, 1, mtv->video_fps); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_RAWVIDEO; st->codec->pix_fmt = PIX_FMT_RGB565; @@ -134,11 +139,11 @@ // audio - mp3 - st = av_new_stream(s, AUDIO_SID); + st = avformat_new_stream(s, NULL); if(!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE); + avpriv_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_MP3; st->codec->bit_rate = mtv->audio_br; @@ -171,7 +176,7 @@ return ret; pkt->pos -= MTV_AUDIO_PADDING_SIZE; - pkt->stream_index = AUDIO_SID; + pkt->stream_index = 1; }else { @@ -190,17 +195,17 @@ for(i=0;iimg_segment_size/2;i++) *((uint16_t *)pkt->data+i) = av_bswap16(*((uint16_t *)pkt->data+i)); #endif - pkt->stream_index = VIDEO_SID; + pkt->stream_index = 0; } return ret; } AVInputFormat ff_mtv_demuxer = { - "MTV", - NULL_IF_CONFIG_SMALL("MTV format"), - sizeof(MTVDemuxContext), - mtv_probe, - mtv_read_header, - mtv_read_packet, + .name = "MTV", + .long_name = NULL_IF_CONFIG_SMALL("MTV format"), + .priv_data_size = sizeof(MTVDemuxContext), + .read_probe = mtv_probe, + .read_header = mtv_read_header, + .read_packet = mtv_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mvi.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mvi.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mvi.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mvi.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ */ #include "avformat.h" +#include "internal.h" #define MVI_FRAC_BITS 10 @@ -42,11 +43,11 @@ AVStream *ast, *vst; unsigned int version, frames_count, msecs_per_frame, player_version; - ast = av_new_stream(s, 0); + ast = avformat_new_stream(s, NULL); if (!ast) return AVERROR(ENOMEM); - vst = av_new_stream(s, 0); + vst = avformat_new_stream(s, NULL); if (!vst) return AVERROR(ENOMEM); @@ -76,14 +77,14 @@ return AVERROR_INVALIDDATA; } - av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); + avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate); ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; ast->codec->codec_id = CODEC_ID_PCM_U8; ast->codec->channels = 1; ast->codec->bits_per_coded_sample = 8; ast->codec->bit_rate = ast->codec->sample_rate * 8; - av_set_pts_info(vst, 64, msecs_per_frame, 1000000); + avpriv_set_pts_info(vst, 64, msecs_per_frame, 1000000); vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_id = CODEC_ID_MOTIONPIXELS; @@ -124,11 +125,10 @@ } AVInputFormat ff_mvi_demuxer = { - "mvi", - NULL_IF_CONFIG_SMALL("Motion Pixels MVI format"), - sizeof(MviDemuxContext), - NULL, - read_header, - read_packet, + .name = "mvi", + .long_name = NULL_IF_CONFIG_SMALL("Motion Pixels MVI format"), + .priv_data_size = sizeof(MviDemuxContext), + .read_header = read_header, + .read_packet = read_packet, .extensions = "mvi" }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mxf.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mxf.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mxf.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mxf.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/common.h" #include "mxf.h" /** @@ -41,6 +42,8 @@ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14, CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, CODEC_ID_RAWVIDEO }, /* Uncompressed */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x02,0x00,0x00 }, 14, CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */ + { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14, CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra */ + { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x00 }, 15, CODEC_ID_V210 }, /* V210 */ /* SoundEssenceCompression */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, 13, CODEC_ID_PCM_S16LE }, /* Uncompressed */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, CODEC_ID_PCM_S16LE }, @@ -80,7 +83,7 @@ {PIX_FMT_PAL8, {'P', 8 }}, }; -static const int num_pixel_layouts = sizeof(ff_mxf_pixel_layouts) / sizeof(*ff_mxf_pixel_layouts); +static const int num_pixel_layouts = FF_ARRAY_ELEMS(ff_mxf_pixel_layouts); int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mxfdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mxfdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mxfdec.c 2011-06-01 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mxfdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -46,8 +46,10 @@ //#define DEBUG #include "libavutil/aes.h" +#include "libavutil/mathematics.h" #include "libavcodec/bytestream.h" #include "avformat.h" +#include "internal.h" #include "mxf.h" typedef struct { @@ -223,12 +225,13 @@ if (length > 61444) /* worst case PAL 1920 samples 8 channels */ return -1; - av_new_packet(pkt, length); - avio_read(pb, pkt->data, length); + length = av_get_packet(pb, pkt, length); + if (length < 0) + return length; data_ptr = pkt->data; end_ptr = pkt->data + length; buf_ptr = pkt->data + 4; /* skip SMPTE 331M header */ - for (; buf_ptr < end_ptr; ) { + for (; buf_ptr + st->codec->channels*4 < end_ptr; ) { for (i = 0; i < st->codec->channels; i++) { uint32_t sample = bytestream_get_le32(&buf_ptr); if (st->codec->bits_per_coded_sample == 24) @@ -238,7 +241,7 @@ } buf_ptr += 32 - st->codec->channels*4; // always 8 channels stored SMPTE 331M } - pkt->size = data_ptr - pkt->data; + av_shrink_packet(pkt, data_ptr - pkt->data); return 0; } @@ -248,7 +251,7 @@ MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; int64_t end = avio_tell(pb) + klv->length; - uint64_t size; + int64_t size; uint64_t orig_size; uint64_t plaintext_size; uint8_t ivec[16]; @@ -290,12 +293,16 @@ if (memcmp(tmpbuf, checkv, 16)) av_log(s, AV_LOG_ERROR, "probably incorrect decryption key\n"); size -= 32; - av_get_packet(pb, pkt, size); + size = av_get_packet(pb, pkt, size); + if (size < 0) + return size; + else if (size < plaintext_size) + return AVERROR_INVALIDDATA; size -= plaintext_size; if (mxf->aesc) av_aes_crypt(mxf->aesc, &pkt->data[plaintext_size], &pkt->data[plaintext_size], size >> 4, ivec, 1); - pkt->size = orig_size; + av_shrink_packet(pkt, orig_size); pkt->stream_index = index; avio_skip(pb, end - avio_tell(pb)); return 0; @@ -332,8 +339,11 @@ av_log(s, AV_LOG_ERROR, "error reading D-10 aes3 frame\n"); return -1; } - } else - av_get_packet(s->pb, pkt, klv.length); + } else { + int ret = av_get_packet(s->pb, pkt, klv.length); + if (ret < 0) + return ret; + } pkt->stream_index = index; pkt->pos = klv.offset; return 0; @@ -599,7 +609,7 @@ default: /* Private uid used by SONY C0023S01.mxf */ if (IS_KLV_KEY(uid, mxf_sony_mpeg4_extradata)) { - descriptor->extradata = av_malloc(size); + descriptor->extradata = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE); if (!descriptor->extradata) return -1; descriptor->extradata_size = size; @@ -737,17 +747,18 @@ if (!source_track) continue; - st = av_new_stream(mxf->fc, source_track->track_id); + st = avformat_new_stream(mxf->fc, NULL); if (!st) { av_log(mxf->fc, AV_LOG_ERROR, "could not allocate stream\n"); return -1; } + st->id = source_track->track_id; st->priv_data = source_track; st->duration = component->duration; if (st->duration == -1) st->duration = AV_NOPTS_VALUE; st->start_time = component->start_position; - av_set_pts_info(st, 64, material_track->edit_rate.num, material_track->edit_rate.den); + avpriv_set_pts_info(st, 64, material_track->edit_rate.num, material_track->edit_rate.den); if (!(source_track->sequence = mxf_resolve_strong_ref(mxf, &source_track->sequence_ref, Sequence))) { av_log(mxf->fc, AV_LOG_ERROR, "could not resolve source track sequence strong ref\n"); @@ -820,12 +831,12 @@ st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den; /* TODO: implement CODEC_ID_RAWAUDIO */ if (st->codec->codec_id == CODEC_ID_PCM_S16LE) { - if (descriptor->bits_per_sample == 24) + if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24) st->codec->codec_id = CODEC_ID_PCM_S24LE; else if (descriptor->bits_per_sample == 32) st->codec->codec_id = CODEC_ID_PCM_S32LE; } else if (st->codec->codec_id == CODEC_ID_PCM_S16BE) { - if (descriptor->bits_per_sample == 24) + if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24) st->codec->codec_id = CODEC_ID_PCM_S24BE; else if (descriptor->bits_per_sample == 32) st->codec->codec_id = CODEC_ID_PCM_S32BE; @@ -1010,17 +1021,17 @@ sample_time = 0; seconds = av_rescale(sample_time, st->time_base.num, st->time_base.den); avio_seek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET); - av_update_cur_dts(s, st, sample_time); + ff_update_cur_dts(s, st, sample_time); return 0; } AVInputFormat ff_mxf_demuxer = { - "mxf", - NULL_IF_CONFIG_SMALL("Material eXchange Format"), - sizeof(MXFContext), - mxf_probe, - mxf_read_header, - mxf_read_packet, - mxf_read_close, - mxf_read_seek, + .name = "mxf", + .long_name = NULL_IF_CONFIG_SMALL("Material eXchange Format"), + .priv_data_size = sizeof(MXFContext), + .read_probe = mxf_probe, + .read_header = mxf_read_header, + .read_packet = mxf_read_packet, + .read_close = mxf_read_close, + .read_seek = mxf_read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mxfenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mxfenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mxfenc.c 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mxfenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -39,6 +39,7 @@ #include "libavcodec/bytestream.h" #include "audiointerleave.h" #include "avformat.h" +#include "internal.h" #include "mxf.h" static const int NTSC_samples_per_frame[] = { 1602, 1601, 1602, 1601, 1602, 0 }; @@ -67,7 +68,7 @@ int index; ///< index in mxf_essence_container_uls table const UID *codec_ul; int order; ///< interleaving order if dts are equal - int interlaced; ///< wether picture is interlaced + int interlaced; ///< whether picture is interlaced int temporal_reordering; AVRational aspect_ratio; ///< display aspect ratio int closed_gop; ///< gop is closed, used in mpeg-2 frame parsing @@ -1284,6 +1285,8 @@ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x03,0x03,0x00 }, // MP-HL Long GOP { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x04,0x02,0x00 }, // 422P-HL I-Frame { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x04,0x03,0x00 }, // 422P-HL Long GOP + { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x05,0x02,0x00 }, // MP@H-14 I-Frame + { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x05,0x03,0x00 }, // MP@H-14 Long GOP }; static const UID *mxf_get_mpeg2_codec_ul(AVCodecContext *avctx) @@ -1295,6 +1298,8 @@ return &mxf_mpeg2_codec_uls[0+long_gop]; else if (avctx->level == 4) // High return &mxf_mpeg2_codec_uls[4+long_gop]; + else if (avctx->level == 6) // High 14 + return &mxf_mpeg2_codec_uls[8+long_gop]; } else if (avctx->profile == 0) { // 422 if (avctx->level == 5) // Main return &mxf_mpeg2_codec_uls[2+long_gop]; @@ -1407,6 +1412,8 @@ int i; uint8_t present[FF_ARRAY_ELEMS(mxf_essence_container_uls)] = {0}; const int *samples_per_frame = NULL; + AVDictionaryEntry *t; + int64_t timestamp = 0; if (!s->nb_streams) return -1; @@ -1435,7 +1442,7 @@ av_log(s, AV_LOG_ERROR, "unsupported video frame rate\n"); return -1; } - av_set_pts_info(st, 64, mxf->time_base.num, mxf->time_base.den); + avpriv_set_pts_info(st, 64, mxf->time_base.num, mxf->time_base.den); if (s->oformat == &ff_mxf_d10_muxer) { if (st->codec->bit_rate == 50000000) if (mxf->time_base.den == 25) sc->index = 3; @@ -1463,7 +1470,7 @@ av_log(s, AV_LOG_ERROR, "only 48khz is implemented\n"); return -1; } - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); if (s->oformat == &ff_mxf_d10_muxer) { if (st->index != 1) { av_log(s, AV_LOG_ERROR, "MXF D-10 only support one audio track\n"); @@ -1512,8 +1519,15 @@ sc->order = AV_RB32(sc->track_essence_element_key+12); } +#if FF_API_TIMESTAMP if (s->timestamp) - mxf->timestamp = mxf_parse_timestamp(s->timestamp); + timestamp = s->timestamp; + else +#endif + if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) + timestamp = ff_iso8601_to_unix_time(t->value); + if (timestamp) + mxf->timestamp = mxf_parse_timestamp(timestamp); mxf->duration = -1; mxf->timecode_track = av_mallocz(sizeof(*mxf->timecode_track)); @@ -1539,7 +1553,7 @@ static uint32_t ff_framenum_to_12m_time_code(unsigned frame, int drop, int fps) { return (0 << 31) | // color frame flag - (0 << 30) | // drop frame flag + (drop << 30) | // drop frame flag ( ((frame % fps) / 10) << 28) | // tens of frames ( ((frame % fps) % 10) << 24) | // units of frames (0 << 23) | // field phase (NTSC), b0 (PAL) @@ -1549,7 +1563,7 @@ ((((frame / (fps * 60)) % 60) / 10) << 12) | // tens of minutes ((((frame / (fps * 60)) % 60) % 10) << 8) | // units of minutes (0 << 7) | // b1 - (0 << 6) | // b2 (NSC), field phase (PAL) + (0 << 6) | // b2 (NTSC), field phase (PAL) ((((frame / (fps * 3600) % 24)) / 10) << 4) | // tens of hours ( (frame / (fps * 3600) % 24)) % 10; // units of hours } @@ -1880,33 +1894,30 @@ } AVOutputFormat ff_mxf_muxer = { - "mxf", - NULL_IF_CONFIG_SMALL("Material eXchange Format"), - "application/mxf", - "mxf", - sizeof(MXFContext), - CODEC_ID_PCM_S16LE, - CODEC_ID_MPEG2VIDEO, - mxf_write_header, - mxf_write_packet, - mxf_write_footer, - AVFMT_NOTIMESTAMPS, - NULL, - mxf_interleave, + .name = "mxf", + .long_name = NULL_IF_CONFIG_SMALL("Material eXchange Format"), + .mime_type = "application/mxf", + .extensions = "mxf", + .priv_data_size = sizeof(MXFContext), + .audio_codec = CODEC_ID_PCM_S16LE, + .video_codec = CODEC_ID_MPEG2VIDEO, + .write_header = mxf_write_header, + .write_packet = mxf_write_packet, + .write_trailer = mxf_write_footer, + .flags = AVFMT_NOTIMESTAMPS, + .interleave_packet = mxf_interleave, }; AVOutputFormat ff_mxf_d10_muxer = { - "mxf_d10", - NULL_IF_CONFIG_SMALL("Material eXchange Format, D-10 Mapping"), - "application/mxf", - NULL, - sizeof(MXFContext), - CODEC_ID_PCM_S16LE, - CODEC_ID_MPEG2VIDEO, - mxf_write_header, - mxf_write_packet, - mxf_write_footer, - AVFMT_NOTIMESTAMPS, - NULL, - mxf_interleave, + .name = "mxf_d10", + .long_name = NULL_IF_CONFIG_SMALL("Material eXchange Format, D-10 Mapping"), + .mime_type = "application/mxf", + .priv_data_size = sizeof(MXFContext), + .audio_codec = CODEC_ID_PCM_S16LE, + .video_codec = CODEC_ID_MPEG2VIDEO, + .write_header = mxf_write_header, + .write_packet = mxf_write_packet, + .write_trailer = mxf_write_footer, + .flags = AVFMT_NOTIMESTAMPS, + .interleave_packet = mxf_interleave, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mxg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mxg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/mxg.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/mxg.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,10 +22,9 @@ #include "libavutil/intreadwrite.h" #include "libavcodec/mjpeg.h" #include "avformat.h" +#include "internal.h" #include "avio.h" -#define VIDEO_STREAM_INDEX 0 -#define AUDIO_STREAM_INDEX 1 #define DEFAULT_PACKET_SIZE 1024 #define OVERREAD_SIZE 3 @@ -44,14 +43,14 @@ MXGContext *mxg = s->priv_data; /* video parameters will be extracted from the compressed bitstream */ - video_st = av_new_stream(s, VIDEO_STREAM_INDEX); + video_st = avformat_new_stream(s, NULL); if (!video_st) return AVERROR(ENOMEM); video_st->codec->codec_type = AVMEDIA_TYPE_VIDEO; video_st->codec->codec_id = CODEC_ID_MXPEG; - av_set_pts_info(video_st, 64, 1, 1000000); + avpriv_set_pts_info(video_st, 64, 1, 1000000); - audio_st = av_new_stream(s, AUDIO_STREAM_INDEX); + audio_st = avformat_new_stream(s, NULL); if (!audio_st) return AVERROR(ENOMEM); audio_st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -60,7 +59,7 @@ audio_st->codec->sample_rate = 8000; audio_st->codec->bits_per_coded_sample = 8; audio_st->codec->block_align = 1; - av_set_pts_info(audio_st, 64, 1, 1000000); + avpriv_set_pts_info(audio_st, 64, 1, 1000000); mxg->soi_ptr = mxg->buffer_ptr = mxg->buffer = 0; mxg->buffer_size = 0; @@ -166,7 +165,7 @@ } pkt->pts = pkt->dts = mxg->dts; - pkt->stream_index = VIDEO_STREAM_INDEX; + pkt->stream_index = 0; pkt->destruct = NULL; pkt->size = mxg->buffer_ptr - mxg->soi_ptr; pkt->data = mxg->soi_ptr; @@ -204,7 +203,7 @@ if (marker == APP13 && size >= 16) { /* audio data */ /* time (GMT) of first sample in usec since 1970, little-endian */ pkt->pts = pkt->dts = AV_RL64(startmarker_ptr + 8); - pkt->stream_index = AUDIO_STREAM_INDEX; + pkt->stream_index = 1; pkt->destruct = NULL; pkt->size = size - 14; pkt->data = startmarker_ptr + 16; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ncdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ncdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/ncdec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/ncdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define NC_VIDEO_FLAG 0x1A5 @@ -45,7 +46,7 @@ static int nc_read_header(AVFormatContext *s, AVFormatParameters *ap) { - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -54,7 +55,7 @@ st->codec->codec_id = CODEC_ID_MPEG4; st->need_parsing = AVSTREAM_PARSE_FULL; - av_set_pts_info(st, 64, 1, 100); + avpriv_set_pts_info(st, 64, 1, 100); return 0; } @@ -91,11 +92,10 @@ } AVInputFormat ff_nc_demuxer = { - "nc", - NULL_IF_CONFIG_SMALL("NC camera feed format"), - 0, - nc_probe, - nc_read_header, - nc_read_packet, + .name = "nc", + .long_name = NULL_IF_CONFIG_SMALL("NC camera feed format"), + .read_probe = nc_probe, + .read_header = nc_read_header, + .read_packet = nc_read_packet, .extensions = "v", }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/network.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/network.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/network.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/network.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2007 The Libav Project + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "network.h" +#include "libavcodec/internal.h" + +#define THREADS (HAVE_PTHREADS || (defined(WIN32) && !defined(__MINGW32CE__))) + +#if THREADS +#if HAVE_PTHREADS +#include +#else +#include "libavcodec/w32pthreads.h" +#endif +#endif + +#if CONFIG_OPENSSL +#include +static int openssl_init; +#if THREADS +#include +#include "libavutil/avutil.h" +pthread_mutex_t *openssl_mutexes; +static void openssl_lock(int mode, int type, const char *file, int line) +{ + if (mode & CRYPTO_LOCK) + pthread_mutex_lock(&openssl_mutexes[type]); + else + pthread_mutex_unlock(&openssl_mutexes[type]); +} +#if !defined(WIN32) && OPENSSL_VERSION_NUMBER < 0x10000000 +static unsigned long openssl_thread_id(void) +{ + return (intptr_t) pthread_self(); +} +#endif +#endif +#endif +#if CONFIG_GNUTLS +#include +#if THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00 +#include +#include +#undef malloc +#undef free +GCRY_THREAD_OPTION_PTHREAD_IMPL; +#endif +#endif + +void ff_tls_init(void) +{ + avpriv_lock_avformat(); +#if CONFIG_OPENSSL + if (!openssl_init) { + SSL_library_init(); + SSL_load_error_strings(); +#if THREADS + if (!CRYPTO_get_locking_callback()) { + int i; + openssl_mutexes = av_malloc(sizeof(pthread_mutex_t) * CRYPTO_num_locks()); + for (i = 0; i < CRYPTO_num_locks(); i++) + pthread_mutex_init(&openssl_mutexes[i], NULL); + CRYPTO_set_locking_callback(openssl_lock); +#if !defined(WIN32) && OPENSSL_VERSION_NUMBER < 0x10000000 + CRYPTO_set_id_callback(openssl_thread_id); +#endif + } +#endif + } + openssl_init++; +#endif +#if CONFIG_GNUTLS +#if THREADS && GNUTLS_VERSION_NUMBER < 0x020b00 + if (gcry_control(GCRYCTL_ANY_INITIALIZATION_P) == 0) + gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); +#endif + gnutls_global_init(); +#endif + avpriv_unlock_avformat(); +} + +void ff_tls_deinit(void) +{ + avpriv_lock_avformat(); +#if CONFIG_OPENSSL + openssl_init--; + if (!openssl_init) { +#if THREADS + if (CRYPTO_get_locking_callback() == openssl_lock) { + int i; + CRYPTO_set_locking_callback(NULL); + for (i = 0; i < CRYPTO_num_locks(); i++) + pthread_mutex_destroy(&openssl_mutexes[i]); + av_free(openssl_mutexes); + } +#endif + } +#endif +#if CONFIG_GNUTLS + gnutls_global_deinit(); +#endif + avpriv_unlock_avformat(); +} + +int ff_network_inited_globally; + +int ff_network_init(void) +{ +#if HAVE_WINSOCK2_H + WSADATA wsaData; +#endif + + if (!ff_network_inited_globally) + av_log(NULL, AV_LOG_WARNING, "Using network protocols without global " + "network initialization. Please use " + "avformat_network_init(), this will " + "become mandatory later.\n"); +#if HAVE_WINSOCK2_H + if (WSAStartup(MAKEWORD(1,1), &wsaData)) + return 0; +#endif + return 1; +} + +int ff_network_wait_fd(int fd, int write) +{ + int ev = write ? POLLOUT : POLLIN; + struct pollfd p = { .fd = fd, .events = ev, .revents = 0 }; + int ret; + ret = poll(&p, 1, 100); + return ret < 0 ? ff_neterrno() : p.revents & (ev | POLLERR | POLLHUP) ? 0 : AVERROR(EAGAIN); +} + +void ff_network_close(void) +{ +#if HAVE_WINSOCK2_H + WSACleanup(); +#endif +} + +#if HAVE_WINSOCK2_H +int ff_neterrno(void) +{ + int err = WSAGetLastError(); + switch (err) { + case WSAEWOULDBLOCK: + return AVERROR(EAGAIN); + case WSAEINTR: + return AVERROR(EINTR); + } + return -err; +} +#endif + +int ff_is_multicast_address(struct sockaddr *addr) +{ + if (addr->sa_family == AF_INET) { + return IN_MULTICAST(ntohl(((struct sockaddr_in *)addr)->sin_addr.s_addr)); + } +#if HAVE_STRUCT_SOCKADDR_IN6 + if (addr->sa_family == AF_INET6) { + return IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6 *)addr)->sin6_addr); + } +#endif + + return 0; +} + diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/network.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/network.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/network.h 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/network.h 2012-01-11 00:34:30.000000000 +0000 @@ -36,17 +36,7 @@ #define ECONNREFUSED WSAECONNREFUSED #define EINPROGRESS WSAEINPROGRESS -static inline int ff_neterrno(void) -{ - int err = WSAGetLastError(); - switch (err) { - case WSAEWOULDBLOCK: - return AVERROR(EAGAIN); - case WSAEINTR: - return AVERROR(EINTR); - } - return -err; -} +int ff_neterrno(void); #else #include #include @@ -66,31 +56,14 @@ int ff_socket_nonblock(int socket, int enable); -static inline int ff_network_init(void) -{ -#if HAVE_WINSOCK2_H - WSADATA wsaData; - if (WSAStartup(MAKEWORD(1,1), &wsaData)) - return 0; -#endif - return 1; -} - -static inline int ff_network_wait_fd(int fd, int write) -{ - int ev = write ? POLLOUT : POLLIN; - struct pollfd p = { .fd = fd, .events = ev, .revents = 0 }; - int ret; - ret = poll(&p, 1, 100); - return ret < 0 ? ff_neterrno() : p.revents & (ev | POLLERR | POLLHUP) ? 0 : AVERROR(EAGAIN); -} - -static inline void ff_network_close(void) -{ -#if HAVE_WINSOCK2_H - WSACleanup(); -#endif -} +extern int ff_network_inited_globally; +int ff_network_init(void); +void ff_network_close(void); + +void ff_tls_init(void); +void ff_tls_deinit(void); + +int ff_network_wait_fd(int fd, int write); int ff_inet_aton (const char * str, struct in_addr * add); @@ -191,18 +164,6 @@ #define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff) #endif -static inline int ff_is_multicast_address(struct sockaddr *addr) -{ - if (addr->sa_family == AF_INET) { - return IN_MULTICAST(ntohl(((struct sockaddr_in *)addr)->sin_addr.s_addr)); - } -#if HAVE_STRUCT_SOCKADDR_IN6 - if (addr->sa_family == AF_INET6) { - return IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6 *)addr)->sin6_addr); - } -#endif - - return 0; -} +int ff_is_multicast_address(struct sockaddr *addr); #endif /* AVFORMAT_NETWORK_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nsvdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nsvdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nsvdec.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nsvdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -18,7 +18,10 @@ * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "libavutil/mathematics.h" #include "avformat.h" +#include "internal.h" #include "riff.h" #include "libavutil/dict.h" @@ -69,7 +72,11 @@ * so the header seems to not be mandatory. (for streaming). * * index slice duration check (excepts nsvtrailer.nsv): - * for f in [^n]*.nsv; do DUR="$(ffmpeg -i "$f" 2>/dev/null | grep 'NSVf duration' | cut -d ' ' -f 4)"; IC="$(ffmpeg -i "$f" 2>/dev/null | grep 'INDEX ENTRIES' | cut -d ' ' -f 2)"; echo "duration $DUR, slite time $(($DUR/$IC))"; done + * for f in [^n]*.nsv; do + * DUR="$(avconv -i "$f" 2> /dev/null | grep 'NSVf duration' | cut -d ' ' -f 4)" + * IC="$(avconv -i "$f" 2> /dev/null | grep 'INDEX ENTRIES' | cut -d ' ' -f 2)" + * echo "duration $DUR, slite time $(($DUR/$IC))" + * done */ /* @@ -435,10 +442,11 @@ nsv->vheight = vwidth; if (vtag != T_NONE) { int i; - st = av_new_stream(s, NSV_ST_VIDEO); + st = avformat_new_stream(s, NULL); if (!st) goto fail; + st->id = NSV_ST_VIDEO; nst = av_mallocz(sizeof(NSVStream)); if (!nst) goto fail; @@ -450,7 +458,7 @@ st->codec->height = vheight; st->codec->bits_per_coded_sample = 24; /* depth XXX */ - av_set_pts_info(st, 64, framerate.den, framerate.num); + avpriv_set_pts_info(st, 64, framerate.den, framerate.num); st->start_time = 0; st->duration = av_rescale(nsv->duration, framerate.num, 1000*framerate.den); @@ -466,10 +474,11 @@ } if (atag != T_NONE) { #ifndef DISABLE_AUDIO - st = av_new_stream(s, NSV_ST_AUDIO); + st = avformat_new_stream(s, NULL); if (!st) goto fail; + st->id = NSV_ST_AUDIO; nst = av_mallocz(sizeof(NSVStream)); if (!nst) goto fail; @@ -481,7 +490,7 @@ st->need_parsing = AVSTREAM_PARSE_FULL; /* for PCM we will read a chunk later and put correct info */ /* set timebase to common denominator of ms and framerate */ - av_set_pts_info(st, 64, 1, framerate.num*1000); + avpriv_set_pts_info(st, 64, 1, framerate.num*1000); st->start_time = 0; st->duration = (int64_t)nsv->duration * framerate.num; #endif @@ -531,7 +540,7 @@ err = nsv_read_chunk(s, 1); av_dlog(s, "parsed header\n"); - return 0; + return err; } static int nsv_read_chunk(AVFormatContext *s, int fill_header) @@ -774,12 +783,12 @@ } AVInputFormat ff_nsv_demuxer = { - "nsv", - NULL_IF_CONFIG_SMALL("Nullsoft Streaming Video"), - sizeof(NSVContext), - nsv_probe, - nsv_read_header, - nsv_read_packet, - nsv_read_close, - nsv_read_seek, + .name = "nsv", + .long_name = NULL_IF_CONFIG_SMALL("Nullsoft Streaming Video"), + .priv_data_size = sizeof(NSVContext), + .read_probe = nsv_probe, + .read_header = nsv_read_header, + .read_packet = nsv_read_packet, + .read_close = nsv_read_close, + .read_seek = nsv_read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nullenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nullenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nullenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nullenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,14 +27,10 @@ } AVOutputFormat ff_null_muxer = { - "null", - NULL_IF_CONFIG_SMALL("raw null video format"), - NULL, - NULL, - 0, - AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE), - CODEC_ID_RAWVIDEO, - NULL, - null_write_packet, - .flags = AVFMT_NOFILE | AVFMT_RAWPICTURE | AVFMT_NOTIMESTAMPS, + .name = "null", + .long_name = NULL_IF_CONFIG_SMALL("raw null video format"), + .audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE), + .video_codec = CODEC_ID_RAWVIDEO, + .write_packet = null_write_packet, + .flags = AVFMT_NOFILE | AVFMT_NOTIMESTAMPS | AVFMT_RAWPICTURE, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nut.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nut.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nut.c 2011-04-29 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nut.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/mathematics.h" #include "libavutil/tree.h" #include "nut.h" #include "internal.h" @@ -69,6 +70,12 @@ { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 48 ) }, { CODEC_ID_RAWVIDEO, MKTAG(48 , 'B', 'G', 'R') }, { CODEC_ID_RAWVIDEO, MKTAG(48 , 'R', 'G', 'B') }, + { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 10 ) }, + { CODEC_ID_RAWVIDEO, MKTAG(10 , 11 , '3', 'Y') }, + { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 10 ) }, + { CODEC_ID_RAWVIDEO, MKTAG(10 , 10 , '3', 'Y') }, + { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 10 ) }, + { CODEC_ID_RAWVIDEO, MKTAG(10 , 0 , '3', 'Y') }, { CODEC_ID_RAWVIDEO, MKTAG('Y', '1', 0 , 16 ) }, { CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '1', 'Y') }, { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 16 ) }, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nutdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nutdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nutdec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nutdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,10 +20,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include "libavutil/avstring.h" #include "libavutil/bswap.h" #include "libavutil/dict.h" +#include "libavutil/mathematics.h" #include "libavutil/tree.h" #include "avio_internal.h" #include "nut.h" @@ -287,7 +287,7 @@ nut->stream = av_mallocz(sizeof(StreamContext)*stream_count); for(i=0; itime_base= &nut->time_base[stc->time_base_id]; - av_set_pts_info(s->streams[stream_id], 63, stc->time_base->num, stc->time_base->den); + avpriv_set_pts_info(s->streams[stream_id], 63, stc->time_base->num, stc->time_base->den); return 0; } @@ -415,7 +415,7 @@ if(chapter_id && !stream_id_plus1){ int64_t start= chapter_start / nut->time_base_count; - chapter= ff_new_chapter(s, chapter_id, + chapter= avpriv_new_chapter(s, chapter_id, nut->time_base[chapter_start % nut->time_base_count], start, start + chapter_len, NULL); metadata = &chapter->metadata; @@ -458,8 +458,8 @@ set_disposition_bits(s, str_value, stream_id_plus1 - 1); continue; } - if(metadata && strcasecmp(name,"Uses") - && strcasecmp(name,"Depends") && strcasecmp(name,"Replaces")) + if(metadata && av_strcasecmp(name,"Uses") + && av_strcasecmp(name,"Depends") && av_strcasecmp(name,"Replaces")) av_dict_set(metadata, name, str_value, 0); } } @@ -873,16 +873,16 @@ (void **) next_node); av_log(s, AV_LOG_DEBUG, "%"PRIu64"-%"PRIu64" %"PRId64"-%"PRId64"\n", next_node[0]->pos, next_node[1]->pos, next_node[0]->ts , next_node[1]->ts); - pos= av_gen_search(s, -1, dummy.ts, next_node[0]->pos, next_node[1]->pos, next_node[1]->pos, - next_node[0]->ts , next_node[1]->ts, AVSEEK_FLAG_BACKWARD, &ts, nut_read_timestamp); + pos = ff_gen_search(s, -1, dummy.ts, next_node[0]->pos, next_node[1]->pos, next_node[1]->pos, + next_node[0]->ts , next_node[1]->ts, AVSEEK_FLAG_BACKWARD, &ts, nut_read_timestamp); if(!(flags & AVSEEK_FLAG_BACKWARD)){ dummy.pos= pos+16; next_node[1]= &nopts_sp; av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pos_cmp, (void **) next_node); - pos2= av_gen_search(s, -2, dummy.pos, next_node[0]->pos , next_node[1]->pos, next_node[1]->pos, - next_node[0]->back_ptr, next_node[1]->back_ptr, flags, &ts, nut_read_timestamp); + pos2 = ff_gen_search(s, -2, dummy.pos, next_node[0]->pos , next_node[1]->pos, next_node[1]->pos, + next_node[0]->back_ptr, next_node[1]->back_ptr, flags, &ts, nut_read_timestamp); if(pos2>=0) pos= pos2; //FIXME dir but I think it does not matter @@ -923,14 +923,14 @@ #if CONFIG_NUT_DEMUXER AVInputFormat ff_nut_demuxer = { - "nut", - NULL_IF_CONFIG_SMALL("NUT format"), - sizeof(NUTContext), - nut_probe, - nut_read_header, - nut_read_packet, - nut_read_close, - read_seek, + .name = "nut", + .long_name = NULL_IF_CONFIG_SMALL("NUT format"), + .priv_data_size = sizeof(NUTContext), + .read_probe = nut_probe, + .read_header = nut_read_header, + .read_packet = nut_read_packet, + .read_close = nut_read_close, + .read_seek = read_seek, .extensions = "nut", .codec_tag = (const AVCodecTag * const []) { ff_codec_bmp_tags, ff_nut_video_tags, ff_codec_wav_tags, ff_nut_subtitle_tags, 0 }, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nutenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nutenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nutenc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nutenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ */ #include "libavutil/intreadwrite.h" +#include "libavutil/mathematics.h" #include "libavutil/tree.h" #include "libavutil/dict.h" #include "libavcodec/mpegaudiodata.h" @@ -58,10 +59,10 @@ else if(sample_rate < (44100 + 48000)/2) sample_rate_index=0; else sample_rate_index=1; - sample_rate= ff_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25); + sample_rate= avpriv_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25); for(bitrate_index=2; bitrate_index<30; bitrate_index++){ - frame_size = ff_mpa_bitrate_tab[lsf][layer-1][bitrate_index>>1]; + frame_size = avpriv_mpa_bitrate_tab[lsf][layer-1][bitrate_index>>1]; frame_size = (frame_size * 144000) / (sample_rate << lsf) + (bitrate_index&1); if(frame_size == size) @@ -577,7 +578,7 @@ return 0; } -static int write_header(AVFormatContext *s){ +static int nut_write_header(AVFormatContext *s){ NUTContext *nut = s->priv_data; AVIOContext *bc = s->pb; int i, j, ret; @@ -602,7 +603,7 @@ AVRational time_base; ff_parse_specific_params(st->codec, &time_base.den, &ssize, &time_base.num); - av_set_pts_info(st, 64, time_base.num, time_base.den); + avpriv_set_pts_info(st, 64, time_base.num, time_base.den); for(j=0; jtime_base_count; j++){ if(!memcmp(&time_base, &nut->time_base[j], sizeof(AVRational))){ @@ -690,7 +691,7 @@ return best_i; } -static int write_packet(AVFormatContext *s, AVPacket *pkt){ +static int nut_write_packet(AVFormatContext *s, AVPacket *pkt){ NUTContext *nut = s->priv_data; StreamContext *nus= &nut->stream[pkt->stream_index]; AVIOContext *bc = s->pb, *dyn_bc; @@ -844,7 +845,7 @@ return 0; } -static int write_trailer(AVFormatContext *s){ +static int nut_write_trailer(AVFormatContext *s){ NUTContext *nut= s->priv_data; AVIOContext *bc= s->pb; @@ -860,22 +861,22 @@ } AVOutputFormat ff_nut_muxer = { - "nut", - NULL_IF_CONFIG_SMALL("NUT format"), - "video/x-nut", - "nut", - sizeof(NUTContext), + .name = "nut", + .long_name = NULL_IF_CONFIG_SMALL("NUT format"), + .mime_type = "video/x-nut", + .extensions = "nut", + .priv_data_size = sizeof(NUTContext), #if CONFIG_LIBVORBIS - CODEC_ID_VORBIS, + .audio_codec = CODEC_ID_VORBIS, #elif CONFIG_LIBMP3LAME - CODEC_ID_MP3, + .audio_codec = CODEC_ID_MP3, #else - CODEC_ID_MP2, + .audio_codec = CODEC_ID_MP2, #endif - CODEC_ID_MPEG4, - write_header, - write_packet, - write_trailer, + .video_codec = CODEC_ID_MPEG4, + .write_header = nut_write_header, + .write_packet = nut_write_packet, + .write_trailer = nut_write_trailer, .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS, .codec_tag = (const AVCodecTag * const []){ ff_codec_bmp_tags, ff_nut_video_tags, ff_codec_wav_tags, ff_nut_subtitle_tags, 0 }, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nuv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nuv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/nuv.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/nuv.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,7 +20,9 @@ */ #include "libavutil/intreadwrite.h" +#include "libavutil/intfloat.h" #include "avformat.h" +#include "internal.h" #include "riff.h" typedef struct { @@ -45,15 +47,15 @@ return 0; } -//! little macro to sanitize packet size +/// little macro to sanitize packet size #define PKTSIZE(s) (s & 0xffffff) /** - * \brief read until we found all data needed for decoding - * \param vst video stream of which to change parameters - * \param ast video stream of which to change parameters - * \param myth set if this is a MythTVVideo format file - * \return 1 if all required codec data was found + * @brief read until we found all data needed for decoding + * @param vst video stream of which to change parameters + * @param ast video stream of which to change parameters + * @param myth set if this is a MythTVVideo format file + * @return 1 if all required codec data was found */ static int get_codec_data(AVIOContext *pb, AVStream *vst, AVStream *ast, int myth) { @@ -138,10 +140,10 @@ avio_rl32(pb); // unused, "desiredheight" avio_r8(pb); // 'P' == progressive, 'I' == interlaced avio_skip(pb, 3); // padding - aspect = av_int2dbl(avio_rl64(pb)); + aspect = av_int2double(avio_rl64(pb)); if (aspect > 0.9999 && aspect < 1.0001) aspect = 4.0 / 3.0; - fps = av_int2dbl(avio_rl64(pb)); + fps = av_int2double(avio_rl64(pb)); // number of packets per stream type, -1 means unknown, e.g. streaming v_packs = avio_rl32(pb); @@ -152,7 +154,7 @@ if (v_packs) { ctx->v_id = stream_nr++; - vst = av_new_stream(s, ctx->v_id); + vst = avformat_new_stream(s, NULL); if (!vst) return AVERROR(ENOMEM); vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; @@ -162,13 +164,13 @@ vst->codec->bits_per_coded_sample = 10; vst->sample_aspect_ratio = av_d2q(aspect * height / width, 10000); vst->r_frame_rate = av_d2q(fps, 60000); - av_set_pts_info(vst, 32, 1, 1000); + avpriv_set_pts_info(vst, 32, 1, 1000); } else ctx->v_id = -1; if (a_packs) { ctx->a_id = stream_nr++; - ast = av_new_stream(s, ctx->a_id); + ast = avformat_new_stream(s, NULL); if (!ast) return AVERROR(ENOMEM); ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -178,7 +180,7 @@ ast->codec->bit_rate = 2 * 2 * 44100 * 8; ast->codec->block_align = 2 * 2; ast->codec->bits_per_coded_sample = 16; - av_set_pts_info(ast, 32, 1, 1000); + avpriv_set_pts_info(ast, 32, 1, 1000); } else ctx->a_id = -1; @@ -258,13 +260,11 @@ } AVInputFormat ff_nuv_demuxer = { - "nuv", - NULL_IF_CONFIG_SMALL("NuppelVideo format"), - sizeof(NUVContext), - nuv_probe, - nuv_header, - nuv_packet, - NULL, - NULL, + .name = "nuv", + .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo format"), + .priv_data_size = sizeof(NUVContext), + .read_probe = nuv_probe, + .read_header = nuv_header, + .read_packet = nuv_packet, .flags = AVFMT_GENERIC_INDEX, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggdec.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -2,10 +2,9 @@ * Ogg bitstream support * Luca Barbato * Based on tcvp implementation - * */ -/** +/* Copyright (C) 2005 Michael Ahlberg, Måns Rullgård Permission is hereby granted, free of charge, to any person @@ -27,12 +26,13 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -**/ + */ #include #include "oggdec.h" #include "avformat.h" +#include "internal.h" #include "vorbiscomment.h" #define MAX_PAGE_SIZE 65307 @@ -45,6 +45,7 @@ &ff_vorbis_codec, &ff_theora_codec, &ff_flac_codec, + &ff_celt_codec, &ff_old_dirac_codec, &ff_old_flac_codec, &ff_ogm_video_codec, @@ -92,14 +93,24 @@ ogg->state = ost->next; if (!discard){ + struct ogg_stream *old_streams = ogg->streams; + for (i = 0; i < ogg->nstreams; i++) av_free (ogg->streams[i].buf); avio_seek (bc, ost->pos, SEEK_SET); ogg->curidx = ost->curidx; ogg->nstreams = ost->nstreams; - memcpy(ogg->streams, ost->streams, - ost->nstreams * sizeof(*ogg->streams)); + ogg->streams = av_realloc (ogg->streams, + ogg->nstreams * sizeof (*ogg->streams)); + + if (ogg->streams) { + memcpy(ogg->streams, ost->streams, + ost->nstreams * sizeof(*ogg->streams)); + } else { + av_free(old_streams); + ogg->nstreams = 0; + } } av_free (ost); @@ -161,11 +172,12 @@ os->header = -1; if (new_avstream) { - st = av_new_stream(s, idx); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 64, 1, 1000000); + st->id = idx; + avpriv_set_pts_info(st, 64, 1, 1000000); } return idx; @@ -192,7 +204,7 @@ AVIOContext *bc = s->pb; struct ogg *ogg = s->priv_data; struct ogg_stream *os; - int i = 0; + int ret, i = 0; int flags, nsegs; uint64_t gp; uint32_t serial; @@ -200,8 +212,9 @@ uint8_t sync[4]; int sp = 0; - if (avio_read (bc, sync, 4) < 4) - return -1; + ret = avio_read(bc, sync, 4); + if (ret < 4) + return ret < 0 ? ret : AVERROR_EOF; do{ int c; @@ -213,17 +226,17 @@ c = avio_r8(bc); if (bc->eof_reached) - return -1; + return AVERROR_EOF; sync[sp++ & 3] = c; }while (i++ < MAX_PAGE_SIZE); if (i >= MAX_PAGE_SIZE){ av_log (s, AV_LOG_INFO, "ogg, can't find sync word\n"); - return -1; + return AVERROR_INVALIDDATA; } if (avio_r8(bc) != 0) /* version */ - return -1; + return AVERROR_INVALIDDATA; flags = avio_r8(bc); gp = avio_rl64 (bc); @@ -238,7 +251,8 @@ for (n = 0; n < ogg->nstreams; n++) { av_freep(&ogg->streams[n].buf); - av_freep(&ogg->streams[n].private); + if (!ogg->state || ogg->state->streams[n].private != ogg->streams[n].private) + av_freep(&ogg->streams[n].private); } ogg->curidx = -1; ogg->nstreams = 0; @@ -247,7 +261,7 @@ idx = ogg_new_stream(s, serial, 1); } if (idx < 0) - return -1; + return idx; } os = ogg->streams + idx; @@ -256,8 +270,9 @@ if(os->psize > 0) ogg_new_buf(ogg, idx); - if (avio_read (bc, os->segments, nsegs) < nsegs) - return -1; + ret = avio_read(bc, os->segments, nsegs); + if (ret < nsegs) + return ret < 0 ? ret : AVERROR_EOF; os->nsegs = nsegs; os->segp = 0; @@ -288,8 +303,9 @@ os->buf = nb; } - if (avio_read (bc, os->buf + os->bufpos, size) < size) - return -1; + ret = avio_read(bc, os->buf + os->bufpos, size); + if (ret < size) + return ret < 0 ? ret : AVERROR_EOF; os->bufpos += size; os->granule = gp; @@ -305,7 +321,7 @@ int64_t *fpos) { struct ogg *ogg = s->priv_data; - int idx, i; + int idx, i, ret; struct ogg_stream *os; int complete = 0; int segp = 0, psize = 0; @@ -316,8 +332,9 @@ idx = ogg->curidx; while (idx < 0){ - if (ogg_read_page (s, &idx) < 0) - return -1; + ret = ogg_read_page(s, &idx); + if (ret < 0) + return ret; } os = ogg->streams + idx; @@ -329,6 +346,7 @@ if (os->header < 0){ os->codec = ogg_find_codec (os->buf, os->bufpos); if (!os->codec){ + av_log(s, AV_LOG_WARNING, "Codec not found\n"); os->header = 0; return 0; } @@ -372,8 +390,7 @@ // We have reached the first non-header packet in this stream. // Unfortunately more header packets may still follow for others, - // so we reset this later unless we are done with the headers - // for all streams. + // but if we continue with header parsing we may lose data packets. ogg->headers = 1; // Update the header state for all streams and @@ -382,8 +399,6 @@ s->data_offset = os->sync_pos; for (i = 0; i < ogg->nstreams; i++) { struct ogg_stream *cur_os = ogg->streams + i; - if (cur_os->header > 0) - ogg->headers = 0; // if we have a partial non-header packet, its start is // obviously at or after the data start @@ -430,10 +445,12 @@ static int ogg_get_headers(AVFormatContext *s) { struct ogg *ogg = s->priv_data; + int ret; do{ - if (ogg_packet (s, NULL, NULL, NULL, NULL) < 0) - return -1; + ret = ogg_packet(s, NULL, NULL, NULL, NULL); + if (ret < 0) + return ret; }while (!ogg->headers); av_dlog(s, "found headers\n"); @@ -480,12 +497,12 @@ static int ogg_read_header(AVFormatContext *s, AVFormatParameters *ap) { struct ogg *ogg = s->priv_data; - int i; + int ret, i; ogg->curidx = -1; //linear headers seek from start - if (ogg_get_headers (s) < 0){ - return -1; - } + ret = ogg_get_headers(s); + if (ret < 0) + return ret; for (i = 0; i < ogg->nstreams; i++) if (ogg->streams[i].header < 0) @@ -532,15 +549,16 @@ { struct ogg *ogg; struct ogg_stream *os; - int idx = -1; + int idx = -1, ret; int pstart, psize; int64_t fpos, pts, dts; //Get an ogg packet retry: do{ - if (ogg_packet (s, &idx, &pstart, &psize, &fpos) < 0) - return AVERROR(EIO); + ret = ogg_packet(s, &idx, &pstart, &psize, &fpos); + if (ret < 0) + return ret; }while (idx < 0 || !s->streams[idx]); ogg = s->priv_data; @@ -554,8 +572,9 @@ os->keyframe_seek = 0; //Alloc a pkt - if (av_new_packet (pkt, psize) < 0) - return AVERROR(EIO); + ret = av_new_packet(pkt, psize); + if (ret < 0) + return ret; pkt->stream_index = idx; memcpy (pkt->data, os->buf + pstart, psize); @@ -585,15 +604,15 @@ int64_t *pos_arg, int64_t pos_limit) { struct ogg *ogg = s->priv_data; - struct ogg_stream *os = ogg->streams + stream_index; AVIOContext *bc = s->pb; int64_t pts = AV_NOPTS_VALUE; - int i; + int i = -1; avio_seek(bc, *pos_arg, SEEK_SET); ogg_reset(ogg); while (avio_tell(bc) < pos_limit && !ogg_packet(s, &i, NULL, NULL, pos_arg)) { if (i == stream_index) { + struct ogg_stream *os = ogg->streams + stream_index; pts = ogg_calc_pts(s, i, NULL); if (os->keyframe_seek && !(os->pflags & AV_PKT_FLAG_KEY)) pts = AV_NOPTS_VALUE; @@ -618,7 +637,8 @@ && !(flags & AVSEEK_FLAG_ANY)) os->keyframe_seek = 1; - ret = av_seek_frame_binary(s, stream_index, timestamp, flags); + ret = ff_seek_frame_binary(s, stream_index, timestamp, flags); + os = ogg->streams + stream_index; if (ret < 0) os->keyframe_seek = 0; return ret; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggdec.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggdec.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggdec.h 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggdec.h 2012-01-11 00:34:30.000000000 +0000 @@ -98,6 +98,7 @@ #define OGG_FLAG_BOS 2 #define OGG_FLAG_EOS 4 +extern const struct ogg_codec ff_celt_codec; extern const struct ogg_codec ff_dirac_codec; extern const struct ogg_codec ff_flac_codec; extern const struct ogg_codec ff_ogm_audio_codec; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggenc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ */ #include "libavutil/crc.h" +#include "libavutil/mathematics.h" #include "libavutil/random_seed.h" #include "libavcodec/xiph.h" #include "libavcodec/bytestream.h" @@ -223,7 +224,7 @@ static uint8_t *ogg_write_vorbiscomment(int offset, int bitexact, int *header_len, AVDictionary **m, int framing_bit) { - const char *vendor = bitexact ? "ffmpeg" : LIBAVFORMAT_IDENT; + const char *vendor = bitexact ? "Libav" : LIBAVFORMAT_IDENT; int size; uint8_t *p, *p0; unsigned int count; @@ -253,7 +254,7 @@ uint8_t *streaminfo; uint8_t *p; - if (!ff_flac_is_extradata_valid(avctx, &format, &streaminfo)) + if (!avpriv_flac_is_extradata_valid(avctx, &format, &streaminfo)) return -1; // first packet: STREAMINFO @@ -322,9 +323,9 @@ unsigned serial_num = i; if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) - av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); + avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); if (st->codec->codec_id != CODEC_ID_VORBIS && st->codec->codec_id != CODEC_ID_THEORA && st->codec->codec_id != CODEC_ID_SPEEX && @@ -376,7 +377,7 @@ int header_type = st->codec->codec_id == CODEC_ID_VORBIS ? 3 : 0x81; int framing_bit = st->codec->codec_id == CODEC_ID_VORBIS ? 1 : 0; - if (ff_split_xiph_headers(st->codec->extradata, st->codec->extradata_size, + if (avpriv_split_xiph_headers(st->codec->extradata, st->codec->extradata_size, st->codec->codec_id == CODEC_ID_VORBIS ? 30 : 42, oggstream->header, oggstream->header_len) < 0) { av_log(s, AV_LOG_ERROR, "Extradata corrupted\n"); @@ -504,14 +505,14 @@ } AVOutputFormat ff_ogg_muxer = { - "ogg", - NULL_IF_CONFIG_SMALL("Ogg"), - "application/ogg", - "ogg,ogv,spx", - sizeof(OGGContext), - CODEC_ID_FLAC, - CODEC_ID_THEORA, - ogg_write_header, - ogg_write_packet, - ogg_write_trailer, + .name = "ogg", + .long_name = NULL_IF_CONFIG_SMALL("Ogg"), + .mime_type = "application/ogg", + .extensions = "ogg,ogv,spx", + .priv_data_size = sizeof(OGGContext), + .audio_codec = CODEC_ID_FLAC, + .video_codec = CODEC_ID_THEORA, + .write_header = ogg_write_header, + .write_packet = ogg_write_packet, + .write_trailer = ogg_write_trailer, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparsecelt.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparsecelt.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparsecelt.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparsecelt.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,96 @@ +/* + * Xiph CELT / Opus parser for Ogg + * Copyright (c) 2011 Nicolas George + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#include "libavutil/intreadwrite.h" +#include "avformat.h" +#include "internal.h" +#include "oggdec.h" + +struct oggcelt_private { + int extra_headers_left; +}; + +static int celt_header(AVFormatContext *s, int idx) +{ + struct ogg *ogg = s->priv_data; + struct ogg_stream *os = ogg->streams + idx; + AVStream *st = s->streams[idx]; + struct oggcelt_private *priv = os->private; + uint8_t *p = os->buf + os->pstart; + + if (os->psize == 60 && + !memcmp(p, ff_celt_codec.magic, ff_celt_codec.magicsize)) { + /* Main header */ + + uint32_t version, sample_rate, nb_channels, frame_size; + uint32_t overlap, extra_headers; + uint8_t *extradata; + + extradata = av_malloc(2 * sizeof(uint32_t) + + FF_INPUT_BUFFER_PADDING_SIZE); + priv = av_malloc(sizeof(struct oggcelt_private)); + if (!extradata || !priv) { + av_free(extradata); + av_free(priv); + return AVERROR(ENOMEM); + } + version = AV_RL32(p + 28); + /* unused header size field skipped */ + sample_rate = AV_RL32(p + 36); + nb_channels = AV_RL32(p + 40); + frame_size = AV_RL32(p + 44); + overlap = AV_RL32(p + 48); + /* unused bytes per packet field skipped */ + extra_headers = AV_RL32(p + 56); + av_free(os->private); + av_free(st->codec->extradata); + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; + st->codec->codec_id = CODEC_ID_CELT; + st->codec->sample_rate = sample_rate; + st->codec->channels = nb_channels; + st->codec->frame_size = frame_size; + st->codec->extradata = extradata; + st->codec->extradata_size = 2 * sizeof(uint32_t); + if (sample_rate) + avpriv_set_pts_info(st, 64, 1, sample_rate); + priv->extra_headers_left = 1 + extra_headers; + os->private = priv; + AV_WL32(extradata + 0, overlap); + AV_WL32(extradata + 4, version); + return 1; + } else if (priv && priv->extra_headers_left) { + /* Extra headers (vorbiscomment) */ + + ff_vorbis_comment(s, &st->metadata, p, os->psize); + priv->extra_headers_left--; + return 1; + } else { + return 0; + } +} + +const struct ogg_codec ff_celt_codec = { + .magic = "CELT ", + .magicsize = 8, + .header = celt_header, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparsedirac.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparsedirac.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparsedirac.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparsedirac.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ #include "libavcodec/get_bits.h" #include "libavcodec/dirac.h" #include "avformat.h" +#include "internal.h" #include "oggdec.h" static int dirac_header(AVFormatContext *s, int idx) @@ -36,13 +37,13 @@ return 0; init_get_bits(&gb, os->buf + os->pstart + 13, (os->psize - 13) * 8); - if (ff_dirac_parse_sequence_header(st->codec, &gb, &source) < 0) + if (avpriv_dirac_parse_sequence_header(st->codec, &gb, &source) < 0) return -1; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_DIRAC; // dirac in ogg always stores timestamps as though the video were interlaced - av_set_pts_info(st, 64, st->codec->time_base.num, 2*st->codec->time_base.den); + avpriv_set_pts_info(st, 64, st->codec->time_base.num, 2*st->codec->time_base.den); return 1; } @@ -79,7 +80,7 @@ st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_DIRAC; - av_set_pts_info(st, 64, AV_RB32(buf+12), AV_RB32(buf+8)); + avpriv_set_pts_info(st, 64, AV_RB32(buf+12), AV_RB32(buf+8)); return 1; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparseflac.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparseflac.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparseflac.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparseflac.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,7 @@ #include "libavcodec/get_bits.h" #include "libavcodec/flac.h" #include "avformat.h" +#include "internal.h" #include "oggdec.h" #define OGG_FLAC_METADATA_TYPE_STREAMINFO 0x7F @@ -55,7 +56,7 @@ if (get_bits_long(&gb, 32) != FLAC_STREAMINFO_SIZE) return -1; - ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start); + avpriv_flac_parse_streaminfo(st->codec, &si, streaminfo_start); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_FLAC; @@ -65,7 +66,7 @@ memcpy(st->codec->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE); st->codec->extradata_size = FLAC_STREAMINFO_SIZE; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); } else if (mdt == FLAC_METADATA_TYPE_VORBIS_COMMENT) { ff_vorbis_comment (s, &st->metadata, os->buf + os->pstart + 4, os->psize - 4); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparseogm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparseogm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparseogm.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparseogm.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,6 +27,7 @@ #include "libavcodec/get_bits.h" #include "libavcodec/bytestream.h" #include "avformat.h" +#include "internal.h" #include "oggdec.h" #include "riff.h" @@ -81,13 +82,13 @@ st->codec->height = bytestream_get_le32(&p); st->codec->time_base.den = spu * 10000000; st->codec->time_base.num = time_unit; - av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); + avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); } else { st->codec->channels = bytestream_get_le16(&p); p += 2; /* block_align */ st->codec->bit_rate = bytestream_get_le32(&p) * 8; st->codec->sample_rate = spu * 10000000 / time_unit; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); } } else if (*p == 3) { if (os->psize > 8) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparseskeleton.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparseskeleton.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparseskeleton.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparseskeleton.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ #include "libavcodec/bytestream.h" #include "avformat.h" +#include "internal.h" #include "oggdec.h" static int skeleton_header(AVFormatContext *s, int idx) @@ -62,7 +63,7 @@ if (start_den) { int base_den; av_reduce(&start_time, &base_den, start_num, start_den, INT_MAX); - av_set_pts_info(st, 64, 1, base_den); + avpriv_set_pts_info(st, 64, 1, base_den); os->lastpts = st->start_time = start_time; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparsespeex.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparsespeex.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparsespeex.c 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparsespeex.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,9 +28,11 @@ #include "libavcodec/get_bits.h" #include "libavcodec/bytestream.h" #include "avformat.h" +#include "internal.h" #include "oggdec.h" struct speex_params { + int packet_size; int final_packet_duration; int seq; }; @@ -58,21 +60,17 @@ st->codec->sample_rate = AV_RL32(p + 36); st->codec->channels = AV_RL32(p + 48); - /* We treat the whole Speex packet as a single frame everywhere Speex - is handled in Libav. This avoids the complexities of splitting - and joining individual Speex frames, which are not always - byte-aligned. */ - st->codec->frame_size = AV_RL32(p + 56); - frames_per_packet = AV_RL32(p + 64); + spxp->packet_size = AV_RL32(p + 56); + frames_per_packet = AV_RL32(p + 64); if (frames_per_packet) - st->codec->frame_size *= frames_per_packet; + spxp->packet_size *= frames_per_packet; st->codec->extradata_size = os->psize; st->codec->extradata = av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); memcpy(st->codec->extradata, p, st->codec->extradata_size); - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); } else ff_vorbis_comment(s, &st->metadata, p, os->psize); @@ -95,7 +93,7 @@ struct ogg *ogg = s->priv_data; struct ogg_stream *os = ogg->streams + idx; struct speex_params *spxp = os->private; - int packet_size = s->streams[idx]->codec->frame_size; + int packet_size = spxp->packet_size; if (os->flags & OGG_FLAG_EOS && os->lastpts != AV_NOPTS_VALUE && os->granule > 0) { @@ -108,9 +106,10 @@ if (!os->lastpts && os->granule > 0) /* first packet */ - os->pduration = os->granule - packet_size * (ogg_page_packets(os) - 1); - else if (os->flags & OGG_FLAG_EOS && os->segp == os->nsegs && - spxp->final_packet_duration) + os->lastpts = os->lastdts = os->granule - packet_size * + ogg_page_packets(os); + if (os->flags & OGG_FLAG_EOS && os->segp == os->nsegs && + spxp->final_packet_duration) /* final packet */ os->pduration = spxp->final_packet_duration; else diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparsetheora.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparsetheora.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparsetheora.c 2011-02-19 06:53:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparsetheora.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,7 @@ #include "libavutil/bswap.h" #include "libavcodec/get_bits.h" #include "avformat.h" +#include "internal.h" #include "oggdec.h" struct theora_params { @@ -91,7 +92,7 @@ st->codec->time_base.num = 1; st->codec->time_base.den = 25; } - av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); + avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); st->sample_aspect_ratio.num = get_bits_long(&gb, 24); st->sample_aspect_ratio.den = get_bits_long(&gb, 24); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparsevorbis.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparsevorbis.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oggparsevorbis.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oggparsevorbis.c 2012-01-11 00:34:30.000000000 +0000 @@ -45,7 +45,7 @@ if (sscanf(val, "%02d:%02d:%02d.%03d", &h, &m, &s, &ms) < 4) return 0; - ff_new_chapter(as, cnum, (AVRational){1,1000}, + avpriv_new_chapter(as, cnum, (AVRational){1,1000}, ms + 1000*(s + 60*(m + 60*h)), AV_NOPTS_VALUE, NULL); av_free(val); @@ -254,7 +254,7 @@ if (srate > 0) { st->codec->sample_rate = srate; - av_set_pts_info(st, 64, 1, srate); + avpriv_set_pts_info(st, 64, 1, srate); } } else if (os->buf[os->pstart] == 3) { if (os->psize > 8 && diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oma.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oma.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oma.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oma.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,8 +1,5 @@ /* - * Sony OpenMG (OMA) demuxer - * - * Copyright (c) 2008 Maxim Poliakovski - * 2008 Benjamin Larsson + * Sony OpenMG (OMA) common data * * This file is part of Libav. * @@ -21,188 +18,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/** - * @file - * This is a demuxer for Sony OpenMG Music files - * - * Known file extensions: ".oma", "aa3" - * The format of such files consists of three parts: - * - "ea3" header carrying overall info and metadata. Except for starting with - * "ea" instead of "ID", it's an ID3v2 header. - * - "EA3" header is a Sony-specific header containing information about - * the OpenMG file: codec type (usually ATRAC, can also be MP3 or WMA), - * codec specific info (packet size, sample rate, channels and so on) - * and DRM related info (file encryption, content id). - * - Sound data organized in packets follow the EA3 header - * (can be encrypted using the Sony DRM!). - * - * LIMITATIONS: This version supports only plain (unencrypted) OMA files. - * If any DRM-protected (encrypted) file is encountered you will get the - * corresponding error message. Try to remove the encryption using any - * Sony software (for example SonicStage). - * CODEC SUPPORT: Only ATRAC3 codec is currently supported! - */ - -#include "avformat.h" -#include "libavutil/intreadwrite.h" -#include "pcm.h" -#include "riff.h" -#include "id3v2.h" - -#define EA3_HEADER_SIZE 96 - -enum { - OMA_CODECID_ATRAC3 = 0, - OMA_CODECID_ATRAC3P = 1, - OMA_CODECID_MP3 = 3, - OMA_CODECID_LPCM = 4, - OMA_CODECID_WMA = 5, +#include "internal.h" +#include "oma.h" +#include "libavcodec/avcodec.h" + +const uint16_t ff_oma_srate_tab[6] = { 320, 441, 480, 882, 960, 0 }; + +const AVCodecTag ff_oma_codec_tags[] = { + { CODEC_ID_ATRAC3, OMA_CODECID_ATRAC3 }, + { CODEC_ID_ATRAC3P, OMA_CODECID_ATRAC3P }, + { CODEC_ID_MP3, OMA_CODECID_MP3 }, + { CODEC_ID_PCM_S16BE, OMA_CODECID_LPCM }, + { 0 }, }; - -static const AVCodecTag codec_oma_tags[] = { - { CODEC_ID_ATRAC3, OMA_CODECID_ATRAC3 }, - { CODEC_ID_ATRAC3P, OMA_CODECID_ATRAC3P }, - { CODEC_ID_MP3, OMA_CODECID_MP3 }, -}; - -#define ID3v2_EA3_MAGIC "ea3" - -static int oma_read_header(AVFormatContext *s, - AVFormatParameters *ap) -{ - static const uint16_t srate_tab[6] = {320,441,480,882,960,0}; - int ret, framesize, jsflag, samplerate; - uint32_t codec_params; - int16_t eid; - uint8_t buf[EA3_HEADER_SIZE]; - uint8_t *edata; - AVStream *st; - - ff_id3v2_read(s, ID3v2_EA3_MAGIC); - ret = avio_read(s->pb, buf, EA3_HEADER_SIZE); - if (ret < EA3_HEADER_SIZE) - return -1; - - if (memcmp(buf, ((const uint8_t[]){'E', 'A', '3'}),3) || buf[4] != 0 || buf[5] != EA3_HEADER_SIZE) { - av_log(s, AV_LOG_ERROR, "Couldn't find the EA3 header !\n"); - return -1; - } - - eid = AV_RB16(&buf[6]); - if (eid != -1 && eid != -128) { - av_log(s, AV_LOG_ERROR, "Encrypted file! Eid: %d\n", eid); - return -1; - } - - codec_params = AV_RB24(&buf[33]); - - st = av_new_stream(s, 0); - if (!st) - return AVERROR(ENOMEM); - - st->start_time = 0; - st->codec->codec_type = AVMEDIA_TYPE_AUDIO; - st->codec->codec_tag = buf[32]; - st->codec->codec_id = ff_codec_get_id(codec_oma_tags, st->codec->codec_tag); - - switch (buf[32]) { - case OMA_CODECID_ATRAC3: - samplerate = srate_tab[(codec_params >> 13) & 7]*100; - if (samplerate != 44100) - av_log_ask_for_sample(s, "Unsupported sample rate: %d\n", - samplerate); - - framesize = (codec_params & 0x3FF) * 8; - jsflag = (codec_params >> 17) & 1; /* get stereo coding mode, 1 for joint-stereo */ - st->codec->channels = 2; - st->codec->sample_rate = samplerate; - st->codec->bit_rate = st->codec->sample_rate * framesize * 8 / 1024; - - /* fake the atrac3 extradata (wav format, makes stream copy to wav work) */ - st->codec->extradata_size = 14; - edata = av_mallocz(14 + FF_INPUT_BUFFER_PADDING_SIZE); - if (!edata) - return AVERROR(ENOMEM); - - st->codec->extradata = edata; - AV_WL16(&edata[0], 1); // always 1 - AV_WL32(&edata[2], samplerate); // samples rate - AV_WL16(&edata[6], jsflag); // coding mode - AV_WL16(&edata[8], jsflag); // coding mode - AV_WL16(&edata[10], 1); // always 1 - // AV_WL16(&edata[12], 0); // always 0 - - av_set_pts_info(st, 64, 1, st->codec->sample_rate); - break; - case OMA_CODECID_ATRAC3P: - st->codec->channels = (codec_params >> 10) & 7; - framesize = ((codec_params & 0x3FF) * 8) + 8; - st->codec->sample_rate = srate_tab[(codec_params >> 13) & 7]*100; - st->codec->bit_rate = st->codec->sample_rate * framesize * 8 / 1024; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); - av_log(s, AV_LOG_ERROR, "Unsupported codec ATRAC3+!\n"); - break; - case OMA_CODECID_MP3: - st->need_parsing = AVSTREAM_PARSE_FULL; - framesize = 1024; - break; - default: - av_log(s, AV_LOG_ERROR, "Unsupported codec %d!\n",buf[32]); - return -1; - break; - } - - st->codec->block_align = framesize; - - return 0; -} - - -static int oma_read_packet(AVFormatContext *s, AVPacket *pkt) -{ - int ret = av_get_packet(s->pb, pkt, s->streams[0]->codec->block_align); - - pkt->stream_index = 0; - if (ret <= 0) - return AVERROR(EIO); - - return ret; -} - -static int oma_read_probe(AVProbeData *p) -{ - const uint8_t *buf; - unsigned tag_len = 0; - - buf = p->buf; - /* version must be 3 and flags byte zero */ - if (ff_id3v2_match(buf, ID3v2_EA3_MAGIC) && buf[3] == 3 && !buf[4]) - tag_len = ff_id3v2_tag_len(buf); - - // This check cannot overflow as tag_len has at most 28 bits - if (p->buf_size < tag_len + 5) - return 0; - - buf += tag_len; - - if (!memcmp(buf, "EA3", 3) && !buf[4] && buf[5] == EA3_HEADER_SIZE) - return AVPROBE_SCORE_MAX; - else - return 0; -} - - -AVInputFormat ff_oma_demuxer = { - "oma", - NULL_IF_CONFIG_SMALL("Sony OpenMG audio"), - 0, - oma_read_probe, - oma_read_header, - oma_read_packet, - 0, - pcm_read_seek, - .flags= AVFMT_GENERIC_INDEX, - .extensions = "oma,aa3", - .codec_tag= (const AVCodecTag* const []){codec_oma_tags, 0}, -}; - diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/omadec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/omadec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/omadec.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/omadec.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,446 @@ +/* + * Sony OpenMG (OMA) demuxer + * + * Copyright (c) 2008 Maxim Poliakovski + * 2008 Benjamin Larsson + * 2011 David Goldwich + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * This is a demuxer for Sony OpenMG Music files + * + * Known file extensions: ".oma", "aa3" + * The format of such files consists of three parts: + * - "ea3" header carrying overall info and metadata. Except for starting with + * "ea" instead of "ID", it's an ID3v2 header. + * - "EA3" header is a Sony-specific header containing information about + * the OpenMG file: codec type (usually ATRAC, can also be MP3 or WMA), + * codec specific info (packet size, sample rate, channels and so on) + * and DRM related info (file encryption, content id). + * - Sound data organized in packets follow the EA3 header + * (can be encrypted using the Sony DRM!). + * + * CODEC SUPPORT: Only ATRAC3 codec is currently supported! + */ + +#include "avformat.h" +#include "internal.h" +#include "libavutil/intreadwrite.h" +#include "libavutil/des.h" +#include "oma.h" +#include "pcm.h" +#include "riff.h" +#include "id3v2.h" + + +static const uint64_t leaf_table[] = { + 0xd79e8283acea4620, 0x7a9762f445afd0d8, + 0x354d60a60b8c79f1, 0x584e1cde00b07aee, + 0x1573cd93da7df623, 0x47f98d79620dd535 +}; + +typedef struct OMAContext { + uint64_t content_start; + int encrypted; + uint16_t k_size; + uint16_t e_size; + uint16_t i_size; + uint16_t s_size; + uint32_t rid; + uint8_t r_val[24]; + uint8_t n_val[24]; + uint8_t m_val[8]; + uint8_t s_val[8]; + uint8_t sm_val[8]; + uint8_t e_val[8]; + uint8_t iv[8]; + struct AVDES av_des; +} OMAContext; + +static void hex_log(AVFormatContext *s, int level, const char *name, const uint8_t *value, int len) +{ + char buf[33]; + len = FFMIN(len, 16); + if (av_log_get_level() < level) + return; + ff_data_to_hex(buf, value, len, 1); + buf[len<<1] = '\0'; + av_log(s, level, "%s: %s\n", name, buf); +} + +static int kset(AVFormatContext *s, const uint8_t *r_val, const uint8_t *n_val, int len) +{ + OMAContext *oc = s->priv_data; + + if (!r_val && !n_val) + return -1; + + len = FFMIN(len, 16); + + /* use first 64 bits in the third round again */ + if (r_val) { + if (r_val != oc->r_val) { + memset(oc->r_val, 0, 24); + memcpy(oc->r_val, r_val, len); + } + memcpy(&oc->r_val[16], r_val, 8); + } + if (n_val) { + if (n_val != oc->n_val) { + memset(oc->n_val, 0, 24); + memcpy(oc->n_val, n_val, len); + } + memcpy(&oc->n_val[16], n_val, 8); + } + + return 0; +} + +static int rprobe(AVFormatContext *s, uint8_t *enc_header, const uint8_t *r_val) +{ + OMAContext *oc = s->priv_data; + unsigned int pos; + struct AVDES av_des; + + if (!enc_header || !r_val) + return -1; + + /* m_val */ + av_des_init(&av_des, r_val, 192, 1); + av_des_crypt(&av_des, oc->m_val, &enc_header[48], 1, NULL, 1); + + /* s_val */ + av_des_init(&av_des, oc->m_val, 64, 0); + av_des_crypt(&av_des, oc->s_val, NULL, 1, NULL, 0); + + /* sm_val */ + pos = OMA_ENC_HEADER_SIZE + oc->k_size + oc->e_size; + av_des_init(&av_des, oc->s_val, 64, 0); + av_des_mac(&av_des, oc->sm_val, &enc_header[pos], (oc->i_size >> 3)); + + pos += oc->i_size; + + return memcmp(&enc_header[pos], oc->sm_val, 8) ? -1 : 0; +} + +static int nprobe(AVFormatContext *s, uint8_t *enc_header, const uint8_t *n_val) +{ + OMAContext *oc = s->priv_data; + uint32_t pos, taglen, datalen; + struct AVDES av_des; + + if (!enc_header || !n_val) + return -1; + + pos = OMA_ENC_HEADER_SIZE + oc->k_size; + if (!memcmp(&enc_header[pos], "EKB ", 4)) + pos += 32; + + if (AV_RB32(&enc_header[pos]) != oc->rid) + av_log(s, AV_LOG_DEBUG, "Mismatching RID\n"); + + taglen = AV_RB32(&enc_header[pos+32]); + datalen = AV_RB32(&enc_header[pos+36]) >> 4; + + pos += 44 + taglen; + + av_des_init(&av_des, n_val, 192, 1); + while (datalen-- > 0) { + av_des_crypt(&av_des, oc->r_val, &enc_header[pos], 2, NULL, 1); + kset(s, oc->r_val, NULL, 16); + if (!rprobe(s, enc_header, oc->r_val)) + return 0; + pos += 16; + } + + return -1; +} + +static int decrypt_init(AVFormatContext *s, ID3v2ExtraMeta *em, uint8_t *header) +{ + OMAContext *oc = s->priv_data; + ID3v2ExtraMetaGEOB *geob = NULL; + uint8_t *gdata; + + oc->encrypted = 1; + av_log(s, AV_LOG_INFO, "File is encrypted\n"); + + /* find GEOB metadata */ + while (em) { + if (!strcmp(em->tag, "GEOB") && + (geob = em->data) && + (!strcmp(geob->description, "OMG_LSI") || + !strcmp(geob->description, "OMG_BKLSI"))) { + break; + } + em = em->next; + } + if (!em) { + av_log(s, AV_LOG_ERROR, "No encryption header found\n"); + return -1; + } + + if (geob->datasize < 64) { + av_log(s, AV_LOG_ERROR, "Invalid GEOB data size: %u\n", geob->datasize); + return -1; + } + + gdata = geob->data; + + if (AV_RB16(gdata) != 1) + av_log(s, AV_LOG_WARNING, "Unknown version in encryption header\n"); + + oc->k_size = AV_RB16(&gdata[2]); + oc->e_size = AV_RB16(&gdata[4]); + oc->i_size = AV_RB16(&gdata[6]); + oc->s_size = AV_RB16(&gdata[8]); + + if (memcmp(&gdata[OMA_ENC_HEADER_SIZE], "KEYRING ", 12)) { + av_log(s, AV_LOG_ERROR, "Invalid encryption header\n"); + return -1; + } + oc->rid = AV_RB32(&gdata[OMA_ENC_HEADER_SIZE + 28]); + av_log(s, AV_LOG_DEBUG, "RID: %.8x\n", oc->rid); + + memcpy(oc->iv, &header[0x58], 8); + hex_log(s, AV_LOG_DEBUG, "IV", oc->iv, 8); + + hex_log(s, AV_LOG_DEBUG, "CBC-MAC", &gdata[OMA_ENC_HEADER_SIZE+oc->k_size+oc->e_size+oc->i_size], 8); + + if (s->keylen > 0) { + kset(s, s->key, s->key, s->keylen); + } + if (!memcmp(oc->r_val, (const uint8_t[8]){0}, 8) || + rprobe(s, gdata, oc->r_val) < 0 && + nprobe(s, gdata, oc->n_val) < 0) { + int i; + for (i = 0; i < sizeof(leaf_table); i += 2) { + uint8_t buf[16]; + AV_WL64(buf, leaf_table[i]); + AV_WL64(&buf[8], leaf_table[i+1]); + kset(s, buf, buf, 16); + if (!rprobe(s, gdata, oc->r_val) || !nprobe(s, gdata, oc->n_val)) + break; + } + if (i >= sizeof(leaf_table)) { + av_log(s, AV_LOG_ERROR, "Invalid key\n"); + return -1; + } + } + + /* e_val */ + av_des_init(&oc->av_des, oc->m_val, 64, 0); + av_des_crypt(&oc->av_des, oc->e_val, &gdata[OMA_ENC_HEADER_SIZE + 40], 1, NULL, 0); + hex_log(s, AV_LOG_DEBUG, "EK", oc->e_val, 8); + + /* init e_val */ + av_des_init(&oc->av_des, oc->e_val, 64, 1); + + return 0; +} + +static int oma_read_header(AVFormatContext *s, + AVFormatParameters *ap) +{ + int ret, framesize, jsflag, samplerate; + uint32_t codec_params; + int16_t eid; + uint8_t buf[EA3_HEADER_SIZE]; + uint8_t *edata; + AVStream *st; + ID3v2ExtraMeta *extra_meta = NULL; + OMAContext *oc = s->priv_data; + + ff_id3v2_read_all(s, ID3v2_EA3_MAGIC, &extra_meta); + ret = avio_read(s->pb, buf, EA3_HEADER_SIZE); + if (ret < EA3_HEADER_SIZE) + return -1; + + if (memcmp(buf, ((const uint8_t[]){'E', 'A', '3'}),3) || buf[4] != 0 || buf[5] != EA3_HEADER_SIZE) { + av_log(s, AV_LOG_ERROR, "Couldn't find the EA3 header !\n"); + return -1; + } + + oc->content_start = avio_tell(s->pb); + + /* encrypted file */ + eid = AV_RB16(&buf[6]); + if (eid != -1 && eid != -128 && decrypt_init(s, extra_meta, buf) < 0) { + ff_id3v2_free_extra_meta(&extra_meta); + return -1; + } + + ff_id3v2_free_extra_meta(&extra_meta); + + codec_params = AV_RB24(&buf[33]); + + st = avformat_new_stream(s, NULL); + if (!st) + return AVERROR(ENOMEM); + + st->start_time = 0; + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; + st->codec->codec_tag = buf[32]; + st->codec->codec_id = ff_codec_get_id(ff_oma_codec_tags, st->codec->codec_tag); + + switch (buf[32]) { + case OMA_CODECID_ATRAC3: + samplerate = ff_oma_srate_tab[(codec_params >> 13) & 7]*100; + if (samplerate != 44100) + av_log_ask_for_sample(s, "Unsupported sample rate: %d\n", + samplerate); + + framesize = (codec_params & 0x3FF) * 8; + jsflag = (codec_params >> 17) & 1; /* get stereo coding mode, 1 for joint-stereo */ + st->codec->channels = 2; + st->codec->sample_rate = samplerate; + st->codec->bit_rate = st->codec->sample_rate * framesize * 8 / 1024; + + /* fake the atrac3 extradata (wav format, makes stream copy to wav work) */ + st->codec->extradata_size = 14; + edata = av_mallocz(14 + FF_INPUT_BUFFER_PADDING_SIZE); + if (!edata) + return AVERROR(ENOMEM); + + st->codec->extradata = edata; + AV_WL16(&edata[0], 1); // always 1 + AV_WL32(&edata[2], samplerate); // samples rate + AV_WL16(&edata[6], jsflag); // coding mode + AV_WL16(&edata[8], jsflag); // coding mode + AV_WL16(&edata[10], 1); // always 1 + // AV_WL16(&edata[12], 0); // always 0 + + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); + break; + case OMA_CODECID_ATRAC3P: + st->codec->channels = (codec_params >> 10) & 7; + framesize = ((codec_params & 0x3FF) * 8) + 8; + st->codec->sample_rate = ff_oma_srate_tab[(codec_params >> 13) & 7]*100; + st->codec->bit_rate = st->codec->sample_rate * framesize * 8 / 1024; + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); + av_log(s, AV_LOG_ERROR, "Unsupported codec ATRAC3+!\n"); + break; + case OMA_CODECID_MP3: + st->need_parsing = AVSTREAM_PARSE_FULL; + framesize = 1024; + break; + case OMA_CODECID_LPCM: + /* PCM 44.1 kHz 16 bit stereo big-endian */ + st->codec->channels = 2; + st->codec->sample_rate = 44100; + framesize = 1024; + /* bit rate = sample rate x PCM block align (= 4) x 8 */ + st->codec->bit_rate = st->codec->sample_rate * 32; + st->codec->bits_per_coded_sample = av_get_bits_per_sample(st->codec->codec_id); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); + break; + default: + av_log(s, AV_LOG_ERROR, "Unsupported codec %d!\n",buf[32]); + return -1; + } + + st->codec->block_align = framesize; + + return 0; +} + + +static int oma_read_packet(AVFormatContext *s, AVPacket *pkt) +{ + OMAContext *oc = s->priv_data; + int packet_size = s->streams[0]->codec->block_align; + int ret = av_get_packet(s->pb, pkt, packet_size); + + if (ret <= 0) + return AVERROR(EIO); + + pkt->stream_index = 0; + + if (oc->encrypted) { + /* previous unencrypted block saved in IV for the next packet (CBC mode) */ + av_des_crypt(&oc->av_des, pkt->data, pkt->data, (packet_size >> 3), oc->iv, 1); + } + + return ret; +} + +static int oma_read_probe(AVProbeData *p) +{ + const uint8_t *buf; + unsigned tag_len = 0; + + buf = p->buf; + + if (p->buf_size < ID3v2_HEADER_SIZE || + !ff_id3v2_match(buf, ID3v2_EA3_MAGIC) || + buf[3] != 3 || // version must be 3 + buf[4]) // flags byte zero + return 0; + + tag_len = ff_id3v2_tag_len(buf); + + /* This check cannot overflow as tag_len has at most 28 bits */ + if (p->buf_size < tag_len + 5) + /* EA3 header comes late, might be outside of the probe buffer */ + return AVPROBE_SCORE_MAX / 2; + + buf += tag_len; + + if (!memcmp(buf, "EA3", 3) && !buf[4] && buf[5] == EA3_HEADER_SIZE) + return AVPROBE_SCORE_MAX; + else + return 0; +} + +static int oma_read_seek(struct AVFormatContext *s, int stream_index, int64_t timestamp, int flags) +{ + OMAContext *oc = s->priv_data; + + pcm_read_seek(s, stream_index, timestamp, flags); + + if (oc->encrypted) { + /* readjust IV for CBC */ + int64_t pos = avio_tell(s->pb); + if (pos < oc->content_start) + memset(oc->iv, 0, 8); + else { + if (avio_seek(s->pb, -8, SEEK_CUR) < 0 || avio_read(s->pb, oc->iv, 8) < 8) { + memset(oc->iv, 0, 8); + return -1; + } + } + } + + return 0; +} + +AVInputFormat ff_oma_demuxer = { + .name = "oma", + .long_name = NULL_IF_CONFIG_SMALL("Sony OpenMG audio"), + .priv_data_size = sizeof(OMAContext), + .read_probe = oma_read_probe, + .read_header = oma_read_header, + .read_packet = oma_read_packet, + .read_seek = oma_read_seek, + .flags = AVFMT_GENERIC_INDEX, + .extensions = "oma,omg,aa3", + .codec_tag = (const AVCodecTag* const []){ff_oma_codec_tags, 0}, +}; + diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/omaenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/omaenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/omaenc.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/omaenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,105 @@ +/* + * Sony OpenMG (OMA) muxer + * + * Copyright (c) 2011 Michael Karcher + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "avformat.h" +#include "avio_internal.h" +#include "id3v2.h" +#include "internal.h" +#include "oma.h" +#include "rawenc.h" + +static av_cold int oma_write_header(AVFormatContext *s) +{ + int i; + AVCodecContext *format; + int srate_index; + int isjointstereo; + + format = s->streams[0]->codec; + /* check for support of the format first */ + + for (srate_index = 0; ; srate_index++) { + if (ff_oma_srate_tab[srate_index] == 0) { + av_log(s, AV_LOG_ERROR, "Sample rate %d not supported in OpenMG audio\n", + format->sample_rate); + return AVERROR(EINVAL); + } + + if (ff_oma_srate_tab[srate_index] * 100 == format->sample_rate) + break; + } + + /* Metadata; OpenMG does not support ID3v2.4 */ + ff_id3v2_write(s, 3, ID3v2_EA3_MAGIC); + + ffio_wfourcc(s->pb, "EA3\0"); + avio_w8(s->pb, EA3_HEADER_SIZE >> 7); + avio_w8(s->pb, EA3_HEADER_SIZE & 0x7F); + avio_wl16(s->pb, 0xFFFF); /* not encrypted */ + for (i = 0; i < 6; i++) + avio_wl32(s->pb, 0); /* Padding + DRM id */ + + switch(format->codec_tag) { + case OMA_CODECID_ATRAC3: + if (format->channels != 2) { + av_log(s, AV_LOG_ERROR, "ATRAC3 in OMA is only supported with 2 channels"); + return AVERROR(EINVAL); + } + if (format->extradata_size == 14) /* WAV format extradata */ + isjointstereo = format->extradata[6] != 0; + else if(format->extradata_size == 10) /* RM format extradata */ + isjointstereo = format->extradata[8] == 0x12; + else { + av_log(s, AV_LOG_ERROR, "ATRAC3: Unsupported extradata size\n"); + return AVERROR(EINVAL); + } + avio_wb32(s->pb, (OMA_CODECID_ATRAC3 << 24) | + (isjointstereo << 17) | + (srate_index << 13) | + (format->block_align/8)); + break; + case OMA_CODECID_ATRAC3P: + avio_wb32(s->pb, (OMA_CODECID_ATRAC3P << 24) | + (srate_index << 13) | + (format->channels << 10) | + (format->block_align/8 - 1)); + break; + default: + av_log(s, AV_LOG_ERROR, "OMA: unsupported codec tag %d for write\n", + format->codec_tag); + } + for (i = 0; i < (EA3_HEADER_SIZE - 36)/4; i++) + avio_wl32(s->pb, 0); /* Padding */ + + return 0; +} + +AVOutputFormat ff_oma_muxer = { + .name = "oma", + .long_name = NULL_IF_CONFIG_SMALL("Sony OpenMG audio"), + .mime_type = "audio/x-oma", + .extensions = "oma", + .audio_codec = CODEC_ID_ATRAC3, + .write_header = oma_write_header, + .write_packet = ff_raw_write_packet, + .codec_tag = (const AVCodecTag* const []){ff_oma_codec_tags, 0}, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oma.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oma.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/oma.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/oma.h 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * Sony OpenMG (OMA) common data + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_OMA_H +#define AVFORMAT_OMA_H + +#include + +#include "internal.h" + +#define EA3_HEADER_SIZE 96 +#define ID3v2_EA3_MAGIC "ea3" +#define OMA_ENC_HEADER_SIZE 16 + +enum { + OMA_CODECID_ATRAC3 = 0, + OMA_CODECID_ATRAC3P = 1, + OMA_CODECID_MP3 = 3, + OMA_CODECID_LPCM = 4, + OMA_CODECID_WMA = 5, +}; + +extern const uint16_t ff_oma_srate_tab[6]; + +extern const AVCodecTag ff_oma_codec_tags[]; + +#endif /* AVFORMAT_OMA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/options.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/options.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/options.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/options.c 2012-01-11 00:34:30.000000000 +0000 @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" +#include "avio_internal.h" #include "libavutil/opt.h" /** @@ -33,30 +34,49 @@ else return "NULL"; } -static const AVOption *opt_find(void *obj, const char *name, const char *unit, int opt_flags, int search_flags) +static void *format_child_next(void *obj, void *prev) +{ + AVFormatContext *s = obj; + if (!prev && s->priv_data && + ((s->iformat && s->iformat->priv_class) || + s->oformat && s->oformat->priv_class)) + return s->priv_data; +#if !FF_API_OLD_AVIO + if (s->pb && s->pb->av_class && prev != s->pb) + return s->pb; +#endif + return NULL; +} + +static const AVClass *format_child_class_next(const AVClass *prev) { - AVFormatContext *s = obj; AVInputFormat *ifmt = NULL; AVOutputFormat *ofmt = NULL; - if (s->priv_data) { - if ((s->iformat && !s->iformat->priv_class) || - (s->oformat && !s->oformat->priv_class)) - return NULL; - return av_opt_find(s->priv_data, name, unit, opt_flags, search_flags); - } - - while ((ifmt = av_iformat_next(ifmt))) { - const AVOption *o; - - if (ifmt->priv_class && (o = av_opt_find(&ifmt->priv_class, name, unit, opt_flags, search_flags))) - return o; - } - while ((ofmt = av_oformat_next(ofmt))) { - const AVOption *o; - - if (ofmt->priv_class && (o = av_opt_find(&ofmt->priv_class, name, unit, opt_flags, search_flags))) - return o; - } + + if (!prev) +#if !FF_API_OLD_AVIO + return &ffio_url_class; +#else + prev = (void *)&ifmt; // Dummy pointer; +#endif + + while ((ifmt = av_iformat_next(ifmt))) + if (ifmt->priv_class == prev) + break; + + if (!ifmt) + while ((ofmt = av_oformat_next(ofmt))) + if (ofmt->priv_class == prev) + break; + if (!ofmt) + while (ifmt = av_iformat_next(ifmt)) + if (ifmt->priv_class) + return ifmt->priv_class; + + while (ofmt = av_oformat_next(ofmt)) + if (ofmt->priv_class) + return ofmt->priv_class; + return NULL; } @@ -67,26 +87,32 @@ #define D AV_OPT_FLAG_DECODING_PARAM static const AVOption options[]={ -{"probesize", "set probing size", OFFSET(probesize), FF_OPT_TYPE_INT, {.dbl = 5000000 }, 32, INT_MAX, D}, -{"muxrate", "set mux rate", OFFSET(mux_rate), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, E}, -{"packetsize", "set packet size", OFFSET(packet_size), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, E}, -{"fflags", NULL, OFFSET(flags), FF_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, INT_MIN, INT_MAX, D|E, "fflags"}, -{"ignidx", "ignore index", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_IGNIDX }, INT_MIN, INT_MAX, D, "fflags"}, -{"genpts", "generate pts", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_GENPTS }, INT_MIN, INT_MAX, D, "fflags"}, -{"nofillin", "do not fill in missing values that can be exactly calculated", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_NOFILLIN }, INT_MIN, INT_MAX, D, "fflags"}, -{"noparse", "disable AVParsers, this needs nofillin too", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_NOPARSE }, INT_MIN, INT_MAX, D, "fflags"}, -{"igndts", "ignore dts", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_IGNDTS }, INT_MIN, INT_MAX, D, "fflags"}, +{"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT, {.dbl = 5000000 }, 32, INT_MAX, D}, +#if FF_API_MUXRATE +{"muxrate", "set mux rate", OFFSET(mux_rate), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, E}, +#endif +{"packetsize", "set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, E}, +{"fflags", NULL, OFFSET(flags), AV_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, INT_MIN, INT_MAX, D|E, "fflags"}, +{"ignidx", "ignore index", 0, AV_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_IGNIDX }, INT_MIN, INT_MAX, D, "fflags"}, +{"genpts", "generate pts", 0, AV_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_GENPTS }, INT_MIN, INT_MAX, D, "fflags"}, +{"nofillin", "do not fill in missing values that can be exactly calculated", 0, AV_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_NOFILLIN }, INT_MIN, INT_MAX, D, "fflags"}, +{"noparse", "disable AVParsers, this needs nofillin too", 0, AV_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_NOPARSE }, INT_MIN, INT_MAX, D, "fflags"}, +{"igndts", "ignore dts", 0, AV_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_IGNDTS }, INT_MIN, INT_MAX, D, "fflags"}, #if FF_API_FLAG_RTP_HINT -{"rtphint", "add rtp hinting (deprecated, use the -movflags rtphint option instead)", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_RTP_HINT }, INT_MIN, INT_MAX, E, "fflags"}, +{"rtphint", "add rtp hinting (deprecated, use the -movflags rtphint option instead)", 0, AV_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_RTP_HINT }, INT_MIN, INT_MAX, E, "fflags"}, #endif -{"analyzeduration", "how many microseconds are analyzed to estimate duration", OFFSET(max_analyze_duration), FF_OPT_TYPE_INT, {.dbl = 5*AV_TIME_BASE }, 0, INT_MAX, D}, -{"cryptokey", "decryption key", OFFSET(key), FF_OPT_TYPE_BINARY, {.dbl = 0}, 0, 0, D}, -{"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), FF_OPT_TYPE_INT, {.dbl = 1<<20 }, 0, INT_MAX, D}, -{"rtbufsize", "max memory used for buffering real-time frames", OFFSET(max_picture_buffer), FF_OPT_TYPE_INT, {.dbl = 3041280 }, 0, INT_MAX, D}, /* defaults to 1s of 15fps 352x288 YUYV422 video */ -{"fdebug", "print specific debug info", OFFSET(debug), FF_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, 0, INT_MAX, E|D, "fdebug"}, -{"ts", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_FDEBUG_TS }, INT_MIN, INT_MAX, E|D, "fdebug"}, -{"max_delay", "maximum muxing or demuxing delay in microseconds", OFFSET(max_delay), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, E|D}, -{"fpsprobesize", "number of frames used to probe fps", OFFSET(fps_probe_size), FF_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX-1, D}, +{"discardcorrupt", "discard corrupted frames", 0, AV_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_DISCARD_CORRUPT }, INT_MIN, INT_MAX, D, "fflags"}, +{"analyzeduration", "how many microseconds are analyzed to estimate duration", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT, {.dbl = 5*AV_TIME_BASE }, 0, INT_MAX, D}, +{"cryptokey", "decryption key", OFFSET(key), AV_OPT_TYPE_BINARY, {.dbl = 0}, 0, 0, D}, +{"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), AV_OPT_TYPE_INT, {.dbl = 1<<20 }, 0, INT_MAX, D}, +{"rtbufsize", "max memory used for buffering real-time frames", OFFSET(max_picture_buffer), AV_OPT_TYPE_INT, {.dbl = 3041280 }, 0, INT_MAX, D}, /* defaults to 1s of 15fps 352x288 YUYV422 video */ +{"fdebug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, 0, INT_MAX, E|D, "fdebug"}, +{"ts", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_FDEBUG_TS }, INT_MIN, INT_MAX, E|D, "fdebug"}, +{"max_delay", "maximum muxing or demuxing delay in microseconds", OFFSET(max_delay), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, E|D}, +{"fer", "set error detection aggressivity", OFFSET(error_recognition), AV_OPT_TYPE_INT, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, D, "fer"}, +{"careful", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, D, "fer"}, +{"explode", "abort decoding on error recognition", 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_EXPLODE }, INT_MIN, INT_MAX, D, "fer"}, +{"fpsprobesize", "number of frames used to probe fps", OFFSET(fps_probe_size), AV_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX-1, D}, {NULL}, }; @@ -99,7 +125,8 @@ .item_name = format_to_name, .option = options, .version = LIBAVUTIL_VERSION_INT, - .opt_find = opt_find, + .child_next = format_child_next, + .child_class_next = format_child_class_next, }; static void avformat_get_context_defaults(AVFormatContext *s) @@ -119,3 +146,8 @@ avformat_get_context_defaults(ic); return ic; } + +const AVClass *avformat_get_class(void) +{ + return &av_format_context_class; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/os_support.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/os_support.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/os_support.c 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/os_support.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Various utilities for ffmpeg system + * various OS-feature replacement utilities * Copyright (c) 2000, 2001, 2002 Fabrice Bellard * copyright (c) 2002 Francois Revol * @@ -71,7 +71,6 @@ #if !HAVE_INET_ATON #include -#include int ff_inet_aton (const char * str, struct in_addr * add) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/os_support.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/os_support.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/os_support.h 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/os_support.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * various utilities for ffmpeg system + * various OS-feature replacement utilities * copyright (c) 2000, 2001, 2002 Fabrice Bellard * * This file is part of Libav. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/output-example.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/output-example.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/output-example.c 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/output-example.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,4 @@ /* - * Libavformat API example: Output a media file in any supported - * libavformat format. The default codecs are used. - * * Copyright (c) 2003 Fabrice Bellard * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -22,11 +19,22 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + +/** + * @file + * libavformat API example. + * + * @example libavformat/output-example.c + * Output a media file in any supported libavformat format. + * The default codecs are used. + */ + #include #include #include #include +#include "libavutil/mathematics.h" #include "libavformat/avformat.h" #include "libswscale/swscale.h" @@ -43,11 +51,11 @@ /**************************************************************/ /* audio output */ -float t, tincr, tincr2; -int16_t *samples; -uint8_t *audio_outbuf; -int audio_outbuf_size; -int audio_input_frame_size; +static float t, tincr, tincr2; +static int16_t *samples; +static uint8_t *audio_outbuf; +static int audio_outbuf_size; +static int audio_input_frame_size; /* * add an audio output stream @@ -182,9 +190,9 @@ /**************************************************************/ /* video output */ -AVFrame *picture, *tmp_picture; -uint8_t *video_outbuf; -int frame_count, video_outbuf_size; +static AVFrame *picture, *tmp_picture; +static uint8_t *video_outbuf; +static int frame_count, video_outbuf_size; /* add a video output stream */ static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id) @@ -192,7 +200,7 @@ AVCodecContext *c; AVStream *st; - st = av_new_stream(oc, 0); + st = avformat_new_stream(oc, NULL); if (!st) { fprintf(stderr, "Could not alloc stream\n"); exit(1); @@ -437,7 +445,7 @@ "The output format is automatically guessed according to the file extension.\n" "Raw images can also be output by using '%%d' in the filename\n" "\n", argv[0]); - exit(1); + return 1; } filename = argv[1]; @@ -451,14 +459,14 @@ } if (!fmt) { fprintf(stderr, "Could not find suitable output format\n"); - exit(1); + return 1; } /* allocate the output media context */ oc = avformat_alloc_context(); if (!oc) { fprintf(stderr, "Memory error\n"); - exit(1); + return 1; } oc->oformat = fmt; snprintf(oc->filename, sizeof(oc->filename), "%s", filename); @@ -478,7 +486,7 @@ parameters). */ if (av_set_parameters(oc, NULL) < 0) { fprintf(stderr, "Invalid output format parameters\n"); - exit(1); + return 1; } av_dump_format(oc, 0, filename, 1); @@ -494,7 +502,7 @@ if (!(fmt->flags & AVFMT_NOFILE)) { if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0) { fprintf(stderr, "Could not open '%s'\n", filename); - exit(1); + return 1; } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/pcm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/pcm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/pcm.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/pcm.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/mathematics.h" #include "avformat.h" #include "pcm.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/pcmdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/pcmdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/pcmdec.c 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/pcmdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,8 @@ #include "avformat.h" #include "rawdec.h" #include "pcm.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" #define RAW_SAMPLES 1024 @@ -46,20 +48,30 @@ return ret; } -#define PCMDEF(name, long_name, ext, codec) \ -AVInputFormat ff_pcm_ ## name ## _demuxer = {\ - #name,\ - NULL_IF_CONFIG_SMALL(long_name),\ - sizeof(RawAudioDemuxerContext),\ - NULL,\ - ff_raw_read_header,\ - raw_read_packet,\ - NULL,\ - pcm_read_seek,\ - .flags= AVFMT_GENERIC_INDEX,\ - .extensions = ext,\ - .value = codec,\ - .priv_class = &ff_rawaudio_demuxer_class,\ +static const AVOption pcm_options[] = { + { "sample_rate", "", offsetof(RawAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { "channels", "", offsetof(RawAudioDemuxerContext, channels), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { NULL }, +}; + +#define PCMDEF(name_, long_name_, ext, codec) \ +static const AVClass name_ ## _demuxer_class = { \ + .class_name = #name_ " demuxer", \ + .item_name = av_default_item_name, \ + .option = pcm_options, \ + .version = LIBAVUTIL_VERSION_INT, \ +}; \ +AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \ + .name = #name_, \ + .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ + .priv_data_size = sizeof(RawAudioDemuxerContext), \ + .read_header = ff_raw_read_header, \ + .read_packet = raw_read_packet, \ + .read_seek = pcm_read_seek, \ + .flags = AVFMT_GENERIC_INDEX, \ + .extensions = ext, \ + .value = codec, \ + .priv_class = &name_ ## _demuxer_class, \ }; PCMDEF(f64be, "PCM 64 bit floating-point big-endian format", diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/pcmenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/pcmenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/pcmenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/pcmenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,18 +22,15 @@ #include "avformat.h" #include "rawenc.h" -#define PCMDEF(name, long_name, ext, codec) \ -AVOutputFormat ff_pcm_ ## name ## _muxer = {\ - #name,\ - NULL_IF_CONFIG_SMALL(long_name),\ - NULL,\ - ext,\ - 0,\ - codec,\ - CODEC_ID_NONE,\ - NULL,\ - ff_raw_write_packet,\ - .flags= AVFMT_NOTIMESTAMPS,\ +#define PCMDEF(name_, long_name_, ext, codec) \ +AVOutputFormat ff_pcm_ ## name_ ## _muxer = { \ + .name = #name_, \ + .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ + .extensions = ext, \ + .audio_codec = codec, \ + .video_codec = CODEC_ID_NONE, \ + .write_packet = ff_raw_write_packet, \ + .flags = AVFMT_NOTIMESTAMPS, \ }; PCMDEF(f64be, "PCM 64 bit floating-point big-endian format", diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/pmpdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/pmpdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/pmpdec.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/pmpdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,180 @@ +/* + * PMP demuxer + * Copyright (c) 2011 Reimar Döffinger + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/intreadwrite.h" +#include "avformat.h" +#include "internal.h" + +typedef struct PMPContext { + int cur_stream; + int num_streams; + int audio_packets; + int current_packet; + uint32_t *packet_sizes; + int packet_sizes_alloc; +} PMPContext; + +static int pmp_probe(AVProbeData *p) +{ + if (!memcmp(p->buf, "pmpm\1\0\0\0", 8)) + return AVPROBE_SCORE_MAX; + return 0; +} + +static int pmp_header(AVFormatContext *s, AVFormatParameters *ap) +{ + PMPContext *pmp = s->priv_data; + AVIOContext *pb = s->pb; + int tb_num, tb_den; + int index_cnt; + int audio_codec_id = CODEC_ID_NONE; + int srate, channels; + int i; + uint64_t pos; + AVStream *vst = avformat_new_stream(s, NULL); + if (!vst) + return AVERROR(ENOMEM); + vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; + avio_skip(pb, 8); + switch (avio_rl32(pb)) { + case 0: + vst->codec->codec_id = CODEC_ID_MPEG4; + break; + case 1: + vst->codec->codec_id = CODEC_ID_H264; + break; + default: + av_log(s, AV_LOG_ERROR, "Unsupported video format\n"); + break; + } + index_cnt = avio_rl32(pb); + vst->codec->width = avio_rl32(pb); + vst->codec->height = avio_rl32(pb); + + tb_num = avio_rl32(pb); + tb_den = avio_rl32(pb); + avpriv_set_pts_info(vst, 32, tb_num, tb_den); + vst->nb_frames = index_cnt; + vst->duration = index_cnt; + + switch (avio_rl32(pb)) { + case 0: + audio_codec_id = CODEC_ID_MP3; + break; + case 1: + av_log(s, AV_LOG_WARNING, "AAC is not yet correctly supported\n"); + audio_codec_id = CODEC_ID_AAC; + break; + default: + av_log(s, AV_LOG_ERROR, "Unsupported audio format\n"); + break; + } + pmp->num_streams = avio_rl16(pb) + 1; + avio_skip(pb, 10); + srate = avio_rl32(pb); + channels = avio_rl32(pb) + 1; + for (i = 1; i < pmp->num_streams; i++) { + AVStream *ast = avformat_new_stream(s, NULL); + if (!ast) + return AVERROR(ENOMEM); + ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; + ast->codec->codec_id = audio_codec_id; + ast->codec->channels = channels; + ast->codec->sample_rate = srate; + avpriv_set_pts_info(ast, 32, 1, srate); + } + pos = avio_tell(pb) + 4 * index_cnt; + for (i = 0; i < index_cnt; i++) { + int size = avio_rl32(pb); + int flags = size & 1 ? AVINDEX_KEYFRAME : 0; + size >>= 1; + av_add_index_entry(vst, pos, i, size, 0, flags); + pos += size; + } + return 0; +} + +static int pmp_packet(AVFormatContext *s, AVPacket *pkt) +{ + PMPContext *pmp = s->priv_data; + AVIOContext *pb = s->pb; + int ret = 0; + int i; + + if (pb->eof_reached) + return AVERROR_EOF; + if (pmp->cur_stream == 0) { + int num_packets; + pmp->audio_packets = avio_r8(pb); + num_packets = (pmp->num_streams - 1) * pmp->audio_packets + 1; + avio_skip(pb, 8); + pmp->current_packet = 0; + av_fast_malloc(&pmp->packet_sizes, + &pmp->packet_sizes_alloc, + num_packets * sizeof(*pmp->packet_sizes)); + if (!pmp->packet_sizes_alloc) { + av_log(s, AV_LOG_ERROR, "Cannot (re)allocate packet buffer\n"); + return AVERROR(ENOMEM); + } + for (i = 0; i < num_packets; i++) + pmp->packet_sizes[i] = avio_rl32(pb); + } + ret = av_get_packet(pb, pkt, pmp->packet_sizes[pmp->current_packet]); + if (ret > 0) { + ret = 0; + // FIXME: this is a hack that should be removed once + // compute_pkt_fields() can handle timestamps properly + if (pmp->cur_stream == 0) + pkt->dts = s->streams[0]->cur_dts++; + pkt->stream_index = pmp->cur_stream; + } + pmp->current_packet++; + if (pmp->current_packet == 1 || pmp->current_packet > pmp->audio_packets) + pmp->cur_stream = (pmp->cur_stream + 1) % pmp->num_streams; + + return ret; +} + +static int pmp_seek(AVFormatContext *s, int stream_idx, int64_t ts, int flags) +{ + PMPContext *pmp = s->priv_data; + pmp->cur_stream = 0; + // fallback to default seek now + return -1; +} + +static int pmp_close(AVFormatContext *s) +{ + PMPContext *pmp = s->priv_data; + av_freep(&pmp->packet_sizes); + return 0; +} + +AVInputFormat ff_pmp_demuxer = { + .name = "pmp", + .long_name = NULL_IF_CONFIG_SMALL("Playstation Portable PMP format"), + .priv_data_size = sizeof(PMPContext), + .read_probe = pmp_probe, + .read_header = pmp_header, + .read_packet = pmp_packet, + .read_seek = pmp_seek, + .read_close = pmp_close, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/psxstr.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/psxstr.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/psxstr.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/psxstr.c 2012-01-11 00:34:30.000000000 +0000 @@ -31,6 +31,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define RIFF_TAG MKTAG('R', 'I', 'F', 'F') #define CDXA_TAG MKTAG('C', 'D', 'X', 'A') @@ -162,10 +163,10 @@ if(str->channels[channel].video_stream_index < 0){ /* allocate a new AVStream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 64, 1, 15); + avpriv_set_pts_info(st, 64, 1, 15); str->channels[channel].video_stream_index = st->index; @@ -210,7 +211,7 @@ if(str->channels[channel].audio_stream_index < 0){ int fmt = sector[0x13]; /* allocate a new AVStream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -224,7 +225,7 @@ // st->codec->bit_rate = 0; //FIXME; st->codec->block_align = 128; - av_set_pts_info(st, 64, 128, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 128, st->codec->sample_rate); } pkt = ret_pkt; if (av_new_packet(pkt, 2304)) @@ -234,7 +235,6 @@ pkt->stream_index = str->channels[channel].audio_stream_index; return 0; - break; default: av_log(s, AV_LOG_WARNING, "Unknown sector type %02X\n", sector[0x12]); /* drop the sector and move on */ @@ -259,11 +259,11 @@ } AVInputFormat ff_str_demuxer = { - "psxstr", - NULL_IF_CONFIG_SMALL("Sony Playstation STR format"), - sizeof(StrDemuxContext), - str_probe, - str_read_header, - str_read_packet, - str_read_close, + .name = "psxstr", + .long_name = NULL_IF_CONFIG_SMALL("Sony Playstation STR format"), + .priv_data_size = sizeof(StrDemuxContext), + .read_probe = str_probe, + .read_header = str_read_header, + .read_packet = str_read_packet, + .read_close = str_read_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/pva.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/pva.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/pva.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/pva.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,6 +20,7 @@ */ #include "avformat.h" +#include "internal.h" #include "mpeg.h" #define PVA_MAX_PAYLOAD_LENGTH 0x17f8 @@ -43,20 +44,20 @@ static int pva_read_header(AVFormatContext *s, AVFormatParameters *ap) { AVStream *st; - if (!(st = av_new_stream(s, 0))) + if (!(st = avformat_new_stream(s, NULL))) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_MPEG2VIDEO; st->need_parsing = AVSTREAM_PARSE_FULL; - av_set_pts_info(st, 32, 1, 90000); + avpriv_set_pts_info(st, 32, 1, 90000); av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME); - if (!(st = av_new_stream(s, 1))) + if (!(st = avformat_new_stream(s, NULL))) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_MP2; st->need_parsing = AVSTREAM_PARSE_FULL; - av_set_pts_info(st, 33, 1, 90000); + avpriv_set_pts_info(st, 33, 1, 90000); av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME); /* the parameters will be extracted from the compressed bitstream */ @@ -201,11 +202,11 @@ } AVInputFormat ff_pva_demuxer = { - "pva", - NULL_IF_CONFIG_SMALL("TechnoTrend PVA file and stream format"), - sizeof(PVAContext), - pva_probe, - pva_read_header, - pva_read_packet, + .name = "pva", + .long_name = NULL_IF_CONFIG_SMALL("TechnoTrend PVA file and stream format"), + .priv_data_size = sizeof(PVAContext), + .read_probe = pva_probe, + .read_header = pva_read_header, + .read_packet = pva_read_packet, .read_timestamp = pva_read_timestamp }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/qcp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/qcp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/qcp.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/qcp.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,7 @@ * @file * QCP format (.qcp) demuxer * @author Kenan Gillet - * @sa RFC 3625: "The QCP File Format and Media Types for Speech Data" + * @see RFC 3625: "The QCP File Format and Media Types for Speech Data" * http://tools.ietf.org/html/rfc3625 */ @@ -84,7 +84,7 @@ { AVIOContext *pb = s->pb; QCPContext *c = s->priv_data; - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); uint8_t buf[16]; int i, nb_rates; @@ -92,8 +92,7 @@ return AVERROR(ENOMEM); avio_rb32(pb); // "RIFF" - s->file_size = avio_rl32(pb) + 8; - avio_skip(pb, 8 + 4 + 1 + 1); // "QLCMfmt " + chunk-size + major-version + minor-version + avio_skip(pb, 4 + 8 + 4 + 1 + 1); // filesize + "QLCMfmt " + chunk-size + major-version + minor-version st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->channels = 1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/r3d.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/r3d.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/r3d.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/r3d.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,9 @@ #include "libavutil/intreadwrite.h" #include "libavutil/dict.h" +#include "libavutil/mathematics.h" #include "avformat.h" +#include "internal.h" typedef struct { unsigned video_offsets_count; @@ -51,7 +53,7 @@ static int r3d_read_red1(AVFormatContext *s) { - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); char filename[258]; int tmp; int av_unused tmp2; @@ -69,7 +71,7 @@ av_dlog(s, "unknown1 %d\n", tmp); tmp = avio_rb32(s->pb); - av_set_pts_info(st, 32, 1, tmp); + avpriv_set_pts_info(st, 32, 1, tmp); tmp = avio_rb32(s->pb); // filenum av_dlog(s, "filenum %d\n", tmp); @@ -88,13 +90,13 @@ tmp = avio_r8(s->pb); // audio channels av_dlog(s, "audio channels %d\n", tmp); if (tmp > 0) { - AVStream *ast = av_new_stream(s, 1); + AVStream *ast = avformat_new_stream(s, NULL); if (!ast) return AVERROR(ENOMEM); ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; ast->codec->codec_id = CODEC_ID_PCM_S32BE; ast->codec->channels = tmp; - av_set_pts_info(ast, 32, 1, st->time_base.den); + avpriv_set_pts_info(ast, 32, 1, st->time_base.den); } avio_read(s->pb, filename, 257); @@ -383,12 +385,12 @@ } AVInputFormat ff_r3d_demuxer = { - "r3d", - NULL_IF_CONFIG_SMALL("REDCODE R3D format"), - sizeof(R3DContext), - r3d_probe, - r3d_read_header, - r3d_read_packet, - r3d_close, - r3d_seek, + .name = "r3d", + .long_name = NULL_IF_CONFIG_SMALL("REDCODE R3D format"), + .priv_data_size = sizeof(R3DContext), + .read_probe = r3d_probe, + .read_header = r3d_read_header, + .read_packet = r3d_read_packet, + .read_close = r3d_close, + .read_seek = r3d_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rawdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rawdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rawdec.c 2011-06-07 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rawdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ */ #include "avformat.h" +#include "internal.h" #include "avio_internal.h" #include "rawdec.h" #include "libavutil/opt.h" @@ -33,7 +34,7 @@ AVStream *st; enum CodecID id; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -49,23 +50,20 @@ case AVMEDIA_TYPE_AUDIO: { RawAudioDemuxerContext *s1 = s->priv_data; -#if FF_API_FORMAT_PARAMETERS - if (ap->sample_rate) - st->codec->sample_rate = ap->sample_rate; - if (ap->channels) - st->codec->channels = ap->channels; - else st->codec->channels = 1; -#endif + st->codec->channels = 1; + + if (id == CODEC_ID_ADPCM_G722) + st->codec->sample_rate = 16000; - if (s1->sample_rate) + if (s1 && s1->sample_rate) st->codec->sample_rate = s1->sample_rate; - if (s1->channels) + if (s1 && s1->channels) st->codec->channels = s1->channels; st->codec->bits_per_coded_sample = av_get_bits_per_sample(st->codec->codec_id); assert(st->codec->bits_per_coded_sample > 0); st->codec->block_align = st->codec->bits_per_coded_sample*st->codec->channels/8; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); break; } case AVMEDIA_TYPE_VIDEO: { @@ -87,17 +85,7 @@ av_log(s, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s1->framerate); goto fail; } -#if FF_API_FORMAT_PARAMETERS - if (ap->width > 0) - width = ap->width; - if (ap->height > 0) - height = ap->height; - if (ap->pix_fmt) - pix_fmt = ap->pix_fmt; - if (ap->time_base.num) - framerate = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif - av_set_pts_info(st, 64, framerate.den, framerate.num); + avpriv_set_pts_info(st, 64, framerate.den, framerate.num); st->codec->width = width; st->codec->height = height; st->codec->pix_fmt = pix_fmt; @@ -135,12 +123,13 @@ int ff_raw_audio_read_header(AVFormatContext *s, AVFormatParameters *ap) { - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = s->iformat->value; st->need_parsing = AVSTREAM_PARSE_FULL; + st->start_time = 0; /* the parameters will be extracted from the compressed bitstream */ return 0; @@ -156,7 +145,7 @@ int ret = 0; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) { ret = AVERROR(ENOMEM); goto fail; @@ -170,13 +159,9 @@ av_log(s, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s1->framerate); goto fail; } -#if FF_API_FORMAT_PARAMETERS - if (ap->time_base.num) - framerate = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif - st->codec->time_base = (AVRational){framerate.den, framerate.num}; - av_set_pts_info(st, 64, 1, 1200000); + st->r_frame_rate = st->avg_frame_rate = framerate; + avpriv_set_pts_info(st, 64, 1, 1200000); fail: return ret; @@ -184,63 +169,34 @@ /* Note: Do not forget to add new entries to the Makefile as well. */ -static const AVOption audio_options[] = { - { "sample_rate", "", offsetof(RawAudioDemuxerContext, sample_rate), FF_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, - { "channels", "", offsetof(RawAudioDemuxerContext, channels), FF_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, - { NULL }, -}; - -const AVClass ff_rawaudio_demuxer_class = { - .class_name = "rawaudio demuxer", - .item_name = av_default_item_name, - .option = audio_options, - .version = LIBAVUTIL_VERSION_INT, -}; - #define OFFSET(x) offsetof(FFRawVideoDemuxerContext, x) #define DEC AV_OPT_FLAG_DECODING_PARAM -static const AVOption video_options[] = { - { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, - { "pixel_format", "", OFFSET(pixel_format), FF_OPT_TYPE_STRING, {.str = "yuv420p"}, 0, 0, DEC }, - { "framerate", "", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = "25"}, 0, 0, DEC }, +const AVOption ff_rawvideo_options[] = { + { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0, DEC}, { NULL }, }; -#undef OFFSET -#undef DEC - -const AVClass ff_rawvideo_demuxer_class = { - .class_name = "rawvideo demuxer", - .item_name = av_default_item_name, - .option = video_options, - .version = LIBAVUTIL_VERSION_INT, -}; #if CONFIG_G722_DEMUXER AVInputFormat ff_g722_demuxer = { - "g722", - NULL_IF_CONFIG_SMALL("raw G.722"), - sizeof(RawAudioDemuxerContext), - NULL, - ff_raw_read_header, - ff_raw_read_partial_packet, + .name = "g722", + .long_name = NULL_IF_CONFIG_SMALL("raw G.722"), + .read_header = ff_raw_read_header, + .read_packet = ff_raw_read_partial_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "g722,722", .value = CODEC_ID_ADPCM_G722, - .priv_class = &ff_rawaudio_demuxer_class, }; #endif -#if CONFIG_GSM_DEMUXER -AVInputFormat ff_gsm_demuxer = { - "gsm", - NULL_IF_CONFIG_SMALL("raw GSM"), - 0, - NULL, - ff_raw_audio_read_header, - ff_raw_read_partial_packet, +#if CONFIG_LATM_DEMUXER +AVInputFormat ff_latm_demuxer = { + .name = "latm", + .long_name = NULL_IF_CONFIG_SMALL("raw LOAS/LATM"), + .read_header = ff_raw_audio_read_header, + .read_packet = ff_raw_read_partial_packet, .flags= AVFMT_GENERIC_INDEX, - .extensions = "gsm", - .value = CODEC_ID_GSM, + .extensions = "latm", + .value = CODEC_ID_AAC_LATM, }; #endif @@ -250,12 +206,10 @@ #if CONFIG_MLP_DEMUXER AVInputFormat ff_mlp_demuxer = { - "mlp", - NULL_IF_CONFIG_SMALL("raw MLP"), - 0, - NULL, - ff_raw_audio_read_header, - ff_raw_read_partial_packet, + .name = "mlp", + .long_name = NULL_IF_CONFIG_SMALL("raw MLP"), + .read_header = ff_raw_audio_read_header, + .read_packet = ff_raw_read_partial_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "mlp", .value = CODEC_ID_MLP, @@ -264,12 +218,10 @@ #if CONFIG_TRUEHD_DEMUXER AVInputFormat ff_truehd_demuxer = { - "truehd", - NULL_IF_CONFIG_SMALL("raw TrueHD"), - 0, - NULL, - ff_raw_audio_read_header, - ff_raw_read_partial_packet, + .name = "truehd", + .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"), + .read_header = ff_raw_audio_read_header, + .read_packet = ff_raw_read_partial_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "thd", .value = CODEC_ID_TRUEHD, @@ -278,13 +230,11 @@ #if CONFIG_SHORTEN_DEMUXER AVInputFormat ff_shorten_demuxer = { - "shn", - NULL_IF_CONFIG_SMALL("raw Shorten"), - 0, - NULL, - ff_raw_audio_read_header, - ff_raw_read_partial_packet, - .flags= AVFMT_GENERIC_INDEX, + .name = "shn", + .long_name = NULL_IF_CONFIG_SMALL("raw Shorten"), + .read_header = ff_raw_audio_read_header, + .read_packet = ff_raw_read_partial_packet, + .flags = AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH | AVFMT_NO_BYTE_SEEK, .extensions = "shn", .value = CODEC_ID_SHORTEN, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rawdec.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rawdec.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rawdec.h 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rawdec.h 2012-01-11 00:34:30.000000000 +0000 @@ -24,6 +24,7 @@ #include "avformat.h" #include "libavutil/log.h" +#include "libavutil/opt.h" typedef struct RawAudioDemuxerContext { AVClass *class; @@ -38,8 +39,7 @@ char *framerate; /**< String describing framerate, set by a private option. */ } FFRawVideoDemuxerContext; -extern const AVClass ff_rawaudio_demuxer_class; -extern const AVClass ff_rawvideo_demuxer_class; +extern const AVOption ff_rawvideo_options[]; int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap); @@ -49,7 +49,16 @@ int ff_raw_video_read_header(AVFormatContext *s, AVFormatParameters *ap); +#define FF_RAWVIDEO_DEMUXER_CLASS(name)\ +static const AVClass name ## _demuxer_class = {\ + .class_name = #name " demuxer",\ + .item_name = av_default_item_name,\ + .option = ff_rawvideo_options,\ + .version = LIBAVUTIL_VERSION_INT,\ +}; + #define FF_DEF_RAWVIDEO_DEMUXER(shortname, longname, probe, ext, id)\ +FF_RAWVIDEO_DEMUXER_CLASS(shortname)\ AVInputFormat ff_ ## shortname ## _demuxer = {\ .name = #shortname,\ .long_name = NULL_IF_CONFIG_SMALL(longname),\ @@ -60,7 +69,7 @@ .flags = AVFMT_GENERIC_INDEX,\ .value = id,\ .priv_data_size = sizeof(FFRawVideoDemuxerContext),\ - .priv_class = &ff_rawvideo_demuxer_class,\ + .priv_class = &shortname ## _demuxer_class,\ }; #endif /* AVFORMAT_RAWDEC_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rawenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rawenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rawenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rawenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -34,195 +34,175 @@ #if CONFIG_AC3_MUXER AVOutputFormat ff_ac3_muxer = { - "ac3", - NULL_IF_CONFIG_SMALL("raw AC-3"), - "audio/x-ac3", - "ac3", - 0, - CODEC_ID_AC3, - CODEC_ID_NONE, - NULL, - ff_raw_write_packet, + .name = "ac3", + .long_name = NULL_IF_CONFIG_SMALL("raw AC-3"), + .mime_type = "audio/x-ac3", + .extensions = "ac3", + .audio_codec = CODEC_ID_AC3, + .video_codec = CODEC_ID_NONE, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif +#if CONFIG_ADX_MUXER +AVOutputFormat ff_adx_muxer = { + .name = "adx", + .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"), + .extensions = "adx", + .audio_codec = CODEC_ID_ADPCM_ADX, + .video_codec = CODEC_ID_NONE, + .write_packet = ff_raw_write_packet, + .flags = AVFMT_NOTIMESTAMPS, +}; +#endif + #if CONFIG_DIRAC_MUXER AVOutputFormat ff_dirac_muxer = { - "dirac", - NULL_IF_CONFIG_SMALL("raw Dirac"), - NULL, - "drc", - 0, - CODEC_ID_NONE, - CODEC_ID_DIRAC, - NULL, - ff_raw_write_packet, + .name = "dirac", + .long_name = NULL_IF_CONFIG_SMALL("raw Dirac"), + .extensions = "drc", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_DIRAC, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_DNXHD_MUXER AVOutputFormat ff_dnxhd_muxer = { - "dnxhd", - NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"), - NULL, - "dnxhd", - 0, - CODEC_ID_NONE, - CODEC_ID_DNXHD, - NULL, - ff_raw_write_packet, + .name = "dnxhd", + .long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"), + .extensions = "dnxhd", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_DNXHD, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_DTS_MUXER AVOutputFormat ff_dts_muxer = { - "dts", - NULL_IF_CONFIG_SMALL("raw DTS"), - "audio/x-dca", - "dts", - 0, - CODEC_ID_DTS, - CODEC_ID_NONE, - NULL, - ff_raw_write_packet, + .name = "dts", + .long_name = NULL_IF_CONFIG_SMALL("raw DTS"), + .mime_type = "audio/x-dca", + .extensions = "dts", + .audio_codec = CODEC_ID_DTS, + .video_codec = CODEC_ID_NONE, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_EAC3_MUXER AVOutputFormat ff_eac3_muxer = { - "eac3", - NULL_IF_CONFIG_SMALL("raw E-AC-3"), - "audio/x-eac3", - "eac3", - 0, - CODEC_ID_EAC3, - CODEC_ID_NONE, - NULL, - ff_raw_write_packet, + .name = "eac3", + .long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"), + .mime_type = "audio/x-eac3", + .extensions = "eac3", + .audio_codec = CODEC_ID_EAC3, + .video_codec = CODEC_ID_NONE, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_G722_MUXER AVOutputFormat ff_g722_muxer = { - "g722", - NULL_IF_CONFIG_SMALL("raw G.722"), - "audio/G722", - "g722", - 0, - CODEC_ID_ADPCM_G722, - CODEC_ID_NONE, - NULL, - ff_raw_write_packet, + .name = "g722", + .long_name = NULL_IF_CONFIG_SMALL("raw G.722"), + .mime_type = "audio/G722", + .extensions = "g722", + .audio_codec = CODEC_ID_ADPCM_G722, + .video_codec = CODEC_ID_NONE, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_H261_MUXER AVOutputFormat ff_h261_muxer = { - "h261", - NULL_IF_CONFIG_SMALL("raw H.261"), - "video/x-h261", - "h261", - 0, - CODEC_ID_NONE, - CODEC_ID_H261, - NULL, - ff_raw_write_packet, + .name = "h261", + .long_name = NULL_IF_CONFIG_SMALL("raw H.261"), + .mime_type = "video/x-h261", + .extensions = "h261", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_H261, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_H263_MUXER AVOutputFormat ff_h263_muxer = { - "h263", - NULL_IF_CONFIG_SMALL("raw H.263"), - "video/x-h263", - "h263", - 0, - CODEC_ID_NONE, - CODEC_ID_H263, - NULL, - ff_raw_write_packet, + .name = "h263", + .long_name = NULL_IF_CONFIG_SMALL("raw H.263"), + .mime_type = "video/x-h263", + .extensions = "h263", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_H263, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_H264_MUXER AVOutputFormat ff_h264_muxer = { - "h264", - NULL_IF_CONFIG_SMALL("raw H.264 video format"), - NULL, - "h264", - 0, - CODEC_ID_NONE, - CODEC_ID_H264, - NULL, - ff_raw_write_packet, + .name = "h264", + .long_name = NULL_IF_CONFIG_SMALL("raw H.264 video format"), + .extensions = "h264", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_H264, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_CAVSVIDEO_MUXER AVOutputFormat ff_cavsvideo_muxer = { - "cavsvideo", - NULL_IF_CONFIG_SMALL("raw Chinese AVS video"), - NULL, - "cavs", - 0, - CODEC_ID_NONE, - CODEC_ID_CAVS, - NULL, - ff_raw_write_packet, + .name = "cavsvideo", + .long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS video"), + .extensions = "cavs", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_CAVS, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_M4V_MUXER AVOutputFormat ff_m4v_muxer = { - "m4v", - NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"), - NULL, - "m4v", - 0, - CODEC_ID_NONE, - CODEC_ID_MPEG4, - NULL, - ff_raw_write_packet, + .name = "m4v", + .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"), + .extensions = "m4v", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_MPEG4, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_MJPEG_MUXER AVOutputFormat ff_mjpeg_muxer = { - "mjpeg", - NULL_IF_CONFIG_SMALL("raw MJPEG video"), - "video/x-mjpeg", - "mjpg,mjpeg", - 0, - CODEC_ID_NONE, - CODEC_ID_MJPEG, - NULL, - ff_raw_write_packet, + .name = "mjpeg", + .long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"), + .mime_type = "video/x-mjpeg", + .extensions = "mjpg,mjpeg", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_MJPEG, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_MLP_MUXER AVOutputFormat ff_mlp_muxer = { - "mlp", - NULL_IF_CONFIG_SMALL("raw MLP"), - NULL, - "mlp", - 0, - CODEC_ID_MLP, - CODEC_ID_NONE, - NULL, - ff_raw_write_packet, + .name = "mlp", + .long_name = NULL_IF_CONFIG_SMALL("raw MLP"), + .extensions = "mlp", + .audio_codec = CODEC_ID_MLP, + .video_codec = CODEC_ID_NONE, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif @@ -241,60 +221,49 @@ #if CONFIG_TRUEHD_MUXER AVOutputFormat ff_truehd_muxer = { - "truehd", - NULL_IF_CONFIG_SMALL("raw TrueHD"), - NULL, - "thd", - 0, - CODEC_ID_TRUEHD, - CODEC_ID_NONE, - NULL, - ff_raw_write_packet, + .name = "truehd", + .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"), + .extensions = "thd", + .audio_codec = CODEC_ID_TRUEHD, + .video_codec = CODEC_ID_NONE, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_MPEG1VIDEO_MUXER AVOutputFormat ff_mpeg1video_muxer = { - "mpeg1video", - NULL_IF_CONFIG_SMALL("raw MPEG-1 video"), - "video/x-mpeg", - "mpg,mpeg,m1v", - 0, - CODEC_ID_NONE, - CODEC_ID_MPEG1VIDEO, - NULL, - ff_raw_write_packet, + .name = "mpeg1video", + .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"), + .mime_type = "video/x-mpeg", + .extensions = "mpg,mpeg,m1v", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_MPEG1VIDEO, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_MPEG2VIDEO_MUXER AVOutputFormat ff_mpeg2video_muxer = { - "mpeg2video", - NULL_IF_CONFIG_SMALL("raw MPEG-2 video"), - NULL, - "m2v", - 0, - CODEC_ID_NONE, - CODEC_ID_MPEG2VIDEO, - NULL, - ff_raw_write_packet, + .name = "mpeg2video", + .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"), + .extensions = "m2v", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_MPEG2VIDEO, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif #if CONFIG_RAWVIDEO_MUXER AVOutputFormat ff_rawvideo_muxer = { - "rawvideo", - NULL_IF_CONFIG_SMALL("raw video format"), - NULL, - "yuv,rgb", - 0, - CODEC_ID_NONE, - CODEC_ID_RAWVIDEO, - NULL, - ff_raw_write_packet, + .name = "rawvideo", + .long_name = NULL_IF_CONFIG_SMALL("raw video format"), + .extensions = "yuv,rgb", + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_RAWVIDEO, + .write_packet = ff_raw_write_packet, .flags= AVFMT_NOTIMESTAMPS, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rawvideodec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rawvideodec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rawvideodec.c 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rawvideodec.c 2012-01-11 00:34:30.000000000 +0000 @@ -44,15 +44,30 @@ return 0; } +#define OFFSET(x) offsetof(FFRawVideoDemuxerContext, x) +#define DEC AV_OPT_FLAG_DECODING_PARAM +static const AVOption rawvideo_options[] = { + { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "pixel_format", "", OFFSET(pixel_format), AV_OPT_TYPE_STRING, {.str = "yuv420p"}, 0, 0, DEC }, + { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0, DEC }, + { NULL }, +}; + +static const AVClass rawvideo_demuxer_class = { + .class_name = "rawvideo demuxer", + .item_name = av_default_item_name, + .option = rawvideo_options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVInputFormat ff_rawvideo_demuxer = { - "rawvideo", - NULL_IF_CONFIG_SMALL("raw video format"), - sizeof(FFRawVideoDemuxerContext), - NULL, - ff_raw_read_header, - rawvideo_read_packet, + .name = "rawvideo", + .long_name = NULL_IF_CONFIG_SMALL("raw video format"), + .priv_data_size = sizeof(FFRawVideoDemuxerContext), + .read_header = ff_raw_read_header, + .read_packet = rawvideo_read_packet, .flags= AVFMT_GENERIC_INDEX, .extensions = "yuv,cif,qcif,rgb", .value = CODEC_ID_RAWVIDEO, - .priv_class = &ff_rawvideo_demuxer_class, + .priv_class = &rawvideo_demuxer_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rdt.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rdt.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rdt.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rdt.c 2012-01-11 00:34:30.000000000 +0000 @@ -459,8 +459,9 @@ { AVStream *st; - if (!(st = av_new_stream(s, orig_st->id))) + if (!(st = avformat_new_stream(s, NULL))) return NULL; + st->id = orig_st->id; st->codec->codec_type = orig_st->codec->codec_type; st->first_dts = orig_st->first_dts; @@ -483,7 +484,7 @@ * is set and once for if it isn't. We only read the first because we * don't care much (that's what the "odd" variable is for). * Each rule contains a set of one or more statements, optionally - * preceeded by a single condition. If there's a condition, the rule + * preceded by a single condition. If there's a condition, the rule * starts with a '#'. Multiple conditions are merged between brackets, * so there are never multiple conditions spread out over separate * statements. Generally, these conditions are bitrate limits (min/max) @@ -523,7 +524,11 @@ { PayloadContext *rdt = av_mallocz(sizeof(PayloadContext)); - avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL); + int ret = avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL); + if (ret < 0) { + av_free(rdt); + return NULL; + } return rdt; } @@ -539,7 +544,7 @@ av_freep(&rdt->rmst[i]); } if (rdt->rmctx) - av_close_input_file(rdt->rmctx); + avformat_close_input(&rdt->rmctx); av_freep(&rdt->mlti_data); av_freep(&rdt->rmst); av_free(rdt); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rdt.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rdt.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rdt.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rdt.h 2012-01-11 00:34:30.000000000 +0000 @@ -80,16 +80,16 @@ * * @param buf input buffer * @param len length of input buffer - * @param set_id will be set to the set ID this packet belongs to - * @param seq_no will be set to the sequence number of the packet - * @param stream_id will be set to the stream ID this packet belongs to - * @param is_keyframe will be whether this packet belongs to a keyframe - * @param timestamp will be set to the timestamp of the packet + * @param pset_id will be set to the set ID this packet belongs to + * @param pseq_no will be set to the sequence number of the packet + * @param pstream_id will be set to the stream ID this packet belongs to + * @param pis_keyframe will be whether this packet belongs to a keyframe + * @param ptimestamp will be set to the timestamp of the packet * @return the amount of bytes consumed, or negative on error */ int ff_rdt_parse_header(const uint8_t *buf, int len, - int *set_id, int *seq_no, int *stream_id, - int *is_keyframe, uint32_t *timestamp); + int *pset_id, int *pseq_no, int *pstream_id, + int *pis_keyframe, uint32_t *ptimestamp); /** * Parse RDT-style packet data (header + media data). diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/riff.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/riff.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/riff.c 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/riff.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/mathematics.h" #include "libavcodec/avcodec.h" #include "avformat.h" #include "avio_internal.h" @@ -86,6 +87,7 @@ { CODEC_ID_MPEG4, MKTAG('G', 'E', 'O', 'V') }, { CODEC_ID_MPEG4, MKTAG('S', 'I', 'P', 'P') }, /* Samsung SHR-6040 */ { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'X') }, + { CODEC_ID_MPEG4, MKTAG('D', 'r', 'e', 'X') }, { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') }, { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3') }, { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', 'G', '3') }, @@ -130,6 +132,7 @@ { CODEC_ID_MPEG2VIDEO, MKTAG('s', 'l', 'i', 'f') }, { CODEC_ID_MPEG2VIDEO, MKTAG('E', 'M', '2', 'V') }, { CODEC_ID_MPEG2VIDEO, MKTAG('M', '7', '0', '1') }, /* Matrox MPEG2 intra-only */ + { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', 'v') }, { CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') }, { CODEC_ID_MJPEG, MKTAG('L', 'J', 'P', 'G') }, { CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') }, @@ -169,12 +172,16 @@ { CODEC_ID_RAWVIDEO, MKTAG('2', 'V', 'u', '1') }, { CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') }, { CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, + { CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') }, { CODEC_ID_RAWVIDEO, MKTAG('P', '4', '2', '2') }, { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '2') }, + { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '6') }, + { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '2', '4') }, { CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'V', 'Y') }, { CODEC_ID_RAWVIDEO, MKTAG('V', 'Y', 'U', 'Y') }, { CODEC_ID_RAWVIDEO, MKTAG('I', 'Y', 'U', 'V') }, { CODEC_ID_RAWVIDEO, MKTAG('Y', '8', '0', '0') }, + { CODEC_ID_RAWVIDEO, MKTAG('Y', '8', ' ', ' ') }, { CODEC_ID_RAWVIDEO, MKTAG('H', 'D', 'Y', 'C') }, { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'U', '9') }, { CODEC_ID_RAWVIDEO, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */ @@ -190,6 +197,7 @@ { CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') }, { CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, { CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, + { CODEC_ID_V410, MKTAG('v', '4', '1', '0') }, { CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '1') }, { CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '2') }, { CODEC_ID_INDEO4, MKTAG('I', 'V', '4', '1') }, @@ -235,10 +243,10 @@ { CODEC_ID_QPEG, MKTAG('Q', '1', '.', '0') }, { CODEC_ID_QPEG, MKTAG('Q', '1', '.', '1') }, { CODEC_ID_WMV3, MKTAG('W', 'M', 'V', '3') }, - { CODEC_ID_WMV3, MKTAG('W', 'M', 'V', 'P') }, + { CODEC_ID_WMV3IMAGE, MKTAG('W', 'M', 'V', 'P') }, { CODEC_ID_VC1, MKTAG('W', 'V', 'C', '1') }, { CODEC_ID_VC1, MKTAG('W', 'M', 'V', 'A') }, - { CODEC_ID_VC1, MKTAG('W', 'V', 'P', '2') }, + { CODEC_ID_VC1IMAGE, MKTAG('W', 'V', 'P', '2') }, { CODEC_ID_LOCO, MKTAG('L', 'O', 'C', 'O') }, { CODEC_ID_WNV1, MKTAG('W', 'N', 'V', '1') }, { CODEC_ID_AASC, MKTAG('A', 'A', 'S', 'C') }, @@ -252,11 +260,13 @@ { CODEC_ID_CAVS, MKTAG('C', 'A', 'V', 'S') }, { CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') }, { CODEC_ID_JPEG2000, MKTAG('M', 'J', '2', 'C') }, + { CODEC_ID_JPEG2000, MKTAG('L', 'J', '2', 'C') }, + { CODEC_ID_JPEG2000, MKTAG('L', 'J', '2', 'K') }, { CODEC_ID_VMNC, MKTAG('V', 'M', 'n', 'c') }, { CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') }, { CODEC_ID_PNG, MKTAG('M', 'P', 'N', 'G') }, { CODEC_ID_PNG, MKTAG('P', 'N', 'G', '1') }, - { CODEC_ID_CLJR, MKTAG('c', 'l', 'j', 'r') }, + { CODEC_ID_CLJR, MKTAG('C', 'L', 'J', 'R') }, { CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') }, { CODEC_ID_RPZA, MKTAG('a', 'z', 'p', 'r') }, { CODEC_ID_RPZA, MKTAG('R', 'P', 'Z', 'A') }, @@ -267,6 +277,12 @@ { CODEC_ID_DPX, MKTAG('d', 'p', 'x', ' ') }, { CODEC_ID_KGV1, MKTAG('K', 'G', 'V', '1') }, { CODEC_ID_LAGARITH, MKTAG('L', 'A', 'G', 'S') }, + { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'R', 'A') }, + { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'R', 'G') }, + { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'Y', '0') }, + { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'Y', '2') }, + { CODEC_ID_VBLE, MKTAG('V', 'B', 'L', 'E') }, + { CODEC_ID_DXTORY, MKTAG('x', 't', 'o', 'r') }, { CODEC_ID_NONE, 0 } }; @@ -316,6 +332,7 @@ { CODEC_ID_PCM_MULAW, 0x6c75 }, { CODEC_ID_AAC, 0x706d }, { CODEC_ID_AAC, 0x4143 }, + { CODEC_ID_SPEEX, 0xA109 }, { CODEC_ID_FLAC, 0xF1AC }, { CODEC_ID_ADPCM_SWF, ('S'<<8)+'F' }, { CODEC_ID_VORBIS, ('V'<<8)+'o' }, //HACK/FIXME, does vorbis in WAV/AVI have an (in)official id? @@ -328,6 +345,28 @@ { CODEC_ID_NONE, 0 }, }; +const AVMetadataConv ff_riff_info_conv[] = { + { "IART", "artist" }, + { "ICMT", "comment" }, + { "ICOP", "copyright" }, + { "ICRD", "date" }, + { "IGNR", "genre" }, + { "ILNG", "language" }, + { "INAM", "title" }, + { "IPRD", "album" }, + { "IPRT", "track" }, + { "ISFT", "encoder" }, + { "ITCH", "encoded_by"}, + { 0 }, +}; + +const char ff_riff_tags[][5] = { + "IARL", "IART", "ICMS", "ICMT", "ICOP", "ICRD", "ICRP", "IDIM", "IDPI", + "IENG", "IGNR", "IKEY", "ILGT", "ILNG", "IMED", "INAM", "IPLT", "IPRD", + "IPRT", "ISBJ", "ISFT", "ISHP", "ISRC", "ISRF", "ITCH", + {0} +}; + #if CONFIG_MUXERS int64_t ff_start_tag(AVIOContext *pb, const char *tag) { @@ -372,11 +411,13 @@ avio_wl32(pb, enc->sample_rate); if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_GSM_MS) { bps = 0; - } else if (enc->codec_id == CODEC_ID_ADPCM_G726) { - bps = 4; } else { - if (!(bps = av_get_bits_per_sample(enc->codec_id))) - bps = 16; // default to 16 + if (!(bps = av_get_bits_per_sample(enc->codec_id))) { + if (enc->bits_per_coded_sample) + bps = enc->bits_per_coded_sample; + else + bps = 16; // default to 16 + } } if(bps != enc->bits_per_coded_sample && enc->bits_per_coded_sample){ av_log(enc, AV_LOG_WARNING, "requested bits_per_coded_sample (%d) and actually stored (%d) differ\n", enc->bits_per_coded_sample, bps); @@ -387,12 +428,10 @@ //blkalign = 144 * enc->bit_rate/enc->sample_rate; } else if (enc->codec_id == CODEC_ID_AC3) { blkalign = 3840; //maximum bytes per frame - } else if (enc->codec_id == CODEC_ID_ADPCM_G726) { // - blkalign = 1; } else if (enc->block_align != 0) { /* specified by the codec */ blkalign = enc->block_align; } else - blkalign = enc->channels*bps >> 3; + blkalign = bps * enc->channels / av_gcd(8, bps); if (enc->codec_id == CODEC_ID_PCM_U8 || enc->codec_id == CODEC_ID_PCM_S24LE || enc->codec_id == CODEC_ID_PCM_S32LE || @@ -430,8 +469,6 @@ riff_extradata_start= enc->extradata; riff_extradata= enc->extradata + enc->extradata_size; hdrsize += enc->extradata_size; - } else if (!waveformatextensible){ - hdrsize -= 2; } if(waveformatextensible) { /* write WAVEFORMATEXTENSIBLE extensions */ hdrsize += 22; @@ -442,8 +479,8 @@ avio_wl32(pb, 0x00100000); avio_wl32(pb, 0xAA000080); avio_wl32(pb, 0x719B3800); - } else if(riff_extradata - riff_extradata_start) { - avio_wl16(pb, riff_extradata - riff_extradata_start); + } else { + avio_wl16(pb, riff_extradata - riff_extradata_start); /* cbSize */ } avio_write(pb, riff_extradata_start, riff_extradata - riff_extradata_start); if(hdrsize&1){ @@ -534,6 +571,9 @@ codec->channels = 0; codec->sample_rate = 0; } + /* override bits_per_coded_sample for G.726 */ + if (codec->codec_id == CODEC_ID_ADPCM_G726) + codec->bits_per_coded_sample = codec->bit_rate / codec->sample_rate; return 0; } @@ -598,3 +638,49 @@ *au_scale /= gcd; *au_rate /= gcd; } + +int ff_read_riff_info(AVFormatContext *s, int64_t size) +{ + int64_t start, end, cur; + AVIOContext *pb = s->pb; + + start = avio_tell(pb); + end = start + size; + + while ((cur = avio_tell(pb)) >= 0 && cur <= end - 8 /* = tag + size */) { + uint32_t chunk_code; + int64_t chunk_size; + char key[5] = {0}; + char *value; + + chunk_code = avio_rl32(pb); + chunk_size = avio_rl32(pb); + if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) { + av_log(s, AV_LOG_ERROR, "too big INFO subchunk\n"); + return AVERROR_INVALIDDATA; + } + + chunk_size += (chunk_size & 1); + + value = av_malloc(chunk_size + 1); + if (!value) { + av_log(s, AV_LOG_ERROR, "out of memory, unable to read INFO tag\n"); + return AVERROR(ENOMEM); + } + + AV_WL32(key, chunk_code); + + if (avio_read(pb, value, chunk_size) != chunk_size) { + av_freep(key); + av_freep(value); + av_log(s, AV_LOG_ERROR, "premature end of file while reading INFO tag\n"); + return AVERROR_INVALIDDATA; + } + + value[chunk_size] = 0; + + av_dict_set(&s->metadata, key, value, AV_DICT_DONT_STRDUP_VAL); + } + + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/riff.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/riff.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/riff.h 2011-04-15 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/riff.h 2012-01-11 00:34:30.000000000 +0000 @@ -31,6 +31,10 @@ #include "libavcodec/avcodec.h" #include "avio.h" #include "internal.h" +#include "metadata.h" + +extern const AVMetadataConv ff_riff_info_conv[]; +extern const char ff_riff_tags[][5]; int64_t ff_start_tag(AVIOContext *pb, const char *tag); void ff_end_tag(AVIOContext *pb, int64_t start); @@ -54,4 +58,6 @@ enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag); void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale); +int ff_read_riff_info(AVFormatContext *s, int64_t size); + #endif /* AVFORMAT_RIFF_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rl2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rl2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rl2.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rl2.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,8 +23,7 @@ * RL2 file demuxer * @file * @author Sascha Sommer (saschasommer@freenet.de) - * For more information regarding the RL2 file format, visit: - * http://wiki.multimedia.cx/index.php?title=RL2 + * @see http://wiki.multimedia.cx/index.php?title=RL2 * * extradata: * 2 byte le initial drawing offset within 320x200 viewport @@ -34,7 +33,9 @@ */ #include "libavutil/intreadwrite.h" +#include "libavutil/mathematics.h" #include "avformat.h" +#include "internal.h" #define EXTRADATA1_SIZE (6 + 256 * 3) ///< video base, clr, palette @@ -110,7 +111,7 @@ def_sound_size = avio_rl16(pb); /** setup video stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if(!st) return AVERROR(ENOMEM); @@ -140,7 +141,7 @@ pts_num = def_sound_size; pts_den = rate; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -153,10 +154,10 @@ st->codec->bits_per_coded_sample; st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample / 8; - av_set_pts_info(st,32,1,rate); + avpriv_set_pts_info(st,32,1,rate); } - av_set_pts_info(s->streams[0], 32, pts_num, pts_den); + avpriv_set_pts_info(s->streams[0], 32, pts_num, pts_den); chunk_size = av_malloc(frame_count * sizeof(uint32_t)); audio_size = av_malloc(frame_count * sizeof(uint32_t)); @@ -286,13 +287,12 @@ } AVInputFormat ff_rl2_demuxer = { - "rl2", - NULL_IF_CONFIG_SMALL("RL2 format"), - sizeof(Rl2DemuxContext), - rl2_probe, - rl2_read_header, - rl2_read_packet, - NULL, - rl2_read_seek, + .name = "rl2", + .long_name = NULL_IF_CONFIG_SMALL("RL2 format"), + .priv_data_size = sizeof(Rl2DemuxContext), + .read_probe = rl2_probe, + .read_header = rl2_read_header, + .read_packet = rl2_read_packet, + .read_seek = rl2_read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rmdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rmdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rmdec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rmdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,9 +23,17 @@ #include "libavutil/intreadwrite.h" #include "libavutil/dict.h" #include "avformat.h" +#include "internal.h" #include "riff.h" #include "rm.h" +#define DEINT_ID_GENR MKTAG('g', 'e', 'n', 'r') ///< interleaving for Cooker/Atrac +#define DEINT_ID_INT0 MKTAG('I', 'n', 't', '0') ///< no interleaving needed +#define DEINT_ID_INT4 MKTAG('I', 'n', 't', '4') ///< interleaving for 28.8 +#define DEINT_ID_SIPR MKTAG('s', 'i', 'p', 'r') ///< interleaving for Sipro +#define DEINT_ID_VBRF MKTAG('v', 'b', 'r', 'f') ///< VBR case for AAC +#define DEINT_ID_VBRS MKTAG('v', 'b', 'r', 's') ///< VBR case for AAC + struct RMStream { AVPacket pkt; ///< place to store merged video frame / reordered audio data int videobufsize; ///< current assembled frame size @@ -39,6 +47,7 @@ int sub_packet_size, sub_packet_h, coded_framesize; ///< Descrambling parameters from container int audio_framesize; /// Audio frame size from container int sub_packet_lengths[16]; /// Length of each subpacket + int32_t deint_id; ///< deinterleaver used in audio stream }; typedef struct { @@ -147,6 +156,7 @@ st->codec->channels = 1; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_RA_144; + ast->deint_id = DEINT_ID_INT0; } else { int flavor, sub_packet_h, coded_framesize, sub_packet_size; int codecdata_length; @@ -172,17 +182,19 @@ avio_rb32(pb); st->codec->channels = avio_rb16(pb); if (version == 5) { - avio_rb32(pb); + ast->deint_id = avio_rl32(pb); avio_read(pb, buf, 4); buf[4] = 0; } else { get_str8(pb, buf, sizeof(buf)); /* desc */ + ast->deint_id = AV_RL32(buf); get_str8(pb, buf, sizeof(buf)); /* desc */ } st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_tag = AV_RL32(buf); st->codec->codec_id = ff_codec_get_id(ff_rm_codec_tags, st->codec->codec_tag); + switch (st->codec->codec_id) { case CODEC_ID_AC3: st->need_parsing = AVSTREAM_PARSE_FULL; @@ -191,13 +203,6 @@ st->codec->extradata_size= 0; ast->audio_framesize = st->codec->block_align; st->codec->block_align = coded_framesize; - - if(ast->audio_framesize >= UINT_MAX / sub_packet_h){ - av_log(s, AV_LOG_ERROR, "ast->audio_framesize * sub_packet_h too large\n"); - return -1; - } - - av_new_packet(&ast->pkt, ast->audio_framesize * sub_packet_h); break; case CODEC_ID_COOK: case CODEC_ID_ATRAC3: @@ -228,13 +233,6 @@ } if ((ret = rm_read_extradata(pb, st->codec, codecdata_length)) < 0) return ret; - - if(ast->audio_framesize >= UINT_MAX / sub_packet_h){ - av_log(s, AV_LOG_ERROR, "rm->audio_framesize * sub_packet_h too large\n"); - return -1; - } - - av_new_packet(&ast->pkt, ast->audio_framesize * sub_packet_h); break; case CODEC_ID_AAC: avio_rb16(pb); avio_r8(pb); @@ -254,6 +252,37 @@ default: av_strlcpy(st->codec->codec_name, buf, sizeof(st->codec->codec_name)); } + if (ast->deint_id == DEINT_ID_INT4 || + ast->deint_id == DEINT_ID_GENR || + ast->deint_id == DEINT_ID_SIPR) { + if (st->codec->block_align <= 0 || + ast->audio_framesize * sub_packet_h > (unsigned)INT_MAX || + ast->audio_framesize * sub_packet_h < st->codec->block_align) + return AVERROR_INVALIDDATA; + if (av_new_packet(&ast->pkt, ast->audio_framesize * sub_packet_h) < 0) + return AVERROR(ENOMEM); + } + switch (ast->deint_id) { + case DEINT_ID_INT4: + if (ast->coded_framesize > ast->audio_framesize || + ast->coded_framesize * sub_packet_h > (2 + (sub_packet_h & 1)) * ast->audio_framesize) + return AVERROR_INVALIDDATA; + break; + case DEINT_ID_GENR: + if (ast->sub_packet_size <= 0 || + ast->sub_packet_size > ast->audio_framesize) + return AVERROR_INVALIDDATA; + break; + case DEINT_ID_SIPR: + case DEINT_ID_INT0: + case DEINT_ID_VBRS: + case DEINT_ID_VBRF: + break; + default: + av_log(NULL,0,"Unknown interleaver %X\n", ast->deint_id); + return AVERROR_INVALIDDATA; + } + if (read_all) { avio_r8(pb); avio_r8(pb); @@ -273,7 +302,7 @@ int64_t codec_pos; int ret; - av_set_pts_info(st, 64, 1, 1000); + avpriv_set_pts_info(st, 64, 1, 1000); codec_pos = avio_tell(pb); v = avio_rb32(pb); if (v == MKTAG(0xfd, 'a', 'r', '.')) { @@ -293,30 +322,20 @@ // av_log(s, AV_LOG_DEBUG, "%X %X\n", st->codec->codec_tag, MKTAG('R', 'V', '2', '0')); if (st->codec->codec_id == CODEC_ID_NONE) goto fail1; - st->codec->width = avio_rb16(pb); + st->codec->width = avio_rb16(pb); st->codec->height = avio_rb16(pb); - st->codec->time_base.num= 1; - fps= avio_rb16(pb); + avio_skip(pb, 2); // looks like bits per sample + avio_skip(pb, 4); // always zero? st->codec->codec_type = AVMEDIA_TYPE_VIDEO; - avio_rb32(pb); - avio_skip(pb, 2); - avio_rb16(pb); + st->need_parsing = AVSTREAM_PARSE_TIMESTAMPS; + fps = avio_rb32(pb); if ((ret = rm_read_extradata(pb, st->codec, codec_data_size - (avio_tell(pb) - codec_pos))) < 0) return ret; -// av_log(s, AV_LOG_DEBUG, "fps= %d fps2= %d\n", fps, fps2); - st->codec->time_base.den = fps * st->codec->time_base.num; - //XXX: do we really need that? - switch(st->codec->extradata[4]>>4){ - case 1: st->codec->codec_id = CODEC_ID_RV10; break; - case 2: st->codec->codec_id = CODEC_ID_RV20; break; - case 3: st->codec->codec_id = CODEC_ID_RV30; break; - case 4: st->codec->codec_id = CODEC_ID_RV40; break; - default: - av_log(st->codec, AV_LOG_ERROR, "extra:%02X %02X %02X %02X %02X\n", st->codec->extradata[0], st->codec->extradata[1], st->codec->extradata[2], st->codec->extradata[3], st->codec->extradata[4]); - goto fail1; - } + av_reduce(&st->r_frame_rate.den, &st->r_frame_rate.num, + 0x10000, fps, (1 << 30) - 1); + st->avg_frame_rate = st->r_frame_rate; } skip: @@ -371,13 +390,13 @@ return 0; } -static int rm_read_header_old(AVFormatContext *s, AVFormatParameters *ap) +static int rm_read_header_old(AVFormatContext *s) { RMDemuxContext *rm = s->priv_data; AVStream *st; rm->old_format = 1; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return -1; st->priv_data = ff_rm_alloc_rmstream(); @@ -399,7 +418,7 @@ tag = avio_rl32(pb); if (tag == MKTAG('.', 'r', 'a', 0xfd)) { /* very old .ra format */ - return rm_read_header_old(s, ap); + return rm_read_header_old(s); } else if (tag != MKTAG('.', 'R', 'M', 'F')) { return AVERROR(EIO); } @@ -443,7 +462,7 @@ rm_read_metadata(s, 1); break; case MKTAG('M', 'D', 'P', 'R'): - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->id = avio_rb16(pb); @@ -578,7 +597,8 @@ static int rm_assemble_video_frame(AVFormatContext *s, AVIOContext *pb, RMDemuxContext *rm, RMStream *vst, - AVPacket *pkt, int len, int *pseq) + AVPacket *pkt, int len, int *pseq, + int64_t *timestamp) { int hdr, seq, pic_num, len2, pos; int type; @@ -598,8 +618,10 @@ return -1; rm->remaining_len = len; if(type&1){ // frame, not slice - if(type == 3) // frame as a part of packet + if(type == 3){ // frame as a part of packet len= len2; + *timestamp = pos; + } if(rm->remaining_len < len) return -1; rm->remaining_len -= len; @@ -639,7 +661,7 @@ vst->videobufpos += len; rm->remaining_len-= len; - if(type == 2 || (vst->videobufpos) == vst->videobufsize){ + if (type == 2 || vst->videobufpos == vst->videobufsize) { vst->pkt.data[0] = vst->cur_slice-1; *pkt= vst->pkt; vst->pkt.data= NULL; @@ -707,13 +729,12 @@ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { rm->current_stream= st->id; - if(rm_assemble_video_frame(s, pb, rm, ast, pkt, len, seq)) + if(rm_assemble_video_frame(s, pb, rm, ast, pkt, len, seq, ×tamp)) return -1; //got partial frame } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { - if ((st->codec->codec_id == CODEC_ID_RA_288) || - (st->codec->codec_id == CODEC_ID_COOK) || - (st->codec->codec_id == CODEC_ID_ATRAC3) || - (st->codec->codec_id == CODEC_ID_SIPR)) { + if ((ast->deint_id == DEINT_ID_GENR) || + (ast->deint_id == DEINT_ID_INT4) || + (ast->deint_id == DEINT_ID_SIPR)) { int x; int sps = ast->sub_packet_size; int cfs = ast->coded_framesize; @@ -726,30 +747,30 @@ if (!y) ast->audiotimestamp = timestamp; - switch(st->codec->codec_id) { - case CODEC_ID_RA_288: + switch (ast->deint_id) { + case DEINT_ID_INT4: for (x = 0; x < h/2; x++) avio_read(pb, ast->pkt.data+x*2*w+y*cfs, cfs); break; - case CODEC_ID_ATRAC3: - case CODEC_ID_COOK: + case DEINT_ID_GENR: for (x = 0; x < w/sps; x++) avio_read(pb, ast->pkt.data+sps*(h*x+((h+1)/2)*(y&1)+(y>>1)), sps); break; - case CODEC_ID_SIPR: + case DEINT_ID_SIPR: avio_read(pb, ast->pkt.data + y * w, w); break; } if (++(ast->sub_packet_cnt) < h) return -1; - if (st->codec->codec_id == CODEC_ID_SIPR) + if (ast->deint_id == DEINT_ID_SIPR) ff_rm_reorder_sipr_data(ast->pkt.data, h, w); ast->sub_packet_cnt = 0; rm->audio_stream_num = st->index; rm->audio_pkt_cnt = h * w / st->codec->block_align; - } else if (st->codec->codec_id == CODEC_ID_AAC) { + } else if ((ast->deint_id == DEINT_ID_VBRF) || + (ast->deint_id == DEINT_ID_VBRS)) { int x; rm->audio_stream_num = st->index; ast->sub_packet_cnt = (avio_rb16(pb) & 0xf0) >> 4; @@ -782,7 +803,7 @@ } #endif - pkt->pts= timestamp; + pkt->pts = timestamp; if (flags & 2) pkt->flags |= AV_PKT_FLAG_KEY; @@ -797,7 +818,8 @@ assert (rm->audio_pkt_cnt > 0); - if (st->codec->codec_id == CODEC_ID_AAC) + if (ast->deint_id == DEINT_ID_VBRF || + ast->deint_id == DEINT_ID_VBRS) av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]); else { av_new_packet(pkt, st->codec->block_align); @@ -935,23 +957,20 @@ } AVInputFormat ff_rm_demuxer = { - "rm", - NULL_IF_CONFIG_SMALL("RealMedia format"), - sizeof(RMDemuxContext), - rm_probe, - rm_read_header, - rm_read_packet, - rm_read_close, - NULL, - rm_read_dts, + .name = "rm", + .long_name = NULL_IF_CONFIG_SMALL("RealMedia format"), + .priv_data_size = sizeof(RMDemuxContext), + .read_probe = rm_probe, + .read_header = rm_read_header, + .read_packet = rm_read_packet, + .read_close = rm_read_close, + .read_timestamp = rm_read_dts, }; AVInputFormat ff_rdt_demuxer = { - "rdt", - NULL_IF_CONFIG_SMALL("RDT demuxer"), - sizeof(RMDemuxContext), - NULL, - NULL, - NULL, - rm_read_close, + .name = "rdt", + .long_name = NULL_IF_CONFIG_SMALL("RDT demuxer"), + .priv_data_size = sizeof(RMDemuxContext), + .read_close = rm_read_close, + .flags = AVFMT_NOFILE, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rmenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rmenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rmenc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rmenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -355,7 +355,7 @@ int i; /* XXX: suppress this malloc */ - buf1= (uint8_t*) av_malloc( size * sizeof(uint8_t) ); + buf1 = av_malloc(size * sizeof(uint8_t)); write_packet_header(s, stream, size, !!(flags & AV_PKT_FLAG_KEY)); @@ -461,15 +461,15 @@ AVOutputFormat ff_rm_muxer = { - "rm", - NULL_IF_CONFIG_SMALL("RealMedia format"), - "application/vnd.rn-realmedia", - "rm,ra", - sizeof(RMMuxContext), - CODEC_ID_AC3, - CODEC_ID_RV10, - rm_write_header, - rm_write_packet, - rm_write_trailer, + .name = "rm", + .long_name = NULL_IF_CONFIG_SMALL("RealMedia format"), + .mime_type = "application/vnd.rn-realmedia", + .extensions = "rm,ra", + .priv_data_size = sizeof(RMMuxContext), + .audio_codec = CODEC_ID_AC3, + .video_codec = CODEC_ID_RV10, + .write_header = rm_write_header, + .write_packet = rm_write_packet, + .write_trailer = rm_write_trailer, .codec_tag= (const AVCodecTag* const []){ff_rm_codec_tags, 0}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rpl.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rpl.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rpl.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rpl.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,7 @@ #include "libavutil/avstring.h" #include "libavutil/dict.h" #include "avformat.h" +#include "internal.h" #include #define RPL_SIGNATURE "ARMovie\x0A" @@ -139,7 +140,7 @@ av_dict_set(&s->metadata, "author" , line, 0); // video headers - vst = av_new_stream(s, 0); + vst = avformat_new_stream(s, NULL); if (!vst) return AVERROR(ENOMEM); vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; @@ -149,7 +150,7 @@ vst->codec->bits_per_coded_sample = read_line_and_int(pb, &error); // video bits per sample error |= read_line(pb, line, sizeof(line)); // video frames per second fps = read_fps(line, &error); - av_set_pts_info(vst, 32, fps.den, fps.num); + avpriv_set_pts_info(vst, 32, fps.den, fps.num); // Figure out the video codec switch (vst->codec->codec_tag) { @@ -181,7 +182,7 @@ // samples, though. This code will ignore additional tracks. audio_format = read_line_and_int(pb, &error); // audio format ID if (audio_format) { - ast = av_new_stream(s, 0); + ast = avformat_new_stream(s, NULL); if (!ast) return AVERROR(ENOMEM); ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -226,7 +227,7 @@ "RPL audio format %i not supported yet!\n", audio_format); } - av_set_pts_info(ast, 32, 1, ast->codec->bit_rate); + avpriv_set_pts_info(ast, 32, 1, ast->codec->bit_rate); } else { for (i = 0; i < 3; i++) error |= read_line(pb, line, sizeof(line)); @@ -351,10 +352,10 @@ } AVInputFormat ff_rpl_demuxer = { - "rpl", - NULL_IF_CONFIG_SMALL("RPL/ARMovie format"), - sizeof(RPLContext), - rpl_probe, - rpl_read_header, - rpl_read_packet, + .name = "rpl", + .long_name = NULL_IF_CONFIG_SMALL("RPL/ARMovie format"), + .priv_data_size = sizeof(RPLContext), + .read_probe = rpl_probe, + .read_header = rpl_read_header, + .read_packet = rpl_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rsodec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rsodec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rsodec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rsodec.c 2012-01-11 00:34:30.000000000 +0000 @@ -54,7 +54,7 @@ } /* now we are ready: build format streams */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -65,7 +65,7 @@ st->codec->channels = 1; st->codec->sample_rate = rate; - av_set_pts_info(st, 64, 1, rate); + avpriv_set_pts_info(st, 64, 1, rate); return 0; } @@ -92,11 +92,8 @@ .name = "rso", .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO format"), .extensions = "rso", - .priv_data_size = 0, - .read_probe = NULL, /* no magic value in this format */ .read_header = rso_read_header, .read_packet = rso_read_packet, - .read_close = NULL, .read_seek = pcm_read_seek, .codec_tag = (const AVCodecTag* const []){ff_codec_rso_tags, 0}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rsoenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rsoenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rsoenc.c 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rsoenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -104,7 +104,6 @@ .name = "rso", .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO format"), .extensions = "rso", - .priv_data_size = 0, .audio_codec = CODEC_ID_PCM_U8, .video_codec = CODEC_ID_NONE, .write_header = rso_write_header, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rso.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rso.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rso.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rso.h 2012-01-11 00:34:30.000000000 +0000 @@ -26,7 +26,7 @@ #define RSO_HEADER_SIZE 8 -/* The ffmpeg codecs we support, and the IDs they have in the file */ +/* The libavcodec codecs we support, and the IDs they have in the file */ extern const AVCodecTag ff_codec_rso_tags[]; #endif /* AVFORMAT_RSO_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtmppkt.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtmppkt.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtmppkt.c 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtmppkt.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ #include "libavcodec/bytestream.h" #include "libavutil/avstring.h" +#include "libavutil/intfloat.h" #include "avformat.h" #include "rtmppkt.h" @@ -36,7 +37,7 @@ void ff_amf_write_number(uint8_t **dst, double val) { bytestream_put_byte(dst, AMF_DATA_TYPE_NUMBER); - bytestream_put_be64(dst, av_dbl2int(val)); + bytestream_put_be64(dst, av_double2int(val)); } void ff_amf_write_string(uint8_t **dst, const char *str) @@ -317,7 +318,7 @@ if (size == namelen && !memcmp(data-size, name, namelen)) { switch (*data++) { case AMF_DATA_TYPE_NUMBER: - snprintf(dst, dst_size, "%g", av_int2dbl(AV_RB64(data))); + snprintf(dst, dst_size, "%g", av_int2double(AV_RB64(data))); break; case AMF_DATA_TYPE_BOOL: snprintf(dst, dst_size, "%s", *data ? "true" : "false"); @@ -369,7 +370,7 @@ return; switch (*data++) { case AMF_DATA_TYPE_NUMBER: - av_log(ctx, AV_LOG_DEBUG, " number %g\n", av_int2dbl(AV_RB64(data))); + av_log(ctx, AV_LOG_DEBUG, " number %g\n", av_int2double(AV_RB64(data))); return; case AMF_DATA_TYPE_BOOL: av_log(ctx, AV_LOG_DEBUG, " bool %d\n", *data); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtmppkt.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtmppkt.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtmppkt.h 2011-04-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtmppkt.h 2012-01-11 00:34:30.000000000 +0000 @@ -138,7 +138,7 @@ void ff_rtmp_packet_dump(void *ctx, RTMPPacket *p); /** - * @defgroup amffuncs functions used to work with AMF format (which is also used in .flv) + * @name Functions used to work with the AMF format (which is also used in .flv) * @see amf_* funcs in libavformat/flvdec.c * @{ */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtmpproto.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtmpproto.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtmpproto.c 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtmpproto.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,7 @@ #include "libavcodec/bytestream.h" #include "libavutil/avstring.h" +#include "libavutil/intfloat.h" #include "libavutil/lfg.h" #include "libavutil/sha.h" #include "avformat.h" @@ -70,6 +71,11 @@ uint32_t client_report_size; ///< number of bytes after which client should report to server uint32_t bytes_read; ///< number of bytes read from server uint32_t last_bytes_read; ///< number of bytes read last reported to server + int skip_bytes; ///< number of bytes to skip from the input FLV stream in the next write call + uint8_t flv_header[11]; ///< partial incoming flv packet header + int flv_header_bytes; ///< number of initialized bytes in flv_header + int nb_invokes; ///< keeps track of invoke messages + int create_stream_invoke; ///< invoke id for the create stream command } RTMPContext; #define PLAYER_KEY_OPEN_PART_LEN 30 ///< length of partial key used for first client digest signing @@ -110,7 +116,7 @@ ff_url_join(tcurl, sizeof(tcurl), proto, NULL, host, port, "/%s", rt->app); ff_amf_write_string(&p, "connect"); - ff_amf_write_number(&p, 1.0); + ff_amf_write_number(&p, ++rt->nb_invokes); ff_amf_write_object_start(&p); ff_amf_write_field_name(&p, "app"); ff_amf_write_string(&p, rt->app); @@ -162,7 +168,7 @@ av_log(s, AV_LOG_DEBUG, "Releasing stream...\n"); p = pkt.data; ff_amf_write_string(&p, "releaseStream"); - ff_amf_write_number(&p, 2.0); + ff_amf_write_number(&p, ++rt->nb_invokes); ff_amf_write_null(&p); ff_amf_write_string(&p, rt->playpath); @@ -185,7 +191,7 @@ av_log(s, AV_LOG_DEBUG, "FCPublish stream...\n"); p = pkt.data; ff_amf_write_string(&p, "FCPublish"); - ff_amf_write_number(&p, 3.0); + ff_amf_write_number(&p, ++rt->nb_invokes); ff_amf_write_null(&p); ff_amf_write_string(&p, rt->playpath); @@ -208,7 +214,7 @@ av_log(s, AV_LOG_DEBUG, "UnPublishing stream...\n"); p = pkt.data; ff_amf_write_string(&p, "FCUnpublish"); - ff_amf_write_number(&p, 5.0); + ff_amf_write_number(&p, ++rt->nb_invokes); ff_amf_write_null(&p); ff_amf_write_string(&p, rt->playpath); @@ -230,8 +236,9 @@ p = pkt.data; ff_amf_write_string(&p, "createStream"); - ff_amf_write_number(&p, rt->is_input ? 3.0 : 4.0); + ff_amf_write_number(&p, ++rt->nb_invokes); ff_amf_write_null(&p); + rt->create_stream_invoke = rt->nb_invokes; ff_rtmp_packet_write(rt->stream, &pkt, rt->chunk_size, rt->prev_pkt[1]); ff_rtmp_packet_destroy(&pkt); @@ -252,7 +259,7 @@ p = pkt.data; ff_amf_write_string(&p, "deleteStream"); - ff_amf_write_number(&p, 0.0); + ff_amf_write_number(&p, ++rt->nb_invokes); ff_amf_write_null(&p); ff_amf_write_number(&p, rt->main_channel_id); @@ -276,7 +283,7 @@ p = pkt.data; ff_amf_write_string(&p, "play"); - ff_amf_write_number(&p, 0.0); + ff_amf_write_number(&p, ++rt->nb_invokes); ff_amf_write_null(&p); ff_amf_write_string(&p, rt->playpath); @@ -310,7 +317,7 @@ p = pkt.data; ff_amf_write_string(&p, "publish"); - ff_amf_write_number(&p, 0.0); + ff_amf_write_number(&p, ++rt->nb_invokes); ff_amf_write_null(&p); ff_amf_write_string(&p, rt->playpath); ff_amf_write_string(&p, "live"); @@ -608,8 +615,8 @@ /* hack for Wowza Media Server, it does not send result for * releaseStream and FCPublish calls */ if (!pkt->data[10]) { - int pkt_id = (int) av_int2dbl(AV_RB64(pkt->data + 11)); - if (pkt_id == 4) + int pkt_id = av_int2double(AV_RB64(pkt->data + 11)); + if (pkt_id == rt->create_stream_invoke) rt->state = STATE_CONNECTING; } if (rt->state != STATE_CONNECTING) @@ -619,7 +626,7 @@ if (pkt->data[10] || pkt->data[19] != 5 || pkt->data[20]) { av_log(s, AV_LOG_WARNING, "Unexpected reply on connect()\n"); } else { - rt->main_channel_id = (int) av_int2dbl(AV_RB64(pkt->data + 21)); + rt->main_channel_id = av_int2double(AV_RB64(pkt->data + 21)); } if (rt->is_input) { gen_play(s, rt); @@ -761,7 +768,6 @@ } ff_rtmp_packet_destroy(&rpkt); } - return 0; } static int rtmp_close(URLContext *h) @@ -780,7 +786,6 @@ av_freep(&rt->flv_data); ffurl_close(rt->stream); - av_free(rt); return 0; } @@ -795,16 +800,12 @@ */ static int rtmp_open(URLContext *s, const char *uri, int flags) { - RTMPContext *rt; + RTMPContext *rt = s->priv_data; char proto[8], hostname[256], path[1024], *fname; uint8_t buf[2048]; int port; int ret; - rt = av_mallocz(sizeof(RTMPContext)); - if (!rt) - return AVERROR(ENOMEM); - s->priv_data = rt; rt->is_input = !(flags & AVIO_FLAG_WRITE); av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), &port, @@ -814,14 +815,15 @@ port = RTMP_DEFAULT_PORT; ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, NULL); - if (ffurl_open(&rt->stream, buf, AVIO_FLAG_READ_WRITE) < 0) { + if (ffurl_open(&rt->stream, buf, AVIO_FLAG_READ_WRITE, + &s->interrupt_callback, NULL) < 0) { av_log(s , AV_LOG_ERROR, "Cannot open connection %s\n", buf); goto fail; } rt->state = STATE_START; if (rtmp_handshake(s, rt)) - return -1; + goto fail; rt->chunk_size = 128; rt->state = STATE_HANDSHAKED; @@ -879,6 +881,7 @@ rt->flv_size = 0; rt->flv_data = NULL; rt->flv_off = 0; + rt->skip_bytes = 13; } s->max_packet_size = rt->stream->max_packet_size; @@ -925,25 +928,29 @@ uint32_t ts; const uint8_t *buf_temp = buf; - if (size < 11) { - av_log(s, AV_LOG_DEBUG, "FLV packet too small %d\n", size); - return 0; - } - do { - if (!rt->flv_off) { - //skip flv header - if (buf_temp[0] == 'F' && buf_temp[1] == 'L' && buf_temp[2] == 'V') { - buf_temp += 9 + 4; - size_temp -= 9 + 4; - } + if (rt->skip_bytes) { + int skip = FFMIN(rt->skip_bytes, size_temp); + buf_temp += skip; + size_temp -= skip; + rt->skip_bytes -= skip; + continue; + } + + if (rt->flv_header_bytes < 11) { + const uint8_t *header = rt->flv_header; + int copy = FFMIN(11 - rt->flv_header_bytes, size_temp); + bytestream_get_buffer(&buf_temp, rt->flv_header + rt->flv_header_bytes, copy); + rt->flv_header_bytes += copy; + size_temp -= copy; + if (rt->flv_header_bytes < 11) + break; - pkttype = bytestream_get_byte(&buf_temp); - pktsize = bytestream_get_be24(&buf_temp); - ts = bytestream_get_be24(&buf_temp); - ts |= bytestream_get_byte(&buf_temp) << 24; - bytestream_get_be24(&buf_temp); - size_temp -= 11; + pkttype = bytestream_get_byte(&header); + pktsize = bytestream_get_be24(&header); + ts = bytestream_get_be24(&header); + ts |= bytestream_get_byte(&header) << 24; + bytestream_get_be24(&header); rt->flv_size = pktsize; //force 12bytes header @@ -966,27 +973,32 @@ if (rt->flv_size - rt->flv_off > size_temp) { bytestream_get_buffer(&buf_temp, rt->flv_data + rt->flv_off, size_temp); rt->flv_off += size_temp; + size_temp = 0; } else { bytestream_get_buffer(&buf_temp, rt->flv_data + rt->flv_off, rt->flv_size - rt->flv_off); + size_temp -= rt->flv_size - rt->flv_off; rt->flv_off += rt->flv_size - rt->flv_off; } if (rt->flv_off == rt->flv_size) { - bytestream_get_be32(&buf_temp); + rt->skip_bytes = 4; ff_rtmp_packet_write(rt->stream, &rt->out_pkt, rt->chunk_size, rt->prev_pkt[1]); ff_rtmp_packet_destroy(&rt->out_pkt); rt->flv_size = 0; rt->flv_off = 0; + rt->flv_header_bytes = 0; } - } while (buf_temp - buf < size_temp); + } while (buf_temp - buf < size); return size; } URLProtocol ff_rtmp_protocol = { - .name = "rtmp", - .url_open = rtmp_open, - .url_read = rtmp_read, - .url_write = rtmp_write, - .url_close = rtmp_close, + .name = "rtmp", + .url_open = rtmp_open, + .url_read = rtmp_read, + .url_write = rtmp_write, + .url_close = rtmp_close, + .priv_data_size = sizeof(RTMPContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtp.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtp.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include "avformat.h" #include "rtp.h" @@ -89,21 +90,32 @@ return -1; } -int ff_rtp_get_payload_type(AVCodecContext *codec) +int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec) { - int i, payload_type; + int i; + AVOutputFormat *ofmt = fmt ? fmt->oformat : NULL; + + /* Was the payload type already specified for the RTP muxer? */ + if (ofmt && ofmt->priv_class) { + int64_t payload_type; + if (av_opt_get_int(fmt->priv_data, "payload_type", 0, &payload_type) >= 0 && + payload_type >= 0) + return (int)payload_type; + } - /* compute the payload type */ - for (payload_type = -1, i = 0; AVRtpPayloadTypes[i].pt >= 0; ++i) + /* static payload type */ + for (i = 0; AVRtpPayloadTypes[i].pt >= 0; ++i) if (AVRtpPayloadTypes[i].codec_id == codec->codec_id) { if (codec->codec_id == CODEC_ID_H263) continue; if (codec->codec_id == CODEC_ID_PCM_S16BE) if (codec->channels != AVRtpPayloadTypes[i].audio_channels) continue; - payload_type = AVRtpPayloadTypes[i].pt; + return AVRtpPayloadTypes[i].pt; } - return payload_type; + + /* dynamic payload type */ + return RTP_PT_PRIVATE + (codec->codec_type == AVMEDIA_TYPE_AUDIO); } const char *ff_rtp_enc_name(int payload_type) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_asf.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_asf.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_asf.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_asf.c 2012-01-11 00:34:30.000000000 +0000 @@ -33,6 +33,7 @@ #include "rtsp.h" #include "asf.h" #include "avio_internal.h" +#include "internal.h" /** * From MSDN 2.2.1.4, we learn that ASF data packets over RTP should not @@ -107,8 +108,7 @@ "Failed to fix invalid RTSP-MS/ASF min_pktsize\n"); init_packetizer(&pb, buf, len); if (rt->asf_ctx) { - av_close_input_file(rt->asf_ctx); - rt->asf_ctx = NULL; + avformat_close_input(&rt->asf_ctx); } if (!(rt->asf_ctx = avformat_alloc_context())) return AVERROR(ENOMEM); @@ -141,7 +141,7 @@ *rt->asf_ctx->streams[i]->codec; rt->asf_ctx->streams[i]->codec->extradata_size = 0; rt->asf_ctx->streams[i]->codec->extradata = NULL; - av_set_pts_info(s->streams[stream_index], 32, 1, 1000); + avpriv_set_pts_info(s->streams[stream_index], 32, 1, 1000); } } } @@ -233,8 +233,14 @@ int cur_len = start_off + len_off - off; int prev_len = out_len; + void *newmem; out_len += cur_len; - asf->buf = av_realloc(asf->buf, out_len); + if (FFMIN(cur_len, len - off) < 0) + return -1; + newmem = av_realloc(asf->buf, out_len); + if (!newmem) + return -1; + asf->buf = newmem; memcpy(asf->buf + prev_len, buf + off, FFMIN(cur_len, len - off)); avio_skip(pb, cur_len); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec.c 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,13 +19,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/mathematics.h" +#include "libavutil/avstring.h" #include "libavcodec/get_bits.h" #include "avformat.h" #include "mpegts.h" #include "url.h" #include -#include #include "network.h" #include "rtpdec.h" @@ -82,6 +83,11 @@ ff_register_dynamic_payload_handler(&ff_qt_rtp_vid_handler); ff_register_dynamic_payload_handler(&ff_quicktime_rtp_aud_handler); ff_register_dynamic_payload_handler(&ff_quicktime_rtp_vid_handler); + + ff_register_dynamic_payload_handler(&ff_g726_16_dynamic_handler); + ff_register_dynamic_payload_handler(&ff_g726_24_dynamic_handler); + ff_register_dynamic_payload_handler(&ff_g726_32_dynamic_handler); + ff_register_dynamic_payload_handler(&ff_g726_40_dynamic_handler); } RTPDynamicProtocolHandler *ff_rtp_handler_find_by_name(const char *name, @@ -90,7 +96,7 @@ RTPDynamicProtocolHandler *handler; for (handler = RTPFirstDynamicPayloadHandler; handler; handler = handler->next) - if (!strcasecmp(name, handler->enc_name) && + if (!av_strcasecmp(name, handler->enc_name) && codec_type == handler->codec_type) return handler; return NULL; @@ -111,14 +117,15 @@ static int rtcp_parse_packet(RTPDemuxContext *s, const unsigned char *buf, int len) { int payload_len; - while (len >= 2) { + while (len >= 4) { + payload_len = FFMIN(len, (AV_RB16(buf + 2) + 1) * 4); + switch (buf[1]) { case RTCP_SR: - if (len < 16) { + if (payload_len < 20) { av_log(NULL, AV_LOG_ERROR, "Invalid length for RTCP SR packet\n"); return AVERROR_INVALIDDATA; } - payload_len = (AV_RB16(buf + 2) + 1) * 4; s->last_rtcp_ntp_time = AV_RB64(buf + 8); s->last_rtcp_timestamp = AV_RB32(buf + 16); @@ -129,14 +136,13 @@ s->rtcp_ts_offset = s->last_rtcp_timestamp - s->base_timestamp; } - buf += payload_len; - len -= payload_len; break; case RTCP_BYE: return -RTCP_BYE; - default: - return -1; } + + buf += payload_len; + len -= payload_len; } return -1; } @@ -217,23 +223,7 @@ return 1; } -#if 0 -/** -* This function is currently unused; without a valid local ntp time, I don't see how we could calculate the -* difference between the arrival and sent timestamp. As a result, the jitter and transit statistics values -* never change. I left this in in case someone else can see a way. (rdm) -*/ -static void rtcp_update_jitter(RTPStatistics *s, uint32_t sent_timestamp, uint32_t arrival_timestamp) -{ - uint32_t transit= arrival_timestamp - sent_timestamp; - int d; - s->transit= transit; - d= FFABS(transit - s->transit); - s->jitter += d - ((s->jitter + 8)>>4); -} -#endif - -int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count) +int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, int count) { AVIOContext *pb; uint8_t *buf; @@ -330,7 +320,7 @@ return 0; } -void rtp_send_punch_packets(URLContext* rtp_handle) +void ff_rtp_send_punch_packets(URLContext* rtp_handle) { AVIOContext *pb; uint8_t *buf; @@ -374,7 +364,7 @@ * MPEG2TS streams to indicate that they should be demuxed inside the * rtp demux (otherwise CODEC_ID_MPEG2TS packets are returned) */ -RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, int queue_size) +RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, int queue_size) { RTPDemuxContext *s; @@ -422,8 +412,8 @@ } void -rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx, - RTPDynamicProtocolHandler *handler) +ff_rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx, + RTPDynamicProtocolHandler *handler) { s->dynamic_protocol_context = ctx; s->parse_packet = handler->parse_packet; @@ -436,7 +426,10 @@ { if (pkt->pts != AV_NOPTS_VALUE || pkt->dts != AV_NOPTS_VALUE) return; /* Timestamp already set by depacketizer */ - if (s->last_rtcp_ntp_time != AV_NOPTS_VALUE && timestamp != RTP_NOTS_VALUE) { + if (timestamp == RTP_NOTS_VALUE) + return; + + if (s->last_rtcp_ntp_time != AV_NOPTS_VALUE && s->ic->nb_streams > 1) { int64_t addend; int delta_timestamp; @@ -448,11 +441,16 @@ delta_timestamp; return; } - if (timestamp == RTP_NOTS_VALUE) - return; + if (!s->base_timestamp) s->base_timestamp = timestamp; - pkt->pts = s->range_start_offset + timestamp - s->base_timestamp; + /* assume that the difference is INT32_MIN < x < INT32_MAX, but allow the first timestamp to exceed INT32_MAX */ + if (!s->timestamp) + s->unwrapped_timestamp += timestamp; + else + s->unwrapped_timestamp += (int32_t)(timestamp - s->timestamp); + s->timestamp = timestamp; + pkt->pts = s->unwrapped_timestamp + s->range_start_offset - s->base_timestamp; } static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt, @@ -737,8 +735,8 @@ * @return 0 if a packet is returned, 1 if a packet is returned and more can follow * (use buf as NULL to read the next). -1 if no packet (error or no more packet). */ -int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, - uint8_t **bufptr, int len) +int ff_rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, + uint8_t **bufptr, int len) { int rv = rtp_parse_one_packet(s, pkt, bufptr, len); s->prev_ret = rv; @@ -747,7 +745,7 @@ return rv ? rv : has_next_packet(s); } -void rtp_parse_close(RTPDemuxContext *s) +void ff_rtp_parse_close(RTPDemuxContext *s) { ff_rtp_reset_packet_queue(s); if (!strcmp(ff_rtp_enc_name(s->payload_type), "MP2T")) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_formats.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_formats.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_formats.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_formats.h 2012-01-11 00:34:30.000000000 +0000 @@ -33,6 +33,10 @@ extern RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler; extern RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler; +extern RTPDynamicProtocolHandler ff_g726_16_dynamic_handler; +extern RTPDynamicProtocolHandler ff_g726_24_dynamic_handler; +extern RTPDynamicProtocolHandler ff_g726_32_dynamic_handler; +extern RTPDynamicProtocolHandler ff_g726_40_dynamic_handler; extern RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler; extern RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler; extern RTPDynamicProtocolHandler ff_h264_dynamic_handler; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_g726.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_g726.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_g726.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_g726.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2011 Miroslav Slugeň + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "avformat.h" +#include "rtpdec_formats.h" + +#define RTP_G726_HANDLER(bitrate) \ +static int g726_ ## bitrate ##_init(AVFormatContext *s, int st_index, PayloadContext *data) \ +{ \ + AVStream *stream = s->streams[st_index]; \ + AVCodecContext *codec = stream->codec; \ +\ + codec->bits_per_coded_sample = bitrate/8; \ + codec->bit_rate = codec->bits_per_coded_sample * codec->sample_rate; \ +\ + return 0; \ +} \ +\ +RTPDynamicProtocolHandler ff_g726_ ## bitrate ## _dynamic_handler = { \ + .enc_name = "G726-" #bitrate, \ + .codec_type = AVMEDIA_TYPE_AUDIO, \ + .codec_id = CODEC_ID_ADPCM_G726, \ + .init = g726_ ## bitrate ## _init, \ +} + +RTP_G726_HANDLER(16); +RTP_G726_HANDLER(24); +RTP_G726_HANDLER(32); +RTP_G726_HANDLER(40); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec.h 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec.h 2012-01-11 00:34:30.000000000 +0000 @@ -38,18 +38,18 @@ #define RTP_NOTS_VALUE ((uint32_t)-1) typedef struct RTPDemuxContext RTPDemuxContext; -RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, int queue_size); -void rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx, - RTPDynamicProtocolHandler *handler); -int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, - uint8_t **buf, int len); -void rtp_parse_close(RTPDemuxContext *s); +RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, int queue_size); +void ff_rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx, + RTPDynamicProtocolHandler *handler); +int ff_rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, + uint8_t **buf, int len); +void ff_rtp_parse_close(RTPDemuxContext *s); int64_t ff_rtp_queued_packet_time(RTPDemuxContext *s); void ff_rtp_reset_packet_queue(RTPDemuxContext *s); -int rtp_get_local_rtp_port(URLContext *h); -int rtp_get_local_rtcp_port(URLContext *h); +int ff_rtp_get_local_rtp_port(URLContext *h); +int ff_rtp_get_local_rtcp_port(URLContext *h); -int rtp_set_remote_url(URLContext *h, const char *uri); +int ff_rtp_set_remote_url(URLContext *h, const char *uri); /** * Send a dummy packet on both port pairs to set up the connection @@ -62,19 +62,19 @@ * The same routine is used with RDT too, even if RDT doesn't use normal * RTP packets otherwise. */ -void rtp_send_punch_packets(URLContext* rtp_handle); +void ff_rtp_send_punch_packets(URLContext* rtp_handle); /** * some rtp servers assume client is dead if they don't hear from them... * so we send a Receiver Report to the provided ByteIO context * (we don't have access to the rtcp handle from here) */ -int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count); +int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, int count); /** * Get the file handle for the RTCP socket. */ -int rtp_get_rtcp_file_handle(URLContext *h); +int ff_rtp_get_rtcp_file_handle(URLContext *h); // these statistics are used for rtcp receiver reports... typedef struct { @@ -122,6 +122,7 @@ * require any custom depacketization code. */ // may be null + int (*init)(AVFormatContext *s, int st_index, PayloadContext *priv_data); ///< Initialize dynamic protocol handler, called after the full rtpmap line is parsed int (*parse_sdp_a_line) (AVFormatContext *s, int st_index, PayloadContext *priv_data, @@ -151,6 +152,7 @@ uint32_t timestamp; uint32_t base_timestamp; uint32_t cur_timestamp; + int64_t unwrapped_timestamp; int64_t range_start_offset; int max_payload_size; struct MpegTSContext *ts; /* only used for MP2T payloads */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_latm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_latm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_latm.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_latm.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,6 @@ #include "internal.h" #include "libavutil/avstring.h" #include "libavcodec/get_bits.h" -#include struct PayloadContext { AVIOContext *dyn_buf; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_mpeg4.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_mpeg4.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_mpeg4.c 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_mpeg4.c 2012-01-11 00:34:30.000000000 +0000 @@ -31,7 +31,6 @@ #include "internal.h" #include "libavutil/avstring.h" #include "libavcodec/get_bits.h" -#include /** Structure listing useful vars to parse RTP packet payload*/ struct PayloadContext @@ -206,7 +205,7 @@ if (codec->codec_id == CODEC_ID_AAC) { /* Looking for a known attribute */ for (i = 0; attr_names[i].str; ++i) { - if (!strcasecmp(attr, attr_names[i].str)) { + if (!av_strcasecmp(attr, attr_names[i].str)) { if (attr_names[i].type == ATTR_NAME_TYPE_INT) { *(int *)((char *)data+ attr_names[i].offset) = atoi(value); @@ -235,9 +234,6 @@ .codec_type = AVMEDIA_TYPE_VIDEO, .codec_id = CODEC_ID_MPEG4, .parse_sdp_a_line = parse_sdp_line, - .alloc = NULL, - .free = NULL, - .parse_packet = NULL }; RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler = { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_qdm2.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_qdm2.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_qdm2.c 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_qdm2.c 2012-01-11 00:34:30.000000000 +0000 @@ -52,8 +52,8 @@ }; /** - * Parses configuration (basically the codec-specific extradata) from - * a RTP config subpacket (starts with 0xff). + * Parse configuration (basically the codec-specific extradata) from + * an RTP config subpacket (starts with 0xff). * * Layout of the config subpacket (in bytes): * 1: 0xFF <- config ID @@ -128,7 +128,7 @@ } /** - * Parses a single subpacket. We store this subpacket in an intermediate + * Parse a single subpacket. We store this subpacket in an intermediate * buffer (position depends on the ID (byte[0]). When called, at least * 4 bytes are available for reading (see qdm2_parse_packet()). * @@ -179,7 +179,7 @@ } /** - * Adds a superblock header around a set of subpackets. + * Add a superblock header around a set of subpackets. * * @return <0 on error, else 0. */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_qt.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_qt.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_qt.c 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_qt.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,7 @@ */ #include "avformat.h" +#include "internal.h" #include "avio_internal.h" #include "rtp.h" #include "rtpdec.h" @@ -110,7 +111,7 @@ (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && tag != MKTAG('s','o','u','n'))) return AVERROR_INVALIDDATA; - av_set_pts_info(st, 32, 1, avio_rb32(&pb)); + avpriv_set_pts_info(st, 32, 1, avio_rb32(&pb)); if (pos + data_len > len) return AVERROR_INVALIDDATA; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_svq3.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_svq3.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_svq3.c 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_svq3.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,8 +22,8 @@ /** * @file * @brief RTP support for the SV3V (SVQ3) payload - * (http://wiki.multimedia.cx/index.php?title=Sorenson_Video_3#Packetization) * @author Ronald S. Bultje + * @see http://wiki.multimedia.cx/index.php?title=Sorenson_Video_3#Packetization */ #include diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_vp8.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_vp8.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpdec_vp8.c 2011-04-24 08:21:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpdec_vp8.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,7 +23,7 @@ * @file * @brief RTP support for the VP8 payload * @author Josh Allmann - * ( http://www.webmproject.org/code/specs/rtp/ ) + * @see http://www.webmproject.org/code/specs/rtp/ */ #include "libavcodec/bytestream.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpenc.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,7 @@ #include "avformat.h" #include "mpegts.h" #include "internal.h" +#include "libavutil/mathematics.h" #include "libavutil/random_seed.h" #include "libavutil/opt.h" @@ -31,6 +32,7 @@ static const AVOption options[] = { FF_RTP_FLAG_OPTS(RTPMuxContext, flags), + { "payload_type", "Specify RTP payload type", offsetof(RTPMuxContext, payload_type), AV_OPT_TYPE_INT, {.dbl = -1 }, -1, 127, AV_OPT_FLAG_ENCODING_PARAM }, { NULL }, }; @@ -70,6 +72,7 @@ case CODEC_ID_THEORA: case CODEC_ID_VP8: case CODEC_ID_ADPCM_G722: + case CODEC_ID_ADPCM_G726: return 1; default: return 0; @@ -91,10 +94,8 @@ return -1; } - s->payload_type = ff_rtp_get_payload_type(st->codec); if (s->payload_type < 0) - s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == AVMEDIA_TYPE_AUDIO); - + s->payload_type = ff_rtp_get_payload_type(s1, st->codec); s->base_timestamp = av_get_random_seed(); s->timestamp = s->base_timestamp; s->cur_timestamp = 0; @@ -121,7 +122,7 @@ if (st->codec->frame_size == 0) { av_log(s1, AV_LOG_ERROR, "Cannot respect max delay: frame size = 0\n"); } else { - s->max_frames_per_packet = av_rescale_rnd(s1->max_delay, st->codec->sample_rate, AV_TIME_BASE * st->codec->frame_size, AV_ROUND_DOWN); + s->max_frames_per_packet = av_rescale_rnd(s1->max_delay, st->codec->sample_rate, AV_TIME_BASE * (int64_t)st->codec->frame_size, AV_ROUND_DOWN); } } if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { @@ -130,7 +131,7 @@ } } - av_set_pts_info(st, 32, 1, 90000); + avpriv_set_pts_info(st, 32, 1, 90000); switch(st->codec->codec_id) { case CODEC_ID_MP2: case CODEC_ID_MP3: @@ -166,7 +167,7 @@ case CODEC_ID_ADPCM_G722: /* Due to a historical error, the clock rate for G722 in RTP is * 8000, even if the sample rate is 16000. See RFC 3551. */ - av_set_pts_info(st, 32, 1, 8000); + avpriv_set_pts_info(st, 32, 1, 8000); break; case CODEC_ID_AMR_NB: case CODEC_ID_AMR_WB: @@ -190,7 +191,7 @@ default: defaultcase: if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { - av_set_pts_info(st, 32, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate); } s->buf_ptr = s->buf; break; @@ -248,14 +249,16 @@ /* send an integer number of samples and compute time stamp and fill the rtp send buffer before sending. */ static void rtp_send_samples(AVFormatContext *s1, - const uint8_t *buf1, int size, int sample_size) + const uint8_t *buf1, int size, int sample_size_bits) { RTPMuxContext *s = s1->priv_data; int len, max_packet_size, n; + /* Calculate the number of bytes to get samples aligned on a byte border */ + int aligned_samples_size = sample_size_bits/av_gcd(sample_size_bits, 8); - max_packet_size = (s->max_payload_size / sample_size) * sample_size; - /* not needed, but who nows */ - if ((size % sample_size) != 0) + max_packet_size = (s->max_payload_size / aligned_samples_size) * aligned_samples_size; + /* Not needed, but who knows. Don't check if samples aren't an even number of bytes. */ + if ((sample_size_bits % 8) == 0 && ((8 * size) % sample_size_bits) != 0) av_abort(); n = 0; while (size > 0) { @@ -267,7 +270,7 @@ s->buf_ptr += len; buf1 += len; size -= len; - s->timestamp = s->cur_timestamp + n / sample_size; + s->timestamp = s->cur_timestamp + n * 8 / sample_size_bits; ff_rtp_send_data(s1, s->buf, s->buf_ptr - s->buf, 0); n += (s->buf_ptr - s->buf); } @@ -394,19 +397,24 @@ case CODEC_ID_PCM_ALAW: case CODEC_ID_PCM_U8: case CODEC_ID_PCM_S8: - rtp_send_samples(s1, pkt->data, size, 1 * st->codec->channels); + rtp_send_samples(s1, pkt->data, size, 8 * st->codec->channels); break; case CODEC_ID_PCM_U16BE: case CODEC_ID_PCM_U16LE: case CODEC_ID_PCM_S16BE: case CODEC_ID_PCM_S16LE: - rtp_send_samples(s1, pkt->data, size, 2 * st->codec->channels); + rtp_send_samples(s1, pkt->data, size, 16 * st->codec->channels); break; case CODEC_ID_ADPCM_G722: /* The actual sample size is half a byte per sample, but since the * stream clock rate is 8000 Hz while the sample rate is 16000 Hz, - * the correct parameter for send_samples is 1 byte per stream clock. */ - rtp_send_samples(s1, pkt->data, size, 1 * st->codec->channels); + * the correct parameter for send_samples_bits is 8 bits per stream + * clock. */ + rtp_send_samples(s1, pkt->data, size, 8 * st->codec->channels); + break; + case CODEC_ID_ADPCM_G726: + rtp_send_samples(s1, pkt->data, size, + st->codec->bits_per_coded_sample * st->codec->channels); break; case CODEC_ID_MP2: case CODEC_ID_MP3: @@ -461,15 +469,13 @@ } AVOutputFormat ff_rtp_muxer = { - "rtp", - NULL_IF_CONFIG_SMALL("RTP output format"), - NULL, - NULL, - sizeof(RTPMuxContext), - CODEC_ID_PCM_MULAW, - CODEC_ID_NONE, - rtp_write_header, - rtp_write_packet, - rtp_write_trailer, + .name = "rtp", + .long_name = NULL_IF_CONFIG_SMALL("RTP output format"), + .priv_data_size = sizeof(RTPMuxContext), + .audio_codec = CODEC_ID_PCM_MULAW, + .video_codec = CODEC_ID_MPEG4, + .write_header = rtp_write_header, + .write_packet = rtp_write_packet, + .write_trailer = rtp_write_trailer, .priv_class = &rtp_muxer_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpenc_chain.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpenc_chain.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpenc_chain.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpenc_chain.c 2012-01-11 00:34:30.000000000 +0000 @@ -31,6 +31,8 @@ AVFormatContext *rtpctx; int ret; AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL); + uint8_t *rtpflags; + AVDictionary *opts = NULL; if (!rtp_format) return NULL; @@ -41,21 +43,19 @@ return NULL; rtpctx->oformat = rtp_format; - if (!av_new_stream(rtpctx, 0)) { + if (!avformat_new_stream(rtpctx, NULL)) { av_free(rtpctx); return NULL; } + /* Pass the interrupt callback on */ + rtpctx->interrupt_callback = s->interrupt_callback; /* Copy the max delay setting; the rtp muxer reads this. */ rtpctx->max_delay = s->max_delay; /* Copy other stream parameters. */ rtpctx->streams[0]->sample_aspect_ratio = st->sample_aspect_ratio; - av_set_parameters(rtpctx, NULL); - /* Copy the rtpflags values straight through */ - if (s->oformat->priv_class && - av_find_opt(s->priv_data, "rtpflags", NULL, 0, 0)) - av_set_int(rtpctx->priv_data, "rtpflags", - av_get_int(s->priv_data, "rtpflags", NULL)); + if (av_opt_get(s, "rtpflags", AV_OPT_SEARCH_CHILDREN, &rtpflags) >= 0) + av_dict_set(&opts, "rtpflags", rtpflags, AV_DICT_DONT_STRDUP_VAL); /* Set the synchronized start time. */ rtpctx->start_time_realtime = s->start_time_realtime; @@ -66,7 +66,8 @@ ffio_fdopen(&rtpctx->pb, handle); } else ffio_open_dyn_packet_buf(&rtpctx->pb, packet_size); - ret = avformat_write_header(rtpctx, NULL); + ret = avformat_write_header(rtpctx, &opts); + av_dict_free(&opts); if (ret) { if (handle) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpenc.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpenc.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpenc.h 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpenc.h 2012-01-11 00:34:30.000000000 +0000 @@ -66,8 +66,8 @@ #define FF_RTP_FLAG_MP4A_LATM 1 #define FF_RTP_FLAG_OPTS(ctx, fieldname) \ - { "rtpflags", "RTP muxer flags", offsetof(ctx, fieldname), FF_OPT_TYPE_FLAGS, {.dbl = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \ - { "latm", "Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC", 0, FF_OPT_TYPE_CONST, {.dbl = FF_RTP_FLAG_MP4A_LATM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" } \ + { "rtpflags", "RTP muxer flags", offsetof(ctx, fieldname), AV_OPT_TYPE_FLAGS, {.dbl = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \ + { "latm", "Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC", 0, AV_OPT_TYPE_CONST, {.dbl = FF_RTP_FLAG_MP4A_LATM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" } \ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpenc_h264.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpenc_h264.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpenc_h264.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpenc_h264.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,6 +29,21 @@ #include "avc.h" #include "rtpenc.h" +static const uint8_t *avc_mp4_find_startcode(const uint8_t *start, const uint8_t *end, int nal_length_size) +{ + int res = 0; + + if (end - start < nal_length_size) + return NULL; + while (nal_length_size--) + res = (res << 8) | *start++; + + if (start + res > end || res < 0 || start + res < start) + return NULL; + + return start + res; +} + static void nal_send(AVFormatContext *s1, const uint8_t *buf, int size, int last) { RTPMuxContext *s = s1->priv_data; @@ -62,17 +77,27 @@ void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size) { - const uint8_t *r; + const uint8_t *r, *end = buf1 + size; RTPMuxContext *s = s1->priv_data; s->timestamp = s->cur_timestamp; - r = ff_avc_find_startcode(buf1, buf1 + size); - while (r < buf1 + size) { + if (s->nal_length_size) + r = avc_mp4_find_startcode(buf1, end, s->nal_length_size) ? buf1 : end; + else + r = ff_avc_find_startcode(buf1, end); + while (r < end) { const uint8_t *r1; - while(!*(r++)); - r1 = ff_avc_find_startcode(r, buf1 + size); - nal_send(s1, r, r1 - r, (r1 == buf1 + size)); + if (s->nal_length_size) { + r1 = avc_mp4_find_startcode(r, end, s->nal_length_size); + if (!r1) + r1 = end; + r += s->nal_length_size; + } else { + while (!*(r++)); + r1 = ff_avc_find_startcode(r, end); + } + nal_send(s1, r, r1 - r, r1 == end); r = r1; } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpenc_mpv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpenc_mpv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpenc_mpv.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpenc_mpv.c 2012-01-11 00:34:30.000000000 +0000 @@ -56,7 +56,7 @@ r1 = buf1; while (1) { start_code = -1; - r = ff_find_start_code(r1, end, &start_code); + r = avpriv_mpv_find_start_code(r1, end, &start_code); if((start_code & 0xFFFFFF00) == 0x100) { /* New start code found */ if (start_code == 0x100) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtp.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtp.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtp.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtp.h 2012-01-11 00:34:30.000000000 +0000 @@ -21,17 +21,17 @@ #ifndef AVFORMAT_RTP_H #define AVFORMAT_RTP_H +#include "libavformat/avformat.h" #include "libavcodec/avcodec.h" /** - * Return the payload type for a given codec. + * Return the payload type for a given codec used in the given format context. * + * @param fmt The context of the format * @param codec The context of the codec - * @return In case of unknown payload type or dynamic payload type, a - * negative value is returned; otherwise, the payload type (the 'PT' field - * in the RTP header) is returned. + * @return The payload type (the 'PT' field in the RTP header). */ -int ff_rtp_get_payload_type(AVCodecContext *codec); +int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec); /** * Initialize a codec context based on the payload type. @@ -72,7 +72,7 @@ #define RTP_VERSION 2 #define RTP_MAX_SDES 256 /**< maximum text length for SDES */ -/* RTCP paquets use 0.5 % of the bandwidth */ +/* RTCP packets use 0.5% of the bandwidth */ #define RTCP_TX_RATIO_NUM 5 #define RTCP_TX_RATIO_DEN 1000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpproto.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpproto.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtpproto.c 2011-05-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtpproto.c 2012-01-11 00:34:30.000000000 +0000 @@ -60,7 +60,7 @@ * @return zero if no error. */ -int rtp_set_remote_url(URLContext *h, const char *uri) +int ff_rtp_set_remote_url(URLContext *h, const char *uri) { RTPContext *s = h->priv_data; char hostname[256]; @@ -86,7 +86,7 @@ * "http://host:port/path?option1=val1&option2=val2... */ -static void url_add_option(char *buf, int buf_size, const char *fmt, ...) +static av_printf_format(3, 4) void url_add_option(char *buf, int buf_size, const char *fmt, ...) { char buf1[1024]; va_list ap; @@ -136,7 +136,7 @@ static int rtp_open(URLContext *h, const char *uri, int flags) { - RTPContext *s; + RTPContext *s = h->priv_data; int rtp_port, rtcp_port, ttl, connect, local_rtp_port, local_rtcp_port, max_packet_size; @@ -145,11 +145,6 @@ char path[1024]; const char *p; - s = av_mallocz(sizeof(RTPContext)); - if (!s) - return AVERROR(ENOMEM); - h->priv_data = s; - av_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &rtp_port, path, sizeof(path), uri); /* extract parameters */ @@ -188,7 +183,7 @@ build_udp_url(buf, sizeof(buf), hostname, rtp_port, local_rtp_port, ttl, max_packet_size, connect); - if (ffurl_open(&s->rtp_hd, buf, flags) < 0) + if (ffurl_open(&s->rtp_hd, buf, flags, &h->interrupt_callback, NULL) < 0) goto fail; if (local_rtp_port>=0 && local_rtcp_port<0) local_rtcp_port = ff_udp_get_local_port(s->rtp_hd) + 1; @@ -196,7 +191,7 @@ build_udp_url(buf, sizeof(buf), hostname, rtcp_port, local_rtcp_port, ttl, max_packet_size, connect); - if (ffurl_open(&s->rtcp_hd, buf, flags) < 0) + if (ffurl_open(&s->rtcp_hd, buf, flags, &h->interrupt_callback, NULL) < 0) goto fail; /* just to ease handle access. XXX: need to suppress direct handle @@ -213,7 +208,6 @@ ffurl_close(s->rtp_hd); if (s->rtcp_hd) ffurl_close(s->rtcp_hd); - av_free(s); return AVERROR(EIO); } @@ -225,22 +219,8 @@ int len, n; struct pollfd p[2] = {{s->rtp_fd, POLLIN, 0}, {s->rtcp_fd, POLLIN, 0}}; -#if 0 - for(;;) { - from_len = sizeof(from); - len = recvfrom (s->rtp_fd, buf, size, 0, - (struct sockaddr *)&from, &from_len); - if (len < 0) { - if (ff_neterrno() == AVERROR(EAGAIN) || - ff_neterrno() == AVERROR(EINTR)) - continue; - return AVERROR(EIO); - } - break; - } -#else for(;;) { - if (url_interrupt_cb()) + if (ff_check_interrupt(&h->interrupt_callback)) return AVERROR_EXIT; /* build fdset to listen to RTP and RTCP packets */ n = poll(p, 2, 100); @@ -277,7 +257,6 @@ return AVERROR(EIO); } } -#endif return len; } @@ -296,14 +275,6 @@ } ret = ffurl_write(hd, buf, size); -#if 0 - { - struct timespec ts; - ts.tv_sec = 0; - ts.tv_nsec = 10 * 1000000; - nanosleep(&ts, NULL); - } -#endif return ret; } @@ -313,7 +284,6 @@ ffurl_close(s->rtp_hd); ffurl_close(s->rtcp_hd); - av_free(s); return 0; } @@ -323,7 +293,7 @@ * @return the local port number */ -int rtp_get_local_rtp_port(URLContext *h) +int ff_rtp_get_local_rtp_port(URLContext *h) { RTPContext *s = h->priv_data; return ff_udp_get_local_port(s->rtp_hd); @@ -335,7 +305,7 @@ * @return the local port number */ -int rtp_get_local_rtcp_port(URLContext *h) +int ff_rtp_get_local_rtcp_port(URLContext *h) { RTPContext *s = h->priv_data; return ff_udp_get_local_port(s->rtcp_hd); @@ -347,7 +317,7 @@ return s->rtp_fd; } -int rtp_get_rtcp_file_handle(URLContext *h) { +int ff_rtp_get_rtcp_file_handle(URLContext *h) { RTPContext *s = h->priv_data; return s->rtcp_fd; } @@ -359,4 +329,6 @@ .url_write = rtp_write, .url_close = rtp_close, .url_get_file_handle = rtp_get_file_handle, + .priv_data_size = sizeof(RTPContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtsp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtsp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtsp.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtsp.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,9 +22,11 @@ #include "libavutil/base64.h" #include "libavutil/avstring.h" #include "libavutil/intreadwrite.h" +#include "libavutil/mathematics.h" #include "libavutil/parseutils.h" #include "libavutil/random_seed.h" #include "libavutil/dict.h" +#include "libavutil/opt.h" #include "avformat.h" #include "avio_internal.h" @@ -32,7 +34,6 @@ #if HAVE_POLL_H #include #endif -#include #include "internal.h" #include "network.h" #include "os_support.h" @@ -44,6 +45,7 @@ #include "rtpdec_formats.h" #include "rtpenc_chain.h" #include "url.h" +#include "rtpenc.h" //#define DEBUG @@ -55,6 +57,44 @@ #define SDP_MAX_SIZE 16384 #define RECVBUF_SIZE 10 * RTP_MAX_PACKET_LENGTH +#define OFFSET(x) offsetof(RTSPState, x) +#define DEC AV_OPT_FLAG_DECODING_PARAM +#define ENC AV_OPT_FLAG_ENCODING_PARAM + +#define RTSP_FLAG_OPTS(name, longname) \ + { name, longname, OFFSET(rtsp_flags), AV_OPT_TYPE_FLAGS, {0}, INT_MIN, INT_MAX, DEC, "rtsp_flags" }, \ + { "filter_src", "Only receive packets from the negotiated peer IP", 0, AV_OPT_TYPE_CONST, {RTSP_FLAG_FILTER_SRC}, 0, 0, DEC, "rtsp_flags" } + +#define RTSP_MEDIATYPE_OPTS(name, longname) \ + { name, longname, OFFSET(media_type_mask), AV_OPT_TYPE_FLAGS, { (1 << (AVMEDIA_TYPE_DATA+1)) - 1 }, INT_MIN, INT_MAX, DEC, "allowed_media_types" }, \ + { "video", "Video", 0, AV_OPT_TYPE_CONST, {1 << AVMEDIA_TYPE_VIDEO}, 0, 0, DEC, "allowed_media_types" }, \ + { "audio", "Audio", 0, AV_OPT_TYPE_CONST, {1 << AVMEDIA_TYPE_AUDIO}, 0, 0, DEC, "allowed_media_types" }, \ + { "data", "Data", 0, AV_OPT_TYPE_CONST, {1 << AVMEDIA_TYPE_DATA}, 0, 0, DEC, "allowed_media_types" } + +const AVOption ff_rtsp_options[] = { + { "initial_pause", "Don't start playing the stream immediately", OFFSET(initial_pause), AV_OPT_TYPE_INT, {0}, 0, 1, DEC }, + FF_RTP_FLAG_OPTS(RTSPState, rtp_muxer_flags), + { "rtsp_transport", "RTSP transport protocols", OFFSET(lower_transport_mask), AV_OPT_TYPE_FLAGS, {0}, INT_MIN, INT_MAX, DEC|ENC, "rtsp_transport" }, \ + { "udp", "UDP", 0, AV_OPT_TYPE_CONST, {1 << RTSP_LOWER_TRANSPORT_UDP}, 0, 0, DEC|ENC, "rtsp_transport" }, \ + { "tcp", "TCP", 0, AV_OPT_TYPE_CONST, {1 << RTSP_LOWER_TRANSPORT_TCP}, 0, 0, DEC|ENC, "rtsp_transport" }, \ + { "udp_multicast", "UDP multicast", 0, AV_OPT_TYPE_CONST, {1 << RTSP_LOWER_TRANSPORT_UDP_MULTICAST}, 0, 0, DEC, "rtsp_transport" }, + { "http", "HTTP tunneling", 0, AV_OPT_TYPE_CONST, {(1 << RTSP_LOWER_TRANSPORT_HTTP)}, 0, 0, DEC, "rtsp_transport" }, + RTSP_FLAG_OPTS("rtsp_flags", "RTSP flags"), + RTSP_MEDIATYPE_OPTS("allowed_media_types", "Media types to accept from the server"), + { NULL }, +}; + +static const AVOption sdp_options[] = { + RTSP_FLAG_OPTS("sdp_flags", "SDP flags"), + RTSP_MEDIATYPE_OPTS("allowed_media_types", "Media types to accept from the server"), + { NULL }, +}; + +static const AVOption rtp_options[] = { + RTSP_FLAG_OPTS("rtp_flags", "RTP flags"), + { NULL }, +}; + static void get_word_until_chars(char *buf, int buf_size, const char *sep, const char **pp) { @@ -132,8 +172,11 @@ return; codec->codec_id = handler->codec_id; rtsp_st->dynamic_handler = handler; - if (handler->alloc) + if (handler->alloc) { rtsp_st->dynamic_protocol_context = handler->alloc(); + if (!rtsp_st->dynamic_protocol_context) + rtsp_st->dynamic_handler = NULL; + } } /* parse the rtpmap description: /[/] */ @@ -185,7 +228,7 @@ codec->channels = RTSP_DEFAULT_NB_AUDIO_CHANNELS; if (i > 0) { codec->sample_rate = i; - av_set_pts_info(st, 32, 1, codec->sample_rate); + avpriv_set_pts_info(st, 32, 1, codec->sample_rate); get_word_sep(buf, sizeof(buf), "/", &p); i = atoi(buf); if (i > 0) @@ -203,11 +246,14 @@ case AVMEDIA_TYPE_VIDEO: av_log(s, AV_LOG_DEBUG, "video codec set to: %s\n", c_name); if (i > 0) - av_set_pts_info(st, 32, 1, i); + avpriv_set_pts_info(st, 32, 1, i); break; default: break; } + if (rtsp_st->dynamic_handler && rtsp_st->dynamic_handler->init) + rtsp_st->dynamic_handler->init(s, st->index, + rtsp_st->dynamic_protocol_context); return 0; } @@ -293,6 +339,7 @@ case 'm': /* new stream */ s1->skip_media = 0; + codec_type = AVMEDIA_TYPE_UNKNOWN; get_word(st_type, sizeof(st_type), &p); if (!strcmp(st_type, "audio")) { codec_type = AVMEDIA_TYPE_AUDIO; @@ -300,7 +347,8 @@ codec_type = AVMEDIA_TYPE_VIDEO; } else if (!strcmp(st_type, "application")) { codec_type = AVMEDIA_TYPE_DATA; - } else { + } + if (codec_type == AVMEDIA_TYPE_UNKNOWN || !(rt->media_type_mask & (1 << codec_type))) { s1->skip_media = 1; return; } @@ -325,9 +373,10 @@ if (!strcmp(ff_rtp_enc_name(rtsp_st->sdp_payload_type), "MP2T")) { /* no corresponding stream */ } else { - st = av_new_stream(s, rt->nb_rtsp_streams - 1); + st = avformat_new_stream(s, NULL); if (!st) return; + st->id = rt->nb_rtsp_streams - 1; rtsp_st->stream_index = st->index; st->codec->codec_type = codec_type; if (rtsp_st->sdp_payload_type < RTP_PT_PRIVATE) { @@ -336,11 +385,14 @@ ff_rtp_get_codec_info(st->codec, rtsp_st->sdp_payload_type); if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->codec->sample_rate > 0) - av_set_pts_info(st, 32, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate); /* Even static payload types may need a custom depacketizer */ handler = ff_rtp_handler_find_by_id( rtsp_st->sdp_payload_type, st->codec->codec_type); init_rtp_handler(handler, rtsp_st, st->codec); + if (handler && handler->init) + handler->init(s, st->index, + rtsp_st->dynamic_protocol_context); } } /* put a default control url */ @@ -428,11 +480,6 @@ } } -/** - * Parse the sdp description and allocate the rtp streams and the - * pollfd array used for udp ones. - */ - int ff_sdp_parse(AVFormatContext *s, const char *content) { RTSPState *rt = s->priv_data; @@ -505,7 +552,7 @@ } else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC) ff_rdt_parse_close(rtsp_st->transport_priv); else if (CONFIG_RTPDEC) - rtp_parse_close(rtsp_st->transport_priv); + ff_rtp_parse_close(rtsp_st->transport_priv); } rtsp_st->transport_priv = NULL; if (rtsp_st->rtp_handle) @@ -533,8 +580,7 @@ } av_free(rt->rtsp_streams); if (rt->asf_ctx) { - av_close_input_stream (rt->asf_ctx); - rt->asf_ctx = NULL; + avformat_close_input(&rt->asf_ctx); } av_free(rt->p); av_free(rt->recvbuf); @@ -562,7 +608,7 @@ rtsp_st->dynamic_protocol_context, rtsp_st->dynamic_handler); else if (CONFIG_RTPDEC) - rtsp_st->transport_priv = rtp_parse_open(s, st, rtsp_st->rtp_handle, + rtsp_st->transport_priv = ff_rtp_parse_open(s, st, rtsp_st->rtp_handle, rtsp_st->sdp_payload_type, (rt->lower_transport == RTSP_LOWER_TRANSPORT_TCP || !s->max_delay) ? 0 : RTP_REORDER_QUEUE_DEFAULT_SIZE); @@ -571,9 +617,9 @@ return AVERROR(ENOMEM); } else if (rt->transport != RTSP_TRANSPORT_RDT && CONFIG_RTPDEC) { if (rtsp_st->dynamic_handler) { - rtp_parse_set_dynamic_protocol(rtsp_st->transport_priv, - rtsp_st->dynamic_protocol_context, - rtsp_st->dynamic_handler); + ff_rtp_parse_set_dynamic_protocol(rtsp_st->transport_priv, + rtsp_st->dynamic_protocol_context, + rtsp_st->dynamic_handler); } } @@ -622,7 +668,7 @@ get_word_sep(transport_protocol, sizeof(transport_protocol), "/", &p); - if (!strcasecmp (transport_protocol, "rtp")) { + if (!av_strcasecmp (transport_protocol, "rtp")) { get_word_sep(profile, sizeof(profile), "/;,", &p); lower_transport[0] = '\0'; /* rtp/avp/ */ @@ -631,14 +677,14 @@ ";,", &p); } th->transport = RTSP_TRANSPORT_RTP; - } else if (!strcasecmp (transport_protocol, "x-pn-tng") || - !strcasecmp (transport_protocol, "x-real-rdt")) { + } else if (!av_strcasecmp (transport_protocol, "x-pn-tng") || + !av_strcasecmp (transport_protocol, "x-real-rdt")) { /* x-pn-tng/ */ get_word_sep(lower_transport, sizeof(lower_transport), "/;,", &p); profile[0] = '\0'; th->transport = RTSP_TRANSPORT_RDT; } - if (!strcasecmp(lower_transport, "TCP")) + if (!av_strcasecmp(lower_transport, "TCP")) th->lower_transport = RTSP_LOWER_TRANSPORT_TCP; else th->lower_transport = RTSP_LOWER_TRANSPORT_UDP; @@ -812,6 +858,9 @@ if (strstr(p, "GET_PARAMETER") && method && !strcmp(method, "OPTIONS")) rt->get_parameter_supported = 1; + } else if (av_stristart(p, "x-Accept-Dynamic-Rate:", &p) && rt) { + p += strspn(p, SPACE_CHARS); + rt->accept_dynamic_rate = atoi(p); } } @@ -1050,14 +1099,11 @@ return 0; } -/** - * @return 0 on success, <0 on error, 1 if protocol is unavailable. - */ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, int lower_transport, const char *real_challenge) { RTSPState *rt = s->priv_data; - int rtx, j, i, err, interleave = 0; + int rtx = 0, j, i, err, interleave = 0; RTSPStream *rtsp_st; RTSPMessageHeader reply1, *reply = &reply1; char cmd[2048]; @@ -1078,7 +1124,7 @@ for (j = RTSP_RTP_PORT_MIN, i = 0; i < rt->nb_rtsp_streams; ++i) { char transport[2048]; - /** + /* * WMS serves all UDP data over a single connection, the RTX, which * isn't necessarily the first in the SDP but has to be the first * to be set up, else the second/third SETUP will fail with a 461. @@ -1118,25 +1164,18 @@ "?localport=%d", j); /* we will use two ports per rtp stream (rtp and rtcp) */ j += 2; - if (ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE) == 0) + if (ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE, + &s->interrupt_callback, NULL) == 0) goto rtp_opened; } } -#if 0 - /* then try on any port */ - if (ffurl_open(&rtsp_st->rtp_handle, "rtp://", AVIO_FLAG_READ) < 0) { - err = AVERROR_INVALIDDATA; - goto fail; - } -#else av_log(s, AV_LOG_ERROR, "Unable to open an input RTP port\n"); err = AVERROR(EIO); goto fail; -#endif rtp_opened: - port = rtp_get_local_rtp_port(rtsp_st->rtp_handle); + port = ff_rtp_get_local_rtp_port(rtsp_st->rtp_handle); have_port: snprintf(transport, sizeof(transport) - 1, "%s/UDP;", trans_pref); @@ -1151,7 +1190,7 @@ /* RTP/TCP */ else if (lower_transport == RTSP_LOWER_TRANSPORT_TCP) { - /** For WMS streams, the application streams are only used for + /* For WMS streams, the application streams are only used for * UDP. When trying to set it up for TCP streams, the server * will return an error. Therefore, we skip those streams. */ if (rt->server_type == RTSP_SERVER_WMS && @@ -1180,6 +1219,8 @@ snprintf(cmd, sizeof(cmd), "Transport: %s\r\n", transport); + if (rt->accept_dynamic_rate) + av_strlcat(cmd, "x-Dynamic-Rate: 0\r\n", sizeof(cmd)); if (i == 0 && rt->server_type == RTSP_SERVER_REAL && CONFIG_RTPDEC) { char real_res[41], real_csum[9]; ff_rdt_calc_response_and_checksum(real_res, real_csum, @@ -1228,7 +1269,7 @@ case RTSP_LOWER_TRANSPORT_UDP: { char url[1024], options[30] = ""; - if (rt->filter_source) + if (rt->rtsp_flags & RTSP_FLAG_FILTER_SRC) av_strlcpy(options, "?connect=1", sizeof(options)); /* Use source address if specified */ if (reply->transports[0].source[0]) { @@ -1240,7 +1281,7 @@ reply->transports[0].server_port_min, "%s", options); } if (!(rt->server_type == RTSP_SERVER_WMS && i > 1) && - rtp_set_remote_url(rtsp_st->rtp_handle, url) < 0) { + ff_rtp_set_remote_url(rtsp_st->rtp_handle, url) < 0) { err = AVERROR_INVALIDDATA; goto fail; } @@ -1250,7 +1291,7 @@ */ if (!(rt->server_type == RTSP_SERVER_WMS && i > 1) && s->iformat && CONFIG_RTPDEC) - rtp_send_punch_packets(rtsp_st->rtp_handle); + ff_rtp_send_punch_packets(rtsp_st->rtp_handle); break; } case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: { @@ -1271,7 +1312,8 @@ namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST); ff_url_join(url, sizeof(url), "rtp", NULL, namebuf, port, "?ttl=%d", ttl); - if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE) < 0) { + if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE, + &s->interrupt_callback, NULL) < 0) { err = AVERROR_INVALIDDATA; goto fail; } @@ -1318,8 +1360,17 @@ if (!ff_network_init()) return AVERROR(EIO); -redirect: + rt->control_transport = RTSP_MODE_PLAIN; + if (rt->lower_transport_mask & (1 << RTSP_LOWER_TRANSPORT_HTTP)) { + rt->lower_transport_mask = 1 << RTSP_LOWER_TRANSPORT_TCP; + rt->control_transport = RTSP_MODE_TUNNEL; + } + /* Only pass through valid flags from here */ + rt->lower_transport_mask &= (1 << RTSP_LOWER_TRANSPORT_NB) - 1; + +redirect: + lower_transport_mask = rt->lower_transport_mask; /* extract hostname and port */ av_url_split(NULL, 0, auth, sizeof(auth), host, sizeof(host), &port, path, sizeof(path), s->filename); @@ -1329,6 +1380,7 @@ if (port < 0) port = RTSP_DEFAULT_PORT; +#if FF_API_RTSP_URL_OPTIONS /* search for options */ option_list = strrchr(path, '?'); if (option_list) { @@ -1336,6 +1388,7 @@ * the options back into the same string. */ filename = option_list; while (option_list) { + int handled = 1; /* move the option pointer */ option = ++option_list; option_list = strchr(option_list, '&'); @@ -1353,7 +1406,7 @@ lower_transport_mask |= (1<< RTSP_LOWER_TRANSPORT_TCP); rt->control_transport = RTSP_MODE_TUNNEL; } else if (!strcmp(option, "filter_src")) { - rt->filter_source = 1; + rt->rtsp_flags |= RTSP_FLAG_FILTER_SRC; } else { /* Write options back into the buffer, using memmove instead * of strcpy since the strings may overlap. */ @@ -1361,10 +1414,16 @@ memmove(++filename, option, len); filename += len; if (option_list) *filename = '&'; + handled = 0; } + if (handled) + av_log(s, AV_LOG_WARNING, "Options passed via URL are " + "deprecated, use -rtsp_transport " + "and -rtsp_flags instead.\n"); } *filename = 0; } +#endif if (!lower_transport_mask) lower_transport_mask = (1 << RTSP_LOWER_TRANSPORT_NB) - 1; @@ -1398,7 +1457,8 @@ av_get_random_seed(), av_get_random_seed()); /* GET requests */ - if (ffurl_alloc(&rt->rtsp_hd, httpname, AVIO_FLAG_READ) < 0) { + if (ffurl_alloc(&rt->rtsp_hd, httpname, AVIO_FLAG_READ, + &s->interrupt_callback) < 0) { err = AVERROR(EIO); goto fail; } @@ -1410,16 +1470,17 @@ "Pragma: no-cache\r\n" "Cache-Control: no-cache\r\n", sessioncookie); - ff_http_set_headers(rt->rtsp_hd, headers); + av_opt_set(rt->rtsp_hd->priv_data, "headers", headers, 0); /* complete the connection */ - if (ffurl_connect(rt->rtsp_hd)) { + if (ffurl_connect(rt->rtsp_hd, NULL)) { err = AVERROR(EIO); goto fail; } /* POST requests */ - if (ffurl_alloc(&rt->rtsp_hd_out, httpname, AVIO_FLAG_WRITE) < 0 ) { + if (ffurl_alloc(&rt->rtsp_hd_out, httpname, AVIO_FLAG_WRITE, + &s->interrupt_callback) < 0 ) { err = AVERROR(EIO); goto fail; } @@ -1433,8 +1494,8 @@ "Content-Length: 32767\r\n" "Expires: Sun, 9 Jan 1972 00:00:00 GMT\r\n", sessioncookie); - ff_http_set_headers(rt->rtsp_hd_out, headers); - ff_http_set_chunked_transfer_encoding(rt->rtsp_hd_out, 0); + av_opt_set(rt->rtsp_hd_out->priv_data, "headers", headers, 0); + av_opt_set(rt->rtsp_hd_out->priv_data, "chunked_post", "0", 0); /* Initialize the authentication state for the POST session. The HTTP * protocol implementation doesn't properly handle multi-pass @@ -1455,14 +1516,15 @@ ff_http_init_auth_state(rt->rtsp_hd_out, rt->rtsp_hd); /* complete the connection */ - if (ffurl_connect(rt->rtsp_hd_out)) { + if (ffurl_connect(rt->rtsp_hd_out, NULL)) { err = AVERROR(EIO); goto fail; } } else { /* open the tcp connection */ ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, host, port, NULL); - if (ffurl_open(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE) < 0) { + if (ffurl_open(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE, + &s->interrupt_callback, NULL) < 0) { err = AVERROR(EIO); goto fail; } @@ -1482,14 +1544,14 @@ cmd[0] = 0; if (rt->server_type == RTSP_SERVER_REAL) av_strlcat(cmd, - /** + /* * The following entries are required for proper * streaming from a Realmedia server. They are * interdependent in some way although we currently * don't quite understand how. Values were copied * from mplayer SVN r23589. - * @param CompanyID is a 16-byte ID in base64 - * @param ClientChallenge is a 16-byte ID in hex + * ClientChallenge is a 16-byte ID in hex + * CompanyID is a 16-byte ID in base64 */ "ClientChallenge: 9e26d33f2984236010ef6253fb1887f7\r\n" "PlayerStarttime: [28/03/2003:22:50:23 00:00]\r\n" @@ -1506,7 +1568,7 @@ if (rt->server_type != RTSP_SERVER_REAL && reply->real_challenge[0]) { rt->server_type = RTSP_SERVER_REAL; continue; - } else if (!strncasecmp(reply->server, "WMServer/", 9)) { + } else if (!av_strncasecmp(reply->server, "WMServer/", 9)) { rt->server_type = RTSP_SERVER_WMS; } else if (rt->server_type == RTSP_SERVER_REAL) strcpy(real_challenge, reply->real_challenge); @@ -1567,7 +1629,7 @@ struct pollfd *p = rt->p; for (;;) { - if (url_interrupt_cb()) + if (ff_check_interrupt(&s->interrupt_callback)) return AVERROR_EXIT; if (wait_end && wait_end - av_gettime() < 0) return AVERROR(EAGAIN); @@ -1584,7 +1646,7 @@ if (rtsp_st->rtp_handle) { p[max_p].fd = ffurl_get_file_handle(rtsp_st->rtp_handle); p[max_p++].events = POLLIN; - p[max_p].fd = rtp_get_rtcp_file_handle(rtsp_st->rtp_handle); + p[max_p].fd = ff_rtp_get_rtcp_file_handle(rtsp_st->rtp_handle); p[max_p++].events = POLLIN; } } @@ -1639,7 +1701,7 @@ if (rt->transport == RTSP_TRANSPORT_RDT) { ret = ff_rdt_parse_packet(rt->cur_transport_priv, pkt, NULL, 0); } else - ret = rtp_parse_packet(rt->cur_transport_priv, pkt, NULL, 0); + ret = ff_rtp_parse_packet(rt->cur_transport_priv, pkt, NULL, 0); if (ret == 0) { rt->cur_transport_priv = NULL; return 0; @@ -1687,13 +1749,13 @@ case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: len = udp_read_packet(s, &rtsp_st, rt->recvbuf, RECVBUF_SIZE, wait_end); if (len > 0 && rtsp_st->transport_priv && rt->transport == RTSP_TRANSPORT_RTP) - rtp_check_and_send_back_rr(rtsp_st->transport_priv, len); + ff_rtp_check_and_send_back_rr(rtsp_st->transport_priv, len); break; } if (len == AVERROR(EAGAIN) && first_queue_st && rt->transport == RTSP_TRANSPORT_RTP) { rtsp_st = first_queue_st; - ret = rtp_parse_packet(rtsp_st->transport_priv, pkt, NULL, 0); + ret = ff_rtp_parse_packet(rtsp_st->transport_priv, pkt, NULL, 0); goto end; } if (len < 0) @@ -1703,7 +1765,7 @@ if (rt->transport == RTSP_TRANSPORT_RDT) { ret = ff_rdt_parse_packet(rtsp_st->transport_priv, pkt, &rt->recvbuf, len); } else { - ret = rtp_parse_packet(rtsp_st->transport_priv, pkt, &rt->recvbuf, len); + ret = ff_rtp_parse_packet(rtsp_st->transport_priv, pkt, &rt->recvbuf, len); if (ret < 0) { /* Either bad packet, or a RTCP packet. Check if the * first_rtcp_ntp_time field was initialized. */ @@ -1807,9 +1869,11 @@ namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST); ff_url_join(url, sizeof(url), "rtp", NULL, namebuf, rtsp_st->sdp_port, - "?localport=%d&ttl=%d", rtsp_st->sdp_port, - rtsp_st->sdp_ttl); - if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE) < 0) { + "?localport=%d&ttl=%d&connect=%d", rtsp_st->sdp_port, + rtsp_st->sdp_ttl, + rt->rtsp_flags & RTSP_FLAG_FILTER_SRC ? 1 : 0); + if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE, + &s->interrupt_callback, NULL) < 0) { err = AVERROR_INVALIDDATA; goto fail; } @@ -1830,14 +1894,22 @@ return 0; } +static const AVClass sdp_demuxer_class = { + .class_name = "SDP demuxer", + .item_name = av_default_item_name, + .option = sdp_options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVInputFormat ff_sdp_demuxer = { - "sdp", - NULL_IF_CONFIG_SMALL("SDP"), - sizeof(RTSPState), - sdp_probe, - sdp_read_header, - ff_rtsp_fetch_packet, - sdp_read_close, + .name = "sdp", + .long_name = NULL_IF_CONFIG_SMALL("SDP"), + .priv_data_size = sizeof(RTSPState), + .read_probe = sdp_probe, + .read_header = sdp_read_header, + .read_packet = ff_rtsp_fetch_packet, + .read_close = sdp_read_close, + .priv_class = &sdp_demuxer_class }; #endif /* CONFIG_SDP_DEMUXER */ @@ -1861,11 +1933,13 @@ struct sockaddr_storage addr; AVIOContext pb; socklen_t addrlen = sizeof(addr); + RTSPState *rt = s->priv_data; if (!ff_network_init()) return AVERROR(EIO); - ret = ffurl_open(&in, s->filename, AVIO_FLAG_READ); + ret = ffurl_open(&in, s->filename, AVIO_FLAG_READ, + &s->interrupt_callback, NULL); if (ret) goto fail; @@ -1923,6 +1997,8 @@ /* sdp_read_header initializes this again */ ff_network_close(); + rt->media_type_mask = (1 << (AVMEDIA_TYPE_DATA+1)) - 1; + ret = sdp_read_header(s, ap); s->pb = NULL; return ret; @@ -1934,15 +2010,23 @@ return ret; } +static const AVClass rtp_demuxer_class = { + .class_name = "RTP demuxer", + .item_name = av_default_item_name, + .option = rtp_options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVInputFormat ff_rtp_demuxer = { - "rtp", - NULL_IF_CONFIG_SMALL("RTP input format"), - sizeof(RTSPState), - rtp_probe, - rtp_read_header, - ff_rtsp_fetch_packet, - sdp_read_close, + .name = "rtp", + .long_name = NULL_IF_CONFIG_SMALL("RTP input format"), + .priv_data_size = sizeof(RTSPState), + .read_probe = rtp_probe, + .read_header = rtp_read_header, + .read_packet = ff_rtsp_fetch_packet, + .read_close = sdp_read_close, .flags = AVFMT_NOFILE, + .priv_class = &rtp_demuxer_class }; #endif /* CONFIG_RTP_DEMUXER */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtspdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtspdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtspdec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtspdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,7 +21,7 @@ #include "libavutil/avstring.h" #include "libavutil/intreadwrite.h" -#include "libavutil/opt.h" +#include "libavutil/mathematics.h" #include "avformat.h" #include "internal.h" @@ -52,6 +52,8 @@ rtpctx->last_rtcp_ntp_time = AV_NOPTS_VALUE; rtpctx->first_rtcp_ntp_time = AV_NOPTS_VALUE; rtpctx->base_timestamp = 0; + rtpctx->timestamp = 0; + rtpctx->unwrapped_timestamp = 0; rtpctx->rtcp_ts_offset = 0; } } @@ -163,11 +165,6 @@ return AVERROR(ENOMEM); rt->real_setup = rt->real_setup_cache + s->nb_streams; -#if FF_API_FORMAT_PARAMETERS - if (ap->initial_pause) - rt->initial_pause = ap->initial_pause; -#endif - if (rt->initial_pause) { /* do not start immediately */ } else { @@ -382,12 +379,6 @@ { RTSPState *rt = s->priv_data; -#if 0 - /* NOTE: it is valid to flush the buffer here */ - if (rt->lower_transport == RTSP_LOWER_TRANSPORT_TCP) { - avio_close(&rt->rtsp_gb); - } -#endif ff_rtsp_send_cmd_async(s, "TEARDOWN", rt->control_uri, NULL); ff_rtsp_close_streams(s); @@ -398,27 +389,22 @@ return 0; } -static const AVOption options[] = { - { "initial_pause", "Don't start playing the stream immediately", offsetof(RTSPState, initial_pause), FF_OPT_TYPE_INT, {.dbl = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM }, - { NULL }, -}; - const AVClass rtsp_demuxer_class = { .class_name = "RTSP demuxer", .item_name = av_default_item_name, - .option = options, + .option = ff_rtsp_options, .version = LIBAVUTIL_VERSION_INT, }; AVInputFormat ff_rtsp_demuxer = { - "rtsp", - NULL_IF_CONFIG_SMALL("RTSP input format"), - sizeof(RTSPState), - rtsp_probe, - rtsp_read_header, - rtsp_read_packet, - rtsp_read_close, - rtsp_read_seek, + .name = "rtsp", + .long_name = NULL_IF_CONFIG_SMALL("RTSP input format"), + .priv_data_size = sizeof(RTSPState), + .read_probe = rtsp_probe, + .read_header = rtsp_read_header, + .read_packet = rtsp_read_packet, + .read_close = rtsp_read_close, + .read_seek = rtsp_read_seek, .flags = AVFMT_NOFILE, .read_play = rtsp_read_play, .read_pause = rtsp_read_pause, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtspenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtspenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtspenc.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtspenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -33,20 +33,13 @@ #include "libavutil/intreadwrite.h" #include "libavutil/avstring.h" #include "url.h" -#include "libavutil/opt.h" -#include "rtpenc.h" #define SDP_MAX_SIZE 16384 -static const AVOption options[] = { - FF_RTP_FLAG_OPTS(RTSPState, rtp_muxer_flags), - { NULL }, -}; - static const AVClass rtsp_muxer_class = { .class_name = "RTSP muxer", .item_name = av_default_item_name, - .option = options, + .option = ff_rtsp_options, .version = LIBAVUTIL_VERSION_INT, }; @@ -241,16 +234,14 @@ } AVOutputFormat ff_rtsp_muxer = { - "rtsp", - NULL_IF_CONFIG_SMALL("RTSP output format"), - NULL, - NULL, - sizeof(RTSPState), - CODEC_ID_AAC, - CODEC_ID_MPEG4, - rtsp_write_header, - rtsp_write_packet, - rtsp_write_close, + .name = "rtsp", + .long_name = NULL_IF_CONFIG_SMALL("RTSP output format"), + .priv_data_size = sizeof(RTSPState), + .audio_codec = CODEC_ID_AAC, + .video_codec = CODEC_ID_MPEG4, + .write_header = rtsp_write_header, + .write_packet = rtsp_write_packet, + .write_trailer = rtsp_write_close, .flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER, .priv_class = &rtsp_muxer_class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtsp.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtsp.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/rtsp.h 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/rtsp.h 2012-01-11 00:34:30.000000000 +0000 @@ -29,6 +29,7 @@ #include "httpauth.h" #include "libavutil/log.h" +#include "libavutil/opt.h" /** * Network layer over which RTP/etc packet data will be transported. @@ -37,7 +38,10 @@ RTSP_LOWER_TRANSPORT_UDP = 0, /**< UDP/unicast */ RTSP_LOWER_TRANSPORT_TCP = 1, /**< TCP; interleaved in RTSP */ RTSP_LOWER_TRANSPORT_UDP_MULTICAST = 2, /**< UDP/multicast */ - RTSP_LOWER_TRANSPORT_NB + RTSP_LOWER_TRANSPORT_NB, + RTSP_LOWER_TRANSPORT_HTTP = 8, /**< HTTP tunneled - not a proper + transport mode as such, + only for use via AVOptions */ }; /** @@ -182,7 +186,7 @@ }; /** - * Identifies particular servers that require special handling, such as + * Identify particular servers that require special handling, such as * standards-incompliant "Transport:" lines in the SETUP request. */ enum RTSPServerType { @@ -220,9 +224,6 @@ * see rtsp_read_play() and rtsp_read_seek(). */ int64_t seek_timestamp; - /* XXX: currently we use unbuffered input */ - // AVIOContext rtsp_gb; - int seq; /**< RTSP command sequence number */ /** copy of RTSPMessageHeader->session_id, i.e. the server-provided session @@ -316,10 +317,6 @@ /** Reusable buffer for receiving packets */ uint8_t* recvbuf; - /** Filter incoming UDP packets - receive packets only from the right - * source address and port. */ - int filter_source; - /** * A mask with all requested transport methods */ @@ -349,10 +346,27 @@ * Option flags for the chained RTP muxer. */ int rtp_muxer_flags; + + /** Whether the server accepts the x-Dynamic-Rate header */ + int accept_dynamic_rate; + + /** + * Various option flags for the RTSP muxer/demuxer. + */ + int rtsp_flags; + + /** + * Mask of all requested media types + */ + int media_type_mask; } RTSPState; +#define RTSP_FLAG_FILTER_SRC 0x1 /**< Filter incoming UDP packets - + receive packets only from the right + source address and port. */ + /** - * Describes a single stream, as identified by a single m= line block in the + * Describe a single stream, as identified by a single m= line block in the * SDP content. In the case of RDT, one RTSPStream can represent multiple * AVStreams. In this case, each AVStream in this set has similar content * (but different codec/bitrate). @@ -488,9 +502,9 @@ /** * Close all connection handles within the RTSP (de)muxer * - * @param rt RTSP (de)muxer context + * @param s RTSP (de)muxer context */ -void ff_rtsp_close_connections(AVFormatContext *rt); +void ff_rtsp_close_connections(AVFormatContext *s); /** * Get the description of the stream and set up the RTSPStream child @@ -505,8 +519,9 @@ int ff_rtsp_setup_output_streams(AVFormatContext *s, const char *addr); /** - * Parse a SDP description of streams by populating an RTSPState struct - * within the AVFormatContext. + * Parse an SDP description of streams by populating an RTSPState struct + * within the AVFormatContext; also allocate the RTP streams and the + * pollfd array used for UDP streams. */ int ff_sdp_parse(AVFormatContext *s, const char *content); @@ -525,6 +540,7 @@ /** * Do the SETUP requests for each stream for the chosen * lower transport mode. + * @return 0 on success, <0 on error, 1 if protocol is unavailable */ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, int lower_transport, const char *real_challenge); @@ -535,4 +551,6 @@ */ void ff_rtsp_undo_setup(AVFormatContext *s); +extern const AVOption ff_rtsp_options[]; + #endif /* AVFORMAT_RTSP_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/sapdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/sapdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/sapdec.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/sapdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -52,7 +52,7 @@ { struct SAPState *sap = s->priv_data; if (sap->sdp_ctx) - av_close_input_file(sap->sdp_ctx); + avformat_close_input(&sap->sdp_ctx); if (sap->ann_fd) ffurl_close(sap->ann_fd); av_freep(&sap->sdp); @@ -85,7 +85,8 @@ ff_url_join(url, sizeof(url), "udp", NULL, host, port, "?localport=%d", port); - ret = ffurl_open(&sap->ann_fd, url, AVIO_FLAG_READ); + ret = ffurl_open(&sap->ann_fd, url, AVIO_FLAG_READ, + &s->interrupt_callback, NULL); if (ret) goto fail; @@ -157,17 +158,19 @@ } sap->sdp_ctx->max_delay = s->max_delay; sap->sdp_ctx->pb = &sap->sdp_pb; + sap->sdp_ctx->interrupt_callback = s->interrupt_callback; ret = avformat_open_input(&sap->sdp_ctx, "temp.sdp", infmt, NULL); if (ret < 0) goto fail; if (sap->sdp_ctx->ctx_flags & AVFMTCTX_NOHEADER) s->ctx_flags |= AVFMTCTX_NOHEADER; for (i = 0; i < sap->sdp_ctx->nb_streams; i++) { - AVStream *st = av_new_stream(s, i); + AVStream *st = avformat_new_stream(s, NULL); if (!st) { ret = AVERROR(ENOMEM); goto fail; } + st->id = i; avcodec_copy_context(st->codec, sap->sdp_ctx->streams[i]->codec); st->time_base = sap->sdp_ctx->streams[i]->time_base; } @@ -211,11 +214,12 @@ if (s->ctx_flags & AVFMTCTX_NOHEADER) { while (sap->sdp_ctx->nb_streams > s->nb_streams) { int i = s->nb_streams; - AVStream *st = av_new_stream(s, i); + AVStream *st = avformat_new_stream(s, NULL); if (!st) { av_free_packet(pkt); return AVERROR(ENOMEM); } + st->id = i; avcodec_copy_context(st->codec, sap->sdp_ctx->streams[i]->codec); st->time_base = sap->sdp_ctx->streams[i]->time_base; } @@ -224,13 +228,13 @@ } AVInputFormat ff_sap_demuxer = { - "sap", - NULL_IF_CONFIG_SMALL("SAP input format"), - sizeof(struct SAPState), - sap_probe, - sap_read_header, - sap_fetch_packet, - sap_read_close, + .name = "sap", + .long_name = NULL_IF_CONFIG_SMALL("SAP input format"), + .priv_data_size = sizeof(struct SAPState), + .read_probe = sap_probe, + .read_header = sap_read_header, + .read_packet = sap_fetch_packet, + .read_close = sap_read_close, .flags = AVFMT_NOFILE, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/sapenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/sapenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/sapenc.c 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/sapenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -146,7 +146,7 @@ "?ttl=%d", ttl); if (!same_port) base_port += 2; - ret = ffurl_open(&fd, url, AVIO_FLAG_WRITE); + ret = ffurl_open(&fd, url, AVIO_FLAG_WRITE, &s->interrupt_callback, NULL); if (ret) { ret = AVERROR(EIO); goto fail; @@ -158,7 +158,8 @@ ff_url_join(url, sizeof(url), "udp", NULL, announce_addr, port, "?ttl=%d&connect=1", ttl); - ret = ffurl_open(&sap->ann_fd, url, AVIO_FLAG_WRITE); + ret = ffurl_open(&sap->ann_fd, url, AVIO_FLAG_WRITE, + &s->interrupt_callback, NULL); if (ret) { ret = AVERROR(EIO); goto fail; @@ -250,16 +251,14 @@ } AVOutputFormat ff_sap_muxer = { - "sap", - NULL_IF_CONFIG_SMALL("SAP output format"), - NULL, - NULL, - sizeof(struct SAPState), - CODEC_ID_AAC, - CODEC_ID_MPEG4, - sap_write_header, - sap_write_packet, - sap_write_close, + .name = "sap", + .long_name = NULL_IF_CONFIG_SMALL("SAP output format"), + .priv_data_size = sizeof(struct SAPState), + .audio_codec = CODEC_ID_AAC, + .video_codec = CODEC_ID_MPEG4, + .write_header = sap_write_header, + .write_packet = sap_write_packet, + .write_trailer = sap_write_close, .flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/sdp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/sdp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/sdp.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/sdp.c 2012-01-11 00:34:30.000000000 +0000 @@ -156,6 +156,8 @@ char *psets, *p; const uint8_t *r; const char *pset_string = "; sprop-parameter-sets="; + uint8_t *orig_extradata = NULL; + int orig_extradata_size = 0; if (c->extradata_size > MAX_EXTRADATA_SIZE) { av_log(c, AV_LOG_ERROR, "Too much extradata!\n"); @@ -172,6 +174,15 @@ return NULL; } + + orig_extradata_size = c->extradata_size; + orig_extradata = av_mallocz(orig_extradata_size + + FF_INPUT_BUFFER_PADDING_SIZE); + if (!orig_extradata) { + av_bitstream_filter_close(bsfc); + return NULL; + } + memcpy(orig_extradata, c->extradata, orig_extradata_size); av_bitstream_filter_filter(bsfc, c, NULL, &dummy_p, &dummy_int, NULL, 0, 0); av_bitstream_filter_close(bsfc); } @@ -179,6 +190,7 @@ psets = av_mallocz(MAX_PSET_SIZE); if (psets == NULL) { av_log(c, AV_LOG_ERROR, "Cannot allocate memory for the parameter sets.\n"); + av_free(orig_extradata); return NULL; } memcpy(psets, pset_string, strlen(pset_string)); @@ -208,6 +220,11 @@ p += strlen(p); r = r1; } + if (orig_extradata) { + av_free(c->extradata); + c->extradata = orig_extradata; + c->extradata_size = orig_extradata_size; + } return psets; } @@ -252,7 +269,7 @@ return NULL; } - if (ff_split_xiph_headers(c->extradata, c->extradata_size, + if (avpriv_split_xiph_headers(c->extradata, c->extradata_size, first_header_size, header_start, header_len) < 0) { av_log(c, AV_LOG_ERROR, "Extradata corrupt.\n"); @@ -342,7 +359,7 @@ char *config; for (rate_index = 0; rate_index < 16; rate_index++) - if (ff_mpeg4audio_sample_rates[rate_index] == c->sample_rate) + if (avpriv_mpeg4audio_sample_rates[rate_index] == c->sample_rate) break; if (rate_index == 16) { av_log(c, AV_LOG_ERROR, "Unsupported sample rate\n"); @@ -517,6 +534,14 @@ payload_type, 8000, c->channels); break; + case CODEC_ID_ADPCM_G726: { + if (payload_type >= RTP_PT_PRIVATE) + av_strlcatf(buff, size, "a=rtpmap:%d G726-%d/%d\r\n", + payload_type, + c->bits_per_coded_sample*8, + c->sample_rate); + break; + } default: /* Nothing special to do here... */ break; @@ -532,10 +557,7 @@ const char *type; int payload_type; - payload_type = ff_rtp_get_payload_type(c); - if (payload_type < 0) { - payload_type = RTP_PT_PRIVATE + (c->codec_type == AVMEDIA_TYPE_AUDIO); - } + payload_type = ff_rtp_get_payload_type(fmt, c); switch (c->codec_type) { case AVMEDIA_TYPE_VIDEO : type = "video" ; break; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/seek.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/seek.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/seek.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/seek.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ */ #include "seek.h" +#include "libavutil/mathematics.h" #include "libavutil/mem.h" #include "internal.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/seek-test.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/seek-test.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/seek-test.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/seek-test.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2007 Michael Niedermayer + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include + +#include "libavutil/common.h" +#include "libavutil/mathematics.h" +#include "libavformat/avformat.h" + +#undef printf +#undef fprintf + +static char buffer[20]; + +static const char *ret_str(int v) +{ + switch (v) { + case AVERROR_EOF: return "-EOF"; + case AVERROR(EIO): return "-EIO"; + case AVERROR(ENOMEM): return "-ENOMEM"; + case AVERROR(EINVAL): return "-EINVAL"; + default: + snprintf(buffer, sizeof(buffer), "%2d", v); + return buffer; + } +} + +static void ts_str(char buffer[60], int64_t ts, AVRational base) +{ + double tsval; + if (ts == AV_NOPTS_VALUE) { + strcpy(buffer, " NOPTS "); + return; + } + tsval = ts * av_q2d(base); + snprintf(buffer, 60, "%9f", tsval); +} + +int main(int argc, char **argv) +{ + const char *filename; + AVFormatContext *ic = NULL; + int i, ret, stream_id; + int64_t timestamp; + AVDictionary *format_opts = NULL; + + av_dict_set(&format_opts, "channels", "1", 0); + av_dict_set(&format_opts, "sample_rate", "22050", 0); + + /* initialize libavcodec, and register all codecs and formats */ + av_register_all(); + + if (argc != 2) { + printf("usage: %s input_file\n" + "\n", argv[0]); + return 1; + } + + filename = argv[1]; + + ret = avformat_open_input(&ic, filename, NULL, &format_opts); + av_dict_free(&format_opts); + if (ret < 0) { + fprintf(stderr, "cannot open %s\n", filename); + return 1; + } + + ret = avformat_find_stream_info(ic, NULL); + if (ret < 0) { + fprintf(stderr, "%s: could not find codec parameters\n", filename); + return 1; + } + + for(i=0; ; i++){ + AVPacket pkt; + AVStream *av_uninit(st); + char ts_buf[60]; + + memset(&pkt, 0, sizeof(pkt)); + if(ret>=0){ + ret= av_read_frame(ic, &pkt); + if(ret>=0){ + char dts_buf[60]; + st= ic->streams[pkt.stream_index]; + ts_str(dts_buf, pkt.dts, st->time_base); + ts_str(ts_buf, pkt.pts, st->time_base); + printf("ret:%-10s st:%2d flags:%d dts:%s pts:%s pos:%7" PRId64 " size:%6d", ret_str(ret), pkt.stream_index, pkt.flags, dts_buf, ts_buf, pkt.pos, pkt.size); + av_free_packet(&pkt); + } else + printf("ret:%s", ret_str(ret)); // necessary to avoid trailing whitespace + printf("\n"); + } + + if(i>25) break; + + stream_id= (i>>1)%(ic->nb_streams+1) - 1; + timestamp= (i*19362894167LL) % (4*AV_TIME_BASE) - AV_TIME_BASE; + if(stream_id>=0){ + st= ic->streams[stream_id]; + timestamp= av_rescale_q(timestamp, AV_TIME_BASE_Q, st->time_base); + } + //FIXME fully test the new seek API + if(i&1) ret = avformat_seek_file(ic, stream_id, INT64_MIN, timestamp, timestamp, 0); + else ret = avformat_seek_file(ic, stream_id, timestamp, timestamp, INT64_MAX, 0); + ts_str(ts_buf, timestamp, stream_id < 0 ? AV_TIME_BASE_Q : st->time_base); + printf("ret:%-10s st:%2d flags:%d ts:%s\n", ret_str(ret), stream_id, i&1, ts_buf); + } + + avformat_close_input(&ic); + + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/segafilm.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/segafilm.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/segafilm.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/segafilm.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,11 +29,13 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define FILM_TAG MKBETAG('F', 'I', 'L', 'M') #define FDSC_TAG MKBETAG('F', 'D', 'S', 'C') #define STAB_TAG MKBETAG('S', 'T', 'A', 'B') #define CVID_TAG MKBETAG('c', 'v', 'i', 'd') +#define RAW_TAG MKBETAG('r', 'a', 'w', ' ') typedef struct { int stream; @@ -111,11 +113,16 @@ film->audio_samplerate = AV_RB16(&scratch[24]); film->audio_channels = scratch[21]; film->audio_bits = scratch[22]; - if (film->audio_bits == 8) - film->audio_type = CODEC_ID_PCM_S8; - else if (film->audio_bits == 16) - film->audio_type = CODEC_ID_PCM_S16BE; - else + if (scratch[23] == 2) + film->audio_type = CODEC_ID_ADPCM_ADX; + else if (film->audio_channels > 0) { + if (film->audio_bits == 8) + film->audio_type = CODEC_ID_PCM_S8; + else if (film->audio_bits == 16) + film->audio_type = CODEC_ID_PCM_S16BE; + else + film->audio_type = CODEC_ID_NONE; + } else film->audio_type = CODEC_ID_NONE; } @@ -124,12 +131,15 @@ if (AV_RB32(&scratch[8]) == CVID_TAG) { film->video_type = CODEC_ID_CINEPAK; - } else + } else if (AV_RB32(&scratch[8]) == RAW_TAG) { + film->video_type = CODEC_ID_RAWVIDEO; + } else { film->video_type = CODEC_ID_NONE; + } /* initialize the decoder streams */ if (film->video_type) { - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); film->video_stream_index = st->index; @@ -138,10 +148,19 @@ st->codec->codec_tag = 0; /* no fourcc */ st->codec->width = AV_RB32(&scratch[16]); st->codec->height = AV_RB32(&scratch[12]); + + if (film->video_type == CODEC_ID_RAWVIDEO) { + if (scratch[20] == 24) { + st->codec->pix_fmt = PIX_FMT_RGB24; + } else { + av_log(s, AV_LOG_ERROR, "raw video is using unhandled %dbpp\n", scratch[20]); + return -1; + } + } } if (film->audio_type) { - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); film->audio_stream_index = st->index; @@ -149,12 +168,20 @@ st->codec->codec_id = film->audio_type; st->codec->codec_tag = 1; st->codec->channels = film->audio_channels; - st->codec->bits_per_coded_sample = film->audio_bits; st->codec->sample_rate = film->audio_samplerate; + + if (film->audio_type == CODEC_ID_ADPCM_ADX) { + st->codec->bits_per_coded_sample = 18 * 8 / 32; + st->codec->block_align = st->codec->channels * 18; + st->need_parsing = AVSTREAM_PARSE_FULL; + } else { + st->codec->bits_per_coded_sample = film->audio_bits; + st->codec->block_align = st->codec->channels * + st->codec->bits_per_coded_sample / 8; + } + st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * st->codec->bits_per_coded_sample; - st->codec->block_align = st->codec->channels * - st->codec->bits_per_coded_sample / 8; } /* load the sample table */ @@ -167,9 +194,11 @@ if(film->sample_count >= UINT_MAX / sizeof(film_sample)) return -1; film->sample_table = av_malloc(film->sample_count * sizeof(film_sample)); + if (!film->sample_table) + return AVERROR(ENOMEM); for(i=0; inb_streams; i++) - av_set_pts_info(s->streams[i], 33, 1, film->base_clock); + avpriv_set_pts_info(s->streams[i], 33, 1, film->base_clock); audio_frame_counter = 0; for (i = 0; i < film->sample_count; i++) { @@ -187,8 +216,12 @@ film->sample_table[i].pts *= film->base_clock; film->sample_table[i].pts /= film->audio_samplerate; - audio_frame_counter += (film->sample_table[i].sample_size / - (film->audio_channels * film->audio_bits / 8)); + if (film->audio_type == CODEC_ID_ADPCM_ADX) + audio_frame_counter += (film->sample_table[i].sample_size * 32 / + (18 * film->audio_channels)); + else if (film->audio_type != CODEC_ID_NONE) + audio_frame_counter += (film->sample_table[i].sample_size / + (film->audio_channels * film->audio_bits / 8)); } else { film->sample_table[i].stream = film->video_stream_index; film->sample_table[i].pts = AV_RB32(&scratch[8]) & 0x7FFFFFFF; @@ -227,7 +260,8 @@ return AVERROR(ENOMEM); avio_read(pb, pkt->data, sample->sample_size); } else if ((sample->stream == film->audio_stream_index) && - (film->audio_channels == 2)) { + (film->audio_channels == 2) && + (film->audio_type != CODEC_ID_ADPCM_ADX)) { /* stereo PCM needs to be interleaved */ if (av_new_packet(pkt, sample->sample_size)) @@ -238,6 +272,10 @@ av_free(film->stereo_buffer); film->stereo_buffer_size = sample->sample_size; film->stereo_buffer = av_malloc(film->stereo_buffer_size); + if (!film->stereo_buffer) { + film->stereo_buffer_size = 0; + return AVERROR(ENOMEM); + } } pkt->pos= avio_tell(pb); @@ -283,11 +321,11 @@ } AVInputFormat ff_segafilm_demuxer = { - "film_cpk", - NULL_IF_CONFIG_SMALL("Sega FILM/CPK format"), - sizeof(FilmDemuxContext), - film_probe, - film_read_header, - film_read_packet, - film_read_close, + .name = "film_cpk", + .long_name = NULL_IF_CONFIG_SMALL("Sega FILM/CPK format"), + .priv_data_size = sizeof(FilmDemuxContext), + .read_probe = film_probe, + .read_header = film_read_header, + .read_packet = film_read_packet, + .read_close = film_read_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/segment.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/segment.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/segment.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/segment.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,273 @@ +/* + * Generic segmenter + * Copyright (c) 2011, Luca Barbato + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include + +#include "avformat.h" +#include "internal.h" + +#include "libavutil/log.h" +#include "libavutil/opt.h" +#include "libavutil/avstring.h" +#include "libavutil/parseutils.h" +#include "libavutil/mathematics.h" + +typedef struct { + const AVClass *class; /**< Class for private options. */ + int number; + AVFormatContext *avf; + char *format; /**< Set by a private option. */ + char *list; /**< Set by a private option. */ + float time; /**< Set by a private option. */ + int size; /**< Set by a private option. */ + int64_t offset_time; + int64_t recording_time; + int has_video; + AVIOContext *pb; +} SegmentContext; + +static int segment_start(AVFormatContext *s) +{ + SegmentContext *c = s->priv_data; + AVFormatContext *oc = c->avf; + int err = 0; + + if (av_get_frame_filename(oc->filename, sizeof(oc->filename), + s->filename, c->number++) < 0) + return AVERROR(EINVAL); + + if ((err = avio_open2(&oc->pb, oc->filename, AVIO_FLAG_WRITE, + &s->interrupt_callback, NULL)) < 0) + return err; + + if (!oc->priv_data && oc->oformat->priv_data_size > 0) { + oc->priv_data = av_mallocz(oc->oformat->priv_data_size); + if (!oc->priv_data) { + avio_close(oc->pb); + return AVERROR(ENOMEM); + } + if (oc->oformat->priv_class) { + *(const AVClass**)oc->priv_data = oc->oformat->priv_class; + av_opt_set_defaults(oc->priv_data); + } + } + + if ((err = oc->oformat->write_header(oc)) < 0) { + goto fail; + } + + return 0; + +fail: + avio_close(oc->pb); + av_freep(&oc->priv_data); + + return err; +} + +static int segment_end(AVFormatContext *oc) +{ + int ret = 0; + + if (oc->oformat->write_trailer) + ret = oc->oformat->write_trailer(oc); + + avio_close(oc->pb); + if (oc->oformat->priv_class) + av_opt_free(oc->priv_data); + av_freep(&oc->priv_data); + + return ret; +} + +static int seg_write_header(AVFormatContext *s) +{ + SegmentContext *seg = s->priv_data; + AVFormatContext *oc; + int ret, i; + + seg->number = 0; + seg->offset_time = 0; + seg->recording_time = seg->time * 1000000; + + if (seg->list) + if ((ret = avio_open2(&seg->pb, seg->list, AVIO_FLAG_WRITE, + &s->interrupt_callback, NULL)) < 0) + return ret; + + for (i = 0; i< s->nb_streams; i++) + seg->has_video += + (s->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO); + + if (seg->has_video > 1) + av_log(s, AV_LOG_WARNING, + "More than a single video stream present, " + "expect issues decoding it.\n"); + + oc = avformat_alloc_context(); + + if (!oc) { + ret = AVERROR(ENOMEM); + goto fail; + } + + oc->oformat = av_guess_format(seg->format, s->filename, NULL); + + if (!oc->oformat) { + ret = AVERROR_MUXER_NOT_FOUND; + goto fail; + } + if (oc->oformat->flags & AVFMT_NOFILE) { + av_log(s, AV_LOG_ERROR, "format %s not supported.\n", + oc->oformat->name); + ret = AVERROR(EINVAL); + goto fail; + } + + seg->avf = oc; + + oc->streams = s->streams; + oc->nb_streams = s->nb_streams; + + if (av_get_frame_filename(oc->filename, sizeof(oc->filename), + s->filename, seg->number++) < 0) { + ret = AVERROR(EINVAL); + goto fail; + } + + if ((ret = avio_open2(&oc->pb, oc->filename, AVIO_FLAG_WRITE, + &s->interrupt_callback, NULL)) < 0) + goto fail; + + if ((ret = avformat_write_header(oc, NULL)) < 0) { + avio_close(oc->pb); + goto fail; + } + + if (seg->list) { + avio_printf(seg->pb, "%s\n", oc->filename); + avio_flush(seg->pb); + } + +fail: + if (ret) { + oc->streams = NULL; + oc->nb_streams = 0; + if (seg->list) + avio_close(seg->pb); + avformat_free_context(oc); + } + return ret; +} + +static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) +{ + SegmentContext *seg = s->priv_data; + AVFormatContext *oc = seg->avf; + AVStream *st = oc->streams[pkt->stream_index]; + int64_t end_pts = seg->recording_time * seg->number; + int ret; + + if ((seg->has_video && st->codec->codec_type == AVMEDIA_TYPE_VIDEO) && + av_compare_ts(pkt->pts, st->time_base, + end_pts, AV_TIME_BASE_Q) >= 0 && + pkt->flags & AV_PKT_FLAG_KEY) { + + av_log(s, AV_LOG_DEBUG, "Next segment starts at %d %"PRId64"\n", + pkt->stream_index, pkt->pts); + + ret = segment_end(oc); + + if (!ret) + ret = segment_start(s); + + if (ret) + goto fail; + + if (seg->list) { + avio_printf(seg->pb, "%s\n", oc->filename); + avio_flush(seg->pb); + if (!(seg->number % seg->size)) { + avio_close(seg->pb); + if ((ret = avio_open2(&seg->pb, seg->list, AVIO_FLAG_WRITE, + &s->interrupt_callback, NULL)) < 0) + goto fail; + + } + } + } + + ret = oc->oformat->write_packet(oc, pkt); + +fail: + if (ret < 0) { + oc->streams = NULL; + oc->nb_streams = 0; + if (seg->list) + avio_close(seg->pb); + avformat_free_context(oc); + } + + return ret; +} + +static int seg_write_trailer(struct AVFormatContext *s) +{ + SegmentContext *seg = s->priv_data; + AVFormatContext *oc = seg->avf; + int ret = segment_end(oc); + if (seg->list) + avio_close(seg->pb); + oc->streams = NULL; + oc->nb_streams = 0; + avformat_free_context(oc); + return ret; +} + +#define OFFSET(x) offsetof(SegmentContext, x) +#define E AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "segment_format", "container format used for the segments", OFFSET(format), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E }, + { "segment_time", "segment length in seconds", OFFSET(time), AV_OPT_TYPE_FLOAT, {.dbl = 2}, 0, FLT_MAX, E }, + { "segment_list", "output the segment list", OFFSET(list), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E }, + { "segment_list_size", "maximum number of playlist entries", OFFSET(size), AV_OPT_TYPE_INT, {.dbl = 5}, 0, INT_MAX, E }, + { NULL }, +}; + +static const AVClass seg_class = { + .class_name = "segment muxer", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + + +AVOutputFormat ff_segment_muxer = { + .name = "segment", + .long_name = NULL_IF_CONFIG_SMALL("segment muxer"), + .priv_data_size = sizeof(SegmentContext), + .flags = AVFMT_GLOBALHEADER | AVFMT_NOFILE, + .write_header = seg_write_header, + .write_packet = seg_write_packet, + .write_trailer = seg_write_trailer, + .priv_class = &seg_class, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/sierravmd.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/sierravmd.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/sierravmd.c 2011-04-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/sierravmd.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,6 +29,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define VMD_HEADER_SIZE 0x0330 #define BYTES_PER_FRAME_RECORD 16 @@ -104,10 +105,10 @@ else vmd->is_indeo3 = 0; /* start up the decoders */ - vst = av_new_stream(s, 0); + vst = avformat_new_stream(s, NULL); if (!vst) return AVERROR(ENOMEM); - av_set_pts_info(vst, 33, 1, 10); + avpriv_set_pts_info(vst, 33, 1, 10); vmd->video_stream_index = vst->index; vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_id = vmd->is_indeo3 ? CODEC_ID_INDEO3 : CODEC_ID_VMDVIDEO; @@ -125,7 +126,7 @@ /* if sample rate is 0, assume no audio */ vmd->sample_rate = AV_RL16(&vmd->vmd_header[804]); if (vmd->sample_rate) { - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); vmd->audio_stream_index = st->index; @@ -148,8 +149,8 @@ num = st->codec->block_align; den = st->codec->sample_rate * st->codec->channels; av_reduce(&den, &num, den, num, (1UL<<31)-1); - av_set_pts_info(vst, 33, num, den); - av_set_pts_info(st, 33, num, den); + avpriv_set_pts_info(vst, 33, num, den); + avpriv_set_pts_info(st, 33, num, den); } toc_offset = AV_RL32(&vmd->vmd_header[812]); @@ -205,7 +206,7 @@ vmd->frame_table[total_frames].pts = current_audio_pts; total_frames++; if(!current_audio_pts) - current_audio_pts += sound_buffers; + current_audio_pts += sound_buffers - 1; else current_audio_pts++; break; @@ -281,11 +282,11 @@ } AVInputFormat ff_vmd_demuxer = { - "vmd", - NULL_IF_CONFIG_SMALL("Sierra VMD format"), - sizeof(VmdDemuxContext), - vmd_probe, - vmd_read_header, - vmd_read_packet, - vmd_read_close, + .name = "vmd", + .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD format"), + .priv_data_size = sizeof(VmdDemuxContext), + .read_probe = vmd_probe, + .read_header = vmd_read_header, + .read_packet = vmd_read_packet, + .read_close = vmd_read_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/siff.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/siff.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/siff.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/siff.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" enum SIFFTags{ TAG_SIFF = MKTAG('S', 'I', 'F', 'F'), @@ -71,7 +72,7 @@ static int create_audio_stream(AVFormatContext *s, SIFFContext *c) { AVStream *ast; - ast = av_new_stream(s, 0); + ast = avformat_new_stream(s, NULL); if (!ast) return -1; ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -80,7 +81,7 @@ ast->codec->bits_per_coded_sample = c->bits; ast->codec->sample_rate = c->rate; ast->codec->frame_size = c->block_align; - av_set_pts_info(ast, 16, 1, c->rate); + avpriv_set_pts_info(ast, 16, 1, c->rate); return 0; } @@ -115,7 +116,7 @@ avio_skip(pb, 16); //zeroes - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return -1; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; @@ -124,7 +125,7 @@ st->codec->width = width; st->codec->height = height; st->codec->pix_fmt = PIX_FMT_PAL8; - av_set_pts_info(st, 16, 1, 12); + avpriv_set_pts_info(st, 16, 1, 12); c->cur_frame = 0; c->has_video = 1; @@ -228,11 +229,11 @@ } AVInputFormat ff_siff_demuxer = { - "siff", - NULL_IF_CONFIG_SMALL("Beam Software SIFF"), - sizeof(SIFFContext), - siff_probe, - siff_read_header, - siff_read_packet, + .name = "siff", + .long_name = NULL_IF_CONFIG_SMALL("Beam Software SIFF"), + .priv_data_size = sizeof(SIFFContext), + .read_probe = siff_probe, + .read_header = siff_read_header, + .read_packet = siff_read_packet, .extensions = "vb,son" }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/smacker.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/smacker.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/smacker.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/smacker.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,16 +26,17 @@ #include "libavutil/bswap.h" #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define SMACKER_PAL 0x01 #define SMACKER_FLAG_RING_FRAME 0x01 enum SAudFlags { - SMK_AUD_PACKED = 0x80000000, - SMK_AUD_16BITS = 0x20000000, - SMK_AUD_STEREO = 0x10000000, - SMK_AUD_BINKAUD = 0x08000000, - SMK_AUD_USEDCT = 0x04000000 + SMK_AUD_PACKED = 0x80, + SMK_AUD_16BITS = 0x20, + SMK_AUD_STEREO = 0x10, + SMK_AUD_BINKAUD = 0x08, + SMK_AUD_USEDCT = 0x04 }; typedef struct SmackerContext { @@ -48,6 +49,7 @@ uint32_t audio[7]; uint32_t treesize; uint32_t mmap_size, mclr_size, full_size, type_size; + uint8_t aflags[7]; uint32_t rates[7]; uint32_t pad; /* frame info */ @@ -129,8 +131,10 @@ smk->mclr_size = avio_rl32(pb); smk->full_size = avio_rl32(pb); smk->type_size = avio_rl32(pb); - for(i = 0; i < 7; i++) - smk->rates[i] = avio_rl32(pb); + for(i = 0; i < 7; i++) { + smk->rates[i] = avio_rl24(pb); + smk->aflags[i] = avio_r8(pb); + } smk->pad = avio_rl32(pb); /* setup data */ if(smk->frames > 0xFFFFFF) { @@ -151,7 +155,7 @@ } /* init video codec */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return -1; smk->videoindex = st->index; @@ -168,31 +172,31 @@ smk->pts_inc *= 100; tbase = 100000; av_reduce(&tbase, &smk->pts_inc, tbase, smk->pts_inc, (1UL<<31)-1); - av_set_pts_info(st, 33, smk->pts_inc, tbase); + avpriv_set_pts_info(st, 33, smk->pts_inc, tbase); st->duration = smk->frames; /* handle possible audio streams */ for(i = 0; i < 7; i++) { smk->indexes[i] = -1; - if(smk->rates[i] & 0xFFFFFF){ - ast[i] = av_new_stream(s, 0); + if (smk->rates[i]) { + ast[i] = avformat_new_stream(s, NULL); smk->indexes[i] = ast[i]->index; ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO; - if (smk->rates[i] & SMK_AUD_BINKAUD) { + if (smk->aflags[i] & SMK_AUD_BINKAUD) { ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_RDFT; - } else if (smk->rates[i] & SMK_AUD_USEDCT) { + } else if (smk->aflags[i] & SMK_AUD_USEDCT) { ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_DCT; - } else if (smk->rates[i] & SMK_AUD_PACKED){ + } else if (smk->aflags[i] & SMK_AUD_PACKED){ ast[i]->codec->codec_id = CODEC_ID_SMACKAUDIO; ast[i]->codec->codec_tag = MKTAG('S', 'M', 'K', 'A'); } else { ast[i]->codec->codec_id = CODEC_ID_PCM_U8; } - ast[i]->codec->channels = (smk->rates[i] & SMK_AUD_STEREO) ? 2 : 1; - ast[i]->codec->sample_rate = smk->rates[i] & 0xFFFFFF; - ast[i]->codec->bits_per_coded_sample = (smk->rates[i] & SMK_AUD_16BITS) ? 16 : 8; + ast[i]->codec->channels = (smk->aflags[i] & SMK_AUD_STEREO) ? 2 : 1; + ast[i]->codec->sample_rate = smk->rates[i]; + ast[i]->codec->bits_per_coded_sample = (smk->aflags[i] & SMK_AUD_16BITS) ? 16 : 8; if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == CODEC_ID_PCM_U8) ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE; - av_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate + avpriv_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate * ast[i]->codec->channels * ast[i]->codec->bits_per_coded_sample / 8); } } @@ -286,11 +290,16 @@ for(i = 0; i < 7; i++) { if(flags & 1) { int size; + uint8_t *tmpbuf; + size = avio_rl32(s->pb) - 4; frame_size -= size; frame_size -= 4; smk->curstream++; - smk->bufs[smk->curstream] = av_realloc(smk->bufs[smk->curstream], size); + tmpbuf = av_realloc(smk->bufs[smk->curstream], size); + if (!tmpbuf) + return AVERROR(ENOMEM); + smk->bufs[smk->curstream] = tmpbuf; smk->buf_sizes[smk->curstream] = size; ret = avio_read(s->pb, smk->bufs[smk->curstream], size); if(ret != size) @@ -299,7 +308,9 @@ } flags >>= 1; } - if (av_new_packet(pkt, frame_size + 768)) + if (frame_size < 0) + return AVERROR_INVALIDDATA; + if (av_new_packet(pkt, frame_size + 769)) return AVERROR(ENOMEM); if(smk->frm_size[smk->cur_frame] & 1) palchange |= 2; @@ -340,11 +351,11 @@ } AVInputFormat ff_smacker_demuxer = { - "smk", - NULL_IF_CONFIG_SMALL("Smacker video"), - sizeof(SmackerContext), - smacker_probe, - smacker_read_header, - smacker_read_packet, - smacker_read_close, + .name = "smk", + .long_name = NULL_IF_CONFIG_SMALL("Smacker video"), + .priv_data_size = sizeof(SmackerContext), + .read_probe = smacker_probe, + .read_header = smacker_read_header, + .read_packet = smacker_read_packet, + .read_close = smacker_read_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/smjpeg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/smjpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/smjpeg.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/smjpeg.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,187 @@ +/* + * SMJPEG demuxer + * Copyright (c) 2011 Paul B Mahol + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * This is a demuxer for Loki SDL Motion JPEG files + */ + +#include "avformat.h" +#include "internal.h" +#include "riff.h" + +static const AVCodecTag codec_smjpeg_video_tags[] = { + { CODEC_ID_MJPEG, MKTAG('J', 'F', 'I', 'F') }, + { CODEC_ID_NONE, 0 }, +}; + +static const AVCodecTag codec_smjpeg_audio_tags[] = { + { CODEC_ID_ADPCM_IMA_SMJPEG, MKTAG('A', 'P', 'C', 'M') }, + { CODEC_ID_PCM_S16LE, MKTAG('N', 'O', 'N', 'E') }, + { CODEC_ID_NONE, 0 }, +}; + +typedef struct SMJPEGContext { + int audio_stream_index; + int video_stream_index; +} SMJPEGContext; + +static int smjpeg_probe(AVProbeData *p) +{ + if (!memcmp(p->buf, "\x0\xaSMJPEG", 8)) + return AVPROBE_SCORE_MAX; + return 0; +} + +static int smjpeg_read_header(AVFormatContext *s, AVFormatParameters *ap) +{ + SMJPEGContext *sc = s->priv_data; + AVStream *ast = NULL, *vst = NULL; + AVIOContext *pb = s->pb; + uint32_t version, htype, hlength, duration; + char *comment; + + avio_skip(pb, 8); // magic + version = avio_rb32(pb); + if (version) + av_log_ask_for_sample(s, "unknown version %d\n", version); + + duration = avio_rb32(pb); // in msec + + while (!pb->eof_reached) { + htype = avio_rl32(pb); + switch (htype) { + case MKTAG('_', 'T', 'X', 'T'): + hlength = avio_rb32(pb); + if (!hlength || hlength > 512) + return AVERROR_INVALIDDATA; + comment = av_malloc(hlength + 1); + if (!comment) + return AVERROR(ENOMEM); + if (avio_read(pb, comment, hlength) != hlength) { + av_freep(&comment); + av_log(s, AV_LOG_ERROR, "error when reading comment\n"); + return AVERROR_INVALIDDATA; + } + comment[hlength] = 0; + av_dict_set(&s->metadata, "comment", comment, + AV_DICT_DONT_STRDUP_VAL); + break; + case MKTAG('_', 'S', 'N', 'D'): + if (ast) { + av_log_ask_for_sample(s, "multiple audio streams not supported\n"); + return AVERROR_INVALIDDATA; + } + hlength = avio_rb32(pb); + if (hlength < 8) + return AVERROR_INVALIDDATA; + ast = avformat_new_stream(s, 0); + if (!ast) + return AVERROR(ENOMEM); + ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; + ast->codec->sample_rate = avio_rb16(pb); + ast->codec->bits_per_coded_sample = avio_r8(pb); + ast->codec->channels = avio_r8(pb); + ast->codec->codec_tag = avio_rl32(pb); + ast->codec->codec_id = ff_codec_get_id(codec_smjpeg_audio_tags, + ast->codec->codec_tag); + ast->duration = duration; + sc->audio_stream_index = ast->index; + avpriv_set_pts_info(ast, 32, 1, 1000); + avio_skip(pb, hlength - 8); + break; + case MKTAG('_', 'V', 'I', 'D'): + if (vst) { + av_log_ask_for_sample(s, "multiple video streams not supported\n"); + return AVERROR_INVALIDDATA; + } + hlength = avio_rb32(pb); + if (hlength < 12) + return AVERROR_INVALIDDATA; + avio_skip(pb, 4); // number of frames + vst = avformat_new_stream(s, 0); + if (!vst) + return AVERROR(ENOMEM); + vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; + vst->codec->width = avio_rb16(pb); + vst->codec->height = avio_rb16(pb); + vst->codec->codec_tag = avio_rl32(pb); + vst->codec->codec_id = ff_codec_get_id(codec_smjpeg_video_tags, + vst->codec->codec_tag); + vst->duration = duration; + sc->video_stream_index = vst->index; + avpriv_set_pts_info(vst, 32, 1, 1000); + avio_skip(pb, hlength - 12); + break; + case MKTAG('H', 'E', 'N', 'D'): + return 0; + default: + av_log(s, AV_LOG_ERROR, "unknown header %x\n", htype); + return AVERROR_INVALIDDATA; + } + } + + return AVERROR_EOF; +} + +static int smjpeg_read_packet(AVFormatContext *s, AVPacket *pkt) +{ + SMJPEGContext *sc = s->priv_data; + uint32_t dtype, ret, size, timestamp; + + if (s->pb->eof_reached) + return AVERROR_EOF; + dtype = avio_rl32(s->pb); + switch (dtype) { + case MKTAG('s', 'n', 'd', 'D'): + timestamp = avio_rb32(s->pb); + size = avio_rb32(s->pb); + ret = av_get_packet(s->pb, pkt, size); + pkt->stream_index = sc->audio_stream_index; + pkt->pts = timestamp; + break; + case MKTAG('v', 'i', 'd', 'D'): + timestamp = avio_rb32(s->pb); + size = avio_rb32(s->pb); + ret = av_get_packet(s->pb, pkt, size); + pkt->stream_index = sc->video_stream_index; + pkt->pts = timestamp; + break; + case MKTAG('D', 'O', 'N', 'E'): + ret = AVERROR_EOF; + break; + default: + av_log(s, AV_LOG_ERROR, "unknown chunk %x\n", dtype); + ret = AVERROR_INVALIDDATA; + break; + } + return ret; +} + +AVInputFormat ff_smjpeg_demuxer = { + .name = "smjpeg", + .long_name = NULL_IF_CONFIG_SMALL("Loki SDL MJPEG"), + .priv_data_size = sizeof(SMJPEGContext), + .read_probe = smjpeg_probe, + .read_header = smjpeg_read_header, + .read_packet = smjpeg_read_packet, + .extensions = "mjpg", +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/sol.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/sol.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/sol.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/sol.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,8 +23,9 @@ * Based on documents from Game Audio Player and own research */ -#include "libavutil/bswap.h" +#include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #include "pcm.h" /* if we don't know the size in advance */ @@ -33,8 +34,7 @@ static int sol_probe(AVProbeData *p) { /* check file header */ - uint16_t magic; - magic=av_le2ne16(*((uint16_t*)p->buf)); + uint16_t magic = AV_RL32(p->buf); if ((magic == 0x0B8D || magic == 0x0C0D || magic == 0x0C8D) && p->buf[2] == 'S' && p->buf[3] == 'O' && p->buf[4] == 'L' && p->buf[5] == 0) @@ -110,7 +110,7 @@ else id = 0; /* now we are ready: build format streams */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return -1; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -118,7 +118,7 @@ st->codec->codec_id = codec; st->codec->channels = channels; st->codec->sample_rate = rate; - av_set_pts_info(st, 64, 1, rate); + avpriv_set_pts_info(st, 64, 1, rate); return 0; } @@ -132,6 +132,8 @@ if (s->pb->eof_reached) return AVERROR(EIO); ret= av_get_packet(s->pb, pkt, MAX_SIZE); + if (ret < 0) + return ret; pkt->stream_index = 0; /* note: we need to modify the packet size here to handle the last @@ -141,12 +143,10 @@ } AVInputFormat ff_sol_demuxer = { - "sol", - NULL_IF_CONFIG_SMALL("Sierra SOL format"), - 0, - sol_probe, - sol_read_header, - sol_read_packet, - NULL, - pcm_read_seek, + .name = "sol", + .long_name = NULL_IF_CONFIG_SMALL("Sierra SOL format"), + .read_probe = sol_probe, + .read_header = sol_read_header, + .read_packet = sol_read_packet, + .read_seek = pcm_read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/soxdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/soxdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/soxdec.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/soxdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,15 +23,17 @@ */ /** - * SoX native format demuxer * @file + * SoX native format demuxer * @author Daniel Verkamp - * @sa http://wiki.multimedia.cx/index.php?title=SoX_native_intermediate_format + * @see http://wiki.multimedia.cx/index.php?title=SoX_native_intermediate_format */ #include "libavutil/intreadwrite.h" +#include "libavutil/intfloat.h" #include "libavutil/dict.h" #include "avformat.h" +#include "internal.h" #include "pcm.h" #include "sox.h" @@ -50,7 +52,7 @@ double sample_rate, sample_rate_frac; AVStream *st; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -60,14 +62,14 @@ st->codec->codec_id = CODEC_ID_PCM_S32LE; header_size = avio_rl32(pb); avio_skip(pb, 8); /* sample count */ - sample_rate = av_int2dbl(avio_rl64(pb)); + sample_rate = av_int2double(avio_rl64(pb)); st->codec->channels = avio_rl32(pb); comment_size = avio_rl32(pb); } else { st->codec->codec_id = CODEC_ID_PCM_S32BE; header_size = avio_rb32(pb); avio_skip(pb, 8); /* sample count */ - sample_rate = av_int2dbl(avio_rb64(pb)); + sample_rate = av_int2double(avio_rb64(pb)); st->codec->channels = avio_rb32(pb); comment_size = avio_rb32(pb); } @@ -116,7 +118,7 @@ st->codec->block_align = st->codec->bits_per_coded_sample * st->codec->channels / 8; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); return 0; } @@ -142,12 +144,10 @@ } AVInputFormat ff_sox_demuxer = { - "sox", - NULL_IF_CONFIG_SMALL("SoX native format"), - 0, - sox_probe, - sox_read_header, - sox_read_packet, - NULL, - pcm_read_seek, + .name = "sox", + .long_name = NULL_IF_CONFIG_SMALL("SoX native format"), + .read_probe = sox_probe, + .read_header = sox_read_header, + .read_packet = sox_read_packet, + .read_seek = pcm_read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/soxenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/soxenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/soxenc.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/soxenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,13 +23,14 @@ */ /** - * SoX native format muxer * @file + * SoX native format muxer * @author Daniel Verkamp - * @sa http://wiki.multimedia.cx/index.php?title=SoX_native_intermediate_format + * @see http://wiki.multimedia.cx/index.php?title=SoX_native_intermediate_format */ #include "libavutil/intreadwrite.h" +#include "libavutil/intfloat.h" #include "libavutil/dict.h" #include "avformat.h" #include "avio_internal.h" @@ -58,14 +59,14 @@ ffio_wfourcc(pb, ".SoX"); avio_wl32(pb, sox->header_size); avio_wl64(pb, 0); /* number of samples */ - avio_wl64(pb, av_dbl2int(enc->sample_rate)); + avio_wl64(pb, av_double2int(enc->sample_rate)); avio_wl32(pb, enc->channels); avio_wl32(pb, comment_size); } else if (enc->codec_id == CODEC_ID_PCM_S32BE) { ffio_wfourcc(pb, "XoS."); avio_wb32(pb, sox->header_size); avio_wb64(pb, 0); /* number of samples */ - avio_wb64(pb, av_dbl2int(enc->sample_rate)); + avio_wb64(pb, av_double2int(enc->sample_rate)); avio_wb32(pb, enc->channels); avio_wb32(pb, comment_size); } else { @@ -115,14 +116,13 @@ } AVOutputFormat ff_sox_muxer = { - "sox", - NULL_IF_CONFIG_SMALL("SoX native format"), - NULL, - "sox", - sizeof(SoXContext), - CODEC_ID_PCM_S32LE, - CODEC_ID_NONE, - sox_write_header, - sox_write_packet, - sox_write_trailer, + .name = "sox", + .long_name = NULL_IF_CONFIG_SMALL("SoX native format"), + .extensions = "sox", + .priv_data_size = sizeof(SoXContext), + .audio_codec = CODEC_ID_PCM_S32LE, + .video_codec = CODEC_ID_NONE, + .write_header = sox_write_header, + .write_packet = sox_write_packet, + .write_trailer = sox_write_trailer, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/spdifdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/spdifdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/spdifdec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/spdifdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -57,7 +57,7 @@ break; case IEC61937_MPEG2_AAC: init_get_bits(&gbc, buf, AAC_ADTS_HEADER_SIZE * 8); - if (ff_aac_parse_header(&gbc, &aac_hdr)) { + if (avpriv_aac_parse_header(&gbc, &aac_hdr)) { if (s) /* be silent during a probe */ av_log(s, AV_LOG_ERROR, "Invalid AAC packet in IEC 61937\n"); return AVERROR_INVALIDDATA; @@ -205,7 +205,7 @@ if (!s->nb_streams) { /* first packet, create a stream */ - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); if (!st) { av_free_packet(pkt); return AVERROR(ENOMEM); @@ -226,11 +226,10 @@ } AVInputFormat ff_spdif_demuxer = { - "spdif", - NULL_IF_CONFIG_SMALL("IEC 61937 (compressed data in S/PDIF)"), - 0, - spdif_probe, - spdif_read_header, - spdif_read_packet, + .name = "spdif", + .long_name = NULL_IF_CONFIG_SMALL("IEC 61937 (compressed data in S/PDIF)"), + .read_probe = spdif_probe, + .read_header = spdif_read_header, + .read_packet = spdif_read_packet, .flags = AVFMT_GENERIC_INDEX, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/spdifenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/spdifenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/spdifenc.c 2011-05-19 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/spdifenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -86,10 +86,10 @@ } IEC61937Context; static const AVOption options[] = { -{ "spdif_flags", "IEC 61937 encapsulation flags", offsetof(IEC61937Context, spdif_flags), FF_OPT_TYPE_FLAGS, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "spdif_flags" }, -{ "be", "output in big-endian format (for use as s16be)", 0, FF_OPT_TYPE_CONST, {.dbl = SPDIF_FLAG_BIGENDIAN}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "spdif_flags" }, -{ "dtshd_rate", "mux complete DTS frames in HD mode at the specified IEC958 rate (in Hz, default 0=disabled)", offsetof(IEC61937Context, dtshd_rate), FF_OPT_TYPE_INT, {.dbl = 0}, 0, 768000, AV_OPT_FLAG_ENCODING_PARAM }, -{ "dtshd_fallback_time", "min secs to strip HD for after an overflow (-1: till the end, default 60)", offsetof(IEC61937Context, dtshd_fallback), FF_OPT_TYPE_INT, {.dbl = 60}, -1, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, +{ "spdif_flags", "IEC 61937 encapsulation flags", offsetof(IEC61937Context, spdif_flags), AV_OPT_TYPE_FLAGS, {.dbl = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "spdif_flags" }, +{ "be", "output in big-endian format (for use as s16be)", 0, AV_OPT_TYPE_CONST, {.dbl = SPDIF_FLAG_BIGENDIAN}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "spdif_flags" }, +{ "dtshd_rate", "mux complete DTS frames in HD mode at the specified IEC958 rate (in Hz, default 0=disabled)", offsetof(IEC61937Context, dtshd_rate), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 768000, AV_OPT_FLAG_ENCODING_PARAM }, +{ "dtshd_fallback_time", "min secs to strip HD for after an overflow (-1: till the end, default 60)", offsetof(IEC61937Context, dtshd_fallback), AV_OPT_TYPE_INT, {.dbl = 60}, -1, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, { NULL }, }; @@ -220,7 +220,10 @@ } ctx->out_bytes = sizeof(dtshd_start_code) + 2 + pkt_size; - ctx->length_code = ctx->out_bytes; + + /* Align so that (length_code & 0xf) == 0x8. This is reportedly needed + * with some receivers, but the exact requirement is unconfirmed. */ + ctx->length_code = FFALIGN(ctx->out_bytes + 0x8, 0x10) - 0x8; av_fast_malloc(&ctx->hd_buf, &ctx->hd_buf_size, ctx->out_bytes); if (!ctx->hd_buf) @@ -349,7 +352,7 @@ int ret; init_get_bits(&gbc, pkt->data, AAC_ADTS_HEADER_SIZE * 8); - ret = ff_aac_parse_header(&gbc, &hdr); + ret = avpriv_aac_parse_header(&gbc, &hdr); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Wrong AAC file format\n"); return AVERROR_INVALIDDATA; @@ -541,16 +544,15 @@ } AVOutputFormat ff_spdif_muxer = { - "spdif", - NULL_IF_CONFIG_SMALL("IEC 61937 (used on S/PDIF - IEC958)"), - NULL, - "spdif", - sizeof(IEC61937Context), - CODEC_ID_AC3, - CODEC_ID_NONE, - spdif_write_header, - spdif_write_packet, - spdif_write_trailer, + .name = "spdif", + .long_name = NULL_IF_CONFIG_SMALL("IEC 61937 (used on S/PDIF - IEC958)"), + .extensions = "spdif", + .priv_data_size = sizeof(IEC61937Context), + .audio_codec = CODEC_ID_AC3, + .video_codec = CODEC_ID_NONE, + .write_header = spdif_write_header, + .write_packet = spdif_write_packet, + .write_trailer = spdif_write_trailer, .flags = AVFMT_NOTIMESTAMPS, .priv_class = &class, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/srtdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/srtdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/srtdec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/srtdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -42,10 +42,10 @@ static int srt_read_header(AVFormatContext *s, AVFormatParameters *ap) { - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); if (!st) return -1; - av_set_pts_info(st, 64, 1, 1000); + avpriv_set_pts_info(st, 64, 1, 1000); st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; st->codec->codec_id = CODEC_ID_SRT; return 0; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/swfdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/swfdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/swfdec.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/swfdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -106,12 +106,13 @@ avio_rl16(pb); avio_r8(pb); /* Check for FLV1 */ - vst = av_new_stream(s, ch_id); + vst = avformat_new_stream(s, NULL); if (!vst) return -1; + vst->id = ch_id; vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, avio_r8(pb)); - av_set_pts_info(vst, 16, 256, swf->frame_rate); + avpriv_set_pts_info(vst, 16, 256, swf->frame_rate); vst->codec->time_base = (AVRational){ 256, swf->frame_rate }; len -= 8; } else if (tag == TAG_STREAMHEAD || tag == TAG_STREAMHEAD2) { @@ -127,18 +128,20 @@ avio_r8(pb); v = avio_r8(pb); swf->samples_per_frame = avio_rl16(pb); - ast = av_new_stream(s, -1); /* -1 to avoid clash with video stream ch_id */ + ast = avformat_new_stream(s, NULL); if (!ast) return -1; + ast->id = -1; /* -1 to avoid clash with video stream ch_id */ ast->codec->channels = 1 + (v&1); ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; ast->codec->codec_id = ff_codec_get_id(swf_audio_codec_tags, (v>>4) & 15); ast->need_parsing = AVSTREAM_PARSE_FULL; sample_rate_code= (v>>2) & 3; if (!sample_rate_code) - return AVERROR(EIO); - ast->codec->sample_rate = 11025 << (sample_rate_code-1); - av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); + ast->codec->sample_rate = 5512; + else + ast->codec->sample_rate = 11025 << (sample_rate_code-1); + avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate); len -= 4; } else if (tag == TAG_VIDEOFRAME) { int ch_id = avio_rl16(pb); @@ -176,12 +179,13 @@ break; } if (i == s->nb_streams) { - vst = av_new_stream(s, -2); /* -2 to avoid clash with video stream and audio stream */ + vst = avformat_new_stream(s, NULL); if (!vst) return -1; + vst->id = -2; /* -2 to avoid clash with video stream and audio stream */ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_id = CODEC_ID_MJPEG; - av_set_pts_info(vst, 64, 256, swf->frame_rate); + avpriv_set_pts_info(vst, 64, 256, swf->frame_rate); vst->codec->time_base = (AVRational){ 256, swf->frame_rate }; st = vst; } @@ -204,14 +208,13 @@ skip: avio_skip(pb, len); } - return 0; } AVInputFormat ff_swf_demuxer = { - "swf", - NULL_IF_CONFIG_SMALL("Flash format"), - sizeof(SWFContext), - swf_probe, - swf_read_header, - swf_read_packet, + .name = "swf", + .long_name = NULL_IF_CONFIG_SMALL("Flash format"), + .priv_data_size = sizeof(SWFContext), + .read_probe = swf_probe, + .read_header = swf_read_header, + .read_packet = swf_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/swfenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/swfenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/swfenc.c 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/swfenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -507,29 +507,28 @@ #if CONFIG_SWF_MUXER AVOutputFormat ff_swf_muxer = { - "swf", - NULL_IF_CONFIG_SMALL("Flash format"), - "application/x-shockwave-flash", - "swf", - sizeof(SWFContext), - CODEC_ID_MP3, - CODEC_ID_FLV1, - swf_write_header, - swf_write_packet, - swf_write_trailer, + .name = "swf", + .long_name = NULL_IF_CONFIG_SMALL("Flash format"), + .mime_type = "application/x-shockwave-flash", + .extensions = "swf", + .priv_data_size = sizeof(SWFContext), + .audio_codec = CODEC_ID_MP3, + .video_codec = CODEC_ID_FLV1, + .write_header = swf_write_header, + .write_packet = swf_write_packet, + .write_trailer = swf_write_trailer, }; #endif #if CONFIG_AVM2_MUXER AVOutputFormat ff_avm2_muxer = { - "avm2", - NULL_IF_CONFIG_SMALL("Flash 9 (AVM2) format"), - "application/x-shockwave-flash", - NULL, - sizeof(SWFContext), - CODEC_ID_MP3, - CODEC_ID_FLV1, - swf_write_header, - swf_write_packet, - swf_write_trailer, + .name = "avm2", + .long_name = NULL_IF_CONFIG_SMALL("Flash 9 (AVM2) format"), + .mime_type = "application/x-shockwave-flash", + .priv_data_size = sizeof(SWFContext), + .audio_codec = CODEC_ID_MP3, + .video_codec = CODEC_ID_FLV1, + .write_header = swf_write_header, + .write_packet = swf_write_packet, + .write_trailer = swf_write_trailer, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tcp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tcp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tcp.c 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tcp.c 2012-01-11 00:34:30.000000000 +0000 @@ -39,7 +39,7 @@ { struct addrinfo hints, *ai, *cur_ai; int port, fd = -1; - TCPContext *s = NULL; + TCPContext *s = h->priv_data; int listen_socket = 0; const char *p; char buf[256]; @@ -100,7 +100,7 @@ struct pollfd p = {fd, POLLOUT, 0}; ret = ff_neterrno(); if (ret == AVERROR(EINTR)) { - if (url_interrupt_cb()) { + if (ff_check_interrupt(&h->interrupt_callback)) { ret = AVERROR_EXIT; goto fail1; } @@ -112,7 +112,7 @@ /* wait until we are connected or until abort */ while(timeout--) { - if (url_interrupt_cb()) { + if (ff_check_interrupt(&h->interrupt_callback)) { ret = AVERROR_EXIT; goto fail1; } @@ -135,12 +135,6 @@ goto fail; } } - s = av_malloc(sizeof(TCPContext)); - if (!s) { - freeaddrinfo(ai); - return AVERROR(ENOMEM); - } - h->priv_data = s; h->is_streamed = 1; s->fd = fd; freeaddrinfo(ai); @@ -193,7 +187,6 @@ { TCPContext *s = h->priv_data; closesocket(s->fd); - av_free(s); return 0; } @@ -210,4 +203,6 @@ .url_write = tcp_write, .url_close = tcp_close, .url_get_file_handle = tcp_get_file_handle, + .priv_data_size = sizeof(TCPContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/thp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/thp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/thp.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/thp.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,7 +20,9 @@ */ #include "libavutil/intreadwrite.h" +#include "libavutil/intfloat.h" #include "avformat.h" +#include "internal.h" typedef struct ThpDemuxContext { int version; @@ -67,7 +69,7 @@ avio_rb32(pb); /* Max buf size. */ avio_rb32(pb); /* Max samples. */ - thp->fps = av_d2q(av_int2flt(avio_rb32(pb)), INT_MAX); + thp->fps = av_d2q(av_int2float(avio_rb32(pb)), INT_MAX); thp->framecnt = avio_rb32(pb); thp->first_framesz = avio_rb32(pb); avio_rb32(pb); /* Data size. */ @@ -93,13 +95,13 @@ break; /* Video component. */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); /* The denominator and numerator are switched because 1/fps is required. */ - av_set_pts_info(st, 64, thp->fps.den, thp->fps.num); + avpriv_set_pts_info(st, 64, thp->fps.den, thp->fps.num); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_THP; st->codec->codec_tag = 0; /* no fourcc */ @@ -116,7 +118,7 @@ break; /* Audio component. */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -126,7 +128,7 @@ st->codec->channels = avio_rb32(pb); /* numChannels. */ st->codec->sample_rate = avio_rb32(pb); /* Frequency. */ - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); thp->audio_stream_index = st->index; thp->has_audio = 1; @@ -188,10 +190,10 @@ } AVInputFormat ff_thp_demuxer = { - "thp", - NULL_IF_CONFIG_SMALL("THP"), - sizeof(ThpDemuxContext), - thp_probe, - thp_read_header, - thp_read_packet + .name = "thp", + .long_name = NULL_IF_CONFIG_SMALL("THP"), + .priv_data_size = sizeof(ThpDemuxContext), + .read_probe = thp_probe, + .read_header = thp_read_header, + .read_packet = thp_read_packet }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tiertexseq.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tiertexseq.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tiertexseq.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tiertexseq.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,7 @@ */ #include "avformat.h" +#include "internal.h" #define SEQ_FRAME_SIZE 6144 #define SEQ_FRAME_W 256 @@ -206,11 +207,11 @@ seq->audio_buffer_full = 0; /* initialize the video decoder stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 32, 1, SEQ_FRAME_RATE); + avpriv_set_pts_info(st, 32, 1, SEQ_FRAME_RATE); seq->video_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_TIERTEXSEQVIDEO; @@ -219,11 +220,11 @@ st->codec->height = SEQ_FRAME_H; /* initialize the audio decoder stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE); + avpriv_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE); seq->audio_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_PCM_S16BE; @@ -303,11 +304,11 @@ } AVInputFormat ff_tiertexseq_demuxer = { - "tiertexseq", - NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ format"), - sizeof(SeqDemuxContext), - seq_probe, - seq_read_header, - seq_read_packet, - seq_read_close, + .name = "tiertexseq", + .long_name = NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ format"), + .priv_data_size = sizeof(SeqDemuxContext), + .read_probe = seq_probe, + .read_header = seq_read_header, + .read_packet = seq_read_packet, + .read_close = seq_read_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/timefilter.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/timefilter.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/timefilter.c 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/timefilter.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -/* - * Delay Locked Loop based time filter - * Copyright (c) 2009 Samalyse - * Copyright (c) 2009 Michael Niedermayer - * Author: Olivier Guilyardi - * Michael Niedermayer - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - - -#include "config.h" -#include "avformat.h" -#include "timefilter.h" - -struct TimeFilter { - /// Delay Locked Loop data. These variables refer to mathematical - /// concepts described in: http://www.kokkinizita.net/papers/usingdll.pdf - double cycle_time; - double feedback2_factor; - double feedback3_factor; - double clock_period; - int count; -}; - -TimeFilter * ff_timefilter_new(double clock_period, double feedback2_factor, double feedback3_factor) -{ - TimeFilter *self = av_mallocz(sizeof(TimeFilter)); - self->clock_period = clock_period; - self->feedback2_factor = feedback2_factor; - self->feedback3_factor = feedback3_factor; - return self; -} - -void ff_timefilter_destroy(TimeFilter *self) -{ - av_freep(&self); -} - -void ff_timefilter_reset(TimeFilter *self) -{ - self->count = 0; -} - -double ff_timefilter_update(TimeFilter *self, double system_time, double period) -{ - self->count++; - if (self->count==1) { - /// init loop - self->cycle_time = system_time; - } else { - double loop_error; - self->cycle_time += self->clock_period * period; - /// calculate loop error - loop_error = system_time - self->cycle_time; - - /// update loop - self->cycle_time += FFMAX(self->feedback2_factor, 1.0/(self->count)) * loop_error; - self->clock_period += self->feedback3_factor * loop_error / period; - } - return self->cycle_time; -} - -#ifdef TEST -#include "libavutil/lfg.h" -#define LFG_MAX ((1LL << 32) - 1) - -#undef printf - -int main(void) -{ - AVLFG prng; - double n0,n1; -#define SAMPLES 1000 - double ideal[SAMPLES]; - double samples[SAMPLES]; -#if 1 - for(n0= 0; n0<40; n0=2*n0+1){ - for(n1= 0; n1<10; n1=2*n1+1){ -#else - {{ - n0=7; - n1=1; -#endif - double best_error= 1000000000; - double bestpar0=1; - double bestpar1=0.001; - int better, i; - - av_lfg_init(&prng, 123); - for(i=0; i - * Michael Niedermayer - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVFORMAT_TIMEFILTER_H -#define AVFORMAT_TIMEFILTER_H - -/** - * Opaque type representing a time filter state - * - * The purpose of this filter is to provide a way to compute accurate time - * stamps that can be compared to wall clock time, especially when dealing - * with two clocks: the system clock and a hardware device clock, such as - * a soundcard. - */ -typedef struct TimeFilter TimeFilter; - - -/** - * Create a new Delay Locked Loop time filter - * - * feedback2_factor and feedback3_factor are the factors used for the - * multiplications that are respectively performed in the second and third - * feedback paths of the loop. - * - * Unless you know what you are doing, you should set these as follow: - * - * o = 2 * M_PI * bandwidth * period - * feedback2_factor = sqrt(2 * o) - * feedback3_factor = o * o - * - * Where bandwidth is up to you to choose. Smaller values will filter out more - * of the jitter, but also take a longer time for the loop to settle. A good - * starting point is something between 0.3 and 3 Hz. - * - * @param clock_period period of the hardware clock in seconds - * (for example 1.0/44100) - * - * For more details about these parameters and background concepts please see: - * http://www.kokkinizita.net/papers/usingdll.pdf - */ -TimeFilter * ff_timefilter_new(double clock_period, double feedback2_factor, double feedback3_factor); - -/** - * Update the filter - * - * This function must be called in real time, at each process cycle. - * - * @param period the device cycle duration in clock_periods. For example, at - * 44.1kHz and a buffer size of 512 frames, period = 512 when clock_period - * was 1.0/44100, or 512/44100 if clock_period was 1. - * - * system_time, in seconds, should be the value of the system clock time, - * at (or as close as possible to) the moment the device hardware interrupt - * occured (or any other event the device clock raises at the beginning of a - * cycle). - * - * @return the filtered time, in seconds - */ -double ff_timefilter_update(TimeFilter *self, double system_time, double period); - -/** - * Reset the filter - * - * This function should mainly be called in case of XRUN. - * - * Warning: after calling this, the filter is in an undetermined state until - * the next call to ff_timefilter_update() - */ -void ff_timefilter_reset(TimeFilter *); - -/** - * Free all resources associated with the filter - */ -void ff_timefilter_destroy(TimeFilter *); - -#endif /* AVFORMAT_TIMEFILTER_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tls.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tls.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tls.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tls.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,252 @@ +/* + * TLS/SSL Protocol + * Copyright (c) 2011 Martin Storsjo + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "avformat.h" +#include "url.h" +#include "libavutil/avstring.h" +#if CONFIG_GNUTLS +#include +#define TLS_read(c, buf, size) gnutls_record_recv(c->session, buf, size) +#define TLS_write(c, buf, size) gnutls_record_send(c->session, buf, size) +#define TLS_shutdown(c) gnutls_bye(c->session, GNUTLS_SHUT_RDWR) +#define TLS_free(c) do { \ + if (c->session) \ + gnutls_deinit(c->session); \ + if (c->cred) \ + gnutls_certificate_free_credentials(c->cred); \ + } while (0) +#elif CONFIG_OPENSSL +#include +#include +#include +#define TLS_read(c, buf, size) SSL_read(c->ssl, buf, size) +#define TLS_write(c, buf, size) SSL_write(c->ssl, buf, size) +#define TLS_shutdown(c) SSL_shutdown(c->ssl) +#define TLS_free(c) do { \ + if (c->ssl) \ + SSL_free(c->ssl); \ + if (c->ctx) \ + SSL_CTX_free(c->ctx); \ + } while (0) +#endif +#include "network.h" +#include "os_support.h" +#include "internal.h" +#if HAVE_POLL_H +#include +#endif + +typedef struct { + const AVClass *class; + URLContext *tcp; +#if CONFIG_GNUTLS + gnutls_session_t session; + gnutls_certificate_credentials_t cred; +#elif CONFIG_OPENSSL + SSL_CTX *ctx; + SSL *ssl; +#endif + int fd; +} TLSContext; + +static int do_tls_poll(URLContext *h, int ret) +{ + TLSContext *c = h->priv_data; + struct pollfd p = { c->fd, 0, 0 }; +#if CONFIG_GNUTLS + if (ret != GNUTLS_E_AGAIN && ret != GNUTLS_E_INTERRUPTED) { + av_log(h, AV_LOG_ERROR, "%s\n", gnutls_strerror(ret)); + return AVERROR(EIO); + } + if (gnutls_record_get_direction(c->session)) + p.events = POLLOUT; + else + p.events = POLLIN; +#elif CONFIG_OPENSSL + ret = SSL_get_error(c->ssl, ret); + if (ret == SSL_ERROR_WANT_READ) { + p.events = POLLIN; + } else if (ret == SSL_ERROR_WANT_WRITE) { + p.events = POLLOUT; + } else { + av_log(h, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL)); + return AVERROR(EIO); + } +#endif + if (h->flags & AVIO_FLAG_NONBLOCK) + return AVERROR(EAGAIN); + while (1) { + int n = poll(&p, 1, 100); + if (n > 0) + break; + if (ff_check_interrupt(&h->interrupt_callback)) + return AVERROR(EINTR); + } + return 0; +} + +static int tls_open(URLContext *h, const char *uri, int flags) +{ + TLSContext *c = h->priv_data; + int ret; + int port; + char buf[200], host[200]; + int numerichost = 0; + struct addrinfo hints = { 0 }, *ai = NULL; + const char *proxy_path; + int use_proxy; + + ff_tls_init(); + + proxy_path = getenv("http_proxy"); + use_proxy = (proxy_path != NULL) && !getenv("no_proxy") && + av_strstart(proxy_path, "http://", NULL); + + av_url_split(NULL, 0, NULL, 0, host, sizeof(host), &port, NULL, 0, uri); + ff_url_join(buf, sizeof(buf), "tcp", NULL, host, port, NULL); + + hints.ai_flags = AI_NUMERICHOST; + if (!getaddrinfo(host, NULL, &hints, &ai)) { + numerichost = 1; + freeaddrinfo(ai); + } + + if (use_proxy) { + char proxy_host[200], proxy_auth[200], dest[200]; + int proxy_port; + av_url_split(NULL, 0, proxy_auth, sizeof(proxy_auth), + proxy_host, sizeof(proxy_host), &proxy_port, NULL, 0, + proxy_path); + ff_url_join(dest, sizeof(dest), NULL, NULL, host, port, NULL); + ff_url_join(buf, sizeof(buf), "httpproxy", proxy_auth, proxy_host, + proxy_port, "/%s", dest); + } + + ret = ffurl_open(&c->tcp, buf, AVIO_FLAG_READ_WRITE, + &h->interrupt_callback, NULL); + if (ret) + goto fail; + c->fd = ffurl_get_file_handle(c->tcp); + +#if CONFIG_GNUTLS + gnutls_init(&c->session, GNUTLS_CLIENT); + if (!numerichost) + gnutls_server_name_set(c->session, GNUTLS_NAME_DNS, host, strlen(host)); + gnutls_certificate_allocate_credentials(&c->cred); + gnutls_certificate_set_verify_flags(c->cred, 0); + gnutls_credentials_set(c->session, GNUTLS_CRD_CERTIFICATE, c->cred); + gnutls_transport_set_ptr(c->session, (gnutls_transport_ptr_t) + (intptr_t) c->fd); + gnutls_priority_set_direct(c->session, "NORMAL", NULL); + while (1) { + ret = gnutls_handshake(c->session); + if (ret == 0) + break; + if ((ret = do_tls_poll(h, ret)) < 0) + goto fail; + } +#elif CONFIG_OPENSSL + c->ctx = SSL_CTX_new(TLSv1_client_method()); + if (!c->ctx) { + av_log(h, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL)); + ret = AVERROR(EIO); + goto fail; + } + c->ssl = SSL_new(c->ctx); + if (!c->ssl) { + av_log(h, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL)); + ret = AVERROR(EIO); + goto fail; + } + SSL_set_fd(c->ssl, c->fd); + if (!numerichost) + SSL_set_tlsext_host_name(c->ssl, host); + while (1) { + ret = SSL_connect(c->ssl); + if (ret > 0) + break; + if (ret == 0) { + av_log(h, AV_LOG_ERROR, "Unable to negotiate TLS/SSL session\n"); + ret = AVERROR(EIO); + goto fail; + } + if ((ret = do_tls_poll(h, ret)) < 0) + goto fail; + } +#endif + return 0; +fail: + TLS_free(c); + if (c->tcp) + ffurl_close(c->tcp); + ff_tls_deinit(); + return ret; +} + +static int tls_read(URLContext *h, uint8_t *buf, int size) +{ + TLSContext *c = h->priv_data; + while (1) { + int ret = TLS_read(c, buf, size); + if (ret > 0) + return ret; + if (ret == 0) + return AVERROR(EIO); + if ((ret = do_tls_poll(h, ret)) < 0) + return ret; + } + return 0; +} + +static int tls_write(URLContext *h, const uint8_t *buf, int size) +{ + TLSContext *c = h->priv_data; + while (1) { + int ret = TLS_write(c, buf, size); + if (ret > 0) + return ret; + if (ret == 0) + return AVERROR(EIO); + if ((ret = do_tls_poll(h, ret)) < 0) + return ret; + } + return 0; +} + +static int tls_close(URLContext *h) +{ + TLSContext *c = h->priv_data; + TLS_shutdown(c); + TLS_free(c); + ffurl_close(c->tcp); + ff_tls_deinit(); + return 0; +} + +URLProtocol ff_tls_protocol = { + .name = "tls", + .url_open = tls_open, + .url_read = tls_read, + .url_write = tls_write, + .url_close = tls_close, + .priv_data_size = sizeof(TLSContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tmv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tmv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tmv.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tmv.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,14 +20,15 @@ */ /** - * 8088flex TMV file demuxer * @file + * 8088flex TMV file demuxer * @author Daniel Verkamp - * @sa http://www.oldskool.org/pc/8088_Corruption + * @see http://www.oldskool.org/pc/8088_Corruption */ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" enum { TMV_PADDING = 0x01, @@ -73,10 +74,10 @@ if (avio_rl32(pb) != TMV_TAG) return -1; - if (!(vst = av_new_stream(s, 0))) + if (!(vst = avformat_new_stream(s, NULL))) return AVERROR(ENOMEM); - if (!(ast = av_new_stream(s, 0))) + if (!(ast = avformat_new_stream(s, NULL))) return AVERROR(ENOMEM); ast->codec->sample_rate = avio_rl16(pb); @@ -115,7 +116,7 @@ ast->codec->bits_per_coded_sample = 8; ast->codec->bit_rate = ast->codec->sample_rate * ast->codec->bits_per_coded_sample; - av_set_pts_info(ast, 32, 1, ast->codec->sample_rate); + avpriv_set_pts_info(ast, 32, 1, ast->codec->sample_rate); fps.num = ast->codec->sample_rate * ast->codec->channels; fps.den = tmv->audio_chunk_size; @@ -126,7 +127,7 @@ vst->codec->pix_fmt = PIX_FMT_PAL8; vst->codec->width = char_cols * 8; vst->codec->height = char_rows * 8; - av_set_pts_info(vst, 32, fps.den, fps.num); + avpriv_set_pts_info(vst, 32, fps.den, fps.num); if (features & TMV_PADDING) tmv->padding = @@ -179,13 +180,12 @@ } AVInputFormat ff_tmv_demuxer = { - "tmv", - NULL_IF_CONFIG_SMALL("8088flex TMV"), - sizeof(TMVContext), - tmv_probe, - tmv_read_header, - tmv_read_packet, - NULL, - tmv_read_seek, + .name = "tmv", + .long_name = NULL_IF_CONFIG_SMALL("8088flex TMV"), + .priv_data_size = sizeof(TMVContext), + .read_probe = tmv_probe, + .read_header = tmv_read_header, + .read_packet = tmv_read_packet, + .read_seek = tmv_read_seek, .flags = AVFMT_GENERIC_INDEX, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tta.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tta.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tta.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tta.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,6 +21,7 @@ #include "libavcodec/get_bits.h" #include "avformat.h" +#include "internal.h" #include "id3v1.h" #include "libavutil/dict.h" @@ -77,11 +78,11 @@ return -1; } - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 64, 1, samplerate); + avpriv_set_pts_info(st, 64, 1, samplerate); st->start_time = 0; st->duration = datalen; @@ -107,6 +108,10 @@ return -1; } st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE); + if (!st->codec->extradata) { + st->codec->extradata_size = 0; + return AVERROR(ENOMEM); + } avio_seek(s->pb, start_offset, SEEK_SET); avio_read(s->pb, st->codec->extradata, st->codec->extradata_size); @@ -120,8 +125,8 @@ int size, ret; // FIXME! - if (c->currentframe > c->totalframes) - return -1; + if (c->currentframe >= c->totalframes) + return AVERROR_EOF; size = st->index_entries[c->currentframe].size; @@ -145,13 +150,12 @@ } AVInputFormat ff_tta_demuxer = { - "tta", - NULL_IF_CONFIG_SMALL("True Audio"), - sizeof(TTAContext), - tta_probe, - tta_read_header, - tta_read_packet, - NULL, - tta_read_seek, + .name = "tta", + .long_name = NULL_IF_CONFIG_SMALL("True Audio"), + .priv_data_size = sizeof(TTAContext), + .read_probe = tta_probe, + .read_header = tta_read_header, + .read_packet = tta_read_packet, + .read_seek = tta_read_seek, .extensions = "tta", }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tty.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tty.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/tty.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/tty.c 2012-01-11 00:34:30.000000000 +0000 @@ -31,6 +31,7 @@ #include "libavutil/opt.h" #include "libavutil/parseutils.h" #include "avformat.h" +#include "internal.h" #include "sauce.h" typedef struct { @@ -76,7 +77,7 @@ { TtyDemuxContext *s = avctx->priv_data; int width = 0, height = 0, ret = 0; - AVStream *st = av_new_stream(avctx, 0); + AVStream *st = avformat_new_stream(avctx, NULL); AVRational framerate; if (!st) { @@ -95,23 +96,11 @@ av_log(avctx, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s->framerate); goto fail; } -#if FF_API_FORMAT_PARAMETERS - if (ap->width > 0) - width = ap->width; - if (ap->height > 0) - height = ap->height; - if (ap->time_base.num) - framerate = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif st->codec->width = width; st->codec->height = height; - av_set_pts_info(st, 60, framerate.den, framerate.num); + avpriv_set_pts_info(st, 60, framerate.den, framerate.num); /* simulate tty display speed */ -#if FF_API_FORMAT_PARAMETERS - if (ap->sample_rate) - s->chars_per_frame = ap->sample_rate; -#endif s->chars_per_frame = FFMAX(av_q2d(st->time_base)*s->chars_per_frame, 1); if (avctx->pb->seekable) { @@ -154,9 +143,9 @@ #define OFFSET(x) offsetof(TtyDemuxContext, x) #define DEC AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { - { "chars_per_frame", "", offsetof(TtyDemuxContext, chars_per_frame), FF_OPT_TYPE_INT, {.dbl = 6000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM}, - { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, - { "framerate", "", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = "25"}, 0, 0, DEC }, + { "chars_per_frame", "", offsetof(TtyDemuxContext, chars_per_frame), AV_OPT_TYPE_INT, {.dbl = 6000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM}, + { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC }, + { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0, DEC }, { NULL }, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/txd.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/txd.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/txd.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/txd.c 2012-01-11 00:34:30.000000000 +0000 @@ -40,7 +40,7 @@ static int txd_read_header(AVFormatContext *s, AVFormatParameters *ap) { AVStream *st; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; @@ -90,12 +90,10 @@ return 0; } -AVInputFormat ff_txd_demuxer = -{ - "txd", - NULL_IF_CONFIG_SMALL("Renderware TeXture Dictionary"), - 0, - txd_probe, - txd_read_header, - txd_read_packet, +AVInputFormat ff_txd_demuxer = { + .name = "txd", + .long_name = NULL_IF_CONFIG_SMALL("Renderware TeXture Dictionary"), + .read_probe = txd_probe, + .read_header = txd_read_header, + .read_packet = txd_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/udp.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/udp.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/udp.c 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/udp.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,6 +29,7 @@ #include "avformat.h" #include "avio_internal.h" #include "libavutil/parseutils.h" +#include "libavutil/avstring.h" #include #include "internal.h" #include "network.h" @@ -178,8 +179,8 @@ return addr_len; } -static int udp_socket_create(UDPContext *s, - struct sockaddr_storage *addr, int *addr_len) +static int udp_socket_create(UDPContext *s, struct sockaddr_storage *addr, + int *addr_len, const char *localaddr) { int udp_fd = -1; struct addrinfo *res0 = NULL, *res = NULL; @@ -187,7 +188,8 @@ if (((struct sockaddr *) &s->dest_addr)->sa_family) family = ((struct sockaddr *) &s->dest_addr)->sa_family; - res0 = udp_resolve_host(0, s->local_port, SOCK_DGRAM, family, AI_PASSIVE); + res0 = udp_resolve_host(localaddr[0] ? localaddr : NULL, s->local_port, + SOCK_DGRAM, family, AI_PASSIVE); if (res0 == 0) goto fail; for (res = res0; res; res=res->ai_next) { @@ -302,9 +304,9 @@ /* return non zero if error */ static int udp_open(URLContext *h, const char *uri, int flags) { - char hostname[1024]; + char hostname[1024], localaddr[1024] = ""; int port, udp_fd = -1, tmp, bind_ret = -1; - UDPContext *s = NULL; + UDPContext *s = h->priv_data; int is_output; const char *p; char buf[256]; @@ -317,18 +319,13 @@ is_output = !(flags & AVIO_FLAG_READ); - s = av_mallocz(sizeof(UDPContext)); - if (!s) - return AVERROR(ENOMEM); - - h->priv_data = s; s->ttl = 16; s->buffer_size = is_output ? UDP_TX_BUF_SIZE : UDP_MAX_PKT_SIZE; p = strchr(uri, '?'); if (p) { if (av_find_info_tag(buf, sizeof(buf), "reuse", p)) { - const char *endptr=NULL; + char *endptr = NULL; s->reuse_socket = strtol(buf, &endptr, 10); /* assume if no digits were found it is a request to enable it */ if (buf == endptr) @@ -350,6 +347,9 @@ if (av_find_info_tag(buf, sizeof(buf), "connect", p)) { s->is_connected = strtol(buf, NULL, 10); } + if (av_find_info_tag(buf, sizeof(buf), "localaddr", p)) { + av_strlcpy(localaddr, buf, sizeof(localaddr)); + } } /* fill the dest addr */ @@ -365,14 +365,14 @@ goto fail; } - if (s->is_multicast && (h->flags & AVIO_FLAG_READ)) + if ((s->is_multicast || !s->local_port) && (h->flags & AVIO_FLAG_READ)) s->local_port = port; - udp_fd = udp_socket_create(s, &my_addr, &len); + udp_fd = udp_socket_create(s, &my_addr, &len, localaddr); if (udp_fd < 0) goto fail; /* Follow the requested reuse option, unless it's multicast in which - * case enable reuse unless explicitely disabled. + * case enable reuse unless explicitly disabled. */ if (s->reuse_socket || (s->is_multicast && !reuse_specified)) { s->reuse_socket = 1; @@ -435,7 +435,6 @@ fail: if (udp_fd >= 0) closesocket(udp_fd); - av_free(s); return AVERROR(EIO); } @@ -481,7 +480,6 @@ if (s->is_multicast && (h->flags & AVIO_FLAG_READ)) udp_leave_multicast_group(s->udp_fd, (struct sockaddr *)&s->dest_addr); closesocket(s->udp_fd); - av_free(s); return 0; } @@ -492,4 +490,6 @@ .url_write = udp_write, .url_close = udp_close, .url_get_file_handle = udp_get_file_handle, + .priv_data_size = sizeof(UDPContext), + .flags = URL_PROTOCOL_FLAG_NETWORK, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/url.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/url.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/url.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/url.h 2012-01-11 00:34:30.000000000 +0000 @@ -28,11 +28,17 @@ #include "avio.h" #include "libavformat/version.h" +#include "libavutil/dict.h" +#include "libavutil/log.h" + #if !FF_API_OLD_AVIO #define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */ +#define URL_PROTOCOL_FLAG_NETWORK 2 /*< The protocol uses network */ extern int (*url_interrupt_cb)(void); +extern const AVClass ffurl_context_class; + typedef struct URLContext { const AVClass *av_class; /**< information for av_log(). Set by url_open(). */ struct URLProtocol *prot; @@ -42,11 +48,18 @@ int max_packet_size; /**< if non zero, the stream is packetized with this max packet size */ int is_streamed; /**< true if streamed (no seek possible), default = false */ int is_connected; + AVIOInterruptCB interrupt_callback; } URLContext; typedef struct URLProtocol { const char *name; int (*url_open)( URLContext *h, const char *url, int flags); + /** + * This callback is to be used by protocols which open further nested + * protocols. options are then to be passed to ffurl_open()/ffurl_connect() + * for those nested protocols. + */ + int (*url_open2)(URLContext *h, const char *url, int flags, AVDictionary **options); int (*url_read)( URLContext *h, unsigned char *buf, int size); int (*url_write)(URLContext *h, const unsigned char *buf, int size); int64_t (*url_seek)( URLContext *h, int64_t pos, int whence); @@ -71,15 +84,23 @@ * function puts the pointer to the created URLContext * @param flags flags which control how the resource indicated by url * is to be opened + * @param int_cb interrupt callback to use for the URLContext, may be + * NULL * @return 0 in case of success, a negative value corresponding to an * AVERROR code in case of failure */ -int ffurl_alloc(URLContext **h, const char *url, int flags); +int ffurl_alloc(URLContext **puc, const char *filename, int flags, + const AVIOInterruptCB *int_cb); /** * Connect an URLContext that has been allocated by ffurl_alloc + * + * @param options A dictionary filled with options for nested protocols, + * i.e. it will be passed to url_open2() for protocols implementing it. + * This parameter will be destroyed and replaced with a dict containing options + * that were not found. May be NULL. */ -int ffurl_connect(URLContext *h); +int ffurl_connect(URLContext *uc, AVDictionary **options); /** * Create an URLContext for accessing to the resource indicated by @@ -89,10 +110,16 @@ * function puts the pointer to the created URLContext * @param flags flags which control how the resource indicated by url * is to be opened + * @param int_cb interrupt callback to use for the URLContext, may be + * NULL + * @param options A dictionary filled with protocol-private options. On return + * this parameter will be destroyed and replaced with a dict containing options + * that were not found. May be NULL. * @return 0 in case of success, a negative value corresponding to an * AVERROR code in case of failure */ -int ffurl_open(URLContext **h, const char *url, int flags); +int ffurl_open(URLContext **puc, const char *filename, int flags, + const AVIOInterruptCB *int_cb, AVDictionary **options); /** * Read up to size bytes from the resource accessed by h, and store @@ -169,6 +196,19 @@ */ int ffurl_register_protocol(URLProtocol *protocol, int size); +/** + * Check if the user has requested to interrup a blocking function + * associated with cb. + */ +int ff_check_interrupt(AVIOInterruptCB *cb); + +/** + * Iterate over all available protocols. + * + * @param prev result of the previous call to this functions or NULL. + */ +URLProtocol *ffurl_protocol_next(URLProtocol *prev); + /* udp.c */ int ff_udp_set_remote_url(URLContext *h, const char *uri); int ff_udp_get_local_port(URLContext *h); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/utils.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/utils.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/utils.c 2011-06-19 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/utils.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,18 +25,21 @@ #include "avio_internal.h" #include "internal.h" #include "libavcodec/internal.h" +#include "libavcodec/bytestream.h" #include "libavutil/opt.h" #include "libavutil/dict.h" #include "libavutil/pixdesc.h" #include "metadata.h" #include "id3v2.h" +#include "libavutil/avassert.h" #include "libavutil/avstring.h" +#include "libavutil/mathematics.h" +#include "libavutil/parseutils.h" #include "riff.h" #include "audiointerleave.h" #include "url.h" #include #include -#include #include #if CONFIG_NETWORK #include "network.h" @@ -78,7 +81,7 @@ * @param num must be >= 0 * @param den must be >= 1 */ -static void av_frac_init(AVFrac *f, int64_t val, int64_t num, int64_t den) +static void frac_init(AVFrac *f, int64_t val, int64_t num, int64_t den) { num += (den >> 1); if (num >= den) { @@ -96,7 +99,7 @@ * @param f fractional number * @param incr increment, can be positive or negative */ -static void av_frac_add(AVFrac *f, int64_t incr) +static void frac_add(AVFrac *f, int64_t incr) { int64_t num, den; @@ -168,7 +171,7 @@ while (*p != '\0' && *p != ',' && q-ext1extensions && av_match_ext(lpd.filename, fmt->extensions)) { *score_max = AVPROBE_SCORE_MAX/4; @@ -346,6 +349,14 @@ } } + if (!fmt && id3 && *score_max < AVPROBE_SCORE_MAX/4-1) { + while ((fmt = av_iformat_next(fmt))) + if (fmt->extensions && av_match_ext("mp3", fmt->extensions)) { + *score_max = AVPROBE_SCORE_MAX/4-1; + break; + } + } + return fmt; } @@ -459,11 +470,18 @@ err = AVERROR(ENOMEM); goto fail; } - ic->pb = pb; + if (pb && fmt && fmt->flags & AVFMT_NOFILE) + av_log(ic, AV_LOG_WARNING, "Custom AVIOContext makes no sense and " + "will be ignored with AVFMT_NOFILE format.\n"); + else + ic->pb = pb; - err = avformat_open_input(ic_ptr, filename, fmt, &opts); + if ((err = avformat_open_input(&ic, filename, fmt, &opts)) < 0) + goto fail; + ic->pb = ic->pb ? ic->pb : pb; // don't leak custom pb if it wasn't set above fail: + *ic_ptr = ic; av_dict_free(&opts); return err; } @@ -493,9 +511,9 @@ return AVERROR(EINVAL); } - for(probe_size= PROBE_BUF_MIN; probe_size<=max_probe_size && !*fmt && ret >= 0; + for(probe_size= PROBE_BUF_MIN; probe_size<=max_probe_size && !*fmt; probe_size = FFMIN(probe_size<<1, FFMAX(max_probe_size, probe_size+1))) { - int ret, score = probe_size < max_probe_size ? AVPROBE_SCORE_MAX/4 : 0; + int score = probe_size < max_probe_size ? AVPROBE_SCORE_MAX/4 : 0; int buf_offset = (probe_size == PROBE_BUF_MIN) ? 0 : probe_size>>1; if (probe_size < offset) { @@ -560,7 +578,7 @@ #endif /* open input file and probe the format if necessary */ -static int init_input(AVFormatContext *s, const char *filename) +static int init_input(AVFormatContext *s, const char *filename, AVDictionary **options) { int ret; AVProbeData pd = {filename, NULL, 0}; @@ -578,8 +596,9 @@ (!s->iformat && (s->iformat = av_probe_input_format(&pd, 0)))) return 0; - if ((ret = avio_open(&s->pb, filename, AVIO_FLAG_READ)) < 0) - return ret; + if ((ret = avio_open2(&s->pb, filename, AVIO_FLAG_READ, + &s->interrupt_callback, options)) < 0) + return ret; if (s->iformat) return 0; return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0); @@ -589,7 +608,7 @@ { AVFormatContext *s = *ps; int ret = 0; - AVFormatParameters ap = { 0 }; + AVFormatParameters ap = { { 0 } }; AVDictionary *tmp = NULL; if (!s && !(s = avformat_alloc_context())) @@ -603,7 +622,7 @@ if ((ret = av_opt_set_dict(s, &tmp)) < 0) goto fail; - if ((ret = init_input(s, filename)) < 0) + if ((ret = init_input(s, filename, &tmp)) < 0) goto fail; /* check filename in case an image number is expected */ @@ -711,6 +730,16 @@ s->streams[i]->probe_packets = 0; continue; } + + if ((s->flags & AVFMT_FLAG_DISCARD_CORRUPT) && + (pkt->flags & AV_PKT_FLAG_CORRUPT)) { + av_log(s, AV_LOG_WARNING, + "Dropped corrupted packet (stream = %d)\n", + pkt->stream_index); + av_free_packet(pkt); + continue; + } + st= s->streams[pkt->stream_index]; switch(st->codec->codec_type){ @@ -743,7 +772,7 @@ memset(pd->buf+pd->buf_size, 0, AVPROBE_PADDING_SIZE); if(av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)){ - //FIXME we dont reduce score to 0 for the case of running out of buffer space in bytes + //FIXME we do not reduce score to 0 for the case of running out of buffer space in bytes set_codec_from_probe_data(s, st, pd, st->probe_packets > 0 ? AVPROBE_SCORE_MAX/4 : 0); if(st->codec->codec_id != CODEC_ID_PROBE){ pd->buf_size=0; @@ -799,7 +828,10 @@ *pden = 0; switch(st->codec->codec_type) { case AVMEDIA_TYPE_VIDEO: - if(st->time_base.num*1000LL > st->time_base.den){ + if (st->r_frame_rate.num) { + *pnum = st->r_frame_rate.den; + *pden = st->r_frame_rate.num; + } else if(st->time_base.num*1000LL > st->time_base.den) { *pnum = st->time_base.num; *pden = st->time_base.den; }else if(st->codec->time_base.num*1000LL > st->codec->time_base.den){ @@ -835,6 +867,7 @@ case CODEC_ID_MJPEG: case CODEC_ID_MJPEGB: case CODEC_ID_LJPEG: + case CODEC_ID_PRORES: case CODEC_ID_RAWVIDEO: case CODEC_ID_DVVIDEO: case CODEC_ID_HUFFYUV: @@ -936,11 +969,6 @@ delay= st->codec->has_b_frames; presentation_delayed = 0; - // ignore delay caused by frame threading so that the mpeg2-without-dts - // warning will not trigger - if (delay && st->codec->active_thread_type&FF_THREAD_FRAME) - delay -= st->codec->thread_count-1; - /* XXX: need has_b_frame, but cannot get it if the codec is not initialized */ if (delay && @@ -1055,7 +1083,7 @@ FFSWAP(int64_t, st->pts_buffer[i], st->pts_buffer[i+1]); if(pkt->dts == AV_NOPTS_VALUE) pkt->dts= st->pts_buffer[0]; - if(st->codec->codec_id == CODEC_ID_H264){ //we skiped it above so we try here + if(st->codec->codec_id == CODEC_ID_H264){ // we skipped it above so we try here update_initial_timestamps(s, pkt->stream_index, pkt->dts, pkt->pts); // this should happen on the first packet } if(pkt->dts > st->cur_dts) @@ -1080,7 +1108,7 @@ } -static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt) +static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) { AVStream *st; int len, ret, i; @@ -1129,7 +1157,7 @@ st->cur_pkt.data = NULL; assert(st->cur_len == 0); }else{ - pkt->destruct = NULL; + pkt->destruct = NULL; } compute_pkt_fields(s, st, st->parser, pkt); @@ -1210,7 +1238,7 @@ } } if(s->debug & FF_FDEBUG_TS) - av_log(s, AV_LOG_DEBUG, "av_read_frame_internal stream=%d, pts=%"PRId64", dts=%"PRId64", size=%d, duration=%d, flags=%d\n", + av_log(s, AV_LOG_DEBUG, "read_frame_internal stream=%d, pts=%"PRId64", dts=%"PRId64", size=%d, duration=%d, flags=%d\n", pkt->stream_index, pkt->pts, pkt->dts, @@ -1221,57 +1249,63 @@ return 0; } +static int read_from_packet_buffer(AVFormatContext *s, AVPacket *pkt) +{ + AVPacketList *pktl = s->packet_buffer; + av_assert0(pktl); + *pkt = pktl->pkt; + s->packet_buffer = pktl->next; + av_freep(&pktl); + return 0; +} + int av_read_frame(AVFormatContext *s, AVPacket *pkt) { - AVPacketList *pktl; - int eof=0; - const int genpts= s->flags & AVFMT_FLAG_GENPTS; + const int genpts = s->flags & AVFMT_FLAG_GENPTS; + int eof = 0; + + if (!genpts) + return s->packet_buffer ? read_from_packet_buffer(s, pkt) : + read_frame_internal(s, pkt); + + for (;;) { + int ret; + AVPacketList *pktl = s->packet_buffer; - for(;;){ - pktl = s->packet_buffer; if (pktl) { - AVPacket *next_pkt= &pktl->pkt; + AVPacket *next_pkt = &pktl->pkt; - if(genpts && next_pkt->dts != AV_NOPTS_VALUE){ + if (next_pkt->dts != AV_NOPTS_VALUE) { int wrap_bits = s->streams[next_pkt->stream_index]->pts_wrap_bits; - while(pktl && next_pkt->pts == AV_NOPTS_VALUE){ - if( pktl->pkt.stream_index == next_pkt->stream_index - && (0 > av_compare_mod(next_pkt->dts, pktl->pkt.dts, 2LL << (wrap_bits - 1))) - && av_compare_mod(pktl->pkt.pts, pktl->pkt.dts, 2LL << (wrap_bits - 1))) { //not b frame - next_pkt->pts= pktl->pkt.dts; + while (pktl && next_pkt->pts == AV_NOPTS_VALUE) { + if (pktl->pkt.stream_index == next_pkt->stream_index && + (av_compare_mod(next_pkt->dts, pktl->pkt.dts, 2LL << (wrap_bits - 1)) < 0) && + av_compare_mod(pktl->pkt.pts, pktl->pkt.dts, 2LL << (wrap_bits - 1))) { //not b frame + next_pkt->pts = pktl->pkt.dts; } - pktl= pktl->next; + pktl = pktl->next; } pktl = s->packet_buffer; } - if( next_pkt->pts != AV_NOPTS_VALUE - || next_pkt->dts == AV_NOPTS_VALUE - || !genpts || eof){ - /* read packet from packet buffer, if there is data */ - *pkt = *next_pkt; - s->packet_buffer = pktl->next; - av_free(pktl); - return 0; - } + /* read packet from packet buffer, if there is data */ + if (!(next_pkt->pts == AV_NOPTS_VALUE && + next_pkt->dts != AV_NOPTS_VALUE && !eof)) + return read_from_packet_buffer(s, pkt); } - if(genpts){ - int ret= av_read_frame_internal(s, pkt); - if(ret<0){ - if(pktl && ret != AVERROR(EAGAIN)){ - eof=1; - continue; - }else - return ret; - } - if(av_dup_packet(add_to_pktbuf(&s->packet_buffer, pkt, - &s->packet_buffer_end)) < 0) - return AVERROR(ENOMEM); - }else{ - assert(!s->packet_buffer); - return av_read_frame_internal(s, pkt); + ret = read_frame_internal(s, pkt); + if (ret < 0) { + if (pktl && ret != AVERROR(EAGAIN)) { + eof = 1; + continue; + } else + return ret; } + + if (av_dup_packet(add_to_pktbuf(&s->packet_buffer, pkt, + &s->packet_buffer_end)) < 0) + return AVERROR(ENOMEM); } } @@ -1356,7 +1390,15 @@ } } -void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp){ +#if FF_API_SEEK_PUBLIC +void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp) +{ + ff_update_cur_dts(s, ref_st, timestamp); +} +#endif + +void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp) +{ int i; for(i = 0; i < s->nb_streams; i++) { @@ -1476,7 +1518,14 @@ wanted_timestamp, flags); } +#if FF_API_SEEK_PUBLIC int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags){ + return ff_seek_frame_binary(s, stream_index, target_ts, flags); +} +#endif + +int ff_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags) +{ AVInputFormat *avif= s->iformat; int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit; int64_t ts_min, ts_max, ts; @@ -1523,7 +1572,7 @@ } } - pos= av_gen_search(s, stream_index, target_ts, pos_min, pos_max, pos_limit, ts_min, ts_max, flags, &ts, avif->read_timestamp); + pos= ff_gen_search(s, stream_index, target_ts, pos_min, pos_max, pos_limit, ts_min, ts_max, flags, &ts, avif->read_timestamp); if(pos<0) return -1; @@ -1531,12 +1580,28 @@ if ((ret = avio_seek(s->pb, pos, SEEK_SET)) < 0) return ret; - av_update_cur_dts(s, st, ts); + ff_update_cur_dts(s, st, ts); return 0; } -int64_t av_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, int64_t pos_min, int64_t pos_max, int64_t pos_limit, int64_t ts_min, int64_t ts_max, int flags, int64_t *ts_ret, int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )){ +#if FF_API_SEEK_PUBLIC +int64_t av_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, + int64_t pos_min, int64_t pos_max, int64_t pos_limit, + int64_t ts_min, int64_t ts_max, int flags, int64_t *ts_ret, + int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )) +{ + return ff_gen_search(s, stream_index, target_ts, pos_min, pos_max, + pos_limit, ts_min, ts_max, flags, ts_ret, + read_timestamp); +} +#endif + +int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, + int64_t pos_min, int64_t pos_max, int64_t pos_limit, + int64_t ts_min, int64_t ts_max, int flags, int64_t *ts_ret, + int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )) +{ int64_t pos, ts; int64_t start_pos, filesize; int no_change; @@ -1642,7 +1707,7 @@ return pos; } -static int av_seek_frame_byte(AVFormatContext *s, int stream_index, int64_t pos, int flags){ +static int seek_frame_byte(AVFormatContext *s, int stream_index, int64_t pos, int flags){ int64_t pos_min, pos_max; #if 0 AVStream *st; @@ -1667,7 +1732,7 @@ return 0; } -static int av_seek_frame_generic(AVFormatContext *s, +static int seek_frame_generic(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { int index; @@ -1683,7 +1748,6 @@ return -1; if(index < 0 || index==st->nb_index_entries-1){ - int i; AVPacket pkt; if(st->nb_index_entries){ @@ -1691,17 +1755,17 @@ ie= &st->index_entries[st->nb_index_entries-1]; if ((ret = avio_seek(s->pb, ie->pos, SEEK_SET)) < 0) return ret; - av_update_cur_dts(s, st, ie->timestamp); + ff_update_cur_dts(s, st, ie->timestamp); }else{ if ((ret = avio_seek(s->pb, s->data_offset, SEEK_SET)) < 0) return ret; } - for(i=0;; i++) { - int ret; + for (;;) { + int read_status; do{ - ret = av_read_frame(s, &pkt); - }while(ret == AVERROR(EAGAIN)); - if(ret<0) + read_status = av_read_frame(s, &pkt); + } while (read_status == AVERROR(EAGAIN)); + if (read_status < 0) break; av_free_packet(&pkt); if(stream_index == pkt.stream_index){ @@ -1722,7 +1786,7 @@ ie = &st->index_entries[index]; if ((ret = avio_seek(s->pb, ie->pos, SEEK_SET)) < 0) return ret; - av_update_cur_dts(s, st, ie->timestamp); + ff_update_cur_dts(s, st, ie->timestamp); return 0; } @@ -1732,10 +1796,12 @@ int ret; AVStream *st; - ff_read_frame_flush(s); - - if(flags & AVSEEK_FLAG_BYTE) - return av_seek_frame_byte(s, stream_index, timestamp, flags); + if (flags & AVSEEK_FLAG_BYTE) { + if (s->iformat->flags & AVFMT_NO_BYTE_SEEK) + return -1; + ff_read_frame_flush(s); + return seek_frame_byte(s, stream_index, timestamp, flags); + } if(stream_index < 0){ stream_index= av_find_default_stream_index(s); @@ -1743,23 +1809,27 @@ return -1; st= s->streams[stream_index]; - /* timestamp for default must be expressed in AV_TIME_BASE units */ + /* timestamp for default must be expressed in AV_TIME_BASE units */ timestamp = av_rescale(timestamp, st->time_base.den, AV_TIME_BASE * (int64_t)st->time_base.num); } /* first, we try the format specific seek */ - if (s->iformat->read_seek) + if (s->iformat->read_seek) { + ff_read_frame_flush(s); ret = s->iformat->read_seek(s, stream_index, timestamp, flags); - else + } else ret = -1; if (ret >= 0) { return 0; } - if(s->iformat->read_timestamp && !(s->iformat->flags & AVFMT_NOBINSEARCH)) - return av_seek_frame_binary(s, stream_index, timestamp, flags); - else if (!(s->iformat->flags & AVFMT_NOGENSEARCH)) - return av_seek_frame_generic(s, stream_index, timestamp, flags); + if (s->iformat->read_timestamp && !(s->iformat->flags & AVFMT_NOBINSEARCH)) { + ff_read_frame_flush(s); + return ff_seek_frame_binary(s, stream_index, timestamp, flags); + } else if (!(s->iformat->flags & AVFMT_NOGENSEARCH)) { + ff_read_frame_flush(s); + return seek_frame_generic(s, stream_index, timestamp, flags); + } else return -1; } @@ -1769,10 +1839,10 @@ if(min_ts > ts || max_ts < ts) return -1; - ff_read_frame_flush(s); - - if (s->iformat->read_seek2) + if (s->iformat->read_seek2) { + ff_read_frame_flush(s); return s->iformat->read_seek2(s, stream_index, min_ts, ts, max_ts, flags); + } if(s->iformat->read_timestamp){ //try to seek via read_timestamp() @@ -1783,7 +1853,7 @@ if(s->iformat->read_seek || 1) return av_seek_frame(s, stream_index, ts, flags | (ts - min_ts > (uint64_t)(max_ts - ts) ? AVSEEK_FLAG_BACKWARD : 0)); - // try some generic seek like av_seek_frame_generic() but with new ts semantics + // try some generic seek like seek_frame_generic() but with new ts semantics } /*******************************************************/ @@ -1793,7 +1863,7 @@ * * @return TRUE if the stream has accurate duration for at least one component. */ -static int av_has_duration(AVFormatContext *ic) +static int has_duration(AVFormatContext *ic) { int i; AVStream *st; @@ -1811,10 +1881,10 @@ * * Also computes the global bitrate if possible. */ -static void av_update_stream_timings(AVFormatContext *ic) +static void update_stream_timings(AVFormatContext *ic) { int64_t start_time, start_time1, end_time, end_time1; - int64_t duration, duration1; + int64_t duration, duration1, filesize; int i; AVStream *st; @@ -1825,33 +1895,28 @@ st = ic->streams[i]; if (st->start_time != AV_NOPTS_VALUE && st->time_base.den) { start_time1= av_rescale_q(st->start_time, st->time_base, AV_TIME_BASE_Q); - if (start_time1 < start_time) - start_time = start_time1; + start_time = FFMIN(start_time, start_time1); if (st->duration != AV_NOPTS_VALUE) { end_time1 = start_time1 + av_rescale_q(st->duration, st->time_base, AV_TIME_BASE_Q); - if (end_time1 > end_time) - end_time = end_time1; + end_time = FFMAX(end_time, end_time1); } } if (st->duration != AV_NOPTS_VALUE) { duration1 = av_rescale_q(st->duration, st->time_base, AV_TIME_BASE_Q); - if (duration1 > duration) - duration = duration1; + duration = FFMAX(duration, duration1); } } if (start_time != INT64_MAX) { ic->start_time = start_time; - if (end_time != INT64_MIN) { - if (end_time - start_time > duration) - duration = end_time - start_time; - } + if (end_time != INT64_MIN) + duration = FFMAX(duration, end_time - start_time); } if (duration != INT64_MIN) { ic->duration = duration; - if (ic->file_size > 0) { + if (ic->pb && (filesize = avio_size(ic->pb)) > 0) { /* compute the bitrate */ - ic->bit_rate = (double)ic->file_size * 8.0 * AV_TIME_BASE / + ic->bit_rate = (double)filesize * 8.0 * AV_TIME_BASE / (double)ic->duration; } } @@ -1862,7 +1927,7 @@ int i; AVStream *st; - av_update_stream_timings(ic); + update_stream_timings(ic); for(i = 0;i < ic->nb_streams; i++) { st = ic->streams[i]; if (st->start_time == AV_NOPTS_VALUE) { @@ -1874,7 +1939,7 @@ } } -static void av_estimate_timings_from_bit_rate(AVFormatContext *ic) +static void estimate_timings_from_bit_rate(AVFormatContext *ic) { int64_t filesize, duration; int bit_rate, i; @@ -1893,9 +1958,8 @@ /* if duration is already set, we believe it */ if (ic->duration == AV_NOPTS_VALUE && - ic->bit_rate != 0 && - ic->file_size != 0) { - filesize = ic->file_size; + ic->bit_rate != 0) { + filesize = ic->pb ? avio_size(ic->pb) : 0; if (filesize > 0) { for(i = 0; i < ic->nb_streams; i++) { st = ic->streams[i]; @@ -1911,7 +1975,7 @@ #define DURATION_MAX_RETRY 3 /* only usable for MPEG-PS streams */ -static void av_estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset) +static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset) { AVPacket pkt1, *pkt = &pkt1; AVStream *st; @@ -1928,7 +1992,7 @@ for (i=0; inb_streams; i++) { st = ic->streams[i]; if (st->start_time == AV_NOPTS_VALUE && st->first_dts == AV_NOPTS_VALUE) - av_log(st->codec, AV_LOG_WARNING, "start time is not set in av_estimate_timings_from_pts\n"); + av_log(st->codec, AV_LOG_WARNING, "start time is not set in estimate_timings_from_pts\n"); if (st->parser) { av_parser_close(st->parser); @@ -1939,42 +2003,43 @@ /* estimate the end time (duration) */ /* XXX: may need to support wrapping */ - filesize = ic->file_size; + filesize = ic->pb ? avio_size(ic->pb) : 0; end_time = AV_NOPTS_VALUE; do{ - offset = filesize - (DURATION_MAX_READ_SIZE<pb, offset, SEEK_SET); - read_size = 0; - for(;;) { - if (read_size >= DURATION_MAX_READ_SIZE<<(FFMAX(retry-1,0))) - break; + avio_seek(ic->pb, offset, SEEK_SET); + read_size = 0; + for(;;) { + if (read_size >= DURATION_MAX_READ_SIZE<<(FFMAX(retry-1,0))) + break; - do{ - ret = av_read_packet(ic, pkt); - }while(ret == AVERROR(EAGAIN)); - if (ret != 0) - break; - read_size += pkt->size; - st = ic->streams[pkt->stream_index]; - if (pkt->pts != AV_NOPTS_VALUE && - (st->start_time != AV_NOPTS_VALUE || - st->first_dts != AV_NOPTS_VALUE)) { - duration = end_time = pkt->pts; - if (st->start_time != AV_NOPTS_VALUE) duration -= st->start_time; - else duration -= st->first_dts; - if (duration < 0) - duration += 1LL<pts_wrap_bits; - if (duration > 0) { - if (st->duration == AV_NOPTS_VALUE || - st->duration < duration) - st->duration = duration; + do { + ret = av_read_packet(ic, pkt); + } while(ret == AVERROR(EAGAIN)); + if (ret != 0) + break; + read_size += pkt->size; + st = ic->streams[pkt->stream_index]; + if (pkt->pts != AV_NOPTS_VALUE && + (st->start_time != AV_NOPTS_VALUE || + st->first_dts != AV_NOPTS_VALUE)) { + duration = end_time = pkt->pts; + if (st->start_time != AV_NOPTS_VALUE) + duration -= st->start_time; + else + duration -= st->first_dts; + if (duration < 0) + duration += 1LL<pts_wrap_bits; + if (duration > 0) { + if (st->duration == AV_NOPTS_VALUE || st->duration < duration) + st->duration = duration; + } } + av_free_packet(pkt); } - av_free_packet(pkt); - } }while( end_time==AV_NOPTS_VALUE && filesize > (DURATION_MAX_READ_SIZE<pb); - if (file_size < 0) - file_size = 0; + file_size = FFMAX(0, file_size); } - ic->file_size = file_size; if ((!strcmp(ic->iformat->name, "mpeg") || !strcmp(ic->iformat->name, "mpegts")) && file_size && ic->pb->seekable) { /* get accurate estimate from the PTSes */ - av_estimate_timings_from_pts(ic, old_offset); - } else if (av_has_duration(ic)) { + estimate_timings_from_pts(ic, old_offset); + } else if (has_duration(ic)) { /* at least one component has timings - we use them for all the components */ fill_all_stream_timings(ic); } else { av_log(ic, AV_LOG_WARNING, "Estimating duration from bitrate, this may be inaccurate\n"); /* less precise: use bitrate info */ - av_estimate_timings_from_bit_rate(ic); + estimate_timings_from_bit_rate(ic); } - av_update_stream_timings(ic); + update_stream_timings(ic); { int i; @@ -2036,74 +2099,78 @@ } } -static int has_codec_parameters(AVCodecContext *enc) +static int has_codec_parameters(AVCodecContext *avctx) { int val; - switch(enc->codec_type) { + switch (avctx->codec_type) { case AVMEDIA_TYPE_AUDIO: - val = enc->sample_rate && enc->channels && enc->sample_fmt != AV_SAMPLE_FMT_NONE; - if(!enc->frame_size && - (enc->codec_id == CODEC_ID_VORBIS || - enc->codec_id == CODEC_ID_AAC || - enc->codec_id == CODEC_ID_MP1 || - enc->codec_id == CODEC_ID_MP2 || - enc->codec_id == CODEC_ID_MP3 || - enc->codec_id == CODEC_ID_SPEEX)) + val = avctx->sample_rate && avctx->channels && avctx->sample_fmt != AV_SAMPLE_FMT_NONE; + if (!avctx->frame_size && + (avctx->codec_id == CODEC_ID_VORBIS || + avctx->codec_id == CODEC_ID_AAC || + avctx->codec_id == CODEC_ID_MP1 || + avctx->codec_id == CODEC_ID_MP2 || + avctx->codec_id == CODEC_ID_MP3 || + avctx->codec_id == CODEC_ID_CELT)) return 0; break; case AVMEDIA_TYPE_VIDEO: - val = enc->width && enc->pix_fmt != PIX_FMT_NONE; + val = avctx->width && avctx->pix_fmt != PIX_FMT_NONE; break; default: val = 1; break; } - return enc->codec_id != CODEC_ID_NONE && val != 0; + return avctx->codec_id != CODEC_ID_NONE && val != 0; } static int has_decode_delay_been_guessed(AVStream *st) { return st->codec->codec_id != CODEC_ID_H264 || - st->codec_info_nb_frames >= 6 + st->codec->has_b_frames; + st->info->nb_decoded_frames >= 6; } -static int try_decode_frame(AVStream *st, AVPacket *avpkt) +static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **options) { - int16_t *samples; AVCodec *codec; - int got_picture, data_size, ret=0; + int got_picture = 1, ret = 0; AVFrame picture; + AVPacket pkt = *avpkt; if(!st->codec->codec){ codec = avcodec_find_decoder(st->codec->codec_id); if (!codec) return -1; - ret = avcodec_open(st->codec, codec); + ret = avcodec_open2(st->codec, codec, options); if (ret < 0) return ret; } - if(!has_codec_parameters(st->codec) || !has_decode_delay_been_guessed(st)){ + while ((pkt.size > 0 || (!pkt.data && got_picture)) && + ret >= 0 && + (!has_codec_parameters(st->codec) || + !has_decode_delay_been_guessed(st) || + (!st->codec_info_nb_frames && st->codec->codec->capabilities & CODEC_CAP_CHANNEL_CONF))) { + got_picture = 0; + avcodec_get_frame_defaults(&picture); switch(st->codec->codec_type) { case AVMEDIA_TYPE_VIDEO: - avcodec_get_frame_defaults(&picture); ret = avcodec_decode_video2(st->codec, &picture, - &got_picture, avpkt); + &got_picture, &pkt); break; case AVMEDIA_TYPE_AUDIO: - data_size = FFMAX(avpkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE); - samples = av_malloc(data_size); - if (!samples) - goto fail; - ret = avcodec_decode_audio3(st->codec, samples, - &data_size, avpkt); - av_free(samples); + ret = avcodec_decode_audio4(st->codec, &picture, &got_picture, &pkt); break; default: break; } + if (ret >= 0) { + if (got_picture) + st->info->nb_decoded_frames++; + pkt.data += ret; + pkt.size -= ret; + } } - fail: return ret; } @@ -2125,7 +2192,7 @@ return tags[i].id; } for(i=0; tags[i].id != CODEC_ID_NONE; i++) { - if (ff_toupper4(tag) == ff_toupper4(tags[i].tag)) + if (avpriv_toupper4(tag) == avpriv_toupper4(tags[i].tag)) return tags[i].id; } return CODEC_ID_NONE; @@ -2197,21 +2264,25 @@ return 0; } +#if FF_API_FORMAT_PARAMETERS int av_find_stream_info(AVFormatContext *ic) { + return avformat_find_stream_info(ic, NULL); +} +#endif + +int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) +{ int i, count, ret, read_size, j; AVStream *st; AVPacket pkt1, *pkt; int64_t old_offset = avio_tell(ic->pb); + int orig_nb_streams = ic->nb_streams; // new streams might appear, no options for those for(i=0;inb_streams;i++) { AVCodec *codec; st = ic->streams[i]; - if (st->codec->codec_id == CODEC_ID_AAC) { - st->codec->sample_rate = 0; - st->codec->frame_size = 0; - st->codec->channels = 0; - } + if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO || st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) { /* if(!st->time_base.num) @@ -2229,22 +2300,15 @@ assert(!st->codec->codec); codec = avcodec_find_decoder(st->codec->codec_id); - /* Force decoding of at least one frame of codec data - * this makes sure the codec initializes the channel configuration - * and does not trust the values from the container. - */ - if (codec && codec->capabilities & CODEC_CAP_CHANNEL_CONF) - st->codec->channels = 0; - /* Ensure that subtitle_header is properly set. */ if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE && codec && !st->codec->codec) - avcodec_open(st->codec, codec); + avcodec_open2(st->codec, codec, options ? &options[i] : NULL); //try to just open decoders, in case this is enough to get parameters if(!has_codec_parameters(st->codec)){ if (codec && !st->codec->codec) - avcodec_open(st->codec, codec); + avcodec_open2(st->codec, codec, options ? &options[i] : NULL); } } @@ -2255,7 +2319,7 @@ count = 0; read_size = 0; for(;;) { - if(url_interrupt_cb()){ + if (ff_check_interrupt(&ic->interrupt_callback)){ ret= AVERROR_EXIT; av_log(ic, AV_LOG_DEBUG, "interrupted\n"); break; @@ -2305,12 +2369,27 @@ /* NOTE: a new stream can be added there if no header in file (AVFMTCTX_NOHEADER) */ - ret = av_read_frame_internal(ic, &pkt1); - if (ret < 0 && ret != AVERROR(EAGAIN)) { - /* EOF or error */ + ret = read_frame_internal(ic, &pkt1); + if (ret == AVERROR(EAGAIN)) + continue; + + if (ret < 0) { + /* EOF or error*/ + AVPacket empty_pkt = { 0 }; + int err; + av_init_packet(&empty_pkt); + ret = -1; /* we could not have all the codec parameters before EOF */ for(i=0;inb_streams;i++) { st = ic->streams[i]; + + /* flush the decoders */ + while ((err = try_decode_frame(st, &empty_pkt, + (options && i < orig_nb_streams) ? + &options[i] : NULL)) >= 0) + if (has_codec_parameters(st->codec)) + break; + if (!has_codec_parameters(st->codec)){ char buf[256]; avcodec_string(buf, sizeof(buf), st->codec, 0); @@ -2322,9 +2401,6 @@ break; } - if (ret == AVERROR(EAGAIN)) - continue; - pkt= add_to_pktbuf(&ic->packet_buffer, &pkt1, &ic->packet_buffer_end); if ((ret = av_dup_packet(pkt)) < 0) goto find_stream_info_err; @@ -2341,9 +2417,9 @@ } { int64_t last = st->info->last_dts; - int64_t duration= pkt->dts - last; - if(pkt->dts != AV_NOPTS_VALUE && last != AV_NOPTS_VALUE && duration>0){ + if(pkt->dts != AV_NOPTS_VALUE && last != AV_NOPTS_VALUE && pkt->dts > last){ + int64_t duration= pkt->dts - last; double dur= duration * av_q2d(st->time_base); // if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO) @@ -2353,7 +2429,7 @@ for (i=1; iinfo->duration_error); i++) { int framerate= get_std_framerate(i); int ticks= lrintf(dur*framerate/(1001*12)); - double error= dur - ticks*1001*12/(double)framerate; + double error = dur - (double)ticks*1001*12 / framerate; st->info->duration_error[i] += error*error; } st->info->duration_count++; @@ -2377,9 +2453,13 @@ /* if still no information, we try to open the codec and to decompress the frame. We try to avoid that in most cases as it takes longer and uses more memory. For MPEG-4, we need to - decompress for QuickTime. */ - if (!has_codec_parameters(st->codec) || !has_decode_delay_been_guessed(st)) - try_decode_frame(st, pkt); + decompress for QuickTime. + + If CODEC_CAP_CHANNEL_CONF is set this will force decoding of at + least one frame of codec data, this makes sure the codec initializes + the channel configuration and does not only trust the values from the container. + */ + try_decode_frame(st, pkt, (options && i < orig_nb_streams ) ? &options[i] : NULL); st->codec_info_nb_frames++; count++; @@ -2398,9 +2478,6 @@ (st->codec_info_nb_frames-2)*(int64_t)st->time_base.den, st->info->codec_info_duration*(int64_t)st->time_base.num, 60000); if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { - if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample) - st->codec->codec_tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt); - // the check for tb_unreliable() is not completely correct, since this is not about handling // a unreliable/inexact time base, but a time base that is finer than necessary, as e.g. // ipmovie.c produces. @@ -2457,7 +2534,7 @@ } } - av_estimate_timings(ic, old_offset); + estimate_timings(ic, old_offset); compute_chapters_end(ic); @@ -2487,8 +2564,11 @@ #endif find_stream_info_err: - for (i=0; i < ic->nb_streams; i++) + for (i=0; i < ic->nb_streams; i++) { + if (ic->streams[i]->codec) + ic->streams[i]->codec->thread_count = 0; av_freep(&ic->streams[i]->info); + } return ret; } @@ -2576,6 +2656,7 @@ return AVERROR(ENOSYS); } +#if FF_API_FORMAT_PARAMETERS void av_close_input_stream(AVFormatContext *s) { flush_packet_queue(s); @@ -2583,6 +2664,7 @@ s->iformat->read_close(s); avformat_free_context(s); } +#endif void avformat_free_context(AVFormatContext *s) { @@ -2626,17 +2708,39 @@ av_free(s); } +#if FF_API_CLOSE_INPUT_FILE void av_close_input_file(AVFormatContext *s) { + avformat_close_input(&s); +} +#endif + +void avformat_close_input(AVFormatContext **ps) +{ + AVFormatContext *s = *ps; AVIOContext *pb = (s->iformat->flags & AVFMT_NOFILE) || (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb; - av_close_input_stream(s); + flush_packet_queue(s); + if (s->iformat->read_close) + s->iformat->read_close(s); + avformat_free_context(s); + *ps = NULL; if (pb) avio_close(pb); } +#if FF_API_NEW_STREAM AVStream *av_new_stream(AVFormatContext *s, int id) { + AVStream *st = avformat_new_stream(s, NULL); + if (st) + st->id = id; + return st; +} +#endif + +AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c) +{ AVStream *st; int i; AVStream **streams; @@ -2656,13 +2760,12 @@ return NULL; } - st->codec= avcodec_alloc_context(); + st->codec = avcodec_alloc_context3(c); if (s->iformat) { /* no default bitrate if decoding */ st->codec->bit_rate = 0; } st->index = s->nb_streams; - st->id = id; st->start_time = AV_NOPTS_VALUE; st->duration = AV_NOPTS_VALUE; /* we set the current DTS to 0 so that formats without any timestamps @@ -2674,7 +2777,7 @@ st->probe_packets = MAX_PROBE_PACKETS; /* default pts setting is MPEG-like */ - av_set_pts_info(st, 33, 1, 90000); + avpriv_set_pts_info(st, 33, 1, 90000); st->last_IP_pts = AV_NOPTS_VALUE; for(i=0; ipts_buffer[i]= AV_NOPTS_VALUE; @@ -2709,7 +2812,7 @@ return program; } -AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, int64_t start, int64_t end, const char *title) +AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base, int64_t start, int64_t end, const char *title) { AVChapter *chapter = NULL; int i; @@ -2777,7 +2880,7 @@ for (n = 0; s->oformat->codec_tag[n]; n++) { avctag = s->oformat->codec_tag[n]; while (avctag->id != CODEC_ID_NONE) { - if (ff_toupper4(avctag->tag) == ff_toupper4(st->codec->codec_tag)) { + if (avpriv_toupper4(avctag->tag) == avpriv_toupper4(st->codec->codec_tag)) { id = avctag->id; if (id == st->codec->codec_id) return 1; @@ -2921,7 +3024,7 @@ ret = AVERROR_INVALIDDATA; goto fail; } - av_frac_init(&st->pts, 0, 0, den); + frac_init(&st->pts, 0, 0, den); } } @@ -2999,11 +3102,11 @@ likely equal to the encoder delay, but it would be better if we had the real timestamps from the encoder */ if (frame_size >= 0 && (pkt->size || st->pts.num!=st->pts.den>>1 || st->pts.val)) { - av_frac_add(&st->pts, (int64_t)st->time_base.den * frame_size); + frac_add(&st->pts, (int64_t)st->time_base.den * frame_size); } break; case AVMEDIA_TYPE_VIDEO: - av_frac_add(&st->pts, (int64_t)st->time_base.den * st->codec->time_base.num); + frac_add(&st->pts, (int64_t)st->time_base.den * st->codec->time_base.num); break; default: break; @@ -3019,6 +3122,9 @@ return ret; ret= s->oformat->write_packet(s, pkt); + + if (ret >= 0) + s->streams[pkt->stream_index]->nb_frames++; return ret; } @@ -3109,7 +3215,7 @@ * @return 1 if a packet was output, 0 if no packet could be output, * < 0 if an error occurred */ -static int av_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, int flush){ +static int interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, int flush){ if(s->oformat->interleave_packet) return s->oformat->interleave_packet(s, out, in, flush); else @@ -3134,11 +3240,13 @@ for(;;){ AVPacket opkt; - int ret= av_interleave_packet(s, &opkt, pkt, 0); + int ret= interleave_packet(s, &opkt, pkt, 0); if(ret<=0) //FIXME cleanup needed for ret<0 ? return ret; ret= s->oformat->write_packet(s, &opkt); + if (ret >= 0) + s->streams[opkt.stream_index]->nb_frames++; av_free_packet(&opkt); pkt= NULL; @@ -3154,13 +3262,15 @@ for(;;){ AVPacket pkt; - ret= av_interleave_packet(s, &pkt, NULL, 1); + ret= interleave_packet(s, &pkt, NULL, 1); if(ret<0) //FIXME cleanup needed for ret<0 ? goto fail; if(!ret) break; ret= s->oformat->write_packet(s, &pkt); + if (ret >= 0) + s->streams[pkt.stream_index]->nb_frames++; av_free_packet(&pkt); @@ -3175,7 +3285,7 @@ av_freep(&s->streams[i]->priv_data); av_freep(&s->streams[i]->index_entries); } - if (s->iformat && s->iformat->priv_class) + if (s->oformat->priv_class) av_opt_free(s->priv_data); av_freep(&s->priv_data); return ret; @@ -3308,7 +3418,7 @@ int is_output) { int i; - uint8_t *printed = av_mallocz(ic->nb_streams); + uint8_t *printed = ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL; if (ic->nb_streams && !printed) return; @@ -3670,9 +3780,17 @@ return len; } +#if FF_API_SET_PTS_INFO void av_set_pts_info(AVStream *s, int pts_wrap_bits, unsigned int pts_num, unsigned int pts_den) { + avpriv_set_pts_info(s, pts_wrap_bits, pts_num, pts_den); +} +#endif + +void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits, + unsigned int pts_num, unsigned int pts_den) +{ AVRational new_tb; if(av_reduce(&new_tb.num, &new_tb.den, pts_num, pts_den, INT_MAX)){ if(new_tb.num != pts_num) @@ -3865,3 +3983,98 @@ } av_strlcat(buf, rel, size); } + +int64_t ff_iso8601_to_unix_time(const char *datestr) +{ +#if HAVE_STRPTIME + struct tm time1 = {0}, time2 = {0}; + char *ret1, *ret2; + ret1 = strptime(datestr, "%Y - %m - %d %T", &time1); + ret2 = strptime(datestr, "%Y - %m - %dT%T", &time2); + if (ret2 && !ret1) + return av_timegm(&time2); + else + return av_timegm(&time1); +#else + av_log(NULL, AV_LOG_WARNING, "strptime() unavailable on this system, cannot convert " + "the date string.\n"); + return 0; +#endif +} + +int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance) +{ + if (ofmt) { + if (ofmt->query_codec) + return ofmt->query_codec(codec_id, std_compliance); + else if (ofmt->codec_tag) + return !!av_codec_get_tag(ofmt->codec_tag, codec_id); + else if (codec_id == ofmt->video_codec || codec_id == ofmt->audio_codec || + codec_id == ofmt->subtitle_codec) + return 1; + } + return AVERROR_PATCHWELCOME; +} + +int avformat_network_init(void) +{ +#if CONFIG_NETWORK + int ret; + ff_network_inited_globally = 1; + if ((ret = ff_network_init()) < 0) + return ret; + ff_tls_init(); +#endif + return 0; +} + +int avformat_network_deinit(void) +{ +#if CONFIG_NETWORK + ff_network_close(); + ff_tls_deinit(); +#endif + return 0; +} + +int ff_add_param_change(AVPacket *pkt, int32_t channels, + uint64_t channel_layout, int32_t sample_rate, + int32_t width, int32_t height) +{ + uint32_t flags = 0; + int size = 4; + uint8_t *data; + if (!pkt) + return AVERROR(EINVAL); + if (channels) { + size += 4; + flags |= AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT; + } + if (channel_layout) { + size += 8; + flags |= AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT; + } + if (sample_rate) { + size += 4; + flags |= AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE; + } + if (width || height) { + size += 8; + flags |= AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS; + } + data = av_packet_new_side_data(pkt, AV_PKT_DATA_PARAM_CHANGE, size); + if (!data) + return AVERROR(ENOMEM); + bytestream_put_le32(&data, flags); + if (channels) + bytestream_put_le32(&data, channels); + if (channel_layout) + bytestream_put_le64(&data, channel_layout); + if (sample_rate) + bytestream_put_le32(&data, sample_rate); + if (width || height) { + bytestream_put_le32(&data, width); + bytestream_put_le32(&data, height); + } + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vc1test.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vc1test.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vc1test.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vc1test.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,6 +28,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define VC1_EXTRADATA_SIZE 4 @@ -54,7 +55,7 @@ return -1; /* init video codec */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return -1; @@ -71,13 +72,13 @@ avio_skip(pb, 8); fps = avio_rl32(pb); if(fps == 0xFFFFFFFF) - av_set_pts_info(st, 32, 1, 1000); + avpriv_set_pts_info(st, 32, 1, 1000); else{ if (!fps) { av_log(s, AV_LOG_ERROR, "Zero FPS specified, defaulting to 1 FPS\n"); fps = 1; } - av_set_pts_info(st, 24, 1, fps); + avpriv_set_pts_info(st, 24, 1, fps); st->duration = frames; } @@ -110,11 +111,10 @@ } AVInputFormat ff_vc1t_demuxer = { - "vc1test", - NULL_IF_CONFIG_SMALL("VC-1 test bitstream format"), - 0, - vc1t_probe, - vc1t_read_header, - vc1t_read_packet, + .name = "vc1test", + .long_name = NULL_IF_CONFIG_SMALL("VC-1 test bitstream format"), + .read_probe = vc1t_probe, + .read_header = vc1t_read_header, + .read_packet = vc1t_read_packet, .flags = AVFMT_GENERIC_INDEX, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vc1testenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vc1testenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vc1testenc.c 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vc1testenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" +#include "internal.h" typedef struct RCVContext { int frames; @@ -47,7 +48,7 @@ avio_wl32(pb, s->streams[0]->r_frame_rate.den); else avio_wl32(pb, 0xFFFFFFFF); //variable framerate - av_set_pts_info(s->streams[0], 32, 1, 1000); + avpriv_set_pts_info(s->streams[0], 32, 1, 1000); return 0; } @@ -82,14 +83,14 @@ } AVOutputFormat ff_vc1t_muxer = { - "rcv", - NULL_IF_CONFIG_SMALL("VC-1 test bitstream"), - "", - "rcv", - sizeof(RCVContext), - CODEC_ID_NONE, - CODEC_ID_WMV3, - vc1test_write_header, - vc1test_write_packet, - vc1test_write_trailer, + .name = "rcv", + .long_name = NULL_IF_CONFIG_SMALL("VC-1 test bitstream"), + .mime_type = "", + .extensions = "rcv", + .priv_data_size = sizeof(RCVContext), + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_WMV3, + .write_header = vc1test_write_header, + .write_packet = vc1test_write_packet, + .write_trailer = vc1test_write_trailer, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/version.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/version.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/version.h 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/version.h 2012-01-11 00:34:30.000000000 +0000 @@ -21,10 +21,16 @@ #ifndef AVFORMAT_VERSION_H #define AVFORMAT_VERSION_H +/** + * @file + * @ingroup libavf + * Libavformat version macros + */ + #include "libavutil/avutil.h" #define LIBAVFORMAT_VERSION_MAJOR 53 -#define LIBAVFORMAT_VERSION_MINOR 2 +#define LIBAVFORMAT_VERSION_MINOR 19 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ @@ -74,5 +80,50 @@ #ifndef FF_API_FLAG_RTP_HINT #define FF_API_FLAG_RTP_HINT (LIBAVFORMAT_VERSION_MAJOR < 54) #endif +#ifndef FF_API_AVSTREAM_QUALITY +#define FF_API_AVSTREAM_QUALITY (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_LOOP_INPUT +#define FF_API_LOOP_INPUT (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_LOOP_OUTPUT +#define FF_API_LOOP_OUTPUT (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_TIMESTAMP +#define FF_API_TIMESTAMP (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_FILESIZE +#define FF_API_FILESIZE (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_MUXRATE +#define FF_API_MUXRATE (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_RTSP_URL_OPTIONS +#define FF_API_RTSP_URL_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_NEW_STREAM +#define FF_API_NEW_STREAM (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_PRELOAD +#define FF_API_PRELOAD (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_STREAM_COPY +#define FF_API_STREAM_COPY (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_SEEK_PUBLIC +#define FF_API_SEEK_PUBLIC (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_REORDER_PRIVATE +#define FF_API_REORDER_PRIVATE (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_OLD_INTERRUPT_CB +#define FF_API_OLD_INTERRUPT_CB (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_SET_PTS_INFO +#define FF_API_SET_PTS_INFO (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif +#ifndef FF_API_CLOSE_INPUT_FILE +#define FF_API_CLOSE_INPUT_FILE (LIBAVFORMAT_VERSION_MAJOR < 54) +#endif #endif /* AVFORMAT_VERSION_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vocdec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vocdec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vocdec.c 2011-04-05 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vocdec.c 2012-01-11 00:34:30.000000000 +0000 @@ -52,7 +52,7 @@ return AVERROR(ENOSYS); } avio_skip(pb, header_size); - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -157,11 +157,11 @@ } AVInputFormat ff_voc_demuxer = { - "voc", - NULL_IF_CONFIG_SMALL("Creative Voice file format"), - sizeof(VocDecContext), - voc_probe, - voc_read_header, - voc_read_packet, + .name = "voc", + .long_name = NULL_IF_CONFIG_SMALL("Creative Voice file format"), + .priv_data_size = sizeof(VocDecContext), + .read_probe = voc_probe, + .read_header = voc_read_header, + .read_packet = voc_read_packet, .codec_tag=(const AVCodecTag* const []){ff_voc_codec_tags, 0}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vocenc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vocenc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vocenc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vocenc.c 2012-01-11 00:34:30.000000000 +0000 @@ -90,15 +90,15 @@ } AVOutputFormat ff_voc_muxer = { - "voc", - NULL_IF_CONFIG_SMALL("Creative Voice file format"), - "audio/x-voc", - "voc", - sizeof(VocEncContext), - CODEC_ID_PCM_U8, - CODEC_ID_NONE, - voc_write_header, - voc_write_packet, - voc_write_trailer, + .name = "voc", + .long_name = NULL_IF_CONFIG_SMALL("Creative Voice file format"), + .mime_type = "audio/x-voc", + .extensions = "voc", + .priv_data_size = sizeof(VocEncContext), + .audio_codec = CODEC_ID_PCM_U8, + .video_codec = CODEC_ID_NONE, + .write_header = voc_write_header, + .write_packet = voc_write_packet, + .write_trailer = voc_write_trailer, .codec_tag=(const AVCodecTag* const []){ff_voc_codec_tags, 0}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vorbiscomment.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vorbiscomment.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vorbiscomment.h 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vorbiscomment.h 2012-01-11 00:34:30.000000000 +0000 @@ -39,7 +39,7 @@ unsigned *count); /** - * Writes a VorbisComment into a buffer. The buffer, p, must have enough + * Write a VorbisComment into a buffer. The buffer, p, must have enough * data to hold the whole VorbisComment. The minimum size required can be * obtained by passing the same AVDictionary and vendor_string to * ff_vorbiscomment_length() diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vqf.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vqf.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/vqf.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/vqf.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,8 +20,11 @@ */ #include "avformat.h" +#include "internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/dict.h" +#include "libavutil/mathematics.h" +#include "riff.h" typedef struct VqfContext { int frame_bit_len; @@ -43,11 +46,11 @@ return AVPROBE_SCORE_MAX/2; } -static void add_metadata(AVFormatContext *s, const char *tag, +static void add_metadata(AVFormatContext *s, uint32_t tag, unsigned int tag_len, unsigned int remaining) { int len = FFMIN(tag_len, remaining); - char *buf; + char *buf, key[5] = {0}; if (len == UINT_MAX) return; @@ -57,18 +60,42 @@ return; avio_read(s->pb, buf, len); buf[len] = 0; - av_dict_set(&s->metadata, tag, buf, AV_DICT_DONT_STRDUP_VAL); + AV_WL32(key, tag); + av_dict_set(&s->metadata, key, buf, AV_DICT_DONT_STRDUP_VAL); } +static const AVMetadataConv vqf_metadata_conv[] = { + { "(c) ", "copyright" }, + { "ARNG", "arranger" }, + { "AUTH", "author" }, + { "BAND", "band" }, + { "CDCT", "conductor" }, + { "COMT", "comment" }, + { "FILE", "filename" }, + { "GENR", "genre" }, + { "LABL", "publisher" }, + { "MUSC", "composer" }, + { "NAME", "title" }, + { "NOTE", "note" }, + { "PROD", "producer" }, + { "PRSN", "personnel" }, + { "REMX", "remixer" }, + { "SING", "singer" }, + { "TRCK", "track" }, + { "WORD", "words" }, + { 0 }, +}; + static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap) { VqfContext *c = s->priv_data; - AVStream *st = av_new_stream(s, 0); + AVStream *st = avformat_new_stream(s, NULL); int chunk_tag; int rate_flag = -1; int header_size; int read_bitrate = 0; int size; + uint8_t comm_chunk[12]; if (!st) return AVERROR(ENOMEM); @@ -99,49 +126,33 @@ switch(chunk_tag){ case MKTAG('C','O','M','M'): - st->codec->channels = avio_rb32(s->pb) + 1; - read_bitrate = avio_rb32(s->pb); - rate_flag = avio_rb32(s->pb); + avio_read(s->pb, comm_chunk, 12); + st->codec->channels = AV_RB32(comm_chunk ) + 1; + read_bitrate = AV_RB32(comm_chunk + 4); + rate_flag = AV_RB32(comm_chunk + 8); avio_skip(s->pb, len-12); st->codec->bit_rate = read_bitrate*1000; - st->codec->bits_per_coded_sample = 16; - break; - case MKTAG('N','A','M','E'): - add_metadata(s, "title" , len, header_size); - break; - case MKTAG('(','c',')',' '): - add_metadata(s, "copyright", len, header_size); - break; - case MKTAG('A','U','T','H'): - add_metadata(s, "author" , len, header_size); - break; - case MKTAG('A','L','B','M'): - add_metadata(s, "album" , len, header_size); - break; - case MKTAG('T','R','C','K'): - add_metadata(s, "track" , len, header_size); - break; - case MKTAG('C','O','M','T'): - add_metadata(s, "comment" , len, header_size); - break; - case MKTAG('F','I','L','E'): - add_metadata(s, "filename" , len, header_size); break; - case MKTAG('D','S','I','Z'): - add_metadata(s, "size" , len, header_size); - break; - case MKTAG('D','A','T','E'): - add_metadata(s, "date" , len, header_size); + case MKTAG('D','S','I','Z'): // size of compressed data + { + char buf[8] = {0}; + int size = avio_rb32(s->pb); + + snprintf(buf, sizeof(buf), "%d", size); + av_dict_set(&s->metadata, "size", buf, 0); + } break; - case MKTAG('G','E','N','R'): - add_metadata(s, "genre" , len, header_size); + case MKTAG('Y','E','A','R'): // recording date + case MKTAG('E','N','C','D'): // compression date + case MKTAG('E','X','T','R'): // reserved + case MKTAG('_','Y','M','H'): // reserved + case MKTAG('_','N','T','T'): // reserved + case MKTAG('_','I','D','3'): // reserved for ID3 tags + avio_skip(s->pb, FFMIN(len, header_size)); break; default: - av_log(s, AV_LOG_ERROR, "Unknown chunk: %c%c%c%c\n", - ((char*)&chunk_tag)[0], ((char*)&chunk_tag)[1], - ((char*)&chunk_tag)[2], ((char*)&chunk_tag)[3]); - avio_skip(s->pb, FFMIN(len, header_size)); + add_metadata(s, chunk_tag, len, header_size); break; } @@ -190,7 +201,15 @@ return -1; } c->frame_bit_len = st->codec->bit_rate*size/st->codec->sample_rate; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); + + /* put first 12 bytes of COMM chunk in extradata */ + if (!(st->codec->extradata = av_malloc(12 + FF_INPUT_BUFFER_PADDING_SIZE))) + return AVERROR(ENOMEM); + st->codec->extradata_size = 12; + memcpy(st->codec->extradata, comm_chunk, 12); + + ff_metadata_conv_ctx(s, NULL, vqf_metadata_conv); return 0; } @@ -249,13 +268,12 @@ } AVInputFormat ff_vqf_demuxer = { - "vqf", - NULL_IF_CONFIG_SMALL("Nippon Telegraph and Telephone Corporation (NTT) TwinVQ"), - sizeof(VqfContext), - vqf_probe, - vqf_read_header, - vqf_read_packet, - NULL, - vqf_read_seek, - .extensions = "vqf", + .name = "vqf", + .long_name = NULL_IF_CONFIG_SMALL("Nippon Telegraph and Telephone Corporation (NTT) TwinVQ"), + .priv_data_size = sizeof(VqfContext), + .read_probe = vqf_probe, + .read_header = vqf_read_header, + .read_packet = vqf_read_packet, + .read_seek = vqf_read_seek, + .extensions = "vqf,vql,vqe", }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/wav.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/wav.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/wav.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/wav.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,21 +22,86 @@ * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "libavutil/avassert.h" +#include "libavutil/dict.h" +#include "libavutil/log.h" +#include "libavutil/mathematics.h" +#include "libavutil/opt.h" #include "avformat.h" +#include "internal.h" #include "avio_internal.h" #include "pcm.h" #include "riff.h" +#include "avio.h" +#include "metadata.h" typedef struct { + const AVClass *class; int64_t data; int64_t data_end; int64_t minpts; int64_t maxpts; int last_duration; int w64; + int write_bext; } WAVContext; #if CONFIG_WAV_MUXER +static inline void bwf_write_bext_string(AVFormatContext *s, const char *key, int maxlen) +{ + AVDictionaryEntry *tag; + int len = 0; + + if (tag = av_dict_get(s->metadata, key, NULL, 0)) { + len = strlen(tag->value); + len = FFMIN(len, maxlen); + avio_write(s->pb, tag->value, len); + } + + ffio_fill(s->pb, 0, maxlen - len); +} + +static void bwf_write_bext_chunk(AVFormatContext *s) +{ + AVDictionaryEntry *tmp_tag; + uint64_t time_reference = 0; + int64_t bext = ff_start_tag(s->pb, "bext"); + + bwf_write_bext_string(s, "description", 256); + bwf_write_bext_string(s, "originator", 32); + bwf_write_bext_string(s, "originator_reference", 32); + bwf_write_bext_string(s, "origination_date", 10); + bwf_write_bext_string(s, "origination_time", 8); + + if (tmp_tag = av_dict_get(s->metadata, "time_reference", NULL, 0)) + time_reference = strtoll(tmp_tag->value, NULL, 10); + avio_wl64(s->pb, time_reference); + avio_wl16(s->pb, 1); // set version to 1 + + if (tmp_tag = av_dict_get(s->metadata, "umid", NULL, 0)) { + unsigned char umidpart_str[17] = {0}; + int i; + uint64_t umidpart; + int len = strlen(tmp_tag->value+2); + + for (i = 0; i < len/16; i++) { + memcpy(umidpart_str, tmp_tag->value + 2 + (i*16), 16); + umidpart = strtoll(umidpart_str, NULL, 16); + avio_wb64(s->pb, umidpart); + } + ffio_fill(s->pb, 0, 64 - i*8); + } else + ffio_fill(s->pb, 0, 64); // zero UMID + + ffio_fill(s->pb, 0, 190); // Reserved + + if (tmp_tag = av_dict_get(s->metadata, "coding_history", NULL, 0)) + avio_put_str(s->pb, tmp_tag->value); + + ff_end_tag(s->pb, bext); +} + static int wav_write_header(AVFormatContext *s) { WAVContext *wav = s->priv_data; @@ -63,7 +128,10 @@ ff_end_tag(pb, fact); } - av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); + if (wav->write_bext) + bwf_write_bext_chunk(s); + + avpriv_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); wav->maxpts = wav->last_duration = 0; wav->minpts = INT64_MAX; @@ -123,25 +191,40 @@ return 0; } +#define OFFSET(x) offsetof(WAVContext, x) +#define ENC AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "write_bext", "Write BEXT chunk.", OFFSET(write_bext), AV_OPT_TYPE_INT, { 0 }, 0, 1, ENC }, + { NULL }, +}; + +static const AVClass wav_muxer_class = { + .class_name = "WAV muxer", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVOutputFormat ff_wav_muxer = { - "wav", - NULL_IF_CONFIG_SMALL("WAV format"), - "audio/x-wav", - "wav", - sizeof(WAVContext), - CODEC_ID_PCM_S16LE, - CODEC_ID_NONE, - wav_write_header, - wav_write_packet, - wav_write_trailer, + .name = "wav", + .long_name = NULL_IF_CONFIG_SMALL("WAV format"), + .mime_type = "audio/x-wav", + .extensions = "wav", + .priv_data_size = sizeof(WAVContext), + .audio_codec = CODEC_ID_PCM_S16LE, + .video_codec = CODEC_ID_NONE, + .write_header = wav_write_header, + .write_packet = wav_write_packet, + .write_trailer = wav_write_trailer, .codec_tag= (const AVCodecTag* const []){ff_codec_wav_tags, 0}, + .priv_class = &wav_muxer_class, }; #endif /* CONFIG_WAV_MUXER */ #if CONFIG_WAV_DEMUXER -static int64_t next_tag(AVIOContext *pb, unsigned int *tag) +static int64_t next_tag(AVIOContext *pb, uint32_t *tag) { *tag = avio_rl32(pb); return avio_rl32(pb); @@ -184,6 +267,117 @@ return 0; } +static int wav_parse_fmt_tag(AVFormatContext *s, int64_t size, AVStream **st) +{ + AVIOContext *pb = s->pb; + int ret; + + /* parse fmt header */ + *st = avformat_new_stream(s, NULL); + if (!*st) + return AVERROR(ENOMEM); + + ret = ff_get_wav_header(pb, (*st)->codec, size); + if (ret < 0) + return ret; + (*st)->need_parsing = AVSTREAM_PARSE_FULL; + + avpriv_set_pts_info(*st, 64, 1, (*st)->codec->sample_rate); + + return 0; +} + +static inline int wav_parse_bext_string(AVFormatContext *s, const char *key, + int length) +{ + char temp[257]; + int ret; + + av_assert0(length <= sizeof(temp)); + if ((ret = avio_read(s->pb, temp, length)) < 0) + return ret; + + temp[length] = 0; + + if (strlen(temp)) + return av_dict_set(&s->metadata, key, temp, 0); + + return 0; +} + +static int wav_parse_bext_tag(AVFormatContext *s, int64_t size) +{ + char temp[131], *coding_history; + int ret, x; + uint64_t time_reference; + int64_t umid_parts[8], umid_mask = 0; + + if ((ret = wav_parse_bext_string(s, "description", 256)) < 0 || + (ret = wav_parse_bext_string(s, "originator", 32)) < 0 || + (ret = wav_parse_bext_string(s, "originator_reference", 32)) < 0 || + (ret = wav_parse_bext_string(s, "origination_date", 10)) < 0 || + (ret = wav_parse_bext_string(s, "origination_time", 8)) < 0) + return ret; + + time_reference = avio_rl64(s->pb); + snprintf(temp, sizeof(temp), "%"PRIu64, time_reference); + if ((ret = av_dict_set(&s->metadata, "time_reference", temp, 0)) < 0) + return ret; + + /* check if version is >= 1, in which case an UMID may be present */ + if (avio_rl16(s->pb) >= 1) { + for (x = 0; x < 8; x++) + umid_mask |= umid_parts[x] = avio_rb64(s->pb); + + if (umid_mask) { + /* the string formatting below is per SMPTE 330M-2004 Annex C */ + if (umid_parts[4] == 0 && umid_parts[5] == 0 && umid_parts[6] == 0 && umid_parts[7] == 0) { + /* basic UMID */ + snprintf(temp, sizeof(temp), "0x%016"PRIX64"%016"PRIX64"%016"PRIX64"%016"PRIX64, + umid_parts[0], umid_parts[1], umid_parts[2], umid_parts[3]); + } else { + /* extended UMID */ + snprintf(temp, sizeof(temp), "0x%016"PRIX64"%016"PRIX64"%016"PRIX64"%016"PRIX64 + "0x%016"PRIX64"%016"PRIX64"%016"PRIX64"%016"PRIX64, + umid_parts[0], umid_parts[1], umid_parts[2], umid_parts[3], + umid_parts[4], umid_parts[5], umid_parts[6], umid_parts[7]); + } + + if ((ret = av_dict_set(&s->metadata, "umid", temp, 0)) < 0) + return ret; + } + + avio_skip(s->pb, 190); + } else + avio_skip(s->pb, 254); + + if (size > 602) { + /* CodingHistory present */ + size -= 602; + + if (!(coding_history = av_malloc(size+1))) + return AVERROR(ENOMEM); + + if ((ret = avio_read(s->pb, coding_history, size)) < 0) + return ret; + + coding_history[size] = 0; + if ((ret = av_dict_set(&s->metadata, "coding_history", coding_history, + AV_DICT_DONT_STRDUP_VAL)) < 0) + return ret; + } + + return 0; +} + +static const AVMetadataConv wav_metadata_conv[] = { + {"description", "comment" }, + {"originator", "encoded_by" }, + {"origination_date", "date" }, + {"origination_time", "creation_time"}, + {0}, +}; + /* wav input */ static int wav_read_header(AVFormatContext *s, AVFormatParameters *ap) @@ -191,11 +385,12 @@ int64_t size, av_uninit(data_size); int64_t sample_count=0; int rf64; - unsigned int tag; + uint32_t tag, list_type; AVIOContext *pb = s->pb; AVStream *st; WAVContext *wav = s->priv_data; - int ret; + int ret, got_fmt = 0; + int64_t next_tag_ofs, data_ofs = -1; /* check RIFF header */ tag = avio_rl32(pb); @@ -217,49 +412,97 @@ avio_rl64(pb); /* RIFF size */ data_size = avio_rl64(pb); sample_count = avio_rl64(pb); + if (data_size < 0 || sample_count < 0) { + av_log(s, AV_LOG_ERROR, "negative data_size and/or sample_count in " + "ds64: data_size = %"PRId64", sample_count = %"PRId64"\n", + data_size, sample_count); + return AVERROR_INVALIDDATA; + } avio_skip(pb, size - 16); /* skip rest of ds64 chunk */ } - /* parse fmt header */ - size = find_tag(pb, MKTAG('f', 'm', 't', ' ')); - if (size < 0) - return -1; - st = av_new_stream(s, 0); - if (!st) - return AVERROR(ENOMEM); + for (;;) { + size = next_tag(pb, &tag); + next_tag_ofs = avio_tell(pb) + size; - ret = ff_get_wav_header(pb, st->codec, size); - if (ret < 0) - return ret; - st->need_parsing = AVSTREAM_PARSE_FULL; + if (pb->eof_reached) + break; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + switch (tag) { + case MKTAG('f', 'm', 't', ' '): + /* only parse the first 'fmt ' tag found */ + if (!got_fmt && (ret = wav_parse_fmt_tag(s, size, &st) < 0)) { + return ret; + } else if (got_fmt) + av_log(s, AV_LOG_WARNING, "found more than one 'fmt ' tag\n"); - for (;;) { - if (pb->eof_reached) - return -1; - size = next_tag(pb, &tag); - if (tag == MKTAG('d', 'a', 't', 'a')){ + got_fmt = 1; + break; + case MKTAG('d', 'a', 't', 'a'): + if (!got_fmt) { + av_log(s, AV_LOG_ERROR, "found no 'fmt ' tag before the 'data' tag\n"); + return AVERROR_INVALIDDATA; + } + + if (rf64) { + next_tag_ofs = wav->data_end = avio_tell(pb) + data_size; + } else { + data_size = size; + next_tag_ofs = wav->data_end = size ? next_tag_ofs : INT64_MAX; + } + + data_ofs = avio_tell(pb); + + /* don't look for footer metadata if we can't seek or if we don't + * know where the data tag ends + */ + if (!pb->seekable || (!rf64 && !size)) + goto break_loop; + break; + case MKTAG('f','a','c','t'): + if (!sample_count) + sample_count = avio_rl32(pb); + break; + case MKTAG('b','e','x','t'): + if ((ret = wav_parse_bext_tag(s, size)) < 0) + return ret; + break; + case MKTAG('L', 'I', 'S', 'T'): + list_type = avio_rl32(pb); + if (size <= 4) { + av_log(s, AV_LOG_ERROR, "too short LIST"); + return AVERROR_INVALIDDATA; + } + switch (list_type) { + case MKTAG('I', 'N', 'F', 'O'): + if ((ret = ff_read_riff_info(s, size - 4)) < 0) + return ret; + } + break; + } + + /* seek to next tag unless we know that we'll run into EOF */ + if ((avio_size(pb) > 0 && next_tag_ofs >= avio_size(pb)) || + avio_seek(pb, next_tag_ofs, SEEK_SET) < 0) { break; - }else if (tag == MKTAG('f','a','c','t') && !sample_count){ - sample_count = avio_rl32(pb); - size -= 4; } - avio_skip(pb, size); } - if (rf64) - size = data_size; - if (size < 0) - return -1; - if (!size) { - wav->data_end = INT64_MAX; - } else - wav->data_end= avio_tell(pb) + size; +break_loop: + if (data_ofs < 0) { + av_log(s, AV_LOG_ERROR, "no 'data' tag found\n"); + return AVERROR_INVALIDDATA; + } + + avio_seek(pb, data_ofs, SEEK_SET); if (!sample_count && st->codec->channels && av_get_bits_per_sample(st->codec->codec_id)) - sample_count = (size<<3) / (st->codec->channels * (uint64_t)av_get_bits_per_sample(st->codec->codec_id)); + sample_count = (data_size<<3) / (st->codec->channels * (uint64_t)av_get_bits_per_sample(st->codec->codec_id)); if (sample_count) st->duration = sample_count; + + ff_metadata_conv_ctx(s, NULL, wav_metadata_conv); + ff_metadata_conv_ctx(s, NULL, ff_riff_info_conv); + return 0; } @@ -344,14 +587,13 @@ } AVInputFormat ff_wav_demuxer = { - "wav", - NULL_IF_CONFIG_SMALL("WAV format"), - sizeof(WAVContext), - wav_probe, - wav_read_header, - wav_read_packet, - NULL, - wav_read_seek, + .name = "wav", + .long_name = NULL_IF_CONFIG_SMALL("WAV format"), + .priv_data_size = sizeof(WAVContext), + .read_probe = wav_probe, + .read_header = wav_read_header, + .read_packet = wav_read_packet, + .read_seek = wav_read_seek, .flags= AVFMT_GENERIC_INDEX, .codec_tag= (const AVCodecTag* const []){ff_codec_wav_tags, 0}, }; @@ -407,7 +649,7 @@ return -1; } - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -419,7 +661,7 @@ st->need_parsing = AVSTREAM_PARSE_FULL; - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); size = find_guid(pb, guid_data); if (size < 0) { @@ -433,14 +675,13 @@ } AVInputFormat ff_w64_demuxer = { - "w64", - NULL_IF_CONFIG_SMALL("Sony Wave64 format"), - sizeof(WAVContext), - w64_probe, - w64_read_header, - wav_read_packet, - NULL, - wav_read_seek, + .name = "w64", + .long_name = NULL_IF_CONFIG_SMALL("Sony Wave64 format"), + .priv_data_size = sizeof(WAVContext), + .read_probe = w64_probe, + .read_header = w64_read_header, + .read_packet = wav_read_packet, + .read_seek = wav_read_seek, .flags = AVFMT_GENERIC_INDEX, .codec_tag = (const AVCodecTag* const []){ff_codec_wav_tags, 0}, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/wc3movie.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/wc3movie.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/wc3movie.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/wc3movie.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,6 +30,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/dict.h" #include "avformat.h" +#include "internal.h" #define FORM_TAG MKTAG('F', 'O', 'R', 'M') #define MOVE_TAG MKTAG('M', 'O', 'V', 'E') @@ -152,7 +153,6 @@ (uint8_t)fourcc_tag, (uint8_t)(fourcc_tag >> 8), (uint8_t)(fourcc_tag >> 16), (uint8_t)(fourcc_tag >> 24), (uint8_t)fourcc_tag, (uint8_t)(fourcc_tag >> 8), (uint8_t)(fourcc_tag >> 16), (uint8_t)(fourcc_tag >> 24)); return AVERROR_INVALIDDATA; - break; } fourcc_tag = avio_rl32(pb); @@ -164,10 +164,10 @@ } while (fourcc_tag != BRCH_TAG); /* initialize the decoder streams */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 33, 1, WC3_FRAME_FPS); + avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS); wc3->video_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_XAN_WC3; @@ -175,10 +175,10 @@ st->codec->width = wc3->width; st->codec->height = wc3->height; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 33, 1, WC3_FRAME_FPS); + avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS); wc3->audio_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_PCM_S16LE; @@ -293,11 +293,11 @@ } AVInputFormat ff_wc3_demuxer = { - "wc3movie", - NULL_IF_CONFIG_SMALL("Wing Commander III movie format"), - sizeof(Wc3DemuxContext), - wc3_probe, - wc3_read_header, - wc3_read_packet, - wc3_read_close, + .name = "wc3movie", + .long_name = NULL_IF_CONFIG_SMALL("Wing Commander III movie format"), + .priv_data_size = sizeof(Wc3DemuxContext), + .read_probe = wc3_probe, + .read_header = wc3_read_header, + .read_packet = wc3_read_packet, + .read_close = wc3_read_close, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/westwood.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/westwood.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/westwood.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/westwood.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,6 +35,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define AUD_HEADER_SIZE 12 #define AUD_CHUNK_PREAMBLE_SIZE 8 @@ -144,10 +145,10 @@ wsaud->audio_bits = (((header[10] & 0x2) >> 1) + 1) * 8; /* initialize the audio decoder stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 33, 1, wsaud->audio_samplerate); + avpriv_set_pts_info(st, 33, 1, wsaud->audio_samplerate); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = wsaud->audio_type; st->codec->codec_tag = 0; /* no tag */ @@ -221,10 +222,10 @@ unsigned int chunk_size; /* initialize the video decoder stream */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 33, 1, VQA_FRAMERATE); + avpriv_set_pts_info(st, 33, 1, VQA_FRAMERATE); wsvqa->video_stream_index = st->index; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_WS_VQA; @@ -247,10 +248,10 @@ /* initialize the audio decoder stream for VQA v1 or nonzero samplerate */ if (AV_RL16(&header[24]) || (AV_RL16(&header[0]) == 1 && AV_RL16(&header[2]) == 1)) { - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); - av_set_pts_info(st, 33, 1, VQA_FRAMERATE); + avpriv_set_pts_info(st, 33, 1, VQA_FRAMERATE); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; if (AV_RL16(&header[0]) == 1) st->codec->codec_id = CODEC_ID_WESTWOOD_SND1; @@ -325,6 +326,11 @@ chunk_size = AV_RB32(&preamble[4]); skip_byte = chunk_size & 0x01; + if ((chunk_type == SND2_TAG || chunk_type == SND1_TAG) && wsvqa->audio_channels == 0) { + av_log(s, AV_LOG_ERROR, "audio chunk without any audio header information found\n"); + return AVERROR_INVALIDDATA; + } + if ((chunk_type == SND1_TAG) || (chunk_type == SND2_TAG) || (chunk_type == VQFR_TAG)) { if (av_new_packet(pkt, chunk_size)) @@ -368,21 +374,21 @@ #if CONFIG_WSAUD_DEMUXER AVInputFormat ff_wsaud_demuxer = { - "wsaud", - NULL_IF_CONFIG_SMALL("Westwood Studios audio format"), - sizeof(WsAudDemuxContext), - wsaud_probe, - wsaud_read_header, - wsaud_read_packet, + .name = "wsaud", + .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios audio format"), + .priv_data_size = sizeof(WsAudDemuxContext), + .read_probe = wsaud_probe, + .read_header = wsaud_read_header, + .read_packet = wsaud_read_packet, }; #endif #if CONFIG_WSVQA_DEMUXER AVInputFormat ff_wsvqa_demuxer = { - "wsvqa", - NULL_IF_CONFIG_SMALL("Westwood Studios VQA format"), - sizeof(WsVqaDemuxContext), - wsvqa_probe, - wsvqa_read_header, - wsvqa_read_packet, + .name = "wsvqa", + .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios VQA format"), + .priv_data_size = sizeof(WsVqaDemuxContext), + .read_probe = wsvqa_probe, + .read_header = wsvqa_read_header, + .read_packet = wsvqa_read_packet, }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/wtv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/wtv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/wtv.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/wtv.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,14 +26,13 @@ */ #include "libavutil/intreadwrite.h" -#include "libavutil/intfloat_readwrite.h" +#include "libavutil/intfloat.h" #include "libavutil/dict.h" #include "avformat.h" #include "internal.h" #include "riff.h" #include "asf.h" #include "mpegts.h" -#include /* Macros for formating GUIDs */ #define PRI_GUID \ @@ -303,6 +302,8 @@ { WtvFile *wf = pb->opaque; av_free(wf->sectors); + av_free(wf); + av_free(pb->buffer); av_free(pb); } @@ -459,7 +460,7 @@ */ static void oledate_to_iso8601(char *buf, int buf_size, int64_t value) { - time_t t = 631112400LL + 86400*av_int2dbl(value); + time_t t = 631112400LL + 86400*av_int2double(value); strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", gmtime(&t)); } @@ -481,7 +482,7 @@ if (!filesize) goto done; - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) goto done; av_dict_set(&st->metadata, "title", description, 0); @@ -524,7 +525,7 @@ else if (!strcmp(key, "WM/WMRVExpirationDate")) oledate_to_iso8601(buf, buf_size, num); else if (!strcmp(key, "WM/WMRVBitrate")) - snprintf(buf, buf_size, "%f", av_int2dbl(num)); + snprintf(buf, buf_size, "%f", av_int2double(num)); else snprintf(buf, buf_size, "%"PRIi64, num); } else if (type == 5 && length == 2) { @@ -626,14 +627,15 @@ WtvStream *wst = av_mallocz(sizeof(WtvStream)); if (!wst) return NULL; - st = av_new_stream(s, sid); + st = avformat_new_stream(s, NULL); if (!st) return NULL; + st->id = sid; st->priv_data = wst; } st->codec->codec_type = codec_type; st->need_parsing = AVSTREAM_PARSE_FULL; - av_set_pts_info(st, 64, 1, 10000000); + avpriv_set_pts_info(st, 64, 1, 10000000); return st; } @@ -766,7 +768,7 @@ * Parse WTV chunks * @param mode SEEK_TO_DATA or SEEK_TO_PTS * @param seekts timestamp - * @param[out] len Length of data chunk + * @param[out] len_ptr Length of data chunk * @return stream index of data chunk, or <0 on error */ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_ptr) @@ -836,7 +838,7 @@ buf_size = FFMIN(len - consumed, sizeof(buf)); avio_read(pb, buf, buf_size); consumed += buf_size; - ff_parse_mpeg2_descriptor(s, st, 0, &pbuf, buf + buf_size, 0, 0, 0, 0); + ff_parse_mpeg2_descriptor(s, st, 0, &pbuf, buf + buf_size, NULL, 0, 0, NULL); } } else if (!ff_guidcmp(g, EVENTID_AudioTypeSpanningEvent)) { int stream_index = ff_find_stream_index(s, sid); @@ -1093,6 +1095,7 @@ static int read_close(AVFormatContext *s) { WtvContext *wtv = s->priv_data; + av_free(wtv->index_entries); wtvfile_close(wtv->pb); return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/wv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/wv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/wv.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/wv.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/dict.h" #include "avformat.h" +#include "internal.h" #include "apetag.h" #include "id3v1.h" @@ -110,6 +111,9 @@ size = wc->blksize; } wc->flags = AV_RL32(wc->extra + 4); + // blocks with zero samples don't contain actual audio information and should be ignored + if (!AV_RN32(wc->extra)) + return 0; //parse flags bpp = ((wc->flags & 3) + 1) << 3; chan = 1 + !(wc->flags & WV_MONO); @@ -207,11 +211,17 @@ AVStream *st; wc->block_parsed = 0; - if(wv_read_block_header(s, pb, 0) < 0) - return -1; + for(;;){ + if(wv_read_block_header(s, pb, 0) < 0) + return -1; + if(!AV_RN32(wc->extra)) + avio_skip(pb, wc->blksize - 24); + else + break; + } /* now we are ready: build format streams */ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return -1; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; @@ -220,7 +230,7 @@ st->codec->channel_layout = wc->chmask; st->codec->sample_rate = wc->rate; st->codec->bits_per_coded_sample = wc->bpp; - av_set_pts_info(st, 64, 1, wc->rate); + avpriv_set_pts_info(st, 64, 1, wc->rate); st->start_time = 0; st->duration = wc->samples; @@ -241,6 +251,7 @@ WVContext *wc = s->priv_data; int ret; int size, ver, off; + int64_t pos; if (s->pb->eof_reached) return AVERROR(EIO); @@ -249,6 +260,7 @@ return -1; } + pos = wc->pos; off = wc->multichannel ? 4 : 0; if(av_new_packet(pkt, wc->blksize + WV_EXTRA_SIZE + off) < 0) return AVERROR(ENOMEM); @@ -305,7 +317,7 @@ pkt->stream_index = 0; wc->block_parsed = 1; pkt->pts = wc->soff; - av_add_index_entry(s->streams[0], wc->pos, pkt->pts, 0, 0, AVINDEX_KEYFRAME); + av_add_index_entry(s->streams[0], pos, pkt->pts, 0, 0, AVINDEX_KEYFRAME); return 0; } @@ -319,7 +331,8 @@ int64_t pos, pts; /* if found, seek there */ - if (index >= 0){ + if (index >= 0 && + timestamp <= st->index_entries[st->nb_index_entries - 1].timestamp) { wc->block_parsed = 1; avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET); return 0; @@ -342,12 +355,11 @@ } AVInputFormat ff_wv_demuxer = { - "wv", - NULL_IF_CONFIG_SMALL("WavPack"), - sizeof(WVContext), - wv_probe, - wv_read_header, - wv_read_packet, - NULL, - wv_read_seek, + .name = "wv", + .long_name = NULL_IF_CONFIG_SMALL("WavPack"), + .priv_data_size = sizeof(WVContext), + .read_probe = wv_probe, + .read_header = wv_read_header, + .read_packet = wv_read_packet, + .read_seek = wv_read_seek, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/xa.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/xa.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/xa.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/xa.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,6 +29,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" #define XA00_TAG MKTAG('X', 'A', 0, 0) #define XAI0_TAG MKTAG('X', 'A', 'I', 0) @@ -70,7 +71,7 @@ AVStream *st; /*Set up the XA Audio Decoder*/ - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -86,7 +87,7 @@ st->codec->block_align = avio_rl16(pb); st->codec->bits_per_coded_sample = avio_rl16(pb); - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); return 0; } @@ -119,10 +120,10 @@ } AVInputFormat ff_xa_demuxer = { - "xa", - NULL_IF_CONFIG_SMALL("Maxis XA File Format"), - sizeof(MaxisXADemuxContext), - xa_probe, - xa_read_header, - xa_read_packet, + .name = "xa", + .long_name = NULL_IF_CONFIG_SMALL("Maxis XA File Format"), + .priv_data_size = sizeof(MaxisXADemuxContext), + .read_probe = xa_probe, + .read_header = xa_read_header, + .read_packet = xa_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/xmv.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/xmv.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/xmv.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/xmv.c 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,568 @@ +/* + * Microsoft XMV demuxer + * Copyright (c) 2011 Sven Hesse + * Copyright (c) 2011 Matthew Hoops + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Microsoft XMV demuxer + */ + +#include + +#include "libavutil/intreadwrite.h" + +#include "avformat.h" +#include "internal.h" +#include "riff.h" + +#define XMV_MIN_HEADER_SIZE 36 + +#define XMV_AUDIO_ADPCM51_FRONTLEFTRIGHT 1 +#define XMV_AUDIO_ADPCM51_FRONTCENTERLOW 2 +#define XMV_AUDIO_ADPCM51_REARLEFTRIGHT 4 + +#define XMV_AUDIO_ADPCM51 (XMV_AUDIO_ADPCM51_FRONTLEFTRIGHT | \ + XMV_AUDIO_ADPCM51_FRONTCENTERLOW | \ + XMV_AUDIO_ADPCM51_REARLEFTRIGHT) + +typedef struct XMVAudioTrack { + uint16_t compression; + uint16_t channels; + uint32_t sample_rate; + uint16_t bits_per_sample; + uint32_t bit_rate; + uint16_t flags; + uint16_t block_align; + uint16_t block_samples; + + enum CodecID codec_id; +} XMVAudioTrack; + +typedef struct XMVVideoPacket { + /* The decoder stream index for this video packet. */ + int stream_index; + + uint32_t data_size; + uint32_t data_offset; + + uint32_t current_frame; + uint32_t frame_count; + + /* Does the video packet contain extra data? */ + int has_extradata; + + /* Extra data */ + uint8_t extradata[4]; + + int64_t last_pts; + int64_t pts; +} XMVVideoPacket; + +typedef struct XMVAudioPacket { + /* The decoder stream index for this audio packet. */ + int stream_index; + + /* The audio track this packet encodes. */ + XMVAudioTrack *track; + + uint32_t data_size; + uint32_t data_offset; + + uint32_t frame_size; + + uint32_t block_count; +} XMVAudioPacket; + +typedef struct XMVDemuxContext { + uint16_t audio_track_count; + + XMVAudioTrack *audio_tracks; + + uint32_t this_packet_size; + uint32_t next_packet_size; + + uint32_t this_packet_offset; + uint32_t next_packet_offset; + + uint16_t current_stream; + uint16_t stream_count; + + XMVVideoPacket video; + XMVAudioPacket *audio; +} XMVDemuxContext; + +static int xmv_probe(AVProbeData *p) +{ + uint32_t file_version; + + if (p->buf_size < XMV_MIN_HEADER_SIZE) + return 0; + + file_version = AV_RL32(p->buf + 16); + if ((file_version == 0) || (file_version > 4)) + return 0; + + if (!memcmp(p->buf + 12, "xobX", 4)) + return AVPROBE_SCORE_MAX; + + return 0; +} + +static int xmv_read_header(AVFormatContext *s, + AVFormatParameters *ap) +{ + XMVDemuxContext *xmv = s->priv_data; + AVIOContext *pb = s->pb; + AVStream *vst = NULL; + + uint32_t file_version; + uint32_t this_packet_size; + uint16_t audio_track; + + avio_skip(pb, 4); /* Next packet size */ + + this_packet_size = avio_rl32(pb); + + avio_skip(pb, 4); /* Max packet size */ + avio_skip(pb, 4); /* "xobX" */ + + file_version = avio_rl32(pb); + if ((file_version != 4) && (file_version != 2)) + av_log_ask_for_sample(s, "Found uncommon version %d\n", file_version); + + + /* Video track */ + + vst = avformat_new_stream(s, NULL); + if (!vst) + return AVERROR(ENOMEM); + + avpriv_set_pts_info(vst, 32, 1, 1000); + + vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; + vst->codec->codec_id = CODEC_ID_WMV2; + vst->codec->codec_tag = MKBETAG('W', 'M', 'V', '2'); + vst->codec->width = avio_rl32(pb); + vst->codec->height = avio_rl32(pb); + + vst->duration = avio_rl32(pb); + + xmv->video.stream_index = vst->index; + + /* Audio tracks */ + + xmv->audio_track_count = avio_rl16(pb); + + avio_skip(pb, 2); /* Unknown (padding?) */ + + xmv->audio_tracks = av_malloc(xmv->audio_track_count * sizeof(XMVAudioTrack)); + if (!xmv->audio_tracks) + return AVERROR(ENOMEM); + + xmv->audio = av_malloc(xmv->audio_track_count * sizeof(XMVAudioPacket)); + if (!xmv->audio) + return AVERROR(ENOMEM); + + for (audio_track = 0; audio_track < xmv->audio_track_count; audio_track++) { + XMVAudioTrack *track = &xmv->audio_tracks[audio_track]; + XMVAudioPacket *packet = &xmv->audio [audio_track]; + AVStream *ast = NULL; + + track->compression = avio_rl16(pb); + track->channels = avio_rl16(pb); + track->sample_rate = avio_rl32(pb); + track->bits_per_sample = avio_rl16(pb); + track->flags = avio_rl16(pb); + + track->bit_rate = track->bits_per_sample * + track->sample_rate * + track->channels; + track->block_align = 36 * track->channels; + track->block_samples = 64; + track->codec_id = ff_wav_codec_get_id(track->compression, + track->bits_per_sample); + + packet->track = track; + packet->stream_index = -1; + + packet->frame_size = 0; + packet->block_count = 0; + + /* TODO: ADPCM'd 5.1 sound is encoded in three separate streams. + * Those need to be interleaved to a proper 5.1 stream. */ + if (track->flags & XMV_AUDIO_ADPCM51) + av_log(s, AV_LOG_WARNING, "Unsupported 5.1 ADPCM audio stream " + "(0x%04X)\n", track->flags); + + ast = avformat_new_stream(s, NULL); + if (!ast) + return AVERROR(ENOMEM); + + ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; + ast->codec->codec_id = track->codec_id; + ast->codec->codec_tag = track->compression; + ast->codec->channels = track->channels; + ast->codec->sample_rate = track->sample_rate; + ast->codec->bits_per_coded_sample = track->bits_per_sample; + ast->codec->bit_rate = track->bit_rate; + ast->codec->block_align = 36 * track->channels; + + avpriv_set_pts_info(ast, 32, track->block_samples, track->sample_rate); + + packet->stream_index = ast->index; + + ast->duration = vst->duration; + } + + + /** Initialize the packet context */ + + xmv->next_packet_offset = avio_tell(pb); + xmv->next_packet_size = this_packet_size - xmv->next_packet_offset; + xmv->stream_count = xmv->audio_track_count + 1; + + return 0; +} + +static void xmv_read_extradata(uint8_t *extradata, AVIOContext *pb) +{ + /* Read the XMV extradata */ + + uint32_t data = avio_rl32(pb); + + int mspel_bit = !!(data & 0x01); + int loop_filter = !!(data & 0x02); + int abt_flag = !!(data & 0x04); + int j_type_bit = !!(data & 0x08); + int top_left_mv_flag = !!(data & 0x10); + int per_mb_rl_bit = !!(data & 0x20); + int slice_count = (data >> 6) & 7; + + /* Write it back as standard WMV2 extradata */ + + data = 0; + + data |= mspel_bit << 15; + data |= loop_filter << 14; + data |= abt_flag << 13; + data |= j_type_bit << 12; + data |= top_left_mv_flag << 11; + data |= per_mb_rl_bit << 10; + data |= slice_count << 7; + + AV_WB32(extradata, data); +} + +static int xmv_process_packet_header(AVFormatContext *s) +{ + XMVDemuxContext *xmv = s->priv_data; + AVIOContext *pb = s->pb; + + uint8_t data[8]; + uint16_t audio_track; + uint32_t data_offset; + + /* Next packet size */ + xmv->next_packet_size = avio_rl32(pb); + + /* Packet video header */ + + if (avio_read(pb, data, 8) != 8) + return AVERROR(EIO); + + xmv->video.data_size = AV_RL32(data) & 0x007FFFFF; + + xmv->video.current_frame = 0; + xmv->video.frame_count = (AV_RL32(data) >> 23) & 0xFF; + + xmv->video.has_extradata = (data[3] & 0x80) != 0; + + /* Adding the audio data sizes and the video data size keeps you 4 bytes + * short for every audio track. But as playing around with XMV files with + * ADPCM audio showed, taking the extra 4 bytes from the audio data gives + * you either completely distorted audio or click (when skipping the + * remaining 68 bytes of the ADPCM block). Substracting 4 bytes for every + * audio track from the video data works at least for the audio. Probably + * some alignment thing? + * The video data has (always?) lots of padding, so it should work out... + */ + xmv->video.data_size -= xmv->audio_track_count * 4; + + xmv->current_stream = 0; + if (!xmv->video.frame_count) { + xmv->video.frame_count = 1; + xmv->current_stream = 1; + } + + /* Packet audio header */ + + for (audio_track = 0; audio_track < xmv->audio_track_count; audio_track++) { + XMVAudioPacket *packet = &xmv->audio[audio_track]; + + if (avio_read(pb, data, 4) != 4) + return AVERROR(EIO); + + packet->data_size = AV_RL32(data) & 0x007FFFFF; + if ((packet->data_size == 0) && (audio_track != 0)) + /* This happens when I create an XMV with several identical audio + * streams. From the size calculations, duplicating the previous + * stream's size works out, but the track data itself is silent. + * Maybe this should also redirect the offset to the previous track? + */ + packet->data_size = xmv->audio[audio_track - 1].data_size; + + /** Carve up the audio data in frame_count slices */ + packet->frame_size = packet->data_size / xmv->video.frame_count; + packet->frame_size -= packet->frame_size % packet->track->block_align; + } + + /* Packet data offsets */ + + data_offset = avio_tell(pb); + + xmv->video.data_offset = data_offset; + data_offset += xmv->video.data_size; + + for (audio_track = 0; audio_track < xmv->audio_track_count; audio_track++) { + xmv->audio[audio_track].data_offset = data_offset; + data_offset += xmv->audio[audio_track].data_size; + } + + /* Video frames header */ + + /* Read new video extra data */ + if (xmv->video.data_size > 0) { + if (xmv->video.has_extradata) { + xmv_read_extradata(xmv->video.extradata, pb); + + xmv->video.data_size -= 4; + xmv->video.data_offset += 4; + + if (xmv->video.stream_index >= 0) { + AVStream *vst = s->streams[xmv->video.stream_index]; + + assert(xmv->video.stream_index < s->nb_streams); + + if (vst->codec->extradata_size < 4) { + av_free(vst->codec->extradata); + + vst->codec->extradata = + av_malloc(4 + FF_INPUT_BUFFER_PADDING_SIZE); + vst->codec->extradata_size = 4; + } + + memcpy(vst->codec->extradata, xmv->video.extradata, 4); + } + } + } + + return 0; +} + +static int xmv_fetch_new_packet(AVFormatContext *s) +{ + XMVDemuxContext *xmv = s->priv_data; + AVIOContext *pb = s->pb; + int result; + + /* Seek to it */ + xmv->this_packet_offset = xmv->next_packet_offset; + if (avio_seek(pb, xmv->this_packet_offset, SEEK_SET) != xmv->this_packet_offset) + return AVERROR(EIO); + + /* Update the size */ + xmv->this_packet_size = xmv->next_packet_size; + if (xmv->this_packet_size < (12 + xmv->audio_track_count * 4)) + return AVERROR(EIO); + + /* Process the header */ + result = xmv_process_packet_header(s); + if (result) + return result; + + /* Update the offset */ + xmv->next_packet_offset = xmv->this_packet_offset + xmv->this_packet_size; + + return 0; +} + +static int xmv_fetch_audio_packet(AVFormatContext *s, + AVPacket *pkt, uint32_t stream) +{ + XMVDemuxContext *xmv = s->priv_data; + AVIOContext *pb = s->pb; + XMVAudioPacket *audio = &xmv->audio[stream]; + + uint32_t data_size; + uint32_t block_count; + int result; + + /* Seek to it */ + if (avio_seek(pb, audio->data_offset, SEEK_SET) != audio->data_offset) + return AVERROR(EIO); + + if ((xmv->video.current_frame + 1) < xmv->video.frame_count) + /* Not the last frame, get at most frame_size bytes. */ + data_size = FFMIN(audio->frame_size, audio->data_size); + else + /* Last frame, get the rest. */ + data_size = audio->data_size; + + /* Read the packet */ + result = av_get_packet(pb, pkt, data_size); + if (result <= 0) + return result; + + pkt->stream_index = audio->stream_index; + + /* Calculate the PTS */ + + block_count = data_size / audio->track->block_align; + + pkt->duration = block_count; + pkt->pts = audio->block_count; + pkt->dts = AV_NOPTS_VALUE; + + audio->block_count += block_count; + + /* Advance offset */ + audio->data_size -= data_size; + audio->data_offset += data_size; + + return 0; +} + +static int xmv_fetch_video_packet(AVFormatContext *s, + AVPacket *pkt) +{ + XMVDemuxContext *xmv = s->priv_data; + AVIOContext *pb = s->pb; + XMVVideoPacket *video = &xmv->video; + + int result; + uint32_t frame_header; + uint32_t frame_size, frame_timestamp; + uint32_t i; + + /* Seek to it */ + if (avio_seek(pb, video->data_offset, SEEK_SET) != video->data_offset) + return AVERROR(EIO); + + /* Read the frame header */ + frame_header = avio_rl32(pb); + + frame_size = (frame_header & 0x1FFFF) * 4 + 4; + frame_timestamp = (frame_header >> 17); + + if ((frame_size + 4) > video->data_size) + return AVERROR(EIO); + + /* Create the packet */ + result = av_new_packet(pkt, frame_size); + if (result) + return result; + + /* Contrary to normal WMV2 video, the bit stream in XMV's + * WMV2 is little-endian. + * TODO: This manual swap is of course suboptimal. + */ + for (i = 0; i < frame_size; i += 4) + AV_WB32(pkt->data + i, avio_rl32(pb)); + + pkt->stream_index = video->stream_index; + + /* Calculate the PTS */ + + video->last_pts = frame_timestamp + video->pts; + + pkt->duration = 0; + pkt->pts = video->last_pts; + pkt->dts = AV_NOPTS_VALUE; + + video->pts += frame_timestamp; + + /* Keyframe? */ + pkt->flags = (pkt->data[0] & 0x80) ? 0 : AV_PKT_FLAG_KEY; + + /* Advance offset */ + video->data_size -= frame_size + 4; + video->data_offset += frame_size + 4; + + return 0; +} + +static int xmv_read_packet(AVFormatContext *s, + AVPacket *pkt) +{ + XMVDemuxContext *xmv = s->priv_data; + int result; + + if (xmv->video.current_frame == xmv->video.frame_count) { + /* No frames left in this packet, so we fetch a new one */ + + result = xmv_fetch_new_packet(s); + if (result) + return result; + } + + if (xmv->current_stream == 0) { + /* Fetch a video frame */ + + result = xmv_fetch_video_packet(s, pkt); + if (result) + return result; + + } else { + /* Fetch an audio frame */ + + result = xmv_fetch_audio_packet(s, pkt, xmv->current_stream - 1); + if (result) + return result; + } + + /* Increase our counters */ + if (++xmv->current_stream >= xmv->stream_count) { + xmv->current_stream = 0; + xmv->video.current_frame += 1; + } + + return 0; +} + +static int xmv_read_close(AVFormatContext *s) +{ + XMVDemuxContext *xmv = s->priv_data; + + av_free(xmv->audio); + av_free(xmv->audio_tracks); + + return 0; +} + +AVInputFormat ff_xmv_demuxer = { + .name = "xmv", + .long_name = NULL_IF_CONFIG_SMALL("Microsoft XMV"), + .priv_data_size = sizeof(XMVDemuxContext), + .read_probe = xmv_probe, + .read_header = xmv_read_header, + .read_packet = xmv_read_packet, + .read_close = xmv_read_close, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/xwma.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/xwma.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/xwma.c 2011-04-16 05:56:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/xwma.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,7 @@ #include #include "avformat.h" +#include "internal.h" #include "riff.h" /* @@ -69,7 +70,7 @@ if (tag != MKTAG('f', 'm', 't', ' ')) return -1; size = avio_rl32(pb); - st = av_new_stream(s, 0); + st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); @@ -115,7 +116,7 @@ } /* set the sample rate */ - av_set_pts_info(st, 64, 1, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); /* parse the remaining RIFF chunks */ for (;;) { @@ -252,10 +253,10 @@ } AVInputFormat ff_xwma_demuxer = { - "xwma", - NULL_IF_CONFIG_SMALL("Microsoft xWMA"), - sizeof(XWMAContext), - xwma_probe, - xwma_read_header, - xwma_read_packet, + .name = "xwma", + .long_name = NULL_IF_CONFIG_SMALL("Microsoft xWMA"), + .priv_data_size = sizeof(XWMAContext), + .read_probe = xwma_probe, + .read_header = xwma_read_header, + .read_packet = xwma_read_packet, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/yop.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/yop.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/yop.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/yop.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,4 @@ -/** - * @file +/* * Psygnosis YOP demuxer * * Copyright (C) 2010 Mohamed Naufal Basheer @@ -25,6 +24,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "internal.h" typedef struct yop_dec_context { AVPacket video_packet; @@ -57,8 +57,8 @@ int frame_rate, ret; - audio_stream = av_new_stream(s, 0); - video_stream = av_new_stream(s, 1); + audio_stream = avformat_new_stream(s, NULL); + video_stream = avformat_new_stream(s, NULL); // Extra data that will be passed to the decoder video_stream->codec->extradata_size = 8; @@ -106,7 +106,7 @@ avio_seek(pb, 2048, SEEK_SET); - av_set_pts_info(video_stream, 32, 1, frame_rate); + avpriv_set_pts_info(video_stream, 32, 1, frame_rate); return 0; } @@ -203,14 +203,14 @@ } AVInputFormat ff_yop_demuxer = { - "yop", - NULL_IF_CONFIG_SMALL("Psygnosis YOP Format"), - sizeof(YopDecContext), - yop_probe, - yop_read_header, - yop_read_packet, - yop_read_close, - yop_read_seek, + .name = "yop", + .long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP Format"), + .priv_data_size = sizeof(YopDecContext), + .read_probe = yop_probe, + .read_header = yop_read_header, + .read_packet = yop_read_packet, + .read_close = yop_read_close, + .read_seek = yop_read_seek, .extensions = "yop", .flags = AVFMT_GENERIC_INDEX, }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/yuv4mpeg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/yuv4mpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavformat/yuv4mpeg.c 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavformat/yuv4mpeg.c 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" +#include "internal.h" #define Y4M_MAGIC "YUV4MPEG2" #define Y4M_FRAME_MAGIC "FRAME" @@ -38,23 +39,24 @@ char inter; const char *colorspace = ""; - st = s->streams[0]; - width = st->codec->width; + st = s->streams[0]; + width = st->codec->width; height = st->codec->height; - av_reduce(&raten, &rated, st->codec->time_base.den, st->codec->time_base.num, (1UL<<31)-1); + av_reduce(&raten, &rated, st->codec->time_base.den, + st->codec->time_base.num, (1UL << 31) - 1); aspectn = st->sample_aspect_ratio.num; aspectd = st->sample_aspect_ratio.den; - if ( aspectn == 0 && aspectd == 1 ) aspectd = 0; // 0:0 means unknown + if (aspectn == 0 && aspectd == 1) + aspectd = 0; // 0:0 means unknown inter = 'p'; /* progressive is the default */ - if (st->codec->coded_frame && st->codec->coded_frame->interlaced_frame) { + if (st->codec->coded_frame && st->codec->coded_frame->interlaced_frame) inter = st->codec->coded_frame->top_field_first ? 't' : 'b'; - } - switch(st->codec->pix_fmt) { + switch (st->codec->pix_fmt) { case PIX_FMT_GRAY8: colorspace = " Cmono"; break; @@ -62,9 +64,11 @@ colorspace = " C411 XYSCSS=411"; break; case PIX_FMT_YUV420P: - colorspace = (st->codec->chroma_sample_location == AVCHROMA_LOC_TOPLEFT)?" C420paldv XYSCSS=420PALDV": - (st->codec->chroma_sample_location == AVCHROMA_LOC_LEFT) ?" C420mpeg2 XYSCSS=420MPEG2": - " C420jpeg XYSCSS=420JPEG"; + switch (st->codec->chroma_sample_location) { + case AVCHROMA_LOC_TOPLEFT: colorspace = " C420paldv XYSCSS=420PALDV"; break; + case AVCHROMA_LOC_LEFT: colorspace = " C420mpeg2 XYSCSS=420MPEG2"; break; + default: colorspace = " C420jpeg XYSCSS=420JPEG"; break; + } break; case PIX_FMT_YUV422P: colorspace = " C422 XYSCSS=422"; @@ -76,13 +80,8 @@ /* construct stream header, if this is the first frame */ n = snprintf(buf, Y4M_LINE_MAX, "%s W%d H%d F%d:%d I%c A%d:%d%s\n", - Y4M_MAGIC, - width, - height, - raten, rated, - inter, - aspectn, aspectd, - colorspace); + Y4M_MAGIC, width, height, raten, rated, inter, + aspectn, aspectd, colorspace); return n; } @@ -95,7 +94,7 @@ int* first_pkt = s->priv_data; int width, height, h_chroma_shift, v_chroma_shift; int i; - char buf2[Y4M_LINE_MAX+1]; + char buf2[Y4M_LINE_MAX + 1]; char buf1[20]; uint8_t *ptr, *ptr1, *ptr2; @@ -105,7 +104,8 @@ if (*first_pkt) { *first_pkt = 0; if (yuv4_generate_header(s, buf2) < 0) { - av_log(s, AV_LOG_ERROR, "Error. YUV4MPEG stream header write failed.\n"); + av_log(s, AV_LOG_ERROR, + "Error. YUV4MPEG stream header write failed.\n"); return AVERROR(EIO); } else { avio_write(pb, buf2, strlen(buf2)); @@ -117,31 +117,32 @@ snprintf(buf1, sizeof(buf1), "%s\n", Y4M_FRAME_MAGIC); avio_write(pb, buf1, strlen(buf1)); - width = st->codec->width; + width = st->codec->width; height = st->codec->height; ptr = picture->data[0]; - for(i=0;ilinesize[0]; } - if (st->codec->pix_fmt != PIX_FMT_GRAY8){ - // Adjust for smaller Cb and Cr planes - avcodec_get_chroma_sub_sample(st->codec->pix_fmt, &h_chroma_shift, &v_chroma_shift); - width >>= h_chroma_shift; - height >>= v_chroma_shift; - - ptr1 = picture->data[1]; - ptr2 = picture->data[2]; - for(i=0;ilinesize[1]; - } - for(i=0;icodec->pix_fmt != PIX_FMT_GRAY8) { + // Adjust for smaller Cb and Cr planes + avcodec_get_chroma_sub_sample(st->codec->pix_fmt, &h_chroma_shift, + &v_chroma_shift); + width >>= h_chroma_shift; + height >>= v_chroma_shift; + + ptr1 = picture->data[1]; + ptr2 = picture->data[2]; + for (i = 0; i < height; i++) { /* Cb */ + avio_write(pb, ptr1, width); + ptr1 += picture->linesize[1]; + } + for (i = 0; i < height; i++) { /* Cr */ + avio_write(pb, ptr2, width); ptr2 += picture->linesize[2]; - } + } } avio_flush(pb); return 0; @@ -149,19 +150,21 @@ static int yuv4_write_header(AVFormatContext *s) { - int* first_pkt = s->priv_data; + int *first_pkt = s->priv_data; if (s->nb_streams != 1) return AVERROR(EIO); if (s->streams[0]->codec->pix_fmt == PIX_FMT_YUV411P) { - av_log(s, AV_LOG_ERROR, "Warning: generating rarely used 4:1:1 YUV stream, some mjpegtools might not work.\n"); - } - else if ((s->streams[0]->codec->pix_fmt != PIX_FMT_YUV420P) && - (s->streams[0]->codec->pix_fmt != PIX_FMT_YUV422P) && - (s->streams[0]->codec->pix_fmt != PIX_FMT_GRAY8) && - (s->streams[0]->codec->pix_fmt != PIX_FMT_YUV444P)) { - av_log(s, AV_LOG_ERROR, "ERROR: yuv4mpeg only handles yuv444p, yuv422p, yuv420p, yuv411p and gray pixel formats. Use -pix_fmt to select one.\n"); + av_log(s, AV_LOG_ERROR, "Warning: generating rarely used 4:1:1 YUV " + "stream, some mjpegtools might not work.\n"); + } else if ((s->streams[0]->codec->pix_fmt != PIX_FMT_YUV420P) && + (s->streams[0]->codec->pix_fmt != PIX_FMT_YUV422P) && + (s->streams[0]->codec->pix_fmt != PIX_FMT_GRAY8) && + (s->streams[0]->codec->pix_fmt != PIX_FMT_YUV444P)) { + av_log(s, AV_LOG_ERROR, "ERROR: yuv4mpeg only handles yuv444p, " + "yuv422p, yuv420p, yuv411p and gray pixel formats. " + "Use -pix_fmt to select one.\n"); return AVERROR(EIO); } @@ -170,16 +173,16 @@ } AVOutputFormat ff_yuv4mpegpipe_muxer = { - "yuv4mpegpipe", - NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"), - "", - "y4m", - sizeof(int), - CODEC_ID_NONE, - CODEC_ID_RAWVIDEO, - yuv4_write_header, - yuv4_write_packet, - .flags = AVFMT_RAWPICTURE, + .name = "yuv4mpegpipe", + .long_name = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"), + .mime_type = "", + .extensions = "y4m", + .priv_data_size = sizeof(int), + .audio_codec = CODEC_ID_NONE, + .video_codec = CODEC_ID_RAWVIDEO, + .write_header = yuv4_write_header, + .write_packet = yuv4_write_packet, + .flags = AVFMT_RAWPICTURE, }; #endif @@ -189,85 +192,96 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap) { - char header[MAX_YUV4_HEADER+10]; // Include headroom for the longest option - char *tokstart,*tokend,*header_end; + char header[MAX_YUV4_HEADER + 10]; // Include headroom for + // the longest option + char *tokstart, *tokend, *header_end; int i; AVIOContext *pb = s->pb; - int width=-1, height=-1, raten=0, rated=0, aspectn=0, aspectd=0; - enum PixelFormat pix_fmt=PIX_FMT_NONE,alt_pix_fmt=PIX_FMT_NONE; + int width = -1, height = -1, raten = 0, + rated = 0, aspectn = 0, aspectd = 0; + enum PixelFormat pix_fmt = PIX_FMT_NONE, alt_pix_fmt = PIX_FMT_NONE; enum AVChromaLocation chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED; AVStream *st; struct frame_attributes *s1 = s->priv_data; - for (i=0; iinterlaced_frame = 0; s1->top_field_first = 0; - header_end = &header[i+1]; // Include space - for(tokstart = &header[strlen(Y4M_MAGIC) + 1]; tokstart < header_end; tokstart++) { - if (*tokstart==0x20) continue; + header_end = &header[i + 1]; // Include space + for (tokstart = &header[strlen(Y4M_MAGIC) + 1]; + tokstart < header_end; tokstart++) { + if (*tokstart == 0x20) + continue; switch (*tokstart++) { case 'W': // Width. Required. - width = strtol(tokstart, &tokend, 10); - tokstart=tokend; + width = strtol(tokstart, &tokend, 10); + tokstart = tokend; break; case 'H': // Height. Required. - height = strtol(tokstart, &tokend, 10); - tokstart=tokend; + height = strtol(tokstart, &tokend, 10); + tokstart = tokend; break; case 'C': // Color space - if (strncmp("420jpeg",tokstart,7)==0) { + if (strncmp("420jpeg", tokstart, 7) == 0) { pix_fmt = PIX_FMT_YUV420P; chroma_sample_location = AVCHROMA_LOC_CENTER; - } else if (strncmp("420mpeg2",tokstart,8)==0) { + } else if (strncmp("420mpeg2", tokstart, 8) == 0) { pix_fmt = PIX_FMT_YUV420P; chroma_sample_location = AVCHROMA_LOC_LEFT; - } else if (strncmp("420paldv", tokstart, 8)==0) { + } else if (strncmp("420paldv", tokstart, 8) == 0) { pix_fmt = PIX_FMT_YUV420P; chroma_sample_location = AVCHROMA_LOC_TOPLEFT; - } else if (strncmp("411", tokstart, 3)==0) + } else if (strncmp("411", tokstart, 3) == 0) pix_fmt = PIX_FMT_YUV411P; - else if (strncmp("422", tokstart, 3)==0) + else if (strncmp("422", tokstart, 3) == 0) pix_fmt = PIX_FMT_YUV422P; - else if (strncmp("444alpha", tokstart, 8)==0) { - av_log(s, AV_LOG_ERROR, "Cannot handle 4:4:4:4 YUV4MPEG stream.\n"); + else if (strncmp("444alpha", tokstart, 8) == 0 ) { + av_log(s, AV_LOG_ERROR, "Cannot handle 4:4:4:4 " + "YUV4MPEG stream.\n"); return -1; - } else if (strncmp("444", tokstart, 3)==0) + } else if (strncmp("444", tokstart, 3) == 0) pix_fmt = PIX_FMT_YUV444P; - else if (strncmp("mono",tokstart, 4)==0) { + else if (strncmp("mono", tokstart, 4) == 0) { pix_fmt = PIX_FMT_GRAY8; } else { - av_log(s, AV_LOG_ERROR, "YUV4MPEG stream contains an unknown pixel format.\n"); + av_log(s, AV_LOG_ERROR, "YUV4MPEG stream contains an unknown " + "pixel format.\n"); return -1; } - while(tokstartinterlaced_frame=0; + s1->interlaced_frame = 0; break; case 't': - s1->interlaced_frame=1; - s1->top_field_first=1; + s1->interlaced_frame = 1; + s1->top_field_first = 1; break; case 'b': - s1->interlaced_frame=1; - s1->top_field_first=0; + s1->interlaced_frame = 1; + s1->top_field_first = 0; break; case 'm': - av_log(s, AV_LOG_ERROR, "YUV4MPEG stream contains mixed interlaced and non-interlaced frames.\n"); + av_log(s, AV_LOG_ERROR, "YUV4MPEG stream contains mixed " + "interlaced and non-interlaced frames.\n"); return -1; default: av_log(s, AV_LOG_ERROR, "YUV4MPEG has invalid header.\n"); @@ -275,36 +289,39 @@ } break; case 'F': // Frame rate - sscanf(tokstart,"%d:%d",&raten,&rated); // 0:0 if unknown - while(tokstartcodec->width = width; + st->codec->width = width; st->codec->height = height; - av_reduce(&raten, &rated, raten, rated, (1UL<<31)-1); - av_set_pts_info(st, 64, rated, raten); - st->codec->pix_fmt = pix_fmt; - st->codec->codec_type = AVMEDIA_TYPE_VIDEO; - st->codec->codec_id = CODEC_ID_RAWVIDEO; - st->sample_aspect_ratio= (AVRational){aspectn, aspectd}; + av_reduce(&raten, &rated, raten, rated, (1UL << 31) - 1); + avpriv_set_pts_info(st, 64, rated, raten); + st->codec->pix_fmt = pix_fmt; + st->codec->codec_type = AVMEDIA_TYPE_VIDEO; + st->codec->codec_id = CODEC_ID_RAWVIDEO; + st->sample_aspect_ratio = (AVRational){ aspectn, aspectd }; st->codec->chroma_sample_location = chroma_sample_location; return 0; @@ -351,17 +368,19 @@ AVStream *st = s->streams[0]; struct frame_attributes *s1 = s->priv_data; - for (i=0; ipb); if (header[i] == '\n') { - header[i+1] = 0; + header[i + 1] = 0; break; } } - if (i == MAX_FRAME_HEADER) return -1; - if (strncmp(header, Y4M_FRAME_MAGIC, strlen(Y4M_FRAME_MAGIC))) return -1; + if (i == MAX_FRAME_HEADER) + return -1; + if (strncmp(header, Y4M_FRAME_MAGIC, strlen(Y4M_FRAME_MAGIC))) + return -1; - width = st->codec->width; + width = st->codec->width; height = st->codec->height; packet_size = avpicture_get_size(st->codec->pix_fmt, width, height); @@ -371,9 +390,9 @@ if (av_get_packet(s->pb, pkt, packet_size) != packet_size) return AVERROR(EIO); - if (s->streams[0]->codec->coded_frame) { - s->streams[0]->codec->coded_frame->interlaced_frame = s1->interlaced_frame; - s->streams[0]->codec->coded_frame->top_field_first = s1->top_field_first; + if (st->codec->coded_frame) { + st->codec->coded_frame->interlaced_frame = s1->interlaced_frame; + st->codec->coded_frame->top_field_first = s1->top_field_first; } pkt->stream_index = 0; @@ -383,7 +402,7 @@ static int yuv4_probe(AVProbeData *pd) { /* check file header */ - if (strncmp(pd->buf, Y4M_MAGIC, sizeof(Y4M_MAGIC)-1)==0) + if (strncmp(pd->buf, Y4M_MAGIC, sizeof(Y4M_MAGIC) - 1) == 0) return AVPROBE_SCORE_MAX; else return 0; @@ -391,12 +410,12 @@ #if CONFIG_YUV4MPEGPIPE_DEMUXER AVInputFormat ff_yuv4mpegpipe_demuxer = { - "yuv4mpegpipe", - NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"), - sizeof(struct frame_attributes), - yuv4_probe, - yuv4_read_header, - yuv4_read_packet, - .extensions = "y4m" + .name = "yuv4mpegpipe", + .long_name = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"), + .priv_data_size = sizeof(struct frame_attributes), + .read_probe = yuv4_probe, + .read_header = yuv4_read_header, + .read_packet = yuv4_read_packet, + .extensions = "y4m" }; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/adler32.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/adler32.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/adler32.c 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/adler32.c 2012-01-11 00:34:30.000000000 +0000 @@ -26,24 +26,28 @@ #define BASE 65521L /* largest prime smaller than 65536 */ -#define DO1(buf) {s1 += *buf++; s2 += s1;} +#define DO1(buf) { s1 += *buf++; s2 += s1; } #define DO4(buf) DO1(buf); DO1(buf); DO1(buf); DO1(buf); #define DO16(buf) DO4(buf); DO4(buf); DO4(buf); DO4(buf); -unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, unsigned int len) +unsigned long av_adler32_update(unsigned long adler, const uint8_t * buf, + unsigned int len) { unsigned long s1 = adler & 0xffff; unsigned long s2 = adler >> 16; - while (len>0) { + while (len > 0) { #if CONFIG_SMALL - while(len>4 && s2 < (1U<<31)){ - DO4(buf); len-=4; + while (len > 4 && s2 < (1U << 31)) { + DO4(buf); + len -= 4; + } #else - while(len>16 && s2 < (1U<<31)){ - DO16(buf); len-=16; -#endif + while (len > 16 && s2 < (1U << 31)) { + DO16(buf); + len -= 16; } +#endif DO1(buf); len--; s1 %= BASE; s2 %= BASE; @@ -52,22 +56,34 @@ } #ifdef TEST +#include #include "log.h" #include "timer.h" #define LEN 7001 -volatile int checksum; -int main(void){ + +static volatile int checksum; + +int main(int argc, char **argv) +{ int i; char data[LEN]; + av_log_set_level(AV_LOG_DEBUG); - for(i=0; i>3) + 123*i; - for(i=0; i<1000; i++){ - START_TIMER - checksum= av_adler32_update(1, data, LEN); - STOP_TIMER("adler") + + for (i = 0; i < LEN; i++) + data[i] = ((i * i) >> 3) + 123 * i; + + if (argc > 1 && !strcmp(argv[1], "-t")) { + for (i = 0; i < 1000; i++) { + START_TIMER; + checksum = av_adler32_update(1, data, LEN); + STOP_TIMER("adler"); + } + } else { + checksum = av_adler32_update(1, data, LEN); } - av_log(NULL, AV_LOG_DEBUG, "%X == 50E6E508\n", checksum); - return 0; + + av_log(NULL, AV_LOG_DEBUG, "%X (expected 50E6E508)\n", checksum); + return checksum == 0x50e6e508 ? 0 : 1; } #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/adler32.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/adler32.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/adler32.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/adler32.h 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,7 @@ #include "attributes.h" /** + * @ingroup lavu_crypto * Calculate the Adler32 checksum of a buffer. * * Passing the return value to a subsequent av_adler32_update() call diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/aes.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/aes.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/aes.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/aes.c 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,7 @@ #include "common.h" #include "aes.h" +#include "intreadwrite.h" typedef union { uint64_t u64[2]; @@ -30,13 +31,13 @@ uint8_t u8[16]; } av_aes_block; -typedef struct AVAES{ +typedef struct AVAES { // Note: round_key[16] is accessed in the init code, but this only - // overwrites state, which does not matter (see also r7471). + // overwrites state, which does not matter (see also commit ba554c0). av_aes_block round_key[15]; av_aes_block state[2]; int rounds; -}AVAES; +} AVAES; const int av_aes_size= sizeof(AVAES); @@ -54,23 +55,58 @@ static uint32_t dec_multbl[4][256]; #endif -static inline void addkey(av_aes_block *dst, const av_aes_block *src, const av_aes_block *round_key){ +#if HAVE_BIGENDIAN +# define ROT(x, s) ((x >> s) | (x << (32-s))) +#else +# define ROT(x, s) ((x << s) | (x >> (32-s))) +#endif + +static inline void addkey(av_aes_block *dst, const av_aes_block *src, + const av_aes_block *round_key) +{ dst->u64[0] = src->u64[0] ^ round_key->u64[0]; dst->u64[1] = src->u64[1] ^ round_key->u64[1]; } -static void subshift(av_aes_block s0[2], int s, const uint8_t *box){ - av_aes_block *s1= (av_aes_block *)(s0[0].u8 - s); - av_aes_block *s3= (av_aes_block *)(s0[0].u8 + s); - s0[0].u8[0]=box[s0[1].u8[ 0]]; s0[0].u8[ 4]=box[s0[1].u8[ 4]]; s0[0].u8[ 8]=box[s0[1].u8[ 8]]; s0[0].u8[12]=box[s0[1].u8[12]]; - s1[0].u8[3]=box[s1[1].u8[ 7]]; s1[0].u8[ 7]=box[s1[1].u8[11]]; s1[0].u8[11]=box[s1[1].u8[15]]; s1[0].u8[15]=box[s1[1].u8[ 3]]; - s0[0].u8[2]=box[s0[1].u8[10]]; s0[0].u8[10]=box[s0[1].u8[ 2]]; s0[0].u8[ 6]=box[s0[1].u8[14]]; s0[0].u8[14]=box[s0[1].u8[ 6]]; - s3[0].u8[1]=box[s3[1].u8[13]]; s3[0].u8[13]=box[s3[1].u8[ 9]]; s3[0].u8[ 9]=box[s3[1].u8[ 5]]; s3[0].u8[ 5]=box[s3[1].u8[ 1]]; +static inline void addkey_s(av_aes_block *dst, const uint8_t *src, + const av_aes_block *round_key) +{ + dst->u64[0] = AV_RN64(src) ^ round_key->u64[0]; + dst->u64[1] = AV_RN64(src + 8) ^ round_key->u64[1]; +} + +static inline void addkey_d(uint8_t *dst, const av_aes_block *src, + const av_aes_block *round_key) +{ + AV_WN64(dst, src->u64[0] ^ round_key->u64[0]); + AV_WN64(dst + 8, src->u64[1] ^ round_key->u64[1]); +} + +static void subshift(av_aes_block s0[2], int s, const uint8_t *box) +{ + av_aes_block *s1 = (av_aes_block *) (s0[0].u8 - s); + av_aes_block *s3 = (av_aes_block *) (s0[0].u8 + s); + + s0[0].u8[ 0] = box[s0[1].u8[ 0]]; + s0[0].u8[ 4] = box[s0[1].u8[ 4]]; + s0[0].u8[ 8] = box[s0[1].u8[ 8]]; + s0[0].u8[12] = box[s0[1].u8[12]]; + s1[0].u8[ 3] = box[s1[1].u8[ 7]]; + s1[0].u8[ 7] = box[s1[1].u8[11]]; + s1[0].u8[11] = box[s1[1].u8[15]]; + s1[0].u8[15] = box[s1[1].u8[ 3]]; + s0[0].u8[ 2] = box[s0[1].u8[10]]; + s0[0].u8[10] = box[s0[1].u8[ 2]]; + s0[0].u8[ 6] = box[s0[1].u8[14]]; + s0[0].u8[14] = box[s0[1].u8[ 6]]; + s3[0].u8[ 1] = box[s3[1].u8[13]]; + s3[0].u8[13] = box[s3[1].u8[ 9]]; + s3[0].u8[ 9] = box[s3[1].u8[ 5]]; + s3[0].u8[ 5] = box[s3[1].u8[ 1]]; } static inline int mix_core(uint32_t multbl[][256], int a, int b, int c, int d){ #if CONFIG_SMALL -#define ROT(x,s) ((x<>(32-s))) return multbl[0][a] ^ ROT(multbl[0][b], 8) ^ ROT(multbl[0][c], 16) ^ ROT(multbl[0][d], 24); #else return multbl[0][a] ^ multbl[1][b] ^ multbl[2][c] ^ multbl[3][d]; @@ -85,117 +121,137 @@ state[0].u32[3] = mix_core(multbl, src[3][0], src[s1-1][1], src[1][2], src[s3-1][3]); } -static inline void crypt(AVAES *a, int s, const uint8_t *sbox, uint32_t multbl[][256]){ +static inline void crypt(AVAES *a, int s, const uint8_t *sbox, + uint32_t multbl[][256]) +{ int r; - for(r=a->rounds-1; r>0; r--){ - mix(a->state, multbl, 3-s, 1+s); + for (r = a->rounds - 1; r > 0; r--) { + mix(a->state, multbl, 3 - s, 1 + s); addkey(&a->state[1], &a->state[0], &a->round_key[r]); } + subshift(&a->state[0], s, sbox); } -void av_aes_crypt(AVAES *a, uint8_t *dst_, const uint8_t *src_, int count, uint8_t *iv_, int decrypt){ - av_aes_block *dst = (av_aes_block *)dst_; - const av_aes_block *src = (const av_aes_block *)src_; - av_aes_block *iv = (av_aes_block *)iv_; - while(count--){ - addkey(&a->state[1], src, &a->round_key[a->rounds]); - if(decrypt) { +void av_aes_crypt(AVAES *a, uint8_t *dst, const uint8_t *src, + int count, uint8_t *iv, int decrypt) +{ + while (count--) { + addkey_s(&a->state[1], src, &a->round_key[a->rounds]); + if (decrypt) { crypt(a, 0, inv_sbox, dec_multbl); - if(iv){ - addkey(&a->state[0], &a->state[0], iv); + if (iv) { + addkey_s(&a->state[0], iv, &a->state[0]); memcpy(iv, src, 16); } - addkey(dst, &a->state[0], &a->round_key[0]); - }else{ - if(iv) addkey(&a->state[1], &a->state[1], iv); - crypt(a, 2, sbox, enc_multbl); - addkey(dst, &a->state[0], &a->round_key[0]); - if(iv) memcpy(iv, dst, 16); + addkey_d(dst, &a->state[0], &a->round_key[0]); + } else { + if (iv) + addkey_s(&a->state[1], iv, &a->state[1]); + crypt(a, 2, sbox, enc_multbl); + addkey_d(dst, &a->state[0], &a->round_key[0]); + if (iv) + memcpy(iv, dst, 16); } - src++; - dst++; + src += 16; + dst += 16; } } -static void init_multbl2(uint8_t tbl[1024], const int c[4], const uint8_t *log8, const uint8_t *alog8, const uint8_t *sbox){ - int i, j; - for(i=0; i<1024; i++){ - int x= sbox[i>>2]; - if(x) tbl[i]= alog8[ log8[x] + log8[c[i&3]] ]; - } +static void init_multbl2(uint32_t tbl[][256], const int c[4], + const uint8_t *log8, const uint8_t *alog8, + const uint8_t *sbox) +{ + int i; + + for (i = 0; i < 256; i++) { + int x = sbox[i]; + if (x) { + int k, l, m, n; + x = log8[x]; + k = alog8[x + log8[c[0]]]; + l = alog8[x + log8[c[1]]]; + m = alog8[x + log8[c[2]]]; + n = alog8[x + log8[c[3]]]; + tbl[0][i] = AV_NE(MKBETAG(k,l,m,n), MKTAG(k,l,m,n)); #if !CONFIG_SMALL - for(j=256; j<1024; j++) - for(i=0; i<4; i++) - tbl[4*j+i]= tbl[4*j + ((i-1)&3) - 1024]; + tbl[1][i] = ROT(tbl[0][i], 8); + tbl[2][i] = ROT(tbl[0][i], 16); + tbl[3][i] = ROT(tbl[0][i], 24); #endif + } + } } // this is based on the reference AES code by Paulo Barreto and Vincent Rijmen -int av_aes_init(AVAES *a, const uint8_t *key, int key_bits, int decrypt) { +int av_aes_init(AVAES *a, const uint8_t *key, int key_bits, int decrypt) +{ int i, j, t, rconpointer = 0; uint8_t tk[8][4]; - int KC= key_bits>>5; - int rounds= KC + 6; - uint8_t log8[256]; + int KC = key_bits >> 5; + int rounds = KC + 6; + uint8_t log8[256]; uint8_t alog8[512]; - if(!enc_multbl[FF_ARRAY_ELEMS(enc_multbl)-1][FF_ARRAY_ELEMS(enc_multbl[0])-1]){ - j=1; - for(i=0; i<255; i++){ - alog8[i]= - alog8[i+255]= j; - log8[j]= i; - j^= j+j; - if(j>255) j^= 0x11B; - } - for(i=0; i<256; i++){ - j= i ? alog8[255-log8[i]] : 0; - j ^= (j<<1) ^ (j<<2) ^ (j<<3) ^ (j<<4); - j = (j ^ (j>>8) ^ 99) & 255; - inv_sbox[j]= i; - sbox [i]= j; + if (!enc_multbl[FF_ARRAY_ELEMS(enc_multbl)-1][FF_ARRAY_ELEMS(enc_multbl[0])-1]) { + j = 1; + for (i = 0; i < 255; i++) { + alog8[i] = alog8[i + 255] = j; + log8[j] = i; + j ^= j + j; + if (j > 255) + j ^= 0x11B; } - init_multbl2(dec_multbl[0], (const int[4]){0xe, 0x9, 0xd, 0xb}, log8, alog8, inv_sbox); - init_multbl2(enc_multbl[0], (const int[4]){0x2, 0x1, 0x1, 0x3}, log8, alog8, sbox); + for (i = 0; i < 256; i++) { + j = i ? alog8[255 - log8[i]] : 0; + j ^= (j << 1) ^ (j << 2) ^ (j << 3) ^ (j << 4); + j = (j ^ (j >> 8) ^ 99) & 255; + inv_sbox[j] = i; + sbox[i] = j; + } + init_multbl2(dec_multbl, (const int[4]) { 0xe, 0x9, 0xd, 0xb }, + log8, alog8, inv_sbox); + init_multbl2(enc_multbl, (const int[4]) { 0x2, 0x1, 0x1, 0x3 }, + log8, alog8, sbox); } - if(key_bits!=128 && key_bits!=192 && key_bits!=256) + if (key_bits != 128 && key_bits != 192 && key_bits != 256) return -1; - a->rounds= rounds; - - memcpy(tk, key, KC*4); + a->rounds = rounds; - for(t= 0; t < (rounds+1)*16;) { - memcpy(a->round_key[0].u8+t, tk, KC*4); - t+= KC*4; + memcpy(tk, key, KC * 4); + memcpy(a->round_key[0].u8, key, KC * 4); - for(i = 0; i < 4; i++) - tk[0][i] ^= sbox[tk[KC-1][(i+1)&3]]; + for (t = KC * 4; t < (rounds + 1) * 16; t += KC * 4) { + for (i = 0; i < 4; i++) + tk[0][i] ^= sbox[tk[KC - 1][(i + 1) & 3]]; tk[0][0] ^= rcon[rconpointer++]; - for(j = 1; j < KC; j++){ - if(KC != 8 || j != KC>>1) - for(i = 0; i < 4; i++) tk[j][i] ^= tk[j-1][i]; + for (j = 1; j < KC; j++) { + if (KC != 8 || j != KC >> 1) + for (i = 0; i < 4; i++) + tk[j][i] ^= tk[j - 1][i]; else - for(i = 0; i < 4; i++) tk[j][i] ^= sbox[tk[j-1][i]]; + for (i = 0; i < 4; i++) + tk[j][i] ^= sbox[tk[j - 1][i]]; } + + memcpy(a->round_key[0].u8 + t, tk, KC * 4); } - if(decrypt){ - for(i=1; iround_key[i], 16); + tmp[2] = a->round_key[i]; subshift(&tmp[1], 0, sbox); mix(tmp, dec_multbl, 1, 3); - memcpy(&a->round_key[i], &tmp[0], 16); + a->round_key[i] = tmp[0]; } - }else{ - for(i=0; i<(rounds+1)>>1; i++){ - for(j=0; j<16; j++) - FFSWAP(int, a->round_key[i].u8[j], a->round_key[rounds-i].u8[j]); + } else { + for (i = 0; i < (rounds + 1) >> 1; i++) { + FFSWAP(av_aes_block, a->round_key[i], a->round_key[rounds-i]); } } @@ -203,53 +259,76 @@ } #ifdef TEST +#include #include "lfg.h" #include "log.h" -int main(void){ - int i,j; - AVAES ae, ad, b; - uint8_t rkey[2][16]= { - {0}, - {0x10, 0xa5, 0x88, 0x69, 0xd7, 0x4b, 0xe5, 0xa3, 0x74, 0xcf, 0x86, 0x7c, 0xfb, 0x47, 0x38, 0x59}}; +int main(int argc, char **argv) +{ + int i, j; + AVAES b; + uint8_t rkey[2][16] = { + { 0 }, + { 0x10, 0xa5, 0x88, 0x69, 0xd7, 0x4b, 0xe5, 0xa3, + 0x74, 0xcf, 0x86, 0x7c, 0xfb, 0x47, 0x38, 0x59 } + }; uint8_t pt[16], rpt[2][16]= { - {0x6a, 0x84, 0x86, 0x7c, 0xd7, 0x7e, 0x12, 0xad, 0x07, 0xea, 0x1b, 0xe8, 0x95, 0xc5, 0x3f, 0xa3}, - {0}}; + { 0x6a, 0x84, 0x86, 0x7c, 0xd7, 0x7e, 0x12, 0xad, + 0x07, 0xea, 0x1b, 0xe8, 0x95, 0xc5, 0x3f, 0xa3 }, + { 0 } + }; uint8_t rct[2][16]= { - {0x73, 0x22, 0x81, 0xc0, 0xa0, 0xaa, 0xb8, 0xf7, 0xa5, 0x4a, 0x0c, 0x67, 0xa0, 0xc4, 0x5e, 0xcf}, - {0x6d, 0x25, 0x1e, 0x69, 0x44, 0xb0, 0x51, 0xe0, 0x4e, 0xaa, 0x6f, 0xb4, 0xdb, 0xf7, 0x84, 0x65}}; + { 0x73, 0x22, 0x81, 0xc0, 0xa0, 0xaa, 0xb8, 0xf7, + 0xa5, 0x4a, 0x0c, 0x67, 0xa0, 0xc4, 0x5e, 0xcf }, + { 0x6d, 0x25, 0x1e, 0x69, 0x44, 0xb0, 0x51, 0xe0, + 0x4e, 0xaa, 0x6f, 0xb4, 0xdb, 0xf7, 0x84, 0x65 } + }; uint8_t temp[16]; - AVLFG prng; + int err = 0; - av_aes_init(&ae, "PI=3.141592654..", 128, 0); - av_aes_init(&ad, "PI=3.141592654..", 128, 1); av_log_set_level(AV_LOG_DEBUG); - av_lfg_init(&prng, 1); - for(i=0; i<2; i++){ + for (i = 0; i < 2; i++) { av_aes_init(&b, rkey[i], 128, 1); av_aes_crypt(&b, temp, rct[i], 1, NULL, 1); - for(j=0; j<16; j++) - if(rpt[i][j] != temp[j]) - av_log(NULL, AV_LOG_ERROR, "%d %02X %02X\n", j, rpt[i][j], temp[j]); - } - - for(i=0; i<10000; i++){ - for(j=0; j<16; j++){ - pt[j] = av_lfg_get(&prng); - } -{START_TIMER - av_aes_crypt(&ae, temp, pt, 1, NULL, 0); - if(!(i&(i-1))) - av_log(NULL, AV_LOG_ERROR, "%02X %02X %02X %02X\n", temp[0], temp[5], temp[10], temp[15]); - av_aes_crypt(&ad, temp, temp, 1, NULL, 1); -STOP_TIMER("aes")} - for(j=0; j<16; j++){ - if(pt[j] != temp[j]){ - av_log(NULL, AV_LOG_ERROR, "%d %d %02X %02X\n", i,j, pt[j], temp[j]); + for (j = 0; j < 16; j++) { + if (rpt[i][j] != temp[j]) { + av_log(NULL, AV_LOG_ERROR, "%d %02X %02X\n", + j, rpt[i][j], temp[j]); + err = 1; } } } - return 0; + + if (argc > 1 && !strcmp(argv[1], "-t")) { + AVAES ae, ad; + AVLFG prng; + + av_aes_init(&ae, "PI=3.141592654..", 128, 0); + av_aes_init(&ad, "PI=3.141592654..", 128, 1); + av_lfg_init(&prng, 1); + + for (i = 0; i < 10000; i++) { + for (j = 0; j < 16; j++) { + pt[j] = av_lfg_get(&prng); + } + { + START_TIMER; + av_aes_crypt(&ae, temp, pt, 1, NULL, 0); + if (!(i & (i - 1))) + av_log(NULL, AV_LOG_ERROR, "%02X %02X %02X %02X\n", + temp[0], temp[5], temp[10], temp[15]); + av_aes_crypt(&ad, temp, temp, 1, NULL, 1); + STOP_TIMER("aes"); + } + for (j = 0; j < 16; j++) { + if (pt[j] != temp[j]) { + av_log(NULL, AV_LOG_ERROR, "%d %d %02X %02X\n", + i, j, pt[j], temp[j]); + } + } + } + } + return err; } #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/aes.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/aes.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/aes.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/aes.h 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,12 @@ #include +/** + * @defgroup lavu_aes AES + * @ingroup lavu_crypto + * @{ + */ + extern const int av_aes_size; struct AVAES; @@ -44,4 +50,8 @@ */ void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); +/** + * @} + */ + #endif /* AVUTIL_AES_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/arm/bswap.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/arm/bswap.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/arm/bswap.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/arm/bswap.h 2012-01-11 00:34:30.000000000 +0000 @@ -51,6 +51,7 @@ } #endif +#if !AV_GCC_VERSION_AT_LEAST(4,5) #define av_bswap32 av_bswap32 static av_always_inline av_const uint32_t av_bswap32(uint32_t x) { @@ -66,6 +67,7 @@ #endif /* HAVE_ARMV6 */ return x; } +#endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */ #endif /* __ARMCC_VERSION */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/arm/intmath.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/arm/intmath.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/arm/intmath.h 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/arm/intmath.h 2012-01-11 00:34:30.000000000 +0000 @@ -36,6 +36,7 @@ int r; __asm__ ("cmp %2, #2 \n\t" "ldr %0, [%3, %2, lsl #2] \n\t" + "ite le \n\t" "lsrle %0, %1, #1 \n\t" "smmulgt %0, %0, %1 \n\t" : "=&r"(r) : "r"(a), "r"(b), "r"(ff_inverse) : "cc"); @@ -101,6 +102,7 @@ { int x, y; __asm__ ("adds %1, %R2, %Q2, lsr #31 \n\t" + "itet ne \n\t" "mvnne %1, #1<<31 \n\t" "moveq %0, %Q2 \n\t" "eorne %0, %1, %R2, asr #31 \n\t" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/attributes.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/attributes.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/attributes.h 2011-03-25 03:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/attributes.h 2012-01-11 00:34:30.000000000 +0000 @@ -127,8 +127,10 @@ #ifdef __GNUC__ # define av_builtin_constant_p __builtin_constant_p +# define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos))) #else # define av_builtin_constant_p(x) 0 +# define av_printf_format(fmtpos, attrpos) #endif #endif /* AVUTIL_ATTRIBUTES_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/audioconvert.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/audioconvert.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/audioconvert.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/audioconvert.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,11 +28,26 @@ #include "audioconvert.h" static const char * const channel_names[] = { - "FL", "FR", "FC", "LFE", "BL", "BR", "FLC", "FRC", - "BC", "SL", "SR", "TC", "TFL", "TFC", "TFR", "TBL", - "TBC", "TBR", - [29] = "DL", - [30] = "DR", + [0] = "FL", /* front left */ + [1] = "FR", /* front right */ + [2] = "FC", /* front center */ + [3] = "LFE", /* low frequency */ + [4] = "BL", /* back left */ + [5] = "BR", /* back right */ + [6] = "FLC", /* front left-of-center */ + [7] = "FRC", /* front right-of-center */ + [8] = "BC", /* back-center */ + [9] = "SL", /* side left */ + [10] = "SR", /* side right */ + [11] = "TC", /* top center */ + [12] = "TFL", /* top front left */ + [13] = "TFC", /* top front center */ + [14] = "TFR", /* top front right */ + [15] = "TBL", /* top back left */ + [16] = "TBC", /* top back center */ + [17] = "TBR", /* top back right */ + [29] = "DL", /* downmix left */ + [30] = "DR", /* downmix right */ }; static const char *get_channel_name(int channel_id) @@ -45,7 +60,7 @@ static const struct { const char *name; int nb_channels; - int64_t layout; + uint64_t layout; } channel_layout_map[] = { { "mono", 1, AV_CH_LAYOUT_MONO }, { "stereo", 2, AV_CH_LAYOUT_STEREO }, @@ -62,7 +77,7 @@ { 0 } }; -int64_t av_get_channel_layout(const char *name) +uint64_t av_get_channel_layout(const char *name) { int i = 0; do { @@ -75,7 +90,7 @@ } void av_get_channel_layout_string(char *buf, int buf_size, - int nb_channels, int64_t channel_layout) + int nb_channels, uint64_t channel_layout) { int i; @@ -91,13 +106,14 @@ snprintf(buf, buf_size, "%d channels", nb_channels); if (channel_layout) { - int i,ch; + int i, ch; av_strlcat(buf, " (", buf_size); - for(i=0,ch=0; i<64; i++) { - if ((channel_layout & (1L<0) av_strlcat(buf, "|", buf_size); + if (ch > 0) + av_strlcat(buf, "|", buf_size); av_strlcat(buf, name, buf_size); } ch++; @@ -107,7 +123,7 @@ } } -int av_get_channel_layout_nb_channels(int64_t channel_layout) +int av_get_channel_layout_nb_channels(uint64_t channel_layout) { int count; uint64_t x = channel_layout; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/audioconvert.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/audioconvert.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/audioconvert.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/audioconvert.h 2012-01-11 00:34:30.000000000 +0000 @@ -29,7 +29,15 @@ * audio conversion routines */ -/* Audio channel masks */ +/** + * @addtogroup lavu_audio + * @{ + */ + +/** + * @defgroup channel_masks Audio channel masks + * @{ + */ #define AV_CH_FRONT_LEFT 0x00000001 #define AV_CH_FRONT_RIGHT 0x00000002 #define AV_CH_FRONT_CENTER 0x00000004 @@ -50,33 +58,56 @@ #define AV_CH_TOP_BACK_RIGHT 0x00020000 #define AV_CH_STEREO_LEFT 0x20000000 ///< Stereo downmix. #define AV_CH_STEREO_RIGHT 0x40000000 ///< See AV_CH_STEREO_LEFT. +#define AV_CH_WIDE_LEFT 0x0000000080000000ULL +#define AV_CH_WIDE_RIGHT 0x0000000100000000ULL +#define AV_CH_SURROUND_DIRECT_LEFT 0x0000000200000000ULL +#define AV_CH_SURROUND_DIRECT_RIGHT 0x0000000400000000ULL /** Channel mask value used for AVCodecContext.request_channel_layout to indicate that the user requests the channel order of the decoder output to be the native codec channel order. */ -#define AV_CH_LAYOUT_NATIVE 0x8000000000000000LL +#define AV_CH_LAYOUT_NATIVE 0x8000000000000000ULL -/* Audio channel convenience macros */ +/** + * @} + * @defgroup channel_mask_c Audio channel convenience macros + * @{ + * */ #define AV_CH_LAYOUT_MONO (AV_CH_FRONT_CENTER) #define AV_CH_LAYOUT_STEREO (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT) +#define AV_CH_LAYOUT_2POINT1 (AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY) #define AV_CH_LAYOUT_2_1 (AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER) #define AV_CH_LAYOUT_SURROUND (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER) +#define AV_CH_LAYOUT_3POINT1 (AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY) #define AV_CH_LAYOUT_4POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_CENTER) +#define AV_CH_LAYOUT_4POINT1 (AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY) #define AV_CH_LAYOUT_2_2 (AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT) #define AV_CH_LAYOUT_QUAD (AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) #define AV_CH_LAYOUT_5POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT) #define AV_CH_LAYOUT_5POINT1 (AV_CH_LAYOUT_5POINT0|AV_CH_LOW_FREQUENCY) #define AV_CH_LAYOUT_5POINT0_BACK (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) #define AV_CH_LAYOUT_5POINT1_BACK (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_LOW_FREQUENCY) +#define AV_CH_LAYOUT_6POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER) +#define AV_CH_LAYOUT_6POINT0_FRONT (AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) +#define AV_CH_LAYOUT_HEXAGONAL (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER) +#define AV_CH_LAYOUT_6POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER) +#define AV_CH_LAYOUT_6POINT1_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER) +#define AV_CH_LAYOUT_6POINT1_FRONT (AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY) #define AV_CH_LAYOUT_7POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) +#define AV_CH_LAYOUT_7POINT0_FRONT (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) #define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) -#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) +#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) +#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT) #define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT) /** + * @} + */ + +/** * Return a channel layout id that matches name, 0 if no match. */ -int64_t av_get_channel_layout(const char *name); +uint64_t av_get_channel_layout(const char *name); /** * Return a description of a channel layout. @@ -85,11 +116,15 @@ * @param buf put here the string containing the channel layout * @param buf_size size in bytes of the buffer */ -void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout); +void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout); /** * Return the number of channels in the channel layout. */ -int av_get_channel_layout_nb_channels(int64_t channel_layout); +int av_get_channel_layout_nb_channels(uint64_t channel_layout); + +/** + * @} + */ #endif /* AVUTIL_AUDIOCONVERT_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/avstring.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/avstring.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/avstring.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/avstring.c 2012-01-11 00:34:30.000000000 +0000 @@ -134,6 +134,27 @@ return ret; } +int av_strcasecmp(const char *a, const char *b) +{ + uint8_t c1, c2; + do { + c1 = av_tolower(*a++); + c2 = av_tolower(*b++); + } while (c1 && c1 == c2); + return c1 - c2; +} + +int av_strncasecmp(const char *a, const char *b, size_t n) +{ + const char *end = a + n; + uint8_t c1, c2; + do { + c1 = av_tolower(*a++); + c2 = av_tolower(*b++); + } while (a < end && c1 && c1 == c2); + return c1 - c2; +} + #ifdef TEST #undef printf diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/avstring.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/avstring.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/avstring.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/avstring.h 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,12 @@ #define AVUTIL_AVSTRING_H #include +#include "attributes.h" + +/** + * @addtogroup lavu_string + * @{ + */ /** * Return non-zero if pfx is a prefix of str. If it is, *ptr is set to @@ -71,7 +77,7 @@ * @param size size of destination buffer * @return the length of src * - * WARNING: since the return value is the length of src, src absolutely + * @warning since the return value is the length of src, src absolutely * _must_ be a properly 0-terminated string, otherwise this will read beyond * the end of the buffer and possibly crash. */ @@ -89,9 +95,9 @@ * @param size size of destination buffer * @return the total length of src and dst * - * WARNING: since the return value use the length of src and dst, these absolutely - * _must_ be a properly 0-terminated strings, otherwise this will read beyond - * the end of the buffer and possibly crash. + * @warning since the return value use the length of src and dst, these + * absolutely _must_ be a properly 0-terminated strings, otherwise this + * will read beyond the end of the buffer and possibly crash. */ size_t av_strlcat(char *dst, const char *src, size_t size); @@ -107,7 +113,7 @@ * @return the length of the string that would have been generated * if enough space had been available */ -size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...); +size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_format(3, 4); /** * Convert a number to a av_malloced string. @@ -130,4 +136,40 @@ */ char *av_get_token(const char **buf, const char *term); +/** + * Locale-independent conversion of ASCII characters to uppercase. + */ +static inline int av_toupper(int c) +{ + if (c >= 'a' && c <= 'z') + c ^= 0x20; + return c; +} + +/** + * Locale-independent conversion of ASCII characters to lowercase. + */ +static inline int av_tolower(int c) +{ + if (c >= 'A' && c <= 'Z') + c ^= 0x20; + return c; +} + +/* + * Locale-independent case-insensitive compare. + * @note This means only ASCII-range characters are case-insensitive + */ +int av_strcasecmp(const char *a, const char *b); + +/** + * Locale-independent case-insensitive compare. + * @note This means only ASCII-range characters are case-insensitive + */ +int av_strncasecmp(const char *a, const char *b, size_t n); + +/** + * @} + */ + #endif /* AVUTIL_AVSTRING_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/avutil.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/avutil.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/avutil.h 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/avutil.h 2012-01-11 00:34:30.000000000 +0000 @@ -26,6 +26,96 @@ * external API header */ +/** + * @mainpage + * + * @section libav_intro Introduction + * + * This document describe the usage of the different libraries + * provided by Libav. + * + * @li @ref libavc "libavcodec" encoding/decoding library + * @li @subpage libavfilter graph based frame editing library + * @li @ref libavf "libavformat" I/O and muxing/demuxing library + * @li @ref lavd "libavdevice" special devices muxing/demuxing library + * @li @ref lavu "libavutil" common utility library + * @li @subpage libpostproc post processing library + * @li @subpage libswscale color conversion and scaling library + * + */ + +/** + * @defgroup lavu Common utility functions + * + * @brief + * libavutil contains the code shared across all the other Libav + * libraries + * + * @note In order to use the functions provided by avutil you must include + * the specific header. + * + * @{ + * + * @defgroup lavu_crypto Crypto and Hashing + * + * @{ + * @} + * + * @defgroup lavu_math Maths + * @{ + * + * @} + * + * @defgroup lavu_string String Manipulation + * + * @{ + * + * @} + * + * @defgroup lavu_mem Memory Management + * + * @{ + * + * @} + * + * @defgroup lavu_data Data Structures + * @{ + * + * @} + * + * @defgroup lavu_audio Audio related + * + * @{ + * + * @} + * + * @defgroup lavu_error Error Codes + * + * @{ + * + * @} + * + * @defgroup lavu_misc Other + * + * @{ + * + * @defgroup lavu_internal Internal + * + * Not exported functions, for internal usage only + * + * @{ + * + * @} + */ + + +/** + * @defgroup preproc_misc Preprocessor String Macros + * + * String manipulation macros + * + * @{ + */ #define AV_STRINGIFY(s) AV_TOSTRING(s) #define AV_TOSTRING(s) #s @@ -35,12 +125,36 @@ #define AV_PRAGMA(s) _Pragma(#s) +/** + * @} + */ + +/** + * @defgroup version_utils Library Version Macros + * + * Useful to check and match library version in order to maintain + * backward compatibility. + * + * @{ + */ + #define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c) #define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) +/** + * @} + * + * @defgroup lavu_ver Version and Build diagnostics + * + * Macros and function useful to check at compiletime and at runtime + * which version of libavutil is in use. + * + * @{ + */ + #define LIBAVUTIL_VERSION_MAJOR 51 -#define LIBAVUTIL_VERSION_MINOR 7 +#define LIBAVUTIL_VERSION_MINOR 21 #define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ @@ -54,8 +168,16 @@ #define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION) /** + * @} + * + * @defgroup depr_guards Deprecation guards * Those FF_API_* defines are not part of public API. * They may change, break or disappear at any time. + * + * They are used mostly internally to mark code that will be removed + * on the next major version. + * + * @{ */ #ifndef FF_API_GET_BITS_PER_SAMPLE_FMT #define FF_API_GET_BITS_PER_SAMPLE_FMT (LIBAVUTIL_VERSION_MAJOR < 52) @@ -63,6 +185,21 @@ #ifndef FF_API_FIND_OPT #define FF_API_FIND_OPT (LIBAVUTIL_VERSION_MAJOR < 52) #endif +#ifndef FF_API_AV_FIFO_PEEK +#define FF_API_AV_FIFO_PEEK (LIBAVUTIL_VERSION_MAJOR < 52) +#endif +#ifndef FF_API_OLD_AVOPTIONS +#define FF_API_OLD_AVOPTIONS (LIBAVUTIL_VERSION_MAJOR < 52) +#endif + +/** + * @} + */ + +/** + * @addtogroup lavu_ver + * @{ + */ /** * Return the LIBAVUTIL_VERSION_INT constant. @@ -79,16 +216,35 @@ */ const char *avutil_license(void); +/** + * @} + */ + +/** + * @addtogroup lavu_media Media Type + * @brief Media Type + */ + enum AVMediaType { - AVMEDIA_TYPE_UNKNOWN = -1, + AVMEDIA_TYPE_UNKNOWN = -1, ///< Usually treated as AVMEDIA_TYPE_DATA AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO, - AVMEDIA_TYPE_DATA, + AVMEDIA_TYPE_DATA, ///< Opaque data information usually continuous AVMEDIA_TYPE_SUBTITLE, - AVMEDIA_TYPE_ATTACHMENT, + AVMEDIA_TYPE_ATTACHMENT, ///< Opaque data information usually sparse AVMEDIA_TYPE_NB }; +/** + * @defgroup lavu_const Constants + * @{ + * + * @defgroup lavu_enc Encoding specific + * + * @note those definition should move to avcodec + * @{ + */ + #define FF_LAMBDA_SHIFT 7 #define FF_LAMBDA_SCALE (1< /** + * @defgroup lavu_base64 Base64 + * @ingroup lavu_crypto + * @{ + */ + + +/** * Decode a base64-encoded string. * * @param out buffer for decoded data @@ -51,4 +58,8 @@ */ #define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1) + /** + * @} + */ + #endif /* AVUTIL_BASE64_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/bswap.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/bswap.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/bswap.h 2011-05-01 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/bswap.h 2012-01-11 00:34:30.000000000 +0000 @@ -65,23 +65,14 @@ #ifndef av_bswap32 static av_always_inline av_const uint32_t av_bswap32(uint32_t x) { - x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF); - x= (x>>16) | (x<<16); - return x; + return AV_BSWAP32C(x); } #endif #ifndef av_bswap64 static inline uint64_t av_const av_bswap64(uint64_t x) { - union { - uint64_t ll; - uint32_t l[2]; - } w, r; - w.ll = x; - r.l[0] = av_bswap32 (w.l[1]); - r.l[1] = av_bswap32 (w.l[0]); - return r.ll; + return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32); } #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/common.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/common.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/common.h 2011-05-15 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/common.h 2012-01-11 00:34:30.000000000 +0000 @@ -218,8 +218,18 @@ return (x + (x >> 16)) & 0x3F; } -#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24)) -#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((a) << 24)) +/** + * Count number of bits set to one in x + * @param x value to count bits of + * @return the number of bits set to one in x + */ +static av_always_inline av_const int av_popcount64_c(uint64_t x) +{ + return av_popcount(x) + av_popcount(x >> 32); +} + +#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24)) +#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24)) /** * Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form. @@ -268,16 +278,16 @@ }\ }\ -/*! - * \def PUT_UTF8(val, tmp, PUT_BYTE) +/** + * @def PUT_UTF8(val, tmp, PUT_BYTE) * Convert a 32-bit Unicode character to its UTF-8 encoded form (up to 4 bytes long). - * \param val is an input-only argument and should be of type uint32_t. It holds + * @param val is an input-only argument and should be of type uint32_t. It holds * a UCS-4 encoded Unicode character that is to be converted to UTF-8. If * val is given as a function it is executed only once. - * \param tmp is a temporary variable and should be of type uint8_t. It + * @param tmp is a temporary variable and should be of type uint8_t. It * represents an intermediate value during conversion that is to be * output by PUT_BYTE. - * \param PUT_BYTE writes the converted UTF-8 bytes to any proper destination. + * @param PUT_BYTE writes the converted UTF-8 bytes to any proper destination. * It could be a function or a statement, and uses tmp as the input byte. * For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be * executed up to 4 times for values in the valid UTF-8 range and up to @@ -304,16 +314,16 @@ }\ } -/*! - * \def PUT_UTF16(val, tmp, PUT_16BIT) +/** + * @def PUT_UTF16(val, tmp, PUT_16BIT) * Convert a 32-bit Unicode character to its UTF-16 encoded form (2 or 4 bytes). - * \param val is an input-only argument and should be of type uint32_t. It holds + * @param val is an input-only argument and should be of type uint32_t. It holds * a UCS-4 encoded Unicode character that is to be converted to UTF-16. If * val is given as a function it is executed only once. - * \param tmp is a temporary variable and should be of type uint16_t. It + * @param tmp is a temporary variable and should be of type uint16_t. It * represents an intermediate value during conversion that is to be * output by PUT_16BIT. - * \param PUT_16BIT writes the converted UTF-16 data to any proper destination + * @param PUT_16BIT writes the converted UTF-16 data to any proper destination * in desired endianness. It could be a function or a statement, and uses tmp * as the input byte. For example, PUT_BYTE could be "*output++ = tmp;" * PUT_BYTE will be executed 1 or 2 times depending on input character. @@ -383,3 +393,6 @@ #ifndef av_popcount # define av_popcount av_popcount_c #endif +#ifndef av_popcount64 +# define av_popcount64 av_popcount64_c +#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/cpu.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/cpu.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/cpu.c 2011-03-23 03:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/cpu.c 2012-01-11 00:34:30.000000000 +0000 @@ -39,32 +39,47 @@ #undef printf #include +static const struct { + int flag; + const char *name; +} cpu_flag_tab[] = { +#if ARCH_ARM + { AV_CPU_FLAG_IWMMXT, "iwmmxt" }, +#elif ARCH_PPC + { AV_CPU_FLAG_ALTIVEC, "altivec" }, +#elif ARCH_X86 + { AV_CPU_FLAG_MMX, "mmx" }, + { AV_CPU_FLAG_MMX2, "mmx2" }, + { AV_CPU_FLAG_SSE, "sse" }, + { AV_CPU_FLAG_SSE2, "sse2" }, + { AV_CPU_FLAG_SSE2SLOW, "sse2(slow)" }, + { AV_CPU_FLAG_SSE3, "sse3" }, + { AV_CPU_FLAG_SSE3SLOW, "sse3(slow)" }, + { AV_CPU_FLAG_SSSE3, "ssse3" }, + { AV_CPU_FLAG_ATOM, "atom" }, + { AV_CPU_FLAG_SSE4, "sse4.1" }, + { AV_CPU_FLAG_SSE42, "sse4.2" }, + { AV_CPU_FLAG_AVX, "avx" }, + { AV_CPU_FLAG_XOP, "xop" }, + { AV_CPU_FLAG_FMA4, "fma4" }, + { AV_CPU_FLAG_3DNOW, "3dnow" }, + { AV_CPU_FLAG_3DNOWEXT, "3dnowext" }, +#endif + { 0 } +}; + int main(void) { int cpu_flags = av_get_cpu_flags(); + int i; printf("cpu_flags = 0x%08X\n", cpu_flags); - printf("cpu_flags = %s%s%s%s%s%s%s%s%s%s%s%s%s\n", -#if ARCH_ARM - cpu_flags & AV_CPU_FLAG_IWMMXT ? "IWMMXT " : "", -#elif ARCH_PPC - cpu_flags & AV_CPU_FLAG_ALTIVEC ? "ALTIVEC " : "", -#elif ARCH_X86 - cpu_flags & AV_CPU_FLAG_MMX ? "MMX " : "", - cpu_flags & AV_CPU_FLAG_MMX2 ? "MMX2 " : "", - cpu_flags & AV_CPU_FLAG_SSE ? "SSE " : "", - cpu_flags & AV_CPU_FLAG_SSE2 ? "SSE2 " : "", - cpu_flags & AV_CPU_FLAG_SSE2SLOW ? "SSE2(slow) " : "", - cpu_flags & AV_CPU_FLAG_SSE3 ? "SSE3 " : "", - cpu_flags & AV_CPU_FLAG_SSE3SLOW ? "SSE3(slow) " : "", - cpu_flags & AV_CPU_FLAG_SSSE3 ? "SSSE3 " : "", - cpu_flags & AV_CPU_FLAG_ATOM ? "Atom " : "", - cpu_flags & AV_CPU_FLAG_SSE4 ? "SSE4.1 " : "", - cpu_flags & AV_CPU_FLAG_SSE42 ? "SSE4.2 " : "", - cpu_flags & AV_CPU_FLAG_AVX ? "AVX " : "", - cpu_flags & AV_CPU_FLAG_3DNOW ? "3DNow " : "", - cpu_flags & AV_CPU_FLAG_3DNOWEXT ? "3DNowExt " : ""); -#endif + printf("cpu_flags ="); + for (i = 0; cpu_flag_tab[i].flag; i++) + if (cpu_flags & cpu_flag_tab[i].flag) + printf(" %s", cpu_flag_tab[i].name); + printf("\n"); + return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/cpu.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/cpu.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/cpu.h 2011-05-23 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/cpu.h 2012-01-11 00:34:30.000000000 +0000 @@ -38,6 +38,8 @@ #define AV_CPU_FLAG_SSE4 0x0100 ///< Penryn SSE4.1 functions #define AV_CPU_FLAG_SSE42 0x0200 ///< Nehalem SSE4.2 functions #define AV_CPU_FLAG_AVX 0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used +#define AV_CPU_FLAG_XOP 0x0400 ///< Bulldozer XOP functions +#define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions #define AV_CPU_FLAG_IWMMXT 0x0100 ///< XScale IWMMXT #define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/crc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/crc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/crc.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/crc.c 2012-01-11 00:34:30.000000000 +0000 @@ -56,32 +56,34 @@ * @param ctx_size size of ctx in bytes * @return <0 on failure */ -int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size){ - int i, j; +int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size) +{ + unsigned i, j; uint32_t c; - if (bits < 8 || bits > 32 || poly >= (1LL< 32 || poly >= (1LL << bits)) return -1; - if (ctx_size != sizeof(AVCRC)*257 && ctx_size != sizeof(AVCRC)*1024) + if (ctx_size != sizeof(AVCRC) * 257 && ctx_size != sizeof(AVCRC) * 1024) return -1; for (i = 0; i < 256; i++) { if (le) { for (c = i, j = 0; j < 8; j++) - c = (c>>1)^(poly & (-(c&1))); + c = (c >> 1) ^ (poly & (-(c & 1))); ctx[i] = c; } else { for (c = i << 24, j = 0; j < 8; j++) - c = (c<<1) ^ ((poly<<(32-bits)) & (((int32_t)c)>>31) ); + c = (c << 1) ^ ((poly << (32 - bits)) & (((int32_t) c) >> 31)); ctx[i] = av_bswap32(c); } } - ctx[256]=1; + ctx[256] = 1; #if !CONFIG_SMALL - if(ctx_size >= sizeof(AVCRC)*1024) + if (ctx_size >= sizeof(AVCRC) * 1024) for (i = 0; i < 256; i++) - for(j=0; j<3; j++) - ctx[256*(j+1) + i]= (ctx[256*j + i]>>8) ^ ctx[ ctx[256*j + i]&0xFF ]; + for (j = 0; j < 3; j++) + ctx[256 *(j + 1) + i] = + (ctx[256 * j + i] >> 8) ^ ctx[ctx[256 * j + i] & 0xFF]; #endif return 0; @@ -92,9 +94,10 @@ * @param crc_id ID of a standard CRC * @return a pointer to the CRC table or NULL on failure */ -const AVCRC *av_crc_get_table(AVCRCId crc_id){ +const AVCRC *av_crc_get_table(AVCRCId crc_id) +{ #if !CONFIG_HARDCODED_TABLES - if (!av_crc_table[crc_id][FF_ARRAY_ELEMS(av_crc_table[crc_id])-1]) + if (!av_crc_table[crc_id][FF_ARRAY_ELEMS(av_crc_table[crc_id]) - 1]) if (av_crc_init(av_crc_table[crc_id], av_crc_table_params[crc_id].le, av_crc_table_params[crc_id].bits, @@ -112,46 +115,50 @@ * * @see av_crc_init() "le" parameter */ -uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length){ - const uint8_t *end= buffer+length; +uint32_t av_crc(const AVCRC *ctx, uint32_t crc, + const uint8_t *buffer, size_t length) +{ + const uint8_t *end = buffer + length; #if !CONFIG_SMALL - if(!ctx[256]) { - while(((intptr_t) buffer & 3) && buffer < end) - crc = ctx[((uint8_t)crc) ^ *buffer++] ^ (crc >> 8); - - while(buffer>8 )&0xFF)] - ^ctx[1*256 + ((crc>>16)&0xFF)] - ^ctx[0*256 + ((crc>>24) )]; + if (!ctx[256]) { + while (((intptr_t) buffer & 3) && buffer < end) + crc = ctx[((uint8_t) crc) ^ *buffer++] ^ (crc >> 8); + + while (buffer < end - 3) { + crc ^= av_le2ne32(*(const uint32_t *) buffer); buffer += 4; + crc = ctx[3 * 256 + ( crc & 0xFF)] ^ + ctx[2 * 256 + ((crc >> 8 ) & 0xFF)] ^ + ctx[1 * 256 + ((crc >> 16) & 0xFF)] ^ + ctx[0 * 256 + ((crc >> 24) )]; } } #endif - while(buffer> 8); + while (buffer < end) + crc = ctx[((uint8_t) crc) ^ *buffer++] ^ (crc >> 8); return crc; } #ifdef TEST #undef printf -int main(void){ +int main(void) +{ uint8_t buf[1999]; int i; - int p[4][3]={{AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04}, - {AV_CRC_32_IEEE , 0x04C11DB7, 0xC0F5BAE0}, - {AV_CRC_16_ANSI , 0x8005, 0x1FBB }, - {AV_CRC_8_ATM , 0x07, 0xE3 },}; + int p[4][3] = { { AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04 }, + { AV_CRC_32_IEEE , 0x04C11DB7, 0xC0F5BAE0 }, + { AV_CRC_16_ANSI , 0x8005 , 0x1FBB }, + { AV_CRC_8_ATM , 0x07 , 0xE3 } + }; const AVCRC *ctx; - for(i=0; i 0) { uint64_t dst_val; - uint64_t src_val = src ? av_be2ne64(*(const uint64_t *)src) : 0; + uint64_t src_val = src ? AV_RB64(src) : 0; if (decrypt) { uint64_t tmp = src_val; if (d->triple_des) { @@ -317,12 +319,21 @@ } iv_val = iv ? dst_val : 0; } - *(uint64_t *)dst = av_be2ne64(dst_val); + AV_WB64(dst, dst_val); src += 8; - dst += 8; + if (!mac) + dst += 8; } if (iv) - *(uint64_t *)iv = av_be2ne64(iv_val); + AV_WB64(iv, iv_val); +} + +void av_des_crypt(AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt) { + av_des_crypt_mac(d, dst, src, count, iv, decrypt, 0); +} + +void av_des_mac(AVDES *d, uint8_t *dst, const uint8_t *src, int count) { + av_des_crypt_mac(d, dst, src, count, (uint8_t[8]){0}, 0, 1); } #ifdef TEST @@ -402,7 +413,7 @@ printf("Partial Monte-Carlo test failed\n"); return 1; } - for (i = 0; i < 1000000; i++) { + for (i = 0; i < 1000; i++) { key[0] = rand64(); key[1] = rand64(); key[2] = rand64(); data = rand64(); av_des_init(&d, key, 192, 0); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/des.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/des.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/des.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/des.h 2012-01-11 00:34:30.000000000 +0000 @@ -30,23 +30,32 @@ }; /** - * \brief Initializes an AVDES context. + * @brief Initializes an AVDES context. * - * \param key_bits must be 64 or 192 - * \param decrypt 0 for encryption, 1 for decryption + * @param key_bits must be 64 or 192 + * @param decrypt 0 for encryption/CBC-MAC, 1 for decryption */ int av_des_init(struct AVDES *d, const uint8_t *key, int key_bits, int decrypt); /** - * \brief Encrypts / decrypts using the DES algorithm. + * @brief Encrypts / decrypts using the DES algorithm. * - * \param count number of 8 byte blocks - * \param dst destination array, can be equal to src, must be 8-byte aligned - * \param src source array, can be equal to dst, must be 8-byte aligned, may be NULL - * \param iv initialization vector for CBC mode, if NULL then ECB will be used, + * @param count number of 8 byte blocks + * @param dst destination array, can be equal to src, must be 8-byte aligned + * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL + * @param iv initialization vector for CBC mode, if NULL then ECB will be used, * must be 8-byte aligned - * \param decrypt 0 for encryption, 1 for decryption + * @param decrypt 0 for encryption, 1 for decryption */ void av_des_crypt(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); +/** + * @brief Calculates CBC-MAC using the DES algorithm. + * + * @param count number of 8 byte blocks + * @param dst destination array, can be equal to src, must be 8-byte aligned + * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL + */ +void av_des_mac(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count); + #endif /* AVUTIL_DES_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/dict.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/dict.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/dict.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/dict.c 2012-01-11 00:34:30.000000000 +0000 @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include "avstring.h" #include "dict.h" #include "internal.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/dict.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/dict.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/dict.h 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/dict.h 2012-01-11 00:34:30.000000000 +0000 @@ -18,16 +18,52 @@ */ /** - * @file Public dictionary API. + * @file + * Public dictionary API. */ #ifndef AVUTIL_DICT_H #define AVUTIL_DICT_H +/** + * @addtogroup lavu_dict AVDictionary + * @ingroup lavu_data + * + * @brief Simple key:value store + * + * @{ + * Dictionaries are used for storing key:value pairs. To create + * an AVDictionary, simply pass an address of a NULL pointer to + * av_dict_set(). NULL can be used as an empty dictionary wherever + * a pointer to an AVDictionary is required. + * Use av_dict_get() to retrieve an entry or iterate over all + * entries and finally av_dict_free() to free the dictionary + * and all its contents. + * + * @code + * AVDictionary *d = NULL; // "create" an empty dictionary + * av_dict_set(&d, "foo", "bar", 0); // add an entry + * + * char *k = av_strdup("key"); // if your strings are already allocated, + * char *v = av_strdup("value"); // you can avoid copying them like this + * av_dict_set(&d, k, v, AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL); + * + * AVDictionaryEntry *t = NULL; + * while (t = av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX)) { + * <....> // iterate over all entries in d + * } + * + * av_dict_free(&d); + * @endcode + * + */ + #define AV_DICT_MATCH_CASE 1 #define AV_DICT_IGNORE_SUFFIX 2 -#define AV_DICT_DONT_STRDUP_KEY 4 -#define AV_DICT_DONT_STRDUP_VAL 8 +#define AV_DICT_DONT_STRDUP_KEY 4 /**< Take ownership of a key that's been + allocated with av_malloc() and children. */ +#define AV_DICT_DONT_STRDUP_VAL 8 /**< Take ownership of a value that's been + allocated with av_malloc() and chilren. */ #define AV_DICT_DONT_OVERWRITE 16 ///< Don't overwrite existing entries. #define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no delimiter is added, the strings are simply concatenated. */ @@ -73,8 +109,13 @@ void av_dict_copy(AVDictionary **dst, AVDictionary *src, int flags); /** - * Free all the memory allocated for an AVDictionary struct. + * Free all the memory allocated for an AVDictionary struct + * and all keys and values. */ void av_dict_free(AVDictionary **m); +/** + * @} + */ + #endif // AVUTIL_DICT_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/error.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/error.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/error.c 2011-04-22 04:56:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/error.c 2012-01-11 00:34:30.000000000 +0000 @@ -38,6 +38,7 @@ case AVERROR_PATCHWELCOME: errstr = "Not yet implemented in Libav, patches welcome"; break; case AVERROR_PROTOCOL_NOT_FOUND:errstr = "Protocol not found" ; break; case AVERROR_STREAM_NOT_FOUND: errstr = "Stream not found" ; break; + case AVERROR_BUG: errstr = "Bug detected, please report the issue" ; break; } if (errstr) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/error.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/error.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/error.h 2011-04-22 04:56:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/error.h 2012-01-11 00:34:30.000000000 +0000 @@ -27,6 +27,13 @@ #include #include "avutil.h" +/** + * @addtogroup lavu_error + * + * @{ + */ + + /* error handling */ #if EDOM > 0 #define AVERROR(e) (-(e)) ///< Returns a negative error code from a POSIX error code, to return from library functions. @@ -50,6 +57,7 @@ #define AVERROR_PATCHWELCOME (-MKTAG( 'P','A','W','E')) ///< Not yet implemented in Libav, patches welcome #define AVERROR_PROTOCOL_NOT_FOUND (-MKTAG(0xF8,'P','R','O')) ///< Protocol not found #define AVERROR_STREAM_NOT_FOUND (-MKTAG(0xF8,'S','T','R')) ///< Stream not found +#define AVERROR_BUG (-MKTAG( 'B','U','G',' ')) ///< Bug detected, please report the issue /** * Put a description of the AVERROR code errnum in errbuf. @@ -65,4 +73,8 @@ */ int av_strerror(int errnum, char *errbuf, size_t errbuf_size); +/** + * @} + */ + #endif /* AVUTIL_ERROR_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/eval.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/eval.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/eval.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/eval.c 2012-01-11 00:34:30.000000000 +0000 @@ -28,6 +28,7 @@ #include "avutil.h" #include "eval.h" +#include "log.h" typedef struct Parser { const AVClass *class; @@ -122,6 +123,7 @@ e_mod, e_max, e_min, e_eq, e_gt, e_gte, e_pow, e_mul, e_div, e_add, e_last, e_st, e_while, e_floor, e_ceil, e_trunc, + e_sqrt, e_not, } type; double value; // is sign in other types union { @@ -148,6 +150,8 @@ case e_floor: return e->value * floor(eval_expr(p, e->param[0])); case e_ceil : return e->value * ceil (eval_expr(p, e->param[0])); case e_trunc: return e->value * trunc(eval_expr(p, e->param[0])); + case e_sqrt: return e->value * sqrt (eval_expr(p, e->param[0])); + case e_not: return e->value * eval_expr(p, e->param[0]) == 0; case e_while: { double d = NAN; while (eval_expr(p, e->param[0])) @@ -282,6 +286,8 @@ else if (strmatch(next, "floor" )) d->type = e_floor; else if (strmatch(next, "ceil" )) d->type = e_ceil; else if (strmatch(next, "trunc" )) d->type = e_trunc; + else if (strmatch(next, "sqrt" )) d->type = e_sqrt; + else if (strmatch(next, "not" )) d->type = e_not; else { for (i=0; p->func1_names && p->func1_names[i]; i++) { if (strmatch(next, p->func1_names[i])) { @@ -449,6 +455,8 @@ case e_floor: case e_ceil: case e_trunc: + case e_sqrt: + case e_not: return verify_expr(e->param[0]); default: return verify_expr(e->param[0]) && verify_expr(e->param[1]); } @@ -460,7 +468,7 @@ const char * const *func2_names, double (* const *funcs2)(void *, double, double), int log_offset, void *log_ctx) { - Parser p; + Parser p = { 0 }; AVExpr *e = NULL; char *w = av_malloc(strlen(s) + 1); char *wp = w; @@ -488,6 +496,7 @@ if ((ret = parse_expr(&e, &p)) < 0) goto end; if (*p.s) { + av_expr_free(e); av_log(&p, AV_LOG_ERROR, "Invalid chars '%s' at the end of expression '%s'\n", p.s, s0); ret = AVERROR(EINVAL); goto end; @@ -505,7 +514,7 @@ double av_expr_eval(AVExpr *e, const double *const_values, void *opaque) { - Parser p; + Parser p = { 0 }; p.const_values = const_values; p.opaque = opaque; @@ -532,6 +541,8 @@ #ifdef TEST #undef printf +#include + static double const_values[] = { M_PI, M_E, @@ -544,7 +555,7 @@ 0 }; -int main(void) +int main(int argc, char **argv) { int i; double d; @@ -555,7 +566,7 @@ "-PI", "+PI", "1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)", - "80G/80Gi" + "80G/80Gi", "1k", "1Gi", "1gi", @@ -596,6 +607,11 @@ "trunc(-123.123)", "ceil(123.123)", "ceil(-123.123)", + "sqrt(1764)", + "isnan(sqrt(-1))", + "not(1)", + "not(NAN)", + "not(0)", NULL }; @@ -616,13 +632,16 @@ NULL, NULL, NULL, NULL, NULL, 0, NULL); printf("%f == 0.931322575\n", d); - for (i=0; i<1050; i++) { - START_TIMER + if (argc > 1 && !strcmp(argv[1], "-t")) { + for (i = 0; i < 1050; i++) { + START_TIMER; av_expr_parse_and_eval(&d, "1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)", const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, NULL); - STOP_TIMER("av_expr_parse_and_eval") + STOP_TIMER("av_expr_parse_and_eval"); + } } + return 0; } #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/eval.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/eval.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/eval.h 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/eval.h 2012-01-11 00:34:30.000000000 +0000 @@ -58,7 +58,7 @@ * Parse an expression. * * @param expr a pointer where is put an AVExpr containing the parsed - * value in case of successfull parsing, or NULL otherwise. + * value in case of successful parsing, or NULL otherwise. * The pointed to AVExpr must be freed with av_expr_free() by the user * when it is not needed anymore. * @param s expression as a zero terminated string, for example "1+2^3+5*5+sin(2/3)" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/fifo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/fifo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/fifo.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/fifo.c 2012-01-11 00:34:30.000000000 +0000 @@ -127,3 +127,39 @@ f->rptr -= f->end - f->buffer; f->rndx += size; } + +#ifdef TEST + +#undef printf + +int main(void) +{ + /* create a FIFO buffer */ + AVFifoBuffer *fifo = av_fifo_alloc(13 * sizeof(int)); + int i, j, n; + + /* fill data */ + for (i = 0; av_fifo_space(fifo) >= sizeof(int); i++) + av_fifo_generic_write(fifo, &i, sizeof(int), NULL); + + /* peek at FIFO */ + n = av_fifo_size(fifo)/sizeof(int); + for (i = -n+1; i < n; i++) { + int *v = (int *)av_fifo_peek2(fifo, i*sizeof(int)); + printf("%d: %d\n", i, *v); + } + printf("\n"); + + /* read data */ + for (i = 0; av_fifo_size(fifo) >= sizeof(int); i++) { + av_fifo_generic_read(fifo, &j, sizeof(int), NULL); + printf("%d ", j); + } + printf("\n"); + + av_fifo_free(fifo); + + return 0; +} + +#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/fifo.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/fifo.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/fifo.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/fifo.h 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,7 @@ #define AVUTIL_FIFO_H #include +#include "avutil.h" typedef struct AVFifoBuffer { uint8_t *buffer; @@ -41,20 +42,20 @@ /** * Free an AVFifoBuffer. - * @param *f AVFifoBuffer to free + * @param f AVFifoBuffer to free */ void av_fifo_free(AVFifoBuffer *f); /** * Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied. - * @param *f AVFifoBuffer to reset + * @param f AVFifoBuffer to reset */ void av_fifo_reset(AVFifoBuffer *f); /** * Return the amount of data in bytes in the AVFifoBuffer, that is the * amount of data you can read from it. - * @param *f AVFifoBuffer to read from + * @param f AVFifoBuffer to read from * @return size */ int av_fifo_size(AVFifoBuffer *f); @@ -62,27 +63,27 @@ /** * Return the amount of space in bytes in the AVFifoBuffer, that is the * amount of data you can write into it. - * @param *f AVFifoBuffer to write into + * @param f AVFifoBuffer to write into * @return size */ int av_fifo_space(AVFifoBuffer *f); /** * Feed data from an AVFifoBuffer to a user-supplied callback. - * @param *f AVFifoBuffer to read from + * @param f AVFifoBuffer to read from * @param buf_size number of bytes to read - * @param *func generic read function - * @param *dest data destination + * @param func generic read function + * @param dest data destination */ int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int)); /** * Feed data from a user-supplied callback to an AVFifoBuffer. - * @param *f AVFifoBuffer to write to - * @param *src data source; non-const since it may be used as a + * @param f AVFifoBuffer to write to + * @param src data source; non-const since it may be used as a * modifiable context by the function defined in func * @param size number of bytes to write - * @param *func generic write function; the first parameter is src, + * @param func generic write function; the first parameter is src, * the second is dest_buf, the third is dest_buf_size. * func must return the number of bytes written to dest_buf, or <= 0 to * indicate no more data available to write. @@ -93,7 +94,7 @@ /** * Resize an AVFifoBuffer. - * @param *f AVFifoBuffer to resize + * @param f AVFifoBuffer to resize * @param size new AVFifoBuffer size in bytes * @return <0 for failure, >=0 otherwise */ @@ -101,16 +102,40 @@ /** * Read and discard the specified amount of data from an AVFifoBuffer. - * @param *f AVFifoBuffer to read from + * @param f AVFifoBuffer to read from * @param size amount of data to read in bytes */ void av_fifo_drain(AVFifoBuffer *f, int size); -static inline uint8_t av_fifo_peek(AVFifoBuffer *f, int offs) +/** + * Return a pointer to the data stored in a FIFO buffer at a certain offset. + * The FIFO buffer is not modified. + * + * @param f AVFifoBuffer to peek at, f must be non-NULL + * @param offs an offset in bytes, its absolute value must be less + * than the used buffer size or the returned pointer will + * point outside to the buffer data. + * The used buffer size can be checked with av_fifo_size(). + */ +static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs) { uint8_t *ptr = f->rptr + offs; if (ptr >= f->end) - ptr -= f->end - f->buffer; - return *ptr; + ptr = f->buffer + (ptr - f->end); + else if (ptr < f->buffer) + ptr = f->end - (f->buffer - ptr); + return ptr; +} + +#if FF_API_AV_FIFO_PEEK +/** + * @deprecated Use av_fifo_peek2() instead. + */ +attribute_deprecated +static inline uint8_t av_fifo_peek(AVFifoBuffer *f, int offs) +{ + return *av_fifo_peek2(f, offs); } +#endif + #endif /* AVUTIL_FIFO_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/file.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/file.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/file.c 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/file.c 2012-01-11 00:34:30.000000000 +0000 @@ -17,6 +17,7 @@ */ #include "file.h" +#include "log.h" #include #include #include diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/file.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/file.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/file.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/file.h 2012-01-11 00:34:30.000000000 +0000 @@ -22,7 +22,8 @@ #include "avutil.h" /** - * @file misc file utilities + * @file + * Misc file utilities. */ /** diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/imgutils.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/imgutils.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/imgutils.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/imgutils.c 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,7 @@ #include "imgutils.h" #include "internal.h" +#include "log.h" #include "pixdesc.h" void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], @@ -117,7 +118,7 @@ has_plane[desc->comp[i].plane] = 1; total_size = size[0]; - for (i = 1; has_plane[i] && i < 4; i++) { + for (i = 1; i < 4 && has_plane[i]; i++) { int h, s = (i == 1 || i == 2) ? desc->log2_chroma_h : 0; data[i] = data[i-1] + size[i-1]; h = (height + (1 << s) - 1) >> s; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/imgutils.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/imgutils.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/imgutils.h 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/imgutils.h 2012-01-11 00:34:30.000000000 +0000 @@ -22,6 +22,9 @@ /** * @file * misc image utilities + * + * @addtogroup lavu_picture + * @{ */ #include "avutil.h" @@ -69,7 +72,7 @@ * * @param data pointers array to be filled with the pointer for each image plane * @param ptr the pointer to a buffer which will contain the image - * @param linesizes[4] the array containing the linesize for each + * @param linesizes the array containing the linesize for each * plane, should be filled by av_image_fill_linesizes() * @return the size in bytes required for the image buffer, a negative * error code in case of failure @@ -106,8 +109,8 @@ /** * Copy image in src_data to dst_data. * - * @param dst_linesize linesizes for the image in dst_data - * @param src_linesize linesizes for the image in src_data + * @param dst_linesizes linesizes for the image in dst_data + * @param src_linesizes linesizes for the image in src_data */ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], const uint8_t *src_data[4], const int src_linesizes[4], @@ -127,4 +130,9 @@ int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt); +/** + * @} + */ + + #endif /* AVUTIL_IMGUTILS_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/integer.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/integer.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/integer.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/integer.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,197 +0,0 @@ -/* - * arbitrary precision integers - * Copyright (c) 2004 Michael Niedermayer - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * arbitrary precision integers - * @author Michael Niedermayer - */ - -#include "common.h" -#include "integer.h" - -AVInteger av_add_i(AVInteger a, AVInteger b){ - int i, carry=0; - - for(i=0; i>16) + a.v[i] + b.v[i]; - a.v[i]= carry; - } - return a; -} - -AVInteger av_sub_i(AVInteger a, AVInteger b){ - int i, carry=0; - - for(i=0; i>16) + a.v[i] - b.v[i]; - a.v[i]= carry; - } - return a; -} - -int av_log2_i(AVInteger a){ - int i; - - for(i=AV_INTEGER_SIZE-1; i>=0; i--){ - if(a.v[i]) - return av_log2_16bit(a.v[i]) + 16*i; - } - return -1; -} - -AVInteger av_mul_i(AVInteger a, AVInteger b){ - AVInteger out; - int i, j; - int na= (av_log2_i(a)+16) >> 4; - int nb= (av_log2_i(b)+16) >> 4; - - memset(&out, 0, sizeof(out)); - - for(i=0; i>16) + out.v[j] + a.v[i]*b.v[j-i]; - out.v[j]= carry; - } - } - - return out; -} - -int av_cmp_i(AVInteger a, AVInteger b){ - int i; - int v= (int16_t)a.v[AV_INTEGER_SIZE-1] - (int16_t)b.v[AV_INTEGER_SIZE-1]; - if(v) return (v>>16)|1; - - for(i=AV_INTEGER_SIZE-2; i>=0; i--){ - int v= a.v[i] - b.v[i]; - if(v) return (v>>16)|1; - } - return 0; -} - -AVInteger av_shr_i(AVInteger a, int s){ - AVInteger out; - int i; - - for(i=0; i>4); - unsigned int v=0; - if(index+1> (s&15); - } - return out; -} - -AVInteger av_mod_i(AVInteger *quot, AVInteger a, AVInteger b){ - int i= av_log2_i(a) - av_log2_i(b); - AVInteger quot_temp; - if(!quot) quot = "_temp; - - assert((int16_t)a[AV_INTEGER_SIZE-1] >= 0 && (int16_t)b[AV_INTEGER_SIZE-1] >= 0); - assert(av_log2(b)>=0); - - if(i > 0) - b= av_shr_i(b, -i); - - memset(quot, 0, sizeof(AVInteger)); - - while(i-- >= 0){ - *quot= av_shr_i(*quot, -1); - if(av_cmp_i(a, b) >= 0){ - a= av_sub_i(a, b); - quot->v[0] += 1; - } - b= av_shr_i(b, 1); - } - return a; -} - -AVInteger av_div_i(AVInteger a, AVInteger b){ - AVInteger quot; - av_mod_i(", a, b); - return quot; -} - -AVInteger av_int2i(int64_t a){ - AVInteger out; - int i; - - for(i=0; i>=16; - } - return out; -} - -int64_t av_i2int(AVInteger a){ - int i; - int64_t out=(int8_t)a.v[AV_INTEGER_SIZE-1]; - - for(i= AV_INTEGER_SIZE-2; i>=0; i--){ - out = (out<<16) + a.v[i]; - } - return out; -} - -#ifdef TEST -#undef NDEBUG -#include - -const uint8_t ff_log2_tab[256]={ - 0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, - 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 -}; - -int main(void){ - int64_t a,b; - - for(a=7; a<256*256*256; a+=13215){ - for(b=3; b<256*256*256; b+=27118){ - AVInteger ai= av_int2i(a); - AVInteger bi= av_int2i(b); - - assert(av_i2int(ai) == a); - assert(av_i2int(bi) == b); - assert(av_i2int(av_add_i(ai,bi)) == a+b); - assert(av_i2int(av_sub_i(ai,bi)) == a-b); - assert(av_i2int(av_mul_i(ai,bi)) == a*b); - assert(av_i2int(av_shr_i(ai, 9)) == a>>9); - assert(av_i2int(av_shr_i(ai,-9)) == a<<9); - assert(av_i2int(av_shr_i(ai, 17)) == a>>17); - assert(av_i2int(av_shr_i(ai,-17)) == a<<17); - assert(av_log2_i(ai) == av_log2(a)); - assert(av_i2int(av_div_i(ai,bi)) == a/b); - } - } - return 0; -} -#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/integer.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/integer.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/integer.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/integer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -/* - * arbitrary precision integers - * Copyright (c) 2004 Michael Niedermayer - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * arbitrary precision integers - * @author Michael Niedermayer - */ - -#ifndef AVUTIL_INTEGER_H -#define AVUTIL_INTEGER_H - -#include -#include "common.h" - -#define AV_INTEGER_SIZE 8 - -typedef struct AVInteger{ - uint16_t v[AV_INTEGER_SIZE]; -} AVInteger; - -AVInteger av_add_i(AVInteger a, AVInteger b) av_const; -AVInteger av_sub_i(AVInteger a, AVInteger b) av_const; - -/** - * Return the rounded-down value of the base 2 logarithm of the given - * AVInteger. This is simply the index of the most significant bit - * which is 1, or 0 if all bits are 0. - */ -int av_log2_i(AVInteger a) av_const; -AVInteger av_mul_i(AVInteger a, AVInteger b) av_const; - -/** - * Return 0 if a==b, 1 if a>b and -1 if a +#include "attributes.h" + +union av_intfloat32 { + uint32_t i; + float f; +}; + +union av_intfloat64 { + uint64_t i; + double f; +}; + +/** + * Reinterpret a 32-bit integer as a float. + */ +static av_always_inline float av_int2float(uint32_t i) +{ + union av_intfloat32 v = { .i = i }; + return v.f; +} + +/** + * Reinterpret a float as a 32-bit integer. + */ +static av_always_inline uint32_t av_float2int(float f) +{ + union av_intfloat32 v = { .f = f }; + return v.i; +} + +/** + * Reinterpret a 64-bit integer as a double. + */ +static av_always_inline double av_int2double(uint64_t i) +{ + union av_intfloat64 v = { .i = i }; + return v.f; +} + +/** + * Reinterpret a double as a 64-bit integer. + */ +static av_always_inline uint64_t av_double2int(double f) +{ + union av_intfloat64 v = { .f = f }; + return v.i; +} + +#endif /* AVUTIL_INTFLOAT_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/intfloat_readwrite.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/intfloat_readwrite.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/intfloat_readwrite.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/intfloat_readwrite.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,13 +30,13 @@ #include "intfloat_readwrite.h" double av_int2dbl(int64_t v){ - if(v+v > 0xFFEULL<<52) + if((uint64_t)v+v > 0xFFEULL<<52) return NAN; return ldexp(((v&((1LL<<52)-1)) + (1LL<<52)) * (v>>63|1), (v>>52&0x7FF)-1075); } float av_int2flt(int32_t v){ - if(v+v > 0xFF000000U) + if((uint32_t)v+v > 0xFF000000U) return NAN; return ldexp(((v&0x7FFFFF) + (1<<23)) * (v>>31|1), (v>>23&0xFF)-150); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/intfloat_readwrite.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/intfloat_readwrite.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/intfloat_readwrite.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/intfloat_readwrite.h 2012-01-11 00:34:30.000000000 +0000 @@ -30,11 +30,11 @@ uint8_t mantissa[8]; } AVExtFloat; -double av_int2dbl(int64_t v) av_const; -float av_int2flt(int32_t v) av_const; -double av_ext2dbl(const AVExtFloat ext) av_const; -int64_t av_dbl2int(double d) av_const; -int32_t av_flt2int(float d) av_const; -AVExtFloat av_dbl2ext(double d) av_const; +attribute_deprecated double av_int2dbl(int64_t v) av_const; +attribute_deprecated float av_int2flt(int32_t v) av_const; +attribute_deprecated double av_ext2dbl(const AVExtFloat ext) av_const; +attribute_deprecated int64_t av_dbl2int(double d) av_const; +attribute_deprecated int32_t av_flt2int(float d) av_const; +attribute_deprecated AVExtFloat av_dbl2ext(double d) av_const; #endif /* AVUTIL_INTFLOAT_READWRITE_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/intmath.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/intmath.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/intmath.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/intmath.h 2012-01-11 00:34:30.000000000 +0000 @@ -25,6 +25,11 @@ #include "config.h" #include "attributes.h" +/** + * @addtogroup lavu_internal + * @{ + */ + extern const uint32_t ff_inverse[257]; #if ARCH_ARM @@ -76,4 +81,7 @@ return b - (a < b * b); } +/** + * @} + */ #endif /* AVUTIL_INTMATH_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/lfg.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/lfg.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/lfg.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/lfg.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,19 +27,21 @@ #include "intreadwrite.h" #include "attributes.h" -void av_cold av_lfg_init(AVLFG *c, unsigned int seed){ - uint8_t tmp[16]={0}; +void av_cold av_lfg_init(AVLFG *c, unsigned int seed) +{ + uint8_t tmp[16] = { 0 }; int i; - for(i=8; i<64; i+=4){ - AV_WL32(tmp, seed); tmp[4]=i; - av_md5_sum(tmp, tmp, 16); - c->state[i ]= AV_RL32(tmp); - c->state[i+1]= AV_RL32(tmp+4); - c->state[i+2]= AV_RL32(tmp+8); - c->state[i+3]= AV_RL32(tmp+12); + for (i = 8; i < 64; i += 4) { + AV_WL32(tmp, seed); + tmp[4] = i; + av_md5_sum(tmp, tmp, 16); + c->state[i ] = AV_RL32(tmp); + c->state[i + 1] = AV_RL32(tmp + 4); + c->state[i + 2] = AV_RL32(tmp + 8); + c->state[i + 3] = AV_RL32(tmp + 12); } - c->index=0; + c->index = 0; } void av_bmg_get(AVLFG *lfg, double out[2]) @@ -47,9 +49,9 @@ double x1, x2, w; do { - x1 = 2.0/UINT_MAX*av_lfg_get(lfg) - 1.0; - x2 = 2.0/UINT_MAX*av_lfg_get(lfg) - 1.0; - w = x1*x1 + x2*x2; + x1 = 2.0 / UINT_MAX * av_lfg_get(lfg) - 1.0; + x2 = 2.0 / UINT_MAX * av_lfg_get(lfg) - 1.0; + w = x1 * x1 + x2 * x2; } while (w >= 1.0); w = sqrt((-2.0 * log(w)) / w); @@ -63,7 +65,7 @@ int main(void) { - int x=0; + int x = 0; int i, j; AVLFG state; @@ -71,8 +73,8 @@ for (j = 0; j < 10000; j++) { START_TIMER for (i = 0; i < 624; i++) { -// av_log(NULL,AV_LOG_ERROR, "%X\n", av_lfg_get(&state)); - x+=av_lfg_get(&state); + //av_log(NULL, AV_LOG_ERROR, "%X\n", av_lfg_get(&state)); + x += av_lfg_get(&state); } STOP_TIMER("624 calls of av_lfg_get"); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/lfg.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/lfg.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/lfg.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/lfg.h 2012-01-11 00:34:30.000000000 +0000 @@ -55,7 +55,7 @@ * Get the next two numbers generated by a Box-Muller Gaussian * generator using the random numbers issued by lfg. * - * @param out[2] array where the two generated numbers are placed + * @param out array where the two generated numbers are placed */ void av_bmg_get(AVLFG *lfg, double out[2]); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/lls.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/lls.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/lls.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/lls.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,105 +30,123 @@ #include "lls.h" -void av_init_lls(LLSModel *m, int indep_count){ +void av_init_lls(LLSModel *m, int indep_count) +{ memset(m, 0, sizeof(LLSModel)); - - m->indep_count= indep_count; + m->indep_count = indep_count; } -void av_update_lls(LLSModel *m, double *var, double decay){ - int i,j; +void av_update_lls(LLSModel *m, double *var, double decay) +{ + int i, j; - for(i=0; i<=m->indep_count; i++){ - for(j=i; j<=m->indep_count; j++){ + for (i = 0; i <= m->indep_count; i++) { + for (j = i; j <= m->indep_count; j++) { m->covariance[i][j] *= decay; - m->covariance[i][j] += var[i]*var[j]; + m->covariance[i][j] += var[i] * var[j]; } } } -void av_solve_lls(LLSModel *m, double threshold, int min_order){ - int i,j,k; - double (*factor)[MAX_VARS+1]= (void*)&m->covariance[1][0]; - double (*covar )[MAX_VARS+1]= (void*)&m->covariance[1][1]; - double *covar_y = m->covariance[0]; - int count= m->indep_count; - - for(i=0; i=0; k--) - sum -= factor[i][k]*factor[j][k]; - - if(i==j){ - if(sum < threshold) - sum= 1.0; - factor[i][i]= sqrt(sum); - }else - factor[j][i]= sum / factor[i][i]; +void av_solve_lls(LLSModel *m, double threshold, int min_order) +{ + int i, j, k; + double (*factor)[MAX_VARS + 1] = (void *) &m->covariance[1][0]; + double (*covar) [MAX_VARS + 1] = (void *) &m->covariance[1][1]; + double *covar_y = m->covariance[0]; + int count = m->indep_count; + + for (i = 0; i < count; i++) { + for (j = i; j < count; j++) { + double sum = covar[i][j]; + + for (k = i - 1; k >= 0; k--) + sum -= factor[i][k] * factor[j][k]; + + if (i == j) { + if (sum < threshold) + sum = 1.0; + factor[i][i] = sqrt(sum); + } else { + factor[j][i] = sum / factor[i][i]; + } } } - for(i=0; i=0; k--) - sum -= factor[i][k]*m->coeff[0][k]; - m->coeff[0][i]= sum / factor[i][i]; + + for (i = 0; i < count; i++) { + double sum = covar_y[i + 1]; + + for (k = i - 1; k >= 0; k--) + sum -= factor[i][k] * m->coeff[0][k]; + + m->coeff[0][i] = sum / factor[i][i]; } - for(j=count-1; j>=min_order; j--){ - for(i=j; i>=0; i--){ - double sum= m->coeff[0][i]; - for(k=i+1; k<=j; k++) - sum -= factor[k][i]*m->coeff[j][k]; - m->coeff[j][i]= sum / factor[i][i]; + for (j = count - 1; j >= min_order; j--) { + for (i = j; i >= 0; i--) { + double sum = m->coeff[0][i]; + + for (k = i + 1; k <= j; k++) + sum -= factor[k][i] * m->coeff[j][k]; + + m->coeff[j][i] = sum / factor[i][i]; } - m->variance[j]= covar_y[0]; - for(i=0; i<=j; i++){ - double sum= m->coeff[j][i]*covar[i][i] - 2*covar_y[i+1]; - for(k=0; kcoeff[j][k]*covar[k][i]; - m->variance[j] += m->coeff[j][i]*sum; + m->variance[j] = covar_y[0]; + + for (i = 0; i <= j; i++) { + double sum = m->coeff[j][i] * covar[i][i] - 2 * covar_y[i + 1]; + + for (k = 0; k < i; k++) + sum += 2 * m->coeff[j][k] * covar[k][i]; + + m->variance[j] += m->coeff[j][i] * sum; } } } -double av_evaluate_lls(LLSModel *m, double *param, int order){ +double av_evaluate_lls(LLSModel *m, double *param, int order) +{ int i; - double out= 0; + double out = 0; - for(i=0; i<=order; i++) - out+= param[i]*m->coeff[order][i]; + for (i = 0; i <= order; i++) + out += param[i] * m->coeff[order][i]; return out; } #ifdef TEST -#include #include +#include +#include "lfg.h" -int main(void){ +int main(void) +{ LLSModel m; int i, order; + AVLFG lfg; + av_lfg_init(&lfg, 1); av_init_lls(&m, 3); - for(i=0; i<100; i++){ + for (i = 0; i < 100; i++) { double var[4]; double eval; - var[0] = (rand() / (double)RAND_MAX - 0.5)*2; - var[1] = var[0] + rand() / (double)RAND_MAX - 0.5; - var[2] = var[1] + rand() / (double)RAND_MAX - 0.5; - var[3] = var[2] + rand() / (double)RAND_MAX - 0.5; + + var[0] = (av_lfg_get(&lfg) / (double) UINT_MAX - 0.5) * 2; + var[1] = var[0] + av_lfg_get(&lfg) / (double) UINT_MAX - 0.5; + var[2] = var[1] + av_lfg_get(&lfg) / (double) UINT_MAX - 0.5; + var[3] = var[2] + av_lfg_get(&lfg) / (double) UINT_MAX - 0.5; av_update_lls(&m, var, 0.99); av_solve_lls(&m, 0.001, 0); - for(order=0; order<3; order++){ - eval= av_evaluate_lls(&m, var+1, order); + for (order = 0; order < 3; order++) { + eval = av_evaluate_lls(&m, var + 1, order); printf("real:%9f order:%d pred:%9f var:%f coeffs:%f %9f %9f\n", - var[0], order, eval, sqrt(m.variance[order] / (i+1)), - m.coeff[order][0], m.coeff[order][1], m.coeff[order][2]); + var[0], order, eval, sqrt(m.variance[order] / (i + 1)), + m.coeff[order][0], m.coeff[order][1], + m.coeff[order][2]); } } return 0; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/log.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/log.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/log.c 2011-05-09 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/log.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,104 +35,116 @@ #if defined(_WIN32) && !defined(__MINGW32CE__) #include -static const uint8_t color[] = {12,12,12,14,7,7,7}; +static const uint8_t color[] = { 12, 12, 12, 14, 7, 7, 7 }; static int16_t background, attr_orig; static HANDLE con; #define set_color(x) SetConsoleTextAttribute(con, background | color[x]) #define reset_color() SetConsoleTextAttribute(con, attr_orig) #else -static const uint8_t color[]={0x41,0x41,0x11,0x03,9,9,9}; -#define set_color(x) fprintf(stderr, "\033[%d;3%dm", color[x]>>4, color[x]&15) +static const uint8_t color[] = { 0x41, 0x41, 0x11, 0x03, 9, 9, 9 }; +#define set_color(x) fprintf(stderr, "\033[%d;3%dm", color[x] >> 4, color[x]&15) #define reset_color() fprintf(stderr, "\033[0m") #endif -static int use_color=-1; +static int use_color = -1; #undef fprintf -static void colored_fputs(int level, const char *str){ - if(use_color<0){ +static void colored_fputs(int level, const char *str) +{ + if (use_color < 0) { #if defined(_WIN32) && !defined(__MINGW32CE__) CONSOLE_SCREEN_BUFFER_INFO con_info; con = GetStdHandle(STD_ERROR_HANDLE); - use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR") && !getenv("FFMPEG_FORCE_NOCOLOR"); + use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR") && + !getenv("AV_LOG_FORCE_NOCOLOR"); if (use_color) { GetConsoleScreenBufferInfo(con, &con_info); attr_orig = con_info.wAttributes; background = attr_orig & 0xF0; } #elif HAVE_ISATTY - use_color= !getenv("NO_COLOR") && !getenv("FFMPEG_FORCE_NOCOLOR") && - (getenv("TERM") && isatty(2) || getenv("FFMPEG_FORCE_COLOR")); + use_color = !getenv("NO_COLOR") && !getenv("AV_LOG_FORCE_NOCOLOR") && + (getenv("TERM") && isatty(2) || + getenv("AV_LOG_FORCE_COLOR")); #else - use_color= getenv("FFMPEG_FORCE_COLOR") && !getenv("NO_COLOR") && !getenv("FFMPEG_FORCE_NOCOLOR"); + use_color = getenv("AV_LOG_FORCE_COLOR") && !getenv("NO_COLOR") && + !getenv("AV_LOG_FORCE_NOCOLOR"); #endif } - if(use_color){ + if (use_color) { set_color(level); } fputs(str, stderr); - if(use_color){ + if (use_color) { reset_color(); } } -const char* av_default_item_name(void* ptr){ - return (*(AVClass**)ptr)->class_name; +const char *av_default_item_name(void *ptr) +{ + return (*(AVClass **) ptr)->class_name; } void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl) { - static int print_prefix=1; + static int print_prefix = 1; static int count; static char prev[1024]; char line[1024]; static int is_atty; - AVClass* avc= ptr ? *(AVClass**)ptr : NULL; - if(level>av_log_level) + AVClass* avc = ptr ? *(AVClass **) ptr : NULL; + if (level > av_log_level) return; - line[0]=0; + line[0] = 0; #undef fprintf - if(print_prefix && avc) { + if (print_prefix && avc) { if (avc->parent_log_context_offset) { - AVClass** parent= *(AVClass***)(((uint8_t*)ptr) + avc->parent_log_context_offset); - if(parent && *parent){ - snprintf(line, sizeof(line), "[%s @ %p] ", (*parent)->item_name(parent), parent); + AVClass** parent = *(AVClass ***) (((uint8_t *) ptr) + + avc->parent_log_context_offset); + if (parent && *parent) { + snprintf(line, sizeof(line), "[%s @ %p] ", + (*parent)->item_name(parent), parent); } } - snprintf(line + strlen(line), sizeof(line) - strlen(line), "[%s @ %p] ", avc->item_name(ptr), ptr); + snprintf(line + strlen(line), sizeof(line) - strlen(line), "[%s @ %p] ", + avc->item_name(ptr), ptr); } vsnprintf(line + strlen(line), sizeof(line) - strlen(line), fmt, vl); - print_prefix = strlen(line) && line[strlen(line)-1] == '\n'; + print_prefix = strlen(line) && line[strlen(line) - 1] == '\n'; #if HAVE_ISATTY - if(!is_atty) is_atty= isatty(2) ? 1 : -1; + if (!is_atty) + is_atty = isatty(2) ? 1 : -1; #endif - if(print_prefix && (flags & AV_LOG_SKIP_REPEATED) && !strncmp(line, prev, sizeof line)){ + if (print_prefix && (flags & AV_LOG_SKIP_REPEATED) && + !strncmp(line, prev, sizeof line)) { count++; - if(is_atty==1) + if (is_atty == 1) fprintf(stderr, " Last message repeated %d times\r", count); return; } - if(count>0){ + if (count > 0) { fprintf(stderr, " Last message repeated %d times\n", count); - count=0; + count = 0; } - colored_fputs(av_clip(level>>3, 0, 6), line); + colored_fputs(av_clip(level >> 3, 0, 6), line); av_strlcpy(prev, line, sizeof line); } -static void (*av_log_callback)(void*, int, const char*, va_list) = av_log_default_callback; +static void (*av_log_callback)(void*, int, const char*, va_list) = + av_log_default_callback; void av_log(void* avcl, int level, const char *fmt, ...) { - AVClass* avc= avcl ? *(AVClass**)avcl : NULL; + AVClass* avc = avcl ? *(AVClass **) avcl : NULL; va_list vl; va_start(vl, fmt); - if(avc && avc->version >= (50<<16 | 15<<8 | 2) && avc->log_level_offset_offset && level>=AV_LOG_FATAL) - level += *(int*)(((uint8_t*)avcl) + avc->log_level_offset_offset); + if (avc && avc->version >= (50 << 16 | 15 << 8 | 2) && + avc->log_level_offset_offset && level >= AV_LOG_FATAL) + level += *(int *) (((uint8_t *) avcl) + avc->log_level_offset_offset); av_vlog(avcl, level, fmt, vl); va_end(vl); } @@ -154,7 +166,7 @@ void av_log_set_flags(int arg) { - flags= arg; + flags = arg; } void av_log_set_callback(void (*callback)(void*, int, const char*, va_list)) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/log.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/log.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/log.h 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/log.h 2012-01-11 00:34:30.000000000 +0000 @@ -23,13 +23,14 @@ #include #include "avutil.h" +#include "attributes.h" /** * Describe the class of an AVClass context structure. That is an * arbitrary struct of which the first field is a pointer to an * AVClass struct (e.g. AVCodecContext, AVFormatContext etc.). */ -typedef struct { +typedef struct AVClass { /** * The name of the class; usually it is the same name as the * context structure type to which the AVClass is associated. @@ -72,11 +73,19 @@ int parent_log_context_offset; /** - * A function for extended searching, e.g. in possible - * children objects. + * Return next AVOptions-enabled child or NULL */ - const struct AVOption* (*opt_find)(void *obj, const char *name, const char *unit, - int opt_flags, int search_flags); + void* (*child_next)(void *obj, void *prev); + + /** + * Return an AVClass corresponding to next potential + * AVOptions-enabled child. + * + * The difference between child_next and this is that + * child_next iterates over _already existing_ objects, while + * child_class_next iterates over _all possible_ children. + */ + const struct AVClass* (*child_class_next)(const struct AVClass *prev); } AVClass; /* av_log API */ @@ -129,11 +138,7 @@ * subsequent arguments are converted to output. * @see av_vlog */ -#ifdef __GNUC__ -void av_log(void *avcl, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); -#else -void av_log(void *avcl, int level, const char *fmt, ...); -#endif +void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4); void av_vlog(void *avcl, int level, const char *fmt, va_list); int av_log_get_level(void); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/lzo.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/lzo.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/lzo.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/lzo.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,14 +21,14 @@ #include "avutil.h" #include "common.h" -//! Avoid e.g. MPlayers fast_memcpy, it slows things down here. +/// Avoid e.g. MPlayers fast_memcpy, it slows things down here. #undef memcpy #include #include "lzo.h" -//! Define if we may write up to 12 bytes beyond the output buffer. +/// Define if we may write up to 12 bytes beyond the output buffer. #define OUTBUF_PADDED 1 -//! Define if we may read up to 8 bytes beyond the input buffer. +/// Define if we may read up to 8 bytes beyond the input buffer. #define INBUF_PADDED 1 typedef struct LZOContext { const uint8_t *in, *in_end; @@ -37,8 +37,8 @@ } LZOContext; /** - * \brief Reads one byte from the input buffer, avoiding an overrun. - * \return byte read + * @brief Reads one byte from the input buffer, avoiding an overrun. + * @return byte read */ static inline int get_byte(LZOContext *c) { if (c->in < c->in_end) @@ -54,10 +54,10 @@ #endif /** - * \brief Decodes a length value in the coding used by lzo. - * \param x previous byte value - * \param mask bits used from x - * \return decoded length value + * @brief Decodes a length value in the coding used by lzo. + * @param x previous byte value + * @param mask bits used from x + * @return decoded length value */ static inline int get_len(LZOContext *c, int x, int mask) { int cnt = x & mask; @@ -82,8 +82,8 @@ #endif /** - * \brief Copies bytes from input to output buffer with checking. - * \param cnt number of bytes to copy, must be >= 0 + * @brief Copies bytes from input to output buffer with checking. + * @param cnt number of bytes to copy, must be >= 0 */ static inline void copy(LZOContext *c, int cnt) { register const uint8_t *src = c->in; @@ -111,9 +111,9 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt); /** - * \brief Copies previously decoded bytes to current position. - * \param back how many bytes back we start - * \param cnt number of bytes to copy, must be >= 0 + * @brief Copies previously decoded bytes to current position. + * @param back how many bytes back we start + * @param cnt number of bytes to copy, must be >= 0 * * cnt > back is valid, this will copy the bytes we just copied, * thus creating a repeating pattern with a period length of back. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/lzo.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/lzo.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/lzo.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/lzo.h 2012-01-11 00:34:30.000000000 +0000 @@ -22,30 +22,37 @@ #ifndef AVUTIL_LZO_H #define AVUTIL_LZO_H +/** + * @defgroup lavu_lzo LZO + * @ingroup lavu_crypto + * + * @{ + */ + #include -/** \defgroup errflags Error flags returned by av_lzo1x_decode - * \{ */ -//! end of the input buffer reached before decoding finished +/** @name Error flags returned by av_lzo1x_decode + * @{ */ +/// end of the input buffer reached before decoding finished #define AV_LZO_INPUT_DEPLETED 1 -//! decoded data did not fit into output buffer +/// decoded data did not fit into output buffer #define AV_LZO_OUTPUT_FULL 2 -//! a reference to previously decoded data was wrong +/// a reference to previously decoded data was wrong #define AV_LZO_INVALID_BACKPTR 4 -//! a non-specific error in the compressed bitstream +/// a non-specific error in the compressed bitstream #define AV_LZO_ERROR 8 -/** \} */ +/** @} */ #define AV_LZO_INPUT_PADDING 8 #define AV_LZO_OUTPUT_PADDING 12 /** - * \brief Decodes LZO 1x compressed data. - * \param out output buffer - * \param outlen size of output buffer, number of bytes left are returned here - * \param in input buffer - * \param inlen size of input buffer, number of bytes left are returned here - * \return 0 on success, otherwise a combination of the error flags above + * @brief Decodes LZO 1x compressed data. + * @param out output buffer + * @param outlen size of output buffer, number of bytes left are returned here + * @param in input buffer + * @param inlen size of input buffer, number of bytes left are returned here + * @return 0 on success, otherwise a combination of the error flags above * * Make sure all buffers are appropriately padded, in must provide * AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes. @@ -53,14 +60,18 @@ int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen); /** - * \brief deliberately overlapping memcpy implementation - * \param dst destination buffer; must be padded with 12 additional bytes - * \param back how many bytes back we start (the initial size of the overlapping window) - * \param cnt number of bytes to copy, must be >= 0 + * @brief deliberately overlapping memcpy implementation + * @param dst destination buffer; must be padded with 12 additional bytes + * @param back how many bytes back we start (the initial size of the overlapping window) + * @param cnt number of bytes to copy, must be >= 0 * * cnt > back is valid, this will copy the bytes we just copied, * thus creating a repeating pattern with a period length of back. */ void av_memcpy_backptr(uint8_t *dst, int back, int cnt); +/** + * @} + */ + #endif /* AVUTIL_LZO_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/Makefile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/Makefile 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/Makefile 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,3 @@ -include $(SUBDIR)../config.mak - NAME = avutil HEADERS = adler32.h \ @@ -77,13 +75,12 @@ OBJS-$(ARCH_PPC) += ppc/cpu.o OBJS-$(ARCH_X86) += x86/cpu.o -TESTPROGS = adler32 aes base64 cpu crc des eval lls md5 pca sha tree +TESTPROGS = adler32 aes avstring base64 cpu crc des eval file fifo lfg lls \ + md5 opt parseutils rational sha tree TESTPROGS-$(HAVE_LZO1X_999_COMPRESS) += lzo DIRS = arm bfin sh4 x86 ARCH_HEADERS = bswap.h intmath.h intreadwrite.h timer.h -include $(SUBDIR)../subdir.mak - $(SUBDIR)lzo-test$(EXESUF): ELIBS = -llzo2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/mathematics.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/mathematics.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/mathematics.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/mathematics.c 2012-01-11 00:34:30.000000000 +0000 @@ -150,32 +150,3 @@ c-= mod; return c; } - -#ifdef TEST -#include "integer.h" -#undef printf -int main(void){ - int64_t a,b,c,d,e; - - for(a=7; a<(1LL<<62); a+=a/3+1){ - for(b=3; b<(1LL<<62); b+=b/4+1){ - for(c=9; c<(1LL<<62); c+=(c*2)/5+3){ - int64_t r= c/2; - AVInteger ai; - ai= av_mul_i(av_int2i(a), av_int2i(b)); - ai= av_add_i(ai, av_int2i(r)); - - d= av_i2int(av_div_i(ai, av_int2i(c))); - - e= av_rescale(a,b,c); - - if((double)a * (double)b / (double)c > (1LL<<63)) - continue; - - if(d!=e) printf("%"PRId64"*%"PRId64"/%"PRId64"= %"PRId64"=%"PRId64"\n", a, b, c, d, e); - } - } - } - return 0; -} -#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/mathematics.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/mathematics.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/mathematics.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/mathematics.h 2012-01-11 00:34:30.000000000 +0000 @@ -57,6 +57,12 @@ #define INFINITY (1.0/0.0) #endif +/** + * @addtogroup lavu_math + * @{ + */ + + enum AVRounding { AV_ROUND_ZERO = 0, ///< Round toward zero. AV_ROUND_INF = 1, ///< Round away from zero. @@ -109,4 +115,8 @@ */ int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod); +/** + * @} + */ + #endif /* AVUTIL_MATHEMATICS_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/md5.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/md5.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/md5.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/md5.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,8 +30,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#include #include "bswap.h" +#include "intreadwrite.h" #include "md5.h" typedef struct AVMD5{ @@ -40,7 +41,7 @@ uint32_t ABCD[4]; } AVMD5; -const int av_md5_size= sizeof(AVMD5); +const int av_md5_size = sizeof(AVMD5); static const uint8_t S[4][4] = { { 7, 12, 17, 22 }, /* round 1 */ @@ -71,42 +72,49 @@ 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391, }; -#define CORE(i, a, b, c, d) \ - t = S[i>>4][i&3];\ - a += T[i];\ -\ - if(i<32){\ - if(i<16) a += (d ^ (b&(c^d))) + X[ i &15 ];\ - else a += (c ^ (d&(c^b))) + X[ (1+5*i)&15 ];\ - }else{\ - if(i<48) a += (b^c^d) + X[ (5+3*i)&15 ];\ - else a += (c^(b|~d)) + X[ ( 7*i)&15 ];\ - }\ - a = b + (( a << t ) | ( a >> (32 - t) )); - -static void body(uint32_t ABCD[4], uint32_t X[16]){ +#define CORE(i, a, b, c, d) do { \ + t = S[i >> 4][i & 3]; \ + a += T[i]; \ + \ + if (i < 32) { \ + if (i < 16) a += (d ^ (b & (c ^ d))) + X[ i & 15]; \ + else a += (c ^ (d & (c ^ b))) + X[(1 + 5*i) & 15]; \ + } else { \ + if (i < 48) a += (b ^ c ^ d) + X[(5 + 3*i) & 15]; \ + else a += (c ^ (b | ~d)) + X[( 7*i) & 15]; \ + } \ + a = b + (a << t | a >> (32 - t)); \ + } while (0) +static void body(uint32_t ABCD[4], uint32_t X[16]) +{ int t; int i av_unused; - unsigned int a= ABCD[3]; - unsigned int b= ABCD[2]; - unsigned int c= ABCD[1]; - unsigned int d= ABCD[0]; + unsigned int a = ABCD[3]; + unsigned int b = ABCD[2]; + unsigned int c = ABCD[1]; + unsigned int d = ABCD[0]; #if HAVE_BIGENDIAN - for(i=0; i<16; i++) - X[i]= av_bswap32(X[i]); + for (i = 0; i < 16; i++) + X[i] = av_bswap32(X[i]); #endif #if CONFIG_SMALL - for( i = 0; i < 64; i++ ){ - CORE(i,a,b,c,d) - t=d; d=c; c=b; b=a; a=t; + for (i = 0; i < 64; i++) { + CORE(i, a, b, c, d); + t = d; + d = c; + c = b; + b = a; + a = t; } #else -#define CORE2(i) CORE(i,a,b,c,d) CORE((i+1),d,a,b,c) CORE((i+2),c,d,a,b) CORE((i+3),b,c,d,a) -#define CORE4(i) CORE2(i) CORE2((i+4)) CORE2((i+8)) CORE2((i+12)) -CORE4(0) CORE4(16) CORE4(32) CORE4(48) +#define CORE2(i) \ + CORE( i, a,b,c,d); CORE((i+1),d,a,b,c); \ + CORE((i+2),c,d,a,b); CORE((i+3),b,c,d,a) +#define CORE4(i) CORE2(i); CORE2((i+4)); CORE2((i+8)); CORE2((i+12)) + CORE4(0); CORE4(16); CORE4(32); CORE4(48); #endif ABCD[0] += d; @@ -115,8 +123,9 @@ ABCD[3] += a; } -void av_md5_init(AVMD5 *ctx){ - ctx->len = 0; +void av_md5_init(AVMD5 *ctx) +{ + ctx->len = 0; ctx->ABCD[0] = 0x10325476; ctx->ABCD[1] = 0x98badcfe; @@ -124,59 +133,72 @@ ctx->ABCD[3] = 0x67452301; } -void av_md5_update(AVMD5 *ctx, const uint8_t *src, const int len){ +void av_md5_update(AVMD5 *ctx, const uint8_t *src, const int len) +{ int i, j; - j= ctx->len & 63; + j = ctx->len & 63; ctx->len += len; - for( i = 0; i < len; i++ ){ + for (i = 0; i < len; i++) { ctx->block[j++] = src[i]; - if( 64 == j ){ - body(ctx->ABCD, (uint32_t*) ctx->block); + if (j == 64) { + body(ctx->ABCD, (uint32_t *) ctx->block); j = 0; } } } -void av_md5_final(AVMD5 *ctx, uint8_t *dst){ +void av_md5_final(AVMD5 *ctx, uint8_t *dst) +{ int i; - uint64_t finalcount= av_le2ne64(ctx->len<<3); + uint64_t finalcount = av_le2ne64(ctx->len << 3); av_md5_update(ctx, "\200", 1); - while((ctx->len & 63)!=56) + while ((ctx->len & 63) != 56) av_md5_update(ctx, "", 1); - av_md5_update(ctx, (uint8_t*)&finalcount, 8); + av_md5_update(ctx, (uint8_t *)&finalcount, 8); - for(i=0; i<4; i++) - ((uint32_t*)dst)[i]= av_le2ne32(ctx->ABCD[3-i]); + for (i = 0; i < 4; i++) + AV_WL32(dst + 4*i, ctx->ABCD[3 - i]); } -void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len){ - AVMD5 ctx[1]; +void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len) +{ + AVMD5 ctx; - av_md5_init(ctx); - av_md5_update(ctx, src, len); - av_md5_final(ctx, dst); + av_md5_init(&ctx); + av_md5_update(&ctx, src, len); + av_md5_final(&ctx, dst); } #ifdef TEST -#include -#include #undef printf +#include + +static void print_md5(uint8_t *md5) +{ + int i; + for (i = 0; i < 16; i++) + printf("%02x", md5[i]); + printf("\n"); +} + int main(void){ - uint64_t md5val; + uint8_t md5val[16]; int i; uint8_t in[1000]; - for(i=0; i<1000; i++) in[i]= i*i; - av_md5_sum( (uint8_t*)&md5val, in, 1000); printf("%"PRId64"\n", md5val); - av_md5_sum( (uint8_t*)&md5val, in, 63); printf("%"PRId64"\n", md5val); - av_md5_sum( (uint8_t*)&md5val, in, 64); printf("%"PRId64"\n", md5val); - av_md5_sum( (uint8_t*)&md5val, in, 65); printf("%"PRId64"\n", md5val); - for(i=0; i<1000; i++) in[i]= i % 127; - av_md5_sum( (uint8_t*)&md5val, in, 999); printf("%"PRId64"\n", md5val); + for (i = 0; i < 1000; i++) + in[i] = i * i; + av_md5_sum(md5val, in, 1000); print_md5(md5val); + av_md5_sum(md5val, in, 63); print_md5(md5val); + av_md5_sum(md5val, in, 64); print_md5(md5val); + av_md5_sum(md5val, in, 65); print_md5(md5val); + for (i = 0; i < 1000; i++) + in[i] = i % 127; + av_md5_sum(md5val, in, 999); print_md5(md5val); return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/md5.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/md5.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/md5.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/md5.h 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,12 @@ #include +/** + * @defgroup lavu_md5 MD5 + * @ingroup lavu_crypto + * @{ + */ + extern const int av_md5_size; struct AVMD5; @@ -32,5 +38,9 @@ void av_md5_final(struct AVMD5 *ctx, uint8_t *dst); void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len); +/** + * @} + */ + #endif /* AVUTIL_MD5_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/mem.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/mem.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/mem.h 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/mem.h 2012-01-11 00:34:30.000000000 +0000 @@ -29,6 +29,12 @@ #include "attributes.h" #include "avutil.h" +/** + * @addtogroup lavu_mem + * @{ + */ + + #if defined(__ICC) && _ICC < 1200 || defined(__SUNPRO_C) #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v #define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v @@ -76,10 +82,10 @@ * Allocate or reallocate a block of memory. * If ptr is NULL and size > 0, allocate a new block. If * size is zero, free the memory block pointed to by ptr. - * @param size Size in bytes for the memory block to be allocated or - * reallocated. * @param ptr Pointer to a memory block already allocated with * av_malloc(z)() or av_realloc() or NULL. + * @param size Size in bytes for the memory block to be allocated or + * reallocated. * @return Pointer to a newly reallocated block or NULL if the block * cannot be reallocated or the function is used to free the memory block. * @see av_fast_realloc() @@ -123,4 +129,8 @@ */ void av_freep(void *ptr); +/** + * @} + */ + #endif /* AVUTIL_MEM_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/opt.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/opt.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/opt.c 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/opt.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,6 +30,7 @@ #include "opt.h" #include "eval.h" #include "dict.h" +#include "log.h" #if FF_API_FIND_OPT //FIXME order them and do a bin search @@ -46,36 +47,50 @@ } #endif +#if FF_API_OLD_AVOPTIONS const AVOption *av_next_option(void *obj, const AVOption *last) { - if (last && last[1].name) return ++last; - else if (last) return NULL; - else return (*(AVClass**)obj)->option; + return av_opt_next(obj, last); } +#endif -static int av_set_number2(void *obj, const char *name, double num, int den, int64_t intnum, const AVOption **o_out) +const AVOption *av_opt_next(void *obj, const AVOption *last) { - const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); - void *dst; - if (o_out) - *o_out= o; - if (!o || o->offset<=0) - return AVERROR_OPTION_NOT_FOUND; + AVClass *class = *(AVClass**)obj; + if (!last && class->option[0].name) return class->option; + if (last && last[1].name) return ++last; + return NULL; +} +static int read_number(const AVOption *o, void *dst, double *num, int *den, int64_t *intnum) +{ + switch (o->type) { + case AV_OPT_TYPE_FLAGS: *intnum = *(unsigned int*)dst;return 0; + case AV_OPT_TYPE_INT: *intnum = *(int *)dst;return 0; + case AV_OPT_TYPE_INT64: *intnum = *(int64_t *)dst;return 0; + case AV_OPT_TYPE_FLOAT: *num = *(float *)dst;return 0; + case AV_OPT_TYPE_DOUBLE: *num = *(double *)dst;return 0; + case AV_OPT_TYPE_RATIONAL: *intnum = ((AVRational*)dst)->num; + *den = ((AVRational*)dst)->den; + return 0; + } + return AVERROR(EINVAL); +} + +static int write_number(void *obj, const AVOption *o, void *dst, double num, int den, int64_t intnum) +{ if (o->max*den < num*intnum || o->min*den > num*intnum) { - av_log(obj, AV_LOG_ERROR, "Value %lf for parameter '%s' out of range\n", num, name); + av_log(obj, AV_LOG_ERROR, "Value %lf for parameter '%s' out of range\n", num, o->name); return AVERROR(ERANGE); } - dst= ((uint8_t*)obj) + o->offset; - switch (o->type) { - case FF_OPT_TYPE_FLAGS: - case FF_OPT_TYPE_INT: *(int *)dst= llrint(num/den)*intnum; break; - case FF_OPT_TYPE_INT64: *(int64_t *)dst= llrint(num/den)*intnum; break; - case FF_OPT_TYPE_FLOAT: *(float *)dst= num*intnum/den; break; - case FF_OPT_TYPE_DOUBLE:*(double *)dst= num*intnum/den; break; - case FF_OPT_TYPE_RATIONAL: + case AV_OPT_TYPE_FLAGS: + case AV_OPT_TYPE_INT: *(int *)dst= llrint(num/den)*intnum; break; + case AV_OPT_TYPE_INT64: *(int64_t *)dst= llrint(num/den)*intnum; break; + case AV_OPT_TYPE_FLOAT: *(float *)dst= num*intnum/den; break; + case AV_OPT_TYPE_DOUBLE:*(double *)dst= num*intnum/den; break; + case AV_OPT_TYPE_RATIONAL: if ((int)num == num) *(AVRational*)dst= (AVRational){num*intnum, den}; else *(AVRational*)dst= av_d2q(num*intnum/den, 1<<24); break; @@ -85,15 +100,6 @@ return 0; } -static const AVOption *av_set_number(void *obj, const char *name, double num, int den, int64_t intnum) -{ - const AVOption *o = NULL; - if (av_set_number2(obj, name, num, den, intnum, &o) < 0) - return NULL; - else - return o; -} - static const double const_values[] = { M_PI, M_E, @@ -115,114 +121,202 @@ return -1; } -int av_set_string3(void *obj, const char *name, const char *val, int alloc, const AVOption **o_out) +static int set_string_binary(void *obj, const AVOption *o, const char *val, uint8_t **dst) { - int ret; - const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); - if (o_out) - *o_out = o; - if (!o) - return AVERROR_OPTION_NOT_FOUND; - if (!val || o->offset<=0) + int *lendst = (int *)(dst + 1); + uint8_t *bin, *ptr; + int len = strlen(val); + + av_freep(dst); + *lendst = 0; + + if (len & 1) return AVERROR(EINVAL); + len /= 2; - if (o->type == FF_OPT_TYPE_BINARY) { - uint8_t **dst = (uint8_t **)(((uint8_t*)obj) + o->offset); - int *lendst = (int *)(dst + 1); - uint8_t *bin, *ptr; - int len = strlen(val); - av_freep(dst); - *lendst = 0; - if (len & 1) return AVERROR(EINVAL); - len /= 2; - ptr = bin = av_malloc(len); - while (*val) { - int a = hexchar2int(*val++); - int b = hexchar2int(*val++); - if (a < 0 || b < 0) { - av_free(bin); - return AVERROR(EINVAL); - } - *ptr++ = (a << 4) | b; + ptr = bin = av_malloc(len); + while (*val) { + int a = hexchar2int(*val++); + int b = hexchar2int(*val++); + if (a < 0 || b < 0) { + av_free(bin); + return AVERROR(EINVAL); } - *dst = bin; - *lendst = len; - return 0; + *ptr++ = (a << 4) | b; } - if (o->type != FF_OPT_TYPE_STRING) { - int notfirst=0; - for (;;) { - int i; - char buf[256]; - int cmd=0; - double d; - - if (*val == '+' || *val == '-') - cmd= *(val++); - - for (i=0; iunit, 0, 0); - if (o_named && o_named->type == FF_OPT_TYPE_CONST) - d= o_named->default_val.dbl; - else if (!strcmp(buf, "default")) d= o->default_val.dbl; - else if (!strcmp(buf, "max" )) d= o->max; - else if (!strcmp(buf, "min" )) d= o->min; - else if (!strcmp(buf, "none" )) d= 0; - else if (!strcmp(buf, "all" )) d= ~0; - else { - int res = av_expr_parse_and_eval(&d, buf, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, obj); - if (res < 0) { - av_log(obj, AV_LOG_ERROR, "Unable to parse option value \"%s\"\n", val); - return res; - } + *dst = bin; + *lendst = len; + + return 0; +} + +static int set_string(void *obj, const AVOption *o, const char *val, uint8_t **dst) +{ + av_freep(dst); + *dst = av_strdup(val); + return 0; +} + +static int set_string_number(void *obj, const AVOption *o, const char *val, void *dst) +{ + int ret = 0, notfirst = 0; + for (;;) { + int i, den = 1; + char buf[256]; + int cmd = 0; + double d, num = 1; + int64_t intnum = 1; + + if (*val == '+' || *val == '-') + cmd = *(val++); + + for (i = 0; i < sizeof(buf) - 1 && val[i] && val[i] != '+' && val[i] != '-'; i++) + buf[i] = val[i]; + buf[i] = 0; + + { + const AVOption *o_named = av_opt_find(obj, buf, o->unit, 0, 0); + if (o_named && o_named->type == AV_OPT_TYPE_CONST) + d = o_named->default_val.dbl; + else if (!strcmp(buf, "default")) d = o->default_val.dbl; + else if (!strcmp(buf, "max" )) d = o->max; + else if (!strcmp(buf, "min" )) d = o->min; + else if (!strcmp(buf, "none" )) d = 0; + else if (!strcmp(buf, "all" )) d = ~0; + else { + int res = av_expr_parse_and_eval(&d, buf, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, obj); + if (res < 0) { + av_log(obj, AV_LOG_ERROR, "Unable to parse option value \"%s\"\n", val); + return res; } } - if (o->type == FF_OPT_TYPE_FLAGS) { - if (cmd=='+') d= av_get_int(obj, name, NULL) | (int64_t)d; - else if (cmd=='-') d= av_get_int(obj, name, NULL) &~(int64_t)d; - } else { - if (cmd=='+') d= notfirst*av_get_double(obj, name, NULL) + d; - else if (cmd=='-') d= notfirst*av_get_double(obj, name, NULL) - d; - } - - if ((ret = av_set_number2(obj, name, d, 1, 1, o_out)) < 0) - return ret; - val+= i; - if (!*val) - return 0; - notfirst=1; } - return AVERROR(EINVAL); - } + if (o->type == AV_OPT_TYPE_FLAGS) { + read_number(o, dst, NULL, NULL, &intnum); + if (cmd == '+') d = intnum | (int64_t)d; + else if (cmd == '-') d = intnum &~(int64_t)d; + } else { + read_number(o, dst, &num, &den, &intnum); + if (cmd == '+') d = notfirst*num*intnum/den + d; + else if (cmd == '-') d = notfirst*num*intnum/den - d; + } - if (alloc) { - av_free(*(void**)(((uint8_t*)obj) + o->offset)); - val= av_strdup(val); + if ((ret = write_number(obj, o, dst, d, 1, 1)) < 0) + return ret; + val += i; + if (!*val) + return 0; + notfirst = 1; } - memcpy(((uint8_t*)obj) + o->offset, &val, sizeof(val)); return 0; } +#if FF_API_OLD_AVOPTIONS +int av_set_string3(void *obj, const char *name, const char *val, int alloc, const AVOption **o_out) +{ + const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); + if (o_out) + *o_out = o; + return av_opt_set(obj, name, val, 0); +} +#endif + +int av_opt_set(void *obj, const char *name, const char *val, int search_flags) +{ + void *dst, *target_obj; + const AVOption *o = av_opt_find2(obj, name, NULL, 0, search_flags, &target_obj); + if (!o || !target_obj) + return AVERROR_OPTION_NOT_FOUND; + if (!val) + return AVERROR(EINVAL); + + dst = ((uint8_t*)target_obj) + o->offset; + switch (o->type) { + case AV_OPT_TYPE_STRING: return set_string(obj, o, val, dst); + case AV_OPT_TYPE_BINARY: return set_string_binary(obj, o, val, dst); + case AV_OPT_TYPE_FLAGS: + case AV_OPT_TYPE_INT: + case AV_OPT_TYPE_INT64: + case AV_OPT_TYPE_FLOAT: + case AV_OPT_TYPE_DOUBLE: + case AV_OPT_TYPE_RATIONAL: return set_string_number(obj, o, val, dst); + } + + av_log(obj, AV_LOG_ERROR, "Invalid option type.\n"); + return AVERROR(EINVAL); +} + +#define OPT_EVAL_NUMBER(name, opttype, vartype)\ + int av_opt_eval_ ## name(void *obj, const AVOption *o, const char *val, vartype *name ## _out)\ + {\ + if (!o || o->type != opttype)\ + return AVERROR(EINVAL);\ + return set_string_number(obj, o, val, name ## _out);\ + } + +OPT_EVAL_NUMBER(flags, AV_OPT_TYPE_FLAGS, int) +OPT_EVAL_NUMBER(int, AV_OPT_TYPE_INT, int) +OPT_EVAL_NUMBER(int64, AV_OPT_TYPE_INT64, int64_t) +OPT_EVAL_NUMBER(float, AV_OPT_TYPE_FLOAT, float) +OPT_EVAL_NUMBER(double, AV_OPT_TYPE_DOUBLE, double) +OPT_EVAL_NUMBER(q, AV_OPT_TYPE_RATIONAL, AVRational) + +static int set_number(void *obj, const char *name, double num, int den, int64_t intnum, + int search_flags) +{ + void *dst, *target_obj; + const AVOption *o = av_opt_find2(obj, name, NULL, 0, search_flags, &target_obj); + + if (!o || !target_obj) + return AVERROR_OPTION_NOT_FOUND; + + dst = ((uint8_t*)target_obj) + o->offset; + return write_number(obj, o, dst, num, den, intnum); +} + +#if FF_API_OLD_AVOPTIONS const AVOption *av_set_double(void *obj, const char *name, double n) { - return av_set_number(obj, name, n, 1, 1); + const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); + if (set_number(obj, name, n, 1, 1, 0) < 0) + return NULL; + return o; } const AVOption *av_set_q(void *obj, const char *name, AVRational n) { - return av_set_number(obj, name, n.num, n.den, 1); + const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); + if (set_number(obj, name, n.num, n.den, 1, 0) < 0) + return NULL; + return o; } const AVOption *av_set_int(void *obj, const char *name, int64_t n) { - return av_set_number(obj, name, 1, 1, n); + const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); + if (set_number(obj, name, 1, 1, n, 0) < 0) + return NULL; + return o; +} +#endif + +int av_opt_set_int(void *obj, const char *name, int64_t val, int search_flags) +{ + return set_number(obj, name, 1, 1, val, search_flags); +} + +int av_opt_set_double(void *obj, const char *name, double val, int search_flags) +{ + return set_number(obj, name, val, 1, 1, search_flags); } +int av_opt_set_q(void *obj, const char *name, AVRational val, int search_flags) +{ + return set_number(obj, name, val.num, val.den, 1, search_flags); +} + +#if FF_API_OLD_AVOPTIONS /** * * @param buf a buffer which is used for returning non string values as strings, can be NULL @@ -234,23 +328,23 @@ void *dst; uint8_t *bin; int len, i; - if (!o || o->offset<=0) + if (!o) return NULL; - if (o->type != FF_OPT_TYPE_STRING && (!buf || !buf_len)) + if (o->type != AV_OPT_TYPE_STRING && (!buf || !buf_len)) return NULL; dst= ((uint8_t*)obj) + o->offset; if (o_out) *o_out= o; switch (o->type) { - case FF_OPT_TYPE_FLAGS: snprintf(buf, buf_len, "0x%08X",*(int *)dst);break; - case FF_OPT_TYPE_INT: snprintf(buf, buf_len, "%d" , *(int *)dst);break; - case FF_OPT_TYPE_INT64: snprintf(buf, buf_len, "%"PRId64, *(int64_t*)dst);break; - case FF_OPT_TYPE_FLOAT: snprintf(buf, buf_len, "%f" , *(float *)dst);break; - case FF_OPT_TYPE_DOUBLE: snprintf(buf, buf_len, "%f" , *(double *)dst);break; - case FF_OPT_TYPE_RATIONAL: snprintf(buf, buf_len, "%d/%d", ((AVRational*)dst)->num, ((AVRational*)dst)->den);break; - case FF_OPT_TYPE_STRING: return *(void**)dst; - case FF_OPT_TYPE_BINARY: + case AV_OPT_TYPE_FLAGS: snprintf(buf, buf_len, "0x%08X",*(int *)dst);break; + case AV_OPT_TYPE_INT: snprintf(buf, buf_len, "%d" , *(int *)dst);break; + case AV_OPT_TYPE_INT64: snprintf(buf, buf_len, "%"PRId64, *(int64_t*)dst);break; + case AV_OPT_TYPE_FLOAT: snprintf(buf, buf_len, "%f" , *(float *)dst);break; + case AV_OPT_TYPE_DOUBLE: snprintf(buf, buf_len, "%f" , *(double *)dst);break; + case AV_OPT_TYPE_RATIONAL: snprintf(buf, buf_len, "%d/%d", ((AVRational*)dst)->num, ((AVRational*)dst)->den);break; + case AV_OPT_TYPE_STRING: return *(void**)dst; + case AV_OPT_TYPE_BINARY: len = *(int*)(((uint8_t *)dst) + sizeof(uint8_t *)); if (len >= (buf_len + 1)/2) return NULL; bin = *(uint8_t**)dst; @@ -260,40 +354,81 @@ } return buf; } +#endif -static int av_get_number(void *obj, const char *name, const AVOption **o_out, double *num, int *den, int64_t *intnum) +int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val) { - const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); - void *dst; - if (!o || o->offset<=0) - goto error; + void *dst, *target_obj; + const AVOption *o = av_opt_find2(obj, name, NULL, 0, search_flags, &target_obj); + uint8_t *bin, buf[128]; + int len, i, ret; - dst= ((uint8_t*)obj) + o->offset; + if (!o || !target_obj) + return AVERROR_OPTION_NOT_FOUND; - if (o_out) *o_out= o; + dst = (uint8_t*)target_obj + o->offset; + buf[0] = 0; switch (o->type) { - case FF_OPT_TYPE_FLAGS: *intnum= *(unsigned int*)dst;return 0; - case FF_OPT_TYPE_INT: *intnum= *(int *)dst;return 0; - case FF_OPT_TYPE_INT64: *intnum= *(int64_t*)dst;return 0; - case FF_OPT_TYPE_FLOAT: *num= *(float *)dst;return 0; - case FF_OPT_TYPE_DOUBLE: *num= *(double *)dst;return 0; - case FF_OPT_TYPE_RATIONAL: *intnum= ((AVRational*)dst)->num; - *den = ((AVRational*)dst)->den; - return 0; + case AV_OPT_TYPE_FLAGS: ret = snprintf(buf, sizeof(buf), "0x%08X", *(int *)dst);break; + case AV_OPT_TYPE_INT: ret = snprintf(buf, sizeof(buf), "%d" , *(int *)dst);break; + case AV_OPT_TYPE_INT64: ret = snprintf(buf, sizeof(buf), "%"PRId64, *(int64_t*)dst);break; + case AV_OPT_TYPE_FLOAT: ret = snprintf(buf, sizeof(buf), "%f" , *(float *)dst);break; + case AV_OPT_TYPE_DOUBLE: ret = snprintf(buf, sizeof(buf), "%f" , *(double *)dst);break; + case AV_OPT_TYPE_RATIONAL: ret = snprintf(buf, sizeof(buf), "%d/%d", ((AVRational*)dst)->num, ((AVRational*)dst)->den);break; + case AV_OPT_TYPE_STRING: + if (*(uint8_t**)dst) + *out_val = av_strdup(*(uint8_t**)dst); + else + *out_val = av_strdup(""); + return 0; + case AV_OPT_TYPE_BINARY: + len = *(int*)(((uint8_t *)dst) + sizeof(uint8_t *)); + if ((uint64_t)len*2 + 1 > INT_MAX) + return AVERROR(EINVAL); + if (!(*out_val = av_malloc(len*2 + 1))) + return AVERROR(ENOMEM); + bin = *(uint8_t**)dst; + for (i = 0; i < len; i++) + snprintf(*out_val + i*2, 3, "%02X", bin[i]); + return 0; + default: + return AVERROR(EINVAL); } + + if (ret >= sizeof(buf)) + return AVERROR(EINVAL); + *out_val = av_strdup(buf); + return 0; +} + +static int get_number(void *obj, const char *name, const AVOption **o_out, double *num, int *den, int64_t *intnum, + int search_flags) +{ + void *dst, *target_obj; + const AVOption *o = av_opt_find2(obj, name, NULL, 0, search_flags, &target_obj); + if (!o || !target_obj) + goto error; + + dst = ((uint8_t*)target_obj) + o->offset; + + if (o_out) *o_out= o; + + return read_number(o, dst, num, den, intnum); + error: *den=*intnum=0; return -1; } +#if FF_API_OLD_AVOPTIONS double av_get_double(void *obj, const char *name, const AVOption **o_out) { int64_t intnum=1; double num=1; int den=1; - if (av_get_number(obj, name, o_out, &num, &den, &intnum) < 0) + if (get_number(obj, name, o_out, &num, &den, &intnum, 0) < 0) return NAN; return num*intnum/den; } @@ -304,7 +439,7 @@ double num=1; int den=1; - if (av_get_number(obj, name, o_out, &num, &den, &intnum) < 0) + if (get_number(obj, name, o_out, &num, &den, &intnum, 0) < 0) return (AVRational){0, 0}; if (num == 1.0 && (int)intnum == intnum) return (AVRational){intnum, den}; @@ -318,19 +453,63 @@ double num=1; int den=1; - if (av_get_number(obj, name, o_out, &num, &den, &intnum) < 0) + if (get_number(obj, name, o_out, &num, &den, &intnum, 0) < 0) return -1; return num*intnum/den; } +#endif + +int av_opt_get_int(void *obj, const char *name, int search_flags, int64_t *out_val) +{ + int64_t intnum = 1; + double num = 1; + int ret, den = 1; + + if ((ret = get_number(obj, name, NULL, &num, &den, &intnum, search_flags)) < 0) + return ret; + *out_val = num*intnum/den; + return 0; +} + +int av_opt_get_double(void *obj, const char *name, int search_flags, double *out_val) +{ + int64_t intnum = 1; + double num = 1; + int ret, den = 1; + + if ((ret = get_number(obj, name, NULL, &num, &den, &intnum, search_flags)) < 0) + return ret; + *out_val = num*intnum/den; + return 0; +} + +int av_opt_get_q(void *obj, const char *name, int search_flags, AVRational *out_val) +{ + int64_t intnum = 1; + double num = 1; + int ret, den = 1; + + if ((ret = get_number(obj, name, NULL, &num, &den, &intnum, search_flags)) < 0) + return ret; + + if (num == 1.0 && (int)intnum == intnum) + *out_val = (AVRational){intnum, den}; + else + *out_val = av_d2q(num*intnum/den, 1<<24); + return 0; +} int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name) { - const AVOption *field = av_find_opt(obj, field_name, NULL, 0, 0); - const AVOption *flag = av_find_opt(obj, flag_name, NULL, 0, 0); + const AVOption *field = av_opt_find(obj, field_name, NULL, 0, 0); + const AVOption *flag = av_opt_find(obj, flag_name, + field ? field->unit : NULL, 0, 0); + int64_t res; - if (!field || !flag || flag->type != FF_OPT_TYPE_CONST) + if (!field || !flag || flag->type != AV_OPT_TYPE_CONST || + av_opt_get_int(obj, field_name, 0, &res) < 0) return 0; - return av_get_int(obj, field_name, NULL) & (int) flag->default_val.dbl; + return res & (int) flag->default_val.dbl; } static void opt_list(void *obj, void *av_log_obj, const char *unit, @@ -338,7 +517,7 @@ { const AVOption *opt=NULL; - while ((opt= av_next_option(obj, opt))) { + while ((opt = av_opt_next(obj, opt))) { if (!(opt->flags & req_flags) || (opt->flags & rej_flags)) continue; @@ -346,43 +525,43 @@ * Don't print anything but CONST's on level two. * Only print items from the requested unit. */ - if (!unit && opt->type==FF_OPT_TYPE_CONST) + if (!unit && opt->type==AV_OPT_TYPE_CONST) continue; - else if (unit && opt->type!=FF_OPT_TYPE_CONST) + else if (unit && opt->type!=AV_OPT_TYPE_CONST) continue; - else if (unit && opt->type==FF_OPT_TYPE_CONST && strcmp(unit, opt->unit)) + else if (unit && opt->type==AV_OPT_TYPE_CONST && strcmp(unit, opt->unit)) continue; - else if (unit && opt->type == FF_OPT_TYPE_CONST) + else if (unit && opt->type == AV_OPT_TYPE_CONST) av_log(av_log_obj, AV_LOG_INFO, " %-15s ", opt->name); else av_log(av_log_obj, AV_LOG_INFO, "-%-17s ", opt->name); switch (opt->type) { - case FF_OPT_TYPE_FLAGS: + case AV_OPT_TYPE_FLAGS: av_log(av_log_obj, AV_LOG_INFO, "%-7s ", ""); break; - case FF_OPT_TYPE_INT: + case AV_OPT_TYPE_INT: av_log(av_log_obj, AV_LOG_INFO, "%-7s ", ""); break; - case FF_OPT_TYPE_INT64: + case AV_OPT_TYPE_INT64: av_log(av_log_obj, AV_LOG_INFO, "%-7s ", ""); break; - case FF_OPT_TYPE_DOUBLE: + case AV_OPT_TYPE_DOUBLE: av_log(av_log_obj, AV_LOG_INFO, "%-7s ", ""); break; - case FF_OPT_TYPE_FLOAT: + case AV_OPT_TYPE_FLOAT: av_log(av_log_obj, AV_LOG_INFO, "%-7s ", ""); break; - case FF_OPT_TYPE_STRING: + case AV_OPT_TYPE_STRING: av_log(av_log_obj, AV_LOG_INFO, "%-7s ", ""); break; - case FF_OPT_TYPE_RATIONAL: + case AV_OPT_TYPE_RATIONAL: av_log(av_log_obj, AV_LOG_INFO, "%-7s ", ""); break; - case FF_OPT_TYPE_BINARY: + case AV_OPT_TYPE_BINARY: av_log(av_log_obj, AV_LOG_INFO, "%-7s ", ""); break; - case FF_OPT_TYPE_CONST: + case AV_OPT_TYPE_CONST: default: av_log(av_log_obj, AV_LOG_INFO, "%-7s ", ""); break; @@ -396,7 +575,7 @@ if (opt->help) av_log(av_log_obj, AV_LOG_INFO, " %s", opt->help); av_log(av_log_obj, AV_LOG_INFO, "\n"); - if (opt->unit && opt->type != FF_OPT_TYPE_CONST) { + if (opt->unit && opt->type != AV_OPT_TYPE_CONST) { opt_list(obj, av_log_obj, opt->unit, req_flags, rej_flags); } } @@ -414,51 +593,54 @@ return 0; } -/** Set the values of the AVCodecContext or AVFormatContext structure. - * They are set to the defaults specified in the according AVOption options - * array default_val field. - * - * @param s AVCodecContext or AVFormatContext for which the defaults will be set - */ +void av_opt_set_defaults(void *s) +{ +#if FF_API_OLD_AVOPTIONS + av_opt_set_defaults2(s, 0, 0); +} + void av_opt_set_defaults2(void *s, int mask, int flags) { +#endif const AVOption *opt = NULL; - while ((opt = av_next_option(s, opt)) != NULL) { + while ((opt = av_opt_next(s, opt)) != NULL) { +#if FF_API_OLD_AVOPTIONS if ((opt->flags & mask) != flags) continue; +#endif switch (opt->type) { - case FF_OPT_TYPE_CONST: + case AV_OPT_TYPE_CONST: /* Nothing to be done here */ break; - case FF_OPT_TYPE_FLAGS: - case FF_OPT_TYPE_INT: { + case AV_OPT_TYPE_FLAGS: + case AV_OPT_TYPE_INT: { int val; val = opt->default_val.dbl; - av_set_int(s, opt->name, val); + av_opt_set_int(s, opt->name, val, 0); } break; - case FF_OPT_TYPE_INT64: + case AV_OPT_TYPE_INT64: if ((double)(opt->default_val.dbl+0.6) == opt->default_val.dbl) av_log(s, AV_LOG_DEBUG, "loss of precision in default of %s\n", opt->name); - av_set_int(s, opt->name, opt->default_val.dbl); + av_opt_set_int(s, opt->name, opt->default_val.dbl, 0); break; - case FF_OPT_TYPE_DOUBLE: - case FF_OPT_TYPE_FLOAT: { + case AV_OPT_TYPE_DOUBLE: + case AV_OPT_TYPE_FLOAT: { double val; val = opt->default_val.dbl; - av_set_double(s, opt->name, val); + av_opt_set_double(s, opt->name, val, 0); } break; - case FF_OPT_TYPE_RATIONAL: { + case AV_OPT_TYPE_RATIONAL: { AVRational val; val = av_d2q(opt->default_val.dbl, INT_MAX); - av_set_q(s, opt->name, val); + av_opt_set_q(s, opt->name, val, 0); } break; - case FF_OPT_TYPE_STRING: - av_set_string3(s, opt->name, opt->default_val.str, 1, NULL); + case AV_OPT_TYPE_STRING: + av_opt_set(s, opt->name, opt->default_val.str, 0); break; - case FF_OPT_TYPE_BINARY: + case AV_OPT_TYPE_BINARY: /* Cannot set default for binary */ break; default: @@ -467,11 +649,6 @@ } } -void av_opt_set_defaults(void *s) -{ - av_opt_set_defaults2(s, 0, 0); -} - /** * Store the value in the field in ctx that is named like key. * ctx must be an AVClass context, storing is done using AVOptions. @@ -486,7 +663,7 @@ * set, or a negative value corresponding to an AVERROR code in case * of error: * AVERROR(EINVAL) if the key/value pair cannot be parsed, - * the error code issued by av_set_string3() if the key/value pair + * the error code issued by av_opt_set() if the key/value pair * cannot be set */ static int parse_key_value_pair(void *ctx, const char **buf, @@ -507,7 +684,7 @@ av_log(ctx, AV_LOG_DEBUG, "Setting value '%s' for key '%s'\n", val, key); - ret = av_set_string3(ctx, key, val, 1, NULL); + ret = av_opt_set(ctx, key, val, 0); if (ret == AVERROR_OPTION_NOT_FOUND) av_log(ctx, AV_LOG_ERROR, "Key '%s' not found.\n", key); @@ -521,6 +698,9 @@ { int ret, count = 0; + if (!opts) + return 0; + while (*opts) { if ((ret = parse_key_value_pair(ctx, &opts, key_val_sep, pairs_sep)) < 0) return ret; @@ -536,8 +716,8 @@ void av_opt_free(void *obj) { const AVOption *o = NULL; - while ((o = av_next_option(obj, o))) - if (o->type == FF_OPT_TYPE_STRING || o->type == FF_OPT_TYPE_BINARY) + while ((o = av_opt_next(obj, o))) + if (o->type == AV_OPT_TYPE_STRING || o->type == AV_OPT_TYPE_BINARY) av_freep((uint8_t *)obj + o->offset); } @@ -548,7 +728,7 @@ int ret = 0; while ((t = av_dict_get(*options, "", t, AV_DICT_IGNORE_SUFFIX))) { - ret = av_set_string3(obj, t->key, t->value, 1, NULL); + ret = av_opt_set(obj, t->key, t->value, 0); if (ret == AVERROR_OPTION_NOT_FOUND) av_dict_set(&tmp, t->key, t->value, 0); else if (ret < 0) { @@ -565,21 +745,60 @@ const AVOption *av_opt_find(void *obj, const char *name, const char *unit, int opt_flags, int search_flags) { - AVClass *c = *(AVClass**)obj; + return av_opt_find2(obj, name, unit, opt_flags, search_flags, NULL); +} + +const AVOption *av_opt_find2(void *obj, const char *name, const char *unit, + int opt_flags, int search_flags, void **target_obj) +{ + const AVClass *c = *(AVClass**)obj; const AVOption *o = NULL; - if (c->opt_find && search_flags & AV_OPT_SEARCH_CHILDREN && - (o = c->opt_find(obj, name, unit, opt_flags, search_flags))) - return o; - - while (o = av_next_option(obj, o)) { - if (!strcmp(o->name, name) && (!unit || (o->unit && !strcmp(o->unit, unit))) && - (o->flags & opt_flags) == opt_flags) + if (search_flags & AV_OPT_SEARCH_CHILDREN) { + if (search_flags & AV_OPT_SEARCH_FAKE_OBJ) { + const AVClass *child = NULL; + while (child = av_opt_child_class_next(c, child)) + if (o = av_opt_find2(&child, name, unit, opt_flags, search_flags, NULL)) + return o; + } else { + void *child = NULL; + while (child = av_opt_child_next(obj, child)) + if (o = av_opt_find2(child, name, unit, opt_flags, search_flags, target_obj)) + return o; + } + } + + while (o = av_opt_next(obj, o)) { + if (!strcmp(o->name, name) && (o->flags & opt_flags) == opt_flags && + ((!unit && o->type != AV_OPT_TYPE_CONST) || + (unit && o->unit && !strcmp(o->unit, unit)))) { + if (target_obj) { + if (!(search_flags & AV_OPT_SEARCH_FAKE_OBJ)) + *target_obj = obj; + else + *target_obj = NULL; + } return o; + } } return NULL; } +void *av_opt_child_next(void *obj, void *prev) +{ + const AVClass *c = *(AVClass**)obj; + if (c->child_next) + return c->child_next(obj, prev); + return NULL; +} + +const AVClass *av_opt_child_class_next(const AVClass *parent, const AVClass *prev) +{ + if (parent->child_class_next) + return parent->child_class_next(prev); + return NULL; +} + #ifdef TEST #undef printf @@ -601,14 +820,14 @@ #define TEST_FLAG_MU 04 static const AVOption test_options[]= { -{"num", "set num", OFFSET(num), FF_OPT_TYPE_INT, 0, 0, 100 }, -{"toggle", "set toggle", OFFSET(toggle), FF_OPT_TYPE_INT, 0, 0, 1 }, -{"rational", "set rational", OFFSET(rational), FF_OPT_TYPE_RATIONAL, 0, 0, 10 }, -{"string", "set string", OFFSET(string), FF_OPT_TYPE_STRING, 0, CHAR_MIN, CHAR_MAX }, -{"flags", "set flags", OFFSET(flags), FF_OPT_TYPE_FLAGS, 0, 0, INT_MAX, 0, "flags" }, -{"cool", "set cool flag ", 0, FF_OPT_TYPE_CONST, TEST_FLAG_COOL, INT_MIN, INT_MAX, 0, "flags" }, -{"lame", "set lame flag ", 0, FF_OPT_TYPE_CONST, TEST_FLAG_LAME, INT_MIN, INT_MAX, 0, "flags" }, -{"mu", "set mu flag ", 0, FF_OPT_TYPE_CONST, TEST_FLAG_MU, INT_MIN, INT_MAX, 0, "flags" }, +{"num", "set num", OFFSET(num), AV_OPT_TYPE_INT, {0}, 0, 100 }, +{"toggle", "set toggle", OFFSET(toggle), AV_OPT_TYPE_INT, {0}, 0, 1 }, +{"rational", "set rational", OFFSET(rational), AV_OPT_TYPE_RATIONAL, {0}, 0, 10 }, +{"string", "set string", OFFSET(string), AV_OPT_TYPE_STRING, {0}, CHAR_MIN, CHAR_MAX }, +{"flags", "set flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {0}, 0, INT_MAX, 0, "flags" }, +{"cool", "set cool flag ", 0, AV_OPT_TYPE_CONST, {TEST_FLAG_COOL}, INT_MIN, INT_MAX, 0, "flags" }, +{"lame", "set lame flag ", 0, AV_OPT_TYPE_CONST, {TEST_FLAG_LAME}, INT_MIN, INT_MAX, 0, "flags" }, +{"mu", "set mu flag ", 0, AV_OPT_TYPE_CONST, {TEST_FLAG_MU}, INT_MIN, INT_MAX, 0, "flags" }, {NULL}, }; @@ -653,7 +872,7 @@ }; test_ctx.class = &test_class; - av_opt_set_defaults2(&test_ctx, 0, 0); + av_opt_set_defaults(&test_ctx); test_ctx.string = av_strdup("default"); av_log_set_level(AV_LOG_DEBUG); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/opt.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/opt.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/opt.h 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/opt.h 2012-01-11 00:34:30.000000000 +0000 @@ -30,9 +30,203 @@ #include "rational.h" #include "avutil.h" #include "dict.h" +#include "log.h" + +/** + * @defgroup avoptions AVOptions + * @ingroup lavu_data + * @{ + * AVOptions provide a generic system to declare options on arbitrary structs + * ("objects"). An option can have a help text, a type and a range of possible + * values. Options may then be enumerated, read and written to. + * + * @section avoptions_implement Implementing AVOptions + * This section describes how to add AVOptions capabilities to a struct. + * + * All AVOptions-related information is stored in an AVClass. Therefore + * the first member of the struct must be a pointer to an AVClass describing it. + * The option field of the AVClass must be set to a NULL-terminated static array + * of AVOptions. Each AVOption must have a non-empty name, a type, a default + * value and for number-type AVOptions also a range of allowed values. It must + * also declare an offset in bytes from the start of the struct, where the field + * associated with this AVOption is located. Other fields in the AVOption struct + * should also be set when applicable, but are not required. + * + * The following example illustrates an AVOptions-enabled struct: + * @code + * typedef struct test_struct { + * AVClass *class; + * int int_opt; + * char *str_opt; + * uint8_t *bin_opt; + * int bin_len; + * } test_struct; + * + * static const AVOption options[] = { + * { "test_int", "This is a test option of int type.", offsetof(test_struct, int_opt), + * AV_OPT_TYPE_INT, { -1 }, INT_MIN, INT_MAX }, + * { "test_str", "This is a test option of string type.", offsetof(test_struct, str_opt), + * AV_OPT_TYPE_STRING }, + * { "test_bin", "This is a test option of binary type.", offsetof(test_struct, bin_opt), + * AV_OPT_TYPE_BINARY }, + * { NULL }, + * }; + * + * static const AVClass test_class = { + * .class_name = "test class", + * .item_name = av_default_item_name, + * .option = options, + * .version = LIBAVUTIL_VERSION_INT, + * }; + * @endcode + * + * Next, when allocating your struct, you must ensure that the AVClass pointer + * is set to the correct value. Then, av_opt_set_defaults() must be called to + * initialize defaults. After that the struct is ready to be used with the + * AVOptions API. + * + * When cleaning up, you may use the av_opt_free() function to automatically + * free all the allocated string and binary options. + * + * Continuing with the above example: + * + * @code + * test_struct *alloc_test_struct(void) + * { + * test_struct *ret = av_malloc(sizeof(*ret)); + * ret->class = &test_class; + * av_opt_set_defaults(ret); + * return ret; + * } + * void free_test_struct(test_struct **foo) + * { + * av_opt_free(*foo); + * av_freep(foo); + * } + * @endcode + * + * @subsection avoptions_implement_nesting Nesting + * It may happen that an AVOptions-enabled struct contains another + * AVOptions-enabled struct as a member (e.g. AVCodecContext in + * libavcodec exports generic options, while its priv_data field exports + * codec-specific options). In such a case, it is possible to set up the + * parent struct to export a child's options. To do that, simply + * implement AVClass.child_next() and AVClass.child_class_next() in the + * parent struct's AVClass. + * Assuming that the test_struct from above now also contains a + * child_struct field: + * + * @code + * typedef struct child_struct { + * AVClass *class; + * int flags_opt; + * } child_struct; + * static const AVOption child_opts[] = { + * { "test_flags", "This is a test option of flags type.", + * offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { 0 }, INT_MIN, INT_MAX }, + * { NULL }, + * }; + * static const AVClass child_class = { + * .class_name = "child class", + * .item_name = av_default_item_name, + * .option = child_opts, + * .version = LIBAVUTIL_VERSION_INT, + * }; + * + * void *child_next(void *obj, void *prev) + * { + * test_struct *t = obj; + * if (!prev && t->child_struct) + * return t->child_struct; + * return NULL + * } + * const AVClass child_class_next(const AVClass *prev) + * { + * return prev ? NULL : &child_class; + * } + * @endcode + * Putting child_next() and child_class_next() as defined above into + * test_class will now make child_struct's options accessible through + * test_struct (again, proper setup as described above needs to be done on + * child_struct right after it is created). + * + * From the above example it might not be clear why both child_next() + * and child_class_next() are needed. The distinction is that child_next() + * iterates over actually existing objects, while child_class_next() + * iterates over all possible child classes. E.g. if an AVCodecContext + * was initialized to use a codec which has private options, then its + * child_next() will return AVCodecContext.priv_data and finish + * iterating. OTOH child_class_next() on AVCodecContext.av_class will + * iterate over all available codecs with private options. + * + * @subsection avoptions_implement_named_constants Named constants + * It is possible to create named constants for options. Simply set the unit + * field of the option the constants should apply to to a string and + * create the constants themselves as options of type AV_OPT_TYPE_CONST + * with their unit field set to the same string. + * Their default_val field should contain the value of the named + * constant. + * For example, to add some named constants for the test_flags option + * above, put the following into the child_opts array: + * @code + * { "test_flags", "This is a test option of flags type.", + * offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { 0 }, INT_MIN, INT_MAX, "test_unit" }, + * { "flag1", "This is a flag with value 16", 0, AV_OPT_TYPE_CONST, { 16 }, 0, 0, "test_unit" }, + * @endcode + * + * @section avoptions_use Using AVOptions + * This section deals with accessing options in an AVOptions-enabled struct. + * Such structs in Libav are e.g. AVCodecContext in libavcodec or + * AVFormatContext in libavformat. + * + * @subsection avoptions_use_examine Examining AVOptions + * The basic functions for examining options are av_opt_next(), which iterates + * over all options defined for one object, and av_opt_find(), which searches + * for an option with the given name. + * + * The situation is more complicated with nesting. An AVOptions-enabled struct + * may have AVOptions-enabled children. Passing the AV_OPT_SEARCH_CHILDREN flag + * to av_opt_find() will make the function search children recursively. + * + * For enumerating there are basically two cases. The first is when you want to + * get all options that may potentially exist on the struct and its children + * (e.g. when constructing documentation). In that case you should call + * av_opt_child_class_next() recursively on the parent struct's AVClass. The + * second case is when you have an already initialized struct with all its + * children and you want to get all options that can be actually written or read + * from it. In that case you should call av_opt_child_next() recursively (and + * av_opt_next() on each result). + * + * @subsection avoptions_use_get_set Reading and writing AVOptions + * When setting options, you often have a string read directly from the + * user. In such a case, simply passing it to av_opt_set() is enough. For + * non-string type options, av_opt_set() will parse the string according to the + * option type. + * + * Similarly av_opt_get() will read any option type and convert it to a string + * which will be returned. Do not forget that the string is allocated, so you + * have to free it with av_free(). + * + * In some cases it may be more convenient to put all options into an + * AVDictionary and call av_opt_set_dict() on it. A specific case of this + * are the format/codec open functions in lavf/lavc which take a dictionary + * filled with option as a parameter. This allows to set some options + * that cannot be set otherwise, since e.g. the input file format is not known + * before the file is actually opened. + */ enum AVOptionType{ - FF_OPT_TYPE_FLAGS, + AV_OPT_TYPE_FLAGS, + AV_OPT_TYPE_INT, + AV_OPT_TYPE_INT64, + AV_OPT_TYPE_DOUBLE, + AV_OPT_TYPE_FLOAT, + AV_OPT_TYPE_STRING, + AV_OPT_TYPE_RATIONAL, + AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length + AV_OPT_TYPE_CONST = 128, +#if FF_API_OLD_AVOPTIONS + FF_OPT_TYPE_FLAGS = 0, FF_OPT_TYPE_INT, FF_OPT_TYPE_INT64, FF_OPT_TYPE_DOUBLE, @@ -41,6 +235,7 @@ FF_OPT_TYPE_RATIONAL, FF_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length FF_OPT_TYPE_CONST=128, +#endif }; /** @@ -111,6 +306,7 @@ const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags); #endif +#if FF_API_OLD_AVOPTIONS /** * Set the field of obj with the given name to value. * @@ -129,25 +325,27 @@ * similarly, '-' unsets a flag. * @param[out] o_out if non-NULL put here a pointer to the AVOption * found - * @param alloc when 1 then the old value will be av_freed() and the - * new av_strduped() - * when 0 then no av_free() nor av_strdup() will be used + * @param alloc this parameter is currently ignored * @return 0 if the value has been set, or an AVERROR code in case of * error: - * AVERROR(ENOENT) if no matching option exists + * AVERROR_OPTION_NOT_FOUND if no matching option exists * AVERROR(ERANGE) if the value is out of range * AVERROR(EINVAL) if the value is not valid + * @deprecated use av_opt_set() */ +attribute_deprecated int av_set_string3(void *obj, const char *name, const char *val, int alloc, const AVOption **o_out); -const AVOption *av_set_double(void *obj, const char *name, double n); -const AVOption *av_set_q(void *obj, const char *name, AVRational n); -const AVOption *av_set_int(void *obj, const char *name, int64_t n); -double av_get_double(void *obj, const char *name, const AVOption **o_out); -AVRational av_get_q(void *obj, const char *name, const AVOption **o_out); -int64_t av_get_int(void *obj, const char *name, const AVOption **o_out); -const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len); -const AVOption *av_next_option(void *obj, const AVOption *last); +attribute_deprecated const AVOption *av_set_double(void *obj, const char *name, double n); +attribute_deprecated const AVOption *av_set_q(void *obj, const char *name, AVRational n); +attribute_deprecated const AVOption *av_set_int(void *obj, const char *name, int64_t n); + +attribute_deprecated double av_get_double(void *obj, const char *name, const AVOption **o_out); +attribute_deprecated AVRational av_get_q(void *obj, const char *name, const AVOption **o_out); +attribute_deprecated int64_t av_get_int(void *obj, const char *name, const AVOption **o_out); +attribute_deprecated const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len); +attribute_deprecated const AVOption *av_next_option(void *obj, const AVOption *last); +#endif /** * Show the obj options. @@ -160,8 +358,17 @@ */ int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags); +/** + * Set the values of all AVOption fields to their default values. + * + * @param s an AVOption-enabled struct (its first member must be a pointer to AVClass) + */ void av_opt_set_defaults(void *s); + +#if FF_API_OLD_AVOPTIONS +attribute_deprecated void av_opt_set_defaults2(void *s, int mask, int flags); +#endif /** * Parse the key/value pairs list in opts. For each key/value pair @@ -213,8 +420,39 @@ */ int av_opt_set_dict(void *obj, struct AVDictionary **options); +/** + * @defgroup opt_eval_funcs Evaluating option strings + * @{ + * This group of functions can be used to evaluate option strings + * and get numbers out of them. They do the same thing as av_opt_set(), + * except the result is written into the caller-supplied pointer. + * + * @param obj a struct whose first element is a pointer to AVClass. + * @param o an option for which the string is to be evaluated. + * @param val string to be evaluated. + * @param *_out value of the string will be written here. + * + * @return 0 on success, a negative number on failure. + */ +int av_opt_eval_flags (void *obj, const AVOption *o, const char *val, int *flags_out); +int av_opt_eval_int (void *obj, const AVOption *o, const char *val, int *int_out); +int av_opt_eval_int64 (void *obj, const AVOption *o, const char *val, int64_t *int64_out); +int av_opt_eval_float (void *obj, const AVOption *o, const char *val, float *float_out); +int av_opt_eval_double(void *obj, const AVOption *o, const char *val, double *double_out); +int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational *q_out); +/** + * @} + */ + #define AV_OPT_SEARCH_CHILDREN 0x0001 /**< Search in possible children of the given object first. */ +/** + * The obj passed to av_opt_find() is fake -- only a double pointer to AVClass + * instead of a required pointer to a struct containing AVClass. This is + * useful for searching for options without needing to allocate the corresponding + * object. + */ +#define AV_OPT_SEARCH_FAKE_OBJ 0x0002 /** * Look for an option in an object. Consider only options which @@ -222,6 +460,8 @@ * * @param[in] obj A pointer to a struct whose first element is a * pointer to an AVClass. + * Alternatively a double pointer to an AVClass, if + * AV_OPT_SEARCH_FAKE_OBJ search flag is set. * @param[in] name The name of the option to look for. * @param[in] unit When searching for named constants, name of the unit * it belongs to. @@ -239,4 +479,113 @@ const AVOption *av_opt_find(void *obj, const char *name, const char *unit, int opt_flags, int search_flags); +/** + * Look for an option in an object. Consider only options which + * have all the specified flags set. + * + * @param[in] obj A pointer to a struct whose first element is a + * pointer to an AVClass. + * Alternatively a double pointer to an AVClass, if + * AV_OPT_SEARCH_FAKE_OBJ search flag is set. + * @param[in] name The name of the option to look for. + * @param[in] unit When searching for named constants, name of the unit + * it belongs to. + * @param opt_flags Find only options with all the specified flags set (AV_OPT_FLAG). + * @param search_flags A combination of AV_OPT_SEARCH_*. + * @param[out] target_obj if non-NULL, an object to which the option belongs will be + * written here. It may be different from obj if AV_OPT_SEARCH_CHILDREN is present + * in search_flags. This parameter is ignored if search_flags contain + * AV_OPT_SEARCH_FAKE_OBJ. + * + * @return A pointer to the option found, or NULL if no option + * was found. + */ +const AVOption *av_opt_find2(void *obj, const char *name, const char *unit, + int opt_flags, int search_flags, void **target_obj); + +/** + * Iterate over all AVOptions belonging to obj. + * + * @param obj an AVOptions-enabled struct or a double pointer to an + * AVClass describing it. + * @param prev result of the previous call to av_opt_next() on this object + * or NULL + * @return next AVOption or NULL + */ +const AVOption *av_opt_next(void *obj, const AVOption *prev); + +/** + * Iterate over AVOptions-enabled children of obj. + * + * @param prev result of a previous call to this function or NULL + * @return next AVOptions-enabled child or NULL + */ +void *av_opt_child_next(void *obj, void *prev); + +/** + * Iterate over potential AVOptions-enabled children of parent. + * + * @param prev result of a previous call to this function or NULL + * @return AVClass corresponding to next potential child or NULL + */ +const AVClass *av_opt_child_class_next(const AVClass *parent, const AVClass *prev); + +/** + * @defgroup opt_set_funcs Option setting functions + * @{ + * Those functions set the field of obj with the given name to value. + * + * @param[in] obj A struct whose first element is a pointer to an AVClass. + * @param[in] name the name of the field to set + * @param[in] val The value to set. In case of av_opt_set() if the field is not + * of a string type, then the given string is parsed. + * SI postfixes and some named scalars are supported. + * If the field is of a numeric type, it has to be a numeric or named + * scalar. Behavior with more than one scalar and +- infix operators + * is undefined. + * If the field is of a flags type, it has to be a sequence of numeric + * scalars or named flags separated by '+' or '-'. Prefixing a flag + * with '+' causes it to be set without affecting the other flags; + * similarly, '-' unsets a flag. + * @param search_flags flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN + * is passed here, then the option may be set on a child of obj. + * + * @return 0 if the value has been set, or an AVERROR code in case of + * error: + * AVERROR_OPTION_NOT_FOUND if no matching option exists + * AVERROR(ERANGE) if the value is out of range + * AVERROR(EINVAL) if the value is not valid + */ +int av_opt_set (void *obj, const char *name, const char *val, int search_flags); +int av_opt_set_int (void *obj, const char *name, int64_t val, int search_flags); +int av_opt_set_double(void *obj, const char *name, double val, int search_flags); +int av_opt_set_q (void *obj, const char *name, AVRational val, int search_flags); +/** + * @} + */ + +/** + * @defgroup opt_get_funcs Option getting functions + * @{ + * Those functions get a value of the option with the given name from an object. + * + * @param[in] obj a struct whose first element is a pointer to an AVClass. + * @param[in] name name of the option to get. + * @param[in] search_flags flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN + * is passed here, then the option may be found in a child of obj. + * @param[out] out_val value of the option will be written here + * @return 0 on success, a negative error code otherwise + */ +/** + * @note the returned string will av_malloc()ed and must be av_free()ed by the caller + */ +int av_opt_get (void *obj, const char *name, int search_flags, uint8_t **out_val); +int av_opt_get_int (void *obj, const char *name, int search_flags, int64_t *out_val); +int av_opt_get_double(void *obj, const char *name, int search_flags, double *out_val); +int av_opt_get_q (void *obj, const char *name, int search_flags, AVRational *out_val); +/** + * @} + * @} + */ + #endif /* AVUTIL_OPT_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/parseutils.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/parseutils.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/parseutils.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/parseutils.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,13 +21,13 @@ * misc parsing utilities */ -#include #include #include #include "avstring.h" #include "avutil.h" #include "eval.h" +#include "log.h" #include "random_seed.h" #include "parseutils.h" @@ -293,7 +293,7 @@ static int color_table_compare(const void *lhs, const void *rhs) { - return strcasecmp(lhs, ((const ColorEntry *)rhs)->name); + return av_strcasecmp(lhs, ((const ColorEntry *)rhs)->name); } #define ALPHA_SEP '@' @@ -319,7 +319,7 @@ len = strlen(color_string2); rgba_color[3] = 255; - if (!strcasecmp(color_string2, "random") || !strcasecmp(color_string2, "bikeshed")) { + if (!av_strcasecmp(color_string2, "random") || !av_strcasecmp(color_string2, "bikeshed")) { int rgba = av_get_random_seed(); rgba_color[0] = rgba >> 24; rgba_color[1] = rgba >> 16; @@ -400,10 +400,7 @@ return val; } -/* small strptime for ffmpeg */ -static -const char *small_strptime(const char *p, const char *fmt, - struct tm *dt) +static const char *small_strptime(const char *p, const char *fmt, struct tm *dt) { int c, val; @@ -462,10 +459,9 @@ p++; } } - return p; } -static time_t mktimegm(struct tm *tm) +time_t av_timegm(struct tm *tm) { time_t t; @@ -484,7 +480,7 @@ return t; } -int av_parse_time(int64_t *timeval, const char *datestr, int duration) +int av_parse_time(int64_t *timeval, const char *timestr, int duration) { const char *p; int64_t t; @@ -506,19 +502,19 @@ #undef time time_t now = time(0); - len = strlen(datestr); + len = strlen(timestr); if (len > 0) - lastch = datestr[len - 1]; + lastch = timestr[len - 1]; else lastch = '\0'; is_utc = (lastch == 'z' || lastch == 'Z'); memset(&dt, 0, sizeof(dt)); - p = datestr; + p = timestr; q = NULL; if (!duration) { - if (!strncasecmp(datestr, "now", len)) { + if (!av_strncasecmp(timestr, "now", len)) { *timeval = (int64_t) now * 1000000; return 0; } @@ -555,15 +551,15 @@ } } } else { - /* parse datestr as a duration */ + /* parse timestr as a duration */ if (p[0] == '-') { negative = 1; ++p; } - /* parse datestr as HH:MM:SS */ + /* parse timestr as HH:MM:SS */ q = small_strptime(p, time_fmt[0], &dt); if (!q) { - /* parse datestr as S+ */ + /* parse timestr as S+ */ dt.tm_sec = strtol(p, (char **)&q, 10); if (q == p) { /* the parsing didn't succeed */ @@ -586,7 +582,7 @@ } else { dt.tm_isdst = -1; /* unknown */ if (is_utc) { - t = mktimegm(&dt); + t = av_timegm(&dt); } else { t = mktime(&dt); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/parseutils.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/parseutils.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/parseutils.h 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/parseutils.h 2012-01-11 00:34:30.000000000 +0000 @@ -19,6 +19,8 @@ #ifndef AVUTIL_PARSEUTILS_H #define AVUTIL_PARSEUTILS_H +#include + #include "rational.h" /** @@ -73,7 +75,7 @@ void *log_ctx); /** - * Parses timestr and returns in *time a corresponding number of + * Parse timestr and return in *time a corresponding number of * microseconds. * * @param timeval puts here the number of microseconds corresponding @@ -83,7 +85,7 @@ * January, 1970 up to the time of the parsed date. If timestr cannot * be successfully parsed, set *time to INT64_MIN. - * @param datestr a string representing a date or a duration. + * @param timestr a string representing a date or a duration. * - If a date the syntax is: * @code * [{YYYY-MM-DD|YYYYMMDD}[T|t| ]]{{HH[:MM[:SS[.m...]]]}|{HH[MM[SS[.m...]]]}}[Z] @@ -114,4 +116,9 @@ */ int av_find_info_tag(char *arg, int arg_size, const char *tag1, const char *info); +/** + * Convert the decomposed UTC time in tm to a time_t value. + */ +time_t av_timegm(struct tm *tm); + #endif /* AVUTIL_PARSEUTILS_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/pca.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/pca.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/pca.c 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/pca.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,245 +0,0 @@ -/* - * principal component analysis (PCA) - * Copyright (c) 2004 Michael Niedermayer - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * principal component analysis (PCA) - */ - -#include "common.h" -#include "pca.h" - -typedef struct PCA{ - int count; - int n; - double *covariance; - double *mean; -}PCA; - -PCA *ff_pca_init(int n){ - PCA *pca; - if(n<=0) - return NULL; - - pca= av_mallocz(sizeof(PCA)); - pca->n= n; - pca->count=0; - pca->covariance= av_mallocz(sizeof(double)*n*n); - pca->mean= av_mallocz(sizeof(double)*n); - - return pca; -} - -void ff_pca_free(PCA *pca){ - av_freep(&pca->covariance); - av_freep(&pca->mean); - av_free(pca); -} - -void ff_pca_add(PCA *pca, double *v){ - int i, j; - const int n= pca->n; - - for(i=0; imean[i] += v[i]; - for(j=i; jcovariance[j + i*n] += v[i]*v[j]; - } - pca->count++; -} - -int ff_pca(PCA *pca, double *eigenvector, double *eigenvalue){ - int i, j, pass; - int k=0; - const int n= pca->n; - double z[n]; - - memset(eigenvector, 0, sizeof(double)*n*n); - - for(j=0; jmean[j] /= pca->count; - eigenvector[j + j*n] = 1.0; - for(i=0; i<=j; i++){ - pca->covariance[j + i*n] /= pca->count; - pca->covariance[j + i*n] -= pca->mean[i] * pca->mean[j]; - pca->covariance[i + j*n] = pca->covariance[j + i*n]; - } - eigenvalue[j]= pca->covariance[j + j*n]; - z[j]= 0; - } - - for(pass=0; pass < 50; pass++){ - double sum=0; - - for(i=0; icovariance[j + i*n]); - - if(sum == 0){ - for(i=0; i maxvalue){ - maxvalue= eigenvalue[j]; - k= j; - } - } - eigenvalue[k]= eigenvalue[i]; - eigenvalue[i]= maxvalue; - for(j=0; jcovariance[j + i*n]; - double t,c,s,tau,theta, h; - - if(pass < 3 && fabs(covar) < sum / (5*n*n)) //FIXME why pass < 3 - continue; - if(fabs(covar) == 0.0) //FIXME should not be needed - continue; - if(pass >=3 && fabs((eigenvalue[j]+z[j])/covar) > (1LL<<32) && fabs((eigenvalue[i]+z[i])/covar) > (1LL<<32)){ - pca->covariance[j + i*n]=0.0; - continue; - } - - h= (eigenvalue[j]+z[j]) - (eigenvalue[i]+z[i]); - theta=0.5*h/covar; - t=1.0/(fabs(theta)+sqrt(1.0+theta*theta)); - if(theta < 0.0) t = -t; - - c=1.0/sqrt(1+t*t); - s=t*c; - tau=s/(1.0+c); - z[i] -= t*covar; - z[j] += t*covar; - -#define ROTATE(a,i,j,k,l) {\ - double g=a[j + i*n];\ - double h=a[l + k*n];\ - a[j + i*n]=g-s*(h+g*tau);\ - a[l + k*n]=h+s*(g-h*tau); } - for(k=0; kcovariance,FFMIN(k,i),FFMAX(k,i),FFMIN(k,j),FFMAX(k,j)) - } - ROTATE(eigenvector,k,i,k,j) - } - pca->covariance[j + i*n]=0.0; - } - } - for (i=0; i -#include -#include "lfg.h" - -int main(void){ - PCA *pca; - int i, j, k; -#define LEN 8 - double eigenvector[LEN*LEN]; - double eigenvalue[LEN]; - AVLFG prng; - - av_lfg_init(&prng, 1); - - pca= ff_pca_init(LEN); - - for(i=0; i<9000000; i++){ - double v[2*LEN+100]; - double sum=0; - int pos = av_lfg_get(&prng) % LEN; - int v2 = av_lfg_get(&prng) % 101 - 50; - v[0] = av_lfg_get(&prng) % 101 - 50; - for(j=1; j<8; j++){ - if(j<=pos) v[j]= v[0]; - else v[j]= v2; - sum += v[j]; - } -/* for(j=0; jcount= 1; - pca->mean[i]= 0; - -// (0.5^|x|)^2 = 0.5^2|x| = 0.25^|x| - - -// pca.covariance[i + i*LEN]= pow(0.5, fabs - for(j=i; jcovariance[i + j*LEN]); - } - printf("\n"); - } - - for(i=0; icovariance[FFMIN(k,j) + FFMAX(k,j)*LEN] * eigenvector[i + k*LEN]; - } - v[j] /= eigenvalue[i]; - error += fabs(v[j] - eigenvector[i + j*LEN]); - } - printf("%f ", error); - } - printf("\n"); - - for(i=0; i - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * principal component analysis (PCA) - */ - -#ifndef AVUTIL_PCA_H -#define AVUTIL_PCA_H - -struct PCA *ff_pca_init(int n); -void ff_pca_free(struct PCA *pca); -void ff_pca_add(struct PCA *pca, double *v); -int ff_pca(struct PCA *pca, double *eigenvector, double *eigenvalue); - -#endif /* AVUTIL_PCA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/pixdesc.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/pixdesc.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/pixdesc.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/pixdesc.c 2012-01-11 00:34:30.000000000 +0000 @@ -27,45 +27,46 @@ #include "intreadwrite.h" void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4], - const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component) + const AVPixFmtDescriptor *desc, int x, int y, int c, int w, + int read_pal_component) { - AVComponentDescriptor comp= desc->comp[c]; - int plane= comp.plane; - int depth= comp.depth_minus1+1; - int mask = (1<flags; - - if (flags & PIX_FMT_BITSTREAM){ - int skip = x*step + comp.offset_plus1-1; - const uint8_t *p = data[plane] + y*linesize[plane] + (skip>>3); - int shift = 8 - depth - (skip&7); + AVComponentDescriptor comp = desc->comp[c]; + int plane = comp.plane; + int depth = comp.depth_minus1 + 1; + int mask = (1 << depth) - 1; + int shift = comp.shift; + int step = comp.step_minus1 + 1; + int flags = desc->flags; + + if (flags & PIX_FMT_BITSTREAM) { + int skip = x * step + comp.offset_plus1 - 1; + const uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3); + int shift = 8 - depth - (skip & 7); - while(w--){ + while (w--) { int val = (*p >> shift) & mask; - if(read_pal_component) - val= data[1][4*val + c]; + if (read_pal_component) + val = data[1][4*val + c]; shift -= step; - p -= shift>>3; + p -= shift >> 3; shift &= 7; - *dst++= val; + *dst++ = val; } } else { - const uint8_t *p = data[plane]+ y*linesize[plane] + x*step + comp.offset_plus1-1; + const uint8_t *p = data[plane] + y * linesize[plane] + x * step + comp.offset_plus1 - 1; int is_8bit = shift + depth <= 8; if (is_8bit) p += !!(flags & PIX_FMT_BE); - while(w--){ + while (w--) { int val = is_8bit ? *p : flags & PIX_FMT_BE ? AV_RB16(p) : AV_RL16(p); - val = (val>>shift) & mask; - if(read_pal_component) - val= data[1][4*val + c]; - p+= step; - *dst++= val; + val = (val >> shift) & mask; + if (read_pal_component) + val = data[1][4 * val + c]; + p += step; + *dst++ = val; } } } @@ -75,41 +76,41 @@ { AVComponentDescriptor comp = desc->comp[c]; int plane = comp.plane; - int depth = comp.depth_minus1+1; - int step = comp.step_minus1+1; + int depth = comp.depth_minus1 + 1; + int step = comp.step_minus1 + 1; int flags = desc->flags; if (flags & PIX_FMT_BITSTREAM) { - int skip = x*step + comp.offset_plus1-1; - uint8_t *p = data[plane] + y*linesize[plane] + (skip>>3); - int shift = 8 - depth - (skip&7); + int skip = x * step + comp.offset_plus1 - 1; + uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3); + int shift = 8 - depth - (skip & 7); while (w--) { *p |= *src++ << shift; shift -= step; - p -= shift>>3; + p -= shift >> 3; shift &= 7; } } else { int shift = comp.shift; - uint8_t *p = data[plane]+ y*linesize[plane] + x*step + comp.offset_plus1-1; + uint8_t *p = data[plane] + y * linesize[plane] + x * step + comp.offset_plus1 - 1; if (shift + depth <= 8) { p += !!(flags & PIX_FMT_BE); while (w--) { - *p |= (*src++<log2_chroma_w + pixdesc->log2_chroma_h; for (c = 0; c < pixdesc->nb_components; c++) { - int s = c==1 || c==2 ? 0 : log2_pixels; - bits += (pixdesc->comp[c].depth_minus1+1) << s; + int s = c == 1 || c == 2 ? 0 : log2_pixels; + bits += (pixdesc->comp[c].depth_minus1 + 1) << s; } return bits >> log2_pixels; @@ -1000,11 +1149,11 @@ { /* print header */ if (pix_fmt < 0) { - snprintf (buf, buf_size, "name " " nb_components" " nb_bits"); + snprintf (buf, buf_size, "name" " nb_components" " nb_bits"); } else { const AVPixFmtDescriptor *pixdesc = &av_pix_fmt_descriptors[pix_fmt]; - snprintf(buf, buf_size, "%-11s %7d %10d", - pixdesc->name, pixdesc->nb_components, av_get_bits_per_pixel(pixdesc)); + snprintf(buf, buf_size, "%-11s %7d %10d", pixdesc->name, + pixdesc->nb_components, av_get_bits_per_pixel(pixdesc)); } return buf; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/pixdesc.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/pixdesc.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/pixdesc.h 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/pixdesc.h 2012-01-11 00:34:30.000000000 +0000 @@ -87,6 +87,8 @@ #define PIX_FMT_PAL 2 ///< Pixel format has a palette in data[1], values are indexes in this palette. #define PIX_FMT_BITSTREAM 4 ///< All values of a component are bit-wise packed end to end. #define PIX_FMT_HWACCEL 8 ///< Pixel format is an HW accelerated format. +#define PIX_FMT_PLANAR 16 ///< At least one pixel component is not in the first data plane +#define PIX_FMT_RGB 32 ///< The pixel format contains RGB-like data (as opposed to YUV/grayscale) /** * The array of all the pixel format descriptors. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/pixfmt.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/pixfmt.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/pixfmt.h 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/pixfmt.h 2012-01-11 00:34:30.000000000 +0000 @@ -25,21 +25,21 @@ * @file * pixel format definitions * - * @warning This file has to be considered an internal but installed - * header, so it should not be directly included in your projects. */ #include "libavutil/avconfig.h" /** - * Pixel format. Notes: + * Pixel format. * + * @note * PIX_FMT_RGB32 is handled in an endian-specific manner. An RGBA * color is put together as: * (A << 24) | (R << 16) | (G << 8) | B * This is stored as BGRA on little-endian CPU architectures and ARGB on * big-endian CPUs. * + * @par * When the pixel format is palettized RGB (PIX_FMT_PAL8), the palettized * image data is stored in AVFrame.data[0]. The palette is transported in * AVFrame.data[1], is 1024 bytes long (256 4-byte entries) and is @@ -49,13 +49,15 @@ * This is important as many custom PAL8 video codecs that were designed * to run on the IBM VGA graphics adapter use 6-bit palette components. * + * @par * For all the 8bit per pixel formats, an RGB32 palette is in data[1] like * for pal8. This palette is filled in automatically by the function * allocating the picture. * - * Note, make sure that all newly added big endian formats have pix_fmt&1==1 - * and that all newly added little endian formats have pix_fmt&1==0 - * this allows simpler detection of big vs little endian. + * @note + * make sure that all newly added big endian formats have pix_fmt&1==1 + * and that all newly added little endian formats have pix_fmt&1==0 + * this allows simpler detection of big vs little endian. */ enum PixelFormat { PIX_FMT_NONE= -1, @@ -139,12 +141,22 @@ PIX_FMT_YUV420P9LE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian PIX_FMT_YUV420P10BE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian PIX_FMT_YUV420P10LE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian - PIX_FMT_YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian - PIX_FMT_YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian - PIX_FMT_YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian - PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian - PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian - PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian + PIX_FMT_YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian + PIX_FMT_YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + PIX_FMT_YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian + PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian + PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian + PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian + PIX_FMT_YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian + PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + PIX_FMT_VDA_VLD, ///< hardware decoding through VDA + PIX_FMT_GBRP, ///< planar GBR 4:4:4 24bpp + PIX_FMT_GBRP9BE, ///< planar GBR 4:4:4 27bpp, big endian + PIX_FMT_GBRP9LE, ///< planar GBR 4:4:4 27bpp, little endian + PIX_FMT_GBRP10BE, ///< planar GBR 4:4:4 30bpp, big endian + PIX_FMT_GBRP10LE, ///< planar GBR 4:4:4 30bpp, little endian + PIX_FMT_GBRP16BE, ///< planar GBR 4:4:4 48bpp, big endian + PIX_FMT_GBRP16LE, ///< planar GBR 4:4:4 48bpp, little endian PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions }; @@ -170,6 +182,7 @@ #define PIX_FMT_BGR444 PIX_FMT_NE(BGR444BE, BGR444LE) #define PIX_FMT_YUV420P9 PIX_FMT_NE(YUV420P9BE , YUV420P9LE) +#define PIX_FMT_YUV422P9 PIX_FMT_NE(YUV422P9BE , YUV422P9LE) #define PIX_FMT_YUV444P9 PIX_FMT_NE(YUV444P9BE , YUV444P9LE) #define PIX_FMT_YUV420P10 PIX_FMT_NE(YUV420P10BE, YUV420P10LE) #define PIX_FMT_YUV422P10 PIX_FMT_NE(YUV422P10BE, YUV422P10LE) @@ -178,4 +191,8 @@ #define PIX_FMT_YUV422P16 PIX_FMT_NE(YUV422P16BE, YUV422P16LE) #define PIX_FMT_YUV444P16 PIX_FMT_NE(YUV444P16BE, YUV444P16LE) +#define PIX_FMT_GBRP9 PIX_FMT_NE(GBRP9BE , GBRP9LE) +#define PIX_FMT_GBRP10 PIX_FMT_NE(GBRP10BE, GBRP10LE) +#define PIX_FMT_GBRP16 PIX_FMT_NE(GBRP16BE, GBRP16LE) + #endif /* AVUTIL_PIXFMT_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/random_seed.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/random_seed.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/random_seed.c 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/random_seed.c 2012-01-11 00:34:30.000000000 +0000 @@ -20,10 +20,10 @@ #include #include +#include +#include #include "timer.h" -#include "time.h" #include "random_seed.h" -#include "avutil.h" static int read_random(uint32_t *dst, const char *file) { @@ -40,24 +40,24 @@ static uint32_t get_generic_seed(void) { - clock_t last_t=0; - int bits=0; - uint64_t random=0; + clock_t last_t = 0; + int bits = 0; + uint64_t random = 0; unsigned i; - float s=0.000000000001; + float s = 0.000000000001; - for(i=0;bits<64;i++){ - clock_t t= clock(); - if(last_t && fabs(t-last_t)>s || t==(clock_t)-1){ - if(i<10000 && s<(1<<24)){ - s+=s; - i=t=0; - }else{ - random= 2*random + (i&1); + for (i = 0; bits < 64; i++) { + clock_t t = clock(); + if (last_t && fabs(t - last_t) > s || t == (clock_t) -1) { + if (i < 10000 && s < (1 << 24)) { + s += s; + i = t = 0; + } else { + random = 2 * random + (i & 1); bits++; } } - last_t= t; + last_t = t; } #ifdef AV_READ_TIME random ^= AV_READ_TIME(); @@ -65,7 +65,7 @@ random ^= clock(); #endif - random += random>>32; + random += random >> 32; return random; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/random_seed.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/random_seed.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/random_seed.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/random_seed.h 2012-01-11 00:34:30.000000000 +0000 @@ -22,10 +22,23 @@ #define AVUTIL_RANDOM_SEED_H #include +/** + * @addtogroup lavu_crypto + * @{ + */ /** - * Get a seed to use in conjunction with random functions. + * Get random data. + * + * This function can be called repeatedly to generate more random bits + * as needed. It is generally quite slow, and usually used to seed a + * PRNG. As it uses /dev/urandom and /dev/random, the quality of the + * returned random data depends on the platform. */ uint32_t av_get_random_seed(void); +/** + * @} + */ + #endif /* AVUTIL_RANDOM_SEED_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/rational.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/rational.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/rational.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/rational.c 2012-01-11 00:34:30.000000000 +0000 @@ -33,75 +33,86 @@ #include "mathematics.h" #include "rational.h" -int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max){ - AVRational a0={0,1}, a1={1,0}; - int sign= (num<0) ^ (den<0); - int64_t gcd= av_gcd(FFABS(num), FFABS(den)); - - if(gcd){ - num = FFABS(num)/gcd; - den = FFABS(den)/gcd; +int av_reduce(int *dst_num, int *dst_den, + int64_t num, int64_t den, int64_t max) +{ + AVRational a0 = { 0, 1 }, a1 = { 1, 0 }; + int sign = (num < 0) ^ (den < 0); + int64_t gcd = av_gcd(FFABS(num), FFABS(den)); + + if (gcd) { + num = FFABS(num) / gcd; + den = FFABS(den) / gcd; } - if(num<=max && den<=max){ - a1= (AVRational){num, den}; - den=0; + if (num <= max && den <= max) { + a1 = (AVRational) { num, den }; + den = 0; } - while(den){ - uint64_t x = num / den; - int64_t next_den= num - den*x; - int64_t a2n= x*a1.num + a0.num; - int64_t a2d= x*a1.den + a0.den; - - if(a2n > max || a2d > max){ - if(a1.num) x= (max - a0.num) / a1.num; - if(a1.den) x= FFMIN(x, (max - a0.den) / a1.den); + while (den) { + uint64_t x = num / den; + int64_t next_den = num - den * x; + int64_t a2n = x * a1.num + a0.num; + int64_t a2d = x * a1.den + a0.den; + + if (a2n > max || a2d > max) { + if (a1.num) x = (max - a0.num) / a1.num; + if (a1.den) x = FFMIN(x, (max - a0.den) / a1.den); - if (den*(2*x*a1.den + a0.den) > num*a1.den) - a1 = (AVRational){x*a1.num + a0.num, x*a1.den + a0.den}; + if (den * (2 * x * a1.den + a0.den) > num * a1.den) + a1 = (AVRational) { x * a1.num + a0.num, x * a1.den + a0.den }; break; } - a0= a1; - a1= (AVRational){a2n, a2d}; - num= den; - den= next_den; + a0 = a1; + a1 = (AVRational) { a2n, a2d }; + num = den; + den = next_den; } av_assert2(av_gcd(a1.num, a1.den) <= 1U); *dst_num = sign ? -a1.num : a1.num; *dst_den = a1.den; - return den==0; + return den == 0; } -AVRational av_mul_q(AVRational b, AVRational c){ - av_reduce(&b.num, &b.den, b.num * (int64_t)c.num, b.den * (int64_t)c.den, INT_MAX); +AVRational av_mul_q(AVRational b, AVRational c) +{ + av_reduce(&b.num, &b.den, + b.num * (int64_t) c.num, + b.den * (int64_t) c.den, INT_MAX); return b; } -AVRational av_div_q(AVRational b, AVRational c){ - return av_mul_q(b, (AVRational){c.den, c.num}); +AVRational av_div_q(AVRational b, AVRational c) +{ + return av_mul_q(b, (AVRational) { c.den, c.num }); } -AVRational av_add_q(AVRational b, AVRational c){ - av_reduce(&b.num, &b.den, b.num * (int64_t)c.den + c.num * (int64_t)b.den, b.den * (int64_t)c.den, INT_MAX); +AVRational av_add_q(AVRational b, AVRational c) { + av_reduce(&b.num, &b.den, + b.num * (int64_t) c.den + + c.num * (int64_t) b.den, + b.den * (int64_t) c.den, INT_MAX); return b; } -AVRational av_sub_q(AVRational b, AVRational c){ - return av_add_q(b, (AVRational){-c.num, c.den}); +AVRational av_sub_q(AVRational b, AVRational c) +{ + return av_add_q(b, (AVRational) { -c.num, c.den }); } -AVRational av_d2q(double d, int max){ +AVRational av_d2q(double d, int max) +{ AVRational a; #define LOG2 0.69314718055994530941723212145817656807550013436025 int exponent; int64_t den; if (isnan(d)) - return (AVRational){0,0}; + return (AVRational) { 0,0 }; if (isinf(d)) - return (AVRational){ d<0 ? -1:1, 0 }; + return (AVRational) { d < 0 ? -1 : 1, 0 }; exponent = FFMAX( (int)(log(fabs(d) + 1e-20)/LOG2), 0); den = 1LL << (61 - exponent); av_reduce(&a.num, &a.den, (int64_t)(d * den + 0.5), den, max); @@ -127,7 +138,7 @@ int av_find_nearest_q_idx(AVRational q, const AVRational* q_list) { int i, nearest_q_idx = 0; - for(i=0; q_list[i].den; i++) + for (i = 0; q_list[i].den; i++) if (av_nearer_q(q, q_list[i], q_list[nearest_q_idx]) > 0) nearest_q_idx = i; @@ -135,21 +146,26 @@ } #ifdef TEST -main(){ +int main(void) +{ AVRational a,b; - for(a.num=-2; a.num<=2; a.num++){ - for(a.den=-2; a.den<=2; a.den++){ - for(b.num=-2; b.num<=2; b.num++){ - for(b.den=-2; b.den<=2; b.den++){ - int c= av_cmp_q(a,b); - double d= av_q2d(a) == av_q2d(b) ? 0 : (av_q2d(a) - av_q2d(b)); - if(d>0) d=1; - else if(d<0) d=-1; - else if(d != d) d= INT_MIN; - if(c!=d) av_log(0, AV_LOG_ERROR, "%d/%d %d/%d, %d %f\n", a.num, a.den, b.num, b.den, c,d); + for (a.num = -2; a.num <= 2; a.num++) { + for (a.den = -2; a.den <= 2; a.den++) { + for (b.num = -2; b.num <= 2; b.num++) { + for (b.den = -2; b.den <= 2; b.den++) { + int c = av_cmp_q(a,b); + double d = av_q2d(a) == av_q2d(b) ? + 0 : (av_q2d(a) - av_q2d(b)); + if (d > 0) d = 1; + else if (d < 0) d = -1; + else if (d != d) d = INT_MIN; + if (c != d) + av_log(0, AV_LOG_ERROR, "%d/%d %d/%d, %d %f\n", a.num, + a.den, b.num, b.den, c,d); } } } } + return 0; } #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/rational.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/rational.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/rational.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/rational.h 2012-01-11 00:34:30.000000000 +0000 @@ -33,6 +33,11 @@ #include "attributes.h" /** + * @addtogroup lavu_math + * @{ + */ + +/** * rational number numerator/denominator */ typedef struct AVRational{ @@ -132,4 +137,8 @@ */ int av_find_nearest_q_idx(AVRational q, const AVRational* q_list); +/** + * @} + */ + #endif /* AVUTIL_RATIONAL_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/rc4.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/rc4.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/rc4.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/rc4.h 2012-01-11 00:34:30.000000000 +0000 @@ -29,21 +29,21 @@ }; /** - * \brief Initializes an AVRC4 context. + * @brief Initializes an AVRC4 context. * - * \param key_bits must be a multiple of 8 - * \param decrypt 0 for encryption, 1 for decryption, currently has no effect + * @param key_bits must be a multiple of 8 + * @param decrypt 0 for encryption, 1 for decryption, currently has no effect */ int av_rc4_init(struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt); /** - * \brief Encrypts / decrypts using the RC4 algorithm. + * @brief Encrypts / decrypts using the RC4 algorithm. * - * \param count number of bytes - * \param dst destination array, can be equal to src - * \param src source array, can be equal to dst, may be NULL - * \param iv not (yet) used for RC4, should be NULL - * \param decrypt 0 for encryption, 1 for decryption, not (yet) used + * @param count number of bytes + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst, may be NULL + * @param iv not (yet) used for RC4, should be NULL + * @param decrypt 0 for encryption, 1 for decryption, not (yet) used */ void av_rc4_crypt(struct AVRC4 *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/samplefmt.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/samplefmt.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/samplefmt.c 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/samplefmt.c 2012-01-11 00:34:30.000000000 +0000 @@ -25,15 +25,21 @@ typedef struct SampleFmtInfo { const char *name; int bits; + int planar; } SampleFmtInfo; /** this table gives more information about formats */ static const SampleFmtInfo sample_fmt_info[AV_SAMPLE_FMT_NB] = { - [AV_SAMPLE_FMT_U8] = { .name = "u8", .bits = 8 }, - [AV_SAMPLE_FMT_S16] = { .name = "s16", .bits = 16 }, - [AV_SAMPLE_FMT_S32] = { .name = "s32", .bits = 32 }, - [AV_SAMPLE_FMT_FLT] = { .name = "flt", .bits = 32 }, - [AV_SAMPLE_FMT_DBL] = { .name = "dbl", .bits = 64 }, + [AV_SAMPLE_FMT_U8] = { .name = "u8", .bits = 8, .planar = 0 }, + [AV_SAMPLE_FMT_S16] = { .name = "s16", .bits = 16, .planar = 0 }, + [AV_SAMPLE_FMT_S32] = { .name = "s32", .bits = 32, .planar = 0 }, + [AV_SAMPLE_FMT_FLT] = { .name = "flt", .bits = 32, .planar = 0 }, + [AV_SAMPLE_FMT_DBL] = { .name = "dbl", .bits = 64, .planar = 0 }, + [AV_SAMPLE_FMT_U8P] = { .name = "u8p", .bits = 8, .planar = 1 }, + [AV_SAMPLE_FMT_S16P] = { .name = "s16p", .bits = 16, .planar = 1 }, + [AV_SAMPLE_FMT_S32P] = { .name = "s32p", .bits = 32, .planar = 1 }, + [AV_SAMPLE_FMT_FLTP] = { .name = "fltp", .bits = 32, .planar = 1 }, + [AV_SAMPLE_FMT_DBLP] = { .name = "dblp", .bits = 64, .planar = 1 }, }; const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt) @@ -79,3 +85,75 @@ 0 : sample_fmt_info[sample_fmt].bits; } #endif + +int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) +{ + if (sample_fmt < 0 || sample_fmt >= AV_SAMPLE_FMT_NB) + return 0; + return sample_fmt_info[sample_fmt].planar; +} + +int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, + enum AVSampleFormat sample_fmt, int align) +{ + int line_size; + int sample_size = av_get_bytes_per_sample(sample_fmt); + int planar = av_sample_fmt_is_planar(sample_fmt); + + /* validate parameter ranges */ + if (!sample_size || nb_samples <= 0 || nb_channels <= 0) + return AVERROR(EINVAL); + + /* check for integer overflow */ + if (nb_channels > INT_MAX / align || + (int64_t)nb_channels * nb_samples > (INT_MAX - (align * nb_channels)) / sample_size) + return AVERROR(EINVAL); + + line_size = planar ? FFALIGN(nb_samples * sample_size, align) : + FFALIGN(nb_samples * sample_size * nb_channels, align); + if (linesize) + *linesize = line_size; + + return planar ? line_size * nb_channels : line_size; +} + +int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, + uint8_t *buf, int nb_channels, int nb_samples, + enum AVSampleFormat sample_fmt, int align) +{ + int ch, planar, buf_size; + + planar = av_sample_fmt_is_planar(sample_fmt); + buf_size = av_samples_get_buffer_size(linesize, nb_channels, nb_samples, + sample_fmt, align); + if (buf_size < 0) + return buf_size; + + audio_data[0] = buf; + for (ch = 1; planar && ch < nb_channels; ch++) + audio_data[ch] = audio_data[ch-1] + *linesize; + + return 0; +} + +int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, + int nb_samples, enum AVSampleFormat sample_fmt, int align) +{ + uint8_t *buf; + int size = av_samples_get_buffer_size(NULL, nb_channels, nb_samples, + sample_fmt, align); + if (size < 0) + return size; + + buf = av_mallocz(size); + if (!buf) + return AVERROR(ENOMEM); + + size = av_samples_fill_arrays(audio_data, linesize, buf, nb_channels, + nb_samples, sample_fmt, align); + if (size < 0) { + av_free(buf); + return size; + } + return 0; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/samplefmt.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/samplefmt.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/samplefmt.h 2011-06-09 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/samplefmt.h 2012-01-11 00:34:30.000000000 +0000 @@ -31,6 +31,13 @@ AV_SAMPLE_FMT_S32, ///< signed 32 bits AV_SAMPLE_FMT_FLT, ///< float AV_SAMPLE_FMT_DBL, ///< double + + AV_SAMPLE_FMT_U8P, ///< unsigned 8 bits, planar + AV_SAMPLE_FMT_S16P, ///< signed 16 bits, planar + AV_SAMPLE_FMT_S32P, ///< signed 32 bits, planar + AV_SAMPLE_FMT_FLTP, ///< float, planar + AV_SAMPLE_FMT_DBLP, ///< double, planar + AV_SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if linking dynamically }; @@ -77,4 +84,65 @@ */ int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt); +/** + * Check if the sample format is planar. + * + * @param sample_fmt the sample format to inspect + * @return 1 if the sample format is planar, 0 if it is interleaved + */ +int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt); + +/** + * Get the required buffer size for the given audio parameters. + * + * @param[out] linesize calculated linesize, may be NULL + * @param nb_channels the number of channels + * @param nb_samples the number of samples in a single channel + * @param sample_fmt the sample format + * @return required buffer size, or negative error code on failure + */ +int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, + enum AVSampleFormat sample_fmt, int align); + +/** + * Fill channel data pointers and linesize for samples with sample + * format sample_fmt. + * + * The pointers array is filled with the pointers to the samples data: + * for planar, set the start point of each channel's data within the buffer, + * for packed, set the start point of the entire buffer only. + * + * The linesize array is filled with the aligned size of each channel's data + * buffer for planar layout, or the aligned size of the buffer for all channels + * for packed layout. + * + * @param[out] audio_data array to be filled with the pointer for each channel + * @param[out] linesize calculated linesize + * @param buf the pointer to a buffer containing the samples + * @param nb_channels the number of channels + * @param nb_samples the number of samples in a single channel + * @param sample_fmt the sample format + * @param align buffer size alignment (1 = no alignment required) + * @return 0 on success or a negative error code on failure + */ +int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, uint8_t *buf, + int nb_channels, int nb_samples, + enum AVSampleFormat sample_fmt, int align); + +/** + * Allocate a samples buffer for nb_samples samples, and fill data pointers and + * linesize accordingly. + * The allocated samples buffer can be freed by using av_freep(&audio_data[0]) + * + * @param[out] audio_data array to be filled with the pointer for each channel + * @param[out] linesize aligned size for audio buffer(s) + * @param nb_channels number of audio channels + * @param nb_samples number of samples per channel + * @param align buffer size alignment (1 = no alignment required) + * @return 0 on success or a negative error code on failure + * @see av_samples_fill_arrays() + */ +int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, + int nb_samples, enum AVSampleFormat sample_fmt, int align); + #endif /* AVUTIL_SAMPLEFMT_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/sha.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/sha.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/sha.c 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/sha.c 2012-01-11 00:34:30.000000000 +0000 @@ -42,7 +42,7 @@ #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ -#define blk0(i) (block[i] = av_be2ne32(((const uint32_t*)buffer)[i])) +#define blk0(i) (block[i] = AV_RB32(buffer + 4 * (i))) #define blk(i) (block[i] = rol(block[i-3] ^ block[i-8] ^ block[i-14] ^ block[i-16], 1)) #define R0(v,w,x,y,z,i) z += ((w&(x^y))^y) + blk0(i) + 0x5A827999 + rol(v, 5); w = rol(w, 30); @@ -67,7 +67,7 @@ for (i = 0; i < 80; i++) { int t; if (i < 16) - t = av_be2ne32(((uint32_t*)buffer)[i]); + t = AV_RB32(buffer + 4 * i); else t = rol(block[i-3] ^ block[i-8] ^ block[i-14] ^ block[i-16], 1); block[i] = t; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/sha.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/sha.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/sha.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/sha.h 2012-01-11 00:34:30.000000000 +0000 @@ -23,6 +23,12 @@ #include +/** + * @defgroup lavu_sha SHA + * @ingroup lavu_crypto + * @{ + */ + extern const int av_sha_size; struct AVSHA; @@ -53,4 +59,8 @@ */ void av_sha_final(struct AVSHA* context, uint8_t *digest); +/** + * @} + */ + #endif /* AVUTIL_SHA_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/timer.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/timer.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/timer.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/timer.h 2012-01-11 00:34:30.000000000 +0000 @@ -1,7 +1,4 @@ -/** - * @file - * high precision timer, useful to profile code - * +/* * copyright (c) 2006 Michael Niedermayer * * This file is part of Libav. @@ -21,11 +18,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * high precision timer, useful to profile code + */ + #ifndef AVUTIL_TIMER_H #define AVUTIL_TIMER_H #include #include + #include "config.h" #if ARCH_ARM @@ -43,29 +46,32 @@ #endif #ifdef AV_READ_TIME -#define START_TIMER \ -uint64_t tend;\ -uint64_t tstart= AV_READ_TIME();\ - -#define STOP_TIMER(id) \ -tend= AV_READ_TIME();\ -{\ - static uint64_t tsum=0;\ - static int tcount=0;\ - static int tskip_count=0;\ - if(tcount<2 || tend - tstart < 8*tsum/tcount || tend - tstart < 2000){\ - tsum+= tend - tstart;\ - tcount++;\ - }else\ - tskip_count++;\ - if(((tcount+tskip_count)&(tcount+tskip_count-1))==0){\ - av_log(NULL, AV_LOG_ERROR, "%"PRIu64" dezicycles in %s, %d runs, %d skips\n",\ - tsum*10/tcount, id, tcount, tskip_count);\ - }\ -} +#define START_TIMER \ + uint64_t tend; \ + uint64_t tstart = AV_READ_TIME(); \ + +#define STOP_TIMER(id) \ + tend = AV_READ_TIME(); \ + { \ + static uint64_t tsum = 0; \ + static int tcount = 0; \ + static int tskip_count = 0; \ + if (tcount < 2 || \ + tend - tstart < 8 * tsum / tcount || \ + tend - tstart < 2000) { \ + tsum+= tend - tstart; \ + tcount++; \ + } else \ + tskip_count++; \ + if (((tcount + tskip_count) & (tcount + tskip_count - 1)) == 0) { \ + av_log(NULL, AV_LOG_ERROR, \ + "%"PRIu64" decicycles in %s, %d runs, %d skips\n", \ + tsum * 10 / tcount, id, tcount, tskip_count); \ + } \ + } #else #define START_TIMER -#define STOP_TIMER(id) {} +#define STOP_TIMER(id) { } #endif #endif /* AVUTIL_TIMER_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/tree.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/tree.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/tree.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/tree.c 2012-01-11 00:34:30.000000000 +0000 @@ -21,22 +21,24 @@ #include "log.h" #include "tree.h" -typedef struct AVTreeNode{ +typedef struct AVTreeNode { struct AVTreeNode *child[2]; void *elem; int state; -}AVTreeNode; +} AVTreeNode; const int av_tree_node_size = sizeof(AVTreeNode); -void *av_tree_find(const AVTreeNode *t, void *key, int (*cmp)(void *key, const void *b), void *next[2]){ - if(t){ - unsigned int v= cmp(key, t->elem); - if(v){ - if(next) next[v>>31]= t->elem; - return av_tree_find(t->child[(v>>31)^1], key, cmp, next); - }else{ - if(next){ +void *av_tree_find(const AVTreeNode *t, void *key, + int (*cmp)(void *key, const void *b), void *next[2]) +{ + if (t) { + unsigned int v = cmp(key, t->elem); + if (v) { + if (next) next[v >> 31] = t->elem; + return av_tree_find(t->child[(v >> 31) ^ 1], key, cmp, next); + } else { + if (next) { av_tree_find(t->child[0], key, cmp, next); av_tree_find(t->child[1], key, cmp, next); } @@ -46,41 +48,43 @@ return NULL; } -void *av_tree_insert(AVTreeNode **tp, void *key, int (*cmp)(void *key, const void *b), AVTreeNode **next){ - AVTreeNode *t= *tp; - if(t){ - unsigned int v= cmp(t->elem, key); +void *av_tree_insert(AVTreeNode **tp, void *key, + int (*cmp)(void *key, const void *b), AVTreeNode **next) +{ + AVTreeNode *t = *tp; + if (t) { + unsigned int v = cmp(t->elem, key); void *ret; - if(!v){ - if(*next) + if (!v) { + if (*next) return t->elem; - else if(t->child[0]||t->child[1]){ - int i= !t->child[0]; + else if (t->child[0] || t->child[1]) { + int i = !t->child[0]; void *next_elem[2]; av_tree_find(t->child[i], key, cmp, next_elem); - key= t->elem= next_elem[i]; - v= -i; - }else{ - *next= t; - *tp=NULL; + key = t->elem = next_elem[i]; + v = -i; + } else { + *next = t; + *tp = NULL; return NULL; } } - ret= av_tree_insert(&t->child[v>>31], key, cmp, next); - if(!ret){ - int i= (v>>31) ^ !!*next; - AVTreeNode **child= &t->child[i]; - t->state += 2*i - 1; + ret = av_tree_insert(&t->child[v >> 31], key, cmp, next); + if (!ret) { + int i = (v >> 31) ^ !!*next; + AVTreeNode **child = &t->child[i]; + t->state += 2 * i - 1; - if(!(t->state&1)){ - if(t->state){ + if (!(t->state & 1)) { + if (t->state) { /* The following code is equivalent to if((*child)->state*2 == -t->state) rotate(child, i^1); rotate(tp, i); with rotate(): - static void rotate(AVTreeNode **tp, int i){ + static void rotate(AVTreeNode **tp, int i) { AVTreeNode *t= *tp; *tp= t->child[i]; @@ -92,54 +96,62 @@ } but such a rotate function is both bigger and slower */ - if((*child)->state*2 == -t->state){ - *tp= (*child)->child[i^1]; - (*child)->child[i^1]= (*tp)->child[i]; - (*tp)->child[i]= *child; - *child= (*tp)->child[i^1]; - (*tp)->child[i^1]= t; - - (*tp)->child[0]->state= -((*tp)->state>0); - (*tp)->child[1]->state= (*tp)->state<0 ; - (*tp)->state=0; - }else{ - *tp= *child; - *child= (*child)->child[i^1]; - (*tp)->child[i^1]= t; - if((*tp)->state) t->state = 0; - else t->state>>= 1; - (*tp)->state= -t->state; + if (( *child )->state * 2 == -t->state) { + *tp = (*child)->child[i ^ 1]; + (*child)->child[i ^ 1] = (*tp)->child[i]; + (*tp)->child[i] = *child; + *child = ( *tp )->child[i ^ 1]; + (*tp)->child[i ^ 1] = t; + + (*tp)->child[0]->state = -((*tp)->state > 0); + (*tp)->child[1]->state = (*tp)->state < 0; + (*tp)->state = 0; + } else { + *tp = *child; + *child = (*child)->child[i ^ 1]; + (*tp)->child[i ^ 1] = t; + if ((*tp)->state) t->state = 0; + else t->state >>= 1; + (*tp)->state = -t->state; } } } - if(!(*tp)->state ^ !!*next) + if (!(*tp)->state ^ !!*next) return key; } return ret; - }else{ - *tp= *next; *next= NULL; - if(*tp){ - (*tp)->elem= key; + } else { + *tp = *next; + *next = NULL; + if (*tp) { + (*tp)->elem = key; return NULL; - }else + } else return key; } } -void av_tree_destroy(AVTreeNode *t){ - if(t){ +void av_tree_destroy(AVTreeNode *t) +{ + if (t) { av_tree_destroy(t->child[0]); av_tree_destroy(t->child[1]); av_free(t); } } -void av_tree_enumerate(AVTreeNode *t, void *opaque, int (*cmp)(void *opaque, void *elem), int (*enu)(void *opaque, void *elem)){ - if(t){ - int v= cmp ? cmp(opaque, t->elem) : 0; - if(v>=0) av_tree_enumerate(t->child[0], opaque, cmp, enu); - if(v==0) enu(opaque, t->elem); - if(v<=0) av_tree_enumerate(t->child[1], opaque, cmp, enu); +void av_tree_enumerate(AVTreeNode *t, void *opaque, + int (*cmp)(void *opaque, void *elem), + int (*enu)(void *opaque, void *elem)) +{ + if (t) { + int v = cmp ? cmp(opaque, t->elem) : 0; + if (v >= 0) + av_tree_enumerate(t->child[0], opaque, cmp, enu); + if (v == 0) + enu(opaque, t->elem); + if (v <= 0) + av_tree_enumerate(t->child[1], opaque, cmp, enu); } } @@ -147,64 +159,68 @@ #include "lfg.h" -static int check(AVTreeNode *t){ - if(t){ - int left= check(t->child[0]); - int right= check(t->child[1]); +static int check(AVTreeNode *t) +{ + if (t) { + int left = check(t->child[0]); + int right = check(t->child[1]); - if(left>999 || right>999) + if (left>999 || right>999) return 1000; - if(right - left != t->state) + if (right - left != t->state) return 1000; - if(t->state>1 || t->state<-1) + if (t->state>1 || t->state<-1) return 1000; - return FFMAX(left, right)+1; + return FFMAX(left, right) + 1; } return 0; } -static void print(AVTreeNode *t, int depth){ +static void print(AVTreeNode *t, int depth) +{ int i; - for(i=0; istate, t->elem); - print(t->child[0], depth+1); - print(t->child[1], depth+1); - }else + print(t->child[0], depth + 1); + print(t->child[1], depth + 1); + } else av_log(NULL, AV_LOG_ERROR, "NULL\n"); } -static int cmp(void *a, const void *b){ - return (uint8_t*)a-(const uint8_t*)b; +static int cmp(void *a, const void *b) +{ + return (uint8_t *) a - (const uint8_t *) b; } -int main(void){ +int main (void) +{ int i; void *k; - AVTreeNode *root= NULL, *node=NULL; + AVTreeNode *root = NULL, *node = NULL; AVLFG prng; av_lfg_init(&prng, 1); - for(i=0; i<10000; i++){ + for (i = 0; i < 10000; i++) { int j = av_lfg_get(&prng) % 86294; - if(check(root) > 999){ + if (check(root) > 999) { av_log(NULL, AV_LOG_ERROR, "FATAL error %d\n", i); print(root, 0); return -1; } av_log(NULL, AV_LOG_ERROR, "inserting %4d\n", j); - if(!node) - node= av_mallocz(av_tree_node_size); - av_tree_insert(&root, (void*)(j+1), cmp, &node); + if (!node) + node = av_mallocz(av_tree_node_size); + av_tree_insert(&root, (void *) (j + 1), cmp, &node); j = av_lfg_get(&prng) % 86294; { - AVTreeNode *node2=NULL; + AVTreeNode *node2 = NULL; av_log(NULL, AV_LOG_ERROR, "removing %4d\n", j); - av_tree_insert(&root, (void*)(j+1), cmp, &node2); - k= av_tree_find(root, (void*)(j+1), cmp, NULL); - if(k) + av_tree_insert(&root, (void *) (j + 1), cmp, &node2); + k = av_tree_find(root, (void *) (j + 1), cmp, NULL); + if (k) av_log(NULL, AV_LOG_ERROR, "removal failure %d\n", i); } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/tree.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/tree.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/tree.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/tree.h 2012-01-11 00:34:30.000000000 +0000 @@ -21,14 +21,24 @@ /** * @file * A tree container. - * Insertion, removal, finding equal, largest which is smaller than and - * smallest which is larger than, all have O(log n) worst case complexity. * @author Michael Niedermayer */ #ifndef AVUTIL_TREE_H #define AVUTIL_TREE_H +/** + * @addtogroup lavu_tree AVTree + * @ingroup lavu_data + * + * Low complexity tree container + * + * Insertion, removal, finding equal, largest which is smaller than and + * smallest which is larger than, all have O(log n) worst case complexity. + * @{ + */ + + struct AVTreeNode; extern const int av_tree_node_size; @@ -91,5 +101,8 @@ */ void av_tree_enumerate(struct AVTreeNode *t, void *opaque, int (*cmp)(void *opaque, void *elem), int (*enu)(void *opaque, void *elem)); +/** + * @} + */ #endif /* AVUTIL_TREE_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/x86/bswap.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/x86/bswap.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/x86/bswap.h 2011-04-23 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/x86/bswap.h 2012-01-11 00:34:30.000000000 +0000 @@ -28,24 +28,20 @@ #include "config.h" #include "libavutil/attributes.h" +#if !AV_GCC_VERSION_AT_LEAST(4,1) #define av_bswap16 av_bswap16 static av_always_inline av_const unsigned av_bswap16(unsigned x) { __asm__("rorw $8, %w0" : "+r"(x)); return x; } +#endif /* !AV_GCC_VERSION_AT_LEAST(4,1) */ +#if !AV_GCC_VERSION_AT_LEAST(4,5) #define av_bswap32 av_bswap32 static av_always_inline av_const uint32_t av_bswap32(uint32_t x) { -#if HAVE_BSWAP __asm__("bswap %0" : "+r" (x)); -#else - __asm__("rorw $8, %w0 \n\t" - "rorl $16, %0 \n\t" - "rorw $8, %w0" - : "+r"(x)); -#endif return x; } @@ -57,5 +53,6 @@ return x; } #endif +#endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */ #endif /* AVUTIL_X86_BSWAP_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/x86/cpu.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/x86/cpu.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/x86/cpu.c 2011-03-23 03:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/x86/cpu.c 2012-01-11 00:34:30.000000000 +0000 @@ -74,7 +74,10 @@ return 0; /* CPUID not supported */ #endif - cpuid(0, max_std_level, vendor.i[0], vendor.i[2], vendor.i[1]); + cpuid(0, max_std_level, ebx, ecx, edx); + vendor.i[0] = ebx; + vendor.i[1] = edx; + vendor.i[2] = ecx; if(max_std_level >= 1){ cpuid(1, eax, ebx, ecx, std_caps); @@ -113,7 +116,7 @@ if(max_ext_level >= 0x80000001){ cpuid(0x80000001, eax, ebx, ecx, ext_caps); - if (ext_caps & (1<<31)) + if (ext_caps & (1U<<31)) rval |= AV_CPU_FLAG_3DNOW; if (ext_caps & (1<<30)) rval |= AV_CPU_FLAG_3DNOWEXT; @@ -133,6 +136,15 @@ rval & AV_CPU_FLAG_SSE2 && !(ecx & 0x00000040)) { rval |= AV_CPU_FLAG_SSE2SLOW; } + + /* XOP and FMA4 use the AVX instruction coding scheme, so they can't be + * used unless the OS has AVX support. */ + if (rval & AV_CPU_FLAG_AVX) { + if (ecx & 0x00000800) + rval |= AV_CPU_FLAG_XOP; + if (ecx & 0x00010000) + rval |= AV_CPU_FLAG_FMA4; + } } if (!strncmp(vendor.c, "GenuineIntel", 12)) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/x86/x86inc.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/x86/x86inc.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/x86/x86inc.asm 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/x86/x86inc.asm 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,1069 @@ +;***************************************************************************** +;* x86inc.asm: x264asm abstraction layer +;***************************************************************************** +;* Copyright (C) 2005-2011 x264 project +;* +;* Authors: Loren Merritt +;* Anton Mitrofanov +;* Jason Garrett-Glaser +;* +;* Permission to use, copy, modify, and/or distribute this software for any +;* purpose with or without fee is hereby granted, provided that the above +;* copyright notice and this permission notice appear in all copies. +;* +;* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +;* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +;* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +;* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +;* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +;* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +;* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +;***************************************************************************** + +; This is a header file for the x264ASM assembly language, which uses +; NASM/YASM syntax combined with a large number of macros to provide easy +; abstraction between different calling conventions (x86_32, win64, linux64). +; It also has various other useful features to simplify writing the kind of +; DSP functions that are most often used in x264. + +; Unlike the rest of x264, this file is available under an ISC license, as it +; has significant usefulness outside of x264 and we want it to be available +; to the largest audience possible. Of course, if you modify it for your own +; purposes to add a new feature, we strongly encourage contributing a patch +; as this feature might be useful for others as well. Send patches or ideas +; to x264-devel@videolan.org . + +%define program_name ff + +%ifdef ARCH_X86_64 + %ifidn __OUTPUT_FORMAT__,win32 + %define WIN64 + %else + %define UNIX64 + %endif +%endif + +%ifdef PREFIX + %define mangle(x) _ %+ x +%else + %define mangle(x) x +%endif + +; FIXME: All of the 64bit asm functions that take a stride as an argument +; via register, assume that the high dword of that register is filled with 0. +; This is true in practice (since we never do any 64bit arithmetic on strides, +; and x264's strides are all positive), but is not guaranteed by the ABI. + +; Name of the .rodata section. +; Kludge: Something on OS X fails to align .rodata even given an align attribute, +; so use a different read-only section. +%macro SECTION_RODATA 0-1 16 + %ifidn __OUTPUT_FORMAT__,macho64 + SECTION .text align=%1 + %elifidn __OUTPUT_FORMAT__,macho + SECTION .text align=%1 + fakegot: + %elifidn __OUTPUT_FORMAT__,aout + section .text + %else + SECTION .rodata align=%1 + %endif +%endmacro + +; aout does not support align= +%macro SECTION_TEXT 0-1 16 + %ifidn __OUTPUT_FORMAT__,aout + SECTION .text + %else + SECTION .text align=%1 + %endif +%endmacro + +%ifdef WIN64 + %define PIC +%elifndef ARCH_X86_64 +; x86_32 doesn't require PIC. +; Some distros prefer shared objects to be PIC, but nothing breaks if +; the code contains a few textrels, so we'll skip that complexity. + %undef PIC +%endif +%ifdef PIC + default rel +%endif + +; Macros to eliminate most code duplication between x86_32 and x86_64: +; Currently this works only for leaf functions which load all their arguments +; into registers at the start, and make no other use of the stack. Luckily that +; covers most of x264's asm. + +; PROLOGUE: +; %1 = number of arguments. loads them from stack if needed. +; %2 = number of registers used. pushes callee-saved regs if needed. +; %3 = number of xmm registers used. pushes callee-saved xmm regs if needed. +; %4 = list of names to define to registers +; PROLOGUE can also be invoked by adding the same options to cglobal + +; e.g. +; cglobal foo, 2,3,0, dst, src, tmp +; declares a function (foo), taking two args (dst and src) and one local variable (tmp) + +; TODO Some functions can use some args directly from the stack. If they're the +; last args then you can just not declare them, but if they're in the middle +; we need more flexible macro. + +; RET: +; Pops anything that was pushed by PROLOGUE, and returns. + +; REP_RET: +; Same, but if it doesn't pop anything it becomes a 2-byte ret, for athlons +; which are slow when a normal ret follows a branch. + +; registers: +; rN and rNq are the native-size register holding function argument N +; rNd, rNw, rNb are dword, word, and byte size +; rNm is the original location of arg N (a register or on the stack), dword +; rNmp is native size + +%macro DECLARE_REG 6 + %define r%1q %2 + %define r%1d %3 + %define r%1w %4 + %define r%1b %5 + %define r%1m %6 + %ifid %6 ; i.e. it's a register + %define r%1mp %2 + %elifdef ARCH_X86_64 ; memory + %define r%1mp qword %6 + %else + %define r%1mp dword %6 + %endif + %define r%1 %2 +%endmacro + +%macro DECLARE_REG_SIZE 2 + %define r%1q r%1 + %define e%1q r%1 + %define r%1d e%1 + %define e%1d e%1 + %define r%1w %1 + %define e%1w %1 + %define r%1b %2 + %define e%1b %2 +%ifndef ARCH_X86_64 + %define r%1 e%1 +%endif +%endmacro + +DECLARE_REG_SIZE ax, al +DECLARE_REG_SIZE bx, bl +DECLARE_REG_SIZE cx, cl +DECLARE_REG_SIZE dx, dl +DECLARE_REG_SIZE si, sil +DECLARE_REG_SIZE di, dil +DECLARE_REG_SIZE bp, bpl + +; t# defines for when per-arch register allocation is more complex than just function arguments + +%macro DECLARE_REG_TMP 1-* + %assign %%i 0 + %rep %0 + CAT_XDEFINE t, %%i, r%1 + %assign %%i %%i+1 + %rotate 1 + %endrep +%endmacro + +%macro DECLARE_REG_TMP_SIZE 0-* + %rep %0 + %define t%1q t%1 %+ q + %define t%1d t%1 %+ d + %define t%1w t%1 %+ w + %define t%1b t%1 %+ b + %rotate 1 + %endrep +%endmacro + +DECLARE_REG_TMP_SIZE 0,1,2,3,4,5,6,7,8,9 + +%ifdef ARCH_X86_64 + %define gprsize 8 +%else + %define gprsize 4 +%endif + +%macro PUSH 1 + push %1 + %assign stack_offset stack_offset+gprsize +%endmacro + +%macro POP 1 + pop %1 + %assign stack_offset stack_offset-gprsize +%endmacro + +%macro SUB 2 + sub %1, %2 + %ifidn %1, rsp + %assign stack_offset stack_offset+(%2) + %endif +%endmacro + +%macro ADD 2 + add %1, %2 + %ifidn %1, rsp + %assign stack_offset stack_offset-(%2) + %endif +%endmacro + +%macro movifnidn 2 + %ifnidn %1, %2 + mov %1, %2 + %endif +%endmacro + +%macro movsxdifnidn 2 + %ifnidn %1, %2 + movsxd %1, %2 + %endif +%endmacro + +%macro ASSERT 1 + %if (%1) == 0 + %error assert failed + %endif +%endmacro + +%macro DEFINE_ARGS 0-* + %ifdef n_arg_names + %assign %%i 0 + %rep n_arg_names + CAT_UNDEF arg_name %+ %%i, q + CAT_UNDEF arg_name %+ %%i, d + CAT_UNDEF arg_name %+ %%i, w + CAT_UNDEF arg_name %+ %%i, b + CAT_UNDEF arg_name %+ %%i, m + CAT_UNDEF arg_name, %%i + %assign %%i %%i+1 + %endrep + %endif + + %assign %%i 0 + %rep %0 + %xdefine %1q r %+ %%i %+ q + %xdefine %1d r %+ %%i %+ d + %xdefine %1w r %+ %%i %+ w + %xdefine %1b r %+ %%i %+ b + %xdefine %1m r %+ %%i %+ m + CAT_XDEFINE arg_name, %%i, %1 + %assign %%i %%i+1 + %rotate 1 + %endrep + %assign n_arg_names %%i +%endmacro + +%ifdef WIN64 ; Windows x64 ;================================================= + +DECLARE_REG 0, rcx, ecx, cx, cl, ecx +DECLARE_REG 1, rdx, edx, dx, dl, edx +DECLARE_REG 2, r8, r8d, r8w, r8b, r8d +DECLARE_REG 3, r9, r9d, r9w, r9b, r9d +DECLARE_REG 4, rdi, edi, di, dil, [rsp + stack_offset + 40] +DECLARE_REG 5, rsi, esi, si, sil, [rsp + stack_offset + 48] +DECLARE_REG 6, rax, eax, ax, al, [rsp + stack_offset + 56] +%define r7m [rsp + stack_offset + 64] +%define r8m [rsp + stack_offset + 72] + +%macro LOAD_IF_USED 2 ; reg_id, number_of_args + %if %1 < %2 + mov r%1, [rsp + stack_offset + 8 + %1*8] + %endif +%endmacro + +%macro PROLOGUE 2-4+ 0 ; #args, #regs, #xmm_regs, arg_names... + ASSERT %2 >= %1 + %assign regs_used %2 + ASSERT regs_used <= 7 + %if regs_used > 4 + push r4 + push r5 + %assign stack_offset stack_offset+16 + %endif + WIN64_SPILL_XMM %3 + LOAD_IF_USED 4, %1 + LOAD_IF_USED 5, %1 + LOAD_IF_USED 6, %1 + DEFINE_ARGS %4 +%endmacro + +%macro WIN64_SPILL_XMM 1 + %assign xmm_regs_used %1 + %if mmsize == 8 + %assign xmm_regs_used 0 + %endif + ASSERT xmm_regs_used <= 16 + %if xmm_regs_used > 6 + sub rsp, (xmm_regs_used-6)*16+16 + %assign stack_offset stack_offset+(xmm_regs_used-6)*16+16 + %assign %%i xmm_regs_used + %rep (xmm_regs_used-6) + %assign %%i %%i-1 + movdqa [rsp + (%%i-6)*16+8], xmm %+ %%i + %endrep + %endif +%endmacro + +%macro WIN64_RESTORE_XMM_INTERNAL 1 + %if xmm_regs_used > 6 + %assign %%i xmm_regs_used + %rep (xmm_regs_used-6) + %assign %%i %%i-1 + movdqa xmm %+ %%i, [%1 + (%%i-6)*16+8] + %endrep + add %1, (xmm_regs_used-6)*16+16 + %endif +%endmacro + +%macro WIN64_RESTORE_XMM 1 + WIN64_RESTORE_XMM_INTERNAL %1 + %assign stack_offset stack_offset-(xmm_regs_used-6)*16+16 + %assign xmm_regs_used 0 +%endmacro + +%macro RET 0 + WIN64_RESTORE_XMM_INTERNAL rsp + %if regs_used > 4 + pop r5 + pop r4 + %endif + ret +%endmacro + +%macro REP_RET 0 + %if regs_used > 4 || xmm_regs_used > 6 + RET + %else + rep ret + %endif +%endmacro + +%elifdef ARCH_X86_64 ; *nix x64 ;============================================= + +DECLARE_REG 0, rdi, edi, di, dil, edi +DECLARE_REG 1, rsi, esi, si, sil, esi +DECLARE_REG 2, rdx, edx, dx, dl, edx +DECLARE_REG 3, rcx, ecx, cx, cl, ecx +DECLARE_REG 4, r8, r8d, r8w, r8b, r8d +DECLARE_REG 5, r9, r9d, r9w, r9b, r9d +DECLARE_REG 6, rax, eax, ax, al, [rsp + stack_offset + 8] +%define r7m [rsp + stack_offset + 16] +%define r8m [rsp + stack_offset + 24] + +%macro LOAD_IF_USED 2 ; reg_id, number_of_args + %if %1 < %2 + mov r%1, [rsp - 40 + %1*8] + %endif +%endmacro + +%macro PROLOGUE 2-4+ ; #args, #regs, #xmm_regs, arg_names... + ASSERT %2 >= %1 + ASSERT %2 <= 7 + LOAD_IF_USED 6, %1 + DEFINE_ARGS %4 +%endmacro + +%macro RET 0 + ret +%endmacro + +%macro REP_RET 0 + rep ret +%endmacro + +%else ; X86_32 ;============================================================== + +DECLARE_REG 0, eax, eax, ax, al, [esp + stack_offset + 4] +DECLARE_REG 1, ecx, ecx, cx, cl, [esp + stack_offset + 8] +DECLARE_REG 2, edx, edx, dx, dl, [esp + stack_offset + 12] +DECLARE_REG 3, ebx, ebx, bx, bl, [esp + stack_offset + 16] +DECLARE_REG 4, esi, esi, si, null, [esp + stack_offset + 20] +DECLARE_REG 5, edi, edi, di, null, [esp + stack_offset + 24] +DECLARE_REG 6, ebp, ebp, bp, null, [esp + stack_offset + 28] +%define r7m [esp + stack_offset + 32] +%define r8m [esp + stack_offset + 36] +%define rsp esp + +%macro PUSH_IF_USED 1 ; reg_id + %if %1 < regs_used + push r%1 + %assign stack_offset stack_offset+4 + %endif +%endmacro + +%macro POP_IF_USED 1 ; reg_id + %if %1 < regs_used + pop r%1 + %endif +%endmacro + +%macro LOAD_IF_USED 2 ; reg_id, number_of_args + %if %1 < %2 + mov r%1, [esp + stack_offset + 4 + %1*4] + %endif +%endmacro + +%macro PROLOGUE 2-4+ ; #args, #regs, #xmm_regs, arg_names... + ASSERT %2 >= %1 + %assign regs_used %2 + ASSERT regs_used <= 7 + PUSH_IF_USED 3 + PUSH_IF_USED 4 + PUSH_IF_USED 5 + PUSH_IF_USED 6 + LOAD_IF_USED 0, %1 + LOAD_IF_USED 1, %1 + LOAD_IF_USED 2, %1 + LOAD_IF_USED 3, %1 + LOAD_IF_USED 4, %1 + LOAD_IF_USED 5, %1 + LOAD_IF_USED 6, %1 + DEFINE_ARGS %4 +%endmacro + +%macro RET 0 + POP_IF_USED 6 + POP_IF_USED 5 + POP_IF_USED 4 + POP_IF_USED 3 + ret +%endmacro + +%macro REP_RET 0 + %if regs_used > 3 + RET + %else + rep ret + %endif +%endmacro + +%endif ;====================================================================== + +%ifndef WIN64 +%macro WIN64_SPILL_XMM 1 +%endmacro +%macro WIN64_RESTORE_XMM 1 +%endmacro +%endif + + + +;============================================================================= +; arch-independent part +;============================================================================= + +%assign function_align 16 + +; Begin a function. +; Applies any symbol mangling needed for C linkage, and sets up a define such that +; subsequent uses of the function name automatically refer to the mangled version. +; Appends cpuflags to the function name if cpuflags has been specified. +%macro cglobal 1-2+ ; name, [PROLOGUE args] +%if %0 == 1 + cglobal_internal %1 %+ SUFFIX +%else + cglobal_internal %1 %+ SUFFIX, %2 +%endif +%endmacro +%macro cglobal_internal 1-2+ + %ifndef cglobaled_%1 + %xdefine %1 mangle(program_name %+ _ %+ %1) + %xdefine %1.skip_prologue %1 %+ .skip_prologue + CAT_XDEFINE cglobaled_, %1, 1 + %endif + %xdefine current_function %1 + %ifidn __OUTPUT_FORMAT__,elf + global %1:function hidden + %else + global %1 + %endif + align function_align + %1: + RESET_MM_PERMUTATION ; not really needed, but makes disassembly somewhat nicer + %assign stack_offset 0 + %if %0 > 1 + PROLOGUE %2 + %endif +%endmacro + +%macro cextern 1 + %xdefine %1 mangle(program_name %+ _ %+ %1) + CAT_XDEFINE cglobaled_, %1, 1 + extern %1 +%endmacro + +; like cextern, but without the prefix +%macro cextern_naked 1 + %xdefine %1 mangle(%1) + CAT_XDEFINE cglobaled_, %1, 1 + extern %1 +%endmacro + +%macro const 2+ + %xdefine %1 mangle(program_name %+ _ %+ %1) + global %1 + %1: %2 +%endmacro + +; This is needed for ELF, otherwise the GNU linker assumes the stack is +; executable by default. +%ifidn __OUTPUT_FORMAT__,elf +SECTION .note.GNU-stack noalloc noexec nowrite progbits +%endif + +; cpuflags + +%assign cpuflags_mmx (1<<0) +%assign cpuflags_mmx2 (1<<1) | cpuflags_mmx +%assign cpuflags_3dnow (1<<2) | cpuflags_mmx +%assign cpuflags_3dnow2 (1<<3) | cpuflags_3dnow +%assign cpuflags_sse (1<<4) | cpuflags_mmx2 +%assign cpuflags_sse2 (1<<5) | cpuflags_sse +%assign cpuflags_sse2slow (1<<6) | cpuflags_sse2 +%assign cpuflags_sse3 (1<<7) | cpuflags_sse2 +%assign cpuflags_ssse3 (1<<8) | cpuflags_sse3 +%assign cpuflags_sse4 (1<<9) | cpuflags_ssse3 +%assign cpuflags_sse42 (1<<10)| cpuflags_sse4 +%assign cpuflags_avx (1<<11)| cpuflags_sse42 +%assign cpuflags_xop (1<<12)| cpuflags_avx +%assign cpuflags_fma4 (1<<13)| cpuflags_avx + +%assign cpuflags_cache32 (1<<16) +%assign cpuflags_cache64 (1<<17) +%assign cpuflags_slowctz (1<<18) +%assign cpuflags_lzcnt (1<<19) +%assign cpuflags_misalign (1<<20) +%assign cpuflags_aligned (1<<21) ; not a cpu feature, but a function variant +%assign cpuflags_atom (1<<22) + +%define cpuflag(x) ((cpuflags & (cpuflags_ %+ x)) == (cpuflags_ %+ x)) +%define notcpuflag(x) ((cpuflags & (cpuflags_ %+ x)) != (cpuflags_ %+ x)) + +; Takes up to 2 cpuflags from the above list. +; All subsequent functions (up to the next INIT_CPUFLAGS) is built for the specified cpu. +; You shouldn't need to invoke this macro directly, it's a subroutine for INIT_MMX &co. +%macro INIT_CPUFLAGS 0-2 + %if %0 >= 1 + %xdefine cpuname %1 + %assign cpuflags cpuflags_%1 + %if %0 >= 2 + %xdefine cpuname %1_%2 + %assign cpuflags cpuflags | cpuflags_%2 + %endif + %xdefine SUFFIX _ %+ cpuname + %if cpuflag(avx) + %assign avx_enabled 1 + %endif + %if mmsize == 16 && notcpuflag(sse2) + %define mova movaps + %define movu movups + %define movnta movntps + %endif + %if cpuflag(aligned) + %define movu mova + %elifidn %1, sse3 + %define movu lddqu + %endif + %else + %xdefine SUFFIX + %undef cpuname + %undef cpuflags + %endif +%endmacro + +; merge mmx and sse* + +%macro CAT_XDEFINE 3 + %xdefine %1%2 %3 +%endmacro + +%macro CAT_UNDEF 2 + %undef %1%2 +%endmacro + +%macro INIT_MMX 0-1+ + %assign avx_enabled 0 + %define RESET_MM_PERMUTATION INIT_MMX %1 + %define mmsize 8 + %define num_mmregs 8 + %define mova movq + %define movu movq + %define movh movd + %define movnta movntq + %assign %%i 0 + %rep 8 + CAT_XDEFINE m, %%i, mm %+ %%i + CAT_XDEFINE nmm, %%i, %%i + %assign %%i %%i+1 + %endrep + %rep 8 + CAT_UNDEF m, %%i + CAT_UNDEF nmm, %%i + %assign %%i %%i+1 + %endrep + INIT_CPUFLAGS %1 +%endmacro + +%macro INIT_XMM 0-1+ + %assign avx_enabled 0 + %define RESET_MM_PERMUTATION INIT_XMM %1 + %define mmsize 16 + %define num_mmregs 8 + %ifdef ARCH_X86_64 + %define num_mmregs 16 + %endif + %define mova movdqa + %define movu movdqu + %define movh movq + %define movnta movntdq + %assign %%i 0 + %rep num_mmregs + CAT_XDEFINE m, %%i, xmm %+ %%i + CAT_XDEFINE nxmm, %%i, %%i + %assign %%i %%i+1 + %endrep + INIT_CPUFLAGS %1 +%endmacro + +; FIXME: INIT_AVX can be replaced by INIT_XMM avx +%macro INIT_AVX 0 + INIT_XMM + %assign avx_enabled 1 + %define PALIGNR PALIGNR_SSSE3 + %define RESET_MM_PERMUTATION INIT_AVX +%endmacro + +%macro INIT_YMM 0-1+ + %assign avx_enabled 1 + %define RESET_MM_PERMUTATION INIT_YMM %1 + %define mmsize 32 + %define num_mmregs 8 + %ifdef ARCH_X86_64 + %define num_mmregs 16 + %endif + %define mova vmovaps + %define movu vmovups + %undef movh + %define movnta vmovntps + %assign %%i 0 + %rep num_mmregs + CAT_XDEFINE m, %%i, ymm %+ %%i + CAT_XDEFINE nymm, %%i, %%i + %assign %%i %%i+1 + %endrep + INIT_CPUFLAGS %1 +%endmacro + +INIT_XMM + +; I often want to use macros that permute their arguments. e.g. there's no +; efficient way to implement butterfly or transpose or dct without swapping some +; arguments. +; +; I would like to not have to manually keep track of the permutations: +; If I insert a permutation in the middle of a function, it should automatically +; change everything that follows. For more complex macros I may also have multiple +; implementations, e.g. the SSE2 and SSSE3 versions may have different permutations. +; +; Hence these macros. Insert a PERMUTE or some SWAPs at the end of a macro that +; permutes its arguments. It's equivalent to exchanging the contents of the +; registers, except that this way you exchange the register names instead, so it +; doesn't cost any cycles. + +%macro PERMUTE 2-* ; takes a list of pairs to swap +%rep %0/2 + %xdefine tmp%2 m%2 + %xdefine ntmp%2 nm%2 + %rotate 2 +%endrep +%rep %0/2 + %xdefine m%1 tmp%2 + %xdefine nm%1 ntmp%2 + %undef tmp%2 + %undef ntmp%2 + %rotate 2 +%endrep +%endmacro + +%macro SWAP 2-* ; swaps a single chain (sometimes more concise than pairs) +%rep %0-1 +%ifdef m%1 + %xdefine tmp m%1 + %xdefine m%1 m%2 + %xdefine m%2 tmp + CAT_XDEFINE n, m%1, %1 + CAT_XDEFINE n, m%2, %2 +%else + ; If we were called as "SWAP m0,m1" rather than "SWAP 0,1" infer the original numbers here. + ; Be careful using this mode in nested macros though, as in some cases there may be + ; other copies of m# that have already been dereferenced and don't get updated correctly. + %xdefine %%n1 n %+ %1 + %xdefine %%n2 n %+ %2 + %xdefine tmp m %+ %%n1 + CAT_XDEFINE m, %%n1, m %+ %%n2 + CAT_XDEFINE m, %%n2, tmp + CAT_XDEFINE n, m %+ %%n1, %%n1 + CAT_XDEFINE n, m %+ %%n2, %%n2 +%endif + %undef tmp + %rotate 1 +%endrep +%endmacro + +; If SAVE_MM_PERMUTATION is placed at the end of a function, then any later +; calls to that function will automatically load the permutation, so values can +; be returned in mmregs. +%macro SAVE_MM_PERMUTATION 0-1 + %if %0 + %xdefine %%f %1_m + %else + %xdefine %%f current_function %+ _m + %endif + %assign %%i 0 + %rep num_mmregs + CAT_XDEFINE %%f, %%i, m %+ %%i + %assign %%i %%i+1 + %endrep +%endmacro + +%macro LOAD_MM_PERMUTATION 1 ; name to load from + %ifdef %1_m0 + %assign %%i 0 + %rep num_mmregs + CAT_XDEFINE m, %%i, %1_m %+ %%i + CAT_XDEFINE n, m %+ %%i, %%i + %assign %%i %%i+1 + %endrep + %endif +%endmacro + +; Append cpuflags to the callee's name iff the appended name is known and the plain name isn't +%macro call 1 + call_internal %1, %1 %+ SUFFIX +%endmacro +%macro call_internal 2 + %xdefine %%i %1 + %ifndef cglobaled_%1 + %ifdef cglobaled_%2 + %xdefine %%i %2 + %endif + %endif + call %%i + LOAD_MM_PERMUTATION %%i +%endmacro + +; Substitutions that reduce instruction size but are functionally equivalent +%macro add 2 + %ifnum %2 + %if %2==128 + sub %1, -128 + %else + add %1, %2 + %endif + %else + add %1, %2 + %endif +%endmacro + +%macro sub 2 + %ifnum %2 + %if %2==128 + add %1, -128 + %else + sub %1, %2 + %endif + %else + sub %1, %2 + %endif +%endmacro + +;============================================================================= +; AVX abstraction layer +;============================================================================= + +%assign i 0 +%rep 16 + %if i < 8 + CAT_XDEFINE sizeofmm, i, 8 + %endif + CAT_XDEFINE sizeofxmm, i, 16 + CAT_XDEFINE sizeofymm, i, 32 +%assign i i+1 +%endrep +%undef i + +;%1 == instruction +;%2 == 1 if float, 0 if int +;%3 == 1 if 4-operand (xmm, xmm, xmm, imm), 0 if 3-operand (xmm, xmm, xmm) +;%4 == number of operands given +;%5+: operands +%macro RUN_AVX_INSTR 6-7+ + %ifid %5 + %define %%size sizeof%5 + %else + %define %%size mmsize + %endif + %if %%size==32 + v%1 %5, %6, %7 + %else + %if %%size==8 + %define %%regmov movq + %elif %2 + %define %%regmov movaps + %else + %define %%regmov movdqa + %endif + + %if %4>=3+%3 + %ifnidn %5, %6 + %if avx_enabled && sizeof%5==16 + v%1 %5, %6, %7 + %else + %%regmov %5, %6 + %1 %5, %7 + %endif + %else + %1 %5, %7 + %endif + %elif %3 + %1 %5, %6, %7 + %else + %1 %5, %6 + %endif + %endif +%endmacro + +; 3arg AVX ops with a memory arg can only have it in src2, +; whereas SSE emulation of 3arg prefers to have it in src1 (i.e. the mov). +; So, if the op is symmetric and the wrong one is memory, swap them. +%macro RUN_AVX_INSTR1 8 + %assign %%swap 0 + %if avx_enabled + %ifnid %6 + %assign %%swap 1 + %endif + %elifnidn %5, %6 + %ifnid %7 + %assign %%swap 1 + %endif + %endif + %if %%swap && %3 == 0 && %8 == 1 + RUN_AVX_INSTR %1, %2, %3, %4, %5, %7, %6 + %else + RUN_AVX_INSTR %1, %2, %3, %4, %5, %6, %7 + %endif +%endmacro + +;%1 == instruction +;%2 == 1 if float, 0 if int +;%3 == 1 if 4-operand (xmm, xmm, xmm, imm), 0 if 3-operand (xmm, xmm, xmm) +;%4 == 1 if symmetric (i.e. doesn't matter which src arg is which), 0 if not +%macro AVX_INSTR 4 + %macro %1 2-9 fnord, fnord, fnord, %1, %2, %3, %4 + %ifidn %3, fnord + RUN_AVX_INSTR %6, %7, %8, 2, %1, %2 + %elifidn %4, fnord + RUN_AVX_INSTR1 %6, %7, %8, 3, %1, %2, %3, %9 + %elifidn %5, fnord + RUN_AVX_INSTR %6, %7, %8, 4, %1, %2, %3, %4 + %else + RUN_AVX_INSTR %6, %7, %8, 5, %1, %2, %3, %4, %5 + %endif + %endmacro +%endmacro + +AVX_INSTR addpd, 1, 0, 1 +AVX_INSTR addps, 1, 0, 1 +AVX_INSTR addsd, 1, 0, 1 +AVX_INSTR addss, 1, 0, 1 +AVX_INSTR addsubpd, 1, 0, 0 +AVX_INSTR addsubps, 1, 0, 0 +AVX_INSTR andpd, 1, 0, 1 +AVX_INSTR andps, 1, 0, 1 +AVX_INSTR andnpd, 1, 0, 0 +AVX_INSTR andnps, 1, 0, 0 +AVX_INSTR blendpd, 1, 0, 0 +AVX_INSTR blendps, 1, 0, 0 +AVX_INSTR blendvpd, 1, 0, 0 +AVX_INSTR blendvps, 1, 0, 0 +AVX_INSTR cmppd, 1, 0, 0 +AVX_INSTR cmpps, 1, 0, 0 +AVX_INSTR cmpsd, 1, 0, 0 +AVX_INSTR cmpss, 1, 0, 0 +AVX_INSTR divpd, 1, 0, 0 +AVX_INSTR divps, 1, 0, 0 +AVX_INSTR divsd, 1, 0, 0 +AVX_INSTR divss, 1, 0, 0 +AVX_INSTR dppd, 1, 1, 0 +AVX_INSTR dpps, 1, 1, 0 +AVX_INSTR haddpd, 1, 0, 0 +AVX_INSTR haddps, 1, 0, 0 +AVX_INSTR hsubpd, 1, 0, 0 +AVX_INSTR hsubps, 1, 0, 0 +AVX_INSTR maxpd, 1, 0, 1 +AVX_INSTR maxps, 1, 0, 1 +AVX_INSTR maxsd, 1, 0, 1 +AVX_INSTR maxss, 1, 0, 1 +AVX_INSTR minpd, 1, 0, 1 +AVX_INSTR minps, 1, 0, 1 +AVX_INSTR minsd, 1, 0, 1 +AVX_INSTR minss, 1, 0, 1 +AVX_INSTR movhlps, 1, 0, 0 +AVX_INSTR movlhps, 1, 0, 0 +AVX_INSTR movsd, 1, 0, 0 +AVX_INSTR movss, 1, 0, 0 +AVX_INSTR mpsadbw, 0, 1, 0 +AVX_INSTR mulpd, 1, 0, 1 +AVX_INSTR mulps, 1, 0, 1 +AVX_INSTR mulsd, 1, 0, 1 +AVX_INSTR mulss, 1, 0, 1 +AVX_INSTR orpd, 1, 0, 1 +AVX_INSTR orps, 1, 0, 1 +AVX_INSTR packsswb, 0, 0, 0 +AVX_INSTR packssdw, 0, 0, 0 +AVX_INSTR packuswb, 0, 0, 0 +AVX_INSTR packusdw, 0, 0, 0 +AVX_INSTR paddb, 0, 0, 1 +AVX_INSTR paddw, 0, 0, 1 +AVX_INSTR paddd, 0, 0, 1 +AVX_INSTR paddq, 0, 0, 1 +AVX_INSTR paddsb, 0, 0, 1 +AVX_INSTR paddsw, 0, 0, 1 +AVX_INSTR paddusb, 0, 0, 1 +AVX_INSTR paddusw, 0, 0, 1 +AVX_INSTR palignr, 0, 1, 0 +AVX_INSTR pand, 0, 0, 1 +AVX_INSTR pandn, 0, 0, 0 +AVX_INSTR pavgb, 0, 0, 1 +AVX_INSTR pavgw, 0, 0, 1 +AVX_INSTR pblendvb, 0, 0, 0 +AVX_INSTR pblendw, 0, 1, 0 +AVX_INSTR pcmpestri, 0, 0, 0 +AVX_INSTR pcmpestrm, 0, 0, 0 +AVX_INSTR pcmpistri, 0, 0, 0 +AVX_INSTR pcmpistrm, 0, 0, 0 +AVX_INSTR pcmpeqb, 0, 0, 1 +AVX_INSTR pcmpeqw, 0, 0, 1 +AVX_INSTR pcmpeqd, 0, 0, 1 +AVX_INSTR pcmpeqq, 0, 0, 1 +AVX_INSTR pcmpgtb, 0, 0, 0 +AVX_INSTR pcmpgtw, 0, 0, 0 +AVX_INSTR pcmpgtd, 0, 0, 0 +AVX_INSTR pcmpgtq, 0, 0, 0 +AVX_INSTR phaddw, 0, 0, 0 +AVX_INSTR phaddd, 0, 0, 0 +AVX_INSTR phaddsw, 0, 0, 0 +AVX_INSTR phsubw, 0, 0, 0 +AVX_INSTR phsubd, 0, 0, 0 +AVX_INSTR phsubsw, 0, 0, 0 +AVX_INSTR pmaddwd, 0, 0, 1 +AVX_INSTR pmaddubsw, 0, 0, 0 +AVX_INSTR pmaxsb, 0, 0, 1 +AVX_INSTR pmaxsw, 0, 0, 1 +AVX_INSTR pmaxsd, 0, 0, 1 +AVX_INSTR pmaxub, 0, 0, 1 +AVX_INSTR pmaxuw, 0, 0, 1 +AVX_INSTR pmaxud, 0, 0, 1 +AVX_INSTR pminsb, 0, 0, 1 +AVX_INSTR pminsw, 0, 0, 1 +AVX_INSTR pminsd, 0, 0, 1 +AVX_INSTR pminub, 0, 0, 1 +AVX_INSTR pminuw, 0, 0, 1 +AVX_INSTR pminud, 0, 0, 1 +AVX_INSTR pmulhuw, 0, 0, 1 +AVX_INSTR pmulhrsw, 0, 0, 1 +AVX_INSTR pmulhw, 0, 0, 1 +AVX_INSTR pmullw, 0, 0, 1 +AVX_INSTR pmulld, 0, 0, 1 +AVX_INSTR pmuludq, 0, 0, 1 +AVX_INSTR pmuldq, 0, 0, 1 +AVX_INSTR por, 0, 0, 1 +AVX_INSTR psadbw, 0, 0, 1 +AVX_INSTR pshufb, 0, 0, 0 +AVX_INSTR psignb, 0, 0, 0 +AVX_INSTR psignw, 0, 0, 0 +AVX_INSTR psignd, 0, 0, 0 +AVX_INSTR psllw, 0, 0, 0 +AVX_INSTR pslld, 0, 0, 0 +AVX_INSTR psllq, 0, 0, 0 +AVX_INSTR pslldq, 0, 0, 0 +AVX_INSTR psraw, 0, 0, 0 +AVX_INSTR psrad, 0, 0, 0 +AVX_INSTR psrlw, 0, 0, 0 +AVX_INSTR psrld, 0, 0, 0 +AVX_INSTR psrlq, 0, 0, 0 +AVX_INSTR psrldq, 0, 0, 0 +AVX_INSTR psubb, 0, 0, 0 +AVX_INSTR psubw, 0, 0, 0 +AVX_INSTR psubd, 0, 0, 0 +AVX_INSTR psubq, 0, 0, 0 +AVX_INSTR psubsb, 0, 0, 0 +AVX_INSTR psubsw, 0, 0, 0 +AVX_INSTR psubusb, 0, 0, 0 +AVX_INSTR psubusw, 0, 0, 0 +AVX_INSTR punpckhbw, 0, 0, 0 +AVX_INSTR punpckhwd, 0, 0, 0 +AVX_INSTR punpckhdq, 0, 0, 0 +AVX_INSTR punpckhqdq, 0, 0, 0 +AVX_INSTR punpcklbw, 0, 0, 0 +AVX_INSTR punpcklwd, 0, 0, 0 +AVX_INSTR punpckldq, 0, 0, 0 +AVX_INSTR punpcklqdq, 0, 0, 0 +AVX_INSTR pxor, 0, 0, 1 +AVX_INSTR shufps, 1, 1, 0 +AVX_INSTR subpd, 1, 0, 0 +AVX_INSTR subps, 1, 0, 0 +AVX_INSTR subsd, 1, 0, 0 +AVX_INSTR subss, 1, 0, 0 +AVX_INSTR unpckhpd, 1, 0, 0 +AVX_INSTR unpckhps, 1, 0, 0 +AVX_INSTR unpcklpd, 1, 0, 0 +AVX_INSTR unpcklps, 1, 0, 0 +AVX_INSTR xorpd, 1, 0, 1 +AVX_INSTR xorps, 1, 0, 1 + +; 3DNow instructions, for sharing code between AVX, SSE and 3DN +AVX_INSTR pfadd, 1, 0, 1 +AVX_INSTR pfsub, 1, 0, 0 +AVX_INSTR pfmul, 1, 0, 1 + +; base-4 constants for shuffles +%assign i 0 +%rep 256 + %assign j ((i>>6)&3)*1000 + ((i>>4)&3)*100 + ((i>>2)&3)*10 + (i&3) + %if j < 10 + CAT_XDEFINE q000, j, i + %elif j < 100 + CAT_XDEFINE q00, j, i + %elif j < 1000 + CAT_XDEFINE q0, j, i + %else + CAT_XDEFINE q, j, i + %endif +%assign i i+1 +%endrep +%undef i +%undef j + +%macro FMA_INSTR 3 + %macro %1 4-7 %1, %2, %3 + %if cpuflag(xop) + v%5 %1, %2, %3, %4 + %else + %6 %1, %2, %3 + %7 %1, %4 + %endif + %endmacro +%endmacro + +FMA_INSTR pmacsdd, pmulld, paddd +FMA_INSTR pmacsww, pmullw, paddw +FMA_INSTR pmadcswd, pmaddwd, paddd diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/x86/x86util.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/x86/x86util.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libavutil/x86/x86util.asm 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libavutil/x86/x86util.asm 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,587 @@ +;***************************************************************************** +;* x86util.asm +;***************************************************************************** +;* Copyright (C) 2008-2010 x264 project +;* +;* Authors: Loren Merritt +;* Holger Lubitz +;* +;* This file is part of Libav. +;* +;* Libav is free software; you can redistribute it and/or +;* modify it under the terms of the GNU Lesser General Public +;* License as published by the Free Software Foundation; either +;* version 2.1 of the License, or (at your option) any later version. +;* +;* Libav is distributed in the hope that it will be useful, +;* but WITHOUT ANY WARRANTY; without even the implied warranty of +;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;* Lesser General Public License for more details. +;* +;* You should have received a copy of the GNU Lesser General Public +;* License along with Libav; if not, write to the Free Software +;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;****************************************************************************** + +%macro SBUTTERFLY 4 +%if avx_enabled == 0 + mova m%4, m%2 + punpckl%1 m%2, m%3 + punpckh%1 m%4, m%3 +%else + punpckh%1 m%4, m%2, m%3 + punpckl%1 m%2, m%3 +%endif + SWAP %3, %4 +%endmacro + +%macro SBUTTERFLY2 4 + punpckl%1 m%4, m%2, m%3 + punpckh%1 m%2, m%2, m%3 + SWAP %2, %4, %3 +%endmacro + +%macro SBUTTERFLYPS 3 + movaps m%3, m%1 + unpcklps m%1, m%2 + unpckhps m%3, m%2 + SWAP %2, %3 +%endmacro + +%macro TRANSPOSE4x4B 5 + SBUTTERFLY bw, %1, %2, %5 + SBUTTERFLY bw, %3, %4, %5 + SBUTTERFLY wd, %1, %3, %5 + SBUTTERFLY wd, %2, %4, %5 + SWAP %2, %3 +%endmacro + +%macro TRANSPOSE4x4W 5 + SBUTTERFLY wd, %1, %2, %5 + SBUTTERFLY wd, %3, %4, %5 + SBUTTERFLY dq, %1, %3, %5 + SBUTTERFLY dq, %2, %4, %5 + SWAP %2, %3 +%endmacro + +%macro TRANSPOSE2x4x4W 5 + SBUTTERFLY wd, %1, %2, %5 + SBUTTERFLY wd, %3, %4, %5 + SBUTTERFLY dq, %1, %3, %5 + SBUTTERFLY dq, %2, %4, %5 + SBUTTERFLY qdq, %1, %2, %5 + SBUTTERFLY qdq, %3, %4, %5 +%endmacro + +%macro TRANSPOSE4x4D 5 + SBUTTERFLY dq, %1, %2, %5 + SBUTTERFLY dq, %3, %4, %5 + SBUTTERFLY qdq, %1, %3, %5 + SBUTTERFLY qdq, %2, %4, %5 + SWAP %2, %3 +%endmacro + +; identical behavior to TRANSPOSE4x4D, but using SSE1 float ops +%macro TRANSPOSE4x4PS 5 + SBUTTERFLYPS %1, %2, %5 + SBUTTERFLYPS %3, %4, %5 + movaps m%5, m%1 + movlhps m%1, m%3 + movhlps m%3, m%5 + movaps m%5, m%2 + movlhps m%2, m%4 + movhlps m%4, m%5 + SWAP %2, %3 +%endmacro + +%macro TRANSPOSE8x8W 9-11 +%ifdef ARCH_X86_64 + SBUTTERFLY wd, %1, %2, %9 + SBUTTERFLY wd, %3, %4, %9 + SBUTTERFLY wd, %5, %6, %9 + SBUTTERFLY wd, %7, %8, %9 + SBUTTERFLY dq, %1, %3, %9 + SBUTTERFLY dq, %2, %4, %9 + SBUTTERFLY dq, %5, %7, %9 + SBUTTERFLY dq, %6, %8, %9 + SBUTTERFLY qdq, %1, %5, %9 + SBUTTERFLY qdq, %2, %6, %9 + SBUTTERFLY qdq, %3, %7, %9 + SBUTTERFLY qdq, %4, %8, %9 + SWAP %2, %5 + SWAP %4, %7 +%else +; in: m0..m7, unless %11 in which case m6 is in %9 +; out: m0..m7, unless %11 in which case m4 is in %10 +; spills into %9 and %10 +%if %0<11 + movdqa %9, m%7 +%endif + SBUTTERFLY wd, %1, %2, %7 + movdqa %10, m%2 + movdqa m%7, %9 + SBUTTERFLY wd, %3, %4, %2 + SBUTTERFLY wd, %5, %6, %2 + SBUTTERFLY wd, %7, %8, %2 + SBUTTERFLY dq, %1, %3, %2 + movdqa %9, m%3 + movdqa m%2, %10 + SBUTTERFLY dq, %2, %4, %3 + SBUTTERFLY dq, %5, %7, %3 + SBUTTERFLY dq, %6, %8, %3 + SBUTTERFLY qdq, %1, %5, %3 + SBUTTERFLY qdq, %2, %6, %3 + movdqa %10, m%2 + movdqa m%3, %9 + SBUTTERFLY qdq, %3, %7, %2 + SBUTTERFLY qdq, %4, %8, %2 + SWAP %2, %5 + SWAP %4, %7 +%if %0<11 + movdqa m%5, %10 +%endif +%endif +%endmacro + +; PABSW macros assume %1 != %2, while ABS1/2 macros work in-place +%macro PABSW_MMX 2 + pxor %1, %1 + pcmpgtw %1, %2 + pxor %2, %1 + psubw %2, %1 + SWAP %1, %2 +%endmacro + +%macro PSIGNW_MMX 2 + pxor %1, %2 + psubw %1, %2 +%endmacro + +%macro PABSW_MMX2 2 + pxor %1, %1 + psubw %1, %2 + pmaxsw %1, %2 +%endmacro + +%macro PABSW_SSSE3 2 + pabsw %1, %2 +%endmacro + +%macro PSIGNW_SSSE3 2 + psignw %1, %2 +%endmacro + +%macro ABS1_MMX 2 ; a, tmp + pxor %2, %2 + pcmpgtw %2, %1 + pxor %1, %2 + psubw %1, %2 +%endmacro + +%macro ABS2_MMX 4 ; a, b, tmp0, tmp1 + pxor %3, %3 + pxor %4, %4 + pcmpgtw %3, %1 + pcmpgtw %4, %2 + pxor %1, %3 + pxor %2, %4 + psubw %1, %3 + psubw %2, %4 +%endmacro + +%macro ABS1_MMX2 2 ; a, tmp + pxor %2, %2 + psubw %2, %1 + pmaxsw %1, %2 +%endmacro + +%macro ABS2_MMX2 4 ; a, b, tmp0, tmp1 + pxor %3, %3 + pxor %4, %4 + psubw %3, %1 + psubw %4, %2 + pmaxsw %1, %3 + pmaxsw %2, %4 +%endmacro + +%macro ABS1_SSSE3 2 + pabsw %1, %1 +%endmacro + +%macro ABS2_SSSE3 4 + pabsw %1, %1 + pabsw %2, %2 +%endmacro + +%macro ABSB_MMX 2 + pxor %2, %2 + psubb %2, %1 + pminub %1, %2 +%endmacro + +%macro ABSB2_MMX 4 + pxor %3, %3 + pxor %4, %4 + psubb %3, %1 + psubb %4, %2 + pminub %1, %3 + pminub %2, %4 +%endmacro + +%macro ABSD2_MMX 4 + pxor %3, %3 + pxor %4, %4 + pcmpgtd %3, %1 + pcmpgtd %4, %2 + pxor %1, %3 + pxor %2, %4 + psubd %1, %3 + psubd %2, %4 +%endmacro + +%macro ABSB_SSSE3 2 + pabsb %1, %1 +%endmacro + +%macro ABSB2_SSSE3 4 + pabsb %1, %1 + pabsb %2, %2 +%endmacro + +%macro ABS4 6 + ABS2 %1, %2, %5, %6 + ABS2 %3, %4, %5, %6 +%endmacro + +%define ABS1 ABS1_MMX +%define ABS2 ABS2_MMX +%define ABSB ABSB_MMX +%define ABSB2 ABSB2_MMX + +%macro SPLATB_MMX 3 + movd %1, [%2-3] ;to avoid crossing a cacheline + punpcklbw %1, %1 + SPLATW %1, %1, 3 +%endmacro + +%macro SPLATB_SSSE3 3 + movd %1, [%2-3] + pshufb %1, %3 +%endmacro + +%macro PALIGNR_MMX 4-5 ; [dst,] src1, src2, imm, tmp + %define %%dst %1 +%if %0==5 +%ifnidn %1, %2 + mova %%dst, %2 +%endif + %rotate 1 +%endif +%ifnidn %4, %2 + mova %4, %2 +%endif +%if mmsize==8 + psllq %%dst, (8-%3)*8 + psrlq %4, %3*8 +%else + pslldq %%dst, 16-%3 + psrldq %4, %3 +%endif + por %%dst, %4 +%endmacro + +%macro PALIGNR_SSSE3 4-5 +%if %0==5 + palignr %1, %2, %3, %4 +%else + palignr %1, %2, %3 +%endif +%endmacro + +%macro DEINTB 5 ; mask, reg1, mask, reg2, optional src to fill masks from +%ifnum %5 + pand m%3, m%5, m%4 ; src .. y6 .. y4 + pand m%1, m%5, m%2 ; dst .. y6 .. y4 +%else + mova m%1, %5 + pand m%3, m%1, m%4 ; src .. y6 .. y4 + pand m%1, m%1, m%2 ; dst .. y6 .. y4 +%endif + psrlw m%2, 8 ; dst .. y7 .. y5 + psrlw m%4, 8 ; src .. y7 .. y5 +%endmacro + +%macro SUMSUB_BA 3-4 +%if %0==3 + padd%1 m%2, m%3 + padd%1 m%3, m%3 + psub%1 m%3, m%2 +%else +%if avx_enabled == 0 + mova m%4, m%2 + padd%1 m%2, m%3 + psub%1 m%3, m%4 +%else + padd%1 m%4, m%2, m%3 + psub%1 m%3, m%2 + SWAP %2, %4 +%endif +%endif +%endmacro + +%macro SUMSUB_BADC 5-6 +%if %0==6 + SUMSUB_BA %1, %2, %3, %6 + SUMSUB_BA %1, %4, %5, %6 +%else + padd%1 m%2, m%3 + padd%1 m%4, m%5 + padd%1 m%3, m%3 + padd%1 m%5, m%5 + psub%1 m%3, m%2 + psub%1 m%5, m%4 +%endif +%endmacro + +%macro SUMSUB2_AB 4 +%ifnum %3 + psub%1 m%4, m%2, m%3 + psub%1 m%4, m%3 + padd%1 m%2, m%2 + padd%1 m%2, m%3 +%else + mova m%4, m%2 + padd%1 m%2, m%2 + padd%1 m%2, %3 + psub%1 m%4, %3 + psub%1 m%4, %3 +%endif +%endmacro + +%macro SUMSUB2_BA 4 +%if avx_enabled == 0 + mova m%4, m%2 + padd%1 m%2, m%3 + padd%1 m%2, m%3 + psub%1 m%3, m%4 + psub%1 m%3, m%4 +%else + padd%1 m%4, m%2, m%3 + padd%1 m%4, m%3 + psub%1 m%3, m%2 + psub%1 m%3, m%2 + SWAP %2, %4 +%endif +%endmacro + +%macro SUMSUBD2_AB 5 +%ifnum %4 + psra%1 m%5, m%2, 1 ; %3: %3>>1 + psra%1 m%4, m%3, 1 ; %2: %2>>1 + padd%1 m%4, m%2 ; %3: %3>>1+%2 + psub%1 m%5, m%3 ; %2: %2>>1-%3 + SWAP %2, %5 + SWAP %3, %4 +%else + mova %5, m%2 + mova %4, m%3 + psra%1 m%3, 1 ; %3: %3>>1 + psra%1 m%2, 1 ; %2: %2>>1 + padd%1 m%3, %5 ; %3: %3>>1+%2 + psub%1 m%2, %4 ; %2: %2>>1-%3 +%endif +%endmacro + +%macro DCT4_1D 5 +%ifnum %5 + SUMSUB_BADC w, %4, %1, %3, %2, %5 + SUMSUB_BA w, %3, %4, %5 + SUMSUB2_AB w, %1, %2, %5 + SWAP %1, %3, %4, %5, %2 +%else + SUMSUB_BADC w, %4, %1, %3, %2 + SUMSUB_BA w, %3, %4 + mova [%5], m%2 + SUMSUB2_AB w, %1, [%5], %2 + SWAP %1, %3, %4, %2 +%endif +%endmacro + +%macro IDCT4_1D 6-7 +%ifnum %6 + SUMSUBD2_AB %1, %3, %5, %7, %6 + ; %3: %3>>1-%5 %5: %3+%5>>1 + SUMSUB_BA %1, %4, %2, %7 + ; %4: %2+%4 %2: %2-%4 + SUMSUB_BADC %1, %5, %4, %3, %2, %7 + ; %5: %2+%4 + (%3+%5>>1) + ; %4: %2+%4 - (%3+%5>>1) + ; %3: %2-%4 + (%3>>1-%5) + ; %2: %2-%4 - (%3>>1-%5) +%else +%ifidn %1, w + SUMSUBD2_AB %1, %3, %5, [%6], [%6+16] +%else + SUMSUBD2_AB %1, %3, %5, [%6], [%6+32] +%endif + SUMSUB_BA %1, %4, %2 + SUMSUB_BADC %1, %5, %4, %3, %2 +%endif + SWAP %2, %5, %4 + ; %2: %2+%4 + (%3+%5>>1) row0 + ; %3: %2-%4 + (%3>>1-%5) row1 + ; %4: %2-%4 - (%3>>1-%5) row2 + ; %5: %2+%4 - (%3+%5>>1) row3 +%endmacro + + +%macro LOAD_DIFF 5 +%ifidn %3, none + movh %1, %4 + movh %2, %5 + punpcklbw %1, %2 + punpcklbw %2, %2 + psubw %1, %2 +%else + movh %1, %4 + punpcklbw %1, %3 + movh %2, %5 + punpcklbw %2, %3 + psubw %1, %2 +%endif +%endmacro + +%macro STORE_DCT 6 + movq [%5+%6+ 0], m%1 + movq [%5+%6+ 8], m%2 + movq [%5+%6+16], m%3 + movq [%5+%6+24], m%4 + movhps [%5+%6+32], m%1 + movhps [%5+%6+40], m%2 + movhps [%5+%6+48], m%3 + movhps [%5+%6+56], m%4 +%endmacro + +%macro LOAD_DIFF_8x4P 7-10 r0,r2,0 ; 4x dest, 2x temp, 2x pointer, increment? + LOAD_DIFF m%1, m%5, m%7, [%8], [%9] + LOAD_DIFF m%2, m%6, m%7, [%8+r1], [%9+r3] + LOAD_DIFF m%3, m%5, m%7, [%8+2*r1], [%9+2*r3] + LOAD_DIFF m%4, m%6, m%7, [%8+r4], [%9+r5] +%if %10 + lea %8, [%8+4*r1] + lea %9, [%9+4*r3] +%endif +%endmacro + +%macro DIFFx2 6-7 + movh %3, %5 + punpcklbw %3, %4 + psraw %1, 6 + paddsw %1, %3 + movh %3, %6 + punpcklbw %3, %4 + psraw %2, 6 + paddsw %2, %3 + packuswb %2, %1 +%endmacro + +%macro STORE_DIFF 4 + movh %2, %4 + punpcklbw %2, %3 + psraw %1, 6 + paddsw %1, %2 + packuswb %1, %1 + movh %4, %1 +%endmacro + +%macro STORE_DIFFx2 8 ; add1, add2, reg1, reg2, zero, shift, source, stride + movh %3, [%7] + movh %4, [%7+%8] + psraw %1, %6 + psraw %2, %6 + punpcklbw %3, %5 + punpcklbw %4, %5 + paddw %3, %1 + paddw %4, %2 + packuswb %3, %5 + packuswb %4, %5 + movh [%7], %3 + movh [%7+%8], %4 +%endmacro + +%macro PMINUB_MMX 3 ; dst, src, tmp + mova %3, %1 + psubusb %3, %2 + psubb %1, %3 +%endmacro + +%macro PMINUB_MMXEXT 3 ; dst, src, ignored + pminub %1, %2 +%endmacro + +%macro SPLATW 2-3 0 +%if mmsize == 16 + pshuflw %1, %2, (%3)*0x55 + punpcklqdq %1, %1 +%else + pshufw %1, %2, (%3)*0x55 +%endif +%endmacro + +%macro SPLATD 2-3 0 +%if mmsize == 16 + pshufd %1, %2, (%3)*0x55 +%else + pshufw %1, %2, (%3)*0x11 + ((%3)+1)*0x44 +%endif +%endmacro + +%macro SPLATD_MMX 1 + punpckldq %1, %1 +%endmacro + +%macro SPLATD_SSE 1 + shufps %1, %1, 0 +%endmacro + +%macro SPLATD_SSE2 1 + pshufd %1, %1, 0 +%endmacro + +%macro CLIPW 3 ;(dst, min, max) + pmaxsw %1, %2 + pminsw %1, %3 +%endmacro + +%macro PMINSD_MMX 3 ; dst, src, tmp + mova %3, %2 + pcmpgtd %3, %1 + pxor %1, %2 + pand %1, %3 + pxor %1, %2 +%endmacro + +%macro PMAXSD_MMX 3 ; dst, src, tmp + mova %3, %1 + pcmpgtd %3, %2 + pand %1, %3 + pandn %3, %2 + por %1, %3 +%endmacro + +%macro CLIPD_MMX 3-4 ; src/dst, min, max, tmp + PMINSD_MMX %1, %3, %4 + PMAXSD_MMX %1, %2, %4 +%endmacro + +%macro CLIPD_SSE2 3-4 ; src/dst, min (float), max (float), unused + cvtdq2ps %1, %1 + minps %1, %3 + maxps %1, %2 + cvtps2dq %1, %1 +%endmacro + +%macro CLIPD_SSE41 3-4 ; src/dst, min, max, unused + pminsd %1, %3 + pmaxsd %1, %2 +%endmacro diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/Makefile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/Makefile 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/Makefile 2012-01-11 00:34:30.000000000 +0000 @@ -1,10 +1,6 @@ -include $(SUBDIR)../config.mak - NAME = postproc FFLIBS = avutil HEADERS = postprocess.h OBJS = postprocess.o - -include $(SUBDIR)../subdir.mak diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/postprocess_altivec_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/postprocess_altivec_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/postprocess_altivec_template.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/postprocess_altivec_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -530,6 +530,39 @@ } static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) { + const vector signed int vsint32_8 = vec_splat_s32(8); + const vector unsigned int vuint32_4 = vec_splat_u32(4); + const vector signed char neg1 = vec_splat_s8(-1); + + const vector unsigned char permA1 = (vector unsigned char) + {0x00, 0x01, 0x02, 0x10, 0x11, 0x12, 0x1F, 0x1F, + 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F}; + const vector unsigned char permA2 = (vector unsigned char) + {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x10, 0x11, + 0x12, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F}; + const vector unsigned char permA1inc = (vector unsigned char) + {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + const vector unsigned char permA2inc = (vector unsigned char) + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + const vector unsigned char magic = (vector unsigned char) + {0x01, 0x02, 0x01, 0x02, 0x04, 0x02, 0x01, 0x02, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + const vector unsigned char extractPerm = (vector unsigned char) + {0x10, 0x10, 0x10, 0x01, 0x10, 0x10, 0x10, 0x01, + 0x10, 0x10, 0x10, 0x01, 0x10, 0x10, 0x10, 0x01}; + const vector unsigned char extractPermInc = (vector unsigned char) + {0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01}; + const vector unsigned char identity = vec_lvsl(0,(unsigned char *)0); + const vector unsigned char tenRight = (vector unsigned char) + {0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + const vector unsigned char eightLeft = (vector unsigned char) + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08}; + /* this code makes no assumption on src or stride. One could remove the recomputation of the perm @@ -539,11 +572,9 @@ src & stride :-( */ uint8_t *srcCopy = src; - DECLARE_ALIGNED(16, uint8_t, dt)[16]; + DECLARE_ALIGNED(16, uint8_t, dt)[16] = { deringThreshold }; const vector signed int zero = vec_splat_s32(0); - vector unsigned char v_dt; - dt[0] = deringThreshold; - v_dt = vec_splat(vec_ld(0, dt), 0); + vector unsigned char v_dt = vec_splat(vec_ld(0, dt), 0); #define LOAD_LINE(i) \ const vector unsigned char perm##i = \ @@ -565,6 +596,11 @@ #undef LOAD_LINE vector unsigned char v_avg; + DECLARE_ALIGNED(16, signed int, S)[8]; + DECLARE_ALIGNED(16, int, tQP2)[4] = { c->QP/2 + 1 }; + vector signed int vQP2 = vec_ld(0, tQP2); + vQP2 = vec_splat(vQP2, 0); + { const vector unsigned char trunc_perm = (vector unsigned char) {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, @@ -575,21 +611,22 @@ const vector unsigned char trunc_src78 = vec_perm(src7, src8, trunc_perm); #define EXTRACT(op) do { \ - const vector unsigned char s##op##_1 = vec_##op(trunc_src12, trunc_src34); \ - const vector unsigned char s##op##_2 = vec_##op(trunc_src56, trunc_src78); \ - const vector unsigned char s##op##_6 = vec_##op(s##op##_1, s##op##_2); \ - const vector unsigned char s##op##_8h = vec_mergeh(s##op##_6, s##op##_6); \ - const vector unsigned char s##op##_8l = vec_mergel(s##op##_6, s##op##_6); \ - const vector unsigned char s##op##_9 = vec_##op(s##op##_8h, s##op##_8l); \ - const vector unsigned char s##op##_9h = vec_mergeh(s##op##_9, s##op##_9); \ - const vector unsigned char s##op##_9l = vec_mergel(s##op##_9, s##op##_9); \ - const vector unsigned char s##op##_10 = vec_##op(s##op##_9h, s##op##_9l); \ - const vector unsigned char s##op##_10h = vec_mergeh(s##op##_10, s##op##_10); \ - const vector unsigned char s##op##_10l = vec_mergel(s##op##_10, s##op##_10); \ - const vector unsigned char s##op##_11 = vec_##op(s##op##_10h, s##op##_10l); \ - const vector unsigned char s##op##_11h = vec_mergeh(s##op##_11, s##op##_11); \ - const vector unsigned char s##op##_11l = vec_mergel(s##op##_11, s##op##_11); \ - v_##op = vec_##op(s##op##_11h, s##op##_11l); } while (0) + const vector unsigned char s_1 = vec_##op(trunc_src12, trunc_src34); \ + const vector unsigned char s_2 = vec_##op(trunc_src56, trunc_src78); \ + const vector unsigned char s_6 = vec_##op(s_1, s_2); \ + const vector unsigned char s_8h = vec_mergeh(s_6, s_6); \ + const vector unsigned char s_8l = vec_mergel(s_6, s_6); \ + const vector unsigned char s_9 = vec_##op(s_8h, s_8l); \ + const vector unsigned char s_9h = vec_mergeh(s_9, s_9); \ + const vector unsigned char s_9l = vec_mergel(s_9, s_9); \ + const vector unsigned char s_10 = vec_##op(s_9h, s_9l); \ + const vector unsigned char s_10h = vec_mergeh(s_10, s_10); \ + const vector unsigned char s_10l = vec_mergel(s_10, s_10); \ + const vector unsigned char s_11 = vec_##op(s_10h, s_10l); \ + const vector unsigned char s_11h = vec_mergeh(s_11, s_11); \ + const vector unsigned char s_11l = vec_mergel(s_11, s_11); \ + v_##op = vec_##op(s_11h, s_11l); \ +} while (0) vector unsigned char v_min; vector unsigned char v_max; @@ -603,7 +640,6 @@ v_avg = vec_avg(v_min, v_max); } - DECLARE_ALIGNED(16, signed int, S)[8]; { const vector unsigned short mask1 = (vector unsigned short) {0x0001, 0x0002, 0x0004, 0x0008, @@ -615,22 +651,27 @@ const vector unsigned int vuint32_16 = vec_sl(vec_splat_u32(1), vec_splat_u32(4)); const vector unsigned int vuint32_1 = vec_splat_u32(1); + vector signed int sumA2; + vector signed int sumB2; + vector signed int sum0, sum1, sum2, sum3, sum4; + vector signed int sum5, sum6, sum7, sum8, sum9; + #define COMPARE(i) \ - vector signed int sum##i; \ do { \ - const vector unsigned char cmp##i = \ + const vector unsigned char cmp = \ (vector unsigned char)vec_cmpgt(src##i, v_avg); \ - const vector unsigned short cmpHi##i = \ - (vector unsigned short)vec_mergeh(cmp##i, cmp##i); \ - const vector unsigned short cmpLi##i = \ - (vector unsigned short)vec_mergel(cmp##i, cmp##i); \ - const vector signed short cmpHf##i = \ - (vector signed short)vec_and(cmpHi##i, mask1); \ - const vector signed short cmpLf##i = \ - (vector signed short)vec_and(cmpLi##i, mask2); \ - const vector signed int sump##i = vec_sum4s(cmpHf##i, zero); \ - const vector signed int sumq##i = vec_sum4s(cmpLf##i, sump##i); \ - sum##i = vec_sums(sumq##i, zero); } while (0) + const vector unsigned short cmpHi = \ + (vector unsigned short)vec_mergeh(cmp, cmp); \ + const vector unsigned short cmpLi = \ + (vector unsigned short)vec_mergel(cmp, cmp); \ + const vector signed short cmpHf = \ + (vector signed short)vec_and(cmpHi, mask1); \ + const vector signed short cmpLf = \ + (vector signed short)vec_and(cmpLi, mask2); \ + const vector signed int sump = vec_sum4s(cmpHf, zero); \ + const vector signed int sumq = vec_sum4s(cmpLf, sump); \ + sum##i = vec_sums(sumq, zero); \ + } while (0) COMPARE(0); COMPARE(1); @@ -644,8 +685,6 @@ COMPARE(9); #undef COMPARE - vector signed int sumA2; - vector signed int sumB2; { const vector signed int sump02 = vec_mergel(sum0, sum2); const vector signed int sump13 = vec_mergel(sum1, sum3); @@ -699,86 +738,43 @@ /* I'm not sure the following is actually faster than straight, unvectorized C code :-( */ - DECLARE_ALIGNED(16, int, tQP2)[4]; - tQP2[0]= c->QP/2 + 1; - vector signed int vQP2 = vec_ld(0, tQP2); - vQP2 = vec_splat(vQP2, 0); - const vector signed int vsint32_8 = vec_splat_s32(8); - const vector unsigned int vuint32_4 = vec_splat_u32(4); - - const vector unsigned char permA1 = (vector unsigned char) - {0x00, 0x01, 0x02, 0x10, 0x11, 0x12, 0x1F, 0x1F, - 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F}; - const vector unsigned char permA2 = (vector unsigned char) - {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x10, 0x11, - 0x12, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F}; - const vector unsigned char permA1inc = (vector unsigned char) - {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - const vector unsigned char permA2inc = (vector unsigned char) - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - const vector unsigned char magic = (vector unsigned char) - {0x01, 0x02, 0x01, 0x02, 0x04, 0x02, 0x01, 0x02, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - const vector unsigned char extractPerm = (vector unsigned char) - {0x10, 0x10, 0x10, 0x01, 0x10, 0x10, 0x10, 0x01, - 0x10, 0x10, 0x10, 0x01, 0x10, 0x10, 0x10, 0x01}; - const vector unsigned char extractPermInc = (vector unsigned char) - {0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01}; - const vector unsigned char identity = vec_lvsl(0,(unsigned char *)0); - const vector unsigned char tenRight = (vector unsigned char) - {0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - const vector unsigned char eightLeft = (vector unsigned char) - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08}; - - -#define F_INIT(i) \ - vector unsigned char tenRightM##i = tenRight; \ - vector unsigned char permA1M##i = permA1; \ - vector unsigned char permA2M##i = permA2; \ - vector unsigned char extractPermM##i = extractPerm +#define F_INIT() \ + vector unsigned char tenRightM = tenRight; \ + vector unsigned char permA1M = permA1; \ + vector unsigned char permA2M = permA2; \ + vector unsigned char extractPermM = extractPerm #define F2(i, j, k, l) \ if (S[i] & (1 << (l+1))) { \ - const vector unsigned char a_##j##_A##l = \ - vec_perm(src##i, src##j, permA1M##i); \ - const vector unsigned char a_##j##_B##l = \ - vec_perm(a_##j##_A##l, src##k, permA2M##i); \ - const vector signed int a_##j##_sump##l = \ - (vector signed int)vec_msum(a_##j##_B##l, magic, \ - (vector unsigned int)zero); \ - vector signed int F_##j##_##l = \ - vec_sr(vec_sums(a_##j##_sump##l, vsint32_8), vuint32_4); \ - F_##j##_##l = vec_splat(F_##j##_##l, 3); \ - const vector signed int p_##j##_##l = \ - (vector signed int)vec_perm(src##j, \ - (vector unsigned char)zero, \ - extractPermM##i); \ - const vector signed int sum_##j##_##l = vec_add( p_##j##_##l, vQP2);\ - const vector signed int diff_##j##_##l = vec_sub( p_##j##_##l, vQP2);\ - vector signed int newpm_##j##_##l; \ - if (vec_all_lt(sum_##j##_##l, F_##j##_##l)) \ - newpm_##j##_##l = sum_##j##_##l; \ - else if (vec_all_gt(diff_##j##_##l, F_##j##_##l)) \ - newpm_##j##_##l = diff_##j##_##l; \ - else newpm_##j##_##l = F_##j##_##l; \ - const vector unsigned char newpm2_##j##_##l = \ - vec_splat((vector unsigned char)newpm_##j##_##l, 15); \ - const vector unsigned char mask##j##l = vec_add(identity, \ - tenRightM##i); \ - src##j = vec_perm(src##j, newpm2_##j##_##l, mask##j##l); \ + const vector unsigned char a_A = vec_perm(src##i, src##j, permA1M); \ + const vector unsigned char a_B = vec_perm(a_A, src##k, permA2M); \ + const vector signed int a_sump = \ + (vector signed int)vec_msum(a_B, magic, (vector unsigned int)zero);\ + vector signed int F = vec_sr(vec_sums(a_sump, vsint32_8), vuint32_4); \ + const vector signed int p = \ + (vector signed int)vec_perm(src##j, (vector unsigned char)zero, \ + extractPermM); \ + const vector signed int sum = vec_add(p, vQP2); \ + const vector signed int diff = vec_sub(p, vQP2); \ + vector signed int newpm; \ + vector unsigned char newpm2, mask; \ + F = vec_splat(F, 3); \ + if (vec_all_lt(sum, F)) \ + newpm = sum; \ + else if (vec_all_gt(diff, F)) \ + newpm = diff; \ + else newpm = F; \ + newpm2 = vec_splat((vector unsigned char)newpm, 15); \ + mask = vec_add(identity, tenRightM); \ + src##j = vec_perm(src##j, newpm2, mask); \ } \ - permA1M##i = vec_add(permA1M##i, permA1inc); \ - permA2M##i = vec_add(permA2M##i, permA2inc); \ - tenRightM##i = vec_sro(tenRightM##i, eightLeft); \ - extractPermM##i = vec_add(extractPermM##i, extractPermInc) + permA1M = vec_add(permA1M, permA1inc); \ + permA2M = vec_add(permA2M, permA2inc); \ + tenRightM = vec_sro(tenRightM, eightLeft); \ + extractPermM = vec_add(extractPermM, extractPermInc) -#define ITER(i, j, k) \ - F_INIT(i); \ +#define ITER(i, j, k) do { \ + F_INIT(); \ F2(i, j, k, 0); \ F2(i, j, k, 1); \ F2(i, j, k, 2); \ @@ -786,7 +782,8 @@ F2(i, j, k, 4); \ F2(i, j, k, 5); \ F2(i, j, k, 6); \ - F2(i, j, k, 7) + F2(i, j, k, 7); \ +} while (0) ITER(0, 1, 2); ITER(1, 2, 3); @@ -797,19 +794,18 @@ ITER(6, 7, 8); ITER(7, 8, 9); - const vector signed char neg1 = vec_splat_s8(-1); - -#define STORE_LINE(i) \ - const vector unsigned char permST##i = \ +#define STORE_LINE(i) do { \ + const vector unsigned char permST = \ vec_lvsr(i * stride, srcCopy); \ - const vector unsigned char maskST##i = \ + const vector unsigned char maskST = \ vec_perm((vector unsigned char)zero, \ - (vector unsigned char)neg1, permST##i);\ - src##i = vec_perm(src##i ,src##i, permST##i); \ - sA##i= vec_sel(sA##i, src##i, maskST##i); \ - sB##i= vec_sel(src##i, sB##i, maskST##i); \ + (vector unsigned char)neg1, permST); \ + src##i = vec_perm(src##i ,src##i, permST); \ + sA##i= vec_sel(sA##i, src##i, maskST); \ + sB##i= vec_sel(src##i, sB##i, maskST); \ vec_st(sA##i, i * stride, srcCopy); \ - vec_st(sB##i, i * stride + 16, srcCopy) + vec_st(sB##i, i * stride + 16, srcCopy); \ +} while (0) STORE_LINE(1); STORE_LINE(2); @@ -832,16 +828,16 @@ static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride, uint8_t *tempBlurred, uint32_t *tempBlurredPast, int *maxNoise) { + const vector signed char neg1 = vec_splat_s8(-1); + const vector unsigned char permHH = (const vector unsigned char){0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; + const vector signed int zero = vec_splat_s32(0); const vector signed short vsint16_1 = vec_splat_s16(1); vector signed int v_dp = zero; vector signed int v_sysdp = zero; int d, sysd, i; - tempBlurredPast[127]= maxNoise[0]; - tempBlurredPast[128]= maxNoise[1]; - tempBlurredPast[129]= maxNoise[2]; - #define LOAD_LINE(src, i) \ register int j##src##i = i * stride; \ vector unsigned char perm##src##i = vec_lvsl(j##src##i, src); \ @@ -872,11 +868,12 @@ LOAD_LINE(tempBlurred, 7); #undef LOAD_LINE -#define ACCUMULATE_DIFFS(i) \ - vector signed short v_d##i = vec_sub(v_tempBlurredAss##i, \ - v_srcAss##i); \ - v_dp = vec_msums(v_d##i, v_d##i, v_dp); \ - v_sysdp = vec_msums(v_d##i, vsint16_1, v_sysdp) +#define ACCUMULATE_DIFFS(i) do { \ + vector signed short v_d = vec_sub(v_tempBlurredAss##i, \ + v_srcAss##i); \ + v_dp = vec_msums(v_d, v_d, v_dp); \ + v_sysdp = vec_msums(v_d, vsint16_1, v_sysdp); \ + } while (0) ACCUMULATE_DIFFS(0); ACCUMULATE_DIFFS(1); @@ -888,6 +885,10 @@ ACCUMULATE_DIFFS(7); #undef ACCUMULATE_DIFFS + tempBlurredPast[127]= maxNoise[0]; + tempBlurredPast[128]= maxNoise[1]; + tempBlurredPast[129]= maxNoise[2]; + v_dp = vec_sums(v_dp, zero); v_sysdp = vec_sums(v_sysdp, zero); @@ -938,13 +939,12 @@ const vector signed short vsint16_4 = vec_splat_s16(4); const vector unsigned short vuint16_3 = vec_splat_u16(3); -#define OP(i) \ - const vector signed short v_temp##i = \ - vec_mladd(v_tempBlurredAss##i, \ - vsint16_7, v_srcAss##i); \ - const vector signed short v_temp2##i = \ - vec_add(v_temp##i, vsint16_4); \ - v_tempBlurredAss##i = vec_sr(v_temp2##i, vuint16_3) +#define OP(i) do { \ + const vector signed short v_temp = \ + vec_mladd(v_tempBlurredAss##i, vsint16_7, v_srcAss##i); \ + const vector signed short v_temp2 = vec_add(v_temp, vsint16_4); \ + v_tempBlurredAss##i = vec_sr(v_temp2, vuint16_3); \ + } while (0) OP(0); OP(1); @@ -959,13 +959,13 @@ const vector signed short vsint16_3 = vec_splat_s16(3); const vector signed short vsint16_2 = vec_splat_s16(2); -#define OP(i) \ - const vector signed short v_temp##i = \ - vec_mladd(v_tempBlurredAss##i, \ - vsint16_3, v_srcAss##i); \ - const vector signed short v_temp2##i = \ - vec_add(v_temp##i, vsint16_2); \ - v_tempBlurredAss##i = vec_sr(v_temp2##i, (vector unsigned short)vsint16_2) +#define OP(i) do { \ + const vector signed short v_temp = \ + vec_mladd(v_tempBlurredAss##i, vsint16_3, v_srcAss##i); \ + const vector signed short v_temp2 = vec_add(v_temp, vsint16_2); \ + v_tempBlurredAss##i = \ + vec_sr(v_temp2, (vector unsigned short)vsint16_2); \ + } while (0) OP(0); OP(1); @@ -979,27 +979,19 @@ } } - const vector signed char neg1 = vec_splat_s8(-1); - const vector unsigned char permHH = (const vector unsigned char){0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; - -#define PACK_AND_STORE(src, i) \ - const vector unsigned char perms##src##i = \ - vec_lvsr(i * stride, src); \ - const vector unsigned char vf##src##i = \ - vec_packsu(v_tempBlurredAss##i, (vector signed short)zero); \ - const vector unsigned char vg##src##i = \ - vec_perm(vf##src##i, v_##src##A##i, permHH); \ - const vector unsigned char mask##src##i = \ - vec_perm((vector unsigned char)zero, (vector unsigned char)neg1, perms##src##i); \ - const vector unsigned char vg2##src##i = \ - vec_perm(vg##src##i, vg##src##i, perms##src##i); \ - const vector unsigned char svA##src##i = \ - vec_sel(v_##src##A1##i, vg2##src##i, mask##src##i); \ - const vector unsigned char svB##src##i = \ - vec_sel(vg2##src##i, v_##src##A2##i, mask##src##i); \ - vec_st(svA##src##i, i * stride, src); \ - vec_st(svB##src##i, i * stride + 16, src) +#define PACK_AND_STORE(src, i) do { \ + const vector unsigned char perms = vec_lvsr(i * stride, src); \ + const vector unsigned char vf = \ + vec_packsu(v_tempBlurredAss##1, (vector signed short)zero); \ + const vector unsigned char vg = vec_perm(vf, v_##src##A##i, permHH); \ + const vector unsigned char mask = \ + vec_perm((vector unsigned char)zero, (vector unsigned char)neg1, perms); \ + const vector unsigned char vg2 = vec_perm(vg, vg, perms); \ + const vector unsigned char svA = vec_sel(v_##src##A1##i, vg2, mask); \ + const vector unsigned char svB = vec_sel(vg2, v_##src##A2##i, mask); \ + vec_st(svA, i * stride, src); \ + vec_st(svB, i * stride + 16, src); \ +} while (0) PACK_AND_STORE(src, 0); PACK_AND_STORE(src, 1); @@ -1127,6 +1119,7 @@ static inline void transpose_8x16_char_fromPackedAlign_altivec(unsigned char* dst, unsigned char* src, int stride) { const vector unsigned char zero = vec_splat_u8(0); + const vector signed char neg1 = vec_splat_s8(-1); #define LOAD_DOUBLE_LINE(i, j) \ vector unsigned char src##i = vec_ld(i * 16, src); \ @@ -1187,26 +1180,28 @@ temp7 = vec_mergel(tempD, tempL); - const vector signed char neg1 = vec_splat_s8(-1); -#define STORE_DOUBLE_LINE(i, j) \ - vector unsigned char dstA##i = vec_ld(i * stride, dst); \ - vector unsigned char dstB##i = vec_ld(i * stride + 16, dst); \ - vector unsigned char dstA##j = vec_ld(j * stride, dst); \ - vector unsigned char dstB##j = vec_ld(j * stride+ 16, dst); \ - vector unsigned char align##i = vec_lvsr(i * stride, dst); \ - vector unsigned char align##j = vec_lvsr(j * stride, dst); \ - vector unsigned char mask##i = vec_perm(zero, (vector unsigned char)neg1, align##i); \ - vector unsigned char mask##j = vec_perm(zero, (vector unsigned char)neg1, align##j); \ - vector unsigned char dstR##i = vec_perm(temp##i, temp##i, align##i);\ - vector unsigned char dstR##j = vec_perm(temp##j, temp##j, align##j);\ - vector unsigned char dstAF##i = vec_sel(dstA##i, dstR##i, mask##i); \ - vector unsigned char dstBF##i = vec_sel(dstR##i, dstB##i, mask##i); \ - vector unsigned char dstAF##j = vec_sel(dstA##j, dstR##j, mask##j); \ - vector unsigned char dstBF##j = vec_sel(dstR##j, dstB##j, mask##j); \ - vec_st(dstAF##i, i * stride, dst); \ - vec_st(dstBF##i, i * stride + 16, dst); \ - vec_st(dstAF##j, j * stride, dst); \ - vec_st(dstBF##j, j * stride + 16, dst) +#define STORE_DOUBLE_LINE(i, j) do { \ + vector unsigned char dstAi = vec_ld(i * stride, dst); \ + vector unsigned char dstBi = vec_ld(i * stride + 16, dst); \ + vector unsigned char dstAj = vec_ld(j * stride, dst); \ + vector unsigned char dstBj = vec_ld(j * stride+ 16, dst); \ + vector unsigned char aligni = vec_lvsr(i * stride, dst); \ + vector unsigned char alignj = vec_lvsr(j * stride, dst); \ + vector unsigned char maski = \ + vec_perm(zero, (vector unsigned char)neg1, aligni); \ + vector unsigned char maskj = \ + vec_perm(zero, (vector unsigned char)neg1, alignj); \ + vector unsigned char dstRi = vec_perm(temp##i, temp##i, aligni); \ + vector unsigned char dstRj = vec_perm(temp##j, temp##j, alignj); \ + vector unsigned char dstAFi = vec_sel(dstAi, dstRi, maski); \ + vector unsigned char dstBFi = vec_sel(dstRi, dstBi, maski); \ + vector unsigned char dstAFj = vec_sel(dstAj, dstRj, maskj); \ + vector unsigned char dstBFj = vec_sel(dstRj, dstBj, maskj); \ + vec_st(dstAFi, i * stride, dst); \ + vec_st(dstBFi, i * stride + 16, dst); \ + vec_st(dstAFj, j * stride, dst); \ + vec_st(dstBFj, j * stride + 16, dst); \ +} while (0) STORE_DOUBLE_LINE(0,1); STORE_DOUBLE_LINE(2,3); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/postprocess.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/postprocess.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/postprocess.c 2011-05-09 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/postprocess.c 2012-01-11 00:34:30.000000000 +0000 @@ -246,7 +246,6 @@ static inline int isHorizMinMaxOk_C(uint8_t src[], int stride, int QP) { int i; -#if 1 for(i=0; i<2; i++){ if((unsigned)(src[0] - src[5] + 2*QP) > 4*QP) return 0; src += stride; @@ -257,19 +256,11 @@ if((unsigned)(src[6] - src[3] + 2*QP) > 4*QP) return 0; src += stride; } -#else - for(i=0; i<8; i++){ - if((unsigned)(src[0] - src[7] + 2*QP) > 4*QP) return 0; - src += stride; - } -#endif return 1; } static inline int isVertMinMaxOk_C(uint8_t src[], int stride, int QP) { -#if 1 -#if 1 int x; src+= stride*4; for(x=0; x 4*QP) return 0; if((unsigned)(src[3+x + 6*stride] - src[3+x + 3*stride] + 2*QP) > 4*QP) return 0; } -#else - int x; - src+= stride*3; - for(x=0; x 4*QP) return 0; - } -#endif - return 1; -#else - int x; - src+= stride*4; - for(x=0; xmax) max=v; - if(v 2*QP) return 0; - } return 1; -#endif } static inline int horizClassify_C(uint8_t src[], int stride, PPContext *c) @@ -676,7 +644,7 @@ #endif postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); #endif -#else //CONFIG_RUNTIME_CPUDETECT +#else /* CONFIG_RUNTIME_CPUDETECT */ #if HAVE_MMX2 postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); #elif HAVE_AMD3DNOW @@ -688,7 +656,7 @@ #else postProcess_C(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); #endif -#endif //!CONFIG_RUNTIME_CPUDETECT +#endif /* !CONFIG_RUNTIME_CPUDETECT */ } //static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, @@ -763,7 +731,8 @@ ppMode->maxClippedThreshold= 0.01; ppMode->error=0; - av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE); + memset(temp, 0, GET_MODE_BUFFER_SIZE); + av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE - 1); av_log(NULL, AV_LOG_DEBUG, "pp: %s\n", name); @@ -819,7 +788,7 @@ plen= strlen(p); spaceLeft= p - temp + plen; - if(spaceLeft + newlen >= GET_MODE_BUFFER_SIZE){ + if(spaceLeft + newlen >= GET_MODE_BUFFER_SIZE - 1){ ppMode->error++; break; } @@ -940,7 +909,7 @@ c->yHistogram[i]= width*height/64*15/256; for(i=0; i<3; i++){ - //Note: The +17*1024 is just there so i do not have to worry about r/w over the end. + //Note: The +17*1024 is just there so I do not have to worry about r/w over the end. reallocAlign((void **)&c->tempBlurred[i], 8, stride*mbHeight*16 + 17*1024); reallocAlign((void **)&c->tempBlurredPast[i], 8, 256*((height+7)&(~7))/2 + 17*1024);//FIXME size } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/postprocess.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/postprocess.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/postprocess.h 2011-04-20 13:17:46.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/postprocess.h 2012-01-11 00:34:30.000000000 +0000 @@ -77,9 +77,10 @@ /** - * returns a pp_mode or NULL if an error occurred - * name is the string after "-pp" on the command line - * quality is a number from 0 to PP_QUALITY_MAX + * Return a pp_mode or NULL if an error occurred. + * + * @param name the string after "-pp" on the command line + * @param quality a number from 0 to PP_QUALITY_MAX */ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality); void pp_free_mode(pp_mode *mode); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/postprocess_internal.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/postprocess_internal.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/postprocess_internal.h 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/postprocess_internal.h 2012-01-11 00:34:30.000000000 +0000 @@ -28,6 +28,7 @@ #include #include "libavutil/avutil.h" +#include "libavutil/log.h" #include "postprocess.h" #define V_DEBLOCK 0x01 @@ -99,7 +100,7 @@ int minAllowedY; ///< for brigtness correction int maxAllowedY; ///< for brihtness correction - float maxClippedThreshold; ///< amount of "black" u r willing to loose to get a brightness corrected picture + float maxClippedThreshold; ///< amount of "black" you are willing to lose to get a brightness-corrected picture int maxTmpNoise[3]; ///< for Temporal Noise Reducing filter (Maximal sum of abs differences) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/postprocess_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/postprocess_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libpostproc/postprocess_template.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libpostproc/postprocess_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -1912,7 +1912,7 @@ #if HAVE_MMX /** - * transposes and shift the given 8x8 Block into dst1 and dst2 + * Transpose and shift the given 8x8 Block into dst1 and dst2. */ static inline void RENAME(transpose1)(uint8_t *dst1, uint8_t *dst2, uint8_t *src, int srcStride) { @@ -1997,7 +1997,7 @@ } /** - * transposes the given 8x8 block + * Transpose the given 8x8 block. */ static inline void RENAME(transpose2)(uint8_t *dst, int dstStride, uint8_t *src) { @@ -2472,7 +2472,7 @@ int64_t dc_mask, eq_mask, both_masks; int64_t sums[10*8*2]; src+= step*3; // src points to begin of the 8x8 Block -//START_TIMER + //{ START_TIMER __asm__ volatile( "movq %0, %%mm7 \n\t" "movq %1, %%mm6 \n\t" @@ -2998,7 +2998,8 @@ STOP_TIMER("step16") }else{ STOP_TIMER("stepX") -}*/ +} + } */ } #endif //HAVE_MMX @@ -3372,14 +3373,14 @@ linecpy(tempSrc + srcStride*copyAhead, srcBlock + srcStride*copyAhead, FFMAX(height-y-copyAhead, 0), srcStride); - /* duplicate last line of src to fill the void upto line (copyAhead+7) */ + /* duplicate last line of src to fill the void up to line (copyAhead+7) */ for(i=FFMAX(height-y, 8); i $(@:.o=.d) + $(YASM) $(YASMFLAGS) -I $(0; width--) { + for (width = 63; width > 0; width--) { int dstOffset; - for(dstOffset=128; dstOffset<196; dstOffset+=4) { + for (dstOffset = 128; dstOffset < 196; dstOffset += 4) { int srcOffset; memset(dstBuffer, dstByte, SIZE); - for(srcOffset=128; srcOffset<196; srcOffset+=4) { - uint8_t *src= srcBuffer+srcOffset; - uint8_t *dst= dstBuffer+dstOffset; - const char *name=NULL; - - if(failed) break; //don't fill the screen with shit ... + for (srcOffset = 128; srcOffset < 196; srcOffset += 4) { + uint8_t *src = srcBuffer + srcOffset; + uint8_t *dst = dstBuffer + dstOffset; + const char *name = NULL; + + // don't fill the screen with shit ... + if (failed) + break; srcBpp = func_info[funcNum].src_bpp; dstBpp = func_info[funcNum].dst_bpp; name = func_info[funcNum].name; - func_info[funcNum].func(src, dst, width*srcBpp); + func_info[funcNum].func(src, dst, width * srcBpp); - if(!srcBpp) break; + if (!srcBpp) + break; - for(i=0; i> 19; dest[i] = (t < 0) ? 0 : ((t > 255) ? 255 : t); } @@ -92,40 +92,31 @@ } } +//FIXME remove the usage of scratch buffers. static void -yuv2yuvX_altivec_real(SwsContext *c, - const int16_t *lumFilter, const int16_t **lumSrc, - int lumFilterSize, const int16_t *chrFilter, - const int16_t **chrUSrc, const int16_t **chrVSrc, - int chrFilterSize, const int16_t **alpSrc, - uint8_t *dest, uint8_t *uDest, - uint8_t *vDest, uint8_t *aDest, - int dstW, int chrDstW) +yuv2planeX_altivec(const int16_t *filter, int filterSize, + const int16_t **src, uint8_t *dest, int dstW, + const uint8_t *dither, int offset) { - const vector signed int vini = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)}; register int i, j; { DECLARE_ALIGNED(16, int, val)[dstW]; - for (i = 0; i < (dstW -7); i+=4) { - vec_st(vini, i << 2, val); - } - for (; i < dstW; i++) { - val[i] = (1 << 18); - } + for (i=0; i 12) { + if ((((uintptr_t)src + srcPos) % 16) > 12) { src_v1 = vec_ld(srcPos + 16, src); } src_vF = vec_perm(src_v0, src_v1, vec_lvsl(srcPos, src)); @@ -290,7 +213,7 @@ vector unsigned char src_v1, src_vF; vector signed short src_v, filter_v; vector signed int val_v, val_s; - if ((((int)src + srcPos)% 16) > 8) { + if ((((uintptr_t)src + srcPos) % 16) > 8) { src_v1 = vec_ld(srcPos + 16, src); } src_vF = vec_perm(src_v0, src_v1, vec_lvsl(srcPos, src)); @@ -376,7 +299,7 @@ //vector unsigned char src_v0 = vec_ld(srcPos + j, src); vector unsigned char src_v1, src_vF; vector signed short src_v, filter_v1R, filter_v; - if ((((int)src + srcPos)% 16) > 8) { + if ((((uintptr_t)src + srcPos) % 16) > 8) { src_v1 = vec_ld(srcPos + j + 16, src); } src_vF = vec_perm(src_v0, src_v1, permS); @@ -408,17 +331,25 @@ if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) return; - c->hScale = hScale_altivec_real; - if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat)) { - c->yuv2yuvX = yuv2yuvX_altivec_real; + if (c->srcBpc == 8 && c->dstBpc <= 10) { + c->hyScale = c->hcScale = hScale_altivec_real; + } + if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) && + dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21 && + !c->alpPixBuf) { + c->yuv2planeX = yuv2planeX_altivec; } /* The following list of supported dstFormat values should * match what's found in the body of ff_yuv2packedX_altivec() */ - if (!(c->flags & (SWS_BITEXACT | SWS_FULL_CHR_H_INT)) && !c->alpPixBuf && - (c->dstFormat==PIX_FMT_ABGR || c->dstFormat==PIX_FMT_BGRA || - c->dstFormat==PIX_FMT_BGR24 || c->dstFormat==PIX_FMT_RGB24 || - c->dstFormat==PIX_FMT_RGBA || c->dstFormat==PIX_FMT_ARGB)) { - c->yuv2packedX = ff_yuv2packedX_altivec; + if (!(c->flags & (SWS_BITEXACT | SWS_FULL_CHR_H_INT)) && !c->alpPixBuf) { + switch (c->dstFormat) { + case PIX_FMT_ABGR: c->yuv2packedX = ff_yuv2abgr_X_altivec; break; + case PIX_FMT_BGRA: c->yuv2packedX = ff_yuv2bgra_X_altivec; break; + case PIX_FMT_ARGB: c->yuv2packedX = ff_yuv2argb_X_altivec; break; + case PIX_FMT_RGBA: c->yuv2packedX = ff_yuv2rgba_X_altivec; break; + case PIX_FMT_BGR24: c->yuv2packedX = ff_yuv2bgr24_X_altivec; break; + case PIX_FMT_RGB24: c->yuv2packedX = ff_yuv2rgb24_X_altivec; break; } + } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/ppc/yuv2rgb_altivec.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/ppc/yuv2rgb_altivec.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/ppc/yuv2rgb_altivec.c 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/ppc/yuv2rgb_altivec.c 2012-01-11 00:34:30.000000000 +0000 @@ -626,13 +626,13 @@ } -void +static av_always_inline void ff_yuv2packedX_altivec(SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, - int dstW, int dstY) + int dstW, int dstY, enum PixelFormat target) { int i,j; vector signed short X,X0,X1,Y0,U0,V0,Y1,U1,V1,U,V; @@ -706,7 +706,7 @@ G = vec_packclp (G0,G1); B = vec_packclp (B0,B1); - switch(c->dstFormat) { + switch(target) { case PIX_FMT_ABGR: out_abgr (R,G,B,out); break; case PIX_FMT_BGRA: out_bgra (R,G,B,out); break; case PIX_FMT_RGBA: out_rgba (R,G,B,out); break; @@ -785,7 +785,7 @@ B = vec_packclp (B0,B1); nout = (vector unsigned char *)scratch; - switch(c->dstFormat) { + switch(target) { case PIX_FMT_ABGR: out_abgr (R,G,B,nout); break; case PIX_FMT_BGRA: out_bgra (R,G,B,nout); break; case PIX_FMT_RGBA: out_rgba (R,G,B,nout); break; @@ -803,3 +803,23 @@ } } + +#define YUV2PACKEDX_WRAPPER(suffix, pixfmt) \ +void ff_yuv2 ## suffix ## _X_altivec(SwsContext *c, const int16_t *lumFilter, \ + const int16_t **lumSrc, int lumFilterSize, \ + const int16_t *chrFilter, const int16_t **chrUSrc, \ + const int16_t **chrVSrc, int chrFilterSize, \ + const int16_t **alpSrc, uint8_t *dest, \ + int dstW, int dstY) \ +{ \ + ff_yuv2packedX_altivec(c, lumFilter, lumSrc, lumFilterSize, \ + chrFilter, chrUSrc, chrVSrc, chrFilterSize, \ + alpSrc, dest, dstW, dstY, pixfmt); \ +} + +YUV2PACKEDX_WRAPPER(abgr, PIX_FMT_ABGR); +YUV2PACKEDX_WRAPPER(bgra, PIX_FMT_BGRA); +YUV2PACKEDX_WRAPPER(argb, PIX_FMT_ARGB); +YUV2PACKEDX_WRAPPER(rgba, PIX_FMT_RGBA); +YUV2PACKEDX_WRAPPER(rgb24, PIX_FMT_RGB24); +YUV2PACKEDX_WRAPPER(bgr24, PIX_FMT_BGR24); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/ppc/yuv2rgb_altivec.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/ppc/yuv2rgb_altivec.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/ppc/yuv2rgb_altivec.h 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/ppc/yuv2rgb_altivec.h 2012-01-11 00:34:30.000000000 +0000 @@ -21,14 +21,27 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PPC_YUV2RGB_ALTIVEC_H -#define PPC_YUV2RGB_ALTIVEC_H 1 +#ifndef SWSCALE_PPC_YUV2RGB_ALTIVEC_H +#define SWSCALE_PPC_YUV2RGB_ALTIVEC_H -void ff_yuv2packedX_altivec(SwsContext *c, const int16_t *lumFilter, - const int16_t **lumSrc, int lumFilterSize, - const int16_t *chrFilter, const int16_t **chrUSrc, - const int16_t **chrVSrc, int chrFilterSize, - const int16_t **alpSrc, uint8_t *dest, - int dstW, int dstY); +#define YUV2PACKEDX_HEADER(suffix) \ + void ff_yuv2 ## suffix ## _X_altivec(SwsContext *c, \ + const int16_t *lumFilter, \ + const int16_t **lumSrc, \ + int lumFilterSize, \ + const int16_t *chrFilter, \ + const int16_t **chrUSrc, \ + const int16_t **chrVSrc, \ + int chrFilterSize, \ + const int16_t **alpSrc, \ + uint8_t *dest, \ + int dstW, int dstY); -#endif /* PPC_YUV2RGB_ALTIVEC_H */ +YUV2PACKEDX_HEADER(abgr); +YUV2PACKEDX_HEADER(bgra); +YUV2PACKEDX_HEADER(argb); +YUV2PACKEDX_HEADER(rgba); +YUV2PACKEDX_HEADER(rgb24); +YUV2PACKEDX_HEADER(bgr24); + +#endif /* SWSCALE_PPC_YUV2RGB_ALTIVEC_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/rgb2rgb.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/rgb2rgb.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/rgb2rgb.c 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/rgb2rgb.c 2012-01-11 00:34:30.000000000 +0000 @@ -310,8 +310,8 @@ } \ } -DEFINE_SHUFFLE_BYTES(0, 3, 2, 1); -DEFINE_SHUFFLE_BYTES(1, 2, 3, 0); -DEFINE_SHUFFLE_BYTES(3, 0, 1, 2); -DEFINE_SHUFFLE_BYTES(3, 2, 1, 0); +DEFINE_SHUFFLE_BYTES(0, 3, 2, 1) +DEFINE_SHUFFLE_BYTES(1, 2, 3, 0) +DEFINE_SHUFFLE_BYTES(3, 0, 1, 2) +DEFINE_SHUFFLE_BYTES(3, 2, 1, 0) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/rgb2rgb.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/rgb2rgb.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/rgb2rgb.h 2011-05-29 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/rgb2rgb.h 2012-01-11 00:34:30.000000000 +0000 @@ -36,32 +36,33 @@ extern void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); extern void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); extern void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb32to16) (const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb32to15) (const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb15to16) (const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb32to16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb32to15)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size); extern void (*rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb15to32) (const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb16to15) (const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb15to32)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size); extern void (*rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb16to32) (const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb16to32)(const uint8_t *src, uint8_t *dst, int src_size); extern void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb24to16) (const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb24to15) (const uint8_t *src, uint8_t *dst, int src_size); -extern void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb24to16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb24to15)(const uint8_t *src, uint8_t *dst, int src_size); extern void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); -void rgb24to32 (const uint8_t *src, uint8_t *dst, int src_size); -void rgb32to24 (const uint8_t *src, uint8_t *dst, int src_size); +extern void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size); + +void rgb24to32(const uint8_t *src, uint8_t *dst, int src_size); +void rgb32to24(const uint8_t *src, uint8_t *dst, int src_size); void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size); -void rgb16to24 (const uint8_t *src, uint8_t *dst, int src_size); +void rgb16to24(const uint8_t *src, uint8_t *dst, int src_size); void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size); void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size); void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size); -void rgb15to24 (const uint8_t *src, uint8_t *dst, int src_size); +void rgb15to24(const uint8_t *src, uint8_t *dst, int src_size); void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size); void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size); -void bgr8torgb8 (const uint8_t *src, uint8_t *dst, int src_size); +void bgr8torgb8(const uint8_t *src, uint8_t *dst, int src_size); void shuffle_bytes_0321(const uint8_t *src, uint8_t *dst, int src_size); void shuffle_bytes_1230(const uint8_t *src, uint8_t *dst, int src_size); @@ -138,7 +139,6 @@ int srcStride1, int srcStride2, int srcStride3, int dstStride); - extern void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/swscale.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/swscale.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/swscale.c 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/swscale.c 2012-01-11 00:34:30.000000000 +0000 @@ -18,39 +18,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* - supported Input formats: YV12, I420/IYUV, YUY2, UYVY, BGR32, BGR32_1, BGR24, BGR16, BGR15, RGB32, RGB32_1, RGB24, Y8/Y800, YVU9/IF09, PAL8 - supported output formats: YV12, I420/IYUV, YUY2, UYVY, {BGR,RGB}{1,4,8,15,16,24,32}, Y8/Y800, YVU9/IF09 - {BGR,RGB}{1,4,8,15,16} support dithering - - unscaled special converters (YV12=I420=IYUV, Y800=Y8) - YV12 -> {BGR,RGB}{1,4,8,12,15,16,24,32} - x -> x - YUV9 -> YV12 - YUV9/YV12 -> Y800 - Y800 -> YUV9/YV12 - BGR24 -> BGR32 & RGB24 -> RGB32 - BGR32 -> BGR24 & RGB32 -> RGB24 - BGR15 -> BGR16 -*/ - -/* -tested special converters (most are tested actually, but I did not write it down ...) - YV12 -> BGR12/BGR16 - YV12 -> YV12 - BGR15 -> BGR16 - BGR16 -> BGR16 - YVU9 -> YV12 - -untested special converters - YV12/I420 -> BGR15/BGR24/BGR32 (it is the yuv2rgb stuff, so it should be OK) - YV12/I420 -> YV12/I420 - YUY2/BGR15/BGR24/BGR32/RGB24/RGB32 -> same format - BGR24 -> BGR32 & RGB24 -> RGB32 - BGR32 -> BGR24 & RGB32 -> RGB24 - BGR24 -> YV12 -*/ - #include #include #include @@ -80,17 +47,6 @@ #define RV ( (int)(0.500*224/255*(1<> shift)); \ + } else { \ + AV_WL16(pos, bias + av_clip_ ## signedness ## 16(val >> shift)); \ + } static av_always_inline void -yuv2yuvX16_c_template(const int16_t *lumFilter, const int16_t **lumSrc, - int lumFilterSize, const int16_t *chrFilter, - const int16_t **chrUSrc, const int16_t **chrVSrc, - int chrFilterSize, const int16_t **alpSrc, - uint16_t *dest, uint16_t *uDest, uint16_t *vDest, - uint16_t *aDest, int dstW, int chrDstW, - int big_endian, int output_bits) +yuv2plane1_16_c_template(const int32_t *src, uint16_t *dest, int dstW, + int big_endian, int output_bits) { - //FIXME Optimize (just quickly written not optimized..) int i; - int shift = 11 + 16 - output_bits; + int shift = 19 - output_bits; -#define output_pixel(pos, val) \ - if (big_endian) { \ - if (output_bits == 16) { \ - AV_WB16(pos, av_clip_uint16(val >> shift)); \ - } else { \ - AV_WB16(pos, av_clip_uintp2(val >> shift, output_bits)); \ - } \ - } else { \ - if (output_bits == 16) { \ - AV_WL16(pos, av_clip_uint16(val >> shift)); \ - } else { \ - AV_WL16(pos, av_clip_uintp2(val >> shift, output_bits)); \ - } \ + for (i = 0; i < dstW; i++) { + int val = src[i] + (1 << (shift - 1)); + output_pixel(&dest[i], val, 0, uint); } +} + +static av_always_inline void +yuv2planeX_16_c_template(const int16_t *filter, int filterSize, + const int32_t **src, uint16_t *dest, int dstW, + int big_endian, int output_bits) +{ + int i; + int shift = 15 + 16 - output_bits; + for (i = 0; i < dstW; i++) { - int val = 1 << (26-output_bits); + int val = 1 << (30-output_bits); int j; - for (j = 0; j < lumFilterSize; j++) - val += lumSrc[j][i] * lumFilter[j]; + /* range of val is [0,0x7FFFFFFF], so 31 bits, but with lanczos/spline + * filters (or anything with negative coeffs, the range can be slightly + * wider in both directions. To account for this overflow, we subtract + * a constant so it always fits in the signed range (assuming a + * reasonable filterSize), and re-add that at the end. */ + val -= 0x40000000; + for (j = 0; j < filterSize; j++) + val += src[j][i] * filter[j]; - output_pixel(&dest[i], val); + output_pixel(&dest[i], val, 0x8000, int); } +} - if (uDest) { - for (i = 0; i < chrDstW; i++) { - int u = 1 << (26-output_bits); - int v = 1 << (26-output_bits); - int j; +#undef output_pixel - for (j = 0; j < chrFilterSize; j++) { - u += chrUSrc[j][i] * chrFilter[j]; - v += chrVSrc[j][i] * chrFilter[j]; - } +#define output_pixel(pos, val) \ + if (big_endian) { \ + AV_WB16(pos, av_clip_uintp2(val >> shift, output_bits)); \ + } else { \ + AV_WL16(pos, av_clip_uintp2(val >> shift, output_bits)); \ + } - output_pixel(&uDest[i], u); - output_pixel(&vDest[i], v); - } +static av_always_inline void +yuv2plane1_10_c_template(const int16_t *src, uint16_t *dest, int dstW, + int big_endian, int output_bits) +{ + int i; + int shift = 15 - output_bits; + + for (i = 0; i < dstW; i++) { + int val = src[i] + (1 << (shift - 1)); + output_pixel(&dest[i], val); } +} - if (CONFIG_SWSCALE_ALPHA && aDest) { - for (i = 0; i < dstW; i++) { - int val = 1 << (26-output_bits); - int j; +static av_always_inline void +yuv2planeX_10_c_template(const int16_t *filter, int filterSize, + const int16_t **src, uint16_t *dest, int dstW, + int big_endian, int output_bits) +{ + int i; + int shift = 11 + 16 - output_bits; - for (j = 0; j < lumFilterSize; j++) - val += alpSrc[j][i] * lumFilter[j]; + for (i = 0; i < dstW; i++) { + int val = 1 << (26-output_bits); + int j; - output_pixel(&aDest[i], val); - } + for (j = 0; j < filterSize; j++) + val += src[j][i] * filter[j]; + + output_pixel(&dest[i], val); } -#undef output_pixel } -#define yuv2NBPS(bits, BE_LE, is_be) \ -static void yuv2yuvX ## bits ## BE_LE ## _c(SwsContext *c, const int16_t *lumFilter, \ - const int16_t **lumSrc, int lumFilterSize, \ - const int16_t *chrFilter, const int16_t **chrUSrc, \ - const int16_t **chrVSrc, \ - int chrFilterSize, const int16_t **alpSrc, \ - uint8_t *_dest, uint8_t *_uDest, uint8_t *_vDest, \ - uint8_t *_aDest, int dstW, int chrDstW) \ +#undef output_pixel + +#define yuv2NBPS(bits, BE_LE, is_be, template_size, typeX_t) \ +static void yuv2plane1_ ## bits ## BE_LE ## _c(const int16_t *src, \ + uint8_t *dest, int dstW, \ + const uint8_t *dither, int offset)\ { \ - uint16_t *dest = (uint16_t *) _dest, *uDest = (uint16_t *) _uDest, \ - *vDest = (uint16_t *) _vDest, *aDest = (uint16_t *) _aDest; \ - yuv2yuvX16_c_template(lumFilter, lumSrc, lumFilterSize, \ - chrFilter, chrUSrc, chrVSrc, chrFilterSize, \ - alpSrc, \ - dest, uDest, vDest, aDest, \ - dstW, chrDstW, is_be, bits); \ -} -yuv2NBPS( 9, BE, 1); -yuv2NBPS( 9, LE, 0); -yuv2NBPS(10, BE, 1); -yuv2NBPS(10, LE, 0); -yuv2NBPS(16, BE, 1); -yuv2NBPS(16, LE, 0); - -static void yuv2yuvX_c(SwsContext *c, const int16_t *lumFilter, - const int16_t **lumSrc, int lumFilterSize, - const int16_t *chrFilter, const int16_t **chrUSrc, - const int16_t **chrVSrc, - int chrFilterSize, const int16_t **alpSrc, - uint8_t *dest, uint8_t *uDest, uint8_t *vDest, - uint8_t *aDest, int dstW, int chrDstW) + yuv2plane1_ ## template_size ## _c_template((const typeX_t *) src, \ + (uint16_t *) dest, dstW, is_be, bits); \ +}\ +static void yuv2planeX_ ## bits ## BE_LE ## _c(const int16_t *filter, int filterSize, \ + const int16_t **src, uint8_t *dest, int dstW, \ + const uint8_t *dither, int offset)\ +{ \ + yuv2planeX_## template_size ## _c_template(filter, \ + filterSize, (const typeX_t **) src, \ + (uint16_t *) dest, dstW, is_be, bits); \ +} +yuv2NBPS( 9, BE, 1, 10, int16_t) +yuv2NBPS( 9, LE, 0, 10, int16_t) +yuv2NBPS(10, BE, 1, 10, int16_t) +yuv2NBPS(10, LE, 0, 10, int16_t) +yuv2NBPS(16, BE, 1, 16, int32_t) +yuv2NBPS(16, LE, 0, 16, int32_t) + +static void yuv2planeX_8_c(const int16_t *filter, int filterSize, + const int16_t **src, uint8_t *dest, int dstW, + const uint8_t *dither, int offset) { - //FIXME Optimize (just quickly written not optimized..) int i; for (i=0; i>19); } - - if (uDest) - for (i=0; i>19); - vDest[i]= av_clip_uint8(v>>19); - } - - if (CONFIG_SWSCALE_ALPHA && aDest) - for (i=0; i>19); - } } -static void yuv2yuv1_c(SwsContext *c, const int16_t *lumSrc, - const int16_t *chrUSrc, const int16_t *chrVSrc, - const int16_t *alpSrc, - uint8_t *dest, uint8_t *uDest, uint8_t *vDest, - uint8_t *aDest, int dstW, int chrDstW) +static void yuv2plane1_8_c(const int16_t *src, uint8_t *dest, int dstW, + const uint8_t *dither, int offset) { int i; for (i=0; i>7; + int val = (src[i] + dither[(i + offset) & 7]) >> 7; dest[i]= av_clip_uint8(val); } - - if (uDest) - for (i=0; i>7; - int v=(chrVSrc[i]+64)>>7; - uDest[i]= av_clip_uint8(u); - vDest[i]= av_clip_uint8(v); - } - - if (CONFIG_SWSCALE_ALPHA && aDest) - for (i=0; i>7; - aDest[i]= av_clip_uint8(val); - } } -static void yuv2nv12X_c(SwsContext *c, const int16_t *lumFilter, - const int16_t **lumSrc, int lumFilterSize, - const int16_t *chrFilter, const int16_t **chrUSrc, - const int16_t **chrVSrc, int chrFilterSize, - const int16_t **alpSrc, uint8_t *dest, uint8_t *uDest, - uint8_t *vDest, uint8_t *aDest, - int dstW, int chrDstW) +static void yuv2nv12cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterSize, + const int16_t **chrUSrc, const int16_t **chrVSrc, + uint8_t *dest, int chrDstW) { enum PixelFormat dstFormat = c->dstFormat; - - //FIXME Optimize (just quickly written not optimized..) + const uint8_t *chrDither = c->chrDither8; int i; - for (i=0; i>19); - } - - if (!uDest) - return; if (dstFormat == PIX_FMT_NV12) for (i=0; i>19); - uDest[2*i+1]= av_clip_uint8(v>>19); + dest[2*i]= av_clip_uint8(u>>19); + dest[2*i+1]= av_clip_uint8(v>>19); } else for (i=0; i>19); - uDest[2*i+1]= av_clip_uint8(u>>19); + dest[2*i]= av_clip_uint8(v>>19); + dest[2*i+1]= av_clip_uint8(u>>19); } } @@ -417,118 +343,119 @@ static av_always_inline void yuv2gray16_X_c_template(SwsContext *c, const int16_t *lumFilter, - const int16_t **lumSrc, int lumFilterSize, - const int16_t *chrFilter, const int16_t **chrUSrc, - const int16_t **chrVSrc, int chrFilterSize, - const int16_t **alpSrc, uint8_t *dest, int dstW, + const int32_t **lumSrc, int lumFilterSize, + const int16_t *chrFilter, const int32_t **chrUSrc, + const int32_t **chrVSrc, int chrFilterSize, + const int32_t **alpSrc, uint16_t *dest, int dstW, int y, enum PixelFormat target) { int i; for (i = 0; i < (dstW >> 1); i++) { int j; - int Y1 = 1 << 18; - int Y2 = 1 << 18; - const int i2 = 2 * i; + int Y1 = (1 << 14) - 0x40000000; + int Y2 = (1 << 14) - 0x40000000; for (j = 0; j < lumFilterSize; j++) { - Y1 += lumSrc[j][i2] * lumFilter[j]; - Y2 += lumSrc[j][i2+1] * lumFilter[j]; - } - Y1 >>= 11; - Y2 >>= 11; - if ((Y1 | Y2) & 0x10000) { - Y1 = av_clip_uint16(Y1); - Y2 = av_clip_uint16(Y2); + Y1 += lumSrc[j][i * 2] * lumFilter[j]; + Y2 += lumSrc[j][i * 2 + 1] * lumFilter[j]; } - output_pixel(&dest[2 * i2 + 0], Y1); - output_pixel(&dest[2 * i2 + 2], Y2); + Y1 >>= 15; + Y2 >>= 15; + Y1 = av_clip_int16(Y1); + Y2 = av_clip_int16(Y2); + output_pixel(&dest[i * 2 + 0], 0x8000 + Y1); + output_pixel(&dest[i * 2 + 1], 0x8000 + Y2); } } static av_always_inline void -yuv2gray16_2_c_template(SwsContext *c, const uint16_t *buf0, - const uint16_t *buf1, const uint16_t *ubuf0, - const uint16_t *ubuf1, const uint16_t *vbuf0, - const uint16_t *vbuf1, const uint16_t *abuf0, - const uint16_t *abuf1, uint8_t *dest, int dstW, +yuv2gray16_2_c_template(SwsContext *c, const int32_t *buf[2], + const int32_t *ubuf[2], const int32_t *vbuf[2], + const int32_t *abuf[2], uint16_t *dest, int dstW, int yalpha, int uvalpha, int y, enum PixelFormat target) { - int yalpha1 = 4095 - yalpha; \ + int yalpha1 = 4095 - yalpha; int i; + const int32_t *buf0 = buf[0], *buf1 = buf[1]; for (i = 0; i < (dstW >> 1); i++) { - const int i2 = 2 * i; - int Y1 = (buf0[i2 ] * yalpha1 + buf1[i2 ] * yalpha) >> 11; - int Y2 = (buf0[i2+1] * yalpha1 + buf1[i2+1] * yalpha) >> 11; + int Y1 = (buf0[i * 2 ] * yalpha1 + buf1[i * 2 ] * yalpha) >> 15; + int Y2 = (buf0[i * 2 + 1] * yalpha1 + buf1[i * 2 + 1] * yalpha) >> 15; - output_pixel(&dest[2 * i2 + 0], Y1); - output_pixel(&dest[2 * i2 + 2], Y2); + output_pixel(&dest[i * 2 + 0], Y1); + output_pixel(&dest[i * 2 + 1], Y2); } } static av_always_inline void -yuv2gray16_1_c_template(SwsContext *c, const uint16_t *buf0, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, uint8_t *dest, int dstW, - int uvalpha, enum PixelFormat dstFormat, - int flags, int y, enum PixelFormat target) +yuv2gray16_1_c_template(SwsContext *c, const int32_t *buf0, + const int32_t *ubuf[2], const int32_t *vbuf[2], + const int32_t *abuf0, uint16_t *dest, int dstW, + int uvalpha, int y, enum PixelFormat target) { int i; for (i = 0; i < (dstW >> 1); i++) { - const int i2 = 2 * i; - int Y1 = buf0[i2 ] << 1; - int Y2 = buf0[i2+1] << 1; + int Y1 = buf0[i * 2 ] << 1; + int Y2 = buf0[i * 2 + 1] << 1; - output_pixel(&dest[2 * i2 + 0], Y1); - output_pixel(&dest[2 * i2 + 2], Y2); + output_pixel(&dest[i * 2 + 0], Y1); + output_pixel(&dest[i * 2 + 1], Y2); } } #undef output_pixel -#define YUV2PACKEDWRAPPER(name, base, ext, fmt) \ +#define YUV2PACKED16WRAPPER(name, base, ext, fmt) \ static void name ## ext ## _X_c(SwsContext *c, const int16_t *lumFilter, \ - const int16_t **lumSrc, int lumFilterSize, \ - const int16_t *chrFilter, const int16_t **chrUSrc, \ - const int16_t **chrVSrc, int chrFilterSize, \ - const int16_t **alpSrc, uint8_t *dest, int dstW, \ + const int16_t **_lumSrc, int lumFilterSize, \ + const int16_t *chrFilter, const int16_t **_chrUSrc, \ + const int16_t **_chrVSrc, int chrFilterSize, \ + const int16_t **_alpSrc, uint8_t *_dest, int dstW, \ int y) \ { \ + const int32_t **lumSrc = (const int32_t **) _lumSrc, \ + **chrUSrc = (const int32_t **) _chrUSrc, \ + **chrVSrc = (const int32_t **) _chrVSrc, \ + **alpSrc = (const int32_t **) _alpSrc; \ + uint16_t *dest = (uint16_t *) _dest; \ name ## base ## _X_c_template(c, lumFilter, lumSrc, lumFilterSize, \ chrFilter, chrUSrc, chrVSrc, chrFilterSize, \ alpSrc, dest, dstW, y, fmt); \ } \ \ -static void name ## ext ## _2_c(SwsContext *c, const uint16_t *buf0, \ - const uint16_t *buf1, const uint16_t *ubuf0, \ - const uint16_t *ubuf1, const uint16_t *vbuf0, \ - const uint16_t *vbuf1, const uint16_t *abuf0, \ - const uint16_t *abuf1, uint8_t *dest, int dstW, \ +static void name ## ext ## _2_c(SwsContext *c, const int16_t *_buf[2], \ + const int16_t *_ubuf[2], const int16_t *_vbuf[2], \ + const int16_t *_abuf[2], uint8_t *_dest, int dstW, \ int yalpha, int uvalpha, int y) \ { \ - name ## base ## _2_c_template(c, buf0, buf1, ubuf0, ubuf1, \ - vbuf0, vbuf1, abuf0, abuf1, \ + const int32_t **buf = (const int32_t **) _buf, \ + **ubuf = (const int32_t **) _ubuf, \ + **vbuf = (const int32_t **) _vbuf, \ + **abuf = (const int32_t **) _abuf; \ + uint16_t *dest = (uint16_t *) _dest; \ + name ## base ## _2_c_template(c, buf, ubuf, vbuf, abuf, \ dest, dstW, yalpha, uvalpha, y, fmt); \ } \ \ -static void name ## ext ## _1_c(SwsContext *c, const uint16_t *buf0, \ - const uint16_t *ubuf0, const uint16_t *ubuf1, \ - const uint16_t *vbuf0, const uint16_t *vbuf1, \ - const uint16_t *abuf0, uint8_t *dest, int dstW, \ - int uvalpha, enum PixelFormat dstFormat, \ - int flags, int y) \ +static void name ## ext ## _1_c(SwsContext *c, const int16_t *_buf0, \ + const int16_t *_ubuf[2], const int16_t *_vbuf[2], \ + const int16_t *_abuf0, uint8_t *_dest, int dstW, \ + int uvalpha, int y) \ { \ - name ## base ## _1_c_template(c, buf0, ubuf0, ubuf1, vbuf0, \ - vbuf1, abuf0, dest, dstW, uvalpha, \ - dstFormat, flags, y, fmt); \ + const int32_t *buf0 = (const int32_t *) _buf0, \ + **ubuf = (const int32_t **) _ubuf, \ + **vbuf = (const int32_t **) _vbuf, \ + *abuf0 = (const int32_t *) _abuf0; \ + uint16_t *dest = (uint16_t *) _dest; \ + name ## base ## _1_c_template(c, buf0, ubuf, vbuf, abuf0, dest, \ + dstW, uvalpha, y, fmt); \ } -YUV2PACKEDWRAPPER(yuv2gray16,, LE, PIX_FMT_GRAY16LE); -YUV2PACKEDWRAPPER(yuv2gray16,, BE, PIX_FMT_GRAY16BE); +YUV2PACKED16WRAPPER(yuv2gray16,, LE, PIX_FMT_GRAY16LE) +YUV2PACKED16WRAPPER(yuv2gray16,, BE, PIX_FMT_GRAY16BE) #define output_pixel(pos, acc) \ if (target == PIX_FMT_MONOBLACK) { \ @@ -548,7 +475,7 @@ const uint8_t * const d128=dither_8x8_220[y&7]; uint8_t *g = c->table_gU[128] + c->table_gV[128]; int i; - int acc = 0; + unsigned acc = 0; for (i = 0; i < dstW - 1; i += 2) { int j; @@ -574,14 +501,13 @@ } static av_always_inline void -yuv2mono_2_c_template(SwsContext *c, const uint16_t *buf0, - const uint16_t *buf1, const uint16_t *ubuf0, - const uint16_t *ubuf1, const uint16_t *vbuf0, - const uint16_t *vbuf1, const uint16_t *abuf0, - const uint16_t *abuf1, uint8_t *dest, int dstW, +yuv2mono_2_c_template(SwsContext *c, const int16_t *buf[2], + const int16_t *ubuf[2], const int16_t *vbuf[2], + const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum PixelFormat target) { + const int16_t *buf0 = buf[0], *buf1 = buf[1]; const uint8_t * const d128 = dither_8x8_220[y & 7]; uint8_t *g = c->table_gU[128] + c->table_gV[128]; int yalpha1 = 4095 - yalpha; @@ -601,12 +527,10 @@ } static av_always_inline void -yuv2mono_1_c_template(SwsContext *c, const uint16_t *buf0, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, uint8_t *dest, int dstW, - int uvalpha, enum PixelFormat dstFormat, - int flags, int y, enum PixelFormat target) +yuv2mono_1_c_template(SwsContext *c, const int16_t *buf0, + const int16_t *ubuf[2], const int16_t *vbuf[2], + const int16_t *abuf0, uint8_t *dest, int dstW, + int uvalpha, int y, enum PixelFormat target) { const uint8_t * const d128 = dither_8x8_220[y & 7]; uint8_t *g = c->table_gU[128] + c->table_gV[128]; @@ -627,8 +551,40 @@ #undef output_pixel -YUV2PACKEDWRAPPER(yuv2mono,, white, PIX_FMT_MONOWHITE); -YUV2PACKEDWRAPPER(yuv2mono,, black, PIX_FMT_MONOBLACK); +#define YUV2PACKEDWRAPPER(name, base, ext, fmt) \ +static void name ## ext ## _X_c(SwsContext *c, const int16_t *lumFilter, \ + const int16_t **lumSrc, int lumFilterSize, \ + const int16_t *chrFilter, const int16_t **chrUSrc, \ + const int16_t **chrVSrc, int chrFilterSize, \ + const int16_t **alpSrc, uint8_t *dest, int dstW, \ + int y) \ +{ \ + name ## base ## _X_c_template(c, lumFilter, lumSrc, lumFilterSize, \ + chrFilter, chrUSrc, chrVSrc, chrFilterSize, \ + alpSrc, dest, dstW, y, fmt); \ +} \ + \ +static void name ## ext ## _2_c(SwsContext *c, const int16_t *buf[2], \ + const int16_t *ubuf[2], const int16_t *vbuf[2], \ + const int16_t *abuf[2], uint8_t *dest, int dstW, \ + int yalpha, int uvalpha, int y) \ +{ \ + name ## base ## _2_c_template(c, buf, ubuf, vbuf, abuf, \ + dest, dstW, yalpha, uvalpha, y, fmt); \ +} \ + \ +static void name ## ext ## _1_c(SwsContext *c, const int16_t *buf0, \ + const int16_t *ubuf[2], const int16_t *vbuf[2], \ + const int16_t *abuf0, uint8_t *dest, int dstW, \ + int uvalpha, int y) \ +{ \ + name ## base ## _1_c_template(c, buf0, ubuf, vbuf, \ + abuf0, dest, dstW, uvalpha, \ + y, fmt); \ +} + +YUV2PACKEDWRAPPER(yuv2mono,, white, PIX_FMT_MONOWHITE) +YUV2PACKEDWRAPPER(yuv2mono,, black, PIX_FMT_MONOBLACK) #define output_pixels(pos, Y1, U, Y2, V) \ if (target == PIX_FMT_YUYV422) { \ @@ -683,14 +639,15 @@ } static av_always_inline void -yuv2422_2_c_template(SwsContext *c, const uint16_t *buf0, - const uint16_t *buf1, const uint16_t *ubuf0, - const uint16_t *ubuf1, const uint16_t *vbuf0, - const uint16_t *vbuf1, const uint16_t *abuf0, - const uint16_t *abuf1, uint8_t *dest, int dstW, +yuv2422_2_c_template(SwsContext *c, const int16_t *buf[2], + const int16_t *ubuf[2], const int16_t *vbuf[2], + const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum PixelFormat target) { + const int16_t *buf0 = buf[0], *buf1 = buf[1], + *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], + *vbuf0 = vbuf[0], *vbuf1 = vbuf[1]; int yalpha1 = 4095 - yalpha; int uvalpha1 = 4095 - uvalpha; int i; @@ -706,13 +663,13 @@ } static av_always_inline void -yuv2422_1_c_template(SwsContext *c, const uint16_t *buf0, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, uint8_t *dest, int dstW, - int uvalpha, enum PixelFormat dstFormat, - int flags, int y, enum PixelFormat target) +yuv2422_1_c_template(SwsContext *c, const int16_t *buf0, + const int16_t *ubuf[2], const int16_t *vbuf[2], + const int16_t *abuf0, uint8_t *dest, int dstW, + int uvalpha, int y, enum PixelFormat target) { + const int16_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], + *vbuf0 = vbuf[0], *vbuf1 = vbuf[1]; int i; if (uvalpha < 2048) { @@ -738,29 +695,333 @@ #undef output_pixels -YUV2PACKEDWRAPPER(yuv2, 422, yuyv422, PIX_FMT_YUYV422); -YUV2PACKEDWRAPPER(yuv2, 422, uyvy422, PIX_FMT_UYVY422); +YUV2PACKEDWRAPPER(yuv2, 422, yuyv422, PIX_FMT_YUYV422) +YUV2PACKEDWRAPPER(yuv2, 422, uyvy422, PIX_FMT_UYVY422) -#define r_b ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? r : b) -#define b_r ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? b : r) +#define R_B ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? R : B) +#define B_R ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? B : R) +#define output_pixel(pos, val) \ + if (isBE(target)) { \ + AV_WB16(pos, val); \ + } else { \ + AV_WL16(pos, val); \ + } static av_always_inline void yuv2rgb48_X_c_template(SwsContext *c, const int16_t *lumFilter, - const int16_t **lumSrc, int lumFilterSize, - const int16_t *chrFilter, const int16_t **chrUSrc, - const int16_t **chrVSrc, int chrFilterSize, - const int16_t **alpSrc, uint8_t *dest, int dstW, + const int32_t **lumSrc, int lumFilterSize, + const int16_t *chrFilter, const int32_t **chrUSrc, + const int32_t **chrVSrc, int chrFilterSize, + const int32_t **alpSrc, uint16_t *dest, int dstW, int y, enum PixelFormat target) { int i; for (i = 0; i < (dstW >> 1); i++) { int j; + int Y1 = -0x40000000; + int Y2 = -0x40000000; + int U = -128 << 23; // 19 + int V = -128 << 23; + int R, G, B; + + for (j = 0; j < lumFilterSize; j++) { + Y1 += lumSrc[j][i * 2] * lumFilter[j]; + Y2 += lumSrc[j][i * 2 + 1] * lumFilter[j]; + } + for (j = 0; j < chrFilterSize; j++) { + U += chrUSrc[j][i] * chrFilter[j]; + V += chrVSrc[j][i] * chrFilter[j]; + } + + // 8bit: 12+15=27; 16-bit: 12+19=31 + Y1 >>= 14; // 10 + Y1 += 0x10000; + Y2 >>= 14; + Y2 += 0x10000; + U >>= 14; + V >>= 14; + + // 8bit: 27 -> 17bit, 16bit: 31 - 14 = 17bit + Y1 -= c->yuv2rgb_y_offset; + Y2 -= c->yuv2rgb_y_offset; + Y1 *= c->yuv2rgb_y_coeff; + Y2 *= c->yuv2rgb_y_coeff; + Y1 += 1 << 13; // 21 + Y2 += 1 << 13; + // 8bit: 17 + 13bit = 30bit, 16bit: 17 + 13bit = 30bit + + R = V * c->yuv2rgb_v2r_coeff; + G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; + B = U * c->yuv2rgb_u2b_coeff; + + // 8bit: 30 - 22 = 8bit, 16bit: 30bit - 14 = 16bit + output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14); + output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14); + output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14); + output_pixel(&dest[3], av_clip_uintp2(R_B + Y2, 30) >> 14); + output_pixel(&dest[4], av_clip_uintp2( G + Y2, 30) >> 14); + output_pixel(&dest[5], av_clip_uintp2(B_R + Y2, 30) >> 14); + dest += 6; + } +} + +static av_always_inline void +yuv2rgb48_2_c_template(SwsContext *c, const int32_t *buf[2], + const int32_t *ubuf[2], const int32_t *vbuf[2], + const int32_t *abuf[2], uint16_t *dest, int dstW, + int yalpha, int uvalpha, int y, + enum PixelFormat target) +{ + const int32_t *buf0 = buf[0], *buf1 = buf[1], + *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], + *vbuf0 = vbuf[0], *vbuf1 = vbuf[1]; + int yalpha1 = 4095 - yalpha; + int uvalpha1 = 4095 - uvalpha; + int i; + + for (i = 0; i < (dstW >> 1); i++) { + int Y1 = (buf0[i * 2] * yalpha1 + buf1[i * 2] * yalpha) >> 14; + int Y2 = (buf0[i * 2 + 1] * yalpha1 + buf1[i * 2 + 1] * yalpha) >> 14; + int U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha + (-128 << 23)) >> 14; + int V = (vbuf0[i] * uvalpha1 + vbuf1[i] * uvalpha + (-128 << 23)) >> 14; + int R, G, B; + + Y1 -= c->yuv2rgb_y_offset; + Y2 -= c->yuv2rgb_y_offset; + Y1 *= c->yuv2rgb_y_coeff; + Y2 *= c->yuv2rgb_y_coeff; + Y1 += 1 << 13; + Y2 += 1 << 13; + + R = V * c->yuv2rgb_v2r_coeff; + G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; + B = U * c->yuv2rgb_u2b_coeff; + + output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14); + output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14); + output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14); + output_pixel(&dest[3], av_clip_uintp2(R_B + Y2, 30) >> 14); + output_pixel(&dest[4], av_clip_uintp2( G + Y2, 30) >> 14); + output_pixel(&dest[5], av_clip_uintp2(B_R + Y2, 30) >> 14); + dest += 6; + } +} + +static av_always_inline void +yuv2rgb48_1_c_template(SwsContext *c, const int32_t *buf0, + const int32_t *ubuf[2], const int32_t *vbuf[2], + const int32_t *abuf0, uint16_t *dest, int dstW, + int uvalpha, int y, enum PixelFormat target) +{ + const int32_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], + *vbuf0 = vbuf[0], *vbuf1 = vbuf[1]; + int i; + + if (uvalpha < 2048) { + for (i = 0; i < (dstW >> 1); i++) { + int Y1 = (buf0[i * 2] ) >> 2; + int Y2 = (buf0[i * 2 + 1]) >> 2; + int U = (ubuf0[i] + (-128 << 11)) >> 2; + int V = (vbuf0[i] + (-128 << 11)) >> 2; + int R, G, B; + + Y1 -= c->yuv2rgb_y_offset; + Y2 -= c->yuv2rgb_y_offset; + Y1 *= c->yuv2rgb_y_coeff; + Y2 *= c->yuv2rgb_y_coeff; + Y1 += 1 << 13; + Y2 += 1 << 13; + + R = V * c->yuv2rgb_v2r_coeff; + G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; + B = U * c->yuv2rgb_u2b_coeff; + + output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14); + output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14); + output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14); + output_pixel(&dest[3], av_clip_uintp2(R_B + Y2, 30) >> 14); + output_pixel(&dest[4], av_clip_uintp2( G + Y2, 30) >> 14); + output_pixel(&dest[5], av_clip_uintp2(B_R + Y2, 30) >> 14); + dest += 6; + } + } else { + for (i = 0; i < (dstW >> 1); i++) { + int Y1 = (buf0[i * 2] ) >> 2; + int Y2 = (buf0[i * 2 + 1]) >> 2; + int U = (ubuf0[i] + ubuf1[i] + (-128 << 11)) >> 3; + int V = (vbuf0[i] + vbuf1[i] + (-128 << 11)) >> 3; + int R, G, B; + + Y1 -= c->yuv2rgb_y_offset; + Y2 -= c->yuv2rgb_y_offset; + Y1 *= c->yuv2rgb_y_coeff; + Y2 *= c->yuv2rgb_y_coeff; + Y1 += 1 << 13; + Y2 += 1 << 13; + + R = V * c->yuv2rgb_v2r_coeff; + G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff; + B = U * c->yuv2rgb_u2b_coeff; + + output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14); + output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14); + output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14); + output_pixel(&dest[3], av_clip_uintp2(R_B + Y2, 30) >> 14); + output_pixel(&dest[4], av_clip_uintp2( G + Y2, 30) >> 14); + output_pixel(&dest[5], av_clip_uintp2(B_R + Y2, 30) >> 14); + dest += 6; + } + } +} + +#undef output_pixel +#undef r_b +#undef b_r + +YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE) +YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, PIX_FMT_RGB48LE) +YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE) +YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, PIX_FMT_BGR48LE) + +/* + * Write out 2 RGB pixels in the target pixel format. This function takes a + * R/G/B LUT as generated by ff_yuv2rgb_c_init_tables(), which takes care of + * things like endianness conversion and shifting. The caller takes care of + * setting the correct offset in these tables from the chroma (U/V) values. + * This function then uses the luminance (Y1/Y2) values to write out the + * correct RGB values into the destination buffer. + */ +static av_always_inline void +yuv2rgb_write(uint8_t *_dest, int i, unsigned Y1, unsigned Y2, + unsigned A1, unsigned A2, + const void *_r, const void *_g, const void *_b, int y, + enum PixelFormat target, int hasAlpha) +{ + if (target == PIX_FMT_ARGB || target == PIX_FMT_RGBA || + target == PIX_FMT_ABGR || target == PIX_FMT_BGRA) { + uint32_t *dest = (uint32_t *) _dest; + const uint32_t *r = (const uint32_t *) _r; + const uint32_t *g = (const uint32_t *) _g; + const uint32_t *b = (const uint32_t *) _b; + +#if CONFIG_SMALL + int sh = hasAlpha ? ((target == PIX_FMT_RGB32_1 || target == PIX_FMT_BGR32_1) ? 0 : 24) : 0; + + dest[i * 2 + 0] = r[Y1] + g[Y1] + b[Y1] + (hasAlpha ? A1 << sh : 0); + dest[i * 2 + 1] = r[Y2] + g[Y2] + b[Y2] + (hasAlpha ? A2 << sh : 0); +#else + if (hasAlpha) { + int sh = (target == PIX_FMT_RGB32_1 || target == PIX_FMT_BGR32_1) ? 0 : 24; + + dest[i * 2 + 0] = r[Y1] + g[Y1] + b[Y1] + (A1 << sh); + dest[i * 2 + 1] = r[Y2] + g[Y2] + b[Y2] + (A2 << sh); + } else { + dest[i * 2 + 0] = r[Y1] + g[Y1] + b[Y1]; + dest[i * 2 + 1] = r[Y2] + g[Y2] + b[Y2]; + } +#endif + } else if (target == PIX_FMT_RGB24 || target == PIX_FMT_BGR24) { + uint8_t *dest = (uint8_t *) _dest; + const uint8_t *r = (const uint8_t *) _r; + const uint8_t *g = (const uint8_t *) _g; + const uint8_t *b = (const uint8_t *) _b; + +#define r_b ((target == PIX_FMT_RGB24) ? r : b) +#define b_r ((target == PIX_FMT_RGB24) ? b : r) + dest[i * 6 + 0] = r_b[Y1]; + dest[i * 6 + 1] = g[Y1]; + dest[i * 6 + 2] = b_r[Y1]; + dest[i * 6 + 3] = r_b[Y2]; + dest[i * 6 + 4] = g[Y2]; + dest[i * 6 + 5] = b_r[Y2]; +#undef r_b +#undef b_r + } else if (target == PIX_FMT_RGB565 || target == PIX_FMT_BGR565 || + target == PIX_FMT_RGB555 || target == PIX_FMT_BGR555 || + target == PIX_FMT_RGB444 || target == PIX_FMT_BGR444) { + uint16_t *dest = (uint16_t *) _dest; + const uint16_t *r = (const uint16_t *) _r; + const uint16_t *g = (const uint16_t *) _g; + const uint16_t *b = (const uint16_t *) _b; + int dr1, dg1, db1, dr2, dg2, db2; + + if (target == PIX_FMT_RGB565 || target == PIX_FMT_BGR565) { + dr1 = dither_2x2_8[ y & 1 ][0]; + dg1 = dither_2x2_4[ y & 1 ][0]; + db1 = dither_2x2_8[(y & 1) ^ 1][0]; + dr2 = dither_2x2_8[ y & 1 ][1]; + dg2 = dither_2x2_4[ y & 1 ][1]; + db2 = dither_2x2_8[(y & 1) ^ 1][1]; + } else if (target == PIX_FMT_RGB555 || target == PIX_FMT_BGR555) { + dr1 = dither_2x2_8[ y & 1 ][0]; + dg1 = dither_2x2_8[ y & 1 ][1]; + db1 = dither_2x2_8[(y & 1) ^ 1][0]; + dr2 = dither_2x2_8[ y & 1 ][1]; + dg2 = dither_2x2_8[ y & 1 ][0]; + db2 = dither_2x2_8[(y & 1) ^ 1][1]; + } else { + dr1 = dither_4x4_16[ y & 3 ][0]; + dg1 = dither_4x4_16[ y & 3 ][1]; + db1 = dither_4x4_16[(y & 3) ^ 3][0]; + dr2 = dither_4x4_16[ y & 3 ][1]; + dg2 = dither_4x4_16[ y & 3 ][0]; + db2 = dither_4x4_16[(y & 3) ^ 3][1]; + } + + dest[i * 2 + 0] = r[Y1 + dr1] + g[Y1 + dg1] + b[Y1 + db1]; + dest[i * 2 + 1] = r[Y2 + dr2] + g[Y2 + dg2] + b[Y2 + db2]; + } else /* 8/4-bit */ { + uint8_t *dest = (uint8_t *) _dest; + const uint8_t *r = (const uint8_t *) _r; + const uint8_t *g = (const uint8_t *) _g; + const uint8_t *b = (const uint8_t *) _b; + int dr1, dg1, db1, dr2, dg2, db2; + + if (target == PIX_FMT_RGB8 || target == PIX_FMT_BGR8) { + const uint8_t * const d64 = dither_8x8_73[y & 7]; + const uint8_t * const d32 = dither_8x8_32[y & 7]; + dr1 = dg1 = d32[(i * 2 + 0) & 7]; + db1 = d64[(i * 2 + 0) & 7]; + dr2 = dg2 = d32[(i * 2 + 1) & 7]; + db2 = d64[(i * 2 + 1) & 7]; + } else { + const uint8_t * const d64 = dither_8x8_73 [y & 7]; + const uint8_t * const d128 = dither_8x8_220[y & 7]; + dr1 = db1 = d128[(i * 2 + 0) & 7]; + dg1 = d64[(i * 2 + 0) & 7]; + dr2 = db2 = d128[(i * 2 + 1) & 7]; + dg2 = d64[(i * 2 + 1) & 7]; + } + + if (target == PIX_FMT_RGB4 || target == PIX_FMT_BGR4) { + dest[i] = r[Y1 + dr1] + g[Y1 + dg1] + b[Y1 + db1] + + ((r[Y2 + dr2] + g[Y2 + dg2] + b[Y2 + db2]) << 4); + } else { + dest[i * 2 + 0] = r[Y1 + dr1] + g[Y1 + dg1] + b[Y1 + db1]; + dest[i * 2 + 1] = r[Y2 + dr2] + g[Y2 + dg2] + b[Y2 + db2]; + } + } +} + +static av_always_inline void +yuv2rgb_X_c_template(SwsContext *c, const int16_t *lumFilter, + const int16_t **lumSrc, int lumFilterSize, + const int16_t *chrFilter, const int16_t **chrUSrc, + const int16_t **chrVSrc, int chrFilterSize, + const int16_t **alpSrc, uint8_t *dest, int dstW, + int y, enum PixelFormat target, int hasAlpha) +{ + int i; + + for (i = 0; i < (dstW >> 1); i++) { + int j; int Y1 = 1 << 18; int Y2 = 1 << 18; int U = 1 << 18; int V = 1 << 18; - const uint8_t *r, *g, *b; + int av_unused A1, A2; + const void *r, *g, *b; for (j = 0; j < lumFilterSize; j++) { Y1 += lumSrc[j][i * 2] * lumFilter[j]; @@ -780,31 +1041,43 @@ U = av_clip_uint8(U); V = av_clip_uint8(V); } + if (hasAlpha) { + A1 = 1 << 18; + A2 = 1 << 18; + for (j = 0; j < lumFilterSize; j++) { + A1 += alpSrc[j][i * 2 ] * lumFilter[j]; + A2 += alpSrc[j][i * 2 + 1] * lumFilter[j]; + } + A1 >>= 19; + A2 >>= 19; + if ((A1 | A2) & 0x100) { + A1 = av_clip_uint8(A1); + A2 = av_clip_uint8(A2); + } + } /* FIXME fix tables so that clipping is not needed and then use _NOCLIP*/ - r = (const uint8_t *) c->table_rV[V]; - g = (const uint8_t *)(c->table_gU[U] + c->table_gV[V]); - b = (const uint8_t *) c->table_bU[U]; - - dest[ 0] = dest[ 1] = r_b[Y1]; - dest[ 2] = dest[ 3] = g[Y1]; - dest[ 4] = dest[ 5] = b_r[Y1]; - dest[ 6] = dest[ 7] = r_b[Y2]; - dest[ 8] = dest[ 9] = g[Y2]; - dest[10] = dest[11] = b_r[Y2]; - dest += 12; + r = c->table_rV[V]; + g = (c->table_gU[U] + c->table_gV[V]); + b = c->table_bU[U]; + + yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0, + r, g, b, y, target, hasAlpha); } } static av_always_inline void -yuv2rgb48_2_c_template(SwsContext *c, const uint16_t *buf0, - const uint16_t *buf1, const uint16_t *ubuf0, - const uint16_t *ubuf1, const uint16_t *vbuf0, - const uint16_t *vbuf1, const uint16_t *abuf0, - const uint16_t *abuf1, uint8_t *dest, int dstW, - int yalpha, int uvalpha, int y, - enum PixelFormat target) +yuv2rgb_2_c_template(SwsContext *c, const int16_t *buf[2], + const int16_t *ubuf[2], const int16_t *vbuf[2], + const int16_t *abuf[2], uint8_t *dest, int dstW, + int yalpha, int uvalpha, int y, + enum PixelFormat target, int hasAlpha) { + const int16_t *buf0 = buf[0], *buf1 = buf[1], + *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], + *vbuf0 = vbuf[0], *vbuf1 = vbuf[1], + *abuf0 = hasAlpha ? abuf[0] : NULL, + *abuf1 = hasAlpha ? abuf[1] : NULL; int yalpha1 = 4095 - yalpha; int uvalpha1 = 4095 - uvalpha; int i; @@ -814,28 +1087,30 @@ int Y2 = (buf0[i * 2 + 1] * yalpha1 + buf1[i * 2 + 1] * yalpha) >> 19; int U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha) >> 19; int V = (vbuf0[i] * uvalpha1 + vbuf1[i] * uvalpha) >> 19; - const uint8_t *r = (const uint8_t *) c->table_rV[V], - *g = (const uint8_t *)(c->table_gU[U] + c->table_gV[V]), - *b = (const uint8_t *) c->table_bU[U]; - - dest[ 0] = dest[ 1] = r_b[Y1]; - dest[ 2] = dest[ 3] = g[Y1]; - dest[ 4] = dest[ 5] = b_r[Y1]; - dest[ 6] = dest[ 7] = r_b[Y2]; - dest[ 8] = dest[ 9] = g[Y2]; - dest[10] = dest[11] = b_r[Y2]; - dest += 12; + int A1, A2; + const void *r = c->table_rV[V], + *g = (c->table_gU[U] + c->table_gV[V]), + *b = c->table_bU[U]; + + if (hasAlpha) { + A1 = (abuf0[i * 2 ] * yalpha1 + abuf1[i * 2 ] * yalpha) >> 19; + A2 = (abuf0[i * 2 + 1] * yalpha1 + abuf1[i * 2 + 1] * yalpha) >> 19; + } + + yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0, + r, g, b, y, target, hasAlpha); } } static av_always_inline void -yuv2rgb48_1_c_template(SwsContext *c, const uint16_t *buf0, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, uint8_t *dest, int dstW, - int uvalpha, enum PixelFormat dstFormat, - int flags, int y, enum PixelFormat target) +yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0, + const int16_t *ubuf[2], const int16_t *vbuf[2], + const int16_t *abuf0, uint8_t *dest, int dstW, + int uvalpha, int y, enum PixelFormat target, + int hasAlpha) { + const int16_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], + *vbuf0 = vbuf[0], *vbuf1 = vbuf[1]; int i; if (uvalpha < 2048) { @@ -844,17 +1119,18 @@ int Y2 = buf0[i * 2 + 1] >> 7; int U = ubuf1[i] >> 7; int V = vbuf1[i] >> 7; - const uint8_t *r = (const uint8_t *) c->table_rV[V], - *g = (const uint8_t *)(c->table_gU[U] + c->table_gV[V]), - *b = (const uint8_t *) c->table_bU[U]; - - dest[ 0] = dest[ 1] = r_b[Y1]; - dest[ 2] = dest[ 3] = g[Y1]; - dest[ 4] = dest[ 5] = b_r[Y1]; - dest[ 6] = dest[ 7] = r_b[Y2]; - dest[ 8] = dest[ 9] = g[Y2]; - dest[10] = dest[11] = b_r[Y2]; - dest += 12; + int A1, A2; + const void *r = c->table_rV[V], + *g = (c->table_gU[U] + c->table_gV[V]), + *b = c->table_bU[U]; + + if (hasAlpha) { + A1 = abuf0[i * 2 ] >> 7; + A2 = abuf0[i * 2 + 1] >> 7; + } + + yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0, + r, g, b, y, target, hasAlpha); } } else { for (i = 0; i < (dstW >> 1); i++) { @@ -862,446 +1138,184 @@ int Y2 = buf0[i * 2 + 1] >> 7; int U = (ubuf0[i] + ubuf1[i]) >> 8; int V = (vbuf0[i] + vbuf1[i]) >> 8; - const uint8_t *r = (const uint8_t *) c->table_rV[V], - *g = (const uint8_t *)(c->table_gU[U] + c->table_gV[V]), - *b = (const uint8_t *) c->table_bU[U]; - - dest[ 0] = dest[ 1] = r_b[Y1]; - dest[ 2] = dest[ 3] = g[Y1]; - dest[ 4] = dest[ 5] = b_r[Y1]; - dest[ 6] = dest[ 7] = r_b[Y2]; - dest[ 8] = dest[ 9] = g[Y2]; - dest[10] = dest[11] = b_r[Y2]; - dest += 12; + int A1, A2; + const void *r = c->table_rV[V], + *g = (c->table_gU[U] + c->table_gV[V]), + *b = c->table_bU[U]; + + if (hasAlpha) { + A1 = abuf0[i * 2 ] >> 7; + A2 = abuf0[i * 2 + 1] >> 7; + } + + yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0, + r, g, b, y, target, hasAlpha); } } } -#undef r_b -#undef b_r +#define YUV2RGBWRAPPERX(name, base, ext, fmt, hasAlpha) \ +static void name ## ext ## _X_c(SwsContext *c, const int16_t *lumFilter, \ + const int16_t **lumSrc, int lumFilterSize, \ + const int16_t *chrFilter, const int16_t **chrUSrc, \ + const int16_t **chrVSrc, int chrFilterSize, \ + const int16_t **alpSrc, uint8_t *dest, int dstW, \ + int y) \ +{ \ + name ## base ## _X_c_template(c, lumFilter, lumSrc, lumFilterSize, \ + chrFilter, chrUSrc, chrVSrc, chrFilterSize, \ + alpSrc, dest, dstW, y, fmt, hasAlpha); \ +} +#define YUV2RGBWRAPPER(name, base, ext, fmt, hasAlpha) \ +YUV2RGBWRAPPERX(name, base, ext, fmt, hasAlpha) \ +static void name ## ext ## _2_c(SwsContext *c, const int16_t *buf[2], \ + const int16_t *ubuf[2], const int16_t *vbuf[2], \ + const int16_t *abuf[2], uint8_t *dest, int dstW, \ + int yalpha, int uvalpha, int y) \ +{ \ + name ## base ## _2_c_template(c, buf, ubuf, vbuf, abuf, \ + dest, dstW, yalpha, uvalpha, y, fmt, hasAlpha); \ +} \ + \ +static void name ## ext ## _1_c(SwsContext *c, const int16_t *buf0, \ + const int16_t *ubuf[2], const int16_t *vbuf[2], \ + const int16_t *abuf0, uint8_t *dest, int dstW, \ + int uvalpha, int y) \ +{ \ + name ## base ## _1_c_template(c, buf0, ubuf, vbuf, abuf0, dest, \ + dstW, uvalpha, y, fmt, hasAlpha); \ +} -YUV2PACKEDWRAPPER(yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE); -//YUV2PACKEDWRAPPER(yuv2, rgb48, rgb48le, PIX_FMT_RGB48LE); -YUV2PACKEDWRAPPER(yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE); -//YUV2PACKEDWRAPPER(yuv2, rgb48, bgr48le, PIX_FMT_BGR48LE); - -#define YSCALE_YUV_2_RGBX_C(type,alpha) \ - for (i=0; i<(dstW>>1); i++) {\ - int j;\ - int Y1 = 1<<18;\ - int Y2 = 1<<18;\ - int U = 1<<18;\ - int V = 1<<18;\ - int av_unused A1, A2;\ - type av_unused *r, *b, *g;\ - const int i2= 2*i;\ - \ - for (j=0; j>=19;\ - Y2>>=19;\ - U >>=19;\ - V >>=19;\ - if ((Y1|Y2|U|V)&0x100) {\ - Y1 = av_clip_uint8(Y1); \ - Y2 = av_clip_uint8(Y2); \ - U = av_clip_uint8(U); \ - V = av_clip_uint8(V); \ - }\ - if (alpha) {\ - A1 = 1<<18;\ - A2 = 1<<18;\ - for (j=0; j>=19;\ - A2>>=19;\ - if ((A1|A2)&0x100) {\ - A1 = av_clip_uint8(A1); \ - A2 = av_clip_uint8(A2); \ - }\ - }\ - /* FIXME fix tables so that clipping is not needed and then use _NOCLIP*/\ - r = (type *)c->table_rV[V]; \ - g = (type *)(c->table_gU[U] + c->table_gV[V]); \ - b = (type *)c->table_bU[U]; - -#define YSCALE_YUV_2_RGBX_FULL_C(rnd,alpha) \ - for (i=0; i>=10;\ - U >>=10;\ - V >>=10;\ - if (alpha) {\ - A = rnd;\ - for (j=0; j>=19;\ - if (A&0x100)\ - A = av_clip_uint8(A);\ - }\ - Y-= c->yuv2rgb_y_offset;\ - Y*= c->yuv2rgb_y_coeff;\ - Y+= rnd;\ - R= Y + V*c->yuv2rgb_v2r_coeff;\ - G= Y + V*c->yuv2rgb_v2g_coeff + U*c->yuv2rgb_u2g_coeff;\ - B= Y + U*c->yuv2rgb_u2b_coeff;\ - if ((R|G|B)&(0xC0000000)) {\ - R = av_clip_uintp2(R, 30); \ - G = av_clip_uintp2(G, 30); \ - B = av_clip_uintp2(B, 30); \ - } - -#define YSCALE_YUV_2_RGB2_C(type,alpha) \ - for (i=0; i<(dstW>>1); i++) { \ - const int i2= 2*i; \ - int Y1= (buf0[i2 ]*yalpha1+buf1[i2 ]*yalpha)>>19; \ - int Y2= (buf0[i2+1]*yalpha1+buf1[i2+1]*yalpha)>>19; \ - int U= (ubuf0[i]*uvalpha1+ubuf1[i]*uvalpha)>>19; \ - int V= (vbuf0[i]*uvalpha1+vbuf1[i]*uvalpha)>>19; \ - type av_unused *r, *b, *g; \ - int av_unused A1, A2; \ - if (alpha) {\ - A1= (abuf0[i2 ]*yalpha1+abuf1[i2 ]*yalpha)>>19; \ - A2= (abuf0[i2+1]*yalpha1+abuf1[i2+1]*yalpha)>>19; \ - }\ - r = (type *)c->table_rV[V];\ - g = (type *)(c->table_gU[U] + c->table_gV[V]);\ - b = (type *)c->table_bU[U]; - -#define YSCALE_YUV_2_RGB1_C(type,alpha) \ - for (i=0; i<(dstW>>1); i++) {\ - const int i2= 2*i;\ - int Y1= buf0[i2 ]>>7;\ - int Y2= buf0[i2+1]>>7;\ - int U= (ubuf1[i])>>7;\ - int V= (vbuf1[i])>>7;\ - type av_unused *r, *b, *g;\ - int av_unused A1, A2;\ - if (alpha) {\ - A1= abuf0[i2 ]>>7;\ - A2= abuf0[i2+1]>>7;\ - }\ - r = (type *)c->table_rV[V];\ - g = (type *)(c->table_gU[U] + c->table_gV[V]);\ - b = (type *)c->table_bU[U]; - -#define YSCALE_YUV_2_RGB1B_C(type,alpha) \ - for (i=0; i<(dstW>>1); i++) {\ - const int i2= 2*i;\ - int Y1= buf0[i2 ]>>7;\ - int Y2= buf0[i2+1]>>7;\ - int U= (ubuf0[i] + ubuf1[i])>>8;\ - int V= (vbuf0[i] + vbuf1[i])>>8;\ - type av_unused *r, *b, *g;\ - int av_unused A1, A2;\ - if (alpha) {\ - A1= abuf0[i2 ]>>7;\ - A2= abuf0[i2+1]>>7;\ - }\ - r = (type *)c->table_rV[V];\ - g = (type *)(c->table_gU[U] + c->table_gV[V]);\ - b = (type *)c->table_bU[U]; - -#define YSCALE_YUV_2_ANYRGB_C(func)\ - switch(c->dstFormat) {\ - case PIX_FMT_RGBA:\ - case PIX_FMT_BGRA:\ - if (CONFIG_SMALL) {\ - int needAlpha = CONFIG_SWSCALE_ALPHA && c->alpPixBuf;\ - func(uint32_t,needAlpha)\ - ((uint32_t*)dest)[i2+0]= r[Y1] + g[Y1] + b[Y1] + (needAlpha ? (A1<<24) : 0);\ - ((uint32_t*)dest)[i2+1]= r[Y2] + g[Y2] + b[Y2] + (needAlpha ? (A2<<24) : 0);\ - }\ - } else {\ - if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) {\ - func(uint32_t,1)\ - ((uint32_t*)dest)[i2+0]= r[Y1] + g[Y1] + b[Y1] + (A1<<24);\ - ((uint32_t*)dest)[i2+1]= r[Y2] + g[Y2] + b[Y2] + (A2<<24);\ - }\ - } else {\ - func(uint32_t,0)\ - ((uint32_t*)dest)[i2+0]= r[Y1] + g[Y1] + b[Y1];\ - ((uint32_t*)dest)[i2+1]= r[Y2] + g[Y2] + b[Y2];\ - }\ - }\ - }\ - break;\ - case PIX_FMT_ARGB:\ - case PIX_FMT_ABGR:\ - if (CONFIG_SMALL) {\ - int needAlpha = CONFIG_SWSCALE_ALPHA && c->alpPixBuf;\ - func(uint32_t,needAlpha)\ - ((uint32_t*)dest)[i2+0]= r[Y1] + g[Y1] + b[Y1] + (needAlpha ? A1 : 0);\ - ((uint32_t*)dest)[i2+1]= r[Y2] + g[Y2] + b[Y2] + (needAlpha ? A2 : 0);\ - }\ - } else {\ - if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) {\ - func(uint32_t,1)\ - ((uint32_t*)dest)[i2+0]= r[Y1] + g[Y1] + b[Y1] + A1;\ - ((uint32_t*)dest)[i2+1]= r[Y2] + g[Y2] + b[Y2] + A2;\ - }\ - } else {\ - func(uint32_t,0)\ - ((uint32_t*)dest)[i2+0]= r[Y1] + g[Y1] + b[Y1];\ - ((uint32_t*)dest)[i2+1]= r[Y2] + g[Y2] + b[Y2];\ - }\ - }\ - } \ - break;\ - case PIX_FMT_RGB24:\ - func(uint8_t,0)\ - ((uint8_t*)dest)[0]= r[Y1];\ - ((uint8_t*)dest)[1]= g[Y1];\ - ((uint8_t*)dest)[2]= b[Y1];\ - ((uint8_t*)dest)[3]= r[Y2];\ - ((uint8_t*)dest)[4]= g[Y2];\ - ((uint8_t*)dest)[5]= b[Y2];\ - dest+=6;\ - }\ - break;\ - case PIX_FMT_BGR24:\ - func(uint8_t,0)\ - ((uint8_t*)dest)[0]= b[Y1];\ - ((uint8_t*)dest)[1]= g[Y1];\ - ((uint8_t*)dest)[2]= r[Y1];\ - ((uint8_t*)dest)[3]= b[Y2];\ - ((uint8_t*)dest)[4]= g[Y2];\ - ((uint8_t*)dest)[5]= r[Y2];\ - dest+=6;\ - }\ - break;\ - case PIX_FMT_RGB565:\ - case PIX_FMT_BGR565:\ - {\ - const int dr1= dither_2x2_8[y&1 ][0];\ - const int dg1= dither_2x2_4[y&1 ][0];\ - const int db1= dither_2x2_8[(y&1)^1][0];\ - const int dr2= dither_2x2_8[y&1 ][1];\ - const int dg2= dither_2x2_4[y&1 ][1];\ - const int db2= dither_2x2_8[(y&1)^1][1];\ - func(uint16_t,0)\ - ((uint16_t*)dest)[i2+0]= r[Y1+dr1] + g[Y1+dg1] + b[Y1+db1];\ - ((uint16_t*)dest)[i2+1]= r[Y2+dr2] + g[Y2+dg2] + b[Y2+db2];\ - }\ - }\ - break;\ - case PIX_FMT_RGB555:\ - case PIX_FMT_BGR555:\ - {\ - const int dr1= dither_2x2_8[y&1 ][0];\ - const int dg1= dither_2x2_8[y&1 ][1];\ - const int db1= dither_2x2_8[(y&1)^1][0];\ - const int dr2= dither_2x2_8[y&1 ][1];\ - const int dg2= dither_2x2_8[y&1 ][0];\ - const int db2= dither_2x2_8[(y&1)^1][1];\ - func(uint16_t,0)\ - ((uint16_t*)dest)[i2+0]= r[Y1+dr1] + g[Y1+dg1] + b[Y1+db1];\ - ((uint16_t*)dest)[i2+1]= r[Y2+dr2] + g[Y2+dg2] + b[Y2+db2];\ - }\ - }\ - break;\ - case PIX_FMT_RGB444:\ - case PIX_FMT_BGR444:\ - {\ - const int dr1= dither_4x4_16[y&3 ][0];\ - const int dg1= dither_4x4_16[y&3 ][1];\ - const int db1= dither_4x4_16[(y&3)^3][0];\ - const int dr2= dither_4x4_16[y&3 ][1];\ - const int dg2= dither_4x4_16[y&3 ][0];\ - const int db2= dither_4x4_16[(y&3)^3][1];\ - func(uint16_t,0)\ - ((uint16_t*)dest)[i2+0]= r[Y1+dr1] + g[Y1+dg1] + b[Y1+db1];\ - ((uint16_t*)dest)[i2+1]= r[Y2+dr2] + g[Y2+dg2] + b[Y2+db2];\ - }\ - }\ - break;\ - case PIX_FMT_RGB8:\ - case PIX_FMT_BGR8:\ - {\ - const uint8_t * const d64= dither_8x8_73[y&7];\ - const uint8_t * const d32= dither_8x8_32[y&7];\ - func(uint8_t,0)\ - ((uint8_t*)dest)[i2+0]= r[Y1+d32[(i2+0)&7]] + g[Y1+d32[(i2+0)&7]] + b[Y1+d64[(i2+0)&7]];\ - ((uint8_t*)dest)[i2+1]= r[Y2+d32[(i2+1)&7]] + g[Y2+d32[(i2+1)&7]] + b[Y2+d64[(i2+1)&7]];\ - }\ - }\ - break;\ - case PIX_FMT_RGB4:\ - case PIX_FMT_BGR4:\ - {\ - const uint8_t * const d64= dither_8x8_73 [y&7];\ - const uint8_t * const d128=dither_8x8_220[y&7];\ - func(uint8_t,0)\ - ((uint8_t*)dest)[i]= r[Y1+d128[(i2+0)&7]] + g[Y1+d64[(i2+0)&7]] + b[Y1+d128[(i2+0)&7]]\ - + ((r[Y2+d128[(i2+1)&7]] + g[Y2+d64[(i2+1)&7]] + b[Y2+d128[(i2+1)&7]])<<4);\ - }\ - }\ - break;\ - case PIX_FMT_RGB4_BYTE:\ - case PIX_FMT_BGR4_BYTE:\ - {\ - const uint8_t * const d64= dither_8x8_73 [y&7];\ - const uint8_t * const d128=dither_8x8_220[y&7];\ - func(uint8_t,0)\ - ((uint8_t*)dest)[i2+0]= r[Y1+d128[(i2+0)&7]] + g[Y1+d64[(i2+0)&7]] + b[Y1+d128[(i2+0)&7]];\ - ((uint8_t*)dest)[i2+1]= r[Y2+d128[(i2+1)&7]] + g[Y2+d64[(i2+1)&7]] + b[Y2+d128[(i2+1)&7]];\ - }\ - }\ - break;\ - } +#if CONFIG_SMALL +YUV2RGBWRAPPER(yuv2rgb,, 32_1, PIX_FMT_RGB32_1, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) +YUV2RGBWRAPPER(yuv2rgb,, 32, PIX_FMT_RGB32, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) +#else +#if CONFIG_SWSCALE_ALPHA +YUV2RGBWRAPPER(yuv2rgb,, a32_1, PIX_FMT_RGB32_1, 1) +YUV2RGBWRAPPER(yuv2rgb,, a32, PIX_FMT_RGB32, 1) +#endif +YUV2RGBWRAPPER(yuv2rgb,, x32_1, PIX_FMT_RGB32_1, 0) +YUV2RGBWRAPPER(yuv2rgb,, x32, PIX_FMT_RGB32, 0) +#endif +YUV2RGBWRAPPER(yuv2, rgb, rgb24, PIX_FMT_RGB24, 0) +YUV2RGBWRAPPER(yuv2, rgb, bgr24, PIX_FMT_BGR24, 0) +YUV2RGBWRAPPER(yuv2rgb,, 16, PIX_FMT_RGB565, 0) +YUV2RGBWRAPPER(yuv2rgb,, 15, PIX_FMT_RGB555, 0) +YUV2RGBWRAPPER(yuv2rgb,, 12, PIX_FMT_RGB444, 0) +YUV2RGBWRAPPER(yuv2rgb,, 8, PIX_FMT_RGB8, 0) +YUV2RGBWRAPPER(yuv2rgb,, 4, PIX_FMT_RGB4, 0) +YUV2RGBWRAPPER(yuv2rgb,, 4b, PIX_FMT_RGB4_BYTE, 0) -static void yuv2packedX_c(SwsContext *c, const int16_t *lumFilter, +static av_always_inline void +yuv2rgb_full_X_c_template(SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, - const int16_t **alpSrc, uint8_t *dest, int dstW, int y) + const int16_t **alpSrc, uint8_t *dest, + int dstW, int y, enum PixelFormat target, int hasAlpha) { int i; - YSCALE_YUV_2_ANYRGB_C(YSCALE_YUV_2_RGBX_C) -} + int step = (target == PIX_FMT_RGB24 || target == PIX_FMT_BGR24) ? 3 : 4; -static void yuv2rgbX_c_full(SwsContext *c, const int16_t *lumFilter, - const int16_t **lumSrc, int lumFilterSize, - const int16_t *chrFilter, const int16_t **chrUSrc, - const int16_t **chrVSrc, int chrFilterSize, - const int16_t **alpSrc, uint8_t *dest, int dstW, int y) -{ - int i; - int step= c->dstFormatBpp/8; - int aidx= 3; - - switch(c->dstFormat) { - case PIX_FMT_ARGB: - dest++; - aidx= 0; - case PIX_FMT_RGB24: - aidx--; - case PIX_FMT_RGBA: - if (CONFIG_SMALL) { - int needAlpha = CONFIG_SWSCALE_ALPHA && c->alpPixBuf; - YSCALE_YUV_2_RGBX_FULL_C(1<<21, needAlpha) - dest[aidx]= needAlpha ? A : 255; - dest[0]= R>>22; - dest[1]= G>>22; - dest[2]= B>>22; - dest+= step; - } - } else { - if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) { - YSCALE_YUV_2_RGBX_FULL_C(1<<21, 1) - dest[aidx]= A; - dest[0]= R>>22; - dest[1]= G>>22; - dest[2]= B>>22; - dest+= step; - } - } else { - YSCALE_YUV_2_RGBX_FULL_C(1<<21, 0) - dest[aidx]= 255; - dest[0]= R>>22; - dest[1]= G>>22; - dest[2]= B>>22; - dest+= step; - } - } + for (i = 0; i < dstW; i++) { + int j; + int Y = 0; + int U = -128 << 19; + int V = -128 << 19; + int av_unused A; + int R, G, B; + + for (j = 0; j < lumFilterSize; j++) { + Y += lumSrc[j][i] * lumFilter[j]; } - break; - case PIX_FMT_ABGR: - dest++; - aidx= 0; - case PIX_FMT_BGR24: - aidx--; - case PIX_FMT_BGRA: - if (CONFIG_SMALL) { - int needAlpha = CONFIG_SWSCALE_ALPHA && c->alpPixBuf; - YSCALE_YUV_2_RGBX_FULL_C(1<<21, needAlpha) - dest[aidx]= needAlpha ? A : 255; - dest[0]= B>>22; - dest[1]= G>>22; - dest[2]= R>>22; - dest+= step; - } - } else { - if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) { - YSCALE_YUV_2_RGBX_FULL_C(1<<21, 1) - dest[aidx]= A; - dest[0]= B>>22; - dest[1]= G>>22; - dest[2]= R>>22; - dest+= step; - } - } else { - YSCALE_YUV_2_RGBX_FULL_C(1<<21, 0) - dest[aidx]= 255; - dest[0]= B>>22; - dest[1]= G>>22; - dest[2]= R>>22; - dest+= step; - } + for (j = 0; j < chrFilterSize; j++) { + U += chrUSrc[j][i] * chrFilter[j]; + V += chrVSrc[j][i] * chrFilter[j]; + } + Y >>= 10; + U >>= 10; + V >>= 10; + if (hasAlpha) { + A = 1 << 21; + for (j = 0; j < lumFilterSize; j++) { + A += alpSrc[j][i] * lumFilter[j]; } + A >>= 19; + if (A & 0x100) + A = av_clip_uint8(A); + } + Y -= c->yuv2rgb_y_offset; + Y *= c->yuv2rgb_y_coeff; + Y += 1 << 21; + R = Y + V*c->yuv2rgb_v2r_coeff; + G = Y + V*c->yuv2rgb_v2g_coeff + U*c->yuv2rgb_u2g_coeff; + B = Y + U*c->yuv2rgb_u2b_coeff; + if ((R | G | B) & 0xC0000000) { + R = av_clip_uintp2(R, 30); + G = av_clip_uintp2(G, 30); + B = av_clip_uintp2(B, 30); + } + + switch(target) { + case PIX_FMT_ARGB: + dest[0] = hasAlpha ? A : 255; + dest[1] = R >> 22; + dest[2] = G >> 22; + dest[3] = B >> 22; + break; + case PIX_FMT_RGB24: + dest[0] = R >> 22; + dest[1] = G >> 22; + dest[2] = B >> 22; + break; + case PIX_FMT_RGBA: + dest[0] = R >> 22; + dest[1] = G >> 22; + dest[2] = B >> 22; + dest[3] = hasAlpha ? A : 255; + break; + case PIX_FMT_ABGR: + dest[0] = hasAlpha ? A : 255; + dest[1] = B >> 22; + dest[2] = G >> 22; + dest[3] = R >> 22; + dest += 4; + break; + case PIX_FMT_BGR24: + dest[0] = B >> 22; + dest[1] = G >> 22; + dest[2] = R >> 22; + break; + case PIX_FMT_BGRA: + dest[0] = B >> 22; + dest[1] = G >> 22; + dest[2] = R >> 22; + dest[3] = hasAlpha ? A : 255; + break; } - break; - default: - assert(0); + dest += step; } } -/** - * vertical bilinear scale YV12 to RGB - */ -static void yuv2packed2_c(SwsContext *c, const uint16_t *buf0, - const uint16_t *buf1, const uint16_t *ubuf0, - const uint16_t *ubuf1, const uint16_t *vbuf0, - const uint16_t *vbuf1, const uint16_t *abuf0, - const uint16_t *abuf1, uint8_t *dest, int dstW, - int yalpha, int uvalpha, int y) -{ - int yalpha1=4095- yalpha; - int uvalpha1=4095-uvalpha; - int i; - - YSCALE_YUV_2_ANYRGB_C(YSCALE_YUV_2_RGB2_C) -} - -/** - * YV12 to RGB without scaling or interpolating - */ -static void yuv2packed1_c(SwsContext *c, const uint16_t *buf0, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, uint8_t *dest, int dstW, - int uvalpha, enum PixelFormat dstFormat, - int flags, int y) -{ - int i; - - if (uvalpha < 2048) { - YSCALE_YUV_2_ANYRGB_C(YSCALE_YUV_2_RGB1_C) - } else { - YSCALE_YUV_2_ANYRGB_C(YSCALE_YUV_2_RGB1B_C) - } -} +#if CONFIG_SMALL +YUV2RGBWRAPPERX(yuv2, rgb_full, bgra32_full, PIX_FMT_BGRA, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) +YUV2RGBWRAPPERX(yuv2, rgb_full, abgr32_full, PIX_FMT_ABGR, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) +YUV2RGBWRAPPERX(yuv2, rgb_full, rgba32_full, PIX_FMT_RGBA, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) +YUV2RGBWRAPPERX(yuv2, rgb_full, argb32_full, PIX_FMT_ARGB, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) +#else +#if CONFIG_SWSCALE_ALPHA +YUV2RGBWRAPPERX(yuv2, rgb_full, bgra32_full, PIX_FMT_BGRA, 1) +YUV2RGBWRAPPERX(yuv2, rgb_full, abgr32_full, PIX_FMT_ABGR, 1) +YUV2RGBWRAPPERX(yuv2, rgb_full, rgba32_full, PIX_FMT_RGBA, 1) +YUV2RGBWRAPPERX(yuv2, rgb_full, argb32_full, PIX_FMT_ARGB, 1) +#endif +YUV2RGBWRAPPERX(yuv2, rgb_full, bgrx32_full, PIX_FMT_BGRA, 0) +YUV2RGBWRAPPERX(yuv2, rgb_full, xbgr32_full, PIX_FMT_ABGR, 0) +YUV2RGBWRAPPERX(yuv2, rgb_full, rgbx32_full, PIX_FMT_RGBA, 0) +YUV2RGBWRAPPERX(yuv2, rgb_full, xrgb32_full, PIX_FMT_ARGB, 0) +#endif +YUV2RGBWRAPPERX(yuv2, rgb_full, bgr24_full, PIX_FMT_BGR24, 0) +YUV2RGBWRAPPERX(yuv2, rgb_full, rgb24_full, PIX_FMT_RGB24, 0) static av_always_inline void fillPlane(uint8_t* plane, int stride, int width, int height, @@ -1321,50 +1335,50 @@ #define b ((origin == PIX_FMT_BGR48BE || origin == PIX_FMT_BGR48LE) ? r_b : b_r) static av_always_inline void -rgb48ToY_c_template(uint8_t *dst, const uint8_t *src, int width, +rgb48ToY_c_template(uint16_t *dst, const uint16_t *src, int width, enum PixelFormat origin) { int i; for (i = 0; i < width; i++) { - int r_b = input_pixel(&src[i*6+0]) >> 8; - int g = input_pixel(&src[i*6+2]) >> 8; - int b_r = input_pixel(&src[i*6+4]) >> 8; + unsigned int r_b = input_pixel(&src[i*3+0]); + unsigned int g = input_pixel(&src[i*3+1]); + unsigned int b_r = input_pixel(&src[i*3+2]); - dst[i] = (RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT; + dst[i] = (RY*r + GY*g + BY*b + (0x2001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT; } } static av_always_inline void -rgb48ToUV_c_template(uint8_t *dstU, uint8_t *dstV, - const uint8_t *src1, const uint8_t *src2, +rgb48ToUV_c_template(uint16_t *dstU, uint16_t *dstV, + const uint16_t *src1, const uint16_t *src2, int width, enum PixelFormat origin) { int i; assert(src1==src2); for (i = 0; i < width; i++) { - int r_b = input_pixel(&src1[i*6+0]) >> 8; - int g = input_pixel(&src1[i*6+2]) >> 8; - int b_r = input_pixel(&src1[i*6+4]) >> 8; + int r_b = input_pixel(&src1[i*3+0]); + int g = input_pixel(&src1[i*3+1]); + int b_r = input_pixel(&src1[i*3+2]); - dstU[i] = (RU*r + GU*g + BU*b + (257<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT; - dstV[i] = (RV*r + GV*g + BV*b + (257<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT; + dstU[i] = (RU*r + GU*g + BU*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT; + dstV[i] = (RV*r + GV*g + BV*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT; } } static av_always_inline void -rgb48ToUV_half_c_template(uint8_t *dstU, uint8_t *dstV, - const uint8_t *src1, const uint8_t *src2, +rgb48ToUV_half_c_template(uint16_t *dstU, uint16_t *dstV, + const uint16_t *src1, const uint16_t *src2, int width, enum PixelFormat origin) { int i; assert(src1==src2); for (i = 0; i < width; i++) { - int r_b = (input_pixel(&src1[12*i + 0]) >> 8) + (input_pixel(&src1[12*i + 6]) >> 8); - int g = (input_pixel(&src1[12*i + 2]) >> 8) + (input_pixel(&src1[12*i + 8]) >> 8); - int b_r = (input_pixel(&src1[12*i + 4]) >> 8) + (input_pixel(&src1[12*i + 10]) >> 8); + int r_b = (input_pixel(&src1[6 * i + 0]) + input_pixel(&src1[6 * i + 3]) + 1) >> 1; + int g = (input_pixel(&src1[6 * i + 1]) + input_pixel(&src1[6 * i + 4]) + 1) >> 1; + int b_r = (input_pixel(&src1[6 * i + 2]) + input_pixel(&src1[6 * i + 5]) + 1) >> 1; - dstU[i]= (RU*r + GU*g + BU*b + (257<> (RGB2YUV_SHIFT+1); - dstV[i]= (RV*r + GV*g + BV*b + (257<> (RGB2YUV_SHIFT+1); + dstU[i]= (RU*r + GU*g + BU*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT; + dstV[i]= (RV*r + GV*g + BV*b + (0x10001<<(RGB2YUV_SHIFT-1))) >> RGB2YUV_SHIFT; } } @@ -1373,30 +1387,38 @@ #undef input_pixel #define rgb48funcs(pattern, BE_LE, origin) \ -static void pattern ## 48 ## BE_LE ## ToY_c(uint8_t *dst, const uint8_t *src, \ +static void pattern ## 48 ## BE_LE ## ToY_c(uint8_t *_dst, const uint8_t *_src, \ int width, uint32_t *unused) \ { \ + const uint16_t *src = (const uint16_t *) _src; \ + uint16_t *dst = (uint16_t *) _dst; \ rgb48ToY_c_template(dst, src, width, origin); \ } \ \ -static void pattern ## 48 ## BE_LE ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \ - const uint8_t *src1, const uint8_t *src2, \ +static void pattern ## 48 ## BE_LE ## ToUV_c(uint8_t *_dstU, uint8_t *_dstV, \ + const uint8_t *_src1, const uint8_t *_src2, \ int width, uint32_t *unused) \ { \ + const uint16_t *src1 = (const uint16_t *) _src1, \ + *src2 = (const uint16_t *) _src2; \ + uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV; \ rgb48ToUV_c_template(dstU, dstV, src1, src2, width, origin); \ } \ \ -static void pattern ## 48 ## BE_LE ## ToUV_half_c(uint8_t *dstU, uint8_t *dstV, \ - const uint8_t *src1, const uint8_t *src2, \ +static void pattern ## 48 ## BE_LE ## ToUV_half_c(uint8_t *_dstU, uint8_t *_dstV, \ + const uint8_t *_src1, const uint8_t *_src2, \ int width, uint32_t *unused) \ { \ + const uint16_t *src1 = (const uint16_t *) _src1, \ + *src2 = (const uint16_t *) _src2; \ + uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV; \ rgb48ToUV_half_c_template(dstU, dstV, src1, src2, width, origin); \ } -rgb48funcs(rgb, LE, PIX_FMT_RGB48LE); -rgb48funcs(rgb, BE, PIX_FMT_RGB48BE); -rgb48funcs(bgr, LE, PIX_FMT_BGR48LE); -rgb48funcs(bgr, BE, PIX_FMT_BGR48BE); +rgb48funcs(rgb, LE, PIX_FMT_RGB48LE) +rgb48funcs(rgb, BE, PIX_FMT_RGB48BE) +rgb48funcs(bgr, LE, PIX_FMT_BGR48LE) +rgb48funcs(bgr, BE, PIX_FMT_BGR48BE) #define input_pixel(i) ((origin == PIX_FMT_RGBA || origin == PIX_FMT_BGRA || \ origin == PIX_FMT_ARGB || origin == PIX_FMT_ABGR) ? AV_RN32A(&src[(i)*4]) : \ @@ -1409,8 +1431,8 @@ int maskr, int maskg, int maskb, int rsh, int gsh, int bsh, int S) { - const int ry = RY << rsh, gy = GY << gsh, by = BY << bsh, - rnd = 33 << (S - 1); + const int ry = RY << rsh, gy = GY << gsh, by = BY << bsh; + const unsigned rnd = 33u << (S - 1); int i; for (i = 0; i < width; i++) { @@ -1432,8 +1454,8 @@ int rsh, int gsh, int bsh, int S) { const int ru = RU << rsh, gu = GU << gsh, bu = BU << bsh, - rv = RV << rsh, gv = GV << gsh, bv = BV << bsh, - rnd = 257 << (S - 1); + rv = RV << rsh, gv = GV << gsh, bv = BV << bsh; + const unsigned rnd = 257u << (S - 1); int i; for (i = 0; i < width; i++) { @@ -1457,7 +1479,8 @@ { const int ru = RU << rsh, gu = GU << gsh, bu = BU << bsh, rv = RV << rsh, gv = GV << gsh, bv = BV << bsh, - rnd = 257 << S, maskgx = ~(maskr | maskb); + maskgx = ~(maskr | maskb); + const unsigned rnd = 257u << S; int i; maskr |= maskr << 1; maskb |= maskb << 1; maskg |= maskg << 1; @@ -1508,18 +1531,22 @@ maskr, maskg, maskb, rsh, gsh, bsh, S); \ } -rgb16_32_wrapper(PIX_FMT_BGR32, bgr32, 16, 0, 0, 0, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_BGR32_1, bgr321, 16, 0, 0, 8, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_RGB32, rgb32, 0, 0, 16, 0, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_RGB32_1, rgb321, 0, 0, 16, 8, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_BGR565LE, bgr16le, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_BGR555LE, bgr15le, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7); -rgb16_32_wrapper(PIX_FMT_RGB565LE, rgb16le, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_RGB555LE, rgb15le, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7); -rgb16_32_wrapper(PIX_FMT_BGR565BE, bgr16be, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_BGR555BE, bgr15be, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7); -rgb16_32_wrapper(PIX_FMT_RGB565BE, rgb16be, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7); +rgb16_32_wrapper(PIX_FMT_BGR32, bgr32, 16, 0, 0, 0, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_BGR32_1, bgr321, 16, 0, 0, 8, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_RGB32, rgb32, 0, 0, 16, 0, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_RGB32_1, rgb321, 0, 0, 16, 8, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_BGR565LE, bgr16le, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_BGR555LE, bgr15le, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7) +rgb16_32_wrapper(PIX_FMT_BGR444LE, bgr12le, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0, RGB2YUV_SHIFT+4) +rgb16_32_wrapper(PIX_FMT_RGB565LE, rgb16le, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_RGB555LE, rgb15le, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7) +rgb16_32_wrapper(PIX_FMT_RGB444LE, rgb12le, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8, RGB2YUV_SHIFT+4) +rgb16_32_wrapper(PIX_FMT_BGR565BE, bgr16be, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_BGR555BE, bgr15be, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7) +rgb16_32_wrapper(PIX_FMT_BGR444BE, bgr12be, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0, RGB2YUV_SHIFT+4) +rgb16_32_wrapper(PIX_FMT_RGB565BE, rgb16be, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7) +rgb16_32_wrapper(PIX_FMT_RGB444BE, rgb12be, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8, RGB2YUV_SHIFT+4) static void abgrToA_c(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused) { @@ -1604,13 +1631,26 @@ assert(src1 == src2); } -static void LEToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, - const uint8_t *src2, int width, uint32_t *unused) +static void bswap16Y_c(uint8_t *_dst, const uint8_t *_src, int width, uint32_t *unused) +{ + int i; + const uint16_t *src = (const uint16_t *) _src; + uint16_t *dst = (uint16_t *) _dst; + for (i=0; i> (depth - 8); - dstV[i] = input_pixel(&srcV[i]) >> (depth - 8); - } -} - -static av_always_inline void -yuv9_or_10ToY_c_template(uint8_t *dstY, const uint8_t *_srcY, - int width, enum PixelFormat origin, int depth) -{ - int i; - const uint16_t *srcY = (const uint16_t*)_srcY; - - for (i = 0; i < width; i++) - dstY[i] = input_pixel(&srcY[i]) >> (depth - 8); -} - -#undef input_pixel - -#define YUV_NBPS(depth, BE_LE, origin) \ -static void BE_LE ## depth ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \ - const uint8_t *srcU, const uint8_t *srcV, \ - int width, uint32_t *unused) \ -{ \ - yuv9_OR_10ToUV_c_template(dstU, dstV, srcU, srcV, width, origin, depth); \ -} \ -static void BE_LE ## depth ## ToY_c(uint8_t *dstY, const uint8_t *srcY, \ - int width, uint32_t *unused) \ -{ \ - yuv9_or_10ToY_c_template(dstY, srcY, width, origin, depth); \ -} - -YUV_NBPS( 9, LE, PIX_FMT_YUV420P9LE); -YUV_NBPS( 9, BE, PIX_FMT_YUV420P9BE); -YUV_NBPS(10, LE, PIX_FMT_YUV420P10LE); -YUV_NBPS(10, BE, PIX_FMT_YUV420P10BE); - static void bgr24ToY_c(uint8_t *dst, const uint8_t *src, int width, uint32_t *unused) { @@ -1804,12 +1787,139 @@ } } +static void planar_rgb_to_y(uint8_t *dst, const uint8_t *src[4], int width) +{ + int i; + for (i = 0; i < width; i++) { + int g = src[0][i]; + int b = src[1][i]; + int r = src[2][i]; + + dst[i] = ((RY * r + GY * g + BY * b + (33 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT); + } +} + +static void planar_rgb16le_to_y(uint8_t *_dst, const uint8_t *_src[4], int width) +{ + int i; + const uint16_t **src = (const uint16_t **) _src; + uint16_t *dst = (uint16_t *) _dst; + for (i = 0; i < width; i++) { + int g = AV_RL16(src[0] + i); + int b = AV_RL16(src[1] + i); + int r = AV_RL16(src[2] + i); + + dst[i] = ((RY * r + GY * g + BY * b + (33 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT); + } +} + +static void planar_rgb16be_to_y(uint8_t *_dst, const uint8_t *_src[4], int width) +{ + int i; + const uint16_t **src = (const uint16_t **) _src; + uint16_t *dst = (uint16_t *) _dst; + for (i = 0; i < width; i++) { + int g = AV_RB16(src[0] + i); + int b = AV_RB16(src[1] + i); + int r = AV_RB16(src[2] + i); + + dst[i] = ((RY * r + GY * g + BY * b + (33 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT); + } +} + +static void planar_rgb_to_uv(uint8_t *dstU, uint8_t *dstV, const uint8_t *src[4], int width) +{ + int i; + for (i = 0; i < width; i++) { + int g = src[0][i]; + int b = src[1][i]; + int r = src[2][i]; + + dstU[i] = (RU * r + GU * g + BU * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1); + dstV[i] = (RV * r + GV * g + BV * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1); + } +} + +static void planar_rgb16le_to_uv(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *_src[4], int width) +{ + int i; + const uint16_t **src = (const uint16_t **) _src; + uint16_t *dstU = (uint16_t *) _dstU; + uint16_t *dstV = (uint16_t *) _dstV; + for (i = 0; i < width; i++) { + int g = AV_RL16(src[0] + i); + int b = AV_RL16(src[1] + i); + int r = AV_RL16(src[2] + i); + + dstU[i] = (RU * r + GU * g + BU * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1); + dstV[i] = (RV * r + GV * g + BV * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1); + } +} + +static void planar_rgb16be_to_uv(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *_src[4], int width) +{ + int i; + const uint16_t **src = (const uint16_t **) _src; + uint16_t *dstU = (uint16_t *) _dstU; + uint16_t *dstV = (uint16_t *) _dstV; + for (i = 0; i < width; i++) { + int g = AV_RB16(src[0] + i); + int b = AV_RB16(src[1] + i); + int r = AV_RB16(src[2] + i); + + dstU[i] = (RU * r + GU * g + BU * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1); + dstV[i] = (RV * r + GV * g + BV * b + (257 << RGB2YUV_SHIFT)) >> (RGB2YUV_SHIFT + 1); + } +} + +static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src, + const int16_t *filter, + const int16_t *filterPos, int filterSize) +{ + int i; + int32_t *dst = (int32_t *) _dst; + const uint16_t *src = (const uint16_t *) _src; + int bits = av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1; + int sh = bits - 4; + + for (i = 0; i < dstW; i++) { + int j; + int srcPos = filterPos[i]; + int val = 0; + + for (j = 0; j < filterSize; j++) { + val += src[srcPos + j] * filter[filterSize * i + j]; + } + // filter=14 bit, input=16 bit, output=30 bit, >> 11 makes 19 bit + dst[i] = FFMIN(val >> sh, (1 << 19) - 1); + } +} + +static void hScale16To15_c(SwsContext *c, int16_t *dst, int dstW, const uint8_t *_src, + const int16_t *filter, + const int16_t *filterPos, int filterSize) +{ + int i; + const uint16_t *src = (const uint16_t *) _src; + int sh = av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1; + + for (i = 0; i < dstW; i++) { + int j; + int srcPos = filterPos[i]; + int val = 0; + + for (j = 0; j < filterSize; j++) { + val += src[srcPos + j] * filter[filterSize * i + j]; + } + // filter=14 bit, input=16 bit, output=30 bit, >> 15 makes 15 bit + dst[i] = FFMIN(val >> sh, (1 << 15) - 1); + } +} // bilinear / bicubic scaling -static void hScale_c(int16_t *dst, int dstW, const uint8_t *src, - int srcW, int xInc, - const int16_t *filter, const int16_t *filterPos, - int filterSize) +static void hScale8To15_c(SwsContext *c, int16_t *dst, int dstW, const uint8_t *src, + const int16_t *filter, const int16_t *filterPos, + int filterSize) { int i; for (i=0; i>3, (1<<19)-1); // the cubic equation does overflow ... + //dst[i] = val>>7; + } +} + //FIXME all pal and rgb srcFormats could do this convertion as well //FIXME all scalers more complex than bilinear could do half of this transform static void chrRangeToJpeg_c(int16_t *dstU, int16_t *dstV, int width) @@ -1856,6 +1985,41 @@ dst[i] = (dst[i]*14071 + 33561947)>>14; } +static void chrRangeToJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width) +{ + int i; + int32_t *dstU = (int32_t *) _dstU; + int32_t *dstV = (int32_t *) _dstV; + for (i = 0; i < width; i++) { + dstU[i] = (FFMIN(dstU[i],30775<<4)*4663 - (9289992<<4))>>12; //-264 + dstV[i] = (FFMIN(dstV[i],30775<<4)*4663 - (9289992<<4))>>12; //-264 + } +} +static void chrRangeFromJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width) +{ + int i; + int32_t *dstU = (int32_t *) _dstU; + int32_t *dstV = (int32_t *) _dstV; + for (i = 0; i < width; i++) { + dstU[i] = (dstU[i]*1799 + (4081085<<4))>>11; //1469 + dstV[i] = (dstV[i]*1799 + (4081085<<4))>>11; //1469 + } +} +static void lumRangeToJpeg16_c(int16_t *_dst, int width) +{ + int i; + int32_t *dst = (int32_t *) _dst; + for (i = 0; i < width; i++) + dst[i] = (FFMIN(dst[i],30189<<4)*4769 - (39057361<<2))>>12; +} +static void lumRangeFromJpeg16_c(int16_t *_dst, int width) +{ + int i; + int32_t *dst = (int32_t *) _dst; + for (i = 0; i < width; i++) + dst[i] = (dst[i]*14071 + (33561947<<4))>>14; +} + static void hyscale_fast_c(SwsContext *c, int16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc) { @@ -1870,8 +2034,8 @@ } // *** horizontal scale Y line to temp buffer -static av_always_inline void hyscale(SwsContext *c, uint16_t *dst, int dstWidth, - const uint8_t *src, int srcW, int xInc, +static av_always_inline void hyscale(SwsContext *c, int16_t *dst, int dstWidth, + const uint8_t *src_in[4], int srcW, int xInc, const int16_t *hLumFilter, const int16_t *hLumFilterPos, int hLumFilterSize, uint8_t *formatConvBuffer, @@ -1879,14 +2043,18 @@ { void (*toYV12)(uint8_t *, const uint8_t *, int, uint32_t *) = isAlpha ? c->alpToYV12 : c->lumToYV12; void (*convertRange)(int16_t *, int) = isAlpha ? NULL : c->lumConvertRange; + const uint8_t *src = src_in[isAlpha ? 3 : 0]; if (toYV12) { toYV12(formatConvBuffer, src, srcW, pal); src= formatConvBuffer; + } else if (c->readLumPlanar && !isAlpha) { + c->readLumPlanar(formatConvBuffer, src_in, srcW); + src = formatConvBuffer; } if (!c->hyscale_fast) { - c->hScale(dst, dstWidth, src, srcW, xInc, hLumFilter, hLumFilterPos, hLumFilterSize); + c->hyScale(c, dst, dstWidth, src, hLumFilter, hLumFilterPos, hLumFilterSize); } else { // fast bilinear upscale / crap downscale c->hyscale_fast(c, dst, dstWidth, src, srcW, xInc); } @@ -1910,22 +2078,28 @@ } } -static av_always_inline void hcscale(SwsContext *c, uint16_t *dst1, uint16_t *dst2, int dstWidth, - const uint8_t *src1, const uint8_t *src2, +static av_always_inline void hcscale(SwsContext *c, int16_t *dst1, int16_t *dst2, int dstWidth, + const uint8_t *src_in[4], int srcW, int xInc, const int16_t *hChrFilter, const int16_t *hChrFilterPos, int hChrFilterSize, uint8_t *formatConvBuffer, uint32_t *pal) { + const uint8_t *src1 = src_in[1], *src2 = src_in[2]; if (c->chrToYV12) { - uint8_t *buf2 = formatConvBuffer + FFALIGN(srcW, 16); + uint8_t *buf2 = formatConvBuffer + FFALIGN(srcW * FFALIGN(c->srcBpc, 8) >> 3, 16); c->chrToYV12(formatConvBuffer, buf2, src1, src2, srcW, pal); src1= formatConvBuffer; src2= buf2; + } else if (c->readChrPlanar) { + uint8_t *buf2 = formatConvBuffer + FFALIGN(srcW * FFALIGN(c->srcBpc, 8) >> 3, 16); + c->readChrPlanar(formatConvBuffer, buf2, src_in, srcW); + src1= formatConvBuffer; + src2= buf2; } if (!c->hcscale_fast) { - c->hScale(dst1, dstWidth, src1, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize); - c->hScale(dst2, dstWidth, src2, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize); + c->hcScale(c, dst1, dstWidth, src1, hChrFilter, hChrFilterPos, hChrFilterSize); + c->hcScale(c, dst2, dstWidth, src2, hChrFilter, hChrFilterPos, hChrFilterSize); } else { // fast bilinear upscale / crap downscale c->hcscale_fast(c, dst1, dst2, dstWidth, src1, src2, srcW, xInc); } @@ -1936,87 +2110,246 @@ static av_always_inline void find_c_packed_planar_out_funcs(SwsContext *c, - yuv2planar1_fn *yuv2yuv1, yuv2planarX_fn *yuv2yuvX, + yuv2planar1_fn *yuv2plane1, yuv2planarX_fn *yuv2planeX, + yuv2interleavedX_fn *yuv2nv12cX, yuv2packed1_fn *yuv2packed1, yuv2packed2_fn *yuv2packed2, yuv2packedX_fn *yuv2packedX) { enum PixelFormat dstFormat = c->dstFormat; - if (dstFormat == PIX_FMT_NV12 || dstFormat == PIX_FMT_NV21) { - *yuv2yuvX = yuv2nv12X_c; - } else if (is16BPS(dstFormat)) { - *yuv2yuvX = isBE(dstFormat) ? yuv2yuvX16BE_c : yuv2yuvX16LE_c; + if (is16BPS(dstFormat)) { + *yuv2planeX = isBE(dstFormat) ? yuv2planeX_16BE_c : yuv2planeX_16LE_c; + *yuv2plane1 = isBE(dstFormat) ? yuv2plane1_16BE_c : yuv2plane1_16LE_c; } else if (is9_OR_10BPS(dstFormat)) { if (av_pix_fmt_descriptors[dstFormat].comp[0].depth_minus1 == 8) { - *yuv2yuvX = isBE(dstFormat) ? yuv2yuvX9BE_c : yuv2yuvX9LE_c; + *yuv2planeX = isBE(dstFormat) ? yuv2planeX_9BE_c : yuv2planeX_9LE_c; + *yuv2plane1 = isBE(dstFormat) ? yuv2plane1_9BE_c : yuv2plane1_9LE_c; } else { - *yuv2yuvX = isBE(dstFormat) ? yuv2yuvX10BE_c : yuv2yuvX10LE_c; + *yuv2planeX = isBE(dstFormat) ? yuv2planeX_10BE_c : yuv2planeX_10LE_c; + *yuv2plane1 = isBE(dstFormat) ? yuv2plane1_10BE_c : yuv2plane1_10LE_c; } } else { - *yuv2yuv1 = yuv2yuv1_c; - *yuv2yuvX = yuv2yuvX_c; + *yuv2plane1 = yuv2plane1_8_c; + *yuv2planeX = yuv2planeX_8_c; + if (dstFormat == PIX_FMT_NV12 || dstFormat == PIX_FMT_NV21) + *yuv2nv12cX = yuv2nv12cX_c; } + if(c->flags & SWS_FULL_CHR_H_INT) { - *yuv2packedX = yuv2rgbX_c_full; - } else { switch (dstFormat) { - case PIX_FMT_GRAY16BE: - *yuv2packed1 = yuv2gray16BE_1_c; - *yuv2packed2 = yuv2gray16BE_2_c; - *yuv2packedX = yuv2gray16BE_X_c; - break; - case PIX_FMT_GRAY16LE: - *yuv2packed1 = yuv2gray16LE_1_c; - *yuv2packed2 = yuv2gray16LE_2_c; - *yuv2packedX = yuv2gray16LE_X_c; - break; - case PIX_FMT_MONOWHITE: - *yuv2packed1 = yuv2monowhite_1_c; - *yuv2packed2 = yuv2monowhite_2_c; - *yuv2packedX = yuv2monowhite_X_c; - break; - case PIX_FMT_MONOBLACK: - *yuv2packed1 = yuv2monoblack_1_c; - *yuv2packed2 = yuv2monoblack_2_c; - *yuv2packedX = yuv2monoblack_X_c; - break; - case PIX_FMT_YUYV422: - *yuv2packed1 = yuv2yuyv422_1_c; - *yuv2packed2 = yuv2yuyv422_2_c; - *yuv2packedX = yuv2yuyv422_X_c; - break; - case PIX_FMT_UYVY422: - *yuv2packed1 = yuv2uyvy422_1_c; - *yuv2packed2 = yuv2uyvy422_2_c; - *yuv2packedX = yuv2uyvy422_X_c; + case PIX_FMT_RGBA: +#if CONFIG_SMALL + *yuv2packedX = yuv2rgba32_full_X_c; +#else +#if CONFIG_SWSCALE_ALPHA + if (c->alpPixBuf) { + *yuv2packedX = yuv2rgba32_full_X_c; + } else +#endif /* CONFIG_SWSCALE_ALPHA */ + { + *yuv2packedX = yuv2rgbx32_full_X_c; + } +#endif /* !CONFIG_SMALL */ + break; + case PIX_FMT_ARGB: +#if CONFIG_SMALL + *yuv2packedX = yuv2argb32_full_X_c; +#else +#if CONFIG_SWSCALE_ALPHA + if (c->alpPixBuf) { + *yuv2packedX = yuv2argb32_full_X_c; + } else +#endif /* CONFIG_SWSCALE_ALPHA */ + { + *yuv2packedX = yuv2xrgb32_full_X_c; + } +#endif /* !CONFIG_SMALL */ + break; + case PIX_FMT_BGRA: +#if CONFIG_SMALL + *yuv2packedX = yuv2bgra32_full_X_c; +#else +#if CONFIG_SWSCALE_ALPHA + if (c->alpPixBuf) { + *yuv2packedX = yuv2bgra32_full_X_c; + } else +#endif /* CONFIG_SWSCALE_ALPHA */ + { + *yuv2packedX = yuv2bgrx32_full_X_c; + } +#endif /* !CONFIG_SMALL */ + break; + case PIX_FMT_ABGR: +#if CONFIG_SMALL + *yuv2packedX = yuv2abgr32_full_X_c; +#else +#if CONFIG_SWSCALE_ALPHA + if (c->alpPixBuf) { + *yuv2packedX = yuv2abgr32_full_X_c; + } else +#endif /* CONFIG_SWSCALE_ALPHA */ + { + *yuv2packedX = yuv2xbgr32_full_X_c; + } +#endif /* !CONFIG_SMALL */ + break; + case PIX_FMT_RGB24: + *yuv2packedX = yuv2rgb24_full_X_c; + break; + case PIX_FMT_BGR24: + *yuv2packedX = yuv2bgr24_full_X_c; break; + } + } else { + switch (dstFormat) { case PIX_FMT_RGB48LE: - //*yuv2packed1 = yuv2rgb48le_1_c; - //*yuv2packed2 = yuv2rgb48le_2_c; - //*yuv2packedX = yuv2rgb48le_X_c; - //break; + *yuv2packed1 = yuv2rgb48le_1_c; + *yuv2packed2 = yuv2rgb48le_2_c; + *yuv2packedX = yuv2rgb48le_X_c; + break; case PIX_FMT_RGB48BE: *yuv2packed1 = yuv2rgb48be_1_c; *yuv2packed2 = yuv2rgb48be_2_c; *yuv2packedX = yuv2rgb48be_X_c; break; case PIX_FMT_BGR48LE: - //*yuv2packed1 = yuv2bgr48le_1_c; - //*yuv2packed2 = yuv2bgr48le_2_c; - //*yuv2packedX = yuv2bgr48le_X_c; - //break; + *yuv2packed1 = yuv2bgr48le_1_c; + *yuv2packed2 = yuv2bgr48le_2_c; + *yuv2packedX = yuv2bgr48le_X_c; + break; case PIX_FMT_BGR48BE: *yuv2packed1 = yuv2bgr48be_1_c; *yuv2packed2 = yuv2bgr48be_2_c; *yuv2packedX = yuv2bgr48be_X_c; break; - default: - *yuv2packed1 = yuv2packed1_c; - *yuv2packed2 = yuv2packed2_c; - *yuv2packedX = yuv2packedX_c; + case PIX_FMT_RGB32: + case PIX_FMT_BGR32: +#if CONFIG_SMALL + *yuv2packed1 = yuv2rgb32_1_c; + *yuv2packed2 = yuv2rgb32_2_c; + *yuv2packedX = yuv2rgb32_X_c; +#else +#if CONFIG_SWSCALE_ALPHA + if (c->alpPixBuf) { + *yuv2packed1 = yuv2rgba32_1_c; + *yuv2packed2 = yuv2rgba32_2_c; + *yuv2packedX = yuv2rgba32_X_c; + } else +#endif /* CONFIG_SWSCALE_ALPHA */ + { + *yuv2packed1 = yuv2rgbx32_1_c; + *yuv2packed2 = yuv2rgbx32_2_c; + *yuv2packedX = yuv2rgbx32_X_c; + } +#endif /* !CONFIG_SMALL */ + break; + case PIX_FMT_RGB32_1: + case PIX_FMT_BGR32_1: +#if CONFIG_SMALL + *yuv2packed1 = yuv2rgb32_1_1_c; + *yuv2packed2 = yuv2rgb32_1_2_c; + *yuv2packedX = yuv2rgb32_1_X_c; +#else +#if CONFIG_SWSCALE_ALPHA + if (c->alpPixBuf) { + *yuv2packed1 = yuv2rgba32_1_1_c; + *yuv2packed2 = yuv2rgba32_1_2_c; + *yuv2packedX = yuv2rgba32_1_X_c; + } else +#endif /* CONFIG_SWSCALE_ALPHA */ + { + *yuv2packed1 = yuv2rgbx32_1_1_c; + *yuv2packed2 = yuv2rgbx32_1_2_c; + *yuv2packedX = yuv2rgbx32_1_X_c; + } +#endif /* !CONFIG_SMALL */ + break; + case PIX_FMT_RGB24: + *yuv2packed1 = yuv2rgb24_1_c; + *yuv2packed2 = yuv2rgb24_2_c; + *yuv2packedX = yuv2rgb24_X_c; + break; + case PIX_FMT_BGR24: + *yuv2packed1 = yuv2bgr24_1_c; + *yuv2packed2 = yuv2bgr24_2_c; + *yuv2packedX = yuv2bgr24_X_c; + break; + case PIX_FMT_RGB565LE: + case PIX_FMT_RGB565BE: + case PIX_FMT_BGR565LE: + case PIX_FMT_BGR565BE: + *yuv2packed1 = yuv2rgb16_1_c; + *yuv2packed2 = yuv2rgb16_2_c; + *yuv2packedX = yuv2rgb16_X_c; + break; + case PIX_FMT_RGB555LE: + case PIX_FMT_RGB555BE: + case PIX_FMT_BGR555LE: + case PIX_FMT_BGR555BE: + *yuv2packed1 = yuv2rgb15_1_c; + *yuv2packed2 = yuv2rgb15_2_c; + *yuv2packedX = yuv2rgb15_X_c; + break; + case PIX_FMT_RGB444LE: + case PIX_FMT_RGB444BE: + case PIX_FMT_BGR444LE: + case PIX_FMT_BGR444BE: + *yuv2packed1 = yuv2rgb12_1_c; + *yuv2packed2 = yuv2rgb12_2_c; + *yuv2packedX = yuv2rgb12_X_c; + break; + case PIX_FMT_RGB8: + case PIX_FMT_BGR8: + *yuv2packed1 = yuv2rgb8_1_c; + *yuv2packed2 = yuv2rgb8_2_c; + *yuv2packedX = yuv2rgb8_X_c; + break; + case PIX_FMT_RGB4: + case PIX_FMT_BGR4: + *yuv2packed1 = yuv2rgb4_1_c; + *yuv2packed2 = yuv2rgb4_2_c; + *yuv2packedX = yuv2rgb4_X_c; + break; + case PIX_FMT_RGB4_BYTE: + case PIX_FMT_BGR4_BYTE: + *yuv2packed1 = yuv2rgb4b_1_c; + *yuv2packed2 = yuv2rgb4b_2_c; + *yuv2packedX = yuv2rgb4b_X_c; break; } } + switch (dstFormat) { + case PIX_FMT_GRAY16BE: + *yuv2packed1 = yuv2gray16BE_1_c; + *yuv2packed2 = yuv2gray16BE_2_c; + *yuv2packedX = yuv2gray16BE_X_c; + break; + case PIX_FMT_GRAY16LE: + *yuv2packed1 = yuv2gray16LE_1_c; + *yuv2packed2 = yuv2gray16LE_2_c; + *yuv2packedX = yuv2gray16LE_X_c; + break; + case PIX_FMT_MONOWHITE: + *yuv2packed1 = yuv2monowhite_1_c; + *yuv2packed2 = yuv2monowhite_2_c; + *yuv2packedX = yuv2monowhite_X_c; + break; + case PIX_FMT_MONOBLACK: + *yuv2packed1 = yuv2monoblack_1_c; + *yuv2packed2 = yuv2monoblack_2_c; + *yuv2packedX = yuv2monoblack_X_c; + break; + case PIX_FMT_YUYV422: + *yuv2packed1 = yuv2yuyv422_1_c; + *yuv2packed2 = yuv2yuyv422_2_c; + *yuv2packedX = yuv2yuyv422_X_c; + break; + case PIX_FMT_UYVY422: + *yuv2packed1 = yuv2uyvy422_1_c; + *yuv2packed2 = yuv2uyvy422_2_c; + *yuv2packedX = yuv2uyvy422_X_c; + break; + } } #define DEBUG_SWSCALE_BUFFERS 0 @@ -2062,11 +2395,13 @@ const int chrSrcSliceH= -((-srcSliceH) >> c->chrSrcVSubSample); int lastDstY; uint32_t *pal=c->pal_yuv; - yuv2planar1_fn yuv2yuv1 = c->yuv2yuv1; - yuv2planarX_fn yuv2yuvX = c->yuv2yuvX; + yuv2planar1_fn yuv2plane1 = c->yuv2plane1; + yuv2planarX_fn yuv2planeX = c->yuv2planeX; + yuv2interleavedX_fn yuv2nv12cX = c->yuv2nv12cX; yuv2packed1_fn yuv2packed1 = c->yuv2packed1; yuv2packed2_fn yuv2packed2 = c->yuv2packed2; yuv2packedX_fn yuv2packedX = c->yuv2packedX; + int should_dither = is9_OR_10BPS(c->srcFormat) || is16BPS(c->srcFormat); /* vars which will change and which we need to store back in the context */ int dstY= c->dstY; @@ -2116,21 +2451,28 @@ lastInChrBuf= -1; } + if (!should_dither) { + c->chrDither8 = c->lumDither8 = ff_sws_pb_64; + } lastDstY= dstY; for (;dstY < dstH; dstY++) { - unsigned char *dest =dst[0]+dstStride[0]*dstY; const int chrDstY= dstY>>c->chrDstVSubSample; - unsigned char *uDest=dst[1]+dstStride[1]*chrDstY; - unsigned char *vDest=dst[2]+dstStride[2]*chrDstY; - unsigned char *aDest=(CONFIG_SWSCALE_ALPHA && alpPixBuf) ? dst[3]+dstStride[3]*dstY : NULL; + uint8_t *dest[4] = { + dst[0] + dstStride[0] * dstY, + dst[1] + dstStride[1] * chrDstY, + dst[2] + dstStride[2] * chrDstY, + (CONFIG_SWSCALE_ALPHA && alpPixBuf) ? dst[3] + dstStride[3] * dstY : NULL, + }; const int firstLumSrcY= vLumFilterPos[dstY]; //First line needed as input const int firstLumSrcY2= vLumFilterPos[FFMIN(dstY | ((1<chrDstVSubSample) - 1), dstH-1)]; const int firstChrSrcY= vChrFilterPos[chrDstY]; //First line needed as input - int lastLumSrcY= firstLumSrcY + vLumFilterSize -1; // Last line needed as input - int lastLumSrcY2=firstLumSrcY2+ vLumFilterSize -1; // Last line needed as input - int lastChrSrcY= firstChrSrcY + vChrFilterSize -1; // Last line needed as input + + // Last line needed as input + int lastLumSrcY = FFMIN(c->srcH, firstLumSrcY + vLumFilterSize) - 1; + int lastLumSrcY2 = FFMIN(c->srcH, firstLumSrcY2 + vLumFilterSize) - 1; + int lastChrSrcY = FFMIN(c->chrSrcH, firstChrSrcY + vChrFilterSize) - 1; int enough_lines; //handle holes (FAST_BILINEAR & weird filters) @@ -2157,8 +2499,12 @@ //Do horizontal scaling while(lastInLumBuf < lastLumSrcY) { - const uint8_t *src1= src[0]+(lastInLumBuf + 1 - srcSliceY)*srcStride[0]; - const uint8_t *src2= src[3]+(lastInLumBuf + 1 - srcSliceY)*srcStride[3]; + const uint8_t *src1[4] = { + src[0] + (lastInLumBuf + 1 - srcSliceY) * srcStride[0], + src[1] + (lastInLumBuf + 1 - srcSliceY) * srcStride[1], + src[2] + (lastInLumBuf + 1 - srcSliceY) * srcStride[2], + src[3] + (lastInLumBuf + 1 - srcSliceY) * srcStride[3], + }; lumBufIndex++; assert(lumBufIndex < 2*vLumBufSize); assert(lastInLumBuf + 1 - srcSliceY < srcSliceH); @@ -2168,7 +2514,7 @@ formatConvBuffer, pal, 0); if (CONFIG_SWSCALE_ALPHA && alpPixBuf) - hyscale(c, alpPixBuf[ lumBufIndex ], dstW, src2, srcW, + hyscale(c, alpPixBuf[ lumBufIndex ], dstW, src1, srcW, lumXInc, hLumFilter, hLumFilterPos, hLumFilterSize, formatConvBuffer, pal, 1); @@ -2177,8 +2523,12 @@ lumBufIndex, lastInLumBuf); } while(lastInChrBuf < lastChrSrcY) { - const uint8_t *src1= src[1]+(lastInChrBuf + 1 - chrSrcSliceY)*srcStride[1]; - const uint8_t *src2= src[2]+(lastInChrBuf + 1 - chrSrcSliceY)*srcStride[2]; + const uint8_t *src1[4] = { + src[0] + (lastInChrBuf + 1 - chrSrcSliceY) * srcStride[0], + src[1] + (lastInChrBuf + 1 - chrSrcSliceY) * srcStride[1], + src[2] + (lastInChrBuf + 1 - chrSrcSliceY) * srcStride[2], + src[3] + (lastInChrBuf + 1 - chrSrcSliceY) * srcStride[3], + }; chrBufIndex++; assert(chrBufIndex < 2*vChrBufSize); assert(lastInChrBuf + 1 - chrSrcSliceY < (chrSrcSliceH)); @@ -2187,7 +2537,7 @@ if (c->needs_hcscale) hcscale(c, chrUPixBuf[chrBufIndex], chrVPixBuf[chrBufIndex], - chrDstW, src1, src2, chrSrcW, chrXInc, + chrDstW, src1, chrSrcW, chrXInc, hChrFilter, hChrFilterPos, hChrFilterSize, formatConvBuffer, pal); lastInChrBuf++; @@ -2203,11 +2553,14 @@ #if HAVE_MMX updateMMXDitherTables(c, dstY, lumBufIndex, chrBufIndex, lastInLumBuf, lastInChrBuf); #endif + if (should_dither) { + c->chrDither8 = dither_8x8_128[chrDstY & 7]; + c->lumDither8 = dither_8x8_128[dstY & 7]; + } if (dstY >= dstH-2) { // hmm looks like we can't use MMX here without overwriting this array's tail - find_c_packed_planar_out_funcs(c, &yuv2yuv1, &yuv2yuvX, - &yuv2packed1, &yuv2packed2, - &yuv2packedX); + find_c_packed_planar_out_funcs(c, &yuv2plane1, &yuv2planeX, &yuv2nv12cX, + &yuv2packed1, &yuv2packed2, &yuv2packedX); } { @@ -2215,48 +2568,105 @@ const int16_t **chrUSrcPtr= (const int16_t **) chrUPixBuf + chrBufIndex + firstChrSrcY - lastInChrBuf + vChrBufSize; const int16_t **chrVSrcPtr= (const int16_t **) chrVPixBuf + chrBufIndex + firstChrSrcY - lastInChrBuf + vChrBufSize; const int16_t **alpSrcPtr= (CONFIG_SWSCALE_ALPHA && alpPixBuf) ? (const int16_t **) alpPixBuf + lumBufIndex + firstLumSrcY - lastInLumBuf + vLumBufSize : NULL; + + if (firstLumSrcY < 0 || firstLumSrcY + vLumFilterSize > c->srcH) { + const int16_t **tmpY = (const int16_t **) lumPixBuf + 2 * vLumBufSize; + int neg = -firstLumSrcY, i, end = FFMIN(c->srcH - firstLumSrcY, vLumFilterSize); + for (i = 0; i < neg; i++) + tmpY[i] = lumSrcPtr[neg]; + for ( ; i < end; i++) + tmpY[i] = lumSrcPtr[i]; + for ( ; i < vLumFilterSize; i++) + tmpY[i] = tmpY[i-1]; + lumSrcPtr = tmpY; + + if (alpSrcPtr) { + const int16_t **tmpA = (const int16_t **) alpPixBuf + 2 * vLumBufSize; + for (i = 0; i < neg; i++) + tmpA[i] = alpSrcPtr[neg]; + for ( ; i < end; i++) + tmpA[i] = alpSrcPtr[i]; + for ( ; i < vLumFilterSize; i++) + tmpA[i] = tmpA[i - 1]; + alpSrcPtr = tmpA; + } + } + if (firstChrSrcY < 0 || firstChrSrcY + vChrFilterSize > c->chrSrcH) { + const int16_t **tmpU = (const int16_t **) chrUPixBuf + 2 * vChrBufSize, + **tmpV = (const int16_t **) chrVPixBuf + 2 * vChrBufSize; + int neg = -firstChrSrcY, i, end = FFMIN(c->chrSrcH - firstChrSrcY, vChrFilterSize); + for (i = 0; i < neg; i++) { + tmpU[i] = chrUSrcPtr[neg]; + tmpV[i] = chrVSrcPtr[neg]; + } + for ( ; i < end; i++) { + tmpU[i] = chrUSrcPtr[i]; + tmpV[i] = chrVSrcPtr[i]; + } + for ( ; i < vChrFilterSize; i++) { + tmpU[i] = tmpU[i - 1]; + tmpV[i] = tmpV[i - 1]; + } + chrUSrcPtr = tmpU; + chrVSrcPtr = tmpV; + } + if (isPlanarYUV(dstFormat) || dstFormat==PIX_FMT_GRAY8) { //YV12 like const int chrSkipMask= (1<chrDstVSubSample)-1; - if ((dstY&chrSkipMask) || isGray(dstFormat)) uDest=vDest= NULL; //FIXME split functions in lumi / chromi - if (c->yuv2yuv1 && vLumFilterSize == 1 && vChrFilterSize == 1) { // unscaled YV12 - const int16_t *lumBuf = lumSrcPtr[0]; - const int16_t *chrUBuf= chrUSrcPtr[0]; - const int16_t *chrVBuf= chrVSrcPtr[0]; - const int16_t *alpBuf= (CONFIG_SWSCALE_ALPHA && alpPixBuf) ? alpSrcPtr[0] : NULL; - yuv2yuv1(c, lumBuf, chrUBuf, chrVBuf, alpBuf, dest, - uDest, vDest, aDest, dstW, chrDstW); - } else { //General YV12 - yuv2yuvX(c, - vLumFilter+dstY*vLumFilterSize , lumSrcPtr, vLumFilterSize, - vChrFilter+chrDstY*vChrFilterSize, chrUSrcPtr, - chrVSrcPtr, vChrFilterSize, - alpSrcPtr, dest, uDest, vDest, aDest, dstW, chrDstW); + + if (vLumFilterSize == 1) { + yuv2plane1(lumSrcPtr[0], dest[0], dstW, c->lumDither8, 0); + } else { + yuv2planeX(vLumFilter + dstY * vLumFilterSize, vLumFilterSize, + lumSrcPtr, dest[0], dstW, c->lumDither8, 0); + } + + if (!((dstY&chrSkipMask) || isGray(dstFormat))) { + if (yuv2nv12cX) { + yuv2nv12cX(c, vChrFilter + chrDstY * vChrFilterSize, vChrFilterSize, chrUSrcPtr, chrVSrcPtr, dest[1], chrDstW); + } else if (vChrFilterSize == 1) { + yuv2plane1(chrUSrcPtr[0], dest[1], chrDstW, c->chrDither8, 0); + yuv2plane1(chrVSrcPtr[0], dest[2], chrDstW, c->chrDither8, 3); + } else { + yuv2planeX(vChrFilter + chrDstY * vChrFilterSize, vChrFilterSize, + chrUSrcPtr, dest[1], chrDstW, c->chrDither8, 0); + yuv2planeX(vChrFilter + chrDstY * vChrFilterSize, vChrFilterSize, + chrVSrcPtr, dest[2], chrDstW, c->chrDither8, 3); + } + } + + if (CONFIG_SWSCALE_ALPHA && alpPixBuf){ + if (vLumFilterSize == 1) { + yuv2plane1(alpSrcPtr[0], dest[3], dstW, c->lumDither8, 0); + } else { + yuv2planeX(vLumFilter + dstY * vLumFilterSize, vLumFilterSize, + alpSrcPtr, dest[3], dstW, c->lumDither8, 0); + } } } else { assert(lumSrcPtr + vLumFilterSize - 1 < lumPixBuf + vLumBufSize*2); assert(chrUSrcPtr + vChrFilterSize - 1 < chrUPixBuf + vChrBufSize*2); if (c->yuv2packed1 && vLumFilterSize == 1 && vChrFilterSize == 2) { //unscaled RGB - int chrAlpha= vChrFilter[2*dstY+1]; - yuv2packed1(c, *lumSrcPtr, *chrUSrcPtr, *(chrUSrcPtr+1), - *chrVSrcPtr, *(chrVSrcPtr+1), - alpPixBuf ? *alpSrcPtr : NULL, - dest, dstW, chrAlpha, dstFormat, flags, dstY); + int chrAlpha = vChrFilter[2 * dstY + 1]; + yuv2packed1(c, *lumSrcPtr, chrUSrcPtr, chrVSrcPtr, + alpPixBuf ? *alpSrcPtr : NULL, + dest[0], dstW, chrAlpha, dstY); } else if (c->yuv2packed2 && vLumFilterSize == 2 && vChrFilterSize == 2) { //bilinear upscale RGB - int lumAlpha= vLumFilter[2*dstY+1]; - int chrAlpha= vChrFilter[2*dstY+1]; - lumMmxFilter[2]= - lumMmxFilter[3]= vLumFilter[2*dstY ]*0x10001; - chrMmxFilter[2]= - chrMmxFilter[3]= vChrFilter[2*chrDstY]*0x10001; - yuv2packed2(c, *lumSrcPtr, *(lumSrcPtr+1), *chrUSrcPtr, *(chrUSrcPtr+1), - *chrVSrcPtr, *(chrVSrcPtr+1), - alpPixBuf ? *alpSrcPtr : NULL, alpPixBuf ? *(alpSrcPtr+1) : NULL, - dest, dstW, lumAlpha, chrAlpha, dstY); + int lumAlpha = vLumFilter[2 * dstY + 1]; + int chrAlpha = vChrFilter[2 * dstY + 1]; + lumMmxFilter[2] = + lumMmxFilter[3] = vLumFilter[2 * dstY ] * 0x10001; + chrMmxFilter[2] = + chrMmxFilter[3] = vChrFilter[2 * chrDstY] * 0x10001; + yuv2packed2(c, lumSrcPtr, chrUSrcPtr, chrVSrcPtr, + alpPixBuf ? alpSrcPtr : NULL, + dest[0], dstW, lumAlpha, chrAlpha, dstY); } else { //general RGB - yuv2packedX(c, - vLumFilter+dstY*vLumFilterSize, lumSrcPtr, vLumFilterSize, - vChrFilter+dstY*vChrFilterSize, chrUSrcPtr, chrVSrcPtr, vChrFilterSize, - alpSrcPtr, dest, dstW, dstY); + yuv2packedX(c, vLumFilter + dstY * vLumFilterSize, + lumSrcPtr, vLumFilterSize, + vChrFilter + dstY * vChrFilterSize, + chrUSrcPtr, chrVSrcPtr, vChrFilterSize, + alpSrcPtr, dest[0], dstW, dstY); } } } @@ -2285,17 +2695,10 @@ { enum PixelFormat srcFormat = c->srcFormat; - find_c_packed_planar_out_funcs(c, &c->yuv2yuv1, &c->yuv2yuvX, - &c->yuv2packed1, &c->yuv2packed2, + find_c_packed_planar_out_funcs(c, &c->yuv2plane1, &c->yuv2planeX, + &c->yuv2nv12cX, &c->yuv2packed1, &c->yuv2packed2, &c->yuv2packedX); - c->hScale = hScale_c; - - if (c->flags & SWS_FAST_BILINEAR) { - c->hyscale_fast = hyscale_fast_c; - c->hcscale_fast = hcscale_fast_c; - } - c->chrToYV12 = NULL; switch(srcFormat) { case PIX_FMT_YUYV422 : c->chrToYV12 = yuy2ToUV_c; break; @@ -2307,22 +2710,34 @@ case PIX_FMT_PAL8 : case PIX_FMT_BGR4_BYTE: case PIX_FMT_RGB4_BYTE: c->chrToYV12 = palToUV_c; break; - case PIX_FMT_YUV444P9BE: - case PIX_FMT_YUV420P9BE: c->chrToYV12 = BE9ToUV_c; break; + case PIX_FMT_GBRP9LE: + case PIX_FMT_GBRP10LE: + case PIX_FMT_GBRP16LE: c->readChrPlanar = planar_rgb16le_to_uv; break; + case PIX_FMT_GBRP9BE: + case PIX_FMT_GBRP10BE: + case PIX_FMT_GBRP16BE: c->readChrPlanar = planar_rgb16be_to_uv; break; + case PIX_FMT_GBRP: c->readChrPlanar = planar_rgb_to_uv; break; +#if HAVE_BIGENDIAN case PIX_FMT_YUV444P9LE: - case PIX_FMT_YUV420P9LE: c->chrToYV12 = LE9ToUV_c; break; - case PIX_FMT_YUV444P10BE: - case PIX_FMT_YUV422P10BE: - case PIX_FMT_YUV420P10BE: c->chrToYV12 = BE10ToUV_c; break; + case PIX_FMT_YUV422P9LE: + case PIX_FMT_YUV420P9LE: case PIX_FMT_YUV422P10LE: case PIX_FMT_YUV444P10LE: - case PIX_FMT_YUV420P10LE: c->chrToYV12 = LE10ToUV_c; break; - case PIX_FMT_YUV420P16BE: - case PIX_FMT_YUV422P16BE: - case PIX_FMT_YUV444P16BE: c->chrToYV12 = BEToUV_c; break; + case PIX_FMT_YUV420P10LE: case PIX_FMT_YUV420P16LE: case PIX_FMT_YUV422P16LE: - case PIX_FMT_YUV444P16LE: c->chrToYV12 = LEToUV_c; break; + case PIX_FMT_YUV444P16LE: c->chrToYV12 = bswap16UV_c; break; +#else + case PIX_FMT_YUV444P9BE: + case PIX_FMT_YUV422P9BE: + case PIX_FMT_YUV420P9BE: + case PIX_FMT_YUV444P10BE: + case PIX_FMT_YUV422P10BE: + case PIX_FMT_YUV420P10BE: + case PIX_FMT_YUV420P16BE: + case PIX_FMT_YUV422P16BE: + case PIX_FMT_YUV444P16BE: c->chrToYV12 = bswap16UV_c; break; +#endif } if (c->chrSrcHSubSample) { switch(srcFormat) { @@ -2337,6 +2752,8 @@ case PIX_FMT_BGR565BE: c->chrToYV12 = bgr16beToUV_half_c; break; case PIX_FMT_BGR555LE: c->chrToYV12 = bgr15leToUV_half_c; break; case PIX_FMT_BGR555BE: c->chrToYV12 = bgr15beToUV_half_c; break; + case PIX_FMT_BGR444LE: c->chrToYV12 = bgr12leToUV_half_c; break; + case PIX_FMT_BGR444BE: c->chrToYV12 = bgr12beToUV_half_c; break; case PIX_FMT_BGR32 : c->chrToYV12 = rgb32ToUV_half_c; break; case PIX_FMT_BGR32_1 : c->chrToYV12 = rgb321ToUV_half_c; break; case PIX_FMT_RGB24 : c->chrToYV12 = rgb24ToUV_half_c; break; @@ -2344,6 +2761,8 @@ case PIX_FMT_RGB565BE: c->chrToYV12 = rgb16beToUV_half_c; break; case PIX_FMT_RGB555LE: c->chrToYV12 = rgb15leToUV_half_c; break; case PIX_FMT_RGB555BE: c->chrToYV12 = rgb15beToUV_half_c; break; + case PIX_FMT_RGB444LE: c->chrToYV12 = rgb12leToUV_half_c; break; + case PIX_FMT_RGB444BE: c->chrToYV12 = rgb12beToUV_half_c; break; } } else { switch(srcFormat) { @@ -2358,6 +2777,8 @@ case PIX_FMT_BGR565BE: c->chrToYV12 = bgr16beToUV_c; break; case PIX_FMT_BGR555LE: c->chrToYV12 = bgr15leToUV_c; break; case PIX_FMT_BGR555BE: c->chrToYV12 = bgr15beToUV_c; break; + case PIX_FMT_BGR444LE: c->chrToYV12 = bgr12leToUV_c; break; + case PIX_FMT_BGR444BE: c->chrToYV12 = bgr12beToUV_c; break; case PIX_FMT_BGR32 : c->chrToYV12 = rgb32ToUV_c; break; case PIX_FMT_BGR32_1 : c->chrToYV12 = rgb321ToUV_c; break; case PIX_FMT_RGB24 : c->chrToYV12 = rgb24ToUV_c; break; @@ -2365,43 +2786,61 @@ case PIX_FMT_RGB565BE: c->chrToYV12 = rgb16beToUV_c; break; case PIX_FMT_RGB555LE: c->chrToYV12 = rgb15leToUV_c; break; case PIX_FMT_RGB555BE: c->chrToYV12 = rgb15beToUV_c; break; + case PIX_FMT_RGB444LE: c->chrToYV12 = rgb12leToUV_c; break; + case PIX_FMT_RGB444BE: c->chrToYV12 = rgb12beToUV_c; break; } } c->lumToYV12 = NULL; c->alpToYV12 = NULL; switch (srcFormat) { - case PIX_FMT_YUV444P9BE: - case PIX_FMT_YUV420P9BE: c->lumToYV12 = BE9ToY_c; break; + case PIX_FMT_GBRP9LE: + case PIX_FMT_GBRP10LE: + case PIX_FMT_GBRP16LE: c->readLumPlanar = planar_rgb16le_to_y; break; + case PIX_FMT_GBRP9BE: + case PIX_FMT_GBRP10BE: + case PIX_FMT_GBRP16BE: c->readLumPlanar = planar_rgb16be_to_y; break; + case PIX_FMT_GBRP: c->readLumPlanar = planar_rgb_to_y; break; +#if HAVE_BIGENDIAN case PIX_FMT_YUV444P9LE: - case PIX_FMT_YUV420P9LE: c->lumToYV12 = LE9ToY_c; break; - case PIX_FMT_YUV444P10BE: - case PIX_FMT_YUV422P10BE: - case PIX_FMT_YUV420P10BE: c->lumToYV12 = BE10ToY_c; break; + case PIX_FMT_YUV422P9LE: + case PIX_FMT_YUV420P9LE: case PIX_FMT_YUV444P10LE: case PIX_FMT_YUV422P10LE: - case PIX_FMT_YUV420P10LE: c->lumToYV12 = LE10ToY_c; break; - case PIX_FMT_YUYV422 : - case PIX_FMT_YUV420P16BE: - case PIX_FMT_YUV422P16BE: - case PIX_FMT_YUV444P16BE: - case PIX_FMT_Y400A : - case PIX_FMT_GRAY16BE : c->lumToYV12 = yuy2ToY_c; break; - case PIX_FMT_UYVY422 : + case PIX_FMT_YUV420P10LE: case PIX_FMT_YUV420P16LE: case PIX_FMT_YUV422P16LE: case PIX_FMT_YUV444P16LE: - case PIX_FMT_GRAY16LE : c->lumToYV12 = uyvyToY_c; break; + case PIX_FMT_GRAY16LE: c->lumToYV12 = bswap16Y_c; break; +#else + case PIX_FMT_YUV444P9BE: + case PIX_FMT_YUV422P9BE: + case PIX_FMT_YUV420P9BE: + case PIX_FMT_YUV444P10BE: + case PIX_FMT_YUV422P10BE: + case PIX_FMT_YUV420P10BE: + case PIX_FMT_YUV420P16BE: + case PIX_FMT_YUV422P16BE: + case PIX_FMT_YUV444P16BE: + case PIX_FMT_GRAY16BE: c->lumToYV12 = bswap16Y_c; break; +#endif + case PIX_FMT_YUYV422 : + case PIX_FMT_Y400A : c->lumToYV12 = yuy2ToY_c; break; + case PIX_FMT_UYVY422 : c->lumToYV12 = uyvyToY_c; break; case PIX_FMT_BGR24 : c->lumToYV12 = bgr24ToY_c; break; case PIX_FMT_BGR565LE : c->lumToYV12 = bgr16leToY_c; break; case PIX_FMT_BGR565BE : c->lumToYV12 = bgr16beToY_c; break; case PIX_FMT_BGR555LE : c->lumToYV12 = bgr15leToY_c; break; case PIX_FMT_BGR555BE : c->lumToYV12 = bgr15beToY_c; break; + case PIX_FMT_BGR444LE : c->lumToYV12 = bgr12leToY_c; break; + case PIX_FMT_BGR444BE : c->lumToYV12 = bgr12beToY_c; break; case PIX_FMT_RGB24 : c->lumToYV12 = rgb24ToY_c; break; case PIX_FMT_RGB565LE : c->lumToYV12 = rgb16leToY_c; break; case PIX_FMT_RGB565BE : c->lumToYV12 = rgb16beToY_c; break; case PIX_FMT_RGB555LE : c->lumToYV12 = rgb15leToY_c; break; case PIX_FMT_RGB555BE : c->lumToYV12 = rgb15beToY_c; break; + case PIX_FMT_RGB444LE : c->lumToYV12 = rgb12leToY_c; break; + case PIX_FMT_RGB444BE : c->lumToYV12 = rgb12beToY_c; break; case PIX_FMT_RGB8 : case PIX_FMT_BGR8 : case PIX_FMT_PAL8 : @@ -2428,13 +2867,37 @@ } } + if (c->srcBpc == 8) { + if (c->dstBpc <= 10) { + c->hyScale = c->hcScale = hScale8To15_c; + if (c->flags & SWS_FAST_BILINEAR) { + c->hyscale_fast = hyscale_fast_c; + c->hcscale_fast = hcscale_fast_c; + } + } else { + c->hyScale = c->hcScale = hScale8To19_c; + } + } else { + c->hyScale = c->hcScale = c->dstBpc > 10 ? hScale16To19_c : hScale16To15_c; + } + if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat)) { - if (c->srcRange) { - c->lumConvertRange = lumRangeFromJpeg_c; - c->chrConvertRange = chrRangeFromJpeg_c; + if (c->dstBpc <= 10) { + if (c->srcRange) { + c->lumConvertRange = lumRangeFromJpeg_c; + c->chrConvertRange = chrRangeFromJpeg_c; + } else { + c->lumConvertRange = lumRangeToJpeg_c; + c->chrConvertRange = chrRangeToJpeg_c; + } } else { - c->lumConvertRange = lumRangeToJpeg_c; - c->chrConvertRange = chrRangeToJpeg_c; + if (c->srcRange) { + c->lumConvertRange = lumRangeFromJpeg16_c; + c->chrConvertRange = chrRangeFromJpeg16_c; + } else { + c->lumConvertRange = lumRangeToJpeg16_c; + c->chrConvertRange = chrRangeToJpeg16_c; + } } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/swscale.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/swscale.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/swscale.h 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/swscale.h 2012-01-11 00:34:30.000000000 +0000 @@ -28,9 +28,11 @@ */ #include "libavutil/avutil.h" +#include "libavutil/log.h" +#include "libavutil/pixfmt.h" #define LIBSWSCALE_VERSION_MAJOR 2 -#define LIBSWSCALE_VERSION_MINOR 0 +#define LIBSWSCALE_VERSION_MINOR 1 #define LIBSWSCALE_VERSION_MICRO 0 #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ @@ -55,17 +57,17 @@ #endif /** - * Returns the LIBSWSCALE_VERSION_INT constant. + * Return the LIBSWSCALE_VERSION_INT constant. */ unsigned swscale_version(void); /** - * Returns the libswscale build-time configuration. + * Return the libswscale build-time configuration. */ const char *swscale_configuration(void); /** - * Returns the libswscale license. + * Return the libswscale license. */ const char *swscale_license(void); @@ -122,7 +124,7 @@ #define SWS_CS_DEFAULT 5 /** - * Returns a pointer to yuv<->rgb coefficients for the given colorspace + * Return a pointer to yuv<->rgb coefficients for the given colorspace * suitable for sws_setColorspaceDetails(). * * @param colorspace One of the SWS_CS_* macros. If invalid, @@ -130,7 +132,6 @@ */ const int *sws_getCoefficients(int colorspace); - // when used for filters they must have an odd number of elements // coeffs cannot be shared between vectors typedef struct { @@ -149,26 +150,26 @@ struct SwsContext; /** - * Returns a positive value if pix_fmt is a supported input format, 0 + * Return a positive value if pix_fmt is a supported input format, 0 * otherwise. */ int sws_isSupportedInput(enum PixelFormat pix_fmt); /** - * Returns a positive value if pix_fmt is a supported output format, 0 + * Return a positive value if pix_fmt is a supported output format, 0 * otherwise. */ int sws_isSupportedOutput(enum PixelFormat pix_fmt); /** - * Allocates an empty SwsContext. This must be filled and passed to + * Allocate an empty SwsContext. This must be filled and passed to * sws_init_context(). For filling see AVOptions, options.c and * sws_setColorspaceDetails(). */ struct SwsContext *sws_alloc_context(void); /** - * Initializes the swscaler context sws_context. + * Initialize the swscaler context sws_context. * * @return zero or positive value on success, a negative value on * error @@ -176,14 +177,14 @@ int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter); /** - * Frees the swscaler context swsContext. + * Free the swscaler context swsContext. * If swsContext is NULL, then does nothing. */ void sws_freeContext(struct SwsContext *swsContext); #if FF_API_SWS_GETCONTEXT /** - * Allocates and returns a SwsContext. You need it to perform + * Allocate and return an SwsContext. You need it to perform * scaling/conversion operations using sws_scale(). * * @param srcW the width of the source image @@ -205,7 +206,7 @@ #endif /** - * Scales the image slice in srcSlice and puts the resulting scaled + * Scale the image slice in srcSlice and put the resulting scaled * slice in the image in dst. A slice is a sequence of consecutive * rows in an image. * @@ -213,7 +214,7 @@ * top-bottom or bottom-top order. If slices are provided in * non-sequential order the behavior of the function is undefined. * - * @param context the scaling context previously created with + * @param c the scaling context previously created with * sws_getContext() * @param srcSlice the array containing the pointers to the planes of * the source slice @@ -230,12 +231,12 @@ * the destination image * @return the height of the output slice */ -int sws_scale(struct SwsContext *context, const uint8_t* const srcSlice[], const int srcStride[], - int srcSliceY, int srcSliceH, uint8_t* const dst[], const int dstStride[]); +int sws_scale(struct SwsContext *c, const uint8_t *const srcSlice[], + const int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *const dst[], const int dstStride[]); /** * @param inv_table the yuv2rgb coefficients, normally ff_yuv2rgb_coeffs[x] - * @param fullRange if 1 then the luma range is 0..255 if 0 it is 16..235 * @return -1 if not supported */ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], @@ -250,35 +251,35 @@ int *brightness, int *contrast, int *saturation); /** - * Allocates and returns an uninitialized vector with length coefficients. + * Allocate and return an uninitialized vector with length coefficients. */ SwsVector *sws_allocVec(int length); /** - * Returns a normalized Gaussian curve used to filter stuff - * quality=3 is high quality, lower is lower quality. + * Return a normalized Gaussian curve used to filter stuff + * quality = 3 is high quality, lower is lower quality. */ SwsVector *sws_getGaussianVec(double variance, double quality); /** - * Allocates and returns a vector with length coefficients, all + * Allocate and return a vector with length coefficients, all * with the same value c. */ SwsVector *sws_getConstVec(double c, int length); /** - * Allocates and returns a vector with just one coefficient, with + * Allocate and return a vector with just one coefficient, with * value 1.0. */ SwsVector *sws_getIdentityVec(void); /** - * Scales all the coefficients of a by the scalar value. + * Scale all the coefficients of a by the scalar value. */ void sws_scaleVec(SwsVector *a, double scalar); /** - * Scales all the coefficients of a so that their sum equals height. + * Scale all the coefficients of a so that their sum equals height. */ void sws_normalizeVec(SwsVector *a, double height); void sws_convVec(SwsVector *a, SwsVector *b); @@ -287,13 +288,13 @@ void sws_shiftVec(SwsVector *a, int shift); /** - * Allocates and returns a clone of the vector a, that is a vector + * Allocate and return a clone of the vector a, that is a vector * with the same coefficients as a. */ SwsVector *sws_cloneVec(SwsVector *a); /** - * Prints with av_log() a textual representation of the vector a + * Print with av_log() a textual representation of the vector a * if log_level <= av_log_level. */ void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level); @@ -307,8 +308,7 @@ void sws_freeFilter(SwsFilter *filter); /** - * Checks if context can be reused, otherwise reallocates a new - * one. + * Check if context can be reused, otherwise reallocate a new one. * * If context is NULL, just calls sws_getContext() to get a new * context. Otherwise, checks if the parameters are the ones already @@ -326,7 +326,7 @@ SwsFilter *dstFilter, const double *param); /** - * Converts an 8bit paletted frame into a frame with a color depth of 32-bits. + * Convert an 8-bit paletted frame into a frame with a color depth of 32 bits. * * The output frame will have the same packed format as the palette. * @@ -338,7 +338,7 @@ void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette); /** - * Converts an 8bit paletted frame into a frame with a color depth of 24 bits. + * Convert an 8-bit paletted frame into a frame with a color depth of 24 bits. * * With the palette format "ABCD", the destination frame ends up with the format "ABC". * @@ -349,5 +349,12 @@ */ void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette); +/** + * Get the AVClass for swsContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *sws_get_class(void); #endif /* SWSCALE_SWSCALE_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/swscale_internal.h mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/swscale_internal.h --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/swscale_internal.h 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/swscale_internal.h 2012-01-11 00:34:30.000000000 +0000 @@ -28,10 +28,13 @@ #endif #include "libavutil/avutil.h" +#include "libavutil/log.h" +#include "libavutil/pixfmt.h" +#include "libavutil/pixdesc.h" -#define STR(s) AV_TOSTRING(s) //AV_STRINGIFY is too long +#define STR(s) AV_TOSTRING(s) // AV_STRINGIFY is too long -#define FAST_BGR2YV12 //use 7-bit instead of 15-bit coefficients +#define FAST_BGR2YV12 // use 7-bit instead of 15-bit coefficients #define MAX_FILTER_SIZE 256 @@ -42,55 +45,176 @@ #endif #if ARCH_X86_64 -# define APCK_PTR2 8 +# define APCK_PTR2 8 # define APCK_COEF 16 # define APCK_SIZE 24 #else -# define APCK_PTR2 4 -# define APCK_COEF 8 +# define APCK_PTR2 4 +# define APCK_COEF 8 # define APCK_SIZE 16 #endif struct SwsContext; -typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t* src[], +typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, - uint8_t* dst[], int dstStride[]); + uint8_t *dst[], int dstStride[]); -typedef void (*yuv2planar1_fn) (struct SwsContext *c, - const int16_t *lumSrc, const int16_t *chrUSrc, - const int16_t *chrVSrc, const int16_t *alpSrc, - uint8_t *dest, - uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, - int dstW, int chrDstW); -typedef void (*yuv2planarX_fn) (struct SwsContext *c, - const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, - const int16_t *chrFilter, const int16_t **chrUSrc, - const int16_t **chrVSrc, int chrFilterSize, - const int16_t **alpSrc, - uint8_t *dest, - uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, - int dstW, int chrDstW); -typedef void (*yuv2packed1_fn) (struct SwsContext *c, - const uint16_t *buf0, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, - uint8_t *dest, - int dstW, int uvalpha, int dstFormat, int flags, int y); -typedef void (*yuv2packed2_fn) (struct SwsContext *c, - const uint16_t *buf0, const uint16_t *buf1, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, const uint16_t *abuf1, - uint8_t *dest, - int dstW, int yalpha, int uvalpha, int y); -typedef void (*yuv2packedX_fn) (struct SwsContext *c, - const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, - const int16_t *chrFilter, const int16_t **chrUSrc, - const int16_t **chrVSrc, int chrFilterSize, - const int16_t **alpSrc, uint8_t *dest, - int dstW, int dstY); +/** + * Write one line of horizontally scaled data to planar output + * without any additional vertical scaling (or point-scaling). + * + * @param src scaled source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param dest pointer to the output plane. For >8bit + * output, this is in uint16_t + * @param dstW width of destination in pixels + * @param dither ordered dither array of type int16_t and size 8 + * @param offset Dither offset + */ +typedef void (*yuv2planar1_fn)(const int16_t *src, uint8_t *dest, int dstW, + const uint8_t *dither, int offset); + +/** + * Write one line of horizontally scaled data to planar output + * with multi-point vertical scaling between input pixels. + * + * @param filter vertical luma/alpha scaling coefficients, 12bit [0,4096] + * @param src scaled luma (Y) or alpha (A) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param filterSize number of vertical input lines to scale + * @param dest pointer to output plane. For >8bit + * output, this is in uint16_t + * @param dstW width of destination pixels + * @param offset Dither offset + */ +typedef void (*yuv2planarX_fn)(const int16_t *filter, int filterSize, + const int16_t **src, uint8_t *dest, int dstW, + const uint8_t *dither, int offset); + +/** + * Write one line of horizontally scaled chroma to interleaved output + * with multi-point vertical scaling between input pixels. + * + * @param c SWS scaling context + * @param chrFilter vertical chroma scaling coefficients, 12bit [0,4096] + * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param chrFilterSize number of vertical chroma input lines to scale + * @param dest pointer to the output plane. For >8bit + * output, this is in uint16_t + * @param dstW width of chroma planes + */ +typedef void (*yuv2interleavedX_fn)(struct SwsContext *c, + const int16_t *chrFilter, + int chrFilterSize, + const int16_t **chrUSrc, + const int16_t **chrVSrc, + uint8_t *dest, int dstW); + +/** + * Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB + * output without any additional vertical scaling (or point-scaling). Note + * that this function may do chroma scaling, see the "uvalpha" argument. + * + * @param c SWS scaling context + * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param dest pointer to the output plane. For 16bit output, this is + * uint16_t + * @param dstW width of lumSrc and alpSrc in pixels, number of pixels + * to write into dest[] + * @param uvalpha chroma scaling coefficient for the second line of chroma + * pixels, either 2048 or 0. If 0, one chroma input is used + * for 2 output pixels (or if the SWS_FLAG_FULL_CHR_INT flag + * is set, it generates 1 output pixel). If 2048, two chroma + * input pixels should be averaged for 2 output pixels (this + * only happens if SWS_FLAG_FULL_CHR_INT is not set) + * @param y vertical line number for this output. This does not need + * to be used to calculate the offset in the destination, + * but can be used to generate comfort noise using dithering + * for some output formats. + */ +typedef void (*yuv2packed1_fn)(struct SwsContext *c, const int16_t *lumSrc, + const int16_t *chrUSrc[2], + const int16_t *chrVSrc[2], + const int16_t *alpSrc, uint8_t *dest, + int dstW, int uvalpha, int y); +/** + * Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB + * output by doing bilinear scaling between two input lines. + * + * @param c SWS scaling context + * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param dest pointer to the output plane. For 16bit output, this is + * uint16_t + * @param dstW width of lumSrc and alpSrc in pixels, number of pixels + * to write into dest[] + * @param yalpha luma/alpha scaling coefficients for the second input line. + * The first line's coefficients can be calculated by using + * 4096 - yalpha + * @param uvalpha chroma scaling coefficient for the second input line. The + * first line's coefficients can be calculated by using + * 4096 - uvalpha + * @param y vertical line number for this output. This does not need + * to be used to calculate the offset in the destination, + * but can be used to generate comfort noise using dithering + * for some output formats. + */ +typedef void (*yuv2packed2_fn)(struct SwsContext *c, const int16_t *lumSrc[2], + const int16_t *chrUSrc[2], + const int16_t *chrVSrc[2], + const int16_t *alpSrc[2], + uint8_t *dest, + int dstW, int yalpha, int uvalpha, int y); +/** + * Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB + * output by doing multi-point vertical scaling between input pixels. + * + * @param c SWS scaling context + * @param lumFilter vertical luma/alpha scaling coefficients, 12bit [0,4096] + * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param lumFilterSize number of vertical luma/alpha input lines to scale + * @param chrFilter vertical chroma scaling coefficients, 12bit [0,4096] + * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param chrFilterSize number of vertical chroma input lines to scale + * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output, + * 19-bit for 16bit output (in int32_t) + * @param dest pointer to the output plane. For 16bit output, this is + * uint16_t + * @param dstW width of lumSrc and alpSrc in pixels, number of pixels + * to write into dest[] + * @param y vertical line number for this output. This does not need + * to be used to calculate the offset in the destination, + * but can be used to generate comfort noise using dithering + * or some output formats. + */ +typedef void (*yuv2packedX_fn)(struct SwsContext *c, const int16_t *lumFilter, + const int16_t **lumSrc, int lumFilterSize, + const int16_t *chrFilter, + const int16_t **chrUSrc, + const int16_t **chrVSrc, int chrFilterSize, + const int16_t **alpSrc, uint8_t *dest, + int dstW, int y); /* This struct should be aligned on at least a 32-byte boundary. */ typedef struct SwsContext { @@ -117,6 +241,7 @@ enum PixelFormat srcFormat; ///< Source pixel format. int dstFormatBpp; ///< Number of bits per pixel of the destination pixel format. int srcFormatBpp; ///< Number of bits per pixel of the source pixel format. + int dstBpc, srcBpc; int chrSrcHSubSample; ///< Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in source image. int chrSrcVSubSample; ///< Binary logarithm of vertical subsampling factor between luma/alpha and chroma planes in source image. int chrDstHSubSample; ///< Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in destination image. @@ -142,12 +267,12 @@ int16_t **chrUPixBuf; ///< Ring buffer for scaled horizontal chroma plane lines to be fed to the vertical scaler. int16_t **chrVPixBuf; ///< Ring buffer for scaled horizontal chroma plane lines to be fed to the vertical scaler. int16_t **alpPixBuf; ///< Ring buffer for scaled horizontal alpha plane lines to be fed to the vertical scaler. - int vLumBufSize; ///< Number of vertical luma/alpha lines allocated in the ring buffer. - int vChrBufSize; ///< Number of vertical chroma lines allocated in the ring buffer. - int lastInLumBuf; ///< Last scaled horizontal luma/alpha line from source in the ring buffer. - int lastInChrBuf; ///< Last scaled horizontal chroma line from source in the ring buffer. - int lumBufIndex; ///< Index in ring buffer of the last scaled horizontal luma/alpha line from source. - int chrBufIndex; ///< Index in ring buffer of the last scaled horizontal chroma line from source. + int vLumBufSize; ///< Number of vertical luma/alpha lines allocated in the ring buffer. + int vChrBufSize; ///< Number of vertical chroma lines allocated in the ring buffer. + int lastInLumBuf; ///< Last scaled horizontal luma/alpha line from source in the ring buffer. + int lastInChrBuf; ///< Last scaled horizontal chroma line from source in the ring buffer. + int lumBufIndex; ///< Index in ring buffer of the last scaled horizontal luma/alpha line from source. + int chrBufIndex; ///< Index in ring buffer of the last scaled horizontal chroma line from source. //@} uint8_t *formatConvBuffer; @@ -174,10 +299,10 @@ int16_t *hChrFilterPos; ///< Array of horizontal filter starting positions for each dst[i] for chroma planes. int16_t *vLumFilterPos; ///< Array of vertical filter starting positions for each dst[i] for luma/alpha planes. int16_t *vChrFilterPos; ///< Array of vertical filter starting positions for each dst[i] for chroma planes. - int hLumFilterSize; ///< Horizontal filter size for luma/alpha pixels. - int hChrFilterSize; ///< Horizontal filter size for chroma pixels. - int vLumFilterSize; ///< Vertical filter size for luma/alpha pixels. - int vChrFilterSize; ///< Vertical filter size for chroma pixels. + int hLumFilterSize; ///< Horizontal filter size for luma/alpha pixels. + int hChrFilterSize; ///< Horizontal filter size for chroma pixels. + int vLumFilterSize; ///< Vertical filter size for luma/alpha pixels. + int vChrFilterSize; ///< Vertical filter size for chroma pixels. //@} int lumMmx2FilterCodeSize; ///< Runtime-generated MMX2 horizontal fast bilinear scaler code size for luma/alpha planes. @@ -189,11 +314,11 @@ int dstY; ///< Last destination vertical line output from last slice. int flags; ///< Flags passed by the user to select scaler algorithm, optimizations, subsampling, etc... - void * yuvTable; // pointer to the yuv->rgb table start so it can be freed() - uint8_t * table_rV[256]; - uint8_t * table_gU[256]; - int table_gV[256]; - uint8_t * table_bU[256]; + void *yuvTable; // pointer to the yuv->rgb table start so it can be freed() + uint8_t *table_rV[256]; + uint8_t *table_gU[256]; + int table_gV[256]; + uint8_t *table_bU[256]; //Colorspace stuff int contrast, brightness, saturation; // for sws_getColorspaceDetails @@ -228,8 +353,10 @@ #define V_TEMP "11*8+4*4*256*2+32" #define Y_TEMP "11*8+4*4*256*2+40" #define ALP_MMX_FILTER_OFFSET "11*8+4*4*256*2+48" -#define UV_OFF "11*8+4*4*256*3+48" -#define UV_OFFx2 "11*8+4*4*256*3+56" +#define UV_OFF_PX "11*8+4*4*256*3+48" +#define UV_OFF_BYTE "11*8+4*4*256*3+56" +#define DITHER16 "11*8+4*4*256*3+64" +#define DITHER32 "11*8+4*4*256*3+80" DECLARE_ALIGNED(8, uint64_t, redDither); DECLARE_ALIGNED(8, uint64_t, greenDither); @@ -243,17 +370,24 @@ DECLARE_ALIGNED(8, uint64_t, yOffset); DECLARE_ALIGNED(8, uint64_t, uOffset); DECLARE_ALIGNED(8, uint64_t, vOffset); - int32_t lumMmxFilter[4*MAX_FILTER_SIZE]; - int32_t chrMmxFilter[4*MAX_FILTER_SIZE]; + int32_t lumMmxFilter[4 * MAX_FILTER_SIZE]; + int32_t chrMmxFilter[4 * MAX_FILTER_SIZE]; int dstW; ///< Width of destination luma/alpha planes. DECLARE_ALIGNED(8, uint64_t, esp); DECLARE_ALIGNED(8, uint64_t, vRounder); DECLARE_ALIGNED(8, uint64_t, u_temp); DECLARE_ALIGNED(8, uint64_t, v_temp); DECLARE_ALIGNED(8, uint64_t, y_temp); - int32_t alpMmxFilter[4*MAX_FILTER_SIZE]; - DECLARE_ALIGNED(8, ptrdiff_t, uv_off); ///< offset (in pixels) between u and v planes - DECLARE_ALIGNED(8, ptrdiff_t, uv_offx2); ///< offset (in bytes) between u and v planes + int32_t alpMmxFilter[4 * MAX_FILTER_SIZE]; + // alignment of these values is not necessary, but merely here + // to maintain the same offset across x8632 and x86-64. Once we + // use proper offset macros in the asm, they can be removed. + DECLARE_ALIGNED(8, ptrdiff_t, uv_off_px); ///< offset (in pixels) between u and v planes + DECLARE_ALIGNED(8, ptrdiff_t, uv_off_byte); ///< offset (in bytes) between u and v planes + DECLARE_ALIGNED(8, uint16_t, dither16)[8]; + DECLARE_ALIGNED(8, uint32_t, dither32)[8]; + + const uint8_t *chrDither8, *lumDither8; #if HAVE_ALTIVEC vector signed short CY; @@ -263,7 +397,7 @@ vector signed short CGV; vector signed short OY; vector unsigned short CSHIFT; - vector signed short *vYCoeffsBank, *vCCoeffsBank; + vector signed short *vYCoeffsBank, *vCCoeffsBank; #endif #if ARCH_BFIN @@ -285,19 +419,53 @@ #endif /* function pointers for swScale() */ - yuv2planar1_fn yuv2yuv1; - yuv2planarX_fn yuv2yuvX; + yuv2planar1_fn yuv2plane1; + yuv2planarX_fn yuv2planeX; + yuv2interleavedX_fn yuv2nv12cX; yuv2packed1_fn yuv2packed1; yuv2packed2_fn yuv2packed2; yuv2packedX_fn yuv2packedX; + /// Unscaled conversion of luma plane to YV12 for horizontal scaler. void (*lumToYV12)(uint8_t *dst, const uint8_t *src, - int width, uint32_t *pal); ///< Unscaled conversion of luma plane to YV12 for horizontal scaler. + int width, uint32_t *pal); + /// Unscaled conversion of alpha plane to YV12 for horizontal scaler. void (*alpToYV12)(uint8_t *dst, const uint8_t *src, - int width, uint32_t *pal); ///< Unscaled conversion of alpha plane to YV12 for horizontal scaler. + int width, uint32_t *pal); + /// Unscaled conversion of chroma planes to YV12 for horizontal scaler. void (*chrToYV12)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, - int width, uint32_t *pal); ///< Unscaled conversion of chroma planes to YV12 for horizontal scaler. + int width, uint32_t *pal); + + /** + * Functions to read planar input, such as planar RGB, and convert + * internally to Y/UV. + */ + /** @{ */ + void (*readLumPlanar)(uint8_t *dst, const uint8_t *src[4], int width); + void (*readChrPlanar)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src[4], + int width); + /** @} */ + + /** + * Scale one horizontal line of input data using a bilinear filter + * to produce one line of output data. Compared to SwsContext->hScale(), + * please take note of the following caveats when using these: + * - Scaling is done using only 7bit instead of 14bit coefficients. + * - You can use no more than 5 input pixels to produce 4 output + * pixels. Therefore, this filter should not be used for downscaling + * by more than ~20% in width (because that equals more than 5/4th + * downscaling and thus more than 5 pixels input per 4 pixels output). + * - In general, bilinear filters create artifacts during downscaling + * (even when <20%), because one output pixel will span more than one + * input pixel, and thus some pixels will need edges of both neighbor + * pixels to interpolate the output pixel. Since you can use at most + * two input pixels per output pixel in bilinear scaling, this is + * impossible and thus downscaling by any size will create artifacts. + * To enable this type of scaling, set SWS_FLAG_FAST_BILINEAR + * in SwsContext->flags. + */ + /** @{ */ void (*hyscale_fast)(struct SwsContext *c, int16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc); @@ -305,16 +473,53 @@ int16_t *dst1, int16_t *dst2, int dstWidth, const uint8_t *src1, const uint8_t *src2, int srcW, int xInc); + /** @} */ - void (*hScale)(int16_t *dst, int dstW, const uint8_t *src, int srcW, - int xInc, const int16_t *filter, const int16_t *filterPos, - int filterSize); - - void (*lumConvertRange)(int16_t *dst, int width); ///< Color range conversion function for luma plane if needed. - void (*chrConvertRange)(int16_t *dst1, int16_t *dst2, int width); ///< Color range conversion function for chroma planes if needed. + /** + * Scale one horizontal line of input data using a filter over the input + * lines, to produce one (differently sized) line of output data. + * + * @param dst pointer to destination buffer for horizontally scaled + * data. If the number of bits per component of one + * destination pixel (SwsContext->dstBpc) is <= 10, data + * will be 15bpc in 16bits (int16_t) width. Else (i.e. + * SwsContext->dstBpc == 16), data will be 19bpc in + * 32bits (int32_t) width. + * @param dstW width of destination image + * @param src pointer to source data to be scaled. If the number of + * bits per component of a source pixel (SwsContext->srcBpc) + * is 8, this is 8bpc in 8bits (uint8_t) width. Else + * (i.e. SwsContext->dstBpc > 8), this is native depth + * in 16bits (uint16_t) width. In other words, for 9-bit + * YUV input, this is 9bpc, for 10-bit YUV input, this is + * 10bpc, and for 16-bit RGB or YUV, this is 16bpc. + * @param filter filter coefficients to be used per output pixel for + * scaling. This contains 14bpp filtering coefficients. + * Guaranteed to contain dstW * filterSize entries. + * @param filterPos position of the first input pixel to be used for + * each output pixel during scaling. Guaranteed to + * contain dstW entries. + * @param filterSize the number of input coefficients to be used (and + * thus the number of input pixels to be used) for + * creating a single output pixel. Is aligned to 4 + * (and input coefficients thus padded with zeroes) + * to simplify creating SIMD code. + */ + /** @{ */ + void (*hyScale)(struct SwsContext *c, int16_t *dst, int dstW, + const uint8_t *src, const int16_t *filter, + const int16_t *filterPos, int filterSize); + void (*hcScale)(struct SwsContext *c, int16_t *dst, int dstW, + const uint8_t *src, const int16_t *filter, + const int16_t *filterPos, int filterSize); + /** @} */ + + /// Color range conversion function for luma plane if needed. + void (*lumConvertRange)(int16_t *dst, int width); + /// Color range conversion function for chroma planes if needed. + void (*chrConvertRange)(int16_t *dst1, int16_t *dst2, int width); int needs_hcscale; ///< Set if there are chroma planes to be converted. - } SwsContext; //FIXME check init (where 0) @@ -337,148 +542,92 @@ const char *sws_format_name(enum PixelFormat format); -//FIXME replace this with something faster -#define is16BPS(x) ( \ - (x)==PIX_FMT_GRAY16BE \ - || (x)==PIX_FMT_GRAY16LE \ - || (x)==PIX_FMT_BGR48BE \ - || (x)==PIX_FMT_BGR48LE \ - || (x)==PIX_FMT_RGB48BE \ - || (x)==PIX_FMT_RGB48LE \ - || (x)==PIX_FMT_YUV420P16LE \ - || (x)==PIX_FMT_YUV422P16LE \ - || (x)==PIX_FMT_YUV444P16LE \ - || (x)==PIX_FMT_YUV420P16BE \ - || (x)==PIX_FMT_YUV422P16BE \ - || (x)==PIX_FMT_YUV444P16BE \ - ) -#define is9_OR_10BPS(x) ( \ - (x)==PIX_FMT_YUV420P9LE \ - || (x)==PIX_FMT_YUV420P9BE \ - || (x)==PIX_FMT_YUV444P9BE \ - || (x)==PIX_FMT_YUV444P9LE \ - || (x)==PIX_FMT_YUV422P10BE \ - || (x)==PIX_FMT_YUV422P10LE \ - || (x)==PIX_FMT_YUV444P10BE \ - || (x)==PIX_FMT_YUV444P10LE \ - || (x)==PIX_FMT_YUV420P10LE \ - || (x)==PIX_FMT_YUV420P10BE \ - ) -#define isBE(x) ((x)&1) -#define isPlanar8YUV(x) ( \ - (x)==PIX_FMT_YUV410P \ - || (x)==PIX_FMT_YUV420P \ - || (x)==PIX_FMT_YUVA420P \ - || (x)==PIX_FMT_YUV411P \ - || (x)==PIX_FMT_YUV422P \ - || (x)==PIX_FMT_YUV444P \ - || (x)==PIX_FMT_YUV440P \ - || (x)==PIX_FMT_NV12 \ - || (x)==PIX_FMT_NV21 \ - ) -#define isPlanarYUV(x) ( \ - isPlanar8YUV(x) \ - || (x)==PIX_FMT_YUV420P9LE \ - || (x)==PIX_FMT_YUV444P9LE \ - || (x)==PIX_FMT_YUV420P10LE \ - || (x)==PIX_FMT_YUV422P10LE \ - || (x)==PIX_FMT_YUV444P10LE \ - || (x)==PIX_FMT_YUV420P16LE \ - || (x)==PIX_FMT_YUV422P16LE \ - || (x)==PIX_FMT_YUV444P16LE \ - || (x)==PIX_FMT_YUV420P9BE \ - || (x)==PIX_FMT_YUV444P9BE \ - || (x)==PIX_FMT_YUV420P10BE \ - || (x)==PIX_FMT_YUV422P10BE \ - || (x)==PIX_FMT_YUV444P10BE \ - || (x)==PIX_FMT_YUV420P16BE \ - || (x)==PIX_FMT_YUV422P16BE \ - || (x)==PIX_FMT_YUV444P16BE \ - ) -#define isYUV(x) ( \ - (x)==PIX_FMT_UYVY422 \ - || (x)==PIX_FMT_YUYV422 \ - || isPlanarYUV(x) \ - ) -#define isGray(x) ( \ - (x)==PIX_FMT_GRAY8 \ - || (x)==PIX_FMT_Y400A \ - || (x)==PIX_FMT_GRAY16BE \ - || (x)==PIX_FMT_GRAY16LE \ - ) -#define isGray16(x) ( \ - (x)==PIX_FMT_GRAY16BE \ - || (x)==PIX_FMT_GRAY16LE \ - ) -#define isRGBinInt(x) ( \ - (x)==PIX_FMT_RGB48BE \ - || (x)==PIX_FMT_RGB48LE \ - || (x)==PIX_FMT_RGB32 \ - || (x)==PIX_FMT_RGB32_1 \ - || (x)==PIX_FMT_RGB24 \ - || (x)==PIX_FMT_RGB565BE \ - || (x)==PIX_FMT_RGB565LE \ - || (x)==PIX_FMT_RGB555BE \ - || (x)==PIX_FMT_RGB555LE \ - || (x)==PIX_FMT_RGB444BE \ - || (x)==PIX_FMT_RGB444LE \ - || (x)==PIX_FMT_RGB8 \ - || (x)==PIX_FMT_RGB4 \ - || (x)==PIX_FMT_RGB4_BYTE \ - || (x)==PIX_FMT_MONOBLACK \ - || (x)==PIX_FMT_MONOWHITE \ - ) -#define isBGRinInt(x) ( \ - (x)==PIX_FMT_BGR48BE \ - || (x)==PIX_FMT_BGR48LE \ - || (x)==PIX_FMT_BGR32 \ - || (x)==PIX_FMT_BGR32_1 \ - || (x)==PIX_FMT_BGR24 \ - || (x)==PIX_FMT_BGR565BE \ - || (x)==PIX_FMT_BGR565LE \ - || (x)==PIX_FMT_BGR555BE \ - || (x)==PIX_FMT_BGR555LE \ - || (x)==PIX_FMT_BGR444BE \ - || (x)==PIX_FMT_BGR444LE \ - || (x)==PIX_FMT_BGR8 \ - || (x)==PIX_FMT_BGR4 \ - || (x)==PIX_FMT_BGR4_BYTE \ - || (x)==PIX_FMT_MONOBLACK \ - || (x)==PIX_FMT_MONOWHITE \ - ) -#define isRGBinBytes(x) ( \ - (x)==PIX_FMT_RGB48BE \ - || (x)==PIX_FMT_RGB48LE \ - || (x)==PIX_FMT_RGBA \ - || (x)==PIX_FMT_ARGB \ - || (x)==PIX_FMT_RGB24 \ - ) -#define isBGRinBytes(x) ( \ - (x)==PIX_FMT_BGR48BE \ - || (x)==PIX_FMT_BGR48LE \ - || (x)==PIX_FMT_BGRA \ - || (x)==PIX_FMT_ABGR \ - || (x)==PIX_FMT_BGR24 \ - ) -#define isAnyRGB(x) ( \ - isRGBinInt(x) \ - || isBGRinInt(x) \ - ) -#define isALPHA(x) ( \ - (x)==PIX_FMT_BGR32 \ - || (x)==PIX_FMT_BGR32_1 \ - || (x)==PIX_FMT_RGB32 \ - || (x)==PIX_FMT_RGB32_1 \ - || (x)==PIX_FMT_Y400A \ - || (x)==PIX_FMT_YUVA420P \ - ) -#define isPacked(x) ( \ - (x)==PIX_FMT_PAL8 \ - || (x)==PIX_FMT_YUYV422 \ - || (x)==PIX_FMT_UYVY422 \ - || (x)==PIX_FMT_Y400A \ - || isAnyRGB(x) \ - ) +#define is16BPS(x) \ + (av_pix_fmt_descriptors[x].comp[0].depth_minus1 == 15) + +#define is9_OR_10BPS(x) \ + (av_pix_fmt_descriptors[x].comp[0].depth_minus1 == 8 || \ + av_pix_fmt_descriptors[x].comp[0].depth_minus1 == 9) + +#define isBE(x) \ + (av_pix_fmt_descriptors[x].flags & PIX_FMT_BE) + +#define isYUV(x) \ + (!(av_pix_fmt_descriptors[x].flags & PIX_FMT_RGB) && \ + av_pix_fmt_descriptors[x].nb_components >= 2) + +#define isPlanarYUV(x) \ + ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PLANAR) && \ + isYUV(x)) + +#define isRGB(x) \ + (av_pix_fmt_descriptors[x].flags & PIX_FMT_RGB) + +#if 0 // FIXME +#define isGray(x) \ + (!(av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) && \ + av_pix_fmt_descriptors[x].nb_components <= 2) +#else +#define isGray(x) \ + ((x) == PIX_FMT_GRAY8 || \ + (x) == PIX_FMT_Y400A || \ + (x) == PIX_FMT_GRAY16BE || \ + (x) == PIX_FMT_GRAY16LE) +#endif + +#define isRGBinInt(x) \ + ((x) == PIX_FMT_RGB48BE || \ + (x) == PIX_FMT_RGB48LE || \ + (x) == PIX_FMT_RGB32 || \ + (x) == PIX_FMT_RGB32_1 || \ + (x) == PIX_FMT_RGB24 || \ + (x) == PIX_FMT_RGB565BE || \ + (x) == PIX_FMT_RGB565LE || \ + (x) == PIX_FMT_RGB555BE || \ + (x) == PIX_FMT_RGB555LE || \ + (x) == PIX_FMT_RGB444BE || \ + (x) == PIX_FMT_RGB444LE || \ + (x) == PIX_FMT_RGB8 || \ + (x) == PIX_FMT_RGB4 || \ + (x) == PIX_FMT_RGB4_BYTE || \ + (x) == PIX_FMT_MONOBLACK || \ + (x) == PIX_FMT_MONOWHITE) + +#define isBGRinInt(x) \ + ((x) == PIX_FMT_BGR48BE || \ + (x) == PIX_FMT_BGR48LE || \ + (x) == PIX_FMT_BGR32 || \ + (x) == PIX_FMT_BGR32_1 || \ + (x) == PIX_FMT_BGR24 || \ + (x) == PIX_FMT_BGR565BE || \ + (x) == PIX_FMT_BGR565LE || \ + (x) == PIX_FMT_BGR555BE || \ + (x) == PIX_FMT_BGR555LE || \ + (x) == PIX_FMT_BGR444BE || \ + (x) == PIX_FMT_BGR444LE || \ + (x) == PIX_FMT_BGR8 || \ + (x) == PIX_FMT_BGR4 || \ + (x) == PIX_FMT_BGR4_BYTE || \ + (x) == PIX_FMT_MONOBLACK || \ + (x) == PIX_FMT_MONOWHITE) + +#define isAnyRGB(x) \ + (isRGBinInt(x) || \ + isBGRinInt(x)) + +#define isALPHA(x) \ + (av_pix_fmt_descriptors[x].nb_components == 2 || \ + av_pix_fmt_descriptors[x].nb_components == 4) + +#define isPacked(x) \ + ((av_pix_fmt_descriptors[x].nb_components >= 2 && \ + !(av_pix_fmt_descriptors[x].flags & PIX_FMT_PLANAR)) || \ + (x) == PIX_FMT_PAL8) + +#define isPlanar(x) \ + (av_pix_fmt_descriptors[x].nb_components >= 2 && \ + (av_pix_fmt_descriptors[x].flags & PIX_FMT_PLANAR)) + #define usePal(x) ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || (x) == PIX_FMT_Y400A) extern const uint64_t ff_dither4[2]; @@ -487,7 +636,7 @@ extern const AVClass sws_context_class; /** - * Sets c->swScale to an unscaled converter if one exists for the specific + * Set c->swScale to an unscaled converter if one exists for the specific * source and destination formats, bit depths, flags, etc. */ void ff_get_unscaled_swscale(SwsContext *c); @@ -495,7 +644,7 @@ void ff_swscale_get_unscaled_altivec(SwsContext *c); /** - * Returns function pointer to fastest main scaler path function depending + * Return function pointer to fastest main scaler path function depending * on architecture and available optimizations. */ SwsFunc ff_getSwsFunc(SwsContext *c); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/swscale-test.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/swscale-test.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/swscale-test.c 2011-05-27 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/swscale-test.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,33 +35,32 @@ /* HACK Duplicated from swscale_internal.h. * Should be removed when a cleaner pixel format system exists. */ -#define isGray(x) ( \ - (x)==PIX_FMT_GRAY8 \ - || (x)==PIX_FMT_GRAY16BE \ - || (x)==PIX_FMT_GRAY16LE \ - ) -#define hasChroma(x) (!( \ - isGray(x) \ - || (x)==PIX_FMT_MONOBLACK \ - || (x)==PIX_FMT_MONOWHITE \ - )) -#define isALPHA(x) ( \ - (x)==PIX_FMT_BGR32 \ - || (x)==PIX_FMT_BGR32_1 \ - || (x)==PIX_FMT_RGB32 \ - || (x)==PIX_FMT_RGB32_1 \ - || (x)==PIX_FMT_YUVA420P \ - ) +#define isGray(x) \ + ((x) == PIX_FMT_GRAY8 || \ + (x) == PIX_FMT_Y400A || \ + (x) == PIX_FMT_GRAY16BE || \ + (x) == PIX_FMT_GRAY16LE) +#define hasChroma(x) \ + (!(isGray(x) || \ + (x) == PIX_FMT_MONOBLACK || \ + (x) == PIX_FMT_MONOWHITE)) +#define isALPHA(x) \ + ((x) == PIX_FMT_BGR32 || \ + (x) == PIX_FMT_BGR32_1 || \ + (x) == PIX_FMT_RGB32 || \ + (x) == PIX_FMT_RGB32_1 || \ + (x) == PIX_FMT_YUVA420P) -static uint64_t getSSD(uint8_t *src1, uint8_t *src2, int stride1, int stride2, int w, int h) +static uint64_t getSSD(uint8_t *src1, uint8_t *src2, int stride1, + int stride2, int w, int h) { - int x,y; - uint64_t ssd=0; + int x, y; + uint64_t ssd = 0; - for (y=0; y %s\n", av_pix_fmt_descriptors[srcFormat].name, av_pix_fmt_descriptors[dstFormat].name); res = -1; - goto end; } @@ -167,9 +164,9 @@ sws_scale(dstContext, src, srcStride, 0, srcH, dst, dstStride); - for (i = 0; i < 4 && dstStride[i]; i++) { - crc = av_crc(av_crc_get_table(AV_CRC_32_IEEE), crc, dst[i], dstStride[i] * dstH); - } + for (i = 0; i < 4 && dstStride[i]; i++) + crc = av_crc(av_crc_get_table(AV_CRC_32_IEEE), crc, dst[i], + dstStride[i] * dstH); if (r && crc == r->crc) { ssdY = r->ssdY; @@ -177,60 +174,59 @@ ssdV = r->ssdV; ssdA = r->ssdA; } else { - for (i=0; i<4; i++) { + for (i = 0; i < 4; i++) { if (refStride[i]) - out[i]= av_mallocz(refStride[i]*h); + out[i] = av_mallocz(refStride[i] * h); if (refStride[i] && !out[i]) { perror("Malloc"); res = -1; - goto end; } } - outContext= sws_getContext(dstW, dstH, dstFormat, w, h, PIX_FMT_YUVA420P, SWS_BILINEAR, NULL, NULL, NULL); + outContext = sws_getContext(dstW, dstH, dstFormat, w, h, + PIX_FMT_YUVA420P, SWS_BILINEAR, + NULL, NULL, NULL); if (!outContext) { fprintf(stderr, "Failed to get %s ---> %s\n", av_pix_fmt_descriptors[dstFormat].name, av_pix_fmt_descriptors[PIX_FMT_YUVA420P].name); res = -1; - goto end; } sws_scale(outContext, dst, dstStride, 0, dstH, out, refStride); - ssdY= getSSD(ref[0], out[0], refStride[0], refStride[0], w, h); + ssdY = getSSD(ref[0], out[0], refStride[0], refStride[0], w, h); if (hasChroma(srcFormat) && hasChroma(dstFormat)) { //FIXME check that output is really gray - ssdU= getSSD(ref[1], out[1], refStride[1], refStride[1], (w+1)>>1, (h+1)>>1); - ssdV= getSSD(ref[2], out[2], refStride[2], refStride[2], (w+1)>>1, (h+1)>>1); + ssdU = getSSD(ref[1], out[1], refStride[1], refStride[1], + (w + 1) >> 1, (h + 1) >> 1); + ssdV = getSSD(ref[2], out[2], refStride[2], refStride[2], + (w + 1) >> 1, (h + 1) >> 1); } if (isALPHA(srcFormat) && isALPHA(dstFormat)) - ssdA= getSSD(ref[3], out[3], refStride[3], refStride[3], w, h); + ssdA = getSSD(ref[3], out[3], refStride[3], refStride[3], w, h); - ssdY/= w*h; - ssdU/= w*h/4; - ssdV/= w*h/4; - ssdA/= w*h; + ssdY /= w * h; + ssdU /= w * h / 4; + ssdV /= w * h / 4; + ssdA /= w * h; sws_freeContext(outContext); - for (i=0; i<4; i++) { + for (i = 0; i < 4; i++) if (refStride[i]) av_free(out[i]); - } } - printf(" CRC=%08x SSD=%5"PRId64",%5"PRId64",%5"PRId64",%5"PRId64"\n", + printf(" CRC=%08x SSD=%5"PRId64 ",%5"PRId64 ",%5"PRId64 ",%5"PRId64 "\n", crc, ssdY, ssdU, ssdV, ssdA); end: - sws_freeContext(dstContext); - for (i=0; i<4; i++) { + for (i = 0; i < 4; i++) if (dstStride[i]) av_free(dst[i]); - } return res; } @@ -239,18 +235,18 @@ enum PixelFormat srcFormat_in, enum PixelFormat dstFormat_in) { - const int flags[] = { SWS_FAST_BILINEAR, - SWS_BILINEAR, SWS_BICUBIC, - SWS_X , SWS_POINT , SWS_AREA, 0 }; - const int srcW = w; - const int srcH = h; - const int dstW[] = { srcW - srcW/3, srcW, srcW + srcW/3, 0 }; - const int dstH[] = { srcH - srcH/3, srcH, srcH + srcH/3, 0 }; + const int flags[] = { SWS_FAST_BILINEAR, SWS_BILINEAR, SWS_BICUBIC, + SWS_X, SWS_POINT, SWS_AREA, 0 }; + const int srcW = w; + const int srcH = h; + const int dstW[] = { srcW - srcW / 3, srcW, srcW + srcW / 3, 0 }; + const int dstH[] = { srcH - srcH / 3, srcH, srcH + srcH / 3, 0 }; enum PixelFormat srcFormat, dstFormat; for (srcFormat = srcFormat_in != PIX_FMT_NONE ? srcFormat_in : 0; srcFormat < PIX_FMT_NB; srcFormat++) { - if (!sws_isSupportedInput(srcFormat) || !sws_isSupportedOutput(srcFormat)) + if (!sws_isSupportedInput(srcFormat) || + !sws_isSupportedOutput(srcFormat)) continue; for (dstFormat = dstFormat_in != PIX_FMT_NONE ? dstFormat_in : 0; @@ -258,7 +254,8 @@ int i, j, k; int res = 0; - if (!sws_isSupportedInput(dstFormat) || !sws_isSupportedOutput(dstFormat)) + if (!sws_isSupportedInput(dstFormat) || + !sws_isSupportedOutput(dstFormat)) continue; printf("%s -> %s\n", @@ -266,14 +263,13 @@ av_pix_fmt_descriptors[dstFormat].name); fflush(stdout); - for (k = 0; flags[k] && !res; k++) { + for (k = 0; flags[k] && !res; k++) for (i = 0; dstW[i] && !res; i++) for (j = 0; dstH[j] && !res; j++) res = doTest(ref, refStride, w, h, srcFormat, dstFormat, srcW, srcH, dstW[i], dstH[j], flags[k], NULL); - } if (dstFormat_in != PIX_FMT_NONE) break; } @@ -299,13 +295,14 @@ int flags; int ret; - ret = sscanf(buf, " %12s %dx%d -> %12s %dx%d flags=%d CRC=%x" - " SSD=%"PRId64", %"PRId64", %"PRId64", %"PRId64"\n", - srcStr, &srcW, &srcH, dstStr, &dstW, &dstH, - &flags, &r.crc, &r.ssdY, &r.ssdU, &r.ssdV, &r.ssdA); + ret = sscanf(buf, + " %12s %dx%d -> %12s %dx%d flags=%d CRC=%x" + " SSD=%"PRId64 ", %"PRId64 ", %"PRId64 ", %"PRId64 "\n", + srcStr, &srcW, &srcH, dstStr, &dstW, &dstH, + &flags, &r.crc, &r.ssdY, &r.ssdU, &r.ssdV, &r.ssdA); if (ret != 12) { srcStr[0] = dstStr[0] = 0; - ret = sscanf(buf, "%12s -> %12s\n", srcStr, dstStr); + ret = sscanf(buf, "%12s -> %12s\n", srcStr, dstStr); } srcFormat = av_get_pix_fmt(srcStr); @@ -339,12 +336,12 @@ { enum PixelFormat srcFormat = PIX_FMT_NONE; enum PixelFormat dstFormat = PIX_FMT_NONE; - uint8_t *rgb_data = av_malloc (W*H*4); - uint8_t *rgb_src[3]= {rgb_data, NULL, NULL}; - int rgb_stride[3]={4*W, 0, 0}; - uint8_t *data = av_malloc (4*W*H); - uint8_t *src[4]= {data, data+W*H, data+W*H*2, data+W*H*3}; - int stride[4]={W, W, W, W}; + uint8_t *rgb_data = av_malloc(W * H * 4); + uint8_t *rgb_src[3] = { rgb_data, NULL, NULL }; + int rgb_stride[3] = { 4 * W, 0, 0 }; + uint8_t *data = av_malloc(4 * W * H); + uint8_t *src[4] = { data, data + W * H, data + W * H * 2, data + W * H * 3 }; + int stride[4] = { W, W, W, W }; int x, y; struct SwsContext *sws; AVLFG rand; @@ -354,41 +351,40 @@ if (!rgb_data || !data) return -1; - sws= sws_getContext(W/12, H/12, PIX_FMT_RGB32, W, H, PIX_FMT_YUVA420P, SWS_BILINEAR, NULL, NULL, NULL); + sws = sws_getContext(W / 12, H / 12, PIX_FMT_RGB32, W, H, + PIX_FMT_YUVA420P, SWS_BILINEAR, NULL, NULL, NULL); av_lfg_init(&rand, 1); - for (y=0; ysrcW, dstParam[0], dstStride[0]); if (c->dstFormat == PIX_FMT_NV12) - interleaveBytes(src[1], src[2], dst, c->srcW/2, srcSliceH/2, srcStride[1], srcStride[2], dstStride[0]); + interleaveBytes(src[1], src[2], dst, c->srcW / 2, srcSliceH / 2, + srcStride[1], srcStride[2], dstStride[0]); else - interleaveBytes(src[2], src[1], dst, c->srcW/2, srcSliceH/2, srcStride[2], srcStride[1], dstStride[0]); + interleaveBytes(src[2], src[1], dst, c->srcW / 2, srcSliceH / 2, + srcStride[2], srcStride[1], dstStride[0]); return srcSliceH; } -static int planarToYuy2Wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dstParam[], int dstStride[]) +static int planarToYuy2Wrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dstParam[], int dstStride[]) { - uint8_t *dst=dstParam[0] + dstStride[0]*srcSliceY; + uint8_t *dst = dstParam[0] + dstStride[0] * srcSliceY; - yv12toyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], srcStride[1], dstStride[0]); + yv12toyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], + srcStride[1], dstStride[0]); return srcSliceH; } -static int planarToUyvyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dstParam[], int dstStride[]) +static int planarToUyvyWrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dstParam[], int dstStride[]) { - uint8_t *dst=dstParam[0] + dstStride[0]*srcSliceY; + uint8_t *dst = dstParam[0] + dstStride[0] * srcSliceY; - yv12touyvy(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], srcStride[1], dstStride[0]); + yv12touyvy(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], + srcStride[1], dstStride[0]); return srcSliceH; } -static int yuv422pToYuy2Wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dstParam[], int dstStride[]) +static int yuv422pToYuy2Wrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dstParam[], int dstStride[]) { - uint8_t *dst=dstParam[0] + dstStride[0]*srcSliceY; + uint8_t *dst = dstParam[0] + dstStride[0] * srcSliceY; - yuv422ptoyuy2(src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0]); + yuv422ptoyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], + srcStride[1], dstStride[0]); return srcSliceH; } -static int yuv422pToUyvyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dstParam[], int dstStride[]) +static int yuv422pToUyvyWrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dstParam[], int dstStride[]) { - uint8_t *dst=dstParam[0] + dstStride[0]*srcSliceY; + uint8_t *dst = dstParam[0] + dstStride[0] * srcSliceY; - yuv422ptouyvy(src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0]); + yuv422ptouyvy(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], + srcStride[1], dstStride[0]); return srcSliceH; } -static int yuyvToYuv420Wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dstParam[], int dstStride[]) -{ - uint8_t *ydst=dstParam[0] + dstStride[0]*srcSliceY; - uint8_t *udst=dstParam[1] + dstStride[1]*srcSliceY/2; - uint8_t *vdst=dstParam[2] + dstStride[2]*srcSliceY/2; +static int yuyvToYuv420Wrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dstParam[], int dstStride[]) +{ + uint8_t *ydst = dstParam[0] + dstStride[0] * srcSliceY; + uint8_t *udst = dstParam[1] + dstStride[1] * srcSliceY / 2; + uint8_t *vdst = dstParam[2] + dstStride[2] * srcSliceY / 2; - yuyvtoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], dstStride[1], srcStride[0]); + yuyvtoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], + dstStride[1], srcStride[0]); if (dstParam[3]) fillPlane(dstParam[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); @@ -143,26 +200,30 @@ return srcSliceH; } -static int yuyvToYuv422Wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dstParam[], int dstStride[]) -{ - uint8_t *ydst=dstParam[0] + dstStride[0]*srcSliceY; - uint8_t *udst=dstParam[1] + dstStride[1]*srcSliceY; - uint8_t *vdst=dstParam[2] + dstStride[2]*srcSliceY; +static int yuyvToYuv422Wrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dstParam[], int dstStride[]) +{ + uint8_t *ydst = dstParam[0] + dstStride[0] * srcSliceY; + uint8_t *udst = dstParam[1] + dstStride[1] * srcSliceY; + uint8_t *vdst = dstParam[2] + dstStride[2] * srcSliceY; - yuyvtoyuv422(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], dstStride[1], srcStride[0]); + yuyvtoyuv422(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], + dstStride[1], srcStride[0]); return srcSliceH; } -static int uyvyToYuv420Wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dstParam[], int dstStride[]) -{ - uint8_t *ydst=dstParam[0] + dstStride[0]*srcSliceY; - uint8_t *udst=dstParam[1] + dstStride[1]*srcSliceY/2; - uint8_t *vdst=dstParam[2] + dstStride[2]*srcSliceY/2; +static int uyvyToYuv420Wrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dstParam[], int dstStride[]) +{ + uint8_t *ydst = dstParam[0] + dstStride[0] * srcSliceY; + uint8_t *udst = dstParam[1] + dstStride[1] * srcSliceY / 2; + uint8_t *vdst = dstParam[2] + dstStride[2] * srcSliceY / 2; - uyvytoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], dstStride[1], srcStride[0]); + uyvytoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], + dstStride[1], srcStride[0]); if (dstParam[3]) fillPlane(dstParam[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); @@ -170,56 +231,84 @@ return srcSliceH; } -static int uyvyToYuv422Wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dstParam[], int dstStride[]) -{ - uint8_t *ydst=dstParam[0] + dstStride[0]*srcSliceY; - uint8_t *udst=dstParam[1] + dstStride[1]*srcSliceY; - uint8_t *vdst=dstParam[2] + dstStride[2]*srcSliceY; +static int uyvyToYuv422Wrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dstParam[], int dstStride[]) +{ + uint8_t *ydst = dstParam[0] + dstStride[0] * srcSliceY; + uint8_t *udst = dstParam[1] + dstStride[1] * srcSliceY; + uint8_t *vdst = dstParam[2] + dstStride[2] * srcSliceY; - uyvytoyuv422(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], dstStride[1], srcStride[0]); + uyvytoyuv422(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], + dstStride[1], srcStride[0]); return srcSliceH; } -static void gray8aToPacked32(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette) +static void gray8aToPacked32(const uint8_t *src, uint8_t *dst, int num_pixels, + const uint8_t *palette) { int i; - for (i=0; i> 1; + int dststr = dstStride[0] >> 1; + uint16_t *dstPtr = (uint16_t *) dst[0]; + const uint16_t *srcPtr = (const uint16_t *) src[0]; + int min_stride = FFMIN(srcstr, dststr); + + for (i = 0; i < srcSliceH; i++) { + for (j = 0; j < min_stride; j++) { + dstPtr[j] = av_bswap16(srcPtr[j]); + } + srcPtr += srcstr; + dstPtr += dststr; + } + + return srcSliceH; +} + +static int palToRgbWrapper(SwsContext *c, const uint8_t *src[], int srcStride[], + int srcSliceY, int srcSliceH, uint8_t *dst[], + int dstStride[]) { - const enum PixelFormat srcFormat= c->srcFormat; - const enum PixelFormat dstFormat= c->dstFormat; + const enum PixelFormat srcFormat = c->srcFormat; + const enum PixelFormat dstFormat = c->dstFormat; void (*conv)(const uint8_t *src, uint8_t *dst, int num_pixels, - const uint8_t *palette)=NULL; + const uint8_t *palette) = NULL; int i; - uint8_t *dstPtr= dst[0] + dstStride[0]*srcSliceY; - const uint8_t *srcPtr= src[0]; + uint8_t *dstPtr = dst[0] + dstStride[0] * srcSliceY; + const uint8_t *srcPtr = src[0]; if (srcFormat == PIX_FMT_Y400A) { switch (dstFormat) { @@ -245,10 +334,10 @@ av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n", sws_format_name(srcFormat), sws_format_name(dstFormat)); else { - for (i=0; isrcW, (uint8_t *) c->pal_rgb); - srcPtr+= srcStride[0]; - dstPtr+= dstStride[0]; + srcPtr += srcStride[0]; + dstPtr += dstStride[0]; } } @@ -263,16 +352,17 @@ ) /* {RGB,BGR}{15,16,24,32,32_1} -> {RGB,BGR}{15,16,24,32} */ -static int rgbToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dst[], int dstStride[]) +static int rgbToRgbWrapper(SwsContext *c, const uint8_t *src[], int srcStride[], + int srcSliceY, int srcSliceH, uint8_t *dst[], + int dstStride[]) { - const enum PixelFormat srcFormat= c->srcFormat; - const enum PixelFormat dstFormat= c->dstFormat; - const int srcBpp= (c->srcFormatBpp + 7) >> 3; - const int dstBpp= (c->dstFormatBpp + 7) >> 3; - const int srcId= c->srcFormatBpp >> 2; /* 1:0, 4:1, 8:2, 15:3, 16:4, 24:6, 32:8 */ - const int dstId= c->dstFormatBpp >> 2; - void (*conv)(const uint8_t *src, uint8_t *dst, int src_size)=NULL; + const enum PixelFormat srcFormat = c->srcFormat; + const enum PixelFormat dstFormat = c->dstFormat; + const int srcBpp = (c->srcFormatBpp + 7) >> 3; + const int dstBpp = (c->dstFormatBpp + 7) >> 3; + const int srcId = c->srcFormatBpp; + const int dstId = c->dstFormatBpp; + void (*conv)(const uint8_t *src, uint8_t *dst, int src_size) = NULL; #define CONV_IS(src, dst) (srcFormat == PIX_FMT_##src && dstFormat == PIX_FMT_##dst) @@ -291,40 +381,40 @@ || CONV_IS(RGBA, ARGB)) conv = shuffle_bytes_3012; } else /* BGR -> BGR */ - if ( (isBGRinInt(srcFormat) && isBGRinInt(dstFormat)) - || (isRGBinInt(srcFormat) && isRGBinInt(dstFormat))) { - switch(srcId | (dstId<<4)) { - case 0x34: conv= rgb16to15; break; - case 0x36: conv= rgb24to15; break; - case 0x38: conv= rgb32to15; break; - case 0x43: conv= rgb15to16; break; - case 0x46: conv= rgb24to16; break; - case 0x48: conv= rgb32to16; break; - case 0x63: conv= rgb15to24; break; - case 0x64: conv= rgb16to24; break; - case 0x68: conv= rgb32to24; break; - case 0x83: conv= rgb15to32; break; - case 0x84: conv= rgb16to32; break; - case 0x86: conv= rgb24to32; break; - } - } else if ( (isBGRinInt(srcFormat) && isRGBinInt(dstFormat)) - || (isRGBinInt(srcFormat) && isBGRinInt(dstFormat))) { - switch(srcId | (dstId<<4)) { - case 0x33: conv= rgb15tobgr15; break; - case 0x34: conv= rgb16tobgr15; break; - case 0x36: conv= rgb24tobgr15; break; - case 0x38: conv= rgb32tobgr15; break; - case 0x43: conv= rgb15tobgr16; break; - case 0x44: conv= rgb16tobgr16; break; - case 0x46: conv= rgb24tobgr16; break; - case 0x48: conv= rgb32tobgr16; break; - case 0x63: conv= rgb15tobgr24; break; - case 0x64: conv= rgb16tobgr24; break; - case 0x66: conv= rgb24tobgr24; break; - case 0x68: conv= rgb32tobgr24; break; - case 0x83: conv= rgb15tobgr32; break; - case 0x84: conv= rgb16tobgr32; break; - case 0x86: conv= rgb24tobgr32; break; + if ((isBGRinInt(srcFormat) && isBGRinInt(dstFormat)) || + (isRGBinInt(srcFormat) && isRGBinInt(dstFormat))) { + switch (srcId | (dstId << 16)) { + case 0x000F0010: conv = rgb16to15; break; + case 0x000F0018: conv = rgb24to15; break; + case 0x000F0020: conv = rgb32to15; break; + case 0x0010000F: conv = rgb15to16; break; + case 0x00100018: conv = rgb24to16; break; + case 0x00100020: conv = rgb32to16; break; + case 0x0018000F: conv = rgb15to24; break; + case 0x00180010: conv = rgb16to24; break; + case 0x00180020: conv = rgb32to24; break; + case 0x0020000F: conv = rgb15to32; break; + case 0x00200010: conv = rgb16to32; break; + case 0x00200018: conv = rgb24to32; break; + } + } else if ((isBGRinInt(srcFormat) && isRGBinInt(dstFormat)) || + (isRGBinInt(srcFormat) && isBGRinInt(dstFormat))) { + switch (srcId | (dstId << 16)) { + case 0x000F000F: conv = rgb15tobgr15; break; + case 0x000F0010: conv = rgb16tobgr15; break; + case 0x000F0018: conv = rgb24tobgr15; break; + case 0x000F0020: conv = rgb32tobgr15; break; + case 0x0010000F: conv = rgb15tobgr16; break; + case 0x00100010: conv = rgb16tobgr16; break; + case 0x00100018: conv = rgb24tobgr16; break; + case 0x00100020: conv = rgb32tobgr16; break; + case 0x0018000F: conv = rgb15tobgr24; break; + case 0x00180010: conv = rgb16tobgr24; break; + case 0x00180018: conv = rgb24tobgr24; break; + case 0x00180020: conv = rgb32tobgr24; break; + case 0x0020000F: conv = rgb15tobgr32; break; + case 0x00200010: conv = rgb16tobgr32; break; + case 0x00200018: conv = rgb24tobgr32; break; } } @@ -332,38 +422,43 @@ av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n", sws_format_name(srcFormat), sws_format_name(dstFormat)); } else { - const uint8_t *srcPtr= src[0]; - uint8_t *dstPtr= dst[0]; - if ((srcFormat == PIX_FMT_RGB32_1 || srcFormat == PIX_FMT_BGR32_1) && !isRGBA32(dstFormat)) + const uint8_t *srcPtr = src[0]; + uint8_t *dstPtr = dst[0]; + if ((srcFormat == PIX_FMT_RGB32_1 || srcFormat == PIX_FMT_BGR32_1) && + !isRGBA32(dstFormat)) srcPtr += ALT32_CORR; - if ((dstFormat == PIX_FMT_RGB32_1 || dstFormat == PIX_FMT_BGR32_1) && !isRGBA32(srcFormat)) + if ((dstFormat == PIX_FMT_RGB32_1 || dstFormat == PIX_FMT_BGR32_1) && + !isRGBA32(srcFormat)) dstPtr += ALT32_CORR; - if (dstStride[0]*srcBpp == srcStride[0]*dstBpp && srcStride[0] > 0) - conv(srcPtr, dstPtr + dstStride[0]*srcSliceY, srcSliceH*srcStride[0]); + if (dstStride[0] * srcBpp == srcStride[0] * dstBpp && srcStride[0] > 0 && + !(srcStride[0] % srcBpp)) + conv(srcPtr, dstPtr + dstStride[0] * srcSliceY, + srcSliceH * srcStride[0]); else { int i; - dstPtr += dstStride[0]*srcSliceY; + dstPtr += dstStride[0] * srcSliceY; - for (i=0; isrcW*srcBpp); - srcPtr+= srcStride[0]; - dstPtr+= dstStride[0]; + for (i = 0; i < srcSliceH; i++) { + conv(srcPtr, dstPtr, c->srcW * srcBpp); + srcPtr += srcStride[0]; + dstPtr += dstStride[0]; } } } return srcSliceH; } -static int bgr24ToYv12Wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dst[], int dstStride[]) +static int bgr24ToYv12Wrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dst[], int dstStride[]) { rgb24toyv12( src[0], - dst[0]+ srcSliceY *dstStride[0], - dst[1]+(srcSliceY>>1)*dstStride[1], - dst[2]+(srcSliceY>>1)*dstStride[2], + dst[0] + srcSliceY * dstStride[0], + dst[1] + (srcSliceY >> 1) * dstStride[1], + dst[2] + (srcSliceY >> 1) * dstStride[2], c->srcW, srcSliceH, dstStride[0], dstStride[1], srcStride[0]); if (dst[3]) @@ -371,15 +466,16 @@ return srcSliceH; } -static int yvu9ToYv12Wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dst[], int dstStride[]) +static int yvu9ToYv12Wrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dst[], int dstStride[]) { copyPlane(src[0], srcStride[0], srcSliceY, srcSliceH, c->srcW, dst[0], dstStride[0]); - planar2x(src[1], dst[1] + dstStride[1]*(srcSliceY >> 1), c->chrSrcW, + planar2x(src[1], dst[1] + dstStride[1] * (srcSliceY >> 1), c->chrSrcW, srcSliceH >> 2, srcStride[1], dstStride[1]); - planar2x(src[2], dst[2] + dstStride[2]*(srcSliceY >> 1), c->chrSrcW, + planar2x(src[2], dst[2] + dstStride[2] * (srcSliceY >> 1), c->chrSrcW, srcSliceH >> 2, srcStride[2], dstStride[2]); if (dst[3]) fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); @@ -387,65 +483,91 @@ } /* unscaled copy like stuff (assumes nearly identical formats) */ -static int packedCopyWrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* dst[], int dstStride[]) +static int packedCopyWrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dst[], int dstStride[]) { - if (dstStride[0]==srcStride[0] && srcStride[0] > 0) - memcpy(dst[0] + dstStride[0]*srcSliceY, src[0], srcSliceH*dstStride[0]); + if (dstStride[0] == srcStride[0] && srcStride[0] > 0) + memcpy(dst[0] + dstStride[0] * srcSliceY, src[0], srcSliceH * dstStride[0]); else { int i; - const uint8_t *srcPtr= src[0]; - uint8_t *dstPtr= dst[0] + dstStride[0]*srcSliceY; - int length=0; + const uint8_t *srcPtr = src[0]; + uint8_t *dstPtr = dst[0] + dstStride[0] * srcSliceY; + int length = 0; /* universal length finder */ - while(length+c->srcW <= FFABS(dstStride[0]) - && length+c->srcW <= FFABS(srcStride[0])) length+= c->srcW; - assert(length!=0); + while (length + c->srcW <= FFABS(dstStride[0]) && + length + c->srcW <= FFABS(srcStride[0])) + length += c->srcW; + assert(length != 0); - for (i=0; i> shift)); \ + wfunc(&dst[j + 1], clip((rfunc(&src[j + 1]) + dither[1]) >> shift)); \ + wfunc(&dst[j + 2], clip((rfunc(&src[j + 2]) + dither[2]) >> shift)); \ + wfunc(&dst[j + 3], clip((rfunc(&src[j + 3]) + dither[3]) >> shift)); \ + wfunc(&dst[j + 4], clip((rfunc(&src[j + 4]) + dither[4]) >> shift)); \ + wfunc(&dst[j + 5], clip((rfunc(&src[j + 5]) + dither[5]) >> shift)); \ + wfunc(&dst[j + 6], clip((rfunc(&src[j + 6]) + dither[6]) >> shift)); \ + wfunc(&dst[j + 7], clip((rfunc(&src[j + 7]) + dither[7]) >> shift)); \ + } \ + for (; j < length; j++) \ + wfunc(&dst[j], (rfunc(&src[j]) + dither[j & 7]) >> shift); \ + dst += dstStride; \ + src += srcStride; \ + } + +static int planarCopyWrapper(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dst[], int dstStride[]) { int plane, i, j; - for (plane=0; plane<4; plane++) { - int length= (plane==0 || plane==3) ? c->srcW : -((-c->srcW )>>c->chrDstHSubSample); - int y= (plane==0 || plane==3) ? srcSliceY: -((-srcSliceY)>>c->chrDstVSubSample); - int height= (plane==0 || plane==3) ? srcSliceH: -((-srcSliceH)>>c->chrDstVSubSample); - const uint8_t *srcPtr= src[plane]; - uint8_t *dstPtr= dst[plane] + dstStride[plane]*y; + for (plane = 0; plane < 4; plane++) { + int length = (plane == 0 || plane == 3) ? c->srcW : -((-c->srcW ) >> c->chrDstHSubSample); + int y = (plane == 0 || plane == 3) ? srcSliceY: -((-srcSliceY) >> c->chrDstVSubSample); + int height = (plane == 0 || plane == 3) ? srcSliceH: -((-srcSliceH) >> c->chrDstVSubSample); + const uint8_t *srcPtr = src[plane]; + uint8_t *dstPtr = dst[plane] + dstStride[plane] * y; - if (!dst[plane]) continue; + if (!dst[plane]) + continue; // ignore palette for GRAY8 if (plane == 1 && !dst[2]) continue; if (!src[plane] || (plane == 1 && !src[2])) { - if(is16BPS(c->dstFormat)) - length*=2; - fillPlane(dst[plane], dstStride[plane], length, height, y, (plane==3) ? 255 : 128); + if (is16BPS(c->dstFormat)) + length *= 2; + fillPlane(dst[plane], dstStride[plane], length, height, y, + (plane == 3) ? 255 : 128); } else { - if(is9_OR_10BPS(c->srcFormat)) { - const int src_depth = av_pix_fmt_descriptors[c->srcFormat].comp[plane].depth_minus1+1; - const int dst_depth = av_pix_fmt_descriptors[c->dstFormat].comp[plane].depth_minus1+1; - const uint16_t *srcPtr2 = (const uint16_t*)srcPtr; + if (is9_OR_10BPS(c->srcFormat)) { + const int src_depth = av_pix_fmt_descriptors[c->srcFormat].comp[plane].depth_minus1 + 1; + const int dst_depth = av_pix_fmt_descriptors[c->dstFormat].comp[plane].depth_minus1 + 1; + const uint16_t *srcPtr2 = (const uint16_t *) srcPtr; if (is16BPS(c->dstFormat)) { - uint16_t *dstPtr2 = (uint16_t*)dstPtr; + uint16_t *dstPtr2 = (uint16_t *) dstPtr; #define COPY9_OR_10TO16(rfunc, wfunc) \ for (i = 0; i < height; i++) { \ for (j = 0; j < length; j++) { \ int srcpx = rfunc(&srcPtr2[j]); \ - wfunc(&dstPtr2[j], (srcpx<<(16-src_depth)) | (srcpx>>(2*src_depth-16))); \ + wfunc(&dstPtr2[j], (srcpx << (16 - src_depth)) | (srcpx >> (2 * src_depth - 16))); \ } \ - dstPtr2 += dstStride[plane]/2; \ - srcPtr2 += srcStride[plane]/2; \ + dstPtr2 += dstStride[plane] / 2; \ + srcPtr2 += srcStride[plane] / 2; \ } if (isBE(c->dstFormat)) { if (isBE(c->srcFormat)) { @@ -461,21 +583,23 @@ } } } else if (is9_OR_10BPS(c->dstFormat)) { - uint16_t *dstPtr2 = (uint16_t*)dstPtr; + uint16_t *dstPtr2 = (uint16_t *) dstPtr; #define COPY9_OR_10TO9_OR_10(loop) \ for (i = 0; i < height; i++) { \ for (j = 0; j < length; j++) { \ loop; \ } \ - dstPtr2 += dstStride[plane]/2; \ - srcPtr2 += srcStride[plane]/2; \ + dstPtr2 += dstStride[plane] / 2; \ + srcPtr2 += srcStride[plane] / 2; \ } #define COPY9_OR_10TO9_OR_10_2(rfunc, wfunc) \ if (dst_depth > src_depth) { \ COPY9_OR_10TO9_OR_10(int srcpx = rfunc(&srcPtr2[j]); \ wfunc(&dstPtr2[j], (srcpx << 1) | (srcpx >> 9))); \ } else if (dst_depth < src_depth) { \ - COPY9_OR_10TO9_OR_10(wfunc(&dstPtr2[j], rfunc(&srcPtr2[j]) >> 1)); \ + DITHER_COPY(dstPtr2, dstStride[plane] / 2, wfunc, \ + srcPtr2, srcStride[plane] / 2, rfunc, \ + dither_8x8_1, 1, clip9); \ } else { \ COPY9_OR_10TO9_OR_10(wfunc(&dstPtr2[j], rfunc(&srcPtr2[j]))); \ } @@ -493,14 +617,16 @@ } } } else { - // FIXME Maybe dither instead. +#define W8(a, b) { *(a) = (b); } #define COPY9_OR_10TO8(rfunc) \ - for (i = 0; i < height; i++) { \ - for (j = 0; j < length; j++) { \ - dstPtr[j] = rfunc(&srcPtr2[j])>>(src_depth-8); \ - } \ - dstPtr += dstStride[plane]; \ - srcPtr2 += srcStride[plane]/2; \ + if (src_depth == 9) { \ + DITHER_COPY(dstPtr, dstStride[plane], W8, \ + srcPtr2, srcStride[plane] / 2, rfunc, \ + dither_8x8_1, 1, av_clip_uint8); \ + } else { \ + DITHER_COPY(dstPtr, dstStride[plane], W8, \ + srcPtr2, srcStride[plane] / 2, rfunc, \ + dither_8x8_3, 2, av_clip_uint8); \ } if (isBE(c->srcFormat)) { COPY9_OR_10TO8(AV_RB16); @@ -508,19 +634,21 @@ COPY9_OR_10TO8(AV_RL16); } } - } else if(is9_OR_10BPS(c->dstFormat)) { - const int dst_depth = av_pix_fmt_descriptors[c->dstFormat].comp[plane].depth_minus1+1; - uint16_t *dstPtr2 = (uint16_t*)dstPtr; + } else if (is9_OR_10BPS(c->dstFormat)) { + const int dst_depth = av_pix_fmt_descriptors[c->dstFormat].comp[plane].depth_minus1 + 1; + uint16_t *dstPtr2 = (uint16_t *) dstPtr; if (is16BPS(c->srcFormat)) { - const uint16_t *srcPtr2 = (const uint16_t*)srcPtr; + const uint16_t *srcPtr2 = (const uint16_t *) srcPtr; #define COPY16TO9_OR_10(rfunc, wfunc) \ - for (i = 0; i < height; i++) { \ - for (j = 0; j < length; j++) { \ - wfunc(&dstPtr2[j], rfunc(&srcPtr2[j])>>(16-dst_depth)); \ - } \ - dstPtr2 += dstStride[plane]/2; \ - srcPtr2 += srcStride[plane]/2; \ + if (dst_depth == 9) { \ + DITHER_COPY(dstPtr2, dstStride[plane] / 2, wfunc, \ + srcPtr2, srcStride[plane] / 2, rfunc, \ + dither_8x8_128, 7, clip9); \ + } else { \ + DITHER_COPY(dstPtr2, dstStride[plane] / 2, wfunc, \ + srcPtr2, srcStride[plane] / 2, rfunc, \ + dither_8x8_64, 6, clip10); \ } if (isBE(c->dstFormat)) { if (isBE(c->srcFormat)) { @@ -540,9 +668,9 @@ for (i = 0; i < height; i++) { \ for (j = 0; j < length; j++) { \ const int srcpx = srcPtr[j]; \ - wfunc(&dstPtr2[j], (srcpx<<(dst_depth-8)) | (srcpx >> (16-dst_depth))); \ + wfunc(&dstPtr2[j], (srcpx << (dst_depth - 8)) | (srcpx >> (16 - dst_depth))); \ } \ - dstPtr2 += dstStride[plane]/2; \ + dstPtr2 += dstStride[plane] / 2; \ srcPtr += srcStride[plane]; \ } if (isBE(c->dstFormat)) { @@ -551,42 +679,46 @@ COPY8TO9_OR_10(AV_WL16); } } - } else if(is16BPS(c->srcFormat) && !is16BPS(c->dstFormat)) { - if (!isBE(c->srcFormat)) srcPtr++; - for (i=0; isrcFormat) && !is16BPS(c->dstFormat)) { + const uint16_t *srcPtr2 = (const uint16_t *) srcPtr; +#define COPY16TO8(rfunc) \ + DITHER_COPY(dstPtr, dstStride[plane], W8, \ + srcPtr2, srcStride[plane] / 2, rfunc, \ + dither_8x8_256, 8, av_clip_uint8); + if (isBE(c->srcFormat)) { + COPY16TO8(AV_RB16); + } else { + COPY16TO8(AV_RL16); } - } else if(!is16BPS(c->srcFormat) && is16BPS(c->dstFormat)) { - for (i=0; isrcFormat) && is16BPS(c->dstFormat)) { + for (i = 0; i < height; i++) { + for (j = 0; j < length; j++) { + dstPtr[ j << 1 ] = srcPtr[j]; + dstPtr[(j << 1) + 1] = srcPtr[j]; } - srcPtr+= srcStride[plane]; - dstPtr+= dstStride[plane]; + srcPtr += srcStride[plane]; + dstPtr += dstStride[plane]; } - } else if(is16BPS(c->srcFormat) && is16BPS(c->dstFormat) - && isBE(c->srcFormat) != isBE(c->dstFormat)) { + } else if (is16BPS(c->srcFormat) && is16BPS(c->dstFormat) && + isBE(c->srcFormat) != isBE(c->dstFormat)) { - for (i=0; i 0 && srcStride[plane] == length) { - memcpy(dst[plane] + dstStride[plane]*y, src[plane], - height*dstStride[plane]); + memcpy(dst[plane] + dstStride[plane] * y, src[plane], + height * dstStride[plane]); } else { - if(is16BPS(c->srcFormat) && is16BPS(c->dstFormat)) - length*=2; - for (i=0; isrcFormat) && is16BPS(c->dstFormat)) + length *= 2; + for (i = 0; i < height; i++) { memcpy(dstPtr, srcPtr, length); - srcPtr+= srcStride[plane]; - dstPtr+= dstStride[plane]; + srcPtr += srcStride[plane]; + dstPtr += dstStride[plane]; } } } @@ -594,6 +726,12 @@ return srcSliceH; } + +#define IS_DIFFERENT_ENDIANESS(src_fmt, dst_fmt, pix_fmt) \ + ((src_fmt == pix_fmt ## BE && dst_fmt == pix_fmt ## LE) || \ + (src_fmt == pix_fmt ## LE && dst_fmt == pix_fmt ## BE)) + + void ff_get_unscaled_swscale(SwsContext *c) { const enum PixelFormat srcFormat = c->srcFormat; @@ -602,27 +740,33 @@ const int dstH = c->dstH; int needsDither; - needsDither= isAnyRGB(dstFormat) - && c->dstFormatBpp < 24 - && (c->dstFormatBpp < c->srcFormatBpp || (!isAnyRGB(srcFormat))); + needsDither = isAnyRGB(dstFormat) && + c->dstFormatBpp < 24 && + (c->dstFormatBpp < c->srcFormatBpp || (!isAnyRGB(srcFormat))); /* yv12_to_nv12 */ - if ((srcFormat == PIX_FMT_YUV420P || srcFormat == PIX_FMT_YUVA420P) && (dstFormat == PIX_FMT_NV12 || dstFormat == PIX_FMT_NV21)) { - c->swScale= planarToNv12Wrapper; + if ((srcFormat == PIX_FMT_YUV420P || srcFormat == PIX_FMT_YUVA420P) && + (dstFormat == PIX_FMT_NV12 || dstFormat == PIX_FMT_NV21)) { + c->swScale = planarToNv12Wrapper; } /* yuv2bgr */ - if ((srcFormat==PIX_FMT_YUV420P || srcFormat==PIX_FMT_YUV422P || srcFormat==PIX_FMT_YUVA420P) && isAnyRGB(dstFormat) - && !(flags & SWS_ACCURATE_RND) && !(dstH&1)) { - c->swScale= ff_yuv2rgb_get_func_ptr(c); + if ((srcFormat == PIX_FMT_YUV420P || srcFormat == PIX_FMT_YUV422P || + srcFormat == PIX_FMT_YUVA420P) && isAnyRGB(dstFormat) && + !(flags & SWS_ACCURATE_RND) && !(dstH & 1)) { + c->swScale = ff_yuv2rgb_get_func_ptr(c); } - if (srcFormat==PIX_FMT_YUV410P && (dstFormat==PIX_FMT_YUV420P || dstFormat==PIX_FMT_YUVA420P) && !(flags & SWS_BITEXACT)) { - c->swScale= yvu9ToYv12Wrapper; + if (srcFormat == PIX_FMT_YUV410P && + (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P) && + !(flags & SWS_BITEXACT)) { + c->swScale = yvu9ToYv12Wrapper; } /* bgr24toYV12 */ - if (srcFormat==PIX_FMT_BGR24 && (dstFormat==PIX_FMT_YUV420P || dstFormat==PIX_FMT_YUVA420P) && !(flags & SWS_ACCURATE_RND)) - c->swScale= bgr24ToYv12Wrapper; + if (srcFormat == PIX_FMT_BGR24 && + (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P) && + !(flags & SWS_ACCURATE_RND)) + c->swScale = bgr24ToYv12Wrapper; /* RGB/BGR -> RGB/BGR (no dither needed forms) */ if ( isAnyRGB(srcFormat) @@ -642,6 +786,18 @@ && (!needsDither || (c->flags&(SWS_FAST_BILINEAR|SWS_POINT)))) c->swScale= rgbToRgbWrapper; + /* bswap 16 bits per pixel/component packed formats */ + if (IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_BGR444) || + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_BGR48) || + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_BGR555) || + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_BGR565) || + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_GRAY16) || + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_RGB444) || + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_RGB48) || + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_RGB555) || + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_RGB565)) + c->swScale = packed_16bpc_bswap; + if ((usePal(srcFormat) && ( dstFormat == PIX_FMT_RGB32 || dstFormat == PIX_FMT_RGB32_1 || @@ -649,13 +805,13 @@ dstFormat == PIX_FMT_BGR32 || dstFormat == PIX_FMT_BGR32_1 || dstFormat == PIX_FMT_BGR24))) - c->swScale= palToRgbWrapper; + c->swScale = palToRgbWrapper; if (srcFormat == PIX_FMT_YUV422P) { if (dstFormat == PIX_FMT_YUYV422) - c->swScale= yuv422pToYuy2Wrapper; + c->swScale = yuv422pToYuy2Wrapper; else if (dstFormat == PIX_FMT_UYVY422) - c->swScale= yuv422pToUyvyWrapper; + c->swScale = yuv422pToUyvyWrapper; } /* LQ converters if -sws 0 or -sws 4*/ @@ -663,37 +819,39 @@ /* yv12_to_yuy2 */ if (srcFormat == PIX_FMT_YUV420P || srcFormat == PIX_FMT_YUVA420P) { if (dstFormat == PIX_FMT_YUYV422) - c->swScale= planarToYuy2Wrapper; + c->swScale = planarToYuy2Wrapper; else if (dstFormat == PIX_FMT_UYVY422) - c->swScale= planarToUyvyWrapper; + c->swScale = planarToUyvyWrapper; } } - if(srcFormat == PIX_FMT_YUYV422 && (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P)) - c->swScale= yuyvToYuv420Wrapper; - if(srcFormat == PIX_FMT_UYVY422 && (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P)) - c->swScale= uyvyToYuv420Wrapper; - if(srcFormat == PIX_FMT_YUYV422 && dstFormat == PIX_FMT_YUV422P) - c->swScale= yuyvToYuv422Wrapper; - if(srcFormat == PIX_FMT_UYVY422 && dstFormat == PIX_FMT_YUV422P) - c->swScale= uyvyToYuv422Wrapper; + if (srcFormat == PIX_FMT_YUYV422 && + (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P)) + c->swScale = yuyvToYuv420Wrapper; + if (srcFormat == PIX_FMT_UYVY422 && + (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P)) + c->swScale = uyvyToYuv420Wrapper; + if (srcFormat == PIX_FMT_YUYV422 && dstFormat == PIX_FMT_YUV422P) + c->swScale = yuyvToYuv422Wrapper; + if (srcFormat == PIX_FMT_UYVY422 && dstFormat == PIX_FMT_YUV422P) + c->swScale = uyvyToYuv422Wrapper; /* simple copy */ - if ( srcFormat == dstFormat - || (srcFormat == PIX_FMT_YUVA420P && dstFormat == PIX_FMT_YUV420P) - || (srcFormat == PIX_FMT_YUV420P && dstFormat == PIX_FMT_YUVA420P) - || (isPlanarYUV(srcFormat) && isGray(dstFormat)) - || (isPlanarYUV(dstFormat) && isGray(srcFormat)) - || (isGray(dstFormat) && isGray(srcFormat)) - || (isPlanarYUV(srcFormat) && isPlanarYUV(dstFormat) - && c->chrDstHSubSample == c->chrSrcHSubSample - && c->chrDstVSubSample == c->chrSrcVSubSample - && dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21 - && srcFormat != PIX_FMT_NV12 && srcFormat != PIX_FMT_NV21)) + if ( srcFormat == dstFormat || + (srcFormat == PIX_FMT_YUVA420P && dstFormat == PIX_FMT_YUV420P) || + (srcFormat == PIX_FMT_YUV420P && dstFormat == PIX_FMT_YUVA420P) || + (isPlanarYUV(srcFormat) && isGray(dstFormat)) || + (isPlanarYUV(dstFormat) && isGray(srcFormat)) || + (isGray(dstFormat) && isGray(srcFormat)) || + (isPlanarYUV(srcFormat) && isPlanarYUV(dstFormat) && + c->chrDstHSubSample == c->chrSrcHSubSample && + c->chrDstVSubSample == c->chrSrcVSubSample && + dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21 && + srcFormat != PIX_FMT_NV12 && srcFormat != PIX_FMT_NV21)) { if (isPacked(c->srcFormat)) - c->swScale= packedCopyWrapper; + c->swScale = packedCopyWrapper; else /* Planar YUV or gray */ - c->swScale= planarCopyWrapper; + c->swScale = planarCopyWrapper; } if (ARCH_BFIN) @@ -702,15 +860,15 @@ ff_swscale_get_unscaled_altivec(c); } -static void reset_ptr(const uint8_t* src[], int format) +static void reset_ptr(const uint8_t *src[], int format) { - if(!isALPHA(format)) - src[3]=NULL; - if(!isPlanarYUV(format)) { - src[3]=src[2]=NULL; + if (!isALPHA(format)) + src[3] = NULL; + if (!isPlanar(format)) { + src[3] = src[2] = NULL; if (!usePal(format)) - src[1]= NULL; + src[1] = NULL; } } @@ -733,18 +891,21 @@ * swscale wrapper, so we don't need to export the SwsContext. * Assumes planar YUV to be in YUV order instead of YVU. */ -int sws_scale(SwsContext *c, const uint8_t* const src[], const int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* const dst[], const int dstStride[]) +int attribute_align_arg sws_scale(struct SwsContext *c, + const uint8_t * const srcSlice[], + const int srcStride[], int srcSliceY, + int srcSliceH, uint8_t *const dst[], + const int dstStride[]) { int i; - const uint8_t* src2[4]= {src[0], src[1], src[2], src[3]}; - uint8_t* dst2[4]= {dst[0], dst[1], dst[2], dst[3]}; + const uint8_t *src2[4] = { srcSlice[0], srcSlice[1], srcSlice[2], srcSlice[3] }; + uint8_t *dst2[4] = { dst[0], dst[1], dst[2], dst[3] }; // do not mess up sliceDir if we have a "trailing" 0-size slice if (srcSliceH == 0) return 0; - if (!check_image_pointers(src, c->srcFormat, srcStride)) { + if (!check_image_pointers(srcSlice, c->srcFormat, srcStride)) { av_log(c, AV_LOG_ERROR, "bad src image pointers\n"); return 0; } @@ -762,63 +923,64 @@ } if (usePal(c->srcFormat)) { - for (i=0; i<256; i++) { - int p, r, g, b,y,u,v; - if(c->srcFormat == PIX_FMT_PAL8) { - p=((const uint32_t*)(src[1]))[i]; - r= (p>>16)&0xFF; - g= (p>> 8)&0xFF; - b= p &0xFF; - } else if(c->srcFormat == PIX_FMT_RGB8) { - r= (i>>5 )*36; - g= ((i>>2)&7)*36; - b= (i&3 )*85; - } else if(c->srcFormat == PIX_FMT_BGR8) { - b= (i>>6 )*85; - g= ((i>>3)&7)*36; - r= (i&7 )*36; - } else if(c->srcFormat == PIX_FMT_RGB4_BYTE) { - r= (i>>3 )*255; - g= ((i>>1)&3)*85; - b= (i&1 )*255; - } else if(c->srcFormat == PIX_FMT_GRAY8 || c->srcFormat == PIX_FMT_Y400A) { + for (i = 0; i < 256; i++) { + int p, r, g, b, y, u, v; + if (c->srcFormat == PIX_FMT_PAL8) { + p = ((const uint32_t *)(srcSlice[1]))[i]; + r = (p >> 16) & 0xFF; + g = (p >> 8) & 0xFF; + b = p & 0xFF; + } else if (c->srcFormat == PIX_FMT_RGB8) { + r = ( i >> 5 ) * 36; + g = ((i >> 2) & 7) * 36; + b = ( i & 3) * 85; + } else if (c->srcFormat == PIX_FMT_BGR8) { + b = ( i >> 6 ) * 85; + g = ((i >> 3) & 7) * 36; + r = ( i & 7) * 36; + } else if (c->srcFormat == PIX_FMT_RGB4_BYTE) { + r = ( i >> 3 ) * 255; + g = ((i >> 1) & 3) * 85; + b = ( i & 1) * 255; + } else if (c->srcFormat == PIX_FMT_GRAY8 || + c->srcFormat == PIX_FMT_Y400A) { r = g = b = i; } else { assert(c->srcFormat == PIX_FMT_BGR4_BYTE); - b= (i>>3 )*255; - g= ((i>>1)&3)*85; - r= (i&1 )*255; + b = ( i >> 3 ) * 255; + g = ((i >> 1) & 3) * 85; + r = ( i & 1) * 255; } - y= av_clip_uint8((RY*r + GY*g + BY*b + ( 33<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT); - u= av_clip_uint8((RU*r + GU*g + BU*b + (257<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT); - v= av_clip_uint8((RV*r + GV*g + BV*b + (257<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT); - c->pal_yuv[i]= y + (u<<8) + (v<<16); + y = av_clip_uint8((RY * r + GY * g + BY * b + ( 33 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT); + u = av_clip_uint8((RU * r + GU * g + BU * b + (257 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT); + v = av_clip_uint8((RV * r + GV * g + BV * b + (257 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT); + c->pal_yuv[i] = y + (u << 8) + (v << 16); - switch(c->dstFormat) { + switch (c->dstFormat) { case PIX_FMT_BGR32: #if !HAVE_BIGENDIAN case PIX_FMT_RGB24: #endif - c->pal_rgb[i]= r + (g<<8) + (b<<16); + c->pal_rgb[i] = r + (g << 8) + (b << 16); break; case PIX_FMT_BGR32_1: #if HAVE_BIGENDIAN case PIX_FMT_BGR24: #endif - c->pal_rgb[i]= (r + (g<<8) + (b<<16)) << 8; + c->pal_rgb[i] = (r + (g << 8) + (b << 16)) << 8; break; case PIX_FMT_RGB32_1: #if HAVE_BIGENDIAN case PIX_FMT_RGB24: #endif - c->pal_rgb[i]= (b + (g<<8) + (r<<16)) << 8; + c->pal_rgb[i] = (b + (g << 8) + (r << 16)) << 8; break; case PIX_FMT_RGB32: #if !HAVE_BIGENDIAN case PIX_FMT_BGR24: #endif default: - c->pal_rgb[i]= b + (g<<8) + (r<<16); + c->pal_rgb[i] = b + (g << 8) + (r << 16); } } } @@ -826,62 +988,70 @@ // copy strides, so they can safely be modified if (c->sliceDir == 1) { // slices go from top to bottom - int srcStride2[4]= {srcStride[0], srcStride[1], srcStride[2], srcStride[3]}; - int dstStride2[4]= {dstStride[0], dstStride[1], dstStride[2], dstStride[3]}; + int srcStride2[4] = { srcStride[0], srcStride[1], srcStride[2], + srcStride[3] }; + int dstStride2[4] = { dstStride[0], dstStride[1], dstStride[2], + dstStride[3] }; reset_ptr(src2, c->srcFormat); - reset_ptr((const uint8_t**)dst2, c->dstFormat); + reset_ptr((const uint8_t **) dst2, c->dstFormat); /* reset slice direction at end of frame */ if (srcSliceY + srcSliceH == c->srcH) c->sliceDir = 0; - return c->swScale(c, src2, srcStride2, srcSliceY, srcSliceH, dst2, dstStride2); + return c->swScale(c, src2, srcStride2, srcSliceY, srcSliceH, dst2, + dstStride2); } else { // slices go from bottom to top => we flip the image internally - int srcStride2[4]= {-srcStride[0], -srcStride[1], -srcStride[2], -srcStride[3]}; - int dstStride2[4]= {-dstStride[0], -dstStride[1], -dstStride[2], -dstStride[3]}; + int srcStride2[4] = { -srcStride[0], -srcStride[1], -srcStride[2], + -srcStride[3] }; + int dstStride2[4] = { -dstStride[0], -dstStride[1], -dstStride[2], + -dstStride[3] }; - src2[0] += (srcSliceH-1)*srcStride[0]; + src2[0] += (srcSliceH - 1) * srcStride[0]; if (!usePal(c->srcFormat)) - src2[1] += ((srcSliceH>>c->chrSrcVSubSample)-1)*srcStride[1]; - src2[2] += ((srcSliceH>>c->chrSrcVSubSample)-1)*srcStride[2]; - src2[3] += (srcSliceH-1)*srcStride[3]; - dst2[0] += ( c->dstH -1)*dstStride[0]; - dst2[1] += ((c->dstH>>c->chrDstVSubSample)-1)*dstStride[1]; - dst2[2] += ((c->dstH>>c->chrDstVSubSample)-1)*dstStride[2]; - dst2[3] += ( c->dstH -1)*dstStride[3]; + src2[1] += ((srcSliceH >> c->chrSrcVSubSample) - 1) * srcStride[1]; + src2[2] += ((srcSliceH >> c->chrSrcVSubSample) - 1) * srcStride[2]; + src2[3] += (srcSliceH - 1) * srcStride[3]; + dst2[0] += ( c->dstH - 1) * dstStride[0]; + dst2[1] += ((c->dstH >> c->chrDstVSubSample) - 1) * dstStride[1]; + dst2[2] += ((c->dstH >> c->chrDstVSubSample) - 1) * dstStride[2]; + dst2[3] += ( c->dstH - 1) * dstStride[3]; reset_ptr(src2, c->srcFormat); - reset_ptr((const uint8_t**)dst2, c->dstFormat); + reset_ptr((const uint8_t **) dst2, c->dstFormat); /* reset slice direction at end of frame */ if (!srcSliceY) c->sliceDir = 0; - return c->swScale(c, src2, srcStride2, c->srcH-srcSliceY-srcSliceH, srcSliceH, dst2, dstStride2); + return c->swScale(c, src2, srcStride2, c->srcH-srcSliceY-srcSliceH, + srcSliceH, dst2, dstStride2); } } /* Convert the palette to the same packed 32-bit format as the palette */ -void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette) +void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, + int num_pixels, const uint8_t *palette) { int i; - for (i=0; i dst format: ABC */ -void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette) +void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, + int num_pixels, const uint8_t *palette) { int i; - for (i=0; i #include #include @@ -42,6 +43,7 @@ #include "libavutil/cpu.h" #include "libavutil/avutil.h" #include "libavutil/bswap.h" +#include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "libavutil/pixdesc.h" @@ -63,125 +65,99 @@ #define RET 0xC3 //near return opcode for x86 -#define isSupportedIn(x) ( \ - (x)==PIX_FMT_YUV420P \ - || (x)==PIX_FMT_YUVA420P \ - || (x)==PIX_FMT_YUYV422 \ - || (x)==PIX_FMT_UYVY422 \ - || (x)==PIX_FMT_RGB48BE \ - || (x)==PIX_FMT_RGB48LE \ - || (x)==PIX_FMT_RGB32 \ - || (x)==PIX_FMT_RGB32_1 \ - || (x)==PIX_FMT_BGR48BE \ - || (x)==PIX_FMT_BGR48LE \ - || (x)==PIX_FMT_BGR24 \ - || (x)==PIX_FMT_BGR565LE \ - || (x)==PIX_FMT_BGR565BE \ - || (x)==PIX_FMT_BGR555LE \ - || (x)==PIX_FMT_BGR555BE \ - || (x)==PIX_FMT_BGR32 \ - || (x)==PIX_FMT_BGR32_1 \ - || (x)==PIX_FMT_RGB24 \ - || (x)==PIX_FMT_RGB565LE \ - || (x)==PIX_FMT_RGB565BE \ - || (x)==PIX_FMT_RGB555LE \ - || (x)==PIX_FMT_RGB555BE \ - || (x)==PIX_FMT_GRAY8 \ - || (x)==PIX_FMT_Y400A \ - || (x)==PIX_FMT_YUV410P \ - || (x)==PIX_FMT_YUV440P \ - || (x)==PIX_FMT_NV12 \ - || (x)==PIX_FMT_NV21 \ - || (x)==PIX_FMT_GRAY16BE \ - || (x)==PIX_FMT_GRAY16LE \ - || (x)==PIX_FMT_YUV444P \ - || (x)==PIX_FMT_YUV422P \ - || (x)==PIX_FMT_YUV411P \ - || (x)==PIX_FMT_YUVJ420P \ - || (x)==PIX_FMT_YUVJ422P \ - || (x)==PIX_FMT_YUVJ440P \ - || (x)==PIX_FMT_YUVJ444P \ - || (x)==PIX_FMT_PAL8 \ - || (x)==PIX_FMT_BGR8 \ - || (x)==PIX_FMT_RGB8 \ - || (x)==PIX_FMT_BGR4_BYTE \ - || (x)==PIX_FMT_RGB4_BYTE \ - || (x)==PIX_FMT_YUV440P \ - || (x)==PIX_FMT_MONOWHITE \ - || (x)==PIX_FMT_MONOBLACK \ - || (x)==PIX_FMT_YUV420P9LE \ - || (x)==PIX_FMT_YUV444P9LE \ - || (x)==PIX_FMT_YUV420P10LE \ - || (x)==PIX_FMT_YUV422P10LE \ - || (x)==PIX_FMT_YUV444P10LE \ - || (x)==PIX_FMT_YUV420P16LE \ - || (x)==PIX_FMT_YUV422P16LE \ - || (x)==PIX_FMT_YUV444P16LE \ - || (x)==PIX_FMT_YUV420P9BE \ - || (x)==PIX_FMT_YUV444P9BE \ - || (x)==PIX_FMT_YUV420P10BE \ - || (x)==PIX_FMT_YUV444P10BE \ - || (x)==PIX_FMT_YUV422P10BE \ - || (x)==PIX_FMT_YUV420P16BE \ - || (x)==PIX_FMT_YUV422P16BE \ - || (x)==PIX_FMT_YUV444P16BE \ - ) +typedef struct FormatEntry { + int is_supported_in, is_supported_out; +} FormatEntry; + +const static FormatEntry format_entries[PIX_FMT_NB] = { + [PIX_FMT_YUV420P] = { 1 , 1 }, + [PIX_FMT_YUYV422] = { 1 , 1 }, + [PIX_FMT_RGB24] = { 1 , 1 }, + [PIX_FMT_BGR24] = { 1 , 1 }, + [PIX_FMT_YUV422P] = { 1 , 1 }, + [PIX_FMT_YUV444P] = { 1 , 1 }, + [PIX_FMT_YUV410P] = { 1 , 1 }, + [PIX_FMT_YUV411P] = { 1 , 1 }, + [PIX_FMT_GRAY8] = { 1 , 1 }, + [PIX_FMT_MONOWHITE] = { 1 , 1 }, + [PIX_FMT_MONOBLACK] = { 1 , 1 }, + [PIX_FMT_PAL8] = { 1 , 0 }, + [PIX_FMT_YUVJ420P] = { 1 , 1 }, + [PIX_FMT_YUVJ422P] = { 1 , 1 }, + [PIX_FMT_YUVJ444P] = { 1 , 1 }, + [PIX_FMT_UYVY422] = { 1 , 1 }, + [PIX_FMT_UYYVYY411] = { 0 , 0 }, + [PIX_FMT_BGR8] = { 1 , 1 }, + [PIX_FMT_BGR4] = { 0 , 1 }, + [PIX_FMT_BGR4_BYTE] = { 1 , 1 }, + [PIX_FMT_RGB8] = { 1 , 1 }, + [PIX_FMT_RGB4] = { 0 , 1 }, + [PIX_FMT_RGB4_BYTE] = { 1 , 1 }, + [PIX_FMT_NV12] = { 1 , 1 }, + [PIX_FMT_NV21] = { 1 , 1 }, + [PIX_FMT_ARGB] = { 1 , 1 }, + [PIX_FMT_RGBA] = { 1 , 1 }, + [PIX_FMT_ABGR] = { 1 , 1 }, + [PIX_FMT_BGRA] = { 1 , 1 }, + [PIX_FMT_GRAY16BE] = { 1 , 1 }, + [PIX_FMT_GRAY16LE] = { 1 , 1 }, + [PIX_FMT_YUV440P] = { 1 , 1 }, + [PIX_FMT_YUVJ440P] = { 1 , 1 }, + [PIX_FMT_YUVA420P] = { 1 , 1 }, + [PIX_FMT_RGB48BE] = { 1 , 1 }, + [PIX_FMT_RGB48LE] = { 1 , 1 }, + [PIX_FMT_RGB565BE] = { 1 , 1 }, + [PIX_FMT_RGB565LE] = { 1 , 1 }, + [PIX_FMT_RGB555BE] = { 1 , 1 }, + [PIX_FMT_RGB555LE] = { 1 , 1 }, + [PIX_FMT_BGR565BE] = { 1 , 1 }, + [PIX_FMT_BGR565LE] = { 1 , 1 }, + [PIX_FMT_BGR555BE] = { 1 , 1 }, + [PIX_FMT_BGR555LE] = { 1 , 1 }, + [PIX_FMT_YUV420P16LE] = { 1 , 1 }, + [PIX_FMT_YUV420P16BE] = { 1 , 1 }, + [PIX_FMT_YUV422P16LE] = { 1 , 1 }, + [PIX_FMT_YUV422P16BE] = { 1 , 1 }, + [PIX_FMT_YUV444P16LE] = { 1 , 1 }, + [PIX_FMT_YUV444P16BE] = { 1 , 1 }, + [PIX_FMT_RGB444LE] = { 1 , 1 }, + [PIX_FMT_RGB444BE] = { 1 , 1 }, + [PIX_FMT_BGR444LE] = { 1 , 1 }, + [PIX_FMT_BGR444BE] = { 1 , 1 }, + [PIX_FMT_Y400A] = { 1 , 0 }, + [PIX_FMT_BGR48BE] = { 1 , 1 }, + [PIX_FMT_BGR48LE] = { 1 , 1 }, + [PIX_FMT_YUV420P9BE] = { 1 , 1 }, + [PIX_FMT_YUV420P9LE] = { 1 , 1 }, + [PIX_FMT_YUV420P10BE] = { 1 , 1 }, + [PIX_FMT_YUV420P10LE] = { 1 , 1 }, + [PIX_FMT_YUV422P9BE] = { 1 , 1 }, + [PIX_FMT_YUV422P9LE] = { 1 , 1 }, + [PIX_FMT_YUV422P10BE] = { 1 , 1 }, + [PIX_FMT_YUV422P10LE] = { 1 , 1 }, + [PIX_FMT_YUV444P9BE] = { 1 , 1 }, + [PIX_FMT_YUV444P9LE] = { 1 , 1 }, + [PIX_FMT_YUV444P10BE] = { 1 , 1 }, + [PIX_FMT_YUV444P10LE] = { 1 , 1 }, + [PIX_FMT_GBRP] = { 1 , 0 }, + [PIX_FMT_GBRP9LE] = { 1 , 0 }, + [PIX_FMT_GBRP9BE] = { 1 , 0 }, + [PIX_FMT_GBRP10LE] = { 1 , 0 }, + [PIX_FMT_GBRP10BE] = { 1 , 0 }, + [PIX_FMT_GBRP16LE] = { 1 , 0 }, + [PIX_FMT_GBRP16BE] = { 1 , 0 }, +}; int sws_isSupportedInput(enum PixelFormat pix_fmt) { - return isSupportedIn(pix_fmt); + return (unsigned)pix_fmt < PIX_FMT_NB ? + format_entries[pix_fmt].is_supported_in : 0; } -#define isSupportedOut(x) ( \ - (x)==PIX_FMT_YUV420P \ - || (x)==PIX_FMT_YUVA420P \ - || (x)==PIX_FMT_YUYV422 \ - || (x)==PIX_FMT_UYVY422 \ - || (x)==PIX_FMT_YUV444P \ - || (x)==PIX_FMT_YUV422P \ - || (x)==PIX_FMT_YUV411P \ - || (x)==PIX_FMT_YUVJ420P \ - || (x)==PIX_FMT_YUVJ422P \ - || (x)==PIX_FMT_YUVJ440P \ - || (x)==PIX_FMT_YUVJ444P \ - || isRGBinBytes(x) \ - || isBGRinBytes(x) \ - || (x)==PIX_FMT_RGB565 \ - || (x)==PIX_FMT_RGB555 \ - || (x)==PIX_FMT_RGB444 \ - || (x)==PIX_FMT_BGR565 \ - || (x)==PIX_FMT_BGR555 \ - || (x)==PIX_FMT_BGR444 \ - || (x)==PIX_FMT_RGB8 \ - || (x)==PIX_FMT_BGR8 \ - || (x)==PIX_FMT_RGB4_BYTE \ - || (x)==PIX_FMT_BGR4_BYTE \ - || (x)==PIX_FMT_RGB4 \ - || (x)==PIX_FMT_BGR4 \ - || (x)==PIX_FMT_MONOBLACK \ - || (x)==PIX_FMT_MONOWHITE \ - || (x)==PIX_FMT_NV12 \ - || (x)==PIX_FMT_NV21 \ - || (x)==PIX_FMT_GRAY16BE \ - || (x)==PIX_FMT_GRAY16LE \ - || (x)==PIX_FMT_GRAY8 \ - || (x)==PIX_FMT_YUV410P \ - || (x)==PIX_FMT_YUV440P \ - || (x)==PIX_FMT_YUV420P9LE \ - || (x)==PIX_FMT_YUV420P10LE \ - || (x)==PIX_FMT_YUV420P16LE \ - || (x)==PIX_FMT_YUV422P16LE \ - || (x)==PIX_FMT_YUV444P16LE \ - || (x)==PIX_FMT_YUV420P9BE \ - || (x)==PIX_FMT_YUV420P10BE \ - || (x)==PIX_FMT_YUV420P16BE \ - || (x)==PIX_FMT_YUV422P16BE \ - || (x)==PIX_FMT_YUV444P16BE \ - ) - int sws_isSupportedOutput(enum PixelFormat pix_fmt) { - return isSupportedOut(pix_fmt); + return (unsigned)pix_fmt < PIX_FMT_NB ? + format_entries[pix_fmt].is_supported_out : 0; } extern const int32_t ff_yuv2rgb_coeffs[8][4]; @@ -206,7 +182,7 @@ static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSize, int xInc, int srcW, int dstW, int filterAlign, int one, int flags, int cpu_flags, - SwsVector *srcFilter, SwsVector *dstFilter, double param[2]) + SwsVector *srcFilter, SwsVector *dstFilter, double param[2], int is_horizontal) { int i; int filterSize; @@ -219,8 +195,8 @@ emms_c(); //FIXME this should not be required but it IS (even for non-MMX versions) - // NOTE: the +1 is for the MMX scaler which reads over the end - FF_ALLOC_OR_GOTO(NULL, *filterPos, (dstW+1)*sizeof(int16_t), fail); + // NOTE: the +3 is for the MMX(+1)/SSE(+3) scaler which reads over the end + FF_ALLOC_OR_GOTO(NULL, *filterPos, (dstW+3)*sizeof(int16_t), fail); if (FFABS(xInc - 0x10000) <10) { // unscaled int i; @@ -308,15 +284,18 @@ if (flags & SWS_BICUBIC) { int64_t B= (param[0] != SWS_PARAM_DEFAULT ? param[0] : 0) * (1<<24); int64_t C= (param[1] != SWS_PARAM_DEFAULT ? param[1] : 0.6) * (1<<24); - int64_t dd = ( d*d)>>30; - int64_t ddd= (dd*d)>>30; - if (d < 1LL<<30) - coeff = (12*(1<<24)-9*B-6*C)*ddd + (-18*(1<<24)+12*B+6*C)*dd + (6*(1<<24)-2*B)*(1<<30); - else if (d < 1LL<<31) - coeff = (-B-6*C)*ddd + (6*B+30*C)*dd + (-12*B-48*C)*d + (8*B+24*C)*(1<<30); - else - coeff=0.0; + if (d >= 1LL<<31) { + coeff = 0.0; + } else { + int64_t dd = (d * d) >> 30; + int64_t ddd = (dd * d) >> 30; + + if (d < 1LL<<30) + coeff = (12*(1<<24)-9*B-6*C)*ddd + (-18*(1<<24)+12*B+6*C)*dd + (6*(1<<24)-2*B)*(1<<30); + else + coeff = (-B-6*C)*ddd + (6*B+30*C)*dd + (-12*B-48*C)*d + (8*B+24*C)*(1<<30); + } coeff *= fone>>(30+24); } /* else if (flags & SWS_X) { @@ -480,33 +459,35 @@ //FIXME try to align filterPos if possible //fix borders - for (i=0; i srcW) { - int shift= (*filterPos)[i] + filterSize - srcW; - // move filter coefficients right to compensate for filterPos - for (j=filterSize-2; j>=0; j--) { - int right= FFMIN(j + shift, filterSize-1); - filter[i*filterSize +right] += filter[i*filterSize +j]; - filter[i*filterSize +j]=0; + if ((*filterPos)[i] + filterSize > srcW) { + int shift = (*filterPos)[i] + filterSize - srcW; + // move filter coefficients right to compensate for filterPos + for (j = filterSize - 2; j >= 0; j--) { + int right = FFMIN(j + shift, filterSize - 1); + filter[i * filterSize + right] += filter[i * filterSize + j]; + filter[i * filterSize + j ] = 0; + } + (*filterPos)[i] = srcW - filterSize; } - (*filterPos)[i]= srcW - filterSize; } } // Note the +1 is for the MMX scaler which reads over the end /* align at 16 for AltiVec (needed by hScale_altivec_real) */ - FF_ALLOCZ_OR_GOTO(NULL, *outFilter, *outFilterSize*(dstW+1)*sizeof(int16_t), fail); + FF_ALLOCZ_OR_GOTO(NULL, *outFilter, *outFilterSize*(dstW+3)*sizeof(int16_t), fail); /* normalize & store in outFilter */ for (i=0; isrcColorspaceTable, inv_table, sizeof(int)*4); memcpy(c->dstColorspaceTable, table, sizeof(int)*4); @@ -728,7 +715,9 @@ return 0; } -int sws_getColorspaceDetails(SwsContext *c, int **inv_table, int *srcRange, int **table, int *dstRange, int *brightness, int *contrast, int *saturation) +int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, + int *srcRange, int **table, int *dstRange, + int *brightness, int *contrast, int *saturation) { if (isYUV(c->dstFormat) || isGray(c->dstFormat)) return -1; @@ -786,11 +775,11 @@ unscaled = (srcW == dstW && srcH == dstH); - if (!isSupportedIn(srcFormat)) { + if (!sws_isSupportedInput(srcFormat)) { av_log(c, AV_LOG_ERROR, "%s is not supported as input pixel format\n", sws_format_name(srcFormat)); return AVERROR(EINVAL); } - if (!isSupportedOut(dstFormat)) { + if (!sws_isSupportedOutput(dstFormat)) { av_log(c, AV_LOG_ERROR, "%s is not supported as output pixel format\n", sws_format_name(dstFormat)); return AVERROR(EINVAL); } @@ -839,6 +828,20 @@ getSubSampleFactors(&c->chrDstHSubSample, &c->chrDstVSubSample, dstFormat); // reuse chroma for 2 pixels RGB/BGR unless user wants full chroma interpolation + if (flags & SWS_FULL_CHR_H_INT && + isAnyRGB(dstFormat) && + dstFormat != PIX_FMT_RGBA && + dstFormat != PIX_FMT_ARGB && + dstFormat != PIX_FMT_BGRA && + dstFormat != PIX_FMT_ABGR && + dstFormat != PIX_FMT_RGB24 && + dstFormat != PIX_FMT_BGR24) { + av_log(c, AV_LOG_ERROR, + "full chroma interpolation for destination format '%s' not yet implemented\n", + sws_format_name(dstFormat)); + flags &= ~SWS_FULL_CHR_H_INT; + c->flags = flags; + } if (isAnyRGB(dstFormat) && !(flags&SWS_FULL_CHR_H_INT)) c->chrDstHSubSample=1; // drop some chroma lines if the user wants it @@ -871,8 +874,18 @@ } } - FF_ALLOC_OR_GOTO(c, c->formatConvBuffer, FFALIGN(srcW, 16) * 2, fail); - if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2) { + c->srcBpc = 1 + av_pix_fmt_descriptors[srcFormat].comp[0].depth_minus1; + if (c->srcBpc < 8) + c->srcBpc = 8; + c->dstBpc = 1 + av_pix_fmt_descriptors[dstFormat].comp[0].depth_minus1; + if (c->dstBpc < 8) + c->dstBpc = 8; + if (c->dstBpc == 16) + dst_stride <<= 1; + FF_ALLOC_OR_GOTO(c, c->formatConvBuffer, + (FFALIGN(srcW, 16) * 2 * FFALIGN(c->srcBpc, 8) >> 3) + 16, + fail); + if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2 && c->srcBpc == 8 && c->dstBpc <= 10) { c->canMMX2BeUsed= (dstW >=srcW && (dstW&31)==0 && (srcW&15)==0) ? 1 : 0; if (!c->canMMX2BeUsed && dstW >=srcW && (srcW&15)==0 && (flags&SWS_FAST_BILINEAR)) { if (flags&SWS_PRINT_INFO) @@ -948,12 +961,12 @@ if (initFilter(&c->hLumFilter, &c->hLumFilterPos, &c->hLumFilterSize, c->lumXInc, srcW , dstW, filterAlign, 1<<14, (flags&SWS_BICUBLIN) ? (flags|SWS_BICUBIC) : flags, cpu_flags, - srcFilter->lumH, dstFilter->lumH, c->param) < 0) + srcFilter->lumH, dstFilter->lumH, c->param, 1) < 0) goto fail; if (initFilter(&c->hChrFilter, &c->hChrFilterPos, &c->hChrFilterSize, c->chrXInc, c->chrSrcW, c->chrDstW, filterAlign, 1<<14, (flags&SWS_BICUBLIN) ? (flags|SWS_BILINEAR) : flags, cpu_flags, - srcFilter->chrH, dstFilter->chrH, c->param) < 0) + srcFilter->chrH, dstFilter->chrH, c->param, 1) < 0) goto fail; } } // initialize horizontal stuff @@ -961,19 +974,19 @@ /* precalculate vertical scaler filter coefficients */ { const int filterAlign= - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) && (flags & SWS_ACCURATE_RND) ? 2 : + (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? 2 : (HAVE_ALTIVEC && cpu_flags & AV_CPU_FLAG_ALTIVEC) ? 8 : 1; if (initFilter(&c->vLumFilter, &c->vLumFilterPos, &c->vLumFilterSize, c->lumYInc, srcH , dstH, filterAlign, (1<<12), (flags&SWS_BICUBLIN) ? (flags|SWS_BICUBIC) : flags, cpu_flags, - srcFilter->lumV, dstFilter->lumV, c->param) < 0) + srcFilter->lumV, dstFilter->lumV, c->param, 0) < 0) goto fail; if (initFilter(&c->vChrFilter, &c->vChrFilterPos, &c->vChrFilterSize, c->chrYInc, c->chrSrcH, c->chrDstH, filterAlign, (1<<12), (flags&SWS_BICUBLIN) ? (flags|SWS_BILINEAR) : flags, cpu_flags, - srcFilter->chrV, dstFilter->chrV, c->param) < 0) + srcFilter->chrV, dstFilter->chrV, c->param, 0) < 0) goto fail; #if HAVE_ALTIVEC @@ -1014,27 +1027,28 @@ // allocate pixbufs (we use dynamic allocation because otherwise we would need to // allocate several megabytes to handle all possible cases) - FF_ALLOC_OR_GOTO(c, c->lumPixBuf, c->vLumBufSize*2*sizeof(int16_t*), fail); - FF_ALLOC_OR_GOTO(c, c->chrUPixBuf, c->vChrBufSize*2*sizeof(int16_t*), fail); - FF_ALLOC_OR_GOTO(c, c->chrVPixBuf, c->vChrBufSize*2*sizeof(int16_t*), fail); + FF_ALLOC_OR_GOTO(c, c->lumPixBuf, c->vLumBufSize*3*sizeof(int16_t*), fail); + FF_ALLOC_OR_GOTO(c, c->chrUPixBuf, c->vChrBufSize*3*sizeof(int16_t*), fail); + FF_ALLOC_OR_GOTO(c, c->chrVPixBuf, c->vChrBufSize*3*sizeof(int16_t*), fail); if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat) && isALPHA(c->dstFormat)) - FF_ALLOCZ_OR_GOTO(c, c->alpPixBuf, c->vLumBufSize*2*sizeof(int16_t*), fail); + FF_ALLOCZ_OR_GOTO(c, c->alpPixBuf, c->vLumBufSize*3*sizeof(int16_t*), fail); //Note we need at least one pixel more at the end because of the MMX code (just in case someone wanna replace the 4000/8000) /* align at 16 bytes for AltiVec */ for (i=0; ivLumBufSize; i++) { - FF_ALLOCZ_OR_GOTO(c, c->lumPixBuf[i+c->vLumBufSize], dst_stride+1, fail); + FF_ALLOCZ_OR_GOTO(c, c->lumPixBuf[i+c->vLumBufSize], dst_stride+16, fail); c->lumPixBuf[i] = c->lumPixBuf[i+c->vLumBufSize]; } - c->uv_off = dst_stride_px; - c->uv_offx2 = dst_stride; + // 64 / (c->dstBpc & ~7) is the same as 16 / sizeof(scaling_intermediate) + c->uv_off_px = dst_stride_px + 64 / (c->dstBpc &~ 7); + c->uv_off_byte = dst_stride + 16; for (i=0; ivChrBufSize; i++) { - FF_ALLOC_OR_GOTO(c, c->chrUPixBuf[i+c->vChrBufSize], dst_stride*2+1, fail); + FF_ALLOC_OR_GOTO(c, c->chrUPixBuf[i+c->vChrBufSize], dst_stride*2+32, fail); c->chrUPixBuf[i] = c->chrUPixBuf[i+c->vChrBufSize]; - c->chrVPixBuf[i] = c->chrVPixBuf[i+c->vChrBufSize] = c->chrUPixBuf[i] + dst_stride_px; + c->chrVPixBuf[i] = c->chrVPixBuf[i+c->vChrBufSize] = c->chrUPixBuf[i] + (dst_stride >> 1) + 8; } if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) for (i=0; ivLumBufSize; i++) { - FF_ALLOCZ_OR_GOTO(c, c->alpPixBuf[i+c->vLumBufSize], dst_stride+1, fail); + FF_ALLOCZ_OR_GOTO(c, c->alpPixBuf[i+c->vLumBufSize], dst_stride+16, fail); c->alpPixBuf[i] = c->alpPixBuf[i+c->vLumBufSize]; } @@ -1075,72 +1089,6 @@ else if (HAVE_ALTIVEC && cpu_flags & AV_CPU_FLAG_ALTIVEC) av_log(c, AV_LOG_INFO, "using AltiVec\n"); else av_log(c, AV_LOG_INFO, "using C\n"); - if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) { - if (c->canMMX2BeUsed && (flags&SWS_FAST_BILINEAR)) - av_log(c, AV_LOG_VERBOSE, "using FAST_BILINEAR MMX2 scaler for horizontal scaling\n"); - else { - if (c->hLumFilterSize==4) - av_log(c, AV_LOG_VERBOSE, "using 4-tap MMX scaler for horizontal luminance scaling\n"); - else if (c->hLumFilterSize==8) - av_log(c, AV_LOG_VERBOSE, "using 8-tap MMX scaler for horizontal luminance scaling\n"); - else - av_log(c, AV_LOG_VERBOSE, "using n-tap MMX scaler for horizontal luminance scaling\n"); - - if (c->hChrFilterSize==4) - av_log(c, AV_LOG_VERBOSE, "using 4-tap MMX scaler for horizontal chrominance scaling\n"); - else if (c->hChrFilterSize==8) - av_log(c, AV_LOG_VERBOSE, "using 8-tap MMX scaler for horizontal chrominance scaling\n"); - else - av_log(c, AV_LOG_VERBOSE, "using n-tap MMX scaler for horizontal chrominance scaling\n"); - } - } else { -#if HAVE_MMX - av_log(c, AV_LOG_VERBOSE, "using x86 asm scaler for horizontal scaling\n"); -#else - if (flags & SWS_FAST_BILINEAR) - av_log(c, AV_LOG_VERBOSE, "using FAST_BILINEAR C scaler for horizontal scaling\n"); - else - av_log(c, AV_LOG_VERBOSE, "using C scaler for horizontal scaling\n"); -#endif - } - if (isPlanarYUV(dstFormat)) { - if (c->vLumFilterSize==1) - av_log(c, AV_LOG_VERBOSE, "using 1-tap %s \"scaler\" for vertical scaling (YV12 like)\n", - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C"); - else - av_log(c, AV_LOG_VERBOSE, "using n-tap %s scaler for vertical scaling (YV12 like)\n", - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C"); - } else { - if (c->vLumFilterSize==1 && c->vChrFilterSize==2) - av_log(c, AV_LOG_VERBOSE, "using 1-tap %s \"scaler\" for vertical luminance scaling (BGR)\n" - " 2-tap scaler for vertical chrominance scaling (BGR)\n", - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C"); - else if (c->vLumFilterSize==2 && c->vChrFilterSize==2) - av_log(c, AV_LOG_VERBOSE, "using 2-tap linear %s scaler for vertical scaling (BGR)\n", - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C"); - else - av_log(c, AV_LOG_VERBOSE, "using n-tap %s scaler for vertical scaling (BGR)\n", - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C"); - } - - if (dstFormat==PIX_FMT_BGR24) - av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR24 converter\n", - (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2) ? "MMX2" : - ((HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C")); - else if (dstFormat==PIX_FMT_RGB32) - av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR32 converter\n", - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C"); - else if (dstFormat==PIX_FMT_BGR565) - av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR16 converter\n", - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C"); - else if (dstFormat==PIX_FMT_BGR555) - av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR15 converter\n", - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C"); - else if (dstFormat == PIX_FMT_RGB444BE || dstFormat == PIX_FMT_RGB444LE || - dstFormat == PIX_FMT_BGR444BE || dstFormat == PIX_FMT_BGR444LE) - av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR12 converter\n", - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C"); - av_log(c, AV_LOG_VERBOSE, "%dx%d -> %dx%d\n", srcW, srcH, dstW, dstH); av_log(c, AV_LOG_DEBUG, "lum srcW=%d srcH=%d dstW=%d dstH=%d xInc=%d yInc=%d\n", c->srcW, c->srcH, c->dstW, c->dstH, c->lumXInc, c->lumYInc); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/x86/input.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/x86/input.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/x86/input.asm 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/x86/input.asm 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,242 @@ +;****************************************************************************** +;* x86-optimized input routines; does shuffling of packed +;* YUV formats into individual planes, and converts RGB +;* into YUV planes also. +;* Copyright (c) 2012 Ronald S. Bultje +;* +;* This file is part of Libav. +;* +;* Libav is free software; you can redistribute it and/or +;* modify it under the terms of the GNU Lesser General Public +;* License as published by the Free Software Foundation; either +;* version 2.1 of the License, or (at your option) any later version. +;* +;* Libav is distributed in the hope that it will be useful, +;* but WITHOUT ANY WARRANTY; without even the implied warranty of +;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;* Lesser General Public License for more details. +;* +;* You should have received a copy of the GNU Lesser General Public +;* License along with Libav; if not, write to the Free Software +;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;****************************************************************************** + +%include "x86inc.asm" +%include "x86util.asm" + +SECTION_RODATA + +SECTION .text + +;----------------------------------------------------------------------------- +; YUYV/UYVY/NV12/NV21 packed pixel shuffling. +; +; void ToY_(uint8_t *dst, const uint8_t *src, int w); +; and +; void toUV_(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, +; const uint8_t *unused, int w); +;----------------------------------------------------------------------------- + +; %1 = a (aligned) or u (unaligned) +; %2 = yuyv or uyvy +%macro LOOP_YUYV_TO_Y 2 +.loop_%1: + mov%1 m0, [srcq+wq*2] ; (byte) { Y0, U0, Y1, V0, ... } + mov%1 m1, [srcq+wq*2+mmsize] ; (byte) { Y8, U4, Y9, V4, ... } +%ifidn %2, yuyv + pand m0, m2 ; (word) { Y0, Y1, ..., Y7 } + pand m1, m2 ; (word) { Y8, Y9, ..., Y15 } +%else ; uyvy + psrlw m0, 8 ; (word) { Y0, Y1, ..., Y7 } + psrlw m1, 8 ; (word) { Y8, Y9, ..., Y15 } +%endif ; yuyv/uyvy + packuswb m0, m1 ; (byte) { Y0, ..., Y15 } + mova [dstq+wq], m0 + add wq, mmsize + jl .loop_%1 + REP_RET +%endmacro + +; %1 = nr. of XMM registers +; %2 = yuyv or uyvy +; %3 = if specified, it means that unaligned and aligned code in loop +; will be the same (i.e. YUYV+AVX), and thus we don't need to +; split the loop in an aligned and unaligned case +%macro YUYV_TO_Y_FN 2-3 +cglobal %2ToY, 3, 3, %1, dst, src, w +%ifdef ARCH_X86_64 + movsxd wq, wd +%endif + add dstq, wq +%if mmsize == 16 + test srcq, 15 +%endif + lea srcq, [srcq+wq*2] +%ifidn %2, yuyv + pcmpeqb m2, m2 ; (byte) { 0xff } x 16 + psrlw m2, 8 ; (word) { 0x00ff } x 8 +%endif ; yuyv +%if mmsize == 16 + jnz .loop_u_start + neg wq + LOOP_YUYV_TO_Y a, %2 +.loop_u_start: + neg wq + LOOP_YUYV_TO_Y u, %2 +%else ; mmsize == 8 + neg wq + LOOP_YUYV_TO_Y a, %2 +%endif ; mmsize == 8/16 +%endmacro + +; %1 = a (aligned) or u (unaligned) +; %2 = yuyv or uyvy +%macro LOOP_YUYV_TO_UV 2 +.loop_%1: +%ifidn %2, yuyv + mov%1 m0, [srcq+wq*4] ; (byte) { Y0, U0, Y1, V0, ... } + mov%1 m1, [srcq+wq*4+mmsize] ; (byte) { Y8, U4, Y9, V4, ... } + psrlw m0, 8 ; (word) { U0, V0, ..., U3, V3 } + psrlw m1, 8 ; (word) { U4, V4, ..., U7, V7 } +%else ; uyvy +%if cpuflag(avx) + vpand m0, m2, [srcq+wq*4] ; (word) { U0, V0, ..., U3, V3 } + vpand m1, m2, [srcq+wq*4+mmsize] ; (word) { U4, V4, ..., U7, V7 } +%else + mov%1 m0, [srcq+wq*4] ; (byte) { Y0, U0, Y1, V0, ... } + mov%1 m1, [srcq+wq*4+mmsize] ; (byte) { Y8, U4, Y9, V4, ... } + pand m0, m2 ; (word) { U0, V0, ..., U3, V3 } + pand m1, m2 ; (word) { U4, V4, ..., U7, V7 } +%endif +%endif ; yuyv/uyvy + packuswb m0, m1 ; (byte) { U0, V0, ..., U7, V7 } + pand m1, m0, m2 ; (word) { U0, U1, ..., U7 } + psrlw m0, 8 ; (word) { V0, V1, ..., V7 } +%if mmsize == 16 + packuswb m1, m0 ; (byte) { U0, ... U7, V1, ... V7 } + movh [dstUq+wq], m1 + movhps [dstVq+wq], m1 +%else ; mmsize == 8 + packuswb m1, m1 ; (byte) { U0, ... U3 } + packuswb m0, m0 ; (byte) { V0, ... V3 } + movh [dstUq+wq], m1 + movh [dstVq+wq], m0 +%endif ; mmsize == 8/16 + add wq, mmsize / 2 + jl .loop_%1 + REP_RET +%endmacro + +; %1 = nr. of XMM registers +; %2 = yuyv or uyvy +; %3 = if specified, it means that unaligned and aligned code in loop +; will be the same (i.e. UYVY+AVX), and thus we don't need to +; split the loop in an aligned and unaligned case +%macro YUYV_TO_UV_FN 2-3 +cglobal %2ToUV, 3, 4, %1, dstU, dstV, src, w +%ifdef ARCH_X86_64 + movsxd wq, dword r4m +%else ; x86-32 + mov wq, r4m +%endif + add dstUq, wq + add dstVq, wq +%if mmsize == 16 && %0 == 2 + test srcq, 15 +%endif + lea srcq, [srcq+wq*4] + pcmpeqb m2, m2 ; (byte) { 0xff } x 16 + psrlw m2, 8 ; (word) { 0x00ff } x 8 + ; NOTE: if uyvy+avx, u/a are identical +%if mmsize == 16 && %0 == 2 + jnz .loop_u_start + neg wq + LOOP_YUYV_TO_UV a, %2 +.loop_u_start: + neg wq + LOOP_YUYV_TO_UV u, %2 +%else ; mmsize == 8 + neg wq + LOOP_YUYV_TO_UV a, %2 +%endif ; mmsize == 8/16 +%endmacro + +; %1 = a (aligned) or u (unaligned) +; %2 = nv12 or nv21 +%macro LOOP_NVXX_TO_UV 2 +.loop_%1: + mov%1 m0, [srcq+wq*2] ; (byte) { U0, V0, U1, V1, ... } + mov%1 m1, [srcq+wq*2+mmsize] ; (byte) { U8, V8, U9, V9, ... } + pand m2, m0, m4 ; (word) { U0, U1, ..., U7 } + pand m3, m1, m4 ; (word) { U8, U9, ..., U15 } + psrlw m0, 8 ; (word) { V0, V1, ..., V7 } + psrlw m1, 8 ; (word) { V8, V9, ..., V15 } + packuswb m2, m3 ; (byte) { U0, ..., U15 } + packuswb m0, m1 ; (byte) { V0, ..., V15 } +%ifidn %2, nv12 + mova [dstUq+wq], m2 + mova [dstVq+wq], m0 +%else ; nv21 + mova [dstVq+wq], m2 + mova [dstUq+wq], m0 +%endif ; nv12/21 + add wq, mmsize + jl .loop_%1 + REP_RET +%endmacro + +; %1 = nr. of XMM registers +; %2 = nv12 or nv21 +%macro NVXX_TO_UV_FN 2 +cglobal %2ToUV, 3, 4, %1, dstU, dstV, src, w +%ifdef ARCH_X86_64 + movsxd wq, dword r4m +%else ; x86-32 + mov wq, r4m +%endif + add dstUq, wq + add dstVq, wq +%if mmsize == 16 + test srcq, 15 +%endif + lea srcq, [srcq+wq*2] + pcmpeqb m4, m4 ; (byte) { 0xff } x 16 + psrlw m4, 8 ; (word) { 0x00ff } x 8 +%if mmsize == 16 + jnz .loop_u_start + neg wq + LOOP_NVXX_TO_UV a, %2 +.loop_u_start: + neg wq + LOOP_NVXX_TO_UV u, %2 +%else ; mmsize == 8 + neg wq + LOOP_NVXX_TO_UV a, %2 +%endif ; mmsize == 8/16 +%endmacro + +%ifdef ARCH_X86_32 +INIT_MMX mmx +YUYV_TO_Y_FN 0, yuyv +YUYV_TO_Y_FN 0, uyvy +YUYV_TO_UV_FN 0, yuyv +YUYV_TO_UV_FN 0, uyvy +NVXX_TO_UV_FN 0, nv12 +NVXX_TO_UV_FN 0, nv21 +%endif + +INIT_XMM sse2 +YUYV_TO_Y_FN 3, yuyv +YUYV_TO_Y_FN 2, uyvy +YUYV_TO_UV_FN 3, yuyv +YUYV_TO_UV_FN 3, uyvy +NVXX_TO_UV_FN 5, nv12 +NVXX_TO_UV_FN 5, nv21 + +INIT_XMM avx +; in theory, we could write a yuy2-to-y using vpand (i.e. AVX), but +; that's not faster in practice +YUYV_TO_UV_FN 3, yuyv +YUYV_TO_UV_FN 3, uyvy, 1 +NVXX_TO_UV_FN 5, nv12 +NVXX_TO_UV_FN 5, nv21 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/x86/output.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/x86/output.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/x86/output.asm 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/x86/output.asm 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,409 @@ +;****************************************************************************** +;* x86-optimized vertical line scaling functions +;* Copyright (c) 2011 Ronald S. Bultje +;* Kieran Kunhya +;* +;* This file is part of Libav. +;* +;* Libav is free software; you can redistribute it and/or +;* modify it under the terms of the GNU Lesser General Public +;* License as published by the Free Software Foundation; either +;* version 2.1 of the License, or (at your option) any later version. +;* +;* Libav is distributed in the hope that it will be useful, +;* but WITHOUT ANY WARRANTY; without even the implied warranty of +;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;* Lesser General Public License for more details. +;* +;* You should have received a copy of the GNU Lesser General Public +;* License along with Libav; if not, write to the Free Software +;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;****************************************************************************** + +%include "x86inc.asm" +%include "x86util.asm" + +SECTION_RODATA + +minshort: times 8 dw 0x8000 +yuv2yuvX_16_start: times 4 dd 0x4000 - 0x40000000 +yuv2yuvX_10_start: times 4 dd 0x10000 +yuv2yuvX_9_start: times 4 dd 0x20000 +yuv2yuvX_10_upper: times 8 dw 0x3ff +yuv2yuvX_9_upper: times 8 dw 0x1ff +pd_4: times 4 dd 4 +pd_4min0x40000:times 4 dd 4 - (0x40000) +pw_16: times 8 dw 16 +pw_32: times 8 dw 32 +pw_512: times 8 dw 512 +pw_1024: times 8 dw 1024 + +SECTION .text + +;----------------------------------------------------------------------------- +; vertical line scaling +; +; void yuv2plane1__(const int16_t *src, uint8_t *dst, int dstW, +; const uint8_t *dither, int offset) +; and +; void yuv2planeX__(const int16_t *filter, int filterSize, +; const int16_t **src, uint8_t *dst, int dstW, +; const uint8_t *dither, int offset) +; +; Scale one or $filterSize lines of source data to generate one line of output +; data. The input is 15-bit in int16_t if $output_size is [8,10] and 19-bit in +; int32_t if $output_size is 16. $filter is 12-bits. $filterSize is a multiple +; of 2. $offset is either 0 or 3. $dither holds 8 values. +;----------------------------------------------------------------------------- + +%macro yuv2planeX_fn 4 + +%ifdef ARCH_X86_32 +%define cntr_reg r1 +%define movsx mov +%else +%define cntr_reg r11 +%define movsx movsxd +%endif + +cglobal yuv2planeX_%2_%1, %4, 7, %3 +%if %2 == 8 || %2 == 9 || %2 == 10 + pxor m6, m6 +%endif ; %2 == 8/9/10 + +%if %2 == 8 +%ifdef ARCH_X86_32 +%assign pad 0x2c - (stack_offset & 15) + SUB rsp, pad +%define m_dith m7 +%else ; x86-64 +%define m_dith m9 +%endif ; x86-32 + + ; create registers holding dither + movq m_dith, [r5] ; dither + test r6d, r6d + jz .no_rot +%if mmsize == 16 + punpcklqdq m_dith, m_dith +%endif ; mmsize == 16 + PALIGNR m_dith, m_dith, 3, m0 +.no_rot: +%if mmsize == 16 + punpcklbw m_dith, m6 +%ifdef ARCH_X86_64 + punpcklwd m8, m_dith, m6 + pslld m8, 12 +%else ; x86-32 + punpcklwd m5, m_dith, m6 + pslld m5, 12 +%endif ; x86-32/64 + punpckhwd m_dith, m6 + pslld m_dith, 12 +%ifdef ARCH_X86_32 + mova [rsp+ 0], m5 + mova [rsp+16], m_dith +%endif +%else ; mmsize == 8 + punpcklbw m5, m_dith, m6 + punpckhbw m_dith, m6 + punpcklwd m4, m5, m6 + punpckhwd m5, m6 + punpcklwd m3, m_dith, m6 + punpckhwd m_dith, m6 + pslld m4, 12 + pslld m5, 12 + pslld m3, 12 + pslld m_dith, 12 + mova [rsp+ 0], m4 + mova [rsp+ 8], m5 + mova [rsp+16], m3 + mova [rsp+24], m_dith +%endif ; mmsize == 8/16 +%endif ; %2 == 8 + + xor r5, r5 + +.pixelloop: +%assign %%i 0 + ; the rep here is for the 8bit output mmx case, where dither covers + ; 8 pixels but we can only handle 2 pixels per register, and thus 4 + ; pixels per iteration. In order to not have to keep track of where + ; we are w.r.t. dithering, we unroll the mmx/8bit loop x2. +%if %2 == 8 +%rep 16/mmsize +%endif ; %2 == 8 + +%if %2 == 8 +%ifdef ARCH_X86_32 + mova m2, [rsp+mmsize*(0+%%i)] + mova m1, [rsp+mmsize*(1+%%i)] +%else ; x86-64 + mova m2, m8 + mova m1, m_dith +%endif ; x86-32/64 +%else ; %2 == 9/10/16 + mova m1, [yuv2yuvX_%2_start] + mova m2, m1 +%endif ; %2 == 8/9/10/16 + movsx cntr_reg, r1m +.filterloop_ %+ %%i: + ; input pixels + mov r6, [r2+gprsize*cntr_reg-2*gprsize] +%if %2 == 16 + mova m3, [r6+r5*4] + mova m5, [r6+r5*4+mmsize] +%else ; %2 == 8/9/10 + mova m3, [r6+r5*2] +%endif ; %2 == 8/9/10/16 + mov r6, [r2+gprsize*cntr_reg-gprsize] +%if %2 == 16 + mova m4, [r6+r5*4] + mova m6, [r6+r5*4+mmsize] +%else ; %2 == 8/9/10 + mova m4, [r6+r5*2] +%endif ; %2 == 8/9/10/16 + + ; coefficients + movd m0, [r0+2*cntr_reg-4]; coeff[0], coeff[1] +%if %2 == 16 + pshuflw m7, m0, 0 ; coeff[0] + pshuflw m0, m0, 0x55 ; coeff[1] + pmovsxwd m7, m7 ; word -> dword + pmovsxwd m0, m0 ; word -> dword + + pmulld m3, m7 + pmulld m5, m7 + pmulld m4, m0 + pmulld m6, m0 + + paddd m2, m3 + paddd m1, m5 + paddd m2, m4 + paddd m1, m6 +%else ; %2 == 10/9/8 + punpcklwd m5, m3, m4 + punpckhwd m3, m4 + SPLATD m0, m0 + + pmaddwd m5, m0 + pmaddwd m3, m0 + + paddd m2, m5 + paddd m1, m3 +%endif ; %2 == 8/9/10/16 + + sub cntr_reg, 2 + jg .filterloop_ %+ %%i + +%if %2 == 16 + psrad m2, 31 - %2 + psrad m1, 31 - %2 +%else ; %2 == 10/9/8 + psrad m2, 27 - %2 + psrad m1, 27 - %2 +%endif ; %2 == 8/9/10/16 + +%if %2 == 8 + packssdw m2, m1 + packuswb m2, m2 + movh [r3+r5*1], m2 +%else ; %2 == 9/10/16 +%if %2 == 16 + packssdw m2, m1 + paddw m2, [minshort] +%else ; %2 == 9/10 +%ifidn %1, sse4 + packusdw m2, m1 +%elifidn %1, avx + packusdw m2, m1 +%else ; mmx2/sse2 + packssdw m2, m1 + pmaxsw m2, m6 +%endif ; mmx2/sse2/sse4/avx + pminsw m2, [yuv2yuvX_%2_upper] +%endif ; %2 == 9/10/16 + mova [r3+r5*2], m2 +%endif ; %2 == 8/9/10/16 + + add r5, mmsize/2 + sub r4d, mmsize/2 +%if %2 == 8 +%assign %%i %%i+2 +%endrep +%endif ; %2 == 8 + jg .pixelloop + +%if %2 == 8 +%ifdef ARCH_X86_32 + ADD rsp, pad + RET +%else ; x86-64 + REP_RET +%endif ; x86-32/64 +%else ; %2 == 9/10/16 + REP_RET +%endif ; %2 == 8/9/10/16 +%endmacro + +%define PALIGNR PALIGNR_MMX +%ifdef ARCH_X86_32 +INIT_MMX +yuv2planeX_fn mmx2, 8, 0, 7 +yuv2planeX_fn mmx2, 9, 0, 5 +yuv2planeX_fn mmx2, 10, 0, 5 +%endif + +INIT_XMM +yuv2planeX_fn sse2, 8, 10, 7 +yuv2planeX_fn sse2, 9, 7, 5 +yuv2planeX_fn sse2, 10, 7, 5 + +%define PALIGNR PALIGNR_SSSE3 +yuv2planeX_fn sse4, 8, 10, 7 +yuv2planeX_fn sse4, 9, 7, 5 +yuv2planeX_fn sse4, 10, 7, 5 +yuv2planeX_fn sse4, 16, 8, 5 + +INIT_AVX +yuv2planeX_fn avx, 8, 10, 7 +yuv2planeX_fn avx, 9, 7, 5 +yuv2planeX_fn avx, 10, 7, 5 + +; %1=outout-bpc, %2=alignment (u/a) +%macro yuv2plane1_mainloop 2 +.loop_%2: +%if %1 == 8 + paddsw m0, m2, [r0+r2*2+mmsize*0] + paddsw m1, m3, [r0+r2*2+mmsize*1] + psraw m0, 7 + psraw m1, 7 + packuswb m0, m1 + mov%2 [r1+r2], m0 +%elif %1 == 16 + paddd m0, m4, [r0+r2*4+mmsize*0] + paddd m1, m4, [r0+r2*4+mmsize*1] + paddd m2, m4, [r0+r2*4+mmsize*2] + paddd m3, m4, [r0+r2*4+mmsize*3] + psrad m0, 3 + psrad m1, 3 + psrad m2, 3 + psrad m3, 3 +%if cpuflag(sse4) ; avx/sse4 + packusdw m0, m1 + packusdw m2, m3 +%else ; mmx/sse2 + packssdw m0, m1 + packssdw m2, m3 + paddw m0, m5 + paddw m2, m5 +%endif ; mmx/sse2/sse4/avx + mov%2 [r1+r2*2], m0 + mov%2 [r1+r2*2+mmsize], m2 +%else + paddsw m0, m2, [r0+r2*2+mmsize*0] + paddsw m1, m2, [r0+r2*2+mmsize*1] + psraw m0, 15 - %1 + psraw m1, 15 - %1 + pmaxsw m0, m4 + pmaxsw m1, m4 + pminsw m0, m3 + pminsw m1, m3 + mov%2 [r1+r2*2], m0 + mov%2 [r1+r2*2+mmsize], m1 +%endif + add r2, mmsize + jl .loop_%2 +%endmacro + +%macro yuv2plane1_fn 3 +cglobal yuv2plane1_%1, %3, %3, %2 + add r2, mmsize - 1 + and r2, ~(mmsize - 1) +%if %1 == 8 + add r1, r2 +%else ; %1 != 8 + lea r1, [r1+r2*2] +%endif ; %1 == 8 +%if %1 == 16 + lea r0, [r0+r2*4] +%else ; %1 != 16 + lea r0, [r0+r2*2] +%endif ; %1 == 16 + neg r2 + +%if %1 == 8 + pxor m4, m4 ; zero + + ; create registers holding dither + movq m3, [r3] ; dither + test r4d, r4d + jz .no_rot +%if mmsize == 16 + punpcklqdq m3, m3 +%endif ; mmsize == 16 + PALIGNR_MMX m3, m3, 3, m2 +.no_rot: +%if mmsize == 8 + mova m2, m3 + punpckhbw m3, m4 ; byte->word + punpcklbw m2, m4 ; byte->word +%else + punpcklbw m3, m4 + mova m2, m3 +%endif +%elif %1 == 9 + pxor m4, m4 + mova m3, [pw_512] + mova m2, [pw_32] +%elif %1 == 10 + pxor m4, m4 + mova m3, [pw_1024] + mova m2, [pw_16] +%else ; %1 == 16 +%if cpuflag(sse4) ; sse4/avx + mova m4, [pd_4] +%else ; mmx/sse2 + mova m4, [pd_4min0x40000] + mova m5, [minshort] +%endif ; mmx/sse2/sse4/avx +%endif ; %1 == .. + + ; actual pixel scaling +%if mmsize == 8 + yuv2plane1_mainloop %1, a +%else ; mmsize == 16 + test r1, 15 + jnz .unaligned + yuv2plane1_mainloop %1, a + REP_RET +.unaligned: + yuv2plane1_mainloop %1, u +%endif ; mmsize == 8/16 + REP_RET +%endmacro + +%ifdef ARCH_X86_32 +INIT_MMX mmx +yuv2plane1_fn 8, 0, 5 +yuv2plane1_fn 16, 0, 3 + +INIT_MMX mmx2 +yuv2plane1_fn 9, 0, 3 +yuv2plane1_fn 10, 0, 3 +%endif + +INIT_XMM sse2 +yuv2plane1_fn 8, 5, 5 +yuv2plane1_fn 9, 5, 3 +yuv2plane1_fn 10, 5, 3 +yuv2plane1_fn 16, 6, 3 + +INIT_XMM sse4 +yuv2plane1_fn 16, 5, 3 + +INIT_XMM avx +yuv2plane1_fn 8, 5, 5 +yuv2plane1_fn 9, 5, 3 +yuv2plane1_fn 10, 5, 3 +yuv2plane1_fn 16, 5, 3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/x86/scale.asm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/x86/scale.asm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/x86/scale.asm 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/x86/scale.asm 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,429 @@ +;****************************************************************************** +;* x86-optimized horizontal line scaling functions +;* Copyright (c) 2011 Ronald S. Bultje +;* +;* This file is part of Libav. +;* +;* Libav is free software; you can redistribute it and/or +;* modify it under the terms of the GNU Lesser General Public +;* License as published by the Free Software Foundation; either +;* version 2.1 of the License, or (at your option) any later version. +;* +;* Libav is distributed in the hope that it will be useful, +;* but WITHOUT ANY WARRANTY; without even the implied warranty of +;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;* Lesser General Public License for more details. +;* +;* You should have received a copy of the GNU Lesser General Public +;* License along with Libav; if not, write to the Free Software +;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;****************************************************************************** + +%include "x86inc.asm" +%include "x86util.asm" + +SECTION_RODATA + +max_19bit_int: times 4 dd 0x7ffff +max_19bit_flt: times 4 dd 524287.0 +minshort: times 8 dw 0x8000 +unicoeff: times 4 dd 0x20000000 + +SECTION .text + +;----------------------------------------------------------------------------- +; horizontal line scaling +; +; void hscaleto__ +; (SwsContext *c, int{16,32}_t *dst, +; int dstW, const uint{8,16}_t *src, +; const int16_t *filter, +; const int16_t *filterPos, int filterSize); +; +; Scale one horizontal line. Input is either 8-bits width or 16-bits width +; ($source_width can be either 8, 9, 10 or 16, difference is whether we have to +; downscale before multiplying). Filter is 14-bits. Output is either 15bits +; (in int16_t) or 19bits (in int32_t), as given in $intermediate_nbits. Each +; output pixel is generated from $filterSize input pixels, the position of +; the first pixel is given in filterPos[nOutputPixel]. +;----------------------------------------------------------------------------- + +; SCALE_FUNC source_width, intermediate_nbits, filtersize, filtersuffix, opt, n_args, n_xmm +%macro SCALE_FUNC 7 +cglobal hscale%1to%2_%4_%5, %6, 7, %7 +%ifdef ARCH_X86_64 + movsxd r2, r2d +%endif ; x86-64 +%if %2 == 19 +%if mmsize == 8 ; mmx + mova m2, [max_19bit_int] +%elifidn %5, sse4 + mova m2, [max_19bit_int] +%else ; ssse3/sse2 + mova m2, [max_19bit_flt] +%endif ; mmx/sse2/ssse3/sse4 +%endif ; %2 == 19 +%if %1 == 16 + mova m6, [minshort] + mova m7, [unicoeff] +%elif %1 == 8 + pxor m3, m3 +%endif ; %1 == 8/16 + +%if %1 == 8 +%define movlh movd +%define movbh movh +%define srcmul 1 +%else ; %1 == 9-16 +%define movlh movq +%define movbh movu +%define srcmul 2 +%endif ; %1 == 8/9-16 + +%ifnidn %3, X + + ; setup loop +%if %3 == 8 + shl r2, 1 ; this allows *16 (i.e. now *8) in lea instructions for the 8-tap filter +%define r2shr 1 +%else ; %3 == 4 +%define r2shr 0 +%endif ; %3 == 8 + lea r4, [r4+r2*8] +%if %2 == 15 + lea r1, [r1+r2*(2>>r2shr)] +%else ; %2 == 19 + lea r1, [r1+r2*(4>>r2shr)] +%endif ; %2 == 15/19 + lea r5, [r5+r2*(2>>r2shr)] + neg r2 + +.loop: +%if %3 == 4 ; filterSize == 4 scaling + ; load 2x4 or 4x4 source pixels into m0/m1 + movsx r0, word [r5+r2*2+0] ; filterPos[0] + movsx r6, word [r5+r2*2+2] ; filterPos[1] + movlh m0, [r3+r0*srcmul] ; src[filterPos[0] + {0,1,2,3}] +%if mmsize == 8 + movlh m1, [r3+r6*srcmul] ; src[filterPos[1] + {0,1,2,3}] +%else ; mmsize == 16 +%if %1 > 8 + movhps m0, [r3+r6*srcmul] ; src[filterPos[1] + {0,1,2,3}] +%else ; %1 == 8 + movd m4, [r3+r6*srcmul] ; src[filterPos[1] + {0,1,2,3}] +%endif + movsx r0, word [r5+r2*2+4] ; filterPos[2] + movsx r6, word [r5+r2*2+6] ; filterPos[3] + movlh m1, [r3+r0*srcmul] ; src[filterPos[2] + {0,1,2,3}] +%if %1 > 8 + movhps m1, [r3+r6*srcmul] ; src[filterPos[3] + {0,1,2,3}] +%else ; %1 == 8 + movd m5, [r3+r6*srcmul] ; src[filterPos[3] + {0,1,2,3}] + punpckldq m0, m4 + punpckldq m1, m5 +%endif ; %1 == 8 && %5 <= ssse +%endif ; mmsize == 8/16 +%if %1 == 8 + punpcklbw m0, m3 ; byte -> word + punpcklbw m1, m3 ; byte -> word +%endif ; %1 == 8 + + ; multiply with filter coefficients +%if %1 == 16 ; pmaddwd needs signed adds, so this moves unsigned -> signed, we'll + ; add back 0x8000 * sum(coeffs) after the horizontal add + psubw m0, m6 + psubw m1, m6 +%endif ; %1 == 16 + pmaddwd m0, [r4+r2*8+mmsize*0] ; *= filter[{0,1,..,6,7}] + pmaddwd m1, [r4+r2*8+mmsize*1] ; *= filter[{8,9,..,14,15}] + + ; add up horizontally (4 srcpix * 4 coefficients -> 1 dstpix) +%if mmsize == 8 ; mmx + movq m4, m0 + punpckldq m0, m1 + punpckhdq m4, m1 + paddd m0, m4 +%elifidn %5, sse2 + mova m4, m0 + shufps m0, m1, 10001000b + shufps m4, m1, 11011101b + paddd m0, m4 +%else ; ssse3/sse4 + phaddd m0, m1 ; filter[{ 0, 1, 2, 3}]*src[filterPos[0]+{0,1,2,3}], + ; filter[{ 4, 5, 6, 7}]*src[filterPos[1]+{0,1,2,3}], + ; filter[{ 8, 9,10,11}]*src[filterPos[2]+{0,1,2,3}], + ; filter[{12,13,14,15}]*src[filterPos[3]+{0,1,2,3}] +%endif ; mmx/sse2/ssse3/sse4 +%else ; %3 == 8, i.e. filterSize == 8 scaling + ; load 2x8 or 4x8 source pixels into m0, m1, m4 and m5 + movsx r0, word [r5+r2*1+0] ; filterPos[0] + movsx r6, word [r5+r2*1+2] ; filterPos[1] + movbh m0, [r3+ r0 *srcmul] ; src[filterPos[0] + {0,1,2,3,4,5,6,7}] +%if mmsize == 8 + movbh m1, [r3+(r0+4)*srcmul] ; src[filterPos[0] + {4,5,6,7}] + movbh m4, [r3+ r6 *srcmul] ; src[filterPos[1] + {0,1,2,3}] + movbh m5, [r3+(r6+4)*srcmul] ; src[filterPos[1] + {4,5,6,7}] +%else ; mmsize == 16 + movbh m1, [r3+ r6 *srcmul] ; src[filterPos[1] + {0,1,2,3,4,5,6,7}] + movsx r0, word [r5+r2*1+4] ; filterPos[2] + movsx r6, word [r5+r2*1+6] ; filterPos[3] + movbh m4, [r3+ r0 *srcmul] ; src[filterPos[2] + {0,1,2,3,4,5,6,7}] + movbh m5, [r3+ r6 *srcmul] ; src[filterPos[3] + {0,1,2,3,4,5,6,7}] +%endif ; mmsize == 8/16 +%if %1 == 8 + punpcklbw m0, m3 ; byte -> word + punpcklbw m1, m3 ; byte -> word + punpcklbw m4, m3 ; byte -> word + punpcklbw m5, m3 ; byte -> word +%endif ; %1 == 8 + + ; multiply +%if %1 == 16 ; pmaddwd needs signed adds, so this moves unsigned -> signed, we'll + ; add back 0x8000 * sum(coeffs) after the horizontal add + psubw m0, m6 + psubw m1, m6 + psubw m4, m6 + psubw m5, m6 +%endif ; %1 == 16 + pmaddwd m0, [r4+r2*8+mmsize*0] ; *= filter[{0,1,..,6,7}] + pmaddwd m1, [r4+r2*8+mmsize*1] ; *= filter[{8,9,..,14,15}] + pmaddwd m4, [r4+r2*8+mmsize*2] ; *= filter[{16,17,..,22,23}] + pmaddwd m5, [r4+r2*8+mmsize*3] ; *= filter[{24,25,..,30,31}] + + ; add up horizontally (8 srcpix * 8 coefficients -> 1 dstpix) +%if mmsize == 8 + paddd m0, m1 + paddd m4, m5 + movq m1, m0 + punpckldq m0, m4 + punpckhdq m1, m4 + paddd m0, m1 +%elifidn %5, sse2 +%if %1 == 8 +%define mex m6 +%else +%define mex m3 +%endif + ; emulate horizontal add as transpose + vertical add + mova mex, m0 + punpckldq m0, m1 + punpckhdq mex, m1 + paddd m0, mex + mova m1, m4 + punpckldq m4, m5 + punpckhdq m1, m5 + paddd m4, m1 + mova m1, m0 + punpcklqdq m0, m4 + punpckhqdq m1, m4 + paddd m0, m1 +%else ; ssse3/sse4 + ; FIXME if we rearrange the filter in pairs of 4, we can + ; load pixels likewise and use 2 x paddd + phaddd instead + ; of 3 x phaddd here, faster on older cpus + phaddd m0, m1 + phaddd m4, m5 + phaddd m0, m4 ; filter[{ 0, 1,..., 6, 7}]*src[filterPos[0]+{0,1,...,6,7}], + ; filter[{ 8, 9,...,14,15}]*src[filterPos[1]+{0,1,...,6,7}], + ; filter[{16,17,...,22,23}]*src[filterPos[2]+{0,1,...,6,7}], + ; filter[{24,25,...,30,31}]*src[filterPos[3]+{0,1,...,6,7}] +%endif ; mmx/sse2/ssse3/sse4 +%endif ; %3 == 4/8 + +%else ; %3 == X, i.e. any filterSize scaling + +%ifidn %4, X4 +%define r6sub 4 +%else ; %4 == X || %4 == X8 +%define r6sub 0 +%endif ; %4 ==/!= X4 +%ifdef ARCH_X86_64 + push r12 + movsxd r6, r6d ; filterSize + lea r12, [r3+(r6-r6sub)*srcmul] ; &src[filterSize&~4] +%define src_reg r11 +%define r1x r10 +%define filter2 r12 +%else ; x86-32 + lea r0, [r3+(r6-r6sub)*srcmul] ; &src[filterSize&~4] + mov r6m, r0 +%define src_reg r3 +%define r1x r1 +%define filter2 r6m +%endif ; x86-32/64 + lea r5, [r5+r2*2] +%if %2 == 15 + lea r1, [r1+r2*2] +%else ; %2 == 19 + lea r1, [r1+r2*4] +%endif ; %2 == 15/19 + movifnidn r1mp, r1 + neg r2 + +.loop: + movsx r0, word [r5+r2*2+0] ; filterPos[0] + movsx r1x, word [r5+r2*2+2] ; filterPos[1] + ; FIXME maybe do 4px/iteration on x86-64 (x86-32 wouldn't have enough regs)? + pxor m4, m4 + pxor m5, m5 + mov src_reg, r3mp + +.innerloop: + ; load 2x4 (mmx) or 2x8 (sse) source pixels into m0/m1 -> m4/m5 + movbh m0, [src_reg+r0 *srcmul] ; src[filterPos[0] + {0,1,2,3(,4,5,6,7)}] + movbh m1, [src_reg+(r1x+r6sub)*srcmul] ; src[filterPos[1] + {0,1,2,3(,4,5,6,7)}] +%if %1 == 8 + punpcklbw m0, m3 + punpcklbw m1, m3 +%endif ; %1 == 8 + + ; multiply +%if %1 == 16 ; pmaddwd needs signed adds, so this moves unsigned -> signed, we'll + ; add back 0x8000 * sum(coeffs) after the horizontal add + psubw m0, m6 + psubw m1, m6 +%endif ; %1 == 16 + pmaddwd m0, [r4 ] ; filter[{0,1,2,3(,4,5,6,7)}] + pmaddwd m1, [r4+(r6+r6sub)*2] ; filter[filtersize+{0,1,2,3(,4,5,6,7)}] + paddd m4, m0 + paddd m5, m1 + add r4, mmsize + add src_reg, srcmul*mmsize/2 + cmp src_reg, filter2 ; while (src += 4) < &src[filterSize] + jl .innerloop + +%ifidn %4, X4 + movsx r1x, word [r5+r2*2+2] ; filterPos[1] + movlh m0, [src_reg+r0 *srcmul] ; split last 4 srcpx of dstpx[0] + sub r1x, r6 ; and first 4 srcpx of dstpx[1] +%if %1 > 8 + movhps m0, [src_reg+(r1x+r6sub)*srcmul] +%else ; %1 == 8 + movd m1, [src_reg+(r1x+r6sub)*srcmul] + punpckldq m0, m1 +%endif ; %1 == 8 && %5 <= ssse +%if %1 == 8 + punpcklbw m0, m3 +%endif ; %1 == 8 +%if %1 == 16 ; pmaddwd needs signed adds, so this moves unsigned -> signed, we'll + ; add back 0x8000 * sum(coeffs) after the horizontal add + psubw m0, m6 +%endif ; %1 == 16 + pmaddwd m0, [r4] +%endif ; %4 == X4 + + lea r4, [r4+(r6+r6sub)*2] + +%if mmsize == 8 ; mmx + movq m0, m4 + punpckldq m4, m5 + punpckhdq m0, m5 + paddd m0, m4 +%else ; mmsize == 16 +%ifidn %5, sse2 + mova m1, m4 + punpcklqdq m4, m5 + punpckhqdq m1, m5 + paddd m4, m1 +%else ; ssse3/sse4 + phaddd m4, m5 +%endif ; sse2/ssse3/sse4 +%ifidn %4, X4 + paddd m4, m0 +%endif ; %3 == X4 +%ifidn %5, sse2 + pshufd m4, m4, 11011000b + movhlps m0, m4 + paddd m0, m4 +%else ; ssse3/sse4 + phaddd m4, m4 + SWAP 0, 4 +%endif ; sse2/ssse3/sse4 +%endif ; mmsize == 8/16 +%endif ; %3 ==/!= X + +%if %1 == 16 ; add 0x8000 * sum(coeffs), i.e. back from signed -> unsigned + paddd m0, m7 +%endif ; %1 == 16 + + ; clip, store + psrad m0, 14 + %1 - %2 +%ifidn %3, X + movifnidn r1, r1mp +%endif ; %3 == X +%if %2 == 15 + packssdw m0, m0 +%ifnidn %3, X + movh [r1+r2*(2>>r2shr)], m0 +%else ; %3 == X + movd [r1+r2*2], m0 +%endif ; %3 ==/!= X +%else ; %2 == 19 +%if mmsize == 8 + PMINSD_MMX m0, m2, m4 +%elifidn %5, sse4 + pminsd m0, m2 +%else ; sse2/ssse3 + cvtdq2ps m0, m0 + minps m0, m2 + cvtps2dq m0, m0 +%endif ; mmx/sse2/ssse3/sse4 +%ifnidn %3, X + mova [r1+r2*(4>>r2shr)], m0 +%else ; %3 == X + movq [r1+r2*4], m0 +%endif ; %3 ==/!= X +%endif ; %2 == 15/19 +%ifnidn %3, X + add r2, (mmsize<srcBpc == 8) { \ + hscalefn = c->dstBpc <= 10 ? ff_hscale8to15_ ## filtersize ## _ ## opt2 : \ + ff_hscale8to19_ ## filtersize ## _ ## opt1; \ + } else if (c->srcBpc == 9) { \ + hscalefn = c->dstBpc <= 10 ? ff_hscale9to15_ ## filtersize ## _ ## opt2 : \ + ff_hscale9to19_ ## filtersize ## _ ## opt1; \ + } else if (c->srcBpc == 10) { \ + hscalefn = c->dstBpc <= 10 ? ff_hscale10to15_ ## filtersize ## _ ## opt2 : \ + ff_hscale10to19_ ## filtersize ## _ ## opt1; \ + } else /* c->srcBpc == 16 */ { \ + hscalefn = c->dstBpc <= 10 ? ff_hscale16to15_ ## filtersize ## _ ## opt2 : \ + ff_hscale16to19_ ## filtersize ## _ ## opt1; \ + } \ +} while (0) +#define ASSIGN_MMX_SCALE_FUNC(hscalefn, filtersize, opt1, opt2) \ + switch (filtersize) { \ + case 4: ASSIGN_SCALE_FUNC2(hscalefn, 4, opt1, opt2); break; \ + case 8: ASSIGN_SCALE_FUNC2(hscalefn, 8, opt1, opt2); break; \ + default: ASSIGN_SCALE_FUNC2(hscalefn, X, opt1, opt2); break; \ + } +#define ASSIGN_VSCALEX_FUNC(vscalefn, opt, do_16_case) \ +switch(c->dstBpc){ \ + case 16: do_16_case; break; \ + case 10: if (!isBE(c->dstFormat)) vscalefn = ff_yuv2planeX_10_ ## opt; break; \ + case 9: if (!isBE(c->dstFormat)) vscalefn = ff_yuv2planeX_9_ ## opt; break; \ + default: vscalefn = ff_yuv2planeX_8_ ## opt; break; \ + } +#define ASSIGN_VSCALE_FUNC(vscalefn, opt1, opt2, opt2chk) \ + switch(c->dstBpc){ \ + case 16: if (!isBE(c->dstFormat)) vscalefn = ff_yuv2plane1_16_ ## opt1; break; \ + case 10: if (!isBE(c->dstFormat) && opt2chk) vscalefn = ff_yuv2plane1_10_ ## opt2; break; \ + case 9: if (!isBE(c->dstFormat) && opt2chk) vscalefn = ff_yuv2plane1_9_ ## opt2; break; \ + default: vscalefn = ff_yuv2plane1_8_ ## opt1; break; \ + } +#if ARCH_X86_32 + if (cpu_flags & AV_CPU_FLAG_MMX) { + ASSIGN_MMX_SCALE_FUNC(c->hyScale, c->hLumFilterSize, mmx, mmx); + ASSIGN_MMX_SCALE_FUNC(c->hcScale, c->hChrFilterSize, mmx, mmx); + ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmx2, cpu_flags & AV_CPU_FLAG_MMX2); + + switch (c->srcFormat) { + case PIX_FMT_Y400A: + c->lumToYV12 = ff_yuyvToY_mmx; + if (c->alpPixBuf) + c->alpToYV12 = ff_uyvyToY_mmx; + break; + case PIX_FMT_YUYV422: + c->lumToYV12 = ff_yuyvToY_mmx; + c->chrToYV12 = ff_yuyvToUV_mmx; + break; + case PIX_FMT_UYVY422: + c->lumToYV12 = ff_uyvyToY_mmx; + c->chrToYV12 = ff_uyvyToUV_mmx; + break; + case PIX_FMT_NV12: + c->chrToYV12 = ff_nv12ToUV_mmx; + break; + case PIX_FMT_NV21: + c->chrToYV12 = ff_nv21ToUV_mmx; + break; + default: + break; + } + } + if (cpu_flags & AV_CPU_FLAG_MMX2) { + ASSIGN_VSCALEX_FUNC(c->yuv2planeX, mmx2,); + } +#endif +#define ASSIGN_SSE_SCALE_FUNC(hscalefn, filtersize, opt1, opt2) \ + switch (filtersize) { \ + case 4: ASSIGN_SCALE_FUNC2(hscalefn, 4, opt1, opt2); break; \ + case 8: ASSIGN_SCALE_FUNC2(hscalefn, 8, opt1, opt2); break; \ + default: if (filtersize & 4) ASSIGN_SCALE_FUNC2(hscalefn, X4, opt1, opt2); \ + else ASSIGN_SCALE_FUNC2(hscalefn, X8, opt1, opt2); \ + break; \ + } + if (cpu_flags & AV_CPU_FLAG_SSE2) { + ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse2, sse2); + ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse2, sse2); + ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse2,); + ASSIGN_VSCALE_FUNC(c->yuv2plane1, sse2, sse2, 1); + + switch (c->srcFormat) { + case PIX_FMT_Y400A: + c->lumToYV12 = ff_yuyvToY_sse2; + if (c->alpPixBuf) + c->alpToYV12 = ff_uyvyToY_sse2; + break; + case PIX_FMT_YUYV422: + c->lumToYV12 = ff_yuyvToY_sse2; + c->chrToYV12 = ff_yuyvToUV_sse2; + break; + case PIX_FMT_UYVY422: + c->lumToYV12 = ff_uyvyToY_sse2; + c->chrToYV12 = ff_uyvyToUV_sse2; + break; + case PIX_FMT_NV12: + c->chrToYV12 = ff_nv12ToUV_sse2; + break; + case PIX_FMT_NV21: + c->chrToYV12 = ff_nv21ToUV_sse2; + break; + } + } + if (cpu_flags & AV_CPU_FLAG_SSSE3) { + ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, ssse3, ssse3); + ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, ssse3, ssse3); + } + if (cpu_flags & AV_CPU_FLAG_SSE4) { + /* Xto15 don't need special sse4 functions */ + ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse4, ssse3); + ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse4, ssse3); + ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse4, + if (!isBE(c->dstFormat)) c->yuv2planeX = ff_yuv2planeX_16_sse4); + if (c->dstBpc == 16 && !isBE(c->dstFormat)) + c->yuv2plane1 = ff_yuv2plane1_16_sse4; + } + + if (cpu_flags & AV_CPU_FLAG_AVX) { + ASSIGN_VSCALEX_FUNC(c->yuv2planeX, avx,); + ASSIGN_VSCALE_FUNC(c->yuv2plane1, avx, avx, 1); + + switch (c->srcFormat) { + case PIX_FMT_YUYV422: + c->chrToYV12 = ff_yuyvToUV_avx; + break; + case PIX_FMT_UYVY422: + c->chrToYV12 = ff_uyvyToUV_avx; + break; + case PIX_FMT_NV12: + c->chrToYV12 = ff_nv12ToUV_avx; + break; + case PIX_FMT_NV21: + c->chrToYV12 = ff_nv21ToUV_avx; + break; + default: + break; + } + } +#endif } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/x86/swscale_template.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/x86/swscale_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/x86/swscale_template.c 2011-06-11 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/x86/swscale_template.c 2012-01-11 00:34:30.000000000 +0000 @@ -35,213 +35,6 @@ #endif #define MOVNTQ(a,b) REAL_MOVNTQ(a,b) -#define YSCALEYUV2YV12X(offset, dest, end, pos) \ - __asm__ volatile(\ - "movq "VROUNDER_OFFSET"(%0), %%mm3 \n\t"\ - "movq %%mm3, %%mm4 \n\t"\ - "lea " offset "(%0), %%"REG_d" \n\t"\ - "mov (%%"REG_d"), %%"REG_S" \n\t"\ - ".p2align 4 \n\t" /* FIXME Unroll? */\ - "1: \n\t"\ - "movq 8(%%"REG_d"), %%mm0 \n\t" /* filterCoeff */\ - "movq (%%"REG_S", %3, 2), %%mm2 \n\t" /* srcData */\ - "movq 8(%%"REG_S", %3, 2), %%mm5 \n\t" /* srcData */\ - "add $16, %%"REG_d" \n\t"\ - "mov (%%"REG_d"), %%"REG_S" \n\t"\ - "test %%"REG_S", %%"REG_S" \n\t"\ - "pmulhw %%mm0, %%mm2 \n\t"\ - "pmulhw %%mm0, %%mm5 \n\t"\ - "paddw %%mm2, %%mm3 \n\t"\ - "paddw %%mm5, %%mm4 \n\t"\ - " jnz 1b \n\t"\ - "psraw $3, %%mm3 \n\t"\ - "psraw $3, %%mm4 \n\t"\ - "packuswb %%mm4, %%mm3 \n\t"\ - MOVNTQ(%%mm3, (%1, %3))\ - "add $8, %3 \n\t"\ - "cmp %2, %3 \n\t"\ - "movq "VROUNDER_OFFSET"(%0), %%mm3 \n\t"\ - "movq %%mm3, %%mm4 \n\t"\ - "lea " offset "(%0), %%"REG_d" \n\t"\ - "mov (%%"REG_d"), %%"REG_S" \n\t"\ - "jb 1b \n\t"\ - :: "r" (&c->redDither),\ - "r" (dest), "g" ((x86_reg)(end)), "r"((x86_reg)(pos))\ - : "%"REG_d, "%"REG_S\ - ); - -static void RENAME(yuv2yuvX)(SwsContext *c, const int16_t *lumFilter, - const int16_t **lumSrc, int lumFilterSize, - const int16_t *chrFilter, const int16_t **chrUSrc, - const int16_t **chrVSrc, - int chrFilterSize, const int16_t **alpSrc, - uint8_t *dest, uint8_t *uDest, uint8_t *vDest, - uint8_t *aDest, int dstW, int chrDstW) -{ - if (uDest) { - x86_reg uv_off = c->uv_off; - YSCALEYUV2YV12X(CHR_MMX_FILTER_OFFSET, uDest, chrDstW, 0) - YSCALEYUV2YV12X(CHR_MMX_FILTER_OFFSET, vDest - uv_off, chrDstW + uv_off, uv_off) - } - if (CONFIG_SWSCALE_ALPHA && aDest) { - YSCALEYUV2YV12X(ALP_MMX_FILTER_OFFSET, aDest, dstW, 0) - } - - YSCALEYUV2YV12X(LUM_MMX_FILTER_OFFSET, dest, dstW, 0) -} - -#define YSCALEYUV2YV12X_ACCURATE(offset, dest, end, pos) \ - __asm__ volatile(\ - "lea " offset "(%0), %%"REG_d" \n\t"\ - "pxor %%mm4, %%mm4 \n\t"\ - "pxor %%mm5, %%mm5 \n\t"\ - "pxor %%mm6, %%mm6 \n\t"\ - "pxor %%mm7, %%mm7 \n\t"\ - "mov (%%"REG_d"), %%"REG_S" \n\t"\ - ".p2align 4 \n\t"\ - "1: \n\t"\ - "movq (%%"REG_S", %3, 2), %%mm0 \n\t" /* srcData */\ - "movq 8(%%"REG_S", %3, 2), %%mm2 \n\t" /* srcData */\ - "mov "STR(APCK_PTR2)"(%%"REG_d"), %%"REG_S" \n\t"\ - "movq (%%"REG_S", %3, 2), %%mm1 \n\t" /* srcData */\ - "movq %%mm0, %%mm3 \n\t"\ - "punpcklwd %%mm1, %%mm0 \n\t"\ - "punpckhwd %%mm1, %%mm3 \n\t"\ - "movq "STR(APCK_COEF)"(%%"REG_d"), %%mm1 \n\t" /* filterCoeff */\ - "pmaddwd %%mm1, %%mm0 \n\t"\ - "pmaddwd %%mm1, %%mm3 \n\t"\ - "paddd %%mm0, %%mm4 \n\t"\ - "paddd %%mm3, %%mm5 \n\t"\ - "movq 8(%%"REG_S", %3, 2), %%mm3 \n\t" /* srcData */\ - "mov "STR(APCK_SIZE)"(%%"REG_d"), %%"REG_S" \n\t"\ - "add $"STR(APCK_SIZE)", %%"REG_d" \n\t"\ - "test %%"REG_S", %%"REG_S" \n\t"\ - "movq %%mm2, %%mm0 \n\t"\ - "punpcklwd %%mm3, %%mm2 \n\t"\ - "punpckhwd %%mm3, %%mm0 \n\t"\ - "pmaddwd %%mm1, %%mm2 \n\t"\ - "pmaddwd %%mm1, %%mm0 \n\t"\ - "paddd %%mm2, %%mm6 \n\t"\ - "paddd %%mm0, %%mm7 \n\t"\ - " jnz 1b \n\t"\ - "psrad $16, %%mm4 \n\t"\ - "psrad $16, %%mm5 \n\t"\ - "psrad $16, %%mm6 \n\t"\ - "psrad $16, %%mm7 \n\t"\ - "movq "VROUNDER_OFFSET"(%0), %%mm0 \n\t"\ - "packssdw %%mm5, %%mm4 \n\t"\ - "packssdw %%mm7, %%mm6 \n\t"\ - "paddw %%mm0, %%mm4 \n\t"\ - "paddw %%mm0, %%mm6 \n\t"\ - "psraw $3, %%mm4 \n\t"\ - "psraw $3, %%mm6 \n\t"\ - "packuswb %%mm6, %%mm4 \n\t"\ - MOVNTQ(%%mm4, (%1, %3))\ - "add $8, %3 \n\t"\ - "cmp %2, %3 \n\t"\ - "lea " offset "(%0), %%"REG_d" \n\t"\ - "pxor %%mm4, %%mm4 \n\t"\ - "pxor %%mm5, %%mm5 \n\t"\ - "pxor %%mm6, %%mm6 \n\t"\ - "pxor %%mm7, %%mm7 \n\t"\ - "mov (%%"REG_d"), %%"REG_S" \n\t"\ - "jb 1b \n\t"\ - :: "r" (&c->redDither),\ - "r" (dest), "g" ((x86_reg)(end)), "r"((x86_reg)(pos))\ - : "%"REG_a, "%"REG_d, "%"REG_S\ - ); - -static void RENAME(yuv2yuvX_ar)(SwsContext *c, const int16_t *lumFilter, - const int16_t **lumSrc, int lumFilterSize, - const int16_t *chrFilter, const int16_t **chrUSrc, - const int16_t **chrVSrc, - int chrFilterSize, const int16_t **alpSrc, - uint8_t *dest, uint8_t *uDest, uint8_t *vDest, - uint8_t *aDest, int dstW, int chrDstW) -{ - if (uDest) { - x86_reg uv_off = c->uv_off; - YSCALEYUV2YV12X_ACCURATE(CHR_MMX_FILTER_OFFSET, uDest, chrDstW, 0) - YSCALEYUV2YV12X_ACCURATE(CHR_MMX_FILTER_OFFSET, vDest - uv_off, chrDstW + uv_off, uv_off) - } - if (CONFIG_SWSCALE_ALPHA && aDest) { - YSCALEYUV2YV12X_ACCURATE(ALP_MMX_FILTER_OFFSET, aDest, dstW, 0) - } - - YSCALEYUV2YV12X_ACCURATE(LUM_MMX_FILTER_OFFSET, dest, dstW, 0) -} - -static void RENAME(yuv2yuv1)(SwsContext *c, const int16_t *lumSrc, - const int16_t *chrUSrc, const int16_t *chrVSrc, - const int16_t *alpSrc, - uint8_t *dest, uint8_t *uDest, uint8_t *vDest, - uint8_t *aDest, int dstW, int chrDstW) -{ - int p= 4; - const int16_t *src[4]= { alpSrc + dstW, lumSrc + dstW, chrUSrc + chrDstW, chrVSrc + chrDstW }; - uint8_t *dst[4]= { aDest, dest, uDest, vDest }; - x86_reg counter[4]= { dstW, dstW, chrDstW, chrDstW }; - - while (p--) { - if (dst[p]) { - __asm__ volatile( - "mov %2, %%"REG_a" \n\t" - ".p2align 4 \n\t" /* FIXME Unroll? */ - "1: \n\t" - "movq (%0, %%"REG_a", 2), %%mm0 \n\t" - "movq 8(%0, %%"REG_a", 2), %%mm1 \n\t" - "psraw $7, %%mm0 \n\t" - "psraw $7, %%mm1 \n\t" - "packuswb %%mm1, %%mm0 \n\t" - MOVNTQ(%%mm0, (%1, %%REGa)) - "add $8, %%"REG_a" \n\t" - "jnc 1b \n\t" - :: "r" (src[p]), "r" (dst[p] + counter[p]), - "g" (-counter[p]) - : "%"REG_a - ); - } - } -} - -static void RENAME(yuv2yuv1_ar)(SwsContext *c, const int16_t *lumSrc, - const int16_t *chrUSrc, const int16_t *chrVSrc, - const int16_t *alpSrc, - uint8_t *dest, uint8_t *uDest, uint8_t *vDest, - uint8_t *aDest, int dstW, int chrDstW) -{ - int p= 4; - const int16_t *src[4]= { alpSrc + dstW, lumSrc + dstW, chrUSrc + chrDstW, chrVSrc + chrDstW }; - uint8_t *dst[4]= { aDest, dest, uDest, vDest }; - x86_reg counter[4]= { dstW, dstW, chrDstW, chrDstW }; - - while (p--) { - if (dst[p]) { - __asm__ volatile( - "mov %2, %%"REG_a" \n\t" - "pcmpeqw %%mm7, %%mm7 \n\t" - "psrlw $15, %%mm7 \n\t" - "psllw $6, %%mm7 \n\t" - ".p2align 4 \n\t" /* FIXME Unroll? */ - "1: \n\t" - "movq (%0, %%"REG_a", 2), %%mm0 \n\t" - "movq 8(%0, %%"REG_a", 2), %%mm1 \n\t" - "paddsw %%mm7, %%mm0 \n\t" - "paddsw %%mm7, %%mm1 \n\t" - "psraw $7, %%mm0 \n\t" - "psraw $7, %%mm1 \n\t" - "packuswb %%mm1, %%mm0 \n\t" - MOVNTQ(%%mm0, (%1, %%REGa)) - "add $8, %%"REG_a" \n\t" - "jnc 1b \n\t" - :: "r" (src[p]), "r" (dst[p] + counter[p]), - "g" (-counter[p]) - : "%"REG_a - ); - } - } -} - #define YSCALEYUV2PACKEDX_UV \ __asm__ volatile(\ "xor %%"REG_a", %%"REG_a" \n\t"\ @@ -467,7 +260,7 @@ { x86_reg dummy=0; x86_reg dstW_reg = dstW; - x86_reg uv_off = c->uv_off << 1; + x86_reg uv_off = c->uv_off_byte; if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) { YSCALEYUV2PACKEDX_ACCURATE @@ -500,7 +293,7 @@ { x86_reg dummy=0; x86_reg dstW_reg = dstW; - x86_reg uv_off = c->uv_off << 1; + x86_reg uv_off = c->uv_off_byte; if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) { YSCALEYUV2PACKEDX @@ -557,7 +350,7 @@ { x86_reg dummy=0; x86_reg dstW_reg = dstW; - x86_reg uv_off = c->uv_off << 1; + x86_reg uv_off = c->uv_off_byte; YSCALEYUV2PACKEDX_ACCURATE YSCALEYUV2RGBX @@ -581,7 +374,7 @@ { x86_reg dummy=0; x86_reg dstW_reg = dstW; - x86_reg uv_off = c->uv_off << 1; + x86_reg uv_off = c->uv_off_byte; YSCALEYUV2PACKEDX YSCALEYUV2RGBX @@ -634,7 +427,7 @@ { x86_reg dummy=0; x86_reg dstW_reg = dstW; - x86_reg uv_off = c->uv_off << 1; + x86_reg uv_off = c->uv_off_byte; YSCALEYUV2PACKEDX_ACCURATE YSCALEYUV2RGBX @@ -658,7 +451,7 @@ { x86_reg dummy=0; x86_reg dstW_reg = dstW; - x86_reg uv_off = c->uv_off << 1; + x86_reg uv_off = c->uv_off_byte; YSCALEYUV2PACKEDX YSCALEYUV2RGBX @@ -791,7 +584,7 @@ { x86_reg dummy=0; x86_reg dstW_reg = dstW; - x86_reg uv_off = c->uv_off << 1; + x86_reg uv_off = c->uv_off_byte; YSCALEYUV2PACKEDX_ACCURATE YSCALEYUV2RGBX @@ -815,7 +608,7 @@ { x86_reg dummy=0; x86_reg dstW_reg = dstW; - x86_reg uv_off = c->uv_off << 1; + x86_reg uv_off = c->uv_off_byte; YSCALEYUV2PACKEDX YSCALEYUV2RGBX @@ -856,7 +649,7 @@ { x86_reg dummy=0; x86_reg dstW_reg = dstW; - x86_reg uv_off = c->uv_off << 1; + x86_reg uv_off = c->uv_off_byte; YSCALEYUV2PACKEDX_ACCURATE /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ @@ -877,7 +670,7 @@ { x86_reg dummy=0; x86_reg dstW_reg = dstW; - x86_reg uv_off = c->uv_off << 1; + x86_reg uv_off = c->uv_off_byte; YSCALEYUV2PACKEDX /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ @@ -895,10 +688,10 @@ "1: \n\t"\ "movq (%2, "#index"), %%mm2 \n\t" /* uvbuf0[eax]*/\ "movq (%3, "#index"), %%mm3 \n\t" /* uvbuf1[eax]*/\ - "add "UV_OFFx2"("#c"), "#index" \n\t" \ + "add "UV_OFF_PX"("#c"), "#index" \n\t" \ "movq (%2, "#index"), %%mm5 \n\t" /* uvbuf0[eax+2048]*/\ "movq (%3, "#index"), %%mm4 \n\t" /* uvbuf1[eax+2048]*/\ - "sub "UV_OFFx2"("#c"), "#index" \n\t" \ + "sub "UV_OFF_PX"("#c"), "#index" \n\t" \ "psubw %%mm3, %%mm2 \n\t" /* uvbuf0[eax] - uvbuf1[eax]*/\ "psubw %%mm4, %%mm5 \n\t" /* uvbuf0[eax+2048] - uvbuf1[eax+2048]*/\ "movq "CHR_MMX_FILTER_OFFSET"+8("#c"), %%mm0 \n\t"\ @@ -969,14 +762,16 @@ /** * vertical bilinear scale YV12 to RGB */ -static void RENAME(yuv2rgb32_2)(SwsContext *c, const uint16_t *buf0, - const uint16_t *buf1, const uint16_t *ubuf0, - const uint16_t *ubuf1, const uint16_t *vbuf0, - const uint16_t *vbuf1, const uint16_t *abuf0, - const uint16_t *abuf1, uint8_t *dest, +static void RENAME(yuv2rgb32_2)(SwsContext *c, const int16_t *buf[2], + const int16_t *ubuf[2], const int16_t *vbuf[2], + const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y) { + const int16_t *buf0 = buf[0], *buf1 = buf[1], + *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; + if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) { + const int16_t *abuf0 = abuf[0], *abuf1 = abuf[1]; #if ARCH_X86_64 __asm__ volatile( YSCALEYUV2RGB(%%r8, %5) @@ -1031,13 +826,14 @@ } } -static void RENAME(yuv2bgr24_2)(SwsContext *c, const uint16_t *buf0, - const uint16_t *buf1, const uint16_t *ubuf0, - const uint16_t *ubuf1, const uint16_t *vbuf0, - const uint16_t *vbuf1, const uint16_t *abuf0, - const uint16_t *abuf1, uint8_t *dest, +static void RENAME(yuv2bgr24_2)(SwsContext *c, const int16_t *buf[2], + const int16_t *ubuf[2], const int16_t *vbuf[2], + const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y) { + const int16_t *buf0 = buf[0], *buf1 = buf[1], + *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; + //Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :( __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" @@ -1053,13 +849,14 @@ ); } -static void RENAME(yuv2rgb555_2)(SwsContext *c, const uint16_t *buf0, - const uint16_t *buf1, const uint16_t *ubuf0, - const uint16_t *ubuf1, const uint16_t *vbuf0, - const uint16_t *vbuf1, const uint16_t *abuf0, - const uint16_t *abuf1, uint8_t *dest, +static void RENAME(yuv2rgb555_2)(SwsContext *c, const int16_t *buf[2], + const int16_t *ubuf[2], const int16_t *vbuf[2], + const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y) { + const int16_t *buf0 = buf[0], *buf1 = buf[1], + *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; + //Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :( __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" @@ -1081,13 +878,14 @@ ); } -static void RENAME(yuv2rgb565_2)(SwsContext *c, const uint16_t *buf0, - const uint16_t *buf1, const uint16_t *ubuf0, - const uint16_t *ubuf1, const uint16_t *vbuf0, - const uint16_t *vbuf1, const uint16_t *abuf0, - const uint16_t *abuf1, uint8_t *dest, +static void RENAME(yuv2rgb565_2)(SwsContext *c, const int16_t *buf[2], + const int16_t *ubuf[2], const int16_t *vbuf[2], + const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y) { + const int16_t *buf0 = buf[0], *buf1 = buf[1], + *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; + //Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :( __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" @@ -1121,10 +919,10 @@ "1: \n\t"\ "movq (%2, "#index"), %%mm2 \n\t" /* uvbuf0[eax]*/\ "movq (%3, "#index"), %%mm3 \n\t" /* uvbuf1[eax]*/\ - "add "UV_OFFx2"("#c"), "#index" \n\t" \ + "add "UV_OFF_PX"("#c"), "#index" \n\t" \ "movq (%2, "#index"), %%mm5 \n\t" /* uvbuf0[eax+2048]*/\ "movq (%3, "#index"), %%mm4 \n\t" /* uvbuf1[eax+2048]*/\ - "sub "UV_OFFx2"("#c"), "#index" \n\t" \ + "sub "UV_OFF_PX"("#c"), "#index" \n\t" \ "psubw %%mm3, %%mm2 \n\t" /* uvbuf0[eax] - uvbuf1[eax]*/\ "psubw %%mm4, %%mm5 \n\t" /* uvbuf0[eax+2048] - uvbuf1[eax+2048]*/\ "movq "CHR_MMX_FILTER_OFFSET"+8("#c"), %%mm0 \n\t"\ @@ -1149,13 +947,14 @@ #define YSCALEYUV2PACKED(index, c) REAL_YSCALEYUV2PACKED(index, c) -static void RENAME(yuv2yuyv422_2)(SwsContext *c, const uint16_t *buf0, - const uint16_t *buf1, const uint16_t *ubuf0, - const uint16_t *ubuf1, const uint16_t *vbuf0, - const uint16_t *vbuf1, const uint16_t *abuf0, - const uint16_t *abuf1, uint8_t *dest, +static void RENAME(yuv2yuyv422_2)(SwsContext *c, const int16_t *buf[2], + const int16_t *ubuf[2], const int16_t *vbuf[2], + const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y) { + const int16_t *buf0 = buf[0], *buf1 = buf[1], + *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; + //Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :( __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" @@ -1175,9 +974,9 @@ ".p2align 4 \n\t"\ "1: \n\t"\ "movq (%2, "#index"), %%mm3 \n\t" /* uvbuf0[eax]*/\ - "add "UV_OFFx2"("#c"), "#index" \n\t" \ + "add "UV_OFF_PX"("#c"), "#index" \n\t" \ "movq (%2, "#index"), %%mm4 \n\t" /* uvbuf0[eax+2048]*/\ - "sub "UV_OFFx2"("#c"), "#index" \n\t" \ + "sub "UV_OFF_PX"("#c"), "#index" \n\t" \ "psraw $4, %%mm3 \n\t" /* uvbuf0[eax] - uvbuf1[eax] >>4*/\ "psraw $4, %%mm4 \n\t" /* uvbuf0[eax+2048] - uvbuf1[eax+2048] >>4*/\ "psubw "U_OFFSET"("#c"), %%mm3 \n\t" /* (U-128)8*/\ @@ -1228,10 +1027,10 @@ "1: \n\t"\ "movq (%2, "#index"), %%mm2 \n\t" /* uvbuf0[eax]*/\ "movq (%3, "#index"), %%mm3 \n\t" /* uvbuf1[eax]*/\ - "add "UV_OFFx2"("#c"), "#index" \n\t" \ + "add "UV_OFF_PX"("#c"), "#index" \n\t" \ "movq (%2, "#index"), %%mm5 \n\t" /* uvbuf0[eax+2048]*/\ "movq (%3, "#index"), %%mm4 \n\t" /* uvbuf1[eax+2048]*/\ - "sub "UV_OFFx2"("#c"), "#index" \n\t" \ + "sub "UV_OFF_PX"("#c"), "#index" \n\t" \ "paddw %%mm2, %%mm3 \n\t" /* uvbuf0[eax] + uvbuf1[eax]*/\ "paddw %%mm5, %%mm4 \n\t" /* uvbuf0[eax+2048] + uvbuf1[eax+2048]*/\ "psrlw $5, %%mm3 \n\t" /*FIXME might overflow*/\ @@ -1288,14 +1087,13 @@ /** * YV12 to RGB without scaling or interpolating */ -static void RENAME(yuv2rgb32_1)(SwsContext *c, const uint16_t *buf0, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, uint8_t *dest, - int dstW, int uvalpha, enum PixelFormat dstFormat, - int flags, int y) +static void RENAME(yuv2rgb32_1)(SwsContext *c, const int16_t *buf0, + const int16_t *ubuf[2], const int16_t *bguf[2], + const int16_t *abuf0, uint8_t *dest, + int dstW, int uvalpha, int y) { - const uint16_t *buf1= buf0; //FIXME needed for RGB1/BGR1 + const int16_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; + const int16_t *buf1= buf0; //FIXME needed for RGB1/BGR1 if (uvalpha < 2048) { // note this is not correct (shifts chrominance by 0.5 pixels) but it is a bit faster if (CONFIG_SWSCALE_ALPHA && c->alpPixBuf) { @@ -1356,14 +1154,13 @@ } } -static void RENAME(yuv2bgr24_1)(SwsContext *c, const uint16_t *buf0, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, uint8_t *dest, - int dstW, int uvalpha, enum PixelFormat dstFormat, - int flags, int y) +static void RENAME(yuv2bgr24_1)(SwsContext *c, const int16_t *buf0, + const int16_t *ubuf[2], const int16_t *bguf[2], + const int16_t *abuf0, uint8_t *dest, + int dstW, int uvalpha, int y) { - const uint16_t *buf1= buf0; //FIXME needed for RGB1/BGR1 + const int16_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; + const int16_t *buf1= buf0; //FIXME needed for RGB1/BGR1 if (uvalpha < 2048) { // note this is not correct (shifts chrominance by 0.5 pixels) but it is a bit faster __asm__ volatile( @@ -1394,14 +1191,13 @@ } } -static void RENAME(yuv2rgb555_1)(SwsContext *c, const uint16_t *buf0, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, uint8_t *dest, - int dstW, int uvalpha, enum PixelFormat dstFormat, - int flags, int y) +static void RENAME(yuv2rgb555_1)(SwsContext *c, const int16_t *buf0, + const int16_t *ubuf[2], const int16_t *bguf[2], + const int16_t *abuf0, uint8_t *dest, + int dstW, int uvalpha, int y) { - const uint16_t *buf1= buf0; //FIXME needed for RGB1/BGR1 + const int16_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; + const int16_t *buf1= buf0; //FIXME needed for RGB1/BGR1 if (uvalpha < 2048) { // note this is not correct (shifts chrominance by 0.5 pixels) but it is a bit faster __asm__ volatile( @@ -1444,14 +1240,13 @@ } } -static void RENAME(yuv2rgb565_1)(SwsContext *c, const uint16_t *buf0, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, uint8_t *dest, - int dstW, int uvalpha, enum PixelFormat dstFormat, - int flags, int y) +static void RENAME(yuv2rgb565_1)(SwsContext *c, const int16_t *buf0, + const int16_t *ubuf[2], const int16_t *bguf[2], + const int16_t *abuf0, uint8_t *dest, + int dstW, int uvalpha, int y) { - const uint16_t *buf1= buf0; //FIXME needed for RGB1/BGR1 + const int16_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; + const int16_t *buf1= buf0; //FIXME needed for RGB1/BGR1 if (uvalpha < 2048) { // note this is not correct (shifts chrominance by 0.5 pixels) but it is a bit faster __asm__ volatile( @@ -1499,9 +1294,9 @@ ".p2align 4 \n\t"\ "1: \n\t"\ "movq (%2, "#index"), %%mm3 \n\t" /* uvbuf0[eax]*/\ - "add "UV_OFFx2"("#c"), "#index" \n\t" \ + "add "UV_OFF_PX"("#c"), "#index" \n\t" \ "movq (%2, "#index"), %%mm4 \n\t" /* uvbuf0[eax+2048]*/\ - "sub "UV_OFFx2"("#c"), "#index" \n\t" \ + "sub "UV_OFF_PX"("#c"), "#index" \n\t" \ "psraw $7, %%mm3 \n\t" \ "psraw $7, %%mm4 \n\t" \ "movq (%0, "#index", 2), %%mm1 \n\t" /*buf0[eax]*/\ @@ -1517,10 +1312,10 @@ "1: \n\t"\ "movq (%2, "#index"), %%mm2 \n\t" /* uvbuf0[eax]*/\ "movq (%3, "#index"), %%mm3 \n\t" /* uvbuf1[eax]*/\ - "add "UV_OFFx2"("#c"), "#index" \n\t" \ + "add "UV_OFF_PX"("#c"), "#index" \n\t" \ "movq (%2, "#index"), %%mm5 \n\t" /* uvbuf0[eax+2048]*/\ "movq (%3, "#index"), %%mm4 \n\t" /* uvbuf1[eax+2048]*/\ - "sub "UV_OFFx2"("#c"), "#index" \n\t" \ + "sub "UV_OFF_PX"("#c"), "#index" \n\t" \ "paddw %%mm2, %%mm3 \n\t" /* uvbuf0[eax] + uvbuf1[eax]*/\ "paddw %%mm5, %%mm4 \n\t" /* uvbuf0[eax+2048] + uvbuf1[eax+2048]*/\ "psrlw $8, %%mm3 \n\t" \ @@ -1531,14 +1326,13 @@ "psraw $7, %%mm7 \n\t" #define YSCALEYUV2PACKED1b(index, c) REAL_YSCALEYUV2PACKED1b(index, c) -static void RENAME(yuv2yuyv422_1)(SwsContext *c, const uint16_t *buf0, - const uint16_t *ubuf0, const uint16_t *ubuf1, - const uint16_t *vbuf0, const uint16_t *vbuf1, - const uint16_t *abuf0, uint8_t *dest, - int dstW, int uvalpha, enum PixelFormat dstFormat, - int flags, int y) +static void RENAME(yuv2yuyv422_1)(SwsContext *c, const int16_t *buf0, + const int16_t *ubuf[2], const int16_t *bguf[2], + const int16_t *abuf0, uint8_t *dest, + int dstW, int uvalpha, int y) { - const uint16_t *buf1= buf0; //FIXME needed for RGB1/BGR1 + const int16_t *ubuf0 = ubuf[0], *ubuf1 = ubuf[1]; + const int16_t *buf1= buf0; //FIXME needed for RGB1/BGR1 if (uvalpha < 2048) { // note this is not correct (shifts chrominance by 0.5 pixels) but it is a bit faster __asm__ volatile( @@ -1567,200 +1361,6 @@ } } -#if !COMPILE_TEMPLATE_MMX2 -//FIXME yuy2* can read up to 7 samples too much - -static void RENAME(yuy2ToY)(uint8_t *dst, const uint8_t *src, - int width, uint32_t *unused) -{ - __asm__ volatile( - "movq "MANGLE(bm01010101)", %%mm2 \n\t" - "mov %0, %%"REG_a" \n\t" - "1: \n\t" - "movq (%1, %%"REG_a",2), %%mm0 \n\t" - "movq 8(%1, %%"REG_a",2), %%mm1 \n\t" - "pand %%mm2, %%mm0 \n\t" - "pand %%mm2, %%mm1 \n\t" - "packuswb %%mm1, %%mm0 \n\t" - "movq %%mm0, (%2, %%"REG_a") \n\t" - "add $8, %%"REG_a" \n\t" - " js 1b \n\t" - : : "g" ((x86_reg)-width), "r" (src+width*2), "r" (dst+width) - : "%"REG_a - ); -} - -static void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, - const uint8_t *src1, const uint8_t *src2, - int width, uint32_t *unused) -{ - __asm__ volatile( - "movq "MANGLE(bm01010101)", %%mm4 \n\t" - "mov %0, %%"REG_a" \n\t" - "1: \n\t" - "movq (%1, %%"REG_a",4), %%mm0 \n\t" - "movq 8(%1, %%"REG_a",4), %%mm1 \n\t" - "psrlw $8, %%mm0 \n\t" - "psrlw $8, %%mm1 \n\t" - "packuswb %%mm1, %%mm0 \n\t" - "movq %%mm0, %%mm1 \n\t" - "psrlw $8, %%mm0 \n\t" - "pand %%mm4, %%mm1 \n\t" - "packuswb %%mm0, %%mm0 \n\t" - "packuswb %%mm1, %%mm1 \n\t" - "movd %%mm0, (%3, %%"REG_a") \n\t" - "movd %%mm1, (%2, %%"REG_a") \n\t" - "add $4, %%"REG_a" \n\t" - " js 1b \n\t" - : : "g" ((x86_reg)-width), "r" (src1+width*4), "r" (dstU+width), "r" (dstV+width) - : "%"REG_a - ); - assert(src1 == src2); -} - -static void RENAME(LEToUV)(uint8_t *dstU, uint8_t *dstV, - const uint8_t *src1, const uint8_t *src2, - int width, uint32_t *unused) -{ - __asm__ volatile( - "mov %0, %%"REG_a" \n\t" - "1: \n\t" - "movq (%1, %%"REG_a",2), %%mm0 \n\t" - "movq 8(%1, %%"REG_a",2), %%mm1 \n\t" - "movq (%2, %%"REG_a",2), %%mm2 \n\t" - "movq 8(%2, %%"REG_a",2), %%mm3 \n\t" - "psrlw $8, %%mm0 \n\t" - "psrlw $8, %%mm1 \n\t" - "psrlw $8, %%mm2 \n\t" - "psrlw $8, %%mm3 \n\t" - "packuswb %%mm1, %%mm0 \n\t" - "packuswb %%mm3, %%mm2 \n\t" - "movq %%mm0, (%3, %%"REG_a") \n\t" - "movq %%mm2, (%4, %%"REG_a") \n\t" - "add $8, %%"REG_a" \n\t" - " js 1b \n\t" - : : "g" ((x86_reg)-width), "r" (src1+width*2), "r" (src2+width*2), "r" (dstU+width), "r" (dstV+width) - : "%"REG_a - ); -} - -/* This is almost identical to the previous, end exists only because - * yuy2ToY/UV)(dst, src+1, ...) would have 100% unaligned accesses. */ -static void RENAME(uyvyToY)(uint8_t *dst, const uint8_t *src, - int width, uint32_t *unused) -{ - __asm__ volatile( - "mov %0, %%"REG_a" \n\t" - "1: \n\t" - "movq (%1, %%"REG_a",2), %%mm0 \n\t" - "movq 8(%1, %%"REG_a",2), %%mm1 \n\t" - "psrlw $8, %%mm0 \n\t" - "psrlw $8, %%mm1 \n\t" - "packuswb %%mm1, %%mm0 \n\t" - "movq %%mm0, (%2, %%"REG_a") \n\t" - "add $8, %%"REG_a" \n\t" - " js 1b \n\t" - : : "g" ((x86_reg)-width), "r" (src+width*2), "r" (dst+width) - : "%"REG_a - ); -} - -static void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, - const uint8_t *src1, const uint8_t *src2, - int width, uint32_t *unused) -{ - __asm__ volatile( - "movq "MANGLE(bm01010101)", %%mm4 \n\t" - "mov %0, %%"REG_a" \n\t" - "1: \n\t" - "movq (%1, %%"REG_a",4), %%mm0 \n\t" - "movq 8(%1, %%"REG_a",4), %%mm1 \n\t" - "pand %%mm4, %%mm0 \n\t" - "pand %%mm4, %%mm1 \n\t" - "packuswb %%mm1, %%mm0 \n\t" - "movq %%mm0, %%mm1 \n\t" - "psrlw $8, %%mm0 \n\t" - "pand %%mm4, %%mm1 \n\t" - "packuswb %%mm0, %%mm0 \n\t" - "packuswb %%mm1, %%mm1 \n\t" - "movd %%mm0, (%3, %%"REG_a") \n\t" - "movd %%mm1, (%2, %%"REG_a") \n\t" - "add $4, %%"REG_a" \n\t" - " js 1b \n\t" - : : "g" ((x86_reg)-width), "r" (src1+width*4), "r" (dstU+width), "r" (dstV+width) - : "%"REG_a - ); - assert(src1 == src2); -} - -static void RENAME(BEToUV)(uint8_t *dstU, uint8_t *dstV, - const uint8_t *src1, const uint8_t *src2, - int width, uint32_t *unused) -{ - __asm__ volatile( - "movq "MANGLE(bm01010101)", %%mm4 \n\t" - "mov %0, %%"REG_a" \n\t" - "1: \n\t" - "movq (%1, %%"REG_a",2), %%mm0 \n\t" - "movq 8(%1, %%"REG_a",2), %%mm1 \n\t" - "movq (%2, %%"REG_a",2), %%mm2 \n\t" - "movq 8(%2, %%"REG_a",2), %%mm3 \n\t" - "pand %%mm4, %%mm0 \n\t" - "pand %%mm4, %%mm1 \n\t" - "pand %%mm4, %%mm2 \n\t" - "pand %%mm4, %%mm3 \n\t" - "packuswb %%mm1, %%mm0 \n\t" - "packuswb %%mm3, %%mm2 \n\t" - "movq %%mm0, (%3, %%"REG_a") \n\t" - "movq %%mm2, (%4, %%"REG_a") \n\t" - "add $8, %%"REG_a" \n\t" - " js 1b \n\t" - : : "g" ((x86_reg)-width), "r" (src1+width*2), "r" (src2+width*2), "r" (dstU+width), "r" (dstV+width) - : "%"REG_a - ); -} - -static av_always_inline void RENAME(nvXXtoUV)(uint8_t *dst1, uint8_t *dst2, - const uint8_t *src, int width) -{ - __asm__ volatile( - "movq "MANGLE(bm01010101)", %%mm4 \n\t" - "mov %0, %%"REG_a" \n\t" - "1: \n\t" - "movq (%1, %%"REG_a",2), %%mm0 \n\t" - "movq 8(%1, %%"REG_a",2), %%mm1 \n\t" - "movq %%mm0, %%mm2 \n\t" - "movq %%mm1, %%mm3 \n\t" - "pand %%mm4, %%mm0 \n\t" - "pand %%mm4, %%mm1 \n\t" - "psrlw $8, %%mm2 \n\t" - "psrlw $8, %%mm3 \n\t" - "packuswb %%mm1, %%mm0 \n\t" - "packuswb %%mm3, %%mm2 \n\t" - "movq %%mm0, (%2, %%"REG_a") \n\t" - "movq %%mm2, (%3, %%"REG_a") \n\t" - "add $8, %%"REG_a" \n\t" - " js 1b \n\t" - : : "g" ((x86_reg)-width), "r" (src+width*2), "r" (dst1+width), "r" (dst2+width) - : "%"REG_a - ); -} - -static void RENAME(nv12ToUV)(uint8_t *dstU, uint8_t *dstV, - const uint8_t *src1, const uint8_t *src2, - int width, uint32_t *unused) -{ - RENAME(nvXXtoUV)(dstU, dstV, src1, width); -} - -static void RENAME(nv21ToUV)(uint8_t *dstU, uint8_t *dstV, - const uint8_t *src1, const uint8_t *src2, - int width, uint32_t *unused) -{ - RENAME(nvXXtoUV)(dstV, dstU, src1, width); -} -#endif /* !COMPILE_TEMPLATE_MMX2 */ - static av_always_inline void RENAME(bgr24ToY_mmx)(uint8_t *dst, const uint8_t *src, int width, enum PixelFormat srcFormat) { @@ -1903,165 +1503,6 @@ RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_RGB24); } -#if !COMPILE_TEMPLATE_MMX2 -// bilinear / bicubic scaling -static void RENAME(hScale)(int16_t *dst, int dstW, - const uint8_t *src, int srcW, - int xInc, const int16_t *filter, - const int16_t *filterPos, int filterSize) -{ - assert(filterSize % 4 == 0 && filterSize>0); - if (filterSize==4) { // Always true for upscaling, sometimes for down, too. - x86_reg counter= -2*dstW; - filter-= counter*2; - filterPos-= counter/2; - dst-= counter/2; - __asm__ volatile( -#if defined(PIC) - "push %%"REG_b" \n\t" -#endif - "pxor %%mm7, %%mm7 \n\t" - "push %%"REG_BP" \n\t" // we use 7 regs here ... - "mov %%"REG_a", %%"REG_BP" \n\t" - ".p2align 4 \n\t" - "1: \n\t" - "movzwl (%2, %%"REG_BP"), %%eax \n\t" - "movzwl 2(%2, %%"REG_BP"), %%ebx \n\t" - "movq (%1, %%"REG_BP", 4), %%mm1 \n\t" - "movq 8(%1, %%"REG_BP", 4), %%mm3 \n\t" - "movd (%3, %%"REG_a"), %%mm0 \n\t" - "movd (%3, %%"REG_b"), %%mm2 \n\t" - "punpcklbw %%mm7, %%mm0 \n\t" - "punpcklbw %%mm7, %%mm2 \n\t" - "pmaddwd %%mm1, %%mm0 \n\t" - "pmaddwd %%mm2, %%mm3 \n\t" - "movq %%mm0, %%mm4 \n\t" - "punpckldq %%mm3, %%mm0 \n\t" - "punpckhdq %%mm3, %%mm4 \n\t" - "paddd %%mm4, %%mm0 \n\t" - "psrad $7, %%mm0 \n\t" - "packssdw %%mm0, %%mm0 \n\t" - "movd %%mm0, (%4, %%"REG_BP") \n\t" - "add $4, %%"REG_BP" \n\t" - " jnc 1b \n\t" - - "pop %%"REG_BP" \n\t" -#if defined(PIC) - "pop %%"REG_b" \n\t" -#endif - : "+a" (counter) - : "c" (filter), "d" (filterPos), "S" (src), "D" (dst) -#if !defined(PIC) - : "%"REG_b -#endif - ); - } else if (filterSize==8) { - x86_reg counter= -2*dstW; - filter-= counter*4; - filterPos-= counter/2; - dst-= counter/2; - __asm__ volatile( -#if defined(PIC) - "push %%"REG_b" \n\t" -#endif - "pxor %%mm7, %%mm7 \n\t" - "push %%"REG_BP" \n\t" // we use 7 regs here ... - "mov %%"REG_a", %%"REG_BP" \n\t" - ".p2align 4 \n\t" - "1: \n\t" - "movzwl (%2, %%"REG_BP"), %%eax \n\t" - "movzwl 2(%2, %%"REG_BP"), %%ebx \n\t" - "movq (%1, %%"REG_BP", 8), %%mm1 \n\t" - "movq 16(%1, %%"REG_BP", 8), %%mm3 \n\t" - "movd (%3, %%"REG_a"), %%mm0 \n\t" - "movd (%3, %%"REG_b"), %%mm2 \n\t" - "punpcklbw %%mm7, %%mm0 \n\t" - "punpcklbw %%mm7, %%mm2 \n\t" - "pmaddwd %%mm1, %%mm0 \n\t" - "pmaddwd %%mm2, %%mm3 \n\t" - - "movq 8(%1, %%"REG_BP", 8), %%mm1 \n\t" - "movq 24(%1, %%"REG_BP", 8), %%mm5 \n\t" - "movd 4(%3, %%"REG_a"), %%mm4 \n\t" - "movd 4(%3, %%"REG_b"), %%mm2 \n\t" - "punpcklbw %%mm7, %%mm4 \n\t" - "punpcklbw %%mm7, %%mm2 \n\t" - "pmaddwd %%mm1, %%mm4 \n\t" - "pmaddwd %%mm2, %%mm5 \n\t" - "paddd %%mm4, %%mm0 \n\t" - "paddd %%mm5, %%mm3 \n\t" - "movq %%mm0, %%mm4 \n\t" - "punpckldq %%mm3, %%mm0 \n\t" - "punpckhdq %%mm3, %%mm4 \n\t" - "paddd %%mm4, %%mm0 \n\t" - "psrad $7, %%mm0 \n\t" - "packssdw %%mm0, %%mm0 \n\t" - "movd %%mm0, (%4, %%"REG_BP") \n\t" - "add $4, %%"REG_BP" \n\t" - " jnc 1b \n\t" - - "pop %%"REG_BP" \n\t" -#if defined(PIC) - "pop %%"REG_b" \n\t" -#endif - : "+a" (counter) - : "c" (filter), "d" (filterPos), "S" (src), "D" (dst) -#if !defined(PIC) - : "%"REG_b -#endif - ); - } else { - const uint8_t *offset = src+filterSize; - x86_reg counter= -2*dstW; - //filter-= counter*filterSize/2; - filterPos-= counter/2; - dst-= counter/2; - __asm__ volatile( - "pxor %%mm7, %%mm7 \n\t" - ".p2align 4 \n\t" - "1: \n\t" - "mov %2, %%"REG_c" \n\t" - "movzwl (%%"REG_c", %0), %%eax \n\t" - "movzwl 2(%%"REG_c", %0), %%edx \n\t" - "mov %5, %%"REG_c" \n\t" - "pxor %%mm4, %%mm4 \n\t" - "pxor %%mm5, %%mm5 \n\t" - "2: \n\t" - "movq (%1), %%mm1 \n\t" - "movq (%1, %6), %%mm3 \n\t" - "movd (%%"REG_c", %%"REG_a"), %%mm0 \n\t" - "movd (%%"REG_c", %%"REG_d"), %%mm2 \n\t" - "punpcklbw %%mm7, %%mm0 \n\t" - "punpcklbw %%mm7, %%mm2 \n\t" - "pmaddwd %%mm1, %%mm0 \n\t" - "pmaddwd %%mm2, %%mm3 \n\t" - "paddd %%mm3, %%mm5 \n\t" - "paddd %%mm0, %%mm4 \n\t" - "add $8, %1 \n\t" - "add $4, %%"REG_c" \n\t" - "cmp %4, %%"REG_c" \n\t" - " jb 2b \n\t" - "add %6, %1 \n\t" - "movq %%mm4, %%mm0 \n\t" - "punpckldq %%mm5, %%mm4 \n\t" - "punpckhdq %%mm5, %%mm0 \n\t" - "paddd %%mm0, %%mm4 \n\t" - "psrad $7, %%mm4 \n\t" - "packssdw %%mm4, %%mm4 \n\t" - "mov %3, %%"REG_a" \n\t" - "movd %%mm4, (%%"REG_a", %0) \n\t" - "add $4, %0 \n\t" - " jnc 1b \n\t" - - : "+r" (counter), "+r" (filter) - : "m" (filterPos), "m" (dst), "m"(offset), - "m" (src), "r" ((x86_reg)filterSize*2) - : "%"REG_a, "%"REG_c, "%"REG_d - ); - } -} -#endif /* !COMPILE_TEMPLATE_MMX2 */ - #if COMPILE_TEMPLATE_MMX2 static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst, int dstWidth, const uint8_t *src, @@ -2072,12 +1513,24 @@ void *mmx2FilterCode= c->lumMmx2FilterCode; int i; #if defined(PIC) - DECLARE_ALIGNED(8, uint64_t, ebxsave); + uint64_t ebxsave; +#endif +#if ARCH_X86_64 + uint64_t retsave; #endif __asm__ volatile( #if defined(PIC) "mov %%"REG_b", %5 \n\t" +#if ARCH_X86_64 + "mov -8(%%rsp), %%"REG_a" \n\t" + "mov %%"REG_a", %6 \n\t" +#endif +#else +#if ARCH_X86_64 + "mov -8(%%rsp), %%"REG_a" \n\t" + "mov %%"REG_a", %5 \n\t" +#endif #endif "pxor %%mm7, %%mm7 \n\t" "mov %0, %%"REG_c" \n\t" @@ -2119,12 +1572,24 @@ #if defined(PIC) "mov %5, %%"REG_b" \n\t" +#if ARCH_X86_64 + "mov %6, %%"REG_a" \n\t" + "mov %%"REG_a", -8(%%rsp) \n\t" +#endif +#else +#if ARCH_X86_64 + "mov %5, %%"REG_a" \n\t" + "mov %%"REG_a", -8(%%rsp) \n\t" +#endif #endif :: "m" (src), "m" (dst), "m" (filter), "m" (filterPos), "m" (mmx2FilterCode) #if defined(PIC) ,"m" (ebxsave) #endif +#if ARCH_X86_64 + ,"m"(retsave) +#endif : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D #if !defined(PIC) ,"%"REG_b @@ -2146,10 +1611,22 @@ #if defined(PIC) DECLARE_ALIGNED(8, uint64_t, ebxsave); #endif +#if ARCH_X86_64 + DECLARE_ALIGNED(8, uint64_t, retsave); +#endif __asm__ volatile( #if defined(PIC) "mov %%"REG_b", %7 \n\t" +#if ARCH_X86_64 + "mov -8(%%rsp), %%"REG_a" \n\t" + "mov %%"REG_a", %8 \n\t" +#endif +#else +#if ARCH_X86_64 + "mov -8(%%rsp), %%"REG_a" \n\t" + "mov %%"REG_a", %7 \n\t" +#endif #endif "pxor %%mm7, %%mm7 \n\t" "mov %0, %%"REG_c" \n\t" @@ -2179,12 +1656,24 @@ #if defined(PIC) "mov %7, %%"REG_b" \n\t" +#if ARCH_X86_64 + "mov %8, %%"REG_a" \n\t" + "mov %%"REG_a", -8(%%rsp) \n\t" +#endif +#else +#if ARCH_X86_64 + "mov %7, %%"REG_a" \n\t" + "mov %%"REG_a", -8(%%rsp) \n\t" +#endif #endif :: "m" (src1), "m" (dst1), "m" (filter), "m" (filterPos), "m" (mmx2FilterCode), "m" (src2), "m"(dst2) #if defined(PIC) ,"m" (ebxsave) #endif +#if ARCH_X86_64 + ,"m"(retsave) +#endif : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D #if !defined(PIC) ,"%"REG_b @@ -2203,11 +1692,10 @@ enum PixelFormat srcFormat = c->srcFormat, dstFormat = c->dstFormat; - if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat)) { + if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) && + dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21) { if (!(c->flags & SWS_BITEXACT)) { if (c->flags & SWS_ACCURATE_RND) { - c->yuv2yuv1 = RENAME(yuv2yuv1_ar ); - c->yuv2yuvX = RENAME(yuv2yuvX_ar ); if (!(c->flags & SWS_FULL_CHR_H_INT)) { switch (c->dstFormat) { case PIX_FMT_RGB32: c->yuv2packedX = RENAME(yuv2rgb32_X_ar); break; @@ -2219,8 +1707,6 @@ } } } else { - c->yuv2yuv1 = RENAME(yuv2yuv1 ); - c->yuv2yuvX = RENAME(yuv2yuvX ); if (!(c->flags & SWS_FULL_CHR_H_INT)) { switch (c->dstFormat) { case PIX_FMT_RGB32: c->yuv2packedX = RENAME(yuv2rgb32_X); break; @@ -2261,10 +1747,7 @@ } } -#if !COMPILE_TEMPLATE_MMX2 - c->hScale = RENAME(hScale ); -#endif /* !COMPILE_TEMPLATE_MMX2 */ - + if (c->srcBpc == 8 && c->dstBpc <= 10) { // Use the new MMX scaler if the MMX2 one can't be used (it is faster than the x86 ASM one). #if COMPILE_TEMPLATE_MMX2 if (c->flags & SWS_FAST_BILINEAR && c->canMMX2BeUsed) @@ -2278,22 +1761,8 @@ #if COMPILE_TEMPLATE_MMX2 } #endif /* COMPILE_TEMPLATE_MMX2 */ - -#if !COMPILE_TEMPLATE_MMX2 - switch(srcFormat) { - case PIX_FMT_YUYV422 : c->chrToYV12 = RENAME(yuy2ToUV); break; - case PIX_FMT_UYVY422 : c->chrToYV12 = RENAME(uyvyToUV); break; - case PIX_FMT_NV12 : c->chrToYV12 = RENAME(nv12ToUV); break; - case PIX_FMT_NV21 : c->chrToYV12 = RENAME(nv21ToUV); break; - case PIX_FMT_YUV420P16BE: - case PIX_FMT_YUV422P16BE: - case PIX_FMT_YUV444P16BE: c->chrToYV12 = RENAME(BEToUV); break; - case PIX_FMT_YUV420P16LE: - case PIX_FMT_YUV422P16LE: - case PIX_FMT_YUV444P16LE: c->chrToYV12 = RENAME(LEToUV); break; - default: break; } -#endif /* !COMPILE_TEMPLATE_MMX2 */ + if (!c->chrSrcHSubSample) { switch(srcFormat) { case PIX_FMT_BGR24 : c->chrToYV12 = RENAME(bgr24ToUV); break; @@ -2303,29 +1772,8 @@ } switch (srcFormat) { -#if !COMPILE_TEMPLATE_MMX2 - case PIX_FMT_YUYV422 : - case PIX_FMT_YUV420P16BE: - case PIX_FMT_YUV422P16BE: - case PIX_FMT_YUV444P16BE: - case PIX_FMT_Y400A : - case PIX_FMT_GRAY16BE : c->lumToYV12 = RENAME(yuy2ToY); break; - case PIX_FMT_UYVY422 : - case PIX_FMT_YUV420P16LE: - case PIX_FMT_YUV422P16LE: - case PIX_FMT_YUV444P16LE: - case PIX_FMT_GRAY16LE : c->lumToYV12 = RENAME(uyvyToY); break; -#endif /* !COMPILE_TEMPLATE_MMX2 */ case PIX_FMT_BGR24 : c->lumToYV12 = RENAME(bgr24ToY); break; case PIX_FMT_RGB24 : c->lumToYV12 = RENAME(rgb24ToY); break; default: break; } -#if !COMPILE_TEMPLATE_MMX2 - if (c->alpPixBuf) { - switch (srcFormat) { - case PIX_FMT_Y400A : c->alpToYV12 = RENAME(yuy2ToY); break; - default: break; - } - } -#endif /* !COMPILE_TEMPLATE_MMX2 */ } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/yuv2rgb.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/yuv2rgb.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/libswscale/yuv2rgb.c 2011-05-31 02:05:07.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/libswscale/yuv2rgb.c 2012-01-11 00:34:30.000000000 +0000 @@ -788,8 +788,8 @@ 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) + (needAlpha ? 0 : (255 << abase)); + unsigned yval = av_clip_uint8((yb + 0x8000) >> 16); + y_table32[i ] = (yval << rbase) + (needAlpha ? 0 : (255u << abase)); y_table32[i+1024] = yval << gbase; y_table32[i+2048] = yval << bbase; yb += cy; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/Makefile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/Makefile 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/Makefile 2012-01-11 00:34:30.000000000 +0000 @@ -1,31 +1,74 @@ include config.mak -SRC_DIR = $(SRC_PATH_BARE) +vpath %.c $(SRC_PATH) +vpath %.h $(SRC_PATH) +vpath %.S $(SRC_PATH) +vpath %.asm $(SRC_PATH) +vpath %.v $(SRC_PATH) +vpath %.texi $(SRC_PATH) + +ifndef V +Q = @ +ECHO = printf "$(1)\t%s\n" $(2) +BRIEF = CC AS YASM AR LD HOSTCC +SILENT = DEPCC YASMDEP RM RANLIB +MSG = $@ +M = @$(call ECHO,$(TAG),$@); +$(foreach VAR,$(BRIEF), \ + $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR)))) +$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR)))) +$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_PATH)/%=%)); $(INSTALL)) +endif + +ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale + +IFLAGS := -I. -I$(SRC_PATH) +CPPFLAGS := $(IFLAGS) $(CPPFLAGS) +CFLAGS += $(ECFLAGS) +CCFLAGS = $(CFLAGS) +YASMFLAGS += $(IFLAGS) -I$(SRC_PATH)/libavutil/x86/ -Pconfig.asm +HOSTCFLAGS += $(IFLAGS) +LDFLAGS := $(ALLFFLIBS:%=-Llib%) $(LDFLAGS) + +define COMPILE + $($(1)DEP) + $($(1)) $(CPPFLAGS) $($(1)FLAGS) $($(1)_DEPFLAGS) -c $($(1)_O) $< +endef + +COMPILE_C = $(call COMPILE,CC) +COMPILE_S = $(call COMPILE,AS) + +%.o: %.c + $(COMPILE_C) + +%.o: %.S + $(COMPILE_S) + +%.ho: %.h + $(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $< -vpath %.c $(SRC_DIR) -vpath %.h $(SRC_DIR) -vpath %.S $(SRC_DIR) -vpath %.asm $(SRC_DIR) -vpath %.v $(SRC_DIR) -vpath %.texi $(SRC_PATH_BARE) +%.ver: %.v + $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@ + +%.c %.h: TAG = GEN PROGS-$(CONFIG_FFMPEG) += ffmpeg -PROGS-$(CONFIG_FFPLAY) += ffplay -PROGS-$(CONFIG_FFPROBE) += ffprobe -PROGS-$(CONFIG_FFSERVER) += ffserver +PROGS-$(CONFIG_AVCONV) += avconv +PROGS-$(CONFIG_AVPLAY) += avplay +PROGS-$(CONFIG_AVPROBE) += avprobe +PROGS-$(CONFIG_AVSERVER) += avserver PROGS := $(PROGS-yes:%=%$(EXESUF)) OBJS = $(PROGS-yes:%=%.o) cmdutils.o -TOOLS = $(addprefix tools/, $(addsuffix $(EXESUF), cws2fws graph2dot lavfi-showfiltfmts pktdumper probetest qt-faststart trasher)) TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64 HOSTPROGS := $(TESTTOOLS:%=tests/%) +TOOLS = qt-faststart trasher +TOOLS-$(CONFIG_ZLIB) += cws2fws -BASENAMES = ffmpeg ffplay ffprobe ffserver +BASENAMES = ffmpeg avconv avplay avprobe avserver ALLPROGS = $(BASENAMES:%=%$(EXESUF)) ALLMANPAGES = $(BASENAMES:%=%.1) -ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale - FFLIBS-$(CONFIG_AVDEVICE) += avdevice FFLIBS-$(CONFIG_AVFILTER) += avfilter FFLIBS-$(CONFIG_AVFORMAT) += avformat @@ -35,27 +78,31 @@ FFLIBS := avutil -DATA_FILES := $(wildcard $(SRC_DIR)/ffpresets/*.ffpreset) +DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.avpreset) SKIPHEADERS = cmdutils_common_opts.h -include common.mak +include $(SRC_PATH)/common.mak -FF_LDFLAGS := $(FFLDFLAGS) FF_EXTRALIBS := $(FFEXTRALIBS) FF_DEP_LIBS := $(DEP_LIBS) -all: $(FF_DEP_LIBS) $(PROGS) +all: $(PROGS) + +$(TOOLS): %$(EXESUF): %.o + $(LD) $(LDFLAGS) -o $@ $< $(ELIBS) + +tools/cws2fws$(EXESUF): ELIBS = -lz config.h: .config -.config: $(wildcard $(FFLIBS:%=$(SRC_DIR)/lib%/all*.c)) +.config: $(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c)) @-tput bold 2>/dev/null @-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n' @-tput sgr0 2>/dev/null SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTPROGS EXAMPLES SKIPHEADERS \ ALTIVEC-OBJS MMX-OBJS NEON-OBJS X86-OBJS YASM-OBJS-FFT YASM-OBJS \ - HOSTPROGS BUILT_HEADERS TESTOBJS ARCH_HEADERS ARMV6-OBJS + HOSTPROGS BUILT_HEADERS TESTOBJS ARCH_HEADERS ARMV6-OBJS TOOLS define RESET $(1) := @@ -65,30 +112,25 @@ define DOSUBDIR $(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V)))) SUBDIR := $(1)/ -include $(1)/Makefile +include $(SRC_PATH)/$(1)/Makefile +include $(SRC_PATH)/library.mak endef $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D)))) -ffplay.o: CFLAGS += $(SDL_CFLAGS) -ffplay$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS) -ffserver$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS) +avplay.o: CFLAGS += $(SDL_CFLAGS) +avplay$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS) +avserver$(EXESUF): LDFLAGS += $(AVSERVERLDFLAGS) $(PROGS): %$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS) - $(LD) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS) + $(LD) $(LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS) -alltools: $(TOOLS) - -tools/%$(EXESUF): tools/%.o - $(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS) - -tools/%.o: tools/%.c - $(CC) $(CPPFLAGS) $(CFLAGS) -c $(CC_O) $< +OBJDIRS += tools -include $(wildcard tools/*.d) -VERSION_SH = $(SRC_PATH_BARE)/version.sh -GIT_LOG = $(SRC_PATH_BARE)/.git/logs/HEAD +VERSION_SH = $(SRC_PATH)/version.sh +GIT_LOG = $(SRC_PATH)/.git/logs/HEAD .version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak .version: M=@ @@ -140,10 +182,19 @@ config: $(SRC_PATH)/configure $(value LIBAV_CONFIGURATION) -check: test checkheaders +include $(SRC_PATH)/doc/Makefile +include $(SRC_PATH)/tests/Makefile + +$(sort $(OBJDIRS)): + $(Q)mkdir -p $@ + +# Dummy rule to stop make trying to rebuild removed or renamed headers +%.h: + @: -include doc/Makefile -include tests/Makefile +# Disable suffix rules. Most of the builtin rules are suffix rules, +# so this saves some time on slow systems. +.SUFFIXES: -.PHONY: all alltools *clean check config examples install* +.PHONY: all all-yes alltools *clean config examples install* .PHONY: testprogs uninstall* diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libvpx-1080p50_60.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libvpx-1080p50_60.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libvpx-1080p50_60.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libvpx-1080p50_60.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,17 @@ +g=120 +lag-in-frames=25 +deadline=good +cpu-used=0 +profile=1 +qmax=51 +qmin=11 +slices=4 +b=2M + +#ignored unless using -pass 2 +maxrate=24M +minrate=100k +auto-alt-ref=1 +arnr-maxframes=7 +arnr-strength=5 +arnr-type=centered diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libvpx-1080p.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libvpx-1080p.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libvpx-1080p.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libvpx-1080p.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,17 @@ +g=120 +lag-in-frames=16 +deadline=good +cpu-used=0 +profile=1 +qmax=51 +qmin=11 +slices=4 +b=2M + +#ignored unless using -pass 2 +maxrate=24M +minrate=100k +auto-alt-ref=1 +arnr-maxframes=7 +arnr-strength=5 +arnr-type=centered diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libvpx-360p.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libvpx-360p.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libvpx-360p.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libvpx-360p.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,16 @@ +g=120 +lag-in-frames=16 +deadline=good +cpu-used=0 +profile=0 +qmax=63 +qmin=0 +b=768k + +#ignored unless using -pass 2 +maxrate=1.5M +minrate=40k +auto-alt-ref=1 +arnr-maxframes=7 +arnr-strength=5 +arnr-type=centered diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libvpx-720p50_60.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libvpx-720p50_60.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libvpx-720p50_60.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libvpx-720p50_60.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,17 @@ +g=120 +lag-in-frames=25 +deadline=good +cpu-used=0 +profile=0 +qmax=51 +qmin=11 +slices=4 +b=2M + +#ignored unless using -pass 2 +maxrate=24M +minrate=100k +auto-alt-ref=1 +arnr-maxframes=7 +arnr-strength=5 +arnr-type=centered diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libvpx-720p.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libvpx-720p.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libvpx-720p.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libvpx-720p.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,17 @@ +g=120 +lag-in-frames=16 +deadline=good +cpu-used=0 +profile=0 +qmax=51 +qmin=11 +slices=4 +b=2M + +#ignored unless using -pass 2 +maxrate=24M +minrate=100k +auto-alt-ref=1 +arnr-maxframes=7 +arnr-strength=5 +arnr-type=centered diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-baseline.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-baseline.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-baseline.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-baseline.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +profile=baseline diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-fast.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-fast.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-fast.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-fast.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +preset=fast diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-faster.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-faster.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-faster.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-faster.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +preset=faster diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-faster_firstpass.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-faster_firstpass.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-faster_firstpass.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-faster_firstpass.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=faster +fastfirstpass=1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-fast_firstpass.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-fast_firstpass.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-fast_firstpass.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-fast_firstpass.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=fast +fastfirstpass=1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-ipod320.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-ipod320.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-ipod320.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-ipod320.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +profile=baseline +level=13 +maxrate=768000 +bufsize=3000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-ipod640.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-ipod640.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-ipod640.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-ipod640.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +profile=baseline +level=30 +maxrate=10000000 +bufsize=10000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_fast.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_fast.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_fast.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_fast.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=fast +qp=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_max.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_max.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_max.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_max.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=placebo +qp=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_medium.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_medium.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_medium.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_medium.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=medium +qp=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_slow.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_slow.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_slow.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_slow.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=slow +qp=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_slower.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_slower.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_slower.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_slower.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=slower +qp=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_ultrafast.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_ultrafast.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-lossless_ultrafast.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-lossless_ultrafast.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=ultrafast +qp=0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-main.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-main.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-main.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-main.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +profile=main diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-medium.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-medium.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-medium.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-medium.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +preset=medium diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-medium_firstpass.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-medium_firstpass.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-medium_firstpass.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-medium_firstpass.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=medium +fastfirstpass=1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-placebo.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-placebo.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-placebo.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-placebo.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +preset=placebo diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-placebo_firstpass.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-placebo_firstpass.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-placebo_firstpass.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-placebo_firstpass.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=placebo +fastfirstpass=1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-slow.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-slow.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-slow.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-slow.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +preset=slow diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-slower.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-slower.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-slower.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-slower.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +preset=slower diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-slower_firstpass.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-slower_firstpass.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-slower_firstpass.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-slower_firstpass.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=slower +fastfirstpass=1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-slow_firstpass.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-slow_firstpass.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-slow_firstpass.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-slow_firstpass.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=slow +fastfirstpass=1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-superfast.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-superfast.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-superfast.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-superfast.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +preset=superfast diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-superfast_firstpass.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-superfast_firstpass.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-superfast_firstpass.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-superfast_firstpass.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=superfast +fastfirstpass=1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-ultrafast.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-ultrafast.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-ultrafast.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-ultrafast.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +preset=ultrafast diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-ultrafast_firstpass.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-ultrafast_firstpass.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-ultrafast_firstpass.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-ultrafast_firstpass.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=ultrafast +fastfirstpass=1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-veryfast.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-veryfast.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-veryfast.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-veryfast.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +preset=veryfast diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-veryfast_firstpass.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-veryfast_firstpass.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-veryfast_firstpass.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-veryfast_firstpass.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=veryfast +fastfirstpass=1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-veryslow.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-veryslow.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-veryslow.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-veryslow.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +preset=veryslow diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-veryslow_firstpass.avpreset mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-veryslow_firstpass.avpreset --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/presets/libx264-veryslow_firstpass.avpreset 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/presets/libx264-veryslow_firstpass.avpreset 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +preset=veryslow +fastfirstpass=1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/RELEASE mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/RELEASE --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/RELEASE 2011-06-21 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/RELEASE 2012-01-11 00:34:30.000000000 +0000 @@ -1 +1 @@ -0.7 +0.8_beta1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/subdir.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/subdir.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/subdir.mak 2011-06-05 02:05:08.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/subdir.mak 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -SRC_DIR := $(SRC_PATH_BARE)/lib$(NAME) - -include $(SUBDIR)../common.mak - -LIBVERSION := $(lib$(NAME)_VERSION) -LIBMAJOR := $(lib$(NAME)_VERSION_MAJOR) -INCINSTDIR := $(INCDIR)/lib$(NAME) -THIS_LIB := $(SUBDIR)$($(CONFIG_SHARED:yes=S)LIBNAME) - -all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME) -all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME) - -$(SUBDIR)%-test.o: $(SUBDIR)%-test.c - $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $(CC_O) $^ - -$(SUBDIR)%-test.o: $(SUBDIR)%.c - $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $(CC_O) $^ - -$(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm - $(YASMDEP) $(YASMFLAGS) -I $( $(@:.o=.d) - $(YASM) $(YASMFLAGS) -I $(> $logfile - echo $i >> $logfile - ./ffmpeg -flags +bitexact -i $i -acodec copy -vcodec copy -y first.nut - ./ffmpeg -flags +bitexact -i first.nut -acodec copy -vcodec copy -y second.nut - cmp first.nut second.nut >> $logfile - md5sum first.nut >> $logfile -done - -if diff -u -w "$reffile" "$logfile" ; then - echo - echo copy regression test: success - exit 0 -else - echo - echo copy regression test: error - exit 1 -fi diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/copy.regression.ref mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/copy.regression.ref --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/copy.regression.ref 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/copy.regression.ref 1970-01-01 00:00:00.000000000 +0000 @@ -1,465 +0,0 @@ ----------------- -./tests/data/a-ac3.rm -first.nut second.nut differ: char 34, line 1 -1dd5a62b7edb3a1bcf77626af0a85bc1 first.nut ----------------- -./tests/data/a-adpcm_ima.wav -first.nut second.nut differ: char 34, line 1 -c95390143078f08db8a3bfba5789c2da first.nut ----------------- -./tests/data/a-adpcm_ms.wav -first.nut second.nut differ: char 34, line 1 -05e4d8842f4001fed506423e1a8ef963 first.nut ----------------- -./tests/data/a-adpcm_qt.aiff -first.nut second.nut differ: char 34, line 1 -7455d87f626f05e20030f4c93ec91e69 first.nut ----------------- -./tests/data/a-adpcm_swf.flv -c0402ee010a483403a655f353e184df1 first.nut ----------------- -./tests/data/a-adpcm_yam.wav -first.nut second.nut differ: char 34, line 1 -f861047f6c6f75cdf3ce7bb78a4003ad first.nut ----------------- -./tests/data/a-alac.m4a -first.nut second.nut differ: char 34, line 1 -ab152b0b01e540e74b04a807e3882083 first.nut ----------------- -./tests/data/a-asv1.avi -636fc0dfef1830cc51cf2c182bd4a7b2 first.nut ----------------- -./tests/data/a-asv2.avi -bbfc299390378c7bdbd7463434d8fcbe first.nut ----------------- -./tests/data/a-dnxhd-1080i.mov -first.nut second.nut differ: char 113, line 1 -037e31900e6cdf7161c2a0df23d9dc9d first.nut ----------------- -./tests/data/a-dnxhd-720p-rd.dnxhd -first.nut second.nut differ: char 113, line 1 -1237abac554ea9adb2a926641eec0de0 first.nut ----------------- -./tests/data/a-dnxhd-720p.dnxhd -first.nut second.nut differ: char 113, line 1 -6694322cefa2f482bc3dac8be22eb5d5 first.nut ----------------- -./tests/data/a-dv.dv -1aa367a56d31bb45f98d820121820909 first.nut ----------------- -./tests/data/a-dv411.dv -7ef296512960e00d96850f2606b4b683 first.nut ----------------- -./tests/data/a-dv50.dv -6424dd39e22a1789a8182d7e8da224a9 first.nut ----------------- -./tests/data/a-error-mpeg4-adv.avi -715b262e3e7c9be2b59525ba0289f30e first.nut ----------------- -./tests/data/a-ffv1.avi -edada4da2170ffd3386636cff67a90f0 first.nut ----------------- -./tests/data/a-flac.flac -d5e0a6d87034c21627afb2a904412a21 first.nut ----------------- -./tests/data/a-flashsv.flv -985076a8a87df1f91b34cbb81ce96217 first.nut ----------------- -./tests/data/a-flv.flv -6d01a0eb07c15ec3d0a70bfad0615bec first.nut ----------------- -./tests/data/a-g726.wav -first.nut second.nut differ: char 34, line 1 -59540b44c97b8e1eafc53ebdaeaf3eb8 first.nut ----------------- -./tests/data/a-h261.avi -18d47cc50e05e5c855a8aec1a5d8d9ec first.nut ----------------- -./tests/data/a-h263.avi -91b67a478420a30cf10c3d872f7e799b first.nut ----------------- -./tests/data/a-h263p.avi -1e9f108181dca2dd3bb621bb45fc5834 first.nut ----------------- -./tests/data/a-huffyuv.avi -62dccc2a428b561c08497f8378ea1567 first.nut ----------------- -./tests/data/a-jpegls.avi -35f1bb0f9b14bf3eb29134784f278c4f first.nut ----------------- -./tests/data/a-ljpeg.avi -45ec1072d8e55d6cfa784cc732830f3c first.nut ----------------- -./tests/data/a-mjpeg.avi -4e6d42fdda880661de8308cfa45652ee first.nut ----------------- -./tests/data/a-mp2.mp2 -6c8d1a33dd994d63c68e5c9953b5cb8c first.nut ----------------- -./tests/data/a-mpeg1.mpg -first.nut second.nut differ: char 34, line 1 -9d444c67713ef70c06d35fd355200ed5 first.nut ----------------- -./tests/data/a-mpeg1b.mpg -first.nut second.nut differ: char 34, line 1 -9d444c67713ef70c06d35fd355200ed5 first.nut ----------------- -./tests/data/a-mpeg2.mpg -first.nut second.nut differ: char 34, line 1 -328f6a0069b76397c5ed0dcea8b69b50 first.nut ----------------- -./tests/data/a-mpeg2.mpg -first.nut second.nut differ: char 34, line 1 -328f6a0069b76397c5ed0dcea8b69b50 first.nut ----------------- -./tests/data/a-mpeg2_422.mpg -first.nut second.nut differ: char 34, line 1 -d27035bcf30801cd1bee6ac59e8f5e3e first.nut ----------------- -./tests/data/a-mpeg2i.mpg -first.nut second.nut differ: char 34, line 1 -c3351b79649825a6b9f62a2a1db633c1 first.nut ----------------- -./tests/data/a-mpeg2ivlc-qprd.mpg -first.nut second.nut differ: char 34, line 1 -d910da52fa10eb1deca10fa9443132d2 first.nut ----------------- -./tests/data/a-mpeg2reuse.mpg -first.nut second.nut differ: char 34, line 1 -c3351b79649825a6b9f62a2a1db633c1 first.nut ----------------- -./tests/data/a-mpeg2thread.mpg -first.nut second.nut differ: char 34, line 1 -c3351b79649825a6b9f62a2a1db633c1 first.nut ----------------- -./tests/data/a-mpeg2threadivlc.mpg -first.nut second.nut differ: char 34, line 1 -c3351b79649825a6b9f62a2a1db633c1 first.nut ----------------- -./tests/data/a-mpeg4-Q.avi -first.nut second.nut differ: char 34, line 1 -305bab90451e2c3b741e3aef51bc2a4c first.nut ----------------- -./tests/data/a-mpeg4-adap.avi -first.nut second.nut differ: char 34, line 1 -5d9315ec49c4122f6f23cf84cab5fc53 first.nut ----------------- -./tests/data/a-mpeg4-adv.avi -5d672bf4c2e879d6a20e349cb4dc09a6 first.nut ----------------- -./tests/data/a-mpeg4-nr.avi -0243b2e03115fe948f99da1ee10ae588 first.nut ----------------- -./tests/data/a-mpeg4-qprd.avi -first.nut second.nut differ: char 34, line 1 -5d9315ec49c4122f6f23cf84cab5fc53 first.nut ----------------- -./tests/data/a-mpeg4-rc.avi -first.nut second.nut differ: char 34, line 1 -5d9315ec49c4122f6f23cf84cab5fc53 first.nut ----------------- -./tests/data/a-mpeg4-thread.avi -first.nut second.nut differ: char 34, line 1 -6aa94d589e9e7626e51575d8a2aec6e7 first.nut ----------------- -./tests/data/a-msmpeg4.avi -836d432509ff22fd363237ef1dced5f3 first.nut ----------------- -./tests/data/a-msmpeg4v2.avi -37f253da3666fb057edecb86ed2dba39 first.nut ----------------- -./tests/data/a-odivx.mp4 -e3bd9d8a3417abc749c489e64119dbf3 first.nut ----------------- -./tests/data/a-pcm_alaw.wav -first.nut second.nut differ: char 34, line 1 -22853e7806b0f0162fd5e2573e34b03c first.nut ----------------- -./tests/data/a-pcm_f32be.au -first.nut second.nut differ: char 34, line 1 -94cb60c3107ec509af79191e86099a0e first.nut ----------------- -./tests/data/a-pcm_f32le.wav -first.nut second.nut differ: char 34, line 1 -8d887b27a8531390af5b682557631986 first.nut ----------------- -./tests/data/a-pcm_f64be.au -first.nut second.nut differ: char 34, line 1 -e0c7b64e13bb9398a57dac60806515fb first.nut ----------------- -./tests/data/a-pcm_f64le.wav -first.nut second.nut differ: char 34, line 1 -9dbb9bda0c990502e910e082a008433f first.nut ----------------- -./tests/data/a-pcm_mulaw.wav -first.nut second.nut differ: char 34, line 1 -78c4aae32fdddaba4f9caa5683018c94 first.nut ----------------- -./tests/data/a-pcm_s16be.mkv -first.nut second.nut differ: char 34, line 1 -279810a0c30a06c4ab7de154e3de140d first.nut ----------------- -./tests/data/a-pcm_s16be.mov -first.nut second.nut differ: char 42, line 1 -0a8ede3d121f17a98e9038771eb98e1a first.nut ----------------- -./tests/data/a-pcm_s16le.mkv -47942f5188f8d081bcbe7fb82550b135 first.nut ----------------- -./tests/data/a-pcm_s16le.wav -first.nut second.nut differ: char 34, line 1 -9f868acb99ba107750f165431f95c382 first.nut ----------------- -./tests/data/a-pcm_s24be.mov -first.nut second.nut differ: char 34, line 1 -9c96762f631851014dec14b506091cc1 first.nut ----------------- -./tests/data/a-pcm_s24daud.302 -60ecb7037b205e2013490fdadab9697b first.nut ----------------- -./tests/data/a-pcm_s24le.wav -first.nut second.nut differ: char 34, line 1 -5805a2e6e2eddede4757fd488d0d6adb first.nut ----------------- -./tests/data/a-pcm_s32be.mov -first.nut second.nut differ: char 34, line 1 -d6c868a1130be573bbe0cfc88913a60c first.nut ----------------- -./tests/data/a-pcm_s32le.wav -first.nut second.nut differ: char 34, line 1 -3e0a81669647739c490f12521f897527 first.nut ----------------- -./tests/data/a-pcm_s8.mov -first.nut second.nut differ: char 34, line 1 -a6fe0827966ee4515f27c7053d579229 first.nut ----------------- -./tests/data/a-pcm_u8.wav -first.nut second.nut differ: char 34, line 1 -f0d398fd651cdedfd7b4c5433c08fd79 first.nut ----------------- -./tests/data/a-pcm_zork.wav -first.nut second.nut differ: char 34, line 1 -69e40cc9266836a7101000677ee14a87 first.nut ----------------- -./tests/data/a-roqav.roq -first.nut second.nut differ: char 34, line 1 -0e7a57bb28054b7e319eac2ba0a4be23 first.nut ----------------- -./tests/data/a-rv10.rm -first.nut second.nut differ: char 34, line 1 -80f982c6bffea91ff45a9b320cb93c14 first.nut ----------------- -./tests/data/a-rv20.rm -first.nut second.nut differ: char 34, line 1 -5b02113c0941578ca6918215eed8a728 first.nut ----------------- -./tests/data/a-snow.avi -e73b88690aa491491ede5970641134ad first.nut ----------------- -./tests/data/a-snow53.avi -18a6b061252c8c74bd22b42a7d5b2bae first.nut ----------------- -./tests/data/a-svq1.mov -first.nut second.nut differ: char 197, line 1 -6bbe90d47c1763654e8388ce51ab911e first.nut ----------------- -./tests/data/a-wmav1.asf -first.nut second.nut differ: char 34, line 1 -c3f7bc239ff166d738b29252b47bd437 first.nut ----------------- -./tests/data/a-wmav2.asf -first.nut second.nut differ: char 34, line 1 -930f1824b9677f0b6b714f1c6ddcf825 first.nut ----------------- -./tests/data/a-wmv1.avi -206bd9985b575f61a8a580656af39beb first.nut ----------------- -./tests/data/a-wmv2.avi -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-bgr24.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-gray.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-monob.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-monow.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-rgb24.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-rgb32.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-rgb555.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-rgb565.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-yuv410p.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-yuv411p.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-yuv420p.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-yuv422p.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-yuv440p.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-yuv444p.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-yuvj420p.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-yuvj422p.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-yuvj440p.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-yuvj444p.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf-yuyv422.yuv -09178a3c2b99d4f7ad1f7a761a2b803a first.nut ----------------- -./tests/data/b-lavf.aif -first.nut second.nut differ: char 34, line 1 -3f1d3faae1671f1cf862ddb66a5c59d1 first.nut ----------------- -./tests/data/b-lavf.al -e6d4b977e74a535b039a6a1dfed2dbc1 first.nut ----------------- -./tests/data/b-lavf.asf -first.nut second.nut differ: char 34, line 1 -57727c41b3974697c0a79cfd08515ddd first.nut ----------------- -./tests/data/b-lavf.au -first.nut second.nut differ: char 34, line 1 -1da12f41bc5ea1fd851e8a48b222c204 first.nut ----------------- -./tests/data/b-lavf.avi -a88edf9fb8e02e658ba3cae9313a3cdc first.nut ----------------- -./tests/data/b-lavf.dv -first.nut second.nut differ: char 34, line 1 -819018a5d91c55312ffe784e8712ac4b first.nut ----------------- -./tests/data/b-lavf.ffm -first.nut second.nut differ: char 34, line 1 -17f8894a05c71adb51c9a0ff1b9040bb first.nut ----------------- -./tests/data/b-lavf.flv -d74edb56e74e0eea748863f3aeeafa61 first.nut ----------------- -./tests/data/b-lavf.gif -first.nut second.nut differ: char 34, line 1 -ef9ba6bf88f44d9d326049ef2872a4d3 first.nut ----------------- -./tests/data/b-lavf.gxf -first.nut second.nut differ: char 44, line 1 -522957f46ba46051fd03a0868c905e54 first.nut ----------------- -./tests/data/b-lavf.mkv -8c9427bb75c96210d6580d9b881d9e4d first.nut ----------------- -./tests/data/b-lavf.mmf -first.nut second.nut differ: char 42, line 1 -298136aef02389fc5b0844995fe6ac72 first.nut ----------------- -./tests/data/b-lavf.mov -ce895b33ff206fafbae89fd5a8f959d2 first.nut ----------------- -./tests/data/b-lavf.mpg -d279e3343993267241c2fac4f4563cdb first.nut ----------------- -./tests/data/b-lavf.mxf -first.nut second.nut differ: char 34, line 1 -3e98a90d40986b8ea4305be06175927a first.nut ----------------- -./tests/data/b-lavf.mxf_d10 -1ee69644165344a096ddfaaac951a0e9 first.nut ----------------- -./tests/data/b-lavf.nut -1426bca4c65796516a3e94b6bebc5a58 first.nut ----------------- -./tests/data/b-lavf.ogg -c986ce79045f2068ae1bedc2b8702884 first.nut ----------------- -./tests/data/b-lavf.rm -first.nut second.nut differ: char 34, line 1 -a3b2c9d3ec2c86b6d4c3bf0ed91391c3 first.nut ----------------- -./tests/data/b-lavf.swf -first.nut second.nut differ: char 34, line 1 -d4a5c5e6343dc17bed49397d889e0799 first.nut ----------------- -./tests/data/b-lavf.ts -40fd2ece0c8386d3a250943eab023795 first.nut ----------------- -./tests/data/b-lavf.ul -1c4c747e2e9c0fd195656359341eef76 first.nut ----------------- -./tests/data/b-lavf.voc -first.nut second.nut differ: char 42, line 1 -500ef42830c5bc2af849dbdcc4380f1b first.nut ----------------- -./tests/data/b-lavf.wav -first.nut second.nut differ: char 42, line 1 -8d4c6a79af442610ad912625c9b85d02 first.nut ----------------- -./tests/data/b-lavf.y4m -f42a6ff4488de306925b057ecee75b0e first.nut ----------------- -./tests/data/b-lavf02.bmp -first.nut second.nut differ: char 113, line 1 -02e3c782ef3a0c96e820201d4d4b8268 first.nut ----------------- -./tests/data/b-lavf02.jpg -61a19c3012a5aa056d8e9a589e29de2e first.nut ----------------- -./tests/data/b-lavf02.pcx -first.nut second.nut differ: char 113, line 1 -3c4e1b9c8d5dd2bedb8eebd1edc7a2f5 first.nut ----------------- -./tests/data/b-lavf02.pgm -first.nut second.nut differ: char 113, line 1 -cc36bdadd7aef501a6d5d588dec2188b first.nut ----------------- -./tests/data/b-lavf02.ppm -first.nut second.nut differ: char 113, line 1 -453ec690bea6c3668e2b65e0b7ad14c8 first.nut ----------------- -./tests/data/b-lavf02.sgi -first.nut second.nut differ: char 113, line 1 -6cdadd58aaa5ad196697352e96723e52 first.nut ----------------- -./tests/data/b-lavf02.tga -4144d2b4ee2948c1a16f7fc31b381be3 first.nut ----------------- -./tests/data/b-lavf02.tiff -first.nut second.nut differ: char 113, line 1 -237fa2da2d5f4930dae9825c9cf928a6 first.nut ----------------- -./tests/data/b-pbmpipe.pbm -first.nut second.nut differ: char 113, line 1 -2c65ef7188398da8a5f107b9dd5fb998 first.nut ----------------- -./tests/data/b-pgmpipe.pgm -first.nut second.nut differ: char 113, line 1 -b7e98248ada1e6f7170bc7fedee3825c first.nut ----------------- -./tests/data/b-ppmpipe.ppm -first.nut second.nut differ: char 113, line 1 -869fcefe430c35a9a8e46fd5f040b62e first.nut diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/aac.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/aac.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/aac.mak 2011-05-15 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/aac.mak 2012-01-11 00:34:30.000000000 +0000 @@ -2,18 +2,46 @@ fate-aac-al04_44: CMD = pcm -i $(SAMPLES)/aac/al04_44.mp4 fate-aac-al04_44: REF = $(SAMPLES)/aac/al04_44.s16 +FATE_AAC += fate-aac-al05_44 +fate-aac-al05_44: CMD = pcm -i $(SAMPLES)/aac/al05_44.mp4 +fate-aac-al05_44: REF = $(SAMPLES)/aac/al05_44.s16 + +FATE_AAC += fate-aac-al06_44 +fate-aac-al06_44: CMD = pcm -i $(SAMPLES)/aac/al06_44.mp4 +fate-aac-al06_44: REF = $(SAMPLES)/aac/al06_44.s16 + FATE_AAC += fate-aac-al07_96 fate-aac-al07_96: CMD = pcm -i $(SAMPLES)/aac/al07_96.mp4 fate-aac-al07_96: REF = $(SAMPLES)/aac/al07_96.s16 +FATE_AAC += fate-aac-al15_44 +fate-aac-al15_44: CMD = pcm -i $(SAMPLES)/aac/al15_44.mp4 +fate-aac-al15_44: REF = $(SAMPLES)/aac/al15_44.s16 + +FATE_AAC += fate-aac-al17_44 +fate-aac-al17_44: CMD = pcm -i $(SAMPLES)/aac/al17_44.mp4 +fate-aac-al17_44: REF = $(SAMPLES)/aac/al17_44.s16 + +FATE_AAC += fate-aac-al18_44 +fate-aac-al18_44: CMD = pcm -i $(SAMPLES)/aac/al18_44.mp4 +fate-aac-al18_44: REF = $(SAMPLES)/aac/al18_44.s16 + FATE_AAC += fate-aac-am00_88 fate-aac-am00_88: CMD = pcm -i $(SAMPLES)/aac/am00_88.mp4 fate-aac-am00_88: REF = $(SAMPLES)/aac/am00_88.s16 +FATE_AAC += fate-aac-am05_44 +fate-aac-am05_44: CMD = pcm -i $(SAMPLES)/aac/am05_44.mp4 +fate-aac-am05_44: REF = $(SAMPLES)/aac/am05_44.s16 + FATE_AAC += fate-aac-al_sbr_hq_cm_48_2 fate-aac-al_sbr_hq_cm_48_2: CMD = pcm -i $(SAMPLES)/aac/al_sbr_cm_48_2.mp4 fate-aac-al_sbr_hq_cm_48_2: REF = $(SAMPLES)/aac/al_sbr_hq_cm_48_2.s16 +FATE_AAC += fate-aac-al_sbr_hq_cm_48_5.1 +fate-aac-al_sbr_hq_cm_48_5.1: CMD = pcm -i $(SAMPLES)/aac/al_sbr_cm_48_5.1.mp4 +fate-aac-al_sbr_hq_cm_48_5.1: REF = $(SAMPLES)/aac/al_sbr_hq_cm_48_5.1.s16 + FATE_AAC += fate-aac-al_sbr_ps_06_ur fate-aac-al_sbr_ps_06_ur: CMD = pcm -i $(SAMPLES)/aac/al_sbr_ps_06_new.mp4 fate-aac-al_sbr_ps_06_ur: REF = $(SAMPLES)/aac/al_sbr_ps_06_ur.s16 @@ -26,6 +54,23 @@ fate-aac-ap05_48: CMD = pcm -i $(SAMPLES)/aac/ap05_48.mp4 fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16 +FATE_AAC += fate-aac-latm_stereo_to_51 +fate-aac-latm_stereo_to_51: CMD = pcm -i $(SAMPLES)/aac/latm_stereo_to_51.ts -ac 6 +fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51.s16 + +fate-aac-ct%: CMD = pcm -i $(SAMPLES)/aac/CT_DecoderCheck/$(@:fate-aac-ct-%=%) +fate-aac-ct%: REF = $(SAMPLES)/aac/CT_DecoderCheck/aacPlusv2.wav + +FATE_AAC_CT = sbr_bc-ps_i.3gp \ + sbr_bic-ps_i.3gp \ + sbr_i-ps_i.aac \ + sbr_bc-ps_bc.mp4 \ + sbr_bc-ps_i.mp4 \ + sbr_i-ps_bic.mp4 \ + sbr_i-ps_i.mp4 + +FATE_AAC += $(FATE_AAC_CT:%=fate-aac-ct-%) + FATE_TESTS += $(FATE_AAC) fate-aac: $(FATE_AAC) $(FATE_AAC): CMP = oneoff diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/ac3.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/ac3.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/ac3.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/ac3.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,29 @@ +FATE_TESTS += fate-ac3-2.0 +fate-ac3-2.0: CMD = pcm -i $(SAMPLES)/ac3/monsters_inc_2.0_192_small.ac3 +fate-ac3-2.0: CMP = oneoff +fate-ac3-2.0: REF = $(SAMPLES)/ac3/monsters_inc_2.0_192_small.pcm + +FATE_TESTS += fate-ac3-5.1 +fate-ac3-5.1: CMD = pcm -i $(SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3 +fate-ac3-5.1: CMP = oneoff +fate-ac3-5.1: REF = $(SAMPLES)/ac3/monsters_inc_5.1_448_small.pcm + +FATE_TESTS += fate-eac3-1 +fate-eac3-1: CMD = pcm -i $(SAMPLES)/eac3/csi_miami_5.1_256_spx_small.eac3 +fate-eac3-1: CMP = oneoff +fate-eac3-1: REF = $(SAMPLES)/eac3/csi_miami_5.1_256_spx_small.pcm + +FATE_TESTS += fate-eac3-2 +fate-eac3-2: CMD = pcm -i $(SAMPLES)/eac3/csi_miami_stereo_128_spx_small.eac3 +fate-eac3-2: CMP = oneoff +fate-eac3-2: REF = $(SAMPLES)/eac3/csi_miami_stereo_128_spx_small.pcm + +FATE_TESTS += fate-eac3-3 +fate-eac3-3: CMD = pcm -i $(SAMPLES)/eac3/matrix2_commentary1_stereo_192_small.eac3 +fate-eac3-3: CMP = oneoff +fate-eac3-3: REF = $(SAMPLES)/eac3/matrix2_commentary1_stereo_192_small.pcm + +FATE_TESTS += fate-eac3-4 +fate-eac3-4: CMD = pcm -i $(SAMPLES)/eac3/serenity_english_5.1_1536_small.eac3 +fate-eac3-4: CMP = oneoff +fate-eac3-4: REF = $(SAMPLES)/eac3/serenity_english_5.1_1536_small.pcm diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/amrnb.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/amrnb.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/amrnb.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/amrnb.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,47 @@ +FATE_TESTS += fate-amrnb-4k75 +fate-amrnb-4k75: CMD = pcm -i $(SAMPLES)/amrnb/4.75k.amr +fate-amrnb-4k75: CMP = stddev +fate-amrnb-4k75: REF = $(SAMPLES)/amrnb/4.75k.pcm +fate-amrnb-4k75: FUZZ = 1 + +FATE_TESTS += fate-amrnb-5k15 +fate-amrnb-5k15: CMD = pcm -i $(SAMPLES)/amrnb/5.15k.amr +fate-amrnb-5k15: CMP = stddev +fate-amrnb-5k15: REF = $(SAMPLES)/amrnb/5.15k.pcm +fate-amrnb-5k15: FUZZ = 1 + +FATE_TESTS += fate-amrnb-5k9 +fate-amrnb-5k9: CMD = pcm -i $(SAMPLES)/amrnb/5.9k.amr +fate-amrnb-5k9: CMP = stddev +fate-amrnb-5k9: REF = $(SAMPLES)/amrnb/5.9k.pcm +fate-amrnb-5k9: FUZZ = 1 + +FATE_TESTS += fate-amrnb-6k7 +fate-amrnb-6k7: CMD = pcm -i $(SAMPLES)/amrnb/6.7k.amr +fate-amrnb-6k7: CMP = stddev +fate-amrnb-6k7: REF = $(SAMPLES)/amrnb/6.7k.pcm +fate-amrnb-6k7: FUZZ = 1 + +FATE_TESTS += fate-amrnb-7k4 +fate-amrnb-7k4: CMD = pcm -i $(SAMPLES)/amrnb/7.4k.amr +fate-amrnb-7k4: CMP = stddev +fate-amrnb-7k4: REF = $(SAMPLES)/amrnb/7.4k.pcm +fate-amrnb-7k4: FUZZ = 1 + +FATE_TESTS += fate-amrnb-7k95 +fate-amrnb-7k95: CMD = pcm -i $(SAMPLES)/amrnb/7.95k.amr +fate-amrnb-7k95: CMP = stddev +fate-amrnb-7k95: REF = $(SAMPLES)/amrnb/7.95k.pcm +fate-amrnb-7k95: FUZZ = 1 + +FATE_TESTS += fate-amrnb-10k2 +fate-amrnb-10k2: CMD = pcm -i $(SAMPLES)/amrnb/10.2k.amr +fate-amrnb-10k2: CMP = stddev +fate-amrnb-10k2: REF = $(SAMPLES)/amrnb/10.2k.pcm +fate-amrnb-10k2: FUZZ = 1 + +FATE_TESTS += fate-amrnb-12k2 +fate-amrnb-12k2: CMD = pcm -i $(SAMPLES)/amrnb/12.2k.amr +fate-amrnb-12k2: CMP = stddev +fate-amrnb-12k2: REF = $(SAMPLES)/amrnb/12.2k.pcm +fate-amrnb-12k2: FUZZ = 1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/amrwb.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/amrwb.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/amrwb.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/amrwb.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,59 @@ +FATE_TESTS += fate-amrwb-6k60 +fate-amrwb-6k60: CMD = pcm -i $(SAMPLES)/amrwb/seed-6k60.awb +fate-amrwb-6k60: CMP = stddev +fate-amrwb-6k60: REF = $(SAMPLES)/amrwb/seed-6k60.pcm +fate-amrwb-6k60: FUZZ = 1 + +FATE_TESTS += fate-amrwb-8k85 +fate-amrwb-8k85: CMD = pcm -i $(SAMPLES)/amrwb/seed-8k85.awb +fate-amrwb-8k85: CMP = stddev +fate-amrwb-8k85: REF = $(SAMPLES)/amrwb/seed-8k85.pcm +fate-amrwb-8k85: FUZZ = 1 + +FATE_TESTS += fate-amrwb-12k65 +fate-amrwb-12k65: CMD = pcm -i $(SAMPLES)/amrwb/seed-12k65.awb +fate-amrwb-12k65: CMP = stddev +fate-amrwb-12k65: REF = $(SAMPLES)/amrwb/seed-12k65.pcm +fate-amrwb-12k65: FUZZ = 1 + +FATE_TESTS += fate-amrwb-14k25 +fate-amrwb-14k25: CMD = pcm -i $(SAMPLES)/amrwb/seed-14k25.awb +fate-amrwb-14k25: CMP = stddev +fate-amrwb-14k25: REF = $(SAMPLES)/amrwb/seed-14k25.pcm +fate-amrwb-14k25: FUZZ = 2.6 + +FATE_TESTS += fate-amrwb-15k85 +fate-amrwb-15k85: CMD = pcm -i $(SAMPLES)/amrwb/seed-15k85.awb +fate-amrwb-15k85: CMP = stddev +fate-amrwb-15k85: REF = $(SAMPLES)/amrwb/seed-15k85.pcm +fate-amrwb-15k85: FUZZ = 1 + +FATE_TESTS += fate-amrwb-18k25 +fate-amrwb-18k25: CMD = pcm -i $(SAMPLES)/amrwb/seed-18k25.awb +fate-amrwb-18k25: CMP = stddev +fate-amrwb-18k25: REF = $(SAMPLES)/amrwb/seed-18k25.pcm +fate-amrwb-18k25: FUZZ = 1 + +FATE_TESTS += fate-amrwb-19k85 +fate-amrwb-19k85: CMD = pcm -i $(SAMPLES)/amrwb/seed-19k85.awb +fate-amrwb-19k85: CMP = stddev +fate-amrwb-19k85: REF = $(SAMPLES)/amrwb/seed-19k85.pcm +fate-amrwb-19k85: FUZZ = 1 + +FATE_TESTS += fate-amrwb-23k05 +fate-amrwb-23k05: CMD = pcm -i $(SAMPLES)/amrwb/seed-23k05.awb +fate-amrwb-23k05: CMP = stddev +fate-amrwb-23k05: REF = $(SAMPLES)/amrwb/seed-23k05.pcm +fate-amrwb-23k05: FUZZ = 2 + +FATE_TESTS += fate-amrwb-23k85 +fate-amrwb-23k85: CMD = pcm -i $(SAMPLES)/amrwb/seed-23k85.awb +fate-amrwb-23k85: CMP = stddev +fate-amrwb-23k85: REF = $(SAMPLES)/amrwb/seed-23k85.pcm +fate-amrwb-23k85: FUZZ = 2 + +FATE_TESTS += fate-amrwb-23k85-2 +fate-amrwb-23k85-2: CMD = pcm -i $(SAMPLES)/amrwb/deus-23k85.awb +fate-amrwb-23k85-2: CMP = stddev +fate-amrwb-23k85-2: REF = $(SAMPLES)/amrwb/deus-23k85.pcm +fate-amrwb-23k85-2: FUZZ = 1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/atrac.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/atrac.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/atrac.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/atrac.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,19 @@ +FATE_TESTS += fate-atrac1 +fate-atrac1: CMD = pcm -i $(SAMPLES)/atrac1/test_tones_small.aea +fate-atrac1: CMP = oneoff +fate-atrac1: REF = $(SAMPLES)/atrac1/test_tones_small.pcm + +FATE_TESTS += fate-atrac3-1 +fate-atrac3-1: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_066_small.wav +fate-atrac3-1: CMP = oneoff +fate-atrac3-1: REF = $(SAMPLES)/atrac3/mc_sich_at3_066_small.pcm + +FATE_TESTS += fate-atrac3-2 +fate-atrac3-2: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_105_small.wav +fate-atrac3-2: CMP = oneoff +fate-atrac3-2: REF = $(SAMPLES)/atrac3/mc_sich_at3_105_small.pcm + +FATE_TESTS += fate-atrac3-3 +fate-atrac3-3: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_132_small.wav +fate-atrac3-3: CMP = oneoff +fate-atrac3-3: REF = $(SAMPLES)/atrac3/mc_sich_at3_132_small.pcm diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/audio.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/audio.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/audio.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/audio.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,30 @@ +FATE_TESTS += fate-binkaudio-dct +fate-binkaudio-dct: CMD = pcm -i $(SAMPLES)/bink/binkaudio_dct.bik +fate-binkaudio-dct: CMP = oneoff +fate-binkaudio-dct: REF = $(SAMPLES)/bink/binkaudio_dct.pcm +fate-binkaudio-dct: FUZZ = 2 + +FATE_TESTS += fate-binkaudio-rdft +fate-binkaudio-rdft: CMD = pcm -i $(SAMPLES)/bink/binkaudio_rdft.bik +fate-binkaudio-rdft: CMP = oneoff +fate-binkaudio-rdft: REF = $(SAMPLES)/bink/binkaudio_rdft.pcm +fate-binkaudio-rdft: FUZZ = 2 + +FATE_TESTS += fate-dts +fate-dts: CMD = pcm -i $(SAMPLES)/dts/dts.ts +fate-dts: CMP = oneoff +fate-dts: REF = $(SAMPLES)/dts/dts.pcm + +FATE_TESTS += fate-imc +fate-imc: CMD = pcm -i $(SAMPLES)/imc/imc.avi +fate-imc: CMP = oneoff +fate-imc: REF = $(SAMPLES)/imc/imc.pcm + +FATE_TESTS += fate-nellymoser +fate-nellymoser: CMD = pcm -i $(SAMPLES)/nellymoser/nellymoser.flv +fate-nellymoser: CMP = oneoff +fate-nellymoser: REF = $(SAMPLES)/nellymoser/nellymoser.pcm + +FATE_TESTS += fate-ws_snd +fate-ws_snd: CMD = md5 -i $(SAMPLES)/vqa/ws_snd.vqa -f s16le + diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/dct.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/dct.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/dct.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/dct.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,5 @@ +FATE_TESTS += fate-idct8x8 +fate-idct8x8: libavcodec/dct-test$(EXESUF) +fate-idct8x8: CMD = run libavcodec/dct-test -i +fate-idct8x8: REF = /dev/null +fate-idct8x8: CMP = null diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/demux.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/demux.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/demux.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/demux.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,95 @@ +FATE_TESTS += fate-adts-demux +fate-adts-demux: CMD = crc -i $(SAMPLES)/aac/ct_faac-adts.aac -acodec copy + +FATE_TESTS += fate-aea-demux +fate-aea-demux: CMD = crc -i $(SAMPLES)/aea/chirp.aea -acodec copy + +FATE_TESTS += fate-bink-demux +fate-bink-demux: CMD = crc -i $(SAMPLES)/bink/Snd0a7d9b58.dee -vn -acodec copy + +FATE_TESTS += fate-bink-demux-video +fate-bink-demux-video: CMD = framecrc -i $(SAMPLES)/bink/hol2br.bik + +FATE_TESTS += fate-bmv +fate-bmv: CMD = framecrc -i $(SAMPLES)/bmv/SURFING-partial.BMV -pix_fmt rgb24 + +FATE_TESTS += fate-caf +fate-caf: CMD = crc -i $(SAMPLES)/caf/caf-pcm16.caf + +FATE_TESTS += fate-cryo-apc +fate-cryo-apc: CMD = md5 -i $(SAMPLES)/cryo-apc/cine007.APC -f s16le + +FATE_TESTS += fate-d-cinema-demux +fate-d-cinema-demux: CMD = framecrc -i $(SAMPLES)/d-cinema/THX_Science_FLT_1920-partial.302 -acodec copy -pix_fmt rgb24 + +FATE_TESTS += fate-funcom-iss +fate-funcom-iss: CMD = md5 -i $(SAMPLES)/funcom-iss/0004010100.iss -f s16le + +FATE_TESTS += fate-interplay-mve-16bit +fate-interplay-mve-16bit: CMD = framecrc -i $(SAMPLES)/interplay-mve/descent3-level5-16bit-partial.mve -pix_fmt rgb24 + +FATE_TESTS += fate-interplay-mve-8bit +fate-interplay-mve-8bit: CMD = framecrc -i $(SAMPLES)/interplay-mve/interplay-logo-2MB.mve -pix_fmt rgb24 + +FATE_TESTS += fate-iv8-demux +fate-iv8-demux: CMD = framecrc -i $(SAMPLES)/iv8/zzz-partial.mpg -vsync 0 -vcodec copy + +FATE_TESTS += fate-lmlm4-demux +fate-lmlm4-demux: CMD = framecrc -i $(SAMPLES)/lmlm4/LMLM4_CIFat30fps.divx -t 3 -acodec copy -vcodec copy + +FATE_TESTS += fate-maxis-xa +fate-maxis-xa: CMD = md5 -i $(SAMPLES)/maxis-xa/SC2KBUG.XA -f s16le + +FATE_TESTS += fate-mtv +fate-mtv: CMD = framecrc -i $(SAMPLES)/mtv/comedian_auto-partial.mtv -acodec copy -pix_fmt rgb24 + +FATE_TESTS += fate-mxf-demux +fate-mxf-demux: CMD = framecrc -i $(SAMPLES)/mxf/C0023S01.mxf -acodec copy -vcodec copy + +FATE_TESTS += fate-nc-demux +fate-nc-demux: CMD = framecrc -i $(SAMPLES)/nc-camera/nc-sample-partial -vcodec copy + +FATE_TESTS += fate-nsv-demux +fate-nsv-demux: CMD = framecrc -i $(SAMPLES)/nsv/witchblade-51kbps.nsv -t 6 -vcodec copy -acodec copy + +FATE_TESTS += fate-oma-demux +fate-oma-demux: CMD = crc -i $(SAMPLES)/oma/01-Untitled-partial.oma -acodec copy + +FATE_TESTS += fate-psx-str +fate-psx-str: CMD = framecrc -i $(SAMPLES)/psx-str/descent-partial.str + +FATE_TESTS += fate-psx-str-v3-mdec +fate-psx-str-v3-mdec: CMD = framecrc -i $(SAMPLES)/psx-str/abc000_cut.str -an + +FATE_TESTS += fate-pva-demux +fate-pva-demux: CMD = framecrc -idct simple -i $(SAMPLES)/pva/PVA_test-partial.pva -t 0.6 -acodec copy + +FATE_TESTS += fate-qcp-demux +fate-qcp-demux: CMD = crc -i $(SAMPLES)/qcp/0036580847.QCP -acodec copy + +FATE_TESTS += fate-redcode-demux +fate-redcode-demux: CMD = framecrc -i $(SAMPLES)/r3d/4MB-sample.r3d -vcodec copy -acodec copy + +FATE_TESTS += fate-sierra-audio +fate-sierra-audio: CMD = md5 -i $(SAMPLES)/sol/lsl7sample.sol -f s16le + +FATE_TESTS += fate-sierra-vmd +fate-sierra-vmd: CMD = framecrc -i $(SAMPLES)/vmd/12.vmd -vsync 0 -pix_fmt rgb24 + +FATE_TESTS += fate-siff +fate-siff: CMD = framecrc -i $(SAMPLES)/SIFF/INTRO_B.VB -t 3 -pix_fmt rgb24 + +FATE_TESTS += fate-smjpeg +fate-smjpeg: CMD = framecrc -i $(SAMPLES)/smjpeg/scenwin.mjpg -vcodec copy + +FATE_TESTS += fate-westwood-aud +fate-westwood-aud: CMD = md5 -i $(SAMPLES)/westwood-aud/excellent.aud -f s16le + +FATE_TESTS += fate-wtv-demux +fate-wtv-demux: CMD = framecrc -i $(SAMPLES)/wtv/law-and-order-partial.wtv -vcodec copy -acodec copy + +FATE_TESTS += fate-xmv-demux +fate-xmv-demux: CMD = framecrc -i $(SAMPLES)/xmv/logos1p.fmv -vcodec copy -acodec copy + +FATE_TESTS += fate-xwma-demux +fate-xwma-demux: CMD = crc -i $(SAMPLES)/xwma/ergon.xwma -acodec copy diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/dfa.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/dfa.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/dfa.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/dfa.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,35 @@ +FATE_DFA += fate-dfa1 +fate-dfa1: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0000.dfa -pix_fmt rgb24 + +FATE_DFA += fate-dfa2 +fate-dfa2: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0001.dfa -pix_fmt rgb24 + +FATE_DFA += fate-dfa3 +fate-dfa3: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0002.dfa -pix_fmt rgb24 + +FATE_DFA += fate-dfa4 +fate-dfa4: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0003.dfa -pix_fmt rgb24 + +FATE_DFA += fate-dfa5 +fate-dfa5: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0004.dfa -pix_fmt rgb24 + +FATE_DFA += fate-dfa6 +fate-dfa6: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0005.dfa -pix_fmt rgb24 + +FATE_DFA += fate-dfa7 +fate-dfa7: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0006.dfa -pix_fmt rgb24 + +FATE_DFA += fate-dfa8 +fate-dfa8: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0007.dfa -pix_fmt rgb24 + +FATE_DFA += fate-dfa9 +fate-dfa9: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0008.dfa -pix_fmt rgb24 + +FATE_DFA += fate-dfa10 +fate-dfa10: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0009.dfa -pix_fmt rgb24 + +FATE_DFA += fate-dfa11 +fate-dfa11: CMD = framecrc -i $(SAMPLES)/chronomaster-dfa/0010.dfa -pix_fmt rgb24 + +FATE_TESTS += $(FATE_DFA) +fate-dfa: $(FATE_DFA) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/dpcm.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/dpcm.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/dpcm.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/dpcm.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,42 @@ +FATE_TESTS += fate-adpcm-ea-r2 +fate-adpcm-ea-r2: CMD = crc -i $(SAMPLES)/ea-mpc/THX_logo.mpc -vn + +FATE_TESTS += fate-adpcm-ea-r3 +fate-adpcm-ea-r3: CMD = crc -i $(SAMPLES)/ea-vp6/THX_logo.vp6 -vn + +FATE_TESTS += fate-creative-adpcm +fate-creative-adpcm: CMD = md5 -i $(SAMPLES)/creative/intro-partial.wav -f s16le + +FATE_TESTS += fate-creative-adpcm-8-2bit +fate-creative-adpcm-8-2bit: CMD = md5 -i $(SAMPLES)/creative/BBC_2BIT.VOC -f s16le + +FATE_TESTS += fate-creative-adpcm-8-2.6bit +fate-creative-adpcm-8-2.6bit: CMD = md5 -i $(SAMPLES)/creative/BBC_3BIT.VOC -f s16le + +FATE_TESTS += fate-creative-adpcm-8-4bit +fate-creative-adpcm-8-4bit: CMD = md5 -i $(SAMPLES)/creative/BBC_4BIT.VOC -f s16le + +FATE_TESTS += fate-ea-mad-adpcm-ea-r1 +fate-ea-mad-adpcm-ea-r1: CMD = framecrc -i $(SAMPLES)/ea-mad/NFS6LogoE.mad + +FATE_TESTS += fate-ea-tqi-adpcm +fate-ea-tqi-adpcm: CMD = framecrc -i $(SAMPLES)/ea-wve/networkBackbone-partial.wve -frames:v 26 + +FATE_TESTS += fate-idroq-video-dpcm +fate-idroq-video-dpcm: CMD = framecrc -i $(SAMPLES)/idroq/idlogo.roq + +FATE_TESTS += fate-psx-str-v3-adpcm_xa +fate-psx-str-v3-adpcm_xa: CMD = framecrc -i $(SAMPLES)/psx-str/abc000_cut.str -vn + +FATE_TESTS += fate-qt-msadpcm-stereo +fate-qt-msadpcm-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-L-ms02.mov -f s16le + +FATE_TESTS += fate-qt-msimaadpcm-stereo +fate-qt-msimaadpcm-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-L-ms11.mov -f s16le + +FATE_TESTS += fate-thp-mjpeg-adpcm +fate-thp-mjpeg-adpcm: CMD = framecrc -idct simple -i $(SAMPLES)/thp/pikmin2-opening1-partial.thp + +FATE_TESTS += fate-dpcm-xan +fate-dpcm-xan: CMD = md5 -i $(SAMPLES)/wc4-xan/wc4_2.avi -vn -f s16le + diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/ea.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/ea.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/ea.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/ea.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,17 @@ +FATE_TESTS += fate-ea-cdata +fate-ea-cdata: CMD = md5 -i $(SAMPLES)/ea-cdata/166b084d.46410f77.0009b440.24be960c.cdata -f s16le + +FATE_TESTS += fate-ea-cmv +fate-ea-cmv: CMD = framecrc -i $(SAMPLES)/ea-cmv/TITLE.CMV -vsync 0 -pix_fmt rgb24 + +FATE_TESTS += fate-ea-dct +fate-ea-dct: CMD = framecrc -idct simple -i $(SAMPLES)/ea-dct/NFS2Esprit-partial.dct + +FATE_TESTS += fate-ea-tgq +fate-ea-tgq: CMD = framecrc -i $(SAMPLES)/ea-tgq/v27.tgq -an + +FATE_TESTS += fate-ea-tgv-ima-ea-eacs +fate-ea-tgv-ima-ea-eacs: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTRO8K-partial.TGV -pix_fmt rgb24 + +FATE_TESTS += fate-ea-tgv-ima-ea-sead +fate-ea-tgv-ima-ea-sead: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTEL_S.TGV -pix_fmt rgb24 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/fft.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/fft.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/fft.mak 2011-04-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/fft.mak 2012-01-11 00:34:30.000000000 +0000 @@ -1,28 +1,36 @@ -FATE_FFT = fate-fft fate-ifft \ - fate-mdct fate-imdct \ - fate-rdft fate-irdft \ - fate-dct1d fate-idct1d - -fate-fft: CMD = run libavcodec/fft-test -fate-ifft: CMD = run libavcodec/fft-test -i -fate-mdct: CMD = run libavcodec/fft-test -m -fate-imdct: CMD = run libavcodec/fft-test -m -i -fate-rdft: CMD = run libavcodec/fft-test -r -fate-irdft: CMD = run libavcodec/fft-test -r -i -fate-dct1d: CMD = run libavcodec/fft-test -d -fate-idct1d: CMD = run libavcodec/fft-test -d -i +define DEF_FFT +FATE_FFT += fate-fft-$(1) fate-ifft-$(1) \ + fate-mdct-$(1) fate-imdct-$(1) \ + fate-rdft-$(1) fate-irdft-$(1) \ + fate-dct1d-$(1) fate-idct1d-$(1) + +fate-fft-$(N): CMD = run libavcodec/fft-test -n$(1) +fate-ifft-$(N): CMD = run libavcodec/fft-test -n$(1) -i +fate-mdct-$(N): CMD = run libavcodec/fft-test -n$(1) -m +fate-imdct-$(N): CMD = run libavcodec/fft-test -n$(1) -m -i +fate-rdft-$(N): CMD = run libavcodec/fft-test -n$(1) -r +fate-irdft-$(N): CMD = run libavcodec/fft-test -n$(1) -r -i +fate-dct1d-$(N): CMD = run libavcodec/fft-test -n$(1) -d +fate-idct1d-$(N): CMD = run libavcodec/fft-test -n$(1) -d -i +endef + +$(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT,$(N)))) fate-fft-test: $(FATE_FFT) $(FATE_FFT): libavcodec/fft-test$(EXESUF) $(FATE_FFT): REF = /dev/null -FATE_FFT_FIXED = fate-fft-fixed fate-ifft-fixed \ - fate-mdct-fixed fate-imdct-fixed +define DEF_FFT_FIXED +FATE_FFT_FIXED += fate-fft-fixed-$(1) fate-ifft-fixed-$(1) \ + fate-mdct-fixed-$(1) fate-imdct-fixed-$(1) + +fate-fft-fixed-$(1): CMD = run libavcodec/fft-fixed-test -n$(1) +fate-ifft-fixed-$(1): CMD = run libavcodec/fft-fixed-test -n$(1) -i +fate-mdct-fixed-$(1): CMD = run libavcodec/fft-fixed-test -n$(1) -m +fate-imdct-fixed-$(1): CMD = run libavcodec/fft-fixed-test -n$(1) -m -i +endef -fate-fft-fixed: CMD = run libavcodec/fft-fixed-test -fate-ifft-fixed: CMD = run libavcodec/fft-fixed-test -i -fate-mdct-fixed: CMD = run libavcodec/fft-fixed-test -m -fate-imdct-fixed: CMD = run libavcodec/fft-fixed-test -m -i +$(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT_FIXED,$(N)))) fate-fft-fixed-test: $(FATE_FFT_FIXED) $(FATE_FFT_FIXED): libavcodec/fft-fixed-test$(EXESUF) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/h264.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/h264.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/h264.mak 2011-06-03 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/h264.mak 2012-01-11 00:34:30.000000000 +0000 @@ -175,6 +175,7 @@ fate-h264-interlace-crop \ fate-h264-lossless \ fate-h264-extreme-plane-pred \ + fate-h264-bsf-mp4toannexb \ FATE_TESTS += $(FATE_H264) fate-h264: $(FATE_H264) @@ -183,7 +184,7 @@ fate-h264-conformance-ba1_ft_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BA1_FT_C.264 fate-h264-conformance-ba1_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BA1_Sony_D.jsv fate-h264-conformance-ba2_sony_f: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BA2_Sony_F.jsv -fate-h264-conformance-ba3_sva_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/BA3_SVA_C.264 +fate-h264-conformance-ba3_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BA3_SVA_C.264 fate-h264-conformance-ba_mw_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BA_MW_D.264 fate-h264-conformance-bamq1_jvc_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BAMQ1_JVC_C.264 fate-h264-conformance-bamq2_jvc_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/BAMQ2_JVC_C.264 @@ -193,81 +194,81 @@ fate-h264-conformance-caba1_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA1_SVA_B.264 fate-h264-conformance-caba2_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA2_Sony_E.jsv fate-h264-conformance-caba2_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA2_SVA_B.264 -fate-h264-conformance-caba3_sony_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABA3_Sony_C.jsv -fate-h264-conformance-caba3_sva_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABA3_SVA_B.264 +fate-h264-conformance-caba3_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA3_Sony_C.jsv +fate-h264-conformance-caba3_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA3_SVA_B.264 fate-h264-conformance-caba3_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABA3_TOSHIBA_E.264 -fate-h264-conformance-cabac_mot_fld0_full: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/camp_mot_fld0_full.26l -fate-h264-conformance-cabac_mot_frm0_full: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/camp_mot_frm0_full.26l -fate-h264-conformance-cabac_mot_mbaff0_full: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/camp_mot_mbaff0_full.26l -fate-h264-conformance-cabac_mot_picaff0_full: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/camp_mot_picaff0_full.26l -fate-h264-conformance-cabaci3_sony_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABACI3_Sony_B.jsv -fate-h264-conformance-cabast3_sony_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABAST3_Sony_E.jsv -fate-h264-conformance-cabastbr3_sony_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABASTBR3_Sony_B.jsv -fate-h264-conformance-cabref3_sand_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CABREF3_Sand_D.264 -fate-h264-conformance-cacqp3_sony_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CACQP3_Sony_D.jsv -fate-h264-conformance-cafi1_sva_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAFI1_SVA_C.264 +fate-h264-conformance-cabac_mot_fld0_full: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/camp_mot_fld0_full.26l +fate-h264-conformance-cabac_mot_frm0_full: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/camp_mot_frm0_full.26l +fate-h264-conformance-cabac_mot_mbaff0_full: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/camp_mot_mbaff0_full.26l +fate-h264-conformance-cabac_mot_picaff0_full: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/camp_mot_picaff0_full.26l +fate-h264-conformance-cabaci3_sony_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABACI3_Sony_B.jsv +fate-h264-conformance-cabast3_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABAST3_Sony_E.jsv +fate-h264-conformance-cabastbr3_sony_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABASTBR3_Sony_B.jsv +fate-h264-conformance-cabref3_sand_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CABREF3_Sand_D.264 +fate-h264-conformance-cacqp3_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CACQP3_Sony_D.jsv +fate-h264-conformance-cafi1_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAFI1_SVA_C.264 fate-h264-conformance-cama1_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMA1_Sony_C.jsv -fate-h264-conformance-cama1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMA1_TOSHIBA_B.264 -fate-h264-conformance-cama1_vtc_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cama1_vtc_c.avc -fate-h264-conformance-cama2_vtc_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cama2_vtc_b.avc -fate-h264-conformance-cama3_sand_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMA3_Sand_E.264 -fate-h264-conformance-cama3_vtc_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cama3_vtc_b.avc -fate-h264-conformance-camaci3_sony_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMACI3_Sony_C.jsv -fate-h264-conformance-camanl1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMANL1_TOSHIBA_B.264 -fate-h264-conformance-camanl2_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMANL2_TOSHIBA_B.264 -fate-h264-conformance-camanl3_sand_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMANL3_Sand_E.264 -fate-h264-conformance-camasl3_sony_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMASL3_Sony_B.jsv -fate-h264-conformance-camp_mot_mbaff_l30: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMP_MOT_MBAFF_L30.26l -fate-h264-conformance-camp_mot_mbaff_l31: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAMP_MOT_MBAFF_L31.26l +fate-h264-conformance-cama1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMA1_TOSHIBA_B.264 +fate-h264-conformance-cama1_vtc_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cama1_vtc_c.avc +fate-h264-conformance-cama2_vtc_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cama2_vtc_b.avc +fate-h264-conformance-cama3_sand_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMA3_Sand_E.264 +fate-h264-conformance-cama3_vtc_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cama3_vtc_b.avc +fate-h264-conformance-camaci3_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMACI3_Sony_C.jsv +fate-h264-conformance-camanl1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMANL1_TOSHIBA_B.264 +fate-h264-conformance-camanl2_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMANL2_TOSHIBA_B.264 +fate-h264-conformance-camanl3_sand_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMANL3_Sand_E.264 +fate-h264-conformance-camasl3_sony_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMASL3_Sony_B.jsv +fate-h264-conformance-camp_mot_mbaff_l30: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMP_MOT_MBAFF_L30.26l +fate-h264-conformance-camp_mot_mbaff_l31: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAMP_MOT_MBAFF_L31.26l fate-h264-conformance-canl1_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL1_Sony_E.jsv fate-h264-conformance-canl1_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL1_SVA_B.264 fate-h264-conformance-canl1_toshiba_g: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL1_TOSHIBA_G.264 fate-h264-conformance-canl2_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL2_Sony_E.jsv fate-h264-conformance-canl2_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL2_SVA_B.264 -fate-h264-conformance-canl3_sony_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CANL3_Sony_C.jsv +fate-h264-conformance-canl3_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL3_Sony_C.jsv fate-h264-conformance-canl3_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL3_SVA_B.264 fate-h264-conformance-canl4_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANL4_SVA_B.264 fate-h264-conformance-canlma2_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANLMA2_Sony_C.jsv fate-h264-conformance-canlma3_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CANLMA3_Sony_C.jsv -fate-h264-conformance-capa1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAPA1_TOSHIBA_B.264 -fate-h264-conformance-capama3_sand_f: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAPAMA3_Sand_F.264 +fate-h264-conformance-capa1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAPA1_TOSHIBA_B.264 +fate-h264-conformance-capama3_sand_f: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAPAMA3_Sand_F.264 fate-h264-conformance-capcm1_sand_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAPCM1_Sand_E.264 fate-h264-conformance-capcmnl1_sand_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAPCMNL1_Sand_E.264 -fate-h264-conformance-capm3_sony_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAPM3_Sony_D.jsv +fate-h264-conformance-capm3_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAPM3_Sony_D.jsv fate-h264-conformance-caqp1_sony_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAQP1_Sony_B.jsv -fate-h264-conformance-cavlc_mot_fld0_full_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cvmp_mot_fld0_full_B.26l -fate-h264-conformance-cavlc_mot_frm0_full_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cvmp_mot_frm0_full_B.26l -fate-h264-conformance-cavlc_mot_mbaff0_full_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cvmp_mot_mbaff0_full_B.26l -fate-h264-conformance-cavlc_mot_picaff0_full_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/cvmp_mot_picaff0_full_B.26l +fate-h264-conformance-cavlc_mot_fld0_full_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cvmp_mot_fld0_full_B.26l +fate-h264-conformance-cavlc_mot_frm0_full_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cvmp_mot_frm0_full_B.26l +fate-h264-conformance-cavlc_mot_mbaff0_full_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cvmp_mot_mbaff0_full_B.26l +fate-h264-conformance-cavlc_mot_picaff0_full_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/cvmp_mot_picaff0_full_B.26l fate-h264-conformance-cawp1_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAWP1_TOSHIBA_E.264 -fate-h264-conformance-cawp5_toshiba_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CAWP5_TOSHIBA_E.264 +fate-h264-conformance-cawp5_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CAWP5_TOSHIBA_E.264 fate-h264-conformance-ci1_ft_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CI1_FT_B.264 fate-h264-conformance-ci_mw_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CI_MW_D.264 -fate-h264-conformance-cvbs3_sony_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVBS3_Sony_C.jsv +fate-h264-conformance-cvbs3_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVBS3_Sony_C.jsv fate-h264-conformance-cvcanlma2_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVCANLMA2_Sony_C.jsv -fate-h264-conformance-cvfi1_sony_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVFI1_Sony_D.jsv -fate-h264-conformance-cvfi1_sva_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVFI1_SVA_C.264 -fate-h264-conformance-cvfi2_sony_h: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVFI2_Sony_H.jsv -fate-h264-conformance-cvfi2_sva_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVFI2_SVA_C.264 +fate-h264-conformance-cvfi1_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVFI1_Sony_D.jsv +fate-h264-conformance-cvfi1_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVFI1_SVA_C.264 +fate-h264-conformance-cvfi2_sony_h: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVFI2_Sony_H.jsv +fate-h264-conformance-cvfi2_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVFI2_SVA_C.264 fate-h264-conformance-cvma1_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMA1_Sony_D.jsv -fate-h264-conformance-cvma1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMA1_TOSHIBA_B.264 -fate-h264-conformance-cvmanl1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMANL1_TOSHIBA_B.264 -fate-h264-conformance-cvmanl2_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMANL2_TOSHIBA_B.264 -fate-h264-conformance-cvmapaqp3_sony_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMAPAQP3_Sony_E.jsv -fate-h264-conformance-cvmaqp2_sony_g: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMAQP2_Sony_G.jsv -fate-h264-conformance-cvmaqp3_sony_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMAQP3_Sony_D.jsv -fate-h264-conformance-cvmp_mot_fld_l30_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMP_MOT_FLD_L30_B.26l -fate-h264-conformance-cvmp_mot_frm_l31_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVMP_MOT_FRM_L31_B.26l -fate-h264-conformance-cvnlfi1_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVNLFI1_Sony_C.jsv -fate-h264-conformance-cvnlfi2_sony_h: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVNLFI2_Sony_H.jsv -fate-h264-conformance-cvpa1_toshiba_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVPA1_TOSHIBA_B.264 +fate-h264-conformance-cvma1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMA1_TOSHIBA_B.264 +fate-h264-conformance-cvmanl1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMANL1_TOSHIBA_B.264 +fate-h264-conformance-cvmanl2_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMANL2_TOSHIBA_B.264 +fate-h264-conformance-cvmapaqp3_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMAPAQP3_Sony_E.jsv +fate-h264-conformance-cvmaqp2_sony_g: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMAQP2_Sony_G.jsv +fate-h264-conformance-cvmaqp3_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMAQP3_Sony_D.jsv +fate-h264-conformance-cvmp_mot_fld_l30_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMP_MOT_FLD_L30_B.26l +fate-h264-conformance-cvmp_mot_frm_l31_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVMP_MOT_FRM_L31_B.26l +fate-h264-conformance-cvnlfi1_sony_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVNLFI1_Sony_C.jsv +fate-h264-conformance-cvnlfi2_sony_h: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVNLFI2_Sony_H.jsv +fate-h264-conformance-cvpa1_toshiba_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVPA1_TOSHIBA_B.264 fate-h264-conformance-cvpcmnl1_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVPCMNL1_SVA_C.264 fate-h264-conformance-cvpcmnl2_sva_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVPCMNL2_SVA_C.264 fate-h264-conformance-cvwp1_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVWP1_TOSHIBA_E.264 -fate-h264-conformance-cvwp2_toshiba_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVWP2_TOSHIBA_E.264 -fate-h264-conformance-cvwp3_toshiba_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVWP3_TOSHIBA_E.264 -fate-h264-conformance-cvwp5_toshiba_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/CVWP5_TOSHIBA_E.264 -fate-h264-conformance-fi1_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FI1_Sony_E.jsv +fate-h264-conformance-cvwp2_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVWP2_TOSHIBA_E.264 +fate-h264-conformance-cvwp3_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVWP3_TOSHIBA_E.264 +fate-h264-conformance-cvwp5_toshiba_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/CVWP5_TOSHIBA_E.264 +fate-h264-conformance-fi1_sony_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FI1_Sony_E.jsv fate-h264-conformance-frext-alphaconformanceg: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/test8b43.264 fate-h264-conformance-frext-bcrm_freh10: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/freh10.264 -vsync 0 fate-h264-conformance-frext-brcm_freh11: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/freh11.264 -vsync 0 @@ -287,7 +288,7 @@ fate-h264-conformance-frext-frext2_panasonic_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/FRExt2_Panasonic.avc -vsync 0 fate-h264-conformance-frext-frext3_panasonic_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/FRExt3_Panasonic.avc fate-h264-conformance-frext-frext4_panasonic_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/FRExt4_Panasonic.avc -fate-h264-conformance-frext-frext_mmco4_sony_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/FRExt_MMCO4_Sony_B.264 +fate-h264-conformance-frext-frext_mmco4_sony_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/FRExt_MMCO4_Sony_B.264 fate-h264-conformance-frext-hcaff1_hhi_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/HCAFF1_HHI.264 fate-h264-conformance-frext-hcafr1_hhi_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/HCAFR1_HHI.264 fate-h264-conformance-frext-hcafr2_hhi_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/HCAFR2_HHI.264 @@ -315,35 +316,35 @@ fate-h264-conformance-frext-pph10i5_panasonic_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/PPH10I5_Panasonic_A.264 -pix_fmt yuv420p10le fate-h264-conformance-frext-pph10i6_panasonic_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/PPH10I6_Panasonic_A.264 -pix_fmt yuv420p10le fate-h264-conformance-frext-pph10i7_panasonic_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/FRext/PPH10I7_Panasonic_A.264 -pix_fmt yuv420p10le -fate-h264-conformance-hcbp2_hhi_a: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/HCBP2_HHI_A.264 -fate-h264-conformance-hcmp1_hhi_a: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/HCMP1_HHI_A.264 +fate-h264-conformance-hcbp2_hhi_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/HCBP2_HHI_A.264 +fate-h264-conformance-hcmp1_hhi_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/HCMP1_HHI_A.264 fate-h264-conformance-ls_sva_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/LS_SVA_D.264 fate-h264-conformance-midr_mw_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MIDR_MW_D.264 fate-h264-conformance-mps_mw_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MPS_MW_A.264 fate-h264-conformance-mr1_bt_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR1_BT_A.h264 fate-h264-conformance-mr1_mw_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR1_MW_A.264 fate-h264-conformance-mr2_mw_a: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR2_MW_A.264 -fate-h264-conformance-mr2_tandberg_e: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR2_TANDBERG_E.264 -fate-h264-conformance-mr3_tandberg_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR3_TANDBERG_B.264 -fate-h264-conformance-mr4_tandberg_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR4_TANDBERG_C.264 -fate-h264-conformance-mr5_tandberg_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR5_TANDBERG_C.264 -fate-h264-conformance-mr6_bt_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR6_BT_B.h264 -fate-h264-conformance-mr7_bt_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR7_BT_B.h264 -fate-h264-conformance-mr8_bt_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR8_BT_B.h264 -fate-h264-conformance-mr9_bt_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR9_BT_B.h264 -fate-h264-conformance-mv1_brcm_d: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/src19td.IBP.264 +fate-h264-conformance-mr2_tandberg_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR2_TANDBERG_E.264 +fate-h264-conformance-mr3_tandberg_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR3_TANDBERG_B.264 +fate-h264-conformance-mr4_tandberg_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR4_TANDBERG_C.264 +fate-h264-conformance-mr5_tandberg_c: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/MR5_TANDBERG_C.264 +fate-h264-conformance-mr6_bt_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR6_BT_B.h264 +fate-h264-conformance-mr7_bt_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR7_BT_B.h264 +fate-h264-conformance-mr8_bt_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR8_BT_B.h264 +fate-h264-conformance-mr9_bt_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/MR9_BT_B.h264 +fate-h264-conformance-mv1_brcm_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/src19td.IBP.264 fate-h264-conformance-nl1_sony_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/NL1_Sony_D.jsv fate-h264-conformance-nl2_sony_h: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/NL2_Sony_H.jsv fate-h264-conformance-nl3_sva_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/NL3_SVA_E.264 fate-h264-conformance-nlmq1_jvc_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/NLMQ1_JVC_C.264 fate-h264-conformance-nlmq2_jvc_c: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/NLMQ2_JVC_C.264 fate-h264-conformance-nrf_mw_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/NRF_MW_E.264 -fate-h264-conformance-sharp_mp_field_1_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_Field_1_B.jvt -fate-h264-conformance-sharp_mp_field_2_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_Field_2_B.jvt -fate-h264-conformance-sharp_mp_field_3_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_Field_3_B.jvt -fate-h264-conformance-sharp_mp_paff_1r2: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/Sharp_MP_PAFF_1r2.jvt -fate-h264-conformance-sharp_mp_paff_2r: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/Sharp_MP_PAFF_2.jvt -fate-h264-conformance-sl1_sva_b: CMD = framecrc -vsync 0 -strict 1 -i $(SAMPLES)/h264-conformance/SL1_SVA_B.264 +fate-h264-conformance-sharp_mp_field_1_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_Field_1_B.jvt +fate-h264-conformance-sharp_mp_field_2_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_Field_2_B.jvt +fate-h264-conformance-sharp_mp_field_3_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_Field_3_B.jvt +fate-h264-conformance-sharp_mp_paff_1r2: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_PAFF_1r2.jvt +fate-h264-conformance-sharp_mp_paff_2r: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/Sharp_MP_PAFF_2.jvt +fate-h264-conformance-sl1_sva_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/SL1_SVA_B.264 fate-h264-conformance-sva_ba1_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/SVA_BA1_B.264 fate-h264-conformance-sva_ba2_d: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/SVA_BA2_D.264 fate-h264-conformance-sva_base_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/SVA_Base_B.264 @@ -352,6 +353,7 @@ fate-h264-conformance-sva_nl1_b: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/SVA_NL1_B.264 fate-h264-conformance-sva_nl2_e: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264-conformance/SVA_NL2_E.264 -fate-h264-interlace-crop: CMD = framecrc -vsync 0 -vframes 3 -i $(SAMPLES)/h264/interlaced_crop.mp4 +fate-h264-interlace-crop: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264/interlaced_crop.mp4 -vframes 3 fate-h264-lossless: CMD = framecrc -vsync 0 -i $(SAMPLES)/h264/lossless.h264 -fate-h264-extreme-plane-pred: CMD = framemd5 -strict 1 -vsync 0 -i $(SAMPLES)/h264/extreme-plane-pred.h264 +fate-h264-extreme-plane-pred: CMD = framemd5 -vsync 0 -i $(SAMPLES)/h264/extreme-plane-pred.h264 +fate-h264-bsf-mp4toannexb: CMD = md5 -i $(SAMPLES)/h264/interlaced_crop.mp4 -vcodec copy -bsf h264_mp4toannexb -f h264 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/image.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/image.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/image.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/image.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,32 @@ +FATE_TESTS += fate-dpx +fate-dpx: CMD = framecrc -i $(SAMPLES)/dpx/lighthouse_rgb48.dpx + +FATE_TESTS += fate-fax-g3 +fate-fax-g3: CMD = framecrc -i $(SAMPLES)/CCITT_fax/G31D.TIF + +FATE_TESTS += fate-fax-g3s +fate-fax-g3s: CMD = framecrc -i $(SAMPLES)/CCITT_fax/G31DS.TIF + +FATE_TESTS += fate-pictor +fate-pictor: CMD = framecrc -i $(SAMPLES)/pictor/MFISH.PIC -pix_fmt rgb24 + +FATE_TESTS += fate-ptx +fate-ptx: CMD = framecrc -i $(SAMPLES)/ptx/_113kw_pic.ptx -pix_fmt rgb24 + +FATE_TESTS += fate-sunraster-1bit-raw +fate-sunraster-1bit-raw: CMD = framecrc -i $(SAMPLES)/sunraster/lena-1bit-raw.sun + +FATE_TESTS += fate-sunraster-1bit-rle +fate-sunraster-1bit-rle: CMD = framecrc -i $(SAMPLES)/sunraster/lena-1bit-rle.sun + +FATE_TESTS += fate-sunraster-8bit-raw +fate-sunraster-8bit-raw: CMD = framecrc -i $(SAMPLES)/sunraster/lena-8bit-raw.sun -pix_fmt rgb24 + +FATE_TESTS += fate-sunraster-8bit-rle +fate-sunraster-8bit-rle: CMD = framecrc -i $(SAMPLES)/sunraster/lena-8bit-rle.sun -pix_fmt rgb24 + +FATE_TESTS += fate-sunraster-24bit-raw +fate-sunraster-24bit-raw: CMD = framecrc -i $(SAMPLES)/sunraster/lena-24bit-raw.sun + +FATE_TESTS += fate-sunraster-24bit-rle +fate-sunraster-24bit-rle: CMD = framecrc -i $(SAMPLES)/sunraster/lena-24bit-rle.sun diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/indeo.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/indeo.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/indeo.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/indeo.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,11 @@ +FATE_TESTS += fate-indeo2 +fate-indeo2: CMD = framecrc -i $(SAMPLES)/rt21/VPAR0026.AVI + +FATE_TESTS += fate-indeo3 +fate-indeo3: CMD = framecrc -i $(SAMPLES)/iv32/cubes.mov + +FATE_TESTS += fate-indeo4 +fate-indeo4: CMD = framecrc -i $(SAMPLES)/iv41/indeo41-partial.avi -an + +FATE_TESTS += fate-indeo5 +fate-indeo5: CMD = framecrc -i $(SAMPLES)/iv50/Educ_Movie_DeadlyForce.avi -an diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/libavcodec.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/libavcodec.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/libavcodec.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/libavcodec.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,3 @@ +FATE_TESTS += fate-iirfilter +fate-iirfilter: libavcodec/iirfilter-test$(EXESUF) +fate-iirfilter: CMD = run libavcodec/iirfilter-test diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/libavutil.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/libavutil.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/libavutil.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/libavutil.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,38 @@ +FATE_TESTS += fate-adler32 +fate-adler32: libavutil/adler32-test$(EXESUF) +fate-adler32: CMD = run libavutil/adler32-test +fate-adler32: REF = /dev/null + +FATE_TESTS += fate-aes +fate-aes: libavutil/aes-test$(EXESUF) +fate-aes: CMD = run libavutil/aes-test +fate-aes: REF = /dev/null + +FATE_TESTS += fate-base64 +fate-base64: libavutil/base64-test$(EXESUF) +fate-base64: CMD = run libavutil/base64-test + +FATE_TESTS += fate-crc +fate-crc: libavutil/crc-test$(EXESUF) +fate-crc: CMD = run libavutil/crc-test + +FATE_TESTS += fate-des +fate-des: libavutil/des-test$(EXESUF) +fate-des: CMD = run libavutil/des-test +fate-des: REF = /dev/null + +FATE_TESTS += fate-eval +fate-eval: libavutil/eval-test$(EXESUF) +fate-eval: CMD = run libavutil/eval-test + +FATE_TESTS += fate-fifo +fate-fifo: libavutil/fifo-test$(EXESUF) +fate-fifo: CMD = run libavutil/fifo-test + +FATE_TESTS += fate-md5 +fate-md5: libavutil/md5-test$(EXESUF) +fate-md5: CMD = run libavutil/md5-test + +FATE_TESTS += fate-sha +fate-sha: libavutil/sha-test$(EXESUF) +fate-sha: CMD = run libavutil/sha-test diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/lossless-audio.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/lossless-audio.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/lossless-audio.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/lossless-audio.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,17 @@ +FATE_TESTS += fate-lossless-appleaudio +fate-lossless-appleaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/inside.m4a -f s16le + +FATE_TESTS += fate-lossless-meridianaudio +fate-lossless-meridianaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.mlp -f s16le + +FATE_TESTS += fate-lossless-monkeysaudio +fate-lossless-monkeysaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.ape -f s16le + +FATE_TESTS += fate-lossless-shortenaudio +fate-lossless-shortenaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.shn -f s16le + +FATE_TESTS += fate-lossless-tta +fate-lossless-tta: CMD = crc -i $(SAMPLES)/lossless-audio/inside.tta + +FATE_TESTS += fate-lossless-wavpackaudio +fate-lossless-wavpackaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.wv -f s16le diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/lossless-video.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/lossless-video.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/lossless-video.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/lossless-video.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,17 @@ +FATE_TESTS += fate-loco-rgb +fate-loco-rgb: CMD = framecrc -i $(SAMPLES)/loco/pig-loco-rgb.avi + +FATE_TESTS += fate-loco-yuy2 +fate-loco-yuy2: CMD = framecrc -i $(SAMPLES)/loco/pig-loco-0.avi + +FATE_TESTS += fate-msrle-8bit +fate-msrle-8bit: CMD = framecrc -i $(SAMPLES)/msrle/Search-RLE.avi -pix_fmt rgb24 + +FATE_TESTS += fate-mszh +fate-mszh: CMD = framecrc -i $(SAMPLES)/lcl/mszh-1frame.avi + +FATE_TESTS += fate-vble +fate-vble: CMD = framecrc -i $(SAMPLES)/vble/flowers-partial-2MB.avi + +FATE_TESTS += fate-zlib +fate-zlib: CMD = framecrc -i $(SAMPLES)/lcl/zlib-1frame.avi diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/microsoft.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/microsoft.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/microsoft.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/microsoft.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,30 @@ +FATE_TESTS += fate-msmpeg4v1 +fate-msmpeg4v1: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/msmpeg4v1/mpg4.avi -an + +FATE_TESTS += fate-msvideo1-16bit +fate-msvideo1-16bit: CMD = framecrc -i $(SAMPLES)/cram/clock-cram16.avi -pix_fmt rgb24 + +FATE_TESTS += fate-msvideo1-8bit +fate-msvideo1-8bit: CMD = framecrc -i $(SAMPLES)/cram/skating.avi -t 1 -pix_fmt rgb24 + +FATE_TESTS += fate-wmv8-drm +# discard last packet to avoid fails due to overread of VC-1 decoder +fate-wmv8-drm: CMD = framecrc -cryptokey 137381538c84c068111902a59c5cf6c340247c39 -i $(SAMPLES)/wmv8/wmv_drm.wmv -an -vframes 162 + +FATE_TESTS += fate-wmv8-drm-nodec +fate-wmv8-drm-nodec: CMD = framecrc -cryptokey 137381538c84c068111902a59c5cf6c340247c39 -i $(SAMPLES)/wmv8/wmv_drm.wmv -acodec copy -vcodec copy + +FATE_TESTS += fate-vc1 +fate-vc1: CMD = framecrc -i $(SAMPLES)/vc1/SA00040.vc1 + +FATE_TESTS += fate-vc1_sa00050 +fate-vc1_sa00050: CMD = framecrc -i $(SAMPLES)/vc1/SA00050.vc1 + +FATE_TESTS += fate-vc1_sa10091 +fate-vc1_sa10091: CMD = framecrc -i $(SAMPLES)/vc1/SA10091.vc1 + +FATE_TESTS += fate-vc1_sa20021 +fate-vc1_sa20021: CMD = framecrc -i $(SAMPLES)/vc1/SA20021.vc1 + +FATE_TESTS += fate-vc1-ism +fate-vc1-ism: CMD = framecrc -i $(SAMPLES)/isom/vc1-wmapro.ism -an diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/mp3.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/mp3.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/mp3.mak 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/mp3.mak 2012-01-11 00:34:30.000000000 +0000 @@ -4,32 +4,32 @@ fate-mp3-float-conf-compl: REF = $(SAMPLES)/mp3-conformance/compl.pcm FATE_MP3 += fate-mp3-float-conf-he_32khz -fate-mp3-float-conf-he_32khz: CMD = pcm -acodec mp3float -fs 343296 -i $(SAMPLES)/mp3-conformance/he_32khz.bit +fate-mp3-float-conf-he_32khz: CMD = pcm -acodec mp3float -i $(SAMPLES)/mp3-conformance/he_32khz.bit -fs 343296 fate-mp3-float-conf-he_32khz: CMP = stddev fate-mp3-float-conf-he_32khz: REF = $(SAMPLES)/mp3-conformance/he_32khz.pcm FATE_MP3 += fate-mp3-float-conf-he_44khz -fate-mp3-float-conf-he_44khz: CMD = pcm -acodec mp3float -fs 942336 -i $(SAMPLES)/mp3-conformance/he_44khz.bit +fate-mp3-float-conf-he_44khz: CMD = pcm -acodec mp3float -i $(SAMPLES)/mp3-conformance/he_44khz.bit -fs 942336 fate-mp3-float-conf-he_44khz: CMP = stddev fate-mp3-float-conf-he_44khz: REF = $(SAMPLES)/mp3-conformance/he_44khz.pcm FATE_MP3 += fate-mp3-float-conf-he_48khz -fate-mp3-float-conf-he_48khz: CMD = pcm -acodec mp3float -fs 343296 -i $(SAMPLES)/mp3-conformance/he_48khz.bit +fate-mp3-float-conf-he_48khz: CMD = pcm -acodec mp3float -i $(SAMPLES)/mp3-conformance/he_48khz.bit -fs 343296 fate-mp3-float-conf-he_48khz: CMP = stddev fate-mp3-float-conf-he_48khz: REF = $(SAMPLES)/mp3-conformance/he_48khz.pcm FATE_MP3 += fate-mp3-float-conf-hecommon -fate-mp3-float-conf-hecommon: CMD = pcm -acodec mp3float -fs 133632 -i $(SAMPLES)/mp3-conformance/hecommon.bit +fate-mp3-float-conf-hecommon: CMD = pcm -acodec mp3float -i $(SAMPLES)/mp3-conformance/hecommon.bit -fs 133632 fate-mp3-float-conf-hecommon: CMP = stddev fate-mp3-float-conf-hecommon: REF = $(SAMPLES)/mp3-conformance/hecommon.pcm FATE_MP3 += fate-mp3-float-conf-si -fate-mp3-float-conf-si: CMD = pcm -acodec mp3float -fs 269568 -i $(SAMPLES)/mp3-conformance/si.bit +fate-mp3-float-conf-si: CMD = pcm -acodec mp3float -i $(SAMPLES)/mp3-conformance/si.bit -fs 269568 fate-mp3-float-conf-si: CMP = stddev fate-mp3-float-conf-si: REF = $(SAMPLES)/mp3-conformance/si.pcm FATE_MP3 += fate-mp3-float-conf-si_block -fate-mp3-float-conf-si_block: CMD = pcm -acodec mp3float -fs 145152 -i $(SAMPLES)/mp3-conformance/si_block.bit +fate-mp3-float-conf-si_block: CMD = pcm -acodec mp3float -i $(SAMPLES)/mp3-conformance/si_block.bit -fs 145152 fate-mp3-float-conf-si_block: CMP = stddev fate-mp3-float-conf-si_block: REF = $(SAMPLES)/mp3-conformance/si_block.pcm diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/mpc.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/mpc.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/mpc.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/mpc.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,11 @@ +FATE_TESTS += fate-mpc7-demux +fate-mpc7-demux: CMD = crc -i $(SAMPLES)/musepack/inside-mp7.mpc -acodec copy + +FATE_TESTS += fate-mpc8-demux +fate-mpc8-demux: CMD = crc -i $(SAMPLES)/musepack/inside-mp8.mpc -acodec copy + +FATE_TESTS += fate-musepack7 +fate-musepack7: CMD = pcm -i $(SAMPLES)/musepack/inside-mp7.mpc +fate-musepack7: CMP = oneoff +fate-musepack7: REF = $(SAMPLES)/musepack/inside-mp7.pcm +fate-musepack7: FUZZ = 1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/pcm.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/pcm.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/pcm.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/pcm.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,32 @@ +FATE_TESTS += fate-duck-dk3 +fate-duck-dk3: CMD = md5 -i $(SAMPLES)/duck/sop-audio-only.avi -f s16le + +FATE_TESTS += fate-duck-dk4 +fate-duck-dk4: CMD = md5 -i $(SAMPLES)/duck/salsa-audio-only.avi -f s16le + +FATE_TESTS += fate-ea-mad-pcm-planar +fate-ea-mad-pcm-planar: CMD = framecrc -i $(SAMPLES)/ea-mad/xeasport.mad + +FATE_TESTS += fate-film-cvid-pcm-stereo-8bit +fate-film-cvid-pcm-stereo-8bit: CMD = framecrc -i $(SAMPLES)/film/logo-capcom.cpk + +FATE_TESTS += fate-iff-pcm +fate-iff-pcm: CMD = md5 -i $(SAMPLES)/iff/Bells -f s16le + +FATE_TESTS += fate-pcm_dvd +fate-pcm_dvd: CMD = framecrc -i $(SAMPLES)/pcm-dvd/coolitnow-partial.vob -vn + +FATE_TESTS += fate-qt-rawpcm-8bit-mono-unsigned +fate-qt-rawpcm-8bit-mono-unsigned: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-8-raw.mov -f s16le + +FATE_TESTS += fate-qt-rawpcm-8bit-stereo-unsigned +fate-qt-rawpcm-8bit-stereo-unsigned: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-8-raw.mov -f s16le + +FATE_TESTS += fate-qt-rawpcm-16bit-stereo-signed-be +fate-qt-rawpcm-16bit-stereo-signed-be: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-twos.mov -f s16le + +FATE_TESTS += fate-qt-rawpcm-16bit-stereo-signed-le +fate-qt-rawpcm-16bit-stereo-signed-le: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-L-sowt.mov -f s16le + +FATE_TESTS += fate-w64 +fate-w64: CMD = crc -i $(SAMPLES)/w64/w64-pcm16.w64 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/prores.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/prores.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/prores.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/prores.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,15 @@ +FATE_PRORES = fate-prores-422 \ + fate-prores-422_hq \ + fate-prores-422_lt \ + fate-prores-422_proxy \ + fate-prores-alpha \ + +FATE_TESTS += $(FATE_PRORES) +fate-prores: $(FATE_PRORES) + +fate-prores-422: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422.mov -pix_fmt yuv422p10le +fate-prores-422_hq: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_HQ.mov -pix_fmt yuv422p10le +fate-prores-422_lt: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_LT.mov -pix_fmt yuv422p10le +fate-prores-422_proxy: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_Proxy.mov -pix_fmt yuv422p10le +fate-prores-alpha: CMD = framecrc -vsync 0 -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov -pix_fmt yuv444p10le + diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/qt.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/qt.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/qt.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/qt.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,50 @@ +FATE_TESTS += fate-8bps +fate-8bps: CMD = framecrc -i $(SAMPLES)/8bps/full9iron-partial.mov -pix_fmt rgb24 + +FATE_TESTS += fate-qdm2 +fate-qdm2: CMD = pcm -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-QDM2.mov +fate-qdm2: CMP = oneoff +fate-qdm2: REF = $(SAMPLES)/qt-surge-suite/surge-2-16-B-QDM2.pcm +fate-qdm2: FUZZ = 2 + +FATE_TESTS += fate-qt-alaw-mono +fate-qt-alaw-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-16-B-alaw.mov -f s16le + +FATE_TESTS += fate-qt-alaw-stereo +fate-qt-alaw-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-alaw.mov -f s16le + +FATE_TESTS += fate-qt-ima4-mono +fate-qt-ima4-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-16-B-ima4.mov -f s16le + +FATE_TESTS += fate-qt-ima4-stereo +fate-qt-ima4-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-ima4.mov -f s16le + +FATE_TESTS += fate-qt-mac3-mono +fate-qt-mac3-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-8-MAC3.mov -f s16le + +FATE_TESTS += fate-qt-mac3-stereo +fate-qt-mac3-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-8-MAC3.mov -f s16le + +FATE_TESTS += fate-qt-mac6-mono +fate-qt-mac6-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-8-MAC6.mov -f s16le + +FATE_TESTS += fate-qt-mac6-stereo +fate-qt-mac6-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-8-MAC6.mov -f s16le + +FATE_TESTS += fate-qt-ulaw-mono +fate-qt-ulaw-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-16-B-ulaw.mov -f s16le + +FATE_TESTS += fate-qt-ulaw-stereo +fate-qt-ulaw-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-ulaw.mov -f s16le + +FATE_TESTS += fate-quickdraw +fate-quickdraw: CMD = framecrc -i $(SAMPLES)/quickdraw/Airplane.mov -pix_fmt rgb24 + +FATE_TESTS += fate-rpza +fate-rpza: CMD = framecrc -i $(SAMPLES)/rpza/rpza2.mov -t 2 -pix_fmt rgb24 + +FATE_TESTS += fate-svq1 +fate-svq1: CMD = framecrc -i $(SAMPLES)/svq1/marymary-shackles.mov -an -t 10 + +FATE_TESTS += fate-svq3 +fate-svq3: CMD = framecrc -i $(SAMPLES)/svq3/Vertical400kbit.sorenson3.mov -t 6 -an diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/qtrle.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/qtrle.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/qtrle.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/qtrle.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,20 @@ +FATE_TESTS += fate-qtrle-1bit +fate-qtrle-1bit: CMD = framecrc -i $(SAMPLES)/qtrle/Animation-Monochrome.mov + +FATE_TESTS += fate-qtrle-2bit +fate-qtrle-2bit: CMD = framecrc -i $(SAMPLES)/qtrle/Animation-4Greys.mov -pix_fmt rgb24 + +FATE_TESTS += fate-qtrle-4bit +fate-qtrle-4bit: CMD = framecrc -i $(SAMPLES)/qtrle/Animation-16Greys.mov -pix_fmt rgb24 -an + +FATE_TESTS += fate-qtrle-8bit +fate-qtrle-8bit: CMD = framecrc -i $(SAMPLES)/qtrle/criticalpath-credits.mov -vsync 0 -pix_fmt rgb24 -an + +FATE_TESTS += fate-qtrle-16bit +fate-qtrle-16bit: CMD = framecrc -i $(SAMPLES)/qtrle/mr-cork-rle.mov -pix_fmt rgb24 + +FATE_TESTS += fate-qtrle-24bit +fate-qtrle-24bit: CMD = framecrc -i $(SAMPLES)/qtrle/aletrek-rle.mov -vsync 0 + +FATE_TESTS += fate-qtrle-32bit +fate-qtrle-32bit: CMD = framecrc -i $(SAMPLES)/qtrle/ultra_demo_720_480_32bpp_rle.mov -pix_fmt rgb24 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/real.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/real.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/real.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/real.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,39 @@ +FATE_TESTS += fate-real-14_4 +fate-real-14_4: CMD = md5 -i $(SAMPLES)/real/ra3_in_rm_file.rm -f s16le + +FATE_TESTS += fate-ra-288 +fate-ra-288: CMD = pcm -i $(SAMPLES)/real/ra_288.rm +fate-ra-288: CMP = oneoff +fate-ra-288: REF = $(SAMPLES)/real/ra_288.pcm +fate-ra-288: FUZZ = 2 + +FATE_TESTS += fate-ra-cook +fate-ra-cook: CMD = pcm -i $(SAMPLES)/real/ra_cook.rm +fate-ra-cook: CMP = oneoff +fate-ra-cook: REF = $(SAMPLES)/real/ra_cook.pcm + +FATE_TESTS += fate-rv30 +fate-rv30: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/real/rv30.rm -an + +FATE_TESTS += fate-real-rv40 +fate-real-rv40: CMD = framecrc -i $(SAMPLES)/real/spygames-2MB.rmvb -t 10 -an -vsync 0 + +FATE_TESTS += fate-sipr-5k0 +fate-sipr-5k0: CMD = pcm -i $(SAMPLES)/sipr/sipr_5k0.rm +fate-sipr-5k0: CMP = oneoff +fate-sipr-5k0: REF = $(SAMPLES)/sipr/sipr_5k0.pcm + +FATE_TESTS += fate-sipr-6k5 +fate-sipr-6k5: CMD = pcm -i $(SAMPLES)/sipr/sipr_6k5.rm +fate-sipr-6k5: CMP = oneoff +fate-sipr-6k5: REF = $(SAMPLES)/sipr/sipr_6k5.pcm + +FATE_TESTS += fate-sipr-8k5 +fate-sipr-8k5: CMD = pcm -i $(SAMPLES)/sipr/sipr_8k5.rm +fate-sipr-8k5: CMP = oneoff +fate-sipr-8k5: REF = $(SAMPLES)/sipr/sipr_8k5.pcm + +FATE_TESTS += fate-sipr-16k +fate-sipr-16k: CMD = pcm -i $(SAMPLES)/sipr/sipr_16k.rm +fate-sipr-16k: CMP = oneoff +fate-sipr-16k: REF = $(SAMPLES)/sipr/sipr_16k.pcm diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/screen.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/screen.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/screen.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/screen.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,47 @@ +FATE_TESTS += fate-cscd +fate-cscd: CMD = framecrc -i $(SAMPLES)/CSCD/sample_video.avi -an -vsync 0 -pix_fmt rgb24 + +FATE_TESTS += fate-dxtory +fate-dxtory: CMD = framecrc -i $(SAMPLES)/dxtory/dxtory_mic.avi + +FATE_TESTS += fate-fraps-v0 +fate-fraps-v0: CMD = framecrc -i $(SAMPLES)/fraps/Griffin_Ragdoll01-partial.avi + +FATE_TESTS += fate-fraps-v1 +fate-fraps-v1: CMD = framecrc -i $(SAMPLES)/fraps/sample-v1.avi -an + +FATE_TESTS += fate-fraps-v2 +fate-fraps-v2: CMD = framecrc -i $(SAMPLES)/fraps/test3-nosound-partial.avi + +FATE_TESTS += fate-fraps-v3 +fate-fraps-v3: CMD = framecrc -i $(SAMPLES)/fraps/psclient-partial.avi -pix_fmt rgb24 + +FATE_TESTS += fate-fraps-v4 +fate-fraps-v4: CMD = framecrc -i $(SAMPLES)/fraps/WoW_2006-11-03_14-58-17-19-nosound-partial.avi + +FATE_TESTS += fate-fraps-v5 +fate-fraps-v5: CMD = framecrc -i $(SAMPLES)/fraps/fraps-v5-bouncing-balls-partial.avi + +FATE_TESTS += fate-tscc-15bit +fate-tscc-15bit: CMD = framecrc -i $(SAMPLES)/tscc/oneminute.avi -t 15 -pix_fmt rgb24 + +FATE_TESTS += fate-tscc-32bit +fate-tscc-32bit: CMD = framecrc -i $(SAMPLES)/tscc/2004-12-17-uebung9-partial.avi -pix_fmt rgb24 -an + +FATE_TESTS += fate-vmnc-16bit +fate-vmnc-16bit: CMD = framecrc -i $(SAMPLES)/VMnc/test.avi -pix_fmt rgb24 + +FATE_TESTS += fate-vmnc-32bit +fate-vmnc-32bit: CMD = framecrc -i $(SAMPLES)/VMnc/VS2k5DebugDemo-01-partial.avi -pix_fmt rgb24 + +FATE_TESTS += fate-zmbv-8bit +fate-zmbv-8bit: CMD = framecrc -i $(SAMPLES)/zmbv/wc2_001-partial.avi -an -pix_fmt rgb24 + +FATE_TESTS += fate-zmbv-15bit +fate-zmbv-15bit: CMD = framecrc -i $(SAMPLES)/zmbv/zmbv_15bit.avi -pix_fmt rgb24 -t 25 + +FATE_TESTS += fate-zmbv-16bit +fate-zmbv-16bit: CMD = framecrc -i $(SAMPLES)/zmbv/zmbv_16bit.avi -pix_fmt rgb24 -t 25 + +FATE_TESTS += fate-zmbv-32bit +fate-zmbv-32bit: CMD = framecrc -i $(SAMPLES)/zmbv/zmbv_32bit.avi -pix_fmt rgb24 -t 25 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/utvideo.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/utvideo.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/utvideo.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/utvideo.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,23 @@ +FATE_TESTS += fate-utvideo_rgba_left +fate-utvideo_rgba_left: CMD = framecrc -i $(SAMPLES)/utvideo/utvideo_rgba_left.avi + +FATE_TESTS += fate-utvideo_rgba_median +fate-utvideo_rgba_median: CMD = framecrc -i $(SAMPLES)/utvideo/utvideo_rgba_median.avi + +FATE_TESTS += fate-utvideo_rgb_left +fate-utvideo_rgb_left: CMD = framecrc -i $(SAMPLES)/utvideo/utvideo_rgb_left.avi + +FATE_TESTS += fate-utvideo_rgb_median +fate-utvideo_rgb_median: CMD = framecrc -i $(SAMPLES)/utvideo/utvideo_rgb_median.avi + +FATE_TESTS += fate-utvideo_yuv420_left +fate-utvideo_yuv420_left: CMD = framecrc -i $(SAMPLES)/utvideo/utvideo_yuv420_left.avi + +FATE_TESTS += fate-utvideo_yuv420_median +fate-utvideo_yuv420_median: CMD = framecrc -i $(SAMPLES)/utvideo/utvideo_yuv420_median.avi + +FATE_TESTS += fate-utvideo_yuv422_left +fate-utvideo_yuv422_left: CMD = framecrc -i $(SAMPLES)/utvideo/utvideo_yuv422_left.avi + +FATE_TESTS += fate-utvideo_yuv422_median +fate-utvideo_yuv422_median: CMD = framecrc -i $(SAMPLES)/utvideo/utvideo_yuv422_median.avi diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/video.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/video.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/video.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/video.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,192 @@ +FATE_TESTS += fate-4xm-1 +fate-4xm-1: CMD = framecrc -i $(SAMPLES)/4xm/version1.4xm -pix_fmt rgb24 -an + +FATE_TESTS += fate-4xm-2 +fate-4xm-2: CMD = framecrc -i $(SAMPLES)/4xm/version2.4xm -pix_fmt rgb24 -an + +FATE_TESTS += fate-aasc +fate-aasc: CMD = framecrc -i $(SAMPLES)/aasc/AASC-1.5MB.AVI -pix_fmt rgb24 + +FATE_TESTS += fate-alg-mm +fate-alg-mm: CMD = framecrc -i $(SAMPLES)/alg-mm/ibmlogo.mm -an -pix_fmt rgb24 + +FATE_TESTS += fate-amv +fate-amv: CMD = framecrc -idct simple -i $(SAMPLES)/amv/MTV_high_res_320x240_sample_Penguin_Joke_MTV_from_WMV.amv -t 10 + +FATE_TESTS += fate-ansi +fate-ansi: CMD = framecrc -chars_per_frame 44100 -i $(SAMPLES)/ansi/TRE-IOM5.ANS -pix_fmt rgb24 + +FATE_TESTS += fate-armovie-escape124 +fate-armovie-escape124: CMD = framecrc -i $(SAMPLES)/rpl/ESCAPE.RPL -pix_fmt rgb24 + +FATE_TESTS += fate-auravision +fate-auravision: CMD = framecrc -i $(SAMPLES)/auravision/SOUVIDEO.AVI -an + +FATE_TESTS += fate-auravision-v2 +fate-auravision-v2: CMD = framecrc -i $(SAMPLES)/auravision/salma-hayek-in-ugly-betty-partial-avi -an + +FATE_TESTS += fate-bethsoft-vid +fate-bethsoft-vid: CMD = framecrc -i $(SAMPLES)/bethsoft-vid/ANIM0001.VID -vsync 0 -t 5 -pix_fmt rgb24 + +FATE_TESTS += fate-bfi +fate-bfi: CMD = framecrc -i $(SAMPLES)/bfi/2287.bfi -pix_fmt rgb24 + +FATE_TESTS += fate-cdgraphics +fate-cdgraphics: CMD = framecrc -i $(SAMPLES)/cdgraphics/BrotherJohn.cdg -pix_fmt rgb24 -t 1 + +FATE_TESTS += fate-cljr +fate-cljr: CMD = framecrc -i $(SAMPLES)/cljr/testcljr-partial.avi + +FATE_TESTS += fate-corepng +fate-corepng: CMD = framecrc -i $(SAMPLES)/png1/corepng-partial.avi + +FATE_TESTS += fate-creatureshock-avs +fate-creatureshock-avs: CMD = framecrc -i $(SAMPLES)/creatureshock-avs/OUTATIME.AVS -pix_fmt rgb24 + +FATE_TESTS += fate-cvid +fate-cvid: CMD = framecrc -i $(SAMPLES)/cvid/laracroft-cinepak-partial.avi -an + +FATE_TESTS += fate-cvid-palette +fate-cvid-palette: CMD = framecrc -i $(SAMPLES)/cvid/catfight-cvid-pal8-partial.mov -pix_fmt rgb24 -an + +FATE_TESTS += fate-cvid-grayscale +fate-cvid-grayscale: CMD = framecrc -i $(SAMPLES)/cvid/pcitva15.avi -an + +FATE_TESTS += fate-cyberia-c93 +fate-cyberia-c93: CMD = framecrc -i $(SAMPLES)/cyberia-c93/intro1.c93 -t 3 -pix_fmt rgb24 + +FATE_TESTS += fate-cyuv +fate-cyuv: CMD = framecrc -i $(SAMPLES)/cyuv/cyuv.avi + +FATE_TESTS += fate-delphine-cin +fate-delphine-cin: CMD = framecrc -i $(SAMPLES)/delphine-cin/LOGO-partial.CIN -pix_fmt rgb24 -vsync 0 + +FATE_TESTS += fate-deluxepaint-anm +fate-deluxepaint-anm: CMD = framecrc -i $(SAMPLES)/deluxepaint-anm/INTRO1.ANM -pix_fmt rgb24 + +FATE_TESTS += fate-duck-tm2 +fate-duck-tm2: CMD = framecrc -i $(SAMPLES)/duck/tm20.avi + +FATE_TESTS += fate-dxa-scummvm +fate-dxa-scummvm: CMD = framecrc -i $(SAMPLES)/dxa/scummvm.dxa -pix_fmt rgb24 + +FATE_TESTS += fate-feeble-dxa +fate-feeble-dxa: CMD = framecrc -i $(SAMPLES)/dxa/meetsquid.dxa -t 2 -pix_fmt rgb24 + +FATE_TESTS += fate-flic-af11-palette-change +fate-flic-af11-palette-change: CMD = framecrc -i $(SAMPLES)/fli/fli-engines.fli -t 3.3 -pix_fmt rgb24 + +FATE_TESTS += fate-flic-af12 +fate-flic-af12: CMD = framecrc -i $(SAMPLES)/fli/jj00c2.fli -pix_fmt rgb24 + +FATE_TESTS += fate-flic-magiccarpet +fate-flic-magiccarpet: CMD = framecrc -i $(SAMPLES)/fli/intel.dat -pix_fmt rgb24 + +FATE_TESTS += fate-frwu +fate-frwu: CMD = framecrc -i $(SAMPLES)/frwu/frwu.avi + +FATE_TESTS += fate-id-cin-video +fate-id-cin-video: CMD = framecrc -i $(SAMPLES)/idcin/idlog-2MB.cin -pix_fmt rgb24 + +FATE_TESTS-$(CONFIG_AVFILTER) += fate-idroq-video-encode +fate-idroq-video-encode: CMD = md5 -f image2 -vcodec pgmyuv -i $(SAMPLES)/ffmpeg-synthetic/vsynth1/%02d.pgm -sws_flags +bitexact -vf pad=512:512:80:112 -f RoQ -t 0.2 + +FATE_TESTS += fate-iff-byterun1 +fate-iff-byterun1: CMD = framecrc -i $(SAMPLES)/iff/ASH.LBM -pix_fmt rgb24 + +FATE_TESTS += fate-iff-fibonacci +fate-iff-fibonacci: CMD = md5 -i $(SAMPLES)/iff/dasboot-in-compressed -f s16le + +FATE_TESTS += fate-iff-ilbm +fate-iff-ilbm: CMD = framecrc -i $(SAMPLES)/iff/lms-matriks.ilbm -pix_fmt rgb24 + +FATE_TESTS += fate-kmvc +fate-kmvc: CMD = framecrc -i $(SAMPLES)/KMVC/LOGO1.AVI -an -t 3 -pix_fmt rgb24 + +FATE_TESTS += fate-mimic +fate-mimic: CMD = framecrc -idct simple -i $(SAMPLES)/mimic/mimic2-womanloveffmpeg.cam -vsync 0 + +FATE_TESTS += fate-mjpegb +fate-mjpegb: CMD = framecrc -idct simple -flags +bitexact -i $(SAMPLES)/mjpegb/mjpegb_part.mov -an + +FATE_TESTS += fate-motionpixels +fate-motionpixels: CMD = framecrc -i $(SAMPLES)/motion-pixels/INTRO-partial.MVI -an -pix_fmt rgb24 -vframes 111 + +FATE_TESTS += fate-mpeg2-field-enc +fate-mpeg2-field-enc: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/mpeg2/mpeg2_field_encoding.ts -an + +FATE_TESTS += fate-nuv +fate-nuv: CMD = framecrc -idct simple -i $(SAMPLES)/nuv/Today.nuv -vsync 0 + +FATE_TESTS += fate-qpeg +fate-qpeg: CMD = framecrc -i $(SAMPLES)/qpeg/Clock.avi -an -pix_fmt rgb24 + +FATE_TESTS += fate-r210 +fate-r210: CMD = framecrc -i $(SAMPLES)/r210/r210.avi -pix_fmt rgb48le + +FATE_TESTS += fate-rl2 +fate-rl2: CMD = framecrc -i $(SAMPLES)/rl2/Z4915300.RL2 -pix_fmt rgb24 -an -vsync 0 + +FATE_TESTS += fate-smacker +fate-smacker: CMD = framecrc -i $(SAMPLES)/smacker/wetlogo.smk -pix_fmt rgb24 + +FATE_TESTS += fate-smc +fate-smc: CMD = framecrc -i $(SAMPLES)/smc/cass_schi.qt -vsync 0 -pix_fmt rgb24 + +FATE_TESTS += fate-sp5x +fate-sp5x: CMD = framecrc -idct simple -i $(SAMPLES)/sp5x/sp5x_problem.avi + +FATE_TESTS += fate-sub-srt +fate-sub-srt: CMD = md5 -i $(SAMPLES)/sub/SubRip_capability_tester.srt -f ass + +FATE_TESTS += fate-tiertex-seq +fate-tiertex-seq: CMD = framecrc -i $(SAMPLES)/tiertex-seq/Gameover.seq -pix_fmt rgb24 + +FATE_TESTS += fate-tmv +fate-tmv: CMD = framecrc -i $(SAMPLES)/tmv/pop-partial.tmv -pix_fmt rgb24 + +FATE_TESTS += fate-truemotion1-15 +fate-truemotion1-15: CMD = framecrc -i $(SAMPLES)/duck/phant2-940.duk -pix_fmt rgb24 + +FATE_TESTS += fate-truemotion1-24 +fate-truemotion1-24: CMD = framecrc -i $(SAMPLES)/duck/sonic3dblast_intro-partial.avi -pix_fmt rgb24 + +FATE_TESTS += fate-txd-16bpp +fate-txd-16bpp: CMD = framecrc -i $(SAMPLES)/txd/misc.txd -pix_fmt bgra -an + +FATE_TESTS += fate-txd-pal8 +fate-txd-pal8: CMD = framecrc -i $(SAMPLES)/txd/outro.txd -pix_fmt rgb24 -an + +FATE_TESTS += fate-ulti +fate-ulti: CMD = framecrc -i $(SAMPLES)/ulti/hit12w.avi -an + +FATE_TESTS += fate-v210 +fate-v210: CMD = framecrc -i $(SAMPLES)/v210/v210_720p-partial.avi -pix_fmt yuv422p16be -an + +FATE_TESTS += fate-v410dec +fate-v410dec: CMD = framecrc -i $(SAMPLES)/v410/lenav410.mov -pix_fmt yuv444p10le + +FATE_TESTS += fate-v410enc +fate-v410enc: tests/vsynth1/00.pgm +fate-v410enc: CMD = md5 -f image2 -vcodec pgmyuv -i $(TARGET_PATH)/tests/vsynth1/%02d.pgm -flags +bitexact -vcodec v410 -f avi + +FATE_TESTS += fate-vcr1 +fate-vcr1: CMD = framecrc -i $(SAMPLES)/vcr1/VCR1test.avi -an + +FATE_TESTS += fate-video-xl +fate-video-xl: CMD = framecrc -i $(SAMPLES)/vixl/pig-vixl.avi + +FATE_TESTS += fate-vqa-cc +fate-vqa-cc: CMD = framecrc -i $(SAMPLES)/vqa/cc-demo1-partial.vqa -pix_fmt rgb24 + +FATE_TESTS += fate-wc3movie-xan +fate-wc3movie-xan: CMD = framecrc -i $(SAMPLES)/wc3movie/SC_32-part.MVE -pix_fmt rgb24 + +FATE_TESTS += fate-wnv1 +fate-wnv1: CMD = framecrc -i $(SAMPLES)/wnv1/wnv1-codec.avi -an + +FATE_TESTS += fate-yop +fate-yop: CMD = framecrc -i $(SAMPLES)/yop/test1.yop -pix_fmt rgb24 -an + +FATE_TESTS += fate-xxan-wc4 +fate-xxan-wc4: CMD = framecrc -i $(SAMPLES)/wc4-xan/wc4trailer-partial.avi -an diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/voice.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/voice.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/voice.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/voice.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,22 @@ +FATE_TESTS += fate-g722dec-1 +fate-g722dec-1: CMD = framecrc -i $(SAMPLES)/g722/conf-adminmenu-162.g722 + +FATE_TESTS += fate-g722enc +fate-g722enc: tests/data/asynth-16000-1.sw +fate-g722enc: CMD = md5 -ar 16000 -ac 1 -f s16le -i $(TARGET_PATH)/tests/data/asynth-16000-1.sw -acodec g722 -ac 1 -f g722 + +FATE_TESTS += fate-gsm +fate-gsm: CMD = framecrc -i $(SAMPLES)/gsm/sample-gsm-8000.mov -t 10 + +FATE_TESTS += fate-gsm-ms +fate-gsm-ms: CMD = framecrc -i $(SAMPLES)/gsm/ciao.wav + +FATE_TESTS += fate-qcelp +fate-qcelp: CMD = pcm -i $(SAMPLES)/qcp/0036580847.QCP +fate-qcelp: CMP = oneoff +fate-qcelp: REF = $(SAMPLES)/qcp/0036580847.pcm + +FATE_TESTS += fate-truespeech +fate-truespeech: CMD = pcm -i $(SAMPLES)/truespeech/a6.wav +fate-truespeech: CMP = oneoff +fate-truespeech: REF = $(SAMPLES)/truespeech/a6.pcm diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/vp8.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/vp8.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/vp8.mak 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/vp8.mak 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -VP8_SUITE = 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 - -define FATE_VP8_SUITE -FATE_VP8 += fate-vp8-test-vector$(2)-$(1) -fate-vp8-test-vector$(2)-$(1): CMD = framemd5 $(3) -i $(SAMPLES)/vp8-test-vectors-r1/vp80-00-comprehensive-$(1).ivf -fate-vp8-test-vector$(2)-$(1): REF = $(SRC_PATH_BARE)/tests/ref/fate/vp8-test-vector-$(1) -endef - -define FATE_VP8_FULL -$(foreach N,$(VP8_SUITE),$(eval $(call FATE_VP8_SUITE,$(N),$(1),$(2)))) - -FATE_VP8 += fate-vp8-sign-bias$(1) -fate-vp8-sign-bias$(1): CMD = framemd5 $(2) -i $(SAMPLES)/vp8/sintel-signbias.ivf -fate-vp8-sign-bias$(1): REF = $(SRC_PATH_BARE)/tests/ref/fate/vp8-sign-bias -endef - -$(eval $(call FATE_VP8_FULL)) -$(eval $(call FATE_VP8_FULL,-emu-edge,-flags emu_edge)) -FATE_TESTS += $(FATE_VP8) -fate-vp8: $(FATE_VP8) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/vpx.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/vpx.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/vpx.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/vpx.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,41 @@ +FATE_TESTS += fate-ea-vp60 +fate-ea-vp60: CMD = framecrc -i $(SAMPLES)/ea-vp6/g36.vp6 + +FATE_TESTS += fate-ea-vp61 +fate-ea-vp61: CMD = framecrc -i $(SAMPLES)/ea-vp6/MovieSkirmishGondor.vp6 -t 4 + +FATE_TESTS += fate-vp3 +fate-vp3: CMD = framecrc -i $(SAMPLES)/vp3/vp31.avi + +FATE_TESTS += fate-vp3-coeff-level64 +fate-vp3-coeff-level64: CMD = framecrc -i $(SAMPLES)/vp3/coeff_level64.mkv + +FATE_TESTS += fate-vp5 +fate-vp5: CMD = framecrc -i $(SAMPLES)/vp5/potter512-400-partial.avi -an + +FATE_TESTS += fate-vp6a +fate-vp6a: CMD = framecrc -i $(SAMPLES)/flash-vp6/300x180-Scr-f8-056alpha.flv + +FATE_TESTS += fate-vp6f +fate-vp6f: CMD = framecrc -i $(SAMPLES)/flash-vp6/clip1024.flv + +VP8_SUITE = 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 + +define FATE_VP8_SUITE +FATE_VP8 += fate-vp8-test-vector$(2)-$(1) +fate-vp8-test-vector$(2)-$(1): CMD = framemd5 $(3) -i $(SAMPLES)/vp8-test-vectors-r1/vp80-00-comprehensive-$(1).ivf +fate-vp8-test-vector$(2)-$(1): REF = $(SRC_PATH)/tests/ref/fate/vp8-test-vector-$(1) +endef + +define FATE_VP8_FULL +$(foreach N,$(VP8_SUITE),$(eval $(call FATE_VP8_SUITE,$(N),$(1),$(2)))) + +FATE_VP8 += fate-vp8-sign-bias$(1) +fate-vp8-sign-bias$(1): CMD = framemd5 $(2) -i $(SAMPLES)/vp8/sintel-signbias.ivf -vsync 0 +fate-vp8-sign-bias$(1): REF = $(SRC_PATH)/tests/ref/fate/vp8-sign-bias +endef + +$(eval $(call FATE_VP8_FULL)) +$(eval $(call FATE_VP8_FULL,-emu-edge,-flags emu_edge)) +FATE_TESTS += $(FATE_VP8) +fate-vp8: $(FATE_VP8) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/vqf.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/vqf.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/vqf.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/vqf.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,7 @@ +FATE_TESTS += fate-twinvq +fate-twinvq: CMD = pcm -i $(SAMPLES)/vqf/achterba.vqf +fate-twinvq: CMP = oneoff +fate-twinvq: REF = $(SAMPLES)/vqf/achterba.pcm + +FATE_TESTS += fate-vqf-demux +fate-vqf-demux: CMD = md5 -i $(SAMPLES)/vqf/achterba.vqf -acodec copy -f framecrc diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/wma.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/wma.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate/wma.mak 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate/wma.mak 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,32 @@ +FATE_TESTS += fate-wmapro-2ch +fate-wmapro-2ch: CMD = pcm -i $(SAMPLES)/wmapro/Beethovens_9th-1_small.wma +fate-wmapro-2ch: CMP = oneoff +fate-wmapro-2ch: REF = $(SAMPLES)/wmapro/Beethovens_9th-1_small.pcm + +FATE_TESTS += fate-wmapro-5.1 +fate-wmapro-5.1: CMD = pcm -i $(SAMPLES)/wmapro/latin_192_mulitchannel_cut.wma +fate-wmapro-5.1: CMP = oneoff +fate-wmapro-5.1: REF = $(SAMPLES)/wmapro/latin_192_mulitchannel_cut.pcm + +FATE_TESTS += fate-wmapro-ism +fate-wmapro-ism: CMD = pcm -i $(SAMPLES)/isom/vc1-wmapro.ism -vn +fate-wmapro-ism: CMP = oneoff +fate-wmapro-ism: REF = $(SAMPLES)/isom/vc1-wmapro.pcm + +FATE_TESTS += fate-wmavoice-7k +fate-wmavoice-7k: CMD = pcm -i $(SAMPLES)/wmavoice/streaming_CBR-7K.wma +fate-wmavoice-7k: CMP = stddev +fate-wmavoice-7k: REF = $(SAMPLES)/wmavoice/streaming_CBR-7K.pcm +fate-wmavoice-7k: FUZZ = 3 + +FATE_TESTS += fate-wmavoice-11k +fate-wmavoice-11k: CMD = pcm -i $(SAMPLES)/wmavoice/streaming_CBR-11K.wma +fate-wmavoice-11k: CMP = stddev +fate-wmavoice-11k: REF = $(SAMPLES)/wmavoice/streaming_CBR-11K.pcm +fate-wmavoice-11k: FUZZ = 3 + +FATE_TESTS += fate-wmavoice-19k +fate-wmavoice-19k: CMD = pcm -i $(SAMPLES)/wmavoice/streaming_CBR-19K.wma +fate-wmavoice-19k: CMP = stddev +fate-wmavoice-19k: REF = $(SAMPLES)/wmavoice/streaming_CBR-19K.pcm +fate-wmavoice-19k: FUZZ = 3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate2.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate2.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate2.mak 2011-06-17 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate2.mak 1970-01-01 00:00:00.000000000 +0000 @@ -1,332 +0,0 @@ -FATE_TESTS += fate-twinvq -fate-twinvq: CMD = pcm -i $(SAMPLES)/vqf/achterba.vqf -fate-twinvq: CMP = oneoff -fate-twinvq: REF = $(SAMPLES)/vqf/achterba.pcm - -FATE_TESTS += fate-sipr-16k -fate-sipr-16k: CMD = pcm -i $(SAMPLES)/sipr/sipr_16k.rm -fate-sipr-16k: CMP = oneoff -fate-sipr-16k: REF = $(SAMPLES)/sipr/sipr_16k.pcm - -FATE_TESTS += fate-sipr-8k5 -fate-sipr-8k5: CMD = pcm -i $(SAMPLES)/sipr/sipr_8k5.rm -fate-sipr-8k5: CMP = oneoff -fate-sipr-8k5: REF = $(SAMPLES)/sipr/sipr_8k5.pcm - -FATE_TESTS += fate-sipr-6k5 -fate-sipr-6k5: CMD = pcm -i $(SAMPLES)/sipr/sipr_6k5.rm -fate-sipr-6k5: CMP = oneoff -fate-sipr-6k5: REF = $(SAMPLES)/sipr/sipr_6k5.pcm - -FATE_TESTS += fate-sipr-5k0 -fate-sipr-5k0: CMD = pcm -i $(SAMPLES)/sipr/sipr_5k0.rm -fate-sipr-5k0: CMP = oneoff -fate-sipr-5k0: REF = $(SAMPLES)/sipr/sipr_5k0.pcm - -FATE_TESTS += fate-ra-288 -fate-ra-288: CMD = pcm -i $(SAMPLES)/real/ra_288.rm -fate-ra-288: CMP = oneoff -fate-ra-288: REF = $(SAMPLES)/real/ra_288.pcm -fate-ra-288: FUZZ = 2 - -FATE_TESTS += fate-ra-cook -fate-ra-cook: CMD = pcm -i $(SAMPLES)/real/ra_cook.rm -fate-ra-cook: CMP = oneoff -fate-ra-cook: REF = $(SAMPLES)/real/ra_cook.pcm - -FATE_TESTS += fate-mpeg2-field-enc -fate-mpeg2-field-enc: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/mpeg2/mpeg2_field_encoding.ts -an - -FATE_TESTS += fate-qcelp -fate-qcelp: CMD = pcm -i $(SAMPLES)/qcp/0036580847.QCP -fate-qcelp: CMP = oneoff -fate-qcelp: REF = $(SAMPLES)/qcp/0036580847.pcm - -FATE_TESTS += fate-qdm2 -fate-qdm2: CMD = pcm -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-QDM2.mov -fate-qdm2: CMP = oneoff -fate-qdm2: REF = $(SAMPLES)/qt-surge-suite/surge-2-16-B-QDM2.pcm -fate-qdm2: FUZZ = 2 - -FATE_TESTS += fate-imc -fate-imc: CMD = pcm -i $(SAMPLES)/imc/imc.avi -fate-imc: CMP = oneoff -fate-imc: REF = $(SAMPLES)/imc/imc.pcm - -FATE_TESTS += fate-yop -fate-yop: CMD = framecrc -i $(SAMPLES)/yop/test1.yop -pix_fmt rgb24 -an - -FATE_TESTS += fate-pictor -fate-pictor: CMD = framecrc -i $(SAMPLES)/pictor/MFISH.PIC -pix_fmt rgb24 -an - -FATE_TESTS += fate-dts -fate-dts: CMD = pcm -i $(SAMPLES)/dts/dts.ts -fate-dts: CMP = oneoff -fate-dts: REF = $(SAMPLES)/dts/dts.pcm - -FATE_TESTS += fate-nellymoser -fate-nellymoser: CMD = pcm -i $(SAMPLES)/nellymoser/nellymoser.flv -fate-nellymoser: CMP = oneoff -fate-nellymoser: REF = $(SAMPLES)/nellymoser/nellymoser.pcm - -FATE_TESTS += fate-truespeech -fate-truespeech: CMD = pcm -i $(SAMPLES)/truespeech/a6.wav -fate-truespeech: CMP = oneoff -fate-truespeech: REF = $(SAMPLES)/truespeech/a6.pcm - -FATE_TESTS += fate-ac3-2.0 -fate-ac3-2.0: CMD = pcm -i $(SAMPLES)/ac3/monsters_inc_2.0_192_small.ac3 -fate-ac3-2.0: CMP = oneoff -fate-ac3-2.0: REF = $(SAMPLES)/ac3/monsters_inc_2.0_192_small.pcm - -FATE_TESTS += fate-ac3-5.1 -fate-ac3-5.1: CMD = pcm -i $(SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3 -fate-ac3-5.1: CMP = oneoff -fate-ac3-5.1: REF = $(SAMPLES)/ac3/monsters_inc_5.1_448_small.pcm - -FATE_TESTS += fate-eac3-1 -fate-eac3-1: CMD = pcm -i $(SAMPLES)/eac3/csi_miami_5.1_256_spx_small.eac3 -fate-eac3-1: CMP = oneoff -fate-eac3-1: REF = $(SAMPLES)/eac3/csi_miami_5.1_256_spx_small.pcm - -FATE_TESTS += fate-eac3-2 -fate-eac3-2: CMD = pcm -i $(SAMPLES)/eac3/csi_miami_stereo_128_spx_small.eac3 -fate-eac3-2: CMP = oneoff -fate-eac3-2: REF = $(SAMPLES)/eac3/csi_miami_stereo_128_spx_small.pcm - -FATE_TESTS += fate-eac3-3 -fate-eac3-3: CMD = pcm -i $(SAMPLES)/eac3/matrix2_commentary1_stereo_192_small.eac3 -fate-eac3-3: CMP = oneoff -fate-eac3-3: REF = $(SAMPLES)/eac3/matrix2_commentary1_stereo_192_small.pcm - -FATE_TESTS += fate-eac3-4 -fate-eac3-4: CMD = pcm -i $(SAMPLES)/eac3/serenity_english_5.1_1536_small.eac3 -fate-eac3-4: CMP = oneoff -fate-eac3-4: REF = $(SAMPLES)/eac3/serenity_english_5.1_1536_small.pcm - -FATE_TESTS += fate-atrac1 -fate-atrac1: CMD = pcm -i $(SAMPLES)/atrac1/test_tones_small.aea -fate-atrac1: CMP = oneoff -fate-atrac1: REF = $(SAMPLES)/atrac1/test_tones_small.pcm - -FATE_TESTS += fate-atrac3-1 -fate-atrac3-1: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_066_small.wav -fate-atrac3-1: CMP = oneoff -fate-atrac3-1: REF = $(SAMPLES)/atrac3/mc_sich_at3_066_small.pcm - -FATE_TESTS += fate-atrac3-2 -fate-atrac3-2: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_105_small.wav -fate-atrac3-2: CMP = oneoff -fate-atrac3-2: REF = $(SAMPLES)/atrac3/mc_sich_at3_105_small.pcm - -FATE_TESTS += fate-atrac3-3 -fate-atrac3-3: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_132_small.wav -fate-atrac3-3: CMP = oneoff -fate-atrac3-3: REF = $(SAMPLES)/atrac3/mc_sich_at3_132_small.pcm - -FATE_TESTS += fate-gsm -fate-gsm: CMD = framecrc -t 10 -i $(SAMPLES)/gsm/sample-gsm-8000.mov - -FATE_TESTS += fate-gsm-ms -fate-gsm-ms: CMD = framecrc -i $(SAMPLES)/gsm/ciao.wav - -FATE_TESTS += fate-g722dec-1 -fate-g722dec-1: CMD = framecrc -ar 16000 -i $(SAMPLES)/g722/conf-adminmenu-162.g722 - -FATE_TESTS += fate-msmpeg4v1 -fate-msmpeg4v1: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/msmpeg4v1/mpg4.avi -an - -FATE_TESTS += fate-wmavoice-7k -fate-wmavoice-7k: CMD = pcm -i $(SAMPLES)/wmavoice/streaming_CBR-7K.wma -fate-wmavoice-7k: CMP = stddev -fate-wmavoice-7k: REF = $(SAMPLES)/wmavoice/streaming_CBR-7K.pcm -fate-wmavoice-7k: FUZZ = 3 - -FATE_TESTS += fate-wmavoice-11k -fate-wmavoice-11k: CMD = pcm -i $(SAMPLES)/wmavoice/streaming_CBR-11K.wma -fate-wmavoice-11k: CMP = stddev -fate-wmavoice-11k: REF = $(SAMPLES)/wmavoice/streaming_CBR-11K.pcm -fate-wmavoice-11k: FUZZ = 3 - -FATE_TESTS += fate-wmavoice-19k -fate-wmavoice-19k: CMD = pcm -i $(SAMPLES)/wmavoice/streaming_CBR-19K.wma -fate-wmavoice-19k: CMP = stddev -fate-wmavoice-19k: REF = $(SAMPLES)/wmavoice/streaming_CBR-19K.pcm -fate-wmavoice-19k: FUZZ = 3 - -FATE_TESTS += fate-wmapro-5.1 -fate-wmapro-5.1: CMD = pcm -i $(SAMPLES)/wmapro/latin_192_mulitchannel_cut.wma -fate-wmapro-5.1: CMP = oneoff -fate-wmapro-5.1: REF = $(SAMPLES)/wmapro/latin_192_mulitchannel_cut.pcm - -FATE_TESTS += fate-wmapro-2ch -fate-wmapro-2ch: CMD = pcm -i $(SAMPLES)/wmapro/Beethovens_9th-1_small.wma -fate-wmapro-2ch: CMP = oneoff -fate-wmapro-2ch: REF = $(SAMPLES)/wmapro/Beethovens_9th-1_small.pcm - -FATE_TESTS += fate-ansi -fate-ansi: CMD = framecrc -chars_per_frame 44100 -i $(SAMPLES)/ansi/TRE-IOM5.ANS -pix_fmt rgb24 - -FATE_TESTS += fate-wmv8-drm -# discard last packet to avoid fails due to overread of VC-1 decoder -fate-wmv8-drm: CMD = framecrc -cryptokey 137381538c84c068111902a59c5cf6c340247c39 -i $(SAMPLES)/wmv8/wmv_drm.wmv -an -vframes 162 - -FATE_TESTS += fate-wmv8-drm-nodec -fate-wmv8-drm-nodec: CMD = framecrc -cryptokey 137381538c84c068111902a59c5cf6c340247c39 -i $(SAMPLES)/wmv8/wmv_drm.wmv -acodec copy -vcodec copy - -FATE_TESTS += fate-binkaudio-dct -fate-binkaudio-dct: CMD = pcm -i $(SAMPLES)/bink/binkaudio_dct.bik -fate-binkaudio-dct: CMP = oneoff -fate-binkaudio-dct: REF = $(SAMPLES)/bink/binkaudio_dct.pcm -fate-binkaudio-dct: FUZZ = 2 - -FATE_TESTS += fate-binkaudio-rdft -fate-binkaudio-rdft: CMD = pcm -i $(SAMPLES)/bink/binkaudio_rdft.bik -fate-binkaudio-rdft: CMP = oneoff -fate-binkaudio-rdft: REF = $(SAMPLES)/bink/binkaudio_rdft.pcm -fate-binkaudio-rdft: FUZZ = 2 - -FATE_TESTS += fate-txd-pal8 -fate-txd-pal8: CMD = framecrc -i $(SAMPLES)/txd/outro.txd -pix_fmt rgb24 -an - -FATE_TESTS += fate-txd-16bpp -fate-txd-16bpp: CMD = framecrc -i $(SAMPLES)/txd/misc.txd -pix_fmt bgra -an - -FATE_TESTS += fate-vp3 -fate-vp3: CMD = framecrc -i $(SAMPLES)/vp3/vp31.avi - -FATE_TESTS += fate-fax-g3 -fate-fax-g3: CMD = framecrc -i $(SAMPLES)/CCITT_fax/G31D.TIF - -FATE_TESTS += fate-fax-g3s -fate-fax-g3s: CMD = framecrc -i $(SAMPLES)/CCITT_fax/G31DS.TIF - -FATE_TESTS += fate-ws_snd -fate-ws_snd: CMD = md5 -i $(SAMPLES)/vqa/ws_snd.vqa -f s16le - -FATE_TESTS += fate-dxa-scummvm -fate-dxa-scummvm: CMD = framecrc -i $(SAMPLES)/dxa/scummvm.dxa -pix_fmt rgb24 - -FATE_TESTS += fate-mjpegb -fate-mjpegb: CMD = framecrc -idct simple -flags +bitexact -i $(SAMPLES)/mjpegb/mjpegb_part.mov -an - -FATE_TESTS += fate-rv30 -fate-rv30: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/real/rv30.rm -an - -FATE_TESTS += fate-sha -fate-sha: libavutil/sha-test$(EXESUF) -fate-sha: CMD = run libavutil/sha-test - -FATE_TESTS += fate-musepack7 -fate-musepack7: CMD = pcm -i $(SAMPLES)/musepack/inside-mp7.mpc -fate-musepack7: CMP = oneoff -fate-musepack7: REF = $(SAMPLES)/musepack/inside-mp7.pcm -fate-musepack7: FUZZ = 1 - -FATE_TESTS += fate-amrnb-4k75 -fate-amrnb-4k75: CMD = pcm -i $(SAMPLES)/amrnb/4.75k.amr -fate-amrnb-4k75: CMP = stddev -fate-amrnb-4k75: REF = $(SAMPLES)/amrnb/4.75k.pcm -fate-amrnb-4k75: FUZZ = 1 - -FATE_TESTS += fate-amrnb-5k15 -fate-amrnb-5k15: CMD = pcm -i $(SAMPLES)/amrnb/5.15k.amr -fate-amrnb-5k15: CMP = stddev -fate-amrnb-5k15: REF = $(SAMPLES)/amrnb/5.15k.pcm -fate-amrnb-5k15: FUZZ = 1 - -FATE_TESTS += fate-amrnb-5k9 -fate-amrnb-5k9: CMD = pcm -i $(SAMPLES)/amrnb/5.9k.amr -fate-amrnb-5k9: CMP = stddev -fate-amrnb-5k9: REF = $(SAMPLES)/amrnb/5.9k.pcm -fate-amrnb-5k9: FUZZ = 1 - -FATE_TESTS += fate-amrnb-6k7 -fate-amrnb-6k7: CMD = pcm -i $(SAMPLES)/amrnb/6.7k.amr -fate-amrnb-6k7: CMP = stddev -fate-amrnb-6k7: REF = $(SAMPLES)/amrnb/6.7k.pcm -fate-amrnb-6k7: FUZZ = 1 - -FATE_TESTS += fate-amrnb-7k4 -fate-amrnb-7k4: CMD = pcm -i $(SAMPLES)/amrnb/7.4k.amr -fate-amrnb-7k4: CMP = stddev -fate-amrnb-7k4: REF = $(SAMPLES)/amrnb/7.4k.pcm -fate-amrnb-7k4: FUZZ = 1 - -FATE_TESTS += fate-amrnb-7k95 -fate-amrnb-7k95: CMD = pcm -i $(SAMPLES)/amrnb/7.95k.amr -fate-amrnb-7k95: CMP = stddev -fate-amrnb-7k95: REF = $(SAMPLES)/amrnb/7.95k.pcm -fate-amrnb-7k95: FUZZ = 1 - -FATE_TESTS += fate-amrnb-10k2 -fate-amrnb-10k2: CMD = pcm -i $(SAMPLES)/amrnb/10.2k.amr -fate-amrnb-10k2: CMP = stddev -fate-amrnb-10k2: REF = $(SAMPLES)/amrnb/10.2k.pcm -fate-amrnb-10k2: FUZZ = 1 - -FATE_TESTS += fate-amrnb-12k2 -fate-amrnb-12k2: CMD = pcm -i $(SAMPLES)/amrnb/12.2k.amr -fate-amrnb-12k2: CMP = stddev -fate-amrnb-12k2: REF = $(SAMPLES)/amrnb/12.2k.pcm -fate-amrnb-12k2: FUZZ = 1 - -FATE_TESTS += fate-amrwb-6k60 -fate-amrwb-6k60: CMD = pcm -i $(SAMPLES)/amrwb/seed-6k60.awb -fate-amrwb-6k60: CMP = stddev -fate-amrwb-6k60: REF = $(SAMPLES)/amrwb/seed-6k60.pcm -fate-amrwb-6k60: FUZZ = 1 - -FATE_TESTS += fate-amrwb-8k85 -fate-amrwb-8k85: CMD = pcm -i $(SAMPLES)/amrwb/seed-8k85.awb -fate-amrwb-8k85: CMP = stddev -fate-amrwb-8k85: REF = $(SAMPLES)/amrwb/seed-8k85.pcm -fate-amrwb-8k85: FUZZ = 1 - -FATE_TESTS += fate-amrwb-12k65 -fate-amrwb-12k65: CMD = pcm -i $(SAMPLES)/amrwb/seed-12k65.awb -fate-amrwb-12k65: CMP = stddev -fate-amrwb-12k65: REF = $(SAMPLES)/amrwb/seed-12k65.pcm -fate-amrwb-12k65: FUZZ = 1 - -FATE_TESTS += fate-amrwb-14k25 -fate-amrwb-14k25: CMD = pcm -i $(SAMPLES)/amrwb/seed-14k25.awb -fate-amrwb-14k25: CMP = stddev -fate-amrwb-14k25: REF = $(SAMPLES)/amrwb/seed-14k25.pcm -fate-amrwb-14k25: FUZZ = 2.6 - -FATE_TESTS += fate-amrwb-15k85 -fate-amrwb-15k85: CMD = pcm -i $(SAMPLES)/amrwb/seed-15k85.awb -fate-amrwb-15k85: CMP = stddev -fate-amrwb-15k85: REF = $(SAMPLES)/amrwb/seed-15k85.pcm -fate-amrwb-15k85: FUZZ = 1 - -FATE_TESTS += fate-amrwb-18k25 -fate-amrwb-18k25: CMD = pcm -i $(SAMPLES)/amrwb/seed-18k25.awb -fate-amrwb-18k25: CMP = stddev -fate-amrwb-18k25: REF = $(SAMPLES)/amrwb/seed-18k25.pcm -fate-amrwb-18k25: FUZZ = 1 - -FATE_TESTS += fate-amrwb-19k85 -fate-amrwb-19k85: CMD = pcm -i $(SAMPLES)/amrwb/seed-19k85.awb -fate-amrwb-19k85: CMP = stddev -fate-amrwb-19k85: REF = $(SAMPLES)/amrwb/seed-19k85.pcm -fate-amrwb-19k85: FUZZ = 1 - -FATE_TESTS += fate-amrwb-23k05 -fate-amrwb-23k05: CMD = pcm -i $(SAMPLES)/amrwb/seed-23k05.awb -fate-amrwb-23k05: CMP = stddev -fate-amrwb-23k05: REF = $(SAMPLES)/amrwb/seed-23k05.pcm -fate-amrwb-23k05: FUZZ = 2 - -FATE_TESTS += fate-amrwb-23k85 -fate-amrwb-23k85: CMD = pcm -i $(SAMPLES)/amrwb/seed-23k85.awb -fate-amrwb-23k85: CMP = stddev -fate-amrwb-23k85: REF = $(SAMPLES)/amrwb/seed-23k85.pcm -fate-amrwb-23k85: FUZZ = 2 - -FATE_TESTS += fate-amrwb-23k85-2 -fate-amrwb-23k85-2: CMD = pcm -i $(SAMPLES)/amrwb/deus-23k85.awb -fate-amrwb-23k85-2: CMP = stddev -fate-amrwb-23k85-2: REF = $(SAMPLES)/amrwb/deus-23k85.pcm -fate-amrwb-23k85-2: FUZZ = 1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate.mak mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate.mak --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate.mak 2011-03-27 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate.mak 1970-01-01 00:00:00.000000000 +0000 @@ -1,364 +0,0 @@ -FATE_TESTS += fate-4xm-1 -fate-4xm-1: CMD = framecrc -i $(SAMPLES)/4xm/version1.4xm -pix_fmt rgb24 -an -FATE_TESTS += fate-4xm-2 -fate-4xm-2: CMD = framecrc -i $(SAMPLES)/4xm/version2.4xm -pix_fmt rgb24 -an -FATE_TESTS += fate-8bps -fate-8bps: CMD = framecrc -i $(SAMPLES)/8bps/full9iron-partial.mov -pix_fmt rgb24 -FATE_TESTS += fate-aac-demux -fate-aac-demux: CMD = crc -i $(SAMPLES)/aac/ct_faac-adts.aac -acodec copy -FATE_TESTS += fate-aasc -fate-aasc: CMD = framecrc -i $(SAMPLES)/aasc/AASC-1.5MB.AVI -pix_fmt rgb24 -FATE_TESTS += fate-adpcm-ea-r2 -fate-adpcm-ea-r2: CMD = crc -i $(SAMPLES)/ea-mpc/THX_logo.mpc -vn -FATE_TESTS += fate-adpcm-ea-r3 -fate-adpcm-ea-r3: CMD = crc -i $(SAMPLES)/ea-vp6/THX_logo.vp6 -vn -FATE_TESTS += fate-aea-demux -fate-aea-demux: CMD = crc -i $(SAMPLES)/aea/chirp.aea -acodec copy -FATE_TESTS += fate-alg-mm -fate-alg-mm: CMD = framecrc -i $(SAMPLES)/alg-mm/ibmlogo.mm -an -pix_fmt rgb24 -FATE_TESTS += fate-amv -fate-amv: CMD = framecrc -idct simple -i $(SAMPLES)/amv/MTV_high_res_320x240_sample_Penguin_Joke_MTV_from_WMV.amv -t 10 -FATE_TESTS += fate-armovie-escape124 -fate-armovie-escape124: CMD = framecrc -i $(SAMPLES)/rpl/ESCAPE.RPL -pix_fmt rgb24 -FATE_TESTS += fate-auravision -fate-auravision: CMD = framecrc -i $(SAMPLES)/auravision/SOUVIDEO.AVI -an -FATE_TESTS += fate-auravision-v2 -fate-auravision-v2: CMD = framecrc -i $(SAMPLES)/auravision/salma-hayek-in-ugly-betty-partial-avi -an -FATE_TESTS += fate-bethsoft-vid -fate-bethsoft-vid: CMD = framecrc -i $(SAMPLES)/bethsoft-vid/ANIM0001.VID -vsync 0 -t 5 -pix_fmt rgb24 -FATE_TESTS += fate-bfi -fate-bfi: CMD = framecrc -i $(SAMPLES)/bfi/2287.bfi -pix_fmt rgb24 -FATE_TESTS += fate-bink-demux -fate-bink-demux: CMD = crc -i $(SAMPLES)/bink/Snd0a7d9b58.dee -vn -acodec copy -FATE_TESTS += fate-bink-demux-video -fate-bink-demux-video: CMD = framecrc -i $(SAMPLES)/bink/hol2br.bik -FATE_TESTS += fate-caf -fate-caf: CMD = crc -i $(SAMPLES)/caf/caf-pcm16.caf -FATE_TESTS += fate-cdgraphics -fate-cdgraphics: CMD = framecrc -t 1 -i $(SAMPLES)/cdgraphics/BrotherJohn.cdg -pix_fmt rgb24 -FATE_TESTS += fate-cljr -fate-cljr: CMD = framecrc -i $(SAMPLES)/cljr/testcljr-partial.avi -FATE_TESTS += fate-corepng -fate-corepng: CMD = framecrc -i $(SAMPLES)/png1/corepng-partial.avi -FATE_TESTS += fate-creative-adpcm -fate-creative-adpcm: CMD = md5 -i $(SAMPLES)/creative/intro-partial.wav -f s16le -FATE_TESTS += fate-creative-adpcm-8-2.6bit -fate-creative-adpcm-8-2.6bit: CMD = md5 -i $(SAMPLES)/creative/BBC_3BIT.VOC -f s16le -FATE_TESTS += fate-creative-adpcm-8-2bit -fate-creative-adpcm-8-2bit: CMD = md5 -i $(SAMPLES)/creative/BBC_2BIT.VOC -f s16le -FATE_TESTS += fate-creative-adpcm-8-4bit -fate-creative-adpcm-8-4bit: CMD = md5 -i $(SAMPLES)/creative/BBC_4BIT.VOC -f s16le -FATE_TESTS += fate-creatureshock-avs -fate-creatureshock-avs: CMD = framecrc -i $(SAMPLES)/creatureshock-avs/OUTATIME.AVS -pix_fmt rgb24 -FATE_TESTS += fate-cryo-apc -fate-cryo-apc: CMD = md5 -i $(SAMPLES)/cryo-apc/cine007.APC -f s16le -FATE_TESTS += fate-cscd -fate-cscd: CMD = framecrc -i $(SAMPLES)/CSCD/sample_video.avi -an -vsync 0 -pix_fmt rgb24 -FATE_TESTS += fate-cvid -fate-cvid: CMD = framecrc -i $(SAMPLES)/cvid/laracroft-cinepak-partial.avi -an -FATE_TESTS += fate-cvid-palette -fate-cvid-palette: CMD = framecrc -i $(SAMPLES)/cvid/catfight-cvid-pal8-partial.mov -pix_fmt rgb24 -an -FATE_TESTS += fate-cyberia-c93 -fate-cyberia-c93: CMD = framecrc -i $(SAMPLES)/cyberia-c93/intro1.c93 -t 3 -pix_fmt rgb24 -FATE_TESTS += fate-cyuv -fate-cyuv: CMD = framecrc -i $(SAMPLES)/cyuv/cyuv.avi -FATE_TESTS += fate-d-cinema-demux -fate-d-cinema-demux: CMD = framecrc -i $(SAMPLES)/d-cinema/THX_Science_FLT_1920-partial.302 -acodec copy -pix_fmt rgb24 -FATE_TESTS += fate-delphine-cin -fate-delphine-cin: CMD = framecrc -i $(SAMPLES)/delphine-cin/LOGO-partial.CIN -pix_fmt rgb24 -vsync 0 -FATE_TESTS += fate-deluxepaint-anm -fate-deluxepaint-anm: CMD = framecrc -i $(SAMPLES)/deluxepaint-anm/INTRO1.ANM -pix_fmt rgb24 -FATE_TESTS += fate-dpx -fate-dpx: CMD = framecrc -i $(SAMPLES)/dpx/lighthouse_rgb48.dpx -FATE_TESTS += fate-duck-dk3 -fate-duck-dk3: CMD = md5 -i $(SAMPLES)/duck/sop-audio-only.avi -f s16le -FATE_TESTS += fate-duck-dk4 -fate-duck-dk4: CMD = md5 -i $(SAMPLES)/duck/salsa-audio-only.avi -f s16le -FATE_TESTS += fate-duck-tm2 -fate-duck-tm2: CMD = framecrc -i $(SAMPLES)/duck/tm20.avi -FATE_TESTS += fate-ea-cdata -fate-ea-cdata: CMD = md5 -i $(SAMPLES)/ea-cdata/166b084d.46410f77.0009b440.24be960c.cdata -f s16le -FATE_TESTS += fate-ea-cmv -fate-ea-cmv: CMD = framecrc -i $(SAMPLES)/ea-cmv/TITLE.CMV -vsync 0 -pix_fmt rgb24 -FATE_TESTS += fate-ea-dct -fate-ea-dct: CMD = framecrc -idct simple -i $(SAMPLES)/ea-dct/NFS2Esprit-partial.dct -FATE_TESTS += fate-ea-mad-adpcm-ea-r1 -fate-ea-mad-adpcm-ea-r1: CMD = framecrc -i $(SAMPLES)/ea-mad/NFS6LogoE.mad -FATE_TESTS += fate-ea-mad-pcm-planar -fate-ea-mad-pcm-planar: CMD = framecrc -i $(SAMPLES)/ea-mad/xeasport.mad -FATE_TESTS += fate-ea-tgq -fate-ea-tgq: CMD = framecrc -i $(SAMPLES)/ea-tgq/v27.tgq -an -FATE_TESTS += fate-ea-tgv-ima-ea-eacs -fate-ea-tgv-ima-ea-eacs: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTRO8K-partial.TGV -pix_fmt rgb24 -FATE_TESTS += fate-ea-tgv-ima-ea-sead -fate-ea-tgv-ima-ea-sead: CMD = framecrc -i $(SAMPLES)/ea-tgv/INTEL_S.TGV -pix_fmt rgb24 -FATE_TESTS += fate-ea-tqi-adpcm -fate-ea-tqi-adpcm: CMD = framecrc -i $(SAMPLES)/ea-wve/networkBackbone-partial.wve -FATE_TESTS += fate-ea-vp60 -fate-ea-vp60: CMD = framecrc -i $(SAMPLES)/ea-vp6/g36.vp6 -FATE_TESTS += fate-ea-vp61 -fate-ea-vp61: CMD = framecrc -i $(SAMPLES)/ea-vp6/MovieSkirmishGondor.vp6 -t 4 -FATE_TESTS += fate-feeble-dxa -fate-feeble-dxa: CMD = framecrc -i $(SAMPLES)/dxa/meetsquid.dxa -t 2 -pix_fmt rgb24 -FATE_TESTS += fate-film-cvid-pcm-stereo-8bit -fate-film-cvid-pcm-stereo-8bit: CMD = framecrc -i $(SAMPLES)/film/logo-capcom.cpk -FATE_TESTS += fate-flic-af11-palette-change -fate-flic-af11-palette-change: CMD = framecrc -i $(SAMPLES)/fli/fli-engines.fli -t 3.3 -pix_fmt rgb24 -FATE_TESTS += fate-flic-af12 -fate-flic-af12: CMD = framecrc -i $(SAMPLES)/fli/jj00c2.fli -pix_fmt rgb24 -FATE_TESTS += fate-flic-magiccarpet -fate-flic-magiccarpet: CMD = framecrc -i $(SAMPLES)/fli/intel.dat -pix_fmt rgb24 -FATE_TESTS += fate-fraps-v0 -fate-fraps-v0: CMD = framecrc -i $(SAMPLES)/fraps/Griffin_Ragdoll01-partial.avi -FATE_TESTS += fate-fraps-v1 -fate-fraps-v1: CMD = framecrc -i $(SAMPLES)/fraps/sample-v1.avi -an -FATE_TESTS += fate-fraps-v2 -fate-fraps-v2: CMD = framecrc -i $(SAMPLES)/fraps/test3-nosound-partial.avi -FATE_TESTS += fate-fraps-v3 -fate-fraps-v3: CMD = framecrc -i $(SAMPLES)/fraps/psclient-partial.avi -pix_fmt rgb24 -FATE_TESTS += fate-fraps-v4 -fate-fraps-v4: CMD = framecrc -i $(SAMPLES)/fraps/WoW_2006-11-03_14-58-17-19-nosound-partial.avi -FATE_TESTS += fate-fraps-v5 -fate-fraps-v5: CMD = framecrc -i $(SAMPLES)/fraps/fraps-v5-bouncing-balls-partial.avi -FATE_TESTS += fate-frwu -fate-frwu: CMD = framecrc -i $(SAMPLES)/frwu/frwu.avi -FATE_TESTS += fate-funcom-iss -fate-funcom-iss: CMD = md5 -i $(SAMPLES)/funcom-iss/0004010100.iss -f s16le -FATE_TESTS += fate-id-cin-video -fate-id-cin-video: CMD = framecrc -i $(SAMPLES)/idcin/idlog-2MB.cin -pix_fmt rgb24 -FATE_TESTS += fate-idroq-video-dpcm -fate-idroq-video-dpcm: CMD = framecrc -i $(SAMPLES)/idroq/idlogo.roq -FATE_TESTS += fate-idroq-video-encode -fate-idroq-video-encode: CMD = md5 -t 0.2 -f image2 -vcodec pgmyuv -i $(SAMPLES)/ffmpeg-synthetic/vsynth1/%02d.pgm -sws_flags +bitexact -vf pad=512:512:80:112 -f RoQ -FATE_TESTS += fate-iff-byterun1 -fate-iff-byterun1: CMD = framecrc -i $(SAMPLES)/iff/ASH.LBM -pix_fmt rgb24 -FATE_TESTS += fate-iff-fibonacci -fate-iff-fibonacci: CMD = md5 -i $(SAMPLES)/iff/dasboot-in-compressed -f s16le -FATE_TESTS += fate-iff-ilbm -fate-iff-ilbm: CMD = framecrc -i $(SAMPLES)/iff/lms-matriks.ilbm -pix_fmt rgb24 -FATE_TESTS += fate-iff-pcm -fate-iff-pcm: CMD = md5 -i $(SAMPLES)/iff/Bells -f s16le -FATE_TESTS += fate-indeo2 -fate-indeo2: CMD = framecrc -i $(SAMPLES)/rt21/VPAR0026.AVI -FATE_TESTS += fate-indeo3 -fate-indeo3: CMD = framecrc -i $(SAMPLES)/iv32/cubes.mov -FATE_TESTS += fate-indeo5 -fate-indeo5: CMD = framecrc -i $(SAMPLES)/iv50/Educ_Movie_DeadlyForce.avi -an -FATE_TESTS += fate-interplay-mve-16bit -fate-interplay-mve-16bit: CMD = framecrc -i $(SAMPLES)/interplay-mve/descent3-level5-16bit-partial.mve -pix_fmt rgb24 -FATE_TESTS += fate-interplay-mve-8bit -fate-interplay-mve-8bit: CMD = framecrc -i $(SAMPLES)/interplay-mve/interplay-logo-2MB.mve -pix_fmt rgb24 -FATE_TESTS += fate-iv8-demux -fate-iv8-demux: CMD = framecrc -i $(SAMPLES)/iv8/zzz-partial.mpg -vsync 0 -vcodec copy -FATE_TESTS += fate-kmvc -fate-kmvc: CMD = framecrc -i $(SAMPLES)/KMVC/LOGO1.AVI -an -t 3 -pix_fmt rgb24 -FATE_TESTS += fate-lmlm4-demux -fate-lmlm4-demux: CMD = framecrc -i $(SAMPLES)/lmlm4/LMLM4_CIFat30fps.divx -t 3 -acodec copy -vcodec copy -FATE_TESTS += fate-loco-rgb -fate-loco-rgb: CMD = framecrc -i $(SAMPLES)/loco/pig-loco-rgb.avi -FATE_TESTS += fate-loco-yuy2 -fate-loco-yuy2: CMD = framecrc -i $(SAMPLES)/loco/pig-loco-0.avi -FATE_TESTS += fate-lossless-appleaudio -fate-lossless-appleaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/inside.m4a -f s16le -FATE_TESTS += fate-lossless-meridianaudio -fate-lossless-meridianaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.mlp -f s16le -FATE_TESTS += fate-lossless-monkeysaudio -fate-lossless-monkeysaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.ape -f s16le -FATE_TESTS += fate-lossless-shortenaudio -fate-lossless-shortenaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.shn -f s16le -FATE_TESTS += fate-lossless-tta -fate-lossless-tta: CMD = crc -i $(SAMPLES)/lossless-audio/inside.tta -FATE_TESTS += fate-lossless-wavpackaudio -fate-lossless-wavpackaudio: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.wv -f s16le -FATE_TESTS += fate-maxis-xa -fate-maxis-xa: CMD = md5 -i $(SAMPLES)/maxis-xa/SC2KBUG.XA -f s16le -FATE_TESTS += fate-mimic -fate-mimic: CMD = framecrc -idct simple -i $(SAMPLES)/mimic/mimic2-womanloveffmpeg.cam -vsync 0 -FATE_TESTS += fate-motionpixels -fate-motionpixels: CMD = framecrc -i $(SAMPLES)/motion-pixels/INTRO-partial.MVI -an -pix_fmt rgb24 -FATE_TESTS += fate-mpc7-demux -fate-mpc7-demux: CMD = crc -i $(SAMPLES)/musepack/inside-mp7.mpc -acodec copy -FATE_TESTS += fate-mpc8-demux -fate-mpc8-demux: CMD = crc -i $(SAMPLES)/musepack/inside-mp8.mpc -acodec copy -FATE_TESTS += fate-msrle-8bit -fate-msrle-8bit: CMD = framecrc -i $(SAMPLES)/msrle/Search-RLE.avi -pix_fmt rgb24 -FATE_TESTS += fate-msvideo1-16bit -fate-msvideo1-16bit: CMD = framecrc -i $(SAMPLES)/cram/clock-cram16.avi -pix_fmt rgb24 -FATE_TESTS += fate-msvideo1-8bit -fate-msvideo1-8bit: CMD = framecrc -i $(SAMPLES)/cram/skating.avi -t 1 -pix_fmt rgb24 -FATE_TESTS += fate-mszh -fate-mszh: CMD = framecrc -i $(SAMPLES)/lcl/mszh-1frame.avi -FATE_TESTS += fate-mtv -fate-mtv: CMD = framecrc -i $(SAMPLES)/mtv/comedian_auto-partial.mtv -acodec copy -pix_fmt rgb24 -FATE_TESTS += fate-mxf-demux -fate-mxf-demux: CMD = framecrc -i $(SAMPLES)/mxf/C0023S01.mxf -acodec copy -vcodec copy -FATE_TESTS += fate-nc-demux -fate-nc-demux: CMD = framecrc -i $(SAMPLES)/nc-camera/nc-sample-partial -vcodec copy -FATE_TESTS += fate-nsv-demux -fate-nsv-demux: CMD = framecrc -i $(SAMPLES)/nsv/witchblade-51kbps.nsv -t 6 -vcodec copy -acodec copy -FATE_TESTS += fate-nuv -fate-nuv: CMD = framecrc -idct simple -i $(SAMPLES)/nuv/Today.nuv -FATE_TESTS += fate-oma-demux -fate-oma-demux: CMD = crc -i $(SAMPLES)/oma/01-Untitled-partial.oma -acodec copy -FATE_TESTS += fate-pcm_dvd -fate-pcm_dvd: CMD = framecrc -i $(SAMPLES)/pcm-dvd/coolitnow-partial.vob -vn -FATE_TESTS += fate-psx-str -fate-psx-str: CMD = framecrc -i $(SAMPLES)/psx-str/descent-partial.str -FATE_TESTS += fate-psx-str-v3-mdec -fate-psx-str-v3-mdec: CMD = framecrc -i $(SAMPLES)/psx-str/abc000_cut.str -an -FATE_TESTS += fate-psx-str-v3-adpcm_xa -fate-psx-str-v3-adpcm_xa: CMD = framecrc -i $(SAMPLES)/psx-str/abc000_cut.str -vn -FATE_TESTS += fate-ptx -fate-ptx: CMD = framecrc -i $(SAMPLES)/ptx/_113kw_pic.ptx -pix_fmt rgb24 -FATE_TESTS += fate-pva-demux -fate-pva-demux: CMD = framecrc -idct simple -i $(SAMPLES)/pva/PVA_test-partial.pva -t 0.6 -acodec copy -FATE_TESTS += fate-qcp-demux -fate-qcp-demux: CMD = crc -i $(SAMPLES)/qcp/0036580847.QCP -acodec copy -FATE_TESTS += fate-qpeg -fate-qpeg: CMD = framecrc -i $(SAMPLES)/qpeg/Clock.avi -an -pix_fmt rgb24 -FATE_TESTS += fate-qt-alaw-mono -fate-qt-alaw-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-16-B-alaw.mov -f s16le -FATE_TESTS += fate-qt-alaw-stereo -fate-qt-alaw-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-alaw.mov -f s16le -FATE_TESTS += fate-qt-ima4-mono -fate-qt-ima4-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-16-B-ima4.mov -f s16le -FATE_TESTS += fate-qt-ima4-stereo -fate-qt-ima4-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-ima4.mov -f s16le -FATE_TESTS += fate-qt-mac3-mono -fate-qt-mac3-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-8-MAC3.mov -f s16le -FATE_TESTS += fate-qt-mac3-stereo -fate-qt-mac3-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-8-MAC3.mov -f s16le -FATE_TESTS += fate-qt-mac6-mono -fate-qt-mac6-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-8-MAC6.mov -f s16le -FATE_TESTS += fate-qt-mac6-stereo -fate-qt-mac6-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-8-MAC6.mov -f s16le -FATE_TESTS += fate-qt-msadpcm-stereo -fate-qt-msadpcm-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-L-ms02.mov -f s16le -FATE_TESTS += fate-qt-msimaadpcm-stereo -fate-qt-msimaadpcm-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-L-ms11.mov -f s16le -FATE_TESTS += fate-qt-rawpcm-16bit-stereo-signed-be -fate-qt-rawpcm-16bit-stereo-signed-be: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-twos.mov -f s16le -FATE_TESTS += fate-qt-rawpcm-16bit-stereo-signed-le -fate-qt-rawpcm-16bit-stereo-signed-le: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-L-sowt.mov -f s16le -FATE_TESTS += fate-qt-rawpcm-8bit-mono-unsigned -fate-qt-rawpcm-8bit-mono-unsigned: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-8-raw.mov -f s16le -FATE_TESTS += fate-qt-rawpcm-8bit-stereo-unsigned -fate-qt-rawpcm-8bit-stereo-unsigned: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-8-raw.mov -f s16le -FATE_TESTS += fate-qt-ulaw-mono -fate-qt-ulaw-mono: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-1-16-B-ulaw.mov -f s16le -FATE_TESTS += fate-qt-ulaw-stereo -fate-qt-ulaw-stereo: CMD = md5 -i $(SAMPLES)/qt-surge-suite/surge-2-16-B-ulaw.mov -f s16le -FATE_TESTS += fate-qtrle-16bit -fate-qtrle-16bit: CMD = framecrc -i $(SAMPLES)/qtrle/mr-cork-rle.mov -pix_fmt rgb24 -FATE_TESTS += fate-qtrle-1bit -fate-qtrle-1bit: CMD = framecrc -i $(SAMPLES)/qtrle/Animation-Monochrome.mov -FATE_TESTS += fate-qtrle-24bit -fate-qtrle-24bit: CMD = framecrc -i $(SAMPLES)/qtrle/aletrek-rle.mov -vsync 0 -FATE_TESTS += fate-qtrle-2bit -fate-qtrle-2bit: CMD = framecrc -i $(SAMPLES)/qtrle/Animation-4Greys.mov -pix_fmt rgb24 -FATE_TESTS += fate-qtrle-32bit -fate-qtrle-32bit: CMD = framecrc -i $(SAMPLES)/qtrle/ultra_demo_720_480_32bpp_rle.mov -pix_fmt rgb24 -FATE_TESTS += fate-qtrle-4bit -fate-qtrle-4bit: CMD = framecrc -i $(SAMPLES)/qtrle/Animation-16Greys.mov -pix_fmt rgb24 -an -FATE_TESTS += fate-qtrle-8bit -fate-qtrle-8bit: CMD = framecrc -i $(SAMPLES)/qtrle/criticalpath-credits.mov -vsync 0 -pix_fmt rgb24 -an -FATE_TESTS += fate-quickdraw -fate-quickdraw: CMD = framecrc -i $(SAMPLES)/quickdraw/Airplane.mov -pix_fmt rgb24 -FATE_TESTS += fate-real-14_4 -fate-real-14_4: CMD = md5 -i $(SAMPLES)/real/ra3_in_rm_file.rm -f s16le -FATE_TESTS += fate-real-rv40 -fate-real-rv40: CMD = framecrc -i $(SAMPLES)/real/spygames-2MB.rmvb -t 10 -an -FATE_TESTS += fate-redcode-demux -fate-redcode-demux: CMD = framecrc -i $(SAMPLES)/r3d/4MB-sample.r3d -vcodec copy -acodec copy -FATE_TESTS += fate-rl2 -fate-rl2: CMD = framecrc -i $(SAMPLES)/rl2/Z4915300.RL2 -pix_fmt rgb24 -an -vsync 0 -FATE_TESTS += fate-rpza -fate-rpza: CMD = framecrc -i $(SAMPLES)/rpza/rpza2.mov -t 2 -pix_fmt rgb24 -FATE_TESTS += fate-sierra-audio -fate-sierra-audio: CMD = md5 -i $(SAMPLES)/sol/lsl7sample.sol -f s16le -FATE_TESTS += fate-sierra-vmd -fate-sierra-vmd: CMD = framecrc -i $(SAMPLES)/vmd/12.vmd -vsync 0 -pix_fmt rgb24 -FATE_TESTS += fate-siff -fate-siff: CMD = framecrc -i $(SAMPLES)/SIFF/INTRO_B.VB -t 3 -pix_fmt rgb24 -FATE_TESTS += fate-smacker -fate-smacker: CMD = framecrc -i $(SAMPLES)/smacker/wetlogo.smk -pix_fmt rgb24 -FATE_TESTS += fate-smc -fate-smc: CMD = framecrc -i $(SAMPLES)/smc/cass_schi.qt -vsync 0 -pix_fmt rgb24 -FATE_TESTS += fate-sp5x -fate-sp5x: CMD = framecrc -idct simple -i $(SAMPLES)/sp5x/sp5x_problem.avi -FATE_TESTS += fate-sub-srt -fate-sub-srt: CMD = md5 -i $(SAMPLES)/sub/SubRip_capability_tester.srt -f ass -FATE_TESTS += fate-sunraster-1bit-raw -fate-sunraster-1bit-raw: CMD = framecrc -i $(SAMPLES)/sunraster/lena-1bit-raw.sun -FATE_TESTS += fate-sunraster-1bit-rle -fate-sunraster-1bit-rle: CMD = framecrc -i $(SAMPLES)/sunraster/lena-1bit-rle.sun -FATE_TESTS += fate-sunraster-24bit-raw -fate-sunraster-24bit-raw: CMD = framecrc -i $(SAMPLES)/sunraster/lena-24bit-raw.sun -FATE_TESTS += fate-sunraster-24bit-rle -fate-sunraster-24bit-rle: CMD = framecrc -i $(SAMPLES)/sunraster/lena-24bit-rle.sun -FATE_TESTS += fate-sunraster-8bit-raw -fate-sunraster-8bit-raw: CMD = framecrc -i $(SAMPLES)/sunraster/lena-8bit-raw.sun -pix_fmt rgb24 -FATE_TESTS += fate-sunraster-8bit-rle -fate-sunraster-8bit-rle: CMD = framecrc -i $(SAMPLES)/sunraster/lena-8bit-rle.sun -pix_fmt rgb24 -FATE_TESTS += fate-svq1 -fate-svq1: CMD = framecrc -i $(SAMPLES)/svq1/marymary-shackles.mov -an -t 10 -FATE_TESTS += fate-svq3 -fate-svq3: CMD = framecrc -i $(SAMPLES)/svq3/Vertical400kbit.sorenson3.mov -t 6 -an -FATE_TESTS += fate-thp-mjpeg-adpcm -fate-thp-mjpeg-adpcm: CMD = framecrc -idct simple -i $(SAMPLES)/thp/pikmin2-opening1-partial.thp -FATE_TESTS += fate-tiertex-seq -fate-tiertex-seq: CMD = framecrc -i $(SAMPLES)/tiertex-seq/Gameover.seq -pix_fmt rgb24 -FATE_TESTS += fate-tmv -fate-tmv: CMD = framecrc -i $(SAMPLES)/tmv/pop-partial.tmv -pix_fmt rgb24 -FATE_TESTS += fate-truemotion1-15 -fate-truemotion1-15: CMD = framecrc -i $(SAMPLES)/duck/phant2-940.duk -pix_fmt rgb24 -FATE_TESTS += fate-truemotion1-24 -fate-truemotion1-24: CMD = framecrc -i $(SAMPLES)/duck/sonic3dblast_intro-partial.avi -pix_fmt rgb24 -FATE_TESTS += fate-tscc-15bit -fate-tscc-15bit: CMD = framecrc -i $(SAMPLES)/tscc/oneminute.avi -t 15 -pix_fmt rgb24 -FATE_TESTS += fate-tscc-32bit -fate-tscc-32bit: CMD = framecrc -i $(SAMPLES)/tscc/2004-12-17-uebung9-partial.avi -pix_fmt rgb24 -an -FATE_TESTS += fate-ulti -fate-ulti: CMD = framecrc -i $(SAMPLES)/ulti/hit12w.avi -an -FATE_TESTS += fate-v210 -fate-v210: CMD = framecrc -i $(SAMPLES)/v210/v210_720p-partial.avi -pix_fmt yuv422p16be -an -FATE_TESTS += fate-vc1 -fate-vc1: CMD = framecrc -i $(SAMPLES)/vc1/SA00040.vc1 -FATE_TESTS += fate-vcr1 -fate-vcr1: CMD = framecrc -i $(SAMPLES)/vcr1/VCR1test.avi -an -FATE_TESTS += fate-video-xl -fate-video-xl: CMD = framecrc -i $(SAMPLES)/vixl/pig-vixl.avi -FATE_TESTS += fate-vmnc-16bit -fate-vmnc-16bit: CMD = framecrc -i $(SAMPLES)/VMnc/test.avi -pix_fmt rgb24 -FATE_TESTS += fate-vmnc-32bit -fate-vmnc-32bit: CMD = framecrc -i $(SAMPLES)/VMnc/VS2k5DebugDemo-01-partial.avi -pix_fmt rgb24 -FATE_TESTS += fate-vp5 -fate-vp5: CMD = framecrc -i $(SAMPLES)/vp5/potter512-400-partial.avi -an -FATE_TESTS += fate-vp6a -fate-vp6a: CMD = framecrc -i $(SAMPLES)/flash-vp6/300x180-Scr-f8-056alpha.flv -FATE_TESTS += fate-vp6f -fate-vp6f: CMD = framecrc -i $(SAMPLES)/flash-vp6/clip1024.flv -FATE_TESTS += fate-vqa-cc -fate-vqa-cc: CMD = framecrc -i $(SAMPLES)/vqa/cc-demo1-partial.vqa -pix_fmt rgb24 -FATE_TESTS += fate-vqf-demux -fate-vqf-demux: CMD = md5 -i $(SAMPLES)/vqf/achterba.vqf -acodec copy -f framecrc -FATE_TESTS += fate-w64 -fate-w64: CMD = crc -i $(SAMPLES)/w64/w64-pcm16.w64 -FATE_TESTS += fate-wc3movie-xan -fate-wc3movie-xan: CMD = framecrc -i $(SAMPLES)/wc3movie/SC_32-part.MVE -pix_fmt rgb24 -FATE_TESTS += fate-westwood-aud -fate-westwood-aud: CMD = md5 -i $(SAMPLES)/westwood-aud/excellent.aud -f s16le -FATE_TESTS += fate-wnv1 -fate-wnv1: CMD = framecrc -i $(SAMPLES)/wnv1/wnv1-codec.avi -an -FATE_TESTS += fate-xan-dpcm -fate-xan-dpcm: CMD = md5 -i $(SAMPLES)/wc4-xan/wc4_2.avi -vn -f s16le -FATE_TESTS += fate-zlib -fate-zlib: CMD = framecrc -i $(SAMPLES)/lcl/zlib-1frame.avi -FATE_TESTS += fate-zmbv-15bit -fate-zmbv-15bit: CMD = framecrc -i $(SAMPLES)/zmbv/zmbv_15bit.avi -pix_fmt rgb24 -t 25 -FATE_TESTS += fate-zmbv-16bit -fate-zmbv-16bit: CMD = framecrc -i $(SAMPLES)/zmbv/zmbv_16bit.avi -pix_fmt rgb24 -t 25 -FATE_TESTS += fate-zmbv-32bit -fate-zmbv-32bit: CMD = framecrc -i $(SAMPLES)/zmbv/zmbv_32bit.avi -pix_fmt rgb24 -t 25 -FATE_TESTS += fate-zmbv-8bit -fate-zmbv-8bit: CMD = framecrc -i $(SAMPLES)/zmbv/wc2_001-partial.avi -an -pix_fmt rgb24 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate-run.sh mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate-run.sh --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate-run.sh 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate-run.sh 2012-01-11 00:34:30.000000000 +0000 @@ -16,7 +16,7 @@ ref=${7:-"${base}/ref/fate/${test}"} fuzz=$8 threads=${9:-1} -thread_type=${10:-3} +thread_type=${10:-frame+slice} outdir="tests/data/fate" outfile="${outdir}/${test}" @@ -49,28 +49,28 @@ $target_exec $target_path/"$@" } -ffmpeg(){ - run ffmpeg -v 0 -threads $threads -thread_type $thread_type "$@" +avconv(){ + run avconv -nostats -threads $threads -thread_type $thread_type "$@" } framecrc(){ - ffmpeg "$@" -f framecrc - + avconv "$@" -f framecrc - } framemd5(){ - ffmpeg "$@" -f framemd5 - + avconv "$@" -f framemd5 - } crc(){ - ffmpeg "$@" -f crc - + avconv "$@" -f crc - } md5(){ - ffmpeg "$@" md5: + avconv "$@" md5: } pcm(){ - ffmpeg "$@" -vn -f s16le - + avconv "$@" -vn -f s16le - } regtest(){ @@ -104,7 +104,7 @@ file=$(echo tests/data/$d/$file) ;; esac - $target_exec $target_path/tests/seek_test $target_path/$file + run libavformat/seek-test $target_path/$file } mkdir -p "$outdir" @@ -123,6 +123,7 @@ diff) diff -u -w "$ref" "$outfile" >$cmpfile ;; oneoff) oneoff "$ref" "$outfile" "$fuzz" >$cmpfile ;; stddev) stddev "$ref" "$outfile" "$fuzz" >$cmpfile ;; + null) cat "$outfile" >$cmpfile ;; esac cmperr=$? test $err = 0 && err=$cmperr diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate.sh mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate.sh --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/fate.sh 2011-05-21 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/fate.sh 2012-01-11 00:34:30.000000000 +0000 @@ -35,7 +35,7 @@ update()( cd ${src} || return case "$repo" in - git:*) git pull ;; + git:*) git pull --quiet ;; esac ) @@ -70,7 +70,7 @@ ) clean(){ - rm -r ${build} ${inst} + rm -rf ${build} ${inst} } report(){ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ffserver.conf mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ffserver.conf --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ffserver.conf 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ffserver.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,307 +0,0 @@ -# -# This is a test configuration file. You can invoke it with -# ../ffserver -f ffserver.conf -# when in the tests directory and once the vsynth1 subdirectory -# has been populated. Then point your browser at http://whatever:9999/teststat.html -# and you can look at the streams -# - -# -# Port on which the server is listening. You must select a different -# port from your standard http web server if it is running on the same -# computer. - -Port 9999 -RTSPPort 9990 - -# Address on which the server is bound. Only useful if you have -# several network interfaces. - -BindAddress 0.0.0.0 - -# Number of simultaneous requests that can be handled. Since FFServer -# is very fast, this limit is determined mainly by your Internet -# connection speed. - -MaxClients 1000 - -MaxBandwidth 100000 - -# Access Log file (uses standard Apache log file format) -# '-' is the standard output - -CustomLog - - -################################################################## -# Definition of the live feeds. Each live feed contains one video -# and/or audio sequence coming from an ffmpeg encoder or another -# ffserver. This sequence may be encoded simultaneously with several -# codecs at several resolutions. - - - -# You must use 'ffmpeg' to send a live feed to ffserver. In this -# example, you can type: -# -# ffmpeg http://localhost:8090/feed1.ffm - -# ffserver can also do time shifting. It means that it can stream any -# previously recorded live stream. The request should contain: -# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify -# a path where the feed is stored on disk. You also specify the -# maximum size of the feed (100M bytes here). Default: -# File=/tmp/feed_name.ffm FileMaxSize=5M - -File tests/feed1.ffm -FileMaxSize 100M - -# Fire up ffmpeg pointing at this stream - -Launch ./ffmpeg -v 0 -y -f pgmyuv -i tests/vsynth1/%02d.pgm - -ACL allow localhost - - -################################################################## -# Now you can define each stream which will be generated from the -# original audio and video stream. Each format has a filename (here -# 'test128.mpg'). FFServer will send this stream when answering a -# request containing this filename. - - -Feed feed1.ffm -Format avi -# -BitExact -DctFastint -IdctSimple -VideoFrameRate 10 -VideoSize 352x288 -VideoBitRate 100 -VideoGopSize 30 -NoAudio - -PreRoll 10 -StartSendOnKey -MaxTime 100 - - - - -Feed feed1.ffm -Format avi -# -BitExact -DctFastint -IdctSimple -VideoFrameRate 2 -VideoSize 320x240 -VideoBitRate 40 -VideoGopSize 20 -NoAudio - -PreRoll 20 -StartSendOnKey -MaxTime 100 - - - -# -#Feed feed1.ffm -# -#VideoFrameRate 10 -#VideoSize 352x288 -#VideoBitRate 100 -#VideoGopSize 30 -#NoAudio - -#PreRoll 10 -#StartSendOnKey -#MaxTime 100 -# -# -# -# -#Feed feed1.ffm -## -#VideoFrameRate 2 -#VideoSize 320x240 -#VideoBitRate 40 -#VideoGopSize 20 -#NoAudio -# -#PreRoll 20 -#StartSendOnKey -#MaxTime 100 -# -# -# - -Feed feed1.ffm -# -BitExact -DctFastint -IdctSimple -Qscale 10 -VideoFrameRate 10 -VideoSize 352x288 -VideoBitRate 100 -VideoGopSize 30 -NoAudio - -PreRoll 10 -StartSendOnKey -MaxTime 100 - - - - -Feed feed1.ffm -Format asf -# -BitExact -DctFastint -IdctSimple -Qscale 10 -VideoFrameRate 10 -VideoSize 320x240 -VideoBitRate 100 -VideoGopSize 30 -NoAudio - -PreRoll 10 -StartSendOnKey -MaxTime 100 - -Title "Test data stream" - - - - -Feed feed1.ffm -Format asf -# -BitExact -DctFastint -IdctSimple -Qscale 10 -VideoFrameRate 2 -VideoSize 320x240 -VideoBitRate 40 -VideoGopSize 20 -NoAudio - -PreRoll 20 -StartSendOnKey -MaxTime 100 - -Title "Test data stream" - - - - - -Feed feed1.ffm -Format rm - -BitExact -DctFastint -IdctSimple -Qscale 10 -VideoBitRate 100 -VideoFrameRate 10 -VideoGopSize 30 -VideoSize 320x240 -NoAudio - -PreRoll 10 -StartSendOnKey -MaxTime 100 - - - - - -Feed feed1.ffm -Format rm - -BitExact -DctFastint -IdctSimple -Qscale 10 -VideoBitRate 40 -VideoFrameRate 2 -VideoGopSize 20 -VideoSize 320x240 -NoAudio - -PreRoll 20 -StartSendOnKey -MaxTime 100 - - - - - - -Feed feed1.ffm -Format jpeg -Strict -1 - -BitExact -DctFastint -IdctSimple -VideoFrameRate 1 -VideoSize 352x288 -NoAudio - -PreRoll 2 - - - - - -Feed feed1.ffm -Format jpeg -Strict -1 - -BitExact -DctFastint -IdctSimple -VideoFrameRate 1 -VideoSize 160x128 -NoAudio - -PreRoll 2 - - - - - -Feed feed1.ffm -Format mpjpeg -Strict -1 - -BitExact -DctFastint -IdctSimple -VideoFrameRate 1 -VideoSize 320x240 -NoAudio -StartSendOnKey - -PreRoll 1 -MaxTime 100 - - - - -################################################################## -# Special stream : server status - - - -Format status - - - diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ffserver.regression.ref mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ffserver.regression.ref --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ffserver.regression.ref 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ffserver.regression.ref 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -18c4ba0e8e7adb781216e38de61c2e39 ff-test_h.avi -f84767c7af61f360f4b443c2c73f322f ff-test_l.avi -d976848a9e4d5d8fc2659e4841cdece5 ff-test.swf -28fd87d5075b9b011aad57292f271a04 ff-test_h.asf -a31ccd3aba2551e60b9fb1c156fca2f8 ff-test_l.asf -3279d3ed0ef2d1347b5eda84db2cf3e6 ff-test_h.rm -440231fe3cf0849887390b4d67d6894a ff-test_l.rm -e0dc91430660c619e97b5c82e0f398fc ff-test.jpg -0d6c98fc8a4f00560fe34e94e26880a9 ff-test_small.jpg -e2a315d7ac0576279f8b4d917999615a ff-test.mjpg diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ffserver-regression.sh mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ffserver-regression.sh --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ffserver-regression.sh 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ffserver-regression.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#!/bin/sh - -#perl -e 'chomp($wd = `pwd`); print map { s!tests/data/!!; "\nFile $wd/tests/data/$_\n\n\n" } @ARGV' tests/data/a* >> tests/data/ffserver.conf -#perl -e 'chomp($wd = `pwd`); print map { s!tests/data/!!; "\nFile $wd/tests/data/$_\n\n\n" } @ARGV' tests/data/a* >> tests/data/ffserver.conf - -. $(dirname $0)/md5.sh - -FILES=$(sed -n 's/^[^#]*.*/\1/p' $2 | grep -v html) - -rm -f tests/feed1.ffm -./ffserver -d -f "$2" 2> /dev/null & -FFSERVER_PID=$! -echo "Waiting for feeds to startup..." -sleep 2 -( - cd tests/data || exit $? - rm -f ff-* ffserver.regression - WGET_OPTIONS="--user-agent=NSPlayer -q --proxy=off -e verbose=off -e server_response=off" - for file in $FILES; do - if [ $(expr $file : "a-*") != 0 ]; then - wget $WGET_OPTIONS -O - http://localhost:9999/$file > ff-$file - else - wget $WGET_OPTIONS -O - http://localhost:9999/$file?date=19700101T000000Z | dd bs=1 count=20000 > ff-$file 2>/dev/null - fi - do_md5sum ff-$file >>ffserver.regression - done -) -kill $FFSERVER_PID -wait > /dev/null 2>&1 -rm -f tests/feed1.ffm -if diff -u "$1" tests/data/ffserver.regression; then - echo - echo Server regression test succeeded. - exit 0 -else - echo - echo Server regression test: Error. - exit 1 -fi diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/lavfi-regression.sh mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/lavfi-regression.sh --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/lavfi-regression.sh 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/lavfi-regression.sh 2012-01-11 00:34:30.000000000 +0000 @@ -16,7 +16,7 @@ filters=$2 shift 2 printf '%-20s' $label - run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \ + run_avconv $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \ $ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5: } @@ -49,7 +49,7 @@ out_fmts=${outfile}${1}_out_fmts # exclude pixel formats which are not supported as input - $ffmpeg -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^\..\.' | cut -d' ' -f2 | sort >$exclude_fmts + $avconv -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^\..\.' | cut -d' ' -f2 | sort >$exclude_fmts $showfiltfmts scale | awk -F '[ \r]' '/^OUTPUT/{ print $3 }' | sort | comm -23 - $exclude_fmts >$out_fmts pix_fmts=$($showfiltfmts $filter | awk -F '[ \r]' '/^INPUT/{ print $3 }' | sort | comm -12 - $out_fmts) @@ -69,8 +69,8 @@ do_lavfi_pixfmts "scale" "200:100" do_lavfi_pixfmts "vflip" "" -if [ -n "$do_pixdesc_be" ] || [ -n "$do_pixdesc_le" ]; then - pix_fmts="$($ffmpeg -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^IO' | cut -d' ' -f2 | sort)" +if [ -n "$do_pixdesc" ]; then + pix_fmts="$($avconv -pix_fmts list 2>/dev/null | sed -ne '9,$p' | grep '^IO' | cut -d' ' -f2 | sort)" for pix_fmt in $pix_fmts; do do_video_filter $pix_fmt "slicify=random,format=$pix_fmt,pixdesctest" -pix_fmt $pix_fmt done diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/lavf-regression.sh mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/lavf-regression.sh --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/lavf-regression.sh 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/lavf-regression.sh 2012-01-11 00:34:30.000000000 +0000 @@ -14,15 +14,15 @@ do_lavf() { file=${outfile}lavf.$1 - do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $2 - do_ffmpeg_crc $file $DEC_OPTS -i $target_path/$file $3 + do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $2 + do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3 } do_streamed_images() { file=${outfile}${1}pipe.$1 - do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10 - do_ffmpeg_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file + do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10 + do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file } do_image_formats() @@ -30,21 +30,21 @@ outfile="$datadir/images/$1/" mkdir -p "$outfile" file=${outfile}%02d.$1 - run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $2 $ENC_OPTS $3 -t 0.5 -y -qscale 10 $target_path/$file + run_avconv $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $2 $ENC_OPTS $3 -t 0.5 -y -qscale 10 $target_path/$file do_md5sum ${outfile}02.$1 - do_ffmpeg_crc $file $DEC_OPTS $3 -i $target_path/$file + do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file wc -c ${outfile}02.$1 } do_audio_only() { file=${outfile}lavf.$1 - do_ffmpeg $file $DEC_OPTS $2 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $3 - do_ffmpeg_crc $file $DEC_OPTS $4 -i $target_path/$file + do_avconv $file $DEC_OPTS $2 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $3 + do_avconv_crc $file $DEC_OPTS $4 -i $target_path/$file } if [ -n "$do_avi" ] ; then -do_lavf avi +do_lavf avi "-acodec mp2" fi if [ -n "$do_asf" ] ; then @@ -53,9 +53,9 @@ if [ -n "$do_rm" ] ; then file=${outfile}lavf.rm -do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -acodec ac3_fixed +do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -acodec ac3_fixed -b:a 64k # broken -#do_ffmpeg_crc $file -i $target_path/$file +#do_avconv_crc $file -i $target_path/$file fi if [ -n "$do_mpg" ] ; then @@ -64,11 +64,14 @@ if [ -n "$do_mxf" ] ; then do_lavf mxf "-ar 48000 -bf 2 -timecode_frame_start 264363" -do_lavf mxf_d10 "-ar 48000 -ac 2 -r 25 -s 720x576 -vf pad=720:608:0:32 -vcodec mpeg2video -intra -flags +ildct+low_delay -dc 10 -flags2 +ivlc+non_linear_q -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 30000k -maxrate 30000k -b 30000k -bufsize 1200000 -top 1 -rc_init_occupancy 1200000 -qmax 12 -f mxf_d10" +fi + +if [ -n "$do_mxf_d10" ]; then +do_lavf mxf_d10 "-ar 48000 -ac 2 -r 25 -s 720x576 -vf pad=720:608:0:32 -vcodec mpeg2video -g 0 -flags +ildct+low_delay -dc 10 -flags2 +ivlc+non_linear_q -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 30000k -maxrate 30000k -b 30000k -bufsize 1200000 -top 1 -rc_init_occupancy 1200000 -qmax 12 -f mxf_d10" fi if [ -n "$do_ts" ] ; then -do_lavf ts +do_lavf ts "-mpegts_transport_stream_id 42" fi if [ -n "$do_swf" ] ; then @@ -84,7 +87,7 @@ fi if [ -n "$do_mov" ] ; then -do_lavf mov "-acodec pcm_alaw" +do_lavf mov "-acodec pcm_alaw -c:v mpeg4" fi if [ -n "$do_dv_fmt" ] ; then @@ -100,15 +103,15 @@ fi if [ -n "$do_mkv" ] ; then -do_lavf mkv +do_lavf mkv "-c:a mp2 -c:v mpeg4" fi # streamed images # mjpeg #file=${outfile}lavf.mjpeg -#do_ffmpeg $file -t 1 -qscale 10 -f image2 -vcodec pgmyuv -i $raw_src -#do_ffmpeg_crc $file -i $target_path/$file +#do_avconv $file -t 1 -qscale 10 -f image2 -vcodec pgmyuv -i $raw_src +#do_avconv_crc $file -i $target_path/$file if [ -n "$do_pbmpipe" ] ; then do_streamed_images pbm @@ -124,14 +127,14 @@ if [ -n "$do_gif" ] ; then file=${outfile}lavf.gif -do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -pix_fmt rgb24 -do_ffmpeg_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt rgb24 +do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -pix_fmt rgb24 +do_avconv_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt rgb24 fi if [ -n "$do_yuv4mpeg" ] ; then file=${outfile}lavf.y4m -do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -#do_ffmpeg_crc $file -i $target_path/$file +do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 +#do_avconv_crc $file -i $target_path/$file fi # image formats @@ -224,9 +227,9 @@ monob yuv440p yuvj440p" for pix_fmt in $conversions ; do file=${outfile}${pix_fmt}.yuv - run_ffmpeg $DEC_OPTS -r 1 -t 1 -f image2 -vcodec pgmyuv -i $raw_src \ - $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst - do_ffmpeg $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \ + run_avconv $DEC_OPTS -r 1 -f image2 -vcodec pgmyuv -i $raw_src \ + $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst + do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \ $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p done fi diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/Makefile mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/Makefile 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/Makefile 2012-01-11 00:34:30.000000000 +0000 @@ -1,25 +1,9 @@ -fulltest test: codectest lavftest lavfitest seektest - -FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref - -codectest: fate-codec -lavftest: fate-lavf -lavfitest: fate-lavfi -seektest: fate-seek - AREF = fate-acodec-aref VREF = fate-vsynth1-vref fate-vsynth2-vref REFS = $(AREF) $(VREF) -$(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm -$(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw - -ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw - @echo - @echo "Unfortunately ffserver is broken and therefore its regression" - @echo "test fails randomly. Treat the results accordingly." - @echo - $(SRC_PATH)/tests/ffserver-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/ffserver.conf +$(VREF): avconv$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm +$(AREF): avconv$(EXESUF) tests/data/asynth1.sw tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF) @mkdir -p tests/vsynth1 @@ -33,24 +17,48 @@ @mkdir -p tests/data $(M)./$< $@ -tests/data/asynth1.sw tests/vsynth%/00.pgm: TAG = GEN - -tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS) - $(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS) +tests/data/asynth-16000-1.sw: tests/audiogen$(HOSTEXESUF) + @mkdir -p tests/data + $(M)./$< $@ 16000 1 -tools/lavfi-showfiltfmts$(EXESUF): tools/lavfi-showfiltfmts.o $(FF_DEP_LIBS) - $(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS) +tests/data/asynth%.sw tests/vsynth%/00.pgm: TAG = GEN -include $(SRC_PATH_BARE)/tests/fate.mak -include $(SRC_PATH_BARE)/tests/fate2.mak - -include $(SRC_PATH_BARE)/tests/fate/aac.mak -include $(SRC_PATH_BARE)/tests/fate/als.mak -include $(SRC_PATH_BARE)/tests/fate/fft.mak -include $(SRC_PATH_BARE)/tests/fate/h264.mak -include $(SRC_PATH_BARE)/tests/fate/mp3.mak -include $(SRC_PATH_BARE)/tests/fate/vorbis.mak -include $(SRC_PATH_BARE)/tests/fate/vp8.mak +include $(SRC_PATH)/tests/fate/aac.mak +include $(SRC_PATH)/tests/fate/ac3.mak +include $(SRC_PATH)/tests/fate/als.mak +include $(SRC_PATH)/tests/fate/amrnb.mak +include $(SRC_PATH)/tests/fate/amrwb.mak +include $(SRC_PATH)/tests/fate/atrac.mak +include $(SRC_PATH)/tests/fate/audio.mak +include $(SRC_PATH)/tests/fate/dct.mak +include $(SRC_PATH)/tests/fate/demux.mak +include $(SRC_PATH)/tests/fate/dfa.mak +include $(SRC_PATH)/tests/fate/dpcm.mak +include $(SRC_PATH)/tests/fate/ea.mak +include $(SRC_PATH)/tests/fate/fft.mak +include $(SRC_PATH)/tests/fate/h264.mak +include $(SRC_PATH)/tests/fate/image.mak +include $(SRC_PATH)/tests/fate/indeo.mak +include $(SRC_PATH)/tests/fate/libavcodec.mak +include $(SRC_PATH)/tests/fate/libavutil.mak +include $(SRC_PATH)/tests/fate/lossless-audio.mak +include $(SRC_PATH)/tests/fate/lossless-video.mak +include $(SRC_PATH)/tests/fate/microsoft.mak +include $(SRC_PATH)/tests/fate/mp3.mak +include $(SRC_PATH)/tests/fate/mpc.mak +include $(SRC_PATH)/tests/fate/pcm.mak +include $(SRC_PATH)/tests/fate/prores.mak +include $(SRC_PATH)/tests/fate/qt.mak +include $(SRC_PATH)/tests/fate/qtrle.mak +include $(SRC_PATH)/tests/fate/real.mak +include $(SRC_PATH)/tests/fate/screen.mak +include $(SRC_PATH)/tests/fate/utvideo.mak +include $(SRC_PATH)/tests/fate/video.mak +include $(SRC_PATH)/tests/fate/voice.mak +include $(SRC_PATH)/tests/fate/vorbis.mak +include $(SRC_PATH)/tests/fate/vpx.mak +include $(SRC_PATH)/tests/fate/vqf.mak +include $(SRC_PATH)/tests/fate/wma.mak FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%) FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%) @@ -63,14 +71,18 @@ FATE = $(FATE_ACODEC) \ $(FATE_VCODEC) \ $(FATE_LAVF) \ - $(FATE_LAVFI) \ $(FATE_SEEK) \ +FATE-$(CONFIG_AVFILTER) += $(FATE_LAVFI) + +FATE += $(FATE-yes) + $(filter-out %-aref,$(FATE_ACODEC)): $(AREF) -$(filter-out %-vref,$(FATE_VCODEC)): $(VREF) +$(filter-out %-vref,$(FATE_VSYNTH1)): fate-vsynth1-vref +$(filter-out %-vref,$(FATE_VSYNTH2)): fate-vsynth2-vref $(FATE_LAVF): $(REFS) $(FATE_LAVFI): $(REFS) tools/lavfi-showfiltfmts$(EXESUF) -$(FATE_SEEK): fate-codec fate-lavf tests/seek_test$(EXESUF) +$(FATE_SEEK): fate-codec fate-lavf libavformat/seek-test$(EXESUF) $(FATE_ACODEC): CMD = codectest acodec $(FATE_VSYNTH1): CMD = codectest vsynth1 @@ -87,7 +99,7 @@ fate-seek: $(FATE_SEEK) ifdef SAMPLES -FATE += $(FATE_TESTS) +FATE += $(FATE_TESTS) $(FATE_TESTS-yes) fate-rsync: rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES) else @@ -101,7 +113,7 @@ fate: $(FATE) -$(FATE): ffmpeg$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) +$(FATE): avconv$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) @echo "TEST $(@:fate-%=%)" $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' @@ -112,10 +124,9 @@ testclean: $(RM) -r tests/vsynth1 tests/vsynth2 tests/data - $(RM) $(addprefix tests/,$(CLEANSUFFIXES)) - $(RM) tests/seek_test$(EXESUF) tests/seek_test.o + $(RM) $(CLEANSUFFIXES:%=tests/%) $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF)) -include $(wildcard tests/*.d) -.PHONY: fate* *test +.PHONY: fate* diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/ac3_fixed mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/ac3_fixed --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/ac3_fixed 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/ac3_fixed 2012-01-11 00:34:30.000000000 +0000 @@ -1,2 +1,2 @@ -0f14801e166819dd4a58981aea36e08b *./tests/data/acodec/ac3.rm +e7fa185030a56d9db8663ad9e38c6c94 *./tests/data/acodec/ac3.rm 98751 ./tests/data/acodec/ac3.rm diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_adx mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_adx --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_adx 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_adx 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +0a30509d9296b857e134b762b76dbc31 *./tests/data/acodec/adpcm_adx.adx +297720 ./tests/data/acodec/adpcm_adx.adx +2dbc601ed5259f4d74dc48ccd8da7eaf *./tests/data/adpcm_adx.acodec.out.wav +stddev: 6989.46 PSNR: 19.44 MAXDIFF:65398 bytes: 1058432/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_ima_qt mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_ima_qt --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_ima_qt 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_ima_qt 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -3c06fd2f7831e3e8735b936e23ca220c *./tests/data/acodec/adpcm_qt.aiff +057d27978b35888776512e4e9669a63b *./tests/data/acodec/adpcm_qt.aiff 281252 ./tests/data/acodec/adpcm_qt.aiff -9580492803ba1c1a3746367b24b751c8 *./tests/data/adpcm_ima_qt.acodec.out.wav -stddev: 914.65 PSNR: 37.10 MAXDIFF:34026 bytes: 1058560/ 1058400 +169c40435c68d50112c9c61fc67e446d *./tests/data/adpcm_ima_qt.acodec.out.wav +stddev: 918.61 PSNR: 37.07 MAXDIFF:34029 bytes: 1058560/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_ima_wav mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_ima_wav --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_ima_wav 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_ima_wav 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ 56b75c3a6dacedcf2ce7b0586aa33594 *./tests/data/acodec/adpcm_ima.wav 267324 ./tests/data/acodec/adpcm_ima.wav -78a2af1c895792d0c221d127bdd48ece *./tests/data/adpcm_ima_wav.acodec.out.wav +ddddfa47302da540abf19224202bef57 *./tests/data/adpcm_ima_wav.acodec.out.wav stddev: 903.51 PSNR: 37.21 MAXDIFF:34026 bytes: 1061748/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_ms mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_ms --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_ms 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_ms 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ a407b87daeef5b25dfb6c5b3f519e9c1 *./tests/data/acodec/adpcm_ms.wav 268378 ./tests/data/acodec/adpcm_ms.wav -7be370f937c51e8a967e6a3d08d5156a *./tests/data/adpcm_ms.acodec.out.wav +22863fb278c4e0ebe9c34cb15db5dd6b *./tests/data/adpcm_ms.acodec.out.wav stddev: 1050.01 PSNR: 35.91 MAXDIFF:29806 bytes: 1060576/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_swf mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_swf --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_swf 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_swf 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ 42d4639866ed4d692eaf126228a4fa2a *./tests/data/acodec/adpcm_swf.flv 269166 ./tests/data/acodec/adpcm_swf.flv -628089745a7059ae4055c2515b6d668b *./tests/data/adpcm_swf.acodec.out.wav +f7df69d3fe708303820f2a9d00140a5b *./tests/data/adpcm_swf.acodec.out.wav stddev: 933.58 PSNR: 36.93 MAXDIFF:51119 bytes: 1064960/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_yam mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_yam --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/adpcm_yam 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/adpcm_yam 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -2546d72df736b5ffa1557e8c9c9ef788 *./tests/data/acodec/adpcm_yam.wav -266296 ./tests/data/acodec/adpcm_yam.wav -c80c847a53a0fee17a88fa889ec34a4e *./tests/data/adpcm_yam.acodec.out.wav +006f8dc92eb4f7bab82eded314ca1124 *./tests/data/acodec/adpcm_yam.wav +266298 ./tests/data/acodec/adpcm_yam.wav +c36a9d5a1e0ad57fbe9665a31373b7c1 *./tests/data/adpcm_yam.acodec.out.wav stddev: 1247.60 PSNR: 34.41 MAXDIFF:39895 bytes: 1064960/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/alac mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/alac --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/alac 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/alac 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -c68f649777ab8e7c9a0f1f221451d3ad *./tests/data/acodec/alac.m4a -389386 ./tests/data/acodec/alac.m4a -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/alac.acodec.out.wav +db1806d9ffd85c168c2c71a28e6d9229 *./tests/data/acodec/alac.m4a +389410 ./tests/data/acodec/alac.m4a +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/alac.acodec.out.wav stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/aref mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/aref --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/aref 2011-05-19 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/aref 2012-01-11 00:34:30.000000000 +0000 @@ -1,2 +1,2 @@ -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/acodec.ref.wav -1058444 ./tests/data/acodec.ref.wav +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/acodec.ref.wav +1058446 ./tests/data/acodec.ref.wav diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/flac mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/flac --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/flac 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/flac 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -151eef9097f944726968bec48649f00a *./tests/data/acodec/flac.flac -361582 ./tests/data/acodec/flac.flac -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/flac.acodec.out.wav +f582b59cc68adfcb3342dcfd7e020b71 *./tests/data/acodec/flac.flac +361581 ./tests/data/acodec/flac.flac +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/flac.acodec.out.wav stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/g722 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/g722 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/g722 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/g722 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +1975cc4a3521e374b33ae042e182f6b6 *./tests/data/acodec/g722.wav +48053 ./tests/data/acodec/g722.wav +ade04cdcf249e6946395f109b077dd62 *./tests/data/g722.acodec.out.wav +stddev: 8841.24 PSNR: 17.40 MAXDIFF:36225 bytes: 191980/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/g726 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/g726 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/g726 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/g726 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -fd090ddf05cc3401cc75c4a5ace1d05a *./tests/data/acodec/g726.wav -24052 ./tests/data/acodec/g726.wav -74abea06027375111eeac1b2f8c7d3af *./tests/data/g726.acodec.out.wav +64bfac75bd371304b704be5b3dbcd04a *./tests/data/acodec/g726.wav +24054 ./tests/data/acodec/g726.wav +79523adfec05760931fda877e1eaf7b4 *./tests/data/g726.acodec.out.wav stddev: 8554.55 PSNR: 17.69 MAXDIFF:29353 bytes: 95984/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/mp2 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/mp2 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/mp2 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/mp2 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ f6eb0a205350bbd7fb1028a01c7ae8aa *./tests/data/acodec/mp2.mp2 96130 ./tests/data/acodec/mp2.mp2 -74c7b6b15a001add199619fafe4059a1 *./tests/data/mp2.acodec.out.wav +5a669ca7321adc6ab66a3eade4035909 *./tests/data/mp2.acodec.out.wav stddev: 9315.99 PSNR: 16.94 MAXDIFF:65388 bytes: 1059840/ 1058400 stddev: 4384.33 PSNR: 23.49 MAXDIFF:52631 bytes: 1057916/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm 2011-04-08 09:50:10.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -89f5b8dd97e0dddbe59af0d44fd229f3 *./tests/data/acodec/pcm_alaw.wav -529256 ./tests/data/acodec/pcm_alaw.wav -0568b0b9a72e31559e150e7e09d301cd *./tests/data/pcm.acodec.out.wav -stddev: 101.67 PSNR: 56.19 MAXDIFF: 515 bytes: 1058400/ 1058400 -f443a8eeb1647ec1eeb8370c939e52d4 *./tests/data/acodec/pcm_mulaw.wav -529256 ./tests/data/acodec/pcm_mulaw.wav -1c3eeaa8814ebd4916780dff80ed6dc5 *./tests/data/pcm.acodec.out.wav -stddev: 103.38 PSNR: 56.04 MAXDIFF: 644 bytes: 1058400/ 1058400 -b7936d7170e0efefb379349d81aed360 *./tests/data/acodec/pcm_s8.mov -530837 ./tests/data/acodec/pcm_s8.mov -652edf30f35ad89bf27bcc9d2f9c7b53 *./tests/data/pcm.acodec.out.wav -stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400 -98cadb3502dbdc99e6e077c28b1a036c *./tests/data/acodec/pcm_u8.wav -529244 ./tests/data/acodec/pcm_u8.wav -652edf30f35ad89bf27bcc9d2f9c7b53 *./tests/data/pcm.acodec.out.wav -stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400 -c42b9c04305455250366c84e17c1023f *./tests/data/acodec/pcm_s16be.mov -1060037 ./tests/data/acodec/pcm_s16be.mov -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/acodec/pcm_s16le.wav -1058444 ./tests/data/acodec/pcm_s16le.wav -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -af717ca95eaca310772eb1238c745d1b *./tests/data/acodec/pcm_s16be.mkv -1060638 ./tests/data/acodec/pcm_s16be.mkv -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -c4f51bf32fad2f7af8ea5beedb56168b *./tests/data/acodec/pcm_s16le.mkv -1060638 ./tests/data/acodec/pcm_s16le.mkv -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -07ffe7ffb78f3648b6524debdde5aec1 *./tests/data/acodec/pcm_s24be.mov -1589237 ./tests/data/acodec/pcm_s24be.mov -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -a85380fb79b0d4fff38e24ac1e34bb94 *./tests/data/acodec/pcm_s24le.wav -1587668 ./tests/data/acodec/pcm_s24le.wav -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -d7792f0343cd66fda8b50b569e2bcc48 *./tests/data/acodec/pcm_s32be.mov -2118437 ./tests/data/acodec/pcm_s32be.mov -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -da6ed80f4f40f0082577dea80827e014 *./tests/data/acodec/pcm_s32le.wav -2116868 ./tests/data/acodec/pcm_s32le.wav -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -118ff3dc83c62ce9ce669eef57e55bb2 *./tests/data/acodec/pcm_f32be.au -2116824 ./tests/data/acodec/pcm_f32be.au -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -46f44f86a18984a832206ab9e29a79f2 *./tests/data/acodec/pcm_f32le.wav -2116880 ./tests/data/acodec/pcm_f32le.wav -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -8112296b1ed94f72f20d04b1a54850a7 *./tests/data/acodec/pcm_f64be.au -4233624 ./tests/data/acodec/pcm_f64be.au -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -ba17c6d1a270e1333e981f239bf7eb45 *./tests/data/acodec/pcm_f64le.wav -4233680 ./tests/data/acodec/pcm_f64le.wav -95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.acodec.out.wav -stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -8c74234928ed425b1171211a89f67ead *./tests/data/acodec/pcm_zork.wav -529256 ./tests/data/acodec/pcm_zork.wav -864c8c866ac25642c29a13b122c70709 *./tests/data/pcm.acodec.out.wav -stddev: 633.11 PSNR: 40.30 MAXDIFF:32768 bytes: 1058400/ 1058400 -8168a5c1343553ef027541830f2cb879 *./tests/data/acodec/pcm_s24daud.302 -10368730 ./tests/data/acodec/pcm_s24daud.302 -f552afadfdfcd6348a07095da6382de5 *./tests/data/pcm.acodec.out.wav -stddev: 9416.28 PSNR: 16.85 MAXDIFF:42744 bytes: 6911796/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_alaw mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_alaw --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_alaw 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_alaw 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +ede2da07839a00c255a43129922f2c7b *./tests/data/acodec/pcm_alaw.wav +529258 ./tests/data/acodec/pcm_alaw.wav +f323f7551ffad91de8613f44dcb198b6 *./tests/data/pcm_alaw.acodec.out.wav +stddev: 101.67 PSNR: 56.19 MAXDIFF: 515 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_f32be mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_f32be --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_f32be 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_f32be 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +118ff3dc83c62ce9ce669eef57e55bb2 *./tests/data/acodec/pcm_f32be.au +2116824 ./tests/data/acodec/pcm_f32be.au +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_f32be.acodec.out.wav +stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_f32le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_f32le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_f32le 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_f32le 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +46f44f86a18984a832206ab9e29a79f2 *./tests/data/acodec/pcm_f32le.wav +2116880 ./tests/data/acodec/pcm_f32le.wav +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_f32le.acodec.out.wav +stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_f64be mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_f64be --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_f64be 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_f64be 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +8112296b1ed94f72f20d04b1a54850a7 *./tests/data/acodec/pcm_f64be.au +4233624 ./tests/data/acodec/pcm_f64be.au +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_f64be.acodec.out.wav +stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_f64le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_f64le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_f64le 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_f64le 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +ba17c6d1a270e1333e981f239bf7eb45 *./tests/data/acodec/pcm_f64le.wav +4233680 ./tests/data/acodec/pcm_f64le.wav +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_f64le.acodec.out.wav +stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_mulaw mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_mulaw --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_mulaw 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_mulaw 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +0c2a55850fb46ad5385a69b15b271f10 *./tests/data/acodec/pcm_mulaw.wav +529258 ./tests/data/acodec/pcm_mulaw.wav +7ae8c3fc804bd574006fd547fe28980c *./tests/data/pcm_mulaw.acodec.out.wav +stddev: 103.38 PSNR: 56.04 MAXDIFF: 644 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s16be mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s16be --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s16be 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s16be 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +53c9eb319c778e7ce137667f62384994 *./tests/data/acodec/pcm_s16be.mov +1060073 ./tests/data/acodec/pcm_s16be.mov +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s16be.acodec.out.wav +stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s16le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s16le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s16le 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s16le 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/acodec/pcm_s16le.wav +1058446 ./tests/data/acodec/pcm_s16le.wav +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s16le.acodec.out.wav +stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s24be mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s24be --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s24be 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s24be 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +af8acd2f08e4bbebe7f4bea4d6f59dd6 *./tests/data/acodec/pcm_s24be.mov +1589273 ./tests/data/acodec/pcm_s24be.mov +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s24be.acodec.out.wav +stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s24daud mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s24daud --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s24daud 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s24daud 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +8168a5c1343553ef027541830f2cb879 *./tests/data/acodec/pcm_s24daud.302 +10368730 ./tests/data/acodec/pcm_s24daud.302 +f552afadfdfcd6348a07095da6382de5 *./tests/data/pcm_s24daud.acodec.out.wav +stddev: 9416.28 PSNR: 16.85 MAXDIFF:42744 bytes: 6911796/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s24le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s24le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s24le 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s24le 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +a85380fb79b0d4fff38e24ac1e34bb94 *./tests/data/acodec/pcm_s24le.wav +1587668 ./tests/data/acodec/pcm_s24le.wav +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s24le.acodec.out.wav +stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s32be mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s32be --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s32be 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s32be 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +63f0e22b4f7c5d61d75047d85f140d52 *./tests/data/acodec/pcm_s32be.mov +2118473 ./tests/data/acodec/pcm_s32be.mov +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s32be.acodec.out.wav +stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s32le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s32le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s32le 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s32le 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +da6ed80f4f40f0082577dea80827e014 *./tests/data/acodec/pcm_s32le.wav +2116868 ./tests/data/acodec/pcm_s32le.wav +64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s32le.acodec.out.wav +stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s8 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s8 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_s8 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_s8 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +4b3013a3f3c328ecdb617cd88b3fe836 *./tests/data/acodec/pcm_s8.mov +530873 ./tests/data/acodec/pcm_s8.mov +651d4eb8d98dfcdda96ae6c43d8f156b *./tests/data/pcm_s8.acodec.out.wav +stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_u8 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_u8 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/acodec/pcm_u8 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/acodec/pcm_u8 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +70fecbae732f81143a560c7315eda49a *./tests/data/acodec/pcm_u8.wav +529246 ./tests/data/acodec/pcm_u8.wav +651d4eb8d98dfcdda96ae6c43d8f156b *./tests/data/pcm_u8.acodec.out.wav +stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/aac-demux mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/aac-demux --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/aac-demux 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/aac-demux 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -CRC=0xbda37454 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/adts-demux mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/adts-demux --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/adts-demux 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/adts-demux 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +CRC=0xbda37454 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/base64 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/base64 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/base64 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/base64 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,9 @@ +Encoding/decoding tests +Passed! +Passed! +Passed! +Passed! +Passed! +Passed! +Passed! +Passed! diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/bethsoft-vid mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/bethsoft-vid --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/bethsoft-vid 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/bethsoft-vid 2012-01-11 00:34:30.000000000 +0000 @@ -1,90 +1,91 @@ -0, 0, 192000, 0x00000000 +0, 0, 192000, 0xdecc683b 1, 0, 1480, 0x00000000 -0, 1500, 192000, 0x01a6cf45 -0, 3000, 192000, 0xd07d57e9 -0, 4500, 192000, 0x3cb1dff5 +0, 1500, 192000, 0x00000000 +0, 3000, 192000, 0x01a6cf45 +0, 4500, 192000, 0xd07d57e9 1, 5994, 1480, 0x20a92bd4 -0, 6000, 192000, 0xd1aaa8fb -0, 7500, 192000, 0x75f526cd -0, 9000, 192000, 0x0f673577 -0, 10500, 192000, 0x897b6781 +0, 6000, 192000, 0x3cb1dff5 +0, 7500, 192000, 0xd1aaa8fb +0, 9000, 192000, 0x75f526cd +0, 10500, 192000, 0x0f673577 1, 11988, 1850, 0xa9e48a74 -0, 12000, 192000, 0x81e6b7f7 -0, 13500, 192000, 0x1f45ce61 -0, 15000, 192000, 0x5a0772a6 -0, 16500, 192000, 0xf78732b3 -0, 18000, 192000, 0x8427f9e5 +0, 12000, 192000, 0x897b6781 +0, 13500, 192000, 0x81e6b7f7 +0, 15000, 192000, 0x1f45ce61 +0, 16500, 192000, 0x5a0772a6 +0, 18000, 192000, 0xf78732b3 1, 19481, 1480, 0x23ecd018 -0, 19500, 192000, 0x40473f11 -0, 21000, 192000, 0x173ceebe -0, 22500, 192000, 0x136b9516 -0, 24000, 192000, 0x138d11ae +0, 19500, 192000, 0x8427f9e5 +0, 21000, 192000, 0x40473f11 +0, 22500, 192000, 0x173ceebe +0, 24000, 192000, 0x136b9516 1, 25475, 1480, 0x206bb915 -0, 25500, 192000, 0x063dbff3 -0, 27000, 192000, 0x5280852f -0, 28500, 192000, 0x99943a8f -0, 30000, 192000, 0x0330a728 +0, 25500, 192000, 0x138d11ae +0, 27000, 192000, 0x063dbff3 +0, 28500, 192000, 0x5280852f +0, 30000, 192000, 0x99943a8f 1, 31469, 1850, 0xb0e10e75 -0, 31500, 192000, 0x5d35467d -0, 33000, 192000, 0xfd436343 -0, 34500, 192000, 0xc323fcfe -0, 36000, 192000, 0x2a1530a0 -0, 37500, 192000, 0xbd43bb60 +0, 31500, 192000, 0x0330a728 +0, 33000, 192000, 0x5d35467d +0, 34500, 192000, 0xfd436343 +0, 36000, 192000, 0xc323fcfe +0, 37500, 192000, 0x2a1530a0 1, 38961, 1480, 0x8d9baedd -0, 39000, 192000, 0xa47f5eab -0, 40500, 192000, 0xff17f5f7 -0, 42000, 192000, 0xb4140b55 -0, 43500, 192000, 0xb8782cc4 +0, 39000, 192000, 0xbd43bb60 +0, 40500, 192000, 0xa47f5eab +0, 42000, 192000, 0xff17f5f7 +0, 43500, 192000, 0xb4140b55 1, 44955, 1480, 0xb802aae1 -0, 45000, 192000, 0x92975b8b -0, 46500, 192000, 0xf42a64d6 -0, 48000, 192000, 0x2cc7077d -0, 49500, 192000, 0x00080cc8 +0, 45000, 192000, 0xb8782cc4 +0, 46500, 192000, 0x92975b8b +0, 48000, 192000, 0xf42a64d6 +0, 49500, 192000, 0x2cc7077d 1, 50950, 1480, 0xecd7b5cc -0, 51000, 192000, 0x584b48f3 -0, 52500, 192000, 0xd68f57da -0, 54000, 192000, 0x60158422 -0, 55500, 192000, 0xd7fb89e6 +0, 51000, 192000, 0x00080cc8 +0, 52500, 192000, 0x584b48f3 +0, 54000, 192000, 0xd68f57da +0, 55500, 192000, 0x60158422 1, 56944, 1850, 0x16861355 -0, 57000, 192000, 0x97f1c76a -0, 58500, 192000, 0x46c4bb9e -0, 60000, 192000, 0xd32f9b66 -0, 61500, 192000, 0x74f43886 -0, 63000, 192000, 0x3c4e47df +0, 57000, 192000, 0xd7fb89e6 +0, 58500, 192000, 0x97f1c76a +0, 60000, 192000, 0x46c4bb9e +0, 61500, 192000, 0xd32f9b66 +0, 63000, 192000, 0x74f43886 1, 64436, 1480, 0xa51690bd -0, 64500, 192000, 0xb5ac0a58 -0, 66000, 192000, 0xcc572b31 -0, 67500, 192000, 0xb1739d26 -0, 69000, 192000, 0x73da5473 +0, 64500, 192000, 0x3c4e47df +0, 66000, 192000, 0xb5ac0a58 +0, 67500, 192000, 0xcc572b31 +0, 69000, 192000, 0xb1739d26 1, 70430, 1480, 0xdd0b90d1 -0, 70500, 192000, 0x5f79f5bc -0, 72000, 192000, 0x0affc0a0 -0, 73500, 192000, 0x2b4d5c1c -0, 75000, 192000, 0x309b41bc +0, 70500, 192000, 0x73da5473 +0, 72000, 192000, 0x5f79f5bc +0, 73500, 192000, 0x0affc0a0 +0, 75000, 192000, 0x2b4d5c1c 1, 76424, 1850, 0x3ce6e333 -0, 76500, 192000, 0xd42b6424 -0, 78000, 192000, 0x4795c948 -0, 79500, 192000, 0xbc1a3a8b -0, 81000, 192000, 0x16529c5b -0, 82500, 192000, 0x6b1b31ba +0, 76500, 192000, 0x309b41bc +0, 78000, 192000, 0xd42b6424 +0, 79500, 192000, 0x4795c948 +0, 81000, 192000, 0xbc1a3a8b +0, 82500, 192000, 0x16529c5b 1, 83917, 1480, 0xf8ce8ea3 -0, 84000, 192000, 0x569182ce -0, 85500, 192000, 0xe6ea9866 -0, 87000, 192000, 0x102c6076 -0, 88500, 192000, 0xb29f527a +0, 84000, 192000, 0x6b1b31ba +0, 85500, 192000, 0x569182ce +0, 87000, 192000, 0xe6ea9866 +0, 88500, 192000, 0x102c6076 1, 89911, 1480, 0xda4597af -0, 90000, 192000, 0x040b4eee -0, 91500, 192000, 0x92574f4a -0, 93000, 192000, 0x1e8acdce -0, 94500, 192000, 0x1becf516 +0, 90000, 192000, 0xb29f527a +0, 91500, 192000, 0x040b4eee +0, 93000, 192000, 0x92574f4a +0, 94500, 192000, 0x1e8acdce 1, 95905, 1480, 0x918f7cb3 -0, 96000, 192000, 0xb62e9776 -0, 97500, 192000, 0xed37a08e -0, 99000, 192000, 0xc0719912 -0, 100500, 192000, 0x24cf7a7e +0, 96000, 192000, 0x1becf516 +0, 97500, 192000, 0xb62e9776 +0, 99000, 192000, 0xed37a08e +0, 100500, 192000, 0xc0719912 1, 101899, 1850, 0xca6edb15 -0, 102000, 192000, 0x0307f62f -0, 103500, 192000, 0x79b7417b +0, 102000, 192000, 0x24cf7a7e +0, 103500, 192000, 0x0307f62f +0, 105000, 192000, 0x79b7417b 1, 109392, 1480, 0xba279597 1, 115386, 1480, 0xc5a38a9e 1, 121380, 1850, 0x8147eef5 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/bmv mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/bmv --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/bmv 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/bmv 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,42 @@ +0, 0, 823680, 0xddb8a306 +1, 0, 7424, 0x18540b36 +0, 7500, 823680, 0xa95375c8 +1, 7576, 7296, 0x5acd2484 +0, 15000, 823680, 0xa95375c8 +1, 15020, 7424, 0xa1bc5c5a +0, 22500, 823680, 0xb6f78afe +1, 22596, 7296, 0x71a02ad1 +0, 30000, 823680, 0xb6f78afe +1, 30041, 7424, 0x09cc32f2 +0, 37500, 823680, 0x45b9c8f0 +1, 37616, 7296, 0xa3451726 +0, 45000, 823680, 0x45b9c8f0 +1, 45061, 7296, 0x1eb40a18 +0, 52500, 823680, 0x7653d8e9 +1, 52506, 7424, 0xc55a2acf +0, 60000, 823680, 0x7653d8e9 +1, 60082, 7296, 0x5b9fad3f +0, 67500, 823680, 0xf1e2fd73 +1, 67527, 7424, 0xea651ae7 +0, 75000, 823680, 0xf1e2fd73 +1, 75102, 7296, 0x2bd5ddb6 +0, 82500, 823680, 0x6d2deab3 +1, 82547, 7424, 0xde4243b4 +0, 90000, 823680, 0x6d2deab3 +1, 90122, 7296, 0x358806d3 +0, 97500, 823680, 0x37fd33ce +1, 97567, 7296, 0x511a144e +0, 105000, 823680, 0x37fd33ce +1, 105012, 7424, 0x887a3e84 +0, 112500, 823680, 0x0a8e0ab9 +1, 112588, 7296, 0xfeae2a0c +0, 120000, 823680, 0x0a8e0ab9 +1, 120033, 7424, 0xa4ea5d22 +0, 127500, 823680, 0x991bb2b0 +1, 127608, 7296, 0xb3adf7fa +0, 135000, 823680, 0x991bb2b0 +1, 135053, 7424, 0xce995dcc +0, 142500, 823680, 0xb8397c8c +1, 142629, 7296, 0x5b4cf574 +0, 150000, 823680, 0xb8397c8c +1, 150073, 7296, 0x8a70eaf0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/cdgraphics mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/cdgraphics --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/cdgraphics 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/cdgraphics 2012-01-11 00:34:30.000000000 +0000 @@ -37,263 +37,264 @@ 0, 10800, 194400, 0x7b8cf983 0, 11100, 194400, 0x07a20f7c 0, 11400, 194400, 0xa63e2962 -0, 11700, 194400, 0xa63e2962 -0, 12000, 194400, 0x2dd54447 -0, 12300, 194400, 0x90735e2d -0, 12600, 194400, 0x90735e2d -0, 12900, 194400, 0x90d98506 -0, 13200, 194400, 0xe5b08ffb -0, 13500, 194400, 0xe5b08ffb -0, 13800, 194400, 0x7a0d95f5 -0, 14100, 194400, 0xff6bacde -0, 14400, 194400, 0xff6bacde -0, 14700, 194400, 0xd998c2c8 -0, 15000, 194400, 0x3d1ddfab -0, 15300, 194400, 0x3d1ddfab -0, 15600, 194400, 0x817de4a6 -0, 15900, 194400, 0xfa3ef694 -0, 16200, 194400, 0xfa3ef694 -0, 16500, 194400, 0x0b5bfb8f -0, 16800, 194400, 0x00f62376 -0, 17100, 194400, 0x00f62376 -0, 17400, 194400, 0x2f6b2d6c -0, 17700, 194400, 0x40cb4752 -0, 18000, 194400, 0x40cb4752 -0, 18300, 194400, 0xd8456435 -0, 18600, 194400, 0x459f6a2f -0, 18900, 194400, 0x459f6a2f -0, 19200, 194400, 0x9b678910 -0, 19500, 194400, 0x8791a1f7 -0, 19800, 194400, 0x8791a1f7 -0, 20100, 194400, 0xdb4ac5d3 -0, 20400, 194400, 0xb223c8d0 -0, 20700, 194400, 0xb223c8d0 -0, 21000, 194400, 0x4a9ce7b1 -0, 21300, 194400, 0x187eeaae -0, 21600, 194400, 0x187eeaae -0, 21900, 194400, 0xc712f8a0 -0, 22200, 194400, 0x549c00a7 -0, 22500, 194400, 0x549c00a7 -0, 22800, 194400, 0x4d991295 -0, 23100, 194400, 0xc41b2681 -0, 23400, 194400, 0xc41b2681 -0, 23700, 194400, 0xed5a3077 -0, 24000, 194400, 0x85ad4463 -0, 24300, 194400, 0x85ad4463 -0, 24600, 194400, 0xb98f4760 -0, 24900, 194400, 0x87ef5e49 -0, 25200, 194400, 0x87ef5e49 -0, 25500, 194400, 0x830a6146 -0, 25800, 194400, 0xe33a792e -0, 26100, 194400, 0xe33a792e -0, 26400, 194400, 0x83517a2d -0, 26700, 194400, 0xa97e9314 -0, 27000, 194400, 0xa97e9314 -0, 27300, 194400, 0x39059611 -0, 27600, 194400, 0xbf4eb9ed -0, 27900, 194400, 0xbf4eb9ed -0, 28200, 194400, 0xe5afc4e2 -0, 28500, 194400, 0x35d4cdd9 -0, 28800, 194400, 0x35d4cdd9 -0, 29100, 194400, 0xb376e1c5 -0, 29400, 194400, 0x6128e3c3 -0, 29700, 194400, 0x6128e3c3 -0, 30000, 194400, 0x30b7f7af -0, 30300, 194400, 0xf1effaac -0, 30600, 194400, 0xf1effaac -0, 30900, 194400, 0x483914a1 -0, 31200, 194400, 0xbd48199c -0, 31500, 194400, 0xbd48199c -0, 31800, 194400, 0x382f2d88 -0, 32100, 194400, 0x5a573085 -0, 32400, 194400, 0x5a573085 -0, 32700, 194400, 0x89733580 -0, 33000, 194400, 0xd1325a5b -0, 33300, 194400, 0xd1325a5b -0, 33600, 194400, 0x655b6253 -0, 33900, 194400, 0x55146352 -0, 34200, 194400, 0x55146352 -0, 34500, 194400, 0xda527c39 -0, 34800, 194400, 0xb0cd7e37 -0, 35100, 194400, 0xb0cd7e37 -0, 35400, 194400, 0x25e7991c -0, 35700, 194400, 0x5c22a411 -0, 36000, 194400, 0x5c22a411 -0, 36300, 194400, 0x1e2abdf7 -0, 36600, 194400, 0x8308bff5 -0, 36900, 194400, 0x8308bff5 -0, 37200, 194400, 0xfdbfd6de -0, 37500, 194400, 0xd4d4d9db -0, 37800, 194400, 0xd4d4d9db -0, 38100, 194400, 0xa449fbb9 -0, 38400, 194400, 0x3dcafdb7 -0, 38700, 194400, 0x3dcafdb7 -0, 39000, 194400, 0x6f1f01c2 -0, 39300, 194400, 0xf54a1da6 -0, 39600, 194400, 0xf54a1da6 -0, 39900, 194400, 0x88d11fa4 -0, 40200, 194400, 0x59642d96 -0, 40500, 194400, 0x59642d96 -0, 40800, 194400, 0x8ba44182 -0, 41100, 194400, 0x88f56360 -0, 41400, 194400, 0x88f56360 -0, 41700, 194400, 0xfb246d56 -0, 42000, 194400, 0xad128043 -0, 42300, 194400, 0xad128043 -0, 42600, 194400, 0x3a4f8a39 -0, 42900, 194400, 0x563d9d26 -0, 43200, 194400, 0x563d9d26 -0, 43500, 194400, 0x6ff8a320 -0, 43800, 194400, 0xcdb9b70c -0, 44100, 194400, 0xcdb9b70c -0, 44400, 194400, 0x99c2bd06 -0, 44700, 194400, 0x4b47cef4 -0, 45000, 194400, 0x4b47cef4 -0, 45300, 194400, 0x10b9dce6 -0, 45600, 194400, 0xdd39f1d1 -0, 45900, 194400, 0xdd39f1d1 -0, 46200, 194400, 0xbcf104cd -0, 46500, 194400, 0x85ec17ba -0, 46800, 194400, 0x85ec17ba -0, 47100, 194400, 0x069219b8 -0, 47400, 194400, 0x84dd3899 -0, 47700, 194400, 0x84dd3899 -0, 48000, 194400, 0xacca4190 -0, 48300, 194400, 0xcf5b5d74 -0, 48600, 194400, 0xcf5b5d74 -0, 48900, 194400, 0x4b8c626f -0, 49200, 194400, 0xf0817958 -0, 49500, 194400, 0xf0817958 -0, 49800, 194400, 0xc0887e53 -0, 50100, 194400, 0x42e6854c -0, 50400, 194400, 0x42e6854c -0, 50700, 194400, 0x036c9140 -0, 51000, 194400, 0x0f21a62b -0, 51300, 194400, 0x0f21a62b -0, 51600, 194400, 0xcdaeaa27 -0, 51900, 194400, 0xe425bc15 -0, 52200, 194400, 0xe425bc15 -0, 52500, 194400, 0x8e18c20f -0, 52800, 194400, 0x767cd5fb -0, 53100, 194400, 0x767cd5fb -0, 53400, 194400, 0x554ae6ea -0, 53700, 194400, 0xeac1f9d7 -0, 54000, 194400, 0xeac1f9d7 -0, 54300, 194400, 0x0b32fed2 -0, 54600, 194400, 0xe30c19c6 -0, 54900, 194400, 0xe30c19c6 -0, 55200, 194400, 0x6a8a23bc -0, 55500, 194400, 0x26bf36a9 -0, 55800, 194400, 0x26bf36a9 -0, 56100, 194400, 0x1e4f3fa0 -0, 56400, 194400, 0x231f5986 -0, 56700, 194400, 0x231f5986 -0, 57000, 194400, 0xf557756a -0, 57300, 194400, 0x6bce805f -0, 57600, 194400, 0x6bce805f -0, 57900, 194400, 0xcd80924d -0, 58200, 194400, 0x65dc9f40 -0, 58500, 194400, 0x65dc9f40 -0, 58800, 194400, 0x2ab7af30 -0, 59100, 194400, 0xd43cb728 -0, 59400, 194400, 0xd43cb728 -0, 59700, 194400, 0x05d9c916 -0, 60000, 194400, 0x43cad10e -0, 60300, 194400, 0x43cad10e -0, 60600, 194400, 0x06b5e0fe -0, 60900, 194400, 0xa142f0ee -0, 61200, 194400, 0xa142f0ee -0, 61500, 194400, 0xed7f03ea -0, 61800, 194400, 0xf26019d4 -0, 62100, 194400, 0xf26019d4 -0, 62400, 194400, 0x3b7f29c4 -0, 62700, 194400, 0x30282ebf -0, 63000, 194400, 0x30282ebf -0, 63300, 194400, 0xaeff4aa3 -0, 63600, 194400, 0x1d355697 -0, 63900, 194400, 0x1d355697 -0, 64200, 194400, 0x2ead6f7e -0, 64500, 194400, 0xf1b67776 -0, 64800, 194400, 0xf1b67776 -0, 65100, 194400, 0x93b38b62 -0, 65400, 194400, 0x9469905d -0, 65700, 194400, 0x9469905d -0, 66000, 194400, 0x27bf9756 -0, 66300, 194400, 0xd016a548 -0, 66600, 194400, 0xd016a548 -0, 66900, 194400, 0x6889b835 -0, 67200, 194400, 0x6a05be2f -0, 67500, 194400, 0x6a05be2f -0, 67800, 194400, 0xe0a1ce1f -0, 68100, 194400, 0x8fdbd617 -0, 68400, 194400, 0x8fdbd617 -0, 68700, 194400, 0xd68fe805 -0, 69000, 194400, 0x0d1dfbf1 -0, 69300, 194400, 0x0d1dfbf1 -0, 69600, 194400, 0x0fe70bf0 -0, 69900, 194400, 0x0a8f13e8 -0, 70200, 194400, 0x0a8f13e8 -0, 70500, 194400, 0x0ca42bd0 -0, 70800, 194400, 0x6f3838c3 -0, 71100, 194400, 0x6f3838c3 -0, 71400, 194400, 0x045448b3 -0, 71700, 194400, 0x764349b2 -0, 72000, 194400, 0x764349b2 -0, 72300, 194400, 0xed1651aa -0, 72600, 194400, 0xbb376398 -0, 72900, 194400, 0xbb376398 -0, 73200, 194400, 0xd0d5718a -0, 73500, 194400, 0xcd977e7d -0, 73800, 194400, 0xcd977e7d -0, 74100, 194400, 0x8cb39665 -0, 74400, 194400, 0xb935b04b -0, 74700, 194400, 0xb935b04b -0, 75000, 194400, 0x0292be3d -0, 75300, 194400, 0x4f21c833 -0, 75600, 194400, 0x4f21c833 -0, 75900, 194400, 0xa5c7d823 -0, 76200, 194400, 0xfb8ee01b -0, 76500, 194400, 0xfb8ee01b -0, 76800, 194400, 0xea53ee0d -0, 77100, 194400, 0x803efcfe -0, 77400, 194400, 0x803efcfe -0, 77700, 194400, 0x2c0e0aff -0, 78000, 194400, 0x3df318f1 -0, 78300, 194400, 0x3df318f1 -0, 78600, 194400, 0xc4cb26e3 -0, 78900, 194400, 0x92a033d6 -0, 79200, 194400, 0x92a033d6 -0, 79500, 194400, 0x1b2048c1 -0, 79800, 194400, 0x236858b1 -0, 80100, 194400, 0x236858b1 -0, 80400, 194400, 0x482f6d9c -0, 80700, 194400, 0x9ee97891 -0, 81000, 194400, 0x9ee97891 -0, 81300, 194400, 0xe0dc8683 -0, 81600, 194400, 0x461b9079 -0, 81900, 194400, 0x461b9079 -0, 82200, 194400, 0xd346a960 -0, 82500, 194400, 0xa384b554 -0, 82800, 194400, 0xa384b554 -0, 83100, 194400, 0x3246cf3a -0, 83400, 194400, 0xa53fe722 -0, 83700, 194400, 0xa53fe722 -0, 84000, 194400, 0xe620fd0c -0, 84300, 194400, 0xd6370414 -0, 84600, 194400, 0xd6370414 -0, 84900, 194400, 0xf57f1404 -0, 85200, 194400, 0x8c6420f7 -0, 85500, 194400, 0x8c6420f7 -0, 85800, 194400, 0xd4be3add -0, 86100, 194400, 0xa8dc4ec9 -0, 86400, 194400, 0xa8dc4ec9 -0, 86700, 194400, 0xda1563b4 -0, 87000, 194400, 0xd51873a4 -0, 87300, 194400, 0xd51873a4 -0, 87600, 194400, 0x68588196 -0, 87900, 194400, 0x40d18e89 -0, 88200, 194400, 0x40d18e89 -0, 88500, 194400, 0x1b75a275 -0, 88800, 194400, 0xedd1a572 -0, 89100, 194400, 0xedd1a572 -0, 89400, 194400, 0x55daad6a +0, 11700, 194400, 0x2dd54447 +0, 12000, 194400, 0x90735e2d +0, 12300, 194400, 0x90d98506 +0, 12600, 194400, 0xe5b08ffb +0, 12900, 194400, 0x7a0d95f5 +0, 13200, 194400, 0xff6bacde +0, 13500, 194400, 0xd998c2c8 +0, 13800, 194400, 0x3d1ddfab +0, 14100, 194400, 0x817de4a6 +0, 14400, 194400, 0xfa3ef694 +0, 14700, 194400, 0x0b5bfb8f +0, 15000, 194400, 0x00f62376 +0, 15300, 194400, 0x2f6b2d6c +0, 15600, 194400, 0x40cb4752 +0, 15900, 194400, 0xd8456435 +0, 16200, 194400, 0x459f6a2f +0, 16500, 194400, 0x9b678910 +0, 16800, 194400, 0x8791a1f7 +0, 17100, 194400, 0xdb4ac5d3 +0, 17400, 194400, 0xb223c8d0 +0, 17700, 194400, 0x4a9ce7b1 +0, 18000, 194400, 0x187eeaae +0, 18300, 194400, 0xc712f8a0 +0, 18600, 194400, 0x549c00a7 +0, 18900, 194400, 0x4d991295 +0, 19200, 194400, 0xc41b2681 +0, 19500, 194400, 0xed5a3077 +0, 19800, 194400, 0x85ad4463 +0, 20100, 194400, 0xb98f4760 +0, 20400, 194400, 0x87ef5e49 +0, 20700, 194400, 0x830a6146 +0, 21000, 194400, 0xe33a792e +0, 21300, 194400, 0x83517a2d +0, 21600, 194400, 0xa97e9314 +0, 21900, 194400, 0x39059611 +0, 22200, 194400, 0xbf4eb9ed +0, 22500, 194400, 0xe5afc4e2 +0, 22800, 194400, 0x35d4cdd9 +0, 23100, 194400, 0xb376e1c5 +0, 23400, 194400, 0x6128e3c3 +0, 23700, 194400, 0x30b7f7af +0, 24000, 194400, 0xf1effaac +0, 24300, 194400, 0x483914a1 +0, 24600, 194400, 0xbd48199c +0, 24900, 194400, 0x382f2d88 +0, 25200, 194400, 0x5a573085 +0, 25500, 194400, 0x89733580 +0, 25800, 194400, 0xd1325a5b +0, 26100, 194400, 0x655b6253 +0, 26400, 194400, 0x55146352 +0, 26700, 194400, 0xda527c39 +0, 27000, 194400, 0xb0cd7e37 +0, 27300, 194400, 0x25e7991c +0, 27600, 194400, 0x5c22a411 +0, 27900, 194400, 0x1e2abdf7 +0, 28200, 194400, 0x8308bff5 +0, 28500, 194400, 0xfdbfd6de +0, 28800, 194400, 0xd4d4d9db +0, 29100, 194400, 0xa449fbb9 +0, 29400, 194400, 0x3dcafdb7 +0, 29700, 194400, 0x6f1f01c2 +0, 30000, 194400, 0xf54a1da6 +0, 30300, 194400, 0x88d11fa4 +0, 30600, 194400, 0x59642d96 +0, 30900, 194400, 0x8ba44182 +0, 31200, 194400, 0x88f56360 +0, 31500, 194400, 0xfb246d56 +0, 31800, 194400, 0xad128043 +0, 32100, 194400, 0x3a4f8a39 +0, 32400, 194400, 0x563d9d26 +0, 32700, 194400, 0x6ff8a320 +0, 33000, 194400, 0xcdb9b70c +0, 33300, 194400, 0x99c2bd06 +0, 33600, 194400, 0x4b47cef4 +0, 33900, 194400, 0x10b9dce6 +0, 34200, 194400, 0xdd39f1d1 +0, 34500, 194400, 0xbcf104cd +0, 34800, 194400, 0x85ec17ba +0, 35100, 194400, 0x069219b8 +0, 35400, 194400, 0x84dd3899 +0, 35700, 194400, 0xacca4190 +0, 36000, 194400, 0xcf5b5d74 +0, 36300, 194400, 0x4b8c626f +0, 36600, 194400, 0xf0817958 +0, 36900, 194400, 0xc0887e53 +0, 37200, 194400, 0x42e6854c +0, 37500, 194400, 0x036c9140 +0, 37800, 194400, 0x0f21a62b +0, 38100, 194400, 0xcdaeaa27 +0, 38400, 194400, 0xe425bc15 +0, 38700, 194400, 0x8e18c20f +0, 39000, 194400, 0x767cd5fb +0, 39300, 194400, 0x554ae6ea +0, 39600, 194400, 0xeac1f9d7 +0, 39900, 194400, 0x0b32fed2 +0, 40200, 194400, 0xe30c19c6 +0, 40500, 194400, 0x6a8a23bc +0, 40800, 194400, 0x26bf36a9 +0, 41100, 194400, 0x1e4f3fa0 +0, 41400, 194400, 0x231f5986 +0, 41700, 194400, 0xf557756a +0, 42000, 194400, 0x6bce805f +0, 42300, 194400, 0xcd80924d +0, 42600, 194400, 0x65dc9f40 +0, 42900, 194400, 0x2ab7af30 +0, 43200, 194400, 0xd43cb728 +0, 43500, 194400, 0x05d9c916 +0, 43800, 194400, 0x43cad10e +0, 44100, 194400, 0x06b5e0fe +0, 44400, 194400, 0xa142f0ee +0, 44700, 194400, 0xed7f03ea +0, 45000, 194400, 0xf26019d4 +0, 45300, 194400, 0x3b7f29c4 +0, 45600, 194400, 0x30282ebf +0, 45900, 194400, 0xaeff4aa3 +0, 46200, 194400, 0x1d355697 +0, 46500, 194400, 0x2ead6f7e +0, 46800, 194400, 0xf1b67776 +0, 47100, 194400, 0x93b38b62 +0, 47400, 194400, 0x9469905d +0, 47700, 194400, 0x27bf9756 +0, 48000, 194400, 0xd016a548 +0, 48300, 194400, 0x6889b835 +0, 48600, 194400, 0x6a05be2f +0, 48900, 194400, 0xe0a1ce1f +0, 49200, 194400, 0x8fdbd617 +0, 49500, 194400, 0xd68fe805 +0, 49800, 194400, 0x0d1dfbf1 +0, 50100, 194400, 0x0fe70bf0 +0, 50400, 194400, 0x0a8f13e8 +0, 50700, 194400, 0x0ca42bd0 +0, 51000, 194400, 0x6f3838c3 +0, 51300, 194400, 0x045448b3 +0, 51600, 194400, 0x764349b2 +0, 51900, 194400, 0xed1651aa +0, 52200, 194400, 0xbb376398 +0, 52500, 194400, 0xd0d5718a +0, 52800, 194400, 0xcd977e7d +0, 53100, 194400, 0x8cb39665 +0, 53400, 194400, 0xb935b04b +0, 53700, 194400, 0x0292be3d +0, 54000, 194400, 0x4f21c833 +0, 54300, 194400, 0xa5c7d823 +0, 54600, 194400, 0xfb8ee01b +0, 54900, 194400, 0xea53ee0d +0, 55200, 194400, 0x803efcfe +0, 55500, 194400, 0x2c0e0aff +0, 55800, 194400, 0x3df318f1 +0, 56100, 194400, 0xc4cb26e3 +0, 56400, 194400, 0x92a033d6 +0, 56700, 194400, 0x1b2048c1 +0, 57000, 194400, 0x236858b1 +0, 57300, 194400, 0x482f6d9c +0, 57600, 194400, 0x9ee97891 +0, 57900, 194400, 0xe0dc8683 +0, 58200, 194400, 0x461b9079 +0, 58500, 194400, 0xd346a960 +0, 58800, 194400, 0xa384b554 +0, 59100, 194400, 0x3246cf3a +0, 59400, 194400, 0xa53fe722 +0, 59700, 194400, 0xe620fd0c +0, 60000, 194400, 0xd6370414 +0, 60300, 194400, 0xf57f1404 +0, 60600, 194400, 0x8c6420f7 +0, 60900, 194400, 0xd4be3add +0, 61200, 194400, 0xa8dc4ec9 +0, 61500, 194400, 0xda1563b4 +0, 61800, 194400, 0xd51873a4 +0, 62100, 194400, 0x68588196 +0, 62400, 194400, 0x40d18e89 +0, 62700, 194400, 0x1b75a275 +0, 63000, 194400, 0xedd1a572 +0, 63300, 194400, 0x55daad6a +0, 63600, 194400, 0xcb93b067 +0, 63900, 194400, 0x5888ba5d +0, 64200, 194400, 0x2c11c84f +0, 64500, 194400, 0x0fbae334 +0, 64800, 194400, 0x773fed2a +0, 65100, 194400, 0x2f87fc1b +0, 65400, 194400, 0xe8120521 +0, 65700, 194400, 0x64ac0f17 +0, 66000, 194400, 0xba531c0a +0, 66300, 194400, 0xf49433f2 +0, 66600, 194400, 0x79e234f1 +0, 66900, 194400, 0x043937ee +0, 67200, 194400, 0x9e6141e4 +0, 67500, 194400, 0x34204fd6 +0, 67800, 194400, 0xa1dd60c5 +0, 68100, 194400, 0x12b36eb7 +0, 68400, 194400, 0x68987aab +0, 68700, 194400, 0x3207889d +0, 69000, 194400, 0x3bb59194 +0, 69300, 194400, 0x0a119f86 +0, 69600, 194400, 0x472bab7a +0, 69900, 194400, 0x7364c85d +0, 70200, 194400, 0xa812d84d +0, 70500, 194400, 0xf384f530 +0, 70800, 194400, 0x1546052f +0, 71100, 194400, 0xeb611a1a +0, 71400, 194400, 0xc39d250f +0, 71700, 194400, 0x7bd73301 +0, 72000, 194400, 0x10f73cf7 +0, 72300, 194400, 0x95dc55de +0, 72600, 194400, 0x392e61d2 +0, 72900, 194400, 0x113c7bb8 +0, 73200, 194400, 0x17128fa4 +0, 73500, 194400, 0xf95e9b98 +0, 73800, 194400, 0xdc47aa89 +0, 74100, 194400, 0xea5dc073 +0, 74400, 194400, 0x8dfadc57 +0, 74700, 194400, 0xe5c3e84b +0, 75000, 194400, 0x8952f43f +0, 75300, 194400, 0xec9e0240 +0, 75600, 194400, 0x8f460c36 +0, 75900, 194400, 0xd43e182a +0, 76200, 194400, 0xb00b2919 +0, 76500, 194400, 0xc9f6350d +0, 76800, 194400, 0x87ca44fd +0, 77100, 194400, 0xa6a250f1 +0, 77400, 194400, 0x34fa60e1 +0, 77700, 194400, 0xe1a372cf +0, 78000, 194400, 0xc80785bc +0, 78300, 194400, 0x43e297aa +0, 78600, 194400, 0x7e8ea49d +0, 78900, 194400, 0xd009b091 +0, 79200, 194400, 0x9126bc85 +0, 79500, 194400, 0x175ad36e +0, 79800, 194400, 0xf9dae160 +0, 80100, 194400, 0x1b98f948 +0, 80400, 194400, 0xa6c5133d +0, 80700, 194400, 0xf5d42729 +0, 81000, 194400, 0x8cfe311f +0, 81300, 194400, 0x18733e12 +0, 81600, 194400, 0x24ac50ff +0, 81900, 194400, 0x0d1c64eb +0, 82200, 194400, 0xde947cd3 +0, 82500, 194400, 0x08268dc2 +0, 82800, 194400, 0xfec69fb0 +0, 83100, 194400, 0xba83aba4 +0, 83400, 194400, 0xfbe2bc93 +0, 83700, 194400, 0xe22fcc83 +0, 84000, 194400, 0x050fcf80 +0, 84300, 194400, 0xee1ed778 +0, 84600, 194400, 0xb44cda75 +0, 84900, 194400, 0xa29fe46b +0, 85200, 194400, 0xa99bf55a +0, 85500, 194400, 0x4f840d51 +0, 85800, 194400, 0x58941945 +0, 86100, 194400, 0x62cb2638 +0, 86400, 194400, 0x22ee312d +0, 86700, 194400, 0xea8f3925 +0, 87000, 194400, 0xed294c12 +0, 87300, 194400, 0xafa75e00 +0, 87600, 194400, 0x19d45ffe +0, 87900, 194400, 0x7fcf61fc +0, 88200, 194400, 0x2c126df0 +0, 88500, 194400, 0x331379e4 +0, 88800, 194400, 0x99fe8cd1 +0, 89100, 194400, 0xa5ec98c5 +0, 89400, 194400, 0xac68a6b7 +0, 89700, 194400, 0x28e6b2ab diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/crc mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/crc --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/crc 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/crc 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +crc EDB88320 =3D5CDD04 +crc 04C11DB7 =E0BAF5C0 +crc 00008005 =BB1F +crc 00000007 =E3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/cvid-grayscale mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/cvid-grayscale --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/cvid-grayscale 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/cvid-grayscale 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,152 @@ +0, 0, 11300, 0x46c78923 +0, 17921, 11300, 0x3f2a1175 +0, 35842, 11300, 0x722de221 +0, 53763, 11300, 0x01746b88 +0, 71684, 11300, 0x549587a7 +0, 89605, 11300, 0x843ab943 +0, 107526, 11300, 0x62fdee48 +0, 125447, 11300, 0x74a62867 +0, 143368, 11300, 0x35a20e2f +0, 161289, 11300, 0x4e9ef54d +0, 179210, 11300, 0xec7201f5 +0, 197131, 11300, 0x363bfe27 +0, 215052, 11300, 0x2aaab418 +0, 232973, 11300, 0x6a48ab3f +0, 250894, 11300, 0x3fecea34 +0, 268815, 11300, 0xa371f55e +0, 286736, 11300, 0xa86b147c +0, 304657, 11300, 0x49e9206e +0, 322578, 11300, 0x6c9a2155 +0, 340499, 11300, 0x2c8a4798 +0, 358420, 11300, 0x3485676c +0, 376341, 11300, 0xb0b293f2 +0, 394262, 11300, 0xe4a9b068 +0, 412183, 11300, 0xd68d0556 +0, 430104, 11300, 0xc28e5193 +0, 448025, 11300, 0xf6948483 +0, 465945, 11300, 0xf21fbf57 +0, 483866, 11300, 0x8345eb44 +0, 501787, 11300, 0x8124f045 +0, 519708, 11300, 0x18e31f10 +0, 537629, 11300, 0xdb1943fc +0, 555550, 11300, 0x8701699f +0, 573471, 11300, 0xd7b18550 +0, 591392, 11300, 0xa56faccc +0, 609313, 11300, 0xf8bcc17c +0, 627234, 11300, 0x446acab9 +0, 645155, 11300, 0x755fd295 +0, 663076, 11300, 0x92e3d100 +0, 680997, 11300, 0x54895bb3 +0, 698918, 11300, 0xd18bffda +0, 716839, 11300, 0x480dbe4f +0, 734760, 11300, 0x49ea9dbe +0, 752681, 11300, 0x00d3a003 +0, 770602, 11300, 0xda7bbfb2 +0, 788523, 11300, 0x9700d9c2 +0, 806444, 11300, 0xa0a9e490 +0, 824365, 11300, 0x00eb0979 +0, 842286, 11300, 0x32b04630 +0, 860207, 11300, 0xdfb73e51 +0, 878128, 11300, 0x3d8e4f96 +0, 896049, 11300, 0x2ca83271 +0, 913970, 11300, 0xb5b123c0 +0, 931891, 11300, 0x8a570e58 +0, 949812, 11300, 0xc6c805bc +0, 967733, 11300, 0x27caf7a5 +0, 985654, 11300, 0x5319ecb0 +0, 1003575, 11300, 0x5471e3fd +0, 1021496, 11300, 0x6d68a6f4 +0, 1039417, 11300, 0x872b7194 +0, 1057338, 11300, 0x007c36bd +0, 1075259, 11300, 0x2714f1b5 +0, 1093180, 11300, 0x6c8eb50f +0, 1111101, 11300, 0xf5d57be8 +0, 1129022, 11300, 0x981f412b +0, 1146943, 11300, 0x1a9804a1 +0, 1164864, 11300, 0xf0c1d24a +0, 1182785, 11300, 0xa70a9d9b +0, 1200706, 11300, 0x8c466876 +0, 1218627, 11300, 0xcf2e32df +0, 1236548, 11300, 0xcb8cfebf +0, 1254469, 11300, 0xb961ca99 +0, 1272390, 11300, 0x666d9619 +0, 1290311, 11300, 0x84bf5b55 +0, 1308232, 11300, 0xbfa22ccc +0, 1326153, 11300, 0xcde41849 +0, 1344074, 11300, 0x71372dcd +0, 1361994, 11300, 0x13402cfd +0, 1379915, 11300, 0xdebdd321 +0, 1397836, 11300, 0xdda66de1 +0, 1415757, 11300, 0x7f4bb682 +0, 1433678, 11300, 0xf67fd528 +0, 1451599, 11300, 0xe739ff8c +0, 1469520, 11300, 0x2e131774 +0, 1487441, 11300, 0xfa942811 +0, 1505362, 11300, 0x0cd93ac2 +0, 1523283, 11300, 0xd0445e0e +0, 1541204, 11300, 0x3f3497c7 +0, 1559125, 11300, 0x11b5bd2c +0, 1577046, 11300, 0xccd5e62a +0, 1594967, 11300, 0xa9d4fcb5 +0, 1612888, 11300, 0x34aa1a03 +0, 1630809, 11300, 0x1ce6299e +0, 1648730, 11300, 0x661c2745 +0, 1666651, 11300, 0x27d8a8b3 +0, 1684572, 11300, 0x9eb07467 +0, 1702493, 11300, 0x128374d2 +0, 1720414, 11300, 0x05c36ff5 +0, 1738335, 11300, 0x8a136bde +0, 1756256, 11300, 0x15c47c99 +0, 1774177, 11300, 0xcc4a93f4 +0, 1792098, 11300, 0x19529b2b +0, 1810019, 11300, 0x9943c076 +0, 1827940, 11300, 0xf898e583 +0, 1845861, 11300, 0x40f71f94 +0, 1863782, 11300, 0x5b604afb +0, 1881703, 11300, 0x8c176af4 +0, 1899624, 11300, 0x0f1a6216 +0, 1917545, 11300, 0x38bbd13d +0, 1935466, 11300, 0x90c8d1fc +0, 1953387, 11300, 0x253000d7 +0, 1971308, 11300, 0xb94b03b1 +0, 1989229, 11300, 0xbc872268 +0, 2007150, 11300, 0xe77adb8c +0, 2025071, 11300, 0xa38936b7 +0, 2042992, 11300, 0xd6153632 +0, 2060913, 11300, 0x1ae633cc +0, 2078834, 11300, 0xb90c286e +0, 2096755, 11300, 0xbc7e333d +0, 2114676, 11300, 0x1b5421f8 +0, 2132597, 11300, 0xdde6506d +0, 2150518, 11300, 0xd3eb757e +0, 2168439, 11300, 0x5ad1929c +0, 2186360, 11300, 0x4f6aa47d +0, 2204281, 11300, 0xab3caf55 +0, 2222202, 11300, 0x5ff9b39a +0, 2240123, 11300, 0x1454e12e +0, 2258043, 11300, 0xf18216e8 +0, 2275964, 11300, 0x62144880 +0, 2293885, 11300, 0x54284241 +0, 2311806, 11300, 0x8e8c7228 +0, 2329727, 11300, 0xb498d06e +0, 2347648, 11300, 0x7b1e6be1 +0, 2365569, 11300, 0x5e5ea1f4 +0, 2383490, 11300, 0x41eda28e +0, 2401411, 11300, 0x7ba6aa92 +0, 2419332, 11300, 0xa8a8b1c7 +0, 2437253, 11300, 0x0d30bd08 +0, 2455174, 11300, 0xc610bf16 +0, 2473095, 11300, 0xed57c075 +0, 2491016, 11300, 0xb86dbfea +0, 2508937, 11300, 0x0970c03d +0, 2526858, 11300, 0x743ac2ac +0, 2544779, 11300, 0x0a44c816 +0, 2562700, 11300, 0xe32acd6b +0, 2580621, 11300, 0x209bcdab +0, 2598542, 11300, 0x3cd0d105 +0, 2616463, 11300, 0xc0bcd330 +0, 2634384, 11300, 0x4785d6dc +0, 2652305, 11300, 0xe85f9c90 +0, 2670226, 11300, 0xd4a72850 +0, 2688147, 11300, 0x04766e41 +0, 2706068, 11300, 0x04766e41 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/deluxepaint-anm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/deluxepaint-anm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/deluxepaint-anm 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/deluxepaint-anm 2012-01-11 00:34:30.000000000 +0000 @@ -69,87 +69,55 @@ 0, 204000, 192000, 0xdd7f371d 0, 207000, 192000, 0xeed134c6 0, 210000, 192000, 0x362931f5 -0, 213000, 192000, 0x362931f5 -0, 216000, 192000, 0x362931f5 -0, 219000, 192000, 0x362931f5 -0, 222000, 192000, 0x362931f5 -0, 225000, 192000, 0x362931f5 -0, 228000, 192000, 0x362931f5 -0, 231000, 192000, 0x362931f5 -0, 234000, 192000, 0x362931f5 -0, 237000, 192000, 0x362931f5 -0, 240000, 192000, 0x362931f5 -0, 243000, 192000, 0x362931f5 -0, 246000, 192000, 0x362931f5 -0, 249000, 192000, 0x362931f5 -0, 252000, 192000, 0x362931f5 -0, 255000, 192000, 0x362931f5 -0, 258000, 192000, 0x362931f5 -0, 261000, 192000, 0x362931f5 -0, 264000, 192000, 0x362931f5 -0, 267000, 192000, 0x362931f5 -0, 270000, 192000, 0x362931f5 -0, 273000, 192000, 0x362931f5 -0, 276000, 192000, 0x362931f5 -0, 279000, 192000, 0x362931f5 -0, 282000, 192000, 0x362931f5 -0, 285000, 192000, 0x362931f5 -0, 288000, 192000, 0x362931f5 -0, 291000, 192000, 0x362931f5 -0, 294000, 192000, 0x362931f5 -0, 297000, 192000, 0x362931f5 -0, 300000, 192000, 0x362931f5 -0, 303000, 192000, 0x362931f5 -0, 306000, 192000, 0x362931f5 -0, 309000, 192000, 0xfb41331d -0, 312000, 192000, 0x087433f8 -0, 315000, 192000, 0xf36b34a6 -0, 318000, 192000, 0x652a33cd -0, 321000, 192000, 0x652a33cd -0, 324000, 192000, 0xe50c336a -0, 327000, 192000, 0x652a33cd -0, 330000, 192000, 0xeed134c6 -0, 333000, 192000, 0x652a33cd -0, 336000, 192000, 0x5d7633e5 -0, 339000, 192000, 0x845233b5 -0, 342000, 192000, 0x9d1c349b -0, 345000, 192000, 0x25843317 -0, 348000, 192000, 0xc84b375c -0, 351000, 192000, 0xaf2b3410 -0, 354000, 192000, 0xaf2b3410 -0, 357000, 192000, 0x26d23594 -0, 360000, 192000, 0xaf2b3410 -0, 363000, 192000, 0x26d23594 -0, 366000, 192000, 0xaf2b3410 -0, 369000, 192000, 0x72c4dfb9 -0, 372000, 192000, 0x3c72e390 -0, 375000, 192000, 0xb4466634 -0, 378000, 192000, 0x84f064f5 -0, 381000, 192000, 0xad43f3f5 -0, 384000, 192000, 0xa8644d57 -0, 387000, 192000, 0xfac35238 -0, 390000, 192000, 0xe9374d1e -0, 393000, 192000, 0x0bd14cfa -0, 396000, 192000, 0x7e51a437 -0, 399000, 192000, 0x92678dfa -0, 402000, 192000, 0x43338d41 -0, 405000, 192000, 0x00000000 -0, 408000, 192000, 0x00000000 -0, 411000, 192000, 0x00000000 -0, 414000, 192000, 0x00000000 -0, 417000, 192000, 0x00000000 -0, 420000, 192000, 0x00000000 -0, 423000, 192000, 0x00000000 -0, 426000, 192000, 0x00000000 -0, 429000, 192000, 0x00000000 -0, 432000, 192000, 0x00000000 -0, 435000, 192000, 0x00000000 -0, 438000, 192000, 0x00000000 -0, 441000, 192000, 0x00000000 -0, 444000, 192000, 0x00000000 -0, 447000, 192000, 0x00000000 -0, 450000, 192000, 0x00000000 -0, 453000, 192000, 0x00000000 -0, 456000, 192000, 0x00000000 -0, 459000, 192000, 0x00000000 -0, 462000, 192000, 0x82a79641 +0, 213000, 192000, 0xfb41331d +0, 216000, 192000, 0x087433f8 +0, 219000, 192000, 0xf36b34a6 +0, 222000, 192000, 0x652a33cd +0, 225000, 192000, 0x652a33cd +0, 228000, 192000, 0xe50c336a +0, 231000, 192000, 0x652a33cd +0, 234000, 192000, 0xeed134c6 +0, 237000, 192000, 0x652a33cd +0, 240000, 192000, 0x5d7633e5 +0, 243000, 192000, 0x845233b5 +0, 246000, 192000, 0x9d1c349b +0, 249000, 192000, 0x25843317 +0, 252000, 192000, 0xc84b375c +0, 255000, 192000, 0xaf2b3410 +0, 258000, 192000, 0xaf2b3410 +0, 261000, 192000, 0x26d23594 +0, 264000, 192000, 0xaf2b3410 +0, 267000, 192000, 0x26d23594 +0, 270000, 192000, 0xaf2b3410 +0, 273000, 192000, 0x72c4dfb9 +0, 276000, 192000, 0x3c72e390 +0, 279000, 192000, 0xb4466634 +0, 282000, 192000, 0x84f064f5 +0, 285000, 192000, 0xad43f3f5 +0, 288000, 192000, 0xa8644d57 +0, 291000, 192000, 0xfac35238 +0, 294000, 192000, 0xe9374d1e +0, 297000, 192000, 0x0bd14cfa +0, 300000, 192000, 0x7e51a437 +0, 303000, 192000, 0x92678dfa +0, 306000, 192000, 0x43338d41 +0, 309000, 192000, 0x00000000 +0, 312000, 192000, 0x00000000 +0, 315000, 192000, 0x00000000 +0, 318000, 192000, 0x00000000 +0, 321000, 192000, 0x00000000 +0, 324000, 192000, 0x00000000 +0, 327000, 192000, 0x00000000 +0, 330000, 192000, 0x00000000 +0, 333000, 192000, 0x00000000 +0, 336000, 192000, 0x00000000 +0, 339000, 192000, 0x00000000 +0, 342000, 192000, 0x00000000 +0, 345000, 192000, 0x00000000 +0, 348000, 192000, 0x00000000 +0, 351000, 192000, 0x00000000 +0, 354000, 192000, 0x00000000 +0, 357000, 192000, 0x00000000 +0, 360000, 192000, 0x00000000 +0, 363000, 192000, 0x00000000 +0, 366000, 192000, 0x82a79641 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa1 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa1 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa1 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa1 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,25 @@ +0, 0, 921600, 0x2e2b3ca4 +0, 11520, 921600, 0x0ff7a368 +0, 23040, 921600, 0xf5f0dc50 +0, 34560, 921600, 0x56cb0c9d +0, 46080, 921600, 0xb253228f +0, 57600, 921600, 0xefd3419e +0, 69120, 921600, 0x708c0ce7 +0, 80640, 921600, 0x0b3a7f6d +0, 92160, 921600, 0x72db4eac +0, 103680, 921600, 0x94328111 +0, 115200, 921600, 0x95f7b2f0 +0, 126720, 921600, 0xdc3c9655 +0, 138240, 921600, 0xfe03dec6 +0, 149760, 921600, 0x2551dffb +0, 161280, 921600, 0xe8b37d9e +0, 172800, 921600, 0xad93508b +0, 184320, 921600, 0x5a1c4890 +0, 195840, 921600, 0x6f972fb4 +0, 207360, 921600, 0xa1d5ff95 +0, 218880, 921600, 0x7bc5d07c +0, 230400, 921600, 0xc0311e4e +0, 241920, 921600, 0x5b02cc48 +0, 253440, 921600, 0x8db4d5fa +0, 264960, 921600, 0x31aae769 +0, 276480, 921600, 0xab62b9a7 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa10 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa10 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa10 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa10 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,8 @@ +0, 0, 192000, 0xbabcbd55 +0, 6390, 192000, 0xf00a5683 +0, 12780, 192000, 0xcce90589 +0, 19170, 192000, 0x8545631f +0, 25560, 192000, 0xd3ab654c +0, 31950, 192000, 0x5e0dda12 +0, 38340, 192000, 0x7e94b053 +0, 44730, 192000, 0x8027e68b diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa11 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa11 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa11 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa11 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,9 @@ +0, 0, 192000, 0x8b8bd8de +0, 6390, 192000, 0xdac26ec2 +0, 12780, 192000, 0x0fc01c28 +0, 19170, 192000, 0x1251eef7 +0, 25560, 192000, 0x89eced0e +0, 31950, 192000, 0x4943d821 +0, 38340, 192000, 0x49258ec9 +0, 44730, 192000, 0x9afd5881 +0, 51120, 192000, 0xb322b901 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa2 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa2 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa2 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa2 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,17 @@ +0, 0, 921600, 0x713f2da1 +0, 6390, 921600, 0x9e772ec9 +0, 12780, 921600, 0x9420310f +0, 19170, 921600, 0xd68f294f +0, 25560, 921600, 0xe25a1bcf +0, 31950, 921600, 0x32f903ec +0, 38340, 921600, 0xdb290b1c +0, 44730, 921600, 0x0b0d1b0f +0, 51120, 921600, 0x58430921 +0, 57510, 921600, 0xe65dd39e +0, 63900, 921600, 0x146b3068 +0, 70290, 921600, 0x6e1e7f78 +0, 76680, 921600, 0x0166e01c +0, 83070, 921600, 0x83b86b56 +0, 89460, 921600, 0xd52a1697 +0, 95850, 921600, 0x5b38adc8 +0, 102240, 921600, 0x457f6cea diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa3 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa3 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa3 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa3 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,10 @@ +0, 0, 192000, 0x10380cf0 +0, 9000, 192000, 0x1d74af4c +0, 18000, 192000, 0xd665492d +0, 27000, 192000, 0xbf544565 +0, 36000, 192000, 0xf8a33b00 +0, 45000, 192000, 0x7d08bbad +0, 54000, 192000, 0x10685a90 +0, 63000, 192000, 0x0a1a9ef6 +0, 72000, 192000, 0x3e967980 +0, 81000, 192000, 0x9849f751 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa4 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa4 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa4 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa4 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,13 @@ +0, 0, 921600, 0xe6309638 +0, 12780, 921600, 0xa99a7665 +0, 25560, 921600, 0x172ccfbb +0, 38340, 921600, 0xcf676571 +0, 51120, 921600, 0x6a5077f2 +0, 63900, 921600, 0x6a5077f2 +0, 76680, 921600, 0x6a5077f2 +0, 89460, 921600, 0x6a5077f2 +0, 102240, 921600, 0x6a5077f2 +0, 115020, 921600, 0x6a5077f2 +0, 127800, 921600, 0xb83db404 +0, 140580, 921600, 0x997ceb90 +0, 153360, 921600, 0xd707157c diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa5 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa5 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa5 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,15 @@ +0, 0, 192000, 0xc0941c10 +0, 9000, 192000, 0xe2fe3ae5 +0, 18000, 192000, 0x4a352d98 +0, 27000, 192000, 0x7b78e0bb +0, 36000, 192000, 0x855c6675 +0, 45000, 192000, 0xf443dad6 +0, 54000, 192000, 0xe7e2a2e1 +0, 63000, 192000, 0xa9009c58 +0, 72000, 192000, 0x551855ab +0, 81000, 192000, 0x253908c7 +0, 90000, 192000, 0x616213c4 +0, 99000, 192000, 0xa381c3b1 +0, 108000, 192000, 0xa2d64152 +0, 117000, 192000, 0x34ed0f72 +0, 126000, 192000, 0x05be63b4 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa6 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa6 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa6 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa6 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,12 @@ +0, 0, 192000, 0x69f6a5f6 +0, 6390, 192000, 0xc741d0a6 +0, 12780, 192000, 0xba31e7a4 +0, 19170, 192000, 0x7dc45080 +0, 25560, 192000, 0x1c91dad5 +0, 31950, 192000, 0x564b69b1 +0, 38340, 192000, 0xdd9d9ae8 +0, 44730, 192000, 0x605c05e1 +0, 51120, 192000, 0xa5341ddb +0, 57510, 192000, 0x1ebff8ba +0, 63900, 192000, 0x240df237 +0, 70290, 192000, 0xac641867 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa7 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa7 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa7 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa7 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,12 @@ +0, 0, 7866, 0xa0056fdb +0, 6390, 7866, 0xed906c7a +0, 12780, 7866, 0x1c6e6f7d +0, 19170, 7866, 0xa2c460f7 +0, 25560, 7866, 0xcf2166d4 +0, 31950, 7866, 0xea545432 +0, 38340, 7866, 0x604a5a9e +0, 44730, 7866, 0xbbc95c89 +0, 51120, 7866, 0x80b16b5b +0, 57510, 7866, 0x9a1660ae +0, 63900, 7866, 0x6f886b10 +0, 70290, 7866, 0xad8b5c99 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa8 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa8 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa8 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa8 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,36 @@ +0, 0, 134724, 0x2ab217de +0, 6390, 134724, 0xbf240f9a +0, 12780, 134724, 0x020a6010 +0, 19170, 134724, 0x9a5f9374 +0, 25560, 134724, 0x1e93a7e9 +0, 31950, 134724, 0x9e4a4c55 +0, 38340, 134724, 0x8f9d1bab +0, 44730, 134724, 0xb26ac45b +0, 51120, 134724, 0xc08706d2 +0, 57510, 134724, 0x0806b031 +0, 63900, 134724, 0x234dbb33 +0, 70290, 134724, 0xe4cbfb2f +0, 76680, 134724, 0xf603f3fd +0, 83070, 134724, 0x205669d1 +0, 89460, 134724, 0x7ddbb5e3 +0, 95850, 134724, 0x8dfbb45a +0, 102240, 134724, 0x9632f681 +0, 108630, 134724, 0x259e462c +0, 115020, 134724, 0x14f2bac1 +0, 121410, 134724, 0xac3de7ed +0, 127800, 134724, 0x6b8af396 +0, 134190, 134724, 0xd1e4bc1c +0, 140580, 134724, 0x716d1c73 +0, 146970, 134724, 0x610956c8 +0, 153360, 134724, 0x89ff8e86 +0, 159750, 134724, 0xc3ea6b6f +0, 166140, 134724, 0x886688ef +0, 172530, 134724, 0xe60fc8c1 +0, 178920, 134724, 0x22bd3131 +0, 185310, 134724, 0xb1d74561 +0, 191700, 134724, 0x61b069bc +0, 198090, 134724, 0x50b665c1 +0, 204480, 134724, 0x027e5144 +0, 210870, 134724, 0xfe0c31b4 +0, 217260, 134724, 0x1e7a1f2d +0, 223650, 134724, 0x48bff03d diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa9 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa9 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dfa9 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dfa9 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,6 @@ +0, 0, 228150, 0x188c6d9b +0, 6390, 228150, 0x658dbf2f +0, 12780, 228150, 0xc09a4b2e +0, 19170, 228150, 0x8777bc7d +0, 25560, 228150, 0xa388f0ce +0, 31950, 228150, 0x4e06666e diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dpcm-xan mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dpcm-xan --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dpcm-xan 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dpcm-xan 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +b6da857766896ab10bb900004f915053 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/duck-dk3 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/duck-dk3 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/duck-dk3 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/duck-dk3 2012-01-11 00:34:30.000000000 +0000 @@ -1 +1 @@ -62fbe4db4a49cb044f57f92cce9993c5 +bb952ae86c72d461aef7583685ec0a4d diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dxtory mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dxtory --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/dxtory 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/dxtory 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +0, 0, 1382400, 0x44373645 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/ea-tqi-adpcm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/ea-tqi-adpcm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/ea-tqi-adpcm 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/ea-tqi-adpcm 2012-01-11 00:34:30.000000000 +0000 @@ -49,4 +49,3 @@ 0, 144000, 115200, 0x65fd5e60 1, 144000, 5936, 0x2174304d 0, 150000, 115200, 0x0c256424 -0, 156000, 115200, 0xa9cdd8d2 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/eval mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/eval --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/eval 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/eval 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,152 @@ +Evaluating '' +'' -> nan + +Evaluating '1;2' +'1;2' -> 2.000000 + +Evaluating '-20' +'-20' -> -20.000000 + +Evaluating '-PI' +'-PI' -> -3.141593 + +Evaluating '+PI' +'+PI' -> 3.141593 + +Evaluating '1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)' +'1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)' -> 12.700000 + +Evaluating '80G/80Gi' +'80G/80Gi' -> 0.931323 + +Evaluating '1k' +'1k' -> 1000.000000 + +Evaluating '1Gi' +'1Gi' -> 1073741824.000000 + +Evaluating '1gi' +'1gi' -> nan + +Evaluating '1GiFoo' +'1GiFoo' -> nan + +Evaluating '1k+1k' +'1k+1k' -> 2000.000000 + +Evaluating '1Gi*3foo' +'1Gi*3foo' -> nan + +Evaluating 'foo' +'foo' -> nan + +Evaluating 'foo(' +'foo(' -> nan + +Evaluating 'foo()' +'foo()' -> nan + +Evaluating 'foo)' +'foo)' -> nan + +Evaluating 'sin' +'sin' -> nan + +Evaluating 'sin(' +'sin(' -> nan + +Evaluating 'sin()' +'sin()' -> nan + +Evaluating 'sin)' +'sin)' -> nan + +Evaluating 'sin 10' +'sin 10' -> nan + +Evaluating 'sin(1,2,3)' +'sin(1,2,3)' -> nan + +Evaluating 'sin(1 )' +'sin(1 )' -> 0.841471 + +Evaluating '1' +'1' -> 1.000000 + +Evaluating '1foo' +'1foo' -> nan + +Evaluating 'bar + PI + E + 100f*2 + foo' +'bar + PI + E + 100f*2 + foo' -> nan + +Evaluating '13k + 12f - foo(1, 2)' +'13k + 12f - foo(1, 2)' -> nan + +Evaluating '1gi' +'1gi' -> nan + +Evaluating '1Gi' +'1Gi' -> 1073741824.000000 + +Evaluating 'st(0, 123)' +'st(0, 123)' -> 123.000000 + +Evaluating 'st(1, 123); ld(1)' +'st(1, 123); ld(1)' -> 123.000000 + +Evaluating 'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' +'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' -> 4950.000000 + +Evaluating 'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)' +'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)' -> 144.000000 + +Evaluating 'while(0, 10)' +'while(0, 10)' -> nan + +Evaluating 'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))' +'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))' -> 100.000000 + +Evaluating 'isnan(1)' +'isnan(1)' -> 0.000000 + +Evaluating 'isnan(NAN)' +'isnan(NAN)' -> 1.000000 + +Evaluating 'floor(NAN)' +'floor(NAN)' -> nan + +Evaluating 'floor(123.123)' +'floor(123.123)' -> 123.000000 + +Evaluating 'floor(-123.123)' +'floor(-123.123)' -> -124.000000 + +Evaluating 'trunc(123.123)' +'trunc(123.123)' -> 123.000000 + +Evaluating 'trunc(-123.123)' +'trunc(-123.123)' -> -123.000000 + +Evaluating 'ceil(123.123)' +'ceil(123.123)' -> 124.000000 + +Evaluating 'ceil(-123.123)' +'ceil(-123.123)' -> -123.000000 + +Evaluating 'sqrt(1764)' +'sqrt(1764)' -> 42.000000 + +Evaluating 'isnan(sqrt(-1))' +'isnan(sqrt(-1))' -> 1.000000 + +Evaluating 'not(1)' +'not(1)' -> 0.000000 + +Evaluating 'not(NAN)' +'not(NAN)' -> 0.000000 + +Evaluating 'not(0)' +'not(0)' -> 1.000000 + +12.700000 == 12.7 +0.931323 == 0.931322575 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/feeble-dxa mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/feeble-dxa --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/feeble-dxa 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/feeble-dxa 2012-01-11 00:34:30.000000000 +0000 @@ -62,4 +62,3 @@ 0, 171000, 921600, 0x5639e670 1, 171429, 1000, 0xa491f3ef 1, 175510, 1000, 0x2c036e18 -1, 179592, 1000, 0x52d65e2a diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/fifo mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/fifo --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/fifo 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/fifo 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,27 @@ +-12: 1 +-11: 2 +-10: 3 +-9: 4 +-8: 5 +-7: 6 +-6: 7 +-5: 8 +-4: 9 +-3: 10 +-2: 11 +-1: 12 +0: 0 +1: 1 +2: 2 +3: 3 +4: 4 +5: 5 +6: 6 +7: 7 +8: 8 +9: 9 +10: 10 +11: 11 +12: 12 + +0 1 2 3 4 5 6 7 8 9 10 11 12 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/film-cvid-pcm-stereo-8bit mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/film-cvid-pcm-stereo-8bit --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/film-cvid-pcm-stereo-8bit 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/film-cvid-pcm-stereo-8bit 2012-01-11 00:34:30.000000000 +0000 @@ -2,246 +2,138 @@ 1, 0, 88192, 0x23bb50ae 0, 3000, 107520, 0x61eb28c1 0, 6000, 107520, 0x45e20af7 -0, 9000, 107520, 0x45e20af7 -0, 12000, 107520, 0x366970fc -0, 15000, 107520, 0x366970fc -0, 18000, 107520, 0xa392bcb3 -0, 21000, 107520, 0xa392bcb3 -0, 24000, 107520, 0xcf7bac98 -0, 27000, 107520, 0xcf7bac98 -0, 30000, 107520, 0x222eba53 -0, 33000, 107520, 0x222eba53 -0, 36000, 107520, 0x74e255a1 -0, 39000, 107520, 0x74e255a1 -0, 42000, 107520, 0xc19eec6f +0, 9000, 107520, 0x366970fc +0, 12000, 107520, 0xa392bcb3 +0, 15000, 107520, 0xcf7bac98 +0, 18000, 107520, 0x222eba53 +0, 21000, 107520, 0x74e255a1 +0, 24000, 107520, 0xc19eec6f +0, 27000, 107520, 0xa3880681 +0, 30000, 107520, 0x957878db +0, 33000, 107520, 0x18340692 +0, 36000, 107520, 0x9970f24d +0, 39000, 107520, 0xf08618aa +0, 42000, 107520, 0xee7324f0 1, 44996, 44112, 0x79600f01 -0, 45000, 107520, 0xc19eec6f -0, 48000, 107520, 0xa3880681 -0, 51000, 107520, 0xa3880681 -0, 54000, 107520, 0x957878db -0, 57000, 107520, 0x957878db -0, 60000, 107520, 0x18340692 -0, 63000, 107520, 0x18340692 -0, 66000, 107520, 0x9970f24d +0, 45000, 107520, 0xe15025b3 +0, 48000, 107520, 0x8afa312e +0, 51000, 107520, 0x717a7d0f +0, 54000, 107520, 0x355c6e23 +0, 57000, 107520, 0x7015a50f +0, 60000, 107520, 0xcdfc1a16 +0, 63000, 107520, 0x38d929e7 +0, 66000, 107520, 0x52913423 1, 67502, 44096, 0x09dbf7aa -0, 69000, 107520, 0x9970f24d -0, 72000, 107520, 0xf08618aa -0, 75000, 107520, 0xf08618aa -0, 78000, 107520, 0xee7324f0 -0, 81000, 107520, 0xee7324f0 -0, 84000, 107520, 0xe15025b3 -0, 87000, 107520, 0xe15025b3 -0, 90000, 107520, 0x8afa312e +0, 69000, 107520, 0xe2c91c10 +0, 72000, 107520, 0x85516e9c +0, 75000, 107520, 0xd1626030 +0, 78000, 107520, 0xea7b16de +0, 81000, 107520, 0xa33eaa0d +0, 84000, 107520, 0x8e3be6a6 +0, 87000, 107520, 0x14147bd6 +0, 90000, 107520, 0x07d54bec 1, 90000, 44112, 0x18fed048 -0, 93000, 107520, 0x8afa312e -0, 96000, 107520, 0x717a7d0f -0, 99000, 107520, 0x717a7d0f -0, 102000, 107520, 0x355c6e23 -0, 105000, 107520, 0x355c6e23 -0, 108000, 107520, 0x7015a50f -0, 111000, 107520, 0x7015a50f +0, 93000, 107520, 0xe287a0a7 +0, 96000, 107520, 0xc023a14d +0, 99000, 107520, 0x2437085d +0, 102000, 107520, 0x63823918 +0, 105000, 107520, 0xbc17e198 +0, 108000, 107520, 0x9d99bc81 +0, 111000, 107520, 0x7e4ec71e 1, 112506, 44112, 0x030d35ef -0, 114000, 107520, 0xcdfc1a16 -0, 117000, 107520, 0xcdfc1a16 -0, 120000, 107520, 0x38d929e7 -0, 123000, 107520, 0x38d929e7 -0, 126000, 107520, 0x52913423 -0, 129000, 107520, 0x52913423 -0, 132000, 107520, 0xe2c91c10 -0, 135000, 107520, 0xe2c91c10 +0, 114000, 107520, 0x55b98376 +0, 117000, 107520, 0x356d8e9e +0, 120000, 107520, 0xf77e8a61 +0, 123000, 107520, 0x5ae7c8c7 +0, 126000, 107520, 0x8acf9322 +0, 129000, 107520, 0x40a9177e +0, 132000, 107520, 0x3e0e4d8d +0, 135000, 107520, 0xd268865b 1, 135012, 44112, 0xc23154d5 -0, 138000, 107520, 0x85516e9c -0, 141000, 107520, 0x85516e9c -0, 144000, 107520, 0xd1626030 -0, 147000, 107520, 0xd1626030 -0, 150000, 107520, 0xea7b16de -0, 153000, 107520, 0xea7b16de -0, 156000, 107520, 0xa33eaa0d +0, 138000, 107520, 0x89a4efeb +0, 141000, 107520, 0x70ca2478 +0, 144000, 107520, 0xcc9ec981 +0, 147000, 107520, 0xf0648459 +0, 150000, 107520, 0x7e4a4cca +0, 153000, 107520, 0xb315dc65 +0, 156000, 107520, 0x2aecc7b4 1, 157518, 44064, 0xe4713ee7 -0, 159000, 107520, 0xa33eaa0d -0, 162000, 107520, 0x8e3be6a6 -0, 165000, 107520, 0x8e3be6a6 -0, 168000, 107520, 0x14147bd6 -0, 171000, 107520, 0x14147bd6 -0, 174000, 107520, 0x07d54bec -0, 177000, 107520, 0x07d54bec -0, 180000, 107520, 0xe287a0a7 +0, 159000, 107520, 0x81742f51 +0, 162000, 107520, 0x3a1d7571 +0, 165000, 107520, 0x3a1d7571 +0, 168000, 107520, 0x3a1d7571 +0, 171000, 107520, 0x3a1d7571 +0, 174000, 107520, 0x3a1d7571 +0, 177000, 107520, 0x3a1d7571 +0, 180000, 107520, 0x3a1d7571 1, 180000, 44112, 0xddc19d91 -0, 183000, 107520, 0xe287a0a7 -0, 186000, 107520, 0xc023a14d -0, 189000, 107520, 0xc023a14d -0, 192000, 107520, 0x2437085d -0, 195000, 107520, 0x2437085d -0, 198000, 107520, 0x63823918 -0, 201000, 107520, 0x63823918 +0, 183000, 107520, 0xe974733e +0, 186000, 107520, 0x999c6fbf +0, 189000, 107520, 0x26b56b6e +0, 192000, 107520, 0xc9f9647b +0, 195000, 107520, 0x6d025d00 +0, 198000, 107520, 0xf9c056c1 +0, 201000, 107520, 0xa5cc4d0b 1, 202506, 44112, 0x9591522d -0, 204000, 107520, 0xbc17e198 -0, 207000, 107520, 0xbc17e198 -0, 210000, 107520, 0x9d99bc81 -0, 213000, 107520, 0x9d99bc81 -0, 216000, 107520, 0x7e4ec71e -0, 219000, 107520, 0x7e4ec71e -0, 222000, 107520, 0x55b98376 -0, 225000, 107520, 0x55b98376 +0, 204000, 107520, 0x1a4c4236 +0, 207000, 107520, 0xa9d538b6 +0, 210000, 107520, 0x14682d00 +0, 213000, 107520, 0x6236204f +0, 216000, 107520, 0x303e14aa +0, 219000, 107520, 0x943b0837 +0, 222000, 107520, 0xfce5fd07 +0, 225000, 107520, 0xd993f193 1, 225012, 44112, 0x90deb013 -0, 228000, 107520, 0x356d8e9e -0, 231000, 107520, 0x356d8e9e -0, 234000, 107520, 0xf77e8a61 -0, 237000, 107520, 0xf77e8a61 -0, 240000, 107520, 0x5ae7c8c7 -0, 243000, 107520, 0x5ae7c8c7 -0, 246000, 107520, 0x8acf9322 +0, 228000, 107520, 0x4d48e7b4 +0, 231000, 107520, 0x61ccdf83 +0, 234000, 107520, 0xfb4fd608 +0, 237000, 107520, 0x5efdcdb3 +0, 240000, 107520, 0xb03ec886 +0, 243000, 107520, 0xf464c343 +0, 246000, 107520, 0xf464c343 1, 247518, 44064, 0x3842d420 -0, 249000, 107520, 0x8acf9322 -0, 252000, 107520, 0x40a9177e -0, 255000, 107520, 0x40a9177e -0, 258000, 107520, 0x3e0e4d8d -0, 261000, 107520, 0x3e0e4d8d -0, 264000, 107520, 0xd268865b -0, 267000, 107520, 0xd268865b -0, 270000, 107520, 0x89a4efeb +0, 249000, 107520, 0xf464c343 +0, 252000, 107520, 0xf464c343 +0, 255000, 107520, 0xf464c343 +0, 258000, 107520, 0xf464c343 +0, 261000, 107520, 0xf464c343 +0, 264000, 107520, 0xf464c343 +0, 267000, 107520, 0xf464c343 +0, 270000, 107520, 0xf464c343 1, 270000, 44112, 0x99c8c3d9 -0, 273000, 107520, 0x89a4efeb -0, 276000, 107520, 0x70ca2478 -0, 279000, 107520, 0x70ca2478 -0, 282000, 107520, 0xcc9ec981 -0, 285000, 107520, 0xcc9ec981 -0, 288000, 107520, 0xf0648459 -0, 291000, 107520, 0xf0648459 +0, 273000, 107520, 0xf464c343 +0, 276000, 107520, 0xf2b2c712 +0, 279000, 107520, 0xf2b2c712 +0, 282000, 107520, 0xf2b2c712 +0, 285000, 107520, 0xf2b2c712 +0, 288000, 107520, 0xb95e6bc8 +0, 291000, 107520, 0x33feee37 1, 292506, 44112, 0xffaf3824 -0, 294000, 107520, 0x7e4a4cca -0, 297000, 107520, 0x7e4a4cca -0, 300000, 107520, 0xb315dc65 -0, 303000, 107520, 0xb315dc65 -0, 306000, 107520, 0x2aecc7b4 -0, 309000, 107520, 0x2aecc7b4 -0, 312000, 107520, 0x81742f51 -0, 315000, 107520, 0x81742f51 +0, 294000, 107520, 0x36ee3cd5 +0, 297000, 107520, 0x59096471 +0, 300000, 107520, 0x53b470c6 +0, 303000, 107520, 0xdb7c64ff +0, 306000, 107520, 0xe5a1596a +0, 309000, 107520, 0x8c8942eb +0, 312000, 107520, 0x5ecc379e +0, 315000, 107520, 0xea09432a 1, 315012, 44112, 0x3dbe1aef -0, 318000, 107520, 0x3a1d7571 -0, 321000, 107520, 0x3a1d7571 -0, 324000, 107520, 0x3a1d7571 -0, 327000, 107520, 0x3a1d7571 -0, 330000, 107520, 0x3a1d7571 -0, 333000, 107520, 0x3a1d7571 -0, 336000, 107520, 0x3a1d7571 +0, 318000, 107520, 0xe01e6b73 +0, 321000, 107520, 0x1d13bba8 +0, 324000, 107520, 0x3a993a6c +0, 327000, 107520, 0x2ede041a 1, 337518, 44064, 0xed2c7dfb -0, 339000, 107520, 0x3a1d7571 -0, 342000, 107520, 0x3a1d7571 -0, 345000, 107520, 0x3a1d7571 -0, 348000, 107520, 0x3a1d7571 -0, 351000, 107520, 0x3a1d7571 -0, 354000, 107520, 0x3a1d7571 -0, 357000, 107520, 0x3a1d7571 -0, 360000, 107520, 0xe974733e 1, 360000, 44112, 0x9e475274 -0, 363000, 107520, 0xe974733e -0, 366000, 107520, 0x999c6fbf -0, 369000, 107520, 0x999c6fbf -0, 372000, 107520, 0x26b56b6e -0, 375000, 107520, 0x26b56b6e -0, 378000, 107520, 0xc9f9647b -0, 381000, 107520, 0xc9f9647b 1, 382506, 44112, 0x541f05d4 -0, 384000, 107520, 0x6d025d00 -0, 387000, 107520, 0x6d025d00 -0, 390000, 107520, 0xf9c056c1 -0, 393000, 107520, 0xf9c056c1 -0, 396000, 107520, 0xa5cc4d0b -0, 399000, 107520, 0xa5cc4d0b -0, 402000, 107520, 0x1a4c4236 -0, 405000, 107520, 0x1a4c4236 1, 405012, 44112, 0x09e39025 -0, 408000, 107520, 0xa9d538b6 -0, 411000, 107520, 0xa9d538b6 -0, 414000, 107520, 0x14682d00 -0, 417000, 107520, 0x14682d00 -0, 420000, 107520, 0x6236204f -0, 423000, 107520, 0x6236204f -0, 426000, 107520, 0x303e14aa 1, 427518, 44064, 0xdc111087 -0, 429000, 107520, 0x303e14aa -0, 432000, 107520, 0x943b0837 -0, 435000, 107520, 0x943b0837 -0, 438000, 107520, 0xfce5fd07 -0, 441000, 107520, 0xfce5fd07 -0, 444000, 107520, 0xd993f193 -0, 447000, 107520, 0xd993f193 -0, 450000, 107520, 0x4d48e7b4 1, 450000, 44112, 0xb8f86e48 -0, 453000, 107520, 0x4d48e7b4 -0, 456000, 107520, 0x61ccdf83 -0, 459000, 107520, 0x61ccdf83 -0, 462000, 107520, 0xfb4fd608 -0, 465000, 107520, 0xfb4fd608 -0, 468000, 107520, 0x5efdcdb3 -0, 471000, 107520, 0x5efdcdb3 1, 472506, 44112, 0xa1e0c75c -0, 474000, 107520, 0xb03ec886 -0, 477000, 107520, 0xb03ec886 -0, 480000, 107520, 0xf464c343 -0, 483000, 107520, 0xf464c343 -0, 486000, 107520, 0xf464c343 -0, 489000, 107520, 0xf464c343 -0, 492000, 107520, 0xf464c343 -0, 495000, 107520, 0xf464c343 1, 495012, 44112, 0x0654dcb0 -0, 498000, 107520, 0xf464c343 -0, 501000, 107520, 0xf464c343 -0, 504000, 107520, 0xf464c343 -0, 507000, 107520, 0xf464c343 -0, 510000, 107520, 0xf464c343 -0, 513000, 107520, 0xf464c343 -0, 516000, 107520, 0xf464c343 1, 517518, 44064, 0xb921e11a -0, 519000, 107520, 0xf464c343 -0, 522000, 107520, 0xf464c343 -0, 525000, 107520, 0xf464c343 -0, 528000, 107520, 0xf464c343 -0, 531000, 107520, 0xf464c343 -0, 534000, 107520, 0xf464c343 -0, 537000, 107520, 0xf464c343 -0, 540000, 107520, 0xf464c343 1, 540000, 44112, 0xe0ac619f -0, 543000, 107520, 0xf464c343 -0, 546000, 107520, 0xf2b2c712 -0, 549000, 107520, 0xf2b2c712 -0, 552000, 107520, 0xf2b2c712 -0, 555000, 107520, 0xf2b2c712 -0, 558000, 107520, 0xf2b2c712 -0, 561000, 107520, 0xf2b2c712 1, 562506, 44112, 0xb07aa65c -0, 564000, 107520, 0xf2b2c712 -0, 567000, 107520, 0xf2b2c712 -0, 570000, 107520, 0xb95e6bc8 -0, 573000, 107520, 0xb95e6bc8 -0, 576000, 107520, 0x33feee37 -0, 579000, 107520, 0x33feee37 -0, 582000, 107520, 0x36ee3cd5 -0, 585000, 107520, 0x36ee3cd5 1, 585012, 44112, 0x24610ff0 -0, 588000, 107520, 0x59096471 -0, 591000, 107520, 0x59096471 -0, 594000, 107520, 0x53b470c6 -0, 597000, 107520, 0x53b470c6 -0, 600000, 107520, 0xdb7c64ff -0, 603000, 107520, 0xdb7c64ff -0, 606000, 107520, 0xe5a1596a 1, 607518, 44064, 0x00000000 -0, 609000, 107520, 0xe5a1596a -0, 612000, 107520, 0x8c8942eb -0, 615000, 107520, 0x8c8942eb -0, 618000, 107520, 0x5ecc379e -0, 621000, 107520, 0x5ecc379e -0, 624000, 107520, 0xea09432a -0, 627000, 107520, 0xea09432a -0, 630000, 107520, 0xe01e6b73 1, 630000, 44112, 0x00000000 -0, 633000, 107520, 0xe01e6b73 -0, 636000, 107520, 0x1d13bba8 -0, 639000, 107520, 0x1d13bba8 -0, 642000, 107520, 0x3a993a6c -0, 645000, 107520, 0x3a993a6c -0, 648000, 107520, 0x2ede041a -0, 651000, 107520, 0x2ede041a 1, 652506, 8800, 0x00000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/g722enc mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/g722enc --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/g722enc 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/g722enc 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +750269cc236541df28e15da5c7b0df7a diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/h264-bsf-mp4toannexb mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/h264-bsf-mp4toannexb --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/h264-bsf-mp4toannexb 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/h264-bsf-mp4toannexb 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +5f04c27cc6ee8625fe2405fb0f7da9a3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/h264-lossless mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/h264-lossless --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/h264-lossless 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/h264-lossless 2012-01-11 00:34:30.000000000 +0000 @@ -1,10 +1,10 @@ 0, 0, 460800, 0x7731dd2f -0, 1500, 460800, 0x944b8c64 -0, 3000, 460800, 0xbe833041 -0, 4500, 460800, 0xbe95d96a -0, 6000, 460800, 0xfe7ea5e6 -0, 7500, 460800, 0x381743c7 -0, 9000, 460800, 0x63fcc2e9 -0, 10500, 460800, 0x79574960 -0, 12000, 460800, 0xdab9e18a -0, 13500, 460800, 0xd88e8fe8 +0, 3600, 460800, 0x944b8c64 +0, 7200, 460800, 0xbe833041 +0, 10800, 460800, 0xbe95d96a +0, 14400, 460800, 0xfe7ea5e6 +0, 18000, 460800, 0x381743c7 +0, 21600, 460800, 0x63fcc2e9 +0, 25200, 460800, 0x79574960 +0, 28800, 460800, 0xdab9e18a +0, 32400, 460800, 0xd88e8fe8 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/iirfilter mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/iirfilter --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/iirfilter 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/iirfilter 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,1024 @@ + 0 0 + 38 2 + 151 15 + 339 65 + 603 182 + 942 381 + 1356 664 + 1845 1021 + 2409 1450 + 3046 1953 + 3755 2530 + 4535 3182 + 5384 3907 + 6300 4700 + 7278 5563 + 8315 6491 + 9405 7481 + 10541 8529 + 11717 9629 + 12924 10773 + 14151 11956 + 15385 13167 + 16615 14396 + 17825 15630 + 18997 16857 + 20114 18060 + 21156 19222 + 22102 20325 + 22929 21349 + 23613 22273 + 24132 23073 + 24461 23726 + 24575 24208 + 24453 24495 + 24073 24564 + 23416 24392 + 22467 23959 + 21213 23245 + 19649 22236 + 17773 20922 + 15590 19296 + 13116 17360 + 10371 15119 + 7386 12591 + 4201 9797 + 867 6771 + -2559 3554 + -6008 199 + -9405 -3235 +-12667 -6678 +-15707 -10053 +-18435 -13277 +-20762 -16261 +-22602 -18916 +-23875 -21153 +-24511 -22887 +-24457 -24040 +-23675 -24546 +-22151 -24352 +-19895 -23428 +-16946 -21762 +-13370 -19370 + -9265 -16296 + -4757 -12613 + 0 -8423 + 4831 -3858 + 9544 923 + 13934 5743 + 17799 10406 + 20942 14708 + 23189 18447 + 24395 21430 + 24457 23488 + 23323 24483 + 21001 24321 + 17563 22963 + 13148 20426 + 7959 16795 + 2259 12223 + -3643 6922 + -9405 1166 +-14670 -4731 +-19092 -10421 +-22359 -15550 +-24213 -19777 +-24481 -22797 +-23087 -24368 +-20071 -24334 +-15590 -22639 + -9924 -19343 + -3457 -14629 + 3345 -8793 + 9959 -2236 + 15851 4563 + 20517 11078 + 23528 16779 + 24575 21171 + 23506 23846 + 20349 24522 + 15327 23076 + 8845 19572 + 1469 14264 + -6117 7589 +-13180 135 +-18997 -7403 +-22942 -14289 +-24553 -19814 +-23592 -23377 +-20092 -24551 +-14366 -23145 + -6989 -19239 + 1244 -13192 + 9405 -5620 + 16532 2656 + 21744 10697 + 24357 17548 + 23978 22356 + 20579 24483 + 14518 23593 + 6518 19723 + -2409 13293 +-11083 5078 +-18310 -3876 +-23048 -12378 +-24568 -19252 +-22573 -23500 +-17270 -24458 + -9370 -21908 + 0 -16140 + 9439 -7935 + 17484 1526 + 22832 10824 + 24568 18508 + 22327 23330 + 16392 24452 + 7673 21608 + -2409 15181 +-12146 6168 +-19828 -3955 +-24050 -13466 +-23978 -20689 +-19535 -24292 +-11451 -23552 + -1168 -18512 + 9405 -10015 + 18234 416 + 23560 10836 + 24257 19234 + 20092 23929 + 11817 23916 + 1055 19105 + -9993 10379 +-18997 -540 +-23986 -11413 +-23802 -19939 +-18385 -24246 + -8845 -23318 + 2746 -17260 + 13778 -7325 + 21691 4319 + 24575 15045 + 21656 22357 + 13528 24482 + 2071 20823 + -9959 12152 +-19581 484 +-24331 -11367 +-22915 -20460 +-15590 -24459 + -4164 -22257 + 8421 -14315 + 18828 -2603 + 24213 9857 + 23022 19756 + 15474 24383 + 3569 22388 + -9405 14211 +-19761 2031 +-24471 -10785 +-22069 -20591 +-13148 -24512 + -264 -21311 + 12763 -11818 + 21968 1241 + 24457 13990 + 19351 22545 + 8137 24211 + -5715 18362 +-17799 6720 +-24167 -7108 +-22646 -18722 +-13622 -24326 + 0 -21995 + 13685 -12382 + 22762 1409 + 24035 14788 + 16946 23188 + 3867 23644 +-10643 15884 +-21401 2514 +-24457 -11806 +-18584 -21960 + -5825 -24220 + 9160 -17649 + 20762 -4546 + 24527 10303 + 18901 21343 + 5935 24337 + -9405 18028 +-21098 4727 +-24442 -10470 +-17979 -21608 + -4201 -24206 + 11351 -17110 + 22280 -3064 + 23970 12287 + 15590 22636 + 565 23615 +-14760 14693 +-23773 -479 +-22467 -15504 +-11284 -23907 + 4942 -21954 + 19021 -10373 + 24575 5837 + 18973 19502 + 4646 24445 +-11883 18316 +-22929 3786 +-23226 -12541 +-12505 -23090 + 4239 -22841 + 18997 -11784 + 24567 4932 + 18107 19331 + 2671 24403 +-14151 17558 +-23919 2036 +-21602 -14549 + -8244 -23897 + 9405 -21206 + 22232 -7710 + 23473 9785 + 12342 22272 + -5384 23186 +-20286 11920 +-24287 -5693 +-15090 -20319 + 2409 -24060 + 18633 -14771 + 24538 2613 + 16698 18608 + -603 24329 +-17616 16471 +-24575 -682 +-17351 -17495 + 0 -24355 + 17404 -17211 + 24575 -65 + 17136 17163 + -603 24334 +-18031 17094 +-24538 -374 +-16023 -17660 + 2409 -24287 + 19397 -16108 + 24287 1992 + 13872 18902 + -5384 24066 +-21251 14131 +-23473 -4761 +-10473 -20664 + 9405 -23351 + 23151 -10967 + 21602 8573 + 5642 22543 +-14151 21682 +-24430 6431 +-18107 -13147 + 641 -23920 + 18997 -18514 + 24207 -475 + 12505 17922 + -8030 23970 +-22929 13357 +-21511 -6625 + -4646 -21972 + 15619 -21758 + 24575 -6009 + 15561 14083 + -4942 24019 +-21831 16485 +-22467 -3138 + -6227 -20474 + 14760 -22641 + 24569 -7904 + 15590 12791 + -5421 23839 +-22280 16760 +-21797 -3160 + -4201 -20666 + 16754 -22169 + 24442 -6381 + 12602 14430 + -9405 23865 +-23848 14348 +-18901 -6644 + 1545 -22308 + 20762 -19937 + 22804 -1339 + 5825 18365 +-16080 22954 +-24457 8529 +-12080 -13009 + 10643 -23650 + 24269 -14353 + 16946 7119 + -5127 22521 +-22762 18602 +-20413 -1370 + 0 -20152 + 20454 -21342 + 22646 -3797 + 4461 17096 +-17799 22804 +-23902 8148 + -8137 -13817 + 15149 -23296 + 24457 -11618 + 11016 10660 +-12763 23135 +-24574 14243 +-13148 -7861 + 10813 -22608 + 24471 -16124 + 14609 5565 + -9405 21949 +-24315 17379 +-15474 -3849 + 8598 -21336 + 24213 -18120 + 15793 2745 + -8421 20885 +-24220 18429 +-15590 -2263 + 8880 -20663 + 24331 -18359 + 14851 2398 + -9959 20685 +-24488 17917 +-13528 -3137 + 11618 -20918 + 24575 -17075 + 11551 4460 +-13778 21286 +-24421 15770 + -8845 -6328 + 16307 -21661 + 23802 -13916 + 5348 8671 +-18997 21868 +-22452 11421 + -1055 -11371 + 21548 -21685 + 20092 -8212 + -3941 14242 +-23560 20853 +-16476 4267 + 9405 -17009 + 24547 -19106 + 11451 343 +-14911 19309 +-23978 16208 + -5053 -5409 + 19828 -20699 + 21364 -12016 + -2409 10553 +-23347 20700 +-16392 6559 + 10268 -15211 + 24568 -18879 + 9090 -118 +-17484 18664 +-22690 14969 + 0 -6714 + 22719 -20134 + 17270 -9014 + -9717 13022 +-24568 18943 + -8527 1506 + 18310 -17662 + 21934 -14749 + -2409 6538 +-23695 19463 +-14518 7789 + 13433 -13633 + 23978 -17566 + 3270 935 +-21744 18075 +-18184 11812 + 9405 -9654 + 24544 -18394 + 6989 -3082 +-19939 16117 +-20092 13945 + 6881 -6613 + 24553 -18196 + 8809 -5437 +-18997 14458 +-20742 14731 + 6117 -4859 + 24531 -17657 + 8845 -6307 +-19210 13526 +-20349 14588 + 7170 -4444 + 24575 -17109 + 7098 -5874 +-20517 13412 +-18780 13691 + 9959 -5272 + 24347 -16558 + 3457 -4241 +-22482 13949 +-15590 11979 + 14181 -7142 + 23087 -15723 + -2146 -1459 +-24213 14726 +-10200 9228 + 19092 -9692 + 19717 -14108 + -9405 2343 +-24304 15085 + -2259 5221 + 23251 -12286 + 13148 -11127 +-17190 6746 +-21001 14161 + 7745 2 + 24457 -13938 + 2971 -6372 +-23189 10842 +-12860 11094 + 17799 -5795 + 20243 -13421 + -9544 -30 +-24096 13184 + 0 5498 + 24110 -10713 + 9265 -9718 +-20620 6673 +-16946 12155 + 14427 -1883 + 22151 -12653 + -6591 -2861 +-24457 11378 + -1770 6908 + 23875 -8726 + 9648 -9817 +-20762 5209 +-16251 11385 + 15707 -1358 + 21059 -11610 + -9405 -2353 +-23830 10656 + 2559 5560 + 24560 -8789 + 4201 -8028 +-23439 6314 +-10371 9643 + 20783 -3542 + 15590 -10404 +-16973 742 +-19649 10386 + 12407 1870 + 22467 -9720 + -7458 -4144 +-24073 8562 + 2446 5991 + 24575 -7072 + 2371 -7375 +-24132 5398 + -6808 8306 + 22929 -3667 + 10745 -8824 +-21156 1980 +-14120 8987 + 18997 -408 + 16918 -8863 +-16615 -1001 +-19163 8521 + 14151 2220 + 20902 -8027 +-11717 -3241 +-22200 7441 + 9405 4071 + 23126 -6811 + -7278 -4722 +-23754 6177 + 5384 5213 + 24153 -5571 + -3755 -5566 +-24386 5013 + 2409 5801 + 24506 -4521 + -1356 -5939 +-24557 4104 + 603 5999 + 24573 -3765 + -151 -5994 +-24575 3508 + 0 5937 + 24575 -3331 + -151 -5835 +-24573 3232 + 603 5694 + 24557 -3205 + -1356 -5517 +-24506 3244 + 2409 5303 + 24386 -3343 + -3755 -5049 +-24153 3494 + 5384 4752 + 23754 -3685 + -7278 -4407 +-23126 3906 + 9405 4007 + 22200 -4143 +-11717 -3547 +-20902 4380 + 14151 3025 + 19163 -4598 +-16615 -2434 +-16918 4778 + 18997 1780 + 14120 -4898 +-21156 -1066 +-10745 4934 + 22929 304 + 6808 -4862 +-24132 489 + -2371 4664 + 24575 -1288 + -2446 -4320 +-24073 2060 + 7458 3820 + 22467 -2767 +-12407 -3162 +-19649 3365 + 16973 2357 + 15590 -3808 +-20783 -1429 +-10371 4050 + 23439 419 + 4201 -4055 +-24560 616 + 2559 3795 + 23830 -1607 + -9405 -3266 +-21059 2473 + 15707 2486 + 16251 -3130 +-20762 -1499 + -9648 3505 + 23875 386 + 1770 -3539 +-24457 754 + 6591 3205 + 22151 -1798 +-14427 -2518 +-16946 2618 + 20620 1540 + 9265 -3101 +-24110 -381 + 0 3162 + 24096 -809 + -9544 -2775 +-20243 1859 + 17799 1978 + 12860 -2598 +-23189 -879 + -2971 2893 + 24457 -344 + -7745 -2674 +-21001 1478 + 17190 1966 + 13148 -2304 +-23251 -890 + -2259 2647 + 24304 -341 + -9405 -2421 +-19717 1467 + 19092 1662 + 10200 -2229 +-24213 -535 + 2146 2434 + 23087 -692 +-14181 -2022 +-15590 1706 + 22482 1090 + 3457 -2230 +-24347 115 + 9959 2111 + 18780 -1251 +-20517 -1374 + -7098 1975 + 24575 238 + -7170 -2057 +-20349 938 + 19210 1464 + 8845 -1763 +-24531 -392 + 6117 1949 + 20742 -783 +-18997 -1425 + -8809 1630 + 24553 385 + -6881 -1825 +-20092 770 + 19939 1291 + 6989 -1572 +-24544 -244 + 9405 1688 + 18184 -869 +-21744 -1069 + -3270 1559 + 23978 -7 +-13433 -1511 +-14518 1041 + 23695 753 + -2409 -1536 +-21934 344 + 18310 1251 + 8527 -1225 +-24568 -337 + 9717 1436 + 17270 -719 +-22719 -869 + 0 1342 + 22690 -157 +-17484 -1188 + -9090 1051 + 24568 353 +-10268 -1293 +-16392 658 + 23347 745 + -2409 -1224 +-21364 244 + 19828 996 + 5053 -1036 +-23978 -132 + 14911 1114 + 11451 -783 +-24547 -437 + 9405 1124 + 16476 -513 +-23560 -661 + 3941 1058 + 20092 -257 +-21548 -807 + -1055 945 + 22452 -37 +-18997 -887 + -5348 815 + 23802 142 +-16307 -917 + -8845 682 + 24421 276 +-13778 -913 +-11551 563 + 24575 371 +-11618 -888 +-13528 463 + 24488 431 + -9959 -854 +-14851 386 + 24331 462 + -8880 -815 +-15590 333 + 24220 471 + -8421 -779 +-15793 302 + 24213 460 + -8598 -746 +-15474 292 + 24315 433 + -9405 -717 +-14609 300 + 24471 391 +-10813 -689 +-13148 324 + 24574 336 +-12763 -660 +-11016 359 + 24457 267 +-15149 -627 + -8137 400 + 23902 184 +-17799 -584 + -4461 444 + 22646 90 +-20454 -527 + 0 483 + 20413 -15 +-22762 -452 + 5127 511 + 16946 -124 +-24269 -357 + 10643 517 + 12080 -232 +-24457 -241 + 16080 495 + 5825 -328 +-22804 -107 + 20762 440 + -1545 -400 +-18901 35 + 23848 347 + -9405 -437 +-12602 173 + 24442 220 +-16754 -426 + -4201 290 + 21797 69 +-22280 -362 + 5421 366 + 15590 -89 +-24569 -247 + 14760 384 + 6227 -228 +-22467 -95 + 21831 335 + -4942 -321 +-15561 71 + 24575 222 +-15619 -344 + -4646 214 + 21511 65 +-22929 -288 + 8030 300 + 12505 -102 +-24207 -162 + 18997 304 + -641 -232 +-18107 4 + 24430 218 +-14151 -286 + -5642 160 + 21602 68 +-23151 -244 + 9405 253 + 10473 -97 +-23473 -115 + 21251 247 + -5384 -216 +-13872 49 + 24287 142 +-19397 -238 + 2409 183 + 16023 -17 +-24538 -153 + 18031 224 + -603 -158 +-17136 0 + 24575 153 +-17404 -209 + 0 142 + 17351 6 +-24575 -144 + 17616 196 + -603 -133 +-16698 -1 + 24538 131 +-18633 -182 + 2409 132 + 15090 -11 +-24287 -111 + 20286 169 + -5384 -134 +-12342 30 + 23473 86 +-22232 -152 + 9405 138 + 8244 -53 +-21602 -56 + 23919 132 +-14151 -138 + -2671 76 + 18107 21 +-24567 -104 + 18997 134 + -4239 -98 +-12505 16 + 23226 69 +-22929 -119 + 11883 111 + 4646 -53 +-18973 -28 + 24575 92 +-19021 -113 + 4942 82 + 11284 -16 +-22467 -54 + 23773 97 +-14760 -97 + -565 56 + 15590 8 +-23970 -65 + 22280 93 +-11351 -82 + -4201 37 + 17979 21 +-24442 -67 + 21098 85 + -9405 -69 + -5935 26 + 18901 24 +-24527 -64 + 20762 77 + -9160 -61 + -5825 23 + 18584 21 +-24457 -56 + 21401 69 +-10643 -57 + -3867 25 + 16946 15 +-24035 -47 + 22762 62 +-13685 -55 + 0 29 + 13622 4 +-22646 -35 + 24167 53 +-17799 -52 + 5715 36 + 8137 -8 +-19351 -21 + 24457 41 +-21968 -49 + 12763 41 + 264 -21 +-13148 -4 + 22069 27 +-24471 -40 + 19761 42 + -9405 -31 + -3569 12 + 15474 9 +-23022 -27 + 24213 36 +-18828 -35 + 8421 25 + 4164 -9 +-15590 -9 + 22915 23 +-24331 -31 + 19581 31 + -9959 -23 + -2071 10 + 13528 5 +-21656 -18 + 24575 26 +-21691 -27 + 13778 22 + -2746 -12 + -8845 0 + 18385 11 +-23802 -20 + 23986 23 +-18997 -22 + 9993 15 + 1055 -7 +-11817 -3 + 20092 11 +-24257 -17 + 23560 19 +-18234 -17 + 9405 12 + 1168 -5 +-11451 -3 + 19535 10 +-23978 -14 + 24050 16 +-19828 -14 + 12146 11 + -2409 -5 + -7673 0 + 16392 6 +-22327 -10 + 24568 12 +-22832 -12 + 17484 11 + -9439 -7 + 0 3 + 9370 2 +-17270 -5 + 22573 8 +-24568 -9 + 23048 10 +-18310 -8 + 11083 5 + -2409 -3 + -6518 -1 + 14518 3 +-20579 -5 + 23978 7 +-24357 -7 + 21744 7 +-16532 -6 + 9405 3 + -1244 -1 + -6989 -1 + 14366 3 +-20092 -4 + 23592 5 +-24553 -5 + 22942 5 +-18997 -4 + 13180 3 + -6117 -2 + -1469 1 + 8845 2 +-15327 -2 + 20349 3 +-23506 -4 + 24575 3 +-23528 -4 + 20517 3 +-15851 -2 + 9959 1 + -3345 0 + -3457 0 + 9924 1 +-15590 -2 + 20071 2 +-23087 -2 + 24481 3 +-24213 -2 + 22359 2 +-19092 -1 + 14670 1 + -9405 0 + 3643 0 + 2259 0 + -7959 -1 + 13148 1 +-17563 -1 + 21001 1 +-23323 -1 + 24457 1 +-24395 -1 + 23189 1 +-20942 -1 + 17799 1 +-13934 0 + 9544 0 + -4831 0 + 0 0 + 4757 1 + -9265 0 + 13370 0 +-16946 -1 + 19895 0 +-22151 -1 + 23675 0 +-24457 -1 + 24511 0 +-23875 0 + 22602 0 +-20762 0 + 18435 0 +-15707 0 + 12667 0 + -9405 0 + 6008 0 + -2559 0 + -867 0 + 4201 0 + -7386 0 + 10371 0 +-13116 0 + 15590 0 +-17773 0 + 19649 0 +-21213 0 + 22467 0 +-23416 0 + 24073 0 +-24453 0 + 24575 0 +-24461 0 + 24132 0 +-23613 0 + 22929 0 +-22102 0 + 21156 0 +-20114 0 + 18997 0 +-17825 0 + 16615 0 +-15385 0 + 14151 0 +-12924 0 + 11717 0 +-10541 0 + 9405 0 + -8315 0 + 7278 0 + -6300 0 + 5384 0 + -4535 0 + 3755 0 + -3046 0 + 2409 0 + -1845 0 + 1356 0 + -942 0 + 603 0 + -339 0 + 151 0 + -38 0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/indeo4 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/indeo4 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/indeo4 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/indeo4 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,100 @@ +0, 0, 86400, 0x98f5e422 +0, 6000, 86400, 0x1864cb06 +0, 12000, 86400, 0xb09532ef +0, 18000, 86400, 0x3cd3dcdc +0, 24000, 86400, 0xe738847f +0, 30000, 86400, 0xc9b13afb +0, 36000, 86400, 0x5005d035 +0, 42000, 86400, 0x22f63e17 +0, 48000, 86400, 0x93391f02 +0, 54000, 86400, 0x264830fd +0, 60000, 86400, 0x8fff9f5f +0, 66000, 86400, 0x524997fe +0, 72000, 86400, 0x54e330f9 +0, 78000, 86400, 0x1d766a22 +0, 84000, 86400, 0x683a70ac +0, 90000, 86400, 0x553b7b3d +0, 96000, 86400, 0x822c79bc +0, 102000, 86400, 0xe1087a1c +0, 108000, 86400, 0xff397595 +0, 114000, 86400, 0x1b6b7717 +0, 120000, 86400, 0x6c5275c1 +0, 126000, 86400, 0x4e6a7189 +0, 132000, 86400, 0x285c6eba +0, 138000, 86400, 0xce647227 +0, 144000, 86400, 0xa0d07b1c +0, 150000, 86400, 0x5b567861 +0, 156000, 86400, 0x105873ec +0, 162000, 86400, 0x59267fa0 +0, 168000, 86400, 0xaeac839f +0, 174000, 86400, 0x2faf7402 +0, 180000, 86400, 0xc8547a30 +0, 186000, 86400, 0x3d357d49 +0, 192000, 86400, 0x75db6d6c +0, 198000, 86400, 0x9fbf68e9 +0, 204000, 86400, 0x56a64d26 +0, 210000, 86400, 0xce9e1f43 +0, 216000, 86400, 0xa4d7fddc +0, 222000, 86400, 0x3e20d77c +0, 228000, 86400, 0x4680661d +0, 234000, 86400, 0xf1b20af3 +0, 240000, 86400, 0xb79d8045 +0, 246000, 86400, 0x9479fc8a +0, 252000, 86400, 0x232965c3 +0, 258000, 86400, 0xd18bca17 +0, 264000, 86400, 0xb9064249 +0, 270000, 86400, 0xcc48ab34 +0, 276000, 86400, 0xe25018cd +0, 282000, 86400, 0x8da489ee +0, 288000, 86400, 0x90de0fc1 +0, 294000, 86400, 0x2428dcee +0, 300000, 86400, 0x4316e1ae +0, 306000, 86400, 0x2b25e54c +0, 312000, 86400, 0x736ce020 +0, 318000, 86400, 0x9a6be09a +0, 324000, 86400, 0x23bddbcd +0, 330000, 86400, 0x9368e465 +0, 336000, 86400, 0x1ae9bb87 +0, 342000, 86400, 0x4e591f32 +0, 348000, 86400, 0xba1bf9dc +0, 354000, 86400, 0x07f0aa60 +0, 360000, 86400, 0xf5a2cfa2 +0, 366000, 86400, 0xcba5fc18 +0, 372000, 86400, 0x858c0cfe +0, 378000, 86400, 0xac73ecd4 +0, 384000, 86400, 0xf41bf03c +0, 390000, 86400, 0x928ed146 +0, 396000, 86400, 0x9ff5990a +0, 402000, 86400, 0xc2fabc3d +0, 408000, 86400, 0x94af87a3 +0, 414000, 86400, 0x9bae514c +0, 420000, 86400, 0xe0da267a +0, 426000, 86400, 0x1d40f55c +0, 432000, 86400, 0xe6173b68 +0, 438000, 86400, 0x1445490d +0, 444000, 86400, 0x8d8753c1 +0, 450000, 86400, 0xe5a7779d +0, 456000, 86400, 0x3cfc66ef +0, 462000, 86400, 0xa5d45608 +0, 468000, 86400, 0x62f17be1 +0, 474000, 86400, 0xa64c84d3 +0, 480000, 86400, 0xf98162f0 +0, 486000, 86400, 0x0db77d9f +0, 492000, 86400, 0x0f0cbac9 +0, 498000, 86400, 0xb9934e97 +0, 504000, 86400, 0x7f8fa248 +0, 510000, 86400, 0xdfd96768 +0, 516000, 86400, 0x81b07919 +0, 522000, 86400, 0x66c11e9f +0, 528000, 86400, 0xd86eb114 +0, 534000, 86400, 0x67f20c1f +0, 540000, 86400, 0x66915de5 +0, 546000, 86400, 0x2b8aa76f +0, 552000, 86400, 0x85b5a3d2 +0, 558000, 86400, 0x80d29ed6 +0, 564000, 86400, 0x4d508e2c +0, 570000, 86400, 0x0d407374 +0, 576000, 86400, 0xd4068016 +0, 582000, 86400, 0x6ffab98f +0, 588000, 86400, 0x2360903d +0, 594000, 86400, 0x470e04a0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/lmlm4-demux mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/lmlm4-demux --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/lmlm4-demux 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/lmlm4-demux 2012-01-11 00:34:30.000000000 +0000 @@ -213,335 +213,3 @@ 1, 265680, 768, 0xfd6c7597 0, 267267, 1327, 0x7d15307c 1, 267840, 768, 0x8d766d40 -0, 270270, 1225, 0x1b5d0f5f -0, 273273, 1173, 0x840efed5 -0, 276276, 1215, 0xa8e0035e -0, 279279, 1295, 0x142918ca -0, 282282, 1144, 0xf50cef50 -0, 285285, 1527, 0x7d13bd9d -0, 288288, 5609, 0x1ae1921d -0, 291291, 1303, 0xabdc264f -0, 294294, 1419, 0x878169bf -0, 297297, 972, 0x00c4a257 -0, 300300, 1277, 0x87d520cf -0, 303303, 1014, 0x5946b4ee -0, 306306, 1177, 0x124e0e23 -0, 309309, 1402, 0x8e6363cc -0, 312312, 1171, 0x9bdaeda2 -0, 315315, 1389, 0x2db53b22 -0, 318318, 1056, 0xd1c3de3e -0, 321321, 1320, 0x1ea142c7 -0, 324324, 1250, 0x33612229 -0, 327327, 1477, 0xb9648b48 -0, 330330, 1522, 0x5352c318 -0, 333333, 1391, 0x5e9157e0 -0, 336336, 5545, 0x569e64c1 -0, 339339, 1354, 0xdb39469e -0, 342342, 1302, 0x79912b5d -0, 345345, 1065, 0x4befcdd2 -0, 348348, 1408, 0x7d2f65a2 -0, 351351, 1727, 0x9cac0398 -0, 354354, 1590, 0xa321b563 -0, 357357, 1039, 0xfa35cabf -0, 360360, 1184, 0xb332fde7 -0, 363363, 669, 0xb10e3783 -0, 366366, 784, 0x57275e09 -0, 369369, 1051, 0xe072cd33 -0, 372372, 1119, 0x635ee9ee -0, 375375, 1147, 0x3916f981 -0, 378378, 1086, 0x306ef895 -0, 381381, 827, 0x213f7aef -0, 384384, 5525, 0x19157827 -0, 387387, 1044, 0xb661abc5 -0, 390390, 1143, 0x032e1109 -0, 393393, 1460, 0x5a2f9503 -0, 396396, 1178, 0xd038141f -0, 399399, 1004, 0x410ec3b2 -0, 402402, 1089, 0xc89af8c9 -0, 405405, 1367, 0x52085e0a -0, 408408, 1115, 0x8bb2ee7f -0, 411411, 1325, 0xc2e05647 -0, 414414, 1295, 0x213951c9 -0, 417417, 1054, 0xbb8bdaae -0, 420420, 1210, 0x431122bd -0, 423423, 1400, 0x47526fcc -0, 426426, 1188, 0x19770b07 -0, 429429, 1301, 0x437161c8 -0, 432432, 5281, 0xc0c92b55 -0, 435435, 840, 0x67da7b2f -0, 438438, 1094, 0x3fd6d944 -0, 441441, 832, 0x0eda74bc -0, 444444, 1096, 0x3300da7b -0, 447447, 1018, 0xa208c971 -0, 450450, 1389, 0x1167724c -0, 453453, 1411, 0xe3be666b -0, 456456, 1294, 0xa8f35cc6 -0, 459459, 1232, 0xfd0d20fd -0, 462462, 1252, 0xadd83a26 -0, 465465, 844, 0xcbaf6a55 -0, 468468, 979, 0x78d9b241 -0, 471471, 1057, 0x6743e16c -0, 474474, 776, 0xfedd6615 -0, 477477, 1158, 0xa39fee34 -0, 480480, 5288, 0x5f26ee02 -0, 483483, 1029, 0xa681bee8 -0, 486486, 1106, 0xa68dea33 -0, 489489, 844, 0x42fd83ec -0, 492492, 779, 0xb5006759 -0, 495495, 951, 0xec13af4f -0, 498498, 1011, 0x90e5c86e -0, 501501, 892, 0x4db48ca4 -0, 504504, 804, 0x59bf73a7 -0, 507507, 1001, 0x10c2b3ff -0, 510510, 879, 0x65c57eaf -0, 513513, 1320, 0x80815836 -0, 516516, 1448, 0xaf457b3b -0, 519519, 1168, 0x65b9f96a -0, 522522, 1002, 0x053fafb9 -0, 525525, 1101, 0x2d30c3d5 -0, 528528, 5314, 0x87cee383 -0, 531531, 1305, 0xb19035db -0, 534534, 1240, 0xdc6a0a65 -0, 537537, 1067, 0x9c88ba67 -0, 540540, 823, 0x2f736a43 -0, 543543, 1183, 0x2ef9f3c9 -0, 546546, 899, 0x3fcc8d11 -0, 549549, 886, 0xccec8d49 -0, 552552, 1190, 0x2d020fa1 -0, 555555, 1017, 0x0776b627 -0, 558558, 1202, 0xbdd808d5 -0, 561561, 998, 0x64c7c246 -0, 564564, 1200, 0x9d6e2289 -0, 567567, 895, 0xa8a68d80 -0, 570570, 748, 0xe61a49fb -0, 573573, 929, 0x30168b50 -0, 576576, 5276, 0xceb2edf2 -0, 579579, 1127, 0xab43ddc3 -0, 582582, 1028, 0xaacfbff5 -0, 585585, 914, 0xb63c8fb0 -0, 588588, 1067, 0xbdacd1ed -0, 591591, 1109, 0x6792ddec -0, 594594, 1310, 0x71bc4da2 -0, 597597, 1098, 0xc464de9b -0, 600600, 1018, 0x6833b875 -0, 603603, 1210, 0x44faf34b -0, 606606, 1200, 0x9ee816f6 -0, 609609, 1461, 0xc76b7d2b -0, 612612, 829, 0x006677e6 -0, 615615, 1145, 0xc769fb13 -0, 618618, 1292, 0xb63225f5 -0, 621621, 1252, 0x0e2a2626 -0, 624624, 5257, 0x3877eca1 -0, 627627, 952, 0x7f708d25 -0, 630630, 1125, 0x140cd81b -0, 633633, 1095, 0x3025dade -0, 636636, 1388, 0xd7494d4e -0, 639639, 1124, 0x0c48ee92 -0, 642642, 1556, 0xa0749ee2 -0, 645645, 1461, 0xe5fd7d7f -0, 648648, 903, 0x07a58303 -0, 651651, 1049, 0x4b6cd03b -0, 654654, 1044, 0x5f47cb48 -0, 657657, 1253, 0xba281c6a -0, 660660, 1618, 0xed7cd040 -0, 663663, 981, 0x2926b6f4 -0, 666666, 1560, 0xa0e1ab73 -0, 669669, 1479, 0x41a77e88 -0, 672672, 5222, 0xc2dbd182 -0, 675675, 925, 0x967580dd -0, 678678, 1284, 0x5b7822e0 -0, 681681, 1512, 0xe84da1e0 -0, 684684, 1514, 0xc38bb09e -0, 687687, 1224, 0x8752228e -0, 690690, 1296, 0xcf053c03 -0, 693693, 1117, 0x9a81e659 -0, 696696, 1090, 0x003ed687 -0, 699699, 1196, 0x3a510937 -0, 702702, 1075, 0x05eec8d4 -0, 705705, 1048, 0x3b19cb96 -0, 708708, 944, 0xaad89770 -0, 711711, 960, 0x94649e4c -0, 714714, 1079, 0x530ddaba -0, 717717, 1150, 0x0339e696 -0, 720720, 5189, 0xb8dac0bf -0, 723723, 1129, 0x3b2cd64d -0, 726726, 962, 0xe9df9a07 -0, 729729, 1113, 0xc6ccddb2 -0, 732732, 1069, 0xf589d4a4 -0, 735735, 889, 0x5f7b8762 -0, 738738, 863, 0xe9c36be4 -0, 741741, 1021, 0xcfb5a737 -0, 744744, 1048, 0x203ac9ff -0, 747747, 1223, 0x3e30fe35 -0, 750750, 814, 0x59c076fc -0, 753753, 1157, 0x0dcf0bd0 -0, 756756, 1691, 0xdd030547 -0, 759759, 1700, 0x7641fb7e -0, 762762, 1791, 0x57ac147b -0, 765765, 2008, 0x3d4483ca -0, 768768, 4579, 0x874aa75b -0, 771771, 1647, 0xeddef621 -0, 774774, 1999, 0x61d4a23a -0, 777777, 1572, 0x1c3ae6e1 -0, 780780, 1803, 0xb31c3a11 -0, 783783, 1919, 0xccbf64e3 -0, 786786, 1720, 0xa4d010e5 -0, 789789, 1721, 0x87ee0c7b -0, 792792, 1626, 0x8211f3d0 -0, 795795, 1675, 0xef8a0b3d -0, 798798, 1609, 0x8731ce06 -0, 801801, 1691, 0xcf24038b -0, 804804, 1637, 0x21d8e1b2 -0, 807807, 1546, 0xc597a700 -0, 810810, 1518, 0xb944bc11 -0, 813813, 1403, 0x999e59a8 -0, 816816, 2467, 0xe69f2507 -0, 819819, 531, 0x3c7cea7e -0, 822822, 555, 0xdf20fb22 -0, 825825, 500, 0xebeee00d -0, 828828, 446, 0x664cc711 -0, 831831, 521, 0xf223df4b -0, 834834, 559, 0x4dc60028 -0, 837837, 593, 0xec440ba9 -0, 840840, 557, 0xef0100b1 -0, 843843, 602, 0x7b1cfd88 -0, 846846, 566, 0x77700a1d -0, 849849, 523, 0x3df7eb64 -0, 852852, 482, 0x5da1dba9 -0, 855855, 541, 0x9c8ff3d7 -0, 858858, 572, 0x3e1204b2 -0, 861861, 549, 0x0921fe3d -0, 864864, 2429, 0xba4fe5a8 -0, 867867, 495, 0xc35ade54 -0, 870870, 453, 0xcc66c9dc -0, 873873, 421, 0x3aa7ce8f -0, 876876, 448, 0x56c6d3d7 -0, 879879, 478, 0x4131d467 -0, 882882, 497, 0xac3ce3ca -0, 885885, 470, 0x41b9d9d3 -0, 888888, 454, 0x44c2d956 -0, 891891, 460, 0x6629db01 -0, 894894, 488, 0x6be2dd68 -0, 897897, 512, 0xda4cf116 -0, 900900, 550, 0x6e990da9 -0, 903903, 561, 0x81180e5e -0, 906906, 689, 0xe58a5a9a -0, 909909, 548, 0xfa1417a9 -0, 912912, 2832, 0x942495a5 -0, 915915, 610, 0x6b201ab9 -0, 918918, 1015, 0x5f36b3f9 -0, 921921, 870, 0x14e48f0c -0, 924924, 716, 0xf4034b52 -0, 927927, 763, 0xcbf4694e -0, 930930, 778, 0xb9396764 -0, 933933, 831, 0x31999005 -0, 936936, 877, 0xc95e977f -0, 939939, 836, 0xb56c7d61 -0, 942942, 853, 0x2d5980cf -0, 945945, 861, 0x25629295 -0, 948948, 897, 0x0ff78a5f -0, 951951, 1016, 0x4dd8cdfd -0, 954954, 1117, 0x763f06c4 -0, 957957, 984, 0xcf7bc906 -0, 960960, 2750, 0xd428962d -0, 963963, 995, 0x5cbdd6a4 -0, 966966, 894, 0xc42b9e25 -0, 969969, 1028, 0xdf8ad906 -0, 972972, 1059, 0x4c49f0cc -0, 975975, 1122, 0x8880eed8 -0, 978978, 1007, 0xa9b4c243 -0, 981981, 1055, 0x6051dcd6 -0, 984984, 1293, 0xc3b32fa5 -0, 987987, 1101, 0xf986f9af -0, 990990, 1272, 0x13883127 -0, 993993, 1037, 0xb97cebff -0, 996996, 980, 0x0931d807 -0, 999999, 928, 0xbc3eb30b -0, 1003002, 1068, 0x62d9e8de -0, 1006005, 852, 0x9278a49a -0, 1009008, 2841, 0x3091d12d -0, 1012011, 931, 0x60f6c26e -0, 1015014, 949, 0x31b9c856 -0, 1018017, 835, 0xfe018775 -0, 1021020, 779, 0x85356cd7 -0, 1024023, 748, 0x862756bf -0, 1027026, 768, 0x0b7d645c -0, 1030029, 786, 0x7c196f5b -0, 1033032, 716, 0x4e8252cc -0, 1036035, 671, 0x0b2d3023 -0, 1039038, 708, 0x3b2b4f25 -0, 1042041, 786, 0x523d670e -0, 1045044, 680, 0x329142ec -0, 1048047, 703, 0x841b456c -0, 1051050, 660, 0x5cf332f1 -0, 1054053, 681, 0xcd7b3915 -0, 1057056, 2445, 0x27660ecb -0, 1060059, 667, 0xf3d53d2a -0, 1063062, 652, 0xe2b037b0 -0, 1066065, 695, 0x200248fc -0, 1069068, 659, 0x7f6434c5 -0, 1072071, 682, 0x8d243afb -0, 1075074, 701, 0x16e6476f -0, 1078077, 636, 0x319a3236 -0, 1081080, 679, 0x81fa41f9 -0, 1084083, 740, 0xb32850af -0, 1087086, 694, 0xe3f832c2 -0, 1090089, 681, 0x8174353f -0, 1093092, 757, 0xebbe5a1f -0, 1096095, 683, 0x9b46383c -0, 1099098, 816, 0xd41e6bdf -0, 1102101, 1058, 0x6170d2e6 -0, 1105104, 2489, 0x58fb28e1 -0, 1108107, 804, 0xb3037da8 -0, 1111110, 1053, 0x81ffc0a8 -0, 1114113, 868, 0xf73583cb -0, 1117116, 875, 0xfa5d85bd -0, 1120119, 723, 0x0714418d -0, 1123122, 670, 0xd04333a1 -0, 1126125, 854, 0x370e730d -0, 1129128, 794, 0x3d8a5e3c -0, 1132131, 836, 0xebe26aa7 -0, 1135134, 871, 0x1da58c5e -0, 1138137, 827, 0xda1e6ccb -0, 1141140, 805, 0x10ad6a44 -0, 1144143, 831, 0x826f6fc9 -0, 1147146, 832, 0xb2517364 -0, 1150149, 887, 0x11bf8a3f -0, 1153152, 2718, 0x26a8a174 -0, 1156155, 805, 0x4d0179f9 -0, 1159158, 699, 0x176c4f45 -0, 1162161, 758, 0xc1fc5b16 -0, 1165164, 707, 0x161b4891 -0, 1168167, 733, 0x99b554c0 -0, 1171170, 671, 0xccee2f89 -0, 1174173, 762, 0xd6416c9d -0, 1177176, 721, 0x2ad94f0c -0, 1180179, 727, 0x6280572e -0, 1183182, 856, 0x0a7b797e -0, 1186185, 843, 0xc64288aa -0, 1189188, 877, 0x6d1c945d -0, 1192191, 780, 0x4ba464e8 -0, 1195194, 808, 0xb3087cca -0, 1198197, 870, 0x75809930 -0, 1201200, 2919, 0x5a80f685 -0, 1204203, 1027, 0xc98add3d -0, 1207206, 1003, 0x0d88bd54 -0, 1210209, 1189, 0xb2f91ec7 -0, 1213212, 1320, 0x5acc4db3 -0, 1216215, 1381, 0xbd585feb -0, 1219218, 1378, 0xe1a656f0 -0, 1222221, 1398, 0x88b57a5e -0, 1225224, 1449, 0x1c737698 -0, 1228227, 1420, 0x6f0f80cd -0, 1231230, 1032, 0x2d16d643 -0, 1234233, 1275, 0x38844729 -0, 1237236, 1112, 0x300207ea -0, 1240239, 1105, 0xa2b700be -0, 1243242, 1283, 0x08d04bef -0, 1246245, 1056, 0xf795d994 -0, 1249248, 3202, 0xebf07050 -0, 1252251, 1034, 0x1099dbe5 -0, 1255254, 922, 0x88be9edc -0, 1258257, 1050, 0xd3d7eb96 -0, 1261260, 979, 0x8de6b302 -0, 1264263, 1053, 0x5de2eca8 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/lossless-shortenaudio mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/lossless-shortenaudio --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/lossless-shortenaudio 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/lossless-shortenaudio 2012-01-11 00:34:30.000000000 +0000 @@ -1 +1 @@ -9949141c405524f37ef1058b1ef4114b +da93c50961443b88fce416ae61c8ca8a diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/md5 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/md5 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/md5 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,5 @@ +0bf1bcc8a1d72e2cf58d42182b637e56 +993a3eb298e52aca83ecfbb6a766b4d0 +07c01ca7c733475fad38c84c56f305c1 +9fc8404827cac26385f48f4f58fd32ce +a22bfef14302c5ca46e0ae91092bc0e0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/motionpixels mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/motionpixels --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/motionpixels 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/motionpixels 2012-01-11 00:34:30.000000000 +0000 @@ -109,4 +109,3 @@ 0, 648003, 230400, 0xb343f372 0, 654003, 230400, 0xf7f1e588 0, 660003, 230400, 0x9682bdb2 -0, 666003, 230400, 0x538a3db8 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/mpeg2-field-enc mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/mpeg2-field-enc --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/mpeg2-field-enc 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/mpeg2-field-enc 2012-01-11 00:34:30.000000000 +0000 @@ -1,39 +1,31 @@ 0, 0, 622080, 0xb3b66c5c -0, 3600, 622080, 0xb3b66c5c -0, 7200, 622080, 0xb3b66c5c -0, 10800, 622080, 0xb3b66c5c -0, 14400, 622080, 0xb3b66c5c -0, 18000, 622080, 0xb3b66c5c -0, 21600, 622080, 0xb3b66c5c -0, 25200, 622080, 0xb3b66c5c -0, 28800, 622080, 0xb3b66c5c -0, 32400, 622080, 0x088ec02b -0, 36000, 622080, 0x7a36db21 -0, 39600, 622080, 0x541b286f -0, 43200, 622080, 0xb6c3e590 -0, 46800, 622080, 0x39dbed51 -0, 50400, 622080, 0x973dc728 -0, 54000, 622080, 0xd7a4f804 -0, 57600, 622080, 0xa2484762 -0, 61200, 622080, 0x0cd268d1 -0, 64800, 622080, 0x72eb663d -0, 68400, 622080, 0x8fdbac59 -0, 72000, 622080, 0xa6f4feb9 -0, 75600, 622080, 0xadb828c6 -0, 79200, 622080, 0xea630a63 -0, 82800, 622080, 0xa901d925 -0, 86400, 622080, 0xac5e7087 -0, 90000, 622080, 0x10274a2b -0, 93600, 622080, 0x143d541c -0, 97200, 622080, 0xee94c93a -0, 100800, 622080, 0xca030208 -0, 104400, 622080, 0x26f30ead -0, 108000, 622080, 0xfc22f32c -0, 111600, 622080, 0x940a5ff8 -0, 115200, 622080, 0x2164f805 -0, 118800, 622080, 0xa76f5aba -0, 122400, 622080, 0x8c311471 -0, 126000, 622080, 0xa45e1d95 -0, 129600, 622080, 0x6cc61d6c -0, 133200, 622080, 0x6983b417 -0, 136800, 622080, 0x982363c0 +0, 3600, 622080, 0x088ec02b +0, 7200, 622080, 0x7a36db21 +0, 10800, 622080, 0x541b286f +0, 14400, 622080, 0xb6c3e590 +0, 18000, 622080, 0x39dbed51 +0, 21600, 622080, 0x973dc728 +0, 25200, 622080, 0xd7a4f804 +0, 28800, 622080, 0xa2484762 +0, 32400, 622080, 0x0cd268d1 +0, 36000, 622080, 0x72eb663d +0, 39600, 622080, 0x8fdbac59 +0, 43200, 622080, 0xa6f4feb9 +0, 46800, 622080, 0xadb828c6 +0, 50400, 622080, 0xea630a63 +0, 54000, 622080, 0xa901d925 +0, 57600, 622080, 0xac5e7087 +0, 61200, 622080, 0x10274a2b +0, 64800, 622080, 0x143d541c +0, 68400, 622080, 0xee94c93a +0, 72000, 622080, 0xca030208 +0, 75600, 622080, 0x26f30ead +0, 79200, 622080, 0xfc22f32c +0, 82800, 622080, 0x940a5ff8 +0, 86400, 622080, 0x2164f805 +0, 90000, 622080, 0xa76f5aba +0, 93600, 622080, 0x8c311471 +0, 97200, 622080, 0xa45e1d95 +0, 100800, 622080, 0x6cc61d6c +0, 104400, 622080, 0x6983b417 +0, 108000, 622080, 0x982363c0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/nuv mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/nuv --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/nuv 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/nuv 2012-01-11 00:34:30.000000000 +0000 @@ -1,30 +1,27 @@ 0, 0, 460800, 0x54aedafe 1, 0, 4096, 0x00000000 1, 2090, 4096, 0x4dfae7a6 -0, 3003, 460800, 0x54aedafe +0, 3003, 460800, 0xb7aa8b56 1, 4180, 4096, 0x3fd9f5c6 -0, 6006, 460800, 0x54aedafe +0, 6006, 460800, 0x283ea3b5 1, 6269, 4096, 0x7b86e310 1, 8359, 4096, 0x611cece5 -0, 9009, 460800, 0x54aedafe +0, 9009, 460800, 0x283ea3b5 1, 10449, 4096, 0xb7d8e872 -0, 12012, 460800, 0xb7aa8b56 +0, 12012, 460800, 0x10e577de 1, 12539, 4096, 0x072ef72b 1, 14629, 4096, 0xb3560144 -0, 15015, 460800, 0x283ea3b5 +0, 15015, 460800, 0x4e091ee2 1, 16718, 4096, 0x0a3d119e -0, 18018, 460800, 0x283ea3b5 +0, 18018, 460800, 0x2ea88828 1, 18808, 4096, 0xbe391aa4 1, 20898, 4096, 0x28f7c6e5 -0, 21021, 460800, 0x10e577de +0, 21021, 460800, 0x4b7f4df0 1, 22988, 4096, 0xca9d9df2 -0, 24024, 460800, 0x4e091ee2 +0, 24024, 460800, 0xb30eb322 1, 25078, 4096, 0x5c6b95a9 -0, 27027, 460800, 0x2ea88828 1, 27167, 4096, 0x0bdfc0bf 1, 29257, 4096, 0xd95a9277 -0, 30030, 460800, 0x4b7f4df0 1, 31347, 4096, 0xae2bef2c -0, 33033, 460800, 0xb30eb322 1, 33437, 4096, 0xbf031e83 1, 35527, 4096, 0x4c83e2d1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/prores-422 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/prores-422 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/prores-422 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/prores-422 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +0, 0, 8294400, 0xe8e9d448 +0, 3003, 8294400, 0xe8e9d448 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/prores-422_hq mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/prores-422_hq --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/prores-422_hq 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/prores-422_hq 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +0, 0, 8294400, 0x817063b0 +0, 3003, 8294400, 0x817063b0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/prores-422_lt mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/prores-422_lt --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/prores-422_lt 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/prores-422_lt 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +0, 0, 8294400, 0xcd4ccde1 +0, 3003, 8294400, 0xcd4ccde1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/prores-422_proxy mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/prores-422_proxy --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/prores-422_proxy 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/prores-422_proxy 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +0, 0, 8294400, 0x51d29320 +0, 3003, 8294400, 0x51d29320 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/prores-alpha mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/prores-alpha --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/prores-alpha 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/prores-alpha 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,2 @@ +0, 0, 12441600, 0x9d3dc525 +0, 3003, 12441600, 0x9d3dc525 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/qt-ima4-mono mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/qt-ima4-mono --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/qt-ima4-mono 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/qt-ima4-mono 2012-01-11 00:34:30.000000000 +0000 @@ -1 +1 @@ -721b51fd66c3bb3dc49dd88d404188eb +e178ed520edf2f46492ae740d88f5815 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/qt-ima4-stereo mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/qt-ima4-stereo --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/qt-ima4-stereo 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/qt-ima4-stereo 2012-01-11 00:34:30.000000000 +0000 @@ -1 +1 @@ -c9e4c21fb62eca34a533f3a9ad2e394a +d22be0e193dcbba1068a1ca6ab04cf77 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/r210 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/r210 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/r210 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/r210 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,3 @@ +0, 0, 1843200, 0xbd414b93 +0, 3003, 1843200, 0x23298f1f +0, 6006, 1843200, 0x5a56df19 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/real-rv40 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/real-rv40 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/real-rv40 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/real-rv40 2012-01-11 00:34:30.000000000 +0000 @@ -1,121 +1,240 @@ 0, 0, 276480, 0x5f7a0d4f -0, 7500, 276480, 0x5f7a0d4f -0, 15000, 276480, 0x5f7a0d4f -0, 22500, 276480, 0x5f7a0d4f -0, 30000, 276480, 0x5f7a0d4f -0, 37500, 276480, 0x5f7a0d4f -0, 45000, 276480, 0x5f7a0d4f -0, 52500, 276480, 0x5f7a0d4f -0, 60000, 276480, 0x5f7a0d4f -0, 67500, 276480, 0x5f7a0d4f -0, 75000, 276480, 0x5f7a0d4f -0, 82500, 276480, 0x5f7a0d4f -0, 90000, 276480, 0x5f7a0d4f -0, 97500, 276480, 0x5f7a0d4f -0, 105000, 276480, 0x5f7a0d4f -0, 112500, 276480, 0x5f7a0d4f -0, 120000, 276480, 0x5f7a0d4f -0, 127500, 276480, 0x5f7a0d4f -0, 135000, 276480, 0x2d722f8a -0, 142500, 276480, 0xebbb3c8f -0, 150000, 276480, 0x8574c868 -0, 157500, 276480, 0x4ec1e418 -0, 165000, 276480, 0x95f22651 -0, 172500, 276480, 0x071d897e -0, 180000, 276480, 0x9f7623f9 -0, 187500, 276480, 0x86d4dedf -0, 195000, 276480, 0xc0a0be22 -0, 202500, 276480, 0xc5902aec -0, 210000, 276480, 0xe000f066 -0, 217500, 276480, 0x0b2a48d5 -0, 225000, 276480, 0xa1565256 -0, 232500, 276480, 0x8de3ceb3 -0, 240000, 276480, 0x654b564a -0, 247500, 276480, 0xc9c57884 -0, 255000, 276480, 0x89cdcdd4 -0, 262500, 276480, 0x3594fe61 -0, 270000, 276480, 0x9d082a81 -0, 277500, 276480, 0x4e6cd0c3 -0, 285000, 276480, 0xc129765f -0, 292500, 276480, 0x92a04c99 -0, 300000, 276480, 0x5ca62953 -0, 307500, 276480, 0xb7e478aa -0, 315000, 276480, 0x932735d5 -0, 322500, 276480, 0xaaa2d7aa -0, 330000, 276480, 0xd1329996 -0, 337500, 276480, 0x6de1e34b -0, 345000, 276480, 0x8c963c9b -0, 352500, 276480, 0xce6eff29 -0, 360000, 276480, 0x25412f7e -0, 367500, 276480, 0x11a5ad85 -0, 375000, 276480, 0x26ea3248 -0, 382500, 276480, 0x86c35fa4 -0, 390000, 276480, 0xa98a2d38 -0, 397500, 276480, 0xed827333 -0, 405000, 276480, 0x5d44a824 -0, 412500, 276480, 0x46d54d04 -0, 420000, 276480, 0x413fd26a -0, 427500, 276480, 0xf0b3b71b -0, 435000, 276480, 0x459bc06d -0, 442500, 276480, 0x4199cd45 -0, 450000, 276480, 0xa8d35683 -0, 457500, 276480, 0x9a3e7de0 -0, 465000, 276480, 0x5a30f666 -0, 472500, 276480, 0x40152668 -0, 480000, 276480, 0x90c4d22c -0, 487500, 276480, 0x5cbaacc9 -0, 495000, 276480, 0x72b658f1 -0, 502500, 276480, 0x0ba3dcc9 -0, 510000, 276480, 0x259ed5c1 -0, 517500, 276480, 0x7fd73a99 -0, 525000, 276480, 0x488980c5 -0, 532500, 276480, 0x1d4c96a5 -0, 540000, 276480, 0x41ced7f2 -0, 547500, 276480, 0xd62d1837 -0, 555000, 276480, 0xf5fd9d20 -0, 562500, 276480, 0x2af91fda -0, 570000, 276480, 0x38ce229d -0, 577500, 276480, 0xf3a712c0 -0, 585000, 276480, 0x57b111d2 -0, 592500, 276480, 0x8556b792 -0, 600000, 276480, 0xb32d0896 -0, 607500, 276480, 0x923b9937 -0, 615000, 276480, 0x0da1e7e3 -0, 622500, 276480, 0x7f172382 -0, 630000, 276480, 0x93622b88 -0, 637500, 276480, 0x2599d540 -0, 645000, 276480, 0xed20c105 -0, 652500, 276480, 0x62ce256e -0, 660000, 276480, 0x286a04bb -0, 667500, 276480, 0x423f7e7c -0, 675000, 276480, 0x21fc252a -0, 682500, 276480, 0xf8a8e8ee -0, 690000, 276480, 0x770d4a8d -0, 697500, 276480, 0xaa12b6fd -0, 705000, 276480, 0xdc7221a8 -0, 712500, 276480, 0x487eeb30 -0, 720000, 276480, 0x1e74f2db -0, 727500, 276480, 0x40ae2bc3 -0, 735000, 276480, 0x9ca9b930 -0, 742500, 276480, 0x9fb19b0f -0, 750000, 276480, 0x7bdf836c -0, 757500, 276480, 0x1e607ba7 -0, 765000, 276480, 0xbd96578b -0, 772500, 276480, 0x2124bf07 -0, 780000, 276480, 0x4895e27a -0, 787500, 276480, 0x694d76e3 -0, 795000, 276480, 0xe70df513 -0, 802500, 276480, 0xcacafe6b -0, 810000, 276480, 0x64087748 -0, 817500, 276480, 0x571fda23 -0, 825000, 276480, 0x8c86cbe9 -0, 832500, 276480, 0xc8ea4671 -0, 840000, 276480, 0xbfb74300 -0, 847500, 276480, 0xbe1e3770 -0, 855000, 276480, 0x757a0232 -0, 862500, 276480, 0xa5f50c84 -0, 870000, 276480, 0x6d95f808 -0, 877500, 276480, 0xf002c5ca -0, 885000, 276480, 0x1a2abb26 -0, 892500, 276480, 0x6cf69bf2 -0, 900000, 276480, 0x8f316c66 +0, 3754, 276480, 0x5f7a0d4f +0, 7507, 276480, 0x5f7a0d4f +0, 11261, 276480, 0x5f7a0d4f +0, 15015, 276480, 0x5f7a0d4f +0, 18769, 276480, 0x5f7a0d4f +0, 22522, 276480, 0x5f7a0d4f +0, 26276, 276480, 0x5f7a0d4f +0, 30030, 276480, 0x5f7a0d4f +0, 33784, 276480, 0x5f7a0d4f +0, 37537, 276480, 0x5f7a0d4f +0, 41291, 276480, 0x5f7a0d4f +0, 45045, 276480, 0x5f7a0d4f +0, 48799, 276480, 0x5f7a0d4f +0, 52552, 276480, 0x5f7a0d4f +0, 56306, 276480, 0x5f7a0d4f +0, 60060, 276480, 0x5f7a0d4f +0, 63814, 276480, 0x5f7a0d4f +0, 67567, 276480, 0x5f7a0d4f +0, 71321, 276480, 0x5f7a0d4f +0, 75075, 276480, 0x5f7a0d4f +0, 78829, 276480, 0x5f7a0d4f +0, 82582, 276480, 0x5f7a0d4f +0, 86336, 276480, 0x5f7a0d4f +0, 90090, 276480, 0x5f7a0d4f +0, 93844, 276480, 0x5f7a0d4f +0, 97597, 276480, 0x5f7a0d4f +0, 101351, 276480, 0x5f7a0d4f +0, 105105, 276480, 0x5f7a0d4f +0, 108859, 276480, 0x5f7a0d4f +0, 112612, 276480, 0x5f7a0d4f +0, 116366, 276480, 0x5f7a0d4f +0, 120120, 276480, 0x5f7a0d4f +0, 123874, 276480, 0x75641594 +0, 127627, 276480, 0x32ee3526 +0, 131381, 276480, 0xcb53479a +0, 135135, 276480, 0x7ca9658e +0, 138889, 276480, 0x5ce39368 +0, 142642, 276480, 0x4ec1e418 +0, 146396, 276480, 0xb3790499 +0, 150150, 276480, 0xa9f1506f +0, 153904, 276480, 0x85cbc3b5 +0, 157657, 276480, 0x377c7b46 +0, 161411, 276480, 0x1a61d8db +0, 165165, 276480, 0xe1de7f0a +0, 168919, 276480, 0x756a4a2e +0, 172672, 276480, 0xcb379547 +0, 176426, 276480, 0xbae14484 +0, 180180, 276480, 0x8e12331c +0, 183934, 276480, 0x99c085be +0, 187687, 276480, 0xe479ffed +0, 191441, 276480, 0x99c82949 +0, 195195, 276480, 0xac7672dd +0, 198949, 276480, 0x1e4fae19 +0, 202702, 276480, 0x776412ef +0, 206456, 276480, 0x7d9b579f +0, 210210, 276480, 0x1cd1ab29 +0, 213964, 276480, 0x58ce0f38 +0, 217717, 276480, 0x5ab69b27 +0, 221471, 276480, 0x0afad610 +0, 225225, 276480, 0x9eca3f11 +0, 228979, 276480, 0xc3db9706 +0, 232732, 276480, 0xc9c57884 +0, 236486, 276480, 0xd9fbb2cf +0, 240240, 276480, 0xdc07f3c9 +0, 243994, 276480, 0x000b5269 +0, 247747, 276480, 0x27ff7a5d +0, 251501, 276480, 0xd92e2017 +0, 255255, 276480, 0x18d4b27d +0, 259009, 276480, 0x70647530 +0, 262762, 276480, 0x97612c4b +0, 266516, 276480, 0xc9d4ac78 +0, 270270, 276480, 0x4ec4d57f +0, 274024, 276480, 0xdf4e04d7 +0, 277777, 276480, 0xbd98f57c +0, 281531, 276480, 0x7247ea3e +0, 285285, 276480, 0xa5d670ec +0, 289039, 276480, 0x5163b29b +0, 292792, 276480, 0x99170e64 +0, 296546, 276480, 0x37f4c0b0 +0, 300300, 276480, 0x7a4f2561 +0, 304053, 276480, 0x8a4e991f +0, 307807, 276480, 0x6a45425f +0, 311561, 276480, 0x1f0e2bb6 +0, 315315, 276480, 0xd75482c6 +0, 319068, 276480, 0x7bf6b1ef +0, 322822, 276480, 0x6de1e34b +0, 326576, 276480, 0x4526c89b +0, 330330, 276480, 0xf964e18e +0, 334083, 276480, 0xdcaaa99a +0, 337837, 276480, 0xd1e98808 +0, 341591, 276480, 0x556b2365 +0, 345345, 276480, 0x0cf65540 +0, 349098, 276480, 0x6e2d524e +0, 352852, 276480, 0x22c50a3d +0, 356606, 276480, 0x293f19af +0, 360360, 276480, 0xf4b1c461 +0, 364113, 276480, 0x62b76407 +0, 367867, 276480, 0x51e9b3eb +0, 371621, 276480, 0x7b910bc7 +0, 375375, 276480, 0x6dd14ca6 +0, 379128, 276480, 0x441f7afd +0, 382882, 276480, 0xfb01efc6 +0, 386636, 276480, 0x4f73ccea +0, 390390, 276480, 0x5ac8e06f +0, 394143, 276480, 0x294bb441 +0, 397897, 276480, 0xe04ac45e +0, 401651, 276480, 0xa7a38d41 +0, 405405, 276480, 0xf688a3ed +0, 409158, 276480, 0x58f275ea +0, 412912, 276480, 0xf0b3b71b +0, 416666, 276480, 0x3ce773bf +0, 420420, 276480, 0x01840548 +0, 424173, 276480, 0x674e34e4 +0, 427927, 276480, 0x41dda2d9 +0, 431681, 276480, 0xc5b60838 +0, 435435, 276480, 0x9b209f41 +0, 439188, 276480, 0xf46ba7fb +0, 442942, 276480, 0x28b54815 +0, 446696, 276480, 0xb605a933 +0, 450450, 276480, 0x34484aff +0, 454203, 276480, 0xaf2b5d89 +0, 457957, 276480, 0x8facba58 +0, 461711, 276480, 0xbbe3e99f +0, 465465, 276480, 0x02162c7c +0, 469218, 276480, 0x28a63236 +0, 472972, 276480, 0x1ad43fd7 +0, 476726, 276480, 0xe37883e5 +0, 480480, 276480, 0x2b8a89c5 +0, 484233, 276480, 0x71507bd2 +0, 487987, 276480, 0x35626022 +0, 491741, 276480, 0x461fc3e7 +0, 495495, 276480, 0xce5af1ec +0, 499248, 276480, 0x7c1139b3 +0, 503002, 276480, 0x7fd73a99 +0, 506756, 276480, 0x4ae4c3a6 +0, 510510, 276480, 0xcb60725a +0, 514263, 276480, 0xb52e1aa2 +0, 518017, 276480, 0xd6f82cae +0, 521771, 276480, 0x6310e665 +0, 525525, 276480, 0xfa88a483 +0, 529278, 276480, 0xf88f75d4 +0, 533032, 276480, 0x04a8e3ee +0, 536786, 276480, 0x54766a12 +0, 540540, 276480, 0x0b41f0d7 +0, 544293, 276480, 0xa29f5b01 +0, 548047, 276480, 0x754ceaf5 +0, 551801, 276480, 0x150c0423 +0, 555555, 276480, 0xde084059 +0, 559308, 276480, 0x5a38b4af +0, 563062, 276480, 0xfcebc261 +0, 566816, 276480, 0x0eb9770d +0, 570570, 276480, 0x046394ae +0, 574323, 276480, 0x3d3ca985 +0, 578077, 276480, 0x94a03c75 +0, 581831, 276480, 0x800eea2d +0, 585585, 276480, 0x6a841f41 +0, 589338, 276480, 0x2f98911c +0, 593092, 276480, 0x923b9937 +0, 596846, 276480, 0xe82f8e0f +0, 600600, 276480, 0xee82d657 +0, 604353, 276480, 0xefab7ffd +0, 608107, 276480, 0x6b9fbc80 +0, 611861, 276480, 0x4a1ada47 +0, 615614, 276480, 0x6d4b49d7 +0, 619368, 276480, 0xe4bdbd1e +0, 623122, 276480, 0x225a56c0 +0, 626876, 276480, 0xd4adadad +0, 630629, 276480, 0xff4e1a8c +0, 634383, 276480, 0xf58b1b7c +0, 638137, 276480, 0xbaffcdcc +0, 641891, 276480, 0x374f88f0 +0, 645644, 276480, 0x3d861ae6 +0, 649398, 276480, 0xeb6eb88f +0, 653152, 276480, 0xdb753d35 +0, 656906, 276480, 0x9aa543af +0, 660659, 276480, 0xb24c8016 +0, 664413, 276480, 0xea80a82e +0, 668167, 276480, 0x2aae902a +0, 671921, 276480, 0x5bba3cfb +0, 675674, 276480, 0x5c6e97a9 +0, 679428, 276480, 0x9b9ee961 +0, 683182, 276480, 0xaa12b6fd +0, 686936, 276480, 0xe9d2439f +0, 690689, 276480, 0xbf09053c +0, 694443, 276480, 0x50c31e73 +0, 698197, 276480, 0xdd9fb89f +0, 701951, 276480, 0x3e4e5aec +0, 705704, 276480, 0x0b752d28 +0, 709458, 276480, 0xaf82399a +0, 713212, 276480, 0x7ce5f23c +0, 716966, 276480, 0xad135d0f +0, 720719, 276480, 0x55dadd30 +0, 724473, 276480, 0x5aaa7519 +0, 728227, 276480, 0xe45a5599 +0, 731981, 276480, 0xc8e89913 +0, 735734, 276480, 0x2f447fd3 +0, 739488, 276480, 0x704411fb +0, 743242, 276480, 0x9d7430a1 +0, 746996, 276480, 0x24dd5fd3 +0, 750749, 276480, 0x51cb657c +0, 754503, 276480, 0x2c230702 +0, 758257, 276480, 0x4a4f76cd +0, 762011, 276480, 0xdcd71e88 +0, 765764, 276480, 0x87160f99 +0, 769518, 276480, 0x27f54854 +0, 773272, 276480, 0x694d76e3 +0, 777026, 276480, 0xcbe93c19 +0, 780779, 276480, 0x50742e1b +0, 784533, 276480, 0x525463e2 +0, 788287, 276480, 0x819898f9 +0, 792041, 276480, 0x08fac755 +0, 795794, 276480, 0x35c46927 +0, 799548, 276480, 0xeeed00fc +0, 803302, 276480, 0xb6f99ee3 +0, 807056, 276480, 0xd87f4c73 +0, 810809, 276480, 0xde97d9fd +0, 814563, 276480, 0xefc83107 +0, 818317, 276480, 0xbb22e024 +0, 822071, 276480, 0x53a7cfcb +0, 825824, 276480, 0xbe1fbb19 +0, 829578, 276480, 0x300f922a +0, 833332, 276480, 0x826fc3bd +0, 837086, 276480, 0x679aa57a +0, 840839, 276480, 0x5497097b +0, 844593, 276480, 0x679a53f8 +0, 848347, 276480, 0x976c9e93 +0, 852101, 276480, 0xe80f87f2 +0, 855854, 276480, 0xdc2d7c6c +0, 859608, 276480, 0xb194656e +0, 863362, 276480, 0xf002c5ca +0, 867116, 276480, 0x43fc1c64 +0, 870869, 276480, 0xf62d8581 +0, 874623, 276480, 0xb243dda5 +0, 878377, 276480, 0x1700efbb +0, 882131, 276480, 0x9ebe6ba2 +0, 885884, 276480, 0x8f316c66 +0, 889638, 276480, 0x6348ecf5 +0, 893392, 276480, 0x34b5b78a +0, 897146, 276480, 0xcbf66922 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/rv30 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/rv30 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/rv30 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/rv30 2012-01-11 00:34:30.000000000 +0000 @@ -1,46 +1,109 @@ 0, 0, 126720, 0xcefaec47 -0, 7500, 126720, 0xa416ece5 -0, 15000, 126720, 0xa416ece5 -0, 22500, 126720, 0xa416ece5 -0, 30000, 126720, 0xcc10f4b7 -0, 37500, 126720, 0xeb6fb8d7 -0, 45000, 126720, 0xda71b917 -0, 52500, 126720, 0xbb1abbb7 -0, 60000, 126720, 0x273fbc37 -0, 67500, 126720, 0x16eebbd7 -0, 75000, 126720, 0x105eb927 -0, 82500, 126720, 0x7fa3ae27 -0, 90000, 126720, 0xd115a757 -0, 97500, 126720, 0x04e7897c -0, 105000, 126720, 0x68cfda2b -0, 112500, 126720, 0xe572dfc9 -0, 120000, 126720, 0xbc3cc34f -0, 127500, 126720, 0xcf8cb0e2 -0, 135000, 126720, 0x6d1c630d -0, 142500, 126720, 0x4338e469 -0, 150000, 126720, 0x9d82ea38 -0, 157500, 126720, 0x55e0b559 -0, 165000, 126720, 0x5eefb5ef -0, 172500, 126720, 0x4b10b746 -0, 180000, 126720, 0x8b07a1db -0, 187500, 126720, 0x8c639b34 -0, 195000, 126720, 0x63eb0b9f -0, 202500, 126720, 0x31c80c83 -0, 210000, 126720, 0x78495352 -0, 217500, 126720, 0x63d609c4 -0, 225000, 126720, 0xcd2a62d8 -0, 232500, 126720, 0x4aea732d -0, 240000, 126720, 0xe3bb352c -0, 247500, 126720, 0x4b9036ad -0, 255000, 126720, 0x88b66e2d -0, 262500, 126720, 0x4a8a1b16 -0, 270000, 126720, 0x2e014eac -0, 277500, 126720, 0x83212c67 -0, 285000, 126720, 0x4937e897 -0, 292500, 126720, 0x2d38babe -0, 300000, 126720, 0xbcb43c09 -0, 307500, 126720, 0x955ffaf4 -0, 315000, 126720, 0x3337d4a2 -0, 322500, 126720, 0xe8f58c33 -0, 330000, 126720, 0x3a7f771f -0, 337500, 126720, 0xb67c39b9 +0, 3003, 126720, 0xa416ece5 +0, 6006, 126720, 0xa416ece5 +0, 9009, 126720, 0xa416ece5 +0, 12012, 126720, 0x60d6ed27 +0, 15015, 126720, 0x259af497 +0, 18018, 126720, 0x5e6ff4d7 +0, 21021, 126720, 0xcc10f4b7 +0, 24024, 126720, 0x763ab817 +0, 27027, 126720, 0xeb6fb8d7 +0, 30030, 126720, 0xda71b917 +0, 33033, 126720, 0x0967b8f7 +0, 36036, 126720, 0x4b62b947 +0, 39039, 126720, 0xbb1abbb7 +0, 42042, 126720, 0x273fbc37 +0, 45045, 126720, 0x16eebbd7 +0, 48048, 126720, 0x105eb927 +0, 51051, 126720, 0x7fa3ae27 +0, 54054, 126720, 0x722e99f7 +0, 57057, 126720, 0x5ac9a827 +0, 60060, 126720, 0x07beba77 +0, 63063, 126720, 0x29d6a887 +0, 66066, 126720, 0xa5caab87 +0, 69069, 126720, 0x9ca7aac7 +0, 72072, 126720, 0xb7debcd7 +0, 75075, 126720, 0xd115a757 +0, 78078, 126720, 0x6ddaef32 +0, 81081, 126720, 0xde1bb900 +0, 84084, 126720, 0xac6c071b +0, 87087, 126720, 0x04e7897c +0, 90090, 126720, 0x5eee050f +0, 93093, 126720, 0xe675be59 +0, 96096, 126720, 0xdc3e0837 +0, 99099, 126720, 0x68cfda2b +0, 102102, 126720, 0xe572dfc9 +0, 105105, 126720, 0x582fb176 +0, 108108, 126720, 0xa9477df0 +0, 111111, 126720, 0xbc3cc34f +0, 114114, 126720, 0xcf8cb0e2 +0, 117117, 126720, 0xcff1db35 +0, 120120, 126720, 0xc6e10f9f +0, 123123, 126720, 0x75ae61b6 +0, 126126, 126720, 0x12af3119 +0, 129129, 126720, 0x85597543 +0, 132132, 126720, 0x68c27aca +0, 135135, 126720, 0x554fe3e4 +0, 138138, 126720, 0x72ecea95 +0, 141141, 126720, 0xf4d003d1 +0, 144144, 126720, 0x9bf6a605 +0, 147147, 126720, 0x5d00b5fe +0, 150150, 126720, 0x93f7b040 +0, 153153, 126720, 0x0d6ad154 +0, 156156, 126720, 0x4be8b4ea +0, 159159, 126720, 0xe39bba0d +0, 162162, 126720, 0x9c21bad8 +0, 165165, 126720, 0xa567f25b +0, 168168, 126720, 0x7a82663a +0, 171171, 126720, 0x72f2a47d +0, 174174, 126720, 0x4f639ebe +0, 177177, 126720, 0xab0fce83 +0, 180180, 126720, 0x6cf87d39 +0, 183183, 126720, 0x534a10cc +0, 186186, 126720, 0x6bbcf44c +0, 189189, 126720, 0xfdca11d3 +0, 192192, 126720, 0x7e58f5a6 +0, 195195, 126720, 0x5fd753d8 +0, 198198, 126720, 0x0c735615 +0, 201201, 126720, 0x2a034ebf +0, 204204, 126720, 0xeaf3dd0b +0, 207207, 126720, 0x0eaf0c1b +0, 210210, 126720, 0xce5e6794 +0, 213213, 126720, 0xf27c31c3 +0, 216216, 126720, 0xb64af168 +0, 219219, 126720, 0x14cf7974 +0, 222222, 126720, 0x1c2a513d +0, 225225, 126720, 0xa3f515ab +0, 228228, 126720, 0xcfd62765 +0, 231231, 126720, 0xbc513f2a +0, 234234, 126720, 0xbc303fae +0, 237237, 126720, 0x2f8f69b9 +0, 240240, 126720, 0x0a22cc69 +0, 243243, 126720, 0xd9f67585 +0, 246246, 126720, 0x20403001 +0, 249249, 126720, 0xf92b2a25 +0, 252252, 126720, 0x3c170aad +0, 255255, 126720, 0x3378251f +0, 258258, 126720, 0xb3ed5911 +0, 261261, 126720, 0x35d24ef8 +0, 264264, 126720, 0x8da30275 +0, 267267, 126720, 0xc15a3577 +0, 270270, 126720, 0xf2942f53 +0, 273273, 126720, 0x44d8304a +0, 276276, 126720, 0xd688a932 +0, 279279, 126720, 0x0a24f256 +0, 282282, 126720, 0xfab9c45d +0, 285285, 126720, 0x10e939ce +0, 288288, 126720, 0x97fcaa3a +0, 291291, 126720, 0x45464610 +0, 294294, 126720, 0xfe2e057d +0, 297297, 126720, 0x0b6718ae +0, 300300, 126720, 0x5284da7b +0, 303303, 126720, 0x23efdc35 +0, 306306, 126720, 0xc387b2b3 +0, 309309, 126720, 0xc9e92bf1 +0, 312312, 126720, 0xfbf20a01 +0, 315315, 126720, 0x4d888b2e +0, 318318, 126720, 0xdd0d74df +0, 321321, 126720, 0x49d07aa4 +0, 324324, 126720, 0x08382b8e diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/smacker mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/smacker --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/smacker 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/smacker 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ 0, 0, 192000, 0x8926d7fc -1, 0, 47240, 0xad778a78 +1, 0, 47240, 0x9974897c 0, 6390, 192000, 0x2506d384 0, 12780, 192000, 0x9a8dc93a 0, 19170, 192000, 0x4badb7f2 @@ -15,163 +15,163 @@ 0, 83070, 192000, 0x1a3d7971 0, 89460, 192000, 0xa1a65bd5 0, 95850, 192000, 0x344957b9 -1, 96408, 3128, 0x4c1564ae +1, 96408, 3128, 0x7e4064b4 0, 102240, 192000, 0xe23b5f4e -1, 102792, 3128, 0x34553309 +1, 102792, 3128, 0x80883301 0, 108630, 192000, 0xb5c2710b -1, 109176, 3136, 0xb474d246 +1, 109176, 3136, 0x2ad2d341 0, 115020, 192000, 0x7a25938f -1, 115576, 3128, 0x87b868ea +1, 115576, 3128, 0xda8468e3 0, 121410, 192000, 0x0a84e4c9 -1, 121959, 3136, 0xf1516dc3 +1, 121959, 3136, 0x9d6f6cdf 0, 127800, 192000, 0x94209b0d -1, 128359, 3128, 0x867563cb +1, 128359, 3128, 0x1aaa64b5 0, 134190, 192000, 0xf940e51f -1, 134743, 3128, 0x5200728c +1, 134743, 3128, 0x9182728b 0, 140580, 192000, 0xb9fdec42 -1, 141127, 3136, 0xeda118a0 +1, 141127, 3136, 0xfa8e17b3 0, 146970, 192000, 0x7b04a376 -1, 147527, 3128, 0x03e2c1d6 +1, 147527, 3128, 0x0dc3c1cf 0, 153360, 192000, 0x5fe0026b -1, 153910, 3136, 0xc3e862b6 +1, 153910, 3136, 0x0109639d 0, 159750, 192000, 0x775aca39 -1, 160310, 3128, 0x937a13be +1, 160310, 3128, 0x6d8a12d9 0, 166140, 192000, 0xae14fb32 -1, 166694, 3128, 0x7b1b9577 +1, 166694, 3128, 0x4b9a9597 0, 172530, 192000, 0x661106e5 -1, 173078, 3136, 0x042c7113 +1, 173078, 3136, 0x9112710e 0, 178920, 192000, 0xe8658dbf -1, 179478, 3128, 0xac48f451 +1, 179478, 3128, 0x8cccf522 0, 185310, 192000, 0x5359f0f9 -1, 185861, 3128, 0x018fbbe9 +1, 185861, 3128, 0x6594bbf3 0, 191700, 192000, 0xc1ec80f4 -1, 192245, 3136, 0xc62aa7ce +1, 192245, 3136, 0xd878a7d5 0, 198090, 192000, 0xca53806b -1, 198645, 3128, 0x106e3924 +1, 198645, 3128, 0xaa6e3905 0, 204480, 192000, 0xf0766b2e -1, 205029, 3136, 0xfeb82ecc +1, 205029, 3136, 0x2a062e04 0, 210870, 192000, 0x39962da8 -1, 211429, 3128, 0x7e7c005b +1, 211429, 3128, 0x84e4006a 0, 217260, 192000, 0x4171c37f -1, 217812, 3128, 0x949d3560 +1, 217812, 3128, 0x85183633 0, 223650, 192000, 0x3abf3b46 -1, 224196, 3136, 0x02bd4aff +1, 224196, 3136, 0xb62d4b02 0, 230040, 192000, 0xecc68313 -1, 230596, 3128, 0x4aaf4715 +1, 230596, 3128, 0xe209462a 0, 236430, 192000, 0xea339baf -1, 236980, 3136, 0x2958825f +1, 236980, 3136, 0x57c4824b 0, 242820, 192000, 0x616b8f16 -1, 243380, 3128, 0x99a5914d +1, 243380, 3128, 0x664a9163 0, 249210, 192000, 0xf77a8581 -1, 249763, 3128, 0xe67277a4 +1, 249763, 3128, 0xb4287874 0, 255600, 192000, 0xb315678b -1, 256147, 3136, 0x11296973 +1, 256147, 3136, 0xde626885 0, 261990, 192000, 0x0a4a5218 -1, 262547, 3128, 0x5cc362f7 +1, 262547, 3128, 0x919763c2 0, 268380, 192000, 0x98802be4 -1, 268931, 3128, 0x0c5e6586 +1, 268931, 3128, 0xa4f664e1 0, 274770, 192000, 0xa2f0fd94 -1, 275314, 3136, 0xe940b0f9 +1, 275314, 3136, 0xa0bab0d4 0, 281160, 192000, 0x6671c84f -1, 281714, 3128, 0x2c9292cc +1, 281714, 3128, 0xe938939c 0, 287550, 192000, 0x38327e31 -1, 288098, 3136, 0xa807c096 +1, 288098, 3136, 0x3679bfc7 0, 293940, 192000, 0xb85d3e08 -1, 294498, 3128, 0x9d2254d8 +1, 294498, 3128, 0xc96c55c3 0, 300330, 192000, 0xdc69eba9 -1, 300882, 3128, 0xe68015b0 +1, 300882, 3128, 0x119114d6 0, 306720, 192000, 0x8955a0b3 -1, 307265, 3136, 0x65d58029 +1, 307265, 3136, 0x42f3800f 0, 313110, 192000, 0x714a548b -1, 313665, 3128, 0xcffcc48c +1, 313665, 3128, 0x4250c4ad 0, 319500, 192000, 0xc0471de9 -1, 320049, 3136, 0x8c704944 +1, 320049, 3136, 0x5cdd4925 0, 325890, 192000, 0x2e16e039 -1, 326449, 3128, 0x1459231d +1, 326449, 3128, 0xa4c12360 0, 332280, 192000, 0x9fa4b033 -1, 332833, 3128, 0x7dde4839 +1, 332833, 3128, 0x849f48de 0, 338670, 192000, 0x4a0f9402 -1, 339216, 3136, 0xbb6890e2 +1, 339216, 3136, 0x6acd8ff9 0, 345060, 192000, 0x1f3e6843 -1, 345616, 3128, 0xcd9a8524 +1, 345616, 3128, 0xb2758556 0, 351450, 192000, 0x31774850 -1, 352000, 3128, 0xa244fc31 +1, 352000, 3128, 0x10f2fcb1 0, 357840, 192000, 0x9d5336a2 -1, 358384, 3136, 0x504e2bd9 +1, 358384, 3136, 0xf0f02b23 0, 364230, 192000, 0xf7de27a2 -1, 364784, 3128, 0x655858d8 +1, 364784, 3128, 0x64f759c6 0, 370620, 192000, 0x98c717ce -1, 371167, 3136, 0x46027610 +1, 371167, 3136, 0x7ec075e3 0, 377010, 192000, 0x615b10b8 -1, 377567, 3128, 0x4192d5e3 +1, 377567, 3128, 0xf981d51e 0, 383400, 192000, 0xd5bc0e7e -1, 383951, 3128, 0x21d2e7fe +1, 383951, 3128, 0xc622e8b9 0, 389790, 192000, 0xd5bc0e7e -1, 390335, 3136, 0x7c93e329 +1, 390335, 3136, 0xf632e2f8 0, 396180, 192000, 0xd5bc0e7e -1, 396735, 3128, 0xa67718c0 +1, 396735, 3128, 0xda561864 0, 402570, 192000, 0xd5bc0e7e -1, 403118, 3136, 0x9bb6e8a3 +1, 403118, 3136, 0x14d2e888 0, 408960, 192000, 0xd5bc0e7e -1, 409518, 3128, 0x0933b7a6 +1, 409518, 3128, 0x015bb869 0, 415350, 192000, 0xd5bc0e7e -1, 415902, 3128, 0x07f1fb57 +1, 415902, 3128, 0xedb1fb62 0, 421740, 192000, 0xd5bc0e7e -1, 422286, 3136, 0x8a050cfd +1, 422286, 3136, 0xe0560c41 0, 428130, 192000, 0xd5bc0e7e -1, 428686, 3128, 0xdb773c0b +1, 428686, 3128, 0x14773c9a 0, 434520, 192000, 0xd5bc0e7e -1, 435069, 3136, 0xd1281c53 +1, 435069, 3136, 0x850f1c82 0, 440910, 192000, 0xd5bc0e7e -1, 441469, 3128, 0x9f395324 +1, 441469, 3128, 0xb0bd5347 0, 447300, 192000, 0xd5bc0e7e -1, 447853, 3128, 0x5f13edec +1, 447853, 3128, 0x8f82edbf 0, 453690, 192000, 0xd5bc0e7e -1, 454237, 3136, 0x871cbecf +1, 454237, 3136, 0x493abee2 0, 460080, 192000, 0xd5bc0e7e -1, 460637, 3128, 0x799eff3e +1, 460637, 3128, 0xf5daff3f 0, 466470, 192000, 0xd5bc0e7e -1, 467020, 3128, 0x3f902762 +1, 467020, 3128, 0x78ad2690 0, 472860, 192000, 0xd5bc0e7e -1, 473404, 3136, 0x29f8bb04 +1, 473404, 3136, 0x490ebafc 0, 479250, 192000, 0xd5bc0e7e -1, 479804, 3128, 0xf3523ee9 +1, 479804, 3128, 0x70333fd2 0, 485640, 192000, 0xd5bc0e7e -1, 486188, 3136, 0x4405c435 +1, 486188, 3136, 0x8cb1c350 0, 492030, 192000, 0xd5bc0e7e -1, 492588, 3128, 0x892957cb +1, 492588, 3128, 0x8bd057cb 0, 498420, 192000, 0xd5bc0e7e -1, 498971, 3128, 0xdf483dbd +1, 498971, 3128, 0x161b3dbc 0, 504810, 192000, 0xd5bc0e7e -1, 505355, 3136, 0x5e8ab797 +1, 505355, 3136, 0xb47fb88a 0, 511200, 192000, 0xd5bc0e7e -1, 511755, 3128, 0x92e13820 +1, 511755, 3128, 0x474b381e 0, 517590, 192000, 0xd5bc0e7e -1, 518139, 3136, 0xfde719b6 +1, 518139, 3136, 0x07c519bb 0, 523980, 192000, 0xd5bc0e7e -1, 524539, 3128, 0x442f17ae +1, 524539, 3128, 0x15b916c8 0, 530370, 192000, 0xd5bc0e7e -1, 530922, 3128, 0x011af61f +1, 530922, 3128, 0x0ed7f6fb 0, 536760, 192000, 0xd5bc0e7e -1, 537306, 3136, 0x4e3e3a6d +1, 537306, 3136, 0x54d6397b 0, 543150, 192000, 0xd5bc0e7e -1, 543706, 3128, 0xc11242b9 +1, 543706, 3128, 0x437242bb 0, 549540, 192000, 0xd5bc0e7e -1, 550090, 3128, 0x01415b59 +1, 550090, 3128, 0x38f05c4d 0, 555930, 192000, 0xd5bc0e7e -1, 556473, 3136, 0x302e0e55 +1, 556473, 3136, 0x5d000e59 0, 562320, 192000, 0xd5bc0e7e -1, 562873, 3128, 0x20522d04 +1, 562873, 3128, 0xdeab2d04 0, 568710, 192000, 0xd5bc0e7e -1, 569257, 3136, 0x316a697d +1, 569257, 3136, 0x77de6880 0, 575100, 192000, 0xd5bc0e7e -1, 575657, 3128, 0x6d75ee27 +1, 575657, 3128, 0xbc87ef25 0, 581490, 192000, 0xd5bc0e7e -1, 582041, 3128, 0xcb008ae8 +1, 582041, 3128, 0xc1638ade 0, 587880, 192000, 0xd5bc0e7e -1, 588424, 3136, 0xd2664b51 +1, 588424, 3136, 0xcfb64a5f 0, 594270, 192000, 0xd5bc0e7e -1, 594824, 3128, 0xdfcab728 +1, 594824, 3128, 0x90b1b826 0, 600660, 192000, 0xd5bc0e7e 1, 601208, 3136, 0x00000000 0, 607050, 192000, 0xd5bc0e7e diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/smjpeg mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/smjpeg --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/smjpeg 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/smjpeg 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,423 @@ +0, 0, 734, 0x5a042c2c +1, 0, 1024, 0x00000000 +1, 2090, 1024, 0x00000000 +1, 4180, 1024, 0xd89a448e +1, 6269, 1024, 0x695b369c +1, 8359, 1024, 0xc8ba5707 +0, 9990, 763, 0xb5893f2f +1, 10449, 1024, 0xdf241fc6 +1, 12539, 1024, 0x61cf4166 +1, 14629, 1024, 0x97cbc386 +1, 16718, 1024, 0x44899d04 +1, 18808, 1024, 0xa7cbaa62 +0, 19980, 3023, 0x0f3907d3 +1, 20898, 1024, 0xa7aea60c +1, 22988, 1024, 0xd7b18a89 +1, 25078, 1024, 0x268e81f6 +1, 27167, 1024, 0x9cf83a2f +1, 29257, 1024, 0x5559b508 +0, 29970, 4800, 0x22e6e18a +1, 31347, 1024, 0xe1b9e71c +1, 33437, 1024, 0xdcee733e +1, 35527, 1024, 0xe5918f60 +1, 37616, 1024, 0x29dbd209 +1, 39706, 1024, 0x9bcbcf16 +0, 39960, 6417, 0x427adde5 +1, 41796, 1024, 0x86f5f458 +1, 43886, 1024, 0xabcbda86 +1, 45976, 1024, 0xc51f77b9 +1, 48065, 1024, 0xf6b3a504 +0, 49950, 6776, 0x7a74c6ad +1, 50155, 1024, 0x1af3e40e +1, 52245, 1024, 0x3866b03b +1, 54335, 1024, 0xbc005403 +1, 56424, 1024, 0xe9dfcc51 +1, 58514, 1024, 0x83c837cb +0, 59940, 6808, 0x1f6eb7c3 +1, 60604, 1024, 0xfa649580 +1, 62694, 1024, 0x519452ea +1, 64784, 1024, 0xd4978774 +1, 66873, 1024, 0xe2a3b1cd +1, 68963, 1024, 0x9a9472ad +0, 69930, 6726, 0x452087e6 +1, 71053, 1024, 0xa12d4060 +1, 73143, 1024, 0x31fb0646 +1, 75233, 1024, 0xfc44343f +1, 77322, 1024, 0x0847751a +1, 79412, 1024, 0x227968a2 +0, 79920, 6829, 0xee82b109 +1, 81502, 1024, 0x7cce9f1c +1, 83592, 1024, 0xb8356713 +1, 85682, 1024, 0xb29f6e6f +1, 87771, 1024, 0x9e1430ab +1, 89861, 1024, 0x26d85423 +0, 89910, 7055, 0xf41f1108 +1, 91951, 1024, 0x6496547d +1, 94041, 1024, 0x316b1a86 +1, 96131, 1024, 0x3cd83afc +1, 98220, 1024, 0x993ff633 +0, 99990, 6977, 0xf8fe1ede +1, 100310, 1024, 0x0708d1a2 +1, 102400, 1024, 0xd7230db9 +1, 104490, 1024, 0xbb0779ca +1, 106580, 1024, 0xc6094e1b +1, 108669, 1024, 0x15a8b039 +0, 109980, 6942, 0x9ad105c6 +1, 110759, 1024, 0xd6dbe88c +1, 112849, 1024, 0x7e8d1140 +1, 114939, 1024, 0xef88e525 +1, 117029, 1024, 0x44e21149 +1, 119118, 1024, 0x65b0f5f4 +0, 119970, 6926, 0xe239dad6 +1, 121208, 1024, 0xb955f687 +1, 123298, 1024, 0xc85fba9c +1, 125388, 1024, 0xf59655ad +1, 127478, 1024, 0x6de80bf1 +1, 129567, 1024, 0x2dcf6e41 +0, 129960, 6966, 0x81dcfab1 +1, 131657, 1024, 0xd0ddcf8a +1, 133747, 1024, 0x00135c2d +1, 135837, 1024, 0x697f8efd +1, 137927, 1024, 0x7a9bada5 +0, 139950, 6896, 0x31e6cc02 +1, 140016, 1024, 0x0d22783c +1, 142106, 1024, 0x7726d07d +1, 144196, 1024, 0xa2f14f67 +1, 146286, 1024, 0x7f51060d +1, 148376, 1024, 0xc4ec6aea +0, 149940, 6889, 0x1cc1006e +1, 150465, 1024, 0x9bb37ca4 +1, 152555, 1024, 0x9b085577 +1, 154645, 1024, 0x8812f8af +1, 156735, 1024, 0x788f5221 +1, 158824, 1024, 0x3a2ce642 +0, 159930, 6933, 0xc303f87f +1, 160914, 1024, 0x72415692 +1, 163004, 1024, 0xe3dcc105 +1, 165094, 1024, 0xb26c0599 +1, 167184, 1024, 0x5c9e55eb +1, 169273, 1024, 0x8fe88707 +0, 169920, 7034, 0xb4970a20 +1, 171363, 1024, 0xc5d7beb6 +1, 173453, 1024, 0xe1d3a3b4 +1, 175543, 1024, 0x012da0c6 +1, 177633, 1024, 0x8d010922 +1, 179722, 1024, 0x3366eb0d +0, 179910, 6961, 0xf064095d +1, 181812, 1024, 0xc9381a27 +1, 183902, 1024, 0x0774f685 +1, 185992, 1024, 0xc5cae0a5 +1, 188082, 1024, 0xa6f4737c +0, 189990, 7089, 0x5ba350f9 +1, 190171, 1024, 0x8fb6d0d1 +1, 192261, 1024, 0x05f579c2 +1, 194351, 1024, 0x56905d99 +1, 196441, 1024, 0x002ee18d +1, 198531, 1024, 0xeb37ef51 +0, 199980, 7078, 0xa83f3e88 +1, 200620, 1024, 0x38025635 +1, 202710, 1024, 0x4fe643c8 +1, 204800, 1024, 0x11d66ab1 +1, 206890, 1024, 0xcc3051e9 +1, 208980, 1024, 0xcd93e854 +0, 209970, 7147, 0xcda66cfc +1, 211069, 1024, 0x38f1196d +1, 213159, 1024, 0x657a15fc +1, 215249, 1024, 0x669ce2a9 +1, 217339, 1024, 0x95862dda +1, 219429, 1024, 0x1726a7b2 +0, 219960, 7173, 0xb7455859 +1, 221518, 1024, 0xd6ece2a1 +1, 223608, 1024, 0x33ab9553 +1, 225698, 1024, 0xd50c73a6 +1, 227788, 1024, 0xfe25b63a +1, 229878, 1024, 0x7e2959e3 +0, 229950, 7213, 0x97b89994 +1, 231967, 1024, 0xa4c07b34 +1, 234057, 1024, 0xd6d8f15c +1, 236147, 1024, 0x1eccddd7 +1, 238237, 1024, 0x2b69f9cb +0, 239940, 7170, 0xca8b2948 +1, 240327, 1024, 0x667b775f +1, 242416, 1024, 0xad3b84e9 +1, 244506, 1024, 0x4f29fc67 +1, 246596, 1024, 0x8d611ab7 +1, 248686, 1024, 0x278966ea +0, 249930, 7174, 0xc7cc6bbb +1, 250776, 1024, 0xaf33812b +1, 252865, 1024, 0xa55f4265 +1, 254955, 1024, 0x023cb51c +1, 257045, 1024, 0x1d1f1005 +1, 259135, 1024, 0x874cccf7 +0, 259920, 7235, 0xc2e68d2b +1, 261224, 1024, 0xda705428 +1, 263314, 1024, 0x48d9b440 +1, 265404, 1024, 0xa14e0712 +1, 267494, 1024, 0x7efbad1f +1, 269584, 1024, 0xdb82c17f +0, 270000, 7261, 0x8204a423 +1, 271673, 1024, 0xcbe87613 +1, 273763, 1024, 0x3a63df1d +1, 275853, 1024, 0xd5636bba +1, 277943, 1024, 0x9397af23 +0, 279990, 7353, 0xacc7e7c0 +1, 280033, 1024, 0x32a07c98 +1, 282122, 1024, 0x202ca667 +1, 284212, 1024, 0xdf969011 +1, 286302, 1024, 0xc434d238 +1, 288392, 1024, 0xe9ad7562 +0, 289980, 7065, 0x45035c5c +1, 290482, 1024, 0xb51b6b50 +1, 292571, 1024, 0xe70aecd3 +1, 294661, 1024, 0x03c816b2 +1, 296751, 1024, 0x869fdf25 +1, 298841, 1024, 0xd40a0a62 +0, 299970, 7269, 0x72edbb76 +1, 300931, 1024, 0x5af7dd35 +1, 303020, 1024, 0x891ffc72 +1, 305110, 1024, 0x1ff68a08 +1, 307200, 1024, 0x5a7517a9 +1, 309290, 1024, 0x0f959f74 +0, 309960, 7220, 0xb926772f +1, 311380, 1024, 0xe92a12a2 +1, 313469, 1024, 0x38000e55 +1, 315559, 1024, 0x39fbdd70 +1, 317649, 1024, 0xca3d9184 +1, 319739, 1024, 0x66c8995b +0, 319950, 7326, 0x0a66c632 +1, 321829, 1024, 0xac25acea +1, 323918, 1024, 0x3cd1046c +1, 326008, 1024, 0x6a1df31c +1, 328098, 1024, 0x21ca10a1 +0, 329940, 7225, 0xe39076ab +1, 330188, 1024, 0x1aeccedc +1, 332278, 1024, 0xddea1335 +1, 334367, 1024, 0x19f5ca9f +1, 336457, 1024, 0x88e95e43 +1, 338547, 1024, 0x726284fe +0, 339930, 7265, 0xe0209036 +1, 340637, 1024, 0x6b85b40e +1, 342727, 1024, 0x111fee2a +1, 344816, 1024, 0x3656b588 +1, 346906, 1024, 0xa5a2b552 +1, 348996, 1024, 0x38fb2467 +0, 349920, 7337, 0x7a5dc093 +1, 351086, 1024, 0xaa919ccc +1, 353176, 1024, 0x15993dbc +1, 355265, 1024, 0xbe01a7b9 +1, 357355, 1024, 0xefe93c09 +1, 359445, 1024, 0x1bb566e5 +0, 360000, 7246, 0x519a7a3c +1, 361535, 1024, 0x15ce6237 +1, 363624, 1024, 0xa8552e66 +1, 365714, 1024, 0x9d80187e +1, 367804, 1024, 0x5df3fc30 +1, 369894, 1024, 0x1a312aa5 +0, 369990, 7266, 0x352c8078 +1, 371984, 1024, 0x6bb8e302 +1, 374073, 1024, 0xbd9684bb +1, 376163, 1024, 0x78b0b166 +1, 378253, 1024, 0xd9af5eae +0, 379980, 7323, 0xcaf69d7c +1, 380343, 1024, 0xdb90fe82 +1, 382433, 1024, 0x327614e9 +1, 384522, 1024, 0x1f19b7fe +1, 386612, 1024, 0x46c53f96 +1, 388702, 1024, 0x921b2189 +0, 389970, 7309, 0x98c1e6f7 +1, 390792, 1024, 0xa8fbc85a +1, 392882, 1024, 0xabfdaaae +1, 394971, 1024, 0x6acc7387 +1, 397061, 1024, 0x0d9c27b5 +1, 399151, 1024, 0xba4dd809 +0, 399960, 7121, 0x913d5bd6 +1, 401241, 1024, 0x2a2ad521 +1, 403331, 1024, 0x892de38a +1, 405420, 1024, 0xdc97a2eb +1, 407510, 1024, 0x4f614ca4 +1, 409600, 1024, 0x9c8a77ea +0, 409950, 7088, 0x56302362 +1, 411690, 1024, 0x2d30e646 +1, 413780, 1024, 0x74e800a7 +1, 415869, 1024, 0x1e01fb02 +1, 417959, 1024, 0x4ed2c1d8 +0, 419940, 7104, 0xc0d14f78 +1, 420049, 1024, 0xf2fdbe63 +1, 422139, 1024, 0x8d6f63a1 +1, 424229, 1024, 0xded468d9 +1, 426318, 1024, 0xccad839e +1, 428408, 1024, 0xdde7c082 +0, 429930, 7169, 0xd03c825b +1, 430498, 1024, 0x548613c5 +1, 432588, 1024, 0x383909bd +1, 434678, 1024, 0xfd37627b +1, 436767, 1024, 0x6d95a481 +1, 438857, 1024, 0x56aa87fa +0, 439920, 7038, 0x1ecc201d +1, 440947, 1024, 0x7b67258c +1, 443037, 1024, 0x7dd99a92 +1, 445127, 1024, 0x4a66d102 +1, 447216, 1024, 0x7b3fce51 +1, 449306, 1024, 0xbbd968aa +0, 450000, 7015, 0x83c94454 +1, 451396, 1024, 0x8283ec36 +1, 453486, 1024, 0x3c96493d +1, 455576, 1024, 0xfa4f8cf8 +1, 457665, 1024, 0xe2cf872d +1, 459755, 1024, 0x0a9e7aa6 +0, 459990, 6983, 0x9e51f54d +1, 461845, 1024, 0x6e7a0550 +1, 463935, 1024, 0x3acfea2f +1, 466024, 1024, 0x7111d0fa +1, 468114, 1024, 0xe9a1eca9 +0, 469980, 7088, 0x70d33de1 +1, 470204, 1024, 0x24da6c46 +1, 472294, 1024, 0x117cff37 +1, 474384, 1024, 0x0f27cab6 +1, 476473, 1024, 0x69b6b4e6 +1, 478563, 1024, 0x1e6cc841 +0, 479970, 7096, 0x4d0f81b5 +1, 480653, 1024, 0xb01e2365 +1, 482743, 1024, 0x14e200d3 +1, 484833, 1024, 0xd1184c98 +1, 486922, 1024, 0xef9140e9 +1, 489012, 1024, 0x4cbb645e +0, 489960, 7106, 0xd1a83ddc +1, 491102, 1024, 0xe7fe2f06 +1, 493192, 1024, 0xf8c45028 +1, 495282, 1024, 0x561358f4 +1, 497371, 1024, 0xd0129b77 +1, 499461, 1024, 0xcc636e88 +0, 499950, 7219, 0x20f47fe4 +1, 501551, 1024, 0xe9406321 +1, 503641, 1024, 0x9f16a041 +1, 505731, 1024, 0x468bf409 +1, 507820, 1024, 0x3df70f7b +1, 509910, 1024, 0xa880b11b +0, 509940, 7184, 0x45dc6a0e +1, 512000, 1024, 0x3286c489 +1, 514090, 1024, 0x39fe9ebc +1, 516180, 1024, 0xc533d83b +1, 518269, 1024, 0x153b195d +0, 519930, 7222, 0x488c6499 +1, 520359, 1024, 0xd84786a1 +1, 522449, 1024, 0xdc295aaa +1, 524539, 1024, 0xfb764d8c +1, 526629, 1024, 0xeebc9db9 +1, 528718, 1024, 0x7ba9403e +0, 529920, 7254, 0xbd097ba7 +1, 530808, 1024, 0x4e5571ec +1, 532898, 1024, 0xd965fad4 +1, 534988, 1024, 0x87e259f2 +1, 537078, 1024, 0xae7e533b +1, 539167, 1024, 0x313cf4d6 +0, 540000, 7189, 0x46e06d43 +1, 541257, 1024, 0xe1844c90 +1, 543347, 1024, 0xbb057b44 +1, 545437, 1024, 0xa5099687 +1, 547527, 1024, 0xbff10707 +1, 549616, 1024, 0x37c4ffc0 +0, 549990, 7283, 0x19dd7319 +1, 551706, 1024, 0xf9fb6caa +1, 553796, 1024, 0x3b6a3a1f +1, 555886, 1024, 0x83431edb +1, 557976, 1024, 0x1eb713cf +0, 559980, 7161, 0x23171d02 +1, 560065, 1024, 0xd7b07a6d +1, 562155, 1024, 0x81ae3391 +1, 564245, 1024, 0xf150130a +1, 566335, 1024, 0x09678eaa +1, 568424, 1024, 0xb94e06f1 +0, 569970, 6976, 0xcc610c26 +1, 570514, 1024, 0x67b1dbc9 +1, 572604, 1024, 0xd6edc235 +1, 574694, 1024, 0x34e4c499 +1, 576784, 1024, 0xeefd89c0 +1, 578873, 1024, 0x38afdaf1 +0, 579960, 7056, 0x6cd917b0 +1, 580963, 1024, 0x29a60d76 +1, 583053, 1024, 0xe28a4372 +1, 585143, 1024, 0x7089454d +1, 587233, 1024, 0x0c01bb7b +1, 589322, 1024, 0xbd776a72 +0, 589950, 6736, 0x02b78951 +1, 591412, 1024, 0x86776fd0 +1, 593502, 1024, 0xb37c88f7 +1, 595592, 1024, 0x5f90aaf8 +1, 597682, 1024, 0x203d4222 +1, 599771, 1024, 0x382692a6 +0, 599940, 6540, 0x767e0854 +1, 601861, 1024, 0xf37c95fd +1, 603951, 1024, 0x6c0b8877 +1, 606041, 1024, 0x2e54a8b6 +1, 608131, 1024, 0x7f266488 +0, 609930, 6170, 0xc84962fb +1, 610220, 1024, 0xfbf20f9a +1, 612310, 1024, 0xf2985cc0 +1, 614400, 1024, 0xc7075340 +1, 616490, 1024, 0xe4585695 +1, 618580, 1024, 0xbdffa380 +0, 619920, 6169, 0x27e06c03 +1, 620669, 1024, 0x2422a8a9 +1, 622759, 1024, 0x59cbd75f +1, 624849, 1024, 0x04ad1a8c +1, 626939, 1024, 0x33c09191 +1, 629029, 1024, 0x55efa6fd +0, 630000, 5864, 0xd14db83f +1, 631118, 1024, 0xf73d0e5d +1, 633208, 1024, 0x6141ebae +1, 635298, 1024, 0x7db17a68 +1, 637388, 1024, 0xa6c690b6 +1, 639478, 1024, 0xa6fd6725 +0, 639990, 5375, 0x4a21055d +1, 641567, 1024, 0x50a90b9b +1, 643657, 1024, 0xef990dc8 +1, 645747, 1024, 0x75adf6b5 +1, 647837, 1024, 0x61eac43e +1, 649927, 1024, 0x67797a19 +0, 649980, 5206, 0x95ead3cb +1, 652016, 1024, 0xf325277a +1, 654106, 1024, 0x18bf254a +1, 656196, 1024, 0x2ce6bee3 +1, 658286, 1024, 0x8d320860 +0, 659970, 5220, 0xcfdcc37e +1, 660376, 1024, 0xc979b6e8 +1, 662465, 1024, 0xdb644b41 +1, 664555, 1024, 0xe1b368ba +1, 666645, 1024, 0xacc53d15 +1, 668735, 1024, 0x42ea8c18 +0, 669960, 4946, 0x2d864a77 +1, 670824, 1024, 0xe52c99a4 +1, 672914, 1024, 0xd7db54a6 +1, 675004, 1024, 0x7f27a7e3 +1, 677094, 1024, 0xf7ffeaa9 +1, 679184, 1024, 0x792b6088 +0, 679950, 4390, 0x2ab9f462 +1, 681273, 1024, 0x61d99724 +1, 683363, 1024, 0x5213720e +1, 685453, 1024, 0xac09dd30 +1, 687543, 1024, 0x960bf6bb +1, 689633, 1024, 0xc90168e1 +0, 689940, 4051, 0x1d09592e +1, 691722, 1024, 0x43b45768 +1, 693812, 1024, 0x935d60a1 +1, 695902, 1024, 0x9a342ef2 +1, 697992, 1024, 0xc894709f +0, 699930, 3680, 0x39bd6a12 +1, 700082, 1024, 0x59b43b07 +1, 702171, 1024, 0x36a1a98d +1, 704261, 1024, 0x9e1a121c +1, 706351, 1024, 0x02208b78 +1, 708441, 1024, 0xd1d7b274 +0, 709920, 2910, 0x6337ece9 +1, 710531, 1024, 0xdacd5096 +1, 712620, 1024, 0x51b71ead +1, 714710, 1024, 0xd009a7ca +1, 716800, 1024, 0xb6d5a938 +1, 718890, 1024, 0xf3d45e47 +0, 720000, 2153, 0xf4e3bc17 +1, 720980, 1024, 0xea8e04fc +1, 723069, 1024, 0x0b928bd8 +1, 725159, 1024, 0x0f02caec +1, 727249, 1024, 0xe2b137a8 +1, 729339, 1024, 0xd5f94892 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/tiertex-seq mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/tiertex-seq --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/tiertex-seq 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/tiertex-seq 2012-01-11 00:34:30.000000000 +0000 @@ -2,145 +2,94 @@ 1, 0, 1764, 0x00000000 0, 3600, 98304, 0xb20c19d0 1, 3600, 1764, 0x80a253d9 -0, 7200, 98304, 0xb20c19d0 +0, 7200, 98304, 0x6b8538c0 1, 7200, 1764, 0x95a16721 -0, 10800, 98304, 0xb20c19d0 +0, 10800, 98304, 0x172207e3 1, 10800, 1764, 0x0f0d4cb6 -0, 14400, 98304, 0x6b8538c0 +0, 14400, 98304, 0x63fb7dc1 1, 14400, 1764, 0x75026779 -0, 18000, 98304, 0x6b8538c0 +0, 18000, 98304, 0x37cf1601 1, 18000, 1764, 0xb4356e37 -0, 21600, 98304, 0x6b8538c0 +0, 21600, 98304, 0x82941990 1, 21600, 1764, 0xfafa64cb -0, 25200, 98304, 0x172207e3 +0, 25200, 98304, 0xe0a5309e 1, 25200, 1764, 0xe8fd7970 -0, 28800, 98304, 0x172207e3 +0, 28800, 98304, 0x164cb67d 1, 28800, 1764, 0x666879b7 -0, 32400, 98304, 0x172207e3 +0, 32400, 98304, 0xed2189f8 1, 32400, 1764, 0xf2cd7770 -0, 36000, 98304, 0x172207e3 +0, 36000, 98304, 0x7215e529 1, 36000, 1764, 0x54317a1c -0, 39600, 98304, 0x63fb7dc1 +0, 39600, 98304, 0x170c783b 1, 39600, 1764, 0x9c396930 -0, 43200, 98304, 0x63fb7dc1 +0, 43200, 98304, 0xf6bd74c7 1, 43200, 1764, 0x87115ec4 -0, 46800, 98304, 0x63fb7dc1 +0, 46800, 98304, 0x1efd38c4 1, 46800, 1764, 0x0c9b69b6 -0, 50400, 98304, 0x37cf1601 +0, 50400, 98304, 0x29c26bba 1, 50400, 1764, 0x8c3a758a -0, 54000, 98304, 0x37cf1601 +0, 54000, 98304, 0x880a6313 1, 54000, 1764, 0x605d776a -0, 57600, 98304, 0x37cf1601 +0, 57600, 98304, 0x73f5bb00 1, 57600, 1764, 0x0556852d -0, 61200, 98304, 0x37cf1601 +0, 61200, 98304, 0xc85b19ec 1, 61200, 1764, 0x7d4363f8 -0, 64800, 98304, 0x82941990 +0, 64800, 98304, 0x00000000 1, 64800, 1764, 0xc5cd75d0 -0, 68400, 98304, 0x82941990 +0, 68400, 98304, 0x00000000 1, 68400, 1764, 0x3ff3646d -0, 72000, 98304, 0x82941990 +0, 72000, 98304, 0x00000000 1, 72000, 1764, 0x10136d25 -0, 75600, 98304, 0x82941990 1, 75600, 1764, 0xeb1a6cd0 -0, 79200, 98304, 0xe0a5309e 1, 79200, 1764, 0xef937ed1 -0, 82800, 98304, 0xe0a5309e 1, 82800, 1764, 0x2d2b6f79 -0, 86400, 98304, 0xe0a5309e 1, 86400, 1764, 0x6f457231 -0, 90000, 98304, 0x164cb67d 1, 90000, 1764, 0x56267c9d -0, 93600, 98304, 0x164cb67d 1, 93600, 1764, 0xd49e79c8 -0, 97200, 98304, 0x164cb67d 1, 97200, 1764, 0xc726703d -0, 100800, 98304, 0x164cb67d 1, 100800, 1764, 0x2abf8074 -0, 104400, 98304, 0xed2189f8 1, 104400, 1764, 0xb50c556d -0, 108000, 98304, 0xed2189f8 1, 108000, 1764, 0xc1f2523c -0, 111600, 98304, 0xed2189f8 1, 111600, 1764, 0x850a6f93 -0, 115200, 98304, 0x7215e529 1, 115200, 1764, 0x8da76c31 -0, 118800, 98304, 0x7215e529 1, 118800, 1764, 0xfcccdf13 -0, 122400, 98304, 0x7215e529 1, 122400, 1764, 0x00000000 -0, 126000, 98304, 0x7215e529 1, 126000, 1764, 0x00000000 -0, 129600, 98304, 0x170c783b 1, 129600, 1764, 0x00000000 -0, 133200, 98304, 0x170c783b 1, 133200, 1764, 0x00000000 -0, 136800, 98304, 0x170c783b 1, 136800, 1764, 0x00000000 -0, 140400, 98304, 0xf6bd74c7 1, 140400, 1764, 0x00000000 -0, 144000, 98304, 0xf6bd74c7 1, 144000, 1764, 0x00000000 -0, 147600, 98304, 0xf6bd74c7 1, 147600, 1764, 0x00000000 -0, 151200, 98304, 0xf6bd74c7 1, 151200, 1764, 0x00000000 -0, 154800, 98304, 0x1efd38c4 1, 154800, 1764, 0x00000000 -0, 158400, 98304, 0x1efd38c4 1, 158400, 1764, 0x00000000 -0, 162000, 98304, 0x1efd38c4 1, 162000, 1764, 0x00000000 -0, 165600, 98304, 0x1efd38c4 1, 165600, 1764, 0x00000000 -0, 169200, 98304, 0x29c26bba 1, 169200, 1764, 0x00000000 -0, 172800, 98304, 0x29c26bba 1, 172800, 1764, 0x00000000 -0, 176400, 98304, 0x29c26bba 1, 176400, 1764, 0x00000000 -0, 180000, 98304, 0x880a6313 1, 180000, 1764, 0x00000000 -0, 183600, 98304, 0x880a6313 1, 183600, 1764, 0x00000000 -0, 187200, 98304, 0x880a6313 1, 187200, 1764, 0x00000000 -0, 190800, 98304, 0x880a6313 1, 190800, 1764, 0x00000000 -0, 194400, 98304, 0x73f5bb00 1, 194400, 1764, 0x00000000 -0, 198000, 98304, 0x73f5bb00 1, 198000, 1764, 0x00000000 -0, 201600, 98304, 0x73f5bb00 1, 201600, 1764, 0x00000000 -0, 205200, 98304, 0xc85b19ec 1, 205200, 1764, 0x00000000 -0, 208800, 98304, 0xc85b19ec 1, 208800, 1764, 0x00000000 -0, 212400, 98304, 0xc85b19ec 1, 212400, 1764, 0x00000000 -0, 216000, 98304, 0xc85b19ec 1, 216000, 1764, 0x00000000 -0, 219600, 98304, 0x00000000 1, 219600, 1764, 0x00000000 -0, 223200, 98304, 0x00000000 1, 223200, 1764, 0x00000000 -0, 226800, 98304, 0x00000000 1, 226800, 1764, 0x00000000 -0, 230400, 98304, 0x00000000 1, 230400, 1764, 0x00000000 -0, 234000, 98304, 0x00000000 1, 234000, 1764, 0x00000000 -0, 237600, 98304, 0x00000000 1, 237600, 1764, 0x00000000 -0, 241200, 98304, 0x00000000 1, 241200, 1764, 0x00000000 -0, 244800, 98304, 0x00000000 1, 244800, 1764, 0x00000000 -0, 248400, 98304, 0x00000000 1, 248400, 1764, 0x00000000 -0, 252000, 98304, 0x00000000 1, 252000, 1764, 0x00000000 -0, 255600, 98304, 0x00000000 1, 255600, 1764, 0x00000000 1, 259200, 1764, 0x00000000 1, 262800, 1764, 0x00000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/truemotion1-15 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/truemotion1-15 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/truemotion1-15 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/truemotion1-15 2012-01-11 00:34:30.000000000 +0000 @@ -1,218 +1,218 @@ 0, 0, 161280, 0x7041748d -1, 0, 10832, 0xe1a811fa -1, 5527, 10832, 0xb47841f9 +1, 0, 10836, 0x2a531236 +1, 5529, 10836, 0xc58f45af 0, 6000, 161280, 0x3cc4dfb5 -1, 11053, 10832, 0x839eedf1 +1, 11057, 10836, 0x436cf135 0, 12000, 161280, 0xca3af22d -1, 16580, 10832, 0xb48b1f60 +1, 16586, 10836, 0x3a6022cc 0, 18000, 161280, 0x23ad1d85 -1, 22106, 10832, 0x743936c0 +1, 22114, 10836, 0x57e83a4a 0, 24000, 161280, 0x9c9cf364 -1, 27633, 10832, 0xe1f039fb +1, 27643, 10836, 0xca4b3a1b 0, 30000, 161280, 0x1551d6a8 -1, 33159, 10832, 0xef00751a +1, 33171, 10836, 0xc3da7536 0, 36000, 161280, 0xc39f6b95 -1, 38686, 10832, 0x401ed099 +1, 38700, 10836, 0x8c57d47b 0, 42000, 161280, 0x3b036dcc -1, 44212, 10832, 0x432a53bd +1, 44229, 10836, 0x9a79572b 0, 48000, 161280, 0xa6fac1db -1, 49739, 10832, 0xc4276bfd +1, 49757, 10836, 0x7dbd6fd3 0, 54000, 161280, 0x67656b62 -1, 55265, 10832, 0x51f0fa8c +1, 55286, 10836, 0x4454fdde 0, 60000, 161280, 0xb41f47d1 -1, 60792, 10832, 0xcebae622 +1, 60814, 10836, 0x68aae686 0, 66000, 161280, 0xc207249e -1, 66318, 10832, 0xe9f6dc1f -1, 71845, 10832, 0xda087fee +1, 66343, 10836, 0x61f2df35 +1, 71871, 10836, 0xe36883c6 0, 72000, 161280, 0xbee8f843 -1, 77371, 10832, 0x67a621bb +1, 77400, 10836, 0xefa62217 0, 78000, 161280, 0x092acf46 -1, 82898, 10832, 0xd7be207f +1, 82929, 10836, 0x63b92479 0, 84000, 161280, 0x8d9e2680 -1, 88424, 10832, 0x19d32507 +1, 88457, 10836, 0xaf452579 0, 90000, 161280, 0x8becc20c -1, 93951, 10832, 0xe1a3fbfa +1, 93986, 10836, 0xdbb10001 0, 96000, 161280, 0x655e444e -1, 99478, 10832, 0xd10df779 +1, 99514, 10836, 0xafb7f7a7 0, 102000, 161280, 0x5c112da0 -1, 105004, 10832, 0x4428e1a7 +1, 105043, 10836, 0xd4b1e591 0, 108000, 161280, 0x232fa9eb -1, 110531, 10832, 0x7ea9b33d +1, 110571, 10836, 0x4d44b3bb 0, 114000, 161280, 0x9721745d -1, 116057, 10832, 0x6852a5a5 +1, 116100, 10836, 0xff2ea5b3 0, 120000, 161280, 0x92f1d880 -1, 121584, 10832, 0xfeb78863 +1, 121629, 10836, 0x214e88ad 0, 126000, 161280, 0x16233978 -1, 127110, 10832, 0xf157f928 +1, 127157, 10836, 0xde8bfc9a 0, 132000, 161280, 0x19a27e69 -1, 132637, 10832, 0x86414b3e +1, 132686, 10836, 0xb3cc4b6a 0, 138000, 161280, 0x7b6ad73a -1, 138163, 10832, 0x2e28cdf6 -1, 143690, 10832, 0x00212e44 +1, 138214, 10836, 0x670bce40 +1, 143743, 10836, 0xc17d31b2 0, 144000, 161280, 0xa7a674aa -1, 149216, 10832, 0x2d7f9378 +1, 149271, 10836, 0x7bcb9392 0, 150000, 161280, 0x4e434abb -1, 154743, 10832, 0x84cb25d7 +1, 154800, 10836, 0x230e28c9 0, 156000, 161280, 0xb96eea14 -1, 160269, 10832, 0x3aca41fa +1, 160329, 10836, 0x42df4204 0, 162000, 161280, 0x1350188c -1, 165796, 10832, 0x27ad34b9 +1, 165857, 10836, 0xfa9134b9 0, 168000, 161280, 0x79c6f305 -1, 171322, 10832, 0xe665144a +1, 171386, 10836, 0x418c1844 0, 174000, 161280, 0xa9c7782d -1, 176849, 10832, 0xf9546626 +1, 176914, 10836, 0x93ba66b6 0, 180000, 161280, 0x40a4f456 -1, 182376, 10832, 0xe71c4f22 +1, 182443, 10836, 0x264a4ffa 0, 186000, 161280, 0xaf291ed6 -1, 187902, 10832, 0x5e61869c +1, 187971, 10836, 0x82c78a8e 0, 192000, 161280, 0xab29b4e1 -1, 193429, 10832, 0x571d2c10 +1, 193500, 10836, 0x10d22fdc 0, 198000, 161280, 0xbfcd2712 -1, 198955, 10832, 0xf0e08cd5 +1, 199029, 10836, 0x2d25906b 0, 204000, 161280, 0xff22a0d7 -1, 204482, 10832, 0x66650e49 +1, 204557, 10836, 0xa8a111fb 0, 210000, 161280, 0xb0ae88a9 -1, 210008, 10832, 0x4024deaf -1, 215535, 10832, 0xda7bdb14 +1, 210086, 10836, 0xbd95df87 +1, 215614, 10836, 0x500ddec0 0, 216000, 161280, 0x811d1259 -1, 221061, 10832, 0xc27a342f +1, 221143, 10836, 0x95d9350b 0, 222000, 161280, 0x593c39a1 -1, 226588, 10832, 0x574fe679 +1, 226671, 10836, 0xfa54ea1f 0, 228000, 161280, 0x5a5a97f8 -1, 232114, 10832, 0x37db464e +1, 232200, 10836, 0x51b2467e 0, 234000, 161280, 0xa5639ecf -1, 237641, 10832, 0xb1fa2a83 +1, 237729, 10836, 0x5d772af9 0, 240000, 161280, 0x543920c6 -1, 243167, 10832, 0x3d98d9b7 +1, 243257, 10836, 0xae25dd8d 0, 246000, 161280, 0xb41689ee -1, 248694, 10832, 0xb7c908e2 +1, 248786, 10836, 0xe4bd0cb0 0, 252000, 161280, 0xc0ad83de -1, 254220, 10832, 0x9f7e44d8 +1, 254314, 10836, 0xb33544f0 0, 258000, 161280, 0x9e9e7456 -1, 259747, 10832, 0xae9b8774 +1, 259843, 10836, 0xd5658b12 0, 264000, 161280, 0x777ccbfe -1, 265273, 10832, 0x36916e3f +1, 265371, 10836, 0xeff66e5d 0, 270000, 161280, 0x9c2df916 -1, 270800, 10832, 0xd785f5ef +1, 270900, 10836, 0xb1fff6c5 0, 276000, 161280, 0xe0c13b35 -1, 276327, 10832, 0x2a3a5673 -1, 281853, 10832, 0x7320e379 +1, 276429, 10836, 0x84db56b5 +1, 281957, 10836, 0x0230e3c9 0, 282000, 161280, 0x39bfa5a5 -1, 287380, 10832, 0xec787be5 +1, 287486, 10836, 0xe58a7faf 0, 288000, 161280, 0x35dfb264 -1, 292906, 10832, 0xd0d13aa0 +1, 293014, 10836, 0xc4003e2a 0, 294000, 161280, 0x43018613 -1, 298433, 10832, 0x34dfcb17 +1, 298543, 10836, 0x6360cbbf 0, 300000, 161280, 0x43584b8a -1, 303959, 10832, 0x1a9c29f1 +1, 304071, 10836, 0xc29c2a05 0, 306000, 161280, 0xa5cd230a -1, 309486, 10832, 0x3e73dcc1 +1, 309600, 10836, 0xb294dd11 0, 312000, 161280, 0x6fe2cfb3 -1, 315012, 10832, 0x7855b053 +1, 315129, 10836, 0x4388b43b 0, 318000, 161280, 0x88a7c0db -1, 320539, 10832, 0x5588df8f +1, 320657, 10836, 0xdd7be367 0, 324000, 161280, 0x476f1cd2 -1, 326065, 10832, 0x6f621299 +1, 326186, 10836, 0xb9f612a9 0, 330000, 161280, 0x96401d49 -1, 331592, 10832, 0xce7f39c2 +1, 331714, 10836, 0xb64a39fe 0, 336000, 161280, 0x7d932919 -1, 337118, 10832, 0xd88e6552 +1, 337243, 10836, 0x6eba6594 0, 342000, 161280, 0x06465481 -1, 342645, 10832, 0xddc63597 +1, 342771, 10836, 0xb4af35c1 0, 348000, 161280, 0x39631520 -1, 348171, 10832, 0xe3071865 -1, 353698, 10832, 0x2a44a123 +1, 348300, 10836, 0x4e581c49 +1, 353829, 10836, 0xb062a19f 0, 354000, 161280, 0xc3fff780 -1, 359224, 10832, 0x08d85d45 +1, 359357, 10836, 0x87cd6135 0, 360000, 161280, 0xa81faf28 -1, 364751, 10832, 0x4dc5f83a +1, 364886, 10836, 0x37bffbd6 0, 366000, 161280, 0x7a311f4f -1, 370278, 10832, 0x89497812 +1, 370414, 10836, 0x6c797900 0, 372000, 161280, 0x52f9b931 -1, 375804, 10832, 0x9ee1db54 +1, 375943, 10836, 0x1615df36 0, 378000, 161280, 0x938cf016 -1, 381331, 10832, 0x5277d611 +1, 381471, 10836, 0xb472d9e9 0, 384000, 161280, 0xf8f6e19c -1, 386857, 10832, 0x570a619c +1, 387000, 10836, 0xdfff626e 0, 390000, 161280, 0xca90561b -1, 392384, 10832, 0xa217d70f +1, 392529, 10836, 0xffa6d771 0, 396000, 161280, 0x8594d06b -1, 397910, 10832, 0x6f0ecbf4 +1, 398057, 10836, 0xa7f3cf96 0, 402000, 161280, 0xea32bf3b -1, 403437, 10832, 0x2704b114 +1, 403586, 10836, 0xf556b50a 0, 408000, 161280, 0x4646111a -1, 408963, 10832, 0xf24e679f +1, 409114, 10836, 0x99b86b39 0, 414000, 161280, 0xee891162 -1, 414490, 10832, 0x05572099 +1, 414643, 10836, 0x886920d3 0, 420000, 161280, 0xcfc32082 -1, 420016, 10832, 0x33942d0c -1, 425543, 10832, 0xa77ea674 +1, 420171, 10836, 0xefb0305a +1, 425700, 10836, 0x4ab7aa32 0, 426000, 161280, 0x863c281a -1, 431069, 10832, 0xeba663bc +1, 431229, 10836, 0x7f106530 0, 432000, 161280, 0x01b591aa -1, 436596, 10832, 0x1338524a +1, 436757, 10836, 0x6461559a 0, 438000, 161280, 0x211fbc62 -1, 442122, 10832, 0x6182b0b3 +1, 442286, 10836, 0x25e3b12b 0, 444000, 161280, 0xae2bafe2 -1, 447649, 10832, 0xa410a364 +1, 447814, 10836, 0x32cfa3ba 0, 450000, 161280, 0xcfe46dca -1, 453176, 10832, 0x2f4374b0 +1, 453343, 10836, 0x0bff78a4 0, 456000, 161280, 0xcf8fe8a3 -1, 458702, 10832, 0xf41f3a07 +1, 458871, 10836, 0xe4323d53 0, 462000, 161280, 0x3f8474eb -1, 464229, 10832, 0x2b1c50c6 +1, 464400, 10836, 0x70b35196 0, 468000, 161280, 0x06da345a -1, 469755, 10832, 0x3692ac89 +1, 469929, 10836, 0xf2b8b07f 0, 474000, 161280, 0xbd4d3280 -1, 475282, 10832, 0x5d6bc87e +1, 475457, 10836, 0x826cc972 0, 480000, 161280, 0xb5e70fea -1, 480808, 10832, 0x1b1cda0c +1, 480986, 10836, 0x8a0fdce8 0, 486000, 161280, 0x0c99c804 -1, 486335, 10832, 0x11eaa15f -1, 491861, 10832, 0x73c7d7ef +1, 486514, 10836, 0xa072a503 0, 492000, 161280, 0x19841ed4 -1, 497388, 10832, 0x65d7e3be +1, 492043, 10836, 0xd698d8e7 +1, 497571, 10836, 0xfe80e794 0, 498000, 161280, 0xf81dea50 -1, 502914, 10832, 0xb9c00688 +1, 503100, 10836, 0xdd580a5a 0, 504000, 161280, 0x7777d81c -1, 508441, 10832, 0x0b98c125 +1, 508629, 10836, 0x121bc1bb 0, 510000, 161280, 0x0497cfd8 -1, 513967, 10832, 0x331ed413 +1, 514157, 10836, 0x8cebd7d9 0, 516000, 161280, 0x50b6eb64 -1, 519494, 10832, 0x9b68f485 +1, 519686, 10836, 0x6eaef4d7 0, 522000, 161280, 0x5071fc07 -1, 525020, 10832, 0x1b865c55 +1, 525214, 10836, 0x8f0b5d0b 0, 528000, 161280, 0xbb7527fb -1, 530547, 10832, 0x68cef565 +1, 530743, 10836, 0x40ccf61f 0, 534000, 161280, 0x13054f1f -1, 536073, 10832, 0x3a605f15 +1, 536271, 10836, 0xb6db5f1d 0, 540000, 161280, 0x4b78fb27 -1, 541600, 10832, 0xd72ff22e +1, 541800, 10836, 0xa089f250 0, 546000, 161280, 0xf504968f -1, 547127, 10832, 0x1c672b67 +1, 547329, 10836, 0xd3512f2b 0, 552000, 161280, 0x555b10b7 -1, 552653, 10832, 0xfd1a7e7e +1, 552857, 10836, 0xfa127f74 0, 558000, 161280, 0xcc0dde40 -1, 558180, 10832, 0x9bf20ead -1, 563706, 10832, 0x00000000 +1, 558386, 10836, 0xd6a60ead +1, 563914, 10836, 0x00000000 0, 564000, 161280, 0xcc0dde40 -1, 569233, 10832, 0x00000000 +1, 569443, 10836, 0x00000000 0, 570000, 161280, 0x367f60c8 -1, 574759, 10832, 0x00000000 +1, 574971, 10836, 0x00000000 0, 576000, 161280, 0x367f60c8 -1, 580286, 10832, 0x00000000 +1, 580500, 10836, 0x00000000 0, 582000, 161280, 0x367f60c8 -1, 585812, 10832, 0x00000000 +1, 586029, 10836, 0x00000000 0, 588000, 161280, 0x367f60c8 -1, 591339, 10832, 0x00000000 +1, 591557, 10836, 0x00000000 0, 594000, 161280, 0x367f60c8 -1, 596865, 10832, 0x00000000 +1, 597086, 10836, 0x00000000 0, 600000, 161280, 0x367f60c8 -1, 602392, 10832, 0x00000000 +1, 602614, 10836, 0x00000000 0, 606000, 161280, 0x367f60c8 -1, 607918, 10832, 0x00000000 +1, 608143, 10836, 0x00000000 0, 612000, 161280, 0x367f60c8 -1, 613445, 10832, 0x00000000 +1, 613671, 10836, 0x00000000 0, 618000, 161280, 0x367f60c8 -1, 618971, 10832, 0x00000000 +1, 619200, 10836, 0x00000000 0, 624000, 161280, 0x367f60c8 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/truemotion1-24 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/truemotion1-24 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/truemotion1-24 2011-04-13 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/truemotion1-24 2012-01-11 00:34:30.000000000 +0000 @@ -1,43 +1,43 @@ 0, 0, 69120, 0x68beb30f -1, 0, 10832, 0x1597b4c8 -1, 5527, 10832, 0xf9479f8b +1, 0, 10836, 0xedecb6a7 +1, 5529, 10836, 0x8098a323 0, 6000, 69120, 0x3976f5cf -1, 11053, 10832, 0x8db50e74 +1, 11057, 10836, 0xcfa1112e 0, 12000, 69120, 0xf815bc3c -1, 16580, 10832, 0x2b33ecbb +1, 16586, 10836, 0xe241ede4 0, 18000, 69120, 0xa7cc0ae6 -1, 22106, 10832, 0x8d0f537b +1, 22114, 10836, 0xddf254bb 0, 24000, 69120, 0xd85ac282 -1, 27633, 10832, 0x922081c7 +1, 27643, 10836, 0xa16c8507 0, 30000, 69120, 0xf7fd7edb -1, 33159, 10832, 0x40291f19 +1, 33171, 10836, 0xbe211f93 0, 36000, 69120, 0x433bb6f6 -1, 38686, 10832, 0x88f5271a +1, 38700, 10836, 0x26c7283d 0, 42000, 69120, 0xdbac8bee -1, 44212, 10832, 0x55c6bbe5 +1, 44229, 10836, 0x4d18be56 0, 48000, 69120, 0x88e2a799 -1, 49739, 10832, 0x9b51ae82 +1, 49757, 10836, 0x57b9af6f 0, 54000, 69120, 0x49617b26 -1, 55265, 10832, 0xcdf2409b +1, 55286, 10836, 0xd5864280 0, 60000, 69120, 0xeb44ca01 -1, 60792, 10832, 0x0933b1a4 +1, 60814, 10836, 0xd582b451 0, 66000, 69120, 0x6fea37e8 -1, 66318, 10832, 0x24b77006 -1, 71845, 10832, 0xf612fa8a +1, 66343, 10836, 0xec13731d +1, 71871, 10836, 0xe3d4fbb8 0, 72000, 69120, 0xf55d74c7 -1, 77371, 10832, 0x99884b06 +1, 77400, 10836, 0xcbb54d18 0, 78000, 69120, 0xb5082ca7 -1, 82898, 10832, 0x3c746fbe +1, 82929, 10836, 0xff7e7133 0, 84000, 69120, 0x5876d758 -1, 88424, 10832, 0x05f3b08a -1, 93951, 10832, 0xa6560483 -1, 99478, 10832, 0xd98a8e19 -1, 105004, 10832, 0xf98a0b2e -1, 110531, 10832, 0xb1039582 -1, 116057, 10832, 0x85dd5c3f -1, 121584, 10832, 0x19fc801a -1, 127110, 10832, 0x95805089 -1, 132637, 10832, 0x576fdec3 -1, 138163, 10832, 0x704a0905 -1, 143690, 10832, 0xf87ce1fa -1, 149216, 10832, 0xfc0076b9 +1, 88457, 10836, 0xcc28b1a7 +1, 93986, 10836, 0xbf9e07a5 +1, 99514, 10836, 0x16408f38 +1, 105043, 10836, 0x2b000c9f +1, 110571, 10836, 0x0ccd9811 +1, 116100, 10836, 0xf9575d48 +1, 121629, 10836, 0x1ee68190 +1, 127157, 10836, 0xde435373 +1, 132686, 10836, 0xd83be17a +1, 138214, 10836, 0x9a7f0bbe +1, 143743, 10836, 0x8709e4d3 +1, 149271, 10836, 0xde1879cb diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/tscc-32bit mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/tscc-32bit --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/tscc-32bit 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/tscc-32bit 2012-01-11 00:34:30.000000000 +0000 @@ -9,151 +9,148 @@ 0, 48000, 2359296, 0xe990f855 0, 54000, 2359296, 0x3ec2c64e 0, 60000, 2359296, 0xda3ba3cf -0, 66000, 2359296, 0xda3ba3cf -0, 72000, 2359296, 0xda3ba3cf -0, 78000, 2359296, 0x60a070fd -0, 84000, 2359296, 0x42e5fedc -0, 90000, 2359296, 0x42e5fedc +0, 66000, 2359296, 0x60a070fd +0, 72000, 2359296, 0x42e5fedc +0, 78000, 2359296, 0x42e5fedc +0, 84000, 2359296, 0x699cf990 +0, 90000, 2359296, 0x699cf990 0, 96000, 2359296, 0x699cf990 0, 102000, 2359296, 0x699cf990 0, 108000, 2359296, 0x699cf990 0, 114000, 2359296, 0x699cf990 0, 120000, 2359296, 0x699cf990 -0, 126000, 2359296, 0x699cf990 -0, 132000, 2359296, 0x699cf990 +0, 126000, 2359296, 0x1524160c +0, 132000, 2359296, 0x1524160c 0, 138000, 2359296, 0x1524160c 0, 144000, 2359296, 0x1524160c 0, 150000, 2359296, 0x1524160c 0, 156000, 2359296, 0x1524160c 0, 162000, 2359296, 0x1524160c -0, 168000, 2359296, 0x1524160c -0, 174000, 2359296, 0x1524160c +0, 168000, 2359296, 0x33df0c8c +0, 174000, 2359296, 0x33df0c8c 0, 180000, 2359296, 0x33df0c8c 0, 186000, 2359296, 0x33df0c8c 0, 192000, 2359296, 0x33df0c8c 0, 198000, 2359296, 0x33df0c8c 0, 204000, 2359296, 0x33df0c8c -0, 210000, 2359296, 0x33df0c8c -0, 216000, 2359296, 0x33df0c8c +0, 210000, 2359296, 0xfe3d29f8 +0, 216000, 2359296, 0xfe3d29f8 0, 222000, 2359296, 0xfe3d29f8 0, 228000, 2359296, 0xfe3d29f8 0, 234000, 2359296, 0xfe3d29f8 0, 240000, 2359296, 0xfe3d29f8 0, 246000, 2359296, 0xfe3d29f8 -0, 252000, 2359296, 0xfe3d29f8 -0, 258000, 2359296, 0xfe3d29f8 +0, 252000, 2359296, 0x1b9d197f +0, 258000, 2359296, 0x1b9d197f 0, 264000, 2359296, 0x1b9d197f 0, 270000, 2359296, 0x1b9d197f 0, 276000, 2359296, 0x1b9d197f 0, 282000, 2359296, 0x1b9d197f 0, 288000, 2359296, 0x1b9d197f -0, 294000, 2359296, 0x1b9d197f -0, 300000, 2359296, 0x1b9d197f +0, 294000, 2359296, 0x48c126fb +0, 300000, 2359296, 0x48c126fb 0, 306000, 2359296, 0x48c126fb 0, 312000, 2359296, 0x48c126fb 0, 318000, 2359296, 0x48c126fb 0, 324000, 2359296, 0x48c126fb 0, 330000, 2359296, 0x48c126fb -0, 336000, 2359296, 0x48c126fb -0, 342000, 2359296, 0x48c126fb +0, 336000, 2359296, 0xcaa31c7c +0, 342000, 2359296, 0xcaa31c7c 0, 348000, 2359296, 0xcaa31c7c 0, 354000, 2359296, 0xcaa31c7c 0, 360000, 2359296, 0xcaa31c7c 0, 366000, 2359296, 0xcaa31c7c 0, 372000, 2359296, 0xcaa31c7c -0, 378000, 2359296, 0xcaa31c7c -0, 384000, 2359296, 0xcaa31c7c +0, 378000, 2359296, 0xc6a333ee +0, 384000, 2359296, 0xc6a333ee 0, 390000, 2359296, 0xc6a333ee 0, 396000, 2359296, 0xc6a333ee 0, 402000, 2359296, 0xc6a333ee 0, 408000, 2359296, 0xc6a333ee 0, 414000, 2359296, 0xc6a333ee -0, 420000, 2359296, 0xc6a333ee -0, 426000, 2359296, 0xc6a333ee +0, 420000, 2359296, 0xb96d1583 +0, 426000, 2359296, 0xb96d1583 0, 432000, 2359296, 0xb96d1583 0, 438000, 2359296, 0xb96d1583 0, 444000, 2359296, 0xb96d1583 0, 450000, 2359296, 0xb96d1583 0, 456000, 2359296, 0xb96d1583 -0, 462000, 2359296, 0xb96d1583 -0, 468000, 2359296, 0xb96d1583 +0, 462000, 2359296, 0x878135ec +0, 468000, 2359296, 0x878135ec 0, 474000, 2359296, 0x878135ec 0, 480000, 2359296, 0x878135ec 0, 486000, 2359296, 0x878135ec 0, 492000, 2359296, 0x878135ec 0, 498000, 2359296, 0x878135ec -0, 504000, 2359296, 0x878135ec -0, 510000, 2359296, 0x878135ec -0, 516000, 2359296, 0x878135ec +0, 504000, 2359296, 0x76922870 +0, 510000, 2359296, 0x76922870 +0, 516000, 2359296, 0x76922870 0, 522000, 2359296, 0x76922870 0, 528000, 2359296, 0x76922870 0, 534000, 2359296, 0x76922870 0, 540000, 2359296, 0x76922870 -0, 546000, 2359296, 0x76922870 -0, 552000, 2359296, 0x76922870 -0, 558000, 2359296, 0x76922870 +0, 546000, 2359296, 0xb0e031f0 +0, 552000, 2359296, 0xb0e031f0 +0, 558000, 2359296, 0xb0e031f0 0, 564000, 2359296, 0xb0e031f0 0, 570000, 2359296, 0xb0e031f0 0, 576000, 2359296, 0xb0e031f0 0, 582000, 2359296, 0xb0e031f0 -0, 588000, 2359296, 0xb0e031f0 -0, 594000, 2359296, 0xb0e031f0 -0, 600000, 2359296, 0xb0e031f0 -0, 606000, 2359296, 0xb2ef2a6e -0, 612000, 2359296, 0xb2ef2a6e -0, 618000, 2359296, 0xb2ef2a6e +0, 588000, 2359296, 0xb2ef2a6e +0, 594000, 2359296, 0xb2ef2a6e +0, 600000, 2359296, 0xb2ef2a6e +0, 606000, 2359296, 0x083c2474 +0, 612000, 2359296, 0x083c2474 +0, 618000, 2359296, 0x083c2474 0, 624000, 2359296, 0x083c2474 -0, 630000, 2359296, 0x083c2474 -0, 636000, 2359296, 0x083c2474 -0, 642000, 2359296, 0x083c2474 +0, 630000, 2359296, 0xbdfe2ef3 +0, 636000, 2359296, 0xbdfe2ef3 +0, 642000, 2359296, 0xbdfe2ef3 0, 648000, 2359296, 0xbdfe2ef3 0, 654000, 2359296, 0xbdfe2ef3 0, 660000, 2359296, 0xbdfe2ef3 0, 666000, 2359296, 0xbdfe2ef3 -0, 672000, 2359296, 0xbdfe2ef3 -0, 678000, 2359296, 0xbdfe2ef3 -0, 684000, 2359296, 0xbdfe2ef3 +0, 672000, 2359296, 0x934b1484 +0, 678000, 2359296, 0x934b1484 +0, 684000, 2359296, 0x934b1484 0, 690000, 2359296, 0x934b1484 -0, 696000, 2359296, 0x934b1484 -0, 702000, 2359296, 0x934b1484 -0, 708000, 2359296, 0x934b1484 -0, 714000, 2359296, 0x3e0d1a7e -0, 720000, 2359296, 0x3e0d1a7e -0, 726000, 2359296, 0x3e0d1a7e +0, 696000, 2359296, 0x3e0d1a7e +0, 702000, 2359296, 0x3e0d1a7e +0, 708000, 2359296, 0x3e0d1a7e +0, 714000, 2359296, 0x3ce539e8 +0, 720000, 2359296, 0x3ce539e8 +0, 726000, 2359296, 0x3ce539e8 0, 732000, 2359296, 0x3ce539e8 0, 738000, 2359296, 0x3ce539e8 0, 744000, 2359296, 0x3ce539e8 0, 750000, 2359296, 0x3ce539e8 -0, 756000, 2359296, 0x3ce539e8 -0, 762000, 2359296, 0x3ce539e8 -0, 768000, 2359296, 0x3ce539e8 +0, 756000, 2359296, 0xd46c2f69 +0, 762000, 2359296, 0xd46c2f69 +0, 768000, 2359296, 0xd46c2f69 0, 774000, 2359296, 0xd46c2f69 0, 780000, 2359296, 0xd46c2f69 0, 786000, 2359296, 0xd46c2f69 0, 792000, 2359296, 0xd46c2f69 -0, 798000, 2359296, 0xd46c2f69 -0, 804000, 2359296, 0xd46c2f69 -0, 810000, 2359296, 0xd46c2f69 +0, 798000, 2359296, 0x8d2933ee +0, 804000, 2359296, 0x8d2933ee +0, 810000, 2359296, 0x8d2933ee 0, 816000, 2359296, 0x8d2933ee 0, 822000, 2359296, 0x8d2933ee 0, 828000, 2359296, 0x8d2933ee 0, 834000, 2359296, 0x8d2933ee -0, 840000, 2359296, 0x8d2933ee -0, 846000, 2359296, 0x8d2933ee -0, 852000, 2359296, 0x8d2933ee +0, 840000, 2359296, 0xb6092b6d +0, 846000, 2359296, 0xb6092b6d +0, 852000, 2359296, 0xb6092b6d 0, 858000, 2359296, 0xb6092b6d 0, 864000, 2359296, 0xb6092b6d 0, 870000, 2359296, 0xb6092b6d 0, 876000, 2359296, 0xb6092b6d -0, 882000, 2359296, 0xb6092b6d -0, 888000, 2359296, 0xb6092b6d -0, 894000, 2359296, 0xb6092b6d +0, 882000, 2359296, 0xe4ef27fa +0, 888000, 2359296, 0xe4ef27fa +0, 894000, 2359296, 0xe4ef27fa 0, 900000, 2359296, 0xe4ef27fa 0, 906000, 2359296, 0xe4ef27fa 0, 912000, 2359296, 0xe4ef27fa 0, 918000, 2359296, 0xe4ef27fa -0, 924000, 2359296, 0xe4ef27fa -0, 930000, 2359296, 0xe4ef27fa -0, 936000, 2359296, 0xe4ef27fa -0, 942000, 2359296, 0x5e5b2672 -0, 948000, 2359296, 0x5e5b2672 +0, 924000, 2359296, 0x5e5b2672 +0, 930000, 2359296, 0x5e5b2672 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_rgba_left mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_rgba_left --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_rgba_left 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_rgba_left 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,5 @@ +0, 0, 1228800, 0xf1bc9432 +0, 3003, 1228800, 0x8480d1e5 +0, 6006, 1228800, 0xb01d5fb2 +0, 9009, 1228800, 0x53cb42c4 +0, 12012, 1228800, 0x2b2ea176 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_rgba_median mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_rgba_median --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_rgba_median 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_rgba_median 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,5 @@ +0, 0, 1228800, 0xf1bc9432 +0, 3003, 1228800, 0x8480d1e5 +0, 6006, 1228800, 0xb01d5fb2 +0, 9009, 1228800, 0x53cb42c4 +0, 12012, 1228800, 0x2b2ea176 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_rgb_left mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_rgb_left --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_rgb_left 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_rgb_left 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +0, 0, 921600, 0x27e6001e +0, 3003, 921600, 0x7c0a92bc +0, 6006, 921600, 0x4d2be42c +0, 9009, 921600, 0x58ddd0be diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_rgb_median mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_rgb_median --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_rgb_median 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_rgb_median 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,5 @@ +0, 0, 921600, 0x9776611f +0, 3003, 921600, 0xdbfa64f4 +0, 6006, 921600, 0xed2a0580 +0, 9009, 921600, 0x6ecc80bc +0, 12012, 921600, 0x58ddd0be diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_yuv420_left mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_yuv420_left --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_yuv420_left 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_yuv420_left 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,7 @@ +0, 0, 460800, 0xece98fc8 +0, 3003, 460800, 0x9baf786b +0, 6006, 460800, 0x8e8e0510 +0, 9009, 460800, 0x27c1f2ba +0, 12012, 460800, 0x6a817987 +0, 15015, 460800, 0x2f713ec2 +0, 18018, 460800, 0x003b560e diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_yuv420_median mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_yuv420_median --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_yuv420_median 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_yuv420_median 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +0, 0, 460800, 0x6a817987 +0, 3003, 460800, 0x2f713ec2 +0, 6006, 460800, 0x003b560e +0, 9009, 460800, 0x9e1bbf63 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_yuv422_left mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_yuv422_left --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_yuv422_left 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_yuv422_left 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +0, 0, 614400, 0x9a6b8802 +0, 3003, 614400, 0xaa8687e2 +0, 6006, 614400, 0x2fe5bd40 +0, 9009, 614400, 0x1c8f3737 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_yuv422_median mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_yuv422_median --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/utvideo_yuv422_median 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/utvideo_yuv422_median 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +0, 0, 614400, 0x9a6b8802 +0, 3003, 614400, 0xaa8687e2 +0, 6006, 614400, 0x2fe5bd40 +0, 9009, 614400, 0x1c8f3737 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/v210 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/v210 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/v210 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/v210 2012-01-11 00:34:30.000000000 +0000 @@ -1 +1 @@ -0, 0, 3686400, 0x8d5c3847 +0, 0, 3686400, 0x75ee1dde diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/v410dec mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/v410dec --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/v410dec 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/v410dec 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +0, 0, 393216, 0xfe11a6b0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/v410enc mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/v410enc --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/v410enc 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/v410enc 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +979c9a9a09e8eaaf6467b8c22c0ac8bb diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vble mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vble --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vble 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vble 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +0, 0, 1382400, 0x5e1bc307 +0, 3003, 1382400, 0x198795f7 +0, 6006, 1382400, 0xa9102ac2 +0, 9009, 1382400, 0x9e347932 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vc1-ism mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vc1-ism --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vc1-ism 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vc1-ism 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,120 @@ +0, 0, 37440, 0xd1bc5235 +0, 3750, 37440, 0x158e6167 +0, 7500, 37440, 0x0faa4481 +0, 11250, 37440, 0x427158c5 +0, 15000, 37440, 0x4eb53ac6 +0, 18750, 37440, 0x99304eea +0, 22500, 37440, 0xcc554a6f +0, 26250, 37440, 0xabeb6c35 +0, 30000, 37440, 0xddfc7e18 +0, 33750, 37440, 0xaa79b504 +0, 37500, 37440, 0x5cb1c839 +0, 41250, 37440, 0x7e36ecca +0, 45000, 37440, 0xf486f425 +0, 48750, 37440, 0xf1b4138f +0, 52500, 37440, 0x966f1a49 +0, 56250, 37440, 0x5eff21da +0, 60000, 37440, 0x333f39b1 +0, 63750, 37440, 0x62e5963e +0, 67500, 37440, 0x26930671 +0, 71250, 37440, 0x27b4bb6c +0, 75000, 37440, 0xdbd07766 +0, 78750, 37440, 0x04260104 +0, 82500, 37440, 0x9b1e078b +0, 86250, 37440, 0xdf4e2474 +0, 90000, 37440, 0x57d44986 +0, 93750, 37440, 0x8780e34c +0, 97500, 37440, 0xf80c8bc0 +0, 101250, 37440, 0x630a7583 +0, 105000, 37440, 0x235ae089 +0, 108750, 37440, 0x984b8f0e +0, 112500, 37440, 0x865cf592 +0, 116250, 37440, 0x70f376f2 +0, 120000, 37440, 0x8b30c035 +0, 123750, 37440, 0xde772d79 +0, 127500, 37440, 0x8e076be5 +0, 131250, 37440, 0x3dc2bd9f +0, 135000, 37440, 0xb782eb67 +0, 138750, 37440, 0x02025d73 +0, 142500, 37440, 0x86bbbce8 +0, 146250, 37440, 0xd6554f62 +0, 150000, 37440, 0xb831b917 +0, 153750, 37440, 0x80643560 +0, 157500, 37440, 0x4ecf9afd +0, 161250, 37440, 0x9ce51e0b +0, 165000, 37440, 0x179466cd +0, 168750, 37440, 0x145fc900 +0, 172500, 37440, 0xb1b50402 +0, 176250, 37440, 0x0a87552a +0, 180000, 37440, 0x8f53821d +0, 183750, 37440, 0x1c07c825 +0, 187500, 37440, 0x49dde82f +0, 191250, 37440, 0xb1a32605 +0, 195000, 37440, 0x410f3cd5 +0, 198750, 37440, 0xff5e6696 +0, 202500, 37440, 0x96f678c9 +0, 206250, 37440, 0x6c9e9e68 +0, 210000, 37440, 0x79a2a655 +0, 213750, 37440, 0xf237bd6c +0, 217500, 37440, 0x4051b611 +0, 221250, 37440, 0xc7ccc918 +0, 225000, 37440, 0xbd02c122 +0, 228750, 37440, 0xacb3c881 +0, 232500, 37440, 0x2abdb940 +0, 236250, 37440, 0x19d5be85 +0, 240000, 37440, 0xfa5fb1ba +0, 243750, 37440, 0xdae7a7aa +0, 247500, 37440, 0x6b0f9f69 +0, 251250, 37440, 0x353e8201 +0, 255000, 37440, 0xa21443aa +0, 258750, 37440, 0x66c8d7e0 +0, 262500, 37440, 0xc332068e +0, 266250, 37440, 0x71431b9b +0, 270000, 37440, 0x392f15cb +0, 273750, 37440, 0x95a146bb +0, 277500, 37440, 0x7c51740a +0, 281250, 37440, 0xa3bdd43c +0, 285000, 37440, 0xa079f965 +0, 288750, 37440, 0xa95423ea +0, 292500, 37440, 0xd1bd2c67 +0, 296250, 37440, 0x6cf82844 +0, 300000, 37440, 0xd401e128 +0, 303750, 37440, 0x1f7db118 +0, 307500, 37440, 0x2e0a65a9 +0, 311250, 37440, 0x321c1c40 +0, 315000, 37440, 0x95b2a127 +0, 318750, 37440, 0xa1471f4b +0, 322500, 37440, 0x29d148c0 +0, 326250, 37440, 0x24c07107 +0, 330000, 37440, 0x0ead678d +0, 333750, 37440, 0xd0ca6495 +0, 337500, 37440, 0x08f935ef +0, 341250, 37440, 0xb5ec3c38 +0, 345000, 37440, 0xce371628 +0, 348750, 37440, 0x68170812 +0, 352500, 37440, 0xe222699e +0, 356250, 37440, 0xd688706c +0, 360000, 37440, 0x81a033f9 +0, 363750, 37440, 0x28bd0fbf +0, 367500, 37440, 0xe36db7b2 +0, 371250, 37440, 0x30559121 +0, 375000, 37440, 0xbf2b5fc8 +0, 378750, 37440, 0x4b427672 +0, 382500, 37440, 0x0544b0b4 +0, 386250, 37440, 0x38a70b06 +0, 390000, 37440, 0x4ed62607 +0, 393750, 37440, 0x6efe8ea6 +0, 397500, 37440, 0x81197e11 +0, 401250, 37440, 0xf4060050 +0, 405000, 37440, 0xaf205f13 +0, 408750, 37440, 0x5fa21382 +0, 412500, 37440, 0x8627ad05 +0, 416250, 37440, 0xf7130133 +0, 420000, 37440, 0x76dea7ba +0, 423750, 37440, 0x1dbae1be +0, 427500, 37440, 0x74a933f7 +0, 431250, 37440, 0xbdcd41a3 +0, 435000, 37440, 0xf0fe8c1c +0, 438750, 37440, 0xc0036222 +0, 442500, 37440, 0x3058385c +0, 446250, 37440, 0x68141016 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vc1_sa00050 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vc1_sa00050 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vc1_sa00050 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vc1_sa00050 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,30 @@ +0, 0, 115200, 0xb8830eef +0, 3600, 115200, 0xb8830eef +0, 7200, 115200, 0xb8830eef +0, 10800, 115200, 0x952ff5e1 +0, 14400, 115200, 0xa4362b14 +0, 18000, 115200, 0x32bacbe7 +0, 21600, 115200, 0x509eb814 +0, 25200, 115200, 0x509eb814 +0, 28800, 115200, 0x11a76c3e +0, 32400, 115200, 0x11a76c3e +0, 36000, 115200, 0x00cf734a +0, 39600, 115200, 0x00cf734a +0, 43200, 115200, 0x00cf734a +0, 46800, 115200, 0x00cf734a +0, 50400, 115200, 0x00cf734a +0, 54000, 115200, 0x00cf734a +0, 57600, 115200, 0x00cf734a +0, 61200, 115200, 0x00cf734a +0, 64800, 115200, 0xfddf48e6 +0, 68400, 115200, 0xfddf48e6 +0, 72000, 115200, 0x1eccebbf +0, 75600, 115200, 0x3da2f77e +0, 79200, 115200, 0x7c232572 +0, 82800, 115200, 0xedf426e5 +0, 86400, 115200, 0x5324ab20 +0, 90000, 115200, 0x5324ab20 +0, 93600, 115200, 0xa23e66bb +0, 97200, 115200, 0x680a50ff +0, 100800, 115200, 0x680a50ff +0, 104400, 115200, 0x680a50ff diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vc1_sa10091 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vc1_sa10091 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vc1_sa10091 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vc1_sa10091 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,30 @@ +0, 0, 518400, 0xae20b4fa +0, 3600, 518400, 0x2b4ccdf9 +0, 7200, 518400, 0x2b4ccdf9 +0, 10800, 518400, 0x2b4ccdf9 +0, 14400, 518400, 0x2b4ccdf9 +0, 18000, 518400, 0x2b4ccdf9 +0, 21600, 518400, 0x70d9a891 +0, 25200, 518400, 0x70d9a891 +0, 28800, 518400, 0x70d9a891 +0, 32400, 518400, 0xa461ee86 +0, 36000, 518400, 0x722bc6e8 +0, 39600, 518400, 0x722bc6e8 +0, 43200, 518400, 0x722bc6e8 +0, 46800, 518400, 0xf752fd2c +0, 50400, 518400, 0xf752fd2c +0, 54000, 518400, 0x91abcaca +0, 57600, 518400, 0x572727c3 +0, 61200, 518400, 0x572727c3 +0, 64800, 518400, 0x24c12382 +0, 68400, 518400, 0x24c12382 +0, 72000, 518400, 0x9aa39fe8 +0, 75600, 518400, 0x9aa39fe8 +0, 79200, 518400, 0x5cb6bd19 +0, 82800, 518400, 0x704d9300 +0, 86400, 518400, 0x590fad49 +0, 90000, 518400, 0x590fad49 +0, 93600, 518400, 0x590fad49 +0, 97200, 518400, 0x46bea10b +0, 100800, 518400, 0x46bea10b +0, 104400, 518400, 0x46bea10b diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vc1_sa20021 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vc1_sa20021 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vc1_sa20021 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vc1_sa20021 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,60 @@ +0, 0, 506880, 0x884bc093 +0, 3600, 506880, 0x4b09548f +0, 7200, 506880, 0x195cbee1 +0, 10800, 506880, 0xc8141e28 +0, 14400, 506880, 0xb170c49b +0, 18000, 506880, 0x2782268a +0, 21600, 506880, 0x2782268a +0, 25200, 506880, 0x2782268a +0, 28800, 506880, 0x2782268a +0, 32400, 506880, 0xe6803b32 +0, 36000, 506880, 0xe6803b32 +0, 39600, 506880, 0xa5ef9baf +0, 43200, 506880, 0xa5ef9baf +0, 46800, 506880, 0x46e8cbcb +0, 50400, 506880, 0x28a2239b +0, 54000, 506880, 0x7667af2f +0, 57600, 506880, 0x7667af2f +0, 61200, 506880, 0x8011bcaf +0, 64800, 506880, 0xd422115b +0, 68400, 506880, 0xd422115b +0, 72000, 506880, 0xd422115b +0, 75600, 506880, 0xbcee0b5b +0, 79200, 506880, 0x08fe9ec8 +0, 82800, 506880, 0xc8fb8b37 +0, 86400, 506880, 0xc8fb8b37 +0, 90000, 506880, 0x2c698b52 +0, 93600, 506880, 0x2c698b52 +0, 97200, 506880, 0x2c698b52 +0, 100800, 506880, 0x2b4ad9bc +0, 104400, 506880, 0x2b4ad9bc +0, 108000, 506880, 0x2b4ad9bc +0, 111600, 506880, 0x2b4ad9bc +0, 115200, 506880, 0x92e84ebb +0, 118800, 506880, 0x92e84ebb +0, 122400, 506880, 0xdb877da3 +0, 126000, 506880, 0xdb877da3 +0, 129600, 506880, 0xdb877da3 +0, 133200, 506880, 0x44610654 +0, 136800, 506880, 0x44610654 +0, 140400, 506880, 0xe254ce67 +0, 144000, 506880, 0xa6085385 +0, 147600, 506880, 0x2d45d744 +0, 151200, 506880, 0x2d45d744 +0, 154800, 506880, 0x6e684f51 +0, 158400, 506880, 0xe96186cf +0, 162000, 506880, 0xb535d369 +0, 165600, 506880, 0xb535d369 +0, 169200, 506880, 0xb535d369 +0, 172800, 506880, 0xeed0b7e0 +0, 176400, 506880, 0xeed0b7e0 +0, 180000, 506880, 0xeed0b7e0 +0, 183600, 506880, 0xeed0b7e0 +0, 187200, 506880, 0x8789b20b +0, 190800, 506880, 0x0a0f42fb +0, 194400, 506880, 0x09bbac2d +0, 198000, 506880, 0x09bbac2d +0, 201600, 506880, 0x09bbac2d +0, 205200, 506880, 0x09bbac2d +0, 208800, 506880, 0x09bbac2d +0, 212400, 506880, 0xda77f0df diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vmnc-32bit mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vmnc-32bit --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vmnc-32bit 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vmnc-32bit 2012-01-11 00:34:30.000000000 +0000 @@ -2,170 +2,48 @@ 0, 18000, 3655644, 0x87973530 0, 36000, 3655644, 0x3c3167fd 0, 54000, 3655644, 0x87973530 -0, 72000, 3655644, 0x87973530 -0, 90000, 3655644, 0x3c3167fd -0, 108000, 3655644, 0x3c3167fd -0, 126000, 3655644, 0x87973530 +0, 72000, 3655644, 0x3c3167fd +0, 90000, 3655644, 0x87973530 +0, 108000, 3655644, 0x87973530 +0, 126000, 3655644, 0x3c3167fd 0, 144000, 3655644, 0x87973530 -0, 162000, 3655644, 0x87973530 -0, 180000, 3655644, 0x87973530 -0, 198000, 3655644, 0x3c3167fd -0, 216000, 3655644, 0x87973530 -0, 234000, 3655644, 0x87973530 -0, 252000, 3655644, 0x87973530 -0, 270000, 3655644, 0x4f0da763 -0, 288000, 3655644, 0x4f0da763 -0, 306000, 3655644, 0x4f0da763 -0, 324000, 3655644, 0x66a4a763 -0, 342000, 3655644, 0xb20a7496 -0, 360000, 3655644, 0x66a4a763 -0, 378000, 3655644, 0x66a4a763 -0, 396000, 3655644, 0x66a4a763 -0, 414000, 3655644, 0x5600644a -0, 432000, 3655644, 0xce5880ee -0, 450000, 3655644, 0xce5880ee -0, 468000, 3655644, 0xa993ef3d -0, 486000, 3655644, 0xa993ef3d -0, 504000, 3655644, 0xa993ef3d -0, 522000, 3655644, 0xa993ef3d -0, 540000, 3655644, 0xa993ef3d -0, 558000, 3655644, 0xa993ef3d -0, 576000, 3655644, 0xa993ef3d -0, 594000, 3655644, 0xa993ef3d -0, 612000, 3655644, 0xa993ef3d -0, 630000, 3655644, 0xa993ef3d -0, 648000, 3655644, 0xa993ef3d -0, 666000, 3655644, 0xa993ef3d -0, 684000, 3655644, 0xa993ef3d -0, 702000, 3655644, 0xa993ef3d -0, 720000, 3655644, 0xa993ef3d -0, 738000, 3655644, 0xa993ef3d -0, 756000, 3655644, 0xa993ef3d -0, 774000, 3655644, 0xa993ef3d -0, 792000, 3655644, 0xa993ef3d -0, 810000, 3655644, 0xa993ef3d -0, 828000, 3655644, 0xa993ef3d -0, 846000, 3655644, 0xa993ef3d -0, 864000, 3655644, 0xa993ef3d -0, 882000, 3655644, 0x73564014 -0, 900000, 3655644, 0x73564014 -0, 918000, 3655644, 0x73564014 -0, 936000, 3655644, 0x73564014 -0, 954000, 3655644, 0x73564014 -0, 972000, 3655644, 0x73564014 -0, 990000, 3655644, 0x73564014 -0, 1008000, 3655644, 0x73564014 -0, 1026000, 3655644, 0x73564014 -0, 1044000, 3655644, 0x73564014 -0, 1062000, 3655644, 0x73564014 -0, 1080000, 3655644, 0x73564014 -0, 1098000, 3655644, 0x2a6e1e8c -0, 1116000, 3655644, 0x2a6e1e8c -0, 1134000, 3655644, 0x2a6e1e8c -0, 1152000, 3655644, 0xbae02e7c -0, 1170000, 3655644, 0xbae02e7c -0, 1188000, 3655644, 0xbae02e7c -0, 1206000, 3655644, 0xbae02e7c -0, 1224000, 3655644, 0x55af4a2d -0, 1242000, 3655644, 0x55af4a2d -0, 1260000, 3655644, 0x55af4a2d -0, 1278000, 3655644, 0x55af4a2d -0, 1296000, 3655644, 0x54b7ff2d -0, 1314000, 3655644, 0x39af1aed -0, 1332000, 3655644, 0x39af1aed -0, 1350000, 3655644, 0x39af1aed -0, 1368000, 3655644, 0x39af1aed -0, 1386000, 3655644, 0xe48dd11c -0, 1404000, 3655644, 0xe48dd11c -0, 1422000, 3655644, 0xe48dd11c -0, 1440000, 3655644, 0xe48dd11c -0, 1458000, 3655644, 0xe48dd11c -0, 1476000, 3655644, 0xba15c78d -0, 1494000, 3655644, 0xba15c78d -0, 1512000, 3655644, 0xba15c78d -0, 1530000, 3655644, 0xba15c78d -0, 1548000, 3655644, 0xba15c78d -0, 1566000, 3655644, 0xba15c78d -0, 1584000, 3655644, 0xba15c78d -0, 1602000, 3655644, 0x39af1aed -0, 1620000, 3655644, 0x39af1aed -0, 1638000, 3655644, 0x39af1aed -0, 1656000, 3655644, 0x39af1aed -0, 1674000, 3655644, 0x39af1aed -0, 1692000, 3655644, 0x39af1aed -0, 1710000, 3655644, 0x39af1aed -0, 1728000, 3655644, 0x27f96cd8 -0, 1746000, 3655644, 0x27f96cd8 -0, 1764000, 3655644, 0x27f96cd8 -0, 1782000, 3655644, 0x27f96cd8 -0, 1800000, 3655644, 0x27f96cd8 -0, 1818000, 3655644, 0x27f96cd8 -0, 1836000, 3655644, 0x27f96cd8 -0, 1854000, 3655644, 0xf4f068dc -0, 1872000, 3655644, 0xf4f068dc -0, 1890000, 3655644, 0xf4f068dc -0, 1908000, 3655644, 0xf4f068dc -0, 1926000, 3655644, 0xf4f068dc -0, 1944000, 3655644, 0xf4f068dc -0, 1962000, 3655644, 0xf4f068dc -0, 1980000, 3655644, 0xf1c55cf5 -0, 1998000, 3655644, 0xd932633d -0, 2016000, 3655644, 0xd932633d -0, 2034000, 3655644, 0xc6e95e0a -0, 2052000, 3655644, 0x9a63c9de -0, 2070000, 3655644, 0xf166ad4f -0, 2088000, 3655644, 0xe9eeba41 -0, 2106000, 3655644, 0x7e598ad7 -0, 2124000, 3655644, 0xf3bd257e -0, 2142000, 3655644, 0xf3bd257e -0, 2160000, 3655644, 0xf3bd257e -0, 2178000, 3655644, 0xf3bd257e -0, 2196000, 3655644, 0xf3bd257e -0, 2214000, 3655644, 0xf35b3852 -0, 2232000, 3655644, 0xf35b3852 -0, 2250000, 3655644, 0xf35b3852 -0, 2268000, 3655644, 0xf35b3852 -0, 2286000, 3655644, 0x9d553959 -0, 2304000, 3655644, 0x0a9de8e2 -0, 2322000, 3655644, 0xf2325b6c -0, 2340000, 3655644, 0xf2325b6c -0, 2358000, 3655644, 0xf2325b6c -0, 2376000, 3655644, 0xf2325b6c -0, 2394000, 3655644, 0xf2325b6c -0, 2412000, 3655644, 0xf2325b6c -0, 2430000, 3655644, 0xcf924028 -0, 2448000, 3655644, 0xcf924028 -0, 2466000, 3655644, 0x8dae55bc -0, 2484000, 3655644, 0x8dae55bc -0, 2502000, 3655644, 0x57b08ced -0, 2520000, 3655644, 0x57b08ced -0, 2538000, 3655644, 0xef89a1d8 -0, 2556000, 3655644, 0xef89a1d8 -0, 2574000, 3655644, 0x69e5503a -0, 2592000, 3655644, 0x69e5503a -0, 2610000, 3655644, 0xc3de7b3f -0, 2628000, 3655644, 0xc3de7b3f -0, 2646000, 3655644, 0x88eea64a -0, 2664000, 3655644, 0x88eea64a -0, 2682000, 3655644, 0xe39cce1f -0, 2700000, 3655644, 0xe39cce1f -0, 2718000, 3655644, 0xe39cce1f -0, 2736000, 3655644, 0xe39cce1f -0, 2754000, 3655644, 0xe39cce1f -0, 2772000, 3655644, 0xe39cce1f -0, 2790000, 3655644, 0xe39cce1f -0, 2808000, 3655644, 0xe39cce1f -0, 2826000, 3655644, 0xe39cce1f -0, 2844000, 3655644, 0xe39cce1f -0, 2862000, 3655644, 0xe39cce1f -0, 2880000, 3655644, 0xe39cce1f -0, 2898000, 3655644, 0xe39cce1f -0, 2916000, 3655644, 0xf0ed0d04 -0, 2934000, 3655644, 0xf0ed0d04 -0, 2952000, 3655644, 0xf0ed0d04 -0, 2970000, 3655644, 0xf0ed0d04 -0, 2988000, 3655644, 0x32490d3e -0, 3006000, 3655644, 0x32490d3e -0, 3024000, 3655644, 0x32490d3e -0, 3042000, 3655644, 0x32490d3e -0, 3060000, 3655644, 0x32490d3e +0, 162000, 3655644, 0x4f0da763 +0, 180000, 3655644, 0x66a4a763 +0, 198000, 3655644, 0xb20a7496 +0, 216000, 3655644, 0x66a4a763 +0, 234000, 3655644, 0x5600644a +0, 252000, 3655644, 0xce5880ee +0, 270000, 3655644, 0xa993ef3d +0, 288000, 3655644, 0x73564014 +0, 306000, 3655644, 0x2a6e1e8c +0, 324000, 3655644, 0xbae02e7c +0, 342000, 3655644, 0x55af4a2d +0, 360000, 3655644, 0x54b7ff2d +0, 378000, 3655644, 0x39af1aed +0, 396000, 3655644, 0xe48dd11c +0, 414000, 3655644, 0xba15c78d +0, 432000, 3655644, 0x39af1aed +0, 450000, 3655644, 0x27f96cd8 +0, 468000, 3655644, 0xf4f068dc +0, 486000, 3655644, 0xf1c55cf5 +0, 504000, 3655644, 0xd932633d +0, 522000, 3655644, 0xc6e95e0a +0, 540000, 3655644, 0x9a63c9de +0, 558000, 3655644, 0xf166ad4f +0, 576000, 3655644, 0xe9eeba41 +0, 594000, 3655644, 0x7e598ad7 +0, 612000, 3655644, 0xf3bd257e +0, 630000, 3655644, 0xf35b3852 +0, 648000, 3655644, 0x9d553959 +0, 666000, 3655644, 0x0a9de8e2 +0, 684000, 3655644, 0xf2325b6c +0, 702000, 3655644, 0xcf924028 +0, 720000, 3655644, 0x8dae55bc +0, 738000, 3655644, 0x57b08ced +0, 756000, 3655644, 0xef89a1d8 +0, 774000, 3655644, 0x69e5503a +0, 792000, 3655644, 0xc3de7b3f +0, 810000, 3655644, 0x88eea64a +0, 828000, 3655644, 0xe39cce1f +0, 846000, 3655644, 0xf0ed0d04 +0, 864000, 3655644, 0x32490d3e diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vp3-coeff-level64 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vp3-coeff-level64 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/vp3-coeff-level64 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/vp3-coeff-level64 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,8 @@ +0, 0, 4617600, 0x4ba6df50 +0, 6000, 4617600, 0x419fdeaf +0, 12000, 4617600, 0xeb2edced +0, 18000, 4617600, 0xa2bb3a1a +0, 24000, 4617600, 0x411cfb36 +0, 30000, 4617600, 0xb2dc22ed +0, 36000, 4617600, 0x236d23b5 +0, 42000, 4617600, 0x7fef275e diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/wmv8-drm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/wmv8-drm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/wmv8-drm 2011-03-23 03:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/wmv8-drm 2012-01-11 00:34:30.000000000 +0000 @@ -1,162 +1,130 @@ 0, 0, 84480, 0x7760a00b 0, 3750, 84480, 0xfe39a1db -0, 7500, 84480, 0xfe39a1db -0, 11250, 84480, 0xfe39a1db -0, 15000, 84480, 0xfe39a1db -0, 18750, 84480, 0xfe39a1db -0, 22500, 84480, 0xfe39a1db -0, 26250, 84480, 0xfe39a1db -0, 30000, 84480, 0xfe39a1db -0, 33750, 84480, 0xfe39a1db -0, 37500, 84480, 0xfe39a1db -0, 41250, 84480, 0xfe39a1db -0, 45000, 84480, 0xfe39a1db -0, 48750, 84480, 0xfe39a1db -0, 52500, 84480, 0xfe39a1db -0, 56250, 84480, 0xfe39a1db -0, 60000, 84480, 0xfe39a1db -0, 63750, 84480, 0xfe39a1db -0, 67500, 84480, 0xfe39a1db -0, 71250, 84480, 0xfe39a1db -0, 75000, 84480, 0xfe39a1db -0, 78750, 84480, 0xfe39a1db -0, 82500, 84480, 0xfe39a1db -0, 86250, 84480, 0xfe39a1db -0, 90000, 84480, 0xfe39a1db -0, 93750, 84480, 0xfe39a1db -0, 97500, 84480, 0xfe39a1db -0, 101250, 84480, 0xfe39a1db -0, 105000, 84480, 0xfe39a1db -0, 108750, 84480, 0xd71961b4 -0, 112500, 84480, 0xc80dedba -0, 116250, 84480, 0x34d8b538 -0, 120000, 84480, 0x1a86b8e5 -0, 123750, 84480, 0xabf7c25d -0, 127500, 84480, 0x912600ee -0, 131250, 84480, 0x7ee7c70b -0, 135000, 84480, 0x09c5b0d1 -0, 138750, 84480, 0x6dbe6c0c -0, 142500, 84480, 0x0fe0a120 -0, 146250, 84480, 0x2352d3a2 -0, 150000, 84480, 0xb22ce92e -0, 153750, 84480, 0x31db0099 -0, 157500, 84480, 0xad2dd73a -0, 161250, 84480, 0xb9af8e20 -0, 165000, 84480, 0x7b956549 -0, 168750, 84480, 0x3f774b87 -0, 172500, 84480, 0x824a23a3 -0, 176250, 84480, 0x4469a8d8 -0, 180000, 84480, 0xc80c7a0a -0, 183750, 84480, 0xcf958549 -0, 187500, 84480, 0x449746e3 -0, 191250, 84480, 0xbac66a82 -0, 195000, 84480, 0x99e85855 -0, 198750, 84480, 0xa4a17d17 -0, 202500, 84480, 0xe29c7587 -0, 206250, 84480, 0x551de592 -0, 210000, 84480, 0xe0877bce -0, 213750, 84480, 0x9660eb35 -0, 217500, 84480, 0x0a34b644 -0, 221250, 84480, 0x352919f0 -0, 225000, 84480, 0xef56ce27 -0, 228750, 84480, 0x030fe862 -0, 232500, 84480, 0x2eba33e2 -0, 236250, 84480, 0x242de401 -0, 240000, 84480, 0xbadd61ca -0, 243750, 84480, 0x2060465b -0, 247500, 84480, 0x256e6965 -0, 251250, 84480, 0x243b7084 -0, 255000, 84480, 0x8b3c0b47 -0, 258750, 84480, 0xc174a9af -0, 262500, 84480, 0xb6d48686 -0, 266250, 84480, 0xa3dd1871 -0, 270000, 84480, 0x04cdcaf7 -0, 273750, 84480, 0x55f89c94 -0, 277500, 84480, 0xda657032 -0, 281250, 84480, 0x38ba7698 -0, 285000, 84480, 0x4d03a7f2 -0, 288750, 84480, 0x115d9035 -0, 292500, 84480, 0x24c6acc6 -0, 296250, 84480, 0xdd2bbcae -0, 300000, 84480, 0xb4fee0b9 -0, 303750, 84480, 0xc51c14e0 -0, 307500, 84480, 0xfb7737de -0, 311250, 84480, 0x38675fb0 -0, 315000, 84480, 0x4752c710 -0, 318750, 84480, 0xfeb7491b -0, 322500, 84480, 0xaa248122 -0, 326250, 84480, 0x9a4af87c -0, 330000, 84480, 0xedcf09df -0, 333750, 84480, 0x563a05df -0, 337500, 84480, 0x0dde1e03 -0, 341250, 84480, 0xd8f0ff65 -0, 345000, 84480, 0xbeb9ae1a -0, 348750, 84480, 0x416d1468 -0, 352500, 84480, 0x66c87d4c -0, 356250, 84480, 0xa67c0774 -0, 360000, 84480, 0xd8f8aec1 -0, 363750, 84480, 0xadfa502b -0, 367500, 84480, 0x50bf20e4 -0, 371250, 84480, 0xbcb3d8cc -0, 375000, 84480, 0xa54677d7 -0, 378750, 84480, 0x3566042d -0, 382500, 84480, 0x4c9eed57 -0, 386250, 84480, 0xc3b90e58 -0, 390000, 84480, 0x3c042bfa -0, 393750, 84480, 0x19f8e890 -0, 397500, 84480, 0xd3dacfb9 -0, 401250, 84480, 0x2365fc6f -0, 405000, 84480, 0xa2c19d00 -0, 408750, 84480, 0xce94336f -0, 412500, 84480, 0xfa9bcf14 -0, 416250, 84480, 0x24d6a243 -0, 420000, 84480, 0x24d6a243 -0, 423750, 84480, 0x24d6a243 -0, 427500, 84480, 0x24d6a243 -0, 431250, 84480, 0x24d6a243 -0, 435000, 84480, 0x24d6a243 -0, 438750, 84480, 0x24d6a243 -0, 442500, 84480, 0xae1c8854 -0, 446250, 84480, 0xbb8968bf -0, 450000, 84480, 0x6f923623 -0, 453750, 84480, 0x22e98029 -0, 457500, 84480, 0x8ac33af3 -0, 461250, 84480, 0x05947b6e -0, 465000, 84480, 0xfc35661a -0, 468750, 84480, 0x0e6b6e47 -0, 472500, 84480, 0x82c764bb -0, 476250, 84480, 0x57a36833 -0, 480000, 84480, 0xc8dd690a -0, 483750, 84480, 0x02c47232 -0, 487500, 84480, 0x6645715d -0, 491250, 84480, 0xc64860f7 -0, 495000, 84480, 0x4f5614b3 -0, 498750, 84480, 0xa70842ca -0, 502500, 84480, 0x379d8458 -0, 506250, 84480, 0xa14701cf -0, 510000, 84480, 0xad1aa2b2 -0, 513750, 84480, 0xee28f320 -0, 517500, 84480, 0x505801e9 -0, 521250, 84480, 0x7947233b -0, 525000, 84480, 0x3ce72a9d -0, 528750, 84480, 0xa6834e64 -0, 532500, 84480, 0xfebf4d70 -0, 536250, 84480, 0x4a0775e2 -0, 540000, 84480, 0x9d7e945b -0, 543750, 84480, 0xaa9eadd9 -0, 547500, 84480, 0xaa85c9b1 -0, 551250, 84480, 0xa005edaf -0, 555000, 84480, 0x7fc4e5cc -0, 558750, 84480, 0xb0f6e8d1 -0, 562500, 84480, 0x9ef9f330 -0, 566250, 84480, 0xbe14ff1f -0, 570000, 84480, 0xd494048c -0, 573750, 84480, 0x046166a7 -0, 577500, 84480, 0x052a09b2 -0, 581250, 84480, 0x71fff4ab -0, 585000, 84480, 0xb9684e41 -0, 588750, 84480, 0x1ddce068 -0, 592500, 84480, 0xb9de300e -0, 596250, 84480, 0x13962590 -0, 600000, 84480, 0xde79482f -0, 603750, 84480, 0x7d1ca064 +0, 7500, 84480, 0xd71961b4 +0, 11250, 84480, 0xc80dedba +0, 15000, 84480, 0x34d8b538 +0, 18750, 84480, 0x1a86b8e5 +0, 22500, 84480, 0xabf7c25d +0, 26250, 84480, 0x912600ee +0, 30000, 84480, 0x7ee7c70b +0, 33750, 84480, 0x09c5b0d1 +0, 37500, 84480, 0x6dbe6c0c +0, 41250, 84480, 0x0fe0a120 +0, 45000, 84480, 0x2352d3a2 +0, 48750, 84480, 0xb22ce92e +0, 52500, 84480, 0x31db0099 +0, 56250, 84480, 0xad2dd73a +0, 60000, 84480, 0xb9af8e20 +0, 63750, 84480, 0x7b956549 +0, 67500, 84480, 0x3f774b87 +0, 71250, 84480, 0x824a23a3 +0, 75000, 84480, 0x4469a8d8 +0, 78750, 84480, 0xc80c7a0a +0, 82500, 84480, 0xcf958549 +0, 86250, 84480, 0x449746e3 +0, 90000, 84480, 0xbac66a82 +0, 93750, 84480, 0x99e85855 +0, 97500, 84480, 0xa4a17d17 +0, 101250, 84480, 0xe29c7587 +0, 105000, 84480, 0x551de592 +0, 108750, 84480, 0xe0877bce +0, 112500, 84480, 0x9660eb35 +0, 116250, 84480, 0x0a34b644 +0, 120000, 84480, 0x352919f0 +0, 123750, 84480, 0xef56ce27 +0, 127500, 84480, 0x030fe862 +0, 131250, 84480, 0x2eba33e2 +0, 135000, 84480, 0x242de401 +0, 138750, 84480, 0xbadd61ca +0, 142500, 84480, 0x2060465b +0, 146250, 84480, 0x256e6965 +0, 150000, 84480, 0x243b7084 +0, 153750, 84480, 0x8b3c0b47 +0, 157500, 84480, 0xc174a9af +0, 161250, 84480, 0xb6d48686 +0, 165000, 84480, 0xa3dd1871 +0, 168750, 84480, 0x04cdcaf7 +0, 172500, 84480, 0x55f89c94 +0, 176250, 84480, 0xda657032 +0, 180000, 84480, 0x38ba7698 +0, 183750, 84480, 0x4d03a7f2 +0, 187500, 84480, 0x115d9035 +0, 191250, 84480, 0x24c6acc6 +0, 195000, 84480, 0xdd2bbcae +0, 198750, 84480, 0xb4fee0b9 +0, 202500, 84480, 0xc51c14e0 +0, 206250, 84480, 0xfb7737de +0, 210000, 84480, 0x38675fb0 +0, 213750, 84480, 0x4752c710 +0, 217500, 84480, 0xfeb7491b +0, 221250, 84480, 0xaa248122 +0, 225000, 84480, 0x9a4af87c +0, 228750, 84480, 0xedcf09df +0, 232500, 84480, 0x563a05df +0, 236250, 84480, 0x0dde1e03 +0, 240000, 84480, 0xd8f0ff65 +0, 243750, 84480, 0xbeb9ae1a +0, 247500, 84480, 0x416d1468 +0, 251250, 84480, 0x66c87d4c +0, 255000, 84480, 0xa67c0774 +0, 258750, 84480, 0xd8f8aec1 +0, 262500, 84480, 0xadfa502b +0, 266250, 84480, 0x50bf20e4 +0, 270000, 84480, 0xbcb3d8cc +0, 273750, 84480, 0xa54677d7 +0, 277500, 84480, 0x3566042d +0, 281250, 84480, 0x4c9eed57 +0, 285000, 84480, 0xc3b90e58 +0, 288750, 84480, 0x3c042bfa +0, 292500, 84480, 0x19f8e890 +0, 296250, 84480, 0xd3dacfb9 +0, 300000, 84480, 0x2365fc6f +0, 303750, 84480, 0xa2c19d00 +0, 307500, 84480, 0xce94336f +0, 311250, 84480, 0xfa9bcf14 +0, 315000, 84480, 0x24d6a243 +0, 318750, 84480, 0xae1c8854 +0, 322500, 84480, 0xbb8968bf +0, 326250, 84480, 0x6f923623 +0, 330000, 84480, 0x22e98029 +0, 333750, 84480, 0x8ac33af3 +0, 337500, 84480, 0x05947b6e +0, 341250, 84480, 0xfc35661a +0, 345000, 84480, 0x0e6b6e47 +0, 348750, 84480, 0x82c764bb +0, 352500, 84480, 0x57a36833 +0, 356250, 84480, 0xc8dd690a +0, 360000, 84480, 0x02c47232 +0, 363750, 84480, 0x6645715d +0, 367500, 84480, 0xc64860f7 +0, 371250, 84480, 0x4f5614b3 +0, 375000, 84480, 0xa70842ca +0, 378750, 84480, 0x379d8458 +0, 382500, 84480, 0xa14701cf +0, 386250, 84480, 0xad1aa2b2 +0, 390000, 84480, 0xee28f320 +0, 393750, 84480, 0x505801e9 +0, 397500, 84480, 0x7947233b +0, 401250, 84480, 0x3ce72a9d +0, 405000, 84480, 0xa6834e64 +0, 408750, 84480, 0xfebf4d70 +0, 412500, 84480, 0x4a0775e2 +0, 416250, 84480, 0x9d7e945b +0, 420000, 84480, 0xaa9eadd9 +0, 423750, 84480, 0xaa85c9b1 +0, 427500, 84480, 0xa005edaf +0, 431250, 84480, 0x7fc4e5cc +0, 435000, 84480, 0xb0f6e8d1 +0, 438750, 84480, 0x9ef9f330 +0, 442500, 84480, 0xbe14ff1f +0, 446250, 84480, 0xd494048c +0, 450000, 84480, 0x046166a7 +0, 453750, 84480, 0x052a09b2 +0, 457500, 84480, 0x71fff4ab +0, 461250, 84480, 0xb9684e41 +0, 465000, 84480, 0x1ddce068 +0, 468750, 84480, 0xb9de300e +0, 472500, 84480, 0x13962590 +0, 476250, 84480, 0xde79482f +0, 480000, 84480, 0x7d1ca064 +0, 483750, 84480, 0x2676a064 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/wtv-demux mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/wtv-demux --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/wtv-demux 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/wtv-demux 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,139 @@ +1, 0, 576, 0x9b6e1638 +1, 1620, 576, 0x0ca91183 +1, 3780, 576, 0xec6a180f +1, 5940, 576, 0x478a2b9b +1, 8100, 576, 0x00fa15b3 +1, 10260, 576, 0xfb551816 +1, 12960, 576, 0x422e12bd +1, 15120, 576, 0xa7581b29 +1, 17280, 576, 0xd4b31a74 +1, 19440, 576, 0x11521b10 +1, 21600, 576, 0x3dcc1474 +1, 23760, 576, 0x66c31aab +1, 25920, 576, 0x97f318a8 +1, 28080, 576, 0xd3fb1a30 +1, 30240, 576, 0xd2bd16af +1, 32400, 576, 0x6c10146a +1, 34560, 576, 0x10d81468 +1, 36720, 576, 0x3813162d +1, 38880, 576, 0x89e71d95 +1, 41040, 576, 0xd1c717f9 +1, 43200, 576, 0x1a311e5f +1, 45360, 576, 0x0ea80e05 +1, 47520, 576, 0x2f1718f2 +1, 49680, 576, 0xffe01e13 +1, 51840, 576, 0xa7b02296 +1, 54000, 576, 0x199f1597 +1, 56160, 576, 0xdea217ba +1, 58320, 576, 0x8a790f01 +1, 60480, 576, 0x23e80038 +1, 62640, 576, 0x75dc048a +1, 64800, 576, 0xeb4b0d93 +1, 66960, 576, 0xde1322f5 +1, 69120, 576, 0xc3131f35 +1, 71280, 576, 0x708f1381 +1, 73440, 576, 0x1f00137e +0, 74578, 41980, 0xd4920915 +1, 75600, 576, 0x05131eb0 +1, 77760, 576, 0x78151c22 +0, 78178, 7228, 0x1b141fa3 +1, 79920, 576, 0x31771239 +0, 81777, 7492, 0x1a47f3e4 +1, 82080, 576, 0x3ce4097c +1, 84240, 576, 0x180e15f4 +0, 85378, 25068, 0xcb70a744 +1, 86400, 576, 0x30db0604 +1, 88560, 576, 0x9b290284 +0, 88978, 7212, 0x0ab9f558 +1, 90720, 576, 0xcf340753 +0, 92578, 7612, 0xa93054f0 +1, 92880, 576, 0xdaa41457 +1, 95040, 576, 0x34d310a2 +0, 96177, 22868, 0xa77db64a +1, 97200, 576, 0x58b31010 +1, 99360, 576, 0x19610f54 +0, 99778, 6260, 0x6cf76411 +1, 101520, 576, 0x17762352 +0, 103377, 6156, 0xe168394b +1, 103680, 576, 0x1fea1448 +1, 105840, 576, 0x55840a01 +0, 106977, 23364, 0x53164f1e +1, 108000, 576, 0x6c9c24ce +1, 110160, 576, 0x955f1e97 +0, 110578, 6708, 0x89877269 +1, 112320, 576, 0x2827134f +0, 114178, 6908, 0x8d62a249 +1, 114480, 576, 0x34a01c29 +1, 116640, 576, 0x7d351e52 +0, 117778, 38156, 0xec41f682 +1, 118800, 576, 0x00c91d9e +1, 120960, 576, 0x57ea1a97 +0, 121377, 5764, 0xcc04534b +1, 123120, 576, 0xef3a1c74 +0, 124977, 5388, 0xb8a1c3c5 +1, 125280, 576, 0x11fc217d +1, 127440, 576, 0x59ce20e5 +0, 128578, 16764, 0x59460d96 +1, 129600, 576, 0xaafc1dbf +1, 131760, 576, 0xdd941609 +0, 132177, 5548, 0x5c91e93d +1, 133920, 576, 0x900420b0 +0, 135777, 5652, 0x5e321aed +1, 136080, 576, 0x5f4f1aa1 +1, 138240, 576, 0x7d7e18de +0, 139377, 15564, 0xefdf5080 +1, 140400, 576, 0x986c0d9d +1, 142560, 576, 0xcb4c21c0 +0, 142977, 6492, 0xd1d5c5f8 +1, 144720, 576, 0xbcfb1e8b +0, 146577, 5604, 0xf9472b44 +1, 146880, 576, 0xcb541b4c +1, 149040, 576, 0x980426e9 +0, 150177, 17924, 0x45815b7b +1, 151200, 576, 0x09d00aa0 +1, 153360, 576, 0xad591374 +0, 153778, 5020, 0x3cc5e554 +1, 155520, 576, 0x97bf1461 +0, 157378, 5276, 0xa0554c12 +1, 157680, 576, 0xdc871cc4 +1, 159840, 576, 0x56781896 +0, 160977, 31460, 0x5765eb5f +1, 162000, 576, 0xc77714e3 +1, 164160, 576, 0x280e18d4 +0, 164577, 4972, 0x91adbab7 +1, 166320, 576, 0xbc0d2302 +0, 168178, 5580, 0xfea707cb +1, 168480, 576, 0x79191384 +1, 170640, 576, 0x65481c97 +0, 171778, 17412, 0x0afe4d27 +1, 172800, 576, 0xc94d227d +1, 174960, 576, 0xa68a1f14 +0, 175378, 5236, 0x03f55309 +1, 177120, 576, 0x6af11a5c +0, 178977, 4924, 0x558e753c +1, 179280, 576, 0x4d1019ef +1, 181440, 576, 0x3b1b17b5 +0, 182577, 15396, 0xf145d121 +1, 183600, 576, 0xcdd8159f +1, 185760, 576, 0x97cd1d06 +0, 186177, 4708, 0x43066a92 +1, 187920, 576, 0x5d1b1123 +0, 189778, 4332, 0x9e22bcba +1, 190080, 576, 0x888d0cb0 +1, 192240, 576, 0x556e1dad +0, 193377, 12876, 0x46ff9ef4 +1, 194400, 576, 0xf7af0bce +1, 196560, 576, 0xb5da160a +0, 196978, 5940, 0x27cba62e +1, 198720, 576, 0x4a8d0e98 +0, 200578, 6124, 0x6bab0a6d +1, 200880, 576, 0x183b1c7e +1, 203040, 576, 0xc47120e6 +0, 204178, 36428, 0x942f9648 +1, 205200, 576, 0xb1f31346 +0, 207777, 6660, 0x545a0db7 +0, 211377, 6780, 0x2d1d4189 +0, 214978, 16460, 0x7c3b3ca4 +0, 218578, 6724, 0x8538cc6f +0, 222178, 7068, 0x69574fd0 +0, 225777, 19552, 0xf230e854 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/xan-dpcm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/xan-dpcm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/xan-dpcm 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/xan-dpcm 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -b6da857766896ab10bb900004f915053 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/xmv-demux mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/xmv-demux --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/xmv-demux 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/xmv-demux 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,181 @@ +0, 0, 1508, 0xefceba48 +1, 0, 5976, 0xfa2c2db9 +1, 10841, 5976, 0x256b935c +1, 21682, 5976, 0xa78a9563 +1, 32522, 5976, 0x4ea056f4 +1, 43363, 5976, 0xda772d8d +1, 54204, 5976, 0xafacf7c9 +0, 57600, 108, 0x06713c96 +0, 61200, 952, 0xd306df7e +0, 64800, 2312, 0xaf316585 +1, 65045, 5976, 0xdeb003f4 +0, 68400, 3872, 0xfc1c527c +0, 72000, 20, 0xaffc0edd +0, 75600, 6600, 0xe1b66c7f +1, 75886, 2016, 0xa7380d36 +0, 79200, 6868, 0xd5b3f631 +1, 79543, 2016, 0xbc090bac +0, 82800, 8420, 0xf70ee33b +1, 83200, 2016, 0x6f8c164c +0, 86400, 13144, 0x9a54ef39 +1, 86857, 2016, 0x13b80e28 +0, 90000, 6340, 0xe55bf555 +1, 90514, 2016, 0xd40ff863 +0, 93600, 3736, 0x0b23f89f +1, 94171, 2016, 0x4d530ed7 +0, 97200, 2624, 0x79e2e451 +1, 97829, 2160, 0x0fbc37eb +0, 100800, 1860, 0x63886f11 +1, 101747, 13824, 0x82fb2602 +0, 104400, 1244, 0x74594601 +0, 108000, 564, 0xf4561dfb +0, 111600, 80, 0xbf8e2e30 +0, 115200, 20, 0xa0990c29 +1, 126824, 13824, 0x08771caf +1, 151902, 13824, 0xdf7d4a65 +1, 176980, 13896, 0x24bf3f47 +1, 202188, 3600, 0x9ad26b9f +1, 208718, 3600, 0x8c666fd6 +1, 215249, 3600, 0x305c6ca1 +1, 221780, 3600, 0x48b04e1e +0, 223200, 104, 0x12413980 +0, 226800, 796, 0x2e698ed3 +1, 228310, 3600, 0x8c915935 +0, 230400, 1808, 0x8b3e6e5e +0, 234000, 4712, 0xdbd51737 +1, 234841, 3600, 0xa8f45e01 +0, 237600, 5548, 0xee9c831c +0, 241200, 6152, 0x9c18ccc1 +1, 241371, 3816, 0xc64cc5ed +0, 244800, 6452, 0x7860462a +1, 248294, 1944, 0x0ac2e3f1 +0, 248400, 6676, 0xe1b1c9e4 +1, 251820, 1944, 0x2197dccd +0, 252000, 10904, 0x0bded7b7 +1, 255347, 1944, 0x0c02e77f +0, 255600, 12844, 0xe6d16cff +1, 258873, 1944, 0x675ee06a +0, 259200, 10920, 0xe114c46b +1, 262400, 2160, 0x0d803a8b +0, 262800, 5952, 0xb7464634 +1, 266318, 6696, 0xa7a0dfea +0, 266400, 4732, 0x2fa2e36d +0, 270000, 2592, 0xf54ddd57 +0, 273600, 1516, 0x4a1cd4d5 +0, 277200, 864, 0x49889afc +1, 278465, 6696, 0x59aa3145 +0, 280800, 468, 0x3932e6a4 +0, 284400, 116, 0x2b8341e6 +0, 288000, 16, 0x6a3109cf +1, 290612, 6696, 0x69be4d78 +1, 302759, 6696, 0x64064c67 +1, 314906, 6696, 0xc8536f98 +1, 327053, 6696, 0xc0ce5199 +1, 339200, 6768, 0x3b275c58 +1, 351478, 8856, 0x90e5b37c +0, 360000, 1508, 0xefceba48 +1, 367543, 8856, 0x86b33366 +1, 383608, 8856, 0x19e18797 +1, 399673, 8856, 0x0a0c7fbd +1, 415739, 8928, 0x4a9b2d42 +0, 417600, 100, 0x45023894 +0, 421200, 948, 0xa65ed345 +0, 424800, 2808, 0xd7285746 +0, 428400, 5372, 0x05794175 +1, 431935, 1512, 0xed8b3f4b +0, 432000, 11596, 0x8636eca7 +1, 434678, 1512, 0xa27d3891 +0, 435600, 11524, 0xe1f39be3 +1, 437420, 1512, 0xb0f13eb6 +0, 439200, 23392, 0xab053f05 +1, 440163, 1656, 0xe5a98324 +0, 442800, 4560, 0x03197d07 +1, 443167, 2232, 0x15445433 +0, 446400, 4440, 0x1cc361a2 +1, 447216, 2232, 0x5cb348a9 +0, 450000, 23688, 0x16030634 +1, 451265, 2232, 0xf10347da +0, 453600, 16132, 0xf0eca799 +1, 455314, 2448, 0x3e16a175 +0, 457200, 29896, 0x0c0988ea +1, 459755, 2520, 0x17e3ca2b +0, 460800, 19956, 0x0093aa0b +1, 464327, 1944, 0x35c2de84 +0, 464400, 16392, 0x8829a9ca +1, 467853, 1944, 0x55b4db40 +0, 468000, 16772, 0x9a4a546d +1, 471380, 2088, 0xdaae14b2 +0, 471600, 8920, 0xcd8ca203 +1, 475167, 1944, 0x92ccd37f +0, 475200, 9632, 0x53c1d37b +1, 478694, 1944, 0x70efede1 +0, 478800, 8976, 0xfe4da2cc +1, 482220, 1944, 0x7601d304 +0, 482400, 6680, 0x35348fe0 +1, 485747, 1944, 0x3922ebc2 +0, 486000, 9228, 0xcbf62b0c +1, 489273, 2160, 0xde462f2e +0, 489600, 5108, 0xd1d88511 +1, 493192, 1872, 0x467ac1d2 +0, 493200, 10016, 0xaff4b2b2 +1, 496588, 1872, 0xa1e4cd43 +0, 496800, 7468, 0x23e81ab8 +1, 499984, 1872, 0x1dceccc6 +0, 500400, 4172, 0x253cd05b +1, 503380, 1872, 0x2bbad2a5 +0, 504000, 8188, 0x7ede743f +1, 506776, 1872, 0xc603d44d +0, 507600, 2884, 0x2dec55a3 +1, 510171, 1872, 0x1b4cc261 +0, 511200, 3900, 0xd0666a18 +1, 513567, 1872, 0x10edd6cf +0, 514800, 2996, 0x9cc99b8c +1, 516963, 2376, 0xecdb9d61 +0, 518400, 2156, 0xae612776 +1, 521273, 2592, 0x5559eced +0, 522000, 3988, 0x0d2c9992 +0, 525600, 1512, 0x6281fc00 +1, 525976, 2592, 0x8848dfc7 +0, 529200, 6544, 0xb75c2562 +1, 530678, 2592, 0x4ca2d7da +0, 532800, 4108, 0xfb21efc9 +1, 535380, 2592, 0x285fd7e6 +0, 536400, 1096, 0x85922a37 +0, 540000, 9740, 0xe57d7647 +1, 540082, 2592, 0x2717e404 +0, 543600, 416, 0x61c2ea02 +1, 544784, 2592, 0xf106111a +0, 547200, 336, 0x1dc5ac1c +1, 549486, 2592, 0xd7d01119 +0, 550800, 204, 0x16f57017 +1, 554188, 2592, 0x550cfeda +0, 554400, 112, 0x78374234 +0, 558000, 40, 0x6cb21985 +1, 558890, 2592, 0x47ad00c4 +1, 563592, 2592, 0x39bbf306 +1, 568294, 3240, 0x69addfce +1, 574171, 21384, 0x254f63e0 +1, 612963, 21456, 0x2f7a9859 +0, 615600, 14420, 0x53324ca4 +0, 619200, 40, 0x10971420 +1, 651886, 37512, 0x6e962928 +1, 719935, 2736, 0x1dc91c69 +0, 720000, 24904, 0x15574f7e +1, 724898, 2736, 0x023434fd +1, 729861, 2736, 0x906f1541 +0, 734400, 1908, 0xccb2dd3c +1, 734824, 2736, 0x85a31102 +0, 738000, 4676, 0xbfa42b7e +1, 739788, 3024, 0x9296a5f3 +0, 741600, 3600, 0x87c9dc58 +0, 745200, 8184, 0x504a8e65 +1, 745273, 1944, 0x7bf4dedc +0, 748800, 9636, 0x2efb3006 +1, 748800, 1944, 0x4196c404 +1, 752327, 1944, 0xcda97c7a +0, 752400, 9580, 0x0fb6f4e8 +1, 755853, 1944, 0x5f4922b2 +0, 756000, 7840, 0xe996f564 +1, 759380, 2088, 0x37dfc157 +0, 759600, 4208, 0xe9c2fba2 +0, 763200, 556, 0x3f1e077c diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/xwma-demux mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/xwma-demux --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/xwma-demux 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/xwma-demux 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1 @@ +CRC=0x2ac2159e diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/xxan-wc4 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/xxan-wc4 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/fate/xxan-wc4 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/fate/xxan-wc4 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,21 @@ +0, 0, 79360, 0x3b0a7d1b +0, 6000, 79360, 0x740842c3 +0, 12000, 79360, 0x85160167 +0, 18000, 79360, 0xaf510e92 +0, 24000, 79360, 0x8e290bec +0, 30000, 79360, 0x51e981b0 +0, 36000, 79360, 0x16e52c60 +0, 42000, 79360, 0x66e1e60a +0, 48000, 79360, 0x40fa58f6 +0, 54000, 79360, 0x00388edd +0, 60000, 79360, 0xc74f95bf +0, 66000, 79360, 0xf446a3fd +0, 72000, 79360, 0x27b5eb60 +0, 78000, 79360, 0xea9266a2 +0, 84000, 79360, 0x7b6a7907 +0, 90000, 79360, 0x2be7d946 +0, 96000, 79360, 0x61881ee4 +0, 102000, 79360, 0x9214bd4f +0, 108000, 79360, 0xeb294afe +0, 114000, 79360, 0xc861ad55 +0, 120000, 79360, 0x3d3b6220 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/ffm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/ffm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/ffm 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/ffm 2012-01-11 00:34:30.000000000 +0000 @@ -1,3 +1,3 @@ -b6acf782a38d313153b68c4ca204fc90 *./tests/data/lavf/lavf.ffm +bf46c0b53fc318d0a60fa9bf446b2e4f *./tests/data/lavf/lavf.ffm 376832 ./tests/data/lavf/lavf.ffm ./tests/data/lavf/lavf.ffm CRC=0xf361ed74 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/gif mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/gif --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/gif 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/gif 2012-01-11 00:34:30.000000000 +0000 @@ -1,3 +1,3 @@ -98968ceb210ab260a6a7af36767b94d3 *./tests/data/lavf/lavf.gif -2906382 ./tests/data/lavf/lavf.gif +e6089fd4ef3b9df44090ab3650bdd810 *./tests/data/lavf/lavf.gif +2906401 ./tests/data/lavf/lavf.gif ./tests/data/lavf/lavf.gif CRC=0xe5605ff6 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/mov mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/mov --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/mov 2011-05-15 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/mov 2012-01-11 00:34:30.000000000 +0000 @@ -1,3 +1,3 @@ -439684b82ccc1fdd24a23392c238ae53 *./tests/data/lavf/lavf.mov -357681 ./tests/data/lavf/lavf.mov +6c5472152b46e070ae6da359838e1f86 *./tests/data/lavf/lavf.mov +357717 ./tests/data/lavf/lavf.mov ./tests/data/lavf/lavf.mov CRC=0x2f6a9b26 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/mxf mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/mxf --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/mxf 2011-04-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/mxf 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,3 @@ 6e9bd63c5cadd7550ad313553ebf665f *./tests/data/lavf/lavf.mxf 525881 ./tests/data/lavf/lavf.mxf ./tests/data/lavf/lavf.mxf CRC=0x4ace0849 -e7168856f2b54c6272685967e707fb21 *./tests/data/lavf/lavf.mxf_d10 -5330989 ./tests/data/lavf/lavf.mxf_d10 -./tests/data/lavf/lavf.mxf_d10 CRC=0xc3f4f92e diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/mxf_d10 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/mxf_d10 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/mxf_d10 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/mxf_d10 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,3 @@ +e7168856f2b54c6272685967e707fb21 *./tests/data/lavf/lavf.mxf_d10 +5330989 ./tests/data/lavf/lavf.mxf_d10 +./tests/data/lavf/lavf.mxf_d10 CRC=0xc3f4f92e diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/ogg mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/ogg --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/ogg 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/ogg 2012-01-11 00:34:30.000000000 +0000 @@ -1,3 +1,3 @@ -364714f1087f3c1320b60f4209191d23 *./tests/data/lavf/lavf.ogg -13820 ./tests/data/lavf/lavf.ogg +b55661ae1a65f99af249d8efc7619a03 *./tests/data/lavf/lavf.ogg +13819 ./tests/data/lavf/lavf.ogg ./tests/data/lavf/lavf.ogg CRC=0xf1ae5536 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/ts mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/ts --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/ts 2011-04-29 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/ts 2012-01-11 00:34:30.000000000 +0000 @@ -1,3 +1,3 @@ -d260ac0534ff2e26b44b5192fd4fdc21 *./tests/data/lavf/lavf.ts +293142d7286db15e5f4d7d1ca0d9c97c *./tests/data/lavf/lavf.ts 406644 ./tests/data/lavf/lavf.ts ./tests/data/lavf/lavf.ts CRC=0x133216c1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/wav mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/wav --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavf/wav 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavf/wav 2012-01-11 00:34:30.000000000 +0000 @@ -1,3 +1,3 @@ -6a3bec31d92baf52161e25179ebba315 *./tests/data/lavf/lavf.wav -90156 ./tests/data/lavf/lavf.wav +8854ea97f2d2172383941b001c69228b *./tests/data/lavf/lavf.wav +90158 ./tests/data/lavf/lavf.wav ./tests/data/lavf/lavf.wav CRC=0xf1ae5536 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixdesc mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixdesc --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixdesc 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixdesc 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,64 @@ +abgr 037bf9df6a765520ad6d490066bf4b89 +argb c442a8261c2265a07212ef0f72e35f5a +bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b +bgr444be d9ea9307d21b162225b8b2c524cf9477 +bgr444le 88035350e9da3a8f67387890b956f0bc +bgr48be 00624e6c7ec7ab19897ba2f0a3257fe8 +bgr48le d02c235ebba7167881ca2d576497ff84 +bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806 +bgr555be 49f01b1f1f0c84fd9e776dd34cc3c280 +bgr555le 378d6ac4223651a1adcbf94a3d0d807b +bgr565be 257cf78afa35dc31e9696f139c916715 +bgr565le 1dfdd03995c287e3c754b164bf26a355 +bgr8 24bd566170343d06fec6fccfff5abc54 +bgra 76a18a5151242fa137133f604cd624d2 +gray db08f7f0751900347e6b8649e4164d21 +gray16be 7becf34ae825a3df3969bf4c6bfeb5e2 +gray16le 10bd87059b5c189f3caef2837f4f2b5c +monob 668ebe8b8103b9046b251b2fa8a1d88f +monow 9251497f3b0634f1165d12d5a289d943 +nv12 e0af357888584d36eec5aa0f673793ef +nv21 9a3297f3b34baa038b1f37cb202b512f +rgb24 b41eba9651e1b5fe386289b506188105 +rgb444be 9e89db334568c6b2e3d5d0540f4ba960 +rgb444le 0a68cb6de8bf530aa30c5c1205c25155 +rgb48be cc139ec1dd9451f0e049c0cb3a0c8aa2 +rgb48le 86c5608904f75360d492dbc5c9589969 +rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73 +rgb555be 912a62c5e53bfcbac2a0340e10973cf2 +rgb555le a937a0fc764fb57dc1b3af87cba0273c +rgb565be 9cadf742e05ddc23a3b5b270f89aad3c +rgb565le d39aa298bb525e9be8860351c6f62dab +rgb8 4a9d8e4f2f154e83a7e1735be6300700 +rgba 93a5b3712e6eb8c5b9a09ffc7b9fbc12 +uyvy422 adcf64516a19fce44df77082bdb16291 +yuv410p 2d9225153c83ee1132397d619d94d1b3 +yuv411p 8b298af3e43348ca1b11eb8a3252ac6c +yuv420p eba2f135a08829387e2f698ff72a2939 +yuv420p10be 299fe1d785a3d3dd5e70778700d7fb06 +yuv420p10le 8aee004e765a5383be0954f5e916b72f +yuv420p16be 16c009a235cd52b74791a895423152a3 +yuv420p16le 2d59c4f1d0314a5a957a7cfc4b6fabcc +yuv420p9be ce880fa07830e5297c22acf6e20555ce +yuv420p9le 16543fda8f87d94a6cf857d2e8d4461a +yuv422p c9bba4529821d796a6ab09f6a5fd355a +yuv422p10be 11af7dfafe8bc025c7e3bd82b830fe8a +yuv422p10le ec04efb76efa79bf0d02b21572371a56 +yuv422p16be 5499502e1c29534a158a1fe60e889f60 +yuv422p16le e3d61fde6978591596bc36b914386623 +yuv422p9be 29b71579946940a8c00fa844c9dff507 +yuv422p9le 062b7f9cbb972bf36b5bdb1a7623701a +yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf +yuv444p 0a98447b78fd476aa39686da6a74fa2e +yuv444p10be 71be185a2fb7a353eb024df9bc63212d +yuv444p10le c1c6b30a12065c7901c0a267e4861a0f +yuv444p16be 1c6ea2c2f5e539006112ceec3d4e7d90 +yuv444p16le 20f86bc2f68d2b3f1f2b48b97b2189f4 +yuv444p9be 6ab31f4c12b533ce318ecdff83cdd054 +yuv444p9le f0606604a5c08becab6ba500124c4b7c +yuva420p a29884f3f3dfe1e00b961bc17bef3d47 +yuvj420p 32eec78ba51857b16ce9b813a49b7189 +yuvj422p 0dfa0ed434f73be51428758c69e082cb +yuvj440p 657501a28004e27a592757a7509f5189 +yuvj444p 98d3d054f2ec09a75eeed5d328dc75b7 +yuyv422 f2569f2b5069a0ee0cecae33de0455e3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixdesc_be mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixdesc_be --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixdesc_be 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixdesc_be 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -abgr 037bf9df6a765520ad6d490066bf4b89 -argb c442a8261c2265a07212ef0f72e35f5a -bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b -bgr48be 4ba0ff7fc9e011ea264610ad1585bb1f -bgr48le d022bfdd6a07d5dcc693799322a386b4 -bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806 -bgr555be 49f01b1f1f0c84fd9e776dd34cc3c280 -bgr565be 257cf78afa35dc31e9696f139c916715 -bgr8 24bd566170343d06fec6fccfff5abc54 -bgra 76a18a5151242fa137133f604cd624d2 -gray db08f7f0751900347e6b8649e4164d21 -gray16be 7becf34ae825a3df3969bf4c6bfeb5e2 -gray16le 10bd87059b5c189f3caef2837f4f2b5c -monob 668ebe8b8103b9046b251b2fa8a1d88f -monow 9251497f3b0634f1165d12d5a289d943 -nv12 e0af357888584d36eec5aa0f673793ef -nv21 9a3297f3b34baa038b1f37cb202b512f -rgb24 b41eba9651e1b5fe386289b506188105 -rgb48be 460b6de89b156290a12d3941db8bd731 -rgb48le cd93cb34d15996987367dabda3a10128 -rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73 -rgb555be 912a62c5e53bfcbac2a0340e10973cf2 -rgb565be 9cadf742e05ddc23a3b5b270f89aad3c -rgb8 4a9d8e4f2f154e83a7e1735be6300700 -rgba 93a5b3712e6eb8c5b9a09ffc7b9fbc12 -uyvy422 adcf64516a19fce44df77082bdb16291 -yuv410p 2d9225153c83ee1132397d619d94d1b3 -yuv411p 8b298af3e43348ca1b11eb8a3252ac6c -yuv420p eba2f135a08829387e2f698ff72a2939 -yuv420p10be 7605e266c088d0fcf68c7b27c3ceff5f -yuv420p10le 4228ee628c6deec123a13b9784516cc7 -yuv420p16be 16c009a235cd52b74791a895423152a3 -yuv420p16le 2d59c4f1d0314a5a957a7cfc4b6fabcc -yuv420p9be ce880fa07830e5297c22acf6e20555ce -yuv420p9le 16543fda8f87d94a6cf857d2e8d4461a -yuv422p c9bba4529821d796a6ab09f6a5fd355a -yuv422p16be 5499502e1c29534a158a1fe60e889f60 -yuv422p16le e3d61fde6978591596bc36b914386623 -yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf -yuv444p 0a98447b78fd476aa39686da6a74fa2e -yuv444p16be ea602a24b8e6969679265078bd8607b6 -yuv444p16le 1262a0dc57ee147967fc896d04206313 -yuva420p a29884f3f3dfe1e00b961bc17bef3d47 -yuvj420p 32eec78ba51857b16ce9b813a49b7189 -yuvj422p 0dfa0ed434f73be51428758c69e082cb -yuvj440p 657501a28004e27a592757a7509f5189 -yuvj444p 98d3d054f2ec09a75eeed5d328dc75b7 -yuyv422 f2569f2b5069a0ee0cecae33de0455e3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixdesc_le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixdesc_le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixdesc_le 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixdesc_le 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -abgr 037bf9df6a765520ad6d490066bf4b89 -argb c442a8261c2265a07212ef0f72e35f5a -bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b -bgr48be 4ba0ff7fc9e011ea264610ad1585bb1f -bgr48le d022bfdd6a07d5dcc693799322a386b4 -bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806 -bgr555le 378d6ac4223651a1adcbf94a3d0d807b -bgr565le 1dfdd03995c287e3c754b164bf26a355 -bgr8 24bd566170343d06fec6fccfff5abc54 -bgra 76a18a5151242fa137133f604cd624d2 -gray db08f7f0751900347e6b8649e4164d21 -gray16be 7becf34ae825a3df3969bf4c6bfeb5e2 -gray16le 10bd87059b5c189f3caef2837f4f2b5c -monob 668ebe8b8103b9046b251b2fa8a1d88f -monow 9251497f3b0634f1165d12d5a289d943 -nv12 e0af357888584d36eec5aa0f673793ef -nv21 9a3297f3b34baa038b1f37cb202b512f -rgb24 b41eba9651e1b5fe386289b506188105 -rgb48be 460b6de89b156290a12d3941db8bd731 -rgb48le cd93cb34d15996987367dabda3a10128 -rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73 -rgb555le a937a0fc764fb57dc1b3af87cba0273c -rgb565le d39aa298bb525e9be8860351c6f62dab -rgb8 4a9d8e4f2f154e83a7e1735be6300700 -rgba 93a5b3712e6eb8c5b9a09ffc7b9fbc12 -uyvy422 adcf64516a19fce44df77082bdb16291 -yuv410p 2d9225153c83ee1132397d619d94d1b3 -yuv411p 8b298af3e43348ca1b11eb8a3252ac6c -yuv420p eba2f135a08829387e2f698ff72a2939 -yuv420p10be 7605e266c088d0fcf68c7b27c3ceff5f -yuv420p10le 4228ee628c6deec123a13b9784516cc7 -yuv420p16be 16c009a235cd52b74791a895423152a3 -yuv420p16le 2d59c4f1d0314a5a957a7cfc4b6fabcc -yuv420p9be ce880fa07830e5297c22acf6e20555ce -yuv420p9le 16543fda8f87d94a6cf857d2e8d4461a -yuv422p c9bba4529821d796a6ab09f6a5fd355a -yuv422p16be 5499502e1c29534a158a1fe60e889f60 -yuv422p16le e3d61fde6978591596bc36b914386623 -yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf -yuv444p 0a98447b78fd476aa39686da6a74fa2e -yuv444p16be ea602a24b8e6969679265078bd8607b6 -yuv444p16le 1262a0dc57ee147967fc896d04206313 -yuva420p a29884f3f3dfe1e00b961bc17bef3d47 -yuvj420p 32eec78ba51857b16ce9b813a49b7189 -yuvj422p 0dfa0ed434f73be51428758c69e082cb -yuvj440p 657501a28004e27a592757a7509f5189 -yuvj444p 98d3d054f2ec09a75eeed5d328dc75b7 -yuyv422 f2569f2b5069a0ee0cecae33de0455e3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_copy mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_copy --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_copy 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_copy 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,64 @@ +abgr 037bf9df6a765520ad6d490066bf4b89 +argb c442a8261c2265a07212ef0f72e35f5a +bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b +bgr444be d9ea9307d21b162225b8b2c524cf9477 +bgr444le 88035350e9da3a8f67387890b956f0bc +bgr48be 00624e6c7ec7ab19897ba2f0a3257fe8 +bgr48le d02c235ebba7167881ca2d576497ff84 +bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806 +bgr555be 49f01b1f1f0c84fd9e776dd34cc3c280 +bgr555le 378d6ac4223651a1adcbf94a3d0d807b +bgr565be 257cf78afa35dc31e9696f139c916715 +bgr565le 1dfdd03995c287e3c754b164bf26a355 +bgr8 24bd566170343d06fec6fccfff5abc54 +bgra 76a18a5151242fa137133f604cd624d2 +gray db08f7f0751900347e6b8649e4164d21 +gray16be 7becf34ae825a3df3969bf4c6bfeb5e2 +gray16le 10bd87059b5c189f3caef2837f4f2b5c +monob 668ebe8b8103b9046b251b2fa8a1d88f +monow 9251497f3b0634f1165d12d5a289d943 +nv12 e0af357888584d36eec5aa0f673793ef +nv21 9a3297f3b34baa038b1f37cb202b512f +rgb24 b41eba9651e1b5fe386289b506188105 +rgb444be 9e89db334568c6b2e3d5d0540f4ba960 +rgb444le 0a68cb6de8bf530aa30c5c1205c25155 +rgb48be cc139ec1dd9451f0e049c0cb3a0c8aa2 +rgb48le 86c5608904f75360d492dbc5c9589969 +rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73 +rgb555be 912a62c5e53bfcbac2a0340e10973cf2 +rgb555le a937a0fc764fb57dc1b3af87cba0273c +rgb565be 9cadf742e05ddc23a3b5b270f89aad3c +rgb565le d39aa298bb525e9be8860351c6f62dab +rgb8 4a9d8e4f2f154e83a7e1735be6300700 +rgba 93a5b3712e6eb8c5b9a09ffc7b9fbc12 +uyvy422 adcf64516a19fce44df77082bdb16291 +yuv410p 2d9225153c83ee1132397d619d94d1b3 +yuv411p 8b298af3e43348ca1b11eb8a3252ac6c +yuv420p eba2f135a08829387e2f698ff72a2939 +yuv420p10be 299fe1d785a3d3dd5e70778700d7fb06 +yuv420p10le 8aee004e765a5383be0954f5e916b72f +yuv420p16be 16c009a235cd52b74791a895423152a3 +yuv420p16le 2d59c4f1d0314a5a957a7cfc4b6fabcc +yuv420p9be ce880fa07830e5297c22acf6e20555ce +yuv420p9le 16543fda8f87d94a6cf857d2e8d4461a +yuv422p c9bba4529821d796a6ab09f6a5fd355a +yuv422p10be 11af7dfafe8bc025c7e3bd82b830fe8a +yuv422p10le ec04efb76efa79bf0d02b21572371a56 +yuv422p16be 5499502e1c29534a158a1fe60e889f60 +yuv422p16le e3d61fde6978591596bc36b914386623 +yuv422p9be 29b71579946940a8c00fa844c9dff507 +yuv422p9le 062b7f9cbb972bf36b5bdb1a7623701a +yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf +yuv444p 0a98447b78fd476aa39686da6a74fa2e +yuv444p10be 71be185a2fb7a353eb024df9bc63212d +yuv444p10le c1c6b30a12065c7901c0a267e4861a0f +yuv444p16be 1c6ea2c2f5e539006112ceec3d4e7d90 +yuv444p16le 20f86bc2f68d2b3f1f2b48b97b2189f4 +yuv444p9be 6ab31f4c12b533ce318ecdff83cdd054 +yuv444p9le f0606604a5c08becab6ba500124c4b7c +yuva420p a29884f3f3dfe1e00b961bc17bef3d47 +yuvj420p 32eec78ba51857b16ce9b813a49b7189 +yuvj422p 0dfa0ed434f73be51428758c69e082cb +yuvj440p 657501a28004e27a592757a7509f5189 +yuvj444p 98d3d054f2ec09a75eeed5d328dc75b7 +yuyv422 f2569f2b5069a0ee0cecae33de0455e3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_copy_le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_copy_le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_copy_le 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_copy_le 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -abgr 037bf9df6a765520ad6d490066bf4b89 -argb c442a8261c2265a07212ef0f72e35f5a -bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b -bgr48be 4ba0ff7fc9e011ea264610ad1585bb1f -bgr48le d022bfdd6a07d5dcc693799322a386b4 -bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806 -bgr555le 378d6ac4223651a1adcbf94a3d0d807b -bgr565le 1dfdd03995c287e3c754b164bf26a355 -bgr8 24bd566170343d06fec6fccfff5abc54 -bgra 76a18a5151242fa137133f604cd624d2 -gray db08f7f0751900347e6b8649e4164d21 -gray16be 7becf34ae825a3df3969bf4c6bfeb5e2 -gray16le 10bd87059b5c189f3caef2837f4f2b5c -monob 668ebe8b8103b9046b251b2fa8a1d88f -monow 9251497f3b0634f1165d12d5a289d943 -nv12 e0af357888584d36eec5aa0f673793ef -nv21 9a3297f3b34baa038b1f37cb202b512f -rgb24 b41eba9651e1b5fe386289b506188105 -rgb48be 460b6de89b156290a12d3941db8bd731 -rgb48le cd93cb34d15996987367dabda3a10128 -rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73 -rgb555le a937a0fc764fb57dc1b3af87cba0273c -rgb565le d39aa298bb525e9be8860351c6f62dab -rgb8 4a9d8e4f2f154e83a7e1735be6300700 -rgba 93a5b3712e6eb8c5b9a09ffc7b9fbc12 -uyvy422 adcf64516a19fce44df77082bdb16291 -yuv410p 2d9225153c83ee1132397d619d94d1b3 -yuv411p 8b298af3e43348ca1b11eb8a3252ac6c -yuv420p eba2f135a08829387e2f698ff72a2939 -yuv420p10be 7605e266c088d0fcf68c7b27c3ceff5f -yuv420p10le 4228ee628c6deec123a13b9784516cc7 -yuv420p16be 16c009a235cd52b74791a895423152a3 -yuv420p16le 2d59c4f1d0314a5a957a7cfc4b6fabcc -yuv420p9be ce880fa07830e5297c22acf6e20555ce -yuv420p9le 16543fda8f87d94a6cf857d2e8d4461a -yuv422p c9bba4529821d796a6ab09f6a5fd355a -yuv422p16be 5499502e1c29534a158a1fe60e889f60 -yuv422p16le e3d61fde6978591596bc36b914386623 -yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf -yuv444p 0a98447b78fd476aa39686da6a74fa2e -yuv444p16be ea602a24b8e6969679265078bd8607b6 -yuv444p16le 1262a0dc57ee147967fc896d04206313 -yuva420p a29884f3f3dfe1e00b961bc17bef3d47 -yuvj420p 32eec78ba51857b16ce9b813a49b7189 -yuvj422p 0dfa0ed434f73be51428758c69e082cb -yuvj440p 657501a28004e27a592757a7509f5189 -yuvj444p 98d3d054f2ec09a75eeed5d328dc75b7 -yuyv422 f2569f2b5069a0ee0cecae33de0455e3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_crop mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_crop --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_crop 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_crop 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,42 @@ +abgr cd761690872843d1b7ab0c695393c751 +argb 2ec6ef18769bcd651c2e8904d5a3ee67 +bgr24 3450fd00cf1493d1ded75544d82ba3ec +bgr48be 18ca4002732f278cc9f525215c2fca41 +bgr48le 395a4c187c4e95217d089bd3df9f3654 +bgr4_byte 2f6ac3cdd4676ab4e2982bdf0664945b +bgr555be d3a7c273604723adeb7e5f5dd1c4272b +bgr555le d22442fc13b464f9ba455b08df4e981f +bgr565be fadceef4a64ad6873fcb43ddee0deb3c +bgr565le 891664e5a54ae5968901347da92bc5e9 +bgr8 4b7159e05765bd4703180072d86423c8 +bgra 395c9f706fccda721471acaa5c96c16c +gray 8c4850e66562a587a292dc728a65ea4a +gray16be daa5a6b98fb4a280c57c57bff1a2ab5a +gray16le 84f5ea7259073edcb893113b42213c8e +rgb24 3b90ed64b687d3dc186c6ef521dc71a8 +rgb48be e6fd353c0eb9bea889423954414bea35 +rgb48le 68a1723da11ce08b502d42e204376503 +rgb4_byte 6958029f73c6cdfed4f71020d816f027 +rgb555be 41a7d1836837bc90f2cae19a9c9df3b3 +rgb555le eeb78f8ce6186fba55c941469e60ba67 +rgb565be b2d1cb525f3a0cfe27753c0d479b2fa9 +rgb565le 6a49700680be9a0d434411825a769556 +rgb8 88b0398c265d1ed7a837dc084fa0917c +rgba fd00b24c7597268c32759a84a1de2de4 +yuv410p a9f2eaa747bf988b7bebe4f442b9c67a +yuv411p 3334d3aef8dba238658090ac172375d1 +yuv420p bfea0188ddd4889787c403caae119cc7 +yuv420p16be 8365eff38b8c329aeb95fc605fa229bb +yuv420p16le 5e8dd38d973d5854abe1ad4efad20cc1 +yuv422p f2f930a91fe00d4252c4720b5ecd8961 +yuv422p16be 167e4338811a7d272925a4c6417d60da +yuv422p16le 3359395d5875d581fa1e975013d30114 +yuv440p 2472417d980e395ad6843cbb8b633b29 +yuv444p 1f151980486848c96bc5585ced99003e +yuv444p16be 1ce8fcd4712d525af983e6179d6a4f9e +yuv444p16le 5f1441e18345aadb3f881dac99c6c08a +yuva420p 7536753dfbc7932560fb50c921369a0e +yuvj420p 21f891093006d42d7683b0e1d773a657 +yuvj422p 9a43d474c407590ad8f213880586b45e +yuvj440p 977351350450ebdbf7a9d20020c6b5a5 +yuvj444p 4a50ba26859dad91dcf7000de0d0efa1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_crop_le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_crop_le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_crop_le 2011-04-29 02:05:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_crop_le 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -abgr cd761690872843d1b7ab0c695393c751 -argb 2ec6ef18769bcd651c2e8904d5a3ee67 -bgr24 3450fd00cf1493d1ded75544d82ba3ec -bgr48be 90cb5d373a1123432d63c6a10c101afa -bgr48le 9371f54ceda9010f1199e86f4930ac3f -bgr4_byte 2f6ac3cdd4676ab4e2982bdf0664945b -bgr555le d22442fc13b464f9ba455b08df4e981f -bgr565le 891664e5a54ae5968901347da92bc5e9 -bgr8 4b7159e05765bd4703180072d86423c8 -bgra 395c9f706fccda721471acaa5c96c16c -gray 8c4850e66562a587a292dc728a65ea4a -gray16be daa5a6b98fb4a280c57c57bff1a2ab5a -gray16le 84f5ea7259073edcb893113b42213c8e -rgb24 3b90ed64b687d3dc186c6ef521dc71a8 -rgb48be a808128041a1962deaa8620c7448feba -rgb48le ce92d02cc322608d5be377cb1940677b -rgb4_byte 6958029f73c6cdfed4f71020d816f027 -rgb555le eeb78f8ce6186fba55c941469e60ba67 -rgb565le 6a49700680be9a0d434411825a769556 -rgb8 88b0398c265d1ed7a837dc084fa0917c -rgba fd00b24c7597268c32759a84a1de2de4 -yuv410p a9f2eaa747bf988b7bebe4f442b9c67a -yuv411p 3334d3aef8dba238658090ac172375d1 -yuv420p bfea0188ddd4889787c403caae119cc7 -yuv420p16be 8365eff38b8c329aeb95fc605fa229bb -yuv420p16le 5e8dd38d973d5854abe1ad4efad20cc1 -yuv422p f2f930a91fe00d4252c4720b5ecd8961 -yuv422p16be 167e4338811a7d272925a4c6417d60da -yuv422p16le 3359395d5875d581fa1e975013d30114 -yuv440p 2472417d980e395ad6843cbb8b633b29 -yuv444p 1f151980486848c96bc5585ced99003e -yuv444p16be d69280c2856865d2ea94bd5292aac1c6 -yuv444p16le 33f43e030bedf9723be4f63c3e9fc80e -yuva420p 7536753dfbc7932560fb50c921369a0e -yuvj420p 21f891093006d42d7683b0e1d773a657 -yuvj422p 9a43d474c407590ad8f213880586b45e -yuvj440p 977351350450ebdbf7a9d20020c6b5a5 -yuvj444p 4a50ba26859dad91dcf7000de0d0efa1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_hflip mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_hflip --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_hflip 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_hflip 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,42 @@ +abgr 49468c6c9ceee5d52b08b1270a909323 +argb 50ba9f16c6475530602f2983278b82d0 +bgr24 cc53d2011d097972db0d22756c3699e3 +bgr48be 815192d3757c66de97b0d51818acbe0f +bgr48le 8e4184ac6eae251b4bace51dba7d790c +bgr4_byte aac987e7d1a6a96477cfc0b48a4285de +bgr555be bc07265898440116772200390d70c092 +bgr555le ccee08679bac84a1f960c6c9070c5538 +bgr565be e088789ce46224b87c6e46610ef19add +bgr565le 3703466e19e1b52e03a34fd244a8e8e4 +bgr8 50b505a889f0428242305acb642da107 +bgra 01ca21e7e6a8d1281b4553bde8e8a404 +gray 03efcb4ab52a24c0af0e03cfd26c9377 +gray16be 9bcbca979601ddc4869f846f08f3d1dd +gray16le c1b8965adcc7f847ee343149ff507073 +rgb24 754f1722fc738590cc407ac65749bfe8 +rgb48be d690412ca5fada031b5da47b87096248 +rgb48le c901feb564232f5d0bc0eabd66dae3e7 +rgb4_byte c8a3f995fcf3e0919239ea2c413ddc29 +rgb555be 045ce8607d3910586f4d97481dda8632 +rgb555le 8778ee0cf58ce9ad1d99a1eca9f95e87 +rgb565be c8022a1b2470e72f124e4389fad4c372 +rgb565le 2cb690eb3fcb72da3771ad6a48931158 +rgb8 9e462b811b9b6173397b9cfc1f6b2f17 +rgba d3d0dc1ecef3ed72f26a2986d0efc204 +yuv410p acb543ebbbf63eefe533e6faffc006da +yuv411p c626cf6d191139b4ca7efc0155f957f1 +yuv420p 2d5c80f9ba2ddd85b2aeda3564cc7d64 +yuv420p16be 758b0c1e2113b15e7afde48da4e4d024 +yuv420p16le 480ccd951dcb806bc875d307e02e50a0 +yuv422p 6e728f4eb9eae287c224f396d84be6ea +yuv422p16be a05d43cd62b790087bd37083174557de +yuv422p16le 6954abebcbc62d81068d58d0c62bdd5b +yuv440p a99e2b57ed601f39852715c9d675d0d3 +yuv444p 947e47f7bb5fdccc659d19b7df2b6fc3 +yuv444p16be 58c012e5ab73b066ef3c2b6411a395f1 +yuv444p16le 32c12794e184042a59738ab2de608c8d +yuva420p d83ec0c01498189f179ec574918185f1 +yuvj420p df3aaaec3bb157c3bde5f0365af30f4f +yuvj422p d113871528d510a192797af59df9c05c +yuvj440p 07f5ff12ced85aba1b5cf51692fff4bb +yuvj444p 8d95f6b4d4c9b4b0389d36df686bfa46 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_hflip_le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_hflip_le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_hflip_le 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_hflip_le 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -abgr 49468c6c9ceee5d52b08b1270a909323 -argb 50ba9f16c6475530602f2983278b82d0 -bgr24 cc53d2011d097972db0d22756c3699e3 -bgr48be 11641cf0f4516a9aed98f7872720f801 -bgr48le b5440734eed128554dd9f83b34ba582f -bgr4_byte aac987e7d1a6a96477cfc0b48a4285de -bgr555le ccee08679bac84a1f960c6c9070c5538 -bgr565le 3703466e19e1b52e03a34fd244a8e8e4 -bgr8 50b505a889f0428242305acb642da107 -bgra 01ca21e7e6a8d1281b4553bde8e8a404 -gray 03efcb4ab52a24c0af0e03cfd26c9377 -gray16be 9bcbca979601ddc4869f846f08f3d1dd -gray16le c1b8965adcc7f847ee343149ff507073 -rgb24 754f1722fc738590cc407ac65749bfe8 -rgb48be 10743e1577dc3198dbbc7c0b3b8f429e -rgb48le dd945a44f39119221407bf7a04f1bc49 -rgb4_byte c8a3f995fcf3e0919239ea2c413ddc29 -rgb555le 8778ee0cf58ce9ad1d99a1eca9f95e87 -rgb565le 2cb690eb3fcb72da3771ad6a48931158 -rgb8 9e462b811b9b6173397b9cfc1f6b2f17 -rgba d3d0dc1ecef3ed72f26a2986d0efc204 -yuv410p acb543ebbbf63eefe533e6faffc006da -yuv411p c626cf6d191139b4ca7efc0155f957f1 -yuv420p 2d5c80f9ba2ddd85b2aeda3564cc7d64 -yuv420p16be 758b0c1e2113b15e7afde48da4e4d024 -yuv420p16le 480ccd951dcb806bc875d307e02e50a0 -yuv422p 6e728f4eb9eae287c224f396d84be6ea -yuv422p16be a05d43cd62b790087bd37083174557de -yuv422p16le 6954abebcbc62d81068d58d0c62bdd5b -yuv440p a99e2b57ed601f39852715c9d675d0d3 -yuv444p 947e47f7bb5fdccc659d19b7df2b6fc3 -yuv444p16be e5ef45bc3d2f5b0b2542d5151340c382 -yuv444p16le 70793e3d66d0c23a0cdedabe9c24c2a7 -yuva420p d83ec0c01498189f179ec574918185f1 -yuvj420p df3aaaec3bb157c3bde5f0365af30f4f -yuvj422p d113871528d510a192797af59df9c05c -yuvj440p 07f5ff12ced85aba1b5cf51692fff4bb -yuvj444p 8d95f6b4d4c9b4b0389d36df686bfa46 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_null mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_null --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_null 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_null 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,64 @@ +abgr 037bf9df6a765520ad6d490066bf4b89 +argb c442a8261c2265a07212ef0f72e35f5a +bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b +bgr444be d9ea9307d21b162225b8b2c524cf9477 +bgr444le 88035350e9da3a8f67387890b956f0bc +bgr48be 00624e6c7ec7ab19897ba2f0a3257fe8 +bgr48le d02c235ebba7167881ca2d576497ff84 +bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806 +bgr555be 49f01b1f1f0c84fd9e776dd34cc3c280 +bgr555le 378d6ac4223651a1adcbf94a3d0d807b +bgr565be 257cf78afa35dc31e9696f139c916715 +bgr565le 1dfdd03995c287e3c754b164bf26a355 +bgr8 24bd566170343d06fec6fccfff5abc54 +bgra 76a18a5151242fa137133f604cd624d2 +gray db08f7f0751900347e6b8649e4164d21 +gray16be 7becf34ae825a3df3969bf4c6bfeb5e2 +gray16le 10bd87059b5c189f3caef2837f4f2b5c +monob 668ebe8b8103b9046b251b2fa8a1d88f +monow 9251497f3b0634f1165d12d5a289d943 +nv12 e0af357888584d36eec5aa0f673793ef +nv21 9a3297f3b34baa038b1f37cb202b512f +rgb24 b41eba9651e1b5fe386289b506188105 +rgb444be 9e89db334568c6b2e3d5d0540f4ba960 +rgb444le 0a68cb6de8bf530aa30c5c1205c25155 +rgb48be cc139ec1dd9451f0e049c0cb3a0c8aa2 +rgb48le 86c5608904f75360d492dbc5c9589969 +rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73 +rgb555be 912a62c5e53bfcbac2a0340e10973cf2 +rgb555le a937a0fc764fb57dc1b3af87cba0273c +rgb565be 9cadf742e05ddc23a3b5b270f89aad3c +rgb565le d39aa298bb525e9be8860351c6f62dab +rgb8 4a9d8e4f2f154e83a7e1735be6300700 +rgba 93a5b3712e6eb8c5b9a09ffc7b9fbc12 +uyvy422 adcf64516a19fce44df77082bdb16291 +yuv410p 2d9225153c83ee1132397d619d94d1b3 +yuv411p 8b298af3e43348ca1b11eb8a3252ac6c +yuv420p eba2f135a08829387e2f698ff72a2939 +yuv420p10be 299fe1d785a3d3dd5e70778700d7fb06 +yuv420p10le 8aee004e765a5383be0954f5e916b72f +yuv420p16be 16c009a235cd52b74791a895423152a3 +yuv420p16le 2d59c4f1d0314a5a957a7cfc4b6fabcc +yuv420p9be ce880fa07830e5297c22acf6e20555ce +yuv420p9le 16543fda8f87d94a6cf857d2e8d4461a +yuv422p c9bba4529821d796a6ab09f6a5fd355a +yuv422p10be 11af7dfafe8bc025c7e3bd82b830fe8a +yuv422p10le ec04efb76efa79bf0d02b21572371a56 +yuv422p16be 5499502e1c29534a158a1fe60e889f60 +yuv422p16le e3d61fde6978591596bc36b914386623 +yuv422p9be 29b71579946940a8c00fa844c9dff507 +yuv422p9le 062b7f9cbb972bf36b5bdb1a7623701a +yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf +yuv444p 0a98447b78fd476aa39686da6a74fa2e +yuv444p10be 71be185a2fb7a353eb024df9bc63212d +yuv444p10le c1c6b30a12065c7901c0a267e4861a0f +yuv444p16be 1c6ea2c2f5e539006112ceec3d4e7d90 +yuv444p16le 20f86bc2f68d2b3f1f2b48b97b2189f4 +yuv444p9be 6ab31f4c12b533ce318ecdff83cdd054 +yuv444p9le f0606604a5c08becab6ba500124c4b7c +yuva420p a29884f3f3dfe1e00b961bc17bef3d47 +yuvj420p 32eec78ba51857b16ce9b813a49b7189 +yuvj422p 0dfa0ed434f73be51428758c69e082cb +yuvj440p 657501a28004e27a592757a7509f5189 +yuvj444p 98d3d054f2ec09a75eeed5d328dc75b7 +yuyv422 f2569f2b5069a0ee0cecae33de0455e3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_null_le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_null_le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_null_le 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_null_le 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -abgr 037bf9df6a765520ad6d490066bf4b89 -argb c442a8261c2265a07212ef0f72e35f5a -bgr24 0d0cb38ab3fa0b2ec0865c14f78b217b -bgr48be 4ba0ff7fc9e011ea264610ad1585bb1f -bgr48le d022bfdd6a07d5dcc693799322a386b4 -bgr4_byte 50d23cc82d9dcef2fd12adb81fb9b806 -bgr555le 378d6ac4223651a1adcbf94a3d0d807b -bgr565le 1dfdd03995c287e3c754b164bf26a355 -bgr8 24bd566170343d06fec6fccfff5abc54 -bgra 76a18a5151242fa137133f604cd624d2 -gray db08f7f0751900347e6b8649e4164d21 -gray16be 7becf34ae825a3df3969bf4c6bfeb5e2 -gray16le 10bd87059b5c189f3caef2837f4f2b5c -monob 668ebe8b8103b9046b251b2fa8a1d88f -monow 9251497f3b0634f1165d12d5a289d943 -nv12 e0af357888584d36eec5aa0f673793ef -nv21 9a3297f3b34baa038b1f37cb202b512f -rgb24 b41eba9651e1b5fe386289b506188105 -rgb48be 460b6de89b156290a12d3941db8bd731 -rgb48le cd93cb34d15996987367dabda3a10128 -rgb4_byte c93ba89b74c504e7f5ae9d9ab1546c73 -rgb555le a937a0fc764fb57dc1b3af87cba0273c -rgb565le d39aa298bb525e9be8860351c6f62dab -rgb8 4a9d8e4f2f154e83a7e1735be6300700 -rgba 93a5b3712e6eb8c5b9a09ffc7b9fbc12 -uyvy422 adcf64516a19fce44df77082bdb16291 -yuv410p 2d9225153c83ee1132397d619d94d1b3 -yuv411p 8b298af3e43348ca1b11eb8a3252ac6c -yuv420p eba2f135a08829387e2f698ff72a2939 -yuv420p10be 7605e266c088d0fcf68c7b27c3ceff5f -yuv420p10le 4228ee628c6deec123a13b9784516cc7 -yuv420p16be 16c009a235cd52b74791a895423152a3 -yuv420p16le 2d59c4f1d0314a5a957a7cfc4b6fabcc -yuv420p9be ce880fa07830e5297c22acf6e20555ce -yuv420p9le 16543fda8f87d94a6cf857d2e8d4461a -yuv422p c9bba4529821d796a6ab09f6a5fd355a -yuv422p16be 5499502e1c29534a158a1fe60e889f60 -yuv422p16le e3d61fde6978591596bc36b914386623 -yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf -yuv444p 0a98447b78fd476aa39686da6a74fa2e -yuv444p16be ea602a24b8e6969679265078bd8607b6 -yuv444p16le 1262a0dc57ee147967fc896d04206313 -yuva420p a29884f3f3dfe1e00b961bc17bef3d47 -yuvj420p 32eec78ba51857b16ce9b813a49b7189 -yuvj422p 0dfa0ed434f73be51428758c69e082cb -yuvj440p 657501a28004e27a592757a7509f5189 -yuvj444p 98d3d054f2ec09a75eeed5d328dc75b7 -yuyv422 f2569f2b5069a0ee0cecae33de0455e3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_pad mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_pad --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_pad 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_pad 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,17 @@ +abgr e8e5e350c856c051d502cd435a2aa0bd +argb a98e0a1213824ee4566d4891468bb614 +bgr24 ac7417cea8d6e799a31a3c9a39b8f202 +bgra 6113a09a023cb2b08e9cad78eb1eb37a +rgb24 65eed443acc66c4f02bab6df4ebed515 +rgba 74d4158ad0c626e9a7c6923b9ca73294 +yuv410p a5210eb6a9b10c3269899b935df9a2d6 +yuv411p a23380c9698e2d80c9fa8a8b6d4f6854 +yuv420p f8733600369adaea28aa445dbdf2ed4c +yuv422p 3e0d822c11c716e7636387b1bf27c5ff +yuv440p 225dd7fbc8cceb24c26b765187d43a9e +yuv444p 45484f0411d336ce94636da0395f4692 +yuva420p 919722724765dc3a716c38fa53b20580 +yuvj420p 4f20e2799966c21a9d9e0788b0956925 +yuvj422p e4d84b0683f77a76f1c17d976eff127c +yuvj440p 33511c43339aa32533ab832861c150c3 +yuvj444p 82f0badd9d0c062bbfa0d9d73d7240a3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_pad_le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_pad_le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_pad_le 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_pad_le 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -abgr e8e5e350c856c051d502cd435a2aa0bd -argb a98e0a1213824ee4566d4891468bb614 -bgr24 ac7417cea8d6e799a31a3c9a39b8f202 -bgra 6113a09a023cb2b08e9cad78eb1eb37a -rgb24 65eed443acc66c4f02bab6df4ebed515 -rgba 74d4158ad0c626e9a7c6923b9ca73294 -yuv410p a5210eb6a9b10c3269899b935df9a2d6 -yuv411p a23380c9698e2d80c9fa8a8b6d4f6854 -yuv420p f8733600369adaea28aa445dbdf2ed4c -yuv422p 3e0d822c11c716e7636387b1bf27c5ff -yuv440p 225dd7fbc8cceb24c26b765187d43a9e -yuv444p 45484f0411d336ce94636da0395f4692 -yuva420p 919722724765dc3a716c38fa53b20580 -yuvj420p 4f20e2799966c21a9d9e0788b0956925 -yuvj422p e4d84b0683f77a76f1c17d976eff127c -yuvj440p 33511c43339aa32533ab832861c150c3 -yuvj444p 82f0badd9d0c062bbfa0d9d73d7240a3 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_scale mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_scale --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_scale 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_scale 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,64 @@ +abgr d894cb97f6c80eb21bdbe8a4eea62d86 +argb 54346f2b2eef10919e0f247241df3b24 +bgr24 570f8d6b51a838aed022ef67535f6bdc +bgr444be 25fe04f73a3bad4140d1c4f96ca5b670 +bgr444le 2fde227e6cea6dca5decdd0b7c0866f7 +bgr48be 390d3058a12a99c2b153ed7922508bea +bgr48le 39fe06feb4ec1d9730dccc04a0cfac4c +bgr4_byte ee1d35a7baf8e9016891929a2f565c0b +bgr555be de8901c1358834fddea060fcb3a67beb +bgr555le 36b745067197f9ca8c1731cac51329c9 +bgr565be 922a2503767036ae9536f4f7823c04ee +bgr565le 3a514a298c6161a071ddf9963c06509d +bgr8 7f007fa6c153a16e808a9c51605a4016 +bgra a5e7040f9a80cccd65e5acf2ca09ace5 +gray d7786a7d9d99ac74230cc045cab5632c +gray16be b554d6c1cc8da23967445be4dd3e4a86 +gray16le 715a33aa1c19cb26b14f5cc000e7a3d1 +monob 88c4c050758e64d120f50c7eff694381 +monow d31772ebaa877fc2a78565937f7f9673 +nv12 4676d59db43d657dc12841f6bc3ab452 +nv21 69c699510ff1fb777b118ebee1002f14 +rgb24 514692e28e8ff6860e415ce4fcf6eb8c +rgb444be 12254053ae93373869fca18b2afcba31 +rgb444le badbd68b59c87df6ae73248309637634 +rgb48be 8fac63787a711886030f8e056872b488 +rgb48le ab92f2763a2eb264c3870cc758f97149 +rgb4_byte d81ffd3add95842a618eec81024f0b5c +rgb555be 4607309f9f217d51cbb53d13b84b4537 +rgb555le a350ef1dc2c9688ed49e7ba018843795 +rgb565be 678ce231c4ea13629c1353b1df4ffbef +rgb565le 6f4bb711238baa762d73305213f8d035 +rgb8 091d0170b354ef0e97312b95feb5483f +rgba a3d362f222098a00e63867f612018659 +uyvy422 314bd486277111a95d9369b944fa0400 +yuv410p 7df8f6d69b56a8dcb6c7ee908e5018b5 +yuv411p 1143e7c5cc28fe0922b051b17733bc4c +yuv420p fdad2d8df8985e3d17e73c71f713cb14 +yuv420p10be 27f28a6e09b1c04d0f755035a5db1f43 +yuv420p10le a5a1692e026590ba2eddb46b9b827529 +yuv420p16be d7270efce54eb59c7b01c14157a1b890 +yuv420p16le e85abf00bad940a922b623c91c9026d7 +yuv420p9be bb87fddca65d1742412c8d2b1caf96c6 +yuv420p9le 828eec50014a41258a5423c1fe56ac97 +yuv422p 918e37701ee7377d16a8a6c119c56a40 +yuv422p10be 315654908d50718e175aae018c484732 +yuv422p10le 91bbc78a9a56f659b55abc17722dcc09 +yuv422p16be e7e34fe9264784763ab6cb406524c0f3 +yuv422p16le c435b76b08204dda6908640fb5fd4621 +yuv422p9be 82494823944912f73cebc58ad2979bbd +yuv422p9le fc69c8a21f473916a4b4225636b97e06 +yuv440p 461503fdb9b90451020aa3b25ddf041c +yuv444p 81b2eba962d12e8d64f003ac56f6faf2 +yuv444p10be fb304d77c6d2e18df5938662a22176f0 +yuv444p10le b17136913eb066dca6be6af645b9f7e8 +yuv444p16be 0da9bed80f5542682ab286f3261cf24c +yuv444p16le a0c5d3c7bf3f181db503cf8e450d1335 +yuv444p9be 9ac2643ce7f7e5c4e17c8c9fd8494d4a +yuv444p9le 896a1cc9cccca1ba410dd53942d33cc4 +yuva420p 8673a9131fb47de69788863f93a50eb7 +yuvj420p 30427bd6caf5bda93a173dbebe759e09 +yuvj422p fc8288f64fd149573f73cf8da05d8e6d +yuvj440p 508ac7a9ddeb6d1794a1100ba7a1664c +yuvj444p 73aebe144085b22d1189caf6ca07e18c +yuyv422 169e19ac91b257bd84ace0fdf56559ad diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_scale_le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_scale_le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_scale_le 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_scale_le 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -abgr d894cb97f6c80eb21bdbe8a4eea62d86 -argb 54346f2b2eef10919e0f247241df3b24 -bgr24 570f8d6b51a838aed022ef67535f6bdc -bgr48be fcc0f2dbf45d325f84f816c74cbeeebe -bgr48le 3f9c2b23eed3b8d196d1c14b38ce50f5 -bgr4_byte ee1d35a7baf8e9016891929a2f565c0b -bgr555le 36b745067197f9ca8c1731cac51329c9 -bgr565le 3a514a298c6161a071ddf9963c06509d -bgr8 7f007fa6c153a16e808a9c51605a4016 -bgra a5e7040f9a80cccd65e5acf2ca09ace5 -gray d7786a7d9d99ac74230cc045cab5632c -gray16be af39ce3a497f6734b157c8b94544f537 -gray16le 7ac1b788bcc472010df7a97e762485e0 -monob 88c4c050758e64d120f50c7eff694381 -monow d31772ebaa877fc2a78565937f7f9673 -nv12 4676d59db43d657dc12841f6bc3ab452 -nv21 69c699510ff1fb777b118ebee1002f14 -rgb24 514692e28e8ff6860e415ce4fcf6eb8c -rgb48be 1894cd30dabcd3180518e4d5f09f25e7 -rgb48le 1354e6e27ce3c1d4d4989ee56030c94b -rgb4_byte d81ffd3add95842a618eec81024f0b5c -rgb555le a350ef1dc2c9688ed49e7ba018843795 -rgb565le 6f4bb711238baa762d73305213f8d035 -rgb8 091d0170b354ef0e97312b95feb5483f -rgba a3d362f222098a00e63867f612018659 -uyvy422 314bd486277111a95d9369b944fa0400 -yuv410p 7df8f6d69b56a8dcb6c7ee908e5018b5 -yuv411p 1143e7c5cc28fe0922b051b17733bc4c -yuv420p fdad2d8df8985e3d17e73c71f713cb14 -yuv420p10be 6d335e75b553da590135cf8bb999610c -yuv420p10le d510ddbabefd03ef39ec943fcb51b709 -yuv420p16be 29a0265764530070f5cd3251cc01f66a -yuv420p16le 6f3a265b084a78baec229238d9f7945f -yuv420p9be ec4983b7a949c0472110a7a2c58e278a -yuv420p9le c136dce5913a722eee44ab72cff664b2 -yuv422p 918e37701ee7377d16a8a6c119c56a40 -yuv422p16be ef3e865fc1d0c68977c735323c50af6e -yuv422p16le 428a9b96214c09cb5a983ce36d6961ff -yuv440p 461503fdb9b90451020aa3b25ddf041c -yuv444p 81b2eba962d12e8d64f003ac56f6faf2 -yuv444p16be 99a3738c70c8fbdc5a0e4ad4bf50648d -yuv444p16le 385d0cc5240d62da0871915be5d86f0a -yuva420p 8673a9131fb47de69788863f93a50eb7 -yuvj420p 30427bd6caf5bda93a173dbebe759e09 -yuvj422p fc8288f64fd149573f73cf8da05d8e6d -yuvj440p 508ac7a9ddeb6d1794a1100ba7a1664c -yuvj444p 73aebe144085b22d1189caf6ca07e18c -yuyv422 169e19ac91b257bd84ace0fdf56559ad diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_vflip mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_vflip --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_vflip 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_vflip 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,64 @@ +abgr 25e72e9dbd01ab00727c976d577f7be5 +argb 19869bf1a5ac0b6af4d8bbe2c104533c +bgr24 89108a4ba00201f79b75b9305c42352d +bgr444be 9ef12c42fb791948ca4423c452dc6b9a +bgr444le 3650ecfc163abd1596c0cd29d130c4b0 +bgr48be 2f23931844f57641f3737348182d118c +bgr48le 4242a026012b6c135a6aa138a6d67031 +bgr4_byte 407fcf564ed764c38e1d748f700ab921 +bgr555be f739d2519f7e9d494359bf67a3821537 +bgr555le bd7b3ec4d684dfad075d89a606cb8b74 +bgr565be f19e9a4786395e1ddcd51399c98c9f6c +bgr565le fdb617533e1e7ff512ea5b6b6233e738 +bgr8 c60f93fd152c6903391d1fe9decd3547 +bgra 7f9b799fb48544e49ce93e91d7f9fca8 +gray 30d9014a9d43b5f37e7aa64be3a3ecfc +gray16be 6b84b85d3326182fa1217e138249edc5 +gray16le 66bb8faa09dc149734aca3c768a6d4e1 +monob d0cf8732677a5360b6160133043590d8 +monow ff9869d067ecb94eb9d90c9750c31fea +nv12 046f00f598ce14d9854a3534a5c99114 +nv21 01ea369dd2d0d3ed7451dc5c8d61497f +rgb24 eaefabc168d0b14576bab45bc1e56e1e +rgb444be 06722e03f8404e7d2226665ed2444a32 +rgb444le 185c9a5d9c2877484310d4196ef4cd6f +rgb48be 62dd185862ed142283bd300eb6dbd216 +rgb48le dcb76353268bc5862194d131762220da +rgb4_byte 8c6ff02df0b06dd2d574836c3741b2a2 +rgb555be 40dc33cfb5cf56aac1c5a290ac486c36 +rgb555le 4f8eaad29a17e0f8e9d8ab743e76b999 +rgb565be b57623ad9df74648339311a0edcebc7b +rgb565le 73f247a3315dceaea3022ac7c197c5ef +rgb8 13a8d89ef78d8127297d899005456ff0 +rgba 1fc6e920a42ec812aaa3b2aa02f37987 +uyvy422 ffbd36720c77398d9a0d03ce2625928f +yuv410p 7bfb39d7afb49d6a6173e6b23ae321eb +yuv411p 4a90048cc3a65fac150e53289700efe1 +yuv420p 2e6d6062e8cad37fb3ab2c433b55f382 +yuv420p10be fb0772f5e2b9da20ff826e64c3893137 +yuv420p10le e95879e14c4a6805f39643964baf41f7 +yuv420p16be 539076782902664a8acf381bf4f713e8 +yuv420p16le 0f609e588e5a258644ef85170d70e030 +yuv420p9be be40ec975fb2873891643cbbbddbc3b0 +yuv420p9le 7e606310d3f5ff12badf911e8f333471 +yuv422p d7f5cb44d9b0210d66d6a8762640ab34 +yuv422p10be 0be8378c3773e1c0b394315ef4994351 +yuv422p10le 6518094fe8de6bee95af21af1e5dc1e1 +yuv422p16be 9bd8f8c961822b586fa4cf992be54acc +yuv422p16le 9c4a1239605c7952b736ac3130163f14 +yuv422p9be 7c6f1e140b3999ee7d923854e507752a +yuv422p9le 51f10d79c07989060dd06e767e6d7d60 +yuv440p 876385e96165acf51271b20e5d85a416 +yuv444p 9c3c667d1613b72d15bc6d851c5eb8f7 +yuv444p10be ee069cc6db48975eb029d72f889a7fe6 +yuv444p10le 645b3335248113cafe3c29edb1d7f3be +yuv444p16be de2dedfc6f12073ffead113f86e07ecf +yuv444p16le 8e83323cf102d6c823a03ae8a7b7e033 +yuv444p9be 6ac92b7dc9ab2fc59bee99204886899a +yuv444p9le 85aef13a654953d3455d89770b0d74bd +yuva420p c705d1cf061d8c6580ac690b55f92276 +yuvj420p 41fd02b204da0ab62452cd14b595e2e4 +yuvj422p 7f6ca9bc1812cde02036d7d29a7cce43 +yuvj440p 25711c3c0fd15ec19c59a10784fcfb96 +yuvj444p e45dee2ac02276dfab92e8ebfbe52e00 +yuyv422 e944ff7316cd03c42c091717ce74f602 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_vflip_le mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_vflip_le --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/lavfi/pixfmts_vflip_le 2011-06-15 02:05:05.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/lavfi/pixfmts_vflip_le 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -abgr 25e72e9dbd01ab00727c976d577f7be5 -argb 19869bf1a5ac0b6af4d8bbe2c104533c -bgr24 89108a4ba00201f79b75b9305c42352d -bgr48be ed82382da09b64a8e04728fcf76e6814 -bgr48le 0f1f135608c2ff24d26d03e939fc2112 -bgr4_byte 407fcf564ed764c38e1d748f700ab921 -bgr555le bd7b3ec4d684dfad075d89a606cb8b74 -bgr565le fdb617533e1e7ff512ea5b6b6233e738 -bgr8 c60f93fd152c6903391d1fe9decd3547 -bgra 7f9b799fb48544e49ce93e91d7f9fca8 -gray 30d9014a9d43b5f37e7aa64be3a3ecfc -gray16be 6b84b85d3326182fa1217e138249edc5 -gray16le 66bb8faa09dc149734aca3c768a6d4e1 -monob d0cf8732677a5360b6160133043590d8 -monow ff9869d067ecb94eb9d90c9750c31fea -nv12 046f00f598ce14d9854a3534a5c99114 -nv21 01ea369dd2d0d3ed7451dc5c8d61497f -rgb24 eaefabc168d0b14576bab45bc1e56e1e -rgb48be 4e0c384163ebab06a08e74637beb02bc -rgb48le a77bfeefcd96750cf0e1917a2e2bf1e7 -rgb4_byte 8c6ff02df0b06dd2d574836c3741b2a2 -rgb555le 4f8eaad29a17e0f8e9d8ab743e76b999 -rgb565le 73f247a3315dceaea3022ac7c197c5ef -rgb8 13a8d89ef78d8127297d899005456ff0 -rgba 1fc6e920a42ec812aaa3b2aa02f37987 -uyvy422 ffbd36720c77398d9a0d03ce2625928f -yuv410p 7bfb39d7afb49d6a6173e6b23ae321eb -yuv411p 4a90048cc3a65fac150e53289700efe1 -yuv420p 2e6d6062e8cad37fb3ab2c433b55f382 -yuv420p10be df97d20b3b4a10c174d4360552c4160d -yuv420p10le 4b5249208602b941332945c926f80ae9 -yuv420p16be 539076782902664a8acf381bf4f713e8 -yuv420p16le 0f609e588e5a258644ef85170d70e030 -yuv420p9be be40ec975fb2873891643cbbbddbc3b0 -yuv420p9le 7e606310d3f5ff12badf911e8f333471 -yuv422p d7f5cb44d9b0210d66d6a8762640ab34 -yuv422p16be 9bd8f8c961822b586fa4cf992be54acc -yuv422p16le 9c4a1239605c7952b736ac3130163f14 -yuv440p 876385e96165acf51271b20e5d85a416 -yuv444p 9c3c667d1613b72d15bc6d851c5eb8f7 -yuv444p16be 0f4afa4a4aacf4bb6b87641abde71ea9 -yuv444p16le 8f31557bc52adfe00ae8b40a9b8c23f8 -yuva420p c705d1cf061d8c6580ac690b55f92276 -yuvj420p 41fd02b204da0ab62452cd14b595e2e4 -yuvj422p 7f6ca9bc1812cde02036d7d29a7cce43 -yuvj440p 25711c3c0fd15ec19c59a10784fcfb96 -yuvj444p e45dee2ac02276dfab92e8ebfbe52e00 -yuyv422 e944ff7316cd03c42c091717ce74f602 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/ac3_rm mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/ac3_rm --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/ac3_rm 2011-04-27 02:05:09.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/ac3_rm 2012-01-11 00:34:30.000000000 +0000 @@ -5,35 +5,40 @@ ret:-1 st: 0 flags:0 ts: 0.788000 ret: 0 st: 0 flags:1 ts:-0.317000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 -ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.577000 pts: 2.577000 pos: 42397 size: 558 +ret:-1 st:-1 flags:0 ts: 2.576668 ret:-1 st:-1 flags:1 ts: 1.470835 ret:-1 st: 0 flags:0 ts: 0.365000 ret: 0 st: 0 flags:1 ts:-0.741000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 -ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.159000 pts: 2.159000 pos: 35567 size: 556 +ret:-1 st:-1 flags:0 ts: 2.153336 ret:-1 st:-1 flags:1 ts: 1.047503 ret: 0 st: 0 flags:0 ts:-0.058000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 ret:-1 st: 0 flags:1 ts: 2.836000 -ret:-1 st:-1 flags:0 ts: 1.730004 -ret:-1 st:-1 flags:1 ts: 0.624171 +ret: 0 st:-1 flags:0 ts: 1.730004 +ret: 0 st: 0 flags:1 dts:8589.800000 pts:8589.800000 pos: 65950 size: 32801 +ret: 0 st:-1 flags:1 ts: 0.624171 +ret: 0 st: 0 flags:1 dts: 0.256000 pts: 0.256000 pos: 65337 size: 400 ret: 0 st: 0 flags:0 ts:-0.482000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 -ret: 0 st: 0 flags:1 ts: 2.413000 -ret: 0 st: 0 flags:1 dts: 2.368000 pts: 2.368000 pos: 38981 size: 558 -ret:-1 st:-1 flags:0 ts: 1.306672 -ret:-1 st:-1 flags:1 ts: 0.200839 +ret:-1 st: 0 flags:1 ts: 2.413000 +ret: 0 st:-1 flags:0 ts: 1.306672 +ret: 0 st: 0 flags:1 dts:8589.800000 pts:8589.800000 pos: 65950 size: 32801 +ret: 0 st:-1 flags:1 ts: 0.200839 +ret: 0 st: 0 flags:1 dts: 0.034000 pts: 0.034000 pos: 839 size: 558 ret: 0 st: 0 flags:0 ts:-0.905000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 -ret:-1 st: 0 flags:1 ts: 1.989000 -ret:-1 st:-1 flags:0 ts: 0.883340 +ret: 0 st: 0 flags:1 ts: 1.989000 +ret: 0 st: 0 flags:1 dts: 0.256000 pts: 0.256000 pos: 65337 size: 400 +ret: 0 st:-1 flags:0 ts: 0.883340 +ret: 0 st: 0 flags:1 dts: 3.378000 pts: 3.378000 pos: 55491 size: 558 ret: 0 st:-1 flags:1 ts:-0.222493 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 ret: 0 st: 0 flags:0 ts: 2.672000 -ret: 0 st: 0 flags:1 dts: 2.821000 pts: 2.821000 pos: 46383 size: 556 -ret:-1 st: 0 flags:1 ts: 1.566000 -ret:-1 st:-1 flags:0 ts: 0.460008 +ret: 0 st: 0 flags:1 dts: 3.378000 pts: 3.378000 pos: 55491 size: 558 +ret: 0 st: 0 flags:1 ts: 1.566000 +ret: 0 st: 0 flags:1 dts: 0.256000 pts: 0.256000 pos: 65337 size: 400 +ret: 0 st:-1 flags:0 ts: 0.460008 +ret: 0 st: 0 flags:1 dts: 3.378000 pts: 3.378000 pos: 55491 size: 558 ret: 0 st:-1 flags:1 ts:-0.645825 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/adpcm_yam_wav mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/adpcm_yam_wav --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/adpcm_yam_wav 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/adpcm_yam_wav 2012-01-11 00:34:30.000000000 +0000 @@ -1,53 +1,53 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.856009 pts: 1.856009 pos: 29752 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.856009 pts: 1.856009 pos: 29754 size: 4096 ret: 0 st: 0 flags:0 ts: 0.788345 -ret: 0 st: 0 flags:1 dts: 0.831995 pts: 0.831995 pos: 13368 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.831995 pts: 0.831995 pos: 13370 size: 4096 ret: 0 st: 0 flags:1 ts:-0.317506 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.623991 pts: 2.623991 pos: 42040 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.623991 pts: 2.623991 pos: 42042 size: 4096 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.408005 pts: 1.408005 pos: 22584 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.408005 pts: 1.408005 pos: 22586 size: 4096 ret: 0 st: 0 flags:0 ts: 0.365011 -ret: 0 st: 0 flags:1 dts: 0.383991 pts: 0.383991 pos: 6200 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.383991 pts: 0.383991 pos: 6202 size: 4096 ret: 0 st: 0 flags:1 ts:-0.740839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.176009 pts: 2.176009 pos: 34872 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.176009 pts: 2.176009 pos: 34874 size: 4096 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.023991 pts: 1.023991 pos: 16440 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.023991 pts: 1.023991 pos: 16442 size: 4096 ret: 0 st: 0 flags:0 ts:-0.058322 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 2.835828 -ret: 0 st: 0 flags:1 dts: 2.816009 pts: 2.816009 pos: 45112 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.816009 pts: 2.816009 pos: 45114 size: 4096 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.791995 pts: 1.791995 pos: 28728 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.791995 pts: 1.791995 pos: 28730 size: 4096 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.576009 pts: 0.576009 pos: 9272 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.576009 pts: 0.576009 pos: 9274 size: 4096 ret: 0 st: 0 flags:0 ts:-0.481655 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 2.412494 -ret: 0 st: 0 flags:1 dts: 2.368005 pts: 2.368005 pos: 37944 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.368005 pts: 2.368005 pos: 37946 size: 4096 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.343991 pts: 1.343991 pos: 21560 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.343991 pts: 1.343991 pos: 21562 size: 4096 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.191995 pts: 0.191995 pos: 3128 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.191995 pts: 0.191995 pos: 3130 size: 4096 ret: 0 st: 0 flags:0 ts:-0.904989 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 1.989184 -ret: 0 st: 0 flags:1 dts: 1.983991 pts: 1.983991 pos: 31800 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.983991 pts: 1.983991 pos: 31802 size: 4096 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.896009 pts: 0.896009 pos: 14392 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.896009 pts: 0.896009 pos: 14394 size: 4096 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:0 ts: 2.671678 -ret: 0 st: 0 flags:1 dts: 2.688005 pts: 2.688005 pos: 43064 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.688005 pts: 2.688005 pos: 43066 size: 4096 ret: 0 st: 0 flags:1 ts: 1.565850 -ret: 0 st: 0 flags:1 dts: 1.536009 pts: 1.536009 pos: 24632 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.536009 pts: 1.536009 pos: 24634 size: 4096 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.511995 pts: 0.511995 pos: 8248 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.511995 pts: 0.511995 pos: 8250 size: 4096 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/flac_flac mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/flac_flac --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/flac_flac 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/flac_flac 2012-01-11 00:34:30.000000000 +0000 @@ -1,49 +1,49 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8255 size: 614 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8255 size: 614 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.880816 pts: 1.880816 pos: 86742 size: 2191 +ret: 0 st: 0 flags:1 dts: 1.880816 pts: 1.880816 pos: 86741 size: 2191 ret: 0 st: 0 flags:0 ts: 0.788345 -ret: 0 st: 0 flags:1 dts: 0.809796 pts: 0.809796 pos: 27366 size: 615 +ret: 0 st: 0 flags:1 dts: 0.809796 pts: 0.809796 pos: 27365 size: 615 ret:-1 st: 0 flags:1 ts:-0.317506 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.586122 pts: 2.586122 pos: 145606 size: 2384 +ret: 0 st: 0 flags:1 dts: 2.586122 pts: 2.586122 pos: 145605 size: 2384 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.462857 pts: 1.462857 pos: 53388 size: 1851 +ret: 0 st: 0 flags:1 dts: 1.462857 pts: 1.462857 pos: 53387 size: 1851 ret: 0 st: 0 flags:0 ts: 0.365011 -ret: 0 st: 0 flags:1 dts: 0.365714 pts: 0.365714 pos: 16890 size: 614 +ret: 0 st: 0 flags:1 dts: 0.365714 pts: 0.365714 pos: 16889 size: 614 ret:-1 st: 0 flags:1 ts:-0.740839 ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.168163 pts: 2.168163 pos: 110531 size: 2143 +ret: 0 st: 0 flags:1 dts: 2.168163 pts: 2.168163 pos: 110530 size: 2143 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.044898 pts: 1.044898 pos: 32880 size: 579 +ret: 0 st: 0 flags:1 dts: 1.044898 pts: 1.044898 pos: 32879 size: 579 ret: 0 st: 0 flags:0 ts:-0.058322 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8255 size: 614 ret: 0 st: 0 flags:1 ts: 2.835828 -ret: 0 st: 0 flags:1 dts: 2.821224 pts: 2.821224 pos: 167112 size: 2391 +ret: 0 st: 0 flags:1 dts: 2.821224 pts: 2.821224 pos: 167111 size: 2391 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.750204 pts: 1.750204 pos: 75788 size: 2191 +ret: 0 st: 0 flags:1 dts: 1.750204 pts: 1.750204 pos: 75787 size: 2191 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.600816 pts: 0.600816 pos: 22446 size: 616 +ret: 0 st: 0 flags:1 dts: 0.600816 pts: 0.600816 pos: 22445 size: 616 ret: 0 st: 0 flags:0 ts:-0.481655 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8255 size: 614 ret: 0 st: 0 flags:1 ts: 2.412494 -ret: 0 st: 0 flags:1 dts: 2.403265 pts: 2.403265 pos: 129793 size: 2138 +ret: 0 st: 0 flags:1 dts: 2.403265 pts: 2.403265 pos: 129792 size: 2138 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.332245 pts: 1.332245 pos: 44812 size: 1609 +ret: 0 st: 0 flags:1 dts: 1.332245 pts: 1.332245 pos: 44811 size: 1609 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.182857 pts: 0.182857 pos: 12572 size: 628 +ret: 0 st: 0 flags:1 dts: 0.182857 pts: 0.182857 pos: 12571 size: 628 ret: 0 st: 0 flags:0 ts:-0.904989 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8255 size: 614 ret: 0 st: 0 flags:1 ts: 1.989184 -ret: 0 st: 0 flags:1 dts: 1.985306 pts: 1.985306 pos: 95508 size: 2169 +ret: 0 st: 0 flags:1 dts: 1.985306 pts: 1.985306 pos: 95507 size: 2169 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.888163 pts: 0.888163 pos: 29211 size: 620 +ret: 0 st: 0 flags:1 dts: 0.888163 pts: 0.888163 pos: 29210 size: 620 ret:-1 st:-1 flags:1 ts:-0.222493 ret: 0 st: 0 flags:0 ts: 2.671678 -ret: 0 st: 0 flags:1 dts: 2.690612 pts: 2.690612 pos: 155154 size: 2394 +ret: 0 st: 0 flags:1 dts: 2.690612 pts: 2.690612 pos: 155153 size: 2394 ret: 0 st: 0 flags:1 ts: 1.565850 -ret: 0 st: 0 flags:1 dts: 1.541224 pts: 1.541224 pos: 59082 size: 1974 +ret: 0 st: 0 flags:1 dts: 1.541224 pts: 1.541224 pos: 59081 size: 1974 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.470204 pts: 0.470204 pos: 19353 size: 608 +ret: 0 st: 0 flags:1 dts: 0.470204 pts: 0.470204 pos: 19352 size: 608 ret:-1 st:-1 flags:1 ts:-0.645825 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/g726_wav mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/g726_wav --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/g726_wav 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/g726_wav 2012-01-11 00:34:30.000000000 +0000 @@ -1,53 +1,53 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.894000 pts: 1.894000 pos: 7632 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.894000 pts: 1.894000 pos: 7634 size: 4096 ret: 0 st: 0 flags:0 ts: 0.788375 -ret: 0 st: 0 flags:1 dts: 0.788500 pts: 0.788500 pos: 3210 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.788500 pts: 0.788500 pos: 3212 size: 4096 ret: 0 st: 0 flags:1 ts:-0.317500 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.576750 pts: 2.576750 pos: 10363 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.576750 pts: 2.576750 pos: 10365 size: 4096 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.470750 pts: 1.470750 pos: 5939 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.470750 pts: 1.470750 pos: 5941 size: 4096 ret: 0 st: 0 flags:0 ts: 0.365000 -ret: 0 st: 0 flags:1 dts: 0.365000 pts: 0.365000 pos: 1516 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.365000 pts: 0.365000 pos: 1518 size: 4096 ret: 0 st: 0 flags:1 ts:-0.740875 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.153500 pts: 2.153500 pos: 8670 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.153500 pts: 2.153500 pos: 8672 size: 4096 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.047500 pts: 1.047500 pos: 4246 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.047500 pts: 1.047500 pos: 4248 size: 4096 ret: 0 st: 0 flags:0 ts:-0.058375 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 2.835875 -ret: 0 st: 0 flags:1 dts: 2.835750 pts: 2.835750 pos: 11399 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.835750 pts: 2.835750 pos: 11401 size: 4096 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 6976 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 6978 size: 4096 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.624000 pts: 0.624000 pos: 2552 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.624000 pts: 0.624000 pos: 2554 size: 4096 ret: 0 st: 0 flags:0 ts:-0.481625 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 2.412500 -ret: 0 st: 0 flags:1 dts: 2.412500 pts: 2.412500 pos: 9706 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.412500 pts: 2.412500 pos: 9708 size: 4096 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.306750 pts: 1.306750 pos: 5283 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.306750 pts: 1.306750 pos: 5285 size: 4096 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200750 pts: 0.200750 pos: 859 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.200750 pts: 0.200750 pos: 861 size: 4096 ret: 0 st: 0 flags:0 ts:-0.905000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 1.989125 -ret: 0 st: 0 flags:1 dts: 1.989000 pts: 1.989000 pos: 8012 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.989000 pts: 1.989000 pos: 8014 size: 4096 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.883500 pts: 0.883500 pos: 3590 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.883500 pts: 0.883500 pos: 3592 size: 4096 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:0 ts: 2.671625 -ret: 0 st: 0 flags:1 dts: 2.671750 pts: 2.671750 pos: 10743 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.671750 pts: 2.671750 pos: 10745 size: 4096 ret: 0 st: 0 flags:1 ts: 1.565875 -ret: 0 st: 0 flags:1 dts: 1.565750 pts: 1.565750 pos: 6319 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.565750 pts: 1.565750 pos: 6321 size: 4096 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 1896 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 1898 size: 4096 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/lavf_asf mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/lavf_asf --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/lavf_asf 2011-03-19 06:37:12.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/lavf_asf 2012-01-11 00:34:30.000000000 +0000 @@ -2,9 +2,9 @@ ret: 0 st:-1 flags:0 ts:-1.000000 ret: 0 st: 1 flags:1 dts: 0.444000 pts: 0.444000 pos: 147775 size: 209 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 1 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size: 209 +ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209 ret: 0 st: 0 flags:0 ts: 0.788000 -ret: 0 st: 1 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size: 209 +ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209 ret: 0 st: 0 flags:1 ts:-0.317000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487 ret:-1 st: 1 flags:0 ts: 2.577000 @@ -14,29 +14,29 @@ ret: 0 st:-1 flags:1 ts:-0.740831 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487 ret: 0 st: 0 flags:0 ts: 2.153000 -ret: 0 st: 1 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size: 209 +ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209 ret: 0 st: 0 flags:1 ts: 1.048000 -ret: 0 st: 1 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size: 209 +ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209 ret: 0 st: 1 flags:0 ts:-0.058000 ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 29375 size: 208 ret:-1 st: 1 flags:1 ts: 2.836000 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 1 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size: 209 +ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209 ret: 0 st:-1 flags:1 ts: 0.624171 ret: 0 st: 1 flags:1 dts: 0.444000 pts: 0.444000 pos: 147775 size: 209 ret: 0 st: 0 flags:0 ts:-0.482000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487 ret: 0 st: 0 flags:1 ts: 2.413000 -ret: 0 st: 1 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size: 209 +ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209 ret:-1 st: 1 flags:0 ts: 1.307000 ret: 0 st: 1 flags:1 ts: 0.201000 ret: 0 st: 1 flags:1 dts: 0.183000 pts: 0.183000 pos: 70975 size: 209 ret: 0 st:-1 flags:0 ts:-0.904994 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487 ret: 0 st:-1 flags:1 ts: 1.989173 -ret: 0 st: 1 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size: 209 +ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209 ret: 0 st: 0 flags:0 ts: 0.883000 -ret: 0 st: 1 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size: 209 +ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209 ret: 0 st: 0 flags:1 ts:-0.222000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487 ret:-1 st: 1 flags:0 ts: 2.672000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/lavf_gif mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/lavf_gif --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/lavf_gif 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/lavf_gif 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:2906382 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:2906401 ret:-EINVAL st:-1 flags:0 ts:-1.000000 ret:-EINVAL st:-1 flags:1 ts: 1.894167 ret:-EINVAL st: 0 flags:0 ts: 0.800000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/lavf_ogg mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/lavf_ogg --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/lavf_ogg 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/lavf_ogg 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 125 size: 1364 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364 ret:-1 st:-1 flags:0 ts:-1.000000 ret:-1 st:-1 flags:1 ts: 1.894167 ret:-1 st: 0 flags:0 ts: 0.788345 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/lavf_wav mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/lavf_wav --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/lavf_wav 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/lavf_wav 2012-01-11 00:34:30.000000000 +0000 @@ -1,53 +1,53 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:1 ts: 1.894167 ret:-EOF ret: 0 st: 0 flags:0 ts: 0.788345 -ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69576 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69578 size: 4096 ret: 0 st: 0 flags:1 ts:-0.317506 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:0 ts: 2.576668 ret:-EOF ret: 0 st:-1 flags:1 ts: 1.470835 ret:-EOF ret: 0 st: 0 flags:0 ts: 0.365011 -ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32238 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32240 size: 4096 ret: 0 st: 0 flags:1 ts:-0.740839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:0 ts: 2.153336 ret:-EOF ret: 0 st:-1 flags:1 ts: 1.047503 ret:-EOF ret: 0 st: 0 flags:0 ts:-0.058322 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:1 ts: 2.835828 ret:-EOF ret: 0 st:-1 flags:0 ts: 1.730004 ret:-EOF ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55096 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55098 size: 4096 ret: 0 st: 0 flags:0 ts:-0.481655 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:1 ts: 2.412494 ret:-EOF ret: 0 st:-1 flags:0 ts: 1.306672 ret:-EOF ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17758 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17760 size: 4096 ret: 0 st: 0 flags:0 ts:-0.904989 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:1 ts: 1.989184 ret:-EOF ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77954 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77956 size: 4096 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:0 ts: 2.671678 ret:-EOF ret: 0 st: 0 flags:1 ts: 1.565850 ret:-EOF ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40616 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40618 size: 4096 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/mpeg2_idct_int_mpg mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/mpeg2_idct_int_mpg --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/mpeg2_idct_int_mpg 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/mpeg2_idct_int_mpg 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,46 @@ +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st:-1 flags:0 ts:-1.000000 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st:-1 flags:1 ts: 1.894167 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 +ret: 0 st: 0 flags:0 ts: 0.788334 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 79103 size: 10909 +ret:-1 st: 0 flags:1 ts:-0.317499 +ret:-1 st:-1 flags:0 ts: 2.576668 +ret: 0 st:-1 flags:1 ts: 1.470835 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 +ret: 0 st: 0 flags:0 ts: 0.365002 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985 +ret:-1 st: 0 flags:1 ts:-0.740831 +ret:-1 st:-1 flags:0 ts: 2.153336 +ret: 0 st:-1 flags:1 ts: 1.047503 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 79103 size: 10909 +ret: 0 st: 0 flags:0 ts:-0.058330 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st: 0 flags:1 ts: 2.835837 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 +ret: 0 st:-1 flags:0 ts: 1.730004 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 +ret: 0 st:-1 flags:1 ts: 0.624171 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985 +ret: 0 st: 0 flags:0 ts:-0.481662 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st: 0 flags:1 ts: 2.412505 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 +ret: 0 st:-1 flags:0 ts: 1.306672 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 +ret: 0 st:-1 flags:1 ts: 0.200839 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st: 0 flags:0 ts:-0.904994 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 +ret: 0 st: 0 flags:1 ts: 1.989173 +ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 +ret: 0 st:-1 flags:0 ts: 0.883340 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 79103 size: 10909 +ret:-1 st:-1 flags:1 ts:-0.222493 +ret:-1 st: 0 flags:0 ts: 2.671674 +ret: 0 st: 0 flags:1 ts: 1.565841 +ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 +ret: 0 st:-1 flags:0 ts: 0.460008 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985 +ret:-1 st:-1 flags:1 ts:-0.645825 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/mpeg2_mpg mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/mpeg2_mpg --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/mpeg2_mpg 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/mpeg2_mpg 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 -ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 -ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 -ret: 0 st: 0 flags:0 ts: 0.788334 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 79103 size: 10909 -ret:-1 st: 0 flags:1 ts:-0.317499 -ret:-1 st:-1 flags:0 ts: 2.576668 -ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 -ret: 0 st: 0 flags:0 ts: 0.365002 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985 -ret:-1 st: 0 flags:1 ts:-0.740831 -ret:-1 st:-1 flags:0 ts: 2.153336 -ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 79103 size: 10909 -ret: 0 st: 0 flags:0 ts:-0.058330 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 -ret: 0 st: 0 flags:1 ts: 2.835837 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 -ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 -ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985 -ret: 0 st: 0 flags:0 ts:-0.481662 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 -ret: 0 st: 0 flags:1 ts: 2.412505 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 -ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 -ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 -ret: 0 st: 0 flags:0 ts:-0.904994 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911 -ret: 0 st: 0 flags:1 ts: 1.989173 -ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183 -ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 79103 size: 10909 -ret:-1 st:-1 flags:1 ts:-0.222493 -ret:-1 st: 0 flags:0 ts: 2.671674 -ret: 0 st: 0 flags:1 ts: 1.565841 -ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918 -ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985 -ret:-1 st:-1 flags:1 ts:-0.645825 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/mpeg2reuse_mpg mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/mpeg2reuse_mpg --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/mpeg2reuse_mpg 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/mpeg2reuse_mpg 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 20829 -ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 20829 -ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 337078 size: 26840 -ret: 0 st: 0 flags:0 ts: 0.788334 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 141401 size: 23537 -ret:-1 st: 0 flags:1 ts:-0.317499 -ret:-1 st:-1 flags:0 ts: 2.576668 -ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 232037 size: 26192 -ret: 0 st: 0 flags:0 ts: 0.365002 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 63793 size: 21295 -ret:-1 st: 0 flags:1 ts:-0.740831 -ret:-1 st:-1 flags:0 ts: 2.153336 -ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 141401 size: 23537 -ret: 0 st: 0 flags:0 ts:-0.058330 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 20829 -ret: 0 st: 0 flags:1 ts: 2.835837 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 337078 size: 26840 -ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 337078 size: 26840 -ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 63793 size: 21295 -ret: 0 st: 0 flags:0 ts:-0.481662 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 20829 -ret: 0 st: 0 flags:1 ts: 2.412505 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 337078 size: 26840 -ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 232037 size: 26192 -ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 20829 -ret: 0 st: 0 flags:0 ts:-0.904994 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 20829 -ret: 0 st: 0 flags:1 ts: 1.989173 -ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 337078 size: 26840 -ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 232037 size: 26192 -ret:-1 st:-1 flags:1 ts:-0.222493 -ret:-1 st: 0 flags:0 ts: 2.671674 -ret: 0 st: 0 flags:1 ts: 1.565841 -ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 232037 size: 26192 -ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 141401 size: 23537 -ret:-1 st:-1 flags:1 ts:-0.645825 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_alaw_wav mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_alaw_wav --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_alaw_wav 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_alaw_wav 2012-01-11 00:34:30.000000000 +0000 @@ -1,53 +1,53 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.894127 pts: 1.894127 pos: 30362 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.894127 pts: 1.894127 pos: 30364 size: 4096 ret: 0 st: 0 flags:0 ts: 0.788345 -ret: 0 st: 0 flags:1 dts: 0.788367 pts: 0.788367 pos: 12670 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.788367 pts: 0.788367 pos: 12672 size: 4096 ret: 0 st: 0 flags:1 ts:-0.317506 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.576757 pts: 2.576757 pos: 41284 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.576757 pts: 2.576757 pos: 41286 size: 4096 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.470748 pts: 1.470748 pos: 23588 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.470748 pts: 1.470748 pos: 23590 size: 4096 ret: 0 st: 0 flags:0 ts: 0.365011 -ret: 0 st: 0 flags:1 dts: 0.365125 pts: 0.365125 pos: 5898 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.365125 pts: 0.365125 pos: 5900 size: 4096 ret: 0 st: 0 flags:1 ts:-0.740839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.153379 pts: 2.153379 pos: 34510 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.153379 pts: 2.153379 pos: 34512 size: 4096 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 16816 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 16818 size: 4096 ret: 0 st: 0 flags:0 ts:-0.058322 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 2.835828 -ret: 0 st: 0 flags:1 dts: 2.835760 pts: 2.835760 pos: 45428 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.835760 pts: 2.835760 pos: 45430 size: 4096 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 27736 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 27738 size: 4096 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.624127 pts: 0.624127 pos: 10042 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.624127 pts: 0.624127 pos: 10044 size: 4096 ret: 0 st: 0 flags:0 ts:-0.481655 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 2.412494 -ret: 0 st: 0 flags:1 dts: 2.412381 pts: 2.412381 pos: 38654 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.412381 pts: 2.412381 pos: 38656 size: 4096 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.306757 pts: 1.306757 pos: 20964 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.306757 pts: 1.306757 pos: 20966 size: 4096 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200748 pts: 0.200748 pos: 3268 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.200748 pts: 0.200748 pos: 3270 size: 4096 ret: 0 st: 0 flags:0 ts:-0.904989 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 1.989184 -ret: 0 st: 0 flags:1 dts: 1.989116 pts: 1.989116 pos: 31882 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.989116 pts: 1.989116 pos: 31884 size: 4096 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.883379 pts: 0.883379 pos: 14190 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.883379 pts: 0.883379 pos: 14192 size: 4096 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:0 ts: 2.671678 -ret: 0 st: 0 flags:1 dts: 2.671746 pts: 2.671746 pos: 42804 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.671746 pts: 2.671746 pos: 42806 size: 4096 ret: 0 st: 0 flags:1 ts: 1.565850 -ret: 0 st: 0 flags:1 dts: 1.565760 pts: 1.565760 pos: 25108 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.565760 pts: 1.565760 pos: 25110 size: 4096 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 7416 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 7418 size: 4096 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_mulaw_wav mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_mulaw_wav --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_mulaw_wav 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_mulaw_wav 2012-01-11 00:34:30.000000000 +0000 @@ -1,53 +1,53 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.894127 pts: 1.894127 pos: 30362 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.894127 pts: 1.894127 pos: 30364 size: 4096 ret: 0 st: 0 flags:0 ts: 0.788345 -ret: 0 st: 0 flags:1 dts: 0.788367 pts: 0.788367 pos: 12670 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.788367 pts: 0.788367 pos: 12672 size: 4096 ret: 0 st: 0 flags:1 ts:-0.317506 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.576757 pts: 2.576757 pos: 41284 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.576757 pts: 2.576757 pos: 41286 size: 4096 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.470748 pts: 1.470748 pos: 23588 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.470748 pts: 1.470748 pos: 23590 size: 4096 ret: 0 st: 0 flags:0 ts: 0.365011 -ret: 0 st: 0 flags:1 dts: 0.365125 pts: 0.365125 pos: 5898 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.365125 pts: 0.365125 pos: 5900 size: 4096 ret: 0 st: 0 flags:1 ts:-0.740839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.153379 pts: 2.153379 pos: 34510 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.153379 pts: 2.153379 pos: 34512 size: 4096 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 16816 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 16818 size: 4096 ret: 0 st: 0 flags:0 ts:-0.058322 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 2.835828 -ret: 0 st: 0 flags:1 dts: 2.835760 pts: 2.835760 pos: 45428 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.835760 pts: 2.835760 pos: 45430 size: 4096 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 27736 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 27738 size: 4096 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.624127 pts: 0.624127 pos: 10042 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.624127 pts: 0.624127 pos: 10044 size: 4096 ret: 0 st: 0 flags:0 ts:-0.481655 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 2.412494 -ret: 0 st: 0 flags:1 dts: 2.412381 pts: 2.412381 pos: 38654 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.412381 pts: 2.412381 pos: 38656 size: 4096 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.306757 pts: 1.306757 pos: 20964 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.306757 pts: 1.306757 pos: 20966 size: 4096 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200748 pts: 0.200748 pos: 3268 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.200748 pts: 0.200748 pos: 3270 size: 4096 ret: 0 st: 0 flags:0 ts:-0.904989 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:1 ts: 1.989184 -ret: 0 st: 0 flags:1 dts: 1.989116 pts: 1.989116 pos: 31882 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.989116 pts: 1.989116 pos: 31884 size: 4096 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.883379 pts: 0.883379 pos: 14190 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.883379 pts: 0.883379 pos: 14192 size: 4096 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 ret: 0 st: 0 flags:0 ts: 2.671678 -ret: 0 st: 0 flags:1 dts: 2.671746 pts: 2.671746 pos: 42804 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.671746 pts: 2.671746 pos: 42806 size: 4096 ret: 0 st: 0 flags:1 ts: 1.565850 -ret: 0 st: 0 flags:1 dts: 1.565760 pts: 1.565760 pos: 25108 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.565760 pts: 1.565760 pos: 25110 size: 4096 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 7416 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 7418 size: 4096 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_s16be_mkv mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_s16be_mkv --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_s16be_mkv 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_s16be_mkv 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.881000 pts: 1.881000 pos: 332755 size: 4096 -ret: 0 st: 0 flags:0 ts: 0.788000 -ret: 0 st: 0 flags:1 dts: 0.789000 pts: 0.789000 pos: 139914 size: 4096 -ret: 0 st: 0 flags:1 ts:-0.317000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.577000 pts: 2.577000 pos: 455845 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.463000 pts: 1.463000 pos: 258901 size: 4096 -ret: 0 st: 0 flags:0 ts: 0.365000 -ret: 0 st: 0 flags:1 dts: 0.372000 pts: 0.372000 pos: 66060 size: 4096 -ret: 0 st: 0 flags:1 ts:-0.741000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.159000 pts: 2.159000 pos: 381991 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.045000 pts: 1.045000 pos: 185047 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.058000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st: 0 flags:1 ts: 2.836000 -ret: 0 st: 0 flags:1 dts: 2.833000 pts: 2.833000 pos: 500978 size: 4096 -ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.741000 pts: 1.741000 pos: 308137 size: 4096 -ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.604000 pts: 0.604000 pos: 107090 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.482000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st: 0 flags:1 ts: 2.413000 -ret: 0 st: 0 flags:1 dts: 2.392000 pts: 2.392000 pos: 423021 size: 4096 -ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.324000 pts: 1.324000 pos: 234283 size: 4096 -ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.186000 pts: 0.186000 pos: 33236 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.905000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st: 0 flags:1 ts: 1.989000 -ret: 0 st: 0 flags:1 dts: 1.974000 pts: 1.974000 pos: 349167 size: 4096 -ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.906000 pts: 0.906000 pos: 160429 size: 4096 -ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st: 0 flags:0 ts: 2.672000 -ret: 0 st: 0 flags:1 dts: 2.694000 pts: 2.694000 pos: 476360 size: 4096 -ret: 0 st: 0 flags:1 ts: 1.566000 -ret: 0 st: 0 flags:1 dts: 1.556000 pts: 1.556000 pos: 275313 size: 4096 -ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.464000 pts: 0.464000 pos: 82472 size: 4096 -ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_s16le_mkv mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_s16le_mkv --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_s16le_mkv 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_s16le_mkv 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.881000 pts: 1.881000 pos: 332755 size: 4096 -ret: 0 st: 0 flags:0 ts: 0.788000 -ret: 0 st: 0 flags:1 dts: 0.789000 pts: 0.789000 pos: 139914 size: 4096 -ret: 0 st: 0 flags:1 ts:-0.317000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.577000 pts: 2.577000 pos: 455845 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.463000 pts: 1.463000 pos: 258901 size: 4096 -ret: 0 st: 0 flags:0 ts: 0.365000 -ret: 0 st: 0 flags:1 dts: 0.372000 pts: 0.372000 pos: 66060 size: 4096 -ret: 0 st: 0 flags:1 ts:-0.741000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.159000 pts: 2.159000 pos: 381991 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.045000 pts: 1.045000 pos: 185047 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.058000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st: 0 flags:1 ts: 2.836000 -ret: 0 st: 0 flags:1 dts: 2.833000 pts: 2.833000 pos: 500978 size: 4096 -ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.741000 pts: 1.741000 pos: 308137 size: 4096 -ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.604000 pts: 0.604000 pos: 107090 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.482000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st: 0 flags:1 ts: 2.413000 -ret: 0 st: 0 flags:1 dts: 2.392000 pts: 2.392000 pos: 423021 size: 4096 -ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.324000 pts: 1.324000 pos: 234283 size: 4096 -ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.186000 pts: 0.186000 pos: 33236 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.905000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st: 0 flags:1 ts: 1.989000 -ret: 0 st: 0 flags:1 dts: 1.974000 pts: 1.974000 pos: 349167 size: 4096 -ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.906000 pts: 0.906000 pos: 160429 size: 4096 -ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 -ret: 0 st: 0 flags:0 ts: 2.672000 -ret: 0 st: 0 flags:1 dts: 2.694000 pts: 2.694000 pos: 476360 size: 4096 -ret: 0 st: 0 flags:1 ts: 1.566000 -ret: 0 st: 0 flags:1 dts: 1.556000 pts: 1.556000 pos: 275313 size: 4096 -ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.464000 pts: 0.464000 pos: 82472 size: 4096 -ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 412 size: 4096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_s16le_wav mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_s16le_wav --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_s16le_wav 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_s16le_wav 2012-01-11 00:34:30.000000000 +0000 @@ -1,53 +1,53 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 334176 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 334178 size: 4096 ret: 0 st: 0 flags:0 ts: 0.788345 -ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 139108 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 139110 size: 4096 ret: 0 st: 0 flags:1 ts:-0.317506 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 454568 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 454570 size: 4096 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 259500 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 259502 size: 4096 ret: 0 st: 0 flags:0 ts: 0.365011 -ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 64432 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 64434 size: 4096 ret: 0 st: 0 flags:1 ts:-0.740839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 379892 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 379894 size: 4096 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 184824 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 184826 size: 4096 ret: 0 st: 0 flags:0 ts:-0.058322 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:1 ts: 2.835828 -ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 500284 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 500286 size: 4096 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 305216 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 305218 size: 4096 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 110148 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 110150 size: 4096 ret: 0 st: 0 flags:0 ts:-0.481655 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:1 ts: 2.412494 -ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 425608 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 425610 size: 4096 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 230540 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 230542 size: 4096 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 35472 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 35474 size: 4096 ret: 0 st: 0 flags:0 ts:-0.904989 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:1 ts: 1.989184 -ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 350936 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 350938 size: 4096 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 155864 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 155866 size: 4096 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:0 ts: 2.671678 -ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 471328 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 471330 size: 4096 ret: 0 st: 0 flags:1 ts: 1.565850 -ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 276260 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 276262 size: 4096 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 81188 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 81190 size: 4096 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_u8_wav mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_u8_wav --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_u8_wav 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_u8_wav 2012-01-11 00:34:30.000000000 +0000 @@ -1,53 +1,53 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 167110 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 167112 size: 4096 ret: 0 st: 0 flags:0 ts: 0.788345 -ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69576 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69578 size: 4096 ret: 0 st: 0 flags:1 ts:-0.317506 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 227306 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 227308 size: 4096 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 129772 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 129774 size: 4096 ret: 0 st: 0 flags:0 ts: 0.365011 -ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32238 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32240 size: 4096 ret: 0 st: 0 flags:1 ts:-0.740839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 189968 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 189970 size: 4096 ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 92434 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 92436 size: 4096 ret: 0 st: 0 flags:0 ts:-0.058322 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:1 ts: 2.835828 -ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 250164 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 250166 size: 4096 ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 152630 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 152632 size: 4096 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55096 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55098 size: 4096 ret: 0 st: 0 flags:0 ts:-0.481655 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:1 ts: 2.412494 -ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 212826 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 212828 size: 4096 ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 115292 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 115294 size: 4096 ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17758 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17760 size: 4096 ret: 0 st: 0 flags:0 ts:-0.904989 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:1 ts: 1.989184 -ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 175490 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 175492 size: 4096 ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77954 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77956 size: 4096 ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 ret: 0 st: 0 flags:0 ts: 2.671678 -ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 235686 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 235688 size: 4096 ret: 0 st: 0 flags:1 ts: 1.565850 -ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 138152 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 138154 size: 4096 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40616 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40618 size: 4096 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_zork_wav mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_zork_wav --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/seek/pcm_zork_wav 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/seek/pcm_zork_wav 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 -ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.894127 pts: 1.894127 pos: 30362 size: 4096 -ret: 0 st: 0 flags:0 ts: 0.788345 -ret: 0 st: 0 flags:1 dts: 0.788367 pts: 0.788367 pos: 12670 size: 4096 -ret: 0 st: 0 flags:1 ts:-0.317506 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 -ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.576757 pts: 2.576757 pos: 41284 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.470748 pts: 1.470748 pos: 23588 size: 4096 -ret: 0 st: 0 flags:0 ts: 0.365011 -ret: 0 st: 0 flags:1 dts: 0.365125 pts: 0.365125 pos: 5898 size: 4096 -ret: 0 st: 0 flags:1 ts:-0.740839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 -ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.153379 pts: 2.153379 pos: 34510 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 16816 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.058322 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 -ret: 0 st: 0 flags:1 ts: 2.835828 -ret: 0 st: 0 flags:1 dts: 2.835760 pts: 2.835760 pos: 45428 size: 4096 -ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 27736 size: 4096 -ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.624127 pts: 0.624127 pos: 10042 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.481655 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 -ret: 0 st: 0 flags:1 ts: 2.412494 -ret: 0 st: 0 flags:1 dts: 2.412381 pts: 2.412381 pos: 38654 size: 4096 -ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.306757 pts: 1.306757 pos: 20964 size: 4096 -ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200748 pts: 0.200748 pos: 3268 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.904989 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 -ret: 0 st: 0 flags:1 ts: 1.989184 -ret: 0 st: 0 flags:1 dts: 1.989116 pts: 1.989116 pos: 31882 size: 4096 -ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.883379 pts: 0.883379 pos: 14190 size: 4096 -ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 -ret: 0 st: 0 flags:0 ts: 2.671678 -ret: 0 st: 0 flags:1 dts: 2.671746 pts: 2.671746 pos: 42804 size: 4096 -ret: 0 st: 0 flags:1 ts: 1.565850 -ret: 0 st: 0 flags:1 dts: 1.565760 pts: 1.565760 pos: 25108 size: 4096 -ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 7416 size: 4096 -ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 56 size: 4096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/cljr mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/cljr --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/cljr 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/cljr 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +d149cadc43100d8e98ff04e57fdaa31f *./tests/data/vsynth1/cljr.avi + 5075660 ./tests/data/vsynth1/cljr.avi +4debaab994c2c7273bebaa0c5733017b *./tests/data/cljr.vsynth1.out.yuv +stddev: 30.75 PSNR: 18.37 MAXDIFF: 225 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/dnxhd_1080i mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/dnxhd_1080i --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/dnxhd_1080i 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/dnxhd_1080i 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -34949ea38da2cf6a8406ad600ad95cfa *./tests/data/vsynth1/dnxhd-1080i.mov +3cfbe36a7dd5b48859b8a569d626ef77 *./tests/data/vsynth1/dnxhd-1080i.mov 3031875 ./tests/data/vsynth1/dnxhd-1080i.mov 0c651e840f860592f0d5b66030d9fa32 *./tests/data/dnxhd_1080i.vsynth1.out.yuv stddev: 6.29 PSNR: 32.15 MAXDIFF: 64 bytes: 760320/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/dnxhd_720p_10bit mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/dnxhd_720p_10bit --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/dnxhd_720p_10bit 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/dnxhd_720p_10bit 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +b5e24a055af02edec8674333260214fd *./tests/data/vsynth1/dnxhd-720p-10bit.dnxhd + 2293760 ./tests/data/vsynth1/dnxhd-720p-10bit.dnxhd +4466ff3d73d01bbe75ea25001d379b63 *./tests/data/dnxhd_720p_10bit.vsynth1.out.yuv +stddev: 6.27 PSNR: 32.18 MAXDIFF: 64 bytes: 760320/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/dv mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/dv --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/dv 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/dv 2012-01-11 00:34:30.000000000 +0000 @@ -2,7 +2,3 @@ 7200000 ./tests/data/vsynth1/dv.dv 02ac7cdeab91d4d5621e7ce96dddc498 *./tests/data/dv.vsynth1.out.yuv stddev: 6.90 PSNR: 31.34 MAXDIFF: 76 bytes: 7603200/ 7603200 -bd67f2431db160d4bb6dcd791cea6efd *./tests/data/vsynth1/dv411.dv -7200000 ./tests/data/vsynth1/dv411.dv -b6640a3a572353f51284acb746eb00c4 *./tests/data/dv.vsynth1.out.yuv -stddev: 30.76 PSNR: 18.37 MAXDIFF: 205 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/dv_411 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/dv_411 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/dv_411 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/dv_411 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +bd67f2431db160d4bb6dcd791cea6efd *./tests/data/vsynth1/dv411.dv +7200000 ./tests/data/vsynth1/dv411.dv +b6640a3a572353f51284acb746eb00c4 *./tests/data/dv_411.vsynth1.out.yuv +stddev: 30.76 PSNR: 18.37 MAXDIFF: 205 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2 2012-01-11 00:34:30.000000000 +0000 @@ -2,19 +2,3 @@ 728044 ./tests/data/vsynth1/mpeg2.mpg b41ca49c1a02e66ce64d262e2cdaec15 *./tests/data/mpeg2.vsynth1.out.yuv stddev: 7.65 PSNR: 30.45 MAXDIFF: 84 bytes: 7603200/ 7603200 -8f6b20714918e6443e0c03716ed06f0d *./tests/data/vsynth1/mpeg2ivlc-qprd.mpg -783552 ./tests/data/vsynth1/mpeg2ivlc-qprd.mpg -98eb9da15f880978e7f2ee1e7ce476ef *./tests/data/mpeg2.vsynth1.out.yuv -stddev: 10.07 PSNR: 28.06 MAXDIFF: 165 bytes: 7603200/ 7603200 -af0cb75451aaa807beb5102707a98823 *./tests/data/vsynth1/mpeg2_422.mpg -728200 ./tests/data/vsynth1/mpeg2_422.mpg -29b518282493203e83b27a939795dc3a *./tests/data/mpeg2.vsynth1.out.yuv -stddev: 63.33 PSNR: 12.10 MAXDIFF: 242 bytes: 10137600/ 7603200 -4c067397b504d65532d7779cd36f3f88 *./tests/data/vsynth1/mpeg2.mpg -725668 ./tests/data/vsynth1/mpeg2.mpg -9f7b065f98d57cdecf90e6f7a2524eb5 *./tests/data/mpeg2.vsynth1.out.yuv -stddev: 7.65 PSNR: 30.45 MAXDIFF: 81 bytes: 7603200/ 7603200 -ec3f6713c88a2b41f6c369fd64341077 *./tests/data/vsynth1/mpeg2i.mpg -737473 ./tests/data/vsynth1/mpeg2i.mpg -97615390fdd69abfcbc7e02df863a7d2 *./tests/data/mpeg2.vsynth1.out.yuv -stddev: 7.67 PSNR: 30.43 MAXDIFF: 84 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2_422 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2_422 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2_422 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2_422 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +af0cb75451aaa807beb5102707a98823 *./tests/data/vsynth1/mpeg2_422.mpg +728200 ./tests/data/vsynth1/mpeg2_422.mpg +29b518282493203e83b27a939795dc3a *./tests/data/mpeg2_422.vsynth1.out.yuv +stddev: 63.33 PSNR: 12.10 MAXDIFF: 242 bytes: 10137600/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2_idct_int mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2_idct_int --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2_idct_int 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2_idct_int 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +4c067397b504d65532d7779cd36f3f88 *./tests/data/vsynth1/mpeg2_idct_int.mpg +725668 ./tests/data/vsynth1/mpeg2_idct_int.mpg +9f7b065f98d57cdecf90e6f7a2524eb5 *./tests/data/mpeg2_idct_int.vsynth1.out.yuv +stddev: 7.65 PSNR: 30.45 MAXDIFF: 81 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2_ilace mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2_ilace --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2_ilace 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2_ilace 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +ec3f6713c88a2b41f6c369fd64341077 *./tests/data/vsynth1/mpeg2i.mpg +737473 ./tests/data/vsynth1/mpeg2i.mpg +97615390fdd69abfcbc7e02df863a7d2 *./tests/data/mpeg2_ilace.vsynth1.out.yuv +stddev: 7.67 PSNR: 30.43 MAXDIFF: 84 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2_ivlc_qprd mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2_ivlc_qprd --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2_ivlc_qprd 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2_ivlc_qprd 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +8f6b20714918e6443e0c03716ed06f0d *./tests/data/vsynth1/mpeg2ivlc-qprd.mpg +783552 ./tests/data/vsynth1/mpeg2ivlc-qprd.mpg +98eb9da15f880978e7f2ee1e7ce476ef *./tests/data/mpeg2_ivlc_qprd.vsynth1.out.yuv +stddev: 10.07 PSNR: 28.06 MAXDIFF: 165 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2thread mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2thread --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2thread 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2thread 2012-01-11 00:34:30.000000000 +0000 @@ -2,11 +2,3 @@ 801313 ./tests/data/vsynth1/mpeg2thread.mpg d1658911ca83f5616c1d32abc40750de *./tests/data/mpeg2thread.vsynth1.out.yuv stddev: 7.63 PSNR: 30.48 MAXDIFF: 110 bytes: 7603200/ 7603200 -23d600b026222253c2340e23300a4c02 *./tests/data/vsynth1/mpeg2threadivlc.mpg -791773 ./tests/data/vsynth1/mpeg2threadivlc.mpg -d1658911ca83f5616c1d32abc40750de *./tests/data/mpeg2thread.vsynth1.out.yuv -stddev: 7.63 PSNR: 30.48 MAXDIFF: 110 bytes: 7603200/ 7603200 -d119fe917dd81d1ff758b4ce684a8d9d *./tests/data/vsynth1/mpeg2reuse.mpg -2074636 ./tests/data/vsynth1/mpeg2reuse.mpg -92ced6afe8c02304943c400cce51a5f4 *./tests/data/mpeg2thread.vsynth1.out.yuv -stddev: 7.66 PSNR: 30.44 MAXDIFF: 111 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2thread_ilace mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2thread_ilace --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg2thread_ilace 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg2thread_ilace 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +23d600b026222253c2340e23300a4c02 *./tests/data/vsynth1/mpeg2threadivlc.mpg +791773 ./tests/data/vsynth1/mpeg2threadivlc.mpg +d1658911ca83f5616c1d32abc40750de *./tests/data/mpeg2thread_ilace.vsynth1.out.yuv +stddev: 7.63 PSNR: 30.48 MAXDIFF: 110 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg4 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg4 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg4 2011-05-15 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg4 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -080e75117f8142001b096cd977ba287e *./tests/data/vsynth1/odivx.mp4 -540156 ./tests/data/vsynth1/odivx.mp4 +59a9e2eed314abface66aaf1b45eb8f2 *./tests/data/vsynth1/odivx.mp4 +540180 ./tests/data/vsynth1/odivx.mp4 8828a375448dc5c2215163ba70656f89 *./tests/data/mpeg4.vsynth1.out.yuv stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg4_adap mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg4_adap --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg4_adap 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg4_adap 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +2d870c0da9ab2231ab5fc06981e70399 *./tests/data/vsynth1/mpeg4-adap.avi +403456 ./tests/data/vsynth1/mpeg4-adap.avi +fa2049396479b5f170aa764fed5b2a31 *./tests/data/mpeg4_adap.vsynth1.out.yuv +stddev: 14.05 PSNR: 25.17 MAXDIFF: 184 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg4adv mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg4adv --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg4adv 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg4adv 2012-01-11 00:34:30.000000000 +0000 @@ -2,15 +2,3 @@ 589716 ./tests/data/vsynth1/mpeg4-adv.avi f8b226876b1b2c0b98fd6928fd9adbd8 *./tests/data/mpeg4adv.vsynth1.out.yuv stddev: 6.98 PSNR: 31.25 MAXDIFF: 84 bytes: 7603200/ 7603200 -d6b7e724a6ad66ab5e4c5a499218b40d *./tests/data/vsynth1/mpeg4-qprd.avi -710944 ./tests/data/vsynth1/mpeg4-qprd.avi -e65f4c7f343fe2bad1cac44b7da5f7c4 *./tests/data/mpeg4adv.vsynth1.out.yuv -stddev: 9.79 PSNR: 28.31 MAXDIFF: 176 bytes: 7603200/ 7603200 -2d870c0da9ab2231ab5fc06981e70399 *./tests/data/vsynth1/mpeg4-adap.avi -403456 ./tests/data/vsynth1/mpeg4-adap.avi -fa2049396479b5f170aa764fed5b2a31 *./tests/data/mpeg4adv.vsynth1.out.yuv -stddev: 14.05 PSNR: 25.17 MAXDIFF: 184 bytes: 7603200/ 7603200 -3bf17c3d04f52988386ce106a2a58976 *./tests/data/vsynth1/mpeg4-Q.avi -860678 ./tests/data/vsynth1/mpeg4-Q.avi -756928496245ecc701f79eebeec8e5e6 *./tests/data/mpeg4adv.vsynth1.out.yuv -stddev: 5.63 PSNR: 33.12 MAXDIFF: 70 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg4_qpel mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg4_qpel --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg4_qpel 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg4_qpel 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +3bf17c3d04f52988386ce106a2a58976 *./tests/data/vsynth1/mpeg4-Q.avi +860678 ./tests/data/vsynth1/mpeg4-Q.avi +756928496245ecc701f79eebeec8e5e6 *./tests/data/mpeg4_qpel.vsynth1.out.yuv +stddev: 5.63 PSNR: 33.12 MAXDIFF: 70 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg4_qprd mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg4_qprd --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/mpeg4_qprd 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/mpeg4_qprd 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +d6b7e724a6ad66ab5e4c5a499218b40d *./tests/data/vsynth1/mpeg4-qprd.avi +710944 ./tests/data/vsynth1/mpeg4-qprd.avi +e65f4c7f343fe2bad1cac44b7da5f7c4 *./tests/data/mpeg4_qprd.vsynth1.out.yuv +stddev: 9.79 PSNR: 28.31 MAXDIFF: 176 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/qtrle mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/qtrle --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/qtrle 2011-02-19 06:53:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/qtrle 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -d14041925ce5ec5001dc519276b1a1ab *./tests/data/vsynth1/qtrle.mov +7d75328a17e04796a39fe9be3a322946 *./tests/data/vsynth1/qtrle.mov 15263232 ./tests/data/vsynth1/qtrle.mov 243325fb2cae1a9245efd49aff936327 *./tests/data/qtrle.vsynth1.out.yuv stddev: 3.42 PSNR: 37.43 MAXDIFF: 48 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/svq1 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/svq1 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/svq1 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/svq1 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -595fc4e38734521356b60e67b813f0fa *./tests/data/vsynth1/svq1.mov +5c9d8734693f3cab57f61e76b5b6da7d *./tests/data/vsynth1/svq1.mov 1334367 ./tests/data/vsynth1/svq1.mov 9cc35c54b2c77d36bd7e308b393c1f81 *./tests/data/svq1.vsynth1.out.yuv stddev: 9.58 PSNR: 28.50 MAXDIFF: 210 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/v210 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/v210 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth1/v210 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth1/v210 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +dd6c870a2a52c9e75ce61c3670e710e7 *./tests/data/vsynth1/v210.avi +14752460 ./tests/data/vsynth1/v210.avi +50973792d3f1abe04a51ee0121f077f2 *./tests/data/v210.vsynth1.out.yuv +stddev: 1.85 PSNR: 42.78 MAXDIFF: 29 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/cljr mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/cljr --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/cljr 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/cljr 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +86250984790dd745a932f36cf229cef7 *./tests/data/vsynth2/cljr.avi + 5075660 ./tests/data/vsynth2/cljr.avi +3a70ba2a535ef9c7fc6478b27a2cb58a *./tests/data/cljr.vsynth2.out.yuv +stddev: 10.48 PSNR: 27.72 MAXDIFF: 64 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/dnxhd_1080i mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/dnxhd_1080i --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/dnxhd_1080i 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/dnxhd_1080i 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -995e433cd076e3c1534fa73181744a84 *./tests/data/vsynth2/dnxhd-1080i.mov +19a91b7da35cecf41e5e3cb322485627 *./tests/data/vsynth2/dnxhd-1080i.mov 3031875 ./tests/data/vsynth2/dnxhd-1080i.mov 3c559af629ae0a8fb1a9a0e4b4da7733 *./tests/data/dnxhd_1080i.vsynth2.out.yuv stddev: 1.31 PSNR: 45.77 MAXDIFF: 23 bytes: 760320/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/dnxhd_720p_10bit mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/dnxhd_720p_10bit --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/dnxhd_720p_10bit 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/dnxhd_720p_10bit 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +4b57da2c0c1280469ff3579f7151c227 *./tests/data/vsynth2/dnxhd-720p-10bit.dnxhd + 2293760 ./tests/data/vsynth2/dnxhd-720p-10bit.dnxhd +31a6aa8b8702e85fa3b48e73f035c4e4 *./tests/data/dnxhd_720p_10bit.vsynth2.out.yuv +stddev: 1.35 PSNR: 45.46 MAXDIFF: 23 bytes: 760320/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/dv mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/dv --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/dv 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/dv 2012-01-11 00:34:30.000000000 +0000 @@ -2,7 +2,3 @@ 7200000 ./tests/data/vsynth2/dv.dv 7ec62bd3350a6848364669e6e1e4b9cc *./tests/data/dv.vsynth2.out.yuv stddev: 1.71 PSNR: 43.47 MAXDIFF: 33 bytes: 7603200/ 7603200 -00a9d8683ac6826af41bcf7223fb0389 *./tests/data/vsynth2/dv411.dv -7200000 ./tests/data/vsynth2/dv411.dv -7f9fa421028aabb11eaf4c6513a5a843 *./tests/data/dv.vsynth2.out.yuv -stddev: 10.09 PSNR: 28.05 MAXDIFF: 60 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/dv_411 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/dv_411 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/dv_411 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/dv_411 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +00a9d8683ac6826af41bcf7223fb0389 *./tests/data/vsynth2/dv411.dv +7200000 ./tests/data/vsynth2/dv411.dv +7f9fa421028aabb11eaf4c6513a5a843 *./tests/data/dv_411.vsynth2.out.yuv +stddev: 10.09 PSNR: 28.05 MAXDIFF: 60 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2 2012-01-11 00:34:30.000000000 +0000 @@ -2,19 +2,3 @@ 198667 ./tests/data/vsynth2/mpeg2.mpg b7cae8a1f751b821cddcbe4d5dbc518c *./tests/data/mpeg2.vsynth2.out.yuv stddev: 4.96 PSNR: 34.20 MAXDIFF: 59 bytes: 7603200/ 7603200 -1ba5efeb53fab7b4b71edc96d86f6c91 *./tests/data/vsynth2/mpeg2ivlc-qprd.mpg -244694 ./tests/data/vsynth2/mpeg2ivlc-qprd.mpg -b26e21599dee48a174bdbc40b2817e55 *./tests/data/mpeg2.vsynth2.out.yuv -stddev: 4.15 PSNR: 35.76 MAXDIFF: 74 bytes: 7603200/ 7603200 -2c8e33c2d2efab86fc16a195f6877682 *./tests/data/vsynth2/mpeg2_422.mpg -356124 ./tests/data/vsynth2/mpeg2_422.mpg -de44597c6c470f3e7019b31245a3ff69 *./tests/data/mpeg2.vsynth2.out.yuv -stddev: 54.55 PSNR: 13.39 MAXDIFF: 201 bytes: 10137600/ 7603200 -f979bcca866e6e4cad5dc6cb06e56cfb *./tests/data/vsynth2/mpeg2.mpg -198041 ./tests/data/vsynth2/mpeg2.mpg -f6d9bf24ff8676a7f6076c05cd2c81a3 *./tests/data/mpeg2.vsynth2.out.yuv -stddev: 4.97 PSNR: 34.19 MAXDIFF: 58 bytes: 7603200/ 7603200 -f90197a8b6e62ae25f82625337f27240 *./tests/data/vsynth2/mpeg2i.mpg -204579 ./tests/data/vsynth2/mpeg2i.mpg -ea5057b60146c06d40449cdfc686bf13 *./tests/data/mpeg2.vsynth2.out.yuv -stddev: 4.98 PSNR: 34.18 MAXDIFF: 65 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2_422 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2_422 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2_422 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2_422 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +2c8e33c2d2efab86fc16a195f6877682 *./tests/data/vsynth2/mpeg2_422.mpg +356124 ./tests/data/vsynth2/mpeg2_422.mpg +de44597c6c470f3e7019b31245a3ff69 *./tests/data/mpeg2_422.vsynth2.out.yuv +stddev: 54.55 PSNR: 13.39 MAXDIFF: 201 bytes: 10137600/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2_idct_int mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2_idct_int --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2_idct_int 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2_idct_int 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +f979bcca866e6e4cad5dc6cb06e56cfb *./tests/data/vsynth2/mpeg2_idct_int.mpg +198041 ./tests/data/vsynth2/mpeg2_idct_int.mpg +f6d9bf24ff8676a7f6076c05cd2c81a3 *./tests/data/mpeg2_idct_int.vsynth2.out.yuv +stddev: 4.97 PSNR: 34.19 MAXDIFF: 58 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2_ilace mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2_ilace --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2_ilace 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2_ilace 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +f90197a8b6e62ae25f82625337f27240 *./tests/data/vsynth2/mpeg2i.mpg +204579 ./tests/data/vsynth2/mpeg2i.mpg +ea5057b60146c06d40449cdfc686bf13 *./tests/data/mpeg2_ilace.vsynth2.out.yuv +stddev: 4.98 PSNR: 34.18 MAXDIFF: 65 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2_ivlc_qprd mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2_ivlc_qprd --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2_ivlc_qprd 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2_ivlc_qprd 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +1ba5efeb53fab7b4b71edc96d86f6c91 *./tests/data/vsynth2/mpeg2ivlc-qprd.mpg +244694 ./tests/data/vsynth2/mpeg2ivlc-qprd.mpg +b26e21599dee48a174bdbc40b2817e55 *./tests/data/mpeg2_ivlc_qprd.vsynth2.out.yuv +stddev: 4.15 PSNR: 35.76 MAXDIFF: 74 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2thread mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2thread --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2thread 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2thread 2012-01-11 00:34:30.000000000 +0000 @@ -2,11 +2,3 @@ 179650 ./tests/data/vsynth2/mpeg2thread.mpg 8c6a7ed2eb73bd18fd2bb9829464100d *./tests/data/mpeg2thread.vsynth2.out.yuv stddev: 4.72 PSNR: 34.65 MAXDIFF: 72 bytes: 7603200/ 7603200 -10b900e32809758857c596d56746e00e *./tests/data/vsynth2/mpeg2threadivlc.mpg -178801 ./tests/data/vsynth2/mpeg2threadivlc.mpg -8c6a7ed2eb73bd18fd2bb9829464100d *./tests/data/mpeg2thread.vsynth2.out.yuv -stddev: 4.72 PSNR: 34.65 MAXDIFF: 72 bytes: 7603200/ 7603200 -864d6bf2982a61e510003a518be65a2d *./tests/data/vsynth2/mpeg2reuse.mpg -383419 ./tests/data/vsynth2/mpeg2reuse.mpg -bb20fa080cfd2b0a687ea7376ff4f902 *./tests/data/mpeg2thread.vsynth2.out.yuv -stddev: 4.73 PSNR: 34.63 MAXDIFF: 72 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2thread_ilace mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2thread_ilace --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg2thread_ilace 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg2thread_ilace 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +10b900e32809758857c596d56746e00e *./tests/data/vsynth2/mpeg2threadivlc.mpg +178801 ./tests/data/vsynth2/mpeg2threadivlc.mpg +8c6a7ed2eb73bd18fd2bb9829464100d *./tests/data/mpeg2thread_ilace.vsynth2.out.yuv +stddev: 4.72 PSNR: 34.65 MAXDIFF: 72 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg4 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg4 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg4 2011-05-15 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg4 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -8ffbe8ce43fe126b12cf9621717d641b *./tests/data/vsynth2/odivx.mp4 -119809 ./tests/data/vsynth2/odivx.mp4 +8c9afbf564008a8ce6719cc3546deae1 *./tests/data/vsynth2/odivx.mp4 +119833 ./tests/data/vsynth2/odivx.mp4 90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.vsynth2.out.yuv stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg4_adap mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg4_adap --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg4_adap 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg4_adap 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +547e1849dcf910935ff6383ca49e5706 *./tests/data/vsynth2/mpeg4-adap.avi +198510 ./tests/data/vsynth2/mpeg4-adap.avi +4affb83f6adc94f31024b4f9e0168945 *./tests/data/mpeg4_adap.vsynth2.out.yuv +stddev: 3.75 PSNR: 36.65 MAXDIFF: 71 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg4adv mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg4adv --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg4adv 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg4adv 2012-01-11 00:34:30.000000000 +0000 @@ -2,15 +2,3 @@ 141546 ./tests/data/vsynth2/mpeg4-adv.avi 3f3a21e9db85a9c0f7022f557a5374c1 *./tests/data/mpeg4adv.vsynth2.out.yuv stddev: 4.94 PSNR: 34.25 MAXDIFF: 69 bytes: 7603200/ 7603200 -fd5ab0f55dbc959316e32923e86290df *./tests/data/vsynth2/mpeg4-qprd.avi -231458 ./tests/data/vsynth2/mpeg4-qprd.avi -de8a883865e2dff7a51f66da6c48df48 *./tests/data/mpeg4adv.vsynth2.out.yuv -stddev: 3.71 PSNR: 36.72 MAXDIFF: 61 bytes: 7603200/ 7603200 -547e1849dcf910935ff6383ca49e5706 *./tests/data/vsynth2/mpeg4-adap.avi -198510 ./tests/data/vsynth2/mpeg4-adap.avi -4affb83f6adc94f31024b4f9e0168945 *./tests/data/mpeg4adv.vsynth2.out.yuv -stddev: 3.75 PSNR: 36.65 MAXDIFF: 71 bytes: 7603200/ 7603200 -7680d2e7d34399dfdfb8a49cf1e10239 *./tests/data/vsynth2/mpeg4-Q.avi -163688 ./tests/data/vsynth2/mpeg4-Q.avi -26dc7c78955fa678fbf150e236eb5627 *./tests/data/mpeg4adv.vsynth2.out.yuv -stddev: 3.97 PSNR: 36.14 MAXDIFF: 54 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg4_qpel mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg4_qpel --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg4_qpel 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg4_qpel 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +7680d2e7d34399dfdfb8a49cf1e10239 *./tests/data/vsynth2/mpeg4-Q.avi +163688 ./tests/data/vsynth2/mpeg4-Q.avi +26dc7c78955fa678fbf150e236eb5627 *./tests/data/mpeg4_qpel.vsynth2.out.yuv +stddev: 3.97 PSNR: 36.14 MAXDIFF: 54 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg4_qprd mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg4_qprd --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/mpeg4_qprd 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/mpeg4_qprd 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +fd5ab0f55dbc959316e32923e86290df *./tests/data/vsynth2/mpeg4-qprd.avi +231458 ./tests/data/vsynth2/mpeg4-qprd.avi +de8a883865e2dff7a51f66da6c48df48 *./tests/data/mpeg4_qprd.vsynth2.out.yuv +stddev: 3.71 PSNR: 36.72 MAXDIFF: 61 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/qtrle mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/qtrle --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/qtrle 2011-02-19 06:53:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/qtrle 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -d8c1604dc46d9aa4ec0385e6722c6989 *./tests/data/vsynth2/qtrle.mov +4805f35ca6e03b9279cc18f3f7356366 *./tests/data/vsynth2/qtrle.mov 14798419 ./tests/data/vsynth2/qtrle.mov b2418e0e3a9a8619b31219cbcf24dc82 *./tests/data/qtrle.vsynth2.out.yuv stddev: 1.26 PSNR: 46.06 MAXDIFF: 13 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/svq1 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/svq1 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/svq1 2011-01-30 14:03:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/svq1 2012-01-11 00:34:30.000000000 +0000 @@ -1,4 +1,4 @@ -7f9fbe4890bc1df67867bf03803dca48 *./tests/data/vsynth2/svq1.mov +138ad38281570f1a3b68d63ed896435d *./tests/data/vsynth2/svq1.mov 766851 ./tests/data/vsynth2/svq1.mov aa03471dac3f49455a33a2b19fda1098 *./tests/data/svq1.vsynth2.out.yuv stddev: 3.23 PSNR: 37.93 MAXDIFF: 61 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/v210 mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/v210 --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/ref/vsynth2/v210 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/ref/vsynth2/v210 2012-01-11 00:34:30.000000000 +0000 @@ -0,0 +1,4 @@ +db0579bd46e1ba133ff86c0f7cdd761f *./tests/data/vsynth2/v210.avi +14752460 ./tests/data/vsynth2/v210.avi +a627fb50c8276200fd71383977d87ca3 *./tests/data/v210.vsynth2.out.yuv +stddev: 0.34 PSNR: 57.43 MAXDIFF: 6 bytes: 7603200/ 7603200 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/regression-funcs.sh mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/regression-funcs.sh --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/regression-funcs.sh 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/regression-funcs.sh 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# common regression functions for ffmpeg +# common regression functions for avconv # # @@ -18,7 +18,7 @@ outfile="$datadir/$test_ref/" # various files -ffmpeg="$target_exec ${target_path}/ffmpeg" +avconv="$target_exec ${target_path}/avconv" tiny_psnr="tests/tiny_psnr" raw_src="${target_path}/$raw_src_dir/%02d.pgm" raw_dst="$datadir/$this.out.yuv" @@ -43,23 +43,23 @@ . $(dirname $0)/md5.sh -FFMPEG_OPTS="-v 0 -y" +AVCONV_OPTS="-nostats -y" COMMON_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact" DEC_OPTS="$COMMON_OPTS -threads $threads" ENC_OPTS="$COMMON_OPTS -threads 1 -dct fastint" -run_ffmpeg() +run_avconv() { - $echov $ffmpeg $FFMPEG_OPTS $* - $ffmpeg $FFMPEG_OPTS $* + $echov $avconv $AVCONV_OPTS $* + $avconv $AVCONV_OPTS $* } -do_ffmpeg() +do_avconv() { f="$1" shift set -- $* ${target_path}/$f - run_ffmpeg $* + run_avconv $* do_md5sum $f if [ $f = $raw_dst ] ; then $tiny_psnr $f $raw_ref @@ -70,12 +70,12 @@ fi } -do_ffmpeg_nomd5() +do_avconv_nomd5() { f="$1" shift set -- $* ${target_path}/$f - run_ffmpeg $* + run_avconv $* if [ $f = $raw_dst ] ; then $tiny_psnr $f $raw_ref elif [ $f = $pcm_dst ] ; then @@ -85,32 +85,32 @@ fi } -do_ffmpeg_crc() +do_avconv_crc() { f="$1" shift - run_ffmpeg $* -f crc "$target_crcfile" + run_avconv $* -f crc "$target_crcfile" echo "$f $(cat $crcfile)" } do_video_decoding() { - do_ffmpeg $raw_dst $DEC_OPTS $1 -i $target_path/$file -f rawvideo $ENC_OPTS -vsync 0 $2 + do_avconv $raw_dst $DEC_OPTS $1 -i $target_path/$file -f rawvideo $ENC_OPTS -vsync 0 $2 } do_video_encoding() { file=${outfile}$1 - do_ffmpeg $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS $2 + do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS $2 } do_audio_encoding() { file=${outfile}$1 - do_ffmpeg $file $DEC_OPTS -ac 2 -ar 44100 -f s16le -i $pcm_src -ab 128k $ENC_OPTS $2 + do_avconv $file $DEC_OPTS -ac 2 -ar 44100 -f s16le -i $pcm_src -ab 128k $ENC_OPTS $2 } do_audio_decoding() { - do_ffmpeg $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav + do_avconv $pcm_dst $DEC_OPTS -i $target_path/$file -sample_fmt s16 -f wav } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/rotozoom.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/rotozoom.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/rotozoom.c 2011-05-11 13:51:50.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/rotozoom.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Generates a synthetic YUV video sequence suitable for codec testing. + * Generate a synthetic YUV video sequence suitable for codec testing. * * copyright (c) Sebastien Bechet * diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/seek_test.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/seek_test.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/seek_test.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/seek_test.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2003 Fabrice Bellard - * Copyright (c) 2007 Michael Niedermayer - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include - -#include "libavutil/common.h" -#include "libavformat/avformat.h" - -#undef exit -#undef printf -#undef fprintf - -static char buffer[20]; - -static const char *ret_str(int v) -{ - switch (v) { - case AVERROR_EOF: return "-EOF"; - case AVERROR(EIO): return "-EIO"; - case AVERROR(ENOMEM): return "-ENOMEM"; - case AVERROR(EINVAL): return "-EINVAL"; - default: - snprintf(buffer, sizeof(buffer), "%2d", v); - return buffer; - } -} - -static void ts_str(char buffer[60], int64_t ts, AVRational base) -{ - double tsval; - if (ts == AV_NOPTS_VALUE) { - strcpy(buffer, " NOPTS "); - return; - } - tsval = ts * av_q2d(base); - snprintf(buffer, 60, "%9f", tsval); -} - -int main(int argc, char **argv) -{ - const char *filename; - AVFormatContext *ic = NULL; - int i, ret, stream_id; - int64_t timestamp; - AVFormatParameters params, *ap= ¶ms; - memset(ap, 0, sizeof(params)); - ap->channels=1; - ap->sample_rate= 22050; - - /* initialize libavcodec, and register all codecs and formats */ - av_register_all(); - - if (argc != 2) { - printf("usage: %s input_file\n" - "\n", argv[0]); - exit(1); - } - - filename = argv[1]; - - ret = av_open_input_file(&ic, filename, NULL, 0, ap); - if (ret < 0) { - fprintf(stderr, "cannot open %s\n", filename); - exit(1); - } - - ret = av_find_stream_info(ic); - if (ret < 0) { - fprintf(stderr, "%s: could not find codec parameters\n", filename); - exit(1); - } - - for(i=0; ; i++){ - AVPacket pkt; - AVStream *av_uninit(st); - char ts_buf[60]; - - memset(&pkt, 0, sizeof(pkt)); - if(ret>=0){ - ret= av_read_frame(ic, &pkt); - if(ret>=0){ - char dts_buf[60]; - st= ic->streams[pkt.stream_index]; - ts_str(dts_buf, pkt.dts, st->time_base); - ts_str(ts_buf, pkt.pts, st->time_base); - printf("ret:%-10s st:%2d flags:%d dts:%s pts:%s pos:%7" PRId64 " size:%6d", ret_str(ret), pkt.stream_index, pkt.flags, dts_buf, ts_buf, pkt.pos, pkt.size); - av_free_packet(&pkt); - } else - printf("ret:%s", ret_str(ret)); // necessary to avoid trailing whitespace - printf("\n"); - } - - if(i>25) break; - - stream_id= (i>>1)%(ic->nb_streams+1) - 1; - timestamp= (i*19362894167LL) % (4*AV_TIME_BASE) - AV_TIME_BASE; - if(stream_id>=0){ - st= ic->streams[stream_id]; - timestamp= av_rescale_q(timestamp, AV_TIME_BASE_Q, st->time_base); - } - //FIXME fully test the new seek API - if(i&1) ret = avformat_seek_file(ic, stream_id, INT64_MIN, timestamp, timestamp, 0); - else ret = avformat_seek_file(ic, stream_id, timestamp, timestamp, INT64_MAX, 0); - ts_str(ts_buf, timestamp, stream_id < 0 ? AV_TIME_BASE_Q : st->time_base); - printf("ret:%-10s st:%2d flags:%d ts:%s\n", ret_str(ret), stream_id, i&1, ts_buf); - } - - av_close_input_file(ic); - - return 0; -} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/videogen.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/videogen.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tests/videogen.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tests/videogen.c 2012-01-11 00:34:30.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Generates a synthetic YUV video sequence suitable for codec testing. - * NOTE: No floats are used to guarantee a bit exact output. + * Generate a synthetic YUV video sequence suitable for codec testing. + * NOTE: No floats are used to guarantee bitexact output. * * Copyright (c) 2002 Fabrice Bellard * diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tools/cws2fws.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tools/cws2fws.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tools/cws2fws.c 2011-05-17 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tools/cws2fws.c 2012-01-11 00:34:30.000000000 +0000 @@ -29,14 +29,14 @@ if (argc < 3) { printf("Usage: %s \n", argv[0]); - exit(1); + return 1; } fd_in = open(argv[1], O_RDONLY); if (fd_in < 0) { perror("Error opening input file"); - exit(1); + return 1; } fd_out = open(argv[2], O_WRONLY|O_CREAT, 00644); @@ -44,7 +44,7 @@ { perror("Error opening output file"); close(fd_in); - exit(1); + return 1; } if (read(fd_in, &buf_in, 8) != 8) @@ -52,13 +52,13 @@ printf("Header error\n"); close(fd_in); close(fd_out); - exit(1); + return 1; } if (buf_in[0] != 'C' || buf_in[1] != 'W' || buf_in[2] != 'S') { printf("Not a compressed flash file\n"); - exit(1); + return 1; } fstat(fd_in, &statbuf); @@ -71,7 +71,7 @@ buf_in[0] = 'F'; if (write(fd_out, &buf_in, 8) < 8) { perror("Error writing output file"); - exit(1); + return 1; } zstream.zalloc = NULL; @@ -97,7 +97,7 @@ { printf("Error while decompressing: %d\n", ret); inflateEnd(&zstream); - exit(1); + return 1; } dbgprintf("a_in: %d t_in: %lu a_out: %d t_out: %lu -- %lu out\n", @@ -106,7 +106,7 @@ if (write(fd_out, &buf_out, zstream.total_out - last_out) < zstream.total_out - last_out) { perror("Error writing output file"); - exit(1); + return 1; } i += len; @@ -128,7 +128,7 @@ lseek(fd_out, 4, SEEK_SET); if (write(fd_out, &buf_in, 4) < 4) { perror("Error writing output file"); - exit(1); + return 1; } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tools/patcheck mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tools/patcheck --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tools/patcheck 2011-05-13 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tools/patcheck 2012-01-11 00:34:30.000000000 +0000 @@ -55,6 +55,7 @@ hiegrep '=[-+\*\&] ' 'looks like compound assignment' $* hiegrep2 '/\*\* *[a-zA-Z0-9].*' '\*/' 'Inconsistently formatted doxygen comment' $* hiegrep '; */\*\*[^<]' 'Misformatted doxygen comment' $* +hiegrep '//!|/\*!' 'inconsistent doxygen syntax' $* hiegrep2 '(int|unsigned|static|void)[a-zA-Z0-9 _]*(init|end)[a-zA-Z0-9 _]*\(.*[^;]$' '(av_cold|:\+[^a-zA-Z_])' 'These functions may need av_cold, please review the whole patch for similar functions needing av_cold' $* @@ -66,7 +67,7 @@ cat $TMP hiegrep '# *ifdef * (HAVE|CONFIG)_' 'ifdefs that should be #if' $* -hiegrep '\b(awnser|cant|dont|quantised|quantisation|teh|wont)\b' 'common typos' $* +hiegrep '\b(awnser|cant|dont|wont|usefull|successfull|occured|teh|alot|wether|skiped|heigth|informations|colums|loosy|loosing|seperate|preceed|upto|paket)\b' 'common typos' $* hiegrep 'av_log\( *NULL' 'Missing context in av_log' $* hiegrep '[^sn]printf' 'Please use av_log' $* diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tools/pktdumper.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tools/pktdumper.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tools/pktdumper.c 2011-05-17 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tools/pktdumper.c 2012-01-11 00:34:30.000000000 +0000 @@ -44,7 +44,7 @@ { char fntemplate[PATH_MAX]; char pktfilename[PATH_MAX]; - AVFormatContext *fctx; + AVFormatContext *fctx = NULL; AVPacket pkt; int64_t pktnum = 0; int64_t maxpkts = 0; @@ -83,15 +83,15 @@ // register all file formats av_register_all(); - err = av_open_input_file(&fctx, argv[1], NULL, 0, NULL); + err = avformat_open_input(&fctx, argv[1], NULL, NULL); if (err < 0) { - fprintf(stderr, "av_open_input_file: error %d\n", err); + fprintf(stderr, "cannot open input: error %d\n", err); return 1; } - err = av_find_stream_info(fctx); + err = avformat_find_stream_info(fctx, NULL); if (err < 0) { - fprintf(stderr, "av_find_stream_info: error %d\n", err); + fprintf(stderr, "avformat_find_stream_info: error %d\n", err); return 1; } @@ -117,7 +117,7 @@ break; } - av_close_input_file(fctx); + avformat_close_input(&fctx); while (donotquit) sleep(60); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tools/qt-faststart.c mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tools/qt-faststart.c --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/tools/qt-faststart.c 2011-03-20 09:30:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/tools/qt-faststart.c 2012-01-11 00:34:30.000000000 +0000 @@ -30,29 +30,31 @@ #include #ifdef __MINGW32__ -#define fseeko(x,y,z) fseeko64(x,y,z) -#define ftello(x) ftello64(x) +#define fseeko(x, y, z) fseeko64(x, y, z) +#define ftello(x) ftello64(x) #endif -#define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1]) -#define BE_32(x) ((((uint8_t*)(x))[0] << 24) | \ - (((uint8_t*)(x))[1] << 16) | \ - (((uint8_t*)(x))[2] << 8) | \ +#define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1]) + +#define BE_32(x) ((((uint8_t*)(x))[0] << 24) | \ + (((uint8_t*)(x))[1] << 16) | \ + (((uint8_t*)(x))[2] << 8) | \ ((uint8_t*)(x))[3]) -#define BE_64(x) (((uint64_t)(((uint8_t*)(x))[0]) << 56) | \ - ((uint64_t)(((uint8_t*)(x))[1]) << 48) | \ - ((uint64_t)(((uint8_t*)(x))[2]) << 40) | \ - ((uint64_t)(((uint8_t*)(x))[3]) << 32) | \ - ((uint64_t)(((uint8_t*)(x))[4]) << 24) | \ - ((uint64_t)(((uint8_t*)(x))[5]) << 16) | \ - ((uint64_t)(((uint8_t*)(x))[6]) << 8) | \ - ((uint64_t)((uint8_t*)(x))[7])) - -#define BE_FOURCC( ch0, ch1, ch2, ch3 ) \ - ( (uint32_t)(unsigned char)(ch3) | \ - ( (uint32_t)(unsigned char)(ch2) << 8 ) | \ - ( (uint32_t)(unsigned char)(ch1) << 16 ) | \ - ( (uint32_t)(unsigned char)(ch0) << 24 ) ) + +#define BE_64(x) (((uint64_t)(((uint8_t*)(x))[0]) << 56) | \ + ((uint64_t)(((uint8_t*)(x))[1]) << 48) | \ + ((uint64_t)(((uint8_t*)(x))[2]) << 40) | \ + ((uint64_t)(((uint8_t*)(x))[3]) << 32) | \ + ((uint64_t)(((uint8_t*)(x))[4]) << 24) | \ + ((uint64_t)(((uint8_t*)(x))[5]) << 16) | \ + ((uint64_t)(((uint8_t*)(x))[6]) << 8) | \ + ((uint64_t)( (uint8_t*)(x))[7])) + +#define BE_FOURCC(ch0, ch1, ch2, ch3) \ + ( (uint32_t)(unsigned char)(ch3) | \ + ((uint32_t)(unsigned char)(ch2) << 8) | \ + ((uint32_t)(unsigned char)(ch1) << 16) | \ + ((uint32_t)(unsigned char)(ch0) << 24) ) #define QT_ATOM BE_FOURCC /* top level atoms */ @@ -71,16 +73,16 @@ #define STCO_ATOM QT_ATOM('s', 't', 'c', 'o') #define CO64_ATOM QT_ATOM('c', 'o', '6', '4') -#define ATOM_PREAMBLE_SIZE 8 -#define COPY_BUFFER_SIZE 1024 +#define ATOM_PREAMBLE_SIZE 8 +#define COPY_BUFFER_SIZE 1024 int main(int argc, char *argv[]) { FILE *infile = NULL; FILE *outfile = NULL; unsigned char atom_bytes[ATOM_PREAMBLE_SIZE]; - uint32_t atom_type = 0; - uint64_t atom_size = 0; + uint32_t atom_type = 0; + uint64_t atom_size = 0; uint64_t atom_offset = 0; uint64_t last_offset; unsigned char *moov_atom = NULL; @@ -95,7 +97,7 @@ int bytes_to_copy; if (argc != 3) { - printf ("Usage: qt-faststart \n"); + printf("Usage: qt-faststart \n"); return 0; } @@ -116,7 +118,7 @@ if (fread(atom_bytes, ATOM_PREAMBLE_SIZE, 1, infile) != 1) { break; } - atom_size = (uint32_t)BE_32(&atom_bytes[0]); + atom_size = (uint32_t) BE_32(&atom_bytes[0]); atom_type = BE_32(&atom_bytes[4]); /* keep ftyp atom */ @@ -125,8 +127,8 @@ free(ftyp_atom); ftyp_atom = malloc(ftyp_atom_size); if (!ftyp_atom) { - printf ("could not allocate %"PRIu64" byte for ftyp atom\n", - atom_size); + printf("could not allocate %"PRIu64" bytes for ftyp atom\n", + atom_size); goto error_out; } fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR); @@ -137,17 +139,17 @@ start_offset = ftello(infile); } else { - /* 64-bit special case */ - if (atom_size == 1) { - if (fread(atom_bytes, ATOM_PREAMBLE_SIZE, 1, infile) != 1) { - break; + /* 64-bit special case */ + if (atom_size == 1) { + if (fread(atom_bytes, ATOM_PREAMBLE_SIZE, 1, infile) != 1) { + break; + } + atom_size = BE_64(&atom_bytes[0]); + fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE * 2, SEEK_CUR); + } else { + fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE, SEEK_CUR); } - atom_size = BE_64(&atom_bytes[0]); - fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE * 2, SEEK_CUR); - } else { - fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE, SEEK_CUR); } - } printf("%c%c%c%c %10"PRIu64" %"PRIu64"\n", (atom_type >> 24) & 255, (atom_type >> 16) & 255, @@ -165,7 +167,7 @@ (atom_type != PICT_ATOM) && (atom_type != UUID_ATOM) && (atom_type != FTYP_ATOM)) { - printf ("encountered non-QT top-level atom (is this a Quicktime file?)\n"); + printf("encountered non-QT top-level atom (is this a QuickTime file?)\n"); break; } atom_offset += atom_size; @@ -178,7 +180,7 @@ } if (atom_type != MOOV_ATOM) { - printf ("last atom in file was not a moov atom\n"); + printf("last atom in file was not a moov atom\n"); free(ftyp_atom); fclose(infile); return 0; @@ -187,12 +189,11 @@ /* moov atom was, in fact, the last atom in the chunk; load the whole * moov atom */ fseeko(infile, -atom_size, SEEK_END); - last_offset = ftello(infile); + last_offset = ftello(infile); moov_atom_size = atom_size; - moov_atom = malloc(moov_atom_size); + moov_atom = malloc(moov_atom_size); if (!moov_atom) { - printf ("could not allocate %"PRIu64" byte for moov atom\n", - atom_size); + printf("could not allocate %"PRIu64" bytes for moov atom\n", atom_size); goto error_out; } if (fread(moov_atom, atom_size, 1, infile) != 1) { @@ -203,7 +204,7 @@ /* this utility does not support compressed atoms yet, so disqualify * files with compressed QT atoms */ if (BE_32(&moov_atom[12]) == CMOV_ATOM) { - printf ("this utility does not support compressed moov atoms yet\n"); + printf("this utility does not support compressed moov atoms yet\n"); goto error_out; } @@ -215,15 +216,15 @@ for (i = 4; i < moov_atom_size - 4; i++) { atom_type = BE_32(&moov_atom[i]); if (atom_type == STCO_ATOM) { - printf (" patching stco atom...\n"); + printf(" patching stco atom...\n"); atom_size = BE_32(&moov_atom[i - 4]); if (i + atom_size - 4 > moov_atom_size) { - printf (" bad atom size\n"); + printf(" bad atom size\n"); goto error_out; } offset_count = BE_32(&moov_atom[i + 8]); for (j = 0; j < offset_count; j++) { - current_offset = BE_32(&moov_atom[i + 12 + j * 4]); + current_offset = BE_32(&moov_atom[i + 12 + j * 4]); current_offset += moov_atom_size; moov_atom[i + 12 + j * 4 + 0] = (current_offset >> 24) & 0xFF; moov_atom[i + 12 + j * 4 + 1] = (current_offset >> 16) & 0xFF; @@ -232,15 +233,15 @@ } i += atom_size - 4; } else if (atom_type == CO64_ATOM) { - printf (" patching co64 atom...\n"); + printf(" patching co64 atom...\n"); atom_size = BE_32(&moov_atom[i - 4]); if (i + atom_size - 4 > moov_atom_size) { - printf (" bad atom size\n"); + printf(" bad atom size\n"); goto error_out; } offset_count = BE_32(&moov_atom[i + 8]); for (j = 0; j < offset_count; j++) { - current_offset = BE_64(&moov_atom[i + 12 + j * 8]); + current_offset = BE_64(&moov_atom[i + 12 + j * 8]); current_offset += moov_atom_size; moov_atom[i + 12 + j * 8 + 0] = (current_offset >> 56) & 0xFF; moov_atom[i + 12 + j * 8 + 1] = (current_offset >> 48) & 0xFF; @@ -275,7 +276,7 @@ /* dump the same ftyp atom */ if (ftyp_atom_size > 0) { - printf (" writing ftyp atom...\n"); + printf(" writing ftyp atom...\n"); if (fwrite(ftyp_atom, ftyp_atom_size, 1, outfile) != 1) { perror(argv[2]); goto error_out; @@ -283,14 +284,14 @@ } /* dump the new moov atom */ - printf (" writing moov atom...\n"); + printf(" writing moov atom...\n"); if (fwrite(moov_atom, moov_atom_size, 1, outfile) != 1) { perror(argv[2]); goto error_out; } /* copy the remainder of the infile, from offset 0 -> last_offset - 1 */ - printf (" copying rest of file...\n"); + printf(" copying rest of file...\n"); while (last_offset) { if (last_offset > COPY_BUFFER_SIZE) bytes_to_copy = COPY_BUFFER_SIZE; @@ -305,7 +306,6 @@ perror(argv[2]); goto error_out; } - last_offset -= bytes_to_copy; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/VERSION mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/VERSION --- mplayer-1.0~rc4.dfsg1+svn33713/ffmpeg/VERSION 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/ffmpeg/VERSION 2012-01-11 03:05:12.000000000 +0000 @@ -0,0 +1 @@ +v0.8b1-211-g68e252f diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/fmt-conversion.c mplayer-1.0~rc4.dfsg1+svn34540/fmt-conversion.c --- mplayer-1.0~rc4.dfsg1+svn33713/fmt-conversion.c 2011-06-17 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/fmt-conversion.c 2012-01-05 20:32:10.000000000 +0000 @@ -28,50 +28,58 @@ int fmt; enum PixelFormat pix_fmt; } conversion_map[] = { - {IMGFMT_ARGB, PIX_FMT_ARGB}, - {IMGFMT_BGRA, PIX_FMT_BGRA}, - {IMGFMT_BGR24, PIX_FMT_BGR24}, + {IMGFMT_ARGB, PIX_FMT_ARGB}, + {IMGFMT_BGRA, PIX_FMT_BGRA}, + {IMGFMT_BGR24, PIX_FMT_BGR24}, {IMGFMT_BGR16BE, PIX_FMT_RGB565BE}, {IMGFMT_BGR16LE, PIX_FMT_RGB565LE}, {IMGFMT_BGR15BE, PIX_FMT_RGB555BE}, {IMGFMT_BGR15LE, PIX_FMT_RGB555LE}, {IMGFMT_BGR12BE, PIX_FMT_RGB444BE}, {IMGFMT_BGR12LE, PIX_FMT_RGB444LE}, - {IMGFMT_BGR8, PIX_FMT_RGB8}, - {IMGFMT_BGR4, PIX_FMT_RGB4}, - {IMGFMT_BGR1, PIX_FMT_MONOBLACK}, - {IMGFMT_RGB1, PIX_FMT_MONOBLACK}, - {IMGFMT_RG4B, PIX_FMT_BGR4_BYTE}, - {IMGFMT_BG4B, PIX_FMT_RGB4_BYTE}, + {IMGFMT_BGR8, PIX_FMT_RGB8}, + {IMGFMT_BGR4, PIX_FMT_RGB4}, + {IMGFMT_BGR1, PIX_FMT_MONOBLACK}, + {IMGFMT_RGB1, PIX_FMT_MONOBLACK}, + {IMGFMT_RG4B, PIX_FMT_BGR4_BYTE}, + {IMGFMT_BG4B, PIX_FMT_RGB4_BYTE}, {IMGFMT_RGB48LE, PIX_FMT_RGB48LE}, {IMGFMT_RGB48BE, PIX_FMT_RGB48BE}, - {IMGFMT_ABGR, PIX_FMT_ABGR}, - {IMGFMT_RGBA, PIX_FMT_RGBA}, - {IMGFMT_RGB24, PIX_FMT_RGB24}, + {IMGFMT_ABGR, PIX_FMT_ABGR}, + {IMGFMT_RGBA, PIX_FMT_RGBA}, + {IMGFMT_RGB24, PIX_FMT_RGB24}, {IMGFMT_RGB16BE, PIX_FMT_BGR565BE}, {IMGFMT_RGB16LE, PIX_FMT_BGR565LE}, {IMGFMT_RGB15BE, PIX_FMT_BGR555BE}, {IMGFMT_RGB15LE, PIX_FMT_BGR555LE}, {IMGFMT_RGB12BE, PIX_FMT_BGR444BE}, {IMGFMT_RGB12LE, PIX_FMT_BGR444LE}, - {IMGFMT_RGB8, PIX_FMT_BGR8}, - {IMGFMT_RGB4, PIX_FMT_BGR4}, - {IMGFMT_BGR8, PIX_FMT_PAL8}, - {IMGFMT_YUY2, PIX_FMT_YUYV422}, - {IMGFMT_UYVY, PIX_FMT_UYVY422}, - {IMGFMT_NV12, PIX_FMT_NV12}, - {IMGFMT_NV21, PIX_FMT_NV21}, - {IMGFMT_Y800, PIX_FMT_GRAY8}, - {IMGFMT_Y8, PIX_FMT_GRAY8}, - {IMGFMT_YVU9, PIX_FMT_YUV410P}, - {IMGFMT_IF09, PIX_FMT_YUV410P}, - {IMGFMT_YV12, PIX_FMT_YUV420P}, - {IMGFMT_I420, PIX_FMT_YUV420P}, - {IMGFMT_IYUV, PIX_FMT_YUV420P}, - {IMGFMT_411P, PIX_FMT_YUV411P}, - {IMGFMT_422P, PIX_FMT_YUV422P}, - {IMGFMT_444P, PIX_FMT_YUV444P}, - {IMGFMT_440P, PIX_FMT_YUV440P}, + {IMGFMT_RGB8, PIX_FMT_BGR8}, + {IMGFMT_RGB4, PIX_FMT_BGR4}, + {IMGFMT_BGR8, PIX_FMT_PAL8}, +// NB: This works only because PIX_FMT_0RGB32 is a CPP Macro. +// note that most other PIX_FMT values are enums +#ifdef PIX_FMT_0RGB32 + {IMGFMT_BGR32, PIX_FMT_0RGB32}, +#endif +#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1) + {IMGFMT_GBR24P, PIX_FMT_GBRP}, +#endif + {IMGFMT_YUY2, PIX_FMT_YUYV422}, + {IMGFMT_UYVY, PIX_FMT_UYVY422}, + {IMGFMT_NV12, PIX_FMT_NV12}, + {IMGFMT_NV21, PIX_FMT_NV21}, + {IMGFMT_Y800, PIX_FMT_GRAY8}, + {IMGFMT_Y8, PIX_FMT_GRAY8}, + {IMGFMT_YVU9, PIX_FMT_YUV410P}, + {IMGFMT_IF09, PIX_FMT_YUV410P}, + {IMGFMT_YV12, PIX_FMT_YUV420P}, + {IMGFMT_I420, PIX_FMT_YUV420P}, + {IMGFMT_IYUV, PIX_FMT_YUV420P}, + {IMGFMT_411P, PIX_FMT_YUV411P}, + {IMGFMT_422P, PIX_FMT_YUV422P}, + {IMGFMT_444P, PIX_FMT_YUV444P}, + {IMGFMT_440P, PIX_FMT_YUV440P}, {IMGFMT_420A, PIX_FMT_YUVA420P}, @@ -85,8 +93,14 @@ {IMGFMT_422P16_BE, PIX_FMT_YUV422P16BE}, {IMGFMT_422P10_LE, PIX_FMT_YUV422P10LE}, {IMGFMT_422P10_BE, PIX_FMT_YUV422P10BE}, + {IMGFMT_422P9_LE, PIX_FMT_YUV422P9LE}, + {IMGFMT_422P9_BE, PIX_FMT_YUV422P9BE}, {IMGFMT_444P16_LE, PIX_FMT_YUV444P16LE}, {IMGFMT_444P16_BE, PIX_FMT_YUV444P16BE}, + {IMGFMT_444P10_LE, PIX_FMT_YUV444P10LE}, + {IMGFMT_444P10_BE, PIX_FMT_YUV444P10BE}, + {IMGFMT_444P9_LE, PIX_FMT_YUV444P9LE}, + {IMGFMT_444P9_BE, PIX_FMT_YUV444P9BE}, // YUVJ are YUV formats that use the full Y range and not just // 16 - 235 (see colorspaces.txt). diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/app.c mplayer-1.0~rc4.dfsg1+svn34540/gui/app.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/app.c 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/app.c 2011-12-31 12:38:52.000000000 +0000 @@ -16,19 +16,28 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "app.h" +/** + * @file + * @brief GUI application helpers + */ -#include "interface.h" +#include "app.h" #include "skin/font.h" #include "libavutil/common.h" +/** + * @brief Initialize item counters. + */ guiItems guiApp = { .IndexOfMainItems = -1, .IndexOfPlaybarItems = -1, .IndexOfMenuItems = -1 }; +/** + * @brief Event messages belonging to event names. + */ static const evName evNames[] = { { evNone, "evNone" }, { evPlay, "evPlay" }, @@ -37,48 +46,48 @@ { evPrev, "evPrev" }, { evNext, "evNext" }, { evLoad, "evLoad" }, - { evEqualizer, "evEqualizer" }, - { evPlayList, "evPlaylist" }, - { evExit, "evExit" }, - { evIconify, "evIconify" }, - { evIncBalance, "evIncBalance" }, // NOTE TO MYSELF: not all of these events - { evDecBalance, "evDecBalance" }, // are actually implemented, and update doc - { evFullScreen, "evFullScreen" }, - { evFName, "evFName" }, - { evMovieTime, "evMovieTime" }, - { evAbout, "evAbout" }, { evLoadPlay, "evLoadPlay" }, - { evPreferences, "evPreferences" }, - { evSkinBrowser, "evSkinBrowser" }, + { evLoadAudioFile, "evLoadAudioFile" }, + { evLoadSubtitle, "evLoadSubtitle" }, + { evDropSubtitle, "evDropSubtitle" }, + { evPlaylist, "evPlaylist" }, + { evPlayCD, "evPlayCD" }, + { evPlayVCD, "evPlayVCD" }, + { evPlayDVD, "evPlayDVD" }, + { evLoadURL, "evSetURL" }, // legacy + { evLoadURL, "evLoadURL" }, + { evPlaySwitchToPause, "evPlaySwitchToPause" }, + { evPauseSwitchToPlay, "evPauseSwitchToPlay" }, { evBackward10sec, "evBackward10sec" }, { evForward10sec, "evForward10sec" }, { evBackward1min, "evBackward1min" }, { evForward1min, "evForward1min" }, { evBackward10min, "evBackward10min" }, { evForward10min, "evForward10min" }, + { evSetMoviePosition, "evSetMoviePosition" }, + { evHalfSize, "evHalfSize" }, + { evDoubleSize, "evDoubleSize" }, + { evFullScreen, "evFullScreen" }, + { evNormalSize, "evNormalSize" }, + { evSetAspect, "evSetAspect" }, { evIncVolume, "evIncVolume" }, { evDecVolume, "evDecVolume" }, - { evMute, "evMute" }, - { evIncAudioBufDelay, "evIncAudioBufDelay" }, - { evDecAudioBufDelay, "evDecAudioBufDelay" }, - { evPlaySwitchToPause, "evPlaySwitchToPause" }, - { evPauseSwitchToPlay, "evPauseSwitchToPlay" }, - { evNormalSize, "evHalfSize" }, - { evNormalSize, "evNormalSize" }, - { evDoubleSize, "evDoubleSize" }, - { evSetMoviePosition, "evSetMoviePosition" }, { evSetVolume, "evSetVolume" }, + { evMute, "evMute" }, { evSetBalance, "evSetBalance" }, - { evHelp, "evHelp" }, - { evLoadSubtitle, "evLoadSubtitle" }, - { evPlayDVD, "evPlayDVD" }, - { evPlayVCD, "evPlayVCD" }, - { evSetURL, "evSetURL" }, - { evLoadAudioFile, "evLoadAudioFile" }, - { evDropSubtitle, "evDropSubtitle" }, - { evSetAspect, "evSetAspect" } + { evEqualizer, "evEqualizer" }, + { evAbout, "evAbout" }, + { evPreferences, "evPreferences" }, + { evSkinBrowser, "evSkinBrowser" }, + { evIconify, "evIconify" }, + { evExit, "evExit" } }; +/** + * @brief Free all memory allocated to an item and set all its pointers to NULL. + * + * @param item item to be freed + */ static void appClearItem(wItem *item) { bpFree(&item->Bitmap); @@ -88,6 +97,9 @@ memset(item, 0, sizeof(*item)); } +/** + * @brief Free all memory allocated to all GUI items and reset all item counters. + */ void appFreeStruct(void) { int i; @@ -118,17 +130,57 @@ fntFreeFont(); } -int appFindMessage(unsigned char *str) +/** + * @brief Find the event belonging to an event name. + * + * @param name event name + * + * @return event >= 0 (ok) or -1 (not found) + */ +int appFindMessage(const char *name) { unsigned int i; for (i = 0; i < FF_ARRAY_ELEMS(evNames); i++) - if (!strcmp(evNames[i].name, str)) + if (!strcmp(evNames[i].name, name)) return evNames[i].message; return -1; } +/** + * @brief Find the item belonging to an event. + * + * @param event event + * + * @return pointer to the item (ok) or NULL (not found) + */ +wItem *appFindItem(int event) +{ + wItem *item; + int i, n; + + if (guiApp.subWindow.isFullScreen && guiApp.playbarIsPresent) { + item = guiApp.playbarItems; + n = guiApp.IndexOfPlaybarItems; + } else { + item = guiApp.mainItems; + n = guiApp.IndexOfMainItems; + } + + for (i = 0; i <= n; i++) + if (item[i].message == event) + return &item[i]; + + return NULL; +} + +/** + * @brief Modify the state (i.e. set a new value) to the item belonging to an event. + * + * @param event event + * @param state new value + */ void btnModify(int event, float state) { int i; @@ -174,6 +226,12 @@ } } +/** + * @brief Set the @a pressed state (i.e. a new value) to the item belonging to an event. + * + * @param event event + * @param set new value + */ void btnSet(int event, int set) { int i; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/app.h mplayer-1.0~rc4.dfsg1+svn34540/gui/app.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/app.h 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/app.h 2011-12-31 12:38:52.000000000 +0000 @@ -25,19 +25,22 @@ // User events #define evNone 0 + #define evPlay 1 #define evStop 2 #define evPause 3 #define evPrev 6 #define evNext 7 #define evLoad 8 -#define evEqualizer 9 -#define evPlayList 10 -#define evIconify 11 -#define evAbout 12 #define evLoadPlay 13 -#define evPreferences 14 -#define evSkinBrowser 15 +#define evLoadAudioFile 42 +#define evLoadSubtitle 38 +#define evDropSubtitle 43 +#define evPlaylist 10 +#define evPlayCD 48 +#define evPlayVCD 40 +#define evPlayDVD 39 +#define evLoadURL 5013 #define evPlaySwitchToPause 16 #define evPauseSwitchToPlay 17 @@ -47,62 +50,44 @@ #define evForward1min 21 #define evBackward10min 22 #define evForward10min 23 +#define evSetMoviePosition 27 #define evHalfSize 301 -#define evNormalSize 24 #define evDoubleSize 25 #define evFullScreen 26 - -#define evSetMoviePosition 27 -#define evSetVolume 28 -#define evSetBalance 29 -#define evMute 30 +#define evNormalSize 24 +#define evSetAspect 44 #define evIncVolume 31 #define evDecVolume 32 -#define evIncAudioBufDelay 33 // NOTE TO MYSELF: not all of these events -#define evDecAudioBufDelay 34 // are actually implemented, and update doc -#define evIncBalance 35 -#define evDecBalance 36 - -#define evHelp 37 +#define evSetVolume 28 +#define evMute 30 +#define evSetBalance 29 +#define evEqualizer 9 -#define evLoadSubtitle 38 -#define evDropSubtitle 43 -#define evPlayDVD 39 -#define evPlayVCD 40 -#define evPlayNetwork 41 -#define evLoadAudioFile 42 -#define evSetAspect 44 -#define evSetAudio 45 -#define evSetVideo 46 -#define evSetSubtitle 47 +#define evAbout 12 +#define evPreferences 14 +#define evSkinBrowser 15 +#define evIconify 11 #define evExit 1000 -// General events +// Internal events + +#define ivSetAudio 45 +#define ivSetVideo 46 +#define ivSetSubtitle 47 + +#define ivShowPopUpMenu 5005 +#define ivHidePopUpMenu 5006 +#define ivSetDVDAudio 5007 +#define ivSetDVDSubtitle 5008 +#define ivSetDVDTitle 5009 +#define ivSetDVDChapter 5010 +#define ivSetVCDTrack 5012 +#define ivSetCDTrack 5014 -#define evFileLoaded 5000 -#define evHideMouseCursor 5001 -#define evMessageBox 5002 -#define evGeneralTimer 5003 -#define evGtkIsOk 5004 -#define evShowPopUpMenu 5005 -#define evHidePopUpMenu 5006 -#define evSetDVDAudio 5007 -#define evSetDVDSubtitle 5008 -#define evSetDVDTitle 5009 -#define evSetDVDChapter 5010 -#define evSubtitleLoaded 5011 -#define evSetVCDTrack 5012 -#define evSetURL 5013 - -#define evFName 7000 -#define evMovieTime 7001 -#define evRedraw 7002 -#define evHideWindow 7003 -#define evShowWindow 7004 -#define evFirstLoad 7005 +#define ivRedraw 7002 typedef struct { int message; @@ -192,7 +177,8 @@ extern guiItems guiApp; -int appFindMessage(unsigned char *str); +wItem *appFindItem(int event); +int appFindMessage(const char *name); void appFreeStruct(void); void btnModify(int event, float state); void btnSet(int event, int set); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/cfg.c mplayer-1.0~rc4.dfsg1+svn34540/gui/cfg.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/cfg.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/cfg.c 2011-10-25 20:45:09.000000000 +0000 @@ -22,6 +22,8 @@ #include "cfg.h" #include "interface.h" +#include "util/list.h" +#include "util/string.h" #include "config.h" #include "help_mp.h" @@ -29,6 +31,7 @@ #include "libvo/video_out.h" #include "libvo/x11_common.h" #include "mixer.h" +#include "mp_core.h" #include "mp_msg.h" #include "mpcommon.h" #include "mplayer.h" @@ -78,6 +81,7 @@ #endif int gtkEnableAudioEqualizer; +float gtkEquChannels[6][10]; int gtkSubDumpMPSub; int gtkSubDumpSrt; @@ -96,6 +100,12 @@ int gui_sub_pos_x = -3; int gui_sub_pos_y = -3; +int guiWinID = -1; + +char *skinName; + +char *fsHistory[5]; + static const m_option_t gui_opts[] = { { "cache", >kCacheOn, CONF_TYPE_FLAG, 0, 0, 1, NULL }, { "cache_size", >kCacheSize, CONF_TYPE_INT, CONF_RANGE, 32, 1048576, NULL }, @@ -250,7 +260,7 @@ { (void)conf; - return m_config_parse_config_file(gui_conf, filename); + return m_config_parse_config_file(gui_conf, filename, 0); } int cfg_read(void) @@ -264,20 +274,20 @@ cfg = get_path("gui.conf"); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[cfg] file: %s\n", cfg); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[cfg] file: %s\n", cfg); gui_conf = m_config_new(); if (!gui_conf) { gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_MemAllocFailed); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } m_config_register_options(gui_conf, gui_opts); - if (!disable_gui_conf && (m_config_parse_config_file(gui_conf, cfg) < 0)) { + if (!disable_gui_conf && (m_config_parse_config_file(gui_conf, cfg, 1) < 0)) { gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_ConfigFileError); -// guiExit(1); +// mplayer(MPLAYER_EXIT_GUI, 1, 0); } free(cfg); @@ -299,7 +309,7 @@ item->path = strdup(tmp); gfgets(tmp, 512, f); item->name = strdup(tmp); - gtkSet(gtkAddPlItem, 0, (void *)item); + listSet(gtkAddPlItem, item); } fclose(f); @@ -322,7 +332,7 @@ item = calloc(1, sizeof(urlItem)); item->url = strdup(tmp); - gtkSet(gtkAddURLItem, 0, (void *)item); + listSet(gtkAddURLItem, item); } fclose(f); @@ -414,11 +424,11 @@ f = fopen(cfg, "wt+"); if (f) { - while (URLList) { - if (URLList->url) - fprintf(f, "%s\n", URLList->url); + while (urlList) { + if (urlList->url) + fprintf(f, "%s\n", urlList->url); - URLList = URLList->next; + urlList = urlList->next; } fclose(f); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/cfg.h mplayer-1.0~rc4.dfsg1+svn34540/gui/cfg.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/cfg.h 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/cfg.h 2011-07-07 14:47:48.000000000 +0000 @@ -59,6 +59,7 @@ extern char *gtkEquChannel4; extern char *gtkEquChannel5; extern char *gtkEquChannel6; +extern float gtkEquChannels[6][10]; extern int gtkSubDumpMPSub; extern int gtkSubDumpSrt; @@ -82,6 +83,12 @@ extern int gui_sub_pos_x; extern int gui_sub_pos_y; +extern int guiWinID; + +extern char *skinName; + +extern char *fsHistory[5]; + int cfg_gui_include(m_option_t *conf, const char *filename); int cfg_read(void); int cfg_write(void); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/interface.c mplayer-1.0~rc4.dfsg1+svn34540/gui/interface.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/interface.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/interface.c 2012-01-05 14:26:21.000000000 +0000 @@ -16,6 +16,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include +#include #include #include @@ -24,6 +26,9 @@ #include "skin/skin.h" #include "ui/gmplayer.h" #include "ui/widgets.h" +#include "util/list.h" +#include "util/mem.h" +#include "util/string.h" #include "wm/ws.h" #include "wm/wsxdnd.h" @@ -32,6 +37,7 @@ #include "help_mp.h" #include "input/input.h" #include "libaf/equalizer.h" +#include "libavutil/common.h" #include "libmpcodecs/dec_audio.h" #include "libmpcodecs/dec_video.h" #include "libmpcodecs/vd.h" @@ -50,112 +56,14 @@ #include "stream/stream_dvd.h" #endif -guiInterface_t guiInfo; - -int guiWinID = -1; - -char *skinName; -char *skinDirInHome; -char *skinMPlayerDir; - -plItem *plCurrent = NULL; -plItem *plList = NULL; -plItem *plLastPlayed = NULL; - -urlItem *URLList = NULL; - -char *fsHistory[fsPersistant_MaxPos] = { NULL, NULL, NULL, NULL, NULL }; - -float gtkEquChannels[6][10]; +guiInterface_t guiInfo = { + .StreamType = STREAMTYPE_DUMMY, + .Balance = 50.0f +}; static int initialized; -int gstrcmp(const char *a, const char *b) -{ - if (!a && !b) - return 0; - if (!a || !b) - return -1; - - return strcmp(a, b); -} - -static int gstrncmp(const char *a, const char *b, int size) -{ - if (!a && !b) - return 0; - if (!a || !b) - return -1; - - return strncmp(a, b, size); -} - -char *gstrdup(const char *str) -{ - if (!str) - return NULL; - - return strdup(str); -} - -char *gstrchr(char *str, int c) -{ - if (!str) - return NULL; - - return strchr(str, c); -} - -void gfree(void **p) -{ - free(*p); - *p = NULL; -} - -/** - * \brief This actually creates a new list containing only one element... - */ -void gaddlist(char ***list, const char *entry) -{ - int i; - - if (*list) { - for (i = 0; (*list)[i]; i++) - free((*list)[i]); - - free(*list); - } - - *list = malloc(2 * sizeof(char **)); - (*list)[0] = gstrdup(entry); - (*list)[1] = NULL; -} - -/** - * \brief This replaces a string starting with search by replace. - * If not found, replace is appended. - */ -static void greplace(char ***list, const char *search, const char *replace) -{ - int i = 0; - int len = (search ? strlen(search) : 0); - - if (*list) { - for (i = 0; (*list)[i]; i++) { - if (search && (strncmp((*list)[i], search, len) == 0)) { - free((*list)[i]); - (*list)[i] = gstrdup(replace); - return; - } - } - - *list = realloc(*list, (i + 2) * sizeof(char *)); - } else - *list = malloc(2 * sizeof(char *)); - - (*list)[i] = gstrdup(replace); - (*list)[i + 1] = NULL; -} +/* MPlayer -> GUI */ void guiInit(void) { @@ -163,11 +71,10 @@ mp_msg(MSGT_GPLAYER, MSGL_V, "GUI init.\n"); - memset(&guiInfo, 0, sizeof(guiInfo)); - guiInfo.Balance = 50.0f; - guiInfo.StreamType = -1; - - memset(>kEquChannels, 0, sizeof(gtkEquChannels)); + if (!cdrom_device) + cdrom_device = strdup(DEFAULT_CDROM_DEVICE); + if (!dvd_device) + dvd_device = strdup(DEFAULT_DVD_DEVICE); #ifdef CONFIG_DXR3 if (!gtkDXR3Device) @@ -202,8 +109,8 @@ skinDirInHome = get_path("skins"); skinMPlayerDir = MPLAYER_DATADIR "/skins"; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] skin directory #1: %s\n", skinDirInHome); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] skin directory #2: %s\n", skinMPlayerDir); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] skin directory #1: %s\n", skinDirInHome); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] skin directory #2: %s\n", skinMPlayerDir); if (!skinName) skinName = strdup("default"); @@ -220,11 +127,11 @@ switch (i) { case -1: gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinNotFound, skinName); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); case -2: gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinCfgError, skinName); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } // initialize windows @@ -233,7 +140,7 @@ if (!mainDrawBuffer) { gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } if (gui_save_pos) { @@ -261,6 +168,8 @@ wsCreateImage(&guiApp.subWindow, guiApp.sub.Bitmap.Width, guiApp.sub.Bitmap.Height); wsXDNDMakeAwareness(&guiApp.subWindow); + WinID = guiApp.subWindow.WindowID; + uiMenuInit(); uiPlaybarInit(); @@ -271,9 +180,9 @@ wsSetShape(&guiApp.mainWindow, guiApp.main.Mask.Image); wsXDNDMakeAwareness(&guiApp.mainWindow); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] screen depth: %d\n", wsDepthOnScreen); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] mainWindow ID: 0x%x\n", (int)guiApp.mainWindow.WindowID); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] subWindow ID: 0x%x\n", (int)guiApp.subWindow.WindowID); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] screen depth: %d\n", wsDepthOnScreen); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] mainWindow ID: 0x%x\n", (int)guiApp.mainWindow.WindowID); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] subWindow ID: 0x%x\n", (int)guiApp.subWindow.WindowID); guiApp.mainWindow.ReDraw = (void *)uiMainDraw; guiApp.mainWindow.MouseHandler = uiMainMouseHandle; @@ -303,31 +212,9 @@ wsVisibleWindow(&guiApp.mainWindow, wsShowWindow); -#if 0 - wsVisibleWindow(&guiApp.subWindow, wsShowWindow); - { - XEvent xev; - - do - XNextEvent(wsDisplay, &xev); - while (xev.type != MapNotify || xev.xmap.event != guiApp.subWindow.WindowID); - - guiApp.subWindow.Mapped = wsMapped; - } - - if (!fullscreen) - fullscreen = gtkLoadFullscreen; - - if (fullscreen) { - uiFullScreen(); - btnModify(evFullScreen, btnPressed); - } -#else - if (!fullscreen) - fullscreen = gtkLoadFullscreen; - if (gtkShowVideoWindow) { wsVisibleWindow(&guiApp.subWindow, wsShowWindow); + { XEvent xev; @@ -336,46 +223,30 @@ while (xev.type != MapNotify || xev.xmap.event != guiApp.subWindow.WindowID); guiApp.subWindow.Mapped = wsMapped; + guiInfo.VideoWindow = True; } - if (fullscreen) { + if (gtkLoadFullscreen) uiFullScreen(); - btnModify(evFullScreen, btnPressed); - } - } else { - if (fullscreen) { - wsVisibleWindow(&guiApp.subWindow, wsShowWindow); - { - XEvent xev; - - do - XNextEvent(wsDisplay, &xev); - while (xev.type != MapNotify || xev.xmap.event != guiApp.subWindow.WindowID); + } else + wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0); - guiApp.subWindow.Mapped = wsMapped; - } - guiInfo.Playing = GUI_PAUSE; // because of !gtkShowVideoWindow... - uiFullScreen(); // ...guiInfo.Playing is required - wsVisibleWindow(&guiApp.subWindow, wsHideWindow); - btnModify(evFullScreen, btnPressed); - } - } -#endif + if (gtkLoadFullscreen) + btnSet(evFullScreen, btnPressed); guiInfo.Playing = GUI_STOP; uiSubRender = 1; - if (filename) - uiSetFileName(NULL, filename, STREAMTYPE_FILE); - - if (plCurrent && !filename) + if (plCurrent && !filename) { uiSetFileName(plCurrent->path, plCurrent->name, STREAMTYPE_FILE); + filename = NULL; // don't start playing + } if (subdata) - guiSetFilename(guiInfo.Subtitlename, subdata->filename); + setdup(&guiInfo.SubtitleFilename, subdata->filename); - guiLoadFont(); + mplayerLoadFont(); initialized = 1; } @@ -388,8 +259,8 @@ if (gui_save_pos) { gui_main_pos_x = guiApp.mainWindow.X; gui_main_pos_y = guiApp.mainWindow.Y; - gui_sub_pos_x = guiApp.subWindow.X; - gui_sub_pos_y = guiApp.subWindow.Y; + gui_sub_pos_x = guiApp.sub.x; + gui_sub_pos_y = guiApp.sub.y; } #ifdef CONFIG_ASS @@ -414,109 +285,6 @@ mp_msg(MSGT_GPLAYER, MSGL_V, "GUI done.\n"); } -void guiExit(enum exit_reason how) -{ - exit_player_with_rc(how, how >= EXIT_ERROR); -} - -void guiLoadFont(void) -{ -#ifdef CONFIG_FREETYPE - load_font_ft(vo_image_width, vo_image_height, &vo_font, font_name, osd_font_scale_factor); -#else - if (vo_font) { - int i; - - free(vo_font->name); - free(vo_font->fpath); - - for (i = 0; i < 16; i++) { - if (vo_font->pic_a[i]) { - free(vo_font->pic_a[i]->bmp); - free(vo_font->pic_a[i]->pal); - } - } - - for (i = 0; i < 16; i++) { - if (vo_font->pic_b[i]) { - free(vo_font->pic_b[i]->bmp); - free(vo_font->pic_b[i]->pal); - } - } - - free(vo_font); - vo_font = NULL; - } - - if (font_name) { - vo_font = read_font_desc(font_name, font_factor, 0); - - if (!vo_font) - gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadFont, font_name); - } else { - font_name = gstrdup(get_path("font/font.desc")); - vo_font = read_font_desc(font_name, font_factor, 0); - - if (!vo_font) { - gfree((void **)&font_name); - font_name = gstrdup(MPLAYER_DATADIR "/font/font.desc"); - vo_font = read_font_desc(font_name, font_factor, 0); - } - } -#endif -} - -void guiLoadSubtitle(char *name) -{ - if (guiInfo.Playing == 0) { - guiInfo.SubtitleChanged = 1; // what is this for? (mw) - return; - } - - if (subdata) { - mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_DeletingSubtitles); - - sub_free(subdata); - subdata = NULL; - vo_sub = NULL; - - if (vo_osd_list) { - int len; - mp_osd_obj_t *osd; - - osd = vo_osd_list; - - while (osd) { - if (osd->type == OSDTYPE_SUBTITLE) - break; - - osd = osd->next; - } - - if (osd && (osd->flags & OSDFLAG_VISIBLE)) { - len = osd->stride * (osd->bbox.y2 - osd->bbox.y1); - memset(osd->bitmap_buffer, 0, len); - memset(osd->alpha_buffer, 0, len); - } - } - } - - if (name) { - mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_LoadingSubtitles, name); - - subdata = sub_read_file(name, guiInfo.FPS); - - if (!subdata) - gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub, name); - - sub_name = (malloc(2 * sizeof(char *))); // when mplayer will be restarted - sub_name[0] = strdup(name); // sub_name[0] will be read - sub_name[1] = NULL; - } - - update_set_of_subtitles(); -} - static void add_vf(char *str) { void *p; @@ -552,325 +320,166 @@ mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_AddingVideoFilter, str); } -int guiGetEvent(int type, void *arg) +int gui(int what, void *data) { mixer_t *mixer = NULL; - - stream_t *stream = arg; - + stream_t *stream; #ifdef CONFIG_DVDREAD - dvd_priv_t *dvdp = arg; + dvd_priv_t *dvd; #endif + plItem *next; + int msg, state; if (guiInfo.mpcontext) mixer = mpctx_get_mixer(guiInfo.mpcontext); - switch (type) { - case guiXEvent: - guiInfo.event_struct = arg; - wsEvents(wsDisplay, arg); - gtkEventHandling(); + switch (what) { + case GUI_SET_CONTEXT: + guiInfo.mpcontext = data; break; - case guiSetState: - - switch ((int)arg) { - case GUI_PLAY: -// if ( !gtkShowVideoWindow ) wsVisibleWindow( &guiApp.subWindow,wsHideWindow ); - guiInfo.Playing = GUI_PLAY; - break; + case GUI_SET_STATE: + switch ((int)data) { case GUI_STOP: + case GUI_PLAY: // if ( !gtkShowVideoWindow ) wsVisibleWindow( &guiApp.subWindow,wsHideWindow ); - guiInfo.Playing = GUI_STOP; - break; - case GUI_PAUSE: - guiInfo.Playing = GUI_PAUSE; + guiInfo.Playing = (int)data; break; } uiState(); break; - case guiSetFileName: - if (arg) - guiSetFilename(guiInfo.Filename, arg); + case GUI_HANDLE_EVENTS: + if (!guiInfo.Playing || !guiInfo.VideoWindow) + wsHandleEvents(); + wsAutohideCursor(); + gtkEventHandling(); break; - case guiSetAudioOnly: + case GUI_RUN_COMMAND: - guiInfo.AudioOnly = (int)arg; + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GUI_RUN_COMMAND: %d\n", (int)data); - if ((int)arg) { - guiInfo.NoWindow = True; - wsVisibleWindow(&guiApp.subWindow, wsHideWindow); - } else - wsVisibleWindow(&guiApp.subWindow, wsShowWindow); - - break; - - case guiSetContext: - guiInfo.mpcontext = arg; - // NOTE TO MYSELF: is break missing? + switch ((int)data) { + case MP_CMD_VO_FULLSCREEN: + uiEventHandling(evFullScreen, 0); + break; - case guiSetDemuxer: - guiInfo.demuxer = arg; - break; + case MP_CMD_PLAY_TREE_STEP: + uiEventHandling(evNext, 0); + break; - case guiSetAfilter: - guiInfo.afilter = arg; - break; + case -MP_CMD_PLAY_TREE_STEP: + uiEventHandling(evPrev, 0); + break; - case guiSetShVideo: + case MP_CMD_STOP: + uiEventHandling(evStop, 0); + break; - if (!guiApp.subWindow.isFullScreen) { - wsResizeWindow(&guiApp.subWindow, vo_dwidth, vo_dheight); - wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y); + case MP_CMD_QUIT: + uiEventHandling(evExit, 0); + break; } - guiInfo.MovieWidth = vo_dwidth; - guiInfo.MovieHeight = vo_dheight; - - if (guiWinID >= 0) - wsMoveWindow(&guiApp.mainWindow, 0, 0, vo_dheight); - - WinID = guiApp.subWindow.WindowID; break; -#ifdef CONFIG_DVDREAD - case guiSetDVD: - guiInfo.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts; - guiInfo.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts; - guiInfo.DVD.angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles; - guiInfo.DVD.nr_of_audio_channels = dvdp->nr_of_channels; - memcpy(guiInfo.DVD.audio_streams, dvdp->audio_streams, sizeof(dvdp->audio_streams)); - guiInfo.DVD.nr_of_subtitles = dvdp->nr_of_subtitles; - memcpy(guiInfo.DVD.subtitles, dvdp->subtitles, sizeof(dvdp->subtitles)); - guiInfo.DVD.current_title = dvd_title + 1; - guiInfo.DVD.current_chapter = dvd_chapter + 1; - guiInfo.DVD.current_angle = dvd_angle + 1; - guiInfo.Track = dvd_title + 1; + case GUI_RUN_MESSAGE: + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GUI_RUN_MESSAGE: %s\n", (const char *)data); + msg = appFindMessage((const char *)data); + if (appFindItem(msg)) + uiEventHandling(msg, 0); break; -#endif - case guiSetStream: + case GUI_PREPARE: - guiInfo.StreamType = stream->type; + wsVisibleMouse(&guiApp.subWindow, wsHideMouseCursor); - switch (stream->type) { -#ifdef CONFIG_DVDREAD - case STREAMTYPE_DVD: - guiGetEvent(guiSetDVD, stream->priv); + if (guiInfo.NewPlay == GUI_FILE_NEW) { + dvd_title = 0; + audio_id = -1; + video_id = -1; + dvdsub_id = -1; + vobsub_id = -1; + + stream_cache_size = -1; + autosync = 0; + force_fps = 0; + } + + switch (guiInfo.StreamType) { + case STREAMTYPE_FILE: + case STREAMTYPE_STREAM: break; + +#ifdef CONFIG_CDDA + case STREAMTYPE_CDDA: + { + char tmp[512]; + + sprintf(tmp, "cdda://%d", guiInfo.Track); + uiSetFileName(NULL, tmp, SAME_STREAMTYPE); + } + break; #endif #ifdef CONFIG_VCD case STREAMTYPE_VCD: - guiInfo.VCDTracks = 0; - stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiInfo.VCDTracks); - break; -#endif + { + char tmp[512]; - default: - break; + sprintf(tmp, "vcd://%d", guiInfo.Track); + uiSetFileName(NULL, tmp, SAME_STREAMTYPE); } - break; +#endif - case guiIEvent: +#ifdef CONFIG_DVDREAD + case STREAMTYPE_DVD: + { + char tmp[512]; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] guiIEvent: %d\n", (int)arg); + sprintf(tmp, "dvd://%d", guiInfo.Track); + uiSetFileName(NULL, tmp, SAME_STREAMTYPE); + } - switch ((int)arg) { - case MP_CMD_QUIT: - uiEventHandling(evExit, 0); - break; + dvd_chapter = guiInfo.Chapter; + dvd_angle = guiInfo.Angle; - case MP_CMD_VO_FULLSCREEN: - uiEventHandling(evFullScreen, 0); break; +#endif } - break; - - case guiReDraw: - uiEventHandling(evRedraw, 0); - break; - - case guiSetVolume: - if (mixer) { - float l, r; - - mixer_getvolume(mixer, &l, &r); - guiInfo.Volume = (r > l ? r : l); + // video opts - if (r != l) - guiInfo.Balance = ((r - l) + 100) * 0.5f; - else - guiInfo.Balance = 50.0f; + if (!video_driver_list) { + int i = 0; - btnModify(evSetVolume, guiInfo.Volume); - btnModify(evSetBalance, guiInfo.Balance); - } - break; - - case guiSetFileFormat: - guiInfo.FileFormat = (int)arg; - break; - - case guiSetValues: - - // video - - guiInfo.sh_video = arg; - - if (arg) { - sh_video_t *sh = arg; - guiInfo.FPS = sh->fps; - } - - if (guiInfo.NoWindow) - wsVisibleWindow(&guiApp.subWindow, wsHideWindow); - - if (guiInfo.StreamType == STREAMTYPE_STREAM) - btnSet(evSetMoviePosition, btnDisabled); - else - btnSet(evSetMoviePosition, btnReleased); - - // audio - - if (mixer) { - float l, r; - - mixer_getvolume(mixer, &l, &r); - guiInfo.Volume = (r > l ? r : l); - - if (r != l) - guiInfo.Balance = ((r - l) + 100) * 0.5f; - else - guiInfo.Balance = 50.0f; - - btnModify(evSetVolume, guiInfo.Volume); - btnModify(evSetBalance, guiInfo.Balance); - } - - if (gtkEnableAudioEqualizer) { - equalizer_t eq; - int i, j; - - for (i = 0; i < 6; i++) { - for (j = 0; j < 10; j++) { - eq.channel = i; - eq.band = j; - eq.gain = gtkEquChannels[i][j]; - gtkSet(gtkSetEqualizer, 0, &eq); - } - } - } - - // subtitle - -#ifdef CONFIG_DXR3 - if (video_driver_list && !gstrcmp(video_driver_list[0], "dxr3") && (guiInfo.FileFormat != DEMUXER_TYPE_MPEG_PS) && !gtkVfLAVC) { - gtkMessageBox(GTK_MB_FATAL, MSGTR_NEEDLAVC); - guiInfo.Playing = 0; - return True; - } -#endif - - break; - - case guiSetDefaults: - -// if ( guiInfo.Playing == 1 && guiInfo.FilenameChanged ) - if (guiInfo.FilenameChanged) { - audio_id = -1; - video_id = -1; - dvdsub_id = -1; - vobsub_id = -1; - stream_cache_size = -1; - autosync = 0; - dvd_title = 0; - force_fps = 0; - } - - guiInfo.demuxer = NULL; - guiInfo.sh_video = NULL; - wsPostRedisplay(&guiApp.subWindow); - - break; - - case guiSetParameters: - - guiGetEvent(guiSetDefaults, NULL); - - switch (guiInfo.StreamType) { - case STREAMTYPE_PLAYLIST: - break; - -#ifdef CONFIG_VCD - case STREAMTYPE_VCD: - { - char tmp[512]; - - sprintf(tmp, "vcd://%d", guiInfo.Track + 1); - guiSetFilename(guiInfo.Filename, tmp); - } - break; -#endif - -#ifdef CONFIG_DVDREAD - case STREAMTYPE_DVD: - { - char tmp[512]; - - sprintf(tmp, "dvd://%d", guiInfo.Title); - guiSetFilename(guiInfo.Filename, tmp); - } - - dvd_chapter = guiInfo.Chapter; - dvd_angle = guiInfo.Angle; - - break; -#endif - } - -// if ( guiInfo.StreamType != STREAMTYPE_PLAYLIST ) // Does not make problems anymore! - { - if (guiInfo.Filename) - filename = gstrdup(guiInfo.Filename); - else if (filename) - guiSetFilename(guiInfo.Filename, filename); - } - - // video opts - - if (!video_driver_list) { - int i = 0; - - while (video_out_drivers[i++]) { - if (video_out_drivers[i - 1]->control(VOCTRL_GUISUPPORT, NULL) == VO_TRUE) { - gaddlist(&video_driver_list, (char *)video_out_drivers[i - 1]->info->short_name); - break; - } - } + while (video_out_drivers[i++]) { + if (video_out_drivers[i - 1]->control(VOCTRL_GUISUPPORT, NULL) == VO_TRUE) { + gaddlist(&video_driver_list, (char *)video_out_drivers[i - 1]->info->short_name); + break; + } + } } if (!video_driver_list && !video_driver_list[0]) { gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_IDFGCVD); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } { int i = 0; - guiInfo.NoWindow = False; + guiInfo.VideoWindow = True; while (video_out_drivers[i++]) { if (video_out_drivers[i - 1]->control(VOCTRL_GUISUPPORT, NULL) == VO_TRUE) { if ((video_driver_list && !gstrcmp(video_driver_list[0], (char *)video_out_drivers[i - 1]->info->short_name)) && (video_out_drivers[i - 1]->control(VOCTRL_GUI_NOWINDOW, NULL) == VO_TRUE)) { - guiInfo.NoWindow = True; + guiInfo.VideoWindow = False; break; } } @@ -974,7 +583,7 @@ // subtitle -// subdata->filename=gstrdup( guiInfo.Subtitlename ); +// subdata->filename=gstrdup( guiInfo.SubtitleFilename ); stream_dump_type = 0; if (gtkSubDumpMPSub) @@ -984,7 +593,7 @@ stream_dump_type = 6; gtkSubDumpMPSub = gtkSubDumpSrt = 0; - guiLoadFont(); + mplayerLoadFont(); // misc @@ -994,15 +603,13 @@ if (gtkAutoSyncOn) autosync = gtkAutoSync; - if (guiInfo.AudioFile) - audio_stream = gstrdup(guiInfo.AudioFile); - else if (guiInfo.FilenameChanged) - gfree((void **)&audio_stream); + if (guiInfo.AudioFilename) + audio_stream = gstrdup(guiInfo.AudioFilename); + else if (guiInfo.NewPlay == GUI_FILE_NEW) + nfree(audio_stream); // audio_stream = NULL; - guiInfo.DiskChanged = 0; - guiInfo.FilenameChanged = 0; guiInfo.NewPlay = 0; #ifdef CONFIG_ASS @@ -1013,360 +620,250 @@ #endif break; - } - return False; -} - -void guiEventHandling(void) -{ - if (!guiInfo.Playing || guiInfo.NoWindow) - wsHandleEvents(); - - gtkEventHandling(); -} - -// --- -#if defined(MP_DEBUG) && 0 -void list(void) -{ - plItem *next = plList; + case GUI_SET_STREAM: - printf("--- list ---\n"); + stream = data; + guiInfo.StreamType = stream->type; - while (next || next->next) { - printf("item: %s/%s\n", next->path, next->name); + switch (guiInfo.StreamType) { + case STREAMTYPE_FILE: + case STREAMTYPE_STREAM: + break; - if (next->next) - next = next->next; - else +#ifdef CONFIG_CDDA + case STREAMTYPE_CDDA: + guiInfo.Tracks = 0; + stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks); break; - } +#endif - printf("--- end of list ---\n"); -} -#else -#define list(); +#ifdef CONFIG_VCD + case STREAMTYPE_VCD: + guiInfo.Tracks = 0; + stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks); + break; #endif -void *gtkSet(int cmd, float fparam, void *vparam) -{ - equalizer_t *eq = (equalizer_t *)vparam; - plItem *item = (plItem *)vparam; - urlItem *url_item = (urlItem *)vparam; - int is_added = True; - - switch (cmd) { - // handle playlist - - // add item to playlist - case gtkAddPlItem: - - if (plList) { - plItem *next = plList; - - while (next->next) -// { -// printf( "%s\n",next->name ); - next = next->next; -// } - - next->next = item; - item->prev = next; - item->next = NULL; - } else { - item->prev = item->next = NULL; - plCurrent = plList = item; +#ifdef CONFIG_DVDREAD + case STREAMTYPE_DVD: + guiInfo.Tracks = 0; + stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks); + guiInfo.Chapters = 0; + stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiInfo.Chapters); + guiInfo.Angles = 0; + stream_control(stream, STREAM_CTRL_GET_NUM_ANGLES, &guiInfo.Angles); + dvd = stream->priv; + guiInfo.AudioStreams = dvd->nr_of_channels; + memcpy(guiInfo.AudioStream, dvd->audio_streams, sizeof(dvd->audio_streams)); + guiInfo.Subtitles = dvd->nr_of_subtitles; + memcpy(guiInfo.Subtitle, dvd->subtitles, sizeof(dvd->subtitles)); + guiInfo.Track = dvd_title + 1; + guiInfo.Chapter = dvd_chapter + 1; + guiInfo.Angle = dvd_angle + 1; + break; +#endif } - list(); + break; - return NULL; + case GUI_SET_AFILTER: + guiInfo.afilter = data; + break; - // add item into playlist after current - case gtkInsertPlItem: - if (plCurrent) { - plItem *curr = plCurrent; - item->next = curr->next; - - if (item->next) - item->next->prev = item; - - item->prev = curr; - curr->next = item; - plCurrent = plCurrent->next; - - return plCurrent; - } else - return gtkSet(gtkAddPlItem, 0, (void *)item); - return NULL; // NOTE TO MYSELF: remove this - - // get next item from playlist - case gtkGetNextPlItem: - if (plCurrent && plCurrent->next) { - plCurrent = plCurrent->next; -// if (!plCurrent && plList) -// { -// plItem *next = plList; -// -// while (next->next) -// { -// if (!next->next) break; -// next = next->next; -// } -// -// plCurrent = next; -// } - return plCurrent; - } - - return NULL; - - // get previous item from playlist - case gtkGetPrevPlItem: - if (plCurrent && plCurrent->prev) { - plCurrent = plCurrent->prev; -// if ( !plCurrent && plList ) plCurrent=plList; - return plCurrent; - } - - return NULL; - - // set current item - case gtkSetCurrPlItem: - plCurrent = item; - return plCurrent; - - // get current item - case gtkGetCurrPlItem: - return plCurrent; + case GUI_SET_VIDEO: - // delete current item - case gtkDelCurrPlItem: - { - plItem *curr = plCurrent; + // video - if (!curr) - return NULL; + guiInfo.sh_video = data; - if (curr->prev) - curr->prev->next = curr->next; - if (curr->next) - curr->next->prev = curr->prev; - if (curr == plList) - plList = curr->next; - - plCurrent = curr->next; - - // free it - free(curr->path); - free(curr->name); - free(curr); - } + state = (guiInfo.StreamType == STREAMTYPE_STREAM ? btnDisabled : btnReleased); + btnSet(evForward10sec, state); + btnSet(evBackward10sec, state); + btnSet(evForward1min, state); + btnSet(evBackward1min, state); + btnSet(evForward10min, state); + btnSet(evBackward10min, state); + btnSet(evSetMoviePosition, state); - uiCurr(); // instead of using uiNext && uiPrev +#ifdef CONFIG_DXR3 + if (video_driver_list && !gstrcmp(video_driver_list[0], "dxr3") && (((demuxer_t *)mpctx_get_demuxer(guiInfo.mpcontext))->file_format != DEMUXER_TYPE_MPEG_PS) && !gtkVfLAVC) { + gtkMessageBox(GTK_MB_FATAL, MSGTR_NEEDLAVC); + return False; + } +#endif - return plCurrent; + break; - // delete list - case gtkDelPl: - { - plItem *curr = plList; - plItem *next; + case GUI_SET_AUDIO: - if (!plList) - return NULL; + guiInfo.AudioChannels = data ? ((sh_audio_t *)data)->channels : 0; - if (!curr->next) { - free(curr->path); - free(curr->name); - free(curr); - } else { - while (curr->next) { - next = curr->next; - free(curr->path); - free(curr->name); - free(curr); - curr = next; - } - } + if (data && !guiInfo.sh_video) + guiInfo.VideoWindow = False; - plList = NULL; - plCurrent = NULL; - } + gui(GUI_SET_MIXER, 0); - return NULL; + if (gtkEnableAudioEqualizer) { + equalizer_t eq; + unsigned int i, j; - // handle url - case gtkAddURLItem: - if (URLList) { - urlItem *next_url = URLList; - is_added = False; - - while (next_url->next) { - if (!gstrcmp(next_url->url, url_item->url)) { - is_added = True; - break; + for (i = 0; i < FF_ARRAY_ELEMS(gtkEquChannels); i++) { + for (j = 0; j < FF_ARRAY_ELEMS(*gtkEquChannels); j++) { + eq.channel = i; + eq.band = j; + eq.gain = gtkEquChannels[i][j]; + mplayer(MPLAYER_SET_EQUALIZER, 0, &eq); } - - next_url = next_url->next; } - - if (!is_added && gstrcmp(next_url->url, url_item->url)) - next_url->next = url_item; - } else { - url_item->next = NULL; - URLList = url_item; } - return NULL; + // These must be done here (in the last call from MPlayer before + // playback starts) and not in GUI_SETUP_VIDEO_WINDOW, because... - // subtitle + // ...without video there will be no call to GUI_SETUP_VIDEO_WINDOW + if (!guiInfo.VideoWindow) { + wsVisibleWindow(&guiApp.subWindow, wsHideWindow); + btnSet(evFullScreen, (gtkLoadFullscreen ? btnPressed : btnReleased)); + } -#ifndef CONFIG_FREETYPE - case gtkSetFontFactor: - font_factor = fparam; - guiLoadFont(); - return NULL; -#else - case gtkSetFontOutLine: - subtitle_font_thickness = (8.0f / 100.0f) * fparam; - guiLoadFont(); - return NULL; - - case gtkSetFontBlur: - subtitle_font_radius = (8.0f / 100.0f) * fparam; - guiLoadFont(); - return NULL; - - case gtkSetFontTextScale: - text_font_scale_factor = fparam; - guiLoadFont(); - return NULL; - - case gtkSetFontOSDScale: - osd_font_scale_factor = fparam; - guiLoadFont(); - return NULL; - - case gtkSetFontEncoding: - gfree((void **)&subtitle_font_encoding); - subtitle_font_encoding = gstrdup((char *)vparam); - guiLoadFont(); - return NULL; - - case gtkSetFontAutoScale: - subtitle_autoscale = (int)fparam; - guiLoadFont(); - return NULL; -#endif + // ...option variable fullscreen determines whether MPlayer will handle + // the window given by WinID as fullscreen window (and will do aspect + // scaling then) or not - quite rubbish + fullscreen = gtkLoadFullscreen; -#ifdef CONFIG_ICONV - case gtkSetSubEncoding: - gfree((void **)&sub_cp); - sub_cp = gstrdup((char *)vparam); break; -#endif - // misc + case GUI_SET_MIXER: + if (mixer) { + float l, r; + static float last_balance = -1; + + mixer_getvolume(mixer, &l, &r); - case gtkClearStruct: + guiInfo.Volume = FFMAX(l, r); + btnModify(evSetVolume, guiInfo.Volume); + + if (guiInfo.Balance != last_balance) { + if (guiInfo.Volume) + guiInfo.Balance = ((r - l) / guiInfo.Volume + 1.0) * 50.0; + else + guiInfo.Balance = 50.0f; - if ((unsigned int)vparam & guiFilenames) { - gfree((void **)&guiInfo.Filename); - gfree((void **)&guiInfo.Subtitlename); - gfree((void **)&guiInfo.AudioFile); - gtkSet(gtkDelPl, 0, NULL); + last_balance = guiInfo.Balance; + btnModify(evSetBalance, guiInfo.Balance); + } } + break; -#ifdef CONFIG_DVDREAD - if ((unsigned int)vparam & guiDVD) - memset(&guiInfo.DVD, 0, sizeof(guiDVDStruct)); -#endif + case GUI_REDRAW: + uiEventHandling(ivRedraw, 0); + break; -#ifdef CONFIG_VCD - if ((unsigned int)vparam & guiVCD) - guiInfo.VCDTracks = 0; -#endif + case GUI_SETUP_VIDEO_WINDOW: - return NULL; + guiInfo.VideoWidth = vo_dwidth; + guiInfo.VideoHeight = vo_dheight; - case gtkSetExtraStereo: - gtkAOExtraStereoMul = fparam; - if (guiInfo.afilter) - af_control_any_rev(guiInfo.afilter, AF_CONTROL_ES_MUL | AF_CONTROL_SET, >kAOExtraStereoMul); - return NULL; + if (!guiApp.subWindow.isFullScreen || !guiApp.subWindow.Mapped) { + if (!guiApp.subWindow.isFullScreen) + wsResizeWindow(&guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight); - case gtkSetPanscan: - { - mp_cmd_t *mp_cmd; + wsMoveWindow(&guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y); - mp_cmd = calloc(1, sizeof(*mp_cmd)); - mp_cmd->id = MP_CMD_PANSCAN; - mp_cmd->name = strdup("panscan"); - mp_cmd->args[0].v.f = fparam; - mp_cmd->args[1].v.i = 1; - mp_input_queue_cmd(mp_cmd); - } + if (!guiApp.subWindow.Mapped) + wsVisibleWindow(&guiApp.subWindow, wsShowWindow); + } - return NULL; + if (gtkLoadFullscreen ^ guiApp.subWindow.isFullScreen) + uiEventHandling(evFullScreen, 0); - case gtkSetAutoq: - auto_quality = (int)fparam; - return NULL; + if (guiWinID >= 0) + wsMoveWindow(&guiApp.mainWindow, True, 0, guiInfo.VideoHeight); - // set equalizers + break; - case gtkSetContrast: - if (guiInfo.sh_video) - set_video_colors(guiInfo.sh_video, "contrast", (int)fparam); - return NULL; + case GUI_HANDLE_X_EVENT: + wsEvents(wsDisplay, data); + gtkEventHandling(); + break; - case gtkSetBrightness: - if (guiInfo.sh_video) - set_video_colors(guiInfo.sh_video, "brightness", (int)fparam); - return NULL; + case GUI_END_FILE: - case gtkSetHue: - if (guiInfo.sh_video) - set_video_colors(guiInfo.sh_video, "hue", (int)fparam); - return NULL; + uiEventHandling(ivRedraw, 1); - case gtkSetSaturation: - if (guiInfo.sh_video) - set_video_colors(guiInfo.sh_video, "saturation", (int)fparam); - return NULL; + guiInfo.sh_video = NULL; - case gtkSetEqualizer: - { - af_control_ext_t tmp; + if (!uiGotoTheNext && guiInfo.Playing) { + uiGotoTheNext = 1; + break; + } - if (eq) { - gtkEquChannels[eq->channel][eq->band] = eq->gain; - tmp.ch = eq->channel; - tmp.arg = gtkEquChannels[eq->channel]; +#ifdef CONFIG_CDDA + if (guiInfo.StreamType == STREAMTYPE_CDDA) { + uiNext(); - if (guiInfo.afilter) - af_control_any_rev(guiInfo.afilter, AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp); + if (guiInfo.Playing) + break; + } +#endif + + if (guiInfo.Playing && (next = listSet(gtkGetNextPlItem, NULL)) && (plLastPlayed != next)) { + plLastPlayed = next; + uiSetFileName(next->path, next->name, STREAMTYPE_FILE); + guiInfo.NewPlay = GUI_FILE_NEW; + guiInfo.Track++; } else { - int i; + if (guiInfo.NewPlay == GUI_FILE_NEW) + break; - memset(gtkEquChannels, 0, sizeof(gtkEquChannels)); + filename = NULL; - if (guiInfo.afilter) { - for (i = 0; i < 6; i++) { - tmp.ch = i; - tmp.arg = gtkEquChannels[i]; - af_control_any_rev(guiInfo.afilter, AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp); + guiInfo.ElapsedTime = 0; + guiInfo.Position = 0; + guiInfo.AudioChannels = 0; + +#ifdef CONFIG_DVDREAD + guiInfo.Track = 1; + guiInfo.Chapter = 1; + guiInfo.Angle = 1; +#endif + + if (gtkShowVideoWindow) { + guiInfo.VideoWindow = True; + guiInfo.VideoWidth = guiApp.sub.width; + guiInfo.VideoHeight = guiApp.sub.height; + + if (!guiApp.subWindow.isFullScreen) { + wsResizeWindow(&guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight); + wsMoveWindow(&guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y); } + + if (!guiApp.subWindow.Mapped) + wsVisibleWindow(&guiApp.subWindow, wsShowWindow); + + if (gtkLoadFullscreen ^ guiApp.subWindow.isFullScreen) + uiEventHandling(evFullScreen, 0); + } else { + wsVisibleWindow(&guiApp.subWindow, wsHideWindow); + guiInfo.VideoWindow = False; + btnSet(evFullScreen, (gtkLoadFullscreen ? btnPressed : btnReleased)); } + + gui(GUI_SET_STATE, (void *)GUI_STOP); + + wsHandleEvents(); + uiSubRender = 1; + wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B); + wsClearWindow(guiApp.subWindow); + wsPostRedisplay(&guiApp.subWindow); + wsVisibleMouse(&guiApp.subWindow, wsShowMouseCursor); } - return NULL; - } + break; } - return NULL; + return True; } // This function adds/inserts one file into the gui playlist. @@ -1383,7 +880,7 @@ else pathname[strlen(pathname) - strlen(filename)] = 0; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] playtree, add: %s/%s\n", pathname, filename); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] playtree, add: %s/%s\n", pathname, filename); item = calloc(1, sizeof(plItem)); @@ -1394,9 +891,9 @@ item->path = pathname; if (insert) - gtkSet(gtkInsertPlItem, 0, (void *)item); // inserts the item after current, and makes current=item + listSet(gtkInsertPlItem, item); // inserts the item after current, and makes current=item else - gtkSet(gtkAddPlItem, 0, (void *)item); + listSet(gtkAddPlItem, item); return 1; } @@ -1405,13 +902,13 @@ // into the gui playlist by either: // - overwriting gui pl (enqueue=0) // - appending it to gui pl (enqueue=1) -int import_initial_playtree_into_gui(play_tree_t *my_playtree, m_config_t *config, int enqueue) +int guiPlaylistInitialize(play_tree_t *my_playtree, m_config_t *config, int enqueue) { play_tree_iter_t *my_pt_iter = NULL; int result = 0; if (!enqueue) - gtkSet(gtkDelPl, 0, 0); // delete playlist before "appending" + listSet(gtkDelPl, NULL); // delete playlist before "appending" if ((my_pt_iter = pt_iter_create(&my_playtree, config))) { while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL) @@ -1423,26 +920,24 @@ uiCurr(); // update filename uiGotoTheNext = 1; - if (!enqueue) - filename = guiInfo.Filename; // Backward compatibility; if file is specified on commandline, - // gmplayer does directly start in Play-Mode. - else - filename = NULL; + if (enqueue) + filename = NULL; // don't start playing return result; } // This function imports and inserts an playtree, that is created "on the fly", // for example by parsing some MOV-Reference-File; or by loading an playlist -// with "File Open". +// with "File Open". (The latter, actually, isn't allowed in MPlayer and thus +// not working which is why this function won't get called for that reason.) // The file which contained the playlist is thereby replaced with it's contents. -int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config) +int guiPlaylistAdd(play_tree_t *my_playtree, m_config_t *config) { play_tree_iter_t *my_pt_iter = NULL; int result = 0; plItem *save; - save = (plItem *)gtkSet(gtkGetCurrPlItem, 0, 0); // save current item + save = (plItem *)listSet(gtkGetCurrPlItem, NULL); // save current item if ((my_pt_iter = pt_iter_create(&my_playtree, config))) { while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL) @@ -1454,19 +949,247 @@ } if (save) - gtkSet(gtkSetCurrPlItem, 0, (void *)save); + listSet(gtkSetCurrPlItem, save); else - gtkSet(gtkSetCurrPlItem, 0, (void *)plList); // go to head, if plList was empty before + listSet(gtkSetCurrPlItem, plList); // go to head, if plList was empty before if (save && result) - gtkSet(gtkDelCurrPlItem, 0, 0); + listSet(gtkDelCurrPlItem, NULL); uiCurr(); // update filename - filename = NULL; return result; } +/* GUI -> MPlayer */ + +void mplayer(int what, float value, void *data) +{ + equalizer_t *eq = (equalizer_t *)data; + + switch (what) { + // subtitle + +#ifndef CONFIG_FREETYPE + case MPLAYER_SET_FONT_FACTOR: + font_factor = value; + mplayerLoadFont(); + break; +#else + case MPLAYER_SET_FONT_OUTLINE: + subtitle_font_thickness = (8.0f / 100.0f) * value; + mplayerLoadFont(); + break; + + case MPLAYER_SET_FONT_BLUR: + subtitle_font_radius = (8.0f / 100.0f) * value; + mplayerLoadFont(); + break; + + case MPLAYER_SET_FONT_TEXTSCALE: + text_font_scale_factor = value; + mplayerLoadFont(); + break; + + case MPLAYER_SET_FONT_OSDSCALE: + osd_font_scale_factor = value; + mplayerLoadFont(); + break; + + case MPLAYER_SET_FONT_ENCODING: + nfree(subtitle_font_encoding); + subtitle_font_encoding = gstrdup((char *)data); + mplayerLoadFont(); + break; + + case MPLAYER_SET_FONT_AUTOSCALE: + subtitle_autoscale = (int)value; + mplayerLoadFont(); + break; +#endif + +#ifdef CONFIG_ICONV + case MPLAYER_SET_SUB_ENCODING: + nfree(sub_cp); + sub_cp = gstrdup((char *)data); + break; +#endif + + case MPLAYER_SET_EXTRA_STEREO: + gtkAOExtraStereoMul = value; + if (guiInfo.afilter) + af_control_any_rev(guiInfo.afilter, AF_CONTROL_ES_MUL | AF_CONTROL_SET, >kAOExtraStereoMul); + break; + + case MPLAYER_SET_PANSCAN: + { + mp_cmd_t *mp_cmd; + + mp_cmd = calloc(1, sizeof(*mp_cmd)); + mp_cmd->id = MP_CMD_PANSCAN; + mp_cmd->name = strdup("panscan"); + mp_cmd->args[0].v.f = value; + mp_cmd->args[1].v.i = 1; + mp_input_queue_cmd(mp_cmd); + } + break; + + case MPLAYER_SET_AUTO_QUALITY: + auto_quality = (int)value; + break; + + // set equalizers + + case MPLAYER_SET_CONTRAST: + if (guiInfo.sh_video) + set_video_colors(guiInfo.sh_video, "contrast", (int)value); + break; + + case MPLAYER_SET_BRIGHTNESS: + if (guiInfo.sh_video) + set_video_colors(guiInfo.sh_video, "brightness", (int)value); + break; + + case MPLAYER_SET_HUE: + if (guiInfo.sh_video) + set_video_colors(guiInfo.sh_video, "hue", (int)value); + break; + + case MPLAYER_SET_SATURATION: + if (guiInfo.sh_video) + set_video_colors(guiInfo.sh_video, "saturation", (int)value); + break; + + case MPLAYER_SET_EQUALIZER: + { + af_control_ext_t tmp; + + if (eq) { + gtkEquChannels[eq->channel][eq->band] = eq->gain; + tmp.ch = eq->channel; + tmp.arg = gtkEquChannels[eq->channel]; + + if (guiInfo.afilter) + af_control_any_rev(guiInfo.afilter, AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp); + } else { + unsigned int i; + + memset(gtkEquChannels, 0, sizeof(gtkEquChannels)); + + if (guiInfo.afilter) { + for (i = 0; i < FF_ARRAY_ELEMS(gtkEquChannels); i++) { + tmp.ch = i; + tmp.arg = gtkEquChannels[i]; + af_control_any_rev(guiInfo.afilter, AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp); + } + } + } + + break; + } + + case MPLAYER_EXIT_GUI: + exit_player_with_rc((enum exit_reason)value, (enum exit_reason)value >= EXIT_ERROR); + break; + } +} + +void mplayerLoadFont(void) +{ +#ifdef CONFIG_FREETYPE + load_font_ft(vo_image_width, vo_image_height, &vo_font, font_name, osd_font_scale_factor); +#else + if (vo_font) { + int i; + + free(vo_font->name); + free(vo_font->fpath); + + for (i = 0; i < 16; i++) { + if (vo_font->pic_a[i]) { + free(vo_font->pic_a[i]->bmp); + free(vo_font->pic_a[i]->pal); + } + } + + for (i = 0; i < 16; i++) { + if (vo_font->pic_b[i]) { + free(vo_font->pic_b[i]->bmp); + free(vo_font->pic_b[i]->pal); + } + } + + free(vo_font); + vo_font = NULL; + } + + if (font_name) { + vo_font = read_font_desc(font_name, font_factor, 0); + + if (!vo_font) + gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadFont, font_name); + } else { + font_name = gstrdup(get_path("font/font.desc")); + vo_font = read_font_desc(font_name, font_factor, 0); + + if (!vo_font) { + nfree(font_name); + font_name = gstrdup(MPLAYER_DATADIR "/font/font.desc"); + vo_font = read_font_desc(font_name, font_factor, 0); + } + } +#endif +} + +void mplayerLoadSubtitle(const char *name) +{ + if (guiInfo.Playing == 0) + return; + + if (subdata) { + mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_DeletingSubtitles); + + sub_free(subdata); + subdata = NULL; + vo_sub = NULL; + + if (vo_osd_list) { + int len; + mp_osd_obj_t *osd; + + osd = vo_osd_list; + + while (osd) { + if (osd->type == OSDTYPE_SUBTITLE) + break; + + osd = osd->next; + } + + if (osd && (osd->flags & OSDFLAG_VISIBLE)) { + len = osd->stride * (osd->bbox.y2 - osd->bbox.y1); + memset(osd->bitmap_buffer, 0, len); + memset(osd->alpha_buffer, 0, len); + } + } + } + + if (name) { + mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_LoadingSubtitles, name); + + subdata = sub_read_file(name, (guiInfo.sh_video ? guiInfo.sh_video->fps : 0)); + + if (!subdata) + gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub, name); + + sub_name = (malloc(2 * sizeof(char *))); // when mplayer will be restarted + sub_name[0] = strdup(name); // sub_name[0] will be read + sub_name[1] = NULL; + } + + update_set_of_subtitles(); +} + // NOTE TO MYSELF: This function is nonsense. // MPlayer should pass messages to the GUI // which must decide then which message has diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/interface.h mplayer-1.0~rc4.dfsg1+svn34540/gui/interface.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/interface.h 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/interface.h 2011-12-11 14:43:16.000000000 +0000 @@ -20,6 +20,8 @@ #define MPLAYER_GUI_INTERFACE_H #include "config.h" +#include "libaf/af.h" +#include "libmpdemux/stheader.h" #include "m_config.h" #include "mp_core.h" #include "playtree.h" @@ -29,223 +31,131 @@ // the GUI and that only need to include interface.h for this. // ------------------------------------------------------------ #include "cfg.h" -#include "ui/actions.h" extern int use_gui; // this is defined in mplayer.c // ------------------------------------------------------------ #define GMPlayer "gmplayer" -#define guiXEvent 0 -#define guiSetState 1 -#define guiIEvent 2 -#define guiSetDVD 3 -#define guiSetFileName 4 -#define guiSetAudioOnly 6 -#define guiReDrawSubWindow 7 -#define guiSetShVideo 8 -#define guiSetStream 9 -#define guiReDraw 10 -#define guiSetVolume 11 -#define guiSetDefaults 12 -#define guiSetValues 13 -#define guiSetFileFormat 14 -#define guiSetDemuxer 15 -#define guiSetParameters 16 -#define guiSetAfilter 17 -#define guiSetContext 18 +/// gui() instructions +enum { + GUI_END_FILE, + GUI_HANDLE_EVENTS, + GUI_HANDLE_X_EVENT, + GUI_PREPARE, + GUI_REDRAW, + GUI_RUN_COMMAND, + GUI_RUN_MESSAGE, + GUI_SETUP_VIDEO_WINDOW, + GUI_SET_AFILTER, + GUI_SET_AUDIO, + GUI_SET_CONTEXT, + GUI_SET_MIXER, + GUI_SET_STATE, + GUI_SET_STREAM, + GUI_SET_VIDEO +}; +//@{ +/// Playing state #define GUI_STOP 0 #define GUI_PLAY 1 #define GUI_PAUSE 2 +//@} -#define guiDVD 1 -#define guiVCD 2 -#define guiFilenames 4 -#define guiALL 0xffffffff - -#define gtkSetContrast 0 -#define gtkSetBrightness 1 -#define gtkSetHue 2 -#define gtkSetSaturation 3 -#define gtkSetEqualizer 4 -#define gtkAddPlItem 5 -#define gtkGetNextPlItem 6 -#define gtkGetPrevPlItem 7 -#define gtkGetCurrPlItem 8 -#define gtkDelPl 9 -#define gtkSetExtraStereo 10 -#define gtkSetPanscan 11 -#define gtkSetFontFactor 12 -#define gtkSetAutoq 13 -#define gtkClearStruct 14 -#define gtkAddURLItem 15 -#define gtkSetFontOutLine 16 -#define gtkSetFontBlur 17 -#define gtkSetFontTextScale 18 -#define gtkSetFontOSDScale 19 -#define gtkSetFontEncoding 20 -#define gtkSetFontAutoScale 21 -#define gtkSetSubEncoding 22 -#define gtkDelCurrPlItem 23 -#define gtkInsertPlItem 24 -#define gtkSetCurrPlItem 25 - -#define fsPersistant_MaxPos 5 - -#define guiSetFilename(s, n) \ - { \ - free(s); \ - s = gstrdup(n); \ - } - -#define guiSetDF(s, d, n) \ - { \ - free(s); \ - s = malloc(strlen(d) + strlen(n) + 5); \ - sprintf(s, "%s/%s", d, n); \ - } +//@{ +/// NewPlay reason +#define GUI_FILE_SAME 1 +#define GUI_FILE_NEW 2 +//@} + +/// mplayer() instructions +enum { + MPLAYER_EXIT_GUI, + MPLAYER_SET_AUTO_QUALITY, + MPLAYER_SET_BRIGHTNESS, + MPLAYER_SET_CONTRAST, + MPLAYER_SET_EQUALIZER, + MPLAYER_SET_EXTRA_STEREO, + MPLAYER_SET_FONT_AUTOSCALE, + MPLAYER_SET_FONT_BLUR, + MPLAYER_SET_FONT_ENCODING, + MPLAYER_SET_FONT_FACTOR, + MPLAYER_SET_FONT_OSDSCALE, + MPLAYER_SET_FONT_OUTLINE, + MPLAYER_SET_FONT_TEXTSCALE, + MPLAYER_SET_HUE, + MPLAYER_SET_PANSCAN, + MPLAYER_SET_SATURATION, + MPLAYER_SET_SUB_ENCODING +}; typedef struct { - int x; - int y; - int width; - int height; -} guiResizeStruct; + MPContext *mpcontext; + sh_video_t *sh_video; + af_stream_t *afilter; + + int VideoWindow; + int VideoWidth; + int VideoHeight; -typedef struct { - int signal; - char module[512]; -} guiUnknownErrorStruct; - -typedef struct { - int seek; - int format; - int width; - int height; - char codecdll[128]; -} guiVideoStruct; + int StreamType; + int AudioChannels; #ifdef CONFIG_DVDREAD -typedef struct { - int titles; - int chapters; - int angles; - int current_chapter; - int current_title; - int current_angle; - int nr_of_audio_channels; - stream_language_t audio_streams[32]; - int nr_of_subtitles; - stream_language_t subtitles[32]; -} guiDVDStruct; + int AudioStreams; + stream_language_t AudioStream[32]; + + int Subtitles; + stream_language_t Subtitle[32]; #endif -typedef struct { - int message; - guiResizeStruct resize; - guiVideoStruct videodata; - guiUnknownErrorStruct error; - - struct MPContext *mpcontext; - void *sh_video; - void *afilter; - void *demuxer; - void *event_struct; + char *Filename; // public, read access by MPlayer + char *AudioFilename; + char *SubtitleFilename; + +#if defined(CONFIG_VCD) || defined(CONFIG_DVDREAD) + int Tracks; +#endif - int DiskChanged; - int NewPlay; + int Track; // public, read access by MPlayer #ifdef CONFIG_DVDREAD - guiDVDStruct DVD; - int Title; + int Chapters; + int Chapter; // public, write access by MPlayer + int Angles; int Angle; - int Chapter; #endif -#ifdef CONFIG_VCD - int VCDTracks; -#endif - - int Playing; - float Position; + int Playing; // public, read access by MPlayer - int MovieWidth; - int MovieHeight; - int NoWindow; + int RunningTime; // public, write access by MPlayer + int ElapsedTime; // public, write access by MPlayer + float Position; // public, write access by MPlayer float Volume; float Balance; - int Track; - int AudioType; - int StreamType; - int AudioOnly; - int TimeSec; - int LengthInSec; - int FrameDrop; - int FileFormat; - float FPS; - - char *Filename; - int FilenameChanged; - - char *Subtitlename; - int SubtitleChanged; - - char *Othername; - int OtherChanged; - - char *AudioFile; - int AudioFileChanged; - - int SkinChange; + int NewPlay; // public, read access by MPlayer } guiInterface_t; -typedef struct plItem { - struct plItem *prev, *next; - char *path; - char *name; -} plItem; - -typedef struct urlItem { - struct urlItem *next; - char *url; -} urlItem; - extern guiInterface_t guiInfo; -extern int guiWinID; - -extern char *skinName; -extern char *skinDirInHome; -extern char *skinMPlayerDir; - -extern plItem *plList; -extern plItem *plCurrent; -extern plItem *plLastPlayed; - -extern urlItem *URLList; - -extern char *fsHistory[fsPersistant_MaxPos]; - -extern float gtkEquChannels[6][10]; - -void gaddlist(char ***list, const char *entry); -void gfree(void **p); -void gmp_msg(int mod, int lev, const char *format, ...); -char *gstrchr(char *str, int c); -int gstrcmp(const char *a, const char *b); -char *gstrdup(const char *str); -void *gtkSet(int cmd, float fparam, void *vparam); +/// @name MPlayer -> GUI +//@{ +int gui(int what, void *data); void guiDone(void); -void guiEventHandling(void); -void guiExit(enum exit_reason how); -int guiGetEvent(int type, void *arg); void guiInit(void); -void guiLoadFont(void); -void guiLoadSubtitle(char *name); -int import_initial_playtree_into_gui(play_tree_t *my_playtree, m_config_t *config, int enqueue); -int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config); +int guiPlaylistAdd(play_tree_t *my_playtree, m_config_t *config); +int guiPlaylistInitialize(play_tree_t *my_playtree, m_config_t *config, int enqueue); +//@} + +/// @name GUI -> MPlayer +//@{ +void mplayer(int what, float value, void *data); +void mplayerLoadFont(void); +void mplayerLoadSubtitle(const char *name); +void gmp_msg(int mod, int lev, const char *format, ...); +//@} #endif /* MPLAYER_GUI_INTERFACE_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/skin/font.c mplayer-1.0~rc4.dfsg1+svn34540/gui/skin/font.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/skin/font.c 2011-06-21 02:05:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/skin/font.c 2011-09-06 15:28:53.000000000 +0000 @@ -16,14 +16,19 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +/** + * @file + * @brief Font file parser and font rendering + */ + #include #include #include #include #include "font.h" -#include "gui/interface.h" #include "gui/util/cut.h" +#include "gui/util/mem.h" #include "gui/util/string.h" #include "skin.h" @@ -38,6 +43,13 @@ static bmpFont *Fonts[MAX_FONTS]; +/** + * @brief Add a font to #Fonts. + * + * @param name name of the font + * + * @return an identification >= 0 (ok), -1 (out of memory) or -2 (#MAX_FONTS exceeded) + */ static int fntAddNewFont(char *name) { int id, i; @@ -66,6 +78,9 @@ return id; } +/** + * @brief Free all memory allocated to fonts. + */ void fntFreeFont(void) { int i; @@ -73,11 +88,20 @@ for (i = 0; i < MAX_FONTS; i++) { if (Fonts[i]) { bpFree(&Fonts[i]->Bitmap); - gfree((void **)&Fonts[i]); + nfree(Fonts[i]); } } } +/** + * @brief Read and parse a font file. + * + * @param path directory the font file is in + * @param fname name of the font + * + * @return 0 (ok), -1 or -2 (return code of #fntAddNewFont()), + * -3 (file error) or -4 (#skinImageRead() error) + */ int fntRead(char *path, char *fname) { FILE *f; @@ -97,7 +121,7 @@ f = fopen(buf, "rt"); if (!f) { - gfree((void **)&Fonts[id]); + nfree(Fonts[id]); return -3; } @@ -149,16 +173,16 @@ cutItem(param, buf, ',', 3); Fonts[id]->Fnt[i].sy = atoi(buf); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[font] char: '%s' params: %d,%d %dx%d\n", item, Fonts[id]->Fnt[i].x, Fonts[id]->Fnt[i].y, Fonts[id]->Fnt[i].sx, Fonts[id]->Fnt[i].sy); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[font] char: '%s' params: %d,%d %dx%d\n", item, Fonts[id]->Fnt[i].x, Fonts[id]->Fnt[i].y, Fonts[id]->Fnt[i].sx, Fonts[id]->Fnt[i].sy); } else if (!strcmp(item, "image")) { av_strlcpy(buf, path, sizeof(buf)); av_strlcat(buf, param, sizeof(buf)); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[font] image file: %s\n", buf); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[font] image file: %s\n", buf); - if (skinBPRead(buf, &Fonts[id]->Bitmap) != 0) { + if (skinImageRead(buf, &Fonts[id]->Bitmap) != 0) { bpFree(&Fonts[id]->Bitmap); - gfree((void **)&Fonts[id]); + nfree(Fonts[id]); fclose(f); return -4; } @@ -170,6 +194,13 @@ return 0; } +/** + * @brief Find the ID of a font by its name. + * + * @param name name of the font + * + * @return an identification >= 0 (ok) or -1 (not found) + */ int fntFindID(char *name) { int i; @@ -182,8 +213,19 @@ return -1; } -// get Fnt index of character (utf8 or normal one) *str points to, -// then move pointer to next/previous character +/** + * @brief Get the #bmpFont::Fnt index of the character @a *str points to. + * + * Move pointer @a *str to the character according to @a direction + * afterwards. + * + * @param id font ID + * @param str pointer to the string + * @param uft8 flag indicating whether @a str contains UTF-8 characters + * @param direction +1 (forward) or -1 (backward) + * + * @return index >= 0 (ok) or -1 (not found) + */ static int fntGetCharIndex(int id, unsigned char **str, gboolean utf8, int direction) { unsigned char *p, uchar[6] = ""; // glib implements 31-bit UTF-8 @@ -224,6 +266,14 @@ return c; } +/** + * @brief Get the rendering width of a text. + * + * @param id font ID + * @param str string to be examined + * + * @return width of the rendered string (in pixels) + */ int fntTextWidth(int id, char *str) { int size = 0, c; @@ -246,6 +296,14 @@ return size; } +/** + * @brief Get the rendering height of a text. + * + * @param id font ID + * @param str string to be examined + * + * @return height of the rendered string (in pixels) + */ static int fntTextHeight(int id, char *str) { int max = 0, c, h; @@ -270,7 +328,16 @@ return max; } -guiImage *fntRender(wItem *item, int px, char *txt) +/** + * @brief Render a text on an item. + * + * @param item item the text shall be placed on + * @param px x position for the text in case it is wider than the item width + * @param txt text to be rendered + * + * @return image containing the rendered text + */ +guiImage *fntTextRender(wItem *item, int px, char *txt) { unsigned char *u; unsigned int i; @@ -312,7 +379,7 @@ ibuf = (uint32_t *)Fonts[id]->Bitmap.Image; for (i = 0; i < item->Bitmap.ImageSize / 4; i++) - obuf[i] = MP_TRANSPARENT; + obuf[i] = GUI_TRANSPARENT; if (tw <= iw) { switch (item->align) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/skin/font.h mplayer-1.0~rc4.dfsg1+svn34540/gui/skin/font.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/skin/font.h 2011-06-19 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/skin/font.h 2011-09-05 16:19:04.000000000 +0000 @@ -43,7 +43,7 @@ int fntFindID(char *name); void fntFreeFont(void); int fntRead(char *path, char *fname); -guiImage *fntRender(wItem *item, int px, char *txt); +guiImage *fntTextRender(wItem *item, int px, char *txt); int fntTextWidth(int id, char *str); #endif /* MPLAYER_GUI_FONT_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/skin/skin.c mplayer-1.0~rc4.dfsg1+svn34540/gui/skin/skin.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/skin/skin.c 2011-06-19 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/skin/skin.c 2011-09-06 15:28:53.000000000 +0000 @@ -16,6 +16,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +/** + * @file + * @brief Skin parser + */ + #include #include @@ -38,6 +43,9 @@ int (*func)(char *in); } _item; +char *skinDirInHome; +char *skinMPlayerDir; + static guiItems *skin; static int linenumber; @@ -48,6 +56,12 @@ static int *currWinItemIdx; static wItem *currWinItems; +/** + * @brief Display a skin error message. + * + * @param format format string + * @param ... arguments + */ static void skin_error(const char *format, ...) { char p[512]; @@ -60,6 +74,13 @@ gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_SKIN_ERRORMESSAGE, linenumber, p); } +/** + * @brief Check whether a @a section definition has started. + * + * @param item name of the item to be put in a message in case of an error + * + * @return 1 (ok) or 0 (error) + */ static int section_item(char *item) { if (!skin) { @@ -70,6 +91,13 @@ return 1; } +/** + * @brief Check whether a @a window definition has started. + * + * @param item name of the item to be put in a message in case of an error + * + * @return 1 (ok) or 0 (error) + */ static int window_item(char *item) { if (!currWinName[0]) { @@ -80,6 +108,13 @@ return 1; } +/** + * @brief Check whether a specific @a window definition has started. + * + * @param name name of the window to be checked + * + * @return 0 (ok) or 1 (error) + */ static int in_window(char *name) { if (strcmp(currWinName, name) == 0) { @@ -90,9 +125,17 @@ return 0; } -int skinBPRead(char *fname, guiImage *bf) +/** + * @brief Read a skin @a image file. + * + * @param fname filename (with path) + * @param img pointer suitable to store the image data + * + * @return return code of #bpRead() + */ +int skinImageRead(char *fname, guiImage *img) { - int i = bpRead(fname, bf); + int i = bpRead(fname, img); switch (i) { case -1: @@ -115,6 +158,11 @@ return i; } +/** + * @brief Get next free item in current @a window. + * + * @return pointer to next free item (ok) or NULL (error) + */ static wItem *next_item(void) { wItem *item = NULL; @@ -128,7 +176,15 @@ return item; } -// section=movieplayer +/** + * @brief Parse a @a section definition. + * + * Syntax: section=movieplayer + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_section(char *in) { if (skin) { @@ -143,17 +199,26 @@ return 1; } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] section: %s\n", in); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] section: %s\n", in); return 0; } -// end +/** + * @brief Parse an @a end definition. + * + * Syntax: end + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_end(char *in) { char *space, *name; -#ifdef MP_DEBUG + (void)in; + if (currWinName[0]) { space = " "; name = currWinName; @@ -161,14 +226,11 @@ space = ""; name = "section"; } -#endif - - (void)in; if (!section_item("end")) return 1; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] %send (%s)\n", space, name); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] %send (%s)\n", space, name); if (currWinName[0]) { currWinName[0] = 0; @@ -181,7 +243,15 @@ return 0; } -// window=main|sub|playbar|menu +/** + * @brief Parse a @a window definition. + * + * Syntax: window=main|sub|playbar|menu + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_window(char *in) { if (!section_item("window")) @@ -217,12 +287,20 @@ av_strlcpy(currWinName, in, sizeof(currWinName)); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] window: %s\n", currWinName); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] window: %s\n", currWinName); return 0; } -// base=image,x,y[,width,height] +/** + * @brief Parse a @a base definition. + * + * Syntax: base=image,x,y[,width,height] + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_base(char *in) { unsigned char fname[256]; @@ -244,7 +322,7 @@ w = cutItemToInt(in, ',', 3); h = cutItemToInt(in, ',', 4); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] image: %s", fname); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] image: %s", fname); currWin->type = itBase; @@ -252,15 +330,15 @@ currWin->x = x; currWin->y = y; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, " %d,%d", x, y); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, " %d,%d", x, y); } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "\n"); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "\n"); av_strlcpy(file, path, sizeof(file)); av_strlcat(file, fname, sizeof(file)); - if (skinBPRead(file, &currWin->Bitmap) != 0) + if (skinImageRead(file, &currWin->Bitmap) != 0) return 1; currWin->width = currWin->Bitmap.Width; @@ -273,7 +351,7 @@ } } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] bitmap: %dx%d\n", currWin->width, currWin->height); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] bitmap: %dx%d\n", currWin->width, currWin->height); if (!is_sub) { #ifdef CONFIG_XSHAPE @@ -281,7 +359,7 @@ skin_error(MSGTR_SKIN_NotEnoughMemory); return 1; } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] mask: %lux%lu\n", currWin->Mask.Width, currWin->Mask.Height); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] mask: %lux%lu\n", currWin->Mask.Width, currWin->Mask.Height); #else currWin->Mask.Image = NULL; #endif @@ -295,7 +373,15 @@ return 0; } -// background=R,G,B +/** + * @brief Parse a @a background definition. + * + * Syntax: background=R,G,B + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_background(char *in) { if (!window_item("background")) @@ -312,12 +398,20 @@ currWin->G = cutItemToInt(in, ',', 1); currWin->B = cutItemToInt(in, ',', 2); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] background color: #%02x%02x%02x\n", currWin->R, currWin->G, currWin->B); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] background color: #%02x%02x%02x\n", currWin->R, currWin->G, currWin->B); return 0; } -// button=image,x,y,width,height,message +/** + * @brief Parse a @a button definition. + * + * Syntax: button=image,x,y,width,height,message + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_button(char *in) { unsigned char fname[256]; @@ -348,9 +442,9 @@ return 1; } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] button image: %s %d,%d\n", fname, x, y); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] message: %s (#%d)\n", msg, message); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] size: %dx%d\n", w, h); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] button image: %s %d,%d\n", fname, x, y); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] message: %s (#%d)\n", msg, message); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] size: %dx%d\n", w, h); item = next_item(); @@ -374,16 +468,24 @@ av_strlcpy(file, path, sizeof(file)); av_strlcat(file, fname, sizeof(file)); - if (skinBPRead(file, &item->Bitmap) != 0) + if (skinImageRead(file, &item->Bitmap) != 0) return 1; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] (bitmap: %lux%lu)\n", item->Bitmap.Width, item->Bitmap.Height); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] (bitmap: %lux%lu)\n", item->Bitmap.Width, item->Bitmap.Height); } return 0; } -// selected=image +/** + * @brief Parse a @a selected definition. + * + * Syntax: selected=image + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_selected(char *in) { unsigned char file[512]; @@ -399,7 +501,7 @@ if (in_window("playbar")) return 1; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] image selected: %s\n", in); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] image selected: %s\n", in); currItem = &skin->menuSelected; currItem->type = itBase; @@ -407,18 +509,26 @@ av_strlcpy(file, path, sizeof(file)); av_strlcat(file, in, sizeof(file)); - if (skinBPRead(file, &currItem->Bitmap) != 0) + if (skinImageRead(file, &currItem->Bitmap) != 0) return 1; currItem->width = currItem->Bitmap.Width; currItem->height = currItem->Bitmap.Height; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] bitmap: %dx%d\n", currItem->width, currItem->height); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] bitmap: %dx%d\n", currItem->width, currItem->height); return 0; } -// menu=x,y,width,height,message +/** + * @brief Parse a @a menu definition. + * + * Syntax: menu=x,y,width,height,message + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_menu(char *in) { int x, y, w, h, message; @@ -460,15 +570,23 @@ item->height = h; item->message = message; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] item #%d: %d,%d %dx%d\n", *currWinItemIdx, x, y, w, h); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] message: %s (#%d)\n", msg, message); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] item #%d: %d,%d %dx%d\n", *currWinItemIdx, x, y, w, h); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] message: %s (#%d)\n", msg, message); item->Bitmap.Image = NULL; return 0; } -// hpotmeter=button,bwidth,bheight,phases,numphases,default,x,y,width,height,message +/** + * @brief Parse a @a hpotmeter definition. + * + * Syntax: hpotmeter=button,bwidth,bheight,phases,numphases,default,x,y,width,height,message + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_hpotmeter(char *in) { unsigned char pfname[256]; @@ -504,10 +622,10 @@ return 1; } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] h/v potmeter image: %s %d,%d %dx%d\n", phfname, x, y, w, h); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] button image: %s %dx%d\n", pfname, pwidth, pheight); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] numphases: %d, default: %d%%\n", ph, d); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] message: %s (#%d)\n", buf, message); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] h/v potmeter image: %s %d,%d %dx%d\n", phfname, x, y, w, h); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] button image: %s %dx%d\n", pfname, pwidth, pheight); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] numphases: %d, default: %d%%\n", ph, d); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] message: %s (#%d)\n", buf, message); item = next_item(); @@ -532,10 +650,10 @@ av_strlcpy(buf, path, sizeof(buf)); av_strlcat(buf, phfname, sizeof(buf)); - if (skinBPRead(buf, &item->Bitmap) != 0) + if (skinImageRead(buf, &item->Bitmap) != 0) return 1; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] (potmeter bitmap: %lux%lu)\n", item->Bitmap.Width, item->Bitmap.Height); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] (potmeter bitmap: %lux%lu)\n", item->Bitmap.Width, item->Bitmap.Height); } item->Mask.Image = NULL; @@ -544,16 +662,24 @@ av_strlcpy(buf, path, sizeof(buf)); av_strlcat(buf, pfname, sizeof(buf)); - if (skinBPRead(buf, &item->Mask) != 0) + if (skinImageRead(buf, &item->Mask) != 0) return 1; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] (button bitmap: %lux%lu)\n", item->Mask.Width, item->Mask.Height); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] (button bitmap: %lux%lu)\n", item->Mask.Width, item->Mask.Height); } return 0; } -// vpotmeter=button,bwidth,bheight,phases,numphases,default,x,y,width,height,message +/** + * @brief Parse a @a vpotmeter definition. + * + * Syntax: vpotmeter=button,bwidth,bheight,phases,numphases,default,x,y,width,height,message + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_vpotmeter(char *in) { int r; @@ -569,7 +695,15 @@ return r; } -// potmeter=phases,numphases,default,x,y,width,height,message +/** + * @brief Parse a @a potmeter definition. + * + * Syntax: potmeter=phases,numphases,default,x,y,width,height,message + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_potmeter(char *in) { unsigned char phfname[256]; @@ -601,9 +735,9 @@ return 1; } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] potmeter image: %s %d,%d %dx%d\n", phfname, x, y, w, h); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] numphases: %d, default: %d%%\n", ph, d); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] message: %s (#%d)\n", buf, message); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] potmeter image: %s %d,%d %dx%d\n", phfname, x, y, w, h); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] numphases: %d, default: %d%%\n", ph, d); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] message: %s (#%d)\n", buf, message); item = next_item(); @@ -625,16 +759,24 @@ av_strlcpy(buf, path, sizeof(buf)); av_strlcat(buf, phfname, sizeof(buf)); - if (skinBPRead(buf, &item->Bitmap) != 0) + if (skinImageRead(buf, &item->Bitmap) != 0) return 1; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] (bitmap: %lux%lu)\n", item->Bitmap.Width, item->Bitmap.Height); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] (bitmap: %lux%lu)\n", item->Bitmap.Width, item->Bitmap.Height); } return 0; } -// font=fontfile +/** + * @brief Parse a @a font definition. + * + * Syntax: font=fontfile + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_font(char *in) { char fnt[256]; @@ -667,12 +809,20 @@ return 1; } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] font: %s (#%d)\n", fnt, fntFindID(fnt)); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] font: %s (#%d)\n", fnt, fntFindID(fnt)); return 0; } -// slabel=x,y,fontfile,"text" +/** + * @brief Parse a @a slabel definition. + * + * Syntax: slabel=x,y,fontfile,"text" + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_slabel(char *in) { int x, y, id; @@ -694,8 +844,8 @@ cutItem(in, txt, ',', 3); cutItem(txt, txt, '"', 1); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] slabel: \"%s\"\n", txt); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] pos: %d,%d\n", x, y); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] slabel: \"%s\"\n", txt); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] pos: %d,%d\n", x, y); id = fntFindID(fnt); @@ -704,7 +854,7 @@ return 1; } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] font: %s (#%d)\n", fnt, id); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] font: %s (#%d)\n", fnt, id); item = next_item(); @@ -727,7 +877,15 @@ return 0; } -// dlabel=x,y,width,align,fontfile,"text" +/** + * @brief Parse a @a dlabel definition. + * + * Syntax: dlabel=x,y,width,align,fontfile,"text" + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_dlabel(char *in) { int x, y, w, a, id; @@ -751,9 +909,9 @@ cutItem(in, txt, ',', 5); cutItem(txt, txt, '"', 1); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] dlabel: \"%s\"\n", txt); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] pos: %d,%d\n", x, y); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] width: %d, align: %d\n", w, a); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] dlabel: \"%s\"\n", txt); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] pos: %d,%d\n", x, y); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] width: %d, align: %d\n", w, a); id = fntFindID(fnt); @@ -762,7 +920,7 @@ return 1; } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] font: %s (#%d)\n", fnt, id); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] font: %s (#%d)\n", fnt, id); item = next_item(); @@ -786,7 +944,15 @@ return 0; } -// decoration=enable|disable +/** + * @brief Parse a @a decoration definition. + * + * Syntax: decoration=enable|disable + * + * @param in definition to be analyzed + * + * @return 0 (ok) or 1 (error) + */ static int item_decoration(char *in) { if (!window_item("decoration")) @@ -808,11 +974,14 @@ skin->mainDecoration = (strcmp(in, "enable") == 0); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] decoration: %s\n", in); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] decoration: %s\n", in); return 0; } +/** + * @brief Parsing functions responsible for skin item definitions. + */ static _item skinItem[] = { { "background", item_background }, { "base", item_base }, @@ -831,6 +1000,16 @@ { "window", item_window } }; +/** + * @brief Build the skin file path for a skin name. + * + * @param dir skins directory + * @param sname name of the skin + * + * @return skin file path + * + * @note As a side effect, variable #path gets set to the skin path. + */ static char *setname(char *dir, char *sname) { static char skinfname[512]; @@ -845,6 +1024,13 @@ return skinfname; } +/** + * @brief Read and parse a skin. + * + * @param sname name of the skin + * + * @return 0 (ok), -1 (skin file not found or not readable) or -2 (parsing error) + */ int skinRead(char *sname) { char *skinfname; @@ -865,7 +1051,7 @@ } } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] configuration file: %s\n", skinfname); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] configuration file: %s\n", skinfname); appFreeStruct(); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/skin/skin.h mplayer-1.0~rc4.dfsg1+svn34540/gui/skin/skin.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/skin/skin.h 2011-06-19 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/skin/skin.h 2011-09-05 16:08:16.000000000 +0000 @@ -21,7 +21,10 @@ #include "gui/util/bitmap.h" -int skinBPRead(char *fname, guiImage *bf); +extern char *skinDirInHome; +extern char *skinMPlayerDir; + +int skinImageRead(char *fname, guiImage *img); int skinRead(char *dname); #endif /* MPLAYER_GUI_SKIN_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/actions.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/actions.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/actions.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/actions.c 2012-01-02 16:24:06.000000000 +0000 @@ -25,6 +25,9 @@ #include "gui/interface.h" #include "gui/skin/font.h" #include "gui/skin/skin.h" +#include "gui/util/list.h" +#include "gui/util/mem.h" +#include "gui/util/string.h" #include "gui/wm/wsxdnd.h" #include "widgets.h" @@ -34,52 +37,18 @@ #include "libmpcodecs/vd.h" #include "libvo/video_out.h" #include "mp_core.h" -#include "stream/stream.h" int uiGotoTheNext = 1; void uiFullScreen(void) { - if (guiInfo.NoWindow && guiInfo.Playing) + if (!guiInfo.VideoWindow) return; - if (guiInfo.Playing && guiApp.subWindow.isFullScreen) { - guiApp.subWindow.OldWidth = guiInfo.MovieWidth; - guiApp.subWindow.OldHeight = guiInfo.MovieHeight; + wsFullScreen(&guiApp.subWindow); - switch (guiApp.sub.x) { - case -1: - guiApp.subWindow.OldX = wsMaxX / 2 - guiApp.subWindow.OldWidth / 2 + wsOrgX; - break; - - case -2: - guiApp.subWindow.OldX = wsMaxX - guiApp.subWindow.OldWidth + wsOrgX; - break; - - default: - guiApp.subWindow.OldX = guiApp.sub.x; - break; - } + vo_fs = guiApp.subWindow.isFullScreen; - switch (guiApp.sub.y) { - case -1: - guiApp.subWindow.OldY = wsMaxY / 2 - guiApp.subWindow.OldHeight / 2 + wsOrgY; - break; - - case -2: - guiApp.subWindow.OldY = wsMaxY - guiApp.subWindow.OldHeight + wsOrgY; - break; - - default: - guiApp.subWindow.OldY = guiApp.sub.y; - break; - } - } - - if (guiInfo.Playing || gtkShowVideoWindow) - wsFullScreen(&guiApp.subWindow); - - fullscreen = vo_fs = guiApp.subWindow.isFullScreen; wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.subWindow.isFullScreen); if (guiApp.menuIsPresent) @@ -91,56 +60,15 @@ wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B); } -void uiEnd(void) +void uiPlay(void) { - plItem *next; - - if (!uiGotoTheNext && guiInfo.Playing) { - uiGotoTheNext = 1; + if (guiInfo.Playing == GUI_PLAY) return; - } - - if (guiInfo.Playing && (next = gtkSet(gtkGetNextPlItem, 0, NULL)) && (plLastPlayed != next)) { - plLastPlayed = next; - guiSetDF(guiInfo.Filename, next->path, next->name); - guiInfo.StreamType = STREAMTYPE_FILE; - guiInfo.FilenameChanged = guiInfo.NewPlay = 1; - gfree((void **)&guiInfo.AudioFile); - gfree((void **)&guiInfo.Subtitlename); - } else { - if (guiInfo.FilenameChanged || guiInfo.NewPlay) - return; - guiInfo.TimeSec = 0; - guiInfo.Position = 0; - guiInfo.AudioType = 0; - guiInfo.NoWindow = False; - -#ifdef CONFIG_DVDREAD - guiInfo.DVD.current_title = 1; - guiInfo.DVD.current_chapter = 1; - guiInfo.DVD.current_angle = 1; -#endif - - if (!guiApp.subWindow.isFullScreen && gtkShowVideoWindow) { - wsResizeWindow(&guiApp.subWindow, guiApp.sub.width, guiApp.sub.height); - wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y); - } else - wsVisibleWindow(&guiApp.subWindow, wsHideWindow); - - guiGetEvent(guiSetState, (void *)GUI_STOP); - uiSubRender = 1; - wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B); - wsClearWindow(guiApp.subWindow); - wsPostRedisplay(&guiApp.subWindow); - } -} - -void uiPlay(void) -{ - if (!guiInfo.Filename || - (guiInfo.Filename[0] == 0) || - (guiInfo.Playing == GUI_PLAY)) + if (guiInfo.StreamType != STREAMTYPE_CDDA && + guiInfo.StreamType != STREAMTYPE_VCD && + guiInfo.StreamType != STREAMTYPE_DVD && + (!guiInfo.Filename || (guiInfo.Filename[0] == 0))) return; if (guiInfo.Playing == GUI_PAUSE) { @@ -148,7 +76,7 @@ return; } - guiGetEvent(guiSetState, (void *)GUI_PLAY); + gui(GUI_SET_STATE, (void *)GUI_PLAY); uiSubRender = 0; wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0); wsClearWindow(guiApp.subWindow); @@ -171,11 +99,11 @@ void uiState(void) { if (guiInfo.Playing == GUI_STOP || guiInfo.Playing == GUI_PAUSE) { - btnModify(evPlaySwitchToPause, btnReleased); - btnModify(evPauseSwitchToPlay, btnDisabled); + btnSet(evPlaySwitchToPause, btnReleased); + btnSet(evPauseSwitchToPlay, btnDisabled); } else { - btnModify(evPlaySwitchToPause, btnDisabled); - btnModify(evPauseSwitchToPlay, btnReleased); + btnSet(evPlaySwitchToPause, btnDisabled); + btnSet(evPauseSwitchToPlay, btnReleased); } } @@ -187,9 +115,6 @@ void uiAbsSeek(float percent) { - if (guiInfo.StreamType == STREAMTYPE_STREAM) - return; - rel_seek_secs = percent / 100.0; abs_seek_pos = 3; } @@ -218,7 +143,7 @@ if (!menuDrawBuffer) { gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } wsResizeWindow(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height); @@ -235,7 +160,7 @@ if (!guiApp.subWindow.isFullScreen && !guiInfo.Playing) { wsResizeWindow(&guiApp.subWindow, guiApp.sub.width, guiApp.sub.height); - wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y); + wsMoveWindow(&guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y); } if (guiApp.sub.Bitmap.Image) @@ -262,7 +187,7 @@ if (!mainDrawBuffer) { gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } wsDestroyWindow(&guiApp.mainWindow); @@ -288,7 +213,7 @@ btnModify(evSetVolume, guiInfo.Volume); btnModify(evSetBalance, guiInfo.Balance); btnModify(evSetMoviePosition, guiInfo.Position); - btnModify(evFullScreen, !guiApp.subWindow.isFullScreen); + btnSet(evFullScreen, (guiApp.subWindow.isFullScreen ? btnPressed : btnReleased)); wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.subWindow.isFullScreen); wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.subWindow.isFullScreen); @@ -300,13 +225,17 @@ return; if (!dir) - guiSetFilename(guiInfo.Filename, name) + setdup(&guiInfo.Filename, name); else - guiSetDF(guiInfo.Filename, dir, name) + setddup(&guiInfo.Filename, dir, name); + + filename = guiInfo.Filename; - guiInfo.StreamType = type; - gfree((void **)&guiInfo.AudioFile); - gfree((void **)&guiInfo.Subtitlename); + if (type != SAME_STREAMTYPE) + guiInfo.StreamType = type; + + nfree(guiInfo.AudioFilename); + nfree(guiInfo.SubtitleFilename); } void uiCurr(void) @@ -318,8 +247,8 @@ return; switch (guiInfo.StreamType) { -#ifdef CONFIG_DVDREAD - case STREAMTYPE_DVD: +#ifdef CONFIG_CDDA + case STREAMTYPE_CDDA: break; #endif @@ -328,9 +257,14 @@ break; #endif +#ifdef CONFIG_DVDREAD + case STREAMTYPE_DVD: + break; +#endif + default: - curr = gtkSet(gtkGetCurrPlItem, 0, NULL); + curr = listSet(gtkGetCurrPlItem, NULL); if (curr) { uiSetFileName(curr->path, curr->name, STREAMTYPE_FILE); @@ -357,38 +291,47 @@ return; switch (guiInfo.StreamType) { -#ifdef CONFIG_DVDREAD - case STREAMTYPE_DVD: - - if (--guiInfo.DVD.current_chapter == 0) { - guiInfo.DVD.current_chapter = 1; - - if (--guiInfo.DVD.current_title <= 0) { - guiInfo.DVD.current_title = 1; - stop = 1; - } +#ifdef CONFIG_CDDA + case STREAMTYPE_CDDA: + if (--guiInfo.Track == 0) { + guiInfo.Track = 1; + stop = 1; } - - guiInfo.Track = guiInfo.DVD.current_title; break; #endif #ifdef CONFIG_VCD case STREAMTYPE_VCD: - if (--guiInfo.Track == 0) { - guiInfo.Track = 1; + if (--guiInfo.Track == 1) { + guiInfo.Track = 2; stop = 1; } break; #endif +#ifdef CONFIG_DVDREAD + case STREAMTYPE_DVD: + + if (--guiInfo.Chapter == 0) { + guiInfo.Chapter = 1; + + if (--guiInfo.Track <= 0) { + guiInfo.Track = 1; + stop = 1; + } + } + + break; +#endif + default: - prev = gtkSet(gtkGetPrevPlItem, 0, NULL); + prev = listSet(gtkGetPrevPlItem, NULL); if (prev) { uiSetFileName(prev->path, prev->name, STREAMTYPE_FILE); uiGotoTheNext = 0; + guiInfo.Track--; break; } @@ -411,32 +354,38 @@ return; switch (guiInfo.StreamType) { -#ifdef CONFIG_DVDREAD - case STREAMTYPE_DVD: - - if (guiInfo.DVD.current_chapter++ == guiInfo.DVD.chapters) { - guiInfo.DVD.current_chapter = 1; +#ifdef CONFIG_CDDA + case STREAMTYPE_CDDA: - if (++guiInfo.DVD.current_title > guiInfo.DVD.titles) { - guiInfo.DVD.current_title = guiInfo.DVD.titles; - stop = 1; - } + if (++guiInfo.Track > guiInfo.Tracks) { + guiInfo.Track = guiInfo.Tracks; + stop = 1; } - guiInfo.Track = guiInfo.DVD.current_title; break; #endif #ifdef CONFIG_VCD case STREAMTYPE_VCD: - if (++guiInfo.Track >= guiInfo.VCDTracks) { - guiInfo.Track = guiInfo.VCDTracks; + if (++guiInfo.Track >= guiInfo.Tracks) { + stop = (guiInfo.Track > guiInfo.Tracks); + guiInfo.Track = FFMAX(2, guiInfo.Tracks); + } + + break; +#endif + +#ifdef CONFIG_DVDREAD + case STREAMTYPE_DVD: - if (guiInfo.VCDTracks > 1) - guiInfo.Track--; + if (guiInfo.Chapter++ == guiInfo.Chapters) { + guiInfo.Chapter = 1; - stop = 1; + if (++guiInfo.Track > guiInfo.Tracks) { + guiInfo.Track = guiInfo.Tracks; + stop = 1; + } } break; @@ -444,11 +393,12 @@ default: - next = gtkSet(gtkGetNextPlItem, 0, NULL); + next = listSet(gtkGetNextPlItem, NULL); if (next) { uiSetFileName(next->path, next->name, STREAMTYPE_FILE); uiGotoTheNext = 0; + guiInfo.Track++; break; } @@ -461,8 +411,3 @@ if (guiInfo.Playing == GUI_PLAY) uiEventHandling(evPlay, 0); } - -void uiStop(void) -{ - uiEventHandling(evStop, 0); -} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/actions.h mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/actions.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/actions.h 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/actions.h 2012-01-02 15:16:55.000000000 +0000 @@ -19,12 +19,15 @@ #ifndef MPLAYER_GUI_ACTIONS_H #define MPLAYER_GUI_ACTIONS_H +#include "stream/stream.h" + +#define SAME_STREAMTYPE (STREAMTYPE_DUMMY - 1) + extern int uiGotoTheNext; void uiAbsSeek(float sec); void uiChangeSkin(char *name); void uiCurr(void); -void uiEnd(void); void uiFullScreen(void); void uiNext(void); void uiPause(void); @@ -33,6 +36,5 @@ void uiRelSeek(float percent); void uiSetFileName(char *dir, char *name, int type); void uiState(void); -void uiStop(void); #endif /* MPLAYER_GUI_ACTIONS_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/about.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/about.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/about.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/about.c 2011-09-02 09:58:55.000000000 +0000 @@ -19,6 +19,7 @@ #include "config.h" #include "gui/app.h" #include "help_mp.h" +#include "version.h" #include "gui/ui/pixmaps/emblem.xpm" #include "gui/ui/widgets.h" @@ -56,6 +57,8 @@ GtkAccelGroup * accel_group; + char title[128]; + accel_group=gtk_accel_group_new(); About=gtk_window_new( GTK_WINDOW_TOPLEVEL ); @@ -102,235 +105,239 @@ gtk_widget_set_name( AboutText,"AboutText" ); gtk_widget_show( AboutText ); gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText ); + snprintf(title, sizeof(title), MP_TITLE, "MPlayer"); #ifdef CONFIG_GTK2 + gtk_text_buffer_insert (AboutTextBuffer, &iter, title, -1); gtk_text_buffer_insert (AboutTextBuffer, &iter, #else + gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, title, -1 ); gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, #endif "\n" MSGTR_ABOUT_UHU - " (http://www.uhulinux.hu/)\n" + " (http://www.uhulinux.hu/)\n" "\n" MSGTR_ABOUT_Contributors "\n" - " * Ackermann, Andreas\n" + " * Andreas Ackermann\n" " * adland\n" - " * Anholt, Eric\n" - " * Ashberg, Folke\n" - " * Balatoni, Dénes\n" - " * Barat, Zsolt\n" - " * Barbato, Luca\n" - " * Baryshkov, Dmitry\n" - " * Baudet, Bertrand\n" - " * Bedel, Alban\n" - " * Behrisch, Michael\n" - " * Belev, Luchezar\n" - " * Bérczi, Gábor\n" - " * Berecz, Szabolcs\n" - " * Beregszászi, Alex\n" - " * Bitterberg, Tilmann\n" - " * Biurrun, Diego\n" - " * Blomenkamp, Marcsu\n" - " * Buehler, Andrew\n" - " * Bulgroz, Eviv\n" - " * Bünemann, Felix\n" - " * Bunkus, Moritz\n" - " * Christiansen, Dan Villiom Podlaski\n" - " * Clagg, Jeff\n" - " * Compn\n" - " * Comstedt, Marcus\n" - " * Cook, Kees\n" - " * Davies, Stephen\n" - " * Di Vita, Piero\n" - " * Diedrich, Tobias\n" - " * Dietrich, Florian\n" - " * Dobbelaere, Jeroen\n" - " * Döffinger, Reimar\n" - " * Dolbeau, Romain\n" - " * Dönmez, Ismail\n" - " * Edele, Robert\n" - " * Egger, Christoph\n" - " * Elsinghorst, Paul Wilhelm\n" - " * Ernesti, Bernd\n" - " * Falco, Salvatore\n" - " * Feigl, Johannes\n" - " * Felker, D Richard III\n" - " * Ferguson, Tim\n" - " * Finlayson, Ross\n" - " * Forghieri, Daniele\n" - " * Foth, Kilian A.\n" - " * Franz, Fabian\n" - " * Gansser, Martin\n" - " * Gereöffy, Árpád\n" - " * Giani, Matteo\n" - " * Goethel, Sven\n" - " * Gomez Garcia, German\n" - " * Gottwald, Alexander\n" - " * Graffam, Michael\n" - " * Gritsenko, Andriy N.\n" - " * Guyomarch, Rémi\n" - " * Hammelmann, Jürgen\n" - " * Hertel, Christopher R.\n" - " * Hess, Andreas\n" - " * Hickey, Corey\n" - " * Hidvégi, Zoltán\n" - " * Hoffmann, Jens\n" - " * Holm, David\n" - " * Horst, Bohdan\n" - " * Hug, Hampa\n" - " * Hurka, Tomas\n" - " * Isani, Sidik\n" - " * Issaris, Panagiotis\n" - " * Jacobs, Aurelien\n" - " * Jelveh, Reza\n" - " * Jermann, Jonas\n" - " * Johansson, Anders\n" - " * Kain, Nicholas\n" - " * Kalinski, Filip\n" - " * Kalvachev, Ivan\n" - " * Kaniewski, Wojtek\n" - " * Kaplan, Kim Minh\n" - " * Kärkkäinen, Samuli\n" - " * Keil, Jürgen\n" - " * Kesterson, Robert\n" - " * Kinali, Attila\n" - " * Kovriga, Gregory\n" - " * Kühling, David\n" - " * Kuivinen, Fredrik\n" - " * Kurshev, Nick\n" - " * Kuschak, Brian\n" - " * Kushnir, Vladimir\n" - " * Lambley, Dave\n" - " * László, Gyula\n" - " * Le Gaillart, Nicolas\n" - " * Lénárt, Gábor\n" - " * Leroy, Colin\n" - " * Liljeblad, Oskar\n" - " * Lin, Sam\n" - " * Lombard, Pierre\n" - " * Madick, Puk\n" - " * Makovicka, Jindrich\n" - " * Marek, Rudolf\n" - " * Megyer, László\n" - " * Melanson, Mike\n" - " * von Merkatz, Arwed\n" - " * Merritt, Loren\n" - " * Mierzejewski, Dominik\n" - " * Milushev, Mihail\n" - " * Mistry, Nehal\n" - " * Mohari, András\n" - " * Mueller, Steven\n" - " * Neundorf, Alexander\n" - " * Niedermayer, Michael\n" - " * Noring, Fredrik\n" - " * Ohm, Christian\n" - " * Parrish, Joey\n" - " * Pietrzak, Dariusz\n" - " * Plourde, Nicolas\n" - " * Poettering, Lennart\n" - " * Poirier, Guillaume\n" - " * Ponekker, Zoltán\n" - " * van Poorten, Ivo\n" - " * Ran, Lu\n" - " * Reder, Uwe\n" + " * Eric Anholt\n" + " * Folke Ashberg\n" + " * Dénes Balatoni\n" + " * Zsolt Barat\n" + " * Luca Barbato\n" + " * Dmitry Baryshkov\n" + " * Bertrand Baudet\n" + " * Alban Bedel\n" + " * Michael Behrisch\n" + " * Luchezar Belev\n" + " * Gábor Bérczi\n" + " * Szabolcs Berecz\n" + " * Alex Beregszászi\n" + " * Tilmann Bitterberg\n" + " * Diego Biurrun\n" + " * Marcsu Blomenkamp\n" + " * Ingo Brückl\n" + " * Andrew Buehler\n" + " * Eviv Bulgroz\n" + " * Felix Bünemann\n" + " * Moritz Bunkus\n" + " * Dan Villiom Podlaski Christiansen\n" + " * Jeff Clagg\n" + " * compn\n" + " * Marcus Comstedt\n" + " * Kees Cook\n" + " * Stephen Davies\n" + " * Piero Di Vita\n" + " * Tobias Diedrich\n" + " * Florian Dietrich\n" + " * Jeroen Dobbelaere\n" + " * Reimar Döffinger\n" + " * Romain Dolbeau\n" + " * Ismail Dönmez\n" + " * Robert Edele\n" + " * Christoph Egger\n" + " * Paul Wilhelm Elsinghorst\n" + " * Bernd Ernesti\n" + " * Salvatore Falco\n" + " * Johannes Feigl\n" + " * D Richard III Felker\n" + " * Tim Ferguson\n" + " * Ross Finlayson\n" + " * Daniele Forghieri\n" + " * Kilian A. Foth\n" + " * Fabian Franz\n" + " * Martin Gansser\n" + " * Árpád Gereöffy\n" + " * Matteo Giani\n" + " * Sven Goethel\n" + " * German Gomez Garcia\n" + " * Alexander Gottwald\n" + " * Michael Graffam\n" + " * Andriy N. Gritsenko\n" + " * Rémi Guyomarch\n" + " * Jürgen Hammelmann\n" + " * Christopher R. Hertel\n" + " * Andreas Hess\n" + " * Corey Hickey\n" + " * Zoltán Hidvégi\n" + " * Jens Hoffmann\n" + " * David Holm\n" + " * Bohdan Horst\n" + " * Hampa Hug\n" + " * Tomas Hurka\n" + " * Sidik Isani\n" + " * Panagiotis Issaris\n" + " * Aurelien Jacobs\n" + " * Reza Jelveh\n" + " * Jonas Jermann\n" + " * Anders Johansson\n" + " * Nicholas Kain\n" + " * Filip Kalinski\n" + " * Ivan Kalvachev\n" + " * Wojtek Kaniewski\n" + " * Kim Minh Kaplan\n" + " * Samuli Kärkkäinen\n" + " * Jürgen Keil\n" + " * Robert Kesterson\n" + " * Attila Kinali\n" + " * Gregory Kovriga\n" + " * David Kühling\n" + " * Fredrik Kuivinen\n" + " * Nick Kurshev\n" + " * Brian Kuschak\n" + " * Vladimir Kushnir\n" + " * Dave Lambley\n" + " * Gyula László\n" + " * Nicolas Le Gaillart\n" + " * Gábor Lénárt\n" + " * Colin Leroy\n" + " * Oskar Liljeblad\n" + " * Sam Lin\n" + " * Pierre Lombard\n" + " * Puk Madick\n" + " * Jindrich Makovicka\n" + " * Rudolf Marek\n" + " * László Megyer\n" + " * Mike Melanson\n" + " * Arwed von Merkatz\n" + " * Loren Merritt\n" + " * Dominik Mierzejewski\n" + " * Mihail Milushev\n" + " * Nehal Mistry\n" + " * András Mohari\n" + " * Steven Mueller\n" + " * Alexander Neundorf\n" + " * Michael Niedermayer\n" + " * Fredrik Noring\n" + " * Christian Ohm\n" + " * Joey Parrish\n" + " * Dariusz Pietrzak\n" + " * Nicolas Plourde\n" + " * Lennart Poettering\n" + " * Guillaume Poirier\n" + " * Zoltán Ponekker\n" + " * Ivo van Poorten\n" + " * Lu Ran\n" + " * Uwe Reder\n" " * rgselk\n" " * Rune Petersen\n" - " * Saari, Ville\n" - " * Sabbi, Nico\n" - " * Sandell, Björn\n" - " * Sauerbeck, Tilman\n" - " * Scherthan, Frank\n" - " * Schneider, Florian\n" - " * Schoenbrunner, Oliver\n" - " * Shimon, Oded\n" - " * Simon, Peter\n" - " * Snel, Rik\n" - " * Sommer, Sascha\n" - " * Strasser, Alexander\n" - " * Strzelecki, Kamil\n" - " * Svoboda, Jiri\n" - " * Swain, Robert\n" - " * Syrjälä, Ville\n" - " * Szecsi, Gabor\n" - " * Tackaberry, Jason\n" - " * Tam, Howell\n" - " * Tlalka, Adam\n" - " * Tiesi, Gianluigi\n" - " * Togni, Roberto\n" - " * Tropea, Salvador Eduardo\n" - " * Vajna, Miklós\n" - " * Verdejo Pinochet, Reynaldo H.\n" - " * Wigren, Per\n" - " * Witt, Derek J\n" - " * Young, Alan\n" - " * Zaprzala, Artur\n" - " * Zealey, Mark\n" - " * Ziv-Av, Matan\n" - " * Zoltán, Márk Vicián\n" + " * Ville Saari\n" + " * Nico Sabbi\n" + " * Björn Sandell\n" + " * Tilman Sauerbeck\n" + " * Frank Scherthan\n" + " * Florian Schneider\n" + " * Oliver Schoenbrunner\n" + " * Oded Shimon\n" + " * Peter Simon\n" + " * Rik Snel\n" + " * Sascha Sommer\n" + " * Alexander Strasser\n" + " * Kamil Strzelecki\n" + " * Jiri Svoboda\n" + " * Robert Swain\n" + " * Ville Syrjälä\n" + " * Gabor Szecsi\n" + " * Jason Tackaberry\n" + " * Howell Tam\n" + " * Adam Tlalka\n" + " * Gianluigi Tiesi\n" + " * Roberto Togni\n" + " * Salvador Eduardo Tropea\n" + " * Miklós Vajna\n" + " * Reynaldo H. Verdejo Pinochet\n" + " * Per Wigren\n" + " * Derek J Witt\n" + " * Alan Young\n" + " * Artur Zaprzala\n" + " * Mark Zealey\n" + " * Matan Ziv-Av\n" + " * Márk Vicián Zoltán\n" "\n" MSGTR_ABOUT_Codecs_libs_contributions "\n" - " * Bellard, Fabrice\n" - " * Chappelier, Vivien and Vincent, Damien\n" - " * Hipp, Michael\n" - " * Holtzman, Aaron\n" - " * Janovetz, Jake\n" - " * Kabelac, Zdenek\n" - " * Kuznetsov, Eugene\n" - " * Lespinasse, Michel\n" - " * Podlipec, Mark\n" + " * Fabrice Bellard\n" + " * Vivien Chappelier\n" + " * Michael Hipp\n" + " * Aaron Holtzman\n" + " * Jake Janovetz\n" + " * Zdenek Kabelac\n" + " * Eugene Kuznetsov\n" + " * Michel Lespinasse\n" + " * Mark Podlipec\n" + " * Damien Vincent\n" "\n" MSGTR_ABOUT_Translations "\n" - " * Biernat, Marcin\n" - " * Fargas, Marc\n" - " * Heryan, Jiri\n" - " * Jarycki, Marek\n" - " * Kaplita, Leszek\n" - " * Krämer, Sebastian\n" - " * López, Juan Martin\n" - " * Michniewski, Piotr\n" - " * Misiorny, Jakub\n" - " * Mizda, Gábor\n" - " * Paszta, Maciej\n" - " * Proszek, Łukasz\n" - " * Schiller, Wacław\n" - " * Zubimendi, Andoni\n" + " * Marcin Biernat\n" + " * Marc Fargas\n" + " * Jiri Heryan\n" + " * Marek Jarycki\n" + " * Leszek Kaplita\n" + " * Sebastian Krämer\n" + " * Juan Martin López\n" + " * Piotr Michniewski\n" + " * Jakub Misiorny\n" + " * Gábor Mizda\n" + " * Maciej Paszta\n" + " * Łukasz Proszek\n" + " * Wacław Schiller\n" + " * Andoni Zubimendi\n" "\n" MSGTR_ABOUT_Skins "\n" " * Azrael\n" - " * Bekesi, Viktor\n" + " * Viktor Bekesi\n" + " * Ingo Brückl\n" + " * Andrew Carpenter\n" + " * Charles Foucault\n" + " * Attila Gyimesi\n" + " * Alban Hertroys\n" + " * Balint Kiss\n" + " * Andre Kuehne\n" + " * Rüdiger Kuhlmann\n" + " * Dan Naumov\n" + " * Ryan Northam\n" + " * Juan Pablo Oyarzun Arroyo\n" + " * DongCheon Park\n" + " * Jurgen Pehrson\n" + " * Nikola Pizurica\n" + " * Oliwier Ptak\n" + " * Pasquale Riccio\n" " * Burt.S.\n" - " * Carpenter, Andrew\n" - " * Foucault, Charles\n" - " * Gyimesi, Attila\n" - " * Hertroys, Alban\n" - " * Juan Pablo\n" - " * Kiss, Balint\n" - " * Kuehne, Andre\n" - " * Kuhlmann, Rüdiger\n" - " * Naumov, Dan\n" - " * Northam, Ryan\n" - " * Oyarzun Arroyo\n" - " * Park, DongCheon\n" - " * Pehrson, Jurgen\n" - " * Pizurica, Nikola\n" - " * Ptak, Oliwier\n" - " * Riccio, Pasquale\n" - " * Schultz, Jesper\n" - " * Szumiela, Marcin\n" - " * Tisi, Massimo\n" - " * Tyr, Jiri jun.\n" - " * Vasilev, Ognian\n" - " * Veres, Imre\n" - " * Vesko, Radic\n" - " * Vigvary, Balasz\n" - " * Weber, Andrew\n" - " * Whitmore, Gary Jr.\n" - " * Wilamowski, Franciszek\n" - " * Zeising, Michael\n" - "\n",-1 ); + " * Jesper Schultz\n" + " * Marcin Szumiela\n" + " * Massimo Tisi\n" + " * Jiri jun. Tyr\n" + " * Ognian Vasilev\n" + " * Imre Veres\n" + " * Radic Vesko\n" + " * Balasz Vigvary\n" + " * Andrew Weber\n" + " * Gary Jr. Whitmore\n" + " * Franciszek Wilamowski\n" + " * Michael Zeising", -1 ); AddHSeparator( vbox ); Ok=AddButton( MSGTR_Ok,AddHButtonBox( vbox ) ); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/equalizer.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/equalizer.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/equalizer.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/equalizer.c 2011-07-09 10:39:33.000000000 +0000 @@ -29,14 +29,18 @@ #include "config.h" #include "gui/app.h" #include "gui/cfg.h" +#include "gui/interface.h" #include "help_mp.h" #include "libaf/equalizer.h" +#include "libavutil/common.h" #include "libvo/video_out.h" #include "stream/stream.h" #include "libmpdemux/demuxer.h" #include "libmpdemux/stheader.h" #include "libmpcodecs/dec_video.h" #include "gui/ui/widgets.h" +#include "gui/util/mem.h" +#include "gui/util/string.h" #include "equalizer.h" #include "tools.h" @@ -105,17 +109,17 @@ str[1]=""; str[0]=MSGTR_EQU_All; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); - if ( guiInfo.AudioType > 1 ) + if ( guiInfo.AudioChannels > 1 ) { str[0]=gtkEquChannel1; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); str[0]=gtkEquChannel2; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); } - if ( guiInfo.AudioType > 2 ) + if ( guiInfo.AudioChannels > 2 ) { str[0]=gtkEquChannel3; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); str[0]=gtkEquChannel4; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); } - if ( guiInfo.AudioType > 4 ) + if ( guiInfo.AudioChannels > 4 ) { str[0]=gtkEquChannel5; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); str[0]=gtkEquChannel6; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str); @@ -197,8 +201,8 @@ { int i; for ( i=0;i<6;i++ ) - { eq.channel=i; gtkSet( gtkSetEqualizer,0,&eq ); } - } else { eq.channel=Channel; gtkSet( gtkSetEqualizer,0,&eq ); } + { eq.channel=i; mplayer( MPLAYER_SET_EQUALIZER,0,&eq ); } + } else { eq.channel=Channel; mplayer( MPLAYER_SET_EQUALIZER,0,&eq ); } return FALSE; } @@ -208,10 +212,10 @@ switch( (int)user_data ) { - case 1: gtkSet( gtkSetContrast,VContrastadj->value,NULL ); break; - case 2: gtkSet( gtkSetBrightness,VBrightnessadj->value,NULL ); break; - case 3: gtkSet( gtkSetHue,VHueadj->value,NULL ); break; - case 4: gtkSet( gtkSetSaturation,VSaturationadj->value,NULL ); break; + case 1: mplayer( MPLAYER_SET_CONTRAST,VContrastadj->value,0 ); break; + case 2: mplayer( MPLAYER_SET_BRIGHTNESS,VBrightnessadj->value,0 ); break; + case 3: mplayer( MPLAYER_SET_HUE,VHueadj->value,0 ); break; + case 4: mplayer( MPLAYER_SET_SATURATION,VSaturationadj->value,0 ); break; } return FALSE; @@ -226,16 +230,16 @@ if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) { if ( !guiInfo.Playing || !gtkEnableAudioEqualizer ) break; - gtkSet( gtkSetEqualizer,0,NULL ); + mplayer( MPLAYER_SET_EQUALIZER,0,NULL ); eqSetBands( Channel ); } else { if ( !guiInfo.Playing ) break; - gtkSet( gtkSetContrast,0.0f,NULL ); - gtkSet( gtkSetBrightness,0.0f,NULL ); - gtkSet( gtkSetHue,0.0f,NULL ); - gtkSet( gtkSetSaturation,0.0f,NULL ); + mplayer( MPLAYER_SET_CONTRAST,0,0 ); + mplayer( MPLAYER_SET_BRIGHTNESS,0,0 ); + mplayer( MPLAYER_SET_HUE,0,0 ); + mplayer( MPLAYER_SET_SATURATION,0,0 ); eqSetBands( Channel ); } break; @@ -254,10 +258,10 @@ eqSetBands( Channel ); if ( Channel == -1 ) { - int i,j; equalizer_t eq; - for ( i=1;i<6;i++ ) - for ( j=0;j<10;j++ ) - { eq.band=j; eq.channel=i; eq.gain=gtkEquChannels[0][j]; gtkSet( gtkSetEqualizer,0,&eq ); } + unsigned int i,j; equalizer_t eq; + for ( i=1;i='a' )&&( name[i] <= 'z' ) ) { tmp[c++]='['; tmp[c++]=name[i]; tmp[c++]=name[i] - 32; tmp[c++]=']'; } @@ -239,14 +245,14 @@ globfree( &gg ); gtk_clist_set_column_width( GTK_CLIST( list ),0,17 ); - gtk_clist_select_row( GTK_CLIST( list ),0,1 ); gtk_widget_show( list ); } void ShowFileSelect( int type,int modal ) { - int i, k; - char * tmp = NULL; + int i, k, fsMedium; + char * tmp = NULL, * dir = NULL; + struct stat f; if ( fsFileSelect ) gtkActive( fsFileSelect ); else fsFileSelect=create_FileSelect(); @@ -274,9 +280,9 @@ gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); g_list_free( fsList_items ); gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsSubtitleFilterNames[k >= 0 ? k : i-2][0] ); - tmp=guiInfo.Subtitlename; + tmp=guiInfo.SubtitleFilename; break; - case fsOtherSelector: +/* case fsOtherSelector: gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_OtherSelect ); fsList_items=NULL; for( i=0;fsOtherFilterNames[i][0];i++ ) @@ -285,7 +291,7 @@ g_list_free( fsList_items ); gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsOtherFilterNames[0][0] ); tmp=guiInfo.Othername; - break; + break;*/ case fsAudioSelector: gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_AudioFileSelect ); fsList_items=NULL; @@ -295,7 +301,7 @@ gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); g_list_free( fsList_items ); gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsAudioFileNames[k >= 0 ? k : i-2][0] ); - tmp=guiInfo.AudioFile; + tmp=guiInfo.AudioFilename; break; case fsFontSelector: gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FontSelect ); @@ -310,10 +316,13 @@ break; } + fsMedium=(fsType == fsVideoSelector || fsType == fsSubtitleSelector || fsType == fsAudioSelector); + + if ( !tmp && fsMedium ) tmp=guiInfo.Filename; + if ( tmp && tmp[0] ) { - struct stat f; - char * dir = strdup( tmp ); + dir = strdup( tmp ); do { @@ -323,28 +332,39 @@ if ( c ) *c=0; } while ( strrchr( dir,'/' ) ); - if ( dir[0] ) chdir( dir ); - - free( dir ); + if ( !dir[0] ) nfree( dir ); } if ( fsTopList_items ) g_list_free( fsTopList_items ); fsTopList_items=NULL; { - int i, c = 1; + unsigned int i, c = 1; + - if ( fsType == fsVideoSelector ) + if ( fsMedium ) { - for ( i=0;i < fsPersistant_MaxPos;i++ ) - if ( fsHistory[i] ) { fsTopList_items=g_list_append( fsTopList_items,fsHistory[i] ); c=0; } + for ( i=0;i < FF_ARRAY_ELEMS(fsHistory);i++ ) + if ( fsHistory[i] ) { fsTopList_items=g_list_append( fsTopList_items,fsHistory[i] ); if ( c ) c=gstrcmp( dir,fsHistory[i] ); } + } + if ( c && dir ) + { + g_free( fsSelectedDirectoryUtf8 ); + fsSelectedDirectoryUtf8=g_filename_to_utf8( dir, -1, NULL, NULL, NULL ); + fsTopList_items=g_list_prepend( fsTopList_items,fsSelectedDirectoryUtf8 ); } - if ( c ) fsTopList_items=g_list_append( fsTopList_items,(gchar *)get_current_dir_name_utf8() ); } + free( dir ); if ( getenv( "HOME" ) ) fsTopList_items=g_list_append( fsTopList_items,getenv( "HOME" ) ); - fsTopList_items=g_list_append( fsTopList_items,"/home" ); - fsTopList_items=g_list_append( fsTopList_items,"/mnt" ); + else fsTopList_items=g_list_append( fsTopList_items,"/home" ); + if (stat( "/media",&f ) == 0) fsTopList_items=g_list_append( fsTopList_items,"/media" ); + if (stat( "/mnt",&f ) == 0) fsTopList_items=g_list_append( fsTopList_items,"/mnt" ); fsTopList_items=g_list_append( fsTopList_items,"/" ); gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items ); + gtk_widget_grab_focus( fsFNameList ); + ((GtkCList *)fsFNameList)->focus_row = fsLastFNameListSelected; + gtk_clist_select_row( GTK_CLIST( fsFNameList ),fsLastFNameListSelected,1 ); + fsLastFNameListSelected = 0; + gtk_window_set_modal( GTK_WINDOW( fsFileSelect ),modal ); gtk_widget_show( fsFileSelect ); @@ -356,22 +376,23 @@ gtk_widget_hide( fsFileSelect ); gtk_widget_destroy( fsFileSelect ); fsFileSelect=NULL; + fsLastFNameListSelected = fsCurrFNameListSelected; } static void fs_PersistantHistory( char * subject ) { - int i; + unsigned int i; if ( fsType != fsVideoSelector ) return; - for ( i=0;i < fsPersistant_MaxPos;i++ ) + for ( i=0;i < FF_ARRAY_ELEMS(fsHistory);i++ ) if ( fsHistory[i] && !strcmp( fsHistory[i],subject ) ) { char * tmp = fsHistory[i]; fsHistory[i]=fsHistory[0]; fsHistory[0]=tmp; return; } - gfree( (void **)&fsHistory[fsPersistant_MaxPos - 1] ); - for ( i=fsPersistant_MaxPos - 1;i;i-- ) fsHistory[i]=fsHistory[i - 1]; + nfree( fsHistory[FF_ARRAY_ELEMS(fsHistory) - 1] ); + for ( i=FF_ARRAY_ELEMS(fsHistory) - 1;i;i-- ) fsHistory[i]=fsHistory[i - 1]; fsHistory[0]=gstrdup( subject ); } //----------------------------------------------- @@ -403,11 +424,11 @@ if( !strcmp( str,fsSubtitleFilterNames[i][0] ) ) { fsFilter=fsSubtitleFilterNames[i][1]; fsLastSubtitleFilterSelected = i; break; } break; - case fsOtherSelector: +/* case fsOtherSelector: for( i=0;fsOtherFilterNames[i][0];i++ ) if( !strcmp( str,fsOtherFilterNames[i][0] ) ) { fsFilter=fsOtherFilterNames[i][1]; break; } - break; + break;*/ case fsAudioSelector: for( i=0;fsAudioFileNames[i][0];i++ ) if( !strcmp( str,fsAudioFileNames[i][0] ) ) @@ -469,6 +490,7 @@ fsSelectedFile=fsThatDir; CheckDir( fsFNameList ); gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),(unsigned char *)get_current_dir_name_utf8() ); + gtk_widget_grab_focus( fsFNameList ); return; } @@ -476,26 +498,23 @@ switch ( fsType ) { case fsVideoSelector: - guiSetDF( guiInfo.Filename,fsSelectedDirectory,fsSelectedFile ); - guiInfo.StreamType=STREAMTYPE_FILE; - guiInfo.FilenameChanged=1; sub_fps=0; - gfree( (void **)&guiInfo.AudioFile ); - gfree( (void **)&guiInfo.Subtitlename ); + uiSetFileName( fsSelectedDirectory,fsSelectedFile,STREAMTYPE_FILE ); + guiInfo.NewPlay=GUI_FILE_NEW; sub_fps=0; fs_PersistantHistory( get_current_dir_name_utf8() ); //totem, write into history break; case fsSubtitleSelector: - guiSetDF( guiInfo.Subtitlename,fsSelectedDirectory,fsSelectedFile ); - guiLoadSubtitle( guiInfo.Subtitlename ); - break; - case fsOtherSelector: - guiSetDF( guiInfo.Othername,fsSelectedDirectory,fsSelectedFile ); + setddup( &guiInfo.SubtitleFilename,fsSelectedDirectory,fsSelectedFile ); + mplayerLoadSubtitle( guiInfo.SubtitleFilename ); break; +/* case fsOtherSelector: + setddup( &guiInfo.Othername,fsSelectedDirectory,fsSelectedFile ); + break;*/ case fsAudioSelector: - guiSetDF( guiInfo.AudioFile,fsSelectedDirectory,fsSelectedFile ); + setddup( &guiInfo.AudioFilename,fsSelectedDirectory,fsSelectedFile ); break; case fsFontSelector: - guiSetDF( font_name,fsSelectedDirectory,fsSelectedFile ); - guiLoadFont(); + setddup( &font_name,fsSelectedDirectory,fsSelectedFile ); + mplayerLoadFont(); if ( Preferences ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),font_name ); break; } @@ -510,7 +529,7 @@ } if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name_utf8() ); if ( uiMainAutoPlay ) { uiMainAutoPlay=0; uiEventHandling( evPlay,0 ); } - else guiGetEvent( guiSetState,(void *) GUI_STOP ); + else gui( GUI_SET_STATE,(void *) GUI_STOP ); } static void fs_Cancel_released( GtkButton * button,gpointer user_data ) @@ -522,6 +541,7 @@ static void fs_fsFNameList_select_row( GtkWidget * widget, gint row, gint column, GdkEventButton *bevent, gpointer user_data) { + fsCurrFNameListSelected = row; gtk_clist_get_text( GTK_CLIST(widget ),row,1,&fsSelectedFile ); g_free( fsSelectedFileUtf8 ); fsSelectedFileUtf8 = g_filename_from_utf8( fsSelectedFile, -1, NULL, NULL, NULL ); @@ -533,18 +553,26 @@ GdkEventKey * event, gpointer user_data ) { - switch ( event->keyval ) - { - case GDK_Escape: - gtk_button_released( GTK_BUTTON( fsCancel ) ); - break; - case GDK_Return: - gtk_button_released( GTK_BUTTON( fsOk ) ); - break; - case GDK_BackSpace: - gtk_button_released( GTK_BUTTON( fsUp ) ); - break; - } + if ( GTK_WIDGET_TYPE( widget ) == GTK_TYPE_BUTTON ) + { + if (event->keyval == GDK_Return) gtk_button_released( GTK_BUTTON( widget ) ); + } + else + { + switch ( event->keyval ) + { + case GDK_Escape: + gtk_button_released( GTK_BUTTON( fsCancel ) ); + break; + case GDK_Return: + gtk_button_released( GTK_BUTTON( fsOk ) ); + break; + case GDK_BackSpace: + gtk_button_released( GTK_BUTTON( fsUp ) ); + gtk_widget_grab_focus( fsFNameList ); + break; + } + } return FALSE; } @@ -579,6 +607,8 @@ { g_free( fsSelectedFileUtf8 ); fsSelectedFileUtf8 = NULL; + g_free( fsSelectedDirectoryUtf8 ); + fsSelectedDirectoryUtf8 = NULL; WidgetDestroy( fsFileSelect, &fsFileSelect ); } @@ -699,12 +729,13 @@ gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsPathCombo_changed ),fsPathCombo ); gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"activate",GTK_SIGNAL_FUNC( fs_fsPathCombo_activate ),fsPathCombo ); gtk_signal_connect( GTK_OBJECT( fsUp ),"released",GTK_SIGNAL_FUNC( fs_Up_released ),fsFNameList ); + gtk_signal_connect( GTK_OBJECT( fsUp ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL ); gtk_signal_connect( GTK_OBJECT( fsOk ),"released",GTK_SIGNAL_FUNC( fs_Ok_released ),fsCombo4 ); + gtk_signal_connect( GTK_OBJECT( fsOk ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL ); gtk_signal_connect( GTK_OBJECT( fsCancel ),"released",GTK_SIGNAL_FUNC( fs_Cancel_released ),NULL ); + gtk_signal_connect( GTK_OBJECT( fsCancel ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL ); gtk_signal_connect( GTK_OBJECT( fsFNameList ),"select_row",(GtkSignalFunc)fs_fsFNameList_select_row,NULL ); gtk_signal_connect( GTK_OBJECT( fsFNameList ),"event", (GtkSignalFunc)fs_fsFNameList_event,NULL ); - gtk_widget_grab_focus( fsFNameList ); - return fsFileSelect; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/fileselect.h mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/fileselect.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/fileselect.h 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/fileselect.h 2011-07-10 12:11:03.000000000 +0000 @@ -23,7 +23,7 @@ #define fsVideoSelector 0 #define fsSubtitleSelector 1 -#define fsOtherSelector 2 +//#define fsOtherSelector 2 #define fsAudioSelector 3 #define fsFontSelector 4 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/menu.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/menu.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/menu.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/menu.c 2012-01-05 13:55:03.000000000 +0000 @@ -30,6 +30,7 @@ #include "gui/ui/widgets.h" #include "gui/ui/gmplayer.h" #include "gui/app.h" +#include "gui/interface.h" #include "stream/stream.h" #include "libmpdemux/demuxer.h" @@ -65,6 +66,14 @@ #include "gui/ui/pixmaps/empty.xpm" #include "gui/ui/pixmaps/loadeaf.xpm" #include "gui/ui/pixmaps/title.xpm" +#ifdef CONFIG_CDDA +#include "gui/ui/pixmaps/cd.xpm" +#include "gui/ui/pixmaps/playcd.xpm" +#endif +#ifdef CONFIG_VCD +#include "gui/ui/pixmaps/vcd.xpm" +#include "gui/ui/pixmaps/playvcd.xpm" +#endif #ifdef CONFIG_DVDREAD #include "gui/ui/pixmaps/dvd.xpm" #include "gui/ui/pixmaps/playdvd.xpm" @@ -72,12 +81,8 @@ #include "gui/ui/pixmaps/dolby.xpm" #include "gui/ui/pixmaps/audiolang.xpm" #include "gui/ui/pixmaps/sublang.xpm" -#include "gui/ui/pixmaps/empty1px.xpm" -#endif -#ifdef CONFIG_VCD -#include "gui/ui/pixmaps/vcd.xpm" -#include "gui/ui/pixmaps/playvcd.xpm" #endif +#include "gui/ui/pixmaps/empty1px.xpm" static void ActivateMenuItem( int Item ) { @@ -403,6 +408,8 @@ GtkWidget * AspectMenu; GtkWidget * VCDSubMenu; GtkWidget * VCDTitleMenu; +GtkWidget * CDSubMenu; +GtkWidget * CDTitleMenu; GtkWidget * create_PopUpMenu( void ) { @@ -411,6 +418,7 @@ GtkWidget * SubMenu = NULL; GtkWidget * MenuItem = NULL; GtkWidget * H, * N, * D, * F; + demuxer_t *demuxer = mpctx_get_demuxer(guiInfo.mpcontext); mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext); int global_sub_size = mpctx_get_global_sub_size(guiInfo.mpcontext); @@ -423,129 +431,147 @@ AddSeparator( Menu ); SubMenu=AddSubMenu( window1, (const char*)open_xpm, Menu,MSGTR_MENU_Open ); AddMenuItem( window1, (const char*)file2_xpm, SubMenu,MSGTR_MENU_PlayFile" ", evLoadPlay ); -#ifdef CONFIG_VCD - AddMenuItem( window1, (const char*)playvcd_xpm, SubMenu,MSGTR_MENU_PlayVCD, evPlayVCD ); -#endif -#ifdef CONFIG_DVDREAD - AddMenuItem( window1, (const char*)playdvd_xpm, SubMenu,MSGTR_MENU_PlayDVD, evPlayDVD ); +#ifdef CONFIG_CDDA + AddMenuItem( window1, (const char*)playcd_xpm, SubMenu,MSGTR_MENU_PlayCD, evPlayCD ); + CDSubMenu=AddSubMenu( window1, (const char*)cd_xpm, Menu,MSGTR_MENU_CD ); + AddMenuItem( window1, (const char*)playcd_xpm, CDSubMenu,MSGTR_MENU_PlayDisc,evPlayCD ); + AddSeparator( CDSubMenu ); + CDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, CDSubMenu,MSGTR_MENU_Titles ); + if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_CDDA ) ) + { + char tmp[32]; int i; + for ( i=1;i <= guiInfo.Tracks;i++ ) + { + snprintf( tmp,32,MSGTR_MENU_Title,i ); + //AddMenuItem( CDTitleMenu,tmp,( i << 16 ) + ivSetCDTrack ); + AddMenuCheckItem(window1, (const char*)empty1px_xpm, CDTitleMenu,tmp, guiInfo.Track == i, ( i << 16 ) + ivSetCDTrack ); + } + } + else + { + MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, CDTitleMenu,MSGTR_MENU_None,evNone ); + gtk_widget_set_sensitive( MenuItem,FALSE ); + } #endif - AddMenuItem( window1, (const char*)url_xpm, SubMenu,MSGTR_MENU_PlayURL, evSetURL ); - AddMenuItem( window1, (const char*)sub_xpm, SubMenu,MSGTR_MENU_LoadSubtitle" ", evLoadSubtitle ); - AddMenuItem( window1, (const char*)nosub_xpm, SubMenu,MSGTR_MENU_DropSubtitle,evDropSubtitle ); - AddMenuItem( window1, (const char*)loadeaf_xpm, SubMenu,MSGTR_MENU_LoadExternAudioFile, evLoadAudioFile ); - SubMenu=AddSubMenu(window1, (const char*)play_xpm, Menu,MSGTR_MENU_Playing ); - AddMenuItem( window1, (const char*)play_xpm, SubMenu,MSGTR_MENU_Play" ", evPlay ); - AddMenuItem( window1, (const char*)pause_xpm, SubMenu,MSGTR_MENU_Pause, evPause ); - AddMenuItem( window1, (const char*)stop_xpm, SubMenu,MSGTR_MENU_Stop, evStop ); - AddMenuItem( window1, (const char*)next_xpm, SubMenu,MSGTR_MENU_NextStream, evNext ); - AddMenuItem( window1, (const char*)prev_xpm, SubMenu,MSGTR_MENU_PrevStream, evPrev ); -// AddSeparator( SubMenu ); -// AddMenuItem( SubMenu,"Back 10 sec", evBackward10sec ); -// AddMenuItem( SubMenu,"Fwd 10 sec", evForward10sec ); -// AddMenuItem( SubMenu,"Back 1 min", evBackward1min ); -// AddMenuItem( SubMenu,"Fwd 1 min", evForward1min ); -// SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size ); -// AddMenuItem( SubMenu,MSGTR_MENU_NormalSize" ", evNormalSize ); -// AddMenuItem( SubMenu,MSGTR_MENU_DoubleSize, evDoubleSize ); -// AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen ); #ifdef CONFIG_VCD - VCDSubMenu=AddSubMenu( window1, (const char*)vcd_xpm, Menu,MSGTR_MENU_VCD ); + AddMenuItem( window1, (const char*)playvcd_xpm, SubMenu,MSGTR_MENU_PlayVCD, evPlayVCD ); + VCDSubMenu=AddSubMenu( window1, (const char*)vcd_xpm, Menu,MSGTR_MENU_VCD ); AddMenuItem( window1, (const char*)playvcd_xpm, VCDSubMenu,MSGTR_MENU_PlayDisc,evPlayVCD ); AddSeparator( VCDSubMenu ); VCDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, VCDSubMenu,MSGTR_MENU_Titles ); - if ( guiInfo.VCDTracks ) + if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_VCD ) ) { char tmp[32]; int i; - for ( i=1;i < guiInfo.VCDTracks;i++ ) + for ( i=1;i < guiInfo.Tracks;i++ ) { snprintf( tmp,32,MSGTR_MENU_Title,i ); - //AddMenuItem( VCDTitleMenu,tmp,( i << 16 ) + evSetVCDTrack ); - AddMenuItem(window1, (const char*)empty_xpm, VCDTitleMenu,tmp,( i << 16 ) + evSetVCDTrack ); + //AddMenuItem( VCDTitleMenu,tmp,( i << 16 ) + ivSetVCDTrack ); + AddMenuCheckItem(window1, (const char*)empty1px_xpm, VCDTitleMenu,tmp, guiInfo.Track == i + 1, ( ( i + 1 ) << 16 ) + ivSetVCDTrack ); } } else { - MenuItem=AddMenuItem( window1, (const char*)empty_xpm, VCDTitleMenu,MSGTR_MENU_None,evNone ); + MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, VCDTitleMenu,MSGTR_MENU_None,evNone ); gtk_widget_set_sensitive( MenuItem,FALSE ); } #endif #ifdef CONFIG_DVDREAD - DVDSubMenu=AddSubMenu( window1, (const char*)dvd_xpm, Menu,MSGTR_MENU_DVD ); + AddMenuItem( window1, (const char*)playdvd_xpm, SubMenu,MSGTR_MENU_PlayDVD, evPlayDVD ); + DVDSubMenu=AddSubMenu( window1, (const char*)dvd_xpm, Menu,MSGTR_MENU_DVD ); AddMenuItem( window1, (const char*)playdvd_xpm, DVDSubMenu,MSGTR_MENU_PlayDisc" ", evPlayDVD ); // AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone ); AddSeparator( DVDSubMenu ); DVDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, DVDSubMenu,MSGTR_MENU_Titles ); - if ( guiInfo.DVD.titles ) + if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) { char tmp[32]; int i; - for ( i=1 ; i<= guiInfo.DVD.titles;i++ ) + for ( i=1 ; i<= guiInfo.Tracks;i++ ) { snprintf( tmp,32,MSGTR_MENU_Title,i); AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,tmp, - guiInfo.DVD.current_title == i, - (i << 16) + evSetDVDTitle ); + guiInfo.Track == i, + (i << 16) + ivSetDVDTitle ); } } else { - MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDTitleMenu,MSGTR_MENU_None,evNone ); + MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,MSGTR_MENU_None,evNone ); gtk_widget_set_sensitive( MenuItem,FALSE ); } DVDChapterMenu=AddSubMenu( window1, (const char*)chapter_xpm, DVDSubMenu,MSGTR_MENU_Chapters ); - if ( guiInfo.DVD.chapters ) + if ( guiInfo.Chapters && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) { char tmp[32]; int i; - for ( i=1;i <= guiInfo.DVD.chapters;i++ ) + for ( i=1;i <= guiInfo.Chapters;i++ ) { snprintf( tmp,32,MSGTR_MENU_Chapter,i ); - AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiInfo.DVD.current_chapter == i, - ( i << 16 ) + evSetDVDChapter ); + AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiInfo.Chapter == i, + ( i << 16 ) + ivSetDVDChapter ); } } else { - MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDChapterMenu,MSGTR_MENU_None,evNone ); + MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,MSGTR_MENU_None,evNone ); gtk_widget_set_sensitive( MenuItem,FALSE ); } DVDAudioLanguageMenu=AddSubMenu( window1, (const char*)audiolang_xpm, DVDSubMenu,MSGTR_MENU_AudioLanguages ); - if ( guiInfo.DVD.nr_of_audio_channels ) + if ( guiInfo.AudioStreams && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) { - char tmp[64]; int i, id = guiInfo.demuxer ? ((demuxer_t *)guiInfo.demuxer)->audio->id : audio_id; - for ( i=0;i < guiInfo.DVD.nr_of_audio_channels;i++ ) + char tmp[64]; int i, id = demuxer ? demuxer->audio->id : audio_id; + for ( i=0;i < guiInfo.AudioStreams;i++ ) { - snprintf( tmp,64,"%s - %s %s",GetLanguage( guiInfo.DVD.audio_streams[i].language ), - ChannelTypes[ guiInfo.DVD.audio_streams[i].type ], - ChannelNumbers[ guiInfo.DVD.audio_streams[i].channels ] ); -// if ( id == -1 ) id=audio_id; //guiInfo.DVD.audio_streams[i].id; + snprintf( tmp,64,"%s - %s %s",GetLanguage( guiInfo.AudioStream[i].language ), + ChannelTypes[ guiInfo.AudioStream[i].type ], + ChannelNumbers[ guiInfo.AudioStream[i].channels ] ); +// if ( id == -1 ) id=audio_id; //guiInfo.AudioStream[i].id; AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp, - id == guiInfo.DVD.audio_streams[i].id, - ( guiInfo.DVD.audio_streams[i].id << 16 ) + evSetDVDAudio ); + id == guiInfo.AudioStream[i].id, + ( guiInfo.AudioStream[i].id << 16 ) + ivSetDVDAudio ); } } else { - MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDAudioLanguageMenu,MSGTR_MENU_None,evNone ); + MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDAudioLanguageMenu,MSGTR_MENU_None,evNone ); gtk_widget_set_sensitive( MenuItem,FALSE ); } DVDSubtitleLanguageMenu=AddSubMenu( window1, (const char*)sublang_xpm, DVDSubMenu,MSGTR_MENU_SubtitleLanguages ); - if ( guiInfo.DVD.nr_of_subtitles ) + if ( guiInfo.Subtitles && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) { char tmp[64]; int i; - AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,( (unsigned short)-1 << 16 ) + evSetDVDSubtitle ); - for ( i=0;i < guiInfo.DVD.nr_of_subtitles;i++ ) + AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,( (unsigned short)-1 << 16 ) + ivSetDVDSubtitle ); + for ( i=0;i < guiInfo.Subtitles;i++ ) { - av_strlcpy( tmp,GetLanguage( guiInfo.DVD.subtitles[i].language ),sizeof(tmp) ); + av_strlcpy( tmp,GetLanguage( guiInfo.Subtitle[i].language ),sizeof(tmp) ); AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp, - dvdsub_id == guiInfo.DVD.subtitles[i].id, - ( guiInfo.DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle ); + dvdsub_id == guiInfo.Subtitle[i].id, + ( guiInfo.Subtitle[i].id << 16 ) + ivSetDVDSubtitle ); } } else { - MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,evNone ); + MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,evNone ); gtk_widget_set_sensitive( MenuItem,FALSE ); } #endif + AddMenuItem( window1, (const char*)url_xpm, SubMenu,MSGTR_MENU_PlayURL, evLoadURL ); + AddMenuItem( window1, (const char*)sub_xpm, SubMenu,MSGTR_MENU_LoadSubtitle" ", evLoadSubtitle ); + AddMenuItem( window1, (const char*)nosub_xpm, SubMenu,MSGTR_MENU_DropSubtitle,evDropSubtitle ); + AddMenuItem( window1, (const char*)loadeaf_xpm, SubMenu,MSGTR_MENU_LoadExternAudioFile, evLoadAudioFile ); + SubMenu=AddSubMenu(window1, (const char*)play_xpm, Menu,MSGTR_MENU_Playing ); + AddMenuItem( window1, (const char*)play_xpm, SubMenu,MSGTR_MENU_Play" ", evPlay ); + AddMenuItem( window1, (const char*)pause_xpm, SubMenu,MSGTR_MENU_Pause, evPause ); + AddMenuItem( window1, (const char*)stop_xpm, SubMenu,MSGTR_MENU_Stop, evStop ); + AddMenuItem( window1, (const char*)next_xpm, SubMenu,MSGTR_MENU_NextStream, evNext ); + AddMenuItem( window1, (const char*)prev_xpm, SubMenu,MSGTR_MENU_PrevStream, evPrev ); +// AddSeparator( SubMenu ); +// AddMenuItem( SubMenu,"Back 10 sec", evBackward10sec ); +// AddMenuItem( SubMenu,"Fwd 10 sec", evForward10sec ); +// AddMenuItem( SubMenu,"Back 1 min", evBackward1min ); +// AddMenuItem( SubMenu,"Fwd 1 min", evForward1min ); +// SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size ); +// AddMenuItem( SubMenu,MSGTR_MENU_NormalSize" ", evNormalSize ); +// AddMenuItem( SubMenu,MSGTR_MENU_DoubleSize, evDoubleSize ); +// AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen ); // if ( guiInfo.Playing ) { @@ -556,39 +582,39 @@ AddMenuItem( window1, (const char*)aspect235_xpm, AspectMenu,"2.35",( 4 << 16 ) + evSetAspect ); } - if ( guiInfo.Playing && guiInfo.demuxer && guiInfo.StreamType != STREAMTYPE_DVD ) + if ( guiInfo.Playing && demuxer && guiInfo.StreamType != STREAMTYPE_DVD ) { int i,c = 0; for ( i=0;i < MAX_A_STREAMS;i++ ) - if ( ((demuxer_t *)guiInfo.demuxer)->a_streams[i] ) c++; + if ( demuxer->a_streams[i] ) c++; if ( c > 1 ) { SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_AudioTrack ); for ( i=0;i < MAX_A_STREAMS;i++ ) - if ( ((demuxer_t *)guiInfo.demuxer)->a_streams[i] ) + if ( demuxer->a_streams[i] ) { - int aid = ((sh_audio_t *)((demuxer_t *)guiInfo.demuxer)->a_streams[i])->aid; + int aid = ((sh_audio_t *)demuxer->a_streams[i])->aid; char tmp[32]; snprintf( tmp,32,MSGTR_MENU_Track,aid ); - AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( aid << 16 ) + evSetAudio ); + AddMenuItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,( aid << 16 ) + ivSetAudio ); } } for ( c=0,i=0;i < MAX_V_STREAMS;i++ ) - if ( ((demuxer_t *)guiInfo.demuxer)->v_streams[i] ) c++; + if ( demuxer->v_streams[i] ) c++; if ( c > 1 ) { SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_VideoTrack ); for ( i=0;i < MAX_V_STREAMS;i++ ) - if ( ((demuxer_t *)guiInfo.demuxer)->v_streams[i] ) + if ( demuxer->v_streams[i] ) { - int vid = ((sh_video_t *)((demuxer_t *)guiInfo.demuxer)->v_streams[i])->vid; + int vid = ((sh_video_t *)demuxer->v_streams[i])->vid; char tmp[32]; snprintf( tmp,32,MSGTR_MENU_Track,vid ); - AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( vid << 16 ) + evSetVideo ); + AddMenuItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,( vid << 16 ) + ivSetVideo ); } } } @@ -598,40 +624,39 @@ { int i; SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu, MSGTR_MENU_Subtitles ); - AddMenuItem( window1, (const char*)empty_xpm, SubMenu, MSGTR_MENU_None, (-1 << 16) + evSetSubtitle ); for ( i=0;i < global_sub_size;i++ ) { char tmp[32]; snprintf( tmp, 32, MSGTR_MENU_Track, i ); - AddMenuItem( window1,(const char*)empty_xpm,SubMenu,tmp,( i << 16 ) + evSetSubtitle ); + AddMenuItem( window1,(const char*)empty1px_xpm,SubMenu,tmp,( i << 16 ) + ivSetSubtitle ); } } AddSeparator( Menu ); MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_MENU_Mute,mixer->muted,evMute ); - if ( !guiInfo.AudioType ) gtk_widget_set_sensitive( MenuItem,FALSE ); - AddMenuItem( window1, (const char*)playlist_xpm, Menu,MSGTR_MENU_PlayList, evPlayList ); + if ( !guiInfo.AudioChannels ) gtk_widget_set_sensitive( MenuItem,FALSE ); + AddMenuItem( window1, (const char*)playlist_xpm, Menu,MSGTR_MENU_PlayList, evPlaylist ); AddMenuItem( window1, (const char*)skin_xpm, Menu,MSGTR_MENU_SkinBrowser, evSkinBrowser ); AddMenuItem( window1, (const char*)prefs_xpm, Menu,MSGTR_MENU_Preferences, evPreferences ); AddMenuItem( window1, (const char*)equalizer_xpm, Menu,MSGTR_Equalizer, evEqualizer ); - if ( guiInfo.NoWindow == False ) + if ( guiInfo.VideoWindow ) { int b1 = 0, b2 = 0, b_half = 0; AddSeparator( Menu ); if ( !guiApp.subWindow.isFullScreen && guiInfo.Playing ) { - if ( ( guiApp.subWindow.Width == guiInfo.MovieWidth * 2 )&& - ( guiApp.subWindow.Height == guiInfo.MovieHeight * 2 ) ) b2=1; - else if ( ( guiApp.subWindow.Width == guiInfo.MovieWidth / 2 ) && - ( guiApp.subWindow.Height == guiInfo.MovieHeight / 2 ) ) b_half=1; + if ( ( guiApp.subWindow.Width == guiInfo.VideoWidth * 2 )&& + ( guiApp.subWindow.Height == guiInfo.VideoHeight * 2 ) ) b2=1; + else if ( ( guiApp.subWindow.Width == guiInfo.VideoWidth / 2 ) && + ( guiApp.subWindow.Height == guiInfo.VideoHeight / 2 ) ) b_half=1; else b1=1; } else b1=!guiApp.subWindow.isFullScreen; H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize ); N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_MENU_NormalSize" ",b1,evNormalSize ); D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize ); F=AddMenuCheckItem( window1, (const char*)full_xpm, Menu,MSGTR_MENU_FullScreen,guiApp.subWindow.isFullScreen,evFullScreen ); - if ( !gtkShowVideoWindow && !guiInfo.Playing ) + if ( !guiInfo.Playing ) { gtk_widget_set_sensitive( H,FALSE ); gtk_widget_set_sensitive( N,FALSE ); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/msgbox.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/msgbox.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/msgbox.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/msgbox.c 2011-07-07 08:48:46.000000000 +0000 @@ -16,6 +16,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include + #include "config.h" #include "gui/app.h" #include "help_mp.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/playlist.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/playlist.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/playlist.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/playlist.c 2011-12-11 17:51:24.000000000 +0000 @@ -31,8 +31,10 @@ #include "help_mp.h" #include "stream/stream.h" -#include "gui/interface.h" +#include "gui/cfg.h" #include "gui/ui/widgets.h" +#include "gui/util/list.h" +#include "gui/util/mem.h" #include "playlist.h" #include "tools.h" @@ -156,7 +158,7 @@ { if ( !PlayList ) return; NrOfSelected=NrOfEntrys=0; - gfree( (void **)&CLListSelected ); gfree( (void **)&CLFileSelected ); + nfree( CLListSelected ); nfree( CLFileSelected ); free( old_path ); old_path=strdup( current_path ); gtk_widget_hide( PlayList ); @@ -189,7 +191,7 @@ case 1: // ok { int i; - if ( plList ) gtkSet( gtkDelPl,0,NULL ); + if ( plList ) listSet( gtkDelPl,NULL ); for ( i=0;iname ) item->name = strdup( text[0] ); item->path=g_filename_from_utf8( text[1], -1, NULL, NULL, NULL ); if ( !item->path ) item->path = strdup( text[1] ); - gtkSet( gtkAddPlItem,0,(void*)item ); + listSet( gtkAddPlItem,item ); } if ( plCurrent ) { uiSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE ); -// guiSetDF( guiInfo.Filename,plCurrent->path,plCurrent->name ); -// guiInfo.FilenameChanged=1; +// setddup( &guiInfo.Filename,plCurrent->path,plCurrent->name ); +// guiInfo.NewPlay=GUI_FILE_NEW; // guiInfo.StreamType=STREAMTYPE_FILE; } } @@ -273,6 +275,29 @@ } } +static gboolean plKeyReleased( GtkWidget * widget, + GdkEventKey * event, + gpointer user_data ) +{ + if (event->keyval == GDK_Return) + { + if ( GTK_WIDGET_TYPE( widget ) == GTK_TYPE_BUTTON ) plButtonReleased( NULL, user_data ); + else + { + switch ( (int) user_data ) + { + case 0: + plButtonReleased( NULL, (void *) 3 ); + break; + case 1: + plButtonReleased( NULL, (void *) 2 ); + break; + } + } + } + return FALSE; +} + static gboolean plEvent ( GtkWidget * widget, GdkEvent * event, gpointer user_data ) @@ -487,11 +512,13 @@ gtk_ctree_expand( GTK_CTREE( CTDirTree ),parent ); gtk_widget_show( CTDirTree ); - old_path = fsHistory[0]; + if ( fsHistory[0] ) old_path = g_filename_from_utf8( fsHistory[0], -1, NULL, NULL, NULL ); gtk_clist_set_column_widget( GTK_CLIST( CTDirTree ),0, AddLabel( MSGTR_PLAYLIST_DirectoryTree,NULL ) ); + gtk_clist_column_title_passive( GTK_CLIST( CTDirTree ),0 ); + vbox2=AddVBox( AddFrame( NULL,1,hbox1,1 ),0 ); @@ -511,6 +538,8 @@ gtk_clist_set_column_widget( GTK_CLIST( CLFiles ),0, AddLabel( MSGTR_PLAYLIST_Files,NULL ) ); + gtk_clist_column_title_passive( GTK_CLIST( CLFiles ),0 ); + AddHSeparator( vbox2 ); scrolledwindow3=gtk_scrolled_window_new( NULL,NULL ); @@ -533,6 +562,8 @@ gtk_clist_set_column_widget( GTK_CLIST( CLSelected ),1, AddLabel( MSGTR_PLAYLIST_Path,NULL ) ); + gtk_clist_column_title_passive( GTK_CLIST( CLSelected ),0 ); + AddHSeparator( vbox1 ); hbuttonbox1=AddHButtonBox( vbox1 ); @@ -551,14 +582,20 @@ gtk_signal_connect( GTK_OBJECT( CLFiles ),"select_row",GTK_SIGNAL_FUNC( plRowSelect ),(void *)0 ); gtk_signal_connect( GTK_OBJECT( CLFiles ),"unselect_row",GTK_SIGNAL_FUNC( plUnRowSelect ),(void *)0 ); gtk_signal_connect( GTK_OBJECT( CLFiles ),"event",GTK_SIGNAL_FUNC( plEvent ),(void *)0 ); + gtk_signal_connect( GTK_OBJECT( CLFiles ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void *)0 ); sigSel=gtk_signal_connect( GTK_OBJECT( CLSelected ),"select_row",GTK_SIGNAL_FUNC( plRowSelect ),(void*)1 ); sigUnsel=gtk_signal_connect( GTK_OBJECT( CLSelected ),"unselect_row",GTK_SIGNAL_FUNC( plUnRowSelect ),(void*)1 ); sigEvent=gtk_signal_connect( GTK_OBJECT( CLSelected ),"event",GTK_SIGNAL_FUNC( plEvent ),(void *)1 ); + gtk_signal_connect( GTK_OBJECT( CLSelected ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void *)1 ); - gtk_signal_connect( GTK_OBJECT( Add ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)3 ); - gtk_signal_connect( GTK_OBJECT( Remove ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)2 ); - gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)1 ); - gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)0 ); + gtk_signal_connect( GTK_OBJECT( Add ),"released",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)3 ); + gtk_signal_connect( GTK_OBJECT( Add ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void*)3 ); + gtk_signal_connect( GTK_OBJECT( Remove ),"released",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)2 ); + gtk_signal_connect( GTK_OBJECT( Remove ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void*)2 ); + gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)1 ); + gtk_signal_connect( GTK_OBJECT( Ok ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void*)1 ); + gtk_signal_connect( GTK_OBJECT( Cancel ),"released",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)0 ); + gtk_signal_connect( GTK_OBJECT( Cancel ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void*)0 ); gtk_window_add_accel_group( GTK_WINDOW( PlayList ),accel_group ); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/preferences.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/preferences.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/preferences.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/preferences.c 2011-08-31 17:45:02.000000000 +0000 @@ -44,6 +44,9 @@ #include "gui/interface.h" #include "gui/ui/gmplayer.h" #include "gui/ui/widgets.h" +#include "gui/util/list.h" +#include "gui/util/mem.h" +#include "gui/util/string.h" #include "preferences.h" #include "fileselect.h" #include "tools.h" @@ -111,8 +114,8 @@ static GtkAdjustment * SBAutoSyncadj; static GtkWidget * RBOSDNone; -static GtkWidget * RBOSDTandP; static GtkWidget * RBOSDIndicator; +static GtkWidget * RBOSDTandP; static GtkWidget * RBOSDTPTT; static GtkWidget * HSAudioDelay; @@ -174,8 +177,6 @@ { "cp874", MSGTR_PREFERENCES_FontEncoding20 }, { NULL,NULL } }; -char * lCEncoding = NULL; -char * lSEncoding = NULL; #endif static int old_audio_driver = 0; @@ -312,7 +313,7 @@ case 3: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ),TRUE ); break; } #if 0 - if ( guiInfo.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiInfo.Subtitlename ); + if ( guiInfo.SubtitleFilename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiInfo.SubtitleFilename ); #endif #ifdef CONFIG_ICONV @@ -320,9 +321,8 @@ { int i; for ( i=0;lEncoding[i].name;i++ ) - if ( !gstrcmp( sub_cp,lEncoding[i].name ) ) break; - if ( lEncoding[i].name ) lSEncoding=lEncoding[i].comment; - gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),lSEncoding ); + if ( !gstrcasecmp( sub_cp,lEncoding[i].name ) ) break; + if ( lEncoding[i].name ) gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),lEncoding[i].comment ); } #endif @@ -340,9 +340,8 @@ { int i; for ( i=0;lEncoding[i].name;i++ ) - if ( !gstrcmp( subtitle_font_encoding,lEncoding[i].name ) ) break; - if ( lEncoding[i].name ) lCEncoding=lEncoding[i].comment; - gtk_entry_set_text( GTK_ENTRY( EFontEncoding ),lCEncoding ); + if ( !gstrcasecmp( subtitle_font_encoding,lEncoding[i].name ) ) break; + if ( lEncoding[i].name ) gtk_entry_set_text( GTK_ENTRY( EFontEncoding ),lEncoding[i].comment ); } switch ( subtitle_autoscale ) { @@ -393,11 +392,6 @@ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ),gtkLoadFullscreen ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSaveWinPos ),gui_save_pos ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ),gtkShowVideoWindow ); - if ( !gtkShowVideoWindow ) - { - gtk_widget_set_sensitive( CBLoadFullscreen,FALSE ); - gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ),0 ); - } gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ),stop_xscreensaver ); gtk_adjustment_set_value( HSPPQualityadj,auto_quality ); @@ -509,7 +503,7 @@ comment=gtk_entry_get_text( GTK_ENTRY( EFontEncoding ) ); for ( i=0;lEncoding[i].name;i++ ) if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; - if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name ); + if ( lEncoding[i].comment ) mplayer( MPLAYER_SET_FONT_ENCODING,0,lEncoding[i].name ); break; #endif #ifdef CONFIG_ICONV @@ -517,8 +511,8 @@ comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) ); for ( i=0;lEncoding[i].name;i++ ) if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; - if ( lEncoding[i].comment ) gtkSet( gtkSetSubEncoding,0,lEncoding[i].name ); - else gtkSet( gtkSetSubEncoding,0,NULL ); + if ( lEncoding[i].comment ) mplayer( MPLAYER_SET_SUB_ENCODING,0,lEncoding[i].name ); + else mplayer( MPLAYER_SET_SUB_ENCODING,0,NULL ); break; #endif } @@ -542,7 +536,7 @@ gtkAOExtraStereo=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ); gtkAONorm=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNormalize ) ); soft_vol=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSoftwareMixer ) ); - gtkSet( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL ); + mplayer( MPLAYER_SET_EXTRA_STEREO,HSExtraStereoMuladj->value,0 ); audio_delay=HSAudioDelayadj->value; gaddlist( &audio_driver_list,ao_driver[0] ); @@ -583,18 +577,18 @@ // --- 4. page - guiSetFilename( font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) ); + setdup( &font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) ); #ifndef CONFIG_FREETYPE - gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL ); + mplayer( MPLAYER_SET_FONT_FACTOR,HSFontFactoradj->value,0 ); #else - gtkSet( gtkSetFontBlur,HSFontBluradj->value,NULL ); - gtkSet( gtkSetFontOutLine,HSFontOutLineadj->value,NULL ); - gtkSet( gtkSetFontTextScale,HSFontTextScaleadj->value,NULL ); - gtkSet( gtkSetFontOSDScale,HSFontOSDScaleadj->value,NULL ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ) ) ) gtkSet( gtkSetFontAutoScale,0,NULL ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ) ) ) gtkSet( gtkSetFontAutoScale,1,NULL ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ) ) ) gtkSet( gtkSetFontAutoScale,2,NULL ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ) ) ) gtkSet( gtkSetFontAutoScale,3,NULL ); + mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 ); + mplayer( MPLAYER_SET_FONT_OUTLINE,HSFontOutLineadj->value,0 ); + mplayer( MPLAYER_SET_FONT_TEXTSCALE,HSFontTextScaleadj->value,0 ); + mplayer( MPLAYER_SET_FONT_OSDSCALE,HSFontOSDScaleadj->value,0 ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,0,0 ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,1,0 ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,2,0 ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,3,0 ); #endif // -- 5. page @@ -626,7 +620,7 @@ stop_xscreensaver=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ) ); gtkEnablePlayBar=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPlayBar ) ); player_idle_mode=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoIdle ) ); - gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL ); + mplayer( MPLAYER_SET_AUTO_QUALITY,HSPPQualityadj->value,0 ); if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) { gtkCacheSize=(int)SBCacheadj->value; gtkCacheOn=1; } else gtkCacheOn=0; @@ -634,8 +628,8 @@ if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) { gtkAutoSync=(int)SBAutoSyncadj->value; gtkAutoSyncOn=1; } else gtkAutoSyncOn=0; - guiSetFilename( dvd_device,gtk_entry_get_text( GTK_ENTRY( prEDVDDevice ) ) ); - guiSetFilename( cdrom_device,gtk_entry_get_text( GTK_ENTRY( prECDRomDevice ) ) ); + setdup( &dvd_device,gtk_entry_get_text( GTK_ENTRY( prEDVDDevice ) ) ); + setdup( &cdrom_device,gtk_entry_get_text( GTK_ENTRY( prECDRomDevice ) ) ); case bCancel: HidePreferences(); @@ -675,13 +669,13 @@ { case 0: // extra stereo coefficient if ( !guiInfo.Playing ) break; - gtkSet( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL ); + mplayer( MPLAYER_SET_EXTRA_STEREO,HSExtraStereoMuladj->value,0 ); break; case 1: // audio delay audio_delay=HSAudioDelayadj->value; break; case 2: // panscan - gtkSet( gtkSetPanscan,HSPanscanadj->value,NULL ); + mplayer( MPLAYER_SET_PANSCAN,HSPanscanadj->value,0 ); break; case 3: // sub delay sub_delay=HSSubDelayadj->value; @@ -691,24 +685,24 @@ break; #ifndef CONFIG_FREETYPE case 5: // font factor - gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL ); + mplayer( MPLAYER_SET_FONT_FACTOR,HSFontFactoradj->value,0 ); break; #else case 6: // font blur - gtkSet( gtkSetFontBlur,HSFontBluradj->value,NULL ); + mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 ); break; case 7: // font outline - gtkSet( gtkSetFontOutLine,HSFontOutLineadj->value,NULL ); + mplayer( MPLAYER_SET_FONT_OUTLINE,HSFontOutLineadj->value,0 ); break; case 8: // text scale - gtkSet( gtkSetFontTextScale,HSFontTextScaleadj->value,NULL ); + mplayer( MPLAYER_SET_FONT_TEXTSCALE,HSFontTextScaleadj->value,0 ); break; case 9: // osd scale - gtkSet( gtkSetFontOSDScale,HSFontOSDScaleadj->value,NULL ); + mplayer( MPLAYER_SET_FONT_OSDSCALE,HSFontOSDScaleadj->value,0 ); break; #endif case 10: // auto quality - gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL ); + mplayer( MPLAYER_SET_AUTO_QUALITY,HSPPQualityadj->value,0 ); break; } return FALSE; @@ -728,25 +722,19 @@ // if ( guiInfo.Playing ) gtkMessageBox( GTK_MB_WARNING,"Please remember, this function need restart the playing." ); // break; case 3: - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) ) gtk_widget_set_sensitive( CBLoadFullscreen,TRUE ); - else - { - gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ),0 ); - gtk_widget_set_sensitive( CBLoadFullscreen,FALSE ); - } if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) ) { window=wsShowWindow; gtkActive( Preferences ); } else window=wsHideWindow; - + // NOTE TO MYSELF: doesn't work with a fullscreen window if ( !guiInfo.Playing ) wsVisibleWindow( &guiApp.subWindow,window ); break; case 4: case 5: case 6: case 7: - gtkSet( gtkSetFontAutoScale,(float)((int)user_data - 4 ),NULL ); + mplayer( MPLAYER_SET_FONT_AUTOSCALE,(int)user_data - 4,0 ); break; case 8: if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) gtk_widget_set_sensitive( SBCache,TRUE ); @@ -997,10 +985,10 @@ AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_OSD_Level,GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 ); - RBOSDNone=AddRadioButton( MSGTR_PREFERENCES_None,&OSD_group,vbox600 ); - RBOSDTandP=AddRadioButton( MSGTR_PREFERENCES_OSDTimer,&OSD_group,vbox600 ); - RBOSDIndicator=AddRadioButton( MSGTR_PREFERENCES_OSDProgress,&OSD_group,vbox600 ); - RBOSDTPTT=AddRadioButton( MSGTR_PREFERENCES_OSDTimerPercentageTotalTime,&OSD_group,vbox600 ); + RBOSDNone=AddRadioButton( MSGTR_PREFERENCES_OSD_LEVEL0,&OSD_group,vbox600 ); + RBOSDIndicator=AddRadioButton( MSGTR_PREFERENCES_OSD_LEVEL1,&OSD_group,vbox600 ); + RBOSDTandP=AddRadioButton( MSGTR_PREFERENCES_OSD_LEVEL2,&OSD_group,vbox600 ); + RBOSDTPTT=AddRadioButton( MSGTR_PREFERENCES_OSD_LEVEL3,&OSD_group,vbox600 ); vbox7=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, @@ -1358,8 +1346,8 @@ #endif #if 0 gtk_signal_connect( GTK_OBJECT( RBOSDNone ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDNone_toggled ),NULL ); - gtk_signal_connect( GTK_OBJECT( RBOSDTandP ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDTandP_toggled ),NULL ); gtk_signal_connect( GTK_OBJECT( RBOSDIndicator ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDIndicator_toggled ),NULL ); + gtk_signal_connect( GTK_OBJECT( RBOSDTandP ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDTandP_toggled ),NULL ); gtk_signal_connect( GTK_OBJECT( RBOSDTPTT ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDIndicator_toggled ),NULL ); gtk_signal_connect( GTK_OBJECT( CBAudioEqualizer ),"toggled",GTK_SIGNAL_FUNC( on_CBAudioEqualizer_toggled ),NULL ); #endif @@ -1562,33 +1550,33 @@ case 1: #ifdef CONFIG_OSS_AUDIO if (strncmp(ao_driver[0], "oss", 3) == 0) { - gfree((void **) >kAOOSSDevice); + nfree(gtkAOOSSDevice); gtkAOOSSDevice = gstrdup(getGtkEntryText(CEAudioDevice)); - gfree((void **) >kAOOSSMixer); + nfree(gtkAOOSSMixer); gtkAOOSSMixer = gstrdup(getGtkEntryText(CEAudioMixer)); - gfree((void **) >kAOOSSMixerChannel); + nfree(gtkAOOSSMixerChannel); gtkAOOSSMixerChannel = gstrdup(getGtkEntryText(CEAudioMixerChannel)); } #endif #ifdef CONFIG_ALSA if (strncmp(ao_driver[0], "alsa", 4) == 0) { - gfree((void **) >kAOALSADevice); + nfree(gtkAOALSADevice); gtkAOALSADevice = gstrdup(getGtkEntryText(CEAudioDevice)); - gfree((void **) >kAOALSAMixer); + nfree(gtkAOALSAMixer); gtkAOALSAMixer = gstrdup(getGtkEntryText(CEAudioMixer)); - gfree((void **) >kAOALSAMixerChannel); + nfree(gtkAOALSAMixerChannel); gtkAOALSAMixerChannel = gstrdup(getGtkEntryText(CEAudioMixerChannel)); } #endif #ifdef CONFIG_SDL if (strncmp(ao_driver[0], "sdl", 3) == 0) { - gfree((void **) >kAOSDLDriver); + nfree(gtkAOSDLDriver); gtkAOSDLDriver = gstrdup(getGtkEntryText(CEAudioDevice)); } #endif #ifdef CONFIG_ESD if (strncmp(ao_driver[0], "esd", 3) == 0) { - gfree((void **) >kAOESDDevice); + nfree(gtkAOESDDevice); gtkAOESDDevice = gstrdup(getGtkEntryText(CEAudioDevice)); } #endif @@ -1758,7 +1746,7 @@ switch ( (int)user_data ) { case 0: // Ok - gfree( (void **)>kDXR3Device ); gtkDXR3Device=strdup( gtk_entry_get_text( GTK_ENTRY( CEDXR3Device ) ) ); + nfree( gtkDXR3Device ); gtkDXR3Device=strdup( gtk_entry_get_text( GTK_ENTRY( CEDXR3Device ) ) ); gtkVfLAVC=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBVLavc ) ); case 1: // Cancel HideDXR3Config(); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/skinbrowser.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/skinbrowser.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/skinbrowser.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/skinbrowser.c 2011-07-07 14:20:35.000000000 +0000 @@ -28,6 +28,8 @@ #include "tools.h" #include "gui/app.h" +#include "gui/cfg.h" +#include "gui/skin/skin.h" #include "help_mp.h" #include "gui/ui/widgets.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/url.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/url.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/gtk/url.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/gtk/url.c 2011-09-29 13:44:21.000000000 +0000 @@ -32,6 +32,8 @@ #include "gui/app.h" #include "gui/ui/gmplayer.h" #include "gui/ui/widgets.h" +#include "gui/util/list.h" +#include "gui/util/string.h" #include "help_mp.h" GtkWidget * URL = NULL; @@ -45,9 +47,9 @@ if ( URL ) gtkActive( URL ); else URL=create_URL(); - if ( URLList ) + if ( urlList ) { - urlItem * item = URLList; + urlItem * item = urlList; g_list_free( URLComboEntrys ); URLComboEntrys=NULL; while( item ) @@ -99,10 +101,10 @@ item=calloc( 1,sizeof( urlItem ) ); item->url=gstrdup( str ); - gtkSet( gtkAddURLItem,0,(void *)item ); + listSet( gtkAddURLItem,item ); - guiSetFilename( guiInfo.Filename,str ); guiInfo.FilenameChanged=1; - uiEventHandling( evPlayNetwork,0 ); + uiSetFileName( NULL,str,STREAMTYPE_STREAM ); guiInfo.NewPlay=GUI_FILE_NEW; + uiEventHandling( evPlay,0 ); } } HideURLDialogBox(); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/main.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/main.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/main.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/main.c 2012-01-05 12:06:03.000000000 +0000 @@ -27,11 +27,16 @@ #include "config.h" #include "gmplayer.h" #include "gui/app.h" +#include "gui/interface.h" #include "gui/skin/font.h" #include "gui/skin/skin.h" +#include "gui/util/list.h" +#include "gui/util/mem.h" +#include "gui/util/string.h" #include "gui/wm/ws.h" #include "help_mp.h" +#include "mp_msg.h" #include "libvo/x11_common.h" #include "libvo/fastmemcpy.h" #include "libvo/wskeys.h" @@ -51,6 +56,11 @@ #include "mp_core.h" #include "mpcommon.h" +#define CLEAR_FILE 1 +#define CLEAR_VCD 2 +#define CLEAR_DVD 4 +#define CLEAR_ALL (CLEAR_FILE + CLEAR_VCD + CLEAR_DVD) + #define GUI_REDRAW_WAIT 375 #include "actions.h" @@ -75,7 +85,7 @@ void uiMainDraw( void ) { - if ( guiApp.mainWindow.State == wsWindowClosed ) guiExit( EXIT_QUIT ); + if ( guiApp.mainWindow.State == wsWindowClosed ) mplayer( MPLAYER_EXIT_GUI, EXIT_QUIT, 0 ); if ( guiApp.mainWindow.Visible == wsWindowNotVisible || !mainVisible ) return; @@ -94,6 +104,32 @@ // XFlush( wsDisplay ); } +static void guiInfoMediumClear (int what) +{ + if (what & CLEAR_FILE) + { + nfree(guiInfo.Filename); + nfree(guiInfo.SubtitleFilename); + nfree(guiInfo.AudioFilename); + listSet(gtkDelPl, NULL); + } + +#ifdef CONFIG_VCD + if (what & CLEAR_VCD) guiInfo.Tracks = 0; +#endif + +#ifdef CONFIG_DVDREAD + if (what & CLEAR_DVD) + { + guiInfo.AudioStreams = 0; + guiInfo.Subtitles = 0; + guiInfo.Tracks = 0; + guiInfo.Chapters = 0; + guiInfo.Angles = 0; + } +#endif +} + static unsigned last_redraw_time = 0; void uiEventHandling( int msg,float param ) @@ -105,47 +141,68 @@ { // --- user events case evExit: - guiExit( EXIT_QUIT ); + mplayer( MPLAYER_EXIT_GUI, EXIT_QUIT, 0 ); break; - case evPlayNetwork: - gfree( (void **)&guiInfo.Subtitlename ); - gfree( (void **)&guiInfo.AudioFile ); - guiInfo.StreamType=STREAMTYPE_STREAM; - goto play; - case evSetURL: - gtkShow( evPlayNetwork,NULL ); + case evLoadURL: + gtkShow( evLoadURL,NULL ); break; - case evSetAudio: - if ( !guiInfo.demuxer || audio_id == iparam ) break; + case ivSetAudio: + if ( !mpctx_get_demuxer(guiInfo.mpcontext) || audio_id == iparam ) break; audio_id=iparam; goto play; - case evSetVideo: - if ( !guiInfo.demuxer || video_id == iparam ) break; + case ivSetVideo: + if ( !mpctx_get_demuxer(guiInfo.mpcontext) || video_id == iparam ) break; video_id=iparam; goto play; - case evSetSubtitle: + case ivSetSubtitle: mp_property_do("sub",M_PROPERTY_SET,&iparam,guiInfo.mpcontext); break; +#ifdef CONFIG_CDDA + case ivSetCDTrack: + guiInfo.Track=iparam; + case evPlayCD: + guiInfoMediumClear ( CLEAR_ALL ); + guiInfo.StreamType=STREAMTYPE_CDDA; + goto play; +#endif #ifdef CONFIG_VCD - case evSetVCDTrack: + case ivSetVCDTrack: guiInfo.Track=iparam; case evPlayVCD: - gtkSet( gtkClearStruct,0,(void *)guiALL ); + guiInfoMediumClear ( CLEAR_ALL ); guiInfo.StreamType=STREAMTYPE_VCD; goto play; #endif #ifdef CONFIG_DVDREAD + case ivSetDVDSubtitle: + dvdsub_id=iparam; + goto play_dvd_2; + break; + case ivSetDVDAudio: + audio_id=iparam; + goto play_dvd_2; + break; + case ivSetDVDChapter: + guiInfo.Chapter=iparam; + goto play_dvd_2; + break; + case ivSetDVDTitle: + guiInfo.Track=iparam; + guiInfo.Chapter=1; + guiInfo.Angle=1; + goto play_dvd_2; + break; case evPlayDVD: - guiInfo.DVD.current_title=1; - guiInfo.DVD.current_chapter=1; - guiInfo.DVD.current_angle=1; + guiInfo.Track=1; + guiInfo.Chapter=1; + guiInfo.Angle=1; play_dvd_2: - gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD) ); + guiInfoMediumClear( CLEAR_ALL - CLEAR_DVD ); guiInfo.StreamType=STREAMTYPE_DVD; goto play; #endif @@ -155,70 +212,56 @@ if ( ( msg == evPlaySwitchToPause )&&( guiInfo.Playing == GUI_PAUSE ) ) goto NoPause; - if ( gtkSet( gtkGetCurrPlItem,0,NULL ) &&( guiInfo.StreamType == STREAMTYPE_FILE ) ) + if ( listSet( gtkGetCurrPlItem,NULL ) &&( guiInfo.StreamType == STREAMTYPE_FILE ) ) { - plItem * next = gtkSet( gtkGetCurrPlItem,0,NULL ); + plItem * next = listSet( gtkGetCurrPlItem,NULL ); plLastPlayed=next; - uiSetFileName( next->path,next->name,STREAMTYPE_FILE ); + uiSetFileName( next->path,next->name,SAME_STREAMTYPE ); } switch ( guiInfo.StreamType ) { - case STREAMTYPE_STREAM: case STREAMTYPE_FILE: - gtkSet( gtkClearStruct,0,(void *)(guiALL - guiFilenames) ); + case STREAMTYPE_STREAM: + guiInfoMediumClear( CLEAR_ALL - CLEAR_FILE ); + if ( !guiInfo.Track ) + guiInfo.Track=1; + guiInfo.NewPlay=GUI_FILE_NEW; + break; +#ifdef CONFIG_CDDA + case STREAMTYPE_CDDA: + guiInfoMediumClear( CLEAR_ALL - CLEAR_VCD - CLEAR_FILE ); + if ( guiInfo.Playing != GUI_PAUSE ) + { + if ( !guiInfo.Track ) + guiInfo.Track=1; + guiInfo.NewPlay=GUI_FILE_SAME; + } break; +#endif #ifdef CONFIG_VCD case STREAMTYPE_VCD: - gtkSet( gtkClearStruct,0,(void *)(guiALL - guiVCD - guiFilenames) ); - if ( !cdrom_device ) cdrom_device=gstrdup( DEFAULT_CDROM_DEVICE ); - uiSetFileName( NULL,cdrom_device,STREAMTYPE_VCD ); + guiInfoMediumClear( CLEAR_ALL - CLEAR_VCD - CLEAR_FILE ); if ( guiInfo.Playing != GUI_PAUSE ) { if ( !guiInfo.Track ) - guiInfo.Track=1; - guiInfo.DiskChanged=1; + guiInfo.Track=2; + guiInfo.NewPlay=GUI_FILE_SAME; } break; #endif #ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: - gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD - guiFilenames) ); - if ( !dvd_device ) dvd_device=gstrdup( DEFAULT_DVD_DEVICE ); - uiSetFileName( NULL,dvd_device,STREAMTYPE_DVD ); + guiInfoMediumClear( CLEAR_ALL - CLEAR_DVD - CLEAR_FILE ); if ( guiInfo.Playing != GUI_PAUSE ) { - guiInfo.Title=guiInfo.DVD.current_title; - guiInfo.Chapter=guiInfo.DVD.current_chapter; - guiInfo.Angle=guiInfo.DVD.current_angle; - guiInfo.DiskChanged=1; + guiInfo.NewPlay=GUI_FILE_SAME; } break; #endif } - guiInfo.NewPlay=1; uiPlay(); break; -#ifdef CONFIG_DVDREAD - case evSetDVDSubtitle: - dvdsub_id=iparam; - goto play_dvd_2; - break; - case evSetDVDAudio: - audio_id=iparam; - goto play_dvd_2; - break; - case evSetDVDChapter: - guiInfo.DVD.current_chapter=iparam; - goto play_dvd_2; - break; - case evSetDVDTitle: - guiInfo.DVD.current_title=iparam; - guiInfo.DVD.current_chapter=1; - guiInfo.DVD.current_angle=1; - goto play_dvd_2; - break; -#endif case evPause: case evPauseSwitchToPlay: @@ -229,26 +272,25 @@ case evStop: guiInfo.Playing=GUI_STOP; uiState(); - guiInfo.NoWindow=False; break; case evLoadPlay: uiMainAutoPlay=1; // guiInfo.StreamType=STREAMTYPE_FILE; case evLoad: - gtkSet( gtkDelPl,0,NULL ); + listSet( gtkDelPl,NULL ); gtkShow( evLoad,NULL ); break; case evLoadSubtitle: gtkShow( evLoadSubtitle,NULL ); break; case evDropSubtitle: - gfree( (void **)&guiInfo.Subtitlename ); - guiLoadSubtitle( NULL ); + nfree( guiInfo.SubtitleFilename ); + mplayerLoadSubtitle( NULL ); break; case evLoadAudioFile: gtkShow( evLoadAudioFile,NULL ); break; case evPrev: uiPrev(); break; case evNext: uiNext(); break; - case evPlayList: gtkShow( evPlayList,NULL ); break; + case evPlaylist: gtkShow( evPlaylist,NULL ); break; case evSkinBrowser: gtkShow( evSkinBrowser,skinName ); break; case evAbout: gtkShow( evAbout,NULL ); break; case evPreferences: gtkShow( evPreferences,NULL ); break; @@ -298,50 +340,51 @@ } break; case evHalfSize: - btnSet( evFullScreen,btnReleased ); - if ( guiInfo.Playing ) + if ( guiInfo.VideoWindow && guiInfo.Playing ) { if ( guiApp.subWindow.isFullScreen ) { uiFullScreen(); } - wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth / 2, guiInfo.MovieHeight / 2 ); - wsMoveWindow( &guiApp.subWindow, 0, - ( wsMaxX - guiInfo.MovieWidth/2 )/2 + wsOrgX, - ( wsMaxY - guiInfo.MovieHeight/2 )/2 + wsOrgY ); + wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 ); + wsMoveWindow( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y ); + btnSet( evFullScreen,btnReleased ); } break; case evDoubleSize: - btnSet( evFullScreen,btnReleased ); - if ( guiInfo.Playing ) + if ( guiInfo.VideoWindow && guiInfo.Playing ) { if ( guiApp.subWindow.isFullScreen ) { uiFullScreen(); } - wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth * 2, guiInfo.MovieHeight * 2 ); - wsMoveWindow( &guiApp.subWindow, 0, - ( wsMaxX - guiInfo.MovieWidth*2 )/2 + wsOrgX, - ( wsMaxY - guiInfo.MovieHeight*2 )/2 + wsOrgY ); + wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 ); + wsMoveWindowWithin( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y ); + btnSet( evFullScreen,btnReleased ); } break; case evNormalSize: - btnSet( evFullScreen,btnReleased ); - if ( guiInfo.Playing ) + if ( guiInfo.VideoWindow && guiInfo.Playing ) { if ( guiApp.subWindow.isFullScreen ) { uiFullScreen(); } - wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth, guiInfo.MovieHeight ); - wsMoveWindow( &guiApp.subWindow, 0, - ( wsMaxX - guiInfo.MovieWidth )/2 + wsOrgX, - ( wsMaxY - guiInfo.MovieHeight )/2 + wsOrgY ); + wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight ); + wsMoveWindow( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y ); + btnSet( evFullScreen,btnReleased ); break; } else if ( !guiApp.subWindow.isFullScreen ) break; case evFullScreen: - if ( !guiInfo.Playing && !gtkShowVideoWindow ) break; - uiFullScreen(); + if ( guiInfo.VideoWindow && guiInfo.Playing ) + { + uiFullScreen(); + if ( !guiApp.subWindow.isFullScreen ) + { + wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight ); + wsMoveWindow( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y ); + } + } if ( guiApp.subWindow.isFullScreen ) btnSet( evFullScreen,btnPressed ); else btnSet( evFullScreen,btnReleased ); break; @@ -357,19 +400,19 @@ } wsClearWindow( guiApp.subWindow ); #ifdef CONFIG_DVDREAD - if ( guiInfo.StreamType == STREAMTYPE_DVD || guiInfo.StreamType == STREAMTYPE_VCD ) goto play_dvd_2; + if ( guiInfo.StreamType == STREAMTYPE_VCD || guiInfo.StreamType == STREAMTYPE_DVD ) goto play_dvd_2; else #endif - guiInfo.NewPlay=1; + guiInfo.NewPlay=GUI_FILE_NEW; break; // --- timer events - case evRedraw: + case ivRedraw: { unsigned now = GetTimerMS(); if ((now > last_redraw_time) && (now < last_redraw_time + GUI_REDRAW_WAIT) && - !uiPlaybarFade) + !uiPlaybarFade && (iparam == 0)) break; last_redraw_time = now; } @@ -378,14 +421,12 @@ wsPostRedisplay( &guiApp.playbarWindow ); break; // --- system events -#ifdef MP_DEBUG case evNone: - mp_msg( MSGT_GPLAYER,MSGL_STATUS,"[mw] event none received.\n" ); + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] uiEventHandling: evNone\n" ); break; default: - mp_msg( MSGT_GPLAYER,MSGL_STATUS,"[mw] unknown event received ( %d,%.2f ).\n",msg,param ); + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[main] uiEventHandling: unknown event %d, param %.2f\n", msg, param ); break; -#endif } } @@ -407,7 +448,7 @@ switch ( Button ) { case wsPMMouseButton: - gtkShow( evHidePopUpMenu,NULL ); + gtkShow( ivHidePopUpMenu,NULL ); uiShowMenu( RX,RY ); itemtype=itPRMButton; break; @@ -416,7 +457,7 @@ break; case wsPLMouseButton: - gtkShow( evHidePopUpMenu,NULL ); + gtkShow( ivHidePopUpMenu,NULL ); sx=X; sy=Y; boxMoved=1; itemtype=itPLMButton; SelectedItem=currentselected; if ( SelectedItem == -1 ) break; @@ -463,7 +504,7 @@ break; case wsRRMouseButton: - gtkShow( evShowPopUpMenu,NULL ); + gtkShow( ivShowPopUpMenu,NULL ); break; // --- rolled mouse ... de szar :))) @@ -485,7 +526,7 @@ switch ( itemtype ) { case itPLMButton: - wsMoveWindow( &guiApp.mainWindow,False,RX - abs( sx ),RY - abs( sy ) ); + wsMoveWindow( &guiApp.mainWindow,True,RX - abs( sx ),RY - abs( sy ) ); uiMainRender=0; break; case itPRMButton: @@ -546,9 +587,8 @@ case wsXF86Next: msg=evNext; break; case wsXF86Media: msg=evLoad; break; case wsEscape: - if ( guiApp.subWindow.isFullScreen ) + if ( guiInfo.VideoWindow && guiInfo.Playing && guiApp.subWindow.isFullScreen ) { - if ( guiInfo.event_struct ) ((XEvent *)guiInfo.event_struct)->type=None; uiEventHandling( evNormalSize,0 ); return; } @@ -592,7 +632,7 @@ if((len=strlen(++ext)) && (type=strstr(supported,ext)) &&\ (type-supported)%4 == 0 && *(type+len) == '/'){ /* handle subtitle file */ - gfree((void**)&subtitles); + nfree(subtitles); subtitles = str; continue; } @@ -602,7 +642,7 @@ /* clear playlist */ if (filename == NULL) { filename = files[f]; - gtkSet(gtkDelPl,0,NULL); + listSet(gtkDelPl,NULL); } item = calloc(1,sizeof(plItem)); @@ -617,7 +657,7 @@ item->name = strdup(str); item->path = strdup(""); } - gtkSet(gtkAddPlItem,0,(void*)item); + listSet(gtkAddPlItem,item); } else { mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotAFile,str ); } @@ -630,8 +670,8 @@ uiEventHandling( evPlay,0 ); } if (subtitles) { - gfree((void**)&guiInfo.Subtitlename); - guiInfo.Subtitlename = subtitles; - guiLoadSubtitle(guiInfo.Subtitlename); + nfree(guiInfo.SubtitleFilename); + guiInfo.SubtitleFilename = subtitles; + mplayerLoadSubtitle(guiInfo.SubtitleFilename); } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/menu.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/menu.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/menu.c 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/menu.c 2012-01-05 14:40:36.000000000 +0000 @@ -19,6 +19,7 @@ #include #include #include +#include #include "config.h" #include "help_mp.h" @@ -106,8 +107,8 @@ menuItem = 0; - wsMoveWindow( &guiApp.menuWindow,False,x,y ); - wsMoveTopWindow( wsDisplay,guiApp.menuWindow.WindowID ); + wsMoveWindow( &guiApp.menuWindow,True,x,y ); + wsRaiseWindowTop( wsDisplay,guiApp.menuWindow.WindowID ); wsSetLayer( wsDisplay,guiApp.menuWindow.WindowID,1 ); menuRender=1; wsVisibleWindow( &guiApp.menuWindow,wsShowWindow ); @@ -150,9 +151,7 @@ if ( ( menuDrawBuffer = calloc( 1,guiApp.menu.Bitmap.ImageSize ) ) == NULL ) { -#ifdef DEBUG mp_msg( MSGT_GPLAYER,MSGL_DBG2,MSGTR_NEMFMR ); -#endif gtkMessageBox( GTK_MB_FATAL,MSGTR_NEMFMR ); return; } @@ -163,9 +162,7 @@ wsSetShape( &guiApp.menuWindow,guiApp.menu.Mask.Image ); -#ifdef DEBUG - mp_msg( MSGT_GPLAYER,MSGL_DBG2,"menu: 0x%x\n",(int)guiApp.menuWindow.WindowID ); -#endif + mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[menu] menuWindow ID: 0x%x\n",(int)guiApp.menuWindow.WindowID ); menuIsInitialized=1; guiApp.menuWindow.ReDraw=uiMenuDraw; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/pixmaps/cd.xpm mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/pixmaps/cd.xpm --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/pixmaps/cd.xpm 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/pixmaps/cd.xpm 2011-12-31 12:38:52.000000000 +0000 @@ -0,0 +1,129 @@ +/* XPM */ +static const char * const cd_xpm[] = { +"16 16 110 2", +" c None", +". c #CACCD2", +"+ c #D3D4D6", +"@ c #D2D2D3", +"# c #D1D1D2", +"$ c #D1D1D3", +"% c #B5B8BD", +"& c #EDEDEC", +"* c #FAFAFA", +"= c #FBFBFB", +"- c #FCFCFC", +"; c #FFFFFF", +"> c #D9D9D9", +", c #AFB1B5", +"' c #C6C6C7", +") c #FDFDFD", +"! c #F7F7F7", +"~ c #F9F9F9", +"{ c #F6F6F6", +"] c #F8F8F8", +"^ c #B8B9BD", +"/ c #B2B4BA", +"( c #EAE9E9", +"_ c #DCDCDC", +": c #F3F3F3", +"< c #F4F4F4", +"[ c #A8AAAF", +"} c #CBCBCA", +"| c #CCCCCC", +"1 c #D7D7D7", +"2 c #E1E1E1", +"3 c #F5F5F5", +"4 c #EFEFEF", +"5 c #CCCDCE", +"6 c #D2D2D2", +"7 c #CDCDCD", +"8 c #D6D6D6", +"9 c #E0E0E0", +"0 c #E7E7E7", +"a c #E6E6E6", +"b c #E5E5E5", +"c c #EBEBEB", +"d c #E3E3E3", +"e c #ECECEC", +"f c #9C9DA5", +"g c #C4C5C9", +"h c #C1C1C1", +"i c #CECECE", +"j c #E2E2E2", +"k c #E8E8E8", +"l c #D8D8D8", +"m c #E4E4E3", +"n c #DBDBDB", +"o c #F2F2F2", +"p c #DDDDDD", +"q c #D4D4D4", +"r c #A2A4AA", +"s c #C9CACC", +"t c #C4C4C4", +"u c #CFCFCF", +"v c #E4E4E4", +"w c #DBDAD9", +"x c #727789", +"y c #DFDEDD", +"z c #C8C8C8", +"A c #BCBCBC", +"B c #BFBFBF", +"C c #9E9FA4", +"D c #C6C7C9", +"E c #E2E2E1", +"F c #999CA6", +"G c #C5C5C4", +"H c #D3D3D3", +"I c #C7C7C7", +"J c #BBBBBB", +"K c #BABABA", +"L c #C4C4C3", +"M c #95969A", +"N c #C4C5C6", +"O c #D8D8D7", +"P c #CACACA", +"Q c #C6C6C6", +"R c #B9B9B9", +"S c #CCCCCB", +"T c #939395", +"U c #A0A2A7", +"V c #E5E5E4", +"W c #FEFEFE", +"X c #C5C5C5", +"Y c #C2C2C2", +"Z c #B8B8B8", +"` c #BCBBBA", +" . c #A3A6AD", +".. c #9B9C9F", +"+. c #F0F0F0", +"@. c #C0C0C0", +"#. c #7C7E84", +"$. c #EAEAEA", +"%. c #979798", +"&. c #989BA2", +"*. c #E9E9E9", +"=. c #959596", +"-. c #A6A8AD", +";. c #B7B7B5", +">. c #B4B4B3", +",. c #8B8D92", +"'. c #9B9DA0", +"). c #B6B6B7", +"!. c #B0B0B1", +"~. c #929396", +" . + @ # $ ", +" % & * = = = - ; > , ", +" ' ) ! ~ ~ ~ { ] * = ) ^ ", +" / ( _ : ! ] ! < ! ] ) ) = [ ", +" } | 1 2 { ] ! : 3 - - 3 4 5 ", +" 6 7 8 9 0 ] a b ) = : c d e f ", +"g h i 1 j k 6 l m n o 0 p q 2 r ", +"s t u n v _ w x y p 8 z A B C ", +"D 8 l 2 k d E F ^ G H I J K L M ", +"N v j k e = _ O 6 P Q A R K S T ", +"U V k c ; W 3 > ! 6 X Y R Z ` .", +" ..+.; : : > : : : X X h @.#. ", +" 1 = : > : : : : $.X I %. ", +" &.Q a > : : +.v *.< =. ", +" -.;.P j k p >.,. ", +" '.).!.~. "}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/pixmaps/dvd.xpm mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/pixmaps/dvd.xpm --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/pixmaps/dvd.xpm 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/pixmaps/dvd.xpm 2011-12-31 12:38:52.000000000 +0000 @@ -1,129 +1,120 @@ /* XPM */ static const char * const dvd_xpm[] = { -"16 16 110 2", -" c None", -". c #CACCD2", -"+ c #D3D4D6", -"@ c #D2D2D3", -"# c #D1D1D2", -"$ c #D1D1D3", -"% c #B5B8BD", -"& c #EDEDEC", -"* c #FAFAFA", -"= c #FBFBFB", -"- c #FCFCFC", -"; c #FFFFFF", -"> c #D9D9D9", -", c #AFB1B5", -"' c #C6C6C7", -") c #FDFDFD", -"! c #F7F7F7", -"~ c #F9F9F9", -"{ c #F6F6F6", -"] c #F8F8F8", -"^ c #B8B9BD", -"/ c #B2B4BA", -"( c #EAE9E9", -"_ c #DCDCDC", -": c #F3F3F3", -"< c #F4F4F4", -"[ c #A8AAAF", -"} c #CBCBCA", -"| c #CCCCCC", -"1 c #D7D7D7", -"2 c #E1E1E1", -"3 c #F5F5F5", -"4 c #EFEFEF", -"5 c #CCCDCE", -"6 c #D2D2D2", -"7 c #CDCDCD", -"8 c #D6D6D6", -"9 c #E0E0E0", -"0 c #E7E7E7", -"a c #E6E6E6", -"b c #E5E5E5", -"c c #EBEBEB", -"d c #E3E3E3", -"e c #ECECEC", -"f c #9C9DA5", -"g c #C4C5C9", -"h c #C1C1C1", -"i c #CECECE", -"j c #E2E2E2", -"k c #E8E8E8", -"l c #D8D8D8", -"m c #E4E4E3", -"n c #DBDBDB", -"o c #F2F2F2", -"p c #DDDDDD", -"q c #D4D4D4", -"r c #A2A4AA", -"s c #C9CACC", -"t c #C4C4C4", -"u c #CFCFCF", -"v c #E4E4E4", -"w c #DBDAD9", -"x c #727789", -"y c #DFDEDD", -"z c #C8C8C8", -"A c #BCBCBC", -"B c #BFBFBF", -"C c #9E9FA4", -"D c #C6C7C9", -"E c #E2E2E1", -"F c #999CA6", -"G c #C5C5C4", -"H c #D3D3D3", -"I c #C7C7C7", -"J c #BBBBBB", -"K c #BABABA", -"L c #C4C4C3", -"M c #95969A", -"N c #C4C5C6", -"O c #D8D8D7", -"P c #CACACA", -"Q c #C6C6C6", -"R c #B9B9B9", -"S c #CCCCCB", -"T c #939395", -"U c #A0A2A7", -"V c #E5E5E4", -"W c #FEFEFE", -"X c #C5C5C5", -"Y c #C2C2C2", -"Z c #B8B8B8", -"` c #BCBBBA", -" . c #A3A6AD", -".. c #9B9C9F", -"+. c #F0F0F0", -"@. c #C0C0C0", -"#. c #7C7E84", -"$. c #EAEAEA", -"%. c #979798", -"&. c #989BA2", -"*. c #E9E9E9", -"=. c #959596", -"-. c #A6A8AD", -";. c #B7B7B5", -">. c #B4B4B3", -",. c #8B8D92", -"'. c #9B9DA0", -"). c #B6B6B7", -"!. c #B0B0B1", -"~. c #929396", -" . + @ # $ ", -" % & * = = = - ; > , ", -" ' ) ! ~ ~ ~ { ] * = ) ^ ", -" / ( _ : ! ] ! < ! ] ) ) = [ ", -" } | 1 2 { ] ! : 3 - - 3 4 5 ", -" 6 7 8 9 0 ] a b ) = : c d e f ", -"g h i 1 j k 6 l m n o 0 p q 2 r ", -"s t u n v _ w x y p 8 z A B C ", -"D 8 l 2 k d E F ^ G H I J K L M ", -"N v j k e = _ O 6 P Q A R K S T ", -"U V k c ; W 3 > ! 6 X Y R Z ` .", -" ..+.; : : > : : : X X h @.#. ", -" 1 = : > : : : : $.X I %. ", -" &.Q a > : : +.v *.< =. ", -" -.;.P j k p >.,. ", -" '.).!.~. "}; +"16 16 100 2", +" c #000000", +"! c #7277FF", +"# c #7C7EFF", +"$ c #8B8DFF", +"% c #9293FF", +"& c #9393FF", +"' c #9595FF", +"( c #9596FF", +") c #9797FF", +"* c #989BFF", +"+ c #999CFF", +", c #9B9CFF", +"- c #9B9DFF", +". c #9C9DFF", +"/ c #9E9FFF", +"0 c #A0A2FF", +"1 c #A2A4FF", +"2 c #A3A6FF", +"3 c #A6A8FF", +"4 c #A8AAFF", +"5 c #B0B0FF", +"6 c #AFB1FF", +"7 c #B2B4FF", +"8 c #B4B4FF", +"9 c #B6B6FF", +": c #B7B7FF", +"; c #B5B8FF", +"< c #B8B8FF", +"= c #B8B9FF", +"> c #B9B9FF", +"? c #BABAFF", +"@ c #BBBBFF", +"A c #BCBBFF", +"B c #BCBCFF", +"C c #BFBFFF", +"D c #C0C0FF", +"E c #C1C1FF", +"F c #C2C2FF", +"G c #C4C4FF", +"H c #C4C5FF", +"I c #C5C5FF", +"J c #C6C6FF", +"K c #C6C7FF", +"L c #C7C7FF", +"M c #C8C8FF", +"N c #C9CAFF", +"O c #CACAFF", +"P c #CBCBFF", +"Q c #CACCFF", +"R c #CCCCFF", +"S c #CCCDFF", +"T c #CDCDFF", +"U c #CECEFF", +"V c #CFCFFF", +"W c #D1D1FF", +"X c #D2D2FF", +"Y c #D3D3FF", +"Z c #D3D4FF", +"[ c #D4D4FF", +"[] c #D6D6FF", +"] c #D7D7FF", +"^ c #D8D8FF", +"_ c #D9D9FF", +"` c #DBDAFF", +"a c #DBDBFF", +"b c #DCDCFF", +"c c #DDDDFF", +"d c #DFDEFF", +"e c #E0E0FF", +"f c #E1E1FF", +"g c #E2E2FF", +"h c #E3E3FF", +"i c #E4E4FF", +"j c #E5E5FF", +"k c #E6E6FF", +"l c #E7E7FF", +"m c #E8E8FF", +"n c #E9E9FF", +"o c #EAE9FF", +"p c #EAEAFF", +"q c #EBEBFF", +"r c #ECECFF", +"s c #EDEDFF", +"t c #EFEFFF", +"u c #F0F0FF", +"v c #F2F2FF", +"w c #F3F3FF", +"x c #F4F4FF", +"y c #F5F5FF", +"z c #F6F6FF", +"{ c #F7F7FF", +"| c #F8F8FF", +"} c #F9F9FF", +"~ c #FAFAFF", +" ! c #FBFBFF", +"!! c #FCFCFF", +"#! c #FDFDFF", +"$! c #FEFEFF", +"%! c #FFFFFF", +"&! c None", +"&!&!&!&!&!Q Z X W W &!&!&!&!&!&!", +"&!&!&!; s ~ ! ! !!!%!_ 6 &!&!&!", +"&!&!J #!{ } } } z | ~ !#!= &!&!", +"&!7 o b w { | { x { | #!#! !4 &!", +"&!P R ] f z | { w y !!!!y t S &!", +"&!X T []e l | k j #! !w q h r . ", +"H E U ] g m X ^ i a v l c [ f 1 ", +"N G V a i b ` &!! d c []M B C / ", +"K []^ f m h g + = I Y L @ ? G ( ", +"H i g m r !b ^ X O J B > ? R & ", +"0 j m q %!$!y _ { X I F > < A 2 ", +"&!, u %!w w _ w w w I I E D # &!", +"&!&!] !w _ w w w w p I L ) &!&!", +"&!&!* J k _ w w u i n x ' &!&!&!", +"&!&!&!&!3 : O g m c 8 $ &!&!&!&!", +"&!&!&!&!&!&!- 9 5 % &!&!&!&!&!&!" +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/pixmaps/playcd.xpm mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/pixmaps/playcd.xpm --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/pixmaps/playcd.xpm 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/pixmaps/playcd.xpm 2011-12-31 12:38:52.000000000 +0000 @@ -0,0 +1,137 @@ +/* XPM */ +static const char * const playcd_xpm[] = { +"16 16 118 2", +" c None", +". c #CACCD2", +"+ c #D3D4D6", +"@ c #D2D2D3", +"# c #D1D1D2", +"$ c #D1D1D3", +"% c #B5B8BD", +"& c #EDEDEC", +"* c #FAFAFA", +"= c #FBFBFB", +"- c #FCFCFC", +"; c #FFFFFF", +"> c #D9D9D9", +", c #AFB1B5", +"' c #C6C6C7", +") c #FDFDFD", +"! c #F7F7F7", +"~ c #F9F9F9", +"{ c #F6F6F6", +"] c #F8F8F8", +"^ c #B8B9BD", +"/ c #B2B4BA", +"( c #EAE9E9", +"_ c #DCDCDC", +": c #F3F3F3", +"< c #F4F4F4", +"[ c #A8AAAF", +"} c #CBCBCA", +"| c #CCCCCC", +"1 c #D7D7D7", +"2 c #E1E1E1", +"3 c #F5F5F5", +"4 c #EFEFEF", +"5 c #CCCDCE", +"6 c #D2D2D2", +"7 c #CDCDCD", +"8 c #D6D6D6", +"9 c #E0E0E0", +"0 c #E7E7E7", +"a c #E6E6E6", +"b c #E5E5E5", +"c c #EBEBEB", +"d c #E3E3E3", +"e c #ECECEC", +"f c #9C9DA5", +"g c #C4C5C9", +"h c #C1C1C1", +"i c #CECECE", +"j c #E2E2E2", +"k c #E8E8E8", +"l c #D8D8D8", +"m c #E4E4E3", +"n c #DBDBDB", +"o c #F2F2F2", +"p c #404040", +"q c #DDDDDD", +"r c #D4D4D4", +"s c #A2A4AA", +"t c #C9CACC", +"u c #C4C4C4", +"v c #CFCFCF", +"w c #E4E4E4", +"x c #DBDAD9", +"y c #727789", +"z c #DFDEDD", +"A c #292828", +"B c #373737", +"C c #BCBCBC", +"D c #BFBFBF", +"E c #9E9FA4", +"F c #C6C7C9", +"G c #E2E2E1", +"H c #999CA6", +"I c #C5C5C4", +"J c #D3D3D3", +"K c #313131", +"L c #747472", +"M c #5C5C5C", +"N c #C4C4C3", +"O c #95969A", +"P c #C4C5C6", +"Q c #D8D8D7", +"R c #CACACA", +"S c #C6C6C6", +"T c #343333", +"U c #A1A09E", +"V c #939290", +"W c #939395", +"X c #A0A2A7", +"Y c #E5E5E4", +"Z c #FEFEFE", +"` c #C5C5C5", +" . c #363635", +".. c #A7A6A3", +"+. c #B8B7B4", +"@. c #91908E", +"#. c #9B9C9F", +"$. c #F0F0F0", +"%. c #383737", +"&. c #B0AFAC", +"*. c #C8C7C4", +"=. c #5A5A59", +"-. c #EAEAEA", +";. c #3E3D3D", +">. c #BEBCB9", +",. c #151414", +"'. c #989BA2", +"). c #E9E9E9", +"!. c #41403F", +"~. c #696867", +"{. c #A6A8AD", +"]. c #B7B7B5", +"^. c #B4B4B3", +"/. c #0A0A0A", +"(. c #9B9DA0", +"_. c #B6B6B7", +":. c #B0B0B1", +"<. c #929396", +" . + @ # $ ", +" % & * = = = - ; > , ", +" ' ) ! ~ ~ ~ { ] * = ) ^ ", +" / ( _ : ! ] ! < ! ] ) ) = [ ", +" } | 1 2 { ] ! : 3 - - 3 4 5 ", +" 6 7 8 9 0 ] a b ) = : c d e f ", +"g h i 1 j k 6 l m n o p q r 2 s ", +"t u v n w _ x y z q A B C D E ", +"F 8 l 2 k d G H ^ I J K L M N O ", +"P w j k e = _ Q 6 R S T U V M W ", +"X Y k c ; Z 3 > ! 6 ` ...+.@.M ", +" #.$.; : : > : : : ` %.&.*.=. ", +" 1 = : > : : : : -.;.>.,. ", +" '.S a > : : $.w ).!.~.Z ", +" {.].R j k q ^./.; ", +" (._.:.<. D "}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/pixmaps/playdvd.xpm mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/pixmaps/playdvd.xpm --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/pixmaps/playdvd.xpm 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/pixmaps/playdvd.xpm 2011-12-31 12:38:52.000000000 +0000 @@ -1,137 +1,129 @@ /* XPM */ static const char * const playdvd_xpm[] = { -"16 16 118 2", -" c None", -". c #CACCD2", -"+ c #D3D4D6", -"@ c #D2D2D3", -"# c #D1D1D2", -"$ c #D1D1D3", -"% c #B5B8BD", -"& c #EDEDEC", -"* c #FAFAFA", -"= c #FBFBFB", -"- c #FCFCFC", -"; c #FFFFFF", -"> c #D9D9D9", -", c #AFB1B5", -"' c #C6C6C7", -") c #FDFDFD", -"! c #F7F7F7", -"~ c #F9F9F9", -"{ c #F6F6F6", -"] c #F8F8F8", -"^ c #B8B9BD", -"/ c #B2B4BA", -"( c #EAE9E9", -"_ c #DCDCDC", -": c #F3F3F3", -"< c #F4F4F4", -"[ c #A8AAAF", -"} c #CBCBCA", -"| c #CCCCCC", -"1 c #D7D7D7", -"2 c #E1E1E1", -"3 c #F5F5F5", -"4 c #EFEFEF", -"5 c #CCCDCE", -"6 c #D2D2D2", -"7 c #CDCDCD", -"8 c #D6D6D6", -"9 c #E0E0E0", -"0 c #E7E7E7", -"a c #E6E6E6", -"b c #E5E5E5", -"c c #EBEBEB", -"d c #E3E3E3", -"e c #ECECEC", -"f c #9C9DA5", -"g c #C4C5C9", -"h c #C1C1C1", -"i c #CECECE", -"j c #E2E2E2", -"k c #E8E8E8", -"l c #D8D8D8", -"m c #E4E4E3", -"n c #DBDBDB", -"o c #F2F2F2", -"p c #404040", -"q c #DDDDDD", -"r c #D4D4D4", -"s c #A2A4AA", -"t c #C9CACC", -"u c #C4C4C4", -"v c #CFCFCF", -"w c #E4E4E4", -"x c #DBDAD9", -"y c #727789", -"z c #DFDEDD", -"A c #292828", -"B c #373737", -"C c #BCBCBC", -"D c #BFBFBF", -"E c #9E9FA4", -"F c #C6C7C9", -"G c #E2E2E1", -"H c #999CA6", -"I c #C5C5C4", -"J c #D3D3D3", -"K c #313131", -"L c #747472", -"M c #5C5C5C", -"N c #C4C4C3", -"O c #95969A", -"P c #C4C5C6", -"Q c #D8D8D7", -"R c #CACACA", -"S c #C6C6C6", -"T c #343333", -"U c #A1A09E", -"V c #939290", -"W c #939395", -"X c #A0A2A7", -"Y c #E5E5E4", -"Z c #FEFEFE", -"` c #C5C5C5", -" . c #363635", -".. c #A7A6A3", -"+. c #B8B7B4", -"@. c #91908E", -"#. c #9B9C9F", -"$. c #F0F0F0", -"%. c #383737", -"&. c #B0AFAC", -"*. c #C8C7C4", -"=. c #5A5A59", -"-. c #EAEAEA", -";. c #3E3D3D", -">. c #BEBCB9", -",. c #151414", -"'. c #989BA2", -"). c #E9E9E9", -"!. c #41403F", -"~. c #696867", -"{. c #A6A8AD", -"]. c #B7B7B5", -"^. c #B4B4B3", -"/. c #0A0A0A", -"(. c #9B9DA0", -"_. c #B6B6B7", -":. c #B0B0B1", -"<. c #929396", -" . + @ # $ ", -" % & * = = = - ; > , ", -" ' ) ! ~ ~ ~ { ] * = ) ^ ", -" / ( _ : ! ] ! < ! ] ) ) = [ ", -" } | 1 2 { ] ! : 3 - - 3 4 5 ", -" 6 7 8 9 0 ] a b ) = : c d e f ", -"g h i 1 j k 6 l m n o p q r 2 s ", -"t u v n w _ x y z q A B C D E ", -"F 8 l 2 k d G H ^ I J K L M N O ", -"P w j k e = _ Q 6 R S T U V M W ", -"X Y k c ; Z 3 > ! 6 ` ...+.@.M ", -" #.$.; : : > : : : ` %.&.*.=. ", -" 1 = : > : : : : -.;.>.,. ", -" '.S a > : : $.w ).!.~.Z ", -" {.].R j k q ^./.; ", -" (._.:.<. D "}; +"16 16 109 2", +" c #000000", +"! c #0A0A0A", +"# c #151414", +"$ c #292828", +"% c #313131", +"& c #343333", +"' c #363635", +"( c #373737", +") c #383737", +"* c #3E3D3D", +"+ c #41403F", +", c #404040", +"- c #5A5A59", +". c #5C5C5C", +"/ c #696867", +"0 c #747472", +"1 c #91908E", +"2 c #939290", +"3 c #A1A09E", +"4 c #A7A6A3", +"5 c #B0AFAC", +"6 c #B8B7B4", +"7 c #BEBCB9", +"8 c #C8C7C4", +"9 c #7277FF", +": c #9293FF", +"; c #9393FF", +"< c #9596FF", +"= c #989BFF", +"> c #999CFF", +"? c #9B9CFF", +"@ c #9B9DFF", +"A c #9C9DFF", +"B c #9E9FFF", +"C c #A0A2FF", +"D c #A2A4FF", +"E c #A6A8FF", +"F c #A8AAFF", +"G c #B0B0FF", +"H c #AFB1FF", +"I c #B2B4FF", +"J c #B4B4FF", +"K c #B6B6FF", +"L c #B7B7FF", +"M c #B5B8FF", +"N c #B8B9FF", +"O c #BCBCFF", +"P c #BFBFFF", +"Q c #C1C1FF", +"R c #C4C4FF", +"S c #C4C5FF", +"T c #C5C5FF", +"U c #C6C6FF", +"V c #C6C7FF", +"W c #C9CAFF", +"X c #CACAFF", +"Y c #CBCBFF", +"Z c #CACCFF", +"[ c #CCCCFF", +"[] c #CCCDFF", +"] c #CDCDFF", +"^ c #CECEFF", +"_ c #CFCFFF", +"` c #D1D1FF", +"a c #D2D2FF", +"b c #D3D3FF", +"c c #D3D4FF", +"d c #D4D4FF", +"e c #D6D6FF", +"f c #D7D7FF", +"g c #D8D8FF", +"h c #D9D9FF", +"i c #DBDAFF", +"j c #DBDBFF", +"k c #DCDCFF", +"l c #DDDDFF", +"m c #DFDEFF", +"n c #E0E0FF", +"o c #E1E1FF", +"p c #E2E2FF", +"q c #E3E3FF", +"r c #E4E4FF", +"s c #E5E5FF", +"t c #E6E6FF", +"u c #E7E7FF", +"v c #E8E8FF", +"w c #E9E9FF", +"x c #EAE9FF", +"y c #EAEAFF", +"z c #EBEBFF", +"{ c #ECECFF", +"| c #EDEDFF", +"} c #EFEFFF", +"~ c #F0F0FF", +" ! c #F2F2FF", +"!! c #F3F3FF", +"#! c #F4F4FF", +"$! c #F5F5FF", +"%! c #F6F6FF", +"&! c #F7F7FF", +"'! c #F8F8FF", +"(! c #F9F9FF", +")! c #FAFAFF", +"*! c #FBFBFF", +"+! c #FCFCFF", +",! c #FDFDFF", +"-! c #FEFEFF", +".! c #FFFFFF", +"/! c None", +"/!/!/!/!/!Z c a ` ` /!/!/!/!/!/!", +"/!/!/!M | )!*!*!*!+!.!h H /!/!/!", +"/!/!U ,!&!(!(!(!%!'!)!*!,!N /!/!", +"/!I x k !!&!'!&!#!&!'!,!,!*!F /!", +"/!Y [ f o %!'!&!!!$!+!+!$!} []/!", +"/!a ] e n u '!t s ,!*!!!z q { A ", +"S Q ^ f p v a g r j !, l d o D ", +"W R _ j r k i /!9 m l $ ( O P B ", +"V e g o v q p > N T b % 0 . R < ", +"S r p v { *!k g a X U & 3 2 . ; ", +"C s v z .!-!$!h &!a T ' 4 6 1 . ", +"/!? ~ .!!!!!h !!!!!!T ) 5 8 - /!", +"/!/!f *!!!h !!!!!!!!y * 7 # /!/!", +"/!/!= U t h !!!!~ r w + / -!/!/!", +"/!/!/!/!E L X p v l J ! .!/!/!/!", +"/!/!/!/!/!/!@ K G : /!P /!/!/!/!" +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/playbar.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/playbar.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/playbar.c 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/playbar.c 2011-12-09 13:34:38.000000000 +0000 @@ -26,8 +26,10 @@ #include "config.h" #include "gui/app.h" +#include "gui/interface.h" #include "gui/skin/font.h" #include "gui/skin/skin.h" +#include "gui/util/mem.h" #include "gui/wm/ws.h" #include "help_mp.h" @@ -81,7 +83,7 @@ uiPlaybarFade=0; vo_mouse_autohide=0; } - wsMoveWindow( &guiApp.playbarWindow,0,x,playbarLength ); + wsMoveWindow( &guiApp.playbarWindow,True,x,playbarLength ); break; case 2: // fade out playbarLength+=10; @@ -93,7 +95,7 @@ wsVisibleWindow( &guiApp.playbarWindow,wsHideWindow ); return; } - wsMoveWindow( &guiApp.playbarWindow,0,x,playbarLength ); + wsMoveWindow( &guiApp.playbarWindow,True,x,playbarLength ); break; } @@ -130,18 +132,18 @@ switch ( Button ) { case wsPMMouseButton: - gtkShow( evHidePopUpMenu,NULL ); + gtkShow( ivHidePopUpMenu,NULL ); uiShowMenu( RX,RY ); break; case wsRMMouseButton: uiHideMenu( RX,RY,0 ); break; case wsRRMouseButton: - gtkShow( evShowPopUpMenu,NULL ); + gtkShow( ivShowPopUpMenu,NULL ); break; // --- case wsPLMouseButton: - gtkShow( evHidePopUpMenu,NULL ); + gtkShow( ivHidePopUpMenu,NULL ); SelectedItem=currentselected; if ( SelectedItem == -1 ) break; // yeees, i'm move the fucking window item=&guiApp.playbarItems[SelectedItem]; @@ -242,12 +244,12 @@ { if ( !guiApp.playbarIsPresent ) return; - gfree( (void**)&playbarDrawBuffer ); + nfree( playbarDrawBuffer ); if ( ( playbarDrawBuffer = malloc( guiApp.playbar.Bitmap.ImageSize ) ) == NULL ) { gmp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_NEMDB ); - guiExit( EXIT_ERROR ); + mplayer( MPLAYER_EXIT_GUI, EXIT_ERROR, 0 ); } guiApp.playbarWindow.Parent=guiApp.subWindow.WindowID; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/render.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/render.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/render.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/render.c 2011-12-31 12:38:52.000000000 +0000 @@ -24,11 +24,11 @@ #include "render.h" #include "gui/interface.h" #include "gui/skin/font.h" +#include "gui/util/string.h" #include "access_mpcontext.h" #include "codec-cfg.h" #include "config.h" -#include "help_mp.h" #include "libavutil/avstring.h" #include "libmpdemux/stheader.h" #include "mixer.h" @@ -40,75 +40,6 @@ static char *image_buffer; static int image_width; -static void TranslateFilename(int c, char *tmp, size_t tmplen) -{ - int i; - char *p; - size_t len; - - switch (guiInfo.StreamType) { - case STREAMTYPE_STREAM: - av_strlcpy(tmp, guiInfo.Filename, tmplen); - break; - - case STREAMTYPE_FILE: - if (guiInfo.Filename && guiInfo.Filename[0]) { - p = strrchr(guiInfo.Filename, '/'); - - if (p) - av_strlcpy(tmp, p + 1, tmplen); - else - av_strlcpy(tmp, guiInfo.Filename, tmplen); - - len = strlen(tmp); - - if (len > 3 && tmp[len - 3] == '.') - tmp[len - 3] = 0; - else if (len > 4 && tmp[len - 4] == '.') - tmp[len - 4] = 0; - else if (len > 5 && tmp[len - 5] == '.') - tmp[len - 5] = 0; - } else - av_strlcpy(tmp, MSGTR_NoFileLoaded, tmplen); - break; - -#ifdef CONFIG_DVDREAD - case STREAMTYPE_DVD: - if (guiInfo.DVD.current_chapter) - snprintf(tmp, tmplen, MSGTR_Chapter, guiInfo.DVD.current_chapter); - else - av_strlcat(tmp, MSGTR_NoChapter, tmplen); - break; -#endif - -#ifdef CONFIG_VCD - case STREAMTYPE_VCD: - snprintf(tmp, tmplen, MSGTR_VCDTrack, guiInfo.Track); - break; -#endif - - default: - av_strlcpy(tmp, MSGTR_NoMediaOpened, tmplen); - break; - } - - if (c) { - for (i = 0; tmp[i]; i++) { - int t = 0; - - if (c == 1) - if (tmp[i] >= 'A' && tmp[i] <= 'Z') - t = 32; - - if (c == 2) - if (tmp[i] >= 'a' && tmp[i] <= 'z') - t = -32; - - tmp[i] = (char)(tmp[i] + t); - } - } -} - static char *Translate(char *str) { static char trbuf[512]; @@ -148,44 +79,44 @@ break; case '6': - t = guiInfo.LengthInSec; + t = guiInfo.RunningTime; goto calclengthhhmmss; case '1': - t = guiInfo.TimeSec; + t = guiInfo.ElapsedTime; calclengthhhmmss: snprintf(tmp, sizeof(tmp), "%02d:%02d:%02d", t / 3600, t / 60 % 60, t % 60); av_strlcat(trbuf, tmp, sizeof(trbuf)); break; case '7': - t = guiInfo.LengthInSec; + t = guiInfo.RunningTime; goto calclengthmmmmss; case '2': - t = guiInfo.TimeSec; + t = guiInfo.ElapsedTime; calclengthmmmmss: snprintf(tmp, sizeof(tmp), "%04d:%02d", t / 60, t % 60); av_strlcat(trbuf, tmp, sizeof(trbuf)); break; case '3': - snprintf(tmp, sizeof(tmp), "%02d", guiInfo.TimeSec / 3600); + snprintf(tmp, sizeof(tmp), "%02d", guiInfo.ElapsedTime / 3600); av_strlcat(trbuf, tmp, sizeof(trbuf)); break; case '4': - snprintf(tmp, sizeof(tmp), "%02d", (guiInfo.TimeSec / 60) % 60); + snprintf(tmp, sizeof(tmp), "%02d", (guiInfo.ElapsedTime / 60) % 60); av_strlcat(trbuf, tmp, sizeof(trbuf)); break; case '5': - snprintf(tmp, sizeof(tmp), "%02d", guiInfo.TimeSec % 60); + snprintf(tmp, sizeof(tmp), "%02d", guiInfo.ElapsedTime % 60); av_strlcat(trbuf, tmp, sizeof(trbuf)); break; case '8': - snprintf(tmp, sizeof(tmp), "%01d:%02d:%02d", guiInfo.TimeSec / 3600, (guiInfo.TimeSec / 60) % 60, guiInfo.TimeSec % 60); + snprintf(tmp, sizeof(tmp), "%01d:%02d:%02d", guiInfo.ElapsedTime / 3600, (guiInfo.ElapsedTime / 60) % 60, guiInfo.ElapsedTime % 60); av_strlcat(trbuf, tmp, sizeof(trbuf)); break; @@ -209,23 +140,18 @@ av_strlcat(trbuf, tmp, sizeof(trbuf)); break; - case 'd': - snprintf(tmp, sizeof(tmp), "%d", guiInfo.FrameDrop); - av_strlcat(trbuf, tmp, sizeof(trbuf)); - break; - case 'x': - snprintf(tmp, sizeof(tmp), "%d", guiInfo.MovieWidth); + snprintf(tmp, sizeof(tmp), "%d", guiInfo.VideoWidth); av_strlcat(trbuf, tmp, sizeof(trbuf)); break; case 'y': - snprintf(tmp, sizeof(tmp), "%d", guiInfo.MovieHeight); + snprintf(tmp, sizeof(tmp), "%d", guiInfo.VideoHeight); av_strlcat(trbuf, tmp, sizeof(trbuf)); break; case 'C': - snprintf(tmp, sizeof(tmp), "%s", guiInfo.sh_video ? ((sh_video_t *)guiInfo.sh_video)->codec->name : ""); + snprintf(tmp, sizeof(tmp), "%s", guiInfo.sh_video ? guiInfo.sh_video->codec->name : ""); av_strlcat(trbuf, tmp, sizeof(trbuf)); break; @@ -254,7 +180,7 @@ break; } - switch (guiInfo.AudioType) { + switch (guiInfo.AudioChannels) { case 0: av_strlcat(trbuf, "n", sizeof(trbuf)); break; @@ -276,16 +202,22 @@ av_strlcat(trbuf, "f", sizeof(trbuf)); break; + case STREAMTYPE_STREAM: + av_strlcat(trbuf, "u", sizeof(trbuf)); + break; + +#ifdef CONFIG_CDDA + case STREAMTYPE_CDDA: + av_strlcat(trbuf, "a", sizeof(trbuf)); + break; +#endif + #ifdef CONFIG_VCD case STREAMTYPE_VCD: av_strlcat(trbuf, "v", sizeof(trbuf)); break; #endif - case STREAMTYPE_STREAM: - av_strlcat(trbuf, "u", sizeof(trbuf)); - break; - #ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: av_strlcat(trbuf, "d", sizeof(trbuf)); @@ -434,7 +366,7 @@ case itSLabel: if (item->width == -1) item->width = fntTextWidth(item->fontid, item->label); - image = fntRender(item, 0, item->label); + image = fntTextRender(item, 0, item->label); if (image) PutImage(image, item->x, item->y, 1, 0); break; @@ -472,7 +404,7 @@ } } - image = fntRender(item, x, t); + image = fntTextRender(item, x, t); } if (image) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/sub.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/sub.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/sub.c 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/sub.c 2011-12-09 13:34:38.000000000 +0000 @@ -35,7 +35,7 @@ void uiSubDraw( void ) { - if ( guiApp.subWindow.State == wsWindowClosed ) guiExit( EXIT_QUIT ); + if ( guiApp.subWindow.State == wsWindowClosed ) mplayer( MPLAYER_EXIT_GUI, EXIT_QUIT, 0 ); if ( guiApp.subWindow.State == wsWindowFocusIn ) subVisible++; if ( guiApp.subWindow.State == wsWindowFocusOut && metacity_hack != 3 ) subVisible--; @@ -62,10 +62,10 @@ switch( Button ) { case wsRRMouseButton: - gtkShow( evShowPopUpMenu,NULL ); + gtkShow( ivShowPopUpMenu,NULL ); break; case wsPMMouseButton: - gtkShow( evHidePopUpMenu,NULL ); + gtkShow( ivHidePopUpMenu,NULL ); uiShowMenu( RX,RY ); msButton=wsPMMouseButton; break; @@ -75,7 +75,7 @@ break; // --- case wsPLMouseButton: - gtkShow( evHidePopUpMenu,NULL ); + gtkShow( ivHidePopUpMenu,NULL ); sx=X; sy=Y; msButton=wsPLMouseButton; mplSubMoved=0; @@ -85,7 +85,13 @@ { case wsPLMouseButton: mplSubMoved=1; - if ( !guiApp.subWindow.isFullScreen ) wsMoveWindow( &guiApp.subWindow,False,RX - sx,RY - sy ); + if ( !guiApp.subWindow.isFullScreen ) + { + wsMoveWindow( &guiApp.subWindow,True,RX - sx,RY - sy ); + guiApp.sub.x = guiApp.subWindow.X; + guiApp.sub.y = guiApp.subWindow.Y; + // NOTE TO MYSELF: dragging the title bar goes unnoticed? + } break; case wsPMMouseButton: uiMenuMouseHandle( X,Y,RX,RY ); @@ -96,8 +102,8 @@ case wsRLMouseButton: if ( ( !mplSubMoved )&&( guiApp.subWindow.isFullScreen ) ) { - if( subVisible++%2 ) wsMoveTopWindow( wsDisplay,guiApp.mainWindow.WindowID ); - else wsMoveTopWindow( wsDisplay,guiApp.subWindow.WindowID ); + if( subVisible++%2 ) wsRaiseWindowTop( wsDisplay,guiApp.mainWindow.WindowID ); + else wsRaiseWindowTop( wsDisplay,guiApp.subWindow.WindowID ); } msButton=0; mplSubMoved=0; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/widgets.c mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/widgets.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/widgets.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/widgets.c 2011-12-09 13:34:38.000000000 +0000 @@ -223,7 +223,7 @@ void gtkActive(GtkWidget *wdg) { - wsMoveTopWindow(gdk_display, GDK_WINDOW_XWINDOW(wdg->window)); + wsRaiseWindowTop(gdk_display, GDK_WINDOW_XWINDOW(wdg->window)); } void gtkShow(int type, char *param) @@ -255,7 +255,7 @@ ShowPreferences(); break; - case evPlayList: + case evPlaylist: ShowPlayList(); gtkSetLayer(PlayList); break; @@ -265,11 +265,6 @@ gtkSetLayer(fsFileSelect); break; - case evFirstLoad: - ShowFileSelect(fsVideoSelector, 0); - gtkSetLayer(fsFileSelect); - break; - case evLoadSubtitle: ShowFileSelect(fsSubtitleSelector, 0); gtkSetLayer(fsFileSelect); @@ -285,7 +280,7 @@ gtkSetLayer(About); break; - case evShowPopUpMenu: + case ivShowPopUpMenu: gtkPopupMenu = evNone; gtkPopupMenuParam = 0; @@ -298,7 +293,7 @@ gtk_menu_popup(GTK_MENU(PopUpMenu), NULL, NULL, NULL, NULL, 0, 0); break; - case evHidePopUpMenu: + case ivHidePopUpMenu: if (PopUpMenu) { gtk_widget_hide(PopUpMenu); @@ -308,7 +303,7 @@ break; - case evPlayNetwork: + case evLoadURL: ShowURLDialogBox(); gtkSetLayer(URL); break; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/widgets.h mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/widgets.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/ui/widgets.h 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/ui/widgets.h 2011-08-26 09:46:42.000000000 +0000 @@ -30,7 +30,6 @@ #include "osdep/shmem.h" #include "actions.h" #include "mplayer.h" -#include "gui/interface.h" #define GTK_MB_SIMPLE 0 #define GTK_MB_MODAL 1 @@ -60,7 +59,7 @@ Pixmap normal; Pixmap normal_mask; int collection_size; - CARD32 *collection; + long *collection; } guiIcon_t; extern guiIcon_t guiIcon; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/util/bitmap.c mplayer-1.0~rc4.dfsg1+svn34540/gui/util/bitmap.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/util/bitmap.c 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/util/bitmap.c 2011-10-20 12:24:00.000000000 +0000 @@ -16,6 +16,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +/** + * @file + * @brief Image loader and bitmap mask rendering + */ + #include #include #include @@ -25,11 +30,21 @@ #include "help_mp.h" #include "libavcodec/avcodec.h" +#include "libavutil/common.h" #include "libavutil/intreadwrite.h" #include "libvo/fastmemcpy.h" #include "mp_msg.h" -static int pngRead(unsigned char *fname, guiImage *bf) +/** + * @brief Read and decode a PNG file into bitmap data. + * + * @param fname filename (with path) + * @param img pointer suitable to store the image data + * + * @return 0 (ok), 1 (decoding error), 2 (open error), 3 (file too big), + * 4 (out of memory), 5 (avcodec alloc error) + */ +static int pngRead(const char *fname, guiImage *img) { FILE *file; long len; @@ -84,45 +99,45 @@ avcodec_decode_video2(avctx, frame, &decode_ok, &pkt); - memset(bf, 0, sizeof(*bf)); + memset(img, 0, sizeof(*img)); switch (avctx->pix_fmt) { case PIX_FMT_GRAY8: - bf->Bpp = 8; + img->Bpp = 8; break; case PIX_FMT_GRAY16BE: - bf->Bpp = 16; + img->Bpp = 16; break; case PIX_FMT_RGB24: - bf->Bpp = 24; + img->Bpp = 24; break; case PIX_FMT_BGRA: case PIX_FMT_ARGB: - bf->Bpp = 32; + img->Bpp = 32; break; default: - bf->Bpp = 0; + img->Bpp = 0; break; } - if (decode_ok && bf->Bpp) { - bf->Width = avctx->width; - bf->Height = avctx->height; - bpl = bf->Width * (bf->Bpp / 8); - bf->ImageSize = bpl * bf->Height; - - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] file: %s\n", fname); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] size: %lux%lu, color depth: %u\n", bf->Width, bf->Height, bf->Bpp); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] image size: %lu\n", bf->ImageSize); + if (decode_ok && img->Bpp) { + img->Width = avctx->width; + img->Height = avctx->height; + bpl = img->Width * (img->Bpp / 8); + img->ImageSize = bpl * img->Height; + + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] file: %s\n", fname); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] size: %lux%lu, color depth: %u\n", img->Width, img->Height, img->Bpp); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] image size: %lu\n", img->ImageSize); - bf->Image = malloc(bf->ImageSize); + img->Image = malloc(img->ImageSize); - if (bf->Image) - memcpy_pic(bf->Image, frame->data[0], bpl, bf->Height, bpl, frame->linesize[0]); + if (img->Image) + memcpy_pic(img->Image, frame->data[0], bpl, img->Height, bpl, frame->linesize[0]); else decode_ok = 0; } @@ -132,31 +147,40 @@ av_free(avctx); av_free(data); - return !(decode_ok && bf->Bpp); + return !(decode_ok && img->Bpp); } -static int Convert24to32(guiImage *bf) +/** + * @brief Convert a 24-bit color depth image into an 32-bit one. + * + * @param img image to be converted + * + * @return 1 (ok) or 0 (error) + * + * @note This is an in-place conversion, new memory will be allocated for @a img. + */ +static int Convert24to32(guiImage *img) { char *orgImage; unsigned long i, c; - if (bf->Bpp == 24) { - orgImage = bf->Image; + if (img->Bpp == 24) { + orgImage = img->Image; - bf->Bpp = 32; - bf->ImageSize = bf->Width * bf->Height * 4; - bf->Image = calloc(1, bf->ImageSize); + img->Bpp = 32; + img->ImageSize = img->Width * img->Height * 4; + img->Image = calloc(1, img->ImageSize); - if (!bf->Image) { + if (!img->Image) { free(orgImage); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] not enough memory: %lu\n", bf->ImageSize); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] not enough memory: %lu\n", img->ImageSize); return 0; } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] 32 bpp conversion size: %lu\n", bf->ImageSize); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] 32 bpp conversion size: %lu\n", img->ImageSize); - for (c = 0, i = 0; c < bf->ImageSize; c += 4, i += 3) - *(uint32_t *)&bf->Image[c] = ALPHA_OPAQUE | AV_RB24(&orgImage[i]); + for (c = 0, i = 0; c < img->ImageSize; c += 4, i += 3) + *(uint32_t *)&img->Image[c] = ALPHA_OPAQUE | AV_RB24(&orgImage[i]); free(orgImage); } @@ -164,10 +188,17 @@ return 1; } -static unsigned char *fExist(unsigned char *fname) +/** + * @brief Check whether a (PNG) file exists. + * + * @param fname filename (with path, but may lack extension) + * + * @return path including extension (ok) or NULL (not accessible) + */ +static const char *fExist(const char *fname) { static const char ext[][4] = { "png", "PNG" }; - static unsigned char buf[512]; + static char buf[512]; unsigned int i; if (access(fname, R_OK) == 0) @@ -183,7 +214,16 @@ return NULL; } -int bpRead(char *fname, guiImage *bf) +/** + * @brief Read a PNG file. + * + * @param fname filename (with path, but may lack extension) + * @param img pointer suitable to store the image data + * + * @return 0 (ok), -1 (color depth too low), -2 (not accessible), + * -5 (#pngRead() error) or -8 (#Convert24to32() error) + */ +int bpRead(const char *fname, guiImage *img) { int r; @@ -192,74 +232,96 @@ if (!fname) return -2; - r = pngRead(fname, bf); + r = pngRead(fname, img); if (r != 0) { - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] read error #%d: %s\n", r, fname); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] read error #%d: %s\n", r, fname); return -5; } - if (bf->Bpp < 24) { - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] bpp too low: %u\n", bf->Bpp); + if (img->Bpp < 24) { + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] bpp too low: %u\n", img->Bpp); return -1; } - if (!Convert24to32(bf)) + if (!Convert24to32(img)) return -8; return 0; } -void bpFree(guiImage *bf) +/** + * @brief Free all memory allocated to an image and set all its pointers to NULL. + * + * @param img image to be freed + */ +void bpFree(guiImage *img) { - free(bf->Image); - memset(bf, 0, sizeof(*bf)); + free(img->Image); + memset(img, 0, sizeof(*img)); } -int bpRenderMask(guiImage *in, guiImage *out) +/** + * @brief Render a bitmap mask for an image. + * + * @param in image to render a bitmap mask from + * @param out bitmap mask + * + * @return 1 (ok) or 0 (error) + * + * @note As a side effect, transparent pixels of @a in will be rendered black. + */ +int bpRenderMask(const guiImage *in, guiImage *out) { uint32_t *buf; - unsigned long i; - int b = 0, c = 0; - unsigned char tmp = 0; + unsigned long x, y; + unsigned long i = 0, c = 0; + unsigned char tmp = 0, b = 1; int shaped = 0; out->Width = in->Width; out->Height = in->Height; out->Bpp = 1; - out->ImageSize = (out->Width * out->Height + 7) / 8; + out->ImageSize = ((out->Width + 7) / 8) * out->Height; out->Image = calloc(1, out->ImageSize); if (!out->Image) { - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] not enough memory: %lu\n", out->ImageSize); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] not enough memory: %lu\n", out->ImageSize); return 0; } buf = (uint32_t *)in->Image; - for (i = 0; i < out->Width * out->Height; i++) { - tmp >>= 1; - - if (!IS_TRANSPARENT(buf[i])) - tmp |= 0x80; - else { - buf[i] = 0; - shaped = 1; + for (y = 0; y < in->Height; y++) { + for (x = 0; x < in->Width; x++) { + if (!IS_TRANSPARENT(buf[i])) + tmp |= b; + else { + buf[i] = 0; // pixel should be black (if transparency isn't supported) + shaped = 1; + } + + i++; + b <<= 1; + + if (b == 0) { + out->Image[c++] = tmp; + tmp = 0; + b = 1; + } } - if (++b == 8) { + if (b != 1) { out->Image[c++] = tmp; - tmp = b = 0; + tmp = 0; + b = 1; } } - if (b) - out->Image[c] = tmp; - if (!shaped) bpFree(out); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] 1 bpp conversion size: %lu\n", out->ImageSize); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] 1 bpp conversion size: %lu\n", out->ImageSize); return 1; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/util/bitmap.h mplayer-1.0~rc4.dfsg1+svn34540/gui/util/bitmap.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/util/bitmap.h 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/util/bitmap.h 2011-09-06 15:10:01.000000000 +0000 @@ -19,11 +19,15 @@ #ifndef MPLAYER_GUI_BITMAP_H #define MPLAYER_GUI_BITMAP_H -#define MP_TRANSPARENT 0xffff00ff // transparent color (opaque fuchsia/magenta) -#define ALPHA_OPAQUE 0xff000000 +/** + * @def GUI_TRANSPARENT + * transparent color (opaque fuchsia/magenta) + */ +#define GUI_TRANSPARENT 0xffff00ff +#define ALPHA_OPAQUE 0xff000000 // for legacy reasons, we must treat all kind of fuchsia/magenta as transparent -#define IS_TRANSPARENT(c) ((ALPHA_OPAQUE | (c)) == MP_TRANSPARENT) +#define IS_TRANSPARENT(c) ((ALPHA_OPAQUE | (c)) == GUI_TRANSPARENT) typedef struct { unsigned long Width; @@ -33,8 +37,8 @@ char *Image; } guiImage; -void bpFree(guiImage *bf); -int bpRead(char *fname, guiImage *bf); -int bpRenderMask(guiImage *in, guiImage *out); +void bpFree(guiImage *img); +int bpRead(const char *fname, guiImage *img); +int bpRenderMask(const guiImage *in, guiImage *out); #endif /* MPLAYER_GUI_BITMAP_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/util/cut.c mplayer-1.0~rc4.dfsg1+svn34540/gui/util/cut.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/util/cut.c 2011-03-31 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/util/cut.c 2011-09-06 12:11:23.000000000 +0000 @@ -16,11 +16,25 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +/** + * @file + * @brief Parser helpers + */ + #include #include #include "cut.h" +/** + * @brief Extract a part of a string delimited by a separator character. + * + * @param in string to be analyzed + * @param out pointer suitable to store the extracted part + * @param sep separator character + * @param num number of separator characters to be skipped before extraction starts + * @param maxout maximum length of extracted part (including the trailing null byte) + */ void cutItemString(char *in, char *out, char sep, int num, size_t maxout) { int n; @@ -39,6 +53,15 @@ out[c] = 0; } +/** + * @brief Extract a numeric part of a string delimited by a separator character. + * + * @param in string to be analyzed + * @param sep separator character + * @param num number of separator characters to be skipped before extraction starts + * + * @return extracted number (numeric part) + */ int cutItemToInt(char *in, char sep, int num) { char tmp[64]; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/util/cut.h mplayer-1.0~rc4.dfsg1+svn34540/gui/util/cut.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/util/cut.h 2011-03-29 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/util/cut.h 2011-09-06 12:11:23.000000000 +0000 @@ -21,6 +21,11 @@ #include +/** + * @def cutItem(in, out, sep, num) + * Wraps #cutItemString(): + * Extract a part of a string delimited by a separator character at most the size of @a out. + */ #define cutItem(in, out, sep, num) cutItemString(in, out, sep, num, sizeof(out)) void cutItemString(char *in, char *out, char sep, int num, size_t maxout); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/util/list.c mplayer-1.0~rc4.dfsg1+svn34540/gui/util/list.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/util/list.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/util/list.c 2011-07-07 14:13:17.000000000 +0000 @@ -0,0 +1,238 @@ +/* + * 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 "list.h" +#include "string.h" + +plItem *plList; +plItem *plCurrent; +plItem *plLastPlayed; + +urlItem *urlList; + +void *listSet(int cmd, void *vparam) +{ + plItem *item = (plItem *)vparam; + urlItem *url_item = (urlItem *)vparam; + int is_added = 1; + + switch (cmd) { + // handle playlist + + // add item to playlist + case gtkAddPlItem: + if (plList) { + plItem *next = plList; + + while (next->next) +// { +// printf( "%s\n",next->name ); + next = next->next; +// } + + next->next = item; + item->prev = next; + item->next = NULL; + } else { + item->prev = item->next = NULL; + plCurrent = plList = item; + } + return NULL; + + // add item into playlist after current + case gtkInsertPlItem: + if (plCurrent) { + plItem *curr = plCurrent; + item->next = curr->next; + + if (item->next) + item->next->prev = item; + + item->prev = curr; + curr->next = item; + plCurrent = plCurrent->next; + + return plCurrent; + } else + return listSet(gtkAddPlItem, item); + + // get next item from playlist + case gtkGetNextPlItem: + if (plCurrent && plCurrent->next) { + plCurrent = plCurrent->next; +// if (!plCurrent && plList) +// { +// plItem *next = plList; +// +// while (next->next) +// { +// if (!next->next) break; +// next = next->next; +// } +// +// plCurrent = next; +// } + return plCurrent; + } + return NULL; + + // get previous item from playlist + case gtkGetPrevPlItem: + if (plCurrent && plCurrent->prev) { + plCurrent = plCurrent->prev; +// if ( !plCurrent && plList ) plCurrent=plList; + return plCurrent; + } + return NULL; + + // set current item + case gtkSetCurrPlItem: + plCurrent = item; + return plCurrent; + + // get current item + case gtkGetCurrPlItem: + return plCurrent; + + // delete current item + case gtkDelCurrPlItem: + { + plItem *curr = plCurrent; + + if (!curr) + return NULL; + + if (curr->prev) + curr->prev->next = curr->next; + if (curr->next) + curr->next->prev = curr->prev; + if (curr == plList) + plList = curr->next; + + plCurrent = curr->next; + + // free it + free(curr->path); + free(curr->name); + free(curr); + } + //uiCurr(); // instead of using uiNext && uiPrev + return plCurrent; + + // delete list + case gtkDelPl: + { + plItem *curr = plList; + plItem *next; + + if (!plList) + return NULL; + + if (!curr->next) { + free(curr->path); + free(curr->name); + free(curr); + } else { + while (curr->next) { + next = curr->next; + free(curr->path); + free(curr->name); + free(curr); + curr = next; + } + } + + plList = NULL; + plCurrent = NULL; + } + return NULL; + + // handle url + case gtkAddURLItem: + if (urlList) { + urlItem *next_url = urlList; + is_added = 0; + + while (next_url->next) { + if (!gstrcmp(next_url->url, url_item->url)) { + is_added = 1; + break; + } + + next_url = next_url->next; + } + + if (!is_added && gstrcmp(next_url->url, url_item->url)) + next_url->next = url_item; + } else { + url_item->next = NULL; + urlList = url_item; + } + return NULL; + } + + return NULL; +} + +/** + * \brief This actually creates a new list containing only one element... + */ +void gaddlist(char ***list, const char *entry) +{ + int i; + + if (*list) { + for (i = 0; (*list)[i]; i++) + free((*list)[i]); + + free(*list); + } + + *list = malloc(2 * sizeof(char **)); + (*list)[0] = gstrdup(entry); + (*list)[1] = NULL; +} + +/** + * \brief This replaces a string starting with search by replace. + * If not found, replace is appended. + */ +void greplace(char ***list, const char *search, const char *replace) +{ + int i = 0; + int len = (search ? strlen(search) : 0); + + if (*list) { + for (i = 0; (*list)[i]; i++) { + if (search && (strncmp((*list)[i], search, len) == 0)) { + free((*list)[i]); + (*list)[i] = gstrdup(replace); + return; + } + } + + *list = realloc(*list, (i + 2) * sizeof(char *)); + } else + *list = malloc(2 * sizeof(char *)); + + (*list)[i] = gstrdup(replace); + (*list)[i + 1] = NULL; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/util/list.h mplayer-1.0~rc4.dfsg1+svn34540/gui/util/list.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/util/list.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/util/list.h 2011-07-07 14:13:17.000000000 +0000 @@ -0,0 +1,53 @@ +/* + * 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_GUI_LIST_H +#define MPLAYER_GUI_LIST_H + +#define gtkAddPlItem 5 +#define gtkGetNextPlItem 6 +#define gtkGetPrevPlItem 7 +#define gtkGetCurrPlItem 8 +#define gtkDelPl 9 +#define gtkDelCurrPlItem 23 +#define gtkInsertPlItem 24 +#define gtkSetCurrPlItem 25 +#define gtkAddURLItem 15 + +typedef struct plItem { + struct plItem *prev, *next; + char *path; + char *name; +} plItem; + +typedef struct urlItem { + struct urlItem *next; + char *url; +} urlItem; + +extern plItem *plList; +extern plItem *plCurrent; +extern plItem *plLastPlayed; + +extern urlItem *urlList; + +void gaddlist(char ***list, const char *entry); +void greplace(char ***list, const char *search, const char *replace); +void *listSet(int cmd, void *vparam); + +#endif /* MPLAYER_GUI_LIST_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/util/mem.h mplayer-1.0~rc4.dfsg1+svn34540/gui/util/mem.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/util/mem.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/util/mem.h 2011-09-06 08:52:01.000000000 +0000 @@ -0,0 +1,35 @@ +/* + * 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. + */ + +/** + * @file + * @brief Memory management helpers + */ + +#ifndef MPLAYER_GUI_MEM_H +#define MPLAYER_GUI_MEM_H + +#include + +/** + * @def nfree(p) + * Free @a p and set it to NULL. + */ +#define nfree(p) do { free(p); p = NULL; } while (0) + +#endif /* MPLAYER_GUI_MEM_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/util/string.c mplayer-1.0~rc4.dfsg1+svn34540/gui/util/string.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/util/string.c 2011-04-01 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/util/string.c 2011-12-31 12:38:52.000000000 +0000 @@ -16,8 +16,27 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include +#include +#include + #include "string.h" +#include "gui/interface.h" +#include "config.h" +#include "help_mp.h" +#include "libavutil/avstring.h" +#include "stream/stream.h" + +/** + * @brief Convert a string to lower case. + * + * @param string to be converted + * + * @return converted string + * + * @note Only characters from A to Z will be converted and this is an in-place conversion. + */ char *strlower(char *in) { char *p = in; @@ -32,6 +51,17 @@ return in; } +/** + * @brief Swap characters in a string. + * + * @param in string to be processed + * @param from character to be swapped + * @param to character to swap in + * + * @return processed string + * + * @note All occurrences will be swapped and this is an in-place processing. + */ char *strswap(char *in, char from, char to) { char *p = in; @@ -46,6 +76,16 @@ return in; } +/** + * @brief Remove all space characters from a string, + * but leave text enclosed in quotation marks untouched. + * + * @param in string to be processed + * + * @return processed string + * + * @note This is an in-place processing. + */ char *trim(char *in) { char *src, *dest; @@ -68,6 +108,19 @@ return in; } +/** + * @brief Remove a comment from a string, + * but leave text enclosed in quotation marks untouched. + * + * A comment starts either with a semicolon anywhere in the string + * or with a number sign character at the very beginning. + * + * @param in string to be processed + * + * @return string without comment + * + * @note This is an in-place processing, i.e. @a in will be shortened. + */ char *decomment(char *in) { char *p; @@ -92,3 +145,185 @@ return in; } + +char *gstrchr(const char *str, int c) +{ + if (!str) + return NULL; + + return strchr(str, c); +} + +int gstrcmp(const char *a, const char *b) +{ + if (!a && !b) + return 0; + if (!a || !b) + return -1; + + return strcmp(a, b); +} + +int gstrcasecmp(const char *a, const char *b) +{ + if (!a && !b) + return 0; + if (!a || !b) + return -1; + + return strcasecmp(a, b); +} + +int gstrncmp(const char *a, const char *b, int n) +{ + if (!a && !b) + return 0; + if (!a || !b) + return -1; + + return strncmp(a, b, n); +} + +/** + * @brief Duplicate a string. + * + * If @a str is NULL, it returns NULL. + * The string is duplicated by calling strdup(). + * + * @param str string to be duplicated + * + * @return duplicated string (newly allocated) + */ +char *gstrdup(const char *str) +{ + if (!str) + return NULL; + + return strdup(str); +} + +/** + * @brief Assign a duplicated string. + * + * The string is duplicated by calling #gstrdup(). + * + * @note @a *old is freed prior to the assignment. + * + * @param old pointer to a variable suitable to store the new pointer + * @param str string to be duplicated + */ +void setdup(char **old, const char *str) +{ + free(*old); + *old = gstrdup(str); +} + +/** + * @brief Assign a newly allocated string + * containing the path created from a directory and a filename. + * + * @note @a *old is freed prior to the assignment. + * + * @param old pointer to a variable suitable to store the new pointer + * @param dir directory + * @param name filename + */ +void setddup(char **old, const char *dir, const char *name) +{ + free(*old); + *old = malloc(strlen(dir) + strlen(name) + 2); + if (*old) + sprintf(*old, "%s/%s", dir, name); +} + +/** + * @brief Convert #guiInfo member Filename. + * + * @param how 0 (cut file path and extension), + * 1 (additionally, convert lower case) or + * 2 (additionally, convert upper case) + * @param fname pointer to a buffer to receive the converted Filename + * @param maxlen size of @a fname buffer + * + * @return pointer to @a fname buffer + */ +char *TranslateFilename(int how, char *fname, size_t maxlen) +{ + char *p; + size_t len; + + switch (guiInfo.StreamType) { + case STREAMTYPE_FILE: + if (guiInfo.Filename && *guiInfo.Filename) { + p = strrchr(guiInfo.Filename, +#if HAVE_DOS_PATHS + '\\'); +#else + '/'); +#endif + + if (p) + av_strlcpy(fname, p + 1, maxlen); + else + av_strlcpy(fname, guiInfo.Filename, maxlen); + + len = strlen(fname); + + if (len > 3 && fname[len - 3] == '.') + fname[len - 3] = 0; + else if (len > 4 && fname[len - 4] == '.') + fname[len - 4] = 0; + else if (len > 5 && fname[len - 5] == '.') + fname[len - 5] = 0; + } else + av_strlcpy(fname, MSGTR_NoFileLoaded, maxlen); + break; + + case STREAMTYPE_STREAM: + av_strlcpy(fname, guiInfo.Filename, maxlen); + break; + +#ifdef CONFIG_CDDA + case STREAMTYPE_CDDA: + snprintf(fname, maxlen, MSGTR_Title, guiInfo.Track); + break; +#endif + +#ifdef CONFIG_VCD + case STREAMTYPE_VCD: + snprintf(fname, maxlen, MSGTR_Title, guiInfo.Track - 1); + break; +#endif + +#ifdef CONFIG_DVDREAD + case STREAMTYPE_DVD: + if (guiInfo.Chapter) + snprintf(fname, maxlen, MSGTR_Chapter, guiInfo.Chapter); + else + av_strlcat(fname, MSGTR_NoChapter, maxlen); + break; +#endif + + default: + av_strlcpy(fname, MSGTR_NoMediaOpened, maxlen); + break; + } + + if (how) { + p = fname; + + while (*p) { + char t = 0; + + if (how == 1 && *p >= 'A' && *p <= 'Z') + t = 32; + if (how == 2 && *p >= 'a' && *p <= 'z') + t = -32; + + *p = *p + t; + p++; + } + } + + return fname; +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/util/string.h mplayer-1.0~rc4.dfsg1+svn34540/gui/util/string.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/util/string.h 2011-03-31 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/util/string.h 2011-10-26 15:40:47.000000000 +0000 @@ -20,8 +20,16 @@ #define MPLAYER_GUI_STRING_H char *decomment(char *in); +int gstrcasecmp(const char *a, const char *b); +char *gstrchr(const char *str, int c); +int gstrcmp(const char *a, const char *b); +char *gstrdup(const char *str); +int gstrncmp(const char *a, const char *b, int n); +void setddup(char **old, const char *dir, const char *name); +void setdup(char **old, const char *str); char *strlower(char *in); char *strswap(char *in, char from, char to); +char *TranslateFilename(int how, char *fname, size_t maxlen); char *trim(char *in); #endif /* MPLAYER_GUI_STRING_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/dialogs.c mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/dialogs.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/dialogs.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/dialogs.c 2011-12-29 13:59:05.000000000 +0000 @@ -25,6 +25,7 @@ #include #include "path.h" #include "gui/interface.h" +#include "gui/ui/actions.h" #include "mp_msg.h" #include "help_mp.h" #include "mpcommon.h" @@ -44,13 +45,10 @@ guiInterface_t guiInfo; int addurl = 0; -void guiLoadSubtitle(char *name) +void mplayerLoadSubtitle(const char *name) { - if (!guiInfo.Playing) - { - guiInfo.SubtitleChanged = 1; - return; - } + if (!guiInfo.Playing) return; + if (subdata) { mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_DeletingSubtitles); @@ -78,7 +76,7 @@ if (name) { mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_LoadingSubtitles, name); - subdata = sub_read_file(strdup(name), guiInfo.FPS); + subdata = sub_read_file(strdup(name), (guiInfo.sh_video ? guiInfo.sh_video->fps : 0)); if (!subdata) mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub,name); sub_name = (malloc(2 * sizeof(char*))); /* when mplayer will be restarted */ sub_name[0] = strdup(name); /* sub_name[0] will be read */ @@ -112,7 +110,7 @@ "Avisynth Scripts (*.avs)\0*.avs\0" "Audio Files (*.mp3;*.wav;*.ra)\0*.mp3;*.wav;*.ra\000"; fileopen.nFilterIndex = 0; - fileopen.lpstrTitle = "Add file(s)..."; + fileopen.lpstrTitle = acp(MSGTR_FileSelect); fileopen.Flags = OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST| OFN_LONGNAMES | OFN_EXPLORER| OFN_READONLY | OFN_HIDEREADONLY; fileopen.lpstrFile = filelist; fileopen.lpstrCustomFilter = NULL; @@ -129,10 +127,13 @@ do { filespec = &fileopen.lpstrFile[fileopen.nFileOffset]; - filename[0] = 0; - strcat(filename, directory); - strcat(filename, "\\"); - strcat(filename, filespec); + strcpy(filename, directory); + + if (*filespec) + { + strcat(filename, "/"); + strcat(filename, filespec); + } if (GetFileAttributes(filename) & FILE_ATTRIBUTE_DIRECTORY) mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] %s is a directory, skipping...\n", filename); @@ -170,14 +171,14 @@ subtitleopen.lpstrFilter = "All Files (*.*)\0*.*\0" "Subtitle Files (*.srt;*.txt;*.vob)\0*.srt;*.txt;*.vob\0"; subtitleopen.nFilterIndex = 0; - subtitleopen.lpstrTitle = "Add Subtitle..."; + subtitleopen.lpstrTitle = acp(MSGTR_SubtitleSelect); subtitleopen.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_EXPLORER | OFN_READONLY | OFN_HIDEREADONLY; subtitleopen.lpstrFile = subtitlefile; subtitleopen.lpstrCustomFilter = NULL; subtitleopen.nMaxFile = MAXFILE; if(GetOpenFileName(&subtitleopen)) - guiLoadSubtitle(subtitlefile); + mplayerLoadSubtitle(subtitlefile); } static void display_loadplaylistwindow(gui_t *gui) @@ -194,7 +195,7 @@ playlistopen.lpstrFilter = "All Files (*.*)\0*.*\0" "Playlist Files (*.m3u;*.pls;*.txt)\0*.m3u;*.pls;*.txt\0"; playlistopen.nFilterIndex = 0; - playlistopen.lpstrTitle = "Load Playlist..."; + playlistopen.lpstrTitle = acp(MSGTR_PlaylistSelect); playlistopen.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_EXPLORER | OFN_READONLY | OFN_HIDEREADONLY; playlistopen.lpstrFile = playlistfile; playlistopen.lpstrCustomFilter = NULL; @@ -221,7 +222,7 @@ playlistsave.hInstance = GetModuleHandle(NULL); playlistsave.lpstrFilter = "Playlist Files (*.pls)\0*.pls\0"; playlistsave.nFilterIndex = 0; - playlistsave.lpstrTitle = "Save Playlist..."; + playlistsave.lpstrTitle = acp(MSGTR_PlaylistSave); playlistsave.Flags = OFN_LONGNAMES | OFN_EXPLORER | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY; playlistsave.lpstrFile = playlistname; playlistsave.lpstrCustomFilter = NULL; @@ -269,7 +270,7 @@ switch (iMsg) { case WM_CREATE: - wdg = CreateWindow("button", "Ok", + wdg = CreateWindow("button", acp(MSGTR_Ok), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 4, 43, 80, 25, hwnd, (HMENU) ID_OK, @@ -277,7 +278,7 @@ NULL); SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - wdg = CreateWindow("button", "Cancel", + wdg = CreateWindow("button", acp(MSGTR_Cancel), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 90, 43, 80, 25, hwnd, (HMENU) ID_CANCEL, @@ -359,7 +360,7 @@ switch (LOWORD(wParam)) { case VK_RETURN: - SendMessage(FindWindow(NULL, "MPlayer - Open URL..."), WM_COMMAND, (WPARAM) ID_OK, 0); + SendMessage(FindWindow(NULL, acp(MSGTR_Network)), WM_COMMAND, (WPARAM) ID_OK, 0); break; } } @@ -374,7 +375,7 @@ int x, y; if(add) addurl = 1; - if(FindWindow(NULL, "MPlayer - Open URL...")) return; + if(FindWindow(NULL, acp(MSGTR_Network))) return; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = OpenUrlWndProc; wc.cbClsExtra = 0; @@ -383,13 +384,13 @@ wc.hCursor = LoadCursor(NULL,IDC_ARROW); wc.hIcon = gui->icon; wc.hbrBackground = SOLID_GREY2; - wc.lpszClassName = "MPlayer - URL"; + wc.lpszClassName = acp(MSGTR_Network); wc.lpszMenuName = NULL; RegisterClass(&wc); x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (320 / 2); y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (100 / 2); - hWnd = CreateWindow("MPlayer - URL", - "MPlayer - Open URL...", + hWnd = CreateWindow(acp(MSGTR_Network), + acp(MSGTR_Network), WS_POPUPWINDOW | WS_CAPTION, x, y, @@ -399,7 +400,7 @@ NULL, hInstance, NULL); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui); ShowWindow(hWnd, SW_SHOW); UpdateWindow(hWnd); } @@ -407,13 +408,13 @@ static void create_playlistmenu(gui_t *gui) { gui->playlistmenu = CreatePopupMenu(); - AppendMenu(gui->playlistmenu, MF_STRING, ID_ADDFILE, "Add File..."); - AppendMenu(gui->playlistmenu, MF_STRING, ID_ADDURL, "Add Url..."); + AppendMenu(gui->playlistmenu, MF_STRING, ID_ADDFILE, acp(MSGTR_PLAYLIST_AddFile)); + AppendMenu(gui->playlistmenu, MF_STRING, ID_ADDURL, acp(MSGTR_PLAYLIST_AddURL)); AppendMenu(gui->playlistmenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->playlistmenu, MF_STRING, ID_REMOVE, "Remove Selected"); - AppendMenu(gui->playlistmenu, MF_STRING, ID_CLEAR, "Clear Playlist"); + AppendMenu(gui->playlistmenu, MF_STRING, ID_REMOVE, acp(MSGTR_Remove)); + AppendMenu(gui->playlistmenu, MF_STRING, ID_CLEAR, acp(MSGTR_Clear)); AppendMenu(gui->playlistmenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->playlistmenu, MF_STRING, ID_CLOSE, "Close"); + AppendMenu(gui->playlistmenu, MF_STRING, ID_CLOSE, acp(MSGTR_Close)); } static void updatetracklist(HWND hwnd) @@ -439,7 +440,7 @@ { case WM_CREATE: { - wdg = CreateWindow("button", "Play", + wdg = CreateWindow("button", acp(MSGTR_MENU_Play), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 4, 10, 80, 25, hwnd, (HMENU) ID_PLAY, @@ -447,7 +448,7 @@ NULL); SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - wdg = CreateWindow ("button", "Up", + wdg = CreateWindow ("button", acp(MSGTR_Up), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 4, 37, 80, 25, hwnd, (HMENU) ID_UP, @@ -455,7 +456,7 @@ NULL); SendMessage(wdg, WM_SETFONT,(WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - wdg = CreateWindow ("button", "Down", + wdg = CreateWindow ("button", acp(MSGTR_Down), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 4, 64, 80, 25, hwnd, (HMENU) ID_DOWN, @@ -463,7 +464,7 @@ NULL); SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0); - wdg = CreateWindow ("button", "Remove", + wdg = CreateWindow ("button", acp(MSGTR_Remove), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 4, 91, 80, 25, hwnd, (HMENU) ID_REMOVE, @@ -471,7 +472,7 @@ NULL); SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0); - wdg = CreateWindow ("button", "Load", + wdg = CreateWindow ("button", acp(MSGTR_Load), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 4, 118, 80, 25, hwnd, (HMENU) ID_PLAYLISTLOAD, @@ -479,7 +480,7 @@ NULL); SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0); - wdg = CreateWindow ("button", "Save", + wdg = CreateWindow ("button", acp(MSGTR_Save), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 4, 145, 80, 25, hwnd, (HMENU) ID_PLAYLISTSAVE, @@ -487,7 +488,7 @@ NULL); SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0); - wdg = CreateWindow ("button", "Close", + wdg = CreateWindow ("button", acp(MSGTR_Close), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 4, 193, 80, 25, hwnd, (HMENU) ID_CLOSE, @@ -525,7 +526,7 @@ { case ID_PLAY: if(selected) pl->current = selected - 1; - uiSetFileName(NULL, pl->tracks[pl->current]->filename, STREAMTYPE_STREAM); + uiSetFileName(NULL, pl->tracks[pl->current]->filename, STREAMTYPE_FILE); gui->startplay(gui); } return 0; @@ -609,13 +610,13 @@ void update_playlistwindow(void) { - HWND hWnd = FindWindow(NULL, "MPlayer Playlist"); + HWND hWnd = FindWindow(NULL, acp(MSGTR_PlayList)); if (hWnd) updatetracklist(hWnd); } void display_playlistwindow(gui_t *gui) { - HWND hWnd = FindWindow(NULL, "MPlayer Playlist"); + HWND hWnd = FindWindow(NULL, acp(MSGTR_PlayList)); HINSTANCE hInstance = GetModuleHandle(NULL); WNDCLASS wc; int x, y; @@ -634,14 +635,14 @@ wc.hCursor = LoadCursor(NULL,IDC_ARROW); wc.hIcon = gui->icon; wc.hbrBackground = SOLID_GREY2; - wc.lpszClassName = "MPlayer - Playlist"; + wc.lpszClassName = acp(MSGTR_PlayList); wc.lpszMenuName = NULL; RegisterClass(&wc); create_playlistmenu(gui); x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (400 / 2); /* Erik: center popup window on screen */ y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (254 / 2); - hWnd = CreateWindow("MPlayer - Playlist", - "MPlayer Playlist", + hWnd = CreateWindow(acp(MSGTR_PlayList), + acp(MSGTR_PlayList), WS_POPUPWINDOW | WS_CAPTION | WS_MINIMIZEBOX, x, y, @@ -651,7 +652,7 @@ NULL, hInstance, NULL); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD)gui); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)gui); updatetracklist(hWnd); DragAcceptFiles(hWnd,TRUE); ShowWindow(hWnd, SW_SHOW); @@ -662,7 +663,7 @@ { static HWND listbox; static char skinspath[MAX_PATH]; - gui_t* gui = (gui_t*) GetWindowLongPtr(hwnd, GWLP_USERDATA); + gui_t* mygui = (gui_t*) GetWindowLongPtr(hwnd, GWLP_USERDATA); switch (iMsg) { case WM_CREATE: @@ -708,19 +709,19 @@ int len = SendMessage(listbox, LB_GETTEXTLEN, index, 0); if (len) { - if (guiInfo.Playing) guiGetEvent(guiSetState, (void *) GUI_STOP); + if (guiInfo.Playing) gui(GUI_SET_STATE, (void *) GUI_STOP); free(skinName); skinName = malloc(len + 1); SendMessage(listbox, LB_GETTEXT, (WPARAM) index, (LPARAM) skinName); /* fill out the full pathname to the skin */ strcpy(skinspath, get_path("skins")); - strcat(skinspath, "\\"); + strcat(skinspath, "/"); strcat(skinspath, skinName); ShowWindow(hwnd, SW_HIDE); Shell_NotifyIcon(NIM_DELETE, &nid); - destroy_window(gui); - create_window(gui, skinspath); - create_subwindow(gui, skinspath); + destroy_window(mygui); + create_window(mygui, skinspath); + create_subwindow(mygui); SendMessage(hwnd, WM_CLOSE, 0, 0); /* Avoid crashing when switching skin */ } } @@ -733,7 +734,7 @@ void display_skinbrowser(gui_t* gui) { - HWND hWnd = FindWindow(NULL, "Skin Browser"); + HWND hWnd = FindWindow(NULL, acp(MSGTR_SkinBrowser)); HINSTANCE hInstance = GetModuleHandle(NULL); WNDCLASS wc; int x, y; @@ -752,13 +753,13 @@ wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hIcon = gui->icon; wc.hbrBackground = SOLID_GREY2; - wc.lpszClassName = "Skin Browser"; + wc.lpszClassName = acp(MSGTR_SkinBrowser); wc.lpszMenuName = NULL; RegisterClass(&wc); x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (180 / 2); y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (102 / 2); - hWnd = CreateWindow("Skin Browser", - "Skin Browser", + hWnd = CreateWindow(acp(MSGTR_SkinBrowser), + acp(MSGTR_SkinBrowser), WS_POPUPWINDOW |WS_CAPTION, x, y, @@ -768,7 +769,7 @@ NULL, hInstance, NULL); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui); ShowWindow(hWnd, SW_SHOW); UpdateWindow(hWnd); } @@ -786,7 +787,7 @@ switch (iMsg) { case WM_CREATE: - wdg = CreateWindow("button", "Ok", + wdg = CreateWindow("button", acp(MSGTR_Ok), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 4, 43, 80, 25, hwnd, (HMENU) ID_OK, @@ -794,7 +795,7 @@ NULL); SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - wdg = CreateWindow("button", "Cancel", + wdg = CreateWindow("button", acp(MSGTR_Cancel), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 90, 43, 80, 25, hwnd, (HMENU) ID_CANCEL, @@ -821,17 +822,17 @@ NULL); SendMessage(chapter, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - for (i=0; istartplay(gui); DestroyWindow(hwnd); @@ -871,7 +872,7 @@ int x, y; if (guiInfo.StreamType != STREAMTYPE_DVD) return; - if (FindWindow(NULL, "Select Title/Chapter...")) return; + if (FindWindow(NULL, acp(MSGTR_SelectTitleChapter))) return; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = TitleChapterWndProc; @@ -881,13 +882,13 @@ wc.hCursor = LoadCursor(NULL,IDC_ARROW); wc.hIcon = gui->icon; wc.hbrBackground = SOLID_GREY2; - wc.lpszClassName = "Select Title/Chapter..."; + wc.lpszClassName = acp(MSGTR_SelectTitleChapter); wc.lpszMenuName = NULL; RegisterClass(&wc); x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (180 / 2); y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (100 / 2); - hWnd = CreateWindow("Select Title/Chapter...", - "Select Title/Chapter...", + hWnd = CreateWindow(acp(MSGTR_SelectTitleChapter), + acp(MSGTR_SelectTitleChapter), WS_POPUPWINDOW | WS_CAPTION, x, y, @@ -897,7 +898,7 @@ NULL, hInstance, NULL); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui); ShowWindow(hWnd, SW_SHOW); UpdateWindow(hWnd); } @@ -911,7 +912,7 @@ { case WM_CREATE: { - btn = CreateWindow("button", "Reset", + btn = CreateWindow("button", acp(MSGTR_Clear), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 157, 143, 80, 25, hwnd, (HMENU) ID_DEFAULTS, @@ -919,7 +920,7 @@ NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Close", + btn = CreateWindow("button", acp(MSGTR_Close), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 243, 143, 80, 25, hwnd, (HMENU) ID_CLOSE, @@ -927,7 +928,7 @@ NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - label = CreateWindow("static", "Brightness", + label = CreateWindow("static", acp(MSGTR_EQU_Brightness), WS_CHILD | WS_VISIBLE, 12, 122, 70, 15, hwnd, NULL, @@ -935,7 +936,7 @@ NULL); SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - label = CreateWindow("static", "Contrast", + label = CreateWindow("static", acp(MSGTR_EQU_Contrast), WS_CHILD | WS_VISIBLE, 99, 122, 70, 15, hwnd, NULL, @@ -943,14 +944,14 @@ NULL); SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - label = CreateWindow("static", "Hue", + label = CreateWindow("static", acp(MSGTR_EQU_Hue), WS_CHILD | WS_VISIBLE, 191, 122, 70, 15, hwnd, NULL, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - label = CreateWindow("static", "Saturation", + label = CreateWindow("static", acp(MSGTR_EQU_Saturation), WS_CHILD | WS_VISIBLE, 260, 122, 70, 15, hwnd, NULL, @@ -1086,7 +1087,7 @@ int x, y; if(!guiInfo.sh_video) return; - if(FindWindow(NULL, "MPlayer - Equalizer")) return; + if(FindWindow(NULL, acp(MSGTR_Equalizer))) return; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = EqWndProc; wc.cbClsExtra = 0; @@ -1095,13 +1096,13 @@ wc.hCursor = LoadCursor(NULL,IDC_ARROW); wc.hIcon = gui->icon; wc.hbrBackground = SOLID_GREY2; - wc.lpszClassName = "MPlayer - Equalizer"; + wc.lpszClassName = acp(MSGTR_Equalizer); wc.lpszMenuName = NULL; RegisterClass(&wc); x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (332 / 2); y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (200 / 2); - hWnd = CreateWindow("MPlayer - Equalizer", - "MPlayer - Equalizer", + hWnd = CreateWindow(acp(MSGTR_Equalizer), + acp(MSGTR_Equalizer), WS_POPUPWINDOW | WS_CAPTION, x, y, @@ -1111,7 +1112,7 @@ NULL, hInstance, NULL); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui); ShowWindow(hWnd, SW_SHOW); UpdateWindow(hWnd); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/dialogs.h mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/dialogs.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/dialogs.h 2011-05-07 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/dialogs.h 2011-12-31 13:15:30.000000000 +0000 @@ -36,10 +36,10 @@ #define MAXFILE 1024 -#define COPYRIGHT " MPlayer GUI for Windows\n\n" \ - " Copyright (c) 2003 Sascha Sommer\n" \ - " Copyright (c) 2006 Erik Augustson\n" \ - " Copyright (c) 2006 Gianluigi Tiesi" +#define COPYRIGHT "MPlayer GUI for Windows\n\n" \ + "Copyright (c) 2003 Sascha Sommer\n" \ + "Copyright (c) 2006 Erik Augustson\n" \ + "Copyright (c) 2006 Gianluigi Tiesi" #define ONLINE_HELP_URL "http://www.mplayerhq.hu/DOCS/HTML/en/index.html" @@ -68,8 +68,6 @@ #define ID_OSD1 34 #define ID_OSD2 35 #define ID_OSD3 36 -#define ID_DVDDEVICE 37 -#define ID_CDDEVICE 38 #define ID_PRIO 39 #define ID_URL 40 #define ID_TITLESEL 41 @@ -122,6 +120,7 @@ #define ID_TIMER 88 #define ID_MUTE 89 #define ID_FULLSCREEN 90 +#define ID_IDLE 91 /* gtk emulation */ #define GTK_MB_FATAL 0x1 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/gui.c mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/gui.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/gui.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/gui.c 2012-01-10 13:28:15.000000000 +0000 @@ -41,9 +41,12 @@ #include "libvo/video_out.h" #include "libmpcodecs/vd.h" #include "gui/interface.h" +#include "gui/ui/actions.h" #include "gui/ui/gmplayer.h" +#include "gui/util/mem.h" #include "gui.h" #include "dialogs.h" +#include "version.h" // HACK around bug in old mingw #undef INVALID_FILE_ATTRIBUTES @@ -66,6 +69,53 @@ static HBRUSH colorbrush = NULL; //Handle to colorkey brush static COLORREF windowcolor = RGB(255,0,255); //Windowcolor == colorkey +/** + * @brief Convert an UTF-8 encoded string into ANSI codepage encoding. + * + * @param utf8 UTF-8 encoded string + * + * @return string containing ANSI codepage encoding of @a utf8 (or, in case + * of error, a string containing the question mark character) + */ +LPSTR acp (LPCSTR utf8) +{ + static LPSTR acp_str = NULL; + int chars; + LPWSTR uc_str; + + chars = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0); + + if (chars) + { + uc_str = malloc(sizeof(*uc_str) * (chars + 1)); + + if (uc_str) + { + MultiByteToWideChar(CP_UTF8, 0, utf8, -1, uc_str, chars); + + chars = WideCharToMultiByte(CP_ACP, 0, uc_str, -1, NULL, 0, NULL, 0); + + if (chars) + { + free(acp_str); + acp_str = malloc(sizeof(*acp_str) * (chars + 1)); + + if (acp_str) + { + WideCharToMultiByte(CP_ACP, 0, uc_str, -1, acp_str, chars, NULL, 0); + free(uc_str); + + return acp_str; + } + } + + free(uc_str); + } + } + + return "?"; +} + static void console_toggle(void) { if (console_state) @@ -126,6 +176,12 @@ filename[i] = tolower(filename[i]); } } +static void display_about_box(HWND hWnd) +{ + char about_msg[512]; + snprintf(about_msg, sizeof(about_msg), MP_TITLE "\n" COPYRIGHT, "MPlayer"); + MessageBox(hWnd, about_msg, acp(MSGTR_About), MB_OK); +} static image *get_drawground(HWND hwnd) { @@ -182,7 +238,7 @@ case evLoadPlay: case evLoad: if(display_openfilewindow(gui, 0) && (msg == evLoadPlay)) - handlemsg(hWnd, evDropFile); + gui->playercontrol(evLoadPlay); return; case evLoadSubtitle: display_opensubtitlewindow(gui); @@ -190,7 +246,7 @@ case evPreferences: display_prefswindow(gui); return; - case evPlayList: + case evPlaylist: display_playlistwindow(gui); return; case evSkinBrowser: @@ -200,7 +256,7 @@ display_eqwindow(gui); break; case evAbout: - MessageBox(hWnd, COPYRIGHT, "About", MB_OK); + display_about_box(hWnd); break; case evIconify: ShowWindow(hWnd, SW_MINIMIZE); @@ -278,17 +334,6 @@ if((time - oldtime) < 100) return; oldtime=time; - /* suppress directx's fullscreen window when using the sub window */ - if(sub_window && &video_driver_list[0] && strstr("directx", video_driver_list[0])) - { - HWND hWndFS = NULL; //handle to directx's fullscreen window - if(hWndFS == NULL) - { - hWndFS = FindWindow(NULL, "MPlayer Fullscreen"); - if(hWndFS != NULL) DestroyWindow(hWndFS); //sub window handles fullscreen - } - } - for (i=0; iwindow_priv_count; i++) { if(gui->window_priv[i]->hwnd == hwnd) @@ -378,7 +423,7 @@ BROWSEINFO bi; LPITEMIDLIST pidl; memset(&bi, 0, sizeof(BROWSEINFO)); - bi.lpszTitle = "Choose a Directory..."; + bi.lpszTitle = acp(MSGTR_DirectorySelect); pidl = SHBrowseForFolder(&bi); if (SHGetPathFromIDList(pidl, path)) { @@ -456,13 +501,13 @@ gui->playlist->add_track(gui->playlist, file, NULL, NULL, 0); } DragFinish((HDROP) wParam); - handlemsg(hWnd, evDropFile); + gui->playercontrol(evLoadPlay); } else { gui->playlist->clear_playlist(gui->playlist); gui->playlist->add_track(gui->playlist, (const char *) wParam, NULL, NULL, 0); - handlemsg(hWnd, evDropFile); + gui->playercontrol(evLoadPlay); } SetForegroundWindow(gui->subwindow); return 0; @@ -745,13 +790,13 @@ gui->playlist->add_track(gui->playlist, file, NULL, NULL, 0); } DragFinish((HDROP) wParam); - handlemsg(hWnd, evDropFile); + gui->playercontrol(evLoadPlay); } else { gui->playlist->clear_playlist(gui->playlist); gui->playlist->add_track(gui->playlist, (const char *) wParam, NULL, NULL, 0); - handlemsg(hWnd, evDropFile); + gui->playercontrol(evLoadPlay); } SetForegroundWindow(gui->mainwindow); return 0; @@ -802,10 +847,6 @@ POINT point; char device[MAX_PATH]; char searchpath[MAX_PATH]; - char searchpath2[MAX_PATH]; -#ifdef CONFIG_LIBCDIO - char searchpath3[MAX_PATH]; -#endif int len, pos = 0, cdromdrive = 0; UINT errmode; point.x = GET_X_LPARAM(lParam); @@ -821,23 +862,20 @@ { char volname[MAX_PATH]; char menuitem[MAX_PATH]; - int flags = MF_STRING; + int flags = MF_STRING, enable = 0; mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] checking %s for CD/VCD/SVCD/DVDs\n", device + pos); sprintf(searchpath, "%sVIDEO_TS", device + pos); - sprintf(searchpath2, "%sMpegav", device + pos); -#ifdef CONFIG_LIBCDIO - sprintf(searchpath3, "%sTrack01.cda", device + pos); -#endif if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES) - flags |= MF_ENABLED; - else if(GetFileAttributes(searchpath2) != INVALID_FILE_ATTRIBUTES) - flags |= MF_ENABLED; -#ifdef CONFIG_LIBCDIO - else if(GetFileAttributes(searchpath3) != INVALID_FILE_ATTRIBUTES) - flags |= MF_ENABLED; + enable = 1; + sprintf(searchpath, "%sMpegav", device + pos); + if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES) + enable = 1; +#ifdef CONFIG_CDDA + sprintf(searchpath, "%sTrack01.cda", device + pos); + if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES) + enable = 1; #endif - else - flags |= MF_GRAYED; + flags |= (enable ? MF_ENABLED : MF_GRAYED); volname[0] = 0; strcpy(menuitem, device + pos); menuitem[strlen(menuitem) - 1]=0; @@ -929,7 +967,7 @@ BROWSEINFO bi; LPITEMIDLIST pidl; memset(&bi, 0, sizeof(BROWSEINFO)); - bi.lpszTitle = "Choose a Directory..."; + bi.lpszTitle = acp(MSGTR_DirectorySelect); pidl = SHBrowseForFolder(&bi); if (SHGetPathFromIDList(pidl, path)) { @@ -976,7 +1014,7 @@ break; } case ID_PLAYLIST: - handlemsg(hWnd, evPlayList); + handlemsg(hWnd, evPlaylist); break; case ID_PREFS: handlemsg(hWnd, evPreferences); @@ -987,6 +1025,9 @@ case ID_ONLINEHELP: ShellExecute(NULL, "open", ONLINE_HELP_URL, NULL, NULL, SW_SHOWNORMAL); break; + case IDHELP_ABOUT: + handlemsg(hWnd, evAbout); + break; } if((IDPLAYDISK <= LOWORD(wParam)) && (LOWORD(wParam) < (IDPLAYDISK + 100))) { @@ -1007,14 +1048,13 @@ #ifdef CONFIG_DVDREAD free(dvd_device); dvd_device = strdup(device + pos); - dvd_title = dvd_chapter = dvd_angle = 1; handlemsg(hWnd, evPlayDVD); #endif } sprintf(searchpath, "%sTrack01.cda", device + pos); if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES) { -#ifdef CONFIG_LIBCDIO +#ifdef CONFIG_CDDA free(cdrom_device); cdrom_device = strdup(device + pos); /* mplayer doesn't seem to like the trailing \ after the device name */ @@ -1024,14 +1064,14 @@ } else { HANDLE searchhndl; WIN32_FIND_DATA finddata; - sprintf(searchpath, "%smpegav\\*.dat", device + pos); + sprintf(searchpath, "%smpegav/*.dat", device + pos); if((searchhndl=FindFirstFile(searchpath, &finddata)) != INVALID_HANDLE_VALUE) { mp_msg(MSGT_GPLAYER,MSGL_V, "Opening VCD/SVCD\n"); gui->playlist->clear_playlist(gui->playlist); do { - sprintf(filename, "%smpegav\\%s", device + pos, finddata.cFileName); + sprintf(filename, "%smpegav/%s", device + pos, finddata.cFileName); gui->playlist->add_track(gui->playlist, filename, NULL, NULL, 0); } while(FindNextFile(searchhndl, &finddata)); @@ -1070,7 +1110,7 @@ static void startplay(gui_t *gui) { - handlemsg(gui->mainwindow, evDropFile); + gui->playercontrol(evLoadPlay); } /* returns the bits per pixel of the desktop */ @@ -1117,8 +1157,7 @@ DeleteObject(gui->window_priv[i]->bitmap); free(gui->window_priv[i]); } - free(gui->window_priv); - gui->window_priv = NULL; + nfree(gui->window_priv); gui->window_priv_count = 0; /* destroy the main window */ @@ -1144,49 +1183,51 @@ gui->diskmenu = CreatePopupMenu(); gui->menu=CreatePopupMenu(); gui->trayplaymenu = CreatePopupMenu(); - AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT) gui->trayplaymenu, "Open..."); - AppendMenu(gui->trayplaymenu, MF_STRING, IDFILE_OPEN, "File..."); - AppendMenu(gui->trayplaymenu, MF_STRING, IDURL_OPEN, "Url..."); - AppendMenu(gui->trayplaymenu, MF_STRING, IDDIR_OPEN, "Directory..."); + AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, acp(MSGTR_MENU_Open)); + AppendMenu(gui->trayplaymenu, MF_STRING, IDFILE_OPEN, acp(MSGTR_MENU_PlayFile)); + AppendMenu(gui->trayplaymenu, MF_STRING, IDURL_OPEN, acp(MSGTR_MENU_PlayURL)); + AppendMenu(gui->trayplaymenu, MF_STRING, IDDIR_OPEN, acp(MSGTR_MENU_PlayDirectory)); AppendMenu(gui->menu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT) gui->diskmenu, "Play &CD/DVD/VCD/SVCD"); + AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT_PTR) gui->diskmenu, acp(MSGTR_MENU_PlayDisc)); AppendMenu(gui->menu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->menu, MF_STRING, IDSUBTITLE_OPEN, "Open Subtitle"); - AppendMenu(gui->menu, MF_STRING, ID_SKINBROWSER, "Skin Browser"); + AppendMenu(gui->menu, MF_STRING, IDSUBTITLE_OPEN, acp(MSGTR_MENU_LoadSubtitle)); + AppendMenu(gui->menu, MF_STRING, ID_SKINBROWSER, acp(MSGTR_MENU_SkinBrowser)); AppendMenu(gui->menu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->menu, MF_STRING, ID_PREFS, "Preferences"); - AppendMenu(gui->menu, MF_STRING, ID_CONSOLE, "Debug Console"); - AppendMenu(gui->menu, MF_STRING, ID_ONLINEHELP, "Online Help"); + AppendMenu(gui->menu, MF_STRING, ID_PREFS, acp(MSGTR_MENU_Preferences)); + AppendMenu(gui->menu, MF_STRING, ID_CONSOLE, acp(MSGTR_MENU_DebugConsole)); + AppendMenu(gui->menu, MF_STRING, ID_ONLINEHELP, acp(MSGTR_MENU_OnlineHelp)); + AppendMenu(gui->menu, MF_STRING, IDHELP_ABOUT, acp(MSGTR_MENU_AboutMPlayer)); AppendMenu(gui->menu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->menu, MF_STRING, IDEXIT, "&Exit"); + AppendMenu(gui->menu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit)); } static void create_traymenu(gui_t *gui) { gui->traymenu = CreatePopupMenu(); gui->trayplaybackmenu = CreatePopupMenu(); - AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT) gui->trayplaymenu, "Open..."); + AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, acp(MSGTR_MENU_Open)); AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT) gui->trayplaybackmenu, "Playback"); - AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKB, "Seek Backwards"); - AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PTRACK, "Previous Track"); - AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PLAY, "Play/Pause"); - AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_STOP, "Stop"); - AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_NTRACK, "Next Track"); - AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKF, "Seek Forwards"); + AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaybackmenu, acp(MSGTR_MENU_Playing)); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKB, acp(MSGTR_MENU_SeekBack)); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PTRACK, acp(MSGTR_MENU_PrevStream)); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PLAY, acp(MSGTR_MENU_Play "/" MSGTR_MENU_Pause)); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_STOP, acp(MSGTR_MENU_Stop)); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_NTRACK, acp(MSGTR_MENU_NextStream)); + AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKF, acp(MSGTR_MENU_SeekForw)); AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->traymenu, MF_STRING, ID_MUTE, "Toggle Mute"); + AppendMenu(gui->traymenu, MF_STRING, ID_MUTE, acp(MSGTR_MENU_Mute)); AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->traymenu, MF_STRING, IDSUBTITLE_OPEN, "Open Subtitle"); - AppendMenu(gui->traymenu, MF_STRING, ID_PLAYLIST, "Playlist"); + AppendMenu(gui->traymenu, MF_STRING, IDSUBTITLE_OPEN, acp(MSGTR_MENU_LoadSubtitle)); + AppendMenu(gui->traymenu, MF_STRING, ID_PLAYLIST, acp(MSGTR_MENU_PlayList)); AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->traymenu, MF_STRING, ID_SHOWHIDE, "Show/Hide"); + AppendMenu(gui->traymenu, MF_STRING, ID_SHOWHIDE, acp(MSGTR_MENU_ShowHide)); AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->traymenu, MF_STRING, ID_PREFS, "Preferences"); - AppendMenu(gui->traymenu, MF_STRING, ID_CONSOLE, "Debug Console"); - AppendMenu(gui->traymenu, MF_STRING, ID_ONLINEHELP, "Online Help"); + AppendMenu(gui->traymenu, MF_STRING, ID_PREFS, acp(MSGTR_MENU_Preferences)); + AppendMenu(gui->traymenu, MF_STRING, ID_CONSOLE, acp(MSGTR_MENU_DebugConsole)); + AppendMenu(gui->traymenu, MF_STRING, ID_ONLINEHELP, acp(MSGTR_MENU_OnlineHelp)); + AppendMenu(gui->traymenu, MF_STRING, IDHELP_ABOUT, acp(MSGTR_MENU_AboutMPlayer)); AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->traymenu, MF_STRING, IDEXIT, "&Exit"); + AppendMenu(gui->traymenu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit)); } static void create_submenu(gui_t *gui) @@ -1195,48 +1236,55 @@ gui->dvdmenu = CreatePopupMenu(); gui->aspectmenu = CreatePopupMenu(); gui->subtitlemenu = CreatePopupMenu(); - AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->trayplaymenu, "Open..."); + AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, acp(MSGTR_MENU_Open)); AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->submenu, MF_STRING, ID_SEEKB, "Seek Backwards"); - AppendMenu(gui->submenu, MF_STRING, ID_PTRACK, "Previous Track"); - AppendMenu(gui->submenu, MF_STRING, ID_PLAY, "Play/Pause"); - AppendMenu(gui->submenu, MF_STRING, ID_STOP, "Stop"); - AppendMenu(gui->submenu, MF_STRING, ID_NTRACK, "Next Track"); - AppendMenu(gui->submenu, MF_STRING, ID_SEEKF, "Seek Forwards"); + AppendMenu(gui->submenu, MF_STRING, ID_SEEKB, acp(MSGTR_MENU_SeekBack)); + AppendMenu(gui->submenu, MF_STRING, ID_PTRACK, acp(MSGTR_MENU_PrevStream)); + AppendMenu(gui->submenu, MF_STRING, ID_PLAY, acp(MSGTR_MENU_Play "/" MSGTR_MENU_Pause)); + AppendMenu(gui->submenu, MF_STRING, ID_STOP, acp(MSGTR_MENU_Stop)); + AppendMenu(gui->submenu, MF_STRING, ID_NTRACK, acp(MSGTR_MENU_NextStream)); + AppendMenu(gui->submenu, MF_STRING, ID_SEEKF, acp(MSGTR_MENU_SeekForw)); AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->submenu, MF_STRING, ID_FULLSCREEN, "Toggle Fullscreen"); - AppendMenu(gui->submenu, MF_STRING, ID_MUTE, "Toggle Mute"); + AppendMenu(gui->submenu, MF_STRING, ID_FULLSCREEN, acp(MSGTR_MENU_FullScreen)); + AppendMenu(gui->submenu, MF_STRING, ID_MUTE, acp(MSGTR_MENU_Mute)); AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->aspectmenu, "Aspect Ratio"); - AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->subtitlemenu, "Subtitle Options"); - AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->dvdmenu, "DVD Options"); + AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->aspectmenu, acp(MSGTR_MENU_AspectRatio)); + AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->subtitlemenu, acp(MSGTR_MENU_Subtitles)); + AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->dvdmenu, acp(MSGTR_MENU_DVD)); #ifdef CONFIG_DVDREAD - AppendMenu(gui->dvdmenu, MF_STRING | MF_GRAYED, ID_CHAPTERSEL, "Select Title/Chapter..."); + AppendMenu(gui->dvdmenu, MF_STRING | MF_GRAYED, ID_CHAPTERSEL, acp(MSGTR_SelectTitleChapter)); #endif - AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_TOGGLE, "Subtitle Visibility On/Off"); - AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_CYCLE, "Cycle Subtitle Languages"); - AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT1, "Set 16:9"); - AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT2, "Set 4:3"); - AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT3, "Set 2.35"); + AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_TOGGLE, acp(MSGTR_MENU_SubtitlesOnOff)); + AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_CYCLE, acp(MSGTR_MENU_SubtitleLanguages)); + AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT1, "16:9"); + AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT2, "4:3"); + AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT3, "2.35"); AppendMenu(gui->aspectmenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT4, "Original Aspect"); + AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT4, acp(MSGTR_MENU_Original)); AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0); - AppendMenu(gui->submenu, MF_STRING, IDEXIT, "&Exit"); + AppendMenu(gui->submenu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit)); } static void maketransparent(HWND hwnd, COLORREF crTransparent) { HDC mdc = GetDC(hwnd); - RECT rd; + RECT wrd, crd; HRGN crRgnres, crRgn, crRgnTmp; int iX = 0, iY = 0, iLeftX = 0; + int border, title; int width, height; - GetWindowRect(hwnd, &rd); - width = rd.right - rd.left; - height = rd.bottom - rd.top; - /* create an empty region */ - crRgn = CreateRectRgn(0, 0, 0, 0); + GetWindowRect(hwnd, &wrd); + GetClientRect(hwnd, &crd); + + border = (wrd.right - wrd.left - crd.right) / 2; + title = (wrd.bottom - wrd.top - crd.bottom) - border; + + width = crd.right - crd.left; + height = crd.bottom - crd.top; + + /* create the title bar region */ + crRgn = CreateRectRgn(0, 0, width + border + border, title); /* Create a region from a bitmap with transparency colour of Purple */ for (iY = -1; iY < height; iY++) @@ -1249,11 +1297,11 @@ /* remember this pixel */ iLeftX = iX; - /* now find first non transparent pixel */ + /* now find last non transparent pixel */ while (iX <= width && GetPixel(mdc,iX, iY) != crTransparent) ++iX; /* create a temp region on this info */ - crRgnTmp = CreateRectRgn(iLeftX, iY, iX, iY+1); + crRgnTmp = CreateRectRgn(iLeftX + border, iY + title, iX + border, iY + title + 1); /* combine into main region */ crRgnres = crRgn; @@ -1265,6 +1313,22 @@ } while (iX < width); iX = 0; } + + /* left border region */ + crRgnTmp = CreateRectRgn(0, title, border, title + height); + CombineRgn(crRgn, crRgn, crRgnTmp, RGN_OR); + DeleteObject(crRgnTmp); + + /* right border region */ + crRgnTmp = CreateRectRgn(width + border, title, width + border + border, title + height); + CombineRgn(crRgn, crRgn, crRgnTmp, RGN_OR); + DeleteObject(crRgnTmp); + + /* bottom region */ + crRgnTmp = CreateRectRgn(0, title + height, width + border + border, title + height + border); + CombineRgn(crRgn, crRgn, crRgnTmp, RGN_OR); + DeleteObject(crRgnTmp); + SetWindowRgn(hwnd, crRgn, TRUE); DeleteObject(crRgn); ReleaseDC(hwnd,mdc); @@ -1273,7 +1337,7 @@ static int window_render(gui_t *gui, HWND hWnd, HDC hdc, window_priv_t *priv, window *desc, BITMAPINFO binfo) { int i; - SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui); (gui->window_priv_count)++; gui->window_priv = realloc(gui->window_priv, sizeof(window_priv_t *) * gui->window_priv_count); priv = gui->window_priv[gui->window_priv_count - 1] = calloc(1, sizeof(window_priv_t)); @@ -1310,7 +1374,7 @@ } /* creates the sub (AKA video) window,*/ -int create_subwindow(gui_t *gui, char *skindir) +int create_subwindow(gui_t *gui) { HINSTANCE instance = GetModuleHandle(NULL); WNDCLASS wc; @@ -1344,7 +1408,7 @@ wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hIcon = gui->icon; wc.hbrBackground = NULL; //WM_PAINT will handle background color switching; - wc.lpszClassName = "MPlayer Sub for Windows"; + wc.lpszClassName = "MPlayer - Video"; wc.lpszMenuName = NULL; RegisterClass(&wc); @@ -1372,7 +1436,7 @@ if (y <= -1 || (y+(rect.bottom-rect.top) > GetSystemMetrics(SM_CYSCREEN))) y = x; - hWnd = CreateWindowEx(0, "MPlayer Sub for Windows", "MPlayer for Windows", style, + hWnd = CreateWindowEx(0, "MPlayer - Video", "MPlayer - Video", style, x, y, rect.right-rect.left, rect.bottom-rect.top, gui->subwindow, NULL, instance, NULL); @@ -1451,7 +1515,7 @@ wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hIcon = gui->icon; wc.hbrBackground = CreateSolidBrush(RGB(0, 0, 0)); - wc.lpszClassName = gui->classname = "MPlayer GUI for Windows"; + wc.lpszClassName = gui->classname = "MPlayer"; wc.lpszMenuName = NULL; RegisterClass(&wc); @@ -1487,7 +1551,7 @@ gui_main_pos_y = y; } - hwnd = CreateWindowEx(0, gui->classname, "MPlayer for Windows", style, + hwnd = CreateWindowEx(0, gui->classname, "MPlayer", style, x, y, rect.right-rect.left, rect.bottom-rect.top, gui->mainwindow, NULL, instance, NULL); @@ -1498,7 +1562,7 @@ nid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; nid.uCallbackMessage = WM_SYSTRAY; nid.hIcon = gui->icon; - strcpy(nid.szTip, "MPlayer for Windows"); + strcpy(nid.szTip, "MPlayer"); /* register the systray icon */ Shell_NotifyIcon(NIM_ADD, &nid); @@ -1519,11 +1583,11 @@ return 0; } -gui_t *create_gui(char *skindir, char *skinName, void (*playercontrol)(int event)) +gui_t *create_gui(char *skindir, void (*playercontrol)(int event)) { gui_t *gui = calloc(1, sizeof(gui_t)); char temp[MAX_PATH]; - HWND runningmplayer = FindWindow("MPlayer GUI for Windows", "MPlayer for Windows"); + HWND runningmplayer = FindWindow("MPlayer", "MPlayer"); if(runningmplayer) { @@ -1539,10 +1603,9 @@ /* create playlist */ gui->playlist = create_playlist(); - if(!skinName) skinName = strdup("Blue"); - sprintf(temp, "%s\\%s", skindir, skinName); + sprintf(temp, "%s/%s", skindir, skinName); if(create_window(gui, temp)) return NULL; - if(create_subwindow(gui, temp)) return NULL; + if(create_subwindow(gui)) return NULL; if(console) console_toggle(); return gui; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/gui.h mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/gui.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/gui.h 2011-06-21 02:05:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/gui.h 2011-10-25 13:46:43.000000000 +0000 @@ -98,12 +98,13 @@ #define wsMovable 2 #define wsSizeable 4 -gui_t *create_gui(char *skindir, char *skinName, void (*playercontrol)(int event)); +gui_t *create_gui(char *skindir, void (*playercontrol)(int event)); int destroy_window(gui_t *gui); int create_window(gui_t *gui, char *skindir); -int create_subwindow(gui_t *gui, char *skindir); +int create_subwindow(gui_t *gui); int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear); void capitalize(char *filename); +LPSTR acp(LPCSTR utf8); void renderinfobox(skin_t *skin, window_priv_t *priv); void renderwidget(skin_t *skin, image *dest, widget *item, int state); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/interface.c mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/interface.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/interface.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/interface.c 2012-01-10 12:04:50.000000000 +0000 @@ -21,10 +21,23 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + +#if defined(CONFIG_LIBCDIO) +#include +#elif defined(CONFIG_CDDA) +#include +#endif + #include -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(__WINE__) #define _beginthreadex CreateThread +#ifdef __WINE__ +#include +#define WINE_MOUNTMGR_EXTENSIONS +#include +#endif #else #include #endif @@ -48,14 +61,17 @@ #include "access_mpcontext.h" #include "libmpcodecs/vd.h" #include "libmpcodecs/dec_audio.h" +#include "gui/ui/actions.h" #include "gui/ui/gmplayer.h" +#include "gui/util/mem.h" +#include "gui/util/list.h" +#include "gui/util/string.h" #include "mp_core.h" #include "mpcommon.h" #include "gui.h" #include "dialogs.h" -#ifdef CONFIG_LIBCDIO -#include -#endif + +#define SAME_STREAMTYPE (STREAMTYPE_DUMMY - 1) int guiWinID = 0; @@ -72,75 +88,105 @@ const vo_functions_t *video_out = NULL; mixer_t *mixer = NULL; -/* test for playlist files, no need to specify -playlist on the commandline. - * add any conceivable playlist extensions here. - * - Erik +#ifdef __WINE__ +/** + * @brief Convert a Windows style path to a file name into an Unix style one. + * + * @param filename pointer to the file path to be converted + * + * @return pointer to the converted file path */ -int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear) +static char *unix_name (char *filename) { - if(clear) - mygui->playlist->clear_playlist(mygui->playlist); + static char *unix_filename; + LPSTR (*CDECL wine_get_unix_file_name_ptr)(LPCWSTR); + int wchar_conv; - if(strstr(file, ".m3u") || strstr(file, ".pls")) + if (*filename && (filename[1] == ':')) { - playtree = parse_playlist_file(file); - import_playtree_playlist_into_gui(playtree, mconfig); - return 1; - } - return 0; -} + wine_get_unix_file_name_ptr = (void *) GetProcAddress(GetModuleHandleA("KERNEL32"), "wine_get_unix_file_name"); + wchar_conv = MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, NULL, 0); -/** - * \brief this actually creates a new list containing only one element... - */ -void gaddlist( char ***list, const char *entry) -{ - int i; + if (wine_get_unix_file_name_ptr && wchar_conv) + { + WCHAR *ntpath; + char *unix_name; - if (*list) - { - for (i=0; (*list)[i]; i++) free((*list)[i]); - free(*list); + ntpath = HeapAlloc(GetProcessHeap(), 0, sizeof(*ntpath) * (wchar_conv + 1)); + MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, ntpath, wchar_conv); + unix_name = wine_get_unix_file_name_ptr(ntpath); + setdup(&unix_filename, unix_name); + filename = unix_filename; + HeapFree(GetProcessHeap(), 0, unix_name); + HeapFree(GetProcessHeap(), 0, ntpath); + } } - *list = malloc(2 * sizeof(char **)); - (*list)[0] = gstrdup(entry); - (*list)[1] = NULL; -} - -char *gstrdup(const char *str) -{ - if (!str) return NULL; - return strdup(str); + return filename; } /** - * \brief this replaces a string starting with search by replace. - * If not found, replace is appended. + * @brief Convert a Windows style device name into an Unix style one. + * + * @param device pointer to the device name to be converted + * + * @return pointer to the converted device name */ -static void greplace(char ***list, char *search, char *replace) +static char *unix_device (char *device) { - int i = 0; - int len = (search) ? strlen(search) : 0; + static char *unix_devname; + HANDLE mgr; + DWORD size = 1024; + + mgr = CreateFileW(MOUNTMGR_DOS_DEVICE_NAME, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - if (*list) + if (mgr != INVALID_HANDLE_VALUE) { - for (i = 0; (*list)[i]; i++) + struct mountmgr_unix_drive input; + struct mountmgr_unix_drive *data; + + data = HeapAlloc(GetProcessHeap(), 0, size); + + if (data) { - if (search && (!strncmp((*list)[i], search, len))) + memset(&input, 0, sizeof(input)); + input.letter = *device; + + if (DeviceIoControl(mgr, IOCTL_MOUNTMGR_QUERY_UNIX_DRIVE, &input, sizeof(input), data, size, NULL, NULL)) { - free((*list)[i]); - (*list)[i] = gstrdup(replace); - return; + if (data->device_offset) + { + setdup(&unix_devname, (char *) data + data->device_offset); + device = unix_devname; + } } + + HeapFree(GetProcessHeap(), 0, data); } - *list = realloc(*list, (i + 2) * sizeof(char *)); + + CloseHandle(mgr); } - else - *list = malloc(2 * sizeof(char *)); - (*list)[i] = gstrdup(replace); - (*list)[i + 1] = NULL; + return device; +} +#endif + +/* test for playlist files, no need to specify -playlist on the commandline. + * add any conceivable playlist extensions here. + * - Erik + */ +int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear) +{ + if(clear) + mygui->playlist->clear_playlist(mygui->playlist); + + if(strstr(file, ".m3u") || strstr(file, ".pls")) + { + playtree = parse_playlist_file(file); + guiPlaylistAdd(playtree, mconfig); + return 1; + } + return 0; } /* this function gets called by the gui to update mplayer */ @@ -163,35 +209,63 @@ case evPlayDVD: { static char dvdname[MAX_PATH]; - guiInfo.DVD.current_title = dvd_title; - guiInfo.DVD.current_chapter = dvd_chapter; - guiInfo.DVD.current_angle = dvd_angle; - guiInfo.DiskChanged = 1; - + guiInfo.Track = 1; + guiInfo.Chapter = 1; + guiInfo.Angle = 1; + guiInfo.NewPlay = GUI_FILE_SAME; + +#ifdef __WINE__ + // dvd_device is in the Windows style (D:\), which needs to be + // converted for MPlayer, so that it will find the device in the + // Linux filesystem. + dvd_device = unix_device(dvd_device); +#endif uiSetFileName(NULL, dvd_device, STREAMTYPE_DVD); dvdname[0] = 0; strcat(dvdname, "DVD Movie"); GetVolumeInformation(dvd_device, dvdname, MAX_PATH, NULL, NULL, NULL, NULL, 0); capitalize(dvdname); mp_msg(MSGT_GPLAYER, MSGL_V, "Opening DVD %s -> %s\n", dvd_device, dvdname); - guiGetEvent(guiSetParameters, (void *) STREAMTYPE_DVD); mygui->playlist->clear_playlist(mygui->playlist); mygui->playlist->add_track(mygui->playlist, filename, NULL, dvdname, 0); - mygui->startplay(mygui); + uiPlay(); break; } #endif -#ifdef CONFIG_LIBCDIO +#ifdef CONFIG_CDDA case evPlayCD: { int i; char track[10]; char trackname[10]; - CdIo_t *p_cdio = cdio_open(NULL, DRIVER_UNKNOWN); - track_t i_tracks; +#ifdef CONFIG_LIBCDIO + cdrom_drive_t *cd; +#else + cdrom_drive *cd; +#endif + int i_tracks; - if(p_cdio == NULL) printf("Couldn't find a driver.\n"); - i_tracks = cdio_get_num_tracks(p_cdio); +#ifdef __WINE__ + // cdrom_device is in the Windows style (D:\), which needs to be + // converted for MPlayer, so that it will find the device in the + // Linux filesystem. + cdrom_device = unix_device(cdrom_device); +#endif + cd = cdda_identify(cdrom_device, 0, NULL); + if (cd) + { + if (cdda_open(cd) != 0) + { + cdda_close(cd); + cd = NULL; + } + } + if(!cd) + { + printf("Couldn't find a driver.\n"); + break; + } + i_tracks = cdda_tracks(cd); mygui->playlist->clear_playlist(mygui->playlist); for(i=0;iplaylist->add_track(mygui->playlist, track, NULL, trackname, 0); } - cdio_destroy(p_cdio); + cdda_close(cd); mygui->startplay(mygui); break; } @@ -218,7 +292,7 @@ } case evStop: if(guiInfo.Playing) - guiGetEvent(guiSetState, (void *) GUI_STOP); + gui(GUI_SET_STATE, (void *) GUI_STOP); break; case evSetMoviePosition: { @@ -276,7 +350,6 @@ mp_input_queue_cmd(cmd); break; } - case evDropFile: case evLoadPlay: { switch(guiInfo.StreamType) @@ -284,21 +357,18 @@ #ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: { - guiInfo.Title = guiInfo.DVD.current_title; - guiInfo.Chapter = guiInfo.DVD.current_chapter; - guiInfo.Angle = guiInfo.DVD.current_angle; - guiInfo.DiskChanged = 1; - guiGetEvent(guiSetState, (void *) GUI_PLAY); + guiInfo.NewPlay = GUI_FILE_SAME; + gui(GUI_SET_STATE, (void *) GUI_PLAY); break; } #endif default: { - guiInfo.FilenameChanged = guiInfo.NewPlay = 1; + guiInfo.NewPlay = GUI_FILE_NEW; update_playlistwindow(); uiGotoTheNext = guiInfo.Playing? 0 : 1; - guiGetEvent(guiSetState, (void *) GUI_STOP); - guiGetEvent(guiSetState, (void *) GUI_PLAY); + gui(GUI_SET_STATE, (void *) GUI_STOP); + gui(GUI_SET_STATE, (void *) GUI_PLAY); break; } } @@ -323,8 +393,8 @@ uiPause(); return; } - guiInfo.NewPlay = 1; - guiGetEvent(guiSetState, (void *) GUI_PLAY); + guiInfo.NewPlay = GUI_FILE_NEW; + gui(GUI_SET_STATE, (void *) GUI_PLAY); } void uiPause( void ) @@ -347,16 +417,16 @@ { #ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: - if(guiInfo.DVD.current_chapter == (guiInfo.DVD.chapters - 1)) + if(guiInfo.Chapter == (guiInfo.Chapters - 1)) return; - guiInfo.DVD.current_chapter++; + guiInfo.Chapter++; break; #endif default: if(mygui->playlist->current == (mygui->playlist->trackcount - 1)) return; uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, - STREAMTYPE_STREAM); + STREAMTYPE_FILE); break; } mygui->startplay(mygui); @@ -369,86 +439,44 @@ { #ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: - if(guiInfo.DVD.current_chapter == 1) + if(guiInfo.Chapter == 1) return; - guiInfo.DVD.current_chapter--; + guiInfo.Chapter--; break; #endif default: if(mygui->playlist->current == 0) return; uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)--]->filename, - STREAMTYPE_STREAM); + STREAMTYPE_FILE); break; } mygui->startplay(mygui); } -void uiEnd( void ) -{ - if(!uiGotoTheNext && guiInfo.Playing) - { - uiGotoTheNext = 1; - return; - } - - if(uiGotoTheNext && guiInfo.Playing && - (mygui->playlist->current < (mygui->playlist->trackcount - 1)) && - guiInfo.StreamType != STREAMTYPE_DVD && - guiInfo.StreamType != STREAMTYPE_DVDNAV) - { - /* we've finished this file, reset the aspect */ - if(movie_aspect >= 0) - movie_aspect = -1; - - uiGotoTheNext = guiInfo.FilenameChanged = guiInfo.NewPlay = 1; - uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, STREAMTYPE_STREAM); - //sprintf(guiInfo.Filename, mygui->playlist->tracks[(mygui->playlist->current)++]->filename); - } - - if(guiInfo.FilenameChanged && guiInfo.NewPlay) - return; - - guiInfo.TimeSec = 0; - guiInfo.Position = 0; - guiInfo.AudioType = 0; - -#ifdef CONFIG_DVDREAD - guiInfo.DVD.current_title = 1; - guiInfo.DVD.current_chapter = 1; - guiInfo.DVD.current_angle = 1; -#endif - - if (mygui->playlist->current == (mygui->playlist->trackcount - 1)) - mygui->playlist->current = 0; - - fullscreen = 0; - if(style == WS_VISIBLE | WS_POPUP) - { - style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX; - SetWindowLong(mygui->subwindow, GWL_STYLE, style); - } - guiGetEvent(guiSetState, (void *) GUI_STOP); -} - -void uiStop(void) -{ - guiGetEvent(guiSetState, (void *) GUI_STOP); -} - void uiSetFileName(char *dir, char *name, int type) { if(!name) return; if(!dir) - guiSetFilename(guiInfo.Filename, name) + setdup(&guiInfo.Filename, name); else - guiSetDF(guiInfo.Filename, dir, name); + setddup(&guiInfo.Filename, dir, name); + + filename = guiInfo.Filename; +#ifdef __WINE__ + // When the GUI receives the files to be played in guiPlaylistInitialize() + // and guiPlaylistAdd(), it calls import_file_into_gui() where the call of + // Wine's GetFullPathName() converts each file name into the Windows style + // (C:\path\to\file), which needs to be reconverted for MPlayer, so that + // it will find the filename in the Linux filesystem. + filename = unix_name(filename); +#endif + + if (type != SAME_STREAMTYPE) + guiInfo.StreamType = type; - guiInfo.StreamType = type; - free(guiInfo.AudioFile); - guiInfo.AudioFile = NULL; - free(guiInfo.Subtitlename); - guiInfo.Subtitlename = NULL; + nfree(guiInfo.AudioFilename); + nfree(guiInfo.SubtitleFilename); } void uiFullScreen( void ) @@ -480,7 +508,7 @@ MSG msg; if(!skinName) skinName = strdup("Blue"); - if(!mygui) mygui = create_gui(get_path("skins"), skinName, guiSetEvent); + if(!mygui) mygui = create_gui(get_path("skins"), guiSetEvent); if(!mygui) exit_player(EXIT_ERROR); if(autosync && autosync != gtkAutoSync) @@ -524,8 +552,7 @@ WaitForSingleObject(hThread, INFINITE); CloseHandle(hThread); mygui->uninit(mygui); - free(mygui); - mygui = NULL; + nfree(mygui); } /* Remove tray icon */ Shell_NotifyIcon(NIM_DELETE, &nid); @@ -533,11 +560,11 @@ } /* this function gets called by mplayer to update the gui */ -int guiGetEvent(int type, void *arg) +int gui(int what, void *data) { - stream_t *stream = arg; + stream_t *stream = data; #ifdef CONFIG_DVDREAD - dvd_priv_t *dvdp = arg; + dvd_priv_t *dvdp; #endif if(!mygui || !mygui->skin) return 0; @@ -549,61 +576,70 @@ playtree = mpctx_get_playtree_iter(guiInfo.mpcontext); } - switch (type) + switch (what) { - case guiSetFileFormat: - guiInfo.FileFormat = (int) arg; - break; - case guiSetParameters: + case GUI_PREPARE: { - guiGetEvent(guiSetDefaults, NULL); - guiInfo.DiskChanged = 0; - guiInfo.FilenameChanged = 0; - guiInfo.NewPlay = 0; + audio_id = -1; + video_id = -1; + dvdsub_id = -1; + vobsub_id = -1; + stream_cache_size = -1; + autosync = 0; + dvd_title = 0; + force_fps = 0; + if(!mygui->playlist->tracks) return 0; switch(guiInfo.StreamType) { - case STREAMTYPE_PLAYLIST: + case STREAMTYPE_FILE: + case STREAMTYPE_STREAM: + uiSetFileName(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, SAME_STREAMTYPE); + guiInfo.Track = mygui->playlist->current + 1; break; #ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: { char tmp[512]; - dvd_title = guiInfo.DVD.current_title; - dvd_chapter = guiInfo.DVD.current_chapter; - dvd_angle = guiInfo.DVD.current_angle; - sprintf(tmp,"dvd://%d", guiInfo.Title); - guiSetFilename(guiInfo.Filename, tmp); + dvd_chapter = guiInfo.Chapter; + dvd_angle = guiInfo.Angle; + sprintf(tmp,"dvd://%d", guiInfo.Track); + uiSetFileName(NULL, tmp, SAME_STREAMTYPE); break; } #endif } - if(guiInfo.Filename) - filename = strdup(guiInfo.Filename); - else if(filename) - strcpy(guiInfo.Filename, filename); + guiInfo.VideoWindow = 1; + if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm"); + if(gtkAOExtraStereo) + { + char *name = malloc(12 + 20 + 1); + snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul); + name[12 + 20] = 0; + greplace(&af_cfg.list, "extrastereo", name); + free(name); + } + if(gtkCacheOn) stream_cache_size = gtkCacheSize; + if(gtkAutoSyncOn) autosync = gtkAutoSync; + guiInfo.NewPlay = 0; break; } - case guiSetAudioOnly: + case GUI_SET_AUDIO: { - guiInfo.AudioOnly = (int) arg; - if(IsWindowVisible(mygui->subwindow)) + if (data && !guiInfo.sh_video) guiInfo.VideoWindow = 0; + if(IsWindowVisible(mygui->subwindow) && !guiInfo.VideoWindow) ShowWindow(mygui->subwindow, SW_HIDE); break; } - case guiSetContext: - guiInfo.mpcontext = arg; + case GUI_SET_CONTEXT: + guiInfo.mpcontext = data; break; - case guiSetDemuxer: - guiInfo.demuxer = arg; - break; - case guiSetValues: + case GUI_SET_VIDEO: { - guiInfo.sh_video = arg; - if (arg) + guiInfo.sh_video = data; + if (data) { - sh_video_t *sh = arg; + sh_video_t *sh = data; codecname = sh->codec->name; - guiInfo.FPS = sh->fps; /* we have video, show the subwindow */ if(!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) @@ -614,55 +650,51 @@ } break; } - case guiSetShVideo: + case GUI_SETUP_VIDEO_WINDOW: { - guiInfo.MovieWidth = vo_dwidth; - guiInfo.MovieHeight = vo_dheight; + guiInfo.VideoWidth = vo_dwidth; + guiInfo.VideoHeight = vo_dheight; - sub_aspect = (float)guiInfo.MovieWidth/guiInfo.MovieHeight; + sub_aspect = (float)guiInfo.VideoWidth/guiInfo.VideoHeight; if(WinID != -1) update_subwindow(); break; } - case guiSetStream: + case GUI_SET_STREAM: { guiInfo.StreamType = stream->type; switch(stream->type) { #ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: - guiGetEvent(guiSetDVD, stream->priv); + guiInfo.Tracks = 0; + stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks); + guiInfo.Chapters = 0; + stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiInfo.Chapters); + guiInfo.Angles = 0; + stream_control(stream, STREAM_CTRL_GET_NUM_ANGLES, &guiInfo.Angles); + dvdp = stream->priv; + guiInfo.AudioStreams = dvdp->nr_of_channels; + memcpy(guiInfo.AudioStream, dvdp->audio_streams, sizeof(dvdp->audio_streams)); + guiInfo.Subtitles = dvdp->nr_of_subtitles; + memcpy(guiInfo.Subtitle, dvdp->subtitles, sizeof(dvdp->subtitles)); + guiInfo.Chapter = dvd_chapter + 1; + guiInfo.Angle = dvd_angle + 1; + guiInfo.Track = dvd_title + 1; break; #endif } break; } -#ifdef CONFIG_DVDREAD - case guiSetDVD: - { - guiInfo.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts; - guiInfo.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts; - guiInfo.DVD.angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles; - guiInfo.DVD.nr_of_audio_channels = dvdp->nr_of_channels; - memcpy(guiInfo.DVD.audio_streams, dvdp->audio_streams, sizeof(dvdp->audio_streams)); - guiInfo.DVD.nr_of_subtitles = dvdp->nr_of_subtitles; - memcpy(guiInfo.DVD.subtitles, dvdp->subtitles, sizeof(dvdp->subtitles)); - guiInfo.DVD.current_title = dvd_title + 1; - guiInfo.DVD.current_chapter = dvd_chapter + 1; - guiInfo.DVD.current_angle = dvd_angle + 1; - guiInfo.Track = dvd_title + 1; - break; - } -#endif - case guiReDraw: + case GUI_REDRAW: mygui->updatedisplay(mygui, mygui->mainwindow); break; - case guiSetAfilter: - guiInfo.afilter = arg; + case GUI_SET_AFILTER: + guiInfo.afilter = data; break; - case guiSetState: + case GUI_SET_STATE: { - guiInfo.Playing = (int) arg; + guiInfo.Playing = (int) data; switch (guiInfo.Playing) { case GUI_PLAY: @@ -684,11 +716,11 @@ } break; } - case guiIEvent: + case GUI_RUN_COMMAND: { - mp_msg(MSGT_GPLAYER,MSGL_V, "cmd: %d\n", (int) arg); + mp_msg(MSGT_GPLAYER,MSGL_V, "cmd: %d\n", (int) data); /* MPlayer asks us to quit */ - switch((int) arg) + switch((int) data) { case MP_CMD_VO_FULLSCREEN: uiFullScreen(); @@ -696,46 +728,29 @@ case MP_CMD_QUIT: { mygui->uninit(mygui); - free(mygui); - mygui = NULL; + nfree(mygui); exit_player(EXIT_QUIT); - return 0; + return 1; } + case MP_CMD_PLAY_TREE_STEP: + guiSetEvent(evNext); + break; + case -MP_CMD_PLAY_TREE_STEP: + guiSetEvent(evPrev); + break; + case MP_CMD_STOP: + guiSetEvent(evStop); + break; default: break; } break; } - case guiSetFileName: - if (arg) guiInfo.Filename = arg; - break; - case guiSetDefaults: - { - audio_id = -1; - video_id = -1; - dvdsub_id = -1; - vobsub_id = -1; - stream_cache_size = -1; - autosync = 0; - dvd_title = 0; - force_fps = 0; - if(!mygui->playlist->tracks) return 0; - filename = guiInfo.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename; - guiInfo.Track = mygui->playlist->current + 1; - if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm"); - if(gtkAOExtraStereo) - { - char *name = malloc(12 + 20 + 1); - snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul); - name[12 + 20] = 0; - greplace(&af_cfg.list, "extrastereo", name); - free(name); - } - if(gtkCacheOn) stream_cache_size = gtkCacheSize; - if(gtkAutoSyncOn) autosync = gtkAutoSync; - break; - } - case guiSetVolume: + case GUI_RUN_MESSAGE: + break; + case GUI_HANDLE_EVENTS: + break; + case GUI_SET_MIXER: { if(audio_out) { @@ -751,10 +766,58 @@ } break; } + case GUI_END_FILE: + { + if(!uiGotoTheNext && guiInfo.Playing) + { + uiGotoTheNext = 1; + break; + } + + if(uiGotoTheNext && guiInfo.Playing && + (mygui->playlist->current < (mygui->playlist->trackcount - 1)) && + guiInfo.StreamType != STREAMTYPE_DVD && + guiInfo.StreamType != STREAMTYPE_DVDNAV) + { + /* we've finished this file, reset the aspect */ + if(movie_aspect >= 0) + movie_aspect = -1; + + uiGotoTheNext = 1; + guiInfo.NewPlay = GUI_FILE_NEW; + uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, STREAMTYPE_FILE); + //sprintf(guiInfo.Filename, mygui->playlist->tracks[(mygui->playlist->current)++]->filename); + } + + if(guiInfo.NewPlay == GUI_FILE_NEW) + break; + + guiInfo.ElapsedTime = 0; + guiInfo.Position = 0; + guiInfo.AudioChannels = 0; + +#ifdef CONFIG_DVDREAD + guiInfo.Track = 1; + guiInfo.Chapter = 1; + guiInfo.Angle = 1; +#endif + + if (mygui->playlist->current == (mygui->playlist->trackcount - 1)) + mygui->playlist->current = 0; + + fullscreen = 0; + if(style == WS_VISIBLE | WS_POPUP) + { + style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX; + SetWindowLong(mygui->subwindow, GWL_STYLE, style); + } + gui(GUI_SET_STATE, (void *) GUI_STOP); + break; + } default: - mp_msg(MSGT_GPLAYER, MSGL_ERR, "[GUI] GOT UNHANDLED EVENT %i\n", type); + mp_msg(MSGT_GPLAYER, MSGL_ERR, "[GUI] GOT UNHANDLED EVENT %i\n", what); } - return 0; + return 1; } /* This function adds/inserts one file into the gui playlist */ @@ -788,7 +851,7 @@ by either: - overwriting gui pl (enqueue=0) */ -int import_initial_playtree_into_gui(play_tree_t *my_playtree, m_config_t *config, int enqueue) +int guiPlaylistInitialize(play_tree_t *my_playtree, m_config_t *config, int enqueue) { play_tree_iter_t *my_pt_iter = NULL; int result = 0; @@ -810,8 +873,11 @@ if (result) { mygui->playlist->current = 0; - filename = mygui->playlist->tracks[0]->filename; + uiSetFileName(NULL, mygui->playlist->tracks[0]->filename, STREAMTYPE_FILE); } + + if (enqueue) filename = NULL; + return result; } @@ -819,7 +885,7 @@ parsing some MOV-Reference-File; or by loading an playlist with "File Open" The file which contained the playlist is thereby replaced with it's contents. */ -int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config) +int guiPlaylistAdd(play_tree_t *my_playtree, m_config_t *config) { play_tree_iter_t *my_pt_iter = NULL; int result = 0; @@ -831,19 +897,9 @@ result = 1; pt_iter_destroy(&my_pt_iter); } - filename = NULL; return result; } -static inline void gtkMessageBox(int type, const char *str) -{ - if (type & GTK_MB_FATAL) - MessageBox(NULL, str, "MPlayer GUI for Windows Error", MB_OK | MB_ICONERROR); - - fprintf(stderr, "[GUI] MessageBox: %s\n", str); - fflush(stderr); -} - static int update_subwindow(void) { int x,y; @@ -859,13 +915,13 @@ ShowWindow(mygui->subwindow, SW_HIDE); return 0; } - else if(guiInfo.AudioOnly) + else if(!guiInfo.VideoWindow) return 0; else ShowWindow(mygui->subwindow, SW_SHOW); } /* we've come out of fullscreen at the end of file */ - if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && !guiInfo.AudioOnly) + if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && guiInfo.VideoWindow) ShowWindow(mygui->subwindow, SW_SHOWNORMAL); /* get our current window coordinates */ @@ -893,8 +949,8 @@ } else { - rd.right = rd.left+guiInfo.MovieWidth; - rd.bottom = rd.top+guiInfo.MovieHeight; + rd.right = rd.left+guiInfo.VideoWidth; + rd.bottom = rd.top+guiInfo.VideoHeight; if (movie_aspect > 0.0) // forced aspect from the cmdline sub_aspect = movie_aspect; @@ -919,5 +975,3 @@ SendMessage(mygui->subwindow, WM_WINDOWPOSCHANGED, 0, (LPARAM)&wp); return 0; } - -void guiEventHandling(void) {} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/playlist.c mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/playlist.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/playlist.c 2010-11-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/playlist.c 2011-10-06 12:09:05.000000000 +0000 @@ -29,22 +29,22 @@ /* TODO: implement sort_playlist */ -BOOL adddirtoplaylist(playlist_t *playlist, const char *path, BOOL recursive) +int adddirtoplaylist(playlist_t *playlist, const char *path, int recursive) { HANDLE findHandle = INVALID_HANDLE_VALUE; WIN32_FIND_DATA finddata; char findpath[MAX_PATH], filename[MAX_PATH]; char *filepart; - sprintf(findpath, "%s\\*.*", path); + sprintf(findpath, "%s/*.*", path); findHandle = FindFirstFile(findpath, &finddata); - if (findHandle == INVALID_HANDLE_VALUE) return FALSE; + if (findHandle == INVALID_HANDLE_VALUE) return 0; do { if (finddata.cFileName[0] == '.' || strstr(finddata.cFileName, "Thumbs.db")) continue; - sprintf(findpath, "%s\\%s", path, finddata.cFileName); + sprintf(findpath, "%s/%s", path, finddata.cFileName); if (GetFileAttributes(findpath) & FILE_ATTRIBUTE_DIRECTORY) { @@ -58,7 +58,7 @@ } } while (FindNextFile(findHandle, &finddata)); FindClose(findHandle); - return TRUE; + return 1; } static void add_track(playlist_t *playlist, const char *filename, const char *artist, const char *title, int duration) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/playlist.h mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/playlist.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/playlist.h 2010-10-26 08:15:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/playlist.h 2011-07-30 15:36:37.000000000 +0000 @@ -24,8 +24,6 @@ #ifndef MPLAYER_GUI_PLAYLIST_H #define MPLAYER_GUI_PLAYLIST_H -#include - typedef struct { char *filename; @@ -56,6 +54,6 @@ #define SORT_BYDURATION 4 playlist_t *create_playlist(void); -BOOL adddirtoplaylist(playlist_t *playlist, const char* path, BOOL recursive); +int adddirtoplaylist(playlist_t *playlist, const char* path, int recursive); #endif /* MPLAYER_GUI_PLAYLIST_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/preferences.c mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/preferences.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/preferences.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/preferences.c 2011-12-31 13:15:30.000000000 +0000 @@ -31,6 +31,7 @@ #include "libao2/audio_out.h" #include "osdep/priority.h" #include "mixer.h" +#include "gui/util/list.h" #include "gui/ui/gmplayer.h" #include "gui/interface.h" #include "gui.h" @@ -55,15 +56,14 @@ gtkCacheSize = 2048; gtkAutoSyncOn = 0; gtkAutoSync = 0; + player_idle_mode = 1; } static LRESULT CALLBACK PrefsWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) { - HWND btn, label, edit1, edit2, edit3, updown1, updown2, track1, track2; + HWND btn, label, edit1, edit2, updown1, updown2, track1, track2; static HWND vo_driver, ao_driver, prio; int i = 0, j = 0; - char dvddevice[MAX_PATH]; - char cdromdevice[MAX_PATH]; char procprio[11]; float x = 10.0, y = 100.0, stereopos, delaypos; stereopos = gtkAOExtraStereoMul * x; @@ -74,58 +74,44 @@ case WM_CREATE: { /* video and audio drivers */ - label = CreateWindow("static", "Video Driver:", - WS_CHILD | WS_VISIBLE, - 10, 13, 70, 15, hwnd, + label = CreateWindow("static", acp(MSGTR_PREFERENCES_Video), + WS_CHILD | WS_VISIBLE | SS_RIGHT, + 10, 14, 60, 15, hwnd, NULL, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - label = CreateWindow("static", "Audio Driver:", - WS_CHILD | WS_VISIBLE, - 190, 13, 70, 15, hwnd, + label = CreateWindow("static", acp(MSGTR_PREFERENCES_Audio), + WS_CHILD | WS_VISIBLE | SS_RIGHT, + 205, 14, 60, 15, hwnd, NULL, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - label = CreateWindow("static", "Extra stereo coefficient:", - WS_CHILD | WS_VISIBLE, - 10, 126, 115, 15, hwnd, + label = CreateWindow("static", acp(MSGTR_PREFERENCES_Coefficient), + WS_CHILD | WS_VISIBLE | SS_RIGHT, + 10, 148, 140, 15, hwnd, NULL, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - label = CreateWindow("static", "Audio delay:", - WS_CHILD | WS_VISIBLE, - 36, 165, 115, 15, hwnd, + label = CreateWindow("static", acp(MSGTR_PREFERENCES_AudioDelay), + WS_CHILD | WS_VISIBLE | SS_RIGHT, + 10, 187, 140, 15, hwnd, NULL, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - label = CreateWindow("static", "OSD level:", + label = CreateWindow("static", acp(MSGTR_PREFERENCES_FRAME_OSD_Level), WS_CHILD | WS_VISIBLE, - 10, 264, 115, 15, hwnd, + 10, 286, 115, 15, hwnd, NULL, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - label = CreateWindow("static", "DVD device:", - WS_CHILD | WS_VISIBLE, - 80, 363, 115, 15, hwnd, - NULL, ((LPCREATESTRUCT) lParam) -> hInstance, - NULL); - SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - - label = CreateWindow("static", "CD device:", - WS_CHILD | WS_VISIBLE, - 202, 363, 115, 15, hwnd, - NULL, ((LPCREATESTRUCT) lParam) -> hInstance, - NULL); - SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - - label = CreateWindow("static", "Priority:", - WS_CHILD | WS_VISIBLE, - 217, 264, 115, 15, hwnd, + label = CreateWindow("static", acp(MSGTR_PREFERENCES_Priority), + WS_CHILD | WS_VISIBLE | SS_RIGHT, + 200, 286, 100, 15, hwnd, NULL, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); @@ -145,7 +131,7 @@ CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, - 260, 10, 100, 160, hwnd, + 275, 10, 100, 160, hwnd, (HMENU) ID_AO_DRIVER, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); @@ -155,136 +141,144 @@ CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, - 260, 260, 100, 160, hwnd, + 310, 282, 100, 160, hwnd, (HMENU) ID_PRIO, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); /* checkboxes */ - btn = CreateWindow("button", "Enable double buffering", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_DoubleBuffer), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - 25, 35, 150, 25, + 10, 35, 160, 25, hwnd, (HMENU) ID_DOUBLE, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Enable direct rendering", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_DirectRender), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - 25, 57, 150, 25, + 10, 57, 160, 25, hwnd, (HMENU) ID_DIRECT, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Enable framedropping", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_FrameDrop), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - 25, 79, 150, 25, + 10, 79, 160, 25, hwnd, (HMENU) ID_FRAMEDROP, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Normalize sound", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_NoIdle), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - 205, 35, 150, 25, + 10, 101, 225, 25, + hwnd, (HMENU) ID_IDLE, + ((LPCREATESTRUCT) lParam) -> hInstance, + NULL); + SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); + + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_NormalizeSound), + WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, + 220, 35, 160, 25, hwnd, (HMENU) ID_NORMALIZE, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Enable software mixer", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_SoftwareMixer), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - 205, 57, 150, 25, + 220, 57, 160, 25, hwnd, (HMENU) ID_SOFTMIX, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Enable extra stereo", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_ExtraStereo), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - 205, 79, 150, 25, + 220, 79, 160, 25, hwnd, (HMENU) ID_EXTRASTEREO, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Enable cache", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_Cache), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - 10, 200, 90, 25, + 10, 222, 90, 25, hwnd, (HMENU) ID_CACHE, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Enable autosync", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_AutoSync), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - 192, 200, 100, 25, hwnd, + 240, 222, 110, 25, hwnd, (HMENU) ID_AUTOSYNC, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Display videos in the sub window", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_VideoInSubwin), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - 85, 227, 250, 25, + 10, 249, 250, 25, hwnd, (HMENU) ID_SUBWINDOW, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); /* osd level */ - btn = CreateWindow("button", "None", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL0), WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON, - 95, 260, 100, 25, hwnd, + 15, 297, 200, 25, hwnd, (HMENU) ID_NONE, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Timer and indicators", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL1), WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON, - 95, 280, 180, 25, hwnd, + 15, 317, 395, 25, hwnd, (HMENU) ID_OSD1, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Progress bar only", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL2), WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON, - 95, 300, 180, 25, hwnd, + 15, 337, 395, 25, hwnd, (HMENU) ID_OSD2, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Timer, percentage, and total time", + btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL3), WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON, - 95, 320, 180, 25, hwnd, + 15, 357, 395, 25, hwnd, (HMENU) ID_OSD3, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Apply", + btn = CreateWindow("button", acp(MSGTR_Ok), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, - 199, 395, 80, 25, hwnd, + 248, 417, 80, 25, hwnd, (HMENU) ID_APPLY, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Cancel", + btn = CreateWindow("button", acp(MSGTR_Cancel), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, - 285, 395, 80, 25, hwnd, + 334, 417, 80, 25, hwnd, (HMENU) ID_CANCEL, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - btn = CreateWindow("button", "Defaults", + btn = CreateWindow("button", acp(MSGTR_Default), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, - 4, 395, 80, 25, hwnd, + 5, 417, 80, 25, hwnd, (HMENU) ID_DEFAULTS, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); @@ -295,7 +289,7 @@ WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED | TBS_HORZ | TBS_BOTTOM | TBS_NOTICKS, - 120, 120, 245, 35, hwnd, + 165, 142, 245, 35, hwnd, (HMENU) ID_TRACKBAR1, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); @@ -306,7 +300,7 @@ WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED | TBS_HORZ | TBS_BOTTOM | TBS_NOTICKS, - 120, 160, 245, 35, hwnd, + 165, 182, 245, 35, hwnd, (HMENU) ID_TRACKBAR2, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); @@ -316,7 +310,7 @@ edit1 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "cache", WS_CHILD | WS_VISIBLE | WS_DISABLED | ES_LEFT | ES_AUTOHSCROLL, - 105, 203, 40, 20, hwnd, + 105, 225, 40, 20, hwnd, (HMENU) ID_EDIT1, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); @@ -325,7 +319,7 @@ updown1 = CreateUpDownControl(WS_CHILD | WS_VISIBLE | WS_DISABLED | UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_NOTHOUSANDS, - 145, 203, 20, 20, hwnd, + 145, 225, 20, 20, hwnd, ID_UPDOWN1, ((LPCREATESTRUCT) lParam) -> hInstance, (HWND)edit1, 0, 0, 0); @@ -335,7 +329,7 @@ edit2 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "autosync", WS_CHILD | WS_VISIBLE | WS_DISABLED | ES_LEFT | ES_AUTOHSCROLL, - 300, 203, 40, 20, hwnd, + 355, 225, 40, 20, hwnd, (HMENU) ID_EDIT2, ((LPCREATESTRUCT) lParam) -> hInstance, NULL); @@ -344,31 +338,12 @@ updown2 = CreateUpDownControl(WS_CHILD | WS_VISIBLE | WS_DISABLED | UDS_SETBUDDYINT | UDS_ARROWKEYS | UDS_NOTHOUSANDS, - 340, 203, 20, 20, hwnd, + 395, 225, 20, 20, hwnd, ID_UPDOWN2, ((LPCREATESTRUCT) lParam) -> hInstance, (HWND)edit2, 0, 0, 0); SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETRANGE32, (WPARAM)0, (LPARAM)10000); - /* dvd and cd devices */ - edit3 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", NULL, - WS_CHILD | WS_VISIBLE | - ES_LEFT | ES_AUTOHSCROLL, - 145, 360, 20, 20, hwnd, - (HMENU) ID_DVDDEVICE, - ((LPCREATESTRUCT) lParam) -> hInstance, - NULL); - SendMessage(edit3, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - - edit3 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", NULL, - WS_CHILD | WS_VISIBLE | - ES_LEFT| ES_AUTOHSCROLL, - 260, 360, 20, 20, hwnd, - (HMENU) ID_CDDEVICE, - ((LPCREATESTRUCT) lParam) -> hInstance, - NULL); - SendMessage(edit3, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); - while(video_out_drivers[i]) { const vo_info_t *info = video_out_drivers[i++]->info; @@ -393,11 +368,11 @@ SendMessage(ao_driver, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); /* priority list, i'm leaving out realtime for safety's sake */ - SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "low"); - SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "belownormal"); - SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "normal"); - SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "abovenormal"); - SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "high"); + SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityLow)); + SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormalBelow)); + SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormal)); + SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormalAbove)); + SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityHigh)); SendMessage(prio, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); /* set our preferences on what we already have */ @@ -415,6 +390,8 @@ SendDlgItemMessage(hwnd, ID_DOUBLE, BM_SETCHECK, 1, 0); if(vo_directrendering) SendDlgItemMessage(hwnd, ID_DIRECT, BM_SETCHECK, 1, 0); + if(!player_idle_mode) + SendDlgItemMessage(hwnd, ID_IDLE, BM_SETCHECK, 1, 0); if(frame_dropping) SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_SETCHECK, 1, 0); if(gtkAONorm) @@ -464,14 +441,6 @@ else if(osd_level == 3) SendDlgItemMessage(hwnd, ID_OSD3, BM_SETCHECK, 1, 0); - if(dvd_device) - SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)dvd_device); - else SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:"); - - if(cdrom_device) - SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)cdrom_device); - else SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:"); - if(proc_priority) SendDlgItemMessage(hwnd, ID_PRIO, CB_SETCURSEL, (WPARAM)SendMessage(prio, CB_FINDSTRING, -1, @@ -553,6 +522,7 @@ SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETPOS32, 0, (LPARAM)gtkAutoSync); SendDlgItemMessage(hwnd, ID_DOUBLE, BM_SETCHECK, 0, 0); SendDlgItemMessage(hwnd, ID_DIRECT, BM_SETCHECK, 0, 0); + SendDlgItemMessage(hwnd, ID_IDLE, BM_SETCHECK, 0, 0); SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_SETCHECK, 0, 0); SendDlgItemMessage(hwnd, ID_NORMALIZE, BM_SETCHECK, 0, 0); SendDlgItemMessage(hwnd, ID_SOFTMIX, BM_SETCHECK, 0, 0); @@ -564,8 +534,6 @@ SendDlgItemMessage(hwnd, ID_OSD1, BM_SETCHECK, 1, 0); SendDlgItemMessage(hwnd, ID_OSD2, BM_SETCHECK, 0, 0); SendDlgItemMessage(hwnd, ID_OSD3, BM_SETCHECK, 0, 0); - SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:"); - SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:"); SendMessage(hwnd, WM_COMMAND, (WPARAM)ID_APPLY, 0); break; } @@ -575,7 +543,7 @@ case ID_APPLY: { int strl; - if(guiInfo.Playing) guiGetEvent(guiSetState, (void *)GUI_STOP); + if(guiInfo.Playing) gui(GUI_SET_STATE, (void *)GUI_STOP); /* Set the video driver */ free(video_driver_list[0]); @@ -605,6 +573,11 @@ vo_directrendering = 1; else vo_directrendering = 0; + /* quit after playing */ + if(SendDlgItemMessage(hwnd, ID_IDLE, BM_GETCHECK, 0, 0) == BST_CHECKED) + player_idle_mode = 0; + else player_idle_mode = 1; + /* frame dropping */ if(SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_GETCHECK, 0, 0) == BST_CHECKED) frame_dropping = 1; @@ -659,13 +632,7 @@ else if(SendDlgItemMessage(hwnd, ID_OSD3, BM_GETCHECK, 0, 0) == BST_CHECKED) osd_level = 3; - /* dvd and cd devices */ - SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_GETTEXT, MAX_PATH, (LPARAM)dvddevice); - dvd_device = strdup(dvddevice); - SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_GETTEXT, MAX_PATH, (LPARAM)cdromdevice); - cdrom_device = strdup(cdromdevice); - - MessageBox(hwnd, "You must restart MPlayer for the changes to take effect.", "MPlayer - Info:", MB_OK); + MessageBox(hwnd, acp(MSGTR_PREFERENCES_Message), acp(MSGTR_MSGBOX_LABEL_Warning), MB_OK); DestroyWindow(hwnd); break; } @@ -682,7 +649,7 @@ HINSTANCE hInstance = GetModuleHandle(NULL); WNDCLASS wc; int x, y; - if(FindWindow(NULL, "MPlayer - Preferences")) return; + if(FindWindow(NULL, acp(MSGTR_Preferences))) return; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = PrefsWndProc; wc.cbClsExtra = 0; @@ -691,23 +658,23 @@ wc.hCursor = LoadCursor(NULL,IDC_ARROW); wc.hIcon = gui->icon; wc.hbrBackground = SOLID_GREY; - wc.lpszClassName = "MPlayer - Preferences"; + wc.lpszClassName = acp(MSGTR_Preferences); wc.lpszMenuName = NULL; RegisterClass(&wc); - x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (375 / 2); - y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (452 / 2); - hWnd = CreateWindow("MPlayer - Preferences", - "MPlayer - Preferences", + x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (425 / 2); + y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (474 / 2); + hWnd = CreateWindow(acp(MSGTR_Preferences), + acp(MSGTR_Preferences), WS_POPUPWINDOW | WS_CAPTION, x, y, - 375, - 452, + 425, + 474, NULL, NULL, hInstance, NULL); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui); ShowWindow(hWnd, SW_SHOW); UpdateWindow(hWnd); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/skinload.c mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/skinload.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/skinload.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/skinload.c 2012-01-10 11:51:30.000000000 +0000 @@ -21,6 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include @@ -31,6 +32,7 @@ #include "libswscale/swscale.h" #include "libavutil/imgutils.h" #include "gui.h" +#include "gui/util/mem.h" #include "gui/util/bitmap.h" #define MAX_LINESIZE 256 @@ -45,51 +47,46 @@ { { evNone, "evNone" }, { evPlay, "evPlay" }, - { evDropFile, "evDropFile" }, { evStop, "evStop" }, { evPause, "evPause" }, { evPrev, "evPrev" }, { evNext, "evNext" }, { evLoad, "evLoad" }, - { evEqualizer, "evEqualizer" }, - { evPlayList, "evPlaylist" }, - { evExit, "evExit" }, - { evIconify, "evIconify" }, - { evIncBalance, "evIncBalance" }, - { evDecBalance, "evDecBalance" }, - { evFullScreen, "evFullScreen" }, - { evFName, "evFName" }, - { evMovieTime, "evMovieTime" }, - { evAbout, "evAbout" }, { evLoadPlay, "evLoadPlay" }, - { evPreferences, "evPreferences" }, - { evSkinBrowser, "evSkinBrowser" }, + { evLoadAudioFile, "evLoadAudioFile" }, + { evLoadSubtitle, "evLoadSubtitle" }, + { evDropSubtitle, "evDropSubtitle" }, + { evPlaylist, "evPlaylist" }, + { evPlayCD, "evPlayCD" }, + { evPlayVCD, "evPlayVCD" }, + { evPlayDVD, "evPlayDVD" }, + { evLoadURL, "evSetURL" }, // legacy + { evLoadURL, "evLoadURL" }, + { evPlaySwitchToPause, "evPlaySwitchToPause" }, + { evPauseSwitchToPlay, "evPauseSwitchToPlay" }, { evBackward10sec, "evBackward10sec" }, { evForward10sec, "evForward10sec" }, { evBackward1min, "evBackward1min" }, { evForward1min, "evForward1min" }, { evBackward10min, "evBackward10min" }, { evForward10min, "evForward10min" }, + { evSetMoviePosition, "evSetMoviePosition" }, + { evHalfSize, "evHalfSize" }, + { evDoubleSize, "evDoubleSize" }, + { evFullScreen, "evFullScreen" }, + { evNormalSize, "evNormalSize" }, + { evSetAspect, "evSetAspect" }, { evIncVolume, "evIncVolume" }, { evDecVolume, "evDecVolume" }, - { evMute, "evMute" }, - { evIncAudioBufDelay, "evIncAudioBufDelay" }, - { evDecAudioBufDelay, "evDecAudioBufDelay" }, - { evPlaySwitchToPause, "evPlaySwitchToPause" }, - { evPauseSwitchToPlay, "evPauseSwitchToPlay" }, - { evNormalSize, "evNormalSize" }, - { evDoubleSize, "evDoubleSize" }, - { evSetMoviePosition, "evSetMoviePosition" }, { evSetVolume, "evSetVolume" }, + { evMute, "evMute" }, { evSetBalance, "evSetBalance" }, - { evHelp, "evHelp" }, - { evLoadSubtitle, "evLoadSubtitle" }, - { evPlayDVD, "evPlayDVD" }, - { evPlayVCD, "evPlayVCD" }, - { evSetURL, "evSetURL" }, - { evLoadAudioFile, "evLoadAudioFile" }, - { evDropSubtitle, "evDropSubtitle" }, - { evSetAspect, "evSetAspect" } + { evEqualizer, "evEqualizer" }, + { evAbout, "evAbout" }, + { evPreferences, "evPreferences" }, + { evSkinBrowser, "evSkinBrowser" }, + { evIconify, "evIconify" }, + { evExit, "evExit" } }; static const int evBoxs = sizeof(evNames) / sizeof(evName); @@ -104,7 +101,7 @@ } /* reads a complete image as is into image buffer */ -static image *pngRead(skin_t *skin, unsigned char *fname) +static image *pngRead(skin_t *skin, const char *fname) { int i; guiImage bmp; @@ -118,7 +115,7 @@ if(!(fp = fopen(fname, "rb"))) { filename = calloc(1, strlen(skin->skindir) + strlen(fname) + 6); - sprintf(filename, "%s\\%s.png", skin->skindir, fname); + sprintf(filename, "%s/%s.png", skin->skindir, fname); if(!(fp = fopen(filename, "rb"))) { mp_msg(MSGT_GPLAYER, MSGL_ERR, "[png] cannot find image %s\n", filename); @@ -131,9 +128,7 @@ for (i=0; i < skin->imagecount; i++) if(!strcmp(fname, skin->images[i]->name)) { -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[png] skinfile %s already exists\n", fname); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[png] skinfile %s already exists\n", fname); free(filename); return skin->images[i]; } @@ -186,14 +181,12 @@ free(skin->images); } -#ifdef DEBUG static void dumpwidgets(skin_t *skin) { unsigned int i; for (i=0; iwidgetcount; i++) - mp_msg(MSGT_GPLAYER, MSGL_V, "widget %p id %i\n", skin->widgets[i], skin->widgets[i]->id); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "widget %p id %i\n", skin->widgets[i], skin->widgets[i]->id); } -#endif static int counttonextchar(const char *s1, char c) { @@ -217,55 +210,39 @@ { unsigned int i; - free(skin->skindir); - skin->skindir = NULL; + nfree(skin->skindir); for (i=1; i<=skin->lastusedid; i++) skin->removewidget(skin, i); - free(skin->widgets); - skin->widgets = NULL; + nfree(skin->widgets); freeimages(skin); for(i=0; iwindowcount; i++) { - free(skin->windows[i]->name); - skin->windows[i]->name = NULL; + nfree(skin->windows[i]->name); free(skin->windows[i]); } - free(skin->windows); - skin->windows = NULL; + nfree(skin->windows); for (i=0; ifontcount; i++) { unsigned int x; - free(skin->fonts[i]->name); - skin->fonts[i]->name = NULL; - - free(skin->fonts[i]->id); - skin->fonts[i]->id = NULL; + nfree(skin->fonts[i]->name); + nfree(skin->fonts[i]->id); for (x=0; xfonts[i]->charcount; x++) - { - free(skin->fonts[i]->chars[x]); - skin->fonts[i]->chars[x] = NULL; - } + nfree(skin->fonts[i]->chars[x]); - free(skin->fonts[i]->chars); - skin->fonts[i]->chars = NULL; + nfree(skin->fonts[i]->chars); - free(skin->fonts[i]); - skin->fonts[i] = NULL; - } - free(skin->fonts); - skin->fonts = NULL; -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN FREE] skin freed\n"); -#endif - free(skin); - skin = NULL; + nfree(skin->fonts[i]); + } + nfree(skin->fonts); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN FREE] skin freed\n"); + nfree(skin); } static void removewidget(skin_t *skin, int id) @@ -279,8 +256,7 @@ if(skin->widgets[i]->id == id) { free(skin->widgets[i]->label); - free(skin->widgets[i]); - skin->widgets[i] = NULL; + nfree(skin->widgets[i]); } else { @@ -293,9 +269,7 @@ (skin->widgetcount)--; free(skin->widgets); skin->widgets = temp; -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "removed widget %i\n", id); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "removed widget %i\n", id); return; } free(temp); @@ -323,11 +297,9 @@ mywidget->wwidth = mywidget->width = atoi(findnextstring(temp, desc, &base)); mywidget->wheight = mywidget->height = atoi(findnextstring(temp, desc, &base)); win->base = mywidget; -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [BASE] %s %i %i %i %i\n", + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [ITEM] [BASE] %s %i %i %i %i\n", (mywidget->bitmap[0]) ? mywidget->bitmap[0]->name : NULL, mywidget->x, mywidget->y, mywidget->width, mywidget->height); -#endif } else if(!strncmp(desc, "button", 6)) { @@ -352,11 +324,9 @@ } } -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [BUTTON] %s %i %i %i %i msg %i\n", + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [ITEM] [BUTTON] %s %i %i %i %i msg %i\n", (mywidget->bitmap[0]) ? mywidget->bitmap[0]->name : NULL, mywidget->x, mywidget->y, mywidget->width, mywidget->height, mywidget->msg); -#endif } else if(!strncmp(desc, "hpotmeter", 9) || !strncmp(desc, "vpotmeter", 9)) { @@ -385,8 +355,7 @@ break; } } -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] %s %s %i %i %s %i %f %i %i %i %i msg %i\n", + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [ITEM] %s %s %i %i %s %i %f %i %i %i %i msg %i\n", (mywidget->type == tyHpotmeter) ? "[HPOTMETER]" : "[VPOTMETER]", (mywidget->bitmap[0]) ? mywidget->bitmap[0]->name : NULL, mywidget->width, mywidget->height, @@ -394,7 +363,6 @@ mywidget->phases, mywidget->value, mywidget->wx, mywidget->wy, mywidget->wwidth, mywidget->wwidth, mywidget->msg); -#endif } else if(!strncmp(desc, "potmeter", 8)) { @@ -419,14 +387,12 @@ break; } } -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [POTMETER] %s %i %i %i %f %i %i msg %i\n", + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [ITEM] [POTMETER] %s %i %i %i %f %i %i msg %i\n", (mywidget->bitmap[0]) ? mywidget->bitmap[0]->name : NULL, mywidget->width, mywidget->height, mywidget->phases, mywidget->value, mywidget->x, mywidget->y, mywidget->msg); -#endif } else if(!strncmp(desc, "menu", 4)) { @@ -448,17 +414,13 @@ break; } } -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [MENU] %i %i %i %i msg %i\n", + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [ITEM] [MENU] %i %i %i %i msg %i\n", mywidget->x, mywidget->y, mywidget->width, mywidget->height, mywidget->msg); -#endif } else if(!strncmp(desc, "selected", 8)) { win->base->bitmap[1] = pngRead(skin, (char *) desc + 9); -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [BASE] added image %s\n", win->base->bitmap[1]->name); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [ITEM] [BASE] added image %s\n", win->base->bitmap[1]->name); } else if(!strncmp(desc, "slabel",6)) { @@ -478,10 +440,8 @@ } } mywidget->label = strdup(findnextstring(temp, desc, &base)); -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [SLABEL] %i %i %s %s\n", + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [ITEM] [SLABEL] %i %i %s %s\n", mywidget->x, mywidget->y, mywidget->font->name, mywidget->label); -#endif } else if(!strncmp(desc, "dlabel", 6)) { @@ -503,10 +463,8 @@ } } mywidget->label=strdup(findnextstring(temp, desc, &base)); -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [ITEM] [DLABEL] %i %i %i %i %s \"%s\"\n", + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [ITEM] [DLABEL] %i %i %i %i %s \"%s\"\n", mywidget->x, mywidget->y, mywidget->length, mywidget->align, mywidget->font->name, mywidget->label); -#endif } free(temp); } @@ -522,10 +480,13 @@ char *tmp = calloc(1, MAX_LINESIZE); char *desc = calloc(1, MAX_LINESIZE); filename = calloc(1, strlen(skin->skindir) + strlen(skin->fonts[x]->name) + 6); - sprintf(filename, "%s\\%s.fnt", skin->skindir, skin->fonts[x]->name); + sprintf(filename, "%s/%s.fnt", skin->skindir, skin->fonts[x]->name); if(!(fp = fopen(filename,"rb"))) { mp_msg(MSGT_GPLAYER, MSGL_ERR, "[FONT LOAD] Font not found \"%s\"\n", skin->fonts[x]->name); + free(tmp); + free(desc); + free(filename); return; } while(!feof(fp)) @@ -542,9 +503,7 @@ /* remove comments */ if((tmp[i] == ';') && ((i < 1) || (tmp[i-1] != '\"'))) { -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[FONT LOAD] Comment: %s", tmp + i + 1); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[FONT LOAD] Comment: %s", tmp + i + 1); break; } desc[pos] = tmp[i]; @@ -555,9 +514,7 @@ if(!strncmp(desc, "image", 5)) { skin->fonts[x]->image = pngRead(skin, desc + 6); -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[FONT] [IMAGE] \"%s\"\n", desc + 6); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[FONT] [IMAGE] \"%s\"\n", desc + 6); } else { @@ -573,14 +530,12 @@ skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->y = atoi(findnextstring(tmp, desc, &base)); skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->width = atoi(findnextstring(tmp, desc, &base)); skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->height = atoi(findnextstring(tmp, desc, &base)); -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[FONT] [CHAR] %c %i %i %i %i\n", + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[FONT] [CHAR] %c %i %i %i %i\n", skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->c, skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->x, skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->y, skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->width, skin->fonts[x]->chars[skin->fonts[x]->charcount - 1]->height); -#endif } } free(desc); @@ -611,11 +566,14 @@ skin->skindir = strdup(skindir); filename = calloc(1, strlen(skin->skindir) + strlen("skin") + 2); - sprintf(filename, "%s\\skin", skin->skindir); + sprintf(filename, "%s/skin", skin->skindir); if(!(fp = fopen(filename, "rb"))) { mp_msg(MSGT_GPLAYER, MSGL_FATAL, "[SKIN LOAD] Skin \"%s\" not found\n", skindir); skin->freeskin(skin); + free(tmp); + free(desc); + free(filename); return NULL; } @@ -636,9 +594,7 @@ /* remove comments */ else if(tmp[i] == ';') { -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN LOAD] Comment: %s", tmp + i + 1); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN LOAD] Comment: %s", tmp + i + 1); break; } desc[pos] = tmp[i]; @@ -650,15 +606,11 @@ /* parse window specific info */ if(!strncmp(desc, "section", 7)) { -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [SECTION] \"%s\"\n", desc + 8); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [SECTION] \"%s\"\n", desc + 8); } else if(!strncmp(desc, "window", 6)) { -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [WINDOW] \"%s\"\n", desc + 7); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [WINDOW] \"%s\"\n", desc + 7); reachedendofwindow = 0; (skin->windowcount)++; skin->windows = realloc(skin->windows, sizeof(window *) * skin->windowcount); @@ -677,9 +629,7 @@ else if(!strncmp(desc, "decoration", 10) && !strncmp(desc + 11, "enable", 6)) { mywindow->decoration = 1; -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [DECORATION] enabled decoration for window \"%s\"\n", mywindow->name); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [DECORATION] enabled decoration for window \"%s\"\n", mywindow->name); } else if(!strncmp(desc, "background", 10)) { @@ -688,27 +638,21 @@ mywindow->backgroundcolor[0] = atoi(findnextstring(temp, desc, &base)); mywindow->backgroundcolor[1] = atoi(findnextstring(temp, desc, &base)); mywindow->backgroundcolor[2] = atoi(findnextstring(temp, desc, &base)); -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [BACKGROUND] window \"%s\" has backgroundcolor (%i,%i,%i)\n", mywindow->name, + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [BACKGROUND] window \"%s\" has backgroundcolor (%i,%i,%i)\n", mywindow->name, mywindow->backgroundcolor[0], mywindow->backgroundcolor[1], mywindow->backgroundcolor[2]); -#endif } else if(!strncmp(desc, "end", 3)) { if(reachedendofwindow) { -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [END] of section\n"); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [END] of section\n"); } else { reachedendofwindow = 1; -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [END] of window \"%s\"\n", mywindow->name); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [END] of window \"%s\"\n", mywindow->name); } } else if(!strncmp(desc, "font", 4)) @@ -736,9 +680,7 @@ skin->fonts[id]->name = strdup(temp); skin->fonts[id]->id = strdup(findnextstring(temp, desc, &base)); } -#ifdef DEBUG - mp_msg(MSGT_GPLAYER, MSGL_DBG4, "[SKIN] [FONT] id \"%s\" name \"%s\"\n", skin->fonts[id]->name, skin->fonts[id]->id); -#endif + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[SKIN] [FONT] id \"%s\" name \"%s\"\n", skin->fonts[id]->name, skin->fonts[id]->id); } else skin->addwidget(skin, mywindow, desc); @@ -750,6 +692,6 @@ fclose(fp); loadfonts(skin); mp_msg(MSGT_GPLAYER, MSGL_V, "[SKIN LOAD] loaded skin \"%s\"\n", skin->skindir); - /* dumpwidgets(skin); */ + dumpwidgets(skin); return skin; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/skinload.h mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/skinload.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/skinload.h 2010-10-26 08:15:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/skinload.h 2011-12-31 12:38:52.000000000 +0000 @@ -107,7 +107,7 @@ void (*addwidget)(skin_t *skin, window *win, const char *desc); void (*removewidget)(skin_t *skin, int id); char *(*geteventname)(int event); - image *(*pngRead)(skin_t *skin, unsigned char *fname); + image *(*pngRead)(skin_t *skin, const char *fname); }; skin_t *loadskin(char *skindir, int desktopbpp); @@ -139,13 +139,15 @@ #define evPrev 6 #define evNext 7 #define evLoad 8 -#define evEqualizer 9 -#define evPlayList 10 -#define evIconify 11 -#define evAbout 12 #define evLoadPlay 13 -#define evPreferences 14 -#define evSkinBrowser 15 +#define evLoadAudioFile 42 +#define evLoadSubtitle 38 +#define evDropSubtitle 43 +#define evPlaylist 10 +#define evPlayCD 48 +#define evPlayVCD 40 +#define evPlayDVD 39 +#define evLoadURL 5013 #define evPlaySwitchToPause 16 #define evPauseSwitchToPlay 17 @@ -155,61 +157,43 @@ #define evForward1min 21 #define evBackward10min 22 #define evForward10min 23 +#define evSetMoviePosition 27 -#define evNormalSize 24 +#define evHalfSize 301 #define evDoubleSize 25 #define evFullScreen 26 - -#define evSetMoviePosition 27 -#define evSetVolume 28 -#define evSetBalance 29 -#define evMute 30 +#define evNormalSize 24 +#define evSetAspect 44 #define evIncVolume 31 #define evDecVolume 32 -#define evIncAudioBufDelay 33 -#define evDecAudioBufDelay 34 -#define evIncBalance 35 -#define evDecBalance 36 - -#define evHelp 37 +#define evSetVolume 28 +#define evMute 30 +#define evSetBalance 29 +#define evEqualizer 9 -#define evLoadSubtitle 38 -#define evDropSubtitle 43 -#define evPlayDVD 39 -#define evPlayVCD 40 -#define evPlayNetwork 41 -#define evLoadAudioFile 42 -#define evSetAspect 44 -#define evSetAudio 45 -#define evSetVideo 46 -#define evDropFile 47 -#define evPlayCD 48 +#define evAbout 12 +#define evPreferences 14 +#define evSkinBrowser 15 +#define evIconify 11 #define evExit 1000 -// --- General events --- +// --- Internal events --- + +#define ivSetAudio 45 +#define ivSetVideo 46 +#define ivSetSubtitle 47 + +#define ivShowPopUpMenu 5005 +#define ivHidePopUpMenu 5006 +#define ivSetDVDAudio 5007 +#define ivSetDVDSubtitle 5008 +#define ivSetDVDTitle 5009 +#define ivSetDVDChapter 5010 +#define ivSetVCDTrack 5012 +#define ivSetCDTrack 5014 -#define evFileLoaded 5000 -#define evHideMouseCursor 5001 -#define evMessageBox 5002 -#define evGeneralTimer 5003 -#define evGtkIsOk 5004 -#define evShowPopUpMenu 5005 -#define evHidePopUpMenu 5006 -#define evSetDVDAudio 5007 -#define evSetDVDSubtitle 5008 -#define evSetDVDTitle 5009 -#define evSetDVDChapter 5010 -#define evSubtitleLoaded 5011 -#define evSetVCDTrack 5012 -#define evSetURL 5013 - -#define evFName 7000 -#define evMovieTime 7001 -#define evRedraw 7002 -#define evHideWindow 7003 -#define evShowWindow 7004 -#define evFirstLoad 7005 +#define ivRedraw 7002 #endif /* MPLAYER_GUI_SKINLOAD_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/widgetrender.c mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/widgetrender.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/win32/widgetrender.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/win32/widgetrender.c 2011-10-26 15:14:06.000000000 +0000 @@ -26,6 +26,7 @@ #include #include "gui/util/bitmap.h" +#include "gui/util/string.h" #include "gui/interface.h" #include "gui.h" @@ -127,25 +128,25 @@ } strcpy(text, item->label); if(item->type == tySlabel) return text; - stringreplace(text, "$1", "%.2i:%.2i:%.2i", guiInfo.TimeSec / 3600, - (guiInfo.TimeSec / 60) % 60, guiInfo.TimeSec % 60); - stringreplace(text, "$2", "%.4i:%.2i", guiInfo.TimeSec / 60, guiInfo.TimeSec % 60); - stringreplace(text, "$3", "%.2i", guiInfo.TimeSec / 3600); - stringreplace(text, "$4", "%.2i", (guiInfo.TimeSec / 60) % 60); - stringreplace(text, "$5", "%.2i", guiInfo.TimeSec % 60); - stringreplace(text, "$6", "%.2i:%.2i:%.2i", guiInfo.LengthInSec / 3600, - (guiInfo.LengthInSec / 60) % 60, guiInfo.LengthInSec % 60); - stringreplace(text, "$7", "%.4i:%.2i", guiInfo.LengthInSec / 60, guiInfo.LengthInSec % 60); - stringreplace(text, "$8", "%i:%.2i:%.2i", guiInfo.TimeSec / 3600, - (guiInfo.TimeSec / 60) % 60, guiInfo.TimeSec % 60); + stringreplace(text, "$1", "%.2i:%.2i:%.2i", guiInfo.ElapsedTime / 3600, + (guiInfo.ElapsedTime / 60) % 60, guiInfo.ElapsedTime % 60); + stringreplace(text, "$2", "%.4i:%.2i", guiInfo.ElapsedTime / 60, guiInfo.ElapsedTime % 60); + stringreplace(text, "$3", "%.2i", guiInfo.ElapsedTime / 3600); + stringreplace(text, "$4", "%.2i", (guiInfo.ElapsedTime / 60) % 60); + stringreplace(text, "$5", "%.2i", guiInfo.ElapsedTime % 60); + stringreplace(text, "$6", "%.2i:%.2i:%.2i", guiInfo.RunningTime / 3600, + (guiInfo.RunningTime / 60) % 60, guiInfo.RunningTime % 60); + stringreplace(text, "$7", "%.4i:%.2i", guiInfo.RunningTime / 60, guiInfo.RunningTime % 60); + stringreplace(text, "$8", "%i:%.2i:%.2i", guiInfo.ElapsedTime / 3600, + (guiInfo.ElapsedTime / 60) % 60, guiInfo.ElapsedTime % 60); stringreplace(text, "$v", "%3.2f", guiInfo.Volume); stringreplace(text, "$V", "%3.1f", guiInfo.Volume); stringreplace(text, "$b", "%3.2f", guiInfo.Balance); stringreplace(text, "$B", "%3.1f", guiInfo.Balance); stringreplace(text, "$t", "%.2i", guiInfo.Track); - stringreplace(text, "$o", "%s", guiInfo.Filename); - stringreplace(text, "$x", "%i", guiInfo.MovieWidth); - stringreplace(text, "$y", "%i", guiInfo.MovieHeight); + stringreplace(text, "$o", "%s", acp(TranslateFilename(0, tmp, sizeof(tmp)))); + stringreplace(text, "$x", "%i", guiInfo.VideoWidth); + stringreplace(text, "$y", "%i", guiInfo.VideoHeight); stringreplace(text, "$C", "%s", guiInfo.sh_video ? codecname : ""); stringreplace(text, "$$", "$"); @@ -156,8 +157,8 @@ else if(guiInfo.Playing == GUI_PAUSE) stringreplace(text, NULL, "e"); } - if(guiInfo.AudioType == 0) stringreplace(text, "$a", "n"); - else if(guiInfo.AudioType == 1) stringreplace(text, "$a", "m"); + if(guiInfo.AudioChannels == 0) stringreplace(text, "$a", "n"); + else if(guiInfo.AudioChannels == 1) stringreplace(text, "$a", "m"); else stringreplace(text, "$a", "t"); if(guiInfo.StreamType == 0) @@ -168,16 +169,8 @@ #endif else stringreplace(text, "$T", "u"); - if(guiInfo.Filename) - { - for (i=0; i #ifdef CONFIG_XSHAPE #include #endif @@ -65,7 +65,10 @@ #include #include -#undef ENABLE_DPMS +#define MOUSEHIDE_DELAY 1000 // in milliseconds + +static wsTWindow *mouse_win; +static unsigned int mouse_time; typedef struct { unsigned long flags; @@ -203,6 +206,42 @@ return 0; } +/** + * @brief Update screen width, screen height and screen origin x and y + * from xinerama information. + * + * Set wsOrgX, wsOrgY, wsMaxX and wsMaxY as well as + * win->X, win->Y, win->Width and win->Height. + * + * @param win pointer to a ws window structure or NULL + */ +static void wsUpdateXineramaInfo(wsTWindow *win) +{ + if (win) { + vo_dx = win->X; + vo_dy = win->Y; + vo_dwidth = win->Width; + vo_dheight = win->Height; + } + + vo_screenwidth = wsMaxX; + vo_screenheight = wsMaxY; + + update_xinerama_info(); + + wsMaxX = vo_screenwidth; + wsMaxY = vo_screenheight; + wsOrgX = xinerama_x; + wsOrgY = xinerama_y; + + if (win) { + win->X = wsOrgX; + win->Y = wsOrgY; + win->Width = wsMaxX; + win->Height = wsMaxY; + } +} + void wsXInit(Display *mDisplay) { int eventbase; @@ -225,7 +264,7 @@ wsUseXShm = 0; } - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[ws] display name: %s => %s display.\n", dispname, localdisp ? "local" : "REMOTE"); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] display name: %s => %s display.\n", dispname, localdisp ? "local" : "REMOTE"); if (!localdisp) mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_WS_RemoteDisplay); @@ -270,35 +309,28 @@ if (!wsMaxY) wsMaxY = DisplayHeight(wsDisplay, wsScreen); } - vo_screenwidth = wsMaxX; - vo_screenheight = wsMaxY; - xinerama_x = wsOrgX; - xinerama_y = wsOrgY; - update_xinerama_info(); - wsMaxX = vo_screenwidth; - wsMaxY = vo_screenheight; - wsOrgX = xinerama_x; - wsOrgY = xinerama_y; + + wsUpdateXineramaInfo(NULL); wsGetDepthOnScreen(); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[ws] Screen depth: %d\n", wsDepthOnScreen); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[ws] size: %dx%d\n", wsMaxX, wsMaxY); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] Screen depth: %d\n", wsDepthOnScreen); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] size: %dx%d\n", wsMaxX, wsMaxY); #ifdef CONFIG_XINERAMA - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[ws] origin: +%d+%d\n", wsOrgX, wsOrgY); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] origin: +%d+%d\n", wsOrgX, wsOrgY); #endif - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[ws] red mask: 0x%x\n", wsRedMask); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[ws] green mask: 0x%x\n", wsGreenMask); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[ws] blue mask: 0x%x\n", wsBlueMask); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] red mask: 0x%x\n", wsRedMask); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] green mask: 0x%x\n", wsGreenMask); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] blue mask: 0x%x\n", wsBlueMask); #ifdef MP_DEBUG if (wsUseXShm) { int minor, major, shp; XShmQueryVersion(wsDisplay, &major, &minor, &shp); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[ws] XShm version is %d.%d\n", major, minor); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] XShm version is %d.%d\n", major, minor); } #ifdef CONFIG_XSHAPE @@ -306,7 +338,7 @@ int minor, major; XShapeQueryVersion(wsDisplay, &major, &minor); - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[ws] XShape version is %d.%d\n", major, minor); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] XShape version is %d.%d\n", major, minor); } #endif #endif @@ -348,6 +380,46 @@ } } +/** + * @brief Calculate and store the x and y position for a window. + * + * @param win pointer to a ws window structure + * @param x x position of the window (real/absolute or mock) + * @param y y position of the window (real/absolute or mock) + * @param width width of the area to place the window in + * @param height height of the area to place the window in + */ +static void wsWindowPosition(wsTWindow *win, int x, int y, int width, int height) +{ + switch (x) { + case -1: + win->X = wsOrgX + (wsMaxX - width) / 2; + break; + + case -2: + win->X = wsOrgX + wsMaxX - width; + break; + + default: + win->X = x; + break; + } + + switch (y) { + case -1: + win->Y = wsOrgY + (wsMaxY - height) / 2; + break; + + case -2: + win->Y = wsOrgY + wsMaxY - height; + break; + + default: + win->Y = y; + break; + } +} + // ---------------------------------------------------------------------------------------------- // Create window. // X,Y : window position @@ -373,34 +445,7 @@ wsHGC = DefaultGC(wsDisplay, wsScreen); -// The window position and size. - switch (X) { - case -1: - win->X = (wsMaxX / 2) - (wX / 2) + wsOrgX; - break; - - case -2: - win->X = wsMaxX - wX - 1 + wsOrgX; - break; - - default: - win->X = X; - break; - } - - switch (Y) { - case -1: - win->Y = (wsMaxY / 2) - (hY / 2) + wsOrgY; - break; - - case -2: - win->Y = wsMaxY - hY - 1 + wsOrgY; - break; - - default: - win->Y = Y; - break; - } + wsWindowPosition(win, X, Y, wX, hY); win->Width = wX; win->Height = hY; @@ -424,7 +469,7 @@ if (depth < 15) { mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_ColorDepthTooLow); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } XMatchVisualInfo(wsDisplay, wsScreen, depth, TrueColor, &win->VisualInfo); @@ -550,7 +595,7 @@ if (i == wsWLCount) { mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_TooManyOpenWindows); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } wsWindowList[i] = win; @@ -564,7 +609,7 @@ win->Idle = NULL; win->MouseHandler = NULL; win->KeyHandler = NULL; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[ws] window is created. ( %s ).\n", label); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] window is created. ( %s ).\n", label); } void wsDestroyWindow(wsTWindow *win) @@ -596,6 +641,17 @@ #endif } +/** + * @brief Handle automatic hiding of the cursor. + */ +void wsAutohideCursor(void) +{ + if (mouse_win && (GetTimerMS() - mouse_time >= MOUSEHIDE_DELAY)) { + wsVisibleMouse(mouse_win, wsHideMouseCursor); + mouse_win = NULL; + } +} + // ---------------------------------------------------------------------------------------------- // Handle events. // ---------------------------------------------------------------------------------------------- @@ -799,14 +855,29 @@ } } } + if (wsWindowList[l]->wsCursor != None) { + wsVisibleMouse(wsWindowList[l], wsShowMouseCursor); + mouse_win = wsWindowList[l]; + mouse_time = GetTimerMS(); + } goto buttonreleased; case ButtonRelease: i = Event->xbutton.button + 128; + if (wsWindowList[l]->wsCursor != None) { + wsVisibleMouse(wsWindowList[l], wsShowMouseCursor); + mouse_win = wsWindowList[l]; + mouse_time = GetTimerMS(); + } goto buttonreleased; case ButtonPress: i = Event->xbutton.button; + if (wsWindowList[l]->wsCursor != None) { + wsVisibleMouse(wsWindowList[l], wsShowMouseCursor); + mouse_win = wsWindowList[l]; + mouse_time = GetTimerMS(); + } goto buttonreleased; case EnterNotify: @@ -882,79 +953,62 @@ vo_x11_setlayer(wsDisplay, win, layer); } -// ---------------------------------------------------------------------------------------------- -// Switch to fullscreen. -// ---------------------------------------------------------------------------------------------- +/** + * @brief Switch window fullscreen state. + * + * Switch normal window to fullscreen and fullscreen window to normal. + * + * @param win pointer to a ws window structure + */ void wsFullScreen(wsTWindow *win) { - int decoration = 0; - if (win->isFullScreen) { - vo_x11_ewmh_fullscreen(_NET_WM_STATE_REMOVE); // removes fullscreen state if wm supports EWMH - - if (!(vo_fs_type & vo_wm_FULLSCREEN)) { // shouldn't be needed with EWMH fs + if (vo_fs_type & vo_wm_FULLSCREEN) + /* window manager supports EWMH */ + vo_x11_ewmh_fullscreen(win->WindowID, _NET_WM_STATE_REMOVE); + else { win->X = win->OldX; win->Y = win->OldY; win->Width = win->OldWidth; win->Height = win->OldHeight; - decoration = win->Decorations; } -#ifdef ENABLE_DPMS - wsScreenSaverOn(wsDisplay); -#endif - win->isFullScreen = False; } else { - if (!(vo_fs_type & vo_wm_FULLSCREEN)) { // shouldn't be needed with EWMH fs + if (vo_fs_type & vo_wm_FULLSCREEN) + /* window manager supports EWMH */ + vo_x11_ewmh_fullscreen(win->WindowID, _NET_WM_STATE_ADD); + else { win->OldX = win->X; win->OldY = win->Y; win->OldWidth = win->Width; win->OldHeight = win->Height; - vo_dx = win->X; - vo_dy = win->Y; - vo_dwidth = win->Width; - vo_dheight = win->Height; - vo_screenwidth = wsMaxX; - vo_screenheight = wsMaxY; - xinerama_x = wsOrgX; - xinerama_y = wsOrgY; - update_xinerama_info(); - wsMaxX = vo_screenwidth; - wsMaxY = vo_screenheight; - wsOrgX = xinerama_x; - wsOrgY = xinerama_y; - win->X = wsOrgX; - win->Y = wsOrgY; - win->Width = wsMaxX; - win->Height = wsMaxY; } win->isFullScreen = True; -#ifdef ENABLE_DPMS - wsScreenSaverOff(wsDisplay); -#endif - vo_x11_ewmh_fullscreen(_NET_WM_STATE_ADD); // adds fullscreen state if wm supports EWMH + wsUpdateXineramaInfo(win); } - if (!(vo_fs_type & vo_wm_FULLSCREEN)) { // shouldn't be needed with EWMH fs - vo_x11_decoration(wsDisplay, win->WindowID, decoration); - vo_x11_sizehint(win->X, win->Y, win->Width, win->Height, 0); - vo_x11_setlayer(wsDisplay, win->WindowID, win->isFullScreen); - - if ((!(win->isFullScreen)) & vo_ontop) - vo_x11_setlayer(wsDisplay, win->WindowID, 1); + /* unknown window manager and obsolete option -fsmode used */ + if (vo_wm_type == 0 && !(vo_fsmode & 16)) { + XUnmapWindow(wsDisplay, win->WindowID); // required for MWM + XWithdrawWindow(wsDisplay, win->WindowID, wsScreen); + } + /* restore window if window manager doesn't support EWMH */ + if (!(vo_fs_type & vo_wm_FULLSCREEN)) { + wsWindowDecoration(win, win->Decorations && !win->isFullScreen); + vo_x11_sizehint(win->X, win->Y, win->Width, win->Height, 0); + wsSetLayer(wsDisplay, win->WindowID, win->isFullScreen); XMoveResizeWindow(wsDisplay, win->WindowID, win->X, win->Y, win->Width, win->Height); } - if (vo_wm_type == 0 && !(vo_fsmode & 16)) { - XWithdrawWindow(wsDisplay, win->WindowID, wsScreen); - } + /* some window managers lose ontop after fullscreen */ + if (!win->isFullScreen & vo_ontop) + wsSetLayer(wsDisplay, win->WindowID, vo_ontop); - XMapRaised(wsDisplay, win->WindowID); - XRaiseWindow(wsDisplay, win->WindowID); + wsRaiseWindowTop(wsDisplay, win->WindowID); XFlush(wsDisplay); } @@ -1041,40 +1095,13 @@ // ---------------------------------------------------------------------------------------------- // Move window to x, y. // ---------------------------------------------------------------------------------------------- -void wsMoveWindow(wsTWindow *win, int b, int x, int y) +void wsMoveWindow(wsTWindow *win, Bool abs, int x, int y) { - if (b) { - switch (x) { - case -1: - win->X = (wsMaxX / 2) - (win->Width / 2) + wsOrgX; - break; - - case -2: - win->X = wsMaxX - win->Width + wsOrgX; - break; - - default: - win->X = x; - break; - } - - switch (y) { - case -1: - win->Y = (wsMaxY / 2) - (win->Height / 2) + wsOrgY; - break; - - case -2: - win->Y = wsMaxY - win->Height + wsOrgY; - break; - - default: - win->Y = y; - break; - } - } else { + if (abs) { win->X = x; win->Y = y; - } + } else + wsWindowPosition(win, x, y, win->Width, win->Height); win->SizeHint.flags = PPosition | PWinGravity; win->SizeHint.x = win->X; @@ -1088,6 +1115,41 @@ win->ReSize(win->X, win->Y, win->Width, win->Height); } +/** + * @brief Move the window to the x and y position, but if it no longer fits + * into the screen, reposition it towards the upper left. + * + * @param win pointer to a ws window structure + * @param abs flag whether the position is real/absolute (True) or mock (False) + * @param x x position of the window (real/absolute or mock) + * @param y y position of the window (real/absolute or mock) + */ +void wsMoveWindowWithin(wsTWindow *win, Bool abs, int x, int y) +{ + Bool fitting = True; + + wsMoveWindow(win, abs, x, y); + + if (win->X + win->Width + 1 > wsMaxX) { + fitting = False; + win->X = wsMaxX - win->Width; + + if (win->X < 0) + win->X = 0; + } + + if (win->Y + win->Height + 1 > wsMaxY) { + fitting = False; + win->Y = wsMaxY - win->Height; + + if (win->Y < 0) + win->Y = 0; + } + + if (!fitting) + wsMoveWindow(win, True, win->X, win->Y); +} + // ---------------------------------------------------------------------------------------------- // Resize window to sx, sy. // ---------------------------------------------------------------------------------------------- @@ -1123,10 +1185,12 @@ XSetWMNormalHints(wsDisplay, win->WindowID, &win->SizeHint); XResizeWindow(wsDisplay, win->WindowID, sx, sy); - XMapRaised(wsDisplay, win->WindowID); if (win->ReSize) win->ReSize(win->X, win->Y, win->Width, win->Height); + + if (vo_wm_type == 0) + XMapWindow(wsDisplay, win->WindowID); } // ---------------------------------------------------------------------------------------------- @@ -1137,15 +1201,16 @@ XIconifyWindow(wsDisplay, win.WindowID, 0); } -// ---------------------------------------------------------------------------------------------- -// Move top the window. -// ---------------------------------------------------------------------------------------------- -void wsMoveTopWindow(Display *wsDisplay, Window win) +/** + * @brief Map a window and raise it to the top. + * + * @param dpy display + * @param win window + */ +void wsRaiseWindowTop(Display *dpy, Window win) { -// XUnmapWindow( wsDisplay,win ); -// XMapWindow( wsDisplay,win ); - XMapRaised(wsDisplay, win); - XRaiseWindow(wsDisplay, win); + XMapRaised(dpy, win); + XRaiseWindow(dpy, win); } // ---------------------------------------------------------------------------------------------- @@ -1326,6 +1391,8 @@ switch (show) { case wsShowWindow: XMapRaised(wsDisplay, win->WindowID); + if (vo_fs_type & vo_wm_FULLSCREEN) + win->isFullScreen = False; break; case wsHideWindow: @@ -1358,7 +1425,7 @@ if (win->xImage == NULL) { mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_ShmError); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } win->Shminfo.shmid = shmget(IPC_PRIVATE, win->xImage->bytes_per_line * win->xImage->height, IPC_CREAT | 0777); @@ -1366,7 +1433,7 @@ if (win->Shminfo.shmid < 0) { XDestroyImage(win->xImage); mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_ShmError); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } win->Shminfo.shmaddr = (char *)shmat(win->Shminfo.shmid, 0, 0); @@ -1378,7 +1445,7 @@ shmdt(win->Shminfo.shmaddr); mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_ShmError); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } win->xImage->data = win->Shminfo.shmaddr; @@ -1394,7 +1461,7 @@ if ((win->xImage->data = malloc(win->xImage->bytes_per_line * win->xImage->height)) == NULL) { mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_WS_NotEnoughMemoryDrawBuffer); - guiExit(EXIT_ERROR); + mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); } } @@ -1448,73 +1515,6 @@ XWarpPointer(wsDisplay, wsRootWin, win->WindowID, 0, 0, 0, 0, x, y); } -#ifdef ENABLE_DPMS -static int dpms_disabled = 0; -static int timeout_save = 0; - -void wsScreenSaverOn(Display *mDisplay) -{ - int nothing; - -#ifdef CONFIG_XDPMS - - if (dpms_disabled) { - if (DPMSQueryExtension(mDisplay, ¬hing, ¬hing)) { - if (!DPMSEnable(mDisplay)) - mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_WS_DpmsUnavailable); // restoring power saving settings - else { - // DPMS does not seem to be enabled unless we call DPMSInfo - BOOL onoff; - CARD16 state; - DPMSInfo(mDisplay, &state, &onoff); - - if (onoff) - mp_msg(MSGT_GPLAYER, MSGL_V, "Successfully enabled DPMS.\n"); - else - mp_msg(MSGT_GPLAYER, MSGL_STATUS, MSGTR_WS_DpmsNotEnabled); - } - } - } - -#endif - - if (timeout_save) { - int dummy, interval, prefer_blank, allow_exp; - XGetScreenSaver(mDisplay, &dummy, &interval, &prefer_blank, &allow_exp); - XSetScreenSaver(mDisplay, timeout_save, interval, prefer_blank, allow_exp); - XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp); - } -} - -void wsScreenSaverOff(Display *mDisplay) -{ - int interval, prefer_blank, allow_exp, nothing; - -#ifdef CONFIG_XDPMS - - if (DPMSQueryExtension(mDisplay, ¬hing, ¬hing)) { - BOOL onoff; - CARD16 state; - DPMSInfo(mDisplay, &state, &onoff); - - if (onoff) { - Status stat; - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "Disabling DPMS.\n"); - dpms_disabled = 1; - stat = DPMSDisable(mDisplay); // monitor powersave off - mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "stat: %d.\n", stat); - } - } - -#endif - XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp); - - if (timeout_save) - XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp); // turning off screensaver -} - -#endif - void wsSetShape(wsTWindow *win, char *data) { #ifdef CONFIG_XSHAPE @@ -1532,14 +1532,24 @@ #endif } -void wsSetIcon(Display *dsp, Window win, guiIcon_t *icon) +/** + * @brief Set differently sized icons to a window. + * + * This function sets the X icon hint as well as + * the properties KWM_WIN_ICON and _NET_WM_ICON. + * + * @param dpy display + * @param win window + * @param icon pointer to the icons + */ +void wsSetIcon(Display *dpy, Window win, guiIcon_t *icon) { XWMHints *wm; Atom iconatom; - CARD32 data[2]; + long data[2]; if (icon->normal) { - wm = XGetWMHints(dsp, win); + wm = XGetWMHints(dpy, win); if (!wm) wm = XAllocWMHints(); @@ -1548,20 +1558,20 @@ wm->icon_mask = icon->normal_mask; wm->flags |= IconPixmapHint | IconMaskHint; - XSetWMHints(dsp, win, wm); + XSetWMHints(dpy, win, wm); XFree(wm); } if (icon->small || icon->normal) { - iconatom = XInternAtom(dsp, "KWM_WIN_ICON", False); + iconatom = XInternAtom(dpy, "KWM_WIN_ICON", False); data[0] = (icon->small ? icon->small : icon->normal); data[1] = (icon->small ? icon->small_mask : icon->normal_mask); - XChangeProperty(dsp, win, iconatom, iconatom, 32, PropModeReplace, (unsigned char *)data, 2); + XChangeProperty(dpy, win, iconatom, iconatom, 32, PropModeReplace, (unsigned char *)data, 2); } if (icon->collection) { - iconatom = XInternAtom(dsp, "_NET_WM_ICON", False); - XChangeProperty(dsp, win, iconatom, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)icon->collection, icon->collection_size); + iconatom = XInternAtom(dpy, "_NET_WM_ICON", False); + XChangeProperty(dpy, win, iconatom, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)icon->collection, icon->collection_size); } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/wm/ws.h mplayer-1.0~rc4.dfsg1+svn34540/gui/wm/ws.h --- mplayer-1.0~rc4.dfsg1+svn33713/gui/wm/ws.h 2011-06-19 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/wm/ws.h 2012-01-03 23:10:34.000000000 +0000 @@ -29,9 +29,6 @@ #include #include #include -#ifdef CONFIG_XDPMS -#include -#endif #define wsKeyReleased 0 #define wsKeyPressed 1 @@ -216,6 +213,7 @@ void wsDoExit(void); void wsMainLoop(void); +void wsAutohideCursor(void); Bool wsEvents(Display *display, XEvent *Event); void wsHandleEvents(void); @@ -229,10 +227,11 @@ // ---------------------------------------------------------------------------------------------- void wsCreateWindow(wsTWindow *win, int X, int Y, int wX, int hY, int bW, int cV, unsigned char D, char *label); void wsDestroyWindow(wsTWindow *win); -void wsMoveWindow(wsTWindow *win, int b, int x, int y); +void wsMoveWindow(wsTWindow *win, Bool abs, int x, int y); +void wsMoveWindowWithin(wsTWindow *win, Bool abs, int x, int y); void wsResizeWindow(wsTWindow *win, int sx, int sy); void wsIconify(wsTWindow win); -void wsMoveTopWindow(Display *wsDisplay, Window win); +void wsRaiseWindowTop(Display *dpy, Window win); void wsSetBackground(wsTWindow *win, int color); void wsSetForegroundRGB(wsTWindow *win, int r, int g, int b); void wsSetBackgroundRGB(wsTWindow *win, int r, int g, int b); @@ -244,7 +243,7 @@ void wsFullScreen(wsTWindow *win); void wsPostRedisplay(wsTWindow *win); void wsSetShape(wsTWindow *win, char *data); -void wsSetIcon(Display *dsp, Window win, guiIcon_t *icon); +void wsSetIcon(Display *dpy, Window win, guiIcon_t *icon); // ---------------------------------------------------------------------------------------------- // Draw string at x,y with fc ( foreground color ) and bc ( background color ). diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/gui/wm/wsxdnd.c mplayer-1.0~rc4.dfsg1+svn34540/gui/wm/wsxdnd.c --- mplayer-1.0~rc4.dfsg1+svn33713/gui/wm/wsxdnd.c 2010-10-26 08:15:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/gui/wm/wsxdnd.c 2011-07-07 15:47:07.000000000 +0000 @@ -165,7 +165,7 @@ if ((event->data.l[1] & 1) == 0){ int index; for(index = 0; index <= 2 ; index++){ - if (event->data.l[2+index] == ok) { + if ((Atom) event->data.l[2+index] == ok) { atom_support = ok; } } @@ -195,7 +195,7 @@ } /* now chek what we've got */ { - int i; + unsigned long i; for(i=0; imessage_type == XA_XdndDrop) { - if (event->data.l[0] != XGetSelectionOwner(wsDisplay, XA_XdndSelection)){ + if ((Window) event->data.l[0] != XGetSelectionOwner(wsDisplay, XA_XdndSelection)){ puts("Wierd selection owner... QT?"); } if (atom_support != None) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-bg.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-bg.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-bg.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-bg.h 2011-12-05 11:38:13.000000000 +0000 @@ -61,7 +61,6 @@ #define MSGTR_NoHomeDir "HOME директорията не може да бъде открита.\n" #define MSGTR_GetpathProblem "Проблем с функция get_path(\"config\") \n" #define MSGTR_CreatingCfgFile "Създава се конфигурационен файл: %s\n" -#define MSGTR_BuiltinCodecsConf "Използва се вградения codecs.conf.\n" #define MSGTR_CantLoadFont "Не може да се зареди шрифт: %s\n" #define MSGTR_CantLoadSub "Не могат да бъдат заредени субтитри: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: ФАТАЛНО: Избраният поток липсва!\n" @@ -102,8 +101,6 @@ #define MSGTR_Playing "Възпроизвеждане на %s.\n" #define MSGTR_NoSound "Аудио: няма звук\n" #define MSGTR_FPSforced "Наложени са %5.3f кадъра в секунда (ftime: %5.3f).\n" -#define MSGTR_CompiledWithRuntimeDetection "Компилиран с динамично установяване на процесора - ВНИМАНИЕ - това не е оптимално!\nЗа най-добра производителност, рекомпилирайте MPlayer с --disable-runtime-cpudetection.\n" -#define MSGTR_CompiledWithCPUExtensions "Компилиран за x86 процесори с разширения:" #define MSGTR_AvailableVideoOutputDrivers "Достъпни видео драйвери:\n" #define MSGTR_AvailableAudioOutputDrivers "Достъпни аудио драйвери:\n" #define MSGTR_AvailableAudioCodecs "Достъпни аудио кодеци:\n" @@ -111,7 +108,6 @@ #define MSGTR_AvailableAudioFm "Достъпни (вградени) фамилии аудио кодеци/драйвери:\n" #define MSGTR_AvailableVideoFm "Достъпни (вградени) фамилии видео кодеци/драйвери:\n" #define MSGTR_AvailableFsType "Достъпни пълноекранни режими:\n" -#define MSGTR_UsingRTCTiming "Използва се хардуерния RTC таймер (%ldHz).\n" #define MSGTR_CannotReadVideoProperties "Видео: Параметрите не могат да бъдат прочетени.\n" #define MSGTR_NoStreamFound "Не е открит поток.\n" #define MSGTR_ErrorInitializingVODevice "Грешка при отваряне/инициализиране на избраното видео устройство (-vo).\n" @@ -143,14 +139,11 @@ #define MSGTR_LoadingConfig "Зарежда се конфигурационен файл '%s'\n" #define MSGTR_AddedSubtitleFile "SUB: добавен е файл със субтитри (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "Грешка при отваряне на файла [%s] за запис!\n" -#define MSGTR_CommandLine "Команден ред:" #define MSGTR_RTCDeviceNotOpenable "Грешка при отваряне на %s: %s (необходими са права за четене).\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Linux RTC грешка при инициализация в ioctl (rtc_irqp_set кд%lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Добавете \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" към системните стартови скриптове.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Linux RTC init грешка в ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "използва се %s таймер.\n" -#define MSGTR_MenuInitialized "Менюто е инициализирано: %s\n" -#define MSGTR_MenuInitFailed "Менюто не може да бъде инициализирано.\n" #define MSGTR_Getch2InitializedTwice "Внимание: Функцията getch2_init е извикана двукратно!\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Видео филтъра libmenu не може да бъде отворен без root меню %s.\n" #define MSGTR_AudioFilterChainPreinitError "Грешка при предварителна инициализация на аудио филтрите!\n" @@ -213,12 +206,9 @@ #define MSGTR_MP3AudioSelected "Избрано е MP3 аудио\n" #define MSGTR_CannotAllocateBytes "Не може да се заделят %d байта\n" #define MSGTR_SettingAudioDelay "АУДИО ЗАКЪСНЕНИЕТО е настроено на %5.3f\n" -#define MSGTR_SettingAudioInputGain "Аудио усилването е нагласено на %f\n" -#define MSGTR_LamePresetEquals "\nпрофил=%s\n\n" #define MSGTR_LimitingAudioPreload "Предварителното аудио зареждане е ограничено на 0.4с\n" #define MSGTR_IncreasingAudioDensity "Гъстотата на звука е увеличена на 4\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Налагане на нулево предварително аудио зареждане, max pts correction to 0\n" -#define MSGTR_CBRAudioByterate "\n\nCBR аудио: %d байта/сек, %d байта за блок\n" #define MSGTR_LameVersion "LAME версия %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Грешка: Указаният битрейт е извън допустимите граници за този профил\n"\ "\n"\ @@ -402,8 +392,6 @@ #define MSGTR_CodecNeedsOutfmt "\nкодекът(%s) се нуждае от 'outfmt'!\n" #define MSGTR_CantAllocateComment "Не може да се задели памет за коментар. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "Четене от %s: " -#define MSGTR_CantOpenFileError "'%s': %s не може да бъде отворен\n" #define MSGTR_CantGetMemoryForLine "Няма достатъчно памет за 'line': %s\n" #define MSGTR_CantReallocCodecsp "Не може да презадели памет за '*codecsp': %s\n" #define MSGTR_CodecNameNotUnique "Името на кодека '%s' не е уникално." @@ -460,7 +448,6 @@ #define MSGTR_SwitchToNi "\nЗле структуриран AVI файл - превключване към -ni режим...\n" #define MSGTR_Detected_XXX_FileFormat "%s формат.\n" #define MSGTR_DetectedAudiofile "Аудио файл.\n" -#define MSGTR_NotSystemStream "Не е MPEG System Stream... (може би Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Невалиден MPEG-ES поток??? Свържете се с автора, може да е бъг :(\n" #define MSGTR_FormatNotRecognized "============ За съжаление, този формат не се разпознава/поддържа =============\n"\ "=== Ако този файл е AVI, ASF или MPEG поток, моля уведомете автора! ===\n" @@ -482,11 +469,8 @@ #define MSGTR_MOVcomprhdr "MOV: Поддръжката на компресирани хедъри изисква ZLIB!\n" #define MSGTR_MOVvariableFourCC "MOV: ВНИМАНИЕ: Открит е променлив FOURCC код!?\n" #define MSGTR_MOVtooManyTrk "MOV: ВНИМАНИЕ: твърде много пътечки" -#define MSGTR_FoundAudioStream "==> Открит е аудио поток: %d\n" -#define MSGTR_FoundVideoStream "==> Открит е видео поток: %d\n" #define MSGTR_DetectedTV "Открита е телевизия! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Не може да бъде отворен ogg разпределител.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Търсене на звуков поток (id:%d).\n" #define MSGTR_CannotOpenAudioStream "Не може да се отвори звуков поток: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Не могат да бъдат отворени субтитри: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Не може да бъде отворен аудио разпределител: %s\n" @@ -518,21 +502,15 @@ #define MSGTR_UsingExternalPP "[PP] Използване на външен филтър за допълнителна обработка, max q = %d.\n" #define MSGTR_UsingCodecPP "[PP] Използване на допълнителна обработка от страна на кодека, max q = %d.\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Видео атрибут '%s' не се поддържа от vo & vd.\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Заявената фамилия видео кодеци [%s] (vfm=%s) не е достъпна.\nРазрешете я по време на компилация.\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Заявената фамилия аудио кодеци [%s] (afm=%s) не е достъпна.\nРазрешете я по време на компилация.\n" #define MSGTR_OpeningVideoDecoder "Отваряне на видео декодер: [%s] %s\n" #define MSGTR_OpeningAudioDecoder "Отваряне на аудио декодер: [%s] %s\n" -#define MSGTR_UninitVideoStr "uninit video: %s\n" -#define MSGTR_UninitAudioStr "uninit audio: %s\n" #define MSGTR_VDecoderInitFailed "Инициализацията на VDecoder се провали :(\n" #define MSGTR_ADecoderInitFailed "Инициализацията на ADecoder се провали :(\n" #define MSGTR_ADecoderPreinitFailed "Предварителната инициализация на ADecoder се провали :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Заделяне на %d байта за входния буфер.\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Заделяне на %d + %d = %d байта за изходния буфер.\n" // LIRC: -#define MSGTR_SettingUpLIRC "Установяване на LIRC поддръжка...\n" #define MSGTR_LIRCopenfailed "Няма да има LIRC поддръжка.\n" #define MSGTR_LIRCcfgerr "Конфигурационният файл за LIRC %s не може да бъде прочетен.\n" @@ -550,8 +528,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Трябва да обновите/инсталирате пакета с двоичните кодеци.\nОтидете на http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO: Видеокодек Win32/DShow е инициализиран успешно.\n" -#define MSGTR_DMOInitOK "INFO: Видеокодек Win32/DMO е инициализиран успешно.\n" // x11_common.c #define MSGTR_EwmhFullscreenStateFailed "\nX11: Не може да прати EWMH fullscreen Event!\n" @@ -577,7 +553,6 @@ #define MSGTR_Preferences "Предпочитания" #define MSGTR_AudioPreferences "Конфигуриране на аудио драйвера" #define MSGTR_NoMediaOpened "Няма отворени елементи." -#define MSGTR_VCDTrack "VCD писта %d" #define MSGTR_NoChapter "Няма раздели" #define MSGTR_Chapter "Раздел %d" #define MSGTR_NoFileLoaded "Не е зареден файл." @@ -600,9 +575,6 @@ // --- skin loader error messages #define MSGTR_SKIN_ERRORMESSAGE "[skin] грешка в конфигурационния файл на skin-а на ред %d: %s" -#define MSGTR_SKIN_WARNING1 "[skin] внимание в конфигурационния файл на ред %d:\nоткрит widget (%s) без \"section\" преди това" -#define MSGTR_SKIN_WARNING2 "[skin] внимание в конфигурациония файл на ред %d:\nоткрит widget (%s) без \"subsection\" преди това" -#define MSGTR_SKIN_WARNING3 "[skin] внимание в конфигурационния файл на ред %d:\nтази подсекция не се поддържа от widget (%s)" #define MSGTR_SKIN_SkinFileNotFound "[skin] файлът ( %s ) не е намерен.\n" #define MSGTR_SKIN_BITMAP_16bit "Bitmap с 16 и по-малко бита за цвят не се поддържа (%s).\n" #define MSGTR_SKIN_BITMAP_FileNotFound "файлът не е намерен (%s)\n" @@ -656,7 +628,7 @@ #define MSGTR_MENU_SkinBrowser "Избор на Skin" // TODO: Why is this different from MSGTR_Preferences? #define MSGTR_MENU_Preferences "Настройки" -#define MSGTR_MENU_Exit "Изход..." +#define MSGTR_MENU_Exit "Изход" #define MSGTR_MENU_Mute "Без звук" #define MSGTR_MENU_Original "Без промяна" #define MSGTR_MENU_AspectRatio "Съотношение" @@ -712,9 +684,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Разрешаване на ИНТЕНЗИВНО прескачане на кадри (опасно)" #define MSGTR_PREFERENCES_Flip "Преобръщане на образа" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Часовник и индикатори" -#define MSGTR_PREFERENCES_OSDProgress "Само индикатори за напредване" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Часовник, проценти и общо време" #define MSGTR_PREFERENCES_Subtitle "Субтитри:" #define MSGTR_PREFERENCES_SUB_Delay "Закъснение: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" @@ -870,9 +839,7 @@ // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "Режимът interlaced изисква височината на образа да е кратна на 4." #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "Не може да се задели буфер за редовете за interlaced режим." -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "Входния формат не е RGB, не могат да се отделят цветовите полета!" #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "Широчината на образа трябва да е кратна на 2." -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "Няма достатъчно памет за RGB кадров буфер." #define MSGTR_VO_YUV4MPEG_OutFileOpenError "Не е получена памет или файлов манипулатор за запис \"%s\"!" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "Грешка при извеждане на изображението!" #define MSGTR_VO_YUV4MPEG_UnknownSubDev "Неизвестно подустройство: %s" @@ -962,39 +929,12 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** Вашият аудио драйвер НЕ поддържа функцията select() ***\nРекомпилирайте MPlayer с #undef HAVE_AUDIO_SELECT в config.h !\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]Фатална грешка:\n *** АУДИО УСТРОЙСТВОТО (%s) НЕ МОЖЕ ДА БЪДЕ ПРЕ-ОТВОРЕНО/РЕСТАРТИРАНО ***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init: заявен формат: %d Hz, %d канала, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init: не са открити звукови карти.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init: заявен е невалиден формат (%s) - отхвърлен.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init: грешка при отваряне за възпроизвеждане: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init: pcm info грешка: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init: %d звукови карти са открити, ползва се: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init: pcm channel info грешка: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init: грешка при настройване на параметрите: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init: грешка при настройка на канал: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init: грешка при подготовка на канал: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit: грешка при изчистване потока за възпроизвеждане: %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit: грешка при възстановяване на буферите за възпроизвеждане: %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit: грешка при затваряне на pcm: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset: грешка при изчистване на потока за възпроизвеждане: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset: грешка при възстановяване на буферите за възпроизвеждане: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset: грешка при подготовка на канал: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause: грешка при изчистване на потока за възпроизвеждане: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause: грешка при възстановяване на буферите за възпроизвеждане: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume: грешка при подготовка на канал: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play: претоварване на alsa, рестартиране на потока.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play: грешка при подготовка за възпроизвеждане: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play: грешка при запис след рестартиране: %s - отказ от операцията.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play: грешка на изхода: %s\n" - // ao_plugin.c #define MSGTR_AO_PLUGIN_InvalidPlugin "[AO PLUGIN] невалиден плъгин: %s\n" // ======================= AF Audio Filters ================================ -// libaf - // af_ladspa.c #define MSGTR_AF_LADSPA_AvailableLabels "достъпни етикети в" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-cs.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-cs.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-cs.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-cs.h 2011-12-05 11:38:13.000000000 +0000 @@ -59,7 +59,6 @@ #define MSGTR_NoHomeDir "Nemohu nalézt domácí adresář.\n" #define MSGTR_GetpathProblem "Nastal problém s get_path(\"config\")\n" #define MSGTR_CreatingCfgFile "Vytvářím konfigurační soubor: %s\n" -#define MSGTR_BuiltinCodecsConf "Používám zabudovaný výchozí codecs.conf.\n" #define MSGTR_CantLoadFont "Nemohu načíst bitmapový font: %s\n" #define MSGTR_CantLoadSub "Nemohu načíst titulky: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: Kritická chyba: Chybí požadovaný datový proud!\n" @@ -101,8 +100,6 @@ #define MSGTR_Playing "\nPřehrávám %s\n" #define MSGTR_NoSound "Audio: žádný zvuk\n" #define MSGTR_FPSforced "FPS vynuceno na hodnotu %5.3f (vyn. čas: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "Přeloženo s detekcí CPU za běhu." -#define MSGTR_CompiledWithCPUExtensions "Přeloženo pro CPU x86 s rozšířeními:" #define MSGTR_AvailableVideoOutputDrivers "Dostupná video rozhraní:\n" #define MSGTR_AvailableAudioOutputDrivers "Dostupná audio rozhraní:\n" #define MSGTR_AvailableAudioCodecs "Dostupné audio kodeky:\n" @@ -110,7 +107,6 @@ #define MSGTR_AvailableAudioFm "Dostupné (zakompilované) rodiny audio kodeků/ovladačů:\n" #define MSGTR_AvailableVideoFm "Dostupné (zakompilované) rodiny video kodeků/ovladačů:\n" #define MSGTR_AvailableFsType "Dostupné režimy změny hladiny při celoobrazovkovém zobrazení:\n" -#define MSGTR_UsingRTCTiming "Pro časování použity linuxové hardwarové RTC (%ldHz).\n" #define MSGTR_CannotReadVideoProperties "Video: Nelze přečíst vlastnosti.\n" #define MSGTR_NoStreamFound "Nenalezen žádný datový proud.\n" #define MSGTR_ErrorInitializingVODevice "Chyba při otevírání/inicializaci vybraného video_out (-vo) zařízení.\n" @@ -144,14 +140,11 @@ #define MSGTR_AddedSubtitleFile "SUB: Přidán soubor s titulky (%d): %s\n" #define MSGTR_RemovedSubtitleFile "SUB: Odebrán soubor s titulky (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "Chyba při otevírání souboru [%s] pro zápis!\n" -#define MSGTR_CommandLine "Příkazový řádek:" #define MSGTR_RTCDeviceNotOpenable "Selhalo otevření %s: %s (by mělo být čitelné uživatelem.)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Chyba inicializace Linuxových RTC v ioctl (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Zkuste přidat \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" do startovacích\n skriptů vašeho systému.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Chyba inicializace Linuxových RTC v ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "Používám %s časování.\n" -#define MSGTR_MenuInitialized "Menu inicializováno: %s\n" -#define MSGTR_MenuInitFailed "Selhala inicializace menu.\n" #define MSGTR_Getch2InitializedTwice "VAROVÁNÍ: getch2_init volána dvakrát!\n" #define MSGTR_DumpstreamFdUnavailable "Nemohu uložit (dump) tento proud - žádný deskriptor souboru není dostupný.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Nemohu otevřít video filtr libmenu s kořenovým menu %s.\n" @@ -280,12 +273,9 @@ #define MSGTR_CannotAllocateBytes "Nelze alokovat %d bajtů.\n" #define MSGTR_SettingAudioDelay "Nastavuji zpoždění zvuku na %5.3fs.\n" #define MSGTR_SettingVideoDelay "Nastavuji zpoždění videa na %5.3fs.\n" -#define MSGTR_SettingAudioInputGain "Nastavuji předzesílení zvukového vstupu na %f.\n" -#define MSGTR_LamePresetEquals "\npreset=%s\n\n" #define MSGTR_LimitingAudioPreload "Omezuji přednačítání zvuku na 0.4s.\n" #define MSGTR_IncreasingAudioDensity "Zvyšuji hustotu audia na 4.\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Vynucuji přednačítání zvuku na 0, max korekci pts na 0.\n" -#define MSGTR_CBRAudioByterate "\n\nCBR zvuk: %d bajtů/s, %d bajtů/blok\n" #define MSGTR_LameVersion "LAME ve verzi %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Chyba: Specifikovaný datový tok je mimo rozsah pro tento preset režim.\n"\ "\n"\ @@ -471,8 +461,6 @@ #define MSGTR_CodecNeedsOutfmt "\nkodek(%s) vyžaduje 'outfmt'!\n" #define MSGTR_CantAllocateComment "Nelze alokovat paměť pro komentář. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "Načítám %s: " -#define MSGTR_CantOpenFileError "Nelze otevřít '%s': %s\n" #define MSGTR_CantGetMemoryForLine "Nemám paměť pro 'line': %s\n" #define MSGTR_CantReallocCodecsp "Nelze realokovat '*codecsp': %s\n" #define MSGTR_CodecNameNotUnique "Jméno kodeku '%s' není jedinečné." @@ -538,7 +526,6 @@ #define MSGTR_Preferences "Nastavení" // Předvolby? #define MSGTR_AudioPreferences "Konfigurace ovladače zvuku" #define MSGTR_NoMediaOpened "Nic není otevřeno." -#define MSGTR_VCDTrack "VCD stopa %d" #define MSGTR_NoChapter "Žádná kapitola" //bez kapitoly? #define MSGTR_Chapter "Kapitola %d" #define MSGTR_NoFileLoaded "Není načten žádný soubor." @@ -613,7 +600,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "Prohlížeč témat" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Konec..." +#define MSGTR_MENU_Exit "Konec" #define MSGTR_MENU_Mute "Ztlumit" #define MSGTR_MENU_Original "Původní" #define MSGTR_MENU_AspectRatio "Poměr stran" @@ -674,9 +661,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Aktivovat TVRDÉ zahazování snímků (nebezpečné)" #define MSGTR_PREFERENCES_Flip "Převrátit obraz vzhůru nohama" #define MSGTR_PREFERENCES_Panscan "Panscan:" -#define MSGTR_PREFERENCES_OSDTimer "Čas a ostatní ukazatele" -#define MSGTR_PREFERENCES_OSDProgress "Pouze ukazatele pozice a nastavení" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Čas, procenta a celkový čas" #define MSGTR_PREFERENCES_Subtitle "Titulky:" #define MSGTR_PREFERENCES_SUB_Delay "Zpoždění: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" @@ -1080,9 +1064,7 @@ // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "Prokládaný režim obrazu vyžaduje výšku obrazu dělitelnou 4." #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "Nelze alokovat řádkovou vyrovnávací paměť pro režim prokládaného obrazu." -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "Vstup není RGB, nelze oddělit jasovou složku podle polí!" #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "Šířka obrazu musí být dělitelná 2." -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "Není dostatek paměti pro alokaci RGB framebufferu." #define MSGTR_VO_YUV4MPEG_OutFileOpenError "Nelze získat paměť nebo ukazatel souboru pro zápis \"%s\"!" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "Chyba při zápisu obrázku na výstup!" #define MSGTR_VO_YUV4MPEG_UnknownSubDev "Neznámé podzařízení: %s" @@ -1124,10 +1106,8 @@ // audio_out.c #define MSGTR_AO_ALSA9_1x_Removed "audio_out: moduly alsa9 a alsa1x byly odstraněny, místo nich použijte -ao alsa.\n" -#define MSGTR_AO_TryingPreferredAudioDriver "Zkouším preferované audio rozhraní '%.*s', předvolby '%s'\n" #define MSGTR_AO_NoSuchDriver "Takové audio rozhraní není '%.*s'\n" #define MSGTR_AO_FailedInit "Selhala inicializace audio rozhraní '%s'\n" -#define MSGTR_AO_TryingEveryKnown "Zkouším všechna známá audio rozhraní...\n" // ao_oss.c #define MSGTR_AO_OSS_CantOpenMixer "[AO OSS] audio_setup: Nelze otevřít mixážní zařízení %s: %s\n" @@ -1196,31 +1176,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** Ovladač Vaší zvukové karty NEPODPORUJE select() ***\n Překompilujte MPlayer s #undef HAVE_AUDIO_SELECT v config.h !\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\nKritická chyba: *** NELZE ZNOVUOTEVŘÍT / RESTARTOVAT ZVUKOVÉ ZAŘÍZENÍ (%s) ***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init: požadovaný formát: %d Hz, %d kanál(ů), %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init: žádná zvuková karta nebyla nalezena.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init: požadován neplatný formát (%s) - výstup odpojen.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init: chyba otevření přehrávání zvuku: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init: chyba v PCM info: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init: nalezeno %d zvukových karet, používám: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init: chyba info v PCM kanálu: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init: chyba při nastavování parametrů: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init: chyba při nastavování kanálu: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init: chyba při přípravě kanálu: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit: chyba playback drain: %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit: chyba playback flush: %s\n" //to jsou názvy že by jeden pad -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit: chyba uzavření PCM: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset: chyba playback drain: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset: chyba playback flush: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset: chyba při přípravě kanálů: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause: chyba playback drain: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause: chyba playback flush: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume: chyba při přípravě kanálů: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play: podtečení v alsa, restartuji proud.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play: chyba přípravy přehrávání zvuku: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play: chyba při zápisu po restartu: %s - vzdávám to.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play: chyba výstupu: %s\n" - // ao_alsa.c #define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] Neplatný index směšovačů. Používám výchozí 0.\n" #define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] Chyba otevření směšovače: %s\n" @@ -1304,7 +1259,6 @@ // ========================== INPUT ========================================= // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "Otevírám zařízení joysticku %s\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "Nelze otevřít zařízení joysticku %s: %s\n" #define MSGTR_INPUT_JOYSTICK_ErrReading "Chyba při čtení zařízení joysticku: %s\n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "Joystick: Uvolnili jsme %d bajtů dat\n" @@ -1312,8 +1266,6 @@ #define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "Joystick: varování, neznámý typ události %d\n" // appleir.c -#define MSGTR_INPUT_APPLE_IR_Init "Inicializuji Apple IR na %s\n" -#define MSGTR_INPUT_APPLE_IR_Detect "Zjištěno Apple IR na %s\n" #define MSGTR_INPUT_APPLE_IR_CantOpen "Nelze otevřít Apple IR zařízení: %s\n" // input.c @@ -1344,7 +1296,6 @@ #define MSGTR_INPUT_INPUT_ErrCantInitAppleRemote "Nelze inicializovat vstupní Apple Remote.\n" // lirc.c -#define MSGTR_SettingUpLIRC "Zapínám podporu LIRC...\n" #define MSGTR_LIRCopenfailed "Selhalo otevření podpory LIRC. Nebudete moci používat dálkové ovládání.\n" #define MSGTR_LIRCcfgerr "Nepovedlo se přečíst konfigurační soubor LIRC %s.\n" @@ -1359,7 +1310,6 @@ #define MSGTR_WarningLenIsntDivisible "Varování, délka není násobkem velikosti vzorku!\n" #define MSGTR_MuxbufMallocErr "Nelze alokovat paměť pro snímkovou vyrovnávací paměť muxeru!\n" #define MSGTR_MuxbufReallocErr "Nelze realokovat paměť pro snímkovou vyrovnávací paměť muxeru!\n" -#define MSGTR_MuxbufSending "Snímková vyrovnávací paměť muxeru posílá %d snímků do muxeru.\n" #define MSGTR_WritingHeader "Zapisuji hlavičku...\n" #define MSGTR_WritingTrailer "Zapisuji index...\n" @@ -1377,7 +1327,6 @@ #define MSGTR_ON2AviFormat "ON2 AVI formát" #define MSGTR_Detected_XXX_FileFormat "Detekován formát souboru %s.\n" #define MSGTR_DetectedAudiofile "Detekován zvukový soubor.\n" -#define MSGTR_NotSystemStream "Toto není formát MPEG System Stream... (možná Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Špatný MPEG-ES proud??? Kontaktujte autora, možná to je chyba :(\n" #define MSGTR_FormatNotRecognized "======= Bohužel, formát tohoto souboru nebyl rozpoznán/není podporován =======\n"\ "==== Pokud je soubor AVI, ASF nebo MPEG proud, kontaktujte prosím autora! ====\n" @@ -1402,11 +1351,8 @@ #define MSGTR_MOVcomprhdr "MOV: Komprimované hlavičky vyžadují ZLIB!\n" #define MSGTR_MOVvariableFourCC "MOV: VAROVÁNÍ: Proměnná FourCC detekována!?\n" #define MSGTR_MOVtooManyTrk "MOV: VAROVÁNÍ: příliš mnoho stop" -#define MSGTR_FoundAudioStream "==> Nalezen audio proud: %d\n" -#define MSGTR_FoundVideoStream "==> Nalezen video proud: %d\n" #define MSGTR_DetectedTV "Detekována TV! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Nelze otevřít Ogg demuxer.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Hledám audio proud (id: %d).\n" #define MSGTR_CannotOpenAudioStream "Nemohu otevřít audio proud: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Nemohu otevřít proud s titulky: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Nepovedlo se otevřít audio demuxer: %s\n" @@ -1439,17 +1385,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "** prázdný seznam?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "Nalezen film na 0x%X - 0x%X\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "Nalezena 'bih', %u bajtů z %d\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "Regeneruji tabulku klíčových snímků pro MS mpg4v1 video.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "Regeneruji tabulku klíčových snímků pro DIVX3 video.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "Regeneruji tabulku klíčových snímků pro MPEG4 video.\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "Nalezen 'wf', %d bajtů z %d\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI: nalezena dmlh (size=%d) (total_frames=%d)\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "Čtu INDEX blok, %d chunků pro %d snímků (fpos=%"PRId64").\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "Dodatečná RIFF hlavička...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** Varování: toto není rozšířená AVI hlavička..\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "Vadný chunk? chunksize=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI: ODML: Vytvářím ODML index (%d superindexchunků).\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI: ODML: Detekován vadný (neúplný?) soubor. Použije se tradiční index.\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "Nelze číst indexový soubor %s: %s\n" @@ -1581,21 +1517,15 @@ #define MSGTR_UsingExternalPP "[PP] Používám externí filtr pro postprocessing, max q = %d.\n" #define MSGTR_UsingCodecPP "[PP] Používám integrovaný postprocessing kodeku, max q = %d.\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Video atribut '%s' není podporován vybraným vo & vd.\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Požadovaná rodina video kodeku [%s] (vfm=%s) není dostupná.\nAktivujte ji při kompilaci.\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Požadovaná rodina audio kodeku [%s] (afm=%s) není dostupná.\nAktivujte ji při kompilaci.\n" #define MSGTR_OpeningVideoDecoder "Otevírám video dekodér: [%s] %s\n" #define MSGTR_SelectedVideoCodec "Vybrán video kodek: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Otevírám audio dekodér: [%s] %s\n" #define MSGTR_SelectedAudioCodec "Vybrán audio kodek: [%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "Vytvářím zvukový řetězec filtrů pro %dHz/%dch/%s -> %dHz/%dch/%s...\n" -#define MSGTR_UninitVideoStr "Uninit video: %s\n" -#define MSGTR_UninitAudioStr "Uninit audio: %s\n" #define MSGTR_VDecoderInitFailed "Video dekodér - inicializace selhala :(\n" #define MSGTR_ADecoderInitFailed "Audio dekodér - inicializace selhala :(\n" #define MSGTR_ADecoderPreinitFailed "Audio dekodér - předinicializace selhala :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Alokuji %d bytů pro vstupní vyrovnávací paměť\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Alokuji %d + %d = %d bytů pro výstupní vyrovnávací paměť\n" // ad_dvdpcm.c: #define MSGTR_SamplesWanted "Vzorky tohoto formátu potřebujeme pro zlepšení podpory. Kontaktujte prosím vývojáře.\n" @@ -1611,8 +1541,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Potřebujete aktualizovat nebo nainstalovat binární kodeky.\nJděte na http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO: Inicializace Win32/DShow videokodeku OK.\n" -#define MSGTR_DMOInitOK "INFO: Inicializace Win32/DMO videokodeku OK.\n" // libmpcodecs/vd_dmo.c vd_dshow.c vd_vfw.c #define MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec "[VD_DMO] Nemohu alokovat obraz pro kodek cinepak.\n" @@ -1739,12 +1667,12 @@ // ================================== stream ==================================== -// ai_alsa1x.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "Nelze nastavit vzorkovací kmitočet.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "Nelze nastavit čas bufferu.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "Nelze nastavit čas periody.\n" +// ai_alsa.c +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "Nelze nastavit vzorkovací kmitočet.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "Nelze nastavit čas bufferu.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "Nelze nastavit čas periody.\n" -// ai_alsa1x.c / ai_alsa.c +// ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "Vadná konfigurace pro toto PCM: žádná dostupná konfigurace.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "Nedostupný typ přístupu.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt "Nedostupný formát vzorku.\n" @@ -1753,9 +1681,7 @@ #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "Nelze použít periodu odpovídající velikosti bufferu (%u == %lu)\n" #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "Nelze instalovat softwarové parametry:\n" #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "Nelze otevřít audio: %s\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "ALSA status error: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun!!! (aspoň %.3f ms dlouhý)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "ALSA Status:\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun: připravuji chybu: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "ALSA chyba čtení/zápisu" @@ -1815,7 +1741,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "neznámý typ ASF proudu\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "Selhalo parsování HTTP odpovědi.\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "Server vrátil %d:%s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP PARSE VAROVÁNÍ: Pragma %s zkrácena z %zd bajtů na %d\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP PARSE VAROVÁNÍ: Pragma %s zkrácena z %zu bajtů na %zu\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "Chyba zápisu soketu: %s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "Selhalo parsování hlavičky\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "Nenalezen datový proud\n" @@ -1942,17 +1868,13 @@ // stream_radio.c #define MSGTR_RADIO_ChannelNamesDetected "[radio] Detekovány názvy stanic.\n" -#define MSGTR_RADIO_FreqRange "[radio] Povolený kmitočtový rozsah je %.2f-%.2f MHz.\n" #define MSGTR_RADIO_WrongFreqForChannel "[radio] Nesprávná frekvence pro stanici %s\n" #define MSGTR_RADIO_WrongChannelNumberFloat "[radio] Nesprávné číslo kanálu: %.2f\n" #define MSGTR_RADIO_WrongChannelNumberInt "[radio] Nesprávné číslo kanálu: %d\n" #define MSGTR_RADIO_WrongChannelName "[radio] Nesprávné jméno kanálu: %s\n" #define MSGTR_RADIO_FreqParameterDetected "[radio] Radio parametr detekován jako frekvence.\n" -#define MSGTR_RADIO_DoneParsingChannels "[radio] Parsování stanic dokončeno.\n" #define MSGTR_RADIO_GetTunerFailed "[radio] Varování: ioctl get tuner selhala: %s. Nastavuji frac na %d.\n" #define MSGTR_RADIO_NotRadioDevice "[radio] %s není rádiovým zařízením!\n" -#define MSGTR_RADIO_TunerCapLowYes "[radio] tuner je low:yes frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[radio] tuner je low:no frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[radio] ioctl set frequency 0x%x (%.2f) selhala: %s\n" #define MSGTR_RADIO_GetFreqFailed "[radio] ioctl get frequency selhala: %s\n" #define MSGTR_RADIO_SetMuteFailed "[radio] ioctl set mute selhala: %s\n" @@ -1962,27 +1884,22 @@ #define MSGTR_RADIO_DroppingFrame "\n[radio] příliš špatné - zahazuji audio rámec (%d bajtů)!\n" #define MSGTR_RADIO_BufferEmpty "[radio] grab_audio_frame: prázdná vyrovnávací paměť, čekám na %d bajtů dat.\n" #define MSGTR_RADIO_AudioInitFailed "[radio] audio_in_init selhala: %s\n" -#define MSGTR_RADIO_AudioBuffer "[radio] Zachytávání zvuku - vyrovnávací paměť=%d bajtů (blok=%d bajtů).\n" #define MSGTR_RADIO_AllocateBufferFailed "[radio] nemohu alokovat vyrovnávací paměť zvuku (blok=%d,buf=%d): %s\n" #define MSGTR_RADIO_CurrentFreq "[radio] Současná frekvence: %.2f\n" #define MSGTR_RADIO_SelectedChannel "[radio] Zvolený kanál: %d - %s (frekv: %.2f)\n" #define MSGTR_RADIO_ChangeChannelNoChannelList "[radio] Nelze změnit kanál: nezadán seznam kanálů.\n" #define MSGTR_RADIO_UnableOpenDevice "[radio] Nelze otevřít '%s': %s\n" -#define MSGTR_RADIO_RadioDevice "[radio] Radio fd: %d, %s\n" #define MSGTR_RADIO_InitFracFailed "[radio] init_frac selhala.\n" #define MSGTR_RADIO_WrongFreq "[radio] Špatná frekvence: %.2f\n" #define MSGTR_RADIO_UsingFreq "[radio] Používám frekvuenci: %.2f.\n" #define MSGTR_RADIO_AudioInInitFailed "[radio] audio_in_init selhala.\n" -#define MSGTR_RADIO_BufferString "[radio] %s: ve vyrovnávací paměti=%d zahozeno=%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[radio] volání audio_in_setup selhalo: %s\n" -#define MSGTR_RADIO_CaptureStarting "[radio] Zahajuji zachytávání obsahu.\n" #define MSGTR_RADIO_ClearBufferFailed "[radio] Vypráznění vyrovnávací paměti selhalo: %s\n" #define MSGTR_RADIO_StreamEnableCacheFailed "[radio] Volání do stream_enable_cache selhalo: %s\n" #define MSGTR_RADIO_DriverUnknownStr "[radio] Neznámé jméno ovladače: %s\n" #define MSGTR_RADIO_DriverV4L2 "[radio] Používám V4Lv2 rádio rozhraní.\n" #define MSGTR_RADIO_DriverV4L "[radio] Používám V4Lv1 rádio rozhraní.\n" #define MSGTR_RADIO_DriverBSDBT848 "[radio] Používám *BSD BT848 rádio rozhraní.\n" -#define MSGTR_RADIO_AvailableDrivers "[radio] Dostupné ovladače: " //tv.c #define MSGTR_TV_BogusNormParameter "tv.c: norm_from_string(%s): Bogus norm parametr, nastaveno %s.\n" @@ -1994,30 +1911,23 @@ " chyb budou ignorována. Měli byste zkusit YV12 (což je výchozí\n"\ " barevný prostor) a přečíst si dokumentaci!\n"\ "==================================================================\n" -#define MSGTR_TV_SelectedNormId "ID vybrané normy: %d\n" -#define MSGTR_TV_SelectedNorm "Vybraná norma: %s\n" #define MSGTR_TV_CannotSetNorm "Chyba: Nelze nastavit normu!\n" #define MSGTR_TV_MJP_WidthHeight " MJP: šířka %d výška %d\n" #define MSGTR_TV_UnableToSetWidth "Nelze nastavit požadovanou šířku: %d\n" #define MSGTR_TV_UnableToSetHeight "Nelze nastavit požadovanou výšku: %d\n" #define MSGTR_TV_NoTuner "Vybraný vstup nemá tuner!\n" #define MSGTR_TV_UnableFindChanlist "Nelze nalézt vybraný seznam kanálů! (%s)\n" -#define MSGTR_TV_SelectedChanlist "Vybraný seznam kanálů: %s (obsahuje %d kanálů)\n" #define MSGTR_TV_ChannelFreqParamConflict "Nemůžete nastavit kmitočet a kanál současně!\n" #define MSGTR_TV_ChannelNamesDetected "Detekovány názvy TV kanálů.\n" #define MSGTR_TV_NoFreqForChannel "Nelze nalézt kmitočet pro kanál %s (%s)\n" #define MSGTR_TV_SelectedChannel3 "Zvolený kanál: %s - %s (kmit: %.3f)\n" #define MSGTR_TV_SelectedChannel2 "Zvolený kanál: %s (kmit: %.3f)\n" -#define MSGTR_TV_SelectedFrequency "Zvolený kmitočet: %lu (%.3f)\n" -#define MSGTR_TV_RequestedChannel "Požadovaný kanál: %s\n" #define MSGTR_TV_UnsupportedAudioType "Audio typu '%s (%x)' nepodporováno!\n" -#define MSGTR_TV_AudioFormat " TV audio: %d kanálů, %d bitů, %d Hz\n" #define MSGTR_TV_AvailableDrivers "Dostupné ovladače:\n" #define MSGTR_TV_DriverInfo "Zvolený ovladač: %s\n název: %s\n autor: %s\n popis: %s\n" #define MSGTR_TV_NoSuchDriver "Chybí ovladač: %s\n" #define MSGTR_TV_DriverAutoDetectionFailed "Autodetekce TV ovladače selhala.\n" #define MSGTR_TV_UnknownColorOption "Zadána neznámá color volba (%d)!\n" -#define MSGTR_TV_CurrentFrequency "Nynější kmitočet: %lu (%.3f)\n" #define MSGTR_TV_NoTeletext "Žádný teletext" #define MSGTR_TV_Bt848IoctlFailed "tvi_bsdbt848: Volání %s ioctl selhalo. Chyba: %s\n" #define MSGTR_TV_Bt848InvalidAudioRate "tvi_bsdbt848: Špatný vzorkovací kmitočet zvuku. Chyba: %s\n" @@ -2045,14 +1955,8 @@ #define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow: Zařízení #%d nenalezeno\n" #define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow: Nelze získat název pro zařízení #%d\n" #define MSGTR_TVI_DS_UsingDevice "tvi_dshow: Používám zařízení #%d: %s\n" -#define MSGTR_TVI_DS_DeviceName "tvi_dshow: Zařízení #%d: %s\n" #define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow: Nelze získat kmitočet přímo. Použije se tabulka kanálů z OS.\n" -#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow: Nelze nastavit kmitočet přímo. Použije se tabulka kanálů z OS.\n" -#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow: podporované normy:" -#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow: dostupné video vstupy:" -#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow: dostupné audio vstupy:" //following phrase will be printed near the selected audio/video input -#define MSGTR_TVI_DS_InputSelected "(vybráno)" #define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow: Nelze nahrát kmitočtovou tabulku z kstvtune.ax\n" #define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow: Špatný parametr zařízení: %s\n" #define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow: Špatný index zařízení: %d\n" @@ -2064,7 +1968,6 @@ #define MSGTR_TVI_DS_ChangingWidthHeightNotSupported "tvi_dshow: Změnu výšky/šířky videa zařízení nepodporuje.\n" #define MSGTR_TVI_DS_SelectingInputNotSupported "tvi_dshow: Volbu zdroje pro zachytávání zařízení nepodporuje.\n" -#define MSGTR_TVI_DS_FreqTableLoaded "tvi_dshow: nahrána systémová (%s) frekvenční tabulka pro zemi id=%d (kanály:%d).\n" #define MSGTR_TVI_DS_ErrorParsingAudioFormatStruct "tvi_dshow: Nelze parsovat strukturu audio formátu.\n" #define MSGTR_TVI_DS_ErrorParsingVideoFormatStruct "tvi_dshow: Nelze parsovat strukturu video formátu.\n" #define MSGTR_TVI_DS_UnableSetAudioMode "tvi_dshow: Nelze nastavit audio režim %d. Chyba:0x%x\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-de.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-de.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-de.h 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-de.h 2011-12-31 12:38:52.000000000 +0000 @@ -68,7 +68,6 @@ #define MSGTR_NoHomeDir "Kann Homeverzeichnis nicht finden.\n" #define MSGTR_GetpathProblem "get_path(\"config\") fehlgeschlagen.\n" #define MSGTR_CreatingCfgFile "Erstelle Konfigurationsdatei: %s\n" -#define MSGTR_BuiltinCodecsConf "Benutze eingebaute Standardwerte für codecs.conf.\n" #define MSGTR_CantLoadFont "Bitmap-Schriftdatei '%s' kann nicht geladen werden.\n" #define MSGTR_CantLoadSub "Untertitel '%s' können nicht geladen werden.\n" #define MSGTR_DumpSelectedStreamMissing "dump: FATAL: Ausgewählter Stream fehlt!\n" @@ -117,8 +116,6 @@ #define MSGTR_Playing "\nSpiele %s.\n" #define MSGTR_NoSound "Audio: kein Ton!\n" #define MSGTR_FPSforced "FPS von %5.3f erzwungen (ftime: %5.3f).\n" -#define MSGTR_CompiledWithRuntimeDetection "MPlayer mit CPU-Erkennung zur Laufzeit kompiliert.\n" -#define MSGTR_CompiledWithCPUExtensions "Kompiliert für x86 CPU mit folgenden Erweiterungen:" #define MSGTR_AvailableVideoOutputDrivers "Verfügbare Videoausgabetreiber:\n" #define MSGTR_AvailableAudioOutputDrivers "Verfügbare Audioausgabetreiber:\n" #define MSGTR_AvailableAudioCodecs "Verfügbare Audiocodecs:\n" @@ -126,7 +123,6 @@ #define MSGTR_AvailableAudioFm "Verfügbare (in das Binary kompilierte) Audiocodecfamilien:\n" #define MSGTR_AvailableVideoFm "Verfügbare (in das Binary kompilierte) Videocodecfamilien:\n" #define MSGTR_AvailableFsType "Verfügbare Vollbildschirm-Modi:\n" -#define MSGTR_UsingRTCTiming "Verwende Linux Hardware RTC-Timing (%ldHz).\n" #define MSGTR_CannotReadVideoProperties "Video: Kann Eigenschaften nicht lesen.\n" #define MSGTR_NoStreamFound "Keine Streams gefunden.\n" #define MSGTR_ErrorInitializingVODevice "Fehler beim Öffnen/Initialisieren des ausgewählten Videoausgabetreibers (-vo).\n" @@ -164,14 +160,11 @@ #define MSGTR_AddedSubtitleFile "SUB: Untertiteldatei (%d) hinzugefügt: %s\n" #define MSGTR_RemovedSubtitleFile "SUB: Untertiteldatei (%d) entfernt: %s\n" #define MSGTR_ErrorOpeningOutputFile "Fehler beim Öffnen von Datei [%s] zum Schreiben!\n" -#define MSGTR_CommandLine "Kommandozeile:" #define MSGTR_RTCDeviceNotOpenable "Konnte %s nicht öffnen: %s (sollte für den Benutzer lesbar sein).\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Linux-RTC-Initialisierungsfehler in ioctl (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Versuche, \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" zu deinen Systemstartskripten hinzuzufügen.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Linux-RTC-Initialisierungsfehler in ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "Benutze %s-Zeitgeber.\n" -#define MSGTR_MenuInitialized "Menü initialisiert: %s\n" -#define MSGTR_MenuInitFailed "Initialisierung des Menüs fehlgeschlagen.\n" #define MSGTR_Getch2InitializedTwice "WARNUNG: getch2_init doppelt aufgerufen!\n" #define MSGTR_DumpstreamFdUnavailable "Kann Dump dieses Streams nicht anlegen - kein 'fd' verfügbar.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Kann den libmenu-Videofilter nicht mit dem Ursprungsmenü %s öffnen.\n" @@ -300,12 +293,9 @@ #define MSGTR_CannotAllocateBytes "Konnte %d Bytes nicht reservieren.\n" #define MSGTR_SettingAudioDelay "Setze Audioverzögerung auf %5.3fs.\n" #define MSGTR_SettingVideoDelay "Setze Videoverzögerung auf %5.3fs.\n" -#define MSGTR_SettingAudioInputGain "Setze Audioeingangsverstärkung auf %f.\n" -#define MSGTR_LamePresetEquals "\nPreset=%s\n\n" #define MSGTR_LimitingAudioPreload "Limitiere Audio-Preload auf 0.4s.\n" #define MSGTR_IncreasingAudioDensity "Erhöhe Audiodichte auf 4.\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Erzwinge Audio-Preload von 0, maximale pts-Korrektur von 0.\n" -#define MSGTR_CBRAudioByterate "\n\nCBR Audio: %d Bytes/Sek, %d Bytes/Block\n" #define MSGTR_LameVersion "LAME-Version %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Fehler: Die angegebene Bitrate ist außerhalb des gültigen Bereichs\nfür dieses Preset.\n"\ "\n"\ @@ -498,8 +488,6 @@ #define MSGTR_CodecNeedsOutfmt "\nCodec(%s) braucht ein 'outfmt'!\n" #define MSGTR_CantAllocateComment "Kann Speicher für Kommentar nicht allozieren. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "Lese %s: " -#define MSGTR_CantOpenFileError "Kann '%s' nicht öffnen: %s\n" #define MSGTR_CantGetMemoryForLine "Bekomme keinen Speicher für 'line': %s\n" #define MSGTR_CantReallocCodecsp "Kann '*codecsp' nicht erneut allozieren: %s\n" #define MSGTR_CodecNameNotUnique "Codecname '%s' ist nicht eindeutig." @@ -559,7 +547,7 @@ #define MSGTR_URLParsingFailed "Fehler bei der Analyse der URL %s\n" #define MSGTR_FailedSetStreamOption "Datenstrom-Option %s=%s konnte nicht gesetzt werden.\n" #define MSGTR_StreamNeedType "Datenströme benötigen einen Typ!\n" -#define MSGTR_StreamProtocolNULL "Datenstrom-Typ ohne Protokolle, das ist ein Fehler\n" +#define MSGTR_StreamProtocolNULL "Datenstromtyp %s hat protcols == NULL, das ist ein Fehler\n" #define MSGTR_StreamCantHandleURL "Kein Datenstrom zur Verarbeitung der URL %s gefunden.\n" #define MSGTR_StreamNULLFilename "open_output_stream(), Dateiname NULL, Fehler bitte melden\n" #define MSGTR_StreamErrorWritingCapture "Fehler beim Schreiben der Capture-Datei: %s\n" @@ -603,7 +591,6 @@ #define MSGTR_MuxbufMallocErr "Speicher für Muxer-Framepuffer konnte nicht alloziert werden!\n" #define MSGTR_MuxbufReallocErr "Speicher für Muxer-Framepuffer konnte nicht vergrößert werden!\n" -#define MSGTR_MuxbufSending "Muxer-Framepuffer: Sende %d Frame(s) zum Muxer.\n" #define MSGTR_WritingHeader "Schreibe Dateikopf...\n" #define MSGTR_WritingTrailer "Schreibe Dateiindex...\n" @@ -623,7 +610,6 @@ #define MSGTR_ON2AviFormat "ON2 AVI-Format" #define MSGTR_Detected_XXX_FileFormat "%s-Dateiformat erkannt!\n" #define MSGTR_DetectedAudiofile "Audiodatei erkannt!\n" -#define MSGTR_NotSystemStream "Kein MPEG System Stream... (vielleicht ein Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Ungültiger MPEG-ES Stream??? Kontaktiere den Autor, das könnte ein Bug sein :(\n" #define MSGTR_FormatNotRecognized \ "========== Sorry, dieses Dateiformat wird nicht erkannt/unterstützt ==========\n"\ @@ -650,11 +636,8 @@ #define MSGTR_MOVcomprhdr "MOV: komprimierte Header benötigen ZLIB-Unterstützung.\n" #define MSGTR_MOVvariableFourCC "MOV: Warnung: Variabler FourCC erkannt!?\n" #define MSGTR_MOVtooManyTrk "MOV: WARNUNG: Zu viele Tracks." -#define MSGTR_FoundAudioStream "==> Audiostream gefunden: %d\n" -#define MSGTR_FoundVideoStream "==> Videostream gefunden: %d\n" #define MSGTR_DetectedTV "TV erkannt! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Kann Ogg-Demuxer nicht öffnen.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Suche nach Audiostream (Id:%d).\n" #define MSGTR_CannotOpenAudioStream "Kann Audiostream nicht öffnen: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Kann Untertitelstream nicht öffnen: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Öffnen des Audio-Demuxers fehlgeschlagen: %s\n" @@ -695,24 +678,17 @@ #define MSGTR_UsingExternalPP "[PP] Verwende externe Postprocessing-Filter, max q = %d.\n" #define MSGTR_UsingCodecPP "[PP] Verwende Postprocessing-Routinen des Codecs, max q = %d.\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Videoeigenschaft '%s' wird von ausgewählten vo & vd nicht unterstützt.\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Erforderliche Videocodec Familie [%s] (vfm=%s) nicht verfügbar.\nAktiviere sie beim Kompilieren.\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Erforderliche Audiocodec-Familie [%s] (afm=%s) nicht verfügbar.\nAktiviere sie beim Kompilieren.\n" #define MSGTR_OpeningVideoDecoder "Öffne Videodecoder: [%s] %s\n" #define MSGTR_SelectedVideoCodec "Ausgewählter Videocodec: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Öffne Audiodecoder: [%s] %s\n" #define MSGTR_SelectedAudioCodec "Ausgewählter Audiocodec: [%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "Baue Tonfilterkette von %dHz/%dch/%s nach %dHz/%dch/%s auf...\n" -#define MSGTR_UninitVideoStr "Deinitialisiere Video: %s\n" -#define MSGTR_UninitAudioStr "Deinitialisiere Audio: %s\n" #define MSGTR_VDecoderInitFailed "Initialisierung des Videodecoders fehlgeschlagen :(\n" #define MSGTR_ADecoderInitFailed "Initialisierung des Audiodecoders fehlgeschlagen :(\n" #define MSGTR_ADecoderPreinitFailed "Vorinitialisierung des Audiodecoders fehlgeschlagen :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Reserviere %d Bytes für den Eingangspuffer.\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Reserviere %d + %d = %d Bytes für den Ausgabepuffer.\n" // LIRC: -#define MSGTR_SettingUpLIRC "Initialisiere LIRC-Unterstützung...\n" #define MSGTR_LIRCopenfailed "Fehler beim Öffnen der LIRC-Unterstützung.\nVerwendung der Fernbedienung nicht möglich.\n" #define MSGTR_LIRCcfgerr "Kann LIRC-Konfigurationsdatei %s nicht lesen.\n" @@ -730,8 +706,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Du musst das Binärcodec-Paket aktualisieren/installieren.\nGehe dazu auf http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO: Win32/DShow Videocodec-Initialisierung OK.\n" -#define MSGTR_DMOInitOK "INFO: Win32/DMO Videocodec-Initialisierung OK.\n" // x11_common.c #define MSGTR_EwmhFullscreenStateFailed "\nX11: Konnte EWMH-Fullscreen-Event nicht senden!\n" @@ -762,7 +736,7 @@ #define MSGTR_Preferences "Einstellungen" #define MSGTR_AudioPreferences "Audio-Treiberkonfiguration" #define MSGTR_NoMediaOpened "Keine Medien geöffnet." -#define MSGTR_VCDTrack "VCD-Titel %d" +#define MSGTR_Title "Titel %d" #define MSGTR_NoChapter "kein Kapitel" #define MSGTR_Chapter "Kapitel %d" #define MSGTR_NoFileLoaded "Keine Datei geladen." @@ -814,6 +788,7 @@ #define MSGTR_MENU_AboutMPlayer "Über MPlayer" #define MSGTR_MENU_Open "Öffnen..." #define MSGTR_MENU_PlayFile "Spiele Datei..." +#define MSGTR_MENU_PlayCD "Spiele CD..." #define MSGTR_MENU_PlayVCD "Spiele VCD..." #define MSGTR_MENU_PlayDVD "Spiele DVD..." #define MSGTR_MENU_PlayURL "Spiele URL..." @@ -831,9 +806,10 @@ #define MSGTR_MENU_NormalSize "Normale Größe" #define MSGTR_MENU_DoubleSize "Doppelte Größe" #define MSGTR_MENU_FullScreen "Vollbild" +#define MSGTR_MENU_CD "CD" #define MSGTR_MENU_DVD "DVD" #define MSGTR_MENU_VCD "VCD" -#define MSGTR_MENU_PlayDisc "Öffne CD/DVD..." +#define MSGTR_MENU_PlayDisc "Öffne Disc..." #define MSGTR_MENU_ShowDVDMenu "Zeige DVD Menü" #define MSGTR_MENU_Titles "Titel" #define MSGTR_MENU_Title "Titel %2d" @@ -845,7 +821,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "Skinbrowser" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Beenden..." +#define MSGTR_MENU_Exit "Beenden" #define MSGTR_MENU_Mute "Stummschaltung" #define MSGTR_MENU_Original "Original" #define MSGTR_MENU_AspectRatio "Seitenverhältnis" @@ -907,9 +883,10 @@ #define MSGTR_PREFERENCES_HFrameDrop "HARTES Framedropping aktivieren (gefährlich)" #define MSGTR_PREFERENCES_Flip "Bild horizontal spiegeln" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Zeit und Indikatoren" -#define MSGTR_PREFERENCES_OSDProgress "Nur Fortschrittsbalken" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Timer, prozentuale und absolute Zeit" +#define MSGTR_PREFERENCES_OSD_LEVEL0 "Nur Untertitel" +#define MSGTR_PREFERENCES_OSD_LEVEL1 "Lautstärke und Fortschritt" +#define MSGTR_PREFERENCES_OSD_LEVEL2 "Lautstärke, Fortschritt, absolute und prozentuale Laufzeit" +#define MSGTR_PREFERENCES_OSD_LEVEL3 "Lautstärke, Fortschritt, absolute und prozentuale Laufzeit plus Gesamtlaufzeit" #define MSGTR_PREFERENCES_Subtitle "Untertitel:" #define MSGTR_PREFERENCES_SUB_Delay "Verzögerung: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" @@ -993,11 +970,11 @@ "Neuere Versionen von aRts sind mit GTK 1.x nicht kompatibel und bringen \n"\ "GMPlayer zum Absturz!" -#define MSGTR_ABOUT_UHU "GUI-Entwicklung wurde von UHU Linux gesponsert.\n" -#define MSGTR_ABOUT_Contributors "Mitwirkende am Programm und der Dokumentation\n" -#define MSGTR_ABOUT_Codecs_libs_contributions "Codecs und externe Bibliotheken\n" -#define MSGTR_ABOUT_Translations "Übersetzungen\n" -#define MSGTR_ABOUT_Skins "Skins\n" +#define MSGTR_ABOUT_UHU "Die GUI-Entwicklung wurde von UHU-Linux gesponsert.\n" +#define MSGTR_ABOUT_Contributors "Mitwirkende am Programm und der Dokumentation:\n" +#define MSGTR_ABOUT_Codecs_libs_contributions "Codecs und externe Bibliotheken:\n" +#define MSGTR_ABOUT_Translations "Übersetzungen:\n" +#define MSGTR_ABOUT_Skins "Skins:\n" // --- messagebox #define MSGTR_MSGBOX_LABEL_FatalError "Fataler Fehler!" @@ -1030,6 +1007,33 @@ #define MSGTR_WS_NotAFile "Dies scheint keine Datei zu sein...\n" #define MSGTR_WS_DDNothing "D&D: Nichts zurückgegeben!\n" +// Win32 GUI +#define MSGTR_Close "Schließen" +#define MSGTR_Default "Standard" +#define MSGTR_Down "Runter" +#define MSGTR_Load "Laden" +#define MSGTR_Save "Speichern" +#define MSGTR_Up "Hoch" +#define MSGTR_DirectorySelect "Wähle ein Verzeichnis ..." +#define MSGTR_PlaylistSave "Speichere Wiedergabeliste ..." +#define MSGTR_PlaylistSelect "Wähle Wiedergabeliste ..." +#define MSGTR_SelectTitleChapter "Wähle Titel/Kapitel ..." +#define MSGTR_MENU_DebugConsole "Debugging-Konsole" +#define MSGTR_MENU_OnlineHelp "Online-Hilfe" +#define MSGTR_MENU_PlayDirectory "Spiele ein Verzeichnis..." +#define MSGTR_MENU_SeekBack "Springe zurück" +#define MSGTR_MENU_SeekForw "Springe vor" +#define MSGTR_MENU_ShowHide "Zeigen/Verbergen" +#define MSGTR_MENU_SubtitlesOnOff "Untertitel-Anzeige ein/aus" +#define MSGTR_PLAYLIST_AddFile "Datei hinzufügen..." +#define MSGTR_PLAYLIST_AddURL "URL hinzufügen..." +#define MSGTR_PREFERENCES_Priority "Priorität:" +#define MSGTR_PREFERENCES_PriorityHigh "hoch" +#define MSGTR_PREFERENCES_PriorityLow "niedrig" +#define MSGTR_PREFERENCES_PriorityNormal "normal" +#define MSGTR_PREFERENCES_PriorityNormalAbove "höher als normal" +#define MSGTR_PREFERENCES_PriorityNormalBelow "niedriger als normal" +#define MSGTR_PREFERENCES_VideoInSubwin "Video in Unterfenster anzeigen (nur DirectX)" // ======================= Videoausgabetreiber ======================== @@ -1081,9 +1085,7 @@ // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "Interlaced-Modus benötigt eine durch 4 teilbare Bildhöhe." #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "Kann Linien-Puffer für den Interlaced-Modus nicht allozieren." -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "Eingabe ist nicht RGB, kann Chrominanz nicht in Felder separieren!" #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "Bildhöhe muss durch 2 teilbar sein." -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "Nicht genug Speicher, um RGB-Framebuffer zu allozieren." #define MSGTR_VO_YUV4MPEG_OutFileOpenError "Bekomme keinen Speicher oder Datei-Handle, um \"%s\" zu schreiben!" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "Fehler beim Schreiben des Bildes auf die Ausgabe!" #define MSGTR_VO_YUV4MPEG_UnknownSubDev "Unbekanntes Subdevice: %s" @@ -1121,10 +1123,8 @@ #define MSGTR_AO_ALSA9_1x_Removed \ "audio_out: Die Module alsa9 und alsa1x wurden entfernt, benutze stattdessen \n" \ "-ao alsa.\n" -#define MSGTR_AO_TryingPreferredAudioDriver "Probiere bevorzugten Audiotreiber '%.*s', Optionen '%s'\n" #define MSGTR_AO_NoSuchDriver "Kein Audiotreiber '%.*s'\n" #define MSGTR_AO_FailedInit "Konnte Audiotreiber '%s' nicht initialisieren\n" -#define MSGTR_AO_TryingEveryKnown "Probiere jeden bekannten Audiotreiber...\n" // ao_oss.c #define MSGTR_AO_OSS_CantOpenMixer "[AO OSS] audio_setup: Kann Mixer %s: %s nicht öffnen.\n" @@ -1201,31 +1201,6 @@ "Kompiliere MPlayer mit #undef HAVE_AUDIO_SELECT in der Datei config.h !\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\nKritischer Fehler: *** KANN AUDIO-GERÄT NICHT ERNEUT ÖFFNEN / ZURÜCKSETZEN *** %s\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init: angefordertes Format: %d Hz, %d Kanäle, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init: Keine Soundkarten gefunden.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init: ungültiges Format (%s) angefordert - Ausgabe deaktiviert.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init: Fehler beim Öffnen der Wiedergabe: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init: PCM-Informatationsfehler: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init: %d Soundkarte(n) gefunden, benutze: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init: PCM-Kanal-Informationsfehler: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init: Fehler beim Setzen der Parameter: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init: Fehler beim Setzen des Kanals: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init: Fehler beim Vorbereiten des Kanals: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit: Fehler beim Ablauf der Wiedergabe: %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit: Wiedergabe-Flush-Fehler: %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit: Fehler beim Schließen von PCM: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset: Fehler beim Ablauf der Wiedergabe: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset: Wiedergabe-Flush-Fehler: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset: Fehler beim Vorbereiten des Kanals: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause: Fehler beim Ablauf der Wiedergabe: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause: Wiedergabe-Flush-Fehler: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume: Fehler beim Vorbereiten des Kanals: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play: Alsa-Underrun, setze Stream zurück.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play: Fehler beim Vorbereiten der Wiedergabe: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play: Schreibfehler nach Rücksetzen: %s - gebe auf.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play: Ausgabefehler: %s\n" - // ao_alsa.c #define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] Ungültiger Mixerindex. Verwende Standardwert 0.\n" #define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] Fehler beim Öffnen des Mixers: %s\n" @@ -1310,7 +1285,6 @@ // ========================== INPUT ========================================= // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "Öffne Joystick-Gerätedatei '%s'.\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "Konnte Joystick-Gerätedatei '%s' nicht öffnen: %s\n" #define MSGTR_INPUT_JOYSTICK_ErrReading "Fehler beim Lesen von Joystick-Gerätedatei: %s\n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "Joystick: %d Byte Daten verloren.\n" @@ -1318,8 +1292,6 @@ #define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "Joystick: Warnung: Unbekannter Ereignistyp %d.\n" // appleir.c -#define MSGTR_INPUT_APPLE_IR_Init "Initialisiere Apple-Fernbedienung auf %s\n" -#define MSGTR_INPUT_APPLE_IR_Detect "Apple-Fernbedienung auf %s erkannt\n" #define MSGTR_INPUT_APPLE_IR_CantOpen "Kann Gerät für Apple-Fernbedienung nicht öffnen: %s\n" // input.c @@ -1355,10 +1327,10 @@ // url.c #define MSGTR_MPDEMUX_URL_StringAlreadyEscaped "Zeichenkette scheint bereits im URL-Format %c%c1%c2 'escaped' zu sein.\n" -// ai_alsa1x.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "Konnte Samplingrate nicht setzen.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "Konnte Pufferzeit nicht setzen.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "Konnte Periode nicht setzen.\n" +// ai_alsa.c +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "Konnte Samplingrate nicht setzen.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "Konnte Pufferzeit nicht setzen.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "Konnte Periode nicht setzen.\n" // ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "Kaputte Konfiguration für diesen PCM-Kanal: Keine Konfiguration verfügbar.\n" @@ -1369,9 +1341,7 @@ #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "Periode darf nicht gleich der Puffergröße sein (%u == %lu).\n" #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "Konnte Softwareparameter nicht einrichten:\n" #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "Konnte Audio nicht öffnen: %s\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "ALSA-Statusfehler: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun!!! (mindestens %.3f ms lang)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "ALSA-Status:\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun: Fehler bei Vorbereitung: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "ALSA-Ein/Ausgabefehler." @@ -1445,7 +1415,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "unbekannter ASF-Datenstromtyp\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "Konnte HTTP-Antworte nicht parsen.\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "Server hat %d zurückgegeben: %s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF-HTTP-Parser Warnung: Pragma '%s' von %d auf %d Byte abgeschnitten.\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF-HTTP-Parser Warnung: Pragma '%s' von %zu auf %zu Byte abgeschnitten.\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "Socketschreibfehler: %s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "Konnte Header nicht parsen.\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "Kein Stream gefunden.\n" @@ -1461,17 +1431,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "** leere Liste?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "Film von 0x%X - 0x%X gefunden.\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "'bih' gefunden, %u Byte von %d.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "Erstelle Keyframe-Tabelle für MS-mpg4v1-Video neu.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "Erstelle Keyframe-Tabelle für DIVX3-Video neu.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "Erstelle Keyframe-Tabelle für MPEG4-Video neu.\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "'wf' gefunden, %d Bytes von %d.\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI: dmlh gefunden (size=%d) (total_frames=%d).\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "Lese INDEX-Block, %d Blöcke für %d Frames (fpos=%"PRId64").\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "zusätzlicher RIFF-Kopf...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** Warnung: Dies ist kein erweiterter AVI-Header...\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "Kaputter Block? Blockgröße=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI: ODML: Erstelle ODML-Index (%d Superindexblöcke).\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI: ODML: Kaputte (unfertige?) Datei erkannt. Benutze den herkömmlichen Index.\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "Konnte Index-Datei '%s' nicht lesen: %s\n" @@ -1979,17 +1939,13 @@ // stream/stream_radio.c #define MSGTR_RADIO_ChannelNamesDetected "[Radio] Radiokanalnamen erkannt.\n" -#define MSGTR_RADIO_FreqRange "[Radio] Erlaubter Frequenzbereich ist %.2f-%.2f MHz.\n" #define MSGTR_RADIO_WrongFreqForChannel "[Radio] Falsche Frequenz für Kanal %s\n" #define MSGTR_RADIO_WrongChannelNumberFloat "[Radio] Falsche Kanalnummer: %.2f\n" #define MSGTR_RADIO_WrongChannelNumberInt "[Radio] Falsche Kanalnummer: %d\n" #define MSGTR_RADIO_WrongChannelName "[Radio] Falscher Kanalname: %s\n" #define MSGTR_RADIO_FreqParameterDetected "[Radio] Radiofrequenzparameter erkannt.\n" -#define MSGTR_RADIO_DoneParsingChannels "[Radio] Einlesen der Kanäle erledigt.\n" #define MSGTR_RADIO_GetTunerFailed "[Radio] Warnung: ioctl \"get tuner\" fehlgeschlagen: %s. Setze frac auf %d.\n" #define MSGTR_RADIO_NotRadioDevice "[Radio] %s ist kein Radiogerät!\n" -#define MSGTR_RADIO_TunerCapLowYes "[Radio] Empfänger ist niedrig:ja frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[Radio] Empfänger ist niedrig:nein frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[Radio] ioctl \"set frequency 0x%x (%.2f)\" fehlgeschlagen: %s\n" #define MSGTR_RADIO_GetFreqFailed "[Radio] ioctl \"get frequency\" fehlgeschlagen: %s\n" #define MSGTR_RADIO_SetMuteFailed "[Radio] ioctl \"set mute\" fehlgeschlagen: %s\n" @@ -1999,27 +1955,22 @@ #define MSGTR_RADIO_DroppingFrame "\n[Radio] zu schlecht - Audio-Frame ausgelassen (%d Bytes)!\n" #define MSGTR_RADIO_BufferEmpty "[Radio] grab_audio_frame: Puffer leer, warte auf %d Daten-Bytes.\n" #define MSGTR_RADIO_AudioInitFailed "[Radio] audio_in_init fehlgeschlagen: %s\n" -#define MSGTR_RADIO_AudioBuffer "[Radio] Audio-Capture - Puffer=%d Bytes (Block=%d Bytes).\n" #define MSGTR_RADIO_AllocateBufferFailed "[Radio] Kann Audiopuffer nicht allozieren (Block=%d,buf=%d): %s\n" #define MSGTR_RADIO_CurrentFreq "[Radio] Momentane Frequenz: %.2f\n" #define MSGTR_RADIO_SelectedChannel "[Radio] Gewählter Kanal: %d - %s (Freq: %.2f)\n" #define MSGTR_RADIO_ChangeChannelNoChannelList "[Radio] Kann Kanal nicht wechseln: Keine Kanalliste angegeben.\n" #define MSGTR_RADIO_UnableOpenDevice "[Radio] Kann '%s' nicht öffnen: %s\n" -#define MSGTR_RADIO_RadioDevice "[Radio] Radio fd: %d, %s\n" #define MSGTR_RADIO_InitFracFailed "[Radio] init_frac fehlgeschlagen.\n" #define MSGTR_RADIO_WrongFreq "[Radio] Falsche Frequenz: %.2f\n" #define MSGTR_RADIO_UsingFreq "[Radio] Verwende Frequenz: %.2f\n" #define MSGTR_RADIO_AudioInInitFailed "[Radio] audio_in_init fehlgeschlagen.\n" -#define MSGTR_RADIO_BufferString "[Radio] %s: im Puffer=%d ausgelassen=%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[Radio] Aufruf audio_in_setup fehlgeschlagen: %s\n" -#define MSGTR_RADIO_CaptureStarting "[Radio] Starte Capture-Kram.\n" #define MSGTR_RADIO_ClearBufferFailed "[Radio] Klärung des Puffers fehlgeschlagen: %s\n" #define MSGTR_RADIO_StreamEnableCacheFailed "[Radio] Aufruf zu stream_enable_cache fehlgeschlagen: %s\n" #define MSGTR_RADIO_DriverUnknownStr "[Radio] Unbekannter Treibername: %s\n" #define MSGTR_RADIO_DriverV4L2 "[Radio] Benutze V4Lv2-Radioschnittstelle.\n" #define MSGTR_RADIO_DriverV4L "[Radio] Benutze V4Lv1-Radioschnittstelle.\n" #define MSGTR_RADIO_DriverBSDBT848 "[Radio] Benutze *BSD BT848-Radioschnittstelle.\n" -#define MSGTR_RADIO_AvailableDrivers "[Radio] Verfügbare Treiber: " // ================================== LIBASS ==================================== @@ -2098,30 +2049,23 @@ " Fehlerberichte werden ignoriert werden! Du solltest erneut versuchen\n"\ " mit YV12 (was der Standardfarbraum ist) und die Dokumentation lesen!\n"\ "=====================================================================\n" -#define MSGTR_TV_SelectedNormId "Gewählte Norm-ID: %d\n" -#define MSGTR_TV_SelectedNorm "Gewählte Norm : %s\n" #define MSGTR_TV_CannotSetNorm "Fehler: Kann Norm nicht setzen!\n" #define MSGTR_TV_MJP_WidthHeight " MJP: Breite %d Höhe %d\n" #define MSGTR_TV_UnableToSetWidth "Kann angeforderte Breite nicht setzen: %d\n" #define MSGTR_TV_UnableToSetHeight "Kann angeforderte Höhe nicht setzen: %d\n" #define MSGTR_TV_NoTuner "Gewählter Input hat keinen Tuner!\n" #define MSGTR_TV_UnableFindChanlist "Kann gewählte Kanalliste nicht finden! (%s)\n" -#define MSGTR_TV_SelectedChanlist "Gewählte Kanalliste: %s (enthält %d Kanäle)\n" #define MSGTR_TV_ChannelFreqParamConflict "Du kannst Frequenz und Kanal nicht gleichzeitig setzen!\n" #define MSGTR_TV_ChannelNamesDetected "TV-Kanalnamen erkannt.\n" #define MSGTR_TV_NoFreqForChannel "Konnte Frequenz für Kanal %s nicht finden (%s)\n" #define MSGTR_TV_SelectedChannel3 "Gewählter Kanal: %s - %s (Freq: %.3f)\n" #define MSGTR_TV_SelectedChannel2 "Gewählter Kanal: %s (Freq: %.3f)\n" -#define MSGTR_TV_SelectedFrequency "Gewählte Frequenz: %lu (%.3f)\n" -#define MSGTR_TV_RequestedChannel "Angeforderter Kanal: %s\n" #define MSGTR_TV_UnsupportedAudioType "Audiotyp '%s (%x)' nicht unterstützt!\n" -#define MSGTR_TV_AudioFormat " TV-Audio: %d Kanäle, %d Bits, %d Hz\n" #define MSGTR_TV_AvailableDrivers "Verfügbare Treiber:\n" #define MSGTR_TV_DriverInfo "Ausgewählter Treiber: %s\n Name: %s\n Autor: %s\n Kommentar: %s\n" #define MSGTR_TV_NoSuchDriver "Kein Treiber: %s\n" #define MSGTR_TV_DriverAutoDetectionFailed "Automatische Erkennung des TV-Treibers fehlgeschlagen.\n" #define MSGTR_TV_UnknownColorOption "Unbekannte Farboption (%d) angegeben!\n" -#define MSGTR_TV_CurrentFrequency "Momentane Frequenz: %lu (%.3f)\n" #define MSGTR_TV_NoTeletext "Kein Videotext" #define MSGTR_TV_Bt848IoctlFailed "tvi_bsdbt848: Aufruf von %s ioctl fehlgeschlagen. Fehler: %s\n" #define MSGTR_TV_Bt848InvalidAudioRate "tvi_bsdbt848: Ungültige Audiorate. Fehler: %s\n" @@ -2149,14 +2093,8 @@ #define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow: Gerät #%d nicht gefunden.\n" #define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow: Kann Namen für Gerät #%d nicht ermitteln.\n" #define MSGTR_TVI_DS_UsingDevice "tvi_dshow: Benutze Gerät #%d: %s\n" -#define MSGTR_TVI_DS_DeviceName "tvi_dshow: Gerät #%d: %s\n" #define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow: Kann Frequenz nicht direkt ermitteln. Im Betriebssystem eingebaute\nKanaltabelle wird benutzt.\n" -#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow: Kann Frequenz nicht direkt setzen. Im Betriebssystem eingebaute\nKanaltabelle wird benutzt.\n" -#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow: unterstützte Normen:" -#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow: verfügbare Video-Inputs:" -#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow: verfügbare Audio-Inputs:" //following phrase will be printed near the selected audio/video input -#define MSGTR_TVI_DS_InputSelected "(gewählt)" #define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow: Kann Frequenztabelle nicht von kstvtune.ax laden\n" #define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow: Falscher Geräteparameter: %s\n" #define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow: Falscher Geräteindex: %d\n" @@ -2168,7 +2106,6 @@ #define MSGTR_TVI_DS_ChangingWidthHeightNotSupported "tvi_dshow: Änderung von Videobreite/-höhe wird vom Gerät nicht unterstützt.\n" #define MSGTR_TVI_DS_SelectingInputNotSupported "tvi_dshow: Wahl der Capture-Quelle wird vom Gerät nicht unterstützt.\n" -#define MSGTR_TVI_DS_FreqTableLoaded "tvi_dshow: Frequenztabelle des Systems (%s) für Land-ID=%d (Kanäle:%d) geladen.\n" #define MSGTR_TVI_DS_ErrorParsingAudioFormatStruct "tvi_dshow: Kann Struktur für Audioformat nicht parsen.\n" #define MSGTR_TVI_DS_ErrorParsingVideoFormatStruct "tvi_dshow: Kann Struktur für Videoformat nicht parsen.\n" #define MSGTR_TVI_DS_UnableSetAudioMode "tvi_dshow: Kann Audiomodus %d nicht setzen. Fehler:0x%x\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-dk.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-dk.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-dk.h 2011-04-03 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-dk.h 2011-10-25 13:55:48.000000000 +0000 @@ -59,7 +59,6 @@ #define MSGTR_NoHomeDir "Kunne ikke finde hjemmekatalog\n" #define MSGTR_GetpathProblem "get_path(\"config\") problem\n" #define MSGTR_CreatingCfgFile "Genererer konfigurationsfil: %s\n" -#define MSGTR_BuiltinCodecsConf "Benytter indbyggede standardværdier for codecs.conf\n" #define MSGTR_CantLoadFont "Kunne ikke indlæse skrifttype: %s\n" #define MSGTR_CantLoadSub "Kunne ikke indlæse undertekstfil: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: FATALT: Kunne ikke finde det valgte spor!\n" @@ -101,8 +100,6 @@ #define MSGTR_Playing "Afspiller %s\n" #define MSGTR_NoSound "Lyd: ingen lyd\n" #define MSGTR_FPSforced "Billedfrekvens sat til %5.3f (ftime: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "Kompileret med dynamisk processoroptimering - NB: dette er ikke optimalt! For at få den bedre ydelse kompiler MPlayer fra kildekode med --disable-runtime-cpudetection\n" -#define MSGTR_CompiledWithCPUExtensions "Kompileret til x86 CPU med udvidelser:" #define MSGTR_AvailableVideoOutputDrivers "Tilgængelige videodrivere:\n" #define MSGTR_AvailableAudioOutputDrivers "Tilgængelige lyddrivere:\n" #define MSGTR_AvailableAudioCodecs "Tilgængelige lyd-codecs:\n" @@ -110,7 +107,6 @@ #define MSGTR_AvailableAudioFm "\nTilgængelige (prækompilerede) lyd-codec familier/drivere:\n" #define MSGTR_AvailableVideoFm "\nTilgængelige (prækompilerede) video-codec familier/drivere:\n" #define MSGTR_AvailableFsType "Tilgængelige fuldskærmstilstande:\n" -#define MSGTR_UsingRTCTiming "Benytter Linux' hardware RTC timer (%ldHz)\n" #define MSGTR_CannotReadVideoProperties "Video: Kunne ikke læse egenskaber\n" #define MSGTR_NoStreamFound "Ingen spor fundet\n" #define MSGTR_ErrorInitializingVODevice "Fejl under åbning/initialisering af den valgte videodriver (-vo)!\n" @@ -241,7 +237,6 @@ #define MSGTR_SwitchToNi "\nDefekt .AVI - skifter til ikke-interleaved (-ni)...\n" #define MSGTR_Detected_XXX_FileFormat "Filformat er %s\n" #define MSGTR_DetectedAudiofile "Filen er en lydfil!\n" -#define MSGTR_NotSystemStream "Ikke MPEG System Stream format... (måske Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Ugyldig MPEG-ES stream??? Rapporter venligst dette, det kunne være en fejl i programmet :(\n" #define MSGTR_FormatNotRecognized "============ Desværre, dette filformat kunne ikke genkendes =================\n"\ "=== Er denne fil af typen AVI, ASF eller MPEG, så rapporter venligst dette, det kan skyldes en fejl. ==\n" @@ -263,11 +258,8 @@ #define MSGTR_MOVcomprhdr "MOV: Komprimerede headers (endnu) ikke understøttet!\n" #define MSGTR_MOVvariableFourCC "MOV: Advarsel! variabel FOURCC!?\n" #define MSGTR_MOVtooManyTrk "MOV: Advarsel! For mange spor" -#define MSGTR_FoundAudioStream "==> Fandt lydspor: %d\n" -#define MSGTR_FoundVideoStream "==> Fandt videospor: %d\n" #define MSGTR_DetectedTV "TV genkendt! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Kan ikke åbne ogg demuxe.r\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Søger efter lydspor (id:%d)\n" #define MSGTR_CannotOpenAudioStream "Kan ikke åbne lydsspor: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Kan ikke åbne spor %s af underteksterne\n" #define MSGTR_OpeningAudioDemuxerFailed "Kan ikke åbne lyddemuxer: %s\n" @@ -297,21 +289,15 @@ #define MSGTR_UsingExternalPP "[PP] Benytter ekstern efterprocesseringsfilter, max q = %d\n" #define MSGTR_UsingCodecPP "[PP] Benytter codec's efterprocessering, max q = %d\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Video egenskab '%s' ikke understøttet af den valgte vo & vd! \n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Anmodede video-codec familie [%s] (vfm=%s) ikke tilgængelig (aktiver før kompilering!)\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Anmodede lyd-codec familie [%s] (afm=%s) ikke tilgængelig (aktiver før kompilering!)\n" #define MSGTR_OpeningVideoDecoder "Åbner videodekoder: [%s] %s\n" #define MSGTR_OpeningAudioDecoder "Åbner audiodekoder: [%s] %s\n" -#define MSGTR_UninitVideoStr "deinit video: %s \n" -#define MSGTR_UninitAudioStr "deinit audio: %s \n" #define MSGTR_VDecoderInitFailed "Videodekoder initialisering fejlede :(\n" #define MSGTR_ADecoderInitFailed "Lyddekoder initialisering fejlede :(\n" #define MSGTR_ADecoderPreinitFailed "Lyddekoder præinitialisering fejlede :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Allokerer %d bytes til input buffer\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Allokerer %d + %d = %d bytes til output buffer\n" // LIRC: -#define MSGTR_SettingUpLIRC "Sætter LIRC understøttelse op...\n" #define MSGTR_LIRCopenfailed "Ingen lirc understøttelse fundet!\n" #define MSGTR_LIRCcfgerr "Kunne ikke læse LIRC konfigurationsfil %s!\n" @@ -344,7 +330,6 @@ #define MSGTR_Network "Netværksstreaming..." #define MSGTR_Preferences "Indstillinger" #define MSGTR_NoMediaOpened "Medie ikke åbnet" -#define MSGTR_VCDTrack "VCD nummer %d" #define MSGTR_NoChapter "Ingen kapitel" #define MSGTR_Chapter "kapitel %d" #define MSGTR_NoFileLoaded "Ingen fil indlæst" @@ -415,7 +400,7 @@ // TODO: Why is this different from MSGTR_PlayList? #define MSGTR_MENU_PlayList "Afspilningslisten" #define MSGTR_MENU_SkinBrowser "Vælg udseende" -#define MSGTR_MENU_Exit "Forlad..." +#define MSGTR_MENU_Exit "Forlad" #define MSGTR_MENU_Mute "Mute" #define MSGTR_MENU_Original "Original" #define MSGTR_MENU_AspectRatio "Størrelsesforhold" @@ -469,9 +454,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Anvend meget billed-skip (farlig)" #define MSGTR_PREFERENCES_Flip "Flip billede" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Statuslinje og indikator" -#define MSGTR_PREFERENCES_OSDProgress "Kun statuslinje" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Timer, procent og total tid" #define MSGTR_PREFERENCES_Subtitle "Undertekst:" #define MSGTR_PREFERENCES_SUB_Delay "Forsinkelse: " #define MSGTR_PREFERENCES_SUB_FPS "Billedfrekvens:" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-el.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-el.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-el.h 2011-04-03 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-el.h 2011-10-25 13:55:48.000000000 +0000 @@ -57,7 +57,6 @@ #define MSGTR_NoHomeDir "Μη δυνατή η εύρεση του HOME φακέλου\n" #define MSGTR_GetpathProblem "get_path(\"config\") πρόβλημα\n" #define MSGTR_CreatingCfgFile "Δημιουργία του αρχείου config: %s\n" -#define MSGTR_BuiltinCodecsConf "Χρήση του ενσωματωμένου προεπιλεγμένου codecs.conf\n" #define MSGTR_CantLoadFont "Μη δυνατότητα φόρτωσης της γραμματοσειράς: %s\n" #define MSGTR_CantLoadSub "Μη δυνατότητα φόρτωσης των υποτίτλων: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: Σφάλμα: λείπει το επιλεγμένο κανάλι!\n" @@ -99,8 +98,6 @@ #define MSGTR_Playing "Αναπαραγωγή του %s\n" #define MSGTR_NoSound "Ήχος: μη διαθέσιμο!!!\n" #define MSGTR_FPSforced "Τα FPS ρυθμίστηκαν να είναι %5.3f (ftime: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "Μετάφραση με αυτόματη αναγνώριση επεξεργαστή - προσοχή, δεν είναι βέλτιστο! Για καλύτερες επιδόσεις, μεταφράστε το mplayer από τον πηγαίο κώδικα με --disable-runtime-cpudetection\n" -#define MSGTR_CompiledWithCPUExtensions "Μετάφραση για x86 επεξεργαστή με τις ακόλουθες επεκτάσεις:" #define MSGTR_AvailableVideoOutputDrivers "Διαθέσιμοι οδηγοί για έξοδο βίντεο:\n" #define MSGTR_AvailableAudioOutputDrivers "Διαθέσιμοι οδηγοί για έξοδο ήχου:\n" #define MSGTR_AvailableAudioCodecs "Διαθέσιμα codecs ήχου:\n" @@ -108,7 +105,6 @@ #define MSGTR_AvailableAudioFm "\nΔιαθέσιμοι (compiled-in) οδηγοί/οικογένειες codec ήχου:\n" #define MSGTR_AvailableVideoFm "\nΔιαθέσιμοι (compiled-in) οδηγοί/οικογένειες codec βίντεο:\n" #define MSGTR_AvailableFsType "Διαθέσιμα επίπεδα αλλαγής σε πλήρη οθόνη:\n" -#define MSGTR_UsingRTCTiming "Χρήση του hardware RTC του linux στα (%ldHz)\n" #define MSGTR_CannotReadVideoProperties "Βίντεο: αδύνατη η ανάγνωση ιδιοτήτων\n" #define MSGTR_NoStreamFound "Δεν βρέθηκε κανάλι\n" #define MSGTR_ErrorInitializingVODevice "Σφάλμα κατά το άνοιγμα/αρχικοποίηση της επιλεγμένης video_out (-vo) συσκευή!\n" @@ -239,7 +235,6 @@ #define MSGTR_SwitchToNi "\n Αναγνωρίστηκε λάθος interleaved .AVI - εναλλαγή στη μέθοδο -ni!\n" #define MSGTR_Detected_XXX_FileFormat "Αναγνωρίστηκε αρχείο τύπου %s!\n" #define MSGTR_DetectedAudiofile "Αναγνωρίστηκε αρχείο ήχου!\n" -#define MSGTR_NotSystemStream "Μη Αναγνωρίσιμο MPEG System Stream format... (μήπως είναι Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Μη Αναγνωρίσιμο κανάλι MPEG-ES??? Επικοινώνησε με τον δημιουργό, μπορεί να είναι ένα bug :(\n" #define MSGTR_FormatNotRecognized "============= Λυπάμαι, αυτό το είδος αρχείου δεν αναγνωρίζεται/υποστηρίζεται ===============\n"\ "=== Αν το αρχείο είναι ένα AVI, ASF ή MPEG κανάλι, παρακαλώ επικοινωνήστε με τον δημιουργό! ===\n" @@ -261,11 +256,8 @@ #define MSGTR_MOVcomprhdr "MOV: Συμπιεσμένες επικεφαλίδες δεν υποστηρίζονται (ακόμα)!\n" #define MSGTR_MOVvariableFourCC "MOV: ΠΡΟΕΙΔΟΠΟΙΗΣΗ! μεταβλητό FOURCC βρέθηκε!?\n" #define MSGTR_MOVtooManyTrk "MOV: Προειδοποίηση! βρέθηκαν πολλά tracks!" -#define MSGTR_FoundAudioStream "==> Βρέθηκε κανάλι ήχου: %d\n" -#define MSGTR_FoundVideoStream "==> Βρέθηκε κανάλι βίντεο: %d\n" #define MSGTR_DetectedTV "Βρέθηκε TV! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Δεν είναι δυνατό το άνοιγμα του ogg demuxer\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Αναζήτηση για κανάλι ήχου (id:%d)\n" #define MSGTR_CannotOpenAudioStream "Δεν είναι δυνατό το άνοιγμα του καναλιού ήχου: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Δεν είναι δυνατό το άνοιγμα του καναλιού υποτίτλων: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Αποτυχία κατά το άνοιγμα του demuxer ήχου: %s\n" @@ -297,21 +289,15 @@ #define MSGTR_UsingExternalPP "[PP] Χρήση εξωτερικού φίλτρου προεπεξεργασίας, μέγιστο q = %d\n" #define MSGTR_UsingCodecPP "[PP] Χρήση φίλτρου προεπεξεργασίας για το codec, μέγιστο q = %d\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Η ιδιότητα για το βίντεο '%s' δεν υποστηρίζεται από το επιλεγμένο vo και vd! \n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Η αίτηση για την οικογένεια του codec βίντεο [%s] (vfm=%s) δεν διατίθεται (ενεργοποιήστε το κατά την μετάφραση του προγράμματος!)\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Η αίτηση για την οικογένεια του codec ήχου [%s] (afm=%s) δεν διατίθεται (ενεργοποιήστε το κατά την μετάφραση του προγράμματος!)\n" #define MSGTR_OpeningVideoDecoder "Άνοιγμα αποκωδικοποιητή βίντεο: [%s] %s\n" #define MSGTR_OpeningAudioDecoder "Άνοιγμα αποκωδικοποιητή ήχου: [%s] %s\n" -#define MSGTR_UninitVideoStr "uninit βίντεο: %s \n" -#define MSGTR_UninitAudioStr "uninit ήχο: %s \n" #define MSGTR_VDecoderInitFailed "Αποτυχία αρχικοποίησης του VDecoder :(\n" #define MSGTR_ADecoderInitFailed "Αποτυχία αρχικοποίησης του ADecoder :(\n" #define MSGTR_ADecoderPreinitFailed "Αποτυχία προαρχικοποίησης του ADecoder :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Απονομή %d bytes για τον buffer εισόδου\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Απονομή %d + %d = %d bytes για τον buffer εξόδου\n" // LIRC: -#define MSGTR_SettingUpLIRC "Αρχικοποίηση υποστήριξης του lirc...\n" #define MSGTR_LIRCopenfailed "Αποτυχία στην αρχικοποίηση της υποστήριξης του lirc!\n" #define MSGTR_LIRCcfgerr "Αποτυχία κατά το διάβασμα του αρχείου παραμέτρων του lirc %s!\n" @@ -329,8 +315,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Θα πρέπει να αναβαθμήσετε ή να εγκαταστήσετε το πακέτο με τα codecs.\nΔείτε τη διεύθυνση http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "Πληροφορία: το βίντεο codec Win32/DShow αρχικοποιήθηκε επιτυχώς.\n" -#define MSGTR_DMOInitOK "Πληροφορία: το βίντεο codec Win32/DMO αρχικοποιήθηκε επιτυχώς.\n" // x11_common.c #define MSGTR_EwmhFullscreenStateFailed "\nX11: Αδύνατη η αποστολή του γεγονότος EWMH fullscreen!\n" @@ -353,7 +337,6 @@ #define MSGTR_Network "Streaming δικτύου." #define MSGTR_Preferences "Ιδιότητες" #define MSGTR_NoMediaOpened "Δεν φορτώθηκαν αρχεία" -#define MSGTR_VCDTrack "VCD track %d" #define MSGTR_NoChapter "Μη χρήση κεφαλαίου" #define MSGTR_Chapter "Κεφάλαιο %d" #define MSGTR_NoFileLoaded "δεν φορτώθηκε αρχείο" @@ -424,7 +407,7 @@ #define MSGTR_MENU_SkinBrowser "Λίστα skins" // TODO: Why is this different from MSGTR_Preferences? #define MSGTR_MENU_Preferences "Ρυθμίσεις" -#define MSGTR_MENU_Exit "Έξοδος..." +#define MSGTR_MENU_Exit "Έξοδος" #define MSGTR_MENU_Mute "Απενεργοποίηση ήχου" #define MSGTR_MENU_Original "Αρχικό" #define MSGTR_MENU_AspectRatio "Αναλογία εμφάνισης" @@ -478,9 +461,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Ενεργοποίηση σκληρής κατάργησης καρέ (επικίνδυνο)" #define MSGTR_PREFERENCES_Flip "Flip της εικόνας πάνω-κάτω" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Μετρητής χρόνου και δείκτες" -#define MSGTR_PREFERENCES_OSDProgress "Μόνο Μπάρες Προόδου" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Χρόνος, ποσοστό επί της εκατό και συνολικός χρόνος" #define MSGTR_PREFERENCES_Subtitle "Υπότιτλοι:" #define MSGTR_PREFERENCES_SUB_Delay "Καθυστέρηση:" #define MSGTR_PREFERENCES_SUB_FPS "FPS:" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-en.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-en.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-en.h 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-en.h 2011-12-31 12:38:52.000000000 +0000 @@ -1,4 +1,4 @@ -// $Revision: 33639 $ +// $Revision: 34475 $ // MASTER FILE. Use this file as base for translations. // Translated files should be sent to the mplayer-DOCS mailing list or // to the help messages maintainer, see DOCS/tech/MAINTAINERS. @@ -64,7 +64,6 @@ #define MSGTR_NoHomeDir "Cannot find HOME directory.\n" #define MSGTR_GetpathProblem "get_path(\"config\") problem\n" #define MSGTR_CreatingCfgFile "Creating config file: %s\n" -#define MSGTR_BuiltinCodecsConf "Using built-in default codecs.conf.\n" #define MSGTR_CantLoadFont "Cannot load bitmap font '%s'.\n" #define MSGTR_CantLoadSub "Cannot load subtitles '%s'.\n" #define MSGTR_DumpSelectedStreamMissing "dump: FATAL: Selected stream missing!\n" @@ -109,8 +108,6 @@ #define MSGTR_Playing "\nPlaying %s.\n" #define MSGTR_NoSound "Audio: no sound\n" #define MSGTR_FPSforced "FPS forced to be %5.3f (ftime: %5.3f).\n" -#define MSGTR_CompiledWithRuntimeDetection "Compiled with runtime CPU detection.\n" -#define MSGTR_CompiledWithCPUExtensions "Compiled for x86 CPU with extensions:" #define MSGTR_AvailableVideoOutputDrivers "Available video output drivers:\n" #define MSGTR_AvailableAudioOutputDrivers "Available audio output drivers:\n" #define MSGTR_AvailableAudioCodecs "Available audio codecs:\n" @@ -118,7 +115,6 @@ #define MSGTR_AvailableAudioFm "Available (compiled-in) audio codec families/drivers:\n" #define MSGTR_AvailableVideoFm "Available (compiled-in) video codec families/drivers:\n" #define MSGTR_AvailableFsType "Available fullscreen layer change modes:\n" -#define MSGTR_UsingRTCTiming "Using Linux hardware RTC timing (%ldHz).\n" #define MSGTR_CannotReadVideoProperties "Video: Cannot read properties.\n" #define MSGTR_NoStreamFound "No stream found.\n" #define MSGTR_ErrorInitializingVODevice "Error opening/initializing the selected video_out (-vo) device.\n" @@ -153,14 +149,11 @@ #define MSGTR_AddedSubtitleFile "SUB: Added subtitle file (%d): %s\n" #define MSGTR_RemovedSubtitleFile "SUB: Removed subtitle file (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "Error opening file [%s] for writing!\n" -#define MSGTR_CommandLine "CommandLine:" #define MSGTR_RTCDeviceNotOpenable "Failed to open %s: %s (it should be readable by the user.)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Linux RTC init error in ioctl (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Try adding \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" to your system startup scripts.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Linux RTC init error in ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "Using %s timing.\n" -#define MSGTR_MenuInitialized "Menu initialized: %s\n" -#define MSGTR_MenuInitFailed "Menu init failed.\n" #define MSGTR_Getch2InitializedTwice "WARNING: getch2_init called twice!\n" #define MSGTR_DumpstreamFdUnavailable "Cannot dump this stream - no file descriptor available.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Can't open libmenu video filter with root menu %s.\n" @@ -295,12 +288,9 @@ #define MSGTR_CannotAllocateBytes "Couldn't allocate %d bytes.\n" #define MSGTR_SettingAudioDelay "Setting audio delay to %5.3fs.\n" #define MSGTR_SettingVideoDelay "Setting video delay to %5.3fs.\n" -#define MSGTR_SettingAudioInputGain "Setting audio input gain to %f.\n" -#define MSGTR_LamePresetEquals "\npreset=%s\n\n" #define MSGTR_LimitingAudioPreload "Limiting audio preload to 0.4s.\n" #define MSGTR_IncreasingAudioDensity "Increasing audio density to 4.\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Forcing audio preload to 0, max pts correction to 0.\n" -#define MSGTR_CBRAudioByterate "\n\nCBR audio: %d bytes/sec, %d bytes/block\n" #define MSGTR_LameVersion "LAME version %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Error: The bitrate specified is out of the valid range for this preset.\n"\ "\n"\ @@ -487,8 +477,6 @@ #define MSGTR_CodecNeedsOutfmt "\ncodec(%s) needs an 'outfmt'!\n" #define MSGTR_CantAllocateComment "Can't allocate memory for comment. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "Reading %s: " -#define MSGTR_CantOpenFileError "Can't open '%s': %s\n" #define MSGTR_CantGetMemoryForLine "Can't get memory for 'line': %s\n" #define MSGTR_CantReallocCodecsp "Can't realloc '*codecsp': %s\n" #define MSGTR_CodecNameNotUnique "Codec name '%s' isn't unique." @@ -554,7 +542,7 @@ #define MSGTR_Preferences "Preferences" #define MSGTR_AudioPreferences "Audio driver configuration" #define MSGTR_NoMediaOpened "No media opened." -#define MSGTR_VCDTrack "VCD track %d" +#define MSGTR_Title "Title %d" #define MSGTR_NoChapter "No chapter" #define MSGTR_Chapter "Chapter %d" #define MSGTR_NoFileLoaded "No file loaded." @@ -606,6 +594,7 @@ #define MSGTR_MENU_AboutMPlayer "About MPlayer" #define MSGTR_MENU_Open "Open..." #define MSGTR_MENU_PlayFile "Play file..." +#define MSGTR_MENU_PlayCD "Play CD..." #define MSGTR_MENU_PlayVCD "Play VCD..." #define MSGTR_MENU_PlayDVD "Play DVD..." #define MSGTR_MENU_PlayURL "Play URL..." @@ -623,6 +612,7 @@ #define MSGTR_MENU_NormalSize "Normal size" #define MSGTR_MENU_DoubleSize "Double size" #define MSGTR_MENU_FullScreen "Fullscreen" +#define MSGTR_MENU_CD "CD" #define MSGTR_MENU_DVD "DVD" #define MSGTR_MENU_VCD "VCD" #define MSGTR_MENU_PlayDisc "Open disc..." @@ -637,7 +627,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "Skin browser" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Exit..." +#define MSGTR_MENU_Exit "Exit" #define MSGTR_MENU_Mute "Mute" #define MSGTR_MENU_Original "Original" #define MSGTR_MENU_AspectRatio "Aspect ratio" @@ -698,9 +688,10 @@ #define MSGTR_PREFERENCES_HFrameDrop "Enable HARD frame dropping (dangerous)" #define MSGTR_PREFERENCES_Flip "Flip image upside down" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Timer and indicators" -#define MSGTR_PREFERENCES_OSDProgress "Progressbars only" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Timer, percentage and total time" +#define MSGTR_PREFERENCES_OSD_LEVEL0 "Subtitles only" +#define MSGTR_PREFERENCES_OSD_LEVEL1 "Volume and seek" +#define MSGTR_PREFERENCES_OSD_LEVEL2 "Volume, seek, timer and percentage" +#define MSGTR_PREFERENCES_OSD_LEVEL3 "Volume, seek, timer, percentage and total time" #define MSGTR_PREFERENCES_Subtitle "Subtitle:" #define MSGTR_PREFERENCES_SUB_Delay "Delay: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" @@ -821,6 +812,35 @@ #define MSGTR_WS_NotAFile "This does not seem to be a file...\n" #define MSGTR_WS_DDNothing "D&D: Nothing returned!\n" +// Win32 GUI +#define MSGTR_Close "Close" +#define MSGTR_Default "Defaults" +#define MSGTR_Down "Down" +#define MSGTR_Load "Load" +#define MSGTR_Save "Save" +#define MSGTR_Up "Up" +#define MSGTR_DirectorySelect "Select directory..." +#define MSGTR_PlaylistSave "Save playlist..." +#define MSGTR_PlaylistSelect "Select playlist..." +#define MSGTR_SelectTitleChapter "Select title/chapter..." +#define MSGTR_MENU_DebugConsole "Debug Console" +#define MSGTR_MENU_OnlineHelp "Online Help" +#define MSGTR_MENU_PlayDirectory "Play directory..." +#define MSGTR_MENU_SeekBack "Seek Backwards" +#define MSGTR_MENU_SeekForw "Seek Forwards" +#define MSGTR_MENU_ShowHide "Show/Hide" +#define MSGTR_MENU_SubtitlesOnOff "Subtitle Visibility On/Off" +#define MSGTR_PLAYLIST_AddFile "Add File..." +#define MSGTR_PLAYLIST_AddURL "Add URL..." +#define MSGTR_PREFERENCES_Priority "Priority:" +#define MSGTR_PREFERENCES_PriorityHigh "high" +#define MSGTR_PREFERENCES_PriorityLow "low" +#define MSGTR_PREFERENCES_PriorityNormal "normal" +#define MSGTR_PREFERENCES_PriorityNormalAbove "above normal" +#define MSGTR_PREFERENCES_PriorityNormalBelow "below normal" +#define MSGTR_PREFERENCES_VideoInSubwin "Display videos in the sub window (DirectX only)" + + // ======================= video output drivers ======================== #define MSGTR_VOincompCodec "The selected video_out device is incompatible with this codec.\n"\ @@ -1147,10 +1167,8 @@ // audio_out.c #define MSGTR_AO_ALSA9_1x_Removed "audio_out: alsa9 and alsa1x modules were removed, use -ao alsa instead.\n" -#define MSGTR_AO_TryingPreferredAudioDriver "Trying preferred audio driver '%.*s', options '%s'\n" #define MSGTR_AO_NoSuchDriver "No such audio driver '%.*s'\n" #define MSGTR_AO_FailedInit "Failed to initialize audio driver '%s'\n" -#define MSGTR_AO_TryingEveryKnown "Trying every known audio driver...\n" // ao_oss.c #define MSGTR_AO_OSS_CantOpenMixer "[AO OSS] audio_setup: Can't open mixer device %s: %s\n" @@ -1219,31 +1237,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** Your audio driver DOES NOT support select() ***\nRecompile MPlayer with #undef HAVE_AUDIO_SELECT in config.h !\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\nFatal error: *** CANNOT REOPEN / RESET AUDIO DEVICE (%s) ***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init: requested format: %d Hz, %d channels, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init: no soundcards found.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init: invalid format (%s) requested - output disabled.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init: playback open error: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init: PCM info error: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init: %d soundcard(s) found, using: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init: PCM channel info error: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init: error setting parameters: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init: error setting up channel: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init: channel prepare error: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit: playback drain error: %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit: playback flush error: %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit: PCM close error: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset: playback drain error: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset: playback flush error: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset: channel prepare error: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause: playback drain error: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause: playback flush error: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume: channel prepare error: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play: alsa underrun, resetting stream.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play: playback prepare error: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play: write error after reset: %s - giving up.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play: output error: %s\n" - // ao_alsa.c #define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] Invalid mixer index. Defaulting to 0.\n" #define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] Mixer open error: %s\n" @@ -1327,7 +1320,6 @@ // ========================== INPUT ========================================= // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "Opening joystick device %s\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "Can't open joystick device %s: %s\n" #define MSGTR_INPUT_JOYSTICK_ErrReading "Error while reading joystick device: %s\n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "Joystick: We lose %d bytes of data\n" @@ -1335,8 +1327,6 @@ #define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "Joystick warning unknown event type %d\n" // appleir.c -#define MSGTR_INPUT_APPLE_IR_Init "Initializing Apple IR on %s\n" -#define MSGTR_INPUT_APPLE_IR_Detect "Detected Apple IR on %s\n" #define MSGTR_INPUT_APPLE_IR_CantOpen "Can't open Apple IR device: %s\n" // input.c @@ -1367,7 +1357,6 @@ #define MSGTR_INPUT_INPUT_ErrCantInitAppleRemote "Can't init Apple Remote.\n" // lirc.c -#define MSGTR_SettingUpLIRC "Setting up LIRC support...\n" #define MSGTR_LIRCopenfailed "Failed to open LIRC support. You will not be able to use your remote control.\n" #define MSGTR_LIRCcfgerr "Failed to read LIRC config file %s.\n" @@ -1382,7 +1371,6 @@ #define MSGTR_WarningLenIsntDivisible "Warning, len isn't divisible by samplesize!\n" #define MSGTR_MuxbufMallocErr "Muxer frame buffer cannot allocate memory!\n" #define MSGTR_MuxbufReallocErr "Muxer frame buffer cannot reallocate memory!\n" -#define MSGTR_MuxbufSending "Muxer frame buffer sending %d frame(s) to the muxer.\n" #define MSGTR_WritingHeader "Writing header...\n" #define MSGTR_WritingTrailer "Writing index...\n" @@ -1400,7 +1388,6 @@ #define MSGTR_ON2AviFormat "ON2 AVI format" #define MSGTR_Detected_XXX_FileFormat "%s file format detected.\n" #define MSGTR_DetectedAudiofile "Audio file detected.\n" -#define MSGTR_NotSystemStream "Not MPEG System Stream format... (maybe Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Invalid MPEG-ES stream??? Contact the author, it may be a bug :(\n" #define MSGTR_FormatNotRecognized "============ Sorry, this file format is not recognized/supported =============\n"\ "=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===\n" @@ -1425,11 +1412,8 @@ #define MSGTR_MOVcomprhdr "MOV: Compressed headers support requires ZLIB!\n" #define MSGTR_MOVvariableFourCC "MOV: WARNING: Variable FourCC detected!?\n" #define MSGTR_MOVtooManyTrk "MOV: WARNING: too many tracks" -#define MSGTR_FoundAudioStream "==> Found audio stream: %d\n" -#define MSGTR_FoundVideoStream "==> Found video stream: %d\n" #define MSGTR_DetectedTV "TV detected! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Unable to open the Ogg demuxer.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Searching for audio stream (id:%d).\n" #define MSGTR_CannotOpenAudioStream "Cannot open audio stream: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Cannot open subtitle stream: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Failed to open audio demuxer: %s\n" @@ -1462,17 +1446,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "** empty list?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "Found movie at 0x%X - 0x%X\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "Found 'bih', %u bytes of %d\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "Regenerating keyframe table for M$ mpg4v1 video.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "Regenerating keyframe table for DIVX3 video.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "Regenerating keyframe table for MPEG-4 video.\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "Found 'wf', %d bytes of %d\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI: dmlh found (size=%d) (total_frames=%d)\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "Reading INDEX block, %d chunks for %d frames (fpos=%"PRId64").\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "Additional RIFF header...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** Warning: this is no extended AVI header..\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "Broken chunk? chunksize=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI: ODML: Building ODML index (%d superindexchunks).\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI: ODML: Broken (incomplete?) file detected. Will use traditional index.\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "Can't read index file %s: %s\n" @@ -1604,21 +1578,15 @@ #define MSGTR_UsingExternalPP "[PP] Using external postprocessing filter, max q = %d.\n" #define MSGTR_UsingCodecPP "[PP] Using codec's postprocessing, max q = %d.\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Video attribute '%s' is not supported by selected vo & vd.\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Requested video codec family [%s] (vfm=%s) not available.\nEnable it at compilation.\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Requested audio codec family [%s] (afm=%s) not available.\nEnable it at compilation.\n" #define MSGTR_OpeningVideoDecoder "Opening video decoder: [%s] %s\n" #define MSGTR_SelectedVideoCodec "Selected video codec: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Opening audio decoder: [%s] %s\n" #define MSGTR_SelectedAudioCodec "Selected audio codec: [%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "Building audio filter chain for %dHz/%dch/%s -> %dHz/%dch/%s...\n" -#define MSGTR_UninitVideoStr "Uninit video: %s\n" -#define MSGTR_UninitAudioStr "Uninit audio: %s\n" #define MSGTR_VDecoderInitFailed "VDecoder init failed :(\n" #define MSGTR_ADecoderInitFailed "ADecoder init failed :(\n" #define MSGTR_ADecoderPreinitFailed "ADecoder preinit failed :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Allocating %d bytes for input buffer.\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Allocating %d + %d = %d bytes for output buffer.\n" // ad_dvdpcm.c: #define MSGTR_SamplesWanted "Samples of this format are needed to improve support. Please contact the developers.\n" @@ -1634,8 +1602,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "You need to upgrade/install the binary codecs package.\nGo to http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO: Win32/DShow video codec init OK.\n" -#define MSGTR_DMOInitOK "INFO: Win32/DMO video codec init OK.\n" // libmpcodecs/vd_dmo.c vd_dshow.c vd_vfw.c #define MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec "[VD_DMO] Couldn't allocate image for cinepak codec.\n" @@ -1763,12 +1729,12 @@ // ================================== stream ==================================== -// ai_alsa1x.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "Cannot set samplerate.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "Cannot set buffer time.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "Cannot set period time.\n" +// ai_alsa.c +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "Cannot set samplerate.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "Cannot set buffer time.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "Cannot set period time.\n" -// ai_alsa1x.c / ai_alsa.c +// ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "Broken configuration for this PCM: no configurations available.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "Access type not available.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt "Sample format not available.\n" @@ -1779,7 +1745,6 @@ #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "Error opening audio: %s\n" #define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "ALSA status error: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun!!! (at least %.3f ms long)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "ALSA Status:\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun: prepare error: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "ALSA read/write error" @@ -1839,7 +1804,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "unknown ASF stream type\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "Failed to parse HTTP response.\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "Server returned %d:%s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP PARSE WARNING : Pragma %s cut from %zd bytes to %d\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP PARSE WARNING : Pragma %s cut from %zu bytes to %zu\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "socket write error: %s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "Failed to parse header.\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "No stream found.\n" @@ -1979,21 +1944,16 @@ // stream_bluray.c #define MSGTR_BlurayNoDevice "No Blu-ray device/location was specified ...\n" #define MSGTR_BlurayNoTitles "Can't find any Blu-ray-compatible title here.\n" -#define MSGTR_BlurayOK "Blu-ray successfully opened.\n" // stream_radio.c #define MSGTR_RADIO_ChannelNamesDetected "[radio] Radio channel names detected.\n" -#define MSGTR_RADIO_FreqRange "[radio] Allowed frequency range is %.2f-%.2f MHz.\n" #define MSGTR_RADIO_WrongFreqForChannel "[radio] Wrong frequency for channel %s\n" #define MSGTR_RADIO_WrongChannelNumberFloat "[radio] Wrong channel number: %.2f\n" #define MSGTR_RADIO_WrongChannelNumberInt "[radio] Wrong channel number: %d\n" #define MSGTR_RADIO_WrongChannelName "[radio] Wrong channel name: %s\n" #define MSGTR_RADIO_FreqParameterDetected "[radio] Radio frequency parameter detected.\n" -#define MSGTR_RADIO_DoneParsingChannels "[radio] Done parsing channels.\n" #define MSGTR_RADIO_GetTunerFailed "[radio] Warning: ioctl get tuner failed: %s. Setting frac to %d.\n" #define MSGTR_RADIO_NotRadioDevice "[radio] %s is no radio device!\n" -#define MSGTR_RADIO_TunerCapLowYes "[radio] tuner is low:yes frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[radio] tuner is low:no frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[radio] ioctl set frequency 0x%x (%.2f) failed: %s\n" #define MSGTR_RADIO_GetFreqFailed "[radio] ioctl get frequency failed: %s\n" #define MSGTR_RADIO_SetMuteFailed "[radio] ioctl set mute failed: %s\n" @@ -2003,27 +1963,22 @@ #define MSGTR_RADIO_DroppingFrame "\n[radio] too bad - dropping audio frame (%d bytes)!\n" #define MSGTR_RADIO_BufferEmpty "[radio] grab_audio_frame: buffer empty, waiting for %d data bytes.\n" #define MSGTR_RADIO_AudioInitFailed "[radio] audio_in_init failed: %s\n" -#define MSGTR_RADIO_AudioBuffer "[radio] Audio capture - buffer=%d bytes (block=%d bytes).\n" #define MSGTR_RADIO_AllocateBufferFailed "[radio] cannot allocate audio buffer (block=%d,buf=%d): %s\n" #define MSGTR_RADIO_CurrentFreq "[radio] Current frequency: %.2f\n" #define MSGTR_RADIO_SelectedChannel "[radio] Selected channel: %d - %s (freq: %.2f)\n" #define MSGTR_RADIO_ChangeChannelNoChannelList "[radio] Can not change channel: no channel list given.\n" #define MSGTR_RADIO_UnableOpenDevice "[radio] Unable to open '%s': %s\n" -#define MSGTR_RADIO_RadioDevice "[radio] Radio fd: %d, %s\n" #define MSGTR_RADIO_InitFracFailed "[radio] init_frac failed.\n" #define MSGTR_RADIO_WrongFreq "[radio] Wrong frequency: %.2f\n" #define MSGTR_RADIO_UsingFreq "[radio] Using frequency: %.2f.\n" #define MSGTR_RADIO_AudioInInitFailed "[radio] audio_in_init failed.\n" -#define MSGTR_RADIO_BufferString "[radio] %s: in buffer=%d dropped=%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[radio] audio_in_setup call failed: %s\n" -#define MSGTR_RADIO_CaptureStarting "[radio] Starting capture stuff.\n" #define MSGTR_RADIO_ClearBufferFailed "[radio] Clearing buffer failed: %s\n" #define MSGTR_RADIO_StreamEnableCacheFailed "[radio] Call to stream_enable_cache failed: %s\n" #define MSGTR_RADIO_DriverUnknownStr "[radio] Unknown driver name: %s\n" #define MSGTR_RADIO_DriverV4L2 "[radio] Using V4Lv2 radio interface.\n" #define MSGTR_RADIO_DriverV4L "[radio] Using V4Lv1 radio interface.\n" #define MSGTR_RADIO_DriverBSDBT848 "[radio] Using *BSD BT848 radio interface.\n" -#define MSGTR_RADIO_AvailableDrivers "[radio] Available drivers: " //tv.c #define MSGTR_TV_BogusNormParameter "tv.c: norm_from_string(%s): Bogus norm parameter, setting %s.\n" @@ -2035,30 +1990,23 @@ " be ignored! You should try again with YV12 (which is the default\n"\ " colorspace) and read the documentation!\n"\ "==================================================================\n" -#define MSGTR_TV_SelectedNormId "Selected norm id: %d\n" -#define MSGTR_TV_SelectedNorm "Selected norm : %s\n" #define MSGTR_TV_CannotSetNorm "Error: Cannot set norm!\n" #define MSGTR_TV_MJP_WidthHeight " MJP: width %d height %d\n" #define MSGTR_TV_UnableToSetWidth "Unable to set requested width: %d\n" #define MSGTR_TV_UnableToSetHeight "Unable to set requested height: %d\n" #define MSGTR_TV_NoTuner "Selected input hasn't got a tuner!\n" #define MSGTR_TV_UnableFindChanlist "Unable to find selected channel list! (%s)\n" -#define MSGTR_TV_SelectedChanlist "Selected channel list: %s (including %d channels)\n" #define MSGTR_TV_ChannelFreqParamConflict "You can't set frequency and channel simultaneously!\n" #define MSGTR_TV_ChannelNamesDetected "TV channel names detected.\n" #define MSGTR_TV_NoFreqForChannel "Couldn't find frequency for channel %s (%s)\n" #define MSGTR_TV_SelectedChannel3 "Selected channel: %s - %s (freq: %.3f)\n" #define MSGTR_TV_SelectedChannel2 "Selected channel: %s (freq: %.3f)\n" -#define MSGTR_TV_SelectedFrequency "Selected frequency: %lu (%.3f)\n" -#define MSGTR_TV_RequestedChannel "Requested channel: %s\n" #define MSGTR_TV_UnsupportedAudioType "Audio type '%s (%x)' unsupported!\n" -#define MSGTR_TV_AudioFormat " TV audio: %d channels, %d bits, %d Hz\n" #define MSGTR_TV_AvailableDrivers "Available drivers:\n" #define MSGTR_TV_DriverInfo "Selected driver: %s\n name: %s\n author: %s\n comment: %s\n" #define MSGTR_TV_NoSuchDriver "No such driver: %s\n" #define MSGTR_TV_DriverAutoDetectionFailed "TV driver autodetection failed.\n" #define MSGTR_TV_UnknownColorOption "Unknown color option (%d) specified!\n" -#define MSGTR_TV_CurrentFrequency "Current frequency: %lu (%.3f)\n" #define MSGTR_TV_NoTeletext "No teletext" #define MSGTR_TV_Bt848IoctlFailed "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n" #define MSGTR_TV_Bt848InvalidAudioRate "tvi_bsdbt848: Invalid audio rate. Error: %s\n" @@ -2086,14 +2034,7 @@ #define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow: Device #%d not found\n" #define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow: Unable to get name for device #%d\n" #define MSGTR_TVI_DS_UsingDevice "tvi_dshow: Using device #%d: %s\n" -#define MSGTR_TVI_DS_DeviceName "tvi_dshow: Device #%d: %s\n" #define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow: Unable to get frequency directly. OS built-in channels table will be used.\n" -#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow: Unable to set frequency directly. OS built-in channels table will be used.\n" -#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow: supported norms:" -#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow: available video inputs:" -#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow: available audio inputs:" -//following phrase will be printed near the selected audio/video input -#define MSGTR_TVI_DS_InputSelected "(selected)" #define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow: Unable to load frequency table from kstvtune.ax\n" #define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow: Wrong device parameter: %s\n" #define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow: Wrong device index: %d\n" @@ -2105,7 +2046,6 @@ #define MSGTR_TVI_DS_ChangingWidthHeightNotSupported "tvi_dshow: Changing video width/height is not supported by device.\n" #define MSGTR_TVI_DS_SelectingInputNotSupported "tvi_dshow: Selection of capture source is not supported by device\n" -#define MSGTR_TVI_DS_FreqTableLoaded "tvi_dshow: loaded system (%s) frequency table for country id=%d (channels:%d).\n" #define MSGTR_TVI_DS_ErrorParsingAudioFormatStruct "tvi_dshow: Unable to parse audio format structure.\n" #define MSGTR_TVI_DS_ErrorParsingVideoFormatStruct "tvi_dshow: Unable to parse video format structure.\n" #define MSGTR_TVI_DS_UnableSetAudioMode "tvi_dshow: Unable to set audio mode %d. Error:0x%x\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-es.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-es.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-es.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-es.h 2011-12-05 11:38:13.000000000 +0000 @@ -69,7 +69,6 @@ #define MSGTR_NoHomeDir "No se puede encontrar el directorio HOME.\n" #define MSGTR_GetpathProblem "Problema en get_path(\"config\").\n" #define MSGTR_CreatingCfgFile "Creando archivo de configuración: %s.\n" -#define MSGTR_BuiltinCodecsConf "Usando codecs.conf interno por omisión.\n" #define MSGTR_CantLoadFont "No se pudo cargar typografía: %s.\n" #define MSGTR_CantLoadSub "No se pudo cargar subtítulo: %s.\n" #define MSGTR_DumpSelectedStreamMissing "dump: FATAL: No se encuentró el stream seleccionado.\n" @@ -112,8 +111,6 @@ #define MSGTR_Playing "Reproduciendo %s.\n" #define MSGTR_NoSound "Audio: sin sonido.\n" #define MSGTR_FPSforced "FPS forzado a %5.3f (ftime: %5.3f).\n" -#define MSGTR_CompiledWithRuntimeDetection "Compilado con detección de CPU en tiempo de ejecución - esto no es óptimo! Para obtener mejor rendimiento, recompile MPlayer con --disable-runtime-cpudetection.\n" -#define MSGTR_CompiledWithCPUExtensions "Compilado para CPU x86 con extensiones:" #define MSGTR_AvailableVideoOutputDrivers "Controladores de salida de video disponibles:\n" #define MSGTR_AvailableAudioOutputDrivers "Controladores de salida de audio disponibles:\n" #define MSGTR_AvailableAudioCodecs "Codecs de audio disponibles:\n" @@ -121,7 +118,6 @@ #define MSGTR_AvailableAudioFm "Familias/drivers de codecs de audio (compilados dentro de MPlayer) disponibles:\n" #define MSGTR_AvailableVideoFm "Familias/drivers de codecs de video (compilados dentro de MPlayer) disponibles:\n" #define MSGTR_AvailableFsType "Modos disponibles de cambio a pantalla completa:\n" -#define MSGTR_UsingRTCTiming "Usando el RTC timing por hardware de Linux (%ldHz).\n" #define MSGTR_CannotReadVideoProperties "Vídeo: no se puede leer las propiedades.\n" #define MSGTR_NoStreamFound "No se ha encontrado stream.\n" #define MSGTR_ErrorInitializingVODevice "Error abriendo/inicializando el dispositivo de la salida de video (-vo)!\n" @@ -158,14 +154,11 @@ #define MSGTR_AddedSubtitleFile "SUB: se agregó el archivo de subtítulo (%d): %s\n" #define MSGTR_RemovedSubtitleFile "SUB: Archivo de subtítulos borrado (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "Error abriendo archivo [%s] en modo escritura!\n" -#define MSGTR_CommandLine "Linea de Comando:" #define MSGTR_RTCDeviceNotOpenable "Fallo al abrir %s: %s (el usuario debe tener permisos de lectura)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Error iniciando Linux RTC en llamada a ioctl (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Pruebe agregando \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" a los scripts de inicio de su sistema.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Error iniciando Linux RTC en llamada a ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "Usando temporización %s.\n" -#define MSGTR_MenuInitialized "Menú inicializado: %s\n" -#define MSGTR_MenuInitFailed "Fallo en inicialización del menú.\n" #define MSGTR_Getch2InitializedTwice "ADVERTENCIA: getch2_init llamada dos veces!\n" #define MSGTR_DumpstreamFdUnavailable "No puedo volcar este stream - no está disponible 'fd'.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "No puedo abrir filtro de video libmenu con el menú principal %s.\n" @@ -296,12 +289,9 @@ #define MSGTR_CannotAllocateBytes "No se pueden asignar %d bytes\n" #define MSGTR_SettingAudioDelay "Ajustando el RETRASO DEL AUDIO a %5.3f\n" #define MSGTR_SettingVideoDelay "Estableciendo el retardo del vídeo en %5.3fs.\n" -#define MSGTR_SettingAudioInputGain "Ajustando la ganancia de entrada de audio input a %f\n" -#define MSGTR_LamePresetEquals "\npreconfiguración=%s\n\n" #define MSGTR_LimitingAudioPreload "Limitando la pre-carda de audio a 0.4s\n" #define MSGTR_IncreasingAudioDensity "Incrementando la densidad de audio a 4\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Forzando la precarga de audio a 0, corrección pts a 0\n" -#define MSGTR_CBRAudioByterate "\n\naudio CBR: %d bytes/seg, %d bytes/bloque\n" #define MSGTR_LameVersion "Versión de LAME %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Error: La tasa de bits especificada esta fuera de los rangos de valor para esta preconfiguración\n"\ "\n"\ @@ -491,8 +481,6 @@ #define MSGTR_CodecNeedsOutfmt "\n¡codec(%s) necesita un 'outfmt'!\n" #define MSGTR_CantAllocateComment "No puedo asignar memoria para el comentario. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "Leyendo %s: " -#define MSGTR_CantOpenFileError "No puedo abrir '%s': %s\n" #define MSGTR_CantGetMemoryForLine "No puedo asignar memoria para 'line': %s\n" #define MSGTR_CantReallocCodecsp "No puedo reasignar '*codecsp': %s\n" #define MSGTR_CodecNameNotUnique "El nombre del Codec '%s' no es único." @@ -557,7 +545,6 @@ #define MSGTR_Preferences "Preferencias" #define MSGTR_AudioPreferences "Configuración de controlador de Audio" #define MSGTR_NoMediaOpened "no se abrió audio/video" -#define MSGTR_VCDTrack "pista VCD %d" #define MSGTR_NoChapter "sin capítulo" #define MSGTR_Chapter "capítulo %d" #define MSGTR_NoFileLoaded "no se ha cargado ningún archivo" @@ -632,7 +619,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "Navegador de skins" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Salir..." +#define MSGTR_MENU_Exit "Salir" #define MSGTR_MENU_Mute "Mudo" #define MSGTR_MENU_Original "Original" #define MSGTR_MENU_AspectRatio "Relación de aspecto" @@ -690,9 +677,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Activar frame dropping DURO (peligroso)" #define MSGTR_PREFERENCES_Flip "Visualizar imagen al revés" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Timer e indicadores" -#define MSGTR_PREFERENCES_OSDProgress "Sólo barra de progreso" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Timer, porcentaje y tiempo total" #define MSGTR_PREFERENCES_Subtitle "Subtítulo:" #define MSGTR_PREFERENCES_SUB_Delay "Retraso: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" @@ -1095,9 +1079,7 @@ // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "Modo interlaceado requiere que la altura de la imagen sea divisible por 4." #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "No se pudo reservar buffer de línea para el modo interlaceado." -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "Entrada no es RGB, imposible separar crominancia por campos!" #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "El ancho de la imagen debe ser divisible por 2." -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "No hay memoria suficiente para reservar framebuffer RGB." #define MSGTR_VO_YUV4MPEG_OutFileOpenError "Imposible obtener memoria o descriptor de archivos para escribir \"%s\"!" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "Error escribiendo imagen a la salida!" #define MSGTR_VO_YUV4MPEG_UnknownSubDev "Se desconoce el subdevice: %s" @@ -1138,10 +1120,8 @@ // audio_out.c #define MSGTR_AO_ALSA9_1x_Removed "audio_out: los módulos alsa9 y alsa1x fueron eliminados, usa -ao alsa.\n" -#define MSGTR_AO_TryingPreferredAudioDriver "Intentando controlador de audio preferido '%.*s', opciones '%s'\n" #define MSGTR_AO_NoSuchDriver "No existe ese controlador de audio '%.*s'\n" #define MSGTR_AO_FailedInit "Fallo al inicializar controlador de audio '%s'\n" -#define MSGTR_AO_TryingEveryKnown "Intentando con todos los controladores de audio conocidos...\n" // ao_oss.c #define MSGTR_AO_OSS_CantOpenMixer "[AO OSS] audio_setup: Imposible abrir dispositivo mezclador %s: %s\n" @@ -1210,31 +1190,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** Su controlador de audio no soporta select() ***\nRecompile MPlayer con #undef HAVE_AUDIO_SELECT en config.h !\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\nError fatal: *** IMPOSIBLE RE-ABRIR / RESETEAR DISPOSITIVO DE AUDIO (%s) ***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init: formato solicitado: %d Hz, %d canales, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init: No se encontró tarjeta de sonido alguna.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init: formato inválido (%s) solicitado - deshabilitando salida.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init: Fallo en playback open: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init: Error en pcm info: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init: %d tarjeta(s) de sonido encontrada(s), using: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init: Error en la información del canal PCM: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init: Error configurando parámetros: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init: Error configurando canal: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init: Error preparando canal: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit: Error de 'playback drain': %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit: Error de 'playback flush': %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit: Error cerrando pcm: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset: Error de 'playback drain': %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset: Error de 'playback flush': %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset: Error preparando canal: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause: Error de 'playback drain': %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause: Error de 'playback flush': %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume: Error preparando canal: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play: alsa underrun, reseteando stream.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play: Error preparando playback: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play: Error de escritura despues de resetear: %s - me rindo!.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play: Error de salida: %s\n" - // ao_alsa.c #define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] Índice del mezclador inválido. Usando 0.\n" #define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] Mezclador, error abriendo: %s\n" @@ -1318,7 +1273,6 @@ // ========================== INPUT ========================================= // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "Abriendo joystick %s\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "Imposible abrir joystick %s : %s\n" #define MSGTR_INPUT_JOYSTICK_ErrReading "Error leyendo dispositivo joystick : %s\n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "Joystick : perdimos %d bytes de datos\n" @@ -1326,8 +1280,6 @@ #define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "Joystick : Advertencia, tipo de evento desconocido %d\n" // appleir.c -#define MSGTR_INPUT_APPLE_IR_Init "Inicializando Apple IR en %s\n" -#define MSGTR_INPUT_APPLE_IR_Detect "Apple IR detectado en%s\n" #define MSGTR_INPUT_APPLE_IR_CantOpen "Imposible abrir dispositivo Apple IR: %s\n" // input.c @@ -1358,7 +1310,6 @@ #define MSGTR_INPUT_INPUT_ErrCantInitAppleRemote "No se puede inicializar la entrada del Apple Remote.\n" // lirc.c -#define MSGTR_SettingUpLIRC "Configurando soporte para LIRC...\n" #define MSGTR_LIRCopenfailed "Fallo al abrir el soporte para LIRC.\n" #define MSGTR_LIRCcfgerr "Fallo al leer archivo de configuración de LIRC %s.\n" @@ -1373,7 +1324,6 @@ #define MSGTR_WarningLenIsntDivisible "¡Advertencia! ¡La longitud no es divisible por el tamaño del muestreo!\n" #define MSGTR_MuxbufMallocErr "No se puede asignar memoria para el frame buffer del Muxer!\n" #define MSGTR_MuxbufReallocErr "No se puede reasignar memoria para el frame buffer de del Muxer!\n" -#define MSGTR_MuxbufSending "Muxer frame buffer enviando %d frame(s) al muxer.\n" #define MSGTR_WritingHeader "Escribiendo la cabecera...\n" #define MSGTR_WritingTrailer "Escribiendo el índice...\n" @@ -1391,7 +1341,6 @@ #define MSGTR_ON2AviFormat "Formato ON2 AVI" #define MSGTR_Detected_XXX_FileFormat "Detectado formato de archivo %s.\n" #define MSGTR_DetectedAudiofile "Detectado archivo de audio.\n" -#define MSGTR_NotSystemStream "Esto no es formato MPEG System Stream... (tal vez Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Stream MPEG-ES inválido? Contacta con el autor, podría ser un fallo.\n" #define MSGTR_FormatNotRecognized "Este formato no está soportado o reconocido. Si este archivo es un AVI, ASF o MPEG, por favor contacte con el autor.\n" #define MSGTR_SettingProcessPriority "Estableciendo la prioridad del proceso: %s\n" @@ -1414,11 +1363,8 @@ #define MSGTR_MOVcomprhdr "MOV: ¡Soporte de Cabecera comprimida requiere ZLIB!.\n" #define MSGTR_MOVvariableFourCC "MOV: Advertencia. ¡Variable FOURCC detectada!\n" #define MSGTR_MOVtooManyTrk "MOV: Advertencia. ¡Demasiadas pistas!" -#define MSGTR_FoundAudioStream "==> Encontrado stream de audio: %d\n" -#define MSGTR_FoundVideoStream "==> Encontrado stream de vîdeo: %d\n" #define MSGTR_DetectedTV "Detectado TV.\n" #define MSGTR_ErrorOpeningOGGDemuxer "No se puede abrir el demuxer ogg.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Buscando stream de audio (id:%d)\n" #define MSGTR_CannotOpenAudioStream "No se puede abrir stream de audio: %s\n" #define MSGTR_CannotOpenSubtitlesStream "No se puede abrir stream de subtítulos: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "No se pudo abrir el demuxer de audio: %s\n" @@ -1448,17 +1394,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "** Lista vacia?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "Encontré una pelicula en 0x%X - 0x%X\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "Encontré 'bih', %u bytes of %d\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "Regenerado tabla de keyframes para video M$ mpg4v1\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "Regenerando tabla de keyframes para video DIVX3\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "Regenerando tabla de keyframes para video MPEG4\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "Encontre 'wf', %d bytes de %d\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI: dmlh encontrado (size=%d) (total_frames=%d)\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "Leyendo INDEX block, %d chunks para %d frames (fpos=%"PRId64")\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "Cabecera RIFF adicional...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "Advertencia: esta no es una cabecera AVI extendida..\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "Chunk arruinado? chunksize=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI: ODML: Construyendo el índice odml (%d superindexchunks).\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI: ODML: Archivo arruinado (incompleto?) detectado. Utilizaré el índice tradicional.\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "No pude leer el archivo de índice %s: %s\n" @@ -1571,21 +1507,15 @@ #define MSGTR_UsingExternalPP "[PP] Usando filtro de postprocesado externo, max q = %d.\n" #define MSGTR_UsingCodecPP "[PP] Usando postprocesado del codec, max q = %d.\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Atributo de video '%s' no es soportado por -vo y -vd actuales. \n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Familia de codec de video solicitada [%s] (vfm=%s) no está disponible (actívalo al compilar).\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Familia de codec de audio solicitada [%s] (afm=%s) no está disponible (actívalo al compilar).\n" #define MSGTR_OpeningVideoDecoder "Abriendo decodificador de video: [%s] %s.\n" #define MSGTR_SelectedVideoCodec "Video codec seleccionado: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Abriendo decodificador de audio: [%s] %s.\n" #define MSGTR_SelectedAudioCodec "Audio codec seleccionado: [%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "Construyendo cadena de filtros de audio para %dHz/%dch/%s -> %dHz/%dch/%s...\n" -#define MSGTR_UninitVideoStr "uninit video: %s.\n" -#define MSGTR_UninitAudioStr "uninit audio: %s.\n" #define MSGTR_VDecoderInitFailed "Inicialización del VDecoder ha fallado.\n" #define MSGTR_ADecoderInitFailed "Inicialización del ADecoder ha fallado.\n" #define MSGTR_ADecoderPreinitFailed "Preinicialización del ADecoder ha fallado.\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Alocando %d bytes para el búfer de entrada.\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Allocating %d + %d = %d bytes para el búfer de salida.\n" // vf.c #define MSGTR_CouldNotFindVideoFilter "No se pudo encontrar el filtro de video '%s'.\n" @@ -1601,19 +1531,17 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Necesita actualizar/instalar el paquete binario con codecs.\n Dirijase a http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO: Inicialización correcta de codec de video Win32/DShow.\n" -#define MSGTR_DMOInitOK "INFO: Inicialización correcta de codec de video Win32/DMO.\n" // url.c #define MSGTR_MPDEMUX_URL_StringAlreadyEscaped "Al parecer el string ya ha sido escapado en url_scape %c%c1%c2\n" -// ai_alsa1x.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "No puedo setear el samplerate.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "No puedo setear el tiempo del buffer.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "No puedo setear el tiempo del periodo.\n" +// ai_alsa.c +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "No puedo setear el samplerate.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "No puedo setear el tiempo del buffer.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "No puedo setear el tiempo del periodo.\n" -// ai_alsa1x.c / ai_alsa.c +// ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "Configuración erronea para este PCM: no hay configuraciones disponibles.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "Tipo de acceso no disponible.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt "Formato de muestreo no disponible.\n" @@ -1622,9 +1550,7 @@ #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "Imposible usar un periodo igual al tamaño del buffer (%u == %lu).\n" #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "Imposible instalar los parametros de software:\n" #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "Error tratando de abrir el sonido: %s\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "ALSA Error de estado: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun!!! (por lo menos %.3f ms de largo)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "ALSA Status:\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun: error de preparación: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "ALSA Error de lectura/escritura" @@ -1687,7 +1613,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "Tipo de ASF stream desconocido.\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "No pude procesar la respuesta HTTP\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "El servidor retornó %d:%s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP PARSE WARNING : Pragma %s cortado desde %zd bytes a %d\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP PARSE WARNING : Pragma %s cortado desde %zu bytes a %zu\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "Error escribiendo en el socket : %s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "Imposible procesar la cabecera.\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "No encontre ningún stream.\n" @@ -1899,17 +1825,13 @@ // stream/stream_radio.c #define MSGTR_RADIO_ChannelNamesDetected "[radio] Nombre de canales de radio detectados.\n" -#define MSGTR_RADIO_FreqRange "[radio] El rango de frecuencias permitidas es %.2f-%.2f MHz.\n" #define MSGTR_RADIO_WrongFreqForChannel "[radio] Frecuencia erronea para canal %s\n" #define MSGTR_RADIO_WrongChannelNumberFloat "[radio] Número de canal erroneo: %.2f\n" #define MSGTR_RADIO_WrongChannelNumberInt "[radio] Número de canal erroneo: %d\n" #define MSGTR_RADIO_WrongChannelName "[radio] Nombre de canal erroneo: %s\n" #define MSGTR_RADIO_FreqParameterDetected "[radio] Parametro de frequencia de radio detectado.\n" -#define MSGTR_RADIO_DoneParsingChannels "[radio] Completado el parsing de los canales.\n" #define MSGTR_RADIO_GetTunerFailed "[radio] Advertencia: ioctl get tuner failed: %s. Setting frac to %d.\n" #define MSGTR_RADIO_NotRadioDevice "[radio] %s no es un dispositivo de radio!\n" -#define MSGTR_RADIO_TunerCapLowYes "[radio] tuner is low:yes frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[radio] tuner is low:no frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[radio] ioctl set frequency 0x%x (%.2f) fallido: %s\n" #define MSGTR_RADIO_GetFreqFailed "[radio] ioctl get frequency fallido: %s\n" #define MSGTR_RADIO_SetMuteFailed "[radio] ioctl set mute fallido: %s\n" @@ -1919,27 +1841,22 @@ #define MSGTR_RADIO_DroppingFrame "\n[radio] Muy malo - desechando frame de audio(%d bytes)!\n" #define MSGTR_RADIO_BufferEmpty "[radio] grab_audio_frame: buffer vacio, esperando por %d bytes de datos.\n" #define MSGTR_RADIO_AudioInitFailed "[radio] audio_in_init fallido: %s\n" -#define MSGTR_RADIO_AudioBuffer "[radio] Captura de audio - buffer=%d bytes (bloque=%d bytes).\n" #define MSGTR_RADIO_AllocateBufferFailed "[radio] Imposible reservar buffer de audio (bloque=%d,buf=%d): %s\n" #define MSGTR_RADIO_CurrentFreq "[radio] Frecuencia actual: %.2f\n" #define MSGTR_RADIO_SelectedChannel "[radio] Canal seleccionado: %d - %s (freq: %.2f)\n" #define MSGTR_RADIO_ChangeChannelNoChannelList "[radio] No puedo cambiar canal, no se ha entregado una lista de canales.\n" #define MSGTR_RADIO_UnableOpenDevice "[radio] Imposible abrir '%s': %s\n" -#define MSGTR_RADIO_RadioDevice "[radio] Radio fd: %d, %s\n" #define MSGTR_RADIO_InitFracFailed "[radio] init_frac fallido.\n" #define MSGTR_RADIO_WrongFreq "[radio] Frecuencia erronea: %.2f\n" #define MSGTR_RADIO_UsingFreq "[radio] Utilizando frecuencia: %.2f.\n" #define MSGTR_RADIO_AudioInInitFailed "[radio] audio_in_init fallido.\n" -#define MSGTR_RADIO_BufferString "[radio] %s: in buffer=%d dropped=%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[radio] audio_in_setup llamada fallida: %s\n" -#define MSGTR_RADIO_CaptureStarting "[radio] Empezando con la captura.\n" #define MSGTR_RADIO_ClearBufferFailed "[radio] Fallo al limpiar el buffer: %s\n" #define MSGTR_RADIO_StreamEnableCacheFailed "[radio] Llamada fallida a stream_enable_cache: %s\n" #define MSGTR_RADIO_DriverUnknownStr "[radio] Nombre de driver desconocido: %s\n" #define MSGTR_RADIO_DriverV4L2 "[radio] Utilizando interfaz de radio V4Lv2.\n" #define MSGTR_RADIO_DriverV4L "[radio] Utilizando interfaz de radio V4Lv1.\n" #define MSGTR_RADIO_DriverBSDBT848 "[radio] Usando la interfaz de radio *BSD BT848.\n" -#define MSGTR_RADIO_AvailableDrivers "[radio] Drivers disponibles: " //tv.c #define MSGTR_TV_BogusNormParameter "tv.c: norm_from_string(%s): Parametro de normal inválido al configurar %s.\n" @@ -1952,30 +1869,23 @@ " se cayera! Los Bug reports serán ignorados! Intentelo nuevamente\n"\ " con YV12 (el colorspace por omisión) y leer la documentación. \n"\ "==================================================================\n" -#define MSGTR_TV_SelectedNormId "Id norma seleccionada: %d\n" -#define MSGTR_TV_SelectedNorm "Norma seleccionada : %s\n" #define MSGTR_TV_CannotSetNorm "Error: No puedo configurar la norma!\n" #define MSGTR_TV_MJP_WidthHeight " MJP: ancho %d alto %d\n" #define MSGTR_TV_UnableToSetWidth "Imposible configurar ancho requerido: %d\n" #define MSGTR_TV_UnableToSetHeight "Imposible configurar alto requerido: %d\n" #define MSGTR_TV_NoTuner "No hay un sintonizador en la entrada seleccionada!\n" #define MSGTR_TV_UnableFindChanlist "Imposible encontrar lista de canales seleccionada! (%s)\n" -#define MSGTR_TV_SelectedChanlist "Lista de canales seleccionada: %s (incluyendo %d canales)\n" #define MSGTR_TV_ChannelFreqParamConflict "No puede configurar simultaneamente frecuencia y canal!\n" #define MSGTR_TV_ChannelNamesDetected "Nombres de canales de TV detectados.\n" #define MSGTR_TV_NoFreqForChannel "Imposible encontrar frecuencia para el canal %s (%s)\n" #define MSGTR_TV_SelectedChannel3 "Canal seleccionado: %s - %s (freq: %.3f)\n" #define MSGTR_TV_SelectedChannel2 "Canal seleccionado: %s (freq: %.3f)\n" -#define MSGTR_TV_SelectedFrequency "Frecuencia seleccionada: %lu (%.3f)\n" -#define MSGTR_TV_RequestedChannel "Canal requerido: %s\n" #define MSGTR_TV_UnsupportedAudioType "Tipo de audio '%s (%x)' no soportado!\n" -#define MSGTR_TV_AudioFormat " Audio TV: %d canales, %d bits, %d Hz\n" #define MSGTR_TV_AvailableDrivers "Drivers disponibles:\n" #define MSGTR_TV_DriverInfo "Driver seleccionado: %s\n nombre: %s\n autor: %s\n comentario: %s\n" #define MSGTR_TV_NoSuchDriver "Ese driver no existe: %s\n" #define MSGTR_TV_DriverAutoDetectionFailed "Falló la utodetección del driver de TV.\n" #define MSGTR_TV_UnknownColorOption "Se especificó una opción de color desconodida (%d)!\n" -#define MSGTR_TV_CurrentFrequency "Frecuencia actual: %lu (%.3f)\n" #define MSGTR_TV_NoTeletext "Sin teletexto" #define MSGTR_TV_Bt848IoctlFailed "tvi_bsdbt848: llamada a %s ioctl fallida. Error: %s\n" #define MSGTR_TV_Bt848InvalidAudioRate "tvi_bsdbt848: Audio rate inválido. Error: %s\n" @@ -2003,14 +1913,8 @@ #define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow: No se encontró el dispositivo #%d\n" #define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow: Imposible obtener nombre para dispositivo #%d\n" #define MSGTR_TVI_DS_UsingDevice "tvi_dshow: Utilizando dispositivo #%d: %s\n" -#define MSGTR_TVI_DS_DeviceName "tvi_dshow: Dispositivo #%d: %s\n" #define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow: Imposible obtener la frecuencia directamente. Se utilizará la tabla de canales incluída con el OS.\n" -#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow: Imposible configurar directamente la frecuencia. Se utilizará la tabla de canales incluída con el OS.\n" -#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow: normas soportadas:" -#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow: entradas de video disponibles:" -#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow: entradas de audio disponibles:" //following phrase will be printed near the selected audio/video input -#define MSGTR_TVI_DS_InputSelected "(seleccionado)" #define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow: Imposible cargar tabla de frecuencias desde kstvtune.ax\n" #define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow: Parametro de dispositivo inválido: %s\n" #define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow: Indice de dispositivo inválido: %d\n" @@ -2020,7 +1924,6 @@ #define MSGTR_TVI_DS_VideoAdjustigNotSupported "tvi_dshow: El dispositivo no soporta el ajuste de brillo/hue/saturación/contraste\n" #define MSGTR_TVI_DS_ChangingWidthHeightNotSupported "tvi_dshow: El dispositivo no soporta cambios de ancho/largo.\n" #define MSGTR_TVI_DS_SelectingInputNotSupported "tvi_dshow: El dispositivo no soporta la selección de la fuente de captura\n" -#define MSGTR_TVI_DS_FreqTableLoaded "tvi_dshow: Sistema cargado (%s) tabla de frecuencias para país id=%d (canales:%d).\n" #define MSGTR_TVI_DS_ErrorParsingAudioFormatStruct "tvi_dshow: Imposible procesar la estructura del formato de audio.\n" #define MSGTR_TVI_DS_ErrorParsingVideoFormatStruct "tvi_dshow: Imposible procesar la estructura del formato de video.\n" #define MSGTR_TVI_DS_UnableSetAudioMode "tvi_dshow: Imposible seleccionar modo de audio %d. Error:0x%x\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-fr.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-fr.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-fr.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-fr.h 2011-12-05 11:38:13.000000000 +0000 @@ -62,7 +62,6 @@ #define MSGTR_NoHomeDir "Impossible de trouver le répertoire HOME.\n" #define MSGTR_GetpathProblem "Problème get_path(\"config\")\n" #define MSGTR_CreatingCfgFile "Création du fichier config : %s\n" -#define MSGTR_BuiltinCodecsConf "Utilisation du codecs.conf intégré par défaut\n" #define MSGTR_CantLoadFont "Ne peut charger la police : %s\n" #define MSGTR_CantLoadSub "Ne peut charger les sous-titres : %s\n" #define MSGTR_DumpSelectedStreamMissing "Vidage de la mémoire (dump) : FATAL : flux sélectionné manquant !\n" @@ -106,8 +105,6 @@ #define MSGTR_Playing "Lecture de %s\n" #define MSGTR_NoSound "Audio : pas de son\n" #define MSGTR_FPSforced "FPS forcé à %5.3f (ftime : %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "Compilé avec détection du CPU à l'exécution." -#define MSGTR_CompiledWithCPUExtensions "Compilé pour CPU x86 avec les extensions:" #define MSGTR_AvailableVideoOutputDrivers "Pilotes de sortie vidéo disponibles :\n" #define MSGTR_AvailableAudioOutputDrivers "Pilotes de sortie audio disponibles :\n" #define MSGTR_AvailableAudioCodecs "Codecs audio disponibles :\n" @@ -115,7 +112,6 @@ #define MSGTR_AvailableAudioFm "Familles/pilotes de codecs audio disponibles (inclus à la compilation) :\n" #define MSGTR_AvailableVideoFm "Familles/pilotes de codecs vidéo disponibles (inclus à la compilation) :\n" #define MSGTR_AvailableFsType "Modes de changement de couches plein écran disponibles :\n" -#define MSGTR_UsingRTCTiming "Utilisation de la synchronisation matérielle par RTC (%ldHz)\n" #define MSGTR_CannotReadVideoProperties "Vidéo : impossible de lire les propriétés\n" #define MSGTR_NoStreamFound "Aucun flux trouvé.\n" #define MSGTR_ErrorInitializingVODevice "Erreur à l'ouverture/initialisation de la sortie vidéo choisie (-vo).\n" @@ -149,14 +145,11 @@ #define MSGTR_AddedSubtitleFile "SUB : fichier sous-titres ajouté (%d): %s\n" #define MSGTR_RemovedSubtitleFile "SUB : fichier sous-titres enlevé (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "Erreur d'ouverture du fichier [%s] en écriture !\n" -#define MSGTR_CommandLine "Ligne de commande :" #define MSGTR_RTCDeviceNotOpenable "Échec à l'ouverture de %s : %s (devrait être lisible par l'utilisateur.)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Erreur init RTC Linux dans ioctl (rtc_irqp_set %lu) : %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Essayer ajout \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" au script de démarrage de votre système.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Erreur init RTC Linux dans ioctl (rtc_pie_on) : %s\n" #define MSGTR_UsingTimingType "Utilisation de minuterie %s.\n" -#define MSGTR_MenuInitialized "Menu initialisé : %s\n" -#define MSGTR_MenuInitFailed "Échec d'initialisation du menu.\n" #define MSGTR_Getch2InitializedTwice "ATTENTION : getch2_init appelé deux fois !\n" #define MSGTR_DumpstreamFdUnavailable "Impossible de vider ce flux - Aucun descripteur de fichier disponible.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Impossible d'ouvrir filtre vidéo libmenu avec menu root %s.\n" @@ -285,12 +278,9 @@ #define MSGTR_CannotAllocateBytes "N'a pu allouer %d octets\n" #define MSGTR_SettingAudioDelay "Réglage du délai audio à %5.3fs\n" #define MSGTR_SettingVideoDelay "Réglage du délai vidéo à %5.3fs\n" -#define MSGTR_SettingAudioInputGain "Réglage du gain audio en entrée à %f\n" -#define MSGTR_LamePresetEquals "\npré-réglages=%s\n\n" #define MSGTR_LimitingAudioPreload "Limitation du préchargement audio à 0.4s\n" #define MSGTR_IncreasingAudioDensity "Augmentation de la densité audio à 4\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Forçage du pré-chargement audio à 0 et de la correction max des pts à 0\n" -#define MSGTR_CBRAudioByterate "\n\nAudio CBR : %d octets/s, %d octets/bloc\n" #define MSGTR_LameVersion "LAME version %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Erreur : le bitrate spécifié est hors de l'intervalle valide pour ce pré-réglage\n"\ "\n"\ @@ -477,8 +467,6 @@ #define MSGTR_CodecNeedsOutfmt "\nLe codec (%s) requiert un 'outfmt' !\n" #define MSGTR_CantAllocateComment "Ne peux allouer de mémoire pour le commentaire. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN !" -#define MSGTR_ReadingFile "Lecture de %s: " -#define MSGTR_CantOpenFileError "Ne peux ouvrir '%s' : %s\n" #define MSGTR_CantGetMemoryForLine "Ne peux allouer de mémoire pour 'line' : %s\n" #define MSGTR_CantReallocCodecsp "Ne peux pas effectuer de realloc() pour '*codecsp' : %s\n" #define MSGTR_CodecNameNotUnique "Le nom du codec '%s' n'est pas unique." @@ -568,7 +556,6 @@ #define MSGTR_WarningLenIsntDivisible "Attention ! la longueur 'len' n'est pas divisible par la taille de l'échantillon (!\n" #define MSGTR_MuxbufMallocErr "Tampon d'image Muxeur ne peut allouer de la mémoire !\n" #define MSGTR_MuxbufReallocErr "Tampon d'image Muxeur ne peut réallouer de la mémoire !\n" -#define MSGTR_MuxbufSending "Tampon d'image Muxeur envoie %d image(s) au muxeur.\n" #define MSGTR_WritingHeader "Écriture de l'entête...\n" #define MSGTR_WritingTrailer "Écriture de l'index...\n" @@ -586,7 +573,6 @@ #define MSGTR_ON2AviFormat "Format ON2 AVI" #define MSGTR_Detected_XXX_FileFormat "Fichier de type %s détecté.\n" #define MSGTR_DetectedAudiofile "Fichier audio détecté.\n" -#define MSGTR_NotSystemStream "Pas un flux de type MPEG System... (peut-être un Flux de Transport ?)\n" #define MSGTR_InvalidMPEGES "Flux MPEG-ES invalide ??? Contactez l'auteur, c'est peut-être un bogue :(\n" #define MSGTR_FormatNotRecognized "========== Désolé, ce format de fichier n'est pas reconnu/supporté ============\n"\ "== Si ce fichier est un flux AVI, ASF ou MPEG, merci de contacter l'auteur ! ==\n" @@ -611,11 +597,8 @@ #define MSGTR_MOVcomprhdr "MOV : Le support d'entêtes compressées nécessite ZLIB !\n" #define MSGTR_MOVvariableFourCC "MOV : ATTENTION : FOURCC Variable détecté !?\n" #define MSGTR_MOVtooManyTrk "MOV : ATTENTION : Trop de pistes" -#define MSGTR_FoundAudioStream "==> Flux audio trouvé : %d\n" -#define MSGTR_FoundVideoStream "==> Flux vidéo trouvé : %d\n" #define MSGTR_DetectedTV "TV détectée ! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Impossible d'ouvrir le demuxer Ogg\n" -#define MSGTR_ASFSearchingForAudioStream "ASF : recherche du flux audio (id:%d)\n" #define MSGTR_CannotOpenAudioStream "Impossible d'ouvrir le flux audio : %s\n" #define MSGTR_CannotOpenSubtitlesStream "Impossible d'ouvrir le flux des sous-titres : %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Echec à l'ouverture du demuxer audio : %s\n" @@ -655,24 +638,17 @@ #define MSGTR_UsingExternalPP "[PP] Utilisation de filtres de postprocessing externes, max q = %d\n" #define MSGTR_UsingCodecPP "[PP] Utilisation du postprocessing du codec, max q = %d\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "L'attribut vidéo '%s' n'est pas supporté par ce vo & ce vd. \n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Famille de codecs vidéo demandée [%s] (vfm=%s) non disponible (activez-la à la compilation)\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Famille de codecs audio demandée [%s] (afm=%s) non disponible (activez-la à la compilation)\n" #define MSGTR_OpeningVideoDecoder "Ouverture du décodeur vidéo : [%s] %s\n" #define MSGTR_SelectedVideoCodec "Codec vidéo choisi : [%s] vfm : %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Ouverture décodeur audio : [%s] %s\n" #define MSGTR_SelectedAudioCodec "Codec audio sélectionné : [%s] afm : %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "Création chaine filtre audio pour %dHz/%dch/%s -> %dHz/%dch/%s...\n" -#define MSGTR_UninitVideoStr "Désinitialisation vidéo : %s \n" -#define MSGTR_UninitAudioStr "Désinitialisation audio : %s \n" #define MSGTR_VDecoderInitFailed "Echec de l'initialisation de VDecoder :(\n" #define MSGTR_ADecoderInitFailed "Echec de l'initialisation de ADecoder :(\n" #define MSGTR_ADecoderPreinitFailed "Echec de la pré-initialisation de l'ADecoder :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: allocation de %d octets comme tampon d'entrée\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio : allocation %d + %d = %d octets comme tampon de sortie\n" // LIRC: -#define MSGTR_SettingUpLIRC "Mise en place du support LIRC...\n" #define MSGTR_LIRCopenfailed "Impossible d'activer le support LIRC.\n" #define MSGTR_LIRCcfgerr "Impossible de lire le fichier de config de LIRC %s.\n" @@ -689,8 +665,6 @@ #define MSGTR_MovieAspectUndefined "L'aspect du film est indéfini - pas de pré-dimensionnement appliqué.\n" // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Vous devez mettre à jour/installer le package contenant les codecs binaires.\nAllez sur http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO : initialisation réussie du codec vidéo Win32/DShow.\n" -#define MSGTR_DMOInitOK "INFO : initialisation réussie du codec vidéo Win32/DMO.\n" // x11_common.c #define MSGTR_EwmhFullscreenStateFailed "\nX11 : n'a pas pu envoyer l'événement EWMH pour passer en plein écran !\n" @@ -720,7 +694,6 @@ #define MSGTR_Preferences "Préférences" #define MSGTR_AudioPreferences "Configuration de pilote Audio" #define MSGTR_NoMediaOpened "Aucun média ouvert" -#define MSGTR_VCDTrack "Piste du VCD %d" #define MSGTR_NoChapter "Aucun chapitre" #define MSGTR_Chapter "Chapitre %d" #define MSGTR_NoFileLoaded "Aucun fichier chargé" @@ -795,7 +768,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "Navigateur de peaux" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Quitter..." +#define MSGTR_MENU_Exit "Quitter" #define MSGTR_MENU_Mute "Silence" #define MSGTR_MENU_Original "Original" #define MSGTR_MENU_AspectRatio "rapport hauteur/largeur" @@ -854,9 +827,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Activer saut DUR d'images (dangereux)" #define MSGTR_PREFERENCES_Flip "Mirroir vertical" #define MSGTR_PREFERENCES_Panscan "Recadrage : " -#define MSGTR_PREFERENCES_OSDTimer "Minuteur et indicateurs" -#define MSGTR_PREFERENCES_OSDProgress "Barres de progression seulement" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Minuteur, pourcentage et temps total" #define MSGTR_PREFERENCES_Subtitle "Sous-titre :" #define MSGTR_PREFERENCES_SUB_Delay "Décalage : " #define MSGTR_PREFERENCES_SUB_FPS "FPS :" @@ -1024,9 +994,7 @@ // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "Mode entrelacé requiert hauteur d'image divisible par 4." #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "Impossible d'allouer tampon de ligne pour mode entrelacé." -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "Entré non RGB, impossible décomposer chrominance !" #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "Largeur d'image doit être divisible par 2." -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "Mémoire insuffisante pour allouer tampon d'image RGB." #define MSGTR_VO_YUV4MPEG_OutFileOpenError "Impossible d'obtenir ident. de fichier ou mémoire pour écriture \"%s\" !" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "Erreur d'écriture d'image vers sortie !" #define MSGTR_VO_YUV4MPEG_UnknownSubDev "Sous-périphérique inconnu : %s" @@ -1134,31 +1102,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** Votre pilote audio ne supporte PAS select() ***\nRecompiler MPlayer avec #undef HAVE_AUDIO_SELECT dans config.h !\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\nÉrreur fatale : *** IMPOSSIBLE DE RÉOUVRIR/REPARTIR PÉRIPHÉRIQUE AUDIO (%s) ***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init : format requis : %d Hz, %d canaux, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init : aucune carte son trouvée.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init : format invalide (%s) requis - sortie désactivée.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init : erreur ouverture lecture : %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init : erreur pcm info : %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init : %d carte(s) son trouvée(s), utilise : %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init : erreur info canal pcm : %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init : erreur parametrage : %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init : erreur ouverture canal : %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init : erreur préparation canal : %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit : erreur drain de lecture : %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit : erreur vidage de lecture : %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit : erreur fermeture pcm : %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset : erreur drain de lecture : %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset : erreur vidage de lecture : %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset : erreur préparation canal : %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause : erreur drain de lecture : %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause : erreur vidage de lecture : %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume : erreur préparation canal : %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play : sous-passement alsa, réinit flux.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play : erreur préparation lecture : %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play : erreur écriture après réinit : %s - abandon.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play : erreur de sortie : %s\n" - // ao_alsa.c #define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] Index du mixeur invalide. Défaut à 0.\n" #define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] Erreur ouverture mixeur : %s\n" @@ -1245,7 +1188,6 @@ // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "Ouverture périphérique manette de jeux %s\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "Impossible d'ouvrir périphérique manette de jeux %s : %s\n" #define MSGTR_INPUT_JOYSTICK_ErrReading "Erreur lecture périphérique manette de jeux : %s\n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "Manette de jeux : perdons %d bytes de données\n" @@ -1254,8 +1196,6 @@ // appleir.c -#define MSGTR_INPUT_APPLE_IR_Init "Initialisation de l'interface IR Apple sur %s\n" -#define MSGTR_INPUT_APPLE_IR_Detect "Interface IR Apple détectée sur %s\n" #define MSGTR_INPUT_APPLE_IR_CantOpen "Impossible d'ouvrir l'interface IR Apple : %s\n" // input.c @@ -1292,13 +1232,13 @@ #define MSGTR_MPDEMUX_URL_StringAlreadyEscaped "La chaîne semble déjà échappée dans url_escape %c%c1%c2\n" -// ai_alsa1x.c +// ai_alsa.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "Impossible de régler taux échantillon\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "Impossible de régler heure tampon\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "Impossible de régler heure période\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "Impossible de régler taux échantillon\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "Impossible de régler heure tampon\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "Impossible de régler heure période\n" -// ai_alsa1x.c / ai_alsa.c +// ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "Configuration brisée pour ce PCM : aucune configuration disponible\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "Type d'accès non disponible\n" @@ -1308,9 +1248,7 @@ #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "Impossible d'utiliser période égale à grandeur tampon (%u == %lu)\n" #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "Impossible d'installer les paramètres logiciels :n" #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "Erreur ouverture audio : %s\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "Erreur statut ALSA : %s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun !!! (au moins %.3f ms long)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "Statut ALSA :\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun: erreur préparation : %s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "Erreur lecture/écriture ALSA" @@ -1385,7 +1323,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "Genre de flux asf inconnu\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "Échec analyse réponse HTTP\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "Retour de serveur %d:%s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ALERTE ANALYSE ASF HTTP : Pragma %s coupé de %zd octets à %d\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ALERTE ANALYSE ASF HTTP : Pragma %s coupé de %zu octets à %zu\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "Erreur lecture interface (socket) : %s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "Échec analyse entête\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "Aucun flux trouvé\n" @@ -1403,17 +1341,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "** Liste vide ?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "Film trouvé à 0x%X - 0x%X\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "'BIH' trouvé, %u octets de %d\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "Regeneration de table image clé pour vidéo M$ mpg4v1\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "Regeneration de table image clé pour DIVX3 video\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "Regeneration de table image clé pour MPEG4 video\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "'WF' trouvé, %d octets de %d\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI : dmlh trouvé (grandeur=%d) (total images=%d)\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "Lecture morceau INDEX, %d morceaux pour %d images (fpos=%"PRId64")\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "Entête RIFF additionnel...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** alerte : aucun entête AVI étendu...\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "Morceau brisé ? Grandeur morceau=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI : ODML : Construction index odml (%d super moreaux index)\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI : ODML : Fichier brisé (incomplet ?) détecté. Utilise index traditionnel\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "Impossible de lire fichier index %s : %s\n" @@ -1923,17 +1851,13 @@ // stream/stream_radio.c #define MSGTR_RADIO_ChannelNamesDetected "[radio] Noms de canal radio detectés.\n" -#define MSGTR_RADIO_FreqRange "[radio] La plage de fréquence permise est %.2f-%.2f MHz.\n" #define MSGTR_RADIO_WrongFreqForChannel "[radio] Mauvaise fréquence pour canal %s\n" #define MSGTR_RADIO_WrongChannelNumberFloat "[radio] Mauvais n° de canal : %.2f\n" #define MSGTR_RADIO_WrongChannelNumberInt "[radio] Mauvais n° de canal : %d\n" #define MSGTR_RADIO_WrongChannelName "[radio] Mauvais nom de canal : %s\n" #define MSGTR_RADIO_FreqParameterDetected "[radio] Paramètre de fréquence radio detecté.\n" -#define MSGTR_RADIO_DoneParsingChannels "[radio] Analyse des canaux effectuée.\n" #define MSGTR_RADIO_GetTunerFailed "[radio] Attention : ioctl, échec de tuner : %s. Ajustement de frac à %d.\n" #define MSGTR_RADIO_NotRadioDevice "[radio] %s : pas de périphérique radio !\n" -#define MSGTR_RADIO_TunerCapLowYes "[radio] Tuner est bas : oui frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[radio] tuner est bas : non frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[radio] Echec ioctl fixe la fréquence 0x%x (%.2f) : %s\n" #define MSGTR_RADIO_GetFreqFailed "[radio] Echec ioctl récupère fréquence : %s\n" #define MSGTR_RADIO_SetMuteFailed "[radio] Echec ioctl mise en muet : %s\n" @@ -1943,27 +1867,22 @@ #define MSGTR_RADIO_DroppingFrame "\n[radio] Dommage - perte de frame audio (%d bytes) !\n" #define MSGTR_RADIO_BufferEmpty "[radio] grab_audio_frame : tampon vide, attente de %d bytes de données.\n" #define MSGTR_RADIO_AudioInitFailed "[radio] Echec audio_in_init : %s\n" -#define MSGTR_RADIO_AudioBuffer "[radio] Capture audio - tampon=%d bytes (bloc=%d bytes).\n" #define MSGTR_RADIO_AllocateBufferFailed "[radio] Ne peux allouer de tampon audio (bloc=%d,buf=%d) : %s\n" #define MSGTR_RADIO_CurrentFreq "[radio] Fréquence actuelle : %.2f\n" #define MSGTR_RADIO_SelectedChannel "[radio] Canal sélectionné : %d - %s (fréq : %.2f)\n" #define MSGTR_RADIO_ChangeChannelNoChannelList "[radio] Ne peux changer de canal : Aucune liste de canals donnée.\n" #define MSGTR_RADIO_UnableOpenDevice "[radio] Impossible d'ouvrir '%s': %s\n" -#define MSGTR_RADIO_RadioDevice "[radio] Radio fd : %d, %s\n" #define MSGTR_RADIO_InitFracFailed "[radio] Echec init_frac.\n" #define MSGTR_RADIO_WrongFreq "[radio] Mauvaise fréquence : %.2f\n" #define MSGTR_RADIO_UsingFreq "[radio] Utilise fréquence : %.2f.\n" #define MSGTR_RADIO_AudioInInitFailed "[radio] Echec audio_in_init.\n" -#define MSGTR_RADIO_BufferString "[radio] %s : en tampon=%d perdu=%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[radio] Echec appel audio_in_setup : %s\n" -#define MSGTR_RADIO_CaptureStarting "[radio] Début de la capture.\n" #define MSGTR_RADIO_ClearBufferFailed "[radio] Echec effacement du tampon : %s\n" #define MSGTR_RADIO_StreamEnableCacheFailed "[radio] Echec appel stream_enable_cache : %s\n" #define MSGTR_RADIO_DriverUnknownStr "[radio] Nom de pilote inconnu : %s\n" #define MSGTR_RADIO_DriverV4L2 "[radio] Utilise interface radio V4Lv2.\n" #define MSGTR_RADIO_DriverV4L "[radio] Utilise interface radio V4Lv1.\n" #define MSGTR_RADIO_DriverBSDBT848 "[radio] Utilisation de l'interface radio *BSD BT848.\n" -#define MSGTR_RADIO_AvailableDrivers "[radio] Drivers disponibles : " // ================================== LIBASS ==================================== @@ -2039,30 +1958,23 @@ " de bugs seront ignorés ! Vous devriez réessayer avec YV12 (l'espace \n"\ " de couleur par défaut) et lire la documentation !\n"\ "==================================================================\n" -#define MSGTR_TV_SelectedNormId "Identifiant de norme sélectionné: %d\n" -#define MSGTR_TV_SelectedNorm "Norme sélectionnée : %s\n" #define MSGTR_TV_CannotSetNorm "Erreur : La norme ne peut pas être appliquée !\n" #define MSGTR_TV_MJP_WidthHeight " MJP: largeur %d hauteur %d\n" #define MSGTR_TV_UnableToSetWidth "Impossible d'appliquer la largeur requise : %d\n" #define MSGTR_TV_UnableToSetHeight "Impossible d'appliquer la hauteur requise : %d\n" #define MSGTR_TV_NoTuner "L'entrée sélectionnée n'a pas de tuner !\n" #define MSGTR_TV_UnableFindChanlist "Impossible de trouver la liste des canaux sélectionnés ! (%s)\n" -#define MSGTR_TV_SelectedChanlist "Liste des canaux sélectionnés: %s (contenant %d canaux)\n" #define MSGTR_TV_ChannelFreqParamConflict "Il n'est pas possible de régler la fréquence et le canal simultanément !\n" #define MSGTR_TV_ChannelNamesDetected "Noms des chaînes TV détectées.\n" #define MSGTR_TV_NoFreqForChannel "Imposible de trouver la fréquence du canal %s (%s)\n" #define MSGTR_TV_SelectedChannel3 "Canal sélectionné : %s - %s (fréq: %.3f)\n" #define MSGTR_TV_SelectedChannel2 "Canal sélectionné : %s (fréq: %.3f)\n" -#define MSGTR_TV_SelectedFrequency "Fréquence sélectionnée : %lu (%.3f)\n" -#define MSGTR_TV_RequestedChannel "Canal choisi: %s\n" #define MSGTR_TV_UnsupportedAudioType "Format audio '%s (%x)' non-supporté !\n" -#define MSGTR_TV_AudioFormat " TV audio: %d canaux, %d bits, %d Hz\n" #define MSGTR_TV_AvailableDrivers "Drivers disponibles:\n" #define MSGTR_TV_DriverInfo "Driver sélectionné: %s\n nom : %s\n auteur : %s\n commentaire : %s\n" #define MSGTR_TV_NoSuchDriver "Driver inexistant : %s\n" #define MSGTR_TV_DriverAutoDetectionFailed "La détection auto du driver TV a échouée.\n" #define MSGTR_TV_UnknownColorOption "Option couleur choisie inconnue (%d) !\n" -#define MSGTR_TV_CurrentFrequency "Fréquence actuelle : %lu (%.3f)\n" #define MSGTR_TV_NoTeletext "Télétexte absent" #define MSGTR_TV_Bt848IoctlFailed "tvi_bsdbt848: L'appel à %s ioctl a échoué. Erreur : %s\n" #define MSGTR_TV_Bt848InvalidAudioRate "tvi_bsdbt848: Taux d'échantillonage audio invalide. Erreur : %s\n" @@ -2089,14 +2001,8 @@ #define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow: Périphérique #%d non trouvé\n" #define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow: Impossible de trouver un nom pour le périphérique #%d\n" #define MSGTR_TVI_DS_UsingDevice "tvi_dshow: Utilise le périphérique #%d: %s\n" -#define MSGTR_TVI_DS_DeviceName "tvi_dshow: Périphérique #%d: %s\n" #define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow: Impossible d'obtenir la fréquence directement. La table des canaux incluse à l'OS sera utilisée.\n" -#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow: Impossible de fixer la fréquence directement. La table des canaux incluse à l'OS sera utilisée.\n" -#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow: normes supportées :" -#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow: Entrées vidéo disponibles :" -#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow: Entrées audio disponibles :" //following phrase will be printed near the selected audio/video input -#define MSGTR_TVI_DS_InputSelected "(sélectionnée)" #define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow: Impossible de lire la table des fréquence depuis kstvtune.ax\n" #define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow: Mauvais paramêtre de périphérique : %s\n" #define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow: Mauvais index de périphérique: %d\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-hu.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-hu.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-hu.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-hu.h 2011-12-05 11:38:13.000000000 +0000 @@ -60,7 +60,6 @@ #define MSGTR_NoHomeDir "Nem találom a HOME könyvtárat.\n" #define MSGTR_GetpathProblem "get_path(\"config\") probléma\n" #define MSGTR_CreatingCfgFile "Konfigurációs fájl létrehozása: %s\n" -#define MSGTR_BuiltinCodecsConf "Befordított codecs.conf használata.\n" #define MSGTR_CantLoadFont "Nem tudom betölteni a következő bittérképes betűt: %s\n" #define MSGTR_CantLoadSub "Nem tudom betölteni a feliratot: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: VÉGZETES HIBA: a kért stream nem található!\n" @@ -104,8 +103,6 @@ #define MSGTR_Playing "\n%s lejátszása.\n" #define MSGTR_NoSound "Audio: nincs hang!!!\n" #define MSGTR_FPSforced "FPS kényszerítve %5.3f (ftime: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "Futásidejű CPU detektálás használata.\n" -#define MSGTR_CompiledWithCPUExtensions "x86-os CPU - a következő kiterjesztésekkel:" #define MSGTR_AvailableVideoOutputDrivers "Rendelkezésre álló video meghajtók:\n" #define MSGTR_AvailableAudioOutputDrivers "Rendelkezésre álló audio meghajtók:\n" #define MSGTR_AvailableAudioCodecs "Rendelkezésre álló audio codec-ek:\n" @@ -113,7 +110,6 @@ #define MSGTR_AvailableAudioFm "Rendelkezésre álló (befordított) audio codec családok/meghajtók:\n" #define MSGTR_AvailableVideoFm "Rendelkezésre álló (befordított) video codec családok/meghajtók:\n" #define MSGTR_AvailableFsType "A használható teljesképernyős réteg-módok:\n" -#define MSGTR_UsingRTCTiming "Linux hardveres RTC időzítés használata (%ldHz)\n" #define MSGTR_CannotReadVideoProperties "Video: tulajdonságok beolvasása nem lehetséges.\n" #define MSGTR_NoStreamFound "Nem található stream\n" #define MSGTR_ErrorInitializingVODevice "Hiba a kiválasztott video_out (-vo) egység inicializásakor!\n" @@ -149,14 +145,11 @@ #define MSGTR_AddedSubtitleFile "SUB: Felirat fájl (%d) hozzáadva: %s\n" #define MSGTR_RemovedSubtitleFile "SUB: Felirat fájl (%d) eltávolítva: %s\n" #define MSGTR_ErrorOpeningOutputFile "Hiba a(z) [%s] fájl írásakor!\n" -#define MSGTR_CommandLine "Parancs sor:" #define MSGTR_RTCDeviceNotOpenable "%s megnyitása nem sikerült: %s (a felhasználó által olvashatónak kell lennie.)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Linux RTC inicializálási hiba az ioctl-ben (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Próbáld ki ezt: \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" hozzáadni a rendszer indító script-jeidhez!\n" #define MSGTR_LinuxRTCInitErrorPieOn "Linux RTC inicializálási hiba az ioctl-ben (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "%s időzítés használata.\n" -#define MSGTR_MenuInitialized "Menü inicializálva: %s\n" -#define MSGTR_MenuInitFailed "Menü inicializálás nem sikerült.\n" #define MSGTR_Getch2InitializedTwice "FIGYELEM: getch2_init kétszer lett meghívva!\n" #define MSGTR_DumpstreamFdUnavailable "Ezt a folyamot nem lehet dump-olni - a fájlleíró nem elérhető.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "A libmenu video szűrőt nem sikerült a(z) %s főmenüvel megnyitni.\n" @@ -292,12 +285,9 @@ #define MSGTR_CannotAllocateBytes "%d byte nem foglalható le.\n" #define MSGTR_SettingAudioDelay "Audió késleltetés beállítása: %5.3fs.\n" #define MSGTR_SettingVideoDelay "Videó késleltetés beállítása: %5.3fs.\n" -#define MSGTR_SettingAudioInputGain "Audió input erősítése %f.\n" -#define MSGTR_LamePresetEquals "\npreset=%s\n\n" #define MSGTR_LimitingAudioPreload "Audió előretöltés korlátozva 0.4 mp-re.\n" #define MSGTR_IncreasingAudioDensity "Audió tömörítés növelése 4-re.\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Audió előretöltés 0-ra állítva, max pts javítás 0.\n" -#define MSGTR_CBRAudioByterate "\n\nCBR audio: %d byte/mp, %d byte/blokk\n" #define MSGTR_LameVersion "LAME %s (%s) verzió\n\n" #define MSGTR_InvalidBitrateForLamePreset "Hiba: A megadott bitráta az ezen beállításhoz tartozó határokon kívül van.\n"\ "\n"\ @@ -484,8 +474,6 @@ #define MSGTR_CodecNeedsOutfmt "\ncodec(%s) 'outfmt'-t igényel!\n" #define MSGTR_CantAllocateComment "Nem tudok memóriát foglalni a megjegyzésnek. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "%s olvasása: " -#define MSGTR_CantOpenFileError "Nem tudom megnyitni '%s'-t: %s\n" #define MSGTR_CantGetMemoryForLine "Nem tudok memóriát foglalni a 'line'-nak: %s\n" #define MSGTR_CantReallocCodecsp "A '*codecsp' nem foglalható le újra: %s\n" #define MSGTR_CodecNameNotUnique "A(z) '%s' codec név nem egyedi." @@ -551,7 +539,6 @@ #define MSGTR_Preferences "Beállítások" #define MSGTR_AudioPreferences "Audio vezérlő beállítása" #define MSGTR_NoMediaOpened "nincs megnyitva semmi" -#define MSGTR_VCDTrack "%d. VCD track" #define MSGTR_NoChapter "nincs megnyitott fejezet" #define MSGTR_Chapter "%d. fejezet" #define MSGTR_NoFileLoaded "nincs fájl betöltve" @@ -626,7 +613,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "Skin böngésző" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Kilépés..." +#define MSGTR_MENU_Exit "Kilépés" #define MSGTR_MENU_Mute "Néma" #define MSGTR_MENU_Original "Eredeti" #define MSGTR_MENU_AspectRatio "Képarány" @@ -687,9 +674,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Erőszakos kép eldobó" #define MSGTR_PREFERENCES_Flip "Kép fejjel lefelé" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Óra es indikátorok" -#define MSGTR_PREFERENCES_OSDProgress "Csak a százalék jelzők" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Óra, százalék és a teljes idő" #define MSGTR_PREFERENCES_Subtitle "Felirat:" #define MSGTR_PREFERENCES_SUB_Delay "Késleltetés: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" @@ -1135,10 +1119,8 @@ // audio_out.c #define MSGTR_AO_ALSA9_1x_Removed "audio_out: alsa9 és alsa1x modulok törölve lettek, használd a -ao alsa kapcsolót helyettük.\n" -#define MSGTR_AO_TryingPreferredAudioDriver "Preferált '%.*s' audió vezérlő próbálása, opciók: '%s'\n" #define MSGTR_AO_NoSuchDriver "Nincs ilyen audió vezérlő: '%.*s'\n" #define MSGTR_AO_FailedInit "A(z) '%s' audió vezérlő inicializálása nem sikerült\n" -#define MSGTR_AO_TryingEveryKnown "Az összes ismert audió vezérlő kipróbálása...\n" // ao_oss.c #define MSGTR_AO_OSS_CantOpenMixer "[AO OSS] audio_setup: Nem tudom megnyitni a(z) %s keverő eszközt: %s\n" @@ -1207,31 +1189,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** A hangkártyád NEM támogatja a select()-et ***\nFordítsd újra az MPlayer-t az #undef HAVE_AUDIO_SELECT sorral a config.h-ban !\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\nVégzetes hiba: *** NEM LEHET ÚJRA MEGNYITNI / BEÁLLÍTANI AZ AUDIO ESZKÖZT (%s) ***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init: kért formátum: %d Hz, %d csatorna, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init: nem találtam hangkártyát.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init: hibás formátumot (%s) kértél - kimenet letiltva.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init: playback megnyitási hiba: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init: PCM info hiba: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init: %d hangkártyát találtam, ezt használom: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init: PCM csatorna info hiba: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init: hiba a paraméterek beállításakor: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init: hiba a csatorna beállításakor: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init: csatorna előkészítési hiba: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit: lejátszás drain hiba: %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit: lejátszás ürítési hiba: %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit: PCM lezárási hiba: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset: lejátszás drain hiba: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset: lejátszás ürítési hiba: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset: csatorna előkészítési hiba: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause: lejátszás drain hiba: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause: lejátszás ürítési hiba: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume: csatorna előkészítési hiba: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play: alsa underrun, folyam beállítása.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play: lejátszás előkészítési hiba: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play: írási hiba a beállítás után: %s - feladom.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play: kimeneti hiba: %s\n" - // ao_alsa.c #define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] Hibás mixer index. Alapértelmezés 0-ra.\n" #define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] Mixer megnyitási hiba: %s\n" @@ -1315,7 +1272,6 @@ // ========================== INPUT ========================================= // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "Botkormány eszköz megnyitása: %s\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "Nem sikerült a(z) %s botkormány eszközt megnyitni: %s\n" #define MSGTR_INPUT_JOYSTICK_ErrReading "Hiba a botkormány eszköz olvasása közben: %s\n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "Botkormány: elvesztettünk %d bájtnyi adatot\n" @@ -1323,8 +1279,6 @@ #define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "Botkormány ismeretlen figyelmeztető esemény típus: %d\n" // appleir.c -#define MSGTR_INPUT_APPLE_IR_Init "Apple IR inicializálása %s eszközön.\n" -#define MSGTR_INPUT_APPLE_IR_Detect "Apple IR megtalálva %s eszközön.\n" #define MSGTR_INPUT_APPLE_IR_CantOpen "Nem nyitható meg az Apple IR eszköz: %s\n" // input.c @@ -1355,7 +1309,6 @@ #define MSGTR_INPUT_INPUT_ErrCantInitAppleRemote "Apple Remote inicializálása nem sikerült.\n" // lirc.c -#define MSGTR_SettingUpLIRC "LIRC támogatás indítása...\n" #define MSGTR_LIRCopenfailed "Nem tudtam megnyitni a lirc támogatást. Nem fogod tudni használni a távirányítót.\n" #define MSGTR_LIRCcfgerr "Nem tudom olvasni a LIRC konfigurációs fájlt: %s \n" @@ -1370,7 +1323,6 @@ #define MSGTR_WarningLenIsntDivisible "Figyelem! A len nem osztható a samplesize-zal!\n" #define MSGTR_MuxbufMallocErr "Muxer kocka buffernek nem sikerült memóriát foglalni!\n" #define MSGTR_MuxbufReallocErr "Muxer kocka buffernek nem sikerült memóriát újrafoglalni!\n" -#define MSGTR_MuxbufSending "Muxer kocka bufferből %d kocka átküldve a muxer-nek.\n" #define MSGTR_WritingHeader "Fejléc írása...\n" #define MSGTR_WritingTrailer "Index írása...\n" @@ -1388,7 +1340,6 @@ #define MSGTR_ON2AviFormat "ON2 AVI formátum" #define MSGTR_Detected_XXX_FileFormat "Ez egy %s formátumú fájl!\n" #define MSGTR_DetectedAudiofile "Audio fájl detektálva!\n" -#define MSGTR_NotSystemStream "Nem MPEG System Stream formátum... (talán Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Hibás MPEG-ES-folyam? Lépj kapcsolatba a készítőkkel, lehet, hogy hiba!\n" #define MSGTR_FormatNotRecognized "========= Sajnos ez a fájlformátum ismeretlen vagy nem támogatott ===========\n"\ "= Ha ez egy AVI, ASF vagy MPEG fájl, lépj kapcsolatba a készítőkkel (hiba)! =\n" @@ -1413,11 +1364,8 @@ #define MSGTR_MOVcomprhdr "MOV: A tömörített fejlécek támogatásához ZLIB kell!\n" #define MSGTR_MOVvariableFourCC "MOV: Vigyázat: változó FourCC detektálva!?\n" #define MSGTR_MOVtooManyTrk "MOV: Vigyázat: túl sok sáv!" -#define MSGTR_FoundAudioStream "==> Megtalált audio folyam: %d\n" -#define MSGTR_FoundVideoStream "==> Megtalált video folyam: %d\n" #define MSGTR_DetectedTV "TV detektálva! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Ogg demuxer meghívása nem sikerült.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Audio folyam keresése (id:%d)\n" #define MSGTR_CannotOpenAudioStream "Audio folyam megnyitása sikertelen: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Felirat folyam megnyitása sikertelen: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Audio demuxer meghívása sikertelen: %s\n" @@ -1450,17 +1398,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "** üres lista?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "Film megtalálva: 0x%X - 0x%X\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "'bih' megtalálva, %u bájt %d bájtból\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "A kulcs képkocka tábla újragenerálva az M$ mpg4v1 videóhoz.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "Kulcs képkocka tábla újragenerálása a DIVX3 videóhoz.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "Kulcs képkocka tábla újragenerálása az MPEG4 videóhoz.\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "'wf' megtalálva, %d bájt %d bájtból\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI: dmlh megtalálva (size=%d) (total_frames=%d)\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "INDEX blokk olvasása, %d chunk %d képkockához (fpos=%"PRId64").\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "Kiegészítő RIFF fejléc...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** Figyelmeztetés: ez nem kiterjesztett AVI fejléc..\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "Hibás chunk? chunksize=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI: ODML: ODML index felépítése (%d superindexchunks)\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI: ODML: Hibás (nem teljes?) fájlt találtam. Tradícionális index használata.\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "A(z) %s index fájl nem olvasható: %s\n" @@ -1592,21 +1530,15 @@ #define MSGTR_UsingExternalPP "[PP] Külső minőségjavító szűrő használata, max minőség = %d\n" #define MSGTR_UsingCodecPP "[PP] Codecbeli minőségjavítás használata, max minőség = %d\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "'%s' video tulajdonság nem támogatott a kiválasztott vo & vd meghajtók által!\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "A kért [%s] video codec család (vfm=%s) nem kiválasztható (fordításnál kapcsold be!)\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "A kért [%s] audio codec család (afm=%s) nem kiválasztható (fordításnál kapcsold be!)\n" #define MSGTR_OpeningVideoDecoder "Video dekóder meghívása: [%s] %s\n" #define MSGTR_SelectedVideoCodec "Kiválasztott videó codec: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Audio dekóder meghívása: [%s] %s\n" #define MSGTR_SelectedAudioCodec "Kiválasztott audió codec: [%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "Audió szűrő lánc felépítése %dHz/%dch/%s -> %dHz/%dch/%s formátumhoz...\n" -#define MSGTR_UninitVideoStr "Videó uninit: %s\n" -#define MSGTR_UninitAudioStr "Audió uninit: %s\n" #define MSGTR_VDecoderInitFailed "VDecoder init nem sikerült :(\n" #define MSGTR_ADecoderInitFailed "ADecoder init nem sikerült :(\n" #define MSGTR_ADecoderPreinitFailed "ADecoder preinit nem sikerült :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: %d byte allokálása bemeneti buffernek.\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: %d + %d = %d byte allokálása bemeneti buffernek.\n" // ad_dvdpcm.c: #define MSGTR_SamplesWanted "Példa fájlokra van szükségünk ilyen formátummal, hogy jobb legyen a támogatása. Ha neked van ilyened, keresd meg a fejlesztőket.\n" @@ -1622,8 +1554,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Frissítened/installálnod kell a bináris codec csomagot.\nItt megtalálod: http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO: Win32/DShow video codec inicializálása OK.\n" -#define MSGTR_DMOInitOK "INFO: Win32/DMO video codec init OK.\n" // libmpcodecs/vd_dmo.c vd_dshow.c vd_vfw.c #define MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec "[VD_DMO] Nem foglalható le a kép a cinepak codec-hez.\n" @@ -1750,12 +1680,12 @@ // ================================== stream ==================================== -// ai_alsa1x.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "Nem állítható be a mintavételi ráta.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "Nem állítható be a buffer idő.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "Nem állítható be a periódus idő.\n" +// ai_alsa.c +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "Nem állítható be a mintavételi ráta.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "Nem állítható be a buffer idő.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "Nem állítható be a periódus idő.\n" -// ai_alsa1x.c / ai_alsa.c +// ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "Hibás konfiguráció ehhez a PCM-hez: nincs elérhető konfiguráció.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "Elérési típus nem használható.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt "Minta formátum nem elérhető.\n" @@ -1764,9 +1694,7 @@ #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "Nem használható a buffer mérettel egyező periódus (%u == %lu)\n" #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "Sikertelen a szoftver paraméterek beállítása:\n" #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "Hiba az audió megnyitásakor: %s\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "ALSA státusz hiba: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun!!! (legalább %.3f ms hosszan)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "ALSA Státusz:\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun: előkészítési hiba: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "ALSA olvasás/írás hiba" @@ -1826,7 +1754,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "Ismeretlen ASF folyam típus\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "Sikertelen a HTTP válasz értelmezése.\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "Szerver válasz %d:%s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP ÉRTELMEZÉSI FIGYELMEZTETÉS : %s pragma levágva %zd bájtról %d bájtra\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP ÉRTELMEZÉSI FIGYELMEZTETÉS : %s pragma levágva %zu bájtról %zu bájtra\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "socket írási hiba : %s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "Sikertelen a fájléc értelmezése.\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "Nem található folyam.\n" @@ -1959,17 +1887,13 @@ // stream_radio.c #define MSGTR_RADIO_ChannelNamesDetected "[radio] Rádió csatornák neve megtalálva.\n" -#define MSGTR_RADIO_FreqRange "[radio] Az engedélyezett frekvencia tartomány %.2f-%.2f MHz.\n" #define MSGTR_RADIO_WrongFreqForChannel "[radio] Hibás frekvencia a(z) %s csatornának\n" #define MSGTR_RADIO_WrongChannelNumberFloat "[radio] Hibás csatorna szám: %.2f\n" #define MSGTR_RADIO_WrongChannelNumberInt "[radio] Hibás csatorna szám: %d\n" #define MSGTR_RADIO_WrongChannelName "[radio] Hibás csatorna név: %s\n" #define MSGTR_RADIO_FreqParameterDetected "[radio] Rádió frekvencia paramétere megtalálva.\n" -#define MSGTR_RADIO_DoneParsingChannels "[radio] Csatornák értelmezése kész.\n" #define MSGTR_RADIO_GetTunerFailed "[radio] Figyelmeztetés:ioctl get tuner sikertelen: %s. Frac beállítása: %d.\n" #define MSGTR_RADIO_NotRadioDevice "[radio] %s nem rádiós eszköz!\n" -#define MSGTR_RADIO_TunerCapLowYes "[radio] a tuner low:yes frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[radio] a tuner low:no frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[radio] ioctl set frequency 0x%x (%.2f) sikertelen: %s\n" #define MSGTR_RADIO_GetFreqFailed "[radio] ioctl get frequency sikertelen: %s\n" #define MSGTR_RADIO_SetMuteFailed "[radio] ioctl set mute sikertelen: %s\n" @@ -1979,27 +1903,22 @@ #define MSGTR_RADIO_DroppingFrame "\n[radio] túl rossz - audió keret eldobása (%d bájt)!\n" #define MSGTR_RADIO_BufferEmpty "[radio] grab_audio_frame: üres a buffer, várakozás %d adat bájtra.\n" #define MSGTR_RADIO_AudioInitFailed "[radio] audio_in_init sikertelen: %s\n" -#define MSGTR_RADIO_AudioBuffer "[radio] Audió rögzítés - buffer=%d bájt (blokk=%d bájt).\n" #define MSGTR_RADIO_AllocateBufferFailed "[radio] az audió buffer nem foglalható le (block=%d,buf=%d): %s\n" #define MSGTR_RADIO_CurrentFreq "[radio] Jelenlegi frekvencia: %.2f\n" #define MSGTR_RADIO_SelectedChannel "[radio] Kiválasztott csatorna: %d - %s (freq: %.2f)\n" #define MSGTR_RADIO_ChangeChannelNoChannelList "[radio] Nem lehet csatornát választani: nincs csatornalista megadva.\n" #define MSGTR_RADIO_UnableOpenDevice "[radio] '%s' nem nyitható meg: %s\n" -#define MSGTR_RADIO_RadioDevice "[radio] Radio fd: %d, %s\n" #define MSGTR_RADIO_InitFracFailed "[radio] init_frac sikertelen.\n" #define MSGTR_RADIO_WrongFreq "[radio] Hibás frekvencia: %.2f\n" #define MSGTR_RADIO_UsingFreq "[radio] Használt frekvencia: %.2f.\n" #define MSGTR_RADIO_AudioInInitFailed "[radio] audio_in_init sikertelen.\n" -#define MSGTR_RADIO_BufferString "[radio] %s: in buffer=%d dropped=%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[radio] audio_in_setup hívás sikertelen: %s\n" -#define MSGTR_RADIO_CaptureStarting "[radio] Mentés kezdése.\n" #define MSGTR_RADIO_ClearBufferFailed "[radio] Buffer kiürítése sikertelen: %s\n" #define MSGTR_RADIO_StreamEnableCacheFailed "[radio] stream_enable_cache hívás sikertelen: %s\n" #define MSGTR_RADIO_DriverUnknownStr "[radio] Ismeretlen vezérlő név: %s\n" #define MSGTR_RADIO_DriverV4L2 "[radio] V4Lv2 rádió interfész használata.\n" #define MSGTR_RADIO_DriverV4L "[radio] V4Lv1 rádió interfész használata.\n" #define MSGTR_RADIO_DriverBSDBT848 "[radio] *BSD BT848 rádió interfész használata.\n" -#define MSGTR_RADIO_AvailableDrivers "[radio] Használható vezérlők: " //tv.c #define MSGTR_TV_BogusNormParameter "tv.c: norm_from_string(%s): Hibás norma paraméter, beállított: %s.\n" @@ -2011,30 +1930,23 @@ " figyelmen kívül hagyjuk! Próbáld újra YV12-vel (az alapértelmezett\n"\ " színtérrel) és olvasd el a dokumentációt!\n"\ "==================================================================\n" -#define MSGTR_TV_SelectedNormId "Kiválasztott norma id: %d\n" -#define MSGTR_TV_SelectedNorm "Kiválasztott norma: %s\n" #define MSGTR_TV_CannotSetNorm "Hiba: Nem lehet beállítani a normát!\n" #define MSGTR_TV_MJP_WidthHeight " MJP: %d szélesség %d magasság\n" #define MSGTR_TV_UnableToSetWidth "Nem lehet beállítani a kívánt szélességet: %d\n" #define MSGTR_TV_UnableToSetHeight "Nem lehet beállítani a kívánt magasságot: %d\n" #define MSGTR_TV_NoTuner "A kiválasztott bemeneten nincs tuner!\n" #define MSGTR_TV_UnableFindChanlist "Nem található a kiválasztott csatorna lista! (%s)\n" -#define MSGTR_TV_SelectedChanlist "Kiválasztott csatorna lista: %s (%d csatorna)\n" #define MSGTR_TV_ChannelFreqParamConflict "Nem állíthatod be a frekvenciát és a csatornát egy időben!\n" #define MSGTR_TV_ChannelNamesDetected "TV csatornák nevének keresése.\n" #define MSGTR_TV_NoFreqForChannel "Nem található frekvencia a(z) %s csatornához (%s)\n" #define MSGTR_TV_SelectedChannel3 "Kiválasztott csatorna: %s - %s (frekv: %.3f)\n" #define MSGTR_TV_SelectedChannel2 "Kiválasztott csatorna: %s (frekv: %.3f)\n" -#define MSGTR_TV_SelectedFrequency "Kiválasztott frekvencia: %lu (%.3f)\n" -#define MSGTR_TV_RequestedChannel "Kért csatorna: %s\n" #define MSGTR_TV_UnsupportedAudioType "A(z) '%s (%x)' audió típus nem támogatott!\n" -#define MSGTR_TV_AudioFormat " TV audió: %d csatorna, %d bit, %d Hz\n" #define MSGTR_TV_AvailableDrivers "Elérhető vezérlők:\n" #define MSGTR_TV_DriverInfo "Kiválasztott vezérlő: %s\n név: %s\n szerző: %s\n megjegyzés: %s\n" #define MSGTR_TV_NoSuchDriver "Nincs ilyen vezérlő: %s\n" #define MSGTR_TV_DriverAutoDetectionFailed "TV vezérlő automatikus felismerése sikertelen.\n" #define MSGTR_TV_UnknownColorOption "Ismeretlen szín opció (%d) van megadva!\n" -#define MSGTR_TV_CurrentFrequency "Aktuális frekvencia: %lu (%.3f)\n" #define MSGTR_TV_NoTeletext "Nincs teletext" #define MSGTR_TV_Bt848IoctlFailed "tvi_bsdbt848: A(z) %s ioctl hívása sikertelen. Hiba: %s\n" #define MSGTR_TV_Bt848InvalidAudioRate "tvi_bsdbt848: Érvénytelen audió ráta. Hiba: %s\n" @@ -2062,14 +1974,8 @@ #define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow: #%d számú eszköz nem található\n" #define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow: #%d számú eszköz nevének lekérdezése sikertelen\n" #define MSGTR_TVI_DS_UsingDevice "tvi_dshow: #%d eszköz használata: %s\n" -#define MSGTR_TVI_DS_DeviceName "tvi_dshow: #%d eszköz: %s\n" #define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow: Sikertelen a frekvencia közvetlen lekérdezése. Az OS beépített csatorna táblázata lesz használva.\n" -#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow: Sikertelen a frekvencia közvetlen beállítása. Az OS beépített csatorna táblázata lesz használva.\n" -#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow: támogatott normák:" -#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow: használható videó bemenetek:" -#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow: használható audió bemenetek:" //following phrase will be printed near the selected audio/video input -#define MSGTR_TVI_DS_InputSelected "(kiválasztva)" #define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow: Sikertelen a frekvenciatáblázat betöltése a kstvtune-ból.\n" #define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow: Hibás eszköz paraméter: %s\n" #define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow: Hibás eszköz index: %d\n" @@ -2081,7 +1987,6 @@ #define MSGTR_TVI_DS_ChangingWidthHeightNotSupported "tvi_dshow: A videó szélesség/magasság változtatását nem támogatja az eszköz.\n" #define MSGTR_TVI_DS_SelectingInputNotSupported "tvi_dshow: A mentési forrás kiválasztását nem támogatja az eszköz\n" -#define MSGTR_TVI_DS_FreqTableLoaded "tvi_dshow: a rendszer (%s) frekvencia táblázata betöltve az ország id=%d (csatornák:%d).\n" #define MSGTR_TVI_DS_ErrorParsingAudioFormatStruct "tvi_dshow: Nem értelmezhető az audió formátum struktúrája.\n" #define MSGTR_TVI_DS_ErrorParsingVideoFormatStruct "tvi_dshow: Nem értelmezhető a videó formátum struktúrája.\n" #define MSGTR_TVI_DS_UnableSetAudioMode "tvi_dshow: %d audió mód beállítása sikertelen. Hiba:0x%x\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-it.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-it.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-it.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-it.h 2011-12-05 11:38:13.000000000 +0000 @@ -59,7 +59,6 @@ #define MSGTR_NoHomeDir "Impossibile trovare la HOME directory\n" #define MSGTR_GetpathProblem "Problema in get_path(\"config\")\n" #define MSGTR_CreatingCfgFile "Creo il file di configurazione: %s\n" -#define MSGTR_BuiltinCodecsConf "Utilizzo la versione interna predefinita di codecs.conf\n" #define MSGTR_CantLoadFont "Impossibile caricare i font: %s\n" #define MSGTR_CantLoadSub "Impossibile caricare i sottotitoli: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: FATALE: manca il flusso selezionato!\n" @@ -104,8 +103,6 @@ #define MSGTR_Playing "\nRiproduco %s.\n" #define MSGTR_NoSound "Audio: nessun suono!!!\n" #define MSGTR_FPSforced "FPS forzato a %5.3f (ftime: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "Compilato con riconoscimento CPU in esecuzione.\n" -#define MSGTR_CompiledWithCPUExtensions "Compilato per CPU x86 con estensioni:" #define MSGTR_AvailableVideoOutputDrivers "Driver di output video disponibili:\n" #define MSGTR_AvailableAudioOutputDrivers "Driver di output audio disponibili:\n" #define MSGTR_AvailableAudioCodecs "Codec audio disponibili:\n" @@ -113,7 +110,6 @@ #define MSGTR_AvailableAudioFm "Famiglie/driver di codec audio disponibili (compilati):\n" #define MSGTR_AvailableVideoFm "Famiglie/driver di codec video disponibili (compilati):\n" #define MSGTR_AvailableFsType "Modi disponibili a schermo intero:\n" -#define MSGTR_UsingRTCTiming "Sto utilizzando la temporizzazione hardware RTC di Linux (%ldHz)\n" #define MSGTR_CannotReadVideoProperties "Video: impossibile leggere le proprietà\n" #define MSGTR_NoStreamFound "Nessun flusso trovato\n" #define MSGTR_ErrorInitializingVODevice "Errore aprendo/inizializzando il dispositivo uscita video (-vo) selezionato!\n" @@ -149,15 +145,12 @@ #define MSGTR_AddedSubtitleFile "SUB: Aggiunto file sottotitoli (%d): %s\n" #define MSGTR_RemovedSubtitleFile "SUB: Rimosso file sottotitoli (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "Errore durante l'apertura del file [%s] per la scrittura!\n" -#define MSGTR_CommandLine "CommandLine:" #define MSGTR_RTCDeviceNotOpenable "Apertura di %s fallita: %s (dovrebbe esser leggibile dall'utente.)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Linux RTC: errore di init in ioctl (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Prova aggiungendo \"echo %lu > /proc/sys/dev/rtc/max-user-freq\"\n"\ "agli script di avvio del sistema.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Linux RTC: errore di init in ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "Uso la temporizzazione %s.\n" -#define MSGTR_MenuInitialized "Menu inizializzato: %s\n" -#define MSGTR_MenuInitFailed "Inizializzazione Menu fallita.\n" #define MSGTR_Getch2InitializedTwice "WARNING: getch2_init chiamata 2 volte!\n" #define MSGTR_DumpstreamFdUnavailable "Non posso fare il dump di questo flusso - nessun descrittore file disponibile.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Non riesco ad aprire il filtro video libmenu col menu base %s.\n" @@ -290,12 +283,9 @@ #define MSGTR_CannotAllocateBytes "Non posso allocare %d byte.\n" #define MSGTR_SettingAudioDelay "Imposto il ritardo audio a %5.3f.\n" #define MSGTR_SettingVideoDelay "Imposto il ritardo video a %5.3f.\n" -#define MSGTR_SettingAudioInputGain "Imposto il guadagno di ingresso audio a %f.\n" -#define MSGTR_LamePresetEquals "\npreset=%s\n\n" #define MSGTR_LimitingAudioPreload "Limito il preload audio a 0.4s.\n" #define MSGTR_IncreasingAudioDensity "Aumento la densità audio a 4.\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Forzo il preload audio a 0, max pts correction a 0.\n" -#define MSGTR_CBRAudioByterate "\n\nCBR audio: %d byte/sec, %d byte/blocco\n" #define MSGTR_LameVersion "LAME versione %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset ""\ "Errore: il bitrate specificato è fuori gamma per questo Preset.\n"\ @@ -484,8 +474,6 @@ #define MSGTR_CodecNeedsOutfmt "\nil codec(%s) abbisogna di un 'outfmt'!\n" #define MSGTR_CantAllocateComment "Non riesco ad allocare memoria per il commento." #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "Leggo %s: " -#define MSGTR_CantOpenFileError "Non posso aprire '%s': %s\n" #define MSGTR_CantGetMemoryForLine "Non posso aver la memoria per 'line': %s\n" #define MSGTR_CantReallocCodecsp "Non posso riallocare '*codecsp': %s\n" #define MSGTR_CodecNameNotUnique "Il nome codec '%s' non è univoco." @@ -549,7 +537,6 @@ #define MSGTR_Preferences "Preferenze" #define MSGTR_AudioPreferences "Configurazione driver audio" #define MSGTR_NoMediaOpened "nessun media aperto" -#define MSGTR_VCDTrack "Traccia VCD %d" #define MSGTR_NoChapter "nessun capitolo" #define MSGTR_Chapter "capitolo %d" #define MSGTR_NoFileLoaded "nessun file caricato" @@ -624,7 +611,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "Ricerca skin" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Uscita..." +#define MSGTR_MENU_Exit "Uscita" #define MSGTR_MENU_Mute "Muto" #define MSGTR_MENU_Original "Originale" #define MSGTR_MENU_AspectRatio "Aspetto" @@ -684,9 +671,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Abilita lo scarto intenso (hard) dei fotogrammi (pericoloso)" #define MSGTR_PREFERENCES_Flip "Ribalta l'immagine sottosopra" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Timer e indicatori" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Timer, percentuale e tempo totale" -#define MSGTR_PREFERENCES_OSDProgress "Solo indicatori" #define MSGTR_PREFERENCES_Subtitle "Sottotitolo:" #define MSGTR_PREFERENCES_SUB_Delay "Ritardo: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" @@ -1130,10 +1114,8 @@ // audio_out.c #define MSGTR_AO_ALSA9_1x_Removed "audio_out: i moduli alsa9/alsa1x sono stati rimossi, ora usa -ao alsa.\n" -#define MSGTR_AO_TryingPreferredAudioDriver "Provo con il driver audio preferito '%.*s', opzioni '%s'\n" #define MSGTR_AO_NoSuchDriver "driver audio '%.*s' non trovato\n" #define MSGTR_AO_FailedInit "Inizializzazione del driver audio '%s' non riuscita\n" -#define MSGTR_AO_TryingEveryKnown "Provo con tutti i driver audio conosciuti...\n" // ao_oss.c @@ -1203,31 +1185,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** Il tuo driver audio NON supporta select() ***\n Ricompila MPlayer con #undef HAVE_AUDIO_SELECT in config.h !\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\nErrore fatale: *** NON POSSO RIAPRIRE / RESETTARE IL DEVICE AUDIO *** %s\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init: formato richiesto: %d Hz, %d canali, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init: nessuna scheda audio trovata.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init: formato voluto (%s) invalido - output disabilitato.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init: errore apertura riproduzione: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init: errore informazioni PCM: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init: %d scheda/e audio travata/e, uso: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init: errore informazioni canale PCM: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init: errore impostazione parametri: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init: errore nell'impostazione canale: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init: preparazione del canale: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit: errore 'drain' riproduzione: %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit: errore 'flush' riproduzione: %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit: errore chiusura PCM: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset: errore 'drain' riproduzione: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset: errore 'flush' riproduzione: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset: errore preparazione canale: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause: errore 'drain' riproduzione: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause: errore 'flush' riproduzione: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume: errore preparazione canale: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play: ritardo alsa, reimposto il flusso.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play: errore preparazione riproduzione: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play: errore di scrittura dopo reset: %s - mi arrendo.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play: errore di output: %s\n" - // ao_alsa.c #define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] Indice mixer non valido. Uso il default 0.\n" #define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] Errore di apertura mixer: %s\n" @@ -1312,7 +1269,6 @@ // ========================== INPUT ========================================= // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "Apertura dispositivo joystick %s\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "Non posso aprire il dispositivo joystick %s: %s\n" #define MSGTR_INPUT_JOYSTICK_ErrReading "Errore in lettura dispositivo joystick: %s\n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "Joystick: Persi %d byte di dati\n" @@ -1320,8 +1276,6 @@ #define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "Joystick: Avviso: tipo di evento %d sconosciuto\n" // appleir.c -#define MSGTR_INPUT_APPLE_IR_Init "Inizializzo l'Apple IR su %s\n" -#define MSGTR_INPUT_APPLE_IR_Detect "Rilevato Apple IR su %s\n" #define MSGTR_INPUT_APPLE_IR_CantOpen "Impossibile aprire il dispositivo Apple IR: %s\n" // input.c @@ -1352,7 +1306,6 @@ #define MSGTR_INPUT_INPUT_ErrCantInitAppleRemote "Impossibile inizializzare l'Apple Remote.\n" // lirc.c -#define MSGTR_SettingUpLIRC "Configurazione del supporto per LIRC...\n" #define MSGTR_LIRCopenfailed "Apertura del supporto per LIRC fallita. Non potrai usare il tuo telecomando.\n" #define MSGTR_LIRCcfgerr "Fallimento nella lettura del file di configurazione di LIRC %s.\n" @@ -1368,7 +1321,6 @@ // TODO: muxer frame buffer ??? #define MSGTR_MuxbufMallocErr "Il buffer fotogrammi del muxer non può allocare la memoria!\n" #define MSGTR_MuxbufReallocErr "Il buffer fotogrammi del muxer non può riallocare la memoria!\n" -#define MSGTR_MuxbufSending "Il buffer fotogrammi del muxer sta inviando %d fotogramma/i al muxer.\n" #define MSGTR_WritingHeader "Scrittura intestazione in corso...\n" #define MSGTR_WritingTrailer "Scrittura indice in corso...\n" @@ -1387,7 +1339,6 @@ #define MSGTR_ON2AviFormat "Formato AVI ON2" #define MSGTR_Detected_XXX_FileFormat "Rilevato formato file %s!\n" #define MSGTR_DetectedAudiofile "Rilevato file audio!\n" -#define MSGTR_NotSystemStream "il formato non è 'MPEG System Stream'... (è forse 'Transport Stream'?)\n" #define MSGTR_InvalidMPEGES "Flusso MPEG-ES non valido??? Contatta l'autore, può essere un baco :(\n" #define MSGTR_FormatNotRecognized "===== Mi dispiace, questo formato file non è riconosciuto/supportato ======\n"\ "=== Se questo è un file AVI, ASF o MPEG, per favore contatta l'autore! ===\n" @@ -1411,11 +1362,8 @@ #define MSGTR_MOVcomprhdr "MOV: Il supporto delle intestazioni compresse richiede ZLIB!\n" #define MSGTR_MOVvariableFourCC "MOV: Avvertimento! Rilevato FourCC variabile!?\n" #define MSGTR_MOVtooManyTrk "MOV: Avvertimento! troppe tracce!" -#define MSGTR_FoundAudioStream "==> Trovato flusso audio: %d\n" -#define MSGTR_FoundVideoStream "==> Trovato flusso video: %d\n" #define MSGTR_DetectedTV "Ho trovato una TV! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Impossibile aprire il demuxer Ogg.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: sto cercando il flusso audio (id:%d)\n" #define MSGTR_CannotOpenAudioStream "Impossibile aprire il flusso audio: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Impossibile aprire il flusso dei sottotitoli: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Errore nell'apertura del demuxer audio: %s\n" @@ -1449,17 +1397,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "** lista vuota?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "Trovato filmato a 0x%X - 0x%X\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "trovato 'bih', %u byte di %d\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "Ricostruisco tabella keyframe per video M$ mpg4v1.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "Ricostruisco tabella keyframe per video DIVX3.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "Ricostruisco tabella keyframe per video MPEG4.\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "trovato 'wf', %d byte di %d\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI: dmlh trovato (dimensione=%d) (fotogrammi totali=%d)\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "Leggo blocco INDEX, %d parti per %d fotogrammi (fpos=%"PRId64").\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "intestazione RIFF supplementare...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** Attenzione: questa non è un'intestazione AVI estesa..\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "Blocco (chunk) danneggiato? chunksize=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI: ODML: Costruisco indice ODML (%d superindexchunks).\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI: ODML: Rilevato file rovinato (incompleto?). Sarà usato un indice tradizionale.\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "Impossibile leggere il file indice %s: %s\n" @@ -1589,21 +1527,15 @@ #define MSGTR_UsingExternalPP "[PP] Utilizzo un filtro di postprocessing esterno, max q = %d\n" #define MSGTR_UsingCodecPP "[PP] Utilizzo il postprocessing del codec, max q = %d\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "L'attributo video '%s' non è gestibile dal vo & vd selezionati! \n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Famiglia di codec video voluta [%s] (vfm=%s) non disponibile.\nAbilitala in compilazione.\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Famiglia di codec audio voluta [%s] (afm=%s) non disponibile.\nAbilitala in compilazione.\n" #define MSGTR_OpeningVideoDecoder "Apertura decoder video: [%s] %s\n" #define MSGTR_SelectedVideoCodec "Scelto codec video: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Apertura decoder audio: [%s] %s\n" #define MSGTR_SelectedAudioCodec "Scelto codec audio: [%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "Costruisco catena filtri audio per %dHz/%dch/%s -> %dHz/%dch/%s...\n" -#define MSGTR_UninitVideoStr "Uninit video: %s \n" -#define MSGTR_UninitAudioStr "Uninit audio: %s \n" #define MSGTR_VDecoderInitFailed "Inizializzazione VDecoder fallita :(\n" #define MSGTR_ADecoderInitFailed "Inizializzazione ADecoder fallita :(\n" #define MSGTR_ADecoderPreinitFailed "Preinizializzazione ADecoder fallita :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Alloco %d byte per il buffer di input\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Alloco %d + %d = %d byte per il buffer di output\n" // ad_dvdpcm.c: #define MSGTR_SamplesWanted "Servono esempi di questo formato per migliorarne il supporto. Contatta sviluppatori.\n" @@ -1619,8 +1551,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Devi installare o aggiornare i codec binari.\nVai su http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO: Win32/DShow inizializzato correttamente.\n" -#define MSGTR_DMOInitOK "INFO: Win32/DMO inizializzato correttamente.\n" // libmpcodecs/vd_dmo.c vd_dshow.c vd_vfw.c #define MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec "[VD_DMO] Impossibile allocare l'immagine per il codec cinepak.\n" @@ -1748,12 +1678,12 @@ // ================================== stream ==================================== -// ai_alsa1x.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "Non posso impostare il samplerate.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "Non posso impostare il tempo del buffer.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "Non posso impostare il tempo del periodo.\n" +// ai_alsa.c +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "Non posso impostare il samplerate.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "Non posso impostare il tempo del buffer.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "Non posso impostare il tempo del periodo.\n" -// ai_alsa1x.c / ai_alsa.c +// ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "Configurazione PCM rovinata: nessuna configurazione disponibile.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "Tipo di accesso non disponibile.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt "Formato sample non disponibile.\n" @@ -1762,9 +1692,7 @@ #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "Non posso usare il periodo uguale al buffer (%u == %lu)\n" #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "Impossibile impostare i parametri software:\n" #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "Non posso aprire l'audio: %s\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "ALSA Errore di stato: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun!!! (almeno di %.3f ms)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "ALSA Stato:\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun: errore preparazione: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "ALSA errore di lettura/scrittura" @@ -1824,7 +1752,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "Tipo del flusso asf sconosciuto\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "Interpretazione della risposta HTTP fallita.\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "Il server risponde %d:%s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "AVVISO INTERPRETAZIONE ASF HTTP : Pragma %s tagliato da %zd byte a %d\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "AVVISO INTERPRETAZIONE ASF HTTP : Pragma %s tagliato da %zu byte a %zu\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "Errore scrittura socket: %s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "Interpretazione intestazione fallita.\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "Nessun flusso trovato.\n" @@ -1955,17 +1883,13 @@ // stream_radio.c #define MSGTR_RADIO_ChannelNamesDetected "[radio] Rilevati i nomi dei canali radio.\n" -#define MSGTR_RADIO_FreqRange "[radio] La gamma delle frequenze permesse è %.2f-%.2f MHz.\n" #define MSGTR_RADIO_WrongFreqForChannel "[radio] Frequenza errata per il canale %s\n" #define MSGTR_RADIO_WrongChannelNumberFloat "[radio] Numero canale errato: %.2f\n" #define MSGTR_RADIO_WrongChannelNumberInt "[radio] Numero canale errato: %d\n" #define MSGTR_RADIO_WrongChannelName "[radio] Nome canale errato: %s\n" #define MSGTR_RADIO_FreqParameterDetected "[radio] Rilevato parametro frequenza radio.\n" -#define MSGTR_RADIO_DoneParsingChannels "[radio] Lettura canali terminata.\n" #define MSGTR_RADIO_GetTunerFailed "[radio] Attenzione: ioctl tuner fallito: %s. Imposto frac a %d.\n" #define MSGTR_RADIO_NotRadioDevice "[radio] %s non è un dispositivo radio!\n" -#define MSGTR_RADIO_TunerCapLowYes "[radio] il tuner è low:yes frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[radio] il tuner è low:no frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[radio] ioctl impostazione frequenza 0x%x (%.2f) fallito: %s\n" #define MSGTR_RADIO_GetFreqFailed "[radio] ioctl rilevazione frequenza fallito: %s\n" #define MSGTR_RADIO_SetMuteFailed "[radio] ioctl impostazione muto fallito: %s\n" @@ -1975,7 +1899,6 @@ #define MSGTR_RADIO_DroppingFrame "\n[radio] too bad - dropping audio frame (%d byte)!\n" #define MSGTR_RADIO_BufferEmpty "[radio] grab_audio_frame: buffer vuoto, aspetto %d byte di dati.\n" #define MSGTR_RADIO_AudioInitFailed "[radio] audio_in_init fallito: %s\n" -#define MSGTR_RADIO_AudioBuffer "[radio] Cattura audio - buffer=%d byte (blocco=%d byte).\n" #define MSGTR_RADIO_AllocateBufferFailed "[radio] impossibile allocare il buffer audio (blocco=%d,buf=%d): %s\n" #define MSGTR_RADIO_CurrentFreq "[radio] Frequenza attuale: %.2f\n" #define MSGTR_RADIO_SelectedChannel "[radio] Canale selezionato: %d - %s (freq: %.2f)\n" @@ -1985,16 +1908,13 @@ #define MSGTR_RADIO_WrongFreq "[radio] Frequenza errata: %.2f\n" #define MSGTR_RADIO_UsingFreq "[radio] Uso la frequenza: %.2f.\n" #define MSGTR_RADIO_AudioInInitFailed "[radio] audio_in_init fallito.\n" -#define MSGTR_RADIO_BufferString "[radio] %s: in buffer=%d scartati=%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[radio] Chiamata a audio_in_setup fallita: %s\n" -#define MSGTR_RADIO_CaptureStarting "[radio] Inizio la parte di cattura.\n" #define MSGTR_RADIO_ClearBufferFailed "[radio] Pulizia buffer fallita: %s\n" #define MSGTR_RADIO_StreamEnableCacheFailed "[radio] Chiamata a stream_enable_cache fallita: %s\n" #define MSGTR_RADIO_DriverUnknownStr "[radio] Nome driver sconosciuto: %s\n" #define MSGTR_RADIO_DriverV4L2 "[radio] Uso l'interfaccia radio V4Lv2.\n" #define MSGTR_RADIO_DriverV4L "[radio] Uso l'interfaccia radio V4Lv1.\n" #define MSGTR_RADIO_DriverBSDBT848 "[radio] Utilizzo l'interfaccia radio *BSD BT848.\n" -#define MSGTR_RADIO_AvailableDrivers "[radio] Driver disponibili: " //tv.c #define MSGTR_TV_BogusNormParameter "tv.c: norm_from_string(%s): Parametro norm invalido, lo imposto a %s.\n" @@ -2006,30 +1926,23 @@ " I bug report saranno ignorati! Dovresti riprovare con YV12 (che è lo\n"\ " spazio colore di default) e leggere la documentazione!\n"\ "========================================================================\n" -#define MSGTR_TV_SelectedNormId "Selezionato id norma: %d\n" -#define MSGTR_TV_SelectedNorm "Selezionata norma : %s\n" #define MSGTR_TV_CannotSetNorm "Errore: Impossibile impostare la norma!\n" #define MSGTR_TV_MJP_WidthHeight " MJP: larghezza (width) %d altezza (height) %d\n" #define MSGTR_TV_UnableToSetWidth "Non riesco ad impostare la larghezza richiesta: %d\n" #define MSGTR_TV_UnableToSetHeight "Non riesco ad impostare l'altezza richiesta: %d\n" #define MSGTR_TV_NoTuner "L'input scelto non ha un sintonizzatore/tuner!\n" #define MSGTR_TV_UnableFindChanlist "Impossibile trovare la lista di canali indicata! (%s)\n" -#define MSGTR_TV_SelectedChanlist "Selezionata lista canali: %s (contenente %d canali)\n" #define MSGTR_TV_ChannelFreqParamConflict "Non puoi impostare frequenza e canale contemporaneamente!\n" #define MSGTR_TV_ChannelNamesDetected "Rilevati nomi dei canali TV.\n" #define MSGTR_TV_NoFreqForChannel "Non riesco a trovare la frequenza per il canale %s (%s)\n" #define MSGTR_TV_SelectedChannel3 "Scelto canale: %s - %s (freq: %.3f)\n" #define MSGTR_TV_SelectedChannel2 "Scelto canale: %s (freq: %.3f)\n" -#define MSGTR_TV_SelectedFrequency "Scelta frequenza: %lu (%.3f)\n" -#define MSGTR_TV_RequestedChannel "Canale richiesto: %s\n" #define MSGTR_TV_UnsupportedAudioType "Tipo audio '%s (%x)' non supportato!\n" -#define MSGTR_TV_AudioFormat " TV audio: %d canali, %d bit, %d Hz\n" #define MSGTR_TV_AvailableDrivers "Driver disponibili:\n" #define MSGTR_TV_DriverInfo "Scelto driver: %s\n nome: %s\n autore: %s\n commento: %s\n" #define MSGTR_TV_NoSuchDriver "Driver non trovato: %s\n" #define MSGTR_TV_DriverAutoDetectionFailed "Rilevazione automatica del driver TV fallita.\n" #define MSGTR_TV_UnknownColorOption "Specificata un'opzione colore (%d) sonosciuta!\n" -#define MSGTR_TV_CurrentFrequency "Frequenza attuale: %lu (%.3f)\n" #define MSGTR_TV_NoTeletext "Segnale televideo assente" #define MSGTR_TV_Bt848IoctlFailed "tvi_bsdbt848: Chiamata a ioctl %s fallita. Errore: %s\n" #define MSGTR_TV_Bt848InvalidAudioRate "tvi_bsdbt848: Frequenza audio non valida. Errore: %s\n" @@ -2057,14 +1970,8 @@ #define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow: Dispositivo #%d non trovato\n" #define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow: Impossibile ricavare il nome per il dispositivo #%d\n" #define MSGTR_TVI_DS_UsingDevice "tvi_dshow: Uso il dispositivo #%d: %s\n" -#define MSGTR_TVI_DS_DeviceName "tvi_dshow: Dispositivo #%d: %s\n" #define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow: Impossibile ricavare direttamente la frequenza. Sarà usata la la tabella di sistema dei canali.\n" -#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow: Impossibile impostare direttamente la frequenza. Sarà usata la la tabella di sistema dei canali.\n" -#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow: norme disponibili:" -#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow: ingressi video disponibili:" -#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow: ingressi audio disponibili:" //following phrase will be printed near the selected audio/video input -#define MSGTR_TVI_DS_InputSelected "(selezionato)" #define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow: Impossibile leggere la tabella delle frequenze da kstvtune.ax\n" #define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow: Parametro device errato: %s\n" #define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow: Indice di device errato: %d\n" @@ -2076,7 +1983,6 @@ #define MSGTR_TVI_DS_ChangingWidthHeightNotSupported "tvi_dshow: Modifica di larghezza/altezza video non disponibile per il dispositivo.\n" #define MSGTR_TVI_DS_SelectingInputNotSupported "tvi_dshow: Selezione della sorgente di acquisizione non disponibile per il dispositivo.\n" -#define MSGTR_TVI_DS_FreqTableLoaded "tvi_dshow: caricata la tabella delle frequenze di sistema (%s) per la zona id=%d (canali:%d).\n" #define MSGTR_TVI_DS_ErrorParsingAudioFormatStruct "tvi_dshow: Impossibile interpretare la struttura del formato audio.\n" #define MSGTR_TVI_DS_ErrorParsingVideoFormatStruct "tvi_dshow: Impossibile interpretare la struttura del formato video.\n" #define MSGTR_TVI_DS_UnableSetAudioMode "tvi_dshow: Impossibile impostare la modalità audio %d. Errore:0x%x\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-ja.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-ja.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-ja.h 2011-04-03 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-ja.h 2011-10-25 13:55:48.000000000 +0000 @@ -58,7 +58,6 @@ #define MSGTR_NoHomeDir "ホームディレクトリを見付けることが出来ませんでした.\n" #define MSGTR_GetpathProblem "get_path(\"config\") で問題が起きました\n" #define MSGTR_CreatingCfgFile "config fileを作成しました: %s\n" -#define MSGTR_BuiltinCodecsConf "組み込まれたデフォルトの codecs.conf を利用してます\n" #define MSGTR_CantLoadFont "フォントをロード出来ません: %s\n" #define MSGTR_CantLoadSub "サブタイトルをロード出来ません: %s\n" #define MSGTR_CantOpenDumpfile "dump fileを開けません\n" @@ -96,8 +95,6 @@ #define MSGTR_Playing "%s を再生中\n" #define MSGTR_NoSound "音声: 無し\n" #define MSGTR_FPSforced "FPS forced to be %5.3f (ftime: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "コンパイル時にRuntime CPU Detectionが試用されています、これは最適ではありません\n最適なパフォーマスを得るには、--disable-runtime-cpudetectionを有効にしてMPLayerを再コンパイルして下さい\n" -#define MSGTR_CompiledWithCPUExtensions "x86 CPU 向けにコンパイルされました:" #define MSGTR_AvailableVideoOutputDrivers "有効な映像出力ドライバ:\n" #define MSGTR_AvailableAudioOutputDrivers "有効な音声出力ドライバ:\n" #define MSGTR_AvailableAudioCodecs "有効な音声コーデック:\n" @@ -105,7 +102,6 @@ #define MSGTR_AvailableAudioFm "\n有効な(組み込まれた)音声コーデック families/drivers:\n" #define MSGTR_AvailableVideoFm "\n有効な(組み込まれた)映像コーデック families/drivers:\n" #define MSGTR_AvailableFsType "全画面表示モードへの切替えは可能です:\n" -#define MSGTR_UsingRTCTiming "Linux hardware RTC timing (%ldHz) を使っています.\n" #define MSGTR_CannotReadVideoProperties "Video: プロパティーを読み取れません.\n" #define MSGTR_NoStreamFound "ストリームを見付けることが出来ませんでした.\n" #define MSGTR_ErrorInitializingVODevice "選択された映像出力(-vo)デバイスを開く事が出来ませんでした.\n" @@ -207,11 +203,8 @@ #define MSGTR_MOVcomprhdr "MOV: 圧縮されたヘッダ(Compressed headers)をサポートするには ZLIB が必要です\n" #define MSGTR_MOVvariableFourCC "MOV: 警告: Variable FOURCC detected!?\n" #define MSGTR_MOVtooManyTrk "MOV: 警告: too many tracks" -#define MSGTR_FoundAudioStream "==> 音声ストリームが見付かりました: %d\n" -#define MSGTR_FoundVideoStream "==> 映像ストリームが見付かりました: %d\n" #define MSGTR_DetectedTV "TV detected! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "ogg demuxer を開くことが出来ません.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: 音声ストリームを探しています (id:%d).\n" #define MSGTR_CannotOpenAudioStream "音声ストリームを開くことが出来ません: %s\n" #define MSGTR_CannotOpenSubtitlesStream "サブタイトルストリームを開くことが出来ません: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "audio demuxerを開くこと開くことが出来ません: %s\n" @@ -241,21 +234,15 @@ #define MSGTR_UnknownAudio "未知の、もしくは壊れた音声フォーマットです -> 無音声になります\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "選択された vo と vd では映像属性 '%s' はサポートされてません.\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "要求された映像コーデック [%s] (vfm=%s) は無効です (有効にするにはコンパイル時に指定します)\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "要求された音声コーデック [%s] (afm=%s) は無効です (有効にするにはコンパイル時に指定します)\n" #define MSGTR_OpeningVideoDecoder "映像コーデックを開いています: [%s] %s\n" #define MSGTR_OpeningAudioDecoder "音声コーデックを開いています: [%s] %s\n" -#define MSGTR_UninitVideoStr "uninit video: %s\n" -#define MSGTR_UninitAudioStr "uninit audio: %s\n" #define MSGTR_VDecoderInitFailed "映像デコーダの初期化に失敗しました :(\n" #define MSGTR_ADecoderInitFailed "音声デコーダの初期化に失敗しました :(\n" #define MSGTR_ADecoderPreinitFailed "音声デコーダの前処理に失敗 :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: 入力バッファを %d bytes 確保しました\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: 出力バッファを %d + %d = %d bytes 確保しました\n" // LIRC: -#define MSGTR_SettingUpLIRC "LIRC サポートをセッティング中...\n" #define MSGTR_LIRCopenfailed "LIRC サポートを開く事に失敗.\n" #define MSGTR_LIRCcfgerr "LIRC 設定ファイル %s を開くことに失敗しました.\n" @@ -282,7 +269,6 @@ #define MSGTR_SkinBrowser "スキンブラウザ" #define MSGTR_Preferences "設定" #define MSGTR_NoMediaOpened "メディアが開かれていません." -#define MSGTR_VCDTrack "VCD トラック %d" #define MSGTR_NoChapter "キャプターがありません" #define MSGTR_Chapter "キャプター %d" #define MSGTR_NoFileLoaded "ファイルが読み込まれていません." @@ -344,7 +330,7 @@ #define MSGTR_MENU_AudioLanguages "音声言語" #define MSGTR_MENU_SubtitleLanguages "サブタイトル言語" #define MSGTR_MENU_SkinBrowser "スキンブラウザ" -#define MSGTR_MENU_Exit "終了 ..." +#define MSGTR_MENU_Exit "終了 " #define MSGTR_MENU_Mute "消音" #define MSGTR_MENU_Original "オリジナル" #define MSGTR_MENU_Track "トラック %d" @@ -387,9 +373,6 @@ #define MSGTR_PREFERENCES_DirectRender "direct rendering 有効" #define MSGTR_PREFERENCES_FrameDrop "frame dropping 有効" #define MSGTR_PREFERENCES_HFrameDrop "HARD frame dropping (危険です) 有効" -#define MSGTR_PREFERENCES_OSDTimer "タイマーとインディケイター" -#define MSGTR_PREFERENCES_OSDProgress "プログレスバーだけ" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "タイマー パーセンテージとトータル時間" #define MSGTR_PREFERENCES_Subtitle "サブタイトル:" #define MSGTR_PREFERENCES_SUB_Delay "Delay: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-ko.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-ko.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-ko.h 2011-04-03 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-ko.h 2011-10-25 13:55:48.000000000 +0000 @@ -56,7 +56,6 @@ #define MSGTR_NoHomeDir "홈디렉토리를 찾을 수 없습니다.\n" #define MSGTR_GetpathProblem "get_path(\"config\") 문제 발생\n" #define MSGTR_CreatingCfgFile "설정파일을 만듭니다.: %s\n" -#define MSGTR_BuiltinCodecsConf "내장된 기본 codecs.conf를 사용합니다.\n" #define MSGTR_CantLoadFont "폰트를 읽어 들일 수 없습니다.: %s\n" #define MSGTR_CantLoadSub "자막을 읽어 들일 수 없습니다.: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: 치명적 : 선택된 스트림이 없습니다!\n" @@ -98,8 +97,6 @@ #define MSGTR_Playing "%s 재생 중...\n" #define MSGTR_NoSound "오디오: 소리없음\n" #define MSGTR_FPSforced "FPS가 %5.3f (ftime: %5.3f)으로 변경되었습니다.\n" -#define MSGTR_CompiledWithRuntimeDetection "런타임 CPU 감지가 가능하도록 컴파일되었습니다. - 경고 - 이것은 최적 조건이 아닙니다!\n최상의 성능을 얻기위해선, MPlayer를 --disable-runtime-cpudetection 옵션으로 다시 컴파일하세요.\n" -#define MSGTR_CompiledWithCPUExtensions "확장 x86 CPU용으로 컴파일 되었습니다.:" #define MSGTR_AvailableVideoOutputDrivers "가능한 비디오 출력 드라이버:\n" #define MSGTR_AvailableAudioOutputDrivers "가능한 오디오 출력 드리아버:\n" #define MSGTR_AvailableAudioCodecs "가능한 오디오 코덱:\n" @@ -107,7 +104,6 @@ #define MSGTR_AvailableAudioFm "\n가능한 (컴파일된) 오디오 코덱 집합/드라이버:\n" #define MSGTR_AvailableVideoFm "\n가능한 (컴파일된) 비디오 코덱 집합/드라이버:\n" #define MSGTR_AvailableFsType "가능한 전체화면 레이어 변경 모드:\n" -#define MSGTR_UsingRTCTiming "리눅스 하드웨어 RTC 타이밍(%ldHz)을 사용합니다.\n" #define MSGTR_CannotReadVideoProperties "비디오: 속성을 읽을 수 없습니다.\n" #define MSGTR_NoStreamFound "스티림을 찾을 수 없습니다.\n" #define MSGTR_ErrorInitializingVODevice "선택한 비디오 출력 (-vo) 장치를 열거나 초기화할 수 없습니다.\n" @@ -238,7 +234,6 @@ #define MSGTR_SwitchToNi "\n잘못된 interleaved AVI 파일을 발견했습니다. -ni 모드로 변경합니다...\n" #define MSGTR_Detected_XXX_FileFormat "%s 파일 형식을 발견했습니다.\n" #define MSGTR_DetectedAudiofile "오디오 파일을 감지하였습니다.\n" -#define MSGTR_NotSystemStream "MPEG 시스템 스트림 포맷이 아닙니다... (혹시 전송 스트림일지도?)\n" #define MSGTR_InvalidMPEGES "유효하지 않은 MPEG-ES 스트림??? 저작자에게 문의하세요, 버그일지도 모릅니다. :(\n" #define MSGTR_FormatNotRecognized "============= 죄송합니다. 이 파일형식을 인식하지못했거나 지원하지않습니다 ===============\n"\ "=== 만약 이 파일이 AVI, ASF 또는 MPEG 스트림이라면, 저작자에게 문의하세요! ===\n" @@ -260,11 +255,8 @@ #define MSGTR_MOVcomprhdr "MOV: 압축된 헤더는 (아직) 지원되지않습니다.\n" #define MSGTR_MOVvariableFourCC "MOV: 경고: 가변적인 FOURCC 발견!?\n" #define MSGTR_MOVtooManyTrk "MOV: 경고: 트랙이 너무 많습니다." -#define MSGTR_FoundAudioStream "==> 오디오 스트림을 찾았습니다.: %d\n" -#define MSGTR_FoundVideoStream "==> 비디오 스트림을 찾았습니다.: %d\n" #define MSGTR_DetectedTV "TV를 발견하였습니다! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "ogg 해석기를 열 수 없습니다.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: 오디오 스트림(id:%d)을 찾고 있습니다.\n" #define MSGTR_CannotOpenAudioStream "오디오 스트림을 열 수 없습니다.: %s\n" #define MSGTR_CannotOpenSubtitlesStream "자막 스트림을 열 수 없습니다.: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "오디오 해석기를 여는데 실패했습니다.: %s\n" @@ -296,21 +288,15 @@ #define MSGTR_UsingExternalPP "[PP] 외부 후행처리 필터를 사용합니다. max q = %d\n" #define MSGTR_UsingCodecPP "[PP] 코덱의 후행처리를 사용합니다. max q = %d\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "선택된 vo & vd가 비디오 속성 '%s'을(를) 지원하지 않습니다. \n" #define MSGTR_VideoCodecFamilyNotAvailableStr "요청한 비디오 코덱 집합 [%s] (vfm=%s)을(를) 사용할 수 없습니다. (컴파일시에 가능하도록 설정하세요.)\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "요청한 오디오 코텍 집합 [%s] (afm=%s)을(를) 사용할 수 없습니다. (컴파일시에 가능하도록 설정하세요.)\n" #define MSGTR_OpeningVideoDecoder "비디오 디코더를 열고 있습니다.: [%s] %s\n" #define MSGTR_OpeningAudioDecoder "오디오 디코더를 열고 있습니다.: [%s] %s\n" -#define MSGTR_UninitVideoStr "비디오 초기화를 취소합니다.: %s\n" -#define MSGTR_UninitAudioStr "오디오 초기화를 취소합니다.: %s\n" #define MSGTR_VDecoderInitFailed "비디오 디코더 초기화를 실패했습니다. :(\n" #define MSGTR_ADecoderInitFailed "오디오 디코더 초기화를 실패했습니다. :(\n" #define MSGTR_ADecoderPreinitFailed "오디오 디코더 사전 초기화를 실패했습니다. :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: 입력 버퍼로 %d 바이트를 할당합니다.\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: 출력 버퍼로 %d + %d = %d 바이트를 할당합니다.\n" // LIRC: -#define MSGTR_SettingUpLIRC "LIRC 지원을 시작합니다...\n" #define MSGTR_LIRCopenfailed "LIRC 지원 시작을 실패했습니다.\n" #define MSGTR_LIRCcfgerr "LIRC 설정파일 %s를 읽는데 실패했습니다.\n" @@ -347,7 +333,6 @@ #define MSGTR_Network "네트워크 스트리밍..." #define MSGTR_Preferences "선택사항" #define MSGTR_NoMediaOpened "미디어 없음" -#define MSGTR_VCDTrack "VCD 트랙 %d" #define MSGTR_NoChapter "챕터 없음" #define MSGTR_Chapter "챕터 %d" #define MSGTR_NoFileLoaded "파일 없음" @@ -415,7 +400,7 @@ #define MSGTR_MENU_AudioLanguages "오디오 언어" #define MSGTR_MENU_SubtitleLanguages "자막 언어" #define MSGTR_MENU_SkinBrowser "스킨선택" -#define MSGTR_MENU_Exit "종료..." +#define MSGTR_MENU_Exit "종료" #define MSGTR_MENU_Mute "음소거" #define MSGTR_MENU_Original "원래대로" #define MSGTR_MENU_AspectRatio "화면비율" @@ -469,9 +454,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "강제 프레임 건너뛰기 사용(위험함)" #define MSGTR_PREFERENCES_Flip "이미지 상하 반전" #define MSGTR_PREFERENCES_Panscan "팬스캔: " -#define MSGTR_PREFERENCES_OSDTimer "타이머 및 표시기" -#define MSGTR_PREFERENCES_OSDProgress "진행 막대만 표시" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "타이머, 퍼센트 및 전체시간" #define MSGTR_PREFERENCES_Subtitle "자막:" #define MSGTR_PREFERENCES_SUB_Delay "지연: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-mk.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-mk.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-mk.h 2011-04-03 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-mk.h 2011-10-25 13:55:48.000000000 +0000 @@ -57,7 +57,6 @@ #define MSGTR_NoHomeDir "Не може да го пронајде HOME директориумот.\n" #define MSGTR_GetpathProblem "get_path(\"конфигурирај\") проблем" #define MSGTR_CreatingCfgFile "Создавање на конфигурациона датотека: %s\n" -#define MSGTR_BuiltinCodecsConf "Користи вградени стандардни codecs.conf\n" #define MSGTR_CantLoadFont "Не може да се вчита фонтот: %s\n" #define MSGTR_CantLoadSub "Не може да се вчитаат преводите: %s\n" #define MSGTR_DumpSelectedStreamMissing "отпадок: ФАТАЛНО: недостига избраниот проток!\n" @@ -99,8 +98,6 @@ #define MSGTR_Playing "Пуштено %s\n" #define MSGTR_NoSound "Аудио: нема звук\n" #define MSGTR_FPSforced "FPS присилени да бидат %5.3f (ftime: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "Компајлирано со детекција на процесорот при извршувањето - ВНИМАНИЕ - ова не е оптимално!\nЗа да ги добиете најдобрите перформанси, рекомпалирајте го MPlayer со --disable-runtime-cpudetection\n" -#define MSGTR_CompiledWithCPUExtensions "Компајлирано за x86 Процесорите со наставките:" #define MSGTR_AvailableVideoOutputDrivers "Достапни излезни видео драјвери:\n" #define MSGTR_AvailableAudioOutputDrivers "Достапни излезни аудио драјвери:\n" #define MSGTR_AvailableAudioCodecs "Достапни аудио кодеци:\n" @@ -108,7 +105,6 @@ #define MSGTR_AvailableAudioFm "\nДостапни (внатрешно-компајлирани) фамилија/дајвери на аудио кодекот:\n" #define MSGTR_AvailableVideoFm "\nДостапни (внатрешно-компајлирани) фамилија/дајвери на видео кодекот:\n" #define MSGTR_AvailableFsType "Достапни модови за менување на слојот за цел екран:\n" -#define MSGTR_UsingRTCTiming "Користење на Линукс хардверско RTC тајмирање (%ldHz).\n" #define MSGTR_CannotReadVideoProperties "Видео: Не може да ги прочита својствата.\n" #define MSGTR_NoStreamFound "Не е пронајден проток.\n" #define MSGTR_ErrorInitializingVODevice "Грешка при отварањето/иницијализирањето на избраниот излезен видео (-vo) уред.\n" @@ -239,7 +235,6 @@ #define MSGTR_SwitchToNi "\nОткриена е лошо преклопена AVI датотека - се префрла на модот -ni...\n" #define MSGTR_Detected_XXX_FileFormat "Пронајден е %s формат на датотеката.\n" #define MSGTR_DetectedAudiofile "Пронајдена е аудио датотека.\n" -#define MSGTR_NotSystemStream "Не е формат на MPEG системски проток... (можеби е транспортен проток?)\n" #define MSGTR_InvalidMPEGES "Невалиден MPEG-ES проток??? Контактирајте со авторот, можеби е баг :(\n" #define MSGTR_FormatNotRecognized "============ Извинете, овој формат на датотеката не е пропознат/подржан =============\n"\ "=== Ако оваа датотека е AVI, ASF или MPEG проток, ве молиме контактирајте со авторот! ===\n" @@ -261,11 +256,8 @@ #define MSGTR_MOVcomprhdr "MOV: За подршка на компресирани хедери потребно е ZLIB!\n" #define MSGTR_MOVvariableFourCC "MOV: ПРЕДУПРЕДУВАЊЕ: Откриено е променливо FOURCC!?\n" #define MSGTR_MOVtooManyTrk "MOV: ПРЕДУПРЕДУВАЊЕ: премногу траки" -#define MSGTR_FoundAudioStream "==> Пронајден е аудио проток: %d\n" -#define MSGTR_FoundVideoStream "==> Пронајден е видео проток: %d\n" #define MSGTR_DetectedTV "Пронајден е ТВ! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Не може да се отвори ogg демуксерот.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Барање на аудио проток (id:%d).\n" #define MSGTR_CannotOpenAudioStream "Не може да се отвори аудио протокот: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Не може да се отвори протокот за преводи: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Не успеа да се отвори аудио демуксерот: %s\n" @@ -297,21 +289,15 @@ #define MSGTR_UsingExternalPP "[PP] Се користи надворешен постпроцесорски филтер, max q = %d.\n" #define MSGTR_UsingCodecPP "[PP] Се користи постпроцесирањето на кодекот, max q = %d.\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Видео атрибутот '%s' не е подржан при избирање на vo и vd.\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Бараната фамилија на видео кодекот [%s] (vfm=%s) не е достапна.\nОвозможете ја при компајлирањето.\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Бараната фамилија на видео кодекот [%s] (afm=%s) не е достапна.\nОвозможете ја при компајлирањето.\n" #define MSGTR_OpeningVideoDecoder "Се отвара видео декодерот: [%s] %s\n" #define MSGTR_OpeningAudioDecoder "Се отвара аудио декодерот: [%s] %s\n" -#define MSGTR_UninitVideoStr "Неиницијализирано видео: %s\n" -#define MSGTR_UninitAudioStr "Неиницијализирано аудио: %s\n" #define MSGTR_VDecoderInitFailed "Иницијализирањето на Видео Декодерот не успеа :(\n" #define MSGTR_ADecoderInitFailed "Иницијализирањето на Аудио Декодерот не успеа :(\n" #define MSGTR_ADecoderPreinitFailed "Преиницијализирањето на Аудио Декодерот не успеа :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Распоредување на %d бајти за влезниот бафер\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Распоредување %d + %d = %d бајти за излезниот бафер\n" // LIRC: -#define MSGTR_SettingUpLIRC "Се подесува LIRC подршката...\n" #define MSGTR_LIRCopenfailed "Не успеа да се отвори LIRC подршката.\n" #define MSGTR_LIRCcfgerr "Не успеа да се прочита LIRC конфигурационата датотека %s.\n" @@ -344,7 +330,6 @@ #define MSGTR_Network "Мрежен проток ..." #define MSGTR_Preferences "Подесувања" #define MSGTR_NoMediaOpened "Не е отворен медиум." -#define MSGTR_VCDTrack "VCD трака %d" #define MSGTR_NoChapter "Нема поглавје" #define MSGTR_Chapter "Поглавје %d" #define MSGTR_NoFileLoaded "Не е вчитана датотека." @@ -413,7 +398,7 @@ #define MSGTR_MENU_AudioLanguages "Аудио јазици" #define MSGTR_MENU_SubtitleLanguages "Јазици на преводите" #define MSGTR_MENU_SkinBrowser "Разгледувач на скинови" -#define MSGTR_MENU_Exit "Излези ..." +#define MSGTR_MENU_Exit "Излези " #define MSGTR_MENU_Mute "Мутирај" #define MSGTR_MENU_Original "Оригинал" #define MSGTR_MENU_AspectRatio "Пропорционалност" @@ -467,9 +452,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Овозможи ТЕШКО изоставување на фрејмови (опасно)" #define MSGTR_PREFERENCES_Flip "Преврти ја сликата наопаку" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Тајмер и индикатори" -#define MSGTR_PREFERENCES_OSDProgress "Само прогрес баровите" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Тајмер, процентажа и тотално време" #define MSGTR_PREFERENCES_Subtitle "Превод:" #define MSGTR_PREFERENCES_SUB_Delay "Задоцнување: " #define MSGTR_PREFERENCES_SUB_FPS "FPS (Фрејмови Во Секунда):" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-nb.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-nb.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-nb.h 2011-04-03 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-nb.h 2011-10-25 13:55:48.000000000 +0000 @@ -155,7 +155,6 @@ #define MSGTR_UnknownAudio "Ukjent/manglende lydformat, bruker nosound\n" // LIRC: -#define MSGTR_SettingUpLIRC "Setter opp lirc støtte...\n" #define MSGTR_LIRCopenfailed "Feil under åpning av lirc!\n" #define MSGTR_LIRCcfgerr "Feil under lesing av lirc konfigurasjonsfil %s!\n" @@ -230,7 +229,7 @@ #define MSGTR_MENU_SubtitleLanguages "Tekst språk" #define MSGTR_MENU_SkinBrowser "Skin velger" #define MSGTR_MENU_Preferences "Preferanser" -#define MSGTR_MENU_Exit "Avslutt..." +#define MSGTR_MENU_Exit "Avslutt" // --- messagebox #define MSGTR_MSGBOX_LABEL_FatalError "fatal feil..." diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-nl.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-nl.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-nl.h 2011-04-03 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-nl.h 2011-12-05 11:38:08.000000000 +0000 @@ -57,7 +57,6 @@ #define MSGTR_NoHomeDir "Kan HOME dir niet vinden\n" #define MSGTR_GetpathProblem "get_path(\"config\") probleem\n" #define MSGTR_CreatingCfgFile "Bezig met het creëren van configuratie bestand: %s\n" -#define MSGTR_BuiltinCodecsConf "De standaard ingebouwde codecs.conf wordt gebruikt\n" #define MSGTR_CantLoadFont "Kan font niet laden: %s\n" #define MSGTR_CantLoadSub "Kan ondertitels niet lezen: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: FATAL: geselecteerde stream ontbreekt!\n" @@ -99,8 +98,6 @@ #define MSGTR_Playing "Bezig met het afspelen van %s\n" #define MSGTR_NoSound "Audio: geen geluid!!!\n" #define MSGTR_FPSforced "FPS geforceerd om %5.3f te zijn (ftime: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "Gecompileerd met RUNTIME CPU detectie - waarschuwing, dit is niet optimaal! Om de best mogelijke performantie te krijgen, hercompileer je mplayer met --disable-runtime-cpudetection\n" -#define MSGTR_CompiledWithCPUExtensions "Gecompileerd voor x86 CPU met de volgende uitbreidingen:" #define MSGTR_AvailableVideoOutputDrivers "Beschikbare video output drivers:\n" #define MSGTR_AvailableAudioOutputDrivers "Beschikbare audio output drivers:\n" #define MSGTR_AvailableAudioCodecs "Beschikbare audio codecs:\n" @@ -108,7 +105,6 @@ #define MSGTR_AvailableAudioFm "\nBeschikbare (ingecompileerde) audio codec families/drivers:\n" #define MSGTR_AvailableVideoFm "\nBeschikbare (ingecompileerde) video codec families/drivers:\n" #define MSGTR_AvailableFsType "Beschikbare fullscreen modi:\n" -#define MSGTR_UsingRTCTiming "Er wordt gebruik gemaakt van Linux's hardware RTC timing (%ldHz)\n" #define MSGTR_CannotReadVideoProperties "Video: kan eigenschappen niet lezen\n" #define MSGTR_NoStreamFound "Geen stream gevonden\n" #define MSGTR_ErrorInitializingVODevice "Fout bij het openen/initialiseren van het gekozen video_out (-vo) apparaat!\n" @@ -140,14 +136,11 @@ #define MSGTR_LoadingConfig "Bezig met het laden van de configuratie '%s'\n" #define MSGTR_AddedSubtitleFile "SUB: bestand met ondertitels toegevoegd (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "Fout bij het openen van het bestand [%s]! Geen schrijfrechten!\n" -#define MSGTR_CommandLine "CommandLine:" #define MSGTR_RTCDeviceNotOpenable "Kon %s niet openen: %s (moet leesbaar zijn voor deze gebruiker.)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Linux RTC initialisatiefout in ioctl (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Probeer \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" toe te voegen in de opstartbestanden van uw systeem.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Linux RTC initialisatiefout in ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "Gebruikt %s timing.\n" -#define MSGTR_MenuInitialized "Menu geinitialiseerd: %s\n" -#define MSGTR_MenuInitFailed "Menu initialisatie mislukt.\n" #define MSGTR_Getch2InitializedTwice "WAARSCHUWING: getch2_init is twee maal opgeroepen!\n" #define MSGTR_DumpstreamFdUnavailable "Deze stream can niet opgeslagen worde - geen bestandsomschrijving (file descriptor) beschikbaar.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Kan de libmenu video filter niet openen met het root menu %s.\n" @@ -205,12 +198,9 @@ #define MSGTR_MP3AudioSelected "MP3 audio geselecteerd\n" #define MSGTR_CannotAllocateBytes "Kon %d bytes niet toewijzen\n" #define MSGTR_SettingAudioDelay " AUDIO DELAY wordt gezet op %5.3f\n" -#define MSGTR_SettingAudioInputGain "De audio input verstreking wordt ingesteld op %f\n" -#define MSGTR_LamePresetEquals "\npreset=%s\n\n" #define MSGTR_LimitingAudioPreload "Audio audio preload wordt beperkt tot 0.4s\n" #define MSGTR_IncreasingAudioDensity "Audio densiteit wordt opgevoerd tot 4\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Audio preload wordt ingesteld op 0, max pts correctie is 0\n" -#define MSGTR_CBRAudioByterate "\n\nCBR audio: %d bytes/sec, %d bytes/blok\n" #define MSGTR_LameVersion "LAME versie %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Fout: De ingestelde bitrate valt buiten het bereik van deze preset\n"\ "\n"\ @@ -390,8 +380,6 @@ #define MSGTR_CodecNeedsOutfmt "\ncodec(%s) heeft 'outfmt' nodig!\n" #define MSGTR_CantAllocateComment "Kan geen geheugen toewijzen voor commentaar. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "Percent ingelezen %s: " -#define MSGTR_CantOpenFileError "Kan '%s' niet openen: %s\n" #define MSGTR_CantGetMemoryForLine "Kan geen geheugen toewijzen voor 'line': %s\n" #define MSGTR_CantReallocCodecsp "Kan '*codecsp' niet re-alloceren: %s\n" #define MSGTR_CodecNameNotUnique "De codec naam '%s' is niet uniek." @@ -445,7 +433,6 @@ #define MSGTR_SwitchToNi "\nSlecht geinterleaved .AVI bestand gedetecteerd - schakel om naar -ni mode!\n" #define MSGTR_Detected_XXX_FileFormat "%s bestandsformaat gedetecteerd!\n" #define MSGTR_DetectedAudiofile "Audio bestandsformaat gedetecteerd!\n" -#define MSGTR_NotSystemStream "Geen MPEG System Stream formaat... (misschien Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Invalid MPEG-ES stream??? Contacteer de auteur, het zou een bug kunnen zijn :(\n" #define MSGTR_FormatNotRecognized "============= Sorry, dit bestandsformaat niet herkend/ondersteund ===============\n"\ "=== Als dit een AVI bestand, ASF bestand of MPEG stream is, contacteer dan aub de auteur! ===\n" @@ -467,11 +454,8 @@ #define MSGTR_MOVcomprhdr "MOV: Gecomprimeerde headers (nog) niet ondersteund!\n" #define MSGTR_MOVvariableFourCC "MOV: Waarschuwing! variabele FOURCC gedetecteerd!?\n" #define MSGTR_MOVtooManyTrk "MOV: Waarschuwing! te veel tracks!" -#define MSGTR_FoundAudioStream "==> Audio stream gevonden: %d\n" -#define MSGTR_FoundVideoStream "==> Video stream gevonden: %d\n" #define MSGTR_DetectedTV "TV gedetecteerd! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Kan de Ogg demuxer niet openen\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Bezig met zoeken naar audio stream (id:%d)\n" #define MSGTR_CannotOpenAudioStream "Kan audio stream niet openen: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Kan ondertitelingstream niet openen: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Kan audio demuxer niet openen: %s\n" @@ -503,21 +487,15 @@ #define MSGTR_UsingExternalPP "[PP] Gebruik makend van externe postprocessing filter, max q = %d\n" #define MSGTR_UsingCodecPP "[PP] Gebruik makend van de codec's interne postprocessing, max q = %d\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Video attribuut '%s' wordt niet ondersteund door de gekozen vo & vd! \n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Aangevraagde video codec familie [%s] (vfm=%s) niet beschikbaar (activeer het bij het compileren!)\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Aangevraagde audio codec familie [%s] (afm=%s) niet beschikbaar (activeer het bij het compileren!)\n" #define MSGTR_OpeningVideoDecoder "Bezig met het openen van de video decoder: [%s] %s\n" #define MSGTR_OpeningAudioDecoder "Bezig met het openen van de audio decoder: [%s] %s\n" -#define MSGTR_UninitVideoStr "Deinitialisatie video: %s \n" -#define MSGTR_UninitAudioStr "Deinitialisatie audio: %s \n" #define MSGTR_VDecoderInitFailed "VDecoder initialisatie mislukt :(\n" #define MSGTR_ADecoderInitFailed "ADecoder initialisatie mislukt :(\n" #define MSGTR_ADecoderPreinitFailed "ADecoder preinitialisatie mislukt :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Bezig met het toekennen van %d bytes voor de invoer buffer\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Bezig met het toekennen van %d + %d = %d bytes voor uitvoer buffer\n" // LIRC: -#define MSGTR_SettingUpLIRC "Bezig met configuratie van lirc ondersteuning...\n" #define MSGTR_LIRCopenfailed "Laden van lirc ondersteuning mislukt!\n" #define MSGTR_LIRCcfgerr "Lezen van LIRC config bestand mislukt %s!\n" @@ -535,8 +513,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "De binary codecs moeten worden geinstalleerd of bijgewerkt.\nZie http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO: Win32/DShow video codec initialisatie OK.\n" -#define MSGTR_DMOInitOK "INFO: Win32/DMO video codec initialisatie OK.\n" // x11_common.c #define MSGTR_EwmhFullscreenStateFailed "\nX11: Kon de \"EWMH fullscreen Event!\" niet versturen\n" @@ -562,7 +538,6 @@ #define MSGTR_Preferences "Voorkeuren" #define MSGTR_AudioPreferences "Audio configuratie" #define MSGTR_NoMediaOpened "geen mediabestand geopend" -#define MSGTR_VCDTrack "VCD track %d" #define MSGTR_NoChapter "geen hoofdstuk" #define MSGTR_Chapter "hoofdstuk %d" #define MSGTR_NoFileLoaded "geen bestand geladen" @@ -633,7 +608,7 @@ // TODO: Why is this different from MSGTR_PlayList? #define MSGTR_MENU_PlayList "Playlist" #define MSGTR_MENU_SkinBrowser "Skin browser" -#define MSGTR_MENU_Exit "Afsluiten..." +#define MSGTR_MENU_Exit "Afsluiten" #define MSGTR_MENU_Mute "Mute" #define MSGTR_MENU_Original "Origineel" #define MSGTR_MENU_AspectRatio "Aspect ratio" @@ -688,9 +663,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Gebruik HARD frame drop(gevaarlijk)" #define MSGTR_PREFERENCES_Flip "Keer het beeld ondersteboven" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Timer en indicatoren" -#define MSGTR_PREFERENCES_OSDProgress "Enkel voortgangsbalk" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Timer, percentage en totale tijd" #define MSGTR_PREFERENCES_Subtitle "Ondertiteling:" #define MSGTR_PREFERENCES_SUB_Delay "Vertraging: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" @@ -803,9 +775,7 @@ // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "De interlaced mode vereist een beeldhoogte die deelbaar is door vier." #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "Kan geen \"lijn\" buffer toewijzen voor de interlaced mode." -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "Input is geen RGB, de chrominantie kan niet opgesplitst worden op basis van de velden!" #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "De beeldbreedte moet deelbaar zijn door twee." -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "Niet genoeg geheugen om een RGB framebuffer toe te wijzen." #define MSGTR_VO_YUV4MPEG_OutFileOpenError "Kan geen geheugen of \"file handle\" verkrijgen om de \"%s\" te schrijven!" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "Fout bij het schrijven van het beeld naar de output!" #define MSGTR_VO_YUV4MPEG_UnknownSubDev "Ongekende subapparaat: %s" @@ -884,39 +854,6 @@ #define MSGTR_AO_SGI_PauseInfo "[AO SGI] audio_pause: ...\n" #define MSGTR_AO_SGI_ResumeInfo "[AO SGI] audio_resume: ...\n" -// ao_sun.c -#define MSGTR_AO_SUN_RtscSetinfoFailed "[AO SUN] rtsc: SETINFO failed.\n" -#define MSGTR_AO_SUN_RtscWriteFailed "[AO SUN] rtsc: write failed." -#define MSGTR_AO_SUN_CantOpenAudioDev "[AO SUN] Can't open audio device %s, %s -> nosound.\n" -#define MSGTR_AO_SUN_UnsupSampleRate "[AO SUN] audio_setup: your card doesn't support %d channel, %s, %d Hz samplerate.\n" -#define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** Your audio driver DOES NOT support select() ***\nRecompile MPlayer with #undef HAVE_AUDIO_SELECT in config.h !\n\n" -#define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\nFatal error: *** CANNOT RE-OPEN / RESET AUDIO DEVICE (%s) ***\n" - -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init: gevraagd formaat: %d Hz, %d channels, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init: geen geluidskaart gevonden.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init: ongeldig formaat (%s) gevraagd - output uitgeschakeld.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init: fout bij het afspelen : %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init: pcm info fout: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init: %d geluidskaart(en) gevonden, in gebruik: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init: pcm kanaal info fout: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init: fout bij het instellen van de parameters: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init: fout bij het instellen van het kanaal: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init: fout bij het voorbereiden van het kanaal: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit: playback drain fout: %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit: playback flush fout: %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit: fout bij het sluiten van de pcm : %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset: playback drain fout: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset: playback flush fout: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset: fout bij het voorbereiden van het kanaal: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause: playback drain fout: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause: playback flush fout: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume: fout bij het voorbereiden van het kanaal: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play: alsa buffer leeg, de stream wordt gereset.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play: fout bij het voorbereiden van het afspelen: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play: schrijffout na reset: %s - we geven op.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play: output fout: %s\n" - // ao_plugin.c #define MSGTR_AO_PLUGIN_InvalidPlugin "[AO PLUGIN] ongeldige plugin: %s\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-pl.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-pl.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-pl.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-pl.h 2011-12-05 11:38:13.000000000 +0000 @@ -61,7 +61,6 @@ #define MSGTR_NoHomeDir "Nie mogę odnaleźć katalogu domowego.\n" #define MSGTR_GetpathProblem "Problem z get_path(\"config\")\n" #define MSGTR_CreatingCfgFile "Tworzę plik konfiguracyjny: %s\n" -#define MSGTR_BuiltinCodecsConf "Używam wbudowanego codecs.conf.\n" #define MSGTR_CantLoadFont "Nie mogę załadować czcionki: %s\n" #define MSGTR_CantLoadSub "Nie mogę załadować napisów: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: Błąd krytyczny: Wybrany strumień nie istnieje!\n" @@ -103,8 +102,6 @@ #define MSGTR_Playing "\nOdtwarzam %s.\n" #define MSGTR_NoSound "Audio: brak dźwięku\n" #define MSGTR_FPSforced "Wymuszono FPS na %5.3f (ftime: %5.3f).\n" -#define MSGTR_CompiledWithRuntimeDetection "Skompilowane z wykrywaniem procesora przy starcie.\n" -#define MSGTR_CompiledWithCPUExtensions "Skompilowano dla procesora x86 z rozszerzeniami:" #define MSGTR_AvailableVideoOutputDrivers "Dostępne wyjściowe sterowniki video:\n" #define MSGTR_AvailableAudioOutputDrivers "Dostępne wyjściowe sterowniki audio:\n" #define MSGTR_AvailableAudioCodecs "Dostępne kodeki audio :\n" @@ -112,7 +109,6 @@ #define MSGTR_AvailableAudioFm "Dostępne (wkompilowane) kodeki/sterowniki audio:\n" #define MSGTR_AvailableVideoFm "Dostępne (wkompilowane) kodeki/sterowniki video:\n" #define MSGTR_AvailableFsType "Dostępne tryby pełnoekranowe:\n" -#define MSGTR_UsingRTCTiming "Używam sprzętowego zegara RTC (%ldHz).\n" #define MSGTR_CannotReadVideoProperties "Wideo: Nie mogę wczytać właściwości.\n" #define MSGTR_NoStreamFound "Brak strumienia.\n" #define MSGTR_ErrorInitializingVODevice "Błąd przy otwieraniu/inicjalizacji wybranego urządzenia video (-vo).\n" @@ -144,14 +140,11 @@ #define MSGTR_AddedSubtitleFile "SUB: Dodaje plik z napisami (%d): %s\n" #define MSGTR_RemovedSubtitleFile "SUB: Usuwam plik z napisami (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "Błąd przy otwieraniu pliku [%s] do zapisu!\n" -#define MSGTR_CommandLine "WierszPoleceń:" #define MSGTR_RTCDeviceNotOpenable "Nie moge otworzyć %s: %s (użytkownik powinien mieć prawo odczytu.)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Błąd RTC Linuxa w ioctl (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Spróbuj dodać \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" do skryptów startowych swojego systemu.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Błąd RTC Linuxa w ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "Używam synchronizacji %s.\n" -#define MSGTR_MenuInitialized "Menu zainicjowane: %s\n" -#define MSGTR_MenuInitFailed "Nie mogę zainicjować menu.\n" #define MSGTR_Getch2InitializedTwice "UWAGA: getch2_init wywołany dwukrotnie!\n" #define MSGTR_DumpstreamFdUnavailable "Nie mogę zrzucić strumienia - brak deskryptora pliku\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Nie mogę otworzyć filtru video libmenu z głownym menu %s.\n" @@ -269,12 +262,9 @@ #define MSGTR_CannotAllocateBytes "Nie mogę zaalokować %d bajtów.\n" #define MSGTR_SettingAudioDelay "Ustawiam opóźnienie audio na %5.3fs.\n" #define MSGTR_SettingVideoDelay "Ustawiam opóźnienie video na %5.3fs.\n" -#define MSGTR_SettingAudioInputGain "Ustawiam wzmocnienie wejścia dźwięku na %f.\n" -#define MSGTR_LamePresetEquals "\nustawienie=%s\n\n" #define MSGTR_LimitingAudioPreload "Ograniczam buforowanie audio do 0.4s.\n" #define MSGTR_IncreasingAudioDensity "Zwiększam gęstość audio do 4.\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Wymuszam buforowanie audio do 0, max korekcja pts do 0.\n" -#define MSGTR_CBRAudioByterate "\n\nCBR audio: %d bajtów/sek, %d bajtów/blok\n" #define MSGTR_LameVersion "wersja kodeka LAME %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Błąd: Wybrany bitrate jest poza poprawnym zakresem dla tego ustawienia.\n"\ "\n"\ @@ -459,8 +449,6 @@ #define MSGTR_CodecNeedsOutfmt "\nkodek(%s) wymaga 'outfmt'!\n" #define MSGTR_CantAllocateComment "Nie mogę zaalokować pamięci na komentarz. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "Wczytuję %s: " -#define MSGTR_CantOpenFileError "Nie mogę otworzyć '%s': %s\n" #define MSGTR_CantGetMemoryForLine "Brak pamięci na 'line': %s\n" #define MSGTR_CantReallocCodecsp "Nie mogę zaalokować ponownie '*codecsp': %s\n" #define MSGTR_CodecNameNotUnique "Nazwa kodeka '%s' nie jest unikalna." @@ -540,7 +528,6 @@ #define MSGTR_WarningLenIsntDivisible "Uwaga, len nie dzieli sie przez wielkość próbki!\n" #define MSGTR_MuxbufMallocErr "Bufor ramek muxer nie może zaalokować pamięci!\n" #define MSGTR_MuxbufReallocErr "Bufor ramek muxer nie może realokować pamięci!\n" -#define MSGTR_MuxbufSending "Bufor ramek muxer wysyła %d ramek.\n" #define MSGTR_WritingHeader "Zapisuję nagłówek...\n" #define MSGTR_WritingTrailer "Zapisuję index...\n" @@ -554,7 +541,6 @@ #define MSGTR_SwitchToNi "\nWykryłem plik AVI z błędnym przeplotem - przełączam na tryb -ni...\n" #define MSGTR_Detected_XXX_FileFormat "Wykryto format pliku %s.\n" #define MSGTR_DetectedAudiofile "Wykryto plik audio.\n" -#define MSGTR_NotSystemStream "Strumień nie w formacie MPEG... (może Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Błędny strumień MPEG-ES??? Skontaktuj się z autorem, to może być błąd :(\n" #define MSGTR_FormatNotRecognized "============ Niestety, ten format pliku jest nieobsługiwany =============\n"\ "=== Jeśli plik to AVI lub strumień ASF, MPEG proszę skontaktuj się z autorem! ===\n" @@ -576,11 +562,8 @@ #define MSGTR_MOVcomprhdr "MOV: obsługiwanie skompresowanych nagłówków wymaga ZLIB!\n" #define MSGTR_MOVvariableFourCC "MOV: UWAGA: Wykryto zmienny FourCC!?\n" #define MSGTR_MOVtooManyTrk "MOV: UWAGA: za dużo ścieżek" -#define MSGTR_FoundAudioStream "==> Znalazłem strumień audio: %d\n" -#define MSGTR_FoundVideoStream "==> Znalazłem strumień video: %d\n" #define MSGTR_DetectedTV "Wykryłem TV! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Błąd otwierania Ogg demuxer.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Poszukuję strumienia audio (id:%d).\n" #define MSGTR_CannotOpenAudioStream "Nie mogę otworzyć strumienia audio: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Nie mogę otworzyć strumienia z napisami: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Otwieranie demuxer'a audio nie powiodło się: %s\n" @@ -619,24 +602,17 @@ #define MSGTR_UsingExternalPP "[PP] Używam zewnętrznego filtra postprocessing, max q = %d.\n" #define MSGTR_UsingCodecPP "[PP] Używam filtra postprocessing kodeka, max q = %d.\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Atrybut video '%s' nie jest obsługiwany przez wybrany vo & vd.\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Zażądano rodziny kodeków video [%s] (vfm=%s) niedostępna.\nWłącz ją przy kompilacji.\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Zażądano rodziny kodeków audio [%s] (afm=%s) niedostępna.\nWłącz ją przy kompilacji.\n" #define MSGTR_OpeningVideoDecoder "Otwieram dekoder video: [%s] %s\n" #define MSGTR_SelectedVideoCodec "Wybrany kodek video: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Otwieram dekoder audio: [%s] %s\n" #define MSGTR_SelectedAudioCodec "Wybrany kodek audio: [%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "Tworzę łańcuch filtrów audio dla %dHz/%dch/%s -> %dHz/%dch/%s...\n" -#define MSGTR_UninitVideoStr "Deinicjalizacja video: %s\n" -#define MSGTR_UninitAudioStr "Deinicjalizacja audio: %s\n" #define MSGTR_VDecoderInitFailed "Nie udało się zainicjowac VDecoder'a :(\n" #define MSGTR_ADecoderInitFailed "Nie udało się zainicjowac ADecoder'a :(\n" #define MSGTR_ADecoderPreinitFailed "Preinicjalizacja ADecoder'a nie powiodła się :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Alokuję %d bajtów na bufor wejściowy.\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Alokuję %d + %d = %d bajtów na bufor wyjściowy.\n" // LIRC: -#define MSGTR_SettingUpLIRC "Uruchamiam obsługę LIRC...\n" #define MSGTR_LIRCopenfailed "Nie udało się uruchomić obsługi LIRC. Nie będziesz mogł używać swojego pilota.\n" #define MSGTR_LIRCcfgerr "Nie udało się wczytać pliku konfiguracyjnego LIRC %s.\n" @@ -654,8 +630,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Musisz uaktualnić/zainstalować pakiet kodeków.\nZnajdziesz go na http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO: Inicjalizacja kodeka video Win32/DShow OK.\n" -#define MSGTR_DMOInitOK "INFO: Inicjalizacja kodeka video Win32/DMO OK.\n" // x11_common.c #define MSGTR_EwmhFullscreenStateFailed "\nX11: Nie mogłem wysłać zdarzenia pełnoekranowego EWMH !\n" @@ -686,7 +660,6 @@ #define MSGTR_Preferences "Opcje" #define MSGTR_AudioPreferences "Konfiguracja sterownika audio" #define MSGTR_NoMediaOpened "Nie otwarto żadnego nośnika." -#define MSGTR_VCDTrack "Ścieżka VCD %d" #define MSGTR_NoChapter "Brak rozdziału" #define MSGTR_Chapter "Rozdział %d" #define MSGTR_NoFileLoaded "Nie wczytano pliku." @@ -709,9 +682,6 @@ // --- skin loader error messages #define MSGTR_SKIN_ERRORMESSAGE "[skórka] błąd w pliku konfiguracyjnym skórki, linia %d: %s" -#define MSGTR_SKIN_WARNING1 "[skórka] uwaga: w pliku konfiguracyjnym, wiersz %d:\nznacznik widget (%s) znaleziony lecz brak \"section\" przed nim" -#define MSGTR_SKIN_WARNING2 "[skórka] uwaga: w pliku konfiguracyjnym, wiersz %d:\nznacznik widget (%s) znaleziony lecz brak \"subsection\" przed nim" -#define MSGTR_SKIN_WARNING3 "[skórka] uwaga: w pliku konfiguracyjnym, wiersz %d:\nta podsekcja nie jest obsługiwana przez widget (%s)" #define MSGTR_SKIN_SkinFileNotFound "[skórka] plik ( %s ) nie znaleziony.\n" #define MSGTR_SKIN_SkinFileNotReadable "[skórka] nie mogę odczytać pliku ( %s ).\n" #define MSGTR_SKIN_BITMAP_16bit "Bitmapy o głębokości <=16 bitów nie są obsgługiwane (%s).\n" @@ -764,7 +734,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "Przeglądarka skórek" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Wyjście..." +#define MSGTR_MENU_Exit "Wyjście" #define MSGTR_MENU_Mute "Wycisz" #define MSGTR_MENU_Original "Oryginalnie" #define MSGTR_MENU_AspectRatio "Format" @@ -826,9 +796,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Włącz pomijanie dużej ilości klatek (niebezpieczne)" #define MSGTR_PREFERENCES_Flip "Odwróć obraz" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Czas i wskaźniki" -#define MSGTR_PREFERENCES_OSDProgress "Tylko belka" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Czas, czas w procentach i czas całkowity" #define MSGTR_PREFERENCES_Subtitle "Napisy:" #define MSGTR_PREFERENCES_SUB_Delay "Opóźnienie: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" @@ -995,9 +962,7 @@ // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "Tryb przeplotu wymaga aby wysokość obrazu była podzielna przez 4." #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "Nie mogę zaalokować bufora lini dla trybu przeplotu." -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "Wejście nie jest w formacie RGB, nie mogę oddzielić jasności przez pola!" #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "Szerokość obrazu musi być podzielna przez 2." -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "Za mało pamięci aby zaalokować bufor klatek RGB." #define MSGTR_VO_YUV4MPEG_OutFileOpenError "Nie mogę dostać pamięci lub pliku aby zapisać \"%s\"!" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "Błąd zapisu pliku na wyjście!" #define MSGTR_VO_YUV4MPEG_UnknownSubDev "Nieznane podurządzenie: %s" @@ -1103,31 +1068,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** Twój sterownik dźwięku NIE OBSŁUGUJE select() ***\nPrzekompiluj MPlayer z opcją #undef HAVE_AUDIO_SELECT w config.h !\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\nFatal error: *** Nie mogę otworzyć ponownie/zresetować urządzenia audio (%s) ***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init: żądany format: %d Hz, %d kanały, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init: nie znaleziono żadnych kart dźwiękowych.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init: żądanie niewłaściwego formatu (%s)a - wyjście wyłączone.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init: błąd odtwarzania: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init: bład PCM info: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init: znalazłem %d kart dźwiękowych, używam: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init: błąd PCM channel info: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init: błąd ustawiania paremetrów: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init: błąd ustawiania kanału: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init: błąd przygotowywania kanału: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit: błąd odsączania odtwarzania: %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit: błąd czyszczenia odtwarzania: %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit: błąd zamykania PCM: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset: błąd odsączania odtwarzania: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset: błąd czyszczenia odtwarzania: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset: błąd przygotowywania kanału: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause: błąd odsączania odtwarzania: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause: błąd czyszczenia odtwarzania: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume: błąd przygotowywania kanału: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play: błąd alsa, resetuję strumień.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play: błąd przygotowywania do odtwarzania: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play: błąd zapisu po resecie: %s - przestaję.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play: błąd wyjścia: %s\n" - // ao_plugin.c #define MSGTR_AO_PLUGIN_InvalidPlugin "[AO PLUGIN] nieprawidłowa wtyczka: %s\n" @@ -1161,7 +1101,6 @@ // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "Otwieram joystick %s\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "Nie mogę otworzyć dźojstika %s: %s\n" #define MSGTR_INPUT_JOYSTICK_ErrReading "Błąd odczytu dźojstika: %s\n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "Joystick: Tracę %d bajtów danych\n" @@ -1202,13 +1141,13 @@ #define MSGTR_MPDEMUX_URL_StringAlreadyEscaped "Łancuch wydaje się być już zakodowany w url_escape %c%c1%c2\n" -// ai_alsa1x.c +// ai_alsa.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "Nie mogę ustawić częstotliwości próbkowania.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "Nie moge ustawić czasu bufora.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "Nie mogę ustawić czasu okresu.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "Nie mogę ustawić częstotliwości próbkowania.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "Nie moge ustawić czasu bufora.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "Nie mogę ustawić czasu okresu.\n" -// ai_alsa1x.c / ai_alsa.c +// ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "Błędna konfiguracja tego PCM: brak dostępnych konfiguracji.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "Niedostępny tryb dostępu.\n" @@ -1218,9 +1157,7 @@ #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "Nie można używać okresu równego rozmiarowi bufora (%u == %lu)\n" #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "Nie mogę zainstalować parametrów oprogramowania:\n" #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "Błąd otwierania dźwięku: %s\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "Błąd statusu ALSA : %s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun!!! (długości co najmniej %.3f ms)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "Status ALSA :\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun: błąd przygotowywania: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "ALSA błąd odczytu/zapisu" @@ -1294,7 +1231,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "nieznany typ strumienia ASF\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "Błąd interpretacji odpowiedzi HTTP.\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "Serwer zwrócił %d:%s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "Ostrzeżenie intepretacji ASF HTTP : Pragma %s obcięte z %zd bajtów do %d\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "Ostrzeżenie intepretacji ASF HTTP : Pragma %s obcięte z %zu bajtów do %zu\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "błąd zapisu gniazda: %s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "Błąd interpretacji nagłówka.\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "Nie odnaleziono strumienia.\n" @@ -1312,17 +1249,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "** pusta lista?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "Znalazłem film na pozycji 0x%X - 0x%X\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "Znalazłem 'bih', %u bajtów z %d\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "Regeneruję tabelę klatek kluczowych dla M$ mpg4v1 video.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "Regeneruję tabelę klatek kluczowych dla DIVX3 video.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "Regeneruję tabelę klatek kluczowych dla MPEG-4 video.\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "Znalazłem 'wf', %d bajtów z %d\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI: znalazłem dmlh (rozmiar=%d) (razem_klatek=%d)\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "Czytam blok INDEX, %d kawałków na %d klatek (fpos=%"PRId64").\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "Dodatkowy nagłówek RIFF ...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** OSTRZEŻENIE: to nie jest rozszerzony nagłówek AVI..\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "Zepsuty kawałek danych? rozmiar=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI: ODML: Tworzę index ODML (%d kawałków superindex).\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI: ODML: Zepsuty (niepełny?) plik. Użyję tradycyjnego indeksu.\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "Nie mogę stworzyć pliku z indeksem %s: %s\n" @@ -1783,11 +1710,8 @@ #define MSGTR_RADIO_WrongChannelNumberInt "[radio] Nieprawidłowy numer kanału: %d\n" #define MSGTR_RADIO_WrongChannelName "[radio] Nieprawidłowa nazwa kanału: %s\n" #define MSGTR_RADIO_FreqParameterDetected "[radio] Wykryłem częstotliwośc radia.\n" -#define MSGTR_RADIO_DoneParsingChannels "[radio] Skończyłem interpretować kanały.\n" #define MSGTR_RADIO_GetTunerFailed "[radio] Uwaga: ioctl get tuner nie powiodło się: %s. Ustawiam frac na %d.\n" #define MSGTR_RADIO_NotRadioDevice "[radio] %s nie jest radiem!\n" -#define MSGTR_RADIO_TunerCapLowYes "[radio] tuner to low:yes frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[radio] tuner to low:no frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[radio] ioctl set frequency 0x%x (%.2f) nie powiodło się: %s\n" #define MSGTR_RADIO_GetFreqFailed "[radio] ioctl get frequency nie powiodło się: %s\n" #define MSGTR_RADIO_SetMuteFailed "[radio] ioctl set mute nie powiodło się: %s\n" @@ -1797,20 +1721,16 @@ #define MSGTR_RADIO_DroppingFrame "\n[radio] szkoda - opuszczam klatkę dźwiękową (%d bajtów)!\n" #define MSGTR_RADIO_BufferEmpty "[radio] grab_audio_frame: bufor pusty, czekam na %d bajtów danych.\n" #define MSGTR_RADIO_AudioInitFailed "[radio] audio_in_init nie powiodło się: %s\n" -#define MSGTR_RADIO_AudioBuffer "[radio] Nagrywanie dźwięku - bufor=%d bajtów (blok=%d bajtów).\n" #define MSGTR_RADIO_AllocateBufferFailed "[radio] nie mogę zaalokować bufora audio (blok=%d,buf=%d): %s\n" #define MSGTR_RADIO_CurrentFreq "[radio] Obecna częstotliwość: %.2f\n" #define MSGTR_RADIO_SelectedChannel "[radio] Wybrano kanał: %d - %s (częstotliwość: %.2f)\n" #define MSGTR_RADIO_ChangeChannelNoChannelList "[radio] Nie mogę zmienić kanału: nie podano listy kanałów .\n" #define MSGTR_RADIO_UnableOpenDevice "[radio] Nie mogę otworzyć'%s': %s\n" -#define MSGTR_RADIO_RadioDevice "[radio] Radio fd: %d, %s\n" #define MSGTR_RADIO_InitFracFailed "[radio] init_frac nie powiodło się.\n" #define MSGTR_RADIO_WrongFreq "[radio] Nieprawidłowa częstotliwość: %.2f\n" #define MSGTR_RADIO_UsingFreq "[radio] Używam częstotliwości: %.2f.\n" #define MSGTR_RADIO_AudioInInitFailed "[radio] audio_in_init nie powiodło się.\n" -#define MSGTR_RADIO_BufferString "[radio] %s: w buforze=%d opuszczono=%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[radio] wywołanie audio_in_setup nie powiodło się: %s\n" -#define MSGTR_RADIO_CaptureStarting "[radio] Zaczynam nagrywanie.\n" #define MSGTR_RADIO_ClearBufferFailed "[radio] Czyszczenie bufora nie powiodło się: %s\n" #define MSGTR_RADIO_StreamEnableCacheFailed "[radio] Wywołanie stream_enable_cache nie powiodło się: %s\n" #define MSGTR_RADIO_DriverUnknownStr "[radio] Nieznana nazwa sterownika: %s\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-pt_BR.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-pt_BR.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-pt_BR.h 2011-04-03 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-pt_BR.h 2011-10-25 13:55:48.000000000 +0000 @@ -65,7 +65,6 @@ #define MSGTR_NoHomeDir "Diretório HOME não encontrado.\n" #define MSGTR_GetpathProblem "Problema em get_path(\"config\")\n" #define MSGTR_CreatingCfgFile "Criando arquivo de configuração: %s\n" -#define MSGTR_BuiltinCodecsConf "Usando codecs.conf interno padrão\n" #define MSGTR_CantLoadFont "Impossível carregar fonte: %s\n" #define MSGTR_CantLoadSub "Impossível carregar legendas: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: FATAL: faltando trilha selecionada!\n" @@ -108,15 +107,12 @@ #define MSGTR_Playing "Reproduzindo %s\n" #define MSGTR_NoSound "Audio: sem som.\n" #define MSGTR_FPSforced "FPS (quadros por segundo) forçado a ser %5.3f (ftime: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "Compilado com detecção de CPU em tempo real - AVISO - isto não é ideal! Para obter a melhor performance, recompile MPlayer com --disable-runtime-cpudetection\n" -#define MSGTR_CompiledWithCPUExtensions "Compilado para CPU x86 com extenções:" #define MSGTR_AvailableVideoOutputDrivers "Drivers de saída de vídeo disponíveis:\n" #define MSGTR_AvailableAudioOutputDrivers "Drivers de saída de audio disponíveis:\n" #define MSGTR_AvailableAudioCodecs "Codecs de audio disponíveis:\n" #define MSGTR_AvailableVideoCodecs "Codecs de vídeo disponíveis:\n" #define MSGTR_AvailableAudioFm "\nFamílias/drivers de codec de audio disponíveis (compilados):\n" #define MSGTR_AvailableVideoFm "\nFamílias/drivers de codec de vídeo disponíveis (compilados):\n" -#define MSGTR_UsingRTCTiming "Usando regulação de tempo Linux hardware RTC (%ldHz)\n" #define MSGTR_CannotReadVideoProperties "Video: impossível ler propriedades\n" #define MSGTR_NoStreamFound "Trilha não encontrada\n" #define MSGTR_ErrorInitializingVODevice "Erro abrindo/inicializando o dispositivo da saída de vídeo (-vo)!\n" @@ -246,7 +242,6 @@ #define MSGTR_SwitchToNi "\nDetectado .AVI mau entrelaçado - mudando para o modo -ni!\n" #define MSGTR_Detected_XXX_FileFormat "Detectado formato de arquivo %s!\n" #define MSGTR_DetectedAudiofile "Detectado arquivo de audio!\n" -#define MSGTR_NotSystemStream "Formato do fluxo não MPEG System... (pode ser um fluxo de transporte?)\n" #define MSGTR_InvalidMPEGES "Fluxo MPEG-ES inválido??? Contacte o autor, pode ser um bug :(\n" #define MSGTR_FormatNotRecognized "======= Desculpe, este formato de arquivo não é reconhecido/suportado ========\n"\ "== Se este arquivo é um fluxo AVI, ASF ou MPEG, por favor contacte o autor ==\n" @@ -268,11 +263,8 @@ #define MSGTR_MOVcomprhdr "MOV: Cabeçalhos comprimidos não suportados (ainda)!\n" #define MSGTR_MOVvariableFourCC "MOV: Advertência! Variável FOURCC detectada!?\n" #define MSGTR_MOVtooManyTrk "MOV: Advertência! Trilhas demais!" -#define MSGTR_FoundAudioStream "==> Trilha de audio encontrada: %d\n" -#define MSGTR_FoundVideoStream "==> Trilha de video encontrada: %d\n" #define MSGTR_DetectedTV "TV detectada! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Impossível abrir o demuxer ogg\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Procurando por trilha de audio (id:%d)\n" #define MSGTR_CannotOpenAudioStream "Impossível abrir trilha de audio: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Impossível abrir trilha de legendas: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Falha ao abrir demuxer de audio: %s\n" @@ -302,21 +294,15 @@ #define MSGTR_UsingExternalPP "[PP] Usando filtro de pós processamento externo, máximo q = %d\n" #define MSGTR_UsingCodecPP "[PP] Usando pós processamento do codec, máximo q = = %d\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Atributo de vídeo '%s' não é suportado pelo vo & vd selecionado! \n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Família [%s] (vfm=%s) do codec de video não disponível (habilite na hora da compilação!)\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Família [%s] (afm=%s) do codec de audio não disponível (habilite na hora da compilação!)\n" #define MSGTR_OpeningVideoDecoder "Abrindo decodificador de vídeo: [%s] %s\n" #define MSGTR_OpeningAudioDecoder "Abrindo decodificador de audio: [%s] %s\n" -#define MSGTR_UninitVideoStr "finalizando vídeo: %s\n" -#define MSGTR_UninitAudioStr "finalizando audio: %s\n" #define MSGTR_VDecoderInitFailed "Falha na incialização do VDecoder :(\n" #define MSGTR_ADecoderInitFailed "Falha na incialização do ADecoder :(\n" #define MSGTR_ADecoderPreinitFailed "Falha na pré-inicialização do ADecoder :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Aclocando %d bytes para o buffer de entrtada\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Alocando %d + %d = %d bytes para o buffer de saída\n" // LIRC: -#define MSGTR_SettingUpLIRC "Configurando o suporte a lirc...\n" #define MSGTR_LIRCopenfailed "Falha na abertura do suporte a lirc!\n" #define MSGTR_LIRCcfgerr "Falha ao ler o arquivo de configuração do LIRC %s.\n" @@ -349,7 +335,6 @@ #define MSGTR_Network "Rede..." #define MSGTR_Preferences "Preferências" #define MSGTR_NoMediaOpened "Nenhuma mídia aberta." -#define MSGTR_VCDTrack "Trilha do VCD %d" #define MSGTR_NoChapter "Nenhum capítulo" #define MSGTR_Chapter "Capítulo %d" #define MSGTR_NoFileLoaded "Nenhum arquivo carregado" @@ -418,7 +403,7 @@ #define MSGTR_MENU_AudioLanguages "Idiomas do audio" #define MSGTR_MENU_SubtitleLanguages "Idiomas da legenda" #define MSGTR_MENU_SkinBrowser "Skins" -#define MSGTR_MENU_Exit "Sair..." +#define MSGTR_MENU_Exit "Sair" #define MSGTR_MENU_Mute "Mudo" #define MSGTR_MENU_Original "Original" #define MSGTR_MENU_AspectRatio "Aspecto" @@ -472,9 +457,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Habilitar descarte de quadros SEVERO (perigoso)" #define MSGTR_PREFERENCES_Flip "Inverter imagem verticalmente" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Temporizador e indicadores" -#define MSGTR_PREFERENCES_OSDProgress "Barras de progresso apenas" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Temporizador, porcentagem e tempo total" #define MSGTR_PREFERENCES_Subtitle "Legenda:" #define MSGTR_PREFERENCES_SUB_Delay "Atrtaso: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-ro.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-ro.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-ro.h 2011-01-27 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-ro.h 2011-10-25 13:55:48.000000000 +0000 @@ -1,5 +1,5 @@ // FIXME: This needs to be redone properly. -// Partially sync'ed with help_mp-en.h $Revision: 32817 $ +// Partially sync'ed with help_mp-en.h $Revision: 34253 $ // This is a retranslation of the file by Bogdan Butnaru , // based on the previous translation by Codre Adrian // (address bounces). @@ -67,7 +67,6 @@ #define MSGTR_GetpathProblem "get_path(\"config\") problem\n" #define MSGTR_CreatingCfgFile "Creez fiºierul de configurare: %s\n"\ "Încearcã '-vo help' pentru o listã cu driveri video disponibili.\n" -#define MSGTR_BuiltinCodecsConf "Folosesc 'codecs.conf' built-in.\n" #define MSGTR_CantLoadFont "Nu pot încãrca fontul: %s\n" #define MSGTR_CantLoadSub "Nu pot încãrca subtitrarea: %s\n" #define MSGTR_FPSnotspecified "FPS (nr. de cadre pe secundã) nu e specificat în header sau e greºit; foloseºte opþiunea '-fps'.\n" @@ -112,7 +111,6 @@ #define MSGTR_AvailableAudioCodecs "Codec-uri audio disponibile:\n" #define MSGTR_AvailableVideoCodecs "Codec-uri video disponibile:\n" #define MSGTR_AvailableFsType "Moduri fullscreen disponibile:\n" -#define MSGTR_UsingRTCTiming "Using Linux hardware RTC timing (%ldHz).\n" #define MSGTR_CannotReadVideoProperties "Video: Nu pot citi proprietãþile.\n" #define MSGTR_NoStreamFound "Nu am gãsit nici un canal.\n" #define MSGTR_ErrorInitializingVODevice "Eroare la activarea ieºirii video (-vo) aleasã.\n" @@ -240,11 +238,8 @@ #define MSGTR_MOVcomprhdr "MOV: Pentru a folosi headere compresate e nevoie de ZLIB!\n" #define MSGTR_MOVvariableFourCC "MOV: ATENTIE: Am detectat FOURCC variabil!?\n" #define MSGTR_MOVtooManyTrk "MOV: ATENTIE: prea multe piste" -#define MSGTR_FoundAudioStream "==> Canal audio gãsit: %d\n" -#define MSGTR_FoundVideoStream "==> Canal video gãsit: %d\n" #define MSGTR_DetectedTV "TV detectat! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Nu pot deschide demultiplexorul ogg.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Caut canalul audio (id:%d).\n" #define MSGTR_CannotOpenAudioStream "Nu pot deschide canalul audio: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Nu pot deschide canalul de subtitrare: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Nu am reuºit sã deschid demultiplexorul audio: %s\n" @@ -265,17 +260,13 @@ #define MSGTR_UsingExternalPP "[PP] Folosesc filtru de postprocesare extern, q max = %d.\n" #define MSGTR_UsingCodecPP "[PP] Folosesc postprocesarea codecului, q max = %d.\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Atributul video '%s' nu e suportat de vo & vd alese.\n" #define MSGTR_OpeningVideoDecoder "Deschid decodorul video: [%s] %s\n" #define MSGTR_OpeningAudioDecoder "Deschid decodorul audio: [%s] %s\n" #define MSGTR_VDecoderInitFailed "VDecoder init eºuat :(\n" #define MSGTR_ADecoderInitFailed "ADecoder init eºuat :(\n" #define MSGTR_ADecoderPreinitFailed "ADecoder preinit eºuat :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Aloc %d bytes pentru bufferul de intrare.\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Aloc %d + %d = %d bytes pentru bufferul de ieºire.\n" // LIRC: -#define MSGTR_SettingUpLIRC "Pregãtesc folosirea LIRC...\n" #define MSGTR_LIRCopenfailed "Nu am reuºit sã activez LIRC.\n" #define MSGTR_LIRCcfgerr "Nu am putut citi fiºierul de configurare LIRC %s.\n" @@ -303,7 +294,6 @@ #define MSGTR_Network "Streaming în reþea..." #define MSGTR_Preferences "Preferinþe" #define MSGTR_NoMediaOpened "Nu e deschis nici un fiºier." -#define MSGTR_VCDTrack "Pista VCD %d" #define MSGTR_NoChapter "Nici un capitol" #define MSGTR_Chapter "Capitol %d" #define MSGTR_NoFileLoaded "Nici un fiºier încãrcat." @@ -357,7 +347,7 @@ #define MSGTR_MENU_AudioLanguages "Limbi pentru audio" #define MSGTR_MENU_SubtitleLanguages "Limbi pentru subtitrãri" #define MSGTR_MENU_SkinBrowser "Alegere skin" -#define MSGTR_MENU_Exit "Ieºire..." +#define MSGTR_MENU_Exit "Ieºire" #define MSGTR_MENU_Mute "Fãrã sunet" #define MSGTR_MENU_Original "Original" #define MSGTR_MENU_AspectRatio "Raport dimensiuni" @@ -410,9 +400,6 @@ #define MSGTR_PREFERENCES_FrameDrop "Activeazã sãritul cadrelor" #define MSGTR_PREFERENCES_HFrameDrop "Activeazã sãritul dur de cadre (PERICULOS)" #define MSGTR_PREFERENCES_Flip "Inverseazã imaginea sus/jos" -#define MSGTR_PREFERENCES_OSDTimer "Ceas ºi indicatori" -#define MSGTR_PREFERENCES_OSDProgress "Doar bara de derulare" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Ceas, procent ºi timp total" #define MSGTR_PREFERENCES_Subtitle "Subtitrare:" #define MSGTR_PREFERENCES_SUB_Delay "Decalaj: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-ru.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-ru.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-ru.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-ru.h 2011-12-05 11:38:13.000000000 +0000 @@ -60,7 +60,6 @@ #define MSGTR_NoHomeDir "Не могу найти ДОМАШНИЙ каталог\n" #define MSGTR_GetpathProblem "проблемы в get_path(\"config\")\n" #define MSGTR_CreatingCfgFile "Создание файла конфигурации: %s\n" -#define MSGTR_BuiltinCodecsConf "Используется встроенный codecs.conf.\n" #define MSGTR_CantLoadFont "Не могу загрузить побитовый шрифт: %s\n" #define MSGTR_CantLoadSub "Не могу загрузить субтитры: %s\n" #define MSGTR_DumpSelectedStreamMissing "дамп: ФАТАЛЬНАЯ ОШИБКА: Выбранный поток потерян!\n" @@ -102,8 +101,6 @@ #define MSGTR_Playing "\nВоспроизведение %s.\n" #define MSGTR_NoSound "Аудио: без звука\n" #define MSGTR_FPSforced "Кадры/сек форсированы в %5.3f (время кадра: %5.3f).\n" -#define MSGTR_CompiledWithRuntimeDetection "Скомпилировано для определения типа процессора во время выполнения.\n" -#define MSGTR_CompiledWithCPUExtensions "Скомпилировано для x86 CPU со следующими расширениями:" #define MSGTR_AvailableVideoOutputDrivers "Доступные драйвера вывода видео:\n" #define MSGTR_AvailableAudioOutputDrivers "Доступные драйвера вывода звука:\n" #define MSGTR_AvailableAudioCodecs "Доступные аудиокодеки:\n" @@ -111,7 +108,6 @@ #define MSGTR_AvailableAudioFm "Доступные (вкомпилированные) семейства/драйверы аудиокодеков:\n" #define MSGTR_AvailableVideoFm "Доступные (вкомпилированные) семейства/драйверы видеокодеков:\n" #define MSGTR_AvailableFsType "Доступные режимы изменения полноэкранного слоя:\n" -#define MSGTR_UsingRTCTiming "Используется аппаратная Linux RTC синхронизация (%ldГц).\n" #define MSGTR_CannotReadVideoProperties "Видео: Не могу прочитать свойства.\n" #define MSGTR_NoStreamFound "Поток не найден.\n" #define MSGTR_ErrorInitializingVODevice "Ошибка при открытии/инициализации выбранного устройства видеовывода (-vo).\n" @@ -146,14 +142,11 @@ #define MSGTR_AddedSubtitleFile "СУБТИТРЫ: добавлен файл субтитров (%d): %s\n" #define MSGTR_RemovedSubtitleFile "СУБТИТРЫ: Удалён файл субтитров (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "Ошибка открытия файла [%s] для записи!\n" -#define MSGTR_CommandLine "Командная строка:" #define MSGTR_RTCDeviceNotOpenable "Не могу открыть %s: %s (пользователь должен обладать правом чтения на этот файл).\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Ошибка инициализации Linux RTC в ioctl (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Попробуйте добавить \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" \nв загрузочные скрипты Вашей системы.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Ошибка инициализации Linux RTC в ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "Используется %s синхронизация.\n" -#define MSGTR_MenuInitialized "Меню инициализировано: %s\n" -#define MSGTR_MenuInitFailed "Не могу инициализировать меню.\n" #define MSGTR_Getch2InitializedTwice "ПРЕДУПРЕЖДЕНИЕ: getch2_init вызван дважды!\n" #define MSGTR_DumpstreamFdUnavailable "Не могу создать дамп этого потока - нет доступных файловых описателей.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Не могу открыть видеофильтр libmenu с этим корневым меню %s.\n" @@ -281,12 +274,9 @@ #define MSGTR_CannotAllocateBytes "Не могу выделить память для %d байт\n" #define MSGTR_SettingAudioDelay "Устанавливаю задержку аудио в %5.3f\n" #define MSGTR_SettingVideoDelay "Устанавливаю задержку видео в %5.3fs.\n" -#define MSGTR_SettingAudioInputGain "Устанавливаю усиление входного аудиопотока в %f\n" -#define MSGTR_LamePresetEquals "\npreset=%s\n\n" #define MSGTR_LimitingAudioPreload "Ограничиваю предварительную загрузку аудио до 0.4с\n" #define MSGTR_IncreasingAudioDensity "Увеличиваю плотность аудио до 4\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Форсирую предварительную загрузку аудио в 0, максимальную коррекцию pts в 0\n" -#define MSGTR_CBRAudioByterate "\n\nCBR аудио: %d байт/сек, %d байт/блок\n" #define MSGTR_LameVersion "Версия LAME %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Ошибка: Заданный битпоток вне допустимого значения для данной предустановки.\n"\ "\n"\ @@ -473,8 +463,6 @@ #define MSGTR_CodecNeedsOutfmt "\nкодеку '%s' необходим 'outfmt'!\n" #define MSGTR_CantAllocateComment "Не могу выделить память для комментария. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "Читаю '%s': " -#define MSGTR_CantOpenFileError "Не могу открыть '%s': %s\n" #define MSGTR_CantGetMemoryForLine "Не могу выделить память для строки: %s\n" #define MSGTR_CantReallocCodecsp "Не могу выполнить realloc для '*codecsp': %s\n" #define MSGTR_CodecNameNotUnique "Имя кодека '%s' не уникально." @@ -540,7 +528,6 @@ #define MSGTR_Preferences "Настройки" #define MSGTR_AudioPreferences "Конфигурация аудио драйвера" #define MSGTR_NoMediaOpened "Носитель не открыт." -#define MSGTR_VCDTrack "дорожка VCD %d" #define MSGTR_NoChapter "Нет раздела" #define MSGTR_Chapter "Раздел %d" #define MSGTR_NoFileLoaded "Файл не загружен." @@ -615,7 +602,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "Просмотр шкур" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Выход..." +#define MSGTR_MENU_Exit "Выход" #define MSGTR_MENU_Mute "Приглушить" #define MSGTR_MENU_Original "Исходный" #define MSGTR_MENU_AspectRatio "Соотношение сторон" @@ -676,9 +663,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Включить ИНТЕНСИВНЫЙ пропуск кадров (опасно)" #define MSGTR_PREFERENCES_Flip "Отобразить изображение вверх ногами" #define MSGTR_PREFERENCES_Panscan "Усечение сторон: " -#define MSGTR_PREFERENCES_OSDTimer "Таймер и индикаторы" -#define MSGTR_PREFERENCES_OSDProgress "Только полосы выполнения" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Таймер, проценты и полное время" #define MSGTR_PREFERENCES_Subtitle "Субтитры:" #define MSGTR_PREFERENCES_SUB_Delay "Задержка: " #define MSGTR_PREFERENCES_SUB_FPS "Кадр/сек:" @@ -1081,9 +1065,7 @@ // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "Для режима c чересстрочной развёрткой необходимо, чтобы высота изображения\nделилась на 4." #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "Не могу выделить память для линейного буфера в режиме чересстрочной развёртки." -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "Вход не RGB, не могу разделить данные хромы по полям!" #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "Ширина изображения должна делиться на 2." -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "Недостаточно памяти для размещения фреймбуфера RGB." #define MSGTR_VO_YUV4MPEG_OutFileOpenError "Не могу выделить память или файловый описатель для записи \"%s\"!" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "Ошибка записи изображения в вывод!" #define MSGTR_VO_YUV4MPEG_UnknownSubDev "Неизвестное подустройство: %s" @@ -1125,10 +1107,8 @@ // audio_out.c #define MSGTR_AO_ALSA9_1x_Removed "аудиовывод: модули alsa9 и alsa1x были удалены, используйте -ao alsa взамен.\n" -#define MSGTR_AO_TryingPreferredAudioDriver "Пробую предпочтённый аудио драйвер '%.*s' с опциями '%s'\n" #define MSGTR_AO_NoSuchDriver "Отсутствует аудио драйвер '%.*s'\n" #define MSGTR_AO_FailedInit "Не могу инициализировать аудио драйвер '%s'\n" -#define MSGTR_AO_TryingEveryKnown "Пробую каждый известный аудио драйвер...\n" // ao_oss.c #define MSGTR_AO_OSS_CantOpenMixer "[AO OSS] инициализация аудио: Не могу открыть устройство микшера %s: %s\n" @@ -1197,31 +1177,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** Ваш аудиодрайвер НЕ поддерживает select() ***\nПерекомпилируйте MPlayer с #undef HAVE_AUDIO_SELECT в config.h !\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN] Фатальная ошибка:\n*** НЕ МОГУ ПОВТОРНО ОТКРЫТЬ / СБРОСИТЬ АУДИОУСТРОЙСТВО (%s) ***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] инициализация alsa: запрошенный формат: %d Гц, %d каналов, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] инициализация alsa: не найдено звуковых карт.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] инициализация alsa: запрошен неверный формат (%s) - вывод отключен.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] инициализация alsa: ошибка открытия потока воспроизведения: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] инициализация alsa: ошибка получения pcm информации: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] инициализация alsa: найдена(о) %d звуковая(ых) карт(а), использую: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] инициализация alsa: ошибка получения информации pcm канала: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] инициализация alsa: ошибка установки параметров: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] инициализация alsa: ошибка установки канала: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] инициализация alsa: ошибка подготовки канала: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] деинициализация alsa: ошибка очистки потока воспроизведения: %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] деинициализация alsa: ошибка сброса буферов потока воспроизведения: %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] деинициализация alsa: ошибка закрытия pcm: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] сброс alsa: ошибка очистки потока воспроизведения: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] сброс alsa: ошибка сброса буферов потока воспроизведения: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] сброс alsa: ошибка подготовки канала: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] пауза alsa: ошибка очистки потока воспроизведения: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] пауза alsa: ошибка сброса буферов потока воспроизведения: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] возобновление alsa: ошибка подготовки канала: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] воспроизведение alsa: alsa недогружена, сбрасываю поток.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] воспроизведение alsa: ошибка подготовки потока воспроизведения: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] воспроизведение alsa: ошибка записи после сброса: %s - безнадёжно.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] воспроизведение alsa: ошибка вывода: %s\n" - // ao_alsa.c #define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] Неверный индекс микшера. Возврат к 0.\n" #define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] Ошибка открытия микшера: %s\n" @@ -1305,7 +1260,6 @@ // ========================== INPUT ========================================= // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "Открываю устройство джойстика %s\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "Не могу отрыть устройство джойстика %s: %s\n" #define MSGTR_INPUT_JOYSTICK_ErrReading "Ошибка чтения устройства джойстика: %s\n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "Джойстик: Потеряно %d байт(а/ов) данных\n" @@ -1313,8 +1267,6 @@ #define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "Джойстик: предупреждение о неизвестном типе события %d\n" // appleir.c -#define MSGTR_INPUT_APPLE_IR_Init "Инициализация Apple IR на %s\n" -#define MSGTR_INPUT_APPLE_IR_Detect "Обнаружен Apple IR на %s\n" #define MSGTR_INPUT_APPLE_IR_CantOpen "Невозможно открыть устройство Apple IR: %s\n" // input.c @@ -1345,7 +1297,6 @@ #define MSGTR_INPUT_INPUT_ErrCantInitAppleRemote "Не могу инициализировать Пульт ДУ Apple Remote.\n" // lirc.c -#define MSGTR_SettingUpLIRC "Установка поддержки LIRC...\n" #define MSGTR_LIRCopenfailed "Неудачное открытие поддержки LIRC.\nВы не сможете использовать Ваш пульт управления.\n" #define MSGTR_LIRCcfgerr "Неудачная попытка чтения файла конфигурации LIRC '%s'!\n" @@ -1360,7 +1311,6 @@ #define MSGTR_WarningLenIsntDivisible "Предупреждение: длина не кратна размеру образца!\n" #define MSGTR_MuxbufMallocErr "Мультиплексор фреймбуфера не может выделить память (malloc)!\n" #define MSGTR_MuxbufReallocErr "Мультиплексор фреймбуфера не может перераспределить память (realloc)!\n" -#define MSGTR_MuxbufSending "Мультиплексор фреймбуфера посылает %d кадр(а/ов) в мультиплексор.\n" #define MSGTR_WritingHeader "Запись заголовка...\n" #define MSGTR_WritingTrailer "Запись индекса...\n" @@ -1378,7 +1328,6 @@ #define MSGTR_ON2AviFormat "ON2 AVI формат" #define MSGTR_Detected_XXX_FileFormat "Обнаружен %s формат файла!\n" #define MSGTR_DetectedAudiofile "Обнаружен аудиофайл.\n" -#define MSGTR_NotSystemStream "Не MPEG System Stream формат... (возможно, Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Недопустимый MPEG-ES поток??? свяжитесь с автором, это может быть ошибкой :(\n" #define MSGTR_FormatNotRecognized "======= Извините, формат этого файла не распознан/не поддерживается ==========\n"\ "===== Если это AVI, ASF или MPEG поток, пожалуйста свяжитесь с автором! ======\n" @@ -1403,11 +1352,8 @@ #define MSGTR_MOVcomprhdr "MOV: Для поддержки сжатых заголовков необходим zlib!\n" #define MSGTR_MOVvariableFourCC "MOV: Предупреждение! Обнаружен переменный FOURCC!?\n" #define MSGTR_MOVtooManyTrk "MOV: Предупреждение! слишком много треков!" -#define MSGTR_FoundAudioStream "==> Нашёл аудиопоток: %d\n" -#define MSGTR_FoundVideoStream "==> Нашёл видеопоток: %d\n" #define MSGTR_DetectedTV "Найден ТВ! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Не могу открыть демультиплексор ogg.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Ищу аудиопоток (id:%d).\n" #define MSGTR_CannotOpenAudioStream "Не могу открыть аудиопоток: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Не могу открыть поток субтитров: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Не могу открыть демультиплексор аудио: %s\n" @@ -1440,17 +1386,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "** пустой список?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "Найден фильм на 0x%X - 0x%X\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "Найден 'bih', размер звена %u байт(а/ов), размер 'bih' %d байт(а/ов)\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "Восстановление таблицы базовых кадров для M$ mpg4v1 видео.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "Восстановление таблицы базовых кадров для DIVX3 видео.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "Восстановление таблицы базовых кадров для MPEG-4 видео.\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "Найден 'wf', размер звена %d байт(а/ов), размер 'wh' %d байт(а/ов)\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI: найден dmlh (размер=%d) (всего_кадров=%d)\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "Читаю блок INDEX, %d звеньев для %d кадров (fpos=%"PRId64").\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "Дополнительный заголовок RIFF...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** Предупреждение: Это не расширенный заголовок AVI..\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "Испорченное звено? chunksize=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI: ODML: Построение индекса ODML (%d звеньев супериндекса).\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI: ODML: Обнаружен плохой (неполный?) файл. Использую традиционный индекс.\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "Не могу прочитать файл индекса %s: %s\n" @@ -1620,21 +1556,15 @@ #define MSGTR_UsingExternalPP "[PP] Использую внешний фильтр постобработки, max q = %d.\n" #define MSGTR_UsingCodecPP "[PP] Использую постобработку из кодека, max q = %d.\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Видеоатрибут '%s' не поддерживается выбранными vo и vd.\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Запрошенное семейство видеокодеков [%s] (vfm=%s) не доступно.\nВключите его во время компиляции.\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Запрошенное семейство аудиокодеков [%s] (afm=%s) не доступно.\nВключите его во время компиляции.\n" #define MSGTR_OpeningVideoDecoder "Открываю декодер видео: [%s] %s\n" #define MSGTR_SelectedVideoCodec "Выбран видеокодек: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Открываю декодер аудио: [%s] %s\n" #define MSGTR_SelectedAudioCodec "Выбран аудиокодек: [%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "Построение цепочки аудиофильтра для %dHz/%dch/%s -> %dHz/%dch/%s...\n" -#define MSGTR_UninitVideoStr "деинициализация видео: %s\n" -#define MSGTR_UninitAudioStr "деинициализация аудио: %s\n" #define MSGTR_VDecoderInitFailed "Ошибка инициализации Декодера Видео :(\n" #define MSGTR_ADecoderInitFailed "Ошибка инициализации Декодера Аудио :(\n" #define MSGTR_ADecoderPreinitFailed "Ошибка предварительной инициализации Декодера Аудио :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Захватываю %d байт(а/ов) для входного буфера.\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Захватываю %d + %d = %d байт(а/ов) для буфера вывода.\n" // libmpcodecs/ad_dvdpcm.c #define MSGTR_SamplesWanted "Для улучшения поддержки необходимы образцы этого формата.\nПожалуйста, свяжитесь с разработчиками.\n" @@ -1650,8 +1580,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Вам нужно обновить/установить пакет бинарных кодеков.\nЗайдите на http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "ИНФОРМАЦИЯ: Win32/DShow видео кодек успешно инициализирован.\n" -#define MSGTR_DMOInitOK "ИНФОРМАЦИЯ: Win32/DMO видео кодек успешно инициализирован.\n" // libmpcodecs/vd_dmo.c vd_dshow.c vd_vfw.c #define MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec "[VD_DMO] Не могу выделить изображение для кодека cinepak.\n" @@ -1780,12 +1708,12 @@ // ================================== stream ==================================== -// ai_alsa1x.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "Не могу задать частоту дискретизации.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "Не могу задать время буферизации.\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "Не могу задать время периода.\n" +// ai_alsa.c +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "Не могу задать частоту дискретизации.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "Не могу задать время буферизации.\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "Не могу задать время периода.\n" -// ai_alsa1x.c / ai_alsa.c +// ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "Некорректная конфигурация для данного PCM: нет доступных конфигураций.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "Тип доступа не доступен.\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt "Формат образца не доступен.\n" @@ -1794,9 +1722,7 @@ #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "Не могу использовать период, равный размеру буфера (%u == %lu)\n" #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "Не могу установить программные параметры:\n" #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "Ошибка открытия аудио: %s\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "Ошибка статуса ALSA: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun!!! (как минимум длительностью %.3f мс)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "Статус ALSA:\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun: ошибка подготовки: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "Ошибка чтения/записи ALSA" @@ -1856,7 +1782,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "неизвестный тип потока ASF\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "Не могу проанализировать ответ HTTP.\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "Сервер вернул %d:%s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ПРЕДУПРЕЖДЕНИЕ АНАЛИЗАТОРА HTTP ASF : Pragma %s урезана от %zd байт до %d\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ПРЕДУПРЕЖДЕНИЕ АНАЛИЗАТОРА HTTP ASF : Pragma %s урезана от %zu байт до %zu\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "ошибка записи сокета: %s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "Не могу разобрать заголовок.\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "Поток не найден.\n" @@ -1945,17 +1871,13 @@ // stream/stream_radio.c #define MSGTR_RADIO_ChannelNamesDetected "[radio] Обнаружены имена радиостанций.\n" -#define MSGTR_RADIO_FreqRange "[radio] Допустимый диапазон частот: %.2f-%.2f МГц.\n" #define MSGTR_RADIO_WrongFreqForChannel "[radio] Неверная частота для станции %s\n" #define MSGTR_RADIO_WrongChannelNumberFloat "[radio] Неверный номер станции: %.2f\n" #define MSGTR_RADIO_WrongChannelNumberInt "[radio] Неверный номер станции: %d\n" #define MSGTR_RADIO_WrongChannelName "[radio] Неверное название станции: %s\n" #define MSGTR_RADIO_FreqParameterDetected "[radio] В параметрах обнаружена частота.\n" -#define MSGTR_RADIO_DoneParsingChannels "[radio] Разбор имен радиостанций завершен.\n" #define MSGTR_RADIO_GetTunerFailed "[radio] Предупреждение: сбой вызова ioctl get tuner : %s. frac установлен в %d.\n" #define MSGTR_RADIO_NotRadioDevice "[radio] %s не является устройством радио!\n" -#define MSGTR_RADIO_TunerCapLowYes "[radio] низкочастотный тюнер: да frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[radio] низкочастотный тюнер: нет frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[radio] сбой вызова ioctl set frequency 0x%x (%.2f): %s\n" #define MSGTR_RADIO_GetFreqFailed "[radio] сбой вызова ioctl get frequency: %s\n" #define MSGTR_RADIO_SetMuteFailed "[radio] сбой вызова ioctl set mute: %s\n" @@ -1965,27 +1887,22 @@ #define MSGTR_RADIO_DroppingFrame "\n[radio] потерян аудио фрейм (байт: %d)!\n" #define MSGTR_RADIO_BufferEmpty "[radio] grab_audio_frame: буфер пуст, ожидание данных. байт: %d.\n" #define MSGTR_RADIO_AudioInitFailed "[radio] сбой вызова audio_in_init: %s\n" -#define MSGTR_RADIO_AudioBuffer "[radio] Аудио захват - буфер=%d байт (блок: %d байт).\n" #define MSGTR_RADIO_AllocateBufferFailed "[radio] Невозможно создать аудио буфер (блок=%d,размер=%d): %s\n" #define MSGTR_RADIO_CurrentFreq "[radio] Текущая частота: %.2f\n" #define MSGTR_RADIO_SelectedChannel "[radio] Выбрана станция: %d - %s (частота: %.2f)\n" #define MSGTR_RADIO_ChangeChannelNoChannelList "[radio] Невозможно изменить станцию: не передан список радиостанций.\n" #define MSGTR_RADIO_UnableOpenDevice "[radio] Невозможно открыть '%s': %s\n" -#define MSGTR_RADIO_RadioDevice "[radio] Radio fd: %d, %s\n" #define MSGTR_RADIO_InitFracFailed "[radio] сбой вызова init_frac\n" #define MSGTR_RADIO_WrongFreq "[radio] Неверная частота: %.2f\n" #define MSGTR_RADIO_UsingFreq "[radio] Используется частота: %.2f.\n" #define MSGTR_RADIO_AudioInInitFailed "[radio] сбой вызова audio_in_init\n" -#define MSGTR_RADIO_BufferString "[radio] %s: в буфере: %d потеряно:%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[radio] сбой вызова audio_in_setup: %s\n" -#define MSGTR_RADIO_CaptureStarting "[radio] Запуск модуля захвата.\n" #define MSGTR_RADIO_ClearBufferFailed "[radio] Ошибка очистки буфера: %s\n" #define MSGTR_RADIO_StreamEnableCacheFailed "[radio] Ошибка вызова stream_enable_cache: %s\n" #define MSGTR_RADIO_DriverUnknownStr "[radio] Неизвестный драйвер: %s\n" #define MSGTR_RADIO_DriverV4L "[radio] Используется V4Lv1 радио интерфейс.\n" #define MSGTR_RADIO_DriverV4L2 "[radio] Используется V4Lv2 радио интерфейс.\n" #define MSGTR_RADIO_DriverBSDBT848 "[radio] Используется *BSD BT848 радио интерфейс.\n" -#define MSGTR_RADIO_AvailableDrivers "[radio] Доступные драйверы: " //tv.c #define MSGTR_TV_BogusNormParameter "tv.c: norm_from_string(%s): Неизвестный параметр norm, устанавливается %s.\n" @@ -1998,30 +1915,23 @@ " Отчеты об ошибках приниматься не будут! Вам следует попытаться еще раз \n"\ " с YV12 (пространство цветов по умолчанию) и прочесть документацию!\n"\ "==================================================================\n" -#define MSGTR_TV_SelectedNormId "Выбран id стандарта: %d\n" -#define MSGTR_TV_SelectedNorm "Выбран стандарт : %s\n" #define MSGTR_TV_CannotSetNorm "Ошибка: Невозможно установить norm!\n" #define MSGTR_TV_MJP_WidthHeight " MJP: ширина %d высота %d\n" #define MSGTR_TV_UnableToSetWidth "Невозможно установить запрошенную ширину: %d\n" #define MSGTR_TV_UnableToSetHeight "Невозможно установить запрошенную высоту: %d\n" #define MSGTR_TV_NoTuner "Выбранный вход не имеет тюнера!\n" #define MSGTR_TV_UnableFindChanlist "Невозможно найти выбранный список каналов! (%s)\n" -#define MSGTR_TV_SelectedChanlist "Выбран список каналов: %s (содержит каналов: %d)\n" #define MSGTR_TV_ChannelFreqParamConflict "Вы не можете указать частоту и канал одновременно!\n" #define MSGTR_TV_ChannelNamesDetected "Обнаружены названия TV каналов.\n" #define MSGTR_TV_NoFreqForChannel "Невозможно найти частоту для канала %s (%s)\n" #define MSGTR_TV_SelectedChannel3 "Выбран канал: %s - %s (частота: %.3f)\n" #define MSGTR_TV_SelectedChannel2 "Выбран канал: %s (частота: %.3f)\n" -#define MSGTR_TV_SelectedFrequency "Выбрана частота: %lu (%.3f)\n" -#define MSGTR_TV_RequestedChannel "Запрошен канал: %s\n" #define MSGTR_TV_UnsupportedAudioType "Тип аудио '%s (%x)' не поддерживается!\n" -#define MSGTR_TV_AudioFormat " TV аудио: %d каналов, %d бит, %d Гц\n" #define MSGTR_TV_AvailableDrivers "Доступные драйверы:\n" #define MSGTR_TV_DriverInfo "Выбран драйвер: %s\n название: %s\n автор: %s\n комментарий %s\n" #define MSGTR_TV_NoSuchDriver "Нет такого драйвера: %s\n" #define MSGTR_TV_DriverAutoDetectionFailed "Автоматически определить TV драйвер не удалось.\n" #define MSGTR_TV_UnknownColorOption "Указана неизвестная опция цвета (%d)!\n" -#define MSGTR_TV_CurrentFrequency "Текущая частота: %lu (%.3f)\n" #define MSGTR_TV_NoTeletext "Нет телетекста" #define MSGTR_TV_Bt848IoctlFailed "tvi_bsdbt848: Сбой %s ioctl. Ошибка: %s\n" #define MSGTR_TV_Bt848InvalidAudioRate "tvi_bsdbt848: Неверная величина аудио потока. Ошибка: %s\n" @@ -2049,14 +1959,8 @@ #define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow: Устройство #%d не найдено\n" #define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow: Невозможно получить название устройства #%d\n" #define MSGTR_TVI_DS_UsingDevice "tvi_dshow: Используется устройство #%d: %s\n" -#define MSGTR_TVI_DS_DeviceName "tvi_dshow: Устройство #%d: %s\n" #define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow: Невозможно получить частоту напрямую. Будет использоваться таблица каналов ОС.\n" -#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow: Невозможно установить частоту напрямую. Будет использоваться таблица каналов ОС.\n" -#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow: поддерживаемые стандарты:" -#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow: доступные видео входы:" -#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow: доступные аудио входы:" //following phrase will be printed near the selected audio/video input -#define MSGTR_TVI_DS_InputSelected "(выбран)" #define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow: Невозможно загрузить таблицу частот из kstvtune.ax\n" #define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow: Неверный параметр device: %s\n" #define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow: Неверный индекс device: %d\n" @@ -2068,7 +1972,6 @@ #define MSGTR_TVI_DS_ChangingWidthHeightNotSupported "tvi_dshow: Изменение ширины/высоты видео не поддерживается устройством.\n" #define MSGTR_TVI_DS_SelectingInputNotSupported "tvi_dshow: Выбор источника захвата не поддерживается устройством\n" -#define MSGTR_TVI_DS_FreqTableLoaded "tvi_dshow: загружена системная (%s) таблица частот для страны id=%d (каналов:%d).\n" #define MSGTR_TVI_DS_ErrorParsingAudioFormatStruct "tvi_dshow: Невозможно разобрать структуру аудио формата.\n" #define MSGTR_TVI_DS_ErrorParsingVideoFormatStruct "tvi_dshow: Невозможно разобрать структуру видео формата.\n" #define MSGTR_TVI_DS_UnableSetAudioMode "tvi_dshow: Невозможно установить аудио режим %d. Ошибка:0x%x\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-sk.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-sk.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-sk.h 2011-06-07 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-sk.h 2011-10-25 13:55:48.000000000 +0000 @@ -60,7 +60,6 @@ #define MSGTR_NoHomeDir "Nemôžem najsť domáci (HOME) adresár\n" #define MSGTR_GetpathProblem "get_path(\"config\") problém\n" #define MSGTR_CreatingCfgFile "Vytváram konfiguračný súbor: %s\n" -#define MSGTR_BuiltinCodecsConf "Používam vstavané defaultne codecs.conf\n" #define MSGTR_CantLoadFont "Nemôžem načítať font: %s\n" #define MSGTR_CantLoadSub "Nemôžem načítať titulky: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: FATAL: požadovaný prúd chýba!\n" @@ -102,8 +101,6 @@ #define MSGTR_Playing "Prehrávam %s\n" #define MSGTR_NoSound "Audio: bez zvuku!!!\n" #define MSGTR_FPSforced "FPS vnútené na hodnotu %5.3f (ftime: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "Skompilovné s RUNTIME CPU Detection - varovanie, nie je to optimálne! Na získanie max. výkonu, rekompilujte mplayer zo zdrojakov s --disable-runtime-cpudetection\n" -#define MSGTR_CompiledWithCPUExtensions "Skompilované pre x86 CPU s rozšíreniami:" #define MSGTR_AvailableVideoOutputDrivers "Dostupné video výstupné ovládače:\n" #define MSGTR_AvailableAudioOutputDrivers "Dostupné audio výstupné ovládače:\n" #define MSGTR_AvailableAudioCodecs "Dostupné audio kodeky:\n" @@ -111,7 +108,6 @@ #define MSGTR_AvailableAudioFm "Dostupné (vkompilované) audio rodiny kodekov/ovládače:\n" #define MSGTR_AvailableVideoFm "Dostupné (vkompilované) video rodiny kodekov/ovládače:\n" #define MSGTR_AvailableFsType "Dostupné zmeny plnoobrazovkových módov:\n" -#define MSGTR_UsingRTCTiming "Používam Linuxové hardvérové RTC časovanie (%ldHz)\n" #define MSGTR_CannotReadVideoProperties "Video: nemôžem čítať vlastnosti\n" #define MSGTR_NoStreamFound "Nenájdený prúd\n" #define MSGTR_ErrorInitializingVODevice "Chyba pri otváraní/inicializácii vybraných video_out (-vo) zariadení!\n" @@ -144,14 +140,11 @@ #define MSGTR_AddedSubtitleFile "SUB: pridaný súbor titulkov (%d): %s\n" #define MSGTR_RemovedSubtitleFile "SUB: odobratý súbor titulkov (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "Chyba pri otváraní súboru [%s] pre zápis!\n" -#define MSGTR_CommandLine "Príkazový riadok:" #define MSGTR_RTCDeviceNotOpenable "Nepodarilo sa otvoriť %s: %s (malo by to byť čitateľné pre používateľa.)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Chyba pri inicializácii Linuxových RTC v ioctl (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Skúste pridať \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" do štartovacích skriptov vášho systému.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Chyba pri inicializácii Linuxových RTC v ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "Používam %s časovanie.\n" -#define MSGTR_MenuInitialized "Menu inicializované: %s\n" -#define MSGTR_MenuInitFailed "Zlyhala inicializácia menu.\n" #define MSGTR_Getch2InitializedTwice "VAROVANIE: getch2_init je volaná dvakrát!\n" #define MSGTR_DumpstreamFdUnavailable "Nemôžem uložiť (dump) tento prúd - nie je dostupný žiaden deskriptor súboru.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Nemôžem otvoriť video filter libmenu s koreňovým menu %s.\n" @@ -264,12 +257,9 @@ #define MSGTR_CannotAllocateBytes "Nedá sa alokovať %d bajtov\n" #define MSGTR_SettingAudioDelay "Nastavujem spozdenie zvuku na %5.3f\n" #define MSGTR_SettingVideoDelay "Nastavujem spozděnie videa na %5.3fs\n" -#define MSGTR_SettingAudioInputGain "Nastavujem predzosilnenie zvukového vstupu na %f\n" -#define MSGTR_LamePresetEquals "\npreset=%s\n\n" #define MSGTR_LimitingAudioPreload "Obmedzujem prednačítanie zvuku na 0.4s\n" #define MSGTR_IncreasingAudioDensity "Zvyšujem hustotu audia na 4\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Vnucujem prednačítanie zvuku na 0, max korekciu pts na 0\n" -#define MSGTR_CBRAudioByterate "\n\nCBR zvuk: %d bajtov/s, %d bajtov/blok\n" #define MSGTR_LameVersion "LAME verzia %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Chyba: Špecifikovaný dátový tok je mimo rozsah pre tento preset.\n"\ "\n"\ @@ -454,8 +444,6 @@ #define MSGTR_CodecNeedsOutfmt "\nkódek(%s) vyžaduje 'outfmt'!\n" #define MSGTR_CantAllocateComment "Nedá sa alokovať pamäť pre poznámku. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "Čítam %s: " -#define MSGTR_CantOpenFileError "Nedá sa otvoriť '%s': %s\n" #define MSGTR_CantGetMemoryForLine "Nejde získať pamäť pre 'line': %s\n" #define MSGTR_CantReallocCodecsp "Nedá sa realokovať '*codecsp': %s\n" #define MSGTR_CodecNameNotUnique " Meno kódeku '%s' nie je jedinečné." @@ -527,7 +515,6 @@ #define MSGTR_WarningLenIsntDivisible "Varovanie! dĺžka nie je deliteľná velkosťou vzorky!\n" #define MSGTR_MuxbufMallocErr "Nedá sa alokovať pamäť pre frame buffer muxeru!\n" #define MSGTR_MuxbufReallocErr "Nedá sa realokovať pamäť pre frame buffer muxeru!\n" -#define MSGTR_MuxbufSending "Frame buffer muxeru posiela %d snímkov do muxeru.\n" #define MSGTR_WritingHeader "Zapisujem header...\n" #define MSGTR_WritingTrailer "Zapisujem index...\n" @@ -541,7 +528,6 @@ #define MSGTR_SwitchToNi "\nDetekovaný zle prekladaný .AVI - prepnite -ni mód!\n" #define MSGTR_Detected_XXX_FileFormat "Detekovaný %s formát súboru!\n" #define MSGTR_DetectedAudiofile "Detekovaný audio súbor!\n" -#define MSGTR_NotSystemStream "Nie je to MPEG System Stream formát... (možno Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Neplatný MPEG-ES prúd??? kontaktujte autora, možno je to chyba (bug) :(\n" #define MSGTR_FormatNotRecognized "========== Žiaľ, tento formát súboru nie je rozpoznaný/podporovaný =======\n"\ "==== Pokiaľ je tento súbor AVI, ASF alebo MPEG prúd, kontaktujte autora! ====\n" @@ -563,11 +549,8 @@ #define MSGTR_MOVcomprhdr "MOV: Komprimované hlavičky nie sú (ešte) podporované!\n" #define MSGTR_MOVvariableFourCC "MOV: Upozornenie! premenná FOURCC detekovaná!?\n" #define MSGTR_MOVtooManyTrk "MOV: Upozornenie! Príliš veľa stôp!" -#define MSGTR_FoundAudioStream "==> Nájdený audio prúd: %d\n" -#define MSGTR_FoundVideoStream "==> Nájdený video prúd: %d\n" #define MSGTR_DetectedTV "TV detekovaný! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Nemôžem otvoriť ogg demuxer\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Hľadám audio prúd (id:%d)\n" #define MSGTR_CannotOpenAudioStream "Nemôžem otvoriť audio prúd: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Nemôžem otvoriť prúd titulkov: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Nemôžem otvoriť audio demuxer: %s\n" @@ -603,24 +586,17 @@ #define MSGTR_UsingExternalPP "[PP] Používam externý postprocessing filter, max q = %d\n" #define MSGTR_UsingCodecPP "[PP] Požívam postprocessing z kodeku, max q = %d\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Video atribút '%s' nie je podporovaný výberom vo & vd! \n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Požadovaná rodina video kodekov [%s] (vfm=%s) nie je dostupná (zapnite ju pri kompilácii!)\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Požadovaná rodina audio kodekov [%s] (afm=%s) nie je dostupná (zapnite ju pri kompilácii!)\n" #define MSGTR_OpeningVideoDecoder "Otváram video dekóder: [%s] %s\n" #define MSGTR_SelectedVideoCodec "Zvolený video kódek: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Otváram audio dekóder: [%s] %s\n" #define MSGTR_SelectedAudioCodec "Zvolený audio kódek: [%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "Vytváram reťazec audio filterov pre %dHz/%dch/%s -> %dHz/%dch/%s...\n" -#define MSGTR_UninitVideoStr "odinicializovať video: %s \n" -#define MSGTR_UninitAudioStr "odinicializovať audio: %s \n" #define MSGTR_VDecoderInitFailed "VDecoder init zlyhal :(\n" #define MSGTR_ADecoderInitFailed "ADecoder init zlyhal :(\n" #define MSGTR_ADecoderPreinitFailed "ADecoder preinit zlyhal :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Alokujem %d bytov pre vstupný buffer\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Alokujem %d + %d = %d bytov pre výstupný buffer\n" // LIRC: -#define MSGTR_SettingUpLIRC "Zapínam podporu LIRC...\n" #define MSGTR_LIRCopenfailed "Zlyhal pokus o otvorenie podpory LIRC!\n" #define MSGTR_LIRCcfgerr "Zlyhalo čítanie konfiguračného súboru LIRC %s!\n" @@ -638,8 +614,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Potrebujete aktualizovať alebo nainštalovať binárne kódeky.\nChodte na http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO: Inicializácia Win32/DShow videokódeku OK.\n" -#define MSGTR_DMOInitOK "INFO: Inicializácia Win32/DMO videokódeku OK.\n" // x11_common.c #define MSGTR_EwmhFullscreenStateFailed "\nX11: Nemôžem poslať udalosť EWMH fullscreen!\n" @@ -670,7 +644,6 @@ #define MSGTR_Preferences "Preferencie" #define MSGTR_AudioPreferences "Konfiguracia ovladača zvuku" #define MSGTR_NoMediaOpened "Nič nie je otvorené" -#define MSGTR_VCDTrack "VCD stopa %d" #define MSGTR_NoChapter "Žiadna kapitola" #define MSGTR_Chapter "Kapitola %d" #define MSGTR_NoFileLoaded "Nenahraný žiaden súbor" @@ -745,7 +718,7 @@ #define MSGTR_MENU_PlayList "Playlist" #define MSGTR_MENU_SkinBrowser "Prehliadač tém" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Koniec..." +#define MSGTR_MENU_Exit "Koniec" #define MSGTR_MENU_Mute "Stlmiť zvuk" #define MSGTR_MENU_Original "Originál" #define MSGTR_MENU_AspectRatio "Pomer strán obrazu" @@ -807,9 +780,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Povoliť TVRDÉ zahadzovanie rámcov (nebezpečné)" #define MSGTR_PREFERENCES_Flip "prehodiť obraz horná strana-dole" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Čas a indikátor" -#define MSGTR_PREFERENCES_OSDProgress "Iba ukazovateľ priebehu a nastavenie" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Čas, percentá and celkový čas" #define MSGTR_PREFERENCES_Subtitle "Titulky:" #define MSGTR_PREFERENCES_SUB_Delay "Oneskorenie: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-sv.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-sv.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-sv.h 2011-04-03 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-sv.h 2011-12-22 17:39:38.000000000 +0000 @@ -59,7 +59,6 @@ #define MSGTR_NoHomeDir "Kan inte lokalisera $HOME-katalog.\n" #define MSGTR_GetpathProblem "get_path(\"config\") problem\n" #define MSGTR_CreatingCfgFile "Skapar konfigfil: %s\n" -#define MSGTR_BuiltinCodecsConf "Använder standardinbyggd codecs.conf.\n" #define MSGTR_CantLoadFont "Kan inte ladda font: %s\n" #define MSGTR_CantLoadSub "Kan inte ladda vald textning: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: FATALT: Vald ström ej tillgänglig!\n" @@ -100,9 +99,6 @@ #define MSGTR_Playing "Spelar %s.\n" #define MSGTR_NoSound "Audio: inget ljud\n" #define MSGTR_FPSforced "FPS forcerad att vara %5.3f (ftime: %5.3f).\n" -#define MSGTR_CompiledWithRuntimeDetection "Kompilerad med \"runtime CPU detection\" - VARNING - detta är inte optimalt!\n"\ - "För att få bäst prestanda, omkompilera med '--disable-runtime-cpudetection'.\n" -#define MSGTR_CompiledWithCPUExtensions "Kompilerad för x86 med tillägg:" #define MSGTR_AvailableVideoOutputDrivers "Tillgängliga video-ut-drivrutiner:\n" #define MSGTR_AvailableAudioOutputDrivers "Tillgängliga audio-ut-drivrutiner:\n" #define MSGTR_AvailableAudioCodecs "Tillgängliga audiocodec:\n" @@ -110,7 +106,6 @@ #define MSGTR_AvailableAudioFm "Tillgängliga (inkompilerade) audiocodec familjer/drivrutiner:\n" #define MSGTR_AvailableVideoFm "Tillgängliga (inkompilerade) videocodec familjer/drivrutiner:\n" #define MSGTR_AvailableFsType "Tillgängliga lägen för fullskärmslager:\n" -#define MSGTR_UsingRTCTiming "Använder Linux's hårdvaru-RTC-tidtagning (%ldHz).\n" #define MSGTR_CannotReadVideoProperties "Video: Kan inte läsa inställningar.\n" #define MSGTR_NoStreamFound "Ingen ström funnen.\n" #define MSGTR_ErrorInitializingVODevice "Fel vid öppning/initiering av vald video_out-enhet (-vo).\n" @@ -143,14 +138,11 @@ #define MSGTR_LoadingConfig "Laddar konfiguration '%s'\n" #define MSGTR_AddedSubtitleFile "SUB: lade till textningsfil %d: %s \n" #define MSGTR_ErrorOpeningOutputFile "Fel vid öppning av fil [%s] för skrivning!\n" -#define MSGTR_CommandLine "Kommandorad:" #define MSGTR_RTCDeviceNotOpenable "Misslyckades att öppna %s: %s (den borde vara läsbar av användaren.)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "'Linux RTC' initieringsfel i 'ioctl' rtc_irqp_set %lu: %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Försök lägg till \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" till ditt systems uppstartningsscript.\n" #define MSGTR_LinuxRTCInitErrorPieOn "'Linux RTC init' fel i 'ioctl' [rtc_pie_on]: %s\n" #define MSGTR_UsingTimingType "Använder %s tidtagning.\n" -#define MSGTR_MenuInitialized "Meny initierad: %s\n" -#define MSGTR_MenuInitFailed "Menyinitiering misslyckades.\n" #define MSGTR_Getch2InitializedTwice "VARNING: getch2_init anropad dubbelt!\n" #define MSGTR_DumpstreamFdUnavailable "Kan inte dumpa denna ström - ingen 'fd' tillgänglig.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Kan inte öppna 'libmenu video filter' med rotmeny %s.\n" @@ -212,12 +204,9 @@ #define MSGTR_MP3AudioSelected "MP3 audio valt\n" #define MSGTR_CannotAllocateBytes "Kunde inte allokera %d byte\n" #define MSGTR_SettingAudioDelay "Sätter AUDIO DELAY till %5.3f\n" -#define MSGTR_SettingAudioInputGain "Sätter 'audio input gain' till %f\n" // FIXME to translate? -#define MSGTR_LamePresetEquals "\npreset=%s\n\n" // FIXME translate? #define MSGTR_LimitingAudioPreload "Begränsar audioförinladdning till 0.4s\n" // preload? #define MSGTR_IncreasingAudioDensity "Höjer audiodensitet till 4\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Forcerar audioförinladdning till 0, 'max pts correction' till 0\n" -#define MSGTR_CBRAudioByterate "\n\nCBR audio: %d byte/sec, %d byte/block\n" #define MSGTR_LameVersion "LAME version %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Fel: Angiven bitrate är utanför godkänd rymd för detta val\n"\ "\n"\ @@ -399,8 +388,6 @@ #define MSGTR_CodecNeedsOutfmt "\ncodec(%s) behöver en 'outfmt'!\n" #define MSGTR_CantAllocateComment "Kan inte allokera minne flr kommentar. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token() \b: max >= MAX_MR_TOKEN!" //FIXME translate? -#define MSGTR_ReadingFile "Läser %s: " -#define MSGTR_CantOpenFileError "Kan inte öppna '%s': %s\n" #define MSGTR_CantGetMemoryForLine "Kan inte få minne för 'line': %s\n" #define MSGTR_CantReallocCodecsp "Kan inte realloc '*codecsp': %s\n" #define MSGTR_CodecNameNotUnique "Codec namn '%s' är inte unikt." @@ -457,7 +444,6 @@ #define MSGTR_SwitchToNi "\nSvårt interleaved AVI-fil detekterad, går över till '-ni'-läge...\n" #define MSGTR_Detected_XXX_FileFormat "%s filformat detekterat.\n" #define MSGTR_DetectedAudiofile "Audiofilformat detekterat.\n" -#define MSGTR_NotSystemStream "Icke 'MPEG System Stream'-format... (kanske Transport Stream?)\n" #define MSGTR_InvalidMPEGES "Icke godkänd 'MPEG-ES'-ström??? Kontakta upphovsmannen, det kanske är en bugg :(\n" //FIXME author??? #define MSGTR_FormatNotRecognized "================ Tyvärr, detta filformat är inte rekogniserbart/stött ==================\n"\ "=== Om denna fil är en AVi, ASF eller MPEG-ström, var vänlig kontakta upphovsmannen! ===\n" //FIXME author??? @@ -479,11 +465,8 @@ #define MSGTR_MOVcomprhdr "MOV: filhuvudkomprimeringssupport kräver ZLIB!\n" #define MSGTR_MOVvariableFourCC "MOV: VARNING: Variabel FOURCC påvisad!?\n" #define MSGTR_MOVtooManyTrk "MOV: VARNING: allt förmånga spår" -#define MSGTR_FoundAudioStream "==> Fann audioström: %d\n" -#define MSGTR_FoundVideoStream "==> Fann videoström: %d\n" #define MSGTR_DetectedTV "TV påvisad! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Oförmögen att öppna oggdemuxern.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Söker efter audioström (id:%d).\n" #define MSGTR_CannotOpenAudioStream "Kan inte öppna audioström: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Kan inte öppna textningsström: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Misslyckades att öppna audiodemuxern: %s\n" @@ -515,21 +498,15 @@ #define MSGTR_UsingExternalPP "[PP] Använder externt postprocesseringsfiler, max q = %d.\n" #define MSGTR_UsingCodecPP "[PP] Använder codecens postprocessing, max q = %d.\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Videoattribut '%s' har inget stöd hos vald vo & vd.\n" // FIXME more info? vo & vd #define MSGTR_VideoCodecFamilyNotAvailableStr "Begärd videocodecfamilj [%s] (vfm=%s) är ej tillgänglig.\nAktivera det vil kompilation.\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Begärd audiocodecfamilj [%s] (afm=%s) är ej tillgänglig.\nAktivera det vil kompilation.\n" #define MSGTR_OpeningVideoDecoder "Öppnar videodecoder: [%s] %s\n" #define MSGTR_OpeningAudioDecoder "Öppnar audiodecoder: [%s] %s\n" -#define MSGTR_UninitVideoStr "uninit video: %s\n" // FIXME translate? -#define MSGTR_UninitAudioStr "uninit audio: %s\n" // -''- #define MSGTR_VDecoderInitFailed "VDecoder-initiering misslyckades :(\n" // FIXME VDecoder something special or just a shortcut? #define MSGTR_ADecoderInitFailed "ADecoder-initiering misslyckades :(\n" // -''- #define MSGTR_ADecoderPreinitFailed "ADecoder-preinitiering misslyckades :(\n" // -''- -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Allokerar %d byte för inbuffert.\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Allokerar %d + %d = %d byte för utbuffert.\n" // LIRC: -#define MSGTR_SettingUpLIRC "Aktiverar LIRC-stöd...\n" #define MSGTR_LIRCopenfailed "Misslyckades med att aktivera LIRC-stöd.\n" #define MSGTR_LIRCcfgerr "Misslyckades med att läsa LIRC-konfigurationsfil %s.\n" @@ -547,8 +524,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "Du måste uppgradera/installera de binära codecspaketen.\nGå till http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "INFO: 'Win32/DShow'-videocodecinitiering: OK.\n" -#define MSGTR_DMOInitOK "INFO: 'Win32/DMO'-videocodecinitiering: OK.\n" // x11_common.c #define MSGTR_EwmhFullscreenStateFailed "\nX11: Kunde inte sända EWMH-fullskärmshändelse!\n" @@ -577,7 +552,6 @@ #define MSGTR_Preferences "Inställningar" #define MSGTR_AudioPreferences "Audiodirvrutinskonfiguration" #define MSGTR_NoMediaOpened "Inget media öppnad" -#define MSGTR_VCDTrack "VCD-spår %d" #define MSGTR_NoChapter "Inget kapitel" #define MSGTR_Chapter "Kapitel %d" #define MSGTR_NoFileLoaded "Ingen fil laddad" @@ -646,7 +620,7 @@ #define MSGTR_MENU_AudioLanguages "Audiospråk" #define MSGTR_MENU_SubtitleLanguages "Textningsspråk" #define MSGTR_MENU_SkinBrowser "Skinläsare" -#define MSGTR_MENU_Exit "Avsluta..." +#define MSGTR_MENU_Exit "Avsluta" #define MSGTR_MENU_Mute "Dämpa" #define MSGTR_MENU_Original "Orginal" #define MSGTR_MENU_AspectRatio "Aspect ratio" // FIXME translate? @@ -704,9 +678,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Aktivera HÅRD frame dropping (dangerous)" #define MSGTR_PREFERENCES_Flip "Flippa bilden uppochner" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Timers och indikatorer" -#define MSGTR_PREFERENCES_OSDProgress "Tillståndsrad endast" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Timer, procent och total tid" #define MSGTR_PREFERENCES_Subtitle "Textning:" #define MSGTR_PREFERENCES_SUB_Delay "Fördröjning: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" @@ -820,9 +791,7 @@ // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "'Interlaced'-mode kräver bildhöjd som är delbar med 4." // FIXME interlaced? #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "Oförmögen att allokera linjebufferrt för interlaced-mode." -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "indata är ej i RGB-format, kan inte separera 'chrominance' via fält!" // FIXME chrominance #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "Bildbredd måste vara delbart med 2." -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "Ej tillräckligt med minne för att allokera RGB-bildramsbuffert." #define MSGTR_VO_YUV4MPEG_OutFileOpenError "Kan inte få minnes- eller filhanterare att skriva till \"%s\"!" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "Fel vid skrivning av bild till ut!" // FIXME output here? #define MSGTR_VO_YUV4MPEG_UnknownSubDev "Okänd subdevice: %s" // FIXME subdevice @@ -912,31 +881,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** Din ljudkortsenhet hanterar inte select() ***\nKompilera om med '#undef HAVE_AUDIO_SELECT' i config.h !\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\nFatalt fel: *** KAN INTE ÅTERÖPPNA / ÅTERSTÄLLA AUDIOENHET (%s) ***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init: önskat format: %d Hz, %d kanaler, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init: inga ljudkort funna.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init: icke godkänt format (%s) önskat - ut deaktiverat.\n" // FIXME output -> ut here? -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init: uppspelningsöppningsfel: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init: pcm-infofel: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init: %d ljurtkort funna, använder: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init: pcm-kanalinfofel: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init: fel vid sättning av parametrarna: %s\n" // FIXME setting? -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init: fel vid initiering av kanal: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init: kanalprepareringsfel: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit: uppspelningslänsningsfel: %s\n" // FIXME drain -> länsning? -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit: uppspelningsspolningsfel: %s\n" // FIXME flush -> spolning? -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit: pcm-stängningsfel: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset: uppspelningslänsningsfel: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset: uppspelningsspolningsfel: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset: kanalprepareringsfel: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause: uppspelningslänsningsfel: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause: uppspelningsspolningsfel: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume: kanalprepareringsfel: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play: alsa underrun, återställer ström.\n" // FIXME underun - translate? -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play: uppspelningsprepareringsfel: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play: skrivfel efter återställning: %s - ger upp.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play: utfel: %s\n" // FIXME output -> ut her? - // ao_plugin.c #define MSGTR_AO_PLUGIN_InvalidPlugin "[AO PLUGIN] icke godkänd plugin: %s\n" // FIXME plugin - translate? diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-tr.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-tr.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-tr.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-tr.h 2011-12-05 11:38:13.000000000 +0000 @@ -62,7 +62,6 @@ #define MSGTR_NoHomeDir "Anadizin(HOME) bulunamıyor\n" #define MSGTR_GetpathProblem "get_path(\"config\") problemi\n" #define MSGTR_CreatingCfgFile "Ayar dosyası oluşturuluyor: %s\n" -#define MSGTR_BuiltinCodecsConf "Gömülü codecs.conf dosyası kullanılıyor\n" #define MSGTR_CantLoadFont "Yazıtipi açılamıyor: %s\n" #define MSGTR_CantLoadSub "Altyazı açılamıyor: %s\n" #define MSGTR_DumpSelectedStreamMissing "döküm: HATA:seçili yayın(stream) hatalı!\n" @@ -104,8 +103,6 @@ #define MSGTR_Playing "%s oynatılıyor\n" #define MSGTR_NoSound "Ses: ses yok!\n" #define MSGTR_FPSforced "FPS %5.3f olarak zorlandı (ftime: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "MPlayer runtime CPU detection ile derlendi.\n" -#define MSGTR_CompiledWithCPUExtensions "x86 işlemci için uzantılarla derlendi:" #define MSGTR_AvailableVideoOutputDrivers "Kullanılabilir video çıktı sürücüleri:\n" #define MSGTR_AvailableAudioOutputDrivers "Kullanılabilir ses çıktı sürücüleri:\n" #define MSGTR_AvailableAudioCodecs "Kullanılabilir ses kodekleri:\n" @@ -113,7 +110,6 @@ #define MSGTR_AvailableAudioFm "\nKullanılabilir ses kodek sınıfları/sürücüleri (gömülü):\n" #define MSGTR_AvailableVideoFm "\nKullanılabilir video kodek sınıfları/sürücüleri (gömülü):\n" #define MSGTR_AvailableFsType "Kullanılabilir tamekran değiştirme modları:\n" -#define MSGTR_UsingRTCTiming "Linux donanım RTC zamanlaması kullanılıyor(%ldHz)\n" #define MSGTR_CannotReadVideoProperties "Video: Özellikler okunamıyor\n" #define MSGTR_NoStreamFound "Yayın(stream) bulunamadı\n" #define MSGTR_ErrorInitializingVODevice "Video çıkış (-vo) aygıtı açılış/başlatma hatası!\n" @@ -148,14 +144,11 @@ #define MSGTR_AddedSubtitleFile "ALTYAZI: (%d) altyazı dosyası eklendi : %s\n" #define MSGTR_RemovedSubtitleFile "ALTYAZI: (%d) altyazı dosyası kaldırıldı: %s\n" #define MSGTR_ErrorOpeningOutputFile "Yazma esnasında [%s] dosyası açılış hatası!\n" -#define MSGTR_CommandLine "KomutSatırı:" #define MSGTR_RTCDeviceNotOpenable "%s dosyası açılamadı: %s (kullanıcı için okunabilir olmalı)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "ioctl'de Linux RTC açılış hatası (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "\"echo %lu > /proc/sys/dev/rtc/max-user-freq\" seçeneğini sistem açılış betiklerine eklemeyi deneyiniz.\n" #define MSGTR_LinuxRTCInitErrorPieOn "ioctl'de Linux RTC açılış hatası (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "%s zamanlaması kullanılıyor.\n" -#define MSGTR_MenuInitialized "Menü başlatıldı: %s\n" -#define MSGTR_MenuInitFailed " Menü başlatılamadı.\n" #define MSGTR_Getch2InitializedTwice "UYARI:getch2_init iki defa çağırıldı!\n" #define MSGTR_DumpstreamFdUnavailable "Bu yayın dökülemez (dump) - kullanılabilir dosya tanımlayıcısı yok.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "%s root menüsü ile libmenu video filtresi açılamaz.\n" @@ -286,12 +279,9 @@ #define MSGTR_CannotAllocateBytes "%d bayt atanamadı\n" #define MSGTR_SettingAudioDelay "Ses gecikmesi %5.3fs olarak ayarlanıyor.\n" #define MSGTR_SettingVideoDelay "Video gecikmesi %5.3fs olarak ayarlanıyor.\n" -#define MSGTR_SettingAudioInputGain "Ses giriş kazancı %f olarak ayarlanıyor.\n" -#define MSGTR_LamePresetEquals "\nönayarlama=%s\n\n" #define MSGTR_LimitingAudioPreload "Ses önyüklemesi 0.4s olarak sınırlanıyor\n" #define MSGTR_IncreasingAudioDensity "Ses yoğunluğu 4 olarak artırılıyor.\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Ses önyüklemesi 0 olarak, en yüksek pts düzeltmesi 0 olarak zorlanıyor.\n" -#define MSGTR_CBRAudioByterate "\n\nCBR ses: %d bayt/sn, %d bayt/blok\n" #define MSGTR_LameVersion "LAME sürümü %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Hata: Saptanan bit oranı önayarlama için geçerli aralık dışındadır.\n"\ "\n"\ @@ -479,8 +469,6 @@ #define MSGTR_CodecNeedsOutfmt "\nkodek(%s) için bir 'outfmt' gerekiyor!\n" #define MSGTR_CantAllocateComment "Açıklama için bellek atanamıyor." #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "%s okunuyor: " -#define MSGTR_CantOpenFileError "'%s' açılamıyor: %s\n" #define MSGTR_CantGetMemoryForLine "'satır' için belleğe ulaşılamıyor: %s\n" #define MSGTR_CantReallocCodecsp "'*codecsp': %s yeniden atanamıyor.\n" #define MSGTR_CodecNameNotUnique "'%s' adı benzersiz değil." @@ -574,7 +562,6 @@ #define MSGTR_WarningLenIsntDivisible "Uyarı! len samplesize ile bölünebilir değil!\n" #define MSGTR_MuxbufMallocErr "Karıştırıcı tamponu ile bellek atanamıyor!\n" #define MSGTR_MuxbufReallocErr "Karışıtırıcı tamponu ile bellek tekrar-atanamıyor!\n" -#define MSGTR_MuxbufSending "Karıştırıcı tamponu karıştırıcıya %d kare gönderiyor.\n" #define MSGTR_WritingHeader "Başlık yazılıyor...\n" #define MSGTR_WritingTrailer "İndeks yazılıyor...\n" @@ -593,7 +580,6 @@ #define MSGTR_ON2AviFormat "ON2 AVI biçimi" #define MSGTR_Detected_XXX_FileFormat "%s dosya biçimi bulundu!\n" #define MSGTR_DetectedAudiofile "Ses dosyası bulundu !\n" -#define MSGTR_NotSystemStream "MPEG Sistem Yayın biçimi değil...(İletim yayını olabilir?)\n" #define MSGTR_InvalidMPEGES "Geçersiz MPEG-ES biçimi??? Geliştiricilere bildiriniz, bu bir hata olabilir.:(\n" #define MSGTR_FormatNotRecognized "============ Üzgünüm, bu dosya biçimi desteklenmiyor ===========\n"\ "=== Dosya bir AVI,ASF veya MPEG yayın biçimi ise, lütfen geliştiricilere bildiriniz. ===\n" @@ -618,11 +604,8 @@ #define MSGTR_MOVcomprhdr "MOV: Sıkıştırılmış başlık desteği ZLIB gerektiriyor!\n" #define MSGTR_MOVvariableFourCC "MOV: UYARI: Değişken FOURCC bulundu!?\n" #define MSGTR_MOVtooManyTrk "MOV: UYARI: Çok sayıda parça!" -#define MSGTR_FoundAudioStream "==> Bulunan Ses Yayını: %d\n" -#define MSGTR_FoundVideoStream "==> Bulunan Video Yayını: %d\n" #define MSGTR_DetectedTV "TV Bulundu! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "ogg ayrıştırıcısı açılamadı\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Ses yayını aranıyor (id:%d)\n" #define MSGTR_CannotOpenAudioStream "Ses yayını açılamıyor: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Altyazı yayını açılamıyor: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Ses ayrıştırıcısı açılamadı: %s\n" @@ -663,24 +646,17 @@ #define MSGTR_UsingExternalPP "[PP] Harici postprocessing filtresi kullanılıyor, max q = %d\n" #define MSGTR_UsingCodecPP "[PP] Kodeklerin postprocessing işlemi kullanılıyor, max q = %d\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "'%s' video özelliği seçili vo & vd ile desteklenmiyor! \n" #define MSGTR_VideoCodecFamilyNotAvailableStr "İstenilen video kodek sınıfı [%s] (vfm=%s) kullanılabilir değil.\n(derlerken etkinleştirin.\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "İstenilen ses kodek sınıfı [%s] (afm=%s) kullanılabilir değil.\n(derlerken etkinleştirin!)\n" #define MSGTR_OpeningVideoDecoder "Video dekoderi açılıyor: [%s] %s\n" #define MSGTR_SelectedVideoCodec "Seçili video kodeği: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "Ses dekoderi açılıyor: [%s] %s\n" #define MSGTR_SelectedAudioCodec "Seçili ses kodeği: [%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "%dHz/%dch/%s -> %dHz/%dch/%s için ses filtre zinciri oluşturuluyor...\n" -#define MSGTR_UninitVideoStr "kapanan video: %s \n" -#define MSGTR_UninitAudioStr "kapanan ses: %s \n" #define MSGTR_VDecoderInitFailed "Video Dekoderi açılamadı :(\n" #define MSGTR_ADecoderInitFailed "Ses Dekoderi açılamadı :(\n" #define MSGTR_ADecoderPreinitFailed "Ses Dekoderi önaçılışı başarısız :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dekod_ses: Girdi tamponu için %d bayt atanıyor\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dekod_ses: Çıktı tamponu için %d + %d = %d bayt atanıyor\n" // LIRC: -#define MSGTR_SettingUpLIRC "LIRC desteği ayarlanıyor...\n" #define MSGTR_LIRCopenfailed "LIRC desteği açılamadı!\n" #define MSGTR_LIRCcfgerr "%s LIRC ayar dosyası okunamadı!\n" @@ -698,8 +674,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "İkili kodek paketini yükseltmeniz/yüklemeniz gerekiyor.\n http://www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "BİLGİ: Win32/Dshow video kodek açılışı tamam.\n" -#define MSGTR_DMOInitOK "BİLGİ: Win32/DMO video kodek açılışı tamam.\n" // x11_common.c #define MSGTR_EwmhFullscreenStateFailed "\nX11: EWMH tam ekran sonucu gönderilemedi!\n" @@ -731,7 +705,6 @@ #define MSGTR_Preferences "Tercihler" #define MSGTR_AudioPreferences "Ses sürücüsü ayarları" #define MSGTR_NoMediaOpened "Medya yok" -#define MSGTR_VCDTrack "VCD parça %d" #define MSGTR_NoChapter "Bölüm yok" #define MSGTR_Chapter "Bölüm %d" #define MSGTR_NoFileLoaded "Dosya yüklenemedi" @@ -806,7 +779,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "Arayüz seçici" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Çık..." +#define MSGTR_MENU_Exit "Çık" #define MSGTR_MENU_Mute "Sessiz" #define MSGTR_MENU_Original "Normal" #define MSGTR_MENU_AspectRatio "Görünüm Oranı" @@ -868,9 +841,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Ek kare (frame) atlamayı etkinleştir (tehlikeli)" #define MSGTR_PREFERENCES_Flip "Görüntüyü ters çevir" #define MSGTR_PREFERENCES_Panscan "Yanaltarama: " -#define MSGTR_PREFERENCES_OSDTimer "Zamanlayıcı ve göstergeler" -#define MSGTR_PREFERENCES_OSDProgress "Sadece işlem çubukları" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Zamanlayıcı, geçen ve toplam zaman" #define MSGTR_PREFERENCES_Subtitle "Altyazı:" #define MSGTR_PREFERENCES_SUB_Delay "Gecikme: " #define MSGTR_PREFERENCES_SUB_FPS "FPS:" @@ -1038,9 +1008,7 @@ // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "Örme(interlaced) modu 4'e bölünebilme için görüntü yüksekliğini gerektiriyor." #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "Örme (interlaced) modu için ilerleme tamponu atanamıyor." -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "Girdi RGB değil, alanlar ile renkler ayrılamıyor.!" #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "Görüntü genişliği 2 ile bölünür olmalıdır." -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "RGB kare(frame) tamponu atama için yeterli bellek." #define MSGTR_VO_YUV4MPEG_OutFileOpenError " \"%s\" yazılması için bellek veya dosya kimlikleyiciye ulaşılamıyor!" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "Çıktıya görüntü yazma hatası!" #define MSGTR_VO_YUV4MPEG_UnknownSubDev "Bilinmeyen alt-aygıt: %s" @@ -1148,31 +1116,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** Ses sürücünüzün select() desteği YOK ***\nconfig.h dosyasında #undef HAVE_AUDIO_SELECT ile Mplayer'ı yeniden derleyiniz!\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\nÖnemli Hata: ***SES AYGITI TEKRAR AÇILAMIYOR (%s) ***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-açılış: istenen biçim: %d Hz, %d kanalları, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-açılış: ses kartı bulunamadı.\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-açılış: geçersiz biçim (%s) istenen - çıktı devredışı.\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-açılış: playback açma hatası: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-açılış: pcm bilgi hatası: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-açılış: %d ses kart(lar)ı bulundu, kullanılan: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-açılış: pcm kanal bilgi hatası: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-açılış: parametre ayarlama hatası: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-açılış: kanal kurulum hatası: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-açılış: kanal hazırlama hatası: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-kapanış: playback drain hatası: %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-kapanış: playback flush hatası: %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-kapanış: pcm kapanış hatası: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-sıfırla: playback drain hatası: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-sıfırla: playback yayın flush hatası: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-sıfırla: kanal hazırlama hatası: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-duraklat: playback drain hatası: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-duraklat: playback flush hatası: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-sürdür: kanal hazırlama hatası: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-oynat: alsa underrun, yayın tekrar ayarlanıyor.\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-oynat: playback hazırlama hatası: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-oynat: yeniden başlatma sonrası yazma hatası: %s - vazgeçiliyor.\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-oynat: çıktı hatası: %s\n" - // ao_alsa.c #define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] Geçersiz karıştırıcı içeriği. Varsayılan olarak 0. yapılıyor\n" #define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] Karıştırıcı açma hatası: %s\n" @@ -1258,7 +1201,6 @@ // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "%s kumanda kolu açılıyor.\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "%s kumanda kolu açılamadı: %s \n" #define MSGTR_INPUT_JOYSTICK_ErrReading "Kumanda kolu okuma hatası: %s \n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "Kumanda kolu: %d bayt veri serbest bırakılıyor.\n" @@ -1299,13 +1241,13 @@ #define MSGTR_MPDEMUX_URL_StringAlreadyEscaped "%c%c1%c2 url_atlamasında dizgi zaten atlatılmış görünüyor.\n" -// ai_alsa1x.c +// ai_alsa.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "Örnekleme oranı ayarlanamıyor\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "Tampon zamanı ayarlanamıyor\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "Zaman aralığı ayarlanamıyor\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "Örnekleme oranı ayarlanamıyor\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "Tampon zamanı ayarlanamıyor\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "Zaman aralığı ayarlanamıyor\n" -// ai_alsa1x.c / ai_alsa.c +// ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "Bu PCM için bozuk ayar: kullanılabilir ayar yok\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "Erişim türü kullanılabilir değil\n" @@ -1315,9 +1257,7 @@ #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "Tampon boyutuna (%u == %lu) eşit zaman aralığı kullanılamıyor.\n" #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "sw parametreleri yüklenemiyor:\n" #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "Ses açılış hatası: %s\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "ALSA durum hatası: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun!!! (en az %.3f ms uzunluğunda)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "ALSA Durumu:\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun: hazırlama hatası: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "ALSA okuma/yazma hatası" @@ -1392,7 +1332,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "Bilinmeyen asf yayın türü\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "HTTP yanıtı ayrıştırılamadı\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "Sunucu dönüşü %d:%s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP AYRIŞTIMA UYARISI : Pragma %s cuted from %zd bytes to %d\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP AYRIŞTIMA UYARISI : Pragma %s cuted from %zu bytes to %zu\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "Soket yazma hatası: %s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "Başlık ayrıştırılamadı\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "Yayın(stream) bulunamadı\n" @@ -1410,17 +1350,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "** boş liste?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "Video bulundu 0x%X - 0x%X\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "Boyutu %u bayt olan %d, 'bih' bulundu\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "M$ mpg4v1 videosu için keyframe tablosu yenileniyor.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "DIVX3 videosu için keyframe tablosu yanileniyor.\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "MPEG4 video için keyframe tablosu yenileniyor.\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "%d bayt boyutunda ( %d ), 'wf' bulundu\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI: dmlh bulundu (boyut=%d) (toplam_kare=%d)\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "INDEKS bloğu okunuyor, %d yığını %d karelerine ait (fpos=%"PRId64")\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "Ek RIFF başlığı...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** uyarı: genişletilmiş AVI başlığı değil..\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "Bozuk yığın? yığınboyutu=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI: ODML: odml indeksi oluşturuluyor (%d süperindeksyığınları)\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI: ODML: Bozuk (eksik?) dosya saptandı. Olağan indeksleme kullanılacak\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "%s indeks dosyası okunamıyor: %s\n" @@ -1931,17 +1861,13 @@ // stream/stream_radio.c #define MSGTR_RADIO_ChannelNamesDetected "[radio] Radyo kanal adları bulundu.\n" -#define MSGTR_RADIO_FreqRange "[radio] İzin verilen frekans aralığı şu: %.2f-%.2f MHz.\n" #define MSGTR_RADIO_WrongFreqForChannel "[radio] %s kanalı için yanlış frekans.\n" #define MSGTR_RADIO_WrongChannelNumberFloat "[radio] %.2f yanlış kanal numarası.\n" #define MSGTR_RADIO_WrongChannelNumberInt "[radio] %d yanlış kanal numarası.\n" #define MSGTR_RADIO_WrongChannelName "[radio] %s yanlış kanal adı.\n" #define MSGTR_RADIO_FreqParameterDetected "[radio] Radyo frekans değiştirgesi bulundu.\n" -#define MSGTR_RADIO_DoneParsingChannels "[radio] Kanallar ayrıştırıldı.\n" #define MSGTR_RADIO_GetTunerFailed "[radio] Uyarı: ioctl ayarlayıcsı alınamadı: %s. frac %d olarak ayarlanıyor\n" #define MSGTR_RADIO_NotRadioDevice "[radio] %s bir radyo aygıtı değildir!\n" -#define MSGTR_RADIO_TunerCapLowYes "[radio] ayarlayıcı düşük:evet frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[radio] ayarlayıcı düşük:hayır frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[radio] ioctl frekansı 0x%x (%.2f) göre ayarlanamamıştır, %s başarısız.\n" #define MSGTR_RADIO_GetFreqFailed "[radio] ioctl frekansı al, %s başarısız.\n" #define MSGTR_RADIO_SetMuteFailed "[radio] ioctl sesi kes, %s başarısız.\n" @@ -1951,27 +1877,22 @@ #define MSGTR_RADIO_DroppingFrame "\n[radio] çok kötü - ses çerçevesinden (%d bytes) atılıyor!\n" #define MSGTR_RADIO_BufferEmpty "[radio] grab_audio_frame: ara bellek boş, %d bilgi bytes için bekleniyor.\n" #define MSGTR_RADIO_AudioInitFailed "[radio] audio_in_init: %s\n başarısız." -#define MSGTR_RADIO_AudioBuffer "[radio] Ses kaydet - ara bellek=%d bytes (blok=%d bytes).\n" #define MSGTR_RADIO_AllocateBufferFailed "[radio] ses için ara bellek bulanamadı (blok=%d,arabel=%d): %s\n" #define MSGTR_RADIO_CurrentFreq "[radio] Mevcut frekans: %.2f\n" #define MSGTR_RADIO_SelectedChannel "[radio] Seçilen kanal: %d - %s (frek: %.2f)\n" #define MSGTR_RADIO_ChangeChannelNoChannelList "[radio] Kanal değiştirelemez: Kanal listesine kanal verilmedi.\n" #define MSGTR_RADIO_UnableOpenDevice "[radio] '%s': %s açılamadı.\n" -#define MSGTR_RADIO_RadioDevice "[radio] Radyo fd: %d, %s\n" #define MSGTR_RADIO_InitFracFailed "[radio] init_frac başarılamadı.\n" #define MSGTR_RADIO_WrongFreq "[radio] %.2f : Frekansı yanlış.\n" #define MSGTR_RADIO_UsingFreq "[radio] %.2f: Frekansı kullanılıyor\n" #define MSGTR_RADIO_AudioInInitFailed "[radio] audio_in_init başarılamadı.\n" -#define MSGTR_RADIO_BufferString "[radio] %s: ara bellek=%d'ten/'den atılan=%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[radio] audio_in_setup %s\n: çağrısı başarılamadı." -#define MSGTR_RADIO_CaptureStarting "[radio] Ivır zıvırı kayıtetme başlıyor.\n" #define MSGTR_RADIO_ClearBufferFailed "[radio] %s: Ara belleği temizleme başarılamadı." #define MSGTR_RADIO_StreamEnableCacheFailed "[radio] %s: stream_enable_cache çağrısı başarılamadı." #define MSGTR_RADIO_DriverUnknownStr "[radio] Bilinmeyen sürücü adı: %s\n" #define MSGTR_RADIO_DriverV4L2 "[radio] V4Lv2 radyo görünümü kullanılıyor.\n" #define MSGTR_RADIO_DriverV4L "[radio] V4Lv1 radyo görünümü kullanılıyor.\n" #define MSGTR_RADIO_DriverBSDBT848 "[radio] *BSD BT848 radyo arayüzü kullanılıyor.\n" -#define MSGTR_RADIO_AvailableDrivers "[radio] kullanılabilir sürücüler: " // ================================== LIBASS ==================================== @@ -2049,30 +1970,23 @@ " gözardı edilecek! YV12 ile tekrar denemelisiniz (varsayılan\n"\ " renk uzayı) ve belgeleri okuyun!\n"\ "==================================================================\n" -#define MSGTR_TV_SelectedNormId "Seçilen norm id: %d\n" -#define MSGTR_TV_SelectedNorm "Seçilen norm : %s\n" #define MSGTR_TV_CannotSetNorm "Hata: Norm ayarlanamıyor!\n" #define MSGTR_TV_MJP_WidthHeight " MJP: genişlik %d yükseklik %d\n" #define MSGTR_TV_UnableToSetWidth "İstek yapılan genişlik ayarlanamıyor: %d\n" #define MSGTR_TV_UnableToSetHeight "İstek yapılan yükseklik ayarlanamıyor: %d\n" #define MSGTR_TV_NoTuner "Seçilen girişin bir ayarlayıcı yok!\n" #define MSGTR_TV_UnableFindChanlist "Seçilen kanal listesi bulunamıyor! (%s)\n" -#define MSGTR_TV_SelectedChanlist "Seçilen kanal listesi: %s (%d kanal içeriyor)\n" #define MSGTR_TV_ChannelFreqParamConflict "Aynı anda frekans ve kanal ayarlanamaz!\n" #define MSGTR_TV_ChannelNamesDetected "TV kanal isimleri algılandı.\n" #define MSGTR_TV_NoFreqForChannel "%s kanalı için frekans bulunamadı (%s)\n" #define MSGTR_TV_SelectedChannel3 "Seçilen kanal: %s - %s (frekans: %.3f)\n" #define MSGTR_TV_SelectedChannel2 "Seçien kanal: %s (frekans: %.3f)\n" -#define MSGTR_TV_SelectedFrequency "Seçilen frekans: %lu (%.3f)\n" -#define MSGTR_TV_RequestedChannel "İstek yapılan kanal: %s\n" #define MSGTR_TV_UnsupportedAudioType "Ses tipi '%s (%x)' desteklenmiyor!\n" -#define MSGTR_TV_AudioFormat " TV sesi: %d tane kanal, %d bit, %d Hz\n" #define MSGTR_TV_AvailableDrivers "Kullanılabilir sürücüler:\n" #define MSGTR_TV_DriverInfo "Seçilen sürücü: %s\n isim: %s\n yazar: %s\n yorum: %s\n" #define MSGTR_TV_NoSuchDriver "Böyle bir sürücü yok: %s\n" #define MSGTR_TV_DriverAutoDetectionFailed "TV sürücü oto-algılama başarısız.\n" #define MSGTR_TV_UnknownColorOption "Bilinmeyen renk seçeneği (%d) belirtildi!\n" -#define MSGTR_TV_CurrentFrequency "Şimdiki frekans: %lu (%.3f)\n" #define MSGTR_TV_NoTeletext "Teletext yok" #define MSGTR_TV_Bt848IoctlFailed "tvi_bsdbt848: %s ioctl çağrısı başarısız. Hata: %s\n" #define MSGTR_TV_Bt848InvalidAudioRate "tvi_bsdbt848: Geçersiz ses oranı. Hata: %s\n" @@ -2100,14 +2014,8 @@ #define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow: Aygıt #%d bulunamadı\n" #define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow: Aygıt #%d için isim alınamadı\n" #define MSGTR_TVI_DS_UsingDevice "tvi_dshow: Aygıt #%d kullanılıyor: %s\n" -#define MSGTR_TVI_DS_DeviceName "tvi_dshow: Aygıt #%d: %s\n" #define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow: Frekans doğrudan alınamadı. OS gömülü kanal tablosu kullanılacak.\n" -#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow: Frekans doğrudan ayarlanamadı. OS gömülü kanal tablosu kullanılacak.\n" -#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow: Desteklenen normlar:" -#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow: Kullanılabilir görüntü girişleri:" -#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow: Kullanılabilir ses girişleri:" //following phrase will be printed near the selected audio/video input -#define MSGTR_TVI_DS_InputSelected "(seçildi)" #define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow: kstvtune.ax dosyasından frekans tablosu yüklenemedi\n" #define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow: Yanlış aygıt parametresi: %s\n" #define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow: Yanlış aygıt indeksi: %d\n" @@ -2119,7 +2027,6 @@ #define MSGTR_TVI_DS_ChangingWidthHeightNotSupported "tvi_dshow: Görüntü genişliği/yükseliği değişimi aygıt tarafından desteklenmiyor.\n" #define MSGTR_TVI_DS_SelectingInputNotSupported "tvi_dshow: Yakalama kaynağının seçimi aygıt tarafından desteklenmiyor\n" -#define MSGTR_TVI_DS_FreqTableLoaded "tvi_dshow: (%s) Frekans tablosu, ülke id=%d (kanallar:%d) için yüklendi.\n" #define MSGTR_TVI_DS_ErrorParsingAudioFormatStruct "tvi_dshow: Ses biçimi yapısı ayrıştırılamadı.\n" #define MSGTR_TVI_DS_ErrorParsingVideoFormatStruct "tvi_dshow: Görüntü biçimi yapısı ayrıştırılamadı.\n" #define MSGTR_TVI_DS_UnableSetAudioMode "tvi_dshow: Ses modu ayarlanamadı: %d. Hata:0x%x\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-uk.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-uk.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-uk.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-uk.h 2011-10-25 13:55:48.000000000 +0000 @@ -58,7 +58,6 @@ #define MSGTR_NoHomeDir "Не можу знайти домашній каталог\n" #define MSGTR_GetpathProblem "проблеми у get_path(\"config\")\n" #define MSGTR_CreatingCfgFile "Створення файлу конфігурації: %s\n" -#define MSGTR_BuiltinCodecsConf "Використовую вбудований codecs.conf\n" #define MSGTR_CantLoadFont "Не можу завантажити шрифт: %s\n" #define MSGTR_CantLoadSub "Не можу завантажити субтитри: %s\n" #define MSGTR_DumpSelectedStreamMissing "dump: FATAL: обраний потік загублений!\n" @@ -96,8 +95,6 @@ #define MSGTR_Playing "\nПрогравання %s\n" #define MSGTR_NoSound "Аудіо: без звуку!!!\n" #define MSGTR_FPSforced "Примусово змінена кількість кадрів на секунду на %5.3f (ftime: %5.3f)\n" -#define MSGTR_CompiledWithRuntimeDetection "Скомпільвано з автовизначенням CPU - УВАГА - це не оптимально!\nДля отримання кращих результатів перекомпілюйте MPlayer з --disable-runtime-cpudetection\n" -#define MSGTR_CompiledWithCPUExtensions "Скомпільовано для x86 CPU з розширеннями:" #define MSGTR_AvailableVideoOutputDrivers "Доступні модулі відео виводу:\n" #define MSGTR_AvailableAudioOutputDrivers "Доступні модулі аудіо виводу:\n" #define MSGTR_AvailableAudioCodecs "Доступні аудіо кодеки:\n" @@ -105,7 +102,6 @@ #define MSGTR_AvailableAudioFm "Доступні (вбудовані) групи/драйвера аудіо кодеків:\n" #define MSGTR_AvailableVideoFm "Доступні (вбудовані) групи/драйвера відео кодеків:\n" #define MSGTR_AvailableFsType "Доступні варіанти повноекранного відеорежиму:\n" -#define MSGTR_UsingRTCTiming "Використовую апаратний таймер RTC (%ldГц).\n" #define MSGTR_CannotReadVideoProperties "Відео: Неможливо отримати властивості.\n" #define MSGTR_NoStreamFound "Потік не знайдено.\n" #define MSGTR_ErrorInitializingVODevice "Помилка відкриття/ініціалізації вибраного video_out (-vo) пристрою.\n" @@ -139,14 +135,11 @@ #define MSGTR_AddedSubtitleFile "СУБТИТРИ: Додано файл субтитрів (%d): %s\n" #define MSGTR_RemovedSubtitleFile "СУБТИТРИ: Видалено файл субтитрів (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "Помилка при відкритті файлу [%s] для запису!\n" -#define MSGTR_CommandLine "Командний рядок:" #define MSGTR_RTCDeviceNotOpenable "Не можу відкрити %s: %s (користувач повинен мати права читання для файлу.)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Помилка ініцілізації Linux RTC у ioctl (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "Спробуйте додати \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" до скриптів запуску системи.\n" #define MSGTR_LinuxRTCInitErrorPieOn "Помилка ініціалізації Linux RTC у ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "Використовую %s синхронізацію.\n" -#define MSGTR_MenuInitialized "Меню ініціалізовано: %s\n" -#define MSGTR_MenuInitFailed "Ініціалізація меню невдале.\n" #define MSGTR_Getch2InitializedTwice "ПОПЕРЕДЖЕННЯ: getch2_init визвано двічі!\n" #define MSGTR_DumpstreamFdUnavailable "Не можу створити дамп цього потоку - не має доступного дексриптору.\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Не можу відкрити відео фільтр libmenu з цим кореневим меню %s.\n" @@ -275,12 +268,9 @@ #define MSGTR_CannotAllocateBytes "Не можу виділити пам'ять для %d байтів.\n" #define MSGTR_SettingAudioDelay "Встановлюю аудіо затримку у %5.3fс.\n" #define MSGTR_SettingVideoDelay "Встановлюю відео затримку у %5.3fс.\n" -#define MSGTR_SettingAudioInputGain "Встановлюю підсилення вхідного сигналу аудіо потоку у %f.\n" -#define MSGTR_LamePresetEquals "\npreset=%s\n\n" #define MSGTR_LimitingAudioPreload "Обмежити підвантаження аудіо до 0.4с.\n" #define MSGTR_IncreasingAudioDensity "Збільшую густину аудіо до 4.\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Форсую аудіо підвантаження до 0, максимальну корекцію pts у 0.\n" -#define MSGTR_CBRAudioByterate "\n\nCBR аудіо: %d байтів/сек, %d байтів/блок\n" #define MSGTR_LameVersion "Версія LAME %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "Помилка: Вказаний бітрейт не є вірним для даного встановлення.\n"\ "\n"\ @@ -467,8 +457,6 @@ #define MSGTR_CodecNeedsOutfmt "\nкодек(%s) потребує 'outfmt'!\n" #define MSGTR_CantAllocateComment "Не можу виділити пам'ять для коментаря. " #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "Читаю %s: " -#define MSGTR_CantOpenFileError "Не можу відкрити '%s': %s\n" #define MSGTR_CantGetMemoryForLine "Не можу виділити пам'ять для 'line': %s\n" #define MSGTR_CantReallocCodecsp "Не можу виконати realloc для '*codecsp': %s\n" #define MSGTR_CodecNameNotUnique "Назва кодеку '%s' не унікальна." @@ -534,7 +522,6 @@ #define MSGTR_Preferences "Шалаштування" #define MSGTR_AudioPreferences "Налаштування аудіо драйверу" #define MSGTR_NoMediaOpened "Носій не відкритий." -#define MSGTR_VCDTrack "VCD доріжка %d" #define MSGTR_NoChapter "Без розділу" #define MSGTR_Chapter "Розділ %d" #define MSGTR_NoFileLoaded "Файл не завантжено." @@ -609,7 +596,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "Переглядач жупанів" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "Вихід..." +#define MSGTR_MENU_Exit "Вихід" #define MSGTR_MENU_Mute "Тиша" #define MSGTR_MENU_Original "Вихідний" #define MSGTR_MENU_AspectRatio "Відношення сторін" @@ -669,9 +656,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "Дозволити викидування кадрів (небезпечно)" #define MSGTR_PREFERENCES_Flip "Перегорнути зображення догори ногами" #define MSGTR_PREFERENCES_Panscan "Panscan: " -#define MSGTR_PREFERENCES_OSDTimer "Таймер та індікатори" -#define MSGTR_PREFERENCES_OSDProgress "Лише лінійки" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "Таймер, проценти та загальний час" #define MSGTR_PREFERENCES_Subtitle "Субтитри:" #define MSGTR_PREFERENCES_SUB_Delay "Затримка: " #define MSGTR_PREFERENCES_SUB_FPS "к/c:" @@ -1076,7 +1060,6 @@ #define MSGTR_SwitchToNi "\nДетектовано погано перемежений AVI файл - переходжу в -ni режим...\n" #define MSGTR_Detected_XXX_FileFormat "Знайдений %s формат файлу!\n" #define MSGTR_DetectedAudiofile "Аудіо файл детектовано.\n" -#define MSGTR_NotSystemStream "Не в форматі MPEG System Stream... (можливо, Transport Stream?)\n" #define MSGTR_FormatNotRecognized "========= Вибачте, формат цього файлу не розпізнаний чи не підтримується ===========\n"\ "===== Якщо це AVI, ASF або MPEG потік, будь ласка зв'яжіться з автором! ======\n" #define MSGTR_MissingVideoStream "Відео потік не знайдений!\n" @@ -1097,11 +1080,8 @@ #define MSGTR_MOVcomprhdr "MOV: Стиснуті заголовки (поки що) не підтримуються!\n" #define MSGTR_MOVvariableFourCC "MOV: Попередження! Знайдено перемінний FOURCC!?\n" #define MSGTR_MOVtooManyTrk "MOV: Попередження! надто багато треків!" -#define MSGTR_FoundAudioStream "==> Знайдено аудіо потік: %d\n" -#define MSGTR_FoundVideoStream "==> Знайдено відео потік: %d\n" #define MSGTR_DetectedTV "Детектовано ТВ! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "Неможливо відкрити ogg demuxer.\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: Пошук аудіо потоку (id:%d).\n" #define MSGTR_CannotOpenAudioStream "Неможливо відкрити аудіо потік: %s\n" #define MSGTR_CannotOpenSubtitlesStream "Неможливо відкрити потік субтитрів: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "Не вдалося відкрити аудіо demuxer: %s\n" @@ -1130,21 +1110,15 @@ #define MSGTR_UsingExternalPP "[PP] Використовую зовнішній фільтр обробки, макс q = %d.\n" #define MSGTR_UsingCodecPP "[PP] Використовую обробку кодека, макс q = %d.\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "Відео атрибут '%s' не підтримується вибраними vo & vd.\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "Запрошений драйвер відео кодеку [%s] (vfm=%s) недосяжний (ввімкніть його під час компіляції)\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "Запрошений драйвер аудіо кодеку [%s] (afm=%s) недосяжний (ввімкніть його під час компіляції)\n" #define MSGTR_OpeningVideoDecoder "Відкриваю відео декодер: [%s] %s\n" #define MSGTR_OpeningAudioDecoder "Відкриваю аудіо декодер: [%s] %s\n" -#define MSGTR_UninitVideoStr "відновлення відео: %s\n" -#define MSGTR_UninitAudioStr "відновлення аудіо: %s\n" #define MSGTR_VDecoderInitFailed "Збій ініціалізації VDecoder :(\n" #define MSGTR_ADecoderInitFailed "Збій ініціалізації ADecoder :(\n" #define MSGTR_ADecoderPreinitFailed "Збій підготування ADecoder :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: Розподіляю %d байт вхідному буферу\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: Розподіляю %d + %d = %d байт вихідному буферу\n" // LIRC: -#define MSGTR_SettingUpLIRC "Встановлення підтримки lirc...\n" #define MSGTR_LIRCopenfailed "Невдале відкриття підтримки lirc!\n" #define MSGTR_LIRCcfgerr "Невдале читання файлу конфігурації LIRC %s!\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-zh_CN.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-zh_CN.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-zh_CN.h 2011-06-19 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-zh_CN.h 2012-01-02 03:34:19.000000000 +0000 @@ -1,6 +1,6 @@ -// Synced with help_mp-en.h rev. 33618 +// Synced with help_mp-en.h rev. 34475 // -// Translated by JRaSH +// Translated by JRaSH @@ -64,7 +64,6 @@ #define MSGTR_NoHomeDir "无法找到 HOME 目录\n" #define MSGTR_GetpathProblem "get_path(\"config\") 调用出现问题\n" #define MSGTR_CreatingCfgFile "创建配置文件:%s\n" -#define MSGTR_BuiltinCodecsConf "使用内建默认的 codecs.conf 文件。\n" #define MSGTR_CantLoadFont "无法加载位图字体‘%s’\n" #define MSGTR_CantLoadSub "无法加载字幕‘%s’\n" #define MSGTR_DumpSelectedStreamMissing "内核导出:致命错误:指定的媒体流不存在!\n" @@ -109,8 +108,6 @@ #define MSGTR_Playing "\n正在播放 %s。\n" #define MSGTR_NoSound "音频:没有音轨\n" #define MSGTR_FPSforced "FPS 强制设为 %5.3f(ftime:%5.3f)。\n" -#define MSGTR_CompiledWithRuntimeDetection "编译时包含了实时 CPU 类型检测。\n" -#define MSGTR_CompiledWithCPUExtensions "编译时针对 x86 CPU 扩展指令集优化:" #define MSGTR_AvailableVideoOutputDrivers "可用的视频输出驱动:\n" #define MSGTR_AvailableAudioOutputDrivers "可用的音频输出驱动:\n" #define MSGTR_AvailableAudioCodecs "可用的音频编解码器:\n" @@ -118,7 +115,6 @@ #define MSGTR_AvailableAudioFm "\n可用的(编译时已包含的)音频编解码器类/驱动:\n" #define MSGTR_AvailableVideoFm "\n可用的(编译时已包含的)视频编解码器类/驱动:\n" #define MSGTR_AvailableFsType "可用的全屏图层变换模式:\n" -#define MSGTR_UsingRTCTiming "使用 Linux 的硬件 RTC 计时(%ldHz)。\n" #define MSGTR_CannotReadVideoProperties "视频:无法读取视频属性\n" #define MSGTR_NoStreamFound "未找到媒体流。\n" #define MSGTR_ErrorInitializingVODevice "打开/初始化所选的(-vo)视频输出设备出错。\n" @@ -153,14 +149,11 @@ #define MSGTR_AddedSubtitleFile "字幕:添加字幕文件(%d):%s\n" #define MSGTR_RemovedSubtitleFile "字幕:移除字幕文件(%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "未能以写入方式打开文件 [%s]!\n" -#define MSGTR_CommandLine "命令行:" #define MSGTR_RTCDeviceNotOpenable "未能打开 %s:%s(用户应当有权限读取该设备。)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "ioctl (rtc_irqp_set %lu) 中出现 Linux RTC 初始化错误:%s\n" #define MSGTR_IncreaseRTCMaxUserFreq "尝试添加 \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" 到你的系统启动脚本中。\n" #define MSGTR_LinuxRTCInitErrorPieOn "ioctl (rtc_pie_on) 中出现 Linux RTC 初始置错误:%s\n" #define MSGTR_UsingTimingType "正在使用 %s 计时。\n" -#define MSGTR_MenuInitialized "菜单已初始化:%s\n" -#define MSGTR_MenuInitFailed "菜单初始化失败。\n" #define MSGTR_Getch2InitializedTwice "警告:getch2_init 被两次调用!\n" #define MSGTR_DumpstreamFdUnavailable "无法导出该数据流 - 没有可用的文件描述符。\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "无法用根菜单 %s 打开 libmenu 视频过滤器。\n" @@ -295,12 +288,9 @@ #define MSGTR_CannotAllocateBytes "无法分配出 %d 字节。\n" #define MSGTR_SettingAudioDelay "设置音频延迟为 %5.3fs。\n" #define MSGTR_SettingVideoDelay "设置视频延迟为 %5.3fs。\n" -#define MSGTR_SettingAudioInputGain "设置音频输出增益为 %f。\n" -#define MSGTR_LamePresetEquals "\npreset=%s\n\n" #define MSGTR_LimitingAudioPreload "限制音频预加载长度为 0.4s。\n" #define MSGTR_IncreasingAudioDensity "增加音频密度至 4。\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "强制音频预加载长度为 0,最大 PTS 校验长度为 0。\n" -#define MSGTR_CBRAudioByterate "\n\nCBR 音频:%d 字节/秒,%d 字节/段\n" #define MSGTR_LameVersion "LAME 版本 %s(%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "错误:指定的比特率超出该预设配置的有效范围。\n"\ "\n"\ @@ -487,8 +477,6 @@ #define MSGTR_CodecNeedsOutfmt "\n编解码器(%s)缺少一个‘outfmt’!\n" #define MSGTR_CantAllocateComment "无法为注释文本分配内存。" #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token():max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "正在读取 %s:" -#define MSGTR_CantOpenFileError "无法打开‘%s’:%s\n" #define MSGTR_CantGetMemoryForLine "无法获取内存提供给‘line’:%s\n" #define MSGTR_CantReallocCodecsp "无法重新分配‘*codecsp’:%s\n" #define MSGTR_CodecNameNotUnique "编解码器名‘%s’重复。" @@ -554,7 +542,7 @@ #define MSGTR_Preferences "首选项" #define MSGTR_AudioPreferences "音频驱动配置" #define MSGTR_NoMediaOpened "未打开媒体内容" -#define MSGTR_VCDTrack "VCD 数据轨道 %d" +#define MSGTR_Title "标题 %d" #define MSGTR_NoChapter "无章节" #define MSGTR_Chapter "章节 %d" #define MSGTR_NoFileLoaded "未载入文件" @@ -574,6 +562,7 @@ #define MSGTR_NEMFMR "抱歉,没有足够的内存用于菜单渲染。" #define MSGTR_IDFGCVD "抱歉,未找到与 GUI 兼容的视频输出驱动。\n" #define MSGTR_NEEDLAVC "抱歉,未重新编码前无法用你的 DXR3/H+ 设备播放非 MPEG 文件。\n请启用 DXR3/H+ 配置盒中的 lavc 编解码器。" +#define MSGTR_ICONERROR "图标‘%s’未找到或格式不支持。\n" // --- skin loader error messages #define MSGTR_SKIN_ERRORMESSAGE "界面外观配置文件错误,行 %d:%s" @@ -605,6 +594,7 @@ #define MSGTR_MENU_AboutMPlayer "关于 MPlayer" #define MSGTR_MENU_Open "打开..." #define MSGTR_MENU_PlayFile "播放文件..." +#define MSGTR_MENU_PlayCD "播放 CD..." #define MSGTR_MENU_PlayVCD "播放 VCD..." #define MSGTR_MENU_PlayDVD "播放 DVD..." #define MSGTR_MENU_PlayURL "播放网络链接..." @@ -622,6 +612,7 @@ #define MSGTR_MENU_NormalSize "正常尺寸" #define MSGTR_MENU_DoubleSize "双倍尺寸" #define MSGTR_MENU_FullScreen "全屏" +#define MSGTR_MENU_CD "CD" #define MSGTR_MENU_DVD "DVD" #define MSGTR_MENU_VCD "VCD" #define MSGTR_MENU_PlayDisc "打开光盘..." @@ -636,7 +627,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "界面外观配置浏览器" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "退出..." +#define MSGTR_MENU_Exit "退出" #define MSGTR_MENU_Mute "静音" #define MSGTR_MENU_Original "原始的" #define MSGTR_MENU_AspectRatio "宽高比" @@ -697,9 +688,10 @@ #define MSGTR_PREFERENCES_HFrameDrop "启用强制丢帧(危险)" #define MSGTR_PREFERENCES_Flip "上下翻转图像" #define MSGTR_PREFERENCES_Panscan "全景模式:" -#define MSGTR_PREFERENCES_OSDTimer "计时器和指示器" -#define MSGTR_PREFERENCES_OSDProgress "只显示进度条" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "计时器,已播放百分比和总时间" +#define MSGTR_PREFERENCES_OSD_LEVEL0 "仅显示字幕" +#define MSGTR_PREFERENCES_OSD_LEVEL1 "显示音量和定位条" +#define MSGTR_PREFERENCES_OSD_LEVEL2 "显示音量、定位条、计时器和进度百分比" +#define MSGTR_PREFERENCES_OSD_LEVEL3 "显示音量、定位条、计时器、进度百分比和时间总长" #define MSGTR_PREFERENCES_Subtitle "字幕:" #define MSGTR_PREFERENCES_SUB_Delay "延迟:" #define MSGTR_PREFERENCES_SUB_FPS "帧率:" @@ -820,6 +812,35 @@ #define MSGTR_WS_NotAFile "这好像不是一个文件...\n" #define MSGTR_WS_DDNothing "D&D:未返回任何东西!\n" +// Win32 GUI +#define MSGTR_Close "关闭" +#define MSGTR_Default "默认值" +#define MSGTR_Down "向下" +#define MSGTR_Load "加载" +#define MSGTR_Save "保存" +#define MSGTR_Up "向上" +#define MSGTR_DirectorySelect "选择目录..." +#define MSGTR_PlaylistSave "保存播放列表..." +#define MSGTR_PlaylistSelect "选择播放列表..." +#define MSGTR_SelectTitleChapter "选择标题/章节..." +#define MSGTR_MENU_DebugConsole "调试控制终端" +#define MSGTR_MENU_OnlineHelp "线上帮助内容" +#define MSGTR_MENU_PlayDirectory "播放目录内容..." +#define MSGTR_MENU_SeekBack "向后定位" +#define MSGTR_MENU_SeekForw "向前定位" +#define MSGTR_MENU_ShowHide "显示/隐藏" +#define MSGTR_MENU_SubtitlesOnOff "显示字幕开/关" +#define MSGTR_PLAYLIST_AddFile "添加文件..." +#define MSGTR_PLAYLIST_AddURL "添加 URL..." +#define MSGTR_PREFERENCES_Priority "进程优先级:" +#define MSGTR_PREFERENCES_PriorityHigh "高" +#define MSGTR_PREFERENCES_PriorityLow "低" +#define MSGTR_PREFERENCES_PriorityNormal "标准" +#define MSGTR_PREFERENCES_PriorityNormalAbove "高于标准" +#define MSGTR_PREFERENCES_PriorityNormalBelow "低于标准" +#define MSGTR_PREFERENCES_VideoInSubwin "在子窗口中显示视频(仅用于 DirectX)" + + // ======================= video output drivers ======================== #define MSGTR_VOincompCodec "所选的视频输出设备与该编解码器不兼容。\n"\ @@ -1146,10 +1167,8 @@ // audio_out.c #define MSGTR_AO_ALSA9_1x_Removed "音频输出:alsa9 和 alsa1x 模块已不支持,请用 -ao alsa 代替。\n" -#define MSGTR_AO_TryingPreferredAudioDriver "尝试使用偏好的音频驱动‘%.*s’,选项设为‘%s’\n" #define MSGTR_AO_NoSuchDriver "无此音频驱动‘%.*s’\n" #define MSGTR_AO_FailedInit "未能初始化音频驱动‘%s’\n" -#define MSGTR_AO_TryingEveryKnown "尝试每个已知的音频驱动...\n" // ao_oss.c #define MSGTR_AO_OSS_CantOpenMixer "[AO OSS] audio_setup:无法打开混音设备 %s:%s\n" @@ -1218,31 +1237,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** 你的音频驱动不支持 select() ***\n需要在 config.h 中设置 #undef HAVE_AUDIO_SELECT 并重新编译 MPlayer!\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\n致命错误:*** 无法重新打开/重启音频设备(%s)***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-init:所请求格式:%d Hz,%d 声道,%s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-init:未找到声卡。\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-init:所请求格式无效(%s)- 禁用音频输出。\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-init:打开播放模式错误:%s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-init:PCM 信息错误:%s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-init:找到声卡 %d,使用:%s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-init:PCM 声道信息错误:%s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-init:设定参数错误:%s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-init:设定声道错误:%s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-init:准备声道错误:%s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-uninit:播放数据清空错误:%s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-uninit:播放数据刷新错误:%s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-uninit:PCM 关闭错误:%s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-reset:播放数据清空错误:%s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-reset:播放数据刷新错误:%s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-reset:声道准备错误:%s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-pause:播放数据刷新错误:%s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-pause:播放数据刷新错误:%s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-resume:声道准备错误:%s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play:alsa 输出滞后,重新设置音频流。\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-play:播放准备错误:%s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play:重置后写入错误:%s - 放弃。\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play:输出错误:%s\n" - // ao_alsa.c #define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] 无效的混音器索引号。取默认值 0。\n" #define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] 打开混音器错误:%s\n" @@ -1326,7 +1320,6 @@ // ========================== INPUT ========================================= // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "打开操纵杆设备 %s\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "无法打开操纵杆设备 %s:%s\n" #define MSGTR_INPUT_JOYSTICK_ErrReading "读取操纵杆设备时出错:%s\n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "操纵杆:丢失了 %d 字节的数据\n" @@ -1334,8 +1327,6 @@ #define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "操作杆未知警告事件类型 %d\n" // appleir.c -#define MSGTR_INPUT_APPLE_IR_Init "在设备 %s 上初始化 Apple IR\n" -#define MSGTR_INPUT_APPLE_IR_Detect "在设备 %s 上侦测到 Apple IR\n" #define MSGTR_INPUT_APPLE_IR_CantOpen "无法打开 Apple IR 设备:%s\n" // input.c @@ -1366,7 +1357,6 @@ #define MSGTR_INPUT_INPUT_ErrCantInitAppleRemote "无法初始化 Apple Remote 遥控器。\n" // lirc.c -#define MSGTR_SettingUpLIRC "设置 LIRC 支持\n" #define MSGTR_LIRCopenfailed "启用 LIRC 支持失败。将无法使用你的遥控器。\n" #define MSGTR_LIRCcfgerr "读取 LIRC 配置文件 %s 失败。\n" @@ -1381,7 +1371,6 @@ #define MSGTR_WarningLenIsntDivisible "警告,音频长度无法被采样率整除!\n" #define MSGTR_MuxbufMallocErr "流合并器帧缓冲无法分配内存!\n" #define MSGTR_MuxbufReallocErr "合路器帧缓冲无法重新分配内存!\n" -#define MSGTR_MuxbufSending "流合并器帧缓冲发送 %d 帧到流合并器。\n" #define MSGTR_WritingHeader "正在写入帧头...\n" #define MSGTR_WritingTrailer "正在写入索引...\n" @@ -1399,7 +1388,6 @@ #define MSGTR_ON2AviFormat "ON2 AVI 格式" #define MSGTR_Detected_XXX_FileFormat "检测到文件格式 %s。\n" #define MSGTR_DetectedAudiofile "检测到音频文件。\n" -#define MSGTR_NotSystemStream "非 MPEG 系统的媒体流格式...(可能是网络传输的媒体流?)\n" #define MSGTR_InvalidMPEGES "无法的 MPEG-ES 媒体流???请联系开发者,这可能是软件的缺陷 :(\n" #define MSGTR_FormatNotRecognized "============= 抱歉, 此文件格式无法辨认或支持 ===============\n"\ "=== 如果此文件是 AVI、ASF 或 MPEG 媒体流,请联系开发者! ===\n" @@ -1424,11 +1412,8 @@ #define MSGTR_MOVcomprhdr "MOV:需要 ZLIB 以支持经过压缩的文件头!\n" #define MSGTR_MOVvariableFourCC "MOV:警告:检测到可变的 FourCC 代码!?\n" #define MSGTR_MOVtooManyTrk "MOV:警告:轨道太多。" -#define MSGTR_FoundAudioStream "==> 找到音频流:%d\n" -#define MSGTR_FoundVideoStream "==> 找到视频流:%d\n" #define MSGTR_DetectedTV "检测到电视信号!;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "无法打开 Ogg 流分离器。\n" -#define MSGTR_ASFSearchingForAudioStream "ASF:寻找音频流(id:%d)。\n" #define MSGTR_CannotOpenAudioStream "无法打开音频流:%s\n" #define MSGTR_CannotOpenSubtitlesStream "无法打开字幕流:%s\n" #define MSGTR_OpeningAudioDemuxerFailed "未能打开音频分离器:%s\n" @@ -1461,17 +1446,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "**空列表?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "于 0x%X - 0x%X 位置找到影片数据\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "找到‘bih’,%u 字节,%d\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "为 M$ mpg4v1 视频重新生成关键帧表。\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "为 DIVX3 视频重新生成关键帧表。\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "为 MPEG4 视频重新生成关键帧表。\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "找到‘wf’,%d 字节,%d\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI:发现 dmlh (size=%d) (total_frames=%d)\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "正在读取索引数据段,%d 段数据用于 %d 帧 (fpos=%"PRId64")。\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "额外的 RIFF 头部数据...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** 警告:这不是扩展格式的 AVI 头部..\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "数据段损坏?chunksize=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI:ODML:构造 ODML 索引 (%d superindexchunks)。\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI:ODML:检测到损坏的(不完整的?)文件。将使用传统的索引模式。\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "无法读索引文件 %s:%s\n" @@ -1603,21 +1578,15 @@ #define MSGTR_UsingExternalPP "[PP] 使用外部的后期处理过滤器,max q = %d。\n" #define MSGTR_UsingCodecPP "[PP] 使用编解码器的后期处理过滤器,max q = %d。\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "所选的 vo & vd 不支持视频属性‘%s’。\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "所请求使用的视频编解码器类 [%s] (vfm=%s) 不可用。\n需在编译时启用该模块。\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "所请求使用的音频编解码器类 [%s] (afm=%s) 不可用。\n需在编译时启用该模块。\n" #define MSGTR_OpeningVideoDecoder "正打开视频解码器:[%s] %s\n" #define MSGTR_SelectedVideoCodec "所选视频编解码器为:[%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "正打开音频解码器:[%s] %s\n" #define MSGTR_SelectedAudioCodec "所选音频编解码器为:[%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "构造音频过滤器链用于 %dHz/%dch/%s -> %dHz/%dch/%s 转换...\n" -#define MSGTR_UninitVideoStr "终止视频:%s\n" -#define MSGTR_UninitAudioStr "终止音频:%s\n" #define MSGTR_VDecoderInitFailed "VDecoder 初始化失败 :(\n" #define MSGTR_ADecoderInitFailed "ADecoder 初始化失败 :(\n" #define MSGTR_ADecoderPreinitFailed "ADecoder 预先初始化失败 :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio:输入缓冲分配了 %d 字节。\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio:输出缓冲分配了 %d + %d = %d 字节。\n" // libmpcodecs/ad_dvdpcm.c: #define MSGTR_SamplesWanted "需要该格式的编码样本以优化相关技术支持。有意请联系开发者。\n" @@ -1633,8 +1602,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "你需要升级/安装已编译编解码器包。\n请访问 http:\/\/www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "信息:Win32/DShow 视频编解码器初始化成功。\n" -#define MSGTR_DMOInitOK "信息:Win32/DMO 视频编解码器初始化成功。\n" // libmpcodecs/vd_dmo.c vd_dshow.c vd_vfw.c #define MSGTR_MPCODECS_CouldntAllocateImageForCinepakCodec "[VD_DMO] 无法为 cinepak 编解码器分配进程映像。\n" @@ -1762,12 +1729,12 @@ // ================================== stream ==================================== -// ai_alsa1x.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "无法设置采样率。\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "无法设置缓冲时间。\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "无法设置采样间隔时间。\n" +// ai_alsa.c +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "无法设置采样率。\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "无法设置缓冲时间。\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "无法设置采样间隔时间。\n" -// ai_alsa1x.c / ai_alsa.c +// ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "该 PCM 的配置文件已损坏:无可用配置。\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "无可用访问类型。\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt "无可用采样格式。\n" @@ -1776,9 +1743,7 @@ #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "无法使用长度等于缓冲大小的采样间隔 (%u == %lu)\n" #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "无法设置软件参数:\n" #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "打开音频出错:%s\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "ALSA 状态错误:%s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun!!!(长度至少为 %.3f ms)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "ALSA 状态:\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun:准备出错:%s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "ALSA 读/写错误" @@ -1838,7 +1803,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "未知的 ASF 流类型\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "解析 HTTP 响应失败。\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "服务器返回 %d:%s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP 解析警告:指令 %s 被从 %zd 字节截断至 %d 字节处\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP 解析警告:指令 %s 被从 %zu 字节截断至 %zu 字节处\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "Socket 写入出错:%s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "解析头部数据失败。\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "未找到数据流。\n" @@ -1982,17 +1947,13 @@ // stream_radio.c #define MSGTR_RADIO_ChannelNamesDetected "[radio] 已检测到无线电频道名。\n" -#define MSGTR_RADIO_FreqRange "[radio] 可用的频率范围是 %.2f-%.2f MHz。\n" #define MSGTR_RADIO_WrongFreqForChannel "[radio] 频道 %s 的频率错误\n" #define MSGTR_RADIO_WrongChannelNumberFloat "[radio] 错误的通道号: %.2f\n" #define MSGTR_RADIO_WrongChannelNumberInt "[radio] 频道号错误:%d\n" #define MSGTR_RADIO_WrongChannelName "[radio] 频道名错误:%s\n" #define MSGTR_RADIO_FreqParameterDetected "[radio] 已检测到无线电频率参数。\n" -#define MSGTR_RADIO_DoneParsingChannels "[radio] 解析频道完成。\n" #define MSGTR_RADIO_GetTunerFailed "[radio] 警告:ioctl 获取无线电调谐器失败:%s。设置 frac 为 %d。\n" #define MSGTR_RADIO_NotRadioDevice "[radio] %s 非无线电设备!\n" -#define MSGTR_RADIO_TunerCapLowYes "[radio] 无线电调谐器属性为 low:yes frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[radio] 无线电调谐器属性为 low:no frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[radio] ioctl 设置频率 0x%x (%.2f) 失败:%s\n" #define MSGTR_RADIO_GetFreqFailed "[radio] ioctl 获取频率失败:%s\n" #define MSGTR_RADIO_SetMuteFailed "[radio] ioctl 设置静音失败:%s\n" @@ -2002,27 +1963,22 @@ #define MSGTR_RADIO_DroppingFrame "\n[radio] 太糟了 - 丢弃音频帧(%d 字节)!\n" #define MSGTR_RADIO_BufferEmpty "[radio] grab_audio_frame:缓冲为空,等待 %d 字节的数据。\n" #define MSGTR_RADIO_AudioInitFailed "[radio] audio_in_init 失败:%s\n" -#define MSGTR_RADIO_AudioBuffer "[radio] 音频捕获 - buffer=%d 字节 (block=%d 字节)。\n" #define MSGTR_RADIO_AllocateBufferFailed "[radio] 无法分配音频缓冲 (block=%d,buf=%d):%s\n" #define MSGTR_RADIO_CurrentFreq "[radio] 当前频率:%.2f\n" #define MSGTR_RADIO_SelectedChannel "[radio] 已选择频道:%d - %s(频率:%.2f)\n" #define MSGTR_RADIO_ChangeChannelNoChannelList "[radio] 无法切换频道:未给出的频道列表。\n" #define MSGTR_RADIO_UnableOpenDevice "[radio] 无法打开‘%s’:%s\n" -#define MSGTR_RADIO_RadioDevice "[radio] 无线电设备文件标识符:%d, %s\n" #define MSGTR_RADIO_InitFracFailed "[radio] init_frac 失败。\n" #define MSGTR_RADIO_WrongFreq "[radio] 频率错误:%.2f\n" #define MSGTR_RADIO_UsingFreq "[radio] 使用频率:%.2f。\n" #define MSGTR_RADIO_AudioInInitFailed "[radio] audio_in_init 失败。\n" -#define MSGTR_RADIO_BufferString "[radio] %s:缓冲中=%d 已丢弃=%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[radio] audio_in_setup 调用失败:%s\n" -#define MSGTR_RADIO_CaptureStarting "[radio] 开始捕获内容。\n" #define MSGTR_RADIO_ClearBufferFailed "[radio] 清空缓冲失败:%s\n" #define MSGTR_RADIO_StreamEnableCacheFailed "[radio] 调用 stream_enable_cache 失败:%s\n" #define MSGTR_RADIO_DriverUnknownStr "[radio] 未知驱动名称:%s\n" #define MSGTR_RADIO_DriverV4L2 "[radio] 使用 V4Lv2 无线电接口。\n" #define MSGTR_RADIO_DriverV4L "[radio] 使用 V4Lv1 无线电接口。\n" #define MSGTR_RADIO_DriverBSDBT848 "[radio] 使用 *BSD BT848 无线电接口。\n" -#define MSGTR_RADIO_AvailableDrivers "[radio] 可用驱动:" //tv.c #define MSGTR_TV_BogusNormParameter "tv.c:norm_from_string(%s):规格化参数、设置非法 %s。\n" @@ -2034,30 +1990,23 @@ " YV12(这是默认的色彩空间)并阅读文档!\n"\ "==================================================================\n" -#define MSGTR_TV_SelectedNormId "已选择规格化参数标识符:%d\n" -#define MSGTR_TV_SelectedNorm "已选择规格化参数:%s\n" #define MSGTR_TV_CannotSetNorm "错误:无法设置规格化参数!\n" #define MSGTR_TV_MJP_WidthHeight " MJP:宽 %d 高 %d\n" #define MSGTR_TV_UnableToSetWidth "无法设置为所请求的宽度:%d\n" #define MSGTR_TV_UnableToSetHeight "无法设置为所请求的高度:%d\n" #define MSGTR_TV_NoTuner "所选输入没有频道调谐器!\n" #define MSGTR_TV_UnableFindChanlist "无法找到所选频道列表!(%s)\n" -#define MSGTR_TV_SelectedChanlist "已选择频道列表:%s(包含 %d 个频道)\n" #define MSGTR_TV_ChannelFreqParamConflict "无法同时设置频率和频道!\n" #define MSGTR_TV_ChannelNamesDetected "已检测到电视频道名称。\n" #define MSGTR_TV_NoFreqForChannel "无法找到 %s(%s)频道的频率\n" #define MSGTR_TV_SelectedChannel3 "已选择频道:%s - %s(频率:%.3f)\n" #define MSGTR_TV_SelectedChannel2 "已选择频道:%s(频率:%.3f)\n" -#define MSGTR_TV_SelectedFrequency "已选择频率:%lu(%.3f)\n" -#define MSGTR_TV_RequestedChannel "已请求频道:%s\n" #define MSGTR_TV_UnsupportedAudioType "音频类型‘%s(%x)’不支持!\n" -#define MSGTR_TV_AudioFormat " 电视音频:%d声道,%d 位,%d Hz\n" #define MSGTR_TV_AvailableDrivers "可用驱动:\n" #define MSGTR_TV_DriverInfo "已选择驱动:%s\n 名称:%s\n 作者:%s\n 注释:%s\n" #define MSGTR_TV_NoSuchDriver "没有这种驱动:%s\n" #define MSGTR_TV_DriverAutoDetectionFailed "自动检测电视驱动失败。\n" #define MSGTR_TV_UnknownColorOption "使用了未知色彩选项(%d)!\n" -#define MSGTR_TV_CurrentFrequency "当前频率:%lu(%.3f)\n" #define MSGTR_TV_NoTeletext "无图文电视功能" #define MSGTR_TV_Bt848IoctlFailed "tvi_bsdbt848:调用 %s ioctl 失败。错误信息:%s\n" #define MSGTR_TV_Bt848InvalidAudioRate "tvi_bsdbt848:无效的音频码率值。错误信息:%s\n" @@ -2085,14 +2034,7 @@ #define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow:未找到设备 #%d\n" #define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow:无法获取设备 #%d 的名称\n" #define MSGTR_TVI_DS_UsingDevice "tvi_dshow:使用设备 #%d:%s\n" -#define MSGTR_TVI_DS_DeviceName "tvi_dshow: 设备 #%d:%s\n" #define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow:无法直接获取频率值。将使用操作系统内置的频道表。\n" -#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow:无法直接设置频率值。将使用操作系统内置的频道表。\n" -#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow:支持的规格化模式:" -#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow:可用的视频输入:" -#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow:可用的音频输入:" -//following phrase will be printed near the selected audio/video input -#define MSGTR_TVI_DS_InputSelected "(已选用)" #define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow:无法从 kstvtune.ax 加载频率对照表\n" #define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow:设备参数错误:%s\n" #define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow:设备索引错误:%d\n" @@ -2104,7 +2046,6 @@ #define MSGTR_TVI_DS_ChangingWidthHeightNotSupported "tvi_dshow:设备不支持改变视频的宽度/高度。\n" #define MSGTR_TVI_DS_SelectingInputNotSupported "tvi_dshow:设备不支持选择视频捕捉的来源\n" -#define MSGTR_TVI_DS_FreqTableLoaded "tvi_dshow:载入系统(%s)的频率对照表,对应国家 id=%d(频道数:%d)\n" #define MSGTR_TVI_DS_ErrorParsingAudioFormatStruct "tvi_dshow:无法解析音频格式的结构。\n" #define MSGTR_TVI_DS_ErrorParsingVideoFormatStruct "tvi_dshow:无法解析视频格式的结构。\n" #define MSGTR_TVI_DS_UnableSetAudioMode "tvi_dshow:无法设置音频模式 %d。错误代码:0x%x\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-zh_TW.h mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-zh_TW.h --- mplayer-1.0~rc4.dfsg1+svn33713/help/help_mp-zh_TW.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/help/help_mp-zh_TW.h 2011-12-05 11:38:13.000000000 +0000 @@ -64,7 +64,6 @@ #define MSGTR_NoHomeDir "找不到主(HOME)目録\n" #define MSGTR_GetpathProblem "get_path(\"config\") 問題\n" #define MSGTR_CreatingCfgFile "創建配置文件: %s\n" -#define MSGTR_BuiltinCodecsConf "使用内建默認的 codecs.conf 文件。\n" #define MSGTR_CantLoadFont "不能加載位圖字體: %s\n" #define MSGTR_CantLoadSub "不能加載字幕: %s\n" #define MSGTR_DumpSelectedStreamMissing "轉儲: 致命錯誤: 指定的流不存在!\n" @@ -106,8 +105,6 @@ #define MSGTR_Playing "\n正在播放 %s。\n" #define MSGTR_NoSound "音頻: 没聲音\n" #define MSGTR_FPSforced "FPS 鎖定為 %5.3f (ftime: %5.3f)。\n" -#define MSGTR_CompiledWithRuntimeDetection "編譯用了實時 CPU 檢測。\n" -#define MSGTR_CompiledWithCPUExtensions "編譯用了針對 x86 CPU 的擴展指令集:" #define MSGTR_AvailableVideoOutputDrivers "可用的視頻輸出驅動:\n" #define MSGTR_AvailableAudioOutputDrivers "可用的音頻輸出驅動:\n" #define MSGTR_AvailableAudioCodecs "可用的音頻編解碼器:\n" @@ -115,7 +112,6 @@ #define MSGTR_AvailableAudioFm "\n(已編譯進的)可用的音頻編解碼器族/驅動:\n" #define MSGTR_AvailableVideoFm "\n(已編譯進的)可用的視頻編解碼器族/驅動:\n" #define MSGTR_AvailableFsType "可用的全屏層變換模式:\n" -#define MSGTR_UsingRTCTiming "使用 Linux 的硬件 RTC 實計時 (%ldHz)。\n" #define MSGTR_CannotReadVideoProperties "視頻: 無法讀取屬性\n" #define MSGTR_NoStreamFound "找不到流媒體。\n" #define MSGTR_ErrorInitializingVODevice "打開/初始化 (-vo) 所選的視頻輸出設備出錯。\n" @@ -148,14 +144,11 @@ #define MSGTR_AddedSubtitleFile "字幕: 添加字幕文件 (%d): %s\n" #define MSGTR_RemovedSubtitleFile "字幕: 删除字幕文件 (%d): %s\n" #define MSGTR_ErrorOpeningOutputFile "打開寫入文件 [%s] 失敗!\n" -#define MSGTR_CommandLine "命令行: " #define MSGTR_RTCDeviceNotOpenable "打開 %s 失敗: %s (此文件應該能被用户讀取。)\n" #define MSGTR_LinuxRTCInitErrorIrqpSet "Linux RTC 初始化錯誤在 ioctl (rtc_irqp_set %lu): %s\n" #define MSGTR_IncreaseRTCMaxUserFreq "試圖添加 \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" 到你的係統啟動脚本。\n" #define MSGTR_LinuxRTCInitErrorPieOn "Linux RTC 初始化錯誤在 ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "正在使用 %s 計時。\n" -#define MSGTR_MenuInitialized "菜單已初始化: %s\n" -#define MSGTR_MenuInitFailed "菜單初始化失敗。\n" #define MSGTR_Getch2InitializedTwice "警告: getch2_init 被調用兩次!\n" #define MSGTR_DumpstreamFdUnavailable "無法轉儲此流 - 没有可用的文件描述符。\n" #define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "不能用根菜單 %s 打開 libmenu 視頻過濾器。\n" @@ -277,12 +270,9 @@ #define MSGTR_CannotAllocateBytes "不能分配 %d 字節。\n" #define MSGTR_SettingAudioDelay "設置音頻延遲為 %5.3fs。\n" #define MSGTR_SettingVideoDelay "設置視頻延遲為 %5.3fs。\n" -#define MSGTR_SettingAudioInputGain "設置音頻輸出增益為 %f。\n" -#define MSGTR_LamePresetEquals "\npreset=%s\n\n" #define MSGTR_LimitingAudioPreload "限製音頻預載值為 0.4s。\n" #define MSGTR_IncreasingAudioDensity "增加音頻密度為 4。\n" #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "鎖定音頻預載值為 0, 最大 PTS 校驗為 0。\n" -#define MSGTR_CBRAudioByterate "\n\nCBR 音頻: %d 字節/秒, %d 字節/塊\n" #define MSGTR_LameVersion "LAME 版本 %s (%s)\n\n" #define MSGTR_InvalidBitrateForLamePreset "錯誤: 在此預設值上指定的比特率超出有效範圍。\n"\ "\n"\ @@ -460,8 +450,6 @@ #define MSGTR_CodecNeedsOutfmt "\n編解碼器(%s) 需要一個 'outfmt'!\n" #define MSGTR_CantAllocateComment "不能為注釋分配内存。" #define MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN "get_token(): max >= MAX_MR_TOKEN!" -#define MSGTR_ReadingFile "讀取 %s: " -#define MSGTR_CantOpenFileError "打不開 '%s': %s\n" #define MSGTR_CantGetMemoryForLine "不能為 'line' 獲取内存: %s\n" #define MSGTR_CantReallocCodecsp "不能重新分配 '*codecsp': %s\n" #define MSGTR_CodecNameNotUnique "編解碼器名 '%s' 不唯一。" @@ -553,7 +541,6 @@ #define MSGTR_WarningLenIsntDivisible "警告, 長度不能被采様率整除!\n" #define MSGTR_MuxbufMallocErr "合路器幀緩衝無法分配内存!\n" #define MSGTR_MuxbufReallocErr "合路器幀緩衝無法重新分配内存!\n" -#define MSGTR_MuxbufSending "合路器幀緩衝正在發送 %d 幀到合路器。\n" #define MSGTR_WritingHeader "正在寫幀頭...\n" #define MSGTR_WritingTrailer "正在寫索引...\n" @@ -571,7 +558,6 @@ #define MSGTR_ON2AviFormat "ON2 AVI 格式" #define MSGTR_Detected_XXX_FileFormat "檢測到 %s 文件格式。\n" #define MSGTR_DetectedAudiofile "檢測到音頻文件。\n" -#define MSGTR_NotSystemStream "非 MPEG 係統的流格式... (可能是輸送流?)\n" #define MSGTR_InvalidMPEGES "MPEG-ES 流無效??? 請聯係作者, 這可能是個錯誤:(\n" #define MSGTR_FormatNotRecognized "============= 抱歉, 此文件格式無法辨認或支持 ===============\n"\ "=== 如果此文件是一個 AVI, ASF 或 MPEG 流, 請聯係作者! ===\n" @@ -596,11 +582,8 @@ #define MSGTR_MOVcomprhdr "MOV: 支持壓縮的文件頭需要 ZLIB!\n" #define MSGTR_MOVvariableFourCC "MOV: 警告: 檢測到可變的 FourCC!?\n" #define MSGTR_MOVtooManyTrk "MOV: 警告: 軌迹太多。" -#define MSGTR_FoundAudioStream "==> 找到音頻流: %d\n" -#define MSGTR_FoundVideoStream "==> 找到視頻流: %d\n" #define MSGTR_DetectedTV "檢測到 TV! ;-)\n" #define MSGTR_ErrorOpeningOGGDemuxer "無法打開 Ogg 分路器。\n" -#define MSGTR_ASFSearchingForAudioStream "ASF: 尋找音頻流 (id:%d)。\n" #define MSGTR_CannotOpenAudioStream "打不開音頻流: %s\n" #define MSGTR_CannotOpenSubtitlesStream "打不開字幕流: %s\n" #define MSGTR_OpeningAudioDemuxerFailed "打開音頻分路器: %s 失敗\n" @@ -637,24 +620,17 @@ #define MSGTR_UsingExternalPP "[PP] 使用外部的後處理過濾器, max q = %d。\n" #define MSGTR_UsingCodecPP "[PP] 使用編解碼器的後處理過濾器, max q = %d。\n" -#define MSGTR_VideoAttributeNotSupportedByVO_VD "所選的 vo & vd 不支持視頻屬性 '%s'。\n" #define MSGTR_VideoCodecFamilyNotAvailableStr "請求的視頻編解碼器族 [%s] (vfm=%s) 不可用。\n請在編譯時啟用它。\n" #define MSGTR_AudioCodecFamilyNotAvailableStr "請求的音頻編解碼器族 [%s] (afm=%s) 不可用。\n請在編譯時啟用它。\n" #define MSGTR_OpeningVideoDecoder "打開視頻解碼器: [%s] %s\n" #define MSGTR_SelectedVideoCodec "已選視頻編解碼器: [%s] vfm: %s (%s)\n" #define MSGTR_OpeningAudioDecoder "打開音頻解碼器: [%s] %s\n" #define MSGTR_SelectedAudioCodec "已選音頻編解碼器: [%s] afm: %s (%s)\n" -#define MSGTR_BuildingAudioFilterChain "為 %dHz/%dch/%s -> %dHz/%dch/%s 建造音頻過濾鏈...\n" -#define MSGTR_UninitVideoStr "反初始視頻: %s\n" -#define MSGTR_UninitAudioStr "反初始音頻: %s\n" #define MSGTR_VDecoderInitFailed "VDecoder 初始化失敗 :(\n" #define MSGTR_ADecoderInitFailed "ADecoder 初始化失敗 :(\n" #define MSGTR_ADecoderPreinitFailed "ADecoder 預初始化失敗 :(\n" -#define MSGTR_AllocatingBytesForInputBuffer "dec_audio: 為輸入緩衝分配 %d 字節。\n" -#define MSGTR_AllocatingBytesForOutputBuffer "dec_audio: 為輸出緩衝分配 %d + %d = %d 字節。\n" // LIRC: -#define MSGTR_SettingUpLIRC "起動紅外遥控支持...\n" #define MSGTR_LIRCopenfailed "打開紅外遥控支持失敗。你將無法使用遥控器。\n" #define MSGTR_LIRCcfgerr "讀取 LIRC 配置文件 %s 失敗。\n" @@ -672,8 +648,6 @@ // vd_dshow.c, vd_dmo.c #define MSGTR_DownloadCodecPackage "你需要升級/安裝二進製編解碼器包。\n請訪問 http:\/\/www.mplayerhq.hu/dload.html\n" -#define MSGTR_DShowInitOK "信息: Win32/DShow 視頻編解碼器初始化成功。\n" -#define MSGTR_DMOInitOK "信息: Win32/DMO 視頻編解碼器初始化成功。\n" // x11_common.c #define MSGTR_EwmhFullscreenStateFailed "\nX11: 不能發送 EWMH 全屏事件!\n" @@ -704,7 +678,6 @@ #define MSGTR_Preferences "首選項" #define MSGTR_AudioPreferences "音頻驅動配置" #define MSGTR_NoMediaOpened "没有打開媒體" -#define MSGTR_VCDTrack "VCD 軌迹 %d" #define MSGTR_NoChapter "没有章節" #define MSGTR_Chapter "章節 %d" #define MSGTR_NoFileLoaded "没有載入文件" @@ -779,7 +752,7 @@ #define MSGTR_MENU_PlayList MSGTR_PlayList #define MSGTR_MENU_SkinBrowser "皮膚瀏覽器" #define MSGTR_MENU_Preferences MSGTR_Preferences -#define MSGTR_MENU_Exit "退出..." +#define MSGTR_MENU_Exit "退出" #define MSGTR_MENU_Mute "靜音" #define MSGTR_MENU_Original "原始的" #define MSGTR_MENU_AspectRatio "寬高比" @@ -841,9 +814,6 @@ #define MSGTR_PREFERENCES_HFrameDrop "啟用强製丢幀(危險)" #define MSGTR_PREFERENCES_Flip "上下翻轉圖像" #define MSGTR_PREFERENCES_Panscan "摇移: " -#define MSGTR_PREFERENCES_OSDTimer "顯示計時器和指示器" -#define MSGTR_PREFERENCES_OSDProgress "祇顯示進度條" -#define MSGTR_PREFERENCES_OSDTimerPercentageTotalTime "計時器, 百分比和總時間" #define MSGTR_PREFERENCES_Subtitle "字幕:" #define MSGTR_PREFERENCES_SUB_Delay "延遲: " #define MSGTR_PREFERENCES_SUB_FPS "幀率:" @@ -1010,9 +980,7 @@ // vo_yuv4mpeg.c #define MSGTR_VO_YUV4MPEG_InterlacedHeightDivisibleBy4 "交錯模式要求圖像高度能被 4 整除。" #define MSGTR_VO_YUV4MPEG_InterlacedLineBufAllocFail "無法為交錯模式分配綫緩衝。" -#define MSGTR_VO_YUV4MPEG_InterlacedInputNotRGB "輸入不是 RGB, 不能按域分開色差!" #define MSGTR_VO_YUV4MPEG_WidthDivisibleBy2 "圖像寬度必須能被 2 整除。" -#define MSGTR_VO_YUV4MPEG_NoMemRGBFrameBuf "内存不够, 不能分配 RGB 緩衝。" #define MSGTR_VO_YUV4MPEG_OutFileOpenError "不能取得内存或文件句柄以寫入 \"%s\"!" #define MSGTR_VO_YUV4MPEG_OutFileWriteError "圖像寫到輸出錯誤!" #define MSGTR_VO_YUV4MPEG_UnknownSubDev "未知的子設備: %s" @@ -1119,31 +1087,6 @@ #define MSGTR_AO_SUN_CantUseSelect "[AO SUN]\n *** 你的音頻驅動不支持 select() ***\n用 config.h 中的 #undef HAVE_AUDIO_SELECT 重新編譯 MPlayer!\n\n" #define MSGTR_AO_SUN_CantReopenReset "[AO SUN]\n致命錯誤: *** 無法重新打開或重設音頻設備 (%s) ***\n" -// ao_alsa5.c -#define MSGTR_AO_ALSA5_InitInfo "[AO ALSA5] alsa-初始: 請求的格式: %d Hz, %d 通道, %s\n" -#define MSGTR_AO_ALSA5_SoundCardNotFound "[AO ALSA5] alsa-初始: 找不到聲卡。\n" -#define MSGTR_AO_ALSA5_InvalidFormatReq "[AO ALSA5] alsa-初始: 請求無效的格式 (%s) - 停用輸出。\n" -#define MSGTR_AO_ALSA5_PlayBackError "[AO ALSA5] alsa-初始: 回放打開錯誤: %s\n" -#define MSGTR_AO_ALSA5_PcmInfoError "[AO ALSA5] alsa-初始: PCM 信息錯誤: %s\n" -#define MSGTR_AO_ALSA5_SoundcardsFound "[AO ALSA5] alsa-初始: 找到 %d 聲卡, 使用: %s\n" -#define MSGTR_AO_ALSA5_PcmChanInfoError "[AO ALSA5] alsa-初始: PCM 通道信息錯誤: %s\n" -#define MSGTR_AO_ALSA5_CantSetParms "[AO ALSA5] alsa-初始: 設定參數錯誤: %s\n" -#define MSGTR_AO_ALSA5_CantSetChan "[AO ALSA5] alsa-初始: 設定通道錯誤: %s\n" -#define MSGTR_AO_ALSA5_ChanPrepareError "[AO ALSA5] alsa-初始: 通道凖備錯誤: %s\n" -#define MSGTR_AO_ALSA5_DrainError "[AO ALSA5] alsa-反初始: 回放排出(drain)錯誤: %s\n" -#define MSGTR_AO_ALSA5_FlushError "[AO ALSA5] alsa-反初始: 回放清空(flush)錯誤: %s\n" -#define MSGTR_AO_ALSA5_PcmCloseError "[AO ALSA5] alsa-反初始: PCM 關閉錯誤: %s\n" -#define MSGTR_AO_ALSA5_ResetDrainError "[AO ALSA5] alsa-重置: 回放排出(drain)錯誤: %s\n" -#define MSGTR_AO_ALSA5_ResetFlushError "[AO ALSA5] alsa-重置: 回放清空(flush)錯誤: %s\n" -#define MSGTR_AO_ALSA5_ResetChanPrepareError "[AO ALSA5] alsa-重置: 通道凖備錯誤: %s\n" -#define MSGTR_AO_ALSA5_PauseDrainError "[AO ALSA5] alsa-暫停: 回放排出(drain)錯誤: %s\n" -#define MSGTR_AO_ALSA5_PauseFlushError "[AO ALSA5] alsa-暫停: 回放清空(flush)錯誤: %s\n" -#define MSGTR_AO_ALSA5_ResumePrepareError "[AO ALSA5] alsa-恢複: 通道凖備錯誤: %s\n" -#define MSGTR_AO_ALSA5_Underrun "[AO ALSA5] alsa-play: alsa 未運行, 重新啟動流。\n" -#define MSGTR_AO_ALSA5_PlaybackPrepareError "[AO ALSA5] alsa-播放: 回放凖備錯誤: %s\n" -#define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-播放: 重啟後寫錯誤: %s - 放棄。\n" -#define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-播放: 輸出錯誤: %s\n" - // ao_alsa.c #define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] 無效的混音索引。取默認值 0。\n" #define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] 混音打開錯誤: %s\n" @@ -1228,7 +1171,6 @@ // joystick.c -#define MSGTR_INPUT_JOYSTICK_Opening "打開操縱杆設備 %s\n" #define MSGTR_INPUT_JOYSTICK_CantOpen "打不開操縱杆設備 %s: %s\n" #define MSGTR_INPUT_JOYSTICK_ErrReading "讀操縱杆設備時發生錯誤: %s\n" #define MSGTR_INPUT_JOYSTICK_LoosingBytes "操縱杆: 丢失了 %d 字節的數據\n" @@ -1269,13 +1211,13 @@ #define MSGTR_MPDEMUX_URL_StringAlreadyEscaped "字符轉義好像已發生在 url_escape %c%c1%c2\n" -// ai_alsa1x.c +// ai_alsa.c -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate "無法設置采様率。\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime "無法設置緩衝時間。\n" -#define MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime "無法設置間隔時間。\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate "無法設置采様率。\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime "無法設置緩衝時間。\n" +#define MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime "無法設置間隔時間。\n" -// ai_alsa1x.c / ai_alsa.c +// ai_alsa.c #define MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig "此 PCM 的配置文件損壞: 配置不可用。\n" #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "訪問類型不可用。\n" @@ -1285,9 +1227,7 @@ #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "不能使用等于緩衝大小的間隔 (%u == %lu)\n" #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "無法安裝軟件參數:\n" #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "打開音頻錯誤: %s\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatusError "ALSA 狀態錯誤: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUN "ALSA xrun!!! (至少 %.3f ms)\n" -#define MSGTR_MPDEMUX_AIALSA_AlsaStatus "ALSA 狀態:\n" #define MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError "ALSA xrun: 凖備錯誤: %s" #define MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError "ALSA 讀/寫錯誤" @@ -1360,7 +1300,7 @@ #define MSGTR_MPDEMUX_ASF_UnknownASFStreamType "未知的 ASF 流類型\n" #define MSGTR_MPDEMUX_ASF_Failed2ParseHTTPResponse "解析 HTTP 響應失敗。\n" #define MSGTR_MPDEMUX_ASF_ServerReturn "服務器返回 %d:%s\n" -#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP 解析警告 : Pragma %s 被從 %zd 字節切到 %d\n" +#define MSGTR_MPDEMUX_ASF_ASFHTTPParseWarnCuttedPragma "ASF HTTP 解析警告 : Pragma %s 被從 %zu 字節切到 %zu\n" #define MSGTR_MPDEMUX_ASF_SocketWriteError "Socket 寫錯誤: %s\n" #define MSGTR_MPDEMUX_ASF_HeaderParseFailed "解析頭部失敗。\n" #define MSGTR_MPDEMUX_ASF_NoStreamFound "找不到流。\n" @@ -1378,17 +1318,7 @@ // aviheader.c #define MSGTR_MPDEMUX_AVIHDR_EmptyList "**空列表?!\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundMovieAt "在 0x%X - 0x%X 找到電影\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader "找到 'bih', %u 字節的 %d\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1 "為 M$ mpg4v1 視頻重新生成關鍵幀表。\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3 "為 DIVX3 視頻重新生成關鍵幀表。\n" -#define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "為 MPEG4 視頻重新生成關鍵幀表。\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "找到 'wf', %d 字節的 %d\n" -#define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI: 發現 dmlh (size=%d) (total_frames=%d)\n" -#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames "正在讀 INDEX 塊, %d 區塊的 %d 幀 (fpos=%"PRId64")。\n" -#define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "附加的 RIFF 頭...\n" #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** 警告: 這不是擴展的 AVI 頭部..\n" -#define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "區塊損壞? chunksize=%d (id=%.4s)\n" #define MSGTR_MPDEMUX_AVIHDR_BuildingODMLidx "AVI: ODML: 建造 ODML 索引 (%d superindexchunks)。\n" #define MSGTR_MPDEMUX_AVIHDR_BrokenODMLfile "AVI: ODML: 檢測到損壞的(不完整的?)文件。將使用傳統的索引。\n" #define MSGTR_MPDEMUX_AVIHDR_CantReadIdxFile "不能讀索引文件 %s: %s\n" @@ -1884,17 +1814,13 @@ // stream/stream_radio.c #define MSGTR_RADIO_ChannelNamesDetected "[radio] 檢測到廣播通道名。\n" -#define MSGTR_RADIO_FreqRange "[radio] 允許的頻率範圍是 %.2f-%.2f MHz。\n" #define MSGTR_RADIO_WrongFreqForChannel "[radio] 錯誤的通道頻率 %s\n" #define MSGTR_RADIO_WrongChannelNumberFloat "[radio] 錯誤的通道號: %.2f\n" #define MSGTR_RADIO_WrongChannelNumberInt "[radio] 錯誤的通道號: %d\n" #define MSGTR_RADIO_WrongChannelName "[radio] 錯誤的通道名: %s\n" #define MSGTR_RADIO_FreqParameterDetected "[radio] 檢測到廣播頻率參數。\n" -#define MSGTR_RADIO_DoneParsingChannels "[radio] 解析通道完成。\n" #define MSGTR_RADIO_GetTunerFailed "[radio] Warning: ioctl 獲取調諧器失敗: %s。設置 frac 為 %d。\n" #define MSGTR_RADIO_NotRadioDevice "[radio] %s 决不是廣播設備!\n" -#define MSGTR_RADIO_TunerCapLowYes "[radio] 調諧器調低了:是 frac=%d\n" -#define MSGTR_RADIO_TunerCapLowNo "[radio] 調諧器調低了:否 frac=%d\n" #define MSGTR_RADIO_SetFreqFailed "[radio] ioctl 設定頻率為 0x%x (%.2f) failed: %s\n" #define MSGTR_RADIO_GetFreqFailed "[radio] ioctl 獲取頻率失敗: %s\n" #define MSGTR_RADIO_SetMuteFailed "[radio] ioctl 設定靜音失敗: %s\n" @@ -1904,20 +1830,16 @@ #define MSGTR_RADIO_DroppingFrame "\n[radio] 太糟糕 - 丢失音頻幀 (%d 字節)!\n" #define MSGTR_RADIO_BufferEmpty "[radio] grab_audio_frame: 緩衝為空, 等待 %d 字節數據。\n" #define MSGTR_RADIO_AudioInitFailed "[radio] audio_in_init 失敗: %s\n" -#define MSGTR_RADIO_AudioBuffer "[radio] 音頻捕獲 - buffer=%d 字節 (block=%d 字節)。\n" #define MSGTR_RADIO_AllocateBufferFailed "[radio] 不能分配音頻緩衝 (block=%d,buf=%d): %s\n" #define MSGTR_RADIO_CurrentFreq "[radio] 當前頻率: %.2f\n" #define MSGTR_RADIO_SelectedChannel "[radio] 已選通道: %d - %s (freq: %.2f)\n" #define MSGTR_RADIO_ChangeChannelNoChannelList "[radio] 不能改變通道: 無給定的通道列表。\n" #define MSGTR_RADIO_UnableOpenDevice "[radio] 無法打開 '%s': %s\n" -#define MSGTR_RADIO_RadioDevice "[radio] 廣播設備 fd: %d, %s\n" #define MSGTR_RADIO_InitFracFailed "[radio] init_frac 失敗。\n" #define MSGTR_RADIO_WrongFreq "[radio] 錯誤頻率: %.2f\n" #define MSGTR_RADIO_UsingFreq "[radio] 使用頻率: %.2f。\n" #define MSGTR_RADIO_AudioInInitFailed "[radio] audio_in_init 失敗。\n" -#define MSGTR_RADIO_BufferString "[radio] %s: 在 buffer=%d dropped=%d\n" #define MSGTR_RADIO_AudioInSetupFailed "[radio] audio_in_setup 調用失敗: %s\n" -#define MSGTR_RADIO_CaptureStarting "[radio] 開始捕獲。\n" #define MSGTR_RADIO_ClearBufferFailed "[radio] 清空緩衝失敗: %s\n" #define MSGTR_RADIO_StreamEnableCacheFailed "[radio] 調用 stream_enable_cache 失敗: %s\n" #define MSGTR_RADIO_DriverUnknownStr "[radio] 未知驅動名: %s\n" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/input/appleir.c mplayer-1.0~rc4.dfsg1+svn34540/input/appleir.c --- mplayer-1.0~rc4.dfsg1+svn33713/input/appleir.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/input/appleir.c 2011-07-24 23:55:34.000000000 +0000 @@ -79,7 +79,7 @@ if (dev) { - mp_msg (MSGT_INPUT, MSGL_V, MSGTR_INPUT_APPLE_IR_Init, dev); + mp_msg (MSGT_INPUT, MSGL_V, "Initializing Apple IR on %s\n", dev); fd = open (dev, O_RDONLY | O_NONBLOCK); if (fd < 0) { @@ -108,7 +108,7 @@ id.vendor == USB_VENDOR_APPLE && (id.product == USB_DEV_APPLE_IR ||id.product == USB_DEV_APPLE_IR_2)) { - mp_msg (MSGT_INPUT, MSGL_V, MSGTR_INPUT_APPLE_IR_Detect, file); + mp_msg (MSGT_INPUT, MSGL_V, "Detected Apple IR on %s\n", file); return fd; } close (fd); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/input/input.c mplayer-1.0~rc4.dfsg1+svn34540/input/input.c --- mplayer-1.0~rc4.dfsg1+svn33713/input/input.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/input/input.c 2011-12-11 14:43:16.000000000 +0000 @@ -208,6 +208,8 @@ { MP_CMD_AF_CLR, "af_clr", 0, { {-1,{0}} } }, { MP_CMD_AF_CMDLINE, "af_cmdline", 2, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, + { MP_CMD_GUI, "gui", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, + { 0, NULL, 0, {} } }; @@ -377,6 +379,9 @@ static const mp_cmd_bind_t def_cmd_binds[] = { + // Ignore modifiers by default + { { KEY_CTRL, 0 }, "ignore" }, + { { MOUSE_BTN3, 0 }, "seek 10" }, { { MOUSE_BTN4, 0 }, "seek -10" }, { { MOUSE_BTN5, 0 }, "volume 1" }, @@ -1269,7 +1274,8 @@ strerror(errno)); FD_ZERO(&fds); } - } + } else if (time) + usec_sleep(time * 1000); } #else if (!got_cmd && time) @@ -1455,7 +1461,7 @@ return key_names[i].name; } - if(isascii(key)) { + if(isprint(key)) { snprintf(key_str,12,"%c",(char)key); return key_str; } @@ -1581,7 +1587,8 @@ fd = open(file,O_RDONLY); if(fd < 0) { - mp_msg(MSGT_INPUT,MSGL_V,"Can't open input config file %s: %s\n",file,strerror(errno)); + mp_msg(MSGT_INPUT, MSGL_V, "Reading optional input config file %s: %s\n", + file, strerror(errno)); return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/input/input.h mplayer-1.0~rc4.dfsg1+svn34540/input/input.h --- mplayer-1.0~rc4.dfsg1+svn33713/input/input.h 2011-03-25 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/input/input.h 2011-12-11 14:43:16.000000000 +0000 @@ -162,6 +162,9 @@ MP_CMD_AF_CLR, MP_CMD_AF_CMDLINE, + /// GUI command + MP_CMD_GUI, + } mp_command_type; // The arg types diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/input/joystick.c mplayer-1.0~rc4.dfsg1+svn34540/input/joystick.c --- mplayer-1.0~rc4.dfsg1+svn33713/input/joystick.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/input/joystick.c 2011-07-24 23:55:34.000000000 +0000 @@ -51,7 +51,7 @@ int initialized = 0; struct js_event ev; - mp_msg(MSGT_INPUT,MSGL_V,MSGTR_INPUT_JOYSTICK_Opening,dev ? dev : JS_DEV); + mp_msg(MSGT_INPUT, MSGL_V, "Opening joystick device %s\n", dev ? dev : JS_DEV); fd = open( dev ? dev : JS_DEV , O_RDONLY | O_NONBLOCK ); if(fd < 0) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/input/lirc.c mplayer-1.0~rc4.dfsg1+svn34540/input/lirc.c --- mplayer-1.0~rc4.dfsg1+svn33713/input/lirc.c 2010-11-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/input/lirc.c 2011-07-24 23:55:34.000000000 +0000 @@ -41,7 +41,7 @@ int lirc_sock; int mode; - mp_msg(MSGT_LIRC,MSGL_V,MSGTR_SettingUpLIRC); + mp_msg(MSGT_LIRC, MSGL_V, "Setting up LIRC support...\n"); if((lirc_sock=lirc_init("mplayer",1))==-1){ mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCopenfailed); return -1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_bs2b.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_bs2b.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_bs2b.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_bs2b.c 2011-10-26 15:12:35.000000000 +0000 @@ -26,8 +26,9 @@ #include #include -#include "af.h" +#include "mp_msg.h" #include "subopt-helper.h" +#include "af.h" /// Internal specific data of the filter struct af_bs2b { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af.c 2011-05-25 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af.c 2011-11-14 19:09:35.000000000 +0000 @@ -20,9 +20,10 @@ #include #include #include + #include "osdep/strsep.h" #include "libmpcodecs/dec_audio.h" - +#include "mp_msg.h" #include "af.h" // Static list of filters @@ -318,7 +319,7 @@ } if(!new){ // Should _never_ happen mp_msg(MSGT_AFILTER, MSGL_ERR, "[libaf] Unable to correct audio format. " - "This error should never uccur, please send bugreport.\n"); + "This error should never occur, please send a bug report.\n"); return AF_ERROR; } af=new->next; @@ -531,7 +532,7 @@ if (AF_OK != fixup_output_format(s)) { // Something is stuffed audio out will not work mp_msg(MSGT_AFILTER, MSGL_ERR, "[libaf] Unable to setup filter system can not" - " meet sound-card demands, please send bugreport. \n"); + " meet sound-card demands, please send a bug report. \n"); af_uninit(s); return -1; } @@ -548,7 +549,7 @@ // Sanity check if(!s || !s->first || !name) return NULL; - // Insert the filter somwhere nice + // Insert the filter somewhere nice if(!strcmp(s->first->info->name,"format")) new = af_append(s, s->first, name); else @@ -663,5 +664,9 @@ void af_fix_parameters(af_data_t *data) { + if (data->nch < 0 || data->nch > AF_NCH) { + mp_msg(MSGT_AFILTER, MSGL_ERR, "Invalid number of channels %i, assuming 2.\n", data->nch); + data->nch = 2; + } data->bps = af_fmt2bits(data->format)/8; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_center.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_center.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_center.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_center.c 2011-10-26 15:12:35.000000000 +0000 @@ -29,6 +29,7 @@ #include #include +#include "mp_msg.h" #include "af.h" // Data for specific instances of this filter diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_channels.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_channels.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_channels.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_channels.c 2011-10-26 15:12:35.000000000 +0000 @@ -25,6 +25,7 @@ #include #include +#include "mp_msg.h" #include "af.h" #define FR 0 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_delay.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_delay.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_delay.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_delay.c 2011-10-26 15:12:35.000000000 +0000 @@ -25,6 +25,7 @@ #include #include +#include "mp_msg.h" #include "af.h" #define L 65536 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_dummy.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_dummy.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_dummy.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_dummy.c 2011-10-26 15:12:35.000000000 +0000 @@ -23,6 +23,7 @@ #include #include +#include "mp_msg.h" #include "af.h" // Initialization and runtime control diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_equalizer.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_equalizer.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_equalizer.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_equalizer.c 2011-10-26 15:12:35.000000000 +0000 @@ -29,6 +29,7 @@ #include #include +#include "mp_msg.h" #include "af.h" #define L 2 // Storage for filter taps diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_export.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_export.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_export.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_export.c 2011-10-26 15:12:35.000000000 +0000 @@ -37,8 +37,9 @@ #include #include -#include "af.h" +#include "mp_msg.h" #include "path.h" +#include "af.h" #define DEF_SZ 512 // default buffer size (in samples) #define SHARED_FILE "mplayer-af_export" /* default file name diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_format.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_format.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_format.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_format.c 2011-10-26 15:12:35.000000000 +0000 @@ -29,9 +29,12 @@ #include "config.h" #include "af.h" +#include "mp_msg.h" #include "mpbswap.h" #include "libvo/fastmemcpy.h" +#include "libavutil/avutil.h" + /* Functions used by play to convert the input audio to the correct format */ @@ -474,23 +477,35 @@ static void float2int(float* in, void* out, int len, int bps) { + float f; register int i; switch(bps){ case(1): for(i=0;i= 1.0)//no need to use corrected constant, rounding won't cause overflow + ((int32_t*)out)[i] = INT_MAX; + else + ((int32_t*)out)[i] = lrintf(f*2147483648.0); + + } break; } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_format.h mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_format.h --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_format.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_format.h 2011-10-12 17:23:08.000000000 +0000 @@ -61,6 +61,7 @@ #define AF_FORMAT_MPEG2 (3<<6) // MPEG(2) audio #define AF_FORMAT_AC3 (4<<6) // Dolby Digital AC3 #define AF_FORMAT_IMA_ADPCM (5<<6) +#define AF_FORMAT_IEC61937 (6<<6) #define AF_FORMAT_SPECIAL_MASK (7<<6) // PREDEFINED formats @@ -86,6 +87,9 @@ #define AF_FORMAT_AC3_LE (AF_FORMAT_AC3|AF_FORMAT_16BIT|AF_FORMAT_LE) #define AF_FORMAT_AC3_BE (AF_FORMAT_AC3|AF_FORMAT_16BIT|AF_FORMAT_BE) +#define AF_FORMAT_IEC61937_LE (AF_FORMAT_IEC61937|AF_FORMAT_16BIT|AF_FORMAT_LE) +#define AF_FORMAT_IEC61937_BE (AF_FORMAT_IEC61937|AF_FORMAT_16BIT|AF_FORMAT_BE) + #if HAVE_BIGENDIAN #define AF_FORMAT_U16_NE AF_FORMAT_U16_BE #define AF_FORMAT_S16_NE AF_FORMAT_S16_BE @@ -95,6 +99,7 @@ #define AF_FORMAT_S32_NE AF_FORMAT_S32_BE #define AF_FORMAT_FLOAT_NE AF_FORMAT_FLOAT_BE #define AF_FORMAT_AC3_NE AF_FORMAT_AC3_BE +#define AF_FORMAT_IEC61937_NE AF_FORMAT_IEC61937_BE #else #define AF_FORMAT_U16_NE AF_FORMAT_U16_LE #define AF_FORMAT_S16_NE AF_FORMAT_S16_LE @@ -104,11 +109,13 @@ #define AF_FORMAT_S32_NE AF_FORMAT_S32_LE #define AF_FORMAT_FLOAT_NE AF_FORMAT_FLOAT_LE #define AF_FORMAT_AC3_NE AF_FORMAT_AC3_LE +#define AF_FORMAT_IEC61937_NE AF_FORMAT_IEC61937_LE #endif #define AF_FORMAT_UNKNOWN (-1) #define AF_FORMAT_IS_AC3(fmt) (((fmt) & AF_FORMAT_SPECIAL_MASK) == AF_FORMAT_AC3) +#define AF_FORMAT_IS_IEC61937(fmt) (((fmt) & AF_FORMAT_SPECIAL_MASK) == AF_FORMAT_IEC61937) int af_str2fmt(const char *str); int af_str2fmt_short(const char *str); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af.h mplayer-1.0~rc4.dfsg1+svn34540/libaf/af.h --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af.h 2011-10-26 15:12:35.000000000 +0000 @@ -26,7 +26,6 @@ #include "af_format.h" #include "control.h" #include "cpudetect.h" -#include "mp_msg.h" struct af_instance_s; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_hrtf.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_hrtf.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_hrtf.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_hrtf.c 2011-10-26 15:12:35.000000000 +0000 @@ -27,6 +27,7 @@ #include +#include "mp_msg.h" #include "af.h" #include "dsp.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_ladspa.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_ladspa.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_ladspa.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_ladspa.c 2011-10-26 15:12:35.000000000 +0000 @@ -40,8 +40,9 @@ /* Local Includes */ -#include "af.h" #include "help_mp.h" +#include "mp_msg.h" +#include "af.h" /* ------------------------------------------------------------------------- */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_lavcac3enc.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_lavcac3enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_lavcac3enc.c 2011-04-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_lavcac3enc.c 2011-11-14 19:05:49.000000000 +0000 @@ -25,11 +25,12 @@ #include #include -#include "libmpcodecs/vd_ffmpeg.h" #include "config.h" #include "af.h" #include "help_mp.h" +#include "mp_msg.h" #include "reorder_ch.h" +#include "av_helpers.h" #include "libavcodec/avcodec.h" #include "libavcodec/ac3.h" @@ -50,8 +51,8 @@ // Initialization and runtime control static int control(struct af_instance_s *af, int cmd, void *arg) { - af_ac3enc_t *s = (af_ac3enc_t *)af->setup; - af_data_t *data = (af_data_t *)arg; + af_ac3enc_t *s = af->setup; + af_data_t *data = arg; int i, bit_rate, test_output_res; static const int default_bit_rate[AC3_MAX_CHANNELS+1] = \ {0, 96000, 192000, 256000, 384000, 448000, 448000}; @@ -111,7 +112,7 @@ s->bit_rate = 0; s->min_channel_num = 0; s->add_iec61937_header = 0; - sscanf((char*)arg,"%d:%d:%d", &s->add_iec61937_header, &s->bit_rate, + sscanf(arg,"%d:%d:%d", &s->add_iec61937_header, &s->bit_rate, &s->min_channel_num); if (s->bit_rate < 1000) s->bit_rate *= 1000; @@ -185,8 +186,8 @@ } l = af->data; // Local data - buf = (char *)l->audio; - src = (char *)c->audio; + buf = l->audio; + src = c->audio; left = c->len; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_pan.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_pan.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_pan.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_pan.c 2011-10-26 15:12:35.000000000 +0000 @@ -25,6 +25,7 @@ #include #include +#include "mp_msg.h" #include "af.h" // Data for specific instances of this filter diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_resample.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_resample.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_resample.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_resample.c 2011-10-26 15:12:35.000000000 +0000 @@ -26,6 +26,7 @@ #include "libavutil/common.h" #include "libavutil/mathematics.h" +#include "mp_msg.h" #include "af.h" #include "dsp.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_scaletempo.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_scaletempo.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_scaletempo.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_scaletempo.c 2011-10-26 15:12:35.000000000 +0000 @@ -37,6 +37,7 @@ #include "af.h" #include "libavutil/common.h" +#include "mp_msg.h" #include "subopt-helper.h" #include "help_mp.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_sinesuppress.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_sinesuppress.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_sinesuppress.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_sinesuppress.c 2011-10-26 15:12:35.000000000 +0000 @@ -28,6 +28,7 @@ #include #include +#include "mp_msg.h" #include "af.h" // Data for specific instances of this filter diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_stats.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_stats.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_stats.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_stats.c 2011-10-26 15:12:35.000000000 +0000 @@ -23,6 +23,7 @@ #include #include +#include "mp_msg.h" #include "af.h" #define MAX_DB 80 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_sub.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_sub.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_sub.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_sub.c 2011-10-26 15:12:35.000000000 +0000 @@ -32,6 +32,7 @@ #include #include +#include "mp_msg.h" #include "af.h" #include "dsp.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_surround.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_surround.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_surround.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_surround.c 2011-10-26 15:12:35.000000000 +0000 @@ -39,6 +39,7 @@ #include #include +#include "mp_msg.h" #include "af.h" #include "dsp.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_volume.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_volume.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/af_volume.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/af_volume.c 2011-10-26 15:12:35.000000000 +0000 @@ -42,6 +42,7 @@ #include #include +#include "mp_msg.h" #include "af.h" // Data for specific instances of this filter diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libaf/format.c mplayer-1.0~rc4.dfsg1+svn34540/libaf/format.c --- mplayer-1.0~rc4.dfsg1+svn33713/libaf/format.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libaf/format.c 2011-10-12 17:23:08.000000000 +0000 @@ -52,6 +52,9 @@ if(strstr(str,"mpeg2") || strstr(str,"MPEG2")){ format |= AF_FORMAT_MPEG2; return format; } + if(strstr(str,"iec61937") || strstr(str,"IEC61937")){ + format |= AF_FORMAT_IEC61937 | AF_FORMAT_16BIT; return format; + } if(strstr(str,"imaadpcm") || strstr(str,"IMAADPCM")){ format |= AF_FORMAT_IMA_ADPCM; return format; } @@ -121,6 +124,8 @@ i+=snprintf(&str[i],size-i,"MPEG-2 "); break; case(AF_FORMAT_AC3): i+=snprintf(&str[i],size-i,"AC3 "); break; + case(AF_FORMAT_IEC61937): + i+=snprintf(&str[i],size-i,"IEC61937 "); break; case(AF_FORMAT_IMA_ADPCM): i+=snprintf(&str[i],size-i,"IMA-ADPCM "); break; default: @@ -161,6 +166,9 @@ { "ac3le", AF_FORMAT_AC3_LE }, { "ac3be", AF_FORMAT_AC3_BE }, { "ac3ne", AF_FORMAT_AC3_NE }, + { "iec61937le", AF_FORMAT_IEC61937_LE }, + { "iec61937be", AF_FORMAT_IEC61937_BE }, + { "iec61937ne", AF_FORMAT_IEC61937_NE }, { "imaadpcm", AF_FORMAT_IMA_ADPCM }, { "u8", AF_FORMAT_U8 }, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libao2/ao_alsa5.c mplayer-1.0~rc4.dfsg1+svn34540/libao2/ao_alsa5.c --- mplayer-1.0~rc4.dfsg1+svn33713/libao2/ao_alsa5.c 2010-10-26 08:15:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libao2/ao_alsa5.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,384 +0,0 @@ -/* - * ALSA 0.5.x audio output driver - * - * Copyright (C) 2001 Alex Beregszaszi - * - * Thanks to Arpi for helping me ;) - * - * 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 "config.h" - -#include "audio_out.h" -#include "audio_out_internal.h" -#include "libaf/af_format.h" - -#include "mp_msg.h" -#include "help_mp.h" - -static const ao_info_t info = -{ - "ALSA-0.5.x audio output", - "alsa5", - "Alex Beregszaszi", - "" -}; - -LIBAO_EXTERN(alsa5) - -static snd_pcm_t *alsa_handler; -static snd_pcm_format_t alsa_format; -static int alsa_rate = SND_PCM_RATE_CONTINUOUS; - -/* to set/get/query special features/parameters */ -static int control(int cmd, void *arg) -{ - return CONTROL_UNKNOWN; -} - -/* - open & setup audio device - return: 1=success 0=fail -*/ -static int init(int rate_hz, int channels, int format, int flags) -{ - int err; - int cards = -1; - snd_pcm_channel_params_t params; - snd_pcm_channel_setup_t setup; - snd_pcm_info_t info; - snd_pcm_channel_info_t chninfo; - - mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_ALSA5_InitInfo, rate_hz, - channels, af_fmt2str_short(format)); - - alsa_handler = NULL; - - mp_msg(MSGT_AO, MSGL_V, "alsa-init: compiled for ALSA-%s (%d)\n", SND_LIB_VERSION_STR, - SND_LIB_VERSION); - - if ((cards = snd_cards()) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_SoundCardNotFound); - return 0; - } - - ao_data.format = format; - ao_data.channels = channels; - ao_data.samplerate = rate_hz; - ao_data.bps = ao_data.samplerate*ao_data.channels; - ao_data.outburst = OUTBURST; - ao_data.buffersize = 16384; - - memset(&alsa_format, 0, sizeof(alsa_format)); - switch (format) - { - case AF_FORMAT_S8: - alsa_format.format = SND_PCM_SFMT_S8; - break; - case AF_FORMAT_U8: - alsa_format.format = SND_PCM_SFMT_U8; - break; - case AF_FORMAT_U16_LE: - alsa_format.format = SND_PCM_SFMT_U16_LE; - break; - case AF_FORMAT_U16_BE: - alsa_format.format = SND_PCM_SFMT_U16_BE; - break; - case AF_FORMAT_AC3_LE: - case AF_FORMAT_S16_LE: - alsa_format.format = SND_PCM_SFMT_S16_LE; - break; - case AF_FORMAT_AC3_BE: - case AF_FORMAT_S16_BE: - alsa_format.format = SND_PCM_SFMT_S16_BE; - break; - default: - alsa_format.format = SND_PCM_SFMT_MPEG; - break; - } - - switch(alsa_format.format) - { - case SND_PCM_SFMT_S16_LE: - case SND_PCM_SFMT_U16_LE: - ao_data.bps *= 2; - break; - case -1: - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_InvalidFormatReq,af_fmt2str_short(format)); - return 0; - default: - break; - } - - switch(rate_hz) - { - case 8000: - alsa_rate = SND_PCM_RATE_8000; - break; - case 11025: - alsa_rate = SND_PCM_RATE_11025; - break; - case 16000: - alsa_rate = SND_PCM_RATE_16000; - break; - case 22050: - alsa_rate = SND_PCM_RATE_22050; - break; - case 32000: - alsa_rate = SND_PCM_RATE_32000; - break; - case 44100: - alsa_rate = SND_PCM_RATE_44100; - break; - case 48000: - alsa_rate = SND_PCM_RATE_48000; - break; - case 88200: - alsa_rate = SND_PCM_RATE_88200; - break; - case 96000: - alsa_rate = SND_PCM_RATE_96000; - break; - case 176400: - alsa_rate = SND_PCM_RATE_176400; - break; - case 192000: - alsa_rate = SND_PCM_RATE_192000; - break; - default: - alsa_rate = SND_PCM_RATE_CONTINUOUS; - break; - } - - alsa_format.rate = ao_data.samplerate; - alsa_format.voices = ao_data.channels; - alsa_format.interleave = 1; - - if ((err = snd_pcm_open(&alsa_handler, 0, 0, SND_PCM_OPEN_PLAYBACK)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PlayBackError, snd_strerror(err)); - return 0; - } - - if ((err = snd_pcm_info(alsa_handler, &info)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PcmInfoError, snd_strerror(err)); - return 0; - } - - mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_ALSA5_SoundcardsFound, - cards, info.name); - - if (info.flags & SND_PCM_INFO_PLAYBACK) - { - memset(&chninfo, 0, sizeof(chninfo)); - chninfo.channel = SND_PCM_CHANNEL_PLAYBACK; - if ((err = snd_pcm_channel_info(alsa_handler, &chninfo)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PcmChanInfoError, snd_strerror(err)); - return 0; - } - -#ifndef __QNX__ - if (chninfo.buffer_size) - ao_data.buffersize = chninfo.buffer_size; -#endif - - mp_msg(MSGT_AO, MSGL_V, "alsa-init: setting preferred buffer size from driver: %d bytes\n", - ao_data.buffersize); - } - - memset(¶ms, 0, sizeof(params)); - params.channel = SND_PCM_CHANNEL_PLAYBACK; - params.mode = SND_PCM_MODE_STREAM; - params.format = alsa_format; - params.start_mode = SND_PCM_START_DATA; - params.stop_mode = SND_PCM_STOP_ROLLOVER; - params.buf.stream.queue_size = ao_data.buffersize; - params.buf.stream.fill = SND_PCM_FILL_NONE; - - if ((err = snd_pcm_channel_params(alsa_handler, ¶ms)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_CantSetParms, snd_strerror(err)); - return 0; - } - - memset(&setup, 0, sizeof(setup)); - setup.channel = SND_PCM_CHANNEL_PLAYBACK; - setup.mode = SND_PCM_MODE_STREAM; - setup.format = alsa_format; - setup.buf.stream.queue_size = ao_data.buffersize; - setup.msbits_per_sample = ao_data.bps; - - if ((err = snd_pcm_channel_setup(alsa_handler, &setup)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_CantSetChan, snd_strerror(err)); - return 0; - } - - if ((err = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_ChanPrepareError, snd_strerror(err)); - return 0; - } - - mp_msg(MSGT_AO, MSGL_INFO, "AUDIO: %d Hz/%d channels/%d bps/%d bytes buffer/%s\n", - ao_data.samplerate, ao_data.channels, ao_data.bps, ao_data.buffersize, - snd_pcm_get_format_name(alsa_format.format)); - return 1; -} - -/* close audio device */ -static void uninit(int immed) -{ - int err; - - if ((err = snd_pcm_playback_drain(alsa_handler)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_DrainError, snd_strerror(err)); - return; - } - - if ((err = snd_pcm_channel_flush(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_FlushError, snd_strerror(err)); - return; - } - - if ((err = snd_pcm_close(alsa_handler)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PcmCloseError, snd_strerror(err)); - return; - } -} - -/* stop playing and empty buffers (for seeking/pause) */ -static void reset(void) -{ - int err; - - if ((err = snd_pcm_playback_drain(alsa_handler)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_ResetDrainError, snd_strerror(err)); - return; - } - - if ((err = snd_pcm_channel_flush(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_ResetFlushError, snd_strerror(err)); - return; - } - - if ((err = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_ResetChanPrepareError, snd_strerror(err)); - return; - } -} - -/* stop playing, keep buffers (for pause) */ -static void audio_pause(void) -{ - int err; - - if ((err = snd_pcm_playback_drain(alsa_handler)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PauseDrainError, snd_strerror(err)); - return; - } - - if ((err = snd_pcm_channel_flush(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PauseFlushError, snd_strerror(err)); - return; - } -} - -/* resume playing, after audio_pause() */ -static void audio_resume(void) -{ - int err; - if ((err = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_ResumePrepareError, snd_strerror(err)); - return; - } -} - -/* - plays 'len' bytes of 'data' - returns: number of bytes played -*/ -static int play(void* data, int len, int flags) -{ - int got_len; - - if (!len) - return 0; - - if ((got_len = snd_pcm_write(alsa_handler, data, len)) < 0) - { - if (got_len == -EPIPE) /* underrun? */ - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_Underrun); - if ((got_len = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PlaybackPrepareError, snd_strerror(got_len)); - return 0; - } - if ((got_len = snd_pcm_write(alsa_handler, data, len)) < 0) - { - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_WriteErrorAfterReset, - snd_strerror(got_len)); - return 0; - } - return got_len; /* 2nd write was ok */ - } - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_OutPutError, snd_strerror(got_len)); - return 0; - } - return got_len; -} - -/* how many byes are free in the buffer */ -static int get_space(void) -{ - snd_pcm_channel_status_t ch_stat; - - ch_stat.channel = SND_PCM_CHANNEL_PLAYBACK; - - if (snd_pcm_channel_status(alsa_handler, &ch_stat) < 0) - return 0; /* error occurred */ - else - return ch_stat.free; -} - -/* delay in seconds between first and last sample in buffer */ -static float get_delay(void) -{ - snd_pcm_channel_status_t ch_stat; - - ch_stat.channel = SND_PCM_CHANNEL_PLAYBACK; - - if (snd_pcm_channel_status(alsa_handler, &ch_stat) < 0) - return (float)ao_data.buffersize/(float)ao_data.bps; /* error occurred */ - else - return (float)ch_stat.count/(float)ao_data.bps; -} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libao2/ao_alsa.c mplayer-1.0~rc4.dfsg1+svn34540/libao2/ao_alsa.c --- mplayer-1.0~rc4.dfsg1+svn33713/libao2/ao_alsa.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libao2/ao_alsa.c 2011-11-14 09:58:26.000000000 +0000 @@ -34,25 +34,15 @@ #include #include #include +#define ALSA_PCM_NEW_HW_PARAMS_API +#define ALSA_PCM_NEW_SW_PARAMS_API +#include #include "config.h" #include "subopt-helper.h" #include "mixer.h" #include "mp_msg.h" #include "help_mp.h" - -#define ALSA_PCM_NEW_HW_PARAMS_API -#define ALSA_PCM_NEW_SW_PARAMS_API - -#ifdef HAVE_SYS_ASOUNDLIB_H -#include -#elif defined(HAVE_ALSA_ASOUNDLIB_H) -#include -#else -#error "asoundlib.h is not in sys/ or alsa/ - please bugreport" -#endif - - #include "audio_out.h" #include "audio_out_internal.h" #include "libaf/af_format.h" @@ -121,7 +111,7 @@ long get_vol, set_vol; float f_multi; - if(AF_FORMAT_IS_AC3(ao_data.format)) + if(AF_FORMAT_IS_AC3(ao_data.format) || AF_FORMAT_IS_IEC61937(ao_data.format)) return CONTROL_TRUE; if(mixer_channel) { @@ -361,10 +351,12 @@ break; case AF_FORMAT_AC3_LE: case AF_FORMAT_S16_LE: + case AF_FORMAT_IEC61937_LE: alsa_format = SND_PCM_FORMAT_S16_LE; break; case AF_FORMAT_AC3_BE: case AF_FORMAT_S16_BE: + case AF_FORMAT_IEC61937_BE: alsa_format = SND_PCM_FORMAT_S16_BE; break; case AF_FORMAT_U32_LE: @@ -418,9 +410,9 @@ * while opening the abstract alias for the spdif subdevice * 'iec958' */ - if (AF_FORMAT_IS_AC3(format)) { + if (AF_FORMAT_IS_AC3(format) || AF_FORMAT_IS_IEC61937(format)) { device.str = "iec958"; - mp_msg(MSGT_AO,MSGL_V,"alsa-spdif-init: playing AC3, %i channels\n", channels); + mp_msg(MSGT_AO,MSGL_V,"alsa-spdif-init: playing AC3/iec61937/iec958, %i channels\n", channels); } else /* in any case for multichannel playback we should select @@ -469,7 +461,7 @@ if (!alsa_handler) { int open_mode = block ? 0 : SND_PCM_NONBLOCK; - int isac3 = AF_FORMAT_IS_AC3(format); + int isac3 = AF_FORMAT_IS_AC3(format) || AF_FORMAT_IS_IEC61937(format); //modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC if ((err = try_open_device(alsa_device, open_mode, isac3)) < 0) { @@ -520,6 +512,8 @@ alsa_format = SND_PCM_FORMAT_S16_LE; if (AF_FORMAT_IS_AC3(ao_data.format)) ao_data.format = AF_FORMAT_AC3_LE; + else if (AF_FORMAT_IS_IEC61937(ao_data.format)) + ao_data.format = AF_FORMAT_IEC61937_LE; else ao_data.format = AF_FORMAT_S16_LE; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libao2/ao_coreaudio.c mplayer-1.0~rc4.dfsg1+svn34540/libao2/ao_coreaudio.c --- mplayer-1.0~rc4.dfsg1+svn33713/libao2/ao_coreaudio.c 2011-01-09 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libao2/ao_coreaudio.c 2011-10-23 12:03:40.000000000 +0000 @@ -133,7 +133,10 @@ static int read_buffer(unsigned char* data,int len){ int buffered = av_fifo_size(ao->buffer); if (len > buffered) len = buffered; - av_fifo_generic_read(ao->buffer, data, len, NULL); + if (data) + av_fifo_generic_read(ao->buffer, data, len, NULL); + else + av_fifo_drain(ao->buffer, len); return len; } @@ -657,25 +660,32 @@ goto err_out; } + property_address.mSelector = kAudioDevicePropertySupportsMixing; + property_address.mScope = kAudioObjectPropertyScopeGlobal; + property_address.mElement = kAudioObjectPropertyElementMaster; + /* Set mixable to false if we are allowed to. */ - err = IsAudioPropertySettable(ao->i_selected_dev, - kAudioDevicePropertySupportsMixing, - &b_writeable); - err = GetAudioProperty(ao->i_selected_dev, - kAudioDevicePropertySupportsMixing, - sizeof(UInt32), &b_mix); - if (err != noErr && b_writeable) - { - b_mix = 0; - err = SetAudioProperty(ao->i_selected_dev, + if (AudioObjectHasProperty(ao->i_selected_dev, &property_address)) { + /* Set mixable to false if we are allowed to. */ + err = IsAudioPropertySettable(ao->i_selected_dev, + kAudioDevicePropertySupportsMixing, + &b_writeable); + err = GetAudioProperty(ao->i_selected_dev, kAudioDevicePropertySupportsMixing, sizeof(UInt32), &b_mix); - ao->b_changed_mixing = 1; - } - if (err != noErr) - { - ao_msg(MSGT_AO, MSGL_WARN, "failed to set mixmode: [%4.4s]\n", (char *)&err); - goto err_out; + if (err == noErr && b_writeable) + { + b_mix = 0; + err = SetAudioProperty(ao->i_selected_dev, + kAudioDevicePropertySupportsMixing, + sizeof(UInt32), &b_mix); + ao->b_changed_mixing = 1; + } + if (err != noErr) + { + ao_msg(MSGT_AO, MSGL_WARN, "failed to set mixmode: [%4.4s]\n", (char *)&err); + goto err_out; + } } /* Get a list of all the streams on this device. */ @@ -696,11 +706,11 @@ for (i = 0; i < i_streams && ao->i_stream_index < 0; ++i) { /* Find a stream with a cac3 stream. */ - AudioStreamBasicDescription *p_format_list = NULL; + AudioStreamRangedDescription *p_format_list = NULL; int i_formats = 0, j = 0, b_digital = 0; i_param_size = GetGlobalAudioPropertyArray(p_streams[i], - kAudioStreamPropertyPhysicalFormats, + kAudioStreamPropertyAvailablePhysicalFormats, (void **)&p_format_list); if (!i_param_size) { @@ -709,13 +719,15 @@ continue; } - i_formats = i_param_size / sizeof(AudioStreamBasicDescription); + i_formats = i_param_size / sizeof(AudioStreamRangedDescription); /* Check if one of the supported formats is a digital format. */ for (j = 0; j < i_formats; ++j) { - if (p_format_list[j].mFormatID == 'IAC3' || - p_format_list[j].mFormatID == kAudioFormat60958AC3) + if (p_format_list[j].mFormat.mFormatID == 'IAC3' || + p_format_list[j].mFormat.mFormatID == 'iac3' || + p_format_list[j].mFormat.mFormatID == kAudioFormat60958AC3 || + p_format_list[j].mFormat.mFormatID == kAudioFormatAC3) { b_digital = 1; break; @@ -750,25 +762,27 @@ } for (j = 0; j < i_formats; ++j) - if (p_format_list[j].mFormatID == 'IAC3' || - p_format_list[j].mFormatID == kAudioFormat60958AC3) + if (p_format_list[j].mFormat.mFormatID == 'IAC3' || + p_format_list[j].mFormat.mFormatID == 'iac3' || + p_format_list[j].mFormat.mFormatID == kAudioFormat60958AC3 || + p_format_list[j].mFormat.mFormatID == kAudioFormatAC3) { - if (p_format_list[j].mSampleRate == ao->stream_format.mSampleRate) + if (p_format_list[j].mFormat.mSampleRate == ao->stream_format.mSampleRate) { i_requested_rate_format = j; break; } - if (p_format_list[j].mSampleRate == ao->sfmt_revert.mSampleRate) + if (p_format_list[j].mFormat.mSampleRate == ao->sfmt_revert.mSampleRate) i_current_rate_format = j; - else if (i_backup_rate_format < 0 || p_format_list[j].mSampleRate > p_format_list[i_backup_rate_format].mSampleRate) + else if (i_backup_rate_format < 0 || p_format_list[j].mFormat.mSampleRate > p_format_list[i_backup_rate_format].mFormat.mSampleRate) i_backup_rate_format = j; } if (i_requested_rate_format >= 0) /* We prefer to output at the samplerate of the original audio. */ - ao->stream_format = p_format_list[i_requested_rate_format]; + ao->stream_format = p_format_list[i_requested_rate_format].mFormat; else if (i_current_rate_format >= 0) /* If not possible, we will try to use the current samplerate of the device. */ - ao->stream_format = p_format_list[i_current_rate_format]; - else ao->stream_format = p_format_list[i_backup_rate_format]; /* And if we have to, any digital format will be just fine (highest rate possible). */ + ao->stream_format = p_format_list[i_current_rate_format].mFormat; + else ao->stream_format = p_format_list[i_backup_rate_format].mFormat; /* And if we have to, any digital format will be just fine (highest rate possible). */ } free(p_format_list); } @@ -913,12 +927,12 @@ static int AudioStreamSupportsDigital( AudioStreamID i_stream_id ) { UInt32 i_param_size; - AudioStreamBasicDescription *p_format_list = NULL; + AudioStreamRangedDescription *p_format_list = NULL; int i, i_formats, b_return = CONTROL_FALSE; /* Retrieve all the stream formats supported by each output stream. */ i_param_size = GetGlobalAudioPropertyArray(i_stream_id, - kAudioStreamPropertyPhysicalFormats, + kAudioStreamPropertyAvailablePhysicalFormats, (void **)&p_format_list); if (!i_param_size) { @@ -926,14 +940,16 @@ return CONTROL_FALSE; } - i_formats = i_param_size / sizeof(AudioStreamBasicDescription); + i_formats = i_param_size / sizeof(AudioStreamRangedDescription); for (i = 0; i < i_formats; ++i) { - print_format(MSGL_V, "supported format:", &p_format_list[i]); + print_format(MSGL_V, "supported format:", &(p_format_list[i].mFormat)); - if (p_format_list[i].mFormatID == 'IAC3' || - p_format_list[i].mFormatID == kAudioFormat60958AC3) + if (p_format_list[i].mFormat.mFormatID == 'IAC3' || + p_format_list[i].mFormat.mFormatID == 'iac3' || + p_format_list[i].mFormat.mFormatID == kAudioFormat60958AC3 || + p_format_list[i].mFormat.mFormatID == kAudioFormatAC3) b_return = CONTROL_OK; } @@ -1143,7 +1159,7 @@ if (ao->b_changed_mixing && ao->sfmt_revert.mFormatID != kAudioFormat60958AC3) { UInt32 b_mix; - Boolean b_writeable; + Boolean b_writeable = 0; /* Revert mixable to true if we are allowed to. */ err = IsAudioPropertySettable(ao->i_selected_dev, kAudioDevicePropertySupportsMixing, @@ -1151,7 +1167,7 @@ err = GetAudioProperty(ao->i_selected_dev, kAudioDevicePropertySupportsMixing, sizeof(UInt32), &b_mix); - if (err != noErr && b_writeable) + if (err == noErr && b_writeable) { b_mix = 1; err = SetAudioProperty(ao->i_selected_dev, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libao2/ao_null.c mplayer-1.0~rc4.dfsg1+svn34540/libao2/ao_null.c --- mplayer-1.0~rc4.dfsg1+svn33713/libao2/ao_null.c 2010-10-26 08:15:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libao2/ao_null.c 2011-11-16 11:14:25.000000000 +0000 @@ -37,8 +37,8 @@ LIBAO_EXTERN(null) -struct timeval last_tv; -int buffer; +static struct timeval last_tv; +static int buffer; static void drain(void){ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libao2/ao_sun.c mplayer-1.0~rc4.dfsg1+svn34540/libao2/ao_sun.c --- mplayer-1.0~rc4.dfsg1+svn33713/libao2/ao_sun.c 2010-11-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libao2/ao_sun.c 2011-07-24 23:55:39.000000000 +0000 @@ -153,20 +153,17 @@ info.play.encoding = AUDIO_ENCODING_LINEAR; info.play.samples = 0; if (ioctl(fd, AUDIO_SETINFO, &info)) { - if ( mp_msg_test(MSGT_AO,MSGL_V) ) - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_SUN_RtscSetinfoFailed); + mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_SUN_RtscSetinfoFailed); goto error; } if (write(fd, silence, len) != len) { - if ( mp_msg_test(MSGT_AO,MSGL_V) ) - mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_SUN_RtscWriteFailed); + mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_SUN_RtscWriteFailed); goto error; } if (ioctl(fd, AUDIO_GETINFO, &info)) { - if ( mp_msg_test(MSGT_AO,MSGL_V) ) - perror("rtsc: GETINFO1"); + perror("rtsc: GETINFO1"); goto error; } @@ -187,13 +184,11 @@ break; if (ioctl(fd, AUDIO_GETINFO, &info)) { - if ( mp_msg_test(MSGT_AO,MSGL_V) ) - perror("rtsc: GETINFO2 failed"); + perror("rtsc: GETINFO2 failed"); goto error; } if (info.play.samples < last_samplecnt) { - if ( mp_msg_test(MSGT_AO,MSGL_V) ) - mp_msg(MSGT_AO,MSGL_V,"rtsc: %d > %d?\n", last_samplecnt, info.play.samples); + mp_msg(MSGT_AO, MSGL_ERR, "rtsc: %d > %d?\n", last_samplecnt, info.play.samples); goto error; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libao2/audio_out.c mplayer-1.0~rc4.dfsg1+svn34540/libao2/audio_out.c --- mplayer-1.0~rc4.dfsg1+svn33713/libao2/audio_out.c 2010-11-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libao2/audio_out.c 2011-11-09 01:22:02.000000000 +0000 @@ -39,7 +39,6 @@ extern const ao_functions_t audio_out_jack; extern const ao_functions_t audio_out_openal; extern const ao_functions_t audio_out_null; -extern const ao_functions_t audio_out_alsa5; extern const ao_functions_t audio_out_alsa; extern const ao_functions_t audio_out_nas; extern const ao_functions_t audio_out_sdl; @@ -80,9 +79,6 @@ #ifdef CONFIG_ALSA &audio_out_alsa, #endif -#ifdef CONFIG_ALSA5 - &audio_out_alsa5, -#endif #ifdef CONFIG_SGI_AUDIO &audio_out_sgi, #endif @@ -159,7 +155,7 @@ else ao_len = strlen(ao); - mp_msg(MSGT_AO, MSGL_V, MSGTR_AO_TryingPreferredAudioDriver, + mp_msg(MSGT_AO, MSGL_V, "Trying preferred audio driver '%.*s', options '%s'\n", ao_len, ao, ao_subdevice ? ao_subdevice : "[none]"); for(i=0;audio_out_drivers[i];i++){ @@ -182,7 +178,7 @@ free(ao_subdevice); ao_subdevice = NULL; - mp_msg(MSGT_AO, MSGL_V, MSGTR_AO_TryingEveryKnown); + mp_msg(MSGT_AO, MSGL_V, "Trying every known audio driver...\n"); // now try the rest... for(i=0;audio_out_drivers[i];i++){ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_bitmap.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_bitmap.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_bitmap.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_bitmap.c 2011-12-03 21:35:56.000000000 +0000 @@ -1,21 +1,20 @@ /* * Copyright (C) 2006 Evgeniy Stepanov + * Copyright (C) 2011 Grigori Goronzy * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include @@ -24,6 +23,7 @@ #include #include #include FT_GLYPH_H +#include FT_OUTLINE_H #include "ass_utils.h" #include "ass_bitmap.h" @@ -135,10 +135,12 @@ static Bitmap *alloc_bitmap(int w, int h) { Bitmap *bm; + unsigned s = w; // XXX: alignment bm = malloc(sizeof(Bitmap)); - bm->buffer = calloc(w, h); + bm->buffer = calloc(s, h); bm->w = w; bm->h = h; + bm->stride = s; bm->left = bm->top = 0; return bm; } @@ -155,70 +157,57 @@ Bitmap *dst = alloc_bitmap(src->w, src->h); dst->left = src->left; dst->top = src->top; - memcpy(dst->buffer, src->buffer, src->w * src->h); + memcpy(dst->buffer, src->buffer, src->stride * src->h); return dst; } -int check_glyph_area(ASS_Library *library, FT_Glyph glyph) -{ - FT_BBox bbox; - long long dx, dy; - FT_Glyph_Get_CBox(glyph, FT_GLYPH_BBOX_TRUNCATE, &bbox); - dx = bbox.xMax - bbox.xMin; - dy = bbox.yMax - bbox.yMin; - if (dx * dy > 8000000) { - ass_msg(library, MSGL_WARN, "Glyph bounding box too large: %dx%dpx", - (int) dx, (int) dy); - return 1; - } else - return 0; -} - -static Bitmap *glyph_to_bitmap_internal(ASS_Library *library, - FT_Glyph glyph, int bord) +Bitmap *outline_to_bitmap(ASS_Library *library, FT_Library ftlib, + FT_Outline *outline, int bord) { - FT_BitmapGlyph bg; - FT_Bitmap *bit; Bitmap *bm; int w, h; - unsigned char *src; - unsigned char *dst; - int i; int error; + FT_BBox bbox; + FT_Bitmap bitmap; - if (check_glyph_area(library, glyph)) - return 0; - error = FT_Glyph_To_Bitmap(&glyph, FT_RENDER_MODE_NORMAL, 0, 0); - if (error) { - ass_msg(library, MSGL_WARN, "FT_Glyph_To_Bitmap error %d", - error); - return 0; - } + FT_Outline_Get_CBox(outline, &bbox); + // move glyph to origin (0, 0) + bbox.xMin &= ~63; + bbox.yMin &= ~63; + FT_Outline_Translate(outline, -bbox.xMin, -bbox.yMin); + // bitmap size + bbox.xMax = (bbox.xMax + 63) & ~63; + bbox.yMax = (bbox.yMax + 63) & ~63; + w = (bbox.xMax - bbox.xMin) >> 6; + h = (bbox.yMax - bbox.yMin) >> 6; + // pen offset + bbox.xMin >>= 6; + bbox.yMax >>= 6; - bg = (FT_BitmapGlyph) glyph; - bit = &(bg->bitmap); - if (bit->pixel_mode != FT_PIXEL_MODE_GRAY) { - ass_msg(library, MSGL_WARN, "Unsupported pixel mode: %d", - (int) (bit->pixel_mode)); - FT_Done_Glyph(glyph); - return 0; + if (w * h > 8000000) { + ass_msg(library, MSGL_WARN, "Glyph bounding box too large: %dx%dpx", + w, h); + return NULL; } - w = bit->width; - h = bit->rows; + // allocate and set up bitmap bm = alloc_bitmap(w + 2 * bord, h + 2 * bord); - bm->left = bg->left - bord; - bm->top = -bg->top - bord; - - src = bit->buffer; - dst = bm->buffer + bord + bm->w * bord; - for (i = 0; i < h; ++i) { - memcpy(dst, src, w); - src += bit->pitch; - dst += bm->w; + bm->left = bbox.xMin - bord; + bm->top = -bbox.yMax - bord; + bitmap.width = w; + bitmap.rows = h; + bitmap.pitch = bm->stride; + bitmap.buffer = bm->buffer + bord + bm->stride * bord; + bitmap.num_grays = 256; + bitmap.pixel_mode = FT_PIXEL_MODE_GRAY; + + // render into target bitmap + if ((error = FT_Outline_Get_Bitmap(ftlib, outline, &bitmap))) { + ass_msg(library, MSGL_WARN, "Failed to rasterize glyph: %d\n", error); + ass_free_bitmap(bm); + return NULL; } - FT_Done_Glyph(glyph); return bm; } @@ -234,16 +223,16 @@ const int l = bm_o->left > bm_g->left ? bm_o->left : bm_g->left; const int t = bm_o->top > bm_g->top ? bm_o->top : bm_g->top; const int r = - bm_o->left + bm_o->w < - bm_g->left + bm_g->w ? bm_o->left + bm_o->w : bm_g->left + bm_g->w; + bm_o->left + bm_o->stride < + bm_g->left + bm_g->stride ? bm_o->left + bm_o->stride : bm_g->left + bm_g->stride; const int b = bm_o->top + bm_o->h < bm_g->top + bm_g->h ? bm_o->top + bm_o->h : bm_g->top + bm_g->h; unsigned char *g = - bm_g->buffer + (t - bm_g->top) * bm_g->w + (l - bm_g->left); + bm_g->buffer + (t - bm_g->top) * bm_g->stride + (l - bm_g->left); unsigned char *o = - bm_o->buffer + (t - bm_o->top) * bm_o->w + (l - bm_o->left); + bm_o->buffer + (t - bm_o->top) * bm_o->stride + (l - bm_o->left); for (y = 0; y < b - t; ++y) { for (x = 0; x < r - l; ++x) { @@ -252,8 +241,8 @@ c_o = o[x]; o[x] = (c_o > c_g) ? c_o - (c_g / 2) : 0; } - g += bm_g->w; - o += bm_o->w; + g += bm_g->stride; + o += bm_o->stride; } } @@ -261,27 +250,30 @@ * \brief Shift a bitmap by the fraction of a pixel in x and y direction * expressed in 26.6 fixed point */ -static void shift_bitmap(unsigned char *buf, int w, int h, int shift_x, - int shift_y) +static void shift_bitmap(Bitmap *bm, int shift_x, int shift_y) { int x, y, b; + int w = bm->w; + int h = bm->h; + int s = bm->stride; + unsigned char *buf = bm->buffer; // Shift in x direction if (shift_x > 0) { for (y = 0; y < h; y++) { for (x = w - 1; x > 0; x--) { - b = (buf[x + y * w - 1] * shift_x) >> 6; - buf[x + y * w - 1] -= b; - buf[x + y * w] += b; + b = (buf[x + y * s - 1] * shift_x) >> 6; + buf[x + y * s - 1] -= b; + buf[x + y * s] += b; } } } else if (shift_x < 0) { shift_x = -shift_x; for (y = 0; y < h; y++) { for (x = 0; x < w - 1; x++) { - b = (buf[x + y * w + 1] * shift_x) >> 6; - buf[x + y * w + 1] -= b; - buf[x + y * w] += b; + b = (buf[x + y * s + 1] * shift_x) >> 6; + buf[x + y * s + 1] -= b; + buf[x + y * s] += b; } } } @@ -290,18 +282,18 @@ if (shift_y > 0) { for (x = 0; x < w; x++) { for (y = h - 1; y > 0; y--) { - b = (buf[x + (y - 1) * w] * shift_y) >> 6; - buf[x + (y - 1) * w] -= b; - buf[x + y * w] += b; + b = (buf[x + (y - 1) * s] * shift_y) >> 6; + buf[x + (y - 1) * s] -= b; + buf[x + y * s] += b; } } } else if (shift_y < 0) { shift_y = -shift_y; for (x = 0; x < w; x++) { for (y = 0; y < h - 1; y++) { - b = (buf[x + (y + 1) * w] * shift_y) >> 6; - buf[x + (y + 1) * w] -= b; - buf[x + y * w] += b; + b = (buf[x + (y + 1) * s] * shift_y) >> 6; + buf[x + (y + 1) * s] -= b; + buf[x + y * s] += b; } } } @@ -432,16 +424,20 @@ * \brief Blur with [[1,2,1]. [2,4,2], [1,2,1]] kernel * This blur is the same as the one employed by vsfilter. */ -static void be_blur(unsigned char *buf, int w, int h) +static void be_blur(Bitmap *bm) { + int w = bm->w; + int h = bm->h; + int s = bm->stride; + unsigned char *buf = bm->buffer; unsigned int x, y; unsigned int old_sum, new_sum; for (y = 0; y < h; y++) { - old_sum = 2 * buf[y * w]; + old_sum = 2 * buf[y * s]; for (x = 0; x < w - 1; x++) { - new_sum = buf[y * w + x] + buf[y * w + x + 1]; - buf[y * w + x] = (old_sum + new_sum) >> 2; + new_sum = buf[y * s + x] + buf[y * s + x + 1]; + buf[y * s + x] = (old_sum + new_sum) >> 2; old_sum = new_sum; } } @@ -449,18 +445,18 @@ for (x = 0; x < w; x++) { old_sum = 2 * buf[x]; for (y = 0; y < h - 1; y++) { - new_sum = buf[y * w + x] + buf[(y + 1) * w + x]; - buf[y * w + x] = (old_sum + new_sum) >> 2; + new_sum = buf[y * s + x] + buf[(y + 1) * s + x]; + buf[y * s + x] = (old_sum + new_sum) >> 2; old_sum = new_sum; } } } -int glyph_to_bitmap(ASS_Library *library, ASS_SynthPriv *priv_blur, - FT_Glyph glyph, FT_Glyph outline_glyph, - Bitmap **bm_g, Bitmap **bm_o, Bitmap **bm_s, - int be, double blur_radius, FT_Vector shadow_offset, - int border_style) +int outline_to_bitmap3(ASS_Library *library, ASS_SynthPriv *priv_blur, + FT_Library ftlib, FT_Outline *outline, FT_Outline *border, + Bitmap **bm_g, Bitmap **bm_o, Bitmap **bm_s, + int be, double blur_radius, FT_Vector shadow_offset, + int border_style) { blur_radius *= 2; int bbord = be > 0 ? sqrt(2 * be) : 0; @@ -473,13 +469,13 @@ *bm_g = *bm_o = *bm_s = 0; - if (glyph) - *bm_g = glyph_to_bitmap_internal(library, glyph, bord); + if (outline) + *bm_g = outline_to_bitmap(library, ftlib, outline, bord); if (!*bm_g) return 1; - if (outline_glyph) { - *bm_o = glyph_to_bitmap_internal(library, outline_glyph, bord); + if (border) { + *bm_o = outline_to_bitmap(library, ftlib, border, bord); if (!*bm_o) { return 1; } @@ -488,9 +484,9 @@ // Apply box blur (multiple passes, if requested) while (be--) { if (*bm_o) - be_blur((*bm_o)->buffer, (*bm_o)->w, (*bm_o)->h); + be_blur(*bm_o); else - be_blur((*bm_g)->buffer, (*bm_g)->w, (*bm_g)->h); + be_blur(*bm_g); } // Apply gaussian blur @@ -502,12 +498,12 @@ generate_tables(priv_blur, blur_radius); if (*bm_o) ass_gauss_blur((*bm_o)->buffer, priv_blur->tmp, - (*bm_o)->w, (*bm_o)->h, (*bm_o)->w, + (*bm_o)->w, (*bm_o)->h, (*bm_o)->stride, (int *) priv_blur->gt2, priv_blur->g_r, priv_blur->g_w); else ass_gauss_blur((*bm_g)->buffer, priv_blur->tmp, - (*bm_g)->w, (*bm_g)->h, (*bm_g)->w, + (*bm_g)->w, (*bm_g)->h, (*bm_g)->stride, (int *) priv_blur->gt2, priv_blur->g_r, priv_blur->g_w); } @@ -523,8 +519,7 @@ assert(bm_s); - shift_bitmap((*bm_s)->buffer, (*bm_s)->w,(*bm_s)->h, - shadow_offset.x, shadow_offset.y); + shift_bitmap(*bm_s, shadow_offset.x, shadow_offset.y); return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_bitmap.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_bitmap.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_bitmap.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_bitmap.h 2011-12-03 21:35:56.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef LIBASS_BITMAP_H @@ -34,9 +32,12 @@ typedef struct { int left, top; int w, h; // width, height + int stride; unsigned char *buffer; // w x h buffer } Bitmap; +Bitmap *outline_to_bitmap(ASS_Library *library, FT_Library ftlib, + FT_Outline *outline, int bord); /** * \brief perform glyph rendering * \param glyph original glyph @@ -46,13 +47,12 @@ * \param bm_g out: pointer to the bitmap of glyph shadow is returned here * \param be 1 = produces blurred bitmaps, 0 = normal bitmaps */ -int glyph_to_bitmap(ASS_Library *library, ASS_SynthPriv *priv_blur, - FT_Glyph glyph, FT_Glyph outline_glyph, - Bitmap **bm_g, Bitmap **bm_o, Bitmap **bm_s, - int be, double blur_radius, FT_Vector shadow_offset, - int border_style); +int outline_to_bitmap3(ASS_Library *library, ASS_SynthPriv *priv_blur, + FT_Library ftlib, FT_Outline *outline, FT_Outline *border, + Bitmap **bm_g, Bitmap **bm_o, Bitmap **bm_s, + int be, double blur_radius, FT_Vector shadow_offset, + int border_style); void ass_free_bitmap(Bitmap *bm); -int check_glyph_area(ASS_Library *library, FT_Glyph glyph); #endif /* LIBASS_BITMAP_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass.c 2011-12-03 21:35:56.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "config.h" @@ -30,6 +28,7 @@ #include #include #include +#include #ifdef CONFIG_ICONV #include @@ -71,6 +70,7 @@ } free(track->style_format); free(track->event_format); + free(track->Language); if (track->styles) { for (i = 0; i < track->n_styles; ++i) ass_free_style(track, i); @@ -166,6 +166,32 @@ } /** + * \brief Set up default style + * \param style style to edit to defaults + * The parameters are mostly taken directly from VSFilter source for + * best compatibility. + */ +static void set_default_style(ASS_Style *style) +{ + style->Name = strdup("Default"); + style->FontName = strdup("Arial"); + style->FontSize = 18; + style->PrimaryColour = 0xffffff00; + style->SecondaryColour = 0x00ffff00; + style->OutlineColour = 0x00000000; + style->BackColour = 0x00000080; + style->Bold = 200; + style->ScaleX = 1.0; + style->ScaleY = 1.0; + style->Spacing = 0; + style->BorderStyle = 1; + style->Outline = 2; + style->Shadow = 3; + style->Alignment = 2; + style->MarginL = style->MarginR = style->MarginV = 20; +} + +/** * \brief find style by name * \param track track * \param name style name @@ -179,7 +205,6 @@ if (*name == '*') ++name; // FIXME: what does '*' really mean ? for (i = track->n_styles - 1; i >= 0; --i) { - // FIXME: mb strcasecmp ? if (strcmp(track->styles[i].Name, name) == 0) return i; } @@ -310,8 +335,8 @@ // add "Default" style to the end // will be used if track does not contain a default style (or even does not contain styles at all) int sid = ass_alloc_style(track); - track->styles[sid].Name = strdup("Default"); - track->styles[sid].FontName = strdup("Arial"); + set_default_style(&track->styles[sid]); + track->default_style = sid; } for (i = 0; i < n_ignored; ++i) { @@ -470,6 +495,14 @@ q = format = strdup(track->style_format); + // Add default style first + if (track->n_styles == 0) { + // will be used if track does not contain a default style (or even does not contain styles at all) + int sid = ass_alloc_style(track); + set_default_style(&track->styles[sid]); + track->default_style = sid; + } + ass_msg(track->library, MSGL_V, "[%p] Style: %s", track, str); sid = ass_alloc_style(track); @@ -564,6 +597,12 @@ track->ScaledBorderAndShadow = parse_bool(str + 22); } else if (!strncmp(str, "Kerning:", 8)) { track->Kerning = parse_bool(str + 8); + } else if (!strncmp(str, "Language:", 9)) { + char *p = str + 9; + while (*p && isspace(*p)) p++; + track->Language = malloc(3); + strncpy(track->Language, p, 2); + track->Language[2] = 0; } return 0; } @@ -1238,3 +1277,36 @@ track->parser_priv = calloc(1, sizeof(ASS_ParserPriv)); return track; } + +/** + * \brief Prepare track for rendering + */ +void ass_lazy_track_init(ASS_Library *lib, ASS_Track *track) +{ + if (track->PlayResX && track->PlayResY) + return; + if (!track->PlayResX && !track->PlayResY) { + ass_msg(lib, MSGL_WARN, + "Neither PlayResX nor PlayResY defined. Assuming 384x288"); + track->PlayResX = 384; + track->PlayResY = 288; + } else { + if (!track->PlayResY && track->PlayResX == 1280) { + track->PlayResY = 1024; + ass_msg(lib, MSGL_WARN, + "PlayResY undefined, setting to %d", track->PlayResY); + } else if (!track->PlayResY) { + track->PlayResY = track->PlayResX * 3 / 4; + ass_msg(lib, MSGL_WARN, + "PlayResY undefined, setting to %d", track->PlayResY); + } else if (!track->PlayResX && track->PlayResY == 1024) { + track->PlayResX = 1280; + ass_msg(lib, MSGL_WARN, + "PlayResX undefined, setting to %d", track->PlayResX); + } else if (!track->PlayResX) { + track->PlayResX = track->PlayResY * 4 / 3; + ass_msg(lib, MSGL_WARN, + "PlayResX undefined, setting to %d", track->PlayResX); + } + } +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_cache.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_cache.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_cache.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_cache.c 2011-12-03 21:35:56.000000000 +0000 @@ -1,150 +1,55 @@ /* * Copyright (C) 2006 Evgeniy Stepanov + * Copyright (C) 2011 Grigori Goronzy * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "config.h" #include #include -#include FT_FREETYPE_H -#include FT_GLYPH_H - +#include FT_OUTLINE_H #include #include "ass_utils.h" -#include "ass.h" -#include "ass_fontconfig.h" #include "ass_font.h" -#include "ass_bitmap.h" #include "ass_cache.h" -static unsigned hashmap_hash(void *buf, size_t len) -{ - return fnv_32a_buf(buf, len, FNV1_32A_INIT); -} - -static int hashmap_key_compare(void *a, void *b, size_t size) -{ - return memcmp(a, b, size) == 0; -} - -static void hashmap_item_dtor(void *key, size_t key_size, void *value, - size_t value_size) -{ - free(key); - free(value); -} - -Hashmap *hashmap_init(ASS_Library *library, size_t key_size, - size_t value_size, int nbuckets, - HashmapItemDtor item_dtor, - HashmapKeyCompare key_compare, - HashmapHash hash) -{ - Hashmap *map = calloc(1, sizeof(Hashmap)); - map->library = library; - map->nbuckets = nbuckets; - map->key_size = key_size; - map->value_size = value_size; - map->root = calloc(nbuckets, sizeof(hashmap_item_p)); - map->item_dtor = item_dtor ? item_dtor : hashmap_item_dtor; - map->key_compare = key_compare ? key_compare : hashmap_key_compare; - map->hash = hash ? hash : hashmap_hash; - return map; -} - -void hashmap_done(Hashmap *map) -{ - int i; - // print stats - if (map->count > 0 || map->hit_count + map->miss_count > 0) - ass_msg(map->library, MSGL_V, - "cache statistics: \n total accesses: %d\n hits: %d\n " - "misses: %d\n object count: %d", - map->hit_count + map->miss_count, map->hit_count, - map->miss_count, map->count); - - for (i = 0; i < map->nbuckets; ++i) { - HashmapItem *item = map->root[i]; - while (item) { - HashmapItem *next = item->next; - map->item_dtor(item->key, map->key_size, item->value, - map->value_size); - free(item); - item = next; - } - } - free(map->root); - free(map); -} - -// does nothing if key already exists -void *hashmap_insert(Hashmap *map, void *key, void *value) -{ - unsigned hash = map->hash(key, map->key_size); - HashmapItem **next = map->root + (hash % map->nbuckets); - while (*next) { - if (map->key_compare(key, (*next)->key, map->key_size)) - return (*next)->value; - next = &((*next)->next); - assert(next); - } - (*next) = malloc(sizeof(HashmapItem)); - (*next)->key = malloc(map->key_size); - (*next)->value = malloc(map->value_size); - memcpy((*next)->key, key, map->key_size); - memcpy((*next)->value, value, map->value_size); - (*next)->next = 0; - - map->count++; - return (*next)->value; -} - -void *hashmap_find(Hashmap *map, void *key) -{ - unsigned hash = map->hash(key, map->key_size); - HashmapItem *item = map->root[hash % map->nbuckets]; - while (item) { - if (map->key_compare(key, item->key, map->key_size)) { - map->hit_count++; - return item->value; - } - item = item->next; - } - map->miss_count++; - return 0; -} +// type-specific functions +// create hash/compare functions for bitmap, outline and composite cache +#define CREATE_HASH_FUNCTIONS +#include "ass_cache_template.h" +#define CREATE_COMPARISON_FUNCTIONS +#include "ass_cache_template.h" -//--------------------------------- // font cache - -static unsigned font_desc_hash(void *buf, size_t len) +static unsigned font_hash(void *buf, size_t len) { ASS_FontDesc *desc = buf; unsigned hval; hval = fnv_32a_str(desc->family, FNV1_32A_INIT); hval = fnv_32a_buf(&desc->bold, sizeof(desc->bold), hval); hval = fnv_32a_buf(&desc->italic, sizeof(desc->italic), hval); + hval = fnv_32a_buf(&desc->treat_family_as_pattern, + sizeof(desc->treat_family_as_pattern), hval); + hval = fnv_32a_buf(&desc->vertical, sizeof(desc->vertical), hval); return hval; } -static int font_compare(void *key1, void *key2, size_t key_size) +static unsigned font_compare(void *key1, void *key2, size_t key_size) { ASS_FontDesc *a = key1; ASS_FontDesc *b = key2; @@ -161,227 +66,287 @@ return 1; } -static void font_hash_dtor(void *key, size_t key_size, void *value, - size_t value_size) +static void font_destruct(void *key, void *value) { ass_font_free(value); free(key); } -ASS_Font *ass_font_cache_find(Hashmap *font_cache, - ASS_FontDesc *desc) -{ - return hashmap_find(font_cache, desc); -} - -/** - * \brief Add a face struct to cache. - * \param font font struct -*/ -void *ass_font_cache_add(Hashmap *font_cache, ASS_Font *font) -{ - return hashmap_insert(font_cache, &(font->desc), font); -} - -Hashmap *ass_font_cache_init(ASS_Library *library) -{ - Hashmap *font_cache; - font_cache = hashmap_init(library, sizeof(ASS_FontDesc), - sizeof(ASS_Font), - 1000, - font_hash_dtor, font_compare, font_desc_hash); - return font_cache; -} - -void ass_font_cache_done(Hashmap *font_cache) -{ - hashmap_done(font_cache); -} - - -// Create hash/compare functions for bitmap and glyph -#define CREATE_HASH_FUNCTIONS -#include "ass_cache_template.h" -#define CREATE_COMPARISON_FUNCTIONS -#include "ass_cache_template.h" - -//--------------------------------- // bitmap cache - -static void bitmap_hash_dtor(void *key, size_t key_size, void *value, - size_t value_size) +static void bitmap_destruct(void *key, void *value) { BitmapHashValue *v = value; + BitmapHashKey *k = key; if (v->bm) ass_free_bitmap(v->bm); if (v->bm_o) ass_free_bitmap(v->bm_o); if (v->bm_s) ass_free_bitmap(v->bm_s); + if (k->type == BITMAP_CLIP) + free(k->u.clip.text); free(key); free(value); } -void *cache_add_bitmap(Hashmap *bitmap_cache, BitmapHashKey *key, - BitmapHashValue *val) +static size_t bitmap_size(void *value, size_t value_size) { - // Note: this is only an approximation + BitmapHashValue *val = value; if (val->bm_o) - bitmap_cache->cache_size += val->bm_o->w * val->bm_o->h * 3; + return val->bm_o->w * val->bm_o->h * 3; else if (val->bm) - bitmap_cache->cache_size += val->bm->w * val->bm->h * 3; - - return hashmap_insert(bitmap_cache, key, val); + return val->bm->w * val->bm->h * 3; + return 0; } -/** - * \brief Get a bitmap from bitmap cache. - * \param key hash key - * \return requested hash val or 0 if not found -*/ -BitmapHashValue *cache_find_bitmap(Hashmap *bitmap_cache, - BitmapHashKey *key) +static unsigned bitmap_hash(void *key, size_t key_size) { - return hashmap_find(bitmap_cache, key); + BitmapHashKey *k = key; + switch (k->type) { + case BITMAP_OUTLINE: return outline_bitmap_hash(&k->u, key_size); + case BITMAP_CLIP: return clip_bitmap_hash(&k->u, key_size); + default: return 0; + } } -Hashmap *ass_bitmap_cache_init(ASS_Library *library) +static unsigned bitmap_compare (void *a, void *b, size_t key_size) { - Hashmap *bitmap_cache; - bitmap_cache = hashmap_init(library, - sizeof(BitmapHashKey), - sizeof(BitmapHashValue), - 0xFFFF + 13, - bitmap_hash_dtor, bitmap_compare, - bitmap_hash); - return bitmap_cache; + BitmapHashKey *ak = a; + BitmapHashKey *bk = b; + if (ak->type != bk->type) return 0; + switch (ak->type) { + case BITMAP_OUTLINE: return outline_bitmap_compare(&ak->u, &bk->u, key_size); + case BITMAP_CLIP: return clip_bitmap_compare(&ak->u, &bk->u, key_size); + default: return 0; + } } -void ass_bitmap_cache_done(Hashmap *bitmap_cache) +// composite cache +static void composite_destruct(void *key, void *value) { - hashmap_done(bitmap_cache); + CompositeHashValue *v = value; + free(v->a); + free(v->b); + free(key); + free(value); } -Hashmap *ass_bitmap_cache_reset(Hashmap *bitmap_cache) -{ - ASS_Library *lib = bitmap_cache->library; +// outline cache - ass_bitmap_cache_done(bitmap_cache); - return ass_bitmap_cache_init(lib); +static unsigned outline_hash(void *key, size_t key_size) +{ + OutlineHashKey *k = key; + switch (k->type) { + case OUTLINE_GLYPH: return glyph_hash(&k->u, key_size); + case OUTLINE_DRAWING: return drawing_hash(&k->u, key_size); + default: return 0; + } } -//--------------------------------- -// glyph cache +static unsigned outline_compare(void *a, void *b, size_t key_size) +{ + OutlineHashKey *ak = a; + OutlineHashKey *bk = b; + if (ak->type != bk->type) return 0; + switch (ak->type) { + case OUTLINE_GLYPH: return glyph_compare(&ak->u, &bk->u, key_size); + case OUTLINE_DRAWING: return drawing_compare(&ak->u, &bk->u, key_size); + default: return 0; + } +} -static void glyph_hash_dtor(void *key, size_t key_size, void *value, - size_t value_size) +static void outline_destruct(void *key, void *value) { - GlyphHashValue *v = value; - if (v->glyph) - FT_Done_Glyph(v->glyph); - if (v->outline_glyph) - FT_Done_Glyph(v->outline_glyph); + OutlineHashValue *v = value; + OutlineHashKey *k = key; + if (v->outline) + outline_free(v->lib, v->outline); + if (v->border) + outline_free(v->lib, v->border); + if (k->type == OUTLINE_DRAWING) + free(k->u.drawing.text); free(key); free(value); } -void *cache_add_glyph(Hashmap *glyph_cache, GlyphHashKey *key, - GlyphHashValue *val) -{ - if (val->glyph && val->glyph->format == FT_GLYPH_FORMAT_BITMAP) { - FT_Bitmap *bitmap = &((FT_BitmapGlyph) val->glyph)->bitmap; - glyph_cache->cache_size += bitmap->rows * bitmap->pitch; - } - return hashmap_insert(glyph_cache, key, val); + +// Cache data +typedef struct cache_item { + void *key; + void *value; + struct cache_item *next; +} CacheItem; + +struct cache { + unsigned buckets; + CacheItem **map; + + HashFunction hash_func; + ItemSize size_func; + HashCompare compare_func; + CacheItemDestructor destruct_func; + size_t key_size; + size_t value_size; + + size_t cache_size; + unsigned hits; + unsigned misses; + unsigned items; +}; + +// Hash for a simple (single value or array) type +static unsigned hash_simple(void *key, size_t key_size) +{ + return fnv_32a_buf(key, key_size, FNV1_32A_INIT); } -/** - * \brief Get a glyph from glyph cache. - * \param key hash key - * \return requested hash val or 0 if not found -*/ -GlyphHashValue *cache_find_glyph(Hashmap *glyph_cache, - GlyphHashKey *key) +// Comparison of a simple type +static unsigned compare_simple(void *a, void *b, size_t key_size) { - return hashmap_find(glyph_cache, key); + return memcmp(a, b, key_size) == 0; } -Hashmap *ass_glyph_cache_init(ASS_Library *library) +// Default destructor +static void destruct_simple(void *key, void *value) { - Hashmap *glyph_cache; - glyph_cache = hashmap_init(library, sizeof(GlyphHashKey), - sizeof(GlyphHashValue), - 0xFFFF + 13, - glyph_hash_dtor, glyph_compare, glyph_hash); - return glyph_cache; + free(key); + free(value); } -void ass_glyph_cache_done(Hashmap *glyph_cache) + +// Create a cache with type-specific hash/compare/destruct/size functions +Cache *ass_cache_create(HashFunction hash_func, HashCompare compare_func, + CacheItemDestructor destruct_func, ItemSize size_func, + size_t key_size, size_t value_size) +{ + Cache *cache = calloc(1, sizeof(*cache)); + cache->buckets = 0xFFFF; + cache->hash_func = hash_simple; + cache->compare_func = compare_simple; + cache->destruct_func = destruct_simple; + cache->size_func = size_func; + if (hash_func) + cache->hash_func = hash_func; + if (compare_func) + cache->compare_func = compare_func; + if (destruct_func) + cache->destruct_func = destruct_func; + cache->key_size = key_size; + cache->value_size = value_size; + cache->map = calloc(cache->buckets, sizeof(CacheItem *)); + + return cache; +} + +void *ass_cache_put(Cache *cache, void *key, void *value) +{ + unsigned bucket = cache->hash_func(key, cache->key_size) % cache->buckets; + CacheItem **item = &cache->map[bucket]; + while (*item) + item = &(*item)->next; + (*item) = calloc(1, sizeof(CacheItem)); + (*item)->key = malloc(cache->key_size); + (*item)->value = malloc(cache->value_size); + memcpy((*item)->key, key, cache->key_size); + memcpy((*item)->value, value, cache->value_size); + + cache->items++; + if (cache->size_func) + cache->cache_size += cache->size_func(value, cache->value_size); + else + cache->cache_size++; + + return (*item)->value; +} + +void *ass_cache_get(Cache *cache, void *key) { - hashmap_done(glyph_cache); + unsigned bucket = cache->hash_func(key, cache->key_size) % cache->buckets; + CacheItem *item = cache->map[bucket]; + while (item) { + if (cache->compare_func(key, item->key, cache->key_size)) { + cache->hits++; + return item->value; + } + item = item->next; + } + cache->misses++; + return NULL; } -Hashmap *ass_glyph_cache_reset(Hashmap *glyph_cache) +int ass_cache_empty(Cache *cache, size_t max_size) { - ASS_Library *lib = glyph_cache->library; + int i; - ass_glyph_cache_done(glyph_cache); - return ass_glyph_cache_init(lib); -} + if (cache->cache_size < max_size) + return 0; + + for (i = 0; i < cache->buckets; i++) { + CacheItem *item = cache->map[i]; + while (item) { + CacheItem *next = item->next; + cache->destruct_func(item->key, item->value); + free(item); + item = next; + } + cache->map[i] = NULL; + } + cache->items = cache->hits = cache->misses = cache->cache_size = 0; -//--------------------------------- -// composite cache + return 1; +} -static void composite_hash_dtor(void *key, size_t key_size, void *value, - size_t value_size) +void ass_cache_stats(Cache *cache, size_t *size, unsigned *hits, + unsigned *misses, unsigned *count) { - CompositeHashValue *v = value; - free(v->a); - free(v->b); - free(key); - free(value); + if (size) + *size = cache->cache_size; + if (hits) + *hits = cache->hits; + if (misses) + *misses = cache->misses; + if (count) + *count = cache->items; } -void *cache_add_composite(Hashmap *composite_cache, - CompositeHashKey *key, - CompositeHashValue *val) +void ass_cache_done(Cache *cache) { - return hashmap_insert(composite_cache, key, val); + ass_cache_empty(cache, 0); + free(cache->map); + free(cache); } -/** - * \brief Get a composite bitmap from composite cache. - * \param key hash key - * \return requested hash val or 0 if not found -*/ -CompositeHashValue *cache_find_composite(Hashmap *composite_cache, - CompositeHashKey *key) +// Type-specific creation function +Cache *ass_font_cache_create(void) { - return hashmap_find(composite_cache, key); + return ass_cache_create(font_hash, font_compare, font_destruct, + (ItemSize)NULL, sizeof(ASS_FontDesc), sizeof(ASS_Font)); } -Hashmap *ass_composite_cache_init(ASS_Library *library) +Cache *ass_outline_cache_create(void) { - Hashmap *composite_cache; - composite_cache = hashmap_init(library, sizeof(CompositeHashKey), - sizeof(CompositeHashValue), - 0xFFFF + 13, - composite_hash_dtor, composite_compare, - composite_hash); - return composite_cache; + return ass_cache_create(outline_hash, outline_compare, outline_destruct, + NULL, sizeof(OutlineHashKey), sizeof(OutlineHashValue)); } -void ass_composite_cache_done(Hashmap *composite_cache) +Cache *ass_glyph_metrics_cache_create(void) { - hashmap_done(composite_cache); + return ass_cache_create(glyph_metrics_hash, glyph_metrics_compare, NULL, + (ItemSize) NULL, sizeof(GlyphMetricsHashKey), + sizeof(GlyphMetricsHashValue)); } -Hashmap *ass_composite_cache_reset(Hashmap *composite_cache) +Cache *ass_bitmap_cache_create(void) { - ASS_Library *lib = composite_cache->library; + return ass_cache_create(bitmap_hash, bitmap_compare, bitmap_destruct, + bitmap_size, sizeof(BitmapHashKey), sizeof(BitmapHashValue)); +} - ass_composite_cache_done(composite_cache); - return ass_composite_cache_init(lib); +Cache *ass_composite_cache_create(void) +{ + return ass_cache_create(composite_hash, composite_compare, + composite_destruct, (ItemSize)NULL, sizeof(CompositeHashKey), + sizeof(CompositeHashValue)); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_cache.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_cache.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_cache.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_cache.h 2011-12-03 21:35:56.000000000 +0000 @@ -1,21 +1,20 @@ /* * Copyright (C) 2006 Evgeniy Stepanov + * Copyright (C) 2011 Grigori Goronzy * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef LIBASS_CACHE_H @@ -25,51 +24,9 @@ #include "ass_font.h" #include "ass_bitmap.h" -typedef void (*HashmapItemDtor) (void *key, size_t key_size, - void *value, size_t value_size); -typedef int (*HashmapKeyCompare) (void *key1, void *key2, - size_t key_size); -typedef unsigned (*HashmapHash) (void *key, size_t key_size); - -typedef struct hashmap_item { - void *key; - void *value; - struct hashmap_item *next; -} HashmapItem; -typedef HashmapItem *hashmap_item_p; - -typedef struct { - int nbuckets; - size_t key_size, value_size; - hashmap_item_p *root; - HashmapItemDtor item_dtor; // a destructor for hashmap key/value pairs - HashmapKeyCompare key_compare; - HashmapHash hash; - size_t cache_size; - // stats - int hit_count; - int miss_count; - int count; - ASS_Library *library; -} Hashmap; - -Hashmap *hashmap_init(ASS_Library *library, size_t key_size, - size_t value_size, int nbuckets, - HashmapItemDtor item_dtor, - HashmapKeyCompare key_compare, - HashmapHash hash); -void hashmap_done(Hashmap *map); -void *hashmap_insert(Hashmap *map, void *key, void *value); -void *hashmap_find(Hashmap *map, void *key); - -Hashmap *ass_font_cache_init(ASS_Library *library); -ASS_Font *ass_font_cache_find(Hashmap *, ASS_FontDesc *desc); -void *ass_font_cache_add(Hashmap *, ASS_Font *font); -void ass_font_cache_done(Hashmap *); +typedef struct cache Cache; -// Create definitions for bitmap_hash_key and glyph_hash_key -#define CREATE_STRUCT_DEFINITIONS -#include "ass_cache_template.h" +// cache values typedef struct { Bitmap *bm; // the actual bitmaps @@ -77,43 +34,71 @@ Bitmap *bm_s; } BitmapHashValue; -Hashmap *ass_bitmap_cache_init(ASS_Library *library); -void *cache_add_bitmap(Hashmap *, BitmapHashKey *key, - BitmapHashValue *val); -BitmapHashValue *cache_find_bitmap(Hashmap *bitmap_cache, - BitmapHashKey *key); -Hashmap *ass_bitmap_cache_reset(Hashmap *bitmap_cache); -void ass_bitmap_cache_done(Hashmap *bitmap_cache); - - typedef struct { unsigned char *a; unsigned char *b; } CompositeHashValue; -Hashmap *ass_composite_cache_init(ASS_Library *library); -void *cache_add_composite(Hashmap *, CompositeHashKey *key, - CompositeHashValue *val); -CompositeHashValue *cache_find_composite(Hashmap *composite_cache, - CompositeHashKey *key); -Hashmap *ass_composite_cache_reset(Hashmap *composite_cache); -void ass_composite_cache_done(Hashmap *composite_cache); - - typedef struct { - FT_Glyph glyph; - FT_Glyph outline_glyph; + FT_Library lib; + FT_Outline *outline; + FT_Outline *border; FT_BBox bbox_scaled; // bbox after scaling, but before rotation - FT_Vector advance; // 26.6, advance distance to the next bitmap in line - int asc, desc; // ascender/descender of a drawing -} GlyphHashValue; - -Hashmap *ass_glyph_cache_init(ASS_Library *library); -void *cache_add_glyph(Hashmap *, GlyphHashKey *key, - GlyphHashValue *val); -GlyphHashValue *cache_find_glyph(Hashmap *glyph_cache, - GlyphHashKey *key); -Hashmap *ass_glyph_cache_reset(Hashmap *glyph_cache); -void ass_glyph_cache_done(Hashmap *glyph_cache); + FT_Vector advance; // 26.6, advance distance to the next outline in line + int asc, desc; // ascender/descender +} OutlineHashValue; + +typedef struct { + FT_Glyph_Metrics metrics; +} GlyphMetricsHashValue; + +// Create definitions for bitmap, outline and composite hash keys +#define CREATE_STRUCT_DEFINITIONS +#include "ass_cache_template.h" + +// Type-specific function pointers +typedef unsigned(*HashFunction)(void *key, size_t key_size); +typedef size_t(*ItemSize)(void *value, size_t value_size); +typedef unsigned(*HashCompare)(void *a, void *b, size_t key_size); +typedef void(*CacheItemDestructor)(void *key, void *value); + +// cache hash keys + +typedef struct outline_hash_key { + enum { + OUTLINE_GLYPH, + OUTLINE_DRAWING, + } type; + union { + GlyphHashKey glyph; + DrawingHashKey drawing; + } u; +} OutlineHashKey; + +typedef struct bitmap_hash_key { + enum { + BITMAP_OUTLINE, + BITMAP_CLIP, + } type; + union { + OutlineBitmapHashKey outline; + ClipMaskHashKey clip; + } u; +} BitmapHashKey; + +Cache *ass_cache_create(HashFunction hash_func, HashCompare compare_func, + CacheItemDestructor destruct_func, ItemSize size_func, + size_t key_size, size_t value_size); +void *ass_cache_put(Cache *cache, void *key, void *value); +void *ass_cache_get(Cache *cache, void *key); +int ass_cache_empty(Cache *cache, size_t max_size); +void ass_cache_stats(Cache *cache, size_t *size, unsigned *hits, + unsigned *misses, unsigned *count); +void ass_cache_done(Cache *cache); +Cache *ass_font_cache_create(void); +Cache *ass_outline_cache_create(void); +Cache *ass_glyph_metrics_cache_create(void); +Cache *ass_bitmap_cache_create(void); +Cache *ass_composite_cache_create(void); #endif /* LIBASS_CACHE_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_cache_template.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_cache_template.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_cache_template.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_cache_template.h 2011-12-03 21:35:56.000000000 +0000 @@ -4,6 +4,8 @@ typedef struct structname { #define GENERIC(type, member) \ type member; +#define STRING(member) \ + char *member; #define FTVECTOR(member) \ FT_Vector member; #define BITMAPHASHKEY(member) \ @@ -14,13 +16,15 @@ #elif defined(CREATE_COMPARISON_FUNCTIONS) #undef CREATE_COMPARISON_FUNCTIONS #define START(funcname, structname) \ - static int funcname##_compare(void *key1, void *key2, size_t key_size) \ + static unsigned funcname##_compare(void *key1, void *key2, size_t key_size) \ { \ struct structname *a = key1; \ struct structname *b = key2; \ return // conditions follow #define GENERIC(type, member) \ a->member == b->member && +#define STRING(member) \ + strcmp(a->member, b->member) == 0 && #define FTVECTOR(member) \ a->member.x == b->member.x && a->member.y == b->member.y && #define BITMAPHASHKEY(member) \ @@ -38,6 +42,8 @@ unsigned hval = FNV1_32A_INIT; #define GENERIC(type, member) \ hval = fnv_32a_buf(&p->member, sizeof(p->member), hval); +#define STRING(member) \ + hval = fnv_32a_str(p->member, hval); #define FTVECTOR(member) GENERIC(, member.x); GENERIC(, member.y); #define BITMAPHASHKEY(member) { \ unsigned temp = bitmap_hash(&p->member, sizeof(p->member)); \ @@ -53,19 +59,11 @@ -// describes a bitmap; bitmaps with equivalents structs are considered identical -START(bitmap, bitmap_hash_key) - GENERIC(char, bitmap) // bool : true = bitmap, false = outline - GENERIC(ASS_Font *, font) - GENERIC(double, size) // font size - GENERIC(uint32_t, ch) // character code - FTVECTOR(outline) // border width, 16.16 fixed point value - GENERIC(int, bold) - GENERIC(int, italic) +// describes an outline bitmap +START(outline_bitmap, outline_bitmap_hash_key) + GENERIC(OutlineHashValue *, outline) GENERIC(char, be) // blur edges GENERIC(double, blur) // gaussian blur - GENERIC(unsigned, scale_x) // 16.16 - GENERIC(unsigned, scale_y) // 16.16 GENERIC(int, frx) // signed 16.16 GENERIC(int, fry) // signed 16.16 GENERIC(int, frz) // signed 16.16 @@ -78,26 +76,49 @@ GENERIC(int, shift_y) FTVECTOR(advance) // subpixel shift vector FTVECTOR(shadow_offset) // shadow subpixel shift - GENERIC(unsigned, drawing_hash) // hashcode of a drawing - GENERIC(unsigned, flags) // glyph decoration - GENERIC(unsigned, border_style) -END(BitmapHashKey) +END(OutlineBitmapHashKey) + +// describe a clip mask bitmap +START(clip_bitmap, clip_bitmap_hash_key) + STRING(text) +END(ClipMaskHashKey) // describes an outline glyph START(glyph, glyph_hash_key) GENERIC(ASS_Font *, font) GENERIC(double, size) // font size - GENERIC(uint32_t, ch) // character code + GENERIC(int, face_index) + GENERIC(int, glyph_index) GENERIC(int, bold) GENERIC(int, italic) GENERIC(unsigned, scale_x) // 16.16 GENERIC(unsigned, scale_y) // 16.16 FTVECTOR(outline) // border width, 16.16 - GENERIC(unsigned, drawing_hash) // hashcode of a drawing GENERIC(unsigned, flags) // glyph decoration flags GENERIC(unsigned, border_style) END(GlyphHashKey) +START(glyph_metrics, glyph_metrics_hash_key) + GENERIC(ASS_Font *, font) + GENERIC(double, size) + GENERIC(int, face_index) + GENERIC(int, glyph_index) + GENERIC(unsigned, scale_x) + GENERIC(unsigned, scale_y) +END(GlyphMetricsHashKey) + +// describes an outline drawing +START(drawing, drawing_hash_key) + GENERIC(unsigned, scale_x) + GENERIC(unsigned, scale_y) + GENERIC(int, pbo) + FTVECTOR(outline) + GENERIC(unsigned, border_style) + GENERIC(int, scale) + GENERIC(unsigned, hash) + STRING(text) +END(DrawingHashKey) + // Cache for composited bitmaps START(composite, composite_hash_key) GENERIC(int, aw) @@ -117,6 +138,7 @@ #undef START #undef GENERIC +#undef STRING #undef FTVECTOR #undef BITMAPHASHKEY #undef END diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_drawing.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_drawing.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_drawing.c 2010-11-25 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_drawing.c 2011-12-03 21:35:56.000000000 +0000 @@ -17,13 +17,11 @@ */ #include -#include FT_GLYPH_H #include FT_OUTLINE_H #include FT_BBOX_H #include #include "ass_utils.h" -#include "ass_font.h" #include "ass_drawing.h" #define CURVE_ACCURACY 64.0 @@ -31,35 +29,12 @@ #define GLYPH_INITIAL_CONTOURS 5 /* - * \brief Get and prepare a FreeType glyph - */ -static void drawing_make_glyph(ASS_Drawing *drawing, void *fontconfig_priv, - ASS_Font *font) -{ - FT_OutlineGlyph glyph; - - // This is hacky... - glyph = (FT_OutlineGlyph) ass_font_get_glyph(fontconfig_priv, font, - (uint32_t) ' ', 0, 0); - if (glyph) { - FT_Outline_Done(drawing->ftlibrary, &glyph->outline); - FT_Outline_New(drawing->ftlibrary, GLYPH_INITIAL_POINTS, - GLYPH_INITIAL_CONTOURS, &glyph->outline); - - glyph->outline.n_contours = 0; - glyph->outline.n_points = 0; - glyph->root.advance.x = glyph->root.advance.y = 0; - } - drawing->glyph = glyph; -} - -/* * \brief Add a single point to a contour. */ static inline void drawing_add_point(ASS_Drawing *drawing, FT_Vector *point) { - FT_Outline *ol = &drawing->glyph->outline; + FT_Outline *ol = &drawing->outline; if (ol->n_points >= drawing->max_points) { drawing->max_points *= 2; @@ -75,11 +50,11 @@ } /* - * \brief Close a contour and check glyph size overflow. + * \brief Close a contour and check outline size overflow. */ static inline void drawing_close_shape(ASS_Drawing *drawing) { - FT_Outline *ol = &drawing->glyph->outline; + FT_Outline *ol = &drawing->outline; if (ol->n_contours >= drawing->max_contours) { drawing->max_contours *= 2; @@ -107,25 +82,26 @@ /* * \brief Finish a drawing. This only sets the horizontal advance according - * to the glyph's bbox at the moment. + * to the outline's bbox at the moment. */ static void drawing_finish(ASS_Drawing *drawing, int raw_mode) { int i, offset; FT_BBox bbox = drawing->cbox; - FT_Outline *ol = &drawing->glyph->outline; + FT_Outline *ol = &drawing->outline; // Close the last contour drawing_close_shape(drawing); - ass_msg(drawing->library, MSGL_V, - "Parsed drawing with %d points and %d contours", ol->n_points, - ol->n_contours); + if (drawing->library) + ass_msg(drawing->library, MSGL_V, + "Parsed drawing with %d points and %d contours", ol->n_points, + ol->n_contours); if (raw_mode) return; - drawing->glyph->root.advance.x = d6_to_d16(bbox.xMax - bbox.xMin); + drawing->advance.x = bbox.xMax - bbox.xMin; drawing->desc = double_to_d6(-drawing->pbo * drawing->scale_y); drawing->asc = bbox.yMax - bbox.yMin + drawing->desc; @@ -354,8 +330,7 @@ /* * \brief Create and initialize a new drawing and return it */ -ASS_Drawing *ass_drawing_new(void *fontconfig_priv, ASS_Font *font, - FT_Library lib) +ASS_Drawing *ass_drawing_new(ASS_Library *lib, FT_Library ftlib) { ASS_Drawing *drawing; @@ -364,16 +339,18 @@ drawing->size = DRAWING_INITIAL_SIZE; drawing->cbox.xMin = drawing->cbox.yMin = INT_MAX; drawing->cbox.xMax = drawing->cbox.yMax = INT_MIN; - drawing->fontconfig_priv = fontconfig_priv; - drawing->font = font; - drawing->ftlibrary = lib; - drawing->library = font ? font->library : NULL; - + drawing->ftlibrary = ftlib; + drawing->library = lib; drawing->scale_x = 1.; drawing->scale_y = 1.; drawing->max_contours = GLYPH_INITIAL_CONTOURS; drawing->max_points = GLYPH_INITIAL_POINTS; + FT_Outline_New(drawing->ftlibrary, GLYPH_INITIAL_POINTS, + GLYPH_INITIAL_CONTOURS, &drawing->outline); + drawing->outline.n_contours = 0; + drawing->outline.n_points = 0; + return drawing; } @@ -384,6 +361,7 @@ { if (drawing) { free(drawing->text); + FT_Outline_Done(drawing->ftlibrary, &drawing->outline); } free(drawing); } @@ -414,17 +392,12 @@ /* * \brief Convert token list to outline. Calls the line and curve evaluators. */ -FT_OutlineGlyph *ass_drawing_parse(ASS_Drawing *drawing, int raw_mode) +FT_Outline *ass_drawing_parse(ASS_Drawing *drawing, int raw_mode) { int started = 0; ASS_DrawingToken *token; FT_Vector pen = {0, 0}; - if (drawing->font) - drawing_make_glyph(drawing, drawing->fontconfig_priv, drawing->font); - if (!drawing->glyph) - return NULL; - drawing->tokens = drawing_tokenize(drawing->text); drawing_prepare(drawing); @@ -484,5 +457,5 @@ drawing_finish(drawing, raw_mode); drawing_free_tokens(drawing->tokens); - return &drawing->glyph; + return &drawing->outline; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_drawing.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_drawing.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_drawing.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_drawing.h 2011-12-03 21:35:56.000000000 +0000 @@ -20,7 +20,7 @@ #define LIBASS_DRAWING_H #include -#include FT_GLYPH_H +#include FT_OUTLINE_H #include "ass.h" @@ -53,13 +53,12 @@ double scale_y; // FontScaleY int asc; // ascender int desc; // descender - FT_OutlineGlyph glyph; // the "fake" glyph created for later rendering + FT_Outline outline; // target outline + FT_Vector advance; // advance (from cbox) int hash; // hash value (for caching) // private FT_Library ftlibrary; // needed for font ops - ASS_Font *font; // dito - void *fontconfig_priv; // dito ASS_Library *library; int size; // current buffer size ASS_DrawingToken *tokens; // tokenized drawing @@ -70,11 +69,10 @@ FT_BBox cbox; // bounding box, or let's say... VSFilter's idea of it } ASS_Drawing; -ASS_Drawing *ass_drawing_new(void *fontconfig_priv, ASS_Font *font, - FT_Library lib); +ASS_Drawing *ass_drawing_new(ASS_Library *lib, FT_Library ftlib); void ass_drawing_free(ASS_Drawing* drawing); void ass_drawing_add_char(ASS_Drawing* drawing, char symbol); void ass_drawing_hash(ASS_Drawing* drawing); -FT_OutlineGlyph *ass_drawing_parse(ASS_Drawing *drawing, int raw_mode); +FT_Outline *ass_drawing_parse(ASS_Drawing *drawing, int raw_mode); #endif /* LIBASS_DRAWING_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_font.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_font.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_font.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_font.c 2011-12-03 21:35:56.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "config.h" @@ -32,12 +30,9 @@ #include "ass.h" #include "ass_library.h" #include "ass_font.h" -#include "ass_bitmap.h" -#include "ass_cache.h" #include "ass_fontconfig.h" #include "ass_utils.h" - -#define VERTICAL_LOWER_BOUND 0x02f1 +#include "ass_shaper.h" /** * Select a good charmap, prefer Microsoft Unicode charmaps. @@ -93,8 +88,6 @@ return -1; } -static void face_set_size(FT_Face face, double size); - static void buggy_font_workaround(FT_Face face) { // Some fonts have zero Ascender/Descender fields in 'hhea' table. @@ -163,7 +156,7 @@ buggy_font_workaround(face); font->faces[font->n_faces++] = face; - face_set_size(face, font->size); + ass_face_set_size(face, font->size); free(path); return font->n_faces - 1; } @@ -171,7 +164,7 @@ /** * \brief Create a new ASS_Font according to "desc" argument */ -ASS_Font *ass_font_new(void *font_cache, ASS_Library *library, +ASS_Font *ass_font_new(Cache *font_cache, ASS_Library *library, FT_Library ftlibrary, void *fc_priv, ASS_FontDesc *desc) { @@ -179,12 +172,13 @@ ASS_Font *fontp; ASS_Font font; - fontp = ass_font_cache_find((Hashmap *) font_cache, desc); + fontp = ass_cache_get(font_cache, desc); if (fontp) return fontp; font.library = library; font.ftlibrary = ftlibrary; + font.shaper_priv = NULL; font.n_faces = 0; font.desc.family = strdup(desc->family); font.desc.treat_family_as_pattern = desc->treat_family_as_pattern; @@ -201,7 +195,7 @@ free(font.desc.family); return 0; } else - return ass_font_cache_add((Hashmap *) font_cache, &font); + return ass_cache_put(font_cache, &font.desc, &font); } /** @@ -218,7 +212,7 @@ } } -static void face_set_size(FT_Face face, double size) +void ass_face_set_size(FT_Face face, double size) { TT_HoriHeader *hori = FT_Get_Sfnt_Table(face, ft_sfnt_hhea); TT_OS2 *os2 = FT_Get_Sfnt_Table(face, ft_sfnt_os2); @@ -253,7 +247,7 @@ if (font->size != size) { font->size = size; for (i = 0; i < font->n_faces; ++i) - face_set_size(font->faces[i], size); + ass_face_set_size(font->faces[i], size); } } @@ -278,9 +272,6 @@ *asc = FT_MulFix(face->ascender, y_scale); *desc = FT_MulFix(-face->descender, y_scale); } - if (font->desc.vertical && ch >= VERTICAL_LOWER_BOUND) { - *asc = FT_MulFix(face->max_advance_width, y_scale); - } return; } } @@ -390,6 +381,25 @@ return 0; } +void outline_copy(FT_Library lib, FT_Outline *source, FT_Outline **dest) +{ + if (source == NULL) { + *dest = NULL; + return; + } + *dest = calloc(1, sizeof(**dest)); + + FT_Outline_New(lib, source->n_points, source->n_contours, *dest); + FT_Outline_Copy(source, *dest); +} + +void outline_free(FT_Library lib, FT_Outline *outline) +{ + if (outline) + FT_Outline_Done(lib, outline); + free(outline); +} + /** * Slightly embold a glyph without touching its metrics */ @@ -407,33 +417,43 @@ } /** - * \brief Get a glyph - * \param ch character code - **/ -FT_Glyph ass_font_get_glyph(void *fontconfig_priv, ASS_Font *font, - uint32_t ch, ASS_Hinting hinting, int deco) + * \brief Get glyph and face index + * Finds a face that has the requested codepoint and returns both face + * and glyph index. + */ +int ass_font_get_index(void *fcpriv, ASS_Font *font, uint32_t symbol, + int *face_index, int *glyph_index) { - int error; int index = 0; int i; - FT_Glyph glyph; FT_Face face = 0; - int flags = 0; - int vertical = font->desc.vertical; - if (ch < 0x20) + *glyph_index = 0; + + if (symbol < 0x20) { + *face_index = 0; return 0; + } // Handle NBSP like a regular space when rendering the glyph - if (ch == 0xa0) - ch = ' '; - if (font->n_faces == 0) + if (symbol == 0xa0) + symbol = ' '; + if (font->n_faces == 0) { + *face_index = 0; return 0; + } - for (i = 0; i < font->n_faces; ++i) { + // try with the requested face + if (*face_index < font->n_faces) { + face = font->faces[*face_index]; + index = FT_Get_Char_Index(face, symbol); + } + + // not found in requested face, try all others + for (i = 0; i < font->n_faces && index == 0; ++i) { face = font->faces[i]; - index = FT_Get_Char_Index(face, ch); + index = FT_Get_Char_Index(face, symbol); if (index) - break; + *face_index = i; } #ifdef CONFIG_FONTCONFIG @@ -441,29 +461,50 @@ int face_idx; ass_msg(font->library, MSGL_INFO, "Glyph 0x%X not found, selecting one more " - "font for (%s, %d, %d)", ch, font->desc.family, + "font for (%s, %d, %d)", symbol, font->desc.family, font->desc.bold, font->desc.italic); - face_idx = add_face(fontconfig_priv, font, ch); + face_idx = *face_index = add_face(fcpriv, font, symbol); if (face_idx >= 0) { face = font->faces[face_idx]; - index = FT_Get_Char_Index(face, ch); + index = FT_Get_Char_Index(face, symbol); if (index == 0 && face->num_charmaps > 0) { + int i; ass_msg(font->library, MSGL_WARN, - "Glyph 0x%X not found, falling back to first charmap", ch); - FT_CharMap cur = face->charmap; - FT_Set_Charmap(face, face->charmaps[0]); - index = FT_Get_Char_Index(face, ch); - FT_Set_Charmap(face, cur); + "Glyph 0x%X not found, broken font? Trying all charmaps", symbol); + for (i = 0; i < face->num_charmaps; i++) { + FT_Set_Charmap(face, face->charmaps[i]); + if ((index = FT_Get_Char_Index(face, symbol)) != 0) break; + } } if (index == 0) { ass_msg(font->library, MSGL_ERR, "Glyph 0x%X not found in font for (%s, %d, %d)", - ch, font->desc.family, font->desc.bold, + symbol, font->desc.family, font->desc.bold, font->desc.italic); } } } #endif + // FIXME: make sure we have a valid face_index. this is a HACK. + *face_index = FFMAX(*face_index, 0); + *glyph_index = index; + + return 1; +} + +/** + * \brief Get a glyph + * \param ch character code + **/ +FT_Glyph ass_font_get_glyph(void *fontconfig_priv, ASS_Font *font, + uint32_t ch, int face_index, int index, + ASS_Hinting hinting, int deco) +{ + int error; + FT_Glyph glyph; + FT_Face face = font->faces[face_index]; + int flags = 0; + int vertical = font->desc.vertical; flags = FT_LOAD_NO_BITMAP | FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH | FT_LOAD_IGNORE_TRANSFORM; @@ -506,10 +547,16 @@ // Rotate glyph, if needed if (vertical && ch >= VERTICAL_LOWER_BOUND) { FT_Matrix m = { 0, double_to_d16(-1.0), double_to_d16(1.0), 0 }; + TT_OS2 *os2 = FT_Get_Sfnt_Table(face, ft_sfnt_os2); + int desc = 0; + + if (os2) + desc = FT_MulFix(os2->sTypoDescender, face->size->metrics.y_scale); + + FT_Outline_Translate(&((FT_OutlineGlyph) glyph)->outline, 0, -desc); FT_Outline_Transform(&((FT_OutlineGlyph) glyph)->outline, &m); FT_Outline_Translate(&((FT_OutlineGlyph) glyph)->outline, - face->glyph->metrics.vertAdvance, - 0); + face->glyph->metrics.vertAdvance, desc); glyph->advance.x = face->glyph->linearVertAdvance; } @@ -562,6 +609,8 @@ for (i = 0; i < font->n_faces; ++i) if (font->faces[i]) FT_Done_Face(font->faces[i]); + if (font->shaper_priv) + ass_shaper_font_data_free(font->shaper_priv); free(font->desc.family); free(font); } @@ -604,12 +653,24 @@ } /** - * \brief Fix-up stroker result for huge borders by removing inside contours - * that would reverse in size + * \brief Apply fixups to please the FreeType stroker and improve the + * rendering result, especially in case the outline has some anomalies. + * At the moment, the following fixes are done: + * + * 1. Reverse contours that have "inside" winding direction but are not + * contained in any other contours' cbox. + * 2. Remove "inside" contours depending on border size, so that large + * borders do not reverse the winding direction, which leads to "holes" + * inside the border. The inside will be filled by the border of the + * outside contour anyway in this case. + * + * \param outline FreeType outline, modified in-place + * \param border_x border size, x direction, d6 format + * \param border_x border size, y direction, d6 format */ -void fix_freetype_stroker(FT_OutlineGlyph glyph, int border_x, int border_y) +void fix_freetype_stroker(FT_Outline *outline, int border_x, int border_y) { - int nc = glyph->outline.n_contours; + int nc = outline->n_contours; int begin, stop; char modified = 0; char *valid_cont = malloc(nc); @@ -619,14 +680,14 @@ int i, j; int inside_direction; - inside_direction = FT_Outline_Get_Orientation(&glyph->outline) == + inside_direction = FT_Outline_Get_Orientation(outline) == FT_ORIENTATION_TRUETYPE; // create a list of cboxes of the contours for (i = 0; i < nc; i++) { start = end + 1; - end = glyph->outline.contours[i]; - get_contour_cbox(&boxes[i], glyph->outline.points, start, end); + end = outline->contours[i]; + get_contour_cbox(&boxes[i], outline->points, start, end); } // for each contour, check direction and whether it's "outside" @@ -634,8 +695,8 @@ end = -1; for (i = 0; i < nc; i++) { start = end + 1; - end = glyph->outline.contours[i]; - int dir = get_contour_direction(glyph->outline.points, start, end); + end = outline->contours[i]; + int dir = get_contour_direction(outline->points, start, end); valid_cont[i] = 1; if (dir == inside_direction) { for (j = 0; j < nc; j++) { @@ -651,19 +712,19 @@ * inside of - assume the font is buggy and it should be * an "outside" contour, and reverse it */ for (j = 0; j < (end + 1 - start) / 2; j++) { - FT_Vector temp = glyph->outline.points[start + j]; - char temp2 = glyph->outline.tags[start + j]; - glyph->outline.points[start + j] = glyph->outline.points[end - j]; - glyph->outline.points[end - j] = temp; - glyph->outline.tags[start + j] = glyph->outline.tags[end - j]; - glyph->outline.tags[end - j] = temp2; + FT_Vector temp = outline->points[start + j]; + char temp2 = outline->tags[start + j]; + outline->points[start + j] = outline->points[end - j]; + outline->points[end - j] = temp; + outline->tags[start + j] = outline->tags[end - j]; + outline->tags[end - j] = temp2; } dir ^= 1; } check_inside: if (dir == inside_direction) { FT_BBox box; - get_contour_cbox(&box, glyph->outline.points, start, end); + get_contour_cbox(&box, outline->points, start, end); int width = box.xMax - box.xMin; int height = box.yMax - box.yMin; if (width < border_x * 2 || height < border_y * 2) { @@ -673,19 +734,26 @@ } } - // zero-out contours that can be removed; much simpler than copying + // if we need to modify the outline, rewrite it and skip + // the contours that we determined should be removed. if (modified) { + int p = 0, c = 0; for (i = 0; i < nc; i++) { - if (valid_cont[i]) + if (!valid_cont[i]) continue; - begin = (i == 0) ? 0 : glyph->outline.contours[i - 1] + 1; - stop = glyph->outline.contours[i]; + begin = (i == 0) ? 0 : outline->contours[i - 1] + 1; + stop = outline->contours[i]; for (j = begin; j <= stop; j++) { - glyph->outline.points[j].x = 0; - glyph->outline.points[j].y = 0; - glyph->outline.tags[j] = 0; + outline->points[p].x = outline->points[j].x; + outline->points[p].y = outline->points[j].y; + outline->tags[p] = outline->tags[j]; + p++; } + outline->contours[c] = p - 1; + c++; } + outline->n_points = p; + outline->n_contours = c; } free(boxes); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_fontconfig.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_fontconfig.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_fontconfig.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_fontconfig.c 2011-09-11 10:33:13.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "config.h" @@ -524,7 +522,8 @@ if (priv) { #ifdef CONFIG_FONTCONFIG - FcConfigDestroy(priv->config); + if (priv->config) + FcConfigDestroy(priv->config); #endif free(priv->path_default); free(priv->family_default); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_fontconfig.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_fontconfig.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_fontconfig.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_fontconfig.h 2011-09-11 10:33:13.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef LIBASS_FONTCONFIG_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_font.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_font.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_font.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_font.h 2011-12-03 21:35:56.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef LIBASS_FONT_H @@ -24,13 +22,19 @@ #include #include #include FT_GLYPH_H +#include FT_OUTLINE_H + #include "ass.h" #include "ass_types.h" +#define VERTICAL_LOWER_BOUND 0x02f1 + #define ASS_FONT_MAX_FACES 10 #define DECO_UNDERLINE 1 #define DECO_STRIKETHROUGH 2 +typedef struct ass_shaper_font_data ASS_ShaperFontData; + typedef struct { char *family; unsigned bold; @@ -44,25 +48,33 @@ ASS_Library *library; FT_Library ftlibrary; FT_Face faces[ASS_FONT_MAX_FACES]; + ASS_ShaperFontData *shaper_priv; int n_faces; double scale_x, scale_y; // current transform FT_Vector v; // current shift double size; } ASS_Font; -// FIXME: passing the hashmap via a void pointer is very ugly. -ASS_Font *ass_font_new(void *font_cache, ASS_Library *library, +#include "ass_cache.h" + +ASS_Font *ass_font_new(Cache *font_cache, ASS_Library *library, FT_Library ftlibrary, void *fc_priv, ASS_FontDesc *desc); void ass_font_set_transform(ASS_Font *font, double scale_x, double scale_y, FT_Vector *v); +void ass_face_set_size(FT_Face face, double size); void ass_font_set_size(ASS_Font *font, double size); void ass_font_get_asc_desc(ASS_Font *font, uint32_t ch, int *asc, int *desc); +int ass_font_get_index(void *fcpriv, ASS_Font *font, uint32_t symbol, + int *face_index, int *glyph_index); FT_Glyph ass_font_get_glyph(void *fontconfig_priv, ASS_Font *font, - uint32_t ch, ASS_Hinting hinting, int flags); + uint32_t ch, int face_index, int index, + ASS_Hinting hinting, int deco); FT_Vector ass_font_get_kerning(ASS_Font *font, uint32_t c1, uint32_t c2); void ass_font_free(ASS_Font *font); -void fix_freetype_stroker(FT_OutlineGlyph glyph, int border_x, int border_y); +void fix_freetype_stroker(FT_Outline *outline, int border_x, int border_y); +void outline_copy(FT_Library lib, FT_Outline *source, FT_Outline **dest); +void outline_free(FT_Library lib, FT_Outline *outline); #endif /* LIBASS_FONT_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass.h 2011-12-03 21:35:56.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. - * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef LIBASS_ASS_H @@ -25,7 +23,7 @@ #include #include "ass_types.h" -#define LIBASS_VERSION 0x00911000 +#define LIBASS_VERSION 0x01000000 /* * A linked list of images produced by an ass renderer. @@ -63,6 +61,19 @@ } ASS_Hinting; /** + * \brief Text shaping levels. + * + * SIMPLE is a fast, font-agnostic shaper that can do only substitutions. + * COMPLEX is a slower shaper using OpenType for substitutions and positioning. + * + * libass uses the best shaper available by default. + */ +typedef enum { + ASS_SHAPING_SIMPLE = 0, + ASS_SHAPING_COMPLEX +} ASS_ShapingLevel; + +/** * \brief Initialize the library. * \return library handle or NULL if failed */ @@ -149,6 +160,13 @@ void ass_set_frame_size(ASS_Renderer *priv, int w, int h); /** + * \brief Set shaping level. This is merely a hint, the renderer will use + * whatever is available if the request cannot be fulfilled. + * \param level shaping level + */ +void ass_set_shaper(ASS_Renderer *priv, ASS_ShapingLevel level); + +/** * \brief Set frame margins. These values may be negative if pan-and-scan * is used. * \param priv renderer handle diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_library.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_library.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_library.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_library.c 2011-12-03 21:35:56.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "config.h" @@ -80,6 +78,7 @@ free(*p); } free(priv->style_overrides); + priv->style_overrides = NULL; if (!list) return; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_library.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_library.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_library.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_library.h 2011-09-11 10:33:13.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef LIBASS_LIBRARY_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_parse.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_parse.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_parse.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_parse.c 2011-12-03 21:35:56.000000000 +0000 @@ -47,17 +47,18 @@ return 0; } -static void change_font_size(ASS_Renderer *render_priv, double sz) +double ensure_font_size(ASS_Renderer *priv, double size) { - double size = sz * render_priv->font_scale; - if (size < 1) size = 1; - else if (size > render_priv->height * 2) - size = render_priv->height * 2; + else if (size > priv->height * 2) + size = priv->height * 2; - ass_font_set_size(render_priv->state.font, size); + return size; +} +static void change_font_size(ASS_Renderer *render_priv, double sz) +{ render_priv->state.font_size = sz; } @@ -189,17 +190,18 @@ { unsigned a; double cf; - if (now <= t1) { + + if (now < t1) { a = a1; } else if (now >= t4) { a = a3; - } else if (now < t2) { // and > t1 + } else if (now < t2 && t2 > t1) { cf = ((double) (now - t1)) / (t2 - t1); a = a1 * (1 - cf) + a2 * cf; - } else if (now > t3) { + } else if (now >= t3 && t4 > t3) { cf = ((double) (now - t3)) / (t4 - t3); a = a2 * (1 - cf) + a3 * cf; - } else { // t2 <= now <= t3 + } else { // t2 <= now < t3 a = a2; } @@ -216,13 +218,9 @@ int res = 0; ASS_Drawing *drawing = render_priv->state.clip_drawing; - if (drawing && drawing->glyph) - FT_Done_Glyph((FT_Glyph) drawing->glyph); ass_drawing_free(drawing); - render_priv->state.clip_drawing = ass_drawing_new( - render_priv->fontconfig_priv, - render_priv->state.font, - render_priv->ftlibrary); + render_priv->state.clip_drawing = + ass_drawing_new(render_priv->library, render_priv->ftlibrary); drawing = render_priv->state.clip_drawing; skipopt('('); res = mystrtoi(&p, &scale); @@ -259,6 +257,7 @@ else val = -1.; change_border(render_priv, val, render_priv->state.border_y); + render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "ybord")) { double val; if (mystrtod(&p, &val)) @@ -273,6 +272,7 @@ else val = 0.; render_priv->state.shadow_x = val; + render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "yshad")) { double val; if (mystrtod(&p, &val)) @@ -280,6 +280,7 @@ else val = 0.; render_priv->state.shadow_y = val; + render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "fax")) { double val; if (mystrtod(&p, &val)) @@ -331,6 +332,7 @@ render_priv->state.blur = val; } else render_priv->state.blur = 0.0; + render_priv->state.bm_run_id++; // ASS standard tags } else if (mystrcmp(&p, "fsc")) { char tp = *p++; @@ -359,6 +361,22 @@ render_priv->state.hspacing * (1 - pwr) + val * pwr; else render_priv->state.hspacing = render_priv->state.style->Spacing; + } else if (mystrcmp(&p, "fs+")) { + double val; + if (mystrtod(&p, &val)) { + val = render_priv->state.font_size + pwr * val; + } else + val = render_priv->state.style->FontSize; + if (render_priv->state.font) + change_font_size(render_priv, val); + } else if (mystrcmp(&p, "fs-")) { + double val; + if (mystrtod(&p, &val)) + val = render_priv->state.font_size - pwr * val; + else + val = render_priv->state.style->FontSize; + if (render_priv->state.font) + change_font_size(render_priv, val); } else if (mystrcmp(&p, "fs")) { double val; if (mystrtod(&p, &val)) @@ -375,6 +393,7 @@ } else val = -1.; // reset to default change_border(render_priv, val, val); + render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "move")) { double x1, x2, y1, y2; long long t1, t2, delta_t, t; @@ -476,6 +495,7 @@ change_alpha(&render_priv->state.c[3], render_priv->state.style->BackColour, pwr); } + render_priv->state.bm_run_id++; // FIXME: simplify } else if (mystrcmp(&p, "an")) { int val; @@ -487,16 +507,22 @@ val = ((val - 1) % 3) + 1; // horizontal alignment val += v * 4; ass_msg(render_priv->library, MSGL_DBG2, "align %d", val); - render_priv->state.alignment = val; + if ((render_priv->state.parsed_tags & PARSED_A) == 0) { + render_priv->state.alignment = val; + render_priv->state.parsed_tags |= PARSED_A; + } } else render_priv->state.alignment = render_priv->state.style->Alignment; } else if (mystrcmp(&p, "a")) { int val; - if (mystrtoi(&p, &val) && val) - // take care of a vsfilter quirk: handle illegal \a8 like \a5 - render_priv->state.alignment = (val == 8) ? 5 : val; - else + if (mystrtoi(&p, &val) && val) { + if ((render_priv->state.parsed_tags & PARSED_A) == 0) { + // take care of a vsfilter quirk: handle illegal \a8 like \a5 + render_priv->state.alignment = (val == 8) ? 5 : val; + render_priv->state.parsed_tags |= PARSED_A; + } + } else render_priv->state.alignment = render_priv->state.style->Alignment; } else if (mystrcmp(&p, "pos")) { @@ -550,10 +576,13 @@ mystrtoll(&p, &t4); } skip(')'); - render_priv->state.fade = - interpolate_alpha(render_priv->time - - render_priv->state.event->Start, t1, t2, - t3, t4, a1, a2, a3); + if ((render_priv->state.parsed_tags & PARSED_FADE) == 0) { + render_priv->state.fade = + interpolate_alpha(render_priv->time - + render_priv->state.event->Start, t1, t2, + t3, t4, a1, a2, a3); + render_priv->state.parsed_tags |= PARSED_FADE; + } } else if (mystrcmp(&p, "org")) { int v1, v2; skip('('); @@ -657,6 +686,7 @@ val = render_priv->state.style->PrimaryColour; ass_msg(render_priv->library, MSGL_DBG2, "color: %X", val); change_color(&render_priv->state.c[0], val, pwr); + render_priv->state.bm_run_id++; } else if ((*p >= '1') && (*p <= '4') && (++p) && (mystrcmp(&p, "c") || mystrcmp(&p, "a"))) { char n = *(p - 2); @@ -686,9 +716,11 @@ switch (cmd) { case 'c': change_color(render_priv->state.c + cidx, val, pwr); + render_priv->state.bm_run_id++; break; case 'a': change_alpha(render_priv->state.c + cidx, val >> 24, pwr); + render_priv->state.bm_run_id++; break; default: ass_msg(render_priv->library, MSGL_WARN, "Bad command: %c%c", @@ -708,6 +740,7 @@ render_priv->state.be = val; } else render_priv->state.be = 0; + render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "b")) { int b; if (mystrtoi(&p, &b)) { @@ -756,18 +789,21 @@ } else val = 0.; render_priv->state.shadow_x = render_priv->state.shadow_y = val; + render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "s")) { int val; if (mystrtoi(&p, &val) && val) render_priv->state.flags |= DECO_STRIKETHROUGH; else render_priv->state.flags &= ~DECO_STRIKETHROUGH; + render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "u")) { int val; if (mystrtoi(&p, &val) && val) render_priv->state.flags |= DECO_UNDERLINE; else render_priv->state.flags &= ~DECO_UNDERLINE; + render_priv->state.bm_run_id++; } else if (mystrcmp(&p, "pbo")) { double val = 0; if (mystrtod(&p, &val)) @@ -784,6 +820,11 @@ if (!mystrtoi(&p, &val)) val = render_priv->track->WrapStyle; render_priv->state.wrap_style = val; + } else if (mystrcmp(&p, "fe")) { + int val; + if (!mystrtoi(&p, &val)) + val = render_priv->state.style->Encoding; + render_priv->state.font_encoding = val; } return p; @@ -865,6 +906,77 @@ } /** + * \brief determine karaoke effects + * Karaoke effects cannot be calculated during parse stage (get_next_char()), + * so they are done in a separate step. + * Parse stage: when karaoke style override is found, its parameters are stored in the next glyph's + * (the first glyph of the karaoke word)'s effect_type and effect_timing. + * This function: + * 1. sets effect_type for all glyphs in the word (_karaoke_ word) + * 2. sets effect_timing for all glyphs to x coordinate of the border line between the left and right karaoke parts + * (left part is filled with PrimaryColour, right one - with SecondaryColour). + */ +void process_karaoke_effects(ASS_Renderer *render_priv) +{ + GlyphInfo *cur, *cur2; + GlyphInfo *s1, *e1; // start and end of the current word + GlyphInfo *s2; // start of the next word + int i; + int timing; // current timing + int tm_start, tm_end; // timings at start and end of the current word + int tm_current; + double dt; + int x; + int x_start, x_end; + + tm_current = render_priv->time - render_priv->state.event->Start; + timing = 0; + s1 = s2 = 0; + for (i = 0; i <= render_priv->text_info.length; ++i) { + cur = render_priv->text_info.glyphs + i; + if ((i == render_priv->text_info.length) + || (cur->effect_type != EF_NONE)) { + s1 = s2; + s2 = cur; + if (s1) { + e1 = s2 - 1; + tm_start = timing + s1->effect_skip_timing; + tm_end = tm_start + s1->effect_timing; + timing = tm_end; + x_start = 1000000; + x_end = -1000000; + for (cur2 = s1; cur2 <= e1; ++cur2) { + x_start = FFMIN(x_start, d6_to_int(cur2->bbox.xMin + cur2->pos.x)); + x_end = FFMAX(x_end, d6_to_int(cur2->bbox.xMax + cur2->pos.x)); + } + + dt = (tm_current - tm_start); + if ((s1->effect_type == EF_KARAOKE) + || (s1->effect_type == EF_KARAOKE_KO)) { + if (dt > 0) + x = x_end + 1; + else + x = x_start; + } else if (s1->effect_type == EF_KARAOKE_KF) { + dt /= (tm_end - tm_start); + x = x_start + (x_end - x_start) * dt; + } else { + ass_msg(render_priv->library, MSGL_ERR, + "Unknown effect type"); + continue; + } + + for (cur2 = s1; cur2 <= e1; ++cur2) { + cur2->effect_type = s1->effect_type; + cur2->effect_timing = x - d6_to_int(cur2->pos.x); + } + } + } + } +} + + +/** * \brief Get next ucs4 char from string, parsing and executing style overrides * \param str string pointer * \return ucs4 code of the next char diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_parse.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_parse.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_parse.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_parse.h 2011-12-03 21:35:56.000000000 +0000 @@ -27,9 +27,11 @@ #define _a(c) ((c) & 0xFF) void update_font(ASS_Renderer *render_priv); +double ensure_font_size(ASS_Renderer *priv, double size); void change_border(ASS_Renderer *render_priv, double border_x, double border_y); void apply_transition_effects(ASS_Renderer *render_priv, ASS_Event *event); +void process_karaoke_effects(ASS_Renderer *render_priv); unsigned get_next_char(ASS_Renderer *render_priv, char **str); extern void change_alpha(uint32_t *var, uint32_t new, double pwr); extern uint32_t mult_alpha(uint32_t a, uint32_t b); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_render_api.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_render_api.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_render_api.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_render_api.c 2011-12-03 21:35:56.000000000 +0000 @@ -4,19 +4,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "config.h" @@ -27,12 +25,9 @@ ASS_Settings *settings = &priv->settings; priv->render_id++; - priv->cache.glyph_cache = - ass_glyph_cache_reset(priv->cache.glyph_cache); - priv->cache.bitmap_cache = - ass_bitmap_cache_reset(priv->cache.bitmap_cache); - priv->cache.composite_cache = - ass_composite_cache_reset(priv->cache.composite_cache); + ass_cache_empty(priv->cache.outline_cache, 0); + ass_cache_empty(priv->cache.bitmap_cache, 0); + ass_cache_empty(priv->cache.composite_cache, 0); ass_free_images(priv->prev_images_root); priv->prev_images_root = 0; @@ -63,6 +58,17 @@ } } +void ass_set_shaper(ASS_Renderer *priv, ASS_ShapingLevel level) +{ +#ifdef CONFIG_HARFBUZZ + // select the complex shaper for illegal values + if (level == ASS_SHAPING_SIMPLE || level == ASS_SHAPING_COMPLEX) + priv->settings.shaper = level; + else + priv->settings.shaper = ASS_SHAPING_COMPLEX; +#endif +} + void ass_set_margins(ASS_Renderer *priv, int t, int b, int l, int r) { if (priv->settings.left_margin != l || priv->settings.right_margin != r || diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_render.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_render.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_render.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_render.c 2011-12-03 21:35:56.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "config.h" @@ -25,44 +23,13 @@ #include "ass_render.h" #include "ass_parse.h" +#include "ass_shaper.h" #define MAX_GLYPHS_INITIAL 1024 #define MAX_LINES_INITIAL 64 #define SUBPIXEL_MASK 63 #define SUBPIXEL_ACCURACY 7 -static void ass_lazy_track_init(ASS_Renderer *render_priv) -{ - ASS_Track *track = render_priv->track; - - if (track->PlayResX && track->PlayResY) - return; - if (!track->PlayResX && !track->PlayResY) { - ass_msg(render_priv->library, MSGL_WARN, - "Neither PlayResX nor PlayResY defined. Assuming 384x288"); - track->PlayResX = 384; - track->PlayResY = 288; - } else { - if (!track->PlayResY && track->PlayResX == 1280) { - track->PlayResY = 1024; - ass_msg(render_priv->library, MSGL_WARN, - "PlayResY undefined, setting to %d", track->PlayResY); - } else if (!track->PlayResY) { - track->PlayResY = track->PlayResX * 3 / 4; - ass_msg(render_priv->library, MSGL_WARN, - "PlayResY undefined, setting to %d", track->PlayResY); - } else if (!track->PlayResX && track->PlayResY == 1024) { - track->PlayResX = 1280; - ass_msg(render_priv->library, MSGL_WARN, - "PlayResX undefined, setting to %d", track->PlayResX); - } else if (!track->PlayResX) { - track->PlayResX = track->PlayResY * 4 / 3; - ass_msg(render_priv->library, MSGL_WARN, - "PlayResX undefined, setting to %d", track->PlayResX); - } - } -} - ASS_Renderer *ass_renderer_init(ASS_Library *library) { int error; @@ -77,10 +44,8 @@ } FT_Library_Version(ft, &vmajor, &vminor, &vpatch); - ass_msg(library, MSGL_V, "FreeType library version: %d.%d.%d", + ass_msg(library, MSGL_V, "Raster: FreeType %d.%d.%d", vmajor, vminor, vpatch); - ass_msg(library, MSGL_V, "FreeType headers version: %d.%d.%d", - FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH); priv = calloc(1, sizeof(ASS_Renderer)); if (!priv) { @@ -94,10 +59,10 @@ priv->ftlibrary = ft; // images_root and related stuff is zero-filled in calloc - priv->cache.font_cache = ass_font_cache_init(library); - priv->cache.bitmap_cache = ass_bitmap_cache_init(library); - priv->cache.composite_cache = ass_composite_cache_init(library); - priv->cache.glyph_cache = ass_glyph_cache_init(library); + priv->cache.font_cache = ass_font_cache_create(); + priv->cache.bitmap_cache = ass_bitmap_cache_create(); + priv->cache.composite_cache = ass_composite_cache_create(); + priv->cache.outline_cache = ass_outline_cache_create(); priv->cache.glyph_max = GLYPH_CACHE_MAX; priv->cache.bitmap_max_size = BITMAP_CACHE_MAX_SIZE; @@ -108,11 +73,19 @@ priv->settings.font_size_coeff = 1.; + priv->shaper = ass_shaper_new(0); + ass_shaper_info(library); +#ifdef CONFIG_HARFBUZZ + priv->settings.shaper = ASS_SHAPING_COMPLEX; +#else + priv->settings.shaper = ASS_SHAPING_SIMPLE; +#endif + ass_init_exit: if (priv) - ass_msg(library, MSGL_V, "Init"); + ass_msg(library, MSGL_V, "Initialized"); else - ass_msg(library, MSGL_ERR, "Init failed"); + ass_msg(library, MSGL_ERR, "Initialization failed"); return priv; } @@ -133,10 +106,10 @@ void ass_renderer_done(ASS_Renderer *render_priv) { - ass_font_cache_done(render_priv->cache.font_cache); - ass_bitmap_cache_done(render_priv->cache.bitmap_cache); - ass_composite_cache_done(render_priv->cache.composite_cache); - ass_glyph_cache_done(render_priv->cache.glyph_cache); + ass_cache_done(render_priv->cache.font_cache); + ass_cache_done(render_priv->cache.bitmap_cache); + ass_cache_done(render_priv->cache.composite_cache); + ass_cache_done(render_priv->cache.outline_cache); ass_free_images(render_priv->images_root); ass_free_images(render_priv->prev_images_root); @@ -151,6 +124,7 @@ fontconfig_done(render_priv->fontconfig_priv); if (render_priv->synth_priv) ass_synth_done(render_priv->synth_priv); + ass_shaper_free(render_priv->shaper); free(render_priv->eimg); free(render_priv->text_info.glyphs); free(render_priv->text_info.lines); @@ -330,18 +304,18 @@ // split up into left and right for karaoke, if needed if (lbrk > r[j].x0) { if (lbrk > r[j].x1) lbrk = r[j].x1; - img = my_draw_bitmap(bm->buffer + r[j].y0 * bm->w + r[j].x0, + img = my_draw_bitmap(bm->buffer + r[j].y0 * bm->stride + r[j].x0, lbrk - r[j].x0, r[j].y1 - r[j].y0, - bm->w, dst_x + r[j].x0, dst_y + r[j].y0, color); + bm->stride, dst_x + r[j].x0, dst_y + r[j].y0, color); if (!img) break; *tail = img; tail = &img->next; } if (lbrk < r[j].x1) { if (lbrk < r[j].x0) lbrk = r[j].x0; - img = my_draw_bitmap(bm->buffer + r[j].y0 * bm->w + lbrk, + img = my_draw_bitmap(bm->buffer + r[j].y0 * bm->stride + lbrk, r[j].x1 - lbrk, r[j].y1 - r[j].y0, - bm->w, dst_x + lbrk, dst_y + r[j].y0, color2); + bm->stride, dst_x + lbrk, dst_y + r[j].y0, color2); if (!img) break; *tail = img; tail = &img->next; @@ -421,8 +395,8 @@ if (brk > b_x0) { // draw left part if (brk > b_x1) brk = b_x1; - img = my_draw_bitmap(bm->buffer + bm->w * b_y0 + b_x0, - brk - b_x0, b_y1 - b_y0, bm->w, + img = my_draw_bitmap(bm->buffer + bm->stride * b_y0 + b_x0, + brk - b_x0, b_y1 - b_y0, bm->stride, dst_x + b_x0, dst_y + b_y0, color); if (!img) return tail; *tail = img; @@ -431,8 +405,8 @@ if (brk < b_x1) { // draw right part if (brk < b_x0) brk = b_x0; - img = my_draw_bitmap(bm->buffer + bm->w * b_y0 + brk, - b_x1 - brk, b_y1 - b_y0, bm->w, + img = my_draw_bitmap(bm->buffer + bm->stride * b_y0 + brk, + b_x1 - brk, b_y1 - b_y0, bm->stride, dst_x + brk, dst_y + b_y0, color2); if (!img) return tail; *tail = img; @@ -518,7 +492,7 @@ hk.by = by; hk.as = as; hk.bs = bs; - hv = cache_find_composite(render_priv->cache.composite_cache, &hk); + hv = ass_cache_get(render_priv->cache.composite_cache, &hk); if (hv) { (*last_tail)->bitmap = hv->a; (*tail)->bitmap = hv->b; @@ -541,7 +515,7 @@ // Insert bitmaps into the cache chv.a = (*last_tail)->bitmap; chv.b = (*tail)->bitmap; - cache_add_composite(render_priv->cache.composite_cache, &hk, &chv); + ass_cache_put(render_priv->cache.composite_cache, &hk, &chv); } static void free_list_add(ASS_Renderer *render_priv, void *object) @@ -566,32 +540,31 @@ static void blend_vector_clip(ASS_Renderer *render_priv, ASS_Image *head) { - FT_Glyph glyph; - FT_BitmapGlyph clip_bm; + FT_Outline *outline; + Bitmap *clip_bm = NULL; ASS_Image *cur; ASS_Drawing *drawing = render_priv->state.clip_drawing; - GlyphHashKey key; - GlyphHashValue *val; + BitmapHashKey key; + BitmapHashValue *val; int error; if (!drawing) return; // Try to get mask from cache - ass_drawing_hash(drawing); memset(&key, 0, sizeof(key)); - key.ch = -2; - key.drawing_hash = drawing->hash; - val = cache_find_glyph(render_priv->cache.glyph_cache, &key); + key.type = BITMAP_CLIP; + key.u.clip.text = drawing->text; + val = ass_cache_get(render_priv->cache.bitmap_cache, &key); if (val) { - clip_bm = (FT_BitmapGlyph) val->glyph; + clip_bm = val->bm; } else { - GlyphHashValue v; + BitmapHashValue v; // Not found in cache, parse and rasterize it - glyph = (FT_Glyph) *ass_drawing_parse(drawing, 1); - if (!glyph) { + outline = ass_drawing_parse(drawing, 1); + if (!outline) { ass_msg(render_priv->library, MSGL_WARN, "Clip vector parsing failed. Skipping."); goto blend_vector_error; @@ -604,37 +577,27 @@ .x = int_to_d6(render_priv->settings.left_margin), .y = -int_to_d6(render_priv->settings.top_margin), }; - FT_Outline_Translate(&drawing->glyph->outline, - trans.x, trans.y); - } - - // Check glyph bounding box size - if (check_glyph_area(render_priv->library, glyph)) { - FT_Done_Glyph(glyph); - glyph = 0; - goto blend_vector_error; + FT_Outline_Translate(outline, trans.x, trans.y); } ass_msg(render_priv->library, MSGL_DBG2, "Parsed vector clip: scales (%f, %f) string [%s]\n", drawing->scale_x, drawing->scale_y, drawing->text); - error = FT_Glyph_To_Bitmap(&glyph, FT_RENDER_MODE_NORMAL, 0, 1); - if (error) { + clip_bm = outline_to_bitmap(render_priv->library, + render_priv->ftlibrary, outline, 0); + if (clip_bm == NULL) { ass_msg(render_priv->library, MSGL_WARN, "Clip vector rasterization failed: %d. Skipping.", error); - FT_Done_Glyph(glyph); - glyph = 0; } -blend_vector_error: - clip_bm = (FT_BitmapGlyph) glyph; - // Add to cache memset(&v, 0, sizeof(v)); - v.glyph = glyph; - cache_add_glyph(render_priv->cache.glyph_cache, &key, &v); + key.u.clip.text = strdup(drawing->text); + v.bm = clip_bm; + ass_cache_put(render_priv->cache.bitmap_cache, &key, &v); } +blend_vector_error: if (!clip_bm) goto blend_vector_exit; @@ -647,17 +610,17 @@ unsigned char *abuffer, *bbuffer, *nbuffer; abuffer = cur->bitmap; - bbuffer = clip_bm->bitmap.buffer; + bbuffer = clip_bm->buffer; ax = cur->dst_x; ay = cur->dst_y; aw = cur->w; ah = cur->h; as = cur->stride; bx = clip_bm->left; - by = -clip_bm->top; - bw = clip_bm->bitmap.width; - bh = clip_bm->bitmap.rows; - bs = clip_bm->bitmap.pitch; + by = clip_bm->top; + bw = clip_bm->w; + bh = clip_bm->h; + bs = clip_bm->stride; // Calculate overlap coordinates left = (ax > bx) ? ax : bx; @@ -741,22 +704,31 @@ || (info->shadow_x == 0 && info->shadow_y == 0) || info->skip) continue; - pen_x = - dst_x + (info->pos.x >> 6) + - (int) (info->shadow_x * render_priv->border_scale); - pen_y = - dst_y + (info->pos.y >> 6) + - (int) (info->shadow_y * render_priv->border_scale); - bm = info->bm_s; - - here_tail = tail; - tail = - render_glyph(render_priv, bm, pen_x, pen_y, info->c[3], 0, - 1000000, tail); - if (last_tail && tail != here_tail && ((info->c[3] & 0xff) > 0)) - render_overlap(render_priv, last_tail, here_tail); + while (info) { + if (!info->bm_s) { + info = info->next; + continue; + } + + pen_x = + dst_x + (info->pos.x >> 6) + + (int) (info->shadow_x * render_priv->border_scale); + pen_y = + dst_y + (info->pos.y >> 6) + + (int) (info->shadow_y * render_priv->border_scale); + bm = info->bm_s; + + here_tail = tail; + tail = + render_glyph(render_priv, bm, pen_x, pen_y, info->c[3], 0, + 1000000, tail); - last_tail = here_tail; + if (last_tail && tail != here_tail && ((info->c[3] & 0xff) > 0)) + render_overlap(render_priv, last_tail, here_tail); + last_tail = here_tail; + + info = info->next; + } } last_tail = 0; @@ -766,22 +738,30 @@ || info->skip) continue; - pen_x = dst_x + (info->pos.x >> 6); - pen_y = dst_y + (info->pos.y >> 6); - bm = info->bm_o; - - if ((info->effect_type == EF_KARAOKE_KO) - && (info->effect_timing <= (info->bbox.xMax >> 6))) { - // do nothing - } else { - here_tail = tail; - tail = - render_glyph(render_priv, bm, pen_x, pen_y, info->c[2], - 0, 1000000, tail); - if (last_tail && tail != here_tail && ((info->c[2] & 0xff) > 0)) - render_overlap(render_priv, last_tail, here_tail); + while (info) { + if (!info->bm_o) { + info = info->next; + continue; + } - last_tail = here_tail; + pen_x = dst_x + (info->pos.x >> 6); + pen_y = dst_y + (info->pos.y >> 6); + bm = info->bm_o; + + if ((info->effect_type == EF_KARAOKE_KO) + && (info->effect_timing <= (info->bbox.xMax >> 6))) { + // do nothing + } else { + here_tail = tail; + tail = + render_glyph(render_priv, bm, pen_x, pen_y, info->c[2], + 0, 1000000, tail); + if (last_tail && tail != here_tail && ((info->c[2] & 0xff) > 0)) + render_overlap(render_priv, last_tail, here_tail); + + last_tail = here_tail; + } + info = info->next; } } @@ -791,28 +771,36 @@ || info->skip) continue; - pen_x = dst_x + (info->pos.x >> 6); - pen_y = dst_y + (info->pos.y >> 6); - bm = info->bm; - - if ((info->effect_type == EF_KARAOKE) - || (info->effect_type == EF_KARAOKE_KO)) { - if (info->effect_timing > (info->bbox.xMax >> 6)) + while (info) { + if (!info->bm) { + info = info->next; + continue; + } + + pen_x = dst_x + (info->pos.x >> 6); + pen_y = dst_y + (info->pos.y >> 6); + bm = info->bm; + + if ((info->effect_type == EF_KARAOKE) + || (info->effect_type == EF_KARAOKE_KO)) { + if (info->effect_timing > (info->bbox.xMax >> 6)) + tail = + render_glyph(render_priv, bm, pen_x, pen_y, + info->c[0], 0, 1000000, tail); + else + tail = + render_glyph(render_priv, bm, pen_x, pen_y, + info->c[1], 0, 1000000, tail); + } else if (info->effect_type == EF_KARAOKE_KF) { tail = - render_glyph(render_priv, bm, pen_x, pen_y, - info->c[0], 0, 1000000, tail); - else + render_glyph(render_priv, bm, pen_x, pen_y, info->c[0], + info->c[1], info->effect_timing, tail); + } else tail = - render_glyph(render_priv, bm, pen_x, pen_y, - info->c[1], 0, 1000000, tail); - } else if (info->effect_type == EF_KARAOKE_KF) { - tail = - render_glyph(render_priv, bm, pen_x, pen_y, info->c[0], - info->c[1], info->effect_timing, tail); - } else - tail = - render_glyph(render_priv, bm, pen_x, pen_y, info->c[0], - 0, 1000000, tail); + render_glyph(render_priv, bm, pen_x, pen_y, info->c[0], + 0, 1000000, tail); + info = info->next; + } } *tail = 0; @@ -821,23 +809,27 @@ return head; } -static void compute_string_bbox(TextInfo *info, DBBox *bbox) +static void compute_string_bbox(TextInfo *text, DBBox *bbox) { int i; - if (info->length > 0) { + if (text->length > 0) { bbox->xMin = 32000; bbox->xMax = -32000; - bbox->yMin = -1 * info->lines[0].asc + d6_to_double(info->glyphs[0].pos.y); - bbox->yMax = info->height - info->lines[0].asc + - d6_to_double(info->glyphs[0].pos.y); - - for (i = 0; i < info->length; ++i) { - if (info->glyphs[i].skip) continue; - double s = d6_to_double(info->glyphs[i].pos.x); - double e = s + d6_to_double(info->glyphs[i].advance.x); - bbox->xMin = FFMIN(bbox->xMin, s); - bbox->xMax = FFMAX(bbox->xMax, e); + bbox->yMin = -1 * text->lines[0].asc + d6_to_double(text->glyphs[0].pos.y); + bbox->yMax = text->height - text->lines[0].asc + + d6_to_double(text->glyphs[0].pos.y); + + for (i = 0; i < text->length; ++i) { + GlyphInfo *info = text->glyphs + i; + if (info->skip) continue; + while (info) { + double s = d6_to_double(info->pos.x); + double e = s + d6_to_double(info->advance.x); + bbox->xMin = FFMIN(bbox->xMin, s); + bbox->xMax = FFMAX(bbox->xMax, e); + info = info->next; + } } } else bbox->xMin = bbox->xMax = bbox->yMin = bbox->yMax = 0.; @@ -879,6 +871,7 @@ render_priv->state.frz = M_PI * render_priv->state.style->Angle / 180.; render_priv->state.fax = render_priv->state.fay = 0.; render_priv->state.wrap_style = render_priv->track->WrapStyle; + render_priv->state.font_encoding = render_priv->state.style->Encoding; } /** @@ -889,6 +882,7 @@ { render_priv->state.event = event; render_priv->state.style = render_priv->track->styles + event->Style; + render_priv->state.parsed_tags = 0; reset_render_context(render_priv); @@ -910,10 +904,10 @@ render_priv->state.effect_type = EF_NONE; render_priv->state.effect_timing = 0; render_priv->state.effect_skip_timing = 0; + render_priv->state.bm_run_id = 0; ass_drawing_free(render_priv->state.drawing); - render_priv->state.drawing = ass_drawing_new(render_priv->fontconfig_priv, - render_priv->state.font, - render_priv->ftlibrary); + render_priv->state.drawing = ass_drawing_new(render_priv->library, + render_priv->ftlibrary); apply_transition_effects(render_priv, event); } @@ -931,30 +925,18 @@ * Replace the outline of a glyph by a contour which makes up a simple * opaque rectangle. */ -static void draw_opaque_box(ASS_Renderer *render_priv, uint32_t ch, - FT_Glyph glyph, int sx, int sy) +static void draw_opaque_box(ASS_Renderer *render_priv, int asc, int desc, + FT_Outline *ol, FT_Vector advance, int sx, int sy) { - int asc = 0, desc = 0; int i; - int adv = d16_to_d6(glyph->advance.x); + int adv = advance.x; double scale_y = render_priv->state.scale_y; double scale_x = render_priv->state.scale_x; - FT_OutlineGlyph og = (FT_OutlineGlyph) glyph; - FT_Outline *ol; // to avoid gaps sx = FFMAX(64, sx); sy = FFMAX(64, sy); - if (ch == -1) { - asc = render_priv->state.drawing->asc; - desc = render_priv->state.drawing->desc; - } else { - ass_font_get_asc_desc(render_priv->state.font, ch, &asc, &desc); - asc *= scale_y; - desc *= scale_y; - } - // Emulate the WTFish behavior of VSFilter, i.e. double-scale // the sizes of the opaque box. adv += double_to_d6(render_priv->state.hspacing * render_priv->font_scale @@ -972,10 +954,8 @@ { .x = -sx, .y = -desc - sy }, }; - FT_Outline_Done(render_priv->ftlibrary, &og->outline); - FT_Outline_New(render_priv->ftlibrary, 4, 1, &og->outline); + FT_Outline_New(render_priv->ftlibrary, 4, 1, ol); - ol = &og->outline; ol->n_points = ol->n_contours = 0; for (i = 0; i < 4; i++) { ol->points[ol->n_points] = points[i]; @@ -988,40 +968,53 @@ * Stroke an outline glyph in x/y direction. Applies various fixups to get * around limitations of the FreeType stroker. */ -static void stroke_outline_glyph(ASS_Renderer *render_priv, - FT_OutlineGlyph *glyph, int sx, int sy) +static void stroke_outline(ASS_Renderer *render_priv, FT_Outline *outline, + int sx, int sy) { if (sx <= 0 && sy <= 0) return; - fix_freetype_stroker(*glyph, sx, sy); + fix_freetype_stroker(outline, sx, sy); // Borders are equal; use the regular stroker if (sx == sy && render_priv->state.stroker) { int error; - error = FT_Glyph_StrokeBorder((FT_Glyph *) glyph, - render_priv->state.stroker, 0, 1); - if (error) + unsigned n_points, n_contours; + + FT_StrokerBorder border = FT_Outline_GetOutsideBorder(outline); + error = FT_Stroker_ParseOutline(render_priv->state.stroker, outline, 0); + if (error) { ass_msg(render_priv->library, MSGL_WARN, - "FT_Glyph_Stroke error: %d", error); + "FT_Stroker_ParseOutline failed, error: %d", error); + } + error = FT_Stroker_GetBorderCounts(render_priv->state.stroker, border, + &n_points, &n_contours); + if (error) { + ass_msg(render_priv->library, MSGL_WARN, + "FT_Stroker_GetBorderCounts failed, error: %d", error); + } + FT_Outline_Done(render_priv->ftlibrary, outline); + FT_Outline_New(render_priv->ftlibrary, n_points, n_contours, outline); + outline->n_points = outline->n_contours = 0; + FT_Stroker_ExportBorder(render_priv->state.stroker, border, outline); // "Stroke" with the outline emboldener in two passes. // The outlines look uglier, but the emboldening never adds any points } else { int i; - FT_Outline *ol = &(*glyph)->outline; FT_Outline nol; - FT_Outline_New(render_priv->ftlibrary, ol->n_points, - ol->n_contours, &nol); - FT_Outline_Copy(ol, &nol); - FT_Outline_Embolden(ol, sx * 2); - FT_Outline_Translate(ol, -sx, -sx); + FT_Outline_New(render_priv->ftlibrary, outline->n_points, + outline->n_contours, &nol); + FT_Outline_Copy(outline, &nol); + + FT_Outline_Embolden(outline, sx * 2); + FT_Outline_Translate(outline, -sx, -sx); FT_Outline_Embolden(&nol, sy * 2); FT_Outline_Translate(&nol, -sy, -sy); - for (i = 0; i < ol->n_points; i++) - ol->points[i].y = nol.points[i].y; + for (i = 0; i < outline->n_points; i++) + outline->points[i].y = nol.points[i].y; FT_Outline_Done(render_priv->ftlibrary, &nol); } @@ -1031,37 +1024,41 @@ * \brief Prepare glyph hash */ static void -fill_glyph_hash(ASS_Renderer *priv, GlyphHashKey *key, - ASS_Drawing *drawing, uint32_t ch) +fill_glyph_hash(ASS_Renderer *priv, OutlineHashKey *outline_key, + GlyphInfo *info) { - if (drawing->hash) { - key->scale_x = double_to_d16(priv->state.scale_x); - key->scale_y = double_to_d16(priv->state.scale_y); - key->outline.x = priv->state.border_x * 0xFFFF; - key->outline.y = priv->state.border_y * 0xFFFF; + if (info->drawing) { + DrawingHashKey *key = &outline_key->u.drawing; + outline_key->type = OUTLINE_DRAWING; + key->scale_x = double_to_d16(info->scale_x); + key->scale_y = double_to_d16(info->scale_y); + key->outline.x = double_to_d16(info->border_x); + key->outline.y = double_to_d16(info->border_y); key->border_style = priv->state.style->BorderStyle; - key->drawing_hash = drawing->hash; - // not very clean, but works - key->size = drawing->scale; - key->ch = -1; + key->hash = info->drawing->hash; + key->text = info->drawing->text; + key->pbo = info->drawing->pbo; + key->scale = info->drawing->scale; } else { - key->font = priv->state.font; - key->size = priv->state.font_size; - key->ch = ch; - key->bold = priv->state.bold; - key->italic = priv->state.italic; - key->scale_x = double_to_d16(priv->state.scale_x); - key->scale_y = double_to_d16(priv->state.scale_y); - key->outline.x = priv->state.border_x * 0xFFFF; - key->outline.y = priv->state.border_y * 0xFFFF; - key->flags = priv->state.flags; + GlyphHashKey *key = &outline_key->u.glyph; + outline_key->type = OUTLINE_GLYPH; + key->font = info->font; + key->size = info->font_size; + key->face_index = info->face_index; + key->glyph_index = info->glyph_index; + key->bold = info->bold; + key->italic = info->italic; + key->scale_x = double_to_d16(info->scale_x); + key->scale_y = double_to_d16(info->scale_y); + key->outline.x = double_to_d16(info->border_x); + key->outline.y = double_to_d16(info->border_y); + key->flags = info->flags; key->border_style = priv->state.style->BorderStyle; } } /** * \brief Get normal and outline (border) glyphs - * \param symbol ucs4 char * \param info out: struct filled with extracted data * Tries to get both glyphs from cache. * If they can't be found, gets a glyph from font face, generates outline with FT_Stroker, @@ -1069,80 +1066,101 @@ * The glyphs are returned in info->glyph and info->outline_glyph */ static void -get_outline_glyph(ASS_Renderer *render_priv, int symbol, GlyphInfo *info, - ASS_Drawing *drawing) +get_outline_glyph(ASS_Renderer *priv, GlyphInfo *info) { - GlyphHashValue *val; - GlyphHashKey key; + OutlineHashValue *val; + OutlineHashKey key; - memset(&key, 0, sizeof(key)); - memset(info, 0, sizeof(GlyphInfo)); + memset(&info->hash_key, 0, sizeof(key)); - fill_glyph_hash(render_priv, &key, drawing, symbol); - val = cache_find_glyph(render_priv->cache.glyph_cache, &key); - if (val) { - info->glyph = val->glyph; - info->outline_glyph = val->outline_glyph; - info->bbox = val->bbox_scaled; - info->advance.x = val->advance.x; - info->advance.y = val->advance.y; - if (drawing->hash) { - drawing->asc = val->asc; - drawing->desc = val->desc; - } - } else { - GlyphHashValue v; - if (drawing->hash) { + fill_glyph_hash(priv, &key, info); + val = ass_cache_get(priv->cache.outline_cache, &key); + + if (!val) { + OutlineHashValue v; + memset(&v, 0, sizeof(v)); + + if (info->drawing) { + ASS_Drawing *drawing = info->drawing; + ass_drawing_hash(drawing); if(!ass_drawing_parse(drawing, 0)) return; - info->glyph = (FT_Glyph) drawing->glyph; + outline_copy(priv->ftlibrary, &drawing->outline, + &v.outline); + v.advance.x = drawing->advance.x; + v.advance.y = drawing->advance.y; + v.asc = drawing->asc; + v.desc = drawing->desc; + key.u.drawing.text = strdup(drawing->text); } else { - info->glyph = - ass_font_get_glyph(render_priv->fontconfig_priv, - render_priv->state.font, symbol, - render_priv->settings.hinting, - render_priv->state.flags); + ass_face_set_size(info->font->faces[info->face_index], + info->font_size); + ass_font_set_transform(info->font, info->scale_x, + info->scale_y, NULL); + FT_Glyph glyph = + ass_font_get_glyph(priv->fontconfig_priv, info->font, + info->symbol, info->face_index, info->glyph_index, + priv->settings.hinting, info->flags); + if (glyph != NULL) { + outline_copy(priv->ftlibrary, + &((FT_OutlineGlyph)glyph)->outline, &v.outline); + if (priv->settings.shaper == ASS_SHAPING_SIMPLE) { + v.advance.x = d16_to_d6(glyph->advance.x); + v.advance.y = d16_to_d6(glyph->advance.y); + } + FT_Done_Glyph(glyph); + ass_font_get_asc_desc(info->font, info->symbol, + &v.asc, &v.desc); + v.asc *= info->scale_y; + v.desc *= info->scale_y; + } } - if (!info->glyph) + + if (!v.outline) return; - info->advance.x = d16_to_d6(info->glyph->advance.x); - info->advance.y = d16_to_d6(info->glyph->advance.y); - FT_Glyph_Get_CBox(info->glyph, FT_GLYPH_BBOX_SUBPIXELS, &info->bbox); - - if (render_priv->state.style->BorderStyle == 3 && - (render_priv->state.border_x > 0|| - render_priv->state.border_y > 0)) { - FT_Glyph_Copy(info->glyph, &info->outline_glyph); - draw_opaque_box(render_priv, symbol, info->outline_glyph, - double_to_d6(render_priv->state.border_x * - render_priv->border_scale), - double_to_d6(render_priv->state.border_y * - render_priv->border_scale)); - } else if ((render_priv->state.border_x > 0 - || render_priv->state.border_y > 0) - && key.scale_x && key.scale_y) { - - FT_Glyph_Copy(info->glyph, &info->outline_glyph); - stroke_outline_glyph(render_priv, - (FT_OutlineGlyph *) &info->outline_glyph, - double_to_d6(render_priv->state.border_x * - render_priv->border_scale), - double_to_d6(render_priv->state.border_y * - render_priv->border_scale)); - } + FT_Outline_Get_CBox(v.outline, &v.bbox_scaled); - memset(&v, 0, sizeof(v)); - v.glyph = info->glyph; - v.outline_glyph = info->outline_glyph; - v.advance = info->advance; - v.bbox_scaled = info->bbox; - if (drawing->hash) { - v.asc = drawing->asc; - v.desc = drawing->desc; + if (priv->state.style->BorderStyle == 3 && + (info->border_x > 0 || info->border_y > 0)) { + FT_Vector advance; + + v.border = calloc(1, sizeof(FT_Outline)); + + if (priv->settings.shaper == ASS_SHAPING_SIMPLE || info->drawing) + advance = v.advance; + else + advance = info->advance; + + draw_opaque_box(priv, v.asc, v.desc, v.border, advance, + double_to_d6(info->border_x * priv->border_scale), + double_to_d6(info->border_y * priv->border_scale)); + + } else if ((info->border_x > 0 || info->border_y > 0) + && double_to_d6(info->scale_x) && double_to_d6(info->scale_y)) { + + outline_copy(priv->ftlibrary, v.outline, &v.border); + stroke_outline(priv, v.border, + double_to_d6(info->border_x * priv->border_scale), + double_to_d6(info->border_y * priv->border_scale)); } - cache_add_glyph(render_priv->cache.glyph_cache, &key, &v); + + v.lib = priv->ftlibrary; + val = ass_cache_put(priv->cache.outline_cache, &key, &v); + } + + info->hash_key.u.outline.outline = val; + info->outline = val->outline; + info->border = val->border; + info->bbox = val->bbox_scaled; + if (info->drawing || priv->settings.shaper == ASS_SHAPING_SIMPLE) { + info->cluster_advance.x = info->advance.x = val->advance.x; + info->cluster_advance.y = info->advance.y = val->advance.y; } + info->asc = val->asc; + info->desc = val->desc; + + ass_drawing_free(info->drawing); } /** @@ -1151,7 +1169,7 @@ * onto the screen plane. */ static void -transform_3d_points(FT_Vector shift, FT_Glyph glyph, double frx, double fry, +transform_3d_points(FT_Vector shift, FT_Outline *outline, double frx, double fry, double frz, double fax, double fay, double scale, int yshift) { @@ -1161,7 +1179,6 @@ double cx = cos(frx); double cy = cos(fry); double cz = cos(frz); - FT_Outline *outline = &((FT_OutlineGlyph) glyph)->outline; FT_Vector *p = outline->points; double x, y, z, xx, yy, zz; int i, dist; @@ -1204,19 +1221,19 @@ * Rotates both glyphs by frx, fry and frz. Shift vector is added before rotation and subtracted after it. */ static void -transform_3d(FT_Vector shift, FT_Glyph *glyph, FT_Glyph *glyph2, +transform_3d(FT_Vector shift, FT_Outline *outline, FT_Outline *border, double frx, double fry, double frz, double fax, double fay, double scale, int yshift) { frx = -frx; frz = -frz; if (frx != 0. || fry != 0. || frz != 0. || fax != 0. || fay != 0.) { - if (glyph && *glyph) - transform_3d_points(shift, *glyph, frx, fry, frz, + if (outline) + transform_3d_points(shift, outline, frx, fry, frz, fax, fay, scale, yshift); - if (glyph2 && *glyph2) - transform_3d_points(shift, *glyph2, frx, fry, frz, + if (border) + transform_3d_points(shift, border, frx, fry, frz, fax, fay, scale, yshift); } } @@ -1233,77 +1250,81 @@ get_bitmap_glyph(ASS_Renderer *render_priv, GlyphInfo *info) { BitmapHashValue *val; - BitmapHashKey *key = &info->hash_key; + OutlineBitmapHashKey *key = &info->hash_key.u.outline; + + if (!info->outline || info->symbol == '\n' || info->symbol == 0 || info->skip) + return; - val = cache_find_bitmap(render_priv->cache.bitmap_cache, key); + val = ass_cache_get(render_priv->cache.bitmap_cache, &info->hash_key); - if (val) { - info->bm = val->bm; - info->bm_o = val->bm_o; - info->bm_s = val->bm_s; - } else { + if (!val) { FT_Vector shift; BitmapHashValue hash_val; int error; double fax_scaled, fay_scaled; - info->bm = info->bm_o = info->bm_s = 0; - if (info->glyph && info->symbol != '\n' && info->symbol != 0 - && !info->skip) { - FT_Glyph glyph; - FT_Glyph outline; - double scale_x = render_priv->font_scale_x; - - FT_Glyph_Copy(info->glyph, &glyph); - FT_Glyph_Copy(info->outline_glyph, &outline); - // calculating rotation shift vector (from rotation origin to the glyph basepoint) - shift.x = key->shift_x; - shift.y = key->shift_y; - fax_scaled = info->fax * - render_priv->state.scale_x; - fay_scaled = info->fay * render_priv->state.scale_y; - // apply rotation - transform_3d(shift, &glyph, &outline, - info->frx, info->fry, info->frz, fax_scaled, - fay_scaled, render_priv->font_scale, info->asc); - - // PAR correction scaling - FT_Matrix m = { double_to_d16(scale_x), 0, - 0, double_to_d16(1.0) }; - - // subpixel shift - if (glyph) { - FT_Outline *outl = &((FT_OutlineGlyph) glyph)->outline; - if (scale_x != 1.0) - FT_Outline_Transform(outl, &m); - FT_Outline_Translate(outl, key->advance.x, -key->advance.y); - } - if (outline) { - FT_Outline *outl = &((FT_OutlineGlyph) outline)->outline; - if (scale_x != 1.0) - FT_Outline_Transform(outl, &m); - FT_Outline_Translate(outl, key->advance.x, -key->advance.y); - } - // render glyph - error = glyph_to_bitmap(render_priv->library, - render_priv->synth_priv, - glyph, outline, - &info->bm, &info->bm_o, - &info->bm_s, info->be, - info->blur * render_priv->border_scale, - key->shadow_offset, key->border_style); - if (error) - info->symbol = 0; - - // add bitmaps to cache - hash_val.bm_o = info->bm_o; - hash_val.bm = info->bm; - hash_val.bm_s = info->bm_s; - cache_add_bitmap(render_priv->cache.bitmap_cache, key, &hash_val); + FT_Outline *outline, *border; + double scale_x = render_priv->font_scale_x; - FT_Done_Glyph(glyph); - FT_Done_Glyph(outline); - } + hash_val.bm = hash_val.bm_o = hash_val.bm_s = 0; + + outline_copy(render_priv->ftlibrary, info->outline, &outline); + outline_copy(render_priv->ftlibrary, info->border, &border); + + // calculating rotation shift vector (from rotation origin to the glyph basepoint) + shift.x = key->shift_x; + shift.y = key->shift_y; + fax_scaled = info->fax * render_priv->state.scale_x; + fay_scaled = info->fay * render_priv->state.scale_y; + + // apply rotation + transform_3d(shift, outline, border, + info->frx, info->fry, info->frz, fax_scaled, + fay_scaled, render_priv->font_scale, info->asc); + + // PAR correction scaling + FT_Matrix m = { double_to_d16(scale_x), 0, + 0, double_to_d16(1.0) }; + + // subpixel shift + if (outline) { + if (scale_x != 1.0) + FT_Outline_Transform(outline, &m); + FT_Outline_Translate(outline, key->advance.x, -key->advance.y); + } + if (border) { + if (scale_x != 1.0) + FT_Outline_Transform(border, &m); + FT_Outline_Translate(border, key->advance.x, -key->advance.y); + } + + // render glyph + error = outline_to_bitmap3(render_priv->library, + render_priv->synth_priv, + render_priv->ftlibrary, + outline, border, + &hash_val.bm, &hash_val.bm_o, + &hash_val.bm_s, info->be, + info->blur * render_priv->border_scale, + key->shadow_offset, + render_priv->state.style->BorderStyle); + if (error) + info->symbol = 0; + + val = ass_cache_put(render_priv->cache.bitmap_cache, &info->hash_key, + &hash_val); + + outline_free(render_priv->ftlibrary, outline); + outline_free(render_priv->ftlibrary, border); } + + info->bm = val->bm; + info->bm_o = val->bm_o; + info->bm_s = val->bm_s; + + // VSFilter compatibility: invisible fill and no border? + // In this case no shadow is supposed to be rendered. + if (!info->border && (info->c[0] & 0xFF) == 0xFF) + info->bm_s = 0; } /** @@ -1392,16 +1413,17 @@ } // A break itself can contain a whitespace, too cur = ti->glyphs + i; - if (cur->symbol == ' ') + if (cur->symbol == ' ') { cur->skip++; - // Mark whitespace after - j = i + 1; - cur = ti->glyphs + j; - while (j < ti->length && IS_WHITESPACE(cur)) { - cur->skip++; - cur = ti->glyphs + ++j; + // Mark whitespace after + j = i + 1; + cur = ti->glyphs + j; + while (j < ti->length && IS_WHITESPACE(cur)) { + cur->skip++; + cur = ti->glyphs + ++j; + } + i = j - 1; } - i = j - 1; } } } @@ -1429,6 +1451,7 @@ double pen_shift_x; double pen_shift_y; int cur_line; + int run_offset; TextInfo *text_info = &render_priv->text_info; last_space = -1; @@ -1436,10 +1459,9 @@ break_type = 0; s1 = text_info->glyphs; // current line start for (i = 0; i < text_info->length; ++i) { - int break_at; + int break_at = -1; double s_offset, len; cur = text_info->glyphs + i; - break_at = -1; s_offset = d6_to_double(s1->bbox.xMin + s1->pos.x); len = d6_to_double(cur->bbox.xMax + cur->pos.x) - s_offset; @@ -1448,19 +1470,15 @@ break_at = i; ass_msg(render_priv->library, MSGL_DBG2, "forced line break at %d", break_at); - } - - if ((len >= max_text_width) - && (render_priv->state.wrap_style != 2)) { + } else if (cur->symbol == ' ') { + last_space = i; + } else if (len >= max_text_width + && (render_priv->state.wrap_style != 2)) { break_type = 1; break_at = last_space; - if (break_at == -1) - break_at = i - 1; - if (break_at == -1) - break_at = 0; - ass_msg(render_priv->library, MSGL_DBG2, "overfill at %d", i); - ass_msg(render_priv->library, MSGL_DBG2, "line break at %d", - break_at); + if (break_at >= 0) + ass_msg(render_priv->library, MSGL_DBG2, "line break at %d", + break_at); } if (break_at != -1) { @@ -1474,21 +1492,14 @@ sizeof(LineInfo) * text_info->max_lines); } - if (lead < text_info->length) + if (lead < text_info->length) { text_info->glyphs[lead].linebreak = break_type; - last_space = -1; - s1 = text_info->glyphs + lead; - s_offset = d6_to_double(s1->bbox.xMin + s1->pos.x); - text_info->n_lines++; + last_space = -1; + s1 = text_info->glyphs + lead; + s_offset = d6_to_double(s1->bbox.xMin + s1->pos.x); + text_info->n_lines++; + } } - - if (cur->symbol == ' ') - last_space = i; - - // make sure the hard linebreak is not forgotten when - // there was a new soft linebreak just inserted - if (cur->symbol == '\n' && break_type == 1) - i--; } #define DIFF(x,y) (((x) < (y)) ? (y - x) : (x - y)) exit = 0; @@ -1551,6 +1562,7 @@ pen_shift_x = 0.; pen_shift_y = 0.; cur_line = 1; + run_offset = 0; i = 0; cur = text_info->glyphs + i; @@ -1566,86 +1578,31 @@ double height = text_info->lines[cur_line - 1].desc + text_info->lines[cur_line].asc; + text_info->lines[cur_line - 1].len = i - + text_info->lines[cur_line - 1].offset; + text_info->lines[cur_line].offset = i; cur_line++; + run_offset++; pen_shift_x = d6_to_double(-cur->pos.x); pen_shift_y += height + render_priv->settings.line_spacing; ass_msg(render_priv->library, MSGL_DBG2, "shifting from %d to %d by (%f, %f)", i, text_info->length - 1, pen_shift_x, pen_shift_y); } + cur->bm_run_id += run_offset; cur->pos.x += double_to_d6(pen_shift_x); cur->pos.y += double_to_d6(pen_shift_y); } -} - -/** - * \brief determine karaoke effects - * Karaoke effects cannot be calculated during parse stage (get_next_char()), - * so they are done in a separate step. - * Parse stage: when karaoke style override is found, its parameters are stored in the next glyph's - * (the first glyph of the karaoke word)'s effect_type and effect_timing. - * This function: - * 1. sets effect_type for all glyphs in the word (_karaoke_ word) - * 2. sets effect_timing for all glyphs to x coordinate of the border line between the left and right karaoke parts - * (left part is filled with PrimaryColour, right one - with SecondaryColour). - */ -static void process_karaoke_effects(ASS_Renderer *render_priv) -{ - GlyphInfo *cur, *cur2; - GlyphInfo *s1, *e1; // start and end of the current word - GlyphInfo *s2; // start of the next word - int i; - int timing; // current timing - int tm_start, tm_end; // timings at start and end of the current word - int tm_current; - double dt; - int x; - int x_start, x_end; - - tm_current = render_priv->time - render_priv->state.event->Start; - timing = 0; - s1 = s2 = 0; - for (i = 0; i <= render_priv->text_info.length; ++i) { - cur = render_priv->text_info.glyphs + i; - if ((i == render_priv->text_info.length) - || (cur->effect_type != EF_NONE)) { - s1 = s2; - s2 = cur; - if (s1) { - e1 = s2 - 1; - tm_start = timing + s1->effect_skip_timing; - tm_end = tm_start + s1->effect_timing; - timing = tm_end; - x_start = 1000000; - x_end = -1000000; - for (cur2 = s1; cur2 <= e1; ++cur2) { - x_start = FFMIN(x_start, d6_to_int(cur2->bbox.xMin + cur2->pos.x)); - x_end = FFMAX(x_end, d6_to_int(cur2->bbox.xMax + cur2->pos.x)); - } + text_info->lines[cur_line - 1].len = + text_info->length - text_info->lines[cur_line - 1].offset; - dt = (tm_current - tm_start); - if ((s1->effect_type == EF_KARAOKE) - || (s1->effect_type == EF_KARAOKE_KO)) { - if (dt > 0) - x = x_end + 1; - else - x = x_start; - } else if (s1->effect_type == EF_KARAOKE_KF) { - dt /= (tm_end - tm_start); - x = x_start + (x_end - x_start) * dt; - } else { - ass_msg(render_priv->library, MSGL_ERR, - "Unknown effect type"); - continue; - } - - for (cur2 = s1; cur2 <= e1; ++cur2) { - cur2->effect_type = s1->effect_type; - cur2->effect_timing = x - d6_to_int(cur2->pos.x); - } - } - } +#if 0 + // print line info + for (i = 0; i < text_info->n_lines; i++) { + printf("line %d offset %d length %d\n", i, text_info->lines[i].offset, + text_info->lines[i].len); } +#endif } /** @@ -1688,38 +1645,22 @@ * Prepare bitmap hash key of a glyph */ static void -fill_bitmap_hash(ASS_Renderer *priv, BitmapHashKey *hash_key, - ASS_Drawing *drawing, FT_Vector pen, uint32_t code) +fill_bitmap_hash(ASS_Renderer *priv, GlyphInfo *info, + OutlineBitmapHashKey *hash_key) { - if (!drawing->hash) { - hash_key->font = priv->state.font; - hash_key->size = priv->state.font_size; - hash_key->bold = priv->state.bold; - hash_key->italic = priv->state.italic; - } else { - hash_key->drawing_hash = drawing->hash; - hash_key->size = drawing->scale; - } - hash_key->ch = code; - hash_key->outline.x = double_to_d16(priv->state.border_x); - hash_key->outline.y = double_to_d16(priv->state.border_y); - hash_key->scale_x = double_to_d16(priv->state.scale_x); - hash_key->scale_y = double_to_d16(priv->state.scale_y); - hash_key->frx = rot_key(priv->state.frx); - hash_key->fry = rot_key(priv->state.fry); - hash_key->frz = rot_key(priv->state.frz); - hash_key->fax = double_to_d16(priv->state.fax); - hash_key->fay = double_to_d16(priv->state.fay); - hash_key->be = priv->state.be; - hash_key->blur = priv->state.blur; - hash_key->border_style = priv->state.style->BorderStyle; + hash_key->frx = rot_key(info->frx); + hash_key->fry = rot_key(info->fry); + hash_key->frz = rot_key(info->frz); + hash_key->fax = double_to_d16(info->fax); + hash_key->fay = double_to_d16(info->fay); + hash_key->be = info->be; + hash_key->blur = info->blur; hash_key->shadow_offset.x = double_to_d6( - priv->state.shadow_x * priv->border_scale - - (int) (priv->state.shadow_x * priv->border_scale)); + info->shadow_x * priv->border_scale - + (int) (info->shadow_x * priv->border_scale)); hash_key->shadow_offset.y = double_to_d6( - priv->state.shadow_y * priv->border_scale - - (int) (priv->state.shadow_y * priv->border_scale)); - hash_key->flags = priv->state.flags; + info->shadow_y * priv->border_scale - + (int) (info->shadow_y * priv->border_scale)); } /** @@ -1742,7 +1683,6 @@ int MarginL, MarginR, MarginV; int last_break; int alignment, halign, valign; - int kern = render_priv->track->Kerning; double device_x = 0; double device_y = 0; TextInfo *text_info = &render_priv->text_info; @@ -1762,11 +1702,9 @@ drawing = render_priv->state.drawing; text_info->length = 0; - pen.x = 0; - pen.y = 0; - previous = 0; num_glyphs = 0; p = event->Text; + // Event parsing. while (1) { // get next char, executing style override @@ -1777,15 +1715,26 @@ ass_drawing_add_char(drawing, (char) code); } while (code && render_priv->state.drawing_mode); // skip everything in drawing mode + if (text_info->length >= text_info->max_glyphs) { + // Raise maximum number of glyphs + text_info->max_glyphs *= 2; + text_info->glyphs = glyphs = + realloc(text_info->glyphs, + sizeof(GlyphInfo) * text_info->max_glyphs); + } + + // Clear current GlyphInfo + memset(&glyphs[text_info->length], 0, sizeof(GlyphInfo)); + // Parse drawing if (drawing->i) { drawing->scale_x = render_priv->state.scale_x * render_priv->font_scale; drawing->scale_y = render_priv->state.scale_y * render_priv->font_scale; - ass_drawing_hash(drawing); p--; - code = -1; + code = 0xfffc; // object replacement character + glyphs[text_info->length].drawing = drawing; } // face could have been changed in get_next_char @@ -1797,61 +1746,9 @@ if (code == 0) break; - if (text_info->length >= text_info->max_glyphs) { - // Raise maximum number of glyphs - text_info->max_glyphs *= 2; - text_info->glyphs = glyphs = - realloc(text_info->glyphs, - sizeof(GlyphInfo) * text_info->max_glyphs); - } - - // Add kerning to pen - if (kern && previous && code && !drawing->hash) { - FT_Vector delta; - delta = - ass_font_get_kerning(render_priv->state.font, previous, - code); - pen.x += delta.x * render_priv->state.scale_x; - pen.y += delta.y * render_priv->state.scale_y; - } - - ass_font_set_transform(render_priv->state.font, - render_priv->state.scale_x, - render_priv->state.scale_y, NULL); - - get_outline_glyph(render_priv, code, - glyphs + text_info->length, drawing); - - // Add additional space after italic to non-italic style changes - if (text_info->length && - glyphs[text_info->length - 1].hash_key.italic && - !render_priv->state.italic) { - int back = text_info->length - 1; - GlyphInfo *og = &glyphs[back]; - while (back && og->bbox.xMax - og->bbox.xMin == 0 - && og->hash_key.italic) - og = &glyphs[--back]; - if (og->bbox.xMax > og->advance.x) { - // The FreeType oblique slants by 6/16 - pen.x += og->bbox.yMax * 0.375; - } - } - - glyphs[text_info->length].pos.x = pen.x; - glyphs[text_info->length].pos.y = pen.y; - - pen.x += glyphs[text_info->length].advance.x; - pen.x += double_to_d6(render_priv->state.hspacing * - render_priv->font_scale - * render_priv->state.scale_x); - pen.y += glyphs[text_info->length].advance.y; - pen.y += (render_priv->state.fay * render_priv->state.scale_y) * - glyphs[text_info->length].advance.x; - - previous = code; - + // Fill glyph information glyphs[text_info->length].symbol = code; - glyphs[text_info->length].linebreak = 0; + glyphs[text_info->length].font = render_priv->state.font; for (i = 0; i < 4; ++i) { uint32_t clr = render_priv->state.c[i]; change_alpha(&clr, @@ -1863,53 +1760,108 @@ render_priv->state.effect_timing; glyphs[text_info->length].effect_skip_timing = render_priv->state.effect_skip_timing; + glyphs[text_info->length].font_size = ensure_font_size(render_priv, + render_priv->state.font_size * render_priv->font_scale); glyphs[text_info->length].be = render_priv->state.be; glyphs[text_info->length].blur = render_priv->state.blur; glyphs[text_info->length].shadow_x = render_priv->state.shadow_x; glyphs[text_info->length].shadow_y = render_priv->state.shadow_y; + glyphs[text_info->length].scale_x= render_priv->state.scale_x; + glyphs[text_info->length].scale_y = render_priv->state.scale_y; + glyphs[text_info->length].border_x= render_priv->state.border_x; + glyphs[text_info->length].border_y = render_priv->state.border_y; + glyphs[text_info->length].bold = render_priv->state.bold; + glyphs[text_info->length].italic = render_priv->state.italic; + glyphs[text_info->length].flags = render_priv->state.flags; glyphs[text_info->length].frx = render_priv->state.frx; glyphs[text_info->length].fry = render_priv->state.fry; glyphs[text_info->length].frz = render_priv->state.frz; glyphs[text_info->length].fax = render_priv->state.fax; glyphs[text_info->length].fay = render_priv->state.fay; - if (drawing->hash) { - glyphs[text_info->length].asc = drawing->asc; - glyphs[text_info->length].desc = drawing->desc; - } else { - ass_font_get_asc_desc(render_priv->state.font, code, - &glyphs[text_info->length].asc, - &glyphs[text_info->length].desc); + glyphs[text_info->length].bm_run_id = render_priv->state.bm_run_id; - glyphs[text_info->length].asc *= render_priv->state.scale_y; - glyphs[text_info->length].desc *= render_priv->state.scale_y; + if (glyphs[text_info->length].drawing) { + drawing = render_priv->state.drawing = + ass_drawing_new(render_priv->library, render_priv->ftlibrary); } - // fill bitmap hash - fill_bitmap_hash(render_priv, &glyphs[text_info->length].hash_key, - drawing, pen, code); - text_info->length++; render_priv->state.effect_type = EF_NONE; render_priv->state.effect_timing = 0; render_priv->state.effect_skip_timing = 0; - if (drawing->hash) { - ass_drawing_free(drawing); - drawing = render_priv->state.drawing = - ass_drawing_new(render_priv->fontconfig_priv, - render_priv->state.font, - render_priv->ftlibrary); - } } - if (text_info->length == 0) { // no valid symbols in the event; this can be smth like {comment} free_render_context(render_priv); return 1; } + // Find shape runs and shape text + ass_shaper_set_base_direction(render_priv->shaper, + resolve_base_direction(render_priv->state.font_encoding)); + ass_shaper_find_runs(render_priv->shaper, render_priv, glyphs, + text_info->length); + ass_shaper_shape(render_priv->shaper, text_info); + + // Retrieve glyphs + for (i = 0; i < text_info->length; i++) { + GlyphInfo *info = glyphs + i; + while (info) { + get_outline_glyph(render_priv, info); + info = info->next; + } + info = glyphs + i; + + // Add additional space after italic to non-italic style changes + if (i && glyphs[i - 1].italic && !info->italic) { + int back = i - 1; + GlyphInfo *og = &glyphs[back]; + while (back && og->bbox.xMax - og->bbox.xMin == 0 + && og->italic) + og = &glyphs[--back]; + if (og->bbox.xMax > og->cluster_advance.x) + og->cluster_advance.x = og->bbox.xMax; + } + + // add horizontal letter spacing + info->cluster_advance.x += double_to_d6(render_priv->state.hspacing * + render_priv->font_scale * info->scale_x); + + // add displacement for vertical shearing + info->cluster_advance.y += (info->fay * info->scale_y) * info->cluster_advance.x; + + } + + // Preliminary layout (for line wrapping) + previous = 0; + pen.x = 0; + pen.y = 0; + for (i = 0; i < text_info->length; i++) { + GlyphInfo *info = glyphs + i; + FT_Vector cluster_pen = pen; + while (info) { + info->pos.x = cluster_pen.x; + info->pos.y = cluster_pen.y; + + cluster_pen.x += info->advance.x; + cluster_pen.y += info->advance.y; + + // fill bitmap hash + info->hash_key.type = BITMAP_OUTLINE; + fill_bitmap_hash(render_priv, info, &info->hash_key.u.outline); + + info = info->next; + } + info = glyphs + i; + pen.x += info->cluster_advance.x; + pen.y += info->cluster_advance.y; + previous = info->symbol; + } + + // depends on glyph x coordinates being monotonous, so it should be done before line wrap process_karaoke_effects(render_priv); @@ -1925,40 +1877,64 @@ MarginV = (event->MarginV) ? event->MarginV : render_priv->state.style->MarginV; - if (render_priv->state.evt_type != EVENT_HSCROLL) { - double max_text_width; - - // calculate max length of a line - max_text_width = - x2scr(render_priv, - render_priv->track->PlayResX - MarginR) - - x2scr(render_priv, MarginL); + // calculate max length of a line + double max_text_width = + x2scr(render_priv, render_priv->track->PlayResX - MarginR) - + x2scr(render_priv, MarginL); + // wrap lines + if (render_priv->state.evt_type != EVENT_HSCROLL) { // rearrange text in several lines wrap_lines_smart(render_priv, max_text_width); + } else { + // no breaking or wrapping, everything in a single line + text_info->lines[0].offset = 0; + text_info->lines[0].len = text_info->length; + text_info->n_lines = 1; + measure_text(render_priv); + } + + // Reorder text into visual order + FriBidiStrIndex *cmap = ass_shaper_reorder(render_priv->shaper, text_info); + + // Reposition according to the map + pen.x = 0; + pen.y = 0; + int lineno = 1; + for (i = 0; i < text_info->length; i++) { + GlyphInfo *info = glyphs + cmap[i]; + if (glyphs[i].linebreak) { + pen.x = 0; + pen.y += double_to_d6(text_info->lines[lineno-1].desc); + pen.y += double_to_d6(text_info->lines[lineno].asc); + pen.y += double_to_d6(render_priv->settings.line_spacing); + lineno++; + } + if (info->skip) continue; + FT_Vector cluster_pen = pen; + while (info) { + info->pos.x = info->offset.x + cluster_pen.x; + info->pos.y = info->offset.y + cluster_pen.y; + cluster_pen.x += info->advance.x; + cluster_pen.y += info->advance.y; + info = info->next; + } + info = glyphs + cmap[i]; + pen.x += info->cluster_advance.x; + pen.y += info->cluster_advance.y; + } - // align text + // align lines + if (render_priv->state.evt_type != EVENT_HSCROLL) { last_break = -1; - for (i = 1; i < text_info->length + 1; ++i) { // (text_info->length + 1) is the end of the last line - if ((i == text_info->length) - || glyphs[i].linebreak) { - double width, shift = 0; - GlyphInfo *first_glyph = - glyphs + last_break + 1; - GlyphInfo *last_glyph = glyphs + i - 1; - - while (first_glyph < last_glyph && first_glyph->skip) - first_glyph++; - - while ((last_glyph > first_glyph) - && ((last_glyph->symbol == '\n') - || (last_glyph->symbol == 0) - || (last_glyph->skip))) - last_glyph--; - - width = d6_to_double( - last_glyph->pos.x + last_glyph->advance.x - - first_glyph->pos.x); + double width = 0; + for (i = 0; i <= text_info->length; ++i) { // (text_info->length + 1) is the end of the last line + if ((i == text_info->length) || glyphs[i].linebreak) { + // remove letter spacing (which is included in cluster_advance) + if (i > 0) + width -= render_priv->state.hspacing * render_priv->font_scale * + glyphs[i-1].scale_x; + double shift = 0; if (halign == HALIGN_LEFT) { // left aligned, no action shift = 0; } else if (halign == HALIGN_RIGHT) { // right aligned @@ -1967,13 +1943,20 @@ shift = (max_text_width - width) / 2.0; } for (j = last_break + 1; j < i; ++j) { - glyphs[j].pos.x += double_to_d6(shift); + GlyphInfo *info = glyphs + j; + while (info) { + info->pos.x += double_to_d6(shift); + info = info->next; + } } last_break = i - 1; + width = 0; + } + if (i < text_info->length && !glyphs[i].skip && + glyphs[i].symbol != '\n' && glyphs[i].symbol != 0) { + width += d6_to_double(glyphs[i].cluster_advance.x); } } - } else { // render_priv->state.evt_type == EVENT_HSCROLL - measure_text(render_priv); } // determing text bounding box @@ -2099,32 +2082,38 @@ for (i = 0; i < text_info->length; ++i) { GlyphInfo *info = glyphs + i; + while (info) { + OutlineBitmapHashKey *key = &info->hash_key.u.outline; - if (info->hash_key.frx || info->hash_key.fry - || info->hash_key.frz || info->hash_key.fax - || info->hash_key.fay) { - info->hash_key.shift_x = info->pos.x + double_to_d6(device_x - center.x); - info->hash_key.shift_y = - -(info->pos.y + double_to_d6(device_y - center.y)); - } else { - info->hash_key.shift_x = 0; - info->hash_key.shift_y = 0; + if (key->frx || key->fry || key->frz || key->fax || key->fay) { + key->shift_x = info->pos.x + double_to_d6(device_x - center.x); + key->shift_y = -(info->pos.y + double_to_d6(device_y - center.y)); + } else { + key->shift_x = 0; + key->shift_y = 0; + } + info = info->next; } } } // convert glyphs to bitmaps - device_x *= render_priv->font_scale_x; + int left = render_priv->settings.left_margin; + device_x = (device_x - left) * render_priv->font_scale_x + left; for (i = 0; i < text_info->length; ++i) { - GlyphInfo *g = glyphs + i; - g->pos.x *= render_priv->font_scale_x; - g->hash_key.advance.x = - double_to_d6(device_x - (int) device_x + - d6_to_double(g->pos.x & SUBPIXEL_MASK)) & ~SUBPIXEL_ACCURACY; - g->hash_key.advance.y = - double_to_d6(device_y - (int) device_y + - d6_to_double(g->pos.y & SUBPIXEL_MASK)) & ~SUBPIXEL_ACCURACY; - get_bitmap_glyph(render_priv, glyphs + i); + GlyphInfo *info = glyphs + i; + while (info) { + OutlineBitmapHashKey *key = &info->hash_key.u.outline; + info->pos.x *= render_priv->font_scale_x; + key->advance.x = + double_to_d6(device_x - (int) device_x + + d6_to_double(info->pos.x & SUBPIXEL_MASK)) & ~SUBPIXEL_ACCURACY; + key->advance.y = + double_to_d6(device_y - (int) device_y + + d6_to_double(info->pos.y & SUBPIXEL_MASK)) & ~SUBPIXEL_ACCURACY; + get_bitmap_glyph(render_priv, info); + info = info->next; + } } memset(event_images, 0, sizeof(*event_images)); @@ -2139,6 +2128,7 @@ event_images->event = event; event_images->imgs = render_text(render_priv, (int) device_x, (int) device_y); + ass_shaper_cleanup(render_priv->shaper, text_info); free_render_context(render_priv); return 0; @@ -2162,24 +2152,16 @@ */ static void check_cache_limits(ASS_Renderer *priv, CacheStore *cache) { - if (cache->bitmap_cache->cache_size > cache->bitmap_max_size) { - ass_msg(priv->library, MSGL_V, - "Hitting hard bitmap cache limit (was: %ld bytes), " - "resetting.", (long) cache->bitmap_cache->cache_size); - cache->bitmap_cache = ass_bitmap_cache_reset(cache->bitmap_cache); - cache->composite_cache = ass_composite_cache_reset( - cache->composite_cache); + if (ass_cache_empty(cache->bitmap_cache, cache->bitmap_max_size)) { + ass_cache_empty(cache->composite_cache, 0); ass_free_images(priv->prev_images_root); priv->prev_images_root = 0; } - - if (cache->glyph_cache->count > cache->glyph_max - || cache->glyph_cache->cache_size > cache->bitmap_max_size) { - ass_msg(priv->library, MSGL_V, - "Hitting hard glyph cache limit (was: %d glyphs, %ld bytes), " - "resetting.", - cache->glyph_cache->count, (long) cache->glyph_cache->cache_size); - cache->glyph_cache = ass_glyph_cache_reset(cache->glyph_cache); + if (ass_cache_empty(cache->outline_cache, cache->glyph_max)) { + ass_cache_empty(cache->bitmap_cache, 0); + ass_cache_empty(cache->composite_cache, 0); + ass_free_images(priv->prev_images_root); + priv->prev_images_root = 0; } } @@ -2210,7 +2192,7 @@ render_priv->track = track; render_priv->time = now; - ass_lazy_track_init(render_priv); + ass_lazy_track_init(render_priv->library, render_priv->track); render_priv->font_scale = settings_priv->font_size_coeff * render_priv->orig_height / render_priv->track->PlayResY; @@ -2221,6 +2203,11 @@ else render_priv->border_scale = 1.; + ass_shaper_set_kerning(render_priv->shaper, track->Kerning); + if (track->Language) + ass_shaper_set_language(render_priv->shaper, track->Language); + ass_shaper_set_level(render_priv->shaper, render_priv->settings.shaper); + // PAR correction render_priv->font_scale_x = render_priv->settings.aspect / render_priv->settings.storage_aspect; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_render.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_render.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_render.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_render.h 2011-12-03 21:35:56.000000000 +0000 @@ -4,19 +4,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef LIBASS_RENDER_H @@ -29,6 +27,9 @@ #include FT_GLYPH_H #include FT_SYNTHESIS_H +// XXX: fix the inclusion mess so we can avoid doing this here +typedef struct ass_shaper ASS_Shaper; + #include "ass.h" #include "ass_font.h" #include "ass_bitmap.h" @@ -41,6 +42,9 @@ #define GLYPH_CACHE_MAX 1000 #define BITMAP_CACHE_MAX_SIZE 30 * 1048576 +#define PARSED_FADE (1<<0) +#define PARSED_A (1<<1) + typedef struct { double xMin; double xMax; @@ -72,6 +76,7 @@ double aspect; // frame aspect ratio, d_width / d_height. double storage_aspect; // pixel ratio of the source image ASS_Hinting hinting; + ASS_ShapingLevel shaper; char *default_font; char *default_family; @@ -95,19 +100,26 @@ // describes a glyph // GlyphInfo and TextInfo are used for text centering and word-wrapping operations -typedef struct { +typedef struct glyph_info { unsigned symbol; unsigned skip; // skip glyph when layouting text - FT_Glyph glyph; - FT_Glyph outline_glyph; + ASS_Font *font; + int face_index; + int glyph_index; + double font_size; + ASS_Drawing *drawing; + FT_Outline *outline; + FT_Outline *border; Bitmap *bm; // glyph bitmap Bitmap *bm_o; // outline bitmap Bitmap *bm_s; // shadow bitmap FT_BBox bbox; FT_Vector pos; + FT_Vector offset; char linebreak; // the first (leading) glyph of some line ? uint32_t c[4]; // colors FT_Vector advance; // 26.6 + FT_Vector cluster_advance; Effect effect_type; int effect_timing; // time duration of current karaoke word // after process_karaoke_effects: distance in pixels from the glyph origin. @@ -120,12 +132,24 @@ double shadow_y; double frx, fry, frz; // rotation double fax, fay; // text shearing + double scale_x, scale_y; + double border_x, border_y; + unsigned italic; + unsigned bold; + int flags; + + int bm_run_id; + int shape_run_id; BitmapHashKey hash_key; + + // next glyph in this cluster + struct glyph_info *next; } GlyphInfo; typedef struct { double asc, desc; + int offset, len; } LineInfo; typedef struct { @@ -143,9 +167,9 @@ typedef struct { ASS_Event *event; ASS_Style *style; + int parsed_tags; ASS_Font *font; - char *font_path; double font_size; int flags; // decoration flags (underline/strike-through) @@ -184,6 +208,9 @@ int effect_timing; int effect_skip_timing; + // bitmap run id (used for final bitmap rendering) + int bm_run_id; + enum { SCROLL_LR, // left-to-right SCROLL_RL, @@ -198,13 +225,14 @@ unsigned italic; int treat_family_as_pattern; int wrap_style; + int font_encoding; } RenderContext; typedef struct { - Hashmap *font_cache; - Hashmap *glyph_cache; - Hashmap *bitmap_cache; - Hashmap *composite_cache; + Cache *font_cache; + Cache *outline_cache; + Cache *bitmap_cache; + Cache *composite_cache; size_t glyph_max; size_t bitmap_max_size; } CacheStore; @@ -216,6 +244,7 @@ ASS_Settings settings; int render_id; ASS_SynthPriv *synth_priv; + ASS_Shaper *shaper; ASS_Image *images_root; // rendering result is stored here ASS_Image *prev_images_root; @@ -263,4 +292,7 @@ void reset_render_context(ASS_Renderer *render_priv); void ass_free_images(ASS_Image *img); +// XXX: this is actually in ass.c, includes should be fixed later on +void ass_lazy_track_init(ASS_Library *lib, ASS_Track *track); + #endif /* LIBASS_RENDER_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_shaper.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_shaper.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_shaper.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_shaper.c 2011-12-11 15:13:39.000000000 +0000 @@ -0,0 +1,757 @@ +/* + * Copyright (C) 2011 Grigori Goronzy + * + * This file is part of libass. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "config.h" + +#ifdef CONFIG_FRIBIDI +#include +#endif + +#include "ass_shaper.h" +#include "ass_render.h" +#include "ass_font.h" +#include "ass_parse.h" +#include "ass_cache.h" + +#define MAX_RUNS 50 + +#ifdef CONFIG_HARFBUZZ +#include +enum { + VERT = 0, + VKNA, + KERN +}; +#define NUM_FEATURES 3 +#endif + +struct ass_shaper { + ASS_ShapingLevel shaping_level; + + // FriBidi log2vis + int n_glyphs; +#ifdef CONFIG_FRIBIDI + FriBidiChar *event_text; + FriBidiCharType *ctypes; + FriBidiLevel *emblevels; +#endif + FriBidiStrIndex *cmap; + FriBidiParType base_direction; + +#ifdef CONFIG_HARFBUZZ + // OpenType features + int n_features; + hb_feature_t *features; + hb_language_t language; + + // Glyph metrics cache, to speed up shaping + Cache *metrics_cache; +#endif +}; + +#ifdef CONFIG_HARFBUZZ +struct ass_shaper_metrics_data { + Cache *metrics_cache; + GlyphMetricsHashKey hash_key; + int vertical; +}; + +struct ass_shaper_font_data { + hb_font_t *fonts[ASS_FONT_MAX_FACES]; + hb_font_funcs_t *font_funcs[ASS_FONT_MAX_FACES]; + struct ass_shaper_metrics_data *metrics_data[ASS_FONT_MAX_FACES]; +}; +#endif + +/** + * \brief Print version information + */ +void ass_shaper_info(ASS_Library *lib) +{ + ass_msg(lib, MSGL_V, "Shaper:" +#ifdef CONFIG_FRIBIDI + " FriBidi " FRIBIDI_VERSION " (SIMPLE)" +#endif +#ifdef CONFIG_HARFBUZZ + " HarfBuzz-ng %s (COMPLEX)", hb_version_string() +#endif + ); +} + +/** + * \brief grow arrays, if needed + * \param new_size requested size + */ +static void check_allocations(ASS_Shaper *shaper, size_t new_size) +{ + if (new_size > shaper->n_glyphs) { +#ifdef CONFIG_FRIBIDI + shaper->event_text = realloc(shaper->event_text, sizeof(FriBidiChar) * new_size); + shaper->ctypes = realloc(shaper->ctypes, sizeof(FriBidiCharType) * new_size); + shaper->emblevels = realloc(shaper->emblevels, sizeof(FriBidiLevel) * new_size); +#endif + shaper->cmap = realloc(shaper->cmap, sizeof(FriBidiStrIndex) * new_size); + } +} + +/** + * \brief Free shaper and related data + */ +void ass_shaper_free(ASS_Shaper *shaper) +{ +#ifdef CONFIG_HARFBUZZ + ass_cache_done(shaper->metrics_cache); + free(shaper->features); +#endif +#ifdef CONFIG_FRIBIDI + free(shaper->event_text); + free(shaper->ctypes); + free(shaper->emblevels); +#endif + free(shaper->cmap); + free(shaper); +} + +void ass_shaper_font_data_free(ASS_ShaperFontData *priv) +{ +#ifdef CONFIG_HARFBUZZ + int i; + for (i = 0; i < ASS_FONT_MAX_FACES; i++) + if (priv->fonts[i]) { + free(priv->metrics_data[i]); + hb_font_destroy(priv->fonts[i]); + hb_font_funcs_destroy(priv->font_funcs[i]); + } + free(priv); +#endif +} + +#ifdef CONFIG_HARFBUZZ +/** + * \brief set up the HarfBuzz OpenType feature list with some + * standard features. + */ +static void init_features(ASS_Shaper *shaper) +{ + shaper->features = calloc(sizeof(hb_feature_t), NUM_FEATURES); + + shaper->n_features = NUM_FEATURES; + shaper->features[VERT].tag = HB_TAG('v', 'e', 'r', 't'); + shaper->features[VERT].end = INT_MAX; + shaper->features[VKNA].tag = HB_TAG('v', 'k', 'n', 'a'); + shaper->features[VKNA].end = INT_MAX; + shaper->features[KERN].tag = HB_TAG('k', 'e', 'r', 'n'); + shaper->features[KERN].end = INT_MAX; +} + +/** + * \brief Set features depending on properties of the run + */ +static void set_run_features(ASS_Shaper *shaper, GlyphInfo *info) +{ + // enable vertical substitutions for @font runs + if (info->font->desc.vertical) + shaper->features[VERT].value = shaper->features[VKNA].value = 1; + else + shaper->features[VERT].value = shaper->features[VKNA].value = 0; +} + +/** + * \brief Update HarfBuzz's idea of font metrics + * \param hb_font HarfBuzz font + * \param face associated FreeType font face + */ +static void update_hb_size(hb_font_t *hb_font, FT_Face face) +{ + hb_font_set_scale (hb_font, + ((uint64_t) face->size->metrics.x_scale * (uint64_t) face->units_per_EM) >> 16, + ((uint64_t) face->size->metrics.y_scale * (uint64_t) face->units_per_EM) >> 16); + hb_font_set_ppem (hb_font, face->size->metrics.x_ppem, + face->size->metrics.y_ppem); +} + + +/* + * Cached glyph metrics getters follow + * + * These functions replace HarfBuzz' standard FreeType font functions + * and provide cached access to essential glyph metrics. This usually + * speeds up shaping a lot. It also allows us to use custom load flags. + * + */ + +GlyphMetricsHashValue * +get_cached_metrics(struct ass_shaper_metrics_data *metrics, FT_Face face, + hb_codepoint_t glyph) +{ + GlyphMetricsHashValue *val; + + metrics->hash_key.glyph_index = glyph; + val = ass_cache_get(metrics->metrics_cache, &metrics->hash_key); + + if (!val) { + int load_flags = FT_LOAD_DEFAULT | FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH + | FT_LOAD_IGNORE_TRANSFORM; + GlyphMetricsHashValue new_val; + + if (FT_Load_Glyph(face, glyph, load_flags)) + return NULL; + + memcpy(&new_val.metrics, &face->glyph->metrics, sizeof(FT_Glyph_Metrics)); + val = ass_cache_put(metrics->metrics_cache, &metrics->hash_key, &new_val); + } + + return val; +} + +static hb_bool_t +get_glyph(hb_font_t *font, void *font_data, hb_codepoint_t unicode, + hb_codepoint_t variation, hb_codepoint_t *glyph, void *user_data) +{ + FT_Face face = font_data; + + if (variation) + *glyph = FT_Face_GetCharVariantIndex(face, unicode, variation); + else + *glyph = FT_Get_Char_Index(face, unicode); + + return *glyph != 0; +} + +static hb_position_t +cached_h_advance(hb_font_t *font, void *font_data, hb_codepoint_t glyph, + void *user_data) +{ + FT_Face face = font_data; + struct ass_shaper_metrics_data *metrics_priv = user_data; + GlyphMetricsHashValue *metrics = get_cached_metrics(metrics_priv, face, glyph); + + if (!metrics) + return 0; + + if (metrics_priv->vertical && glyph > VERTICAL_LOWER_BOUND) + return metrics->metrics.vertAdvance; + + return metrics->metrics.horiAdvance; +} + +static hb_position_t +cached_v_advance(hb_font_t *font, void *font_data, hb_codepoint_t glyph, + void *user_data) +{ + FT_Face face = font_data; + struct ass_shaper_metrics_data *metrics_priv = user_data; + GlyphMetricsHashValue *metrics = get_cached_metrics(metrics_priv, face, glyph); + + if (!metrics) + return 0; + + return metrics->metrics.vertAdvance; + +} + +static hb_bool_t +cached_h_origin(hb_font_t *font, void *font_data, hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y, void *user_data) +{ + return 1; +} + +static hb_bool_t +cached_v_origin(hb_font_t *font, void *font_data, hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y, void *user_data) +{ + FT_Face face = font_data; + struct ass_shaper_metrics_data *metrics_priv = user_data; + GlyphMetricsHashValue *metrics = get_cached_metrics(metrics_priv, face, glyph); + + if (!metrics) + return 0; + + *x = metrics->metrics.horiBearingX - metrics->metrics.vertBearingX; + *y = metrics->metrics.horiBearingY - (-metrics->metrics.vertBearingY); + + return 1; +} + +static hb_position_t +get_h_kerning(hb_font_t *font, void *font_data, hb_codepoint_t first, + hb_codepoint_t second, void *user_data) +{ + FT_Face face = font_data; + FT_Vector kern; + + if (FT_Get_Kerning (face, first, second, FT_KERNING_DEFAULT, &kern)) + return 0; + + return kern.x; +} + +static hb_position_t +get_v_kerning(hb_font_t *font, void *font_data, hb_codepoint_t first, + hb_codepoint_t second, void *user_data) +{ + return 0; +} + +static hb_bool_t +cached_extents(hb_font_t *font, void *font_data, hb_codepoint_t glyph, + hb_glyph_extents_t *extents, void *user_data) +{ + FT_Face face = font_data; + struct ass_shaper_metrics_data *metrics_priv = user_data; + GlyphMetricsHashValue *metrics = get_cached_metrics(metrics_priv, face, glyph); + + if (!metrics) + return 0; + + extents->x_bearing = metrics->metrics.horiBearingX; + extents->y_bearing = metrics->metrics.horiBearingY; + extents->width = metrics->metrics.width; + extents->height = metrics->metrics.height; + + return 1; +} + +static hb_bool_t +get_contour_point(hb_font_t *font, void *font_data, hb_codepoint_t glyph, + unsigned int point_index, hb_position_t *x, + hb_position_t *y, void *user_data) +{ + FT_Face face = font_data; + int load_flags = FT_LOAD_DEFAULT | FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH + | FT_LOAD_IGNORE_TRANSFORM; + + if (FT_Load_Glyph(face, glyph, load_flags)) + return 0; + + if (point_index >= (unsigned)face->glyph->outline.n_points) + return 0; + + *x = face->glyph->outline.points[point_index].x; + *y = face->glyph->outline.points[point_index].y; + + return 1; +} + +/** + * \brief Retrieve HarfBuzz font from cache. + * Create it from FreeType font, if needed. + * \param info glyph cluster + * \return HarfBuzz font + */ +static hb_font_t *get_hb_font(ASS_Shaper *shaper, GlyphInfo *info) +{ + ASS_Font *font = info->font; + hb_font_t **hb_fonts; + + if (!font->shaper_priv) + font->shaper_priv = calloc(sizeof(ASS_ShaperFontData), 1); + + + hb_fonts = font->shaper_priv->fonts; + if (!hb_fonts[info->face_index]) { + hb_fonts[info->face_index] = + hb_ft_font_create(font->faces[info->face_index], NULL); + + // set up cached metrics access + font->shaper_priv->metrics_data[info->face_index] = + calloc(sizeof(struct ass_shaper_metrics_data), 1); + struct ass_shaper_metrics_data *metrics = + font->shaper_priv->metrics_data[info->face_index]; + metrics->metrics_cache = shaper->metrics_cache; + metrics->vertical = info->font->desc.vertical; + + hb_font_funcs_t *funcs = hb_font_funcs_create(); + font->shaper_priv->font_funcs[info->face_index] = funcs; + hb_font_funcs_set_glyph_func(funcs, get_glyph, + metrics, NULL); + hb_font_funcs_set_glyph_h_advance_func(funcs, cached_h_advance, + metrics, NULL); + hb_font_funcs_set_glyph_v_advance_func(funcs, cached_v_advance, + metrics, NULL); + hb_font_funcs_set_glyph_h_origin_func(funcs, cached_h_origin, + metrics, NULL); + hb_font_funcs_set_glyph_v_origin_func(funcs, cached_v_origin, + metrics, NULL); + hb_font_funcs_set_glyph_h_kerning_func(funcs, get_h_kerning, + metrics, NULL); + hb_font_funcs_set_glyph_v_kerning_func(funcs, get_v_kerning, + metrics, NULL); + hb_font_funcs_set_glyph_extents_func(funcs, cached_extents, + metrics, NULL); + hb_font_funcs_set_glyph_contour_point_func(funcs, get_contour_point, + metrics, NULL); + hb_font_set_funcs(hb_fonts[info->face_index], funcs, + font->faces[info->face_index], NULL); + } + + ass_face_set_size(font->faces[info->face_index], info->font_size); + update_hb_size(hb_fonts[info->face_index], font->faces[info->face_index]); + + // update hash key for cached metrics + struct ass_shaper_metrics_data *metrics = + font->shaper_priv->metrics_data[info->face_index]; + metrics->hash_key.font = info->font; + metrics->hash_key.face_index = info->face_index; + metrics->hash_key.size = info->font_size; + metrics->hash_key.scale_x = double_to_d6(info->scale_x); + metrics->hash_key.scale_y = double_to_d6(info->scale_y); + + return hb_fonts[info->face_index]; +} + +/** + * \brief Shape event text with HarfBuzz. Full OpenType shaping. + * \param glyphs glyph clusters + * \param len number of clusters + */ +static void shape_harfbuzz(ASS_Shaper *shaper, GlyphInfo *glyphs, size_t len) +{ + int i, j; + int run = 0; + struct { + int offset; + int end; + hb_buffer_t *buf; + hb_font_t *font; + } runs[MAX_RUNS]; + + + for (i = 0; i < len && run < MAX_RUNS; i++, run++) { + // get length and level of the current run + int k = i; + int level = glyphs[i].shape_run_id; + int direction = shaper->emblevels[k] % 2; + while (i < (len - 1) && level == glyphs[i+1].shape_run_id) + i++; + runs[run].offset = k; + runs[run].end = i; + runs[run].buf = hb_buffer_create(); + runs[run].font = get_hb_font(shaper, glyphs + k); + set_run_features(shaper, glyphs + k); + hb_buffer_pre_allocate(runs[run].buf, i - k + 1); + hb_buffer_set_direction(runs[run].buf, direction ? HB_DIRECTION_RTL : + HB_DIRECTION_LTR); + hb_buffer_set_language(runs[run].buf, shaper->language); + hb_buffer_add_utf32(runs[run].buf, shaper->event_text + k, i - k + 1, + 0, i - k + 1); + hb_shape(runs[run].font, runs[run].buf, shaper->features, + shaper->n_features); + } + + // Initialize: skip all glyphs, this is undone later as needed + for (i = 0; i < len; i++) + glyphs[i].skip = 1; + + // Update glyph indexes, positions and advances from the shaped runs + for (i = 0; i < run; i++) { + int num_glyphs = hb_buffer_get_length(runs[i].buf); + hb_glyph_info_t *glyph_info = hb_buffer_get_glyph_infos(runs[i].buf, NULL); + hb_glyph_position_t *pos = hb_buffer_get_glyph_positions(runs[i].buf, NULL); + + for (j = 0; j < num_glyphs; j++) { + int idx = glyph_info[j].cluster + runs[i].offset; + GlyphInfo *info = glyphs + idx; + GlyphInfo *root = info; + + // if we have more than one glyph per cluster, allocate a new one + // and attach to the root glyph + if (info->skip == 0) { + while (info->next) + info = info->next; + info->next = malloc(sizeof(GlyphInfo)); + memcpy(info->next, info, sizeof(GlyphInfo)); + info = info->next; + info->next = NULL; + } + + // set position and advance + info->skip = 0; + info->glyph_index = glyph_info[j].codepoint; + info->offset.x = pos[j].x_offset * info->scale_x; + info->offset.y = -pos[j].y_offset * info->scale_y; + info->advance.x = pos[j].x_advance * info->scale_x; + info->advance.y = -pos[j].y_advance * info->scale_y; + + // accumulate advance in the root glyph + root->cluster_advance.x += info->advance.x; + root->cluster_advance.y += info->advance.y; + } + } + + // Free runs and associated data + for (i = 0; i < run; i++) { + hb_buffer_destroy(runs[i].buf); + } + +} +#endif + +#ifdef CONFIG_FRIBIDI +/** + * \brief Shape event text with FriBidi. Does mirroring and simple + * Arabic shaping. + * \param len number of clusters + */ +static void shape_fribidi(ASS_Shaper *shaper, GlyphInfo *glyphs, size_t len) +{ + int i; + FriBidiJoiningType *joins = calloc(sizeof(*joins), len); + + // shape on codepoint level + fribidi_get_joining_types(shaper->event_text, len, joins); + fribidi_join_arabic(shaper->ctypes, len, shaper->emblevels, joins); + fribidi_shape(FRIBIDI_FLAGS_DEFAULT | FRIBIDI_FLAGS_ARABIC, + shaper->emblevels, len, joins, shaper->event_text); + + // update indexes + for (i = 0; i < len; i++) { + GlyphInfo *info = glyphs + i; + FT_Face face = info->font->faces[info->face_index]; + info->symbol = shaper->event_text[i]; + info->glyph_index = FT_Get_Char_Index(face, shaper->event_text[i]); + } + + free(joins); +} +#endif + +/** + * \brief Toggle kerning for HarfBuzz shaping. + * NOTE: currently only works with OpenType fonts, the TrueType fallback *always* + * kerns. It's a bug in HarfBuzz. + */ +void ass_shaper_set_kerning(ASS_Shaper *shaper, int kern) +{ +#ifdef CONFIG_HARFBUZZ + shaper->features[KERN].value = !!kern; +#endif +} + +/** + * \brief Find shape runs according to the event's selected fonts + */ +void ass_shaper_find_runs(ASS_Shaper *shaper, ASS_Renderer *render_priv, + GlyphInfo *glyphs, size_t len) +{ + int i; + int shape_run = 0; + + for (i = 0; i < len; i++) { + GlyphInfo *last = glyphs + i - 1; + GlyphInfo *info = glyphs + i; + // skip drawings + if (info->symbol == 0xfffc) + continue; + // set size and get glyph index + ass_font_get_index(render_priv->fontconfig_priv, info->font, + info->symbol, &info->face_index, &info->glyph_index); + // shape runs share the same font face and size + if (i > 0 && (last->font != info->font || + last->font_size != info->font_size || + last->face_index != info->face_index)) + shape_run++; + info->shape_run_id = shape_run; + } + +} + +/** + * \brief Set base direction (paragraph direction) of the text. + * \param dir base direction + */ +void ass_shaper_set_base_direction(ASS_Shaper *shaper, FriBidiParType dir) +{ + shaper->base_direction = dir; +} + +/** + * \brief Set language hint. Some languages have specific character variants, + * like Serbian Cyrillic. + * \param lang ISO 639-1 two-letter language code + */ +void ass_shaper_set_language(ASS_Shaper *shaper, const char *code) +{ +#ifdef CONFIG_HARFBUZZ + shaper->language = hb_language_from_string(code, -1); +#endif +} + +/** + * Set shaping level. Essentially switches between FriBidi and HarfBuzz. + */ +void ass_shaper_set_level(ASS_Shaper *shaper, ASS_ShapingLevel level) +{ + shaper->shaping_level = level; +} + +/** + * \brief Shape an event's text. Calculates directional runs and shapes them. + * \param text_info event's text + */ +void ass_shaper_shape(ASS_Shaper *shaper, TextInfo *text_info) +{ +#ifndef CONFIG_FRIBIDI + check_allocations(shaper, text_info->length); +#else + int i, last_break; + FriBidiParType dir; + GlyphInfo *glyphs = text_info->glyphs; + + check_allocations(shaper, text_info->length); + + // Get bidi character types and embedding levels + last_break = 0; + for (i = 0; i < text_info->length; i++) { + shaper->event_text[i] = glyphs[i].symbol; + // embedding levels should be calculated paragraph by paragraph + if (glyphs[i].symbol == '\n' || i == text_info->length - 1) { + dir = shaper->base_direction; + fribidi_get_bidi_types(shaper->event_text + last_break, + i - last_break + 1, shaper->ctypes + last_break); + fribidi_get_par_embedding_levels(shaper->ctypes + last_break, + i - last_break + 1, &dir, shaper->emblevels + last_break); + last_break = i + 1; + } + } + + // add embedding levels to shape runs for final runs + for (i = 0; i < text_info->length; i++) { + glyphs[i].shape_run_id += shaper->emblevels[i]; + } + +#ifdef CONFIG_HARFBUZZ + switch (shaper->shaping_level) { + case ASS_SHAPING_SIMPLE: + shape_fribidi(shaper, glyphs, text_info->length); + break; + case ASS_SHAPING_COMPLEX: + shape_harfbuzz(shaper, glyphs, text_info->length); + break; + } +#else + shape_fribidi(shaper, glyphs, text_info->length); +#endif + + + // clean up + for (i = 0; i < text_info->length; i++) { + // Skip direction override control characters + // NOTE: Behdad said HarfBuzz is supposed to remove these, but this hasn't + // been implemented yet + if (glyphs[i].symbol <= 0x202F && glyphs[i].symbol >= 0x202a) { + glyphs[i].symbol = 0; + glyphs[i].skip++; + } + } +#endif +} + +/** + * \brief Create a new shaper instance and preallocate data structures + * \param prealloc preallocation size + */ +ASS_Shaper *ass_shaper_new(size_t prealloc) +{ + ASS_Shaper *shaper = calloc(sizeof(*shaper), 1); + +#ifdef CONFIG_FRIBIDI + shaper->base_direction = FRIBIDI_PAR_ON; +#endif + check_allocations(shaper, prealloc); + +#ifdef CONFIG_HARFBUZZ + init_features(shaper); + shaper->metrics_cache = ass_glyph_metrics_cache_create(); +#endif + + return shaper; +} + + +/** + * \brief clean up additional data temporarily needed for shaping and + * (e.g. additional glyphs allocated) + */ +void ass_shaper_cleanup(ASS_Shaper *shaper, TextInfo *text_info) +{ + int i; + + for (i = 0; i < text_info->length; i++) { + GlyphInfo *info = text_info->glyphs + i; + info = info->next; + while (info) { + GlyphInfo *next = info->next; + free(info); + info = next; + } + } +} + +/** + * \brief Calculate reorder map to render glyphs in visual order + */ +FriBidiStrIndex *ass_shaper_reorder(ASS_Shaper *shaper, TextInfo *text_info) +{ + int i; + + // Initialize reorder map + for (i = 0; i < text_info->length; i++) + shaper->cmap[i] = i; + +#ifdef CONFIG_FRIBIDI + // Create reorder map line-by-line + for (i = 0; i < text_info->n_lines; i++) { + LineInfo *line = text_info->lines + i; + int level; + FriBidiParType dir = FRIBIDI_PAR_ON; + + level = fribidi_reorder_line(0, + shaper->ctypes + line->offset, line->len, 0, dir, + shaper->emblevels + line->offset, NULL, + shaper->cmap + line->offset); + } +#endif + + return shaper->cmap; +} + +/** + * \brief Resolve a Windows font encoding number to a suitable + * base direction. 177 and 178 are Hebrew and Arabic respectively, and + * they map to RTL. 1 is autodetection and is mapped to just that. + * Everything else is mapped to LTR. + * \param enc Windows font encoding + */ +FriBidiParType resolve_base_direction(int enc) +{ +#ifdef CONFIG_FRIBIDI + switch (enc) { + case 1: + return FRIBIDI_PAR_ON; + case 177: + case 178: + return FRIBIDI_PAR_RTL; + default: + return FRIBIDI_PAR_LTR; + } +#else + return 0; +#endif +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_shaper.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_shaper.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_shaper.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_shaper.h 2011-12-11 15:13:39.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2011 Grigori Goronzy + * + * This file is part of libass. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef LIBASS_SHAPER_H +#define LIBASS_SHAPER_H + +#include "config.h" + +#ifdef CONFIG_FRIBIDI +#include +#else +typedef int FriBidiParType; +typedef int FriBidiStrIndex; +#endif +#include "ass_render.h" + +void ass_shaper_info(ASS_Library *lib); +ASS_Shaper *ass_shaper_new(size_t prealloc); +void ass_shaper_free(ASS_Shaper *shaper); +void ass_shaper_set_kerning(ASS_Shaper *shaper, int kern); +void ass_shaper_find_runs(ASS_Shaper *shaper, ASS_Renderer *render_priv, + GlyphInfo *glyphs, size_t len); +void ass_shaper_set_base_direction(ASS_Shaper *shaper, FriBidiParType dir); +void ass_shaper_set_language(ASS_Shaper *shaper, const char *code); +void ass_shaper_set_level(ASS_Shaper *shaper, ASS_ShapingLevel level); +void ass_shaper_shape(ASS_Shaper *shaper, TextInfo *text_info); +void ass_shaper_cleanup(ASS_Shaper *shaper, TextInfo *text_info); +FriBidiStrIndex *ass_shaper_reorder(ASS_Shaper *shaper, TextInfo *text_info); +FriBidiParType resolve_base_direction(int font_encoding); + +void ass_shaper_font_data_free(ASS_ShaperFontData *priv); + +#endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_types.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_types.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_types.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_types.h 2011-12-03 21:35:56.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef LIBASS_TYPES_H @@ -114,6 +112,7 @@ int WrapStyle; int ScaledBorderAndShadow; int Kerning; + char *Language; int default_style; // index of default style char *name; // file name in case of external subs, 0 for streams diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_utils.c mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_utils.c --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_utils.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_utils.c 2011-09-11 10:33:13.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "config.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_utils.h mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_utils.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/ass_utils.h 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/ass_utils.h 2011-09-11 10:33:13.000000000 +0000 @@ -3,19 +3,17 @@ * * This file is part of libass. * - * libass 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef LIBASS_UTILS_H diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libass/mputils.h mplayer-1.0~rc4.dfsg1+svn34540/libass/mputils.h --- mplayer-1.0~rc4.dfsg1+svn33713/libass/mputils.h 2010-10-27 18:22:50.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libass/mputils.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2006 Evgeniy Stepanov - * - * This file is part of libass. - * - * libass 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. - * - * libass 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 libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef LIBASS_MPUTILS_H -#define LIBASS_MPUTILS_H - -#include "mp_msg.h" -#include "help_mp.h" -#include "sub/font_load.h" // for blur() -#include "sub/subreader.h" // for guess_buffer_cp -#include "sub/sub.h" // for utf8_get_char -#include "libavutil/common.h" - -#endif /* LIBASS_MPUTILS_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libdvdnav/searching.c mplayer-1.0~rc4.dfsg1+svn34540/libdvdnav/searching.c --- mplayer-1.0~rc4.dfsg1+svn33713/libdvdnav/searching.c 2010-10-26 08:16:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libdvdnav/searching.c 2011-10-07 17:06:24.000000000 +0000 @@ -47,7 +47,7 @@ /* Return placed in vobu. */ /* Returns error status */ /* FIXME: Maybe need to handle seeking outside current cell. */ -static dvdnav_status_t dvdnav_scan_admap(dvdnav_t *this, int32_t domain, uint32_t seekto_block, uint32_t *vobu) { +static dvdnav_status_t dvdnav_scan_admap(dvdnav_t *this, int32_t domain, uint32_t seekto_block, int next, uint32_t *vobu) { vobu_admap_t *admap = NULL; #ifdef LOG_DEBUG @@ -89,7 +89,7 @@ vobu_start = next_vobu; address++; } - *vobu = vobu_start; + *vobu = next ? next_vobu : vobu_start; return DVDNAV_STATUS_OK; } fprintf(MSG_OUT, "libdvdnav: admap not located\n"); @@ -160,7 +160,7 @@ fprintf(MSG_OUT, "libdvdnav: Seeking to cell %i from choice of %i to %i\n", cell_nr, first_cell_nr, last_cell_nr); #endif - if (dvdnav_scan_admap(this, state->domain, target, &vobu) == DVDNAV_STATUS_OK) { + if (dvdnav_scan_admap(this, state->domain, target, 0, &vobu) == DVDNAV_STATUS_OK) { uint32_t start = state->pgc->cell_playback[cell_nr-1].first_sector; if (vm_jump_cell_block(this->vm, cell_nr, vobu - start)) { @@ -184,9 +184,13 @@ dvdnav_status_t dvdnav_sector_search(dvdnav_t *this, uint64_t offset, int32_t origin) { uint32_t target = 0; + uint32_t current_pos; + uint32_t cur_sector; + uint32_t cur_cell_nr; uint32_t length = 0; uint32_t first_cell_nr, last_cell_nr, cell_nr; int32_t found; + int forward = 0; cell_playback_t *cell; dvd_state_t *state; dvdnav_status_t result; @@ -213,6 +217,10 @@ fprintf(MSG_OUT, "libdvdnav: Before cellN=%u blockN=%u\n", state->cellN, state->blockN); #endif + current_pos = target; + cur_sector = this->vobu.vobu_start + this->vobu.blockN; + cur_cell_nr = state->cellN; + switch(origin) { case SEEK_SET: if(offset >= length) { @@ -244,6 +252,7 @@ pthread_mutex_unlock(&this->vm_lock); return DVDNAV_STATUS_ERR; } + forward = target > current_pos; this->cur_cell_time = 0; if (this->pgc_based) { @@ -270,6 +279,27 @@ } else { /* convert the target sector from Cell-relative to absolute physical sector */ target += cell->first_sector; + if (forward && (cell_nr == cur_cell_nr)) { + uint32_t vobu; + /* if we are seeking forward from the current position, make sure + * we move to a new position that is after our current position. + * simply truncating to the vobu will go backwards */ + if (dvdnav_scan_admap(this, state->domain, target, 0, &vobu) != DVDNAV_STATUS_OK) + break; + if (vobu <= cur_sector) { + if (dvdnav_scan_admap(this, state->domain, target, 1, &vobu) != DVDNAV_STATUS_OK) + break; + if (vobu > cell->last_sector) { + if (cell_nr == last_cell_nr) + break; + cell_nr++; + cell = &(state->pgc->cell_playback[cell_nr-1]); + target = cell->first_sector; + } else { + target = vobu; + } + } + } found = 1; break; } @@ -281,7 +311,7 @@ fprintf(MSG_OUT, "libdvdnav: Seeking to cell %i from choice of %i to %i\n", cell_nr, first_cell_nr, last_cell_nr); #endif - if (dvdnav_scan_admap(this, state->domain, target, &vobu) == DVDNAV_STATUS_OK) { + if (dvdnav_scan_admap(this, state->domain, target, 0, &vobu) == DVDNAV_STATUS_OK) { int32_t start = state->pgc->cell_playback[cell_nr-1].first_sector; if (vm_jump_cell_block(this->vm, cell_nr, vobu - start)) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libdvdread4/dvd_udf.c mplayer-1.0~rc4.dfsg1+svn34540/libdvdread4/dvd_udf.c --- mplayer-1.0~rc4.dfsg1+svn33713/libdvdread4/dvd_udf.c 2010-10-26 08:16:06.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libdvdread4/dvd_udf.c 2011-10-06 12:10:01.000000000 +0000 @@ -329,16 +329,17 @@ static int Unicodedecode( uint8_t *data, int len, char *target ) { int p = 1, i = 0; + int err = 0; if( ( data[ 0 ] == 8 ) || ( data[ 0 ] == 16 ) ) do { - if( data[ 0 ] == 16 ) p++; /* Ignore MSB of unicode16 */ + if( data[ 0 ] == 16 ) err |= data[p++]; /* character cannot be converted to 8bit, return error */ if( p < len ) { target[ i++ ] = data[ p++ ]; } } while( p < len ); target[ i ] = '\0'; - return 0; + return !err; } static int UDFDescriptor( uint8_t *data, uint16_t *TagID ) @@ -490,8 +491,9 @@ L_FI = GETN1(19); UDFLongAD(&data[20], FileICB); L_IU = GETN2(36); - if (L_FI) Unicodedecode(&data[38 + L_IU], L_FI, FileName); - else FileName[0] = '\0'; + if (L_FI) { + if (!Unicodedecode(&data[38 + L_IU], L_FI, FileName)) FileName[0] = 0; + } else FileName[0] = '\0'; return 4 * ((38 + L_FI + L_IU + 3) / 4); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libdvdread4/ifo_read.c mplayer-1.0~rc4.dfsg1+svn34540/libdvdread4/ifo_read.c --- mplayer-1.0~rc4.dfsg1+svn33713/libdvdread4/ifo_read.c 2011-01-31 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libdvdread4/ifo_read.c 2011-10-07 16:56:02.000000000 +0000 @@ -1139,9 +1139,9 @@ int ifoRead_VTS_PTT_SRPT(ifo_handle_t *ifofile) { - vts_ptt_srpt_t *vts_ptt_srpt; + vts_ptt_srpt_t *vts_ptt_srpt = NULL; int info_length, i, j; - uint32_t *data; + uint32_t *data = NULL; if(!ifofile) return 0; @@ -1156,16 +1156,16 @@ ifofile->vtsi_mat->vts_ptt_srpt * DVD_BLOCK_LEN)) return 0; - vts_ptt_srpt = (vts_ptt_srpt_t *)malloc(sizeof(vts_ptt_srpt_t)); + vts_ptt_srpt = malloc(sizeof(vts_ptt_srpt_t)); if(!vts_ptt_srpt) return 0; + vts_ptt_srpt->title = NULL; ifofile->vts_ptt_srpt = vts_ptt_srpt; if(!(DVDReadBytes(ifofile->file, vts_ptt_srpt, VTS_PTT_SRPT_SIZE))) { fprintf(stderr, "libdvdread: Unable to read PTT search table.\n"); - free(vts_ptt_srpt); - return 0; + goto fail; } B2N_16(vts_ptt_srpt->nr_of_srpts); @@ -1176,21 +1176,19 @@ CHECK_VALUE(vts_ptt_srpt->nr_of_srpts < 100); /* ?? */ info_length = vts_ptt_srpt->last_byte + 1 - VTS_PTT_SRPT_SIZE; + data = malloc(info_length); + if(!data) + goto fail; - data = (uint32_t *)malloc(info_length); - if(!data) { - free(vts_ptt_srpt); - ifofile->vts_ptt_srpt = 0; - return 0; - } if(!(DVDReadBytes(ifofile->file, data, info_length))) { fprintf(stderr, "libdvdread: Unable to read PTT search table.\n"); - free(vts_ptt_srpt); - free(data); - ifofile->vts_ptt_srpt = 0; - return 0; + goto fail; } + if(vts_ptt_srpt->nr_of_srpts > info_length / sizeof(*data)) { + fprintf(stderr, "libdvdread: PTT search table too small.\n"); + goto fail; + } for(i = 0; i < vts_ptt_srpt->nr_of_srpts; i++) { B2N_32(data[i]); /* assert(data[i] + sizeof(ptt_info_t) <= vts_ptt_srpt->last_byte + 1); @@ -1203,22 +1201,21 @@ vts_ptt_srpt->ttu_offset = data; vts_ptt_srpt->title = malloc(vts_ptt_srpt->nr_of_srpts * sizeof(ttu_t)); - if(!vts_ptt_srpt->title) { - free(vts_ptt_srpt); - free(data); - ifofile->vts_ptt_srpt = 0; - return 0; - } + if(!vts_ptt_srpt->title) + goto fail; + for(i = 0; i < vts_ptt_srpt->nr_of_srpts; i++) { int n; if(i < vts_ptt_srpt->nr_of_srpts - 1) n = (data[i+1] - data[i]); else n = (vts_ptt_srpt->last_byte + 1 - data[i]); + /* assert(n > 0 && (n % 4) == 0); Magic Knight Rayearth Daybreak is mastered very strange and has Titles with 0 PTTs. */ if(n < 0) n = 0; + CHECK_VALUE(n % 4 == 0); vts_ptt_srpt->title[i].nr_of_ptts = n / 4; @@ -1226,10 +1223,8 @@ if(!vts_ptt_srpt->title[i].ptt) { for(n = 0; n < i; n++) free(vts_ptt_srpt->title[n].ptt); - free(vts_ptt_srpt); - free(data); - ifofile->vts_ptt_srpt = 0; - return 0; + + goto fail; } for(j = 0; j < vts_ptt_srpt->title[i].nr_of_ptts; j++) { /* The assert placed here because of Magic Knight Rayearth Daybreak */ @@ -1259,6 +1254,13 @@ } return 1; + +fail: + free(data); + ifofile->vts_ptt_srpt = 0; + free(vts_ptt_srpt->title); + free(vts_ptt_srpt); + return 0; } @@ -1289,7 +1291,7 @@ if(!ifofile->vmgi_mat) return 0; - if(ifofile->vmgi_mat->ptl_mait == 0) + if(ifofile->vmgi_mat->ptl_mait == NULL) return 1; if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->ptl_mait * DVD_BLOCK_LEN)) @@ -1303,7 +1305,7 @@ if(!(DVDReadBytes(ifofile->file, ptl_mait, PTL_MAIT_SIZE))) { free(ptl_mait); - ifofile->ptl_mait = 0; + ifofile->ptl_mait = NULL; return 0; } @@ -1322,7 +1324,7 @@ ptl_mait->countries = (ptl_mait_country_t *)malloc(info_length); if(!ptl_mait->countries) { free(ptl_mait); - ifofile->ptl_mait = 0; + ifofile->ptl_mait = NULL; return 0; } for(i = 0; i < ptl_mait->nr_of_countries; i++) { @@ -1334,7 +1336,7 @@ fprintf(stderr, "libdvdread: Unable to read PTL_MAIT.\n"); free(ptl_mait->countries); free(ptl_mait); - ifofile->ptl_mait = 0; + ifofile->ptl_mait = NULL; return 0; } } @@ -1413,7 +1415,7 @@ } free(ifofile->ptl_mait->countries); free(ifofile->ptl_mait); - ifofile->ptl_mait = 0; + ifofile->ptl_mait = NULL; } } @@ -1894,6 +1896,7 @@ ifoFree_PGC(pgcit->pgci_srp[j].pgc); free(pgcit->pgci_srp[j].pgc); } + free(pgcit->pgci_srp[i].pgc); goto fail; } } @@ -1909,7 +1912,10 @@ if(pgcit) { int i; for(i = 0; i < pgcit->nr_of_pgci_srp; i++) + { ifoFree_PGC(pgcit->pgci_srp[i].pgc); + free(pgcit->pgci_srp[i].pgc); + } free(pgcit->pgci_srp); } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmenu/menu_dvbin.c mplayer-1.0~rc4.dfsg1+svn34540/libmenu/menu_dvbin.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmenu/menu_dvbin.c 2010-10-26 08:15:58.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmenu/menu_dvbin.c 2011-10-26 15:12:35.000000000 +0000 @@ -32,6 +32,7 @@ #include "m_struct.h" #include "m_option.h" +#include "mp_msg.h" #include "libmpcodecs/img_format.h" #include "libmpcodecs/mp_image.h" @@ -125,7 +126,7 @@ } else { - mp_msg(MSGT_DEMUX, MSGL_ERR, "dvb_menu: fill_menu: couldn't malloc %d bytes for menu item: %s, exit\n", + mp_msg(MSGT_DEMUX, MSGL_ERR, "dvb_menu: fill_menu: couldn't malloc %zu bytes for menu item: %s, exit\n", sizeof(list_entry_t), strerror(errno)); break; } @@ -155,7 +156,7 @@ } else { - fprintf(stderr, "dvb_menu: fill_menu: couldn't malloc %d bytes for menu item: %s, exit\n", + fprintf(stderr, "dvb_menu: fill_menu: couldn't malloc %zu bytes for menu item: %s, exit\n", sizeof(list_entry_t), strerror(errno)); if(n) return 1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad.c 2011-10-12 17:23:08.000000000 +0000 @@ -56,6 +56,7 @@ extern const ad_functions_t mpcodecs_ad_realaud; extern const ad_functions_t mpcodecs_ad_libdv; extern const ad_functions_t mpcodecs_ad_qtaudio; +extern const ad_functions_t mpcodecs_ad_spdif; extern const ad_functions_t mpcodecs_ad_twin; extern const ad_functions_t mpcodecs_ad_libmusepack; extern const ad_functions_t mpcodecs_ad_libdca; @@ -75,6 +76,7 @@ &mpcodecs_ad_hwmpa, #ifdef CONFIG_FFMPEG &mpcodecs_ad_ffmpeg, + &mpcodecs_ad_spdif, #endif &mpcodecs_ad_pcm, &mpcodecs_ad_dvdpcm, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_dk3adpcm.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_dk3adpcm.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_dk3adpcm.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_dk3adpcm.c 2011-10-26 15:12:35.000000000 +0000 @@ -33,6 +33,7 @@ #include #include "config.h" +#include "mp_msg.h" #include "libavutil/intreadwrite.h" #include "ad_internal.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_faad.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_faad.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_faad.c 2011-01-03 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_faad.c 2011-10-26 15:12:35.000000000 +0000 @@ -26,6 +26,7 @@ #include #include "config.h" +#include "mp_msg.h" #include "ad_internal.h" #include "dec_audio.h" #include "libaf/reorder_ch.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_ffmpeg.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_ffmpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_ffmpeg.c 2011-03-20 09:29:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_ffmpeg.c 2011-08-27 11:02:04.000000000 +0000 @@ -26,7 +26,7 @@ #include "ad_internal.h" #include "dec_audio.h" -#include "vd_ffmpeg.h" +#include "av_helpers.h" #include "libaf/reorder_ch.h" #include "fmt-conversion.h" @@ -100,7 +100,7 @@ return 0; } - lavc_context = avcodec_alloc_context(); + lavc_context = avcodec_alloc_context3(lavc_codec); sh_audio->context=lavc_context; lavc_context->drc_scale = drc_level; @@ -115,7 +115,6 @@ } lavc_context->request_channels = audio_output_channels; lavc_context->codec_tag = sh_audio->format; //FOURCC - lavc_context->codec_type = AVMEDIA_TYPE_AUDIO; lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi /* alloc extra data */ @@ -136,7 +135,7 @@ } /* open it */ - if (avcodec_open(lavc_context, lavc_codec) < 0) { + if (avcodec_open2(lavc_context, lavc_codec, NULL) < 0) { mp_msg(MSGT_DECAUDIO,MSGL_ERR, MSGTR_CantOpenCodec); return 0; } @@ -236,8 +235,8 @@ sh_audio->ds->buffer_pos+=y-x; // put back data (HACK!) if(len2>0){ if (((AVCodecContext *)sh_audio->context)->channels >= 5) { - int samplesize = av_get_bits_per_sample_fmt(((AVCodecContext *) - sh_audio->context)->sample_fmt) / 8; + int samplesize = av_get_bytes_per_sample(((AVCodecContext *) + sh_audio->context)->sample_fmt); reorder_channel_nch(buf, AF_CHANNEL_LAYOUT_LAVC_DEFAULT, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT, ((AVCodecContext *)sh_audio->context)->channels, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_libmad.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_libmad.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_libmad.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_libmad.c 2011-10-26 15:12:35.000000000 +0000 @@ -21,7 +21,7 @@ #include #include "config.h" - +#include "mp_msg.h" #include "ad_internal.h" static const ad_info_t info = { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_libvorbis.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_libvorbis.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_libvorbis.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_libvorbis.c 2011-10-26 15:12:35.000000000 +0000 @@ -23,6 +23,7 @@ #include #include "config.h" +#include "mp_msg.h" #include "ad_internal.h" #include "libaf/reorder_ch.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_mpc.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_mpc.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_mpc.c 2010-11-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_mpc.c 2011-10-26 15:12:35.000000000 +0000 @@ -28,6 +28,7 @@ #include #include "config.h" +#include "mp_msg.h" #include "ad_internal.h" #include "libaf/af_format.h" #include "libvo/fastmemcpy.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_mpg123.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_mpg123.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_mpg123.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_mpg123.c 2011-10-26 15:12:35.000000000 +0000 @@ -23,7 +23,7 @@ #include #include "config.h" - +#include "mp_msg.h" #include "ad_internal.h" #include "dec_audio.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_msadpcm.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_msadpcm.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_msadpcm.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_msadpcm.c 2011-10-26 15:12:35.000000000 +0000 @@ -29,6 +29,7 @@ #include #include "config.h" +#include "mp_msg.h" #include "libavutil/common.h" #include "libavutil/intreadwrite.h" #include "mpbswap.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_realaud.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_realaud.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_realaud.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_realaud.c 2011-10-26 15:12:35.000000000 +0000 @@ -21,6 +21,7 @@ #include #include "config.h" +#include "mp_msg.h" //#include #ifdef HAVE_LIBDL diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_spdif.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_spdif.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_spdif.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_spdif.c 2011-11-03 19:33:05.000000000 +0000 @@ -0,0 +1,311 @@ +/* + * 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 "config.h" +#include "mp_msg.h" +#include "ad_internal.h" +#include "av_helpers.h" +#include "libavformat/avformat.h" +#include "libavcodec/avcodec.h" +#include "libavutil/opt.h" + +static const ad_info_t info = { + "libavformat/spdifenc audio pass-through decoder.", + "spdif", + "Naoya OYAMA", + "Naoya OYAMA", + "For ALL hardware decoders" +}; + +LIBAD_EXTERN(spdif) + +#define FILENAME_SPDIFENC "spdif" +#define OUTBUF_SIZE 65536 +struct spdifContext { + AVFormatContext *lavf_ctx; + int iec61937_packet_size; + int out_buffer_len; + int out_buffer_size; + uint8_t *out_buffer; + uint8_t pb_buffer[OUTBUF_SIZE]; +}; + +static int read_packet(void *p, uint8_t *buf, int buf_size) +{ + // spdifenc does not use read callback. + return 0; +} + +static int write_packet(void *p, uint8_t *buf, int buf_size) +{ + int len; + struct spdifContext *ctx = p; + + len = FFMIN(buf_size, ctx->out_buffer_size -ctx->out_buffer_len); + memcpy(&ctx->out_buffer[ctx->out_buffer_len], buf, len); + ctx->out_buffer_len += len; + return len; +} + +static int64_t seek(void *p, int64_t offset, int whence) +{ + // spdifenc does not use seek callback. + return 0; +} + +static int preinit(sh_audio_t *sh) +{ + sh->samplesize = 2; + return 1; +} + +static int init(sh_audio_t *sh) +{ + int i, x, in_size, srate, bps, *dtshd_rate; + unsigned char *start; + double pts; + static const struct { + const char *name; enum CodecID id; + } fmt_id_type[] = { + { "aac" , CODEC_ID_AAC }, + { "ac3" , CODEC_ID_AC3 }, + { "dca" , CODEC_ID_DTS }, + { "eac3", CODEC_ID_EAC3 }, + { "mpa" , CODEC_ID_MP3 }, + { "thd" , CODEC_ID_TRUEHD }, + { NULL , 0 } + }; + AVFormatContext *lavf_ctx = NULL; + AVStream *stream = NULL; + const AVOption *opt = NULL; + struct spdifContext *spdif_ctx = NULL; + + spdif_ctx = av_mallocz(sizeof(*spdif_ctx)); + if (!spdif_ctx) + goto fail; + spdif_ctx->lavf_ctx = avformat_alloc_context(); + if (!spdif_ctx->lavf_ctx) + goto fail; + + sh->context = spdif_ctx; + lavf_ctx = spdif_ctx->lavf_ctx; + + init_avformat(); + lavf_ctx->oformat = av_guess_format(FILENAME_SPDIFENC, NULL, NULL); + if (!lavf_ctx->oformat) + goto fail; + lavf_ctx->priv_data = av_mallocz(lavf_ctx->oformat->priv_data_size); + if (!lavf_ctx->priv_data) + goto fail; + lavf_ctx->pb = avio_alloc_context(spdif_ctx->pb_buffer, OUTBUF_SIZE, 1, spdif_ctx, + read_packet, write_packet, seek); + if (!lavf_ctx->pb) + goto fail; + stream = avformat_new_stream(lavf_ctx, 0); + if (!stream) + goto fail; + lavf_ctx->duration = AV_NOPTS_VALUE; + lavf_ctx->start_time = AV_NOPTS_VALUE; + for (i = 0; fmt_id_type[i].name; i++) { + if (!strcmp(sh->codec->dll, fmt_id_type[i].name)) { + lavf_ctx->streams[0]->codec->codec_id = fmt_id_type[i].id; + break; + } + } + lavf_ctx->raw_packet_buffer_remaining_size = RAW_PACKET_BUFFER_SIZE; + if (AVERROR_PATCHWELCOME == lavf_ctx->oformat->write_header(lavf_ctx)) { + mp_msg(MSGT_DECAUDIO,MSGL_INFO, + "This codec is not supported by spdifenc.\n"); + goto fail; + } + + // get sample_rate & bitrate from parser + bps = srate = 0; + x = ds_get_packet_pts(sh->ds, &start, &pts); + in_size = x; + if (x <= 0) { + pts = MP_NOPTS_VALUE; + x = 0; + } + ds_parse(sh->ds, &start, &x, pts, 0); + if (x == 0) { // not enough buffer + srate = 48000; //fake value + bps = 768000/8; //fake value + } else if (sh->avctx) { + if (sh->avctx->sample_rate < 44100) { + mp_msg(MSGT_DECAUDIO,MSGL_INFO, + "This stream sample_rate[%d Hz] may be broken. " + "Force reset 48000Hz.\n", + sh->avctx->sample_rate); + srate = 48000; //fake value + } else + srate = sh->avctx->sample_rate; + bps = sh->avctx->bit_rate/8; + } + sh->ds->buffer_pos -= in_size; + + switch (lavf_ctx->streams[0]->codec->codec_id) { + case CODEC_ID_AAC: + spdif_ctx->iec61937_packet_size = 16384; + sh->sample_format = AF_FORMAT_IEC61937_LE; + sh->samplerate = srate; + sh->channels = 2; + sh->i_bps = bps; + break; + case CODEC_ID_AC3: + spdif_ctx->iec61937_packet_size = 6144; + sh->sample_format = AF_FORMAT_IEC61937_LE; + sh->samplerate = srate; + sh->channels = 2; + sh->i_bps = bps; + break; + case CODEC_ID_DTS: // FORCE USE DTS-HD + opt = av_opt_find(&lavf_ctx->oformat->priv_class, + "dtshd_rate", NULL, 0, 0); + if (!opt) + goto fail; + dtshd_rate = (int*)(((uint8_t*)lavf_ctx->priv_data) + + opt->offset); + *dtshd_rate = 192000*4; + spdif_ctx->iec61937_packet_size = 32768; + sh->sample_format = AF_FORMAT_IEC61937_LE; + sh->samplerate = 192000; // DTS core require 48000 + sh->channels = 2*4; + sh->i_bps = bps; + break; + case CODEC_ID_EAC3: + spdif_ctx->iec61937_packet_size = 24576; + sh->sample_format = AF_FORMAT_IEC61937_LE; + sh->samplerate = 192000; + sh->channels = 2; + sh->i_bps = bps; + break; + case CODEC_ID_MP3: + spdif_ctx->iec61937_packet_size = 4608; + sh->sample_format = AF_FORMAT_MPEG2; + sh->samplerate = srate; + sh->channels = 2; + sh->i_bps = bps; + break; + case CODEC_ID_TRUEHD: + spdif_ctx->iec61937_packet_size = 61440; + sh->sample_format = AF_FORMAT_IEC61937_LE; + sh->samplerate = 192000; + sh->channels = 8; + sh->i_bps = bps; + break; + default: + break; + } + + return 1; + +fail: + uninit(sh); + return 0; +} + +static int decode_audio(sh_audio_t *sh, unsigned char *buf, + int minlen, int maxlen) +{ + struct spdifContext *spdif_ctx = sh->context; + AVFormatContext *lavf_ctx = spdif_ctx->lavf_ctx; + AVPacket pkt; + double pts; + int ret, in_size, consumed, x; + unsigned char *start = NULL; + + consumed = spdif_ctx->out_buffer_len = 0; + spdif_ctx->out_buffer_size = maxlen; + spdif_ctx->out_buffer = buf; + while (spdif_ctx->out_buffer_len + spdif_ctx->iec61937_packet_size < maxlen + && spdif_ctx->out_buffer_len < minlen) { + if (sh->ds->eof) + break; + x = ds_get_packet_pts(sh->ds, &start, &pts); + if (x <= 0) { + x = 0; + ds_parse(sh->ds, &start, &x, MP_NOPTS_VALUE, 0); + if (x == 0) + continue; // END_NOT_FOUND + in_size = x; + } else { + in_size = x; + consumed = ds_parse(sh->ds, &start, &x, pts, 0); + if (x == 0) { + mp_msg(MSGT_DECAUDIO,MSGL_V, + "start[%p] pkt.size[%d] in_size[%d] consumed[%d] x[%d].\n", + start, pkt.size, in_size, consumed, x); + continue; // END_NOT_FOUND + } + sh->ds->buffer_pos -= in_size - consumed; + } + av_init_packet(&pkt); + pkt.data = start; + pkt.size = x; + mp_msg(MSGT_DECAUDIO,MSGL_V, + "start[%p] pkt.size[%d] in_size[%d] consumed[%d] x[%d].\n", + start, pkt.size, in_size, consumed, x); + if (pts != MP_NOPTS_VALUE) { + sh->pts = pts; + sh->pts_bytes = 0; + } + ret = lavf_ctx->oformat->write_packet(lavf_ctx, &pkt); + if (ret < 0) + break; + } + sh->pts_bytes += spdif_ctx->out_buffer_len; + return spdif_ctx->out_buffer_len; +} + +static int control(sh_audio_t *sh, int cmd, void* arg, ...) +{ + unsigned char *start; + double pts; + + switch (cmd) { + case ADCTRL_RESYNC_STREAM: + case ADCTRL_SKIP_FRAME: + ds_get_packet_pts(sh->ds, &start, &pts); + return CONTROL_TRUE; + } + return CONTROL_UNKNOWN; +} + +static void uninit(sh_audio_t *sh) +{ + struct spdifContext *spdif_ctx = sh->context; + AVFormatContext *lavf_ctx = spdif_ctx->lavf_ctx; + + if (lavf_ctx) { + if (lavf_ctx->oformat) + lavf_ctx->oformat->write_trailer(lavf_ctx); + av_freep(&lavf_ctx->pb); + if (lavf_ctx->streams) { + av_freep(&lavf_ctx->streams[0]->codec); + av_freep(&lavf_ctx->streams[0]->info); + av_freep(&lavf_ctx->streams[0]); + } + av_freep(&lavf_ctx->streams); + av_freep(&lavf_ctx->priv_data); + } + av_freep(&lavf_ctx); + av_freep(&spdif_ctx); +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_speex.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_speex.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_speex.c 2011-04-27 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_speex.c 2011-10-26 15:12:35.000000000 +0000 @@ -21,11 +21,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "config.h" #include #include #include #include + +#include "config.h" +#include "mp_msg.h" #include "ad_internal.h" static const ad_info_t info = { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_twin.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_twin.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ad_twin.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ad_twin.c 2011-10-26 15:12:35.000000000 +0000 @@ -19,8 +19,9 @@ #include #include #include -#include "config.h" +#include "config.h" +#include "mp_msg.h" #include "ad_internal.h" #include "vqf.h" #include "libmpdemux/aviprint.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ae_faac.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ae_faac.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ae_faac.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ae_faac.c 2011-07-27 15:33:03.000000000 +0000 @@ -32,6 +32,7 @@ #include "libmpdemux/muxer.h" #include #include "ae.h" +#include "ae_faac.h" static faacEncHandle faac; @@ -129,7 +130,7 @@ return enc_frame_size; } -int close_faac(audio_encoder_t *encoder) +static int close_faac(audio_encoder_t *encoder) { return 1; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ae_lame.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ae_lame.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ae_lame.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ae_lame.c 2011-07-24 23:55:34.000000000 +0000 @@ -162,7 +162,7 @@ encoder->stream->h.dwRate=encoder->stream->wf->nAvgBytesPerSec; encoder->stream->h.dwScale=1; encoder->stream->wf->nBlockAlign=1; - mp_msg(MSGT_MENCODER, MSGL_V, MSGTR_CBRAudioByterate, + mp_msg(MSGT_MENCODER, MSGL_V, "\n\nCBR audio: %d bytes/sec, %d bytes/block\n", encoder->stream->h.dwRate,((MPEGLAYER3WAVEFORMAT*)(encoder->stream->wf))->nBlockSize); } } @@ -193,14 +193,14 @@ if(lame_param_mode>=0) lame_set_mode(lame,lame_param_mode); // j-st if(lame_param_ratio>0) lame_set_compression_ratio(lame,lame_param_ratio); if(lame_param_scale>0) { - mp_msg(MSGT_MENCODER, MSGL_V, MSGTR_SettingAudioInputGain, lame_param_scale); + mp_msg(MSGT_MENCODER, MSGL_V, "Setting audio input gain to %f.\n", lame_param_scale); lame_set_scale(lame,lame_param_scale); } if(lame_param_lowpassfreq>=-1) lame_set_lowpassfreq(lame,lame_param_lowpassfreq); if(lame_param_highpassfreq>=-1) lame_set_highpassfreq(lame,lame_param_highpassfreq); #ifdef CONFIG_MP3LAME_PRESET if(lame_param_preset != NULL) { - mp_msg(MSGT_MENCODER, MSGL_V, MSGTR_LamePresetEquals,lame_param_preset); + mp_msg(MSGT_MENCODER, MSGL_V, "\npreset=%s\n\n", lame_param_preset); if(lame_presets_set(lame,lame_param_fast, (lame_param_vbr==0), lame_param_preset) < 0) return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ae_lavc.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ae_lavc.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ae_lavc.c 2011-06-13 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ae_lavc.c 2011-10-23 12:12:43.000000000 +0000 @@ -30,7 +30,7 @@ #include "stream/stream.h" #include "libmpdemux/muxer.h" #include "ae_lavc.h" -#include "vd_ffmpeg.h" +#include "av_helpers.h" #include "ve.h" #include "help_mp.h" #include "av_opts.h" @@ -170,7 +170,7 @@ } if(lavc_param_atag == 0) { - lavc_param_atag = av_codec_get_tag(mp_wav_taglists, lavc_acodec->id); + lavc_param_atag = mp_codec_id2tag(lavc_acodec->id, 0, 1); if(!lavc_param_atag) { mp_msg(MSGT_MENCODER, MSGL_FATAL, "Couldn't find wav tag for specified codec, exit\n"); @@ -178,14 +178,13 @@ } } - lavc_actx = avcodec_alloc_context(); + lavc_actx = avcodec_alloc_context3(lavc_acodec); if(lavc_actx == NULL) { mp_msg(MSGT_MENCODER, MSGL_FATAL, MSGTR_CouldntAllocateLavcContext); return 0; } - lavc_actx->codec_type = AVMEDIA_TYPE_AUDIO; lavc_actx->codec_id = lavc_acodec->id; // put sample parameters lavc_actx->sample_fmt = AV_SAMPLE_FMT_S16; @@ -238,7 +237,7 @@ lavc_actx->flags2 |= CODEC_FLAG2_LOCAL_HEADER; } - if(avcodec_open(lavc_actx, lavc_acodec) < 0) + if(avcodec_open2(lavc_actx, lavc_acodec, NULL) < 0) { mp_msg(MSGT_MENCODER, MSGL_FATAL, MSGTR_CouldntOpenCodec, lavc_param_acodec, lavc_param_abitrate); return 0; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/dec_audio.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/dec_audio.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/dec_audio.c 2011-01-25 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/dec_audio.c 2011-07-24 23:55:34.000000000 +0000 @@ -86,7 +86,7 @@ /* allocate audio in buffer: */ if (sh_audio->audio_in_minsize > 0) { sh_audio->a_in_buffer_size = sh_audio->audio_in_minsize; - mp_msg(MSGT_DECAUDIO, MSGL_V, MSGTR_AllocatingBytesForInputBuffer, + mp_msg(MSGT_DECAUDIO, MSGL_V, "dec_audio: Allocating %d bytes for input buffer.\n", sh_audio->a_in_buffer_size); sh_audio->a_in_buffer = av_mallocz(sh_audio->a_in_buffer_size); sh_audio->a_in_buffer_len = 0; @@ -94,7 +94,7 @@ sh_audio->a_buffer_size = sh_audio->audio_out_minsize + MAX_OUTBURST; - mp_msg(MSGT_DECAUDIO, MSGL_V, MSGTR_AllocatingBytesForOutputBuffer, + mp_msg(MSGT_DECAUDIO, MSGL_V, "dec_audio: Allocating %d + %d = %d bytes for output buffer.\n", sh_audio->audio_out_minsize, MAX_OUTBURST, sh_audio->a_buffer_size); sh_audio->a_buffer = av_mallocz(sh_audio->a_buffer_size); @@ -305,7 +305,7 @@ sh_audio->afilter = NULL; } if (sh_audio->initialized) { - mp_msg(MSGT_DECAUDIO, MSGL_V, MSGTR_UninitAudioStr, + mp_msg(MSGT_DECAUDIO, MSGL_V, "Uninit audio: %s\n", sh_audio->codec->drv); sh_audio->ad_driver->uninit(sh_audio); #ifdef CONFIG_DYNAMIC_PLUGINS @@ -345,7 +345,8 @@ // filter config: memcpy(&afs->cfg, &af_cfg, sizeof(af_cfg_t)); - mp_msg(MSGT_DECAUDIO, MSGL_V, MSGTR_BuildingAudioFilterChain, + mp_msg(MSGT_DECAUDIO, MSGL_V, + "Building audio filter chain for %dHz/%dch/%s -> %dHz/%dch/%s...\n", afs->input.rate, afs->input.nch, af_fmt2str_short(afs->input.format), afs->output.rate, afs->output.nch, af_fmt2str_short(afs->output.format)); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/dec_video.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/dec_video.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/dec_video.c 2010-12-13 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/dec_video.c 2011-12-05 18:22:56.000000000 +0000 @@ -81,12 +81,12 @@ { vf_instance_t *vf = sh_video->vfilter; if (vf) { - int ret = vf->control(vf, VFCTRL_SET_PP_LEVEL, (void *) (&quality)); + int ret = vf->control(vf, VFCTRL_SET_PP_LEVEL, &quality); if (ret == CONTROL_TRUE) return; // success } if (mpvdec) - mpvdec->control(sh_video, VDCTRL_SET_PP_LEVEL, (void *) (&quality)); + mpvdec->control(sh_video, VDCTRL_SET_PP_LEVEL, &quality); } int set_video_colors(sh_video_t *sh_video, const char *item, int value) @@ -108,7 +108,8 @@ if (mpvdec->control(sh_video, VDCTRL_SET_EQUALIZER, item, (int *) value) == CONTROL_OK) return 1; - mp_msg(MSGT_DECVIDEO, MSGL_V, MSGTR_VideoAttributeNotSupportedByVO_VD, + mp_msg(MSGT_DECVIDEO, MSGL_V, + "Video attribute '%s' is not supported by selected vo & vd.\n", item); return 0; } @@ -174,7 +175,7 @@ { if (!sh_video->initialized) return; - mp_msg(MSGT_DECVIDEO, MSGL_V, MSGTR_UninitVideoStr, sh_video->codec->drv); + mp_msg(MSGT_DECVIDEO, MSGL_V, "Uninit video: %s\n", sh_video->codec->drv); mpvdec->uninit(sh_video); mpvdec = NULL; #ifdef CONFIG_DYNAMIC_PLUGINS @@ -419,15 +420,13 @@ } } -#if HAVE_MMX // some codecs are broken, and doesn't restore MMX state :( // it happens usually with broken/damaged files. - if (gCpuCaps.has3DNow) { + if (HAVE_AMD3DNOW && gCpuCaps.has3DNow) { __asm__ volatile ("femms\n\t":::"memory"); - } else if (gCpuCaps.hasMMX) { + } else if (HAVE_MMX && gCpuCaps.hasMMX) { __asm__ volatile ("emms\n\t":::"memory"); } -#endif t2 = GetTimer(); t = t2 - t; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/img_format.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/img_format.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/img_format.c 2011-05-11 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/img_format.c 2012-01-05 20:32:10.000000000 +0000 @@ -26,50 +26,57 @@ static char unknown_format[20]; switch(format) { - case IMGFMT_RGB1: return "RGB 1-bit"; - case IMGFMT_RGB4: return "RGB 4-bit"; - case IMGFMT_RG4B: return "RGB 4-bit per byte"; - case IMGFMT_RGB8: return "RGB 8-bit"; - case IMGFMT_RGB12: return "RGB 12-bit"; - case IMGFMT_RGB15: return "RGB 15-bit"; - case IMGFMT_RGB16: return "RGB 16-bit"; - case IMGFMT_RGB24: return "RGB 24-bit"; -// case IMGFMT_RGB32: return "RGB 32-bit"; + case IMGFMT_RGB1: return "RGB 1-bit"; + case IMGFMT_RGB4: return "RGB 4-bit"; + case IMGFMT_RG4B: return "RGB 4-bit per byte"; + case IMGFMT_RGB8: return "RGB 8-bit"; + case IMGFMT_RGB12: return "RGB 12-bit"; + case IMGFMT_RGB15: return "RGB 15-bit"; + case IMGFMT_RGB16: return "RGB 16-bit"; + case IMGFMT_RGB24: return "RGB 24-bit"; +// case IMGFMT_RGB32: return "RGB 32-bit"; case IMGFMT_RGB48LE: return "RGB 48-bit LE"; case IMGFMT_RGB48BE: return "RGB 48-bit BE"; - case IMGFMT_BGR1: return "BGR 1-bit"; - case IMGFMT_BGR4: return "BGR 4-bit"; - case IMGFMT_BG4B: return "BGR 4-bit per byte"; - case IMGFMT_BGR8: return "BGR 8-bit"; - case IMGFMT_BGR12: return "BGR 12-bit"; - case IMGFMT_BGR15: return "BGR 15-bit"; - case IMGFMT_BGR16: return "BGR 16-bit"; - case IMGFMT_BGR24: return "BGR 24-bit"; -// case IMGFMT_BGR32: return "BGR 32-bit"; - case IMGFMT_ABGR: return "ABGR"; - case IMGFMT_BGRA: return "BGRA"; - case IMGFMT_ARGB: return "ARGB"; - case IMGFMT_RGBA: return "RGBA"; - case IMGFMT_YVU9: return "Planar YVU9"; - case IMGFMT_IF09: return "Planar IF09"; - case IMGFMT_YV12: return "Planar YV12"; - case IMGFMT_I420: return "Planar I420"; - case IMGFMT_IYUV: return "Planar IYUV"; - case IMGFMT_CLPL: return "Planar CLPL"; - case IMGFMT_Y800: return "Planar Y800"; - case IMGFMT_Y8: return "Planar Y8"; + case IMGFMT_BGR1: return "BGR 1-bit"; + case IMGFMT_BGR4: return "BGR 4-bit"; + case IMGFMT_BG4B: return "BGR 4-bit per byte"; + case IMGFMT_BGR8: return "BGR 8-bit"; + case IMGFMT_BGR12: return "BGR 12-bit"; + case IMGFMT_BGR15: return "BGR 15-bit"; + case IMGFMT_BGR16: return "BGR 16-bit"; + case IMGFMT_BGR24: return "BGR 24-bit"; +// case IMGFMT_BGR32: return "BGR 32-bit"; + case IMGFMT_ABGR: return "ABGR"; + case IMGFMT_BGRA: return "BGRA"; + case IMGFMT_ARGB: return "ARGB"; + case IMGFMT_RGBA: return "RGBA"; + case IMGFMT_GBR24P: return "Planar GBR 24-bit"; + case IMGFMT_YVU9: return "Planar YVU9"; + case IMGFMT_IF09: return "Planar IF09"; + case IMGFMT_YV12: return "Planar YV12"; + case IMGFMT_I420: return "Planar I420"; + case IMGFMT_IYUV: return "Planar IYUV"; + case IMGFMT_CLPL: return "Planar CLPL"; + case IMGFMT_Y800: return "Planar Y800"; + case IMGFMT_Y8: return "Planar Y8"; case IMGFMT_420P16_LE: return "Planar 420P 16-bit little-endian"; case IMGFMT_420P16_BE: return "Planar 420P 16-bit big-endian"; case IMGFMT_420P10_LE: return "Planar 420P 10-bit little-endian"; case IMGFMT_420P10_BE: return "Planar 420P 10-bit big-endian"; - case IMGFMT_420P9_LE: return "Planar 420P 9-bit little-endian"; - case IMGFMT_420P9_BE: return "Planar 420P 9-bit big-endian"; + case IMGFMT_420P9_LE: return "Planar 420P 9-bit little-endian"; + case IMGFMT_420P9_BE: return "Planar 420P 9-bit big-endian"; case IMGFMT_422P16_LE: return "Planar 422P 16-bit little-endian"; case IMGFMT_422P16_BE: return "Planar 422P 16-bit big-endian"; case IMGFMT_422P10_LE: return "Planar 422P 10-bit little-endian"; case IMGFMT_422P10_BE: return "Planar 422P 10-bit big-endian"; + case IMGFMT_422P9_LE: return "Planar 422P 9-bit little-endian"; + case IMGFMT_422P9_BE: return "Planar 422P 9-bit big-endian"; case IMGFMT_444P16_LE: return "Planar 444P 16-bit little-endian"; case IMGFMT_444P16_BE: return "Planar 444P 16-bit big-endian"; + case IMGFMT_444P10_LE: return "Planar 444P 10-bit little-endian"; + case IMGFMT_444P10_BE: return "Planar 444P 10-bit big-endian"; + case IMGFMT_444P9_LE: return "Planar 444P 9-bit little-endian"; + case IMGFMT_444P9_BE: return "Planar 444P 9-bit big-endian"; case IMGFMT_420A: return "Planar 420P with alpha"; case IMGFMT_444P: return "Planar 444P"; case IMGFMT_422P: return "Planar 422P"; @@ -97,18 +104,18 @@ case IMGFMT_CLJR: return "Packed CLJR"; case IMGFMT_YUVP: return "Packed YUVP"; case IMGFMT_UYVP: return "Packed UYVP"; - case IMGFMT_MPEGPES: return "Mpeg PES"; - case IMGFMT_ZRMJPEGNI: return "Zoran MJPEG non-interlaced"; - case IMGFMT_ZRMJPEGIT: return "Zoran MJPEG top field first"; - case IMGFMT_ZRMJPEGIB: return "Zoran MJPEG bottom field first"; + case IMGFMT_MPEGPES: return "Mpeg PES"; + case IMGFMT_ZRMJPEGNI: return "Zoran MJPEG non-interlaced"; + case IMGFMT_ZRMJPEGIT: return "Zoran MJPEG top field first"; + case IMGFMT_ZRMJPEGIB: return "Zoran MJPEG bottom field first"; case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation"; case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT"; - case IMGFMT_VDPAU_MPEG1: return "MPEG1 VDPAU acceleration"; - case IMGFMT_VDPAU_MPEG2: return "MPEG2 VDPAU acceleration"; - case IMGFMT_VDPAU_H264: return "H.264 VDPAU acceleration"; - case IMGFMT_VDPAU_MPEG4: return "MPEG-4 Part 2 VDPAU acceleration"; - case IMGFMT_VDPAU_WMV3: return "WMV3 VDPAU acceleration"; - case IMGFMT_VDPAU_VC1: return "VC1 VDPAU acceleration"; + case IMGFMT_VDPAU_MPEG1: return "MPEG1 VDPAU acceleration"; + case IMGFMT_VDPAU_MPEG2: return "MPEG2 VDPAU acceleration"; + case IMGFMT_VDPAU_H264: return "H.264 VDPAU acceleration"; + case IMGFMT_VDPAU_MPEG4: return "MPEG-4 Part 2 VDPAU acceleration"; + case IMGFMT_VDPAU_WMV3: return "WMV3 VDPAU acceleration"; + case IMGFMT_VDPAU_VC1: return "VC1 VDPAU acceleration"; } snprintf(unknown_format,20,"Unknown 0x%04x",format); return unknown_format; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/img_format.h mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/img_format.h --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/img_format.h 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/img_format.h 2012-01-05 20:32:10.000000000 +0000 @@ -39,21 +39,23 @@ #define IMGFMT_BGR_MASK 0xFFFFFF00 #define IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8)) -#define IMGFMT_BGR1 (IMGFMT_BGR|1) -#define IMGFMT_BGR4 (IMGFMT_BGR|4) +#define IMGFMT_BGR1 (IMGFMT_BGR|1) +#define IMGFMT_BGR4 (IMGFMT_BGR|4) #define IMGFMT_BGR4_CHAR (IMGFMT_BGR|4|128) // BGR4 with 1 pixel per byte -#define IMGFMT_BGR8 (IMGFMT_BGR|8) +#define IMGFMT_BGR8 (IMGFMT_BGR|8) #define IMGFMT_BGR12 (IMGFMT_BGR|12) #define IMGFMT_BGR15 (IMGFMT_BGR|15) #define IMGFMT_BGR16 (IMGFMT_BGR|16) #define IMGFMT_BGR24 (IMGFMT_BGR|24) #define IMGFMT_BGR32 (IMGFMT_BGR|32) +#define IMGFMT_GBR24P (('G'<<24)|('B'<<16)|('R'<<8)|24) + #if HAVE_BIGENDIAN -#define IMGFMT_ABGR IMGFMT_RGB32 -#define IMGFMT_BGRA (IMGFMT_RGB32|64) -#define IMGFMT_ARGB IMGFMT_BGR32 -#define IMGFMT_RGBA (IMGFMT_BGR32|64) +#define IMGFMT_ABGR IMGFMT_RGB32 +#define IMGFMT_BGRA (IMGFMT_RGB32|64) +#define IMGFMT_ARGB IMGFMT_BGR32 +#define IMGFMT_RGBA (IMGFMT_BGR32|64) #define IMGFMT_RGB48NE IMGFMT_RGB48BE #define IMGFMT_RGB12BE IMGFMT_RGB12 #define IMGFMT_RGB12LE (IMGFMT_RGB12|64) @@ -123,31 +125,43 @@ #define IMGFMT_444P16_LE 0x51343434 #define IMGFMT_444P16_BE 0x34343451 +#define IMGFMT_444P10_LE 0x52343434 +#define IMGFMT_444P10_BE 0x34343452 +#define IMGFMT_444P9_LE 0x53343434 +#define IMGFMT_444P9_BE 0x34343453 #define IMGFMT_422P16_LE 0x51323234 #define IMGFMT_422P16_BE 0x34323251 #define IMGFMT_422P10_LE 0x52323234 #define IMGFMT_422P10_BE 0x34323252 +#define IMGFMT_422P9_LE 0x53323234 +#define IMGFMT_422P9_BE 0x34323253 #define IMGFMT_420P16_LE 0x51303234 #define IMGFMT_420P16_BE 0x34323051 #define IMGFMT_420P10_LE 0x52303234 #define IMGFMT_420P10_BE 0x34323052 -#define IMGFMT_420P9_LE 0x53303234 -#define IMGFMT_420P9_BE 0x34323053 +#define IMGFMT_420P9_LE 0x53303234 +#define IMGFMT_420P9_BE 0x34323053 #if HAVE_BIGENDIAN #define IMGFMT_444P16 IMGFMT_444P16_BE +#define IMGFMT_444P10 IMGFMT_444P10_BE +#define IMGFMT_444P9 IMGFMT_444P9_BE #define IMGFMT_422P16 IMGFMT_422P16_BE #define IMGFMT_422P10 IMGFMT_422P10_BE +#define IMGFMT_422P9 IMGFMT_422P9_BE #define IMGFMT_420P16 IMGFMT_420P16_BE #define IMGFMT_420P10 IMGFMT_420P10_BE -#define IMGFMT_420P9 IMGFMT_420P9_BE +#define IMGFMT_420P9 IMGFMT_420P9_BE #define IMGFMT_IS_YUVP16_NE(fmt) IMGFMT_IS_YUVP16_BE(fmt) #else #define IMGFMT_444P16 IMGFMT_444P16_LE +#define IMGFMT_444P10 IMGFMT_444P10_LE +#define IMGFMT_444P9 IMGFMT_444P9_LE #define IMGFMT_422P16 IMGFMT_422P16_LE #define IMGFMT_422P10 IMGFMT_422P10_LE +#define IMGFMT_422P9 IMGFMT_422P9_LE #define IMGFMT_420P16 IMGFMT_420P16_LE #define IMGFMT_420P10 IMGFMT_420P10_LE -#define IMGFMT_420P9 IMGFMT_420P9_LE +#define IMGFMT_420P9 IMGFMT_420P9_LE #define IMGFMT_IS_YUVP16_NE(fmt) IMGFMT_IS_YUVP16_LE(fmt) #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/mp_image.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/mp_image.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/mp_image.c 2011-05-11 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/mp_image.c 2012-01-05 20:32:10.000000000 +0000 @@ -28,9 +28,9 @@ #include "libmpcodecs/img_format.h" #include "libmpcodecs/mp_image.h" - #include "libvo/fastmemcpy.h" #include "libavutil/mem.h" +#include "mp_msg.h" void mp_image_alloc_planes(mp_image_t *mpi) { // IF09 - allocate space for 4. plane delta info - unused @@ -121,8 +121,13 @@ mpi->flags|=MP_IMGFLAG_SWAPPED; return; } - mpi->flags|=MP_IMGFLAG_YUV; mpi->num_planes=3; + if (out_fmt == IMGFMT_GBR24P) { + mpi->bpp=24; + mpi->flags|=MP_IMGFLAG_PLANAR; + return; + } + mpi->flags|=MP_IMGFLAG_YUV; if (mp_get_chroma_shift(out_fmt, NULL, NULL, NULL)) { mpi->flags|=MP_IMGFLAG_PLANAR; mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift, NULL); @@ -145,10 +150,16 @@ case IMGFMT_440P: case IMGFMT_444P16_LE: case IMGFMT_444P16_BE: + case IMGFMT_444P10_LE: + case IMGFMT_444P10_BE: + case IMGFMT_444P9_LE: + case IMGFMT_444P9_BE: case IMGFMT_422P16_LE: case IMGFMT_422P16_BE: case IMGFMT_422P10_LE: case IMGFMT_422P10_BE: + case IMGFMT_422P9_LE: + case IMGFMT_422P9_BE: case IMGFMT_420P16_LE: case IMGFMT_420P16_BE: case IMGFMT_420P10_LE: @@ -165,6 +176,7 @@ case IMGFMT_UYVY: mpi->flags|=MP_IMGFLAG_SWAPPED; case IMGFMT_YUY2: + mpi->chroma_x_shift = 1; mpi->bpp=16; mpi->num_planes=1; return; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/mp_image.h mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/mp_image.h --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/mp_image.h 2011-01-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/mp_image.h 2011-10-26 15:12:35.000000000 +0000 @@ -22,7 +22,6 @@ #include #include #include -#include "mp_msg.h" //--------- codec's requirements (filled by the codec/vf) --------- diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/pullup.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/pullup.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/pullup.c 2011-01-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/pullup.c 2011-11-03 13:24:46.000000000 +0000 @@ -19,9 +19,10 @@ #include #include #include + +#include "libavutil/x86_cpu.h" #include "config.h" #include "pullup.h" -#include "cpudetect.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_dmo.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_dmo.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_dmo.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_dmo.c 2011-07-24 23:55:34.000000000 +0000 @@ -89,7 +89,7 @@ DMO_VideoDecoder_SetDestFmt(ctx->decoder,out_fmt&255,0); // RGB/BGR } DMO_VideoDecoder_StartInternal(ctx->decoder); - mp_msg(MSGT_DECVIDEO,MSGL_V,MSGTR_DMOInitOK); + mp_msg(MSGT_DECVIDEO, MSGL_V, "INFO: Win32/DMO video codec init OK.\n"); return 1; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_dshow.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_dshow.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_dshow.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_dshow.c 2011-07-24 23:55:34.000000000 +0000 @@ -99,7 +99,7 @@ } DS_SetAttr_DivX("Quality",divx_quality); DS_VideoDecoder_StartInternal(sh->context); - mp_msg(MSGT_DECVIDEO,MSGL_V,MSGTR_DShowInitOK); + mp_msg(MSGT_DECVIDEO, MSGL_V, "INFO: Win32/DShow video codec init OK.\n"); return 1; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_ffmpeg.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_ffmpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_ffmpeg.c 2011-05-06 05:13:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_ffmpeg.c 2011-12-06 19:59:16.000000000 +0000 @@ -25,6 +25,7 @@ #include "mp_msg.h" #include "help_mp.h" #include "av_opts.h" +#include "av_helpers.h" #include "libavutil/common.h" #include "libavutil/intreadwrite.h" @@ -32,7 +33,6 @@ #include "fmt-conversion.h" #include "vd_internal.h" -#include "vd_ffmpeg.h" static const vd_info_t info = { "FFmpeg's libavcodec codec family", @@ -54,8 +54,6 @@ #include "libavcodec/xvmc.h" #endif -int avcodec_initialized=0; - typedef struct { AVCodecContext *avctx; AVFrame *pic; @@ -72,6 +70,7 @@ int ip_count; int b_count; AVRational last_sample_aspect_ratio; + int palette_sent; } vd_ffmpeg_ctx; #include "m_option.h" @@ -92,6 +91,9 @@ static int lavc_param_idct_algo=0; static int lavc_param_debug=0; static int lavc_param_vismv=0; +#ifdef CODEC_FLAG2_SHOW_ALL +static int lavc_param_wait_keyframe=0; +#endif static int lavc_param_skip_top=0; static int lavc_param_skip_bottom=0; static int lavc_param_fast=0; @@ -120,6 +122,9 @@ {"vstats" , &lavc_param_vstats , CONF_TYPE_FLAG , 0, 0, 1, NULL}, {"debug" , &lavc_param_debug , CONF_TYPE_INT , CONF_RANGE, 0, 9999999, NULL}, {"vismv" , &lavc_param_vismv , CONF_TYPE_INT , CONF_RANGE, 0, 9999999, NULL}, +#ifdef CODEC_FLAG2_SHOW_ALL + {"wait_keyframe" , &lavc_param_wait_keyframe , CONF_TYPE_FLAG , 0, 0, CODEC_FLAG_PART, NULL}, +#endif {"st" , &lavc_param_skip_top , CONF_TYPE_INT , CONF_RANGE, 0, 999, NULL}, {"sb" , &lavc_param_skip_bottom , CONF_TYPE_INT , CONF_RANGE, 0, 999, NULL}, {"fast" , &lavc_param_fast , CONF_TYPE_FLAG , 0, 0, CODEC_FLAG2_FAST, NULL}, @@ -175,62 +180,14 @@ avcodec_flush_buffers(avctx); return CONTROL_TRUE; case VDCTRL_QUERY_UNSEEN_FRAMES: - // has_b_frames includes delay due to frame-multithreading - return avctx->has_b_frames + 10; + // "has_b_frames" contains the (e.g. reorder) delay as specified + // in the standard. "delay" contains the libavcodec-specific delay + // e.g. due to frame multithreading + return avctx->has_b_frames + avctx->delay + 10; } return CONTROL_UNKNOWN; } -static void mp_msp_av_log_callback(void *ptr, int level, const char *fmt, - va_list vl) -{ - static int print_prefix=1; - AVClass *avc= ptr ? *(AVClass **)ptr : NULL; - int type= MSGT_FIXME; - int mp_level; - - switch(level){ - case AV_LOG_VERBOSE: mp_level = MSGL_V ; break; - case AV_LOG_DEBUG: mp_level= MSGL_V ; break; - case AV_LOG_INFO : mp_level= MSGL_INFO; break; - case AV_LOG_ERROR: mp_level= MSGL_ERR ; break; - default : mp_level= level > AV_LOG_DEBUG ? MSGL_DBG2 : MSGL_ERR; break; - } - - if(ptr){ - if(!strcmp(avc->class_name, "AVCodecContext")){ - AVCodecContext *s= ptr; - if(s->codec){ - if(s->codec->type == AVMEDIA_TYPE_AUDIO){ - if(s->codec->decode) - type= MSGT_DECAUDIO; - }else if(s->codec->type == AVMEDIA_TYPE_VIDEO){ - if(s->codec->decode) - type= MSGT_DECVIDEO; - } - //FIXME subtitles, encoders (what msgt for them? there is no appropriate ...) - } - }else if(!strcmp(avc->class_name, "AVFormatContext")){ -#if 0 //needs libavformat include FIXME iam too lazy to do this cleanly, probably the whole should be moved out of this file ... - AVFormatContext *s= ptr; - if(s->iformat) - type= MSGT_DEMUXER; - else if(s->oformat) - type= MSGT_MUXER; -#endif - } - } - - if (!mp_msg_test(type, mp_level)) return; - - if(print_prefix && avc) { - mp_msg(type, mp_level, "[%s @ %p]", avc->item_name(ptr), avc); - } - - print_prefix= strchr(fmt, '\n') != NULL; - mp_msg_va(type, mp_level, fmt, vl); -} - static void set_format_params(struct AVCodecContext *avctx, enum PixelFormat fmt){ int imgfmt; if (fmt == PIX_FMT_NONE) @@ -258,16 +215,6 @@ } } -void init_avcodec(void) -{ - if (!avcodec_initialized) { - avcodec_init(); - avcodec_register_all(); - avcodec_initialized = 1; - av_log_set_callback(mp_msp_av_log_callback); - } -} - // init driver static int init(sh_video_t *sh){ AVCodecContext *avctx; @@ -296,17 +243,15 @@ if(use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug) ctx->do_slices=1; - if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_H264 && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_ROQ && lavc_codec->id != CODEC_ID_VP8 && lavc_codec->id != CODEC_ID_LAGARITH) + if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_H264 && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_VP8 && lavc_codec->id != CODEC_ID_LAGARITH) ctx->do_dr1=1; ctx->b_age= ctx->ip_age[0]= ctx->ip_age[1]= 256*256*256*64; ctx->ip_count= ctx->b_count= 0; ctx->pic = avcodec_alloc_frame(); - ctx->avctx = avcodec_alloc_context(); + ctx->avctx = avcodec_alloc_context3(lavc_codec); avctx = ctx->avctx; - avcodec_get_context_defaults3(avctx, lavc_codec); avctx->opaque = sh; - avctx->codec_type = AVMEDIA_TYPE_VIDEO; avctx->codec_id = lavc_codec->id; avctx->get_format = get_format; @@ -324,6 +269,9 @@ avctx->workaround_bugs= lavc_param_workaround_bugs; avctx->error_recognition= lavc_param_error_resilience; if(lavc_param_gray) avctx->flags|= CODEC_FLAG_GRAY; +#ifdef CODEC_FLAG2_SHOW_ALL + if(!lavc_param_wait_keyframe) avctx->flags2 |= CODEC_FLAG2_SHOW_ALL; +#endif avctx->flags2|= lavc_param_fast; avctx->codec_tag= sh->format; avctx->stream_codec_tag= sh->video.fccHandler; @@ -428,19 +376,6 @@ memcpy(avctx->extradata, sh->bih+1, avctx->extradata_size); break; } - /* Pass palette to codec */ - if (sh->bih && (sh->bih->biBitCount <= 8)) { - avctx->palctrl = av_mallocz(sizeof(AVPaletteControl)); - avctx->palctrl->palette_changed = 1; - if (sh->bih->biSize-sizeof(*sh->bih)) - /* Palette size in biSize */ - memcpy(avctx->palctrl->palette, sh->bih+1, - FFMIN(sh->bih->biSize-sizeof(*sh->bih), AVPALETTE_SIZE)); - else - /* Palette size in biClrUsed */ - memcpy(avctx->palctrl->palette, sh->bih+1, - FFMIN(sh->bih->biClrUsed * 4, AVPALETTE_SIZE)); - } if(sh->bih) avctx->bits_per_coded_sample= sh->bih->biBitCount; @@ -452,7 +387,7 @@ set_format_params(avctx, PIX_FMT_XVMC_MPEG2_IDCT); /* open it */ - if (avcodec_open(avctx, lavc_codec) < 0) { + if (avcodec_open2(avctx, lavc_codec, NULL) < 0) { mp_msg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_CantOpenCodec); uninit(sh); return 0; @@ -598,8 +533,8 @@ int type= MP_IMGTYPE_IPB; int width= avctx->width; int height= avctx->height; - // special case to handle reget_buffer without buffer hints - if (pic->opaque && pic->data[0] && !pic->buffer_hints) + // special case to handle reget_buffer + if (pic->opaque && pic->data[0] && (!pic->buffer_hints || pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE)) return 0; avcodec_align_dimensions(avctx, &width, &height); //printf("get_buffer %d %d %d\n", pic->reference, ctx->ip_count, ctx->b_count); @@ -609,17 +544,15 @@ type = MP_IMGTYPE_TEMP; if (pic->buffer_hints & FF_BUFFER_HINTS_READABLE) flags |= MP_IMGFLAG_READABLE; - if (pic->buffer_hints & FF_BUFFER_HINTS_PRESERVE) { - type = MP_IMGTYPE_STATIC; - flags |= MP_IMGFLAG_PRESERVE; - } - if (pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE) { - type = MP_IMGTYPE_STATIC; + if (pic->buffer_hints & FF_BUFFER_HINTS_PRESERVE || + pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE) { + ctx->ip_count++; + type = MP_IMGTYPE_IP; flags |= MP_IMGFLAG_PRESERVE; } flags|=(avctx->skip_idct<=AVDISCARD_DEFAULT && avctx->skip_frame<=AVDISCARD_DEFAULT && ctx->do_slices) ? MP_IMGFLAG_DRAW_CALLBACK:0; - mp_msg(MSGT_DECVIDEO, MSGL_DBG2, type == MP_IMGTYPE_STATIC ? "using STATIC\n" : "using TEMP\n"); + mp_msg(MSGT_DECVIDEO, MSGL_DBG2, type == MP_IMGTYPE_IP ? "using IP\n" : "using TEMP\n"); } else { if(!pic->reference){ ctx->b_count++; @@ -630,6 +563,11 @@ flags|= MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE | (ctx->do_slices ? MP_IMGFLAG_DRAW_CALLBACK : 0); } + if(avctx->has_b_frames || ctx->b_count){ + type= MP_IMGTYPE_IPB; + }else{ + type= MP_IMGTYPE_IP; + } } if(init_vo(sh, avctx->pix_fmt) < 0){ @@ -644,23 +582,22 @@ if (IMGFMT_IS_HWACCEL(ctx->best_csp)) { type = MP_IMGTYPE_NUMBERED | (0xffff << 16); } else - if (!pic->buffer_hints) { + if (type == MP_IMGTYPE_IP || type == MP_IMGTYPE_IPB) { if(ctx->b_count>1 || ctx->ip_count>2){ mp_msg(MSGT_DECVIDEO, MSGL_WARN, MSGTR_MPCODECS_DRIFailure); ctx->do_dr1=0; //FIXME + // For frame-multithreading these contexts aren't + // the same and must both be updated. + ctx->avctx->get_buffer= avctx->get_buffer= avcodec_default_get_buffer; + ctx->avctx->reget_buffer= avctx->reget_buffer= avcodec_default_reget_buffer; if (pic->data[0]) release_buffer(avctx, pic); return avctx->get_buffer(avctx, pic); } - if(avctx->has_b_frames || ctx->b_count){ - type= MP_IMGTYPE_IPB; - }else{ - type= MP_IMGTYPE_IP; - } mp_msg(MSGT_DECVIDEO, MSGL_DBG2, type== MP_IMGTYPE_IPB ? "using IPB\n" : "using IP\n"); } @@ -774,9 +711,6 @@ } if (mpi) { - // Palette support: free palette buffer allocated in get_buffer - if (mpi->bpp == 8) - av_freep(&mpi->planes[1]); // release mpi (in case MPI_IMGTYPE_NUMBERED is used, e.g. for VDPAU) mpi->usage_count--; } @@ -851,7 +785,30 @@ pkt.size = len; // HACK: make PNGs decode normally instead of as CorePNG delta frames pkt.flags = AV_PKT_FLAG_KEY; + if (!ctx->palette_sent && sh->bih && sh->bih->biBitCount <= 8) { + /* Pass palette to codec */ + uint8_t *pal_data = (uint8_t *)(sh->bih+1); + unsigned palsize = sh->bih->biSize - sizeof(*sh->bih); + unsigned needed_size = 4 << sh->bih->biBitCount; + // Assume palette outside bih in rest of chunk. + // Fixes samples/V-codecs/QPEG/MITSUMI.AVI + if (palsize < needed_size && + sh->bih_size > sh->bih->biSize && + sh->bih_size - sh->bih->biSize > palsize) { + pal_data = (uint8_t *)sh->bih + sh->bih->biSize; + palsize = sh->bih_size - sh->bih->biSize; + } + // if still 0, we simply have no palette in extradata. + if (palsize) { + uint8_t *pal = av_packet_new_side_data(&pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE); + memcpy(pal, pal_data, FFMIN(palsize, AVPALETTE_SIZE)); + } + ctx->palette_sent = 1; + } ret = avcodec_decode_video2(avctx, pic, &got_picture, &pkt); + pkt.data = NULL; + pkt.size = 0; + av_destruct_packet(&pkt); dr1= ctx->do_dr1; if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n"); @@ -946,12 +903,18 @@ if(!mpi) mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE, - avctx->width, avctx->height); + pic->width, pic->height); if(!mpi){ // temporary! mp_msg(MSGT_DECVIDEO, MSGL_WARN, MSGTR_MPCODECS_CouldntAllocateImageForCodec); return NULL; } + if (mpi->w != pic->width || mpi->h != pic->height || + pic->width != avctx->width || pic->height != avctx->height) { + mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Dropping frame with size not matching configured size\n"); + return NULL; + } + if(!dr1){ mpi->planes[0]=pic->data[0]; mpi->planes[1]=pic->data[1]; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_ffmpeg.h mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_ffmpeg.h --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_ffmpeg.h 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_ffmpeg.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -/* - * 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_VD_FFMPEG_H -#define MPLAYER_VD_FFMPEG_H - -void init_avcodec(void); - -#endif /* MPLAYER_VD_FFMPEG_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_theora.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_theora.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_theora.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_theora.c 2012-01-04 22:08:36.000000000 +0000 @@ -39,22 +39,23 @@ LIBVD_EXTERN(theora) -#include +#include #define THEORA_NUM_HEADER_PACKETS 3 typedef struct theora_struct_st { - theora_state st; - theora_comment cc; - theora_info inf; + th_setup_info *tsi; + th_dec_ctx *tctx; + th_comment tc; + th_info ti; } theora_struct_t; /** Convert Theora pixelformat to the corresponding IMGFMT_ */ -static uint32_t theora_pixelformat2imgfmt(theora_pixelformat fmt){ +static uint32_t theora_pixelformat2imgfmt(th_pixel_fmt fmt){ switch(fmt) { - case OC_PF_420: return IMGFMT_YV12; - case OC_PF_422: return IMGFMT_422P; - case OC_PF_444: return IMGFMT_444P; + case TH_PF_420: return IMGFMT_YV12; + case TH_PF_422: return IMGFMT_422P; + case TH_PF_444: return IMGFMT_444P; } return 0; } @@ -64,7 +65,7 @@ theora_struct_t *context = sh->context; switch(cmd) { case VDCTRL_QUERY_FORMAT: - if (*(int*)arg == theora_pixelformat2imgfmt(context->inf.pixelformat)) + if (*(int*)arg == theora_pixelformat2imgfmt(context->ti.pixel_fmt)) return CONTROL_TRUE; return CONTROL_FALSE; } @@ -88,8 +89,9 @@ if (!context) goto err_out; - theora_info_init(&context->inf); - theora_comment_init(&context->cc); + th_info_init(&context->ti); + th_comment_init(&context->tc); + context->tsi = NULL; /* Read all header packets, pass them to theora_decode_header. */ for (i = 0; i < THEORA_NUM_HEADER_PACKETS; i++) @@ -109,7 +111,7 @@ op.b_o_s = 1; } - if ( (errorCode = theora_decode_header (&context->inf, &context->cc, &op)) ) + if ( (errorCode = th_decode_headerin (&context->ti, &context->tc, &context->tsi, &op)) < 0) { mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Broken Theora header; errorCode=%i!\n", errorCode); goto err_out; @@ -117,23 +119,25 @@ } /* now init codec */ - errorCode = theora_decode_init (&context->st, &context->inf); - if (errorCode) + context->tctx = th_decode_alloc (&context->ti, context->tsi); + if (!context->tctx) { - mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode init failed: %i \n", errorCode); + mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode init failed\n"); goto err_out; } + /* free memory used for decoder setup information */ + th_setup_free(context->tsi); - if(sh->aspect==0.0 && context->inf.aspect_denominator!=0) + if(sh->aspect==0.0 && context->ti.aspect_denominator!=0) { - sh->aspect = ((double)context->inf.aspect_numerator * context->inf.width)/ - ((double)context->inf.aspect_denominator * context->inf.height); + sh->aspect = ((double)context->ti.aspect_numerator * context->ti.frame_width)/ + ((double)context->ti.aspect_denominator * context->ti.frame_height); } mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Theora video init ok!\n"); - mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Frame: %dx%d, Picture %dx%d, Offset [%d,%d]\n", context->inf.width, context->inf.height, context->inf.frame_width, context->inf.frame_height, context->inf.offset_x, context->inf.offset_y); + mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Frame: %dx%d, Picture %dx%d, Offset [%d,%d]\n", context->ti.frame_width, context->ti.frame_height, context->ti.pic_width, context->ti.pic_height, context->ti.pic_x, context->ti.pic_y); - return mpcodecs_config_vo (sh,context->inf.width,context->inf.height,theora_pixelformat2imgfmt(context->inf.pixelformat)); + return mpcodecs_config_vo (sh,context->ti.frame_width,context->ti.frame_height,theora_pixelformat2imgfmt(context->ti.pixel_fmt)); err_out: free(context); @@ -150,9 +154,9 @@ if (context) { - theora_info_clear(&context->inf); - theora_comment_clear(&context->cc); - theora_clear (&context->st); + th_info_clear(&context->ti); + th_comment_clear(&context->tc); + th_decode_free (context->tctx); free (context); } } @@ -165,7 +169,7 @@ theora_struct_t *context = sh->context; int errorCode = 0; ogg_packet op; - yuv_buffer yuv; + th_ycbcr_buffer ycbcrbuf; mp_image_t* mpi; // no delayed frames @@ -177,31 +181,31 @@ op.packet = data; op.granulepos = -1; - errorCode = theora_decode_packetin (&context->st, &op); - if (errorCode) + errorCode = th_decode_packetin (context->tctx, &op, NULL); + if (errorCode < 0) { mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode packetin failed: %i \n", errorCode); return NULL; } - errorCode = theora_decode_YUVout (&context->st, &yuv); - if (errorCode) + errorCode = th_decode_ycbcr_out (context->tctx, ycbcrbuf); + if (errorCode < 0) { mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode YUVout failed: %i \n", errorCode); return NULL; } - mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0, yuv.y_width, yuv.y_height); + mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0, ycbcrbuf[0].width, ycbcrbuf[0].height); if(!mpi) return NULL; - mpi->planes[0]=yuv.y; - mpi->stride[0]=yuv.y_stride; - mpi->planes[1]=yuv.u; - mpi->stride[1]=yuv.uv_stride; - mpi->planes[2]=yuv.v; - mpi->stride[2]=yuv.uv_stride; + mpi->planes[0]=ycbcrbuf[0].data; + mpi->stride[0]=ycbcrbuf[0].stride; + mpi->planes[1]=ycbcrbuf[1].data; + mpi->stride[1]=ycbcrbuf[1].stride; + mpi->planes[2]=ycbcrbuf[2].data; + mpi->stride[2]=ycbcrbuf[2].stride; return mpi; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_xanim.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_xanim.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vd_xanim.c 2010-11-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vd_xanim.c 2011-07-27 13:40:06.000000000 +0000 @@ -264,7 +264,8 @@ if (mod_hdr->api_rev > XAVID_API_REV) { - mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: not supported api revision (%d) in %s\n", + mp_msg(MSGT_DECVIDEO, MSGL_FATAL, + "xacodec: not supported api revision (%u) in %s\n", mod_hdr->api_rev, filename); dlclose(priv->file_handler); return 0; @@ -278,27 +279,28 @@ return 0; } - mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Exported functions by codec: [functable: %p entries: %d]\n", + mp_msg(MSGT_DECVIDEO, MSGL_DBG2, + "Exported functions by codec: [functable: %p entries: %u]\n", mod_hdr->funcs, mod_hdr->num_funcs); for (i = 0; i < (int)mod_hdr->num_funcs; i++) { - mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %d: %d %d [iq:%p d:%p]\n", + mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %d: %u %u [iq:%p d:%p]\n", i, func[i].what, func[i].id, func[i].iq_func, func[i].dec_func); if (func[i].what & XAVID_AVI_QUERY) { - mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %p: avi init/query func (id: %d)\n", + mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %p: avi init/query func (id: %u)\n", func[i].iq_func, func[i].id); priv->iq_func = func[i].iq_func; } if (func[i].what & XAVID_QT_QUERY) { - mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %p: qt init/query func (id: %d)\n", + mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %p: qt init/query func (id: %u)\n", func[i].iq_func, func[i].id); priv->iq_func = func[i].iq_func; } if (func[i].what & XAVID_DEC_FUNC) { - mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %p: decoder func (init/query: %p) (id: %d)\n", + mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %p: decoder func (init/query: %p) (id: %u)\n", func[i].dec_func, func[i].iq_func, func[i].id); priv->dec_func = func[i].dec_func; } @@ -476,7 +478,8 @@ void *YUV2x2_Blk_Func(unsigned int image_type, int blks, unsigned int dith_flag) { - mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "YUV2x2_Blk_Func(image_type=%d, blks=%d, dith_flag=%d)\n", + mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, + "YUV2x2_Blk_Func(image_type=%u, blks=%d, dith_flag=%u)\n", image_type, blks, dith_flag); switch(blks){ case 1: @@ -485,7 +488,9 @@ return (void*) XA_2x2_OUT_4BLKS_Convert; } - mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Unimplemented: YUV2x2_Blk_Func(image_type=%d blks=%d dith=%d)\n",image_type,blks,dith_flag); + mp_msg(MSGT_DECVIDEO, MSGL_WARN, + "Unimplemented: YUV2x2_Blk_Func(image_type=%u blks=%d dith=%u)\n", + image_type, blks, dith_flag); return (void*) XA_dummy; } @@ -496,8 +501,9 @@ unsigned int map_flag, unsigned int *map, XA_CHDR *chdr) { - mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV_2x2_clr(%p [%d,%d,%d,%d][%d][%d] %d %p %p)\n", - cmap2x2,Y0,Y1,Y2,Y3,U,V,map_flag,map,chdr); + mp_dbg(MSGT_DECVIDEO, MSGL_DBG3, + "XA_YUV_2x2_clr(%p [%u,%u,%u,%u][%u][%u] %u %p %p)\n", + cmap2x2, Y0, Y1, Y2, Y3, U, V, map_flag, map, chdr); cmap2x2->clr0_0=Y0; cmap2x2->clr0_1=Y1; @@ -510,8 +516,9 @@ void *YUV2x2_Map_Func(unsigned int image_type, unsigned int dith_type) { - mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "YUV2x2_Map_Func('image_type: %d', 'dith_type: %d')", - image_type, dith_type); + mp_dbg(MSGT_DECVIDEO, MSGL_DBG2, + "YUV2x2_Map_Func('image_type: %u', 'dith_type: %u')", + image_type, dith_type); return (void*)XA_YUV_2x2_clr; } @@ -554,17 +561,19 @@ int ystride=(yuv->y_w)?yuv->y_w:imagex; int uvstride=(yuv->uv_w)?yuv->uv_w:(imagex/4); - mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "YUVTabs: %d %p %p %p %p %p\n",yuv_tabs->Uskip_mask, + mp_dbg(MSGT_DECVIDEO, MSGL_DBG3, "YUVTabs: %lu %p %p %p %p %p\n", + yuv_tabs->Uskip_mask, yuv_tabs->YUV_Y_tab, yuv_tabs->YUV_UB_tab, yuv_tabs->YUV_VR_tab, yuv_tabs->YUV_UG_tab, yuv_tabs->YUV_VG_tab ); - mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV1611_Convert('image: %08x', 'imagex: %d', 'imagey: %d', 'i_x: %d', 'i_y: %d', 'yuv_bufs: %08x', 'yuv_tabs: %08x', 'map_flag: %d', 'map: %08x', 'chdr: %08x')", + mp_dbg(MSGT_DECVIDEO, MSGL_DBG3, + "XA_YUV1611_Convert('image: %p', 'imagex: %u', 'imagey: %u', 'i_x: %u', 'i_y: %u', 'yuv_bufs: %p', 'yuv_tabs: %p', 'map_flag: %u', 'map: %p', 'chdr: %p')", image_p, imagex, imagey, i_x, i_y, yuv, yuv_tabs, map_flag, map, chdr); - mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "YUV: %p %p %p %X (%d) %dx%d %dx%d\n", + mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "YUV: %p %p %p %p (%u) %hux%hu %hux%hu\n", yuv->Ybuf,yuv->Ubuf,yuv->Vbuf,yuv->the_buf,yuv->the_buf_size, yuv->y_w,yuv->y_h,yuv->uv_w,yuv->uv_h); @@ -617,7 +626,7 @@ void *XA_YUV1611_Func(unsigned int image_type) { - mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV1611_Func('image_type: %d')", image_type); + mp_dbg(MSGT_DECVIDEO, MSGL_DBG2, "XA_YUV1611_Func('image_type: %u')", image_type); return (void *)XA_YUV1611_Convert; } @@ -634,11 +643,12 @@ int ystride=imagex; //(yuv->y_w)?yuv->y_w:imagex; int uvstride=imagex/2; //(yuv->uv_w)?yuv->uv_w:(imagex/2); - mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV221111_Convert(%p %dx%d %d;%d [%dx%d] %p %p %d %p %p)\n", + mp_dbg(MSGT_DECVIDEO, MSGL_DBG3, + "XA_YUV221111_Convert(%p %ux%u %u;%u [%dx%d] %p %p %u %p %p)\n", image_p,imagex,imagey,i_x,i_y, sh->disp_w, sh->disp_h, yuv,yuv_tabs,map_flag,map,chdr); - mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "YUV: %p %p %p %X (%X) %Xx%X %Xx%X\n", + mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "YUV: %p %p %p %p (%X) %hXx%hX %hXx%hX\n", yuv->Ybuf,yuv->Ubuf,yuv->Vbuf,yuv->the_buf,yuv->the_buf_size, yuv->y_w,yuv->y_h,yuv->uv_w,yuv->uv_h); @@ -655,7 +665,7 @@ void *XA_YUV221111_Func(unsigned int image_type) { - mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV221111_Func('image_type: %d')\n",image_type); + mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV221111_Func('image_type: %u')\n",image_type); return (void *)XA_YUV221111_Convert; } @@ -725,7 +735,8 @@ vo_format_name(sh->codec->outfmt[sh->outfmtidx])); return 0; } - mp_msg(MSGT_DECVIDEO, MSGL_INFO, "xacodec: querying for input %dx%d %dbit [fourcc: %4x] (%s)...\n", + mp_msg(MSGT_DECVIDEO, MSGL_INFO, + "xacodec: querying for input %ux%u %ubit [fourcc: %4x] (%s)...\n", codec_hdr.x, codec_hdr.y, codec_hdr.depth, codec_hdr.compression, codec_hdr.description); if (xacodec_query(sh, &codec_hdr) == 0) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ve_lavc.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ve_lavc.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ve_lavc.c 2011-04-23 02:05:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ve_lavc.c 2011-08-27 11:04:53.000000000 +0000 @@ -47,7 +47,7 @@ #include "mp_image.h" #include "ve.h" #include "vf.h" -#include "vd_ffmpeg.h" +#include "av_helpers.h" //===========================================================================// @@ -686,7 +686,7 @@ lavc_venc_context->thread_count = lavc_param_threads; lavc_venc_context->thread_type = FF_THREAD_FRAME | FF_THREAD_SLICE; - if (avcodec_open(lavc_venc_context, vf->priv->codec) != 0) { + if (avcodec_open2(lavc_venc_context, vf->priv->codec, NULL) != 0) { mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantOpenCodec); return 0; } @@ -1037,8 +1037,7 @@ } vf->priv->pic = avcodec_alloc_frame(); - vf->priv->context = avcodec_alloc_context(); - vf->priv->context->codec_type = AVMEDIA_TYPE_VIDEO; + vf->priv->context = avcodec_alloc_context3(vf->priv->codec); vf->priv->context->codec_id = vf->priv->codec->id; return 1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ve_vfw.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ve_vfw.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ve_vfw.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ve_vfw.c 2011-10-21 15:44:58.000000000 +0000 @@ -147,7 +147,7 @@ return NULL; } fclose(fd); - mp_msg(MSGT_WIN32,MSGL_ERR,"Compressor data %d bytes\n", st.st_size); + mp_msg(MSGT_WIN32,MSGL_ERR,"Compressor data %"PRIu64" bytes\n", st.st_size); if (!(temp_len = (unsigned int) ICSendMessage(encoder_hic, ICM_SETSTATE, (LPARAM) drvdata, (int) st.st_size))){ mp_msg(MSGT_WIN32,MSGL_ERR,"ICSetState failed!\n"); free(drvdata); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ve_xvid4.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ve_xvid4.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/ve_xvid4.c 2010-11-29 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/ve_xvid4.c 2011-07-07 23:06:29.000000000 +0000 @@ -56,6 +56,7 @@ #include #include "m_option.h" +#include "libavutil/rational.h" #include "libavutil/avutil.h" #define FINE (!0) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf.c 2011-04-16 05:56:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf.c 2011-11-05 18:20:44.000000000 +0000 @@ -42,83 +42,84 @@ #include "libvo/fastmemcpy.h" #include "libavutil/mem.h" -extern const vf_info_t vf_info_vo; -extern const vf_info_t vf_info_rectangle; +extern const vf_info_t vf_info_1bpp; +extern const vf_info_t vf_info_2xsai; +extern const vf_info_t vf_info_ass; +extern const vf_info_t vf_info_blackframe; extern const vf_info_t vf_info_bmovl; +extern const vf_info_t vf_info_boxblur; extern const vf_info_t vf_info_crop; -extern const vf_info_t vf_info_expand; -extern const vf_info_t vf_info_pp; -extern const vf_info_t vf_info_scale; -extern const vf_info_t vf_info_format; -extern const vf_info_t vf_info_noformat; -extern const vf_info_t vf_info_flip; -extern const vf_info_t vf_info_rotate; -extern const vf_info_t vf_info_mirror; -extern const vf_info_t vf_info_palette; -extern const vf_info_t vf_info_lavc; -extern const vf_info_t vf_info_zrmjpeg; -extern const vf_info_t vf_info_dvbscale; extern const vf_info_t vf_info_cropdetect; -extern const vf_info_t vf_info_test; -extern const vf_info_t vf_info_noise; -extern const vf_info_t vf_info_yvu9; -extern const vf_info_t vf_info_lavcdeint; -extern const vf_info_t vf_info_eq; +extern const vf_info_t vf_info_decimate; +extern const vf_info_t vf_info_delogo; +extern const vf_info_t vf_info_denoise3d; +extern const vf_info_t vf_info_detc; +extern const vf_info_t vf_info_dint; +extern const vf_info_t vf_info_divtc; +extern const vf_info_t vf_info_down3dright; +extern const vf_info_t vf_info_dsize; +extern const vf_info_t vf_info_dvbscale; extern const vf_info_t vf_info_eq2; +extern const vf_info_t vf_info_eq; +extern const vf_info_t vf_info_expand; +extern const vf_info_t vf_info_field; +extern const vf_info_t vf_info_fil; +extern const vf_info_t vf_info_filmdint; +extern const vf_info_t vf_info_fixpts; +extern const vf_info_t vf_info_flip; +extern const vf_info_t vf_info_format; +extern const vf_info_t vf_info_framestep; +extern const vf_info_t vf_info_fspp; +extern const vf_info_t vf_info_geq; extern const vf_info_t vf_info_gradfun; extern const vf_info_t vf_info_halfpack; -extern const vf_info_t vf_info_dint; -extern const vf_info_t vf_info_1bpp; -extern const vf_info_t vf_info_2xsai; -extern const vf_info_t vf_info_unsharp; -extern const vf_info_t vf_info_swapuv; +extern const vf_info_t vf_info_harddup; +extern const vf_info_t vf_info_hqdn3d; +extern const vf_info_t vf_info_hue; extern const vf_info_t vf_info_il; -extern const vf_info_t vf_info_fil; -extern const vf_info_t vf_info_boxblur; +extern const vf_info_t vf_info_ilpack; +extern const vf_info_t vf_info_ivtc; +extern const vf_info_t vf_info_kerndeint; +extern const vf_info_t vf_info_lavc; +extern const vf_info_t vf_info_lavcdeint; +extern const vf_info_t vf_info_lavfi; +extern const vf_info_t vf_info_mcdeint; +extern const vf_info_t vf_info_mirror; +extern const vf_info_t vf_info_noformat; +extern const vf_info_t vf_info_noise; +extern const vf_info_t vf_info_ow; +extern const vf_info_t vf_info_palette; +extern const vf_info_t vf_info_perspective; +extern const vf_info_t vf_info_phase; +extern const vf_info_t vf_info_pp7; +extern const vf_info_t vf_info_pp; +extern const vf_info_t vf_info_pullup; +extern const vf_info_t vf_info_qp; +extern const vf_info_t vf_info_rectangle; +extern const vf_info_t vf_info_remove_logo; +extern const vf_info_t vf_info_rgbtest; +extern const vf_info_t vf_info_rotate; extern const vf_info_t vf_info_sab; +extern const vf_info_t vf_info_scale; +extern const vf_info_t vf_info_screenshot; extern const vf_info_t vf_info_smartblur; -extern const vf_info_t vf_info_perspective; -extern const vf_info_t vf_info_down3dright; -extern const vf_info_t vf_info_field; -extern const vf_info_t vf_info_denoise3d; -extern const vf_info_t vf_info_hqdn3d; -extern const vf_info_t vf_info_detc; +extern const vf_info_t vf_info_softpulldown; +extern const vf_info_t vf_info_softskip; +extern const vf_info_t vf_info_spp; +extern const vf_info_t vf_info_stereo3d; +extern const vf_info_t vf_info_swapuv; extern const vf_info_t vf_info_telecine; -extern const vf_info_t vf_info_tinterlace; +extern const vf_info_t vf_info_test; extern const vf_info_t vf_info_tfields; -extern const vf_info_t vf_info_ivtc; -extern const vf_info_t vf_info_ilpack; -extern const vf_info_t vf_info_dsize; -extern const vf_info_t vf_info_decimate; -extern const vf_info_t vf_info_softpulldown; -extern const vf_info_t vf_info_pullup; -extern const vf_info_t vf_info_filmdint; -extern const vf_info_t vf_info_framestep; extern const vf_info_t vf_info_tile; -extern const vf_info_t vf_info_delogo; -extern const vf_info_t vf_info_remove_logo; -extern const vf_info_t vf_info_hue; -extern const vf_info_t vf_info_spp; +extern const vf_info_t vf_info_tinterlace; +extern const vf_info_t vf_info_unsharp; extern const vf_info_t vf_info_uspp; -extern const vf_info_t vf_info_fspp; -extern const vf_info_t vf_info_pp7; -extern const vf_info_t vf_info_yuvcsp; -extern const vf_info_t vf_info_kerndeint; -extern const vf_info_t vf_info_rgbtest; -extern const vf_info_t vf_info_qp; -extern const vf_info_t vf_info_phase; -extern const vf_info_t vf_info_divtc; -extern const vf_info_t vf_info_harddup; -extern const vf_info_t vf_info_softskip; -extern const vf_info_t vf_info_screenshot; -extern const vf_info_t vf_info_ass; -extern const vf_info_t vf_info_mcdeint; +extern const vf_info_t vf_info_vo; extern const vf_info_t vf_info_yadif; -extern const vf_info_t vf_info_blackframe; -extern const vf_info_t vf_info_geq; -extern const vf_info_t vf_info_ow; -extern const vf_info_t vf_info_fixpts; -extern const vf_info_t vf_info_stereo3d; +extern const vf_info_t vf_info_yuvcsp; +extern const vf_info_t vf_info_yvu9; +extern const vf_info_t vf_info_zrmjpeg; // list of available filters: static const vf_info_t* const filter_list[]={ @@ -142,6 +143,9 @@ &vf_info_pp, &vf_info_lavc, &vf_info_lavcdeint, +#ifdef CONFIG_VF_LAVFI + &vf_info_lavfi, +#endif &vf_info_screenshot, &vf_info_geq, #endif @@ -334,6 +338,7 @@ break; } if(mpi){ + int missing_palette = !(mpi->flags & MP_IMGFLAG_RGB_PALETTE) && (mp_imgflag & MP_IMGFLAG_RGB_PALETTE); mpi->type=mp_imgtype; mpi->w=vf->w; mpi->h=vf->h; // keep buffer allocation status & color flags only: @@ -342,12 +347,14 @@ // accept restrictions, draw_slice and palette flags only: mpi->flags|=mp_imgflag&(MP_IMGFLAGMASK_RESTRICTIONS|MP_IMGFLAG_DRAW_CALLBACK|MP_IMGFLAG_RGB_PALETTE); if(!vf->draw_slice) mpi->flags&=~MP_IMGFLAG_DRAW_CALLBACK; - if(mpi->width!=w2 || mpi->height!=h){ + if(mpi->width!=w2 || mpi->height!=h || missing_palette){ // printf("vf.c: MPI parameters changed! %dx%d -> %dx%d \n", mpi->width,mpi->height,w2,h); if(mpi->flags&MP_IMGFLAG_ALLOCATED){ - if(mpi->widthheightwidthheightplanes[0]); + av_freep(&mpi->planes[0]); + if (mpi->flags & MP_IMGFLAG_RGB_PALETTE) + av_freep(&mpi->planes[1]); mpi->flags&=~MP_IMGFLAG_ALLOCATED; mp_msg(MSGT_VFILTER,MSGL_V,"vf.c: have to REALLOCATE buffer memory :(\n"); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_decimate.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_decimate.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_decimate.c 2011-01-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_decimate.c 2011-11-03 13:24:46.000000000 +0000 @@ -27,7 +27,7 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" - +#include "libavutil/x86_cpu.h" #include "libvo/fastmemcpy.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_divtc.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_divtc.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_divtc.c 2011-06-03 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_divtc.c 2011-11-03 13:24:46.000000000 +0000 @@ -26,6 +26,7 @@ #include "mp_msg.h" #include "cpudetect.h" #include "libavutil/common.h" +#include "libavutil/x86_cpu.h" #include "mpbswap.h" #include "img_format.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_expand.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_expand.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_expand.c 2010-10-27 18:22:49.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_expand.c 2011-11-22 19:33:29.000000000 +0000 @@ -218,11 +218,13 @@ static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ + mp_image_t test_mpi; if(outfmt == IMGFMT_MPEGPES) { vf->priv->passthrough = 1; return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } - if (outfmt == IMGFMT_IF09) return 0; + mp_image_setfmt(&test_mpi, outfmt); + if (outfmt == IMGFMT_IF09 || !test_mpi.bpp) return 0; vf->priv->exp_x = vf->priv->cfg_exp_x; vf->priv->exp_y = vf->priv->cfg_exp_y; vf->priv->exp_w = vf->priv->cfg_exp_w; @@ -255,6 +257,23 @@ if(vf->priv->exp_x<0 || vf->priv->exp_x+width>vf->priv->exp_w) vf->priv->exp_x=(vf->priv->exp_w-width)/2; if(vf->priv->exp_y<0 || vf->priv->exp_y+height>vf->priv->exp_h) vf->priv->exp_y=(vf->priv->exp_h-height)/2; + if(test_mpi.flags & MP_IMGFLAG_YUV) { + int x_align_mask = (1 << test_mpi.chroma_x_shift) - 1; + int y_align_mask = (1 << test_mpi.chroma_y_shift) - 1; + // For 1-plane format non-aligned offsets will completely + // destroy the colours, for planar it will break the chroma + // sampling position. + if (vf->priv->exp_x & x_align_mask) { + vf->priv->exp_x &= ~x_align_mask; + mp_msg(MSGT_VFILTER, MSGL_ERR, "Specified x offset not supported " + "for YUV, reduced to %i.\n", vf->priv->exp_x); + } + if (vf->priv->exp_y & y_align_mask) { + vf->priv->exp_y &= ~y_align_mask; + mp_msg(MSGT_VFILTER, MSGL_ERR, "Specified y offset not supported " + "for YUV, reduced to %i.\n", vf->priv->exp_y); + } + } vf->priv->fb_ptr=NULL; if(!opt_screen_size_x && !opt_screen_size_y){ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_filmdint.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_filmdint.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_filmdint.c 2011-01-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_filmdint.c 2011-11-03 13:24:46.000000000 +0000 @@ -30,7 +30,7 @@ #include "vd.h" #include "vf.h" #include "cmmx.h" - +#include "libavutil/x86_cpu.h" #include "libvo/fastmemcpy.h" #define NUM_STORED 4 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_fspp.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_fspp.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_fspp.c 2011-01-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_fspp.c 2011-11-03 13:24:46.000000000 +0000 @@ -45,12 +45,13 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" -#include "vd_ffmpeg.h" +#include "av_helpers.h" #include "libvo/fastmemcpy.h" #include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/mem.h" +#include "libavutil/x86_cpu.h" #include "libavcodec/avcodec.h" #include "libavcodec/dsputil.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_ilpack.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_ilpack.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_ilpack.c 2011-06-03 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_ilpack.c 2011-11-03 13:24:46.000000000 +0000 @@ -29,6 +29,7 @@ #include "mp_image.h" #include "vf.h" #include "libavutil/attributes.h" +#include "libavutil/x86_cpu.h" typedef void (pack_func_t)(unsigned char *dst, unsigned char *y, unsigned char *u, unsigned char *v, int w, int us, int vs); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_ivtc.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_ivtc.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_ivtc.c 2011-01-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_ivtc.c 2011-11-03 13:24:46.000000000 +0000 @@ -27,7 +27,7 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" - +#include "libavutil/x86_cpu.h" #include "libvo/fastmemcpy.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_lavc.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_lavc.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_lavc.c 2010-11-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_lavc.c 2011-08-09 19:57:00.000000000 +0000 @@ -28,7 +28,7 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" -#include "vd_ffmpeg.h" +#include "av_helpers.h" #include "libavcodec/avcodec.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_lavcdeint.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_lavcdeint.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_lavcdeint.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_lavcdeint.c 2011-08-09 19:57:00.000000000 +0000 @@ -28,7 +28,7 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" -#include "vd_ffmpeg.h" +#include "av_helpers.h" #include "libavcodec/avcodec.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_lavfi.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_lavfi.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_lavfi.c 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_lavfi.c 2011-10-26 15:12:35.000000000 +0000 @@ -0,0 +1,419 @@ +/* + * Copyright (C) 2011 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 "vf.h" +#include "m_struct.h" +#include "fmt-conversion.h" +#include "mp_msg.h" +#include "libavfilter/avfilter.h" +#include "libavfilter/avfiltergraph.h" +#include "libavutil/pixdesc.h" + +struct vf_priv_s { + AVFilterGraph *graph; + AVFilterContext *in; + AVFilterContext *out; + int in_w; + int in_h; + enum PixelFormat in_pixfmt; + int in_imgfmt; + AVRational in_sar; + int out_w; + int out_h; + enum PixelFormat out_pixfmt; + int out_imgfmt; + AVRational out_sar; + struct AVFilterBufferRef *in_buf; + mp_image_t *in_mpi; +}; + +static void buf_mpi_free(AVFilterBuffer *buf) +{ + ((mp_image_t *)buf->priv)->usage_count--; + av_free(buf); +} + +static AVFilterBufferRef *mpi_to_bufref(mp_image_t *mpi, enum PixelFormat fmt, + AVRational sar) +{ + AVFilterBufferRef *buf; + int perms = AV_PERM_READ; + + if ((mpi->flags & MP_IMGFLAG_ALLOCATED)) + perms |= AV_PERM_REUSE2; + if (!(mpi->flags & MP_IMGFLAG_PRESERVE)) + perms |= AV_PERM_WRITE; + buf = avfilter_get_video_buffer_ref_from_arrays(mpi->planes, mpi->stride, + perms, + mpi->w, mpi->h, + fmt); + buf->video->sample_aspect_ratio = sar; + buf->buf->priv = mpi; + buf->buf->free = buf_mpi_free; + return buf; +} + +static void bufref_to_mpi(AVFilterBufferRef *ref, mp_image_t *mpi) +{ + memcpy(mpi->planes, ref->data, sizeof(ref->data)); + memcpy(mpi->stride, ref->linesize, sizeof(ref->linesize)); +} + +struct mpsink_priv { + struct vf_instance *vf; +}; + +static int mpsink_init(AVFilterContext *ctx, + av_unused const char *args, void *opaque) +{ + struct mpsink_priv *c = ctx->priv; + c->vf = opaque; + return 0; +} + +static int mpsink_query_formats(AVFilterContext *ctx) +{ + struct mpsink_priv *c = ctx->priv; + struct vf_instance *vf = c->vf; + AVFilterFormats *all; + enum PixelFormat *sup; + unsigned i, nsup = 0; + int ifmt; + + all = avfilter_all_formats(AVMEDIA_TYPE_VIDEO); + sup = av_mallocz(sizeof(*sup) * (all->format_count + 1)); + if (!sup) + return AVERROR(errno); + for(i = 0; i < all->format_count; i++) { + ifmt = pixfmt2imgfmt(all->formats[i]); + if (vf->next->query_format(vf->next, ifmt) > 0) + sup[nsup++] = all->formats[i]; + } + sup[nsup++] = PIX_FMT_NONE; + avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(sup)); + av_free(sup); + return 0; +} + +static AVFilterBufferRef *mpsink_get_video_buffer(AVFilterLink *link, + int perms, int w, int h) +{ + struct mpsink_priv *c = link->dst->priv; + struct vf_instance *vf = c->vf; + mp_image_t *dmpi; + int type; + int flags = 0; + + type = MP_IMGTYPE_NUMBERED | (-1 << 16); + if ((perms & AV_PERM_PRESERVE)) + flags |= MP_IMGFLAG_PRESERVE; + if ((perms & AV_PERM_READ)) + flags |= MP_IMGFLAG_READABLE; + if ((perms & AV_PERM_NEG_LINESIZES)) + flags |= MP_IMGFLAG_ACCEPT_STRIDE; + if (vf->priv->in_mpi) { + type = vf->priv->in_mpi->type; + vf->priv->in_mpi = NULL; + } + dmpi = vf_get_image(vf->next, vf->priv->out_imgfmt, type, flags, w, h); + return mpi_to_bufref(dmpi, vf->priv->out_pixfmt, vf->priv->out_sar); +} + +static void mpsink_end_frame(AVFilterLink *link) +{ + struct mpsink_priv *c = link->dst->priv; + struct vf_instance *vf = c->vf; + AVFilterBufferRef *buf = link->cur_buf; + mp_image_t *mpi = buf->buf->priv; + double pts; + + pts = buf->pts == (int64_t)AV_NOPTS_VALUE ? MP_NOPTS_VALUE : + buf->pts * av_q2d(link->time_base); + mpi->pict_type = buf->video->pict_type; + mpi->fields = (buf->video->interlaced ? MP_IMGFIELD_INTERLACED : 0) | + (buf->video->top_field_first ? MP_IMGFIELD_TOP_FIRST : 0); + vf_next_put_image(vf, mpi, pts); + avfilter_unref_buffer(link->cur_buf); +} + +static AVFilter mpsink = { + .name = "mpsink", + .description = "Video sink for mplayer interaction", + .priv_size = sizeof(struct mpsink_priv), + + .init = mpsink_init, + .query_formats = mpsink_query_formats, + + .inputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .end_frame = mpsink_end_frame, + .get_video_buffer = mpsink_get_video_buffer, + .min_perms = AV_PERM_READ, }, + { .name = NULL }}, + .outputs = (AVFilterPad[]) {{ .name = NULL }}, +}; + +struct mpsrc_priv { + struct vf_instance *vf; +}; + +static int mpsrc_init(AVFilterContext *ctx, + av_unused const char *args, void *opaque) +{ + struct mpsrc_priv *c = ctx->priv; + c->vf = opaque; + return 0; +} + +static int mpsrc_query_formats(AVFilterContext *ctx) +{ + struct mpsrc_priv *c = ctx->priv; + enum PixelFormat pix_fmts[] = { c->vf->priv->in_pixfmt, PIX_FMT_NONE }; + avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + return 0; +} + +static int mpsrc_config_props(AVFilterLink *link) +{ + struct mpsrc_priv *c = link->src->priv; + struct vf_instance *vf = c->vf; + link->w = vf->priv->in_w; + link->h = vf->priv->in_h; + link->sample_aspect_ratio = vf->priv->in_sar; + link->time_base = AV_TIME_BASE_Q; + return 0; +} + +static int mpsrc_request_frame(AVFilterLink *link) +{ + struct mpsrc_priv *c = link->src->priv; + struct vf_instance *vf = c->vf; + + if (!vf->priv->in_buf) + return AVERROR(EINVAL); + avfilter_start_frame(link, avfilter_ref_buffer(vf->priv->in_buf, ~0)); + avfilter_draw_slice(link, 0, link->h, 1); + avfilter_end_frame(link); + vf->priv->in_buf = NULL; + return 0; +} + +static int mpsrc_poll_frame(AVFilterLink *link) +{ + struct mpsrc_priv *c = link->src->priv; + struct vf_instance *vf = c->vf; + return vf->priv->in_buf != NULL; +} + +AVFilter mpsrc = { + .name = "mpsrc", + .description = "Video source for mplayer interaction", + .priv_size = sizeof(struct mpsrc_priv), + .query_formats = mpsrc_query_formats, + + .init = mpsrc_init, + + .inputs = (AVFilterPad[]) {{ .name = NULL }}, + .outputs = (AVFilterPad[]) {{ .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .request_frame = mpsrc_request_frame, + .poll_frame = mpsrc_poll_frame, + .config_props = mpsrc_config_props, }, + { .name = NULL }}, +}; + +static int config(struct vf_instance *vf, int w, int h, int dw, int dh, + unsigned flags, unsigned fmt) +{ + int ret; + AVFilterLink *out; + AVRational iar, dar; + + av_reduce(&iar.num, &iar.den, w, h, INT_MAX); + av_reduce(&dar.num, &dar.den, dw, dh, INT_MAX); + vf->priv->in_pixfmt = imgfmt2pixfmt(fmt); + vf->priv->in_imgfmt = fmt; + vf->priv->in_w = w; + vf->priv->in_h = h; + vf->priv->in_sar = av_div_q(dar, iar); + ret = avfilter_graph_config(vf->priv->graph, NULL); + if (ret < 0) + return 0; + out = vf->priv->out->inputs[0]; + vf->priv->out_w = out->w; + vf->priv->out_h = out->h; + vf->priv->out_pixfmt = out->format; + vf->priv->out_imgfmt = pixfmt2imgfmt(out->format); + vf->priv->out_sar = out->sample_aspect_ratio; + if (vf->priv->out_sar.num != vf->priv->in_sar.num || + vf->priv->out_sar.den != vf->priv->in_sar.den || + out->w != w || out->h != h) { + av_reduce(&iar.num, &iar.den, out->w, out->h, INT_MAX); + dar = av_mul_q(iar, out->sample_aspect_ratio); + if (av_cmp_q(dar, iar) >= 0) { + dh = out->h; + dw = av_rescale(dh, dar.num, dar.den); + } else { + dw = out->w; + dh = av_rescale(dw, dar.den, dar.num); + } + } + return vf_next_config(vf, out->w, out->h, dw, dh, flags, fmt); +} + +static void get_image(struct vf_instance *vf, mp_image_t *mpi) +{ + AVFilterBufferRef *buf; + unsigned perms = AV_PERM_WRITE | AV_PERM_REUSE2; + + avfilter_unref_buffer(mpi->priv); + mpi->priv = NULL; /* for safety */ + if (mpi->flags & MP_IMGFLAG_READABLE) + perms |= AV_PERM_READ; + if (mpi->flags & MP_IMGFLAG_PRESERVE) + perms |= AV_PERM_PRESERVE; + vf->priv->in_mpi = mpi; + buf = avfilter_get_video_buffer(vf->priv->in->outputs[0], perms, + mpi->w, mpi->h); + vf->priv->in_mpi = NULL; + bufref_to_mpi(buf, mpi); + mpi->flags |= MP_IMGFLAG_DIRECT; + mpi->flags &= ~MP_IMGFLAG_ALLOCATED; + mpi->priv = buf; +} + +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) +{ + AVFilterBufferRef *buf; + mp_image_t *cmpi = NULL; + + if (!(mpi->flags & MP_IMGFLAG_DIRECT)) { + cmpi = vf_get_image(vf, mpi->imgfmt, MP_IMGTYPE_TEMP, + MP_IMGFLAG_PREFER_ALIGNED_STRIDE, + mpi->w, mpi->h); + copy_mpi(cmpi, mpi); + buf = cmpi->priv; + } else { + buf = mpi->priv; + } + buf->video->key_frame = mpi->pict_type == 1; + buf->video->pict_type = mpi->pict_type; /* seems to be the same code */ + buf->video->interlaced = !!(mpi->fields & MP_IMGFIELD_INTERLACED); + buf->video->top_field_first = !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); + vf->priv->in_buf = buf; + if (pts != MP_NOPTS_VALUE) + buf->pts = pts * AV_TIME_BASE; + while (avfilter_poll_frame(vf->priv->out->inputs[0])) { + if (avfilter_request_frame(vf->priv->out->inputs[0])) + break; + } + return 1; +} + +static void uninit(struct vf_instance *vf) +{ + unsigned i; + +#define FREE_MPI_ARRAY(field) \ + for (i = 0; i < FF_ARRAY_ELEMS(vf->imgctx.field); i++) \ + if (vf->imgctx.field[i]) \ + avfilter_unref_buffer(vf->imgctx.field[i]->priv); + FREE_MPI_ARRAY(static_images); + FREE_MPI_ARRAY(temp_images); + FREE_MPI_ARRAY(export_images); + FREE_MPI_ARRAY(numbered_images); + avfilter_graph_free(&vf->priv->graph); + av_free(vf->priv); +} + +static int lavfi_open(struct vf_instance *vf, char *args) +{ + AVFilterInOut *outputs; + AVFilterInOut *inputs; + int ret; + + avfilter_register_all(); + if (!args) { + mp_msg(MSGT_VFILTER, MSGL_ERR, "lavfi: filtergraph needed\n"); + goto fail; + } + if (args[0] == '$') { + char *e = getenv(args + 1); + if (!e) { + mp_msg(MSGT_VFILTER, MSGL_ERR, "lavfi: %s not defined\n", args); + goto fail; + } + args = e; + } + vf->priv = av_mallocz(sizeof(struct vf_priv_s)); + if (!vf->priv) + return 0; + + vf->priv->graph = avfilter_graph_alloc(); + if (!vf->priv->graph) + goto fail; + ret = avfilter_graph_create_filter(&vf->priv->in, &mpsrc, "in", + NULL, vf, vf->priv->graph); + if (ret < 0) + goto fail; + ret = avfilter_graph_create_filter(&vf->priv->out, &mpsink, "out", + NULL, vf, vf->priv->graph); + if (ret < 0) + return 0; + outputs = avfilter_inout_alloc(); + inputs = avfilter_inout_alloc(); + if (!outputs || !inputs) + goto fail; + outputs->name = av_strdup("in"); + outputs->filter_ctx = vf->priv->in; + outputs->pad_idx = 0; + outputs->next = NULL; + inputs->name = av_strdup("out"); + inputs->filter_ctx = vf->priv->out; + inputs->pad_idx = 0; + inputs->next = NULL; + ret = avfilter_graph_parse(vf->priv->graph, args, &inputs, &outputs, NULL); + if (ret < 0) + goto fail; + + vf->config = config; + vf->uninit = uninit; + vf->put_image = put_image; + vf->get_image = get_image; + return 1; + +fail: + avfilter_inout_free(&inputs); + avfilter_inout_free(&outputs); + avfilter_graph_free(&vf->priv->graph); + av_free(vf->priv); + return 0; +} + +static const m_option_t vf_opts_fields[] = { { .name = NULL } }; + +const vf_info_t vf_info_lavfi = { + "libavfilter wrapper", + "lavfi", + "Nicolas George", + "", + lavfi_open, + NULL, +}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_mcdeint.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_mcdeint.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_mcdeint.c 2011-05-09 02:05:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_mcdeint.c 2011-08-09 19:57:00.000000000 +0000 @@ -66,7 +66,7 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" -#include "vd_ffmpeg.h" +#include "av_helpers.h" #define MIN(a,b) ((a) > (b) ? (b) : (a)) #define MAX(a,b) ((a) < (b) ? (b) : (a)) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_noise.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_noise.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_noise.c 2011-01-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_noise.c 2011-11-03 13:24:46.000000000 +0000 @@ -37,6 +37,7 @@ #include "vf.h" #include "libvo/fastmemcpy.h" #include "libavutil/mem.h" +#include "libavutil/x86_cpu.h" #define MAX_NOISE 4096 #define MAX_SHIFT 1024 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_remove_logo.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_remove_logo.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_remove_logo.c 2011-01-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_remove_logo.c 2011-08-11 17:45:38.000000000 +0000 @@ -22,7 +22,7 @@ */ /** - * \file vf_remove_logo.c + * \file * * \brief Advanced blur-based logo removing filter. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_scale.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_scale.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_scale.c 2011-05-27 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_scale.c 2012-01-05 20:32:10.000000000 +0000 @@ -68,11 +68,17 @@ IMGFMT_444P, IMGFMT_444P16_LE, IMGFMT_444P16_BE, + IMGFMT_444P10_LE, + IMGFMT_444P10_BE, + IMGFMT_444P9_LE, + IMGFMT_444P9_BE, IMGFMT_422P, IMGFMT_422P16_LE, IMGFMT_422P16_BE, IMGFMT_422P10_LE, IMGFMT_422P10_BE, + IMGFMT_422P9_LE, + IMGFMT_422P9_BE, IMGFMT_YV12, IMGFMT_I420, IMGFMT_420P16_LE, @@ -96,6 +102,7 @@ IMGFMT_RGB32, IMGFMT_BGR24, IMGFMT_RGB24, + IMGFMT_GBR24P, IMGFMT_RGB48LE, IMGFMT_RGB48BE, IMGFMT_BGR16, @@ -130,6 +137,10 @@ {IMGFMT_UYVY, IMGFMT_422P}, {IMGFMT_422P, IMGFMT_YUY2}, {IMGFMT_422P, IMGFMT_UYVY}, + {IMGFMT_GBR24P, IMGFMT_BGR24}, + {IMGFMT_GBR24P, IMGFMT_RGB24}, + {IMGFMT_GBR24P, IMGFMT_BGR32}, + {IMGFMT_GBR24P, IMGFMT_RGB32}, {0, 0} }; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_spp.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_spp.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_spp.c 2011-01-15 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_spp.c 2011-08-09 19:57:00.000000000 +0000 @@ -49,7 +49,7 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" -#include "vd_ffmpeg.h" +#include "av_helpers.h" #include "libvo/fastmemcpy.h" #define XMIN(a,b) ((a) < (b) ? (a) : (b)) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_stereo3d.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_stereo3d.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_stereo3d.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_stereo3d.c 2011-07-11 21:54:53.000000000 +0000 @@ -52,6 +52,8 @@ MONO_R, //mono output for debugging (right eye only) SIDE_BY_SIDE_LR, //side by side parallel (left eye left, right eye right) SIDE_BY_SIDE_RL, //side by side crosseye (right eye left, left eye right) + SIDE_BY_SIDE_2_LR, //side by side parallel with half width resolution + SIDE_BY_SIDE_2_RL, //side by side crosseye with half width resolution ABOVE_BELOW_LR, //above-below (left eye above, right eye below) ABOVE_BELOW_RL, //above-below (right eye above, left eye below) ABOVE_BELOW_2_LR, //above-below with half height resolution @@ -148,10 +150,14 @@ //check input format switch (vf->priv->in.fmt) { + case SIDE_BY_SIDE_2_LR: + d_width *= 2; case SIDE_BY_SIDE_LR: vf->priv->width = width / 2; vf->priv->in.off_right = vf->priv->width * 3; break; + case SIDE_BY_SIDE_2_RL: + d_width *= 2; case SIDE_BY_SIDE_RL: vf->priv->width = width / 2; vf->priv->in.off_left = vf->priv->width * 3; @@ -197,10 +203,14 @@ memcpy(vf->priv->ana_matrix, ana_coeff[vf->priv->out.fmt], sizeof(vf->priv->ana_matrix)); break; + case SIDE_BY_SIDE_2_LR: + d_width /= 2; case SIDE_BY_SIDE_LR: vf->priv->out.width = vf->priv->width * 2; vf->priv->out.off_right = vf->priv->width * 3; break; + case SIDE_BY_SIDE_2_RL: + d_width /= 2; case SIDE_BY_SIDE_RL: vf->priv->out.width = vf->priv->width * 2; vf->priv->out.off_left = vf->priv->width * 3; @@ -274,6 +284,8 @@ switch (vf->priv->out.fmt) { case SIDE_BY_SIDE_LR: case SIDE_BY_SIDE_RL: + case SIDE_BY_SIDE_2_LR: + case SIDE_BY_SIDE_2_RL: case ABOVE_BELOW_LR: case ABOVE_BELOW_RL: case ABOVE_BELOW_2_LR: @@ -407,6 +419,10 @@ {"side_by_side_left_first", SIDE_BY_SIDE_LR}, {"sbsr", SIDE_BY_SIDE_RL}, {"side_by_side_right_first", SIDE_BY_SIDE_RL}, + {"sbs2l", SIDE_BY_SIDE_2_LR}, + {"side_by_side_half_width_left_first", SIDE_BY_SIDE_2_LR}, + {"sbs2r", SIDE_BY_SIDE_2_RL}, + {"side_by_side_half_width_right_first",SIDE_BY_SIDE_2_RL}, {"abl", ABOVE_BELOW_LR}, {"above_below_left_first", ABOVE_BELOW_LR}, {"abr", ABOVE_BELOW_RL}, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_tfields.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_tfields.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_tfields.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_tfields.c 2011-11-03 13:24:46.000000000 +0000 @@ -27,7 +27,7 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" - +#include "libavutil/x86_cpu.h" #include "libmpdemux/demuxer.h" #include "libvo/fastmemcpy.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_uspp.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_uspp.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_uspp.c 2011-05-09 02:05:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_uspp.c 2011-08-09 19:57:00.000000000 +0000 @@ -35,7 +35,7 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" -#include "vd_ffmpeg.h" +#include "av_helpers.h" #include "libvo/fastmemcpy.h" #define XMIN(a,b) ((a) < (b) ? (a) : (b)) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_yadif.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_yadif.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_yadif.c 2011-05-09 02:05:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_yadif.c 2011-11-03 13:24:46.000000000 +0000 @@ -34,6 +34,7 @@ #include "libmpdemux/demuxer.h" #include "libvo/fastmemcpy.h" #include "libavutil/common.h" +#include "libavutil/x86_cpu.h" //===========================================================================// @@ -64,7 +65,7 @@ } } -#if HAVE_MMX && defined(NAMED_ASM_ARGS) +#if HAVE_MMX #define LOAD4(mem,dst) \ "movd "mem", "#dst" \n\t"\ @@ -277,7 +278,7 @@ #undef CHECK2 #undef FILTER -#endif /* HAVE_MMX && defined(NAMED_ASM_ARGS) */ +#endif /* HAVE_MMX */ static void filter_line_c(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8_t *next, int w, int refs, int parity){ int x; @@ -359,7 +360,7 @@ } } } -#if HAVE_MMX && defined(NAMED_ASM_ARGS) +#if HAVE_MMX if(gCpuCaps.hasMMX2) __asm__ volatile("emms \n\t" : : : "memory"); #endif } @@ -496,7 +497,7 @@ if (args) sscanf(args, "%d:%d", &vf->priv->mode, &vf->priv->parity); filter_line = filter_line_c; -#if HAVE_MMX && defined(NAMED_ASM_ARGS) +#if HAVE_MMX if(gCpuCaps.hasMMX2) filter_line = filter_line_mmx2; #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_zrmjpeg.c mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_zrmjpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpcodecs/vf_zrmjpeg.c 2010-10-26 08:15:52.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpcodecs/vf_zrmjpeg.c 2011-11-04 12:30:42.000000000 +0000 @@ -27,7 +27,7 @@ */ /** - * \file vf_zrmjpeg.c + * \file * * \brief Does mjpeg encoding as required by the zrmjpeg filter as well * as by the zr video driver. @@ -39,11 +39,10 @@ #include #include "config.h" +#include "av_helpers.h" #include "mp_msg.h" - #include "img_format.h" #include "mp_image.h" -#include "vd_ffmpeg.h" #include "vf.h" /* We need this #define because we need ../libavcodec/common.h to #define @@ -54,6 +53,7 @@ #undef malloc #undef free +#undef strcasecmp /* some convenient #define's, is this portable enough? */ /// Printout with vf_zrmjpeg: prefix at VERBOSE level @@ -111,7 +111,7 @@ for(qscale = qmin; qscale <= qmax; qscale++) { int i; - if (s->dsp.fdct == ff_jpeg_fdct_islow) { + if (s->dsp.fdct == ff_jpeg_fdct_islow_8) { for (i = 0; i < 64; i++) { const int j = s->dsp.idct_permutation[i]; /* 16 <= qscale * quant_matrix[i] <= 7905 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/aviheader.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/aviheader.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/aviheader.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/aviheader.c 2011-12-06 19:59:16.000000000 +0000 @@ -93,7 +93,8 @@ // found MOVI header if(!demuxer->movi_start) demuxer->movi_start=stream_tell(demuxer->stream); demuxer->movi_end=stream_tell(demuxer->stream)+len; - mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundMovieAt,(int)demuxer->movi_start,(int)demuxer->movi_end); + mp_msg(MSGT_HEADER, MSGL_V, "Found movie at 0x%X - 0x%X\n", + (int)demuxer->movi_start, (int)demuxer->movi_end); if(demuxer->stream->end_pos>demuxer->movi_end) demuxer->movi_end=demuxer->stream->end_pos; if(index_mode==-2 || index_mode==2 || index_mode==0) break; // reading from non-seekable source (stdin) or forced index or no index forced @@ -266,9 +267,11 @@ break; } case ckidSTREAMFORMAT: { // read 'strf' if(last_fccType==streamtypeVIDEO){ - sh_video->bih=calloc(FFMAX(chunksize, sizeof(*sh_video->bih)), 1); + sh_video->bih_size = FFMAX(chunksize, sizeof(*sh_video->bih)); + sh_video->bih=calloc(sh_video->bih_size, 1); // sh_video->bih=malloc(chunksize); memset(sh_video->bih,0,chunksize); - mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader,chunksize,sizeof(*sh_video->bih)); + mp_msg(MSGT_HEADER, MSGL_V, "Found 'bih', %u bytes of %zu\n", + chunksize, sizeof(*sh_video->bih)); stream_read(demuxer->stream,(char*) sh_video->bih,chunksize); le2me_BITMAPINFOHEADER(sh_video->bih); // swap to machine endian if (sh_video->bih->biSize > chunksize && sh_video->bih->biSize > sizeof(*sh_video->bih)) @@ -289,7 +292,7 @@ case mmioFOURCC('m', 'p', 'g', '4'): case mmioFOURCC('D', 'I', 'V', '1'): idxfix_divx=3; // set index recovery mpeg4 flavour: msmpeg4v1 - mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPG4V1); + mp_msg(MSGT_HEADER, MSGL_V, "Regenerating keyframe table for M$ mpg4v1 video.\n"); break; case mmioFOURCC('D', 'I', 'V', '3'): case mmioFOURCC('d', 'i', 'v', '3'): @@ -306,7 +309,7 @@ case mmioFOURCC('D', 'I', 'V', '2'): case mmioFOURCC('A', 'P', '4', '1'): idxfix_divx=1; // set index recovery mpeg4 flavour: msmpeg4v3 - mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForDIVX3); + mp_msg(MSGT_HEADER, MSGL_V, "Regenerating keyframe table for DIVX3 video.\n"); break; case mmioFOURCC('D', 'I', 'V', 'X'): case mmioFOURCC('d', 'i', 'v', 'x'): @@ -316,7 +319,7 @@ case mmioFOURCC('F', 'M', 'P', '4'): case mmioFOURCC('f', 'm', 'p', '4'): idxfix_divx=2; // set index recovery mpeg4 flavour: generic mpeg4 - mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4); + mp_msg(MSGT_HEADER, MSGL_V, "Regenerating keyframe table for MPEG-4 video.\n"); break; } } else @@ -324,7 +327,8 @@ unsigned wf_size = chunksizewf)?sizeof(*sh_audio->wf):chunksize; sh_audio->wf=calloc(wf_size,1); // sh_audio->wf=malloc(chunksize); memset(sh_audio->wf,0,chunksize); - mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt,chunksize,sizeof(*sh_audio->wf)); + mp_msg(MSGT_HEADER, MSGL_V, "Found 'wf', %u bytes of %zu\n", + chunksize, sizeof(*sh_audio->wf)); stream_read(demuxer->stream,(char*) sh_audio->wf,chunksize); le2me_WAVEFORMATEX(sh_audio->wf); if (sh_audio->wf->cbSize != 0 && @@ -369,7 +373,8 @@ case mmioFOURCC('d', 'm', 'l', 'h'): { // dmlh 00 00 00 04 frms unsigned int total_frames = stream_read_dword_le(demuxer->stream); - mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header, chunksize, total_frames); + mp_msg(MSGT_HEADER, MSGL_V, "AVI: dmlh found (size=%d) (total_frames=%d)\n", + chunksize, total_frames); stream_skip(demuxer->stream, chunksize-4); chunksize = 0; } @@ -381,7 +386,8 @@ int read; int i; priv->idx_size=size2>>4; - mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames, + mp_msg(MSGT_HEADER, MSGL_V, + "Reading INDEX block, %d chunks for %d frames (fpos=%"PRId64").\n", priv->idx_size,avih.dwTotalFrames, (int64_t)stream_tell(demuxer->stream)); priv->idx=malloc(priv->idx_size<<4); // printf("\nindex to %p !!!!! (priv=%p)\n",priv->idx,priv); @@ -405,7 +411,7 @@ case mmioFOURCC('R','I','F','F'): { char riff_type[4]; - mp_msg(MSGT_HEADER, MSGL_V, MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr); + mp_msg(MSGT_HEADER, MSGL_V, "Additional RIFF header...\n"); stream_read(demuxer->stream, riff_type, sizeof riff_type); if (strncmp(riff_type, "AVIX", sizeof riff_type)) mp_msg(MSGT_HEADER, MSGL_WARN, MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr); @@ -446,7 +452,7 @@ if(list_end>0 && chunksize+stream_tell(demuxer->stream) == list_end) list_end=0; if(list_end>0 && chunksize+stream_tell(demuxer->stream)>list_end){ - mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_BrokenChunk,chunksize,(char *) &id); + mp_msg(MSGT_HEADER, MSGL_V, "Broken chunk? chunksize=%d (id=%.4s)\n", chunksize, (char *) &id); stream_seek(demuxer->stream,list_end); list_end=0; } else diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/aviprint.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/aviprint.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/aviprint.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/aviprint.c 2011-10-26 15:12:35.000000000 +0000 @@ -22,8 +22,7 @@ #include #include "config.h" - -// for avi_stream_id(): +#include "mp_msg.h" #include "stream/stream.h" #include "demuxer.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_asf.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_asf.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_asf.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_asf.c 2011-07-24 23:55:34.000000000 +0000 @@ -654,7 +654,8 @@ } if(demuxer->audio->id!=-2){ - mp_msg(MSGT_DEMUXER,MSGL_V,MSGTR_ASFSearchingForAudioStream,demuxer->audio->id); + mp_msg(MSGT_DEMUXER, MSGL_V, + "ASF: Searching for audio stream (id:%d).\n", demuxer->audio->id); if(!ds_fill_buffer(demuxer->audio)){ mp_msg(MSGT_DEMUXER,MSGL_INFO,"ASF: " MSGTR_MissingAudioStream); demuxer->audio->sh=NULL; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_audio.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_audio.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_audio.c 2010-12-09 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_audio.c 2011-11-11 17:29:14.000000000 +0000 @@ -260,6 +260,69 @@ } #endif +/** + * @brief Determine the number of frames of a file encoded with + * variable bitrate mode (VBR). + * + * @param s stream to be read + * @param off offset in stream to start reading from + * + * @return 0 (error or no variable bitrate mode) or number of frames + */ +static unsigned int mp3_vbr_frames(stream_t *s, off_t off) { + static const int xing_offset[2][2] = {{32, 17}, {17, 9}}; + unsigned int data; + unsigned char hdr[4]; + int framesize, chans, spf, layer; + + if ((s->flags & MP_STREAM_SEEK) == MP_STREAM_SEEK) { + + if (!stream_seek(s, off)) return 0; + + data = stream_read_dword(s); + hdr[0] = data >> 24; + hdr[1] = data >> 16; + hdr[2] = data >> 8; + hdr[3] = data; + + if (!mp_check_mp3_header(data)) return 0; + + framesize = mp_get_mp3_header(hdr, &chans, NULL, &spf, &layer, NULL); + + if (framesize == -1 || layer != 3) return 0; + + /* Xing / Info (at variable position: 32, 17 or 9 bytes after header) */ + + if (!stream_skip(s, xing_offset[spf < 1152][chans == 1])) return 0; + + data = stream_read_dword(s); + + if (data == MKBETAG('X','i','n','g') || data == MKBETAG('I','n','f','o')) { + data = stream_read_dword(s); + + if (data & 0x1) // frames field is present + return stream_read_dword(s); // frames + } + + /* VBRI (at fixed position: 32 bytes after header) */ + + if (!stream_seek(s, off + 4 + 32)) return 0; + + data = stream_read_dword(s); + + if (data == MKBETAG('V','B','R','I')) { + data = stream_read_word(s); + + if (data == 1) { // check version + if (!stream_skip(s, 8)) return 0; // skip delay, quality and bytes + return stream_read_dword(s); // frames + } + } + } + + return 0; +} + static int demux_audio_open(demuxer_t* demuxer) { stream_t *s; sh_audio_t* sh_audio; @@ -269,6 +332,8 @@ // mp3_hdrs list is sorted first by next_frame_pos and then by frame_pos mp3_hdr_t *mp3_hdrs = NULL, *mp3_found = NULL; da_priv_t* priv; + double duration; + int found_WAVE = 0; s = demuxer->stream; @@ -298,7 +363,7 @@ len = (hdr[0]<<21) | (hdr[1]<<14) | (hdr[2]<<7) | hdr[3]; stream_skip(s,len); step = 4; - } else if( hdr[0] == 'f' && hdr[1] == 'm' && hdr[2] == 't' && hdr[3] == ' ' ) { + } else if( found_WAVE && hdr[0] == 'f' && hdr[1] == 'm' && hdr[2] == 't' && hdr[3] == ' ' ) { frmt = WAV; break; } else if((mp3_flen = mp_get_mp3_header(hdr, &mp3_chans, &mp3_freq, @@ -314,6 +379,7 @@ if (!mp3_hdrs || mp3_hdrs->cons_hdrs < 3) break; } + found_WAVE = hdr[0] == 'W' && hdr[1] == 'A' && hdr[2] == 'V' && hdr[3] == 'E'; // Add here some other audio format detection if(step < HDR_SIZE) memmove(hdr,&hdr[step],HDR_SIZE-step); @@ -332,6 +398,7 @@ case MP3: sh_audio->format = (mp3_found->mpa_layer < 3 ? 0x50 : 0x55); demuxer->movi_start = mp3_found->frame_pos; + demuxer->movi_end = s->end_pos; next_frame_pos = mp3_found->next_frame_pos; sh_audio->audio.dwSampleSize= 0; sh_audio->audio.dwScale = mp3_found->mpa_spf; @@ -344,7 +411,7 @@ sh_audio->wf->nBlockAlign = mp3_found->mpa_spf; sh_audio->wf->wBitsPerSample = 16; sh_audio->wf->cbSize = 0; - sh_audio->i_bps = sh_audio->wf->nAvgBytesPerSec; + duration = (double) mp3_vbr_frames(s, demuxer->movi_start) * mp3_found->mpa_spf / mp3_found->mp3_freq; free(mp3_found); mp3_found = NULL; if(s->end_pos && (s->flags & MP_STREAM_SEEK) == MP_STREAM_SEEK) { @@ -352,9 +419,7 @@ stream_seek(s,s->end_pos-128); stream_read(s,tag,3); tag[3] = '\0'; - if(strcmp(tag,"TAG")) - demuxer->movi_end = s->end_pos; - else { + if(!strcmp(tag,"TAG")) { char buf[31]; uint8_t g; demuxer->movi_end = stream_tell(s)-3; @@ -382,6 +447,8 @@ demux_info_add(demuxer,"Genre",genres[g]); } } + if (duration && demuxer->movi_end && demuxer->movi_end > demuxer->movi_start) sh_audio->wf->nAvgBytesPerSec = (demuxer->movi_end - demuxer->movi_start) / duration; + sh_audio->i_bps = sh_audio->wf->nAvgBytesPerSec; break; case WAV: { unsigned int chunk_type; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demuxer.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demuxer.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demuxer.c 2011-06-11 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demuxer.c 2011-12-05 18:27:40.000000000 +0000 @@ -44,18 +44,14 @@ #include "libmpcodecs/dec_audio.h" #include "libmpcodecs/dec_video.h" #include "libmpcodecs/dec_teletext.h" -#include "libmpcodecs/vd_ffmpeg.h" - -#ifdef CONFIG_ASS -#include "libass/ass.h" #include "sub/ass_mp.h" -#endif #ifdef CONFIG_FFMPEG #include "libavcodec/avcodec.h" #if MP_INPUT_BUFFER_PADDING_SIZE < FF_INPUT_BUFFER_PADDING_SIZE #error MP_INPUT_BUFFER_PADDING_SIZE is too small! #endif +#include "av_helpers.h" #endif // This is quite experimental, in particular it will mess up the pts values @@ -328,7 +324,7 @@ mp_msg(MSGT_DEMUXER, MSGL_WARN, MSGTR_AudioStreamRedefined, id); else { sh_audio_t *sh = calloc(1, sizeof(sh_audio_t)); - mp_msg(MSGT_DEMUXER, MSGL_V, MSGTR_FoundAudioStream, id); + mp_msg(MSGT_DEMUXER, MSGL_V, "==> Found audio stream: %d\n", id); demuxer->a_streams[id] = sh; sh->aid = aid; sh->ds = demuxer->audio; @@ -376,7 +372,7 @@ mp_msg(MSGT_DEMUXER, MSGL_WARN, MSGTR_VideoStreamRedefined, id); else { sh_video_t *sh = calloc(1, sizeof(sh_video_t)); - mp_msg(MSGT_DEMUXER, MSGL_V, MSGTR_FoundVideoStream, id); + mp_msg(MSGT_DEMUXER, MSGL_V, "==> Found video stream: %d\n", id); demuxer->v_streams[id] = sh; sh->vid = vid; sh->ds = demuxer->video; @@ -477,6 +473,11 @@ init_avcodec(); switch (format) { + case 0x1600: + case MKTAG('M', 'P', '4', 'A'): + codec_id = CODEC_ID_AAC; + break; + case 0x1602: case MKTAG('M', 'P', '4', 'L'): codec_id = CODEC_ID_AAC_LATM; break; @@ -492,10 +493,15 @@ //codec_id = CODEC_ID_DNET; break; case MKTAG('E', 'A', 'C', '3'): + case MKTAG('e', 'c', '-', '3'): codec_id = CODEC_ID_EAC3; break; case 0x2001: case 0x86: + case MKTAG('D', 'T', 'S', ' '): + case MKTAG('d', 't', 's', ' '): + case MKTAG('d', 't', 's', 'b'): + case MKTAG('d', 't', 's', 'c'): codec_id = CODEC_ID_DTS; break; case MKTAG('f', 'L', 'a', 'C'): @@ -590,6 +596,7 @@ ds_add_packet_internal(ds, dp); } else if (parsed_len) { demux_packet_t *dp2 = new_demux_packet(parsed_len); + if (!dp2) return; dp2->pos = dp->pos; dp2->pts = dp->pts; // should be parser->pts but that works badly memcpy(dp2->buffer, parsed_start, parsed_len); @@ -605,6 +612,7 @@ double pts, off_t pos, int flags) { demux_packet_t *dp = new_demux_packet(len); + if (!dp) return; len = stream_read(stream, dp->buffer, len); resize_demux_packet(dp, len); dp->pts = pts; @@ -710,6 +718,7 @@ ds_parse(ds->sh, &parsed_start, &parsed_len, MP_NOPTS_VALUE, 0); if (parsed_len) { demux_packet_t *dp2 = new_demux_packet(parsed_len); + if (!dp2) continue; dp2->pts = MP_NOPTS_VALUE; memcpy(dp2->buffer, parsed_start, parsed_len); ds_add_packet_internal(ds, dp2); @@ -1471,7 +1480,7 @@ * 0 otherwise * \return the current play time */ -int demuxer_get_current_time(demuxer_t *demuxer) +double demuxer_get_current_time(demuxer_t *demuxer) { double get_time_ans = 0; sh_video_t *sh_video = demuxer->video->sh; @@ -1479,7 +1488,7 @@ get_time_ans = demuxer->stream_pts; else if (sh_video) get_time_ans = sh_video->pts; - return (int) get_time_ans; + return get_time_ans; } int demuxer_get_percent_pos(demuxer_t *demuxer) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demuxer.h mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demuxer.h --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demuxer.h 2011-06-11 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demuxer.h 2011-12-31 12:20:08.000000000 +0000 @@ -25,9 +25,7 @@ #include #include "stream/stream.h" -#ifdef CONFIG_ASS #include "sub/ass_mp.h" -#endif #include "m_option.h" #ifdef HAVE_BUILTIN_EXPECT @@ -265,6 +263,8 @@ // pointer to teletext decoder private data, if demuxer stream contains teletext void *teletext; + int num_titles; + demux_chapter_t* chapters; int num_chapters; @@ -439,7 +439,7 @@ int demux_info_print(demuxer_t *demuxer); int demux_control(demuxer_t *demuxer, int cmd, void *arg); -int demuxer_get_current_time(demuxer_t *demuxer); +double demuxer_get_current_time(demuxer_t *demuxer); double demuxer_get_time_length(demuxer_t *demuxer); int demuxer_get_percent_pos(demuxer_t *demuxer); int demuxer_switch_audio(demuxer_t *demuxer, int index); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_lavf.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_lavf.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_lavf.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_lavf.c 2011-11-10 16:31:07.000000000 +0000 @@ -27,6 +27,7 @@ #include "mp_msg.h" #include "help_mp.h" #include "av_opts.h" +#include "av_helpers.h" #include "stream/stream.h" #include "aviprint.h" @@ -68,7 +69,7 @@ typedef struct lavf_priv { AVInputFormat *avif; AVFormatContext *avfc; - ByteIOContext *pb; + AVIOContext *pb; uint8_t buffer[BIO_BUFFER_SIZE]; int audio_streams; int video_streams; @@ -139,7 +140,7 @@ static void list_formats(void) { AVInputFormat *fmt; mp_msg(MSGT_DEMUX, MSGL_INFO, "Available lavf input formats:\n"); - for (fmt = av_iformat_next(NULL); fmt; av_iformat_next(fmt)) + for (fmt = av_iformat_next(NULL); fmt; fmt = av_iformat_next(fmt)) mp_msg(MSGT_DEMUX, MSGL_INFO, "%15s : %s\n", fmt->name, fmt->long_name); } @@ -154,7 +155,7 @@ demuxer->priv=calloc(sizeof(lavf_priv_t),1); priv= demuxer->priv; - av_register_all(); + init_avformat(); if (opt_format) { if (strcmp(opt_format, "help") == 0) { @@ -218,6 +219,8 @@ "mpc8", "mxf", "ogg", + "pva", + "qcp", "swf", "vqf", "w64", @@ -262,13 +265,9 @@ AVCodecContext *codec= st->codec; char *stream_type = NULL; int stream_id; - AVMetadataTag *lang = av_metadata_get(st->metadata, "language", NULL, 0); - AVMetadataTag *title= av_metadata_get(st->metadata, "title", NULL, 0); - int g, override_tag = av_codec_get_tag(mp_codecid_override_taglists, - codec->codec_id); - // For some formats (like PCM) always trust CODEC_ID_* more than codec_tag - if (override_tag) - codec->codec_tag = override_tag; + AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0); + AVDictionaryEntry *title= av_dict_get(st->metadata, "title", NULL, 0); + int g; switch(codec->codec_type){ case AVMEDIA_TYPE_AUDIO:{ @@ -280,11 +279,7 @@ stream_type = "audio"; priv->astreams[priv->audio_streams] = i; wf= calloc(sizeof(*wf) + codec->extradata_size, 1); - // mp4a tag is used for all mp4 files no matter what they actually contain - if(codec->codec_tag == MKTAG('m', 'p', '4', 'a')) - codec->codec_tag= 0; - if(!codec->codec_tag) - codec->codec_tag= av_codec_get_tag(mp_wav_taglists, codec->codec_id); + codec->codec_tag = mp_codec_id2tag(codec->codec_id, codec->codec_tag, 1); wf->wFormatTag= codec->codec_tag; wf->nChannels= codec->channels; wf->nSamplesPerSec= codec->sample_rate; @@ -362,8 +357,7 @@ codec->codec_tag= MKTAG(24, 'R', 'G', 'B'); } } - if(!codec->codec_tag) - codec->codec_tag= av_codec_get_tag(mp_bmp_taglists, codec->codec_id); + codec->codec_tag = mp_codec_id2tag(codec->codec_id, codec->codec_tag, 0); bih->biSize= sizeof(*bih) + codec->extradata_size; bih->biWidth= codec->width; bih->biHeight= codec->height; @@ -458,7 +452,7 @@ } case AVMEDIA_TYPE_ATTACHMENT:{ if (st->codec->codec_id == CODEC_ID_TTF) { - AVMetadataTag *fnametag = av_metadata_get(st->metadata, "filename", NULL, 0); + AVDictionaryEntry *fnametag = av_dict_get(st->metadata, "filename", NULL, 0); demuxer_add_attachment(demuxer, fnametag ? fnametag->value : NULL, "application/x-truetype-font", codec->extradata, codec->extradata_size); @@ -484,15 +478,12 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){ AVFormatContext *avfc; - AVFormatParameters ap; const AVOption *opt; - AVMetadataTag *t = NULL; + AVDictionaryEntry *t = NULL; lavf_priv_t *priv= demuxer->priv; int i; char mp_filename[256]="mp:"; - memset(&ap, 0, sizeof(AVFormatParameters)); - stream_seek(demuxer->stream, 0); avfc = avformat_alloc_context(); @@ -504,7 +495,6 @@ if (index_mode == 0) avfc->flags |= AVFMT_FLAG_IGNIDX; - ap.prealloced_context = 1; if(opt_probesize) { opt = av_set_int(avfc, "probesize", opt_probesize); if(!opt) mp_msg(MSGT_HEADER,MSGL_ERR, "demux_lavf, couldn't set option probesize to %u\n", opt_probesize); @@ -530,33 +520,35 @@ av_strlcat(mp_filename, "foobar.dummy", sizeof(mp_filename)); if (!(priv->avif->flags & AVFMT_NOFILE)) { - priv->pb = av_alloc_put_byte(priv->buffer, BIO_BUFFER_SIZE, 0, - demuxer, mp_read, NULL, mp_seek); + priv->pb = avio_alloc_context(priv->buffer, BIO_BUFFER_SIZE, 0, + demuxer, mp_read, NULL, mp_seek); priv->pb->read_seek = mp_read_seek; priv->pb->is_streamed = !demuxer->stream->end_pos || (demuxer->stream->flags & MP_STREAM_SEEK) != MP_STREAM_SEEK; + priv->pb->seekable = priv->pb->is_streamed ? 0 : AVIO_SEEKABLE_NORMAL; + avfc->pb = priv->pb; } - if(av_open_input_stream(&avfc, priv->pb, mp_filename, priv->avif, &ap)<0){ + if(avformat_open_input(&avfc, mp_filename, priv->avif, NULL)<0){ mp_msg(MSGT_HEADER,MSGL_ERR,"LAVF_header: av_open_input_stream() failed\n"); return NULL; } priv->avfc= avfc; - if(av_find_stream_info(avfc) < 0){ + if(avformat_find_stream_info(avfc, NULL) < 0){ mp_msg(MSGT_HEADER,MSGL_ERR,"LAVF_header: av_find_stream_info() failed\n"); return NULL; } /* Add metadata. */ - while((t = av_metadata_get(avfc->metadata, "", t, AV_METADATA_IGNORE_SUFFIX))) + while((t = av_dict_get(avfc->metadata, "", t, AV_METADATA_IGNORE_SUFFIX))) demux_info_add(demuxer, t->key, t->value); for(i=0; i < avfc->nb_chapters; i++) { AVChapter *c = avfc->chapters[i]; uint64_t start = av_rescale_q(c->start, c->time_base, (AVRational){1,1000}); uint64_t end = av_rescale_q(c->end, c->time_base, (AVRational){1,1000}); - t = av_metadata_get(c->metadata, "title", NULL, 0); + t = av_dict_get(c->metadata, "title", NULL, 0); demuxer_add_chapter(demuxer, t ? t->value : NULL, start, end); } @@ -568,7 +560,7 @@ int p; for (p = 0; p < avfc->nb_programs; p++) { AVProgram *program = avfc->programs[p]; - t = av_metadata_get(program->metadata, "title", NULL, 0); + t = av_dict_get(program->metadata, "title", NULL, 0); mp_msg(MSGT_HEADER,MSGL_INFO,"LAVF: Program %d %s\n", program->id, t ? t->value : ""); mp_msg(MSGT_IDENTIFY, MSGL_V, "PROGRAM_ID=%d\n", program->id); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_lmlm4.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_lmlm4.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_lmlm4.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_lmlm4.c 2011-08-18 19:19:58.000000000 +0000 @@ -73,7 +73,7 @@ frame->frameSize > MAX_PACKET_SIZE || frame->frameSize <= 0) { mp_msg(MSGT_DEMUX, MSGL_V, - "Invalid packet in LMLM4 stream: ch=%d size=%zd\n", + "Invalid packet in LMLM4 stream: ch=%d size=%zu\n", frame->channelNo, frame->frameSize); return 0; } @@ -158,7 +158,7 @@ frameInfo->frameSize = packetSize - 8; //sizeof(IME6400Header); frameInfo->paddingSize = (packetSize & PACKET_BLOCK_LAST) ? PACKET_BLOCK_SIZE - (packetSize & PACKET_BLOCK_LAST) : 0; - mp_msg(MSGT_DEMUX, MSGL_DBG2, "typ: %d chan: %d size: %zd pad: %zd\n", + mp_msg(MSGT_DEMUX, MSGL_DBG2, "typ: %d chan: %d size: %zu pad: %zu\n", frameInfo->frameType, frameInfo->channelNo, frameInfo->frameSize, @@ -182,7 +182,6 @@ mp_msg(MSGT_DEMUX, MSGL_V, "Checking for LMLM4 Stream Format\n"); if(getFrame(demuxer, &frameInfo)!=1){ - stream_skip(demuxer->stream,-8); mp_msg(MSGT_DEMUX, MSGL_V, "LMLM4 Stream Format not found\n"); return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_mkv.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_mkv.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_mkv.c 2011-03-25 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_mkv.c 2012-01-02 12:53:20.000000000 +0000 @@ -380,6 +380,15 @@ } *size = dstlen - out_avail; } + else if (track->encodings[i].comp_algo == 3) + { + *dest = malloc (*size + track->encodings[i].comp_settings_len); + memcpy(*dest, track->encodings[i].comp_settings, + track->encodings[i].comp_settings_len); + memcpy(*dest + track->encodings[i].comp_settings_len, src, *size); + *size += track->encodings[i].comp_settings_len; + modified = 1; + } } return modified; @@ -542,7 +551,7 @@ track->tnum); } - if (e.comp_algo != 0 && e.comp_algo != 2) { + if (e.comp_algo != 0 && e.comp_algo != 2 && e.comp_algo != 3) { mp_msg(MSGT_DEMUX, MSGL_WARN, MSGTR_MPDEMUX_MKV_UnknownCompression, track->tnum, e.comp_algo); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_mpg.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_mpg.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_mpg.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_mpg.c 2011-07-27 13:40:06.000000000 +0000 @@ -262,7 +262,7 @@ return 0; // invalid pts } pts=(((uint64_t)((c>>1)&7))<<30)|((d>>1)<<15)|(e>>1); - mp_dbg(MSGT_DEMUX,MSGL_DBG3," pts {%"PRIu64"}",pts); + mp_dbg(MSGT_DEMUX,MSGL_DBG3," pts {%llu}",pts); return pts; } @@ -730,7 +730,7 @@ if(demuxer->synced==2) mp_msg(MSGT_DEMUXER,MSGL_ERR,"MPEG: " MSGTR_MissingVideoStreamBug); else - mp_msg(MSGT_DEMUXER,MSGL_V,MSGTR_NotSystemStream); + mp_msg(MSGT_DEMUXER, MSGL_V, "Not MPEG System Stream format... (maybe Transport Stream?)\n"); } } //FIXME this shouldn't be necessary diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_nemesi.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_nemesi.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_nemesi.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_nemesi.c 2011-10-26 15:12:35.000000000 +0000 @@ -17,13 +17,15 @@ * with MPlayer; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + #include #include + #include "stream/stream.h" #include "mpcommon.h" +#include "mp_msg.h" #include "demuxer.h" #include "stheader.h" -#define HAVE_STRUCT_SOCKADDR_STORAGE #include "nemesi/rtsp.h" #include "nemesi/rtp.h" #include diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_nsv.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_nsv.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_nsv.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_nsv.c 2011-10-21 15:44:58.000000000 +0000 @@ -23,6 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include #include #include #include @@ -75,7 +76,8 @@ // sometimes instead of 0xBEEF as described for the next audio/video chunk we get // a whole new header - mp_dbg(MSGT_DEMUX,MSGL_DBG2,"demux_nsv: %08X %08X\n",hdr[0]<<8|hdr[1],stream_tell(demuxer->stream)); + mp_dbg(MSGT_DEMUX, MSGL_DBG2, "demux_nsv: %08X %08"PRIX64"\n", + hdr[0] << 8 | hdr[1], stream_tell(demuxer->stream)); switch(hdr[0]<<8|hdr[1]) { case 0x4E53: if(hdr[2]==0x56 && hdr[3]==0x73){ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_ogg.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_ogg.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_ogg.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_ogg.c 2012-01-05 15:50:17.000000000 +0000 @@ -49,21 +49,21 @@ #endif #ifdef CONFIG_OGGTHEORA -#include -int _ilog (unsigned int); /* defined in many places in theora/lib/ */ +#include #endif #define BLOCK_SIZE 4096 /* Theora decoder context : we won't be able to interpret granule positions - * without using theora_granule_time with the theora_state of the stream. + * without using th_granule_time with the th_dec_ctx of the stream. * This is duplicated in `vd_theora.c'; put this in a common header? */ #ifdef CONFIG_OGGTHEORA typedef struct theora_struct_st { - theora_state st; - theora_comment cc; - theora_info inf; + th_setup_info *tsi; + th_dec_ctx *tctx; + th_comment tc; + th_info ti; } theora_struct_t; #endif @@ -116,7 +116,7 @@ float samplerate; /// granulpos 2 time int64_t lastpos; int32_t lastsize; - int keyframe_frequency_force; + int keyframe_granule_shift; // Logical stream state ogg_stream_state stream; @@ -202,12 +202,12 @@ duration |= (unsigned char)packet[i]; } if (hdrlen > 0 && duration > 0) { - float pts; + double pts; if (pack->granulepos == -1) pack->granulepos = os->lastpos + os->lastsize; - pts = (float)pack->granulepos / (float)os->samplerate; - endpts = 1.0 + pts + (float)duration / 1000.0; + pts = (double)pack->granulepos / (double)os->samplerate; + endpts = 1.0 + pts + (double)duration / 1000.0; } sub_clear_text(&ogg_sub, MP_NOPTS_VALUE); sub_add_text(&ogg_sub, &packet[lcv], pack->bytes - lcv, endpts, 1); @@ -257,7 +257,7 @@ } static unsigned char *demux_ogg_read_packet(ogg_stream_t *os, ogg_packet *pack, - float *pts, int *flags, + double *pts, int *flags, int samplesize) { unsigned char *data = pack->packet; @@ -284,7 +284,7 @@ } else *flags = 1; if (vi) - *pts = pack->granulepos / (float)vi->rate; + *pts = pack->granulepos / (double)vi->rate; os->lastsize = blocksize; os->lastpos = pack->granulepos; } @@ -299,11 +299,10 @@ have theora_state st, until all header packets were passed to the decoder. */ if (!pack->bytes || !(*data&0x80)) { - int keyframe_granule_shift = _ilog(os->keyframe_frequency_force - 1); - int64_t iframemask = (1 << keyframe_granule_shift) - 1; + int64_t iframemask = (1 << os->keyframe_granule_shift) - 1; if (pack->granulepos >= 0) { - os->lastpos = pack->granulepos >> keyframe_granule_shift; + os->lastpos = pack->granulepos >> os->keyframe_granule_shift; os->lastpos += pack->granulepos & iframemask; *flags = (pack->granulepos & iframemask) == 0; } else { @@ -480,7 +479,7 @@ demuxer_t *d = ds->demuxer; demux_packet_t *dp; unsigned char *data; - float pts = 0; + double pts = 0; int flags = 0; int samplesize = 1; @@ -609,7 +608,7 @@ } p = 0; while (ogg_stream_packetout(oss, &op) == 1) { - float pts; + double pts; int flags; demux_ogg_read_packet(os, &op, &pts, &flags, samplesize); @@ -892,14 +891,15 @@ #ifdef CONFIG_OGGTHEORA } else if (pack.bytes >= 7 && !strncmp (&pack.packet[1], "theora", 6)) { int errorCode = 0; - theora_info inf; - theora_comment cc; + th_info ti; + th_comment tc; + th_setup_info *tsi = NULL; - theora_info_init (&inf); - theora_comment_init (&cc); + th_info_init (&ti); + th_comment_init (&tc); - errorCode = theora_decode_header (&inf, &cc, &pack); - if (errorCode) { + errorCode = th_decode_headerin(&ti, &tc, &tsi, &pack); + if (errorCode < 0) { mp_msg(MSGT_DEMUX, MSGL_ERR, "Theora header parsing failed: %i \n", errorCode); } else { @@ -908,30 +908,32 @@ sh_v->bih = calloc(1, sizeof(*sh_v->bih)); sh_v->bih->biSize = sizeof(*sh_v->bih); sh_v->bih->biCompression = sh_v->format = FOURCC_THEORA; - sh_v->fps = ((double)inf.fps_numerator) / (double)inf.fps_denominator; - sh_v->frametime = ((double)inf.fps_denominator) / (double)inf.fps_numerator; - sh_v->disp_w = sh_v->bih->biWidth = inf.frame_width; - sh_v->disp_h = sh_v->bih->biHeight = inf.frame_height; + sh_v->fps = ((double)ti.fps_numerator) / (double)ti.fps_denominator; + sh_v->frametime = ((double)ti.fps_denominator) / (double)ti.fps_numerator; + sh_v->i_bps = ti.target_bitrate / 8; + sh_v->disp_w = sh_v->bih->biWidth = ti.frame_width; + sh_v->disp_h = sh_v->bih->biHeight = ti.frame_height; sh_v->bih->biBitCount = 24; sh_v->bih->biPlanes = 3; sh_v->bih->biSizeImage = ((sh_v->bih->biBitCount / 8) * sh_v->bih->biWidth * sh_v->bih->biHeight); ogg_d->subs[ogg_d->num_sub].samplerate = sh_v->fps; ogg_d->subs[ogg_d->num_sub].theora = 1; - ogg_d->subs[ogg_d->num_sub].keyframe_frequency_force = inf.keyframe_frequency_force; + ogg_d->subs[ogg_d->num_sub].keyframe_granule_shift = ti.keyframe_granule_shift; ogg_d->subs[ogg_d->num_sub].id = n_video; n_video++; mp_msg(MSGT_DEMUX, MSGL_INFO, "[Ogg] stream %d: video (Theora v%d.%d.%d), -vid %d\n", ogg_d->num_sub, - (int)inf.version_major, - (int)inf.version_minor, - (int)inf.version_subminor, + (int)ti.version_major, + (int)ti.version_minor, + (int)ti.version_subminor, n_video - 1); if (mp_msg_test(MSGT_HEADER, MSGL_V)) print_video_header(sh_v->bih, MSGL_V); } - theora_comment_clear(&cc); - theora_info_clear(&inf); + th_comment_clear(&tc); + th_info_clear(&ti); + th_setup_free(tsi); #endif /* CONFIG_OGGTHEORA */ } else if (pack.bytes >= 4 && !strncmp (&pack.packet[0], "fLaC", 4)) { sh_a = new_sh_audio_aid(demuxer, ogg_d->num_sub, n_audio, NULL); @@ -1410,14 +1412,14 @@ ogg_stream_t *os; demux_stream_t *ds; ogg_packet op; - float rate; + double rate; int i, sp, first, precision = 1, do_seek = 1; vorbis_info *vi = NULL; int64_t gp = 0, old_gp; off_t pos, old_pos; int np; int is_gp_valid; - float pts; + double pts; int is_keyframe; int samplesize = 1; ogg_int64_t granulepos_orig; @@ -1429,7 +1431,7 @@ ds = demuxer->audio; os = &ogg_d->subs[ds->id]; vi = &(os->vi); - rate = (float)vi->rate; + rate = vi->rate; samplesize = ((sh_audio_t*)ds->sh)->samplesize; } @@ -1618,7 +1620,7 @@ { ogg_demuxer_t *ogg_d = demuxer->priv; ogg_stream_t *os; - float rate; + double rate; if (demuxer->video->id >= 0) { os = &ogg_d->subs[demuxer->video->id]; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_pva.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_pva.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_pva.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_pva.c 2011-10-13 16:50:30.000000000 +0000 @@ -27,7 +27,6 @@ * played back correctly. If it breaks anything else, just comment out * the #define below and it will not be compiled in. */ #define DEMUX_PVA_MULTIDEC_HACK -#define PVA_NEW_PREBYTES_CODE #include #include @@ -52,7 +51,7 @@ typedef struct { off_t offset; - long size; + int size; uint8_t type; uint8_t is_packet_start; float pts; @@ -62,11 +61,9 @@ typedef struct { float last_audio_pts; float last_video_pts; -#ifdef PVA_NEW_PREBYTES_CODE float video_pts_after_prebytes; - long video_size_after_prebytes; + int video_size_after_prebytes; uint8_t prebytes_delivered; -#endif uint8_t just_synced; uint8_t synced_stream_id; } pva_priv_t; @@ -201,9 +198,6 @@ uint16_t pack_size; off_t pva_payload_start; unsigned char buffer[256]; -#ifndef PVA_NEW_PREBYTES_CODE - demux_packet_t * dp; //hack to deliver the preBytes (see PVA doc) -#endif pva_priv_t * priv; @@ -227,7 +221,6 @@ //printf("priv->just_synced %s\n",priv->just_synced?"SET":"UNSET"); -#ifdef PVA_NEW_PREBYTES_CODE if(priv->prebytes_delivered) /* The previous call to this fn has delivered the preBytes. Then we are already inside * the payload. Let's just deliver the video along with its right PTS, the one we stored @@ -243,7 +236,6 @@ priv->prebytes_delivered = 0; return 1; } -#endif if(!priv->just_synced) { if(stream_read_word(d->stream) != (('A'<<8)|'V')) @@ -313,16 +305,9 @@ payload->pts=(float)(stream_read_dword(d->stream))/90000; //printf("Video PTS: %f\n",payload->pts); if((flags&0x03) -#ifdef PVA_NEW_PREBYTES_CODE && !priv->prebytes_delivered -#endif ) { -#ifndef PVA_NEW_PREBYTES_CODE - dp=new_demux_packet(flags&0x03); - stream_read(d->stream,dp->buffer,flags & 0x03); //read PreBytes - ds_add_packet(d->video,dp); -#else //printf("Delivering prebytes. Setting prebytes_delivered."); payload->offset=stream_tell(d->stream); payload->size = flags & 0x03; @@ -332,7 +317,6 @@ payload->is_packet_start=0; priv->prebytes_delivered=1; return 1; -#endif } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_rawdv.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_rawdv.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_rawdv.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_rawdv.c 2011-10-20 14:42:14.000000000 +0000 @@ -113,7 +113,7 @@ demux_packet_t* dp_video=NULL; sh_video_t *sh_video = demuxer->video->sh; int bytes_read=0; -// fprintf(stderr,"demux_rawdv_fill_buffer() seek to %qu, size: %d\n",frames->current_filepos,frames->frame_size); +// fprintf(stderr,"demux_rawdv_fill_buffer() seek to %llu, size: %d\n",frames->current_filepos,frames->frame_size); // fetch the frame from the file // first, position the file properly since ds_read_packet() doesn't // seem to do it, even though it takes a file offset as a parameter @@ -205,7 +205,7 @@ frames->frame_size=dv_decoder->frame_size; frames->frame_number=demuxer->stream->end_pos/frames->frame_size; - mp_msg(MSGT_DEMUXER,MSGL_V,"demux_open_rawdv() seek to %qu, size: %d, dv_dec->frame_size: %d\n",frames->current_filepos,frames->frame_size, dv_decoder->frame_size); + mp_msg(MSGT_DEMUXER,MSGL_V,"demux_open_rawdv() seek to %llu, size: %d, dv_dec->frame_size: %d\n",frames->current_filepos,frames->frame_size, dv_decoder->frame_size); if (dv_decoder->audio != NULL && demuxer->audio->id>=-1){ sh_audio_t *sh_audio = new_sh_audio(demuxer, 0, NULL); demuxer->audio->id = 0; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_rawvideo.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_rawvideo.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_rawvideo.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_rawvideo.c 2011-10-26 15:12:35.000000000 +0000 @@ -24,7 +24,7 @@ #include #include "m_option.h" - +#include "mp_msg.h" #include "stream/stream.h" #include "demuxer.h" #include "stheader.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_rtp_codec.cpp mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_rtp_codec.cpp --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_rtp_codec.cpp 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_rtp_codec.cpp 2011-10-26 15:12:25.000000000 +0000 @@ -23,6 +23,8 @@ extern "C" { #include #include + +#include "mpcommon.h" #include "stheader.h" #include "libavutil/base64.h" } @@ -359,7 +361,7 @@ // figure out the frame rate by itself, so (unless the user specifies // it manually, using "-fps") we figure it out ourselves here, using the // presentation timestamps in successive packets, - extern double force_fps; if (force_fps != 0.0) return; // user used "-fps" + if (force_fps != 0.0) return; // user used "-fps" demux_stream_t* d_video = demuxer->video; sh_video_t* sh_video = (sh_video_t*)(d_video->sh); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_rtp.cpp mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_rtp.cpp --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_rtp.cpp 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_rtp.cpp 2011-10-26 15:12:25.000000000 +0000 @@ -24,6 +24,7 @@ #ifdef __MINGW32__ // with. they are each protected from #include // windows.h, but not the other way around. #endif +#include "mp_msg.h" #include "demuxer.h" #include "demux_rtp.h" #include "stheader.h" @@ -146,7 +147,6 @@ // we were given a RTSP or SIP URL: char const* protocol = demuxer->stream->streaming_ctrl->url->protocol; char const* url = demuxer->stream->streaming_ctrl->url->url; - extern int verbose; if (strcmp(protocol, "rtsp") == 0) { if (rtsp_transport_http == 1) { rtsp_transport_http = demuxer->stream->streaming_ctrl->url->port; @@ -496,11 +496,32 @@ RTPState* rtpState = (RTPState*)(demuxer->priv); ReadBufferQueue* bufferQueue = NULL; int headersize = 0; - TaskToken task; + int waitboth = 0; + TaskToken task, task2; if (demuxer->stream->eof) return NULL; if (ds == demuxer->video) { + bufferQueue = rtpState->audioBufferQueue; + // HACK: for the latest versions we must also receive audio + // when probing for video FPS, otherwise the stream just hangs + // and times out + if (mustGetNewData && + bufferQueue && + bufferQueue->readSource() && + !bufferQueue->nextpacket) { + headersize = bufferQueue->readSource()->isAMRAudioSource() ? 1 : 0; + demux_packet_t *dp = new_demux_packet(MAX_RTP_FRAME_SIZE); + bufferQueue->dp = dp; + bufferQueue->blockingFlag = 0; + bufferQueue->readSource()->getNextFrame( + &dp->buffer[headersize], MAX_RTP_FRAME_SIZE - headersize, + afterReading, bufferQueue, + onSourceClosure, bufferQueue); + task2 = bufferQueue->readSource()->envir().taskScheduler(). + scheduleDelayedTask(10000000, onSourceClosure, bufferQueue); + waitboth = 1; + } bufferQueue = rtpState->videoBufferQueue; if (((sh_video_t*)ds->sh)->format == mmioFOURCC('H','2','6','4')) headersize = 3; @@ -558,6 +579,10 @@ task = scheduler.scheduleDelayedTask(delay, onSourceClosure, bufferQueue); scheduler.doEventLoop(&bufferQueue->blockingFlag); scheduler.unscheduleDelayedTask(task); + if (waitboth) { + scheduler.doEventLoop(&rtpState->audioBufferQueue->blockingFlag); + scheduler.unscheduleDelayedTask(task2); + } if (demuxer->stream->eof) { free_demux_packet(dp); return NULL; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_ty.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_ty.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_ty.c 2010-10-27 18:22:51.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_ty.c 2011-08-18 19:20:50.000000000 +0000 @@ -853,6 +853,7 @@ { TiVoInfo *tivo = calloc(1, sizeof(TiVoInfo)); demuxer->priv = tivo; + demuxer->filepos = stream_tell( demuxer->stream ); return ds_fill_buffer(demuxer->video) ? DEMUXER_TYPE_MPEG_TY : 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_viv.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_viv.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_viv.c 2010-11-15 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_viv.c 2011-07-27 13:40:06.000000000 +0000 @@ -128,7 +128,7 @@ token, (int64_t)stream_tell(demux->stream)); break; } - mp_dbg(MSGT_DEMUX, MSGL_DBG3, "token: '%s' (%d bytes/%d bytes left)\n", + mp_dbg(MSGT_DEMUX, MSGL_DBG3, "token: '%s' (%zu bytes/%d bytes left)\n", token, strlen(token), header_len); mp_dbg(MSGT_DEMUX, MSGL_DBG3, "token => o: '%s', p: '%s'\n", opt, param); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_vqf.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_vqf.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/demux_vqf.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/demux_vqf.c 2011-10-26 15:12:35.000000000 +0000 @@ -25,6 +25,7 @@ #include "mpbswap.h" #include "stream/stream.h" +#include "mp_msg.h" #include "demuxer.h" #include "stheader.h" #include "libmpcodecs/vqf.h" @@ -157,7 +158,7 @@ if(sid==mmioFOURCC('E','N','C','D')) demux_info_add(demuxer,"Encoder",sdata); else mp_msg(MSGT_DEMUX, MSGL_V, "Unhandled subchunk '%c%c%c%c'='%s'\n",((char *)&sid)[0],((char *)&sid)[1],((char *)&sid)[2],((char *)&sid)[3],sdata); - /* other stuff is unrecognized due untranslatable japan's idiomatics */ + /* rest not recognized due to untranslatable Japanese expressions */ } } else @@ -229,7 +230,7 @@ "vqf", "VQF", "Nick Kurshev", - "ported frm MPlayerXP", + "ported from MPlayerXP", DEMUXER_TYPE_VQF, 1, // safe autodetect demux_probe_vqf, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/extension.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/extension.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/extension.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/extension.c 2011-10-26 15:12:35.000000000 +0000 @@ -21,7 +21,7 @@ #include #include "config.h" - +#include "mp_msg.h" #include "stream/stream.h" #include "demuxer.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/mf.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/mf.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/mf.c 2011-01-07 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/mf.c 2011-07-27 13:40:06.000000000 +0000 @@ -127,7 +127,7 @@ mf->nr_of_files=gg.gl_pathc; mf->names=calloc( gg.gl_pathc, sizeof( char* ) ); - mp_msg( MSGT_STREAM,MSGL_INFO,"[mf] number of files: %d (%d)\n",mf->nr_of_files, gg.gl_pathc * sizeof( char* ) ); + mp_msg( MSGT_STREAM, MSGL_INFO, "[mf] number of files: %d (%zu)\n", mf->nr_of_files, gg.gl_pathc * sizeof( char* ) ); for( i=0;i < gg.gl_pathc;i++ ) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/mpeg_hdr.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/mpeg_hdr.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/mpeg_hdr.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/mpeg_hdr.c 2011-10-24 16:22:10.000000000 +0000 @@ -70,7 +70,7 @@ } static int header_process_sequence_extension (mp_mpeg_header_t * picture, - unsigned char * buffer) + const unsigned char * buffer) { /* check chroma format, size extensions, marker bit */ @@ -87,7 +87,7 @@ return 0; } -static int header_process_picture_coding_extension (mp_mpeg_header_t * picture, unsigned char * buffer) +static int header_process_picture_coding_extension (mp_mpeg_header_t * picture, const unsigned char * buffer) { picture->picture_structure = buffer[2] & 3; picture->top_field_first = buffer[3] >> 7; @@ -113,7 +113,7 @@ return 0; } -int mp_header_process_extension (mp_mpeg_header_t * picture, unsigned char * buffer) +int mp_header_process_extension (mp_mpeg_header_t * picture, const unsigned char * buffer) { switch (buffer[0] & 0xf0) { case 0x10: /* sequence extension */ @@ -157,7 +157,7 @@ } //MPEG4 HEADERS -unsigned char mp_getbits(unsigned char *buffer, unsigned int from, unsigned char len) +unsigned char mp_getbits(const unsigned char *buffer, unsigned int from, unsigned char len) { unsigned int n; unsigned char m, u, l, y; @@ -178,7 +178,7 @@ return y; } -static inline unsigned int mp_getbits16(unsigned char *buffer, unsigned int from, unsigned char len) +static inline unsigned int mp_getbits16(const unsigned char *buffer, unsigned int from, unsigned char len) { if(len > 8) return (mp_getbits(buffer, from, len - 8) << 8) | mp_getbits(buffer, from + len - 8, 8); @@ -189,7 +189,7 @@ #define getbits mp_getbits #define getbits16 mp_getbits16 -static int read_timeinc(mp_mpeg_header_t * picture, unsigned char * buffer, int n) +static int read_timeinc(mp_mpeg_header_t * picture, const unsigned char * buffer, int n) { if(picture->timeinc_bits > 8) { picture->timeinc_unit = getbits(buffer, n, picture->timeinc_bits - 8) << 8; @@ -204,9 +204,9 @@ return n; } -int mp4_header_process_vol(mp_mpeg_header_t * picture, unsigned char * buffer) +int mp4_header_process_vol(mp_mpeg_header_t * picture, const unsigned char * buffer) { - unsigned int n, aspect=0, aspectw=0, aspecth=0, x=1, v; + unsigned int n, aspect, x=1, v; //begins with 0x0000012x picture->fps = 0; @@ -218,10 +218,8 @@ aspect=getbits(buffer, n, 4); n += 4; if(aspect == 0x0f) { - aspectw = getbits(buffer, n, 8); - n += 8; - aspecth = getbits(buffer, n, 8); - n += 8; + // custom aspect w and h, 8 bit each + n += 16; } if(getbits(buffer, n, 1)) { @@ -268,7 +266,7 @@ return 0; } -void mp4_header_process_vop(mp_mpeg_header_t * picture, unsigned char * buffer) +void mp4_header_process_vop(mp_mpeg_header_t * picture, const unsigned char * buffer) { int n; n = 0; @@ -370,12 +368,10 @@ return n; } -static int mp_unescape03(unsigned char *buf, int len) +static int mp_unescape03(uint8_t *dest, const uint8_t *buf, int len) { - unsigned char *dest; int i, j, skip; - dest = malloc(len); if(! dest) return 0; @@ -399,18 +395,17 @@ dest[j] = buf[len-2]; dest[j+1] = buf[len-1]; len -= skip; - memcpy(buf, dest, len); - free(dest); return len; } -int h264_parse_sps(mp_mpeg_header_t * picture, unsigned char * buf, int len) +int h264_parse_sps(mp_mpeg_header_t * picture, const unsigned char * inbuf, int len) { unsigned int n = 0, v, i, k, mbh; int frame_mbs_only; + uint8_t *buf = malloc(len); - len = mp_unescape03(buf, len); + len = mp_unescape03(buf, inbuf, len); picture->fps = picture->timeinc_unit = picture->timeinc_resolution = 0; n = 24; @@ -465,14 +460,17 @@ if(getbits(buf, n++, 1)) n = h264_parse_vui(picture, buf, n); + free(buf); + return n; } -int mp_vc1_decode_sequence_header(mp_mpeg_header_t * picture, unsigned char * buf, int len) +int mp_vc1_decode_sequence_header(mp_mpeg_header_t * picture, const unsigned char * inbuf, int len) { int n, x; + uint8_t *buf = malloc(len); - len = mp_unescape03(buf, len); + len = mp_unescape03(buf, inbuf, len); picture->display_picture_width = picture->display_picture_height = 0; picture->fps = 0; @@ -480,7 +478,7 @@ x = getbits(buf, n, 2); n += 2; if(x != 3) //not advanced profile - return 0; + goto err_out; getbits16(buf, n, 14); n += 14; @@ -534,6 +532,10 @@ } } - //free(dest); + free(buf); return 1; + +err_out: + free(buf); + return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/mpeg_hdr.h mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/mpeg_hdr.h --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/mpeg_hdr.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/mpeg_hdr.h 2011-10-24 16:20:00.000000000 +0000 @@ -43,13 +43,13 @@ } mp_mpeg_header_t; int mp_header_process_sequence_header (mp_mpeg_header_t * picture, const unsigned char * buffer); -int mp_header_process_extension (mp_mpeg_header_t * picture, unsigned char * buffer); +int mp_header_process_extension (mp_mpeg_header_t * picture, const unsigned char * buffer); float mpeg12_aspect_info(mp_mpeg_header_t *picture); -int mp4_header_process_vol(mp_mpeg_header_t * picture, unsigned char * buffer); -void mp4_header_process_vop(mp_mpeg_header_t * picture, unsigned char * buffer); -int h264_parse_sps(mp_mpeg_header_t * picture, unsigned char * buf, int len); -int mp_vc1_decode_sequence_header(mp_mpeg_header_t * picture, unsigned char * buf, int len); +int mp4_header_process_vol(mp_mpeg_header_t * picture, const unsigned char * buffer); +void mp4_header_process_vop(mp_mpeg_header_t * picture, const unsigned char * buffer); +int h264_parse_sps(mp_mpeg_header_t * picture, const unsigned char * buf, int len); +int mp_vc1_decode_sequence_header(mp_mpeg_header_t * picture, const unsigned char * buf, int len); -unsigned char mp_getbits(unsigned char *buffer, unsigned int from, unsigned char len); +unsigned char mp_getbits(const unsigned char *buffer, unsigned int from, unsigned char len); #endif /* MPLAYER_MPEG_HDR_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/mp_taglists.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/mp_taglists.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/mp_taglists.c 2011-04-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/mp_taglists.c 2012-01-04 20:28:43.000000000 +0000 @@ -18,32 +18,44 @@ #include "config.h" +#include +#include "mp_msg.h" #include "mp_taglists.h" +#include "libavutil/common.h" #include "libavformat/avformat.h" -#include "libavformat/riff.h" +// for AVCodecTag +#include "libavformat/internal.h" -static const AVCodecTag mp_wav_tags[] = { +static const struct AVCodecTag mp_wav_tags[] = { { CODEC_ID_ADPCM_4XM, MKTAG('4', 'X', 'M', 'A')}, { CODEC_ID_ADPCM_ADX, MKTAG('S', 'a', 'd', 'x')}, { CODEC_ID_ADPCM_EA, MKTAG('A', 'D', 'E', 'A')}, { CODEC_ID_ADPCM_EA_MAXIS_XA, MKTAG('A', 'D', 'X', 'A')}, + { CODEC_ID_ADPCM_IMA_EA_EACS, MKTAG('E', 'A', 'C', 'S')}, + { CODEC_ID_ADPCM_IMA_ISS, MKTAG('A', 'I', 'S', 'S')}, { CODEC_ID_ADPCM_IMA_WS, MKTAG('A', 'I', 'W', 'S')}, { CODEC_ID_ADPCM_THP, MKTAG('T', 'H', 'P', 'A')}, { CODEC_ID_ADPCM_XA, MKTAG('P', 'S', 'X', 'A')}, { CODEC_ID_AMR_NB, MKTAG('n', 'b', 0, 0)}, { CODEC_ID_BINKAUDIO_DCT, MKTAG('B', 'A', 'U', '1')}, { CODEC_ID_BINKAUDIO_RDFT, MKTAG('B', 'A', 'U', '2')}, + { CODEC_ID_BMV_AUDIO, MKTAG('B', 'M', 'V', 'A')}, { CODEC_ID_COOK, MKTAG('c', 'o', 'o', 'k')}, { CODEC_ID_DSICINAUDIO, MKTAG('D', 'C', 'I', 'A')}, { CODEC_ID_EAC3, MKTAG('E', 'A', 'C', '3')}, +#if LIBAVUTIL_VERSION_MICRO >= 100 + { CODEC_ID_FFWAVESYNTH, MKTAG('F', 'F', 'W', 'S')}, +#endif + { CODEC_ID_G723_1, MKTAG('7', '2', '3', '1')}, { CODEC_ID_INTERPLAY_DPCM, MKTAG('I', 'N', 'P', 'A')}, { CODEC_ID_MLP, MKTAG('M', 'L', 'P', ' ')}, { CODEC_ID_MP1, 0x50}, { CODEC_ID_MP4ALS, MKTAG('A', 'L', 'S', ' ')}, { CODEC_ID_MUSEPACK7, MKTAG('M', 'P', 'C', ' ')}, { CODEC_ID_MUSEPACK8, MKTAG('M', 'P', 'C', '8')}, - { CODEC_ID_NELLYMOSER, MKTAG('N', 'E', 'L', 'L')}, + { CODEC_ID_NELLYMOSER, MKTAG('n', 'm', 'o', 's')}, { CODEC_ID_PCM_LXF, MKTAG('P', 'L', 'X', 'F')}, + { CODEC_ID_PCM_S16LE_PLANAR, MKTAG('1', '6', 'P', 'L')}, { CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'p')}, { CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2')}, { CODEC_ID_RA_144, MKTAG('1', '4', '_', '4')}, @@ -53,23 +65,35 @@ { CODEC_ID_SPEEX, MKTAG('s', 'p', 'x', ' ')}, { CODEC_ID_TTA, MKTAG('T', 'T', 'A', '1')}, { CODEC_ID_TWINVQ, MKTAG('T', 'W', 'I', '2')}, + { CODEC_ID_VMDAUDIO, MKTAG('V', 'M', 'D', 'A')}, { CODEC_ID_WAVPACK, MKTAG('W', 'V', 'P', 'K')}, { CODEC_ID_WESTWOOD_SND1, MKTAG('S', 'N', 'D', '1')}, { CODEC_ID_XAN_DPCM, MKTAG('A', 'x', 'a', 'n')}, { 0, 0 }, }; -const struct AVCodecTag * const mp_wav_taglists[] = {ff_codec_wav_tags, mp_wav_tags, 0}; +static const struct AVCodecTag * const mp_wav_taglists[] = {mp_wav_tags, 0}; -static const AVCodecTag mp_codecid_override_tags[] = { +static const struct AVCodecTag mp_codecid_override_tags[] = { + { CODEC_ID_8SVX_EXP, MKTAG('8', 'e', 'x', 'p')}, + { CODEC_ID_8SVX_FIB, MKTAG('8', 'f', 'i', 'b')}, + { MKBETAG('8','S','V','X'), MKTAG('8', 'r', 'a', 'w')}, { CODEC_ID_AAC, MKTAG('M', 'P', '4', 'A')}, { CODEC_ID_AAC_LATM, MKTAG('M', 'P', '4', 'L')}, { CODEC_ID_AC3, 0x2000}, + { CODEC_ID_ADPCM_IMA_EA_SEAD, MKTAG('S', 'E', 'A', 'D')}, { CODEC_ID_ADPCM_IMA_AMV, MKTAG('A', 'M', 'V', 'A')}, { CODEC_ID_DTS, 0x2001}, { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'd')}, { CODEC_ID_EAC3, MKTAG('E', 'A', 'C', '3')}, + { CODEC_ID_ESCAPE124, MKTAG('E', '1', '2', '4')}, +#if LIBAVUTIL_VERSION_MICRO >= 100 + { CODEC_ID_ESCAPE130, MKTAG('E', '1', '3', '0')}, +#endif + { CODEC_ID_FLV1, MKTAG('F', 'L', 'V', '1')}, + { CODEC_ID_G729, MKTAG('G', '7', '2', '9')}, { CODEC_ID_H264, MKTAG('H', '2', '6', '4')}, + { CODEC_ID_MP3, 0x55}, { CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'V')}, { CODEC_ID_PCM_BLURAY, MKTAG('B', 'P', 'C', 'M')}, { CODEC_ID_PCM_S8, MKTAG('t', 'w', 'o', 's')}, @@ -86,17 +110,21 @@ { 0, 0 }, }; -const struct AVCodecTag * const mp_codecid_override_taglists[] = +static const struct AVCodecTag * const mp_codecid_override_taglists[] = {mp_codecid_override_tags, 0}; -static const AVCodecTag mp_bmp_tags[] = { +static const struct AVCodecTag mp_bmp_tags[] = { { CODEC_ID_AMV, MKTAG('A', 'M', 'V', 'V')}, { CODEC_ID_ANM, MKTAG('A', 'N', 'M', ' ')}, + { CODEC_ID_ANSI, MKTAG('T', 'X', 'T', '4')}, { CODEC_ID_AVS, MKTAG('A', 'V', 'S', ' ')}, { CODEC_ID_BETHSOFTVID, MKTAG('B', 'E', 'T', 'H')}, { CODEC_ID_BFI, MKTAG('B', 'F', 'I', 'V')}, + { CODEC_ID_BMV_VIDEO, MKTAG('B', 'M', 'V', 'V')}, { CODEC_ID_C93, MKTAG('C', '9', '3', 'V')}, { CODEC_ID_CDGRAPHICS, MKTAG('C', 'D', 'G', 'R')}, + { CODEC_ID_CMV, MKTAG('M', 'V', 'I', 'f')}, + { CODEC_ID_DFA, MKTAG('C', 'D', 'F', 'A')}, { CODEC_ID_DNXHD, MKTAG('A', 'V', 'd', 'n')}, { CODEC_ID_DSICINVIDEO, MKTAG('D', 'C', 'I', 'V')}, { CODEC_ID_DXA, MKTAG('D', 'X', 'A', '1')}, @@ -104,8 +132,11 @@ { CODEC_ID_IDCIN, MKTAG('I', 'D', 'C', 'I')}, { CODEC_ID_INTERPLAY_VIDEO, MKTAG('I', 'N', 'P', 'V')}, { CODEC_ID_JV, MKTAG('F', 'F', 'J', 'V')}, + { CODEC_ID_MAD, MKTAG('M', 'A', 'D', 'k')}, { CODEC_ID_MDEC, MKTAG('M', 'D', 'E', 'C')}, + { CODEC_ID_MMVIDEO, MKTAG('M', 'M', 'V', ' ')}, { CODEC_ID_MOTIONPIXELS, MKTAG('M', 'V', 'I', '1')}, + { CODEC_ID_MXPEG, MKTAG('M', 'X', 'P', 'G')}, { CODEC_ID_NUV, MKTAG('N', 'U', 'V', '1')}, { CODEC_ID_RL2, MKTAG('R', 'L', '2', 'V')}, { CODEC_ID_ROQ, MKTAG('R', 'o', 'Q', 'V')}, @@ -114,6 +145,7 @@ { CODEC_ID_RV30, MKTAG('R', 'V', '3', '0')}, { CODEC_ID_RV40, MKTAG('R', 'V', '4', '0')}, { CODEC_ID_SVQ3, MKTAG('S', 'V', 'Q', '3')}, + { CODEC_ID_TMV, MKTAG('t', 'm', 'v', '8')}, { CODEC_ID_TGV, MKTAG('f', 'V', 'G', 'T')}, { CODEC_ID_THP, MKTAG('T', 'H', 'P', 'V')}, { CODEC_ID_TIERTEXSEQVIDEO, MKTAG('T', 'S', 'E', 'Q')}, @@ -125,4 +157,46 @@ { 0, 0 }, }; -const struct AVCodecTag * const mp_bmp_taglists[] = {ff_codec_bmp_tags, mp_bmp_tags, 0}; +static const struct AVCodecTag * const mp_bmp_taglists[] = {mp_bmp_tags, 0}; + +enum CodecID mp_tag2codec_id(uint32_t tag, int audio) +{ + AVOutputFormat *avi_format; + enum CodecID id = av_codec_get_id(audio ? mp_wav_taglists : mp_bmp_taglists, tag); + if (id != CODEC_ID_NONE) + return id; + avi_format = av_guess_format("avi", NULL, NULL); + if (!avi_format) { + mp_msg(MSGT_DEMUXER, MSGL_FATAL, "MPlayer cannot work properly without AVI muxer in libavformat!\n"); + return 0; + } + return av_codec_get_id(avi_format->codec_tag, tag); +} + +uint32_t mp_codec_id2tag(enum CodecID codec_id, uint32_t old_tag, int audio) +{ + AVOutputFormat *avi_format; + // For some formats (like PCM) always trust CODEC_ID_* more than codec_tag + uint32_t tag = av_codec_get_tag(mp_codecid_override_taglists, codec_id); + if (tag) + return tag; + + // mp4a tag is used for all mp4 files no matter what they actually contain + // mp4v is sometimes also used for files containing e.g. mjpeg + if (audio && old_tag != MKTAG('m', 'p', '4', 'a') || + !audio && old_tag != MKTAG('m', 'p', '4', 'v')) + tag = old_tag; + if (tag) + return tag; + + tag = av_codec_get_tag(audio ? mp_wav_taglists : mp_bmp_taglists, codec_id); + if (tag) + return tag; + + avi_format = av_guess_format("avi", NULL, NULL); + if (!avi_format) { + mp_msg(MSGT_DEMUXER, MSGL_FATAL, "MPlayer cannot work properly without AVI muxer in libavformat!\n"); + return 0; + } + return av_codec_get_tag(avi_format->codec_tag, codec_id); +} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/mp_taglists.h mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/mp_taglists.h --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/mp_taglists.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/mp_taglists.h 2011-10-23 12:12:43.000000000 +0000 @@ -19,10 +19,9 @@ #ifndef MPLAYER_MP_TAGLISTS_H #define MPLAYER_MP_TAGLISTS_H -extern const struct AVCodecTag * const mp_wav_taglists[]; +#include -extern const struct AVCodecTag * const mp_codecid_override_taglists[]; - -extern const struct AVCodecTag * const mp_bmp_taglists[]; +enum CodecID mp_tag2codec_id(uint32_t tag, int audio); +uint32_t mp_codec_id2tag(enum CodecID codec_id, uint32_t old_tag, int audio); #endif /* MPLAYER_MP_TAGLISTS_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/muxer_avi.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/muxer_avi.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/muxer_avi.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/muxer_avi.c 2011-10-21 15:44:58.000000000 +0000 @@ -486,7 +486,9 @@ } else { if (stream_tell(muxer->stream) != MOVIALIGN) { mp_msg(MSGT_MUXER, MSGL_ERR, "Opendml superindex is too big for reserved space!\n"); - mp_msg(MSGT_MUXER, MSGL_ERR, "Expected filepos %d, real filepos %ld, missing space %ld\n", MOVIALIGN, stream_tell(muxer->stream), stream_tell(muxer->stream)-MOVIALIGN); + mp_msg(MSGT_MUXER, MSGL_ERR, + "Expected filepos %d, real filepos %"PRIu64", missing space %"PRIu64"\n", + MOVIALIGN, stream_tell(muxer->stream), stream_tell(muxer->stream) - MOVIALIGN); mp_msg(MSGT_MUXER, MSGL_ERR, "Try increasing MOVIALIGN in libmpdemux/muxer_avi.c\n"); } write_avi_list(muxer->stream,listtypeAVIMOVIE,muxer->movi_end-stream_tell(muxer->stream)-12); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/muxer.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/muxer.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/muxer.c 2011-02-11 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/muxer.c 2011-07-24 23:55:34.000000000 +0000 @@ -78,7 +78,7 @@ if (!m->muxbuf) return; - mp_msg(MSGT_MUXER, MSGL_V, MSGTR_MuxbufSending, m->muxbuf_num); + mp_msg(MSGT_MUXER, MSGL_V, "Muxer frame buffer sending %d frame(s) to the muxer.\n", m->muxbuf_num); /* fix parameters for all streams */ for (num = 0; m->streams[num]; ++num) { @@ -121,7 +121,7 @@ } /* buffer frames until we either: - * (a) have at least one frame from each stream + * (a) have at least one non-empty frame from each stream * (b) run out of memory */ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags, double dts, double pts) { if(dts == MP_NOPTS_VALUE) dts= s->timer; @@ -154,7 +154,14 @@ return; } memcpy(buf->buffer, s->buffer, buf->len); - s->muxbuf_seen = 1; + + /* If mencoder inserts "repeat last frame" chunks with len == 0 + * before the encoder is configured and first real frame is output + * or a broken file starts a stream with such frames, then muxer + * won't find needed info for writing initial header. + * Wait until the first real frame is seen. */ + if (len > 0) + s->muxbuf_seen = 1; /* see if we need to keep buffering */ s->muxer->muxbuf_skip_buffer = 1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/muxer_lavf.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/muxer_lavf.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/muxer_lavf.c 2011-04-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/muxer_lavf.c 2011-10-23 12:12:43.000000000 +0000 @@ -29,6 +29,7 @@ #include "aviheader.h" #include "ms_hdr.h" #include "av_opts.h" +#include "av_helpers.h" #include "stream/stream.h" #include "muxer.h" @@ -47,7 +48,7 @@ typedef struct { //AVInputFormat *avif; AVFormatContext *oc; - ByteIOContext *pb; + AVIOContext *pb; int audio_streams; int video_streams; int64_t last_pts; @@ -189,7 +190,7 @@ if(stream->type == MUXER_TYPE_AUDIO) { - ctx->codec_id = av_codec_get_id(mp_wav_taglists, stream->wf->wFormatTag); + ctx->codec_id = mp_tag2codec_id(stream->wf->wFormatTag, 1); #if 0 //breaks aac in mov at least ctx->codec_tag = codec_get_wav_tag(ctx->codec_id); #endif @@ -218,7 +219,7 @@ } else if(stream->type == MUXER_TYPE_VIDEO) { - ctx->codec_id = av_codec_get_id(mp_bmp_taglists, stream->bih->biCompression); + ctx->codec_id = mp_tag2codec_id(stream->bih->biCompression, 0); if(ctx->codec_id <= 0 || force_fourcc) ctx->codec_tag= stream->bih->biCompression; mp_msg(MSGT_MUXER, MSGL_INFO, "VIDEO CODEC ID: %d\n", ctx->codec_id); @@ -283,7 +284,7 @@ muxer_priv_t *priv = (muxer_priv_t *) muxer->priv; mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader); - av_write_header(priv->oc); + avformat_write_header(priv->oc, NULL); muxer->cont_write_header = NULL; } @@ -317,7 +318,7 @@ muxer_priv_t *priv; AVOutputFormat *fmt = NULL; - av_register_all(); + init_avformat(); if (conf_format && strcmp(conf_format, "help") == 0) { list_formats(); @@ -354,25 +355,20 @@ priv->oc->oformat = fmt; - if(av_set_parameters(priv->oc, NULL) < 0) - { - mp_msg(MSGT_MUXER, MSGL_FATAL, "invalid output format parameters\n"); - goto fail; - } priv->oc->packet_size= mux_packet_size; priv->oc->mux_rate= mux_rate; priv->oc->preload= (int)(mux_preload*AV_TIME_BASE); priv->oc->max_delay= (int)(mux_max_delay*AV_TIME_BASE); if (info_name) - av_metadata_set2(&priv->oc->metadata, "title", info_name, 0); + av_dict_set(&priv->oc->metadata, "title", info_name, 0); if (info_artist) - av_metadata_set2(&priv->oc->metadata, "author", info_artist, 0); + av_dict_set(&priv->oc->metadata, "author", info_artist, 0); if (info_genre) - av_metadata_set2(&priv->oc->metadata, "genre", info_genre, 0); + av_dict_set(&priv->oc->metadata, "genre", info_genre, 0); if (info_copyright) - av_metadata_set2(&priv->oc->metadata, "copyright", info_copyright, 0); + av_dict_set(&priv->oc->metadata, "copyright", info_copyright, 0); if (info_comment) - av_metadata_set2(&priv->oc->metadata, "comment", info_comment, 0); + av_dict_set(&priv->oc->metadata, "comment", info_comment, 0); if(mux_avopt){ if(parse_avopts(priv->oc, mux_avopt) < 0){ @@ -381,7 +377,7 @@ } } - priv->oc->pb = av_alloc_put_byte(priv->buffer, BIO_BUFFER_SIZE, 1, muxer, NULL, mp_write, mp_seek); + priv->oc->pb = avio_alloc_context(priv->buffer, BIO_BUFFER_SIZE, 1, muxer, NULL, mp_write, mp_seek); if ((muxer->stream->flags & MP_STREAM_SEEK) != MP_STREAM_SEEK) priv->oc->pb->is_streamed = 1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/muxer_mpeg.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/muxer_mpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/muxer_mpeg.c 2010-12-13 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/muxer_mpeg.c 2011-11-29 13:03:58.000000000 +0000 @@ -89,7 +89,7 @@ }; static char *conf_mux = "mpeg2"; -static uint16_t conf_packet_size = 0; //dvd +static uint32_t conf_packet_size = 0; //dvd static uint32_t conf_muxrate = 0; //kb/s static float conf_vaspect = 0; static float conf_vframerate = 0; @@ -1436,7 +1436,7 @@ muxer->sysrate = (muxer->sysrate * 11) / 10; //raise by 10% d = (double) priv->packet_size / (double)muxer->sysrate; priv->delta_scr = (uint64_t) (d * 27000000.0f); - mp_msg(MSGT_MUXER, MSGL_INFO, "\r\nBUFFER UNDEFLOW at stream %d, raising muxrate to %d kb/s, delta_scr: %"PRIu64"\r\n", i, muxer->sysrate/125, priv->delta_scr); + mp_msg(MSGT_MUXER, MSGL_INFO, "\r\nBUFFER UNDERFLOW at stream %d, raising muxrate to %d kb/s, delta_scr: %"PRIu64"\r\n", i, muxer->sysrate/125, priv->delta_scr); spriv->track_bufsize = 0; } @@ -1653,7 +1653,7 @@ mp_msg(MSGT_MUXER, MSGL_DBG2,"parse_mpeg12_video, len=%u\n", (uint32_t) len); if(s->buffer[0] != 0 || s->buffer[1] != 0 || s->buffer[2] != 1 || len<6) { - mp_msg(MSGT_MUXER, MSGL_ERR,"Unknown video format, possibly non-MPEG1/2 stream, len=%zd!\n", len); + mp_msg(MSGT_MUXER, MSGL_ERR,"Unknown video format, possibly non-MPEG1/2 stream, len=%zu!\n", len); return 0; } @@ -1777,7 +1777,7 @@ ret = add_frame(spriv, spriv->delta_pts, s->buffer, len, pt, spriv->last_dts, spriv->last_pts); if(ret < 0) { - mp_msg(MSGT_MUXER, MSGL_FATAL, "\r\nPARSE_MPEG12: add_frames(%zd) failed, exit\r\n", len); + mp_msg(MSGT_MUXER, MSGL_FATAL, "\r\nPARSE_MPEG12: add_frames(%zu) failed, exit\r\n", len); return 0; } mp_msg(MSGT_MUXER, MSGL_DBG2, "\r\nVIDEO FRAME, PT: %C, tr: %d, diff: %d, dts: %.3f, pts: %.3f, pdt: %u, gop_reset: %d\r\n", @@ -1866,7 +1866,7 @@ mp_msg(MSGT_MUXER, MSGL_DBG2,"parse_mpeg4_video, len=%u\n", (uint32_t) len); if(len<6) { - mp_msg(MSGT_MUXER, MSGL_ERR,"Frame too short: %zd, exit!\n", len); + mp_msg(MSGT_MUXER, MSGL_ERR,"Frame too short: %zu, exit!\n", len); return 0; } @@ -1923,7 +1923,7 @@ ret = add_frame(vpriv, delta_pts, s->buffer, len, pt, vpriv->last_dts, vpriv->last_pts); if(ret < 0) { - mp_msg(MSGT_MUXER, MSGL_FATAL, "\r\nPARSE_MPEG4: add_frames(%zd) failed, exit\r\n", len); + mp_msg(MSGT_MUXER, MSGL_FATAL, "\r\nPARSE_MPEG4: add_frames(%zu) failed, exit\r\n", len); return 0; } @@ -2355,7 +2355,7 @@ tmp = realloc(s->b_buffer, len + s->b_buffer_len); if(!tmp) { - mp_msg(MSGT_MUXER, MSGL_FATAL, "\nFATAL! couldn't realloc %zd bytes\n", len + s->b_buffer_len); + mp_msg(MSGT_MUXER, MSGL_FATAL, "\nFATAL! couldn't realloc %zu bytes\n", len + s->b_buffer_len); return; } s->b_buffer = tmp; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/stheader.h mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/stheader.h --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/stheader.h 2011-03-25 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/stheader.h 2011-12-06 19:59:16.000000000 +0000 @@ -116,6 +116,7 @@ // win32-compatible codec parameters: AVIStreamHeader video; BITMAPINFOHEADER* bih; + int bih_size; void* ImageDesc; // for quicktime codecs } sh_video_t; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/video.c mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/video.c --- mplayer-1.0~rc4.dfsg1+svn33713/libmpdemux/video.c 2011-02-05 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libmpdemux/video.c 2011-07-27 13:40:06.000000000 +0000 @@ -386,7 +386,7 @@ if(mp_vc1_decode_sequence_header(&picture, &videobuffer[4], videobuf_len-4)) { sh_video->bih = calloc(1, sizeof(*sh_video->bih) + videobuf_len); if(sh_video->bih == NULL) { - mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Couldn't alloc %d bytes for VC-1 extradata!\n", sizeof(*sh_video->bih) + videobuf_len); + mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Couldn't alloc %zu bytes for VC-1 extradata!\n", sizeof(*sh_video->bih) + videobuf_len); return 0; } sh_video->bih->biSize= sizeof(*sh_video->bih) + videobuf_len; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/aclib.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/aclib.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/aclib.c 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/aclib.c 2011-11-07 19:54:49.000000000 +0000 @@ -27,7 +27,6 @@ #include #include "cpudetect.h" #include "fastmemcpy.h" -#include "libavutil/x86_cpu.h" #undef memcpy #define BLOCK_SIZE 4096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/aclib_template.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/aclib_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/aclib_template.c 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/aclib_template.c 2011-11-07 19:54:49.000000000 +0000 @@ -80,6 +80,7 @@ // 3dnow memcpy support from kernel 2.4.2 // by Pontscho/fresh!mindworkz +#include "libavutil/x86_cpu.h" #undef HAVE_ONLY_MMX1 #if HAVE_MMX && !HAVE_MMX2 && !HAVE_AMD3DNOW && !HAVE_SSE diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/gl_common.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/gl_common.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/gl_common.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/gl_common.c 2011-12-23 22:34:42.000000000 +0000 @@ -28,7 +28,7 @@ */ /** - * \file gl_common.c + * \file * \brief OpenGL helper functions used by vo_gl.c and vo_gl2.c */ @@ -37,6 +37,8 @@ #include #include #include + +#include "mp_msg.h" #include "gl_common.h" #include "csputils.h" #include "aspect.h" @@ -47,10 +49,7 @@ void (GLAPIENTRY *mpglViewport)(GLint, GLint, GLsizei, GLsizei); void (GLAPIENTRY *mpglMatrixMode)(GLenum); void (GLAPIENTRY *mpglLoadIdentity)(void); -void (GLAPIENTRY *mpglTranslated)(double, double, double); -void (GLAPIENTRY *mpglScaled)(double, double, double); -void (GLAPIENTRY *mpglOrtho)(double, double, double, double, double, double); -void (GLAPIENTRY *mpglFrustum)(double, double, double, double, double, double); +void (GLAPIENTRY *mpglLoadMatrixf)(float *); void (GLAPIENTRY *mpglPushMatrix)(void); void (GLAPIENTRY *mpglPopMatrix)(void); void (GLAPIENTRY *mpglClear)(GLbitfield); @@ -65,7 +64,6 @@ void (GLAPIENTRY *mpglTexEnvf)(GLenum, GLenum, GLfloat); void (GLAPIENTRY *mpglTexEnvi)(GLenum, GLenum, GLint); void (GLAPIENTRY *mpglColor4ub)(GLubyte, GLubyte, GLubyte, GLubyte); -void (GLAPIENTRY *mpglColor3f)(GLfloat, GLfloat, GLfloat); void (GLAPIENTRY *mpglColor4f)(GLfloat, GLfloat, GLfloat, GLfloat); void (GLAPIENTRY *mpglClearColor)(GLclampf, GLclampf, GLclampf, GLclampf); void (GLAPIENTRY *mpglClearDepth)(GLclampd); @@ -141,6 +139,14 @@ void (GLAPIENTRY *mpglFreeMemoryMESA)(void *, int, void *); /** \} */ // end of glextfunctions group + +void (GLAPIENTRY *mpglVertexPointer)(GLint, GLenum, GLsizei, const GLvoid *); +void (GLAPIENTRY *mpglTexCoordPointer)(GLint, GLenum, GLsizei, const GLvoid *); +void (GLAPIENTRY *mpglClientActiveTexture)(GLenum); +void (GLAPIENTRY *mpglEnableClientState)(GLenum); +void (GLAPIENTRY *mpglDisableClientState)(GLenum); +void (GLAPIENTRY *mpglDrawArrays)(GLenum, GLint, GLsizei); + //! \defgroup glgeneral OpenGL general helper functions //! \defgroup glcontext OpenGL context management helper functions @@ -308,8 +314,8 @@ // we do not support palettized formats, although the format the // swscale produces works case IMGFMT_RGB8: - gl_format = GL_RGB; - gl_type = GL_UNSIGNED_BYTE_2_3_3_REV; + *gl_format = GL_RGB; + *gl_type = GL_UNSIGNED_BYTE_2_3_3_REV; break; #endif case IMGFMT_RGB15: @@ -322,12 +328,12 @@ break; #if 0 case IMGFMT_BGR8: - // special case as red and blue have a differen number of bits. + // special case as red and blue have a different number of bits. // GL_BGR and GL_UNSIGNED_BYTE_3_3_2 isn't supported at least // by nVidia drivers, and in addition would give more bits to // blue than to red, which isn't wanted - gl_format = GL_RGB; - gl_type = GL_UNSIGNED_BYTE_3_3_2; + *gl_format = GL_RGB; + *gl_type = GL_UNSIGNED_BYTE_3_3_2; break; #endif case IMGFMT_BGR15: @@ -386,7 +392,11 @@ void *fallback; } extfunc_desc_t; +#if !defined(CONFIG_GL_WIN32) && !defined(CONFIG_GL_X11) +#define DEF_FUNC_DESC(name) {&mpgl##name, NULL, {"gl"#name, NULL}, NULL} +#else #define DEF_FUNC_DESC(name) {&mpgl##name, NULL, {"gl"#name, NULL}, gl ##name} +#endif static const extfunc_desc_t extfuncs[] = { // these aren't extension functions but we query them anyway to allow // different "backends" with one binary @@ -395,10 +405,7 @@ DEF_FUNC_DESC(Viewport), DEF_FUNC_DESC(MatrixMode), DEF_FUNC_DESC(LoadIdentity), - DEF_FUNC_DESC(Translated), - DEF_FUNC_DESC(Scaled), - DEF_FUNC_DESC(Ortho), - DEF_FUNC_DESC(Frustum), + DEF_FUNC_DESC(LoadMatrixf), DEF_FUNC_DESC(PushMatrix), DEF_FUNC_DESC(PopMatrix), DEF_FUNC_DESC(Clear), @@ -413,7 +420,6 @@ DEF_FUNC_DESC(TexEnvf), DEF_FUNC_DESC(TexEnvi), DEF_FUNC_DESC(Color4ub), - DEF_FUNC_DESC(Color3f), DEF_FUNC_DESC(Color4f), DEF_FUNC_DESC(ClearColor), DEF_FUNC_DESC(ClearDepth), @@ -472,6 +478,14 @@ {&mpglTexImage3D, NULL, {"glTexImage3D", NULL}}, {&mpglAllocateMemoryMESA, "GLX_MESA_allocate_memory", {"glXAllocateMemoryMESA", NULL}}, {&mpglFreeMemoryMESA, "GLX_MESA_allocate_memory", {"glXFreeMemoryMESA", NULL}}, + + // Things needed to run on GLES + {&mpglVertexPointer, NULL, {"glVertexPointer", NULL}}, + {&mpglTexCoordPointer, NULL, {"glTexCoordPointer", NULL}}, + {&mpglClientActiveTexture, NULL, {"glClientActiveTexture", NULL}}, + {&mpglEnableClientState, NULL, {"glEnableClientState", NULL}}, + {&mpglDisableClientState, NULL, {"glDisableClientState", NULL}}, + {&mpglDrawArrays, NULL, {"glDrawArrays", NULL}}, {NULL} }; @@ -897,7 +911,37 @@ free(tex); } -static const char *bilin_filt_template = +#define NOISE_RES 2048 + +/** + * \brief creates the 1D lookup texture needed to generate pseudo-random numbers. + * \param unit texture unit to attach texture to + */ +static void gen_noise_lookup_tex(GLenum unit) { + GLfloat *tex = calloc(NOISE_RES, sizeof(*tex)); + uint32_t lcg = 0x79381c11; + int i; + for (i = 0; i < NOISE_RES; i++) + tex[i] = (double)i / (NOISE_RES - 1); + for (i = 0; i < NOISE_RES - 1; i++) { + int remain = NOISE_RES - i; + int idx = i + (lcg >> 16) % remain; + GLfloat tmp = tex[i]; + tex[i] = tex[idx]; + tex[idx] = tmp; + lcg = lcg * 1664525 + 1013904223; + } + mpglActiveTexture(unit); + mpglTexImage1D(GL_TEXTURE_1D, 0, 1, NOISE_RES, 0, GL_RED, GL_FLOAT, tex); + mpglTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_PRIORITY, 1.0); + mpglTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + mpglTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + mpglTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_REPEAT); + mpglActiveTexture(GL_TEXTURE0); + free(tex); +} + +static const char bilin_filt_template[] = "TEX yuv.%c, fragment.texcoord[%c], texture[%c], %s;\n"; #define BICUB_FILT_MAIN(textype) \ @@ -914,7 +958,7 @@ /* x-interpolation */ \ "LRP yuv.%c, parmx.b, a.bbbb, a.aaaa;\n" -static const char *bicub_filt_template_2D = +static const char bicub_filt_template_2D[] = "MAD coord.xy, fragment.texcoord[%c], {%e, %e}, {0.5, 0.5};\n" "TEX parmx, coord.x, texture[%c], 1D;\n" "MUL cdelta.xz, parmx.rrgg, {-%e, 0, %e, 0};\n" @@ -922,7 +966,7 @@ "MUL cdelta.yw, parmy.rrgg, {0, -%e, 0, %e};\n" BICUB_FILT_MAIN("2D"); -static const char *bicub_filt_template_RECT = +static const char bicub_filt_template_RECT[] = "ADD coord, fragment.texcoord[%c], {0.5, 0.5};\n" "TEX parmx, coord.x, texture[%c], 1D;\n" "MUL cdelta.xz, parmx.rrgg, {-1, 0, 1, 0};\n" @@ -940,7 +984,7 @@ "ADD "t".x, "t".xxxx, "s";\n" \ "SUB "t".y, "t".yyyy, "s";\n" -static const char *bicub_notex_filt_template_2D = +static const char bicub_notex_filt_template_2D[] = "MAD coord.xy, fragment.texcoord[%c], {%e, %e}, {0.5, 0.5};\n" "FRC coord.xy, coord.xyxy;\n" CALCWEIGHTS("parmx", "coord.xxxx") @@ -949,7 +993,7 @@ "MUL cdelta.yw, parmy.rrgg, {0, -%e, 0, %e};\n" BICUB_FILT_MAIN("2D"); -static const char *bicub_notex_filt_template_RECT = +static const char bicub_notex_filt_template_RECT[] = "ADD coord, fragment.texcoord[%c], {0.5, 0.5};\n" "FRC coord.xy, coord.xyxy;\n" CALCWEIGHTS("parmx", "coord.xxxx") @@ -966,19 +1010,19 @@ /* x-interpolation */ \ "LRP yuv.%c, parmx.b, a.rrrr, b.rrrr;\n" -static const char *bicub_x_filt_template_2D = +static const char bicub_x_filt_template_2D[] = "MAD coord.x, fragment.texcoord[%c], {%e}, {0.5};\n" "TEX parmx, coord, texture[%c], 1D;\n" "MUL cdelta.xyz, parmx.rrgg, {-%e, 0, %e};\n" BICUB_X_FILT_MAIN("2D"); -static const char *bicub_x_filt_template_RECT = +static const char bicub_x_filt_template_RECT[] = "ADD coord.x, fragment.texcoord[%c], {0.5};\n" "TEX parmx, coord, texture[%c], 1D;\n" "MUL cdelta.xyz, parmx.rrgg, {-1, 0, 1};\n" BICUB_X_FILT_MAIN("RECT"); -static const char *unsharp_filt_template = +static const char unsharp_filt_template[] = "PARAM dcoord%c = {%e, %e, %e, %e};\n" "ADD coord, fragment.texcoord[%c].xyxy, dcoord%c;\n" "SUB coord2, fragment.texcoord[%c].xyxy, dcoord%c;\n" @@ -992,7 +1036,7 @@ "SUB b.r, a.r, b.r;\n" "MAD yuv.%c, b.r, {%e}, a.r;\n"; -static const char *unsharp_filt_template2 = +static const char unsharp_filt_template2[] = "PARAM dcoord%c = {%e, %e, %e, %e};\n" "PARAM dcoord2%c = {%e, 0, 0, %e};\n" "ADD coord, fragment.texcoord[%c].xyxy, dcoord%c;\n" @@ -1016,7 +1060,7 @@ "MAD b.r, a.r, {0.859375}, b.r;\n" "MAD yuv.%c, b.r, {%e}, a.r;\n"; -static const char *yuv_prog_template = +static const char yuv_prog_template[] = "PARAM ycoef = {%e, %e, %e};\n" "PARAM ucoef = {%e, %e, %e};\n" "PARAM vcoef = {%e, %e, %e};\n" @@ -1024,10 +1068,9 @@ "TEMP res;\n" "MAD res.rgb, yuv.rrrr, ycoef, offsets;\n" "MAD res.rgb, yuv.gggg, ucoef, res;\n" - "MAD result.color.rgb, yuv.bbbb, vcoef, res;\n" - "END"; + "MAD res.rgb, yuv.bbbb, vcoef, res;\n"; -static const char *yuv_pow_prog_template = +static const char yuv_pow_prog_template[] = "PARAM ycoef = {%e, %e, %e};\n" "PARAM ucoef = {%e, %e, %e};\n" "PARAM vcoef = {%e, %e, %e};\n" @@ -1037,12 +1080,11 @@ "MAD res.rgb, yuv.rrrr, ycoef, offsets;\n" "MAD res.rgb, yuv.gggg, ucoef, res;\n" "MAD_SAT res.rgb, yuv.bbbb, vcoef, res;\n" - "POW result.color.r, res.r, gamma.r;\n" - "POW result.color.g, res.g, gamma.g;\n" - "POW result.color.b, res.b, gamma.b;\n" - "END"; + "POW res.r, res.r, gamma.r;\n" + "POW res.g, res.g, gamma.g;\n" + "POW res.b, res.b, gamma.b;\n"; -static const char *yuv_lookup_prog_template = +static const char yuv_lookup_prog_template[] = "PARAM ycoef = {%e, %e, %e, 0};\n" "PARAM ucoef = {%e, %e, %e, 0};\n" "PARAM vcoef = {%e, %e, %e, 0};\n" @@ -1051,16 +1093,23 @@ "MAD res, yuv.rrrr, ycoef, offsets;\n" "MAD res.rgb, yuv.gggg, ucoef, res;\n" "MAD res.rgb, yuv.bbbb, vcoef, res;\n" - "TEX result.color.r, res.raaa, texture[%c], 2D;\n" + "TEX res.r, res.raaa, texture[%c], 2D;\n" "ADD res.a, res.a, 0.25;\n" - "TEX result.color.g, res.gaaa, texture[%c], 2D;\n" + "TEX res.g, res.gaaa, texture[%c], 2D;\n" "ADD res.a, res.a, 0.25;\n" - "TEX result.color.b, res.baaa, texture[%c], 2D;\n" - "END"; + "TEX res.b, res.baaa, texture[%c], 2D;\n"; + +static const char yuv_lookup3d_prog_template[] = + "TEMP res;\n" + "TEX res, yuv, texture[%c], 3D;\n"; -static const char *yuv_lookup3d_prog_template = - "TEX result.color, yuv, texture[%c], 3D;\n" - "END"; +static const char noise_filt_template[] = + "MUL coord.xy, fragment.texcoord[0], {%e, %e};\n" + "TEMP rand;\n" + "TEX rand.r, coord.x, texture[%c], 1D;\n" + "ADD rand.r, rand.r, coord.y;\n" + "TEX rand.r, rand.r, texture[%c], 1D;\n" + "MAD res.rgb, rand.rrrr, {%e, %e, %e}, res;\n"; /** * \brief creates and initializes helper textures needed for scaling texture read @@ -1306,16 +1355,24 @@ char lum_scale_texs[1]; char chrom_scale_texs[1]; char conv_texs[1]; + char filt_texs[1] = {0}; GLint i; // this is the conversion matrix, with y, u, v factors // for red, green, blue and the constant offsets float yuv2rgb[3][4]; + int noise = params->noise_strength != 0; create_conv_textures(params, &cur_texu, conv_texs); create_scaler_textures(YUV_LUM_SCALER(type), &cur_texu, lum_scale_texs); if (YUV_CHROM_SCALER(type) == YUV_LUM_SCALER(type)) memcpy(chrom_scale_texs, lum_scale_texs, sizeof(chrom_scale_texs)); else create_scaler_textures(YUV_CHROM_SCALER(type), &cur_texu, chrom_scale_texs); + + if (noise) { + gen_noise_lookup_tex(cur_texu); + filt_texs[0] = '0' + cur_texu++; + } + mpglGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &i); if (i < cur_texu) mp_msg(MSGT_VO, MSGL_ERR, @@ -1367,6 +1424,27 @@ mp_msg(MSGT_VO, MSGL_ERR, "[gl] unknown conversion type %i\n", YUV_CONVERSION(type)); break; } + prog_remain -= strlen(prog_pos); + prog_pos += strlen(prog_pos); + + if (noise) { + // 1.0 strength is suitable for dithering 8 to 6 bit + double str = params->noise_strength * (1.0 / 64); + double scale_x = (double)NOISE_RES / texw; + double scale_y = (double)NOISE_RES / texh; + if (rect) { + scale_x /= texw; + scale_y /= texh; + } + snprintf(prog_pos, prog_remain, noise_filt_template, + scale_x, scale_y, + filt_texs[0], filt_texs[0], + str, str, str); + prog_remain -= strlen(prog_pos); + prog_pos += strlen(prog_pos); + } + snprintf(prog_pos, prog_remain, "MOV result.color.rgb, res;\nEND"); + mp_msg(MSGT_VO, MSGL_DBG2, "[gl] generated fragment program:\n%s\n", yuv_prog); loadGPUProgram(GL_FRAGMENT_PROGRAM, yuv_prog); free(yuv_prog); @@ -1512,6 +1590,8 @@ void glEnable3DLeft(int type) { GLint buffer; + if (type & GL_3D_SWAP) + return glEnable3DRight(type & ~GL_3D_SWAP); switch (type) { case GL_3D_RED_CYAN: mpglColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE); @@ -1540,6 +1620,8 @@ void glEnable3DRight(int type) { GLint buffer; + if (type & GL_3D_SWAP) + return glEnable3DLeft(type & ~GL_3D_SWAP); switch (type) { case GL_3D_RED_CYAN: mpglColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_FALSE); @@ -1627,6 +1709,36 @@ y += h; h = -h; } + + if (!mpglBegin) { + GLfloat vertices [8] = { x, y, x, y + h, x + w, y, x + w, y + h}; + GLfloat texcoords [8] = {tx, ty, tx, ty + th, tx + tw, ty, tx + tw, ty + th}; + GLfloat texcoords2[8] = {tx2, ty2, tx2, ty2 + th2, tx2 + tw2, ty2, tx2 + tw2, ty2 + th2}; + mpglEnableClientState(GL_VERTEX_ARRAY); + mpglVertexPointer(2, GL_FLOAT, 0, vertices); + mpglEnableClientState(GL_TEXTURE_COORD_ARRAY); + mpglTexCoordPointer(2, GL_FLOAT, 0, texcoords); + if (is_yv12) { + mpglClientActiveTexture(GL_TEXTURE1); + mpglEnableClientState(GL_TEXTURE_COORD_ARRAY); + mpglTexCoordPointer(2, GL_FLOAT, 0, texcoords2); + mpglClientActiveTexture(GL_TEXTURE2); + mpglEnableClientState(GL_TEXTURE_COORD_ARRAY); + mpglTexCoordPointer(2, GL_FLOAT, 0, texcoords2); + mpglClientActiveTexture(GL_TEXTURE0); + } + mpglDrawArrays(GL_TRIANGLE_STRIP, 0, 4); + if (is_yv12) { + mpglClientActiveTexture(GL_TEXTURE1); + mpglDisableClientState(GL_TEXTURE_COORD_ARRAY); + mpglClientActiveTexture(GL_TEXTURE2); + mpglDisableClientState(GL_TEXTURE_COORD_ARRAY); + mpglClientActiveTexture(GL_TEXTURE0); + } + mpglDisableClientState(GL_VERTEX_ARRAY); + return; + } + mpglBegin(GL_QUADS); mpglTexCoord2f(tx, ty); if (is_yv12) { @@ -1899,7 +2011,9 @@ static void swapGlBuffers_x11(MPGLContext *ctx) { glXSwapBuffers(mDisplay, vo_window); } +#endif +#if defined(CONFIG_GL_X11) || defined(CONFIG_GL_EGL_X11) static int x11_check_events(void) { return vo_x11_check_events(mDisplay); } @@ -1939,6 +2053,99 @@ #endif +#ifdef CONFIG_GL_EGL_X11 +static EGLDisplay eglDisplay = EGL_NO_DISPLAY; +static EGLSurface eglSurface = EGL_NO_SURFACE; + +/* + * Some genius thought it a good idea to make + * eglGetProcAddress not work for core functions. + * So we have to use a non-portable way that in addition + * might also return symbols from a different library + * that the one providing the current context, great job! + */ +static void *eglgpa(const GLubyte *name) { + void *res = eglGetProcAddress(name); + if (!res) { + void *h = dlopen("/usr/lib/libGLESv1_CM.so", RTLD_LAZY); + res = dlsym(h, name); + dlclose(h); + } + return res; +} + +static int setGlWindow_egl(MPGLContext *ctx) +{ + static const EGLint cfg_attribs[] = { EGL_NONE }; + static const EGLint ctx_attribs[] = { EGL_NONE }; + EGLContext *context = &ctx->context.egl; + Window win = vo_window; + EGLContext new_context = NULL; + EGLConfig eglConfig; + int num_configs; + if (eglDisplay == EGL_NO_DISPLAY) { + eglDisplay = eglGetDisplay(mDisplay); + if (eglDisplay == EGL_NO_DISPLAY) { + mp_msg(MSGT_VO, MSGL_FATAL, "eglGetDisplay failed: 0x%x\n", eglGetError()); + return SET_WINDOW_FAILED; + } + if (!eglInitialize(eglDisplay, NULL, NULL)) { + mp_msg(MSGT_VO, MSGL_FATAL, "eglInitialize failed: 0x%x\n", eglGetError()); + return SET_WINDOW_FAILED; + } + } + if (*context != EGL_NO_CONTEXT) { + eglMakeCurrent(eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglDestroyContext(eglDisplay, *context); + eglDestroySurface(eglDisplay, eglSurface); + } + if (!eglChooseConfig(eglDisplay, cfg_attribs, &eglConfig, 1, &num_configs) || + num_configs != 1) + return SET_WINDOW_FAILED; + eglSurface = eglCreateWindowSurface(eglDisplay, eglConfig, win, NULL); + if (eglSurface == EGL_NO_SURFACE) + return SET_WINDOW_FAILED; + + new_context = eglCreateContext(eglDisplay, eglConfig, EGL_NO_CONTEXT, ctx_attribs); + if (new_context == EGL_NO_CONTEXT) + return SET_WINDOW_FAILED; + if (!eglMakeCurrent(eglDisplay, eglSurface, eglSurface, new_context)) + return SET_WINDOW_FAILED; + + // set new values + vo_window = win; + vo_x11_update_geometry(); + *context = new_context; + + getFunctions(eglgpa, eglQueryString(eglDisplay, EGL_EXTENSIONS)); + mpglBegin = NULL; + mpglDrawBuffer = NULL; + + // and inform that reinit is necessary + return SET_WINDOW_REINIT; +} + +/** + * \brief free the VisualInfo and GLXContext of an OpenGL context. + * \ingroup glcontext + */ +static void releaseGlContext_egl(MPGLContext *ctx) { + EGLContext *context = &ctx->context.egl; + if (*context != EGL_NO_CONTEXT) + { + mpglFinish(); + eglMakeCurrent(eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglDestroyContext(eglDisplay, *context); + } + *context = EGL_NO_CONTEXT; +} + +static void swapGlBuffers_egl(MPGLContext *ctx) { + eglSwapBuffers(eglDisplay, eglSurface); +} + +#endif + static int setGlWindow_dummy(MPGLContext *ctx) { getFunctions(NULL, NULL); return SET_WINDOW_OK; @@ -1968,6 +2175,8 @@ res = init_mpglcontext(ctx, GLTYPE_X11); if (res) return res; res = init_mpglcontext(ctx, GLTYPE_SDL); + if (res) return res; + res = init_mpglcontext(ctx, GLTYPE_EGL_X11); return res; } memset(ctx, 0, sizeof(*ctx)); @@ -2010,6 +2219,18 @@ ctx->fullscreen = vo_sdl_fullscreen; return vo_sdl_init(); #endif +#ifdef CONFIG_GL_EGL_X11 + case GLTYPE_EGL_X11: + ctx->setGlWindow = setGlWindow_egl; + ctx->releaseGlContext = releaseGlContext_egl; + ctx->swapGlBuffers = swapGlBuffers_egl; + ctx->update_xinerama_info = update_xinerama_info; + ctx->border = vo_x11_border; + ctx->check_events = x11_check_events; + ctx->fullscreen = vo_x11_fullscreen; + ctx->ontop = vo_x11_ontop; + return vo_init(); +#endif default: return 0; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/gl_common.h mplayer-1.0~rc4.dfsg1+svn34540/libvo/gl_common.h --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/gl_common.h 2011-05-25 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/gl_common.h 2011-12-23 22:34:42.000000000 +0000 @@ -28,8 +28,6 @@ #include #include "config.h" -#include "mp_msg.h" - #include "video_out.h" #include "csputils.h" @@ -42,6 +40,10 @@ #include #include "x11_common.h" #endif +#ifdef CONFIG_GL_EGL_X11 +#include +#include "x11_common.h" +#endif #include // workaround for some gl.h headers @@ -376,6 +378,7 @@ int chrom_texw; int chrom_texh; float filter_strength; + float noise_strength; } gl_conversion_params_t; int glAutodetectYUVConversion(void); @@ -383,6 +386,7 @@ void glEnableYUVConversion(GLenum target, int type); void glDisableYUVConversion(GLenum target, int type); +#define GL_3D_SWAP 32 #define GL_3D_RED_CYAN 1 #define GL_3D_GREEN_MAGENTA 2 #define GL_3D_QUADBUFFER 3 @@ -402,10 +406,12 @@ /** \} */ enum MPGLType { - GLTYPE_AUTO, + GLTYPE_AUTO = -1, GLTYPE_W32, GLTYPE_X11, GLTYPE_SDL, + GLTYPE_EGL_X11, + GLTYPE_COUNT }; typedef struct MPGLContext { @@ -423,6 +429,9 @@ #ifdef CONFIG_GL_X11 GLXContext x11; #endif +#ifdef CONFIG_GL_EGL_X11 + EGLContext egl; +#endif } context; int (*setGlWindow)(struct MPGLContext *); void (*releaseGlContext)(struct MPGLContext *); @@ -442,10 +451,7 @@ extern void (GLAPIENTRY *mpglViewport)(GLint, GLint, GLsizei, GLsizei); extern void (GLAPIENTRY *mpglMatrixMode)(GLenum); extern void (GLAPIENTRY *mpglLoadIdentity)(void); -extern void (GLAPIENTRY *mpglTranslated)(double, double, double); -extern void (GLAPIENTRY *mpglScaled)(double, double, double); -extern void (GLAPIENTRY *mpglOrtho)(double, double, double, double, double, double); -extern void (GLAPIENTRY *mpglFrustum)(double, double, double, double, double, double); +extern void (GLAPIENTRY *mpglLoadMatrixf)(float *); extern void (GLAPIENTRY *mpglPushMatrix)(void); extern void (GLAPIENTRY *mpglPopMatrix)(void); extern void (GLAPIENTRY *mpglClear)(GLbitfield); @@ -460,7 +466,6 @@ extern void (GLAPIENTRY *mpglTexEnvf)(GLenum, GLenum, GLfloat); extern void (GLAPIENTRY *mpglTexEnvi)(GLenum, GLenum, GLint); extern void (GLAPIENTRY *mpglColor4ub)(GLubyte, GLubyte, GLubyte, GLubyte); -extern void (GLAPIENTRY *mpglColor3f)(GLfloat, GLfloat, GLfloat); extern void (GLAPIENTRY *mpglColor4f)(GLfloat, GLfloat, GLfloat, GLfloat); extern void (GLAPIENTRY *mpglClearColor)(GLclampf, GLclampf, GLclampf, GLclampf); extern void (GLAPIENTRY *mpglClearDepth)(GLclampd); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/jpeg_enc.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/jpeg_enc.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/jpeg_enc.c 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/jpeg_enc.c 2011-08-11 17:45:41.000000000 +0000 @@ -41,7 +41,7 @@ #include "libavcodec/mpegvideo.h" #include "libavcodec/mjpegenc.h" -#include "libmpcodecs/vd_ffmpeg.h" +#include "av_helpers.h" #include "jpeg_enc.h" @@ -68,7 +68,7 @@ for(qscale=qmin; qscale<=qmax; qscale++){ int i; - if (s->dsp.fdct == ff_jpeg_fdct_islow) { + if (s->dsp.fdct == ff_jpeg_fdct_islow_8) { for (i = 0; i < 64; i++) { const int j = s->dsp.idct_permutation[i]; /* 16 <= qscale * quant_matrix[i] <= 7905 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/matrixview.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/matrixview.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/matrixview.c 2010-10-26 08:15:55.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/matrixview.c 2011-12-10 20:21:50.000000000 +0000 @@ -50,8 +50,8 @@ #define MAX_TEXT_Y 0x4000 static int text_x = 0; static int text_y = 0; -#define _text_x text_x/2 -#define _text_y text_y/2 +#define _text_x (text_x/2) +#define _text_y (text_y/2) // Scene position #define Z_Off -128.0f @@ -297,36 +297,42 @@ // Allow adjusting of texture color via glColor mpglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + mpglEnable(GL_BLEND); + mpglEnable(GL_TEXTURE_2D); + + mpglDisable(GL_LIGHTING); + mpglBlendFunc(GL_SRC_ALPHA, GL_ONE); + mpglDisable(GL_DEPTH_TEST); + matrixview_reshape(w, h); } void matrixview_reshape(int w, int h) { + double nearplane = -Z_Off - Z_Depth; + // perspective projection, also adjusting vertex position + // by Z_Off and with simplified Z equation since the absolute + // Z value does not matter, only relative to other pixels + float matrix[16] = { + nearplane / _text_x, 0, 0, 0, + 0, nearplane / _text_y, 0, 0, + 0, 0, 1, -1, + 0, 0, 0, -Z_Off + }; mpglViewport(0, 0, w, h); mpglMatrixMode(GL_PROJECTION); - mpglLoadIdentity(); - mpglFrustum(-_text_x, _text_x, -_text_y, _text_y, -Z_Off - Z_Depth, -Z_Off); + mpglLoadMatrixf(matrix); mpglMatrixMode(GL_MODELVIEW); + mpglLoadIdentity(); } void matrixview_draw(int w, int h, double currentTime, float frameTime, uint8_t *data) { - mpglEnable(GL_BLEND); - mpglEnable(GL_TEXTURE_2D); - - mpglDisable(GL_LIGHTING); - mpglBlendFunc(GL_SRC_ALPHA, GL_ONE); - mpglDisable(GL_DEPTH_TEST); - - mpglMatrixMode(GL_MODELVIEW); - mpglLoadIdentity(); - mpglTranslated(0.0f, 0.0f, Z_Off); - // Clear the color and depth buffers. mpglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -342,9 +348,6 @@ mpglBindTexture(GL_TEXTURE_2D, 0); make_change(currentTime); - - mpglLoadIdentity(); - mpglMatrixMode(GL_PROJECTION); } void matrixview_contrast_set(float contrast) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/mga_template.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/mga_template.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/mga_template.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/mga_template.c 2011-07-02 23:26:05.000000000 +0000 @@ -440,7 +440,7 @@ mp_msg(MSGT_VO,MSGL_V,"[MGA] Using %d buffers.\n",mga_vid_config.num_frames); - frames[0] = (char*)mmap(0,mga_vid_config.frame_size*mga_vid_config.num_frames,PROT_WRITE,MAP_SHARED,f,0); + frames[0] = mmap(0,mga_vid_config.frame_size*mga_vid_config.num_frames,PROT_WRITE,MAP_SHARED,f,0); frames[1] = frames[0] + 1*mga_vid_config.frame_size; frames[2] = frames[0] + 2*mga_vid_config.frame_size; frames[3] = frames[0] + 3*mga_vid_config.frame_size; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/video_out.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/video_out.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/video_out.c 2011-05-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/video_out.c 2011-07-05 12:05:06.000000000 +0000 @@ -372,7 +372,7 @@ #ifdef CONFIG_GUI if (use_gui) { // GUI creates and manages window for us - guiGetEvent(guiSetShVideo, 0); + gui(GUI_SETUP_VIDEO_WINDOW, 0); } #endif } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_bl.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_bl.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_bl.c 2011-05-25 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_bl.c 2011-07-27 13:40:09.000000000 +0000 @@ -27,6 +27,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "config.h" + #include #include #include @@ -41,8 +43,6 @@ #endif #include -#include "config.h" - #include #include #include diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_caca.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_caca.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_caca.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_caca.c 2011-11-24 18:32:08.000000000 +0000 @@ -31,6 +31,7 @@ #include #include #include +#include #include "config.h" #include "video_out.h" @@ -38,30 +39,28 @@ #include "sub/sub.h" #include "osdep/keycodes.h" +#include "input/input.h" +#include "input/mouse.h" #include "mp_msg.h" #include "mp_fifo.h" -#include -#ifdef CACA_API_VERSION_1 - /* Include the pre-1.x compatibility header. - * Once libcaca 1.x is widespread, vo_caca should be fully - * converted to the new API. A patch exists: - * http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2006-July/044669.html - */ - #include -#endif - static const vo_info_t info = { - "libcaca", - "caca", - "Pigeon ", - "" + "libcaca", + "caca", + "Pigeon ", + "" }; -const LIBVO_EXTERN (caca) +const LIBVO_EXTERN(caca) /* caca stuff */ -static struct caca_bitmap *cbitmap = NULL; +static caca_canvas_t *canvas; +static caca_display_t *display; +static caca_dither_t *dither = NULL; +static const char *dither_antialias = "default"; +static const char *dither_charset = "default"; +static const char *dither_color = "default"; +static const char *dither_algo = "none"; /* image infos */ static int image_format; @@ -71,17 +70,17 @@ static int screen_w, screen_h; /* We want 24bpp always for now */ -static unsigned int bpp = 24; +static unsigned int bpp = 24; static unsigned int depth = 3; static unsigned int rmask = 0xff0000; static unsigned int gmask = 0x00ff00; static unsigned int bmask = 0x0000ff; static unsigned int amask = 0; -#define MESSAGE_SIZE 512 -#define MESSAGE_DURATION 5 +#define MESSAGE_SIZE 512 +#define MESSAGE_DURATION 5 -static time_t stoposd = 0; +static time_t stoposd = 0; static int showosdmessage = 0; static char osdmessagetext[MESSAGE_SIZE]; static char posbar[MESSAGE_SIZE]; @@ -91,10 +90,7 @@ static void osdmessage(int duration, const char *fmt, ...) { - /* - * for outputting a centered string at the bottom - * of our window for a while - */ + /* for outputting a centered string at the window bottom for a while */ va_list ar; char m[MESSAGE_SIZE]; @@ -104,76 +100,81 @@ strcpy(osdmessagetext, m); showosdmessage = 1; - stoposd = time(NULL) + duration; - osdx = (screen_w - strlen (osdmessagetext)) / 2; - posbar[0] = '\0'; + stoposd = time(NULL) + duration; + osdx = (screen_w - strlen(osdmessagetext)) / 2; + posbar[0] = '\0'; } -static void osdpercent(int duration, int min, int max, int val, const char *desc, const char *unit) +static void osdpercent(int duration, int min, int max, int val, + const char *desc, const char *unit) { - /* - * prints a bar for setting values - */ + /* prints a bar for setting values */ float step; int where, i; - step = (float)screen_w / (float)(max - min); + step = (float)screen_w / (float)(max - min); where = (val - min) * step; - osdmessage (duration, "%s: %i%s", desc, val, unit); - posbar[0] = '|'; + osdmessage(duration, "%s: %i%s", desc, val, unit); + posbar[0] = '|'; posbar[screen_w - 1] = '|'; - for (i = 0; i < screen_w; i++) - { - if (i == where) - posbar[i] = '#'; - else - posbar[i] = '-'; + for (i = 0; i < screen_w; i++) { + if (i == where) + posbar[i] = '#'; + else + posbar[i] = '-'; } if (where != 0) - posbar[0] = '|'; + posbar[0] = '|'; if (where != (screen_w - 1)) - posbar[screen_w - 1] = '|'; + posbar[screen_w - 1] = '|'; posbar[screen_w] = '\0'; } static int resize(void) { - screen_w = caca_get_width(); - screen_h = caca_get_height(); + screen_w = caca_get_canvas_width(canvas); + screen_h = caca_get_canvas_height(canvas); - if (cbitmap) - caca_free_bitmap(cbitmap); + caca_free_dither(dither); - cbitmap = caca_create_bitmap(bpp, image_width, image_height, - depth * image_width, rmask, gmask, bmask, - amask); + dither = caca_create_dither(bpp, image_width, image_height, + depth * image_width, + rmask, gmask, bmask, amask); + if (dither == NULL) { + mp_msg(MSGT_VO, MSGL_FATAL, "vo_caca: caca_create_dither failed!\n"); + return ENOSYS; + } - if (!cbitmap) - mp_msg(MSGT_VO, MSGL_FATAL, "vo_caca: caca_create_bitmap failed!\n"); + /* Default libcaca features */ + caca_set_dither_antialias(dither, dither_antialias); + caca_set_dither_charset(dither, dither_charset); + caca_set_dither_color(dither, dither_color); + caca_set_dither_algorithm(dither, dither_algo); return 0; } static int config(uint32_t width, uint32_t height, uint32_t d_width, - uint32_t d_height, uint32_t flags, char *title, uint32_t format) + uint32_t d_height, uint32_t flags, char *title, + uint32_t format) { image_height = height; - image_width = width; + image_width = width; image_format = format; showosdmessage = 0; - posbar[0] = '\0'; + posbar[0] = '\0'; - return resize (); + return resize(); } static int draw_frame(uint8_t *src[]) { - caca_draw_bitmap(0, 0, screen_w, screen_h, cbitmap, src[0]); + caca_dither_bitmap(canvas, 0, 0, screen_w, screen_h, dither, src[0]); return 0; } @@ -184,145 +185,173 @@ static void flip_page(void) { + if (showosdmessage) { + if (time(NULL) >= stoposd) { + showosdmessage = 0; + if (*posbar) + posbar[0] = '\0'; + } else { + caca_put_str(canvas, osdx, osdy, osdmessagetext); + if (*posbar) + caca_put_str(canvas, 0, posbary, posbar); + } + } + + caca_refresh_display(display); +} - if (showosdmessage) - { - if (time(NULL) >= stoposd) - { - showosdmessage = 0; - if (*posbar) - posbar[0] = '\0'; - } else { - caca_putstr(osdx, osdy, osdmessagetext); - - if (*posbar) - caca_putstr(0, posbary, posbar); - } +static void set_next_str(const char * const *list, const char **str, + const char **msg) +{ + int ind; + for (ind = 0; list[ind]; ind += 2) { + if (strcmp(list[ind], *str) == 0) { + if (list[ind + 2] == NULL) + ind = -2; + *str = list[ind + 2]; + *msg = list[ind + 3]; + return; + } } - caca_refresh(); + *str = list[0]; + *msg = list[1]; } -static void check_events (void) +static const struct mp_keymap keysym_map[] = { + {CACA_KEY_RETURN, KEY_ENTER}, {CACA_KEY_ESCAPE, KEY_ESC}, + {CACA_KEY_UP, KEY_DOWN}, {CACA_KEY_DOWN, KEY_DOWN}, + {CACA_KEY_LEFT, KEY_LEFT}, {CACA_KEY_RIGHT, KEY_RIGHT}, + {CACA_KEY_PAGEUP, KEY_PAGE_UP}, {CACA_KEY_PAGEDOWN, KEY_PAGE_DOWN}, + {CACA_KEY_HOME, KEY_HOME}, {CACA_KEY_END, KEY_END}, + {CACA_KEY_INSERT, KEY_INSERT}, {CACA_KEY_DELETE, KEY_DELETE}, + {CACA_KEY_BACKSPACE, KEY_BACKSPACE}, {CACA_KEY_TAB, KEY_TAB}, + {CACA_KEY_PAUSE, KEY_PAUSE}, + {CACA_KEY_F1, KEY_F+1}, {CACA_KEY_F2, KEY_F+2}, + {CACA_KEY_F3, KEY_F+3}, {CACA_KEY_F4, KEY_F+4}, + {CACA_KEY_F5, KEY_F+5}, {CACA_KEY_F6, KEY_F+6}, + {CACA_KEY_F7, KEY_F+7}, {CACA_KEY_F8, KEY_F+8}, + {CACA_KEY_F9, KEY_F+9}, {CACA_KEY_F10, KEY_F+10}, + {CACA_KEY_F11, KEY_F+11}, {CACA_KEY_F12, KEY_F+12}, + {CACA_KEY_F13, KEY_F+13}, {CACA_KEY_F14, KEY_F+14}, + {CACA_KEY_F15, KEY_F+15}, + {0, 0} +}; + +static void check_events(void) { - unsigned int cev; + caca_event_t cev; + while (caca_get_event(display, CACA_EVENT_ANY, &cev, 0)) { - if ((cev = caca_get_event(CACA_EVENT_ANY))) - { - if (cev & CACA_EVENT_RESIZE) - { - caca_refresh(); - resize(); - } else if (cev & CACA_EVENT_KEY_RELEASE) - { - int key = (cev & 0x00ffffff); - enum caca_feature cf; - - switch (key) { - case 'd': - case 'D': - /* Toggle dithering method */ - cf = 1 + caca_get_feature(CACA_DITHERING); - if (cf > CACA_DITHERING_MAX) - cf = CACA_DITHERING_MIN; - caca_set_feature(cf); - osdmessage(MESSAGE_DURATION, "Using %s", caca_get_feature_name(cf)); - break; - - case 'a': - case 'A': - /* Toggle antialiasing method */ - cf = 1 + caca_get_feature(CACA_ANTIALIASING); - if (cf > CACA_ANTIALIASING_MAX) - cf = CACA_ANTIALIASING_MIN; - caca_set_feature(cf); - osdmessage(MESSAGE_DURATION, "Using %s", caca_get_feature_name(cf)); - break; - - case 'b': - case 'B': - /* Toggle background method */ - cf = 1 + caca_get_feature(CACA_BACKGROUND); - if (cf > CACA_BACKGROUND_MAX) - cf = CACA_BACKGROUND_MIN; - caca_set_feature(cf); - osdmessage(MESSAGE_DURATION, "Using %s", caca_get_feature_name(cf)); - break; - - case CACA_KEY_UP: - mplayer_put_key(KEY_UP); - break; - case CACA_KEY_DOWN: - mplayer_put_key(KEY_DOWN); - break; - case CACA_KEY_LEFT: - mplayer_put_key(KEY_LEFT); - break; - case CACA_KEY_RIGHT: - mplayer_put_key(KEY_RIGHT); - break; - case CACA_KEY_ESCAPE: - mplayer_put_key(KEY_ESC); - break; - case CACA_KEY_PAGEUP: - mplayer_put_key(KEY_PAGE_UP); - break; - case CACA_KEY_PAGEDOWN: - mplayer_put_key(KEY_PAGE_DOWN); - break; - case CACA_KEY_RETURN: - mplayer_put_key(KEY_ENTER); - break; - case CACA_KEY_HOME: - mplayer_put_key(KEY_HOME); - break; - case CACA_KEY_END: - mplayer_put_key(KEY_END); - break; - default: - if (key <= 255) - mplayer_put_key (key); - break; - } - } + switch (cev.type) { + case CACA_EVENT_RESIZE: + caca_refresh_display(display); + resize(); + break; + case CACA_EVENT_QUIT: + mplayer_put_key(KEY_CLOSE_WIN); + break; + case CACA_EVENT_MOUSE_MOTION: + vo_mouse_movement(cev.data.mouse.x, cev.data.mouse.y); + break; + case CACA_EVENT_MOUSE_PRESS: + if (!vo_nomouse_input) + mplayer_put_key((MOUSE_BTN0 + cev.data.mouse.button - 1) | MP_KEY_DOWN); + break; + case CACA_EVENT_MOUSE_RELEASE: + if (!vo_nomouse_input) + mplayer_put_key(MOUSE_BTN0 + cev.data.mouse.button - 1); + break; + case CACA_EVENT_KEY_PRESS: + { + int key = cev.data.key.ch; + int mpkey = lookup_keymap_table(keysym_map, key); + const char *msg_name; + + if (mpkey) + mplayer_put_key(mpkey); + else + switch (key) { + case 'd': + case 'D': + /* Toggle dithering algorithm */ + set_next_str(caca_get_dither_algorithm_list(dither), &dither_algo, &msg_name); + caca_set_dither_algorithm(dither, dither_algo); + osdmessage(MESSAGE_DURATION, "Using %s", msg_name); + break; + + case 'a': + case 'A': + /* Toggle antialiasing method */ + set_next_str(caca_get_dither_antialias_list(dither), &dither_antialias, &msg_name); + caca_set_dither_antialias(dither, dither_antialias); + osdmessage(MESSAGE_DURATION, "Using %s", msg_name); + break; + + case 'h': + case 'H': + /* Toggle charset method */ + set_next_str(caca_get_dither_charset_list(dither), &dither_charset, &msg_name); + caca_set_dither_charset(dither, dither_charset); + osdmessage(MESSAGE_DURATION, "Using %s", msg_name); + break; + + case 'c': + case 'C': + /* Toggle color method */ + set_next_str(caca_get_dither_color_list(dither), &dither_color, &msg_name); + caca_set_dither_color(dither, dither_color); + osdmessage(MESSAGE_DURATION, "Using %s", msg_name); + break; + + default: + if (key <= 255) + mplayer_put_key(key); + break; + } + } + } } } static void uninit(void) { - caca_free_bitmap(cbitmap); - cbitmap = NULL; - caca_end(); + caca_free_dither(dither); + dither = NULL; + caca_free_display(display); + caca_free_canvas(canvas); } static void draw_osd(void) { if (vo_osd_progbar_type != -1) - osdpercent(MESSAGE_DURATION, 0, 255, - vo_osd_progbar_value, sub_osd_names[vo_osd_progbar_type], - ""); + osdpercent(MESSAGE_DURATION, 0, 255, vo_osd_progbar_value, + sub_osd_names[vo_osd_progbar_type], ""); } static int preinit(const char *arg) { - if (arg) - { - mp_msg(MSGT_VO, MSGL_ERR, "vo_caca: Unknown subdevice: %s\n", arg); - return ENOSYS; + if (arg) { + mp_msg(MSGT_VO, MSGL_ERR, "vo_caca: Unknown subdevice: %s\n", arg); + return ENOSYS; } - if (caca_init()) - { - mp_msg(MSGT_VO, MSGL_ERR, "vo_caca: failed to initialize\n"); - return ENOSYS; + canvas = caca_create_canvas(0, 0); + if (canvas == NULL) { + mp_msg(MSGT_VO, MSGL_ERR, "vo_caca: failed to create canvas\n"); + return ENOSYS; } - caca_set_window_title("MPlayer"); + display = caca_create_display(canvas); - /* Default libcaca features */ - caca_set_feature(CACA_ANTIALIASING_PREFILTER); - caca_set_feature(CACA_DITHERING_RANDOM); + if (display == NULL) { + mp_msg(MSGT_VO, MSGL_ERR, "vo_caca: failed to create display\n"); + caca_free_canvas(canvas); + return ENOSYS; + } + + caca_set_display_title(display, "MPlayer"); return 0; } @@ -330,18 +359,17 @@ static int query_format(uint32_t format) { if (format == IMGFMT_BGR24) - return VFCAP_OSD | VFCAP_CSP_SUPPORTED; + return VFCAP_OSD | VFCAP_CSP_SUPPORTED; return 0; } static int control(uint32_t request, void *data) { - switch(request) - { + switch (request) { case VOCTRL_QUERY_FORMAT: - return query_format(*((uint32_t *)data)); + return query_format(*((uint32_t *)data)); default: - return VO_NOTIMPL; + return VO_NOTIMPL; } } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_corevideo.m mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_corevideo.m --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_corevideo.m 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_corevideo.m 2011-12-03 22:36:50.000000000 +0000 @@ -203,6 +203,7 @@ //config OpenGL View [mpGLView config]; [mpGLView reshape]; + [[mpGLView window] setTitle:[NSString stringWithCString:vo_wintitle ? vo_wintitle : title]]; } else { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_direct3d.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_direct3d.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_direct3d.c 2011-05-25 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_direct3d.c 2011-11-19 14:04:11.000000000 +0000 @@ -237,6 +237,12 @@ return 0; } + if (!tex_width || !tex_height) { + mp_msg(MSGT_VO, MSGL_V, + "Deferring surface creation because width or height is 0.\n"); + return 0; + } + /* calculate the best size for the OSD depending on the factors from the device */ if (priv->device_caps_power2_only) { tex_width = 1; @@ -1029,7 +1035,8 @@ static void draw_osd(void) { // we can not render OSD if we lost the device e.g. because it was uncooperative - if (!priv->d3d_device) + // or if the OSD textures are not allocated (e.g. the window is minimized) + if (!priv->d3d_device || !priv->d3d_texture_osd) return; if (vo_osd_changed(0)) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_directx.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_directx.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_directx.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_directx.c 2011-12-03 19:59:17.000000000 +0000 @@ -37,31 +37,31 @@ #include "sub/sub.h" #include "w32_common.h" -static LPDIRECTDRAWCOLORCONTROL g_cc = NULL; //color control interface -static LPDIRECTDRAW7 g_lpdd = NULL; //DirectDraw Object -static LPDIRECTDRAWSURFACE7 g_lpddsPrimary = NULL; //Primary Surface: viewport through the Desktop -static LPDIRECTDRAWSURFACE7 g_lpddsOverlay = NULL; //Overlay Surface -static LPDIRECTDRAWSURFACE7 g_lpddsBack = NULL; //Back surface -static LPDIRECTDRAWCLIPPER g_lpddclipper; //clipper object, can only be used without overlay -static DDSURFACEDESC2 ddsdsf; //surface descripiton needed for locking -static HINSTANCE hddraw_dll; //handle to ddraw.dll -static RECT rd; //rect of our stretched image -static RECT rs; //rect of our source image -static HBRUSH colorbrush = NULL; // Handle to colorkey brush -static HBRUSH blackbrush = NULL; // Handle to black brush +static LPDIRECTDRAWCOLORCONTROL g_cc = NULL; //color control interface +static LPDIRECTDRAW7 g_lpdd = NULL; //DirectDraw Object +static LPDIRECTDRAWSURFACE7 g_lpddsPrimary = NULL; //Primary Surface: viewport through the Desktop +static LPDIRECTDRAWSURFACE7 g_lpddsOverlay = NULL; //Overlay Surface +static LPDIRECTDRAWSURFACE7 g_lpddsBack = NULL; //Back surface +static LPDIRECTDRAWCLIPPER g_lpddclipper; //clipper object, can only be used without overlay +static DDSURFACEDESC2 ddsdsf; //surface descripiton needed for locking +static HINSTANCE hddraw_dll; //handle to ddraw.dll +static RECT rd; //rect of our stretched image +static RECT rs; //rect of our source image +static HBRUSH colorbrush = NULL; // Handle to colorkey brush +static HBRUSH blackbrush = NULL; // Handle to black brush static uint32_t image_width, image_height; //image width and height -static uint8_t *image=NULL; //image data -static void* tmp_image = NULL; -static uint32_t image_format=0; //image format +static uint8_t *image = NULL; //image data +static void *tmp_image = NULL; +static uint32_t image_format = 0; //image format static uint32_t primary_image_format; -static uint32_t vm_height=0; -static uint32_t vm_width=0; -static uint32_t vm_bpp=0; +static uint32_t vm_height = 0; +static uint32_t vm_width = 0; +static uint32_t vm_bpp = 0; static uint32_t dstride; //surface stride static uint32_t nooverlay = 0; //NonOverlay mode -static DWORD destcolorkey; //colorkey for our surface -static COLORREF windowcolor = RGB(0,0,16); //windowcolor == colorkey -static int adapter_count=0; +static DWORD destcolorkey; //colorkey for our surface +static COLORREF windowcolor = RGB(0, 0, 16); //windowcolor == colorkey +static int adapter_count = 0; static GUID selected_guid; static GUID *selected_guid_ptr = NULL; @@ -71,296 +71,291 @@ * the linking stage. *****************************************************************************/ #define IID_IDirectDraw7 MP_IID_IDirectDraw7 -static const GUID MP_IID_IDirectDraw7 = -{ - 0x15e65ec0,0x3b9c,0x11d2,{0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b} +static const GUID MP_IID_IDirectDraw7 = { + 0x15e65ec0, 0x3b9c, 0x11d2, { 0xb9, 0x2f, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b } }; #define IID_IDirectDrawColorControl MP_IID_IDirectDrawColorControl -static const GUID MP_IID_IDirectDrawColorControl = -{ - 0x4b9f0ee0,0x0d7e,0x11d0,{0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8} +static const GUID MP_IID_IDirectDrawColorControl = { + 0x4b9f0ee0, 0x0d7e, 0x11d0, { 0x9b, 0x06, 0x00, 0xa0, 0xc9, 0x03, 0xa3, 0xb8 } }; - -typedef struct directx_fourcc_caps -{ - char* img_format_name; //human readable name - uint32_t img_format; //as MPlayer image format - uint32_t drv_caps; //what hw supports with this format - DDPIXELFORMAT g_ddpfOverlay; //as Directx Sourface description -} directx_fourcc_caps; - - -static directx_fourcc_caps g_ddpf[] = -{ - {"YV12 ",IMGFMT_YV12 ,0,{sizeof(DDPIXELFORMAT), DDPF_FOURCC,MAKEFOURCC('Y','V','1','2'),0,0,0,0,0}}, - {"I420 ",IMGFMT_I420 ,0,{sizeof(DDPIXELFORMAT), DDPF_FOURCC,MAKEFOURCC('I','4','2','0'),0,0,0,0,0}}, //yv12 with swapped uv - {"IYUV ",IMGFMT_IYUV ,0,{sizeof(DDPIXELFORMAT), DDPF_FOURCC,MAKEFOURCC('I','Y','U','V'),0,0,0,0,0}}, //same as i420 - {"YVU9 ",IMGFMT_YVU9 ,0,{sizeof(DDPIXELFORMAT), DDPF_FOURCC,MAKEFOURCC('Y','V','U','9'),0,0,0,0,0}}, - {"YUY2 ",IMGFMT_YUY2 ,0,{sizeof(DDPIXELFORMAT), DDPF_FOURCC,MAKEFOURCC('Y','U','Y','2'),0,0,0,0,0}}, - {"UYVY ",IMGFMT_UYVY ,0,{sizeof(DDPIXELFORMAT), DDPF_FOURCC,MAKEFOURCC('U','Y','V','Y'),0,0,0,0,0}}, - {"BGR8 ",IMGFMT_BGR8 ,0,{sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 8, 0x00000000, 0x00000000, 0x00000000, 0}}, - {"RGB15",IMGFMT_RGB15,0,{sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x0000001F, 0x000003E0, 0x00007C00, 0}}, //RGB 5:5:5 - {"BGR15",IMGFMT_BGR15,0,{sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x00007C00, 0x000003E0, 0x0000001F, 0}}, - {"RGB16",IMGFMT_RGB16,0,{sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x0000001F, 0x000007E0, 0x0000F800, 0}}, //RGB 5:6:5 - {"BGR16",IMGFMT_BGR16,0,{sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x0000F800, 0x000007E0, 0x0000001F, 0}}, - {"RGB24",IMGFMT_RGB24,0,{sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 24, 0x000000FF, 0x0000FF00, 0x00FF0000, 0}}, - {"BGR24",IMGFMT_BGR24,0,{sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 24, 0x00FF0000, 0x0000FF00, 0x000000FF, 0}}, - {"RGB32",IMGFMT_RGB32,0,{sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 32, 0x000000FF, 0x0000FF00, 0x00FF0000, 0}}, - {"BGR32",IMGFMT_BGR32,0,{sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0}} +struct directx_fourcc_caps { + char img_format_name[6]; //human readable name + uint32_t img_format; //as MPlayer image format + DDPIXELFORMAT g_ddpfOverlay; //as Directx Sourface description +} static const g_ddpf[] = { + { "YV12 ", IMGFMT_YV12, { sizeof(DDPIXELFORMAT), DDPF_FOURCC, MAKEFOURCC('Y', 'V', '1', '2'), 0, 0, 0, 0, 0 } }, + { "I420 ", IMGFMT_I420, { sizeof(DDPIXELFORMAT), DDPF_FOURCC, MAKEFOURCC('I', '4', '2', '0'), 0, 0, 0, 0, 0 } }, //yv12 with swapped uv + { "IYUV ", IMGFMT_IYUV, { sizeof(DDPIXELFORMAT), DDPF_FOURCC, MAKEFOURCC('I', 'Y', 'U', 'V'), 0, 0, 0, 0, 0 } }, //same as i420 + { "YVU9 ", IMGFMT_YVU9, { sizeof(DDPIXELFORMAT), DDPF_FOURCC, MAKEFOURCC('Y', 'V', 'U', '9'), 0, 0, 0, 0, 0 } }, + { "YUY2 ", IMGFMT_YUY2, { sizeof(DDPIXELFORMAT), DDPF_FOURCC, MAKEFOURCC('Y', 'U', 'Y', '2'), 0, 0, 0, 0, 0 } }, + { "UYVY ", IMGFMT_UYVY, { sizeof(DDPIXELFORMAT), DDPF_FOURCC, MAKEFOURCC('U', 'Y', 'V', 'Y'), 0, 0, 0, 0, 0 } }, + { "BGR8 ", IMGFMT_BGR8, { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 8, 0x00000000, 0x00000000, 0x00000000, 0 } }, + { "RGB15", IMGFMT_RGB15, { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x0000001F, 0x000003E0, 0x00007C00, 0 } }, //RGB 5:5:5 + { "BGR15", IMGFMT_BGR15, { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x00007C00, 0x000003E0, 0x0000001F, 0 } }, + { "RGB16", IMGFMT_RGB16, { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x0000001F, 0x000007E0, 0x0000F800, 0 } }, //RGB 5:6:5 + { "BGR16", IMGFMT_BGR16, { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x0000F800, 0x000007E0, 0x0000001F, 0 } }, + { "RGB24", IMGFMT_RGB24, { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 24, 0x000000FF, 0x0000FF00, 0x00FF0000, 0 } }, + { "BGR24", IMGFMT_BGR24, { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 24, 0x00FF0000, 0x0000FF00, 0x000000FF, 0 } }, + { "RGB32", IMGFMT_RGB32, { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 32, 0x000000FF, 0x0000FF00, 0x00FF0000, 0 } }, + { "BGR32", IMGFMT_BGR32, { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0 } } }; #define NUM_FORMATS (sizeof(g_ddpf) / sizeof(g_ddpf[0])) -static const vo_info_t info = -{ - "Directx DDraw YUV/RGB/BGR renderer", - "directx", - "Sascha Sommer ", - "" +// what hw supports with corresponding format in g_ddpf +static uint32_t drv_caps[NUM_FORMATS]; + +static const vo_info_t info = { + "Directx DDraw YUV/RGB/BGR renderer", + "directx", + "Sascha Sommer ", + "" }; const LIBVO_EXTERN(directx) static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src, - unsigned char *srca, int stride) + unsigned char *srca, int stride) { - switch(image_format) { - case IMGFMT_YV12 : - case IMGFMT_I420 : - case IMGFMT_IYUV : - case IMGFMT_YVU9 : - vo_draw_alpha_yv12(w,h,src,srca,stride,((uint8_t *) image) + dstride*y0 + x0,dstride); - break; - case IMGFMT_YUY2 : - vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image)+ dstride*y0 + 2*x0 ,dstride); - break; - case IMGFMT_UYVY : - vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image) + dstride*y0 + 2*x0 + 1,dstride); - break; - case IMGFMT_RGB15: + switch (image_format) { + case IMGFMT_YV12: + case IMGFMT_I420: + case IMGFMT_IYUV: + case IMGFMT_YVU9: + vo_draw_alpha_yv12(w, h, src, srca, stride, ((uint8_t *)image) + dstride * y0 + x0, dstride); + break; + case IMGFMT_YUY2: + vo_draw_alpha_yuy2(w, h, src, srca, stride, ((uint8_t *)image) + dstride * y0 + 2 * x0, dstride); + break; + case IMGFMT_UYVY: + vo_draw_alpha_yuy2(w, h, src, srca, stride, ((uint8_t *)image) + dstride * y0 + 2 * x0 + 1, dstride); + break; + case IMGFMT_RGB15: case IMGFMT_BGR15: - vo_draw_alpha_rgb15(w,h,src,srca,stride,((uint8_t *) image)+dstride*y0+2*x0,dstride); - break; + vo_draw_alpha_rgb15(w, h, src, srca, stride, ((uint8_t *)image) + dstride * y0 + 2 * x0, dstride); + break; case IMGFMT_RGB16: - case IMGFMT_BGR16: - vo_draw_alpha_rgb16(w,h,src,srca,stride,((uint8_t *) image)+dstride*y0+2*x0,dstride); - break; + case IMGFMT_BGR16: + vo_draw_alpha_rgb16(w, h, src, srca, stride, ((uint8_t *)image) + dstride * y0 + 2 * x0, dstride); + break; case IMGFMT_RGB24: - case IMGFMT_BGR24: - vo_draw_alpha_rgb24(w,h,src,srca,stride,((uint8_t *) image)+dstride*y0+4*x0,dstride); - break; + case IMGFMT_BGR24: + vo_draw_alpha_rgb24(w, h, src, srca, stride, ((uint8_t *)image) + dstride * y0 + 4 * x0, dstride); + break; case IMGFMT_RGB32: - case IMGFMT_BGR32: - vo_draw_alpha_rgb32(w,h,src,srca,stride,((uint8_t *) image)+dstride*y0+4*x0,dstride); - break; + case IMGFMT_BGR32: + vo_draw_alpha_rgb32(w, h, src, srca, stride, ((uint8_t *)image) + dstride * y0 + 4 * x0, dstride); + break; } } static void draw_osd(void) { - vo_draw_text(image_width,image_height,draw_alpha); + vo_draw_text(image_width, image_height, draw_alpha); } -static int -query_format(uint32_t format) +static int query_format(uint32_t format) { - uint32_t i=0; - while ( i < NUM_FORMATS ) - { - if (g_ddpf[i].img_format == format) - return g_ddpf[i].drv_caps; - i++; - } + int i; + for (i = 0; i < NUM_FORMATS; i++) + if (g_ddpf[i].img_format == format) + return drv_caps[i]; return 0; } +struct errmap { + HRESULT err; + const char *errstr; +} static const dd_errmap[] = { + {DDERR_INCOMPATIBLEPRIMARY, "incompatible primary surface"}, + {DDERR_INVALIDCAPS, "invalid caps"}, + {DDERR_INVALIDOBJECT, "invalid object"}, + {DDERR_INVALIDPARAMS, "invalid parameters"}, + {DDERR_INVALIDRECT, "invalid rectangle"}, + {DDERR_INVALIDSURFACETYPE, "invalid surfacetype"}, + {DDERR_NODIRECTDRAWHW, "no directdraw hardware"}, + {DDERR_NOEMULATION, "can't emulate"}, + {DDERR_NOFLIPHW, "hardware can't do flip"}, + {DDERR_NOOVERLAYHW, "hardware can't do overlay"}, + {DDERR_NOSTRETCHHW, "hardware can't stretch: try to size the window back"}, + {DDERR_OUTOFMEMORY, "not enough system memory"}, + {DDERR_OUTOFVIDEOMEMORY, "not enough video memory"}, + {DDERR_UNSUPPORTED, "unsupported"}, + {DDERR_UNSUPPORTEDMODE, "unsupported mode"}, + {DDERR_HEIGHTALIGN, "height align"}, + {DDERR_XALIGN, "x align"}, + {DDERR_SURFACELOST, "surfaces lost"}, + {0, NULL} +}; + +static const char *dd_errstr(HRESULT res) +{ + int i; + for (i = 0; dd_errmap[i].errstr; i++) + if (dd_errmap[i].err == res) + return dd_errmap[i].errstr; + return "unknown error"; +} + static uint32_t Directx_CreatePrimarySurface(void) { - DDSURFACEDESC2 ddsd; + DDSURFACEDESC2 ddsd = { .dwSize = sizeof(ddsd) }; //cleanup - if(g_lpddsPrimary)g_lpddsPrimary->lpVtbl->Release(g_lpddsPrimary); - g_lpddsPrimary=NULL; + if (g_lpddsPrimary) + g_lpddsPrimary->lpVtbl->Release(g_lpddsPrimary); + g_lpddsPrimary = NULL; - if(vidmode)g_lpdd->lpVtbl->SetDisplayMode(g_lpdd,vm_width,vm_height,vm_bpp,vo_refresh_rate,0); - ZeroMemory(&ddsd, sizeof(ddsd)); - ddsd.dwSize = sizeof(ddsd); + if (vidmode) + g_lpdd->lpVtbl->SetDisplayMode(g_lpdd, vm_width, vm_height, vm_bpp, vo_refresh_rate, 0); //set flags and create a primary surface. ddsd.dwFlags = DDSD_CAPS; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - if(g_lpdd->lpVtbl->CreateSurface(g_lpdd,&ddsd, &g_lpddsPrimary, NULL )== DD_OK) - mp_msg(MSGT_VO, MSGL_DBG3,"primary surface created\n"); - else - { - mp_msg(MSGT_VO, MSGL_FATAL,"could not create primary surface\n"); - return 1; - } - return 0; + if (g_lpdd->lpVtbl->CreateSurface(g_lpdd, &ddsd, &g_lpddsPrimary, NULL) == DD_OK) + mp_msg(MSGT_VO, MSGL_DBG3, "primary surface created\n"); + else { + mp_msg(MSGT_VO, MSGL_FATAL, "could not create primary surface\n"); + return 1; + } + return 0; } static uint32_t Directx_CreateOverlay(uint32_t imgfmt) { HRESULT ddrval; - DDSURFACEDESC2 ddsdOverlay; - uint32_t i=0; - while ( i < NUM_FORMATS && imgfmt != g_ddpf[i].img_format) - { - i++; - } - if (!g_lpdd || !g_lpddsPrimary || i == NUM_FORMATS) + DDSURFACEDESC2 ddsdOverlay = { + .dwSize = sizeof(ddsdOverlay), + .ddsCaps.dwCaps = DDSCAPS_OVERLAY | DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_VIDEOMEMORY, + .dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_BACKBUFFERCOUNT | DDSD_PIXELFORMAT, + .dwWidth = image_width, + .dwHeight = image_height, + }; + uint32_t i = 0; + ddsdOverlay.dwBackBufferCount = 2; + while (i < NUM_FORMATS && imgfmt != g_ddpf[i].img_format) + i++; + if (!g_lpdd || !g_lpddsPrimary || i == NUM_FORMATS) return 1; //cleanup - if (g_lpddsOverlay)g_lpddsOverlay->lpVtbl->Release(g_lpddsOverlay); - if (g_lpddsBack)g_lpddsBack->lpVtbl->Release(g_lpddsBack); - g_lpddsOverlay= NULL; - g_lpddsBack = NULL; - //create our overlay - ZeroMemory(&ddsdOverlay, sizeof(ddsdOverlay)); - ddsdOverlay.dwSize = sizeof(ddsdOverlay); - ddsdOverlay.ddsCaps.dwCaps=DDSCAPS_OVERLAY | DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_VIDEOMEMORY; - ddsdOverlay.dwFlags= DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_BACKBUFFERCOUNT| DDSD_PIXELFORMAT; - ddsdOverlay.dwWidth=image_width; - ddsdOverlay.dwHeight=image_height; - ddsdOverlay.dwBackBufferCount=2; - ddsdOverlay.ddpfPixelFormat=g_ddpf[i].g_ddpfOverlay; - if(vo_doublebuffering) //tribblebuffering - { - if (g_lpdd->lpVtbl->CreateSurface(g_lpdd,&ddsdOverlay, &g_lpddsOverlay, NULL)== DD_OK) - { - mp_msg(MSGT_VO, MSGL_V,"overlay with format %s created\n",g_ddpf[i].img_format_name); + if (g_lpddsOverlay) + g_lpddsOverlay->lpVtbl->Release(g_lpddsOverlay); + if (g_lpddsBack) + g_lpddsBack->lpVtbl->Release(g_lpddsBack); + g_lpddsOverlay = NULL; + g_lpddsBack = NULL; + //create our overlay + ddsdOverlay.ddpfPixelFormat = g_ddpf[i].g_ddpfOverlay; + if (vo_doublebuffering) { //tribblebuffering + if (g_lpdd->lpVtbl->CreateSurface(g_lpdd, &ddsdOverlay, &g_lpddsOverlay, NULL) == DD_OK) { + mp_msg(MSGT_VO, MSGL_V, "overlay with format %s created\n", g_ddpf[i].img_format_name); //get the surface directly attached to the primary (the back buffer) ddsdOverlay.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER; - if(g_lpddsOverlay->lpVtbl->GetAttachedSurface(g_lpddsOverlay,&ddsdOverlay.ddsCaps, &g_lpddsBack) != DD_OK) - { - mp_msg(MSGT_VO, MSGL_FATAL,"can't get attached surface\n"); - return 1; - } - return 0; - } - vo_doublebuffering=0; //disable tribblebuffering - mp_msg(MSGT_VO, MSGL_V,"cannot create tribblebuffer overlay with format %s\n",g_ddpf[i].img_format_name); - } - //single buffer - mp_msg(MSGT_VO, MSGL_V,"using singlebuffer overlay\n"); - ddsdOverlay.dwBackBufferCount=0; - ddsdOverlay.ddsCaps.dwCaps=DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY; - ddsdOverlay.dwFlags= DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT; - ddsdOverlay.ddpfPixelFormat=g_ddpf[i].g_ddpfOverlay; - // try to create the overlay surface - ddrval = g_lpdd->lpVtbl->CreateSurface(g_lpdd,&ddsdOverlay, &g_lpddsOverlay, NULL); - if(ddrval != DD_OK) - { - if(ddrval == DDERR_INVALIDPIXELFORMAT)mp_msg(MSGT_VO,MSGL_V," invalid pixelformat: %s\n",g_ddpf[i].img_format_name); - else mp_msg(MSGT_VO, MSGL_ERR,""); - switch(ddrval) - { - case DDERR_INCOMPATIBLEPRIMARY: - {mp_msg(MSGT_VO, MSGL_ERR,"incompatible primary surface\n");break;} - case DDERR_INVALIDCAPS: - {mp_msg(MSGT_VO, MSGL_ERR,"invalid caps\n");break;} - case DDERR_INVALIDOBJECT: - {mp_msg(MSGT_VO, MSGL_ERR,"invalid object\n");break;} - case DDERR_INVALIDPARAMS: - {mp_msg(MSGT_VO, MSGL_ERR,"invalid parameters\n");break;} - case DDERR_NODIRECTDRAWHW: - {mp_msg(MSGT_VO, MSGL_ERR,"no directdraw hardware\n");break;} - case DDERR_NOEMULATION: - {mp_msg(MSGT_VO, MSGL_ERR,"can't emulate\n");break;} - case DDERR_NOFLIPHW: - {mp_msg(MSGT_VO, MSGL_ERR,"hardware can't do flip\n");break;} - case DDERR_NOOVERLAYHW: - {mp_msg(MSGT_VO, MSGL_ERR,"hardware can't do overlay\n");break;} - case DDERR_OUTOFMEMORY: - {mp_msg(MSGT_VO, MSGL_ERR,"not enough system memory\n");break;} - case DDERR_UNSUPPORTEDMODE: - {mp_msg(MSGT_VO, MSGL_ERR,"unsupported mode\n");break;} - case DDERR_OUTOFVIDEOMEMORY: - {mp_msg(MSGT_VO, MSGL_ERR,"not enough video memory\n");break;} - default: - mp_msg(MSGT_VO, MSGL_ERR,"create surface failed with 0x%x\n",ddrval); - } - return 1; - } + if (g_lpddsOverlay->lpVtbl->GetAttachedSurface(g_lpddsOverlay, &ddsdOverlay.ddsCaps, &g_lpddsBack) != DD_OK) { + mp_msg(MSGT_VO, MSGL_FATAL, "can't get attached surface\n"); + return 1; + } + return 0; + } + vo_doublebuffering = 0; //disable tribblebuffering + mp_msg(MSGT_VO, MSGL_V, "cannot create tribblebuffer overlay with format %s\n", g_ddpf[i].img_format_name); + } + //single buffer + mp_msg(MSGT_VO, MSGL_V, "using singlebuffer overlay\n"); + ddsdOverlay.dwBackBufferCount = 0; + ddsdOverlay.ddsCaps.dwCaps = DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY; + ddsdOverlay.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT; + ddsdOverlay.ddpfPixelFormat = g_ddpf[i].g_ddpfOverlay; + // try to create the overlay surface + ddrval = g_lpdd->lpVtbl->CreateSurface(g_lpdd, &ddsdOverlay, &g_lpddsOverlay, NULL); + if (ddrval != DD_OK) { + if (ddrval == DDERR_INVALIDPIXELFORMAT) + mp_msg(MSGT_VO, MSGL_V, " invalid pixelformat: %s\n", g_ddpf[i].img_format_name); + else + mp_msg(MSGT_VO, MSGL_ERR, "create surface failed: %s (0x%x)\n", dd_errstr(ddrval), ddrval); + return 1; + } g_lpddsBack = g_lpddsOverlay; - return 0; + return 0; } static uint32_t Directx_CreateBackpuffer(void) { - DDSURFACEDESC2 ddsd; - //cleanup - if (g_lpddsBack)g_lpddsBack->lpVtbl->Release(g_lpddsBack); - g_lpddsBack=NULL; - ZeroMemory(&ddsd, sizeof(ddsd)); - ddsd.dwSize = sizeof(ddsd); - ddsd.ddsCaps.dwCaps= DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; - ddsd.dwFlags= DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; - ddsd.dwWidth=image_width; - ddsd.dwHeight=image_height; - if(g_lpdd->lpVtbl->CreateSurface( g_lpdd, &ddsd, &g_lpddsBack, 0 ) != DD_OK ) - { - mp_msg(MSGT_VO, MSGL_FATAL,"can't create backpuffer\n"); - return 1; - } - mp_msg(MSGT_VO, MSGL_DBG3,"backbuffer created\n"); - return 0; + DDSURFACEDESC2 ddsd = { + .dwSize = sizeof(ddsd), + .ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY, + .dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT, + .dwWidth = image_width, + .dwHeight = image_height, + }; + //cleanup + if (g_lpddsBack) + g_lpddsBack->lpVtbl->Release(g_lpddsBack); + g_lpddsBack = NULL; + if (g_lpdd->lpVtbl->CreateSurface(g_lpdd, &ddsd, &g_lpddsBack, 0) != DD_OK) { + mp_msg(MSGT_VO, MSGL_FATAL, "can't create backpuffer\n"); + return 1; + } + mp_msg(MSGT_VO, MSGL_DBG3, "backbuffer created\n"); + return 0; } static void uninit(void) { - if (g_cc != NULL) - { - g_cc->lpVtbl->Release(g_cc); - } - g_cc=NULL; - if (g_lpddclipper != NULL) g_lpddclipper->lpVtbl->Release(g_lpddclipper); - g_lpddclipper = NULL; - mp_msg(MSGT_VO, MSGL_DBG3,"clipper released\n"); - if (g_lpddsBack != NULL) g_lpddsBack->lpVtbl->Release(g_lpddsBack); - g_lpddsBack = NULL; - mp_msg(MSGT_VO, MSGL_DBG3,"back surface released\n"); - if(vo_doublebuffering && !nooverlay) - { - if (g_lpddsOverlay != NULL)g_lpddsOverlay->lpVtbl->Release(g_lpddsOverlay); + if (g_cc) + g_cc->lpVtbl->Release(g_cc); + g_cc = NULL; + if (g_lpddclipper) + g_lpddclipper->lpVtbl->Release(g_lpddclipper); + g_lpddclipper = NULL; + mp_msg(MSGT_VO, MSGL_DBG3, "clipper released\n"); + if (g_lpddsBack) + g_lpddsBack->lpVtbl->Release(g_lpddsBack); + g_lpddsBack = NULL; + mp_msg(MSGT_VO, MSGL_DBG3, "back surface released\n"); + if (vo_doublebuffering && !nooverlay) { + if (g_lpddsOverlay) + g_lpddsOverlay->lpVtbl->Release(g_lpddsOverlay); g_lpddsOverlay = NULL; - mp_msg(MSGT_VO, MSGL_DBG3,"overlay surface released\n"); - } - if (g_lpddsPrimary != NULL) g_lpddsPrimary->lpVtbl->Release(g_lpddsPrimary); + mp_msg(MSGT_VO, MSGL_DBG3, "overlay surface released\n"); + } + if (g_lpddsPrimary) + g_lpddsPrimary->lpVtbl->Release(g_lpddsPrimary); g_lpddsPrimary = NULL; - mp_msg(MSGT_VO, MSGL_DBG3,"primary released\n"); - if (colorbrush) DeleteObject(colorbrush); - colorbrush = NULL; - mp_msg(MSGT_VO, MSGL_DBG3,"GDI resources deleted\n"); - if (g_lpdd != NULL){ - if(vidmode)g_lpdd->lpVtbl->RestoreDisplayMode(g_lpdd); - g_lpdd->lpVtbl->Release(g_lpdd); - } - mp_msg(MSGT_VO, MSGL_DBG3,"directdrawobject released\n"); - FreeLibrary( hddraw_dll); - hddraw_dll= NULL; - mp_msg(MSGT_VO, MSGL_DBG3,"ddraw.dll freed\n"); - mp_msg(MSGT_VO, MSGL_DBG3,"uninitialized\n"); - vo_w32_uninit(); + mp_msg(MSGT_VO, MSGL_DBG3, "primary released\n"); + if (colorbrush) + DeleteObject(colorbrush); + colorbrush = NULL; + mp_msg(MSGT_VO, MSGL_DBG3, "GDI resources deleted\n"); + if (g_lpdd) { + if (vidmode) + g_lpdd->lpVtbl->RestoreDisplayMode(g_lpdd); + g_lpdd->lpVtbl->Release(g_lpdd); + } + mp_msg(MSGT_VO, MSGL_DBG3, "directdrawobject released\n"); + FreeLibrary(hddraw_dll); + hddraw_dll = NULL; + mp_msg(MSGT_VO, MSGL_DBG3, "ddraw.dll freed\n"); + mp_msg(MSGT_VO, MSGL_DBG3, "uninitialized\n"); + vo_w32_uninit(); } -static BOOL WINAPI EnumCallbackEx(GUID FAR *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID lpContext, HMONITOR hm) +static BOOL WINAPI EnumCallbackEx(GUID FAR *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID lpContext, HMONITOR hm) { if (!lpGUID) lpDriverDescription = "Primary Display Adapter"; - mp_msg(MSGT_VO, MSGL_INFO ," adapter %d: %s", adapter_count, lpDriverDescription); + mp_msg(MSGT_VO, MSGL_INFO, " adapter %d: %s", adapter_count, lpDriverDescription); - if(adapter_count == vo_adapter_num){ + if (adapter_count == vo_adapter_num) { if (!lpGUID) selected_guid_ptr = NULL; - else - { - selected_guid = *lpGUID; + else { + selected_guid = *lpGUID; selected_guid_ptr = &selected_guid; } - mp_msg(MSGT_VO, MSGL_INFO ,"\t\t<--"); + mp_msg(MSGT_VO, MSGL_INFO, "\t\t<--"); } - mp_msg(MSGT_VO, MSGL_INFO ,"\n"); + mp_msg(MSGT_VO, MSGL_INFO, "\n"); adapter_count++; @@ -369,265 +364,242 @@ static uint32_t Directx_InitDirectDraw(void) { - HRESULT (WINAPI *OurDirectDrawCreateEx)(GUID *,LPVOID *, REFIID,IUnknown FAR *); - DDSURFACEDESC2 ddsd; - LPDIRECTDRAWENUMERATEEX OurDirectDrawEnumerateEx; - - adapter_count = 0; - - mp_msg(MSGT_VO, MSGL_DBG3,"Initing DirectDraw\n" ); - - //load direct draw DLL: based on videolans code - hddraw_dll = LoadLibrary("DDRAW.DLL"); - if( hddraw_dll == NULL ) - { - mp_msg(MSGT_VO, MSGL_FATAL,"failed loading ddraw.dll\n" ); - return 1; - } - - if(vo_adapter_num){ //display other than default - OurDirectDrawEnumerateEx = (LPDIRECTDRAWENUMERATEEX) GetProcAddress(hddraw_dll,"DirectDrawEnumerateExA"); - if (!OurDirectDrawEnumerateEx){ - FreeLibrary( hddraw_dll ); + HRESULT (WINAPI *OurDirectDrawCreateEx)(GUID *, LPVOID *, REFIID, IUnknown FAR *); + DDSURFACEDESC2 ddsd = { + .dwSize = sizeof(ddsd), + .dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT, + }; + LPDIRECTDRAWENUMERATEEX OurDirectDrawEnumerateEx; + + adapter_count = 0; + + mp_msg(MSGT_VO, MSGL_DBG3, "Initing DirectDraw\n"); + + //load direct draw DLL: based on videolans code + hddraw_dll = LoadLibrary("DDRAW.DLL"); + if (!hddraw_dll) { + mp_msg(MSGT_VO, MSGL_FATAL, "failed loading ddraw.dll\n"); + return 1; + } + + if (vo_adapter_num) { //display other than default + OurDirectDrawEnumerateEx = (LPDIRECTDRAWENUMERATEEX)GetProcAddress(hddraw_dll, "DirectDrawEnumerateExA"); + if (!OurDirectDrawEnumerateEx) { + FreeLibrary(hddraw_dll); hddraw_dll = NULL; - mp_msg(MSGT_VO, MSGL_FATAL,"failed geting proc address: DirectDrawEnumerateEx\n"); - mp_msg(MSGT_VO, MSGL_FATAL,"no directx 7 or higher installed\n"); + mp_msg(MSGT_VO, MSGL_FATAL, "failed geting proc address: DirectDrawEnumerateEx\n"); + mp_msg(MSGT_VO, MSGL_FATAL, "no directx 7 or higher installed\n"); return 1; } // enumerate all display devices attached to the desktop - OurDirectDrawEnumerateEx(EnumCallbackEx, NULL, DDENUM_ATTACHEDSECONDARYDEVICES ); + OurDirectDrawEnumerateEx(EnumCallbackEx, NULL, DDENUM_ATTACHEDSECONDARYDEVICES); - if(vo_adapter_num >= adapter_count) - mp_msg(MSGT_VO, MSGL_ERR,"Selected adapter (%d) doesn't exist: Default Display Adapter selected\n",vo_adapter_num); + if (vo_adapter_num >= adapter_count) + mp_msg(MSGT_VO, MSGL_ERR, "Selected adapter (%d) doesn't exist: Default Display Adapter selected\n", vo_adapter_num); } - OurDirectDrawCreateEx = (void *)GetProcAddress(hddraw_dll, "DirectDrawCreateEx"); - if ( OurDirectDrawCreateEx == NULL ) - { - FreeLibrary( hddraw_dll ); - hddraw_dll = NULL; - mp_msg(MSGT_VO, MSGL_FATAL,"failed geting proc address: DirectDrawCreateEx\n"); - return 1; - } - - // initialize DirectDraw and create directx v7 object - if (OurDirectDrawCreateEx(selected_guid_ptr, (VOID**)&g_lpdd, &IID_IDirectDraw7, NULL ) != DD_OK ) - { - FreeLibrary( hddraw_dll ); + OurDirectDrawCreateEx = (void *)GetProcAddress(hddraw_dll, "DirectDrawCreateEx"); + if (!OurDirectDrawCreateEx) { + FreeLibrary(hddraw_dll); hddraw_dll = NULL; - mp_msg(MSGT_VO, MSGL_FATAL,"can't initialize ddraw\n"); - return 1; + mp_msg(MSGT_VO, MSGL_FATAL, "failed geting proc address: DirectDrawCreateEx\n"); + return 1; } - //get current screen siz for selected monitor ... - ddsd.dwSize=sizeof(ddsd); - ddsd.dwFlags=DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT; - g_lpdd->lpVtbl->GetDisplayMode(g_lpdd, &ddsd); - if(vo_screenwidth && vo_screenheight) - { - vm_height=vo_screenheight; - vm_width=vo_screenwidth; - } - else - { - vm_height=ddsd.dwHeight; - vm_width=ddsd.dwWidth; - } + // initialize DirectDraw and create directx v7 object + if (OurDirectDrawCreateEx(selected_guid_ptr, (VOID **)&g_lpdd, &IID_IDirectDraw7, NULL) != DD_OK) { + FreeLibrary(hddraw_dll); + hddraw_dll = NULL; + mp_msg(MSGT_VO, MSGL_FATAL, "can't initialize ddraw\n"); + return 1; + } + //get current screen siz for selected monitor ... + g_lpdd->lpVtbl->GetDisplayMode(g_lpdd, &ddsd); + if (vo_screenwidth && vo_screenheight) { + vm_height = vo_screenheight; + vm_width = vo_screenwidth; + } else { + vm_height = ddsd.dwHeight; + vm_width = ddsd.dwWidth; + } - if(vo_dbpp)vm_bpp=vo_dbpp; - else vm_bpp=ddsd.ddpfPixelFormat.dwRGBBitCount; - - if(vidmode){ - if (g_lpdd->lpVtbl->SetCooperativeLevel(g_lpdd, vo_w32_window, DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN) != DD_OK) - { - mp_msg(MSGT_VO, MSGL_FATAL,"can't set cooperativelevel for exclusive mode\n"); + if (vo_dbpp) + vm_bpp = vo_dbpp; + else + vm_bpp = ddsd.ddpfPixelFormat.dwRGBBitCount; + + if (vidmode) { + if (g_lpdd->lpVtbl->SetCooperativeLevel(g_lpdd, vo_w32_window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN) != DD_OK) { + mp_msg(MSGT_VO, MSGL_FATAL, "can't set cooperativelevel for exclusive mode\n"); return 1; - } - /*SetDisplayMode(ddobject,width,height,bpp,refreshrate,aditionalflags)*/ - if(g_lpdd->lpVtbl->SetDisplayMode(g_lpdd,vm_width, vm_height, vm_bpp,0,0) != DD_OK) - { - mp_msg(MSGT_VO, MSGL_FATAL,"can't set displaymode\n"); - return 1; - } - mp_msg(MSGT_VO, MSGL_V,"Initialized adapter %i for %i x %i @ %i \n",vo_adapter_num,vm_width,vm_height,vm_bpp); - return 0; - } - if (g_lpdd->lpVtbl->SetCooperativeLevel(g_lpdd, vo_w32_window, DDSCL_NORMAL) != DD_OK) // or DDSCL_SETFOCUSWINDOW - { - mp_msg(MSGT_VO, MSGL_FATAL,"could not set cooperativelevel for hardwarecheck\n"); - return 1; + } + /*SetDisplayMode(ddobject,width,height,bpp,refreshrate,aditionalflags)*/ + if (g_lpdd->lpVtbl->SetDisplayMode(g_lpdd, vm_width, vm_height, vm_bpp, 0, 0) != DD_OK) { + mp_msg(MSGT_VO, MSGL_FATAL, "can't set displaymode\n"); + return 1; + } + mp_msg(MSGT_VO, MSGL_V, "Initialized adapter %i for %i x %i @ %i \n", vo_adapter_num, vm_width, vm_height, vm_bpp); + return 0; + } + if (g_lpdd->lpVtbl->SetCooperativeLevel(g_lpdd, vo_w32_window, DDSCL_NORMAL) != DD_OK) { // or DDSCL_SETFOCUSWINDOW + mp_msg(MSGT_VO, MSGL_FATAL, "could not set cooperativelevel for hardwarecheck\n"); + return 1; } - mp_msg(MSGT_VO, MSGL_DBG3,"DirectDraw Initialized\n"); - return 0; + mp_msg(MSGT_VO, MSGL_DBG3, "DirectDraw Initialized\n"); + return 0; } static uint32_t Directx_ManageDisplay(void) { - HRESULT ddrval; - DDCAPS capsDrv; - DDOVERLAYFX ovfx; - DWORD dwUpdateFlags=0; - int width,height; + HRESULT ddrval; + DDCAPS capsDrv = { .dwSize = sizeof(capsDrv) }; + DDOVERLAYFX ovfx = { .dwSize = sizeof(ovfx) }; + DWORD dwUpdateFlags = 0; + int width, height; rd.left = vo_dx - xinerama_x; rd.top = vo_dy - xinerama_y; - width = vo_dwidth; - height = vo_dheight; + width = vo_dwidth; + height = vo_dheight; aspect(&width, &height, A_WINZOOM); panscan_calc_windowed(); - width += vo_panscan_x; - height += vo_panscan_y; - width = FFMIN(width, vo_screenwidth); - height = FFMIN(height, vo_screenheight); - rd.left += (vo_dwidth - width ) / 2; + width += vo_panscan_x; + height += vo_panscan_y; + width = FFMIN(width, vo_screenwidth); + height = FFMIN(height, vo_screenheight); + rd.left += (vo_dwidth - width) / 2; rd.top += (vo_dheight - height) / 2; - rd.right=rd.left+width; - rd.bottom=rd.top+height; + rd.right = rd.left + width; + rd.bottom = rd.top + height; - /*ok, let's workaround some overlay limitations*/ - if(!nooverlay) - { - uint32_t uStretchFactor1000; //minimum stretch - uint32_t xstretch1000,ystretch1000; - /*get driver capabilities*/ - ZeroMemory(&capsDrv, sizeof(capsDrv)); - capsDrv.dwSize = sizeof(capsDrv); - if(g_lpdd->lpVtbl->GetCaps(g_lpdd,&capsDrv, NULL) != DD_OK)return 1; - /*get minimum stretch, depends on display adaptor and mode (refresh rate!) */ - uStretchFactor1000 = capsDrv.dwMinOverlayStretch>1000 ? capsDrv.dwMinOverlayStretch : 1000; - rd.right = ((width+rd.left)*uStretchFactor1000+999)/1000; - rd.bottom = (height+rd.top)*uStretchFactor1000/1000; + /*ok, let's workaround some overlay limitations*/ + if (!nooverlay) { + uint32_t uStretchFactor1000; //minimum stretch + uint32_t xstretch1000, ystretch1000; + + if (!width || !height) { + // window is minimized, so we should hide the overlay in case + // colorkeying is not used or working. + // In addition trying to set width/height to 0 would crash + g_lpddsOverlay->lpVtbl->UpdateOverlay(g_lpddsOverlay, NULL, g_lpddsPrimary, NULL, DDOVER_HIDE, NULL); + return 0; + } + + /*get driver capabilities*/ + if (g_lpdd->lpVtbl->GetCaps(g_lpdd, &capsDrv, NULL) != DD_OK) + return 1; + /*get minimum stretch, depends on display adaptor and mode (refresh rate!) */ + uStretchFactor1000 = capsDrv.dwMinOverlayStretch > 1000 ? capsDrv.dwMinOverlayStretch : 1000; + rd.right = ((width + rd.left) * uStretchFactor1000 + 999) / 1000; + rd.bottom = (height + rd.top) * uStretchFactor1000 / 1000; /*calculate xstretch1000 and ystretch1000*/ - xstretch1000 = ((rd.right - rd.left)* 1000)/image_width ; - ystretch1000 = ((rd.bottom - rd.top)* 1000)/image_height; - rs.left=0; - rs.right=image_width; - rs.top=0; - rs.bottom=image_height; - if(rd.left < 0)rs.left=(-rd.left*1000)/xstretch1000; - if(rd.top < 0)rs.top=(-rd.top*1000)/ystretch1000; - if(rd.right > vo_screenwidth)rs.right=((vo_screenwidth-rd.left)*1000)/xstretch1000; - if(rd.bottom > vo_screenheight)rs.bottom=((vo_screenheight-rd.top)*1000)/ystretch1000; - /*do not allow to zoom or shrink if hardware isn't able to do so*/ - if((width < image_width)&& !(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSHRINKX)) - { - if(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSHRINKXN)mp_msg(MSGT_VO, MSGL_ERR,"can only shrinkN\n"); - else mp_msg(MSGT_VO, MSGL_ERR,"can't shrink x\n"); - rd.right=rd.left+image_width; - } - else if((width > image_width)&& !(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHX)) - { - if(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHXN)mp_msg(MSGT_VO, MSGL_ERR,"can only stretchN\n"); - else mp_msg(MSGT_VO, MSGL_ERR,"can't stretch x\n"); - rd.right = rd.left+image_width; - } - if((height < image_height) && !(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSHRINKY)) - { - if(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSHRINKYN)mp_msg(MSGT_VO, MSGL_ERR,"can only shrinkN\n"); - else mp_msg(MSGT_VO, MSGL_ERR,"can't shrink y\n"); - rd.bottom = rd.top + image_height; - } - else if((height > image_height ) && !(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHY)) - { - if(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHYN)mp_msg(MSGT_VO, MSGL_ERR,"can only stretchN\n"); - else mp_msg(MSGT_VO, MSGL_ERR,"can't stretch y\n"); - rd.bottom = rd.top + image_height; - } - /*the last thing to check are alignment restrictions - these expressions (x & -y) just do alignment by dropping low order bits... - so to round up, we add first, then truncate*/ - if((capsDrv.dwCaps & DDCAPS_ALIGNBOUNDARYSRC) && capsDrv.dwAlignBoundarySrc) - rs.left = (rs.left + capsDrv.dwAlignBoundarySrc / 2) & -(signed)(capsDrv.dwAlignBoundarySrc); - if((capsDrv.dwCaps & DDCAPS_ALIGNSIZESRC) && capsDrv.dwAlignSizeSrc) - rs.right = rs.left + ((rs.right - rs.left + capsDrv.dwAlignSizeSrc / 2) & -(signed) (capsDrv.dwAlignSizeSrc)); - if((capsDrv.dwCaps & DDCAPS_ALIGNBOUNDARYDEST) && capsDrv.dwAlignBoundaryDest) - rd.left = (rd.left + capsDrv.dwAlignBoundaryDest / 2) & -(signed)(capsDrv.dwAlignBoundaryDest); - if((capsDrv.dwCaps & DDCAPS_ALIGNSIZEDEST) && capsDrv.dwAlignSizeDest) - rd.right = rd.left + ((rd.right - rd.left) & -(signed) (capsDrv.dwAlignSizeDest)); - /*create an overlay FX structure to specify a destination color key*/ - ZeroMemory(&ovfx, sizeof(ovfx)); - ovfx.dwSize = sizeof(ovfx); - if(vo_fs||vidmode) - { - ovfx.dckDestColorkey.dwColorSpaceLowValue = 0; + xstretch1000 = ((rd.right - rd.left) * 1000) / image_width; + ystretch1000 = ((rd.bottom - rd.top) * 1000) / image_height; + rs.left = 0; + rs.right = image_width; + rs.top = 0; + rs.bottom = image_height; + if (rd.left < 0) + rs.left = (-rd.left * 1000) / xstretch1000; + if (rd.top < 0) + rs.top = (-rd.top * 1000) / ystretch1000; + if (rd.right > vo_screenwidth) + rs.right = ((vo_screenwidth - rd.left) * 1000) / xstretch1000; + if (rd.bottom > vo_screenheight) + rs.bottom = ((vo_screenheight - rd.top) * 1000) / ystretch1000; + /*do not allow to zoom or shrink if hardware isn't able to do so*/ + if (width < image_width && !(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSHRINKX)) { + if (capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSHRINKXN) + mp_msg(MSGT_VO, MSGL_ERR, "can only shrinkN\n"); + else + mp_msg(MSGT_VO, MSGL_ERR, "can't shrink x\n"); + rd.right = rd.left + image_width; + } else if (width > image_width && !(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHX)) { + if (capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHXN) + mp_msg(MSGT_VO, MSGL_ERR, "can only stretchN\n"); + else + mp_msg(MSGT_VO, MSGL_ERR, "can't stretch x\n"); + rd.right = rd.left + image_width; + } + if (height < image_height && !(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSHRINKY)) { + if (capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSHRINKYN) + mp_msg(MSGT_VO, MSGL_ERR, "can only shrinkN\n"); + else + mp_msg(MSGT_VO, MSGL_ERR, "can't shrink y\n"); + rd.bottom = rd.top + image_height; + } else if (height > image_height && !(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHY)) { + if (capsDrv.dwFXCaps & DDFXCAPS_OVERLAYSTRETCHYN) + mp_msg(MSGT_VO, MSGL_ERR, "can only stretchN\n"); + else + mp_msg(MSGT_VO, MSGL_ERR, "can't stretch y\n"); + rd.bottom = rd.top + image_height; + } + /*the last thing to check are alignment restrictions + * these expressions (x & -y) just do alignment by dropping low order bits... + * so to round up, we add first, then truncate*/ + if ((capsDrv.dwCaps & DDCAPS_ALIGNBOUNDARYSRC) && capsDrv.dwAlignBoundarySrc) + rs.left = (rs.left + capsDrv.dwAlignBoundarySrc / 2) & - (signed)(capsDrv.dwAlignBoundarySrc); + if ((capsDrv.dwCaps & DDCAPS_ALIGNSIZESRC) && capsDrv.dwAlignSizeSrc) + rs.right = rs.left + ((rs.right - rs.left + capsDrv.dwAlignSizeSrc / 2) & - (signed)(capsDrv.dwAlignSizeSrc)); + if ((capsDrv.dwCaps & DDCAPS_ALIGNBOUNDARYDEST) && capsDrv.dwAlignBoundaryDest) + rd.left = (rd.left + capsDrv.dwAlignBoundaryDest / 2) & - (signed)(capsDrv.dwAlignBoundaryDest); + if ((capsDrv.dwCaps & DDCAPS_ALIGNSIZEDEST) && capsDrv.dwAlignSizeDest) + rd.right = rd.left + ((rd.right - rd.left) & - (signed)(capsDrv.dwAlignSizeDest)); + /*create an overlay FX structure to specify a destination color key*/ + if (vo_fs || vidmode) { + ovfx.dckDestColorkey.dwColorSpaceLowValue = 0; ovfx.dckDestColorkey.dwColorSpaceHighValue = 0; - } - else - { - ovfx.dckDestColorkey.dwColorSpaceLowValue = destcolorkey; + } else { + ovfx.dckDestColorkey.dwColorSpaceLowValue = destcolorkey; ovfx.dckDestColorkey.dwColorSpaceHighValue = destcolorkey; - } + } // set the flags we'll send to UpdateOverlay //DDOVER_AUTOFLIP|DDOVERFX_MIRRORLEFTRIGHT|DDOVERFX_MIRRORUPDOWN could be useful?; dwUpdateFlags = DDOVER_SHOW | DDOVER_DDFX; /*if hardware can't do colorkeying set the window on top*/ - if(capsDrv.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAY) dwUpdateFlags |= DDOVER_KEYDESTOVERRIDE; - else if (!tmp_image) vo_ontop = 1; - } - else - { + if (capsDrv.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAY) + dwUpdateFlags |= DDOVER_KEYDESTOVERRIDE; + else if (!tmp_image) + vo_ontop = 1; + } else { g_lpddclipper->lpVtbl->SetHWnd(g_lpddclipper, 0, vo_w32_window); } /*make sure the overlay is inside the screen*/ - if(rd.left<0)rd.left=0; - if(rd.right>vo_screenwidth)rd.right=vo_screenwidth; - if(rd.top<0)rd.top=0; - if(rd.bottom>vo_screenheight)rd.bottom=vo_screenheight; + rd.top = FFMAX(rd.top, 0); + rd.left = FFMAX(rd.left, 0); + rd.bottom = FFMIN(rd.bottom, vo_screenheight); + rd.right = FFMIN(rd.right, vo_screenwidth); - /*for nonoverlay mode we are finished, for overlay mode we have to display the overlay first*/ - if(nooverlay)return 0; + /*for nonoverlay mode we are finished, for overlay mode we have to display the overlay first*/ + if (nooverlay) + return 0; // printf("overlay: %i %i %ix%i\n",rd.left,rd.top,rd.right - rd.left,rd.bottom - rd.top); - ddrval = g_lpddsOverlay->lpVtbl->UpdateOverlay(g_lpddsOverlay,&rs, g_lpddsPrimary, &rd, dwUpdateFlags, &ovfx); - if(FAILED(ddrval)) - { + ddrval = g_lpddsOverlay->lpVtbl->UpdateOverlay(g_lpddsOverlay, &rs, g_lpddsPrimary, &rd, dwUpdateFlags, &ovfx); + if (FAILED(ddrval)) { // one cause might be the driver lied about minimum stretch // we should try upping the destination size a bit, or // perhaps shrinking the source size - mp_msg(MSGT_VO, MSGL_ERR ,"UpdateOverlay failed\n" ); - mp_msg(MSGT_VO, MSGL_ERR ,"Overlay:x1:%i,y1:%i,x2:%i,y2:%i,w:%i,h:%i\n",rd.left,rd.top,rd.right,rd.bottom,rd.right - rd.left,rd.bottom - rd.top ); - mp_msg(MSGT_VO, MSGL_ERR ,""); - switch (ddrval) - { - case DDERR_NOSTRETCHHW: - {mp_msg(MSGT_VO, MSGL_ERR ,"hardware can't stretch: try to size the window back\n");break;} - case DDERR_INVALIDRECT: - {mp_msg(MSGT_VO, MSGL_ERR ,"invalid rectangle\n");break;} - case DDERR_INVALIDPARAMS: - {mp_msg(MSGT_VO, MSGL_ERR ,"invalid parameters\n");break;} - case DDERR_HEIGHTALIGN: - {mp_msg(MSGT_VO, MSGL_ERR ,"height align\n");break;} - case DDERR_XALIGN: - {mp_msg(MSGT_VO, MSGL_ERR ,"x align\n");break;} - case DDERR_UNSUPPORTED: - {mp_msg(MSGT_VO, MSGL_ERR ,"unsupported\n");break;} - case DDERR_INVALIDSURFACETYPE: - {mp_msg(MSGT_VO, MSGL_ERR ,"invalid surfacetype\n");break;} - case DDERR_INVALIDOBJECT: - {mp_msg(MSGT_VO, MSGL_ERR ,"invalid object\n");break;} - case DDERR_SURFACELOST: - { - mp_msg(MSGT_VO, MSGL_ERR ,"surfaces lost\n"); - g_lpddsOverlay->lpVtbl->Restore( g_lpddsOverlay ); //restore and try again - g_lpddsPrimary->lpVtbl->Restore( g_lpddsPrimary ); - ddrval = g_lpddsOverlay->lpVtbl->UpdateOverlay(g_lpddsOverlay,&rs, g_lpddsPrimary, &rd, dwUpdateFlags, &ovfx); - if(ddrval !=DD_OK)mp_msg(MSGT_VO, MSGL_FATAL ,"UpdateOverlay failed again\n" ); - break; - } - default: - mp_msg(MSGT_VO, MSGL_ERR ," 0x%x\n",ddrval); - } - /*ok we can't do anything about it -> hide overlay*/ - if(ddrval != DD_OK) - { - ddrval = g_lpddsOverlay->lpVtbl->UpdateOverlay(g_lpddsOverlay,NULL, g_lpddsPrimary, NULL, DDOVER_HIDE, NULL); + mp_msg(MSGT_VO, MSGL_ERR, "UpdateOverlay failed\n"); + mp_msg(MSGT_VO, MSGL_ERR, "Overlay:x1:%i,y1:%i,x2:%i,y2:%i,w:%i,h:%i\n", rd.left, rd.top, rd.right, rd.bottom, rd.right - rd.left, rd.bottom - rd.top); + mp_msg(MSGT_VO, MSGL_ERR, "%s (0x%x)\n", dd_errstr(ddrval), ddrval); + if (ddrval == DDERR_SURFACELOST) { + g_lpddsOverlay->lpVtbl->Restore(g_lpddsOverlay); //restore and try again + g_lpddsPrimary->lpVtbl->Restore(g_lpddsPrimary); + ddrval = g_lpddsOverlay->lpVtbl->UpdateOverlay(g_lpddsOverlay, &rs, g_lpddsPrimary, &rd, dwUpdateFlags, &ovfx); + if (ddrval != DD_OK) + mp_msg(MSGT_VO, MSGL_FATAL, "UpdateOverlay failed again\n"); + } + /*ok we can't do anything about it -> hide overlay*/ + if (ddrval != DD_OK) { + ddrval = g_lpddsOverlay->lpVtbl->UpdateOverlay(g_lpddsOverlay, NULL, g_lpddsPrimary, NULL, DDOVER_HIDE, NULL); return 1; - } - } + } + } return 0; } @@ -648,413 +620,409 @@ //find out supported overlay pixelformats static uint32_t Directx_CheckOverlayPixelformats(void) { - DDCAPS capsDrv; - HRESULT ddrval; - DDSURFACEDESC2 ddsdOverlay; - uint32_t i; - uint32_t formatcount = 0; - //get driver caps to determine overlay support - ZeroMemory(&capsDrv, sizeof(capsDrv)); - capsDrv.dwSize = sizeof(capsDrv); - ddrval = g_lpdd->lpVtbl->GetCaps(g_lpdd,&capsDrv, NULL); - if (FAILED(ddrval)) - { - mp_msg(MSGT_VO, MSGL_ERR ,"failed getting ddrawcaps\n"); - return 1; - } - if (!(capsDrv.dwCaps & DDCAPS_OVERLAY)) - { - mp_msg(MSGT_VO, MSGL_ERR ,"Your card doesn't support overlay\n"); - return 1; - } - mp_msg(MSGT_VO, MSGL_V ,"testing supported overlay pixelformats\n"); + DDCAPS capsDrv = { .dwSize = sizeof(capsDrv) }; + HRESULT ddrval; + DDSURFACEDESC2 ddsdOverlay = { + .dwSize = sizeof(ddsdOverlay), + .ddsCaps.dwCaps = DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY, + .dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT, + .dwWidth = 300, + .dwHeight = 280, + }; + uint32_t i; + uint32_t formatcount = 0; + ddsdOverlay.dwBackBufferCount = 0; + //get driver caps to determine overlay support + ddrval = g_lpdd->lpVtbl->GetCaps(g_lpdd, &capsDrv, NULL); + if (FAILED(ddrval)) { + mp_msg(MSGT_VO, MSGL_ERR, "failed getting ddrawcaps\n"); + return 1; + } + if (!(capsDrv.dwCaps & DDCAPS_OVERLAY)) { + mp_msg(MSGT_VO, MSGL_ERR, "Your card doesn't support overlay\n"); + return 1; + } + mp_msg(MSGT_VO, MSGL_V, "testing supported overlay pixelformats\n"); //it is not possible to query for pixel formats supported by the //overlay hardware: try out various formats till one works - ZeroMemory(&ddsdOverlay, sizeof(ddsdOverlay)); - ddsdOverlay.dwSize = sizeof(ddsdOverlay); - ddsdOverlay.ddsCaps.dwCaps=DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY; - ddsdOverlay.dwFlags= DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH| DDSD_PIXELFORMAT; - ddsdOverlay.dwWidth=300; - ddsdOverlay.dwHeight=280; - ddsdOverlay.dwBackBufferCount=0; //try to create an overlay surface using one of the pixel formats in our global list - i=0; - do - { - ddsdOverlay.ddpfPixelFormat=g_ddpf[i].g_ddpfOverlay; - ddrval = g_lpdd->lpVtbl->CreateSurface(g_lpdd,&ddsdOverlay, &g_lpddsOverlay, NULL); - if (ddrval == DD_OK) - { - mp_msg(MSGT_VO, MSGL_V ,"%i %s supported\n",i,g_ddpf[i].img_format_name); - g_ddpf[i].drv_caps = VFCAP_CSP_SUPPORTED |VFCAP_OSD |VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP; - formatcount++;} - else mp_msg(MSGT_VO, MSGL_V ,"%i %s not supported\n",i,g_ddpf[i].img_format_name); - if (g_lpddsOverlay != NULL) {g_lpddsOverlay->lpVtbl->Release(g_lpddsOverlay);g_lpddsOverlay = NULL;} - } while( ++i < NUM_FORMATS ); - mp_msg(MSGT_VO, MSGL_V ,"Your card supports %i of %i overlayformats\n",formatcount, NUM_FORMATS); - if (formatcount == 0) - { - mp_msg(MSGT_VO, MSGL_V ,"Your card supports overlay, but we couldn't create one\n"); - mp_msg(MSGT_VO, MSGL_V ,"This can have the following reasons:\n"); - mp_msg(MSGT_VO, MSGL_V ,"- you are already using an overlay with another app\n"); - mp_msg(MSGT_VO, MSGL_V ,"- you don't have enough videomemory\n"); - mp_msg(MSGT_VO, MSGL_V ,"- vo_directx doesn't support the cards overlay pixelformat\n"); - return 1; - } - if(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYMIRRORLEFTRIGHT)mp_msg(MSGT_VO, MSGL_V ,"can mirror left right\n"); //I don't have hardware which - if(capsDrv.dwFXCaps & DDFXCAPS_OVERLAYMIRRORUPDOWN )mp_msg(MSGT_VO, MSGL_V ,"can mirror up down\n"); //supports those send me one and I'll implement ;) - return 0; + for (i = 0; i < NUM_FORMATS; i++) { + ddsdOverlay.ddpfPixelFormat = g_ddpf[i].g_ddpfOverlay; + ddrval = g_lpdd->lpVtbl->CreateSurface(g_lpdd, &ddsdOverlay, &g_lpddsOverlay, NULL); + if (ddrval == DD_OK) { + mp_msg(MSGT_VO, MSGL_V, "%i %s supported\n", i, g_ddpf[i].img_format_name); + drv_caps[i] = VFCAP_CSP_SUPPORTED | VFCAP_OSD | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP; + formatcount++; + } else + mp_msg(MSGT_VO, MSGL_V, "%i %s not supported\n", i, g_ddpf[i].img_format_name); + if (g_lpddsOverlay) { + g_lpddsOverlay->lpVtbl->Release(g_lpddsOverlay); + g_lpddsOverlay = NULL; + } + } + mp_msg(MSGT_VO, MSGL_V, "Your card supports %i of %i overlayformats\n", formatcount, NUM_FORMATS); + if (formatcount == 0) { + mp_msg(MSGT_VO, MSGL_V, "Your card supports overlay, but we couldn't create one\n"); + mp_msg(MSGT_VO, MSGL_V, "This can have the following reasons:\n"); + mp_msg(MSGT_VO, MSGL_V, "- you are already using an overlay with another app\n"); + mp_msg(MSGT_VO, MSGL_V, "- you don't have enough videomemory\n"); + mp_msg(MSGT_VO, MSGL_V, "- vo_directx doesn't support the cards overlay pixelformat\n"); + return 1; + } + if (capsDrv.dwFXCaps & DDFXCAPS_OVERLAYMIRRORLEFTRIGHT) + mp_msg(MSGT_VO, MSGL_V, "can mirror left right\n"); //I don't have hardware which + if (capsDrv.dwFXCaps & DDFXCAPS_OVERLAYMIRRORUPDOWN) + mp_msg(MSGT_VO, MSGL_V, "can mirror up down\n"); //supports those send me one and I'll implement ;) + return 0; } //find out the Pixelformat of the Primary Surface static uint32_t Directx_CheckPrimaryPixelformat(void) { - uint32_t i=0; + int i; uint32_t formatcount = 0; - DDPIXELFORMAT ddpf; - DDSURFACEDESC2 ddsd; - HDC hdc; - HRESULT hres; - COLORREF rgbT=RGB(0,0,0); - mp_msg(MSGT_VO, MSGL_V ,"checking primary surface\n"); - memset( &ddpf, 0, sizeof( DDPIXELFORMAT )); - ddpf.dwSize = sizeof( DDPIXELFORMAT ); + DDPIXELFORMAT ddpf = { .dwSize = sizeof(ddpf) }; + DDSURFACEDESC2 ddsd; + HDC hdc; + HRESULT hres; + COLORREF rgbT = RGB(0, 0, 0); + mp_msg(MSGT_VO, MSGL_V, "checking primary surface\n"); //we have to create a primary surface first - if(Directx_CreatePrimarySurface()!=0)return 1; - if(g_lpddsPrimary->lpVtbl->GetPixelFormat( g_lpddsPrimary, &ddpf ) != DD_OK ) - { - mp_msg(MSGT_VO, MSGL_FATAL ,"can't get pixelformat\n"); - return 1; - } - while ( i < NUM_FORMATS ) - { - if (g_ddpf[i].g_ddpfOverlay.dwRGBBitCount == ddpf.dwRGBBitCount) - { - if (g_ddpf[i].g_ddpfOverlay.dwRBitMask == ddpf.dwRBitMask) - { - mp_msg(MSGT_VO, MSGL_V ,"%i %s supported\n",i,g_ddpf[i].img_format_name); - g_ddpf[i].drv_caps = VFCAP_CSP_SUPPORTED |VFCAP_OSD; - formatcount++; - primary_image_format=g_ddpf[i].img_format; - } - } - i++; + if (Directx_CreatePrimarySurface() != 0) + return 1; + if (g_lpddsPrimary->lpVtbl->GetPixelFormat(g_lpddsPrimary, &ddpf) != DD_OK) { + mp_msg(MSGT_VO, MSGL_FATAL, "can't get pixelformat\n"); + return 1; + } + for (i = 0; i < NUM_FORMATS; i++) { + if (g_ddpf[i].g_ddpfOverlay.dwRGBBitCount == ddpf.dwRGBBitCount) { + if (g_ddpf[i].g_ddpfOverlay.dwRBitMask == ddpf.dwRBitMask) { + mp_msg(MSGT_VO, MSGL_V, "%i %s supported\n", i, g_ddpf[i].img_format_name); + drv_caps[i] = VFCAP_CSP_SUPPORTED | VFCAP_OSD; + formatcount++; + primary_image_format = g_ddpf[i].img_format; + } + } } //get the colorkey for overlay mode - destcolorkey = CLR_INVALID; - if (windowcolor != CLR_INVALID && g_lpddsPrimary->lpVtbl->GetDC(g_lpddsPrimary,&hdc) == DD_OK) - { + destcolorkey = CLR_INVALID; + if (windowcolor != CLR_INVALID && g_lpddsPrimary->lpVtbl->GetDC(g_lpddsPrimary, &hdc) == DD_OK) { rgbT = GetPixel(hdc, 0, 0); SetPixel(hdc, 0, 0, windowcolor); - g_lpddsPrimary->lpVtbl->ReleaseDC(g_lpddsPrimary,hdc); + g_lpddsPrimary->lpVtbl->ReleaseDC(g_lpddsPrimary, hdc); } // read back the converted color ddsd.dwSize = sizeof(ddsd); - while ((hres = g_lpddsPrimary->lpVtbl->Lock(g_lpddsPrimary,NULL, &ddsd, 0, NULL)) == DDERR_WASSTILLDRAWING) + while ((hres = g_lpddsPrimary->lpVtbl->Lock(g_lpddsPrimary, NULL, &ddsd, 0, NULL)) == DDERR_WASSTILLDRAWING) ; - if (hres == DD_OK) - { - destcolorkey = *(DWORD *) ddsd.lpSurface; + if (hres == DD_OK) { + destcolorkey = *(DWORD *)ddsd.lpSurface; if (ddsd.ddpfPixelFormat.dwRGBBitCount < 32) destcolorkey &= (1 << ddsd.ddpfPixelFormat.dwRGBBitCount) - 1; - g_lpddsPrimary->lpVtbl->Unlock(g_lpddsPrimary,NULL); + g_lpddsPrimary->lpVtbl->Unlock(g_lpddsPrimary, NULL); } - if (windowcolor != CLR_INVALID && g_lpddsPrimary->lpVtbl->GetDC(g_lpddsPrimary,&hdc) == DD_OK) - { + if (windowcolor != CLR_INVALID && g_lpddsPrimary->lpVtbl->GetDC(g_lpddsPrimary, &hdc) == DD_OK) { SetPixel(hdc, 0, 0, rgbT); - g_lpddsPrimary->lpVtbl->ReleaseDC(g_lpddsPrimary,hdc); + g_lpddsPrimary->lpVtbl->ReleaseDC(g_lpddsPrimary, hdc); } - //release primary - g_lpddsPrimary->lpVtbl->Release(g_lpddsPrimary); - g_lpddsPrimary = NULL; - if(formatcount==0) - { - mp_msg(MSGT_VO, MSGL_FATAL ,"Unknown Pixelformat\n"); - return 1; - } - return 0; + //release primary + g_lpddsPrimary->lpVtbl->Release(g_lpddsPrimary); + g_lpddsPrimary = NULL; + if (formatcount == 0) { + mp_msg(MSGT_VO, MSGL_FATAL, "Unknown Pixelformat\n"); + return 1; + } + return 0; } static int preinit(const char *arg) { - if(arg) - { - if(strstr(arg,"noaccel")) - { - mp_msg(MSGT_VO,MSGL_V,"disabled overlay\n"); - nooverlay = 1; - } - } + if (arg) { + if (strstr(arg, "noaccel")) { + mp_msg(MSGT_VO, MSGL_V, "disabled overlay\n"); + nooverlay = 1; + } + } windowcolor = vo_colorkey; - colorbrush = CreateSolidBrush(windowcolor); - blackbrush = (HBRUSH)GetStockObject(BLACK_BRUSH); - if (!vo_w32_init()) - return 1; - if (!vo_w32_config(100, 100, VOFLAG_HIDDEN)) - return 1; - - if (Directx_InitDirectDraw()!= 0)return 1; //init DirectDraw - - if (Directx_CheckPrimaryPixelformat()!=0)return 1; - if (!nooverlay && Directx_CheckOverlayPixelformats() == 0) //check for supported hardware - { - mp_msg(MSGT_VO, MSGL_V ,"hardware supports overlay\n"); - nooverlay = 0; - } - else //if we can't have overlay we create a backpuffer with the same imageformat as the primary surface - { - mp_msg(MSGT_VO, MSGL_V ,"using backpuffer\n"); - nooverlay = 1; - } - mp_msg(MSGT_VO, MSGL_DBG3 ,"preinit succesfully finished\n"); - return 0; + colorbrush = CreateSolidBrush(windowcolor); + blackbrush = (HBRUSH)GetStockObject(BLACK_BRUSH); + if (!vo_w32_init()) + return 1; + if (!vo_w32_config(100, 100, VOFLAG_HIDDEN)) + return 1; + + if (Directx_InitDirectDraw() != 0) + return 1; //init DirectDraw + + if (Directx_CheckPrimaryPixelformat() != 0) + return 1; + if (!nooverlay && Directx_CheckOverlayPixelformats() == 0) { //check for supported hardware + mp_msg(MSGT_VO, MSGL_V, "hardware supports overlay\n"); + nooverlay = 0; + } else { //if we can't have overlay we create a backpuffer with the same imageformat as the primary surface + mp_msg(MSGT_VO, MSGL_V, "using backpuffer\n"); + nooverlay = 1; + } + mp_msg(MSGT_VO, MSGL_DBG3, "preinit succesfully finished\n"); + return 0; } -static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y ) +static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y) { - uint8_t *s; + uint8_t *s; uint8_t *d; - uint32_t uvstride=dstride/2; - // copy Y - d=image+dstride*y+x; - s=src[0]; - mem2agpcpy_pic(d,s,w,h,dstride,stride[0]); - - w/=2;h/=2;x/=2;y/=2; - - // copy U - d=image+dstride*image_height + uvstride*y+x; - if(image_format == IMGFMT_YV12)s=src[2]; - else s=src[1]; - mem2agpcpy_pic(d,s,w,h,uvstride,stride[1]); - - // copy V - d=image+dstride*image_height +uvstride*(image_height/2) + uvstride*y+x; - if(image_format == IMGFMT_YV12)s=src[1]; - else s=src[2]; - mem2agpcpy_pic(d,s,w,h,uvstride,stride[2]); + uint32_t uvstride = dstride / 2; + // copy Y + d = image + dstride * y + x; + s = src[0]; + mem2agpcpy_pic(d, s, w, h, dstride, stride[0]); + + w /= 2; + h /= 2; + x /= 2; + y /= 2; + + // copy U + d = image + dstride * image_height + uvstride * y + x; + if (image_format == IMGFMT_YV12) + s = src[2]; + else + s = src[1]; + mem2agpcpy_pic(d, s, w, h, uvstride, stride[1]); + + // copy V + d = image + dstride * image_height + uvstride * (image_height / 2) + uvstride * y + x; + if (image_format == IMGFMT_YV12) + s = src[1]; + else + s = src[2]; + mem2agpcpy_pic(d, s, w, h, uvstride, stride[2]); return 0; } static void flip_page(void) { - HRESULT dxresult; - g_lpddsBack->lpVtbl->Unlock (g_lpddsBack,NULL); - if (vo_doublebuffering) - { - // flip to the next image in the sequence - dxresult = g_lpddsOverlay->lpVtbl->Flip( g_lpddsOverlay,NULL, DDFLIP_WAIT); - if(dxresult == DDERR_SURFACELOST) - { - mp_msg(MSGT_VO, MSGL_ERR,"Restoring Surface\n"); - g_lpddsBack->lpVtbl->Restore( g_lpddsBack ); - // restore overlay and primary before calling - // Directx_ManageDisplay() to avoid error messages - g_lpddsOverlay->lpVtbl->Restore( g_lpddsOverlay ); - g_lpddsPrimary->lpVtbl->Restore( g_lpddsPrimary ); - // update overlay in case we return from screensaver - Directx_ManageDisplay(); - dxresult = g_lpddsOverlay->lpVtbl->Flip( g_lpddsOverlay,NULL, DDFLIP_WAIT); - } - if(dxresult != DD_OK)mp_msg(MSGT_VO, MSGL_ERR,"can't flip page\n"); - } - if(nooverlay) - { - DDBLTFX ddbltfx; + HRESULT dxresult; + g_lpddsBack->lpVtbl->Unlock(g_lpddsBack, NULL); + if (vo_doublebuffering) { + // flip to the next image in the sequence + dxresult = g_lpddsOverlay->lpVtbl->Flip(g_lpddsOverlay, NULL, DDFLIP_WAIT); + if (dxresult == DDERR_SURFACELOST) { + mp_msg(MSGT_VO, MSGL_ERR, "Restoring Surface\n"); + g_lpddsBack->lpVtbl->Restore(g_lpddsBack); + // restore overlay and primary before calling + // Directx_ManageDisplay() to avoid error messages + g_lpddsOverlay->lpVtbl->Restore(g_lpddsOverlay); + g_lpddsPrimary->lpVtbl->Restore(g_lpddsPrimary); + // update overlay in case we return from screensaver + Directx_ManageDisplay(); + dxresult = g_lpddsOverlay->lpVtbl->Flip(g_lpddsOverlay, NULL, DDFLIP_WAIT); + } + if (dxresult != DD_OK) + mp_msg(MSGT_VO, MSGL_ERR, "can't flip page\n"); + } + if (nooverlay) { // ask for the "NOTEARING" option - memset( &ddbltfx, 0, sizeof(DDBLTFX) ); - ddbltfx.dwSize = sizeof(DDBLTFX); - ddbltfx.dwDDFX = DDBLTFX_NOTEARING; + DDBLTFX ddbltfx = { + .dwSize = sizeof(ddbltfx), + .dwDDFX = DDBLTFX_NOTEARING, + }; g_lpddsPrimary->lpVtbl->Blt(g_lpddsPrimary, &rd, g_lpddsBack, NULL, DDBLT_WAIT, &ddbltfx); - } - if (g_lpddsBack->lpVtbl->Lock(g_lpddsBack,NULL,&ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT , NULL) == DD_OK) { - if(vo_directrendering && (dstride != ddsdsf.lPitch)){ - mp_msg(MSGT_VO,MSGL_WARN,"stride changed !!!! disabling direct rendering\n"); - vo_directrendering=0; - } - free(tmp_image); - tmp_image = NULL; - dstride = ddsdsf.lPitch; - image = ddsdsf.lpSurface; - } else if (!tmp_image) { - mp_msg(MSGT_VO, MSGL_WARN, "Locking the surface failed, rendering to a hidden surface!\n"); - tmp_image = image = calloc(1, image_height * dstride * 2); - } + } + if (g_lpddsBack->lpVtbl->Lock(g_lpddsBack, NULL, &ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT, NULL) == DD_OK) { + if (vo_directrendering && (dstride != ddsdsf.lPitch)) { + mp_msg(MSGT_VO, MSGL_WARN, "stride changed !!!! disabling direct rendering\n"); + vo_directrendering = 0; + } + free(tmp_image); + tmp_image = NULL; + dstride = ddsdsf.lPitch; + image = ddsdsf.lpSurface; + } else if (!tmp_image) { + mp_msg(MSGT_VO, MSGL_WARN, "Locking the surface failed, rendering to a hidden surface!\n"); + tmp_image = image = calloc(1, image_height * dstride * 2); + } } static int draw_frame(uint8_t *src[]) { - fast_memcpy( image, *src, dstride * image_height ); - return 0; + fast_memcpy(image, *src, dstride * image_height); + return 0; } static uint32_t get_image(mp_image_t *mpi) { - if(mpi->flags&MP_IMGFLAG_READABLE) {mp_msg(MSGT_VO, MSGL_V,"slow video ram\n");return VO_FALSE;} - if(mpi->type==MP_IMGTYPE_STATIC) {mp_msg(MSGT_VO, MSGL_V,"not static\n");return VO_FALSE;} - if((mpi->width==dstride) || (mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH))) - { - if(mpi->flags&MP_IMGFLAG_PLANAR) - { - if(image_format == IMGFMT_YV12) - { - mpi->planes[2]= image + dstride*image_height; - mpi->planes[1]= image + dstride*image_height+ dstride*image_height/4; - mpi->stride[1]=mpi->stride[2]=dstride/2; - } - else if(image_format == IMGFMT_IYUV || image_format == IMGFMT_I420) - { - mpi->planes[1]= image + dstride*image_height; - mpi->planes[2]= image + dstride*image_height+ dstride*image_height/4; - mpi->stride[1]=mpi->stride[2]=dstride/2; - } - else if(image_format == IMGFMT_YVU9) - { - mpi->planes[2] = image + dstride*image_height; - mpi->planes[1] = image + dstride*image_height+ dstride*image_height/16; - mpi->stride[1]=mpi->stride[2]=dstride/4; - } - } - mpi->planes[0]=image; - mpi->stride[0]=dstride; - mpi->width=image_width; - mpi->height=image_height; - mpi->flags|=MP_IMGFLAG_DIRECT; + if (mpi->flags & MP_IMGFLAG_READABLE) { + mp_msg(MSGT_VO, MSGL_V, "slow video ram\n"); + return VO_FALSE; + } + if (mpi->type == MP_IMGTYPE_STATIC) { + mp_msg(MSGT_VO, MSGL_V, "not static\n"); + return VO_FALSE; + } + if (mpi->width == dstride || (mpi->flags & (MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_ACCEPT_WIDTH))) { + if (mpi->flags & MP_IMGFLAG_PLANAR) { + if (image_format == IMGFMT_YV12) { + mpi->planes[2] = image + dstride * image_height; + mpi->planes[1] = image + dstride * image_height + dstride * image_height / 4; + mpi->stride[1] = mpi->stride[2] = dstride / 2; + } else if (image_format == IMGFMT_IYUV || image_format == IMGFMT_I420) { + mpi->planes[1] = image + dstride * image_height; + mpi->planes[2] = image + dstride * image_height + dstride * image_height / 4; + mpi->stride[1] = mpi->stride[2] = dstride / 2; + } else if (image_format == IMGFMT_YVU9) { + mpi->planes[2] = image + dstride * image_height; + mpi->planes[1] = image + dstride * image_height + dstride * image_height / 16; + mpi->stride[1] = mpi->stride[2] = dstride / 4; + } + } + mpi->planes[0] = image; + mpi->stride[0] = dstride; + mpi->width = image_width; + mpi->height = image_height; + mpi->flags |= MP_IMGFLAG_DIRECT; mp_msg(MSGT_VO, MSGL_DBG3, "Direct Rendering ENABLED\n"); return VO_TRUE; } return VO_FALSE; } -static uint32_t put_image(mp_image_t *mpi){ - - uint8_t *d; - uint8_t *s; +static uint32_t put_image(mp_image_t *mpi) +{ + uint8_t *d; + uint8_t *s; uint32_t x = mpi->x; - uint32_t y = mpi->y; - uint32_t w = mpi->w; - uint32_t h = mpi->h; - - if((mpi->flags&MP_IMGFLAG_DIRECT)||(mpi->flags&MP_IMGFLAG_DRAW_CALLBACK)) - { - mp_msg(MSGT_VO, MSGL_DBG3 ,"put_image: nothing to do: drawslices\n"); - return VO_TRUE; - } - - if (mpi->flags&MP_IMGFLAG_PLANAR) - { - - if(image_format!=IMGFMT_YVU9)draw_slice(mpi->planes,mpi->stride,mpi->w,mpi->h,0,0); - else - { - // copy Y - d=image+dstride*y+x; - s=mpi->planes[0]; - mem2agpcpy_pic(d,s,w,h,dstride,mpi->stride[0]); - w/=4;h/=4;x/=4;y/=4; - // copy V - d=image+dstride*image_height + dstride*y/4+x; - s=mpi->planes[2]; - mem2agpcpy_pic(d,s,w,h,dstride/4,mpi->stride[1]); - // copy U - d=image+dstride*image_height + dstride*image_height/16 + dstride/4*y+x; - s=mpi->planes[1]; - mem2agpcpy_pic(d,s,w,h,dstride/4,mpi->stride[2]); - } - } - else //packed - { - mem2agpcpy_pic(image, mpi->planes[0], w * (mpi->bpp / 8), h, dstride, mpi->stride[0]); - } - return VO_TRUE; -} - -static int -config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t options, char *title, uint32_t format) -{ - image_format = format; - image_width = width; - image_height = height; - if(format != primary_image_format)nooverlay = 0; + uint32_t y = mpi->y; + uint32_t w = mpi->w; + uint32_t h = mpi->h; + + if ((mpi->flags & MP_IMGFLAG_DIRECT) || (mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)) { + mp_msg(MSGT_VO, MSGL_DBG3, "put_image: nothing to do: drawslices\n"); + return VO_TRUE; + } + + if (mpi->flags & MP_IMGFLAG_PLANAR) { + if (image_format != IMGFMT_YVU9) + draw_slice(mpi->planes, mpi->stride, mpi->w, mpi->h, 0, 0); + else { + // copy Y + d = image + dstride * y + x; + s = mpi->planes[0]; + mem2agpcpy_pic(d, s, w, h, dstride, mpi->stride[0]); + w /= 4; + h /= 4; + x /= 4; + y /= 4; + // copy V + d = image + dstride * image_height + dstride * y / 4 + x; + s = mpi->planes[2]; + mem2agpcpy_pic(d, s, w, h, dstride / 4, mpi->stride[1]); + // copy U + d = image + dstride * image_height + dstride * image_height / 16 + dstride / 4 * y + x; + s = mpi->planes[1]; + mem2agpcpy_pic(d, s, w, h, dstride / 4, mpi->stride[2]); + } + } else { //packed + mem2agpcpy_pic(image, mpi->planes[0], w * (mpi->bpp / 8), h, dstride, mpi->stride[0]); + } + return VO_TRUE; +} + +static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t options, char *title, uint32_t format) +{ + image_format = format; + image_width = width; + image_height = height; + if (format != primary_image_format) + nooverlay = 0; /*release all directx objects*/ - if (g_cc != NULL)g_cc->lpVtbl->Release(g_cc); - g_cc=NULL; - if(g_lpddclipper)g_lpddclipper->lpVtbl->Release(g_lpddclipper); - g_lpddclipper=NULL; - if (g_lpddsBack != NULL) g_lpddsBack->lpVtbl->Release(g_lpddsBack); + if (g_cc) + g_cc->lpVtbl->Release(g_cc); + g_cc = NULL; + if (g_lpddclipper) + g_lpddclipper->lpVtbl->Release(g_lpddclipper); + g_lpddclipper = NULL; + if (g_lpddsBack) + g_lpddsBack->lpVtbl->Release(g_lpddsBack); g_lpddsBack = NULL; - if(vo_doublebuffering) - if (g_lpddsOverlay != NULL)g_lpddsOverlay->lpVtbl->Release(g_lpddsOverlay); + if (vo_doublebuffering) + if (g_lpddsOverlay) + g_lpddsOverlay->lpVtbl->Release(g_lpddsOverlay); g_lpddsOverlay = NULL; - if (g_lpddsPrimary != NULL) g_lpddsPrimary->lpVtbl->Release(g_lpddsPrimary); + if (g_lpddsPrimary) + g_lpddsPrimary->lpVtbl->Release(g_lpddsPrimary); g_lpddsPrimary = NULL; - mp_msg(MSGT_VO, MSGL_DBG3,"overlay surfaces released\n"); + mp_msg(MSGT_VO, MSGL_DBG3, "overlay surfaces released\n"); - if (!vo_w32_config(d_width, d_height, options)) - return 1; + if (!vo_w32_config(d_width, d_height, options)) + return 1; - if (WinID == -1) - SetWindowText(vo_w32_window,title); + /*create the surfaces*/ + if (Directx_CreatePrimarySurface()) + return 1; + //create palette for 256 color mode + if (image_format == IMGFMT_BGR8) { + LPDIRECTDRAWPALETTE ddpalette = NULL; + LPPALETTEENTRY palette = calloc(256, sizeof(*palette)); + int i; + for (i = 0; i < 256; i++) { + palette[i].peRed = ((i >> 5) & 0x07) * 255 / 7; + palette[i].peGreen = ((i >> 2) & 0x07) * 255 / 7; + palette[i].peBlue = ((i >> 0) & 0x03) * 255 / 3; + palette[i].peFlags = PC_NOCOLLAPSE; + } + g_lpdd->lpVtbl->CreatePalette(g_lpdd, DDPCAPS_8BIT | DDPCAPS_INITIALIZE, palette, &ddpalette, NULL); + g_lpddsPrimary->lpVtbl->SetPalette(g_lpddsPrimary, ddpalette); + free(palette); + ddpalette->lpVtbl->Release(ddpalette); + } - /*create the surfaces*/ - if(Directx_CreatePrimarySurface())return 1; - - //create palette for 256 color mode - if(image_format==IMGFMT_BGR8){ - LPDIRECTDRAWPALETTE ddpalette=NULL; - LPPALETTEENTRY palette=calloc(256, sizeof(*palette)); - int i; - for(i=0; i<256; i++){ - palette[i].peRed = ((i >> 5) & 0x07) * 255 / 7; - palette[i].peGreen = ((i >> 2) & 0x07) * 255 / 7; - palette[i].peBlue = ((i >> 0) & 0x03) * 255 / 3; - palette[i].peFlags = PC_NOCOLLAPSE; - } - g_lpdd->lpVtbl->CreatePalette(g_lpdd,DDPCAPS_8BIT|DDPCAPS_INITIALIZE,palette,&ddpalette,NULL); - g_lpddsPrimary->lpVtbl->SetPalette(g_lpddsPrimary,ddpalette); - free(palette); - ddpalette->lpVtbl->Release(ddpalette); - } - - if (!nooverlay && Directx_CreateOverlay(image_format)) - { - if(format == primary_image_format)nooverlay=1; /*overlay creation failed*/ - else { - mp_msg(MSGT_VO, MSGL_FATAL,"can't use overlay mode: please use -vo directx:noaccel\n"); - return 1; - } - } - if(nooverlay) - { - if(Directx_CreateBackpuffer()) - { - mp_msg(MSGT_VO, MSGL_FATAL,"can't get the driver to work on your system :(\n"); - return 1; - } - mp_msg(MSGT_VO, MSGL_V,"back surface created\n"); - vo_doublebuffering = 0; - /*create clipper for nonoverlay mode*/ - if(g_lpdd->lpVtbl->CreateClipper(g_lpdd, 0, &g_lpddclipper,NULL)!= DD_OK){mp_msg(MSGT_VO, MSGL_FATAL,"can't create clipper\n");return 1;} - if(g_lpddclipper->lpVtbl->SetHWnd (g_lpddclipper, 0, vo_w32_window)!= DD_OK){mp_msg(MSGT_VO, MSGL_FATAL,"can't associate clipper with window\n");return 1;} - if(g_lpddsPrimary->lpVtbl->SetClipper (g_lpddsPrimary,g_lpddclipper)!=DD_OK){mp_msg(MSGT_VO, MSGL_FATAL,"can't associate primary surface with clipper\n");return 1;} - mp_msg(MSGT_VO, MSGL_DBG3,"clipper succesfully created\n"); - }else{ - if(DD_OK != g_lpddsOverlay->lpVtbl->QueryInterface(g_lpddsOverlay,&IID_IDirectDrawColorControl,(void**)&g_cc)) - mp_msg(MSGT_VO, MSGL_V,"unable to get DirectDraw ColorControl interface\n"); - } - Directx_ManageDisplay(); - memset(&ddsdsf, 0,sizeof(DDSURFACEDESC2)); - ddsdsf.dwSize = sizeof (DDSURFACEDESC2); - if (g_lpddsBack->lpVtbl->Lock(g_lpddsBack,NULL,&ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT, NULL) == DD_OK) { + if (!nooverlay && Directx_CreateOverlay(image_format)) { + if (format == primary_image_format) + nooverlay = 1; /*overlay creation failed*/ + else { + mp_msg(MSGT_VO, MSGL_FATAL, "can't use overlay mode: please use -vo directx:noaccel\n"); + return 1; + } + } + if (nooverlay) { + if (Directx_CreateBackpuffer()) { + mp_msg(MSGT_VO, MSGL_FATAL, "can't get the driver to work on your system :(\n"); + return 1; + } + mp_msg(MSGT_VO, MSGL_V, "back surface created\n"); + vo_doublebuffering = 0; + /*create clipper for nonoverlay mode*/ + if (g_lpdd->lpVtbl->CreateClipper(g_lpdd, 0, &g_lpddclipper, NULL) != DD_OK) { + mp_msg(MSGT_VO, MSGL_FATAL, "can't create clipper\n"); + return 1; + } + if (g_lpddclipper->lpVtbl->SetHWnd(g_lpddclipper, 0, vo_w32_window) != DD_OK) { + mp_msg(MSGT_VO, MSGL_FATAL, "can't associate clipper with window\n"); + return 1; + } + if (g_lpddsPrimary->lpVtbl->SetClipper(g_lpddsPrimary, g_lpddclipper) != DD_OK) { + mp_msg(MSGT_VO, MSGL_FATAL, "can't associate primary surface with clipper\n"); + return 1; + } + mp_msg(MSGT_VO, MSGL_DBG3, "clipper succesfully created\n"); + } else { + if (DD_OK != g_lpddsOverlay->lpVtbl->QueryInterface(g_lpddsOverlay, &IID_IDirectDrawColorControl, (void **)&g_cc)) + mp_msg(MSGT_VO, MSGL_V, "unable to get DirectDraw ColorControl interface\n"); + } + Directx_ManageDisplay(); + memset(&ddsdsf, 0, sizeof(DDSURFACEDESC2)); + ddsdsf.dwSize = sizeof(DDSURFACEDESC2); + if (g_lpddsBack->lpVtbl->Lock(g_lpddsBack, NULL, &ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT, NULL) == DD_OK) { dstride = ddsdsf.lPitch; - image = ddsdsf.lpSurface; + image = ddsdsf.lpSurface; return 0; - } - mp_msg(MSGT_VO, MSGL_V, "Initial Lock on the Surface failed.\n"); - return 1; + } + mp_msg(MSGT_VO, MSGL_V, "Initial Lock on the Surface failed.\n"); + return 1; } //function to set color controls @@ -1064,121 +1032,114 @@ // saturation [0, 20000] static uint32_t color_ctrl_set(const char *what, int value) { - uint32_t r = VO_NOTIMPL; - DDCOLORCONTROL dcc; - //printf("\n*** %s = %d\n", what, value); - if (!g_cc) { - //printf("\n *** could not get color control interface!!!\n"); - return VO_NOTIMPL; - } - ZeroMemory(&dcc, sizeof(dcc)); - dcc.dwSize = sizeof(dcc); - - if (!strcmp(what, "brightness")) { - dcc.dwFlags = DDCOLOR_BRIGHTNESS; - dcc.lBrightness = (value + 100) * 10000 / 200; - r = VO_TRUE; - } else if (!strcmp(what, "contrast")) { - dcc.dwFlags = DDCOLOR_CONTRAST; - dcc.lContrast = (value + 100) * 20000 / 200; - r = VO_TRUE; - } else if (!strcmp(what, "hue")) { - dcc.dwFlags = DDCOLOR_HUE; - dcc.lHue = value * 180 / 100; - r = VO_TRUE; - } else if (!strcmp(what, "saturation")) { - dcc.dwFlags = DDCOLOR_SATURATION; - dcc.lSaturation = (value + 100) * 20000 / 200; - r = VO_TRUE; - } - - if (r == VO_TRUE) { - g_cc->lpVtbl->SetColorControls(g_cc, &dcc); - } - return r; + uint32_t r = VO_NOTIMPL; + DDCOLORCONTROL dcc = { .dwSize = sizeof(dcc) }; + //printf("\n*** %s = %d\n", what, value); + if (!g_cc) { + //printf("\n *** could not get color control interface!!!\n"); + return VO_NOTIMPL; + } + + if (!strcmp(what, "brightness")) { + dcc.dwFlags = DDCOLOR_BRIGHTNESS; + dcc.lBrightness = (value + 100) * 10000 / 200; + r = VO_TRUE; + } else if (!strcmp(what, "contrast")) { + dcc.dwFlags = DDCOLOR_CONTRAST; + dcc.lContrast = (value + 100) * 20000 / 200; + r = VO_TRUE; + } else if (!strcmp(what, "hue")) { + dcc.dwFlags = DDCOLOR_HUE; + dcc.lHue = value * 180 / 100; + r = VO_TRUE; + } else if (!strcmp(what, "saturation")) { + dcc.dwFlags = DDCOLOR_SATURATION; + dcc.lSaturation = (value + 100) * 20000 / 200; + r = VO_TRUE; + } + + if (r == VO_TRUE) { + g_cc->lpVtbl->SetColorControls(g_cc, &dcc); + } + return r; } //analoguous to color_ctrl_set static uint32_t color_ctrl_get(const char *what, int *value) { - uint32_t r = VO_NOTIMPL; - DDCOLORCONTROL dcc; - if (!g_cc) { - //printf("\n *** could not get color control interface!!!\n"); - return VO_NOTIMPL; - } - ZeroMemory(&dcc, sizeof(dcc)); - dcc.dwSize = sizeof(dcc); - - if (g_cc->lpVtbl->GetColorControls(g_cc, &dcc) != DD_OK) { - return r; - } - - if (!strcmp(what, "brightness") && (dcc.dwFlags & DDCOLOR_BRIGHTNESS)) { - *value = dcc.lBrightness * 200 / 10000 - 100; - r = VO_TRUE; - } else if (!strcmp(what, "contrast") && (dcc.dwFlags & DDCOLOR_CONTRAST)) { - *value = dcc.lContrast * 200 / 20000 - 100; - r = VO_TRUE; - } else if (!strcmp(what, "hue") && (dcc.dwFlags & DDCOLOR_HUE)) { - *value = dcc.lHue * 100 / 180; - r = VO_TRUE; - } else if (!strcmp(what, "saturation") && (dcc.dwFlags & DDCOLOR_SATURATION)) { - *value = dcc.lSaturation * 200 / 20000 - 100; - r = VO_TRUE; - } + uint32_t r = VO_NOTIMPL; + DDCOLORCONTROL dcc = { .dwSize = sizeof(dcc) }; + if (!g_cc) { + //printf("\n *** could not get color control interface!!!\n"); + return VO_NOTIMPL; + } + + if (g_cc->lpVtbl->GetColorControls(g_cc, &dcc) != DD_OK) { + return r; + } + + if (!strcmp(what, "brightness") && (dcc.dwFlags & DDCOLOR_BRIGHTNESS)) { + *value = dcc.lBrightness * 200 / 10000 - 100; + r = VO_TRUE; + } else if (!strcmp(what, "contrast") && (dcc.dwFlags & DDCOLOR_CONTRAST)) { + *value = dcc.lContrast * 200 / 20000 - 100; + r = VO_TRUE; + } else if (!strcmp(what, "hue") && (dcc.dwFlags & DDCOLOR_HUE)) { + *value = dcc.lHue * 100 / 180; + r = VO_TRUE; + } else if (!strcmp(what, "saturation") && (dcc.dwFlags & DDCOLOR_SATURATION)) { + *value = dcc.lSaturation * 200 / 20000 - 100; + r = VO_TRUE; + } // printf("\n*** %s = %d\n", what, *value); - return r; + return r; } static int control(uint32_t request, void *data) { switch (request) { - - case VOCTRL_GET_IMAGE: - return get_image(data); + case VOCTRL_GET_IMAGE: + return get_image(data); case VOCTRL_QUERY_FORMAT: - return query_format(*((uint32_t*)data)); - case VOCTRL_DRAW_IMAGE: + return query_format(*(uint32_t *)data); + case VOCTRL_DRAW_IMAGE: return put_image(data); case VOCTRL_BORDER: vo_w32_border(); Directx_ManageDisplay(); - return VO_TRUE; + return VO_TRUE; case VOCTRL_ONTOP: vo_w32_ontop(); - return VO_TRUE; + return VO_TRUE; case VOCTRL_ROOTWIN: - if(WinID != -1) return VO_TRUE; - if(vidmode) - { - mp_msg(MSGT_VO, MSGL_ERR,"rootwin has no meaning in exclusive mode\n"); - } - else - { - if(vo_rootwin) vo_rootwin = 0; - else vo_rootwin = 1; - Directx_ManageDisplay(); - } - return VO_TRUE; - case VOCTRL_FULLSCREEN: - { - vo_w32_fullscreen(); + if (WinID != -1) + return VO_TRUE; + if (vidmode) { + mp_msg(MSGT_VO, MSGL_ERR, "rootwin has no meaning in exclusive mode\n"); + } else { + if (vo_rootwin) + vo_rootwin = 0; + else + vo_rootwin = 1; Directx_ManageDisplay(); - return VO_TRUE; - } - case VOCTRL_SET_EQUALIZER: { - vf_equalizer_t *eq=data; - return color_ctrl_set(eq->item, eq->value); - } - case VOCTRL_GET_EQUALIZER: { - vf_equalizer_t *eq=data; - return color_ctrl_get(eq->item, &eq->value); - } + } + return VO_TRUE; + case VOCTRL_FULLSCREEN: + vo_w32_fullscreen(); + Directx_ManageDisplay(); + return VO_TRUE; + case VOCTRL_SET_EQUALIZER: { + vf_equalizer_t *eq = data; + return color_ctrl_set(eq->item, eq->value); + } + case VOCTRL_GET_EQUALIZER: { + vf_equalizer_t *eq = data; + return color_ctrl_get(eq->item, &eq->value); + } case VOCTRL_UPDATE_SCREENINFO: w32_update_xinerama_info(); return VO_TRUE; - }; + } return VO_NOTIMPL; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_dxr2.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_dxr2.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_dxr2.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_dxr2.c 2011-09-19 22:11:12.000000000 +0000 @@ -805,7 +805,6 @@ { // I'd like to have this done in an x11 independent way // It's because of this that we are limited to vo_x11 for windowed overlay :-( -#ifdef X11_FULLSCREEN if(sub_vo && sub_vo_win) { int e=vo_x11_check_events(mDisplay); if ( !(e&VO_EVENT_RESIZE) && !(e&VO_EVENT_EXPOSE) ) return; @@ -813,7 +812,6 @@ XClearWindow(mDisplay, vo_window); dxr2_set_overlay_window(); } -#endif } static int preinit(const char *arg) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_dxr3.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_dxr3.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_dxr3.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_dxr3.c 2011-07-05 12:05:06.000000000 +0000 @@ -491,7 +491,7 @@ vo_dheight = d_height; #ifdef CONFIG_GUI if (use_gui) - guiGetEvent(guiSetShVideo, 0); + gui(GUI_SETUP_VIDEO_WINDOW, 0); #endif XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &xwin_attribs); depth = xwin_attribs.depth; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_gl2.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_gl2.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_gl2.c 2011-05-27 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_gl2.c 2011-12-10 20:21:50.000000000 +0000 @@ -382,7 +382,7 @@ struct TexSquare *square = texgrid; int x, y; - glColor3f(1.0,1.0,1.0); + glColor4f(1.0,1.0,1.0,1.0); if (is_yuv) glEnableYUVConversion(GL_TEXTURE_2D, use_yuv); @@ -423,6 +423,13 @@ static void resize(int x,int y){ + // simple orthogonal projection for 0-1;0-1 + static const float matrix[16] = { + 2, 0, 0, 0, + 0, -2, 0, 0, + 0, 0, 0, 0, + -1, 1, 0, 1, + }; mp_msg(MSGT_VO,MSGL_V,"[gl2] Resize: %dx%d\n",x,y); if(aspect_scaling()) { glClear(GL_COLOR_BUFFER_BIT); @@ -443,8 +450,7 @@ } glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho (0, 1, 1, 0, -1.0, 1.0); + glLoadMatrixf(matrix); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_gl.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_gl.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_gl.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_gl.c 2011-12-23 22:34:42.000000000 +0000 @@ -118,6 +118,7 @@ static int lscale; static int cscale; static float filter_strength; +static float noise_strength; static int yuvconvtype; static int use_rectangle; static int err_shown; @@ -150,6 +151,7 @@ static int custom_trect; static int mipmap_gen; static int stereo_mode; +static enum MPGLType backend; static int int_pause; static int eq_bri = 0; @@ -171,6 +173,13 @@ static void redraw(void); static void resize(int x,int y){ + // simple orthogonal projection for 0-image_width;0-image_height + float matrix[16] = { + 2.0/image_width, 0, 0, 0, + 0, -2.0/image_height, 0, 0, + 0, 0, 0, 0, + -1, 1, 0, 1 + }; mp_msg(MSGT_VO, MSGL_V, "[gl] Resize: %dx%d\n",x,y); if (WinID >= 0) { int left = 0, top = 0, w = x, h = y; @@ -181,7 +190,6 @@ mpglViewport( 0, 0, x, y ); mpglMatrixMode(GL_PROJECTION); - mpglLoadIdentity(); ass_border_x = ass_border_y = 0; if (aspect_scaling() && use_aspect) { int new_w, new_h; @@ -192,11 +200,14 @@ new_h += vo_panscan_y; scale_x = (GLdouble)new_w / (GLdouble)x; scale_y = (GLdouble)new_h / (GLdouble)y; - mpglScaled(scale_x, scale_y, 1); + matrix[0] *= scale_x; + matrix[12] *= scale_x; + matrix[5] *= scale_y; + matrix[13] *= scale_y; ass_border_x = (vo_dwidth - new_w) / 2; ass_border_y = (vo_dheight - new_h) / 2; } - mpglOrtho(0, image_width, image_height, 0, -1,1); + mpglLoadMatrixf(matrix); mpglMatrixMode(GL_MODELVIEW); mpglLoadIdentity(); @@ -240,7 +251,7 @@ float bgamma = exp(log(8.0) * eq_bgamma / 100.0); gl_conversion_params_t params = {gl_target, yuvconvtype, {colorspace, levelconv, bri, cont, hue, sat, rgamma, ggamma, bgamma, 0}, - texture_width, texture_height, 0, 0, filter_strength}; + texture_width, texture_height, 0, 0, filter_strength, noise_strength}; mp_get_chroma_shift(image_format, &xs, &ys, &depth); params.chrom_texw = params.texw >> xs; params.chrom_texh = params.texh >> ys; @@ -537,7 +548,8 @@ mpglDepthMask(GL_FALSE); mpglDisable(GL_CULL_FACE); mpglEnable(gl_target); - mpglDrawBuffer(vo_doublebuffering?GL_BACK:GL_FRONT); + if (mpglDrawBuffer) + mpglDrawBuffer(vo_doublebuffering?GL_BACK:GL_FRONT); mpglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); mp_msg(MSGT_VO, MSGL_V, "[gl] Creating %dx%d texture...\n", @@ -608,6 +620,13 @@ if (glctx.type == GLTYPE_W32 && !vo_w32_config(d_width, d_height, flags)) return -1; #endif +#ifdef CONFIG_GL_EGL_X11 + if (glctx.type == GLTYPE_EGL_X11) { + XVisualInfo vinfo = { .visual = CopyFromParent, .depth = CopyFromParent }; + vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, d_width, d_height, flags, + CopyFromParent, "gl", title); + } +#endif #ifdef CONFIG_GL_X11 if (glctx.type == GLTYPE_X11) { static int default_glx_attribs[] = { @@ -774,10 +793,16 @@ return; // set special rendering parameters if (!scaled_osd) { + // simple orthogonal projection for 0-vo_dwidth;0-vo_dheight + float matrix[16] = { + 2.0/vo_dwidth, 0, 0, 0, + 0, -2.0/vo_dheight, 0, 0, + 0, 0, 0, 0, + -1, 1, 0, 1 + }; mpglMatrixMode(GL_PROJECTION); mpglPushMatrix(); - mpglLoadIdentity(); - mpglOrtho(0, vo_dwidth, vo_dheight, 0, -1, 1); + mpglLoadMatrixf(matrix); } mpglEnable(GL_BLEND); if (draw_eosd) { @@ -819,7 +844,7 @@ // Enable(GL_TEXTURE_2D); // BindTexture(GL_TEXTURE_2D, texture_id); - mpglColor3f(1,1,1); + mpglColor4f(1,1,1,1); if (is_yuv || custom_prog) glEnableYUVConversion(gl_target, yuvconvtype); if (stereo_mode) { @@ -1113,6 +1138,12 @@ uninit_mpglcontext(&glctx); } +static int valid_backend(void *p) +{ + int *backend = p; + return *backend >= GLTYPE_AUTO && *backend < GLTYPE_COUNT; +} + static int valid_csp(void *p) { int *csp = p; @@ -1139,6 +1170,7 @@ {"lscale", OPT_ARG_INT, &lscale, int_non_neg}, {"cscale", OPT_ARG_INT, &cscale, int_non_neg}, {"filter-strength", OPT_ARG_FLOAT, &filter_strength, NULL}, + {"noise-strength", OPT_ARG_FLOAT, &noise_strength, NULL}, {"ati-hack", OPT_ARG_BOOL, &ati_hack, NULL}, {"force-pbo", OPT_ARG_BOOL, &force_pbo, NULL}, {"mesa-buffer", OPT_ARG_BOOL, &mesa_buffer, NULL}, @@ -1151,13 +1183,14 @@ {"mipmapgen", OPT_ARG_BOOL, &mipmap_gen, NULL}, {"osdcolor", OPT_ARG_INT, &osd_color, NULL}, {"stereo", OPT_ARG_INT, &stereo_mode, NULL}, + {"backend", OPT_ARG_INT, &backend, valid_backend}, {NULL} }; static int preinit_internal(const char *arg, int allow_sw) { // set defaults - enum MPGLType gltype = GLTYPE_AUTO; + backend = GLTYPE_AUTO; many_fmts = 1; use_osd = -1; scaled_osd = 0; @@ -1169,6 +1202,7 @@ lscale = 0; cscale = 0; filter_strength = 0.5; + noise_strength = 0.0; use_rectangle = -1; use_glFinish = 0; ati_hack = -1; @@ -1244,6 +1278,8 @@ " as lscale but for chroma (2x slower with little visible effect).\n" " filter-strength=\n" " set the effect strength for some lscale/cscale filters\n" + " noise-strength=\n" + " set how much noise to add. 1.0 is suitable for dithering to 6 bit.\n" " customprog=\n" " use a custom YUV conversion program\n" " customtex=\n" @@ -1256,15 +1292,21 @@ " generate mipmaps for the video image (use with TXB in customprog)\n" " osdcolor=<0xAARRGGBB>\n" " use the given color for the OSD\n" - " stereo=\n" + " stereo= (add 32 to swap left and right)\n" " 0: normal display\n" " 1: side-by-side to red-cyan stereo\n" " 2: side-by-side to green-magenta stereo\n" " 3: side-by-side to quadbuffer stereo\n" + " backend=\n" + " -1: auto-select\n" + " 0: Win32/WGL\n" + " 1: X11/GLX\n" + " 2: SDL\n" + " 3: X11/EGL (experimental)\n" "\n" ); return -1; } - if (!init_mpglcontext(&glctx, gltype)) + if (!init_mpglcontext(&glctx, backend)) goto err_out; if (use_yuv == -1 || !allow_sw) { if (create_window(320, 200, VOFLAG_HIDDEN, NULL) < 0) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_jpeg.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_jpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_jpeg.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_jpeg.c 2011-07-02 23:22:49.000000000 +0000 @@ -105,7 +105,7 @@ * returns, everything went well. */ -static void jpeg_mkdir(char *buf, int verbose) { +static void jpeg_mkdir(const char *buf, int verbose) { struct stat stat_p; #ifndef __MINGW32__ @@ -177,7 +177,7 @@ /* ------------------------------------------------------------------------- */ -static uint32_t jpeg_write(uint8_t * name, uint8_t * buffer) +static uint32_t jpeg_write(const char * name, uint8_t * buffer) { FILE *outfile; struct jpeg_compress_struct cinfo; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_kva.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_kva.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_kva.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_kva.c 2011-12-05 18:09:21.000000000 +0000 @@ -673,6 +673,9 @@ { RECTL rcl; + if (vo_wintitle) + title = vo_wintitle; + mp_msg(MSGT_VO, MSGL_V, "KVA: Using 0x%X (%s) image format, vo_config_count = %d\n", format, vo_format_name(format), vo_config_count); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_md5sum.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_md5sum.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_md5sum.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_md5sum.c 2011-11-06 09:09:26.000000000 +0000 @@ -140,6 +140,9 @@ return 0; } + if (strcmp(md5sum_outfile, "-") == 0) + md5sum_fd = stdout; + else if ( (md5sum_fd = fopen(md5sum_outfile, "w") ) == NULL ) { mp_msg(MSGT_VO, MSGL_ERR, "\n%s: %s\n", info.short_name, MSGTR_VO_CantCreateFile); @@ -276,7 +279,7 @@ { free(md5sum_outfile); md5sum_outfile = NULL; - if (md5sum_fd) fclose(md5sum_fd); + if (md5sum_fd && md5sum_fd != stdout) fclose(md5sum_fd); } /* ------------------------------------------------------------------------- */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_mpegpes.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_mpegpes.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_mpegpes.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_mpegpes.c 2011-07-02 22:59:40.000000000 +0000 @@ -232,7 +232,7 @@ uninit(void) { if(ao_mpegpes_fd >= 0 && ao_mpegpes_fd != vo_mpegpes_fd) close(ao_mpegpes_fd); - ao_mpegpes_fd =- 1; + ao_mpegpes_fd = -1; if(vo_mpegpes_fd>=0){ close(vo_mpegpes_fd);vo_mpegpes_fd=-1;} } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_null.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_null.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_null.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_null.c 2011-08-04 19:30:26.000000000 +0000 @@ -67,6 +67,8 @@ static int query_format(uint32_t format) { + if (IMGFMT_IS_HWACCEL(format)) + return 0; return VFCAP_CSP_SUPPORTED; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_quartz.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_quartz.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_quartz.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_quartz.c 2011-12-03 22:26:47.000000000 +0000 @@ -469,10 +469,6 @@ static void quartz_CreateWindow(uint32_t d_width, uint32_t d_height, WindowAttributes windowAttrs) { - CFStringRef titleKey; - CFStringRef windowTitle; - OSStatus result; - MenuItemIndex index; CFStringRef movMenuTitle; CFStringRef aspMenuTitle; @@ -553,13 +549,6 @@ CreateWindowGroup(0, &winGroup); SetWindowGroup(theWindow, winGroup); - // Set window title - titleKey = CFSTR("MPlayer - The Movie Player"); - windowTitle = CFCopyLocalizedString(titleKey, NULL); - result = SetWindowTitleWithCFString(theWindow, windowTitle); - CFRelease(titleKey); - CFRelease(windowTitle); - // Install event handler InstallApplicationEventHandler(NewEventHandlerUPP(KeyEventHandler), GetEventTypeCount(key_events), key_events, NULL, NULL); InstallApplicationEventHandler(NewEventHandlerUPP(MouseEventHandler), GetEventTypeCount(mouse_events), mouse_events, NULL, NULL); @@ -609,6 +598,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) { + CFStringRef windowTitle; WindowAttributes windowAttrs; OSErr qterr; CGRect tmpBounds; @@ -670,6 +660,11 @@ SizeWindow(theWindow, d_width, d_height, 1); } + // Set window title + windowTitle = CFStringCreateWithCString(NULL, vo_wintitle ? vo_wintitle : title, kCFStringEncodingUTF8); + SetWindowTitleWithCFString(theWindow, windowTitle); + CFRelease(windowTitle); + switch (image_format) { case IMGFMT_RGB32: diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_s3fb.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_s3fb.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_s3fb.c 2011-05-25 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_s3fb.c 2011-07-27 13:40:18.000000000 +0000 @@ -69,7 +69,7 @@ screenwidth, screenheight, screendepth, screenstride, vidwidth, vidheight, vidx, vidy, page, offset, sreg; static char *inpage, *inpage0, *smem = NULL; -static void (*alpha_func)(); +static void (*alpha_func)(int, int, unsigned char*, unsigned char*, int, unsigned char*, int); static void clear_screen(void); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_tdfxfb.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_tdfxfb.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_tdfxfb.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_tdfxfb.c 2011-07-27 13:40:18.000000000 +0000 @@ -99,7 +99,8 @@ static volatile voodoo_2d_reg *reg_2d; static voodoo_yuv_reg *reg_YUV; static struct YUV_plane *YUV; -static void (*alpha_func)(), (*alpha_func_double)(); +static void (*alpha_func)(int, int, unsigned char*, unsigned char*, int, unsigned char*, int), + (*alpha_func_double)(int, int, unsigned char*, unsigned char*, int, unsigned char*, int); static int preinit(const char *arg) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_xmga.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_xmga.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_xmga.c 2010-10-27 18:22:50.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_xmga.c 2011-10-26 15:12:35.000000000 +0000 @@ -25,7 +25,7 @@ #include #include "config.h" - +#include "mp_msg.h" #include "video_out.h" #include "video_out_internal.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_xover.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_xover.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_xover.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_xover.c 2011-09-19 22:11:12.000000000 +0000 @@ -107,7 +107,6 @@ drwcX=drwX=vo_dx; drwcY=drwY=vo_dy; drwWidth=vo_dwidth; drwHeight=vo_dheight; } -#if X11_FULLSCREEN if (vo_fs) { aspect(&dwidth,&dheight,A_ZOOM); @@ -120,7 +119,6 @@ mp_msg(MSGT_VO, MSGL_V, "[xvidix-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n", drwcX, drwcY, drwX, drwY, drwWidth, drwHeight); } -#endif vo_dwidth=drwWidth; vo_dheight=drwHeight; @@ -269,14 +267,12 @@ vo_dwidth=d_width; vo_dheight=d_height; #ifdef CONFIG_GUI - if(use_gui) guiGetEvent( guiSetShVideo,0 ); // the GUI will set up / resize the window + if(use_gui) gui(GUI_SETUP_VIDEO_WINDOW, 0); // the GUI will set up / resize the window else { #endif -#ifdef X11_FULLSCREEN if ( ( flags&VOFLAG_FULLSCREEN )||(flags & VOFLAG_SWSCALE) ) aspect(&d_width, &d_height, A_ZOOM); -#endif dwidth = d_width; dheight = d_height; /* Make the window */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_xvidix.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_xvidix.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_xvidix.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_xvidix.c 2011-09-19 22:11:12.000000000 +0000 @@ -110,7 +110,6 @@ drwHeight = vo_dheight; } -#if X11_FULLSCREEN if (vo_fs) { aspect(&dwidth, &dheight, A_ZOOM); @@ -129,7 +128,6 @@ "[xvidix-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n", drwcX, drwcY, drwX, drwY, drwWidth, drwHeight); } -#endif vo_dwidth = drwWidth; vo_dheight = drwHeight; @@ -247,10 +245,8 @@ } mp_msg(MSGT_VO, MSGL_V, "Using colorkey: %x\n", colorkey); -#ifdef X11_FULLSCREEN if ((flags & VOFLAG_FULLSCREEN) || (flags & VOFLAG_SWSCALE)) aspect(&d_width, &d_height, A_ZOOM); -#endif dwidth = d_width; dheight = d_height; /* Make the window */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_zr.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_zr.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/vo_zr.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/vo_zr.c 2011-07-27 13:40:00.000000000 +0000 @@ -19,7 +19,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id: vo_zr.c 33392 2011-05-07 10:59:11Z iive $ */ +/* $Id: vo_zr.c 33928 2011-07-27 13:40:00Z diego $ */ #include #include @@ -106,13 +106,13 @@ static zr_info_t zr_info[ZR_MAX_DEVICES] = { {1, 1, 1, -1, -1, 2, {0, 0, 0, 0, 0}, NULL, 0, VIDEO_MODE_AUTO, NULL, 0, 0, 0, 0, 0, - 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, {0}, {0}, {0}, {{0}}, 0, 0}, {1, 1, 1, -1, -1, 2, {0, 0, 0, 0, 0}, NULL, 0, VIDEO_MODE_AUTO, NULL, 0, 0, 0, 0, 0, - 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, {0}, {0}, {0}, {{0}}, 0, 0}, {1, 1, 1, -1, -1, 2, {0, 0, 0, 0, 0}, NULL, 0, VIDEO_MODE_AUTO, NULL, 0, 0, 0, 0, 0, - 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, {0}, {0}, {0}, {{0}}, 0, 0}, {1, 1, 1, -1, -1, 2, {0, 0, 0, 0, 0}, NULL, 0, VIDEO_MODE_AUTO, NULL, 0, 0, 0, 0, 0, - 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; + 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, {0}, {0}, {0}, {{0}}, 0, 0}}; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/w32_common.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/w32_common.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/w32_common.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/w32_common.c 2011-12-03 19:59:17.000000000 +0000 @@ -433,6 +433,8 @@ prev_height = vo_dheight = height; prev_x = vo_dx; prev_y = vo_dy; + if (vo_wintitle) + SetWindowText(vo_w32_window, vo_wintitle); } vo_fs = flags & VOFLAG_FULLSCREEN; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/x11_common.c mplayer-1.0~rc4.dfsg1+svn34540/libvo/x11_common.c --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/x11_common.c 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/x11_common.c 2011-12-04 13:30:54.000000000 +0000 @@ -28,8 +28,6 @@ #include "libavutil/common.h" #include "x11_common.h" -#ifdef X11_FULLSCREEN - #include #include #include @@ -89,7 +87,7 @@ static int orig_layer = 0; static int old_gravity = NorthWestGravity; -int stop_xscreensaver = 0; +int stop_xscreensaver = 1; static int dpms_disabled = 0; @@ -141,11 +139,12 @@ /* * Sends the EWMH fullscreen state event. * + * win: id of the window to which the event shall be sent * action: could be one of _NET_WM_STATE_REMOVE -- remove state * _NET_WM_STATE_ADD -- add state * _NET_WM_STATE_TOGGLE -- toggle */ -void vo_x11_ewmh_fullscreen(int action) +void vo_x11_ewmh_fullscreen(Window win, int action) { assert(action == _NET_WM_STATE_REMOVE || action == _NET_WM_STATE_ADD || action == _NET_WM_STATE_TOGGLE); @@ -159,7 +158,7 @@ xev.xclient.serial = 0; xev.xclient.send_event = True; xev.xclient.message_type = XA_NET_WM_STATE; - xev.xclient.window = vo_window; + xev.xclient.window = win; xev.xclient.format = 32; xev.xclient.data.l[0] = action; xev.xclient.data.l[1] = XA_NET_WM_STATE_FULLSCREEN; @@ -177,7 +176,7 @@ } } -void vo_hidecursor(Display * disp, Window win) +static void vo_hidecursor(Display * disp, Window win) { Cursor no_ptr; Pixmap bm_no; @@ -185,8 +184,8 @@ Colormap colormap; static char bm_no_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - if (WinID == 0) - return; // do not hide if playing on the root window + if (WinID >= 0) + return; // do not hide if attached to an existing window colormap = DefaultColormap(disp, DefaultScreen(disp)); if ( !XAllocNamedColor(disp, colormap, "black", &black, &dummy) ) @@ -202,10 +201,10 @@ XFreeColors(disp,colormap,&black.pixel,1,0); } -void vo_showcursor(Display * disp, Window win) +static void vo_showcursor(Display * disp, Window win) { - if (WinID == 0) - return; + if (WinID >= 0) + return; // do not show if attached to an existing window XDefineCursor(disp, win, 0); } @@ -551,22 +550,23 @@ #include "osdep/keycodes.h" #include "wskeys.h" -#ifdef XF86XK_AudioPause static const struct mp_keymap keysym_map[] = { +#ifdef XF86XK_AudioPause {XF86XK_MenuKB, KEY_MENU}, {XF86XK_AudioPlay, KEY_PLAY}, {XF86XK_AudioPause, KEY_PAUSE}, {XF86XK_AudioStop, KEY_STOP}, {XF86XK_AudioPrev, KEY_PREV}, {XF86XK_AudioNext, KEY_NEXT}, {XF86XK_AudioMute, KEY_MUTE}, {XF86XK_AudioLowerVolume, KEY_VOLUME_DOWN}, {XF86XK_AudioRaiseVolume, KEY_VOLUME_UP}, +#endif {0, 0} }; -static void vo_x11_putkey_ext(int keysym) +static int vo_x11_putkey_ext(int keysym) { int mpkey = lookup_keymap_table(keysym_map, keysym); if (mpkey) mplayer_put_key(mpkey); + return mpkey != 0; } -#endif static const struct mp_keymap keymap[] = { // special keys @@ -729,12 +729,18 @@ { XClassHint wmClass; pid_t pid = getpid(); + long prop = pid & 0x7FFFFFFF; wmClass.res_name = vo_winname ? vo_winname : name; wmClass.res_class = "MPlayer"; XSetClassHint(display, window, &wmClass); + + /* PID sizes other than 32-bit are not handled by the EWMH spec */ + if ((pid_t)prop != pid) + return; + XChangeProperty(display, window, XA_NET_WM_PID, XA_CARDINAL, 32, - PropModeReplace, (unsigned char *) &pid, 1); + PropModeReplace, (unsigned char *)&prop, 1); } Window vo_window = None; @@ -806,6 +812,7 @@ char buf[100]; KeySym keySym; static XComposeStatus stat; + static int ctrl_state; if (vo_mouse_autohide && mouse_waiting_hide && (GetTimerMS() - mouse_timer >= 1000)) { @@ -821,7 +828,7 @@ #ifdef CONFIG_GUI if (use_gui) { - guiGetEvent(0, (char *) &Event); + gui(GUI_HANDLE_X_EVENT, &Event); if (vo_window != Event.xany.window) continue; } @@ -838,6 +845,7 @@ ret |= check_resize(); break; case KeyPress: + case KeyRelease: { int key; @@ -847,13 +855,28 @@ XLookupString(&Event.xkey, buf, sizeof(buf), &keySym, &stat); -#ifdef XF86XK_AudioPause - vo_x11_putkey_ext(keySym); -#endif key = ((keySym & 0xff00) != 0 ? ((keySym & 0x00ff) + 256) : (keySym)); - vo_x11_putkey(key); + if (key == wsLeftCtrl || key == wsRightCtrl) { + ctrl_state = Event.type == KeyPress; + mplayer_put_key(KEY_CTRL | + (ctrl_state ? MP_KEY_DOWN : 0)); + } else if (Event.type == KeyRelease) { + break; + } + // Attempt to fix if somehow our state got out of + // sync with reality. + // This usually happens when a shortcut involving CTRL + // was used to switch to a different window/workspace. + if (ctrl_state != !!(Event.xkey.state & 4)) { + ctrl_state = !!(Event.xkey.state & 4); + mplayer_put_key(KEY_CTRL | + (ctrl_state ? MP_KEY_DOWN : 0)); + } + if (!vo_x11_putkey_ext(keySym)) { + vo_x11_putkey(key); + } ret |= VO_EVENT_KEYPRESS; } break; @@ -1068,6 +1091,8 @@ Colormap col_map, const char *classname, const char *title) { + if (vo_wintitle) + title = vo_wintitle; if (WinID >= 0) { vo_fs = flags & VOFLAG_FULLSCREEN; vo_window = WinID ? (Window)WinID : mRootWin; @@ -1090,7 +1115,7 @@ // if it relies on events being forwarded to the parent of WinID. // It also is consistent with the w32_common.c code. vo_x11_selectinput_witherr(mDisplay, vo_window, - StructureNotifyMask | KeyPressMask | PointerMotionMask | + StructureNotifyMask | KeyPressMask | KeyReleaseMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | ExposureMask); vo_x11_update_geometry(); @@ -1106,12 +1131,12 @@ } if (flags & VOFLAG_HIDDEN) goto final; + XStoreName(mDisplay, vo_window, title); if (window_state & VOFLAG_HIDDEN) { XSizeHints hint; XEvent xev; window_state &= ~VOFLAG_HIDDEN; vo_x11_classhint(mDisplay, vo_window, classname); - XStoreName(mDisplay, vo_window, title); vo_hidecursor(mDisplay, vo_window); XSelectInput(mDisplay, vo_window, StructureNotifyMask); hint.x = x; hint.y = y; @@ -1131,7 +1156,7 @@ XSelectInput(mDisplay, vo_window, NoEventMask); XSync(mDisplay, False); vo_x11_selectinput_witherr(mDisplay, vo_window, - StructureNotifyMask | KeyPressMask | PointerMotionMask | + StructureNotifyMask | KeyPressMask | KeyReleaseMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | ExposureMask); } if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window, vo_ontop); @@ -1340,8 +1365,6 @@ if (w <= INT_MAX && h <= INT_MAX) { vo_dwidth = w; vo_dheight = h; } XTranslateCoordinates(mDisplay, vo_window, mRootWin, 0, 0, &vo_dx, &vo_dy, &dummy_win); - if (vo_wintitle) - XStoreName(mDisplay, vo_window, vo_wintitle); return depth <= INT_MAX ? depth : 0; } @@ -1363,12 +1386,12 @@ if (vo_fs) { - vo_x11_ewmh_fullscreen(_NET_WM_STATE_REMOVE); // removes fullscreen state if wm supports EWMH + vo_x11_ewmh_fullscreen(vo_window, _NET_WM_STATE_REMOVE); // removes fullscreen state if wm supports EWMH vo_fs = VO_FALSE; } else { // win->fs - vo_x11_ewmh_fullscreen(_NET_WM_STATE_ADD); // sends fullscreen state to be added if wm supports EWMH + vo_x11_ewmh_fullscreen(vo_window, _NET_WM_STATE_ADD); // sends fullscreen state to be added if wm supports EWMH vo_fs = VO_TRUE; if ( ! (vo_fs_type & vo_wm_FULLSCREEN) ) // not needed with EWMH fs @@ -1516,7 +1539,7 @@ { int nothing; - if (screensaver_off) + if (!stop_xscreensaver || screensaver_off) return; screensaver_off = 1; if (xss_suspend(True)) @@ -1681,8 +1704,6 @@ } #endif -#endif /* X11_FULLSCREEN */ - /* * Scan the available visuals on this Display/Screen. Try to find diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/libvo/x11_common.h mplayer-1.0~rc4.dfsg1+svn34540/libvo/x11_common.h --- mplayer-1.0~rc4.dfsg1+svn33713/libvo/x11_common.h 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/libvo/x11_common.h 2011-09-19 22:11:12.000000000 +0000 @@ -25,12 +25,6 @@ #include "config.h" -#if defined(CONFIG_GL) || defined(CONFIG_X11) || defined(CONFIG_XV) -#define X11_FULLSCREEN 1 -#endif - -#ifdef X11_FULLSCREEN - #define vo_wm_LAYER 1 #define vo_wm_FULLSCREEN 2 #define vo_wm_STAYS_ON_TOP 4 @@ -63,8 +57,6 @@ int vo_init( void ); void vo_uninit( void ); -void vo_hidecursor ( Display* , Window ); -void vo_showcursor( Display *disp, Window win ); void vo_x11_decoration( Display * vo_Display,Window w,int d ); void vo_x11_classhint( Display * display,Window window,const char *name ); void vo_x11_nofs_sizepos(int x, int y, int width, int height); @@ -90,16 +82,16 @@ void vo_x11_clearwindow( Display *mDisplay, Window vo_window ); void vo_x11_ontop(void); void vo_x11_border(void); -void vo_x11_ewmh_fullscreen( int action ); +void vo_x11_ewmh_fullscreen( Window win, int action ); -#endif extern Window vo_window; extern GC vo_gc; extern XSizeHints vo_hint; -#ifdef CONFIG_XV -//XvPortID xv_port; + + +// XVideo related declarations extern unsigned int xv_port; int vo_xv_set_eq(uint32_t xv_port, const char * name, int value); @@ -134,7 +126,8 @@ /*** test functions for common suboptions ***/ int xv_test_ck( void * arg ); int xv_test_ckm( void * arg ); -#endif + + void vo_setwindow( Window w,GC g ); void vo_x11_putkey(int key); @@ -143,10 +136,13 @@ void saver_off( Display * ); void saver_on( Display * ); -#ifdef CONFIG_XF86VM + + +// XF86VM-related functions void vo_vm_switch(void); void vo_vm_close(void); -#endif + + void update_xinerama_info(void); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/loader/com.h mplayer-1.0~rc4.dfsg1+svn34540/loader/com.h --- mplayer-1.0~rc4.dfsg1+svn33713/loader/com.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/loader/com.h 2011-10-16 10:49:04.000000000 +0000 @@ -29,6 +29,9 @@ } GUID; #endif +// use copies of the IIDs to avoid symbol collisions +#define IID_IUnknown MP_IID_IUnknown +#define IID_IClassFactory MP_IID_IClassFactory extern const GUID IID_IUnknown; extern const GUID IID_IClassFactory; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/loader/module.c mplayer-1.0~rc4.dfsg1+svn34540/loader/module.c --- mplayer-1.0~rc4.dfsg1+svn33713/loader/module.c 2011-05-25 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/loader/module.c 2011-07-30 20:44:37.000000000 +0000 @@ -8,17 +8,17 @@ * */ -// define for quicktime calls debugging and/or MacOS-level emulation: -#ifndef __APPLE__ -#define EMU_QTX_API -#endif /* __APPLE__ */ - // define for quicktime debugging (verbose logging): //#define DEBUG_QTX_API #include "config.h" #include "debug.h" +// define for quicktime calls debugging and/or MacOS-level emulation: +#if !defined(__APPLE__) && defined(CONFIG_QTX_CODECS) +#define EMU_QTX_API +#endif /* __APPLE__ */ + #include #include #include @@ -435,6 +435,25 @@ printf("Win32 LoadLibrary failed to load: %s\n", checked); #define RVA(x) ((char *)wm->module+(unsigned int)(x)) + if (strstr(libname, "CFDecode2.ax") && wm) + { + if (PE_FindExportedFunction(wm, "DllGetClassObject", TRUE) == RVA(0xd00e0)) + { + // Patch some movdqa to movdqu + // It is currently unclear why this is necessary, it seems + // to be some output frame, but our frame seems correctly + // aligned + int offsets[] = {0x7318c, 0x731ba, 0x731e0, 0x731fe, 0}; + int i; + for (i = 0; offsets[i]; i++) + { + int ofs = offsets[i]; + if (RVA(ofs)[0] == 0x66 && RVA(ofs)[1] == 0x0f && + RVA(ofs)[2] == 0x7f) + RVA(ofs)[0] = 0xf3; + } + } + } if (strstr(libname,"vp31vfw.dll") && wm) { int i; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/loader/pe_image.c mplayer-1.0~rc4.dfsg1+svn34540/loader/pe_image.c --- mplayer-1.0~rc4.dfsg1+svn33713/loader/pe_image.c 2011-05-25 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/loader/pe_image.c 2011-10-31 13:18:45.000000000 +0000 @@ -54,6 +54,9 @@ #else #include "osdep/mmap.h" #endif +#ifdef HAVE_ALLOCA_H +# include +#endif #include "wine/windef.h" #include "wine/winbase.h" #include "wine/winerror.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/loader/qtx/qtxsdk/components.h mplayer-1.0~rc4.dfsg1+svn34540/loader/qtx/qtxsdk/components.h --- mplayer-1.0~rc4.dfsg1+svn33713/loader/qtx/qtxsdk/components.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/loader/qtx/qtxsdk/components.h 2011-07-27 13:40:06.000000000 +0000 @@ -736,13 +736,13 @@ if(cd->wantedDestinationPixelTypes){ unsigned int* p=cd->wantedDestinationPixelTypes; while(p[0]){ - printf(" 0x%08X %.4s\n",p[0],&p[0]); + printf(" 0x%08X %p\n",p[0],&p[0]); ++p; } } printf("screenFloodMethod=%d value=%d preferredOffscreenPixelSize=%d\n", cd->screenFloodMethod, cd->screenFloodValue, cd->preferredOffscreenPixelSize); - printf("callbacks: progress=%p compl=%p data=%p ftime=%p srcdata=%p sync=%p\n", + printf("callbacks: progress=%"PRId64" compl=%"PRId64" data=%"PRId64" ftime=%p srcdata=%p sync=%p\n", cd->progressProcRecord, cd->completionProcRecord, cd->dataProcRecord, cd->frameTime, cd->sourceData, cd->syncFrameTime); // printf("\n"); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/loader/win32.c mplayer-1.0~rc4.dfsg1+svn34540/loader/win32.c --- mplayer-1.0~rc4.dfsg1+svn33713/loader/win32.c 2011-05-25 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/loader/win32.c 2011-11-03 13:24:50.000000000 +0000 @@ -69,6 +69,9 @@ #ifdef HAVE_KSTAT #include #endif +#if HAVE_MALLOC_H +#include +#endif #if HAVE_SYS_MMAN_H #include @@ -345,7 +348,7 @@ void* mreq_private(int size, int to_zero, int type) { int nsize = size + sizeof(alloc_header); - alloc_header* header = malloc(nsize); + alloc_header* header = memalign(16, nsize); if (!header) return 0; if (to_zero) @@ -1000,8 +1003,6 @@ /* mplayer's way to detect PF's */ { -#include "cpudetect.h" - if (gCpuCaps.hasMMX) PF[PF_MMX_INSTRUCTIONS_AVAILABLE] = TRUE; if (gCpuCaps.hasSSE) @@ -3962,6 +3963,13 @@ return result; } +static LONG WINAPI explstrlenW(const uint16_t* s) +{ + int result = 0; + while (s && s[result]) result++; + return result; +} + static LONG WINAPI explstrcpyA(char* str1, const char* str2) { int result= (int) strcpy(str1, str2); @@ -4310,6 +4318,8 @@ static void* expfopen(const char* path, const char* mode) { printf("fopen: \"%s\" mode:%s\n", path, mode); + if (strcmp(mode, "r") == 0 || strcmp(mode, "rb") == 0) + return NULL; //return fopen(path, mode); return fdopen(0, mode); // everything on screen } @@ -4576,12 +4586,39 @@ } +static void exp_splitpath(const char *path, char *drive, char *dir, char *name, char *ext) +{ + const char *ext_start = strrchr(path, '.'); + int name_len = ext_start ? ext_start - path : strlen(path); + if (drive) + strcpy(drive, ""); + if (dir) + strcpy(dir, ""); + if (name) { + strncpy(name, path, name_len); + name[name_len] = 0; + } + if (ext) + strcpy(ext, ext_start ? ext_start : ""); +} + +static char *exp_mbsupr(char *str) +{ + int i; + for (i = 0; str[i]; i++) str[i] = toupper(str[i]); + return str; +} static int exp_stricmp(const char* s1, const char* s2) { return strcasecmp(s1, s2); } +static uint64_t exp_time64(void) +{ + return 0; +} + /* from declaration taken from Wine sources - this fountion seems to be * undocumented in any M$ doc */ static int exp_setjmp3(void* jmpbuf, int x) @@ -5284,6 +5321,7 @@ FF(MulDiv, -1) FF(lstrcmpiA, -1) FF(lstrlenA, -1) + FF(lstrlenW, -1) FF(lstrcpyA, -1) FF(lstrcatA, -1) FF(lstrcpynA,-1) @@ -5570,10 +5608,25 @@ FF(_CIsin,-1) FF(_CIcos,-1) FF(_CIsqrt,-1) + FF(memcpy,-1) FF(memset,-1) + FF(sprintf,-1) + FF(strncpy,-1) + FF(fopen,-1) + FF(malloc,-1) + FF(free,-1) FF(_initterm_e, -1) FF(_initterm, -1) FF(_decode_pointer, -1) + +// For CFDecode2.ax + {"_aligned_free",-1,(void*)expfree}, + {"_aligned_malloc",-1,(void*)expmalloc}, + FF(_splitpath,-1) + FF(_mbsupr,-1) + {"_mbscmp", -1, (void*)strcmp}, + {"clock",-1,(void*)&clock}, + FF(_time64,-1) /* needed by KGV1-VFW.dll */ {"??2@YAPAXI@Z", -1, expnew}, {"??3@YAXPAX@Z", -1, expdelete} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/Makefile mplayer-1.0~rc4.dfsg1+svn34540/Makefile --- mplayer-1.0~rc4.dfsg1+svn33713/Makefile 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/Makefile 2012-01-08 10:47:41.000000000 +0000 @@ -23,8 +23,17 @@ ###### variable declarations ####### -SRCS_AUDIO_INPUT-$(ALSA1X) += stream/ai_alsa1x.c -SRCS_AUDIO_INPUT-$(ALSA9) += stream/ai_alsa.c +# local fallbacks for missing operating system features +OS_FEATURE-$(GETTIMEOFDAY) += osdep/gettimeofday.c +OS_FEATURE-$(GLOB_WIN) += osdep/glob-win.c +OS_FEATURE-$(MMAP) += osdep/mmap-os2.c +OS_FEATURE-$(SETENV) += osdep/setenv.c +OS_FEATURE-$(SHMEM) += osdep/shmem.c +OS_FEATURE-$(STRSEP) += osdep/strsep.c +OS_FEATURE-$(VSSCANF) += osdep/vsscanf.c + +# conditional source declarations +SRCS_AUDIO_INPUT-$(ALSA) += stream/ai_alsa.c SRCS_AUDIO_INPUT-$(OSS) += stream/ai_oss.c SRCS_COMMON-$(AUDIO_INPUT) += $(SRCS_AUDIO_INPUT-yes) SRCS_COMMON-$(BITMAP_FONT) += sub/font_load.c @@ -59,9 +68,11 @@ SRCS_COMMON-$(FAAD) += libmpcodecs/ad_faad.c SRCS_COMMON-$(FASTMEMCPY) += libvo/aclib.c -SRCS_COMMON-$(FFMPEG) += av_opts.c \ +SRCS_COMMON-$(FFMPEG) += av_helpers.c \ + av_opts.c \ libaf/af_lavcresample.c \ libmpcodecs/ad_ffmpeg.c \ + libmpcodecs/ad_spdif.c \ libmpcodecs/vd_ffmpeg.c \ libmpcodecs/vf_geq.c \ libmpcodecs/vf_lavc.c \ @@ -72,6 +83,8 @@ stream/stream_ffmpeg.c \ sub/av_sub.c \ +SRCS_COMMON-$(CONFIG_VF_LAVFI) += libmpcodecs/vf_lavfi.c + # These filters use private headers and do not work with shared FFmpeg. SRCS_COMMON-$(FFMPEG_A) += libaf/af_lavcac3enc.c \ libmpcodecs/vf_fspp.c \ @@ -102,6 +115,7 @@ libass/ass_parse.c \ libass/ass_render.c \ libass/ass_render_api.c \ + libass/ass_shaper.c \ libass/ass_strtod.c \ libass/ass_utils.c \ @@ -176,14 +190,6 @@ stream/librtsp/rtsp_rtp.c \ stream/librtsp/rtsp_session.c \ -SRCS_COMMON-$(NEED_GETTIMEOFDAY) += osdep/gettimeofday.c -SRCS_COMMON-$(NEED_GLOB) += osdep/glob-win.c -SRCS_COMMON-$(NEED_MMAP) += osdep/mmap-os2.c -SRCS_COMMON-$(NEED_SETENV) += osdep/setenv.c -SRCS_COMMON-$(NEED_SHMEM) += osdep/shmem.c -SRCS_COMMON-$(NEED_STRSEP) += osdep/strsep.c -SRCS_COMMON-$(NEED_SWAB) += osdep/swab.c -SRCS_COMMON-$(NEED_VSSCANF) += osdep/vsscanf.c SRCS_COMMON-$(NETWORKING) += stream/stream_netstream.c \ stream/asf_mmst_streaming.c \ stream/asf_streaming.c \ @@ -484,14 +490,13 @@ sub/sub_cc.c \ sub/subreader.c \ sub/vobsub.c \ - $(SRCS_COMMON-yes) + $(SRCS_COMMON-yes) \ + $(OS_FEATURE-no) SRCS_MPLAYER-$(3DFX) += libvo/vo_3dfx.c SRCS_MPLAYER-$(AA) += libvo/vo_aa.c -SRCS_MPLAYER-$(ALSA1X) += libao2/ao_alsa.c -SRCS_MPLAYER-$(ALSA5) += libao2/ao_alsa5.c -SRCS_MPLAYER-$(ALSA9) += libao2/ao_alsa.c +SRCS_MPLAYER-$(ALSA) += libao2/ao_alsa.c SRCS_MPLAYER-$(APPLE_IR) += input/appleir.c SRCS_MPLAYER-$(APPLE_REMOTE) += input/ar.c SRCS_MPLAYER-$(ARTS) += libao2/ao_arts.c @@ -517,7 +522,9 @@ SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c SRCS_MPLAYER-$(GL_X11) += libvo/x11_common.c SRCS_MPLAYER-$(MATRIXVIEW) += libvo/vo_matrixview.c libvo/matrixview.c -SRCS_MPLAYER-$(GUI) += gui/util/bitmap.c +SRCS_MPLAYER-$(GUI) += gui/util/bitmap.c \ + gui/util/list.c \ + gui/util/string.c SRCS_MPLAYER-$(GUI_GTK) += gui/app.c \ gui/cfg.c \ gui/interface.c \ @@ -541,7 +548,6 @@ gui/ui/sub.c \ gui/ui/widgets.c \ gui/util/cut.c \ - gui/util/string.c \ gui/wm/ws.c \ gui/wm/wsxdnd.c \ @@ -682,14 +688,13 @@ libmpdemux/muxer_rawvideo.c \ $(SRCS_MENCODER-yes) +# (linking) order matters for these libraries +FFMPEGPARTS = libpostproc libswscale libavfilter libavformat libavcodec libavutil +FFMPEGLIBS = $(foreach part, $(FFMPEGPARTS), ffmpeg/$(part)/$(part).a) +FFMPEGFILES = $(foreach part, $(FFMPEGPARTS), $(wildcard $(addprefix ffmpeg/$(part)/,*.[chS] /*/*.[chS] /*/*.asm))) -COMMON_LIBS-$(FFMPEG_A) += ffmpeg/libavformat/libavformat.a \ - ffmpeg/libavcodec/libavcodec.a \ - ffmpeg/libpostproc/libpostproc.a \ - ffmpeg/libswscale/libswscale.a \ - ffmpeg/libavutil/libavutil.a \ - -COMMON_LIBS += $(COMMON_LIBS-yes) +COMMON_LIBS-$(FFMPEG_A) += $(FFMPEGLIBS) +COMMON_LIBS += $(COMMON_LIBS-yes) OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON))) OBJS_MENCODER += $(addsuffix .o, $(basename $(SRCS_MENCODER))) @@ -710,30 +715,6 @@ INSTALL_TARGETS-$(MPLAYER) += install-mplayer install-mplayer-man DIRS = . \ - ffmpeg/libavcodec \ - ffmpeg/libavcodec/alpha \ - ffmpeg/libavcodec/arm \ - ffmpeg/libavcodec/bfin \ - ffmpeg/libavcodec/mlib \ - ffmpeg/libavcodec/ppc \ - ffmpeg/libavcodec/sh4 \ - ffmpeg/libavcodec/sparc \ - ffmpeg/libavcodec/x86 \ - ffmpeg/libavformat \ - ffmpeg/libavutil \ - ffmpeg/libavutil/arm \ - ffmpeg/libavutil/bfin \ - ffmpeg/libavutil/ppc \ - ffmpeg/libavutil/sh4 \ - ffmpeg/libavutil/tomi \ - ffmpeg/libavutil/x86 \ - ffmpeg/libpostproc \ - ffmpeg/libswscale \ - ffmpeg/libswscale/bfin \ - ffmpeg/libswscale/mlib \ - ffmpeg/libswscale/ppc \ - ffmpeg/libswscale/sparc \ - ffmpeg/libswscale/x86 \ gui \ gui/skin \ gui/ui \ @@ -744,20 +725,14 @@ input \ libaf \ libao2 \ - libass \ - libdvdcss \ - libdvdnav \ - libdvdnav/vm \ - libdvdread4 \ libmenu \ libmpcodecs \ libmpcodecs/native \ libmpdemux \ - libmpeg2 \ libvo \ loader \ - loader/dshow \ loader/dmo \ + loader/dshow \ loader/wine \ mp3lib \ osdep \ @@ -766,26 +741,24 @@ stream/librtsp \ stream/realrtsp \ sub \ - tremor \ TOOLS \ vidix \ +ALL_DIRS = $(DIRS) \ + libass \ + libdvdcss \ + libdvdnav \ + libdvdnav/vm \ + libdvdread4 \ + libmpeg2 \ + tremor \ + ALLHEADERS = $(foreach dir,$(DIRS),$(wildcard $(dir)/*.h)) ADDSUFFIXES = $(foreach suf,$(1),$(addsuffix $(suf),$(2))) -ADD_ALL_DIRS = $(call ADDSUFFIXES,$(1),$(DIRS)) +ADD_ALL_DIRS = $(call ADDSUFFIXES,$(1),$(ALL_DIRS)) ADD_ALL_EXESUFS = $(1) $(call ADDSUFFIXES,$(EXESUFS_ALL),$(1)) -FFMPEGPARTS = libavcodec \ - libavformat \ - libavutil \ - libpostproc \ - libswscale \ - -FFMPEGLIBS = $(foreach part, $(FFMPEGPARTS), ffmpeg/$(part)/$(part).a) -FFMPEGFILES = $(foreach part, $(FFMPEGPARTS), $(wildcard ffmpeg/$(part)/*.[chS] ffmpeg/$(part)/*/*.[chS])) - - ###### generic rules ####### @@ -804,11 +777,10 @@ $(CC) $(CC_DEPFLAGS) $(CFLAGS) -c -o $@ $< %-rc.o: %.rc - $(WINDRES) -I. $< $@ + $(WINDRES) -I. $< -o $@ $(FFMPEGLIBS): $(FFMPEGFILES) config.h - $(MAKE) -C $(@D) - touch $@ + $(MAKE) -C ffmpeg $(@:ffmpeg/%=%) mencoder$(EXESUF): $(MENCODER_DEPS) mencoder$(EXESUF): EXTRALIBS += $(EXTRALIBS_MENCODER) @@ -852,12 +824,44 @@ +###### XML documentation ###### + +doc: html-chunked html-single + +html-chunked: $(addprefix html-chunked-,$(DOC_LANGS)) +html-single: $(addprefix html-single-,$(DOC_LANGS)) + +xmllint: $(addprefix xmllint-,$(DOC_LANGS)) + +define lang-def +html-chunked-$(lang): DOCS/HTML/$(lang)/dummy.html +html-single-$(lang): DOCS/HTML/$(lang)/MPlayer.html +DOCS/HTML/$(lang)/dummy.html DOCS/HTML/$(lang)/MPlayer.html: DOCS/xml/$(lang)/main.xml $(wildcard DOCS/xml/$(lang)/*.xml) DOCS/xml/html-common.xsl DOCS/HTML/$(lang)/default.css + +DOCS/HTML/$(lang)/default.css: + mkdir -p $$(@D) + cp -f DOCS/xml/default.css $$(@D) + +DOCS/HTML/$(lang)/dummy.html: + SGML_CATALOG_FILES=$(CATALOG) $(XSLT_COMMAND) $$@ DOCS/xml/html-chunk.xsl $$< + +DOCS/HTML/$(lang)/MPlayer.html: + SGML_CATALOG_FILES=$(CATALOG) $(XSLT_COMMAND) $$@ DOCS/xml/html-single.xsl $$< + +xmllint-$(lang): + SGML_CATALOG_FILES=$(CATALOG) $(XMLLINT_COMMAND) DOCS/xml/$(lang)/main.xml +endef + +$(foreach lang, $(DOC_LANG_ALL),$(eval $(lang-def))) + + + ###### dependency declarations / specific CFLAGS ###### # Make sure all generated header files are created. codec-cfg.o: codecs.conf.h $(DEP_FILES) $(MENCODER_DEPS) $(MPLAYER_DEPS): help_mp.h -mpcommon.o osdep/mplayer-rc.o: version.h +mpcommon.o osdep/mplayer-rc.o gui/ui/gtk/about.o gui/win32/gui.o: version.h osdep/mplayer-rc.o: osdep/mplayer.exe.manifest @@ -951,16 +955,19 @@ rm -f $(foreach lang,$(MAN_LANGS),$(foreach man,mplayer.1 mencoder.1,$(MANDIR)/$(lang)/man1/$(man))) clean: + -$(MAKE) -C ffmpeg $@ + -rm -rf tests/res -rm -f $(call ADD_ALL_DIRS,/*.o /*.a /*.ho /*~) -rm -f $(call ADD_ALL_EXESUFS,mplayer mencoder) distclean: clean testsclean toolsclean driversclean dhahelperclean - -rm -rf DOCS/tech/doxygen + -$(MAKE) -C ffmpeg $@ + -rm -rf DOCS/tech/doxygen DOCS/HTML + -rm -f DOCS/xml/html-chunk.xsl DOCS/xml/html-single.xsl -rm -f $(call ADD_ALL_DIRS,/*.d) -rm -f config.* codecs.conf.h help_mp.h version.h TAGS tags -rm -f $(VIDIX_PCI_FILES) -rm -f $(call ADD_ALL_EXESUFS,codec-cfg cpuinfo) - -rm -f ffmpeg/libavutil/avconfig.h ffmpeg/config.* doxygen: doxygen DOCS/tech/Doxyfile @@ -973,6 +980,43 @@ +###### regression tests ####### + +BROKEN_SAMPLES = \ + h264-conformance/FM1_BT_B.h264 \ + h264-conformance/FM1_FT_E.264 \ + h264-conformance/FM2_SVA_B.264 \ + pva/PVA_test-partial.pva \ + wmv8/wmv_drm.wmv \ + wtv/law-and-order-partial.wtv \ + +AUDIO_ONLY_SAMPLES = \ + aac/% ac3/% amrnb/% amrwb/% atrac1/% atrac3/% bink/binkaudio% \ + creative/% dts/% duck/%-audio-only.avi eac3/% gsm/% imc/% \ + lossless-audio/% mp3-conformance/% musepack/% nellymoser/% \ + qcp/% \ + qt-surge-suite/% real/ra% sipr/% truespeech/% vorbis/% \ + vqf/% w64/% wmapro/% wmavoice/% \ + +# running wildcard with empty FATE_SAMPLES seems to cause a lot of issues +ifdef FATE_SAMPLES +ALLSAMPLES_FULLPATH = $(wildcard $(FATE_SAMPLES)/*/*.*) +ALLSAMPLES = $(patsubst $(FATE_SAMPLES)/%,%,$(ALLSAMPLES_FULLPATH)) +SAMPLES := $(filter-out $(BROKEN_SAMPLES),$(ALLSAMPLES)) +SAMPLES := $(filter-out $(AUDIO_ONLY_SAMPLES),$(SAMPLES)) +RESULTS = $(patsubst %,tests/res/%.md5,$(SAMPLES)) + +fatetest: $(RESULTS) + +tests/res/%.md5: mplayer$(EXESUF) $(FATE_SAMPLES)/% + @tests/faterun.sh $* +else +fatetest: + @echo "You need to set FATE_SAMPLES for fatetest to work" +endif + + + ###### tests / tools ####### TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm @@ -1065,7 +1109,7 @@ install-drivers: $(DRIVER_OBJS) -mkdir -p $(MODULES_DIR) - install -m 644 $(KERNEL_OBJS) $(MODULES_DIR) + $(INSTALL) -m 644 $(KERNEL_OBJS) $(MODULES_DIR) depmod -a -mknod /dev/mga_vid c 178 0 -mknod /dev/tdfx_vid c 178 0 @@ -1075,14 +1119,14 @@ driversclean: -rm -f $(DRIVER_OBJS) drivers/*~ -DHAHELPER_DEPS_FILES = vidix/dhahelper/dhahelper.d vidix/dhahelper/test.d vidix/dhahelperwin/dhahelper.d vidix/dhahelperwin/dhasetup.d +DHAHELPER_DEP_FILES = vidix/dhahelper/dhahelper.d vidix/dhahelper/test.d vidix/dhahelperwin/dhahelper.d vidix/dhahelperwin/dhasetup.d dhahelper: vidix/dhahelper/dhahelper.o vidix/dhahelper/test vidix/dhahelper/dhahelper.o vidix/dhahelper/test: CFLAGS = $(KERNEL_CFLAGS) install-dhahelper: vidix/dhahelper/dhahelper.o -mkdir -p $(MODULES_DIR) - install -m 644 $< $(MODULES_DIR) + $(INSTALL) -m 644 $< $(MODULES_DIR) depmod -a -mknod /dev/dhahelper c 180 0 @@ -1113,11 +1157,11 @@ -rm -f $(addprefix vidix/dhahelperwin/,*.o *~ dhahelper.sys dhasetup.exe base.tmp temp.exp) - --include $(DEP_FILES) $(DRIVER_DEP_FILES) $(TESTS_DEP_FILES) $(TOOLS_DEP_FILES) $(DHAHELPER_DEPS_FILES) +-include $(DEP_FILES) $(DRIVER_DEP_FILES) $(TESTS_DEP_FILES) $(TOOLS_DEP_FILES) $(DHAHELPER_DEP_FILES) .PHONY: all doxygen *install* *tools drivers dhahelper* -.PHONY: checkheaders *clean tests check_checksums +.PHONY: checkheaders *clean tests check_checksums fatetest +.PHONY: doc html-chunked* html-single* xmllint* # Disable suffix rules. Most of the builtin rules are suffix rules, # so this saves some time on slow systems. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/mencoder.c mplayer-1.0~rc4.dfsg1+svn34540/mencoder.c --- mplayer-1.0~rc4.dfsg1+svn33713/mencoder.c 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/mencoder.c 2011-11-29 13:02:45.000000000 +0000 @@ -220,16 +220,6 @@ vo_osd_changed(OSDTYPE_SUBTITLE); } -//-------------------------- config stuff: - -m_config_t* mconfig; - -static int cfg_inc_verbose(m_option_t *conf){ ++verbose; return 0;} - -static int cfg_include(m_option_t *conf, const char *filename){ - return m_config_parse_config_file(mconfig, filename); -} - static double seek_to_sec; static off_t seek_to_byte=0; @@ -248,7 +238,7 @@ static edl_record_ptr next_edl_record = NULL; ///< only for traversing edl_records static short edl_muted; ///< Stores whether EDL is currently in muted mode. static short edl_seeking; ///< When non-zero, stream is seekable. -static short edl_seek_type; ///< When non-zero, frames are discarded instead of seeking. +static int edl_seek_type; ///< When non-zero, frames are discarded instead of seeking. /* This header requires all the global variable declarations. */ #include "cfg-mencoder.h" @@ -269,14 +259,14 @@ { char *conffile; if (!disable_system_conf && - m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mencoder.conf") < 0) + m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mencoder.conf", 1) < 0) mencoder_exit(1,MSGTR_ConfigFileError); if (!disable_user_conf) { if ((conffile = get_path("mencoder.conf")) == NULL) { mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_GetpathProblem); } else { - if (m_config_parse_config_file(conf, conffile) < 0) + if (m_config_parse_config_file(conf, conffile, 1) < 0) mencoder_exit(1,MSGTR_ConfigFileError); free(conffile); } @@ -561,6 +551,8 @@ double v_pts_corr=0; double v_timer_corr=0; +double sub_offset=0; +int did_seek=0; m_entry_t* filelist = NULL; char* filename=NULL; @@ -777,6 +769,9 @@ } } + if (vobsub_name) + vo_vobsub = vobsub_open(vobsub_name, spudec_ifo, 1, &vo_spudec); + // set up video encoder: if (!curfile) { // curfile is non zero when a second file is opened @@ -806,7 +801,7 @@ } #endif } -else { +else if (!vo_spudec) { init_vo_spudec(stream, sh_video, d_dvdsub ? d_dvdsub->sh : NULL); } @@ -832,7 +827,7 @@ mux_v=muxer_new_stream(muxer,MUXER_TYPE_VIDEO); -mux_v->buffer_size=0x200000; // 2MB +mux_v->buffer_size=0x800000; // 8MB mux_v->buffer=malloc(mux_v->buffer_size); mux_v->source=sh_video; @@ -1217,6 +1212,9 @@ if (sh_audio && audio_delay != 0.) fixdelay(d_video, d_audio, mux_a, &frame_data, mux_v->codec==VCODEC_COPY); +// Just assume a seek. Also works if time stamps do not start with 0 +did_seek = 1; + while(!at_eof){ int blit_frame=0; @@ -1256,6 +1254,7 @@ if (result == 2) { at_eof=1; break; } // EOF else if (result == 0) edl_seeking = 0; // no seeking else { // sucess + did_seek = 1; edl_muted = 0; if (last_pos >= sh_video->pts) { // backwards seek detected!! Forget about this EDL skip altogether. @@ -1463,7 +1462,17 @@ ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) != CONTROL_TRUE); void *decoded_frame = decode_video(sh_video,frame_data.start,frame_data.in_size, drop_frame, MP_NOPTS_VALUE, NULL); - blit_frame = decoded_frame && filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE);} + if (did_seek && sh_video->pts != MP_NOPTS_VALUE) { + did_seek = 0; + sub_offset = sh_video->pts; + } + // NOTE: this is not really correct, but it allows -ass to work mostly + // v_muxer_time was tried before, but it is completely off when -ss is used + // (see bug #1960). + // sh_video->pts causes flickering with subtitles and complaints from MPEG-4 + // encoder due to not being monotonic. + // If you change this please note the reason here! + blit_frame = decoded_frame && filter_video(sh_video, decoded_frame, v_muxer_time + sub_offset);} v_muxer_time = adjusted_muxer_time(mux_v); // update after muxing if (sh_video->vf_initialized < 0) mencoder_exit(1, NULL); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/mixer.c mplayer-1.0~rc4.dfsg1+svn34540/mixer.c --- mplayer-1.0~rc4.dfsg1+svn33713/mixer.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/mixer.c 2011-10-26 15:12:35.000000000 +0000 @@ -28,7 +28,7 @@ #include "libao2/audio_out.h" #include "libaf/af.h" #include "mixer.h" - +#include "mp_msg.h" #include "help_mp.h" char * mixer_device=NULL; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/m_option.c mplayer-1.0~rc4.dfsg1+svn34540/m_option.c --- mplayer-1.0~rc4.dfsg1+svn33713/m_option.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/m_option.c 2012-01-05 20:32:10.000000000 +0000 @@ -715,6 +715,28 @@ /////////////////// Func based options +static int parse_call_func(const m_option_t* opt,const char *name, const char *param, void* dst, int src) { + int res = ((m_opt_func_param_t) opt->p)(opt,param); + if (res < 0) + return res; + return 1; +} + +// special variant, will not have a history/be able to +// be used as per-file option etc. +const m_option_type_t m_option_type_func_param_immediate = { + "Func param once", + "", + 0, + M_OPT_TYPE_INDIRECT, + parse_call_func, + NULL, + NULL, // Nothing to do on save + NULL, + NULL, + NULL +}; + // A chained list to save the various calls for func_param and func_full typedef struct m_func_save m_func_save_t; struct m_func_save { @@ -888,6 +910,8 @@ if(opt->priv == NULL) return M_OPT_EXIT; + if(opt->priv == PRIV_NO_EXIT) + return 0; return 1; } @@ -1052,22 +1076,28 @@ } mp_imgfmt_list[] = { {"444p16le", IMGFMT_444P16_LE}, {"444p16be", IMGFMT_444P16_BE}, + {"444p10le", IMGFMT_444P10_LE}, + {"444p10be", IMGFMT_444P10_BE}, + {"444p9le", IMGFMT_444P9_LE}, + {"444p9be", IMGFMT_444P9_BE}, {"422p16le", IMGFMT_422P16_LE}, {"422p16be", IMGFMT_422P16_BE}, {"422p10le", IMGFMT_422P10_LE}, {"422p10be", IMGFMT_422P10_BE}, + {"422p9le", IMGFMT_422P9_LE}, + {"422p9be", IMGFMT_422P9_BE}, {"420p16le", IMGFMT_420P16_LE}, {"420p16be", IMGFMT_420P16_BE}, {"420p10le", IMGFMT_420P10_LE}, {"420p10be", IMGFMT_420P10_BE}, - {"420p9le", IMGFMT_420P9_LE}, - {"420p9be", IMGFMT_420P9_BE}, - {"444p16", IMGFMT_444P16}, - {"422p16", IMGFMT_422P16}, - {"422p10", IMGFMT_422P10}, - {"420p16", IMGFMT_420P16}, - {"420p10", IMGFMT_420P10}, - {"420p9", IMGFMT_420P9}, + {"420p9le", IMGFMT_420P9_LE}, + {"420p9be", IMGFMT_420P9_BE}, + {"444p16", IMGFMT_444P16}, + {"422p16", IMGFMT_422P16}, + {"422p10", IMGFMT_422P10}, + {"420p16", IMGFMT_420P16}, + {"420p10", IMGFMT_420P10}, + {"420p9", IMGFMT_420P9}, {"420a", IMGFMT_420A}, {"444p", IMGFMT_444P}, {"422p", IMGFMT_422P}, @@ -1084,7 +1114,7 @@ {"clpl", IMGFMT_CLPL}, {"hm12", IMGFMT_HM12}, {"y800", IMGFMT_Y800}, - {"y8", IMGFMT_Y8}, + {"y8", IMGFMT_Y8}, {"nv12", IMGFMT_NV12}, {"nv21", IMGFMT_NV21}, {"bgr24", IMGFMT_BGR24}, @@ -1112,6 +1142,7 @@ {"argb", IMGFMT_ARGB}, {"bgra", IMGFMT_BGRA}, {"abgr", IMGFMT_ABGR}, + {"gbr24p", IMGFMT_GBR24P}, {"mjpeg", IMGFMT_MJPEG}, {"mjpg", IMGFMT_MJPEG}, { NULL, 0 } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/m_option.h mplayer-1.0~rc4.dfsg1+svn34540/m_option.h --- mplayer-1.0~rc4.dfsg1+svn33713/m_option.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/m_option.h 2011-11-03 13:24:53.000000000 +0000 @@ -21,13 +21,13 @@ #include -/// \defgroup Options +/// \defgroup options Options /// m_option allows to parse, print and copy data of various types. /// It is the base of the \ref OptionsStruct, \ref Config and /// \ref Properties APIs. ///@{ -/// \file m_option.h +/// \file /// \ingroup OptionTypes typedef struct m_option_type m_option_type_t; @@ -62,6 +62,7 @@ // Func-based types extern const m_option_type_t m_option_type_func_full; extern const m_option_type_t m_option_type_func_param; +extern const m_option_type_t m_option_type_func_param_immediate; extern const m_option_type_t m_option_type_func; /// Callback used to reset func options. @@ -177,6 +178,7 @@ #define CONF_TYPE_STRING (&m_option_type_string) #define CONF_TYPE_FUNC (&m_option_type_func) #define CONF_TYPE_FUNC_PARAM (&m_option_type_func_param) +#define CONF_TYPE_FUNC_PARAM_IMMEDIATE (&m_option_type_func_param_immediate) #define CONF_TYPE_PRINT (&m_option_type_print) #define CONF_TYPE_PRINT_INDIRECT (&m_option_type_print_indirect) #define CONF_TYPE_PRINT_FUNC (&m_option_type_print_func) @@ -305,6 +307,12 @@ }; +/// \defgroup PrivFlags Private data +/// @{ +/// Don't exit after printing a CONF_TYPE_PRINT option. +#define PRIV_NO_EXIT (void *)-1 +///@} + /// \defgroup OptionFlags Option flags ///@{ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/mpbswap.h mplayer-1.0~rc4.dfsg1+svn34540/mpbswap.h --- mplayer-1.0~rc4.dfsg1+svn33713/mpbswap.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/mpbswap.h 2011-08-11 17:45:43.000000000 +0000 @@ -31,8 +31,4 @@ #define be2me_16(v) av_be2ne16(v) #define be2me_32(v) av_be2ne32(v) -#ifndef HAVE_SWAB -void swab(const void *from, void *to, ssize_t n); -#endif - #endif /* MPLAYER_MPBSWAP_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/mpcommon.c mplayer-1.0~rc4.dfsg1+svn34540/mpcommon.c --- mplayer-1.0~rc4.dfsg1+svn33713/mpcommon.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/mpcommon.c 2011-10-25 20:45:09.000000000 +0000 @@ -40,8 +40,10 @@ #include "cpudetect.h" #include "help_mp.h" #include "mp_msg.h" +#include "parser-cfg.h" #include "sub/spudec.h" #include "version.h" +#include "sub/ass_mp.h" #include "sub/vobsub.h" #include "sub/av_sub.h" #include "libmpcodecs/dec_teletext.h" @@ -52,7 +54,6 @@ double sub_last_pts = -303; #ifdef CONFIG_ASS -#include "sub/ass_mp.h" ASS_Track* ass_track = 0; // current track to render #endif @@ -77,9 +78,9 @@ gCpuCaps.has3DNow, gCpuCaps.has3DNowExt, gCpuCaps.hasSSE, gCpuCaps.hasSSE2, gCpuCaps.hasSSSE3); #if CONFIG_RUNTIME_CPUDETECT - mp_msg(MSGT_CPLAYER,MSGL_V, MSGTR_CompiledWithRuntimeDetection); + mp_msg(MSGT_CPLAYER, MSGL_V, "Compiled with runtime CPU detection.\n"); #else - mp_msg(MSGT_CPLAYER,MSGL_V, MSGTR_CompiledWithCPUExtensions); + mp_msg(MSGT_CPLAYER, MSGL_V, "Compiled for x86 CPU with extensions:"); if (HAVE_MMX) mp_msg(MSGT_CPLAYER,MSGL_V," MMX"); if (HAVE_MMX2) @@ -407,6 +408,19 @@ #endif /* CONFIG_GUI */ } +m_config_t *mconfig; + +int cfg_inc_verbose(m_option_t *conf) +{ + ++verbose; + return 0; +} + +int cfg_include(m_option_t *conf, const char *filename) +{ + return m_config_parse_config_file(mconfig, filename, 0); +} + const m_option_t noconfig_opts[] = { {"all", noconfig_all, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL}, {"system", &disable_system_conf, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 1, NULL}, @@ -478,7 +492,7 @@ free(conf_path); return 0; } - mp_msg(MSGT_CPLAYER,MSGL_V,MSGTR_BuiltinCodecsConf); + mp_msg(MSGT_CPLAYER, MSGL_V, "Using built-in default codecs.conf.\n"); } } free(conf_path); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/mpcommon.h mplayer-1.0~rc4.dfsg1+svn34540/mpcommon.h --- mplayer-1.0~rc4.dfsg1+svn33713/mpcommon.h 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/mpcommon.h 2011-08-11 17:45:25.000000000 +0000 @@ -77,6 +77,9 @@ int select_audio(demuxer_t* demuxer, int audio_id, char* audio_lang); void set_osd_subtitle(subtitle *subs); +int cfg_inc_verbose(m_option_t *conf); +int cfg_include(m_option_t *conf, const char *filename); + void common_preinit(void); int common_init(void); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/mp_core.h mplayer-1.0~rc4.dfsg1+svn34540/mp_core.h --- mplayer-1.0~rc4.dfsg1+svn33713/mp_core.h 2011-06-21 02:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/mp_core.h 2011-08-18 19:15:06.000000000 +0000 @@ -95,8 +95,6 @@ int startup_decode_retry; // how long until we need to display the "current" frame float time_frame; - // flag to indicate that we've found a correctly timed video frame PTS - int framestep_found; // AV sync: the next frame should be shown when the audio out has this // much (in seconds) buffered data left. Increased when more data is diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/mplayer.c mplayer-1.0~rc4.dfsg1+svn34540/mplayer.c --- mplayer-1.0~rc4.dfsg1+svn33713/mplayer.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/mplayer.c 2011-12-11 14:44:36.000000000 +0000 @@ -145,24 +145,6 @@ float start_volume = -1; double start_pts = MP_NOPTS_VALUE; char *heartbeat_cmd; - -m_config_t *mconfig; - -//**************************************************************************// -// Config file -//**************************************************************************// - -static int cfg_inc_verbose(m_option_t *conf) -{ - ++verbose; - return 0; -} - -static int cfg_include(m_option_t *conf, const char *filename) -{ - return m_config_parse_config_file(mconfig, filename); -} - static int max_framesize; int noconsolecontrols; @@ -584,7 +566,7 @@ uninit_audio(mpctx->sh_audio); #ifdef CONFIG_GUI if (use_gui) - guiGetEvent(guiSetAfilter, (char *)NULL); + gui(GUI_SET_AFILTER, NULL); #endif mpctx->sh_audio = NULL; mpctx->mixer.afilter = NULL; @@ -877,7 +859,7 @@ char *conffile; int conffile_fd; if (!disable_system_conf && - m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf") < 0) + m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf", 1) < 0) exit_player(EXIT_NONE); if ((conffile = get_path("")) == NULL) { mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_NoHomeDir); @@ -897,7 +879,7 @@ close(conffile_fd); } if (!disable_user_conf && - m_config_parse_config_file(conf, conffile) < 0) + m_config_parse_config_file(conf, conffile, 1) < 0) exit_player(EXIT_NONE); free(conffile); } @@ -974,7 +956,7 @@ if (stat(file, &st)) return 0; mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_LoadingConfig, file); - m_config_parse_config_file(conf, file); + m_config_parse_config_file(conf, file, 0); return 1; } @@ -1008,6 +990,17 @@ } } +static int load_profile_config(m_config_t *conf, const char *const file) +{ + if (file) { + load_per_protocol_config(conf, file); + load_per_extension_config(conf, file); + load_per_file_config(conf, file); + } + + return file != NULL; +} + /* When libmpdemux performs a blocking operation (network connection or * cache filling) if the operation fails we use this function to check * if it was interrupted by the user. @@ -1042,7 +1035,7 @@ #ifdef CONFIG_GUI if (use_gui) { if (entry) { - import_playtree_playlist_into_gui(entry, mconfig); + guiPlaylistAdd(entry, mconfig); play_tree_free_list(entry, 1); } } else @@ -1334,7 +1327,7 @@ if (!sh_audio) { #ifdef CONFIG_GUI if (use_gui) - guiGetEvent(guiSetAfilter, (char *)NULL); + gui(GUI_SET_AFILTER, NULL); #endif mpctx->mixer.afilter = NULL; return 0; @@ -1359,7 +1352,7 @@ mpctx->mixer.afilter = sh_audio->afilter; #ifdef CONFIG_GUI if (use_gui) - guiGetEvent(guiSetAfilter, (char *)sh_audio->afilter); + gui(GUI_SET_AFILTER, sh_audio->afilter); #endif return result; } @@ -1591,7 +1584,8 @@ int percentage = -1; char percentage_text[10]; char fractions_text[4]; - int pts = demuxer_get_current_time(mpctx->demuxer); + double pts = demuxer_get_current_time(mpctx->demuxer); + int pts_seconds = pts; if (mpctx->osd_show_percentage) percentage = demuxer_get_percent_pos(mpctx->demuxer); @@ -1604,8 +1598,7 @@ if (osd_fractions == 1) { // print fractions as sub-second timestamp snprintf(fractions_text, sizeof(fractions_text), ".%02d", - (int)((mpctx->sh_video->pts - pts) * 100 + 0.5) - % 100); + (int)((pts - pts_seconds) * 100) % 100); } else if (osd_fractions == 2) { // print fractions by estimating the frame count within the // second @@ -1616,7 +1609,7 @@ // we add 0.2 and cut off at the decimal point, which proved // as good heuristic snprintf(fractions_text, sizeof(fractions_text), ".%02d", - (int)((mpctx->sh_video->pts - pts) * + (int)((pts - pts_seconds) * mpctx->sh_video->fps + 0.2)); } else { // do not print fractions @@ -1626,13 +1619,13 @@ if (osd_level == 3) snprintf(osd_text_timer, 63, "%c %02d:%02d:%02d%s / %02d:%02d:%02d%s", - mpctx->osd_function, pts / 3600, (pts / 60) % 60, pts % 60, + mpctx->osd_function, pts_seconds / 3600, (pts_seconds / 60) % 60, pts_seconds % 60, fractions_text, len / 3600, (len / 60) % 60, len % 60, percentage_text); else snprintf(osd_text_timer, 63, "%c %02d:%02d:%02d%s%s", - mpctx->osd_function, pts / 3600, (pts / 60) % 60, - pts % 60, fractions_text, percentage_text); + mpctx->osd_function, pts_seconds / 3600, (pts_seconds / 60) % 60, + pts_seconds % 60, fractions_text, percentage_text); } else osd_text_timer[0] = 0; @@ -2038,9 +2031,9 @@ mpctx->nav_in_size = -1; if (in_size > 0) - mpctx->nav_buffer = malloc(in_size); + mpctx->nav_buffer = malloc(in_size); if (mpctx->nav_buffer) { - mpctx->nav_start = start; + mpctx->nav_start = start; mpctx->nav_in_size = in_size; memcpy(mpctx->nav_buffer, start, in_size); } @@ -2447,29 +2440,6 @@ if (full_frame) { sh_video->timer += frame_time; - - // Time-based PTS recalculation. - // The key to maintaining A-V sync is to not touch PTS until the proper frame is reached - if (sh_video->pts != MP_NOPTS_VALUE) { - if (sh_video->last_pts != MP_NOPTS_VALUE) { - double pts = sh_video->last_pts + frame_time; - double ptsdiff = fabs(pts - sh_video->pts); - - // Allow starting PTS recalculation at the appropriate frame only - mpctx->framestep_found |= (ptsdiff <= frame_time * 1.5); - - // replace PTS only if we're not too close and not too far - // and a correctly timed frame has been found, otherwise - // keep pts to eliminate rounding errors or catch up with stream - if (ptsdiff > frame_time * 20) - mpctx->framestep_found = 0; - if (ptsdiff * 10 > frame_time && mpctx->framestep_found) - sh_video->pts = pts; - else - mp_dbg(MSGT_AVSYNC, MSGL_DBG2, "Keeping PTS at %6.2f\n", sh_video->pts); - } - sh_video->last_pts = sh_video->pts; - } if (mpctx->sh_audio) mpctx->delay -= frame_time; // video_read_frame can change fps (e.g. for ASF video) @@ -2537,7 +2507,7 @@ } #ifdef CONFIG_GUI if (use_gui) - guiGetEvent(guiSetState, (void *)GUI_PAUSE); + gui(GUI_SET_STATE, (void *)GUI_PAUSE); #endif if (mpctx->video_out && mpctx->sh_video && vo_config_count) mpctx->video_out->control(VOCTRL_PAUSE, NULL); @@ -2556,8 +2526,8 @@ mpctx->video_out->check_events(); #ifdef CONFIG_GUI if (use_gui) { - guiEventHandling(); - guiGetEvent(guiReDraw, NULL); + gui(GUI_HANDLE_EVENTS, 0); + gui(GUI_REDRAW, 0); if (guiInfo.Playing != GUI_PAUSE || (rel_seek_secs || abs_seek_pos)) break; } @@ -2604,7 +2574,7 @@ if (guiInfo.Playing == GUI_STOP) mpctx->eof = 1; else - guiGetEvent(guiSetState, (void *)GUI_PLAY); + gui(GUI_SET_STATE, (void *)GUI_PLAY); } #endif } @@ -2713,7 +2683,6 @@ mpctx->num_buffered_frames = 0; mpctx->delay = 0; mpctx->time_frame = 0; - mpctx->framestep_found = 0; // Not all demuxers set d_video->pts during seek, so this value // (which is used by at least vobsub and edl code below) may // be completely wrong (probably 0). @@ -2761,10 +2730,9 @@ int main(int argc, char *argv[]) { int opt_exit = 0; // Flag indicating whether MPlayer should exit without playing anything. + int profile_config_loaded; int i; - int gui_no_filename = 0; - common_preinit(); // Create the config context and register the options @@ -2845,7 +2813,7 @@ #endif if (use_gui && mpctx->playtree_iter) { char cwd[PATH_MAX + 2]; - // Free Playtree and Playtree-Iter as it's not used by the GUI. + // Free playtree_iter as it's not used in connection with the GUI. play_tree_iter_free(mpctx->playtree_iter); mpctx->playtree_iter = NULL; @@ -2855,7 +2823,7 @@ play_tree_add_bpf(mpctx->playtree, cwd); } // Import initital playtree into GUI. - import_initial_playtree_into_gui(mpctx->playtree, mconfig, enqueue); + guiPlaylistInitialize(mpctx->playtree, mconfig, enqueue); } #endif /* CONFIG_GUI */ @@ -2920,14 +2888,10 @@ if (opt_exit) exit_player(EXIT_NONE); - if (!filename) { - if (use_gui) - gui_no_filename = 1; - else if (!player_idle_mode) { - // no file/vcd/dvd -> show HELP: - mp_msg(MSGT_CPLAYER, MSGL_INFO, help_text); - exit_player_with_rc(EXIT_NONE, 0); - } + if (!filename && !player_idle_mode && !use_gui) { + // no file/vcd/dvd -> show HELP: + mp_msg(MSGT_CPLAYER, MSGL_INFO, help_text); + exit_player_with_rc(EXIT_NONE, 0); } /* Display what configure line was used */ @@ -2935,7 +2899,7 @@ // Many users forget to include command line in bugreports... if (mp_msg_test(MSGT_CPLAYER, MSGL_V)) { - mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_CommandLine); + mp_msg(MSGT_CPLAYER, MSGL_INFO, "CommandLine:"); for (i = 1; i < argc; i++) mp_msg(MSGT_CPLAYER, MSGL_INFO, " '%s'", argv[i]); mp_msg(MSGT_CPLAYER, MSGL_INFO, "\n"); @@ -2963,7 +2927,7 @@ close(rtc_fd); rtc_fd = -1; } else - mp_msg(MSGT_CPLAYER, MSGL_V, MSGTR_UsingRTCTiming, irqp); + mp_msg(MSGT_CPLAYER, MSGL_V, "Using Linux hardware RTC timing (%ldHz).\n", irqp); } } #ifdef CONFIG_GUI @@ -2998,16 +2962,16 @@ #ifdef CONFIG_MENU if (use_menu) { if (menu_cfg && menu_init(mpctx, menu_cfg)) - mp_msg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, menu_cfg); + mp_msg(MSGT_CPLAYER, MSGL_V, "Menu initialized: %s\n", menu_cfg); else { menu_cfg = get_path("menu.conf"); if (menu_init(mpctx, menu_cfg)) - mp_msg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, menu_cfg); + mp_msg(MSGT_CPLAYER, MSGL_V, "Menu initialized: %s\n", menu_cfg); else { if (menu_init(mpctx, MPLAYER_CONFDIR "/menu.conf")) - mp_msg(MSGT_CPLAYER, MSGL_V, MSGTR_MenuInitialized, MPLAYER_CONFDIR "/menu.conf"); + mp_msg(MSGT_CPLAYER, MSGL_V, "Menu initialized: %s\n", MPLAYER_CONFDIR "/menu.conf"); else { - mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_MenuInitFailed); + mp_msg(MSGT_CPLAYER, MSGL_ERR, "Menu init failed.\n"); use_menu = 0; } } @@ -3038,7 +3002,9 @@ #ifdef CONFIG_SIGHANDLER // fatal errors: signal(SIGBUS, exit_sighandler); // bus error +#ifndef __WINE__ // hack: the Wine executable will crash else signal(SIGSEGV, exit_sighandler); // segfault +#endif signal(SIGILL, exit_sighandler); // illegal instruction signal(SIGFPE, exit_sighandler); // floating point exc. signal(SIGABRT, exit_sighandler); // abort() @@ -3051,8 +3017,8 @@ #ifdef CONFIG_GUI if (use_gui) { guiInit(); - guiGetEvent(guiSetContext, mpctx); - guiGetEvent(guiSetState, (void *)((gui_no_filename) ? GUI_STOP : GUI_PLAY)); + gui(GUI_SET_CONTEXT, mpctx); + gui(GUI_SET_STATE, (void *)(filename ? GUI_PLAY : GUI_STOP)); } #endif @@ -3064,11 +3030,7 @@ mpctx->global_sub_size = 0; memset(mpctx->sub_counts, 0, sizeof(mpctx->sub_counts)); - if (filename) { - load_per_protocol_config(mconfig, filename); - load_per_extension_config(mconfig, filename); - load_per_file_config(mconfig, filename); - } + profile_config_loaded = load_profile_config(mconfig, filename); if (video_driver_list) load_per_output_config(mconfig, PROFILE_CFG_VO, video_driver_list[0]); @@ -3090,37 +3052,20 @@ #ifdef CONFIG_GUI if (use_gui) { mpctx->file_format = DEMUXER_TYPE_UNKNOWN; - guiGetEvent(guiSetDefaults, 0); while (guiInfo.Playing != GUI_PLAY) { mp_cmd_t *cmd; usec_sleep(20000); - guiEventHandling(); - guiGetEvent(guiReDraw, NULL); + gui(GUI_HANDLE_EVENTS, 0); + gui(GUI_REDRAW, 0); if ((cmd = mp_input_get_cmd(0, 0, 0)) != NULL) { - guiGetEvent(guiIEvent, (char *)cmd->id); + if (cmd->id == MP_CMD_GUI) + gui(GUI_RUN_MESSAGE, cmd->args[0].v.s); + else + gui(GUI_RUN_COMMAND, (void *)cmd->id); mp_cmd_free(cmd); } } - guiGetEvent(guiSetParameters, NULL); - if (guiInfo.StreamType == STREAMTYPE_STREAM) { - play_tree_t *entry = play_tree_new(); - play_tree_add_file(entry, guiInfo.Filename); - if (mpctx->playtree) - play_tree_free_list(mpctx->playtree->child, 1); - else - mpctx->playtree = play_tree_new(); - play_tree_set_child(mpctx->playtree, entry); - if (mpctx->playtree) { - mpctx->playtree_iter = play_tree_iter_new(mpctx->playtree, mconfig); - if (mpctx->playtree_iter) { - if (play_tree_iter_step(mpctx->playtree_iter, 0, 0) != PLAY_TREE_ITER_ENTRY) { - play_tree_iter_free(mpctx->playtree_iter); - mpctx->playtree_iter = NULL; - } - filename = play_tree_iter_get_file(mpctx->playtree_iter, 1); - } - } - } + gui(GUI_PREPARE, 0); } #endif /* CONFIG_GUI */ @@ -3183,6 +3128,8 @@ filename = play_tree_iter_get_file(mpctx->playtree_iter, 1); } } + + if (!profile_config_loaded) load_profile_config(mconfig, filename); //--------------------------------------------------------------------------- if (mpctx->video_out && vo_config_count) @@ -3244,7 +3191,7 @@ #ifdef CONFIG_GUI if (use_gui) - guiGetEvent(guiSetStream, (char *)mpctx->stream); + gui(GUI_SET_STREAM, mpctx->stream); #endif if (mpctx->file_format == DEMUXER_TYPE_PLAYLIST) { @@ -3620,7 +3567,6 @@ { mpctx->num_buffered_frames = 0; - mpctx->framestep_found = 0; // Make sure old OSD does not stay around, // e.g. with -fixed-vo and same-resolution files @@ -3677,18 +3623,9 @@ #ifdef CONFIG_GUI if (use_gui) { - if (mpctx->sh_audio) - guiInfo.AudioType = mpctx->sh_audio->channels; - else - guiInfo.AudioType = 0; - if (!mpctx->sh_video && mpctx->sh_audio) - guiGetEvent(guiSetAudioOnly, (char *)1); - else - guiGetEvent(guiSetAudioOnly, (char *)0); - guiGetEvent(guiSetFileFormat, (char *)mpctx->demuxer->file_format); - if (guiGetEvent(guiSetValues, (char *)mpctx->sh_video)) + if (!gui(GUI_SET_VIDEO, mpctx->sh_video)) goto goto_next_file; - guiGetEvent(guiSetDemuxer, (char *)mpctx->demuxer); + gui(GUI_SET_AUDIO, mpctx->sh_audio); } #endif @@ -3821,7 +3758,7 @@ #ifdef CONFIG_GUI if (use_gui) - guiEventHandling(); + gui(GUI_HANDLE_EVENTS, 0); #endif current_module = "vo_check_events"; @@ -3992,7 +3929,7 @@ #ifdef CONFIG_GUI if (use_gui) { - guiEventHandling(); + gui(GUI_HANDLE_EVENTS, 0); if (mpctx->demuxer->file_format == DEMUXER_TYPE_AVI && mpctx->sh_video && mpctx->sh_video->video.dwLength > 2) { // get pos from frame number / total frames guiInfo.Position = (float)mpctx->d_video->pack_no * 100.0f / mpctx->sh_video->video.dwLength; @@ -4000,22 +3937,22 @@ guiInfo.Position = demuxer_get_percent_pos(mpctx->demuxer); } if (mpctx->sh_video) - guiInfo.TimeSec = mpctx->sh_video->pts; + guiInfo.ElapsedTime = mpctx->sh_video->pts; else if (mpctx->sh_audio) - guiInfo.TimeSec = playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out); - guiInfo.LengthInSec = demuxer_get_time_length(mpctx->demuxer); - guiGetEvent(guiReDraw, NULL); - guiGetEvent(guiSetVolume, NULL); + guiInfo.ElapsedTime = playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out); + guiInfo.RunningTime = demuxer_get_time_length(mpctx->demuxer); + gui(GUI_SET_MIXER, 0); + gui(GUI_REDRAW, 0); if (guiInfo.Playing == GUI_STOP) break; // STOP if (guiInfo.Playing == GUI_PAUSE) mpctx->osd_function = OSD_PAUSE; - if (guiInfo.DiskChanged || guiInfo.NewPlay) + if (guiInfo.NewPlay) goto goto_next_file; #ifdef CONFIG_DVDREAD if (mpctx->stream->type == STREAMTYPE_DVD) { dvd_priv_t *dvdp = mpctx->stream->priv; - guiInfo.DVD.current_chapter = dvd_chapter_from_cell(dvdp, guiInfo.DVD.current_title - 1, dvdp->cur_cell) + 1; + guiInfo.Chapter = dvd_chapter_from_cell(dvdp, guiInfo.Track - 1, dvdp->cur_cell) + 1; } #endif } @@ -4108,20 +4045,17 @@ } #ifdef CONFIG_GUI - if (use_gui && !mpctx->playtree_iter) { -#ifdef CONFIG_DVDREAD - if (!guiInfo.DiskChanged) -#endif - uiEnd(); - } + if (use_gui) + if (guiInfo.NewPlay != GUI_FILE_SAME) + gui(GUI_END_FILE, 0); #endif if ( #ifdef CONFIG_GUI (use_gui && guiInfo.Playing) || #endif - mpctx->playtree_iter != NULL || player_idle_mode) { - if (!mpctx->playtree_iter) + mpctx->playtree_iter != NULL || player_idle_mode) { + if (!mpctx->playtree_iter && !use_gui) filename = NULL; mpctx->eof = 0; goto play_next_file; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/m_property.h mplayer-1.0~rc4.dfsg1+svn34540/m_property.h --- mplayer-1.0~rc4.dfsg1+svn33713/m_property.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/m_property.h 2011-11-03 13:24:53.000000000 +0000 @@ -21,7 +21,7 @@ #include "m_option.h" -/// \defgroup Properties +/// \defgroup properties Properties /// /// Properties provide an interface to query and set the state of various /// things in MPlayer. The API is based on the \ref Options API like the diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/m_struct.h mplayer-1.0~rc4.dfsg1+svn34540/m_struct.h --- mplayer-1.0~rc4.dfsg1+svn33713/m_struct.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/m_struct.h 2011-08-11 17:45:38.000000000 +0000 @@ -24,7 +24,7 @@ /// An API to manipulate structs using m_option. ///@{ -/// \file m_struct.h +/// \file struct m_option; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/osdep/glob-win.c mplayer-1.0~rc4.dfsg1+svn34540/osdep/glob-win.c --- mplayer-1.0~rc4.dfsg1+svn33713/osdep/glob-win.c 2011-01-07 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/osdep/glob-win.c 2011-10-23 11:51:44.000000000 +0000 @@ -27,54 +27,45 @@ #include "glob.h" int glob(const char *pattern, int flags, - int (*errfunc)(const char *epath, int eerrno), glob_t *pglob) + int (*errfunc)(const char *epath, int eerrno), glob_t *pglob) { - HANDLE searchhndl; + HANDLE searchhndl; WIN32_FIND_DATA found_file; - if(errfunc)printf("glob():ERROR:Sorry errfunc not supported by this implementation\n"); - if(flags)printf("glob():ERROR:Sorry no flags supported by this globimplementation\n"); - //printf("PATTERN \"%s\"\n",pattern); - pglob->gl_pathc = 0; - searchhndl = FindFirstFile( pattern,&found_file); - if(searchhndl == INVALID_HANDLE_VALUE) - { - if(GetLastError() == ERROR_FILE_NOT_FOUND) - { - pglob->gl_pathc = 0; - //printf("could not find a file matching your search criteria\n"); - return 1; - } - else - { - //printf("glob():ERROR:FindFirstFile: %i\n",GetLastError()); - return 1; - } - } - pglob->gl_pathv = malloc(sizeof(char*)); + if (errfunc) + printf("glob():ERROR:Sorry errfunc not supported by this implementation\n"); + if (flags) + printf("glob():ERROR:Sorry no flags supported by this globimplementation\n"); + //printf("PATTERN \"%s\"\n",pattern); + pglob->gl_pathc = 0; + searchhndl = FindFirstFile(pattern, &found_file); + if (searchhndl == INVALID_HANDLE_VALUE) { + if (GetLastError() == ERROR_FILE_NOT_FOUND) { + pglob->gl_pathc = 0; + //printf("could not find a file matching your search criteria\n"); + return 1; + } else { + //printf("glob():ERROR:FindFirstFile: %i\n",GetLastError()); + return 1; + } + } + pglob->gl_pathv = malloc(sizeof(char *)); pglob->gl_pathv[0] = strdup(found_file.cFileName); pglob->gl_pathc++; - while(1) - { - if(!FindNextFile(searchhndl,&found_file)) - { - if(GetLastError()==ERROR_NO_MORE_FILES) - { - //printf("glob(): no more files found\n"); + while (1) { + if (!FindNextFile(searchhndl, &found_file)) { + if (GetLastError() == ERROR_NO_MORE_FILES) { + //printf("glob(): no more files found\n"); break; - } - else - { - //printf("glob():ERROR:FindNextFile:%i\n",GetLastError()); - return 1; - } - } - else - { + } else { + //printf("glob():ERROR:FindNextFile:%i\n",GetLastError()); + return 1; + } + } else { //printf("glob: found file %s\n",found_file.cFileName); pglob->gl_pathc++; - pglob->gl_pathv = realloc(pglob->gl_pathv,pglob->gl_pathc * sizeof(char*)); - pglob->gl_pathv[pglob->gl_pathc-1] = strdup(found_file.cFileName); - } + pglob->gl_pathv = realloc(pglob->gl_pathv, pglob->gl_pathc * sizeof(char *)); + pglob->gl_pathv[pglob->gl_pathc - 1] = strdup(found_file.cFileName); + } } FindClose(searchhndl); return 0; @@ -82,25 +73,26 @@ void globfree(glob_t *pglob) { - int i; - for(i=0; i gl_pathc ;i++) - { - free(pglob->gl_pathv[i]); - } - free(pglob->gl_pathv); + int i; + for (i = 0; i < pglob->gl_pathc; i++) + free(pglob->gl_pathv[i]); + free(pglob->gl_pathv); } #if 0 -int main(void){ - glob_t gg; - printf("globtest\n"); - glob( "*.jpeg",0,NULL,&gg ); - { +int main(void) +{ + glob_t gg; + printf("globtest\n"); + glob("*.jpeg", 0, NULL, &gg); + { int i; - for(i=0;i #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/osdep/shmem.c mplayer-1.0~rc4.dfsg1+svn34540/osdep/shmem.c --- mplayer-1.0~rc4.dfsg1+svn33713/osdep/shmem.c 2011-05-25 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/osdep/shmem.c 2011-08-11 17:45:43.000000000 +0000 @@ -33,8 +33,6 @@ #include #if HAVE_SYS_MMAN_H #include -#elif defined(__BEOS__) -#include #endif #include #include diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/osdep/swab.c mplayer-1.0~rc4.dfsg1+svn34540/osdep/swab.c --- mplayer-1.0~rc4.dfsg1+svn33713/osdep/swab.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/osdep/swab.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -/* - * 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 "config.h" - -/* system has no swab. emulate via bswap */ -#include "mpbswap.h" -#include - -void swab(const void *from, void *to, ssize_t n) { - const int16_t *in = (int16_t*)from; - int16_t *out = (int16_t*)to; - int i; - n /= 2; - for (i = 0 ; i < n; i++) { - out[i] = bswap_16(in[i]); - } -} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/osdep/timer-linux.c mplayer-1.0~rc4.dfsg1+svn34540/osdep/timer-linux.c --- mplayer-1.0~rc4.dfsg1+svn33713/osdep/timer-linux.c 2010-10-26 08:15:57.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/osdep/timer-linux.c 2011-08-11 17:45:43.000000000 +0000 @@ -20,9 +20,6 @@ */ #include -#ifdef __BEOS__ -#define usleep(t) snooze(t) -#endif #include #include #include diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/parser-cfg.c mplayer-1.0~rc4.dfsg1+svn34540/parser-cfg.c --- mplayer-1.0~rc4.dfsg1+svn33713/parser-cfg.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/parser-cfg.c 2011-10-25 20:45:09.000000000 +0000 @@ -50,9 +50,10 @@ /// Setup the \ref Config from a config file. /** \param config The config object. * \param conffile Path to the config file. + * \param silent print message when failing to open file only at verbose level * \return 1 on sucess, -1 on error. */ -int m_config_parse_config_file(m_config_t* config, const char *conffile) +int m_config_parse_config_file(m_config_t* config, const char *conffile, int silent) { #define PRINT_LINENUM mp_msg(MSGT_CFGPARSER,MSGL_V,"%s(%d): ", conffile, line_num) #define MAX_LINE_LEN 10000 @@ -79,7 +80,7 @@ #endif mp_msg(MSGT_CFGPARSER,MSGL_V,"Reading config file %s", conffile); - if (recursion_depth > MAX_RECURSION_DEPTH) { + if (++recursion_depth > MAX_RECURSION_DEPTH) { mp_msg(MSGT_CFGPARSER,MSGL_ERR,": too deep 'include'. check your configfiles\n"); ret = -1; goto out; @@ -96,9 +97,9 @@ mp_msg(MSGT_CFGPARSER,MSGL_V,"\n"); if ((fp = fopen(conffile, "r")) == NULL) { - mp_msg(MSGT_CFGPARSER,MSGL_V,": %s\n", strerror(errno)); + mp_msg(MSGT_CFGPARSER,silent?MSGL_V:MSGL_ERR,"Failed to read %s: %s\n", conffile, strerror(errno)); free(line); - ret = 0; + ret = silent ? 0 : -1; goto out; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/parser-cfg.h mplayer-1.0~rc4.dfsg1+svn34540/parser-cfg.h --- mplayer-1.0~rc4.dfsg1+svn33713/parser-cfg.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/parser-cfg.h 2011-10-25 20:45:09.000000000 +0000 @@ -21,7 +21,7 @@ #include "m_config.h" -int m_config_parse_config_file(m_config_t* config, const char *conffile); +int m_config_parse_config_file(m_config_t* config, const char *conffile, int silent); int m_config_preparse_command_line(m_config_t *config, int argc, char **argv); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/parser-mpcmd.c mplayer-1.0~rc4.dfsg1+svn34540/parser-mpcmd.c --- mplayer-1.0~rc4.dfsg1+svn33713/parser-mpcmd.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/parser-mpcmd.c 2011-10-25 19:20:38.000000000 +0000 @@ -38,7 +38,6 @@ #include "parser-mpcmd.h" #include "osdep/macosx_finder_args.h" -static int recursion_depth = 0; static int mode = 0; #define GLOBAL 0 @@ -108,8 +107,6 @@ #endif last_parent = root = play_tree_new(); - /* in order to work recursion detection properly in parse_config_file */ - ++recursion_depth; for (i = 1; i < argc; i++) { //next: @@ -281,13 +278,11 @@ if (opt_exit) goto err_out; - --recursion_depth; if(last_parent != root) mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Missing }- ?\n"); return root; err_out: - --recursion_depth; play_tree_free(root,1); return NULL; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/playtree.h mplayer-1.0~rc4.dfsg1+svn34540/playtree.h --- mplayer-1.0~rc4.dfsg1+svn33713/playtree.h 2011-06-15 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/playtree.h 2011-11-03 13:24:53.000000000 +0000 @@ -61,7 +61,7 @@ #define PLAY_TREE_ITER_RND 1 ///@} -/// \defgroup Playtree +/// \defgroup playtree Playtree ///@{ typedef struct play_tree play_tree_t; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/playtreeparser.c mplayer-1.0~rc4.dfsg1+svn34540/playtreeparser.c --- mplayer-1.0~rc4.dfsg1+svn33713/playtreeparser.c 2011-06-17 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/playtreeparser.c 2011-10-20 11:15:30.000000000 +0000 @@ -835,7 +835,13 @@ fl = strlen(pt->files[i]); // if we find a full unix path, url:// or X:\ at the beginning, // don't mangle it. - if(fl <= 0 || strstr(pt->files[i],"://") || (strstr(pt->files[i],":\\") == pt->files[i] + 1) || (pt->files[i][0] == '/') ) + if(fl <= 0 || strstr(pt->files[i],"://") || (pt->files[i][0] == '/') +#if HAVE_DOS_PATHS + || (strstr(pt->files[i],":\\") == pt->files[i] + 1) + // the X:/ format is allowed as well + || (strstr(pt->files[i],":/") == pt->files[i] + 1) +#endif + ) continue; // if the path begins with \ then prepend drive letter to it. if (pt->files[i][0] == '\\') { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/pnm_loader.c mplayer-1.0~rc4.dfsg1+svn34540/pnm_loader.c --- mplayer-1.0~rc4.dfsg1+svn33713/pnm_loader.c 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/pnm_loader.c 2011-08-11 17:45:38.000000000 +0000 @@ -26,7 +26,7 @@ */ /** - * \file pnm_loader.c + * \file * \brief PNM image files loader */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/snapshot_version mplayer-1.0~rc4.dfsg1+svn34540/snapshot_version --- mplayer-1.0~rc4.dfsg1+svn33713/snapshot_version 2011-06-23 02:05:04.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/snapshot_version 2012-01-11 03:05:12.000000000 +0000 @@ -1 +1 @@ -33713 +34540 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/ai_alsa1x.c mplayer-1.0~rc4.dfsg1+svn34540/stream/ai_alsa1x.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/ai_alsa1x.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/ai_alsa1x.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,199 +0,0 @@ -/* - * 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 "config.h" - -#include -#include "audio_in.h" -#include "mp_msg.h" -#include "help_mp.h" - -int ai_alsa_setup(audio_in_t *ai) -{ - snd_pcm_hw_params_t *params; - snd_pcm_sw_params_t *swparams; - snd_pcm_uframes_t buffer_size, period_size; - int err; - int dir; - unsigned int rate; - - snd_pcm_hw_params_alloca(¶ms); - snd_pcm_sw_params_alloca(&swparams); - - err = snd_pcm_hw_params_any(ai->alsa.handle, params); - if (err < 0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig); - return -1; - } - - err = snd_pcm_hw_params_set_access(ai->alsa.handle, params, - SND_PCM_ACCESS_RW_INTERLEAVED); - if (err < 0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableAccessType); - return -1; - } - - err = snd_pcm_hw_params_set_format(ai->alsa.handle, params, SND_PCM_FORMAT_S16_LE); - if (err < 0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt); - return -1; - } - - err = snd_pcm_hw_params_set_channels(ai->alsa.handle, params, ai->req_channels); - if (err < 0) { - snd_pcm_hw_params_get_channels(params, &ai->channels); - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableChanCount, - ai->channels); - } else { - ai->channels = ai->req_channels; - } - - dir = 0; - rate = ai->req_samplerate; - err = snd_pcm_hw_params_set_rate_near(ai->alsa.handle, params, &rate, &dir); - if (err < 0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA1X_CannotSetSamplerate); - } - ai->samplerate = rate; - - dir = 0; - ai->alsa.buffer_time = 1000000; - err = snd_pcm_hw_params_set_buffer_time_near(ai->alsa.handle, params, - &ai->alsa.buffer_time, &dir); - if (err < 0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA1X_CannotSetBufferTime); - } - - dir = 0; - ai->alsa.period_time = ai->alsa.buffer_time / 4; - err = snd_pcm_hw_params_set_period_time_near(ai->alsa.handle, params, - &ai->alsa.period_time, &dir); - if (err < 0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA1X_CannotSetPeriodTime); - } - - err = snd_pcm_hw_params(ai->alsa.handle, params); - if (err < 0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotInstallHWParams, snd_strerror(err)); - snd_pcm_hw_params_dump(params, ai->alsa.log); - return -1; - } - - dir = -1; - snd_pcm_hw_params_get_period_size(params, &period_size, &dir); - snd_pcm_hw_params_get_buffer_size(params, &buffer_size); - ai->alsa.chunk_size = period_size; - if (period_size == buffer_size) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize, ai->alsa.chunk_size, (long)buffer_size); - return -1; - } - - snd_pcm_sw_params_current(ai->alsa.handle, swparams); - err = snd_pcm_sw_params_set_sleep_min(ai->alsa.handle, swparams,0); - err = snd_pcm_sw_params_set_avail_min(ai->alsa.handle, swparams, ai->alsa.chunk_size); - - err = snd_pcm_sw_params_set_start_threshold(ai->alsa.handle, swparams, 0); - err = snd_pcm_sw_params_set_stop_threshold(ai->alsa.handle, swparams, buffer_size); - - if (snd_pcm_sw_params(ai->alsa.handle, swparams) < 0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams); - snd_pcm_sw_params_dump(swparams, ai->alsa.log); - return -1; - } - - if (mp_msg_test(MSGT_TV, MSGL_V)) { - snd_pcm_dump(ai->alsa.handle, ai->alsa.log); - } - - ai->alsa.bits_per_sample = snd_pcm_format_physical_width(SND_PCM_FORMAT_S16_LE); - ai->alsa.bits_per_frame = ai->alsa.bits_per_sample * ai->channels; - ai->blocksize = ai->alsa.chunk_size * ai->alsa.bits_per_frame / 8; - ai->samplesize = ai->alsa.bits_per_sample; - ai->bytes_per_sample = ai->alsa.bits_per_sample/8; - - return 0; -} - -int ai_alsa_init(audio_in_t *ai) -{ - int err; - - err = snd_pcm_open(&ai->alsa.handle, ai->alsa.device, SND_PCM_STREAM_CAPTURE, 0); - if (err < 0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio, snd_strerror(err)); - return -1; - } - - err = snd_output_stdio_attach(&ai->alsa.log, stderr, 0); - - if (err < 0) { - return -1; - } - - err = ai_alsa_setup(ai); - - return err; -} - -#ifndef timersub -#define timersub(a, b, result) \ -do { \ - (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ - (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ - if ((result)->tv_usec < 0) { \ - --(result)->tv_sec; \ - (result)->tv_usec += 1000000; \ - } \ -} while (0) -#endif - -int ai_alsa_xrun(audio_in_t *ai) -{ - snd_pcm_status_t *status; - int res; - - snd_pcm_status_alloca(&status); - if ((res = snd_pcm_status(ai->alsa.handle, status))<0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaStatusError, snd_strerror(res)); - return -1; - } - if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN) { - struct timeval now, diff, tstamp; - gettimeofday(&now, 0); - snd_pcm_status_get_trigger_tstamp(status, &tstamp); - timersub(&now, &tstamp, &diff); - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaXRUN, - diff.tv_sec * 1000 + diff.tv_usec / 1000.0); - if (mp_msg_test(MSGT_TV, MSGL_V)) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaStatus); - snd_pcm_status_dump(status, ai->alsa.log); - } - if ((res = snd_pcm_prepare(ai->alsa.handle))<0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaXRUNPrepareError, snd_strerror(res)); - return -1; - } - return 0; /* ok, data should be accepted again */ - } - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError); - return -1; -} diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/ai_alsa.c mplayer-1.0~rc4.dfsg1+svn34540/stream/ai_alsa.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/ai_alsa.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/ai_alsa.c 2011-11-14 09:58:24.000000000 +0000 @@ -20,10 +20,11 @@ #include #include #include +#define ALSA_PCM_NEW_HW_PARAMS_API +#define ALSA_PCM_NEW_SW_PARAMS_API +#include #include "config.h" - -#include #include "audio_in.h" #include "mp_msg.h" #include "help_mp.h" @@ -32,8 +33,9 @@ { snd_pcm_hw_params_t *params; snd_pcm_sw_params_t *swparams; - int buffer_size; + snd_pcm_uframes_t buffer_size, period_size; int err; + int dir; unsigned int rate; snd_pcm_hw_params_alloca(¶ms); @@ -44,63 +46,76 @@ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_PcmBrokenConfig); return -1; } + err = snd_pcm_hw_params_set_access(ai->alsa.handle, params, SND_PCM_ACCESS_RW_INTERLEAVED); if (err < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableAccessType); return -1; } + err = snd_pcm_hw_params_set_format(ai->alsa.handle, params, SND_PCM_FORMAT_S16_LE); if (err < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt); return -1; } + err = snd_pcm_hw_params_set_channels(ai->alsa.handle, params, ai->req_channels); if (err < 0) { - ai->channels = snd_pcm_hw_params_get_channels(params); + snd_pcm_hw_params_get_channels(params, &ai->channels); mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_UnavailableChanCount, ai->channels); } else { ai->channels = ai->req_channels; } - err = snd_pcm_hw_params_set_rate_near(ai->alsa.handle, params, ai->req_samplerate, 0); - assert(err >= 0); - rate = err; + dir = 0; + rate = ai->req_samplerate; + err = snd_pcm_hw_params_set_rate_near(ai->alsa.handle, params, &rate, &dir); + if (err < 0) { + mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotSetSamplerate); + } ai->samplerate = rate; + dir = 0; ai->alsa.buffer_time = 1000000; - ai->alsa.buffer_time = snd_pcm_hw_params_set_buffer_time_near(ai->alsa.handle, params, - ai->alsa.buffer_time, 0); - assert(ai->alsa.buffer_time >= 0); + err = snd_pcm_hw_params_set_buffer_time_near(ai->alsa.handle, params, + &ai->alsa.buffer_time, &dir); + if (err < 0) { + mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotSetBufferTime); + } + + dir = 0; ai->alsa.period_time = ai->alsa.buffer_time / 4; - ai->alsa.period_time = snd_pcm_hw_params_set_period_time_near(ai->alsa.handle, params, - ai->alsa.period_time, 0); - assert(ai->alsa.period_time >= 0); + err = snd_pcm_hw_params_set_period_time_near(ai->alsa.handle, params, + &ai->alsa.period_time, &dir); + if (err < 0) { + mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotSetPeriodTime); + } + err = snd_pcm_hw_params(ai->alsa.handle, params); if (err < 0) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotInstallHWParams); + mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotInstallHWParams, snd_strerror(err)); snd_pcm_hw_params_dump(params, ai->alsa.log); return -1; } - ai->alsa.chunk_size = snd_pcm_hw_params_get_period_size(params, 0); - buffer_size = snd_pcm_hw_params_get_buffer_size(params); - if (ai->alsa.chunk_size == buffer_size) { + + dir = -1; + snd_pcm_hw_params_get_period_size(params, &period_size, &dir); + snd_pcm_hw_params_get_buffer_size(params, &buffer_size); + ai->alsa.chunk_size = period_size; + if (period_size == buffer_size) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize, ai->alsa.chunk_size, (long)buffer_size); return -1; } + snd_pcm_sw_params_current(ai->alsa.handle, swparams); err = snd_pcm_sw_params_set_sleep_min(ai->alsa.handle, swparams,0); - assert(err >= 0); err = snd_pcm_sw_params_set_avail_min(ai->alsa.handle, swparams, ai->alsa.chunk_size); - assert(err >= 0); err = snd_pcm_sw_params_set_start_threshold(ai->alsa.handle, swparams, 0); - assert(err >= 0); err = snd_pcm_sw_params_set_stop_threshold(ai->alsa.handle, swparams, buffer_size); - assert(err >= 0); - assert(err >= 0); if (snd_pcm_sw_params(ai->alsa.handle, swparams) < 0) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams); snd_pcm_sw_params_dump(swparams, ai->alsa.log); @@ -171,7 +186,7 @@ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaXRUN, diff.tv_sec * 1000 + diff.tv_usec / 1000.0); if (mp_msg_test(MSGT_TV, MSGL_V)) { - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaStatus); + mp_msg(MSGT_TV, MSGL_ERR, "ALSA Status:\n"); snd_pcm_status_dump(status, ai->alsa.log); } if ((res = snd_pcm_prepare(ai->alsa.handle))<0) { diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/cache2.c mplayer-1.0~rc4.dfsg1+svn34540/stream/cache2.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/cache2.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/cache2.c 2011-12-23 21:50:32.000000000 +0000 @@ -75,6 +75,9 @@ int back_size; // we should keep back_size amount of old bytes for backward seek int fill_limit; // we should fill buffer only if space>=fill_limit int seek_limit; // keep filling cache if distance is less that seek limit +#if FORKED_CACHE + pid_t ppid; // parent PID to detect killed parent +#endif // filler's pointers: int eof; off_t min_filepos; // buffer contain only a part of the file, from min-max pos @@ -91,7 +94,6 @@ volatile unsigned control_uint_arg; volatile double control_double_arg; volatile int control_res; - volatile off_t control_new_pos; volatile double stream_time_length; volatile double stream_time_pos; } cache_vars_t; @@ -106,6 +108,12 @@ #endif } +static void cache_flush(cache_vars_t *s) +{ + s->offset= // FIXME!? + s->min_filepos=s->max_filepos=s->read_filepos; // drop cache content :( +} + static int cache_read(cache_vars_t *s, unsigned char *buf, int size) { int total=0; @@ -121,7 +129,7 @@ if(s->eof) break; if (s->max_filepos == last_max) { if (sleep_count++ == 10) - mp_msg(MSGT_CACHE, MSGL_WARN, "Cache not filling, consider increasing -cache and/or -cache-min!\n"); + mp_msg(MSGT_CACHE, MSGL_WARN, "Cache empty, consider increasing -cache and/or -cache-min. [performance issue]\n"); } else { last_max = s->max_filepos; sleep_count = 0; @@ -181,8 +189,7 @@ // issues with e.g. mov or badly interleaved files if(readmin_filepos || read>=s->max_filepos+s->seek_limit) { - s->offset= // FIXME!? - s->min_filepos=s->max_filepos=read; // drop cache content :( + cache_flush(s); if(s->stream->eof) stream_reset(s->stream); stream_seek_internal(s->stream,read); mp_msg(MSGT_CACHE,MSGL_DBG2,"Seek done. new pos: 0x%"PRIX64" \n",(int64_t)stream_tell(s->stream)); @@ -259,12 +266,12 @@ static int cache_execute_control(cache_vars_t *s) { double double_res; unsigned uint_res; + int needs_flush = 0; static unsigned last; int quit = s->control == -2; if (quit || !s->stream->control) { s->stream_time_length = 0; s->stream_time_pos = MP_NOPTS_VALUE; - s->control_new_pos = 0; s->control_res = STREAM_UNSUPPORTED; s->control = -1; return !quit; @@ -279,11 +286,19 @@ s->stream_time_pos = pos; else s->stream_time_pos = MP_NOPTS_VALUE; +#if FORKED_CACHE + // if parent PID changed, main process was killed -> exit + if (s->ppid != getppid()) { + mp_msg(MSGT_CACHE, MSGL_WARN, "Parent process disappeared, exiting cache process.\n"); + return 0; + } +#endif last = GetTimerMS(); } if (s->control == -1) return 1; switch (s->control) { case STREAM_CTRL_SEEK_TO_TIME: + needs_flush = 1; double_res = s->control_double_arg; case STREAM_CTRL_GET_CURRENT_TIME: case STREAM_CTRL_GET_ASPECT_RATIO: @@ -292,6 +307,7 @@ break; case STREAM_CTRL_SEEK_TO_CHAPTER: case STREAM_CTRL_SET_ANGLE: + needs_flush = 1; uint_res = s->control_uint_arg; case STREAM_CTRL_GET_NUM_CHAPTERS: case STREAM_CTRL_GET_CURRENT_CHAPTER: @@ -304,7 +320,11 @@ s->control_res = STREAM_UNSUPPORTED; break; } - s->control_new_pos = s->stream->pos; + if (needs_flush) { + s->read_filepos = s->stream->pos; + s->eof = s->stream->eof; + cache_flush(s); + } s->control = -1; return 1; } @@ -346,6 +366,9 @@ s->fill_limit=8*sector; s->back_size=s->buffer_size/2; +#if FORKED_CACHE + s->ppid = getpid(); +#endif return s; } @@ -384,8 +407,7 @@ static void cache_mainloop(cache_vars_t *s) { int sleep_count = 0; #if FORKED_CACHE - struct sigaction sa = { 0 }; - sa.sa_handler = SIG_IGN; + struct sigaction sa = { .sa_handler = SIG_IGN }; sigaction(SIGUSR1, &sa, NULL); #endif do { @@ -581,16 +603,19 @@ int cache_do_control(stream_t *stream, int cmd, void *arg) { int sleep_count = 0; + int pos_change = 0; cache_vars_t* s = stream->cache_data; switch (cmd) { case STREAM_CTRL_SEEK_TO_TIME: s->control_double_arg = *(double *)arg; s->control = cmd; + pos_change = 1; break; case STREAM_CTRL_SEEK_TO_CHAPTER: case STREAM_CTRL_SET_ANGLE: s->control_uint_arg = *(unsigned *)arg; s->control = cmd; + pos_change = 1; break; // the core might call these every frame, so cache them... case STREAM_CTRL_GET_TIME_LENGTH: @@ -613,12 +638,20 @@ cache_wakeup(stream); while (s->control != -1) { if (sleep_count++ == 1000) - mp_msg(MSGT_CACHE, MSGL_WARN, "Cache not responding!\n"); + mp_msg(MSGT_CACHE, MSGL_WARN, "Cache not responding! [performance issue]\n"); if (stream_check_interrupt(CONTROL_SLEEP_TIME)) { s->eof = 1; return STREAM_UNSUPPORTED; } } + // to avoid unnecessary differences with non-cache behaviour, + // do this also on failure. + if (pos_change) { + stream->pos = s->read_filepos; + stream->eof = s->eof; + } + if (s->control_res != STREAM_OK) + return s->control_res; switch (cmd) { case STREAM_CTRL_GET_TIME_LENGTH: case STREAM_CTRL_GET_CURRENT_TIME: @@ -631,12 +664,6 @@ case STREAM_CTRL_GET_ANGLE: *(unsigned *)arg = s->control_uint_arg; break; - case STREAM_CTRL_SEEK_TO_CHAPTER: - case STREAM_CTRL_SEEK_TO_TIME: - case STREAM_CTRL_SET_ANGLE: - if (s->control_res != STREAM_UNSUPPORTED) - stream->pos = s->read_filepos = s->control_new_pos; - break; } return s->control_res; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/common.c mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/common.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/common.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/common.c 2011-08-11 17:45:38.000000000 +0000 @@ -18,7 +18,7 @@ */ /** - * @file common.c + * @file * * @short Implementation of routines common to parse and formatting * modules . diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/common.h mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/common.h --- mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/common.h 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/common.h 2011-08-11 17:45:38.000000000 +0000 @@ -18,7 +18,7 @@ */ /** - * @file common.h + * @file * @ingroup common * @short Public header common for both parsing and formatting modules. **/ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/errorlist.c mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/errorlist.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/errorlist.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/errorlist.c 2011-08-11 17:45:38.000000000 +0000 @@ -18,7 +18,7 @@ */ /** - * @file errorlist.c + * @file * * @short Translation table for error numbers * diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/parser.c mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/parser.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/parser.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/parser.c 2011-08-11 17:45:38.000000000 +0000 @@ -22,7 +22,7 @@ */ /** - * @file parser.c + * @file * * @short Parsing module implementation. * diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/parser.h mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/parser.h --- mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/parser.h 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/parser.h 2011-08-11 17:45:38.000000000 +0000 @@ -22,7 +22,7 @@ */ /** - * @file parser.h + * @file * @ingroup parser * @short Specific public header for parsing module. **/ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/parserpriv.h mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/parserpriv.h --- mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/parserpriv.h 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/parserpriv.h 2011-08-11 17:45:38.000000000 +0000 @@ -18,7 +18,7 @@ */ /** - * @file parserpriv.h + * @file * * @short Private header for parser module. **/ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/priv.h mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/priv.h --- mplayer-1.0~rc4.dfsg1+svn33713/stream/freesdp/priv.h 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/freesdp/priv.h 2011-08-11 17:45:38.000000000 +0000 @@ -22,7 +22,7 @@ */ /** - * @file priv.h + * @file * * @short Common private header for both formatting and parsing modules. **/ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/http.c mplayer-1.0~rc4.dfsg1+svn34540/stream/http.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/http.c 2011-01-21 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/http.c 2011-12-11 15:41:37.000000000 +0000 @@ -80,6 +80,9 @@ * \param fd file descriptor to read from * \param sc streaming_ctrl_t whose buffer is consumed before reading from fd * \return number of real data before next metadata block starts or 0 on error + * + * You can use unsv://samples.mplayerhq.hu/V-codecs/VP5/vp5_artefacts.nsv to + * test. */ static unsigned uvox_meta_read(int fd, streaming_ctrl_t *sc) { unsigned metaint; @@ -674,7 +677,7 @@ mp_msg(MSGT_NETWORK,MSGL_V,"method: [%s]\n", http_hdr->method ); mp_msg(MSGT_NETWORK,MSGL_V,"status code: [%d]\n", http_hdr->status_code ); mp_msg(MSGT_NETWORK,MSGL_V,"reason phrase: [%s]\n", http_hdr->reason_phrase ); - mp_msg(MSGT_NETWORK,MSGL_V,"body size: [%zd]\n", http_hdr->body_size ); + mp_msg(MSGT_NETWORK,MSGL_V,"body size: [%zu]\n", http_hdr->body_size ); mp_msg(MSGT_NETWORK,MSGL_V,"Fields:\n"); field = http_hdr->first_field; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/network.c mplayer-1.0~rc4.dfsg1+svn34540/stream/network.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/network.c 2011-03-19 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/network.c 2011-07-04 19:11:21.000000000 +0000 @@ -457,7 +457,9 @@ ret = recv( fd, buffer+len, size-len, 0 ); if( ret<0 ) { mp_msg(MSGT_NETWORK,MSGL_ERR,"nop_streaming_read error : %s\n",strerror(errno)); - } + ret = 0; + } else if (ret == 0) + stream_ctrl->status = streaming_stopped_e; len += ret; //printf("read %d bytes from network\n", len ); } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/pnm.c mplayer-1.0~rc4.dfsg1+svn34540/stream/pnm.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/pnm.c 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/pnm.c 2011-10-26 15:12:35.000000000 +0000 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * $Id: pnm.c 33433 2011-05-07 21:15:13Z reimar $ + * $Id: pnm.c 34262 2011-10-26 15:12:35Z diego $ * * pnm protocol implementation * based upon code from joschka @@ -44,7 +44,7 @@ #endif #include "libavutil/intreadwrite.h" - +#include "mp_msg.h" #include "stream.h" #include "libmpdemux/demuxer.h" #include "help_mp.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_bd.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_bd.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_bd.c 2010-11-11 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_bd.c 2011-10-26 15:12:35.000000000 +0000 @@ -29,6 +29,7 @@ #include "libavutil/intreadwrite.h" #include "m_struct.h" #include "m_option.h" +#include "mp_msg.h" #include "stream.h" #include "stream_bd.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_bluray.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_bluray.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_bluray.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_bluray.c 2011-09-23 14:26:20.000000000 +0000 @@ -116,7 +116,7 @@ case STREAM_CTRL_GET_NUM_CHAPTERS: { BLURAY_TITLE_INFO *ti; - ti = bd_get_title_info(b->bd, b->current_title); + ti = bd_get_title_info(b->bd, b->current_title, b->current_angle); if (!ti) return STREAM_UNSUPPORTED; @@ -137,7 +137,7 @@ int64_t pos; int r; - ti = bd_get_title_info(b->bd, b->current_title); + ti = bd_get_title_info(b->bd, b->current_title, b->current_angle); if (!ti) return STREAM_UNSUPPORTED; @@ -156,7 +156,7 @@ case STREAM_CTRL_GET_NUM_ANGLES: { BLURAY_TITLE_INFO *ti; - ti = bd_get_title_info(b->bd, b->current_title); + ti = bd_get_title_info(b->bd, b->current_title, b->current_angle); if (!ti) return STREAM_UNSUPPORTED; @@ -175,7 +175,7 @@ BLURAY_TITLE_INFO *ti; int angle = *((int *) arg); - ti = bd_get_title_info(b->bd, b->current_title); + ti = bd_get_title_info(b->bd, b->current_title, b->current_angle); if (!ti) return STREAM_UNSUPPORTED; @@ -236,7 +236,7 @@ } /* check for available titles on disc */ - title_count = bd_get_titles(bd, TITLES_RELEVANT); + title_count = bd_get_titles(bd, TITLES_RELEVANT, angle); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_BLURAY_TITLES=%d\n", title_count); if (!title_count) { mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_BlurayNoTitles); @@ -250,7 +250,7 @@ BLURAY_TITLE_INFO *ti; int sec, msec; - ti = bd_get_title_info(bd, i); + ti = bd_get_title_info(bd, i, angle); if (!ti) continue; @@ -284,7 +284,7 @@ "ID_BLURAY_CURRENT_TITLE=%d\n", title + 1); /* Get current title information */ - info = bd_get_title_info(bd, title); + info = bd_get_title_info(bd, title, angle); if (!info) goto err_no_info; @@ -329,7 +329,7 @@ s->type = STREAMTYPE_BLURAY; s->url = strdup("br://"); - mp_msg(MSGT_OPEN, MSGL_V, MSGTR_BlurayOK); + mp_msg(MSGT_OPEN, MSGL_V, "Blu-ray successfully opened.\n"); return STREAM_OK; } diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream.c 2011-05-11 13:51:48.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream.c 2011-08-15 20:32:26.000000000 +0000 @@ -290,6 +290,8 @@ #ifdef CONFIG_NETWORKING if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_read ) { len=s->streaming_ctrl->streaming_read(s->fd, buf, len, s->streaming_ctrl); + if (s->streaming_ctrl->status == streaming_stopped_e) + s->eof = 1; } else #endif if (s->fill_buffer) @@ -306,22 +308,29 @@ len= s->fill_buffer ? s->fill_buffer(s, buf, len) : 0; } if(len<=0){ + off_t pos = s->pos; + // do not retry if this looks like proper eof + if (s->eof || (s->end_pos && pos == s->end_pos)) + goto eof_out; // dvdnav has some horrible hacks to "suspend" reads, // we need to skip this code or seeks will hang. - if (!s->eof && s->type != STREAMTYPE_DVDNAV) { - // just in case this is an error e.g. due to network - // timeout reset and retry - // Seeking is used as a hack to make network streams - // reopen the connection, ideally they would implement - // e.g. a STREAM_CTRL_RECONNECT to do this - off_t pos = s->pos; - s->eof=1; - stream_reset(s); - stream_seek_internal(s, pos); - // make sure EOF is set to ensure no endless loops - s->eof=1; - return stream_read_internal(s, buf, orig_len); - } + if (s->type == STREAMTYPE_DVDNAV) + goto eof_out; + + // just in case this is an error e.g. due to network + // timeout reset and retry + // Seeking is used as a hack to make network streams + // reopen the connection, ideally they would implement + // e.g. a STREAM_CTRL_RECONNECT to do this + s->eof=1; + stream_reset(s); + if (stream_seek_internal(s, pos) >= 0 || s->pos != pos) // seek failed + goto eof_out; + // make sure EOF is set to ensure no endless loops + s->eof=1; + return stream_read_internal(s, buf, orig_len); + +eof_out: s->eof=1; return 0; } @@ -579,30 +588,30 @@ } /** - * Find a newline character in buffer + * Find a termination character in buffer * \param buf buffer to search * \param len amount of bytes to search in buffer, may not overread * \param utf16 chose between UTF-8/ASCII/other and LE and BE UTF-16 * 0 = UTF-8/ASCII/other, 1 = UTF-16-LE, 2 = UTF-16-BE */ -static const uint8_t *find_newline(const uint8_t *buf, int len, int utf16) +static const uint8_t *find_term_char(const uint8_t *buf, int len, uint8_t term, int utf16) { uint32_t c; const uint8_t *end = buf + len; switch (utf16) { case 0: - return (uint8_t *)memchr(buf, '\n', len); + return (uint8_t *)memchr(buf, term, len); case 1: while (buf < end - 1) { GET_UTF16(c, buf < end - 1 ? get_le16_inc(&buf) : 0, return NULL;) - if (buf <= end && c == '\n') + if (buf <= end && c == term) return buf - 1; } break; case 2: while (buf < end - 1) { GET_UTF16(c, buf < end - 1 ? get_be16_inc(&buf) : 0, return NULL;) - if (buf <= end && c == '\n') + if (buf <= end && c == term) return buf - 1; } break; @@ -651,7 +660,9 @@ return 0; } -unsigned char* stream_read_line(stream_t *s,unsigned char* mem, int max, int utf16) { +uint8_t *stream_read_until(stream_t *s, uint8_t *mem, int max, + uint8_t term, int utf16) +{ int len; const unsigned char *end; unsigned char *ptr = mem; @@ -663,7 +674,7 @@ if(len <= 0 && (!cache_stream_fill_buffer(s) || (len = s->buf_len-s->buf_pos) <= 0)) break; - end = find_newline(s->buffer+s->buf_pos, len, utf16); + end = find_term_char(s->buffer+s->buf_pos, len, term, utf16); if(end) len = end - (s->buffer+s->buf_pos) + 1; if(len > 0 && max > 0) { int l = copy_characters(ptr, max, s->buffer+s->buf_pos, &len, utf16); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_cdda.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_cdda.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_cdda.c 2011-06-05 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_cdda.c 2012-01-03 20:47:36.000000000 +0000 @@ -70,7 +70,7 @@ char* device; m_span_t span; } cdda_dflts = { - -1, + 0, 0, NULL, 0, @@ -84,11 +84,11 @@ #define ST_OFF(f) M_ST_OFF(struct cdda_params,f) static const m_option_t cdda_params_fields[] = { - { "speed", ST_OFF(speed), CONF_TYPE_INT, M_OPT_RANGE,1,100, NULL }, + { "speed", ST_OFF(speed), CONF_TYPE_INT, M_OPT_RANGE,0,100, NULL }, { "paranoia", ST_OFF(paranoia_mode), CONF_TYPE_INT,M_OPT_RANGE, 0, 2, NULL }, { "generic-dev", ST_OFF(generic_dev), CONF_TYPE_STRING, 0, 0, 0, NULL }, { "sector-size", ST_OFF(sector_size), CONF_TYPE_INT, M_OPT_RANGE,1,100, NULL }, - { "overlap", ST_OFF(search_overlap), CONF_TYPE_INT, M_OPT_RANGE,0,75, NULL }, + { "overlap", ST_OFF(search_overlap), CONF_TYPE_INT, M_OPT_RANGE,-1,75, NULL }, { "toc-bias", ST_OFF(toc_bias), CONF_TYPE_INT, 0, 0, 0, NULL }, { "toc-offset", ST_OFF(toc_offset), CONF_TYPE_INT, 0, 0, 0, NULL }, { "noskip", ST_OFF(no_skip), CONF_TYPE_FLAG, 0 , 0, 1, NULL }, @@ -182,6 +182,7 @@ sec = s->pos/CD_FRAMESIZE_RAW; if (s->pos < 0 || sec > p->end_sector) { s->eof = 1; + p->sector = p->end_sector + 1; return 0; } @@ -242,10 +243,16 @@ static int control(stream_t *stream, int cmd, void *arg) { cdda_priv* p = stream->priv; switch(cmd) { + case STREAM_CTRL_GET_NUM_TITLES: + { + *(unsigned int *)arg = p->cd->tracks; + return STREAM_OK; + } case STREAM_CTRL_GET_NUM_CHAPTERS: { int start_track = get_track_by_sector(p, p->start_sector); int end_track = get_track_by_sector(p, p->end_sector); + if (start_track == -1 || end_track == -1) return STREAM_ERROR; *(unsigned int *)arg = end_track + 1 - start_track; return STREAM_OK; } @@ -254,10 +261,12 @@ int r; unsigned int track = *(unsigned int *)arg; int start_track = get_track_by_sector(p, p->start_sector); + int end_track = get_track_by_sector(p, p->end_sector); int seek_sector; + if (start_track == -1 || end_track == -1) return STREAM_ERROR; track += start_track; - if (track >= p->cd->tracks) { - stream->eof = 1; + if (track > end_track) { + seek(stream, (p->end_sector + 1) * CD_FRAMESIZE_RAW); return STREAM_ERROR; } seek_sector = track <= 0 ? p->start_sector @@ -271,6 +280,7 @@ { int start_track = get_track_by_sector(p, p->start_sector); int cur_track = get_track_by_sector(p, p->sector); + if (start_track == -1 || cur_track == -1) return STREAM_ERROR; *(unsigned int *)arg = cur_track - start_track; return STREAM_OK; } @@ -382,7 +392,7 @@ cdd->disc_toc[i].dwStartSector += offset; } - if(p->speed) + if(p->speed > 0) cdda_speed_set(cdd,p->speed); last_track = cdda_tracks(cdd); @@ -418,18 +428,28 @@ if(p->no_skip) mode |= PARANOIA_MODE_NEVERSKIP; + else + mode &= ~PARANOIA_MODE_NEVERSKIP; + + if(p->search_overlap > 0) + mode |= PARANOIA_MODE_OVERLAP; + else if(p->search_overlap == 0) + mode &= ~PARANOIA_MODE_OVERLAP; #ifndef CONFIG_LIBCDIO // HACK against libcdparanoia's stupid caching model that // queues up a huge number of requests leading to stuttering paranoia_cachemodel_size(priv->cdp, 24); - paranoia_modeset(cdd, mode); + // For some incomprehensible reason cdparanoia breaks the + // track->sector lookup of calling paranoia_modeset with + // PARANOIA_MODE_DISABLE + if (mode != PARANOIA_MODE_DISABLE) paranoia_modeset(cdd, mode); - if(p->search_overlap >= 0) + if(p->search_overlap > 0) paranoia_overlapset(cdd,p->search_overlap); #else paranoia_modeset(priv->cdp, mode); - if(p->search_overlap >= 0) + if(p->search_overlap > 0) paranoia_overlapset(priv->cdp,p->search_overlap); #endif diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_dvb.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_dvb.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_dvb.c 2011-05-03 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_dvb.c 2011-10-26 15:12:35.000000000 +0000 @@ -7,7 +7,7 @@ Modified for use with MPlayer, for details see the changelog at http://svn.mplayerhq.hu/mplayer/trunk/ -$Id: stream_dvb.c 33346 2011-05-01 18:07:59Z iive $ +$Id: stream_dvb.c 34262 2011-10-26 15:12:35Z diego $ Copyright notice: @@ -44,6 +44,7 @@ #include "help_mp.h" #include "m_option.h" #include "m_struct.h" +#include "mp_msg.h" #include "path.h" #include "libavutil/avstring.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_dvd.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_dvd.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_dvd.c 2011-06-13 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_dvd.c 2011-12-31 12:20:08.000000000 +0000 @@ -665,6 +665,11 @@ *((double *)arg) = (double) mp_get_titleset_length(d->vts_file, d->tt_srpt, d->cur_title-1)/1000.0; return 1; } + case STREAM_CTRL_GET_NUM_TITLES: + { + *((unsigned int *)arg) = d->vmg_file->tt_srpt->nr_of_srpts; + return 1; + } case STREAM_CTRL_GET_NUM_CHAPTERS: { int r; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_ffmpeg.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_ffmpeg.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_ffmpeg.c 2011-02-11 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_ffmpeg.c 2011-08-09 19:57:00.000000000 +0000 @@ -24,6 +24,7 @@ #include "stream.h" #include "m_option.h" #include "m_struct.h" +#include "av_helpers.h" static int fill_buffer(stream_t *s, char *buffer, int max_len) { @@ -87,7 +88,7 @@ int64_t size; int dummy; - av_register_all(); + init_avformat(); if (mode == STREAM_READ) flags = URL_RDONLY; else if (mode == STREAM_WRITE) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_file.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_file.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_file.c 2011-02-11 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_file.c 2011-07-07 17:37:58.000000000 +0000 @@ -23,6 +23,9 @@ #include #include #include +#if HAVE_SETMODE +#include +#endif #include "mp_msg.h" #include "stream.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream.h mplayer-1.0~rc4.dfsg1+svn34540/stream/stream.h --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream.h 2011-06-05 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream.h 2011-12-31 12:20:08.000000000 +0000 @@ -98,6 +98,7 @@ #define STREAM_CTRL_GET_NUM_ANGLES 9 #define STREAM_CTRL_GET_ANGLE 10 #define STREAM_CTRL_SET_ANGLE 11 +#define STREAM_CTRL_GET_NUM_TITLES 12 typedef enum { @@ -278,7 +279,11 @@ return total; } -unsigned char* stream_read_line(stream_t *s,unsigned char* mem, int max, int utf16); +uint8_t *stream_read_until(stream_t *s, uint8_t *mem, int max, uint8_t term, int utf16); +inline static uint8_t *stream_read_line(stream_t *s, uint8_t *mem, int max, int utf16) +{ + return stream_read_until(s, mem, max, '\n', utf16); +} inline static int stream_eof(stream_t *s){ return s->eof; @@ -290,11 +295,11 @@ inline static int stream_seek(stream_t *s,off_t pos){ - mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%qX\n",(long long)pos); + mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%"PRIX64"\n", pos); if (pos < 0) { - mp_msg(MSGT_DEMUX, MSGL_ERR, "Invalid seek to negative position %llx!\n", - (long long)pos); + mp_msg(MSGT_DEMUX, MSGL_ERR, + "Invalid seek to negative position %"PRIx64"!\n", pos); pos = 0; } if(pospos){ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_live555.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_live555.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_live555.c 2011-02-01 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_live555.c 2011-10-26 15:12:35.000000000 +0000 @@ -23,6 +23,7 @@ #include #include +#include "mp_msg.h" #include "stream.h" #include "network.h" #include "libmpdemux/demuxer.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_nemesi.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_nemesi.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_nemesi.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_nemesi.c 2011-10-26 15:12:35.000000000 +0000 @@ -20,8 +20,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE - #include #include #include @@ -32,6 +30,7 @@ #include +#include "mp_msg.h" #include "network.h" #include "stream.h" #include "libmpdemux/demuxer.h" @@ -48,7 +47,6 @@ static int rtsp_streaming_open (stream_t *stream, int mode, void *opts, int *file_format) { - rtsp_ctrl * ctl; URL_t *url; stream->fd = -1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_radio.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_radio.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_radio.c 2010-11-09 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_radio.c 2011-07-24 23:55:34.000000000 +0000 @@ -247,7 +247,7 @@ *pfreq=freq_channel; } } - mp_msg(MSGT_RADIO, MSGL_DBG2, MSGTR_RADIO_DoneParsingChannels); + mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] Done parsing channels.\n"); return STREAM_OK; } @@ -279,16 +279,16 @@ } if(tuner.capability & V4L2_TUNER_CAP_LOW){ priv->frac=16000; - mp_msg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowYes,priv->frac); + mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] tuner is low:yes frac=%d\n", priv->frac); } else{ priv->frac=16; - mp_msg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowNo,priv->frac); + mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] tuner is low:no frac=%d\n",priv->frac); } priv->rangelow=((float)tuner.rangelow)/priv->frac; priv->rangehigh=((float)tuner.rangehigh)/priv->frac; - mp_msg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_FreqRange,priv->rangelow,priv->rangehigh); + mp_msg(MSGT_RADIO, MSGL_V, "[radio] Allowed frequency range is %.2f-%.2f MHz.\n", priv->rangelow, priv->rangehigh); return STREAM_OK; } @@ -432,15 +432,15 @@ } if(tuner.flags & VIDEO_TUNER_LOW){ priv->frac=16000; - mp_msg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowYes,priv->frac); + mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] tuner is low:yes frac=%d\n", priv->frac); }else{ priv->frac=16; - mp_msg(MSGT_RADIO,MSGL_DBG2,MSGTR_RADIO_TunerCapLowNo,priv->frac); + mp_msg(MSGT_RADIO, MSGL_DBG2, "[radio] tuner is low:no frac=%d\n", priv->frac); } priv->rangelow=((float)tuner.rangelow)/priv->frac; priv->rangehigh=((float)tuner.rangehigh)/priv->frac; - mp_msg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_FreqRange,priv->rangelow,priv->rangehigh); + mp_msg(MSGT_RADIO, MSGL_V, "[radio] Allowed frequency range is %.2f-%.2f MHz.\n", priv->rangelow, priv->rangehigh); return STREAM_OK; } @@ -784,7 +784,7 @@ static int grab_audio_frame(radio_priv_t *priv, char *buffer, int len) { int i; - mp_msg(MSGT_RADIO, MSGL_DBG3, MSGTR_RADIO_BufferString,"grab_audio_frame",priv->audio_cnt,priv->audio_drop); + mp_msg(MSGT_RADIO, MSGL_DBG3, "[radio] grab_audio_frame: in buffer=%d dropped=%d\n", priv->audio_cnt, priv->audio_drop); /* Cache buffer must be filled by some audio packets when playing starts. Otherwise MPlayer will quit with EOF error. Probably, there is need more carefull checking rather than simple 'for' loop @@ -834,7 +834,7 @@ } priv->do_capture=1; - mp_msg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_CaptureStarting); + mp_msg(MSGT_RADIO, MSGL_V, "[radio] Starting capture stuff.\n"); #ifdef CONFIG_ALSA while ((tmp = strrchr(priv->radio_param->adevice, '='))){ tmp[0] = ':'; @@ -870,7 +870,7 @@ priv->audio_in.bytes_per_sample+priv->audio_in.blocksize; if (priv->audio_buffer_size < 256*priv->audio_in.blocksize) priv->audio_buffer_size = 256*priv->audio_in.blocksize; - mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_AudioBuffer, + mp_msg(MSGT_RADIO, MSGL_V, "[radio] Audio capture - buffer=%d bytes (block=%d bytes).\n", priv->audio_buffer_size,priv->audio_in.blocksize); /* start capture */ priv->audio_ringbuffer = calloc(1, priv->audio_buffer_size); @@ -968,7 +968,7 @@ priv->radio_channel_current = priv->radio_channel_list; if(!radio_set_freq(stream,priv->radio_channel_current->freq)) return 0; - mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel, + mp_msg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index, priv->radio_channel_current->name, priv->radio_channel_current->freq); break; @@ -980,7 +980,7 @@ priv->radio_channel_current = priv->radio_channel_current->next; if(!radio_set_freq(stream,priv->radio_channel_current->freq)) return 0; - mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel, + mp_msg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n", priv->radio_channel_current->index, priv->radio_channel_current->name, priv->radio_channel_current->freq); break; @@ -1031,7 +1031,8 @@ } } priv->radio_channel_current=tmp; - mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_SelectedChannel, priv->radio_channel_current->index, + mp_msg(MSGT_RADIO, MSGL_V, "[radio] Selected channel: %d - %s (freq: %.2f)\n", + priv->radio_channel_current->index, priv->radio_channel_current->name, priv->radio_channel_current->freq); if(!radio_set_freq(stream, priv->radio_channel_current->freq)) return 0; @@ -1128,7 +1129,7 @@ else priv->driver=NULL; - mp_msg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_AvailableDrivers); + mp_msg(MSGT_RADIO, MSGL_V, "[radio] Available drivers: "); for(i=0;radio_drivers[i];i++){ mp_msg(MSGT_RADIO,MSGL_V,"%s, ",radio_drivers[i]->name); if(strcmp(priv->radio_param->driver,radio_drivers[i]->name)==0) @@ -1164,7 +1165,7 @@ close_s(stream); return STREAM_ERROR; } - mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_RadioDevice, priv->radio_fd,priv->radio_param->device); + mp_msg(MSGT_RADIO, MSGL_V, "[radio] Radio fd: %d, %s\n", priv->radio_fd,priv->radio_param->device); fcntl(priv->radio_fd, F_SETFD, FD_CLOEXEC); get_volume(priv, &priv->old_snd_volume); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_rtp.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_rtp.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_rtp.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_rtp.c 2011-10-26 15:12:35.000000000 +0000 @@ -25,6 +25,7 @@ #include #include +#include "mp_msg.h" #include "network.h" #include "stream.h" #include "url.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_smb.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_smb.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_smb.c 2011-02-11 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_smb.c 2011-07-30 16:27:10.000000000 +0000 @@ -118,7 +118,6 @@ } static int open_f (stream_t *stream, int mode, void *opts, int* file_format) { - struct stream_priv_s *p = (struct stream_priv_s*)opts; char *filename; mode_t m = 0; off_t len; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_udp.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_udp.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_udp.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_udp.c 2011-10-26 15:12:35.000000000 +0000 @@ -25,6 +25,7 @@ #include #include +#include "mp_msg.h" #include "network.h" #include "stream.h" #include "url.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_vcd.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_vcd.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_vcd.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_vcd.c 2011-12-31 12:20:08.000000000 +0000 @@ -92,6 +92,7 @@ static int control(stream_t *stream, int cmd, void *arg) { struct stream_priv_s *p = stream->priv; switch(cmd) { + case STREAM_CTRL_GET_NUM_TITLES: case STREAM_CTRL_GET_NUM_CHAPTERS: { mp_vcd_priv_t *vcd = vcd_read_toc(stream->fd); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_vstream.c mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_vstream.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/stream_vstream.c 2010-10-26 08:15:53.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/stream_vstream.c 2011-10-21 15:44:58.000000000 +0000 @@ -153,7 +153,7 @@ stream->start_pos = 0; stream->end_pos = vstream_streamsize(); - mp_msg(MSGT_OPEN, MSGL_DBG2, "Tivo stream size is %d\n", stream->end_pos); + mp_msg(MSGT_OPEN, MSGL_DBG2, "Tivo stream size is %"PRIu64"\n", stream->end_pos); stream->priv = p; stream->fill_buffer = fill_buffer; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/tv.c mplayer-1.0~rc4.dfsg1+svn34540/stream/tv.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/tv.c 2010-11-09 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/tv.c 2011-07-24 23:55:34.000000000 +0000 @@ -378,7 +378,7 @@ { tvh->norm = norm_from_string(tvh, norm); - mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedNorm, norm); + mp_msg(MSGT_TV, MSGL_V, "Selected norm : %s\n", norm); if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm); return 0; @@ -392,7 +392,7 @@ { tvh->norm = norm; - mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedNormId, norm); + mp_msg(MSGT_TV, MSGL_V, "Selected norm id: %d\n", norm); if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) { mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm); return 0; @@ -542,7 +542,7 @@ mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnableFindChanlist, tvh->tv_param->chanlist); else - mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedChanlist, + mp_msg(MSGT_TV, MSGL_V, "Selected channel list: %s (including %d channels)\n", chanlists[tvh->chanlist].name, chanlists[tvh->chanlist].count); if (tvh->tv_param->freq && tvh->tv_param->channel) @@ -604,14 +604,14 @@ funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_FREQ, &freq); funcs->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, &freq); - mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedFrequency, - freq, (float)freq/16); + mp_msg(MSGT_TV, MSGL_V, "Selected frequency: %lu (%.3f)\n", + freq, (float)freq/16); } if (tvh->tv_param->channel) { struct CHANLIST cl; - mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_RequestedChannel, tvh->tv_param->channel); + mp_msg(MSGT_TV, MSGL_V, "Requested channel: %s\n", tvh->tv_param->channel); for (i = 0; i < chanlists[tvh->chanlist].count; i++) { cl = tvh->chanlist_s[i]; @@ -840,7 +840,7 @@ sh_audio->wf->nBlockAlign = sh_audio->samplesize * sh_audio->channels; sh_audio->wf->nAvgBytesPerSec = sh_audio->i_bps; - mp_msg(MSGT_DECVIDEO, MSGL_V, MSGTR_TV_AudioFormat, + mp_msg(MSGT_DECVIDEO, MSGL_V, " TV audio: %d channels, %d bits, %d Hz\n", sh_audio->wf->nChannels, sh_audio->wf->wBitsPerSample, sh_audio->wf->nSamplesPerSec); @@ -930,7 +930,7 @@ if (tvh->functions->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) == TVI_CONTROL_TRUE) { tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, freq); - mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_CurrentFrequency, + mp_msg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n", *freq, (float)*freq/16); } return 1; @@ -946,7 +946,7 @@ tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_FREQ, &freq); tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, &freq); - mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_CurrentFrequency, + mp_msg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n", freq, (float)freq/16); } teletext_control(tvh->demuxer->teletext,TV_VBI_CONTROL_RESET, diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/tvi_dshow.c mplayer-1.0~rc4.dfsg1+svn34540/stream/tvi_dshow.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/tvi_dshow.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/tvi_dshow.c 2011-10-15 13:20:52.000000000 +0000 @@ -87,6 +87,15 @@ #include "frequencies.h" +#define MP_DEFINE_LOCAL_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + static const GUID name = {l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}} + +#ifdef __WINE__ +// take care of unions which are normally declared +// named by Wine but nameless (anonymous) by Windows +#define _FORCENAMELESSUNION +#endif + #include "tvi_dshow.h" #ifndef STDCALL @@ -379,122 +388,122 @@ #define DECLSPEC_SELECTANY /// CLSID definitions (used for CoCreateInstance call) #define CLSID_SampleGrabber MP_CLSID_SampleGrabber -static DEFINE_GUID(CLSID_SampleGrabber, 0xC1F400A0, 0x3F08, 0x11d3, 0x9F, 0x0B, +MP_DEFINE_LOCAL_GUID(CLSID_SampleGrabber, 0xC1F400A0, 0x3F08, 0x11d3, 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37); #define CLSID_NullRenderer MP_CLSID_NullRenderer -static DEFINE_GUID(CLSID_NullRenderer, 0xC1F400A4, 0x3F08, 0x11d3, 0x9F, 0x0B, +MP_DEFINE_LOCAL_GUID(CLSID_NullRenderer, 0xC1F400A4, 0x3F08, 0x11d3, 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37); #define CLSID_SystemDeviceEnum MP_CLSID_SystemDeviceEnum -static DEFINE_GUID(CLSID_SystemDeviceEnum, 0x62BE5D10, 0x60EB, 0x11d0, 0xBD, 0x3B, +MP_DEFINE_LOCAL_GUID(CLSID_SystemDeviceEnum, 0x62BE5D10, 0x60EB, 0x11d0, 0xBD, 0x3B, 0x00, 0xA0, 0xC9, 0x11, 0xCE, 0x86); #define CLSID_CaptureGraphBuilder2 MP_CLSID_CaptureGraphBuilder2 -static DEFINE_GUID(CLSID_CaptureGraphBuilder2, 0xBF87B6E1, 0x8C27, 0x11d0, 0xB3, +MP_DEFINE_LOCAL_GUID(CLSID_CaptureGraphBuilder2, 0xBF87B6E1, 0x8C27, 0x11d0, 0xB3, 0xF0, 0x00, 0xAA, 0x00, 0x37, 0x61, 0xC5); #define CLSID_VideoInputDeviceCategory MP_CLSID_VideoInputDeviceCategory -static DEFINE_GUID(CLSID_VideoInputDeviceCategory, 0x860BB310, 0x5D01, 0x11d0, +MP_DEFINE_LOCAL_GUID(CLSID_VideoInputDeviceCategory, 0x860BB310, 0x5D01, 0x11d0, 0xBD, 0x3B, 0x00, 0xA0, 0xC9, 0x11, 0xCE, 0x86); #define CLSID_AudioInputDeviceCategory MP_CLSID_AudioInputDeviceCategory -static DEFINE_GUID(CLSID_AudioInputDeviceCategory, 0x33d9a762, 0x90c8, 0x11d0, +MP_DEFINE_LOCAL_GUID(CLSID_AudioInputDeviceCategory, 0x33d9a762, 0x90c8, 0x11d0, 0xbd, 0x43, 0x00, 0xa0, 0xc9, 0x11, 0xce, 0x86); #define CLSID_FilterGraph MP_CLSID_FilterGraph -static DEFINE_GUID(CLSID_FilterGraph, 0xe436ebb3, 0x524f, 0x11ce, 0x9f, 0x53, +MP_DEFINE_LOCAL_GUID(CLSID_FilterGraph, 0xe436ebb3, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); #define CLSID_SystemClock MP_CLSID_SystemClock -static DEFINE_GUID(CLSID_SystemClock, 0xe436ebb1, 0x524f, 0x11ce, 0x9f, 0x53, +MP_DEFINE_LOCAL_GUID(CLSID_SystemClock, 0xe436ebb1, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); #ifdef NOT_USED #define CLSID_CaptureGraphBuilder MP_CLSID_CaptureGraphBuilder -static DEFINE_GUID(CLSID_CaptureGraphBuilder, 0xBF87B6E0, 0x8C27, 0x11d0, 0xB3, +MP_DEFINE_LOCAL_GUID(CLSID_CaptureGraphBuilder, 0xBF87B6E0, 0x8C27, 0x11d0, 0xB3, 0xF0, 0x00, 0xAA, 0x00, 0x37, 0x61, 0xC5); #define CLSID_VideoPortManager MP_CLSID_VideoPortManager -static DEFINE_GUID(CLSID_VideoPortManager, 0x6f26a6cd, 0x967b, 0x47fd, 0x87, 0x4a, +MP_DEFINE_LOCAL_GUID(CLSID_VideoPortManager, 0x6f26a6cd, 0x967b, 0x47fd, 0x87, 0x4a, 0x7a, 0xed, 0x2c, 0x9d, 0x25, 0xa2); #define IID_IPin MP_IID_IPin -static DEFINE_GUID(IID_IPin, 0x56a86891, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, +MP_DEFINE_LOCAL_GUID(IID_IPin, 0x56a86891, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); #define IID_ICaptureGraphBuilder MP_IID_ICaptureGraphBuilder -static DEFINE_GUID(IID_ICaptureGraphBuilder, 0xbf87b6e0, 0x8c27, 0x11d0, 0xb3, +MP_DEFINE_LOCAL_GUID(IID_ICaptureGraphBuilder, 0xbf87b6e0, 0x8c27, 0x11d0, 0xb3, 0xf0, 0x00, 0xaa, 0x00, 0x37, 0x61, 0xc5); #define IID_IFilterGraph MP_IID_IFilterGraph -static DEFINE_GUID(IID_IFilterGraph, 0x56a8689f, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, +MP_DEFINE_LOCAL_GUID(IID_IFilterGraph, 0x56a8689f, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); #define PIN_CATEGORY_PREVIEW MP_PIN_CATEGORY_PREVIEW -static DEFINE_GUID(PIN_CATEGORY_PREVIEW, 0xfb6c4282, 0x0353, 0x11d1, 0x90, 0x5f, +MP_DEFINE_LOCAL_GUID(PIN_CATEGORY_PREVIEW, 0xfb6c4282, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba); #endif /// IID definitions (used for QueryInterface call) #define IID_IReferenceClock MP_IID_IReferenceClock -static DEFINE_GUID(IID_IReferenceClock, 0x56a86897, 0x0ad4, 0x11ce, 0xb0, 0x3a, +MP_DEFINE_LOCAL_GUID(IID_IReferenceClock, 0x56a86897, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); #define IID_IAMBufferNegotiation MP_IID_IAMBufferNegotiation -static DEFINE_GUID(IID_IAMBufferNegotiation, 0x56ED71A0, 0xAF5F, 0x11D0, 0xB3, 0xF0, +MP_DEFINE_LOCAL_GUID(IID_IAMBufferNegotiation, 0x56ED71A0, 0xAF5F, 0x11D0, 0xB3, 0xF0, 0x00, 0xAA, 0x00, 0x37, 0x61, 0xC5); #define IID_IKsPropertySet MP_IID_IKsPropertySet -static DEFINE_GUID(IID_IKsPropertySet, 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, +MP_DEFINE_LOCAL_GUID(IID_IKsPropertySet, 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, 0x00, 0xaa, 0x00, 0x61, 0xbe, 0x93); #define IID_ISampleGrabber MP_IID_ISampleGrabber -static DEFINE_GUID(IID_ISampleGrabber, 0x6B652FFF, 0x11FE, 0x4fce, 0x92, 0xAD, +MP_DEFINE_LOCAL_GUID(IID_ISampleGrabber, 0x6B652FFF, 0x11FE, 0x4fce, 0x92, 0xAD, 0x02, 0x66, 0xB5, 0xD7, 0xC7, 0x8F); #define IID_ISampleGrabberCB MP_IID_ISampleGrabberCB -static DEFINE_GUID(IID_ISampleGrabberCB, 0x0579154A, 0x2B53, 0x4994, 0xB0, 0xD0, +MP_DEFINE_LOCAL_GUID(IID_ISampleGrabberCB, 0x0579154A, 0x2B53, 0x4994, 0xB0, 0xD0, 0xE7, 0x73, 0x14, 0x8E, 0xFF, 0x85); #define IID_ICaptureGraphBuilder2 MP_IID_ICaptureGraphBuilder2 -static DEFINE_GUID(IID_ICaptureGraphBuilder2, 0x93e5a4e0, 0x2d50, 0x11d2, 0xab, +MP_DEFINE_LOCAL_GUID(IID_ICaptureGraphBuilder2, 0x93e5a4e0, 0x2d50, 0x11d2, 0xab, 0xfa, 0x00, 0xa0, 0xc9, 0xc6, 0xe3, 0x8d); #define IID_ICreateDevEnum MP_IID_ICreateDevEnum -static DEFINE_GUID(IID_ICreateDevEnum, 0x29840822, 0x5b84, 0x11d0, 0xbd, 0x3b, +MP_DEFINE_LOCAL_GUID(IID_ICreateDevEnum, 0x29840822, 0x5b84, 0x11d0, 0xbd, 0x3b, 0x00, 0xa0, 0xc9, 0x11, 0xce, 0x86); #define IID_IGraphBuilder MP_IID_IGraphBuilder -static DEFINE_GUID(IID_IGraphBuilder, 0x56a868a9, 0x0ad4, 0x11ce, 0xb0, 0x3a, +MP_DEFINE_LOCAL_GUID(IID_IGraphBuilder, 0x56a868a9, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); #define IID_IAMVideoProcAmp MP_IID_IAMVideoProcAmp -static DEFINE_GUID(IID_IAMVideoProcAmp, 0xC6E13360, 0x30AC, 0x11d0, 0xA1, 0x8C, +MP_DEFINE_LOCAL_GUID(IID_IAMVideoProcAmp, 0xC6E13360, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56); #define IID_IVideoWindow MP_IID_IVideoWindow -static DEFINE_GUID(IID_IVideoWindow, 0x56a868b4, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, +MP_DEFINE_LOCAL_GUID(IID_IVideoWindow, 0x56a868b4, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); #define IID_IMediaControl MP_IID_IMediaControl -static DEFINE_GUID(IID_IMediaControl, 0x56a868b1, 0x0ad4, 0x11ce, 0xb0, 0x3a, +MP_DEFINE_LOCAL_GUID(IID_IMediaControl, 0x56a868b1, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); #define IID_IAMTVTuner MP_IID_IAMTVTuner -static DEFINE_GUID(IID_IAMTVTuner, 0x211A8766, 0x03AC, 0x11d1, 0x8D, 0x13, 0x00, +MP_DEFINE_LOCAL_GUID(IID_IAMTVTuner, 0x211A8766, 0x03AC, 0x11d1, 0x8D, 0x13, 0x00, 0xAA, 0x00, 0xBD, 0x83, 0x39); #define IID_IAMCrossbar MP_IID_IAMCrossbar -static DEFINE_GUID(IID_IAMCrossbar, 0xc6e13380, 0x30ac, 0x11d0, 0xa1, 0x8c, 0x00, +MP_DEFINE_LOCAL_GUID(IID_IAMCrossbar, 0xc6e13380, 0x30ac, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56); #define IID_IAMStreamConfig MP_IID_IAMStreamConfig -static DEFINE_GUID(IID_IAMStreamConfig, 0xc6e13340, 0x30ac, 0x11d0, 0xa1, 0x8c, +MP_DEFINE_LOCAL_GUID(IID_IAMStreamConfig, 0xc6e13340, 0x30ac, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56); #define IID_IAMAudioInputMixer MP_IID_IAMAudioInputMixer -static DEFINE_GUID(IID_IAMAudioInputMixer, 0x54C39221, 0x8380, 0x11d0, 0xB3, 0xF0, +MP_DEFINE_LOCAL_GUID(IID_IAMAudioInputMixer, 0x54C39221, 0x8380, 0x11d0, 0xB3, 0xF0, 0x00, 0xAA, 0x00, 0x37, 0x61, 0xC5); #define IID_IAMTVAudio MP_IID_IAMTVAudio -static DEFINE_GUID(IID_IAMTVAudio, 0x83EC1C30, 0x23D1, 0x11d1, 0x99, 0xE6, 0x00, +MP_DEFINE_LOCAL_GUID(IID_IAMTVAudio, 0x83EC1C30, 0x23D1, 0x11d1, 0x99, 0xE6, 0x00, 0xA0, 0xC9, 0x56, 0x02, 0x66); #define IID_IAMAnalogVideoDecoder MP_IID_IAMAnalogVideoDecoder -static DEFINE_GUID(IID_IAMAnalogVideoDecoder, 0xC6E13350, 0x30AC, 0x11d0, 0xA1, +MP_DEFINE_LOCAL_GUID(IID_IAMAnalogVideoDecoder, 0xC6E13350, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56); #define IID_IPropertyBag MP_IID_IPropertyBag -static DEFINE_GUID(IID_IPropertyBag, 0x55272a00, 0x42cb, 0x11ce, 0x81, 0x35, 0x00, +MP_DEFINE_LOCAL_GUID(IID_IPropertyBag, 0x55272a00, 0x42cb, 0x11ce, 0x81, 0x35, 0x00, 0xaa, 0x00, 0x4b, 0xb8, 0x51); #define PIN_CATEGORY_CAPTURE MP_PIN_CATEGORY_CAPTURE -static DEFINE_GUID(PIN_CATEGORY_CAPTURE, 0xfb6c4281, 0x0353, 0x11d1, 0x90, 0x5f, +MP_DEFINE_LOCAL_GUID(PIN_CATEGORY_CAPTURE, 0xfb6c4281, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba); #define PIN_CATEGORY_VIDEOPORT MP_PIN_CATEGORY_VIDEOPORT -static DEFINE_GUID(PIN_CATEGORY_VIDEOPORT, 0xfb6c4285, 0x0353, 0x11d1, 0x90, 0x5f, +MP_DEFINE_LOCAL_GUID(PIN_CATEGORY_VIDEOPORT, 0xfb6c4285, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba); #define PIN_CATEGORY_PREVIEW MP_PIN_CATEGORY_PREVIEW -static DEFINE_GUID(PIN_CATEGORY_PREVIEW, 0xfb6c4282, 0x0353, 0x11d1, 0x90, 0x5f, +MP_DEFINE_LOCAL_GUID(PIN_CATEGORY_PREVIEW, 0xfb6c4282, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba); #define PIN_CATEGORY_VBI MP_PIN_CATEGORY_VBI -static DEFINE_GUID(PIN_CATEGORY_VBI, 0xfb6c4284, 0x0353, 0x11d1, 0x90, 0x5f, +MP_DEFINE_LOCAL_GUID(PIN_CATEGORY_VBI, 0xfb6c4284, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba); #define PROPSETID_TUNER MP_PROPSETID_TUNER -static DEFINE_GUID(PROPSETID_TUNER, 0x6a2e0605, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, +MP_DEFINE_LOCAL_GUID(PROPSETID_TUNER, 0x6a2e0605, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56); #define MEDIATYPE_VBI MP_MEDIATYPE_VBI -static DEFINE_GUID(MEDIATYPE_VBI, 0xf72a76e1, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, +MP_DEFINE_LOCAL_GUID(MEDIATYPE_VBI, 0xf72a76e1, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba); #define INSTANCEDATA_OF_PROPERTY_PTR(x) (((KSPROPERTY*)(x)) + 1) @@ -1092,7 +1101,7 @@ mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableExtractFreqTable); return E_FAIL; }; - mp_msg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_FreqTableLoaded, tunerInput == TunerInputAntenna ? "broadcast" : "cable", + mp_msg(MSGT_TV, MSGL_V, "tvi_dshow: loaded system (%s) frequency table for country id=%d (channels:%d).\n", tunerInput == TunerInputAntenna ? "broadcast" : "cable", chanlist2country(priv->tv_param->chanlist), priv->freq_table_len); } @@ -1143,7 +1152,7 @@ if (priv->direct_setfreq_call) { //using direct call to set frequency hr = set_frequency_direct(priv->pTVTuner, lFreq); if (FAILED(hr)) { - mp_msg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_DirectSetFreqFailed); + mp_msg(MSGT_TV, MSGL_V, "tvi_dshow: Unable to set frequency directly. OS built-in channels table will be used.\n"); priv->direct_setfreq_call = 0; } } @@ -1252,7 +1261,7 @@ mp_msg(MSGT_TV, MSGL_DBG4, "tvi_dshow: get_capabilities called\n"); if (priv->pTVTuner) { - mp_msg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_SupportedNorms); + mp_msg(MSGT_TV, MSGL_V, "tvi_dshow: supported norms:"); hr = OLE_CALL_ARGS(priv->pTVTuner, get_AvailableTVFormats, &lAvailableFormats); if (FAILED(hr)) @@ -1276,7 +1285,7 @@ tv_available_inputs = malloc(sizeof(long) * lInputPins); tv_available_inputs_count = 0; - mp_msg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_AvailableVideoInputs); + mp_msg(MSGT_TV, MSGL_V, "tvi_dshow: available video inputs:"); for (i = 0; i < lInputPins; i++) { OLE_CALL_ARGS(priv->pCrossbar, get_CrossbarPinInfo, 1, i, &lRelated, &lPhysicalType); @@ -1297,7 +1306,7 @@ hr = OLE_CALL_ARGS(priv->chains[1]->pCaptureFilter, EnumPins, &pEnum); if (FAILED(hr)) return; - mp_msg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_AvailableAudioInputs); + mp_msg(MSGT_TV, MSGL_V, "tvi_dshow: available audio inputs:"); i = 0; while (OLE_CALL_ARGS(pEnum, Next, 1, &pPin, NULL) == S_OK) { memset(&pi, 0, sizeof(pi)); @@ -1319,7 +1328,7 @@ else OLE_CALL_ARGS(pIAMixer, put_MixLevel, 1.0); #endif - mp_msg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_InputSelected); + mp_msg(MSGT_TV, MSGL_V, "(selected)"); } else { OLE_CALL_ARGS(pIAMixer, put_Enable, FALSE); #if 0 @@ -1992,7 +2001,7 @@ if(get_device_name(pM, tmp, DEVICE_NAME_MAX_LEN)!=TVI_CONTROL_TRUE) mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableGetDeviceName, i); else - mp_msg(MSGT_TV, MSGL_V, MSGTR_TVI_DS_DeviceName, i, tmp); + mp_msg(MSGT_TV, MSGL_V, "tvi_dshow: Device #%d: %s\n", i, tmp); if (index != -1 && i == index) { mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TVI_DS_UsingDevice, index, tmp); hr = OLE_CALL_ARGS(pM, BindToObject, 0, 0, &IID_IBaseFilter,(void *) &pFilter); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/tvi_v4l2.c mplayer-1.0~rc4.dfsg1+svn34540/stream/tvi_v4l2.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/tvi_v4l2.c 2011-04-11 02:05:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/tvi_v4l2.c 2011-06-26 14:42:35.000000000 +0000 @@ -1376,7 +1376,8 @@ static int get_capture_buffer_size(priv_t *priv) { - int bufsize, cnt; + uint64_t bufsize; + int cnt; if (priv->tv_param->buffer_size >= 0) { bufsize = priv->tv_param->buffer_size*1024*1024; @@ -1385,14 +1386,10 @@ struct sysinfo si; sysinfo(&si); - if (si.totalram<2*1024*1024) { - bufsize = 1024*1024; - } else { - bufsize = si.totalram/2; - } -#else - bufsize = 16*1024*1024; + bufsize = (si.freeram/2)*si.mem_unit; + if ( bufsize < 16*1024*1024) #endif + bufsize = 16*1024*1024; } cnt = bufsize/priv->format.fmt.pix.sizeimage; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/stream/tvi_v4l.c mplayer-1.0~rc4.dfsg1+svn34540/stream/tvi_v4l.c --- mplayer-1.0~rc4.dfsg1+svn33713/stream/tvi_v4l.c 2010-11-09 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/stream/tvi_v4l.c 2011-06-26 14:42:35.000000000 +0000 @@ -760,7 +760,8 @@ static int get_capture_buffer_size(priv_t *priv) { - int bufsize, cnt; + uint64_t bufsize; + int cnt; if (priv->tv_param->buffer_size >= 0) { bufsize = priv->tv_param->buffer_size*1024*1024; @@ -769,14 +770,10 @@ struct sysinfo si; sysinfo(&si); - if (si.totalram<2*1024*1024) { - bufsize = 1024*1024; - } else { - bufsize = si.totalram/2; - } -#else - bufsize = 16*1024*1024; + bufsize = (si.freeram/2)*si.mem_unit; + if (bufsize < 16*1024*1024) #endif + bufsize = 16*1024*1024; } cnt = bufsize/(priv->height*priv->bytesperline); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/sub/av_sub.c mplayer-1.0~rc4.dfsg1+svn34540/sub/av_sub.c --- mplayer-1.0~rc4.dfsg1+svn33713/sub/av_sub.c 2010-11-29 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/sub/av_sub.c 2011-10-26 15:12:35.000000000 +0000 @@ -18,6 +18,7 @@ #include "libavcodec/avcodec.h" #include "libmpdemux/stheader.h" +#include "mp_msg.h" #include "sub.h" #include "spudec.h" #include "av_sub.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/sub/subreader.c mplayer-1.0~rc4.dfsg1+svn34540/sub/subreader.c --- mplayer-1.0~rc4.dfsg1+svn33713/sub/subreader.c 2011-05-21 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/sub/subreader.c 2011-12-14 00:17:49.000000000 +0000 @@ -263,9 +263,9 @@ } -static char *sub_readtext(char *source, char **dest) { +static const char *sub_readtext(const char *source, char **dest) { int len=0; - char *p=source; + const char *p=source; // printf("src=%p dest=%p \n",source,dest); @@ -285,11 +285,26 @@ else return NULL; // last text field } +static subtitle *set_multiline_text(subtitle *current, const char *text, int start) +{ + int i = start; + while ((text = sub_readtext(text, current->text + i))) { + if (current->text[i] == ERR) return ERR; + i++; + if (i >= SUB_MAX_TEXT) { + mp_msg(MSGT_SUBREADER, MSGL_WARN, "Too many lines in a subtitle\n"); + current->lines = i; + return current; + } + } + current->lines = i + 1; + return current; +} + static subtitle *sub_read_line_microdvd(stream_t *st,subtitle *current, int utf16) { char line[LINE_LEN+1]; char line2[LINE_LEN+1]; - char *p, *next; - int i; + char *p; do { if (!stream_read_line (st, line, LINE_LEN, utf16)) return NULL; @@ -308,22 +323,12 @@ #endif p = line2; - next=p, i=0; - while ((next =sub_readtext (next, &(current->text[i])))) { - if (current->text[i]==ERR) {return ERR;} - i++; - if (i>=SUB_MAX_TEXT) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"Too many lines in a subtitle\n");current->lines=i;return current;} - } - current->lines= ++i; - - return current; + return set_multiline_text(current, p, 0); } static subtitle *sub_read_line_mpl2(stream_t *st,subtitle *current, int utf16) { char line[LINE_LEN+1]; char line2[LINE_LEN+1]; - char *p, *next; - int i; do { if (!stream_read_line (st, line, LINE_LEN, utf16)) return NULL; @@ -332,17 +337,8 @@ &(current->start), &(current->end), line2) < 3)); current->start *= 10; current->end *= 10; - p=line2; - - next=p, i=0; - while ((next =sub_readtext (next, &(current->text[i])))) { - if (current->text[i]==ERR) {return ERR;} - i++; - if (i>=SUB_MAX_TEXT) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"Too many lines in a subtitle\n");current->lines=i;return current;} - } - current->lines= ++i; - return current; + return set_multiline_text(current, line2, 0); } static subtitle *sub_read_line_subrip(stream_t* st, subtitle *current, int utf16) { @@ -525,8 +521,8 @@ static subtitle *sub_read_line_vplayer(stream_t *st,subtitle *current, int utf16) { char line[LINE_LEN+1]; int a1,a2,a3; - char *p=NULL, *next,separator; - int i,len,plen; + char *p=NULL, separator; + int len,plen; while (!current->text[0]) { if (!stream_read_line (st, line, LINE_LEN, utf16)) return NULL; @@ -553,21 +549,42 @@ // colon! look, what simple it can be: p = &line[ plen ]; - i=0; if (*p!='|') { // - next = p,i=0; - while ((next =sub_readtext (next, &(current->text[i])))) { - if (current->text[i]==ERR) {return ERR;} - i++; - if (i>=SUB_MAX_TEXT) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"Too many lines in a subtitle\n");current->lines=i;return current;} - } - current->lines=i+1; + return set_multiline_text(current, p, 0); } } return current; } +static subtitle *sub_read_line_google(stream_t *st, subtitle *current, int utf16) +{ + uint8_t part[LINE_LEN+1]; + uint8_t *p; + double start, duration; + do { + if (!stream_read_until(st, part, LINE_LEN, '>', utf16)) return NULL; + } while (sscanf(part, "start = start * 100; + current->end = current->start + duration * 100; + + // find start of end tag + if (!stream_read_until(st, part, LINE_LEN, '<', utf16)) return NULL; + + // discard end tag opening + p = strchr(part, '<'); + if (p) *p = 0; + + // This is the actual text. + if (set_multiline_text(current, part, 0) == ERR) + return ERR; + + // discard rest of closing tag + if (!stream_read_until(st, part, LINE_LEN, '>', utf16)) return NULL; + return current; +} + static subtitle *sub_read_line_rt(stream_t *st,subtitle *current, int utf16) { //TODO: This format uses quite rich (sub/super)set of xhtml // I couldn't check it since DTD is not included. @@ -575,7 +592,7 @@ char line[LINE_LEN+1]; int a1,a2,a3,a4,b1,b2,b3,b4; char *p=NULL,*next=NULL; - int i,len,plen; + int len,plen; while (!current->text[0]) { if (!stream_read_line (st, line, LINE_LEN, utf16)) return NULL; @@ -602,18 +619,13 @@ current->end = b1*360000+b2*6000+b3*100+b4/10; if (b1 == 0 && b2 == 0 && b3 == 0 && b4 == 0) current->end = current->start+200; - p=line; p+=plen;i=0; + p=line; p+=plen; // TODO: I don't know what kind of convention is here for marking multiline subs, maybe
like in xml? next = strstr(line,""); if(next && strlen(next)>8){ - next+=8;i=0; - while ((next =sub_readtext (next, &(current->text[i])))) { - if (current->text[i]==ERR) {return ERR;} - i++; - if (i>=SUB_MAX_TEXT) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"Too many lines in a subtitle\n");current->lines=i;return current;} - } + next+=8; + return set_multiline_text(current, next, 0); } - current->lines=i+1; } return current; } @@ -805,9 +817,8 @@ static subtitle *sub_read_line_aqt(stream_t *st,subtitle *current, int utf16) { char line[LINE_LEN+1]; - char *next; - int i; +retry: while (1) { // try to locate next subtitle if (!stream_read_line (st, line, LINE_LEN, utf16)) @@ -817,6 +828,7 @@ } #ifdef CONFIG_SORTSUB + if (!previous_sub_end) previous_sub_end = (current->start) ? current->start - 1 : 0; #else if (previous_aqt_sub != NULL) @@ -835,22 +847,15 @@ if (!stream_read_line (st, line, LINE_LEN, utf16)) return current; - next = line,i=1; - while ((next =sub_readtext (next, &(current->text[i])))) { - if (current->text[i]==ERR) {return ERR;} - i++; - if (i>=SUB_MAX_TEXT) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"Too many lines in a subtitle\n");current->lines=i;return current;} - } - current->lines=i+1; + if (set_multiline_text(current, line, 1) == ERR) + return ERR; if (!strlen(current->text[0]) && !strlen(current->text[1])) { -#ifdef CONFIG_SORTSUB - previous_sub_end = 0; -#else +#ifndef CONFIG_SORTSUB // void subtitle -> end of previous marked and exit previous_aqt_sub = NULL; #endif - return NULL; + goto retry; } return current; @@ -863,9 +868,9 @@ static subtitle *sub_read_line_subrip09(stream_t *st,subtitle *current, int utf16) { char line[LINE_LEN+1]; int a1,a2,a3; - char * next=NULL; - int i,len; + int len; +retry: while (1) { // try to locate next subtitle if (!stream_read_line (st, line, LINE_LEN, utf16)) @@ -877,6 +882,7 @@ current->start = a1*360000+a2*6000+a3*100; #ifdef CONFIG_SORTSUB + if (!previous_sub_end) previous_sub_end = (current->start) ? current->start - 1 : 0; #else if (previous_subrip09_sub != NULL) @@ -888,25 +894,17 @@ if (!stream_read_line (st, line, LINE_LEN, utf16)) return NULL; - next = line,i=0; - current->text[0]=""; // just to be sure that string is clear - while ((next =sub_readtext (next, &(current->text[i])))) { - if (current->text[i]==ERR) {return ERR;} - i++; - if (i>=SUB_MAX_TEXT) { mp_msg(MSGT_SUBREADER,MSGL_WARN,"Too many lines in a subtitle\n");current->lines=i;return current;} - } - current->lines=i+1; + if (set_multiline_text(current, line, 0) == ERR) + return ERR; - if (!strlen(current->text[0]) && (i==0)) { -#ifdef CONFIG_SORTSUB - previous_sub_end = 0; -#else + if (!strlen(current->text[0]) && current->lines <= 1) { +#ifndef CONFIG_SORTSUB // void subtitle -> end of previous marked and exit previous_subrip09_sub = NULL; #endif - return NULL; + goto retry; } return current; @@ -1149,6 +1147,8 @@ {*uses_time=0; return SUB_AQTITLE;} if (sscanf (line, "[%d:%d:%d]", &i, &i, &i)==3) {*uses_time=1;return SUB_SUBRIP09;} + if (strstr (line, "")) + {*uses_time=1; return SUB_GOOGLE;} } return SUB_INVALID; // too many bad lines @@ -1237,11 +1237,7 @@ */ int do_fribid_log2vis(int charset, const char *in, FriBidiChar *logical, FriBidiChar *visual, int flip_commas) { -#if defined(FRIBIDI_PAR_LTR) || FRIBIDI_INTERFACE_VERSION >= 3 FriBidiParType base = flip_commas ? FRIBIDI_PAR_ON : FRIBIDI_PAR_LTR; -#else - FriBidiCharType base = flip_commas ? FRIBIDI_TYPE_ON : FRIBIDI_TYPE_L; -#endif int len = strlen(in); len = fribidi_charset_to_unicode(charset, in, len, logical); if (!fribidi_log2vis(logical, len, &base, visual, NULL, NULL, NULL)) @@ -1429,7 +1425,7 @@ #undef MAX_GUESS_BUFFER_SIZE #endif -sub_data* sub_read_file (char *filename, float fps) { +sub_data* sub_read_file (const char *filename, float fps) { int utf16; stream_t* fd; int n_max, n_first, i, j, sub_first, sub_orig; @@ -1451,7 +1447,8 @@ { sub_read_line_subviewer2, NULL, "subviewer 2.0" }, { sub_read_line_subrip09, NULL, "subrip 0.9" }, { sub_read_line_jacosub, NULL, "jacosub" }, - { sub_read_line_mpl2, NULL, "mpl2" } + { sub_read_line_mpl2, NULL, "mpl2" }, + { sub_read_line_google, NULL, "google" }, }; const struct subreader *srp; @@ -1517,7 +1514,7 @@ sub=srp->read(fd,sub,utf16); if(!sub) break; // EOF #ifdef CONFIG_ICONV - if ((sub!=ERR) && sub_utf8 == 2) sub=subcp_recode(sub); + if ((sub!=ERR) && sub_utf8 == 2 && utf16 == 0) sub=subcp_recode(sub); #endif #ifdef CONFIG_FRIBIDI if (sub!=ERR) sub=sub_fribidi(sub,sub_utf8,0); @@ -2515,15 +2512,16 @@ sub->text[sub->lines] = buf; sub->endpts[sub->lines] = endpts; -#ifndef CONFIG_ASS - if (!strip_markup) - mp_msg(MSGT_SUBREADER, MSGL_ERR, "strip_markup must be set when ASS support is disabled!\n"); - strip_markup = 1; -#endif if (!strip_markup) { +#ifdef CONFIG_ASS subassconvert_subrip(txt, buf, MAX_SUBLINE + 1); sub->text[sub->lines] = buf; - } else { +#else + mp_msg(MSGT_SUBREADER, MSGL_ERR, "strip_markup must be set when ASS support is disabled!\n"); + strip_markup = 1; +#endif + } + if (strip_markup) { for (i = 0; i < len && pos < MAX_SUBLINE; i++) { char c = txt[i]; if (c == '<') comment |= 1; diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/sub/subreader.h mplayer-1.0~rc4.dfsg1+svn34540/sub/subreader.h --- mplayer-1.0~rc4.dfsg1+svn33713/sub/subreader.h 2011-05-09 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/sub/subreader.h 2011-08-15 21:28:19.000000000 +0000 @@ -50,6 +50,7 @@ #define SUB_SUBRIP09 11 #define SUB_JACOSUB 12 #define SUB_MPL2 13 +#define SUB_GOOGLE 14 #define MAX_SUBTITLE_FILES 128 @@ -91,7 +92,7 @@ typedef void (*open_sub_func)(char *, float, int); typedef int (*open_vob_func)(const char *, const char * const, int, void *); -sub_data* sub_read_file (char *filename, float pts); +sub_data* sub_read_file (const char *filename, float pts); subtitle* subcp_recode (subtitle *sub); // enca_fd is the file enca uses to determine the codepage. // setting to NULL disables enca. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/sub/vobsub.c mplayer-1.0~rc4.dfsg1+svn34540/sub/vobsub.c --- mplayer-1.0~rc4.dfsg1+svn33713/sub/vobsub.c 2011-06-13 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/sub/vobsub.c 2011-10-21 15:44:58.000000000 +0000 @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -695,7 +696,7 @@ { int h, m, s, ms; off_t filepos; - if (sscanf(line, " %02d:%02d:%02d:%03d, filepos: %09lx", + if (sscanf(line, " %02d:%02d:%02d:%03d, filepos: %09"PRIx64"", &h, &m, &s, &ms, &filepos) != 5) return -1; return vobsub_add_timestamp(vob, filepos, vob->delay + ms + 1000 * (s + 60 * (m + 60 * h))); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/subopt-helper.c mplayer-1.0~rc4.dfsg1+svn34540/subopt-helper.c --- mplayer-1.0~rc4.dfsg1+svn33713/subopt-helper.c 2010-11-09 03:05:03.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/subopt-helper.c 2011-08-11 17:45:38.000000000 +0000 @@ -17,7 +17,7 @@ */ /** - * \file subopt-helper.c + * \file * * \brief Compensates the suboption parsing code duplication a bit. * diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/subopt-helper.h mplayer-1.0~rc4.dfsg1+svn34540/subopt-helper.h --- mplayer-1.0~rc4.dfsg1+svn33713/subopt-helper.h 2010-10-26 08:15:59.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/subopt-helper.h 2011-08-11 17:45:38.000000000 +0000 @@ -20,7 +20,7 @@ #define MPLAYER_SUBOPT_HELPER_H /** - * \file subopt-helper.h + * \file * * \brief Datatype and functions declarations for usage * of the suboption parser. diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/faterun.sh mplayer-1.0~rc4.dfsg1+svn34540/tests/faterun.sh --- mplayer-1.0~rc4.dfsg1+svn33713/tests/faterun.sh 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/faterun.sh 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,30 @@ +#!/bin/sh +if [ -z "$FATE_SAMPLES" ] ; then + echo "FATE_SAMPLES is not set!" + exit 1 +fi + +sample="$1" +md5out="tests/res/$sample.md5" +ref_file="tests/ref/$sample.md5" +options="-noconfig all -lavdopts threads=4:bitexact:idct=2 -really-quiet -noconsolecontrols -nosound -benchmark" +if [ -z ${sample##h264-conformance/*} ] ; then + # these files generally only work when a fps is given explicitly + options="$options -fps 25" +fi +echo "testing $sample" + +# create necessary files and run +mkdir -p $(dirname "$md5out") +touch "$md5out" +./mplayer $options -vo md5sum:outfile="$md5out" "$FATE_SAMPLES/$sample" + +# check result +if ! [ -e "$ref_file" ] ; then + touch tests/ref/empty.md5 + ref_file=tests/ref/empty.md5 +fi +if ! diff -uw "$ref_file" "$md5out" ; then + mv "$md5out" "$md5out.bad" + exit 1 +fi diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/4xm/TimeGatep01s01n01a02_2.4xm.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/4xm/TimeGatep01s01n01a02_2.4xm.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/4xm/TimeGatep01s01n01a02_2.4xm.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/4xm/TimeGatep01s01n01a02_2.4xm.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,47 @@ +5cdbd2e3770fa6e8ff654666c3048038 frame00000000 +ab40b5f374f1c5312210321aaf97ed3c frame00000001 +6d71c0e6d36804bfeb77ea2c56ae49d4 frame00000002 +d9355cb257cde9bbecb0e72134c06894 frame00000003 +bab905efb6a71eb37117c83531aa05ec frame00000004 +5ed87576dfdfc1161a4a822025d4c7e0 frame00000005 +7319c65efa9c65f7bc2ae96c424326ae frame00000006 +9a8ec73b7f0c2bebb93c45aeea948088 frame00000007 +f77de3b73f6c405abc751e692d6040f4 frame00000008 +6fe3f8723e881903992e7e09d6a130f9 frame00000009 +d1d055b4c31f103d7c3378a33835f112 frame00000010 +a2f5ce138162e5b7cfc0c2f7897bd46c frame00000011 +1aba7a9aac80d49242d266272eb784eb frame00000012 +37ea6d2055d30cd26d8ec02a0ebd0409 frame00000013 +9d8b9eaf010d94c2afca1b5f3ef54e88 frame00000014 +9836c84021a2a96bc2de41f8ba5226a0 frame00000015 +3d3a3961ca0a7481dc4444fa2076b40b frame00000016 +e22b4a7984844f91dd99e617c47cb099 frame00000017 +666b4041dac0d97978cb60fb7206e325 frame00000018 +a5a4a0c58cad5845b05d640c15e6e43b frame00000019 +7bb93ea505de4a65756dbcf9577982ba frame00000020 +a5dabadbbbc6309212450c6443b472d8 frame00000021 +4da55b09182fdda6a24cced71002464b frame00000022 +c7b89200207c97014c897fb1c154b9b5 frame00000023 +deedd3772d5b928a2f7c6d468cdbad41 frame00000024 +af664ad06235e679c4c0b745ff858a2f frame00000025 +11c3143982fa017bd16365a4f6de4dfa frame00000026 +095acdb7b4a36925b1f10ec9e8b10524 frame00000027 +7e6af074d35bc8a05709d75bdc110939 frame00000028 +0f5a83d2f2137f5ec96695284d109cfd frame00000029 +c6af1a3b57fad483af10896559771d1d frame00000030 +0b4936bd7e02a200fb5e4c1a5cae7c43 frame00000031 +b681032eb10b85af1fb61028f7c40d81 frame00000032 +1a08fc41bea7ed74725d633f06fbba0d frame00000033 +8f83854ca20d02ebad11d1304211b25c frame00000034 +c83586c89460e167482883a3ab6d8b29 frame00000035 +47a29b8739bcbf5050a1ed0418805e18 frame00000036 +676161a701210a78e629e897a3510e5b frame00000037 +fab1752d21edd302a478baa79e23a3af frame00000038 +78adb71722519f5220a9f1c2367b66ca frame00000039 +33ad837aaa520cf065eab236d553e6fd frame00000040 +28b9efcea1c024777686ad485e1ce25f frame00000041 +4f39ab98a8bb2f65c6291e3fcc82f8a3 frame00000042 +bfbe680c1da731cb5ef05ae6004d2934 frame00000043 +16422107c85711d7911000471fd009c6 frame00000044 +24defabd0f6849d495ffcbe41db11fe4 frame00000045 +1d2bc8b9a073e9be664043bdca0f81d7 frame00000046 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/4xm/version1.4xm.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/4xm/version1.4xm.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/4xm/version1.4xm.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/4xm/version1.4xm.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,15 @@ +aaff82cb248b72ea4fd3074290559132 frame00000000 +766c0f6f725114ad6b7b5426323f24a6 frame00000001 +9e4dc5b77caee7226dc6ca449f4eb2f3 frame00000002 +74b1aea3f7fca86e61c1be383cb0c493 frame00000003 +1004747f7a6fd9aac2fc9373ddc87251 frame00000004 +d865748a0d7a9e980334befcbf96bc9f frame00000005 +7cac9885d70590c3e11a0fc3ce22f160 frame00000006 +749911f7aa4b83a25623348b7b275035 frame00000007 +c3d57d341e158aab2a2e872a5fbabaa2 frame00000008 +51fd405e0891957308e5a0ed79c963e4 frame00000009 +d62358c17af034d9cc97e104dc761d08 frame00000010 +77113da5bf8aa1c31389d8d4e236504a frame00000011 +d1b1f5206e4e17ac713589e5ed52f773 frame00000012 +517566c8ed499ffaffa9c87e5bab501c frame00000013 +7db6e10eeb5f7e4a47d556629d95003f frame00000014 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/8bps/full9iron-partial.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/8bps/full9iron-partial.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/8bps/full9iron-partial.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/8bps/full9iron-partial.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,12 @@ +becd9d5d4332c1f51e626c9f585e8506 frame00000000 +becd9d5d4332c1f51e626c9f585e8506 frame00000001 +ab90bfea79f079075220e19c1707a11c frame00000002 +56e25811c1d78cc45dbf55902b5d15e0 frame00000003 +5276d5b6849a30b58060de0c4279de33 frame00000004 +3be2e2d224e5a86efab5731a2d6821bf frame00000005 +5236371ac022f8502bf3800c87c64c52 frame00000006 +641a14951068fe8e52657d9a1db2202e frame00000007 +7bfe084f80f06d28148b5020fce1c68e frame00000008 +6fb22279f80ea7d04a888a595e8b5d4a frame00000009 +69274ec48945c114ebb1ec68a2758950 frame00000010 +33260a91cdb947b45238bd51acd82092 frame00000011 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/aasc/AASC-1.5MB.AVI.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/aasc/AASC-1.5MB.AVI.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/aasc/AASC-1.5MB.AVI.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/aasc/AASC-1.5MB.AVI.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,24 @@ +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000000 +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000001 +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000002 +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000003 +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000004 +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000005 +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000006 +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000007 +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000008 +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000009 +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000010 +b073022b30a4c87ea7ba9fca1b6e1da2 frame00000011 +a9d4ab8650955bbd5fef8b42abe1ec49 frame00000012 +6cb5bc8ad6ef7742174cb47dca53e47f frame00000013 +02e65eb0d23f1131458eb41ed07d7c0d frame00000014 +b007cf632470773a71453555dec19718 frame00000015 +2254b2941613559d163260785640373b frame00000016 +093f5ed228fdf5d3d4109b756deb1fda frame00000017 +e7a1461d539eca8c582abdf6c6ce4efc frame00000018 +d28742700e60752dda1d2cb2c63a1017 frame00000019 +2ebad5b0c507703399ca939f39a63060 frame00000020 +7bd3b83c241c64ce7dac23f0668f2861 frame00000021 +ede43172cc08a3ca95651ec0354a68c9 frame00000022 +018c95520db7103e7cbd2fd2bd4674e0 frame00000023 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/alg-mm/ibmlogo.mm.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/alg-mm/ibmlogo.mm.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/alg-mm/ibmlogo.mm.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/alg-mm/ibmlogo.mm.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,31 @@ +6771062f4aac3d7e0fba916de38a37ee frame00000000 +20431f7518efee23611a2233a4b5916d frame00000001 +08a3bf7ac7781ab23f80dd8044f1bc34 frame00000002 +d55f2dae7e98b79113c39300d36e4334 frame00000003 +288b1d4b05ab7368f5b4cc2a35121812 frame00000004 +70ff6b66026785b757e00e2a1da448c7 frame00000005 +a0094e47fc920fc14e8967194aea9144 frame00000006 +561afda7cf96a78f37c33e33ecb0d0fc frame00000007 +7daebd3785a001fc2b1bf5f96d807ab4 frame00000008 +2a508b10faa42e1e26dee784230c2f45 frame00000009 +01120ce53bbf4a49da213c739e06120d frame00000010 +08b07f998c5b3a86058d87adda1f1383 frame00000011 +5bd37061ee1d60e9e32ea905c9314463 frame00000012 +d73d736a8cab5f7661b0d91160213a8a frame00000013 +37c62c7e3c772af6ffbda41455280d52 frame00000014 +01100c6e3de380934cad8501d6226ffd frame00000015 +c23d296c8a8717c3fc0256fa7be481fb frame00000016 +aa98ee328fc3d75d6edbb16080bb0aeb frame00000017 +a6130c3d3cb12c2535a1e853cc89618b frame00000018 +b453c051fbff2996db04f3741dbcb928 frame00000019 +ee506e610806d82382633c9c1240776b frame00000020 +e2355a20d870b7a65f27fb975c4517a1 frame00000021 +0cd460c12f676e60e8d5520bb1a7436a frame00000022 +7e8f1619ed4b7297089b05afce7cf249 frame00000023 +a445bf1710379ab441f29fcde519f150 frame00000024 +1efb2dca537a30f4c38e887516b6df23 frame00000025 +630bb7c35301e4d3dbeca2d716bf5815 frame00000026 +7ec1b011b58ef10ea5f3a262032ee58c frame00000027 +237fa82f25a8bf3b88dfe9da8770a73e frame00000028 +910a65055c08a44cc78676a5d717b4c4 frame00000029 +ea375018c4ba6b92cd5d9cae2e1478af frame00000030 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/amv/MTV_high_res_320x240_sample_Penguin_Joke_MTV_from_WMV.amv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/amv/MTV_high_res_320x240_sample_Penguin_Joke_MTV_from_WMV.amv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/amv/MTV_high_res_320x240_sample_Penguin_Joke_MTV_from_WMV.amv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/amv/MTV_high_res_320x240_sample_Penguin_Joke_MTV_from_WMV.amv.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,576 @@ +0de4e2f18e40fc9a20e16f8136cec6ae frame00000000 +235866e1ba0b9fcdfe341fbef4183018 frame00000001 +5451a1c2d85bd955b67d419e76d6d051 frame00000002 +360e1569cfe66e2a9a95d56453e80d78 frame00000003 +691a7bff4d8397ea9e7861a5b7166a6b frame00000004 +e26e76e5ac984038d4927ca8326ed910 frame00000005 +6869e097c0ca7b9ee91b3420e7667349 frame00000006 +877bf1baf6153b8d73ab13a0192b4dcb frame00000007 +308a9f1809ad0501a483511077afe0fa frame00000008 +e9fa83c1b2d0291e2bbbe0b3b968e863 frame00000009 +fed9ccba64456d7a9541eccc3b386fde frame00000010 +795d9a265aeecd9deb161654f31e5f23 frame00000011 +549bd0096644628853a996db988c15d5 frame00000012 +33342e2778b3b7901d0c31dd49b08cbe frame00000013 +ebb5807fc41a4b2fcaa7a4989751eadf frame00000014 +5e8c9fe507c4c83520b245e6e3d2dc44 frame00000015 +2312222c0106c8536969c332ecfb370e frame00000016 +99fa540ff31781daff36e8198923b43b frame00000017 +5081e9097cc90c8087f00a3d4d99cc0e frame00000018 +8fbeba128a0910b2031c75a9bc2a2877 frame00000019 +3629864cc3dabb3642ffc78bd7762778 frame00000020 +4090b051b4c0015c091a180aa98b359e frame00000021 +abf919c568cc2b7dbd95f20da0eef345 frame00000022 +da96914924d3e2405438e39311e32e7d frame00000023 +379214dad09d869b1bb132d965f10dde frame00000024 +cb33dab433f9571c793f14d6aa97326d frame00000025 +07d6b8754a43e08dd19dffc17bdfc843 frame00000026 +3cbc6e06c8ce8d3151bd2528b96c6ce3 frame00000027 +cabf5e508e7033b0e8303395619c4129 frame00000028 +9519567f12afc26fd4b1cad733e1de07 frame00000029 +186fa7c44dc48940b1b4485754acf077 frame00000030 +7d10b7eaaf52d429687e046755b599f8 frame00000031 +e1e00610356bc3c96da9c9e9f8197455 frame00000032 +d0e6780daa5f0654b6bee8c4a012741c frame00000033 +0e9d57977c0eda2ed834ec32a642e867 frame00000034 +48c2aa911780f99f81e5d496c6cf2b15 frame00000035 +d99ee4514220cd51ad12040d931f0c79 frame00000036 +bfdecb283390a40e8b4a2b763c5f03e2 frame00000037 +03a58759b137045e9792a1ecf05052e5 frame00000038 +61beb6dc2d4af23fd368f1a39ec764b3 frame00000039 +fc4ce84d22c511a3a4a0078ff7c24b5c frame00000040 +9c0c6d2b0534a169eb8bfd75af1537fb frame00000041 +e62a57dea6bab9de22bcb4b5f1d7cbc9 frame00000042 +3818eaa5fff27785e26a1d740ef1b925 frame00000043 +9a6f506eab5ca544a101b785131b043c frame00000044 +2d1653dc1e9e543e4f480e9f9d1de39f frame00000045 +0257aa78883be7b2dae3fe5702c5cfa3 frame00000046 +8af187d002a22921f772c61425d770cc frame00000047 +c5444fc536ae62c4971274b3b27e50f0 frame00000048 +7b06b1578293327514f51e05cfd92de5 frame00000049 +75a18c2e3a8ea679002d2af50b8fcf5b frame00000050 +4e5318fbd422cb4163c21767be4b92b8 frame00000051 +aef395fe3a3acb22a3aa48e1abf23720 frame00000052 +cc80de722ec5240d9583f65189e9c278 frame00000053 +f6888739caf0a7dbef1c1e89791e8496 frame00000054 +c3cdef97e3bb1ba8272ca0682512431d frame00000055 +3250486e23c59ba425f2e236b38e89dc frame00000056 +b3f7b7fe78562b8897a41181e83a4306 frame00000057 +7b927a90f7d78ce6ae1a105bcd2fe93e frame00000058 +085baa3bacd2a994b8813f776cdfcb77 frame00000059 +80c590a9f5cdf27aac9847718ad8f9a5 frame00000060 +a37c0777206ffa71b3fcb041ae5e4c86 frame00000061 +f741eb9954eb1667972bb189591e78c7 frame00000062 +5f345a3ccc66e4ff89b9ea1f27dd7fbc frame00000063 +a4035f7b28b42fe50da75e8d3e213ee7 frame00000064 +06d7641ece4dca3e2611907992cd95b8 frame00000065 +9aeae68640008420488daea243cff867 frame00000066 +e92079376071c9ca9aa9670014ee86ab frame00000067 +04b8911b0ab8134ef94066f99a9e1015 frame00000068 +0df500d56c18ac9e33da53ebf92d049a frame00000069 +836905226894fe4217448fcdd3192e0b frame00000070 +3bc06eae0eb92d80d0717f0b5b335b21 frame00000071 +4b202aa1346c9c0720b7aaa38fcb3054 frame00000072 +55cef738efca391973e02a5d48185c4f frame00000073 +6aeceee43f92060b91710df1619fc065 frame00000074 +2d1b6bbea6de24c60f2117c638ff136d frame00000075 +55190d2b1f752343babf93c5ae80f7ba frame00000076 +a4f9a1255b048c69afa0d440abdc8ff0 frame00000077 +31ee6a14e0c31b157750cb71f693dce3 frame00000078 +e1d75fd6874a33909372cf833f659cd8 frame00000079 +ac19aaa22b90533f125347aeefb1e4db frame00000080 +99de110adf3f468b24b5b7b6008d3d40 frame00000081 +57f3f8df3b1d202c39d5326bb65d3854 frame00000082 +a7d7214406679652d2a8d9db5c279345 frame00000083 +1aff74d4432878bb2238ec9876c916d4 frame00000084 +08c5406a21a87622a57d07aaaa618c6a frame00000085 +f1e4b975c58d9ac431f8f3b7b50dc2c1 frame00000086 +f1b88210d9bfbb1b69a3ef5109e48187 frame00000087 +eb5f797aefabc6fafaacecdb7fc852f9 frame00000088 +5df357a2a34e6c3d1eb90542aff44ec4 frame00000089 +bba36ee59ad43bec3fb21d0cf31c0151 frame00000090 +752158e30a197e8613c6b675ce4f63be frame00000091 +4fecc29d5cf63ef99197cb8122b3f6ee frame00000092 +1937a93be25e30b16e0a86199ebe23e6 frame00000093 +c1eeddd1c3e8d98c063d26bf9f3b5b71 frame00000094 +0cc4682d3798e870876e4038a9bfcc6c frame00000095 +e305b7c543c13a06d56b5e5d931927c9 frame00000096 +dd6502ceddd9f5b392515e47d70b8e04 frame00000097 +16c31b5b86bf1fd77110d5bb6bb08efe frame00000098 +22df507507a18fe72b21b3d0ef651ef5 frame00000099 +1645a86d952df612a0fa1d0ca2d9608b frame00000100 +65c0c8c677b5b6dbd3908d3f67f58690 frame00000101 +8bf317274c894f283fcf8ef436d1bca4 frame00000102 +2eb03d249504d966e98bcfb381713283 frame00000103 +d9ab60cc35fc4883cbdf097dd58a9ee9 frame00000104 +84b75015fd9496dd67d8cbf74171ba67 frame00000105 +84c1d1b2d24764ede46fd009ecbb4fdd frame00000106 +98efb31b4c44d10f7c8cfe579b41f038 frame00000107 +efb2f13d45fe7cab2cd4016952c33efb frame00000108 +00666ade98d47e46b21a71ca2054bb1d frame00000109 +f8b48a189f7fcd98e726233143400bac frame00000110 +0ff004493321c3c3136d6c6d6ab860a5 frame00000111 +c84d2c2cbeee2c205e5704c7cd00575e frame00000112 +99283c6e913eadc0b704da58a7f35b53 frame00000113 +ff13756c2f7834b1728ab049bc37a0ee frame00000114 +c45674ae44429b9122129fb5a7f23cb5 frame00000115 +b5f4c9c86b7abc4b5331c93ad81521c4 frame00000116 +c57a7614caa033984e262c4905586b1b frame00000117 +18b9e8964be16b8b9e6bf9f9bb14367f frame00000118 +6ddbe8650ddc19faa9dd06e919bf5209 frame00000119 +e17348f4d1abb8684204575e9e5c427e frame00000120 +c6ad2185d95cdcd945a195aa2d3366a8 frame00000121 +cdc9fd2fb3236203968bd8d1abc3dd07 frame00000122 +f4742c7b8ab18ef3db72769ef3797508 frame00000123 +6254d0273cb9ad5f74d1d5c231dac381 frame00000124 +61df86097bc0767bd08569bf849c5666 frame00000125 +9d32bb4562c8daeb41b660ae4ae65c76 frame00000126 +19416c21a9716f3777b08d01e4a8abf2 frame00000127 +efcde4705f7426d64c44ce5ac42bcfe6 frame00000128 +2c09a9bf64d30becd2ba8a5f4cb60ded frame00000129 +76980a1cb39c4ee5dd6904dadd072194 frame00000130 +2fcfed4b3eff086cd7268504e6205114 frame00000131 +12db91fd84e15a143818707234829148 frame00000132 +531ab2aefe51c6bc7524080f90320593 frame00000133 +419e6284acacdf50a8ddf78a5d029db3 frame00000134 +c9b96ca820970090d496607dadd64753 frame00000135 +9dc6c449647041339cf705e26ffb6e1a frame00000136 +4ef3f55fcba52e58dccd3bdb83836875 frame00000137 +1609e2a770626838be98f24cca5330a4 frame00000138 +a112a68c7e057bbdd62c02af80578c8b frame00000139 +3c6632d512c65a6b645d60b13013bc9d frame00000140 +bb55f8832ce283ce2c8ddf08bfa09e4e frame00000141 +d3e088e7914ccb0efc2f4194ee042b41 frame00000142 +c7a55114841ffbda5ae88da2c95fef7d frame00000143 +97bf690a7353e8d594310499fee12a85 frame00000144 +7bc1b101de13fef3fe60b8ed1366a4c7 frame00000145 +2660fbbd52669fbae8ee8528e64cd18f frame00000146 +62aa321ddbd06fcbbf8fcf18635a293c frame00000147 +105097e7bd0d7865fbf64a768a8675c6 frame00000148 +e3f1070279b3646036b2143d4c69317c frame00000149 +132f404fed1945e8cf6976e05683c371 frame00000150 +c40d8f114e1ef0af51a06ebb37dc0700 frame00000151 +ac3b80b3139a0b90ab42010ae3e8c1b7 frame00000152 +d8acd8a7a6f11b8cd293ee6db5e943c7 frame00000153 +714533dbb1bbe59fcd5f5baa6079c86c frame00000154 +d38ff7ea177247a5d4fb3dc9f7d4e8bc frame00000155 +e0b0a339bc661966401af32f368c5125 frame00000156 +037be579f97957b113495da13653cfb2 frame00000157 +148db9976e8018dc6ad25d8528dba5f5 frame00000158 +6a7a7747c7fd4b44a028093d0f3e04e5 frame00000159 +3deb5db03d0433fa23dda13207e2e654 frame00000160 +f70b79a1d75162d58d68d73e577cab0e frame00000161 +1518279a700674a96068fa21398bca4a frame00000162 +fb24e86a6adcdab608636b5a3f3b8904 frame00000163 +6c33d58620140bd2b9a25dcc226bc86c frame00000164 +2025e0687bd2eecfe173dad77322fa05 frame00000165 +a256ec1dc54d6efae629d5832f75b4aa frame00000166 +0b1f4308376f74df3c4dd10663d7f60f frame00000167 +ba9a229a7a6f64897bced05265410c58 frame00000168 +a22da17e3ffa1179ad17f37dd5232bb8 frame00000169 +0b41c9f475a8717b28bd4b8bf72d8305 frame00000170 +141f507054b4e3145ad7be8225ff7163 frame00000171 +10758ad7453b028977e0c0ed994d1ab2 frame00000172 +3c3ff09ca59e7d19f5a7cded1882ecaf frame00000173 +b3a4bab2068ecc490b9c06de3ce1d35d frame00000174 +d7ae8356425424f973d08e880b2c9e40 frame00000175 +4ad92491b9ed2b56efc59dbd1adeffb8 frame00000176 +987799ead3e38a6b0fa5470f57315e0a frame00000177 +81ffe033ea8af957dcccd2d537ddc6d3 frame00000178 +09601c590a0d881432b4e1970b146483 frame00000179 +4607dad21ff7168306876073faedf6e7 frame00000180 +7b4ddb69f93529e10a96bc7543b0d97e frame00000181 +a083b7b4df1dc6d176944225e080686b frame00000182 +90add4c031b5cad4ef78dd7c8c57afd6 frame00000183 +ced6a335ef33d1fc8c25a942a5cb5976 frame00000184 +8a808fdb29702a103d9c16f2231cddc6 frame00000185 +dbfe53737e8e46ebf28ecbc8329068e0 frame00000186 +bbcdd5edb1477c68ca8811a7c542d6e8 frame00000187 +58295ad9c95febe82d03716263d3bab7 frame00000188 +d96f241e24ee6e01ccc1f081d3a3fbed frame00000189 +f14a8b767b65b41d711228eb84034334 frame00000190 +f7a14538724a40ed88f2feba414d07cf frame00000191 +b688d3c2eb515bbbd3ffc791c73a4fa6 frame00000192 +31726e288d036474d598f6010da46434 frame00000193 +ce229a653c93f43f81dd59e4ff52a9af frame00000194 +061c4bf1add2d843fad0948433dad99f frame00000195 +9bf1d115289c5598b33b0221d79aeb42 frame00000196 +6db7cd30f556f1c70fd8d3f5eaa06c6c frame00000197 +434f29f40fc22c89f39f242caadd2d51 frame00000198 +8ee9b6eb342508eec35e320771220f6b frame00000199 +1f1b2b0fb3edb4835421a2668290b3a9 frame00000200 +505f9f7690474c3c5e4b8f4169a3f7a7 frame00000201 +762bb720fb14407b0f4c9508d82d00e7 frame00000202 +5de3119a8a075ffa38d34d8c2ab9d4ae frame00000203 +41bebe09bbac3719edf9f30a122c7652 frame00000204 +a29efc0fdfa7f0ce501129ae16cd020c frame00000205 +02b57342cca9765452ddb3e3d72e30fc frame00000206 +879c74c1c9dfdb6e4cdee63d13b2ee5a frame00000207 +0437ed73bad9ca81104ed6643e4c0080 frame00000208 +caf181bbce4e10371a1b915de417f818 frame00000209 +349ce42e8b22c7516225467e2334efc8 frame00000210 +c4b444eeef304ddb9464c35bea73c031 frame00000211 +9a260d77d01ff70f9efe8bdfe4aa70ca frame00000212 +ebc959313663b6eeeeb92ecfb448e6f0 frame00000213 +19e76c45c3cd8fb2d521d4affeec338c frame00000214 +eebd8598974c97ae6aec8b6ef002598e frame00000215 +e706111aa59b2e883369d132688011b3 frame00000216 +9a217560c4a0f50c7da1e70d9a826842 frame00000217 +40fd61886a323d40935b842edfec3f6d frame00000218 +defa12eaf7cf45df80e8366741e4a1d1 frame00000219 +7a87142b220647ec37be5f72e387e28a frame00000220 +77d31de8589d623ff2279d44e09a6488 frame00000221 +d23e7c50145a9b488b2d935b1ff162d5 frame00000222 +3ee4c08bca08c758b12ebf9dd3157ccb frame00000223 +e80ef09bd5a3c4ab63d6de012c56b94b frame00000224 +661b795139b2c01aabf0e1292960125b frame00000225 +db0f651795acdd8edaf794a0898e9eb2 frame00000226 +98ea5988fdb30e589f7ae5d947c9994b frame00000227 +eba365635a827f90f3de159dbe44413b frame00000228 +aa9f649366ba3ef6bf63c225799b24da frame00000229 +d55902c567ed070e2b923f885d2cdfe0 frame00000230 +4f8c7f4c75aa0b0f34a067edf1f2d805 frame00000231 +e2837ab4c7b7b24f4b94eaecf5e0608e frame00000232 +3143aa4effce425ed6a54629da862638 frame00000233 +f9c46df8c9b9283a47a99b10194ac83c frame00000234 +18d1b3ee98079f36c91a55709f552c32 frame00000235 +0b7b87b55987c39d92b959fb65fe5d16 frame00000236 +9476e88e1a098f783267f65a0f2f8438 frame00000237 +965d4c8c9dfdd4eb8d0e752af4c79719 frame00000238 +262039aa7998dae88ce365dce9e19ac0 frame00000239 +900277a657e45b76ae28f5a8aa34277d frame00000240 +6dcce191e8684630129a42e909f9c8e6 frame00000241 +571aeea5cd0794368423ce2ebf68886b frame00000242 +a5b3c549cfcfe28759f2b82e8205da98 frame00000243 +e1472f860df1d0b857366060234c22e3 frame00000244 +f70812292420f183a0a1fa11da308ab9 frame00000245 +e751a08caacffffd18c6f71ed728e922 frame00000246 +07be3a3c7464126fa4476500a0f9fc16 frame00000247 +32b7ebc70ee3e608c35c3fe0aa01a283 frame00000248 +b262c148540a6c802c4557d56973fb56 frame00000249 +d2890f2df2632145f4c3dba5a13d748a frame00000250 +cca66a018a6f51e68b9bb781b13d1b6c frame00000251 +5f51e7cd60b62b280ea93c6095bd2ab0 frame00000252 +999cfbbf835f699cd2c44410e8f149a1 frame00000253 +44d018daf63d604ecc455b10a03e6b45 frame00000254 +35908f25cc6f5c24b7bc40a8c758a43e frame00000255 +f40f5063eb4135c31e96e218e6a45ae7 frame00000256 +808d10af03ef0bd4f124674e48e09562 frame00000257 +03bdd92f37768e3794ad0ed9fa5f8ccd frame00000258 +728e2de75c21924344000d79d9b24b69 frame00000259 +c4e345cfe0860dae05c170b333550803 frame00000260 +6b81adc5035594c94631001a54f5d36e frame00000261 +813e0a35dc03d6ab27804c65003a2000 frame00000262 +9a303e8b7742dc9bd1964ab37b84494f frame00000263 +2bc677af0840c4ea06d4e1aff80c0a9e frame00000264 +929a57038bc89966e93175f753868776 frame00000265 +b0e0456f4113d05dec6b673674d157a5 frame00000266 +2d699eb5df0e7107d8ebe558a9a0c999 frame00000267 +ff4a066dd38238aafb73d773621bfd95 frame00000268 +a0c7df7328e6e663e8b531279b39c46b frame00000269 +ec2e3d4ccf24a09d5b7172fbf1a6d44a frame00000270 +78eea89905576c31b7d854652aa2a1a3 frame00000271 +c5fb43b5c1ec954a40e89e86cd7de1eb frame00000272 +66313865968ef16d23619a260d27213b frame00000273 +d8d6a880e9d7dafb20d5a3f701736f03 frame00000274 +3720797960b33f388f0bfc79daff0b38 frame00000275 +f81d965e584736a866d04fb6c48b3ab2 frame00000276 +9447effa060478981148661f5e2b8a1e frame00000277 +003c304dccea889c95df302676c437a0 frame00000278 +7c383bf5597e55787d68313a56d7b83f frame00000279 +8ec1798df204840d52368690e2aa15c2 frame00000280 +6b862b91bf387c5401e18b31137445bb frame00000281 +5d7d79b179dced49a24a3da3eb493cb6 frame00000282 +00d85651797094eb2cb0bcbecdf83ec7 frame00000283 +24fee118ec5ec9d383aa6030de8d2e77 frame00000284 +66abe1bc10fab50694f65271712ddcd5 frame00000285 +120a1b27cb4d8f81ac787d789d726443 frame00000286 +244f306ab92886a3744742f42fb7f010 frame00000287 +1b1df13124bbac15099d8bc61e41203b frame00000288 +933b0fb314c117debd10eb0b8341ff2b frame00000289 +290aaef4d7130c36392522b6a05c33f1 frame00000290 +624606b26d56fc67b578e57dfff32bf3 frame00000291 +888c08f576d97be6383ed011b6ade1b4 frame00000292 +b441d31c65a08cc85ff5226b2eae0d66 frame00000293 +31336928bdee1d3bdcd61d48bbb7f82e frame00000294 +f10777b228ded6ecd3ef8bb586b84c30 frame00000295 +b7282c41aa02c4d8ed5bf3097685c218 frame00000296 +37981ae9f458d0496dec14c6a45255c3 frame00000297 +71aeb3c66624f08a15980fbfb5fa313c frame00000298 +5f12072ce36ed495ab6f268285375a1d frame00000299 +f7728649219d931f4796e36d5ea01896 frame00000300 +f197886bd6c545f6d7078ad8d215af65 frame00000301 +597a71e67014b6ca65048ad34dcebb81 frame00000302 +d66367f56375c802c5ca0aab09f59f00 frame00000303 +4a15d645d70a1154a31fa4fb43b35ca6 frame00000304 +3e79a6c84c38cb696f20955b36cf198a frame00000305 +090dd954dc13849ea1e3ac1da211c0dc frame00000306 +4ff1265e1bf6810e6b5443a58eed4505 frame00000307 +3a2c20baaf8a827b932e2e4bf99a7aeb frame00000308 +4866799913276475e13d99c2847cceb9 frame00000309 +b747eafe8df92b1ffbf78c23d339b4ee frame00000310 +c4d30e0335cb66c8904b0fb7e22bce0f frame00000311 +4504ec37214e92517083bcd8b0038510 frame00000312 +30c4fce6e3f32f607f6af4f1b234dc05 frame00000313 +be38fc7313e50721e66b2662b6b2c374 frame00000314 +41ba5fc27da6a5729331d0a32c6d4566 frame00000315 +e7bd1f7829df9731b483d8eb73afd68b frame00000316 +963d7ca5345f4b1b0dd4f013d87093e3 frame00000317 +3e188c91c6c77ec48d5b5a5982c23d31 frame00000318 +5b76fd315ccee7fa312fc8033fa9ae20 frame00000319 +97eaf4e82fec4a47e48006d2a2a8bb4d frame00000320 +b56ad4f8c886c12764f659bd4223c08c frame00000321 +9d66d71e01017c2c077a78c447859641 frame00000322 +0d48868c8528ff4f32696036115ccf71 frame00000323 +37af92a0c904e7c4764d3a75ae9369ab frame00000324 +4290115dfb8eed567e37e849196311ef frame00000325 +46d3e873d5542919746da742cecc2c47 frame00000326 +90bfec7f57e8e88a5943e230a1b8179e frame00000327 +f63240351bec905b3ae5cace12c1ff71 frame00000328 +91eee5d10ddbc910443b474ac108879c frame00000329 +c1e401a9980cda356f1d296fc8126532 frame00000330 +9930f191e1b45e803a12bc3a90b5f6a2 frame00000331 +14d4bf7618d6ed690ef04b14d9d5336d frame00000332 +112a84744b326a03d4c011fb2161561a frame00000333 +685d3ebaa49a42747b0dc113c06fbd61 frame00000334 +1042562da9560b07659b6a6a7ed385c4 frame00000335 +76903ae6cd1539cda296bf2d17383e8a frame00000336 +b4d8364d470375526364340cc4848876 frame00000337 +497fb2ae0a4c8a45e5c98bf5647c3ff5 frame00000338 +670d2ead83706c487924c252af278622 frame00000339 +9374acd5e97a0d366b0087b54fb7ca5c frame00000340 +8a70535680f26296e5791d8753b79e43 frame00000341 +123c7df8b303e1755dd1970b8f030fcc frame00000342 +8218a73c2458c835d3fb86614bbd6ed4 frame00000343 +723a84597341cd8ef92d76421bb41978 frame00000344 +ecf4ac2a3d3a000e4e387465f244e975 frame00000345 +475c5d9a4d0dbbcb2753489d0957a914 frame00000346 +d0a5ef1a6495dfe5b2215fc0be050cd8 frame00000347 +db8cfb34ee54baf1099f5393cd999add frame00000348 +6c38f49998daf7b4da79125ee7d760bb frame00000349 +97789f2a80ebd52f7f9304b88915fe17 frame00000350 +6fe16e4d7df2fecff236d60e4509e158 frame00000351 +4872dd4b1635378e712d4a89fdbe2efb frame00000352 +3a3818c7ff7917d156b5a15d82dedc00 frame00000353 +04ee6453ef454dcfe8915720ede43ba2 frame00000354 +05b95e837baa6b7edb6f49a8831c4b03 frame00000355 +f4ad7b10f86f9a41371e0a58b1601a5e frame00000356 +28027b71f4ce76443987891bdcdce44c frame00000357 +0cca2a5654bf9fe7e9ef784d67f3499a frame00000358 +dec2c6379efedb8f60b5cd181b16df05 frame00000359 +fa78bab133bd045d1e73db0f0fe1b211 frame00000360 +b5bac0401836f277bb479ec255c68898 frame00000361 +2f467bbb77eac620da4ee44b2ae4c087 frame00000362 +7aff789b220c0285d77397fd0805f8c4 frame00000363 +5add135c66a761ffbe784296e7d3d5a3 frame00000364 +52c2d3df7df74941df4150d1fc73edb6 frame00000365 +ba87e91d70a89bafa1b0fe0b9077a381 frame00000366 +492ade67433d8bdfa8dd6eab834dadc7 frame00000367 +ed32506ae4172f3a001418a62106209e frame00000368 +88388acf97e1085ab0a739ac1f8e533b frame00000369 +a02649e89abc81348146815d0e57ef6f frame00000370 +75d67fa83925b611513803ade2834dc3 frame00000371 +b26c65a84c36de45c952f6a13f5f2997 frame00000372 +a95ea607d8f87943409f63b9bff4596f frame00000373 +7fc509f52519bfe939621eeffe17f3d7 frame00000374 +2a8f592a6aaef258f9cba1f5f5b3e00a frame00000375 +220064d866b4f1b9de21235aed37d851 frame00000376 +96e4be890d79d241bd1f71a236539804 frame00000377 +9d0c28a5e01d9e67c20adcdef51d2664 frame00000378 +c6ed621bb4a5a7f3f7ad6b5aab6c731c frame00000379 +6e183bd21510f97778a179f81390e14a frame00000380 +b42773cf5920c50b20a9edba7eb30ede frame00000381 +f1bc84a6a66280e91d9a685daa30c76e frame00000382 +41a938672c49108c5d4a6e0da99e3139 frame00000383 +a1160c1ed896d162aa8bc6601d22cee6 frame00000384 +ac7da21065ee36b59fd255ac0354d9da frame00000385 +7ef39833660c5745fa750ea1e5ec9b5a frame00000386 +7f4b7f5581456fcf0b33e64f10b4cbae frame00000387 +f5dbcd9c33ebcc15ba348970591e5e0a frame00000388 +1da42669412507cf9ed98fb740708682 frame00000389 +ae53270b7d1a6b8c9dde3c394b00365f frame00000390 +24d7dbf792286c4f3666b0761635221c frame00000391 +3272752c2176f541a29d6de3d64ed4d9 frame00000392 +79bee815656af88073bdb041a6c07389 frame00000393 +981c90a538b194e26442b0143e4a18b8 frame00000394 +ec2c32b8e0275bd2abaafa10795f9b72 frame00000395 +8809940caddd6bbc52ad5bd149c66227 frame00000396 +18858c8ffac5acdd3417fad738750122 frame00000397 +493f4ae0357fe43b2701d7ab20aceddf frame00000398 +84980a670b0ab57bd2fbb235157dfe8f frame00000399 +a577d8b0625b19d932164da840130e74 frame00000400 +23f7d5208de97ddcf86baf59ba5796a0 frame00000401 +398a3c4170b3f56e5a1b39cd5fee5ed1 frame00000402 +e69ab81d3009c03668b4e3bbfee11238 frame00000403 +969fb294f51fd78af8281477d2ec87c1 frame00000404 +f1e550ed4ddb597d4de816d3a3ebaf06 frame00000405 +df4d9f4cc3b0e5f0d8e4378703a96d1b frame00000406 +a4962ba07c94739315b25971c84112e4 frame00000407 +4aefa338be16836bdfb4cbac14f766af frame00000408 +1fa94b43654fce595d7b03cfcfcc7b3a frame00000409 +ddaa31e5219c74990c29420464d662e0 frame00000410 +fd3a91dd2cf6fb89d033fbdae163d2bd frame00000411 +1ee5c1b80da48dea7a89877631fc3d25 frame00000412 +f5f3fa8bd5f0bbc7e0cdcc9083d9606f frame00000413 +b4ad4134ad58ef900d4aef8a642c6d2d frame00000414 +46ec6df23ccd5f79859f455f315f6fca frame00000415 +69ef75e3c203a4057857c1d8d5789c61 frame00000416 +669af97a451ce9e77172daa92854406f frame00000417 +7cc0356120ec3613e28b00c3dc51f872 frame00000418 +0982af14e82cf58053b15dbe65264136 frame00000419 +1b884e788fce5434829350d32645bb0d frame00000420 +9947e88464259834dac7c68fdfb186d2 frame00000421 +5cb0ae15e85407ccb333ed94d4feda35 frame00000422 +25e9d3eaa11d6ee4b63d207a08be0255 frame00000423 +e07f6f0086245c1fef491af5473849a8 frame00000424 +e555221e7881515106cbc48dc7411c3a frame00000425 +3bbd817dbc73253fc710191063169b46 frame00000426 +e084df1df552b434725c13c0f63cba53 frame00000427 +9ff0efde58528b5a7b4c3d3f6b1d016c frame00000428 +ed7e784ad317c15ad1b3c4a1bdf8ca82 frame00000429 +766fa451921b2c7d0a5193d36c8863fd frame00000430 +1d0eea5d07d82aa45cb7b2c17e64333e frame00000431 +da658a265514f5935f74901993dfa3a0 frame00000432 +ff59fa2c8693a7378f394d528f3f5e11 frame00000433 +d72f69f055d29ae038dec64959bf50ad frame00000434 +c267702126ce2d6e47152971d4a483aa frame00000435 +f4656731d795ead61f23490b81a5d879 frame00000436 +3f7cc9fc99c03f5ca58d4cfba0094d1a frame00000437 +fbf71959aff6754f149b447ed436859c frame00000438 +2c67c8d43f63a6ceb402f7e02515ecef frame00000439 +3a49a838f88e8d9e52b5e13f9866cab0 frame00000440 +83b7b2111aba5d484796d56d2223ac83 frame00000441 +813f37fc63d68e705342ee7336492879 frame00000442 +59d306df1b415651c388a64aa687af8b frame00000443 +930e89cfe3d5c9544d699232c94a17f9 frame00000444 +6f66832cd57be650ebe28b1eb5e8c2ed frame00000445 +c15d0db7c740d99b9805a4d72a34ccf7 frame00000446 +0089327e57e69da2e87f7be1d18e6c42 frame00000447 +8c9adbd6f23f085371c366d61a7d7db4 frame00000448 +4b469610041eb57a51cbb7a5f527ec31 frame00000449 +564ab0f682db98d92213fc542dcee462 frame00000450 +54257920c908370bc894697cd54c6819 frame00000451 +6f2d2d9df476b56cf22508c1ee6bf86b frame00000452 +de95bb6807a78bde0dddfd4ff2cf3693 frame00000453 +b8787033fd00853b81504301a9581372 frame00000454 +22cc20b1b3a598778393584da0413076 frame00000455 +1d5d1dcfa9343e36670b626d1739ba77 frame00000456 +a4151326893cdfb754a413d32629dcd7 frame00000457 +8503a2e162368a96e7bbad4c2be3a84c frame00000458 +59a9a31bd6a74d2e137a88ebf1474cb8 frame00000459 +781bb9262253e9c351533084e626822b frame00000460 +ddbff731b24b745a0578916db90dbf37 frame00000461 +87604f57a6ecb6dcd3004951b14c6d6a frame00000462 +270a1c0357072878fad0b3cc09bbc226 frame00000463 +d55603a21a80224a2cbda246cb588b81 frame00000464 +002c455ba5e611c433117eeb2d3d4a63 frame00000465 +41fb24473614bc5084ce2ae91a330db4 frame00000466 +551f2091b53fa540f48af8116ca5c795 frame00000467 +9b9bcfeb1aedf5891d091bf6cbd3213b frame00000468 +65a110ecb00aab94cee980548f06e702 frame00000469 +c9601c8e16e4382ebe0f440c860cbaef frame00000470 +a45d219554d39b9fcf39c8b1a8e91b3c frame00000471 +68d9796e32232ccd2d8e23d36915724d frame00000472 +fb6480984b8fc98a9f9ed299f0636e19 frame00000473 +9def30455ffc3f271a624d85e7f9a435 frame00000474 +c8365d05d38e7e68d476794d0b780a68 frame00000475 +7228742543854028cbd2e88e48f75e17 frame00000476 +aec6e68ebe307c6964a452415ff6d985 frame00000477 +8770bb562ddaff73930b905cd4262461 frame00000478 +beb2d04c0418d81d6bb7a8948d144f57 frame00000479 +793ac8d876f91dccde9aae2bb21d6067 frame00000480 +a7bc9db917e87945a1b6df6e86d03524 frame00000481 +ae5e01da069d12f6ea86100b17c10402 frame00000482 +b65140b6c3e42e1fe6d016319e550616 frame00000483 +32620f3ebafdbc10198b854dbbddd741 frame00000484 +724eb40f6576dbb49da85ab2da45a74c frame00000485 +6d133634c2f9d3646df6d80fe05eddfb frame00000486 +b1325fe2567bf49e8da282fdf293b365 frame00000487 +3cfc0a09f2c9cf37982b9b00c6cff1bf frame00000488 +243e02d3bc822ac43a265a26a676c0fa frame00000489 +f4273830dde0e35e4f2fdf8c53e94a28 frame00000490 +21b37ad68fde0d4a49ad25c656853845 frame00000491 +4900c1894296b02fdfe3dc9d63443378 frame00000492 +93031f0e749337a9e0047d3179860476 frame00000493 +82b4b0824bb37d5fb63da7f414833b90 frame00000494 +0213147290032831ddb105b66d811ca9 frame00000495 +7e044cdf2791d6ddcc96efeab3465be8 frame00000496 +20d22d4b26b4a6ae168d26fa8ef69854 frame00000497 +eff83c27ff3b5be502722738df280eec frame00000498 +afdfb4b8eecb464044550957d3c5c315 frame00000499 +9f557f7004920d9648d54e284197d64d frame00000500 +00fa29fd0e7365c9fb529be7cdca6b71 frame00000501 +712d5379772daccb9a40dddbcd28a6dd frame00000502 +46dda7cb0c8cefe7212f632bcc8af307 frame00000503 +21bce0ad61a07533bbd7bcd7eed0cf1b frame00000504 +c65836da33464cca49da7b05d5825878 frame00000505 +d29057af0e7887fd36e457b12acf6e53 frame00000506 +9a4e4734143772d78f497f3b77166cfc frame00000507 +a319328ee7577383eecdad33054fcbaf frame00000508 +14d82babf998b1c2aad8acf440cc854e frame00000509 +c664e76d0b03b824aea15637c0b7b937 frame00000510 +461a4ea8bfc7a05ff381345c2abf58b3 frame00000511 +05ba01af6f0beaa0839f839182104741 frame00000512 +65aef8d954c3084832174b9890c10ad4 frame00000513 +fa300fbc5ccf49bf0ad246827f86b41b frame00000514 +81a8e10f4e8fd7860982555b0e041d4a frame00000515 +b86125305abf24caa283245d9ce3a3b3 frame00000516 +c332d9376ace358e512ee04afe46f920 frame00000517 +2d169df9ccee3c8cd58e244c7ed781fc frame00000518 +94731061529605b5c428a6bde81a14ca frame00000519 +e66296a26942eb98a01bdf286dca838b frame00000520 +e01865499a3d4ede51192d1f1a0193b7 frame00000521 +bebeb1a0309dd198c061b01e05dcb082 frame00000522 +eb9e6319a54f2a4f2ddbd82597b86812 frame00000523 +a678d6285137bad4b7b0f88751f2f2da frame00000524 +503359c1c2ad417d7df674543acc5c3e frame00000525 +08dc06e4438f5f7cf55472d39a606288 frame00000526 +f8a438c9d3776b5a256853ecedc1e52e frame00000527 +47cba959d69c48433852df142829682a frame00000528 +b44449dab21991b1a8ce986d5a11565e frame00000529 +8ddb15a8d664cf650faaf572d6f3fd50 frame00000530 +cfcdfe42b7a32acaddf96a6bbf31e7ab frame00000531 +834ab22b941f13ea935eedb1e43f7076 frame00000532 +ccf6906785ccd16af8527289805f2496 frame00000533 +611d9f9bc400dee7521bec11d73dabec frame00000534 +e937c3b134b1192c16b3e140b6aee3e0 frame00000535 +01d6bcc49c593980183439777c5e7489 frame00000536 +5c00f87045ec14b7e246b060098d53ac frame00000537 +2e90e3a8e6ef95fb1a71e26712aa17f1 frame00000538 +bab94745f525d35f34da6f296cb72635 frame00000539 +7d4e50a71d92ef1aefe9d13ccaaaddef frame00000540 +b61feeb66c90907542eecfc06ab6aa50 frame00000541 +af5849b519ccfbd9dd38a6b605dcdd0c frame00000542 +8d5f96007b8e16611a3879c2fc40c3e5 frame00000543 +75b514a4b7964d0de773d2afe9a664bc frame00000544 +e546e6694e6438074f0c096d42cd100a frame00000545 +8908849c0d180ec0c9afa0c9e8f03e10 frame00000546 +b2bf2eb1214d9a60c64aa2e2819596c1 frame00000547 +167614ca242f4f350a8e931da0d46b83 frame00000548 +ff640a79e12f655fbedb3f860836a5c1 frame00000549 +89695b57bfc90776504b4ae4bd22f1dd frame00000550 +3b757466b3b0d4e3b56c5f135f2727d6 frame00000551 +ba126cf44cd074c862323e66b9b066fa frame00000552 +04b5c148280942ac05a73cbfc28ef3a5 frame00000553 +c4a0d07137a16d20309fb92ed854d242 frame00000554 +ec6d32618794e13fa6e0721db8c314a3 frame00000555 +2498e60105ebfdcabb4f29f59593a5e3 frame00000556 +e2c6792dc283ac41d36a2f5a788ed1fc frame00000557 +09f5d06c47e3a3a420d40316576fdb56 frame00000558 +c168817cec1bbb74aa6ed247d761f892 frame00000559 +75b514a4b7964d0de773d2afe9a664bc frame00000560 +75b514a4b7964d0de773d2afe9a664bc frame00000561 +75b514a4b7964d0de773d2afe9a664bc frame00000562 +75b514a4b7964d0de773d2afe9a664bc frame00000563 +75b514a4b7964d0de773d2afe9a664bc frame00000564 +75b514a4b7964d0de773d2afe9a664bc frame00000565 +75b514a4b7964d0de773d2afe9a664bc frame00000566 +75b514a4b7964d0de773d2afe9a664bc frame00000567 +75b514a4b7964d0de773d2afe9a664bc frame00000568 +75b514a4b7964d0de773d2afe9a664bc frame00000569 +75b514a4b7964d0de773d2afe9a664bc frame00000570 +75b514a4b7964d0de773d2afe9a664bc frame00000571 +75b514a4b7964d0de773d2afe9a664bc frame00000572 +75b514a4b7964d0de773d2afe9a664bc frame00000573 +75b514a4b7964d0de773d2afe9a664bc frame00000574 +75b514a4b7964d0de773d2afe9a664bc frame00000575 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ansi/TRE-IOM5.ANS.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ansi/TRE-IOM5.ANS.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ansi/TRE-IOM5.ANS.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ansi/TRE-IOM5.ANS.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,124 @@ +760b46b1fbb0cb5104bdc47ea5b921d0 frame00000000 +d308a3ade5d53a743aafbb1809f53b9c frame00000001 +4ec8f9959fb4f38e50e5fb67a7d062b5 frame00000002 +d6fc152f1fdc118fa86692ce3c54094e frame00000003 +1e9f221f63798d967467bd9e905ce43d frame00000004 +b17337079ba80a010eff1ca10d7e0c43 frame00000005 +2063d3e26e80eb14f34013893f90dd06 frame00000006 +0a28ace1dc906dc202b7622b77cc9fb9 frame00000007 +cb11f99234a0bb2adaf0ddb92e86947e frame00000008 +b08ef72b0f2a5be09a8d125a5cd1e4da frame00000009 +9e431b6fc85627e891559c56d6f56e52 frame00000010 +b95e788928b48a2b04a2117cd77c5b68 frame00000011 +bb0c6b0c5640e96527e44a8821d0b8da frame00000012 +e7b3a2a91c134128a9adb607db1465a0 frame00000013 +97142815c9765b12b36a259f3dc1cba9 frame00000014 +0c697dc4801b3cbc6c48e7a7eda477c7 frame00000015 +4f3a215272c097f7c1a6b52aecf6c58c frame00000016 +a109e0dab6dd653242ca931fef41c50f frame00000017 +812e8457b84677b5b0bb3e04fb0f7551 frame00000018 +a1d7997ec92bc91f91f257b949bb1503 frame00000019 +2a8e80cf6f29a5e3cf98162a50564720 frame00000020 +9723572a6055afd745a422f5048325be frame00000021 +2f96376bea6d1cf9976a9d6071992f55 frame00000022 +6e60ab2e1d501792269da22a033b6bd3 frame00000023 +886201bd874e0d933e7210d93e8cfc12 frame00000024 +fb7b0be9300a2d700110c429f1eadd44 frame00000025 +157857ca796d1050767a54d6e7c936dc frame00000026 +2198b1ea5737c41403458d4a2f04d109 frame00000027 +814faee6a57dcff1496f6d481dd21809 frame00000028 +36f9ee784839d519fc38f1153303649a frame00000029 +2a997e4d324acd138f23d3738f78c60f frame00000030 +b4e62903ce15c27c89f262cc161cc492 frame00000031 +1f89a17082d4e352e98df12d03b4f322 frame00000032 +e78db12eab578e945f38c686c7f7d28d frame00000033 +e9dea48220b77dc4799c9b735374185b frame00000034 +88920ce50efd3545b87e212def03d467 frame00000035 +ae43035dff8fac05386ea46dd11c8c19 frame00000036 +d83226c56bc40c43a9d8684a0345251c frame00000037 +1ec659166ca74f997c11cfb24b0bc773 frame00000038 +3c767e970c38311ef810aadec7e8c39d frame00000039 +8a882310492badb571d03a63c3abbdd6 frame00000040 +723cc3416555414465c24e076bd7745c frame00000041 +04add412e509225d4a1c1e024f4c35ea frame00000042 +22d264909e3c0bdb50cc3139886e5290 frame00000043 +9c380053a16ee4864e26dad67bb913a2 frame00000044 +d27e0a90f7ec8e55fc7ce0368024fb74 frame00000045 +ca6dd27fd9c8405c775e75845fb35efc frame00000046 +f05cddd08dc5a72e781da2c10338ef19 frame00000047 +f4a71410ade917d298c80fa6acb78e57 frame00000048 +84afc7c01299667b0b631c67b3f28a1e frame00000049 +d0ec058d1f47c48615dcf497af07ca6f frame00000050 +bfdfb6e9156703ccbd89f0f6015b4786 frame00000051 +6b31370241d41e8d8b4b9c8d9a699ca1 frame00000052 +6dadcf8782d0a2c0313a6aee85896e13 frame00000053 +41588a336539acdebdfb95798fc3709b frame00000054 +3255784c41b4881fc90eca62080e0c1e frame00000055 +bcc7ea79b7861b72b060ed853e40fd9a frame00000056 +2b5bf8597aca76bc249d79c97db8abc2 frame00000057 +8df2ad1a946ca99b0844c7dd5c62551d frame00000058 +fb3f6d26d88e7701434507c1bc4143cb frame00000059 +911cc1a28c5f305ec7b98ba7bab12e2d frame00000060 +ac53fb34313b2b93c3bb5f85f6e82a7c frame00000061 +584f38a0281214f76ca0e31b5ca33159 frame00000062 +7b291b9a7eb1fe45236422743515e838 frame00000063 +86c947686973ddb1c3eec3cee01a94be frame00000064 +1f8740fa3f891605ccaeb94bf9c8c667 frame00000065 +170fd22153cbcce231eedfb0cd09a107 frame00000066 +b95e374feaddac05341e853f5e36cfe0 frame00000067 +1a3991d4a0f46dd36f49c8f3096e0fd2 frame00000068 +b7b9cdc1490bdf49962a5cf4f8e983eb frame00000069 +9dfb457026f3b3f2e032213c5945bff8 frame00000070 +05b83a2f9d8d1b275866b49bf16ab859 frame00000071 +2da180e1c89bb54ed898c30f2e0c5e39 frame00000072 +6e8469b834e2a82220490f99b6d00fda frame00000073 +cdd13b053ca5bf723a208426f87a1281 frame00000074 +f1898a2c26836da557d7576f2ec88521 frame00000075 +2052a56e5aaa8e8a5185831be044826f frame00000076 +019a640d581809bce67f5ab79f40eb24 frame00000077 +a1d1d13734c738149f55f96e03495e28 frame00000078 +9006f1819fc79f0f7f450a0d9c799476 frame00000079 +28b232da42f5225bc30c1bf93361e434 frame00000080 +184f30e5aabc74618ad4f9b601bcb3a0 frame00000081 +4f9d5379846ef50c6474156d64721c5c frame00000082 +67320550c8f81b545acba896d754c1cb frame00000083 +2e10faaa19eb708bac8c8e5df97ce619 frame00000084 +c2492ed35c50b076ab6c51b0d8df767e frame00000085 +3784db1c95acb1ec28369191b07179a7 frame00000086 +7e9d63f7c9bbb43629faf866fc6f45a2 frame00000087 +5bfb4438cf40e7ee11218f6982a8328f frame00000088 +5de85568f6e2a7af180fecd728a53afe frame00000089 +712b69e26ab4d741332b85388abb5996 frame00000090 +8caf482c496223e97652afae3e8cdc9f frame00000091 +2d4524110b9081bb16e237cf536700a4 frame00000092 +0a68c196ff7e5a4952c368cfb3c8dda5 frame00000093 +15aa49b63abf62a8026dfcc0cbd1eeaa frame00000094 +1af2c8cb1a9d6a9b44156e5634d32179 frame00000095 +f9dd9f660a91fac58c5420fad7212889 frame00000096 +c5ebee0678127c9eefaad69354995d86 frame00000097 +7bdd2108f43900c8211136f5172a209f frame00000098 +47d5f701c77563520c7dd46fdc964af2 frame00000099 +7b89797523a01e73a060f8ce093532f0 frame00000100 +ae420b0c68839e8de30105dc8423e4b1 frame00000101 +5684501c1add12a7ea42f1953d6cf3d6 frame00000102 +d5215021a2d4f9176d5b91fd690f8fde frame00000103 +4a9f8bac34c16fa945923beb52ef2ec3 frame00000104 +d46059819d1780d68da49eea3d8f3332 frame00000105 +3710ff9e09f7f8066d82b2220f439e8c frame00000106 +fbdd6e3c2ee307c58d6368bf52428ed6 frame00000107 +5a75965f6540d4a93dadd08d374654e0 frame00000108 +0ba286b8d3505a6a5a9f77d6b53388ed frame00000109 +80688a30562159c8db85888ff25ca6ac frame00000110 +4edb5b9f825e24312d7272a9a775919a frame00000111 +8fd42ad38c614eb5fb3aa6fd95ae1038 frame00000112 +6b95fc8349bfe74b866b45b79f99bbb2 frame00000113 +b79741caa8cc42ae6192595cba6d9940 frame00000114 +285d149507a4b1d78617ccfff07d8dda frame00000115 +85be5573df587efa60b257b8a52172af frame00000116 +bd1f9c343cda5c1551f90da739d5e378 frame00000117 +de15eac5c3cae3a0a4698a256155c9fb frame00000118 +d8a6844fbed49f73f16437bd71ebcae1 frame00000119 +d5fb8e0237e490340a3a1b1b77e0e3a4 frame00000120 +1e861f2b0447ab3e8d8e498d7be9736c frame00000121 +06587091aeec34f34ff7717ba45d5390 frame00000122 +3ec6cbad94f631ac87c8e0b75325e08e frame00000123 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/auravision/SOUVIDEO.AVI.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/auravision/SOUVIDEO.AVI.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/auravision/SOUVIDEO.AVI.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/auravision/SOUVIDEO.AVI.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,24 @@ +20a10399363c863c810f3b05203c0e77 frame00000000 +1d2fbaba8c4910f52b68a71f003cac95 frame00000001 +2a24db7d1cffb224e9f84eaa9a67d5ef frame00000002 +a6948a286692a475ccd7c0ec1fa6933a frame00000003 +c9eb875e07d68061f1387ba20385eda9 frame00000004 +857b993a7356a1cef126fb3d8ff34c64 frame00000005 +1e8650f61cb9ba319d95b4a8fecef8c7 frame00000006 +a48771adf3db00b60764c9487b9f874f frame00000007 +46ade47264804f3557ff7a976a61f6e9 frame00000008 +8b7174524224d48aa173eaef917ee541 frame00000009 +12e223e2ac2fc34ef0b1201589668c8f frame00000010 +da55fcf03ecd123fc451f408caf4d564 frame00000011 +4fcc2a3fdef486d31aad56fad6ca96b7 frame00000012 +396f2f7153c462dc6c4892a2e0dcc608 frame00000013 +888e9a7fd6e19fe953925ffedc1c72d6 frame00000014 +b3d6a1e468048d8a1bbff0ec83452864 frame00000015 +de97b919165a177624d0ed57570fc572 frame00000016 +67ae475a3df1f1ac63952ef0f0e6d4b2 frame00000017 +7624f085b4cae991cbbd24af2e15568d frame00000018 +e2acb1358b5a15f2989b5b0961bc047a frame00000019 +24c4de9088c3901a6c9c53eed3ab6f92 frame00000020 +7155e1e48224c8b5be5ff2b60274024a frame00000021 +557524112ee8fe148c888f6b3d8947a4 frame00000022 +dd9d35715fb86617814f044257aad013 frame00000023 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/bethsoft-vid/ANIM0001.VID.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/bethsoft-vid/ANIM0001.VID.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/bethsoft-vid/ANIM0001.VID.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/bethsoft-vid/ANIM0001.VID.md5 2011-11-13 17:05:58.000000000 +0000 @@ -0,0 +1,190 @@ +f271b80c479cdebea9db07303e5060b9 frame00000000 +b150e333996417080c8781000e4b7dd3 frame00000001 +73ffca2cce6f7f74ee5a90632bc9cabe frame00000002 +6c4f649c17f9bd23d22a0a14014516ac frame00000003 +a0b9847099bf2c858be6faec835e6bd6 frame00000004 +b5914063393880ff66f12aeda9498288 frame00000005 +569ca40a3046735726a297f4c5f1b47d frame00000006 +2861f33d268654d4afdd65a8973b8116 frame00000007 +8254a0991e05fbda18c05c91f44aba8e frame00000008 +5f6b6d6fed14544ac15b131ddf14ff6a frame00000009 +1197259153ac217dc0ed72e5485d9e19 frame00000010 +880106c4a4fa7c9b3635c97bdd435ab8 frame00000011 +39f1198a90f8ffb9c1d907f89be4fb36 frame00000012 +41f6d779d48fa7378b6e9bce0c346026 frame00000013 +98e7647b3cfbb13a9b551376a51a830e frame00000014 +7c63cb7df53277627c3032f64140b211 frame00000015 +32d2a69f2cc62573ff505e578210ee2b frame00000016 +427f60d68a221621f2cc138bef9408b5 frame00000017 +db2997a9658b7c7197fb5f2d11dd4d3a frame00000018 +8cd91983e08d4e69f185c56e0c33eae4 frame00000019 +afad645b4481e986b6b5f20e91df1f03 frame00000020 +fc92f3fb917a2d35fbc06f87ae095727 frame00000021 +cce9a6c979656d6469b73dcc3e2533b2 frame00000022 +501e64b8137d5f03d9d06bd40cf50698 frame00000023 +0c1265a4f23e8b09eb71ca867464cc9a frame00000024 +a34dff70cf5b3a765d48b455907dbf39 frame00000025 +2ca6285d3c64bba7f6e57570f067efd6 frame00000026 +392e771d49ec288d6cae22ea40eab5c5 frame00000027 +86dafd51b33ab8a5bee52059b4fd00fd frame00000028 +76f8a7022c689796b1150f5602720ce5 frame00000029 +0df3173ae5bf30cd120d50116e1681fc frame00000030 +8fda829d639857bdf18fa25dcf74513b frame00000031 +2394e02d410e2a061ebbcf5bdd1aeb08 frame00000032 +7499dc031bf52bf129e71861b5df0976 frame00000033 +4a48786e5775111fda290d7a9c55d772 frame00000034 +e7fb5835445b2e6d5844a8e1c903284d frame00000035 +8a375f744ae71be9607e9d6ea3ddcc44 frame00000036 +9714b2d96a446fb018b81c839a4293d8 frame00000037 +8e86d2742ff4f49e90cd3b1d17b6ea86 frame00000038 +0e15fdfe48a388c523af897005988eb0 frame00000039 +f030a17d654a90b194d9cf7b4ab58726 frame00000040 +3e9ac0857a61a99a6a90e294f27edbda frame00000041 +99b1fdd24844c0e0c2d09a1972328181 frame00000042 +1fcea010a4f6ebe446c0df386279e647 frame00000043 +bf926a9ed33780408b61ed75c284801d frame00000044 +2026f0f77a9c02e8276e2000e69ae4d4 frame00000045 +30a22eac79991d32a48ed73a2aea35ba frame00000046 +e3a432bddcf67ba26f884f7f1b30959e frame00000047 +a8154bf2b8a9bb7ccbfa211114d0f315 frame00000048 +56fea0398cf2cf218c64651466b278a7 frame00000049 +a4bec921ef0b24c2a6bcfe2e1312a851 frame00000050 +e6ab39d9b6b07f218a711bcb5ed8aa24 frame00000051 +f5a742997885e76e51597ca3198dde81 frame00000052 +3d9583ab86037576571807e9643b3e75 frame00000053 +bed12e2773c99f22a296c6f758df78c2 frame00000054 +6968a97395c191662a5a57f24c08fb20 frame00000055 +778b3ea47672a6f6271c3aa021d81ff8 frame00000056 +f042bef15f9cf09e6181ce622a71f821 frame00000057 +4aacba8c5317d8e8a38dfb9e2688e5b9 frame00000058 +3d958a378201f124ebe0c4a0aceef7ab frame00000059 +0ef65648c89020665ed6f5eb42ef868c frame00000060 +14043ee5aadbef263b129e209015f96b frame00000061 +bd614a4ba954ce9974fcc2dd4a808e11 frame00000062 +91011950427b2bde617a6bbf0b67d903 frame00000063 +5a5ca7066912dc0989ce0574d3cb72d0 frame00000064 +22db53be1a6499779774c2281e05af7a frame00000065 +3a8dd5c9e01d917e0e648466cde32fcc frame00000066 +3143b635741fd0a918a4659891688f31 frame00000067 +ade7fcc7810dc18bcf2188f49e3968c5 frame00000068 +cbabac2f94d33d08a9696d35f4e153eb frame00000069 +7f1b556dbb12b292402ef921565570eb frame00000070 +b799cffff74636d06d9969da431e1214 frame00000071 +bee602ebb083ae2dcbcfa0b57d7efabc frame00000072 +640b4b8d116b33397932ed6be0c719d9 frame00000073 +e4a22cf388404d1630aac977fe4cd37c frame00000074 +354543f051f5146beac3259c2a095337 frame00000075 +30c4b232ad1c62e7150e433f852c464a frame00000076 +36f86c609f629655e6969d21673602c7 frame00000077 +ed6459ed0549750430b347a98288fe74 frame00000078 +4d64f3eaa975048509379abb27cfd55d frame00000079 +d2a98a5d59c2b17290ac2e5b1753f608 frame00000080 +cbb23cc6a1f766429f33f6d8c0320c50 frame00000081 +a644fb351ddbec7351ef84b7a1ceacb8 frame00000082 +73d9a7ff9307a7585bc0c06cb91f9862 frame00000083 +4dd4fe87f252a78b257d3ca6963002bd frame00000084 +6e370586a1833178ff9cf48cfa606afd frame00000085 +f4ec4a94027d353c19fe993afd079a90 frame00000086 +1341667e3e17f615db5d3ef4a93b1f4f frame00000087 +bcc70833060189c68ded929324f46c0a frame00000088 +90050c0ea352df266322c7f34d68d99f frame00000089 +aa3180b0db54ef5b53048ae2966549f9 frame00000090 +96149d47dd8c70c61975f8dfc8ef088f frame00000091 +128124c1dc826d3f68e18fb2b5027a9d frame00000092 +66debdf25810dfd79d71775d531dc9d7 frame00000093 +acf2ef72b777fecb83251de777560027 frame00000094 +192477d5f67f587a6517f4be33e8e521 frame00000095 +ddee01d5c75175f6aa6542c89b73a7e8 frame00000096 +0cf3f16e06f9f95734b330ec2a6f2738 frame00000097 +872c550daa75dce6128327d0ee178f0c frame00000098 +3f4b530fd1261413fa27d9c570c0fef0 frame00000099 +f271b80c479cdebea9db07303e5060b9 frame00000100 +a9e2632e28de32937c7a4a3a589b96c6 frame00000101 +4367fd419ef25226b531a6a882fd27f2 frame00000102 +5aa65410d0c9bba052f960d2d20b4285 frame00000103 +0014f77efdf0b6226354c3b8cb03b23d frame00000104 +61e3305920e2811394666efba4b1c4d2 frame00000105 +9788f917f731b20126e3583071419d68 frame00000106 +5aa65410d0c9bba052f960d2d20b4285 frame00000107 +a8429b8e487abf3286973f3c3ce4a2ea frame00000108 +5aa65410d0c9bba052f960d2d20b4285 frame00000109 +a8429b8e487abf3286973f3c3ce4a2ea frame00000110 +0f03d043baef846d46e05ec6b33c2073 frame00000111 +f2d13f74c3f6463333e242d84b63e6cd frame00000112 +371bd81795c9595b271d0d164aea0471 frame00000113 +f66c5bc9d659c418d9288f3024718f11 frame00000114 +2b2b46d8b08e33fc97e178d4fab0d2e0 frame00000115 +371bd81795c9595b271d0d164aea0471 frame00000116 +f66c5bc9d659c418d9288f3024718f11 frame00000117 +2b2b46d8b08e33fc97e178d4fab0d2e0 frame00000118 +371bd81795c9595b271d0d164aea0471 frame00000119 +0734f28add7bcbfc8aa0896866547668 frame00000120 +0f03d043baef846d46e05ec6b33c2073 frame00000121 +a8429b8e487abf3286973f3c3ce4a2ea frame00000122 +5aa65410d0c9bba052f960d2d20b4285 frame00000123 +08571957f0d207889783e0dee69aef11 frame00000124 +5bc247465cb7ed83c4ce2eaccfe459e3 frame00000125 +7a45e4c4bf89510a4991ac30b17eac7f frame00000126 +408af5c551220c0a5f79252ce8507a7d frame00000127 +0523bdb45d91e9d5553ca7a5536b0967 frame00000128 +cbd9a39941db2b236c3bb4757b1b94c5 frame00000129 +408af5c551220c0a5f79252ce8507a7d frame00000130 +0523bdb45d91e9d5553ca7a5536b0967 frame00000131 +cbd9a39941db2b236c3bb4757b1b94c5 frame00000132 +408af5c551220c0a5f79252ce8507a7d frame00000133 +4d7d122582377d6077b6d5f19bbaad90 frame00000134 +5bc247465cb7ed83c4ce2eaccfe459e3 frame00000135 +08571957f0d207889783e0dee69aef11 frame00000136 +5aa65410d0c9bba052f960d2d20b4285 frame00000137 +80a8c9930aa0e349a992826489388d39 frame00000138 +b0661d091b5cb34fdfc7315f8f06bcca frame00000139 +54b074d3cf5665e878544b990131f54d frame00000140 +3fec03b9e966dbea9a3ad6264b6e5f1d frame00000141 +c9221dcb4ff4a4c34d9c415d89c0d949 frame00000142 +d9792cdcabb7032568d44cec14ea6898 frame00000143 +3fec03b9e966dbea9a3ad6264b6e5f1d frame00000144 +c9221dcb4ff4a4c34d9c415d89c0d949 frame00000145 +d9792cdcabb7032568d44cec14ea6898 frame00000146 +3fec03b9e966dbea9a3ad6264b6e5f1d frame00000147 +e145d7478c25c46e2c3793a004aed03d frame00000148 +08571957f0d207889783e0dee69aef11 frame00000149 +a43bca8322f4b602ed5c96693d27a130 frame00000150 +8861903aa5d0c9c2c43dde8bfb117d2d frame00000151 +7d393134eaa78805502e599513f3539d frame00000152 +14315ea3f4630a1555a44d5c7701e8bd frame00000153 +3586e097a9e38ef6268de3edea20faef frame00000154 +66c19188b903f3b3124955aa3f8b3535 frame00000155 +9c983ff8b361b063c7df6b30ad2422e4 frame00000156 +6f8432533ff34db8f8db9226cd333419 frame00000157 +0bb3fba4843a8b0cc83c9effd629d5a2 frame00000158 +7b5633d9e3bcd03a4306355f2085da35 frame00000159 +fc4787f799476cde500acd2c3cf432f9 frame00000160 +d4b71dcd242df893b9c64925cc33ca99 frame00000161 +65624bb265e5a9f5087aac826cfcd195 frame00000162 +0cdb07851c84dabaa12adbef6079e5c3 frame00000163 +c6338850a90f7bf21be44df463ca9fe2 frame00000164 +17c00bab62c65dc45081e44fc4ae3e9e frame00000165 +f0ece3c95fd8ab4a9fc15a3c7993437d frame00000166 +409569f9f0b02cd2459da577ef7445d3 frame00000167 +ee37fbb717e3260d00aaec4f162ba32a frame00000168 +c77d1c389c4215e06cf12d96e45ff75a frame00000169 +85b1751e415b3ab08c07e148a2dbb5f2 frame00000170 +8d8d45fd5a361c104c93d0f6bbbb8df3 frame00000171 +6be816fbe3cc759d867b1b07f4913ae2 frame00000172 +f860252405d2098670e14afa2e345d0e frame00000173 +bcdb4c8a28014d516ebc9477239484c4 frame00000174 +f271b80c479cdebea9db07303e5060b9 frame00000175 +f4945c29c689016d1438a1bddcfe926d frame00000176 +ba7c8d5b3c066d7a90e468f74b9a7e40 frame00000177 +0e71b70f54378fd971f1579cc8b4c2b5 frame00000178 +884fe32993d1ee2a0c2ef0575fbb477c frame00000179 +5e929dde551a4bd7f5621fc113bdbd38 frame00000180 +add2a86bd4f94cfb3781d71eac159c86 frame00000181 +884fe32993d1ee2a0c2ef0575fbb477c frame00000182 +5e929dde551a4bd7f5621fc113bdbd38 frame00000183 +add2a86bd4f94cfb3781d71eac159c86 frame00000184 +884fe32993d1ee2a0c2ef0575fbb477c frame00000185 +a88acb7ce9820b8aa56022a17d81d4c9 frame00000186 +ba7c8d5b3c066d7a90e468f74b9a7e40 frame00000187 +f4945c29c689016d1438a1bddcfe926d frame00000188 +f271b80c479cdebea9db07303e5060b9 frame00000189 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/bfi/2287.bfi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/bfi/2287.bfi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/bfi/2287.bfi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/bfi/2287.bfi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,57 @@ +ad9bf1a3bac3130e52d9f7d6e8b7c529 frame00000000 +9b710bd738ea05f2b716fb5f10efa553 frame00000001 +e575cfb69244ca5f97ed91a3d9d2ebe1 frame00000002 +bc41610bec632e57a07bcd6acf154731 frame00000003 +ed0bbdf0dc97fabe178e9a4910433193 frame00000004 +2ac780cbabb1c6f2e25df04ace2ace10 frame00000005 +7a388172fcf0513dce41603519a613f2 frame00000006 +58c668fc4fffd88c13a4a44163ef0d3a frame00000007 +d03148b497cce907647e0fc72d0167f3 frame00000008 +9e793f9537720f2f33e6286c8c1438d5 frame00000009 +743553f27a0364951e64ab8ba21ad1ce frame00000010 +471521e894968bf2d80227bac9aeefd0 frame00000011 +c0a53f98134171a7eb789ef8c87956d0 frame00000012 +37d37e8f0b0ec7b0cf41ee500ad4c794 frame00000013 +148179d590eab1a4994602181c62550e frame00000014 +da0104c4d673e5ec869ef48a450da3e2 frame00000015 +3e7afc22611df12e009070173e076768 frame00000016 +f650a3d71af5a1951791ba1e31819d5c frame00000017 +8f3b30db5398d13d2b1d96eaf89bdc3c frame00000018 +bbe19f69718e4a9e45d239552581d1f3 frame00000019 +0b2354d5ea5c36a40c58a6818043b3d8 frame00000020 +f42a0944aadb67c84be48603550b08f4 frame00000021 +e6baa5a4cf8c887873ce58b4a0ce6eab frame00000022 +0a4191aa4ec94a8f8a6e43bb9955bd67 frame00000023 +5c8a7bf535a0947ed660cc98b711c12e frame00000024 +733bc21b4bd51107102cb2be14a0abc9 frame00000025 +050910756c3e2cc596071332cb4b9bba frame00000026 +12ad2e502b7a3083bfc2b8eacc580197 frame00000027 +d53a5d7e523e5c86eadc15a00614c37c frame00000028 +6894bb38c1a1bd8ecb3988e241f4cbde frame00000029 +e92487b92fe971e66c37a83da59dd869 frame00000030 +d6b88aeca87ceac7c99ac3f2f56413c2 frame00000031 +480acc27b6d68072ace5ae1d4ba783e2 frame00000032 +d9652a6f48dbf73526438c00f0db299b frame00000033 +ae5ad6cdc7afed5ef918fccd38f18d95 frame00000034 +d4337d6ca76abf9c71ba5d69fe2bbb4c frame00000035 +629f7bc085ea98b6a68bc7aa3ccc0305 frame00000036 +945a47e93dd7c611d964da12d6bda87d frame00000037 +e7dc8330723fe6f6191fc99048ce56db frame00000038 +0f5e96a9ac3d7955a72e4f4f32f60088 frame00000039 +3e2bb36f97a445e28d5440e67d270da3 frame00000040 +8f66a553dc362e9d517c575f0bc465dd frame00000041 +f920379982edd65c60f91fa8015d3472 frame00000042 +97aeb410afa2a3c97855afb1719e97d8 frame00000043 +9b2da849998dfa25d5e2dd85850e1d6f frame00000044 +de93447b296ec7c36293dea0d60b6b9d frame00000045 +0e70ad4c5007c9f6d86113a4a2925756 frame00000046 +a6ce5067f02db0d9cd5a27955d63abb7 frame00000047 +bac2448393f0cae65e4bba5f169d90a9 frame00000048 +90cc1f925926bba22520bac889d5f157 frame00000049 +d1a447d63f7935be6bed3919ad832717 frame00000050 +26aa2a91c2b1c51b18c3ba100e77a8d6 frame00000051 +041e41e71c7421e1970c4a1a4168971c frame00000052 +9cee283b9c9d02620ff8068f02b2ea62 frame00000053 +fb1cc3ad704833e4c1636e0142f56e5b frame00000054 +ccc456e34f488197af1d7fb5419f04eb frame00000055 +ef18ad83b7cd7645028c407879c5b8e8 frame00000056 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/bink/hol2br.bik.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/bink/hol2br.bik.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/bink/hol2br.bik.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/bink/hol2br.bik.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,20 @@ +9997fe7a3ffc6b1a3ccce5daa84ef531 frame00000000 +8ad4f0d90529671d39876d9aa344bbe8 frame00000001 +ed7d3273c27273b857ef2d5086a6dca7 frame00000002 +6f28482377a55c2277e317dd4e661d59 frame00000003 +1e17bc6d08b87eeb11b58a39fd026b47 frame00000004 +e8ad3820bb657a516716dc61c95daf5d frame00000005 +4c62e21645b75de3f45a92cde564ad87 frame00000006 +a40cea9129016c940f62fa95306d89e5 frame00000007 +e123a129ee00f4c4929495db0325c8d6 frame00000008 +a7be4378f596b25ba01b4e58ab6099e5 frame00000009 +bc1d3cbbbf5f5e5eaec1de8b1db87eb0 frame00000010 +a78a85210d56b69f56083d60b31b221f frame00000011 +6e68ca1f0c357756bfc5182525d10aec frame00000012 +f2fbe6a741536aa30d8ba5400ab7a92f frame00000013 +b28a093b4ee7c5372f68cdf5b9462510 frame00000014 +b0145a2fd696494e4ac25af6c64d98f4 frame00000015 +2e770c2e42239618bc35ab3210ab20bf frame00000016 +0567b9b33ebbaf879f0ad5e32e0e2df0 frame00000017 +771cde3ad6a3b4aff97abf772bdc1405 frame00000018 +0938e206568c9893b914c0e334f84360 frame00000019 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/bink/Snd0a7d9b58.dee.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/bink/Snd0a7d9b58.dee.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/bink/Snd0a7d9b58.dee.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/bink/Snd0a7d9b58.dee.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,6 @@ +6047341ea82eac5279fed5f884c93a47 frame00000000 +6047341ea82eac5279fed5f884c93a47 frame00000001 +6047341ea82eac5279fed5f884c93a47 frame00000002 +6047341ea82eac5279fed5f884c93a47 frame00000003 +6047341ea82eac5279fed5f884c93a47 frame00000004 +6047341ea82eac5279fed5f884c93a47 frame00000005 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/bmv/SURFING-partial.BMV.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/bmv/SURFING-partial.BMV.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/bmv/SURFING-partial.BMV.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/bmv/SURFING-partial.BMV.md5 2012-01-08 10:15:51.000000000 +0000 @@ -0,0 +1,21 @@ +eddba11fbf9f768f9055fc331dde1da9 frame00000000 +4bc0bea86e0bc6539e1e42ab8a53f919 frame00000001 +4bc0bea86e0bc6539e1e42ab8a53f919 frame00000002 +fbfb8f0cb5dc6892db28f6ae9a9c2597 frame00000003 +fbfb8f0cb5dc6892db28f6ae9a9c2597 frame00000004 +ee29aec77e46b36ea6bdd83b1815dde9 frame00000005 +ee29aec77e46b36ea6bdd83b1815dde9 frame00000006 +a2ea3c58d3e24b9e004279bb23530b5e frame00000007 +a2ea3c58d3e24b9e004279bb23530b5e frame00000008 +b03564e15db5f904d883a9d66f33f603 frame00000009 +b03564e15db5f904d883a9d66f33f603 frame00000010 +00e2d8fa26c0003ab98263f362f50899 frame00000011 +00e2d8fa26c0003ab98263f362f50899 frame00000012 +cad1dd0d87419a27a6a3b88cfb431b58 frame00000013 +cad1dd0d87419a27a6a3b88cfb431b58 frame00000014 +c738a5dcf4fbd8261a09c002953724e4 frame00000015 +c738a5dcf4fbd8261a09c002953724e4 frame00000016 +86d4feb41083bf2681573b8b4bfb6d6b frame00000017 +86d4feb41083bf2681573b8b4bfb6d6b frame00000018 +b4c624b3dfbb7846dd589f37e0b05832 frame00000019 +b4c624b3dfbb7846dd589f37e0b05832 frame00000020 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cdgraphics/BrotherJohn.cdg.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cdgraphics/BrotherJohn.cdg.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cdgraphics/BrotherJohn.cdg.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cdgraphics/BrotherJohn.cdg.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,4763 @@ +f0bd26f73ebb4716646b6e7e6192f797 frame00000000 +f0bd26f73ebb4716646b6e7e6192f797 frame00000001 +28ffa752172915706e2b2c8e53c70792 frame00000002 +28ffa752172915706e2b2c8e53c70792 frame00000003 +28ffa752172915706e2b2c8e53c70792 frame00000004 +28ffa752172915706e2b2c8e53c70792 frame00000005 +28ffa752172915706e2b2c8e53c70792 frame00000006 +28ffa752172915706e2b2c8e53c70792 frame00000007 +28ffa752172915706e2b2c8e53c70792 frame00000008 +28ffa752172915706e2b2c8e53c70792 frame00000009 +28ffa752172915706e2b2c8e53c70792 frame00000010 +28ffa752172915706e2b2c8e53c70792 frame00000011 +28ffa752172915706e2b2c8e53c70792 frame00000012 +28ffa752172915706e2b2c8e53c70792 frame00000013 +28ffa752172915706e2b2c8e53c70792 frame00000014 +28ffa752172915706e2b2c8e53c70792 frame00000015 +f0bd26f73ebb4716646b6e7e6192f797 frame00000016 +f0bd26f73ebb4716646b6e7e6192f797 frame00000017 +f0bd26f73ebb4716646b6e7e6192f797 frame00000018 +f0bd26f73ebb4716646b6e7e6192f797 frame00000019 +f0bd26f73ebb4716646b6e7e6192f797 frame00000020 +f0bd26f73ebb4716646b6e7e6192f797 frame00000021 +f0bd26f73ebb4716646b6e7e6192f797 frame00000022 +f0bd26f73ebb4716646b6e7e6192f797 frame00000023 +f0bd26f73ebb4716646b6e7e6192f797 frame00000024 +f0bd26f73ebb4716646b6e7e6192f797 frame00000025 +f0bd26f73ebb4716646b6e7e6192f797 frame00000026 +f0bd26f73ebb4716646b6e7e6192f797 frame00000027 +f0bd26f73ebb4716646b6e7e6192f797 frame00000028 +f0bd26f73ebb4716646b6e7e6192f797 frame00000029 +f0bd26f73ebb4716646b6e7e6192f797 frame00000030 +f0bd26f73ebb4716646b6e7e6192f797 frame00000031 +28ffa752172915706e2b2c8e53c70792 frame00000032 +c58fa9949577280245a9dde2ec682518 frame00000033 +b27b5b29e158590d3cbbbb24e9b917ae frame00000034 +0c37ba96f6dcb35c72b674ec4952fb18 frame00000035 +38c3d3dea412f44fc27107e80f96de95 frame00000036 +6d2c0539ce0c09a11e4e42a5b8c928c0 frame00000037 +267fa3bf2fe4f248f4436982fd66ed9d frame00000038 +767db5407324d85458213e95bd750a3f frame00000039 +63626649dbe219d17d3cb036e65551e7 frame00000040 +221c76f42dd1ede9a0e166315d13498d frame00000041 +23aa780fb9f8e2b2e8b6f67d5ce6a59a frame00000042 +0d877d3172b7bcd2687abeb0051e1777 frame00000043 +67c9a07a7c243e0ab06df41d25437156 frame00000044 +ea92bc01ac7a71775b52289fec1b3b07 frame00000045 +d9b28c8a1e46ec67089170c2ba55b4f8 frame00000046 +987bb94e2b8db6cb5817da172aa8e729 frame00000047 +d9cf778b16e0fb91d8a924b4377293ab frame00000048 +c2bc7c69a8b2e9c1bc19de94937038f4 frame00000049 +3f3dd6a41d2549a90ddd2c76e16a8783 frame00000050 +416c1619fc8f897df2d9dc535e815ed1 frame00000051 +21012fd874b2cb5c062296b37b7d136b frame00000052 +017be2e22a55f51070b41f5b075974fc frame00000053 +966cbb92e22d920d1cd97b0d60c1b16d frame00000054 +5ce62de20a6dfa665a8a2d9be173b451 frame00000055 +e95572581b9ccb96d159b858ba4383c6 frame00000056 +92b13d556012efbde5fb942fd0cc846e frame00000057 +475559aa8b75c3eec016a8cbfc7c7126 frame00000058 +3dfba55034341e1f7715296e10097e49 frame00000059 +e23fb0d730e8e9cd514ae7edf4748d21 frame00000060 +262c996bb2b6b0703ab1e43d368dcdcd frame00000061 +a970d6a056a45f5e760145ed8e8cfb5f frame00000062 +c2053fb1d3f44c0df55ff921d12eefd0 frame00000063 +b2418abce93cff109fceb321dde8a787 frame00000064 +e209d5dd6b2818529cd6404a898455ee frame00000065 +8b34a89821ed2068e3525c399919a3ee frame00000066 +bc47ca818aeea4a9d882cb7b5df1670a frame00000067 +0aadd9669e9ec562262250b54f8e712d frame00000068 +502ace735ddd370d6e6a20e46d470b51 frame00000069 +fd65822f526a6798595625058a5c3fd0 frame00000070 +9c4120d4f34078ed072d0d39ee287fcc frame00000071 +9f569a30f711b8eadf3a1de17292191f frame00000072 +c59e994cfae646597fb6b5082d2aa407 frame00000073 +808f5a0451df14dc6b514ddf5df49a73 frame00000074 +f5e74305e621ab9a7510e028b65e7334 frame00000075 +ac741ad10950b186abebe2e00337199f frame00000076 +792cb8313b57cd86732387aff3cd38ce frame00000077 +d981dae415f913344546450f97d51f04 frame00000078 +48634cf851c8b7f99a4276050ad4cd5c frame00000079 +4d96b7450c55c41cba28473b50129b72 frame00000080 +623bc5f4d76c3bf96f1fe735a3f18329 frame00000081 +3487ed7bea8daa8b981c2272ffc743a2 frame00000082 +65526fc366fe5646e3ac821216ef9e36 frame00000083 +2373007e927917065f723ec23238103a frame00000084 +b757ee3203564959789abdd172f85372 frame00000085 +3dcff8c3a7d1bee861c10a701944dea8 frame00000086 +6aeb43257146c88e26dc72541b73dc1c frame00000087 +fc6f737f8168de81c0d44f32598500e5 frame00000088 +b793d2d16ad9afc482460c65c1a50a9a frame00000089 +4eda95887dae5f13907678b32e9e7ae4 frame00000090 +7ff9593263e515985a1913ed5fe2d082 frame00000091 +01595b56058e5e2bb07350ddbc10c452 frame00000092 +219636a109c90480cc56c940f4a884bc frame00000093 +0923ddf5ed9e064451dfc9a922f269ba frame00000094 +d5f390ddbc49fb406fe26ae50992aa4f frame00000095 +8541ec3c1007075c5e80644a4bf1e4f1 frame00000096 +9f30423b6a359bdcd2611754064a2e0f frame00000097 +949c0246538b6adf984caeeaeaf1ebd2 frame00000098 +eb28ab00dbbda8df95d3b68392096acc frame00000099 +d11b4be7e3fcc5e07fa875152c4a36bf frame00000100 +6864426d6848297f821119b26213f3a5 frame00000101 +09df2a098f3e851a7483c17f7033c5ce frame00000102 +fbe37a3a34e8d04e6d0eb6f16b5ea966 frame00000103 +f52e61de61a7204efdc7ed5a149a33a7 frame00000104 +e68fb4160b3a0d9ab881ced9ce923808 frame00000105 +9c12d739d3d916c71df7fc908f010d61 frame00000106 +11dbc8a1fe8b259db6331ad7971f87ee frame00000107 +62661982d7ca8dc4cc2b1b080af6e353 frame00000108 +458fc5893c3ba9b36f3b45529d1070be frame00000109 +53a755c41938212bf70a9f1de0092c95 frame00000110 +f28ff148ab8608106587d49114583774 frame00000111 +07da8816bea5f7e6125ead55a4fe74d5 frame00000112 +7cb39610707337bc2b1f3453953d9843 frame00000113 +53175ba5ab3f8cc8294c31205c2f8e93 frame00000114 +574b2a6783882baf4bfc041b575e24f5 frame00000115 +83f68f61d2148d650a5af13c54f47480 frame00000116 +995aa743628afcc738567ed8b2eb6540 frame00000117 +c68b14aefe813b3094a2c2da6b75a8ec frame00000118 +093b5be87708669749deb93ab4fb702d frame00000119 +7fdc75ab26e373da92486dc95b063ca1 frame00000120 +4a162f5cc874ac1639d079cf6ba4e4eb frame00000121 +bb7b8f0ce8cab690bfb43457719fad4b frame00000122 +7926d3c57dda42f5df45a845a8c00d27 frame00000123 +5b2dced512a1c62290d74768126b9727 frame00000124 +b6310e2f26274f19a19bd31394025265 frame00000125 +24cf2ea8b04a54dece52e88774ccd3b3 frame00000126 +2d2223512f0cbfb2914cb0b0cbc8db00 frame00000127 +e723d884399f1afc886b21354af2a157 frame00000128 +1e68aa7bf72980271cbba1adf20e209f frame00000129 +4dce675fca345b69a69a1ce4d088af19 frame00000130 +7dd5138f45f6e278c22d531ef8f31466 frame00000131 +6dbc09dbf5cdb5db7d16870ad76567e3 frame00000132 +d02adab6ab4ca22934e8eb948401ee9e frame00000133 +673e8de3a528ad2d82437d162be2fa0d frame00000134 +4e333f56f09d2c83b44fdc55f2febafd frame00000135 +ccc5a8064ce2974fc1169c19cb06b33d frame00000136 +b53f0d1721276df5973ad40cdd037d86 frame00000137 +bdda196d20345609a0efa9485e2ce1ac frame00000138 +0818efc5299ca6b0ee720a975fa9192d frame00000139 +bfe5e376262275940d4200512c20573f frame00000140 +beb591b21ecc1dcc7de2f2b947d7a6ae frame00000141 +54999ba8608011942c1db9ab646f2992 frame00000142 +3662d5a78d5940de4d7dfaae9d6b6867 frame00000143 +6cd9c58e6f6d4169666bf0fc51cb0062 frame00000144 +b6d7a7738c2afa246855fb56b2cdd898 frame00000145 +39563aabd45f9f7358e39d870c39b491 frame00000146 +e9bdbc33e76d761bde4c13849ab309ff frame00000147 +90a216d4460991dc4a8271ee95aa059f frame00000148 +2b67865fecb07999c55bde43d89383de frame00000149 +ef40804829e3e0b71354d179de5ab4fe frame00000150 +32db491eaafb8926775030dc12d59156 frame00000151 +e67b8af7c84e046393608535d34bd20b frame00000152 +07af967c62b8bbe71729bece59f3f915 frame00000153 +c0b0037b32f4bf2422362693bec7dbe2 frame00000154 +4c9fba782b6c16ca0d7823b5ca03ca03 frame00000155 +ff6b9cfe04d55b3de05ab19b302c2708 frame00000156 +9d8023a6d0258835b6d0b59dd253bb4e frame00000157 +caaab37efb909aed8e2a8e881c722681 frame00000158 +f17e31835cce16da649d8d9683c37784 frame00000159 +1fb1f421d277e237080a0bf9b3a4d395 frame00000160 +6fa63eb267cb08df6837baf50156d74e frame00000161 +123cd5ebc840ce98322ddb608421ebc7 frame00000162 +f1a20afb05ff52f1088018dca5368470 frame00000163 +87bc6b70f39f000188209577a4e7665e frame00000164 +d15f6aad46d0676b0b19b43d1330f4ad frame00000165 +9fd8dede9759ccbe29b3fab589afffeb frame00000166 +e7687c7c5d35e14601a24b1406e0e5bd frame00000167 +ade367509cdf0a2c835bb66a671e16b6 frame00000168 +e8fdd2b3b7114f61d0fa160148b0b7f8 frame00000169 +0a292de006dc86def837023dadeee07f frame00000170 +f527832f1c8aa370bdd07d5a6748e717 frame00000171 +388c91e759c1a4c7ccec71c2f7738c54 frame00000172 +6a031ab6d1b2a89d0fd271dc193f349a frame00000173 +0362232a17bf0fd5578f1f5878310190 frame00000174 +4940c2ab4944e67eef0c4af3a278b6f9 frame00000175 +b14fe40315570462d6121314eb3d5c16 frame00000176 +973cbf7f40700ae1dabcd3565f92b6d9 frame00000177 +a1e1aa75a0c474c1965c007cdf646957 frame00000178 +f5d7779355e8f7e1d389c05b0deefdbb frame00000179 +9e8b0bd146ab6d7984c6ea75f55c5b57 frame00000180 +c0a55683e0d24afa09f742b2b285d4b4 frame00000181 +c666e3bb2f164ca3e755f930417e3995 frame00000182 +cdd0c27fedd658223e1820ab882922a7 frame00000183 +6f1cd070da8c728cf04cdf9524396115 frame00000184 +cb6c8b4274699a0e7534513937694de1 frame00000185 +a3285bed533ca3b287a4f4751d9d4131 frame00000186 +0f5bec0993c8bbcd6e98c4bc8fed8e74 frame00000187 +2a8bd6dfbb458ffd4f0580401e21bd0d frame00000188 +be184dac2dda080c8914d1869c18e82e frame00000189 +2f74418c6081be107a509789e9bc4110 frame00000190 +705da21ff81791e569a1ecb240a2582a frame00000191 +df413216dea5a41d90c7738db4ff687c frame00000192 +2a94f5896e96b12a682e828b3f67741c frame00000193 +ec846688b4734e07fa012eab720863ea frame00000194 +c797d23c720f934053337cf475ad92d7 frame00000195 +959b61cc99db60a2d7a74cdfe168b382 frame00000196 +a0cfa839b3d61d3e69cb52671f47c46f frame00000197 +7d70e545f186b9984b4bfbd94de6eb75 frame00000198 +054a512be500bc185fa7cecf7337f7ac frame00000199 +90f81d51a41c1988bf9ec03e01874537 frame00000200 +db75b74eaf7cc9aa33c478243e233ed7 frame00000201 +612d655743759d9203e913c8b94ce9c1 frame00000202 +34396874146687c8b6d3a5f8288001d5 frame00000203 +ee29a1a725ad316f06474e1db1b9c3b8 frame00000204 +a2f945348300ba3381ffcc6b5386805e frame00000205 +9ee9d44e9f3208637465e665fe3afe90 frame00000206 +e417d6c4667ce77856ea45e96530b8ae frame00000207 +62d45aff96c5c6b5139d58909d0e3643 frame00000208 +a098bcd2eaf2de3e85c78fb895cbf533 frame00000209 +63d2cf8c3e944a9299373555ab849c30 frame00000210 +effc3281b133a53513060b9aa14174f6 frame00000211 +1c1c734ad89a51da5fb796f4cfc98c15 frame00000212 +fc391ea97bfe8d591843a82523347669 frame00000213 +ff78528b3e95e70b011e30a8dfac6b71 frame00000214 +3c0af8fe9d4d76fc6888bb7c8571e7e6 frame00000215 +da8f0c17a10aae58c14c31aeebb8e53d frame00000216 +a5a35bf13baefeaed6a6dac90e26deb5 frame00000217 +b78e77e85914f879cece2f1972860073 frame00000218 +0c2789eb284c2477cfe3c42c9b6c27f6 frame00000219 +ee71d76cc2eb4ed0c912692e87777bb9 frame00000220 +74e85ef0af5ddcf0df226d6dfcc6bce8 frame00000221 +e3b38ca38635614a621eeac7a0644e2c frame00000222 +aad20eca350621582ea206492c54f4a2 frame00000223 +589e55a40a3b87ed6ece087279d32084 frame00000224 +0cc0ad880b4f859db14141c880097a38 frame00000225 +207a0b16b81b17d1a55b14bbfe673d90 frame00000226 +1f64ab55d07e4167ef9adbede15da51f frame00000227 +39a3cdc54c8cbac2772691e2c6c1ec07 frame00000228 +14a33759f2c3f16c4401da3a83512b15 frame00000229 +b81c760c553c867df4c283b66b7e3a78 frame00000230 +83d3fba88a5fe7de9a642f74e2400bd9 frame00000231 +fdc9994f4f4ac360a61f07c13906d520 frame00000232 +c3afe4429d2110fb1329c82db670c72d frame00000233 +5e62325c9526d6d19a18958b334e1b24 frame00000234 +cfe2c8cce539ce71fa75d1a4cf09bcd7 frame00000235 +6899b062bc966a5d98b404d378e85d80 frame00000236 +a1e168ec27d8d2fb1b5e4396e9464321 frame00000237 +890ea3a1c9390128dfdf47ef86684063 frame00000238 +be9b749afe96d83605c28e2a517f1c54 frame00000239 +48d45def53a65876a62a387fef9499ae frame00000240 +b41c898a4e672655d3928d026c3b35a3 frame00000241 +66d1074d64eb7818d449926cd92d1af3 frame00000242 +e1434d3047b3298072c8b72838f12dc3 frame00000243 +01c8a1b455f6e00d3d83c90bd7116640 frame00000244 +89691146a26b5e0139b788b2f29b6986 frame00000245 +e5d58c7b88c5116afd3fd8afa48bd8cf frame00000246 +1d70a7768796e63e970dd788d828f1f9 frame00000247 +368b87ee9f9b2bccdfd134035d67cbe1 frame00000248 +3a5a83e5b4d38ad7438073ff4f973139 frame00000249 +7bf1f29d19940fd7650b9c9118a7dfd7 frame00000250 +db9ae2fbe30e9284ea8f7b12b5c838d0 frame00000251 +c87c228a82e79c7abbb4d1313eb0cd60 frame00000252 +a6c40a125af3a3229b0cbdf5729c0480 frame00000253 +99d9603bf333f1a587d819272c2fdf11 frame00000254 +37b41ebbc6515cf8224d69d56da12105 frame00000255 +3510e8012f0fadc26ca18191cc7c1e96 frame00000256 +60d21a85dc6ef9741237d5bf239b8a94 frame00000257 +c1387dd5057c6420e577a220942be9a9 frame00000258 +6b1851982c9176bb0a1b5b07f6f6e8e5 frame00000259 +d4050b8ace587b11f55c096827bc4a3d frame00000260 +d1e9cbfa88c2b960047c451424b7f48e frame00000261 +4b50448d87d2a2607f9c48c4f2aacd2d frame00000262 +f9243de8261f146cc28f0fc061fd5da1 frame00000263 +8ec77dc99326fcd9e1d04bbd47ac4d1c frame00000264 +e5da97969031e4e3d34cfc0ff4c051f0 frame00000265 +de21fe191428943c48f53efd73c209cb frame00000266 +81d0c429b55ad315d78480ee7e16bcb9 frame00000267 +7d9d005f0fbc6958d51979648a42630a frame00000268 +05e751ec4e4cfa85d2720ef7103fd101 frame00000269 +06259e64f71bc6f49e55a4092cb7fd37 frame00000270 +8aa6ca12623ce4280222f04e8445454c frame00000271 +cf28b924bd11d8674adbc5da8a0e3d76 frame00000272 +703b94d40c6f48bc3c77c01bc08e5269 frame00000273 +d619e659ed5b46db4ef1f650d4dfa37b frame00000274 +aab873fc4396ab117826457cc04b1c6a frame00000275 +62a667444272f6a72c729b2ff3025ab2 frame00000276 +80a6fe0115a935dd334e278e6c01b8e5 frame00000277 +589fc0d21a049825768c2f857015932c frame00000278 +b9a928dd898802fce4b817ffd7a425b8 frame00000279 +ab8681081932db1cf3bb9fdd4f020642 frame00000280 +d69ca81defc48e0f1020e0e02bc1ceef frame00000281 +c1aeb42bcfc4528b96ca06b83914ce41 frame00000282 +7286c4d269aa86858a1197ce514c6b0d frame00000283 +0e63b4163d677e7a8ddadefe22dff5af frame00000284 +b62123e6c967aed2acbe38efca4ad509 frame00000285 +0d1bea3176af12f2e13de53a5873425f frame00000286 +9090ea7b78021f9b1213f0620605fb75 frame00000287 +2be059eb1118d921f8fdf77e959777b1 frame00000288 +4182c6f04c2d77009611d2c2c20a0f13 frame00000289 +8dfefd3b0634c1df8ae9c69b3e790887 frame00000290 +beed2f21fbe0498bdfb830e81cb3625b frame00000291 +7da2ea00375de2469918ca2fb418dd22 frame00000292 +af59d4fb9644b02ccfa827f786cf4d02 frame00000293 +ceb00722dced373d8e0d7a9787edfa6a frame00000294 +c7dfb6d951512569a496ac385b76b488 frame00000295 +c5dadf5c22299167e8bc517758ce25c8 frame00000296 +ad5e55e1bac1d7546848017f1fbe4833 frame00000297 +009126106eb5a8f35bea8b87380b0889 frame00000298 +aa6f44016aafafc38a5a787b9348da53 frame00000299 +4556ceac02ef7c71d69c82e59346e935 frame00000300 +137daf66f6d41e355161ca152f55c19d frame00000301 +5a38b78e12777f184b776c49c2bceef5 frame00000302 +9ee0ff7143dddf88c237352487fdece0 frame00000303 +12de37fdc0e339b054c805c9b6c9a276 frame00000304 +4a607d8cdd038ebcb13e01ff4be63ecb frame00000305 +534e4b0867a4308c168ec8e9bf6d8550 frame00000306 +ff69abed56397e46a41ee5e43fccf848 frame00000307 +d2ae8ebd7a25d0eac0d73d9dbe0715e0 frame00000308 +ed21e24ba0cbe99062e3cb27a34ba779 frame00000309 +e4bec594c5b651c56b5a48d516e04153 frame00000310 +b44e974e710797dbf3405f9b288bd290 frame00000311 +06b9266d946715e9e88e3d6c265ab725 frame00000312 +14f2130f4384d865f77daae0238c393c frame00000313 +6dacc90cd75c84d5da38b3c11525f048 frame00000314 +3c68350daa0cae215c489de48780a2a9 frame00000315 +a84f02e2372d3636edef964ac6cc6e4a frame00000316 +deb5b54d1f8505585e63e70fcd7fc4c5 frame00000317 +c8517c981261f5acf88b6b19b4ecb0e6 frame00000318 +b161ccb5da3b4a7448aac93fd602728e frame00000319 +4c896a49648063a1d5e92af8113594ec frame00000320 +d974282e928524643257214f2c002a6b frame00000321 +16e613d7034a5d5d785e3e8b2b9e7428 frame00000322 +6f20a664379d77e3471b24a252c6201c frame00000323 +c8b9fe76fd48acf5df549685d2e88b49 frame00000324 +2c0788ba22a68d99a85656aebe0565c5 frame00000325 +6d79d322eaef64a998ee3e2bbee1b37f frame00000326 +677f8c8656d61890d8078a24a03317cd frame00000327 +efbc18b0e45293848d2907106b29bfe5 frame00000328 +80a19960fdedd9e66710b16f116020ca frame00000329 +96b9254bb4eff378e0484e2e456a33db frame00000330 +34d625e74ff708e91683fd7e5163806a frame00000331 +927a4a439677a79e2ac86e9b6b711a54 frame00000332 +2eb0716d66cb3373c2877e0decfe5698 frame00000333 +d20cf63b48de93820d5b6c28db3202a7 frame00000334 +da6d5a8119f2ff6e4b4e3a7664fcae6b frame00000335 +8b815ce5997ab8e3a094955c1e9cbb61 frame00000336 +b19fe3ebffbba5465c39c98d23950a55 frame00000337 +ba01ab35850beb2eb660480da2abf0a4 frame00000338 +f26785a7a949556132bf1133211d6f33 frame00000339 +c1654446aec90c8e38a73de7b736c1f4 frame00000340 +10b620c71634b8f9d4859f7388412b5b frame00000341 +107db57217d8c6230fb0e6a6c435d186 frame00000342 +5b07b809d720d3dc8fbfaf5a5d330aff frame00000343 +2e7005e814680fcf8ee5fb8b5deae3b7 frame00000344 +2bf3360b03f5f5a451d550487232782e frame00000345 +e136ec5160c536e719ca05219fb57fa8 frame00000346 +910bd4b4a6f754527773ab59dcd620ad frame00000347 +86c3a18016efe8fa2be09e4aefd455d7 frame00000348 +9777983078bd909fcfc5af7e1a5a1cad frame00000349 +e4ce0545df129de54b895aa06409aeeb frame00000350 +8eb6dd825d92464009e62d972315dcdb frame00000351 +4acb2cc201e8ecb654dd0c5bfde74ebe frame00000352 +deeafea7fd651b780344aab0d6eefb28 frame00000353 +0ad3c39e43f15942702daca4b73a06f9 frame00000354 +a738d7ec1a46fba675fa6841b216f25e frame00000355 +05ad014b7aa0bc32691994fdd5c556b2 frame00000356 +2ebd50dc511a7e828b660ebff35da2bc frame00000357 +a15cf4b994017d7741708c75c6630d6c frame00000358 +d22800d7f06a6b1c1d83c32f45403328 frame00000359 +76e3e15620c0969254f4bcda265ef3e2 frame00000360 +65f0d3978c5a4db844dd33c788cc3b84 frame00000361 +99d409a58ae414e40f41b1bb689ba05c frame00000362 +66aec6d98445162f6691accbaef9a8f9 frame00000363 +846beeed335913aaccc78be1de4139c8 frame00000364 +52689483714601432d39ddffcc01f23a frame00000365 +7ebedb971a7abac2afecd22c8b2d7bb4 frame00000366 +d8effecf4d4bd38ea60e7521b82aada7 frame00000367 +57296f6b2735017ede283ce81ab73f4e frame00000368 +0970a96e1e6d28ff3931822f7bd43eaf frame00000369 +3f5b848e88bf9722a113f70abb7d8733 frame00000370 +81825d29e344e8b68811b5ca477eca7c frame00000371 +69b86b37d82bd36e9e47b1347ba69720 frame00000372 +3114790aeacc740eee6ff72b3559c064 frame00000373 +0374d9db84e1996391a3ede6ada7e325 frame00000374 +112b7fd9ecdb4f9f3aa0a72ef57cf314 frame00000375 +5d709768d3995de871b37678219a9891 frame00000376 +75072113172869f4ad31efc70b239f17 frame00000377 +1f0051585d80e8a4a9679889ecf3dc30 frame00000378 +1a7887cc8259a2e0aa0dd1a92187fc1d frame00000379 +5031373770c6b1c9cdb639053a25fcb9 frame00000380 +16e4a3b914cccf26fa2cf10119f8f1e1 frame00000381 +7a7f4d96ed129ad47de10a15689aa6bc frame00000382 +159f6a5b56cd2631b2a890eeebf6e8ea frame00000383 +16777cdbd34dc1573db4a8b734b8e847 frame00000384 +51796b82b35b067034a56ec04d6fd42c frame00000385 +b17e302caab5079133112a635e3e50bd frame00000386 +0dfd478df4bbe54f88a49478a0975a3d frame00000387 +5b963aeda2e6817e41a166dbf84448a1 frame00000388 +4af5d9fec0aafed6672b565250900bd6 frame00000389 +17176b7d3fe79d20f03b30a86b5a5978 frame00000390 +7fa0425b2ed83f5974e8f0fbb1a73a4b frame00000391 +bdc2e620967e99cc28e417ef81944122 frame00000392 +cd420a9969f2e5dcad22ff41f6df52f3 frame00000393 +bd0d793599419c6a2236cfd5bb74fd8c frame00000394 +cc1c98ee640aa5e0577c72af720aedd0 frame00000395 +74bc84eaf778d6e0044ffb8baee63a1a frame00000396 +f843dac3915d9502cc94520c91b7a647 frame00000397 +f69790762b2b3aada1ee9b02899459f8 frame00000398 +bb08e973318fd73c3432367bff8768da frame00000399 +60bf5e2099417293bdc62d8ef0ecaff6 frame00000400 +27f084bb2f9e33cf6216efa02272cd97 frame00000401 +8c982e94761cc8b017352331e7e2b10e frame00000402 +117073ef345346c6f3d61ed7d3573b96 frame00000403 +5b59d24360eb1f7df844080116796563 frame00000404 +a70b87722d56c1ac74e1b13bfe40ba7d frame00000405 +09d52ad9869917eb1ccc109175f67e34 frame00000406 +73abc74d1887832a24d353d0e45f131c frame00000407 +bd76d4d7066099faf5ac9d98d9dcb7b4 frame00000408 +a255417ee54836b7a5fde5c7c1891041 frame00000409 +7f400193702ef12e45248157a4a9e0e3 frame00000410 +637fe7a77aadfc2a19e0e5b9e9ae5670 frame00000411 +8f93a4c25f75eb691214b33be23e3de3 frame00000412 +1929d9322749c5b7faa383ac9803ab0f frame00000413 +52eb51868fd987ebe4846ae88382e873 frame00000414 +d40cbe42753e1408d2013f51cd51fb10 frame00000415 +2664667bccec2a5b63af69cd9a3fb4f6 frame00000416 +0acce08b118cd16856aaef77c25e68e9 frame00000417 +599ae58eefcaa0f465340f741d631f86 frame00000418 +31ba911fb9d21df2ad6fffef52610b8e frame00000419 +f1dcfdbd1d113f74ceaf1b6bd3a03c03 frame00000420 +dea5a5181b849e185f7afa06c22ae6f7 frame00000421 +5dc9de118e74e80ba127d76618da3a81 frame00000422 +7d05efea75e3b05a2e35014d324fcb3d frame00000423 +0087d2f9f6710448ea78e491d1f48b1b frame00000424 +aef7853340c333d3860c5e6e77e5a674 frame00000425 +4c150a2bba0da2dba91c97510a595d74 frame00000426 +f4439faa87cd7ed132886ecf62e6b215 frame00000427 +0c6e873d9342c5a93d5b610e4f0ec5d6 frame00000428 +2a06e1aa8806831cf519a7d6c212fd17 frame00000429 +28d4133f9c5ada363cd66cd9c346d78c frame00000430 +222ca8f2674ca950aac05975cc5ee593 frame00000431 +76984057cedf20a90dde92390b1a4ce8 frame00000432 +0cffd20f2fccc3c68e18da19fe56c598 frame00000433 +9000e3dc4cc0b5ab7e19a5ce90d601bf frame00000434 +fe5501636fc09521375c6aec29b1e383 frame00000435 +c224a85168d16a8da34a4e8f50dfe52d frame00000436 +2daa0571cfa5b873568b379f470ee653 frame00000437 +bdab6196083b2d923ec9e3a53c3e3f6f frame00000438 +6bcdc926075766f47390828b040fca24 frame00000439 +090c26c19750486003156f89906b6c3f frame00000440 +ce1ffba08e7cec1bab3a8bc58e0b2a54 frame00000441 +833c0baaa6409821780b685e163c26aa frame00000442 +1f748b6e621b25f32b8f3c618a4f68d2 frame00000443 +b5137a9cee2ecff49be1febe629b93cf frame00000444 +66d31175585adad6ebd248cfd9113792 frame00000445 +dbc0fa1d54c75511da61c0dad270703b frame00000446 +7fd3a9b624695fb809cc2a01282ed3ad frame00000447 +c0de5eedc9b1955acd0214670c5ee653 frame00000448 +d3b878f83649280346377d4a369c0a11 frame00000449 +8dc72c4804c98eaa17518597c3b57588 frame00000450 +e87db80344b6a3036b2c5217e8d5ed54 frame00000451 +a319af8056ffc99f95963a74c08a351e frame00000452 +cb225f521e6e0cbbf00a496f0dece5b7 frame00000453 +504136b015ca596d6d6bfb8018d65e64 frame00000454 +16dd9563858bdb9c412755d2e01f5187 frame00000455 +a7f1fd53bc996c83c7ed0785ffb4f1e0 frame00000456 +566b23e25a8c7f0e2585e1fc3958f660 frame00000457 +21e5ceb7765bbcdd5adf316cd7b17db8 frame00000458 +e303a98c4cfefb8c9d96b56b1cdb8cd8 frame00000459 +b4e1aa2b7210a99f0b16596d6140fa9b frame00000460 +4d90182fec1393303c56217715d2abfa frame00000461 +9b8d51397e4a5990cf705f4c3589ca13 frame00000462 +2b8c3c3b31c82b49a82ee5cc1756183c frame00000463 +a370798f66238789d8591ce0ed5390f4 frame00000464 +264a817ba03c65cc19457fe1d10c7741 frame00000465 +517ecc92e3ab7d6652899f3366c9aa20 frame00000466 +60c3582e799ed6d981f296dc5085cfa7 frame00000467 +40f6987fcab07392f0aa3bdc2e282726 frame00000468 +7d19ffc459d3539ca11845ca63468af7 frame00000469 +4486e5e5db5393d525f36eb741cdbc6b frame00000470 +5cdbc2a4210a73847fa83dc9e949de8f frame00000471 +675ec54898486619235a578bee4d4b0b frame00000472 +1e54a6eea4eb5ed9e51ba1a4462a8014 frame00000473 +3066c232f88b843404f9482708ec07c2 frame00000474 +d58d96bf16815fe72e4af7130486e942 frame00000475 +f625072552f8e41fa1ad75e82fc45b61 frame00000476 +4aea82d80a5a8c34d4fac961f53e2c31 frame00000477 +75119b06802f0f44d19028afbf946046 frame00000478 +fa3b4923ab0d6343a7943f294a810b8c frame00000479 +e7c524b89befd94bf155608cee6231ec frame00000480 +693bd8fb24d5cd74eaa7d5db8231aa04 frame00000481 +85db1e634f56c4011abc4297b879d1dc frame00000482 +a3bada06f489ecff76cc66c1790bdd68 frame00000483 +36236ab8f7eff0688a95292a36ed182d frame00000484 +fb8b90e43d843b1649a882cf99b4c92a frame00000485 +6bd9bb42824eccd8506418f5e6be4c70 frame00000486 +faf664cdd8f6ea6e205dafb3f6171a02 frame00000487 +0191e536354ea31240e21adb8da08ccb frame00000488 +cce48774c4c0ecc2829b615792a0c8b4 frame00000489 +6e5e41603d0e1d526fb91b8eec73067a frame00000490 +4eaa941bbb8888afb762420dfd5af0e3 frame00000491 +a17363d342aff10715caef7c8033bfa9 frame00000492 +e66991f93474457f4800981fe6cb575a frame00000493 +8bc415130ad76bac0fde85f5f08e1e4e frame00000494 +ed3064bdd405c72169ba400677872f35 frame00000495 +736ac2f45c1c4c0cbdf95abc99710bad frame00000496 +23f559aef0190ef8f9228de532b9bca2 frame00000497 +278e5559ca8439d68cf680d3adac6507 frame00000498 +1c13f88195c3c6c2021cf3082338fc5f frame00000499 +bb189e48b4489e999ca080074976264c frame00000500 +13fd9731094041a4a453687f5565ff87 frame00000501 +0810cab10bda9cb6c4452dd52912bc9f frame00000502 +3be627fb4943c75ed8f7e617548d9a99 frame00000503 +228b87335cc5e7be6752262427a6a6a4 frame00000504 +1b6d13977ab9192b61dd3f641a582cde frame00000505 +ac10039fbd9eefd47c0b5487a1e4f646 frame00000506 +bca5abed3b9649caa21c415124481fe6 frame00000507 +7b40118f4907bbc9808c13ce6c40109e frame00000508 +1a525e1f73a51881fb6fce8b0ec62239 frame00000509 +5e2a0368b285d4bcc4139c6fe50b3381 frame00000510 +98d315b00936b02d304a5fd06840886c frame00000511 +c65a7754d315c3c1fe090d0732f49cdb frame00000512 +b95efb046f895f7116f4bf2e338165c9 frame00000513 +20c9e80f6a30a690df81685d77eec526 frame00000514 +3bed624c6e2e42b8910b167d30f1c197 frame00000515 +7f5f36f44d0b7e2521a001531297a3b0 frame00000516 +101809fca807b8fae222271ef240ab6a frame00000517 +3f808517531ae3a4ffee78bac8142a98 frame00000518 +8f7b1f82679beacd2ddeb1e9e9c7ee87 frame00000519 +513f83fd30e6afd94ac89925617cf793 frame00000520 +661bd9e8b3dbba06035324de106f0ecc frame00000521 +d0a6f79ca5f1b16fd1aed043ae1fa268 frame00000522 +f756837ae6e30203b1a4d6cad7de3592 frame00000523 +ada87663c661ad5651cddf20a70bfc4c frame00000524 +c613278b1e497625f7265a49543677be frame00000525 +0dc24b89e836736651691a55ca63a23b frame00000526 +78438f1d3e6ec6ccc6869583b0989698 frame00000527 +77e3ba0821fe97dd7d3f94d13f8cb807 frame00000528 +a3b9a9854bdc3f586b8dd43ac5aa306b frame00000529 +7de09fc06b2474c0b28bea3cab5c38ee frame00000530 +2825a6d73fee62af0206512a90bf0dea frame00000531 +7e6e0dff3491dd9cd9467e71ed6adda7 frame00000532 +997ddecdba2bdb0b8c03c109e150730b frame00000533 +02dd52aa03ca9b01f2141faede6bb774 frame00000534 +6f82beadf4a1482284164f454764313b frame00000535 +ce57e5816fb1604704596e4bd3abde12 frame00000536 +cab05d1dafdf20b528e3e6dc07caf7ac frame00000537 +574de884c144d23951e50b94ec643962 frame00000538 +a06fa4cc90c418ed2fc8fda5a655f6a6 frame00000539 +63d8b5f958adce1bbecda3bd3cd6da18 frame00000540 +078008ac8644722a96992bd3015e96fd frame00000541 +9c9dff0d31d7173232545f221d719c3c frame00000542 +eca21d558133554dc751cea80f71cf88 frame00000543 +b62ebb1075d0b7989769b1c38db88ed8 frame00000544 +b6da7d16b70d45e2db9656dd641f3212 frame00000545 +6ac94502bdfef417a46c2d9d2352eca1 frame00000546 +45ad2cee5107164d9ccabc34ce04a1d4 frame00000547 +79358e5d736c32a40be231cf4d5750c4 frame00000548 +eaf6ef315b7d83a6b78abc83af5071c0 frame00000549 +c0424fedb94e3152d66309b675f60072 frame00000550 +a62eeb8db737d6d708cb76da3e8fd54a frame00000551 +0ad8509896f20d907cb5dc2dd425b25e frame00000552 +e52d5a8259b31cbe9c31d038902a258d frame00000553 +8a55d4fd92a66af66415600f87efcd30 frame00000554 +ca1b1f13419a1cab1f4431e593ec6db1 frame00000555 +7ecc529f038ddd0b7c922cde6e258a00 frame00000556 +2069e15f0efd72772379c6de0c28970e frame00000557 +f72a413e9ba45eac1690582ea21becc9 frame00000558 +6414fa2b5c7d7b6852af6400de21e858 frame00000559 +c9049972a02b38e36b075ca225774dae frame00000560 +d70e6efdb2371cf9359ebb83af249b72 frame00000561 +db7104879f65153020e3856dd285cbca frame00000562 +2f13c9e09f7677378ed20bf1038b61c1 frame00000563 +b50d59f66a300f41c9dbaf8635745956 frame00000564 +e94b776155a4684a44ae7f5528305e8e frame00000565 +4a4d1cf59aff7bb04de367b0207bf611 frame00000566 +3fb9a3f667eade6bbce8a0ca294fcab8 frame00000567 +dcfa08d0d2330a0c0359c448cd42b788 frame00000568 +657bf50d9d5095fcbd28c2a7dc2f9388 frame00000569 +ec7e00d592a438deaf3220456372d271 frame00000570 +85f42a1721a6f713396498ff7b1f56db frame00000571 +8c4c37af68921c2488d32e895c3c56d9 frame00000572 +0d03ac4a83952166a0946c7062dd59cb frame00000573 +61d0c375fd98a852fd6e8d51c8327543 frame00000574 +f695b86f34b94b5a0187ec3c9a0c81bb frame00000575 +6066f8dfc2cc183965012546543fa5bf frame00000576 +20f98bfa2aeb60c09b87b4b8f260b0e0 frame00000577 +544b58bb8b5c186391476f336334bb72 frame00000578 +0e8e40f5b9a323a784c3971f75fdaed4 frame00000579 +a0fd90252c6266178b5aa26053bf800e frame00000580 +0fef2b5cad1bc16b23a187cef87d1b66 frame00000581 +b21220dd61ae6a9160332f81ba9dbce2 frame00000582 +9453162e04aed01abe3bcc8f38f64bf0 frame00000583 +ad5577fea64c154ea4c221999a3ccb12 frame00000584 +5bf088028ede87e185b880484c51f3f0 frame00000585 +daeadde883fd3c84eacd5012c3149fc6 frame00000586 +412a34ba6c76ff9f2dea4f5323431447 frame00000587 +1f4682d8a00ee67094a3b1b5526014b9 frame00000588 +b9ef64023c09901f0473977e349458ec frame00000589 +ee109bb7b386db2baca707e6b1b6e967 frame00000590 +becee941f6673c7b459ff204fccdbeb6 frame00000591 +59b48e15ec19c211afdb8857ea5893f4 frame00000592 +4dd77216b27d805938750d45a4d1ca8f frame00000593 +6491d4e53591f2e9a443dff4974247be frame00000594 +b81f889178c45da44b5a9fb3a8f2a4b5 frame00000595 +bb6741016838088fcae487d2ccce55ff frame00000596 +22ba891f84fb062c3c26e039cbf288bb frame00000597 +2b10a38427ade434a4a3582b6fdc2ee0 frame00000598 +ea6b63679e99b4c15618a0c8ec84515c frame00000599 +f7514ba8201ee66e74ad0ebbb6c2b577 frame00000600 +51a9da80fa7a6e1d72844878b228413b frame00000601 +415b33bb0f8926d9c37373df266f25e3 frame00000602 +e0f3ce61b69e5140f6c9246e612d649b frame00000603 +1a93af1fcc5d4f522ccae9032c3b12d8 frame00000604 +260db98b32a37ad9ce3c03ec909e744b frame00000605 +822ecf0fa2085c4def1651afaee35f21 frame00000606 +3679acdab317029f970f7c97aa92c365 frame00000607 +ad8de561515f474c3bdd4db7ec8e066a frame00000608 +a1931186726eff3345eb6adfaacb591a frame00000609 +66ee3f08f01d80dd0bd1d2afa6cec731 frame00000610 +004cf19ff4b216ac6d4c85f2e2b956e7 frame00000611 +0dc068d70871f163d26d4976e629f64c frame00000612 +247ae08b6b167e5bda5292e4edc8ab86 frame00000613 +0e29751aa55e8a9180215ca1a82f2282 frame00000614 +4b3f9a6301189f662d652fec35af2be7 frame00000615 +f65b26a3ee88ca9464a72da749bfe9db frame00000616 +9cd772d700521a38a3082e3a81cf94a8 frame00000617 +9e3bf32bafeb26fdd64077d4b998539b frame00000618 +e1f39300e07703d91341e490806aeb7d frame00000619 +c2a5dcc0b175d34b870b92c00989fb86 frame00000620 +c23c63342ef81aa3daaac7f7481afab2 frame00000621 +bdba3f20262146480b82706f8047d211 frame00000622 +abb9f721faf8468b4007929cdabbce4d frame00000623 +b9ee60d0d1e4511cfb06662d1d5ff48e frame00000624 +e10df1b9b0c638625153f652fecbda3e frame00000625 +eeb17b4d2e528c98fe3e0bb2fb966970 frame00000626 +61c1b30faaf36ab82a55df2570b8d952 frame00000627 +61db1dfff15afd976cf9d8da568b38d6 frame00000628 +d3edb3e7e3a678b3a2f77f5ba7a15746 frame00000629 +c15175e8e42c6e7c6d252e726250d962 frame00000630 +f83365c79a6a5b4fd90bfcd9df7d4a7e frame00000631 +7b73fab40f7681727743dd9956746127 frame00000632 +2b297da9e7c11009cc278f101dd1ee1b frame00000633 +06febedc7d7bfbc8e0caa39768c724dd frame00000634 +a10ed7ccc8afb24613906c3a2da8f917 frame00000635 +e48d283fc18180364882c0a55293d169 frame00000636 +5708a05a5433fbcfd4a9187e2462e61a frame00000637 +77ea4f0f4d0a7c2145fea5c8f76d1035 frame00000638 +6ea0502568c4072f19714eedbe31bdc6 frame00000639 +f0c226b966108366e729afa93c97c450 frame00000640 +0ca89796b73420b300dd464f792c4efc frame00000641 +d2c39f527c145c41599a0d07a882b660 frame00000642 +051cae2fe164bcffb21d70bdfa7e0a54 frame00000643 +36ee78c2f0a465ffb40f4f4b0763bd13 frame00000644 +6ca2b8c1b0b4cbb3ca579eac76bc2ec2 frame00000645 +ca6b93eb0d9961f301f2f59b938b91e1 frame00000646 +ec73ea7b4d04f1032f7c01bf5b5090d7 frame00000647 +103b80b80386ea719f958cffc305d123 frame00000648 +f043c25ff781ea58e7be6cdf000f6abe frame00000649 +c52c8ab59d9af226f07ebe5dc5351363 frame00000650 +b184aada1a3886de13285d602a437632 frame00000651 +44bf900ba0575e24d30e8e3e09279d9a frame00000652 +12eb070159822c249dbaf90653702a87 frame00000653 +94c9021aad8be757f3929086282bd7b5 frame00000654 +70c7f0af43ef1e929089c309eda30874 frame00000655 +34759f7d78fae817e28b41575f56813d frame00000656 +364c47de7212655acd38f9d1d22fc04e frame00000657 +d4626645e84ed7143eef1979bcc7ee1e frame00000658 +f774b79e96e26571aa75816f9aff4c66 frame00000659 +1381ab500a4092ef9ddc23b6dead706a frame00000660 +9caa664f2ed5985795cd6a6c2b11fd59 frame00000661 +bc10a9a93b03920cd55ae93dfce69129 frame00000662 +dfa8185e29c7ac13966d28f8a0338f70 frame00000663 +048f8213294c971cb8a51bd19f247e8d frame00000664 +c2724bbbdebda0e5bd171e75e425c225 frame00000665 +f2a2fe3e1f4ad61aa14606bcfdf45359 frame00000666 +3d40a8c12b0060333a7161774f19a951 frame00000667 +ac9d4d8568ad9f0d5b53db9beb9401e1 frame00000668 +2871e210cf2e0632a3281eb591f1ba10 frame00000669 +280c4e38c073371442bc19572477011b frame00000670 +cba056ed7a57f7250e38cf7768ac8688 frame00000671 +eea52ba59ff21a967affa6cffeafce08 frame00000672 +56be3442bfa4be4266b219a45f64a333 frame00000673 +c65c03b6d985f780616af20b50030573 frame00000674 +7524541edc3dcd8b864e706ab49281a8 frame00000675 +6497c13804a80fb7c87e21cb27e332e1 frame00000676 +cc4333e96e77f07dc92f814cc30d0de4 frame00000677 +c50129656028fcc6fb26e8f1f2157a82 frame00000678 +1ad17c4b6a564a48f6f89f05ee663253 frame00000679 +66936bf99a762e53a782f62cd5d21313 frame00000680 +a04844e2483ddc57953fe81f1b319aa0 frame00000681 +dc24fd378da9a06b396eda61351e9c10 frame00000682 +cd2f6425f214f83a1ae17a51fd63f28b frame00000683 +dcdcca921e69bffe55b433fe2fc58785 frame00000684 +609e6a47dce57de39d3019a3231a5ecd frame00000685 +b988a18a44cb1ddfc08bc498b0fcf7cd frame00000686 +77a66674f80b5239ef8f6dae7f720c6c frame00000687 +06ff64a8ffe09b07640177db18ba9150 frame00000688 +78d884887cb60f3e33c6f315c3d45500 frame00000689 +61135ce5e4e526e12ba61cb4cd3adefe frame00000690 +87029505d9335aad5f57a27295776621 frame00000691 +5c7722ad7b02205d48cf79c0d4d065e2 frame00000692 +b619252bbd214514fd8dca2b91410840 frame00000693 +7b7cea64ef67817beb31c820d05a6719 frame00000694 +0f67eb860dbf5a45ac8fb6a0b97fbf07 frame00000695 +6247ca0753a481045cc03162de7c70bc frame00000696 +5dbe8457c3a0fac5371f16258ec07678 frame00000697 +105e2fc982025354a1691465f0f797ca frame00000698 +fee98aa3849386837e23cdc7a99f9782 frame00000699 +30d13b5314664404ced031017c85baa2 frame00000700 +19115fda80135f3a48dd9e849c9c3d67 frame00000701 +b02955525ea0be615c67950fc905d9f2 frame00000702 +50ca87f0d3e06c56c25e55cce43f93f7 frame00000703 +9debb0ed567d9d73decbee3fc9d5d64b frame00000704 +7048d93fe13b0b71d2e1f034ea7385f5 frame00000705 +5a018beae83517de113dcfc735354886 frame00000706 +72478897ced75df7bfe41e5fda3ac5ea frame00000707 +b718c8dd8b555f89d0554594753a5c1f frame00000708 +ff59e98699fcefea332a461e52bafd70 frame00000709 +15f265e7ab629d030ce954414e6f01aa frame00000710 +4977aac4fa5c850047e06ce8ba66df96 frame00000711 +8aa3d4813302bdb40206ae59deaefe57 frame00000712 +15cb9739a3ddc38d036738867d058ac0 frame00000713 +5f50a7ecea15e88b5b7d3205c8ec21bc frame00000714 +7ff05a46dc6ff3d6d65f7c1404a54f6a frame00000715 +31c7598bbb7450326e0eb3a2b00ed788 frame00000716 +d2dc576d952be2c3d14580093532a7b1 frame00000717 +55f01bc0154d55b715a3baaf75271a3a frame00000718 +98eb5754a09a9ea0ce9cadc15c658ea5 frame00000719 +e7fa536fed5ed361f7fa2c261a42d97e frame00000720 +550a942495494fc0c15aeb594f5f7a2f frame00000721 +72f645a8cf963da306fc84494da911a8 frame00000722 +610473a2806bd10b984f6226974821ed frame00000723 +0bf6b54ac38ffc671cdeb3a91af59ec1 frame00000724 +4c25288e2f4d13343f2ef0a366fcc19c frame00000725 +a5880ca276b9d701633b3b997c7795f0 frame00000726 +cf1b18f77d5b9ee2058b7089984b51e6 frame00000727 +512a5f3f7e7402db9b668c6632f8b85c frame00000728 +d5db98fee8821760caaeb06a32b32365 frame00000729 +f7fc72e10563c38ff96d52a6e9456e6e frame00000730 +3511ad1d5e3ddc8637ccd6730744334a frame00000731 +7b67f7b66561d824a006ebc52b0e99e3 frame00000732 +151a177cb3b8a5cc36e16006a4885d7d frame00000733 +6f88ab9c4c02db8e6575325e2064e63e frame00000734 +f96bb5e52fa2f7859b8b8195e4268cfd frame00000735 +6c0ac1c587785ce37e59aa95558d1c9d frame00000736 +8dea74c4a1881d4339538fc0e0e19d23 frame00000737 +08e2cb7e0fcf08d49d86cb035500acb1 frame00000738 +343ee0fba99dafdeb3935dd47602003a frame00000739 +f58fd0ea1d6a9fe9a0fe224b53d567c3 frame00000740 +4ff779660bdd3635663e1682e11b9ec1 frame00000741 +e5e69f6ca60b2f705a7bde77d71fbeef frame00000742 +b12c5662aed3dc3477512238cfd0e432 frame00000743 +1d993319bf692d6aa65dfc301d142e7a frame00000744 +9a1dc6134837770700470aebc7e7efa7 frame00000745 +972ff3dcc7c24844eb1f726a21f929c7 frame00000746 +f3543848f6b87d693312efc0dc4d2919 frame00000747 +1fda9b882c7d9effb1647f491ecd3478 frame00000748 +c003c5d49a764a4d35ca7fcaf864d201 frame00000749 +2b458b02aa9c4a120e0078c7ef44e153 frame00000750 +01910c18c35aadbe098112537e8b8755 frame00000751 +c04051b96e4f365004296ce21886158f frame00000752 +dd6d12e0d8b4541897aae8bffbcf84af frame00000753 +5fd8de7ae82a30b78bd84210dddd2ea5 frame00000754 +9b574702329a10ca847e6ce6547215ea frame00000755 +13f35b084018dff97e375a6ec30f1cd6 frame00000756 +4d7a1771d040774f464ffc0c3d7f1e5b frame00000757 +c204709e130cac88209e36d342e9d33a frame00000758 +c89a8f46e0e7822c8fe007fd1a0f9716 frame00000759 +f031bd234df498483629d77ee148eb43 frame00000760 +4e200a4594295223581c0cb84f1f943b frame00000761 +32be45d1f335230f51d7b902ca6ad1b0 frame00000762 +f0bd26f73ebb4716646b6e7e6192f797 frame00000763 +f0bd26f73ebb4716646b6e7e6192f797 frame00000764 +f0bd26f73ebb4716646b6e7e6192f797 frame00000765 +f0bd26f73ebb4716646b6e7e6192f797 frame00000766 +f0bd26f73ebb4716646b6e7e6192f797 frame00000767 +f0bd26f73ebb4716646b6e7e6192f797 frame00000768 +f0bd26f73ebb4716646b6e7e6192f797 frame00000769 +f0bd26f73ebb4716646b6e7e6192f797 frame00000770 +f0bd26f73ebb4716646b6e7e6192f797 frame00000771 +f0bd26f73ebb4716646b6e7e6192f797 frame00000772 +f0bd26f73ebb4716646b6e7e6192f797 frame00000773 +f0bd26f73ebb4716646b6e7e6192f797 frame00000774 +f0bd26f73ebb4716646b6e7e6192f797 frame00000775 +f0bd26f73ebb4716646b6e7e6192f797 frame00000776 +f0bd26f73ebb4716646b6e7e6192f797 frame00000777 +f0bd26f73ebb4716646b6e7e6192f797 frame00000778 +f0bd26f73ebb4716646b6e7e6192f797 frame00000779 +f0bd26f73ebb4716646b6e7e6192f797 frame00000780 +f0bd26f73ebb4716646b6e7e6192f797 frame00000781 +f0bd26f73ebb4716646b6e7e6192f797 frame00000782 +f0bd26f73ebb4716646b6e7e6192f797 frame00000783 +f0bd26f73ebb4716646b6e7e6192f797 frame00000784 +f0bd26f73ebb4716646b6e7e6192f797 frame00000785 +f0bd26f73ebb4716646b6e7e6192f797 frame00000786 +f0bd26f73ebb4716646b6e7e6192f797 frame00000787 +f0bd26f73ebb4716646b6e7e6192f797 frame00000788 +f0bd26f73ebb4716646b6e7e6192f797 frame00000789 +f0bd26f73ebb4716646b6e7e6192f797 frame00000790 +f0bd26f73ebb4716646b6e7e6192f797 frame00000791 +f0bd26f73ebb4716646b6e7e6192f797 frame00000792 +f0bd26f73ebb4716646b6e7e6192f797 frame00000793 +f0bd26f73ebb4716646b6e7e6192f797 frame00000794 +e87500cdf0d0e1a3d5e034a288a78ceb frame00000795 +a310408d43d10e225ca2f148b5edd99a frame00000796 +ccdfcdb02a7a65966cf5b8fefe09aac4 frame00000797 +722ced5860e258461dea6f0b988360c9 frame00000798 +1d9b4133452698124d42efe112add35f frame00000799 +9b66f54858aa7024a47e0a62fe42aa22 frame00000800 +e0a87953787cababaebffbdd5a1fa6e1 frame00000801 +ee34ac8320c9e454d20c47696223188f frame00000802 +47c17ffade73933669d2fe461281ab98 frame00000803 +d8848609096b40212a489859e44a4b32 frame00000804 +a0bd789d6cc979c3791d482a824e9d47 frame00000805 +18783fb416b4b55320dada04d5ed9ed0 frame00000806 +ded05ae927020fd680306723c9028434 frame00000807 +1622582e37bc02fdc6d9e50ac33ae0ee frame00000808 +e0192b371b0d3a9e3b873734b9e3d003 frame00000809 +86d9f606d0c83eb52ac7c0fd928131fe frame00000810 +a3c1c68b1f970f4f650190cbcec32613 frame00000811 +7d61c77f0c54370807ae68737ce600fd frame00000812 +01e4f4334d8e8ba64cbc6847f55bff79 frame00000813 +fbf994351be5d0d9b28ffe7826525a33 frame00000814 +77a2c0d6e5079e341851f77e5cfc9937 frame00000815 +3400657398ca45371214a98cd6d79913 frame00000816 +c8296c6b6a5d209c242163c40128a3b3 frame00000817 +584e04b91830d2fa85ef5b2d9e702083 frame00000818 +7f5aacccf6b562e3f2648e3a2ac0738e frame00000819 +c3131e9616bdff8d40a117e471bd8f49 frame00000820 +71e091bbfba4e1920ea076807000a568 frame00000821 +e7dc8eb34032b70e065cd17c0b9b732b frame00000822 +9d0f5282781084360fcf2f6fa223ad99 frame00000823 +c25a08e9a659d1ffcb719187d7824bed frame00000824 +0af509696d59d1be7cae9ba35cdff082 frame00000825 +f6c0effe30511c980044103eaccf571f frame00000826 +209180ea825099fd96fa54d77ffb005c frame00000827 +ab94f17f5eecfc0110bdffd3fee80fbc frame00000828 +b8835300de36cd54eab8b3db0c14cd44 frame00000829 +651cfcf66f76273c860137460fe96305 frame00000830 +6b69c63cd14e8afee1d86e51fcc41fe5 frame00000831 +32dfaf2e2f550fd283707fdb305ec043 frame00000832 +23b396e330e742efd099155b2d70bab1 frame00000833 +bed7d53d8b1e39a7666c9c9943b250fd frame00000834 +47e7c5823150ce58e0f7b6b6e96919bb frame00000835 +37893e71e040506298857e2538be7e22 frame00000836 +0969d3e0ecf5f3f6caaec03e46edd957 frame00000837 +64423e9e7a261e1cd517502103e09204 frame00000838 +fa431dde921348e22fd0ba90af2cee49 frame00000839 +a6a3389f7fbd9ceb5150a95c3f49af7b frame00000840 +efa64600aeb8c9b150d6aa3c52afb32a frame00000841 +6ba8b630d21104e6ae637cd851a7eeb6 frame00000842 +527e926e54709be1984f30843496efbb frame00000843 +63d1933ff2cf61fe93e618f9de298353 frame00000844 +a34f216dc686f299109ff7df442500f1 frame00000845 +e324444389fffcb225ed5d8881dbbefc frame00000846 +55041a5d8f4c969319f868a595d4dd05 frame00000847 +40b114cc4978ad2ea699de596e09c7f7 frame00000848 +8cd0a58e6c0e9cbd1f038c2541ec7e04 frame00000849 +a2ee2afcd1550e0ebea3d3dbcec60caa frame00000850 +3c0ae3089a8698e9e063a20a8e6a7f88 frame00000851 +bff579f477d6364d887e626ea78e032f frame00000852 +292e3f22a4c6d471ca49d1a40beb5eb9 frame00000853 +36c3367ffe1bc00d4afa379e9ddcd3c0 frame00000854 +332ec86a109eee1c8ae18d403f72041a frame00000855 +e6f2160c8ed1f0717d7a31c521ff493f frame00000856 +c6ecfc3ddf4dece01d5d9cbeef173bb3 frame00000857 +12db1a72e7a4d57b5e7ce0bbeedc1004 frame00000858 +3185e951f38f797da3d5b7c4b545318b frame00000859 +c416f5c21c7c355e3f8d6564316e22e0 frame00000860 +8f622c052dc9f55b513792ede713dc14 frame00000861 +529b47a59faed5728323fe150e53d42c frame00000862 +19c0c0c9ef082ad1bd10daa4aa6fcd6e frame00000863 +5e4e305aa2410a11d7bd3295c48e7152 frame00000864 +8e671ec39f4e4896750f65adf7544030 frame00000865 +e4c9186eead114f25510e86aa1cd7c26 frame00000866 +2e5fdd6e1f026025f532b4aaca1bf79b frame00000867 +2672c1df35b5f20f1f4c9a3253eb7f64 frame00000868 +59e506ecd18c1fe15e4cd740188c5a1d frame00000869 +6b0eb6b6b544a29aa9ba426fffe756fe frame00000870 +daad087584adb417a3a46cfec199f407 frame00000871 +dff892d532d6f2f06bf722b855ddc678 frame00000872 +c4dd4c627594d8db06656d1c35b2687d frame00000873 +3393dbb3e24579747c3747c3bb4d40a6 frame00000874 +033cfd7705da02e5239e0e13b6615b77 frame00000875 +3e8c60c5a759f04f2e25f5e097dcb8eb frame00000876 +a06a38687bdcaf9eeecf9719c79ffc90 frame00000877 +ff61592a6ffb8d8cba5a2a80cb76a7c0 frame00000878 +1489d3b9cfb9f1109efd878c8686a1b3 frame00000879 +0b7850684fb44f86928a3f1fc9c30bf6 frame00000880 +364a456cbfec5341e31a0c4548d6d20d frame00000881 +8428a283403af78136b9f0e1b31cdc4c frame00000882 +b77a174d20cab7230cdbfe3ba92cd41a frame00000883 +17694b90a2ad4d11489e0f6b20835a09 frame00000884 +5045163352bd7ee7bc81d209f4591709 frame00000885 +b7e18feccbb01cec710c3f1480218953 frame00000886 +60698961cad60677e67a3c393c35a363 frame00000887 +010fab4e07ba22701e90cdbf1628ddc3 frame00000888 +df9a8f0d8195615f3dda91a78e17294d frame00000889 +0b1486ac6cc27b068988d226da854e8d frame00000890 +dfe71ed62f91b40ffada7660a26cfb69 frame00000891 +b7055ce93d28518bd39a5cb2dcf271c4 frame00000892 +aa4a61e186399dc81f7d90be2971c39f frame00000893 +0c7068fb82cdd9706efee10fcbe13fef frame00000894 +3718249c490cb431b7d8cd4efb29bd94 frame00000895 +7e01e6b7d3b8d953852cc13c07535b76 frame00000896 +fe4a93851d9394435dca85c341fbc884 frame00000897 +5912f62f64b4303addf08baf31d2327e frame00000898 +c1a3f5dcd318fa5aa6f91e9a2ad2fdae frame00000899 +ddd42c10f89b351166c7a20146afcb0c frame00000900 +af497b0a1d17db7d333ce143db56224a frame00000901 +a1d1f766f2974531699e56532bb9353e frame00000902 +e06661c1a9f9f5e56f5979a79927a95b frame00000903 +c2d8aeefdd5bae548f1ea66dc009a380 frame00000904 +0616d326128e3425192372e97cbb40c4 frame00000905 +5fdd4b343b2323b6b15691eae6dc3507 frame00000906 +b621ca700d886740b724c1c6790ea06f frame00000907 +1b93aeb85cacd673fd5ef6aa667adb6e frame00000908 +58343ce24aabf65042a14f70d3a296da frame00000909 +3e984a3d268642741b62718a0a068768 frame00000910 +2bdf182a7bd280678fbc9f11d6cde071 frame00000911 +e20895b3da92f5c36d8f6f2b42183a88 frame00000912 +866e24cf9bef8c4a37eeb0bebab0bd7f frame00000913 +f461abfe8a79d9702324f6a0c8025951 frame00000914 +d027cc1616352f263c8d204d48bad905 frame00000915 +aa123313de0b713365de33998f77c255 frame00000916 +2e2376f3e90231f0195196f359394ddb frame00000917 +24e43d625a8185199be263e60eb48f6e frame00000918 +b290b1966c9b936ae46b89310442d068 frame00000919 +7ec939fb6feb4c8d2a87b18178e35e5a frame00000920 +6706dc14b92fe97286f25b3c57b44e1d frame00000921 +89f6411ed71992a438656785abe3e004 frame00000922 +83e2cc451dd1e3cd4dc284233fbc6718 frame00000923 +955da31a61117c25172401854e6d465a frame00000924 +c90fbc8c25d64e0cdbf5656dbd510349 frame00000925 +a6d360e75aae61188b1205dc68eda649 frame00000926 +5f6adb40cd75bf4bfd66c32dc05f0493 frame00000927 +3c87a25f60fadfc5d4eb0bba924b235b frame00000928 +451a17e5fc4cd17004b3779ca0006009 frame00000929 +7e2030222f15f73cfcd944254ca9018a frame00000930 +79b7397103356760daf37b541b8b3dfe frame00000931 +8ee0ea0383683fe29d1f57fae4facff9 frame00000932 +a5c3c040fedbb0e284d0c3785234e256 frame00000933 +60532652210d2902d70143381156246b frame00000934 +57e8e349fd2d5d9956fc1bbc2cc6addb frame00000935 +fb172cdeedde07a3c2d66428cbb6347d frame00000936 +00d403a2cb428a7e173eb404c97d7c85 frame00000937 +3b179769ef281d1243a1e832be42b58c frame00000938 +e26144c2f23896a60436b428d367027b frame00000939 +a5eae3c58efcdc951dbcd80e7a71a535 frame00000940 +be6cb083ca79170ba3f6e65666f0dc27 frame00000941 +1f1e9c9a6560bb7d7c25e4892d104978 frame00000942 +9bf12bf5009e8189e65f19a74c542077 frame00000943 +b3425a37d22f67430546152f864c9cf5 frame00000944 +14f8517ffb70c596277e93b09caf2bda frame00000945 +ed903971f4f22f09644d0a86a9c30caf frame00000946 +11f4dac62437a428a5ccd409f19e94fc frame00000947 +c42a33a2724a8c7755df82a1be0bb03e frame00000948 +273c1316aa174b1ebfce43101ad3077f frame00000949 +0b80bb0bd580905a114c249ac2f93b43 frame00000950 +175af7e67b4691e10b3441fbcad7b454 frame00000951 +a42aba044eb0157b1da30e323f09ef7b frame00000952 +d32a64ed99df4a6caf34f63b99d7257d frame00000953 +84dc714db5154500b0fe226650e608a0 frame00000954 +7d82aa1349f8a670bbcae7c3a85baae3 frame00000955 +c65911d89ae31eefd6be56914d420a18 frame00000956 +c52ce460032757a64796c7695f65909e frame00000957 +16596288286512382f337fe7eddacda9 frame00000958 +ec1dac5a0b7af620bc08c125d9cc0eea frame00000959 +f632d946913dde23fc5baba44c9cb280 frame00000960 +fb9f4607c263f997b3a638419097750c frame00000961 +794ed8d8d2708281e022a27dc62c32d7 frame00000962 +2e7bdbca9efa90292e518abce58b588e frame00000963 +903bb5f7784cd713dad6e6cda2a0e7f3 frame00000964 +e4676ff73d9a39fd345c20ab31547135 frame00000965 +b94c6fd39fa0c9f4e1d37bd97349c757 frame00000966 +dc4e0b84717b264380d40178b5c5725f frame00000967 +06bf17d2e14e7f14d9ccba3064f59002 frame00000968 +31980c17cc2f81fb80265b8759ade38b frame00000969 +137b2793ce749e549ab165785754d50a frame00000970 +a92a1f341747e711e6dbde86a6a42c39 frame00000971 +7505503cfe367d05cddd52134e11287b frame00000972 +da425a41694a0694c72dd74d912b5ad2 frame00000973 +076898027d14dc95ad75271da6dae0a3 frame00000974 +a592e0c950b72bc5b58a3a86505d0ca2 frame00000975 +d720921ecc7aeabf5f38735a2296d47c frame00000976 +e535d9508964f01ae9bf41fb1c323c3e frame00000977 +a404c089bc28f29263624be1ebc533b7 frame00000978 +64af545b71244de03c9798e7c1a3561b frame00000979 +003e5223832f625df87d09727601c5ef frame00000980 +b14b161d6b58f151d8ad017a3ee45b04 frame00000981 +e1b2d6ad76d75d09dccfca0365f71196 frame00000982 +1d51cf7a2df30e16d6ca546771fb58c2 frame00000983 +39e987815eaeacad060b092441303e18 frame00000984 +56db6f47b38496b082c38517bdb58617 frame00000985 +15dad6a73a8b1b8e95d1991c97da470c frame00000986 +453467744d133dcfe369d278ccac0aef frame00000987 +1103e06cc6fdd5e56d57dfa416824da8 frame00000988 +eb1879dc9130238857d273c2eda20b72 frame00000989 +2c8851aa32655757ecceb94742b16f35 frame00000990 +92105beb3921385959a2ec42445051f5 frame00000991 +2015eebf9f6a189c8e99d67ec7b2c867 frame00000992 +a1c160602d16c6a1654360e66c7bfd6d frame00000993 +8be8098aab86c4e41216eee0a8e5389e frame00000994 +440eb094026ecdafa60c582775b8ef7c frame00000995 +d052e7b9dd3fa0383cb0ba9844461017 frame00000996 +f0c710fd821066aff6b2dcbdf7df1de6 frame00000997 +d852d3a24b0c8d957b2f52bdf6462a2c frame00000998 +6b2cca1b6c305144007bec4cca01189c frame00000999 +ad9c90191ea104ace1001dde533a3a25 frame00001000 +6afe6f794731d6f6b4c02cd6b4d131c6 frame00001001 +68e4b09ed2ccde1358cae6fa620df067 frame00001002 +234602e882a6ae05b9f954d96617d9ec frame00001003 +21b6dde8c213d1fa92c52b726119f4a0 frame00001004 +5d8717cc9ab42f10f346667e1734ca1e frame00001005 +8426234644b66d87bd085e5b979db6e1 frame00001006 +40a97e7866acf18aaba3af8ec465ba03 frame00001007 +f4c9751fc4dc57c0cb6e1119fc6edeea frame00001008 +87e510313750696870eec5ee955e80b7 frame00001009 +e5184a9d2676dd030903dae97a726917 frame00001010 +a4b009484e5af18717fc7d48029eb008 frame00001011 +b6b8a3292b60cf956f42e9a1f14d59a4 frame00001012 +abf5749c0f7f46d50cb606445dbdfac4 frame00001013 +07b2914c454133d554ca20c06b1979ae frame00001014 +5328f26660037986ee8ddba0011847f3 frame00001015 +8db3acfdbeeeb72157a828314826d8f2 frame00001016 +4b71e13b7775fcb08142d3e669caadf9 frame00001017 +cce6e5893828f8e213cdd37427ed3e76 frame00001018 +ef9b30e13ad3d821d73b6e3c5f4e15ac frame00001019 +ffc59608a1e6f5d6ed8a1be9dcef329b frame00001020 +6094f43827e630677a0bbccda3869b23 frame00001021 +49eab0786d735ddffb81d88364908e27 frame00001022 +383d1de89ace6535b01d7709f03a618c frame00001023 +c2728d8466c926b847bb346f73462254 frame00001024 +6a962a1f5063430eeb020ae4789c8a99 frame00001025 +936c8c795630ffca03c3e68ca6702d8c frame00001026 +64368f098e97f40fc8ff0063c2f8df3c frame00001027 +8e896cf47da3df3e83f927161185fd5e frame00001028 +a42664a017dad7745edb1fe3f94812c4 frame00001029 +d5cbf0597228ead0a48ec5058a203a39 frame00001030 +5d46cea91ad89d44db24d9f0567fa4a0 frame00001031 +0a3e5a2b299a6cd795d1de8391a24e12 frame00001032 +ec127c7c803a5de310b88af65c27c238 frame00001033 +a58e57062d6beba3c964c47989b7980d frame00001034 +8938ae90f48928b2bd8f357f7b0719cc frame00001035 +9e423f330afb5a0435225c308fb934e7 frame00001036 +30fac2e355c55430832f9287a6063265 frame00001037 +58cbbdb24a224cd39ce5ed25470ea5f3 frame00001038 +51c5aa99ce08fc22d1e766eb710b6a02 frame00001039 +24450782890c50e530edb1d0eb37787b frame00001040 +91da1140cc170586ca011e4be0f61fc6 frame00001041 +48006e7f96041ce84613286e8cb5b081 frame00001042 +0567a96400bee7592d67fe23a8b9e87d frame00001043 +f6342cfa334e9a051ef6196cf0e132bd frame00001044 +f5bdb50b47f67d44ad0bfe19e839d03d frame00001045 +5bd2ba71635c24b34e6976e5f8a9b618 frame00001046 +9c218c0e09d6edd6c9f7bf551500974a frame00001047 +0ab5e59b9840827e672e99af35a317be frame00001048 +b620f743fce6e44bed1fd9c98e8be0f3 frame00001049 +2f9b48c0a902a8c46b652007072381ef frame00001050 +eebea9c2c06bc18bbefbf623515c506f frame00001051 +b38a9db1ea4afcf6a655bf4e1309fdaf frame00001052 +a767c13ff920f0fe7b1ca343547dcf98 frame00001053 +b86341c7028a85b0c2c17d2514faad62 frame00001054 +2258702ee4fab6295f453804c5bf5333 frame00001055 +85c099004d114ccc49927bd835525c65 frame00001056 +580261c10e5148ef0f0f12e90130b303 frame00001057 +b3b0921b3dfb5757d4e054cedeb41fff frame00001058 +bd6db29c759336274e30687725ad7fc0 frame00001059 +ab9f79f35d8f1df04f08ed16fa055aa0 frame00001060 +316ff6e1f4fb0c6e53a6267d23876008 frame00001061 +d0163446b79d704a8b66a2d8b7a1a516 frame00001062 +1687381822fa9da73ba6958d1054e883 frame00001063 +356135fb681884cad9d540ffee42ccd5 frame00001064 +50b3a5f5fc589dd22d7559199ca2acfe frame00001065 +45c56f026b1121a65b87d93111703e75 frame00001066 +70f35e49b526503a7bead7951bc3ff76 frame00001067 +aec262cdee27a9eb01f00bbed086f734 frame00001068 +473b3aeaf5d6625a6d13b1f3e271941b frame00001069 +c6713a9b4f9f4de91b2649d53478394b frame00001070 +c492082ad9c15079a9b4a2b7456512c8 frame00001071 +b9f6100d6b39e0299a8db5504aa692a5 frame00001072 +0035f1b513f3dd1ef9d7b50d087271bd frame00001073 +b74423ab7b6d63c5ecd30f8daccc34a5 frame00001074 +5c74e7d21d6f3530d29c5483ab25e94c frame00001075 +aeea335880b5b8a326f225bb6cc7e614 frame00001076 +8d265784e4c3e58a978b442e700bb78f frame00001077 +a344d1c40af311dde9da3459b0dc8d52 frame00001078 +e9092af7744c99cd50260e463891b08b frame00001079 +a3d510ef002ecdc9cabd196ebdf70c16 frame00001080 +92300bc97645443f9a831fe77f4e882b frame00001081 +e8bbc91da10c736cfd41ced16febb281 frame00001082 +75f242902e01e452874e95414539ac0d frame00001083 +9d0e8cd84d49ea81eabd8e7888753bcd frame00001084 +3da508142786ff265b5be6ebb4a22bea frame00001085 +800a388d9fd374403c87f00239ec498a frame00001086 +66ea04ae9f851f868531372fd69afcc2 frame00001087 +35487ad1357a89cea74730058074a3cf frame00001088 +219e2c8b51c680134d0cb7465597b4b5 frame00001089 +cb6f27d66b5501b1f0d64ab670308629 frame00001090 +4276f5207c97b5892aceffe6d69c82b7 frame00001091 +9bfdbfd5959cf98c76460a0b629d8c4e frame00001092 +d44b1ecac808a2499e0d30f158f0344b frame00001093 +ff53efec41c65fb43a82c13bbfa16e09 frame00001094 +3fc1f048761d89187c5b9b6d363be465 frame00001095 +3c708f31f0c4b907322e90fe58e94613 frame00001096 +6cc4706a5d26355a1a5052a2d5b14c01 frame00001097 +38f0bd034623f2d11fa0b8b6914acceb frame00001098 +0fbbc1e01a417b465d30a9cdc1f0b4b3 frame00001099 +4666ccd052808d678d17c8f5032bf273 frame00001100 +2dc6bb185714ab4e000626b7d3e46713 frame00001101 +75b17c66083ae9cdc8a92d9e1398d7c1 frame00001102 +852014090cc7e3ce30d7fc0591428113 frame00001103 +41a842a189e82a027a4516707786e22a frame00001104 +5a8ca10438908011c0883e7ed8ffb776 frame00001105 +1d80972e37652483d689447ca47b715f frame00001106 +db0d8d095d2d42908aebe1a0d356254d frame00001107 +c66a9b3ef5e202bda6efc621b6b918e9 frame00001108 +ec7dbb602038f42b8a8fcf9d774f3011 frame00001109 +e5a0f9e21a06de6cf8dc38ca6a2c25a3 frame00001110 +a76a941c2cb3156323ca03e9e1f7674b frame00001111 +f318810c8cff1912650e56c5bc01621e frame00001112 +f73bf5ecd84afd3655bf02d7424a9420 frame00001113 +ff1070bf45def83c2c2af04577b91436 frame00001114 +cf5368690fd36998c417361095298c37 frame00001115 +de94f55b73c28417945c40fbaff43221 frame00001116 +0d6068eb1fcf270a2e8348ea819b14ff frame00001117 +2a2cdb619ccf5684086796cdba3c3de5 frame00001118 +cd83547c7cde28811b475b6479cd0c9c frame00001119 +e2c8f383623433d7fbae5c9b89b08a18 frame00001120 +a4a5cfeeff8c06a2e29d80d2bfef85c6 frame00001121 +63e3760c1499d00906dd4c603f256d6e frame00001122 +74671e795a5a27fa306c7ce743687718 frame00001123 +75675924b442fbdd29271d033a5711d0 frame00001124 +7237c9ab953c0eb9e056a00e72c62bd3 frame00001125 +9f452b3d50038ec764cec4f95f938a80 frame00001126 +c251b4555b7de6ebf5d9faf2327b3cc6 frame00001127 +7c266ba059cd1e91687937207781f9be frame00001128 +78186e9c6cb64c9af3a79d782e8970a8 frame00001129 +1b34d6972d73fcdea61c00a2ab8e17b8 frame00001130 +5dec44e24be30dcf76852f642030f058 frame00001131 +20a1d99ce7b3c221af31e53fe402e832 frame00001132 +b5d92e280185b13954f2c2ce30f4be60 frame00001133 +5df9bedf8da00e8ccadf907e5721ee15 frame00001134 +cd004248cdc32264824056804a0c6030 frame00001135 +fc62f89447466480efc22b4589904d00 frame00001136 +cb29b97a33523a0f9e6c641d10754cc7 frame00001137 +20a6f430c9ffa1ecb4d48cbc6a28c7e4 frame00001138 +8db1be0d741ffef36683941b36f1ea6e frame00001139 +1c54338fd002a979de444b1895f4e074 frame00001140 +fbefb3add34f461368bc7f3f2f656d8f frame00001141 +1f7fc67de67f4b6f575414668d5a8257 frame00001142 +a0f91c69d83b3e920842ca69b4f225f2 frame00001143 +230a2cc959f3d02167e836d6958f5ced frame00001144 +226347b509ff61c132944486459c8f94 frame00001145 +beb4332e036ddec556bdfa9066e07aaf frame00001146 +cd476f77885235c5b895ec1ead59c5d6 frame00001147 +85066a9110361e808d4b730417834b8a frame00001148 +9e8599fe0a69a76caf151053c43e09b4 frame00001149 +7c5853a0c68c5d70705244bac19a1625 frame00001150 +f7a75bf2edd5b3a0bbcef9ec6b206798 frame00001151 +5f6e3c39054b4fd0918206b37c73e438 frame00001152 +29d831bacc896d57c7f48c457a4c820b frame00001153 +bd9c652947da3f340004cb071b083bda frame00001154 +dd74c3e18de9126330564738a1dbba4b frame00001155 +45dd7a50bbecb787e3c7fe5efbbf4cce frame00001156 +5b0099ca26802bf34a320d3c953b96c9 frame00001157 +12443b1f8b9d596e167cfe26cc4bcf43 frame00001158 +bece461411c92db28947735be34eac10 frame00001159 +b956cb07548a9b68c7ce4dd4816e700e frame00001160 +0eebff7baa31ae18b184b154ecc14bc2 frame00001161 +1f0e4b7d424b5f3a60ad57e1e6c42fb0 frame00001162 +bd077b8f7579b4bc005ef025ec13e694 frame00001163 +340d36ff457b57b53a7759d1cc720461 frame00001164 +8e010ccd3d2cf1f7c927dd683a482e62 frame00001165 +e22613169d5e32d656730ff28d536f08 frame00001166 +63fce98ca18dc3b1f6eb46756f700515 frame00001167 +b41ec552c02b4a31db65969d97209ad7 frame00001168 +2ba03b08442458eb3b7483112d2637d7 frame00001169 +5d711a8f26bd6c15a791d5b9eab4148e frame00001170 +b63fd0165efa8cff7f00cfffb08acb02 frame00001171 +9cd4d69b64b3ef93b035300b80b0130e frame00001172 +e772e77a48251b676719aa6b1ed5974d frame00001173 +5132de67678814f6a88ef2fbb5b599e7 frame00001174 +daaebbb57b15e2ce5b2c25e0e6e6b05f frame00001175 +2c16f784bd7b83b99cd536add6b45d0d frame00001176 +88b5b975d8dcc9754cb532dc7b47a8f2 frame00001177 +688ba9ae06634dece833d65372e3baf0 frame00001178 +e00f9130a182a1e85713cf4ce64e75fa frame00001179 +c1d2b0809073543e79f012f9a50ff0e9 frame00001180 +a260fecf267c273c82523a4a9fee1603 frame00001181 +2efcdf454d220c4983b3cd467df167bc frame00001182 +87e971519b034f7b2a11378714857af5 frame00001183 +e9188aa9e690e95b2890b9a8c3cd28aa frame00001184 +0bfc132a287c3168394a0f72b28675f5 frame00001185 +ed787d8e749f77bc30ebf756d34b2cac frame00001186 +585531d2b81daabe5472a2434c48875a frame00001187 +7c611530b3a2ae37885215f3d3f786a2 frame00001188 +2e0b80189c479bae996e49d4a5ce71ee frame00001189 +11b6a2567d8c80683ca02a7c5ea3a4aa frame00001190 +696137ecf094b7acaf55d46a54b448da frame00001191 +a1bc3c5ad837ae924c58d7e7eba240d9 frame00001192 +5624c7d86274a80586021711e0b7bb86 frame00001193 +d5363d41210b146e4731710b60c8ce1a frame00001194 +cff21c99cbae1b91e7faab3da9fbcf1c frame00001195 +ee7d8f8f3dfe9a60aa6b8e78ef27662a frame00001196 +e15e2a231a64ab8400c7dc558b8af603 frame00001197 +3d34fab6e591d089541f7b2b19bc417d frame00001198 +7098addde6c7a9f68aea85c1c21dcee3 frame00001199 +4564a998fe68655fc2efe246e21e67e4 frame00001200 +c408413c979a184680895f36cc1c508f frame00001201 +ec7f20aadacbc4382333bc648cccc1cf frame00001202 +7353d4686f1adff1beccdaa42596c619 frame00001203 +4674a8d7399b1124cdb6e3f7762bd835 frame00001204 +ec74bac81abe6dcd9fa9c812251870e8 frame00001205 +324dd0a41c1e6900e554c0f257c8f361 frame00001206 +1c3823aa98c13ee14b1d63a19813c970 frame00001207 +575e0d8e87fef3bedf5b4801f44ba818 frame00001208 +4dff484dbe95a81a4bea9e4e2fdf459a frame00001209 +30cce94d053843f3d734071188b98558 frame00001210 +61ba88b7da347abe1bd0e5e5c33781ce frame00001211 +070c2879cf6e0f258a9dca00094986d8 frame00001212 +2c4cd5de9ab50cef1f8d875862262abe frame00001213 +c2f25a91f2bbf3bb2d51024c862a0dd0 frame00001214 +d9cda76a05070322f7f856ef17af650b frame00001215 +3831689ab2ab138ce7e6995475693beb frame00001216 +5ba1dacc5777877d2a1253ca57929d10 frame00001217 +3adaf8620b1b5f0d2dc9afac0f105604 frame00001218 +81a598568f4e1714339ea40b4022b6e5 frame00001219 +6fc866ed696d90496e92ec473df14c0b frame00001220 +b4ad9e7197285596523c0cb0e2d73e54 frame00001221 +d6a7c1b63b9b297168bd4860da742e2a frame00001222 +1913d5aea1a79eb2a16b235fdea8a3bb frame00001223 +3de771f09a59c42a87e934f602caddad frame00001224 +4bbe4a41b26ab437edc1609410542552 frame00001225 +df803dc858c3c4d0c21737eef42de3dc frame00001226 +b4e909dcf6bc5c4b6ebd254fd4c2f1ac frame00001227 +73f56b465e5a884132304d8ed6f0a01e frame00001228 +26c8cc69c9451e4c2f7ea96fe7ec20e8 frame00001229 +866587f72153d587eeafcaf87dde879a frame00001230 +a335efe2b1586c92256fc3d2fc17933e frame00001231 +4bf336ad00e7d958711406ac16a287c7 frame00001232 +8f7b193d8282376cfd671495b6aac50d frame00001233 +352c1b06284235971c1d47a5f8e7bc00 frame00001234 +8463da718fa6a4b914f68036292d64dc frame00001235 +1ec064dd5158aa471e6b8e9c6b897714 frame00001236 +0883a10bd48f052cda472be4138eaa34 frame00001237 +2a4e6ee25932fbe379a2daba72be4a52 frame00001238 +af3e27b0e49e192fe9a1483146f9826c frame00001239 +b5ef222c56152168cb674c2231b7a304 frame00001240 +344225aa4880a58f386062193f088f42 frame00001241 +f361ccc1f4e80d1a43992305cb5d15e8 frame00001242 +0502e52e68bd4a18885febf6d82954c2 frame00001243 +f5cf4ed23facfdb63ec326fb0b240adb frame00001244 +da8807c037f16ead29b8875a18fcc7ac frame00001245 +da97c649f5dc78fb04bbd5e548fa2c7b frame00001246 +53beadf3379a1c513ceafabe29decde4 frame00001247 +6afe69386641469fa7752ab2f8bb828c frame00001248 +384a3bfd5ae85c6f73092a54dd4df854 frame00001249 +22e2c4594dc66bc2373cf6a9fdcbbca5 frame00001250 +543c290f3a46605bf4dc7d518c66d483 frame00001251 +62c70c3359120dc872ade880fa02f213 frame00001252 +6a71cd05584a01966df51184f63deeb5 frame00001253 +11c993b0dfc3c4f0b13110ac8f64f155 frame00001254 +073306ef0cdb21aa315d7c3c5ac60137 frame00001255 +db856331950829549a0b976d33917564 frame00001256 +199cee5f68b95fff59f48671e9c80d97 frame00001257 +bf58bf156bb3707da5acc3346c198bf2 frame00001258 +96bdeafcb7653a3d07a0576d5f746327 frame00001259 +926ce405530b44ac00a6903f5c2e813d frame00001260 +edee0564fc334d937819d5fedc8b341c frame00001261 +891d4a45c35aea408da9bb3c0fa6acfd frame00001262 +e17e6bb20a2963f70b835a8546da459c frame00001263 +75d53e95a93b5d5a68e95d8c3e50f610 frame00001264 +732073926b00935b63ef119a9de0cbc4 frame00001265 +bf2995a4aa9896be9194e21d42e61c9c frame00001266 +e4ba1df55d9fd4f00a63007297ea04d5 frame00001267 +7aac4106e0a1d6750dbe489e1559a70c frame00001268 +9b8f4ba36ccfb0c64014417e699e5851 frame00001269 +4a5f2829ef20a1b97794faba0735c6a3 frame00001270 +7d6ab6e841e040209351c80373ee7791 frame00001271 +15b11868e10d443d268d3ae890bdc6fe frame00001272 +aba1c07e431d8eb310750609c3ad9877 frame00001273 +2d63fd8a893331cbee73901582c4bff8 frame00001274 +d57314c03703c602149de60bac3e3026 frame00001275 +e58b9ca4528170657778849b3c63b883 frame00001276 +71682f84fdfa8c3e4f2ecf59bc4d60e0 frame00001277 +571ca7b93803eb1c02c6b3a93438ed8f frame00001278 +893ba3ffb8ff3f49eff77e3c8c41018c frame00001279 +23194c0c13ec4e6cba1214b9778661fb frame00001280 +3a7138fbe625f6ca3fcf63a0f6148ec3 frame00001281 +6f17a914a11e16398815e54cd483f273 frame00001282 +33f6d144fbf1c11441ae9c121e00cddb frame00001283 +a08ea93e403779ab3e3735e03ef8bfe6 frame00001284 +233a70b384861d47ccfc350feac366a3 frame00001285 +26799710f3e3ff4ead869bddb5a8cab8 frame00001286 +f44f9c19eb1815a39c158818e9cad68d frame00001287 +b6e0a3cd1d6233c78baed473ea0c1a52 frame00001288 +ef09aa1aa95861b12778e1eaa2dca059 frame00001289 +a132509aecb1c292f680ced00d5dac37 frame00001290 +7db3b9919e5ec71a105d918865816d14 frame00001291 +9c753c163c635fbac254f4fbcdebe5fd frame00001292 +32fcf02e9746037cd86bd9e8eb9bcb7a frame00001293 +7b9b21a2d962ec0d02c1128abca86740 frame00001294 +93774a817fa4822a46bb351d1817b112 frame00001295 +7103e0b5c5299b2cccd2c6ae0e6255da frame00001296 +2846a5ab2629822c6f6cd0c94586fda0 frame00001297 +71b804a2b27e3075e0cdaa7dda03ca3b frame00001298 +a5bb4a89b71aee534df13ede3f82834a frame00001299 +d1d228a75ebc0fef783e0138f622bfc8 frame00001300 +748ae3be16b2daedd593461e8508d883 frame00001301 +5d3e7035d7d793517376c073cb739e32 frame00001302 +6b85993361078564b9633a06f283eefa frame00001303 +913b6cd3a685ce9b509fffcb7de05ead frame00001304 +3b1242f61cefb5e736d35d6fcacb4ebc frame00001305 +dd54b379d942e056c57e37438abec47c frame00001306 +e47db210c889a76608b6c555afe41b70 frame00001307 +7e8fbb5bbc5ff3f28c32a0042e280f6d frame00001308 +e0e0003acf4ab9009437e2d1d1a01a0b frame00001309 +2a347477e660becd72453fbbea5f8052 frame00001310 +aa45c780a41e4d54ecc4400c79bd14e4 frame00001311 +3a5bd14287658d5f4e20e6bc81d7fc26 frame00001312 +cd77e33d8f65f3c73d15f6fa35fabe9d frame00001313 +2adff372b2dc2a985798d780193c3c28 frame00001314 +d11c687218bf7e63b6f39d9ae5198fc1 frame00001315 +c0c7f1379a8b6cd3aa63ac489617a009 frame00001316 +f0f41af659c2cc074c3d6c2d5de0ba1b frame00001317 +089cc0e6c1c17b02b30c3d8898e35e9e frame00001318 +a03eccd38f30dc49f23357de39465568 frame00001319 +25811480a9c2f4b4d3266a1b9a5f1e65 frame00001320 +234baf80b8cb8bf1874e52c10d20285c frame00001321 +29eead4930f407e6c68545f4924aea7d frame00001322 +78ea703d389356fc998f462c7004dcd1 frame00001323 +ebf872becb35217007cf9d53ace13122 frame00001324 +9f28bfabf792a40dadce9cef2311d874 frame00001325 +c2f586dbe90b1218b9c222ae07bfadae frame00001326 +bd2c80dfaab4e911c8d9760185711cc0 frame00001327 +b8d44ddb9fb2b2e1aec77ed640a687e7 frame00001328 +e1bf239b2e7b7b2cc2c73d83a2b0196a frame00001329 +5257216bcd30f51aeb6656cb561baf12 frame00001330 +d62f2315c5fa1ebe738f562a4b110b20 frame00001331 +5040672eba4556787fd5c6d8c5cdcf07 frame00001332 +4e71736c87495f40b04945e1194c16fb frame00001333 +27a940a602026215b1aecae7ffe32292 frame00001334 +9d6dd301887ee5e4e8b3b80087209509 frame00001335 +43468d2010bb14c8ffbf540ff76d5a0c frame00001336 +edbeaba8cf87a74d743c6ee3466dfe0c frame00001337 +bcf7dbaf329ca45e02d179c47ded5895 frame00001338 +f8fddf37cec68b2dd89918af5cb131e5 frame00001339 +e8048ef26b24cf0f811d7499a0c31b71 frame00001340 +20fa8b918437cc1cc2864dae900e90c0 frame00001341 +58c779894b593db1cd22c072cf6ce6c9 frame00001342 +4147c854f08d92e4cd30932a4020cabc frame00001343 +d5539b63225d3fc5af6bc0e40397c092 frame00001344 +8e9e5dd1017604837f17ce69ccb1910e frame00001345 +d24e1c5d1f06b6eb7d09dea4c7534bb6 frame00001346 +bbd1894cd42f7a6c6c96f2576032cf3a frame00001347 +a19e61a4ba332d26042f1f87d460ea7a frame00001348 +f90fc0832cd24ebc1ac6e32b0e80aff8 frame00001349 +0a8c340766517a6c2b26a02e167f27c4 frame00001350 +d57771b05c931dc1b74624ecdc0cec53 frame00001351 +9cdef88d6438801f3ac230bbb04456af frame00001352 +195b1b17a053d656a8fc851614eddc46 frame00001353 +eb55a68919be6f37c3a54c0644bc0c13 frame00001354 +52c900a050633c15c0c6d8c878bfde0a frame00001355 +561aa02053adba608b1d18abb4a2ca4c frame00001356 +118335ff64c867657564174e6c708a61 frame00001357 +11f5b255602e29ffbbc565cb0b40b336 frame00001358 +baa3eb4f2e1002fc5b516bce378fe66e frame00001359 +2c56a141630f3b5980e5124f33743907 frame00001360 +48b0cd1091921398af225a7b2d33101e frame00001361 +eb6e5463049db6a5f1bc6ea6319a3219 frame00001362 +393cd0f416b55dd8a5a9fbbe186dc960 frame00001363 +18bae7cbcf958e1b16e29deb37733921 frame00001364 +3672aae894d1c912b0feb0137eb866f8 frame00001365 +8ecf70f7377677137a3e1680322e1b69 frame00001366 +cd0f4da8c48c6da9e3caf227641c15ae frame00001367 +b0b026347faa4703f6455c033c813d2d frame00001368 +bb15f7bf81f1887a89a6ec0ef175e811 frame00001369 +5ed6d4caebd75ef89ddfe9d9e9470865 frame00001370 +9d398801994138eb095a016e97aafd26 frame00001371 +35d3a598f6310af1be1e165c15a2b6ae frame00001372 +c3b63ebe9b0f5ef909339f5052831ede frame00001373 +a1046d377ba0447fd99a44dc5e1e4f3f frame00001374 +d34e7d27f1d3b845f09d312bbc3e58d0 frame00001375 +434e43d05e91a42fe65cb4128e11367b frame00001376 +b4e8e79d018650f2c0d95b6539626cbb frame00001377 +133e9b85e24157d3de3ac81fc4100428 frame00001378 +fdf64630191b4ea99fc2a11dd85fd5d1 frame00001379 +7990dba0df8784d17bc5afd0f8770336 frame00001380 +8ddd51ebc7c1bdc18be9430de36e08db frame00001381 +5c7f4e2808b9a869c2d38b48b402bc3e frame00001382 +6509614e9f9f00f22c4bff934998e1b7 frame00001383 +0e3e1c3d9648af64565ad14b33fd781b frame00001384 +0641b4b106260cc889bf518606e5a58a frame00001385 +ef3e9355abed8b4fa4f8bf70c5be56c4 frame00001386 +bbbe94fd161f8c3ef23af60bc6464692 frame00001387 +e09be32dc8cf938c85d05f0d2dc73785 frame00001388 +433f034ffa381b0383cf0f9a5fbd25a0 frame00001389 +e346b9666e2e0895bc7022fbdbd06583 frame00001390 +58afcf368edecad66ddc08812563e5c7 frame00001391 +ccc7a5b41381461deffc596e79d86a82 frame00001392 +21028f6ceca5097d39a8de9c69b8f9d4 frame00001393 +b86d065528109ba00c02134ff2e0926e frame00001394 +5a1e1aa8fff586614ce0c7c267078070 frame00001395 +d8e16e0ade942e26d114ab536e75cb93 frame00001396 +cd556648c91b81cca574a9136deaeef5 frame00001397 +963cf10fb38d47b899e7ca8d943bf705 frame00001398 +dc8cfb16a8dc3f3b6178bc435e0166de frame00001399 +508fe2c6c1301e47e835c10d5003dc0f frame00001400 +6e20b2ee8ab45028638b8f73620b8ce7 frame00001401 +58aba4ff6b7ee53c7abbf32d19cc47d6 frame00001402 +34bad4aa6e96366a4120eb427d0dbfc8 frame00001403 +dd5b0799d262eb13084b1591ec1bfb71 frame00001404 +a01be8fed8a29dde047cfe1e2d838c5d frame00001405 +56d01e7921a078a4f5a1e9e0926fe955 frame00001406 +0030f589258f9d9e0ddd2e52e0f90901 frame00001407 +38565f6233618f6b17c08b23d76ac9cb frame00001408 +d7be81e58e7e8b6dddba942b7e980b39 frame00001409 +e428582f8d2095ff4d6980c3dfb3ed67 frame00001410 +84148be3be897fd9195105635f18b32b frame00001411 +8f294a9a158d91c134162362012fa6cf frame00001412 +af5dcbfe07da104fa85790bfd9dbf450 frame00001413 +b6d20e143ba62820ae659ae7d2f5e2a7 frame00001414 +21d88301c75f777da6b151eae36a0c0f frame00001415 +9081c4820376700bd2bc06d83167b354 frame00001416 +5ec9d035ec31fa38d4758557d04adb8e frame00001417 +77465939f1cffdb27f923064563a9f04 frame00001418 +6515499a709aa963ab3423d64ec889d4 frame00001419 +e94fea47559003aa91e9b86b96763361 frame00001420 +1c810cf309dca575f13ad9ad4d3897ca frame00001421 +dd65df4b9df3a266f2bb512e0e272056 frame00001422 +53f34128d79060dc62ce2c705018380c frame00001423 +4bc2e782746b65402cdfdd6801e3b398 frame00001424 +90a76ac0341364362980d6be15a1780b frame00001425 +2cd8a47c2cdb906a6603b55e588bf022 frame00001426 +57656c99c207f38ff7670494be6454b2 frame00001427 +3d269f810586e46f72aabf1325b922da frame00001428 +f33b05123a8c5ac375a68667db117434 frame00001429 +c9b51487c309f112b3f176bab6eef94c frame00001430 +264204bc5db51fa97259634d31c91c3f frame00001431 +961109b818891562bd456c53bb2a4e9b frame00001432 +03646491fbf27a27cac7972286518e17 frame00001433 +7b26f8bd341fdfb2d0c41787a9ba64c4 frame00001434 +d98b19e40874abad870d56ba8fc2099f frame00001435 +92cbc909f2a6619084a3947376b7cff6 frame00001436 +4e47bbe39fbaf13d372f5676606a1af2 frame00001437 +bea6e716a79b9ec11030e49f67b0497d frame00001438 +c52ad4a6102cdae09d986544a941eafb frame00001439 +cc61baca08415086abce162a704fa6e7 frame00001440 +f80ea9b29031bb98f46b526eae4ff730 frame00001441 +afa6a4148a90d5879a100be77fdff674 frame00001442 +2904d5aeae70438524264b431478a7e7 frame00001443 +fedcb6d100020d447d89ed819c4dc8bb frame00001444 +c564f639fb2bf1911d83c822746f3fad frame00001445 +bc34e6390588cc296448d908374393ac frame00001446 +47c4a976c5c1f3934528dde2eebc80be frame00001447 +09c092db9fe02c4c280fec8fe0702e4e frame00001448 +758af4fdeeddc03daa81b1e9a431c597 frame00001449 +c4b07478b0b2950ea52f1b2b0bdfc7f6 frame00001450 +eaa73e029ca79553a7a6fe0dff3429de frame00001451 +33b9fc715bbde96b0b437756ecfb2621 frame00001452 +3d9dcf11003b2e004a7e2a6d00df3193 frame00001453 +48ef2fd2ecbfdb048ce6f06f59f45c41 frame00001454 +bf1d4979a647029f0bd455f325189841 frame00001455 +c076e605e3be36571ce6cc1c22abb8f6 frame00001456 +a3830ea3ffbc6db00a80ab40935a6eb1 frame00001457 +31e4e95d8311a0c0b03287d1df5455b9 frame00001458 +d9dcc79e4e182ce2a5bbb301307a2a90 frame00001459 +cde63b33ae7e548a0f34703123c55e7d frame00001460 +b5a2b71ed5ea421633cd35eef6cbf285 frame00001461 +ab2ca13e3e27113c509c8091478b1a61 frame00001462 +f4df0f2ecff6879ce8ac243ead253ebd frame00001463 +f362c406245ae9a1f892e46b12364541 frame00001464 +4b106fedd86b629477edc5e0af0f824b frame00001465 +51f9676c33e3833294fa44920d223260 frame00001466 +cde5bcc8efe03259d04aa63187374d7c frame00001467 +70094a1228cf0b5457323ce0d0a2de82 frame00001468 +8b95469ec7137d4c47c3716592ce5bfd frame00001469 +0e952a938a2c446785b5cfcfaf622fdf frame00001470 +8b517136587e63c5f63e55a4979e1735 frame00001471 +cc562cff6dd7815c6e075a5386f35f79 frame00001472 +cb1228ea48c810b0062a58c3db333bc2 frame00001473 +2a53b234c722fff7c80e859f938e4a6c frame00001474 +fed678dca5f292ad9f8f788d9031f352 frame00001475 +38752d4d1ce8ca3a5d5bc6289fcffcb9 frame00001476 +46d03e0a7a44012cc9166e4575371425 frame00001477 +c5b15a356c31fe57a132eae6bde2362e frame00001478 +0e2fed3d0b09be4af024256c32de43e0 frame00001479 +9456b2cc5e689691dc7d3d0acd5465df frame00001480 +58f45f86c6941850b0bce298cde45aa8 frame00001481 +526f0da0fe6d2dae64a18bd5cddc3842 frame00001482 +533b2aaf73e2992207c0ebdd12a40a1b frame00001483 +3ec827112f8326d3a362290dd03f5ca1 frame00001484 +e89cc06cc009f2c7a0c6d9a47247191c frame00001485 +7137c38e37483352ba335a3da7f2deb6 frame00001486 +2c8ba20dedf3a7a6753107c9006d8ff8 frame00001487 +f7dd4b23fec87ae12063d925f7990869 frame00001488 +213353c57bed99507d4e8bcaeb269a8c frame00001489 +f000ce42ab1421a7dedaa9ec66bb733c frame00001490 +e3aba515856315f520ab90e2cd0d3064 frame00001491 +c2b2319474e9f7fdfe1807d7c0ecfa80 frame00001492 +7e5adb16221d0454fff821ea896d1773 frame00001493 +156d2fb132b65fb959bef3a12d904efb frame00001494 +1df9286cb502b0f1061b8a233cd24a0a frame00001495 +cacee0124159ea70036c99e70dbd82b1 frame00001496 +6e56e32633e020953ac0abd3ff167365 frame00001497 +6f00381fd727bfbe6b9375f937a96290 frame00001498 +f19d933062a052f7875bbe663d5a2d81 frame00001499 +c4946774297c5cde1cfe89fcfd7b20e9 frame00001500 +511ec23cd59e7fe0735416c5da623ac4 frame00001501 +fa1ad39928a7c704fb629021c0d20fd4 frame00001502 +22fccca9ea28c680dc727b4486cdacb3 frame00001503 +df4c08c23e48de04e83b79c893544207 frame00001504 +ba68e0f72bf1780f0b7a017419ff5cb3 frame00001505 +6ee84a7d9f3dc5b109acacae7867a949 frame00001506 +46bc34dbbcdb237b0d7cf500d9d0a93d frame00001507 +39ef37ccff3101a2f93cc355eba9d4c5 frame00001508 +51013e60d019d2c717f4c2a663b12366 frame00001509 +c716145275d37f677b22ac4ae9a3e567 frame00001510 +bd39712df3d8bc2f4c35548493f70d2b frame00001511 +76b6abd4c8c96ee17b3ce32dd02d67e5 frame00001512 +41145f5d72eede67aff69c16cb1e45a4 frame00001513 +4f47f82675e4f3e7d35844cc12b4333d frame00001514 +5929fb6d037ec81959f6a027a4095e51 frame00001515 +b8c9b3e7b6da3ee48d602d915488e137 frame00001516 +7747f132ebb6f2e632d1dddca9639350 frame00001517 +3f920e6d68c116bb5c2c70026a6f2bc2 frame00001518 +76d1091d3944ec5b9409e95ec42cdd5d frame00001519 +f6194ed79beb51e4b847d39564dfd434 frame00001520 +0b8397bbd143c04a9d3418941eb2f00b frame00001521 +af7ffa7b46dd801691d5478a021656f3 frame00001522 +63b3039f124cb3b74524248eb9ca586a frame00001523 +e12b36a8ecc58251cb82ed72a44053fc frame00001524 +a9da3172896a9768b4bd07f8da431435 frame00001525 +a02d1cd4a7d3871db7701c5a7642bbb0 frame00001526 +3e063a32f763b4adb1a9f676949edda3 frame00001527 +9a4a0d1697d0272e1278d5678afa77bd frame00001528 +120df536ce140b3ad004c91d8e126766 frame00001529 +76966a271af0b93988df4d223d092f69 frame00001530 +3a81857a4757945eb0403c3b99cc3bb7 frame00001531 +62696aa3eab65998a1a895d03716e14c frame00001532 +01d07705fc616dcaf98c69310d73a5d7 frame00001533 +b55c0edf48af014c449803d98b65958f frame00001534 +f581632a6b45625f3ed3abca1487aee7 frame00001535 +0acb336535e6aa9249507b2c8815f8f6 frame00001536 +8b6f834e8faf916ec5f82ceca91a9036 frame00001537 +d419ce5079683f8597a73d885112ec10 frame00001538 +56bd06726f1eb00031fea7417bb32148 frame00001539 +850a494c4f9f9fee7c96c522e4902fa3 frame00001540 +b4a25b552cd78af4fa1b8f44373cc04c frame00001541 +1fad0b013d2b1d867ddd6855eb1b1efa frame00001542 +294e9602cfdffe6d2f7ad1bba552bb5b frame00001543 +8502e21c47bf3875c6a63b7e65c072f7 frame00001544 +c5105b033d7b612a1551468978770112 frame00001545 +bc087c3ded3eb5d219421aff38268075 frame00001546 +dd4ed4495f2815e946806ecca4f5d7f9 frame00001547 +81a914942ac0e76032b73c1cddc53857 frame00001548 +ce23d604bb2af8e1f2d3b26112b8b05a frame00001549 +a4ea0be8d8e1d451b4ca5beaada740d2 frame00001550 +f14a4afe7424d242d3cc02b48f0d9706 frame00001551 +21a2113ef5b84f74cd898235ad8ae0d9 frame00001552 +5b6b9dcbed85d04304ecd506617381e7 frame00001553 +536d33d44ffbdd01a9d351862d9dec12 frame00001554 +6a0d92af37db19ba9ed3a0adac5cfad7 frame00001555 +7f1b2b46f47baab5a2ea302a34d5bae6 frame00001556 +2648de1b5caeea011c88a554cc15359d frame00001557 +dfd299601f6adc314d091f15b0b77bfd frame00001558 +44abbb5533440392b0371a920377662f frame00001559 +0c39f2905d35da6f2cc83b973f203924 frame00001560 +644dfdc658cd6f38f296e54cc12a30fe frame00001561 +ea389a83b31d57dcad666521c9ee4279 frame00001562 +093e5722b9e4ed6a1a4c27df8d1f331b frame00001563 +958c3a6f4cc3e5b48d00f2e303cd21af frame00001564 +ee9e9a7facc894be3ccbaa2d918db2ba frame00001565 +225d33644999e8c2286eb44e6b3b566d frame00001566 +fa38b229f227f7ecabfe27553e1485b0 frame00001567 +cf897fc836bdb684b7ed72bf5de5c040 frame00001568 +d729f9fc74d3c7633cab26878ea06f80 frame00001569 +369ba712d73a156e21ec6d0e9ff6dfb8 frame00001570 +103597be78b116e21eb9bce056ae47f8 frame00001571 +9615bf22b9f63d548186402d88614d4d frame00001572 +12ad245a385dccb472ba2b91ca86d894 frame00001573 +92cf56b5da5a85d5ad68c8f1a1be7f21 frame00001574 +6c8a0c066aedaa5337dc9c27522571a6 frame00001575 +f5b3b312276f4134336d144992d92a4a frame00001576 +4c8dea0ea4a08c1494fea974e2f2a661 frame00001577 +e6c409de2bdc43f0e2c072326f4ce744 frame00001578 +b07668a53d97c474114186f7b114722f frame00001579 +147e9b6697309107794b03adb462b311 frame00001580 +1f93c5ad7caa447f0520b3ddecadfbd9 frame00001581 +a45607398efe8f6d44eb9abb92655745 frame00001582 +a8c0051d7b33a1137dae763f06ac6ab4 frame00001583 +cf9373ccc50646ddb48eb571672830f4 frame00001584 +7c82d9211c45ceaff975bf28ec6379a6 frame00001585 +75e6b05c62c19385b9902194a8579771 frame00001586 +9da8c89cd5e686eabaf4fe7f3056212d frame00001587 +616041504d5cd57e38a22482b89d3369 frame00001588 +a1be46d1cd03ff4dbbcce9c570a1c5a2 frame00001589 +d1a0fcb6e600c880dab9ad37d8c23afe frame00001590 +a11e1612ddf102817f99f94c3e8f21cb frame00001591 +2176a84bbd01c9b79054655a690d284d frame00001592 +d1812de7693102bc878bbbe31a68a1bd frame00001593 +0852edb1d5ea5b41b11b4754660a497b frame00001594 +435ebaa8efd12abb19aedc81e1fe31cd frame00001595 +b3f1f380946fa42b757828d27859f6f9 frame00001596 +f20b8d96d828579913937363e93ca8d2 frame00001597 +834d5faaceb0b5cc5f163f3123f7f149 frame00001598 +8ed6dcf3d722114a1c393829fdf69106 frame00001599 +ce931891c41a521c84fc2ff5435670b8 frame00001600 +4e7e0fd495ad9166418aa0db68c255dd frame00001601 +4e28001c1318726949146d2cd2787a17 frame00001602 +4e364c18f349ecb367f74a21ce202a21 frame00001603 +e1499999bcf7fc1c36db318cb3ac3f26 frame00001604 +df05dab6a638c10a66ca43f929a82ecf frame00001605 +85539624411e42b950ec070e9326e65c frame00001606 +9508f19f3a41dc0d0d1167cfb8281899 frame00001607 +cc39da5dffe7861080a464e4d90277f9 frame00001608 +29e86bd5369f12dd7ac1260c693a0a3a frame00001609 +eb269db87031c9d1d0e24d4ff7b26ccd frame00001610 +6d2b1c7f2806b85a5c587c9ad735eb2d frame00001611 +36c734883c74ff4f4077d7feda6e0037 frame00001612 +75b8e17ed60e7dd8fe882278fe9a794a frame00001613 +5925d4a3914309bfc31b097d088bc41f frame00001614 +be45ead185f1b5308a4163d4acb61e5a frame00001615 +81c846b621f563fbe7a0354dcd45f0b4 frame00001616 +2b9ca829d66c9ecf8830467e0a642627 frame00001617 +1042978a2b83ea921ea6947f8b0df630 frame00001618 +be489d7151fc2360fd095f881d650554 frame00001619 +d9231bdb19438de65b98e25479178a68 frame00001620 +cd82ae7c87497d2013a851412b95b5fb frame00001621 +fd2072742454d7cb68f500d55f9281c4 frame00001622 +f6534e19a2583a7a97146247a5479bbd frame00001623 +bcc2138ffc9efb290351e03be3eb632f frame00001624 +baca157c36db45462c0d351e40771c53 frame00001625 +02d2fa26d921580e2232ea3c03ab6035 frame00001626 +113d6c1e98ff6bc1601a9d908a3ba600 frame00001627 +283112324d500a733f21cff4c995a976 frame00001628 +fba7e7013682325bba7d282d32dd2c79 frame00001629 +dc8d49affbe46fcba33e7114414e1853 frame00001630 +04dd979c6f2e8696152b58f3254c495c frame00001631 +9ef083356d6b6bcc6f98d17e067c2e5d frame00001632 +5babf1662adcfd114f0b1c487a713eec frame00001633 +53a00532ba9e221b705db1f1774d0861 frame00001634 +2e61fdc058222deaae373e3beba23461 frame00001635 +c4198d681049bae2426f07380b18ea4b frame00001636 +d8cbedeeb233ec2933ce3ab6f615e8c7 frame00001637 +e217790d754d17bf9f8d70dbef88fcc8 frame00001638 +bf4a2822ef5cdc0446d8b37b1ab520ca frame00001639 +3f932d55d4fb58a7eab6a18114fdcb76 frame00001640 +00d08c2e276b662d304341fe1d71ede4 frame00001641 +5cb3d447b160e7771a61024d03246cd7 frame00001642 +98d3391b3e86619c2b09816b0fa365cc frame00001643 +0f03462b6b9f2ea1a022addca1d0d9ca frame00001644 +609da0808764fb2d4fa83fc897c34768 frame00001645 +11e5e69380a86793358e95e173609ec7 frame00001646 +196cc24417240762b040badd484d8d8e frame00001647 +adf17c45d530e9308c4c6b8e766a2500 frame00001648 +0ae89997f6a3e8376f007602e12d0bcc frame00001649 +53b3dab3dc4a50d95f369aa4bec9d259 frame00001650 +2ff58df0b736a21362819095099b4565 frame00001651 +cc0dd7898877f62e9dd31df6a0d8dc29 frame00001652 +d6e1a990c1824a8313b717117385c99e frame00001653 +d3175913cf1f11ba1295758c83816996 frame00001654 +fe64a852a350bf31cfb1850e921d87d2 frame00001655 +43d57c76f07dbc8c62700ce2fcd452fa frame00001656 +5fe5558384c0e34410baf37324f52026 frame00001657 +50a90336fedbe51b9798b94f72920f15 frame00001658 +6582fd9b6ac84a8ac2df9b926ebe67f7 frame00001659 +f0a4a22b4256c8b008a504c507bd736f frame00001660 +3e42a963e75fbbc7ac32f29318d4c88b frame00001661 +565bb1d972e0d76e4e55e93a26514312 frame00001662 +cd3b78c12f4872c80942f9482605f2bb frame00001663 +023048479582039cf4cb33adf4aee51b frame00001664 +4c337d9a8372e626e4a848022f1610a0 frame00001665 +010496875994a8f02e9ab1f170a61ef2 frame00001666 +40dd90c94258609512a942ebe7a5e31d frame00001667 +81d26ca2f68ca0bfb9d495acf40a8378 frame00001668 +5154e8b15be03e695b4636ae24535550 frame00001669 +151b2db090141c544ee1c7f4c4654d9e frame00001670 +ca5f9b43fb72ab0c2ebfa96af8d9b9b3 frame00001671 +a7aeace0c20f69896305f2143e70819d frame00001672 +7fccc46ecc992411d087fa606ad47233 frame00001673 +4504a533907eeae25554107dc8bcfd85 frame00001674 +99a2fde873cc33ac8a56bf275103ffb9 frame00001675 +6554bf304ab5f6e65b092b6937dad0f2 frame00001676 +62548bb661c51da1cb27d8a68c40fc21 frame00001677 +d773be798b938d41312eef103b2d7c2f frame00001678 +29fd33447bf1e1785653aaccf076779f frame00001679 +28c497455012383f06307d6024c9138f frame00001680 +a863a0ad1ddc0086b3945df0c5a844cd frame00001681 +f58ba95845deb4574cf689a21ede2514 frame00001682 +0af792926d4e37a07f4ed3e054c825d7 frame00001683 +5535ec3a2afabfb12eef0d145d0583fd frame00001684 +889a87877d6de7281cdd9f44b0f4ff36 frame00001685 +11e5c7944db6379ff9cb355c78bc58f9 frame00001686 +fa0e32f0c2183e3470dbbcd39238626f frame00001687 +c0ff792a38667519af7655ece3525385 frame00001688 +604ec2cdc7744ea729cf7d639187e42e frame00001689 +a0edeb2338ba575baa56bbd64f96c944 frame00001690 +664f5c16e4cd7b08a0446548f96d7a6a frame00001691 +5fbc016e0a5f617dedad20df30b20f43 frame00001692 +68eef9c0c018019d5099e3f95954fdfb frame00001693 +13660fb832a8ee464b2a3c3daa1bdc96 frame00001694 +ca02edda542280a244f37d8cb7173568 frame00001695 +89bb1ee288076f017fd15087eb0dcd0d frame00001696 +a5d3147632fb9769138f472a85aa7588 frame00001697 +3d0e4a6f4eccabedbf8af69db61a3ff7 frame00001698 +7eb1b169a9b8df385052cbaa60e99b42 frame00001699 +478beedd3ed3d4f2d30f96c6440f1b8c frame00001700 +48c7426a31eeb881188b378d6b257134 frame00001701 +527a2461dc7573110f9b032cb3f38717 frame00001702 +3d20f409544c5d5c973f808a789220aa frame00001703 +e297cfbc6f9480e76a0de2348456108a frame00001704 +c268c4b2501fb58fcec8be51b5edc0a7 frame00001705 +9a1dfa9528997e2ca6bae2d6834ce5a6 frame00001706 +b69f244b0b1d8ef5c97797e5a538ed77 frame00001707 +95eae8003060bc2e97a677b5e962f973 frame00001708 +ea067c8cfb704e4ced4eccb7a6a80477 frame00001709 +d74df70f9b4e3262f7a5bb255184f5a3 frame00001710 +bbff4370019cab75a7523005bd1fcf78 frame00001711 +b125ec60311b70a8b55aa3ad5ad2d8ca frame00001712 +fe6303a80071da90936c4d7e66ce3fc5 frame00001713 +76ce00aad725affb42beb4f0a4d4bae7 frame00001714 +a677ab56c4d690fecc1b8e0d06a66157 frame00001715 +378d131468672a1742678937a7726120 frame00001716 +0e61680cf599ce2f22ab2732b8555c3f frame00001717 +88598d05fa4820a8c482b18b8aa763c0 frame00001718 +01fb96b6145c39f208d64a0e9d3d6d4a frame00001719 +f29ef256270504dbdfc76036a91888c8 frame00001720 +42216ecc760769df13f8d4fe9744b0de frame00001721 +26b400ed03f5e2ba9723cda7c79630b4 frame00001722 +2a0377c0068b52e68c025fc5b66a7881 frame00001723 +66a6aee769516d069df20b502c2ea0cf frame00001724 +a57a9589f756cd80aa5ef9f567572927 frame00001725 +e8fed90fe81ff05b3ab989ddfe441500 frame00001726 +c9fb8de16645d7863c2bdfece660d7bc frame00001727 +fb066e759067578e59bfb8df05a0c212 frame00001728 +ccda56991fa9082ccc498d4a48dbd867 frame00001729 +9eac4bfd2eed61f54ca68cbee794f074 frame00001730 +70b0052580557b11bc9ecb254c98eb0a frame00001731 +403bfd06390e891fc58c5ebd929ea687 frame00001732 +e529613711763a3c369cad6502d76842 frame00001733 +3d83a981bd4e151133d702d3a2ac14c6 frame00001734 +58401462643b999f6354f14eabbf878b frame00001735 +40d27f22ce6f25d5071d84ed6ef190e5 frame00001736 +e9ad0605adb4ccee9110d8fc7ab5a603 frame00001737 +dffe39b83555cc93f511b263e543ef37 frame00001738 +31624ea8654bc417c155109697e6db77 frame00001739 +322c21d6b1254c9d320fb9f473e9ce4b frame00001740 +e82e3339c07832d36f5c8c5b12be8ec1 frame00001741 +a71bcd33af559f3defb6de189aa2f4b7 frame00001742 +0addb05ccc9824a994516eafcdc0c657 frame00001743 +13b616eb1a6eea11fd26cae27f5ec3f0 frame00001744 +70c4f0b997adc09a285d894ef48cb68e frame00001745 +19bccadc6f8707a0aa2061ba40b1ab4e frame00001746 +db43d4e281dfded828b41fabdec3b0ed frame00001747 +cd1e200a98f8559853dfc2334148f6d3 frame00001748 +b0d930cc14c9baf4f3c3eb4b633e5fe1 frame00001749 +e9cb1d09d342845d89d95537f29b2af9 frame00001750 +af9849a51dff911cd09e309437816b9e frame00001751 +cb4c5ef4b2063f840e6ba51880013af9 frame00001752 +c149eae71e5dd10c54130a6bc29ce8d7 frame00001753 +344e6b3feecbbea4bf725b2cdb5684f3 frame00001754 +7ea596197a38eb635faf53273f8b1998 frame00001755 +3f81d0c5bd58cd9f2ee7c2668a415f6d frame00001756 +433551bb398b5a9cfa1d1aeb0a877fb7 frame00001757 +b6bdfdf01a2d3c5dc2c50ca776d11a2f frame00001758 +d3daeb4889dfc71a4bf18b3adb684040 frame00001759 +a65a8cc6831f36ce34376f4644120656 frame00001760 +ad8f8a230e1193a8d82a2ad0d4193e2e frame00001761 +27c223c23056d2ed293677d2f6a07b78 frame00001762 +5c4b2767f2415a0fd11447eac16d08d0 frame00001763 +71c4e42dd60def6eaeb524958dd6e22b frame00001764 +2447a5471220c9d665597c9124455fa0 frame00001765 +3f85201e0e21599dddfc0ed24b4a6d73 frame00001766 +ab69212f4457658f4220c1a7d6df2880 frame00001767 +288819da47717b00f92f1f31e0795a0d frame00001768 +4ee26936c633d2d4074115954b90f415 frame00001769 +dcc6e929699cc7a6e07836e0db88860a frame00001770 +c8a71852f332794feaf72cbad62edb76 frame00001771 +ec67fa61a542d7854fea65b1bd50c6cc frame00001772 +610c9be4147b592a1d05f7c7c9c039c3 frame00001773 +486349aec08e6d717ea527e536bf8d8e frame00001774 +d3b98ac605e4f253f4ec6d9f6ba481f6 frame00001775 +b60bce72b1bc7fc30ce0508f78a73caa frame00001776 +a7393478dde4e00fa5d99db8e5b15178 frame00001777 +46d0c40a3655c7596ff3382f0d300ff4 frame00001778 +cff3c0450adbf9a6de373778dcf2bb72 frame00001779 +08e1fd37f361ed4acf5e344f25124709 frame00001780 +906a8556f8388baa7251c1053748369c frame00001781 +e7ff188b4992094a8f8878e8d04186b1 frame00001782 +078e7e5d23dcc2113f3da08c7b096ebc frame00001783 +cdadc59964362387aeb4468af168a158 frame00001784 +4b246028277597e74c84f71f3fd868da frame00001785 +1ce020a15fd949b8c6991d41523a62b2 frame00001786 +a07b13ed87d9825e530bcd2d83261e96 frame00001787 +14ee95eeebc32ada9cfa42f3a6a6673e frame00001788 +7d31d8471d5c452a83907ebff44c65d4 frame00001789 +13b9d0eaa626e0695a1c21954d70e611 frame00001790 +000a2817bd07b9f15c871d98d31085ee frame00001791 +e662fce3103fd2e41abea7bc69af0893 frame00001792 +2b8a9d1ed971f2b91709d9df48803a71 frame00001793 +52aeba337a9c4a4529d1f2cca993d000 frame00001794 +d6fd1759f0859e0da7efdbbb612e86e1 frame00001795 +137b8ee2320f4ee2ba6e154f1ef78c14 frame00001796 +f48d99a8c9971dbbe7bea7fc9aefbfee frame00001797 +db4de3cacf066c75f0f766f35a954e2d frame00001798 +fe8b66df06242e0a7e85cac237575af8 frame00001799 +3e8c978acaee729b420a5b68b6a95610 frame00001800 +ecd544f3874500b792752de2dc7b6f82 frame00001801 +41640a37abb32fbc7014ec495750495c frame00001802 +a6d2c55b75e147f5240d96bea73933d6 frame00001803 +b980a473c88468fcfbd4a7d999f9e90d frame00001804 +2b4ecf359532f9234e23c0f74d548963 frame00001805 +6559c61a2bac55c1d5185c125a694d13 frame00001806 +434f85c01d5bab4c6e7940a6c9466fda frame00001807 +5976f58ff8f56e519d0a904387d7614b frame00001808 +2020096a7b78feb5b8f215cb2e7eec94 frame00001809 +2da947fa5c31c4ea923ffe1cfa35ce7e frame00001810 +0e2d17247c9c57608da735be2324d0f5 frame00001811 +06d76f2c972cfc08a18251f7a036c1c9 frame00001812 +7fa92a455a7b967025226da402c8f649 frame00001813 +c4801f37afb5f2ed1f4c9d7f29da1e34 frame00001814 +ae0e2d64cf17270a9f3cd7442349d1e9 frame00001815 +49899971be914560caeae436d4c25996 frame00001816 +7f40afd1d35ee6e38c65bf43c4ee67c7 frame00001817 +61b4c98c08b90dc8e4413e3481b314a9 frame00001818 +941959a6226616db7c10c49438d4914e frame00001819 +06dd6ebf539cb50d895bb0ab3b37b51d frame00001820 +796506c1bccf6754ddb757e165e81c97 frame00001821 +e6db268236d8244d87bc384850c3d4fd frame00001822 +7446e310e0f6d8b62a4726c97e38c196 frame00001823 +4ef5b1df8ca47d58d4a4dedf207b784a frame00001824 +e28ec974cb37db858fd53134c6c5e4f2 frame00001825 +a29df1ee837001b44c99fca21b53ab9e frame00001826 +29f6509c359cb0695a514050020ac394 frame00001827 +5c3dae7eaab2f4fe08a4e7381d484e97 frame00001828 +f813e183a226a9ff6caf147200367eb2 frame00001829 +18f47f41aeef6d7ca198ff1f0b2e686f frame00001830 +641e7c99ee733d8f14039357d50a8747 frame00001831 +9478326791c7c89f1af05443c7257755 frame00001832 +698c19cd467dd30dec69a0bd6951ea46 frame00001833 +9901565c00624824befdd5f1b8d56069 frame00001834 +dd420a6325b0173e1e17a9fd6c32bdbe frame00001835 +3db1cf151e222a694a075747c60b056b frame00001836 +831730e049d854ad37b4ba42fd405644 frame00001837 +0f2c4badef815b7a6e9513c0f393e8f3 frame00001838 +d4df2948547086d26fe97665eb26374f frame00001839 +6409fedc05b7cf6bc6c62020641745a0 frame00001840 +a194b152950ec5266fa613e2de139e0c frame00001841 +10e591427c5fa2ee7b28e1d9c9051cbf frame00001842 +5c8a1127e63dadc14834522066d050c9 frame00001843 +04cb1f083ff23ec05d7ac1ffc40d9f14 frame00001844 +6108f763ae03ecc9e9488289efdd7dcb frame00001845 +ed911cb3e54f17cdef31414ad5262245 frame00001846 +a79a0aa0a647c005734abd3274bf184d frame00001847 +c1e511a1f81d77ee8f69ba69dc0cdbc2 frame00001848 +7249e7b8bbb55907d65fa9afb4817f8b frame00001849 +d42cee560f5d4ee6f2d96e882725213c frame00001850 +3f479bc3445a92e2f833702b5825bf5a frame00001851 +312cac25f38db5f0a8ca482b3378aab0 frame00001852 +14e9fd36b98a796ffe8bf00fc8a88076 frame00001853 +f357f28a00c7902ffb03eca3cfdf893a frame00001854 +af1736048e096d1477c4eb4f74e355ad frame00001855 +c28af0a53af81688ba9c8be1530d84a9 frame00001856 +55ad63161d211ecb831928a8fec159fb frame00001857 +95903a3fe44e4ef163fd5b0f502175fc frame00001858 +cd889c296a6fc9d94f97e89e92fa72ff frame00001859 +763355fc9c96a24b5d3d59f7af798dc1 frame00001860 +55e6d2b2b6019b7a39a60a15e56b7d1f frame00001861 +8e3fa3a7964f7dd4f7eecc0ca173b03e frame00001862 +e2b6b07b6d2ceb2901690d8bedd5aa29 frame00001863 +7f060c682d9b240f31ac6c4b179484a8 frame00001864 +a1bbbf779134e2e5aa3b75ee0c4e4ace frame00001865 +6fc5b5f74a8bb0863a2881f686fc015b frame00001866 +3d10b44e102432d8766456c12f116fcc frame00001867 +ddaafa0210e2c605353780e90d9a2f0a frame00001868 +a150a34a7c461bdcb9fcd0145dd3c793 frame00001869 +4de029d48cf4eda336229a5e28ede25a frame00001870 +89d184c465e8f9f10693e6d3d23754e5 frame00001871 +438c54a9e05609fe139a3861c3d7822d frame00001872 +dd5ba650e391509fee1e810735e9f532 frame00001873 +b49ed65dddd05d5e6efe82e80ca806ab frame00001874 +16739b1a5e1d8c028612ee00a68d39ce frame00001875 +ee73a7c75534e34269368a7298c75320 frame00001876 +ec3f4fd77025470c90813c1bca89e511 frame00001877 +6611234d738f47fb3420beb3be7a9e0b frame00001878 +713a4329395b50404db7e99dc4cca4b1 frame00001879 +c642cc6219bbc175584762c4bc901180 frame00001880 +5a4ce69dd6b85a980c58af95268d8407 frame00001881 +6525ff8cee689b668738cbc13c721a26 frame00001882 +3434462caf4671f4b351901773737e6a frame00001883 +f36ccd727a399ee661906b9d0e1ba675 frame00001884 +92b8edc0fdc80d5dd97da8b3809ddc80 frame00001885 +829b2e3d1c663e87987dc5f3dfe7e761 frame00001886 +3b26c8febf8007ad1d4f5be3df61d9ac frame00001887 +fcf28c4fa3b81136f354db0f523131a1 frame00001888 +0522f0ed9dbf05f422aa7f8d416b763c frame00001889 +64c0173c2dfc5b11ff1371b35cc24af6 frame00001890 +7339bde48f8ddf6179ce58a02b338953 frame00001891 +0511a5ed347ea6c70c3a9818610b29a7 frame00001892 +55faf005275b29cf8d48d97ff99d0465 frame00001893 +eb1895cd3cc95a595afecca43a5072a8 frame00001894 +e592a50fb307162c5558f0e3175f4788 frame00001895 +6201629eea490cdaa82f0f68608d1577 frame00001896 +e26ad305fcef13e1bbed046077a922ca frame00001897 +9c4376c245cbf67e0fb2543658e32696 frame00001898 +f0f3679a90bcb8ae3719cc3cb7f8e66d frame00001899 +8750cabeeb6de4ebfc48d6bd418893f0 frame00001900 +c870967ea81ea02eaf35e9dffbcd3bb7 frame00001901 +c6a2e1c69045f45a23cd853230795325 frame00001902 +598260709251707c850efab59ba83cd4 frame00001903 +73b61d6420fc45ec99d53cefd6f6556d frame00001904 +2ac6e5b2f729f2d9d50995acc4fabbdb frame00001905 +1852c7b574786457b6a6722c7ea7554a frame00001906 +b9e6a9578213d6e1772e7b1d0d19819f frame00001907 +481a500541e9be275145e60a54600d37 frame00001908 +0c22111676503a0a301d6bb9d388b0d0 frame00001909 +a2826a6452e7e5501b54106a061f7c5b frame00001910 +6f68c6558c0eb5e94a68adcb9cf771e7 frame00001911 +b0221effa48c093a91b846e0d5831950 frame00001912 +e045c07701bb92b33536a7da5df36fc7 frame00001913 +b63fe36654e20b5e91b6e4fad2565b59 frame00001914 +2356584b453b21236d0f04f894b21661 frame00001915 +80de3503e589b2251cceb0f0630e089a frame00001916 +02edc2e26c1795305a19484751923f82 frame00001917 +fcec167c1ac26a33af1d9888f9942a55 frame00001918 +770723b878841fcb7af085004f3137db frame00001919 +1e5d5bc57f0b8e4ad516b4c2eee5a070 frame00001920 +b39070acac5c60ab733722c346a31451 frame00001921 +ff7f885e2b233bf74ea8c85347094a59 frame00001922 +4a160e6ae96647408a029e37ca4b0ef0 frame00001923 +d5d73b53007993bffcff7597ef48573b frame00001924 +f9bf0e5d2843bd5bede5def76f722229 frame00001925 +e5f61da0d74b43f597302fbced962318 frame00001926 +5896d196ef6dfdc0a02db1322934d19d frame00001927 +dac2dc44ed0481723c5d078a437093aa frame00001928 +23ca78fd13f99109be4ab1fe354a432d frame00001929 +eb931d82e75fe12ddacff0a88c34b649 frame00001930 +0a52d44e71cbd245ddf6aed7093b8540 frame00001931 +94e2ebd71f779a5c2ecc11fb017f18e6 frame00001932 +c006d05bf1336325c07d6736b9564569 frame00001933 +27c2e9905ac2c522d2ae0add428b62c9 frame00001934 +5aa16529069c2bedc736abdc8de2e4cf frame00001935 +fd8a1404be2119f6a4dd347dd3c0ab29 frame00001936 +5b8fd93520deae2d01df8381485beb06 frame00001937 +0abda01e35ec380e54e41993c79ad831 frame00001938 +30bbaac12c38239b4be5e3cec0fc4e26 frame00001939 +55695df4c0d4bd7f115328570c638aa7 frame00001940 +7cd0ae739969f95a49765eb315978533 frame00001941 +5beb8e9173f9453856899abb2fe49163 frame00001942 +6c9c73afb1c3241a144d609154c04cce frame00001943 +39ef4a0c9fe2d8c14b9e7ed9cf0a99ef frame00001944 +3e37908441567487ee0d093755cfde7e frame00001945 +9d38a40cb8e5f3d63f045615d5f59c0d frame00001946 +3b1c6767d1d9fc9756a370e480624ca9 frame00001947 +dfa87b54624e85aeec7595c8872e167a frame00001948 +1d3e889a8eb26df1ba3a066ca7921544 frame00001949 +e440ee7f2b055133ac63faea37a9959b frame00001950 +076db61d5d04ae5c2a195a17bea76740 frame00001951 +a0fb8cc1bfc4c6c4b75d4869b315321f frame00001952 +9b9a94ae0b5e6aa4502fc979a1a27b32 frame00001953 +270db511dd91d304097829893d1c49ff frame00001954 +69375df058bc98fa6d167e33c377325a frame00001955 +b85a90b1aceb024cc85d1c6fb721f15b frame00001956 +2e520481c1d64ca49755929d4025b4f8 frame00001957 +42a44989afde60a9a4f7097d7d7a1755 frame00001958 +c4ac4f61061ada65c8e5c5a22ac8f6ab frame00001959 +7497da984db7c7ff8c351e34c6b30dda frame00001960 +909f9117b609864d582ee9cb66c7042b frame00001961 +87a6b2054fd57da481a616da8d2c1987 frame00001962 +1d77eb2e07046c8678993a6895ea14bf frame00001963 +a0a10b0ef9f5e75a88043423960660eb frame00001964 +19058a732f34865f036f0164d57238f5 frame00001965 +ed130a263e22c1498b8b1a45601377ee frame00001966 +fdd9752311931a5d53e3b2dd786f59f3 frame00001967 +a144bf51c3b6046271e976a285677f92 frame00001968 +03d06cd12857a455b7b456ceb5b2e204 frame00001969 +5cd95229482c416c56564fd77de1d688 frame00001970 +242d588d6f9633a7ec543065c01107c7 frame00001971 +8f7249a10e582f4f3461d168544b7db1 frame00001972 +4410fc1e99c63c0ec6ca9d7739653956 frame00001973 +ee152127002d8659d61c6e2ef2ef62ec frame00001974 +3027df9126239304c92234272a35c364 frame00001975 +81f8895e8e4dfbd81d4281037d728b29 frame00001976 +656a02d14576dcf5e631eba9cc12ce22 frame00001977 +d5e6ad51fb0c99bd37e075f2dbd8393c frame00001978 +7bd5d34dec00afcb79c1454ae54edd24 frame00001979 +d5a763661b21e4854ddc2a98b26511a3 frame00001980 +2f50320585ace36fb5142f785c2f1313 frame00001981 +1a6dc81d3e784fa2c71695350d28d7d8 frame00001982 +e5d9006da461fb77122cd485f7ae8684 frame00001983 +1c63f47566ccd32cf215a31c7befcf76 frame00001984 +7f32c63e6aae12e97ac75a464033b670 frame00001985 +d294c0e2d1a7666a56624065ef0ecc88 frame00001986 +1d4bec858d29f3b74f11cd4edd534fb1 frame00001987 +c1bf114c779592e0885a764c4e28bb97 frame00001988 +9e35c98cbaf41ceafb058f3ae22a6245 frame00001989 +3bb5583621b8c382eb4726ec1cca5a71 frame00001990 +9ec03084749b306e539741230df50ad2 frame00001991 +ca8353d344307bed13b659fed9359b72 frame00001992 +fb260d25f2d6c9d8b6ce9c3531a2dd3d frame00001993 +c33b061a57c0df711b5a322f22942fad frame00001994 +00ead93a60bc8abb6d01acf18330ac81 frame00001995 +ea81c3006308cd606f002fa7042c5c89 frame00001996 +3b21b83a8a9888eb5cb013b5c650f7a8 frame00001997 +af686282b4ba5d79700e3e5ce619698d frame00001998 +84c4ed0606773e0f8241701ef023c54e frame00001999 +f8e919c4ecb5bb158f753794e643fdc1 frame00002000 +902e680665b64f2e3908def300aca8eb frame00002001 +0d077cb9adc8af25083ab8bd3d8a31fd frame00002002 +eba6a3e2fcc29d1ac0e0dfe76d02c72b frame00002003 +aa0dab12eaee84196ae849d95fcc4e55 frame00002004 +173825f9fa132577026e2854ed0fec29 frame00002005 +d1b92511a6367fd5a176bb89812d6409 frame00002006 +6cca41a2f9fa82d7a90147ca59c810cd frame00002007 +944aafa1e0c7d80a1bdf8240474d7965 frame00002008 +8680956c7f201498fc7df7beb9defd87 frame00002009 +0f2e1eb12f42cb21635a9d830e4de719 frame00002010 +2a762eb57bc2a4a8d033bc8811728abf frame00002011 +048374ffde8204112d216e3042826a47 frame00002012 +296477794439d82093d4029441210f73 frame00002013 +780d613e36856aca58f7d56912846e1a frame00002014 +a7f0aeca713d62c11c9d255162571d66 frame00002015 +21f69490a77c0ce84b3944f185475e55 frame00002016 +2d424f85a6545138697b51e22b68e00e frame00002017 +8aadcda35bb2994f20b8940904ad1bb9 frame00002018 +62ca0f24ddac29d52385b86302526605 frame00002019 +71809f7c215de4dd4fff4cd8bda19632 frame00002020 +2e1ecd048236ffd98ec0385b20146723 frame00002021 +9e162c7aa710f4d312a0d44868b601b0 frame00002022 +b2e858b8549cb1cba6607804ce4f457b frame00002023 +9b186ec1f717dc59cace1de756e38e13 frame00002024 +004fcb2f9d4db4a7abb2930490c76a51 frame00002025 +8bd9927e2fe1e3eed3361298f99cbc13 frame00002026 +37f2c5f1b9215969694d43639da96873 frame00002027 +4a0b54afb8fe505c05565a201190e4c8 frame00002028 +9fb99de6c6e3edeb99e1ef6b45eee80a frame00002029 +21bf68e1093df9757d9002b049c5331a frame00002030 +3da4156c0820387cfea9c5c7d2d618fa frame00002031 +76d0db33d695ce1bf4b3c7f8af4e564d frame00002032 +d946a264a9627b0a17d4492bfdfb5712 frame00002033 +a081ba35cd453f2792891e9dc8639735 frame00002034 +c83c74331b10ae2c88196e0b24f65340 frame00002035 +79004c0841218cd776aa5d714d618e81 frame00002036 +6082fcf0ea04ff38255fb0a666dd07e7 frame00002037 +e73a7b49949ad5aa63986c6fb2b2873e frame00002038 +d17c3902e58a697a3eb660f7dd262603 frame00002039 +b2374b5490380692075b1c7c62e094f2 frame00002040 +010122de16cdb4485655b30a9193adf3 frame00002041 +3708a41143a8a14dffee510d11537cda frame00002042 +f90562b319f200889e4af96abac1ffc4 frame00002043 +d8cd4168d426c75c21bb41e9e9eecb40 frame00002044 +4797e61d9a0000370ea0923a685b1394 frame00002045 +2c3fa9f6b5e3d9eb5aca66374eed9c0f frame00002046 +82892f3800165eb35ca013fa144dc2ea frame00002047 +bfddf40ac0237722ec41c102a2ab2582 frame00002048 +c3cce2ee599d99bfec41d302c1aa28a9 frame00002049 +964ba8ce2373fb884a6995b8b27a57c8 frame00002050 +b1164c1f107099a50e06c134b746763d frame00002051 +822a8ef90a7c35017a178e0b6bdbced3 frame00002052 +24c18e08ee103aeb1d0f282474358a22 frame00002053 +320a616119193940d41a7c83981663fb frame00002054 +4928a083d1238660b50447bcd8fa970e frame00002055 +ab428d8435b43bf25c03141c71d131fa frame00002056 +81468f5c1247dec9f84c0682d15d65ef frame00002057 +8dd69c0ce651723a6ca6d8679f011d31 frame00002058 +fb559cd1cc27d4eeaa9215cb42d1d1ca frame00002059 +fbdb8a47a9db31c58e11358899039568 frame00002060 +6f4dab58ffae9d2abe67294ce60cfe9d frame00002061 +aa77637778d9b3d2be5d4c8ad9c98e6e frame00002062 +5edc7a788553f5a1fefff2e399047951 frame00002063 +31ccbf519ab1ea13620b5810c74cb405 frame00002064 +6c0d8a73f501fb7c4979dc9dcc6608b1 frame00002065 +8ba0e7d1132e5b39eee78d9a73fa507e frame00002066 +ca29793a5345ab7f3b1cb8624ed43e63 frame00002067 +f80ce60eac18fe8bbca4624339ab6fac frame00002068 +b235dac398ac0af0a15b507944986e6a frame00002069 +a4bb3e29dd656e3da28a0659841fccfe frame00002070 +8588a37f40805ffbd52adb1f294fd145 frame00002071 +9996d528d66a28a61a76bb45b683b630 frame00002072 +972b848726e72e269ba062817616bcf4 frame00002073 +57e3ce50acb4d3d7920b2a393ad82053 frame00002074 +2c62a13ebe393c2722607d8e5f09dfd0 frame00002075 +ed1febe8f34841c8363ea83cbaaa904f frame00002076 +b2a06f34ff108e3183548e972f682390 frame00002077 +38a31eb8fcdce5a1e2cc1f321944adaf frame00002078 +455991363d499a0d597e4396cdab1164 frame00002079 +bae2cfbc4b37c7550580c6962c6cdfba frame00002080 +7fee89dedc061fd55eb901cce06dc1de frame00002081 +0a3b023bc2cdf92603707cf2686352de frame00002082 +0db0985580a941337442c0a2b28f8e88 frame00002083 +026f9705e99f610514b621a2513dfa67 frame00002084 +7a6c8329fccecc1b658c4405f2cc4c52 frame00002085 +7f71acb72e60c04e69ef8b98bda0aafa frame00002086 +e8f413bb68f5ed3e14acf9342c9fe80e frame00002087 +da74ff7b5365ec4a18aa61192b8b7763 frame00002088 +cefefd6b49161467200e80f6d0a4420f frame00002089 +004c0cf835d543a8674cac267384f4a6 frame00002090 +6ebac5dc6dd33581b3aa5fdb878dc721 frame00002091 +8a30b09bd4ccd3623f4badae413ddc4b frame00002092 +1736c6041041d717fdd5651fd3c95b6d frame00002093 +f505fdf9627ef64d62055e47b23f653f frame00002094 +c7f9f0d2a1ec478c2a3da937e85fd241 frame00002095 +1d6d5571cd3d2dd0bd576fd5571507be frame00002096 +e71dc80db8ce198b1225e3b9f308176e frame00002097 +dcf63c28ef3a4afe8044da6c371c17bb frame00002098 +cd47d020d23c838a113835a20208b409 frame00002099 +bbdffaf683251d794ed1b9e07bf2db73 frame00002100 +a2740a72aac5be8c99762af2a633349f frame00002101 +89de8ce3d3ec485fc910976a582357c2 frame00002102 +8fa9874d133385e30d0a377c27528ea9 frame00002103 +3035612b3cab2c490158dc07c0ec7098 frame00002104 +b779b1d6282fea6f4d9534adc41c6dda frame00002105 +ac06d5edf5f01b9627102c96cd240617 frame00002106 +1629e61f0e3ddf5e4b1801b71e879a13 frame00002107 +b8ebb370111ba90738b5b1ed5e12aba0 frame00002108 +c74d73642e32e6f4accbb2134f0cec8a frame00002109 +7f41e5edff2b9a3512ee11506842da88 frame00002110 +b4a7249ac8c8457ff3684383177b6035 frame00002111 +85cd01c2d7134bdd3fdc93a9213eff7d frame00002112 +2bc1b2c76341738c8b762ce210145383 frame00002113 +85b34f26867fa3916e254ebc3a5d1c97 frame00002114 +2a5222e4d9cc466547f4610cafeef403 frame00002115 +8ebc3d5b568358997048c58a1e94407f frame00002116 +e231cfb104c1b7f7918c7c6360cfb7c0 frame00002117 +d05024ca0e472d19b517aab5424ae09e frame00002118 +cf5a17026e5060f540a727b9ae442e98 frame00002119 +cd11cbaf7ad09a2f9e9f06868eae2c6d frame00002120 +dcbefb89cc1dd7fd47333ad695fa6d11 frame00002121 +59ee1471c46943bd54761a162c4cdc45 frame00002122 +49a01a72fc6f2b8aba7ce69be39ab481 frame00002123 +f5ff95d52c88065fa56f0771ba77cd5c frame00002124 +1b51163f80aab37370bcd626dc3dc268 frame00002125 +ead9ea9fec3239efe25d7d1d6d95fa11 frame00002126 +ae033a31a488d5d85c832b9adc63ded0 frame00002127 +b56ab42d34b3e9d97c1a26358861558b frame00002128 +b7a7dd893117886a40d7e508394057b1 frame00002129 +c1f933a0bf2c7ff938592526a13f9b2c frame00002130 +d01d8441351a2855c6a014315854a9a8 frame00002131 +693f2b1bda6a5f3ecf5cbbcc20e3c166 frame00002132 +c1839588b2f91b990a80c33f00510518 frame00002133 +b30d31d7ea7d8e0ad072a9f3741f6d99 frame00002134 +dd1ff9f53e6d6d6c303de6e960706854 frame00002135 +ba6d7a8a3b10251d7ef1f378bf0a5ef1 frame00002136 +65780ffb2e210d685bb9cdd082f9c4c0 frame00002137 +785dd44ca6adfe4d381506b96fba6fdb frame00002138 +232de0561508682ce3ae03af268e74fb frame00002139 +c012303405869dbe06e161ffa69a684b frame00002140 +9b554ec66ccc5e5beb9f8299e1a42230 frame00002141 +6ed87d39a2e96bb4e0ecfd5836f6e237 frame00002142 +a61f914a986569c6f991b0e62e300fec frame00002143 +b7f1dbb69880047858638dad8b6000c3 frame00002144 +e737b4aacaca77b723561ce8b79d3e2b frame00002145 +9ab5a0500befe60ae81ff3b6405dc339 frame00002146 +86e4dfc3928b6df9c012b3db745696fe frame00002147 +5e76cc2479f28c2605f7ebca52d51c15 frame00002148 +56bcd035add92a371242e61b025e6e3d frame00002149 +7d77fd622f39453c1370ee7a2e29be72 frame00002150 +b83b9e129215705a3ddf82579c5c488e frame00002151 +4e031119c57b0c94943beb2a80accfe1 frame00002152 +515de215dc4d792e8bfb3a7108ced8db frame00002153 +8b1a0ce99fce348a73a4ec61791514b6 frame00002154 +873e1117b41be506c28dab68d6af47a2 frame00002155 +d54eab561963ce172d5f1f5e15901dc0 frame00002156 +4c936f1dc7371aa47abfe642f38a2fb0 frame00002157 +184f2f5a1e445c696ad0ae0fac308a01 frame00002158 +47f880d573b31b01f27c25e8cd7cc774 frame00002159 +c38afd4f9905e803a530e746a2a900bb frame00002160 +2cc8000fb54687e8ee0b0da204eaade9 frame00002161 +1d5957ee692d89b2dc2a486b421e1c43 frame00002162 +6c7e5d3036cc5ec8cbe05dfffea141a6 frame00002163 +9f1cfebe201c1a61136bd076d9923959 frame00002164 +e80c8bc26c3b57361712214505bdd0ca frame00002165 +07904e45b5a5d9e489616dd585d971f2 frame00002166 +35d28e5b17d7d16cfd32879350197549 frame00002167 +d77b5e02e37d3fc754eff18262c8e997 frame00002168 +8226fd20c9c832c53adf48bc308b6c27 frame00002169 +d7c94e81a0965f3b742df573ce8169d1 frame00002170 +a59ee41ecd4cb3b639cbffeec30ae5f1 frame00002171 +33cda0d01f68aeb043c1e5ebb554c0c3 frame00002172 +12bacc8608fad9503e1a15150ea93005 frame00002173 +9da84cfd73bd1c7130237bebaf3deaeb frame00002174 +19e006c62243984380fe4cec035c6335 frame00002175 +d5f57c2b5a410ea8d8c5f7b8d225e934 frame00002176 +f93c79e609a5d8d1ceb1b450036e1786 frame00002177 +4bb1c66a0799a9c3ee21e646fdcb9580 frame00002178 +9438779e0070b9759554a5a063012b62 frame00002179 +685867a5504e459492707fa1279e2fa7 frame00002180 +2824fd24b0f4d3826ff03f1b62b7c037 frame00002181 +d5e59f2b4e7181ac24ea95ac9f3d3982 frame00002182 +be9eb8d31aa0514afe1ae7e42387b598 frame00002183 +41e6ea7fdf8cfb4ca0786ff572f49135 frame00002184 +8dbb46679b5aa01470a4449066984776 frame00002185 +ce45589bbf272ebf1f4da8786cc6c4c4 frame00002186 +bf48a5ad914b1d1a0f1b1bbe7a1ecede frame00002187 +e758be823282b36e4893b4319dc61486 frame00002188 +8feb29c000ca5c2d773dcfd3c6ef510a frame00002189 +502c13aeb0a5dac8a8bbf8fdd164db01 frame00002190 +9babc860e25f1ece76d8958c8e0007f4 frame00002191 +46c486fbe6a2af47589a655e1ce926af frame00002192 +c1bb5e6a4191a4fde94a85b8423a03ac frame00002193 +596a8a9024f0a9710450b65c0e351a9a frame00002194 +212ef905c9a632a913d4f6d59d86095f frame00002195 +e43d55329b47e1c87c7b8a1114a235bd frame00002196 +b6a165aa1d21e22ed7f4c17f5b5a3dd1 frame00002197 +7797df173454a15a13dc7253805cab91 frame00002198 +b51179ef9bd6a96f06612860967b4675 frame00002199 +50fd0d7e52226495dfd5b9c538e4b3b9 frame00002200 +14e4cb3fdd33569b22f8ea9aa883e7e0 frame00002201 +8776d9e57706fc1c246d60164362dcee frame00002202 +7b15167500a98aafc6a190b201e17567 frame00002203 +f9d62233fd58501094cdcc93578e4275 frame00002204 +bbd295e643fe21a323027e6bd2af8efc frame00002205 +c1898c1dc57eef33548bb133fae78432 frame00002206 +b08c667d939e7aa24aee41cb93388fd6 frame00002207 +67cae862ead0839fcdbb073ccd535660 frame00002208 +edebdd3fb2fcd333f9e36a1173bb7c67 frame00002209 +1105773e96681a806344afe4369837cf frame00002210 +f5d223341cad08100e4ea56ea93e2efc frame00002211 +4b6025ef97c9c8f69c3ab6f16b00ee82 frame00002212 +4920882f8e226cc4c0b77928a6f37fd3 frame00002213 +d59dd09eb694537f8a9db1b7383913d9 frame00002214 +9548e9a5803e1a01fcd77797e78f0faa frame00002215 +e9f9790356d2e3124af94e17830c39df frame00002216 +49c9275024987e781a9d412756df02f3 frame00002217 +c8e3a92610d4f76068014c86a2ef141b frame00002218 +b9793d282092539720513dd64fc97961 frame00002219 +b269e2f12df730968daf7cd991702201 frame00002220 +f3c6dbf308b409b47508e9e00898c8c2 frame00002221 +00d8c3fd50a442765480130dcfd56ad9 frame00002222 +07b49268d1c0b1ac62a643cd6b736d22 frame00002223 +1f92e15b9c67d63ceb49914be87aa9cd frame00002224 +456aee8feac22eba97c6baa6f02541b4 frame00002225 +db99d32dac741bd6e6de811575f8c9e3 frame00002226 +12a7d0e72014f1571dc5f955a922fdbe frame00002227 +75993c60a1d20071e695db015ad69b70 frame00002228 +fb073e881b6111e6660b50c4e1ee800e frame00002229 +ac7cdcd0822cc0f52a95b3f34e17aeda frame00002230 +5ac0ce84d604b4d6cc7e932fd76abd2b frame00002231 +56f276faca4fd9db0e396c183527ce62 frame00002232 +c916a124974311a14d0ec47e215517ce frame00002233 +7b8815f4ba19928dad574176c5a257d7 frame00002234 +48c123338db1f8bcdf2a0621db8c8b17 frame00002235 +f69688f516b906de933951722e57fa9b frame00002236 +7e2225b8ccf5fc77951d8f2f76736ec3 frame00002237 +c97ecf509556f2eb4e7f1548ca1737e4 frame00002238 +b7417f9ca62ad85e3d148d5115fc8849 frame00002239 +93351ceb34a6afb2125d974fa5d26b78 frame00002240 +838c7d9924264c8d160e7d5377bb32e5 frame00002241 +2faae315e8227ff0501b9a8f04b33730 frame00002242 +d8795e39e15f05f9f5e3b6ae269d8fac frame00002243 +80cc0ed9af70ae151ac57885b004d690 frame00002244 +fc7ae7fa2dc3d1f8c05d1ac8a2915450 frame00002245 +ddfa06ce47eb3a4b1f9e5ba94463e8c7 frame00002246 +a64a67763e8a07f78a484648d4e2e150 frame00002247 +f19b001035ae327a6a5b514703438d6e frame00002248 +1e34f84d8ac8479c33d47ef7180ec2bb frame00002249 +0b2d645789ef0332946b4a90a74795e3 frame00002250 +79ef5650779664d44df22e3676e976a6 frame00002251 +437787f931ad50b75e7f9378c769a066 frame00002252 +cdc5d233695f7018cdbaf4ca118a5524 frame00002253 +328a7b100aa054ae0ab8f0f90f824f01 frame00002254 +813526496395b573bec869e6e6eed860 frame00002255 +6a8d6fc021821d44f6cce9b246d2d49e frame00002256 +b9c45b15355d7b1e5d15610c6b1f0a46 frame00002257 +9d243ff12a47831ca26eabfc281f4308 frame00002258 +e9bf5af251b3cecb17b4a4983e961321 frame00002259 +d3a132e8929c02c8822e455aa7848963 frame00002260 +327f1cb90ef0640b852538d7b53ec6ea frame00002261 +1f9ba1c9d679829eb4def5c48be593b9 frame00002262 +dd91e015c2bb9545bf28f911d77c2fbc frame00002263 +429700206cde44f00469ab3559f4051b frame00002264 +1f7d27f1753890a59f5aceb15c380f9c frame00002265 +6d72170ea232700a52f3557168004e79 frame00002266 +1aca05aa111f11b50e655346cdb0db82 frame00002267 +36781398911835b8bf05e8e6825794ca frame00002268 +2fb2974bbd287fec2ee9ad9b015d6aef frame00002269 +69fbd29137dfea77f9c9dc9772f62116 frame00002270 +dcaaccd1c1d53533a0ee931d8a10ddf7 frame00002271 +76ae1df22f44655d2440da80333b3524 frame00002272 +6489e9a65a0dccd2bf59183a4a24cfa0 frame00002273 +7d86d9362762b407a98705b2fa46fc36 frame00002274 +8fbff82989a8890fc9e5c9604a29b4fe frame00002275 +1aa55524a27ebc22f9a16306c1dd88ef frame00002276 +acd1f403155181485d57893838e4a74f frame00002277 +2a7f4e2402334754fb05cebbd5aa35fa frame00002278 +fdf55333c5759573c33988a694a9ceca frame00002279 +5538313ac5571226438002723dcc8a7b frame00002280 +8aab4d061009218c28291290c4528d65 frame00002281 +87bd6fd72954bc9b54b8645b46aa975e frame00002282 +70d8a888c4cf2cf3931e8243e8851b07 frame00002283 +3d8a57a889a491addc83994445748699 frame00002284 +c1095762603fd3898b6de8f28fa2f7d3 frame00002285 +e28dce6f6a827f564170327d505962f7 frame00002286 +e35a5a1f31363b1042b7dd620866d92e frame00002287 +361e056c9ef480a93c68baac37445eb7 frame00002288 +df1ae85d8bdde18572b47013ef41fce0 frame00002289 +43dffc84e30923d8e6ac1304b537830b frame00002290 +142f1c8e5b183b7f98b483c3cefedb6b frame00002291 +c34861e03d7fb83594e90b30c6c9ae07 frame00002292 +0639e1fdca2882d2b6d501da215e8ef9 frame00002293 +04dbe1fe67beff7fdc402915b80d0ccf frame00002294 +b9e22c04b5354e1286a11bfac590e5df frame00002295 +6bbc1926ebfabad21f9e6fb6f6c06e24 frame00002296 +6f010715c460c971faa854a13bb15d30 frame00002297 +38ccfb0b95123ff9836ff13e023e11e0 frame00002298 +31161fb30e2ad3259a0a9b468e71a217 frame00002299 +d740c3a92531657609530df79b029075 frame00002300 +f7f5d67de46833dce18494178b56b29d frame00002301 +0cc118ba6640951aa3f255223d400cfe frame00002302 +184147d472f3eded6240d52271215c6f frame00002303 +4efaa99acb9e5427cfd507ea8fbfd56b frame00002304 +7731cb3f4987b2dfc1ec8d62a1c0f56d frame00002305 +ca93e652f5449b7a5bc316c8b8b48511 frame00002306 +07830cfea3c67ecf3e04bf2fbc8e0ee3 frame00002307 +bccbc606cc89cb289e16c425fe0151e2 frame00002308 +7658555a1a9ec9b3cc8a737acb2f7605 frame00002309 +dc80dd6a30d789a77bad00e12da3daa5 frame00002310 +cfc664ea198a1dc8cea94fd2708f4df6 frame00002311 +1dfae0c9c3bec624a161c4a2977e0ef0 frame00002312 +7b63a3cac2ef7cdeb250f1a3d5387f98 frame00002313 +03944987273a78ab02e4c8f23789cce0 frame00002314 +69e09a9ba04bf2db67d744331a66eef3 frame00002315 +07d41240cb5744c92b8968e5fa7be0a1 frame00002316 +427a5c1725e214d8494067c487700979 frame00002317 +d2170fc5d7542becf49b458140650e9b frame00002318 +a0bf3b998c18ed67fd388aa45e65bebb frame00002319 +909d4e0d93a58dea662804f518b83da4 frame00002320 +9c4379d9c1f0a4d11c6ec17bfb5f3027 frame00002321 +bf6e4f26c7a067d781398eb585291bd0 frame00002322 +afe195f783df4586d171a6dfca8adc95 frame00002323 +38dd03db3c0acec80aaabf95e12b84bb frame00002324 +e06b96fc03ee872a3fee01887996f58c frame00002325 +9cf9f6b4f81ec04490e3c79057aa6029 frame00002326 +218c97e25e2fd4ab5328a6e8293d37f7 frame00002327 +a6730e09dcaf7b35380d7002b81546f1 frame00002328 +6907d2237b5cf714e3316c6bf4b768a7 frame00002329 +9aa6f57724fe71d7daf924009ff8c981 frame00002330 +b52d3f9da38686520fc399dcb1ed356b frame00002331 +55c577509f12c519f2a2700242f3d587 frame00002332 +95515731f1781fea9e3a9e640232d2fb frame00002333 +5974e782baccacf7792ceecab810a792 frame00002334 +17a010e960ec759f79e734c45cf6fd95 frame00002335 +68d0147a9189029e86a31eb62903ea2f frame00002336 +c9d92381477827512791c2b6107bc215 frame00002337 +5ab619f44afdbb4eea005a49665a07b2 frame00002338 +39fd805322cfff7a94259a157ca66985 frame00002339 +016ec4a50bab68db3aba42e218114056 frame00002340 +e861e70dd414f1aaeeb059b9291e0f84 frame00002341 +501e04ddb7f86de74d9fcd9fd8605e7f frame00002342 +cf51d051b71da1ce6e658d6f5f710d62 frame00002343 +9a4e00e35cbd01cbb9d91269ca6dd126 frame00002344 +28d5215fc66614aebf36d75344c5750c frame00002345 +7d3f854c167a2e37b53dd39f05e564df frame00002346 +5b08210979b47f71a0574a42a9b9bcdc frame00002347 +4c5daea2ef006bb918994fcf3e8d6c1a frame00002348 +977daf52b4e7dcb2d2dd26fc0d723e84 frame00002349 +f05e6f0e4ab4f6b72ec06225ab24cba2 frame00002350 +948f46e89c7a47c9cd39e91912e9586c frame00002351 +9d86095cb260cb24abc5586480db8023 frame00002352 +640a4664d4b2a4a7eb945f0913f065dd frame00002353 +c6e8452fb00852b31f1c7504a091ef77 frame00002354 +dc2bd1936cb79e7c27eed596f58e6e9b frame00002355 +ed95f6812d63006041ba68cbf22123aa frame00002356 +59c066cdf082ab0000f19a96fa7f8c92 frame00002357 +177f9143eff33d4cbbc9bcf03e843341 frame00002358 +f84870b83bfe83e3f53fd2cd0786168e frame00002359 +1e6266cfe44eddaffdf274bdd2ac58e0 frame00002360 +756885b742b59a15463648bf34afb3df frame00002361 +b8096884801a569ddd5fba199e0449f7 frame00002362 +03a2f898f390fd9e7c1e9ee672b35716 frame00002363 +fc84917589aee96b0f2291b8e855d8fc frame00002364 +c1e0e472eb2e5a7b07cf9332d5a33428 frame00002365 +35607777a080f797205cd6f4eff05892 frame00002366 +eb20c1a6adedaf8a1849cf705dd9619f frame00002367 +ece10c8155a2920f8c756f48c5d06619 frame00002368 +1175a32b958a09d73ab4eed34bfda155 frame00002369 +a21c697b01cdf2b69dbab3f2feb4484c frame00002370 +29375fb2b9d1d7e93edea8d0f4f4e369 frame00002371 +eb0e4686fd88f9841cb15b7f56cae45a frame00002372 +e194a10b24aa58f61d65987f281f76cd frame00002373 +c1456422d62679ad2ccb0b9dd8d107d9 frame00002374 +b57a562c03f1cc18d65d53e45a7ad9c8 frame00002375 +ddaea16020cfb3dab649eb1f3940812d frame00002376 +c46038da9b7e5b1387a073d8e725be78 frame00002377 +5671c496ef5ff430f6e080fbbd115f73 frame00002378 +fd082d987ed913c486c8b9a8bc1386be frame00002379 +3ad3517cc32e8a4f4bf92c9fa294002b frame00002380 +10fd12a0497c83a1278501051dd2a9c0 frame00002381 +4125d7201a4c7211dfa870e1184c8e18 frame00002382 +1cba4edf21de8c5794991164e849bcf2 frame00002383 +ad2d42318ddab52219427f5f9bbd392e frame00002384 +d638e75008a7f6c1119bb390d0a6cc59 frame00002385 +a4e8bb46352843a3aa0c2f7f690d0ce0 frame00002386 +de8d07d646f1a51c9da2618f7bef8db9 frame00002387 +7c1fed04ffc8ce44c7cda2d9672fe358 frame00002388 +cde91f760ba835765adcc4731c16e833 frame00002389 +ef5487be1842846b4068c86f76508585 frame00002390 +8cd46749082cd04a709adc57a7f0b3a3 frame00002391 +315b01947f247d151ce14f89ea82a041 frame00002392 +02f8a0d652df161de7ff1d93657cdf4d frame00002393 +cae9b9fe4b63ba073cfe828f83b3797f frame00002394 +402d849e1c053a62f890a8af56daa950 frame00002395 +ff7eb600384f3fde2a786b08912f9889 frame00002396 +6537119bee18bcd7c18922ba6490ab00 frame00002397 +5e04d8be049254f72c9fef3a83bb69ed frame00002398 +853667ff939df16509432a151f6cb407 frame00002399 +12f74235c1339ba3a60e0b113a6767f5 frame00002400 +8bd50b3e15ba199301673bbc7102a937 frame00002401 +8e9479d6bf3d30beca549461197a5056 frame00002402 +a72aa36ab43dd3f9c5feaca086d9f67d frame00002403 +d87fe9e507f808b3c267aad8b72dc1b5 frame00002404 +7e83245b1f889ef828378bfe5383981d frame00002405 +12f2a57ad2d1ac6df3bca6fefa978d01 frame00002406 +d7e86593b7d8dfabcae53cf11322806b frame00002407 +a0230f70985e2a7b55e7051b91f9e46b frame00002408 +ad5180cc5a627470b454bc93dcec5810 frame00002409 +a8fc4a6b21f41e0a0d3cf6877623dee6 frame00002410 +9d50008c0c47c385a92457ecbed8dc7e frame00002411 +23c3af83db22a4d7bd1070c265854246 frame00002412 +6bdd1b3b41a11f428c44c57da3e44972 frame00002413 +655a8d1b9a7837dd31b2730be0a43f7c frame00002414 +0b2d4ed0210a62e06d6db2dea0be562f frame00002415 +93194be2b92a1c59211286ab25c19fd5 frame00002416 +328df766beba62f54e0dc3e3b733eb91 frame00002417 +5d438697e6c46266365d5fc6d8a95b3c frame00002418 +e63f488100aa01fc4523e36d949dd511 frame00002419 +bd022eb8925e37828cedfd63b7ba9e22 frame00002420 +bd7c3a549539d233f4ebaf22b1c0717c frame00002421 +3a34deaa494bfd1a242a42fc5c603d5a frame00002422 +acf2691d40f3134f3741c213de4a61c5 frame00002423 +6aac06161dedb06268e5964631dc94f5 frame00002424 +fc4f7c7846155890d88adecadabf492c frame00002425 +d4aa168efd4b31efb2729ec33d00d1e6 frame00002426 +73482537bcd7f0b1439232c1df6ddb91 frame00002427 +7035a95fb61a40f5c97babd2da80a469 frame00002428 +bae9ba18b3decad8278146f5a2daa7f9 frame00002429 +7d4868e8ce902e7667cf10918078b886 frame00002430 +02e471150b05427e67e498541917b7be frame00002431 +8892a5e5972ed246ce2749132b9ab996 frame00002432 +692364879248725f4232ccbda24460d7 frame00002433 +57c268e1a6f3f2e024a69f51a9338aea frame00002434 +a0b21b94b4a624a4bc9f5954417a72fe frame00002435 +70cf001d3e8aef21ae9f6e67699d5d1d frame00002436 +61637661922820da8849fe40319d4fef frame00002437 +619375f6afbba1a78ffc686afd4c6858 frame00002438 +13ec41253cc1a517ce09933406af20b3 frame00002439 +53a3eff75187c6a74a9a7eeaa38bace7 frame00002440 +4824a8a8efe4002f0e40579f528a3cd6 frame00002441 +6259c340f908ef3c00e496fa9118eb93 frame00002442 +2d999c3034b58590342bd683dac4dee1 frame00002443 +7c5e87e4861c617717ca28bc29e97a7f frame00002444 +02d537d268872f04eeac128c059229c8 frame00002445 +1d6ea41d89f9be287775cbaffc48bcfe frame00002446 +a41d7b07cddbd6f24e4a6c71bd72ab89 frame00002447 +4451f7072ac1646fd58f3436d744b050 frame00002448 +790c2e03bb3bac3bcadace15dde16c4d frame00002449 +5116d8fa23253cff67fc51ef7b87bcb0 frame00002450 +d335721a04865d855bc181429696898b frame00002451 +32a2adf7d4f3a31b4d2e8d402246169c frame00002452 +8311ac5044a8aa34d57127003109f923 frame00002453 +fba6fd1510f84cce50a19ab3b5e1c980 frame00002454 +5a43982c770667a5b7bd3e11e81a17be frame00002455 +ffa43f44ca1da2eaf90d8e0fbd369eb2 frame00002456 +a545fbf1d729ac5596d06ee18f34caac frame00002457 +140523037b8846bb031af6f3f16d6b83 frame00002458 +150b7e97e84acf11d25a05a464a4a88c frame00002459 +90a9bd3f0c6c560aeee5c0134f5e3f5e frame00002460 +29bbbecffd9d84023ffd47beafc41b38 frame00002461 +4c44b940f953fad6ce47fc71e3f9ef05 frame00002462 +16f304fe2c3a7182669bfbbd4f12c732 frame00002463 +9f590e7efc0b6cdc10225ff9379d85b3 frame00002464 +262707ac1f966be7f515fd1cca6083f4 frame00002465 +e393e00d8f9b70ab9b5b2262a7281496 frame00002466 +431b715b8cd8ec3c4b655b4d0f6fb3bf frame00002467 +bbce63e81a4a7dd828865eaf70096a97 frame00002468 +0e66e3c0d045f852260c8d7c5c4541ce frame00002469 +9151a95ad1d727abe4689dc95e277e4e frame00002470 +69674db1bd4b771821ded0b10e5bb251 frame00002471 +82c803d96a03d20fe3841a8239658817 frame00002472 +debdb9e96c1c3ac7386a196de7d13740 frame00002473 +9845683fcda2243e7b58848315997355 frame00002474 +8ea6b3223003f6c145b1f126314c38d7 frame00002475 +37731baaa1220239b145eb9a25cbadc2 frame00002476 +a32d0e7d93901402674a4ba93ae4db99 frame00002477 +e1e5ccd6e9c96ed779ef76342ca43c2c frame00002478 +134fa1990f1f4f269220f0b9923a0085 frame00002479 +c21641e413b7d5fd033963d6e2c229d3 frame00002480 +124d64f4c17701428cea31faba6c1f82 frame00002481 +b3b691d133625bd09a94892b0df42c78 frame00002482 +c3bd95b8982d4c8b6893c272c0f43334 frame00002483 +840c7e3e168c09e7cb092a62b471a309 frame00002484 +04b5d9472b9992b95686aa72c9c8c6c9 frame00002485 +e83dade873e913be03778ab6cf8137a8 frame00002486 +6ce82c40e3bfd860e75945990f521152 frame00002487 +f97113cb8b7eb9e9f171d814794c29e3 frame00002488 +90edc4e5f8fe178ad32af9dadbf944ad frame00002489 +0e30f152f0329ba519fb5be5c17dfa99 frame00002490 +c4766c8f3e8b666a226c703207760750 frame00002491 +aa3fd044e7d1e86a46d1c09273b292ca frame00002492 +cbcb0229e38bd104a4a398ed96efa0b9 frame00002493 +35a26006a60a42d0e14f9d9568f26c42 frame00002494 +1f5d94ad99aa08d56c626876e510dfa6 frame00002495 +cfb8210a17eeb5e6b07ae896d109e233 frame00002496 +94f763407ce86a5683befbddfdb952fe frame00002497 +43f509fa2e88d56b1acbfb2dded7871c frame00002498 +f8bd0d901949f4f8d6520b0f44b04d58 frame00002499 +598dcb57b17ec58be704dcc77781359a frame00002500 +1defd9caa82a74f4798c108a8d2a6985 frame00002501 +2b5b2bcb89a8681343652d0cae4975f2 frame00002502 +3b20176b73e3531efb5ba24fc8ca094c frame00002503 +910ab446f22cceac901118adea9c0511 frame00002504 +91c701b2a391928452667b4e73d47168 frame00002505 +78cfbcbcdb7cf2f097fccf5454069fa3 frame00002506 +97de3a3d6826506f0958d05d48cb6212 frame00002507 +2c9cab7495b709cfdc6ef769dad8bff3 frame00002508 +dfb33e5ed573682939d2f92126494d18 frame00002509 +f88ce47f58e4a1d179fe62f5251c4c94 frame00002510 +1e601368618e31218c4789397af542f0 frame00002511 +1e6f0a0e52d8e5577ddf5b1a7d1740e1 frame00002512 +9874b0d5149b86eb9c6c24aa218e1c6a frame00002513 +d36c1c924dbd692f92c738d34a7ae547 frame00002514 +31774ce32a2523dff7e286be5204e145 frame00002515 +9c571adfc6f50d6f9a1c935fc189f6f5 frame00002516 +e33e174e140c126cfc2b5125daeaae2e frame00002517 +6fae9375bf2737c304c45296cc4aff87 frame00002518 +d2a79aefbf7a2e796b176b65cff3606c frame00002519 +dee82170060cdba55f76c0193255b995 frame00002520 +382574a19df4e8aa42ffed487214ccd0 frame00002521 +6366ae093651f6df3d64d00b2159c0db frame00002522 +1b51b3668deaa224f1a74f659318df8d frame00002523 +ee7b82487977520c737a1f66163d0d9d frame00002524 +bdb7366522b999e6d22b5d03e9d36a01 frame00002525 +5b66b15f4f076539183a12dca4b234a2 frame00002526 +02dc3323e15d5fa31db590107aa4934b frame00002527 +e096ad4ddda4546c8d581f69058ac1fa frame00002528 +b61a17153dd5e271cbd7142a31bdbbfb frame00002529 +73b19c535e605b97c1cb723cb10a7d57 frame00002530 +e365b4cc57c251a84d131d3b69f20aaa frame00002531 +8a6d81d87972d6f162d49b140bbd0804 frame00002532 +4d40673dd876e9f235fb5ebe269d9de0 frame00002533 +afa4bff0bfe2cf50c42a3b93e4e27637 frame00002534 +7c8bc7ab035ead07ad93983462d4bdb2 frame00002535 +72d6758cf619de7185a5d5d647618258 frame00002536 +8b2473a8b6ff48c344454bace2bb494d frame00002537 +bf5176fa064d0a31bffa89988fa4e9fc frame00002538 +fa76322d76d91032ecb2d587ad6521f9 frame00002539 +a25141b2e1727a0dbed7e1bd2ccdb87b frame00002540 +ab1bfdfcf1738b515ce5985261449706 frame00002541 +de93aaccff6af2eeeaada218ef608f01 frame00002542 +e8b1a6a40dc262f653ef962840dfea3f frame00002543 +d8a11fea19fc7fdd59e81af50973be30 frame00002544 +2fb0120937a3bd5c528f5a37ba3512a7 frame00002545 +f9a8e3068b7338d1b1a7c5dea9523974 frame00002546 +b7e2017f80b6d2dd2ce7f2a184544ff0 frame00002547 +4364a3150879084290f3e588ae8f3748 frame00002548 +b0da7421152e10a896efc9b6bd4026a5 frame00002549 +4d5137f5b599b1a772f54ed73db14022 frame00002550 +65fd12f4957942cd6ae1197b53efa7b8 frame00002551 +4d3a660dddd04a47cfb9fa7007b80c30 frame00002552 +439c53f6b0f77410e858dd38ca003fbe frame00002553 +58746b6fddae58b1b59e614347f82c97 frame00002554 +d9520ef612196512df558c1dbfcb48a2 frame00002555 +00d996c22118205710334df8cc7042f2 frame00002556 +db3ca57c0e4641735232f9af49bed3a4 frame00002557 +02136a3fcb1371d23581fd4b7c7caa0d frame00002558 +df726f24a645d8d2140829dcf6337c3f frame00002559 +f66eb6127d6cd16b2348a4ece5276b00 frame00002560 +d95f4a061fd50cabcbe3db3222eb65e0 frame00002561 +65bd009c32b6d1318b2cac24b17fdd42 frame00002562 +6171aa5accbbaf96df9e6c5b38cd354c frame00002563 +3311ff23e691f1df84caecb5188f0814 frame00002564 +39edfadd18697fb02f2bf466f2344eac frame00002565 +af7998873c594d307ae113a294025f15 frame00002566 +2737d4cf69a5adbf4b9579190b093464 frame00002567 +d5bb3711bf62a4650c9ff3301a5ec784 frame00002568 +7c0fb1388d76652d237e5de090afbbd0 frame00002569 +f4516c47ffd3b7fcf603e33b817ef162 frame00002570 +a5299b36069fc8b6fef6d266b28857e2 frame00002571 +b2c170cbb1ef2b79ba62c1f2e1920a43 frame00002572 +c10351a9c31410c4774283ddfecc7377 frame00002573 +5b649022863e0fffe2c2b8fb211bcd75 frame00002574 +6117acfd974811986d1b3aad54845e93 frame00002575 +c7f8fa4a356ee52addf7581f31c29fb2 frame00002576 +bf72baadf6443222ea0c8d22e7a0ab81 frame00002577 +6bc3506328a629690156916779a7f3bf frame00002578 +b7fe24166a7c48a5a6eea2d614920df2 frame00002579 +8941e3718a006d13c31cf8b8c1440069 frame00002580 +2ff31ec181ddf03decbe3b3c94092933 frame00002581 +cca22e5e7b1547ddb28f1302e6ccfba6 frame00002582 +3b00c498ce9f5ffd454fd2c314417195 frame00002583 +3e467ca9af1875264877a5dc16cb0749 frame00002584 +58f0034c019b11bfa1ed1553bb7112f5 frame00002585 +68baa2130cae7f9cd8ef48194c78d263 frame00002586 +f4f61c9e19068122a71e8f480ba7b125 frame00002587 +b0318ad20a70337db21a48bdb9241807 frame00002588 +c933dc307ee0ebb1be37fba96545725c frame00002589 +59adf6c834b5d34885cc151e37aa9a2a frame00002590 +d57baa74e4243b229b7544cb6332d6e8 frame00002591 +819a9264383390e4e5c14eec65738c91 frame00002592 +db275dbc257db5c3855efb1761b759b6 frame00002593 +3d52c4a171b11028f9e1ea89ccdcdd8a frame00002594 +e3fa072ad194eb9fcc69c0444db6992e frame00002595 +ccf622174ff3793d125ea41bf2f7fd3f frame00002596 +ef4a1509562727d7977ebd84a4549f82 frame00002597 +bf26c257663f17a2a5931984a5753428 frame00002598 +d00a80e8ca10f067d91db4756fa2f24d frame00002599 +ef0246c4c8b75f4e22dec83f63b06d21 frame00002600 +37f8916e1fe97740c5610cf7e69e7f78 frame00002601 +245b457ee4a896c5e8e248211a0640b9 frame00002602 +2b79d1ffec894dd5921801dd681f0a75 frame00002603 +05d0566fae73a6a1bb12749b23f3286c frame00002604 +98813b7e373bd123751a26551a102ae4 frame00002605 +a91161d8b42f81eae5dadeddbd809f2d frame00002606 +4958044b27789543df4e62a59012d92e frame00002607 +e456e78baee5334af8482605e2299fae frame00002608 +eb644c5bf2b99e35c35a0afb2acb076e frame00002609 +adf823a91f2d0f60f0643e20a42f973e frame00002610 +ac273f6064198597e97e3e846b0bec16 frame00002611 +31432015af26d4a7f34d7ab1bbb23c75 frame00002612 +d1efe1efd174c62caee78a5ee019c643 frame00002613 +6c8a848d5755574bee54584fa8949fd2 frame00002614 +b59120d3646a1ed0933d8f3638deaa1a frame00002615 +60de549824f37ba8c2536357621d4ef5 frame00002616 +868c24ab507c5a458e2ea1dca493a84b frame00002617 +f145cf7e95267be14b12f1c3bbcb6670 frame00002618 +45ccc2b939eaace78e83324d1a83c44f frame00002619 +4f51aa32f61dd2ab210d9506c668dc5f frame00002620 +72f2294fb0e01468b53a420c92841953 frame00002621 +650d887b48b5aa0629fe2787445d06f3 frame00002622 +460dccd9119c1861d8dea29e0de0cc71 frame00002623 +3cfe93bc5a76e073f2300b56f43990f2 frame00002624 +76445dee143911d3e5336a277397649a frame00002625 +6376219a391c793cd5aff7ea52fbec3f frame00002626 +eec5e4aac8e9fe6f0ecabad28858e260 frame00002627 +5bd70d023de5f6d9aaec7c47073eeb91 frame00002628 +34bd5085f414b624ee8d2b65154733ab frame00002629 +b5d0c53ec431c02a814dcf9eca6c7058 frame00002630 +cffb14db2996970d19a172f50e121cce frame00002631 +29cc0f9e4408cd1a5d19ef22aa8f9a66 frame00002632 +f92bfe2433bc1d51e326c7e814da7a41 frame00002633 +3e4c8078003e3b436d1e6063ac9e914a frame00002634 +716003ce892602cbe0a135fa75938333 frame00002635 +ba9136a9875037f28a8bcad4c22cc3fe frame00002636 +b60248a2205f76bcd85878a5f2e04f9d frame00002637 +172e84025b4444ed8701f0af3b85952e frame00002638 +6bddc9ddbb56f78fa7506b91ea2ff6e9 frame00002639 +11986bfb0c0c5b43f0bf807973216ed8 frame00002640 +89fe6ccc21a8ad5ec485504e117fec19 frame00002641 +4670ae64ec31400e0af746f725a4c710 frame00002642 +59d8a4fd6d26e31956eba85f66529a59 frame00002643 +3a0ecd137dab49e019b3210b59687f1f frame00002644 +261ad8333dc44d6412318c3566a3d225 frame00002645 +96262fdefb65ba7cdfad206b85e11585 frame00002646 +55ebe11bc6f6f3f9537724905f99eb9f frame00002647 +05c8882edc25f30d95036f120f3a9b1f frame00002648 +4db06a2e47de215c8c8f2612fa4ae232 frame00002649 +6da5da6b9a9ea42d4def68a263dae40c frame00002650 +198a276f9caf0f5818fc908679fda25f frame00002651 +c318d897e7cab4cc412600291b7fd2dc frame00002652 +52f13609178e15c50d83ea16068f90da frame00002653 +f45cb67ab7bedfbfd84dd0db2eafed6b frame00002654 +d9f58d6e072a7cdda2dc5522529ac55d frame00002655 +e16c90e3d592b03112e3999b19828be2 frame00002656 +b51f6336f469bf846460bb28df2a612b frame00002657 +384e3417a22dd95582d6cfc26720f368 frame00002658 +00746f3acffa7188b0c4bbffce4e1fe2 frame00002659 +d33a29ffe4e1a2669f70cb0606070432 frame00002660 +2b10bc16732b6471cd713c32b93c7e23 frame00002661 +015090cca18091fc0b2175729d12fef1 frame00002662 +345d906eeb51569fa4dc8039c50aee10 frame00002663 +903b882c21394509336ccf2776aa4ce1 frame00002664 +de32b857566b18b6c300c0fa81d2565e frame00002665 +f1b6a08ca4aa8f40df4bb273dc21d7fe frame00002666 +1e247094adfdd899949ffa7b43087c13 frame00002667 +312bce710978838bac317e2ddaf972c1 frame00002668 +89d9cb5cf3b6b83e2f8692f28b3141d8 frame00002669 +9ce0627aa282265ea8ca98847ae99747 frame00002670 +2cd0feae56fcdba85c5ca851f20425bb frame00002671 +ab4403b3ff54da0b5b968b7ace9fbd72 frame00002672 +a692706f6096dc3a737f2156b5291c5e frame00002673 +7927e9722c023a45214f86ea9a0b9e83 frame00002674 +2a238a8e832b2ccd76d82da0d9cd0c4b frame00002675 +c3914f8b72ffd879ddffcd286aaebdbf frame00002676 +0fb92e8cff81501e8ea92cf9ddba64bd frame00002677 +547aeea002edc78ef58f956ee1cad3a8 frame00002678 +63ec54a5274dea8c783ab2fc44d5dc11 frame00002679 +f944087a81038890aef8b2aadbb0f838 frame00002680 +9307173dcf534e8b1d497f74c4295646 frame00002681 +22bdac931d0794844e66b2bc7a4aa99e frame00002682 +42a4115ea9d0a81e9c889b83281b7951 frame00002683 +9f8fee6021940503f6b58f4c0f8cab5e frame00002684 +a9b3c2a2b3965aab56ee6fc5addd40ff frame00002685 +985046f6ee71b1a852fca069201dd158 frame00002686 +5a3bd2f66256aeac98bb3070c03166ab frame00002687 +eee0945a1d2eed4e889d9d099307f0c2 frame00002688 +87d17dbca6e4a7911de1cbb0204e5f6c frame00002689 +ece9c42f9cc20af360c9cddcd3fcaace frame00002690 +221a9459d88b8530b2b09d3e2738235c frame00002691 +e7d147650fdcb6b070e957e31fe0673d frame00002692 +8b97a53dc6372a1fb4f6a42648ece661 frame00002693 +0a34c53353eeaf894e3c60131e579bd8 frame00002694 +54bbf245df41e1cce4b5d1c76c31e518 frame00002695 +8e65d628f697c4d2884abfae0f2641c5 frame00002696 +34bdb5cb7691782d019326dbffce35eb frame00002697 +eb38f8df807cd3474c5118f64101d0b4 frame00002698 +97797d078b922658b4f602d923e8db56 frame00002699 +f794006d56b1edc3104f453fdff05c7f frame00002700 +919bec705f1de0ac03133a451cd17b9c frame00002701 +26736106244a3c2e39b5167ef6f0710c frame00002702 +7356efb807d7e4f21dad0c085bc68360 frame00002703 +7fe6cbcf9a6128d5d58f5908f402b7f2 frame00002704 +79e480348991f4b9181713cb538898ab frame00002705 +091c9cc58621171e4b7e0e0c1f9edda5 frame00002706 +3edf026e5ff07cfc381fca973d401dba frame00002707 +9f5cfb04a1d5c9904e5786fffb7be85f frame00002708 +44c487c0e3b7473ab7d3b47faab34cf5 frame00002709 +01fa8a82e5b93b8fc0c012d84420c12e frame00002710 +e92670ccb1d8ce45760ecd1db766ce71 frame00002711 +b87f8dd519e47a69d8bd5fb8c6e01a74 frame00002712 +6183d72e0c82be0ea1793b483c71c768 frame00002713 +0240d480888feacc558ec3178ee7c94c frame00002714 +e0021a2f38e4fcc9e0da905455f8605a frame00002715 +18ea8ebd98f1cdd20cc62ca25783f268 frame00002716 +5b438047976bb718f44ae218e9862ece frame00002717 +8b07e51542c2194b557ecc627fbf0bd2 frame00002718 +307a6a233b66e471125429826323c8a5 frame00002719 +5d930f597a59e93ec35d43f4490f2b97 frame00002720 +a5530bda7cfd93fc580358a3752943a2 frame00002721 +862a270905e6c50d7155ebab975723a8 frame00002722 +468f17498109d04aaff4e5b2cda5f41a frame00002723 +0bc397600aa43b2028f587b197c0810f frame00002724 +4a2e132d387c3d8ac8b5d944097c0838 frame00002725 +fbfaf8a85c68da09d4af6bd16d178caf frame00002726 +e70a0b7902d1995755ca5141105ba5e0 frame00002727 +3f5d7b0cd18343a812553f4482679c40 frame00002728 +2ddca27502990a6580cdbb16b284273c frame00002729 +6b51e2d2e9d56a810c314926df0f392b frame00002730 +f3e2d566c6ac3d8abae2ae64eef81c78 frame00002731 +fa9d1ae3f1e939b07a347dfa2432a2c0 frame00002732 +8d2dd3d64efc987e9f1488ec54f7e171 frame00002733 +da73d237e608996a131eb3c4d7f1559c frame00002734 +98dd920223a45ccb16028869733f95d6 frame00002735 +a6af35de899b28645e19abedb168125b frame00002736 +0c5e1eea16cc1f47bfbec7d97c229428 frame00002737 +796c8b005c4fbd15400e8ae67ca2ced1 frame00002738 +877a4306b981858870dd02f3928ed140 frame00002739 +8ac98559d88314ab69dc01a8b4459510 frame00002740 +e69831af4411f13211b63e6166705630 frame00002741 +e6c1a4f81d418886f30a94c7e0ae712f frame00002742 +4368f35b79938936619ee8327ec752ba frame00002743 +6988c38bf0d52287d45ce1db145f61e4 frame00002744 +a46744ac77ab3f00397339fa77cad7a3 frame00002745 +6af3433977ffd66f862c5961711d19de frame00002746 +c9589edebb4b2e50c6e198f2e09aeafc frame00002747 +5a267058d916f6edd2c092716c760a9d frame00002748 +05a1b02a551adb40778a27e94b73162d frame00002749 +f3a5aee2b82b4878d96232a6ddf49a04 frame00002750 +bd4b09f517fa349c58ff78f548fd53e6 frame00002751 +bc76336fae4bcaa40643409487bc3c11 frame00002752 +0d650ffc27a602b4bad55dbbc72b2c1f frame00002753 +42e3707be3fac8be521a9d7f726e369c frame00002754 +17404909f30baa2672821ce0fda29bb1 frame00002755 +9f7fee80dade883c766ff41590140610 frame00002756 +1a05c89c064e64d9dca70db05c1b21ec frame00002757 +c840a160f47d6c28a17f0149fc6039dc frame00002758 +e3a74f5b18339948a1dafa8723de5df4 frame00002759 +9f975050c12391407e4c837b60166ddb frame00002760 +17eca548799100008bd6d4a8ab7afa72 frame00002761 +cc4686df701ab80fcbc19ef39883b9b3 frame00002762 +864b42cec3deadb71df0a808e6a9b181 frame00002763 +8c16fae735429d79a50b4aaf053cf00d frame00002764 +c3fef7ae337d75369d15dbf64741da41 frame00002765 +217880d8f819c898d0d33aae0316a5cd frame00002766 +1496d9c13f46c4bce9d1a372c3405727 frame00002767 +625be8112ccfb69137b0451f93734468 frame00002768 +edc5fc8db7d860f56f36a9319de67bb1 frame00002769 +816e46a0178e908146825dcd8220d8e4 frame00002770 +cff57707e903ffb25d6b5b582de1f947 frame00002771 +ade9bc1422e72e81473f2cfa6d4b4de5 frame00002772 +66c152e9ff7dd3480876b5ffe8d558fa frame00002773 +ce766d981c67af0c7a3059cd77cc51ed frame00002774 +c434d0ed2b8fa7bca5b9d46a3aa02ec9 frame00002775 +2e5cbea976c7427d08121f67f5ff4c21 frame00002776 +43003a6a09918acb98dfcbd0c58540f9 frame00002777 +2104bc830898896aadd7937902be23f4 frame00002778 +3b2fa6115fe552c295e229fe681c096b frame00002779 +14faa78ebf38327fcc80c7f3a6df9341 frame00002780 +5d0f31236721ad8e80847b69e02b058e frame00002781 +ca06a4eb8a08c71c96aca286fc1ced6b frame00002782 +740cc185d16107cac20b2ca287c9fbae frame00002783 +c4c9bdeef60c347c3d5115c4d8fec2aa frame00002784 +3e735b85e87b3984f2b4f7b6c871f4ce frame00002785 +f9ad7fa550c789fa8042d7e141fced92 frame00002786 +bcf862c66a10e1286ec04970861fa27f frame00002787 +3c0b914f42f559d2f7d41135c65f6ba4 frame00002788 +db3e44d704a4491888fe629ca117259b frame00002789 +86371f080953007cbe7c2e925df78f8e frame00002790 +a59823de6ced99202047d533435f0aa6 frame00002791 +3ed038dc5f601ba01da9c186ba04845d frame00002792 +93f51bb444dd252d6849dcb6418e7dfd frame00002793 +6c169f8872a3ee909060591615b8bb24 frame00002794 +5f2124323ced74d2a62816c3b00276f0 frame00002795 +10741b821209e8c924b2e8c9373114fe frame00002796 +0d175904475d43e5d2a50cfc21ce1184 frame00002797 +343711aa54cbd70cb2f0a21e16b83d93 frame00002798 +020c215d70c789eb3c159be540f85433 frame00002799 +820b7860e698fd100a116458d3ac994d frame00002800 +4f7e3a9289bc9f3cadb19c14f7748ee9 frame00002801 +341ec69936eeea948b3550f44fde1fb1 frame00002802 +c24559d1fa9d129408c1d63f3243db08 frame00002803 +f31079da448db8b49ddb0fab31546f06 frame00002804 +de8ef1d38f2f1c5e49ff3f98cf65cdad frame00002805 +4bd412e78fb9a7772eb11ff45de56003 frame00002806 +735995846db48e35d470316fa60465fe frame00002807 +17b094d472165a2798a36edbd88e9200 frame00002808 +9486f3d5c9eb35e379f5fadd2876269b frame00002809 +63f7d8cdbd4209b9110c43e951cdef4e frame00002810 +2f5e0f1b499502a36bebc2cf1246c535 frame00002811 +86d623e0ffb2ac192df6d3c3f1c4439b frame00002812 +0bc14dff99046cd86846dfb6a5fdca4c frame00002813 +708f56c263d44527afabb45d6a6d3907 frame00002814 +53b250451fda5cdfb8acfd23afba9cac frame00002815 +795b1cc0a1c992407813da15f82564b1 frame00002816 +25e232221bf8055c7f1b9a92bc1e5c25 frame00002817 +e8bf4055892436ac3ffdde390111184d frame00002818 +6ea5ee6c84f606172913e5197608802d frame00002819 +76029fa84e4414213902a3febd7c562a frame00002820 +106ced4578852fcf7acfc1a68296b16b frame00002821 +a3306d0759f9963dba63906e2f2b4f2b frame00002822 +078023d670f9be9eba0d0c6decd165fa frame00002823 +2803a7a683dc81063df54b3ec2b39c78 frame00002824 +4e95f96de9fc37331ca51481ab3d34aa frame00002825 +68d93ae42e882bd21a6e65dfe5d90dc9 frame00002826 +942aecb81601f8f5374a473bd18624c7 frame00002827 +532b9f8484fbd07dba10d3580833fea9 frame00002828 +dd61373d818a50150db6fedaa9202834 frame00002829 +b2b5e96888a7fa82a73480dc8ab9abce frame00002830 +4bfa5783f57358b3da7650ca215d49f7 frame00002831 +16c56a21e654dafe41b1b83951e255c6 frame00002832 +9ec79038e80677cf353a7ae419b5ac58 frame00002833 +423f402068824da4edcda120d0a96e63 frame00002834 +0305044c723cb266437b3c8306ecdfdd frame00002835 +3d3804c3f2b171ad23484ad95223ad14 frame00002836 +e353dd6a75b4c2674f992e4950dd266a frame00002837 +32b7385203d8a09ee33230250ccb1a05 frame00002838 +d95c842587b91108a6fb1a8509eec4ca frame00002839 +78b2c5eeec71321fe52bd2468b2c54ba frame00002840 +78054942eb6d2f6a555302af158cd925 frame00002841 +bf278c9b920708cc1a58112ca7350739 frame00002842 +cdeb745fa45b99476e50ff5a3bea3f46 frame00002843 +64b3a754f97f0cf5b7cdb1a0a777fb20 frame00002844 +7cc751a107d0e3cd7fd5fdefa0c30f55 frame00002845 +0fee9ab25e390978bacf545708cc9628 frame00002846 +d5c253ff0f275bae44f4520b295fbfc7 frame00002847 +d7157206c4ca5ff4ec6aa5f8cc78d916 frame00002848 +539ae4d5083bbfc0c738cbf08ff2e4b9 frame00002849 +ac09da6225dc22126a419e9de6e324c8 frame00002850 +c782ed0af910a7af13f085b86401d74d frame00002851 +cb24bcabfecdc76239705b02edb9812f frame00002852 +fad14ea47fafd368c0e572ec66acf986 frame00002853 +981ef1834d07f5e5acb390f28b58ed07 frame00002854 +51ed84450e56021291fbb79d48b4b342 frame00002855 +64f9f310041d0031e43248e281a9e96d frame00002856 +3102a799adb70f17eb743b64e27b84c4 frame00002857 +6732960feaccab02bd00508b7bd6915c frame00002858 +1abcd85de17340dbb8a5e24f42bd1118 frame00002859 +7da279094c4512943926a48313fdb7c0 frame00002860 +d2d7561b7abb8a24588ad70717175442 frame00002861 +58a22459ef94c687e11c5b4543afb063 frame00002862 +a358caecdab45fd6d97ec97ad4e0d6fc frame00002863 +6299ee4cb3689f061c7c70b7cf6910ab frame00002864 +cd2b05ed4fd6ebc45e821c9847f63047 frame00002865 +a9e88ca4b40e1e12cc4946cbdec65586 frame00002866 +f147b61c7660e0255a7bf9c5e4cb29e8 frame00002867 +f6321d0918139d841fd25087194bc70d frame00002868 +cfa402ccbe52044c3922c88dd55dd6c7 frame00002869 +0ae9e05d47bb031cbfca08e12825c6df frame00002870 +3dbcbf749361088902fd4e1c8ba8b23b frame00002871 +f157defe1d9a2d525ffdfa333a197f01 frame00002872 +c6272a083829ac78966be6c9b731a191 frame00002873 +dae6b4a7a6f53b87c606f536a1929128 frame00002874 +a3e05fe0898735773fb86110a7ad77c2 frame00002875 +03c6d6eca02a61690dd3063dc2c0533c frame00002876 +70297a3bf81019000307c96c826cd562 frame00002877 +1276df0d459d504e202e3e363e91e21e frame00002878 +b682e2f5bfe65b4487015173df497cd2 frame00002879 +4bb2d7e264f447bf4ff059019620189e frame00002880 +fd4cde403804897de57a22c7ea24d5b5 frame00002881 +b47ff87dba4abf85d6b487f93b2570da frame00002882 +c74eff0c0299ce82ae2d7f85acb380f4 frame00002883 +70d365ce0a18ee1658bc6e8b902b451d frame00002884 +37e8c98ab0847ff92e38d088e12950af frame00002885 +e7f8ab185d8c5b8e3edd950df1dd88c5 frame00002886 +b811e606c41073d11a13f993be58eaa6 frame00002887 +3306923a2abbc7592e298af3e56c0854 frame00002888 +d5163c04c527c21e9ca99e6d4a8e20dd frame00002889 +a9c8df36805027e89ceeb55322983468 frame00002890 +c32f1220e0245e7fd735424fe7cf8e59 frame00002891 +a0ef86f5c055e6b174e6682510ac7c3b frame00002892 +4d2842b8a7ddde1ca420f1f8491c6203 frame00002893 +16b5e7087a1a312d164541e8cfad0410 frame00002894 +c92a68c7a4bc152c783810cd9f415cb2 frame00002895 +6bcb2d2cf5da01fdb0fa06b9478e8657 frame00002896 +73d8d0e84940f32e9f96aaa1bf753ef2 frame00002897 +4c7ff32b05fbcb88c7e442684a84e30c frame00002898 +db490ecc5075a13d57a319c93c5133e8 frame00002899 +918a2614e60498d816e16a579e36a58c frame00002900 +09cbed476d97663407cb4d7235277432 frame00002901 +95c1d1d40791149b0b3f3ceac9066347 frame00002902 +5ed79cf66ac82463dea785deec74c3ac frame00002903 +ca5af832fd67ee3dc4345c6f59bf209e frame00002904 +ced789b94441d9c40e0e966ca6dcb117 frame00002905 +90085066be76c24534be0925efb547b2 frame00002906 +8bd204f4b76d7573b4b820e95e3ba617 frame00002907 +8a19d36d41206e5d0cf99d8d934d726f frame00002908 +24d26ec5165f598191a2a4fbe34224d3 frame00002909 +f0262da0bf4f98fea1398a93186167b2 frame00002910 +7dd4bd7019625bf56ee5e0e41a1ef099 frame00002911 +d281d17667381509b1446c8031f53206 frame00002912 +983f931eba4c1d74a0880a5b158dbf14 frame00002913 +2c83826816fcc2dc2d849201dfd5bb38 frame00002914 +6b2009e266c29662435addb5c13b5890 frame00002915 +b3373d142ee3997a5a91e2ca3641f9cd frame00002916 +f001d772787832902d78735723044fde frame00002917 +30a236d92ebc199cd1f18fa5056d3ea3 frame00002918 +e2db561672cda82b3719cb6ca74c8d67 frame00002919 +22a7bf37b26a7f98b5fa45af81344562 frame00002920 +d6e213c9fe508e6b9c3292c3e4f36fc2 frame00002921 +62ef16bb5cb2e554cc543c0e453afa6e frame00002922 +9cc36e39229c1bbe389e4dd0065b87d9 frame00002923 +2f42f653e27fd026f7a8e9e2181f86c7 frame00002924 +09c1c92427483a869af6162a61b0fcfc frame00002925 +98fd28a0d7ced98ec76a7ae14b98e2c9 frame00002926 +a9c5e65c2a7f2b913e39b9b33b79190f frame00002927 +6b3e4c0b9165fa8b3d393a8518902b78 frame00002928 +f02ef35f00fffe417649bace5550e1ad frame00002929 +6d91534f9134373247ee6a0759860339 frame00002930 +e836995f448eab5aba03db23442f01d4 frame00002931 +2380cddb6b3c5e3a6f6581baba57d00f frame00002932 +b89ce373cb67d0b220c0a3d66697295b frame00002933 +08b3c2e5189737b3d4656c1c4b64dea0 frame00002934 +51fb27b1eb9d80aa852314761331507c frame00002935 +0f9f41b308257e721d98b34a76eff84e frame00002936 +b001fa24a389e4b6afe89c80c3c44881 frame00002937 +9fcf60b346c9eb41fd9d8c66eae564a4 frame00002938 +2ba22750993d1841dd456f9f1a50a92f frame00002939 +37e277e826e3e03ad911f0325a3c809b frame00002940 +488502453ccc02e114a8632916d5d2f4 frame00002941 +6535985b5ad3db396ee6df847fd413d2 frame00002942 +7eef24aba993ccab9b0ab53edde03e0b frame00002943 +f2f258ed8ad22529f63e750b5eb0493e frame00002944 +d198debd024d0f74e5052ee9dbb77ae1 frame00002945 +a481086f1d7375f5680a057543f80443 frame00002946 +73ceec551a601cb12f691cfd1f505646 frame00002947 +e03fbdecd103fa514aa9b634eef9503d frame00002948 +593f7fac4b7051db2437c384ca0fce10 frame00002949 +30ef80a92dbae3323d16141e8ec4018f frame00002950 +130c3c34dfe0f24815e57d1a5734ad8e frame00002951 +9fbd68eeb184b682cf754a7b33b33e7e frame00002952 +3f40c56cd4be78bc179b445ddf6d0e88 frame00002953 +2ec1605f6db96e10c853ad1f54e9b4b4 frame00002954 +636bcacb82ad52476c456dbd15899549 frame00002955 +30aa00b1ca4e32320e7b0146b26fb894 frame00002956 +0d121d3a2b791875129ac31935b40d1d frame00002957 +c3d531e87ed380800184d8168e65cf5a frame00002958 +feaa55f9c68c2f344320532b3c85c0a5 frame00002959 +2c73729469bce82587f5310311f10e8d frame00002960 +20fefce7047e0c8c37a67484e3081467 frame00002961 +73226d14d12a91a761643e7f5a13093c frame00002962 +151ccc940daf8bc6c27b11797a5ad0d0 frame00002963 +c7e5fef653a652556df04684801565cb frame00002964 +393b6d97ac4929bb2d052b8e52236c83 frame00002965 +7366e9bcc52b55fbd057484b22183fe4 frame00002966 +20f1c2ea6b880f7ef77aca9f5afc8ee2 frame00002967 +de805647035de779c6abae16cc92b6b6 frame00002968 +c61b0c63c5ba5627b67b752e66ca6b1a frame00002969 +4e0e63273d93d44d4986788e03b3eeaa frame00002970 +c497def9643cc13dfd849efbde5a24de frame00002971 +95fe88c7b1c330a639c99e1d6aabc119 frame00002972 +29da2c08fb055e988832d34542c42887 frame00002973 +e7b78bf29382b0be953d9e34ffbef213 frame00002974 +7b465c25cb6c9f2cfd3a13d0c722bfc1 frame00002975 +a028df874d4199c4fc2730f297573c2a frame00002976 +a1fcd3922f2491bf4e66c49ebe0976fe frame00002977 +967a69cb14cec44b3efbfed646e9c787 frame00002978 +ecb37f46830a805352519165e638b9f6 frame00002979 +539669ce1a699e099834c1d18e1ef8ca frame00002980 +e2e2701f9b7832aa484d49f8292d3ab2 frame00002981 +b5320bcb28fb2b5a7163deebf5d996dd frame00002982 +e4d6d553f94bbee47c8065be25dbe2fd frame00002983 +449cbdd8303d737c123e77d39b84d4c4 frame00002984 +74de6a303322913e1b15606869f03d74 frame00002985 +3fff18a32af32bff9edc7f0c6d032001 frame00002986 +f59857d48d00506920b688c1a766eea5 frame00002987 +a5f6cb9b0f00eeacd38ba59398790e21 frame00002988 +5705ff372b3b81f8160688e19f3390ad frame00002989 +d38f43bf52f36b7db40942e31530515a frame00002990 +a6ccd870b2f1317e7008cad58b397573 frame00002991 +9e7c9ce3999b2ba0ce6d1217ad8bf832 frame00002992 +6d54f8a79d0fb7c33f67b062e2672cc3 frame00002993 +e978a7fd36ec56f48d2192435ea71fba frame00002994 +86ef1eae3754abad2bbc887471680b52 frame00002995 +9854e46b8281accd634fb5b9ee6ddb38 frame00002996 +af9124aad10d8a70eb47191b2dfb34ea frame00002997 +eb1f334c15e482cf9a5a2cbac1043045 frame00002998 +8aaaf154dbae5f3706fe7f179e0aedf8 frame00002999 +43126fa5726704ea0eb2704f16d0088f frame00003000 +6fb16b8049e116033efdd801f9554c3e frame00003001 +0061832733e8b0566e044ab0d27b8a24 frame00003002 +7ef45ec561df67113c775647f4852dc7 frame00003003 +bc288602fbaf21782c9f151a41277774 frame00003004 +4e97c4e45088158ca08861e63ef61d92 frame00003005 +b0e09470db93f9dde044c964311f59bc frame00003006 +b03e5a8d9d92f4d8e869ad0675075111 frame00003007 +2bfa7ef55c907f6bd3a8bf6619f38c5d frame00003008 +51bf62b4fba37ec885b5dfb7a890315d frame00003009 +ea80ab2baa9b4bd517463650a59a4a88 frame00003010 +41d3a743f6302be1eae0254085a82d4a frame00003011 +2050f34833e206a391c7e4e2a28c8d88 frame00003012 +dc680176cd5f5f1ffebbc5213c021c25 frame00003013 +3459856ff5b5c32a9d2db9071e6fe9ea frame00003014 +e836e373244708595133d6a11cad5b6f frame00003015 +0f18f1a60e2822d62a8eabc385827ebd frame00003016 +0415e1516c14fff2586d1a1f51a21e71 frame00003017 +907fdf4daec2632933590ddfb32a4508 frame00003018 +d09b56d01c885e2119ea58d5d5a8517d frame00003019 +7bc54bc4571c6728b4a65de251f083f6 frame00003020 +ca0f708b87c16038dbcb8cfc2af7dea1 frame00003021 +a2f137081e7658a13ecff1c46fb4eecc frame00003022 +c1176b343f59eea9ac257adb365fc941 frame00003023 +e5f4eba3112af8b68d3940dcbb9c7025 frame00003024 +8f627c23b09cfc8a81c0030e48374563 frame00003025 +cc75f08a915be986f1dc23bb39c1da7a frame00003026 +f3841f63f4e00039b42f73e6817f36a6 frame00003027 +35db4a440fc2263f1c43d0f4b3030530 frame00003028 +cf82fcf27cfb8a278f52f9bf82fa99ba frame00003029 +f346a3299401e2a39233de38d3326853 frame00003030 +e17715b1877a7ea663757f7ada915234 frame00003031 +60dec85557e6b92aef033a909890de5b frame00003032 +b2cab3d3d4f80fe33efdc1c1d4bb10b3 frame00003033 +886b1f97018e5ac97be8010458118c39 frame00003034 +6b9c49544f55778ee0e1fb8579b320ef frame00003035 +4627f56a98046fa1d16d7d4aaa24ef10 frame00003036 +737b3f030a28726e114dfe1428c6e89b frame00003037 +f6a4c94435c6db46f3f8efe757998a04 frame00003038 +f3ccc653db471e86f97f41ccd585de81 frame00003039 +e0829335f2ab513629aed15102da0c02 frame00003040 +978949e68a24c61825d8ddad2ea3b3d9 frame00003041 +5690cec5b0f79e8e83f4f781afcb7637 frame00003042 +7ab3900f9f700756df3eea22ce8ffbde frame00003043 +883f35c5795a27045921de931e123f31 frame00003044 +77a70542137a27c08dc640420a8eb114 frame00003045 +8f5bffc96af3d842cb53562751643010 frame00003046 +ba0926fb79bcd340d4649f5a7755f60a frame00003047 +cc87c5aeda33ab004bfbe49a353721cc frame00003048 +f3312a3bbfa34315eaddfc15261aa2cd frame00003049 +e26c6a31d42513d3af796d2b15de1c23 frame00003050 +6af4a1634a13f151e8ee5014ed547db2 frame00003051 +2c19af4a48c1c3d8908b504174811123 frame00003052 +625f4e1eb7f45f545bfd72041c3ad7f2 frame00003053 +73d0bd24e111279b3e0588bd74ed7d59 frame00003054 +7e29d55ecfec69e42ced58fcc056c0b4 frame00003055 +6702f0c3ab49ac51969e232e41cc279f frame00003056 +fe5617fc1a944d43fd3e68837ccecd4e frame00003057 +3fb47ea2509a51ef66d17501afc4cc73 frame00003058 +a66a867496dc60de28a02f38a10131dc frame00003059 +5c0b8f1b86d7d3630c989e1aead75bcb frame00003060 +564aca5355ef242c056a275e75e19888 frame00003061 +e789df30953a1984d1230e5d974e1a52 frame00003062 +7b95c6da18e874a05e4c330592e6cf03 frame00003063 +28e140a421feb691dbbe4640beea051e frame00003064 +2de3b9b7d5e950675c1bc89bae2f0264 frame00003065 +b7eba00e2325480411c2b9977a5db99f frame00003066 +1709c71056b9e49ce2a11c02652c7d2e frame00003067 +4343d3c553a74c8e359210eb6e0401d4 frame00003068 +f88709ee757f4b71052b8245145a7e3d frame00003069 +9673f00416abcbff9f1f6ff1620f963a frame00003070 +58c0a42067714be4119efb21d6565ad7 frame00003071 +acf33482495d1b3d7c97386ec6c34641 frame00003072 +0a7022f3c6b53535bb1c92c560353d0c frame00003073 +848347f9455b16d9e49b72c0a43a07df frame00003074 +5dba3f0159ee1ce5fcab4830b1b022d5 frame00003075 +c22b0b38de2e99fc75e6bbc95c069351 frame00003076 +ee2955ee930d0ee407609508850f5018 frame00003077 +73b62f7e67ab8cbe3a1659bf45c76a1b frame00003078 +4268ff7e5298a136e174dceaf03eabfc frame00003079 +f9430d4bc89264f4b8d872c713e1f01a frame00003080 +4ebbea26eccb8e7a73b1ff1ccb2a2769 frame00003081 +3662cd829c380bd39295d3e38e2994ba frame00003082 +402587e205f21a7962cde1b00ed9ecaf frame00003083 +1bffbf1ce254f3015346f8fce2f8b02b frame00003084 +3ee36c1430851c8be02955124cb2ef07 frame00003085 +c8b886c7b032b9e2eb2294fec4e792ac frame00003086 +163c75f7b3aeb342bfc364fa5be73689 frame00003087 +60bc246bce771d042b5b05de0bc66829 frame00003088 +8219663928da59339b949b0b6ddcef82 frame00003089 +03a3f4f73a774132704401925c645e02 frame00003090 +accb9a171e8c474c6ed3a3e3b57e2b81 frame00003091 +499cb31b07c874f0aadcea2ef0f1f0ca frame00003092 +aa83a3e8240e4aa291ffb746c1a3ef70 frame00003093 +a57e2c723868a3a99e4de065bf1fefd5 frame00003094 +0a6517cf8867f57ec1f4d5c7183f0016 frame00003095 +02c27a32ccd8b608385d7faba8886b5a frame00003096 +06940c57f8b9126193a48c157a040541 frame00003097 +501ffeacdda590aa9cd4d71d3a4aac80 frame00003098 +dd3022a76488f29abf672bfed3237eca frame00003099 +c68560dad9c1cb6e9d387839147c4998 frame00003100 +d741e9a713f770681e476231c5e42b64 frame00003101 +ea9a6e3028c1705c090b6e06cc614a94 frame00003102 +28bbe6988fa4aa9ebea54d064ba9374b frame00003103 +b9ff0cebaf973e745ff2552d3c88c166 frame00003104 +8f5578112277223477ceb47380e8b466 frame00003105 +914f3c4017df47b4e7ee5d88600bbbb2 frame00003106 +88ca2c7e9c8c33d3572fdce164cebf1d frame00003107 +22553b39559a9c7c547d71c0c7e4d6e7 frame00003108 +948a288e0255313529d62ae6164934a3 frame00003109 +a8636e236abd427b24f65d26afd67ffc frame00003110 +555f5e2f07103842f09218de712169b6 frame00003111 +640822739f928cbf07b545357cfe1c66 frame00003112 +d8241fc2a2bef24708cd4c0fdbc7288b frame00003113 +6e5aa22e355649ae5980715265992733 frame00003114 +1da0603fe1a693c7c6c28dba1e855271 frame00003115 +80d8c844a4cb3945f3bd838828104810 frame00003116 +e50052e68409baa1fafe55b96b9471a3 frame00003117 +c818fe5e0dda8b6c86f1cb4e44f412b0 frame00003118 +998fd5324a0c70dc365a1154797a6f93 frame00003119 +53d9b4dfb9838f26e099c168267590e2 frame00003120 +d27474c3d54f4f726081ee46f95fafdd frame00003121 +bf08ee0c57865e7913c14e4545b66b3b frame00003122 +86729851d185779d1fb4d90fbee2e669 frame00003123 +79ca2baaeb248b2a8fb78f99236caba0 frame00003124 +4b6075d10023141a9f0bb5c5b3658d0c frame00003125 +c77094d5a9393ead23290fd5c4691a88 frame00003126 +7c86f90711418fa8f7cc6b5b05ae6feb frame00003127 +516d9074bca5b4fe4002a183e6028552 frame00003128 +596bc3dd3ffc843844e2ca2fd2078a03 frame00003129 +6eb752c8c8aaf2777e915e1a725d9533 frame00003130 +57521cf4f4bfea948172caf1e99db276 frame00003131 +0f5d9ba959fc022e1c88d70f5f734a10 frame00003132 +e8db16d847cdb33cf4ef5ea1ee57ec49 frame00003133 +cfaf8d65589cc72f8830a03197dbdc40 frame00003134 +629b8a9a8c0ceb8eb286e8e23d3e3941 frame00003135 +7133e1108b96aa2aabb7f7c61c30b002 frame00003136 +8d007bb1e815fb08a0b749ce9897aeee frame00003137 +635341e0e5bbbbc5d53de3e0cbbeffb4 frame00003138 +2272260c3c34a84cd35bc96743477c08 frame00003139 +73a9881e0959a56406a974f7c9cb0445 frame00003140 +d4002fffbb350817c9cf39d427dedf9a frame00003141 +36562becaf552ad33bb05fdaade6c0b4 frame00003142 +8467c6cfa387cfb5b3f41d860c205199 frame00003143 +23c15254e61290968a7949148ba206bd frame00003144 +01ec03c8b58066dac5c521a9b744f00c frame00003145 +d900c327dd8b19d61c8480083b68a824 frame00003146 +350cf418008af0acb4444929f013ce88 frame00003147 +288b58989501d33e27c0cc033eb16e7a frame00003148 +60fdc1a695b9e8e7da69b308ff4b0b46 frame00003149 +0e007d0944637701541641968e2ac3d5 frame00003150 +ce472bca05f55994fb78748414b42fb4 frame00003151 +767f02016774657546ef0b6023e32770 frame00003152 +43d7b7939f98a5cc675f7aed47a558b2 frame00003153 +ed3091a07105519943be011af92c0171 frame00003154 +f920a80474b3235244e534ee12b786f0 frame00003155 +e83551b47521d24e54d79670e5181650 frame00003156 +a158930ab63caee220cc037aaf8eb14b frame00003157 +eb89a5bcb40ab80ea39d38a128b4772a frame00003158 +35eab897a39bb9ce08b499c501188539 frame00003159 +096b209a35c67dfd70773b319257243d frame00003160 +ed3d1c0dee7843f607da90fb4dcc2517 frame00003161 +a3159404eb07244632e8a5208fb50df5 frame00003162 +acae7a243b86fa6a3de5ab3df3a20205 frame00003163 +7b13d7849bd3d6b69d1de072b77527aa frame00003164 +750ccac8ec03c7acc8244f403f471007 frame00003165 +378cde33d6e9af2a9cc4ea0d79168a2b frame00003166 +cc31909e7c65ef629b56e594e402a2ac frame00003167 +38de0926c72d12e18fbab5582de75db9 frame00003168 +527d238440640acf9d2e4fe4f77c17b7 frame00003169 +4b2dbae0dbb328468c9ed1fe39535d7e frame00003170 +7c12b9c686499874003f471958da5395 frame00003171 +f36fd0cd8692193a7a2c14196e23e6dc frame00003172 +1331937759daed8c546395b4e34f7c8a frame00003173 +28a9330088336af08ad269aa5e0c2c0d frame00003174 +cf826cff27273252137b7b7a6366d21b frame00003175 +b449f80a15aef10dc1f1b766edce0385 frame00003176 +23ee33f1b29848a9cca46952b57bac24 frame00003177 +eb033ee26404b86af8413c546031ce57 frame00003178 +9d4fb92125ad6c0835702b97575a1f6f frame00003179 +e679449683686fbc661923eb04276c38 frame00003180 +db95d5e8bbdc929ba7c59693b7061a05 frame00003181 +a6336af6b30c84ca3e387301aab0d3da frame00003182 +36c457fc9c90dbbb5f6ec5bf4849623b frame00003183 +b8b97e1b08dfa1eed15615bf8b855cb5 frame00003184 +50ec43e3899809086bbfff356a9789ea frame00003185 +ab9c038d0bf233d5703c6e57e90896c2 frame00003186 +82f579785fcf87ccc80cb1bff8c192bf frame00003187 +0f81b0a91ae0522dbf96a63123ff203e frame00003188 +65daa44dcf99614d64d80395b676da43 frame00003189 +e7d9c1034f9a8fe767b88672a4aa8444 frame00003190 +f06c503f56303c39411eff6f2b1c0f00 frame00003191 +b841431c0259ab41512f32750e8d7546 frame00003192 +ab8eba4225997fc6bec4f94eb655a12c frame00003193 +067c1739ec29f3a907fc0a08d7530585 frame00003194 +ecd4e927c6ab2da5c66999e9fa91e7b1 frame00003195 +eaf3a7fa8ed32331e73bb2b539c6b83c frame00003196 +cdb834e780cb0a0fee7788beb1ceed26 frame00003197 +ab8255c182fde56b3be081719d09a55a frame00003198 +432d81800a9dc828d278fc577311dc9e frame00003199 +ac1d4a478607a57c8f4ef70dc0bc1558 frame00003200 +33712f5fa9fedee14c5cc6983d8be4d5 frame00003201 +998a94f22a2f5f34adb16a9957b5c3ec frame00003202 +d9efbf322fde571d443cc20822ddf244 frame00003203 +0a4ce588409de1c0086d96e69be11a2c frame00003204 +e3a5216f6344717b3ee52b007ae32ed4 frame00003205 +94df316faae62e71278dff13aed58055 frame00003206 +8312060957e82e2dc742d7f7b5c33a6e frame00003207 +dec0a50818288db9ab022d9939a6b2d1 frame00003208 +25c7f1cdf0f56c0ca990e6694c25d882 frame00003209 +b995d8a8afc7df43a5aff0f591802f3d frame00003210 +ed00186a48830390bf6be0708daaf582 frame00003211 +db9a91b1dcc127b2211a66c0b7bdbd54 frame00003212 +cafbe5538e9ab19e8852a9b295720b40 frame00003213 +dbfaa7079f044bda6b06c0b349a9d448 frame00003214 +3bf0fcc2a7b6e823672ff28e76c1a697 frame00003215 +1ad2182683f7f5d4cbbd5833cc2da8fe frame00003216 +28fd7ca137f561a9595fe994213d28b6 frame00003217 +7877c5c5d4c7fbde64f5bc1fd1d237f9 frame00003218 +dab9349fc714f9a4693b3a33151a2ad5 frame00003219 +f30ef49c58adddcb38720f61117617de frame00003220 +b2b1d6aff30ed7f78b73b20c4b6981a9 frame00003221 +5bd5a819cf1b5262a10e0bfe1586d5a1 frame00003222 +bde82ac6a325b5cf887e4a1adf279cfc frame00003223 +a20e2dd255678b6af8e5613b7ab7ab83 frame00003224 +c1016b4533d3217895dca6f090c10866 frame00003225 +51108cc0494361301556df98c522caa6 frame00003226 +7ccd7c6f06ad8cfd10fb567f66c71e86 frame00003227 +f148d6ebed6b0e82e24ebf7f4d57758f frame00003228 +f036fc95c6d18ea2288f017e9a52f402 frame00003229 +f60fa8d692390b15a912b7fc9908c94f frame00003230 +4efc6665aa48c63bcec8cbb81657bdec frame00003231 +71d22850d37f9a1c91b0eec65b0607c7 frame00003232 +b4e37bb4ec7d47c37cbea74a5a226e74 frame00003233 +55dfa7ca9b275ca9b9aa15545b2038ba frame00003234 +ef5e49df057219b8a36abda91b9b676d frame00003235 +9f096698b4fa2de972d45082d8b712b4 frame00003236 +2599581413d283ef16e2a2961b4461f3 frame00003237 +37a7d52f81037977fdf0d6c4acfd0ce5 frame00003238 +34d65211c6a05611cd8775bb042eb516 frame00003239 +4f1d6a004d43d23a978c51d1eb34f1f6 frame00003240 +0c958985aa8456ef8ad696a74b16125c frame00003241 +b26ad7b4e1634b48f21ac3d1850c472b frame00003242 +7150ebe1da57834ad802050e31946e2f frame00003243 +742b132928eace94a9fed0ac6f2c1a31 frame00003244 +620e04ac47abd40f2ff4f12d71d754ca frame00003245 +b47de791e866e7e7fb11bfaea16e9435 frame00003246 +14243140111eeada4a0f9b1e7c4e4d45 frame00003247 +d4b3ea333f80f88ffedc70e594e69cea frame00003248 +251460e2cfaa16e01f48dbcbe9e5b5a3 frame00003249 +6e0e581ef65860d2c6c1af5702325284 frame00003250 +f8f408ee879f8cc6c9c414969ba6f321 frame00003251 +7b30b4370498439fe5880ec64800c220 frame00003252 +14b045dc15f115869baea3fca50024fc frame00003253 +1c0f8fce2712bc16d1c27f5f81ebd3d8 frame00003254 +5c573baba983925d6817f438cd6a2cd2 frame00003255 +fbca76a9051c77e0ae0ebe3d58221f44 frame00003256 +007f30f9688d7a2325f4287723b37528 frame00003257 +41766fced16b2c0768c2e9032892b0a9 frame00003258 +38f0edc72e217b77561377626d4bfa72 frame00003259 +53196fa8b8bb595dd56c0f29a62547ed frame00003260 +25e395d94dffb3db4cb10e64b9b423d4 frame00003261 +f273d307281b1d670a0a68194a1b2fc3 frame00003262 +f271774a0f99215753f99d7ef2ea02fb frame00003263 +0317e1f20104d1291e54a369fb7a7daa frame00003264 +a591c0c50c7e0c0721da9cd3e04ab3d0 frame00003265 +3c140e326cbd20fbb02a1d8e15dece74 frame00003266 +5ffd0c14d0f2bbc1b8d9439764d0d448 frame00003267 +e49020c94562b173caa42ce9924b58cd frame00003268 +ef9019c7eae9e3289a9a5db70332edaa frame00003269 +977671c3b1677d796f13a236764acdda frame00003270 +e9aa36ff6e0a711d3ca3bf7276cfd69d frame00003271 +c5d4f5130bf26dab8737b8fdbd073b44 frame00003272 +66b74586b97d8439a6dddf48419d4b01 frame00003273 +a2905b9371f248a06b35dd68f2043f67 frame00003274 +bf6ff7ca3304e3488205d9a3909c5cd6 frame00003275 +7b4f239b5e512b52379acdbb98bfd92e frame00003276 +1fbc8db6f7cbb16a39d7dc495673678f frame00003277 +4c0c016179ea3b3cc341b6ebcc468444 frame00003278 +234a47e2c7106b4c4d1a3121f5bd2b28 frame00003279 +178695226623cd205fbbc92e955bbcff frame00003280 +d354e2070fe9af47381d47e4fd162624 frame00003281 +02b9caf0c10296dc93caf0e336af7e3d frame00003282 +f85c89df39755d875a0bcdc2cc86c062 frame00003283 +c39df702e89141f405703e9b7e85fbcb frame00003284 +1dd1b67e6d2168693e972b7f720e49c0 frame00003285 +2d3a75c158001183c3f5a16bac624673 frame00003286 +b4b15146a50c3b1ae3f3093c67718036 frame00003287 +0a5a463f2dabb8c2ec39f9269a6bf90f frame00003288 +354492d176220907230a275b4efe7e54 frame00003289 +92f0420aec87229303f2438658c3c0bb frame00003290 +1e928e53afd0486287ca0edf1dbf510d frame00003291 +d7e3d308baac38a90c456966132040a0 frame00003292 +7142b7c2295e23100c75dfa2fc6433f1 frame00003293 +37c69e269004806be2bb87845540821b frame00003294 +98ac798d91abf759cc7db6a765595161 frame00003295 +0e812b0856eda4029a529b69e9877443 frame00003296 +12b734939cf65aec14efb213611a1838 frame00003297 +84b131246e0d902eab7ff1190839ef17 frame00003298 +2a19dcd55a3c9cf47972e40ffb5452eb frame00003299 +85cf3d9cda32784f1fa51bc7abf704a3 frame00003300 +0ab46c2d2d4e7dda7263f9e0a70111ac frame00003301 +59d6bdeb3bd6cdfc19dff2b5112861a7 frame00003302 +4be462090ca86ff8ad33a94531171957 frame00003303 +99c072ad11d81b3f952479be4626fddc frame00003304 +1b7b6db01e42dee1fcbbf50cac75a178 frame00003305 +7d79cdd2116f1195ebb1d33a4547cc7c frame00003306 +ea95e224880536e22b7305f4f5d47254 frame00003307 +db11a609d5f9b3b6ac64d009c4742b08 frame00003308 +b5896e9c192f7978dd8152af02469326 frame00003309 +49c7088b281bff2bf7d81786bb6c9f95 frame00003310 +42b830773d0c66b6d98f7d48b3675833 frame00003311 +3410311a7aa593817ee542b93a96a181 frame00003312 +ebb9d0ba47fce351700f898a54829393 frame00003313 +b85378bac23a03f872251e7a4a55d812 frame00003314 +fca81e45874f6bb888632384773f44cb frame00003315 +4bda9eacf6fa94d2127932abb86bd111 frame00003316 +436096c842eb4f9e31a58d350b4fd028 frame00003317 +28db1a3916b96b48c72877bae8ab52f4 frame00003318 +e9a370f0b2cf9db4e8efcaf47b890721 frame00003319 +7ad2bcd7eaf76ee77e99d49768e2a558 frame00003320 +e7a373f682b70165f607140f1e37b00a frame00003321 +852a52a982d1ba3d8ac7e3f8a22d7d7e frame00003322 +69cbbc0ea71a599e7d6ddab467b77360 frame00003323 +a0cb103abdc99557bbf202d1647aa9e0 frame00003324 +43b9b5f5fe33095d6dbe1d19762016a3 frame00003325 +ec7b654d87212c95eba0af09579810f5 frame00003326 +7b2ad6cf12cbdd052bf4b08bc2a80a0c frame00003327 +0c26ff3a7f8813699d26b8c31c9f2f25 frame00003328 +99f45e0c31ea1d3e75fe658cce7c1f70 frame00003329 +b3099d37d9def6000f3e23acd79f22aa frame00003330 +7e750069aae69621e69de713b386ecb7 frame00003331 +90865567dc6da621a2fd7b283e47b474 frame00003332 +4134fddc9aa8d4fc91f6a54d5f5775c2 frame00003333 +78d9840a1185cdc3bfa168e581a24ab9 frame00003334 +7211c6ff86e5673c5c7f04ed845574b6 frame00003335 +46e21a5a25cce1d031ac1b6656d2f83c frame00003336 +0f64d5b8f605cc42d213e697f2a7f95c frame00003337 +0d0dd773e2888f2b59265250888b9619 frame00003338 +12df9bd91f433bfd7e6ce0cccfea962c frame00003339 +5037d960cca4752b089c985f37b620e1 frame00003340 +bed9c34e837fdf76efe9df4b7c17cb98 frame00003341 +e42617da3a844808972d632fdefcf90d frame00003342 +cfd3eab5902959cae9b3d8c74c1e22a6 frame00003343 +14c0dbb09ef75525849b8931c7394b08 frame00003344 +a34fdec65be5b4614928a1df270dfb91 frame00003345 +9dce736bee8625add7abfd625df1876a frame00003346 +be2a8eef58638ab35af2ac09266868d4 frame00003347 +fae638ba98115d789d247c56a84592f3 frame00003348 +b5abc2e38e682e8951918f3df436458d frame00003349 +d820ec87d6dfe32ef67bb697cb3d44ec frame00003350 +218678e8526b729a0ff0d9dd5b3881ce frame00003351 +f86d94139f91eacc270df55ddf0b8df8 frame00003352 +d917e79a6ea09fecceb4d2a0e5e2b414 frame00003353 +b542102ac113f2c0ea5ee69c8a495426 frame00003354 +9caed9b035b9cd8065cac95e369d1a8c frame00003355 +d1ece50cd7ebf6f1773698a969e7dea4 frame00003356 +b03781b7f81f8fc965007d350c0b6af8 frame00003357 +c558f5847c3fcabd2db419395514c5a8 frame00003358 +056ef6441cf1159eaffdc04baa406ece frame00003359 +49f62db129e9cce2349dcd8bf2549480 frame00003360 +147c4dba3550a83b29a5a23f8d550009 frame00003361 +1aaba76859873d537710aed8ea1738bc frame00003362 +d2777a31ac99a29eb8b3fb244085616d frame00003363 +5d2577d47444b0ec9c8cddd53c4839aa frame00003364 +60a9536bafdf087e49777f6ebbdd3cd1 frame00003365 +370215586398255e50a232c401d16d50 frame00003366 +74d737ed9975807325a3c46f2965a716 frame00003367 +4fb6901baaf450fd9b0edb1d262d0413 frame00003368 +aad5a0d2c21b213d9f5bc8bb775cf8d7 frame00003369 +9d7f8715f383370dc6a39b2863f68df0 frame00003370 +bd03156f2d3324bd88559b11c36a2597 frame00003371 +8e06360a1023d9eef5900db121722dd0 frame00003372 +838e08e7bc376451a8594e4d0c7b2fbb frame00003373 +0b787080b7a7a6504881182300c93061 frame00003374 +5f634108c15a7d9d82ae4e34a1c3ec8f frame00003375 +672b0f9bdee784e0111dab7a61febac9 frame00003376 +67c5e32078ce65d0f2f691024f5487ae frame00003377 +a878f886a4892aab8d03f2233303178e frame00003378 +f8b1ae9b9a422eb69a3951ca63983023 frame00003379 +232a886441f3ee2408016bdc29172201 frame00003380 +f98a25493cf6be8eadc424b0263452ea frame00003381 +5d6da58a6896f79a2a6faba740314653 frame00003382 +34c768da0e07307eaddc76ae4759f404 frame00003383 +96ccedc4cc803e646d9add7d2ea949a6 frame00003384 +be7e0158762f2bc20a87bd1164e4a2f4 frame00003385 +ff91e6e70cd4a4d595cbba93e3e8dbc2 frame00003386 +7d2a1dbb7611ab6afe335e6e821d6c69 frame00003387 +6eb026f1c0f67267fbd9492eb2750187 frame00003388 +5af2e1660f1280824b772d5bc5a21643 frame00003389 +9ce41589d68fe92b5f15367503717909 frame00003390 +a2468fdbf1c2929b1c776293f72b3dcf frame00003391 +60d24e1b40ca60fd0d1241110838b7e1 frame00003392 +c873d5c80fd9b434c432d0dc1057a1fd frame00003393 +c029a4fc25e58d625f37ac2dbb10fba1 frame00003394 +b1bd547e93790a6886602cab83b913d1 frame00003395 +84f4a355acb459e0059264020ca6394f frame00003396 +1c0c0e4d1ff12ffbc306aefc329be90a frame00003397 +eb8fa1f0fb0aaf0611662cfa959a832a frame00003398 +63b9f8c7bd53d5100f8cdb6146ffb440 frame00003399 +92b58aa4a6bccc480cc2a7e826da1cec frame00003400 +a34a62f22e2607cdce477f90808160b4 frame00003401 +067c30bb677471a909ec4b599884aaf4 frame00003402 +8a8a022bd5a9e870f9618f8f56d7cc65 frame00003403 +9fb3489300d88a014a2dfe4b5c83407c frame00003404 +4f1ec5fdfcd584ee2efdd06fc20d5d1f frame00003405 +4b51c31b32e43e3e3f0321ede9710e40 frame00003406 +908d6c7e24d57540e6b2a869b7060afe frame00003407 +1ea36f36b58e44683c1da0d71899ed19 frame00003408 +3489739540ededb5beb5c5654b1cc6c6 frame00003409 +b1e9fcdd85e2e8030a5688dbb828b0db frame00003410 +37c297fd1b1e171be45032517c6bb5c4 frame00003411 +ab1490388cb6df34782341941849bea5 frame00003412 +d51911c0944511a633a8105c427ee4ad frame00003413 +817df431ca57589650aaebdeae4470e4 frame00003414 +978c151c79e931d9cefa5d0922875fbd frame00003415 +ae2e089df9de12c696ccb51b33a1c884 frame00003416 +034d6dd827b40f6d25e3446c7c130fd1 frame00003417 +de26add7f665627cf44e675d6abb692e frame00003418 +c07f28babc958625456908ff2e6f8587 frame00003419 +9bb5ebe720717c6d1ef7b20d4dad8c0b frame00003420 +d06cf0845a076ebd74e42a2d2c766bb7 frame00003421 +a8e85e0b030863deb4b0a70ef21a1d04 frame00003422 +6b1c58afdd8d4f62e3504110c9fd3334 frame00003423 +5584e16b6b1cc15fd432c5ad28062386 frame00003424 +1748688464102331822cffd57bf2c9fa frame00003425 +97bcbbf0972ff58c5642d35d762797e5 frame00003426 +103fdd81b9fae56081f4135dbb9c1f40 frame00003427 +6fa967b28d846a34c964f1c7b90a7f85 frame00003428 +5a123c779e2782a7ab277c9d634ce57e frame00003429 +7e8fb1247c1d5be5e69bbe0341c4bc66 frame00003430 +993ec4b259d6596234f43c70e1d6009e frame00003431 +7e5d68e20c44689ab4da7de1c802815c frame00003432 +39266f1fc62a4f39edc2fb5bb4d899df frame00003433 +39e437c0b6bea44c06950cefaff6a8fd frame00003434 +2403d1254c8a4283eaddadb0946e87be frame00003435 +f57b0485d00b2e5907b141b6104c193e frame00003436 +78ff20228a103910c957b5c81c700eb2 frame00003437 +f6bd76d2c2db01fd4fc19a8f9e06da7d frame00003438 +65ce6611b2d2e802c062848ff9f3e86d frame00003439 +899c338ddcc0e1aa0d39c702b1d5fc02 frame00003440 +8431026c7735d148ccfe4237648dca4c frame00003441 +705bc362c6f1ef180ce6a2e2336068ce frame00003442 +69bee1da7e4efd65530c5fae18240b4e frame00003443 +328c6b8760a8a1796bd68e9b365fe953 frame00003444 +8a6718f9296ece779bfe34ebe6139723 frame00003445 +eb89ae2c6103cac5bd1d21026f211dbe frame00003446 +8606af1dd53b3c1190f145f1ddb663bb frame00003447 +3226ee6de606c7ddd8295e3ca1d685da frame00003448 +1d966eaed486902175ab30fb1301de42 frame00003449 +29e142782457242757abf96f1ae5474a frame00003450 +86d6ab6cc21c99b3cd398a2b5a8c9b89 frame00003451 +731aa3843bc6b36c6df8af7256c99d2c frame00003452 +f39bf0ac247f5594ee1b1dfbae0f8538 frame00003453 +d99ca82c35a60225a3dbaafb6fb9d7cb frame00003454 +16b3db8308a4ca8492ccc39abb112765 frame00003455 +7ece4d6c759873f053f10274827dc743 frame00003456 +e69aa218aa89c518ef03a076b61ee361 frame00003457 +fb258704ecc8d52fe613b1f56ec86616 frame00003458 +1ffa802ad1895afc3c7ce03ced37c0da frame00003459 +dfee78ef9d129c0c01adf203c537453e frame00003460 +ace5acf51d67f643e2bc374d566c8194 frame00003461 +c804d4edcdce4c043b5906f997b6c8d9 frame00003462 +e80a12b761605ea35b7f3eab994e9fd1 frame00003463 +a2430bdd54d98f55a9c586e0a30493e6 frame00003464 +fd8df42a09cc281c90677bdaf183c5f2 frame00003465 +6833347d4439f153ddd4039b7d4a6827 frame00003466 +282301ab7522be45e1d578e44abd6529 frame00003467 +82eda11c6a7e2b79b5768f9d3e1f9f19 frame00003468 +0d0e0649cc5b71e76fd0e06e4df69980 frame00003469 +40048627416a6aacab713839ee14605d frame00003470 +db09df3a137a9b3152ec6f102d9ac312 frame00003471 +6e667efff8b523ef86110446b2256513 frame00003472 +d5a3624e48bac4e382a2671e06187884 frame00003473 +665df0d5b2ea0694ad54256389ba5371 frame00003474 +d924dee49d5014a40f058429b6e9e45c frame00003475 +97cfefe0e82e216786dafddadc7b6928 frame00003476 +99e371353804f4c4a7d907c3721353dd frame00003477 +8926a2ec1bd9c09035e3ac14be92ddd3 frame00003478 +a6cb0644efc3613f023e65e7c9ead948 frame00003479 +90528e8e9ec5f6ce6ff66fdf950d098e frame00003480 +97b212e7c2e95dd1b6920d84245735d8 frame00003481 +08c25a5d19bc20ba7d43488738b9ebc7 frame00003482 +aff6087c7bcd79cd4a565e974349b473 frame00003483 +6f6072f3d5841ece734887a32bbac32c frame00003484 +0b66e917cb12ec579a952afad3cde166 frame00003485 +44bff76906bda1e464144d4e8681fd7a frame00003486 +fe52a0ee0bc172a95a342be93ce77591 frame00003487 +d26cbabc8fb8a3e7f0828f29b0dbda9b frame00003488 +34297e8e5988ac7ecb02b6c573c9a731 frame00003489 +cbae7b57b4f443a6f3edab943c7eb0b4 frame00003490 +ec6c1f656521ce38fc9387c91f88e621 frame00003491 +261ec4bfd92335c2f4a152e3b99192c6 frame00003492 +97bf26f28d91356ed7f1398f11cc6054 frame00003493 +7c1a75cf9ba7469143b680be57af0888 frame00003494 +d0e06ecbe2bcd7895639947359916bc2 frame00003495 +871cb64ce8c08d9be9d60f7a92dea016 frame00003496 +2251292894582b8e79e2c06c53c1913d frame00003497 +6a5dae05c13d02a462bb1ee6c25cb959 frame00003498 +bcac15e2e1f9446d58f84db2088fff55 frame00003499 +04ef1210f581af437985d260eb02a407 frame00003500 +bc486d849d2e317bba60e86857d2a940 frame00003501 +cd27a6f1c6a0f61e7a59fc9a31cb403c frame00003502 +9fa493038eb2a9778371826f65eaa96a frame00003503 +61afa6746b3ca3beca33feda11ef41c9 frame00003504 +1c9ee1d33388dca44cfbe2dd001ce8d2 frame00003505 +5a4b0c739bba477d18dd7f46f6e9a2d2 frame00003506 +e8b6aea51edf482f42fb69c7e701c051 frame00003507 +196b70b693a961c0e1b8ac0d6f1b3e0e frame00003508 +5d6195301b49c4215eb280a5bca8e90e frame00003509 +a80cec2ff2010c6224c39154e8f9ba2d frame00003510 +e79b83d8be1af75e45b848a622061fc4 frame00003511 +38a36b521d1d34bcd80a4df7268ccd80 frame00003512 +eec76806dc509084f5f6f9784c0a0f3b frame00003513 +4eec54ee13e6d9cf5cdb0790c86f3068 frame00003514 +3689d000ffb4cc624130bf31e0b54aa6 frame00003515 +9ae10fb9dbd0e0ae316f9a05e79c2886 frame00003516 +bb906af83e77ceb67efb87d4af0f0814 frame00003517 +215f2399b60450d24644ac545699cc65 frame00003518 +1e118f2d25b4105420728c94004a4459 frame00003519 +d4239e77a1f0fadc0529f5b9a2fde114 frame00003520 +198edbc1b387df1f6d4ddcb32ee79f6f frame00003521 +9f7512a21d1e75204e3c6874097cb188 frame00003522 +844eea33321a3a5f24a309c56cb7d501 frame00003523 +1aa7761c84c19a03cdc5e0fa6f2fe3e2 frame00003524 +43728549e9de346c11aae27227baa685 frame00003525 +41b492bfaa91a24615f65ec4726fb00e frame00003526 +c12a8d8f1f80cc2afbc5e58a3e009896 frame00003527 +361970c50d0e1b32895d98ab5c38259f frame00003528 +b4113455caba45ef7a756b9d7730895a frame00003529 +863a88779d36c4f413604b74ab692346 frame00003530 +c2a87829eb4f4f6783fb3f042398f274 frame00003531 +9f036591accdbb83850675b4b2618c3a frame00003532 +7579d7f55a378c0c471e4fc75d1816d3 frame00003533 +acd7f70b9f0eaec1903741e148b2c3c9 frame00003534 +3206b25c8910061821895fc59302b846 frame00003535 +88f6956f7c6a5ae476d10ef3a163310c frame00003536 +175b33fa6a782046da73e6aed8f8f1c4 frame00003537 +6d63e9b23bebfca47b12a2b0c5224f9d frame00003538 +c4d5150ee8cc092dde718124a4c71a3c frame00003539 +726c56b9f1c77b9c73b56a9f0f4868bf frame00003540 +9eb84aff21a64922e7bb8b756834351d frame00003541 +058b3d7c64c0745591b19ee7649ee8e3 frame00003542 +00410b3ff66e3cd6ec5391c68065c569 frame00003543 +96013eead60baa52bbf93edec8bca203 frame00003544 +9f2b81ded04732bfbc70ce111d59b8a7 frame00003545 +83a0ffd8ecfe9709509fea500f66d2b1 frame00003546 +242ddb8e7a603add442cf3e02c792eca frame00003547 +e9ad01aba63e33354fd9c68c1b649688 frame00003548 +378a597360adbe8ea7f1b8c51f33cc0f frame00003549 +1691e56f2bddfc925d1d9eb97626153e frame00003550 +39b488874f15badb2102a8bafb406c9d frame00003551 +8fd8ff7aa73ef5195f9c36ffd1b3ffe0 frame00003552 +1a4264c18d048918655842b3021c0674 frame00003553 +74aee44a5a0f3ba704ab3bf2b600fd77 frame00003554 +f5c819bb2d8019d4ad63d14bb489c1a4 frame00003555 +d9f481eb1e39622718c1c1c24e602e5f frame00003556 +6ace03442ce4d2cfc93f7fffce58c77d frame00003557 +8446259b464c5612e5400b1f25717296 frame00003558 +3762f8d48c29bd01208c5fb2f5e7ad76 frame00003559 +1e2b55fc400f7d4fcefe677bcd8e80af frame00003560 +474a9024d615d050a1059b1c82f2fbb6 frame00003561 +d56e1740727b7853816f410da3941936 frame00003562 +4fa867a0adfae11180d21e5740574581 frame00003563 +776838ae37385177ee3210941f755bb7 frame00003564 +fc521c39576fadb0ceac196d0fcf0133 frame00003565 +8414f5b5419707073273a4e9d18edf64 frame00003566 +e8eb0dd6d295dd068b3b9b68d059c48b frame00003567 +49d1ac881448a694cafa826ad8e5bfd2 frame00003568 +028956d211fcddb2af6479861c619aa7 frame00003569 +3a46c21cfb047a829fa59bba19d574da frame00003570 +a979477a4922b294e66d0d71ff053254 frame00003571 +a271e57fbb6d37ec2ef7d2c37d6f35ac frame00003572 +9e5e93819f31b12be42409b55c293923 frame00003573 +b7bf520c2fb8bc59acc0bf08390c0288 frame00003574 +67e6900db4dd698b06778b77fd45e926 frame00003575 +6f87b3ebdd53ee6425ab467b3f064e05 frame00003576 +02ec039cc1c64dcdad778ded1fbcb836 frame00003577 +8b795757c8e4d1646f4fa4663001a291 frame00003578 +fadfbc9fdcbf638dcdfef7976eccddd8 frame00003579 +ffe93c8c469e676845942ab8c2d372d5 frame00003580 +be6f3ee93c1fe5de60abee21166dcefc frame00003581 +fe306df793bdd80783c1ab89aec92c48 frame00003582 +199b5b41de6a2bebf9dd34057f3a4a94 frame00003583 +dbdce072827fcdb6b1239a8d16adf2db frame00003584 +6662ce6667f97f47cf577e978944adbf frame00003585 +6d4bba3116a5fa93651c6bdde1aff6e8 frame00003586 +1001db5f8f34d9ac4ec1758ff91be662 frame00003587 +5a4654db807bc315e5a3e073dcee0869 frame00003588 +860a1120bf4c195669d670ab1b94df3c frame00003589 +382c5b310aff59cf576d2a6c31ac5632 frame00003590 +f41f2b60d5953b66350971bd7b7e730a frame00003591 +3e0198c1f76d114ef7793bf3659b0327 frame00003592 +7ce39df98f4d2588a78818e597f21ae1 frame00003593 +a6009c5f8b77905318bd5e7e2c69b92f frame00003594 +3a94359e283f8790162ac23ddd0def2e frame00003595 +c8011cee8aafbd3333ffa6c43842e9ad frame00003596 +4079323fba03ea0e8341921c202b46cf frame00003597 +f41e7f706dfa271ee5726e7b10b7811c frame00003598 +a9151fd7e3375ee1a18a627b917082f7 frame00003599 +0ed1ef605b655de1bfc1f79e18d8a59e frame00003600 +53fb1e98fcb660874becab71e074a94f frame00003601 +ab567aac0776140846ad03c31a833f05 frame00003602 +13f0311e2a86c1d2f3313d1766ae6de9 frame00003603 +bb9d27d7c45eee0629442414b804c099 frame00003604 +db0c403cd3c8273753eb20168eec3ee4 frame00003605 +ddc88f2ceb350a3f058978b1ff8d6670 frame00003606 +5bff37aed36680c7d060ad4f460d3bb1 frame00003607 +186fcd8e9e190b825c14389387199ae0 frame00003608 +518bb65e9af2b25351fd3e6e5864bd8b frame00003609 +599476b70cbe7742aaf70dbba6b8eb66 frame00003610 +b6833e4ed3327a5918d826f35e53694b frame00003611 +2c61784e8f0c5d42eb89e0ed93e60cb8 frame00003612 +6132925a16c2144a4324c82208a9434b frame00003613 +048cca318f0af4223fc86386c0d7bc66 frame00003614 +76d513228383b5048a54a6b4859dc449 frame00003615 +c5b5e4f0e3098100f3520431b888c7c3 frame00003616 +43b0b4b243e229771cb2c15d8b6137c8 frame00003617 +6f85f36488ea2cdfaeaecaed0ae51fdd frame00003618 +123da9455d57d79e0d630dd7fbb97260 frame00003619 +1822435438ca4f27627f93fa94c12ccd frame00003620 +8abfb2b8c660c4c3f7a125e9e03f869d frame00003621 +fc3749d2b2e9fb03e2d1fec24591e0ab frame00003622 +29b2d41669ea082f22221f639d158ba0 frame00003623 +148ca59a3d4406157925d9543027a71c frame00003624 +258cd9436dc174fad702498af761b14a frame00003625 +5b4dee9839f0dad0efdeef89abcfc74f frame00003626 +d0cf1930628789d37b3b139ce2cfbe1d frame00003627 +5d22c7573960ef42da550e60441dd402 frame00003628 +a26a0e8a68c2ef8ce0f939b0ed1eeaa0 frame00003629 +185d175df949c8a05eb95669b1cd7b2c frame00003630 +fc3a91e03baa584d396ab1bec462f575 frame00003631 +0a839f80c9e75bdbef7a018086e20295 frame00003632 +cc139cd1593544e27a72cdafff4df8b3 frame00003633 +abd9c45344e30a3f6621d51d960c8aa8 frame00003634 +a0ce18128d21ecc44b773c3d74179041 frame00003635 +91a85fd8e93c0917676c6a402829089d frame00003636 +e520fca208835e9239a1fb373e3184b6 frame00003637 +db8cac4127afdefacc2da085283195c7 frame00003638 +697ee4934eeee5007130448b9604239e frame00003639 +eead0e2dbdc55053051f216b98a01916 frame00003640 +892fc186e00fb915e666db1fb198320a frame00003641 +e57d818eeed709cbf9939a95dd8b785b frame00003642 +ba8e5e5853199df5a26eb8d446c98250 frame00003643 +ca6102678c0289b9576347efa9e3dd9b frame00003644 +a8fa127baec99b092ceee2fa49f046dc frame00003645 +f8d3d1765949e38f18d1566295c30f56 frame00003646 +2e8a9c168ff8571a08ed7abb669cefa6 frame00003647 +1f689f78927f0d2f6e6d68cecc1c7ef3 frame00003648 +f2f4eb7fd221b0e2ad3c147261e41e40 frame00003649 +9f79eaf888e0cd0a010a0ebf21e098a2 frame00003650 +f7b20890eaaf1169b8d6f979221f7158 frame00003651 +ea4f2e99e1f0895ff38e79d6fa392cf4 frame00003652 +90231ea75079586f01eb0ba83b1c5288 frame00003653 +331617390402c9eaf959b3b40e5a6efb frame00003654 +effc2bc3da61479259268ab5ea479aaf frame00003655 +4e495d3c468dc6814c3d161409babe74 frame00003656 +7fc84b78bec6253cec3a5332a8488e97 frame00003657 +4981bdf63f5f4926804cfb25faa23509 frame00003658 +94f9d4ff12ab7f38ebde56938fc6412a frame00003659 +bfa2eb915f05cc62293d9cb9b3aab87c frame00003660 +a481c2795792195d5e4c9e710bc9ee42 frame00003661 +906401aa6823010826a62276268d0820 frame00003662 +3e366ff89528fbdb872b73b734fa8083 frame00003663 +846a637c4b5ae8a031689bfc55d85ca6 frame00003664 +0eee07dc898466d63d74e0b28d735b5e frame00003665 +46443fdd9c04666f05eef69ba99edf4a frame00003666 +8f79407f1ccf380ab5b5628b5360b927 frame00003667 +dd635f2c2bc14bdaa1bb2e3a90e69d52 frame00003668 +c736efa99a9a03bb68c3683356637ba3 frame00003669 +94609d6d9f6ee033209b80764e1daeb9 frame00003670 +5403ad51f90da47f5efa101b990bdfbc frame00003671 +1081f745d3b055da14b769ddec1023c1 frame00003672 +f39371152815c59339843e83b5fe0718 frame00003673 +bc899bc5ae7f257313e998708079c66f frame00003674 +758856a5c93dd80a1df0e1bff8aba788 frame00003675 +5a32f7c4d9a84f20d8901085099ee558 frame00003676 +da5a5b8362f77ed9a569a67e32d1a600 frame00003677 +35fb8d06c4995ad13f234955ea3ae09a frame00003678 +e60f62df65062694c6dceef56893c109 frame00003679 +d187ad5c48efb33cec3fb6394c6d8a7f frame00003680 +f7c26914a82ac95faf1d7d0a53977c8b frame00003681 +a591de9639d2f76d13eaab6948f4ce61 frame00003682 +4a8e556264dadf7e780b23975248d018 frame00003683 +926e3e978637d2b434a2cd3353fbe2ea frame00003684 +f789e4722910ee8d9d46c49e9b8701ed frame00003685 +3fd83aba398486473ee5c677924647e4 frame00003686 +7ffa7d2dc4cb81c1be873ad690904fad frame00003687 +7144f624c74f75aa18a390cb65218776 frame00003688 +4eb6b1de2f119c9ce4949f1e3dd4bfd9 frame00003689 +8dff293643c022eb6103fab2d08f220d frame00003690 +74839108375a2be51b797b645eb39275 frame00003691 +9e51d72747df6a438df4be20256786fb frame00003692 +0f098c473f6122623b8c32213388a166 frame00003693 +0e3b36ad44a36501322a5dfb47213383 frame00003694 +82b755cfc45f325d0984f0d23c1b7847 frame00003695 +7b775fe907f779ef195336b946fd5785 frame00003696 +9df02204534cf2b55d69647933a5e5df frame00003697 +9235c1ac3542678fad9e4ca9aa69700a frame00003698 +efb51e379600db3c77b5b10900aae987 frame00003699 +c7e8db45143335166de289a774830520 frame00003700 +0564a63f9b146cc91df4776c378b515a frame00003701 +45c12d1b034ff840e180522e04ebe3f0 frame00003702 +fe7d3e23d7394db803d6924aa04f6cd4 frame00003703 +64c0c3ce876d2f0eb943524f49956758 frame00003704 +638b1cf83140051abb3a2a9064cec994 frame00003705 +c63cabac359a5130dab1afabbcad4cdb frame00003706 +bfd5a08255e8dbd2b105c1f6730d96c6 frame00003707 +2333c9dc54e79ad6217bf0d78aaa7a83 frame00003708 +3b3b96044b0904fe7e7bd0883fc33b37 frame00003709 +e30191efd842173205aa4106868e11f1 frame00003710 +8f42a0942e8491e88672964091e4caba frame00003711 +ddc57cc059499712bf684d60dd661701 frame00003712 +482c0340d766a148e49c3a210f681ad5 frame00003713 +0f64cd3bb134d0d25690800c62b0f4a2 frame00003714 +a4e2c1423f66b183990c48c57186c880 frame00003715 +5428c5217f41ec556750b3bcb8fd0306 frame00003716 +9b2ede1f998b94cc86eb5f104ed54447 frame00003717 +7c99a411b46a57fa446f9b5d676a0717 frame00003718 +510de132a1df5e521af05b82d518c1ff frame00003719 +a1f4e349d76de64260216937c530f04b frame00003720 +52e7d8359233d44622b4f3b5052ba78f frame00003721 +b40f10a7e67a9d929cd013bff804c5f1 frame00003722 +f15e614b2462f9da22ab672f9cde09bd frame00003723 +5ce236eb391b8953480b2c94bebda108 frame00003724 +d872bd550b9eeed9772bb32e144316e6 frame00003725 +0d0054e181d42c1f6e04aec2fc5c700b frame00003726 +3d0f28df207f0ec15b2f9c5aacea0321 frame00003727 +dd6c91901f0944f8c42b889ebaf9c4a8 frame00003728 +c71f3d65d51c4baa584a5fbdbf4292bd frame00003729 +02bbdfdfa9a4698b315790f571c32995 frame00003730 +3cad68fc2d221e783957f2652fb9e98b frame00003731 +84fd78d10a60fd1e0df997b5ebd059c4 frame00003732 +fa771f408c01ca266cd8db5a744affdd frame00003733 +9c5edc81823cfe88f8ab50dc46d8c12d frame00003734 +b65e534782f1cb01926de917b2c63a99 frame00003735 +53993e17068deeb977ea920a3cb993da frame00003736 +00a351428554e599a77b171d9983a020 frame00003737 +cbc34e32420357473b417d80e75217ce frame00003738 +ec2e6bd93c1f714b4a4683fc797dba21 frame00003739 +01e4b7ca2c68b00f0fed56319ba23f58 frame00003740 +522e934967e7ce05a6962db828f0ec34 frame00003741 +f83e3d90626a85ecda97b10f06a656c7 frame00003742 +a1426e2ac77d3d340a62906a53ea3a5d frame00003743 +594c94f8611a0dc8e924eccb60727539 frame00003744 +6038ecc146d223250f6631f05bb3770a frame00003745 +0719b41207c795b3d289f40f643077b9 frame00003746 +1660fee617add9ad9c3c8a900b92c082 frame00003747 +9a85ebc22e54b8bdf8a13670d4bd66f0 frame00003748 +96845b0471b41fff0aa6e7b2e943bf43 frame00003749 +a8de0120f97e5a4990f979f56c172b7f frame00003750 +90b0b936ef24f82ca9f2e521bd47798a frame00003751 +0e84115b154bd0e0c5ecd0dc4263b163 frame00003752 +9fa87f3d413bd33f0386b78239d07ca8 frame00003753 +02d846f008af1f26ee0f5a61f8ca1446 frame00003754 +9eb6b51948f3756ab1ef26b54537b4cc frame00003755 +107536a4c559aeea179c6948ab4a48f5 frame00003756 +9cd761d882522dd3efd51ffad8cff962 frame00003757 +722f294a9129044f3e884b72688ad054 frame00003758 +cbf7d5729fee69fc0295f85afa187fc7 frame00003759 +b984c7fa832e9e0fd27a97b31eb7a3e2 frame00003760 +e1c9697eefb9820dc64a913edbfcf170 frame00003761 +79d0131a39c70ab0ffc98e391ae459f5 frame00003762 +64d2aa20d3c83075033ebadbf95f5170 frame00003763 +27e6eb361a33e3197591011117453285 frame00003764 +00a44e31f610197b682a16becb00bb6d frame00003765 +0fc67fea1735f2decad9b914fb3d8ad9 frame00003766 +85714596bc337492b204112de760e270 frame00003767 +baee5abd7a4ccd8a366a35c5177966e6 frame00003768 +b3207a4e433a5aa736c16cbea5f79eb5 frame00003769 +5ef6a3927a4ec9d69c41028cf080002b frame00003770 +b31c32e8358827f64ef1742e460417ff frame00003771 +4fb56dd8f7818990153d31079817d945 frame00003772 +b22556da509471516c314b1053d8da6c frame00003773 +1c9bdc2f8936efcc7215b7b12d53f9ca frame00003774 +fe0528504c9756a3a22d106ae501eda6 frame00003775 +c2311cc7a0e3eb9a006e1425a716d283 frame00003776 +428db71f3185f9e950440760d79cdda6 frame00003777 +2e193e2800d33aadf080c4768fbc0c71 frame00003778 +6422d6629e5e6598b214215270ece618 frame00003779 +3bcd2ca8089077f878f72a7819525a49 frame00003780 +53492b1ab5ae2feefb66f4f95fcd6665 frame00003781 +bc1b9d23734545f1d7eb5e9a4830dc35 frame00003782 +34a921eee7bd3196a442543441ca6079 frame00003783 +d287c3c0fee748761c7e9ec6df86a52b frame00003784 +799e156ed31d4fc1b17b131e4321e7d0 frame00003785 +ecdcd3cc37ae39056001d0528f907903 frame00003786 +ab100fbe5dfe1586687885b0ee563212 frame00003787 +ed9bead939896d53b6cd3281cb57a601 frame00003788 +909dcdd8ee03d69a6fb91804ae2f3ca6 frame00003789 +858bdd8a2e67462aa131e6482036baec frame00003790 +05c1b10bca66ad5d4380dfe6c913c076 frame00003791 +041153901fec6de16685bbeb2043eb72 frame00003792 +f975ba848d9d6166690a8044cd70c20b frame00003793 +4f08a04a726f554c944332888b29bdf7 frame00003794 +828bb363a4ca53bf70639f5dd663d539 frame00003795 +0b0edeead78b33a1dc1ad47efe361ec2 frame00003796 +daf477b36656c90200a98c396001841d frame00003797 +f86a8f1094094196695e158cdd727bf9 frame00003798 +565972d5c2154080a9af342921a46492 frame00003799 +f332cdadcaff1c2ab6f7426f498fafa6 frame00003800 +d9b7e233183b16223bb7a690971a73a1 frame00003801 +93b32cfa957dcd255e3b8a864f72c1fa frame00003802 +5c8e3e1789f2ad0f42a8470ef56d47b2 frame00003803 +32ccb549a2420cef9486b37a46c3234e frame00003804 +1a2c539c3bcaf677b4010ba42a33463a frame00003805 +b0556115e71c09093fcdb89d843c3422 frame00003806 +86176c57d3b6a772d4ba1ac9fc31808b frame00003807 +a696cdb7f468383f95bd5b8031bc32ac frame00003808 +fd2b4b7c5b071a5fd50a4c4248ed14bf frame00003809 +982b37aeae0a60a7a1e74caa7eea13fc frame00003810 +c9b1810adf29b130bf5a75d3edce78b0 frame00003811 +ad05ce46aa76d8e44a9d1244dee24648 frame00003812 +84fe8b8d92fac37093ce9be30e1342c0 frame00003813 +5031f756e0e383c00c3c684080aab0bb frame00003814 +bb8806b6f281aa2d505c1b87b680e726 frame00003815 +884fbe1d62592cad8b92513266caff51 frame00003816 +31da0ac8d93594046ff75333f78506bc frame00003817 +10d6cbbbd6e96b28363b78384c7c1cd7 frame00003818 +5b4b62228f1e458642f1c50682560b7e frame00003819 +c7875c1da1f49c86e23eca6915d22469 frame00003820 +64e3a7e9f1b278b60a8d2bea2981df64 frame00003821 +17b915e75232c52198fe87ff27700723 frame00003822 +64a8a2acf11ab116a526e9653a341ac6 frame00003823 +c6c0f20958de2ebd8756f92b69609f7a frame00003824 +8563a2e83bd7a94048c67d9ded19b92f frame00003825 +9ddbd219bc3776ded7d2ef3f29cdac41 frame00003826 +4483ac9b37ce00abc2f2036488686fd7 frame00003827 +5903c9a656f75aa1f37a72d166654690 frame00003828 +24ba2997d5794c71e40817c6a656bda7 frame00003829 +70cba5d368846af521c7d0c602e20f8e frame00003830 +70f4866f552dfec550b076595e352273 frame00003831 +1faf34e5b7f0538fdf67bd5b1e4233b8 frame00003832 +97dbbe6c647b5ac85f02690c757efa6d frame00003833 +467afdbe73b79435d2bab0cdaf51a5b6 frame00003834 +6711dd64d230fe4fd6f357b8204e77c2 frame00003835 +1bba8babe310076124cc68e19ed4d1df frame00003836 +c7423ae292ba9025c70d33e35f2b55b7 frame00003837 +c166e1b5600181085455199d1c3b4410 frame00003838 +b8da0eaf7e9742dd3866eb036dd523cc frame00003839 +a7ea232b1f39e54961c62b128f6ef7cb frame00003840 +f330971b3761a562bb1fe9bbd824d891 frame00003841 +ba9714758d2d369bbc6350505d608f26 frame00003842 +52db0f2816316e8023e6c8d431375928 frame00003843 +6702e674e6089943e1b292433077a98b frame00003844 +f6249c7b155172bc9475504d166ff34c frame00003845 +873efc5fb4a1b0687da9528c7f629b7c frame00003846 +84ae96715a260ff70b67522451dd1803 frame00003847 +2a5b0bb816b37abbc08d0e182cf767f1 frame00003848 +4f9a4a65eb1889a84ca4ab01dfb7f4ff frame00003849 +3cdfa821c7a20faf2a384c70c9b57478 frame00003850 +e5f1cd43c1f0d477f757d1f67d56dd95 frame00003851 +50ece58cef745f160d89d4e7c70a38a8 frame00003852 +601205ed47ca82101b200b8a3425171c frame00003853 +fd4ac51cba581c55243c4aa0a0b13732 frame00003854 +e3f0d4c6659a02679f16decc37bf452b frame00003855 +e9977bf41888708a8eec5e6a5a7b13e0 frame00003856 +fc2765db361e8fcc991b5fc0a88e8c9e frame00003857 +e5c1cf6a39d6da45f3456a3592587ef6 frame00003858 +4e35fc5a57dcd8a72d83ace541976c9f frame00003859 +3981ef9bc0b46686c8972b3b5d9e4f06 frame00003860 +74b8e6767e966e1b5d524b5f7c27663c frame00003861 +1499e2790d0e0267d73481f99380f4e3 frame00003862 +8e8e404c9845e64e65b620f55bc8c2b2 frame00003863 +3d16b1a5e256dc72dfe0110bafece9ac frame00003864 +7e9f76d5305e0f3a8e460162bafd264a frame00003865 +f500baa42f34d31b32a5272e5f594779 frame00003866 +84d8921890315e5a6fe2a2149cade22d frame00003867 +e98587e8888bdbe1cd08dd62e93e5902 frame00003868 +35782d2915c1bdfa8af3ccb67ace861e frame00003869 +013e856e5e158df21fbe28169e5cbe93 frame00003870 +44f706c281468904d9ecb5e2424f810f frame00003871 +eb51e77b8a6bfb81aaf158967cb43f5e frame00003872 +2c20ddafc0a0182bbcbad9ff4a49e860 frame00003873 +8e9f3cee7f684da80fd6fc12cd299b1c frame00003874 +ea96b880c0b66719184fb82de305e5a2 frame00003875 +08fab7f95714ead6f1e6a51acdb1f0b1 frame00003876 +e32f8adc19864bdae5b4d15ca8bdef63 frame00003877 +6551f54b5d803da64fe34b99a76fa27f frame00003878 +027618a7e6803f35ecd29dca10e49fc3 frame00003879 +ff35ec490e6c308ade47c2af4dded564 frame00003880 +5aba6646a926ae1742e04f4a597f5a34 frame00003881 +edad927ed630621efb2036b268752a70 frame00003882 +58a6efb1265269f0975943ee0cdd28a7 frame00003883 +4abe847bad31530b0a99cdde3b6b38e6 frame00003884 +4562076a6a8aff3b4b7920c5eac5c485 frame00003885 +52e7afa61366558d643af5ec45f04e12 frame00003886 +faeac1c1085e55c1de6cc3173a211bfa frame00003887 +c31d1d52efc973e42b1ab57ccf312ef0 frame00003888 +bfc996ae5e21774402d090038c58666d frame00003889 +7a37a089d6b25f4708a941186b170032 frame00003890 +be3a574e7a82f5f6e84022932e00106b frame00003891 +25a22bc796653b2858b02034972af755 frame00003892 +801a09518ad004696b0fdfc67221bcf3 frame00003893 +76a14fd4e723fad9744a511540edd48a frame00003894 +ad588b45a06918cb59e77b6d53c49dfe frame00003895 +22d037d445e371489cb8e9b637848459 frame00003896 +68b59f812f48ebc17d77c1574dce5b9d frame00003897 +be6724e2ff89d0921c4126e5e50c6b5c frame00003898 +f393566ef3901aeba3b531e588502bc8 frame00003899 +7e5acbb441e808758bd5ef61d86759d8 frame00003900 +32d5e14e89c0da7a69f99c57a05da548 frame00003901 +3fc7d86de6a7c0b281ac7db90872ad41 frame00003902 +0970fa8cc6f83712121c1f87abbe6393 frame00003903 +61a52ec1fd38c5b1dcd115b92a09df28 frame00003904 +dc63379149bab1200917adf25dc44b96 frame00003905 +99714d31adfd4c4b24bddbf737daccdb frame00003906 +885b2bd484443c373f30393cfd4a6436 frame00003907 +67ca4a7d94b39641ffce8f64f08088a6 frame00003908 +47d99422c62f92a0789a6d7bc63d9b5f frame00003909 +52df6672647c8a3f3016be5793363c37 frame00003910 +41acde57a131e813179a1fcff2cffb0e frame00003911 +247dfd56977fbb3aa8f87a38ae6ba00e frame00003912 +897f2af3cc8e4368f318bf4888e0f975 frame00003913 +14369a0fc78bdac84453c3b79c1af8bc frame00003914 +e90d454db4e72d66f750b63fc0ab639e frame00003915 +02e4eb169686857eec17b9b050d24058 frame00003916 +e0999dfae1678a238969b32e66cbe69e frame00003917 +324d89577c977cecd91115c92ff05cbf frame00003918 +138f2a3733aef7dc7a2b9a801fc1767a frame00003919 +2771820892c24054bd55b31f54fe9ecc frame00003920 +5d813731e6c728dc758dfa24db4fa2ed frame00003921 +9c354b19f7e589ad93e958824e2dbd62 frame00003922 +c025976188034b672b96442ed07ed73f frame00003923 +e4b931c53ccf41e90ff1fbbb865dcc40 frame00003924 +b846c987c8ec8664d04cb0fac1aee99a frame00003925 +35d24746ccbdc4b184e2ec31c6a4bdf3 frame00003926 +54fe6b18d3cb0b0bc39e33701eaaaedf frame00003927 +94f5988684467215f2b59511b538d446 frame00003928 +133af2110ecc0241222e95da7cf6899e frame00003929 +9bb8cc8b7e93ac9e5308cdd783dc5b45 frame00003930 +b5c7a03f087c89d32765fd4e39395c2d frame00003931 +9eb63c5a4feab2502f7720751cfa4cbe frame00003932 +5036608b445a34b25d9c60d4dc30efef frame00003933 +7ff3cee876343660955ca187bfd3b68c frame00003934 +278a9095c87a3e1abab049b232013aa3 frame00003935 +f60363a1ab0ba31b4ccab26e447bf0ae frame00003936 +8517fb7aff63b4f58b07faee8f5b6800 frame00003937 +1b7f77fca605365948b5532d23e81d25 frame00003938 +50d43d0461f554cace0b225ca3f3f0e5 frame00003939 +979ab6ce7b39369f01b8061e89ce3646 frame00003940 +88b02b5963231a4a3870708c38a8ae80 frame00003941 +2ae480e504c54a67bc5ab8740355d96b frame00003942 +51d81f5218916bc8311d1d15e6f404d2 frame00003943 +5672fdfbfba8be4c104b491ab54b3dab frame00003944 +e62c6e5888b86f4bef29dc28026babf4 frame00003945 +f5565d583c2778849c834022dcb2e2ed frame00003946 +78cfd11e2ac98816bcb07aabd7f1bfe3 frame00003947 +87d795520c90ef78edcaecaf3ed21f4d frame00003948 +3a2d54fa7b00e25ddb96d465e9b99caf frame00003949 +1a762fce0eb225d74454a4d4a8c5487f frame00003950 +7f58227092e88f1b8cba1c6177d5558c frame00003951 +d0a0fd14bde1ef8c1208ed051fea0035 frame00003952 +469df7b28a6e28f2c82994abc612d006 frame00003953 +bef270aee0d375ec85f338a05125e27d frame00003954 +026485445a4858f2e2ab780c64750309 frame00003955 +42ef15e922dd3fe3cdbf9d1942af9f2c frame00003956 +5ae7ee486ff260ce413c621173f4fc86 frame00003957 +2c1a28d5f70be46e6c85a03d6504f90f frame00003958 +2b14a566ac363ca756ade0969a958f00 frame00003959 +5ea8e728940687838f84af1ab8ebdf5f frame00003960 +740d5bfea4fe049c03476921623c799c frame00003961 +4e9ca3194ce54fb231793aafcdc3a57a frame00003962 +6919582bc5476862092620db011d16dd frame00003963 +49db3944692f2243b7cb19e0bafabbaa frame00003964 +2ef8a56794c504f7ff0007b17dffb332 frame00003965 +c2cccba82c5e31aac14ae0e4390ea11f frame00003966 +23855576f26fb3142d3c7611cf9a9178 frame00003967 +6674a9438e9e7f8be76d24d054b2c1f1 frame00003968 +ac65303acebe93ef18b2deae3a1f1d48 frame00003969 +64108b1f47f41d9723fe7bfc14ebe6ae frame00003970 +e193006bbfc98d6983e3830075c214b4 frame00003971 +d1edae30e323b89dfb81c499e368efc7 frame00003972 +1c416a0a5281531bde7e4288861daa8d frame00003973 +61f04c8116bae0ba4afd18ffe24f833a frame00003974 +32ca76f3466507ce3a7de8d0045d4ebc frame00003975 +5dc557e259199f42545b0cd04164333f frame00003976 +0afa9b38a55c3dd2088a0ba0918e8f2b frame00003977 +637ee297e91feeb5512380b231d6c730 frame00003978 +e2445915fd154fdb49c25cf5bcb3c626 frame00003979 +c35c7053cc3e6015799730d56aba8ec7 frame00003980 +5bbb2dcd5bd1ce82538d99e419183992 frame00003981 +21a2899c7b02e42fe3e49fd1ad7322af frame00003982 +318ef7d94141fdfaceed15fcb81a61e4 frame00003983 +a5600505dddbe65a9a1f4d9879efeda3 frame00003984 +b3e72413523ff8dcd941660c87c01895 frame00003985 +060683c97571760773a0504259b8b9c8 frame00003986 +60351de2aff45c77d221cbba5693e78a frame00003987 +633bee10220b0912985d03638d98e0d2 frame00003988 +0c99c39f32583fffcf33ded6287b3d85 frame00003989 +7a13a693b92f2e5f5b5b3e2337cfe68a frame00003990 +92f98d2b97cb4a81e6ffe1391ea4fe9c frame00003991 +485da03cd272e82144b7cf701fa6093c frame00003992 +4b6158e13184cd8b7fb4865eb2ea1355 frame00003993 +149e1a72e7edde238195ce77ae0c3a72 frame00003994 +51e00b7dc333c6eadedaee247f10c5bc frame00003995 +066cf632ea57b3acbaa6a83323794a50 frame00003996 +6f311587519ee3dc7914232c437325f5 frame00003997 +6177a01fd63d57a6b8d7ec67a2b19bdf frame00003998 +7ccf7a437855d6e800f82c6e5d904139 frame00003999 +f12c9f922b2d0366b9fc9868954e8701 frame00004000 +4f27061d5ab71c80a89afb0904ef4db3 frame00004001 +9f4210e466d3c87c54ba690babd8bd67 frame00004002 +2269058a0d1b744fb823205561b725d1 frame00004003 +ce8970c54ebee72d124d5db0f6521364 frame00004004 +060a3462c03c38e84ebc59c1eed484c0 frame00004005 +f211f89e57a903317da00e4952ee01f7 frame00004006 +4beb5ebd2ac72aa68030f578077395c7 frame00004007 +ecad56a1d1179eeb59943e8cfdfd5c1f frame00004008 +42548964fd0e1ce7f29f76d6f73354b5 frame00004009 +d7fc754cf2dcfa177c12af9f53bf7179 frame00004010 +ade0cf0663a8df26e3c410a08c286a3b frame00004011 +637c839cf515123da0c5c40f46ba58c1 frame00004012 +bff59091c81d059471588045759c6740 frame00004013 +67675b7df65da54b1985a5f68ccb01aa frame00004014 +b6e4acea0fab7b79135b4dfd19b76f56 frame00004015 +39a96f5051d46066c0ba3e153b28ae89 frame00004016 +f0bd26f73ebb4716646b6e7e6192f797 frame00004017 +f0bd26f73ebb4716646b6e7e6192f797 frame00004018 +f0bd26f73ebb4716646b6e7e6192f797 frame00004019 +f0bd26f73ebb4716646b6e7e6192f797 frame00004020 +f0bd26f73ebb4716646b6e7e6192f797 frame00004021 +f0bd26f73ebb4716646b6e7e6192f797 frame00004022 +f0bd26f73ebb4716646b6e7e6192f797 frame00004023 +f0bd26f73ebb4716646b6e7e6192f797 frame00004024 +f0bd26f73ebb4716646b6e7e6192f797 frame00004025 +f0bd26f73ebb4716646b6e7e6192f797 frame00004026 +f0bd26f73ebb4716646b6e7e6192f797 frame00004027 +f0bd26f73ebb4716646b6e7e6192f797 frame00004028 +f0bd26f73ebb4716646b6e7e6192f797 frame00004029 +f0bd26f73ebb4716646b6e7e6192f797 frame00004030 +f0bd26f73ebb4716646b6e7e6192f797 frame00004031 +f0bd26f73ebb4716646b6e7e6192f797 frame00004032 +aa5896961715542064cc0c4446a83352 frame00004033 +8c847f2a85ce553a62aedfb7d3251de5 frame00004034 +b3a4e5c150d28b46f4e5fc47d767e8eb frame00004035 +6e02c90cdcdd8eff81a57a209eb1cb5f frame00004036 +2f45a7a2eb83f6ac3d0deb027889d03f frame00004037 +339222783b4dc2048b9f8580965bb07b frame00004038 +f7e671be7d1bc70f8875dfdd4a965b5b frame00004039 +6543c59e65662221882af8090ff5a0b8 frame00004040 +cd2f187dc272a269b2a5998ceb04d2f6 frame00004041 +3aeee358ff89115043bb41eae1f20bb6 frame00004042 +b5e0e9fa7264bce76d6dbb67f83d2f40 frame00004043 +32e4c29625bea21913a768858920b12c frame00004044 +624cea62e19789776088fcd62b257037 frame00004045 +997bb7ed2bda92209ee921c571aa6018 frame00004046 +6e08f5e0c5edb4220e62409979f5ef25 frame00004047 +f4ed4822fb10e96031b47d3d33fa0155 frame00004048 +d4e5f77b714e49fc5b4e0d25a8257d0d frame00004049 +972cda4a45bbbe150c76ac3c290a5a6b frame00004050 +d4275e84b7b71fdd869820bd2fc3ade6 frame00004051 +1c326c913ebebebb947d527e2ef19d07 frame00004052 +a2b558a830c15e7a1f09d28d2b19e4d8 frame00004053 +dc70b9a53f20a3c1d10b4d58a4d393be frame00004054 +121b49913bce9a1f6d5d6375d8a383b5 frame00004055 +b06cdd043f6611d6757945094259fa94 frame00004056 +bffd15d7853b1ed969d0fdb01e5b7066 frame00004057 +d65efa826b559846ae22b2cdbcbc8580 frame00004058 +1230a908352b4bc41022545630cb48e1 frame00004059 +eea25dd79fbc85b5b7267d5ed257209d frame00004060 +6b3a15138a162bdeb8163c4b139e7e6a frame00004061 +1e6968acbfa2c054c07790930a4e1f64 frame00004062 +a0c53c0c54557628e4ad3919cb9afb7d frame00004063 +92df2cef135202b14e93d99518c4491b frame00004064 +b9c7c874ea80fb5d0dd15f29c31ba6d9 frame00004065 +0c5e4c6ed6407e0ef97b283cef07f2a8 frame00004066 +39691d9035f59126d0b73a4250d8f130 frame00004067 +f3177d5be07f2dfcf2aaa11a0dbf168f frame00004068 +eb8e619bd6567aaec498726e5e730a9d frame00004069 +722af35655dbc34ca72131c13ed286e1 frame00004070 +59ccdc38b3f095cee533748b4614f0de frame00004071 +2103905d7770bbfdcc0371138a6aecbf frame00004072 +eb2ec18ba3d2808ae5492268b18a73f9 frame00004073 +8f55d2bf783d4f7e801f44228d0b0328 frame00004074 +2229770987d78a9207a9f4a19c083bfc frame00004075 +c4b97d58d951a3912b2f689e38b0d4c4 frame00004076 +be981c0e404d3fa14ac220849a046fa7 frame00004077 +bee8a296df0486adcd4a806aa0bfc58a frame00004078 +adc781b246e4cc4edff024da019b4e93 frame00004079 +41406641bf544d39dc8b27153ae590fb frame00004080 +d2dd47b8ef2a2eda1ef7fcedbf394748 frame00004081 +3336e000fc59eefcee16e2bd063d9c4a frame00004082 +4b72fa97ac079034327896f8cc850f10 frame00004083 +b74aab17d832c0bec508e18de1909f6c frame00004084 +9481e86299937e102a7be53899a6c83e frame00004085 +50f5ef6a230c283e372fe1cab6f9b7a2 frame00004086 +77737c059f986242c3df3b004a13d2ed frame00004087 +c13be862f4b4da9ef79d8d27369c63e8 frame00004088 +ccfaa5e431ab813a036fa922548e8031 frame00004089 +889c548950f046ac86e9aad42c6bacee frame00004090 +fed170ffd4c1baf1055f8d731c9e629f frame00004091 +27410583effdca2b13d21d8b352d91e9 frame00004092 +cfa1a7c4e73b0f42bc7ecc291ee7ac2d frame00004093 +e53db819ac90859197563e2b6f5a720c frame00004094 +dab8ec2e8ba029fc63d9a7c6231f88fb frame00004095 +302a63687361e0dd7885edb39bb555ca frame00004096 +e4def3ef8ca2c6d47095ab19b42a79fc frame00004097 +57241e1e7a12ecb0412497c20ba3ea14 frame00004098 +c3684a9b0e27ae1e0f5fbfc966367e71 frame00004099 +44b6cfd9008daec6d10108855197740a frame00004100 +ba4a0ac171e40ae38f756c9498f7e9a5 frame00004101 +9f2fe8ee41a9a8fda8858fc277861e51 frame00004102 +6a9b4f00567662d60b3753acce0e8e27 frame00004103 +713ee5d26c158e8c4798b1ade97b1cd1 frame00004104 +00337597442d9f13debb53598fbaf2fa frame00004105 +a567f781e532da2129c7316a76baea1d frame00004106 +fed1d71bac08b4670a16a35845dc277a frame00004107 +2e2ba5c36919b152e7986f1ffd5667e2 frame00004108 +07825f5620e4334099bb629730ed343e frame00004109 +fd8547eb89dc7ba469e70623cc39fcd3 frame00004110 +49f88122dbf387fabb8bbadd5c76fb4d frame00004111 +7631951984a4a431d2d14457e9e022f2 frame00004112 +b36b82f9f22f773337900a3a595e3730 frame00004113 +57ca51e09e8f2c3e72a7eae101ca7758 frame00004114 +45f552b128bb78657804acbfb151dcb1 frame00004115 +32d561880193dbcc642b893da84b00fc frame00004116 +72e2e57a18a353d1caea64c21e9580b3 frame00004117 +d7b971ed48277f039237677a73a5b014 frame00004118 +7eccd81584e13fac48418653a2c3be12 frame00004119 +c09c25c0173945ee61611dbaa88f0b66 frame00004120 +b43135f49d67478f8eb335ae8e25edec frame00004121 +11d607c8fbff4e9fe3641404b8fe1690 frame00004122 +04f9c295af81b4ef3c8d4a23c4e9e97e frame00004123 +d1ce4c4d87165d1f41c419cd4c84b095 frame00004124 +5df435c11b1bb7028849daec4c25eb50 frame00004125 +ae9a379ba93616e35d981588570a7790 frame00004126 +477771338c46870cf4d29a4440f48961 frame00004127 +9d49e3ca8871f13c70809b4dc8e738ca frame00004128 +9ad2b7e7cccf11249385459ecd043cde frame00004129 +2f19304430ac97ac6c713fdcba9eb411 frame00004130 +fdbaf644f175cc95ee7b7e0517509745 frame00004131 +a5947b7cb99a1b541d1d5d6127dd05ca frame00004132 +ea148c2fd2abc66752e8f935566ad87a frame00004133 +3c9d3d69897095e8720bc632625e29e5 frame00004134 +883d37efa7a20eeabf4dc9e6e9264089 frame00004135 +4ca109cc47f10debbfb090cbb80019bd frame00004136 +94f8e70e84422dd5c7be9d0bc2081b66 frame00004137 +8ebf7bc81e7ca0a9302efdabde39a72c frame00004138 +a4548a6ccdaba259ab52c66fbe1f5da6 frame00004139 +9e9695e760267a37fdace0454c00d2cc frame00004140 +0770c64ca0807d8f6cbea2933a1a922e frame00004141 +f8642509f6d11b3f6d450c23dc0375f1 frame00004142 +4446683f750f5c88f156d1065dfb6691 frame00004143 +75651995cd0b98c1b0935b5e65bdd753 frame00004144 +73c8c46026d2f3d14c3c4fa87848b061 frame00004145 +755c78ddda9855a3aecac870615db9cf frame00004146 +9869f5f6a292cd4bd274956ba9c2c94f frame00004147 +e3f091af3e9b6ffaeda1639bed2435b2 frame00004148 +23d566991860c415484a867509aeff51 frame00004149 +5ab0a86b072b8dbc6521c0294bb0ce15 frame00004150 +d8d3ec6543653d5eddfda91576e76098 frame00004151 +55e8ac1859b9dbc7713a24fe1c3345a4 frame00004152 +4ea69b6d169c3f0df3e37b70fb558133 frame00004153 +3113746ee355a899066ce4c1956ebde6 frame00004154 +e975b3fd98b9c72082298724abb9b1a2 frame00004155 +40d434afa3f0000f761b0f5e7c9884cd frame00004156 +4e2c6242295b67f06eb1052283e312a5 frame00004157 +ac87438eafedeb5b16361f8772750336 frame00004158 +960c5e27c26296c89b8a3d057d298ae4 frame00004159 +d9c4e32faecd0f564475f7fa7ddcae51 frame00004160 +cfea8bf41e3d1705de40028614d1f695 frame00004161 +99813615a22e4140fc1d74c7e22134d4 frame00004162 +d0f0d31a43b76bc353f180cda768e018 frame00004163 +ece751e499be1d9244ecba9e3cc9b916 frame00004164 +f66395a9fdbb373b9f8c4c8cfa78e7f9 frame00004165 +56e463d9f6cb6278c70dfa06121e843f frame00004166 +357b51d890062b79b3e50c54d33ec762 frame00004167 +be82a20c72f362f2746e3e1c31ffac69 frame00004168 +8728393870a877a8ffe19c2b41ad38f3 frame00004169 +e4e3233a4e11814734bb486ea98487a8 frame00004170 +3e3aa39c426269da1a379d7144e49da5 frame00004171 +d2d5a31aeed478e55e531b2cb0722da5 frame00004172 +f28495039819b3385aa49f5a5f492d0c frame00004173 +cae21e0194fe9411163f97f26a45a7f3 frame00004174 +0c1ed6d7fb507d138079ba2c55b83b41 frame00004175 +9ec01b5fc4a6759b887eb6ee48ec8f81 frame00004176 +5904c6b6e629e41ddcf5cd98e80eabe5 frame00004177 +e6077bd5f23fd8df66a221940c22f3e5 frame00004178 +ddc47b3da65dc6c1eb74f4f98b6281c6 frame00004179 +5857ed4720648da4a0a33f24798f88f8 frame00004180 +7063dbe6bdd7a2a9e4e37991412166fa frame00004181 +4d6564a73568770757a5aa67e01d64cd frame00004182 +29feedfdddd4a29b57433e01bd082b1c frame00004183 +34d91db1a334dd968436b5ae18731522 frame00004184 +bd24e39bd8e6ffa37f76ce21f622ed24 frame00004185 +37588ecca8d3f11758032a6ea7a51cc9 frame00004186 +3a5b4a473ef7ef926c12c98dce97d268 frame00004187 +0e937087c4e8ed96cfecb9231569970b frame00004188 +fe9524e95b786b79b440f0b6beda57ed frame00004189 +b5c0cb5517f9c91d5a47fe246d95effd frame00004190 +a00f3176e8bc91511ea9dc4e6214c78c frame00004191 +8829e3334a33131e5915f5ff1d6c0c0f frame00004192 +e8308c36867d779796a4a69a8a3d4d03 frame00004193 +0c26d6b3cd1d5ed38575273e8d4c86e0 frame00004194 +27e5765daeec25e1d18e175e847638b8 frame00004195 +9677c271826459f20db6fbbcab069d21 frame00004196 +bdca5ddb93626ce3a411a02cb92e91b6 frame00004197 +26acbaa8a772e4c3cf00ec5c466d7d31 frame00004198 +196b9c78195a0ca79bc0cc64f8ebd4d6 frame00004199 +7788beb4bfeb253fd121a8527d104e83 frame00004200 +1cd33b966fc2ddd1c0c5a57f7d348172 frame00004201 +34f0eec28d9a27a600d9cca42e7d7794 frame00004202 +eac7011fafbc04cdd41caee94f6be6d8 frame00004203 +34158948f0c80a2712f96f6e7b80445a frame00004204 +235ee2f57763b08ae9483a4909cdff7b frame00004205 +8329f55a9e75ca292c5aad63e997ad91 frame00004206 +831908dbea3345ad26330ed8d0c03edc frame00004207 +cff6c7f4833be060554b90b93852a607 frame00004208 +00c89e7c521dc415c42d193cc7fbaf10 frame00004209 +389bc1ed5f49d1cf9cd8305ccf6e5666 frame00004210 +6cbadedcc9ae71503abed54208e80602 frame00004211 +72768c90b18b6c25e67355507ad40f2f frame00004212 +9e6a425921720a50b376a9c819bceff4 frame00004213 +ba6ee179955fdaf7c3be68912c16b8c0 frame00004214 +08ad91a82ed37e76b65b1fc15e9dfe9d frame00004215 +37c98f946be6435350d6a747fed3f009 frame00004216 +a2c154616c764789a7c25f4391f74fdf frame00004217 +bef0dbd6b0d4ed5bfe40732eedd9f89b frame00004218 +77e4bf619f9d2e913a456e3a47df6dfb frame00004219 +ccf000401edb0065c48d7ed58a9aebb5 frame00004220 +3e6f7d75279e35bce6c631594903a236 frame00004221 +12ec8af129e7d015fd8fcef40e2f03aa frame00004222 +fc5e71221901ebf924c8d0e1a7aca935 frame00004223 +9ca2cc0daaa7c58857b7d5bbac333626 frame00004224 +dc2aa5110a2eb5c2e428847b590864ff frame00004225 +d190a161681afcb1c19fd74db24c20b8 frame00004226 +963064d194f4c1038d1db2298d870e55 frame00004227 +3b6f4ddce5dcdb21d23a33718ee379f7 frame00004228 +884176959559052b2ae69e34fef1bde7 frame00004229 +2a7ed2afaff04235f6a87e0a5e8b1908 frame00004230 +981a5beace658a899c4387982a5c41b5 frame00004231 +5911572f6823b4b6e19655152e41bc9c frame00004232 +cd2435575cafdb0390378151ea669205 frame00004233 +8a714b2ff676da936465a6bbee84d546 frame00004234 +e8f2ed6705e1f1c8dd358eac81e31e2e frame00004235 +1f8daadb7ff116d72f73f82ed1dc87ce frame00004236 +64ab21059f9ce659887359e414f42223 frame00004237 +45ef9f86add024645b3ac0fd378daef0 frame00004238 +a7995aa57191462cb1f7cdcf0897f022 frame00004239 +b12ed784944bc7f8849808665d6be8f0 frame00004240 +c1ef00a52b4c74471db5077650f05d94 frame00004241 +9259f2fbbfe87797e77e07e8cc535fab frame00004242 +780995011b2c9e5692bc40d1e6a90c7e frame00004243 +3fd45237a691446b14786792ec44b7b8 frame00004244 +99dafaad8124b37c5861708a3df9f252 frame00004245 +269fad1253b44cb8383ba9cc1ce416c6 frame00004246 +81ea083709a0c5a99f88bab2c1c54785 frame00004247 +3bea8dd0cfcedcbcf4fd50e76ab9794a frame00004248 +e12c3c26976e9f0b64a49dc742a85fe1 frame00004249 +c9c7b18d9b4cdaa510113594253ba570 frame00004250 +1cbf7c87a72069f05fad4f707e945d4d frame00004251 +bc2489b23f05e8698066f8fdb470712b frame00004252 +ac86d0a30e8cbac931c5b06310234013 frame00004253 +f051592ee15fedd2660aec6c7982b0f4 frame00004254 +d4dda173671df22785462d1629395d2a frame00004255 +4a8c73be9582a6371d83ff47fa4ca68b frame00004256 +c35f003058d5f8fad85f2ca62cb46143 frame00004257 +c286228607735c75f9527ae7046fad5c frame00004258 +d814a996b91412c9b234394c950ef6d0 frame00004259 +cb220a1b72e3eabdf9feee00da01be46 frame00004260 +517128ae1862cf1815d6679ea363a4ad frame00004261 +6e6a32896a0fddea63f37e16e342cbde frame00004262 +02e94b6e77477f23c0a86a5f31dc6a32 frame00004263 +871313510f331db0aca95401784d30b8 frame00004264 +bfeff5ab00171dbc7159182cbc3533e7 frame00004265 +c5c1f9a4c2f10c2f6d6781b9a88e4136 frame00004266 +d879aec777c230bc0751d9aa33d50b6c frame00004267 +c8c31efb6718f5d68bfe31a045eb168b frame00004268 +680185cd3b907ac4585259a558fb1e6f frame00004269 +947b128d15d23fcec00e869f0a1b63d0 frame00004270 +9590e07737d7262f5c129709291ddca3 frame00004271 +ad62919f73b99c65d1ee949b975be790 frame00004272 +fbbdf9b6cbecfde7d4cdacf35ee79cbd frame00004273 +185fb951d75c081b92a9016a9034f7ed frame00004274 +50d50cf37bb4350b851e56668a271055 frame00004275 +3aa73c1c4fa8cbdd3a5cf8da807ec7de frame00004276 +4591b07d8e8f7e7021f45ead5a19d706 frame00004277 +4a98b9ac454b012291bb095d7ac4fb8c frame00004278 +4ba0b159f595ba6bf67f9ff9a77e7689 frame00004279 +1b35e3bd4d48ecc48f48c2d3568559d7 frame00004280 +2a22c09dc48418e48ea7b1c45f112ee9 frame00004281 +4bf071b777538b2ce6fc40a0ab1cb9a2 frame00004282 +11666ad31a7bd17283b060996d7a4884 frame00004283 +a083a9c2c80b0c08a0ffddd9c325e7f9 frame00004284 +5e4f9a4271860e8a429c25425b08fad2 frame00004285 +b1c1d57a5a72b64173229649708af959 frame00004286 +7a9ffda4e7c34fc911ea5817ac07a6a1 frame00004287 +563465ffadc69b18cf55586a4d2818ad frame00004288 +e4099572818cd843e227a3e318dda60c frame00004289 +b732d90ab042dd6130b2822be9de2215 frame00004290 +f9b4243b8d2ca8c26d87460894519813 frame00004291 +1af4835565f41e2f8d93c9705344a151 frame00004292 +f693ee3affec000fec81cde23acf8fc8 frame00004293 +5956eb127b61bc7169400f4d38b764a7 frame00004294 +9a738fb2aff2f677ef680eb019dbbaf4 frame00004295 +b9c3d74733f2502841d2116c4d0cc893 frame00004296 +f1bb327b3869ac6dfc0e6e4d5ef2dd04 frame00004297 +6530eeb7cd5f1372ba5ed151d1c7ef9d frame00004298 +f215a20e11817de78c4c82a0ba0981d5 frame00004299 +f9505ea9fa36206e0e4e995bf4765c4b frame00004300 +18fc874752bd1b9026c89100a749fb48 frame00004301 +0b85610bedbd6d6a5cb35a57e4e53760 frame00004302 +5128f35f0922e66c36385e6fcbbeb961 frame00004303 +374430ae98d0b53a10d3ca168ce6d612 frame00004304 +a0dd548398e0519c25875cd5f993d5c0 frame00004305 +d77136f9756f3e9198f36b0d9cf27c38 frame00004306 +650692df9329b61b05b9f97bbeec8bf3 frame00004307 +950d6825830c40ec6a5aa013c8d624b7 frame00004308 +c8f3f0da38fca4e9fb9365679c587218 frame00004309 +124e5d935bec79ab1cc3ab6d640f7fc5 frame00004310 +5b8d66b1bad116f9e3557dcdaa5891ca frame00004311 +99afceb35e7299754a28c264686e7869 frame00004312 +6023d1f98b486ff0f9323bb21d978bd0 frame00004313 +b21a3cd4f022ec99518e05e15ce1330d frame00004314 +f70cb14524ed2f43ecc32363c06ffdc3 frame00004315 +33504cdf91834dcfb1827ee3ee23e518 frame00004316 +af528e653cbd8965fc4c1af9ccf5877a frame00004317 +7f5f695467b19490899b00e0e9ae3412 frame00004318 +bbf9a232252a464064c28a207de629e1 frame00004319 +2f438498ccae64ef81192eab5eea0851 frame00004320 +4dcf262b2871728df30929f536fdb82f frame00004321 +6ed3f6a085e7a52eee9c28f004bdf6b9 frame00004322 +fa2c535ff910155fe5537c19698f0ed2 frame00004323 +e2bc350ffbda6e9aa6143ac50ed8a7f9 frame00004324 +88e9290e85e444b5297910795e8f3a89 frame00004325 +da693cd4c186feb3d0b677e6f02e9a89 frame00004326 +0878b2a06e3143d6623ab52ea6e2ae8d frame00004327 +bc6ce82e7e4e9dbe8fcce3cf73ebc0d6 frame00004328 +14c97ca12440d8b70a820e8aa6547e21 frame00004329 +6d222c6df28c80593e3622be5c6c33bc frame00004330 +bfeebd23f2b7b00037682282f25a7613 frame00004331 +dcd698af34586b909742555487fd4b01 frame00004332 +c3b2755267f65da8f282a89dd5978a50 frame00004333 +6692e20210f57741d7ddf21e29ef8fff frame00004334 +cd223efd98e13efef0ae50223b53c6e3 frame00004335 +c1645f1bfb3ca8eb04a003a3e591fe46 frame00004336 +dec5c4c9680e09f2c1ce8e9660df4427 frame00004337 +6a4fd994ea1ae7e5915abfbdddd7748b frame00004338 +41dcd9932d2db8b7d95b0e0811553d28 frame00004339 +a384bce0abfa4cad1abd5710ac0e1c8c frame00004340 +b07ce642c3a8922210a09428e27fce29 frame00004341 +f36ba891631ebb324f2f523a53aba39e frame00004342 +e9845f58fec389b92b04bdbb0899aa8c frame00004343 +673f7079cc654456a68b4bce5b8734d3 frame00004344 +ca11b29938ec3aa20397ec0cf28ec735 frame00004345 +40e719659973c5952c616ad5702771c8 frame00004346 +e0f1102e65c6e99da4e68904fe19f3d0 frame00004347 +1ab10b717e05e45b16a02dbe45b229d4 frame00004348 +b4ac2c17cbe11cd3a5282d3959fcfec1 frame00004349 +c3336109a6b97d28bdf45bd0ffb97402 frame00004350 +4d9f76a498d78485e0fc347afade7806 frame00004351 +275640fb579c9192080c03712be43525 frame00004352 +86f3f5111fc32fa3b951bdf424e41e1a frame00004353 +c79efa038b11b30eefa32a474f4b671d frame00004354 +658b71cc2f2d74c705a639ace94fceaa frame00004355 +c344131529b9160231b52cd9cb39e82b frame00004356 +8e580d1fd018a9eabe0bcbe0fc78d85d frame00004357 +7d2345f43916d7b7ebb35fb4e7e9c479 frame00004358 +7c9e83476efd52b3805c888f39cce5b7 frame00004359 +65b8a8ba1146b61352dd194fb5e1367b frame00004360 +4d00dd51a8fb81c2a4fe71b96239e60b frame00004361 +0a9c4132ea97cf33805ec010f5dfde76 frame00004362 +db0fc7c6165228662caf9abf8bc0f3ea frame00004363 +788ef3dbe3412be455d8c12ed0739063 frame00004364 +1eeb8b58facb9b92c4a6d99b53e2cf76 frame00004365 +9c30b581ae1089798105309cbba7209b frame00004366 +dc07644b9d47df418a70c28243ba5f71 frame00004367 +c0258994bb728dd15330f1859930c5a4 frame00004368 +b8a76fecaf2b616b1666084396a46804 frame00004369 +14249a2d2beb5a9fa869a344f8a96819 frame00004370 +98f44f1c9cdebd45188914d6e1918495 frame00004371 +3dc039ad8e0f1875d6a3cfcd7f0c2c40 frame00004372 +63adbf04b45e8f2ce582fa537afb0358 frame00004373 +a48dcc83ee5f00ca3accc59ca3939b93 frame00004374 +b619ca2d27201aa5cea925230aeabfc7 frame00004375 +9db9ed7a0d5fbe311bdcc0f076daa384 frame00004376 +ed10c9b2e093db45ac26cdec837c4c4d frame00004377 +273f5924c10225ba42d142f6c2064ec4 frame00004378 +2a6fa3a291914e58015b5473d6d1dcc4 frame00004379 +293ef9940e019c909c56eab5765ed8f3 frame00004380 +526a76cf73f0070325fe3e0bd3dfead7 frame00004381 +6fd38f67c76c4f1e11b56e891cffc3d3 frame00004382 +634951f909f565739949de7bcb1a7628 frame00004383 +ef2a300fed96a0fc9107e57f7d35237d frame00004384 +8a1326a607dd6dd3705ebb0df8d8eb22 frame00004385 +751081714f6327506caaa9148f7339fd frame00004386 +9f06bfc0d5db543ffe5f4f96aff9e219 frame00004387 +dbc8c4092ef9904ff423607524550e26 frame00004388 +e33ad2b8bce3f52c443b15a10ac1f0d2 frame00004389 +73fe42b45568d2851c6e744473e16d12 frame00004390 +25eaad81c1c6c773dd11bfdcd81a6c6a frame00004391 +4b5ccc7abf50942dbb89f04e2e23b0d5 frame00004392 +f2a616a7dea6a2a1cd4fb4b465a98947 frame00004393 +65422ca88dbb4dc818f3a84773ef76e5 frame00004394 +6d49d614267931b8164a45e16447fc5b frame00004395 +1379f2494b8f9e79dbb224d034353995 frame00004396 +a39fa909a303d4a2368f3111d11b7485 frame00004397 +7716b9f0a764568f9a5beda9153635e1 frame00004398 +aeea993ae7b46090dbd234910148474a frame00004399 +7d261065dd78d0d72df7a3549574c3fa frame00004400 +555710f0453108c0cdae2f1d6e3da087 frame00004401 +8d166566fce88bcb946b9f48b90e568e frame00004402 +709aa1159353d2bc7a342ac81d3c702e frame00004403 +7a567113cf7ecd4e0c18d2d471c4e96d frame00004404 +fc44128d99231f8e733391a01ebcf52a frame00004405 +c1fa6bf8faf4187b689f4a477c7fc6b9 frame00004406 +62e85f8503def9bb3bda4736b5a34ad6 frame00004407 +0966059795f8b81a7e62c1d39089b1bc frame00004408 +a649acde4d0e96212d0de3cbbc51c6b8 frame00004409 +80e81a0ef6494c771780e7ec5f082c5d frame00004410 +eedaec8d97857e31e2f5570c137dd234 frame00004411 +04016fd2dd881498f2142d3a90ecbb4a frame00004412 +6c08bdfec546899198f36f4448e4d1fd frame00004413 +45956c84d0c3f748e9d7c089632d3920 frame00004414 +40b75548859978f96f22565b2e9676fa frame00004415 +4692a1c13eadbfe71eb6489ec2fd9ee0 frame00004416 +68fff0c7e31eaea17cc018747b4e1831 frame00004417 +cd41966078976fbdafa963c2997004d1 frame00004418 +e397091ad869898273320370cb0ce0ae frame00004419 +ef24152a335a3e76db378aba17ca11a3 frame00004420 +135db344220d111f480e05938eabfb90 frame00004421 +ace4df057a59a817e6c3f1a95d22abb7 frame00004422 +a181ef7992996fa6e8980fdac9d6991a frame00004423 +7a26e94743ba67f0304cf09a1aaa1c73 frame00004424 +9c2707fe52b03d7af678d0958ce1549e frame00004425 +7aff98f4c2513d7bb2e30df8d3f778ce frame00004426 +0f0fd6817a02ed8b405e43fe8c9addde frame00004427 +e6e0fefa2d6b74f67b2dced5000a8ea4 frame00004428 +ee8d05ddb16eed4b20f9338e619850e4 frame00004429 +b31118b50caf68acfc60367083eff2a1 frame00004430 +80552e04a1fa46b61b1739f70edfe290 frame00004431 +519a4e4a4c7ad087a34f557c9ca1457b frame00004432 +83eed0a701e95ddfb03eacc8f07d685f frame00004433 +513c2cdc897b37af9e4eb1ba93314bce frame00004434 +f70e518c015e6740e0ab6ed5897e87b0 frame00004435 +5717b97e7fbdbff787c55efd5c4251d4 frame00004436 +4367175ea71b39ec3efdb31cd8135a44 frame00004437 +091c57d5799497f55459a2b9dbdb341f frame00004438 +7c8228b666dc51403e0bd6e7e1f1a2be frame00004439 +ab16a0165541112d9f756d8695c8a280 frame00004440 +a380a6cec8231dce0d8d6f8cbb3f39b7 frame00004441 +2df38c1bf07aabb816508e441e2e4f2e frame00004442 +9c26247c2692847fdc717ee759b8d51f frame00004443 +519f505df9048dfd17fa65b6acb83c5d frame00004444 +9d837584eb4072bde8b485d483c1244c frame00004445 +10b62cb1b31e45f9ac5f07976dc5f2bf frame00004446 +03a15fe96d353fdbea07891d3ea360f5 frame00004447 +46b5a6a0b0fb3f89b80ccaac8666646e frame00004448 +8ad4a9b681c407ff37974de9a043a7bf frame00004449 +9f856755dd00857918726569d437895e frame00004450 +a5844a1cc17965e78b3e52b33136d829 frame00004451 +5316960c6df57833907851515dd42c50 frame00004452 +fe3a6477336fd07f650b192b9d19077b frame00004453 +05aef9516d72aaed900a1c6b43b6307c frame00004454 +06d0b0b50fccb2b16b73f3d8d6bf78f6 frame00004455 +6e9c81db65c290e8942c6e98f724dccb frame00004456 +ac364ff254f5d6140e5481a4370d0eaa frame00004457 +0a56ce4b4ed5c82d157cb65f6ddc26d5 frame00004458 +be6945974414215fc320004269253349 frame00004459 +8650a05d1fbc2ca785a4c486c0247bd2 frame00004460 +f29b84d5f9952385477e193e031099f3 frame00004461 +f6f865282c01d35a0e253c8ac71c4ac8 frame00004462 +9fbc5ecc0a6b607e3f52096091004c94 frame00004463 +4017f122ba3e5e9810f1e9afa4310140 frame00004464 +d8df0db64618e29de009b7d8c8c826cc frame00004465 +cb57015f4dd322fadd2820ca84461b4b frame00004466 +8e8a855a153cb35465d90528af94f1da frame00004467 +20ffb4cb1fb5d5b786e839488dd7ab80 frame00004468 +31b4aa483c7c1e12b04f75a330d0d59d frame00004469 +aab9ad8be6f129be94302c49b1d0a419 frame00004470 +4109678b019feacd9d2fe12b1439393b frame00004471 +db2260154a5f2d5af55e0de831bc6b32 frame00004472 +3422db613c04f543daa7d2cedf7345aa frame00004473 +3f88068fcc336941ba964b9bbe6681ef frame00004474 +f170e783983cc4ad2b4dfcf3523d3b44 frame00004475 +e544df1c90c542a0717a56eb18a5acd5 frame00004476 +e7a698d8ad90d8afad221ae94d7e9740 frame00004477 +5572857967c2d0b507efbff247c986fa frame00004478 +f93b7c4cba7c5a364b821bf5b1dab447 frame00004479 +3521d1a71d4e4e6da0bce6b225cd709c frame00004480 +7acd33d9d91ba1ee8465980f9395bc69 frame00004481 +b15a00bd5312a02d7aa8be0de63d445c frame00004482 +0464d93a04075c1cb63e43420f456b75 frame00004483 +83d4323a060ef04d2f50483297b4aef3 frame00004484 +90dad23c455da307f8f1023455d4a1b2 frame00004485 +8e762132352397ab552ab4a11f7df48b frame00004486 +d329569ca408fc49e35c22cc30d5d524 frame00004487 +ac0139698482522f433156257885fc65 frame00004488 +dd760f8cffc9ea8cffbc03bf20d370ec frame00004489 +07b118868c6c059ed3a6657c573b3328 frame00004490 +85b17fc35d6143fd0b1ffcf2db9b7f0b frame00004491 +08b5ea1a3e619a652caa36db662ce58f frame00004492 +066d26c1e64d114cf7dccfcc6b491e72 frame00004493 +917f7898e88e81342ccbf02989ef449c frame00004494 +317f33a71e4e906236847854cdb3b9c0 frame00004495 +8525b1d117551a3b1b95321b132601de frame00004496 +175fbad9b23c7cc00b156e310cc9f4d4 frame00004497 +93ad2c884ee74503d5cdceced4b4683d frame00004498 +3c29f8b49605b63dd890d196f7b01f7b frame00004499 +1084e6b97a4a21b354dac71c0092b71f frame00004500 +d67b0a0e00a0c29484cff8a42ad3ae0c frame00004501 +e27e8711f78ae99c47a179a7449cb22d frame00004502 +4e50dea396c3b8b07d22ab64e4bbc1f5 frame00004503 +8296b4a34bac7b2aba6c3d193855edab frame00004504 +cc3a14b732d1cb5a932e82d7bee12d77 frame00004505 +0fc669c905e2a1ee1087a4493b6178b0 frame00004506 +422a88b99b2c623b729886933970b328 frame00004507 +1d4e594787e910195c67dbeb85f60271 frame00004508 +e0c8b40f44f4ced58ea858f4d91bb47c frame00004509 +0f5f43fdb6f16572abafca2a9623e8e6 frame00004510 +1c659a48ec9f29e3eff320d1d8300923 frame00004511 +9bc545ff5bbd0f58e2a9a1456cedc0dd frame00004512 +5307d299feaac2c768e136c3bb8f5551 frame00004513 +3cdc4d19a255a94e7e0638e502c53de0 frame00004514 +7ab66055192488197dcf53fa0436d99d frame00004515 +5ced7e73c7bd7b2749d814e432ec6eef frame00004516 +9b6147777cb40101d825548055fa4587 frame00004517 +75df34c1ad713c2ffd01462c78ff0910 frame00004518 +06afe5a30eef7f9f4acd17423eb7e3dd frame00004519 +17dd06bc435347ba8813ab7bb2da652e frame00004520 +3550e0e24c73557971c33e6ccf1ac799 frame00004521 +495943c52de8efb6536e9e2dccd0282c frame00004522 +0307e0465afa283625806f95614cee93 frame00004523 +184c6d8eb2782bc7d13a2bae3375c89e frame00004524 +15e7268846599266e9593b387f72813f frame00004525 +e3434ad61f079f37e1958238c1f79322 frame00004526 +332b1d79abf0858087a5edaf0f35bce0 frame00004527 +2ab5112cbc5fbe19162881de13d36bca frame00004528 +c99d4a1b4ad3e9df9f570458fcf0c4ff frame00004529 +2da2c767d9737e5cd319caf3164c2b3a frame00004530 +7cc981290e2172f1b4e5478951542add frame00004531 +ebce308c3eb271f4e25f0b0cc5538abf frame00004532 +707b78e5c0fa2572637f9e353e045a90 frame00004533 +e561919bc716a7ebd03adf7105399b26 frame00004534 +04669e2150116b4ef2cd4f80eee9290d frame00004535 +69df630ce9c9a0097cac4e1da10cc372 frame00004536 +5a1b3b4f3c49109a52b18f0387864a73 frame00004537 +4a19e8556fc96bf68dfc9cdc4435d210 frame00004538 +5df0757eec0741807e940225c0615309 frame00004539 +6bd932387edc2deb4c9b2a81ccfbbefa frame00004540 +d47cdbfcb417d5a0ff2767641836abba frame00004541 +d1c7757ab880d7c8da7aad8a13ea392b frame00004542 +ff3f73400209f41f399c27419c5936c4 frame00004543 +ef023ac7c307260c8acbe6177957ec88 frame00004544 +f998069ac8eb0f8c76ba0423a9b65a8e frame00004545 +8fe719bb70c563991da81c007bfd55c0 frame00004546 +a591bbbf004aa731d8e0302894625dcc frame00004547 +106f47ac9a26fa5a46072e4e5be90d88 frame00004548 +3ab45222461021dc299c038a203ea3a2 frame00004549 +27714daa9a2754a438f1f4c1abcc61c3 frame00004550 +27dacf8d785969569938dff6ed0be27a frame00004551 +4d9d564a574d94b00102bc9a7c645afb frame00004552 +832857f14acbc102a09c1c5b2796cf62 frame00004553 +683843295f2462f7f60d1fa759e8ed32 frame00004554 +7eef22d088d2315079c0793a443ce3a0 frame00004555 +efb711d67c14b63f19dddb551f2a9abf frame00004556 +7f3d4ff7d542d4f2a431d38013ed61fd frame00004557 +c801d16dd44a31c6a944ada65dc93318 frame00004558 +9ef5a19d1760e608e7d31498a4ed02ad frame00004559 +8881dcd4054c909086e63cab9dc41241 frame00004560 +1376ee7f1e9386abf4b34e106a9f67a9 frame00004561 +52586556fedb02945613679c64df09bf frame00004562 +2834299dfb46fc7f4e7394997e3b50da frame00004563 +70884729871cd8f6c6ac2856a2aeda32 frame00004564 +d5d21c242a6fb170e06dea85c029c90f frame00004565 +f83015f82cfd933b00ad7b2bd6f29256 frame00004566 +90ad62bc6c72b8aeaa2946327b11e9e1 frame00004567 +b2074d418c80143765ea0afa06e15d5a frame00004568 +46c690e380ae47ea5aa321bd19485cdb frame00004569 +a47e1d16c55aa2848481356d21d33ea6 frame00004570 +e7d093dfcf20b048269cc765b5bbd5e5 frame00004571 +3177b25998b4f360d968e58669f27f3d frame00004572 +814840aa8f13a2b99647d51b92d4ff43 frame00004573 +aff433a50b954af3f851bc0d86b0d2be frame00004574 +d6c449a1afbaecbedce6e1797c969de1 frame00004575 +aaa347d78bb2e628b9114c1b9a07883c frame00004576 +ef877ea741dec624367890bf7545f0f0 frame00004577 +7532ad735bf1850574120dcf4a9fa9e1 frame00004578 +fb53ee75b88a6a0a665ab57c8231fe74 frame00004579 +3bf5ff704aba3201055d6146d0b1bdca frame00004580 +b1492a1c2861f35c404c5aca443343c3 frame00004581 +30aacd26375327e69464e012a5a2a78f frame00004582 +f11cf669679e039c832b319f39bb577a frame00004583 +98da5300377fe038205c290cf28d8d05 frame00004584 +33b6f156f18a29518b8befa4cdd3a089 frame00004585 +b3261ca89e4248c2534cfe9bf86312d4 frame00004586 +b99714627ace814a0abed779a09a5761 frame00004587 +d976f491aa835b50d65c59736e0b759e frame00004588 +a723711002b536a6f374caa3e3889abd frame00004589 +d4fa8a28c68c7378e39bf6192e4f8a52 frame00004590 +0bd9bc9fa3b07668e40dec79c836a9ee frame00004591 +ad7a18afd490c263fd5d29a85287b1c9 frame00004592 +383ba0cbad86c9f399ff60edd43b9b89 frame00004593 +3a86c33f9c0654c69be0c1a83e418d39 frame00004594 +2f2b46b35cd571f80bc8604fb83062cd frame00004595 +4cacf1c8bbf119d6d6fee611e0d058a0 frame00004596 +f8ade17d8859907793d1f2fdbd89a9e4 frame00004597 +2097b885030d15cb25f7ec71566cb3f5 frame00004598 +7afd33f4734212cde235b25ed4dc9e82 frame00004599 +78a530fe5bb1b0a8836ab9d7f8995631 frame00004600 +05c6c33f1a5f1cec37b5b5bf23a5ef1d frame00004601 +89fd48badef0db3f5b0c6f73879700a0 frame00004602 +4b671eb33dd883cdded5fe2b1778b124 frame00004603 +27a4b6af2eebe4d743308c697fb9a193 frame00004604 +c6d11209cf65184024f3c18a096a513e frame00004605 +f4840005962327920f01f053c8e553a2 frame00004606 +b455d76f2083103311a8612272a9105a frame00004607 +0adefc3fbd6cb1e56e0ee5d5e8a63ad2 frame00004608 +a71694cde019b47e6b8982eeda321991 frame00004609 +874bec1276640c4f5c8ca83ae4aeae70 frame00004610 +a635456e31961abc173569e159f906d4 frame00004611 +19ed7665ea3e825c27adfe2ad17e2883 frame00004612 +2769b2d797ef04e3aa000289b3bf8e7a frame00004613 +677550266b2e94d7bf6a8b3cdf2db7b1 frame00004614 +2391cf5937e3d171bb4beddb4947ab52 frame00004615 +34c847aa7c08ca6b84f36ac12c2b6544 frame00004616 +a9f630d571b6250cf3d48e621b79544a frame00004617 +1262e0a6661b2d005206c37fb991ceb5 frame00004618 +cdb899b48eaf7df3c693049037f9ba47 frame00004619 +97b2ee92cbd384395ad0757052452f42 frame00004620 +d1a944cb89de528cb66a7864161792f2 frame00004621 +5700d2c22dfb3bb355475f9184db6fa0 frame00004622 +fe451875f855b282e8ceefa2b4e7b94a frame00004623 +4f7e6f0b606c9a474a2979ca5249f687 frame00004624 +f1cc7424a6f96577c1d44689eb6e2889 frame00004625 +2b926c7ad72ef9650e21b96dd44eb66b frame00004626 +62fc7199997d7dfc119cfaf24e3b20cc frame00004627 +97289aedc771ca28a8c1b64fb7b84709 frame00004628 +c509e1deba3239e16f6b6f28786dc51b frame00004629 +c70a7e02f7b56885a3271adbad9f3f01 frame00004630 +8ec55648e9832fd140597e3ca4f08189 frame00004631 +15403df978c00f76c1e061fe2553aa81 frame00004632 +6f0c51cddca4ff9236c5f453b2dcfd7b frame00004633 +39be2044840c69550da38a958a9d094a frame00004634 +3f08218b9e65bfee2ddb3c2de0b0451b frame00004635 +5f831703e0027737cd5d362f8d25a14e frame00004636 +5f332aca19bccc75452549b1fc50c287 frame00004637 +64502630e126ad8f36b2f8c344bb7ca4 frame00004638 +aa3b35edac5906d6eb70ab5b14027a91 frame00004639 +28451100b406d7d00e472a7135aa986c frame00004640 +eafd5691dfacd243ecab54a05c9fd947 frame00004641 +8cf0592cfe342b46bff994c12c5cf305 frame00004642 +49289f7a593dce4aa152c6cb6ad4d69f frame00004643 +0ddd0a1329eabcdee777f3d59132cd4c frame00004644 +2374f8f39cbe988046e5c1df9f663a21 frame00004645 +35792c51ea6ede509e5b3cfa8c9e7fec frame00004646 +1e523bd2a0a217fac346392bb37bba8e frame00004647 +5c7d3494f6a94579339376519cd7b0fe frame00004648 +63af9ced0088545b1addd96e820e0d0c frame00004649 +77342491e59fb42bd681b457b69fffa2 frame00004650 +3f76a6a11118b04ac41b1503c900aa24 frame00004651 +db47a1b9f24fd66831a707cb945b752c frame00004652 +435dcd7fdfbf3f54d19b79ea1be35dfe frame00004653 +7795cfb97cf0dd078a3e5254e39d61db frame00004654 +79b779f52e5b0b5354b8d6b797f22294 frame00004655 +bf623c3222a8922f6521d29848c14991 frame00004656 +68921fa9368f902d8e12482478c17778 frame00004657 +1aded394c8fbfe8772aecb8358b8f5bf frame00004658 +8eaec098166f75a1a1e97e07e97ab79a frame00004659 +d6b600067d1da59d8da72dee5cbb4d12 frame00004660 +2c7e2bd14abf02f76316cf0327f07ab4 frame00004661 +507e2180112aa6bd9d7241c0f8ff2739 frame00004662 +a11e4345bfa2441d1c2b541e20c7835e frame00004663 +77efcf3cd4f092abe24c470d2eac2c06 frame00004664 +3bd2a73300069f79316c6037816ab7bd frame00004665 +0e9c1c706697fd83178fb2779a24aea3 frame00004666 +9c38d2d8d677f0285e4d0ca34aed4678 frame00004667 +0409e553b734fbf8f86a9355b4a33ca0 frame00004668 +92f96b4f73759fb80b516c3b82fc1464 frame00004669 +489ddb52e4d3776487d03917f70f0727 frame00004670 +9b82d36ac395250cc8ade77180350b9a frame00004671 +b59cd2fb996c0dc4c2bbd5c85a61c170 frame00004672 +f370836caad820bfe976cbd291300fe4 frame00004673 +ee51983f3252611a7b1368a8369a1d31 frame00004674 +e4aac290ab066fb6554053549d2311fc frame00004675 +efe77af9c3f19751f6151c9da5cdb37f frame00004676 +795410449c3085dde7447fc27ef590e9 frame00004677 +cdd40bcdd99dc4b1fa8792663120bd78 frame00004678 +d73e830cfb653257836a432bb7d1a1d8 frame00004679 +3ea984d6d5b2273aed0326a251dd3260 frame00004680 +3ec2ec6fd9532a4b74347b4a42f383f8 frame00004681 +b26ac986bcaa1fc8ecf07fcf9d6b84fe frame00004682 +45840e6f6f332ddbcd74dc47eda3b9ae frame00004683 +a0877c8e20423135c246fb50b6df9a12 frame00004684 +8b9171410ebba8f27e496975719671cb frame00004685 +4eeb032f7038d89f20f2d95fe5a3e440 frame00004686 +5a24a89fc0177884d11fd6efb24664e7 frame00004687 +f5c7c8e349743260d291329b84c5f65a frame00004688 +eaf6a3724c0ec9b73c1611901a9f4c41 frame00004689 +88ea67ab4d6dd07547bcdf5dc78fd0f7 frame00004690 +908409db7ad30cfe84112484e72322ce frame00004691 +5ca6932ffe85cf2ea0c65c846d92a573 frame00004692 +26bd17cb4d056bfa1562ea68fb4db527 frame00004693 +643281a1c89217502b70d9f8cd3baa98 frame00004694 +908e280f99eb2a85c3d0935a3c58940b frame00004695 +bf667d053a668ff217fdbf78ba2d8375 frame00004696 +7419ad06462b1c719eb47e94ceb9dc0e frame00004697 +6a5f65da2acae4815bb8ce3326870ec0 frame00004698 +5c45a3e969953a64418f0b863fcf3181 frame00004699 +a68e9bec4eccf9f4de05151688af3d21 frame00004700 +84b178b6a665be32c5e7719886c593cb frame00004701 +1ae11ef216b3bdb31344e5ac6cb77618 frame00004702 +bd76b4c0fb199ff43077150f9de026b5 frame00004703 +6f3d6f65e24ac8bb6dcfd09b8af04650 frame00004704 +3ae46586e10356b6c9efdf6d54c5d6d4 frame00004705 +223bbb5b9d02754a70c01961164e4458 frame00004706 +557e6eeab76ba8de189b09a3334b4dc6 frame00004707 +ab9d14b40b978303d7d06a3a6bc9df98 frame00004708 +36713f825bf339c19608c1ff2692a116 frame00004709 +4fa779d2112f914f3b2cf56d9215fa0e frame00004710 +d9d2ea2270cc8005e5044765ca54c91a frame00004711 +aaa4cbf45b0fe43505cd59d810cfe13f frame00004712 +f114f46ecd1f85cfca8e7e6711564cba frame00004713 +03675635e36b61ae0eea24dcfbdac3c1 frame00004714 +24dafeadf79e2702e672ff7dfda99ff2 frame00004715 +296db85c72fa93899d03f72d9272ca7a frame00004716 +2001fb14e1ab71e0d9a99fcbc3c6f8a5 frame00004717 +0ec03a360effb3cee5fa13d2ddaf7fba frame00004718 +68656cc1616b38d3198b5179b70eb338 frame00004719 +2d234f499816756bd3c474b164db82ed frame00004720 +b9f0f6547173661aed2d7b4580e7108f frame00004721 +c90dfdf68cf30b1b87c91c2bc3cf8ae3 frame00004722 +d0f4ad11b43d5bb8fa8def0b497f2e2c frame00004723 +21324b13f25268548c8b3b3a518a09d1 frame00004724 +a029af21d6d0799a31377a3747a001d1 frame00004725 +3f54ecca4454edb86bae28e558d56f99 frame00004726 +94d00a4286d18de712da64d192ce096a frame00004727 +af1da28c49c0d657645b6f553e6ca128 frame00004728 +86550d0e30a6a200e47955f3ff8502e4 frame00004729 +01f77124f19ee47854c09deb27416528 frame00004730 +95810c8862f26a10d478309575041548 frame00004731 +02d23be93c3bc64659193188bbcb55ec frame00004732 +7bcb3fb426791be8f87f37de7835aeb9 frame00004733 +31c2e9be51149d3baa80303b73caab60 frame00004734 +6fd291ddc85a1aee754fafb6ad7e9e6d frame00004735 +bcd1e043884de10f4014b5a2a1ad3d0b frame00004736 +4ef67db62dd32c290643180a0ff5430e frame00004737 +187718e479e371cfec4472209f1cc0ac frame00004738 +a229410a6ee97fa55378ab61629a6194 frame00004739 +2e50fb212554323d084d5085e105395c frame00004740 +679d7763d168661494a788741e903315 frame00004741 +a251df9c203705f120c388583817eff9 frame00004742 +bfa570582dd505e1d634809dd6075257 frame00004743 +42c00b4e4b8d29763589112d2d525bed frame00004744 +c9569830bca16320ae482133f1ef8364 frame00004745 +9f279fab161c8d874fed45d7949501f1 frame00004746 +c67a2e107748654f49d46e25009223df frame00004747 +658f2099c816b589586ea8a7be74d22f frame00004748 +156537fd9727a8208c6a2e97500a0f1d frame00004749 +2e96627f10c30259232da984f5ab11c4 frame00004750 +d3a6e79376508ff4d79c738a35211597 frame00004751 +00ee495d1302ffad51ccd1663a7bb771 frame00004752 +b02aadba27194d45bebd46cde08214ca frame00004753 +513a5ff87c0425ba0c17afc559c1f8f0 frame00004754 +dcb7591394427401d8a69ead20c2aabf frame00004755 +696a892244cd9ff759a4b5788151a512 frame00004756 +7a4f54e5513c4edf889eba4e24abddcd frame00004757 +6825aed5050aff86ac3e1ae1ead078e2 frame00004758 +d3499c2da66a7001134aff7d4c51104f frame00004759 +a3cffb9a3f4246e042a4beeafac298d1 frame00004760 +897d620884983a0a6fae9e8cc796bba0 frame00004761 +1c7b2de5650d3e41accf30d1895be111 frame00004762 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0000.dfa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0000.dfa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0000.dfa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0000.dfa.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,25 @@ +26fb0326f920245164089a70d8e62b9c frame00000000 +bf252d7acb6218312918a81e8413efb3 frame00000001 +0acbfd6115307409fa53b790bb290f0c frame00000002 +d3aca032b5bc16652785adf6995bef56 frame00000003 +ccc25a9b829631ecc5e90efe234e4c99 frame00000004 +6c8817aac7a8a85a7a31005301fb4a79 frame00000005 +ac477490b834775ca42b49fd9b87da43 frame00000006 +8883cf8be623e6f5cde46124ca89e8c3 frame00000007 +7030798c030d7502ef046222bbd3a4cb frame00000008 +cce095d1f27f04b733548d5493976c09 frame00000009 +31ab1cbddfdf745e639328f1d027648d frame00000010 +84c38b36c62a7a8c5ac8d817e48b734f frame00000011 +3a6d56f5e6a0e2d3e0f1c226065ddc0e frame00000012 +ba1c1d3e2a4406d9ae3f8e2bf71942c1 frame00000013 +ff6d1f55be4ceb6c951f1b02610e2d49 frame00000014 +e91bdc17fe8d3571eb06b17b23772096 frame00000015 +aa0c8a4c3eb81412bbad4691d1d14166 frame00000016 +f6553c360a0b259fe927e4368ccce5ea frame00000017 +4f6b764afcaae79ea0a6e5cdfb521ab3 frame00000018 +70a08c3b227a81bf911b65a5b02d8d43 frame00000019 +5d5bc33f1b5cb7373f39249e70c35c1c frame00000020 +b2519c0cd647df00db3c15d9558c4d0d frame00000021 +adbc7246a40eaab6c30e59ffd33d472a frame00000022 +2b789c0e0d99273cd947d720375b27ae frame00000023 +ba95ab2f60f7a6d2bd9bb3f61733f4a1 frame00000024 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0001.dfa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0001.dfa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0001.dfa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0001.dfa.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,17 @@ +90cff306b285fbf2a8b593f2ad624b2f frame00000000 +a9caeb34ec9cded086298c3274f6719c frame00000001 +3492fbe8f69f83d7e238f53cd11c4de9 frame00000002 +51101942135b0375cdd17766b8e64340 frame00000003 +2fa60bb01eceb4d882e9b646cc13e2bc frame00000004 +80531ea2ec4a9b33ee42830d4e141e6c frame00000005 +24376a173a59c51d030eb707e9cd5be5 frame00000006 +178844d797e7cec7d3201edfddfa0a55 frame00000007 +c2a507d7a1f50da2b4305acc7de3f403 frame00000008 +8f70b4e27b287efa77315968372b1421 frame00000009 +118dfd9da81d9713d9d27f89a30a4a34 frame00000010 +f11756a8a35cb7987f02bd1f4718bc4e frame00000011 +d06301bdb7f64146a1ad3884ba43b15d frame00000012 +f1b19dd4dd87412e3994de5791d8fb8e frame00000013 +1cce668b5de22348ee65fbd3da5ef0e1 frame00000014 +35fb7ae3502563376357c1d84af9a99e frame00000015 +6e797df58ada1a02568914f09421f4db frame00000016 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0002.dfa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0002.dfa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0002.dfa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0002.dfa.md5 2011-11-13 17:05:58.000000000 +0000 @@ -0,0 +1,27 @@ +827924b85d8c82a9ca754101450b5ae7 frame00000000 +12f02ac6e34f9da1c452b97c99d632e9 frame00000001 +7a93ae406212c9c98b89c1c50d060220 frame00000002 +cb1020746b1da80b7d5e41f32c81f12c frame00000003 +c1829ff6d7799d50495afcdaa9537ec6 frame00000004 +56e24695f39fda11aabe90165046084f frame00000005 +86aff0f779d99a9766ed29f732edcdd0 frame00000006 +f78886e7b8d0530342ead2d0a0c92a0a frame00000007 +e9686ac672b2b6c1c95cf17b7ff7612a frame00000008 +f69dd1adee72ad6915c4ebd8790547e9 frame00000009 +0c7a0569cc072ee4a75bc7ce5601f7b7 frame00000010 +6f0e977a23c45f46d9f155a71a332064 frame00000011 +96da707228548701fdf30e53c4582b90 frame00000012 +4e26ed969b611e0641fd65bbe9d9d425 frame00000013 +cad9247c6ae3f1694264c712486b261b frame00000014 +206acbcb37e2eebeb41f42bad7a475fa frame00000015 +9e16822d1f7f73af654ba8bd5a895d02 frame00000016 +03ad9a6bbab5c107f752072523056e37 frame00000017 +56674ebede68bd23f294e47e09ab587b frame00000018 +85447e5e2398f639341df71f05579504 frame00000019 +a0f014a4bdf8d3524743754fad68d576 frame00000020 +0205299b93596fedb29f8e6676797a0c frame00000021 +149ac02acb096e15fd547efe36ae33a9 frame00000022 +16e40550e815e18d4990c318b3be352c frame00000023 +4bcef950844160102e18691eb12b2cfd frame00000024 +bbc32e46dbb9decbca608133abc11955 frame00000025 +b62e018b969818e9fb844e03d3700cbd frame00000026 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0003.dfa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0003.dfa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0003.dfa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0003.dfa.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,13 @@ +d7455c5e5220d48350121cc5d8e411c5 frame00000000 +dc67354dcae8465d7de7c22bbc9ced48 frame00000001 +a44ac6cec13c71eef97a96af569b5249 frame00000002 +90768211b63b7139ed564b5392311618 frame00000003 +1705e09d5c9d25273e037ec8a5d90e9b frame00000004 +1705e09d5c9d25273e037ec8a5d90e9b frame00000005 +1705e09d5c9d25273e037ec8a5d90e9b frame00000006 +1705e09d5c9d25273e037ec8a5d90e9b frame00000007 +1705e09d5c9d25273e037ec8a5d90e9b frame00000008 +1705e09d5c9d25273e037ec8a5d90e9b frame00000009 +698385375cbf4cffc7af2d99c87116f6 frame00000010 +2c20bd4ced667b843dc1791102dc052a frame00000011 +1ab68ef3215a992a6afeb10f5841e19f frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0004.dfa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0004.dfa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0004.dfa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0004.dfa.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,15 @@ +a18d482df7f32543a6ed750b143fff7b frame00000000 +ade28e95c5945db8900615263704c976 frame00000001 +bbce50078b7d2806467a21aea617d4dd frame00000002 +f5683d42da5d103f8174b06867786714 frame00000003 +e50690dd1b12096faf039425d45e171e frame00000004 +ea8fcf567dece451bfa7820fbdc3e420 frame00000005 +10f831d61d45dbcbfa6b2be008bcaefe frame00000006 +daddf07ec6885665c94b9cd41e82a195 frame00000007 +985aebcc22d15dbadcd27fecbab88082 frame00000008 +162eaf7183ccc9df99b44e96a1164f72 frame00000009 +ec99bad6dc38883950322e990f9576da frame00000010 +75b9cb83e260bf77e4c086301d82f1ae frame00000011 +3bc2f0442d820ea7d4c9f8cd22a5f55c frame00000012 +cdc861c247d7bf803dfefbf38492906e frame00000013 +d82f5bfd50f30489706a887b56213f2a frame00000014 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0005.dfa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0005.dfa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0005.dfa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0005.dfa.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,12 @@ +4e9f208946624ef5a27b3afbf439bcdd frame00000000 +fccd316fce9c713dafbe275b24656035 frame00000001 +22e3b6b51f4f42e4a9ccb40db3310107 frame00000002 +3f558fca0d828a60b4b10e2eba16390b frame00000003 +0f191dc20c2544a792456fab3ef56007 frame00000004 +bb6277990d0b3029c01d9b595de580fc frame00000005 +4ee97be8c76e69a6e8c3bf0ed8e6ed66 frame00000006 +1f2ebb9ef8f71be54e4d332ccefca44a frame00000007 +38f5a1ba08b9ec49e5749f9b8788a1d3 frame00000008 +374989992b07d1d2f3319d7980b95acf frame00000009 +9f3499a673886d68620c43e1d5c945ab frame00000010 +a675a8cbc0fc054aed5b3a67ff5572d5 frame00000011 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0006.dfa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0006.dfa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0006.dfa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0006.dfa.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,12 @@ +835d281b131be57a56f2fb7ac4751394 frame00000000 +e20e4310fcd66067fddf42fd226c229f frame00000001 +17909306a876df356e2abddc2c6ecb97 frame00000002 +d690c588cdbe2cbf78953ddcf50cd13a frame00000003 +33d547485ee607f474b6b2ebaf714ad5 frame00000004 +6cb2b260369a9d45e6163b3ed9781dd5 frame00000005 +4f419d5952d0f5928146b5026417881e frame00000006 +c999434b7264386077b11aae8ec8c1b1 frame00000007 +40a70916489cdc764f7b6abbce8bea6b frame00000008 +8026e4a96b74ff16b84973142f1b2841 frame00000009 +4b32dbaa1fa0313adae128c6426cfacd frame00000010 +d78d8a9e2dc5962a73e589a78696d7ee frame00000011 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0007.dfa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0007.dfa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0007.dfa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0007.dfa.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,36 @@ +783460982d6bc8fecf95682826af0990 frame00000000 +2c4340b0c5068a5304d35a681b60abfa frame00000001 +979af53812c33ee046a10fb9737bb31c frame00000002 +f4ce53a1a228a915d7ade06aaa5f8d67 frame00000003 +3aeff9c5ad3fe77c7eccc25c89cb15a4 frame00000004 +87329c21e3bf630191895d776eeb9f52 frame00000005 +3e2206d6dd6d1b2dd5c53d0cafa20456 frame00000006 +50b61f9c6e9d43f2795551b2353ec7f8 frame00000007 +f9bea129841070699fc0df7848a47f11 frame00000008 +e0065c1631acd08b44255399a4666a45 frame00000009 +44422f8d27b07cbf6f9d9e4b779808ba frame00000010 +253909cbba860d2b03d8177afd779fa3 frame00000011 +cda0c76de86ae36864c367e32ddc9836 frame00000012 +0438f752917ddad7c003605744e2bb5b frame00000013 +043f8e515cbab9587076c7f39610eadf frame00000014 +9009a0a2b4a0476e027e7b254b3df6b8 frame00000015 +56d17bc0cda155e9a9183ec4ebefd579 frame00000016 +7f1d8d8ab0161b77a8f91e73bbbff075 frame00000017 +5777090f466ff9ac5af27e255b59f693 frame00000018 +ed5c42a5f02d2d32827316bfd9b020b6 frame00000019 +555a758e45c8bd45e024f31dda774247 frame00000020 +84d263148a47f017f5ab675c0a8c262b frame00000021 +61183395c4c85f061aacaeb446c0f1f5 frame00000022 +fa0e623479f84c7f7af7381092f047c3 frame00000023 +705c5c042660aefef77b43ea5699212b frame00000024 +f01bf34f1209fed3841a326bf82901b9 frame00000025 +622508eab4fb36fb91777256c4c81b17 frame00000026 +8cca994e59ffb4f2a3b6f11ab0dece4a frame00000027 +1027e4a8e76eb961b63cce633b2ed31c frame00000028 +825513437041bc1faa8897c8c9ef31d7 frame00000029 +ed3cf182646e1a2d86b7ea9a47252d66 frame00000030 +c0d729f3f0c9a0af0cff61e2886f8d61 frame00000031 +a3a23db21153e724d05e42689eb84ca4 frame00000032 +be0c9a137a72b435ac995c69b75fed7c frame00000033 +725f282bce439f598f5398ffe1063d27 frame00000034 +2d5d4e510c8df2705b8bc21be0a5bd08 frame00000035 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0008.dfa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0008.dfa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0008.dfa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0008.dfa.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,6 @@ +5b274aab4e64e183edeec62ab6174423 frame00000000 +807e82ad01ea09c7173a111b427d4d27 frame00000001 +ac6624375af237ef47435aa33a5f0795 frame00000002 +e5243cc37bdf269bf22261d3882bdcbd frame00000003 +c42cbe60acb82e675440e5bf32bb16bf frame00000004 +485e15826271760ea070c245db6305a4 frame00000005 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0009.dfa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0009.dfa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0009.dfa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0009.dfa.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,8 @@ +29a3d49c5a1b3edca12b9010f5f89c21 frame00000000 +1da7a6340533085c32234844a2f594cf frame00000001 +4ca935d6e7de3440e536cb05d4eef382 frame00000002 +8bc5c9f9a1c15beaefd1b1b39e608787 frame00000003 +d22e35c6de3dc591df13a7cff9d70ad7 frame00000004 +fd92c6d491e8b3394184c736d70dd4c2 frame00000005 +0f08124481ade0596e94ad1ac9953fca frame00000006 +1ce86c5b6f4f00aa6ea3eb61a0d42b5b frame00000007 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0010.dfa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0010.dfa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/chronomaster-dfa/0010.dfa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/chronomaster-dfa/0010.dfa.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,9 @@ +2ef61c78cfd814a04427d3e1b28cdb9e frame00000000 +341a5cb82f80ab8356944d1a9460b746 frame00000001 +1477f0159baeb68eedc08302f0c5eca7 frame00000002 +1fb6098b122b9d5e5ee5b0d3d4443bcf frame00000003 +05548b9947bf4634314176c36724d2d0 frame00000004 +7fd23acb857d46a9be7b88d75d6a1871 frame00000005 +6a61d656abecc522254b99019bb34635 frame00000006 +9196522b9c5e3b98314c49b3999204bd frame00000007 +7d025b95623644e8f8ffd418cb753761 frame00000008 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cljr/testcljr-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cljr/testcljr-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cljr/testcljr-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cljr/testcljr-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,36 @@ +76435cac3ca3a2a4f95a8225cce0c9e5 frame00000000 +1a7ad063a8b4a9b9b59d0ac5cc7f0536 frame00000001 +f288a8dd5699c65bdb7dfd72cc84584c frame00000002 +616deaba68a3c35493c71cba3c29a71a frame00000003 +e08ea59da289cf2624a0a9e45d9d6f9a frame00000004 +c5089c399bfafcb4d2f36619fba9dace frame00000005 +6cae1db9b858ba23c9771a3bc5c89792 frame00000006 +9ac3219b1e49cd6015d88c8e4ff6cc22 frame00000007 +301b63323c19a5766f536c6d20cba5d9 frame00000008 +4db33ecd67fd597edf576a6e35f319d5 frame00000009 +f52418fb696790740f0ff222311d6afe frame00000010 +4de25814a4786a382553a48ece108b92 frame00000011 +fbf52f834d11dfa03d290e77666ec431 frame00000012 +0e859d2464862cdc978f5773dad01dce frame00000013 +236997aa21ef033965e0fd2637639a8d frame00000014 +d70790ffd688e2ec7f5d21de870542f8 frame00000015 +b511cd313801a3933b9475c1a6757a89 frame00000016 +d9c059d63b33917a4e9a274f560fc929 frame00000017 +b84316c0a0d92771d56b8edfdf002ab1 frame00000018 +d4c50ee9fbfd01d2a6a4f37b2af6edac frame00000019 +1be9f29fc5ba36460d51d49467406e0c frame00000020 +bf1f1c64baba962a1dbe62a167bcb5b5 frame00000021 +4135a5d6ea4c25ceed98b3c1f33ba4ac frame00000022 +46df8d754f62de9a71b4d0d68031ad55 frame00000023 +e4d2801e075687385e05a2c965f80647 frame00000024 +06defbc5c9e6f42cd2b60de6d353558e frame00000025 +b416586963024d2a3d4068a43b9a9759 frame00000026 +d48c8f8325ef0bbd0d181a45ca2c56b5 frame00000027 +021f34a7371c6545b9e950676947bcd3 frame00000028 +b4e477ecadf80a79aee2745980949534 frame00000029 +21dfab7232773a9516c037d28594459f frame00000030 +8257a974e61b8b03ba767733fdbd908e frame00000031 +4d2d32b3cc542a8c78b79e6692dcb672 frame00000032 +df7035ee0a0cd596cf449112c9e15829 frame00000033 +45271dc157a667e69e5116ad4f7a8022 frame00000034 +feec13fa1cd50a1265463b41cdd172d9 frame00000035 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cram/clock-cram16.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cram/clock-cram16.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cram/clock-cram16.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cram/clock-cram16.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,30 @@ +1bc7a13f8421064d42e7afb68eda7b95 frame00000000 +8e375005127965766bab48eb3dc76369 frame00000001 +87d219ee5760495a4f75d05a064c09a8 frame00000002 +d4c24f9176f09e0b7ef7fe56a3508727 frame00000003 +f92e42706c6c49fd5c76d35456e44354 frame00000004 +4fb7b2669ec8116d5d53d1ea2690d878 frame00000005 +279a783960cacc17b728780079d9634c frame00000006 +fbbdde7a1c95d271fd1af01f2627ca25 frame00000007 +70ed04af0c0defc77185248710a15546 frame00000008 +c1f85fc7432fefb597f3ebb02c190a62 frame00000009 +8cb805e248bd9fd6f5d3dc125f857da1 frame00000010 +32348ce496c8fb0da237fec9706e490f frame00000011 +1039b1a3460ec5f02b62caa91b84632b frame00000012 +25654fb135c89c561dbf1a980befaf28 frame00000013 +9d7ced8fbc0330a7f8264075db42139c frame00000014 +3524c0657e8778e01f34dda47bdde027 frame00000015 +9ec7e1a56c42bafe700b9f11f1eacebc frame00000016 +d0ed91afebdefdf7eef0da3bbdd137d7 frame00000017 +714b78a6b107df58dbd6a1d93fc6a350 frame00000018 +2bf1111eefe6307769ec54d956a758f8 frame00000019 +b4ccdd441148110bfe6259a65be0ccaa frame00000020 +8647aceb6626d320b14d78ad226a3cb1 frame00000021 +863f0352bd70dfc93087e6194881f30f frame00000022 +8a2ed9ce402fc23d0d0c4b07bfd70b59 frame00000023 +4336f28a64d52490f3bec021e8087d76 frame00000024 +36991400b64c8caa6e917fd8f97baae1 frame00000025 +fcc35dbf6cc5074abccaf174a4ef9451 frame00000026 +2cfac40684e3520916306886857b3cb2 frame00000027 +a42b42ef6c9f7345acdd2f6d80701571 frame00000028 +a1cb3baf27300b039bd8f7bd33f50c3e frame00000029 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cram/skating.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cram/skating.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cram/skating.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cram/skating.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,225 @@ +80f8f24d1524e77718a0cd5d0b5b4922 frame00000000 +ce276386f0542d4e48fa40b218e0f5d0 frame00000001 +b3efb8597f20eac5d3ee14da52945d13 frame00000002 +de4a6eca9a23eb9235deb862db718181 frame00000003 +c78a7aade7f0def8a9a6c143234b86ed frame00000004 +c78a7aade7f0def8a9a6c143234b86ed frame00000005 +c78a7aade7f0def8a9a6c143234b86ed frame00000006 +bc043c51e1307d8f05a006cc474ccdbe frame00000007 +80c125d78e6d367adc4a099957a4e91c frame00000008 +e9918d9f87a68629f05aaaf5118f449b frame00000009 +bb7361f46233e74ff91d20c7c4f69ca1 frame00000010 +acd256985f682a8694e49a251ed5c368 frame00000011 +fe62f49528989d806522c9937ed61e31 frame00000012 +d5af5d338d46a1a9d2af473152c9ba67 frame00000013 +a491ea3041ffcb12682bac1b3d1f1a76 frame00000014 +4ecd2ca1992014d66a86bad1f7f167d9 frame00000015 +b9605e7b29747de73603f494abf126f0 frame00000016 +f533b4e06c0a7e77bc1c49496515c257 frame00000017 +e1834bc747ac9145f87619895844892e frame00000018 +702008a0a3cc3f6870bd70fc45d9edb5 frame00000019 +210394d045447a56e328dc0eb258ff7c frame00000020 +f30e2e00c3c5326c85220c9adae244a4 frame00000021 +92a8d14738151a9cded19d81a4cc8630 frame00000022 +81789198d0c58fab7465a5b6f0bc3d55 frame00000023 +8310984c5cb29c1e96cc1ca16b15bb0b frame00000024 +0bc76aa44d7a857ca36dc7e811e93dfc frame00000025 +4f6f926c5501fc702bf2851307b036ed frame00000026 +e9d35b1f975a038c58a98ba1f2565214 frame00000027 +2f891db16ddc40c81afeceeca528dddb frame00000028 +482358687cb791f599412a9124eeb8a5 frame00000029 +af4e30fa0380e8c698f300c16bbac9a6 frame00000030 +184990bdab75aad0faa82e2502b27488 frame00000031 +40775620ba28c0f295f16e889a1c16dc frame00000032 +5c530f118e3ac16be0463d3f255cd5be frame00000033 +2d39bf69f2f039597ec8f0c4956adcd2 frame00000034 +f246beb138ac0cac45e6b62cc823df8d frame00000035 +e9fff29b8686f62c902f457da1bf4bc0 frame00000036 +e276f62c6ccad0459053d89101bd29f3 frame00000037 +c02471cf76ee4b238d4cf9ab4acb789d frame00000038 +c0bb494d6984b210138bd9ef63d852ba frame00000039 +1699f400574420ae3dd2ed3272e52c43 frame00000040 +85b67f06c043e0f2d3e9b77312750a8f frame00000041 +cb45884e256e4130618415b2d5bfb888 frame00000042 +ac3c37dd7f4c5c367099320ca85120b3 frame00000043 +4c38ef901b44f8a331cc46c2d13a421b frame00000044 +62509c295938241eb6c592330fd1b62d frame00000045 +51879437dc09d43ac0eac56e2211d183 frame00000046 +f8ee149845cf47b9757616f514b992f6 frame00000047 +ba458b4218313b97314a39a1053f49f4 frame00000048 +09f279921805d1764db8d339ad7f3a03 frame00000049 +8b0a7958cde715232fafb2ca4e37ba6e frame00000050 +961c8b472d1c1dfb185b8aea82084d07 frame00000051 +c9bb2b57f3966636ee3834e19f4c756c frame00000052 +8578b4bff0c3b56bd6e079550c77fc92 frame00000053 +23c84e184544d187289494669398c931 frame00000054 +eeb989ad302b552b365199a67958ef90 frame00000055 +9753a7e224fd76a9cc961cca48531f1b frame00000056 +63005c0b50dc2fe074b51cc3d3751da6 frame00000057 +1fed70ec5fcb960d8621ed023c576578 frame00000058 +ad48b4dd5a5340651408cd6b53041f14 frame00000059 +e7be53025acecad45bdca75c167074b9 frame00000060 +e50e84cf8760ca9c9ced8ef9197a4009 frame00000061 +f5f2b0e59616a6b2e375d9d5e5d1b679 frame00000062 +a69bda3c0d93d8ccb311bb6727f38ca4 frame00000063 +49eb40512cdca7a2bcb219b519773156 frame00000064 +7293aa35b191225ad1f572eb70c747b5 frame00000065 +3e5be138c8cd048844be8c3a19ca26da frame00000066 +131a63f451d422a1b3e1722a7d45eb03 frame00000067 +a72c1c1276ebe95149f189dd47c88f2b frame00000068 +9f19804c415e9e0137bdc4371ad211ef frame00000069 +79b4f23a73bff49f0ac63c5c6aee78e8 frame00000070 +4771515bf4b9662d25ad0aab20948361 frame00000071 +28ef046eca69e24c94edd7d9575d8cd3 frame00000072 +d52850c99a8b317c27a070a1cb42a31b frame00000073 +c3c80f62ad8586f3ed1bd9286d92a22f frame00000074 +ecb4dac22442fae7bc3b1bc8f9a64240 frame00000075 +f18c5356c45f2347d1396854264f79fb frame00000076 +a8731835e122614293da50c6bd2e0be1 frame00000077 +1851141e0c35b170bdb1b0df079dd60a frame00000078 +971f32b96441c639afd8ab412e3d7646 frame00000079 +3b58de19087d79639d6c52275fd41ad3 frame00000080 +f0cf490a8ebd8df58d921eccc87b52bb frame00000081 +9513781d8fc126678c31fdac62198768 frame00000082 +93b8af62d2626856ac40ca33a72c247e frame00000083 +1cd85e4f18355f68cceb80ccc460b8b2 frame00000084 +90b88bb6438051a7652f2701228738cc frame00000085 +0d7322cc57e131bebdc566cd755f3e0d frame00000086 +d811f4dfde4a3cecdde44ae621e73db9 frame00000087 +9af20bf35b6574850ab9b13bec8b4227 frame00000088 +65fd0c60f65e1b87e29814e386568cdc frame00000089 +8aa9bb0368ccb9cb454367082d68495f frame00000090 +56196d2fc3bfae0f0e99e4a2ad01284f frame00000091 +995ef3c907642f1b24c1056a776fd948 frame00000092 +6742553da7fbe432536c4adbdce05e32 frame00000093 +5a6dcff8675121d9a60ba2673ea85251 frame00000094 +7377a8e098b90ce0e28027a925b0e7c7 frame00000095 +c04775cc2e1155db5b1bf0b46cc1cf6a frame00000096 +4cfe7cf05b7ee8039a48988715f3f18c frame00000097 +e039d38cb0d033148da2c5549ebe1cc1 frame00000098 +18219e8608c8604fa8ed6bd2d5a49b29 frame00000099 +c9ae28c09d201b02b144c402b7fdcd13 frame00000100 +f522007183ad992805050db07710d338 frame00000101 +72aa9e4870bcbf9bbd231148a0b11384 frame00000102 +1e757684b637fc5ee8f817e616c2ec9c frame00000103 +09f23e198784b7149521e866c637ae21 frame00000104 +4ce4446f1af139014894ca954f657808 frame00000105 +9324f2c12f5e950ede85c74ccc19080c frame00000106 +ac766f456efa9b27f50f7ea89a7916fc frame00000107 +7ca5264b859f87136e703e58863c2f11 frame00000108 +378a1e6e6722a2769a11234059391bf5 frame00000109 +7091aadc508182af78689fb67b137021 frame00000110 +c052088ef266def29159be2333bbf604 frame00000111 +ff21a346268ac6208d4b228171b48db5 frame00000112 +77bb59b12a824f0a4f573ad4016b5541 frame00000113 +97cdb422c74b5d975a57783775a890c1 frame00000114 +d6780f8db3235a9719eea72efac2795f frame00000115 +8f51e7b205e1717b68af2c51975ef00b frame00000116 +332f2a4a2c952cbbbc34d744a24fb1af frame00000117 +9f2393b8a2252ff0d9d4ceda6c643fd6 frame00000118 +6b41eac904ae3493874879094608208d frame00000119 +42a72c1e4fafd4d26b11409677a86a1a frame00000120 +cbb5dd8e1e0384d84958fbd247f8fe8a frame00000121 +07b59f04bf096452b7b50ddaf3cc13db frame00000122 +3f7f00617c22ccff838b4e786404c043 frame00000123 +ac798ca0970664237e74e0d030660c7e frame00000124 +cacb5854c03b516a66b346245a536201 frame00000125 +351cf7879b190aa79bfbf4d260e4e31c frame00000126 +29e00889d6d9be6ce5c9572b05b11ce7 frame00000127 +f20501c947e6cab10e767ce0444c3241 frame00000128 +cba4c06d427a34583a726a1c28119ec5 frame00000129 +1c77f9a005b67444390c48dbcddfe65f frame00000130 +ed1aa72370cbe9f7c1c5e720c7cc1310 frame00000131 +9baa4d757afd8199bb1422944b3b1df4 frame00000132 +6dda59bc9d1ed1649cb480d55917bc3b frame00000133 +b2db1293c51ee0f44f701755beded488 frame00000134 +c15ba353e6b09e9a8a3982b0c8eff4fb frame00000135 +245c66175fabfd46ddbc35f6eac7276d frame00000136 +6f3932b5ef23f3730625b817f3a08c76 frame00000137 +49df7bc0685b922aaaedd21a600dc67b frame00000138 +891fee0ea23538b1affbfb9c89740671 frame00000139 +de73a11855978dcfd4ee729209d4755d frame00000140 +dbc0951e8055953a3c0cfa86b0ae8bf8 frame00000141 +fb1cb7b90d6f76958b4e2ca7d976b08c frame00000142 +e61db76d3c02b7e1e669fe7ee7e8ccb9 frame00000143 +4e65207c971fcae1de9c528d494874ad frame00000144 +ead1aa2d1ca2b242aebd8f85e7ac6ce6 frame00000145 +bdadab775622d8c20b3727675a5d0f9b frame00000146 +b514ad7853a550e6fb443f4cdae0d9f7 frame00000147 +51a3a60d4f1090208299845fb0eaf590 frame00000148 +90075b2abbab035408d1ae585709abb9 frame00000149 +ac7de1d1ce8d3c3d7651ba9cc7067f82 frame00000150 +94f0bc68d3ec3491e00be4d44d0403b2 frame00000151 +35aff426396bc3673dacd4bdf22412de frame00000152 +f00bdafc503bbe07f08169830354a550 frame00000153 +0672b8b0b2233cfd3b5a7572a9831220 frame00000154 +2111d36dfe77264cdb968a0b9f8ea7d9 frame00000155 +6c137fcc11cb9f488efb12ef97e52281 frame00000156 +b76fad792520b878594e14f8f103243e frame00000157 +e4b102b807fc79ad074820796298f85d frame00000158 +eb9ce964e92c63571fe6cc536e45b36e frame00000159 +6abdb9ac972f97a2e47bc69749afa666 frame00000160 +095ab9b4501af6ea0606e9f9ae79ecf8 frame00000161 +c554fa8747de2ca0509374d41f256457 frame00000162 +9689e11a10f1a3053af820402ca3713b frame00000163 +16ccde10a34b5a1cbab8e98987ae8286 frame00000164 +bb1b72a482bf780fa2e706fcc25854e7 frame00000165 +0608c66c675b101922e3027ccf782e61 frame00000166 +9d16674545ab5529b008ad8020dd02ca frame00000167 +656cbd87c1870bc5352b92b46050c2d3 frame00000168 +8ce0576fa0a1a097cc3b2f2b5b7c2b27 frame00000169 +43f820ef9a1e401fa142ce57b01b3633 frame00000170 +70e2491149848be3b4ed16e7876b7bf1 frame00000171 +8b95e8b23ff13c48537716e457c3df68 frame00000172 +7321e7aaa614a7449b26a4e237066ac8 frame00000173 +e4f3cb30404c21031fef472188f95d44 frame00000174 +88623b91277c0a1b4490c4f762a4328a frame00000175 +af6fd2a2d3a8c418f06b09f1533bf4cf frame00000176 +a7914bb882976f08c0f897e0d65dd73f frame00000177 +191a390099d94ba3004a5425483abdf0 frame00000178 +3e4eb2dffe4355cdb1f16df64f9cb0eb frame00000179 +85abaf121b826e3888361c4fee857b88 frame00000180 +eda842465734445f2d42b8c6b6d1b698 frame00000181 +dad5b9eea470c6395da3175cd5a0d4a9 frame00000182 +a76a02ffae46b9d0f4ebc9e5031d0b74 frame00000183 +71d15903d59da824f6c3c1dd05a4a631 frame00000184 +cf87eec5b2c8d6c35c6d07e4f8b05bbc frame00000185 +9d3a392a1b5e7917b5d09c3826afa056 frame00000186 +b2291e572ac8841271cb97ab97b8e003 frame00000187 +ea8b0f05e546f0a85a8c868ad6b0c942 frame00000188 +87430edc194316647000e3817c67e3bf frame00000189 +19a32753b536709dd5495008fe1abbfc frame00000190 +f5e31bc8de56cafe1b528e082983eefa frame00000191 +8e75025f06a6558e04b04a018a1a2f57 frame00000192 +d8fd9e713dcad73913507a5248a64d30 frame00000193 +1a8ab00daf3b5afe2dd9fa3a038fd531 frame00000194 +f87922d1a59a4d6bf21c57eab62f4a9a frame00000195 +7b8f24fadf6c24f5672126218e3a7469 frame00000196 +87dbe3f5a18aa856cc02f57878392ac7 frame00000197 +183a0630f63c00fe164887908031ce86 frame00000198 +4ac78ca91c3f4b080a489f344ad7b87b frame00000199 +5e0d0d80611cf19f6dbb4e61b52592ab frame00000200 +3f92ae1b2c86bb8afde4b5d5aedcd64e frame00000201 +2227548b8834105e05363ba138aebfd6 frame00000202 +b8268b8ea78df80c896447c00c954693 frame00000203 +040df2c4b2fd6da72141d72fadf95904 frame00000204 +6e240aa5c3aee596999d372a40cf8d2e frame00000205 +4f2a18dcc776813b7ee522aa203b6eb6 frame00000206 +570e799abc626ac7a2989dd70e16c26d frame00000207 +e70a3f4dae31e2686f8b93f05a54cc5b frame00000208 +ef9540b96e5d436b21f3d3acfed765ae frame00000209 +7951cb34750d0f0990a78debf1416ca2 frame00000210 +e208b443c3313f7d8c7ee668701a7530 frame00000211 +cad310ed93155f1845a07a4717e6f7e2 frame00000212 +a2d15bec9167684a2fe8060b65d3adf1 frame00000213 +80c5c632aaa5bddb612245155ee2f7fb frame00000214 +5581e73aa2c3f3627b4208fa1544b711 frame00000215 +fa2070bc91bb5ac2b6e3d442f9bf0df0 frame00000216 +c8433b7124991f1345084f2ec0676ac8 frame00000217 +f7e0751cf973738e7cc252eb73689e73 frame00000218 +893fa6743b596a452afb6c4088043387 frame00000219 +9d60990713884cbc60b2dc0a92243346 frame00000220 +24f9a85b3ca3a3fc0058121973757419 frame00000221 +5bb739d62c1fd25c626c047d4a35d1f5 frame00000222 +ce74dfba59654f55a36593f54249b9a4 frame00000223 +76efe8bf176ccef0c2afb266c2b111b6 frame00000224 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/CSCD/sample_video.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/CSCD/sample_video.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/CSCD/sample_video.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/CSCD/sample_video.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,208 @@ +1be339450742053eeef59743d5c8d57d frame00000000 +79002bc1e412fdcaf2cf8b043fa60099 frame00000001 +1be339450742053eeef59743d5c8d57d frame00000002 +79002bc1e412fdcaf2cf8b043fa60099 frame00000003 +1be339450742053eeef59743d5c8d57d frame00000004 +79002bc1e412fdcaf2cf8b043fa60099 frame00000005 +1be339450742053eeef59743d5c8d57d frame00000006 +79002bc1e412fdcaf2cf8b043fa60099 frame00000007 +1be339450742053eeef59743d5c8d57d frame00000008 +79002bc1e412fdcaf2cf8b043fa60099 frame00000009 +1be339450742053eeef59743d5c8d57d frame00000010 +79002bc1e412fdcaf2cf8b043fa60099 frame00000011 +1be339450742053eeef59743d5c8d57d frame00000012 +79002bc1e412fdcaf2cf8b043fa60099 frame00000013 +1be339450742053eeef59743d5c8d57d frame00000014 +79002bc1e412fdcaf2cf8b043fa60099 frame00000015 +1be339450742053eeef59743d5c8d57d frame00000016 +79002bc1e412fdcaf2cf8b043fa60099 frame00000017 +1be339450742053eeef59743d5c8d57d frame00000018 +79002bc1e412fdcaf2cf8b043fa60099 frame00000019 +1be339450742053eeef59743d5c8d57d frame00000020 +79002bc1e412fdcaf2cf8b043fa60099 frame00000021 +1be339450742053eeef59743d5c8d57d frame00000022 +79002bc1e412fdcaf2cf8b043fa60099 frame00000023 +1be339450742053eeef59743d5c8d57d frame00000024 +79002bc1e412fdcaf2cf8b043fa60099 frame00000025 +1be339450742053eeef59743d5c8d57d frame00000026 +79002bc1e412fdcaf2cf8b043fa60099 frame00000027 +1be339450742053eeef59743d5c8d57d frame00000028 +79002bc1e412fdcaf2cf8b043fa60099 frame00000029 +1be339450742053eeef59743d5c8d57d frame00000030 +1be339450742053eeef59743d5c8d57d frame00000031 +1be339450742053eeef59743d5c8d57d frame00000032 +1be339450742053eeef59743d5c8d57d frame00000033 +1be339450742053eeef59743d5c8d57d frame00000034 +1be339450742053eeef59743d5c8d57d frame00000035 +1be339450742053eeef59743d5c8d57d frame00000036 +1be339450742053eeef59743d5c8d57d frame00000037 +1be339450742053eeef59743d5c8d57d frame00000038 +2d3c27145b100e06eea6d4e17ebb6acc frame00000039 +17b4e5dfd9a8b610c4fe9367943051ac frame00000040 +d503f72dbdba69a7f2f22ae74efee4cc frame00000041 +17b4e5dfd9a8b610c4fe9367943051ac frame00000042 +27cdec257f05594266d0b0294b5f3564 frame00000043 +48e87263aa041a72e1b95d2f6cad9393 frame00000044 +69835a633f0afb6edddd34cd81cc13fd frame00000045 +cbffc795eb4210aa3ada127d0e75075d frame00000046 +be3a5b64a7753259b69444e4ea99310c frame00000047 +db8c94d8f7b5a5212e137808d8bfa03c frame00000048 +b5317ec7ef0cf3bd4a7912053ec61d79 frame00000049 +22e179cca105b51b2ceaf0218667fe07 frame00000050 +0b7c56f303b48d076c29e3e3b549fadf frame00000051 +14722e24265ff46a8a1995a61d710bf6 frame00000052 +dc002375382f3c8d14b99d8d9dac1193 frame00000053 +49ec3e93285a6eae4762208384074cbf frame00000054 +a1d9eb8062fc051827bf4c978f697f39 frame00000055 +3b956ee324b6dd2a2a89f1d60c988f08 frame00000056 +6e41bbcef0b6ee8b3ea99402ec23fed7 frame00000057 +89d408f71ad57d2d02149387ee3820f5 frame00000058 +2a9c2443dd2ae14bc65e1f2dd196aeaa frame00000059 +b66389d233b360edfe52b24d55ecb439 frame00000060 +fc908806f5d1b50e2c52d008327cf571 frame00000061 +f51cc4f067ab23db424f63d899d73f3c frame00000062 +fc908806f5d1b50e2c52d008327cf571 frame00000063 +f51cc4f067ab23db424f63d899d73f3c frame00000064 +fc908806f5d1b50e2c52d008327cf571 frame00000065 +f51cc4f067ab23db424f63d899d73f3c frame00000066 +fc908806f5d1b50e2c52d008327cf571 frame00000067 +f51cc4f067ab23db424f63d899d73f3c frame00000068 +fc908806f5d1b50e2c52d008327cf571 frame00000069 +f51cc4f067ab23db424f63d899d73f3c frame00000070 +fc908806f5d1b50e2c52d008327cf571 frame00000071 +f51cc4f067ab23db424f63d899d73f3c frame00000072 +cbb6a5806ccd4897d48ce418a42e72ad frame00000073 +f51cc4f067ab23db424f63d899d73f3c frame00000074 +cbb6a5806ccd4897d48ce418a42e72ad frame00000075 +f51cc4f067ab23db424f63d899d73f3c frame00000076 +cbb6a5806ccd4897d48ce418a42e72ad frame00000077 +f51cc4f067ab23db424f63d899d73f3c frame00000078 +cbb6a5806ccd4897d48ce418a42e72ad frame00000079 +f51cc4f067ab23db424f63d899d73f3c frame00000080 +e3c80fbb6f8f492790ccccea9e02befc frame00000081 +f51cc4f067ab23db424f63d899d73f3c frame00000082 +e3c80fbb6f8f492790ccccea9e02befc frame00000083 +f51cc4f067ab23db424f63d899d73f3c frame00000084 +e3c80fbb6f8f492790ccccea9e02befc frame00000085 +f51cc4f067ab23db424f63d899d73f3c frame00000086 +e3c80fbb6f8f492790ccccea9e02befc frame00000087 +f51cc4f067ab23db424f63d899d73f3c frame00000088 +e3c80fbb6f8f492790ccccea9e02befc frame00000089 +931fa2d3b2f8724b83a1d00ee7ae6136 frame00000090 +1a705e17f1a8dda08382c9d2ef0d8581 frame00000091 +4d9cafe85e4b6d410a8ea60d3f02f78f frame00000092 +d542249d7cf8e3ead566ed35494c050a frame00000093 +9287d74a773cf8e7f4e40b7a067b1061 frame00000094 +17f42867f808c9fee6514a319540dcfb frame00000095 +51546111e6af499391bd897fb4b29550 frame00000096 +4ec87a3943e3f513bbf311262ef70822 frame00000097 +190365f67eaca577c1faf43d167e6c9b frame00000098 +77470f45167f6a5d483fb6a15274ac05 frame00000099 +e46c85f277398073a03ea0c8902af5be frame00000100 +31e8b65a7329658890ab204405fed7b1 frame00000101 +015cfb678686a942c99bedc8a27c2996 frame00000102 +712f871dff1ad629d8c6ec5ffc89f44c frame00000103 +e7f524c2acffabde558bd64649a77c99 frame00000104 +99100f9eb0c2c717c5185eb7ee56d65e frame00000105 +4bb3a530ee8addc1e703fa9b19ebce6b frame00000106 +54d3e5a85cfb64f20c6318ea848fa9f2 frame00000107 +28ce786a00b69bd8ac6e73db69e1f86a frame00000108 +54d3e5a85cfb64f20c6318ea848fa9f2 frame00000109 +28ce786a00b69bd8ac6e73db69e1f86a frame00000110 +54d3e5a85cfb64f20c6318ea848fa9f2 frame00000111 +2ab5b3b14b92d11520ed73a7efb20912 frame00000112 +b30adcac089f1cb58e769362f701a1b6 frame00000113 +73c81ec4a6afb52b2ed0ab24079621c7 frame00000114 +d8c82ba2c04a7e3028587bf19a6ef50b frame00000115 +2c4f4e9443c8e1846416ac3bf7696000 frame00000116 +cceb4eebb1e45b133da444041e98ba39 frame00000117 +cb80082182b25fc0616c581f0db66e8a frame00000118 +7a9aa2fdf1db5e29e7ee61fb578eb7e8 frame00000119 +e4dc58f0d48257fa9dc6a9de7ca03022 frame00000120 +7a9aa2fdf1db5e29e7ee61fb578eb7e8 frame00000121 +e4dc58f0d48257fa9dc6a9de7ca03022 frame00000122 +7a9aa2fdf1db5e29e7ee61fb578eb7e8 frame00000123 +00161b5eea3b81015350d5580b7c7a55 frame00000124 +e9f19bcbfdbbb10676c3d4fb026749f7 frame00000125 +e58ef349ab78e66264bae3b847c62731 frame00000126 +cd1048a92b8b6ec1ab6d8c74c9bc9f49 frame00000127 +b3c08884b7468161236bd645a3918dba frame00000128 +cd1048a92b8b6ec1ab6d8c74c9bc9f49 frame00000129 +b3c08884b7468161236bd645a3918dba frame00000130 +9c7f5a44819f393d6372e2ca5e5dc077 frame00000131 +0e22686fa2957c3807180b2d7de46db2 frame00000132 +5ca58527fabbf1215004068d8a40a72b frame00000133 +0e22686fa2957c3807180b2d7de46db2 frame00000134 +5ca58527fabbf1215004068d8a40a72b frame00000135 +0e22686fa2957c3807180b2d7de46db2 frame00000136 +5ca58527fabbf1215004068d8a40a72b frame00000137 +0e22686fa2957c3807180b2d7de46db2 frame00000138 +5ca58527fabbf1215004068d8a40a72b frame00000139 +0e22686fa2957c3807180b2d7de46db2 frame00000140 +5ca58527fabbf1215004068d8a40a72b frame00000141 +0e22686fa2957c3807180b2d7de46db2 frame00000142 +5ca58527fabbf1215004068d8a40a72b frame00000143 +0e22686fa2957c3807180b2d7de46db2 frame00000144 +5ca58527fabbf1215004068d8a40a72b frame00000145 +0e22686fa2957c3807180b2d7de46db2 frame00000146 +1faee7ba5fef9e8e9ab5aef68b3ab1df frame00000147 +47aaff4212ad925fe96740198660fd93 frame00000148 +ca2fcb0d3ea67cb7d7277bd9f9b67420 frame00000149 +8acfce41b0dbf6e466f132e9db1d3aed frame00000150 +c7d9c52ab83b63109b4f781f2a1bd62c frame00000151 +454c00c41eb46f5dcac0d730e5b68d84 frame00000152 +0b60e85179647683f38c5824e5b60f88 frame00000153 +c08f7bae7c1e1bb0d17391cc9be74db9 frame00000154 +d77b2f055bc8d7d1237ae975266c6ab7 frame00000155 +bc2e5b7b8ce10d528b075c1b3f9bd852 frame00000156 +a89d29f0cc3ff180883c4ee26c3a5cd2 frame00000157 +e901269d02021e1da7c5f32dee5b66e4 frame00000158 +3d9d98711657e33380eb3028b30c5b5d frame00000159 +80f0d1ed1a2e9dc6e18097735718fa0f frame00000160 +637028328630e3e42160759813e50865 frame00000161 +d6c99ff6ad9353de5ea51fa3fb8b4156 frame00000162 +8312e0ec23a17d20fe7fc804f19553b2 frame00000163 +73a5690e2ef03360d84cc296fc8ba852 frame00000164 +8312e0ec23a17d20fe7fc804f19553b2 frame00000165 +73a5690e2ef03360d84cc296fc8ba852 frame00000166 +8312e0ec23a17d20fe7fc804f19553b2 frame00000167 +73a5690e2ef03360d84cc296fc8ba852 frame00000168 +8312e0ec23a17d20fe7fc804f19553b2 frame00000169 +a87e74866fb648fa76fb0d4e4d7c60c2 frame00000170 +8312e0ec23a17d20fe7fc804f19553b2 frame00000171 +a87e74866fb648fa76fb0d4e4d7c60c2 frame00000172 +8312e0ec23a17d20fe7fc804f19553b2 frame00000173 +a87e74866fb648fa76fb0d4e4d7c60c2 frame00000174 +8312e0ec23a17d20fe7fc804f19553b2 frame00000175 +a87e74866fb648fa76fb0d4e4d7c60c2 frame00000176 +8312e0ec23a17d20fe7fc804f19553b2 frame00000177 +a87e74866fb648fa76fb0d4e4d7c60c2 frame00000178 +8312e0ec23a17d20fe7fc804f19553b2 frame00000179 +a87e74866fb648fa76fb0d4e4d7c60c2 frame00000180 +8312e0ec23a17d20fe7fc804f19553b2 frame00000181 +a87e74866fb648fa76fb0d4e4d7c60c2 frame00000182 +8312e0ec23a17d20fe7fc804f19553b2 frame00000183 +a87e74866fb648fa76fb0d4e4d7c60c2 frame00000184 +8312e0ec23a17d20fe7fc804f19553b2 frame00000185 +a87e74866fb648fa76fb0d4e4d7c60c2 frame00000186 +8312e0ec23a17d20fe7fc804f19553b2 frame00000187 +a87e74866fb648fa76fb0d4e4d7c60c2 frame00000188 +c4a86d88e564ebe7fc5bfcf2b58cb18d frame00000189 +1149386ac4e781f1dfb3e1c2baa71290 frame00000190 +c4a86d88e564ebe7fc5bfcf2b58cb18d frame00000191 +1149386ac4e781f1dfb3e1c2baa71290 frame00000192 +c4a86d88e564ebe7fc5bfcf2b58cb18d frame00000193 +1149386ac4e781f1dfb3e1c2baa71290 frame00000194 +c4a86d88e564ebe7fc5bfcf2b58cb18d frame00000195 +1149386ac4e781f1dfb3e1c2baa71290 frame00000196 +c4a86d88e564ebe7fc5bfcf2b58cb18d frame00000197 +1149386ac4e781f1dfb3e1c2baa71290 frame00000198 +c4a86d88e564ebe7fc5bfcf2b58cb18d frame00000199 +1149386ac4e781f1dfb3e1c2baa71290 frame00000200 +c4a86d88e564ebe7fc5bfcf2b58cb18d frame00000201 +1149386ac4e781f1dfb3e1c2baa71290 frame00000202 +c4a86d88e564ebe7fc5bfcf2b58cb18d frame00000203 +1149386ac4e781f1dfb3e1c2baa71290 frame00000204 +c4a86d88e564ebe7fc5bfcf2b58cb18d frame00000205 +ba9ad1578a501810670cd04a7159366a frame00000206 +c4a86d88e564ebe7fc5bfcf2b58cb18d frame00000207 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cvid/catfight-cvid-pal8-partial.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cvid/catfight-cvid-pal8-partial.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cvid/catfight-cvid-pal8-partial.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cvid/catfight-cvid-pal8-partial.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,56 @@ +6f7cb3d7ff60460c992e568b43064c61 frame00000000 +15ba51074b50eea76596db7d97bdd36f frame00000001 +f0321eef822ab963337cb8cbd38dac12 frame00000002 +c6efb639fd15fb2e8af67f98555df141 frame00000003 +8aee24800ead66ee7243f26beda4f7f3 frame00000004 +25f5082bdfdceaa41fa7c5c1fcae521b frame00000005 +c4e0f46477cc162b428acf6ee7b67a9b frame00000006 +094de36ac6eccb906f0ae032f23c8b65 frame00000007 +107849811f0f492fa540ad13d8535154 frame00000008 +9402a42cfaae760741d43106688c935b frame00000009 +d95e3fa327315a9817c89c3a5076e015 frame00000010 +892ba4f82e07513d68598dd95363d02a frame00000011 +43b01480ed0ecf7eb95fd326de0b6c80 frame00000012 +498e7f8b7ee020a698a3e47939b1b27a frame00000013 +f3f5fe641b2c6b92041428f5f92662b5 frame00000014 +15e65c94a849c4eceaed6bb6f01bd998 frame00000015 +d4a6e04507b0ba6169a21698028dab14 frame00000016 +bb97803fee92836990d847b67f3edf70 frame00000017 +986b6c59987d4b82ca4b2e7a7fb66de4 frame00000018 +bd6e7915f483ed0949f7536ce6942985 frame00000019 +01dc6f101926df30b7d76a56179e3f58 frame00000020 +d2a90b6a4b3c85bb71661263c4dca516 frame00000021 +6eed0ff0fde070b17604fd8e60c152fb frame00000022 +38a06c10e437067a0b37296230f2bc1f frame00000023 +0083419ad7fe912dfcbedb9a0117760e frame00000024 +7a9fe7bbf652373f1bf21dfef323cfa0 frame00000025 +c120e4119af8ada65b4516e3229138b0 frame00000026 +494513de5ccf786a7a249edb27c55b77 frame00000027 +e02192988f6b115d02084817d429aff8 frame00000028 +a29ae4905b7f0b7b0e4693c588c7683b frame00000029 +3596cf77a0967a8a7761fcf9f522dbca frame00000030 +0f5b38cb6531394cb1c2562da387832d frame00000031 +889eccc3204090e45ccab26e7eb2d37b frame00000032 +feb3e71a8860d6de678090864bceb413 frame00000033 +7967e59821927cbe8ac46c1ff81f7e3e frame00000034 +a9f4e6b9ff9c420bb416cdb22b3b1cba frame00000035 +a8514fbe114d24d7422815a5ea6623b8 frame00000036 +2b6c99f769eccd539d6708edf76fc1d3 frame00000037 +dc3fb196aec7e3ffd6af3a1c6ab5de0b frame00000038 +1d5ff7affba087c93b3c9538766c9770 frame00000039 +836e1a675c92edcf1b665669ea99729c frame00000040 +2126b8ff97630bcdcf326af710ef7868 frame00000041 +a435a201939433ae48a17f4d1c52b357 frame00000042 +84e65026d2ec17bf7b5e0c90ac49d9e5 frame00000043 +27298b843fd6eef5ee7fa332024f3d8f frame00000044 +5f9de12300670b34dca9f77c39fef572 frame00000045 +bd8ee0897b05724a3e62a7a8bfa11af9 frame00000046 +c5abe86be1ae7ab21dd833d5d12a7698 frame00000047 +6295ca514c80c7ea9e920276549323f1 frame00000048 +b894434248903c11198ef348e73d78cc frame00000049 +e79e793b60e9d38cbc4b99fdfc033dec frame00000050 +f2de3fc6ea1e4fb8f30070887a28995c frame00000051 +7f1155c1e84baaf5ebadfc336c5a5437 frame00000052 +3636a2e3f9e1a6aba391abc000d91df9 frame00000053 +e5d7a0a3c9f0942660f40201ed9abde0 frame00000054 +fcd83243d952c846bba5234b01596eb3 frame00000055 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cvid/laracroft-cinepak-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cvid/laracroft-cinepak-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cvid/laracroft-cinepak-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cvid/laracroft-cinepak-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,79 @@ +5fe0bf1af548fe4d7c927967f4582234 frame00000000 +1d52e54d974dbda25559c1ff13886d97 frame00000001 +c14e787ae60eeed6e9e8a80993e8a88a frame00000002 +a5f3a46164eb58ad1684c7ac307085c1 frame00000003 +b8ab8816a759e430bf89b50a1adaf673 frame00000004 +2e4383b184b70d30d1029b6646a56fb1 frame00000005 +0c81bd0cde92d7f550429edb2adf384c frame00000006 +d520cbfabda127c610ffc115afd3ec37 frame00000007 +774771cabdedd31c1d219ff1e23a3a2f frame00000008 +19f89ec6a9240dd1bcb511dd60653b59 frame00000009 +a4e90d88f57bafdde427921ec9aa9207 frame00000010 +10275ce6ccca43adc2765ba81576cbdf frame00000011 +351da53e6b047454f688383b48beb821 frame00000012 +f7ca9b28fc990dc0ebc1cd07663fa1b8 frame00000013 +6857e1cc33c3faffc34640e5de229001 frame00000014 +3b454130d4ac7368af1551cfbfd97e7c frame00000015 +745cf286cc7220d023f9ee2a9bc039b0 frame00000016 +1053cc999d63452a9894606c42af01a2 frame00000017 +87f3fbbaef8d799fdfefb97086739e61 frame00000018 +000eea3edc72f053d6ec601f5d6d245b frame00000019 +732a83a61e869cb5cf7d18c57d27eb2e frame00000020 +6c33f6e099275b1f4a29a0f79ad8d725 frame00000021 +25628a82f181470177568e5774a41189 frame00000022 +28bd6889e82a5d59733beb3fbd80aaba frame00000023 +fa382ccf4f72a817d206c99bafc0abaf frame00000024 +829359cccfdd6c199fdf5d22fee7f5f1 frame00000025 +9e156033cf3ffc37ee3fde0c59d45ea4 frame00000026 +7c8f2e9af9c90dd418417bdf21a6dbfb frame00000027 +4eec04da508801c45d1723f4fde353aa frame00000028 +9ecf2b76e54ddfbf8f79a5670f2805d7 frame00000029 +0c5e0dd58f0bc0779c3387abab70a62f frame00000030 +1ab72e663ff52ca20d40e2b5cc5b61eb frame00000031 +3575679861a58c5eea202d7ebb50b4cb frame00000032 +41af4a922f076194bc9f1ef2475e6ee8 frame00000033 +fb53151dd8c3394a748c2430a89ad99f frame00000034 +d12d2801b0509985d80960b6e27436e4 frame00000035 +ff94c887cb43824576e9cbd9fba223c0 frame00000036 +1649fce0aeeed4cbabc73c5f0f34e95b frame00000037 +145b477116f4144fc5fa9271c88a82b9 frame00000038 +85b17751afaa1ab90637823c44b6b062 frame00000039 +3671f17bee5e47f2020d2cfa0af917ac frame00000040 +0769c5d305dc88b90a7d2937c7b89c56 frame00000041 +21b891e552a1173eb4930df56e140cd5 frame00000042 +b4a074867ab3c9fb7e74dd3131c1bf1d frame00000043 +7d55275eb5aee100a0dfffb3ea6836c5 frame00000044 +8b33891b7024907d924bbccbdf10da53 frame00000045 +db807f86f568df1d424be4a4479890a9 frame00000046 +dc1553b34ab3b25f049146f0f6a61e4b frame00000047 +c82c11b0117fa2b5d3bb3e092fd06069 frame00000048 +0de1b040adf7807938132ef2fe0ff34d frame00000049 +7d601ce90459da852a426ca28874f454 frame00000050 +7a1f929ab60a2859882c37c8b1e8146d frame00000051 +24ceb101e4f890ad519e2b8e3b142cee frame00000052 +ba90b93bab312ad33993234f374f9c38 frame00000053 +96d3a31c5505ad049792faaccced617e frame00000054 +62537cbd0e91dde72e0f7564e6e6c453 frame00000055 +967f5d3a0abdfb23bf5310d31f57323a frame00000056 +9bfab96fd5dcb53bc84bdf07ea6ebdf4 frame00000057 +ae332bc2b1c858cfadd711da9a8f1b45 frame00000058 +b0b8d907554c5228435f1334264ec5be frame00000059 +66c32288804c8ea8c9f919a6d7322b47 frame00000060 +28c1f1a895ed814bd42efdddc245cc18 frame00000061 +96756c532f65160fc3a52f74b0ee7d47 frame00000062 +f11cfa8f1a51c7969f297ac324ce420c frame00000063 +af4b61fe854bbe0898ebbf10a183e494 frame00000064 +b8497578c3a4ae7c200b1befac3b9141 frame00000065 +e0601e5b2eb7807741e1d128ddec89f3 frame00000066 +dea0c8f1c596ae6f5b5ef98e0c4b6611 frame00000067 +2de54ab386708b2cd2c60ecb480266e8 frame00000068 +7491bf8c0aa9e5c311f3807852ec2f58 frame00000069 +86d1c837d4c0362219fe34fbf275fcd5 frame00000070 +22df41f91e27fc3343df02dfd077fc73 frame00000071 +b1b672222328003708ece54ed18392e5 frame00000072 +6bff99da5cb31351445abab0a6af620b frame00000073 +4f3631378995128b79717c0e3bb17c9f frame00000074 +8b859d877170b54bf9dd5a400d70de6f frame00000075 +e9756806125145c77a97cef07a0b4e54 frame00000076 +71f96d47a4ead521a9cc414fea353439 frame00000077 +321d3820d3e35c6085da4234a4c5ceec frame00000078 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cyberia-c93/intro1.c93.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cyberia-c93/intro1.c93.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cyberia-c93/intro1.c93.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cyberia-c93/intro1.c93.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,205 @@ +a62458291324f4565bcdb645898cece3 frame00000000 +436007813a03f2fae5d5200ef712e85d frame00000001 +b04ee78da5b1ef18dd76572109023aad frame00000002 +bae9845e7909f62901e51633606048e1 frame00000003 +0be94f629b45f092d0edb98e9f849373 frame00000004 +a17bdf4d0b939d5da4596e739f0ce5af frame00000005 +f52d8d99fcc64c4fc25159d1dc9a5a4d frame00000006 +26d60e67a036dac527d6a8539ad187c8 frame00000007 +804c63a82ecb20ab0c841a60870113d4 frame00000008 +eed95101aa82da33708f0a098dca6160 frame00000009 +70b7812e43ae0124cd1fd6ed07f3a5b7 frame00000010 +6d17f8f313767e4a582150129e7cec1d frame00000011 +e3b9686ea2df79aadcb7cb61bab12840 frame00000012 +d8461370ed5d44dbf3516ed840fe9de1 frame00000013 +f781a6a2838b080125d3a8e296c94583 frame00000014 +e6015629a52625a2a996d68859463101 frame00000015 +78611f5ff2e532cd5938bef73a01420e frame00000016 +9f9ac6c5ed5a9235557061fff2286aad frame00000017 +3cd2b912f3d68f6432510f8bb04b42bf frame00000018 +7eec868bfef5157586103ba7842d8f4f frame00000019 +298bcce6cd242d7149fbf03949fbef59 frame00000020 +08923e2b965db6129839f1d33c91c334 frame00000021 +a4bc913a766131a2f1af68ce87723098 frame00000022 +908009c9605230057d1bd64d9efb52e9 frame00000023 +f20693ece6f241e7a0997bd0536bd819 frame00000024 +d9346f811114f53d8fc4bd547fd2ed99 frame00000025 +af6c755b613e6f4577528d7927be0a85 frame00000026 +00ba75fd19dff1c7a9d1e292eeea4131 frame00000027 +c36e0e312ddfe80f84cd37cd14ee2abb frame00000028 +d1be01594bd709e1f9163e02d7bbe06a frame00000029 +40feb08a69d4feefc4368a6a16c7ffd1 frame00000030 +0c52905f47b64f74abfcc7ff5d3e0e98 frame00000031 +87f6448af10b310a42be586cc0faa06e frame00000032 +8de0bfe82d02511dd917c5b9831d0770 frame00000033 +e61a0856d15f5e86da6203d3922088ab frame00000034 +5eb820d6bc9c5e5973b5507bebce9a52 frame00000035 +909dcfc195d86d07ad651678d0b27fc8 frame00000036 +0f0275acb582ece4cac838190224c568 frame00000037 +073eecc8cc54a909b9401ee56b4b631a frame00000038 +ae7723ba6c2f44fa8b82085d62a43018 frame00000039 +e275202e7feb4b1e9661133c55a274c7 frame00000040 +a0931024666cafdf71eeff1a6807b5bb frame00000041 +b778e88655a8e028b08240dfe2ebbf18 frame00000042 +895040f7e00bc1576e7324eb7ff8d89a frame00000043 +59aa4f721fc079618acae5dd0bffcaa3 frame00000044 +b6c43d54f6371fefaa63732a1d13ea84 frame00000045 +324beeb4c2686485d89bf1be6363dead frame00000046 +578f0c9e520e2c2fabc567ce8488af58 frame00000047 +47a31003a812aaeb4b5ae407007846bd frame00000048 +bb1b1ad653045de6750051b0c2b66d70 frame00000049 +000ce1518ddb03f5b646d10ba22ca331 frame00000050 +72d6400e3e7a85d79a9bd3a3243b7690 frame00000051 +d35325e304245b7d3dfedca673c7f51d frame00000052 +735d14a1c818fe1593b59102cc946c33 frame00000053 +8d126576221f2949aa1deda6e375c90a frame00000054 +4c3159064a336843914ecf76a3db65af frame00000055 +4c61b15211786b05b8066bce59b2828f frame00000056 +588ef75b286b6122ef10c066dfe10e54 frame00000057 +8a1b59d9d28957e5dff603687eeb562c frame00000058 +3dfaeb066525fa6b91bf3eee31c36e74 frame00000059 +72b4d952a95885172c87b6347c79ae5e frame00000060 +42f0a8e4047b8b08de492578db9a9174 frame00000061 +df73129bf34544a4cf05411f98f1ea5a frame00000062 +a5c0f25066b1190755a483a6bdacb398 frame00000063 +bec85e1573f2730239dcba3a9d2de823 frame00000064 +a0f987be02292404e034a6f5c8590c84 frame00000065 +2ec7e6c6c52b725b9c6d59f71d60cfd8 frame00000066 +8da84acc62ea82564d2ee31baf389127 frame00000067 +19bd780b307e92af37a93d106b5ca4b4 frame00000068 +5515b693f6e40a827c6d7dcf23415106 frame00000069 +38cb139cab7eb82c25210ae179e900c9 frame00000070 +058bc828e9f0d308a89616c91a26bb22 frame00000071 +b6e59439c368b2d7d124918077cd4497 frame00000072 +9236121f94a258e1fc7b4c325a05e309 frame00000073 +94a6747ed02f6bee1912ab4170837663 frame00000074 +e385196010c2c1f22dfd99b7fdc7934d frame00000075 +8464737fae767fbe6df20ff1d8beb7fb frame00000076 +841333677743d3960f64181c32e27c5c frame00000077 +759aa70186193cc3c8f7fffa50ce43b3 frame00000078 +00147346f3245d84a201eb2bc7b893a2 frame00000079 +2d50375eb0cea3adf941527ae28b002c frame00000080 +bf57a40c88fc3af425c1760150004ed7 frame00000081 +194c309cf3a7fbab3cda9cae1ed6088f frame00000082 +8d522ece6ff7fa067693edab2749f46b frame00000083 +842b1b01d2d2495764e3b704269d9153 frame00000084 +6d03fb96bfa83709c0b269e6363afe50 frame00000085 +a216ad8f965add529c31acaef1ce67ea frame00000086 +faf8b20a0e282fc556229c6d8fcda336 frame00000087 +d83029c6debd7aaab495b845fc1c2978 frame00000088 +c845165998b607dfa2496da4ae2060c4 frame00000089 +9b03a7fd7d69b8c7ea23a6c55bd2f749 frame00000090 +beb6c75b9ef63e1947fb590b331e77f3 frame00000091 +3f9c23b038e0612d7478259b83acd2e4 frame00000092 +91d6cf46f79e03e807f1466cb383ccc3 frame00000093 +358b280cf61b8d8f1b4809927992112d frame00000094 +177fa117f29e8fccb2848ba8e59b18c7 frame00000095 +fc06a7b7e2a5aeba9db535d937d6262f frame00000096 +7e0213174dcb12967782eedc2ca735e1 frame00000097 +28dd5837019d38097c0c1bc6774d5c52 frame00000098 +43ee850c3a925a29220c1d7a5a958638 frame00000099 +8857a898b2978ee5d51b1939f85c4084 frame00000100 +51739df1a18d4056f5d7225e7b9d9e4a frame00000101 +e75c392d15c21a2e6e19c1179d88d373 frame00000102 +2e4b53ebf154f62dae061737f0a46ad2 frame00000103 +c8bd8e7a1e8b0c034f3510f0517b9124 frame00000104 +64ca8ed557aba74aec90a5879388163c frame00000105 +507b223f12fb4cd49d51c4cad8c1a63c frame00000106 +0bcc64b5accfcc2396f180c54025893c frame00000107 +afd7e40520c79b87306846d04faec9b7 frame00000108 +46f0e80aafd96c52701c0ae4f1258862 frame00000109 +36f42436bc754895af5b7ecdb1b14159 frame00000110 +c077439cd80e720a8508a3aa37c66aba frame00000111 +1a19346c7a2a7409fa938cc89068fb73 frame00000112 +f3c9b18bf35b12f390d3f81d42e7ce99 frame00000113 +5dea7783007864c58becd2c6fc056801 frame00000114 +23d48bfb4f1bad733fd0db4641b5e17b frame00000115 +a478a98e8b5e6d40737733c68a103daf frame00000116 +f3487915b99758f17214f83690136634 frame00000117 +dce65d2ebe8b52e1b17422ee406d43b3 frame00000118 +0711515429683e943f6de9d5bfae4e64 frame00000119 +5a911c5e1729a7acb59fea51ead09866 frame00000120 +98ca02c66511a7954b7dc35292bc4aa6 frame00000121 +9df81002056425bc7a98f05fe23d414e frame00000122 +594d9b3552f063c7300985ef95737030 frame00000123 +76d45df79f3530e1e0ded1a284e41a8b frame00000124 +8f70b9a877918c404d1b49d24fba8651 frame00000125 +33046b611a12d58ac9e8b4466a6c90ca frame00000126 +7284f19202dd7227a6023f2f22a3107d frame00000127 +b87b875ea748cab5a7c44e661afe3f4f frame00000128 +acc1d964909c5b352e86730dc5cf1f84 frame00000129 +1e609f7088efce76f0feffb45c718319 frame00000130 +860d30f5ce7d39a8f310bf1c50ec13f9 frame00000131 +82f13665020b5e5dba8a2c83a63019be frame00000132 +9688935de614a78fc2abc24e4440b73b frame00000133 +ed77af20e05a4febc745b5795df6d11b frame00000134 +5d6274c25e17c47b5a5251ecab077506 frame00000135 +245a81665924915125e4b4fa1ece9721 frame00000136 +3eef828c50d1833ee6a2434cfa3e51a3 frame00000137 +ecdfa262a3a405d8ea01556c3f4c6423 frame00000138 +6284d390e62d72f10b9baea1aab40813 frame00000139 +137c3affc23a2fcfaad7e170afef782a frame00000140 +638266b7f1fc6ad1ee588c0cd8f9b17a frame00000141 +73a5df65ab5ca7a2ec46043ab03e6895 frame00000142 +e11fdcb598365171d1811e7f377d4e44 frame00000143 +0775926f9286be87003c872114fd4379 frame00000144 +bd03df69fc65f9461bf11a2dedf8a260 frame00000145 +5fecff083dcef755409f8dc92456ea43 frame00000146 +725cdb3e8f3be3b0f9c3c6c9392042c5 frame00000147 +01193d12dcc08f80c17d2c38d21fbc91 frame00000148 +7eb7551dc45851078b67891b25bfd44a frame00000149 +06771c9787753f7cedfa5c5f8b62a81c frame00000150 +79b15f6bb097d20ba2cc45f167e943a3 frame00000151 +723c1cbbe67c759f647f71caa3d8122e frame00000152 +bb6145d70d108d920369bee721a5941e frame00000153 +ba626b8ce8566e9fb124273ea7bdd5c6 frame00000154 +5172c01227656b1317f1a7f4a5845e73 frame00000155 +774d92f0836bc35f7b0b7cd527b8ec30 frame00000156 +34716fd4c455ac700495883460906960 frame00000157 +004534d33c0e7630cfc8fd82b725e756 frame00000158 +f2cda65900301aa885a529268ecf6a35 frame00000159 +246ef990021399edc867a3ae2065d6ef frame00000160 +28ca4f290927d5edfaaa363dc7438e6b frame00000161 +00f6c82c0ad19ecab93d17f42b5523c8 frame00000162 +fd69580efe2cfcfa4e8dc0262c3860ef frame00000163 +01e10519234738ffdf69201235509e64 frame00000164 +82dce7553d0cd0b30fd0aded9aa1a816 frame00000165 +776ba36e9139266e2b02675e04bf3e3f frame00000166 +99343d0e13cd27f9b21c8bca8779ebff frame00000167 +c0658d06ca5fa0c78a2d0862c522df41 frame00000168 +252acbe3ab4649a0f0d49338049dce85 frame00000169 +e20320fb771f45362b450ae1af69f52c frame00000170 +f09fd137fc9c879a61292d7c45850b6b frame00000171 +deff5d93175726d60976ef0511097727 frame00000172 +2b006f4a840315d6c69eedec586c984d frame00000173 +e0ff9ef1d2e0a7ff36fd8a480e8ea5f3 frame00000174 +90fd681cad1385ec398044be81034f32 frame00000175 +63f3038ec53d90dcc4d80cb5a8a71824 frame00000176 +5c22d0dfe77a99c5ae48425358ace20a frame00000177 +1b0fdff44256dbf93303f6bf00c729d6 frame00000178 +c1ac79662533a3188b4d2b1ee52e4ddc frame00000179 +c26aae5662c350b14fd1fa1499f9c992 frame00000180 +a8658cf9fe9791b480b10b381b9f6bc5 frame00000181 +94666af6a93c5be96c4cab6ca31b03de frame00000182 +caa4c0ead79f258b9cc752d3384f49da frame00000183 +3d51209035b3e92b5b81a51b3f54e5a0 frame00000184 +32704291517792c581bfcdf9b9395184 frame00000185 +b201cc11a143191954b359b1a805d391 frame00000186 +25bba9fc654c48eadcf4962a45c09355 frame00000187 +fa370e70483d34633aee6441d5c480a6 frame00000188 +d8b2c7a53257e5aae21bc43814e8fd62 frame00000189 +9e150f8a12e0fae0d3261e456b78f14a frame00000190 +6903183b6b41f0e147d796d32f77e799 frame00000191 +bd11eba630e4fe7ebb02dd936b44a2dc frame00000192 +27ca3cd036665269640c243657ff2ae4 frame00000193 +d3f4381ebcfc185dba4eb9f8be8a2792 frame00000194 +b8c7052137e0a6f8b06891ddb579cdbc frame00000195 +76d9c144c5877bd9fbef924c5a0b4efe frame00000196 +cea718e3e7bfb9c9a0bc193aff596f33 frame00000197 +fb5436e6f16e43c5c78409d027ba3463 frame00000198 +10ea3bce8b8b0290254c87410dfa75fe frame00000199 +60f311ba384bf8ac587db10e9cd96d3f frame00000200 +09bf941bf352ca7cbe112cbd3b0ac88b frame00000201 +71aba4ebc32551b00b420e683c0488ea frame00000202 +ac328e3c154b5c1ac1989b37a4d05627 frame00000203 +442a278cd567f81facb75ac34da28a55 frame00000204 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cyuv/cyuv.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cyuv/cyuv.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/cyuv/cyuv.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/cyuv/cyuv.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,150 @@ +55e92aeffc65b832d572fcdf92c5bb07 frame00000000 +e628183931f3c49319dbe0f889571913 frame00000001 +88f99d076b0922186d66009f0ba041a8 frame00000002 +ef1efdb0cb5b0744bb7c97c0848c9c5a frame00000003 +7c4da63863330f17a1c3ccd172255d35 frame00000004 +cbc5bf8b088dfac1816324a388ca2037 frame00000005 +0948b2a02215a9b65c458df61118b16d frame00000006 +6a47dcb41daabb84bb3efdc748683832 frame00000007 +678583f8e0c1b4128aa693f20922da99 frame00000008 +8fb2323fadee965fb852d9e2fa18b1de frame00000009 +6c944aad8545770c65dd811315bb2a91 frame00000010 +46b9c1909b9a6dedb4666a87e6fcb36b frame00000011 +08a131202cba3b898c2bebc0ddbffae6 frame00000012 +3f4fdfac1f55599594a2e008dc41d13d frame00000013 +768a1522e5e644164b3c3fc5a3f63d68 frame00000014 +91330d7a65255c0e69800923d7023a58 frame00000015 +f6e4c8afc9eb4b62b7f8648e575015d7 frame00000016 +cb852f83e263b7266dba0295994dbfb3 frame00000017 +198d96d54330d8709c1c6027c8ed4e8a frame00000018 +e8f28539313a376164771a1ed71cc4bb frame00000019 +05568cc806ddacea8c381a1ee9b58662 frame00000020 +ab4330505b83078ae3a26648d21c3263 frame00000021 +25582e51593d162c9c730766a46e9d1e frame00000022 +846cab7f23ee2cb784916a8fe38570f8 frame00000023 +ec57d92d9731a434718932c375f73d45 frame00000024 +0ad8c1b64558559b4a24877d2e152485 frame00000025 +0d1d9930880af7cc74f7e92aef901950 frame00000026 +55374cc16ae3f8224886097572394067 frame00000027 +ad10b88a4d45ae5f0a92163a260b44b7 frame00000028 +8d5076261cbbe0a1122d843ac7ab8cf0 frame00000029 +013aba2c6db8b11b6931e4ab1dae2ced frame00000030 +70c10433c59093b140dba2294e52cc03 frame00000031 +cd7f391fca3955f60cc1f4c5fd5fbbf1 frame00000032 +8047975f073475d90675c8500b9885b2 frame00000033 +9822956624fe3650851223ddb06df86d frame00000034 +c7b518c43bc013af255b2211d30c6f5e frame00000035 +c4036e708331f5c62647d1767a2ff161 frame00000036 +d12e3535dd65fbd626b9cc2c1ca40631 frame00000037 +d020e146a6a92ba81f982f4f54033602 frame00000038 +b8d54c3057aabe4ac6447059f19d184f frame00000039 +9414c2bfba20488e254a851da6cf0505 frame00000040 +17c1c41a0fd5318f62bc5a653713410e frame00000041 +53e90b7966c48c5a34cc817565c11141 frame00000042 +2188fdbcb3ee996371ed58bafaa421ab frame00000043 +10bcd3d91cc3ac5af84d574233e05c05 frame00000044 +e4e5c80694d1df8613dc1b2fb53d2410 frame00000045 +d94edfbeb57d1115e0662e386167ab11 frame00000046 +c008949faa91b538a4e3663175bd30d4 frame00000047 +1eed853b82e37ca9f420d243bb1844d6 frame00000048 +d50ecc6e3ef9868ab7f4d931d21306e2 frame00000049 +946ecafe632ef666ad68652b698ceb88 frame00000050 +d2af12f55c2d90d841a6fd409aadc090 frame00000051 +2d4beedd40584469ae015c9b0788c2e6 frame00000052 +2137abd4279950ac7bc08b6755a0095b frame00000053 +121e7c2608cfa30dc17bac60503a7af6 frame00000054 +58d3cd35b2513cef1bb1312c5003d0e0 frame00000055 +de6d59675dcf810e405fc9228fabeb72 frame00000056 +f1dd4e161bf1b998bb7028ccabef6490 frame00000057 +cd12f10381ccf9ba5f74c85abd01fc9b frame00000058 +909128fd9f402feb3f08aa874fca348f frame00000059 +7ef29d1b80f12670ff4c6d58852a337c frame00000060 +a6d0a085d066297cf9938e9d15479ea5 frame00000061 +b83847379ac7fc606dfef14de793f726 frame00000062 +4f4988303f9d281a1c117ebdade86efa frame00000063 +bf13c4ee6bdc1867a4f5d720de4c0ec2 frame00000064 +d2f6a84d3105d80c83c6d38e1edec24f frame00000065 +edaded9c1d2c2398b79ec37b8c815dd9 frame00000066 +938df9fc7d4da388a56540a349ac03a2 frame00000067 +a01d55d6ed6becdb1b6cc17630d0d0ca frame00000068 +40435fa8db3c6f76aaed9670b850c252 frame00000069 +b433516e66663e80dcc83324e1a2ba3f frame00000070 +7c76f4805a1348c2d56f5fd924475f02 frame00000071 +14fb4920dc715b817a858fd8fe64f904 frame00000072 +0604617bbab3f9630fd23262427b2d34 frame00000073 +23648b48e72f4eff23a012559922ef62 frame00000074 +7212f372944e9cbe6b8deab5aa00a564 frame00000075 +1f88fc108542469fc9db9a5f52e8097a frame00000076 +b6dae3ae0a88bae335ef1e78606de39f frame00000077 +0e5ec3f379a194b322869a87f596dc2b frame00000078 +149b9f8dcb4a5bf32b3e7b048ce13401 frame00000079 +c4db8180ae9c06fe307b1959f02c1815 frame00000080 +bccc46937c366b7906bf6959c5a444b7 frame00000081 +742cceb884b988cb0a4d0c45a44a31e6 frame00000082 +1e69901f0a680a33b5b449827656eb99 frame00000083 +5717bd767883529d6c84bcee16a0b0fd frame00000084 +9e39f9f084be9da4854425b5ea6174ec frame00000085 +5563ce814461243770295d1a43c89e78 frame00000086 +892495f99b573066866b4b364b889b78 frame00000087 +406c3bc12f7f3e554756df9a224714ad frame00000088 +8e7edfece074e61f9e31aa7812bdec39 frame00000089 +98937b80db3eb1b87f448d41c5dc8e12 frame00000090 +6eafe0c40b1f020889040943bb391bdc frame00000091 +37f94af06c75587815976ad5bc87a2b6 frame00000092 +5c21f26d653429bc03faefff28b67f0e frame00000093 +479233b04e6b0b5302880cf8203b8718 frame00000094 +eca0a8c352690ea39b441dac9b4b766c frame00000095 +402ea0a7a5fdf9aef0d5c9e29122306a frame00000096 +e00adb6490bc94585981a8aabfc3d6e5 frame00000097 +c5a120fdd988056c0f9b30467c90bb54 frame00000098 +c66b22a63a72a5f416b6261b300c651c frame00000099 +0a67e99d56c0b1a645913e945fbc3d4f frame00000100 +71b9285666fbe58d11d476b4c2028f2b frame00000101 +be31c2d4600d142fe5c94a08be1f1460 frame00000102 +b096f8d0f3e51b8f2bee8ce1e5bde98b frame00000103 +4c5111e97ff6e3c4043e8206324a4275 frame00000104 +0968f0467b142bd94ea2608a8f477871 frame00000105 +8c93ecf79dbe4ac7e55440bc691d5add frame00000106 +45e8f2155f8a55c7ed19a3228dd87b24 frame00000107 +f14bc2fc2f06cf404b5500d5b6748d16 frame00000108 +74b2299ad971b914953ebc3634b07918 frame00000109 +3bea8791db66a1e1d78a2a196ea5c6c9 frame00000110 +7aeae7af00929906f738b478c4b71483 frame00000111 +a8c181dbb1f6f865dd4e9e2b3f5e716e frame00000112 +f98689b51d4db55f37d443cb09a2c225 frame00000113 +7055bea7d8fa2f0936a24f02b63d3813 frame00000114 +c4cea6354050f2fbbba76a48de758cda frame00000115 +623d39708771d88c61024f3c6d8eb658 frame00000116 +1936f97729c2f73ac67c2ae4499f04b2 frame00000117 +ba14d55457de18dcf5b92397d81f2993 frame00000118 +49062b2b2a75db099128af72c1527ce1 frame00000119 +0f49e6449591796a15246b0257b193c7 frame00000120 +27062c77fdc267db16173ca49ef61160 frame00000121 +e742b3eaf33c794ee9cca1f805591ba3 frame00000122 +c9a55dd180d557a8c6c955377ac00575 frame00000123 +7a444ea40a8fc46a76947be56c58f8f9 frame00000124 +b7e85bbe4db012c6e0a64785fc3d488c frame00000125 +e81952b944dd65ccca5bca1fc6441d0b frame00000126 +1bbf66e3f2d582553c41cf086beefa02 frame00000127 +ee42422c3d6d65cd03d153baf90ad649 frame00000128 +27ae27e1717d6f50c22267542085036e frame00000129 +694a5c04cfb43938670dfe3de4b38171 frame00000130 +923ce25709b716d52cccf239af9e0e1e frame00000131 +635f0c605e7567c203ec8579f3043f25 frame00000132 +9a3ae87fa35364653a28d6b55283a619 frame00000133 +5fee0877464ab659c14486977b8c5de5 frame00000134 +304ec23b6367abf4a841514ab967e33c frame00000135 +eada38d66dcb914568b9ba75b2ffa3ea frame00000136 +dcb348c88006cee03329d9af451e3052 frame00000137 +92d3efb2fedb8ec7f55bc1ca04c6799d frame00000138 +e7fd5b36462e3158db2562d8dbf3527c frame00000139 +02320af6731a1d0cfd43bd7f77cce328 frame00000140 +d814f0b974f53ac80032051704d6e6ca frame00000141 +07d4f6d0b8405f847f0de25588cb4fc4 frame00000142 +be250ef4a1320923fba8e13f31033bf6 frame00000143 +d5ad536811c193bcc4fdeba85c9c1074 frame00000144 +86de49afc309b4383596285b4e35a14b frame00000145 +3eba8ce5a146ee1af0b37facd4d3260b frame00000146 +ca741e99ed82c903962500e7cb995e0a frame00000147 +1a7ea6271d52e98714a6cbf1b944e11d frame00000148 +dfa924df7303346119ce8f304862c1e3 frame00000149 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/delphine-cin/LOGO-partial.CIN.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/delphine-cin/LOGO-partial.CIN.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/delphine-cin/LOGO-partial.CIN.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/delphine-cin/LOGO-partial.CIN.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,92 @@ +4c74a2ef43894175e2fed3c2415b7b54 frame00000000 +5e28207383840178755902d6f9660561 frame00000001 +a109b6f54615fe8cf3afc0cd5452d053 frame00000002 +049a81e8c16ec5c504e94b007505d929 frame00000003 +35decb42195994b9de520b85f863a461 frame00000004 +2a78475aea9aed88c9ec020817fe1b8a frame00000005 +f91c5cdadc970b9dda613ea18fc88e07 frame00000006 +acf0f954c1c88ce95bcdf76defa708de frame00000007 +15ed37d343b2aebbd2b8c2d021bddd5f frame00000008 +3dbf89fa323203a51a70a1f2ad70694b frame00000009 +623e1858ee030e4f3420fa76e88b440c frame00000010 +adba6cc9f8b2b8e10866b7e0b5ec1a21 frame00000011 +3b83491e8fac88f8dba91808c4321d87 frame00000012 +693e6ce609c01bff843443816bc7e01e frame00000013 +3593e0cb239e7d09d926339786fe67b2 frame00000014 +6ca9000d95b99a017fbc9b47c4ace98a frame00000015 +91c420c1cc12f8300d7fe19a35fec713 frame00000016 +e0d51ef9145d5b217a6e98548e672ab9 frame00000017 +5fdd036ee12feaed99ee5decc0e45397 frame00000018 +f45fe10d2240ded01ac371eec2ee0470 frame00000019 +b184506350c825d2630617b9c69fbb0c frame00000020 +543f0024d74acb1f4798e3b76350787d frame00000021 +939b0b22c67cf48f377d03de7516e4ed frame00000022 +7482333f04954f058f96826c0108f66f frame00000023 +12d6e50017e0eba61a1764177d971613 frame00000024 +4d6706d3ceeb8971923f8bd5cd70842c frame00000025 +472383f12e0554903537c37634ed5826 frame00000026 +54260450397a7939f06c26746f5cfada frame00000027 +cb678310fece590117e30beac534919e frame00000028 +efc56e9acab2bf4ba58cff98899bf42f frame00000029 +4e4de580d4d902abd25cde9f217fdbce frame00000030 +45a745b82f38e57f584c218b4adeb9ae frame00000031 +ca2ea3fdae4e246d727ca59b3896c326 frame00000032 +33e6969d514502f25352bff4d1d151da frame00000033 +d4d49f9c8d618c5117e102d602d4908d frame00000034 +105fb02c8c4991ccc3d28994613f9141 frame00000035 +0df3092c29bdebbf0e55f693e54b1469 frame00000036 +1ce5a1c90c77f547e3954e0f7717d75c frame00000037 +2c5e1242175e911acca1795e5f8e54a7 frame00000038 +d255259aef5e0de15ba033090d044eeb frame00000039 +da0dbdc43b81c757fb56d7acc0a7584a frame00000040 +dbb49f686f7bbb55205df1777bec2269 frame00000041 +3a64620e069313fecf8c7c61b8fb7c1b frame00000042 +72a2eaf2f89977824a36c16d2eb0f097 frame00000043 +d6597ec73bb1b5dee9a36954dc714029 frame00000044 +7a73e25c65dc684e96a3570c63df54e3 frame00000045 +b6d9d847fe15191d0eb02aec842d7ab7 frame00000046 +ed7c41cfc203105188dff0f3316c0ce7 frame00000047 +94e21458edeb361214b1a123f03e52d0 frame00000048 +6dd2e017ae780e18e4e39981e3fd1403 frame00000049 +d7a5976089fe0b71f5fe2bd4adc29382 frame00000050 +c6b48c54b81a7b0582d8e825424d3962 frame00000051 +d1909860e8e44662f7be3016d4c10595 frame00000052 +f6019c70f7e9eab93794095b85b73139 frame00000053 +91e3f4d2bfe29197e22d0b4e8eb6adc0 frame00000054 +d0fc36f0baf3051067d1fb70ca37dc45 frame00000055 +40a7a51438ae877a939fe43d671e8d34 frame00000056 +9f789a6993a1c68c700daf898785815d frame00000057 +9823f8d8c795c70e31bcd9db493ec36d frame00000058 +5478f3f19e8654565b3d8923113800e9 frame00000059 +e54e04a543e83f7f149dc7170db55bb5 frame00000060 +db3da7ee89458ffed0c0b51aeb9062c3 frame00000061 +2d29060f444eda59ef4b0de4f45d8466 frame00000062 +07d3805472ab97da1a84187cc90279dc frame00000063 +59eb122f3d6ac8d1bac9e128ca1c4e06 frame00000064 +39bc7fb04e214b1e02a923a3f9777b93 frame00000065 +ca4639f4bf56465663041abbcc9d9c76 frame00000066 +3b9a0709d2def0ee50f890ebe452a041 frame00000067 +7b8ef02f9395c861c18cbd0525e87505 frame00000068 +5566092b1d11cb64ccbadb26a63ce7e4 frame00000069 +811eafc5a673fc6dde2a592bb3c41009 frame00000070 +29138cf37aa6eecd609bdbf5b882e607 frame00000071 +23df1f6985154a76c7669c0bc2cf9677 frame00000072 +9d940a9836318728f0be988bfaca3b28 frame00000073 +2ec58435da68cf4a191bedd9a7115e83 frame00000074 +ee0bfdc92b4fade57df04edf3d64663c frame00000075 +7b825ffd7edf4d1dc8c81fdd10512e61 frame00000076 +c2b084a1db4af9b824a99f3baadb1768 frame00000077 +d5dfe49e8deca5ee25fdc95c0bfb7191 frame00000078 +1c51b18a353422970f1c50f4265ae0d3 frame00000079 +f30ba3dc2e43e4ada40c5d6c98d44186 frame00000080 +6acda31cd32fafa09fd21be92329aaa1 frame00000081 +fc8c3af8526c4a483b23111e7432618e frame00000082 +ead1330b5663fd8afce791b47e3ce397 frame00000083 +df640adbfac2e2a3ea030db56e1c926c frame00000084 +5d98d60aeab82b4463385cbc169c096a frame00000085 +e2a841995070ffae6420f08bfc857c06 frame00000086 +2ff67ebbb4aa539025503ef645caacc5 frame00000087 +62c35abc2bbc2543352a906a74bb7e5d frame00000088 +d7b5d58f040223de1f5fa79e1d33f9c9 frame00000089 +dc21d1c38b86ec139b6409d9fc4c513f frame00000090 +b94705e436da8d454ef7a8caca09c24b frame00000091 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/deluxepaint-anm/INTRO1.ANM.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/deluxepaint-anm/INTRO1.ANM.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/deluxepaint-anm/INTRO1.ANM.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/deluxepaint-anm/INTRO1.ANM.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,123 @@ +a1fa2083da8158cb9f6da5360cb2d079 frame00000000 +609011cfe240323219b12fd30926c1ad frame00000001 +44572ef7996b4c3e397316d51b8f6294 frame00000002 +1c69be26300117e38e4b343e4d8f0b75 frame00000003 +0e82e66c6ff1756f166ae4b4c1ebafc8 frame00000004 +a3d6d3c99063dc0c1ae63261e9129371 frame00000005 +6cfc6aa49ca62c1cfe293357a68af5e5 frame00000006 +777cd8ca33110b6d91b20c869f2ed77b frame00000007 +2768babf2965b4f08fb615721fc0d752 frame00000008 +f65c72aaaca6ade3a9e35f1cf19ad6e7 frame00000009 +833ef9fd26b7dc9bb6259acabb7237be frame00000010 +6bca58da0169c00a24cb5ac8957fa492 frame00000011 +167de01a914033def78e13dc130d8163 frame00000012 +c3ce4b14d14948101830d5ffe42e0f4b frame00000013 +28604e4e4167069bba06ea542f7dac62 frame00000014 +3e779ab78764d978bcd0115ad5c695a1 frame00000015 +bc284052946f59daf0817e4b8fec9378 frame00000016 +c291394beab00882987fdfcee34ea435 frame00000017 +8eaf1e1d2df9e552a1a994885705adb0 frame00000018 +b1caa71f87815e558e1d9e019cc5147b frame00000019 +6d77f9df7800b382e6291946e093131e frame00000020 +694b5c877b961d213b828578b67ae5f2 frame00000021 +6d77f9df7800b382e6291946e093131e frame00000022 +bf95bb2bfd682074c3b58c308a3b0c1c frame00000023 +8a5afef1f0bf8118e143b1197d2434f0 frame00000024 +69971262c606318f4f15ca4962f9eae7 frame00000025 +a103b2c1852d95a4324fe5898161cc90 frame00000026 +849ae4e9e984df00e1ecd07d55af0583 frame00000027 +968bfdd5c8b5390c48e3d3bb92a194fb frame00000028 +c4fb0e1635904aefb8fb1aaa04c5d90d frame00000029 +74f29353673afa25e4a8ffec29a809f7 frame00000030 +4ceee427ee9ba92f99fdd60b254972e5 frame00000031 +5634a3a589bd6594ded9e322e8b16593 frame00000032 +9e38d382856e22411f042b8b8ff6b0bf frame00000033 +f802e1b180993cd488180382e38eed91 frame00000034 +104ed799dba1096ab3c778617647e098 frame00000035 +4abf4525feaab7574f6735726c84c8ce frame00000036 +3d365f83e06790ca424409e9fa6dff05 frame00000037 +68406943fca751013735621a050e9f35 frame00000038 +9e633f0a5f0ddd574f84cca74aae33dc frame00000039 +0976ec49f4026c1345357fe646081a1d frame00000040 +390aac6f430a114de0c638f31571f84b frame00000041 +f3a43d1ef2dcc7f317595761f53f4e9c frame00000042 +0714fc087c545d565274a15482bff094 frame00000043 +e6d5e3820cf76f239fc90fc509b30704 frame00000044 +33169b431245128da4766aa9db79c47a frame00000045 +5c65a3f99dc0b5f8e601d6c2ce35cbb5 frame00000046 +fe6db697626aee1f197a343005907241 frame00000047 +6ce7c0a18619aad7c39afb755296e1f7 frame00000048 +6d4ccecbcfa6978cac17f42074ca7e1a frame00000049 +fbbedc3868d2a1cab5090bbe367f8d5f frame00000050 +1965660f3aa1d99c6047c29122b3a3ac frame00000051 +49be2fc258241aea1a16ae745f7d7b78 frame00000052 +02835b2f73ec757d1074dc40ae347d0f frame00000053 +bfe1612e9ccd663ba5c6c026ac4cbefe frame00000054 +c67a4ee039b4df92b18c31c70262a5e4 frame00000055 +6caebd338c45d56f38a4c9ce7fefd2ad frame00000056 +9604113b3bfe318be861ecc8bb434b5a frame00000057 +eb0b339327d377d9c3a7b95d5be73166 frame00000058 +4f0ddc601cc4278f3f60f596353b6a00 frame00000059 +eac724e0127b3a8433c0ba438fcff890 frame00000060 +1ce5c8b689f5f1833216176cf66de686 frame00000061 +f1f9b6ddf1bcf7cac1f8a98aa1c39204 frame00000062 +1ce5c8b689f5f1833216176cf66de686 frame00000063 +f1f9b6ddf1bcf7cac1f8a98aa1c39204 frame00000064 +1ce5c8b689f5f1833216176cf66de686 frame00000065 +f1f9b6ddf1bcf7cac1f8a98aa1c39204 frame00000066 +1ce5c8b689f5f1833216176cf66de686 frame00000067 +77a8313aec171d0826a615d8266d8199 frame00000068 +806fc81e681ab5064e0dd27299bde9d0 frame00000069 +0438271a342714eb30693faccce440dc frame00000070 +db8176ca0230339c36fd6b5321087ab9 frame00000071 +2c1ac1ae94e0c1eac26c87a93ba7cab7 frame00000072 +97187e7c7e173f73638f7500b5730a64 frame00000073 +0ae94efc53c825b4b083c375d3b6ce9f frame00000074 +0ae94efc53c825b4b083c375d3b6ce9f frame00000075 +855729b9922fa22e04fe85faa8e44ab3 frame00000076 +0ae94efc53c825b4b083c375d3b6ce9f frame00000077 +806fc81e681ab5064e0dd27299bde9d0 frame00000078 +0ae94efc53c825b4b083c375d3b6ce9f frame00000079 +c3e9b9d0240dd25625db58ff63e2acae frame00000080 +6b4573e02e9aa4e8f531b540d6e376b6 frame00000081 +22adb06f2c9c10c7f17864ccfd8147f9 frame00000082 +463e60ea274ec9ced5da12d14678689f frame00000083 +8cde4d7c9ba004600de0fba4d153e913 frame00000084 +d5f2cd19bfefe4cce2fb6d692c20eaed frame00000085 +d5f2cd19bfefe4cce2fb6d692c20eaed frame00000086 +f6016a6c8727e52327c75970e5f212d7 frame00000087 +d5f2cd19bfefe4cce2fb6d692c20eaed frame00000088 +f6016a6c8727e52327c75970e5f212d7 frame00000089 +d5f2cd19bfefe4cce2fb6d692c20eaed frame00000090 +1d834f3e41ddb6529d85f20693bbc755 frame00000091 +fb5c54b8488c932fb22f28951cd75869 frame00000092 +af6b92b9c66beebb84d9b5264a28fb37 frame00000093 +da19d797b68218734c0736befd1f5402 frame00000094 +2da3fb604e003a2cfe8f186a75f2d720 frame00000095 +fdee27d905ff9c0d48827aed45b42a53 frame00000096 +370d109e8af82c175ec6bda0d642918a frame00000097 +033e753d4d5d624f8939cde2db82b04f frame00000098 +2a8b728df619eccef654687835f11953 frame00000099 +cca66a568e1c56178035d9c365700e93 frame00000100 +d79544cb1c91adbbc0c67020fb3b8a4e frame00000101 +b8d0b5653a13eb020ccc335ae41c411a frame00000102 +f271b80c479cdebea9db07303e5060b9 frame00000103 +f271b80c479cdebea9db07303e5060b9 frame00000104 +f271b80c479cdebea9db07303e5060b9 frame00000105 +f271b80c479cdebea9db07303e5060b9 frame00000106 +f271b80c479cdebea9db07303e5060b9 frame00000107 +f271b80c479cdebea9db07303e5060b9 frame00000108 +f271b80c479cdebea9db07303e5060b9 frame00000109 +f271b80c479cdebea9db07303e5060b9 frame00000110 +f271b80c479cdebea9db07303e5060b9 frame00000111 +f271b80c479cdebea9db07303e5060b9 frame00000112 +f271b80c479cdebea9db07303e5060b9 frame00000113 +f271b80c479cdebea9db07303e5060b9 frame00000114 +f271b80c479cdebea9db07303e5060b9 frame00000115 +f271b80c479cdebea9db07303e5060b9 frame00000116 +f271b80c479cdebea9db07303e5060b9 frame00000117 +f271b80c479cdebea9db07303e5060b9 frame00000118 +f271b80c479cdebea9db07303e5060b9 frame00000119 +f271b80c479cdebea9db07303e5060b9 frame00000120 +f271b80c479cdebea9db07303e5060b9 frame00000121 +a1fa2083da8158cb9f6da5360cb2d079 frame00000122 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/duck/phant2-940.duk.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/duck/phant2-940.duk.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/duck/phant2-940.duk.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/duck/phant2-940.duk.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,105 @@ +66f16a07a16d0020bd3e940aef66261e frame00000000 +ed53f466ec2c986a192d73e5f4c7645e frame00000001 +ee69e079f7ad08cd77ce891f235f42eb frame00000002 +14ade5f8adae5abc4f8614d405331dd2 frame00000003 +a33208c49c8c35034e4e40d873083709 frame00000004 +9d20c8c92a03b0553cfd88939115060a frame00000005 +0308a4619221bb256bb43090cfb38a44 frame00000006 +50e37492e57a0aa6cdcb5211ccb18def frame00000007 +de45b02efea2c1e20a86f15c3d7eafb3 frame00000008 +799e0f26634d9392f92b2fac66c88bdf frame00000009 +def81c70c7e5545c9347640c3d52c394 frame00000010 +3ab490caf10649b33b8779f7b195a4d7 frame00000011 +d3bdd8f4c8936db617638ecc5381d3fc frame00000012 +28e0c018ec53d42fd58721d6c4c41024 frame00000013 +7f54e949049c737c7d7f52cc8ff65da3 frame00000014 +b978fec60030000aa9455b13217dc322 frame00000015 +1445df68dfd6ec2ef284669dae5e535c frame00000016 +c22dc78ed115f60a733d138d011717b5 frame00000017 +f297d40e9e02cf896ad21dd3202d9256 frame00000018 +32b7c8afbedff92beff06759fe6a9f9a frame00000019 +ca25e6cacf94e80d6b5fa974599a894a frame00000020 +b20d5f8623e83e24a5f70e686141edf7 frame00000021 +fa76d217afaf821245d36f72b90e40f4 frame00000022 +dc4a4a8bb838c92e91e8223b79e81794 frame00000023 +3f371fd222ea09b71fd79d9353826bf2 frame00000024 +8ee04904f0314d314f71b837b258a7a3 frame00000025 +6becc1199391cca4587d8f16005b6d5e frame00000026 +55a8a32d28b93b68bc2991062dd5822d frame00000027 +7154a2b784d9e24c28409f4be22204f8 frame00000028 +082ca762345322f0412d1cc5e7bd893e frame00000029 +ed92786164122d6fce4d4bd1562c6951 frame00000030 +82237c77d165df8c4530b8457f3aa892 frame00000031 +04d5d99363b363bf7a3d673a186ecea6 frame00000032 +7df6923ac81c57b7a1e052aee2d208d6 frame00000033 +882d5edd58edb4399ad8973734313407 frame00000034 +88e3222a0a6529b4f38370f4fc477197 frame00000035 +f832b7ecd71b166cd0f9b137f367ab6f frame00000036 +7cbe60b6a723455279b35afc81bbfab1 frame00000037 +d78fe1158a7acd3d96640a25af81fbae frame00000038 +5b8de67035ce7ee522db31d5eecafdcf frame00000039 +ddbab7db3e5d28248cea47456f781747 frame00000040 +d727dc9e5e2504b570f1e31ee1041421 frame00000041 +40851e9cce728a6a3420d0b7403efed0 frame00000042 +1e98907728e09abeadcc22f0b7fcf83d frame00000043 +cfdda442b4ec8ee335c16468f58e356c frame00000044 +2fc277269d56fb55cf1a7493752fadfd frame00000045 +1589229eea66eafded625932152aaa9b frame00000046 +372f023d7322f16ec7b9689b8680e045 frame00000047 +e457db180b100eee956ba2b1d69dbd4d frame00000048 +1566e668fc57ec9e23d54a3ee4ed9713 frame00000049 +4629cba41194fa5936ce929e7f51a925 frame00000050 +7be5e3a4dcfe9de15c82a3b25bb98da3 frame00000051 +4559c9c9149c0ea67d6d5555519a0206 frame00000052 +e0ae627cf6c3ee5c7110904e07c142b1 frame00000053 +f56e1cab4be39b9e600827bff613012c frame00000054 +ea22cc6477e755a4a69e1ba5fd12e65d frame00000055 +2d5a850027f3e67e4a583ed0adef89b1 frame00000056 +8a4c4d56d3a81bbca7eec258b6a2f5f8 frame00000057 +77ab9bb42c0364d655ea666df6584abf frame00000058 +f047bb268ecdb9d587f3ee04cbccee00 frame00000059 +b403a9585bf29b664dc38bb0e712ef8a frame00000060 +6ce2991f6cb2864438d1f0ad998b599f frame00000061 +d41b5db71ea79c52137e795629cf873d frame00000062 +c79bcef3c93597585b1857f5308cfa33 frame00000063 +afde24fcdf09382b4a24f173727fb582 frame00000064 +6059fa83c68517eb6785b1f147d5f1a5 frame00000065 +15b52caf6f5c0cb36a0e5e87d5613f45 frame00000066 +feab8a4539b540bca6b55e9b5835661a frame00000067 +3d6354ad7d00901218bf5ea6e80875f1 frame00000068 +ba6380b5001faff2e3ab7bc09fff1eb8 frame00000069 +9e0d62ea03b54de81501048ba1a25587 frame00000070 +b66a625b8c9e1b447ca576d58e04ca8e frame00000071 +c17c899c0a14d8f5912a0955749d8908 frame00000072 +4b357cbe4aaaddf4cd8e744a29e6ac2d frame00000073 +546c7780b4ece4adf9fa019f342dc2eb frame00000074 +9b8a53a02f66f64b41b9e5abf2c33608 frame00000075 +e0681396b912f32128ba11c06aa2f223 frame00000076 +ed15a761713b806b03f2cfbeac341105 frame00000077 +c33d02cea35793fc3f2ca42b315f2917 frame00000078 +066d820dcd4ead0ffb8f542356144bf8 frame00000079 +80de3985698480348497f9fd2371fefe frame00000080 +3604e6cd06e9e3861f010169f79001b8 frame00000081 +07507b9d8a15c427532b7c197617858b frame00000082 +cb4607a4af91adae712e00aec1bde0b9 frame00000083 +c43953c8668e14d730a14b23fe6b37b5 frame00000084 +8b3820d299d7ee6e7485452c099ab677 frame00000085 +2e7f9a73d0c1a3818290a6574c0dbe82 frame00000086 +e04dd8aa072c313195b25037d3f0b50c frame00000087 +f89af03a92178de0ac91eda21c0574b1 frame00000088 +bc70515de9aec9f91fb0c473841b38d6 frame00000089 +3ffafed05eac8488375d5378c53da770 frame00000090 +53667a89b4fd80e7df81e028dddfcbc3 frame00000091 +e438fae805e21cb612714ae43342a61c frame00000092 +4b19b5d917a534abf3bb3210d689c383 frame00000093 +4b19b5d917a534abf3bb3210d689c383 frame00000094 +74d361e14c14de193ef331e0b4bf9b89 frame00000095 +74d361e14c14de193ef331e0b4bf9b89 frame00000096 +74d361e14c14de193ef331e0b4bf9b89 frame00000097 +74d361e14c14de193ef331e0b4bf9b89 frame00000098 +74d361e14c14de193ef331e0b4bf9b89 frame00000099 +74d361e14c14de193ef331e0b4bf9b89 frame00000100 +74d361e14c14de193ef331e0b4bf9b89 frame00000101 +74d361e14c14de193ef331e0b4bf9b89 frame00000102 +74d361e14c14de193ef331e0b4bf9b89 frame00000103 +74d361e14c14de193ef331e0b4bf9b89 frame00000104 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/duck/sonic3dblast_intro-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/duck/sonic3dblast_intro-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/duck/sonic3dblast_intro-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/duck/sonic3dblast_intro-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,16 @@ +0c07a18d2c055c6c8e0faf8cd7eed628 frame00000000 +061be9c63d670bd74a140a1018e7c3e5 frame00000001 +147beb63d38ee8d1316633ead763e480 frame00000002 +f85da7e9e496479ca84b0440e7b74b56 frame00000003 +8b5580a210c77e657569b3d55f90e278 frame00000004 +571fe2e74d6d76406b8699c678865834 frame00000005 +dab64618d6919842df38a3497cca57da frame00000006 +48b4d79d9af806099d52c7603fe9c4b5 frame00000007 +29037b734c74bf40dcc5c3c89adb79b4 frame00000008 +e23a785061187be3e945e2a17479266a frame00000009 +7871bfd63a40d1edc10b7e3c20d6b163 frame00000010 +f5add6d649ae265fc111e28aa35c5dfd frame00000011 +b1f3f78b4010c3fa50e9f0a8aafa11b3 frame00000012 +366f9c50b76f9ea7c55f4ae5a10cd176 frame00000013 +17a8c3c632575fc18704aa9c654c6219 frame00000014 +3153a87d972def5abaf1d77daf92ff15 frame00000015 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/duck/tm20.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/duck/tm20.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/duck/tm20.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/duck/tm20.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,30 @@ +0023a1889ebdf432096a7033257db6f8 frame00000000 +d7bb647b4802525efd128cf2fe3187ea frame00000001 +b8678b1f2b064e3c351f5f6ff7b82f40 frame00000002 +45de4f2751aea61f9a7c2fe544fe51fb frame00000003 +a07dc920fe7cfa2ee89ba77e15d38200 frame00000004 +11fcf0a6d5c3a8c080d4fa5aa4666f81 frame00000005 +06f08f6360a919d34f9f3cec466a019e frame00000006 +7b2c59481c99d1ca0d25d5735713ee3f frame00000007 +a95c0abbb1bc9f3df49642f7a7793716 frame00000008 +c1444928507f296ead486c00021118f8 frame00000009 +dc195b625274ee65d8a697227b4b4a8e frame00000010 +ca82617b16c2c1d2103f400410e8476c frame00000011 +a0b8ec00252a2755f0ea0d0a4be6eb7b frame00000012 +672c4858849b3705c609d81195df92a1 frame00000013 +5cfee44023e66518dde0f277001febc9 frame00000014 +741efa45a1911c15cedbb4b1cb2cadaa frame00000015 +9f98c05c90213190a2e51e5e546899f8 frame00000016 +7a21b0112951af6c70331d8e16db1d18 frame00000017 +4976273d9723462d2a8da9077e97e240 frame00000018 +b25c7d34659d2b3e81e8496591752b0a frame00000019 +35a8a861089f88073462172909e3e7d9 frame00000020 +426169cbbc2aa50fb2ad84fcc242c225 frame00000021 +75d935b04dcdd656b4af27c1cb25186e frame00000022 +42d22b2ef8be214640860dabca76328a frame00000023 +b69c0e4caa669353c7affa33e51956e3 frame00000024 +d2b6e7ce51684b4f3ab85d21a9eeea4a frame00000025 +82f5a05bcfea25525be3ce0d29418095 frame00000026 +57d7ac835986c4717883434f4ca89162 frame00000027 +31f93ad439f13a9eecf3396220022509 frame00000028 +5529b8a08e6caad6714c28e1fc6298b0 frame00000029 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/duck/vf2end-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/duck/vf2end-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/duck/vf2end-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/duck/vf2end-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,167 @@ +61ba589dc0b1d9a3abbacac7a94c7de3 frame00000000 +3376d8ff0b55e97afebcd70fa500c650 frame00000001 +218839621672dcb4c7c2a6a8e79ee6d9 frame00000002 +a8a0d6b689f327c6513bbb9661482ff9 frame00000003 +95c63b7fa2892782fb337bde6a210bce frame00000004 +543bd1ab1320a0f2edf93d810e0afcac frame00000005 +29e81c448fd414219aa53cb2bff3fcd1 frame00000006 +78530de4717e94f9648a735a1bad6d2c frame00000007 +81a4c68abf0b6ac74608a405019d5c8c frame00000008 +6e78f6e2db551578caff718115f1a3f3 frame00000009 +fa3604ebe0e9f6c4f1fe842b4448284c frame00000010 +88f235e22acffea6cf33a8d54ced6c0b frame00000011 +aaac1bb2a16c30b4decbbe74012e39a5 frame00000012 +9e1ed6a081bc8258d8f7237371b137f1 frame00000013 +7ba3f53bfe8e3da5b39353aea8c54a92 frame00000014 +753d118b207a24960bbb9ea7fd25658b frame00000015 +9d495e29c9d8b9dde36ee0288fc8c18b frame00000016 +fef74bbf8c60cc46f54c08ddffba1702 frame00000017 +17f39c18212b097d8f2b68f2ec9b6cb3 frame00000018 +ee966e52948a2244b557488845bcc3bd frame00000019 +d72c237b0a990e93caf8e67c3d65c947 frame00000020 +735ef5e565560ce6570c409ba85742fc frame00000021 +66843a7874d0ee3d47167ff9b39fded8 frame00000022 +90caacd900ffbc1cc1dd8810362da5cb frame00000023 +ad4715b8a068e579e2ae03546c2f0aa9 frame00000024 +132ecb27bf35709ce591858156a0098f frame00000025 +d97f4f6d70dc72f5d9fd5081f6b051f8 frame00000026 +811e5b31f2d60e7cc8c991d1af04abaa frame00000027 +de271488d5511b46f74106b72ceedf0b frame00000028 +b0a0462b395ac48633e292b698ada97b frame00000029 +4c7107c2c371f18611e952784e145feb frame00000030 +8a211f5fdf3750b5ee6f1539f558881e frame00000031 +cb4e0573f1ead5feaa5989c375f71ba2 frame00000032 +29c07def56ff310f79f9434efd34c422 frame00000033 +18a4297e3bdc96e42e707af5842f270d frame00000034 +4d31d52122a0e360517c556d1baf1749 frame00000035 +e2a366540a2d86669794b2fd74675c5e frame00000036 +ae85389502d061a80c0ecde8c52b8db5 frame00000037 +b911cbb60f65296c4e592f0476138443 frame00000038 +cf3f08916374de1db0c0dfee900c4f3c frame00000039 +505b4f9efe47c1f8928d4a15e6c0c248 frame00000040 +0b9c4a907963563a2092473b2cf2a463 frame00000041 +24243979d737ab086c1dd07070b007a7 frame00000042 +74aca855c7bb7d55c0409c01e0b5ba1f frame00000043 +e260e9864e7d6a9bfb676226289313de frame00000044 +83cb3f7423ac37be4d468105b58ff135 frame00000045 +a4d52ab745f8fed4439841ee40fb6066 frame00000046 +7da116886035654a6db057e933f40259 frame00000047 +748314913fc6c2901300db469857df8b frame00000048 +f833dbd3d04e72de783fe510f65a3b2a frame00000049 +1c962c7cd915bcd6a5945d02d2924b6d frame00000050 +c5ad6735077e0ee7275e71ee108bf724 frame00000051 +7f4cecd54feee455b8a11d973903b2db frame00000052 +19b3f0cdce407f996d8c4ba969dd1dfd frame00000053 +2c97813bd37123e47268bb820c9eac70 frame00000054 +7c52d8ed55bdae0391e892229e88bb96 frame00000055 +d26e735c9c23ddfb2dc94cf60d08b7aa frame00000056 +cc8ea679218fd188cdd707679c9ca128 frame00000057 +8bab89f2aa57c4109cf885d5ae69b42c frame00000058 +53d3f128fda2a64a9840684e33fda7c9 frame00000059 +802df90e09f74d8315302b189f157ffd frame00000060 +6b62a3bafddc02db15ad870f1ddd2556 frame00000061 +2e875f41c80139a7ccda8953d9d6313c frame00000062 +9e8c42d95fd21ec56a70385df1a77681 frame00000063 +3a6b44d3267c8304ba12f4e92db45feb frame00000064 +f206fa51f9c7fa60fe4152395038026e frame00000065 +fbdd1b2e8a464ca0b920e764d2e77007 frame00000066 +b200f05830d212dfd1352c9448895213 frame00000067 +585e3b2b1459e2fff9752103eb93d506 frame00000068 +c788fbc31d32b6ee443a175291e6af58 frame00000069 +2c84b466ec26fd926748b4a15aec9aed frame00000070 +ef34db9405a11d571a4a1a3e57e47c72 frame00000071 +48e7181711cf98fe16032acf938ce38c frame00000072 +e60909c5f82815d565c85b402b12088e frame00000073 +f41a0228de73a80f428e1f6739d7fb07 frame00000074 +6fe3433f7dc5309206b86b02a770ac99 frame00000075 +b8572a4b2f2fc7bc9f28cbf6349b180a frame00000076 +58747a9e757db8ecc0846825c96b3520 frame00000077 +3cac738b54cc9be927db862d2a53aec4 frame00000078 +c06304a44277bd2eb9fbca5ed63190cb frame00000079 +acfcb26c396bf24c5bf45dcf4a1880d8 frame00000080 +d54e867de63c91c03bdd3194ec60bc68 frame00000081 +566bd9340d61178afc1d348315d1af16 frame00000082 +04f4dfd61f76bd36c40219e84d7ba0e1 frame00000083 +fe47fef2805827860e37fa608fb31bf7 frame00000084 +7b291fad563c1243b45038affc5370e8 frame00000085 +d13c59845a7a7d007f95f6b627e2952b frame00000086 +0932e97b8744d81f2210965a38de84dc frame00000087 +f2ed965856500c2ee94542cfd052459e frame00000088 +81b63ca03ac0a6522733093d145f822c frame00000089 +6cb3252bab4da40cf23e185cda2756bb frame00000090 +861363037552a7eea0bf4b9c8a6dce81 frame00000091 +026abaffe131621a012b62385484a139 frame00000092 +161b5a25d07479dcc01975d6153b335a frame00000093 +9209c0c0de6fc5f5fa21a6a929d1a512 frame00000094 +d4cae1bfc07b288a8536704cf6f8ee2f frame00000095 +cf6e2cf23e617371ba9b091e15200cd6 frame00000096 +4142d5aeb2ac5c1f8c0bfaef125118eb frame00000097 +6fb17a901680d9913c48f21607b116b6 frame00000098 +67956e6c582f41767ac73c688d154482 frame00000099 +4487e780ca7b1956d8780950aed03808 frame00000100 +c186cd14f426e245afa9b10b46ffef3f frame00000101 +94891f154edecdf894823f43afd14e69 frame00000102 +c8d1c48467367084b6419e37071d5a3c frame00000103 +86be94563db6dbe9fc2ddbab1b9427fa frame00000104 +1e38704977f7872eb7c2be6860d6dfe4 frame00000105 +16bb3226287d9bd5b794141fd1def1f2 frame00000106 +487657b7c7bae05a02d9e4c1c6ebc6bc frame00000107 +d9c7603da4f4cdea651496a7ba5c6d01 frame00000108 +bb462f8b64655839c9728e35d3397421 frame00000109 +cef6d1e73b1a65b1c848a342cba1784d frame00000110 +2cbc20c2792ae52e3a33360b13864f3a frame00000111 +4052651393d12979beb412b896f72cbc frame00000112 +6e0e834bea4e150106832426bd52da0c frame00000113 +98ed54512634137415c3db11e5c3541d frame00000114 +32d19ea8cdcf53ecc7abf41a06e47452 frame00000115 +ccde6eb6303aa9c1c4303a25a5f1ca76 frame00000116 +5f8d54ef64c256de8e9b1f3cba85be8d frame00000117 +75ccb65ce9b8d8ef96b8ca79548e4b91 frame00000118 +55e9cfd856d6bf96eb4cd298e06f9373 frame00000119 +4489d28c10b0dbb60f9b02be06201009 frame00000120 +2e7488772c8169a06fdfd730b810eaa0 frame00000121 +0cb0e97baf3df6dfd201245d6bb6ca3f frame00000122 +d20a1be9ba5969b66ea241976cb40cef frame00000123 +f8b9b81ec12934bcad653f147959b4fc frame00000124 +7cb285df3845526ad785a5cfd5b20a87 frame00000125 +35aa21c02e7b65d5eeca8a9c5f25cc89 frame00000126 +b3c451ef8a8bdd7fe1d69e751f02e688 frame00000127 +12150da10dbb9d55b192f51913b043fa frame00000128 +1839a6f5d44c056fe26aafb54b1bc4f4 frame00000129 +1b5526c25927c1b7deb67176c6dbfa5f frame00000130 +208b4d374c891ff75f998883f4c70ba8 frame00000131 +0793cf42cba14b6ae1b9fe22e49a9853 frame00000132 +a7bf5c63ad987fe31b8773a639ae2caa frame00000133 +68ac536106a3c25d7149def4a5270ca1 frame00000134 +1ddde5ea42df0b3fc56fc98ce9141c26 frame00000135 +f17276b16699690b42fcbdcd47c807b6 frame00000136 +665a469d221d475f77a2f92a30f5d4d0 frame00000137 +01327457962436cc246e11c7d3cd4f76 frame00000138 +91ab04c7b2b32e258f178867dcf6813e frame00000139 +bb65cc0c6b76fd6a515fd9d82633e811 frame00000140 +66d158f555786867c8f7d254a8c9765a frame00000141 +540c983fb75317afa41d4c0c2d4318b6 frame00000142 +a673fbcff3cb877a07ad6971d8dcc20c frame00000143 +5e75af5ad8c7f05f09ab4764db3b3eb7 frame00000144 +6cf91ee2ffc24ab651917e558614e86c frame00000145 +287c6730f05fc5a3948a154851029fb1 frame00000146 +70853185054276d93c2888ae3601798b frame00000147 +7ec025557fe9c975932c392b14995a5b frame00000148 +49c297e9d0e1fa18554cd6acd08ff770 frame00000149 +3e2ad5a41b2a1e777c6e728ab54e9f3f frame00000150 +c894c575d0c88f51e259a0cd0d146cb9 frame00000151 +2c385079745314bcb4927b2a88765648 frame00000152 +12e0fb514a9197042ba2dc8347201653 frame00000153 +8bbfae51405f9357ace3c7a6534a8dfa frame00000154 +50929e022e283a18d2e2a70ac03001a3 frame00000155 +0266174ce06a22594c2eaab13b309585 frame00000156 +b554a5aa388fa78d3581b7fda476305f frame00000157 +9641dd22cd7f9b3fc70dde70e7f3b93a frame00000158 +3e7f7ca9fc24c476e4173692be1b5549 frame00000159 +53029fbeda8c51f88ccdb1ac5c24d92c frame00000160 +6ff18d5bbab208c4a0a64547ada884b6 frame00000161 +c08f6f1200c9cb65621d26e7d848a9d9 frame00000162 +fff7a576b6b7ffe9be7074af3e4e63bf frame00000163 +c123f18e0c4b027cf67abc303076a415 frame00000164 +b2a8816ffd3de7377c6d99a9837e6b69 frame00000165 +145a05018de7a7a2c3a9aa4d78c5c5ed frame00000166 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/dxa/meetsquid.dxa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/dxa/meetsquid.dxa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/dxa/meetsquid.dxa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/dxa/meetsquid.dxa.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,444 @@ +060bebbcef4f0de031da46682a71a28b frame00000000 +060bebbcef4f0de031da46682a71a28b frame00000001 +d7d1933799635026a61c9fbfb99014e9 frame00000002 +d7d1933799635026a61c9fbfb99014e9 frame00000003 +4f3ba5807a7bfb0d19237e4d4f9cf95f frame00000004 +4f3ba5807a7bfb0d19237e4d4f9cf95f frame00000005 +477736ae55bb969ca778335d86c5270b frame00000006 +477736ae55bb969ca778335d86c5270b frame00000007 +ce1031a9c0c847e8648a26c2995737bd frame00000008 +ce1031a9c0c847e8648a26c2995737bd frame00000009 +3a399b0302f3976b6ed46a4ca05b97bd frame00000010 +3a399b0302f3976b6ed46a4ca05b97bd frame00000011 +e40ea63b3b1acd7b16ef6e70d4009012 frame00000012 +e40ea63b3b1acd7b16ef6e70d4009012 frame00000013 +ff7cc873c4568e338b893b3a369d8e56 frame00000014 +ff7cc873c4568e338b893b3a369d8e56 frame00000015 +769a99f3d2d699ae883de3238b82d4f0 frame00000016 +769a99f3d2d699ae883de3238b82d4f0 frame00000017 +f8badd892fc60f0af18df23209cf570c frame00000018 +f8badd892fc60f0af18df23209cf570c frame00000019 +531b2c6babab1785d0db30f69cfa5e7d frame00000020 +531b2c6babab1785d0db30f69cfa5e7d frame00000021 +c906822d8ae9774d67874d344aaeb1e7 frame00000022 +c906822d8ae9774d67874d344aaeb1e7 frame00000023 +58668977d66596d380477b620adbfe48 frame00000024 +58668977d66596d380477b620adbfe48 frame00000025 +89f0e8f3aeb3f9b433850f301d06de36 frame00000026 +89f0e8f3aeb3f9b433850f301d06de36 frame00000027 +0be451083d65003d9624aceca45665b3 frame00000028 +0be451083d65003d9624aceca45665b3 frame00000029 +97415851c7e7d0ed5f28ccd5a2354743 frame00000030 +97415851c7e7d0ed5f28ccd5a2354743 frame00000031 +b7025f47189b1a448db2fe8ce85af9d0 frame00000032 +b7025f47189b1a448db2fe8ce85af9d0 frame00000033 +4376e785590fd9a513ba3cbd2f50718f frame00000034 +4376e785590fd9a513ba3cbd2f50718f frame00000035 +f79459573f6fa4a40bfc84a308f2ec68 frame00000036 +f79459573f6fa4a40bfc84a308f2ec68 frame00000037 +7586b4c962204477ae37d09a8e52175e frame00000038 +7586b4c962204477ae37d09a8e52175e frame00000039 +7be94eaa5024802c47c5c7c14e7e8d2a frame00000040 +7be94eaa5024802c47c5c7c14e7e8d2a frame00000041 +7b958424fe570f134ce6410e9d8cd2a5 frame00000042 +7b958424fe570f134ce6410e9d8cd2a5 frame00000043 +4811a6174ff4bd2ecdc9714e635c98eb frame00000044 +4811a6174ff4bd2ecdc9714e635c98eb frame00000045 +4811a6174ff4bd2ecdc9714e635c98eb frame00000046 +4811a6174ff4bd2ecdc9714e635c98eb frame00000047 +4811a6174ff4bd2ecdc9714e635c98eb frame00000048 +4811a6174ff4bd2ecdc9714e635c98eb frame00000049 +afccded20eb328c18374fc9d8d6d7e19 frame00000050 +afccded20eb328c18374fc9d8d6d7e19 frame00000051 +07ed7b7e53aa10be476b2ed57d58c7e3 frame00000052 +07ed7b7e53aa10be476b2ed57d58c7e3 frame00000053 +7935175b172ba9968f1aae96f6b301ef frame00000054 +7935175b172ba9968f1aae96f6b301ef frame00000055 +21189b6dbb4e948ec60dd8f5b64e59f1 frame00000056 +21189b6dbb4e948ec60dd8f5b64e59f1 frame00000057 +0905ffac63733ab85922a816986aa318 frame00000058 +0905ffac63733ab85922a816986aa318 frame00000059 +b23580b5c0dc662c1ecb731ad97641b9 frame00000060 +b23580b5c0dc662c1ecb731ad97641b9 frame00000061 +b23580b5c0dc662c1ecb731ad97641b9 frame00000062 +b23580b5c0dc662c1ecb731ad97641b9 frame00000063 +00eb480d50a844a06f1cacdb4619a576 frame00000064 +00eb480d50a844a06f1cacdb4619a576 frame00000065 +baefe3840a9b7dcc92821f3c3dfd3fbf frame00000066 +baefe3840a9b7dcc92821f3c3dfd3fbf frame00000067 +92926734473c8e947d26bb625d1148cc frame00000068 +92926734473c8e947d26bb625d1148cc frame00000069 +92926734473c8e947d26bb625d1148cc frame00000070 +92926734473c8e947d26bb625d1148cc frame00000071 +92926734473c8e947d26bb625d1148cc frame00000072 +92926734473c8e947d26bb625d1148cc frame00000073 +92926734473c8e947d26bb625d1148cc frame00000074 +92926734473c8e947d26bb625d1148cc frame00000075 +bf41520c47d17a696aaa09fcb9981b5f frame00000076 +bf41520c47d17a696aaa09fcb9981b5f frame00000077 +99be9ad80e14c5f8a80c163c968fe5db frame00000078 +99be9ad80e14c5f8a80c163c968fe5db frame00000079 +99be9ad80e14c5f8a80c163c968fe5db frame00000080 +99be9ad80e14c5f8a80c163c968fe5db frame00000081 +99be9ad80e14c5f8a80c163c968fe5db frame00000082 +99be9ad80e14c5f8a80c163c968fe5db frame00000083 +99be9ad80e14c5f8a80c163c968fe5db frame00000084 +99be9ad80e14c5f8a80c163c968fe5db frame00000085 +c3890c2b23df15b365da8c28fd69a2de frame00000086 +c3890c2b23df15b365da8c28fd69a2de frame00000087 +d05c89279603ea600ad647c6cd4699b6 frame00000088 +d05c89279603ea600ad647c6cd4699b6 frame00000089 +d05c89279603ea600ad647c6cd4699b6 frame00000090 +d05c89279603ea600ad647c6cd4699b6 frame00000091 +d05c89279603ea600ad647c6cd4699b6 frame00000092 +d05c89279603ea600ad647c6cd4699b6 frame00000093 +d05c89279603ea600ad647c6cd4699b6 frame00000094 +d05c89279603ea600ad647c6cd4699b6 frame00000095 +59f76560cd6b7d4d0b27cd6463ed7ecf frame00000096 +59f76560cd6b7d4d0b27cd6463ed7ecf frame00000097 +34563614ce9d0520089c994556c5edc2 frame00000098 +34563614ce9d0520089c994556c5edc2 frame00000099 +0b09a2fbec426d7015e3309101c73f58 frame00000100 +0b09a2fbec426d7015e3309101c73f58 frame00000101 +cc5c96feb69973b1e40984b8c070a824 frame00000102 +cc5c96feb69973b1e40984b8c070a824 frame00000103 +3fa2c375423e7615029f85e18c3c1703 frame00000104 +3fa2c375423e7615029f85e18c3c1703 frame00000105 +307aec0958e250fdd677916838dc25ae frame00000106 +307aec0958e250fdd677916838dc25ae frame00000107 +d363ce0e664a8dbfd43df6ebeede5096 frame00000108 +d363ce0e664a8dbfd43df6ebeede5096 frame00000109 +045fe0846c0c883df2774cbbc50ee558 frame00000110 +045fe0846c0c883df2774cbbc50ee558 frame00000111 +0b1321479c0d644d01676719a03e9b3f frame00000112 +0b1321479c0d644d01676719a03e9b3f frame00000113 +56d1d017588bf90f668a0603f39fb4cb frame00000114 +56d1d017588bf90f668a0603f39fb4cb frame00000115 +2f2ba73f6f2149ec3f6ab06e98d0d068 frame00000116 +2f2ba73f6f2149ec3f6ab06e98d0d068 frame00000117 +7e7e8a9e94a923a5afb805ce3348ebf5 frame00000118 +7e7e8a9e94a923a5afb805ce3348ebf5 frame00000119 +c56fab2c514d7ddf305c1fdae2b7d77c frame00000120 +c56fab2c514d7ddf305c1fdae2b7d77c frame00000121 +4ce510492b0d9a2776b99ac2b1faeb16 frame00000122 +4ce510492b0d9a2776b99ac2b1faeb16 frame00000123 +836d05a9bd8f2417d9f71d470004e657 frame00000124 +836d05a9bd8f2417d9f71d470004e657 frame00000125 +f95c64633e414ca5b37cf0ea0fd4111b frame00000126 +f95c64633e414ca5b37cf0ea0fd4111b frame00000127 +d4cbad1c3aedc1954f4b1912353db81f frame00000128 +d4cbad1c3aedc1954f4b1912353db81f frame00000129 +0c7214e71a81ab09323fe9f3b5e7bed7 frame00000130 +0c7214e71a81ab09323fe9f3b5e7bed7 frame00000131 +d20b0384a156da8cb0ac8c746bfde258 frame00000132 +d20b0384a156da8cb0ac8c746bfde258 frame00000133 +3e3d0d115b8291e8f7d3cadc6f3a7b86 frame00000134 +3e3d0d115b8291e8f7d3cadc6f3a7b86 frame00000135 +8fcdd0264af55f55d34cb98dd31e6e17 frame00000136 +8fcdd0264af55f55d34cb98dd31e6e17 frame00000137 +18f641b97cbae52a6dbd4cf3fda98431 frame00000138 +18f641b97cbae52a6dbd4cf3fda98431 frame00000139 +28668ea9f8bfff420ee03b1bc33a9326 frame00000140 +28668ea9f8bfff420ee03b1bc33a9326 frame00000141 +5686a35e4769bbccd5198053a68e17fb frame00000142 +5686a35e4769bbccd5198053a68e17fb frame00000143 +68cfbd04f24b985cd8ecc271a66398a6 frame00000144 +68cfbd04f24b985cd8ecc271a66398a6 frame00000145 +7219f9619c31f1b6cb31f5d3dd82c11b frame00000146 +7219f9619c31f1b6cb31f5d3dd82c11b frame00000147 +93608c81e555d022487bb86d45de6949 frame00000148 +93608c81e555d022487bb86d45de6949 frame00000149 +2420bbc0afbe86304ec13e79230d7ea0 frame00000150 +2420bbc0afbe86304ec13e79230d7ea0 frame00000151 +ade03f1d55936028510d038a5e9aa68b frame00000152 +ade03f1d55936028510d038a5e9aa68b frame00000153 +4cb1ac1f7bbf9cc24220aa6537566a6b frame00000154 +4cb1ac1f7bbf9cc24220aa6537566a6b frame00000155 +e701fdb8286ac78a88948324da0bc211 frame00000156 +e701fdb8286ac78a88948324da0bc211 frame00000157 +eeec0693f67889791c48c23a76a4fa77 frame00000158 +eeec0693f67889791c48c23a76a4fa77 frame00000159 +eeec0693f67889791c48c23a76a4fa77 frame00000160 +eeec0693f67889791c48c23a76a4fa77 frame00000161 +d820f0d321221368625d84eb4be3bdaf frame00000162 +d820f0d321221368625d84eb4be3bdaf frame00000163 +04965000481b3f2d370c001c24dd9400 frame00000164 +04965000481b3f2d370c001c24dd9400 frame00000165 +49e9d3b0a99ae0a291fd7b1789b3c580 frame00000166 +49e9d3b0a99ae0a291fd7b1789b3c580 frame00000167 +90688df0082543f9ceb2f7506455cc86 frame00000168 +90688df0082543f9ceb2f7506455cc86 frame00000169 +4b5bf971eb1e85909522f0f47ad3b1b3 frame00000170 +4b5bf971eb1e85909522f0f47ad3b1b3 frame00000171 +76a20065aaa6c95abe892659ce61d4b1 frame00000172 +76a20065aaa6c95abe892659ce61d4b1 frame00000173 +98d25e1fac4a787707dc9ca6d264a535 frame00000174 +98d25e1fac4a787707dc9ca6d264a535 frame00000175 +5a9c3a547b919cf9a4f243e4826454a6 frame00000176 +5a9c3a547b919cf9a4f243e4826454a6 frame00000177 +f21661e62c6acbc26bdc3919f8f7a133 frame00000178 +f21661e62c6acbc26bdc3919f8f7a133 frame00000179 +324ca347f7df37a6edd3d336de397cfe frame00000180 +324ca347f7df37a6edd3d336de397cfe frame00000181 +6cf087c82ba7cb163c774fd8f1825e97 frame00000182 +6cf087c82ba7cb163c774fd8f1825e97 frame00000183 +f7ae1a003fe66c7b9a70563923ee901c frame00000184 +f7ae1a003fe66c7b9a70563923ee901c frame00000185 +7f7314d77067cef7176fd3163e68b555 frame00000186 +7f7314d77067cef7176fd3163e68b555 frame00000187 +243d1f5af7bfb0c36ae0e740beb6b1ed frame00000188 +243d1f5af7bfb0c36ae0e740beb6b1ed frame00000189 +c73a8af247c7e9bdefc96945ed5762cf frame00000190 +c73a8af247c7e9bdefc96945ed5762cf frame00000191 +eb6ce80373dd6f7a99deff0d1107b182 frame00000192 +eb6ce80373dd6f7a99deff0d1107b182 frame00000193 +1c658b4f20c6e360e17f845757d11f8f frame00000194 +1c658b4f20c6e360e17f845757d11f8f frame00000195 +39c774f6a6d6508c66e4915ea38a6cd1 frame00000196 +39c774f6a6d6508c66e4915ea38a6cd1 frame00000197 +a35b1e7f72c911010475c8234d3d2162 frame00000198 +a35b1e7f72c911010475c8234d3d2162 frame00000199 +dfa261a49ea894b89cdd2545bd2c2fe6 frame00000200 +dfa261a49ea894b89cdd2545bd2c2fe6 frame00000201 +b7f1d09a269a1eefc536c69ad0f08b8f frame00000202 +b7f1d09a269a1eefc536c69ad0f08b8f frame00000203 +00b45b1670cffd3351f247076e3f37e5 frame00000204 +00b45b1670cffd3351f247076e3f37e5 frame00000205 +ee96165d6b9260381704ba6a0aabf440 frame00000206 +ee96165d6b9260381704ba6a0aabf440 frame00000207 +a4dea20ceda7f83fe43b9c867d6ae90c frame00000208 +a4dea20ceda7f83fe43b9c867d6ae90c frame00000209 +437f831d24d44a9e14d761c7a1e83fdb frame00000210 +437f831d24d44a9e14d761c7a1e83fdb frame00000211 +e7c76f9f98bf8fba764b5348038499cd frame00000212 +e7c76f9f98bf8fba764b5348038499cd frame00000213 +33269e02f5852712fef034fd0ee0fcc9 frame00000214 +33269e02f5852712fef034fd0ee0fcc9 frame00000215 +66462d9b04302c6d81fe1a3127a8ab96 frame00000216 +66462d9b04302c6d81fe1a3127a8ab96 frame00000217 +c123d269d7535b5894903244ca611c34 frame00000218 +c123d269d7535b5894903244ca611c34 frame00000219 +d08cf081182b19b879ce597f665e907e frame00000220 +d08cf081182b19b879ce597f665e907e frame00000221 +c32bc5a4f2dc248551b50126dfdf3a28 frame00000222 +c32bc5a4f2dc248551b50126dfdf3a28 frame00000223 +c521f2ce70d023f09acf5d768e713b4a frame00000224 +c521f2ce70d023f09acf5d768e713b4a frame00000225 +63fe37ee8c8ea84dbf4aaf37a8d6bcb1 frame00000226 +63fe37ee8c8ea84dbf4aaf37a8d6bcb1 frame00000227 +938b22078f6bd6c4b617c5abeb8b581a frame00000228 +938b22078f6bd6c4b617c5abeb8b581a frame00000229 +a1a3c7fb6b8d92e1aafbfe7c611efa03 frame00000230 +a1a3c7fb6b8d92e1aafbfe7c611efa03 frame00000231 +f47e2000923be82b28f2c4498e7cce7f frame00000232 +f47e2000923be82b28f2c4498e7cce7f frame00000233 +bcf92f96e64f63843a3c7b729a6f8b82 frame00000234 +bcf92f96e64f63843a3c7b729a6f8b82 frame00000235 +2d245f8706431caf2bc20430d3f466e8 frame00000236 +2d245f8706431caf2bc20430d3f466e8 frame00000237 +d38721b72981c0dc8c2a2529264e2b48 frame00000238 +d38721b72981c0dc8c2a2529264e2b48 frame00000239 +f068f5fde9f5b7494ac560077465bb23 frame00000240 +f068f5fde9f5b7494ac560077465bb23 frame00000241 +2e95bcadf329f5e949de3a21dacbb4b8 frame00000242 +2e95bcadf329f5e949de3a21dacbb4b8 frame00000243 +73c022a3d73d018b31383b183041f4ff frame00000244 +73c022a3d73d018b31383b183041f4ff frame00000245 +a3f7731059e3b4a0374105add5094f53 frame00000246 +a3f7731059e3b4a0374105add5094f53 frame00000247 +55d3e4651294ded1c4c664c02e729204 frame00000248 +55d3e4651294ded1c4c664c02e729204 frame00000249 +91ec88a7833ce580ef7737f928842ee7 frame00000250 +91ec88a7833ce580ef7737f928842ee7 frame00000251 +77cd5309bbc0d49e87016e0bb32e01f0 frame00000252 +77cd5309bbc0d49e87016e0bb32e01f0 frame00000253 +bf4c0a6a0a03fcc707274e348ebf8ff2 frame00000254 +bf4c0a6a0a03fcc707274e348ebf8ff2 frame00000255 +1495b7767f527bfaf5da92a8aa7436c2 frame00000256 +1495b7767f527bfaf5da92a8aa7436c2 frame00000257 +4f2d1a5c1b4eae468b54c4bc0a4a6dac frame00000258 +4f2d1a5c1b4eae468b54c4bc0a4a6dac frame00000259 +1495b7767f527bfaf5da92a8aa7436c2 frame00000260 +1495b7767f527bfaf5da92a8aa7436c2 frame00000261 +6a2067a30f0a9fbf13ec31cf31250e11 frame00000262 +6a2067a30f0a9fbf13ec31cf31250e11 frame00000263 +2eda8f035723283a0d184eb56e48ca17 frame00000264 +2eda8f035723283a0d184eb56e48ca17 frame00000265 +785c25960027d18092cafddde6aee39b frame00000266 +785c25960027d18092cafddde6aee39b frame00000267 +785c25960027d18092cafddde6aee39b frame00000268 +785c25960027d18092cafddde6aee39b frame00000269 +53411ed6f71f57a90371496b89a17c0c frame00000270 +53411ed6f71f57a90371496b89a17c0c frame00000271 +f9650f36518b30b541459a3ff2455162 frame00000272 +f9650f36518b30b541459a3ff2455162 frame00000273 +f9650f36518b30b541459a3ff2455162 frame00000274 +f9650f36518b30b541459a3ff2455162 frame00000275 +f9650f36518b30b541459a3ff2455162 frame00000276 +f9650f36518b30b541459a3ff2455162 frame00000277 +785c25960027d18092cafddde6aee39b frame00000278 +785c25960027d18092cafddde6aee39b frame00000279 +785c25960027d18092cafddde6aee39b frame00000280 +785c25960027d18092cafddde6aee39b frame00000281 +785c25960027d18092cafddde6aee39b frame00000282 +785c25960027d18092cafddde6aee39b frame00000283 +ab334f5bba2abb94be149afeeabbf38c frame00000284 +ab334f5bba2abb94be149afeeabbf38c frame00000285 +019bcb33ea692d6913a3db7cd86d12c8 frame00000286 +019bcb33ea692d6913a3db7cd86d12c8 frame00000287 +d66ed0f66b9c5c26b883aa57471f323a frame00000288 +d66ed0f66b9c5c26b883aa57471f323a frame00000289 +789c7bac0bbdaa67b30f5845ab804d27 frame00000290 +789c7bac0bbdaa67b30f5845ab804d27 frame00000291 +789c7bac0bbdaa67b30f5845ab804d27 frame00000292 +789c7bac0bbdaa67b30f5845ab804d27 frame00000293 +23e3f0294619f37482c93e4b080c41d5 frame00000294 +23e3f0294619f37482c93e4b080c41d5 frame00000295 +0cd38db6d73aea658b5e073397ae4b80 frame00000296 +0cd38db6d73aea658b5e073397ae4b80 frame00000297 +6d73e2f8c9f2e35a32ee190bdc9900bf frame00000298 +6d73e2f8c9f2e35a32ee190bdc9900bf frame00000299 +127ed5b44b9e1cdefc09589d9e006343 frame00000300 +127ed5b44b9e1cdefc09589d9e006343 frame00000301 +94619c4395e6869c003614e517f4294b frame00000302 +94619c4395e6869c003614e517f4294b frame00000303 +5bf28bf28de2b15c50aa6b6faabb2b19 frame00000304 +5bf28bf28de2b15c50aa6b6faabb2b19 frame00000305 +9acba566bde6bdc7643fab03503e989f frame00000306 +9acba566bde6bdc7643fab03503e989f frame00000307 +cd28b3ae401c4a9d3942bb704f99850e frame00000308 +cd28b3ae401c4a9d3942bb704f99850e frame00000309 +ca1c1bb94e38669b0b614557b0ff209e frame00000310 +ca1c1bb94e38669b0b614557b0ff209e frame00000311 +6ef8eb1857c2e586b638ddbadcac6b60 frame00000312 +6ef8eb1857c2e586b638ddbadcac6b60 frame00000313 +e9c57844e425b504e42127073840ad56 frame00000314 +e9c57844e425b504e42127073840ad56 frame00000315 +4f6b67f37fd5e1898a0bf2e1f1e878e7 frame00000316 +4f6b67f37fd5e1898a0bf2e1f1e878e7 frame00000317 +405ebfd83ed131fd056436905d3c6744 frame00000318 +405ebfd83ed131fd056436905d3c6744 frame00000319 +f8268c4a7a6842f8a61ba6fecd203242 frame00000320 +f8268c4a7a6842f8a61ba6fecd203242 frame00000321 +20928ac198e0a0edad35c34438c9d483 frame00000322 +20928ac198e0a0edad35c34438c9d483 frame00000323 +18450288d8f08b0956fa82762e462684 frame00000324 +18450288d8f08b0956fa82762e462684 frame00000325 +614f031c5900651ede546f1de765f3b3 frame00000326 +614f031c5900651ede546f1de765f3b3 frame00000327 +65183eed877eac2e7078d7ae598b4d47 frame00000328 +65183eed877eac2e7078d7ae598b4d47 frame00000329 +d06cbd818c555cf26de8376291939ecf frame00000330 +d06cbd818c555cf26de8376291939ecf frame00000331 +2064da2829b8f1cc2fc2661aac917b4f frame00000332 +2064da2829b8f1cc2fc2661aac917b4f frame00000333 +83e43b0869695157c1ddd67719cad794 frame00000334 +83e43b0869695157c1ddd67719cad794 frame00000335 +69ae9a74d030c0b14441a94d83ecf2e4 frame00000336 +69ae9a74d030c0b14441a94d83ecf2e4 frame00000337 +3e440b98432816a1c5e1811945826e1d frame00000338 +3e440b98432816a1c5e1811945826e1d frame00000339 +dbbc7edc361d6338bc8389b551275e13 frame00000340 +dbbc7edc361d6338bc8389b551275e13 frame00000341 +9063dcd7d70c975dc03a429eff31c86c frame00000342 +9063dcd7d70c975dc03a429eff31c86c frame00000343 +81219ae0fbe18737313089fe295a9b1f frame00000344 +81219ae0fbe18737313089fe295a9b1f frame00000345 +fddf5187d58b261d4e380263a75d15e8 frame00000346 +fddf5187d58b261d4e380263a75d15e8 frame00000347 +0640a486983e75fab5ce55f773f2df85 frame00000348 +0640a486983e75fab5ce55f773f2df85 frame00000349 +8cc7c8caee8acd2ba846cb116a198ef0 frame00000350 +8cc7c8caee8acd2ba846cb116a198ef0 frame00000351 +78d89a2999bc872211543fb7bf100f27 frame00000352 +78d89a2999bc872211543fb7bf100f27 frame00000353 +f1e1fecb6aa266755dfbfdd43ab07fcd frame00000354 +f1e1fecb6aa266755dfbfdd43ab07fcd frame00000355 +d33d1d3721b24a64e291ecd032913ceb frame00000356 +d33d1d3721b24a64e291ecd032913ceb frame00000357 +8bdf4e69fcdba37bab91004c667ff11a frame00000358 +8bdf4e69fcdba37bab91004c667ff11a frame00000359 +80da2e4e41ed95d50d263fa57f8bf789 frame00000360 +80da2e4e41ed95d50d263fa57f8bf789 frame00000361 +eaa07b0a338992341c0b9d4f42a2a757 frame00000362 +eaa07b0a338992341c0b9d4f42a2a757 frame00000363 +650f59b9b4344db91bc75d54c3dca08e frame00000364 +650f59b9b4344db91bc75d54c3dca08e frame00000365 +ee12bcdae9752d0e5e62f0c417cc7875 frame00000366 +ee12bcdae9752d0e5e62f0c417cc7875 frame00000367 +234d30c9ffea27e2f74b91f1091f8918 frame00000368 +234d30c9ffea27e2f74b91f1091f8918 frame00000369 +e1d495ca3b8a1c8528899838818308d0 frame00000370 +e1d495ca3b8a1c8528899838818308d0 frame00000371 +bf20a552c558b1c2b4edf49f8e092b8a frame00000372 +bf20a552c558b1c2b4edf49f8e092b8a frame00000373 +3756e26b5d518c1456063f874742e1de frame00000374 +3756e26b5d518c1456063f874742e1de frame00000375 +eec9d4101c2e691c199d24c3e56438df frame00000376 +eec9d4101c2e691c199d24c3e56438df frame00000377 +eec9d4101c2e691c199d24c3e56438df frame00000378 +eec9d4101c2e691c199d24c3e56438df frame00000379 +7925373faedb02d03536fd5c3ee880f8 frame00000380 +7925373faedb02d03536fd5c3ee880f8 frame00000381 +25bc1d5c2ea62ea049e9ddc5f421fe50 frame00000382 +25bc1d5c2ea62ea049e9ddc5f421fe50 frame00000383 +f12856f6decdc2270e98d97ba041121b frame00000384 +f12856f6decdc2270e98d97ba041121b frame00000385 +472aec05c2dbcdecf04f0109ea2f0e84 frame00000386 +472aec05c2dbcdecf04f0109ea2f0e84 frame00000387 +38aa8892e9e61b7a8cf341e1c37f11f9 frame00000388 +38aa8892e9e61b7a8cf341e1c37f11f9 frame00000389 +ae4d3f7d612db14fc6c3f4ca76d39ba1 frame00000390 +ae4d3f7d612db14fc6c3f4ca76d39ba1 frame00000391 +de134772728232c7083283ec74c43111 frame00000392 +de134772728232c7083283ec74c43111 frame00000393 +a8ab737fc535dd0718cac0188beb7bd8 frame00000394 +a8ab737fc535dd0718cac0188beb7bd8 frame00000395 +71673018f41c395d5b19ca0a4e291d76 frame00000396 +71673018f41c395d5b19ca0a4e291d76 frame00000397 +12cdfd693487be3847ee2e3ba3ee7c39 frame00000398 +12cdfd693487be3847ee2e3ba3ee7c39 frame00000399 +b9550840552700baa8c70f8c25205206 frame00000400 +b9550840552700baa8c70f8c25205206 frame00000401 +cc3543988e71bdc6416494a233849393 frame00000402 +cc3543988e71bdc6416494a233849393 frame00000403 +3e9f85551cc59dcb8a68e59d8e7b4bf8 frame00000404 +3e9f85551cc59dcb8a68e59d8e7b4bf8 frame00000405 +20e63b5fa1d4e9e8165a033b44cd8fec frame00000406 +20e63b5fa1d4e9e8165a033b44cd8fec frame00000407 +226fc71a664a002b551df00eeb32df76 frame00000408 +226fc71a664a002b551df00eeb32df76 frame00000409 +cd1ef0569fb090eb6d4b9ef2dd88eb7b frame00000410 +cd1ef0569fb090eb6d4b9ef2dd88eb7b frame00000411 +a8f4b57ef862d39e343f9808fb943225 frame00000412 +a8f4b57ef862d39e343f9808fb943225 frame00000413 +bdce8070d1479697fc2d25642ca7f31b frame00000414 +bdce8070d1479697fc2d25642ca7f31b frame00000415 +b3a889beda31e185f534744f7aca38f2 frame00000416 +b3a889beda31e185f534744f7aca38f2 frame00000417 +b338f583e00139823fa5e612ca003856 frame00000418 +b338f583e00139823fa5e612ca003856 frame00000419 +657f7c68d6a35549ca06506b693ff1a1 frame00000420 +657f7c68d6a35549ca06506b693ff1a1 frame00000421 +5031f37d2ba3a352066029d6e39b904d frame00000422 +5031f37d2ba3a352066029d6e39b904d frame00000423 +22c556f6e8b5ac13c16115db45ff5a0d frame00000424 +22c556f6e8b5ac13c16115db45ff5a0d frame00000425 +ed99305ebad9fff78b9ebed9ec5799e3 frame00000426 +ed99305ebad9fff78b9ebed9ec5799e3 frame00000427 +55ca04cb461a2c1bec1f459d78009a4a frame00000428 +55ca04cb461a2c1bec1f459d78009a4a frame00000429 +f4a5e3833ddf789766528bc7b0007438 frame00000430 +f4a5e3833ddf789766528bc7b0007438 frame00000431 +dada5e6e73f9279498c054a7781c2fa5 frame00000432 +dada5e6e73f9279498c054a7781c2fa5 frame00000433 +79d811b18dc3c23d50da1df41424dd63 frame00000434 +79d811b18dc3c23d50da1df41424dd63 frame00000435 +371ea9deb7242501908de8743bab28c0 frame00000436 +371ea9deb7242501908de8743bab28c0 frame00000437 +371ea9deb7242501908de8743bab28c0 frame00000438 +371ea9deb7242501908de8743bab28c0 frame00000439 +a2c419c5f0610e9b9dfe6a50ebb655c8 frame00000440 +a2c419c5f0610e9b9dfe6a50ebb655c8 frame00000441 +270254885ed83b4a0739f24169eb3cd7 frame00000442 +270254885ed83b4a0739f24169eb3cd7 frame00000443 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/dxa/scummvm.dxa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/dxa/scummvm.dxa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/dxa/scummvm.dxa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/dxa/scummvm.dxa.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,12 @@ +b615c42e2509a9aa6b72f355ad1abfd3 frame00000000 +b615c42e2509a9aa6b72f355ad1abfd3 frame00000001 +0b073b0858f8b43f8c0949f22bea2285 frame00000002 +0b073b0858f8b43f8c0949f22bea2285 frame00000003 +17c084a50b19388e5f1c801072330b86 frame00000004 +17c084a50b19388e5f1c801072330b86 frame00000005 +00b7d406480d2351ba2c578e9ec34bad frame00000006 +00b7d406480d2351ba2c578e9ec34bad frame00000007 +9b068581d1a369ab96a73d984afabc13 frame00000008 +9b068581d1a369ab96a73d984afabc13 frame00000009 +edcb3c482ddbc5d3a935ffbcdf20cc3a frame00000010 +edcb3c482ddbc5d3a935ffbcdf20cc3a frame00000011 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/dxtory/dxtory_mic.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/dxtory/dxtory_mic.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/dxtory/dxtory_mic.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/dxtory/dxtory_mic.avi.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1 @@ +47f2ef338a2211e4e6e6b6db0547bc48 frame00000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-cmv/TITLE.CMV.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-cmv/TITLE.CMV.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-cmv/TITLE.CMV.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-cmv/TITLE.CMV.md5 2011-11-13 17:05:58.000000000 +0000 @@ -0,0 +1,194 @@ +c8fdb91590aebb13e3734998959ea956 frame00000000 +fc3643db417fd9d2c4eb63da7eaf77d2 frame00000001 +d9e34ba0af0cfd9bdae9d7463c56023f frame00000002 +4419c7a32e19b97c296fabd98426141d frame00000003 +49d2f33755e5621b898a66dad27b7e00 frame00000004 +b3d9b8223e3bccc4cddefbc73908c0a5 frame00000005 +705ef469b87b69126911eeb0d5be65b5 frame00000006 +46cca1f1da0ac351cda87653f247d138 frame00000007 +ea48e2795dde8f1e997c65947e813024 frame00000008 +786943b0bfe3d523086bb11d50c4c9bc frame00000009 +e4ba6f692a017cea1d460a2b4703e394 frame00000010 +a910c801242a8ec9b560f6f5d5f11e39 frame00000011 +822ac191ec7d8499c350217f5e068a15 frame00000012 +ceeaf032110ff273cc116db3d800881b frame00000013 +2f54af8ea237e088c13ad753dc4f64d0 frame00000014 +cd2acfc7ebc45ab6c52600d4683c003f frame00000015 +42e2d64889d0d4de7949dda0bb735d63 frame00000016 +f653486943321d70970d965217449b16 frame00000017 +0d28412ec74d591192d13191d7fcfcae frame00000018 +c8607de881aae4a5d0796609d4c9b138 frame00000019 +b310fb7170f958677f1cd232fa5f1c35 frame00000020 +7d5ec561c15db119a1e31628592ec091 frame00000021 +c2c672020d9ebc3e7889d9c9083629cf frame00000022 +d8e02f25f1f90b2f78f76979018cce6d frame00000023 +26bccadb1e59b8bdfd41c641a70122b9 frame00000024 +22b02a2bf4837396edf773306dc1ad0f frame00000025 +3e177fd9297a93bca6937d1071f6e984 frame00000026 +1f7aacaeb61a34729f5bc71b47c04906 frame00000027 +5cc0f25b7e4009a8eb002c27974dc43f frame00000028 +9721543f624b6aab859e534f6040f79b frame00000029 +2f11263cf9b5a27a34e062afc11ecc96 frame00000030 +0d2f1d968265cb9b9dcd36d868052a0a frame00000031 +51585f2cbefd7828face74c1072bc978 frame00000032 +d8ce8caceeaeff5007daf70210aef7f6 frame00000033 +cea076c739758970797036aed2347bb7 frame00000034 +c577d8d356764e5b02f8c4821161efff frame00000035 +24c698bd621afd9b818973d931d12733 frame00000036 +2e2cd4006b82b61b71b3147443aa0c2a frame00000037 +4d4443c4ffe76fad1357f5e3d3b259ba frame00000038 +b3c61990f9c268b9500224fc9172c301 frame00000039 +f6cc327ee4be77bcd4928309bcc3a831 frame00000040 +b297444843a3b30648e2bed4246da8ae frame00000041 +f9a2ce1dc2ed0554e29c00489088e85f frame00000042 +d051197ef024da83f804c4009b50cc5b frame00000043 +4561de29b91a3217637402f98ca260b9 frame00000044 +7936546f411ebdd7f445bd4e2ea86b63 frame00000045 +015a29b828514cceefc18eb080769263 frame00000046 +fd368caeaba150269c287b52f9672400 frame00000047 +71b6bfdd050fe3dcd07f1176ee70fcc2 frame00000048 +a8efe64e9de02f2eb1b7f5875140a9f3 frame00000049 +a3e5d895660c89e85b071ace53b8df63 frame00000050 +7eb5752c605f2093760a9cb7d55d9c2d frame00000051 +5183dc922c79a49767f3b56d9ccd07ed frame00000052 +ccdb481b6604b99abfe9d070d6295fe1 frame00000053 +d6c72f87e459a3911d66543b0e477bcd frame00000054 +3eca069c1b0819793af85da94bb2f030 frame00000055 +b3f74ef2280af0b88f9aefbefdbe3a3b frame00000056 +9dccf262e391df98e80cbbc41aec4d5c frame00000057 +61801a04612a8560850948e40409fd6c frame00000058 +8e7c8c6328acef2b5dad3edf364adfdf frame00000059 +9555df9bdc18e974e0bb84031132c50b frame00000060 +e34cdf7fd8ea93824139ca8e3a5bbaf7 frame00000061 +9beacfc5c901e65d21a7a33fd11acbd0 frame00000062 +4a081c6531920e1476e2f40d95995cd6 frame00000063 +92c7b9a66b4ff38dc650f6f7a16aa3fc frame00000064 +7ddb873b83cc157e20080e7ea7673478 frame00000065 +76dec588d6627a75235e5b37bc8ff58c frame00000066 +9f1e3021ce6033510328ead655e6f378 frame00000067 +d41373377233f851bf100be1684b7fa0 frame00000068 +479f64c0187dd5bc2757e1e462290638 frame00000069 +b14d64cb42e9f694993615d283bfab4d frame00000070 +31763bd5cf2e66081fcc8e95c23d0f5d frame00000071 +caf288807c17bfad2f141f08dac6a1ad frame00000072 +e8c002222f1cefd440bc80d3909e0114 frame00000073 +7ad39008734257b55ea08922cb020dde frame00000074 +80c81a2648c26f657ea22d6b7e90b734 frame00000075 +a080fd92d3aee8936a7010643b0b5c8a frame00000076 +58121788b16aaffd872075ed7dc24647 frame00000077 +dfbdd9cf8c2013563b4c1e08f90215db frame00000078 +905ab36e0c5fbb1db7cb62615758b7a6 frame00000079 +b22e03f3a207cb3d301d315a0f1462be frame00000080 +07fdd1e858486863502e7eb7b1caba93 frame00000081 +804ed064c077688fb4e67fbcde125fa4 frame00000082 +35e270b07537cc59831ad816e1602939 frame00000083 +5ce2b94ef450c140eedadf075b94c01b frame00000084 +3f81246a7a89e8f12f5a7d7f6d5ab2da frame00000085 +185194e2877ab1548f50527e0f3c66e0 frame00000086 +ae405a113409684560fef7909334d244 frame00000087 +4a01c8df6eee14ecfff774ef4c655bf3 frame00000088 +2b927727f5aec9e61a118fc28093823d frame00000089 +ad4eca2505a26eda4a2d5dd0f8081f9f frame00000090 +92be8e4fea29992714befa6d3ad0d8a0 frame00000091 +247b5c2aa99994d89e313363c82d83c3 frame00000092 +19047a127d88daa7f8a4f302f2db8bb8 frame00000093 +c277fb81d22f9c6efedb59ae5b1df12b frame00000094 +9cdfd1793e0ee9c91d230dcf7c3a2f22 frame00000095 +4290b682bbd1bf7ae20fc3f02179352b frame00000096 +4466b24bfe26c23f6dc31cdf626e9c6c frame00000097 +a1180dfc2810e8776c8f835ac251608e frame00000098 +31edab41a068011bcf818f0812d21ae0 frame00000099 +c771b77e49f7c5a7da0b015aa8d7efb9 frame00000100 +169a6eadc3d73ac7bedd2fca7f96b302 frame00000101 +5013c3b464459afbc7ed623742ef5734 frame00000102 +90b45e5f4350a527990f1acc7cf68570 frame00000103 +bfc1d6a91c547a36bc683bd262c229a1 frame00000104 +a7a9ad68a329e98870e3e36ab9297223 frame00000105 +3ac48a38b1dad4833e54559ce0d65a82 frame00000106 +df1937a9a59017e9e7a5fa1b8b0da71f frame00000107 +14f06ce1d42a1515fe39a434d02dfb6c frame00000108 +97aea59ce9383fdd4c4fdcbdf4591038 frame00000109 +28fdeede01dadd718beb5106a554c155 frame00000110 +c3490e7ab8718fb22d86221c9fcb59c1 frame00000111 +0c847eaf03d2d716cfda9984192f6505 frame00000112 +9665b6a53a109009d88c2741c3ce2527 frame00000113 +d26f4105a089ca3dfeeeb5acaba9e9e7 frame00000114 +685afcca21122f1ea61c95aa9f6df2b8 frame00000115 +1a3610c3ad9a15cbacdd96e283e48cb9 frame00000116 +805b7bd7559ae43b6c971d094c94a4b8 frame00000117 +0d25b14ece378836ffdba140d246d9e8 frame00000118 +67f7586bd572eb03a5f0a6e6c4cccfa5 frame00000119 +71b6581ffa39e95372e7faf328c41dcb frame00000120 +cc783ba74e812d7da03cb4b4d7ad49c7 frame00000121 +b7f4601f0ec143226cbfd0782323ac6f frame00000122 +93e917b762ea21906ab2e289313da3b1 frame00000123 +22e5b6bcd3ea6be6201cc6617022ba36 frame00000124 +a4fbdb7548e8655d3ffeb2a00cd5c2fc frame00000125 +1c86db0d2483394c875441b2ccfcabfd frame00000126 +70819acce9a8906a074efea711f1e50d frame00000127 +e4466a605d1b94fd9f72c37fe4f01066 frame00000128 +e767bfd3c5caf1566986042614580074 frame00000129 +3bf061042a72c15d0f9ac22ab2239cc9 frame00000130 +00db4dce011bf9f52d45de1da9625deb frame00000131 +f1b1ac5efa5616e0013d05999d046cde frame00000132 +39e225f0557e4b69121f5eef92a8567d frame00000133 +720d1d7c2cd7c63d599e4cc5128bf415 frame00000134 +26d18589c4d554e6077086346d044389 frame00000135 +2a0c4d8484ae017532273c1a33d83184 frame00000136 +712ce613b4eb295f117bad521945d51d frame00000137 +c4d85b4f32a30740ccc989ddda29bb61 frame00000138 +e86d4a0169b63a379b100e2c2f1b9c74 frame00000139 +e75b17aad344f4e1f23ef8f66884af44 frame00000140 +8b084c7282578e601969bbdd8c55c1fd frame00000141 +5c680add272ea366c3de576f08a09576 frame00000142 +76d0dacdc72b067f42d1cd7ea86b2bdd frame00000143 +071adc94d5dd9db4aff2f68f50c6a0f0 frame00000144 +97899536c9510f69e10642f9d2dae8c5 frame00000145 +b65b0e2134331d6d3e347062cfd1a482 frame00000146 +6c8c624b96455045d156f4b7cfc6e29b frame00000147 +88eec569b1ddd3da4674d7e85aa9dfa1 frame00000148 +e8f496360f69277e7b800c3fa6b123e6 frame00000149 +61cce36318cde8795bf0e4e43a61e8aa frame00000150 +3623b7fc13714468a84da19fcc84eb9a frame00000151 +dbff259bf8d9981e90ea196a94e2794d frame00000152 +ec6bb8c308a2c622b0fd1bd39525c55c frame00000153 +9c94f482aca96cd36a9bd028358e6179 frame00000154 +e8b8c5039268e1b8c2eae67138c00c2c frame00000155 +d7e1989d22231304208f60bd0db46b6f frame00000156 +a26f9b24dda76b297f408f8b35633dae frame00000157 +1cfe88524efa30ed99832d4074183925 frame00000158 +58c21b7c5451472d337875030e0b3ef7 frame00000159 +923cfe50e3782707799386d67b96608d frame00000160 +8354b1d6d205492c4005e37e2f86f91e frame00000161 +2e6c6afbd5a34ec3ace629948f233d2e frame00000162 +fed1cc09aabd1ef42e77401d84ed76ae frame00000163 +04d7d182fe4a700366b9a9b36a621239 frame00000164 +81a2fc40e7375528fd750b3df3ddeb55 frame00000165 +d97f80508baed5841e86ec0379f3ca08 frame00000166 +4cb7ca47a8b3951eac5fd6d6d8d737e5 frame00000167 +ca30f0ccc82aa19d637bb18007d6ae2c frame00000168 +a675fb1d21f1bcc79b8f07e3d8a6d101 frame00000169 +60fe8f2e207e1b6673ba8df652914bd3 frame00000170 +3e870f937d3ff0cfb6d792f44cd6fc64 frame00000171 +4045a91984e96346dfe8a87ce8bd512c frame00000172 +becaa3f64c570db36690d8c50375f3c1 frame00000173 +6eaaca603b873d70407dc3e452dd5202 frame00000174 +8aa2fa2e53dfbf503bf146c1e86b5488 frame00000175 +032141119666dec0a1d0a7f034d92de3 frame00000176 +caee694361e9b7363af73f2bbe9ebf1f frame00000177 +565b3a6a92786a0608dd960856059ebe frame00000178 +e61888df599fbe334eedcb9c40e9afce frame00000179 +e8f354815398d17e378738e7d932ac61 frame00000180 +11ebe2771c9fde7965d3b3ca94925714 frame00000181 +1d156e6635b7b0f9a667cb88dad53075 frame00000182 +6d78ce2b1c8d3efec3cd44322ef6edbe frame00000183 +d8873382fc62176ec278faa3df84e0e3 frame00000184 +1a4e36aabd227bb6c7eafa518daa5d47 frame00000185 +56c25f4d170fbabf29e62e2eea4ee201 frame00000186 +0e533b39e7ed3b74ff41a95ce88bccc8 frame00000187 +7dfc22564097aa2abbd175fb230c0a19 frame00000188 +b8f1ef2e81ab0283cd909cf9bbf1064d frame00000189 +f7b33dc81c00363bb91107384d9c82d1 frame00000190 +1174782d8b94363f5fbe2332ccdced89 frame00000191 +d5498fd0cb91ba6e8cb8522c7320be3d frame00000192 +b8b0e5337f020e30e9dcc945bf90d3b2 frame00000193 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-dct/NFS2Esprit-partial.dct.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-dct/NFS2Esprit-partial.dct.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-dct/NFS2Esprit-partial.dct.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-dct/NFS2Esprit-partial.dct.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,132 @@ +94f92c2ce20c014d3c33d72a83b1bb14 frame00000000 +7aecd09d99c7ae1feb9fa11846f82107 frame00000001 +d13fd41724824e9e78801ae2522da350 frame00000002 +5a4a4c92d7921644055079881c5ee5cc frame00000003 +a00efe0166e2c0a8ccb91657f2110809 frame00000004 +7b1771cc714f1bc08b5dc48f90748959 frame00000005 +9706972bb0d1db3d735f5c3953eba22b frame00000006 +971e502b79d22644be64cb93880bfd8e frame00000007 +7e75b46d6ac5932beff13458f7c255f6 frame00000008 +69d09918302c8ecf24320c68405c3bf2 frame00000009 +4d8b5df9501158c0fafc9dcabf3c4c4f frame00000010 +b8dc4402df2357893f45ea6333504c71 frame00000011 +920ef731b8fcdec512c07768f39cf7a8 frame00000012 +b05d7c4fc4d486ad8ff68911486b647a frame00000013 +5efbc4cd214c506e9ebe5483068df7a1 frame00000014 +6ce7de08af94ab004ecb2741e23450cb frame00000015 +01e15270a2438424a315881a10282700 frame00000016 +a250499c70c05499f4678fd80d5c06df frame00000017 +393a3bb8ec6a5b7015e8236a8e4a2eba frame00000018 +1ade3e734e0ef61c9f2c0a2491fad9a2 frame00000019 +f3c5e8ab70a09462f23cb1a117829a10 frame00000020 +10d9b479ffbef58afe226c13b6b7f0fd frame00000021 +d683b2b992755a2f77afa93d55b78c48 frame00000022 +d6bd1d41fa74b0d22257ac09c4339579 frame00000023 +88bac1ec2a7d959e4fce85350c483ac4 frame00000024 +ea7063e1a77e17b3ba48e1b38ded15ed frame00000025 +0ccadeec295616e60076d4adb2cc8261 frame00000026 +857a2fd55b4e74c795946fc80c057b38 frame00000027 +9253cbe6b8640c54f61c665d23ceedd0 frame00000028 +8a9a9404a2b1bb3ed4e08259d2778c92 frame00000029 +5565a71860ee45dec220414e8c2410a6 frame00000030 +87f0bcec8a042a631d1b88f0e20f37e0 frame00000031 +e3fe7abeee891fe9a68576538cc02357 frame00000032 +53deb0a8ee803f46701fa83d632d035c frame00000033 +f21fcbee3fa380572cd4e16dbbfdf183 frame00000034 +ce4af4217ebf6a0bc82db994faf54da5 frame00000035 +08c8a9ee113729f460545ecc16f83820 frame00000036 +d9a302f05fb37fa982361363939c5060 frame00000037 +06fd8656b1eb2d821576de97f697b72c frame00000038 +118d1171ec4abad292be66ba6848a12a frame00000039 +3da58f30d055a2366d9e44ec05e07286 frame00000040 +7176d106b8c95cc63ed582390b9bca70 frame00000041 +ce87d42173ea996f4fd9afc4a648d919 frame00000042 +5820c76c8bc6472e479c742a25f956b1 frame00000043 +670cffb4afa3ed88d26cb8727af13304 frame00000044 +c23a41477a378dc2c618335d2a9cd9ea frame00000045 +7ba058fc80ec80378709b10b0cc87764 frame00000046 +df88ea5feaa4fb693c7bf97e55a74fc2 frame00000047 +0a1849b6c94598f3fe704e1aacdda07f frame00000048 +17db66ee63279b66062b98f7e4e95190 frame00000049 +f85f96956f14ac103e297f1161af0bef frame00000050 +6ee0fc1fa6047b7b2e7123b063d91eaf frame00000051 +3ea89e4d8666baa245017ad4acbf6f2d frame00000052 +172dafc586a1a5642c1bd39de3e7d9b3 frame00000053 +e6e6f22bf841d242964413a6bf3b25c7 frame00000054 +7cc9a7e941b22eb6b81c0fb305edfb65 frame00000055 +f98fe34c842d64d213e19b35d7ba6fc4 frame00000056 +6182c55dd68e1a299314eeb83225e337 frame00000057 +6cd52120bf083f65148e56922cc02d6b frame00000058 +a1d45ff138ec112ee5f55208afd58fdb frame00000059 +d2df8f0eef2b9d3f2516cde4c7419e7e frame00000060 +a7e66aa07bab36d2c746e77f80211c12 frame00000061 +0da633500c2ea570c4629b09a8e1f247 frame00000062 +179b1531b5503301f7d66b6cd6d80414 frame00000063 +32d8196e0484e67aa3b75f68301cf5a5 frame00000064 +c0af6253359967120c851b4a7c0e3219 frame00000065 +144f8ab3670b2c60a073911a45562081 frame00000066 +d29af7cd650cd7d4dd1b9f343df248d9 frame00000067 +7af4df4f7b0dfc3c1ddf2197a026ebac frame00000068 +0d8fe4b35340d41f5e7fe5ef1aa26925 frame00000069 +26e95d34e6d531b07a8b8fd031d67954 frame00000070 +3a30907554a8c423ff16d318e26117fd frame00000071 +a785dee836c87076ee0e325941b050b1 frame00000072 +0065d6b0f004f6d8e940151558b8e81a frame00000073 +ad7d6ed98fbb2b5705be5f934d0e3ca2 frame00000074 +71f9e1c61f5392b108eb6e791902185f frame00000075 +33f915cb636aa0969f6192af9deed886 frame00000076 +9d9703edb92936f9b6a1716ee2f905f8 frame00000077 +6a9f4e07d5aa51ec28db479b17900e0a frame00000078 +097cd0d9df49ea406d2174c29811d9b1 frame00000079 +b836acffd95f827bb7b1a7185a5c1884 frame00000080 +b405c0cecac06ad1f82b02ecc827e366 frame00000081 +aa7eb02aa18ec5d5df904f7ca6135a16 frame00000082 +1307c0c60d58a914d9afc4ec2d45687e frame00000083 +53d901c10c22c06f19ee4ef890c0e839 frame00000084 +dc4ff72a88860dfb1ad69c0fe95d52ef frame00000085 +b0f32f6f856dc6d8435dfa8533c815a0 frame00000086 +4cdc4ac4fc981a6b5151c8782e0ca7ca frame00000087 +7d0a75957463ae9ebfe80a0e01312f53 frame00000088 +9f0d8dc0ba9225c0c3754dee9da5470d frame00000089 +a9682cddee909230fcdeae07d271cd79 frame00000090 +188dee071a1e8943491aa5efe394d546 frame00000091 +c32ba2462087479418b74b7944592b47 frame00000092 +708b1f02a99912cba0da83a2aa55524d frame00000093 +b608440b9f687645f0bf2ac348048893 frame00000094 +bb2e5516a121126b4afe75cc347fd32c frame00000095 +3f956597dd6acb0d7f1f92760a9fd759 frame00000096 +12074063bb01b30018398b79c7c46e07 frame00000097 +592d1781dca51c867f1593a94c23c942 frame00000098 +70b242326d4c24da71fa08d114d07e6b frame00000099 +bab5b71b504599d46e74ca92747492c4 frame00000100 +0cdcde40aa96589e0c1b063b7e0c03ab frame00000101 +7e7ce873b7ae93070ca27c1f2073aa06 frame00000102 +634ee98eefbadb1e608e6c77d6e2a967 frame00000103 +a565971c45da92e95a8383b6e5942556 frame00000104 +8b14e2e99fd40734faee1a41906e2336 frame00000105 +ccd08e031f1b65d9240b1ead7f1d27ed frame00000106 +85c96a29daee7552bcc8d5cc9d91fe37 frame00000107 +d020c0077fa68a452ed648896fea82db frame00000108 +fb0308248120807197aca47eed839f9a frame00000109 +d962934bef5457d4dc85eeac63dd8b3a frame00000110 +d94887561d54e947e2e73c6932a4ad2f frame00000111 +5af2633ddc604edd6c7303d4b107349f frame00000112 +5f7dca23ffa338c8450ded7c16e4f393 frame00000113 +53baa9b02301daa9f2312e6c257499d8 frame00000114 +c4abaf823e2bc272c7041960c09a23ff frame00000115 +8ff6b6009b875061a0ac2c4ce76b5340 frame00000116 +beb46f657b43b5731422760a0f6305ed frame00000117 +4bc45084b6207286bc49a8f3c38c1d1e frame00000118 +ccd624732a8c9ac45ee12604fe4034f9 frame00000119 +bf32d506b4fc1535d0781396aa26c83c frame00000120 +2322a00b13290daad7c863498a1a6f81 frame00000121 +a1647567bd0e31d7083a995b2d8aedff frame00000122 +ce12a719e9ca2027d6f86c46939b010c frame00000123 +e739300c00ab0d6a842feb70263d2b79 frame00000124 +7fe1bc1ab047fa112e8189f4b8cdd32d frame00000125 +2f084be2626b885c81ae49aa6843c0d5 frame00000126 +f38e9f0674aebea933c905d42a29b833 frame00000127 +6e821bb8217755a244dc768fc92ffa99 frame00000128 +f63344d2b882a5c3c0f297d58d6f4e6e frame00000129 +8416a0b72e85346228b46a8b5a95d550 frame00000130 +d178165c6eff9576c2c1d00a19256a2f frame00000131 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-mad/NFS4T0_00.mad.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-mad/NFS4T0_00.mad.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-mad/NFS4T0_00.mad.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-mad/NFS4T0_00.mad.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,788 @@ +2cfe6b65d5b065d6661f2e490d0fac29 frame00000000 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000001 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000002 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000003 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000004 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000005 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000006 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000007 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000008 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000009 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000010 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000011 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000012 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000013 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000014 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000015 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000016 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000017 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000018 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000019 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000020 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000021 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000022 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000023 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000024 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000025 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000026 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000027 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000028 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000029 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000030 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000031 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000032 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000033 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000034 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000035 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000036 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000037 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000038 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000039 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000040 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000041 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000042 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000043 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000044 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000045 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000046 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000047 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000048 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000049 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000050 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000051 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000052 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000053 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000054 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000055 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000056 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000057 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000058 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000059 +2cfe6b65d5b065d6661f2e490d0fac29 frame00000060 +8de10fb9045dd330f57331264d4398fb frame00000061 +0efebf8aef79d9395be9abfb705a7640 frame00000062 +31de221d77748b7bdcd85069452d7c83 frame00000063 +5760220b735d920cd92086048d79b4e6 frame00000064 +c085c551e409d8a2c998fe0be06f3c96 frame00000065 +22f067ed3394f27606d35ad89434caa0 frame00000066 +1ec92fd69b3cddbc20e53deeffa54437 frame00000067 +2017cf69eb0af2563f81de339c38c823 frame00000068 +60fec8721670e6502a5474f628db00ed frame00000069 +b75aceda5bf20db0a97cbab69da94ac2 frame00000070 +bf29301460fc3a1b04ad357329e47dc2 frame00000071 +587baf6c9114d398d315a5e4d510a3e3 frame00000072 +99039de73c316aeb5a8ef820408a67e4 frame00000073 +dbe4241560b9d9df7d9cf5cd8b28fdd5 frame00000074 +fa8af3cb060f1829d6e23ea9bec10902 frame00000075 +ec6c6d64950dfbb26577136fd68e926d frame00000076 +7a5880cd74229696a407140bc60e2e97 frame00000077 +fa2215be6eef1ec60b766cbf08a7310a frame00000078 +6ecd1549757a4b5fd461993890875d6c frame00000079 +1c57a9e054561bca00a532cc52bf382d frame00000080 +d171a24ae48f0085c4f3f69fa0b55524 frame00000081 +07a2ff0c0febb30ba19ad58feb0246da frame00000082 +07a2ff0c0febb30ba19ad58feb0246da frame00000083 +a7c01e6bc549b1724c4fdea6f7e2964c frame00000084 +a7c01e6bc549b1724c4fdea6f7e2964c frame00000085 +23826fde15657e287ae682772bacf876 frame00000086 +23826fde15657e287ae682772bacf876 frame00000087 +a515021168488666e95ae4d4133fcc33 frame00000088 +a515021168488666e95ae4d4133fcc33 frame00000089 +a515021168488666e95ae4d4133fcc33 frame00000090 +a515021168488666e95ae4d4133fcc33 frame00000091 +a515021168488666e95ae4d4133fcc33 frame00000092 +a515021168488666e95ae4d4133fcc33 frame00000093 +a515021168488666e95ae4d4133fcc33 frame00000094 +a515021168488666e95ae4d4133fcc33 frame00000095 +a515021168488666e95ae4d4133fcc33 frame00000096 +a515021168488666e95ae4d4133fcc33 frame00000097 +a515021168488666e95ae4d4133fcc33 frame00000098 +a515021168488666e95ae4d4133fcc33 frame00000099 +a515021168488666e95ae4d4133fcc33 frame00000100 +a515021168488666e95ae4d4133fcc33 frame00000101 +a515021168488666e95ae4d4133fcc33 frame00000102 +a515021168488666e95ae4d4133fcc33 frame00000103 +a515021168488666e95ae4d4133fcc33 frame00000104 +a515021168488666e95ae4d4133fcc33 frame00000105 +a515021168488666e95ae4d4133fcc33 frame00000106 +a515021168488666e95ae4d4133fcc33 frame00000107 +a515021168488666e95ae4d4133fcc33 frame00000108 +a515021168488666e95ae4d4133fcc33 frame00000109 +a515021168488666e95ae4d4133fcc33 frame00000110 +a515021168488666e95ae4d4133fcc33 frame00000111 +a515021168488666e95ae4d4133fcc33 frame00000112 +a515021168488666e95ae4d4133fcc33 frame00000113 +a515021168488666e95ae4d4133fcc33 frame00000114 +a515021168488666e95ae4d4133fcc33 frame00000115 +a515021168488666e95ae4d4133fcc33 frame00000116 +a515021168488666e95ae4d4133fcc33 frame00000117 +a515021168488666e95ae4d4133fcc33 frame00000118 +a515021168488666e95ae4d4133fcc33 frame00000119 +a515021168488666e95ae4d4133fcc33 frame00000120 +9ecff34cea092de643413ccf9373fbf7 frame00000121 +10d2130a1be332ef3461e10b1d2a8961 frame00000122 +a3f31de68d4b20ea839bbff399ff4143 frame00000123 +fd8ca41508ac83119140e2cab2d158b5 frame00000124 +cb0aeb8e47cd3fe582852fb2f72abe5e frame00000125 +5126e9db617f2b204979dcf6a4a6b1d7 frame00000126 +9856870fd8cb177e62a93852f0282940 frame00000127 +c9439b25581860f0cf9dbef1b4c1f59c frame00000128 +9643043eb3001639bcb8ae545dd5d181 frame00000129 +2b082a29258ca2b154b3c8a2893b681a frame00000130 +cb7690f0f2b294e78efcc0e8890e221d frame00000131 +8890f70f6f6022582304df43e3a6a05a frame00000132 +4b2dd06324f0ac27cd34181e1b427c44 frame00000133 +94e39a25c044bacdb55824c2e8890c70 frame00000134 +55d6aa15611eecdfb1ffdd12d86452bd frame00000135 +aa607e9f2e508c4565e1a4c9eb7d7bc6 frame00000136 +44f2d18586b38f8756a1f1540218c57c frame00000137 +c80d43f8ac82fc3f343c81a9e4bd4f8d frame00000138 +a1608fcf9b893a6db8c466b6895ef50d frame00000139 +63c3b7c6f64b3f7a848a5212be71903c frame00000140 +2cb9920135b387a366960ec72fdb5386 frame00000141 +2cb9920135b387a366960ec72fdb5386 frame00000142 +05d1573b10a28a01d113a7caf329995c frame00000143 +05d1573b10a28a01d113a7caf329995c frame00000144 +05d1573b10a28a01d113a7caf329995c frame00000145 +05d1573b10a28a01d113a7caf329995c frame00000146 +05d1573b10a28a01d113a7caf329995c frame00000147 +05d1573b10a28a01d113a7caf329995c frame00000148 +05d1573b10a28a01d113a7caf329995c frame00000149 +05d1573b10a28a01d113a7caf329995c frame00000150 +05d1573b10a28a01d113a7caf329995c frame00000151 +05d1573b10a28a01d113a7caf329995c frame00000152 +05d1573b10a28a01d113a7caf329995c frame00000153 +05d1573b10a28a01d113a7caf329995c frame00000154 +05d1573b10a28a01d113a7caf329995c frame00000155 +05d1573b10a28a01d113a7caf329995c frame00000156 +05d1573b10a28a01d113a7caf329995c frame00000157 +05d1573b10a28a01d113a7caf329995c frame00000158 +05d1573b10a28a01d113a7caf329995c frame00000159 +05d1573b10a28a01d113a7caf329995c frame00000160 +05d1573b10a28a01d113a7caf329995c frame00000161 +05d1573b10a28a01d113a7caf329995c frame00000162 +05d1573b10a28a01d113a7caf329995c frame00000163 +05d1573b10a28a01d113a7caf329995c frame00000164 +05d1573b10a28a01d113a7caf329995c frame00000165 +05d1573b10a28a01d113a7caf329995c frame00000166 +05d1573b10a28a01d113a7caf329995c frame00000167 +05d1573b10a28a01d113a7caf329995c frame00000168 +05d1573b10a28a01d113a7caf329995c frame00000169 +05d1573b10a28a01d113a7caf329995c frame00000170 +05d1573b10a28a01d113a7caf329995c frame00000171 +05d1573b10a28a01d113a7caf329995c frame00000172 +05d1573b10a28a01d113a7caf329995c frame00000173 +05d1573b10a28a01d113a7caf329995c frame00000174 +05d1573b10a28a01d113a7caf329995c frame00000175 +05d1573b10a28a01d113a7caf329995c frame00000176 +05d1573b10a28a01d113a7caf329995c frame00000177 +05d1573b10a28a01d113a7caf329995c frame00000178 +05d1573b10a28a01d113a7caf329995c frame00000179 +05d1573b10a28a01d113a7caf329995c frame00000180 +07ddfcae318f5691642e49d2077b02f3 frame00000181 +49fb6068a099b7ced0394cdee27ebd4f frame00000182 +1980b323012b2c4073c94089320556f4 frame00000183 +1bee281a72319c3daef984d26d99cf9b frame00000184 +28ac34e52e05712333558c8ddcefbf8f frame00000185 +e655cb1b8bf2df9051f3af8bdbfb8b67 frame00000186 +7fb5db3bb4786ada8bec4706e0d613ad frame00000187 +1cc337c183deb36da436e5af88f48cab frame00000188 +b6e1059061b39f84ac8030eb026bdf44 frame00000189 +a18efa112c1aa7515666dc51353490e2 frame00000190 +348c65662eeb9e491c59702ada865e06 frame00000191 +09a0a8954b734bfe152ab754127e1f8a frame00000192 +576a5687b60f499e64aa411f3c0317d4 frame00000193 +d08c03be7a40cd07f8c32244d2dbdb64 frame00000194 +cdce5f9c9b8c78812d4595db481692a4 frame00000195 +cebce8207a3c637af97f989a0431cc60 frame00000196 +60f8c3b1c044dd6dbd5f7513ad4c69b0 frame00000197 +1618f3873d1559cce027000304bd8168 frame00000198 +1d91a686c89e3856a7b35fe9ca4ef5c3 frame00000199 +d5ab9f1f7592ac775cc2a96ebc78a892 frame00000200 +3e800b04fdc18119424032bed28816dc frame00000201 +3e800b04fdc18119424032bed28816dc frame00000202 +046b6319c533ffcfa33f6f5005ced3f4 frame00000203 +046b6319c533ffcfa33f6f5005ced3f4 frame00000204 +7979c6f48a9e5890fa1474c3a7052647 frame00000205 +7979c6f48a9e5890fa1474c3a7052647 frame00000206 +82652f4f2f6d470c60cfa485b5385ee9 frame00000207 +82652f4f2f6d470c60cfa485b5385ee9 frame00000208 +bc477d40b90d06cf7ebc881f04f286d7 frame00000209 +bc477d40b90d06cf7ebc881f04f286d7 frame00000210 +bc477d40b90d06cf7ebc881f04f286d7 frame00000211 +bc477d40b90d06cf7ebc881f04f286d7 frame00000212 +bc477d40b90d06cf7ebc881f04f286d7 frame00000213 +bc477d40b90d06cf7ebc881f04f286d7 frame00000214 +bc477d40b90d06cf7ebc881f04f286d7 frame00000215 +bc477d40b90d06cf7ebc881f04f286d7 frame00000216 +bc477d40b90d06cf7ebc881f04f286d7 frame00000217 +bc477d40b90d06cf7ebc881f04f286d7 frame00000218 +bc477d40b90d06cf7ebc881f04f286d7 frame00000219 +bc477d40b90d06cf7ebc881f04f286d7 frame00000220 +bc477d40b90d06cf7ebc881f04f286d7 frame00000221 +bc477d40b90d06cf7ebc881f04f286d7 frame00000222 +bc477d40b90d06cf7ebc881f04f286d7 frame00000223 +bc477d40b90d06cf7ebc881f04f286d7 frame00000224 +bc477d40b90d06cf7ebc881f04f286d7 frame00000225 +bc477d40b90d06cf7ebc881f04f286d7 frame00000226 +bc477d40b90d06cf7ebc881f04f286d7 frame00000227 +bc477d40b90d06cf7ebc881f04f286d7 frame00000228 +bc477d40b90d06cf7ebc881f04f286d7 frame00000229 +bc477d40b90d06cf7ebc881f04f286d7 frame00000230 +bc477d40b90d06cf7ebc881f04f286d7 frame00000231 +bc477d40b90d06cf7ebc881f04f286d7 frame00000232 +bc477d40b90d06cf7ebc881f04f286d7 frame00000233 +bc477d40b90d06cf7ebc881f04f286d7 frame00000234 +bc477d40b90d06cf7ebc881f04f286d7 frame00000235 +bc477d40b90d06cf7ebc881f04f286d7 frame00000236 +bc477d40b90d06cf7ebc881f04f286d7 frame00000237 +bc477d40b90d06cf7ebc881f04f286d7 frame00000238 +bc477d40b90d06cf7ebc881f04f286d7 frame00000239 +bc477d40b90d06cf7ebc881f04f286d7 frame00000240 +3d133ff37a77ccf91c649b89dec84bbb frame00000241 +19b372ff3429d18686db8ccf8e015822 frame00000242 +0438d57ca7723409a1f6595db465e5b7 frame00000243 +7639359802070f93a3668fb05c7eb6b5 frame00000244 +64ef89b58930b271ffc8c92bd84ad985 frame00000245 +2b5f37ea3fbcf9b5c43dc0eb4b9e4a7c frame00000246 +9c44333cedc094c9b0e0a88ff8d8b803 frame00000247 +2ae12395b3a1e147fb51e882fdbb359a frame00000248 +5ef4c83ba810000c33ca84fd75387163 frame00000249 +57fd0efc1e916a1f4b9f97da68ad597b frame00000250 +2cf6952ca3b92126ef0401e545b59d57 frame00000251 +379f769e9b763909fbc3da5391f9c765 frame00000252 +1298ba116ce68d14c5983768feccee9a frame00000253 +67a853bb10815ac6f4d516ce364532b3 frame00000254 +634a35a38ae4844b1c783b09eac94988 frame00000255 +c1224d5629affd85b4fe91639bc405e1 frame00000256 +d9df7e9e0a9ff4058d21fdbcadd24757 frame00000257 +ac7cc909a804fdd6087f8ce592e74e30 frame00000258 +3187836f3a731fc9ae3709542fe2b367 frame00000259 +0679a647f0ae5f86a423cbe57823863b frame00000260 +48abcf1921034be447eeed73be95d759 frame00000261 +229479cfc6c5d49fb21d30787da375f1 frame00000262 +1d839e12cb7f0f5aecb31f27466cb07d frame00000263 +4cb112f27e699dbd5990c901b9923488 frame00000264 +4cb112f27e699dbd5990c901b9923488 frame00000265 +4cb112f27e699dbd5990c901b9923488 frame00000266 +4cb112f27e699dbd5990c901b9923488 frame00000267 +4cb112f27e699dbd5990c901b9923488 frame00000268 +4cb112f27e699dbd5990c901b9923488 frame00000269 +4cb112f27e699dbd5990c901b9923488 frame00000270 +4cb112f27e699dbd5990c901b9923488 frame00000271 +4cb112f27e699dbd5990c901b9923488 frame00000272 +4cb112f27e699dbd5990c901b9923488 frame00000273 +4cb112f27e699dbd5990c901b9923488 frame00000274 +4cb112f27e699dbd5990c901b9923488 frame00000275 +4cb112f27e699dbd5990c901b9923488 frame00000276 +4cb112f27e699dbd5990c901b9923488 frame00000277 +4cb112f27e699dbd5990c901b9923488 frame00000278 +4cb112f27e699dbd5990c901b9923488 frame00000279 +4cb112f27e699dbd5990c901b9923488 frame00000280 +4cb112f27e699dbd5990c901b9923488 frame00000281 +4cb112f27e699dbd5990c901b9923488 frame00000282 +4cb112f27e699dbd5990c901b9923488 frame00000283 +4cb112f27e699dbd5990c901b9923488 frame00000284 +4cb112f27e699dbd5990c901b9923488 frame00000285 +4cb112f27e699dbd5990c901b9923488 frame00000286 +4cb112f27e699dbd5990c901b9923488 frame00000287 +4cb112f27e699dbd5990c901b9923488 frame00000288 +4cb112f27e699dbd5990c901b9923488 frame00000289 +4cb112f27e699dbd5990c901b9923488 frame00000290 +4cb112f27e699dbd5990c901b9923488 frame00000291 +4cb112f27e699dbd5990c901b9923488 frame00000292 +4cb112f27e699dbd5990c901b9923488 frame00000293 +4cb112f27e699dbd5990c901b9923488 frame00000294 +4cb112f27e699dbd5990c901b9923488 frame00000295 +4cb112f27e699dbd5990c901b9923488 frame00000296 +4cb112f27e699dbd5990c901b9923488 frame00000297 +4cb112f27e699dbd5990c901b9923488 frame00000298 +4cb112f27e699dbd5990c901b9923488 frame00000299 +4cb112f27e699dbd5990c901b9923488 frame00000300 +9a5d0920fb47e558d7730fec1ebe67f4 frame00000301 +5b3df77961fb276547a3715a66042d63 frame00000302 +3eacec14ffc1b3233ceb8f6da6f570bd frame00000303 +4df42f2fd779ee0c496968ee91993e69 frame00000304 +0f4df591eff397bf26543057a18b6603 frame00000305 +d61ade1b7293d1eb7a5e9e28560b30e5 frame00000306 +9e04e7fbe48e086812476a3c8c178ee6 frame00000307 +8df1d9548b288b629fb69ae28384f4ce frame00000308 +397667d1209bb75cad28b37532247dee frame00000309 +88337e329debac4e3a99ddcb8c5c7ef0 frame00000310 +c4249e1692b5993d83945c33cd42639d frame00000311 +0cbe21feb59ef4b7a8b9f1995bf99150 frame00000312 +6ba171debfc3ae3633f04ce6c874fdfb frame00000313 +db4536df474c24626b263ab2a9fee7cd frame00000314 +e469ffef686cf3f7e8a8756e6de4d124 frame00000315 +c99678d4a1414bea79f9f03dcc5b1eaf frame00000316 +faff74204b690c17de298977703da5d9 frame00000317 +6698c578fe4bd9fd13b03e81aa8f221a frame00000318 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000319 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000320 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000321 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000322 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000323 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000324 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000325 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000326 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000327 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000328 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000329 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000330 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000331 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000332 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000333 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000334 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000335 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000336 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000337 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000338 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000339 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000340 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000341 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000342 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000343 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000344 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000345 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000346 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000347 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000348 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000349 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000350 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000351 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000352 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000353 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000354 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000355 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000356 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000357 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000358 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000359 +8e53d1ced1dcc30bfaa5449db0bee191 frame00000360 +ef4f4d6962885683d78211e273abbc0c frame00000361 +bfb872b82dfd09b028d3c98ddbcd0357 frame00000362 +84385f80ec52571edd04074ca98e7d80 frame00000363 +125dd9e371dd18bb848ba14a38cc5cf0 frame00000364 +3eb756aacce8d4890d8c1a21c4065e88 frame00000365 +d86d9a37efca179aa1597a92d844569b frame00000366 +af22acf9c75cdf1f899a306e12c30899 frame00000367 +d29b9d9129bfa9869f35b3e1078cb700 frame00000368 +ac1f7cc3198c458450774bd7add70017 frame00000369 +50e638f76f54c942e0e81bd7d0e88299 frame00000370 +ece6ac89718b1c1a3c26e039aa920bb4 frame00000371 +7512a2ac4db1f5cc37c83f05e8fda0b3 frame00000372 +1affbc9158d807dcb2d56c421d6cbd3b frame00000373 +5e6105c0353699ff19a0da4d414d8596 frame00000374 +1c36352f0691e78ca1704f33bcdd1001 frame00000375 +b64113376fbafe613ff5cf20f648dc5a frame00000376 +0b26da6d75255029d5c38081821a58d7 frame00000377 +a612cb9501e4a71a1cd7ff5bde8c41f1 frame00000378 +e67be1eae6fe52f18e9addc7edbea205 frame00000379 +02b727156afa22bb3358ed69ca27c9e2 frame00000380 +b5ff5a83b2cba97fa5f1e41722e43d15 frame00000381 +074efac5e2ac5691117dc5875cd67bc9 frame00000382 +c07641dcfc198eefdb01f6d12a613cdb frame00000383 +c07641dcfc198eefdb01f6d12a613cdb frame00000384 +b3e133029a710b036ded54c79970c4f7 frame00000385 +b3e133029a710b036ded54c79970c4f7 frame00000386 +b3e133029a710b036ded54c79970c4f7 frame00000387 +b3e133029a710b036ded54c79970c4f7 frame00000388 +b3e133029a710b036ded54c79970c4f7 frame00000389 +b3e133029a710b036ded54c79970c4f7 frame00000390 +b3e133029a710b036ded54c79970c4f7 frame00000391 +b3e133029a710b036ded54c79970c4f7 frame00000392 +b3e133029a710b036ded54c79970c4f7 frame00000393 +b3e133029a710b036ded54c79970c4f7 frame00000394 +b3e133029a710b036ded54c79970c4f7 frame00000395 +b3e133029a710b036ded54c79970c4f7 frame00000396 +b3e133029a710b036ded54c79970c4f7 frame00000397 +b3e133029a710b036ded54c79970c4f7 frame00000398 +b3e133029a710b036ded54c79970c4f7 frame00000399 +b3e133029a710b036ded54c79970c4f7 frame00000400 +b3e133029a710b036ded54c79970c4f7 frame00000401 +b3e133029a710b036ded54c79970c4f7 frame00000402 +b3e133029a710b036ded54c79970c4f7 frame00000403 +b3e133029a710b036ded54c79970c4f7 frame00000404 +b3e133029a710b036ded54c79970c4f7 frame00000405 +b3e133029a710b036ded54c79970c4f7 frame00000406 +b3e133029a710b036ded54c79970c4f7 frame00000407 +b3e133029a710b036ded54c79970c4f7 frame00000408 +b3e133029a710b036ded54c79970c4f7 frame00000409 +b3e133029a710b036ded54c79970c4f7 frame00000410 +b3e133029a710b036ded54c79970c4f7 frame00000411 +b3e133029a710b036ded54c79970c4f7 frame00000412 +b3e133029a710b036ded54c79970c4f7 frame00000413 +b3e133029a710b036ded54c79970c4f7 frame00000414 +b3e133029a710b036ded54c79970c4f7 frame00000415 +b3e133029a710b036ded54c79970c4f7 frame00000416 +b3e133029a710b036ded54c79970c4f7 frame00000417 +b3e133029a710b036ded54c79970c4f7 frame00000418 +b3e133029a710b036ded54c79970c4f7 frame00000419 +b3e133029a710b036ded54c79970c4f7 frame00000420 +531329d6a26b55bc6ee3caf6ce6a5c67 frame00000421 +3097ffeaca701d58d005b3c06e6ab7eb frame00000422 +a84d12f91ac826e09bac997040ef1462 frame00000423 +688db6ad511207a5dece6f5b3c0ff287 frame00000424 +233243f9cff0b8576276b8e442640466 frame00000425 +adfaf3ad7ba8e56a2127a0478eb32024 frame00000426 +789bb9e9a70001bad867dafade22a463 frame00000427 +7cd1e5e17524bd797d795da372ae3692 frame00000428 +98cb79db9eefb03625439c64a5effbf4 frame00000429 +2b977bbfd69e670bf904f4beaba09014 frame00000430 +5cf3821b10e4f080de2eec521fab5b1a frame00000431 +95459c692d5da638cb487910b1181db3 frame00000432 +c4b6f3d66e5fcd719fa76e43bdab0366 frame00000433 +004f51225b36f38dcfa37425c17979a6 frame00000434 +3fe72594db6627e06a338f7d95226e05 frame00000435 +99c39c0b3c340e0646ef52f3ff8ad02c frame00000436 +a0487d6568b756c7bcec92b019461334 frame00000437 +aed200d8578ef8f0bf414caf50f63759 frame00000438 +74df616942301b303bc5c93616c388b4 frame00000439 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000440 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000441 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000442 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000443 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000444 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000445 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000446 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000447 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000448 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000449 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000450 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000451 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000452 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000453 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000454 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000455 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000456 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000457 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000458 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000459 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000460 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000461 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000462 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000463 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000464 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000465 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000466 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000467 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000468 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000469 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000470 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000471 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000472 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000473 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000474 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000475 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000476 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000477 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000478 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000479 +5affb4bde20ebfbb6eb1bbc28667bf84 frame00000480 +55c7da5411a6e61f0588ddd354d1a88c frame00000481 +ced81457609955fee63f74ee3fecc4e7 frame00000482 +db30f8c2366643b3f08205e5cfe4ae22 frame00000483 +baf696d64ceebeb95fd590d0cab24ea4 frame00000484 +297f1567aa74d00244cf220c45cfc442 frame00000485 +1ec548235671c988fb64f098080676cc frame00000486 +020278935bc11b0d5984a7ad417f7ba5 frame00000487 +136365c4c7b4d657a501183403f3de0f frame00000488 +8544eb44395f83cef1fd7f197368fd71 frame00000489 +6ff0da4d99046eeea41d540640f7d20f frame00000490 +86311ae940ec0f26dd7b352fdbd6d6ca frame00000491 +5038c2e9e922ce8b933783f8311531ba frame00000492 +94cc08ee6de1990dcab3da342167af7e frame00000493 +054756571616cadc6ea24e26fed8033a frame00000494 +a5381b2fd4d0f7925e8c78cc10ab9dfc frame00000495 +0bc79303b99a40134709a5a5ab28de33 frame00000496 +b928228f14e4d2575be03544fa0004e1 frame00000497 +e5efc6729c6aef3457da90c9ac51737c frame00000498 +75b9e13792ae943a18558d563337e192 frame00000499 +088700f7738f1fa60cb74bae95afa847 frame00000500 +75ecb942dc7e5833fd3aa848b2f5a066 frame00000501 +3851da1a6030f64844a8cd792a326a34 frame00000502 +e6ccf7f1f13648a46783a9c59a99a95e frame00000503 +2bf12da64c1bd596621e1b0c51ee2789 frame00000504 +bb1ea9f975ba3ce681e0ba9be27e4355 frame00000505 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000506 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000507 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000508 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000509 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000510 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000511 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000512 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000513 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000514 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000515 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000516 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000517 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000518 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000519 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000520 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000521 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000522 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000523 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000524 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000525 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000526 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000527 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000528 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000529 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000530 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000531 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000532 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000533 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000534 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000535 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000536 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000537 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000538 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000539 +969fcc9594ec47cf6a3bbd7609ff8892 frame00000540 +f5adcfd3ed6e6611a4d5b22b5cb89dfe frame00000541 +a2566589eb1fdf8c479ad45ef4db5ffc frame00000542 +8ffc226b705043ce71ec3591f4d931d0 frame00000543 +1c813b4450d1da0244e6ef614dc0a205 frame00000544 +bd65ae6b2847d9a1a78910a7bbb45e31 frame00000545 +ef3e04f00ac3837f302971187f56b53c frame00000546 +e430cf59f48f33e8ad4db082ab17e0d3 frame00000547 +f414075738541ed3aeab156fef41e954 frame00000548 +9b28a56b40ee001ce33a6adbf908ee58 frame00000549 +76fa642ab626b31e663102909b192e20 frame00000550 +d982e0ae1368c990266c7503b0da9b2e frame00000551 +d42ba87897c0651ea8f91cc39acec68a frame00000552 +4ecabfe91f35b77b413096d1113e36ac frame00000553 +6267ae44052a6da5dda462101f6d820e frame00000554 +89a6fae134373ad22b6bb2cdcebd7b1b frame00000555 +c5198cb7800ee1bed7ad0f5b36b454d7 frame00000556 +16cce7814684fc1d09f6e47e2b571252 frame00000557 +8bb047b0b2efb11999cfe3ea6858137b frame00000558 +487d327f741dda6e7358fc2ddf647c5e frame00000559 +97bf23067345ac78e81a23aaac9c55e1 frame00000560 +8198530f2f17f738feb981589ab1f993 frame00000561 +361b7882bea384803561a891df6a1ecc frame00000562 +361b7882bea384803561a891df6a1ecc frame00000563 +361b7882bea384803561a891df6a1ecc frame00000564 +361b7882bea384803561a891df6a1ecc frame00000565 +361b7882bea384803561a891df6a1ecc frame00000566 +361b7882bea384803561a891df6a1ecc frame00000567 +361b7882bea384803561a891df6a1ecc frame00000568 +361b7882bea384803561a891df6a1ecc frame00000569 +361b7882bea384803561a891df6a1ecc frame00000570 +361b7882bea384803561a891df6a1ecc frame00000571 +4e921cec2ddb10d1f4aa9a660468e96b frame00000572 +4e921cec2ddb10d1f4aa9a660468e96b frame00000573 +4e921cec2ddb10d1f4aa9a660468e96b frame00000574 +4e921cec2ddb10d1f4aa9a660468e96b frame00000575 +4e921cec2ddb10d1f4aa9a660468e96b frame00000576 +4e921cec2ddb10d1f4aa9a660468e96b frame00000577 +4e921cec2ddb10d1f4aa9a660468e96b frame00000578 +4e921cec2ddb10d1f4aa9a660468e96b frame00000579 +4e921cec2ddb10d1f4aa9a660468e96b frame00000580 +4e921cec2ddb10d1f4aa9a660468e96b frame00000581 +4e921cec2ddb10d1f4aa9a660468e96b frame00000582 +4e921cec2ddb10d1f4aa9a660468e96b frame00000583 +4e921cec2ddb10d1f4aa9a660468e96b frame00000584 +4e921cec2ddb10d1f4aa9a660468e96b frame00000585 +4e921cec2ddb10d1f4aa9a660468e96b frame00000586 +4e921cec2ddb10d1f4aa9a660468e96b frame00000587 +4e921cec2ddb10d1f4aa9a660468e96b frame00000588 +4e921cec2ddb10d1f4aa9a660468e96b frame00000589 +4e921cec2ddb10d1f4aa9a660468e96b frame00000590 +4e921cec2ddb10d1f4aa9a660468e96b frame00000591 +4e921cec2ddb10d1f4aa9a660468e96b frame00000592 +4e921cec2ddb10d1f4aa9a660468e96b frame00000593 +4e921cec2ddb10d1f4aa9a660468e96b frame00000594 +4e921cec2ddb10d1f4aa9a660468e96b frame00000595 +4e921cec2ddb10d1f4aa9a660468e96b frame00000596 +4e921cec2ddb10d1f4aa9a660468e96b frame00000597 +4e921cec2ddb10d1f4aa9a660468e96b frame00000598 +4e921cec2ddb10d1f4aa9a660468e96b frame00000599 +4e921cec2ddb10d1f4aa9a660468e96b frame00000600 +c49e33f8714ee376bb4ef1075d466473 frame00000601 +a36100c0da516da2435834faa39cc89b frame00000602 +88ac65263dd200e4c48cdea858bcceb9 frame00000603 +facc7116369b4e5462c96dc069330e66 frame00000604 +74795f4a79824b0cf521d370710ab7c2 frame00000605 +b5aed704e059aae80af586f3d57bde99 frame00000606 +0d3780afa45d377445c818a2c7821ffd frame00000607 +b04a4e6205d552ddb3a2256a8cd26104 frame00000608 +efae65427ff8aac8856398a2bb2e9fcd frame00000609 +9cd5c55288e81feb06d25d09f60a2c19 frame00000610 +9f561d69e07300153956b4d315fdf354 frame00000611 +33deb6367f8df1cc583fbf711aa9fc47 frame00000612 +2657d71717356c79bd3caa1b337b5380 frame00000613 +ebbd4e6aa29aeadaf142770797a04f14 frame00000614 +ff83b3c76a189d198eb668d2aa37eb77 frame00000615 +32ef07e7e2b5e0d46a3723fb162a36b8 frame00000616 +edc03b3e3b3e0800f4e957209a5f30ff frame00000617 +ba2fcf9c593a34645e17e436e6566443 frame00000618 +0dbf0f244c485c3552c205d480475e9f frame00000619 +c5ef2e60e3608768d154aa39989feca9 frame00000620 +d1832fb3f80832e4c42f2593b32bf44b frame00000621 +d1832fb3f80832e4c42f2593b32bf44b frame00000622 +ebe3f3f11607bda32a3ff72637b795c3 frame00000623 +ebe3f3f11607bda32a3ff72637b795c3 frame00000624 +c9fb329711dc34322e29ff3e9dcad9df frame00000625 +c9fb329711dc34322e29ff3e9dcad9df frame00000626 +7b48181cf9a3ba064197c88848ecbdaf frame00000627 +7b48181cf9a3ba064197c88848ecbdaf frame00000628 +7b48181cf9a3ba064197c88848ecbdaf frame00000629 +7b48181cf9a3ba064197c88848ecbdaf frame00000630 +7b48181cf9a3ba064197c88848ecbdaf frame00000631 +7b48181cf9a3ba064197c88848ecbdaf frame00000632 +7b48181cf9a3ba064197c88848ecbdaf frame00000633 +7b48181cf9a3ba064197c88848ecbdaf frame00000634 +7b48181cf9a3ba064197c88848ecbdaf frame00000635 +7b48181cf9a3ba064197c88848ecbdaf frame00000636 +7b48181cf9a3ba064197c88848ecbdaf frame00000637 +7b48181cf9a3ba064197c88848ecbdaf frame00000638 +7b48181cf9a3ba064197c88848ecbdaf frame00000639 +7b48181cf9a3ba064197c88848ecbdaf frame00000640 +7b48181cf9a3ba064197c88848ecbdaf frame00000641 +7b48181cf9a3ba064197c88848ecbdaf frame00000642 +7b48181cf9a3ba064197c88848ecbdaf frame00000643 +5605c0f64e1c867416e1f597590477ec frame00000644 +77fa30c0a50901bd5122cf29a4d8b11b frame00000645 +9aa949f4af18c0603bf262d191faccb8 frame00000646 +f5b3ad3717a1b40b6e39b544fded1b74 frame00000647 +8ef549865fac493853b5a4fa1bb554c0 frame00000648 +585090b5296a52bf7d44526e13ef7475 frame00000649 +415c6fa305a0c39db9f8810b6fdf9753 frame00000650 +e6d9921d52228f8e5d53b9d79bcd4fac frame00000651 +7b5030cbff21d4c99ca5c25e31b5a7ee frame00000652 +e8904e24d9c4817ac7082114b47766d6 frame00000653 +9007d94277832b60baded839ee066f34 frame00000654 +167876b5e936434a8b7ba346008f514d frame00000655 +629dbef607e4b0ef8876643a743f20b2 frame00000656 +8fc688c36e2bc21c93394fb557e4934e frame00000657 +2f4420023ca8c457a964ea117c1d4da5 frame00000658 +0181413ef47f70c753aacf3ce04da7b5 frame00000659 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000660 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000661 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000662 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000663 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000664 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000665 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000666 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000667 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000668 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000669 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000670 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000671 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000672 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000673 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000674 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000675 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000676 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000677 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000678 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000679 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000680 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000681 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000682 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000683 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000684 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000685 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000686 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000687 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000688 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000689 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000690 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000691 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000692 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000693 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000694 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000695 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000696 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000697 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000698 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000699 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000700 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000701 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000702 +ce5cece05bdd7d12ae7f48b6971ede3f frame00000703 +f7b174e5da6fc769404924fd4d05cdef frame00000704 +5d4a27e1246fa0dee20f809cb0ad5826 frame00000705 +548f1c98a73476d38f99204e0112da34 frame00000706 +cf590cd0c89d87cd14314d73a0254667 frame00000707 +72dfc6418999cafefc1f15e5ecd51957 frame00000708 +34ced223652e2c373b5eca00fc960636 frame00000709 +8b7240e51502a0b7a636ee1f452b4ede frame00000710 +dc9929fb9956534f96a8af7802cfd41c frame00000711 +6438727a7ded71c0caa9d85eb9ea648c frame00000712 +47c36a259f979fc123b09a0877ff0781 frame00000713 +97c34160fe892c7456b614d8c1dd73a6 frame00000714 +cec0a7a3119b3258813342e041ecc3a8 frame00000715 +1425822adfd6e3b762fc87d9124ce078 frame00000716 +79e1d89dd1c91fcfc987f693ac42ad2b frame00000717 +15a5e173113c821b89776f718a151c99 frame00000718 +5fd2e71115087010ba14f1515f57aa57 frame00000719 +4894ffbb1ffd3eeccd2c62821007af78 frame00000720 +f258c9f0fcda26246f923ff6ca09d9f7 frame00000721 +9f6486cb4700db8b6a828383f5c23d38 frame00000722 +9f6486cb4700db8b6a828383f5c23d38 frame00000723 +36a38228f3b83c38f5687fc6de8315d3 frame00000724 +36a38228f3b83c38f5687fc6de8315d3 frame00000725 +03fb1a805fb02914b1002283ea107388 frame00000726 +03fb1a805fb02914b1002283ea107388 frame00000727 +03fb1a805fb02914b1002283ea107388 frame00000728 +03fb1a805fb02914b1002283ea107388 frame00000729 +03fb1a805fb02914b1002283ea107388 frame00000730 +03fb1a805fb02914b1002283ea107388 frame00000731 +03fb1a805fb02914b1002283ea107388 frame00000732 +03fb1a805fb02914b1002283ea107388 frame00000733 +03fb1a805fb02914b1002283ea107388 frame00000734 +03fb1a805fb02914b1002283ea107388 frame00000735 +03fb1a805fb02914b1002283ea107388 frame00000736 +03fb1a805fb02914b1002283ea107388 frame00000737 +03fb1a805fb02914b1002283ea107388 frame00000738 +03fb1a805fb02914b1002283ea107388 frame00000739 +03fb1a805fb02914b1002283ea107388 frame00000740 +03fb1a805fb02914b1002283ea107388 frame00000741 +03fb1a805fb02914b1002283ea107388 frame00000742 +03fb1a805fb02914b1002283ea107388 frame00000743 +03fb1a805fb02914b1002283ea107388 frame00000744 +03fb1a805fb02914b1002283ea107388 frame00000745 +03fb1a805fb02914b1002283ea107388 frame00000746 +03fb1a805fb02914b1002283ea107388 frame00000747 +03fb1a805fb02914b1002283ea107388 frame00000748 +03fb1a805fb02914b1002283ea107388 frame00000749 +03fb1a805fb02914b1002283ea107388 frame00000750 +03fb1a805fb02914b1002283ea107388 frame00000751 +03fb1a805fb02914b1002283ea107388 frame00000752 +03fb1a805fb02914b1002283ea107388 frame00000753 +03fb1a805fb02914b1002283ea107388 frame00000754 +03fb1a805fb02914b1002283ea107388 frame00000755 +03fb1a805fb02914b1002283ea107388 frame00000756 +03fb1a805fb02914b1002283ea107388 frame00000757 +03fb1a805fb02914b1002283ea107388 frame00000758 +03fb1a805fb02914b1002283ea107388 frame00000759 +03fb1a805fb02914b1002283ea107388 frame00000760 +03fb1a805fb02914b1002283ea107388 frame00000761 +03fb1a805fb02914b1002283ea107388 frame00000762 +03fb1a805fb02914b1002283ea107388 frame00000763 +03fb1a805fb02914b1002283ea107388 frame00000764 +03fb1a805fb02914b1002283ea107388 frame00000765 +03fb1a805fb02914b1002283ea107388 frame00000766 +03fb1a805fb02914b1002283ea107388 frame00000767 +03fb1a805fb02914b1002283ea107388 frame00000768 +03fb1a805fb02914b1002283ea107388 frame00000769 +03fb1a805fb02914b1002283ea107388 frame00000770 +03fb1a805fb02914b1002283ea107388 frame00000771 +03fb1a805fb02914b1002283ea107388 frame00000772 +03fb1a805fb02914b1002283ea107388 frame00000773 +03fb1a805fb02914b1002283ea107388 frame00000774 +03fb1a805fb02914b1002283ea107388 frame00000775 +03fb1a805fb02914b1002283ea107388 frame00000776 +03fb1a805fb02914b1002283ea107388 frame00000777 +03fb1a805fb02914b1002283ea107388 frame00000778 +03fb1a805fb02914b1002283ea107388 frame00000779 +03fb1a805fb02914b1002283ea107388 frame00000780 +03fb1a805fb02914b1002283ea107388 frame00000781 +03fb1a805fb02914b1002283ea107388 frame00000782 +03fb1a805fb02914b1002283ea107388 frame00000783 +03fb1a805fb02914b1002283ea107388 frame00000784 +03fb1a805fb02914b1002283ea107388 frame00000785 +03fb1a805fb02914b1002283ea107388 frame00000786 +03fb1a805fb02914b1002283ea107388 frame00000787 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-mad/NFS6LogoE.mad.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-mad/NFS6LogoE.mad.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-mad/NFS6LogoE.mad.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-mad/NFS6LogoE.mad.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,96 @@ +c1a150cb35240c0b9a4aa1bc28160d55 frame00000000 +1ec0122fa751a2ea41eaa319f73bf393 frame00000001 +4d9f15a323dc175e861b87463a314033 frame00000002 +079b421e4e6c77520aafa5dd9866b37e frame00000003 +9f1b98223a6276fd6d98e072eab59264 frame00000004 +40ece6be6092710180135f1914837613 frame00000005 +38bfd778fd34bcebd9a275260e745400 frame00000006 +840fb4695241e304da19ead17a72e881 frame00000007 +37f1e62944a51daa9e486cc5a3691fa5 frame00000008 +93ab6e7f3788c4a1875fe6abc6951381 frame00000009 +b2617a4142c9fa3ae5e8142c5edf7ce5 frame00000010 +ef303d03fd734b1bf362712a92fdf4b4 frame00000011 +38d3e53973720dba6f077a792048c90e frame00000012 +7e5529b02bb125e693a116aca470d8d3 frame00000013 +799a8764e86c7c6c08e9712a1e60c557 frame00000014 +55f24789f63a381f1415c05d36a34f99 frame00000015 +c1ea05ff8f67073d771ed19c6bf58f9a frame00000016 +24cf84474aa62ae25ff066aeb8ca90fb frame00000017 +21c38e4a6a2f5c108c1e6a1539195e90 frame00000018 +1f1281be372eb1e8ac4e960be1f6d36b frame00000019 +f544e36f5dfdadb1b45d51ca850dfcad frame00000020 +91b24a4c7f09e8219cca7b0d73e977e8 frame00000021 +1ac6a029b5f032790a87d20f7dd28642 frame00000022 +8d17b9745bb8b968b8c427ac95f66689 frame00000023 +e36e441fd4368b12f242947acc85dd1d frame00000024 +a2156c66eb69cee9e36a52429d8b670a frame00000025 +deee17be385768d489e4956328e08166 frame00000026 +6b7ca3a847966f8323f5f9629fb838be frame00000027 +0870a360e50391194c8f3147349b1b0a frame00000028 +eceae476e6c83d85720a7af52819bb45 frame00000029 +551a706202d58bb724a943d2877a3be8 frame00000030 +808d219a55a2214dad30cfd40478a66d frame00000031 +2fbe4abb83868b50a74f541e46207d4d frame00000032 +29d3900a8cd471888a3e455d48f55581 frame00000033 +a2587ed1fad5577f3c2a2d726e52e552 frame00000034 +5ef4750bd13dd1f5e63480a6dc0cf4c4 frame00000035 +65db0c167d6b136a179b4cc657bc01af frame00000036 +97866f20168a664c3dbcf292a5dacf51 frame00000037 +03ee9ccce253a0534111037c818ba7b8 frame00000038 +976158c244564ce2b577735333405658 frame00000039 +ecb742041223821818e51daa69756c43 frame00000040 +da8b6c52d3a0523f968dc04b0983271d frame00000041 +23a9f9b8d47b9fa4c28250d4fcf1d8e1 frame00000042 +7faca97cd30dfdb3bd642be3723a143d frame00000043 +88270b17c37f7ff7eb804afc83356d23 frame00000044 +9a312968d1af31238014de13fa444005 frame00000045 +92c5a18ef41865cfc8d7a23c783b7e80 frame00000046 +882271defb516185ffa69ee269f1e252 frame00000047 +7841619b20caa6ea7546c78bc7c6e4a0 frame00000048 +637ccc9028b561b27cb5cc78d68bf6fd frame00000049 +1d20cb6645d339c0554a13640ada8605 frame00000050 +3e56aea2f4663cd53284bf7b9570df35 frame00000051 +71cd60ccb5a02f47312a351e4c8dcee5 frame00000052 +cbff17910a395df03e70e0371eef0118 frame00000053 +941b1a4dd4023f02b86b91a7f4e50d34 frame00000054 +3cba7b6371ab15c5e8723e1ae252a5b4 frame00000055 +4a66c7a7acdb0ad1d372cceb7fdedff3 frame00000056 +9f1f2ebe43217547f8e9839c20eb0bc0 frame00000057 +13bb81c50a4b61e27791e0c984b99e45 frame00000058 +6a2c04f8bf4aaed99e8d991db661a2e6 frame00000059 +b0ccdcb68b385c91a0f8ce9c6579bafd frame00000060 +f80171ed92eae7833e4b6499e32a34c3 frame00000061 +1f87c2123cfc1a4ea16391844d8c0cda frame00000062 +3bf0452af2aee2e810dbf7c5db931e6e frame00000063 +1393d9679eb6582e505c7c5d8bf0d695 frame00000064 +664cf0cf1a3866ca6a87fdfebfbd7649 frame00000065 +2b82cfc752a1f5d55cdf71cc6e6ac7b1 frame00000066 +2b70241dd956bab3b8f42dfe5e659ca5 frame00000067 +98b429b0193b0f489755619b53289837 frame00000068 +d36b1501c79f640d5c71c0b68edc29f4 frame00000069 +2d4804ad33de725e076d6b792c4c0de4 frame00000070 +cc7b9ced9a966b5872c486838300af5b frame00000071 +c1fe0b06392a93b7b5e643688f021bc0 frame00000072 +0787cf6191bcb7a3f4a300bdfa04455f frame00000073 +cc08d8f6df1d16941bd7ab5f80d0c5f3 frame00000074 +2bab69443098e084ce49f01d113295ca frame00000075 +a33f633f04284bff87b75874e4ff129d frame00000076 +2f6e87a719f8d6a74dba455fc17af01f frame00000077 +de41f4352359366ab4ea5c5b92bb88ab frame00000078 +0b1e575ebf8b73c968a037c3ff226013 frame00000079 +b131d5ea6677bd16121c1cfec7ce0bbf frame00000080 +d98d307cdce0b3dd9efa22bc7ad12913 frame00000081 +977985809a5ca47c163caf04221659c5 frame00000082 +a2a6363cc2f10c3ac4548bcd5b21da57 frame00000083 +ff9e75e72c080b93badee5155b3c544e frame00000084 +051e29ba1119e9347e04b736efac6424 frame00000085 +fa964120ade8ae1cc0361ebb2fab2068 frame00000086 +3800245ce2efe724c52c03dedecf06aa frame00000087 +3800245ce2efe724c52c03dedecf06aa frame00000088 +bf6436c89f47c0705fa7b5bee3b3adf5 frame00000089 +5484dff52376662e57e4ecc4fb45c5d2 frame00000090 +5484dff52376662e57e4ecc4fb45c5d2 frame00000091 +5484dff52376662e57e4ecc4fb45c5d2 frame00000092 +5484dff52376662e57e4ecc4fb45c5d2 frame00000093 +5484dff52376662e57e4ecc4fb45c5d2 frame00000094 +5484dff52376662e57e4ecc4fb45c5d2 frame00000095 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-mad/xeasport.mad.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-mad/xeasport.mad.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-mad/xeasport.mad.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-mad/xeasport.mad.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,150 @@ +2bfd7f701f1ee8bd1c1abc9a23404a82 frame00000000 +2bfd7f701f1ee8bd1c1abc9a23404a82 frame00000001 +2bfd7f701f1ee8bd1c1abc9a23404a82 frame00000002 +2bfd7f701f1ee8bd1c1abc9a23404a82 frame00000003 +2bfd7f701f1ee8bd1c1abc9a23404a82 frame00000004 +2bfd7f701f1ee8bd1c1abc9a23404a82 frame00000005 +2bfd7f701f1ee8bd1c1abc9a23404a82 frame00000006 +2bfd7f701f1ee8bd1c1abc9a23404a82 frame00000007 +2bfd7f701f1ee8bd1c1abc9a23404a82 frame00000008 +a9ca49d086e24945c7b7083eccea6039 frame00000009 +2ffa666ff845a0cc4cfc9176fead923e frame00000010 +f35d96c175bd0cba342dd1b5140e5cde frame00000011 +fb4d384296bc14e27add95f2d765633e frame00000012 +1978455c0f56e6b7c10cfaf5a8d0db5d frame00000013 +e445e1032078985ecc9128fbc3c1167b frame00000014 +a159b387c070c7f867fa04df39be033b frame00000015 +b692228a365fe9ad945a612cb36f16a0 frame00000016 +489e763086224e369069f386ca458b0a frame00000017 +328eba76811c943768f5d1b2ccd9ccdb frame00000018 +1e78d611e2722b1a8859b1470409dbd6 frame00000019 +bb9df9c5260dbc84b42e3b43f3e717b5 frame00000020 +e8fa6931ffe2887e2251bcdc1f04319e frame00000021 +ecdeef9e3d0e112b85580f3fd8b8a021 frame00000022 +e4545ee93fe41b71687f310acf3dae69 frame00000023 +98456b4e06d9637d6fcbf35eba39f988 frame00000024 +c0a82aac2607361519e28bc08a5d4061 frame00000025 +f0f1245cafc99a00c842f9824a524dd8 frame00000026 +e94bc55c0fbb2bb0a82a03c17c25c5f6 frame00000027 +0af42c558af8f446b8c8abb51f5fe25d frame00000028 +1baf28372cf23af6889deb2061e344f1 frame00000029 +b73601f44f8e8ed1e45d93bf97f49273 frame00000030 +302ac23982dc925171bfa8b0486af658 frame00000031 +f988f4cdb692ce5a67aae41c249c66dd frame00000032 +812250090c1b7f7c648cc6238a164c7a frame00000033 +b85d40aaebb92550f731d811a4e47e19 frame00000034 +e70cb3ce66f867e24de431bb70c15716 frame00000035 +9dae723cc38e18410fd251447272be68 frame00000036 +b79936fdcc6d2f0efd3d0a33e198793b frame00000037 +29ed1313e660ce896a4c104b2b2afb0b frame00000038 +3d62ccd662d84e768bf06e04ed343ad7 frame00000039 +1443f92dfd53a8533067675db966977f frame00000040 +11a8132554de68a39836c47a8573d347 frame00000041 +c8ea0c16bf7167ef251adee715398706 frame00000042 +a9ca8b11f3e8a95ef37a83f9b9e3c71a frame00000043 +f19eafab4de724bc0b4f1235477608c9 frame00000044 +869cf00531a10c6c5a7a5158c097f10d frame00000045 +6b16d23f74ebffb0303ede8a2a8867af frame00000046 +48c5eed3b1d11266eda6120d09f40739 frame00000047 +3d78b5254b46f1cb600d0731210e4d7c frame00000048 +7d13c5bdc83109d1556570baae16dbdf frame00000049 +d381a2edc271782d4487c20086698f2d frame00000050 +dbc82237b1e970e1591e06c4de87514f frame00000051 +a4d26921e534a142920e59e98b7ef7e3 frame00000052 +b935502b8e826faeb2d713fdfe21d5a4 frame00000053 +90225c44fc58eff5c2ebc82441def178 frame00000054 +fd84a57d1c2a34dfdddbf01d427967c2 frame00000055 +f2b892117bb95b8a95ee64ee13b52922 frame00000056 +93ef74169b663f9e6e0fb25ec8b03cc2 frame00000057 +d9e67d53b48e1e4b6537101d37f4f9a7 frame00000058 +9078cdfb60d10d391881d4bd222f4f5c frame00000059 +2694cb1b2f08b90efc3dab35cd3b20f2 frame00000060 +4892bcbcf8531cacd61af95fbf0e5cdd frame00000061 +f9122942ee090c19fb3fcd57f0cc118f frame00000062 +89d375a951d6790302534db375b453fe frame00000063 +bf646bafd148c14e2a1c4937fe339d4d frame00000064 +441e033bb39d65fffa389ad13a6315fc frame00000065 +86c295b802d4f36d3f495e09d1d28e32 frame00000066 +0f039bfd84f52cb4c44410ef51aca2d5 frame00000067 +39a64d3f5ebadae79b7c87fee4f9a75b frame00000068 +129c51e8565a389e43a16f4bfbcf50d2 frame00000069 +9aa796a6f92c6f943f246019c23d8cc8 frame00000070 +7c0e5297f07194cd4a8f8b29b451ea10 frame00000071 +77d02ded6e8c0019dd094696f4498d5d frame00000072 +ff38c548ebe8e6222523dc144e1aad7c frame00000073 +96c90d3799a1ea55b60dbebadaf50324 frame00000074 +6cd4b2da545d59d3d1a3c56b83260d06 frame00000075 +a5e7c84c0e4f8d84acbdaafd3e86e838 frame00000076 +e88ed336b6e74e862da3b2cdfb886c28 frame00000077 +f68c69b7a205d8f5779608f23ca56e8d frame00000078 +fcaea95f059909b18654331cb2903e68 frame00000079 +712b603497866e158c100880f2d8eee3 frame00000080 +0f21f59d02dec85870f4d0a1a65cddcc frame00000081 +918651800b05687b1113c677aff2a967 frame00000082 +a8152af2a9e959d72d27d0ad290dd146 frame00000083 +e358cecfdd773a6a2ebbc1a8ba8ef047 frame00000084 +6eb891ce1354d489bb07ebbdf03dc3bb frame00000085 +77964e4660737213f08583a9be29d34a frame00000086 +b6c9b0db631cecc1d70dafff8d9f7133 frame00000087 +58b56f905a34e4ebc913fcf6c34b8f96 frame00000088 +f3252cea5d9d9840a953d02a647864b7 frame00000089 +d97ea713100a290d272d3462011d718d frame00000090 +54c3671d6b9485c8db97d857112ebc04 frame00000091 +3623dc7e2892200b8266dd8c4ee60cf3 frame00000092 +8972c33b0fa2ca6606fed8919ff3f729 frame00000093 +33bf809a5bd9b9ee108f017d899615d5 frame00000094 +693a1488dbeb99e1e00e9344afbe11fa frame00000095 +7ae342e9d65db55480186a2564791e38 frame00000096 +c286f10592adb29c7229af39d608e2c2 frame00000097 +4f60bc1d6fdaf0de3ede4cbcf9d71c06 frame00000098 +15e412f5a35f3d6f7aac75671b6f8159 frame00000099 +c371e7d61e064aa1dde57398854bfcc4 frame00000100 +a56ca5efb73743a094e0cb90edd29311 frame00000101 +c3ef0081d09f2cb019424357a6202493 frame00000102 +53f772ceeee184bca26d3bc1e398a453 frame00000103 +99c587e4a42c6d2f86f6eaf039aa4e42 frame00000104 +4f26a3251632bb0afef0e1dc62183cb8 frame00000105 +06e788cf9dfa945efbb9db3a12fda15f frame00000106 +b53344bde5f137b9b5274f7bb3abafa5 frame00000107 +ddd252bc766b35e518ffa5e95ef66ece frame00000108 +e58005c4c06f989998c496ba3384ed40 frame00000109 +1476855e768e1b2f05d03d3fa4dc0067 frame00000110 +1476855e768e1b2f05d03d3fa4dc0067 frame00000111 +1476855e768e1b2f05d03d3fa4dc0067 frame00000112 +1476855e768e1b2f05d03d3fa4dc0067 frame00000113 +1476855e768e1b2f05d03d3fa4dc0067 frame00000114 +1476855e768e1b2f05d03d3fa4dc0067 frame00000115 +1476855e768e1b2f05d03d3fa4dc0067 frame00000116 +1476855e768e1b2f05d03d3fa4dc0067 frame00000117 +1476855e768e1b2f05d03d3fa4dc0067 frame00000118 +1476855e768e1b2f05d03d3fa4dc0067 frame00000119 +1476855e768e1b2f05d03d3fa4dc0067 frame00000120 +1476855e768e1b2f05d03d3fa4dc0067 frame00000121 +1476855e768e1b2f05d03d3fa4dc0067 frame00000122 +1476855e768e1b2f05d03d3fa4dc0067 frame00000123 +1476855e768e1b2f05d03d3fa4dc0067 frame00000124 +1476855e768e1b2f05d03d3fa4dc0067 frame00000125 +1476855e768e1b2f05d03d3fa4dc0067 frame00000126 +1476855e768e1b2f05d03d3fa4dc0067 frame00000127 +1476855e768e1b2f05d03d3fa4dc0067 frame00000128 +1476855e768e1b2f05d03d3fa4dc0067 frame00000129 +1476855e768e1b2f05d03d3fa4dc0067 frame00000130 +1476855e768e1b2f05d03d3fa4dc0067 frame00000131 +1476855e768e1b2f05d03d3fa4dc0067 frame00000132 +1476855e768e1b2f05d03d3fa4dc0067 frame00000133 +1476855e768e1b2f05d03d3fa4dc0067 frame00000134 +1476855e768e1b2f05d03d3fa4dc0067 frame00000135 +1476855e768e1b2f05d03d3fa4dc0067 frame00000136 +1476855e768e1b2f05d03d3fa4dc0067 frame00000137 +1476855e768e1b2f05d03d3fa4dc0067 frame00000138 +1476855e768e1b2f05d03d3fa4dc0067 frame00000139 +1476855e768e1b2f05d03d3fa4dc0067 frame00000140 +1476855e768e1b2f05d03d3fa4dc0067 frame00000141 +1476855e768e1b2f05d03d3fa4dc0067 frame00000142 +1476855e768e1b2f05d03d3fa4dc0067 frame00000143 +1476855e768e1b2f05d03d3fa4dc0067 frame00000144 +1476855e768e1b2f05d03d3fa4dc0067 frame00000145 +1476855e768e1b2f05d03d3fa4dc0067 frame00000146 +1476855e768e1b2f05d03d3fa4dc0067 frame00000147 +1476855e768e1b2f05d03d3fa4dc0067 frame00000148 +1476855e768e1b2f05d03d3fa4dc0067 frame00000149 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-mpc/THX_logo.mpc.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-mpc/THX_logo.mpc.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-mpc/THX_logo.mpc.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-mpc/THX_logo.mpc.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,150 @@ +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000000 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000001 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000002 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000003 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000004 +ccf8aa6a43c2a9a995ef9dc5266807cf frame00000005 +dc5cc25e626afe9ffb6d0f14ad7ceee7 frame00000006 +544f5c427d7e70c76e47f2c89e074485 frame00000007 +98aa2b340d28c319ecacad5aa8e214cf frame00000008 +319e98430c451fb7d94529b982ff67fe frame00000009 +9b90cf3494cc4bdbfe83f2d1d860bf0c frame00000010 +45372f9194c59661e699bd1fc7eb840e frame00000011 +9bb8fe3396f88b123ad218b506afb9ac frame00000012 +164ab950d814f4b1feb0983506fc92b1 frame00000013 +8bcbebacb7352f93d9593cc9fe805368 frame00000014 +73691fff9e38e12ad490584366f9d289 frame00000015 +4d91aaa64abb2686a7f3a7d95768655e frame00000016 +f3555eb2a0ed5fbe2d7df1b5cbcb79ec frame00000017 +89d1c4661f2478fe8a0c5d6612e54862 frame00000018 +6a5790006dff7c44fa8e8d66895bbcec frame00000019 +e530f0d00dff9b2cd90fdf5df7abc75d frame00000020 +a89bd5bc5d61fc6000ef0aab540b3a6d frame00000021 +e41fa97037b3ae39f0968815265c8b10 frame00000022 +46f6c13a5a0d81c5ae9a1e993d02b2b8 frame00000023 +5541daf3603209081c6053b72b86b0a0 frame00000024 +bbfb5c2b32bbd76ec5051b564914389a frame00000025 +0cb7d843a5ec4a49b991c26278ee39fb frame00000026 +629ff00732a005869ed91a7059b3e327 frame00000027 +4ee1ec9021f07f822709803e8a06aa4a frame00000028 +a9c94c1f2c7440b4f74bac7f5ca031e7 frame00000029 +dd31d7e0cd91cb806b2c1677baeac3f3 frame00000030 +0b991a5bf5cbf2bb20f774a5db51c400 frame00000031 +a75938d75c464429b3984f8ec45fcbf1 frame00000032 +695687fff946b0b5bf15d181d9620fba frame00000033 +6d363b1456b242a6f3a2718e67c034f6 frame00000034 +675632f294149d1c97a53a84d5491431 frame00000035 +c2f0669be034d3e3d3d471f8f0953012 frame00000036 +76fa20b78a9b43712ae6a575d9f511de frame00000037 +9b3627f20d93ff035e824fef8bee1016 frame00000038 +aa4cae0aa2604dccb17b53342b0d47ea frame00000039 +fe0cf5c25e02d95ae0cb1eadc01d6f43 frame00000040 +ac0008ddeefe726f7f14ce9706fe6113 frame00000041 +f3466ae1b36ac3fed4346659c2856990 frame00000042 +ab6ae36d1901a0d15fad9c43d586c3ac frame00000043 +9658787925a8c3160734d8a653bf088f frame00000044 +c0552717939cf656d1aabc42ec33429b frame00000045 +29decfe0aa9be4ee2810fc07336a3331 frame00000046 +82fa2fc0ff493edf61b704a4ef4d53ab frame00000047 +2a14afc848a4166b55c16ebcb2594f24 frame00000048 +9da0d67b56e350b35f99cefad11ccab4 frame00000049 +00f342f59295540da6434790a460708f frame00000050 +0f7137f8333837d879dc53d35d5bd8dc frame00000051 +7dc55d52ff4c479edc50096437101b65 frame00000052 +1f364ef00d975abda0095060976e54e3 frame00000053 +e15a7b1a40c1b1b6b001b25d2dc304e7 frame00000054 +10657dcac92e2fe04ea7f2c30d03100a frame00000055 +b4ac819e922f549763b08cb687dd98e6 frame00000056 +879111105310057c7fb10755161aebcd frame00000057 +2222c1dc5a76676f7e40d2940b034ba0 frame00000058 +7e36c9eb118fda605befeb004337b490 frame00000059 +e7af34ba21a4f18e2fee134d390fd7ed frame00000060 +f8e4c22ac9a48bb60237a29841481183 frame00000061 +1722a38854fb23ad9d59d36a5f144808 frame00000062 +a0d1129841b9c15b7c3928704b6bbb67 frame00000063 +70cb37acdb3d493bd1417f65fbf5e8d3 frame00000064 +ce5985b567b5cec7c3f8511795de11ee frame00000065 +6bff270be60ce3038d6bc5fc4516a5ae frame00000066 +a8a2900e441f304eefcf000a02e801c4 frame00000067 +c13bb4bdb0c42e69fcc5f50378ec089b frame00000068 +01298ecdc576cf25eda0866540137315 frame00000069 +54cec3fc2b9e6181d68221f2d970d31d frame00000070 +1d4b9faec18b2c63ab98a1fd455c6956 frame00000071 +508862854cfd3f047e73e167d595075e frame00000072 +e1a364e14d4ec80ab7beefb9939c0fdd frame00000073 +ef1e283f5ebe71ad22011e8d8b2b917c frame00000074 +ae7a9b7858bc78d966125c38c19b41fb frame00000075 +c0c697846ecbc5b26a7e4b284e7511bb frame00000076 +74ae01e912122bd49dc3f37ed430bcfa frame00000077 +825c19e87bd9e3ee1a8149db3f39c631 frame00000078 +3261dc4b9120e65ccba4621981e80271 frame00000079 +fd9136c47ab2a8eb2cda9a22e98a3bb9 frame00000080 +db10169299b8b7be5114ca2c9cd5efae frame00000081 +413d404cf57c635d1a512cd2d905daae frame00000082 +bcc384993710a214d6c772eef9d139cf frame00000083 +0a976c6b4e8d628337dc00c2dbd864e9 frame00000084 +30187cae6ba9a23a82d0f4b7978c0c8b frame00000085 +e22c458ae815d588de6b8565b331821c frame00000086 +a8069e41e75f892228aba0073711f567 frame00000087 +dee0cd58502eace74f556d256b28d942 frame00000088 +c16a9fdc4bdd3258867afe7d80a0ce85 frame00000089 +7f84b9cec89f588f5a8edd764078f696 frame00000090 +50b524d7bbe962437e0775c8be0b040e frame00000091 +1cf42d2fcf1fd8641ff1a7c911a9f989 frame00000092 +1b07511d2bb36ecabf96bda88169e98d frame00000093 +132e8761e632222977380cfadb43ec2a frame00000094 +b283d063a11a505b3c9698202a40e27f frame00000095 +7e85167f2eac20620613b450023d0e67 frame00000096 +20b402ef21e5fdc2972cbbb5ea405a2e frame00000097 +0407249873285523138a4ed6615d9640 frame00000098 +09725d22207d2721967a135cb20d9d16 frame00000099 +8badbbec0272da813b65071363a1dc64 frame00000100 +a09178c367dbdb29f56bf540107a2843 frame00000101 +aa0a9c4386f25827b30f24e9e21702ab frame00000102 +1399fbc5c9ca8f5340411f95852dc08e frame00000103 +cf63bd02b410277919b88c5bb6cd456b frame00000104 +a1b572129db79d8ac32899a2ae97f6f2 frame00000105 +1630f38295bf9e6a5560c341e4dee0a9 frame00000106 +5fcf2eaf9098bc7166fa56b69b6c4f5b frame00000107 +4a4083f076298fb2dd5a18529eb82047 frame00000108 +023a4af38301824c5784eae6f10f555d frame00000109 +4b993d17e81d393d71f3572f038e9c77 frame00000110 +66648f8a5dc10e24d54d178ebb9c8e49 frame00000111 +c3f36c05079e18a0ff5fd04fa932db02 frame00000112 +6dc8985a1fd47ec048847779a8072ed9 frame00000113 +414308f8d1d3f8a3cd7cd74398676dd5 frame00000114 +4e60bd524c47b97fc9286f9741cc914f frame00000115 +38ebeeddbee6089308bc6ce718784ded frame00000116 +b9acb12ca3f8323026954030b3d1a4ad frame00000117 +f5e37d16e1ccef20f1d8d0fd4feb5a11 frame00000118 +953306d3f1b710c8bc6d3b869e62ee9f frame00000119 +06be7e607ab5ce0a5a5e7419f22d77a9 frame00000120 +12ae9273f6a0dd38cc099bcb62a0156c frame00000121 +6f64b463a060cf55c0abf6eba5a0b9a9 frame00000122 +8f8d6d656e1a89f031140de0284164bf frame00000123 +c95117cd6be3f84136b3fd4ac68eb159 frame00000124 +025238f3e09381a4e97854e12eab5b07 frame00000125 +dad680d6f14fddf64e83d788b89750cf frame00000126 +0b6fc22deabf540ac7110f288704926b frame00000127 +4713160f9d39b984b4f9ccc38a64579e frame00000128 +55d9265957dfd05442adb314d14b1e48 frame00000129 +b4a4d03b8506cbd4a8aae2cc6e9f71c0 frame00000130 +008e4669fa01ae08e7f0da30eb69151b frame00000131 +dce2de5d316c0c8c497beb87be0ffb60 frame00000132 +f6861970549bb21b9a93df6aeb5b276c frame00000133 +6b6cdca8f43cd751b7d139539f6d9761 frame00000134 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000135 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000136 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000137 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000138 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000139 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000140 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000141 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000142 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000143 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000144 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000145 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000146 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000147 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000148 +e0cabd7caa3cdc6a3f50e44aeeed5530 frame00000149 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-tgv/INTEL_S.TGV.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-tgv/INTEL_S.TGV.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-tgv/INTEL_S.TGV.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-tgv/INTEL_S.TGV.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,38 @@ +0d0461981c4da261fc6bbfae4598a6ac frame00000000 +f9c41fb515662aaa255d871d6ed323cb frame00000001 +4896ac131966a223f6209e773806d6f9 frame00000002 +4fe1fbf128b67c109ff7b2b56092daab frame00000003 +54a6390e4265d29e831ac78c75d02ce5 frame00000004 +0156da13669cedd2a83771415baaf517 frame00000005 +05333f457bfc92751da2df836b1291a6 frame00000006 +3d13fcb612516de0a46048c95e6952ca frame00000007 +63c25b2f3d01f7b9ba015ac37bf94324 frame00000008 +d18983770edac383f63130839dcfbb7b frame00000009 +48c5482a1d7a7aa9ca025ab8f9a2c31b frame00000010 +a8ac0b0102e16f777aa37770a6a9d593 frame00000011 +5d93151ed7db9dad231eac87d16ce6d5 frame00000012 +3215f2deab04b13685c131c27e7c3936 frame00000013 +8df14844422b3e49153bd92d0c456c07 frame00000014 +cad1e5f5f7ba706a143d91c740f78c16 frame00000015 +3ed7ae94ccf53360aa6a2f391f28136d frame00000016 +47227d9c1ae525ae56a8b6acd3c6f626 frame00000017 +7d8248b31b11e2c232acc9ec9c0fdd04 frame00000018 +945f6e1e7c705e267cffae02a4a08832 frame00000019 +dc027b09aed87d527bcaa1e59931e988 frame00000020 +8c47dddc52f818c6f53e8f69a47e2997 frame00000021 +257f437803ca818b9918dd6be159f279 frame00000022 +a210ad27fee5764a57c1ca7a73bb2078 frame00000023 +a3e54edbf9600b40c1cf8998bb5fdaff frame00000024 +a7dec9dde8a8736a22158556a061d381 frame00000025 +9d0de638f5329f38fe58368a8c42567d frame00000026 +e09a37d2c7c5c943df428b3ba71726af frame00000027 +d026628b9cdf224a97b2408e0d212a5b frame00000028 +892bf1580be52f6e7c0bed27b81bd82d frame00000029 +9f67747b4fbd2405e389515bc4e437a3 frame00000030 +5fc3d8b5bdd6d26d7f5139774506a663 frame00000031 +1c14211c0f9c992de02e7bbd0d771cb0 frame00000032 +f4bca2d023e4ba3d02f630b346a12648 frame00000033 +18fa5b9f4e1f56392fa27cc4cdc5ce45 frame00000034 +253ee96df8bb368c2d8e30ea05703f25 frame00000035 +4047f2086f805456c5c47f0a33ed8b48 frame00000036 +e9352443fd90665c22d1f50ab704ab63 frame00000037 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-tgv/INTRO8K-partial.TGV.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-tgv/INTRO8K-partial.TGV.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-tgv/INTRO8K-partial.TGV.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-tgv/INTRO8K-partial.TGV.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,47 @@ +8e4dd5c5c31a54672e30503f6ee13321 frame00000000 +8e4dd5c5c31a54672e30503f6ee13321 frame00000001 +8e4dd5c5c31a54672e30503f6ee13321 frame00000002 +8e4dd5c5c31a54672e30503f6ee13321 frame00000003 +8e4dd5c5c31a54672e30503f6ee13321 frame00000004 +8e4dd5c5c31a54672e30503f6ee13321 frame00000005 +8e4dd5c5c31a54672e30503f6ee13321 frame00000006 +8e4dd5c5c31a54672e30503f6ee13321 frame00000007 +8e4dd5c5c31a54672e30503f6ee13321 frame00000008 +8e4dd5c5c31a54672e30503f6ee13321 frame00000009 +8e4dd5c5c31a54672e30503f6ee13321 frame00000010 +8e4dd5c5c31a54672e30503f6ee13321 frame00000011 +8e4dd5c5c31a54672e30503f6ee13321 frame00000012 +8e4dd5c5c31a54672e30503f6ee13321 frame00000013 +8e4dd5c5c31a54672e30503f6ee13321 frame00000014 +23e5aae569dc5f0fced0e89a9344b527 frame00000015 +9e7099eb485c130269c442653b26dfe6 frame00000016 +6a591d5e3e69ce4cd2db84f12cd06864 frame00000017 +bad9e2a38fe2d82988756c1167efdcb3 frame00000018 +72210a58e919b6aba74760827e09e878 frame00000019 +e863881bd356ca99291a131cd635de1d frame00000020 +5ff17783ddcc0fc077df0ad2bd1502e5 frame00000021 +09a237ae6c2bc138e2e6eb2c66ab0ace frame00000022 +c46463a144e70dc01d2a93a68f07f2ff frame00000023 +02b49b6e643f9af94a0bc934a9691407 frame00000024 +2a78d20cf1bb1f2567888864da05f5a6 frame00000025 +5f58be230b3f4b5ca3867ee9fe29616f frame00000026 +239abf05d469a359f2aff0cef39f00a5 frame00000027 +ce24b54a02a2df9e31f409065ecb2e02 frame00000028 +23dfccbcb2120c6b27edeb6998a45a3a frame00000029 +e8dd5b639bd80ead8e16d090f931d8d3 frame00000030 +d78fee4d22b1ff8ae50493b3d00444b6 frame00000031 +c1424b9aa21e44f51722b03e2e7ab877 frame00000032 +61bfebbfd677d7b2aac26b0ca9e87d43 frame00000033 +a786a55c042ebd2e19e4b06e694a2cb2 frame00000034 +ff3d899ad8aba979f40d8148e33045ae frame00000035 +41ea1b9c4325f137b13169a473604584 frame00000036 +53d3c8c45a58594acda634dde033f6df frame00000037 +ebddb7f55545fd4c1a9df5534f2fca0c frame00000038 +78bfa080fbd93c005061f98c59c9a92f frame00000039 +5b13ad6f7ccd4a979f1ed0b00913e6fd frame00000040 +42dd9b5e5e7e5b832b3a981d0a198f44 frame00000041 +c068c475c8e17dddcf5e07bae4f866f3 frame00000042 +c3e4b9056fcff007bb6d2da1f3a6ef76 frame00000043 +246d2afcf60eb1ce022bc7fe286f7704 frame00000044 +1c8fa543a6e6a699bbe3342761aa1c34 frame00000045 +e3b9796509fbea08193cb79c7fd69358 frame00000046 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-vp6/g36.vp6.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-vp6/g36.vp6.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-vp6/g36.vp6.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-vp6/g36.vp6.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,133 @@ +de3ef58b75d5050ce02f7aba2d164d8f frame00000000 +6eb6c4a7fada268162b2374c8c10f299 frame00000001 +d0a99d21652f9388aecc90ade55b5bc7 frame00000002 +b1da933fc9d3bc0f42b66073deb71091 frame00000003 +a139426313ab25c3710da0721e0e6686 frame00000004 +b9dd2b6544a1684369b3a4004e6ec8f0 frame00000005 +2c8cc42278cece663579ce28d207654b frame00000006 +ded3dd6639cf19914d56f0138acc4fbc frame00000007 +4ec5a2db031606c20a345be2a94f9fb3 frame00000008 +2f3b1be53b0f5acf0c188150b5d439dd frame00000009 +abdfb787a29749ab092f9150e07ea551 frame00000010 +b720b252fd6382489ebb1a66975b2d6f frame00000011 +aa813996c9abfeb137ac49782952abe4 frame00000012 +e500c4c1dbeca4bc5dda0a69af62fa8e frame00000013 +72b97f9e20d5517f591f35ca5e526f4b frame00000014 +2f3f3e96c78b42c3ee57fbde2e62ac31 frame00000015 +4e5034ee0a1c1809843edb089f7bf002 frame00000016 +1b6f49c6ad1a54f3415d57c577324af1 frame00000017 +9e80e0484089973c9e1a6d6964279626 frame00000018 +9b064c05c692413f30a7b2c2b79c69a7 frame00000019 +6c456613aec898fd152461189a542eba frame00000020 +e0175d36f4c799c507c07f5408f3c215 frame00000021 +0c72263b3669f83f946cce187a73f405 frame00000022 +463f9486fe4f3ce56ba72e3cfa3aa15d frame00000023 +3ba8212ac15564a76107d680c697d4c9 frame00000024 +b6726e204a1cc9347448eef63d5669b0 frame00000025 +ec4426b2e8f6cda67a411e99c2f19f84 frame00000026 +b4a0489bdc108f5eee984a01195ddb25 frame00000027 +2f337c738e81143c01651d9109f33f10 frame00000028 +035851ab9c851893727d338867306569 frame00000029 +e97771fe69f3fb8c33a6e83876d0d11c frame00000030 +c6d2c7f50d45c3070e6752d3ef4b3041 frame00000031 +89ddc6fdb3eadf9fb2248c5665ec7d28 frame00000032 +056fa2253fad7b8ba07ad0bc1b52e9f1 frame00000033 +3fb33b313080693991c470851950365b frame00000034 +4b770b904ae5f943c63f618a041b2ad6 frame00000035 +9c6e22402caa490e6324cc99dae27ac0 frame00000036 +afc4477ce1ffda74d848481c84728617 frame00000037 +1e908fd1880180263d2180d78e6b1392 frame00000038 +aa323d7c81b13ea37eb45b80315a5a4a frame00000039 +fca09bd67bd90ef5b4ec17d23be905ba frame00000040 +c3477e014f552d537cfd2679958d2bf5 frame00000041 +1d6e2778efc8365abcf7b9eb1c079819 frame00000042 +e98621e79438d87fd90fbcf43d97528e frame00000043 +54726321828c78eb0262876a65840989 frame00000044 +7917364a047648ce874d1a404c9e7494 frame00000045 +e7be36d5259e3c55a4a40ffab15ba867 frame00000046 +849defa9f4e101b2d967127c8da4f05f frame00000047 +e3efa494244dc54e09537a43b8878e00 frame00000048 +503189cb1dfd596882a9d1372d2d5ea7 frame00000049 +1c4fdf6d778af33038706413e4fe083f frame00000050 +b1bcb47950a6b475c886c93a478027c6 frame00000051 +5fd1bf2281e66a2037d969c5fa84c041 frame00000052 +2b643a719019aa652c9bb7b92aac6d62 frame00000053 +42b41afc7e60f3169d2437e3a6d102b3 frame00000054 +9eaed07a3c9721d3af3c22fd0e52f0ab frame00000055 +eea91983cde80172cff79c2b14766af6 frame00000056 +32d10ad43429e44781f35842597a00a3 frame00000057 +64a24ed2a2ffe8a3b68b2d635f9576db frame00000058 +039f9099dab5d300c26f710d7d4ff77c frame00000059 +eb3e64574a6a119fcb9b4e5c63a1a178 frame00000060 +1eb3c6aa673cf3ce3094d459d2e80861 frame00000061 +d9fb0363011604c19c29e96ab041afc5 frame00000062 +2b437ea7facd63e327bc37c44430ddbf frame00000063 +dfb90461c8dbce212433a7734ffe9ed2 frame00000064 +9a500dd4c18fd1872fffa55d0400f47b frame00000065 +2340102c695e33a9e4dcdcd837ad7852 frame00000066 +e2719e88f3543d01e67725314f8f3c9a frame00000067 +e896b54c256d4c730e2b068604fe67d8 frame00000068 +50ddd0212e485e557ba77e6a9a2de5ee frame00000069 +b4fd61fc53b088d7a78c2014881ef5d2 frame00000070 +7ef217c32a28fefc11fc35428e235acf frame00000071 +8f7b6d733bc6da01420484cc0f541a89 frame00000072 +b4f20cafbe5c409ca3766f1efb56302c frame00000073 +d6fedc57876a5719cd5c35e8d7885f4c frame00000074 +e9bc34de00da09d47262e5ea4b9bc345 frame00000075 +44211a0c8784826a8860736729f8a543 frame00000076 +4c55c5b786e479917f4e4c98c9739159 frame00000077 +2caa13b356b771c2d62002df07ae5d66 frame00000078 +525738d957aebacb62432bf3a4ef7197 frame00000079 +afbae8a5812d9c5a467c5ba9f8fd0de3 frame00000080 +2969f2d15aeb9868447f47c718779585 frame00000081 +2fd4a13a989dfa69a729aa3d9033dc14 frame00000082 +d2f24fc33557f0ab0b7dcf52005677c7 frame00000083 +ca7ea8adfe3aa57d5b9dedd0ce7c181e frame00000084 +facb9be7337ddb10c84e8140b99c191d frame00000085 +b357d8f9f4f33cd695ece7b571c8bf7d frame00000086 +c55c40a5889720af8e63f681fb362faf frame00000087 +8ab8abb8d6b45178917282a088db3a31 frame00000088 +a603ad44012adef6cc411b6a3a563a8e frame00000089 +a5aabd11883258a73876434bd808516b frame00000090 +7b5d96bff11c654bbd62594be13a0fb3 frame00000091 +4b7962b5b6e77d901398a18a593494b3 frame00000092 +c19e4078c27e858fb04d25ce86ce5f63 frame00000093 +56c2fd8137ab5f1b2192f9debb7de1ae frame00000094 +ed917f1da47f46a26c8954c66e10539c frame00000095 +2cb689cfc1cb40dbfd3b6bf0fe9bddfb frame00000096 +65315fd52d31123623ab2a76df05723d frame00000097 +b9c43e0f555de55450483c15f70480a4 frame00000098 +06385b40a4882e358441591bd38c4121 frame00000099 +9ea5b116f3a331f2bc411adda70c76da frame00000100 +386a8c1a6af3355a8eeb388ec755958d frame00000101 +53f293b7c396472ea70008acdcc2cb66 frame00000102 +44a44532d7109244e1e5ed5a2dfdd4d8 frame00000103 +517000c66cf2fee04e99b79edfd4b0d0 frame00000104 +28d5f80a59fb13ef514e1c6f25e52777 frame00000105 +86cb695848a574c4367ecb790a883e8a frame00000106 +6d4cd501a7bf1632031fee169add1778 frame00000107 +33c8d393fb489a6afa25336bdf3b69e4 frame00000108 +2a251c243c9d7a28ef5706dea7d33982 frame00000109 +d074a5a735e6b169a0a64d2780680f6f frame00000110 +3d1bda2ea41e615f92d231b8be936a35 frame00000111 +9326cffd77f5c7e0b25277107816c5a8 frame00000112 +7a50e346c8ed126dadd1221d57e81978 frame00000113 +1ec649697cfc1829d452987fcade6719 frame00000114 +d189575e889b0effd85c1516d465d109 frame00000115 +fe10b67b65e59e6e528dd75ec3cec57a frame00000116 +a30edc903d5fb6c6029c074466e02669 frame00000117 +9701e868c3249056359771ba0dbd9670 frame00000118 +35809c764505df20e043490229be63c2 frame00000119 +7c91237c09ed65aecef66e4114d9c9fa frame00000120 +ba4974bac0d7dd2277cbe80e13121e96 frame00000121 +a03fd8249d47c026d50204278637d0e5 frame00000122 +14599a0d4652bbda83dda8813107598b frame00000123 +0f127ba196081190f747cc84a0250cdd frame00000124 +5c37226ffe89fe9ca25bb7757413488f frame00000125 +5fb723ce20f27a4f0c03a3145b60c5e9 frame00000126 +0b1a8ca82f60a7539406b9556785fc20 frame00000127 +b1640f49f2debd1a81f41e66982ee65c frame00000128 +026efb4a20214b21b68b7a044a12975f frame00000129 +0d1f1c002a8902e5619c4afca06d7f8a frame00000130 +1e7d3fd22eec3f8bf4a00660c0dcd3a4 frame00000131 +f2fc3fed971293a4eb56b89bbacafdcd frame00000132 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-vp6/MovieSkirmishGondor.vp6.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-vp6/MovieSkirmishGondor.vp6.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-vp6/MovieSkirmishGondor.vp6.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-vp6/MovieSkirmishGondor.vp6.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,320 @@ +795442a81fa92762c428835bb47f0927 frame00000000 +51beb4ff7fb1895e9ce5f29e07e3404a frame00000001 +4318255b073504b600ab99026525fa51 frame00000002 +fe389e32010ecaf1ceaf9c78a73a56a8 frame00000003 +4a231b0d0d71bd56d8bbb8ff008fd857 frame00000004 +42aa0d3e8f7cd13346f4d22439df979b frame00000005 +1abe76c0bc7d9642e35fde520502de3e frame00000006 +cdd09f8c7f10d9e62a16057473029601 frame00000007 +517c95c96edb7e74f607d4545e4c1715 frame00000008 +66c23e35c36ea1ac36a4186c6a5d7680 frame00000009 +2bfce45d12681278ddbb26511d29afed frame00000010 +feec0ed9d4afcb11a1930d64cbd1926a frame00000011 +27ab13283cc2e1142ec718b879e268e5 frame00000012 +a52b6551be77cc0a1c850a16aeae30f9 frame00000013 +582b32e6eab1ebfffaa090a3470dd2cb frame00000014 +7af546068cd0bdbc043183f1290cb281 frame00000015 +3f6dd694161a0be5405e5c3a3c9e00cd frame00000016 +22f79e54fd72b830bed2b7aa43b1e9fb frame00000017 +5eb3778824e4f6cdf6265ee3fe4b4078 frame00000018 +6ee798960a521bdb74d7597e23749cbe frame00000019 +ccf5beb695ef22dfc0767e560ba247c5 frame00000020 +0d0dd097a6d9601258d06d73bc6c23d5 frame00000021 +d770d6e9cbaa038dfaef057a8ef5980e frame00000022 +bd8330df2cc6b44a04159c1161763890 frame00000023 +96dd3743b68267793365ba75da124f91 frame00000024 +5da0daeffc3b8b4f67af99b875702cd0 frame00000025 +de2aae901a895f0c9d1fdc2cd8488437 frame00000026 +f2a81f0f6397385155a510aae58b54e6 frame00000027 +416ce40288c66307febd00158ea231d7 frame00000028 +557e8b7ad204cd67d9dd579703feac94 frame00000029 +5ff7b5ea57b1fc742730b6221bcc01b9 frame00000030 +f6a61412f7146b51cc6041cf336b38d3 frame00000031 +e947c21cf9ba65c88a3531d1190a0a7c frame00000032 +4dceaf18f4a48e6f657dcd0c7972023a frame00000033 +f7b53a16edf72ca555fe089e506327b8 frame00000034 +88331a625261c762b95e82f8c4cc7a12 frame00000035 +789257eb18dd47f8dd9029a31bed6274 frame00000036 +6b2c7e7beb2b429dbf439799db49a170 frame00000037 +66541c096598fb0b661350ad3a059f57 frame00000038 +0920071429332a3fd7e2a03dc2514c43 frame00000039 +285b93189b79e3acfbbc1124fc162538 frame00000040 +37370025aef8f1f55be5e3549da18060 frame00000041 +bb3fd2249c7428f1a460bbd47bf315e7 frame00000042 +8336b8a4f1fb0c689c286cde31c3d736 frame00000043 +f333dc97e4c487eb2ccaa0726b4d0322 frame00000044 +18b693a6cdfe974a89935295551fc9c3 frame00000045 +9e81bafe4690c070c7c1bfab621f83da frame00000046 +1e0a97c3f7059f1ba7c6faa79c66faf0 frame00000047 +6583f67475bf3bd2089c2564e05b1954 frame00000048 +f310a60d3dfa31161e83b10e5cfc5f17 frame00000049 +068142d0ce58d9ea6505551719883d35 frame00000050 +f706e6f0398a7dd34a76680ac894c86d frame00000051 +f90e085f44828244eabdba5a08d6fddf frame00000052 +f7e7ca005d82224b6bf367b7807af7dd frame00000053 +6143f0e97cdc04b0ddb8e5efd33dada7 frame00000054 +545d6712b4100f8519e9431c97a0016c frame00000055 +9d7a7896a442237bf2f698e2545d8b3c frame00000056 +a2b0ed472c4c7d3845901b228c749be7 frame00000057 +e8ef670fb6ee0e46ad4d1ac67d39c9c7 frame00000058 +3d447295e2a46b43765c1d3ebd06dae4 frame00000059 +6962d7d1705e60d5c0089a3d30c63d2b frame00000060 +a841aca19b95b6369cff7f1ad3462048 frame00000061 +0760dc41608b70b5ff2d3db70979c6ec frame00000062 +349126aee7aa09c77d233063fd46792f frame00000063 +6382b067260787f5c462b5a995dbf79f frame00000064 +67a6a85852e577edaf4db4177d793378 frame00000065 +8e401ec0dea65a8c8efa0214992d5562 frame00000066 +9e2b8e2d5469d42237be56ed73d6d98f frame00000067 +f8d96dece527124d61ff70add6683c65 frame00000068 +77a6ea14a0e2fd29a7d81930b7967fc2 frame00000069 +c7d02c4e868d0d439adb491bd2b93eb2 frame00000070 +312301c15d55af81b650b2cdf7e183d9 frame00000071 +3b695ed31b1b89714293f1fd2e6f4d91 frame00000072 +12e24c98bee3caa3f699fb9d23a7d077 frame00000073 +0a494263626aba1acc9ccab73321b9ce frame00000074 +400b0a422fb6f7f081c2bca92907cf1b frame00000075 +6c6c3878bbdd49163b4a7128c0f17292 frame00000076 +0f2dfa99bf767eea0151a2444d4ea490 frame00000077 +6767758c725e44c44657c6e58c27cce4 frame00000078 +a309c6d31acbac06ab4c46fbedf61244 frame00000079 +320220c1d57c55fd0450911913c4ad95 frame00000080 +d7a0642da447346d1c43c351ad6d5342 frame00000081 +bb52e0acc0d6cbfd799720db9938adb0 frame00000082 +0cade76fd183e3cc0247328c7c984698 frame00000083 +3055d5597a0be9da1466095487a7c2f6 frame00000084 +7d1ab7389994db24c29e7084bb26ccea frame00000085 +e3114bb0a4b070fe9f5a3fa9b1771fad frame00000086 +f9a3eee6d346eb9ec68fc832c576e10f frame00000087 +8deb8db727b2da542f6d580d3976db1e frame00000088 +8d1dfb45fe5129e7fb5419fc1a5c8c2f frame00000089 +80c853416d535001e5af1cf5ae547b25 frame00000090 +d8278f23da85adad1cf85235f2d87456 frame00000091 +1669849fa86115883597756c35e3074d frame00000092 +071160908230e9af16e83de8253badb7 frame00000093 +d9a242464f645379aedba37d8ed677eb frame00000094 +e5723b1747f17679f734a534451f9b7f frame00000095 +2b12d1d7a20d654fbb3fe8062a18b62b frame00000096 +893d7d0f353b48d3927c26c2f3e51259 frame00000097 +3c654af0c221d0cd21a59a12cdfbc4c8 frame00000098 +4bebed88efdb3c5e23fa8cf8810eff16 frame00000099 +1dfabd9870f6b3013424589ec367ba2c frame00000100 +34b71431c9c97ede9b0c167322dc461f frame00000101 +4c1a2848ad583e4aba8878925baaf505 frame00000102 +740e20bf82def91216f0e336838dd6c3 frame00000103 +db82ce908554285390fecae021ef0879 frame00000104 +4e966bd7c22a93820050c025bb29adaa frame00000105 +3a059d47a2068215922122e007182077 frame00000106 +619930dd682335f2cc08b7152665c49e frame00000107 +952016912689c3e9c8099dc7a534e007 frame00000108 +7946cd8bd26be8938d6d025abfbe7292 frame00000109 +e4a2d8c136fda7e436495d3b72cd9889 frame00000110 +06f93634f9fa297910a67494e23e1567 frame00000111 +29ab1d61aac86ce20d034342692e01bc frame00000112 +d6735798b088165c6b2ce1ccb866bd88 frame00000113 +47838152f50a6cdaf602741c33680557 frame00000114 +3f79926ff55ce28ba22c5060474fb2f7 frame00000115 +707ccb5927c4a44834e086d22d2aa57e frame00000116 +0f41902466a57a7f17c9aa154570ecde frame00000117 +6f2bb0db54db2d9614826a068fea9f08 frame00000118 +9324f264d283c21651d3453e0d8fbbad frame00000119 +dd99cec42d66dcb1756b8d93f61d8d16 frame00000120 +d44539a3f15292e67e069646727d56e7 frame00000121 +2cf7cf55fb4e8d4e85eafacbaee34932 frame00000122 +1347afe98008e140e1b334c453960dcc frame00000123 +34bed3137fabfd38a2d620c8b0d4aa10 frame00000124 +f2eac2676c14b1f9a6b3da155613828f frame00000125 +01a64931e930291f7e18c5425b10e733 frame00000126 +622973210a86dd86951525b705e2f530 frame00000127 +da52ea7e8816e121b03cc67f48cb744f frame00000128 +bc5718d728341544155880016c1d96fe frame00000129 +a8af341575c1a587a15028f40b909f65 frame00000130 +2c30653f2fcd39852c6d1263d7cd0d43 frame00000131 +33f66b1a5c53e1a47fa1f604db549015 frame00000132 +2895e4789190e7c9ae272f09eba15c4a frame00000133 +233d5786941f28eb844aa41b80b08350 frame00000134 +4462da255d1a549fc05eecc25d6cad91 frame00000135 +8b2c625cc06177c7808a2589a1c3cc85 frame00000136 +578f79f27ad8a7c82d2f47aab4373dd4 frame00000137 +dcc6e2fc24d45c4161d6d7c3d47115ba frame00000138 +0f4c5d9f3c57e57482acbd9c2894091b frame00000139 +0191ef8b9e5d08b92381fae9a4ba84e9 frame00000140 +969fff16a368bba8f51803637f4d9471 frame00000141 +6020f0198fc3a30d349615be1b7acf3e frame00000142 +bab01e1553ba77a08177ffae00c75a28 frame00000143 +d95e37478f947ead54bd89e719198324 frame00000144 +85654166bee5037c315fe76fa432dcf4 frame00000145 +5a2457f1466f151a5711ec81328e7ba7 frame00000146 +245e5ed46ae2c594b621cb64e637fbbb frame00000147 +58f47bfdd615114bf553397fb7294b62 frame00000148 +cf432f548bc990ea0f9e88b2b12ce492 frame00000149 +b2b483257c9dfe19b0d39583c25b94e0 frame00000150 +aae428b3f59ede47aa347ea70aebdbb9 frame00000151 +38a60f651c0577aa8b785e70b713e4ea frame00000152 +f3435282088a2da2a4a0fc7eefbe511c frame00000153 +d740ebba4a22169cf7de1013252af5f0 frame00000154 +534158bb9c19ec6189453efd40903b15 frame00000155 +63e5c61ceaefebb19b61944b3a8a47c8 frame00000156 +0938e2d949f6d0746aaadd82b0c27530 frame00000157 +bb805a2ba5fdbc30e9f542cfa951b828 frame00000158 +36d7b140affd459a88042d904499a35c frame00000159 +610207656c1ae3b4ebd461aec7fcfa22 frame00000160 +02066a47e1e0d07875146203e26d5823 frame00000161 +a9d9605a1c2af4a93e037f587cd1e7a3 frame00000162 +95944ee6f992aeeec8e52e221c151386 frame00000163 +7e111bd3c7e67c5f78ffebe69635d38a frame00000164 +c3a7a2cd761e4fb9775e417f2b1ede75 frame00000165 +aa58cb814c46c3ab823f6b19f78b7d0e frame00000166 +f6182cc4ae996f6ed7a7f027f6e5da3f frame00000167 +e455fb0ce57cd8b168c3e82f4ddb7444 frame00000168 +e74498486c418e4d2affc96181e36271 frame00000169 +dbcea3ef5292d99c8e29494ed8015ffa frame00000170 +b89cdeeab2905cb402d4f37d7cd2a780 frame00000171 +09c3478217d6c6a5d280860e490e5626 frame00000172 +4e4ae3836913eddd6ec4efdb64273219 frame00000173 +bcf74ba83bc45e81a36cabe674252a24 frame00000174 +263eb1b51adee4f7fe8d4413268294e7 frame00000175 +a4a6da9e40f12abe69c04eddf7f89dae frame00000176 +c8a9130c52b14c26d4dbbf95c566666f frame00000177 +8581519bcaefd419882238a0c5adb1f2 frame00000178 +1f521ffe17619f4505ac73f7a1e71b97 frame00000179 +e4c102b28cb33f70bebd09515c745150 frame00000180 +4732a7835a05ea835f8aec68ca263603 frame00000181 +ace14691b152fa8c7db478d5e4feef09 frame00000182 +5356243e3267eb9550d63740a05f3f7a frame00000183 +fa21eb138b60f2a81540d4ffdcc286c2 frame00000184 +839bc727fb4d009a451f4da24288b777 frame00000185 +00d6b8aff4ead2bea1af4f4cec1c37a6 frame00000186 +1a2b47a9279fd3c82ad8216018a7ef9a frame00000187 +6eae561a7c91a4c8dc5445177a4d17f2 frame00000188 +cbb2e420294f1f147027242d7b64e29c frame00000189 +c42de6bb0df932035b7f202c3c736e06 frame00000190 +016115cda6f193bee78c8fe03705ded3 frame00000191 +6353fcbd3508967b299acef4e0526111 frame00000192 +9625c26bffb6a7e1ba9012ebdf9405b3 frame00000193 +6a8b05d0cd2e94b1e3c355cd600a6051 frame00000194 +ccf2f208c256b493f5b3b52746a37c42 frame00000195 +d112da107fabd1cecb0a917088033249 frame00000196 +a4bfaf05ca056729125a6fbe74a8aad6 frame00000197 +0f9e6b2bd94edf225a8a665574ccc50f frame00000198 +c9643de1c372238e608d77aac85cc214 frame00000199 +b44117bbf157a762055a8bba1d3f49a3 frame00000200 +7530ee3cab3730091562f88ad7fd80d5 frame00000201 +0e2f342b3c03c82a01bb1063010f4187 frame00000202 +f9ecf907f3393ca8f8a99162b3236d39 frame00000203 +49ea746424d9fabea5193128bc74e7c9 frame00000204 +d3d1b564f4a623992859018495e2ad64 frame00000205 +71a61f4b2dea584b432f82d74e015e9d frame00000206 +8c07f329bde8dc0627c2322dbd73a338 frame00000207 +b40e83b56c59c657fbf38efd8107ca56 frame00000208 +67aadb4c0b58531d80caccd6283c73aa frame00000209 +adf6574edca1970ee2cca74892ea1357 frame00000210 +e1d7b5ebee862c524f4983fe8dd060bf frame00000211 +02e5bd0e2217e0ab491139a2ee0c49ce frame00000212 +bb5653a9a1c51049b457ac106dbb2d0a frame00000213 +ba0fede5824837b6cf7651b6f29b200c frame00000214 +79dd47587a1125551ca557649de973c2 frame00000215 +ffb493f919bd35f7dbdf3065acc3ec46 frame00000216 +e1055ae99f9ede460defd3bba2757611 frame00000217 +a1b691e470bb1c6546c5e9bb138818fe frame00000218 +f0f38727bd4b6013b714b10b6107acd9 frame00000219 +f6325ad11aa194ea6678e03b28ed4108 frame00000220 +fe257525ec0c19fa90cecff14cc45218 frame00000221 +5b104eaabf1e0c71706104d20b6d60e0 frame00000222 +7d8c5b0aa9e5fee38f4fe0a0d36bdf0c frame00000223 +0378f230100dc5e115b3da036d3ec00b frame00000224 +c880cdf12e80bf9e34fda67ab4af8dc1 frame00000225 +e28993dca3132ebeeb7d0f162b9a7ac9 frame00000226 +20e77513ed999532ba40a33742ae2038 frame00000227 +9cb5a27c65e6a6a6f8c498c317003bae frame00000228 +e92b3a85173d04af047196d3e907f09c frame00000229 +8a03db47a2fb203b80fea1116eb0dbc3 frame00000230 +8b3973175e3e3faf12ebe9e5f3ee3e43 frame00000231 +7124e98e82de5ffac3c3a2f66a54a6f1 frame00000232 +ba2478185d9e553b942ed35425f05d3d frame00000233 +efd8344552fbc6a68ea036e93ff5de14 frame00000234 +b28ade469f70b83388bc51327a4e3f51 frame00000235 +7f196d97ec4c7b92f24f578afd5c605e frame00000236 +f50847b3286f71c502e6a9d60f23b76f frame00000237 +29c150e0fe4a59918087ed0f9feef9b8 frame00000238 +b78a343c5fe4878e77930a3445299a2a frame00000239 +1189ed09d2a7ab5a3b3459261ab55258 frame00000240 +58f81e2c5f9d4416b65390ccabe20ce6 frame00000241 +a32df7afcd618c2eab518177c2763e9c frame00000242 +22042a683b9ec82052d8e75fdae3703f frame00000243 +4984be1402b7d8da2727c6d83f3bdec1 frame00000244 +9612938791aeab43656028ab10e9e334 frame00000245 +f9ef3ed5c29754a6b6db6d1ea210812b frame00000246 +df54ff9722f2a938e352b6e247ef5851 frame00000247 +ddfe3809be2a6e63a4a202327238798b frame00000248 +d87ced65e471d8da946d4fe62d4cb52d frame00000249 +bb5c5439a95406e1fd12de6439dc8f3d frame00000250 +48b5e7d2566ad29aaeb8dcc62db380e5 frame00000251 +c284929347c982c365099df166244e19 frame00000252 +bf656e52a7b85e5b5069e9fdf352e092 frame00000253 +fe5a566b0f13173aa6cd3bbf18148d5b frame00000254 +28514fba517a001c026cb92cb1567a4d frame00000255 +24df0be54f247aaaaf2ea8c94463f4e2 frame00000256 +837fbb69425bbd4e78bb8da03bb8d050 frame00000257 +01169168f688c1404ea0b508fc678697 frame00000258 +100681e8df23497bc73ce66f50704cec frame00000259 +12ba4883735e94381a1f0513e9bd66d7 frame00000260 +a910b5b6b9217008c46af466fe606ffa frame00000261 +d629aaed2aa3f4b3ed7c083a2975f00d frame00000262 +4a3c282c3ea633fd72514bd0c7cce820 frame00000263 +479f9a5ec5db7f3b8c676e8d2d4706c7 frame00000264 +2c51c64f67f047b9e3330d9ff3e79006 frame00000265 +15d851599a3a45f1837b90b7ce162d8c frame00000266 +258a3355eb61de14c88f597397747e7d frame00000267 +920ed57b006636ce9c6738293232c0bc frame00000268 +622eb7b907b62fee46d1b7dfdcca05f9 frame00000269 +be142734ca82ad482cabf17bf82bc29e frame00000270 +43053c6db674f8fc6f61b7bc191c4ba9 frame00000271 +c17c51256dab7c8c29698f46478ad55f frame00000272 +380f6a41c6d40b411720df8c3fe8ae39 frame00000273 +1986d7b1daddf4fbb3778f2056a5f775 frame00000274 +89f4d18b18407fffbd48be44fa54354a frame00000275 +3b068f189755e2fa9313a96ce74db079 frame00000276 +e33605e2ed8ca7bf76681ae638f15a55 frame00000277 +e05ab5515f9b802903c8808c08dede50 frame00000278 +dbdc426bb54c4737480d59c2c88ff067 frame00000279 +ac708653db2e116f2509efa8c7e8e5ee frame00000280 +f22a22daff748d2da5146f2a3441b732 frame00000281 +16e48ba07ee6156019b2dc84a2622b1d frame00000282 +c3b94a493764152e88b66d10d5a15496 frame00000283 +d99ba4de95c4a5842025bb243176282e frame00000284 +c3a89a73eb58005a16481e51c8ae16dc frame00000285 +53602e2b069a6993fc55233cd6e0772e frame00000286 +913cefde37b7a62480528523b1ea80b5 frame00000287 +f4a99b78142a264b4a257c4a7f83fccf frame00000288 +ea55845e2d28e48b4d4756031baf8857 frame00000289 +0a5262fc7a011a80d2a84fcdd117cf00 frame00000290 +c9118990c4c249210439b6d8ad80be1f frame00000291 +50ed973507bb45ef3f8668334fe1c41f frame00000292 +02aecd8e77b0e1dc110580c51471781b frame00000293 +d14c25917d6a7a22aac38cfa655c15d7 frame00000294 +db501a0b05dedb1d473a1e471515fbac frame00000295 +0e3f0ee0010ce1f60bb8c3dbde21f5a6 frame00000296 +2ed54a11792419d7a1a77146682c962e frame00000297 +ff5c89e3f39dae74ec7e29b3119d4083 frame00000298 +0b865638b794136b16986b8cc4f683fe frame00000299 +e6703a0480ea4c60e9a6d2bb3aabcbe6 frame00000300 +287716b033d6f000e2d3a1037d438945 frame00000301 +2616c2bed62b63a869703654896781d3 frame00000302 +608f2e8f050ccaee306c5e5a4b697fbc frame00000303 +7deed985c104a302cbf3dd2461e6f00b frame00000304 +ea072d40b405393954e79aad9cd5e47f frame00000305 +679c06e42c33cc5178e27426b5035504 frame00000306 +5f2cbb2b4bd47cda5420a4c0e44af0aa frame00000307 +51cdc44b078ca573ef7e6cfb7a522579 frame00000308 +3812685d5b191d375a1f8da565afed96 frame00000309 +8cc48ebb5b498f698b5d07c29c93f91e frame00000310 +79032797321a8d27a09d5c5903cad065 frame00000311 +3c4879cafc945a2435090281e98c3034 frame00000312 +b431e7b99c0edbf50cf653736a631797 frame00000313 +6f51f643e87820954051a28311a51f63 frame00000314 +a6d3256cc459ffb58c6bd346e883f51a frame00000315 +e0853b22acaf34046d73abea85c55d4f frame00000316 +8a00a9e03b56f107540bad90b73ef42d frame00000317 +bff0cafd69a6f176a49d9a3fcadb1be9 frame00000318 +aef1414ee99023f17945f002d249f62e frame00000319 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-vp6/THX_logo.vp6.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-vp6/THX_logo.vp6.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ea-vp6/THX_logo.vp6.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ea-vp6/THX_logo.vp6.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,127 @@ +ef2e0d18474b2151ef5876b1e89c2f1d frame00000000 +ef2e0d18474b2151ef5876b1e89c2f1d frame00000001 +ef2e0d18474b2151ef5876b1e89c2f1d frame00000002 +ef2e0d18474b2151ef5876b1e89c2f1d frame00000003 +ef2e0d18474b2151ef5876b1e89c2f1d frame00000004 +3cfe80060200303861ce5f3b3856da9a frame00000005 +8886cdc20d2d3ae3e5a13087b9161ad5 frame00000006 +b8ca3c237c3b7ea70108be885fc09418 frame00000007 +b46399c963b9216f76a957823bc2aa2b frame00000008 +9f32e365260baac7913ef7f539a846ff frame00000009 +8004277bc2b9841bb4524eb4c5da5343 frame00000010 +f64e6cf6fb40a927221c1ebf3c2c5ced frame00000011 +2892d01e2933e8bd84cf869cae55dda1 frame00000012 +1cb001a9eb7f3b629d9d834bcd0b1e4d frame00000013 +d29ce71cd8cd789c4c476ebdd4691a3d frame00000014 +4aafbd8c4e1a1d507a7bf31bdd302a18 frame00000015 +9089b37b438375e2f510a1e5200c6e75 frame00000016 +c7370459b660a0859c63f7b833fa4d7c frame00000017 +cb0d751166634bae38b2551fecdf373b frame00000018 +f07802930a45eea1a864f206a352ed17 frame00000019 +e42de91657fceb1c75bb5913f642921c frame00000020 +d699c2fe5818ad9874ed9b3b05b4c669 frame00000021 +960f1857b5d402d91618b22e6b073b8f frame00000022 +d97e414b195841915a73c6e0558c6034 frame00000023 +93fdd83ee6496701e8b6c050cec8d6d0 frame00000024 +f5d387034d6efe768ed5e39a1e03c816 frame00000025 +38b8649cd7dd2ea90d3b64c126d76603 frame00000026 +42f8d34a7a7466e67b225cd4bb3c423a frame00000027 +0d0c837d72908b8b6c3273d7a46dfa96 frame00000028 +8efb6b8ec89c1df007745c3382edf0f5 frame00000029 +4ce1d2fbdc95a39f75e4e9b7d365791e frame00000030 +1a292fdef97ce319df1758904f00336a frame00000031 +e005085f8064428e067bc0c419762d42 frame00000032 +fe4645c17561b84b9ac87be4cb847560 frame00000033 +2875f69429fa441d224569d71f0759af frame00000034 +cc73d3ff615e4ab32e0e288ef8e5849c frame00000035 +bce4518d3fa5bbb0e6326404b36b7962 frame00000036 +adb7bda34c25ef5d0d239736b8637795 frame00000037 +a7b5f09b76f7ce14fb80da071782097f frame00000038 +aa92892254b933791478c3ad3f8ce17d frame00000039 +891337bf96c745636a0c296e2dc1d34b frame00000040 +5d21df13af2915fcbc3c512f57f488e2 frame00000041 +2bfd992088d497506951518aab2cac63 frame00000042 +7b527119ada2e4807e173d92579eb5e9 frame00000043 +696e20373238978581d9913eca8efbf6 frame00000044 +fa5f4dca682d1261dd8aa4b0638e15cf frame00000045 +21840b8aeae0b31b4cdac38b23447666 frame00000046 +048830b1021ef4c021f4a31343488336 frame00000047 +9d0fb308fdbb884e591cec4a6919246b frame00000048 +8d6fe9ccb13bfb8ed738a37781318995 frame00000049 +a3ff7219cd3a7599f6cbf21acdf59cbd frame00000050 +04d2887e6d46c539a26ead156dfdc3b1 frame00000051 +10e64ee96752a39d9e2af884e52887ea frame00000052 +965c7017ec8cc0aa9fe00b8a163be2bd frame00000053 +d7924a6e73237cbb221416867e3c48a8 frame00000054 +2db8372481cd50ba69de89f8c13cda4c frame00000055 +191bb7d6c1f56b53b4da2a19a5a66aa7 frame00000056 +b565e50d740fb2922af80fcd6dd29649 frame00000057 +85448728c33b1f0f8e14ec756dd3aa8b frame00000058 +8d443010cef1f9c5a8500d3b2a317df3 frame00000059 +066e8780ddf4361b0b747b58b7368901 frame00000060 +a7d4aa100d1bbd2243172372adde5c41 frame00000061 +2d685be8b9ccdb8533dc75c66995bd48 frame00000062 +5e668c4c6db840107a43c0cfbbfee044 frame00000063 +800458fd9f224ff7803df62fffeca5c8 frame00000064 +c18e4d8817a01d67970a7df4aa1996d9 frame00000065 +df3c1d7e759654a2d0c43a579f93ff1f frame00000066 +6ce82fd864ecc95aa38de76196a3900b frame00000067 +830b0220ce0a3c1944982acdea44d982 frame00000068 +a5d91765e9533f609b595b2cb06776b0 frame00000069 +24e57465fad58f959c72770027f44dad frame00000070 +59a603b93d2116f1d34e2c930a44e879 frame00000071 +eb4614d8412d74fb5ce0485928612dc4 frame00000072 +32aaa245e2060c326faeaf0fcbc191bc frame00000073 +2fdf0e9d095f542dd20239de162d3e83 frame00000074 +01fa105cfc21e69507cf8c7bcde714a5 frame00000075 +f0fba54f217cef90825b4dcb7d9a420e frame00000076 +5d2652f9fe065065fe897d52f06d0ef8 frame00000077 +6b07517a9c3df3b77af69f02f1d7fd0a frame00000078 +9513144366542e291d20bbd51ee8b9e1 frame00000079 +d008c06c2e18c543b25fa7b1e97b88a8 frame00000080 +f86170d9a1e895ecd9de464e78607389 frame00000081 +2e42d132ffd24692fa93a01cb6344cca frame00000082 +d3d6cbf29ba3f6112b430412dbf1c353 frame00000083 +66f16b59a9e5b0f4ae27b2cc51e93a2b frame00000084 +4154a768d0cd62b2e92c68f82ce63944 frame00000085 +346c7b17f2d21f7131b7414b531728f9 frame00000086 +dbe3679eb5a2a41c05189a89e75d73eb frame00000087 +15db8e8fcd327a226302485a93ac42f4 frame00000088 +f23529f29eecdb728d33c32ea96c9042 frame00000089 +02cd31007aa0a8c3b4b0d270b73009fe frame00000090 +2848b4fe9d69f3cafd222470216a9658 frame00000091 +7f79e8343040444447460e1c5ef8630d frame00000092 +733bb06bbb929ffbf029ad5bfe51b5f9 frame00000093 +513cb50ef4fb3793753cfab89ca8af9d frame00000094 +c1a891dcd27532d5e1d16251f71a3c7c frame00000095 +45d8a9c3e90419091e45961f6d4f46c8 frame00000096 +cf3168708b2155b27adee3e3ca3354bf frame00000097 +e4403536627473dc53a3f7bd90f1ac52 frame00000098 +a383bb2eb38876075e134c4e4fdc4063 frame00000099 +22cc981aa71c5d86d5e066cdc661fe6f frame00000100 +2fadd887b535a4f1a2b291f4c4aed714 frame00000101 +489f9e984ac624a12038e14f837734d9 frame00000102 +158481cb532c5560cec470d5e58bc87e frame00000103 +6a60c3791a90ad8f7bd6d22b622f06fd frame00000104 +1ba7234adaf4569b8211780308268a2a frame00000105 +e0a40bed471936be123455d01965a58c frame00000106 +caccfdd4b6a8ea8e8d7bce553a1cba3b frame00000107 +c7b4f05806ba43bd72a412c64752f58e frame00000108 +5e64bde804744ee925f482ecd8407285 frame00000109 +0f3c7308faf0bcb1ad14092e4ceb437e frame00000110 +c69b39d196511a659a4c453e737b4d3b frame00000111 +3d3b499a8e2fb7c18ef96b8d8f938bde frame00000112 +36b0614e0f650eeb328436cfa7546879 frame00000113 +7dbcc2dd331c0246f631d54575513b01 frame00000114 +d472e3c1001136ec8821656fae1ec1eb frame00000115 +f6abaa1a4796a4c8a2d6d2d572410b39 frame00000116 +d09f01a3004fe757b74313ed5379a82d frame00000117 +8ddfbdc66a4370edc73ba552e6310f3e frame00000118 +08ea91a30216eb12fbf356dd5ab78b6b frame00000119 +0570decfc0e73b95b568dbf60a9c73f3 frame00000120 +32fc6332e3de4903c8577b2187ed9d07 frame00000121 +828bcb85ffd0ea0281b7edbc0ad2c8d1 frame00000122 +0117a95e2b525547346e1d5abbd77885 frame00000123 +a7492cdc643aa3df225c4d1439eb6949 frame00000124 +666c257b09f6c4721bcb6429c6c5ea83 frame00000125 +4f936daea4dccc50eb668dacab025471 frame00000126 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/film/logo-capcom.cpk.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/film/logo-capcom.cpk.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/film/logo-capcom.cpk.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/film/logo-capcom.cpk.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,110 @@ +6e4fdce21489c3304b7242e2c5689df5 frame00000000 +26c53e66730846e042efb03eb6db9745 frame00000001 +ec75fc76d3e08c393d23e8cbe900b7b7 frame00000002 +31cc647391cae149b861c142f6779024 frame00000003 +efa6981053683e33261cee92ce436dde frame00000004 +090b4baf7e9dfe9f6e5c1f46459a321c frame00000005 +d7a44218158a2ec43e71a229ec6ac869 frame00000006 +daf75494e85c552d955354feaa557b16 frame00000007 +af8a9a02769b4f5a0664608c0b5a1010 frame00000008 +4939945cb3151ac7d8aa1b45c3076858 frame00000009 +30185235c79821e60ed707695329cd72 frame00000010 +1076e3a7e70926ed07ad859f278374d7 frame00000011 +36528b1f37e6e625a9168628d20c8064 frame00000012 +f87f4dae88a873a2ed72e3d555b3dfda frame00000013 +d711c1cca923ce3bcfd5e182c9d013a9 frame00000014 +f814a9229aba585d5d5ba6baf13432b0 frame00000015 +2c0451ecb1387b620a508e5015801f4a frame00000016 +77a62a2482f75c1ed59d7b3ce8fc0798 frame00000017 +5612aeaaed49c51b60d10252fdc11003 frame00000018 +cb5e143b17577c6008a7be4a47ac64b0 frame00000019 +4bd0a75e0cd7570d6405ef9141128bb8 frame00000020 +76b7bef37300e48c11dcf52cbcaeaf9d frame00000021 +8f70c87d5bc7f1e9dea00d1daabfc256 frame00000022 +43639797900a5f1568849b048722afcc frame00000023 +81dbde26606e25ccd7aef1ab37774da0 frame00000024 +4d94c8c2995a948b1e007f29bd9f45de frame00000025 +3ad27b099112b6044afd1545493f092b frame00000026 +f81dddfd1d5325f90d60cbc9a750533a frame00000027 +0b63eb0f8897af8489623322ad9a9fa7 frame00000028 +0983ed4249049d4df3b497b0cdadc67c frame00000029 +17538f77218cfe07804dfb10fc7376b9 frame00000030 +d855501690042932275b71a44c2e0ce8 frame00000031 +0276335c4816e8f8e6a563b243e4001c frame00000032 +a9ee70f8938f8884ddf576244eefa9e7 frame00000033 +e1000cc96aa1744f2b26330cd28cdeb7 frame00000034 +aad273107600cb067bad166e549813dc frame00000035 +986b17999dd821881b66de02a9de78b4 frame00000036 +9dc5349e020b40ee5a35f4512dc9127a frame00000037 +e5dcd282b0450e57ce379c864084944f frame00000038 +847d6d8e81aa6512022c2d596db30af8 frame00000039 +a08512ed17a9447afc40ebe0ac863de4 frame00000040 +61b207576f00b3eb3eca0ea7c9ae17ea frame00000041 +df8e556da89179df9690162b267a0a66 frame00000042 +4da1c8f957353dfa0a84f198c179628c frame00000043 +b2df4da6f066758cc58b943db252c446 frame00000044 +4c46b2e1a986cd10c87fe52b23311a95 frame00000045 +9984d5d7dd91192c7cfe81e05d52fd11 frame00000046 +aa45cb22a7f0d6740f7bfa2f0e228d7e frame00000047 +5c35a0f539b7c4047a71def0dadbd447 frame00000048 +cb5787322eddc6226507f11cab0c11ab frame00000049 +f63db438023dc6d0e6a9dbc55c2f048c frame00000050 +5607648ab31f5e2b695b93c2b33ec9eb frame00000051 +80afcfd404d1dd67efdea135033f0c97 frame00000052 +6b3af9f7e32afd4d219ccb5993699dd1 frame00000053 +40033915740c894deb9520c750876d47 frame00000054 +40033915740c894deb9520c750876d47 frame00000055 +40033915740c894deb9520c750876d47 frame00000056 +40033915740c894deb9520c750876d47 frame00000057 +40033915740c894deb9520c750876d47 frame00000058 +40033915740c894deb9520c750876d47 frame00000059 +40033915740c894deb9520c750876d47 frame00000060 +b99f747ad68f02d0ecb167d2b1a5446a frame00000061 +c07aa5c8dc575fdfe9aaf3c1fdaa7d1c frame00000062 +75a2f7ad7c49d8f2dc6a529fc57a05f4 frame00000063 +42e7bd1e82046d7ca893eac564f0f41b frame00000064 +09e6d73e06bbd1a8f8cec6ef9c15f1d4 frame00000065 +477ff6488baa7282a33a311c7d1e683d frame00000066 +ec87704b9746da8ea6bac95fbb6981a6 frame00000067 +fbbf9cb1b370d87cbb1ba86b8af191c3 frame00000068 +86ed03e41f45a7f7126bfc277dc7709c frame00000069 +7b9143b1609558e6b57bcddaf2ae8695 frame00000070 +b2d4bdfc4f7bf8a1a0349bf34e84cdda frame00000071 +ecf3855552e9f024c61cf34f517b54fc frame00000072 +e499938e9a920e19fd3f6c20bd961d15 frame00000073 +5146b196fdfbdc5155992d0dcc9ffb9e frame00000074 +90e785f7b27f5290bfc1a613a1418689 frame00000075 +aa58c081055635a9f4ee7769dd859feb frame00000076 +ee3e925ae3c04f77558a17a8b04d7ac1 frame00000077 +db5aa5c045e62dd1ac1536fb44d240b9 frame00000078 +ba4c0fb267f43bdc2e1ef3c33c58defd frame00000079 +9e0d03a810ca041c8b488598894944a0 frame00000080 +a51517a82aeff22f81ca4274b67d7e0e frame00000081 +a51517a82aeff22f81ca4274b67d7e0e frame00000082 +a51517a82aeff22f81ca4274b67d7e0e frame00000083 +a51517a82aeff22f81ca4274b67d7e0e frame00000084 +a51517a82aeff22f81ca4274b67d7e0e frame00000085 +a51517a82aeff22f81ca4274b67d7e0e frame00000086 +a51517a82aeff22f81ca4274b67d7e0e frame00000087 +a51517a82aeff22f81ca4274b67d7e0e frame00000088 +a51517a82aeff22f81ca4274b67d7e0e frame00000089 +a51517a82aeff22f81ca4274b67d7e0e frame00000090 +a51517a82aeff22f81ca4274b67d7e0e frame00000091 +6e08e726b10f6b19187fca407c059d8e frame00000092 +6e08e726b10f6b19187fca407c059d8e frame00000093 +6e08e726b10f6b19187fca407c059d8e frame00000094 +6e08e726b10f6b19187fca407c059d8e frame00000095 +019ceeb0cac749eb34a6b62d852e9d28 frame00000096 +120f0683f5e47159e8da48bd88913cc3 frame00000097 +b48237faa2d9b1d90c423345cd954aab frame00000098 +3f9760f1e4f943c54b63bb3562d5a5cb frame00000099 +95ff6bb414a00047920a979af2e39d61 frame00000100 +2ffdacecb43680d6848152b14434498d frame00000101 +39a4e9eb416a7725bb0a4e25caf20505 frame00000102 +2f4bbb8bca687a6973b1d7bf277a0fd3 frame00000103 +a32f83739746aae56140c3252f2122a2 frame00000104 +2c4d98f1bcd230b09f959978d74e0ee3 frame00000105 +e57314a2d463e5a322be04047e5b6db7 frame00000106 +a3a17605061ecc190f7f22af3175e9b6 frame00000107 +abe8d0c720abb5f3b35fe232dabe1517 frame00000108 +7eacdd61ecbe6cc8cecc8e217f89133a frame00000109 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/flash-vp6/300x180-Scr-f8-056alpha.flv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/flash-vp6/300x180-Scr-f8-056alpha.flv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/flash-vp6/300x180-Scr-f8-056alpha.flv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/flash-vp6/300x180-Scr-f8-056alpha.flv.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,93 @@ +b61ab7233e0035d030af5bc720efe59c frame00000000 +991333b6e689b1fe9356f33fd510dbdd frame00000001 +7b065e2a3470ff19dd5be9bcadecc28f frame00000002 +cfa5bb8c1b166fb8fff2bb9b0ba7856b frame00000003 +257b9593da815f8b8f0c76a1640802d2 frame00000004 +7d18fbd8e74a74a5aa4daf49a3e94d81 frame00000005 +894e58009934729f529cc0b6758f3e73 frame00000006 +256e4e96a064b5d36f8d8e095771d15a frame00000007 +856a14597bc983f9c25cb002202bdf14 frame00000008 +e5fe3e2887ce4c1c8b5e099d11d47fa1 frame00000009 +649603f4292e7b61b47fde10222a1898 frame00000010 +8c40a320efd0a19d2cf921ed9f386cef frame00000011 +a9be3b257a8015943cb54c1922a41167 frame00000012 +48a919a5958cdd5ff3df26a4395d2803 frame00000013 +b783ef5d2f2c61f4a0e1b7a71787395a frame00000014 +29f46bf3ef162857d155a7e583600f7a frame00000015 +1f88163511de03ba280fc3a3cffb53b8 frame00000016 +5a5aa43445522d6b695505f376c3cede frame00000017 +b958638a2e9f8f069d5c8b4bc0bab278 frame00000018 +9bafbe4c70ae81c9111fe8f80c4b58f0 frame00000019 +6dc092b276ff8184e6fa58f01c65ca44 frame00000020 +119d7ed6c8150ef606d8ca7fd5a1bfd1 frame00000021 +4781c9f667dfb86294ea2df2779af252 frame00000022 +7f22cf32f0124c8a01e64abe764f327f frame00000023 +ae56f28591bfcf0e162ae5ed0f1789ee frame00000024 +500913de2fd866b0d0dc7dc8a7501e50 frame00000025 +dbcf2434ab3b9b3a4efd0dede27ed383 frame00000026 +80728ec2f84820ba3fb5141817bde644 frame00000027 +47db4bbe6742b0406be98a783b6e586b frame00000028 +613c0418e17713a013e221c9e93d44f9 frame00000029 +73682832e28671938dff616b87682c9a frame00000030 +5515cd0aafc8d7308743ecf60614b560 frame00000031 +991daada88f2fc3cdebaa2668a9707bf frame00000032 +412f111daa174acf7d946ce4ee89d662 frame00000033 +b516a9cc705a882df9f21283f6f26082 frame00000034 +6e5b51980055546c700739afc9408125 frame00000035 +49a7daaeffe4496ff11d632090b6342e frame00000036 +6b45aa2153625eb361b5e6ba17de751b frame00000037 +82dea081eacc21b00ba40de92ab5128c frame00000038 +2a1f656d6d12496b1bee464cd81f39f1 frame00000039 +6820985349ded30a30db6cc8bd1c7414 frame00000040 +ebe8d1219d17f2352f47e6fcb993013d frame00000041 +fe375ae846c4e90a89cd1f91c3fb4fe2 frame00000042 +c3c41fcb51c8f044bda924f6bdc9eb84 frame00000043 +8a353f8e9f97d90f1249446c9eea00a8 frame00000044 +fd3f36d3ad5766edbdb0a04fe4e30f4a frame00000045 +3ebbb85d29c03df543ad43c03d556cb5 frame00000046 +faee9500c44a504c147cc0b798bbc282 frame00000047 +cf9acdd7794b40f8c0e8cced69c23f7f frame00000048 +1a75a1888056ff60219c52b8702cbcfa frame00000049 +adbcf597b9fa4fcaa4cf38e0c2faabbf frame00000050 +d9aaf6959e84b0e157d1c67c628ff9bf frame00000051 +9dc5855abcde3a10168cedcac0f0a75e frame00000052 +fd2b92aa010211f4cb278dd43156400e frame00000053 +4df271be0c8c2c8c37d6fc6335187735 frame00000054 +21cb8202bd5f584a21bd367037c36626 frame00000055 +e5e63ddc1c43b5543b465b38287d48f5 frame00000056 +45fba1d45bef1bab4d35d613331edf8f frame00000057 +22baecb4550eebc9e05caec8ac4cba67 frame00000058 +ddd372bb83428777bdbecb804afcef3b frame00000059 +e11d6c28d1c21b3d297e0531a28f3e25 frame00000060 +b62deb8badb5050498d4158f36708620 frame00000061 +b211889c47cc5104729f47b6b19060c0 frame00000062 +f553a03a05be714a61f10df86794c885 frame00000063 +c8dfc352971403b9327328336aaf5ad0 frame00000064 +7eeeb34573bfdf4ab682ec1ff8a04781 frame00000065 +4456bbd6bacd71833737b093f4427e37 frame00000066 +aa8425b57c18c77582634b121d413a69 frame00000067 +77db116ffeb61f6a861f8066eb85a55e frame00000068 +6a647907964c4a28306c11e2858f3f29 frame00000069 +acffda163ef3461fe0b9ffb963537f78 frame00000070 +06a5e2e7d214c48e7a5e1db4d5cd400f frame00000071 +ee3c3c15632d7b448985a202a26eab13 frame00000072 +571c47ba6543337c605d56901ed2b456 frame00000073 +615856f246997ea882fa566c317f994f frame00000074 +3841de622fc380c77dd682a051a3ca6b frame00000075 +eff5f15a644d1f94cc0f4eadfd66e373 frame00000076 +6cf826d9b8be9da03f9fd2a1c9a6fba4 frame00000077 +157021ffc50107c200066d82fb837bf6 frame00000078 +f871ada3e05549aa2d5e277f86037b5e frame00000079 +7e5729daf44abf977fd0696ac97ebbfe frame00000080 +e08aba720acc00a460ed1e30728860f0 frame00000081 +d0567f06d22d5420c6a7c3e28f46fd27 frame00000082 +f8958592f2f296ebf7325ce3b14516c5 frame00000083 +27d12829a542963ee88b1885d8489888 frame00000084 +06902392a26da8009c0d640e3d019c4d frame00000085 +94b3924ffc34a977bc942fcfe2d583f0 frame00000086 +cde5508dabc660db9764a89e2211d346 frame00000087 +28b146fe593289d3fa0327194a886e71 frame00000088 +852e2215c2dedba1be32ba1cb087dbd0 frame00000089 +f7227a659f842fa61701300858f73be7 frame00000090 +890c9a3012d9f7b536af8c3e7ffdfcf9 frame00000091 +7ffaf6d45a34b6907b764423dcb50985 frame00000092 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/flash-vp6/clip1024.flv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/flash-vp6/clip1024.flv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/flash-vp6/clip1024.flv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/flash-vp6/clip1024.flv.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,174 @@ +e530c80afa429c739ee81217bc4d83b6 frame00000000 +a7bb8c18351751fc574841c46c0ec008 frame00000001 +a8a53d694589e4f672be0d8b4c0d2b9f frame00000002 +37cf276bbe9d852aaa73f6c2d507f110 frame00000003 +318b760da289d759e8e781283c590a51 frame00000004 +8cb9fa8ff04147561f8895fe98709e88 frame00000005 +8f4cce4bf06c32a5fccae8bd0db398ba frame00000006 +19e9ee5ef7fadfb085c8192879477ede frame00000007 +a11f7ec909f708d2984f28cb55725d74 frame00000008 +281bd2f0f8720ed399a44383e6e610a2 frame00000009 +9aae5bb7d1b4a4912a89411a80e696a5 frame00000010 +d9ea1c3c2a4f0224636a52dfc1ba6208 frame00000011 +c0418b85a12493b499b316551077995c frame00000012 +4458734ca494bcc39bf447219742c6d2 frame00000013 +759c23ec7b7aaaec767cd7384879ae97 frame00000014 +ced0256a6f5d3d453a83bff1a980d847 frame00000015 +388017d2f5c4586c83dd12a30b03939f frame00000016 +af2cbe4a421d14a1f8d8db05c383973b frame00000017 +ed9194e282d1e2490439a9a4c2ac3dfe frame00000018 +0455e0a9463f8b39f2090326ddb5eeec frame00000019 +b504f4618dda80c4f6c68aa03b2f1ce0 frame00000020 +7921477546856f52fc7c45b1aa8b690c frame00000021 +48664ea9d523585d3e73062fbfb36cf7 frame00000022 +0283a3a7074c98db05601639f6e4d63b frame00000023 +aefc04bf5ec53ba13e9194414165d561 frame00000024 +7e0787a21c797c3bf5055b42c7c79ddb frame00000025 +964ab16d12e4c3b3cda548108871e5df frame00000026 +7542f7e8df6ee0d793c72f4357cc0692 frame00000027 +fc9a88e1ef32ab87e8d218fbe61a77f2 frame00000028 +b9571d8bff9e39807308a700a9d6c1d9 frame00000029 +2db4169fe62d9fd3e80badf01cd123a1 frame00000030 +5a39d75db84b77fbe377ac6432c3da5a frame00000031 +85238d0ea4102a9b3bd10930738e663f frame00000032 +9bfd8da2988340cf91ae93c00dcc07d7 frame00000033 +b9b8f7045826223aec3986209d63d9f5 frame00000034 +2c288e3dcaa53ad326c0b3fa08efab7d frame00000035 +0334393a8d9fe733fc5f6636148f3266 frame00000036 +cef8146c137242f3f9df870c138bd9b3 frame00000037 +29c35a59498f33f62db333d996ac5541 frame00000038 +e6b3b35840c8e8d3bf25a5d19ef5feba frame00000039 +e3c21fa8a94cc59e0199099ccd715e3a frame00000040 +584e5c64c8d2c7c63db0ccef30f06967 frame00000041 +5d530b9ccdb5dca2c7950af14b2df848 frame00000042 +3a0206cf2d3f555a4dd9fa3f0eb92e1f frame00000043 +10de3f5c0ea79d5559134e0e8341448f frame00000044 +a249449fea0bf81f80837c2a3ad4b6b2 frame00000045 +3a82da42ed408f7360cf203d1ca512d4 frame00000046 +ebff8a48c7f9985c254e81979c507e60 frame00000047 +a5df011340021235b1f617b07b9677cd frame00000048 +501182dae76bbfa640fc1372f79857f8 frame00000049 +de651ed72665b612dbe39be7abe63eec frame00000050 +dc55131fb59aaaf8b7c8778788a6f717 frame00000051 +cd3cc8e44c6af8911e0a5b1d105022b6 frame00000052 +4a678473654474a326973ba2b0fd29f7 frame00000053 +d2bb2243c359dc38dbc028ab408948e0 frame00000054 +7d9268baf235994f36001ee7981e5a82 frame00000055 +c9adb147eca906afb3fa793e586182d1 frame00000056 +6e84729dae508346f58221009bdfbeb6 frame00000057 +cc1ee43d57416d75700c1d1dda876217 frame00000058 +86c0d8a58abfddff574f70422081961a frame00000059 +0c0ed3faafe7d1dcf05c597725023648 frame00000060 +2daa42ed2913ff317d1bebfc541bb9ae frame00000061 +c4178c26d61e4de243b46f133491910a frame00000062 +830bc5c968c6486c2f685aac2b5a89f3 frame00000063 +b04e117055d3064ae8da47d9f37f1c7a frame00000064 +903447793aaa812cfdc78073612202a6 frame00000065 +a96237be5cbadc3052f242801783e948 frame00000066 +dfaef8aea1681668024a723b353ce06b frame00000067 +dbd41011de8195a52478786cf4f6254b frame00000068 +fb1639c9a422ddfddb2c45e7afdebd5e frame00000069 +eb0cad1791c7016883b234ddac94f7c1 frame00000070 +279ff4ffc22846b12d5f7a232b1311f3 frame00000071 +3357a31c9438552c4f722d47caee0e00 frame00000072 +d3e9578d52f012f3a08a7c26c8202c95 frame00000073 +0d7934ab81d13b3a07f336d93db9bdd6 frame00000074 +f4b6c49a9ad705d29302dc145be5de05 frame00000075 +61caaa0af991a95ee62770f8e20a5737 frame00000076 +ed2969c58e57627ee11a4f0324ca8e53 frame00000077 +8cf9af5314d4e2ad62951647b9f6c193 frame00000078 +d401f6908f3d0d186e7a795f2f453bf8 frame00000079 +a1a33ab884cfa7ff4db13b6e7583aec5 frame00000080 +3be6b8801a2c74555a73c03b542cb9d9 frame00000081 +863f55f16ec5e4fae0fd8c760174585b frame00000082 +ebbbbfae1c64c81feedcb9084e2dbf93 frame00000083 +2d30f66937cb083a4873c2ddbe3b9a6c frame00000084 +ea6b7c3693bdafdff581e4196ae08224 frame00000085 +44fc8f7221685ebd44f43eb9b3a70e6e frame00000086 +84b692866ff85cdfc786b232dfda47d0 frame00000087 +bf88e671b260a5db290f2b36f40d901c frame00000088 +a40af8a876d73361bbb13ac62f7e81fb frame00000089 +5a57925da8332da36275eae46b82011e frame00000090 +875750c552b9d4a33e6795024077f993 frame00000091 +5274c4d16c92ae277f78709faae43df9 frame00000092 +d0912139d3afe1f8ecdf2deca18098fc frame00000093 +50132c0da2971b792a582a3277690786 frame00000094 +383eed26eef2f7c19c9b492b883399ed frame00000095 +0ea71ba54a801b1de89468235c5bd107 frame00000096 +56f3441e60077ed5871a8d5e044574f9 frame00000097 +f7cf223696ee23cb9f43e9dd5213d8d8 frame00000098 +4c6184936a7319781990922e4008c751 frame00000099 +f91e81f3733619f47bd9244ad94b4c8c frame00000100 +febb075d4b846915db76f413da004363 frame00000101 +165f84b8d7877a63ce004a2a9ac18efe frame00000102 +215e8dc6c4ce467d2111f5371afacf3b frame00000103 +06243d8dac6e876f06613dc406fbdf7f frame00000104 +45eab0ec62d1bbea51087ef7fc4b0c3f frame00000105 +2d39e8c4ea64ceb57b82c5c7db28910c frame00000106 +3a07dc86aca59deafb4f723f8bda4780 frame00000107 +05d10550448cf0a9e38b93db2feb1c97 frame00000108 +0be15643c5411ce5280988aaed4377f7 frame00000109 +e45e1f9fdbbce779fe549f32f1dae652 frame00000110 +4b02cca582c84716c8f9759d385cd68e frame00000111 +ea991ecb3ca33fbb789daa1c9526264a frame00000112 +946e5088a7073a6222d31f6dd5810a7c frame00000113 +b802a7b3b210ef3d85fb35179cf04c4c frame00000114 +d29289d79eb870993030d46b4ed06d39 frame00000115 +3d6f27b687f33aad30c540a9d07b3af8 frame00000116 +0dba519dabf5257feed14d728ccf99ba frame00000117 +f97574af51d07eb939154f729593df4f frame00000118 +f6d5198304d759265df863a04fd8eba7 frame00000119 +2d66ab42838c0028b4cf03137eb4572c frame00000120 +393dee90e4553803dceef8de588afa97 frame00000121 +bd3eba303f3dd9150be7cef6b1538778 frame00000122 +6097be03b9dc7f97c74857dc6ef67cb4 frame00000123 +de55d5942ff535d4d67ca8e95f39c2e3 frame00000124 +d9da5e445c597e0ff90a91337a6199f3 frame00000125 +56b155ff5302867415f8265129f91651 frame00000126 +8fb3a5ac5c8b05e290a65efe89ec66f6 frame00000127 +a26b54f78e604bf1464a7b025a906eff frame00000128 +7b1f3c98c2bf22e472f44a221ddbf704 frame00000129 +cceea5616466086518c4fb8e60295941 frame00000130 +2b981fba1097238192caf9a57d35bf85 frame00000131 +3f3fd2d1d79c2f01266d937fab38ab3f frame00000132 +1b7c0d4063462c4187addfd26714a852 frame00000133 +bf018f9f723fbcd186dd994c4a63e4cf frame00000134 +294c7eb1d0cde99a0f767110b459e555 frame00000135 +9f630717513f5809518855b82dcc27ee frame00000136 +c87b07add85511596162242a82c7ef8a frame00000137 +0a673deec616b4a83480be8db36be126 frame00000138 +1691555697860b8328795dc3f8807c36 frame00000139 +72763f87ea8e82c229911776bc8db2cc frame00000140 +9126ce8eb3830aa65540039a93c1599e frame00000141 +3ec03408f5856a138467595b811b1e70 frame00000142 +146d1d2663c0ba793b1b32d423165ad4 frame00000143 +dfb3a4bb492b263b6332cafec881d4f5 frame00000144 +6bee021de9c37de9cd3e47c09270eef9 frame00000145 +43d5073bf363992742698773f3660b3a frame00000146 +ee821a93ac49f9cc658ffe641c7b97c0 frame00000147 +090547fe58cb95df8ceddbd0f797dce0 frame00000148 +fdf569a686b7a0567c92c6338cc7cb28 frame00000149 +3c6c03d44551290e10ea43d1f99fbf4c frame00000150 +564f775e64e2adc1d1876366ad447c1e frame00000151 +a801a17a4c66405a277822111b235f7f frame00000152 +447125f0a41387f2bc42a15cd18afbc7 frame00000153 +4b66c462ca5155e4dace682896746f58 frame00000154 +a0bf4b12a1bc58b86b23f8dd22368acb frame00000155 +b4007f31b47f88911277b42d3c25188e frame00000156 +fee8c72f14b9a1ce99045d904466b331 frame00000157 +222eb183f4ce6a77462227344dc0ae5a frame00000158 +e8b56595af8755215a02374612ab8aca frame00000159 +8bcb31fb26140a0c6087075534f87782 frame00000160 +b6fd50f95ae2720e160bae23eefbe5c9 frame00000161 +14f3ef4371d1570e634da7ac3201083f frame00000162 +3b28d7607619af08b306c4ae5e42f56d frame00000163 +21a99ecc2a13cd42e9d491fae484841d frame00000164 +04a0e290a542aaad4cb923059afc5579 frame00000165 +8aa6994cd4208d9aab26ead9df914a11 frame00000166 +d397c64c99e5a429cd6852c74ee967b9 frame00000167 +0b80dfce96cb6900ef7c2fb502f94f2c frame00000168 +c41acb5c0e97e4cecf4fc1f9c3fabb37 frame00000169 +cf118bb9146547a62e8fc714632d83ee frame00000170 +e2231344333f0173f15784e5c1ed5eba frame00000171 +7242bdb8b472f2333592d4f8ddfbb098 frame00000172 +cb6be82b66a21475a047bcb1d46c1c9c frame00000173 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fli/fli-engines.fli.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fli/fli-engines.fli.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fli/fli-engines.fli.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fli/fli-engines.fli.md5 2011-11-13 17:05:58.000000000 +0000 @@ -0,0 +1,314 @@ +1b4b0bcf73af24a910d02c367ddd3a7b frame00000000 +8e82efab12a0e446bb0059d2daa1a5fd frame00000001 +e02417da0f353d9a0d78bddfc00c6b31 frame00000002 +1a7ad6e9f87683f450665873ae07d63a frame00000003 +2971cee7ae4ccf0f4532edc7d4049de9 frame00000004 +a8e13b5b321b7da843b3a00207427ef4 frame00000005 +39478b32151509d6609f3be7a18b8606 frame00000006 +fbb9c62d957d7d2597f408e28e66541d frame00000007 +ea7ecc593672ee75a380c75ba828dfe6 frame00000008 +1164f65465811c7fb01f9a3a54697c7c frame00000009 +8105a5041e50d4fafb7c635c44c33b15 frame00000010 +c770ff4bec1cde40670be2fab5b03737 frame00000011 +4e5e19ff783cf47d46f377ba88db37be frame00000012 +7ec5c32d8bdfe27056d8c267f4585383 frame00000013 +961289b594d658773248d2d16f839970 frame00000014 +86ae89a3a2520c047fd6dcf3ace49170 frame00000015 +b5fd3cf6f9d0039b21e680b86812881d frame00000016 +246af733cbea8b71a961889e90c58861 frame00000017 +539567f16ebdf0fc992c656fed3caaf4 frame00000018 +6bb9c10bd104fd993af2160da96056f8 frame00000019 +b787d51091624f68208deabb7d8885d8 frame00000020 +ee6bf39113674f8eb8cd27ae7d8bd30a frame00000021 +fec73e97782921873e30c33423cd06a5 frame00000022 +535353caae3132e67eb13ef2cac96a63 frame00000023 +1a5caf228afc5e12bcef8a693ed2c44a frame00000024 +2f768f90af4d2c6567eb59a0d70b28dc frame00000025 +f470b57fdb8aa9f082287fbdc53be8b2 frame00000026 +23a2e16dcc334c1a6206e2cc5ee8eef9 frame00000027 +571c80f40c4496ff809b6125090217f1 frame00000028 +e3c5523fdad12141706f4693f0ddb515 frame00000029 +1b4b0bcf73af24a910d02c367ddd3a7b frame00000030 +8e82efab12a0e446bb0059d2daa1a5fd frame00000031 +e02417da0f353d9a0d78bddfc00c6b31 frame00000032 +1a7ad6e9f87683f450665873ae07d63a frame00000033 +2971cee7ae4ccf0f4532edc7d4049de9 frame00000034 +a8e13b5b321b7da843b3a00207427ef4 frame00000035 +39478b32151509d6609f3be7a18b8606 frame00000036 +fbb9c62d957d7d2597f408e28e66541d frame00000037 +ea7ecc593672ee75a380c75ba828dfe6 frame00000038 +1164f65465811c7fb01f9a3a54697c7c frame00000039 +8105a5041e50d4fafb7c635c44c33b15 frame00000040 +c770ff4bec1cde40670be2fab5b03737 frame00000041 +4e5e19ff783cf47d46f377ba88db37be frame00000042 +7ec5c32d8bdfe27056d8c267f4585383 frame00000043 +961289b594d658773248d2d16f839970 frame00000044 +86ae89a3a2520c047fd6dcf3ace49170 frame00000045 +b5fd3cf6f9d0039b21e680b86812881d frame00000046 +246af733cbea8b71a961889e90c58861 frame00000047 +539567f16ebdf0fc992c656fed3caaf4 frame00000048 +6bb9c10bd104fd993af2160da96056f8 frame00000049 +b787d51091624f68208deabb7d8885d8 frame00000050 +ee6bf39113674f8eb8cd27ae7d8bd30a frame00000051 +fec73e97782921873e30c33423cd06a5 frame00000052 +535353caae3132e67eb13ef2cac96a63 frame00000053 +1a5caf228afc5e12bcef8a693ed2c44a frame00000054 +2f768f90af4d2c6567eb59a0d70b28dc frame00000055 +f470b57fdb8aa9f082287fbdc53be8b2 frame00000056 +23a2e16dcc334c1a6206e2cc5ee8eef9 frame00000057 +571c80f40c4496ff809b6125090217f1 frame00000058 +e3c5523fdad12141706f4693f0ddb515 frame00000059 +1b4b0bcf73af24a910d02c367ddd3a7b frame00000060 +8e82efab12a0e446bb0059d2daa1a5fd frame00000061 +e02417da0f353d9a0d78bddfc00c6b31 frame00000062 +1a7ad6e9f87683f450665873ae07d63a frame00000063 +2971cee7ae4ccf0f4532edc7d4049de9 frame00000064 +a8e13b5b321b7da843b3a00207427ef4 frame00000065 +39478b32151509d6609f3be7a18b8606 frame00000066 +fbb9c62d957d7d2597f408e28e66541d frame00000067 +ea7ecc593672ee75a380c75ba828dfe6 frame00000068 +1164f65465811c7fb01f9a3a54697c7c frame00000069 +8105a5041e50d4fafb7c635c44c33b15 frame00000070 +c770ff4bec1cde40670be2fab5b03737 frame00000071 +4e5e19ff783cf47d46f377ba88db37be frame00000072 +7ec5c32d8bdfe27056d8c267f4585383 frame00000073 +961289b594d658773248d2d16f839970 frame00000074 +86ae89a3a2520c047fd6dcf3ace49170 frame00000075 +b5fd3cf6f9d0039b21e680b86812881d frame00000076 +246af733cbea8b71a961889e90c58861 frame00000077 +539567f16ebdf0fc992c656fed3caaf4 frame00000078 +6bb9c10bd104fd993af2160da96056f8 frame00000079 +b787d51091624f68208deabb7d8885d8 frame00000080 +ee6bf39113674f8eb8cd27ae7d8bd30a frame00000081 +fec73e97782921873e30c33423cd06a5 frame00000082 +535353caae3132e67eb13ef2cac96a63 frame00000083 +1a5caf228afc5e12bcef8a693ed2c44a frame00000084 +2f768f90af4d2c6567eb59a0d70b28dc frame00000085 +f470b57fdb8aa9f082287fbdc53be8b2 frame00000086 +23a2e16dcc334c1a6206e2cc5ee8eef9 frame00000087 +571c80f40c4496ff809b6125090217f1 frame00000088 +e3c5523fdad12141706f4693f0ddb515 frame00000089 +6c5a597d398e1956fae8ab2ff566d11c frame00000090 +6c5a597d398e1956fae8ab2ff566d11c frame00000091 +6070e5a620d105d741fff24b4cf98e8d frame00000092 +6070e5a620d105d741fff24b4cf98e8d frame00000093 +db5cd48589d51314ff869032760d52d4 frame00000094 +db5cd48589d51314ff869032760d52d4 frame00000095 +3d9f91c2ae75eb67d77f44afa264c44a frame00000096 +3d9f91c2ae75eb67d77f44afa264c44a frame00000097 +749980f1c2f2784e9e5887a7044bb13b frame00000098 +749980f1c2f2784e9e5887a7044bb13b frame00000099 +4c1cd0539b9e5d5b146c1197d08c241e frame00000100 +4c1cd0539b9e5d5b146c1197d08c241e frame00000101 +2ef9ed220f34bc37f817777b9cf30f07 frame00000102 +2ef9ed220f34bc37f817777b9cf30f07 frame00000103 +9e2c078137bd31ba7e42b83b2e7a63c4 frame00000104 +9e2c078137bd31ba7e42b83b2e7a63c4 frame00000105 +c758d582f42f4711d504483afa34a607 frame00000106 +c758d582f42f4711d504483afa34a607 frame00000107 +f919ba75887d92c56b6d2f8ee768ebba frame00000108 +0740f9bb7e71d7dbad001f5d0604c43a frame00000109 +8675976e7cd4d350d9267a2db9ee36b9 frame00000110 +c1c4cb7b4620a3259baf8cbd7d39e23a frame00000111 +6113e2fc0296e9fddea5f8602353e07f frame00000112 +9df106a0811f1ce3b028e2679ac03dcc frame00000113 +0008199d964c98ccca1319d95d37ff43 frame00000114 +37450fe948266a06eb0b75eb758d77f0 frame00000115 +a7c5c67231660ff6f9e9cc86e32f1fdf frame00000116 +66fc7fa716e1c1168e2aeb2012139d8f frame00000117 +d6781b7cf12379bc3e8f1992f0ce54af frame00000118 +759135ec841e4b8a2c5eaf836f26da0c frame00000119 +3d308a342e6d8a73b0ce71df2896729a frame00000120 +13a41d52c88c93ffdf5e1b7c0e0744d5 frame00000121 +a834a0455adc8f559300e15a90e59f82 frame00000122 +f45912926bf91b2abdbbf0a638d22005 frame00000123 +c20b6e6bd7f8c9768e0e9b3ea54da512 frame00000124 +e8714ef4c69b871371ca2989ac8f1edd frame00000125 +f0d6a280792c8d1181766224942ac10b frame00000126 +2af45a44496882f5fd69ac1d0f168cd1 frame00000127 +750be5e942b0b1235d38ae26e56ccf57 frame00000128 +4493bb97688ccd7c19c6214107f906d1 frame00000129 +89d33714ac4902e3d436c6dece3a1da2 frame00000130 +adff00da290827565f0de35278532117 frame00000131 +851ca3be4d6d737ab120446887269b9c frame00000132 +2997c2ff918d09c5f3460f297e9b2bdc frame00000133 +761591b37f5d672ca38706de1be0953f frame00000134 +b51dc374ca085a00bead8592a80f6808 frame00000135 +6c6b3f24a94bf0a6b64647dcb3ec5b63 frame00000136 +e21eb1cb850d92bcbd8f25ceb262f394 frame00000137 +2e698f1be628cf529eefd342bdf64a74 frame00000138 +ce001116807aab534bf4abec8a59eb7a frame00000139 +730de7cfc0b1439c4c1d41d0920e41d8 frame00000140 +9140cc8544b004828b6b936f73d26aff frame00000141 +1ce93c5366a4c5e3f01daab942ed9256 frame00000142 +380319c9263411a3c97572d1d5ac648c frame00000143 +2575ae3481962ba5c3af78238d279643 frame00000144 +aac1ad7a807b065f99f10c8c0414109d frame00000145 +9d219a0f7ae03be214a25c7f8305c371 frame00000146 +f2d9e652e7d984220f7f25c034b03b5d frame00000147 +797f85d2481cc9b2a72c4d6176bd5be4 frame00000148 +e76b5b0bfd8cfb32ed425b09915b1dba frame00000149 +56c0b186b438619eaa30de032af86c6e frame00000150 +cc3db31c890a28f5864b422221ba1f70 frame00000151 +dc2d9f55b7489960f554ac838d608cd3 frame00000152 +f43506125e114a30ee0797a5e32f43af frame00000153 +42da444d3dd0d4617c579f36200c56c9 frame00000154 +a7d4f1f69929281d473efef27fc61edc frame00000155 +194e3a1c575f3130c8055d4d5b40c7f3 frame00000156 +4d2541279fbe7270595adcbe80badcc6 frame00000157 +8ebe4e90c53724b6f58f8b4f57969e37 frame00000158 +0740f9bb7e71d7dbad001f5d0604c43a frame00000159 +8675976e7cd4d350d9267a2db9ee36b9 frame00000160 +c1c4cb7b4620a3259baf8cbd7d39e23a frame00000161 +6113e2fc0296e9fddea5f8602353e07f frame00000162 +9df106a0811f1ce3b028e2679ac03dcc frame00000163 +0008199d964c98ccca1319d95d37ff43 frame00000164 +37450fe948266a06eb0b75eb758d77f0 frame00000165 +a7c5c67231660ff6f9e9cc86e32f1fdf frame00000166 +66fc7fa716e1c1168e2aeb2012139d8f frame00000167 +d6781b7cf12379bc3e8f1992f0ce54af frame00000168 +759135ec841e4b8a2c5eaf836f26da0c frame00000169 +3d308a342e6d8a73b0ce71df2896729a frame00000170 +13a41d52c88c93ffdf5e1b7c0e0744d5 frame00000171 +a834a0455adc8f559300e15a90e59f82 frame00000172 +f45912926bf91b2abdbbf0a638d22005 frame00000173 +f45912926bf91b2abdbbf0a638d22005 frame00000174 +c20b6e6bd7f8c9768e0e9b3ea54da512 frame00000175 +e8714ef4c69b871371ca2989ac8f1edd frame00000176 +f0d6a280792c8d1181766224942ac10b frame00000177 +2af45a44496882f5fd69ac1d0f168cd1 frame00000178 +750be5e942b0b1235d38ae26e56ccf57 frame00000179 +4493bb97688ccd7c19c6214107f906d1 frame00000180 +89d33714ac4902e3d436c6dece3a1da2 frame00000181 +adff00da290827565f0de35278532117 frame00000182 +851ca3be4d6d737ab120446887269b9c frame00000183 +2997c2ff918d09c5f3460f297e9b2bdc frame00000184 +761591b37f5d672ca38706de1be0953f frame00000185 +b51dc374ca085a00bead8592a80f6808 frame00000186 +6c6b3f24a94bf0a6b64647dcb3ec5b63 frame00000187 +e21eb1cb850d92bcbd8f25ceb262f394 frame00000188 +2e698f1be628cf529eefd342bdf64a74 frame00000189 +ce001116807aab534bf4abec8a59eb7a frame00000190 +730de7cfc0b1439c4c1d41d0920e41d8 frame00000191 +9140cc8544b004828b6b936f73d26aff frame00000192 +1ce93c5366a4c5e3f01daab942ed9256 frame00000193 +380319c9263411a3c97572d1d5ac648c frame00000194 +2575ae3481962ba5c3af78238d279643 frame00000195 +aac1ad7a807b065f99f10c8c0414109d frame00000196 +9d219a0f7ae03be214a25c7f8305c371 frame00000197 +f2d9e652e7d984220f7f25c034b03b5d frame00000198 +797f85d2481cc9b2a72c4d6176bd5be4 frame00000199 +e76b5b0bfd8cfb32ed425b09915b1dba frame00000200 +56c0b186b438619eaa30de032af86c6e frame00000201 +cc3db31c890a28f5864b422221ba1f70 frame00000202 +dc2d9f55b7489960f554ac838d608cd3 frame00000203 +f43506125e114a30ee0797a5e32f43af frame00000204 +42da444d3dd0d4617c579f36200c56c9 frame00000205 +a7d4f1f69929281d473efef27fc61edc frame00000206 +194e3a1c575f3130c8055d4d5b40c7f3 frame00000207 +4d2541279fbe7270595adcbe80badcc6 frame00000208 +8ebe4e90c53724b6f58f8b4f57969e37 frame00000209 +54ff6859154ab79c83fd1a2a8a2de53c frame00000210 +b58a86f6a039e8b6ece2e537035b40a9 frame00000211 +8b3edf0ba85c8acf858694f5145b9d80 frame00000212 +e42c7305159e11d9da50ed617b185f18 frame00000213 +dc168ac06dc344aac46b848b7afa618b frame00000214 +6e1f3a920f1e07e2fedb82f3f75ad877 frame00000215 +e87ea8165922deed9fd78838f43a7896 frame00000216 +adc6b1de8498ee0d6c5cbd17de704642 frame00000217 +7e7f6671c587827419429f11651ae719 frame00000218 +0d8f2487ed9686a526cccca2ca919b9b frame00000219 +81cb02b42bc46dad981fead2a79d9f2e frame00000220 +7b13db0342a8344da1de9efbd8eacae8 frame00000221 +165e475025a1473ed72ab04c91e3c9cc frame00000222 +46845c00443727d592814dc93691b895 frame00000223 +ba963de0d3801439d461f7f7c02ffb97 frame00000224 +c92a5e9d1a789cce0e95882b6bf6da84 frame00000225 +b47ca63ea0d8c0697681efa71902b9fa frame00000226 +41fe6a8f8b55525fa2cfcca10727c3b7 frame00000227 +f1bb205f84f8920dd67c47afd1e2a4cf frame00000228 +3d027f45ed32914547a7419315afa41f frame00000229 +be8e4783e45fa61c32c51fd570cb4517 frame00000230 +c2564117252c97f91ce97a5eb7640922 frame00000231 +a9ea9e3bd5979f5ad1b711e1aca86845 frame00000232 +607867f7ea07a97d6e2b43f1cc5c90b9 frame00000233 +3b2d47d0b858eadbf559cee6d8e04495 frame00000234 +cccd31581b8cc163241dda318f76f9d1 frame00000235 +e985ee4a83e88da41990b122d86ef4e4 frame00000236 +f4f6f1454ec346b484e034ddc56e4e43 frame00000237 +cd241a6b1f88f085a1b723185ba94ca8 frame00000238 +04c6606a3e06d41a9c3462da702e2df7 frame00000239 +c92a5e9d1a789cce0e95882b6bf6da84 frame00000240 +b47ca63ea0d8c0697681efa71902b9fa frame00000241 +41fe6a8f8b55525fa2cfcca10727c3b7 frame00000242 +f1bb205f84f8920dd67c47afd1e2a4cf frame00000243 +3d027f45ed32914547a7419315afa41f frame00000244 +be8e4783e45fa61c32c51fd570cb4517 frame00000245 +c2564117252c97f91ce97a5eb7640922 frame00000246 +a9ea9e3bd5979f5ad1b711e1aca86845 frame00000247 +607867f7ea07a97d6e2b43f1cc5c90b9 frame00000248 +3b2d47d0b858eadbf559cee6d8e04495 frame00000249 +cccd31581b8cc163241dda318f76f9d1 frame00000250 +e985ee4a83e88da41990b122d86ef4e4 frame00000251 +f4f6f1454ec346b484e034ddc56e4e43 frame00000252 +cd241a6b1f88f085a1b723185ba94ca8 frame00000253 +04c6606a3e06d41a9c3462da702e2df7 frame00000254 +c92a5e9d1a789cce0e95882b6bf6da84 frame00000255 +b47ca63ea0d8c0697681efa71902b9fa frame00000256 +41fe6a8f8b55525fa2cfcca10727c3b7 frame00000257 +f1bb205f84f8920dd67c47afd1e2a4cf frame00000258 +3d027f45ed32914547a7419315afa41f frame00000259 +be8e4783e45fa61c32c51fd570cb4517 frame00000260 +c2564117252c97f91ce97a5eb7640922 frame00000261 +a9ea9e3bd5979f5ad1b711e1aca86845 frame00000262 +607867f7ea07a97d6e2b43f1cc5c90b9 frame00000263 +3b2d47d0b858eadbf559cee6d8e04495 frame00000264 +cccd31581b8cc163241dda318f76f9d1 frame00000265 +e985ee4a83e88da41990b122d86ef4e4 frame00000266 +f4f6f1454ec346b484e034ddc56e4e43 frame00000267 +cd241a6b1f88f085a1b723185ba94ca8 frame00000268 +04c6606a3e06d41a9c3462da702e2df7 frame00000269 +c92a5e9d1a789cce0e95882b6bf6da84 frame00000270 +b47ca63ea0d8c0697681efa71902b9fa frame00000271 +41fe6a8f8b55525fa2cfcca10727c3b7 frame00000272 +f1bb205f84f8920dd67c47afd1e2a4cf frame00000273 +3d027f45ed32914547a7419315afa41f frame00000274 +be8e4783e45fa61c32c51fd570cb4517 frame00000275 +c2564117252c97f91ce97a5eb7640922 frame00000276 +a9ea9e3bd5979f5ad1b711e1aca86845 frame00000277 +607867f7ea07a97d6e2b43f1cc5c90b9 frame00000278 +3b2d47d0b858eadbf559cee6d8e04495 frame00000279 +cccd31581b8cc163241dda318f76f9d1 frame00000280 +e985ee4a83e88da41990b122d86ef4e4 frame00000281 +f4f6f1454ec346b484e034ddc56e4e43 frame00000282 +cd241a6b1f88f085a1b723185ba94ca8 frame00000283 +04c6606a3e06d41a9c3462da702e2df7 frame00000284 +c92a5e9d1a789cce0e95882b6bf6da84 frame00000285 +b47ca63ea0d8c0697681efa71902b9fa frame00000286 +41fe6a8f8b55525fa2cfcca10727c3b7 frame00000287 +f1bb205f84f8920dd67c47afd1e2a4cf frame00000288 +3d027f45ed32914547a7419315afa41f frame00000289 +be8e4783e45fa61c32c51fd570cb4517 frame00000290 +c2564117252c97f91ce97a5eb7640922 frame00000291 +a9ea9e3bd5979f5ad1b711e1aca86845 frame00000292 +607867f7ea07a97d6e2b43f1cc5c90b9 frame00000293 +3b2d47d0b858eadbf559cee6d8e04495 frame00000294 +cccd31581b8cc163241dda318f76f9d1 frame00000295 +e985ee4a83e88da41990b122d86ef4e4 frame00000296 +f4f6f1454ec346b484e034ddc56e4e43 frame00000297 +cd241a6b1f88f085a1b723185ba94ca8 frame00000298 +04c6606a3e06d41a9c3462da702e2df7 frame00000299 +c92a5e9d1a789cce0e95882b6bf6da84 frame00000300 +b47ca63ea0d8c0697681efa71902b9fa frame00000301 +41fe6a8f8b55525fa2cfcca10727c3b7 frame00000302 +f1bb205f84f8920dd67c47afd1e2a4cf frame00000303 +3d027f45ed32914547a7419315afa41f frame00000304 +be8e4783e45fa61c32c51fd570cb4517 frame00000305 +c2564117252c97f91ce97a5eb7640922 frame00000306 +a9ea9e3bd5979f5ad1b711e1aca86845 frame00000307 +607867f7ea07a97d6e2b43f1cc5c90b9 frame00000308 +3b2d47d0b858eadbf559cee6d8e04495 frame00000309 +cccd31581b8cc163241dda318f76f9d1 frame00000310 +e985ee4a83e88da41990b122d86ef4e4 frame00000311 +f4f6f1454ec346b484e034ddc56e4e43 frame00000312 +cd241a6b1f88f085a1b723185ba94ca8 frame00000313 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fli/jj00c2.fli.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fli/jj00c2.fli.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fli/jj00c2.fli.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fli/jj00c2.fli.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,26 @@ +ad956fe963193f1c143bd25a5e65e8ba frame00000000 +099454465f68baf704712562545679bd frame00000001 +897b7e1f35a9e74d0f54e48706aa5499 frame00000002 +ca7a2f74a8858bea7998dd098ab25bc5 frame00000003 +c1946d6c60e0bd2c8102580101df4bfd frame00000004 +ad781df3366f685fa1c2c5ac86c949b8 frame00000005 +aa1f3a6bb03f7ac6615de21255b7664d frame00000006 +2d851d2bb5891851e4978b87d53b2284 frame00000007 +b440b7d09022955a4282fdd35458e275 frame00000008 +ba3eef04586740ab2c7b86ada149d78b frame00000009 +8b89b9e2961e7dd281c34dd91dbcb393 frame00000010 +393e9a28b7213df85fe65002de4f9312 frame00000011 +2087056630402686c2915cc7afaa39c9 frame00000012 +6a127d48f61203238aff9ef507a1ce1f frame00000013 +26133e1134fb5029015ccd906899c90a frame00000014 +cf3016f92745d26e1a1a97e667b09a68 frame00000015 +f27051e09fbc8dc1e49b8f98882d13b8 frame00000016 +7238344deccbede9a64849c65ce1ce21 frame00000017 +6b78ee9783c108f935c2c4d366d9a123 frame00000018 +f5e0b1981292cd2d17be2fdcd5d4c250 frame00000019 +01a1cd5184d79c98e335ecf7eb43f482 frame00000020 +de1dd9dbdf27b1b2ebdd298dfa112fa6 frame00000021 +27412565e27753b3e4774c54ddd81fb4 frame00000022 +8237246b2f8c928c06aac9caa7866b16 frame00000023 +8d7e701bc795ddbc0ad1f903913d0717 frame00000024 +dcb1f4ad65931dd4fbcd3b7cfaabf746 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/fraps-v5-bouncing-balls-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/fraps-v5-bouncing-balls-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/fraps-v5-bouncing-balls-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/fraps-v5-bouncing-balls-partial.avi.md5 2011-11-13 17:05:58.000000000 +0000 @@ -0,0 +1,58 @@ +2f359832990ba671fe92fc2f23d3e542 frame00000000 +95ec201bb71116847c02ec8917484310 frame00000001 +93adfab4098a37ae8b531c0a876a9419 frame00000002 +2ae06f2e4a59e1874de7cca6b4e65a09 frame00000003 +63b5e37f834c52a8444d87c6d24bfe53 frame00000004 +9641f3e2f5ccd148a7c71cf180da0b6a frame00000005 +c75b6090d3ba3b53d85baaa36b7dc4b6 frame00000006 +8def6e6e83a85d3bbb8cb7dd2a5a4d61 frame00000007 +88f7cf6b25b2905e77a7d33b780f6150 frame00000008 +8d294669aadad22a86cccc7ff47472e0 frame00000009 +4b94658d949b663cccc27da39a788837 frame00000010 +d755402f7967986d87ad224529ecb11d frame00000011 +5437ee6902b625457e0a954eaa44919a frame00000012 +1cb6a707f7b3cf8a546f516b9dbc03b8 frame00000013 +ac482037d5221e80833e0c8aab5073ab frame00000014 +3cb92501b2b2131b3912bb72ca8fa85a frame00000015 +ef7243e3dc5024fb3fb3c3996408fde0 frame00000016 +cfa152a6f9058f422ec839b1b7c3d6cc frame00000017 +6dc2dcb73cda8fbdf6d2704666c132d9 frame00000018 +6a8eb20d8a06eee95768921bec748eb3 frame00000019 +eb69e2ded0336f1d9500e616b8e173e2 frame00000020 +2a13249d4210a0ddbbe050436c92cdd0 frame00000021 +d3bed036cfc822ef793e7a9aff640682 frame00000022 +0be398966dfe0ae199442da5c08002fc frame00000023 +4fed4477220b328c0c24fc5f27f57197 frame00000024 +d3f8424de11176e8f1f5395550ee9d65 frame00000025 +86f4ab21df81781718180b1cf1114393 frame00000026 +e91b573380773eb423b061c9e7b84a43 frame00000027 +644eee6faa6bec91e9eb37f39b0c8a55 frame00000028 +f114b982b4771d003b913c5620191783 frame00000029 +592a283e1a4b77ad4c425170e021488a frame00000030 +b25693e322066003365a08b5820cf629 frame00000031 +c50b2c26ebbcbe9ffde19eb652bb7d33 frame00000032 +7710d1a3c3b2db5cacea4736fe4dd955 frame00000033 +8aad6fddd4133103069a8b255dfd8351 frame00000034 +82d45f200a3f7c215df6a3d98222ed9f frame00000035 +a95a015d8e891d3401de1bcf2669d745 frame00000036 +3e54397c16a80949672b947c0cdd55c5 frame00000037 +4f97a2ed64d19c2703fc5c1af2913c08 frame00000038 +5c3c8c69a6619cb346ab28d5b7913104 frame00000039 +44e0856013bf5f3d473695db8950b399 frame00000040 +11b58aecca0d01ef3526edd080125d16 frame00000041 +0aff15f0cf72f1d995a2ced7747ab1f2 frame00000042 +59862720011495684f1472d51899ae98 frame00000043 +1e2dc38f378a563bcef1118614004f2e frame00000044 +51e9acbe03de0151b35266e1e9721034 frame00000045 +f62b3f71dfa039819f471713f7d04133 frame00000046 +9664a005d820a5b231d212bf0c9971b2 frame00000047 +c8a6b2001c0f1e9058d150fb3f9df621 frame00000048 +24fbd28d4081dbb254d856e00ed07471 frame00000049 +2e5d066a84ef7024497d18cb7a68ef4d frame00000050 +778f984b786654be62cfbb51d17b35a6 frame00000051 +3617764fe5d0cdcf9da01bc80f8e283d frame00000052 +8646bb52ca770a2f30efec4bbdbfd057 frame00000053 +414d7eea9efff3fb760e8ec8d28cde6d frame00000054 +a5a8018023715d6436e0223f6651650e frame00000055 +4ffa00009221c22775bd76173565436d frame00000056 +cb13c3fd8b4d5a9cb12c8e2317598783 frame00000057 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/Griffin_Ragdoll01-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/Griffin_Ragdoll01-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/Griffin_Ragdoll01-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/Griffin_Ragdoll01-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,20 @@ +8188a9be483c94496478ddd4d1c2873a frame00000000 +7cbcdb70e9ba60c2ece67e4b8351e5c1 frame00000001 +f69c85696428751eb14d8ca5782f9bcd frame00000002 +8397d23bc6298b0632e315813462c7bd frame00000003 +7ae2bf3382ca7d51aa3fe840fa01bef3 frame00000004 +eb29b29995d75005c0e855459d6286ff frame00000005 +0bbf2c0154456240f829187b3d4e091f frame00000006 +6d30367446f71b4fc525d376832013d3 frame00000007 +5f81e5618a20b225728fa4a3c82ec5c8 frame00000008 +421692e9508341228673eca639f512ea frame00000009 +45360e292dde270995f28871a61f6cd3 frame00000010 +358ac616f9fd273a1fb111b84c6b6b13 frame00000011 +dc4fa2f001ed97cedb7d8ee483bcd123 frame00000012 +467b592bf04b766b4879dad5caf04313 frame00000013 +a4ea685dc76c7d4fd2a25366dfe19ed4 frame00000014 +cdc93342b2c661ba41a3f574fb232126 frame00000015 +7b1fbb3a65f47ec25d542bcb6767c6e7 frame00000016 +daf64066ddd39c59f6d36cd6d52d34a6 frame00000017 +4f440a68617415ef7aeefe0865124cc3 frame00000018 +28af9ee00450012ba8c7a001e604a83f frame00000019 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/psclient-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/psclient-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/psclient-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/psclient-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,9 @@ +348462c75df0b79252fbbd893d25be10 frame00000000 +f2fe054139ac8b35c8644f4caa16cc9c frame00000001 +b676f525c43d378ebfabb38d9a57892f frame00000002 +a0dc09ee235ed675a9ab24ee669f48ec frame00000003 +a0dc09ee235ed675a9ab24ee669f48ec frame00000004 +0736b1ebdb9abd3be79fa45d45e0eae9 frame00000005 +495884c512ff8a20353eaafcac9aa2ce frame00000006 +495884c512ff8a20353eaafcac9aa2ce frame00000007 +4fc1b3c89b5aa78bd79fde772e438874 frame00000008 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/sample-v1.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/sample-v1.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/sample-v1.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/sample-v1.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1 @@ +adb361250cd78168916f53540211a52c frame00000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/test3-nosound-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/test3-nosound-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/test3-nosound-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/test3-nosound-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,10 @@ +4cd54f69e68ef47db347d17b470af136 frame00000000 +4cd54f69e68ef47db347d17b470af136 frame00000001 +4cd54f69e68ef47db347d17b470af136 frame00000002 +4cd54f69e68ef47db347d17b470af136 frame00000003 +4cd54f69e68ef47db347d17b470af136 frame00000004 +8a4e1f2bc1c65cb1810312c85123f9e7 frame00000005 +8a4e1f2bc1c65cb1810312c85123f9e7 frame00000006 +8a4e1f2bc1c65cb1810312c85123f9e7 frame00000007 +8a4e1f2bc1c65cb1810312c85123f9e7 frame00000008 +8a4e1f2bc1c65cb1810312c85123f9e7 frame00000009 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/WoW_2006-11-03_14-58-17-19-nosound-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/WoW_2006-11-03_14-58-17-19-nosound-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/fraps/WoW_2006-11-03_14-58-17-19-nosound-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/fraps/WoW_2006-11-03_14-58-17-19-nosound-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,7 @@ +fae809b3ef9ecfb318551a618dcbe563 frame00000000 +ac3a8e43df15cacfc1eb59932a59a1c0 frame00000001 +9ac079cf949e847a60c3e37fd4727f26 frame00000002 +0f3728386de604253fdc784712312146 frame00000003 +949f707cf1be5809a4afd74d4d67efab frame00000004 +09a509730ffccd77f9eedc5b17c134c4 frame00000005 +82d51724c2fd86d2dc09545de6a265e0 frame00000006 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/frwu/frwu.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/frwu/frwu.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/frwu/frwu.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/frwu/frwu.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,10 @@ +dbc3690f35bb5f44a33dd7b10593729c frame00000000 +e988d3f51b1930c002c241be8fdf38f2 frame00000001 +a54c8a14b59087ec99a40eaab5d8b0b1 frame00000002 +7958ded650452bf916c2b540f8ab293b frame00000003 +6f1e2c049cfcb333fc0e7217d99fe5fb frame00000004 +5f492c2c1d8cde64ccd719f2f274befc frame00000005 +84465bac90073df687da35fa77065310 frame00000006 +b2b60fff486b84650ce47dbebec83986 frame00000007 +5c98885d4e4cf579b7e7e34dfbb85606 frame00000008 +540a4b45c89063082b553004bc86cc51 frame00000009 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264/extreme-plane-pred.h264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264/extreme-plane-pred.h264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264/extreme-plane-pred.h264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264/extreme-plane-pred.h264.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,97 @@ +1e857d2dfeea75297e090ffe9e37a249 frame00000000 +29d8336b4e9b77298025074dbad641d1 frame00000001 +3f1a87d2088a7708f4ed06890c8cd018 frame00000002 +56b8b8d9fefbd501c4f7918f21f9b015 frame00000003 +597392c162ea79af1e5d3dd552ffeb47 frame00000004 +064fdd170aa24463409b1cb0ddc7f5b6 frame00000005 +9924da4026b10110fa644039e73f92c1 frame00000006 +afdb77f4a4c87faaf35988bf2d1d7c18 frame00000007 +80714dc3bf376f38c00f8c67fc534fae frame00000008 +fb0ab4028e1e9879b0bf0e414c0ccb33 frame00000009 +03c694f4b9e6116214078131f3edff91 frame00000010 +22d2de0d8f9e5477230b50c50ec46269 frame00000011 +470e9a6c5bbb15e151afbfd6b2f254a3 frame00000012 +b585555552169640b1a896094335b624 frame00000013 +e261e0f650e6d649a35773520e7f5bff frame00000014 +2d1bf889eef057016e473a041fbceac0 frame00000015 +b1a3f8ebf1de26bc8c32d47a4a53c862 frame00000016 +d5cdb80386dbb996ca007a0e210a9905 frame00000017 +05a200df7b8baa19d2a0309476727dd7 frame00000018 +890d62163f4aa70a2055d50de0395a35 frame00000019 +c00bdd1c5f0d69bae66ba46a897ad0ad frame00000020 +65f76c6d453822eb48b180ac630cbdce frame00000021 +d6b85fc02c6d8efa53a9f0f148a0520e frame00000022 +adcb1621c5100b8e201592328bcd11be frame00000023 +bad7da936734cf4304c1564d6d3e74b9 frame00000024 +a98d1232d0c22e6967415700d980c67f frame00000025 +3fa1110c3ada7d37f0495a26774a58fb frame00000026 +37613c65cfd3d77e8dda3b5b913e467f frame00000027 +42a5cf583a82e722e04c04b10fd36542 frame00000028 +41c2870e102e3584780cd0243baa1900 frame00000029 +da389397c874f5fd974c57278bd1e327 frame00000030 +238c265971ef9144d3fe6bc95a2ea060 frame00000031 +085c83a54aa9327e1e3ee76ffa337538 frame00000032 +f462966f59018b39c10f9a65a80a41f8 frame00000033 +6e9697b7c8193b38551af4ef56861b7a frame00000034 +e68113abf3e81a28cafd95d91871886e frame00000035 +35a78df5ac1ff6ee469626b750241c9b frame00000036 +b3302a87e334634a9f92ce51acf96ab3 frame00000037 +52198528552cefe90004a2b045b33e8f frame00000038 +12d9ad991d4bb7935342c8b6474d1726 frame00000039 +2e6a508aba965f292c7b2e82bd0debbe frame00000040 +8daff69112bb5fbc0158cbbf7fbe057e frame00000041 +5495a0bb6c88a115957d98b272b0d643 frame00000042 +955db92ab0c482381200247a207e12bc frame00000043 +c0f81c5f95fd658c153798a514fedd22 frame00000044 +3cfc7b9c2d73621cdb04d7e7e8bc2b3b frame00000045 +e8b6d1d526d6443cba2e64ccd5393a4f frame00000046 +7722e2420db0279c9eb7c6f7dfa89c07 frame00000047 +41b908a50b97a2e927f2e6e285e27592 frame00000048 +e05f0ddd08debc2a0578893662c33ce0 frame00000049 +1edcedca921dbb68c0ce53371abddd8f frame00000050 +cdbf0c89feb336e58472f0163e43b02b frame00000051 +39c4d20ecfeee09800feae5ad783e0bd frame00000052 +f60d05d20b3f338aa5917490d2b58f77 frame00000053 +76e5eae7a5205f6f6aaf8099197dbb1f frame00000054 +f7c4c80e79b691826915b7810ab7c2a6 frame00000055 +afbc098dcaa8c2a3f41dfc3e846e8e7b frame00000056 +6582805bbe4ab9a9138a23deb2ca45a8 frame00000057 +54444ce52dd1ce7bc24e9cbaba89dc59 frame00000058 +c81193469c0cd5a50c451d869e07a786 frame00000059 +89f2295b63db3adce2961630569749a5 frame00000060 +3f4d6dd4dd819168a358384d6b134d00 frame00000061 +45d3b5c72609a15c1be5a45f790a24c4 frame00000062 +f2283a8bf9599754d2e251c5f0861199 frame00000063 +06a9ccf8132c494884954bb4cc148c11 frame00000064 +e20e0143fc840db46a88a8556d887ea2 frame00000065 +bcb1ca471f70109293a15b7e1b0f3a7f frame00000066 +0c5f59f091b3fd5ced9bb626e5b66ec8 frame00000067 +4dd6cf80daf74390afe0423f726c2fb6 frame00000068 +fd52e6d570960cf100ac7c973dbd222e frame00000069 +684758faa9b5517b2e5dbbabccc6125b frame00000070 +e538a3bcb2125c8ac324a5be49470960 frame00000071 +0c91795b7f52e942a1c28b4c6510c6fa frame00000072 +b33315c61d714bd70d2adce3309633fe frame00000073 +af2554b6b1d3f215641f85494a78ad3d frame00000074 +e59b20b3b2c5ec215ea34ab4850f940e frame00000075 +fb543e874bdd9749aaa710d1551e0ebd frame00000076 +4383abaf938da0282fecabed153bca0e frame00000077 +4ce40ffa75b42320593e40596c34862a frame00000078 +f337d0cc81b5c1b1b92c3f367ed5f9cd frame00000079 +0f5a8c41fb7334811a485239d9126808 frame00000080 +0daf3d981474940bdf10a93148d69353 frame00000081 +21a51f1686071a6af7973df92361964b frame00000082 +1f0d471c7b1fa86f236c2dee32822464 frame00000083 +cedc6fd29d67976f899a6a8afba6b38d frame00000084 +4af936d3d3b456953c7beb551476824a frame00000085 +bcaf539953adb1952fefc2cdec6c2f60 frame00000086 +d1dfeafa0939fddc256986c2b00f73c7 frame00000087 +99c9a2c7b198e2c8cfe007ff4330f036 frame00000088 +4db6a7edfc44389536983aeeb15edb66 frame00000089 +8d840674b90e3b488a34e04645430ee7 frame00000090 +ad7b3e55a2eb62fc5102cc5af49301aa frame00000091 +f24484a975ec64acb50df3e9f9e8eddd frame00000092 +5794617c7e40bfcb7f024bda2f2a991d frame00000093 +ae1c22fcfa7f3b3b62dd2ace4e4b4dc7 frame00000094 +ad9d13345ae5322a578e43653e9a9c16 frame00000095 +be1b86ee130ea9255d9640117559818d frame00000096 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264/interlaced_crop.mp4.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264/interlaced_crop.mp4.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264/interlaced_crop.mp4.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264/interlaced_crop.mp4.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,121 @@ +de7d0489d1acc511576c106db1c160df frame00000000 +5c03069e7bfe1df176603bd4698494a4 frame00000001 +f2cab4e553b47042bb7a3cb8d44471af frame00000002 +079eaf8b77d4bde394dc0d2e29237851 frame00000003 +bef06ff179c88c4cda53857a316f715e frame00000004 +9fcea1c8149d3aa5c65a8caf3190393c frame00000005 +51d857e96746e56b27f28175ab4b5250 frame00000006 +a8ac8141d7b1492115976234501c186c frame00000007 +8cb2a2c5aabc28f7bd6bc6da3fc495fc frame00000008 +9fea8779d66b426f9f93c96235f951ac frame00000009 +7ba693c8b8b10a4821ffdf409246c655 frame00000010 +5b180feb6c8d0202d054509c0f99a36d frame00000011 +23b68a2e45f5419163b94d5f5c3d439c frame00000012 +d59772c911161b3c541858819142e0d9 frame00000013 +6a723ee3f194d9854c7cf91093a843d1 frame00000014 +7b1ff998f6fa9ed73cd193dc28b6e47e frame00000015 +9aa65a8206665117dfb42f9c8392c825 frame00000016 +31509fda5c48498d0003d994fa92e85d frame00000017 +e16039b8170420acada2271fcfa94592 frame00000018 +679c3f75e2733dfb9c0a5ed0e4e05096 frame00000019 +15078d2f2863800097bb9dd62af4ceb8 frame00000020 +cf3716122f9d0fd935c18bce2864c4b5 frame00000021 +8f6f072d5140269e43c6516dd0353519 frame00000022 +1d1899d38a25fcb849512661f335a8f3 frame00000023 +c61c112006003f246ea31a531917d34f frame00000024 +5f6a8a39a9e8a7530726b4e87be85a68 frame00000025 +afae64eeb3402708af0d439da2da8b63 frame00000026 +9670aa66dc4204307844b3b3d3b517e9 frame00000027 +a4f9930eff766a4d15e16ed7fde953ad frame00000028 +7bb2a929774eb9fe301bb2a329edb960 frame00000029 +66664c135206954be4c7cbfc48d17c51 frame00000030 +84d7eec9b633f9c4aa6302d578773161 frame00000031 +17ee14167dc92478654ba5b8b77fda84 frame00000032 +76f24df02e277d063094e0199f9f450e frame00000033 +450bd17c7d2a75619f28338ccfea1335 frame00000034 +43d73be6914a9deb545d6257eedf962f frame00000035 +b0267d92f60f66f66bb353b43352d049 frame00000036 +16ce9f06988b7210b5d11ffc5d9f0802 frame00000037 +ba1ad12369eff51aa06bebe16f4f42cd frame00000038 +fd44f6d9293e46ddeffe6b693d689717 frame00000039 +838fed9f7625152796b22d75c3c673a4 frame00000040 +cbad985c06f51fd809d51d8ed1b731e7 frame00000041 +08461f7d6a21ec2062f41b93410dce4e frame00000042 +cc8adf2b4437a70353cfbeea120e492d frame00000043 +21518d9fb106d227099a2e2740d409a8 frame00000044 +1cbb99c7f4bc537b922d6e995d633353 frame00000045 +276a2766d7e33387620250ce10130385 frame00000046 +d0262f135a5e8a6ddee091e0ca15ffdc frame00000047 +dd23e051d362eb1bc71dfcfae1a4ac1e frame00000048 +1a1812374d02041d2ec87ffc30858976 frame00000049 +a5ad705bf56566b46bd81f2b7e9b476b frame00000050 +8b37cd0eff14aa3aee0755c095f4ce57 frame00000051 +c6ef2a42360e3016c7f7d705d98e2d2e frame00000052 +da1db94d6a485b5ddff5a35924bb0bc4 frame00000053 +cede884a4532dd332c51060ce63a3186 frame00000054 +45561118f028edb11a3082b79d3809eb frame00000055 +936bc81f3f6dc81fd7465aff09e50913 frame00000056 +6a1422643553ae640dba8874990ae692 frame00000057 +72215022a0afe790073c2475f30d4fba frame00000058 +dedd8abb4c4636423a11e8a87b8d8506 frame00000059 +385ad8e5a10387b79e1f93771799e561 frame00000060 +488468d3c85f150a0872611865bc1c6e frame00000061 +e333898b0ec2a6bcc120476391f0e903 frame00000062 +b26cdb37b6fe4e3d2ed38c23d361f18a frame00000063 +dd3cc2a935e99b4dc826b7fc6552734f frame00000064 +658d7208869f5fc2884c9431762b0124 frame00000065 +6b151371ff33d646d77a7fd1b8ba3d21 frame00000066 +d02c590e7b64bc5a45861c47fabda517 frame00000067 +4cca1e6a0341eb1ec0edc70c6b8888f4 frame00000068 +01e5e15414f64332e826bb571a1c3661 frame00000069 +7c737b79f231ee9e9998c89c98501864 frame00000070 +51f1dc6e369ee34a2b7ce041b3f0cb40 frame00000071 +1d97eedc51b37ecc5856b5536ea60fc3 frame00000072 +4d46bf05447c43d6799ebfa88603a9e2 frame00000073 +ddeb619b0526d9df219a0969892371c5 frame00000074 +935490c51ed46093ed66a8b190173e0f frame00000075 +e8bd0a1ae1711ad5e55c1d5486616624 frame00000076 +e9062ab6f3d2fc433a9323a8fe3af47a frame00000077 +7e3c196aad0967b4bc73a48b85ff42d4 frame00000078 +947c3335f6770645c94bdc63d62e5ea4 frame00000079 +61933a3a0bd8a85948c687a7e9ca41d5 frame00000080 +45c5f1235bcce50edbf97e74423421c0 frame00000081 +a74d41d93ec9fef416a9032efbbf621e frame00000082 +7af9accb752ecb84a1f003a2ec7c6ce2 frame00000083 +33e974ec294b863f4cb102da0e26d02d frame00000084 +4861fbbaa797c1bf5d5cb2b90d3cdc42 frame00000085 +683110838f24bacd3794b4c4644c305b frame00000086 +2722ac8a2586135550796dcbd8ae5de2 frame00000087 +264c89778362904a3a1f33922558013e frame00000088 +4a8dd90a2d299c8f384f5ae30011a234 frame00000089 +af2ee122b3dbd9e827af00eff27a73d0 frame00000090 +b42675701873fad269d7b4430ac1167a frame00000091 +4790116f1f2db41117dbb164921c9f13 frame00000092 +ad9df4ed550dadbde475501043a6f593 frame00000093 +15dfc7e38400ada443f9941db7d7e421 frame00000094 +2b6c7bc0c8e382217338acae6e1b87f4 frame00000095 +5ad89704f7419190c2d78b7bab95a262 frame00000096 +90e07aad1084db782023a026ec87a218 frame00000097 +5e544971ba246c4ee7f1c7e6af3d4758 frame00000098 +cbd700181d427135856174abec56db3f frame00000099 +50a55f4c1a4f949578c2c7413a4d69dd frame00000100 +7fa7bf77377033202b13a3fb093049b0 frame00000101 +aebadfeebde50b9bd7ce6f311697a779 frame00000102 +f3b0d3a10d2f7364d468b21366cbe819 frame00000103 +18ef176ccfa2b697d8b3930607918bd5 frame00000104 +db74a1f487e5aa0ac6647d0c1652bd6b frame00000105 +eb65cdc886e83cfc6692bb606034e5dc frame00000106 +afff60a83bb95df55b7d7a94b2b28e08 frame00000107 +54e876720096a08344d6a9ae62b8494d frame00000108 +46ead1ece0d15ec2d7d5d518c03c3622 frame00000109 +5faac9076e037de04db135c2a6d7c6dc frame00000110 +ee50f83034348b3e5ecfbe0c693bd1ad frame00000111 +449a11ca884a2f30f8e10c0b7bde2c70 frame00000112 +0e306bf012e49c9288a001db7614d434 frame00000113 +34503d5a7d1966e2b30b0a37408a171e frame00000114 +8a0b11bbe8d4cd9f167ce92559b55316 frame00000115 +58e1965bcb04b5a2cc705e32f618d30b frame00000116 +bebcc390e62b65586244b7c441ad8f05 frame00000117 +3a1492900e86a8d138d3a9f62ac27b3c frame00000118 +9f20f18ea4c502b5a8b3a21e2299f784 frame00000119 +ddac4ba6ffcea31fa47c9a179ee9ddce frame00000120 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264/lossless.h264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264/lossless.h264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264/lossless.h264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264/lossless.h264.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,7 @@ +15cccd392f093e32d5728da1499a7d0e frame00000000 +699a4d63e9205ea1b6a27db8c8601490 frame00000001 +60519a3ddd34688ce05ca160191eaea4 frame00000002 +9bcec9beb84f99f6630fbeebd4b664dc frame00000003 +f608663bc77d7f89c2861038b204e73b frame00000004 +211c016577c078d1a3d5f66c733a9b4a frame00000005 +f4e8387df7aecf678a9cd94ac64b67d1 frame00000006 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/AUD_MW_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/AUD_MW_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/AUD_MW_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/AUD_MW_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,96 @@ +f5d5a19d60c9db6cdea533463707c153 frame00000000 +b544be5e20685f4df9ba4ff6f67cc98e frame00000001 +e3ee7459960a005da4ed35337ff3cd61 frame00000002 +ae89826dbcb02de36b701894e8b6b434 frame00000003 +20813ec2d77a8e9a0c26188be7ed63ac frame00000004 +cdf3de7d769583cb1daa2858dbc4fc88 frame00000005 +22da9d3f0d703a8128d3b00461f783cb frame00000006 +094c3b1f46345a648766e555a1d352c6 frame00000007 +1cd2ed2cfc1182b5dd198bfc3f0ee1ef frame00000008 +db5c1199716305c44540642db65024d4 frame00000009 +bd463dc42c9adbbb202c228ab74fd0f2 frame00000010 +4d2cd7309a5bdef4b1f345ce58be0980 frame00000011 +f88fb9855d5d68166be477524791f3f1 frame00000012 +9bbe422c2f157b84980d38bb322fd50b frame00000013 +f4c58712e269104a61cd6f30459d0c59 frame00000014 +a9c3bdc82356e9ade71a2c99e8945804 frame00000015 +3529cd9a45869d7ceff78d9c8ce02ba8 frame00000016 +74a177867daaf3fec76a6f9a2fff1808 frame00000017 +4cf357c7568edf1bc4d202f04dbef19a frame00000018 +e901bc0fd95ac0a88783bf87f71f95bd frame00000019 +c08219289a8507ce017752d77ccdc0b4 frame00000020 +5408d872aaa485cf12e0f501628b91d1 frame00000021 +3ff655c25376c80fb26242c3e8fd820e frame00000022 +98a23c4705b6fbdab75964c1be0b2298 frame00000023 +2d0ff9f07751e6f10e99504870f6951e frame00000024 +859e1161fe5b2d9400d0734ab7ddd6d5 frame00000025 +d02fdeadac99a76349f5f677f30f702a frame00000026 +76ff758375afc90f6c1fcc1f01d1cea6 frame00000027 +e076f5edf9fa2b048c7f44e3941edff3 frame00000028 +5e291d659fbb192ea9fb5a09c46047f6 frame00000029 +2c8354c3f6be3349c6e946d0c9ce6df8 frame00000030 +f65f9307502c1dae2267b424de1be46c frame00000031 +2192964280f3a1a1fbcee97e2dca8570 frame00000032 +04e3d62b99016bbf17cdf20a4b7c57b4 frame00000033 +b4fc3bc888658ccbf9ea38e318bfc7be frame00000034 +0663c8be11c757798f58fa212582115f frame00000035 +d8d235813faf7579973efe806ffad947 frame00000036 +81f4499de7f06469e0508b22ad6e69ef frame00000037 +0788842516c518a6d610d4a0a775b6d5 frame00000038 +61f409d7b2f1df2306a01f4b2a6cee0e frame00000039 +33b6c9a39a29d0b5df49f6132e484f6c frame00000040 +3743bac9ae6e8c5fdb1c7093b6e8ac9c frame00000041 +0ea37e0709e25cbc3cac3394c206564d frame00000042 +510a7c896895cde770e04d332df62d9f frame00000043 +00aef3dae227309158eed76e064b10e1 frame00000044 +a9296e2df3035abe2850d7fa2328003d frame00000045 +512531d9b2c3f3a1ad98a60e6e201023 frame00000046 +d0e6dd32a01876c5d580039aee9de4af frame00000047 +a3f98fe45b91fd8c7f6a4170a8211b4e frame00000048 +e5489e298e5597b8fdef339268fd66f7 frame00000049 +1df536d63138ab37bb0093ef1886c86b frame00000050 +1271f23608d7ebc397d900fc8877e18e frame00000051 +23e95c527f40d2fb4d1a156a9ccda274 frame00000052 +34b5c5c3a60ea7307fb826b2fdcaddd1 frame00000053 +9674178183523270f6feb91df86892bf frame00000054 +24b1088afc2cf3e93580892403e8b29d frame00000055 +ab9f83144d2e29af8097814d72f91619 frame00000056 +03cecd5209d29673b93486b4641eebab frame00000057 +8768f8d02f63fedfa967f28827835138 frame00000058 +f0d460b909da9db0fcd0d3161d57c772 frame00000059 +65fcd1ab4f39cfa0c646d76f0da06f26 frame00000060 +b8207fc5d46e6e5ef76b81e909c2a9c2 frame00000061 +a34f1f4e3862d6ceac8d14a8d055530e frame00000062 +6a922e3310137f380162ace63268c9f1 frame00000063 +9197dd724d59689ce619cc1711c18f3f frame00000064 +62677c022414418657493fe46cd00e49 frame00000065 +9fbd5ecd424530fd022581b5dac80d67 frame00000066 +673b40de6e885aaab07b5dc275ad40ec frame00000067 +cc5eb078ade96a5a170211d403b940da frame00000068 +e4b45e713dac951a77821907098ed1c9 frame00000069 +c7e1131e407c6c88e2ddf48152cafa84 frame00000070 +999f910b4db7bd3cac81ed6d7b8a32b0 frame00000071 +1196ad66112d56b26c583be9a4946fe2 frame00000072 +63118926fe7c68b0d37f67fa54a2e6d1 frame00000073 +40beefd0aea979fa6e961be71e1bb5c9 frame00000074 +8be2aa0330649daf81bc0b190d971e89 frame00000075 +bfd736ea89b85e15ca4eb59e0ec171aa frame00000076 +8727dcedcf311efebd68633b57165b8e frame00000077 +afc95f28a0a7663ff5d632194a08e20d frame00000078 +571e30e9907424ddd01de6c78e16d63c frame00000079 +b1dc5ce4f42ba521ea871cdbe392e501 frame00000080 +cc19bf4fd0e85bc16fca8a2fc6644559 frame00000081 +30e1b001f62f55a15d54ca299596ef81 frame00000082 +51982fb857d20db2b81fa7fc1d73cd54 frame00000083 +9798aef3b622350f37b401851313f82b frame00000084 +1f8fc03e3600fb869548dc26a3901bae frame00000085 +afdd8b43daebe14f0aeef5a6100a8771 frame00000086 +23e4cc4b546ba2ca568e1e0a6e4473fb frame00000087 +221a432e0f53387664531de08516c9d9 frame00000088 +3a3c12a4d01d42e42dfe7182885235d3 frame00000089 +862f6eca868db3bcbd32bad3e229bb5d frame00000090 +866431625ff57848e40e7c2763855de2 frame00000091 +5bd3d645e6d3ed97e464958b19cf9eba frame00000092 +136b6767ee97fc2ca751cf302414a93d frame00000093 +94cb5cee707f55a5caff29b127cd2fef frame00000094 +0db6b102db9c46eed2beb71e998583b5 frame00000095 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BA1_FT_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BA1_FT_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BA1_FT_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BA1_FT_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,295 @@ +1d571ffdaf896ef5d4c9b185b1fdd8f2 frame00000000 +f6718e45cf342670cfbad6d0e91a4e46 frame00000001 +0f95d3e8de5f1f024c0bdaac42b9f1ec frame00000002 +9ae17db4f4716ade0c7d6f882f741a05 frame00000003 +f17e700076b5d41ff9024b7439473f64 frame00000004 +7be126a5007db7ddfc3dcd0db0325ece frame00000005 +f8af38303935b10e8e723b9f850c52cf frame00000006 +a5fdcb6a99eeb2bf2de99b5913f7a0ea frame00000007 +8307d1d0c8c8e18125dbcd4f2b2c8714 frame00000008 +7fa7fa4afb7d3a4ff4a14b491fb3a57a frame00000009 +3ce14453c771f8d33dd86946e35cf1e2 frame00000010 +2944850d5dc51d3a5b3ca4b78ed5b658 frame00000011 +0bf3d8ea91ccd9ec627c6039f39cf4f3 frame00000012 +cccd294501490386f3012eac422e5174 frame00000013 +33615fbe58c111efd3db9e1cb90185d7 frame00000014 +4d73db432831a0b0940a566e777caac3 frame00000015 +0e637fd2eaaf3c2af1e16b47cc7af49c frame00000016 +7bbe2017c6bdb612ecf50d8277b0227d frame00000017 +b36bad66364906c36bb16278f271cbf8 frame00000018 +93e0b53f8eff3ea5c4f755cb583aaf97 frame00000019 +c249c7ad1c1814f2037f37f3eb0b599e frame00000020 +790de8c92c775d9c6a5e73829e512ca6 frame00000021 +4f8b3bff4ee2185474713ba698d2b63a frame00000022 +76bb043da7857ec9685cd40acb89536c frame00000023 +50cf2064934739b6183fcf65356f432c frame00000024 +7cd8ba1804f56106d2e102e3cde70d10 frame00000025 +e104576b8d50e7bc08e19faab777aa69 frame00000026 +e11cb79c5e0cbfe326a6aabdf1360cb6 frame00000027 +d9ea107fc549b890fc9b573ae9905ef6 frame00000028 +25ea6ba52cc12b19cf12237bc4944821 frame00000029 +6b6acd9306e8dd3f1f2c7768132e5b9f frame00000030 +ea15a501f17c57178b98cc2a1ec48a65 frame00000031 +35c8f920c372cc0f28c8b9018d3d1230 frame00000032 +33b3579b57a3591b73b59356225aac5e frame00000033 +424905f3b0226666a5b1f12ed7974a0a frame00000034 +24b130356f36e6a0beafe4fb69e993ab frame00000035 +64d016cdb67cb7cf3da2752842bc9de6 frame00000036 +8bef6db7e99f43d828a01f5b71e87921 frame00000037 +35f582342c6d758f3445aab0ba3ae287 frame00000038 +38bfcb3e5b918b137fd708c086d2cdeb frame00000039 +8ceb82af3f472c7b835e8d05424bd6db frame00000040 +b2ce80a35d0803427287cb8e274c4ee3 frame00000041 +6e4415be6bafea92aa2213bea3effce8 frame00000042 +74fe29cd220d96968ff59ad0096b72ad frame00000043 +ffa7922549bedd79167a618d5d1c2906 frame00000044 +f41826adc23c119ac09da9e5c2e4ea81 frame00000045 +fbbfbcf7ae8bf6e43b233a808c7ba569 frame00000046 +6c7f7411e369461faf019b3d2221e371 frame00000047 +d249ca7f4ff77202e3f9ce945b912025 frame00000048 +c0141c096d934526a3811871027711c7 frame00000049 +0e5904ce0700e2b1f9dc6f60a616ad1c frame00000050 +c1eeb3b23c4f58f7bcf2f1d1bb5a6fa4 frame00000051 +228558e318213093ac980535154fd4af frame00000052 +eeb1694c60a8fc883046d52daf8b1e87 frame00000053 +0a2bdbb241b24d33aa5dfa8f5c4dde78 frame00000054 +2662a6c7e54665d06a00c248849ebbaf frame00000055 +6d043ce832cec15ae3bdcdff5c25fd8d frame00000056 +2aca9dc3ca5be6815bb0522751df5548 frame00000057 +3d680618a3396c0d830ce42e0d53ef40 frame00000058 +64df5eed0cbdad500b6c6e08a038826a frame00000059 +155ce289b258df37d16133e9b61116ea frame00000060 +17795dfdb2ab02d7219f4aa81da76f27 frame00000061 +567d6aed59aedbf3f10c24d733b1577b frame00000062 +df6ed72d0503bea7f183df5326ea878f frame00000063 +616f060dda67d76a8ed1c634086f6a0e frame00000064 +ea3110419e38a7f21003f0386bacdef8 frame00000065 +c199e3574f035720b06581902f8e3e29 frame00000066 +2f96f7488747ef031a1c46b4938e6fa5 frame00000067 +9378c6322c7d30b6585c0227415ab9e9 frame00000068 +093ec1cc901f3f02d962dbc395cc7c13 frame00000069 +ae62ab8034c43dac95579ea6de9ba52f frame00000070 +3a0367b091eb151b90e8634acee6a57a frame00000071 +413fd8eac8e182da4365fc4f38e7008e frame00000072 +aba645734287c30795912d2ee30fa008 frame00000073 +060384f87b3fd40a3199f4f492d91b79 frame00000074 +10417c5a679dca275cc8a3313f11d76d frame00000075 +b8f0e367cd135fca50c7008a79c395de frame00000076 +5aa65621c7f237be9ecfdee6b6b9ab9a frame00000077 +1df9dbcebf458d676832709d3b4b40df frame00000078 +184026de2750b70b4d4f64bf86df03f5 frame00000079 +dc85623e58ec399f579273813b069e38 frame00000080 +ba01c237816f1f93052b453cfc7d0e6e frame00000081 +5ecdfc4e395052ed4ae9a8759b5c6bec frame00000082 +fad3810ce1a1fe3baeee7a9f81b03012 frame00000083 +fc1d23b340b9bac842944a8a68f93919 frame00000084 +f0574aecb7726f4a51203305c65e68b3 frame00000085 +0f8da0c9ca253674fa8b53ced6b21f8d frame00000086 +eff975bf50b3c6325dc486155789193c frame00000087 +f0e6884431b3d06ef7b843e04563c338 frame00000088 +c2635636680b9b98f4c1f2d3c4c7b105 frame00000089 +dcd240ef2dc7cf687786074d127a5fd2 frame00000090 +e5a71ee511e52e4eec6e2c620b5008c8 frame00000091 +d05827f1e59167d68246dca271ceff33 frame00000092 +16494ef5aa0d76984de0c09fb23b963f frame00000093 +1b78e5e8214bf4f8ff523a8fded3bad2 frame00000094 +935adb0a77e46a3efb45b4990d98b073 frame00000095 +439bd0b476697cce38206cad3d83918f frame00000096 +7fcdec1a98faa49b7a546d1dee11e566 frame00000097 +e85048736334cad034b15864f254179c frame00000098 +ed6c08e916d98a0b7e65f5608c2c26f4 frame00000099 +8bdea36b991d5a1901b4dc6bf9f9af6c frame00000100 +2db0c8aff46e598fffba97c9b5bf7727 frame00000101 +658a3655a66f0fae849cb366589fab7f frame00000102 +1b22a560616ce035687062bc06496abe frame00000103 +fe374e907d1d58469d5b7ab86c4d50bd frame00000104 +2365b35a1b5f3a23a3e8f8aa017e49e2 frame00000105 +736ec5e3d86543e85e459471d4c1e25e frame00000106 +a24aa5a4045ae60d61026962f36d45eb frame00000107 +afeb51e9018e6df9fa1be742b9a48f46 frame00000108 +5047497902aaa6c05d402f8ef2ffebd0 frame00000109 +7aef0dd67300abf0626c2f77ef7ba8bf frame00000110 +4125797f839ea2a787e2d7f5d81488d6 frame00000111 +4f2ec38dbf8a9f04b6e962a9014daa7a frame00000112 +8a10f1c765430a168a6b1d16853ffbc2 frame00000113 +9b268f0546126a529f571963586a4e71 frame00000114 +2fd86e5b792e0f6ed59b222853aafdd7 frame00000115 +b3c68fd9d0399f4203c07e544b202473 frame00000116 +b123f83c099c092eafb0ec61bcfdf321 frame00000117 +14935276e5664cf392f5962a054a316e frame00000118 +d9fcd017cc7dd94fd2091ae9d79cd300 frame00000119 +dea5d17462e576316d72e2655046b085 frame00000120 +124b8ea1903e87a0234c83fcd56d81ac frame00000121 +3101b75d58f834fb76f9a34fe77117fa frame00000122 +70313ee1e5317b7e1529dbd8628dd16d frame00000123 +4ce2ef537d51e3387fc8e4f74f9dd9c6 frame00000124 +d857aefc09255ab4b9e1d6b17c8bd8e7 frame00000125 +6b563f0fe6a6869dc5bbb2b2191ad1da frame00000126 +11373be9aba0a7c9ccc7589d428db4ea frame00000127 +e04111d915cd246fadf6911c5a757d35 frame00000128 +43f6394802d08a7d33b08d7d46ea87ab frame00000129 +6c249b6a6d3e0e0ae54d9a2def3ae08b frame00000130 +c313d115a445d124ec8fa9d9383383cf frame00000131 +fecae9ddd112e43fee16a6922359abca frame00000132 +e8578d98f5f7321f5e5f77cee2034178 frame00000133 +c8ee214c97baa9ddeff19af231a015c1 frame00000134 +6e515b5993b788ae76ddde6f03d42f1a frame00000135 +a71e40f6a1356bdb6f4a6deaf9cbccf2 frame00000136 +08c440cd5df30998941d142d0b05e88b frame00000137 +f572e0bac019643737a3a0d541460a3f frame00000138 +f200d29c583428b92cf748234c361099 frame00000139 +5adb781e083d8f182d4ab1aeaadc9393 frame00000140 +81f83a75472f9c39e0af46c728866a1b frame00000141 +044758d8623f7d60a934013b23a18ff8 frame00000142 +95a59c71c039b82c1acf1a7388139012 frame00000143 +e77a462b74bf123e6deb1d3179c56581 frame00000144 +c92cf59b3a66bd008fa75ce9bdd7dbf5 frame00000145 +382cf3044c2f717f6db593ccef4f7cfe frame00000146 +1d7bf85602d3c0cdf44510e0aace7efa frame00000147 +4ecd985aaca7f7aebfb439f0026254d5 frame00000148 +e81da4277bfea22fa4733b19f64f8d8f frame00000149 +25050b660484447d0981beb7c3e02be9 frame00000150 +afc89baa0e94f24888d65447344fc8ee frame00000151 +da89f567ec36d0ee0c38aee5d9f31c5b frame00000152 +a91bf2db47f10a23f9ee7041aa5b164f frame00000153 +54e1e44d4a6f71588e90ddcac4ac2335 frame00000154 +a7210472b2c4887b6b640b9389f0c98f frame00000155 +72056decb0528970d36c8bd4ea9b5a3d frame00000156 +0265bf4c43fc1bc3f470ebc7994299b8 frame00000157 +f982f972a34420bfb9db14caf5305287 frame00000158 +d092c385f85544e88513c2f92ec5ea8a frame00000159 +923f3d117212f8bb3ce938b18014cb3b frame00000160 +e8f9a029ece534ab339c549c68c757cf frame00000161 +b4ffdd92cba13a92186e725307c48a64 frame00000162 +d292938ac37496b291d2bb1f9ffa886f frame00000163 +2284c59197f1bebb78f3e7e9666ded08 frame00000164 +76bb5b4b350b219c3ffb92f3e3a66a39 frame00000165 +7cbdd1e388b8f7cea315d84e366e7e6b frame00000166 +5f68b6e070b6810b2fd60b561044af7e frame00000167 +327655844f6e5ffced025afb212715e8 frame00000168 +a0748e4d7b7ae0ef41b2cf38e3575190 frame00000169 +2b60f1e996c9f75ddd2cacce73086dfe frame00000170 +7dd7b80981d2e6a2e6bdb5c50f799252 frame00000171 +66c27eae617d74e5512e05f4c9f1ddf4 frame00000172 +e2af94c424e55cd1966ec0108747dacf frame00000173 +a7bfc70e7f387080a0703d2eb9575937 frame00000174 +c3cfd75e90015e93a9e637ec32c27f71 frame00000175 +6a8f8df2917e08f78ec5e55a19eb68fd frame00000176 +258ef9930b3e32deea80c8d04a67a7dd frame00000177 +ae02aaf06ed0e7ad228e0b709037f850 frame00000178 +194592ab8595ecf6c8827dd285857704 frame00000179 +33aeac822b53f679d196799dfdd2215b frame00000180 +bd6bc7331d418209bdbb8d5ec80ee453 frame00000181 +5c0a4ce7704aba167d79b8b77f20e6ce frame00000182 +81c3b593bbbbef5f9204a168df11c5df frame00000183 +d889706eebc37f0513a350f211c4b4ed frame00000184 +d023dd51377e6d2e2ed2fd607347284c frame00000185 +e6ed5c3ff521aea2d6f501062bc59f4f frame00000186 +5a46625a9b48af9e23fa90b78f0010f9 frame00000187 +b7d7aa707fc34c9cc9a159f2c83762a7 frame00000188 +3c51222edc87a7c2eced365c52a0f199 frame00000189 +c26e27b9609860479dd18c2d5fc96272 frame00000190 +c95ef75057cea67e81f1541a24eeded9 frame00000191 +e3d00c50a767702795dac74f765a5d94 frame00000192 +2e75f4b661ef18f9761513e829902978 frame00000193 +fd2c07cec46db0a8e61e8b3ed35fdd72 frame00000194 +a65f22b3c359ea3895411abf4108daec frame00000195 +22a9ea887dd5aa34fde9b0efc698e756 frame00000196 +c9d725b20863e35d5603473a792f0f6b frame00000197 +1f50fdef28f45c7a730a1da13d108093 frame00000198 +bd2b172d5cce6f816754249a42c84ff6 frame00000199 +ec1526091b04ec0e60c3355d38b9f848 frame00000200 +f704a05d0eac6e11bb18c5a6cf237e0d frame00000201 +9999cccd24351d7053c3482c7f73a34e frame00000202 +78d30e4c2502b99ba9b39dcd572e48f8 frame00000203 +1c74c8fbbc60887fda0955e1c92e1f5e frame00000204 +5c6c8b49d7accd6fdab8993923da818b frame00000205 +9f4fdef85c970f40c1c2dc6cd6a85812 frame00000206 +3f811a3f26020271a132449f7a2e5c60 frame00000207 +35d9b74d3268dd3ee252bc99726f8b65 frame00000208 +b0b6affb5d4ffb10601f3a5630254318 frame00000209 +a64f495c94d1f67f11fb9a57ae79c515 frame00000210 +5ed6010ee8fa3932b5da5c970e4c0c2d frame00000211 +b550ba2457948f726196b50610368db5 frame00000212 +ee734fcee41d9dd72c5a142d2808fe01 frame00000213 +e67c37059de98cce56472e1f296f120a frame00000214 +e9e84189e8ac6ff6781826912c88b41c frame00000215 +3df044f0e59e2bfedbc49f14ece8602b frame00000216 +c779278a866c0b28f5464c4f894cd90a frame00000217 +ddd663dd6d4ff070a6191a4c7c5139cf frame00000218 +34b38cdd87106591fad606ec2d19b560 frame00000219 +5e8b3af6f32ed00b5f1a7e8988e92567 frame00000220 +551893ad23b756b23d3d7a6e54ee9e62 frame00000221 +4dcf8d214c03d87885351b20a6209ff8 frame00000222 +1d99c64120774b0e85fffd70a5aa482e frame00000223 +3afb870577c1c9782c1b691e004fbcc6 frame00000224 +a0c3b2797eaab33d086a8da3a4399624 frame00000225 +62cc7045099dc95097ef668eea99fd87 frame00000226 +8d4a65ddb813056eb76ecfce297e0f04 frame00000227 +fe43eabb6317450144bea7d35a33e628 frame00000228 +ffbf667ca3be400bdae78ef34338f283 frame00000229 +991b348edef27d2b0b894219c6a92b9b frame00000230 +0aa854301e04a431ce15c5f391be5697 frame00000231 +90be101a13aa9df361a883331fc922b4 frame00000232 +97cc62597a53d9b31cb2707988f20299 frame00000233 +1e33df0a5a044d7d19831982dca46026 frame00000234 +677962851d3cd53c6cb84fe899c38e5e frame00000235 +4adaddf79e337d98c506f42a89d6bcfb frame00000236 +d227bd1eba8259da475961dcc57ed735 frame00000237 +88d740e413759ee07d8061616774fa5f frame00000238 +eb3b2b6c87f2a1e9b2195d3369de5630 frame00000239 +1b1763550a601ed3b88290731e96c8f8 frame00000240 +b5f66b7811e76108bcda26ca688e4bb9 frame00000241 +9edbb44361c6e2a55e4e3f80ab7a79a8 frame00000242 +baa4af3601cc3c5dae962bb46f0bf901 frame00000243 +cbd43cf593f301f7737cda0dfb64d693 frame00000244 +8376dcc65a1921510f6f87a3a34d02fc frame00000245 +67cf2798f837c47b05d4ef554d0f9187 frame00000246 +42928d48b5c0aa24b026448d59b371d3 frame00000247 +03f6c3c6f8c1e180b5b8d90670a3e9c4 frame00000248 +69b651d01b8271850f65cba4d5a99993 frame00000249 +f50c958843e1b1680f17b2c3e715f3a3 frame00000250 +93451818edc9816850900b7f9db725a5 frame00000251 +de6746965c7db88f8ee3df4422ad11d4 frame00000252 +6fc3a56906db9c30468f307c4bbcf572 frame00000253 +1ac40d6079a9855fa06a0d5f54448e2c frame00000254 +9d745e33cfebbf1e7759156643572bdf frame00000255 +9bc878b772d5e3c49374a65b23b13288 frame00000256 +c7ae8a2bea2bbc87a637b254b0ce4a0c frame00000257 +dfb36ea8687998de2514aa9af21c8430 frame00000258 +99ab72bb93e8b0a0d3318593825f0d95 frame00000259 +a01c3fee352ee5a7ab58f418a29100da frame00000260 +f6962612555d77fe1ea183ef3161ded3 frame00000261 +d9ec5b45ebb6e58cc23016182b5bca51 frame00000262 +612cc91e7d8d563d2a7cd1e107c4fd7d frame00000263 +cbfab6926f34cf5c013b2938fbb06404 frame00000264 +86718878d5efd57f194c13d2c09da943 frame00000265 +13ac65b72e651aeb8d1c04250d238b75 frame00000266 +a5ab043828964fac3c59f3096b831750 frame00000267 +c2d158b6b5e296a4172effbb16a976a7 frame00000268 +99c765c0641144a3ab5794237e71c4b8 frame00000269 +c6b9afdeccd90a0ae2225d23ec7c71c5 frame00000270 +6f7802a0781086a3f28292d943da39dc frame00000271 +b74952fdebdf6736968fbd5526835a6b frame00000272 +4794b3e42c0ba1960fbc151a3039168b frame00000273 +20dbc3daef784ffcfbe24f0d24f285d3 frame00000274 +7572ff36a9861bd880d1de4bd8bbdbfb frame00000275 +4aaee64c31a55f61792eb4a708c24109 frame00000276 +14c788082636c0a93324a3d48d7b19b3 frame00000277 +f4acd56d8327d45120507385a189d838 frame00000278 +7e33f318dfbb8527ccd4c068e9be8bb8 frame00000279 +dab03473b5af212d4d0c1b8d16f2e2b4 frame00000280 +c04c8f504b4cce680506e411256dabc8 frame00000281 +085c870648f9ef1e0b942d8ad9d7e975 frame00000282 +864c1b378e28171832bfcd1c12560374 frame00000283 +469346c59614099d24d1ec4cc6fd8c7d frame00000284 +57fc23699d2fec0c6c1ae420c2dbf0d1 frame00000285 +d2a33676749223b9b093b70fd9c9e8fe frame00000286 +41ead0b541714c8cc9dba239b32f3a12 frame00000287 +41518b6bb9aa4905f55cf82eede7e675 frame00000288 +8f926fa6093357f4fa7d0cabae4e1dec frame00000289 +d5d3e541301b16eef2f7c7fee88b5548 frame00000290 +b6a5b299052dea24fb3891b327ad2cb3 frame00000291 +145d1f30679978204fe41653f0fa5b44 frame00000292 +0c07a69f831c797d1d69880445880ec4 frame00000293 +37a59ad1bc5037be1339d21ec7545805 frame00000294 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BA1_Sony_D.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BA1_Sony_D.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BA1_Sony_D.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BA1_Sony_D.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +b46500b37abd2767385fbf80d1222fa3 frame00000000 +f6a17dfe91a93ca0b02794a8083a1b8c frame00000001 +3f325cd918838dff3ffd356561484e8b frame00000002 +731340720bcd24433f3bbe632ef539b9 frame00000003 +b9b6f585fdbb83882083af6584c3a772 frame00000004 +529e0a65608f5102a8ef0f97f80a7e8b frame00000005 +ca57f9cd3ce03adc49c938447a2006b1 frame00000006 +75d0d4421bba346692f678a9816f1cf3 frame00000007 +5b2251fb59a829ccadd4cbb08f52e174 frame00000008 +002ff953316237c7896e1c2812e297cd frame00000009 +eb7612198135bc2d221e6ca09edd0920 frame00000010 +c0a8afa3299e88aa49885a9776a321d2 frame00000011 +40875bb4d742e8664f3efe54fda5514f frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BA2_Sony_F.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BA2_Sony_F.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BA2_Sony_F.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BA2_Sony_F.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,296 @@ +b46500b37abd2767385fbf80d1222fa3 frame00000000 +74ec0fee23834894f12eb7668a2ca136 frame00000001 +105a3579e6b3d85c30a23e6a8e7a9805 frame00000002 +a9b1d8845e060424f2504dec0285cb54 frame00000003 +d75b900e5c5f18299db66b6874f8c92b frame00000004 +077dd82667be132be4310c77c76b66bd frame00000005 +ff5345c873025742973c0c95f31741fe frame00000006 +e5053fbfabb8e2de1b4f68d0ae78046e frame00000007 +4efc84b1f43bde7939c544f6769601e9 frame00000008 +e524dbcba2f29253db2da2d051f98f04 frame00000009 +60b673f5590cea7953ad4dc324e2a6b0 frame00000010 +7a805397989789fc921a3982d8abe27c frame00000011 +7f69ae23f60f96a49e33908b606c93a3 frame00000012 +0c847729a9664d506dc891a550892840 frame00000013 +619adde3c666c6b38e71bd03e250953a frame00000014 +8a072bec9e961d8bc6f34d2c02dbacd0 frame00000015 +bd21a1a6dc744379372d627db99002df frame00000016 +5062707e656f5d11c5ef247f2eb9af50 frame00000017 +6abc5cee1cc7cf5d814bee476ae8ecb8 frame00000018 +134fb4976569a3c5c71fdb708076b1ea frame00000019 +40d2faee2d1b0c6feccf78e6d1f37829 frame00000020 +e0c4149970b7f73bc6e5b2e48e2d6b5d frame00000021 +320eea91f240c558af62a087a3413bd0 frame00000022 +6c5a2b0d3fb9ce8810d2b99de3a08a31 frame00000023 +5c156f0ae9ea95082c1694f1c619d21f frame00000024 +6c8233489341d27db9106c8bade17c00 frame00000025 +57f829a4ee71a7b2c9979fc9424fe2f8 frame00000026 +52b7805bb10a6861d862d4360dea8cf6 frame00000027 +6d5c00c9942c17f142cd415b8b090565 frame00000028 +97e5c93a8280568c6d97fd31f58d6615 frame00000029 +8ac1386944484b93ffd859b34bb1a7bc frame00000030 +7927ae61e7229cb577f76a58660b7129 frame00000031 +354cad36c4bdf07fcb19622b11f32a66 frame00000032 +67dd00ee6aef6f382ded8b655f3374b5 frame00000033 +d390da5622aa70c5d1942d2422c76e0e frame00000034 +bf089143fcc2909de44eece914bd6006 frame00000035 +5a2c0a4b3fc61a7aadcea635ab55de2d frame00000036 +378751befd4ddf0e38c0008f9bea7264 frame00000037 +5f34161d806a1c58a0c056eb8b2ca3d7 frame00000038 +ede3a720604ea4c870447fcdbd61b81e frame00000039 +f64991fc4be6e059ebb7feaa664614de frame00000040 +517b4896c1c81febc79a8e5a22f71517 frame00000041 +0a9eefbc19ffc407e04f5559e7012de6 frame00000042 +7e8c678d0670d8406ad4ebfb417d31b5 frame00000043 +d2bb91e50e186edad775cea59b831fd6 frame00000044 +0212e5563b753323dddf5bdf0d857b4d frame00000045 +5eda29406edf9d250b4b12156e4997dc frame00000046 +bae3b1628c94a20b2cc0ed9eff153854 frame00000047 +84c7dbfb8fd5241c8df806463f843827 frame00000048 +4de39f7dcf7332921c49c04f25441abc frame00000049 +0f3411235a55902d0eb4440c95942f23 frame00000050 +756b1c52ce9cfc83d0c5e7281b8aa0fd frame00000051 +8e42f551a856032bde62ece479d6e49e frame00000052 +06cdd33abea0953e5b925d3a78b778a0 frame00000053 +f794ee7c6c6e8a849316dd753a1e3ceb frame00000054 +05df5fe3c6e122eec909c0ef00342903 frame00000055 +75c11c153a494673fbd793ca966ad10e frame00000056 +8dab182e442f54db569d37eb0d8e92b5 frame00000057 +ac6f342728263df7f2ba66c68be6bcf2 frame00000058 +b90af18d64760b6f632e187420933eda frame00000059 +09b9ac7dcedca703135daa5bd7ea845b frame00000060 +287d9e74229e00fea0bf8acb162093df frame00000061 +6a90c7232be1ac7c0e6c9581fc49361e frame00000062 +192c5439c5938f7a1e3178857bca22d8 frame00000063 +d07a9bfc8db12f6039a57e18f278d425 frame00000064 +cdc64289a7f4ecb3566e91f7a782da4e frame00000065 +ed56eee7ed2704da99d112d12545c516 frame00000066 +bc9f712fb7eeaae886c409f6a5125a7f frame00000067 +56ef76c2f18c2790f8b559384d4ffdd1 frame00000068 +9e4188b17a2a4dd8a7508663098dd533 frame00000069 +0e4fccca1d94761161775a1392e57c01 frame00000070 +85d60d95b02730dd737c743056730e89 frame00000071 +61c4e517801de2e616ca4b06cb319acf frame00000072 +c397b3a28192ef0c7d3a61acf155cb39 frame00000073 +b62dd191c44adc81acd149dea71fa784 frame00000074 +750b180932c06d42d6045720ee6cf23c frame00000075 +6e214bd1feb94191c59dbed13a4ea152 frame00000076 +9e51f7c5314956fdf614d065d49c5809 frame00000077 +c0b60f4f838ff8191eb8e48704591cca frame00000078 +44deca2f8024716ebd2312223239094e frame00000079 +7e8286b35d903728a94cfe5f094553dd frame00000080 +cf4ce3b6f6c545bedf971da5fc34743b frame00000081 +f6e04223b4acc8cf04b93bb0881ed5d3 frame00000082 +2b18f171ba467afa6335af12698e2ba2 frame00000083 +8e86da9d4eff23be6d1f4c3e348a2b87 frame00000084 +cfa6f1be6e231368480dda508c2048d6 frame00000085 +c4cd08a1a0a8ebd194487528a5cb314f frame00000086 +561819dc94e76b2f6478967b8e05ec91 frame00000087 +055de29d182e022ea3ebcd1a216d0b8a frame00000088 +fa08b8966aeaf375fe03dea61a87bed1 frame00000089 +2615b09438d70f344349c1e30cce66a8 frame00000090 +4a72cc6e95276471a5ec3a90621ad184 frame00000091 +7932aa3605597209e6d924477f9e8084 frame00000092 +3d2c3bac94faf02e866803d0454aaf72 frame00000093 +ce1326965ec8fb50cec127a03be0b439 frame00000094 +9656709be8a8399ea94cff741f9f3b6e frame00000095 +b25fb34dc708e9f69fcdbdc4115c2293 frame00000096 +67a74664f66d4e0f0c16f098bc70d23c frame00000097 +d7808bfd6fd45370e139b74e88253de8 frame00000098 +2f0899bf600d802a1c2d244f22659c9a frame00000099 +a3e2050a950d7cd071d88f2631f2a3cd frame00000100 +e59c9f3c3c77589752883cf8ee1f237c frame00000101 +3f7c19c1e02e7c6ff663461da8fb417e frame00000102 +4f2776d1eefa93f5fbc580c0e39a7e0c frame00000103 +7a33d82032f940d9e9afb747a55a5d21 frame00000104 +0f818f35cfd05e9a3148e04036d54ebb frame00000105 +778fdebef2007af9de9861e662797d55 frame00000106 +b8d717e2f10ab60402a28424241b0fce frame00000107 +8ebcc68147e7db3668d3add7d6d92d71 frame00000108 +acd173ab537f50965d3bfe169842416d frame00000109 +d385fc7f2d3ad27f403067be276ee8e9 frame00000110 +df06df81d5a859e7bece84c18f5c25d8 frame00000111 +f68c9497b22bdbe98c47cd15ae4fc1d9 frame00000112 +17e99bc9e45315b14980c3fc5e1dc6e5 frame00000113 +68f566f64a05a7d4351771f445c8a7aa frame00000114 +b93a5f31b2ca21e49b5fb81b0eb1f887 frame00000115 +9ee14c5e9832f8ae077fb16929642b81 frame00000116 +563cc7fc745591df84bdacd0dc205b82 frame00000117 +07962de59e638f3bbf507145ff20c91f frame00000118 +336624ea2185a18893f54ea687317f35 frame00000119 +70cb2eea9fd0d9a8c94be58e97fba3d1 frame00000120 +9814bc778297c2746b46f940a324299e frame00000121 +5ba6e6597443fc6bf59391154972e60a frame00000122 +76d2b60f52801977cc4945ebaddd80a1 frame00000123 +7b69da7b448454e4523f6d57852bb1dc frame00000124 +f7975c13404ec92e14ac32be3a9e463e frame00000125 +de864bb84ece16b472c90e75bc320aea frame00000126 +0b53283b97c914b140c544c2ef5c039c frame00000127 +fe08f1f0825799b872b5b6bdbad8b531 frame00000128 +d641a5ce04446cda3c7a6a395ce9c12d frame00000129 +0550e27c70a1b3b0785cacd442bad999 frame00000130 +e1c0e9e22ed9d0259f4457e26e66e518 frame00000131 +630ab90da96b01da61c36ed75fd91f9d frame00000132 +793ce0ab9963b862079bda1e3cff901a frame00000133 +6056644a7a594bc6de62eaaaf12dc77f frame00000134 +a8ec2b2e33079a043085d68634f8ace4 frame00000135 +d8d4070df5a8e2693bb030d2824a4adb frame00000136 +cf6cf0493b0a488ee016a62b5e73cc65 frame00000137 +6e4d581a26a4ec5827c4a440f68501ec frame00000138 +679741e55be9f0a662f8d4dc9278ad0e frame00000139 +173f0ed1b76f8e368afc44f2fef29979 frame00000140 +8568f9c1a6522ded7ca9cf30205f8cfe frame00000141 +365454f137b3fb25159f9c45d2a2158d frame00000142 +50ab912b73f3491f74169c70cdf64320 frame00000143 +de83af6952f4c72961cb7452e666d6da frame00000144 +5da3b2b2764a041e80b5dd8be3cc8b79 frame00000145 +5089d2719275e82870be9055086a11bb frame00000146 +07afb984777697a693f061b9eaf2f3d6 frame00000147 +0fe699c72c84ccf0a33fba52ea0b9cd0 frame00000148 +e40a99400e800e3a95822c94276a5cc9 frame00000149 +dace03a8776827708cad7491e10b0d02 frame00000150 +c8d830e874a8183e9cc1b55dc6b17994 frame00000151 +2529c6fc5ca00778590636ba5af89eb8 frame00000152 +8853a68fc468d20665a76e6a94eb5cd8 frame00000153 +1811855e2eb1afd516122cf0842829e0 frame00000154 +b4c23cc95beda1e5c5ba855bfa11cc18 frame00000155 +2ec2fdf533a5e46c7729397564ab9d6a frame00000156 +526ab9d3352bda56014c2d6e2e2d5980 frame00000157 +9e642bfa4b16247d5ab04e6c4dc7ecf9 frame00000158 +f2b75448e0a330402d14c4005e8423a5 frame00000159 +7daf23ebf2c754aafca4bd82efdb68ea frame00000160 +b0e07e7277a40f36b1086bd947134d91 frame00000161 +8253425631ad294c209f4331e3f80a10 frame00000162 +a286522240e62b0f06ad4d1828ab634c frame00000163 +845fb105c080b068e7cd9a9d11d1557f frame00000164 +fa489aeb0c546d11028461c8e0c18af5 frame00000165 +f54467da49b7447a0726270a9516d167 frame00000166 +765ae20e29c45350957f2664af2eeb17 frame00000167 +a34bc5c7c00de99a0af9943621d03a9a frame00000168 +30c7f9d83e89063116eac5df2fd82f9b frame00000169 +bda81f1e2b643c6c9bf28be2ffbfee63 frame00000170 +f9d0020b984faf0fa8b25a466dbce75c frame00000171 +9a0b347081a96ffce053a8884477896e frame00000172 +383870592885bcb127dc73bd5b80a85e frame00000173 +0b5c16a220a40e2cce2036e5f6da9638 frame00000174 +8b2b59b62e97a3875d9c47a7e01e7c4a frame00000175 +8fc88c940f1ed73a49781e3b9cd85d84 frame00000176 +7f60f18e39e758952dca7d638b7f489c frame00000177 +ec8efe9c5806b475a31b46bade263a89 frame00000178 +15b79eef6d6052cabd16f6859b6ee8f7 frame00000179 +974f5502ddc9ff343dd58447bcf6d81a frame00000180 +89165a85e709d342cf68ba9dfd498e45 frame00000181 +2bcc64b1b1bd5a72277235e4f996e0d4 frame00000182 +f80b7ee78d7c2986c1e337927b88e2a8 frame00000183 +c500bf2ac1bd6de0d48184a0e9dd3b02 frame00000184 +943dde6420845d8a1c8de935f8fd87a9 frame00000185 +a49251ca9ac69c6c4e3c67e15aec5183 frame00000186 +b21f8e364fca46f085e9d3c1d1025b26 frame00000187 +69f808f339f6bd8e7fbff8e365a71ca0 frame00000188 +1e00f309c600cfa2f95231641cada554 frame00000189 +0c989be14b0adc0127344782136ec536 frame00000190 +65beaa73fbe6b315bc160abfc5c861cf frame00000191 +6ba85cb563d66f013c9d150b55de4829 frame00000192 +5336632473a1d8ad2177184081efba0a frame00000193 +e1e1ba17db1e389338c4c35947ea34f2 frame00000194 +fbe6fdd50c6b79dac4fa00bcc7a1f103 frame00000195 +8501403765531b94c10f435ad48a7db9 frame00000196 +5893c2bb638a32ba2de14b99101e9eb1 frame00000197 +dba242d82234a0e9a12ea85eed18e538 frame00000198 +5f517078c902e8bc2670cedb0e5df106 frame00000199 +67ba81c155f4ec5e1e0330757ebf6459 frame00000200 +79f917d212c0d45531819505bae16c8c frame00000201 +0e17202ea5a0953160be283b905e7df8 frame00000202 +fe1e282372da08c8475b074bd2d95edb frame00000203 +9b02c1d9eec6fe99b6d1f5a24670e07f frame00000204 +611d5703934110abc6c0b3a60e8bf724 frame00000205 +de868df2c3061800d0863368ec95510b frame00000206 +d7ae702d22f988f94f6dfb7b041bc8f6 frame00000207 +e139c5de43f81b30c8401fd3b938c85f frame00000208 +9dd6303be9757d236e9d5377edef8eaf frame00000209 +d4c2a69e0367e574076586f575dcff8f frame00000210 +54e9b0216fd8896cfe8df0cdc8e03372 frame00000211 +e0595bcfd655f8db3ca84473b1adeee0 frame00000212 +82239ff2ebe90194fcf7cd1baa2f8d71 frame00000213 +fdacd4c2ab82969a20dbfeb501d259f3 frame00000214 +e2474077443cf4834590942fef7e2fb7 frame00000215 +1a0ffb256625f366dbed4350e82d9928 frame00000216 +d91eb82e61cd05d390c5f3aa005eb08b frame00000217 +1053811e8f5fc0b4c6d412c024e108c1 frame00000218 +a8c15775f9807ae2b9447468ec757d9a frame00000219 +f6b43063659f45aacb3e4cb27ac96ebb frame00000220 +455a693512cae41c24140cd46283b6f7 frame00000221 +89a546b6f9a5f24c108fc123dac20d7b frame00000222 +7bd3c7d6f866e21ff79fabaada191159 frame00000223 +dfaa7a04e7094b218702de9821d0b9d8 frame00000224 +37f557ba7bc854b4ea5344bc84a4b79f frame00000225 +164ea133360893c49d17e0468a3f4c2a frame00000226 +b0e3da78a67a06bc20bf1e617ec95060 frame00000227 +4b12c232fbd3fd56652c2b8baa2bdb5e frame00000228 +8c4fe88b0f9e7ae2a5a6276448a616d5 frame00000229 +1552ebbde809e20f42993846f98f9668 frame00000230 +9b7c6ee937753312d922ec6055666f0a frame00000231 +c052b9fa43bcbec54976694ee459c864 frame00000232 +30221b27c0fd6381cb0bfb5924fadfd6 frame00000233 +c0a6e827f2ec234054b08278d9f3b9b4 frame00000234 +1e492cd59a6bdb375a96d79c714a99fb frame00000235 +c5dbc1b55d98282141fdecae1d5262c3 frame00000236 +48e60c98f243d1d1cabb3ad93fc47c0a frame00000237 +7bea8c4884dea6baca421d217ca3ffe8 frame00000238 +14e4fbc8e28ea9ce881e8b2a1f7e576c frame00000239 +4a76027b86a12f0ba4be83ae889bb89c frame00000240 +42da0b1ea393394ade360b51f9c8ae38 frame00000241 +5ca347c3a7975a49583a7019290c66f7 frame00000242 +8b2e11e638e56aa6424bfc8c6da73211 frame00000243 +3de52472b19bac9caa75ad55b2f26fe5 frame00000244 +1bc2aa11aa53f46986525d0543adab1f frame00000245 +b3e92eebe43f8ab5524f300a938c86c1 frame00000246 +aa6e93c65ec003f48f6bf177627022bc frame00000247 +34b3d8ccfbe0e6d0b677bf0b6a3db1fd frame00000248 +8281db99927ea67fc1bb2f04eea5079d frame00000249 +cec5b43e779b046b3c4f53245a1d0812 frame00000250 +edf2b82d6002419bea45fdabd3835f42 frame00000251 +c858bf1eb23f211e07e80fade8618b4a frame00000252 +cbbb7293a72d2acd0ebf4dc0680ddcee frame00000253 +9e8bc60005f8bcb860341cbbcd8e9bb8 frame00000254 +9bdf0ca6106badd13a891b79bc1c61d4 frame00000255 +a792af86f42a20063bfb9ac45a7db53c frame00000256 +5100737a05bad1add763b740f7920b3c frame00000257 +d9a081644005801d5a1d5f7ee45e7a07 frame00000258 +a6c76d95009dfbc71596d1b96444680d frame00000259 +8e0b396e878abf091d932a411a09460b frame00000260 +2427f1a4b367823a9df992bacb96b765 frame00000261 +643c22ce5bea7804ada1547dc7d2851a frame00000262 +c43e0d5b1193dda764b4904af9a2a907 frame00000263 +4a8ed3d3d4f9aa14118e49aa8888f81c frame00000264 +e247285688b9e52ce58e69cac5e098c0 frame00000265 +133472edeeb1ec98748e0e191debfadc frame00000266 +9af2a0408e666048ac414388c6b0ac49 frame00000267 +a5dac2bc686daeb58615087fefbb2839 frame00000268 +10164675d52d6ac54a4a8081e3522b33 frame00000269 +5e27f9104fb03ef4cc6eb2edd19bfcc5 frame00000270 +761ac68a04e799999530b4413dffa4d0 frame00000271 +59fed8e14cda1683b8b92e2d3f57d9c5 frame00000272 +0dbbfe6fad81abde1641f4e20fb21788 frame00000273 +6baa18fc83479e18031dcc71e940a041 frame00000274 +691689ba2cabb3d5e9ce98ebfaed114a frame00000275 +333db24402efe84aa3a00a59bcabb83e frame00000276 +9d760ae0f63f72712de9d9f4c87ef149 frame00000277 +68d6263862ac2cd9fb5f13b4f9f98e5c frame00000278 +41c93db244c00785829fe6bc8f1f57d9 frame00000279 +c9a91516df5d6ae49e943ec331a6429b frame00000280 +855f45f2885bb2fb57ba4ba59ffa15c4 frame00000281 +813a3cb3e68a9b4bc4ea37895c4fd34c frame00000282 +46798498a7a0afa6c809954acf4a7f16 frame00000283 +5723b0ad760066aac51efb01dd7fcc45 frame00000284 +a0a382eaddfaadde02df58e7d688823c frame00000285 +24a7c9bfd3588b7b61da361ca4575788 frame00000286 +04b6d1e9b0b3915542668bada17a05ac frame00000287 +aa27ef41135a9d373e36421a7aa235d2 frame00000288 +565420082c2683cec2a8eef711cb1cb6 frame00000289 +986150ca29220eb23083cb66e3cd7813 frame00000290 +6dee0ff8d6ee43610ca1d6902f830dfe frame00000291 +45588efef4419af85af40ec415100ca6 frame00000292 +0385a194ff8541ef62a5bb1502652868 frame00000293 +7689c5d0b0c64d7e2fcbfa6a151c6eb3 frame00000294 +876251af3d07aeddfb5fb4bbb3bda968 frame00000295 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BA3_SVA_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BA3_SVA_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BA3_SVA_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BA3_SVA_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,28 @@ +74d707f4b157aec662612a0fb3cd3f72 frame00000000 +182156239309685ef343b1d4a1e596d5 frame00000001 +0092005a7dfbfb5ede635000fe537c63 frame00000002 +0d84d3af2a1c68fde7a1019595546dfa frame00000003 +313c6342b4b1ad31a1e1caa151e6009c frame00000004 +f15e5b68856ca888292ef5ed4803e181 frame00000005 +04c8e2dfcc3a542ad92850916e6bff6f frame00000006 +e603f5f1beac89dd373d384b2aa74ca6 frame00000007 +7b89ed14aa88cb155f1c1dd5a3baa292 frame00000008 +51a0d28b470e61e1214146ffe5ed8a55 frame00000009 +d916aa42380d08c82dc0f72fedd76d15 frame00000010 +6d074605e141fdbe594b7cbc83a1f123 frame00000011 +cff18c7f73d714bc6c02d7abdb49b4e2 frame00000012 +e42e25ee0bbdc87b4967f1681e2a0bb6 frame00000013 +267c0b7cf86db16c794aadc3fa646f90 frame00000014 +fc526fc345a5bbea7011b0e30395d7e8 frame00000015 +b17da0e1a21d0fb7f0b9464bc23ecd1a frame00000016 +8f20fdc94e60c63f07a644771c509d85 frame00000017 +ab759262d5cad77d1863a57f99a3b5b5 frame00000018 +f9657d572144a9bdb4b04702298144d2 frame00000019 +ef2fdd54781d3e5bc64178158e55c3c7 frame00000020 +84589045637466c35754ce4dcd47d445 frame00000021 +c5d3cb85662770a50c0dd096d1eaa21d frame00000022 +cab165068843b76f9f528fedcebddfb7 frame00000023 +43c802d985b9e44e84de66a598d0624a frame00000024 +0795c028323e25c143346c0e315521a2 frame00000025 +e1b69ad3ca6e4a98b41098d909c4c6b8 frame00000026 +6a3deabe73b6a41ab144ef682c704e6a frame00000027 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BAMQ1_JVC_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BAMQ1_JVC_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BAMQ1_JVC_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BAMQ1_JVC_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,26 @@ +7bfb5fefdb88a288f470cd7d46ab6027 frame00000000 +70e733ac38b308be1e74c30d8e9a9e75 frame00000001 +1b92b4dcde7e2d534f792a268d18cb40 frame00000002 +d8f90b87f8daf0f4ef05e423e078f0c7 frame00000003 +67c64d263e0e7a48c4d58294b03315bf frame00000004 +30ed2e473ddf457dfc62bc42f36936b0 frame00000005 +b1f24138917aa95b0b73b55ebd4791d7 frame00000006 +24dab5f53e17bc72733e78fa53d74365 frame00000007 +818819e23298e5ff60ca2de879e2c3ac frame00000008 +a09a7b100567e980b4b96b642311fbdf frame00000009 +7ecba53002cae972ee95902540e7a840 frame00000010 +10def5b72aa79648d429647d662c9ada frame00000011 +0ab246c425ac3f1f718dac04d5eaf3f2 frame00000012 +f48a8f7eb910cde25cbfed7fedee9746 frame00000013 +1a1893ebd984015ed6269772e56754a7 frame00000014 +3fb8ba526c2c9e91f2cf5da3d6b3881a frame00000015 +6badc82316670108bcca2a4d4dc92f2f frame00000016 +ebc57c25e5c9ea493ea34fa77f14cb87 frame00000017 +bd7d749d325f36091c9589e0df123a43 frame00000018 +d03aa1a4fb8d01439a6909a1f200c482 frame00000019 +22e2f35572f515834a6d86057b76a2b0 frame00000020 +50fec050bb505d297d3256ea5ca10a0a frame00000021 +6b7ed496af53c6ae3f5d056a6d84db5e frame00000022 +04cb057ec07ee9f1707d36b69d78be46 frame00000023 +385c9bf00d250172990ad2184f2d3a62 frame00000024 +f1cf6546d4e75c4310d55136008c9ce4 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BAMQ2_JVC_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BAMQ2_JVC_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BAMQ2_JVC_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BAMQ2_JVC_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,26 @@ +7bfb5fefdb88a288f470cd7d46ab6027 frame00000000 +ec17984209861563691bd38f8cce1aaa frame00000001 +0b4aa5e2dbd1e5b449c1923f15ba8c2b frame00000002 +436d7aafa0d6afee1da34c0ab6f1b6f0 frame00000003 +a312821a7347da9dc756551991937819 frame00000004 +2d159102e9979f4bd189d93eb37f3b5f frame00000005 +f43118605522640c245cff5ad6d15162 frame00000006 +90ddeb1fd866d424df23b02aab06a88d frame00000007 +43a061aed82abd3089a1fa5fdf86ae70 frame00000008 +d011b78e2312ed99018144c4f84f16db frame00000009 +3a2b84e3aaa82027fa71f4c9ff8a4cbb frame00000010 +6b977fee1e0b0132ff6c3c3790241e66 frame00000011 +1536a70ca13b8d3f32f97332fb41d63f frame00000012 +d38b1b4bb1279ea2dcefd0843b7f9891 frame00000013 +20f87b108456329e4b628ac44d531949 frame00000014 +7c106fd5db61dfcd7f17a001104d03fc frame00000015 +94120ee16f8e30970ec93761cbac5cfc frame00000016 +b6f6f9e411d523920b1d4524f48f8c56 frame00000017 +d7882637cb88860cbc204370608c1639 frame00000018 +9623603470e38ef4dd3fde322d6a2c07 frame00000019 +edc08e593c6dd815653437da705963ee frame00000020 +950803094cc3ac853a3ccf330f0f397e frame00000021 +2f5ba1a9a0712220108057a9bb298273 frame00000022 +b7f1644d67204412bdd249c8c3dcb93c frame00000023 +0724a17be9461d7072bd32452dea1f44 frame00000024 +92f95314cc3111a4cd137e2d0a0efe98 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BA_MW_D.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BA_MW_D.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BA_MW_D.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BA_MW_D.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,96 @@ +b2ea86aa3bdc9d18515fa129d29b043f frame00000000 +7517fe70b7d43cf451a0bb32d8409348 frame00000001 +87d51e86c05269ae0e601ef73b1ef505 frame00000002 +b270eb518a82f04008c7480b965133fc frame00000003 +d379a8a677933838e3c2b87107cee486 frame00000004 +50a71d44736edcaddcc3205be4b15002 frame00000005 +803b6253e4ec743abc712bb611da32ab frame00000006 +dfa1b49546cee0af5fdb9a4967843959 frame00000007 +c716a2903fb641ed5d83ea434cb03f25 frame00000008 +05c67af940200f75b48fb310aa6f7f98 frame00000009 +cb4ac8dbcde31f3837b21d86e2750cf1 frame00000010 +521e2b820ba70ec4035096b904c98c9d frame00000011 +3625e7555359ab410672e90f0959ffba frame00000012 +b331ba050cc0e6cf7f0b4d5f52ecb923 frame00000013 +2c790d86a1efd8a5fea4f0598ad511f4 frame00000014 +c221ec84bcbe591b7fd7b73705f62c38 frame00000015 +92191a26b6fa68565e07976fa48f99b4 frame00000016 +2be3397ea16bcd41b43e1b2acc2b2ee9 frame00000017 +15f746cdd33c4906d81de124f0da1793 frame00000018 +8e991072a2260e3f30d75960c96f10c3 frame00000019 +cc0a9f47ff778664f36f87374513c2e3 frame00000020 +bac63c59923ebd176f0bb5105880a8f0 frame00000021 +96f236959f15672807b82a0920e6e0c6 frame00000022 +cc2240a6e9ccf7ffa93fb17b3b21023b frame00000023 +1d58f6dae21ca0734fee66b2c7e3bf0c frame00000024 +969919b8db4bc14ac4e6f4ca33c7187e frame00000025 +78723c1098b21cba38a92d3600dd1503 frame00000026 +06cab20145595f5757c7404518b38d0f frame00000027 +19323263b776ffc408a11871d322b560 frame00000028 +ff3125062ea5cc0069e5b14e71f83768 frame00000029 +da08e6eee4112876b6e989e9efaed0b3 frame00000030 +b7d81916f2a54ea169cbc2d04ed35a01 frame00000031 +938ed5d84c60d7206de61b4fd31c47d6 frame00000032 +29ee2aeaf504a0149a860b831ef8b3be frame00000033 +6b3819fb92f5407454bdc40bf2b617b8 frame00000034 +80e5a5814ad276324d8ee74afb135e51 frame00000035 +f8b2400c4783b5eab37f4d7fd96bb4ad frame00000036 +8d7cd3243fb2da507bce059562884bcb frame00000037 +3dd37e844b4a9534c0ab6f73c332380c frame00000038 +505f39ddaacf46b280608d6a9205e8ae frame00000039 +c7c57ed05a2f536882b95942ce251659 frame00000040 +84fdc5adf9c150fee7ce6a456e5a280b frame00000041 +e5a0ce08ae725f399524d6587bd20f5e frame00000042 +3452d1355eea1841a8548f6c90a685dc frame00000043 +9ce3571a9921dc0b0f14de5258986844 frame00000044 +db66c52b04f0fee760ee65eb3ee42e24 frame00000045 +a7079c68014f0cad0e82ca898f9acd42 frame00000046 +30adfde643f243f94ed622f0c285fa42 frame00000047 +b974898578ea968366e5833f23572237 frame00000048 +be05b6c1fbf5b213ae42ac93cbd4c3e8 frame00000049 +b961340145c72fca45327bf16dbd878b frame00000050 +f038a822dcc563ca679af130c0d86c5f frame00000051 +dfcb71bdfc270d7a2c74519990d4466c frame00000052 +8f67d76a3957d1bd3c9ab4bd48ef6f86 frame00000053 +8d06ffd11bbc806a5b46c82373264a52 frame00000054 +c2907ac914625d83239f56ed92a3518c frame00000055 +5cb8ef66fb4608eaef7cc9e64b5fda32 frame00000056 +21ba385b9d79c636c8fcf6f0a35eff12 frame00000057 +616acacc276c695f5a20001bd525564d frame00000058 +2b7d01b7e689179c3ebd07556b71d7ec frame00000059 +172c6122ea174240160394745667a101 frame00000060 +b69af0cf1d094efce7560c8b001b145a frame00000061 +18d2398210ab6760cb521262bc5ca205 frame00000062 +0dc1e2f5173ca9782a9f67c9227a8084 frame00000063 +ebcd7a5f036d4abdb1996a13d7b5828b frame00000064 +704355721108cfc3c903dfb12f2313f5 frame00000065 +1d475b25b42e9e3e76142ee223d7d692 frame00000066 +2487f8475994d183dca9adeff8b29127 frame00000067 +6d4bf35546a44f55fb3001947766dfdc frame00000068 +4775c2f295017c294145ac83d874cd41 frame00000069 +4b4e5e855451a590f4bd49d479f7dc77 frame00000070 +072c1386f551d341cdb5afe0966ea41a frame00000071 +cb8109b979a2d81661caf120241143d7 frame00000072 +525eecafb48d4a25add2f96ab938e1ee frame00000073 +cf86dc22d180adf4c3bf82f2ed19f8e2 frame00000074 +cf6d0448e55850059b0fff23d8bca729 frame00000075 +4f0b7bb3822930f7aa391ba6d08ed49c frame00000076 +8a6a077fff6d4bcb78ee30bb1cf9600b frame00000077 +facf44182c50d6ebd3348eb339e7c4dd frame00000078 +ea05a5cb530b9301648e8f42e666f75f frame00000079 +3e75195273a686f0b0611cca582094e0 frame00000080 +0243d9c999b5d5fbe78ea451ec4c50c2 frame00000081 +3af0927dd54d7cde9c18b37d93bd9ab6 frame00000082 +2ee0d93241171799db0c429160ccff68 frame00000083 +bf1c84aa5f897c87db8be67bc2939cfc frame00000084 +2bb44336104ef0f6ceee2d1860dc5789 frame00000085 +380e4fd88d4c1ccb5bcbdbedf7ba6d78 frame00000086 +58773309ae295b69d2847bdf169f8d16 frame00000087 +038838807ce2a9e5821ec6b114661d18 frame00000088 +29dc7eb03a7a826317483685734c980b frame00000089 +6d39622a6afc81575b08af39f2e2c5e3 frame00000090 +8a876b970445efbb698d85d5c0caeb01 frame00000091 +948579943d491377828e1b8facadb031 frame00000092 +df43c2b98f3ffe4f0341c0ad943938a0 frame00000093 +845acdcfda14dce01ea7b62957fccddc frame00000094 +ec4dde06b2b261d905ef1cf4dda35505 frame00000095 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BANM_MW_D.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BANM_MW_D.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/BANM_MW_D.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/BANM_MW_D.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,96 @@ +b2ea86aa3bdc9d18515fa129d29b043f frame00000000 +7517fe70b7d43cf451a0bb32d8409348 frame00000001 +e98094dec0050be96464f8eaae821d93 frame00000002 +15b51ac7ed58ab2827050b6fbca5c33a frame00000003 +d253d6da5c903f8957723d4f7b833bfe frame00000004 +40313d72d42d125b44d2774b61594e3b frame00000005 +2babed59d382202d41b3ae8302ceecef frame00000006 +936c57073ca54d9c7ca5905f478f84d1 frame00000007 +5d9c13a8250133c00aa5ce89a15482e7 frame00000008 +b516cecc76d43b9d5ab8bb91e10a03f2 frame00000009 +a154ce05b08b7f1186948deb58a9383e frame00000010 +575f2a5b1ba4b23335b04e5623cf7bd2 frame00000011 +02a1e17a70d16894eb683fd0123a48fd frame00000012 +d450c9f266f1c9878efe6eb1bcb35a33 frame00000013 +77a658325a382305e069cbb11ae49117 frame00000014 +1608451e61d0c2eab40be0d7ef21fc74 frame00000015 +1fd1ff885fc5ada1c28cac5f61cd7197 frame00000016 +0e4d3e1f34e7de3ae94bd35feac0774a frame00000017 +31b01d1e301f9229a3c1caf329fed805 frame00000018 +a12f98fdba7be0a47df7abf5e433ae7b frame00000019 +3f6e3b43ce4732a45258f06e04de68ad frame00000020 +bf3579f9b786a12a47e10984865eec4b frame00000021 +a5106fd259a9210412fa00d6623bb5d5 frame00000022 +b445a9803e23e78ee45b5890b5bc26fb frame00000023 +c7086ea8a1fd9878460eba95d8252a5d frame00000024 +3b604a8c3c739544e3de226775035151 frame00000025 +020065727a5098b2cb3d20c735f34eda frame00000026 +a966713ece9ee9ccfd151c1655118542 frame00000027 +e29bbea1918c3fa51d8417807fa14c66 frame00000028 +cd6a5e8a20d0b5372a731aec5e01243f frame00000029 +da08e6eee4112876b6e989e9efaed0b3 frame00000030 +b7d81916f2a54ea169cbc2d04ed35a01 frame00000031 +ad440d1980fc4f245b1348b730d81785 frame00000032 +77cb1aefade9fafbda201beabcdd67b9 frame00000033 +ed3bce6489e3b5ae8a422b9d2a972d56 frame00000034 +97294d56b3d6d14160cb91033bb98ebf frame00000035 +35b0f05e68d44879adddc382abe6e0a8 frame00000036 +554b38caf2f8ff76bd7e879dbe96fb34 frame00000037 +39323f8789b4ea3aa2f7cc1eab8531b9 frame00000038 +e1151dc0577673b4a2051d4cc4428959 frame00000039 +8a16f070d3d007930c376bf5f5deacd6 frame00000040 +3a82508b682a989587eb0438d035b315 frame00000041 +64d6957dad50130f963f4d6e50357fcf frame00000042 +d943ece3386f872eb5ecec788d51e164 frame00000043 +db3896eca45a51c396197fa65728b414 frame00000044 +0fde86920769d4427c0cb92382506faa frame00000045 +9fd2d1f34a6e8b9a3251da3ad2f2991e frame00000046 +04e424e223795d0f1085b90acf391bb5 frame00000047 +0ab062f2b799cb28d9ff9b1b43ecfda3 frame00000048 +a3c0f8ee64ad2a23b76af47b5b56c38b frame00000049 +2aa6afe59fa1a2bc05dd7d835532d266 frame00000050 +7554f89c54bb656504b5b8922cdf207e frame00000051 +424cf5d4547fb8ba70ac2a5a29572e45 frame00000052 +b1006cd18391c0fc01b841a3d0bb79c8 frame00000053 +7147640368bd61a6acfd963e58275cc1 frame00000054 +4979b4e296c2a232eca40f0ea85b7e03 frame00000055 +5c1f104840b6b0b53a9eca56c517f9e2 frame00000056 +6107e00ce445d0fa70a52d939183f7ce frame00000057 +d19ad09411277684e2ded42733c5b695 frame00000058 +3e32bb86d55378c284d94f905fd57f2e frame00000059 +172c6122ea174240160394745667a101 frame00000060 +a13a4c6d6cbf14bea2b0dd2e108cce63 frame00000061 +747bd86b53257893f3063786a468c1a3 frame00000062 +65227494e087816c1122173a4bde015f frame00000063 +4887e0e5ed0f898ba1aba47efc0e41a0 frame00000064 +3b07a34ccf0c073db6effbac2f2e651c frame00000065 +192f1a0fa24a9c4fb6ecf53427706a72 frame00000066 +3932ea56887e3b3a11c7cb20fdabea11 frame00000067 +f5261f3e29e678486299cc1c874a69db frame00000068 +014477c1b63ac0eda6998e185f11b4a3 frame00000069 +d21830fdee1b2c96660055b8f8758073 frame00000070 +52c7f67762fa5ed39c56386372ebe5c7 frame00000071 +149a47dccfbb3b22286d915ca11e26a5 frame00000072 +02ce7b2665e9b2a4476a0e8fd6c65645 frame00000073 +ad42219b4707624fa7c077969959bf02 frame00000074 +a279bc13148a528f60cce63c138db08c frame00000075 +332c689bf1f319a2117ff081694410da frame00000076 +08f5db8cce28605b14a1abf3f3afb7ee frame00000077 +12c12f56761008970f1cc71aa2d23be1 frame00000078 +a708f778822dbaa7310746c7e8f68926 frame00000079 +c88c032e863aca9cec9af95c83b52015 frame00000080 +a1afb331d4666478a106d4b036145f53 frame00000081 +9687886d57c682610da56ec02192dcad frame00000082 +dd05bcf1de722d62793e74043106f78d frame00000083 +0a5f679a6dcb6cec5a76e75548cb917e frame00000084 +a58af92ca93bee55623bb20b8e9d9c4e frame00000085 +73e19000b5e2f198ccd05ba1cbd5df22 frame00000086 +d3311fcb2be62fdce4e9faf96eea4066 frame00000087 +5e21004eff34f3e98ad81a9d0a1b6091 frame00000088 +2dc99c125cdf56c376fea00ecbcd53b0 frame00000089 +6d39622a6afc81575b08af39f2e2c5e3 frame00000090 +e14f19617423a5edae9005e03afbeb99 frame00000091 +dc0baf58fd0eb9246d21fba0458f3289 frame00000092 +187ca28bb5b641b21eba8a98c186c734 frame00000093 +6863d014a905d3f6a7f8f3fb7462b072 frame00000094 +695abb0adb584c31a5cebbcfc0168e14 frame00000095 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA1_Sony_D.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA1_Sony_D.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA1_Sony_D.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA1_Sony_D.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,46 @@ +b46500b37abd2767385fbf80d1222fa3 frame00000000 +f6a17dfe91a93ca0b02794a8083a1b8c frame00000001 +3f325cd918838dff3ffd356561484e8b frame00000002 +731340720bcd24433f3bbe632ef539b9 frame00000003 +b9b6f585fdbb83882083af6584c3a772 frame00000004 +529e0a65608f5102a8ef0f97f80a7e8b frame00000005 +ca57f9cd3ce03adc49c938447a2006b1 frame00000006 +75d0d4421bba346692f678a9816f1cf3 frame00000007 +5b2251fb59a829ccadd4cbb08f52e174 frame00000008 +002ff953316237c7896e1c2812e297cd frame00000009 +eb7612198135bc2d221e6ca09edd0920 frame00000010 +c0a8afa3299e88aa49885a9776a321d2 frame00000011 +40875bb4d742e8664f3efe54fda5514f frame00000012 +23a46caa9f25e2cc32e82e3ac3378230 frame00000013 +8df70189924b2226bac692e40f01352d frame00000014 +835574cfdb658f1075e14f77a80b10fe frame00000015 +2abc7e3b21692cc985f61c062d8ae4e2 frame00000016 +24c5ee0a70cd676dd3bc93b34f66e2a2 frame00000017 +41b92f8e250772978516020ec28fd46a frame00000018 +7be47880d68339d375a7bae05ef3bd62 frame00000019 +4ce52ece7a4d60ebf48e700eecc2db21 frame00000020 +74a422e4118a3666a722008a5344767c frame00000021 +dc53e5e75d74afab54410888b8ab6ac3 frame00000022 +2595d361d6e20362b2cc0ef7b414fe8f frame00000023 +5eb2a6e5ba19327cff30c3108cbb74b9 frame00000024 +2e40b46c95f45544079a207f3c77679f frame00000025 +df72e37788fc58aa49efb2873582be85 frame00000026 +2c2d124874bd14289c5dbdb5bfd04875 frame00000027 +50420a4f2f06b5271e5e579a839baaf1 frame00000028 +d7c58b5cda30893d18c7bcfe91fc5d3d frame00000029 +4c4817955c8a32a3032e095d4ff91a6f frame00000030 +421c8fcdfe52dc4aa60540338b0835fe frame00000031 +ecd2b245fe142be2bec291949625759b frame00000032 +9464234e2a2cb1bc453c1e24fdeae80f frame00000033 +33a8051aa597b5622472a031682adddc frame00000034 +822e6ad249ffb708a5d89f74a53b9ea6 frame00000035 +bb86332c4a6cf72c3361b44f92f3ff47 frame00000036 +93d7f38c2dc5017fb76d805ecf6e70e9 frame00000037 +2a74e82072d34b3f1d6e1beeb098d971 frame00000038 +058466cdddc021f089284b40ca68f663 frame00000039 +a8d576e414c59c5f2dbec50e5ee1bbb4 frame00000040 +080eba0388044da25c01775ea35480b7 frame00000041 +4daca3df99ca16927f4333247d6e12bb frame00000042 +68b477de728ecb93615ddea25e98a3b9 frame00000043 +d7840f02b685ebd8e97cac250a94089f frame00000044 +b1b993d520e2c4b65da830f274072e2e frame00000045 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA1_SVA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA1_SVA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA1_SVA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA1_SVA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +ad02f985ed0a451fe9a9e0a192f02e4f frame00000000 +680d5fb7eea63ba10424428260c87ced frame00000001 +b5e85433c841a4a28928092dee476935 frame00000002 +5575cd3fedec0007e69048de67c5a47e frame00000003 +bc294e03dd03b3de5c15c94f09d1187c frame00000004 +2e19d4135101901de445036faceae7c7 frame00000005 +42d5a7a3277529dd3fe5455694266fce frame00000006 +ce501ca34c4b254e271bf725c2c4d40a frame00000007 +cf25dbf2f3ffcf85a2242bb1b60a15c7 frame00000008 +8a411af635b4b7a8a59187fd76f709e3 frame00000009 +6671866c0f5c5d80bf8a1e89f5839f36 frame00000010 +82e946f3911309615c245c32aa92a84d frame00000011 +81614930d9b5882aa70fce31271a5b4e frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA2_Sony_E.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA2_Sony_E.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA2_Sony_E.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA2_Sony_E.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,296 @@ +b46500b37abd2767385fbf80d1222fa3 frame00000000 +020e0fcd6ed1399f6b550fc2081bf5a5 frame00000001 +f1238384c43d28f14f74a39a958f0232 frame00000002 +06f959919c0422dee4d040ac1b4253c8 frame00000003 +f134a23b592686dc87b79cfe60fa157c frame00000004 +b6edaab00849fdcd9cdd0509403e056c frame00000005 +a72a9565c34aca190e9cab28415dc2bb frame00000006 +2ca1285ce1c3cb879489bf06597c84f6 frame00000007 +f8167b42e762f53093398f63756bda4d frame00000008 +dafe82286fdd2cf2a37ab6f1d5f47e66 frame00000009 +95740f592ef6b6775806370fc844b204 frame00000010 +6772a1d5ccbba5b9babc9f25e039d6be frame00000011 +cd3ff29615ceaa6d7029a34df2f01819 frame00000012 +df95800bcc29cbd5f0434b41ee256aad frame00000013 +d1de811cebcd9269f0f57356233ee042 frame00000014 +835574cfdb658f1075e14f77a80b10fe frame00000015 +92581ceca756ccf973c5c4517f734481 frame00000016 +d83b2d135fcd8b98e71bc3f8f0596225 frame00000017 +10b91af2dd68742a38b52ea3689b6e24 frame00000018 +c6a4f7b3fe04e1955aa191425e440e88 frame00000019 +09b64af1215438781e1c358cd3b21d99 frame00000020 +a35a70e59dc2a6dbed942d8be4cbb9c2 frame00000021 +4c49a8733b3d7b69a15e77a4e7dd291e frame00000022 +9fa99a01e21eaf63ba4582446bb2b32a frame00000023 +d9a75a86c7fd0f0d89f9d7c3c54287de frame00000024 +5475791bc9b9e82726526887f849ec2e frame00000025 +5f8a4227be1ae1f22d53e73e2bbce861 frame00000026 +74cb0fb2af7dc68d62ba83af734c7df8 frame00000027 +ab1d7c51fbf732c5a539c949dd2a3f4b frame00000028 +6c0923260a3708c3ca6270f99a087fde frame00000029 +4c4817955c8a32a3032e095d4ff91a6f frame00000030 +05be23c0799b30562aa962a96e17b9db frame00000031 +73d63c190d92718fbe305878fb00b000 frame00000032 +c64f39a659f125d8cb894bf08aa190ca frame00000033 +a9124cb26c943de7a09e9672074fe395 frame00000034 +8136460daa3c803cd3ee0f3ffa6bdd14 frame00000035 +6c6ec004e3310dedd5a6a3acea42e394 frame00000036 +a95a2d06a4f23221b4870cd9b9f45a99 frame00000037 +59e2cc8e2f5b4f511b2583875a38e4b0 frame00000038 +07eca59ea123ae770dda5b778229ec36 frame00000039 +9eeee4d5019183cac08c94cc947b8ac6 frame00000040 +711a3bb661ee419b51d196f8ab45f0a1 frame00000041 +b6d9cddc53ea9aada4bd8721859637d9 frame00000042 +776c12eca882ae24cb972f9dd0b1c29a frame00000043 +068c963ab4c18765c3fc3183ea6d94da frame00000044 +b1b993d520e2c4b65da830f274072e2e frame00000045 +92ef07ee9099647990e6554d08d75181 frame00000046 +c9684e1d0a0ac5fe9392e20eabb700a3 frame00000047 +eefa5d42c895c380b5e8a26133217b20 frame00000048 +a4e29750b5cb6f93804caf2603fe3a40 frame00000049 +b0a8545aadaebdb56c789cab66674b96 frame00000050 +9215a91cc0b44b48bd081bf3e0cf127c frame00000051 +a7466197767dc2ca5d06e3044ec76694 frame00000052 +4384281ee400a8ec4f0680ac1888a5b9 frame00000053 +282530eb427a1f2354a0938c9be9c72d frame00000054 +01d1909911b0735550940bd6e4321f62 frame00000055 +81af265c20a04e9e2c01d17fab5a877b frame00000056 +4e39a73dc893efa8df9d9af145b3e3ec frame00000057 +653b20df24726907a8ebf59be8e54a66 frame00000058 +04ab3b61d45f342adffc223120ef205b frame00000059 +070b040113b1ff5c5a73348c79462dc3 frame00000060 +01e357574d934ba408b31f27718126e7 frame00000061 +53c51351ca0a11ae263e99b540d6a374 frame00000062 +ee330eb815e0a6f5bfeb4ddeff2f38eb frame00000063 +082fafd2ef543c641923381a593614e0 frame00000064 +59cc9747ab4328c2142ee4ee73066ca8 frame00000065 +34505961bb3972f5ac3dad69029269b6 frame00000066 +cefb8ca0884103eef44313ec602fa7c9 frame00000067 +7783df5b4b24cb3ab0df07effc951f6e frame00000068 +7cb390bd3042e6c5a09fe775ed8c86e0 frame00000069 +ac5fe059aaac722c3ac0f98fa3b8c924 frame00000070 +0fba23f347a612ee0f5b5222593a4ff6 frame00000071 +99609986bb2f54456a7531c60ea5ec0c frame00000072 +247a3910e3a839eff22e10e0430f11df frame00000073 +c6b35b14435b9c6eb1a6dff2639e7b30 frame00000074 +1a629144c33007e8fa33781f593ee26d frame00000075 +b21b9ee25421bad6e72b54318d62c0cd frame00000076 +862b09f338e4d89838993f2bcf1030af frame00000077 +4a849b9d8b5eeb190d748b87276d7c4d frame00000078 +ae443f91935fd6e7cbe97e378cc13a5e frame00000079 +f9a74000d697ade3ebe468f55b85cc0f frame00000080 +a0b29e9671ee57b8979706ff256f49e5 frame00000081 +ded4bdd6a88b83c96d98e8ad49b7efdf frame00000082 +fee05dc8cfd4f2a52f369887799a0853 frame00000083 +f22d3d2d633397017798f0f7fa480367 frame00000084 +800412cba9c67f274efd189baad19221 frame00000085 +4ad16c8022bed92432f98ce7b9e1bd74 frame00000086 +01ded5fe35a17750e48cbf38afc570e1 frame00000087 +777bef6aab3f633fec6390e20d0e3ab5 frame00000088 +eb822b1fbafb2b795ad7767a4b71d1d5 frame00000089 +a3216a1de9e23abe6f40daadf69a3b8b frame00000090 +55f3ea7bdc39d390c0121281bfcfd2c6 frame00000091 +d3348918f65726cdf920d30cc52ef7c0 frame00000092 +1f978cec9f79945820fa56455c7f72e0 frame00000093 +9587ca161dd48949f5d5438322683035 frame00000094 +2f83c1b2b641b3f3117cd16d494d6c8c frame00000095 +05b7759760b1be2bf75575c8287e14f6 frame00000096 +694399453d7289462da63a84d71983f4 frame00000097 +2415323cfbf502d876ed15ec50d3021a frame00000098 +33cfa57306a84e7ab4448d924a442249 frame00000099 +92f376bdb8eefd2202f53c79c2ead5cd frame00000100 +c7113033739af4cfd1fe36d99576341c frame00000101 +a4d4fbb3556c1ef9c52770fdd2483505 frame00000102 +05c32e256bc8331f2846e75ea5e1f062 frame00000103 +fa8ff04950e6c4e121e342ef13457357 frame00000104 +ab0ae8575fc200fb3950395240c9e973 frame00000105 +40f5b4e0c27fa8733eeb93c19f4f9698 frame00000106 +fbbaf0203f3670923c928b1c8264f697 frame00000107 +21cc5c9eb40c50b753c26ce3aa33839a frame00000108 +fd067aecde195f6046f5e50f2503a19a frame00000109 +2e6216626c18d50612aa6f7a1ba4b889 frame00000110 +1c929d5507d7a976b7a74cbe9f94681b frame00000111 +618bb46e1289aafe0003c512c9fcde65 frame00000112 +c97632769002c6edd2cddae3354af8c2 frame00000113 +e396cc332f23eca5e792195ed9500bb5 frame00000114 +f4f20a5b231b0dc6c8b0fee097994ac3 frame00000115 +e6bd54feba7936feebc00248113584ed frame00000116 +27c5f63a47cb643656371a6400005e9b frame00000117 +32a24829872bfdb69d470ba8373727b2 frame00000118 +ce65b9933a4e1776971af4bfee45b82f frame00000119 +9f24bdb632ec1ab61d0201d7f612af3f frame00000120 +c9cf8cbcae456d6a998347570e36e384 frame00000121 +ee2fa3083e23ec9f513b814698c8f931 frame00000122 +d77fb26061c9d122bc2a063262b81131 frame00000123 +5ee804bc1b409eb55adc288f192d0813 frame00000124 +cd0188c123f7ea1423b8fe8a9cb4e596 frame00000125 +8451053cfb4814ef581b9f2a311792a9 frame00000126 +59df9cc187a927fdeb0e21bd2a03a0fe frame00000127 +61c70eae27169a923ee3266f80780dde frame00000128 +80a78c75abb7c00435ae5eec749fb593 frame00000129 +e5c6cf53de157a9d906213ad7da16b28 frame00000130 +92f4022aa7566a7eb820751a12fc5f92 frame00000131 +d0db107f335064d5b5101e56fe278a74 frame00000132 +83b31f385279551ff02e4ec7ff70e805 frame00000133 +dde1c175a51e44f059480abaa35beeb8 frame00000134 +cb527ad5e1dd563c4b13a58601a1e469 frame00000135 +2ef7aaf7d348deb4dc5d583c0f211d8b frame00000136 +40775d7d16dc1b3ae382a2989628daad frame00000137 +2562211c14fe09096af94405fc276994 frame00000138 +11237c1ca8d4e5922743cf059d399745 frame00000139 +8e70273603901e25669576a732a4697c frame00000140 +bfd872d90625c7f5336eed6756589b5f frame00000141 +fbac0d8b5af6e346d33e80adcbb48fec frame00000142 +e268c3a41cb791b579b91d050064457f frame00000143 +6989576383a21c190e1b40c18207cccb frame00000144 +9fad3a865488e42fecdcfe9081ab14ef frame00000145 +90300d06ff74e2e95e06f428bf7e2137 frame00000146 +d6e821b7255213c1b48a4a3eb68e2de1 frame00000147 +811be559b8c6994f5c9c182087d0ead1 frame00000148 +7e2694020bc1ae7079c400f8d9634988 frame00000149 +a9b19a9962f201325d48bf9a2f3ee55c frame00000150 +05e2f249f44ccabc2868d8d00632116d frame00000151 +44ba8b33584e44771fb945ad87abb654 frame00000152 +738d6312825007ffc70c2393a95742a6 frame00000153 +803a92b5a3aac6171b40ab4a116952b0 frame00000154 +aae8cf918d84ead079695f5f0d07f0bd frame00000155 +5fa4129b93b9d4ec77e2d6030f92117d frame00000156 +c0d4eea606278a3a306f5a6905cd1ffb frame00000157 +e615035677d1b8843c96a0ddbc177fd2 frame00000158 +6a228cc1d99c73fbbfaeb320203b9e66 frame00000159 +756dcaa24eb2cddbaa159f0ef14e44e2 frame00000160 +6bc9a8f7ed5422a6611560186f21a03e frame00000161 +41c9497c94d7cf6282730327ec0c6ea8 frame00000162 +004e10b61d95e013f35c2a9e94da290d frame00000163 +fd2cbc98e4765872559f345c48ac2f8c frame00000164 +6cb73b6cea2f43109e54a30c91c9a6f0 frame00000165 +9fdc01b27b6e45256d0eb82a88f65414 frame00000166 +25660afc410b7c092d194348ba6e9a25 frame00000167 +80654305e1fd4e7f1ca2d2b43ffb97d7 frame00000168 +f97e14bead41ddd24f82dd900852be3c frame00000169 +d7173b9852915f544f3e666d53fab3d6 frame00000170 +f5651d228cc28be0d3f3eca58c0bd69d frame00000171 +dc3b9e4c97ea4415fd1d7f77ecaf1ae3 frame00000172 +b88f21233619f0b222be30e839093cc6 frame00000173 +98e7b051f35f9d75e5099b0ca79c0c0c frame00000174 +dbdeefa778a5a5ae8e71ee62146178f6 frame00000175 +1645c4afb0d5c3e491c7be3f659294a0 frame00000176 +94e05931e7ef4b9a395876c64f76ea86 frame00000177 +77516692c7bae7996d4fa1d50bafde73 frame00000178 +0d4c718c444fafd10bbcaa50b5bc4860 frame00000179 +2689bccacb8ca5bf986fc4edf341f583 frame00000180 +a2f1776507fad6b93f5b391ec4bb8ee9 frame00000181 +aa9f5300a216edb88241552d86f9f741 frame00000182 +91d53bac713a2aa142a4f9fbbc98384c frame00000183 +009be2a438a3d7b0c9c916edc69e2693 frame00000184 +bc2afbc5e584c22fed28beef4373eda0 frame00000185 +d0502d4907015cd8c34e16c0ef8103e3 frame00000186 +c80d4ef43152591f6e8284892e23f77e frame00000187 +b5f1cbf63a20e482871c8f0a1c2bbcdb frame00000188 +a7d4d07e24b019861eed5cf40970e6ab frame00000189 +0d43ccac68f17c0342972f66b88ef7c8 frame00000190 +605ef6eb4bd303bd31561547a7496ea7 frame00000191 +3197f097e23b50b127946ea3553b93f7 frame00000192 +c85672a5b835f2e86faa104a3289e17d frame00000193 +6ab69e032c7557d263e784667928bedd frame00000194 +2e530df8065e141d35a9b65f448ec854 frame00000195 +f578cf86764b2111a915a6c426ff5559 frame00000196 +6bc2d66f41c53d4af611c1b488327edc frame00000197 +179f134da3fc6ce167990a291ebc2d79 frame00000198 +deb3c5c39a32e774a58cc7382436e212 frame00000199 +c69977678f2cfd4ad7a93a7cc980bdbc frame00000200 +31a3cb9b03592a1dd92629e64089f8d3 frame00000201 +18f25eb27f2c2a96fac06a3bda98731c frame00000202 +24e9cc830116ebbd9bb20768d7519557 frame00000203 +133453106498171e381f23689893a6e1 frame00000204 +397947c7bb4c8c285e3e15f487a7f3d7 frame00000205 +7be6a7a8d2f02c1ada8aaa583ae8c0a1 frame00000206 +942742e246b6a423ab659202022225a2 frame00000207 +60fa92576ab4e5308393731e94176b23 frame00000208 +475b5620598bcd6fbacbeef58a844e5c frame00000209 +3f206ea841cedea6d7e88ed3d9dd5922 frame00000210 +d9799a9dc4547b8d21fc3ad759959eb0 frame00000211 +2e770cbb739df99c347bd2eb4a82ced2 frame00000212 +271f1c39cfe3bd81ac1c6d6d0e12dc7e frame00000213 +63e32f96e821f197b696b0fe038955e0 frame00000214 +b35ae43f1f5a74a57447ee1e478cb38d frame00000215 +323202ba90ab99318bca5cb4409d2a45 frame00000216 +640905533252594ac640bf28df30aedd frame00000217 +4367658ff0760833581db34859c5b2ef frame00000218 +642a4470553bf7de2277798ce8a9cadd frame00000219 +e20cab2b9819aad3962d832dd88850d9 frame00000220 +5f07a6bc59176bb86d753b6e1eaab6b6 frame00000221 +fac56f0ea4ac0fe2e11c89a42ecb3996 frame00000222 +1a65a8e73184f4128ef6632f9b0abb3a frame00000223 +05cd8e0be90572b57c73115871c50db9 frame00000224 +b297938b98980bc9fb12c285ad8a7e5a frame00000225 +485fa8802d1b4acbeeb3339655949c22 frame00000226 +2965dee6400797be00ca5b83ad0398ff frame00000227 +00fbfec67821861bf2c55336fdb19158 frame00000228 +821d83ae256cb28218f9b55b062bf707 frame00000229 +64fa4572c20f1cdbf3e75d974ff46649 frame00000230 +947e1ffe77416db4669db3dacd74e86e frame00000231 +aecb27be82e9d6eee60a78a0e8049f33 frame00000232 +27b3c9d3e6ef460c98a25e0f4acf3e51 frame00000233 +8f60c9451905510faea660fc422633d4 frame00000234 +65c4358b8179ffc15dd8a995499d178c frame00000235 +a6e46e7b8f0d5faf555ec9968f4c93cc frame00000236 +24ae8f0a3f2f9f4e4b4f9664314a599a frame00000237 +aaf06376c44974ac0b94de84e957395c frame00000238 +ce8433c5028181bc2d07c91475b43771 frame00000239 +86086df6b0fce877ffa57a1494d03483 frame00000240 +bb865efc25c6ea1611cb34f4bf154b35 frame00000241 +fbe904b70b587f919a72e309593ec434 frame00000242 +dea3cb204de77c73b76bb9ff1169c8d7 frame00000243 +f7184a347550bb3c8a8b8a07488b5ffe frame00000244 +72d4b6afda804d5dfffe99583286f5aa frame00000245 +3e1bd0fbf67eb5eea0bbd262137a9a52 frame00000246 +7cb8b1828eb798ddb40c819951b46f79 frame00000247 +d49646619e1c1be4698e9a616381f420 frame00000248 +4f4b116d56661fec875974188c8a90bc frame00000249 +b2848dc6720fdc8b8a814723013d8d43 frame00000250 +5ec68a473365312a42aa5de11438ce87 frame00000251 +addb25e6f10ce70ef831fb139fb416cb frame00000252 +960aa4f4f08ea971c54b340c4951f6c7 frame00000253 +486c4d7b064b7d0592a82d0ffa7818f6 frame00000254 +a69db4fe2eb379276ed57de1ae7e3c8a frame00000255 +ec94a01a728cfbea2ffddfcd3938dedf frame00000256 +c6d05e1e140054b7b52da7c5a453a8fa frame00000257 +2deec3781e74993886a4e4689f098198 frame00000258 +7be1809cdad896b55ff7d44a43ecb96f frame00000259 +1031de0ca199a6bf0a6102834aacbf9f frame00000260 +d54edaaf0428adec7d49ce73486511db frame00000261 +a27d2a9995bbc786261559c9bb19ecb8 frame00000262 +abf8c2fa10f3f3f55b8e4689c25c2382 frame00000263 +b21ff267818af971c9b11b43dc32d012 frame00000264 +89f3a5b6357923a05dd7008e7fdd6d16 frame00000265 +5a4796ee9ff6bfc51b908a8290b31fe2 frame00000266 +0755ea856e3616c9d6c3b1edcb7313b2 frame00000267 +26ce9fa08ad52f106977fc4d724bfe89 frame00000268 +b3b8fcb66eedec8ed2e8113604c4766c frame00000269 +3a15846070c757c4d1621c03a4a48239 frame00000270 +de77a6fdfbefba7681fe3c185abde734 frame00000271 +711febbfd64195056c93383774142a8c frame00000272 +4007827330dd831f61a4842710d978ee frame00000273 +5c0c9b6ef6a4351fbf99b96ae36026ee frame00000274 +3a5069dbdba965e64d48d914a3bebdbe frame00000275 +d8c2daca9beb8c60ef28e70ec0ca3b97 frame00000276 +19e6cc0a1f121c44bdea1fad24c26b3c frame00000277 +37f83eb054c84223977cd18f336ea7c4 frame00000278 +a87ae5c4f2d58b4686dc81fe0b4af631 frame00000279 +e3e8fc7ac664e0d4bf035f969ad7c00a frame00000280 +e1270b8a822fc15944073c014110dc53 frame00000281 +c529c4a16ab227df26462f9c742bf3bb frame00000282 +7ce093a4fab0cfe188b42ac2da70aab6 frame00000283 +5abd09e091f9b3541b75f7d06812fbd6 frame00000284 +fcd260225a0ad28c6fecb5332e6b7f40 frame00000285 +193c25a052a0814095c0502da1f7ec00 frame00000286 +65f73ff4d951693e96386d56d0082499 frame00000287 +2dd04db3eb00f125e0a384acb3e9def4 frame00000288 +60980edb11d50d5f7e5a4008d119aad3 frame00000289 +45ddbb31373264853cc8a26eba822efa frame00000290 +52699863bcdef493fede71c95d13749b frame00000291 +d91c1b9d7563184b9df0db0b1e9c332a frame00000292 +8203df107e78d99ae81a121640e1a063 frame00000293 +eb5468425a71cc3fd68cb8a7dcb2e130 frame00000294 +39d5b33db9886383507396303260cb78 frame00000295 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA2_SVA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA2_SVA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA2_SVA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA2_SVA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +ad02f985ed0a451fe9a9e0a192f02e4f frame00000000 +b893f323b37f1b4f091e4515a7b2fad0 frame00000001 +d2bdf37045c03ca09c184d8960e4c970 frame00000002 +8d032e049e27e362887ea5e47e126d40 frame00000003 +12cae55e2d2c57d2fe5b03d9ed2dda8f frame00000004 +b1714bb9956b9a7bbdd5a786d207743e frame00000005 +c97c923b69bc48fdc55cf880ebbd6cec frame00000006 +4cd4e256d322af40539d4c8e57e6326c frame00000007 +6ad9400217e520bd00fb4f19ced62f08 frame00000008 +cf966edf67df42ac4e6a72641b98eda1 frame00000009 +6671866c0f5c5d80bf8a1e89f5839f36 frame00000010 +d4593f69918095750b9b1ca471ff8319 frame00000011 +4a8dbac5e19400e9da61903ef25ae8eb frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA3_Sony_C.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA3_Sony_C.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA3_Sony_C.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA3_Sony_C.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,293 @@ +b46500b37abd2767385fbf80d1222fa3 frame00000000 +dc63f990c5610f5c1ada5eed2b15d583 frame00000001 +48008e2b2368d6114245a4b9aa820fd2 frame00000002 +411f1578f6a93dbccb7f928f9a4b5dca frame00000003 +31930ce82ca20690ea49db074399b59c frame00000004 +1a7ddafa47b2d3eef6da3dea8ec14d0e frame00000005 +d8a26aa849198953caa36a60986abd4d frame00000006 +561aef45f1efa8b1177ee468c5074642 frame00000007 +47fed6b6c741d6f7576d4398e98a4cdb frame00000008 +7016b8f81a24a4740c84951f619ac2a6 frame00000009 +41b47c5652bf331a50f840a600be8dce frame00000010 +94be6ed6fa0bd9c807f6cc816d083d11 frame00000011 +f25d49a55ab18df9bb7eced5bd6aded9 frame00000012 +835574cfdb658f1075e14f77a80b10fe frame00000013 +60d387707e0dc72fc2c0f4a41ffcab2a frame00000014 +dfe31331bcce72369eaa81794e087bff frame00000015 +ce789a72fb35d0e12f90bd85388affe1 frame00000016 +27c7fe35785323db0b548403783ffce5 frame00000017 +662c7be218ee821e5d8939abdba5934a frame00000018 +4467449992ce1f790614579f53cfc55f frame00000019 +b0831b3e8b59c20e3da40a58ce5bae7f frame00000020 +f92cfe5b57493a15fd40b970b92d7728 frame00000021 +bf221c26b7f9d749f2b61ca6a1d37952 frame00000022 +9bceea431327737f53b8e1817d0d53c4 frame00000023 +45fd7b9fa559594a39f59114e371174e frame00000024 +6c76840d994212e53ad55f9f626f6d60 frame00000025 +f8fb23dd057f43e6e550874e9b23a36a frame00000026 +fbf0ba6cd69f9539cbf322fd2baf4260 frame00000027 +4c4817955c8a32a3032e095d4ff91a6f frame00000028 +0897323177875bf3201773ca9540feea frame00000029 +a317cf91df517687b4f776fd63829233 frame00000030 +ae391358c4b9b8ee1a1782fc2a8defae frame00000031 +76c3050457c61751463a44a012549580 frame00000032 +80ffd514a43fc0f38b443d81e203c47b frame00000033 +24745a89cf14b60269383b841d9df317 frame00000034 +5b63b820a3a0f7ccbc57a935aaff5dc1 frame00000035 +b1aebe543cf7dda530dbbc3e5b393dbc frame00000036 +56920ec576d1c9f7b3ebcef6273ffc27 frame00000037 +3b99bd1dc66b5638a77adda241cc495d frame00000038 +abf19ff498847009e8714aa288cbc45c frame00000039 +7c40163f15b577c1477f28323d3e9a0e frame00000040 +5259c5a16e3bcf5f4504c3be6aaa69a1 frame00000041 +62c7857dea1dec3825cbd124ee322936 frame00000042 +b1b993d520e2c4b65da830f274072e2e frame00000043 +e74670b1054435d7b111f4b5ac98979e frame00000044 +40ece43a041e1f904805836b6ef8c483 frame00000045 +2ab1d7c5c7e9b567f5d1a8ba9c77ea51 frame00000046 +138c989ec4455f9cdb5d82fb5ebbdb0f frame00000047 +4aa2be9df0488e30ca920097b1bd6b99 frame00000048 +fa9625b7b9d859895567c4fb8efc74ec frame00000049 +5d0395978bd23d590878595591a647e3 frame00000050 +c65fab3b97868b4c29000765f0fb0edc frame00000051 +75afcd65d4b724208e7484b5ddf0167d frame00000052 +d3d136212b4d1c14f91fbde2d06a24dd frame00000053 +3d341093c0b2a50f1297e6c1747bdfcf frame00000054 +6ae637fba21e77f426d60c7fa018da3e frame00000055 +a9221ec1b21998574a7e3a9340abdb20 frame00000056 +52ade581957a3aa390966e9c297ea4b7 frame00000057 +070b040113b1ff5c5a73348c79462dc3 frame00000058 +b24223781a1a5501c4da72c5632b85dd frame00000059 +9871e5420e90f16a8c64216618ca3a54 frame00000060 +a1f0653680acecfe9b03acd3ca36b594 frame00000061 +e9050b63405261060c7ea254d67a0a2a frame00000062 +b06cc7659f1d32a8144f3f5e12220cf1 frame00000063 +d813b53fec88d3e195236ae5e41d534b frame00000064 +c3e94aef4c1e537ca6c16eb32a2eccf9 frame00000065 +0fe0bfed4d50d814b8ed262ac6b62f61 frame00000066 +ac1ed0b921bcac81b3567a8326d12e1d frame00000067 +3b925b43ae0f9cafef3c2aff5e85a3d7 frame00000068 +e5dcb80b474fdf8af36bb0fff28c4c31 frame00000069 +2c36196a507a6f324a268e69d038e9a5 frame00000070 +00e12c252c98a1396d88b6bbd66f8795 frame00000071 +a540ef77b5b23c56c8428c759b8fe66c frame00000072 +1a629144c33007e8fa33781f593ee26d frame00000073 +64ade47ec3f261212911f825c9e57f79 frame00000074 +5c73736cd0d67ba026ba7248504cde2c frame00000075 +d74aa6921a04ecd1343612448b577aa3 frame00000076 +66334934c493db6ee7def6124c78f27e frame00000077 +cea7c7139c9e2d461ef7f7accada7386 frame00000078 +110ce7d9043765ad060b4fbb13ca264d frame00000079 +b22bbe95e244d4558a86d4eda786bbda frame00000080 +dfa3571e9c2cecbf0168bf24e1880663 frame00000081 +1ec159644d59e263839862c05587fbee frame00000082 +caf494d570114734cd6c8180b97e6f5b frame00000083 +5cb93866f5580cd16d027c75740e5a6b frame00000084 +e306c3f56552646f957d16489eae718b frame00000085 +8dbdae08a5f56acd631a13388534c77f frame00000086 +67477b2cca43bc7a9cde4b2512c83dc8 frame00000087 +a3216a1de9e23abe6f40daadf69a3b8b frame00000088 +4accebf20dd93c57c0880eacf661fb92 frame00000089 +c04cf4592ff4708056a004bc0b0a5e40 frame00000090 +ae0f58c87dbfccbec551b2104a6090e4 frame00000091 +f8f8f7acbab8e897e9e099ee10e291b3 frame00000092 +4d8eb30992b4106477e27b33dee42f72 frame00000093 +96c67fd955092b8eb86e2ebddff6d072 frame00000094 +4b32b9b39270b4824d09427dc8292bc6 frame00000095 +8cff785053e2328aeabef51de2822796 frame00000096 +b389aa7005086582863d5ede41fe85ba frame00000097 +ff7a83b4b11d9eb38613e2c0057f4595 frame00000098 +6bf712a09500e09787f46e800e9b1d56 frame00000099 +86afb93f3f64ad1be03b708720cc3940 frame00000100 +45bc8c0319e2606479985244a4d38a88 frame00000101 +83e96adcfbe6017256fefbd7f4d6e2f9 frame00000102 +ab0ae8575fc200fb3950395240c9e973 frame00000103 +3a53cad12caba11c098c7765b464842a frame00000104 +fa43012a688cf63a7cabd83bef36758e frame00000105 +7478be1040a9931a628ab75b862b97ad frame00000106 +ef24eea21d2837e47619ed8f52c2595a frame00000107 +ea1a60cff7b6ba3927deba618d77cbe6 frame00000108 +ca0b8b6ec30fd222e90b9de43d31561c frame00000109 +6dc7fddf016ce4d11387e4a577ac83fa frame00000110 +f739f8a783cc77f233f5c66d1a8d82a7 frame00000111 +1b8f5ac15cd7a9eae27062d8fc2f9b5a frame00000112 +1cd8d048e9d6a57c711e19127124d5b3 frame00000113 +ec3d6fd9f59aa12ecb49bd2adc639887 frame00000114 +7cd0ca8f62beecd9e9307dc2faf2288a frame00000115 +bfb92c7f21adcf263cc1dcab86a3fcb4 frame00000116 +d037e10d87f0e1da9c17fab5e2e0478f frame00000117 +9f24bdb632ec1ab61d0201d7f612af3f frame00000118 +5d19f855dd813a346a7c7c6bda2e06fe frame00000119 +22500a2d190e102f3d997a837f8d7599 frame00000120 +01cd983bb72699145b3f9d3e844270b3 frame00000121 +96ad709f99997fceefca1939c2f351a7 frame00000122 +0a8ffea74b43a09b27e86fb3bea10440 frame00000123 +8d576e78f5db9465c542e2b4d805b33c frame00000124 +fe1854e0e247a28d5a65c244182de354 frame00000125 +1c62957bc7b391e04d8e86d59dcf18cd frame00000126 +6924dbff56c316cdf678f02d341c03d5 frame00000127 +23025c04242b378a3518a5bff5082db2 frame00000128 +2cd11b74eac205c4dc38f435e8fda361 frame00000129 +2bb6da4aee7ad53c6453cdccc70ef82d frame00000130 +e79f73c97c2ad9c2f3a4b278df89ede0 frame00000131 +83ba0d95fe23f3df48f1fb6bb6e8004a frame00000132 +cb527ad5e1dd563c4b13a58601a1e469 frame00000133 +0ad845231b081d4ed06e068ff2512fa3 frame00000134 +44a028c0a0ea80353a27910b98a65151 frame00000135 +19cea94811c1b9db15dc0db1bb4508c5 frame00000136 +0aaa1cb30124d869e1cced557331d365 frame00000137 +fb1b651c7f937fdd4f241643ee9d7828 frame00000138 +1f1f20f264881a76556e9cf53fdd5b2a frame00000139 +6c8a45cd48b5f352cb88e74343d44e37 frame00000140 +13c9f468860340896a7699f87836711e frame00000141 +eeca83aa38bfd8a2cfe4c3dd8120b20e frame00000142 +e374dc18583b586c94fa5f7acd390ddc frame00000143 +dba0d18a1d71de5c05032c0b301e23e5 frame00000144 +6e0f27156bbed3d163254a3ae0bbcaa4 frame00000145 +b37e0c717661c978d84a246e77a6d16c frame00000146 +093819b0f6393312e5dea6b4ee8f1def frame00000147 +a9b19a9962f201325d48bf9a2f3ee55c frame00000148 +6a7b2ae822879603ed3f58aea333404a frame00000149 +0bbc52bbc1e0731bbfec97676e780203 frame00000150 +6541ebba4eb9d755baa0d70ebab4b22d frame00000151 +4ed877854954c1443f25d370ec266206 frame00000152 +4a30dfd3497a31ea627d615115203744 frame00000153 +2aaaffaf742033b6bb1ca8a907e49c5d frame00000154 +1956a7c43ee3ccb00b1d32b14f61e735 frame00000155 +1440da8ca5fcc8cde93784b1d26c84b4 frame00000156 +aeaeb246dd8798d31aaae5ae387041aa frame00000157 +6aff67cbe636b875b003ea7c2db13f8b frame00000158 +5295425dd17a6fdc3f62d496335a24ea frame00000159 +eac6e500752053c473365a7c48d933cc frame00000160 +b538bb922208643f5feff599d850ae15 frame00000161 +36c992f8469c197fcf9e0b9ebdad4e1e frame00000162 +6cb73b6cea2f43109e54a30c91c9a6f0 frame00000163 +f62e9a9f7f33fecb043722849a47c815 frame00000164 +91347f85f5ee8ce0b4974932b4d49596 frame00000165 +6a1cf6d63b57ee884763191d5fdad040 frame00000166 +a3370a847d9ffcfdbd5c4c7210143f52 frame00000167 +77c32b6c13cd9f62d5a5555ea501669e frame00000168 +635d555ddb7dd126e19085a9ed37d3bb frame00000169 +86fd037176e567661989e2178b3c33c5 frame00000170 +4526225ad626de639c631b35be506042 frame00000171 +3c012d5fc27236d2c290716d52e8660e frame00000172 +16394343b4f7490750dea692bd507170 frame00000173 +43115d3279b38acedbf71e9e3af370a4 frame00000174 +1d64326e4cebe83cd2a4c9e6b8989a91 frame00000175 +79dc5170aafb5faad4b6f4f64cb63979 frame00000176 +406c507a4726201f51fbd466db40cfae frame00000177 +2689bccacb8ca5bf986fc4edf341f583 frame00000178 +548e14b4f9187d8138dd06a6d312fe4e frame00000179 +e2a9025e181e660aa19edaa30f6e10e8 frame00000180 +09d02f5440f8587890b7c550f9661d65 frame00000181 +77a5c388f8bd6b6974c168008971be96 frame00000182 +ddc080553451103759938912628bf80a frame00000183 +f9d7e3afdc34e9bcd20f72b37377d9f1 frame00000184 +d21ebc3cbf383d997b0a1ccfa7cb9192 frame00000185 +ed672ef639b05f07f23178832419699c frame00000186 +0bcc2d0b55959a19da0e063397ce3408 frame00000187 +77cab60949378039da02ad0573d59d41 frame00000188 +ed80449d972ea314c8d1c36fa2213433 frame00000189 +e9ef57fa3e67d91499634d1e7275a93d frame00000190 +5b9f6526bce2b0cae0548d084ef43bb5 frame00000191 +e04e60016031ba949294dd731ae8375c frame00000192 +2e530df8065e141d35a9b65f448ec854 frame00000193 +c5fe088dc017679fd865adce75515ef3 frame00000194 +208b71813b9a240bc57946279da417a8 frame00000195 +0c752e63cb5a71ced8aefe2ac710fc6b frame00000196 +0f05d01037f7f83b7087b33d64b4e6ae frame00000197 +540d9cffa30ce5893d2079ce487db853 frame00000198 +0c4f35c8b4f4677d8a6e9f0060387815 frame00000199 +296efb1314e956da56bdeafa3b51eea4 frame00000200 +be0561c65c3686f5a77ca1cd0e347581 frame00000201 +1b3399cfe5056cea43a9df69093128a7 frame00000202 +e00617fab7c5dee5c9de7bb243fed3ea frame00000203 +3cb9c0794fb41d4fcb6089b491de6c8f frame00000204 +6dbd00215f24521e5edb4b80575c0cf7 frame00000205 +bef8bea2a30862d28d241092378c7b42 frame00000206 +665a10bf340b7ff116f7123560d7e82f frame00000207 +3f206ea841cedea6d7e88ed3d9dd5922 frame00000208 +c35cf42734482a3cf9a4e7bdbc717b39 frame00000209 +bfd7c5b86c8705449a9445ab1f484b9c frame00000210 +ca281079c819e0446fdcf3fd93d07625 frame00000211 +82db70d6978503d2feef202b374a1492 frame00000212 +6c086ffb67abe24c48629af51663696c frame00000213 +eba497af41f5d04500d532263090049e frame00000214 +12680fa775ca92ccdbed5e72b3492cb8 frame00000215 +d84f65b116e707c7c4143affa8f3043f frame00000216 +edd1b4e29b10c732fa19ec0e565c1421 frame00000217 +acff49c7cda6dafecae205c299525d7a frame00000218 +4dfc80ba519aad25f87b7290bf2e60b4 frame00000219 +23bf43e79c54b586b16aa2b85faa3e32 frame00000220 +b89b3ae625e738080c7d26fba07c7e8f frame00000221 +549d4897ccdda0550be763e2d773eadb frame00000222 +b297938b98980bc9fb12c285ad8a7e5a frame00000223 +956d4b172f4c8571c209ee2c111317f3 frame00000224 +b62c13a38018ed31c3ddc0ecdf362524 frame00000225 +682c9178aa00ef9826ea60f1f3598c35 frame00000226 +4d4fd8dc30439a57e995201cf47ced46 frame00000227 +5e5b01ed8586669dcbbcf03895928283 frame00000228 +b9d0dc9e6dec20240805af5332fe9d15 frame00000229 +4b8fe84cea8977e52c36aa3ba3a07edc frame00000230 +8f56229ad1137fd3f2d680d922d8132f frame00000231 +83a4abb585209f68b66aeeda4dd00a5d frame00000232 +002e392cd146634ff60188685c9a719f frame00000233 +b156f7f3122f8eb4e50aa73b03d2144e frame00000234 +8315758b670a8ed1535b0e4b3c115460 frame00000235 +e4acdc2ab626717418d302426a2e715f frame00000236 +6803a8573209c1d3a6024f7b3aa0a68a frame00000237 +86086df6b0fce877ffa57a1494d03483 frame00000238 +7e5d5ed900179a28d63f3247865c5d04 frame00000239 +d4dfd227dc8257442502a11c8746c795 frame00000240 +ac6f56fb7a115d604428c320697b3ff7 frame00000241 +4b28201412c0c2a5e7678ec640978c34 frame00000242 +07f37d228d8bcafb33357c8d4202cd32 frame00000243 +b82a9bdfbb9802f2a8cef8f8f255d2b4 frame00000244 +cf65facb0cdf476464d94ece15540029 frame00000245 +20c1e2babd1e4a3409771aa2f4e013dd frame00000246 +94cf8dd51a8de2bed92cc58ab21b0f97 frame00000247 +9979e343f0be50799cdc98c27d38c8e5 frame00000248 +7151af414312b12048627d0537c2d2ec frame00000249 +b4e479c435e7699c3522433e2818e667 frame00000250 +cfaec50efbf41ec345e4fda7b40ab65c frame00000251 +f54cd861b359b30ed9df6b9d8bf89984 frame00000252 +a69db4fe2eb379276ed57de1ae7e3c8a frame00000253 +87df8b1414a22af5d4ce7974552905b1 frame00000254 +91366a76a1f1624ae38a1f398afdfa12 frame00000255 +bfbf66c732a19dc0e57b701c9bfd0ac1 frame00000256 +e8029699d63cf0eb2cb96f2dd1e7f0f8 frame00000257 +6974e9875efe940e0bbfc0be313aaeb7 frame00000258 +c269ef80d6c480ca8b5f3a21482e49f2 frame00000259 +e0d1fce89c8fa66d7459cdc643b0cb53 frame00000260 +ac4d149aa97bf598335150431cb426e8 frame00000261 +32d23e0376e5ea9e5c687d7a9c7db935 frame00000262 +5686bc6f04e9decedd842cd79b657447 frame00000263 +5d5b991b36011b12596b85bcd9f43402 frame00000264 +8a2795cd1585c967c3e31a8c3ee40f20 frame00000265 +48a82054a5020bbb3e65975b7d142fbd frame00000266 +3755abc4cf6fffffd2d252002f204b97 frame00000267 +3a15846070c757c4d1621c03a4a48239 frame00000268 +5f980e088cbdaca9af801c77975795ea frame00000269 +d65f9fbc317b682bd49b6b460f755b5c frame00000270 +1be7f7797328d79ffe184ac38a4f7c9c frame00000271 +1702f500e2dba4068e34f0f85425ed6c frame00000272 +6eb55e244246778656c965a5c69ed8b8 frame00000273 +c383a53277f17106f1efd0ee3bd58075 frame00000274 +84ec657a04bfc65e3dbf6dbab07fcf18 frame00000275 +11d6e81e5e3cdba1fe962963218d7b02 frame00000276 +faddb326e1b8608feafb8aa238ef73ec frame00000277 +0d2d6c1a0fe01ec5ac4d1ad2d6b31606 frame00000278 +6b9e40501e4e4516d9a2d59fa657dbbc frame00000279 +fbc36c6bc27f9c0694224b88b4dc2e90 frame00000280 +05845228a66d49ec99c44892b6668ecb frame00000281 +5d5ade05fccc0d74dfc1ee3db581a575 frame00000282 +fcd260225a0ad28c6fecb5332e6b7f40 frame00000283 +f06b0c02db50d890243d9769f2f10bed frame00000284 +93230b8d8f54e4a5bd51d41596e0a316 frame00000285 +9e45c251ac4b49f9417c31d687f21efc frame00000286 +1bb4ac18055070cf21a42daadd23adf9 frame00000287 +d8f392e6824e32176f1dc2ffdcc9d916 frame00000288 +82bc76c6bc3bc0b547a8c4e42821ecae frame00000289 +ecd4d5d106318770ed56d1db68b003c8 frame00000290 +a9b728f27218e379da8f5a203d45c229 frame00000291 +1e0aeb23a8902a4e33fc5ac15b4d4bc2 frame00000292 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA3_SVA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA3_SVA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA3_SVA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA3_SVA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,28 @@ +c5c5fcdd8bc70c4ae0935ca68662359a frame00000000 +0198c7176fce9d5c845fbe83c7ab00d1 frame00000001 +3d45daf1f14dc1eb5dfac793a4baeb84 frame00000002 +36388edd37af5ca842dcfa7dcffca4d8 frame00000003 +03600b18a8f29176c695c5cfcf514bc5 frame00000004 +0452e0d6240a121435095ccf71c53520 frame00000005 +11fe16d222d8f090dfe5172108881d5a frame00000006 +233c6f8835d379d5343e772cbcf7f624 frame00000007 +d6e526e9c980866faf1ebe6e762b4365 frame00000008 +3e959e7d8dacd95827c2b7718f19881a frame00000009 +1c231d7a573546c79d9dce68897ccfa8 frame00000010 +d63bbea20c2e0afa3a7701f88116761a frame00000011 +5db5c5328f7b1b498068f02a316537a9 frame00000012 +6671e191380026a94e89a989e416f7e1 frame00000013 +28d0e14110913d9a8edd3c02bc0f2a97 frame00000014 +0275a52804e89f72162f99fae34cb7d1 frame00000015 +34873676824556e3b365bf3b270abc0f frame00000016 +79bd801226aa600f2470c2e7abf8fe47 frame00000017 +9f107047241f1527bf2478e1dc6e3dc0 frame00000018 +c0fc5dbf9b071fd0aafa3a0565020398 frame00000019 +db5c432aa7e7650eccc32872dae94ecf frame00000020 +bfa217b37f9545f4ede37d2c30a90fc9 frame00000021 +24a2e3e9ffc8c08020e34e0e94431c7a frame00000022 +f6355041a1fa73dfaf05505e1757188e frame00000023 +61f7c0ebd6c0c7374c47378062b17b72 frame00000024 +03b1a09f41118bcc0c487e9a80150b5a frame00000025 +cb5eca6c1b94a76a4e356cf23cacdeb4 frame00000026 +509d0862e86af8d7c9d62db9c66fdf7f frame00000027 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA3_TOSHIBA_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA3_TOSHIBA_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABA3_TOSHIBA_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABA3_TOSHIBA_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,296 @@ +adb5ba9214b0a6eb707a15eb174e3822 frame00000000 +76d84c0b2a283dc625daff9089681f25 frame00000001 +4e13b85097e5c49fbd232aa3297132af frame00000002 +e9226a266aa67ba33d570d978e419ac7 frame00000003 +b350e873311cf2e120335584d432d7c6 frame00000004 +4f068d233da3a08683bcec74c468da75 frame00000005 +d3c8e8aa18335342fb3fcabe218a8a67 frame00000006 +be20b4bcf462b8d4fa9c8e5bbe6c8c8c frame00000007 +22c890ed1498f6a8c82690d19597e82d frame00000008 +4de88633cf1b1502358aac5f7ffe9b3d frame00000009 +40706fdfdfbd2d57fe1f9d8a5f1240f2 frame00000010 +1a62d13d84d7cc186a40ef80fdd59f38 frame00000011 +4b2d5592d1e1024ee7cc5c821e083440 frame00000012 +6c979a404e0267e021623e4eedc4e5e3 frame00000013 +02b3de71a98b784a90c21e657e16bc7c frame00000014 +c86891c39da2c34a59fa4d8b0833bfe3 frame00000015 +523e5fcb850b072743fae4c86b59ca37 frame00000016 +3d828451cc9734e076897a216fcdcd56 frame00000017 +b3bbcbfeb27cea2e5796c15ce0fc7efb frame00000018 +036fccd396bdfa34626e9216676b4ced frame00000019 +13b73a9e4c0ddbde058ba83b19be8687 frame00000020 +1ea225b282f658e81af780453cc588b4 frame00000021 +f5acd797cf35e2d2c428439545dc8de9 frame00000022 +cf785b521f07b0563110b039748b7ed7 frame00000023 +b65cc7b774ba63b82be6d9bcaa5b7825 frame00000024 +8e7df22407effbdb56e555a29d96fca2 frame00000025 +82089c9ae3241046c5fc6e18b8c8e870 frame00000026 +2383ab08b707409bb027bd8ccf7f1883 frame00000027 +441cc06645caea3ed06154d0c6cd37ba frame00000028 +fb6e62f7cabeafa2a546242b25388ced frame00000029 +6ed70e5536a74aa022e2717b37b577eb frame00000030 +0e11cccec08862033e65efd295332470 frame00000031 +8c873fa35c402139449429e627108778 frame00000032 +9ef6dc75bdd730b71fc3a31bb4b5692a frame00000033 +bd2d938f535e20cadeab0bb3c8f7146e frame00000034 +835d42c7bc0b616b23c029780dd4a440 frame00000035 +d817e8499bbb600e21da2cb38de56560 frame00000036 +57455d04450e8d9f0c642a5c5326825a frame00000037 +a3d0a3cce9058d7dd25d469aff36d0de frame00000038 +3efc9b594e46ee2c7453c48736909362 frame00000039 +adc88cc3a3235c4501497b82b24c8e15 frame00000040 +d2be9df37f1fc570694cfa63fa431f54 frame00000041 +c8bb00fd24c7f90d1989f58c8b25a0e8 frame00000042 +270ccab3705007a68c41b842c663dd93 frame00000043 +2c8575e33b88ca0c9cdc8129fc9e3130 frame00000044 +0d9b698aa4aabb15bada3123845cbede frame00000045 +55f9e4af8e1393506c18de5eb3d3b140 frame00000046 +34dc6d575573568609a24cd36add4000 frame00000047 +7c4c66af8fd1ff7bab9feca8200217d5 frame00000048 +649c5cc93d593e5d05ca0cfeec47fee2 frame00000049 +f94aa52dc877a53f673fe3dccb3fc0fd frame00000050 +ee9f0aa45dc8dcb6cd43f74c5875946d frame00000051 +fea3400e0958a58863495efc2d7ed476 frame00000052 +f1ebfe074f9f03ea0b51dda36de029f4 frame00000053 +d915c52ac6b9275ab70556f94271572b frame00000054 +da08cb8d1fb81a2bc46701af6d10cc42 frame00000055 +3d820eadae0470581410b44df41ca2a5 frame00000056 +5ffbc145331ee0d81fab54d1cde2afc0 frame00000057 +b8a8e655d9a0ddcacd6e714dffd1771b frame00000058 +57e06c446e952cdcf3c884c790f4794c frame00000059 +e576b14693c4ace47b947e95016d5df2 frame00000060 +08b71bb5585d4a37130e8d5302413ff8 frame00000061 +fb047b5e7c58a8d06db9741ac847f13f frame00000062 +281361a3a2c070f79b6cf148a539b21b frame00000063 +14a9d5969c703fa1d4e07ac8f0ecc3b1 frame00000064 +fc0d97db86e6c8666e3b3fec90557937 frame00000065 +a9eb45e28217c5f99b69c0eb3764f4ad frame00000066 +b297462daa19f0c33f295837eb85a51c frame00000067 +7256706cc624e247cd7faedeaaf4e5f4 frame00000068 +a06d6dcabe998568b549fc7829389fac frame00000069 +48cf2c8d11bc1187dcfc4133b3de5439 frame00000070 +720c7ab402fedea02ba5dccf4816d4ea frame00000071 +e966db45d548fbcbb3572af88a4778da frame00000072 +9dac946a5a5880315ac1d5068ebabf84 frame00000073 +35ecd814db7aefc3a7a6e17e7f04e53e frame00000074 +4a28fac25fa995bd18f10505323b0aec frame00000075 +25b42986d5cd83d280c3ee0146eb12cc frame00000076 +d83495483515795c20010605c6b1718b frame00000077 +0a012ae8b20f58a8c81a3052c1e7e9f4 frame00000078 +f506c41d99afd27b4535091681bb356b frame00000079 +b8f17f51d4bfaac6d3b7c40628c8b57a frame00000080 +dc5aad6c9c1a5f36091bc46821bea8e1 frame00000081 +f0d7858e8d6d3eb9b919f4d0853a45ef frame00000082 +e37d49feb1021cc08fd13e10b729cb10 frame00000083 +abffb52c56846dc8329553010d3d9cdb frame00000084 +b755544946c0df18bdd31d75f3c8be3e frame00000085 +0b3d8dbbdcaa7a36ccdb3e7267d5e1fa frame00000086 +9fad937052f43e839329464c4f706f99 frame00000087 +091cea1588a5e89d41da0cecdc38cf4e frame00000088 +deadb1fb1750b762a58cf171e9f185db frame00000089 +29cbb8bad5e6b023202298527c4a8dd2 frame00000090 +e23da97749e3c739b347b277b018b732 frame00000091 +b9d3551655425dc7913209a979276f08 frame00000092 +4559326316b94076e8bb753b6d59ed36 frame00000093 +1b53ec541372a483995b4e4fb4ca372a frame00000094 +98fb0a84166db1ac3e95e6cc93e681f0 frame00000095 +824d1a169c01b74ac9b0340afd4b96bc frame00000096 +974bb08f144a995a6c3f7de228e8bc3c frame00000097 +e6e206b2bf7c2c06da21db2b6d3850ad frame00000098 +b28c616fdc283343f54aa49672852aa1 frame00000099 +fdf4b0698a6dc0ca283d6a5b1ebc0171 frame00000100 +57462ec76bb520408d612a4469a41223 frame00000101 +d61ff4bbda7da0cfab0ff12dfbdef587 frame00000102 +051604712d08a1fb4fd9c65a1b445564 frame00000103 +e22b51d37a39f816f109fb41d4c8ca7c frame00000104 +b0ba5679f67f4317fa98cd240a744cc4 frame00000105 +8408bff33e0a6d67b6b59ddd5024cf64 frame00000106 +98b193ccfb52e1831761541574fa87bd frame00000107 +ebbc1d4a3786910946ed8a15b95dcb25 frame00000108 +60e9951167a86fad8e95eb20984e6fe4 frame00000109 +db114cef037216552f4404dba964b8fc frame00000110 +e6dde8737b7a62d81f5149764b2a6002 frame00000111 +92169da3718fd1d5df8af57d1f25b510 frame00000112 +8716805f78d7f4ec8cbfa781c75472e2 frame00000113 +f4eef930fe2046baba91d725cf9488c9 frame00000114 +656ff17388272e36263d9928316a6a89 frame00000115 +a214f1a51c2a600adecb9b55970b3c46 frame00000116 +d319629852804a144ea9ca8e521c66ef frame00000117 +e8b09d06b79733b5b6ab83ca8b332316 frame00000118 +78757358c0c5c9041d13a5ffe4d42929 frame00000119 +3969e389812b60a198490f6db49c9ea3 frame00000120 +15cc5d732ce075267f0bbd713291f3a6 frame00000121 +454d4375b4e0641982418ab6758396ae frame00000122 +017f27745423597dc57f0580a7da8d6b frame00000123 +a17a19b3fca3aa0ce8c18dfce5bf730b frame00000124 +02e3e29630a23517fc29b34f95a0231f frame00000125 +eabd7bc3efb76aac241aeaf48200bf41 frame00000126 +bfc701f63559c4048bdbbc67401418ac frame00000127 +26c7caf8592d0b24639029f3d3d2030f frame00000128 +8f775573e4cd3a635e5bed90dc980fa3 frame00000129 +91e84c9c8930c0d2d49cdfcbffbe9fe7 frame00000130 +87d5a1450f10fab23b64b65476b42f97 frame00000131 +2ee8273ac148445f4bcec23d2f33f462 frame00000132 +110dadd4284d69d90322af338d601441 frame00000133 +ce2b5493e61401e8b0626432557a9ebc frame00000134 +b08f0ee6656d3952ee32a7f204cd7e35 frame00000135 +93719d77f8c5eb6b532c679e3380a24d frame00000136 +a9d5347cb617be54bb5a7f460df86a24 frame00000137 +d88b6245019de89267219bd37a865169 frame00000138 +2bb2f23ea6ba63ba258d4f1fce0f80eb frame00000139 +279f20bb257805d9f4f590f76465f121 frame00000140 +a3f8dd5ba59de9f65760b3cae11a2c93 frame00000141 +2da84a1e5e2ba0f8a0bd8893561e66d5 frame00000142 +960801f1305aa8574ce19b86e5dcf03a frame00000143 +5045e36e2813ca8add7cf708c2111f52 frame00000144 +b765d4b26b89c3c6d11b55e784c90847 frame00000145 +ce8fc94273fa77179fb60c5f3740d720 frame00000146 +e57afd9452c1b3314e9e7b63316dc94c frame00000147 +6d58304e82e911b70e72be4a3c457797 frame00000148 +86383898e8216a621db988273360ce41 frame00000149 +d3831309837ffd6dc63eb06fe7e76cb1 frame00000150 +5bed813e0cb58a1ccb5fe9885e2d05e3 frame00000151 +ed8b2d510bc2a3252f20db6c35fd2910 frame00000152 +f9d0acc9d16fbce5b2b8a354dc775d36 frame00000153 +ccb28f9d9d8dabcc149510047be9232b frame00000154 +49db1fd2547065c72264728233b68d36 frame00000155 +5bf0ff11db01032f7358271decd9f30c frame00000156 +76e71c2161038b5678c08b0cba7489d1 frame00000157 +c02f15d1b1e2a68e54b4055df77e95d2 frame00000158 +34502318cb95f55524575c54a74da24b frame00000159 +2136eb30b56baab8364fd9c8979970e5 frame00000160 +3694ef33d8716fdd0b3941e368d01e78 frame00000161 +8f1b0dc8995fac2f7d894c1a0044f62c frame00000162 +3f49510eb9bcd6b49be968b6eac7bd26 frame00000163 +42d4ab5cd20efd06ae823fd67695a592 frame00000164 +cd61bd673a44122b5405cf5a8c9bd8dc frame00000165 +ca285583a0c46fc13e4e84b66219a98d frame00000166 +c86b73f29a91a03aa3564c520394d58a frame00000167 +ebef71451cacdec6732f61768e8303eb frame00000168 +96b584fa943a4a5c13d19993bf6d875b frame00000169 +246d8b7bc320d6e6a143a5a8cc29f84e frame00000170 +738c2aa1c68e2213d332f5b48d531fe7 frame00000171 +65293b1687aad1b79ec0eb1b21ab0948 frame00000172 +c9681227f378644d812e90a066917329 frame00000173 +5f9e71fe8ce2e39fa38ae153903c74c4 frame00000174 +69a4fc9f22f088c4996b8f7010e6c961 frame00000175 +5ea110bfccd88680e0dcfc9a889c468c frame00000176 +d18f470667300f142275e2f9656a727b frame00000177 +a7cfe9cb7c87367b652ea1ffbfdc7b36 frame00000178 +9e5a00f6c5f804e78f25700727d1a515 frame00000179 +83e1059f8549b15c9d73aa80a9a58317 frame00000180 +f9fdc7534e70ef93b0c64d3727a91978 frame00000181 +2d25f08c27b01619deca81b9202d3768 frame00000182 +91400f58c1ad4e35dc9bfa5076d73eab frame00000183 +2f285c21c520b1e4d5bab5c84836ebd1 frame00000184 +5a754f673415e7768281321bba240377 frame00000185 +b954d47d297b6599951138144508ff1a frame00000186 +56cc2269a2f40242fdb91b3129896b15 frame00000187 +0fbb59d139fcd6ec94110c8ab6a26a36 frame00000188 +c2a6959167e35db2170e842d27316def frame00000189 +8614857e1c0e162335048933fd995e4e frame00000190 +d3ce80c6a0232032e0dba1de3836d30c frame00000191 +1707b2fc3e80b6a99ea567b2f51a65d6 frame00000192 +562305bd303d8ebcdde7cdc1874c8118 frame00000193 +7b63054ab9d9db930a31de9e1699c63d frame00000194 +3c6e57ec19a553054d80f0aa7adb9322 frame00000195 +60f469c52aa8b004a8401965b02e3ad8 frame00000196 +fbcdf7ab4231fb87ea49de48a3191669 frame00000197 +a32fc63a811a2134c13f3fb03c09e369 frame00000198 +e823bb3705b1bd751ef737c215c99c55 frame00000199 +3ddd955e9104098ddf6d061afee5022b frame00000200 +094610078701e2dc3e1cf0e9e9f85b40 frame00000201 +a3d8ab32c5af9dae7d98847ac8a39065 frame00000202 +48fc65ac63111b390b85aaedbbf337c0 frame00000203 +6cfbd58a0e6c141a00ea3e99c493cf63 frame00000204 +b97d17f6772957923e2001c41131c4b4 frame00000205 +5672b5bb1d8ac76bb21564f9bd1bd5ff frame00000206 +b36f1e518f555074b93790eb7f99fa19 frame00000207 +b9e5e18cdd2831478679347208e95e03 frame00000208 +2fb55176f55f16ee6bb733768def6d1c frame00000209 +4c59971b8cd2b65e146e3e0b35027703 frame00000210 +599fadc823e36fee9f6a1babba733eaa frame00000211 +7a547a0e7e1ae553bc9081c98f1394db frame00000212 +9dacaeee33d798e666286ac98c7583e3 frame00000213 +57f445d1add4c202273319d726b1b766 frame00000214 +a340797589f6c73f0ba15658170f6786 frame00000215 +d3cbb5a21500a4c9cc87dd69747f0c74 frame00000216 +9fc04444f6fd9fef9bbf0c70c22a6bb8 frame00000217 +57adc1323ebbe4fdff134af4624fdcc5 frame00000218 +ba80dcb01ea3de372d9a65adbb5ee06a frame00000219 +b231cf603f911d0b0d553342c967a4e3 frame00000220 +e06e78ef062dd198de7539ab5b97e9d9 frame00000221 +cd81f0c7542395d834610a96abfddbe8 frame00000222 +491e40077c5b53e43ad3402ab58bb968 frame00000223 +c07dbb93bffc4f71fc1c4e39db89ecd2 frame00000224 +a28d2b3bd5f6e15aa47d39c9a3ead8ba frame00000225 +3b62c1df7cbd24548e1b3778c89c05c0 frame00000226 +f17da3382620cb6a98173acda40f9207 frame00000227 +8bb79051980ab17b98af045031cecf31 frame00000228 +7602177c70c123fbc64a4f03ea66d83b frame00000229 +bb6c1e1161425307777e53379c208b31 frame00000230 +885e0f84abc9aa0e029bf6e889d1f3b8 frame00000231 +c413ea5324edc6828a0370bd9b40528e frame00000232 +3a42d990ceb33878a688a6d987e0a935 frame00000233 +66d58209e45ab9e86d2fae2c6af06d20 frame00000234 +20aa2766f031d69a7a13ec01b17714a6 frame00000235 +94935cac25e7e1920183ad8e6d7ff6b6 frame00000236 +097181065ea39d3a45a7d6a2ad789862 frame00000237 +6109dc92cf04512b733938f6d8b7dc7c frame00000238 +826c906dabe0e1abf38872fac336ff54 frame00000239 +4393ed03bd1a940147444b6fe4745fd3 frame00000240 +f7e328d2f0ff8f8e323cc3a4b1fa69cf frame00000241 +ad7271970211c8bffc88a9a4689213e1 frame00000242 +c0cbee914b7b35af08919453900a39c8 frame00000243 +0f3238e88c1676bafbb96a80b26ea0b6 frame00000244 +71393f2710bd50704a0ca071294f2b34 frame00000245 +8ee295f7b60057590d43a10ddfa7aefa frame00000246 +1c971432b10c9dca8bacb0f56900d457 frame00000247 +fe7b89fbf67f50b10f920e66a6ce4643 frame00000248 +1ad0e0ee1ab4fa2438d68f6b420f9417 frame00000249 +4fb1271e286184166cd93cc0894e59dd frame00000250 +38414f45b307b662c658395550a900b7 frame00000251 +5573894af29c4cfae3d7e497fbe5aad7 frame00000252 +c2d2d2ca45365653ff8013b7fd9f8fd0 frame00000253 +7eac400ceeff6a5a2f1886fee769faf0 frame00000254 +fbabbe08881d69f0b1ee6badbe491fe2 frame00000255 +f7bfdf4eb1f79d385eb0dfd5eb999332 frame00000256 +9bb94e0b8a62af73a3cf4ae841a521ec frame00000257 +9117a0ed5ddc14ced7c7fa657eea57f3 frame00000258 +f4743b5923ea53fefa87b719fb0e1276 frame00000259 +2883368afde3ef9f1f250c3e5a6e0f19 frame00000260 +61a53d7151cd7a484eaa326065a8e604 frame00000261 +dd02b1864f507034a1a56921b3f9a029 frame00000262 +73d4eeb5b859ba9090c36aa2403420c0 frame00000263 +1cbd120900246645fe8def49f4b0b38f frame00000264 +744e2b427b65ed9ae3823a2bca74796b frame00000265 +a375c1c8362918181ea11f2c0e37f917 frame00000266 +0c2aea759edcff89133e70b8410f5a1a frame00000267 +f758f5280ae6ebe2b7e178585ba2d045 frame00000268 +f3f73d9749bd092d84bc24ad5fdeb841 frame00000269 +871030a85d34aa36aaff709e65b113e3 frame00000270 +bf3434264b9ddafe6441056bb4a336c8 frame00000271 +77400a9a048a001742aafed7f224b3d4 frame00000272 +5f14097ba30d770eb3ceeb3bab3604cd frame00000273 +7a53a85f297f4b24cc6aa85322c1cad7 frame00000274 +623f0808a4ad9d01ea25d347e2a0c0b9 frame00000275 +b9bcec024ff5ee8cbd8e691629f765f9 frame00000276 +b686c57a55299adf2c85e8b9272763f1 frame00000277 +8ea49dde540d523cbedc4ad866104027 frame00000278 +9d80a0de0564208e692cd02d783bf58b frame00000279 +55b8fb7efd071c0cb679f20e2e88a4d3 frame00000280 +1688f63874d76eb39c70c1f89d78d774 frame00000281 +33793c42c6bff45b770be630e1872cdf frame00000282 +384453c95894d6e55201bf89322b52dc frame00000283 +a5369bc662429b44ba3fa3031e1c540d frame00000284 +df20c53d4be64b6f9975bf31dce89cc1 frame00000285 +9d74ad13058bd725ee3105fb9a31323f frame00000286 +e225ec6fb90c5d6fcb2a7985021ded1c frame00000287 +89008f36ad10efb99d0ac64134232eef frame00000288 +cc85b0dbc4225d3c5e7dd153dce800fd frame00000289 +0145cf79b760a9e3b02f8204a384ae96 frame00000290 +a61e885a6be25b1574839e076adad620 frame00000291 +dd39ee743760111a4b364ad3f62fa3aa frame00000292 +d3eefc25b503597c14fa539b67f23ec8 frame00000293 +522339f7cd05959e82bbd85d681a142d frame00000294 +1d8ea43a896fe297450a05a76e91a286 frame00000295 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABACI3_Sony_B.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABACI3_Sony_B.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABACI3_Sony_B.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABACI3_Sony_B.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,293 @@ +5e90eb463a19a21c3f363ee16a23f46e frame00000000 +2def9859adca13c1306c2c01e7ae8e0c frame00000001 +c27f01d7a64d83acf5477b722fc987dd frame00000002 +5d6e316cf0749e10a72d66c0c18b9a02 frame00000003 +ab94b0fbe96b3976ea26acd7b6827120 frame00000004 +0366406e29f56f5a94a4a9a794ae0ab6 frame00000005 +cd44ce07381111750c299ad38636e916 frame00000006 +2a5c86d0466a2ca7e2e49927f18a8902 frame00000007 +314697a4d50dc9f3d40036a3dd4b3ae6 frame00000008 +33bda6d4ecbd3c8c43df47d68d3a3e35 frame00000009 +0d1e7b30187156f14bd66417f5420400 frame00000010 +ab77e15c1852f11baee32432f72df31d frame00000011 +56a69ce08006f21f34e0346a2911d35a frame00000012 +1d87dfa61d956e5d7476d86b1e2592ee frame00000013 +185b731cfb5e26a8f39e63a7ae5fb436 frame00000014 +64d08a06482407bb17463942af2e79df frame00000015 +fa6df15bbdd53c4d2b8f7ad292eda1c3 frame00000016 +31bdfbe6d349fa12ef41dbec48836408 frame00000017 +fe3a2ce1dd3e64209ca8ce04b3c8be8e frame00000018 +bafc6fa1b0ff1e1a65ff30a19a8d6c6f frame00000019 +14ee032d23b3d10498741847fb3de35c frame00000020 +2a8f68e5e93be6c816d632d4071b600e frame00000021 +3a010b414755321835d610fe3c0d2470 frame00000022 +2c08ec95ef8cae23b10738b152240768 frame00000023 +67d03e7842cfa8c2f1f7e21ad7bf35ce frame00000024 +d227a0534f7ef41dfa218a6776d1ea32 frame00000025 +496ab72fcb709110f8fd7074e0deb967 frame00000026 +1afc554ef1585f7c9c7a7cf1e9c787dc frame00000027 +641a786c81b35381904e944d5374c320 frame00000028 +4ed3ebf3a12290b9b5d6e4ab02af0100 frame00000029 +03dcba42231dcefafd6bddd9f4b9353b frame00000030 +406d15d771cae60552207afd261f1f7f frame00000031 +cfe02eb2950fc41007e704a0ce43d7df frame00000032 +499ffb3d974a0a1a0d5b70203119ade5 frame00000033 +33125a1e9f1497f6a927cddf62f99a68 frame00000034 +55a2fe04e9598ef6f25a3c6a64e853a0 frame00000035 +d1b3b9e2a558367027837cb8c6c6ed8f frame00000036 +0c423fe869d02f0ec8a1caffb32829fa frame00000037 +5c39772c432f74e9c1d1dd1d250fd288 frame00000038 +612edb7df783cf56963ddf5bc9313f1c frame00000039 +701816a775c6fbf65d8adeed4762a337 frame00000040 +18bbf5675f92f66d4903ca125d7aa457 frame00000041 +0c2c612165755ab8773b9ce055a37d22 frame00000042 +85eab8ca948f6273d89e2debd77cb8d0 frame00000043 +70d1799f145ea2fb0fedafce052cf824 frame00000044 +9c8f2549772dc66510fd0178f4f5248f frame00000045 +f8106ceadfa81361f35616fca26848c3 frame00000046 +71be4758c2e6ea34408ca049d9be7da5 frame00000047 +d063dd87b5f5a58cc44f7f1822eb3919 frame00000048 +6e5e8f1d3b258086b15dc4f6561a8520 frame00000049 +eab95c094f9b82bb097f2678be72e215 frame00000050 +1b44d6a4ad2829a05791861553c5a5b0 frame00000051 +820dfce413e94b9ea8b04b719bde89ab frame00000052 +e631590dc4c8cf94af6b86a6f623c940 frame00000053 +ef498f6247140c3b56030991cc342290 frame00000054 +f7731ee6df42dba48a125c62b5915c5f frame00000055 +401974f7293e952f5ccf8a808711c373 frame00000056 +19f3506176dbd08400fca95ca22d4159 frame00000057 +0f2841fa14b302a596dbbe9574510cff frame00000058 +47cf3d8073f8565a23e8f69809e3ba20 frame00000059 +0cb24d1ba72d356d3edda7e7db5ebf41 frame00000060 +5e5d8e5a6fd86293262392411c54e211 frame00000061 +b7dbc2dd623c2930e046cb3a95c96132 frame00000062 +570917690fe986f947260162a5e62782 frame00000063 +56b68695ae5806feba7a7ccd7305e1cb frame00000064 +f97b8d7ac9db66477f86b2bf8bf6f10f frame00000065 +afaab9e5dc198186b64d76ab874252bb frame00000066 +8a46e9c17f22cb87090965b9cafd01bd frame00000067 +7f59313837bda81b1481aff899577441 frame00000068 +12d33dae0d87d9a22651043af8a1852e frame00000069 +72e60ff6a30962cb5b51982c193fc926 frame00000070 +45dcf101b444960938cf5868cf81efdc frame00000071 +a5cf83ab9026d8fdc17837b5b13ed5cc frame00000072 +01e898ce89a35f19a836537c70e421ca frame00000073 +42088da934c1160c6503e45086f5654f frame00000074 +3dd52c1e4745bc1d1d5e36fb127c86bb frame00000075 +ef980b1fc2b0ca67f90e648e3220b05a frame00000076 +b2339962cfb92dd91f7f949fde825a16 frame00000077 +af8ef39223148b8b09384b9b00b9b443 frame00000078 +20a7c0506936da80e2ab4750703c939f frame00000079 +e42c944120919924457a4b578773b8f3 frame00000080 +84ac8bd414de69bb75705bf713d516c8 frame00000081 +215f9b83c2a356fe68d86f2bfb59490d frame00000082 +29c604525989caabf8028b2d7335b06f frame00000083 +35e0921a34690d915d2c6384021a89e7 frame00000084 +cd955ec6857c44548921ba628cfff6c0 frame00000085 +340e4cc08d5f292cd2e45f8b5ff4dae9 frame00000086 +cfd34fc64adca7ef2fced05cc01f01f4 frame00000087 +fcd92d05cee5f8b23feecec739986131 frame00000088 +f3a671615f1d7cb4e82fd1a5a8d84cd9 frame00000089 +1cde741d1bd1c89ceda8cb9384ad97f2 frame00000090 +9bd184c9b646707aaa9890b3de0e832b frame00000091 +90c3f3e6c7761995b71d57e5b20b6138 frame00000092 +ab2556cbca12b485d5c44be1165b52cc frame00000093 +014858e024ad6278aae08881136ff215 frame00000094 +9d9cae25074cc04dfd9105865a5e19b3 frame00000095 +9dc53e2a2091c5f601c3186776e598c6 frame00000096 +2182a3b364e0b4ad60ebee6e13111610 frame00000097 +3853fa308c27c48c32ec8d3dbf201d08 frame00000098 +a5e09e5756efb5acd2a7581331506f3c frame00000099 +097df6ba12673c7f6544cca1d4444900 frame00000100 +7b07b0d8caa1838bf15dd2dfbcbf151b frame00000101 +464466534f3abb37ef40d074935c61dc frame00000102 +5059f223fd0144234c3baa57d5218626 frame00000103 +69aa2d76cd00df224027ddc2b0c1c0aa frame00000104 +c76d1e950f08ad595f88e356721b9c5c frame00000105 +95849bd3b234d2c5727bb8363ced0b44 frame00000106 +6481dd685ab6bc441e267c77ef52c48d frame00000107 +8d76cb935ddf0f05b51256d2dae94f15 frame00000108 +d5e00fc04a084a8fd2e3f9f7df370070 frame00000109 +3a35a9ebb270939054322d7c8e751776 frame00000110 +519cb4dfddb91049b32857c8df3ed070 frame00000111 +29e48e69a9ec754f1f0cc17d793c4e85 frame00000112 +52bd8da840da1b466ee7e6146e9a5620 frame00000113 +ad12109531b5a347118c971d68c3e667 frame00000114 +95659f7f3a4bbb143fa07da07fffc874 frame00000115 +b0bb7dbe1d6822ffc5522c74cf716a49 frame00000116 +5f7c79602aded3b511ec6975c13d6ade frame00000117 +e4e36c99f6daca6739dc95a97c7e4c00 frame00000118 +552d792e8d2ac3f8dd6cda4991d482be frame00000119 +0cc9698e68ce3ebc4cf826ea141ccf8b frame00000120 +5803977ceae407ded83acef69a41070b frame00000121 +65806ac359ccbfa9dc3284486e819944 frame00000122 +f0f8e0e5de6d0e82fe84a0e1deafe0ba frame00000123 +e1570e98ac8e872efacacabebee27ff0 frame00000124 +d07a9e56deb7f8427c6f331843e2acae frame00000125 +05482bb12887800b9414ed0e88c810c7 frame00000126 +9ab5a6356a986a4eb02e690920200a97 frame00000127 +12bbf26d395682250a4c3748b2847384 frame00000128 +147a0fa8aed1bfc6e075f3dd695ab33c frame00000129 +4348c8434ed057ddada0995f126b99bc frame00000130 +3a35a0f76fb73a12200f9f0ec999c38d frame00000131 +93cdf950822479fcd3dd4cf5463af1a5 frame00000132 +bd343c6e80df95df8714da4d42076ba5 frame00000133 +d4145a1d7ce46b766be2c602a43a3aa8 frame00000134 +9882bd02fd3aabf285c0cdb5d8d9cc44 frame00000135 +797c2d85b7618017e90223d45134091e frame00000136 +754d5497c5037f61a1a3edce2eaa0ebc frame00000137 +be461a393aca62db3770ed594435db65 frame00000138 +aaf5e4f28f8805b68c8ad5a9d2aaebab frame00000139 +c5f611a5fe602aebca0bb25c6193b4b7 frame00000140 +8c28385cbedf39e2227214f6158d79f8 frame00000141 +6907287e1cd2ced5738c8eec2ae03e8f frame00000142 +348440c3c1c41370b2f2d8c795ea256b frame00000143 +aca8677f6eb5a0527376f0b574cb1f4c frame00000144 +37fec0ea7908b32ef7194fc8cda641c4 frame00000145 +6fe8343ae28a463833115606c740d659 frame00000146 +4344f0a8efe4f6738d7f04a1cbcc1353 frame00000147 +54dc92c9af7c49c719001ffa1692103d frame00000148 +a76c77faf2fb36d591cd5d6f3631e4bd frame00000149 +9fca3158d7e4fd9e20ebe618dcd45d0d frame00000150 +3bc427a8455ca9c0b698bcefc6b0398f frame00000151 +2f047d76d0f7f2e8b32c4c52ca121595 frame00000152 +7295bc8bfe9e4f33856b78d18976421f frame00000153 +82abf849fd26de1127377e41040ac78f frame00000154 +a9f7c80a7ec8e910023dfa322d09937c frame00000155 +da41d1814aded3be9cf416d3158c8ef9 frame00000156 +fc68fda5bde27d65e277ce9a6a48e3e0 frame00000157 +bacb704ee75115e09c59c812671046af frame00000158 +b6dc5be8ad3cce8e16383c4be9cbb7d8 frame00000159 +4fdb5b62e00f29c524a537980c97e132 frame00000160 +82b5ac77a109eced20541dadf36178a5 frame00000161 +51060414f665677c085e1748d5c7a3fd frame00000162 +de5620f3b921ccfc17adde0c1452e079 frame00000163 +80594014ad1f0b69d2dbead1bd016d29 frame00000164 +d7288760db76932bcd9de9eed1d776f3 frame00000165 +518f9aa5579a56781cabce4c7777a1f5 frame00000166 +a14750e0f77938bac61e3b21c59f90b3 frame00000167 +21ac2186af8e1732011c2270f67816bf frame00000168 +2a1fd443b6dd8c171525ff9fdad2c0d5 frame00000169 +55f42c96bb5c30f824795a05e2c241da frame00000170 +0f333440e5887823bf3ed898467c250a frame00000171 +bce3c9aede4d58c991a47f9e81120ef2 frame00000172 +26d3176ad59c0317d65973b4d88b1fe3 frame00000173 +6204ba689c24198bb2732cd76acad200 frame00000174 +e4b416560eefe8cf997ab0875fd59cc7 frame00000175 +2118f40cfe2381e6aa4d55079ab572f4 frame00000176 +b14a5e247784fa16721091e4cf8a0072 frame00000177 +894189c91b00e423e2e03930c554cbe5 frame00000178 +63d8b6be937fff4c60ce56b4ae0b8961 frame00000179 +e299ffb75a528b41fbbae3a667bd96eb frame00000180 +f0e150dd480926dae7fb6581f551042d frame00000181 +2625a836fdfe737989c2b35b0bf76021 frame00000182 +acc27e58ec6edd681dfc83bd3f8f7e15 frame00000183 +9bac4490481e9630b80adfd2b308cc5c frame00000184 +95f997dcf65bbb53e0419deef32aa0a7 frame00000185 +05975bee2d0df9b642d78e9a80cd95c2 frame00000186 +9710aedc8c1ad3b5e61a84bd2f0c4985 frame00000187 +bc186a9c5fef7e8f87a03ea35360e357 frame00000188 +9cb188ba55d02be98a126025cbbe2abf frame00000189 +9844cb3db8add775c2155a7335505761 frame00000190 +b43227454fbd839525342d0e83ef3a4a frame00000191 +b5d6fbcec986216130f9450d22dc9952 frame00000192 +38af1a9c1ff92955b3e42c9df43d8076 frame00000193 +b79df1622b3b0690f8dba95cc8c9cc7f frame00000194 +d99b94c8ce859256e36f2a7ceeeb5b61 frame00000195 +78464c9181f9e19283db15417023f543 frame00000196 +18b8cc1e7f1a1b330ffffa90884b0062 frame00000197 +735a03eef07300a63d91197bf0ac8fda frame00000198 +1332171b946f792481b763e4a42101f4 frame00000199 +e6bdd753d48f01f4ad456a35b11517bc frame00000200 +4d2c2bb22adb9150f453fce2ef1dad70 frame00000201 +af20ed8f301c9efc00ed6a14fd7444c4 frame00000202 +cafac8ff116c4424fee11db9fa1d6423 frame00000203 +abb669fa1f3bd75790f5bbcc17c6999c frame00000204 +bc03c247e0391ab9393b405cb40885ad frame00000205 +77319b357158888d074633b87920debc frame00000206 +17b48032bc08a358ea7f57f3b59409b1 frame00000207 +ef20d2973dab29464339d93eec589f07 frame00000208 +a055f6bc399d3866de99634efcec7986 frame00000209 +b2865dc87a5906056868c615ca9777f8 frame00000210 +1a34bbdb46f1004c39b2214147163b64 frame00000211 +9639f6659da57c9a6330c5ab751923f6 frame00000212 +b2e01f79a10e5a88b9c8543e46d3a1cf frame00000213 +393ad2a54a2b7a7bacdb049ee57acb1c frame00000214 +77c46e0f6892dd349c14b13bc9d892cc frame00000215 +fb6913633daee796720f3ac544c01952 frame00000216 +77ffd49d99750cf0478b6dc0abd79ed7 frame00000217 +052062b33e18a32449c6ed58a1fde2ae frame00000218 +8e395032e43cabc904698cdcd30ff49e frame00000219 +b451da87fb8c7c3e4b123eea0bc5eff3 frame00000220 +709d5315a3787dda89189b62cc7665ae frame00000221 +d8e0aa6284a7150c4a590bce4c4ed0bc frame00000222 +63acdd0a8292e6d4d8d1df74070103e8 frame00000223 +97449fe287e3ee54392b6d757fc3ca10 frame00000224 +d9893fd5868e11284c1862345835a662 frame00000225 +0d8d5a3350951a384c168f9d8db5007c frame00000226 +a0ad43cdc00e52deb0629855be5a778f frame00000227 +632a9a0d914654d418c7669eb9f812d2 frame00000228 +5101396377c27388d57d52e380483888 frame00000229 +ebcd1c66ea21e4822e383e6eebeb148b frame00000230 +b89bcf510211a990db140306cfb7caec frame00000231 +f4ac0c89df54c3c2608c34aed329b5bc frame00000232 +e7a77b920f66940e8725abf9a225749f frame00000233 +91079110ee57ac0daa97abe960b7232b frame00000234 +b59dbd9901e796c94909e2a55b250ef6 frame00000235 +36a51daa9cb6e000213daf1e1307e314 frame00000236 +9529d16c58229eeb49ffe79d1a6c0525 frame00000237 +40ceba48c03a658ed9187178745f07f1 frame00000238 +e0bc508047d8573c8f7a6203f9ee82c2 frame00000239 +c7dd8049dca97a7fbeaadce95e53bb69 frame00000240 +79a263bbe0f9dfd0f70d85f5766e9da1 frame00000241 +dfe229aaf405778b4ebc359c95904b62 frame00000242 +61fbac3d7913162a961e8965a4357be6 frame00000243 +497b378ba02ab7f00e4c41ff756f1e09 frame00000244 +6eab7c8557c99bf74f95c4b3263ba51d frame00000245 +bc8185413d4565a3a1a3e2cfe0043b86 frame00000246 +6758bed67e55581a90e86cafb1f16275 frame00000247 +cf7fe153764f8fd77e9fcbfba92b60f3 frame00000248 +685bee02c90bcdccc186a092faec0610 frame00000249 +ea05f83bd19b99823121be8be25f6e2a frame00000250 +5e9600a396824070eb1c13e3d8da0775 frame00000251 +1c6f6b725436cde64d84670e586a0408 frame00000252 +23002732854f2931b5a8584d79a99229 frame00000253 +91f8729dfb6a7a8b41d336d55bc32046 frame00000254 +b910a3daed4346d7a94f926470e95079 frame00000255 +3b8095f3768dab0f7e9bca317445e773 frame00000256 +bccc1cb179877f38459673e62a72eb5a frame00000257 +650fc490569a6858d3cd0d7d2603bc19 frame00000258 +3d806a005d42cf8e4c5bb098c2b41aa3 frame00000259 +358c439a9339baa33f34826c15192cc7 frame00000260 +e4d0dbbce359ac2f78b6eca2529c8ffb frame00000261 +c867dcad14d6378a7d9167adad3c0f07 frame00000262 +8f50f27797555078428c13df0da396b8 frame00000263 +673e67e281e2b1a9aa2290c550f83534 frame00000264 +d1f6555bdee53d6e64c7ea55f4a06d0a frame00000265 +5a6ea8c6cb3c2b1ddf0af3e94123540d frame00000266 +3f9042020bcde39853f0607c74907bcf frame00000267 +2fa7ce5ac68c1ca0645f91a0c7f83afb frame00000268 +8d1770be7f831b9ed3bb94c03314e34c frame00000269 +f81268f5043c0d16e0019f7b2f9a1d67 frame00000270 +c9e99a5e1b5cc2ac436fa08e89a1c679 frame00000271 +fe77b9643c8d8c627fa1351c51825fd1 frame00000272 +3aef170376e58c52a0410c8ac0a4394e frame00000273 +a6812a67159449977555a608d43bf3c8 frame00000274 +8b5ee43e5b1695ef6452ec5e72774881 frame00000275 +03953737ba79acfe7608aa31dc136edc frame00000276 +bd9769ff239861707bdf6e13b56c0d80 frame00000277 +9a5af6dad8ce54f7ead3ad3af6d5f2b2 frame00000278 +54150297aff537db6877af88bb8e23b2 frame00000279 +ed5fddd65d7db41bfb0f0ca99ae3b5c5 frame00000280 +b52ca766f779dbdb7eff4776292009b0 frame00000281 +86db9b60caf624a43918d12f697ecadd frame00000282 +59c136c8120f4fdccc89b726a2b7b0a7 frame00000283 +b48f75bd4bb549ccd8e0f8224bb06163 frame00000284 +fc7159f61d29868aeb089a84067ac773 frame00000285 +41386782cef8792c4b35f40be91e34ea frame00000286 +235cb65a7d121e7732098f747d248c32 frame00000287 +0a20c8eeb771b19ec6fe752cee977ab2 frame00000288 +acde9e2e96ab0fc2df2ff382c6c3f175 frame00000289 +cd917c560c3e079e646a3316a8a08889 frame00000290 +6306a8c1b76e8109f83ce1fc57f6e6cd frame00000291 +e8eac6d2f7da6b3b6bc0f73a95bcb432 frame00000292 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABAST3_Sony_E.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABAST3_Sony_E.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABAST3_Sony_E.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABAST3_Sony_E.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,18 @@ +55ab5fb5e9e68b799a93132f582e3447 frame00000000 +4e853ce58c09b5c78cebf585382d6d2e frame00000001 +d134f35174b135078bed347e8874a8b5 frame00000002 +4ba512799efefc3938d4e527ee019316 frame00000003 +c680f239d223479055bbbbf5b0476150 frame00000004 +3bc482c3e6a5638fc6634c859507eac0 frame00000005 +5ad787760ae1b31ed0a0b91a63848ffa frame00000006 +62b7e8ecb385985c06ced144245b2368 frame00000007 +1b3ed7153fb2a43f7e67fb80cdd8b459 frame00000008 +7083d2bd5db432ddd563ef1d90b9c64c frame00000009 +fe1922c4d7c76be22328f7e323b2e79a frame00000010 +8a92b3d9173317f9f083510efb1d4401 frame00000011 +da7be6c0ce8c4315fc50e4e1e1ed96e9 frame00000012 +1117e2bc58b0cfb643aab7107df6da07 frame00000013 +a75578970aa11063f0a355999d432f28 frame00000014 +4db6af59a8790873c7932365f864ba14 frame00000015 +df401c09b9209f67f9817a9504869ca9 frame00000016 +4cc23a05338d266c09c4fd89cc620fa7 frame00000017 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABASTBR3_Sony_B.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABASTBR3_Sony_B.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABASTBR3_Sony_B.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABASTBR3_Sony_B.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,17 @@ +55ab5fb5e9e68b799a93132f582e3447 frame00000000 +4e853ce58c09b5c78cebf585382d6d2e frame00000001 +d1c0bbff3e6ab2dca9f7d1f783b6e759 frame00000002 +ce90aabac8ea0be2892f5464ef03d866 frame00000003 +c680f239d223479055bbbbf5b0476150 frame00000004 +be230404050a8cb93b40a019ae071238 frame00000005 +2acad2707e9bce3c027f9acd42da1dbd frame00000006 +418118de5d65388313fc45b9e61d21b6 frame00000007 +5c1b1421ef47aa838c4e146eddd3117d frame00000008 +de2b3736610b18458138e7e0bae0b426 frame00000009 +2a5174908a089c66de575e36e12503bf frame00000010 +dd79bb8c09d1702b548faa29b6c9b6dd frame00000011 +9a9c22b2b3e268e86b9f46ea93d9029b frame00000012 +1117e2bc58b0cfb643aab7107df6da07 frame00000013 +9b754828d3917538c3ac2466281baa69 frame00000014 +0c7d270bc3131f318a6edea9a5000c18 frame00000015 +1e59ae1304730067311870cfa3f29c88 frame00000016 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABREF3_Sand_D.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABREF3_Sand_D.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CABREF3_Sand_D.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CABREF3_Sand_D.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,47 @@ +cea5e2b1849bfa6c3ee343ec8e68181b frame00000000 +586541a43c9f7a0d8784694e37d496d5 frame00000001 +4b782d6e4231b69916992745fdb8c2a3 frame00000002 +fbf2303f8e46fcca9aef740496a479b9 frame00000003 +20f85333c8b0421abf4840a72521f08c frame00000004 +65eb34ee01db1091af8e37e7bf2f6376 frame00000005 +5cfe51d8082d853fdc348f2e2375bab4 frame00000006 +c0a8bf6bd3f982ccc2af9e9784a261f5 frame00000007 +fa44b68fad08e80497aaa8208b066691 frame00000008 +7bc450545f82cc88f431e02c4fbed9e7 frame00000009 +d27f6d099ca198dad1bf389b6674215b frame00000010 +9d52d534ba94b067b738da69e9866e6a frame00000011 +1c7d9e9d4b5dcb370defa17cb3d86edf frame00000012 +a6a683c3de93d04fed6228588626238d frame00000013 +2c0d79fa3770045b5daec522bc3d2e20 frame00000014 +82ece278555753bd5469791eb7cc1f68 frame00000015 +7c5595abd92f2d01d5a545e6e5119d31 frame00000016 +e7f2cf1e2966f7cf536c4b2d5755c5ec frame00000017 +4437dac48c9e78ff2a416b87e34a6c9b frame00000018 +0835a8839d42c8d2d933398ac44c51de frame00000019 +408525ca8c5e1a8ecf9c0f16eaad406f frame00000020 +098b59749427f40458986c7c604505be frame00000021 +8abe6483b302d34f5ebb5e8265a024df frame00000022 +8c1270ce8c44eb916b9b6ca241ea4232 frame00000023 +f4babc990d5b5fc6f69ef0a9656f23ff frame00000024 +6bed6666b089d7f88915ed1432429c31 frame00000025 +8e179df129c09f9abbef368d7396df76 frame00000026 +5d5910976c0df74bc7f71486c4451552 frame00000027 +f1d26e11311a9f75592467856f2bfc3b frame00000028 +c5e3497531618f86db811888acdb4e99 frame00000029 +e80b5021f121a691dfa7035dd407a22e frame00000030 +681e895ce6f938884d4d3a7db1100c14 frame00000031 +7c592d368a41b026d186dff079dfe903 frame00000032 +c76cc07a294529d1dfd2ad6a62891c6c frame00000033 +ae7fb928be29c97118f85f1f0e9bd13c frame00000034 +572f8872846457ce10aa28863a3512c4 frame00000035 +eb43c0f653ef02631a544a762a0cbc1f frame00000036 +0ba6f467721e8f1a15e1e32dcff80459 frame00000037 +78416aefeb00d9f1c4f6cef4bf4d86cf frame00000038 +9742b76cb46b541df66e1f4ab82ed5fe frame00000039 +91abb5da629a011668815c3542b4079b frame00000040 +3facc30428f12631700f2b4c4b169344 frame00000041 +3678d81c601d72bfc8da81185b74927e frame00000042 +45e9e9da2154cc0e8864480c86a3b35f frame00000043 +f9238a1b181320ef5adb29def7ad3ae8 frame00000044 +5228686f9a43c9385dceefa98ae01f90 frame00000045 +d9c0f422eae59614b229881aa8e16789 frame00000046 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CACQP3_Sony_D.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CACQP3_Sony_D.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CACQP3_Sony_D.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CACQP3_Sony_D.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,42 @@ +7eb43f151518da44b2d4aa35b40163b1 frame00000000 +7487dd1cded030315e0a37f7054458e5 frame00000001 +ce1c7b7871f747b483e5f324be11e21e frame00000002 +a1821055069906e6ac5540072f8d81f2 frame00000003 +93325d58471d0fdd93096aca2d797328 frame00000004 +a4f63d92505f7b32cdbf9f7799daf53f frame00000005 +39146a69a98e7566a5444356c8e67a72 frame00000006 +ef4f197118e79d6ad4a06ac077126f84 frame00000007 +ee70ea8e8a9f971978d4007f1110f93a frame00000008 +bf8cf1eb742d33c2c965cc610af82bdc frame00000009 +07dccf8b6d70c0d5b869a3177c9ac1f1 frame00000010 +e591473b0808d55cf348af575d8262b7 frame00000011 +cf3bd74fcc05040f8df39926bbd2e88e frame00000012 +1cb5fd1fca80c40ccad02bb571ed4587 frame00000013 +3c2a95365075a57b92e8345ec003570e frame00000014 +1dfc2b03307c09890abc6c1c80d3b46c frame00000015 +5c331749c9ee9154acac975517af83dc frame00000016 +0cb21474bbd6aec19b2e07446bbb093d frame00000017 +218f0a45f45bc27783ccfc8396e98748 frame00000018 +e35b28eaf0c1c620e1e04951f3092c83 frame00000019 +796d1556fa1b556a78edc21c4fd19e64 frame00000020 +f3e66204cfb831e949f0c928eab8474a frame00000021 +8e1257a00083fd751da3ce1aec06bebd frame00000022 +bd6e55a448726459e52175e72407e960 frame00000023 +f5cc39522ff904dc03fb5f7902219c8e frame00000024 +93e8724abb8b3ecf0a46d6fbd05ad986 frame00000025 +e1464edf88aaa899551847ed1a89a427 frame00000026 +e1face8eb4ecedaddd9030ad4b869542 frame00000027 +1efcb26b8d452ab3f3e71919b8def8ae frame00000028 +4e9a3a6fdd4bf1b152f02abc89c20d84 frame00000029 +87e6e40677ceae0ef4fd437d42497955 frame00000030 +5e51cce4a202bb0930307461e1df2802 frame00000031 +ffefccf0d4738cb9630000bc01b7ea1c frame00000032 +b9baeca4ad27bbf834fda7b3e176c045 frame00000033 +cff2eb0c6fa117ffc82b17c1a0935ea1 frame00000034 +b59e4db5c1233f465eaee31b3698a25e frame00000035 +e4bd411151b56eb31f19359cd6a9c013 frame00000036 +d9748bba2e7b60314ba14526d6c615c9 frame00000037 +15f83f45424e66a545784722ee985486 frame00000038 +42910164323deeb5877fdc183605eefb frame00000039 +d153a55349cfa24165e81babfb643009 frame00000040 +2fb8f9576526a8e848acd36f2058846e frame00000041 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAFI1_SVA_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAFI1_SVA_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAFI1_SVA_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAFI1_SVA_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,30 @@ +e08d5bcde99cabb731a47e689bb58ad6 frame00000000 +93adef8443eb0d60796f34781277bcac frame00000001 +a5505502c028801e6ba0a0887d43a41f frame00000002 +34f773fe4a66ed10a5094c6b880fde36 frame00000003 +ba2357aefd5ffb60add25b57feeb3604 frame00000004 +4a520113d72c268611410a1ef5866f72 frame00000005 +2d853b6309067c23edd3a936464db462 frame00000006 +8722127ec2e511e42ac91a6314b80116 frame00000007 +f2eb5f4ad05ae48f528416d12e1890a1 frame00000008 +da6b5adbc96ad926f59cae9928805b15 frame00000009 +a9d2c8dc2aadd569e4c777a06883f69b frame00000010 +c68e254abb00d8b2c15095aab850f82b frame00000011 +b56c704f48470c0f3e82db573eecca5b frame00000012 +3ed9f2b2e009fb9fe19b9722e0722681 frame00000013 +95621c718fb613479ae71e08aa0b2f34 frame00000014 +4c40495d3f345c099cc8f49cb1e359b6 frame00000015 +e1511fca61da5ea029d6f02568c8cd34 frame00000016 +b1f956c25b88b7cc5c699f4944a9e295 frame00000017 +96e0ad2712affdc99bfe9a185253b869 frame00000018 +9ae5d5042081ea26ea3bf0cdc6c57958 frame00000019 +8912c79fca79921c8745b7c8d684979b frame00000020 +83d1060170735cfec5006f107520aeb8 frame00000021 +8be9fa53fb2eec2692ab3ed1d84e6ded frame00000022 +a6c02ccb3c2ed8018cbfe6058156a833 frame00000023 +7d240c7f48e837c9a7cb7c0a0038e9d6 frame00000024 +05a26a0e7fa0631efb6481b4219da866 frame00000025 +df91f6d274ccae22859e6a620fa51f48 frame00000026 +f6ee76f33ebea9791fded8e08e89a9e1 frame00000027 +b7aaa5d75b57ecad210e6ae38ea0c9e5 frame00000028 +5f1e7f923122bbb872ab57295772a584 frame00000029 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMA1_Sony_C.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMA1_Sony_C.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMA1_Sony_C.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMA1_Sony_C.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1 @@ +ce8efe91f2e9bb21b668f5830865c446 frame00000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMA1_TOSHIBA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMA1_TOSHIBA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMA1_TOSHIBA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMA1_TOSHIBA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,83 @@ +ff51bc1b823219d7070f7fc3d952071c frame00000000 +e18af2982b5a2b1faa1a3d5b715922fc frame00000001 +83ddbea48de52d53262127bda0842766 frame00000002 +0b48c57490d43259b4faef0efbf9d002 frame00000003 +2754ea35430978e5b14b4706abd09b8b frame00000004 +4f9315cf18963123bad36048fbe607c7 frame00000005 +21e069393dd65d526c1a0c771a54feee frame00000006 +cc998aa2eda5c7cbb700b8e07283030d frame00000007 +d0bf43c91db9eccec6e2857138620565 frame00000008 +d9d2d5e8f5af6c0e398bf6bc1a39e62f frame00000009 +85804fc5c9f4abd19ae6b558d9fe129b frame00000010 +af6b221665901d0f40cd84aa361e1aac frame00000011 +a8d9e1b788d6c973eb7124d79565f57f frame00000012 +47fea84257c1deca7b164ec6898cf6a3 frame00000013 +843558cc806dca3f069e6f0a8e8425ee frame00000014 +c7162cfa518496fd2210fea32fccbab6 frame00000015 +92a0586472183053bb14d6e7135a9b8e frame00000016 +c5df4ab72a15325aeea362ad98352294 frame00000017 +ef02d15319eea40905065a2f2e3e6c6d frame00000018 +fb4be382e451306b65b4228e74a8789e frame00000019 +83d690599e88933cf1bf4b6ce313f2a5 frame00000020 +05f1b4cd4786d40cf19580d8ac8d6a41 frame00000021 +1f3a7a5c5521e9a262dfe957ffaf6a55 frame00000022 +2a77ae187cd7994e64ac93ee4701e9bb frame00000023 +52298f5bd5e42e6ccb6bfe4cab4efbe7 frame00000024 +8e17b333b255eaef61e643ea63d13d79 frame00000025 +04a1dfda179e56453affb2124cfedaec frame00000026 +08c7849aaed2cb1076b7a54cdf274bee frame00000027 +be05d0e6e9c8dd3e772c66fa7836c74c frame00000028 +d03135940b4d8fac7fae44696ddffacd frame00000029 +dad69e6ca19e630e36adf214f42a03f2 frame00000030 +8874d42f4837c630204504fc87be8a42 frame00000031 +08ba51b4093d57419903f88b491366a6 frame00000032 +940b5ad294522f17586fb43e131caa90 frame00000033 +4e22345b4247b0a79f678df5dafa5a4a frame00000034 +b00ad8c838f7b96708bc9e4cfbc1d53b frame00000035 +7d0e51708c7ae240620ca8255c7bd846 frame00000036 +dec6fe3f25efc1fa1432eb80eb5d524d frame00000037 +9ffa736920a7ebcb717e28a1ee9c9bf5 frame00000038 +a7c57ebbaf122371f88992f3358e2f4d frame00000039 +af08a4271b97655065d567889c4da9fa frame00000040 +36b5a0f7174bf7b36a3bac377ca8aece frame00000041 +bc8c68e6da6792f471519d31a5e14dd4 frame00000042 +4b03d37670b048a2f2c21cf82f8870e7 frame00000043 +6989ee4ac75daf01b59228d64ec7fde4 frame00000044 +3324b191ac6256d475fd26f73bc1ba63 frame00000045 +bee7ed0f03134577b5a7dd5ff0da42c5 frame00000046 +884681853b2fce14fd4718de8a657e3b frame00000047 +2abe4a214c8dc2bef40b34fefa067ddb frame00000048 +62db2a3fc1e82342f4a0b2139399114f frame00000049 +158da9bb3cedfdb39a1f14d7b5b96b02 frame00000050 +82f1e84c5e0490ab0532748c9c636665 frame00000051 +139dae54b471619623c69bfb03416b30 frame00000052 +d0878d8ea34f7c7f194c611c5246614d frame00000053 +a33df946849849612dc915aad229fa45 frame00000054 +4bdc6298dec564f136933f1aae9e594c frame00000055 +eea0a758bb08006fa6fa6b7a76319ae7 frame00000056 +36f0f2bf352c013b424cd93eecd1265e frame00000057 +8510aeaa81c9ef56ab17d3963d0d3435 frame00000058 +c6ee22f2798a82868cb090e3796a76f6 frame00000059 +5e8823b6bb54e99fe272bd07f95179fe frame00000060 +13dc6b9f3b277214eb0657117447904b frame00000061 +1f5f95c04e55c211ce090ab28857ea5b frame00000062 +c7ac1c9047ce9a67a1d627fdc689c34e frame00000063 +6486cc5693232ce8aa0afc610c4e00fc frame00000064 +5d6e73d3de107c4a25828aa3a582bef9 frame00000065 +e6901288fd1a1c9ab52c2b24fb260012 frame00000066 +18cc463eac8fb62bc1efada08fa71dc8 frame00000067 +027a86c7c3e3822fab998511df3c2d39 frame00000068 +1ebb071a20ea5f3caf84e38688e20df9 frame00000069 +5de8e757935ee83e502c81522824e16d frame00000070 +3854b7027a3c20eba5b18d1cb81173e4 frame00000071 +80e658d03ca61231ad998ababffa6fc5 frame00000072 +8f23f06110a24f74f062264dd0fe10ab frame00000073 +75728aebf9633d5e2281b364e5d951f6 frame00000074 +6dd528f1cefaed4087f5cba5723cc013 frame00000075 +db06612296ed1d61aeeea7559cf83706 frame00000076 +37613c91cdf444647e81f0ea2190e33d frame00000077 +ba85e4fef6aa2f8b7c712daf2f402391 frame00000078 +6d6deba52a5b6e9d7bd02d58df661907 frame00000079 +4f0765e8fb85c1ff5666e953b0bf1773 frame00000080 +c2f81bea4edd1ccaad0935769fb87b88 frame00000081 +d5486764d54e7d8aa374386f7fcd10e4 frame00000082 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMA3_Sand_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMA3_Sand_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMA3_Sand_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMA3_Sand_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,45 @@ +3234a21fae65cedbecb815348cfcd025 frame00000000 +eb2f0ecfbea3aaf966be6b2960b2e6a1 frame00000001 +fad9df34fc6dc64ff5371a3d3d1e5fb4 frame00000002 +52d68e8ad24c4c1efe173bf3132df985 frame00000003 +43dcd7dcda1ccf7a4ba2ced69c100d58 frame00000004 +16b20c594d5c7e43594532c3b96fc70c frame00000005 +6ba6e22f4edb2011743cfd89a370f302 frame00000006 +5e98b654ab6c6337f08ad0abec0ef0d4 frame00000007 +ebf77f851a6f0abc5f9122fd7de41ec9 frame00000008 +6ddc9f4795d9d4af7d2d617f35a60785 frame00000009 +b0f806ed9d3adb84f2c9aa03d285cc20 frame00000010 +7ce96a37b96e05a79f7a886a56663336 frame00000011 +3bf165d4ff4a9f80e8e09fee47d0e7ba frame00000012 +f6d1a2ef84563933674de5097d6fdbdd frame00000013 +393bdfe0f036bf2bda42c33cf25a4135 frame00000014 +9a0762e78d5e7cb8e496bf6fb450fb64 frame00000015 +947190e21357e70716dc283c17ffb226 frame00000016 +2cc9f3859b01771fc9849c73c09ff0b3 frame00000017 +42d1b2a8a879d63b45b9627996423081 frame00000018 +520e7ae98ce2c1121a57293cdfb783c1 frame00000019 +29cb00e34641f9e5868080965f4a99d7 frame00000020 +47f380e95ca0e9c713bf754f6434eb60 frame00000021 +7d29be47ad022bdc7e38debafcc2c062 frame00000022 +6fb24810b0aad35e138934634e25de1e frame00000023 +68fe84f49676cd15ad100133c89f95f9 frame00000024 +d08a5c71b65f3a701b222acc88b95dd1 frame00000025 +1090d914bd670c80f0fc264f9a30c918 frame00000026 +18130e23d9d761ecaf3d67925977d9a8 frame00000027 +09a10e6b3170fbd92ba6e9356a9186b1 frame00000028 +c4aa96dca0814fb8c2c7ee242c11df6e frame00000029 +52f5f38615e90ca10701f9a511f956ba frame00000030 +147d49d9930c77e4b1d235f7d86fdd2d frame00000031 +6dc544ad274b5cb623af39f52d8fdc87 frame00000032 +92d661a630fcb609a1a6567044a834f8 frame00000033 +2d7e1f16e151608c3b3dcba962f7dba2 frame00000034 +4944ceb21287cbb8078b77ce05373a8a frame00000035 +a0ce364656f548403b88abcc24c5daf3 frame00000036 +0176ab4f3604a885e2052e00c189a0f0 frame00000037 +c2fac0ae0f8dc2ff58770893d5645097 frame00000038 +602c2ef3fa43c45168c2fe7f6f15ac2e frame00000039 +fb2f70616b70a53f60b22fedb487960f frame00000040 +928ac15edd951f27c86abfbfed5d8131 frame00000041 +58403ffa447f173a49bb1701eb3238e6 frame00000042 +bbf9d989785ad651ec60ba1177185ba4 frame00000043 +748147d10a625cfbb4af800711ad2e47 frame00000044 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMACI3_Sony_C.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMACI3_Sony_C.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMACI3_Sony_C.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMACI3_Sony_C.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,9 @@ +cc4f5f72e34ae3bb8f3b33e332d676d9 frame00000000 +285dca292c27b1cf03a0fbb581d4469e frame00000001 +16da33f8efafe3da01fb29a2be273925 frame00000002 +4a6db8b9888b8a7306ad2ce067485f8d frame00000003 +ecb7f1d010296193795f36fd7dc8b635 frame00000004 +91e64a3e9eb3fee9401f84e43904abae frame00000005 +5fd46d3153c8d39547b0edda78a4beaa frame00000006 +fd031c97b6a51f201334298c9ae4eba9 frame00000007 +a783f654f4c338e402bc0e81c214a4fc frame00000008 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMANL1_TOSHIBA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMANL1_TOSHIBA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMANL1_TOSHIBA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMANL1_TOSHIBA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,83 @@ +bd9e14ce912073ea07c8e743407a1d08 frame00000000 +32b546ee08f50f157b97e022dd63a0e7 frame00000001 +4107f81ced2b8ecc978e1b18a9d9bdda frame00000002 +84da898988df090074d4b7d94836b3d5 frame00000003 +8b2d7ee81000165982716f2e5272b0a9 frame00000004 +2d395840169131e2a0ad2743839ef859 frame00000005 +83c4000cfca901f0c1c0534e5fff52c3 frame00000006 +85f9f304cb1d38ffb623bf27eb238e0b frame00000007 +2660a94e23c7219c644d978eb62cf389 frame00000008 +bf01097bb8e7d0acd76928ab2ed160dd frame00000009 +bca65e753a437ab005bb010876cbb258 frame00000010 +e53c4d813e83b9a650438870437eb4e5 frame00000011 +2be72bd4f4ee861c91a004f41764ecde frame00000012 +aa4c19a26425281236621d14176f83b5 frame00000013 +16e030aa9c92630caf507899fcdf76e7 frame00000014 +4baefa3bf5cdadc891ecc8a5137a989a frame00000015 +616764c63ef00f655d8bcc3aaed81ad1 frame00000016 +59f83d53985a0dc224ac9c866f79fabe frame00000017 +c5823b9194851dbd8620c78ad93ea4eb frame00000018 +a839384bbc0d92df3518e057b4d12dc6 frame00000019 +ee79709fae845698ea572dd079f3fe09 frame00000020 +65596d898bd7d33f06f21283c5d5d3c0 frame00000021 +2ccc747bd30e8f61fd9a5584369566a4 frame00000022 +1d8c7e6407520dd503303ade8a330c0a frame00000023 +983ee5e8f3d49b7dedb44db2686cc727 frame00000024 +6dd672f9dbfe058bbd23d835f28cd657 frame00000025 +326d0eec0f2f53d3a2ec00c873970081 frame00000026 +641fe0acaa9c7ad94819c09c3a52db6a frame00000027 +2580250a67197f0049459d584a731df7 frame00000028 +ed77afa365ce7dc45d382d2e6dc3c0b9 frame00000029 +4047a89fb2cf07d8ac70bcf8f4fb37ee frame00000030 +d7e73a2693b82e1619969f12bc500f82 frame00000031 +010fc19bafc2d848f02d7e40ed3dceda frame00000032 +5994ab7cd15ca3af09c412b7195bd611 frame00000033 +a662f3d2c8c6913705d6b23eab66260b frame00000034 +4f6bb43477ef8ca090b54b837f27de2b frame00000035 +330f429d8b9483c24583f53588da5a92 frame00000036 +d4ee88a84ad17d8cd1f88bde3f6fabf5 frame00000037 +7e1838a082eb13a6400186a0a08a3673 frame00000038 +b0c10b9320f1ef0cd4734f7c038ce5fe frame00000039 +6b1bb9f7c7d02d467e16c0c3d08fc8af frame00000040 +52ab4fb29a5a15e6ad4439a7dac70d8a frame00000041 +411001782c8180925f86927de1d9ae90 frame00000042 +697d8062929f744e3a87f4bf3008b6d4 frame00000043 +6a9003a98c9ac6a2fee7793ff709285e frame00000044 +8090d351fb49926e1fbe78a3cdc97b60 frame00000045 +28d67a06fc9055a2eeb23b9afb958fe3 frame00000046 +12a1e9737729ea083df998383415409d frame00000047 +404f78b1e42043323a7a8a4965511ee3 frame00000048 +75ba270d5459106320c511262353e6d2 frame00000049 +2f693ffb80ac9252e78f9d22506b9689 frame00000050 +a11ed26acdf18a43c5f1db01cddb1817 frame00000051 +48138b16915d0879b46fa4c45b789963 frame00000052 +98665b172c40cee96fbbf6b1608a1d23 frame00000053 +61be9d4900e76cea0deb192bbff83f1d frame00000054 +ba3231809801af076909661ebb1fe758 frame00000055 +dbbb708461df12f56f08a401e448d9f9 frame00000056 +3e29f6cb033eeb075830b05c4e97caf9 frame00000057 +e4e7e2be3780f938b5a3002007138a8d frame00000058 +2c76320e138e630e9a22831d6e9e1bf3 frame00000059 +bbe61775bb31116bbd2ce92c60db55a0 frame00000060 +e8e87b62f60039b0e6ee1d30a2664780 frame00000061 +312a5e84d58b2eb6fb9bfdb3b5c6d598 frame00000062 +9cd2bffdaf25639caf638772c066020c frame00000063 +599dcf956b4430404fb5ec1f9b0b762f frame00000064 +8ab1cddee101ff776e89244f548f3284 frame00000065 +05fd31db95f2e0c2a17e7edc19e60c52 frame00000066 +7f538c40310aa5175738fbad2be8b18e frame00000067 +ead78f3d315b055bcf82a79ae34ea000 frame00000068 +9c926854da2e6487574ce7a5d0c63ed9 frame00000069 +ef9e9cf0643b5fe00987ba97893de14e frame00000070 +8aa4d0947ec67ba988b130980878a9e6 frame00000071 +6e6b578ef5bee3bc8b95370f6286d398 frame00000072 +fe9d2206284685d14bec109f6e6c6fc7 frame00000073 +24e9b644654d3bc164cdb97b20b69e59 frame00000074 +f5a2352cf782437f65dabe99c5d10330 frame00000075 +c92c5fc7912a7e3c477b325c442d024e frame00000076 +2b02624c19df8a32a947c547adeb3f4a frame00000077 +1915945664b6c6adc730cb593045c2de frame00000078 +5dd3cc17331c5dcb0964542dd168cacb frame00000079 +478e09f20d8085bf77cc7217316da18d frame00000080 +ab93a511952f5e198bd255862eec696f frame00000081 +10afd9ebf664803bd67e63397d88f296 frame00000082 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMANL2_TOSHIBA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMANL2_TOSHIBA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMANL2_TOSHIBA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMANL2_TOSHIBA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,83 @@ +bd9e14ce912073ea07c8e743407a1d08 frame00000000 +00d9b78800efa2e80fba52f048861c50 frame00000001 +eaf0a4bd76976cd0e0f02b1b45b134fc frame00000002 +84da898988df090074d4b7d94836b3d5 frame00000003 +16a4153f31125d7182a1f7288c6e0bb5 frame00000004 +c519e48328843bc54fc257eebfe4e479 frame00000005 +83c4000cfca901f0c1c0534e5fff52c3 frame00000006 +bc2e7dfd85a5d7b0570458f02111cebe frame00000007 +4f6b648ae5e1e0aeec06c1bd00dc9c9a frame00000008 +bf01097bb8e7d0acd76928ab2ed160dd frame00000009 +612602e0d0aaabe8630237f585a631f0 frame00000010 +048888fd23bbc356119925c8ba502d8a frame00000011 +2be72bd4f4ee861c91a004f41764ecde frame00000012 +cf757350a7e4bdf66c3bd4b355329a59 frame00000013 +76ba1a344e859d260c3cdc3070f47ac4 frame00000014 +4baefa3bf5cdadc891ecc8a5137a989a frame00000015 +7efc627d3f61ef5c5779fd4400cfdcf5 frame00000016 +f7e4557d1f79884d8c3649d27e4edab3 frame00000017 +c5823b9194851dbd8620c78ad93ea4eb frame00000018 +55884b7a874249ff18eabad9d9f7318f frame00000019 +88ddb63220e5b00d571a0488774c9035 frame00000020 +65596d898bd7d33f06f21283c5d5d3c0 frame00000021 +9959ae8ee709f73ca352d0015304f9a6 frame00000022 +9595cbc2bba47d6918e524f40a48b1c3 frame00000023 +983ee5e8f3d49b7dedb44db2686cc727 frame00000024 +6969f189630eda15ba0c5aef803c4b9b frame00000025 +745b50e8163a3f0a903bba8f69663835 frame00000026 +641fe0acaa9c7ad94819c09c3a52db6a frame00000027 +7cc74010af04deb11c06f0ae2dc91f29 frame00000028 +584b0a7b37706db9d3fdbebc0f0e9446 frame00000029 +4047a89fb2cf07d8ac70bcf8f4fb37ee frame00000030 +b8e41e25190ad12e14170cb00ae8e5d0 frame00000031 +4d1eec2c619269e62c7f317505a8dc84 frame00000032 +5994ab7cd15ca3af09c412b7195bd611 frame00000033 +cb2f91d1a36beb4343fc7dcc6f356f93 frame00000034 +6dc41e357b11db6abb33b8702b4f31ab frame00000035 +330f429d8b9483c24583f53588da5a92 frame00000036 +5f5ff84e4bcaf50ac27b93ba0d773d46 frame00000037 +c187f200779641db44eef954a5c2b127 frame00000038 +b0c10b9320f1ef0cd4734f7c038ce5fe frame00000039 +1be6e2717aff8ad5970d30cbcc1ad744 frame00000040 +3e66f6ecceb3c51abb0a7cbcd653b07f frame00000041 +411001782c8180925f86927de1d9ae90 frame00000042 +a85567327fd91c67189f1f068ae39dd5 frame00000043 +857dffcd49d07a62baa5856f84644ac1 frame00000044 +8090d351fb49926e1fbe78a3cdc97b60 frame00000045 +f94ef1b18eeac064d45c6a7d9d041617 frame00000046 +93922de0e79819af7363753bd93451fb frame00000047 +404f78b1e42043323a7a8a4965511ee3 frame00000048 +3b9e09a0ba272fc66e3a823e4b01c912 frame00000049 +852cabb52195d28d877e3af74917bf17 frame00000050 +a11ed26acdf18a43c5f1db01cddb1817 frame00000051 +e71d49155ec89ac439c6d365ed29668e frame00000052 +eedb4a9c84144a171a50325114c67a68 frame00000053 +61be9d4900e76cea0deb192bbff83f1d frame00000054 +a08cac3ae32235d60c42e4549eeb294f frame00000055 +563e8e7f8c31f4b0200a23deafcbdd08 frame00000056 +3e29f6cb033eeb075830b05c4e97caf9 frame00000057 +326a959e3be3e88680c5853de5021d43 frame00000058 +7b35456fa5d90ba59d254b382a2d8ee2 frame00000059 +bbe61775bb31116bbd2ce92c60db55a0 frame00000060 +0d229910696c66768ab0bc3cedd62299 frame00000061 +8691be2ebf4f0e452979727bc29d07df frame00000062 +9cd2bffdaf25639caf638772c066020c frame00000063 +3aa3d9c18e86259be565678586ab54c9 frame00000064 +27588c806583182e4197943df03b1389 frame00000065 +05fd31db95f2e0c2a17e7edc19e60c52 frame00000066 +34646e6d8e3869bc5583c6e7c27c1d44 frame00000067 +f12923734ddc6204dffe7197d0914d40 frame00000068 +9c926854da2e6487574ce7a5d0c63ed9 frame00000069 +83c07d0e955626bd199504689c7179a8 frame00000070 +0d43f2a0dad0947eb90339c788705b5c frame00000071 +6e6b578ef5bee3bc8b95370f6286d398 frame00000072 +a229e19530f44eaf9f8a6d7cd2f7181f frame00000073 +1426ac033ac2bb9df1435a8b30ee9ea5 frame00000074 +f5a2352cf782437f65dabe99c5d10330 frame00000075 +afdc9819bd432b5935ca45bee00d8654 frame00000076 +ed518b5eee72d2a014e7ed30339775e5 frame00000077 +1915945664b6c6adc730cb593045c2de frame00000078 +7601ec7f8a4fa9b61b10e6f19557b97e frame00000079 +db51d4d82366073a4f7fe70e034307ae frame00000080 +ab93a511952f5e198bd255862eec696f frame00000081 +f94d699561414ce09a9616ce8737bf8c frame00000082 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMANL3_Sand_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMANL3_Sand_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMANL3_Sand_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMANL3_Sand_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,45 @@ +9bd14a31354ba790f4ab0d612d62684f frame00000000 +f92edd760ea9139b71c3c4cae26a5ff5 frame00000001 +be259190e68b2eba136116ce84e96fa1 frame00000002 +865886215ec9e854b79f2ad6c153ff9a frame00000003 +023b744960e1ed230c3b24b4651b4022 frame00000004 +63c0735ee5180bb718a6b766d6b42998 frame00000005 +5c4f3359141679629648b106fe9d2a22 frame00000006 +21821ffbc74b84e9beb38140db31ab18 frame00000007 +9a3c123418489e30e981ecc49e53047c frame00000008 +ed60c1c9d4895a9f298021a7dd417e70 frame00000009 +ea8dc1fe5bc292d511d1403f1f081bf3 frame00000010 +a51133978ef9243423a4a6c62736ffc2 frame00000011 +1edb595a2650b5e55ebfc88e7916ea56 frame00000012 +d3cd772a2fc924f65539f62e687e6d1d frame00000013 +2d193b30a7eecb17ab61024a761bd077 frame00000014 +14bbae1aa2c08b96f822bca484581b32 frame00000015 +9e06f8dccc586185683b04b76cb49c04 frame00000016 +ecd89f0536560fb98927bfa917ae8bf3 frame00000017 +31204ca95496c197c625d8c1daecd729 frame00000018 +85283863786475c6b437de3089985734 frame00000019 +46b05a1d15d03cc382611015ee807a89 frame00000020 +c09fed10992065f292188e91ffb87af2 frame00000021 +cbebfa12c8d02dd5dc864314b266fdb5 frame00000022 +b3dcabfbba6f0720624ada258909ca75 frame00000023 +7930ed324d82be6e97d98de4f24f2586 frame00000024 +2814bca79a0c26e826a918fbadaa5ecf frame00000025 +556bfd8a32947cc39c6415cf58c1f68a frame00000026 +d12d6a5066f64939623b39b833fe44e9 frame00000027 +5dc7f9da2e8703db7b69d2043b1ddf72 frame00000028 +f981046b1e08909b21671b4a477e2119 frame00000029 +cdaae4a21363e3fb6cea30cc912c4ded frame00000030 +f7f6d4b12f8f9a0fcb455582048e59d9 frame00000031 +b9402c5a029465dd09a0a2f02bd9e743 frame00000032 +18acd1238cd4c09677413ae21adad51f frame00000033 +67d01192659c50925ec42ef096d96ffa frame00000034 +0bc32ebb81e22ef3951c1dfdfa6b85f7 frame00000035 +3785973ec2a96a8c01065e16c5557a16 frame00000036 +7853407841bc44d7aeaf15dc2519f125 frame00000037 +9735056bab97c6425c4bf1a84d3fff09 frame00000038 +e37d5ede5081fe849f61de7082208f55 frame00000039 +1c6c65eb11907a082ce55d9a8be613da frame00000040 +f5e37fc33d4156abf741b6e16f766f97 frame00000041 +4c4d53177f6362cd4d9019eeda4d8e32 frame00000042 +48712b6340f0c532888ddfecd3584cbd frame00000043 +46b67c92f611f8d8a7095e558bfa4bc0 frame00000044 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMASL3_Sony_B.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMASL3_Sony_B.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMASL3_Sony_B.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMASL3_Sony_B.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,9 @@ +61af8e5e54c21077422853dc878bf2b2 frame00000000 +7adfdfea5641ac9f58884284d762e310 frame00000001 +55b94657d5696e64031e6c2e5a59cf8c frame00000002 +a221541845db1a51cca7e7f8e82936b7 frame00000003 +9be116096d4df5afc71434f4f1e2fee1 frame00000004 +76b646e056afd3253a9c4934b6e3e674 frame00000005 +f606326c33ee78d069a3383ab28a0540 frame00000006 +b6584e7a23904904aaaaa2530aa6b42d frame00000007 +c9ac3d9e35c5bbd005392a5f6038d4aa frame00000008 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/camp_mot_fld0_full.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/camp_mot_fld0_full.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/camp_mot_fld0_full.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/camp_mot_fld0_full.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,27 @@ +7d4cb8f8635380a7ecca2f9fffb4e2fa frame00000000 +2b467a7adf574af0894b15dd845a57dc frame00000001 +97bf013094d7e98a6555d485c4d2f585 frame00000002 +e02850c7a91cfddd91a95349b88a419f frame00000003 +b0ba59c8f058419f5c34085ff0ddaf78 frame00000004 +f37f06c11d621545e6908ab88fac8189 frame00000005 +1b941d6376ccfa0266dc00e4dd88efa9 frame00000006 +41779df3f17d1beae685375fc9ecf107 frame00000007 +9e840d8ce78bd43321e6bf7a16525e6d frame00000008 +3e1b48426819e88d1237f29832596ac7 frame00000009 +912cf7bba2c38103d36d816aabb1618a frame00000010 +80ab0891769b90ec6198c005162eee63 frame00000011 +90f69d7416374ccd3ea78ad58c021a59 frame00000012 +e6ed93abfa45ebea494f27a9fc28e5e8 frame00000013 +0e0ca80baaef872dbfd54a10c4fc43b9 frame00000014 +79c190438ff6e1a66bd255afa9bbf0e4 frame00000015 +2e78be5d0e4857e12f28cf86d13d6f75 frame00000016 +1adad63b8fc1355dc8d98c52736b64c8 frame00000017 +584fd4e7e7f546f980d90000023db801 frame00000018 +ae1fca51b649b29392be6cc01d722b4b frame00000019 +7b3dc4fe023716318dc57e18bf7d0b9f frame00000020 +101ee22adaab8bcf3de29ec7a69ba4b0 frame00000021 +300cc3aed82046656d9cf16fecb5ab31 frame00000022 +86ee66c90de9cce1c96d83d3feac7b5b frame00000023 +bd2b940ed2ace1e8a907a45654c3927a frame00000024 +247904006ef0ddc17dda9e35f51877a2 frame00000025 +c2a7899fdfbef80a6e11cebb17ad6073 frame00000026 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/camp_mot_frm0_full.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/camp_mot_frm0_full.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/camp_mot_frm0_full.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/camp_mot_frm0_full.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,25 @@ +4792b13bf4723831230465dbf32be7cd frame00000000 +f7b7a77e8b68fa0244439da18c717d33 frame00000001 +de65df72048d36d4394c18e51b9b9ccd frame00000002 +240a70bbfbe6f3ef3e69c41806d842c9 frame00000003 +56a50f74d42920d9d2d0d7c2403ad0b3 frame00000004 +e7116dba9f8054db55fb2ab8108c37be frame00000005 +aaa3826664d5aa7cad815d4a23399af8 frame00000006 +ef6e14b51e2750e9a388b58c419e4c8e frame00000007 +1a2e2287eb662acf03e9669d75565111 frame00000008 +0bf0316f0b703cba5916e61a263d77ed frame00000009 +e9d07e02b3d4d87336c6ff8616d6943e frame00000010 +7c35db59518683f57bc578c2934d701e frame00000011 +2872bd6bb03658fcf55a81d8ec7e426a frame00000012 +68cc6fc6c747f6233387f5ddbbdb9d99 frame00000013 +5cecb2ff17d847260fcc5792fbd703bd frame00000014 +823c36e73ef017880813a03fbdd1b73d frame00000015 +4cf591c6313748df4b714ff5e2ba2d7b frame00000016 +7f7a2b4e897569cc40b81b4e978ddb88 frame00000017 +8742144c045c30eb3294d710b85591a8 frame00000018 +263cdf4f78d678c9083599cec94f790f frame00000019 +011c83ce436bebe092f6d978ef26f774 frame00000020 +7e0064f066279f6a4bec17ab62a90830 frame00000021 +595a8de4577ad6ee0873a679c55f2ea9 frame00000022 +06affb5909f4e9c0d6220bf2ec0bc0d3 frame00000023 +d349beeec412ced41f40449feba755cf frame00000024 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/camp_mot_mbaff0_full.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/camp_mot_mbaff0_full.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/camp_mot_mbaff0_full.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/camp_mot_mbaff0_full.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,25 @@ +7ccc045e6132aeb7e9d58c6f78e6ff4e frame00000000 +316b85295c978e08b1f0d06cbcf31b29 frame00000001 +a388aac1617bdcd4373719747eb66ed7 frame00000002 +f7460135beb2d262f0cef20e15898264 frame00000003 +10f47e82128d3ed447afbc52031fde1f frame00000004 +f276b9073f8b28a8eadd9a76af004e7b frame00000005 +e66be46a070c660fe7f77f91ade94a27 frame00000006 +a940ec0e4a0c63ca16f4f42805085be6 frame00000007 +eae8ed165f699ccf936dc0883bbbf7dd frame00000008 +51815ad24bf08533113424effa6bf6d8 frame00000009 +68e43462c7ce68c5859d177f419dfbfd frame00000010 +de58aced0677809b0e8ba87b10ffb0bb frame00000011 +c8a4c6c76020d39fd351a866656fac70 frame00000012 +ce7fcb6c3c9c450fcf4f2d98a882ab44 frame00000013 +fd9397b1d5d344bfb958c54527794fc6 frame00000014 +f71304d2ae10ea41d28ff5721a02aeb0 frame00000015 +a71e9ce2ae8879b468d98da79bce0956 frame00000016 +547ccc820cc40126eee55cd523863f80 frame00000017 +09c154aed533194a85e5c3a927d74725 frame00000018 +cf85eddf320a8f697a7db2dc92dfbf3b frame00000019 +029c6fb1d7213d95b44d3e97ae415e8f frame00000020 +86a8289766d17300ab3b3dead9711405 frame00000021 +bbd20d8dfd96ac180c073bcc113b8a30 frame00000022 +abeac91098a7f59fcc3832b6c57a4e02 frame00000023 +bea5c9e0d2ba28f88c261d52531c6b88 frame00000024 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMP_MOT_MBAFF_L30.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMP_MOT_MBAFF_L30.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMP_MOT_MBAFF_L30.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMP_MOT_MBAFF_L30.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,25 @@ +d5ec78104d831647c051dae50162a0cc frame00000000 +d9975be68036f6df31c590a39a25eefd frame00000001 +6e752b81076eb5039d4f2b391340dcd8 frame00000002 +e9a52d51ecbb3b031ce0e67df81770ec frame00000003 +bcc69b775e03afe24ab2cd7249b75bf3 frame00000004 +f977c5e1070399dbeae6ea34222de1e6 frame00000005 +4286c8ebd6a6bc80e4c1cf1c602601ae frame00000006 +74cfe675e206d705159a3286f441fbdd frame00000007 +76b78fe83fecce5f366152104826b9ea frame00000008 +16e4821d0c73d38f66822516efb7cba4 frame00000009 +268891fa372cdadf20153185417150b6 frame00000010 +d3a899f8e5fdd8c32c8a515373d50130 frame00000011 +4586867aaf69bbb59f20328ac924cf18 frame00000012 +a658607ae39f14c13e7eb2063581433d frame00000013 +a201ebd73c4866654e17f24ea644fccb frame00000014 +7fd5b0ffe2c7382476217963e1fb1262 frame00000015 +ff1b756b99e868535250a488d6e6d92b frame00000016 +c0776728f588c50b3650d0ab09fa7635 frame00000017 +6a098fb73781c63ae72877ad2411397c frame00000018 +c235d015c6260220af9bd1148eff5d1c frame00000019 +a7c7f783109f1de9aee331c63f96cab1 frame00000020 +f6517b30540f69887c274811aa199006 frame00000021 +65830937224290e25aa031d01c1fa79c frame00000022 +dcc320fd6783472be07cd0be0b148573 frame00000023 +199697f1045e71e768548f98ca98f831 frame00000024 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMP_MOT_MBAFF_L31.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMP_MOT_MBAFF_L31.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAMP_MOT_MBAFF_L31.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAMP_MOT_MBAFF_L31.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,25 @@ +7790865eabf8b584e9ecb492e8a2da62 frame00000000 +fb18cf50f45ef59d3ec739e734066d0c frame00000001 +bbcc8ee54579a658bdba33f5ca1f3dcf frame00000002 +226fe3194ee2dd8cbe6680decb6934f9 frame00000003 +9a8dee7172927150d6a0c5df54691b91 frame00000004 +67a78fd779188bb7df1db60c8500f9e1 frame00000005 +54505841591069ec63c506d2743b3c77 frame00000006 +d91ab22d6c1eea48cbc0e9c9de80527a frame00000007 +7fd91afd4110cceb98c075b526b5ca3c frame00000008 +64c1212a02486cb7e1cc6d09f87953ce frame00000009 +2df059d60f7b86f91fbe6498fa1dd806 frame00000010 +8f2ea3c92d209ad1313e47d45967aab9 frame00000011 +9235bc117d0dfa991ec0e06527dab4c7 frame00000012 +7fd87b26c5c67aadb1f7484f2f8cef49 frame00000013 +0d99bb575fd6f3f2c555b228634f44f1 frame00000014 +fe7056c063a98297d5d12841af2dd613 frame00000015 +8e3f04fa386527d31a8aace28409101b frame00000016 +3d724d2b403af36b23e4dd9e641d5dbd frame00000017 +c40b2cf8e7c2d27e6f79d2d6f70193dc frame00000018 +537daf75765fbd9e370caaafdacd3e9d frame00000019 +a8c9b765d5878d67ee38a822bf216d95 frame00000020 +01ac6a03de7c205d46478e0692922101 frame00000021 +1ad0e187ca9697c8394a7cdf926f0701 frame00000022 +0a164701007a6d2f8a3884de543afaf2 frame00000023 +c99f97320ae28f69a32cbacf6c32b281 frame00000024 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/camp_mot_picaff0_full.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/camp_mot_picaff0_full.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/camp_mot_picaff0_full.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/camp_mot_picaff0_full.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,26 @@ +373780b7d65d9b4df38dfe19139d50e0 frame00000000 +120c85b89d9c8005e13e1552992315a2 frame00000001 +3f5720b97d75b55c7a9a32d8e64355e5 frame00000002 +49e77cb848e2154d0a44dd1269957df9 frame00000003 +831c35917481956c5a0517f11b62d014 frame00000004 +0e66df428e50c7ce69b2aafab4778b6d frame00000005 +e9a13f7fc4827645b0198fffc38dbc13 frame00000006 +59347fb0ac60222fd4df1da813030406 frame00000007 +2820cdbd30fac9d53a17c0f21cb44204 frame00000008 +c0aafcfeb23a587cbe5ce4f892040004 frame00000009 +2ed3618b862cd4b75f91b0137bf10823 frame00000010 +e0cb77b388385171dfebf9807d21b7f7 frame00000011 +7088ff997290958a684b0b851651d4c2 frame00000012 +b43eb2a8141dba98cb60824bd85521bc frame00000013 +9d421863783fb5f31a979259998c647a frame00000014 +cdeeb5c3fc35d4ce9d8bd40f18d2a0b9 frame00000015 +04e70606882bb7c7d62195fb48abf0e1 frame00000016 +d02169247382fa8cba05fe94ffbbb3dd frame00000017 +31372e8b42f65c8794a9f4e48a4feda8 frame00000018 +e722510dd6058f3216c54bce6c47a654 frame00000019 +79530fa6493218960ceb0f64b2a92cb1 frame00000020 +a612836de7c78eec821c295d37cea1e1 frame00000021 +a2a8b23face52ec81e5b768e8d0d883b frame00000022 +53916f1d3ca8d9c4d0fe528ca70948f8 frame00000023 +aeb963fa9b3a54c6175fff285abe9cfb frame00000024 +42b563c9479503076e69586ec7234875 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL1_Sony_E.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL1_Sony_E.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL1_Sony_E.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL1_Sony_E.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,46 @@ +363d7f6ad33c14d4c2678a0c564e421a frame00000000 +7814640d8044af6d7999ac5fd7a906b2 frame00000001 +0797d2f01e043f601dddeb14b6e8ca64 frame00000002 +7fccad4071577baae05eb6700748a6b3 frame00000003 +d11bb16d7364698593ca8f651f3b81d1 frame00000004 +410f942c647d76d90d1eaf743b26c261 frame00000005 +3fd57daa75ac027ed32c8d580b42d4fd frame00000006 +bc460c718da78be649200b1c6d4214ca frame00000007 +95916e78db303590d2749422edc895b0 frame00000008 +bf5a711fdd7f7d9cd536c330ee8b1cac frame00000009 +9ba00a0c047c1bc76b8605d059f244c6 frame00000010 +e840718f17734b5cc6b92253bc746ef4 frame00000011 +37641dc8891693fa3156f671145a2c77 frame00000012 +d6e7aed573928b3363c92b068bbe79b4 frame00000013 +259e0c31155f6ab252a87f711f5a3edd frame00000014 +d423cac216468813baefdd854cf61201 frame00000015 +afcdefcc727f47d1d0c0b33631297b2d frame00000016 +0bf4f6e45385ef0f666d92a9847a4fa5 frame00000017 +ea04a609a440e822529f9f7b19a31a92 frame00000018 +8ab18ab685f6dd93b5e144b3b04ccfeb frame00000019 +67ad7b30846b7dfa074a224746dc561b frame00000020 +79776079588595212cbf941fa059fca2 frame00000021 +a9d4729c0af2b1e4fac1f4bee866fe04 frame00000022 +4811d5b663e134cd043b1a0af6a61e3f frame00000023 +e885c01d9b184484142bc73879d69896 frame00000024 +9aa0a6846a8cc47973d91ba0b530e326 frame00000025 +84cff54c740e43293772447f592c245d frame00000026 +c9a5ce5b9f11af598a96c39652cb8a58 frame00000027 +20e455c75ac9647f3406d15c04e20568 frame00000028 +db4f31501dadba4ac4234c58b011856e frame00000029 +4916cfd1d626939c88e78776935790eb frame00000030 +9f5c8e97dea6e9a17775d063df1e9807 frame00000031 +766d67bf7768ba350c6c222200a2bdc6 frame00000032 +9de5420d2d508bb564bbd62383c85d6c frame00000033 +89a0d6725ffcd245a090b841366bd780 frame00000034 +68fe0d5504fe61a8a634723db9e9ab9d frame00000035 +d8fabd1c5219c1d81411862095b5cade frame00000036 +552422872322e6c7b27c271514cff656 frame00000037 +dd6466fa080e2c1a852589794ec226da frame00000038 +36aa46d148081e0c31a85b80bfbed966 frame00000039 +1a7a3127f5478592a11b8af28915ed27 frame00000040 +35ab6469d2389233a4e27004ff66bbfa frame00000041 +b958b18519b5e06fe4828851cd760c32 frame00000042 +fb60e2b3ba2a663eaffaacec1d4efc71 frame00000043 +ee29efc72f8602bfeaa3daa3cf421148 frame00000044 +2073ae34c27755641d2cbba1b6501509 frame00000045 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL1_SVA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL1_SVA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL1_SVA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL1_SVA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +3b05437e27cea07099478058c32e524a frame00000000 +9088117bbde8bdc46df419d88a763556 frame00000001 +da0fcf66d49fce3b02ccae9821a94b86 frame00000002 +14c8841fd02b89411fe29e91fe5aaba1 frame00000003 +6069d8a4067e91d55eeb50fe50a3256a frame00000004 +c4d8e3da13d242e651ed7a597159def8 frame00000005 +00c66b1c3a19c0deeaa358fe62250010 frame00000006 +ae98700d5d445b8f3bd7398628228588 frame00000007 +c88c92360acc6177bcc125638965a7cc frame00000008 +961377e7cbe70f31b65fcd6f0ddc99f8 frame00000009 +14e518bda52726122483fef9fe633725 frame00000010 +a66aec069eb298d21764b90bf7d4c93b frame00000011 +3c6ed1f698338877022aee6a5ab914d9 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL1_TOSHIBA_G.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL1_TOSHIBA_G.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL1_TOSHIBA_G.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL1_TOSHIBA_G.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,296 @@ +3f827cd84498da9fce0f15a2dad89293 frame00000000 +012fff5329e0201f2c0c4c027a4a33e2 frame00000001 +ab1124fba809f3b5ae6dd22e33a49b3d frame00000002 +f41c3131f16d5c7d9d5c1fe712d90f7e frame00000003 +c557dfdbfce8e845c8ca4ecdcfe7fcb3 frame00000004 +e3b3fe114b7d80414e5e19239305dd13 frame00000005 +2cf85802b5538a082622bbea4040efaa frame00000006 +34c680b88d43e38c63d37120832ec9a2 frame00000007 +a174a7e3b7a2db82fd7c004ab94e1dfd frame00000008 +ba0272b3b7dcbb370f2831db950ea284 frame00000009 +cbe76d79145aeb4291b2899fdf62677c frame00000010 +4042adda0f11a65498a595c8c285a69b frame00000011 +5b0e2042a92b91d0cb2212e6da219195 frame00000012 +be4fefa751ab72f7d4a482a3ba32ff2c frame00000013 +7d9169208fb84b30ef7cae752218a510 frame00000014 +674a28b43752367a54dffcb442e81bd9 frame00000015 +f73230f822f8690b93aadee699b6acbd frame00000016 +3961100ce1d7d71ca624a3788dbba39a frame00000017 +0550bbfdd2921802fda19f0b4d1f567c frame00000018 +de4dd933bfdef0e646371fc1fe3c0799 frame00000019 +4bdc4e1aec5e690232fb2757920aba92 frame00000020 +f2022f7ca81d52da126a201f3719f0dd frame00000021 +a2b19984d8b719c13c4712fc3da937b9 frame00000022 +950df62703f6834a57816c8c1dc67a37 frame00000023 +9f0722b0983d4bce654e460bd3c7a796 frame00000024 +48d4517d2a2231ed3e9fc6b182110732 frame00000025 +9fff83eada63f91018562b17f57624e1 frame00000026 +c7c61eece6df7027781c51e21b18242e frame00000027 +cd90eec0b515bb7d935342d7015f6788 frame00000028 +9fb8f478e316e2d1369789de72f88a9d frame00000029 +cbcc4ab78bcffccb362e0c139f683897 frame00000030 +82259a31b801e7c8f521a511fccf76bf frame00000031 +c14514d0b3bd482339203ba3409034a2 frame00000032 +ec66ffe3ff60b84f7ebebd4e14f19ae6 frame00000033 +6042ead3b4bb36f9e5279723e377b90b frame00000034 +7b13fbac4677aeaef834e404bd20c1b7 frame00000035 +b13ae8d5247c2f0a009eeb7920c7de3c frame00000036 +27f6701424a40792f5f02f39255fd60a frame00000037 +457a4ec41b78e2b17c43bbc7d48b34e8 frame00000038 +bcd389be091f05e80c0853c5133bd931 frame00000039 +f419fa3d3ba09c9b7d6b2f232eab372c frame00000040 +655006d32eabec413c5e48af48dadf29 frame00000041 +73c10de1fbb6d9016c440978b29de8f2 frame00000042 +81d63ed6f46c487a42a66f3b69cc9f58 frame00000043 +c29449459842bf7822f5b11fa1eda10a frame00000044 +4bb45adba6c3ef3ab73ddde4faf3a783 frame00000045 +02103f98ee407c1599ac019e672554de frame00000046 +a101d249f4661f19a393254b58327de5 frame00000047 +8cb3d8fbcb2326052076e50b1d581469 frame00000048 +e2b7de49ba522f7f4d1f3eeddb3bbd8a frame00000049 +2fadccb3888bc7d193d1dfa1597b0403 frame00000050 +b645f5bc9fddd49ac576b247dbe2c403 frame00000051 +a669f4dd782bab201949613b89361fab frame00000052 +68fb091e3b07e620f8d905d32257456b frame00000053 +1a9461120e3cc696cc5efdbed39a5e29 frame00000054 +bf115d26e28996f693d0f5e0039b7698 frame00000055 +9cb3f0fec02dea15e2b5d5419a4cdae9 frame00000056 +15d5d1047fcece3b106816091c94a323 frame00000057 +eb1a9aa8c6eaba50964395107481acbd frame00000058 +dff3ebc0215a9b8a7b37cb9cfcc51845 frame00000059 +4c3f607a6ff91979b34917036d73f652 frame00000060 +7ef85fc6fcb261ad2cca46fc2663b217 frame00000061 +45eb79b5d357c770dd2679bbb5b5b68f frame00000062 +ec1e8c958d09509818436614dde0e317 frame00000063 +494e9f977689de4c7c8cfdfd74fc35bc frame00000064 +ab7de15c24562372908d650d67865add frame00000065 +cb396738e887e8d46ef33261b5b7b680 frame00000066 +aa6d30e35848b30c5d14eb07e2e14763 frame00000067 +cd3038a0f1a8d4382db8a6822b5b2bc7 frame00000068 +595cdb350651102562db2653889928a4 frame00000069 +12a0e1a8f5e680a14f673ae581b43cc3 frame00000070 +26930b819f218f2ad240d13ec01b582a frame00000071 +9d5427018e39e891dd8e3326b5ab9c74 frame00000072 +3e89f75a9efe4d2f14c8ae289709aa33 frame00000073 +6651f16094695bd8081139ae26168447 frame00000074 +409a0e36bc1f14c13280a50bf5ca4346 frame00000075 +13cd5959965f1fb29edac82ef9aac421 frame00000076 +fdbad607902a655dd11957142e8ce366 frame00000077 +14d2e20eeda74fbe5f97e700c8c3ff9f frame00000078 +104ff51bd1bd1900b7272b2c63d35425 frame00000079 +bf7bae392d0fe1a24d64356b552d646c frame00000080 +131a08e71ab1a11795616c3e4e8436db frame00000081 +247315af6e6a834cf626e8e34323eef6 frame00000082 +a1a000f0b82a9afa884c490378bb7c0d frame00000083 +22675e623ae3fea30618b3f69923fb1c frame00000084 +28536dbb91c50cf2f7fc07d5a78355d3 frame00000085 +4bdbf8f0c14a427b72f221853b774b9c frame00000086 +a02c378cab602109f3bb47928481da98 frame00000087 +d4164a24e5390fa80ec63f9591317e58 frame00000088 +944c3929acf0051bc2d997e8e3af370c frame00000089 +633571a989d7890b0cbf4525d69f9af3 frame00000090 +e8f73ce8b9127756a749ca696612357a frame00000091 +df984acec84b16d5c48760e8395a31d8 frame00000092 +20be59bad0983e9714783a589a021725 frame00000093 +b7d6be96061c052230955ccfa75fcfbd frame00000094 +58b21881e309c5c512acdcb2eed8bec5 frame00000095 +77296c0fe58a145a0b9dd1253f87a892 frame00000096 +b8392e68854efd0bcdb97dbd4ca5afbb frame00000097 +80ff4a338a9771fdecc6be4b89f59a84 frame00000098 +7a2429a14b33d087f69dd18703eea5f4 frame00000099 +a2e77d393809bcdf51db29abded52d92 frame00000100 +44c9673742f3b2d276212778edb91c32 frame00000101 +6db6011e176ada37abc83febd6e98abc frame00000102 +8669c1b4d504d380c9437ea3e0a8171b frame00000103 +a8e172feba1fcaf94691f706f0cacf53 frame00000104 +b822776799f58ed872a24edb237e600d frame00000105 +0d49e297a14d2fb818e53b50e0f2625b frame00000106 +f14fa2b6370ea2a2e9656cb10cbff321 frame00000107 +1cce484ffe40f35009512e69cca0da3c frame00000108 +11de7f9f0d643ef501e02068a76124d6 frame00000109 +d074691cdda95e23b2b97d3d5c7ec52d frame00000110 +baceec5785663dfc4686ae56bfe9f9cb frame00000111 +dd05f243656fbd143aa8bb0d5cc76542 frame00000112 +04bf84212f430ccb0e022d056ac378b1 frame00000113 +9ab569bc6d40340370f6b75436765b89 frame00000114 +dfd9bf880b3b1d197a0de46b2a4675ac frame00000115 +20cc5aa4ea9a942e1c2d7ae2b418f27b frame00000116 +658ac313e6e748e060234bf186376889 frame00000117 +e2b1a8cd5b0b52cf994639f4685f5d09 frame00000118 +af25f4723425f6a689b5b8e7235d4c09 frame00000119 +1c0828ecc72a15236b701618f440ccb3 frame00000120 +c598116b90c3f544d45715d82269ac81 frame00000121 +17e374592b6b81509636e11d6b5abfdc frame00000122 +7edd60c736be662bb33a4a5b9f7514f1 frame00000123 +29dc2917713ac184bac7e93637bce1d1 frame00000124 +eae7b285cd4568a0c8bf7dc5cf45212e frame00000125 +fead1eca01abf6c3316d55cb185811f0 frame00000126 +df0f777d5fd359ffe46a88a6666340e5 frame00000127 +022ae176067cff689a536a59d176589a frame00000128 +eb56191dd867a25bf97cb5c1c5b22651 frame00000129 +3e7ef0d1a1736ff10a47c697c7807bcf frame00000130 +d840f9924b208efbb3138cfb74862e49 frame00000131 +d8b8b2bb4d68d3cb140297bcdafd10f5 frame00000132 +85c0ee77140621f6e174df3ea0fd7723 frame00000133 +1dbf88b24caef4aabf6efb17f69a590f frame00000134 +61da08287ae89960a21a7c97382b6bec frame00000135 +de634e3b3603c4c48e61a0a31ec1ef68 frame00000136 +d5fa1ae317023f0c0e1656f7fd7d9087 frame00000137 +f0f9032172245fe429d8873a20e3431a frame00000138 +0f6b1a62a33d63a0e59fa555c8cf82cf frame00000139 +70303f12cb37bfc1e8934da264f638cb frame00000140 +93fd4e91ea45043a4cf948789facf99c frame00000141 +d36e21c4fa483f078fdc30ea29e59022 frame00000142 +c9d40a4df7aeed3246757d3455c0221b frame00000143 +e4068d799f2d198930af12081382d293 frame00000144 +dcb4d15bcb467ba6919d4dbe47bfa453 frame00000145 +438f0e626d297c9f45e824e3da1c58b7 frame00000146 +29bb63cccf305aaf4182b96ab59651ac frame00000147 +10b09629c7b1742fe21de9de406bc99c frame00000148 +11676e623120601a4f77da01cbcadf6b frame00000149 +dd0ef50c6a9214fa97764fb9739f0d5b frame00000150 +44735c0c2985c7c274ee1c4e4204df2b frame00000151 +bc9eb5b11cf4a5a40679893b49a953b5 frame00000152 +1ad0dd0e873f33e03c1474ca0ed60149 frame00000153 +86f9672f0e53e17a24f438b6bec0132c frame00000154 +32c6ab894881acb49674b5dad4b25ea6 frame00000155 +b1d6680a44adee33471119b4546243aa frame00000156 +46cd5baf941453418794b6af54823e5d frame00000157 +19d3c241deb4eb490b0c83c109095064 frame00000158 +8aee86c17000cb1f2268b485db15a63d frame00000159 +22d1bb174510631d0a1b93fb72b22414 frame00000160 +5ac0a4480bbff210336dd5e46c4cc7e4 frame00000161 +265b4b18f22412bce9ee0f66ecdc9cad frame00000162 +c863882bd5af16c6100663bbba95b67a frame00000163 +041691e4d3f1faaee2364b9ed27dd8df frame00000164 +dfd8e958eb3516b82fd4841bc6e59b85 frame00000165 +18a690d83726254166ed545dbae400b4 frame00000166 +e3bc157ecc9770d3946376495a84e045 frame00000167 +d07308f3cc4c5cc9ff0e347ef364ef5e frame00000168 +3159f826cc6544cab5c4d0a63caaa131 frame00000169 +b3272f02f4256b178af6a598b84569e8 frame00000170 +a90681703d7a720f38f9a9672b2a3f27 frame00000171 +ee327475b44e631b7d1bac33361bdedb frame00000172 +32eb15c8dfba88a39c48dddcf75befe5 frame00000173 +1ca0012bd39d5753de7f28e32f78c6d6 frame00000174 +a9f6d9e8c263509062addb7f9be458fa frame00000175 +d0c0f5dc3916e33703c0a0b21407a9b5 frame00000176 +bf211fe6ec72542b657a9741280ff017 frame00000177 +61145b3c8bcc818b93716356df5ac07e frame00000178 +a709650268bb178862e9b449a6a07a1e frame00000179 +2ebf24fe0029c7f58b838ab6ac289765 frame00000180 +7bee2912db3e628c441bb85c9909287d frame00000181 +3c6b72194db38df5000dc16a4cb495c6 frame00000182 +0ecae72d0e1543aed82026032a1b9fe2 frame00000183 +18d7b66f5c0d3fb26eadaa1a5be0a0de frame00000184 +176baed2f3cb1abae5941c41cc3173b4 frame00000185 +1d0f1d8350fedeccd76ac64f2c57b150 frame00000186 +abf5e607ec913c6b78d5a981c9466b31 frame00000187 +2a37564ab92196c4ebb7698641bc6c86 frame00000188 +ceb5f8a83fd25e50bf7a0a22fe552bfa frame00000189 +9deb4c8a2943c073d417a9fda0ce83ec frame00000190 +75029af852f4b2b8ab6aeb8caa30af68 frame00000191 +4707df486b1afdd8d00df4eabf3093d1 frame00000192 +50674609dd4ab797d2acad68a09482cb frame00000193 +dd55e62bc545503b945425444163fa25 frame00000194 +ed7aeb099c602955404c9cb29da440ff frame00000195 +ad0201f1fb09c092950bee91da1f8d14 frame00000196 +5d4b4030f36f4ae0c424b8f8be424fe2 frame00000197 +e0b9453518351ffd64fdcf0a8a8546c1 frame00000198 +b4f5b31027774276687fbb52c4d9f243 frame00000199 +9acccc469487d0da1742b93e59806bdf frame00000200 +6abddb315585c83046a399a4dcdb30a4 frame00000201 +89c55e7181261cc5ee18fd4d5db490c4 frame00000202 +7ca952761e10c71f86dd1e2926919811 frame00000203 +44893aec87e70304cfcca0404904c5db frame00000204 +d364efbb9668dfd0e082fe60d8272dd7 frame00000205 +87bf1268c0ef8e7810829eb97513915f frame00000206 +0532511e33d3cf41b599d3ab15e24f94 frame00000207 +cb694e90bff7c60b49196544a325d376 frame00000208 +5ecad965cbe7100082232ac63c88a5ed frame00000209 +751c9a853dca0173691ac871e5a52728 frame00000210 +e809f50f8c394aa423e7f4ab7207af8c frame00000211 +2eb9e24a926bf87704e0080f0fae9028 frame00000212 +a47f890a675fc8f2ce699b7dbaab3c77 frame00000213 +6044c0f7d7e367d8605709aee42802d4 frame00000214 +71d04955874adaf7667777a4337818b3 frame00000215 +e1058e8c56db39059c496cd9df930a3d frame00000216 +51dbb5cc7c26a9ab5c2fcb83ae946050 frame00000217 +0e1113b45cd6595446ccbcc459702917 frame00000218 +2531a7b54265e2599060b2f5d85179ce frame00000219 +2278507e776fa7dd6e389750600b28f6 frame00000220 +26aa8ce40ed0996f7a2132d30ccbbd8c frame00000221 +d0f1e9b88783a83b89b040c924f37568 frame00000222 +1cdc7cb56e250267f5904f526a99df08 frame00000223 +29d85cdc6f587387217320a0d220ff20 frame00000224 +7212d4100d5b28d1fbd86f2c6a51ced5 frame00000225 +a1ad2b09f481dbe26d07db71460a6303 frame00000226 +c5697f542d0864e6b7df81d30bb1b84e frame00000227 +c3fc5734e4128f04056496fb55f3ed13 frame00000228 +ec7e16671a923653eed4188e220aa36b frame00000229 +fba69991f16e78ab93ad1229d0aa7866 frame00000230 +0e8de700ba5b4a8528cc87438c226b28 frame00000231 +cfdec1ba795a0b5035ec1c243d121cbe frame00000232 +e2a479059ce88c053b8e342471a92ee3 frame00000233 +5b1d5f039fca87f76492d1be04d686e7 frame00000234 +6fa618194f6b1e4d3c53b9db78eab6c6 frame00000235 +09b5b6230aa9428fd70b32127bf5f930 frame00000236 +bbb67072f50fe12519783ac88b05d3f9 frame00000237 +3deb50ba2cde326109272ab27acc10a5 frame00000238 +e34570aa6e83493736327b1f013a6cad frame00000239 +8dd0cd04b9d3ed79c9bf948aa99b49f4 frame00000240 +9545d346549de4114b47e57cad876d7e frame00000241 +8a8b3e2cb909dd20291584ab0d9e7212 frame00000242 +4c118f55ae3bd990d76cd631f069cb76 frame00000243 +a318ec84f0e24737e3a6d9394b585efd frame00000244 +f13ed9b6cb0d0abd3a9032d3b20705e4 frame00000245 +8621187f1495a5aa4fd77346003f0857 frame00000246 +8df7aba2cdaa4f28236782cf54f184be frame00000247 +877c9b0d59535160a3ebe3a74062072d frame00000248 +f6d72dd26ffd9dfc59cddd1b12bef884 frame00000249 +a2dab9a9df36b8e68db4e8648c425c3e frame00000250 +4f9133030c6455ae3d64cf705b8c2980 frame00000251 +00ae5ddc715c3f1382a3f8d29fd237ca frame00000252 +07c3058a5c60c48ed9e99f71c0d78800 frame00000253 +cf1fda6be9bd659256b902cde121fd69 frame00000254 +56ab2f6f7cd5d974161c22c2a7ad94ea frame00000255 +2d669706f76b13063b993a63e56513c8 frame00000256 +7faacad3620d57624dfcd49da6f7ca32 frame00000257 +c3b6ca36d3e3bb4baaa8edf474852a7f frame00000258 +27037b94472b3e3ee8815ad0601141bc frame00000259 +10d80be75bf39ce36e2749ec3fc5dc6c frame00000260 +fd604bc2e4a063c4d0360e8358d6d8f5 frame00000261 +623b89f17bb0390634c00cea69ba5d65 frame00000262 +9aa3222cc7016007454d1965ecf98225 frame00000263 +03ac74a88c61ab2e255e255d60c584ff frame00000264 +8b93490362fbeebbaee2fcf1227eb054 frame00000265 +0511f272ebe545d441d22076eef3d04a frame00000266 +8fd60e96824e748cdaa58b5f011cafe2 frame00000267 +9619d1f9b024c91c2e21e4961c8ed3fa frame00000268 +237e4730a5a472ac39312b05b0a6a7cc frame00000269 +b69b2356d937164d221708664f9902d8 frame00000270 +a44b9e7fad3f9dc8b5b1d435fe58a25f frame00000271 +a83766fb2ca1a978d8ac234b3176d923 frame00000272 +809644299e6593dcb9ded7c9578d2d4b frame00000273 +05cd182ac066bf51a62537cf1765a5c9 frame00000274 +4124c7a9d2271ced50e668abbd356bce frame00000275 +80fdfabc13d5999f9eeb8ab80d5ea25c frame00000276 +3a12bf515dd8c66c319492f3c6cbd1ce frame00000277 +6004fb4a1df2a9a8b288b4a1776c52aa frame00000278 +a5c85691c215554110b3daffaae4a93b frame00000279 +a4734693fbd138e1d811f3c6bd790b60 frame00000280 +1725f206fe659d89508aa37661e8f8f1 frame00000281 +630dbd27f684539f64697efb7ebe9f80 frame00000282 +8d4e013b3d3e39d5c9136a6ab78bbf8a frame00000283 +7b89201149b12e31c697e065acc10bc5 frame00000284 +79604f2359956a8967953702f1bc44ad frame00000285 +ece6eaeb68f7718f016bedc59a21a6db frame00000286 +8ec29b8f15577acb30b788abf80f3fd9 frame00000287 +9ca931dfc7fd206c069dd558508eec19 frame00000288 +b625c1490b3995f35e676e1f8944fa6f frame00000289 +acb7d92179a5944175eeb7edce26ee11 frame00000290 +b0899e22765a6394ddfdfda42171a3bc frame00000291 +d2cab66c190ec27e7d867d6e76cfaa6b frame00000292 +e8f9760d9483abb4a8badb065e96a426 frame00000293 +6ed642859e317e9c2db82573aea93524 frame00000294 +a808597899b36e883b151f60100bd437 frame00000295 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL2_Sony_E.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL2_Sony_E.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL2_Sony_E.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL2_Sony_E.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,296 @@ +363d7f6ad33c14d4c2678a0c564e421a frame00000000 +fd9e38e5756949f0649fe3c4b7d2cc04 frame00000001 +c4172641cbc2cf9190a9e27aad5625b0 frame00000002 +e79fbef1b84d314f5923ff43a4c1781c frame00000003 +c29331ee3652948018dfd9dded6ba5c6 frame00000004 +1e8aeca3a11740e4e418bdb1a3d5d9af frame00000005 +225bc8343dcda70d15710d3e944399fc frame00000006 +6b5b7e7184bea608644dca6927a29750 frame00000007 +afdffedf781b48a693c94d04283bc2ec frame00000008 +087be36da9e255f9b76329f5705d8fc7 frame00000009 +1d6d95049d304e764e2c0e9665aaca0c frame00000010 +b9c7377eced584651f79834abfd3d8c3 frame00000011 +7c1f6966dc089e489eabec8297c55f72 frame00000012 +747aa2be574aec2bce96754fdc7e1d8e frame00000013 +16f4b1a3acd2f6b6f3d951c624ed3833 frame00000014 +d423cac216468813baefdd854cf61201 frame00000015 +6a7e1fa9ee4179c6695cbc32938f2488 frame00000016 +4ba091b96ed7087b8d0c3617fda7ccdd frame00000017 +d8a4291bf7b3a7d787ae4bc7b6d1622b frame00000018 +5c1a3f7a4d6eeb5c451315278fad31a5 frame00000019 +23866e6dbea04cc87f3db12ab3336efd frame00000020 +d14314beb420a96b98151a865f27c73b frame00000021 +0d6cb54fa5251d776f6e95e17f9d0fef frame00000022 +d72cc0ec06af59d07568a026f62c3485 frame00000023 +095de0d4043a9b5c09e46b518f20fecf frame00000024 +9d011c2a9b8dca15965b65325d84119d frame00000025 +77931974ca46a81c0d93d2a160058c96 frame00000026 +2f31a5f6654ee299d4466677da81b1dc frame00000027 +2cb562cad4c7a48986edbf61c03c4609 frame00000028 +bbe48af29468ca62e30b73f9d6d6fa81 frame00000029 +4916cfd1d626939c88e78776935790eb frame00000030 +2380f7e18fa5c9b7166685bf05368446 frame00000031 +011f9a9cd3c7d4da164bf2941997535a frame00000032 +91c84489dc177303f4c733279d6173cd frame00000033 +f01bb0607488f6e998a4b47db76f5c73 frame00000034 +dca44c5d6e2cf87bfc8ca3994bcbe911 frame00000035 +264980d1377210675e2cfe07e1ab04da frame00000036 +9e300db90f3b4a753c4074843198cfb5 frame00000037 +3184de99d815c30344bba04ec83060f2 frame00000038 +3e3a84440cfe18641810cc6682cf0f5b frame00000039 +ee4ef8851cfb6eb5b693e84ee3a4ffd5 frame00000040 +e71f31648d7c4f251be95dfb4c8e32d0 frame00000041 +fe4d92fa2f5b014269f2e6b069f79d30 frame00000042 +61033da0d971ac0adb70798d6eb5ce84 frame00000043 +76e90ec2d9e603de3b3451c34e6f44a1 frame00000044 +2073ae34c27755641d2cbba1b6501509 frame00000045 +a1ec9ff5f07d37504e5713984170c4ae frame00000046 +b8ee9a0f1f98ad7b56e2ec9aab550a31 frame00000047 +dace6679fbcf20d746040a300d97a341 frame00000048 +b44817dc132c202966bc5e5fc5790625 frame00000049 +f1aa8372a4d25259a6c1075e3fe5549d frame00000050 +10db1c991bcb82719bf7e2e8fe1ee740 frame00000051 +0d8352a041195397091782b5b038f1f8 frame00000052 +9c79bfbdceff59a2a375c1d615526790 frame00000053 +e689ff95d052dd353e7241c273cd14aa frame00000054 +2775a910ca1488f623cb0784c5c8ab4f frame00000055 +c019c23b6662749ac315d1c7fd455e1c frame00000056 +9fbc63818439d073f4c300729fd4f945 frame00000057 +1f8c58505354671d909022ac2f75d81e frame00000058 +24981debe0fc516594a8dd9703357103 frame00000059 +c7ecffb02c950fbd93d6f64d6d564c54 frame00000060 +8da573c3410828bb0625e23e99ccbd2e frame00000061 +e5bb5dfc3e2abdd6f70f111133590380 frame00000062 +c07ebb7b6c85b483a883e16507d68f52 frame00000063 +d2aef5cbe1660138d22a15fea2b971cc frame00000064 +f405ee86faf7ada3ec075c002344c09d frame00000065 +adb3d5238051add33bcac47ba0711c88 frame00000066 +b000bbbe0a74222406b589a4f88fc537 frame00000067 +9d6bd5259439c43fb8fa2ad465f4e9bc frame00000068 +a633fdd30a4970bb7bf23c8ea58f6c63 frame00000069 +8dbcfd2429c2e9c3a9fa1da16aee4dad frame00000070 +2caf547c982bd4179df98a4bd09b7f7d frame00000071 +6071638050d0420829dcd1e8825a715e frame00000072 +a515a02a778d45c32aa1c3c5575adf79 frame00000073 +3c01485885b66c7edfff5cde47c139e8 frame00000074 +9f5f77f0ba5b3cc32888035af2f05778 frame00000075 +5b1d1ec1dbd5756ac3ef5dcbf4bfcaae frame00000076 +4e34b38ad471591b527a4dedd772eb55 frame00000077 +3c64f23b0701baa267645e030db27608 frame00000078 +432febeca28f666c2a504e641a7a1d66 frame00000079 +65bf58cb664c6dfbfe74ae93a02ed446 frame00000080 +3e34086e8db76bf0a5a8499ec809b717 frame00000081 +346d9a5025ecdde70a1bcdb021872183 frame00000082 +953310096c94db41897428130527a63d frame00000083 +a59b20d0579edad27081dd2459320008 frame00000084 +5b59f96cf281df13ca7dbd6b9f2fa7d0 frame00000085 +32e676d3ef5525302cd5965e1c1ed8d1 frame00000086 +a09b01e4e465eaa67194116f5cf7ab6f frame00000087 +e9e3783d42fa506f9afa7ebe542cf220 frame00000088 +f5d324689a2e88319b9d1f9dcb97f82d frame00000089 +211494c615dd2aed14110fd65443cfae frame00000090 +c7780571135f3cc2635d540a7eb7ab04 frame00000091 +0fb00e55aedb9c2a324277861d9245a3 frame00000092 +1f0584efbb149aefaf72d402edf94713 frame00000093 +a08ffb26c5d8b2a594cff02d6fe5805b frame00000094 +ff4c5edc8f7bbfa549c3011f1b2b7a62 frame00000095 +49b8e68c467b6a241811688f6b27081d frame00000096 +b88bde86c07a4909734a4ad7ca4cddd3 frame00000097 +bd2a2c8c1756129cf10d23a1d96e926c frame00000098 +d71b88ab6e989e62239585ca5ada0307 frame00000099 +99df824203809375c1af760ba0cae598 frame00000100 +184e52e32e7fb8dd26b43c433764b47e frame00000101 +423551a7b17defede26d96789b5f7fe2 frame00000102 +293252acbb09eb9aa276addb61d1ece4 frame00000103 +555b3b152a1867f87fa7c6acb6ccaaf1 frame00000104 +e966dbf9104edfcc85ab7852b11e8537 frame00000105 +40d53ee36cd2fef8bb57ddd5b3a9ff52 frame00000106 +3312d09d0a661fe65a9a7285e39154e7 frame00000107 +c61ee9ec7563a75681f3c91851887d46 frame00000108 +05ecf21b917b8ea11896408965a9b57c frame00000109 +18ab3eae49d7488eaee5fffd6ea2798c frame00000110 +08f0f28dcfcbf082487269c72bce1797 frame00000111 +de3ae3cc9950b77a40fcb764e6300869 frame00000112 +73c0ca77e90d69ee07e6633817c6064e frame00000113 +991add623a7be3b6a4968dfd9eb5852b frame00000114 +82143760dfc0a5d7771b0275eab5e94e frame00000115 +298636e748730caa8af1b9f3cf0ca60a frame00000116 +071d3998b0523d35d4fefa157dada9bd frame00000117 +288a43a775f7c4d96fcd6d4566da3b0f frame00000118 +8186c3baf2003f5f3002d77f35630f32 frame00000119 +421c8205a3e8e2a7af83957128d87d73 frame00000120 +7f2f7bfd18c6de201c52d48f441b54b6 frame00000121 +61f3724cb0c6a3fd2eec0b1d67ec6268 frame00000122 +af3c1e41fc9f83e7b8e699e8bce6e9ba frame00000123 +231ce3c21d1ff840e5dca5f63fcd09d3 frame00000124 +ff0761a88c14cf911a6a7251335c0dc6 frame00000125 +990bd4eae7ae4ebc6bca00b66d6b837a frame00000126 +e1978aa578e197e28d01f951e3c23be1 frame00000127 +7801cd106e8e436867471495e6516778 frame00000128 +74b7c9e7d2a1a2856f59d9dce1e253d6 frame00000129 +d7debcd7b64df6ac4ed202a0f1092f30 frame00000130 +b865241ecd116b3eb3df2c1eb393abd2 frame00000131 +329e22b7e651574ce1f342027bf1e2fd frame00000132 +dfc0ccabf72aa9bb0a99d45e0a69349b frame00000133 +cdddd132248cafbba4fbb4f3221e1ce9 frame00000134 +217094cd6311180ccb9558c5629437a1 frame00000135 +1d17e8ec2434dfc7bb3936aee872c2c0 frame00000136 +c4d8dfc6cc801d6def2d39328a37661a frame00000137 +ac66dde7110dfc4138a5328afe4c4c14 frame00000138 +6db27591bd0c332151f6c404f7553d9e frame00000139 +99b06e3850b28c6d739be7b934bee7ca frame00000140 +e86d0889061216e06059e2142799a95a frame00000141 +5cc2e97aa2144a3afd72eafae720efe8 frame00000142 +ae8431a6b2ce0f6e101e1362a04dc90a frame00000143 +568f47f2968407fbcdcee6915bcadb53 frame00000144 +d11450ea6f55c44791f8f74560e95282 frame00000145 +f2b1a315e61ae17b5454f12c5a4c4a14 frame00000146 +29332d4269f78c185f27c0f231bbec3c frame00000147 +f357f01478872bd9ff9972e0ea6f3ee2 frame00000148 +ef01c0a04e377806b4daf4c4192bf5e2 frame00000149 +a418a72cace8fba311715f349630aa3b frame00000150 +35fec5448ddfd0b931dc28b4c75691e9 frame00000151 +59dccbbd0d20973e98dbb0d0005c6506 frame00000152 +75844669ff985f61344102c057c7394b frame00000153 +72651b350508948b41fed15c7e47b6a8 frame00000154 +5ff7f984bba3b3fbe12050fcc7af1311 frame00000155 +284e3405caa041fba33c176aedb5821e frame00000156 +1e1d2031d880521c7a4993fae9e66b0d frame00000157 +b21f12bdf4eb776d77b21d708044327e frame00000158 +b10cae9b1795984d14acc0672a736818 frame00000159 +0faac691ed47938fc3ffbdcff27fe11d frame00000160 +a8593f36d1df2b6d09993d370bc1cd2b frame00000161 +f76dddd0d1901e3c8bf26db6b0708505 frame00000162 +83a8683eb7ecc92ccc1f2e7f51656c0a frame00000163 +6867957ef2aa74718fff23c74a77e2e2 frame00000164 +8f4d812731dd9a4a60fe0d2f94b6d5b5 frame00000165 +20e4a5dc701cbbf5ba48a0e134cc17d4 frame00000166 +1524b746b53d747bc5f438b32141d475 frame00000167 +db15f73f347e5a4000c28e2bb8f62037 frame00000168 +3689e623f8b057bb3372e06cbd05e97e frame00000169 +6cc0054e8cedbd1114dc77468d571ffb frame00000170 +75344980b77046d66c8794ddc1d84cda frame00000171 +e6f469bc000b1bc73f460d7d1949ad59 frame00000172 +ec2893d7364a217f81787e9fa4ee4ff2 frame00000173 +bc9ee8298e769bd3e0c6211ce932e629 frame00000174 +6169f122126a9a2fa4bd729f11430b04 frame00000175 +1966be85f36d5ca3e6273489dcda9b9b frame00000176 +0249da56be76573ecbcf1946b4cd449d frame00000177 +0eb754c01fd247101d0a311b90ad68c6 frame00000178 +3d759da5b80391a153267bdc28ca6a21 frame00000179 +5dd011a0e3b502877979bd6e55b10886 frame00000180 +14a2c146df72170e9762f4272ebec7a6 frame00000181 +db54ba6a2afdd22c2dfaa4d6b4219bdc frame00000182 +f859676bc66ca7a16e56c38cf943dbdc frame00000183 +d2dd0bf187a50587aaf5735fb6d8d617 frame00000184 +6e2946dfbe4dd2e7c4828c5271e0d2cc frame00000185 +e06343e39cd479e17a24dd229c39a2a3 frame00000186 +3c5d9ab2ef5f3798ddd361587e3399d0 frame00000187 +e9e321b5d35990edb7be9152ec4b984b frame00000188 +1713c59438afac93c27053fbde7aa230 frame00000189 +86618450fb50e266027893ba901061db frame00000190 +0930d166e52a001a1d774ac07d2cf947 frame00000191 +6c5f4b343fc6a9d5aa7533b20b955fee frame00000192 +1aa880ad4a18349a73fd9461dbb4f566 frame00000193 +0cb08f5a8e4398b19497f4be838980ab frame00000194 +2ebda34af557b76f48814c6df24d8353 frame00000195 +64e645aa431fa76cab20a8a8b81fa64c frame00000196 +75d0317ae58eab0ee925c1458b1c940f frame00000197 +df7d8eaf5079afdcf135d08bc65b4f43 frame00000198 +f9023a92d01fd86da887b620e85f841f frame00000199 +3cd3742a98935fece54f6c55ccb09ccb frame00000200 +7723fa83cbdae279ea6ffb50e3f55c27 frame00000201 +b44b195f6a54c1ccfab049ed705d3950 frame00000202 +288988824cd255d9e8bd539943f572e4 frame00000203 +3e996b119588b2592577f26825d955b6 frame00000204 +877f3c880fa77e66fdcca7221d1aa905 frame00000205 +18f3b1d61aa2f3430b8610f691b85294 frame00000206 +faa4d81bb8a98f9684f5424037112e41 frame00000207 +fed2b752df8e758f525dd6a152c78e5f frame00000208 +9f12d6bb99cf196f52fd9d83e8a36c69 frame00000209 +02831fc7cebc6d322ecc3eed41e1333a frame00000210 +e8d05123c17d8742c141936c592e745d frame00000211 +0778f7aaacd3ca7536c8f6204667242d frame00000212 +f515aacc39f3939345ef4e6afa852e8f frame00000213 +8d93bf637fad1414f2985ae5956b8273 frame00000214 +b2f23da48ed5b6c326f9ab8f1d480b92 frame00000215 +02a8f0cec9f7d02a8e145d0e787a4810 frame00000216 +9a015a773893e7417831e69a75ddf7fe frame00000217 +7d77dc8c14d276dd356104be805b530c frame00000218 +a07e1d812510616970b77e0e0e91542d frame00000219 +72fa96a9bf2b3a73548775bb9e61c5e1 frame00000220 +a19e90517272e0b5a3aa841bfb6ca85c frame00000221 +d9930185ced921dc8a04eee3f0ea5fff frame00000222 +e22406a74e426026eb2b59c3d19575ad frame00000223 +1ed17e71824b39dbf5c4ac960b839f31 frame00000224 +81ec41dbf102e8a612c5a4755fb934a5 frame00000225 +cf58a42f5c03d7a19a43a682f1a30ae9 frame00000226 +8e7cdd53dca702833673a4717a31d2f5 frame00000227 +2dc629fbcb0c08e758c82f3767ca889a frame00000228 +80de2b4901623edc869f238bb66d060b frame00000229 +6089cbcc87de21bcccbccadb7c7ed790 frame00000230 +ce84e151c539d9754a81bcd4addf0b32 frame00000231 +e33ce1a8680dd7b563123f1b15706947 frame00000232 +ae01b8044ab9ea959d440e2536eff9c7 frame00000233 +f05685aec54a751ea4693fd376000f00 frame00000234 +968396ee7b3d5ee32bbd28910bdd4d40 frame00000235 +8540bc71b60bc348422beb97d965da9f frame00000236 +bb889294b9a19227062102f7ad1f5737 frame00000237 +303008a2d39b766e951b60acb7ea2ba4 frame00000238 +b817d05e0935aee17f6746803abd223f frame00000239 +64df579c1e16dae30c1772dce315345b frame00000240 +35e42ba72b0f7e3069404c8d30c55aea frame00000241 +10f1ce2b5f8814556d945f4f1096d831 frame00000242 +6faf688f6139c9d9c7ed56f05aa3d303 frame00000243 +64ac59b4aaff660fe13f9f5a92ca4ec5 frame00000244 +86b91c99eb8b50a7891372eaa0eb9039 frame00000245 +e6cec3174b523ce0021a507988b154b4 frame00000246 +3e6ed36ed53b4789a9bc990f95a3e3f1 frame00000247 +40779be7ae5c5678ff2713a0e2dd61a4 frame00000248 +9a19a4d875220d725063ff2586fb7e0e frame00000249 +0dcd58a287aa8e96b5cd26db0a441760 frame00000250 +5389769ba2a7e5f191ce7530ceb093f7 frame00000251 +c1b644eea61fba35bfcaf3829689defb frame00000252 +d75e3718fa18ac8df94d3a29b3568e01 frame00000253 +dd4c98b2cccc19c310ce8e8072dda6ba frame00000254 +ec9baa3edf61e50cbc8baf4dd7ed76e1 frame00000255 +8cd6003918f407a6927f2169b6ad9084 frame00000256 +5c2974978d1aff610627127a748ef380 frame00000257 +369767213de740c6c430b79f64220ece frame00000258 +b8468ccfca83f852905de57b5ca4994b frame00000259 +41d1fce01f332d67b1dd6ad9a93fa1eb frame00000260 +19e84704eae939de56da57512f528a9a frame00000261 +b146f99448fe3fdff1682fdff801c8bc frame00000262 +8eca1a8617ee6363cf63ea9c6251a70e frame00000263 +5abea0c93618c8228ee93c61d259e2ea frame00000264 +e771ff84dd3a1f9fb70a22af732b64eb frame00000265 +3e865e63bc630149cbf983ebab520e77 frame00000266 +674ecb30f4d91f133fbb2f070e622530 frame00000267 +aa5913f2c8f3cd995f7cd98a1ddfd9d6 frame00000268 +e99d60e81f235ac4a76acfa78c7254bd frame00000269 +dcafabb535ff43192921e2a82fa8a916 frame00000270 +dbf261b204063120bde6237f61b46ad7 frame00000271 +cd3108634d78ec1e4a5e3ae0613d6fcb frame00000272 +1c41de842b72be9b60d4413dfbf4414c frame00000273 +60dca897d814b2da659ca365f71ff989 frame00000274 +9c4808597b3b4723c7443c633961dd93 frame00000275 +743a1db675b4e79a9204e78f14cd2deb frame00000276 +27ab959f7ce4ea1c666c6dbdafcc618a frame00000277 +6736daa6c2944a79165fedade04bd178 frame00000278 +7726fc8f38e07347b0498903c01e0837 frame00000279 +8327e4551fb96a30903d112c093c20cd frame00000280 +3371f0b5f16bdd06d80248f219dbbafc frame00000281 +d4b0a0ba98426dec1eabcd905e280bf0 frame00000282 +2c30b73329e7c3e5811fc8124ec9d706 frame00000283 +ee416d27898e531f8e8108686177734f frame00000284 +dc453b2a595d3461bbb6b3965f919ab1 frame00000285 +9e2d1c6efcff01a4d0b0a35c398b7c32 frame00000286 +fe2cc1bba07075841c2d074863d821fc frame00000287 +2d154b7fe37928de3a1e25c6556e94a8 frame00000288 +a59172f7d5ddeb079778bb7f30df21b0 frame00000289 +d760bcfe4d95c806f9d1fc81a527cfe0 frame00000290 +44e9c75b818bda4e581917bf68f94684 frame00000291 +fb4f62604395f145ae96c60bace0c00f frame00000292 +9f37d9baa2bb7f04d082b06948f09dd7 frame00000293 +a27e88599365955a9ff1289021b8dc07 frame00000294 +27cdc71e939eef21e64119d54f924bae frame00000295 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL2_SVA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL2_SVA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL2_SVA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL2_SVA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +3b05437e27cea07099478058c32e524a frame00000000 +9088117bbde8bdc46df419d88a763556 frame00000001 +da0fcf66d49fce3b02ccae9821a94b86 frame00000002 +14c8841fd02b89411fe29e91fe5aaba1 frame00000003 +6069d8a4067e91d55eeb50fe50a3256a frame00000004 +c4d8e3da13d242e651ed7a597159def8 frame00000005 +00c66b1c3a19c0deeaa358fe62250010 frame00000006 +ae98700d5d445b8f3bd7398628228588 frame00000007 +c88c92360acc6177bcc125638965a7cc frame00000008 +961377e7cbe70f31b65fcd6f0ddc99f8 frame00000009 +14e518bda52726122483fef9fe633725 frame00000010 +a66aec069eb298d21764b90bf7d4c93b frame00000011 +3c6ed1f698338877022aee6a5ab914d9 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL3_Sony_C.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL3_Sony_C.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL3_Sony_C.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL3_Sony_C.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,293 @@ +363d7f6ad33c14d4c2678a0c564e421a frame00000000 +56fbd3fa8893437dcc7bf2cb7688e39c frame00000001 +3b94e75cd34350292f6d2fa3d44676d9 frame00000002 +f67477f93856f108fabfc3a37e92d1b6 frame00000003 +07277475085ce723856b5a8152e2cee9 frame00000004 +a8918dddee4723f8c6efc81045a4fd3d frame00000005 +73567a0bb69ecd3310cab1b1e55ddd5a frame00000006 +dcc443641ecaad496af384597ec769e7 frame00000007 +11cdcf117f6ab575b1deac65641cafcb frame00000008 +80fa65602a27498007c32259def3cf04 frame00000009 +4c0760947ff7e290a63df4326d4009e7 frame00000010 +76f12e3cd6f107def571f5599d6d35b2 frame00000011 +fe346d3fdc06bce1e77af0777bc89813 frame00000012 +d423cac216468813baefdd854cf61201 frame00000013 +39d934cff03eba185fdc77d08c557bab frame00000014 +a3ba83a15a6165b0f5b1970d26a75ab6 frame00000015 +de634d9b21b587bd3b792282a567a014 frame00000016 +5951b4ef1a0eeeacb969fdd9eac605ab frame00000017 +1973d1226bdfee22d3bd201155c0b02c frame00000018 +cf83e4117f67703b6aa6ded446a7bd72 frame00000019 +f1dcce31de023175e763eb012984273b frame00000020 +85dd6b52cc1a7e033f6ef1db4923f000 frame00000021 +371eb117d6d84b71d767cd947760b88f frame00000022 +93e8da3a34c367eb31b3b647772fe3a7 frame00000023 +977be2478423c61bc8d9af22687b3833 frame00000024 +1eae3e0f09dad3453afb1c7ba7a0c98e frame00000025 +23d76caae88ecdd3998aab9bc2d01b45 frame00000026 +8d673f52b1f4ec041d1d96ea17a94d1b frame00000027 +4916cfd1d626939c88e78776935790eb frame00000028 +d159c8bb91e374c94b73480bf94688d2 frame00000029 +8707317de39b9af1221e8991de770400 frame00000030 +e32379c8447bdf01e2c26ad4d592429f frame00000031 +dcff9a3c860688cb0b37b5a95ab27bf5 frame00000032 +1c66394c64bc4ef2bd8cdebd2fa1f5c3 frame00000033 +1e8d7d773150989e7af7144ead739c56 frame00000034 +e8c785067e65eb7ba580184672e19f8b frame00000035 +e6a3cfb5e7caba3d517e1c3c2aace7c0 frame00000036 +6147ca8706a5de6969b986a15b56414b frame00000037 +e14ca5683c23ab7bcf41a309f0279ae8 frame00000038 +6cefaa70e3b264d5c72b82e3fa558682 frame00000039 +744e311c9a5c199aadff053e2de8c7e8 frame00000040 +c30e74e84118f63e5badf036e15145c3 frame00000041 +e9903d0f455a006af06bfbb3e8d2b067 frame00000042 +2073ae34c27755641d2cbba1b6501509 frame00000043 +b583b84427e9d3662cbaad5199756169 frame00000044 +6874dbc35726117bc378e74cf14ab206 frame00000045 +36af0e8c612dfce091c269aea13e4f60 frame00000046 +6d7801893e69c5c7b22fdb4002b02b50 frame00000047 +8c7a83d370dea196d45c128afb236450 frame00000048 +938eb72416191c4e2054a158b10316f7 frame00000049 +84b6623b3f99833507c527e375ca30b4 frame00000050 +37b2eacf3bd65a6e80cee2e54d2245b0 frame00000051 +28d2784eccdf1be1c10a3d920eab696e frame00000052 +93e2430e095255ae033f15e6250fa298 frame00000053 +185d6153e68278ea0545858cf0c67f31 frame00000054 +a7e5caf9251220ca17faab482c41804c frame00000055 +1ab0bb50586a996769587911fa527c34 frame00000056 +60ef84fd982928d7df12f61aedea7ff8 frame00000057 +c7ecffb02c950fbd93d6f64d6d564c54 frame00000058 +5700bebb98d07ddbaf762c1304f67e60 frame00000059 +9f8133a0d7cd4ee4dd88014eb342b1c1 frame00000060 +bdffb8af7e960b83f6a50c0ba7a85b96 frame00000061 +19d957f49133cb692797f1b73a7bb2e8 frame00000062 +f565f7ee841d3b22e332a6541c77360a frame00000063 +f1354a92e597a32a5f65dfa2bab2aaf5 frame00000064 +dd006c4fb28613812538f04ef2047df1 frame00000065 +f4741d39d940340a392eb9838120ad4d frame00000066 +9f41091fa1455f5e24c1e5a24b82ba3e frame00000067 +a89b8d1549ea332dbb875b71aee1ac24 frame00000068 +aa0a34b2970342e3f73016ae97c9a5ce frame00000069 +c7eaf3086c97ed9be49ad86823bad5f0 frame00000070 +8dec500e76c7d9d23924e276e5738835 frame00000071 +b47fe1b60cd430f3367c722833107241 frame00000072 +9f5f77f0ba5b3cc32888035af2f05778 frame00000073 +2922e5166e40f5645ed8fcebff1427fd frame00000074 +0f2f4623b1ef6f87f0e1ccfd67d1b8cb frame00000075 +068200c534e9bc2108ed6d0d5bebafbd frame00000076 +30f3af9728a8f540c9b4e99a629c3282 frame00000077 +d974d212d3c11ad3fd012b81372f0dcf frame00000078 +872bdebc820bc31365dcf06135cd5c57 frame00000079 +3a63a33e8f5871e76cd3ccd9a5f850fb frame00000080 +57e3526b343a1cbe9a25f6ccc6230dae frame00000081 +b488755081418e96c017d94596d359a6 frame00000082 +b3d02a122dd03beb193b992d6146af7c frame00000083 +aae342489579dd64803d39468f011dd5 frame00000084 +2c941f04aef313f56997a6acb911a452 frame00000085 +c8260d44f087a64721e0fce2a58603ff frame00000086 +d9de58b0cb44f3b816920bc355178540 frame00000087 +211494c615dd2aed14110fd65443cfae frame00000088 +85e5a1c060368744a2c7069364bee6fe frame00000089 +246a1ed1136bbeb5187bc19a6657e841 frame00000090 +519bb4946809deaa69d5802f95c89d60 frame00000091 +51e3de06ea61704329f37c60eaba8bfd frame00000092 +dd951696b7ac3321a97f6d22aef2254f frame00000093 +45d64385c84279ee8e6c3d84ca0407a2 frame00000094 +8cde86d9f57239bd0c0df3cbfed3c0e5 frame00000095 +95169aae4ad366b1900ff913542bcbd6 frame00000096 +df73bdd7acb2e2a4cd9e9f064f7cb84e frame00000097 +3bd0112954b67c6ebd0297a41e00cd7b frame00000098 +0697468c7358ebb1587d3cb97f48aa14 frame00000099 +38a4a824dbb6bf4127bdea500ef4d8da frame00000100 +3fca2cdf90678c8b6de973dd9f287cb7 frame00000101 +06a0f8f0f86dbf37847d39e2dd389b9c frame00000102 +e966dbf9104edfcc85ab7852b11e8537 frame00000103 +d0fc018969e6ee18236110696264f6da frame00000104 +98ec4829abc63808c53a7a06abfa3768 frame00000105 +7d6a16c40d7436d7ed0a51fe149efa23 frame00000106 +99e68ec50734a6b068a935a8dd5bbacc frame00000107 +6339f6a3d5b093ed0422190912f09960 frame00000108 +78aa5efdec8521cc5cdaa0c8f5124902 frame00000109 +071ae67ac431bb06edac867d39b52af2 frame00000110 +58bff5f9664a84fffe5ffb71db9c3082 frame00000111 +0f0727f3e7911a8a471e6ed945a5c60e frame00000112 +7843e4063031dbf614e8d9b06780be2f frame00000113 +bb61833aaf1ddcf6433774b96bdcfad6 frame00000114 +4d72f07f8839847fe8df539909248a77 frame00000115 +f1456c11318823b46b6bd2f484d160f9 frame00000116 +075ab14c63d36d91ed95c5b731ad6285 frame00000117 +421c8205a3e8e2a7af83957128d87d73 frame00000118 +933e53a2cfbcdb0c1bee8ed9127c98aa frame00000119 +60036833797e22740a1e8ca5e74f92e7 frame00000120 +0d8f5305d33c8c623f183e8c59df969a frame00000121 +5afdb8a2a248bac77c89a2c87ba151b3 frame00000122 +1bd420a9939bef97e10b67fdce88af33 frame00000123 +11c68573b3b194fd37e208951ea2552d frame00000124 +6c5d1b851c835f8ac72a955dbe0f3588 frame00000125 +781c75b7b248d909040d6c540a888a60 frame00000126 +381c519702775b5fd88b109f1ee2c8ff frame00000127 +024b173683059af8cb9ac2969bd6a359 frame00000128 +7fcd474c21f8de99506fc3faedc163d4 frame00000129 +b380b0018371f2e853311321bfdcc001 frame00000130 +08155f1c913971beaf1f4c7c10033de6 frame00000131 +18598aaea5816737194a5b323a815917 frame00000132 +217094cd6311180ccb9558c5629437a1 frame00000133 +c3bbcfee8711570224feec907822cc7f frame00000134 +6fef5eb9da4c6581cd60b2ecc14972e9 frame00000135 +5437442f8efd97b79e090dd1b90e45f1 frame00000136 +865c596466f33f3e49b41bc80e475252 frame00000137 +ef3d4aeaa94ead4803d858dbf2462291 frame00000138 +0b8b965957ac16182d08dc31706c9fd7 frame00000139 +af6ea42148aa3cb26217b4340ef3b28e frame00000140 +1270652434cf5c73e1653cd97b761369 frame00000141 +e50c8d5354f745d9b2cfac058fc109ea frame00000142 +2d911cc7eb844dcc78d76ebdc268e906 frame00000143 +2adb13ed24a2fed7f26d29e556b4aedc frame00000144 +c7eff6e0afa91592ff3ac22f448483d3 frame00000145 +34a3a3beeae24035be274532500cc754 frame00000146 +366fcb44b2da5723f6029925052aa729 frame00000147 +a418a72cace8fba311715f349630aa3b frame00000148 +ead0e7ed00e378bff28128f4364c4764 frame00000149 +6f0a1a459b3acc2c20f3a6f4659490f9 frame00000150 +5155a830d10037fa02ef3d3842d51015 frame00000151 +7163d55ec35446ef6216214e9370ceac frame00000152 +e8425d5269d61a47598685d4e035660c frame00000153 +83b818c3208601c6ed05d1086094ab0f frame00000154 +9df6130bd0c12d0d730f7c595f8e39c7 frame00000155 +8b5b032c87ba4dd7aeccdccaf09c13ee frame00000156 +414d896e1e430f5df0fcf0fb6a5c16b7 frame00000157 +d574934a4265b941e05d63e76d8ccdc9 frame00000158 +4f5d3d5c6bb4173f7b85d745bfe79010 frame00000159 +ed9daf9484d807adb5268103a153540d frame00000160 +cae599d0805334551214499da3f90146 frame00000161 +415d8eee07b9feccd1bf145f6f017716 frame00000162 +8f4d812731dd9a4a60fe0d2f94b6d5b5 frame00000163 +d65da2e79a292e579d2e3fedffa5e7f2 frame00000164 +7bf1a3fce158393e8f42b8952f3e7dbd frame00000165 +bfca76269792f21a00dba630a685bcf8 frame00000166 +4ced913aa54529c28141104d472e5aef frame00000167 +553306240622be0a1c20625a84d0ec19 frame00000168 +2039367becdc8888f4618044ea74831c frame00000169 +2fb145d5fc56c3f84c5f78156048409e frame00000170 +cf157e94547340fcb1a2804aaadd772c frame00000171 +b87f0a3998a3ac56add767f936035a16 frame00000172 +c9de5f6bd689c974722fdee0d152f44e frame00000173 +7646e26b574612213011482ed7149067 frame00000174 +d4e57106671c6da5307686814b18f8c7 frame00000175 +a27d1bb337b97339714d938115bba070 frame00000176 +1694c8c5d69237ad13d53c4b23d383e8 frame00000177 +5dd011a0e3b502877979bd6e55b10886 frame00000178 +ca99630254036b23e234476f2ab332fa frame00000179 +ae712bb623c8c359ffc40e47970717ec frame00000180 +6a692a9a49255b74146df141442acb29 frame00000181 +8187fd49fea03ef17ed5fb79195728f1 frame00000182 +ecf94d766d1a37192f6b3a42dae7793b frame00000183 +2648d58066f8192425e43c39d8467d3c frame00000184 +8d65bd9101ba059e929c775a5165c2e4 frame00000185 +b4964f9a5c6a8cd23eadaf8238a4bcd7 frame00000186 +40d7fb141e1702754bc04d4f98d36a34 frame00000187 +1570752731b2d83ab3b2256a2710cc5f frame00000188 +f75f1e24d52573869f37451207228d8a frame00000189 +842cefc95b5ab42b1409592fd1ce9bad frame00000190 +a62020ec59028ee37b301395d0e195ad frame00000191 +af917171cb398637c054794eca492809 frame00000192 +2ebda34af557b76f48814c6df24d8353 frame00000193 +5ba1e223a9a0c12641f1be330e5e2cba frame00000194 +c47cbd4fd79e190e8efdec638c728682 frame00000195 +303b4e5cb0c1e57c72d4996428203554 frame00000196 +fab910b4aa190e1d12b2e5936b8a803e frame00000197 +e035ce94cb30136998a08ee94bd4624e frame00000198 +4491871d5ec2ca06438d625307db70ef frame00000199 +afc6ae61f49e01d277a897a73e2d70bd frame00000200 +96d2b8d65416ccb8d3b0e61d0c82f5e4 frame00000201 +9596c66cc9db7cf0709d8d1baf5535fe frame00000202 +fe55bd18c35dd143433cfbd92b65aafc frame00000203 +56ea1ed5a7ceca00bf56fb16ccf33864 frame00000204 +f2bf888e9a52adb4c622cf849b4f5928 frame00000205 +ce2be4967a193dfba0d6c364b4b9d76c frame00000206 +c9aaac9433d71d0259c621c5df551e28 frame00000207 +02831fc7cebc6d322ecc3eed41e1333a frame00000208 +878eb3f01ed6b2a9c500a97b935ef123 frame00000209 +7e130d2c51d75d03afe4d0145cae7948 frame00000210 +7003f224bacfe3fdfb4a984fe0ce94ff frame00000211 +514c3e20f05c1fd51c71544c86b0de3c frame00000212 +5d3895e188b89d99c1309abb341137bd frame00000213 +676e32dff8404042bfee3b584020ddd8 frame00000214 +54666fad79a0548d233edaa17d7677d8 frame00000215 +2e5076666d6af47da73e36dc74804100 frame00000216 +c497871e28278278389eb69f867663fa frame00000217 +b85a9c62ec68f10d07703c24d9631d85 frame00000218 +178e079903846fdfde5e24d9d5865da3 frame00000219 +0ad89184f10be455278b5531a4c83368 frame00000220 +bc5a225e69d2fec56707406a15fff57e frame00000221 +fd2def3a982b086dd63fce9884576107 frame00000222 +81ec41dbf102e8a612c5a4755fb934a5 frame00000223 +d6f51b834dff52bcff0fabe63e50e361 frame00000224 +e967154c4714a6d34413b1db6423991c frame00000225 +a603cbea8891f9d2282d4d720192d7ba frame00000226 +b7e9ae5465e00e8a6f55e8e136d12721 frame00000227 +148468b36e2a152209f00784d3cc987e frame00000228 +4f8d0a8331a61e94422352af0ad4c71f frame00000229 +4ee34d92ce316a901b5df2816a383767 frame00000230 +f3d3d91a86cbb4e3e6cf2d295e7d6baa frame00000231 +69e42db9dcd9c02fdb62acba75009f1e frame00000232 +9591b8501e2890f65d427e7daeff08c3 frame00000233 +ecbd914aeece7ba0130a095e15fc360e frame00000234 +9063f1bc204ccfdd0c0044ef1152cc91 frame00000235 +16bc9599eccd4e3e89e555059976ce54 frame00000236 +c3be7a2558658fe19ed1b37d7873a283 frame00000237 +64df579c1e16dae30c1772dce315345b frame00000238 +982febcfb497ba20be050f4437b0b669 frame00000239 +9dd0152c4e625ca7c0bec361ecbcc085 frame00000240 +420475b3725370072f471d554626dc6d frame00000241 +830037b098eae6053048708fa644259b frame00000242 +dca3fbe9ae34553497da878d0abf39b4 frame00000243 +65f0bb247e7fc2796e522f3e820f811c frame00000244 +c2fe0ec04f40e464559ae49f2221a7a5 frame00000245 +dbdff3413b6a0d06d3a236f0ef08704f frame00000246 +d5f8312e83aa0088843c4591e5e3014c frame00000247 +abc95840a0fc1ae6c5e3f1722a9d8852 frame00000248 +5e6bd41b4392a6bd4fee22a9c9f4c374 frame00000249 +7a0a7312375a092933d6ef147903f5a3 frame00000250 +d5653da57ef53f331fbdb97a00911b47 frame00000251 +2e52aa3dae16a2ddb6ffa7e519faf2df frame00000252 +ec9baa3edf61e50cbc8baf4dd7ed76e1 frame00000253 +6dc025d7cb70ec2d5f7de5f019d67663 frame00000254 +1850f17c32ac43c46ef8560e93cdbf02 frame00000255 +539137ec62d291190498681864bc42b6 frame00000256 +067c9b16b9d2bd28a4647c770d630aa6 frame00000257 +bf4093476ab6253dacd25fca00c3fe4c frame00000258 +faa5efb65dbebdfe8679e8f551f0533d frame00000259 +88db7e53f4952533dca09c83ffe055f7 frame00000260 +dc8a73fc6cb8c915e5c3802a625de85c frame00000261 +0661693507a0d7e03404598095b17d0c frame00000262 +c23fb92ad7087fdb67a7ce5af261fbcc frame00000263 +63b8ad9b68baec14cee30da314edb113 frame00000264 +6add68371ca1c4ba29dd16538852f3b8 frame00000265 +cbae3afd2930389bc6f14aef305640b5 frame00000266 +dad76fb2ee370c3a1addeed28c7ede19 frame00000267 +dcafabb535ff43192921e2a82fa8a916 frame00000268 +79a788834af3fbfda3f28ab475e0b28e frame00000269 +59d3e246c8b035d828d5d2365e351056 frame00000270 +18f4d56af337514b84dba53f8105456e frame00000271 +5a45d90c9bdaa20ac102eb1083a21715 frame00000272 +d3ddab77afdc4568e62beaece73dfbe4 frame00000273 +4fa82d5cad42ec4f2e68f5e8d8da112e frame00000274 +9c161b3b7d3ee4173985b97c4924ec30 frame00000275 +fcf73a1fff308cc94a133e8256353c5d frame00000276 +ee665c08f72ebb2715413517d22fcfc0 frame00000277 +b303b19ca708cacdec7c2465b0f3d5a2 frame00000278 +8a761539e45d8dd27fc22f94f2f2e938 frame00000279 +c10d30b0f12beacba8ceba682e132424 frame00000280 +91d80baa1e79a790f1864aa5d59c6a99 frame00000281 +7b1eee3fedc603d77198267862742902 frame00000282 +dc453b2a595d3461bbb6b3965f919ab1 frame00000283 +638db3599f572b6ac67ead90e05ab037 frame00000284 +32ca20750ca8527d57cc752cc5257adb frame00000285 +44aa75f9119a6cc5cb6e84d4f73b4702 frame00000286 +e7d94ddabf554f1ab53010ca6ec642b1 frame00000287 +9b7c8bb8be0ce7c2506db249df5d3eb2 frame00000288 +070e1290db76a6f0a8f43ffd6f94055d frame00000289 +cf4a7f3e3feb31a15fa61f2b59438c68 frame00000290 +f18d9bf8a245ed7c85bdc67aec3c6452 frame00000291 +fa36794b1da11cf95f6e8ef738674686 frame00000292 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL3_SVA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL3_SVA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL3_SVA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL3_SVA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +3b05437e27cea07099478058c32e524a frame00000000 +9a90f507a9dbd3dcf7c171668787c34e frame00000001 +a1a3e5840ed9bdf38c4856f6e41f6696 frame00000002 +2bb9ca8dee3a848f38267d3f5fb2034e frame00000003 +a146a735762371252a84f9c41cad6376 frame00000004 +3e2984960cb4633a8df3b07b3adb374a frame00000005 +c5f11b658e6673dea4339b16faea75d2 frame00000006 +9133ae2b0abe830ba251f473876763b7 frame00000007 +6370c59acfe35a3530207c9aa814d929 frame00000008 +e84ce648bbf16b5eb584bc41d1775ac3 frame00000009 +14e518bda52726122483fef9fe633725 frame00000010 +58b58dfde49f802e2823fa85e0123cd3 frame00000011 +fbc64b90f6e62e11739e82a2a3c064a0 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL4_SVA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL4_SVA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANL4_SVA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANL4_SVA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,28 @@ +d302ea5f606fc054c71df5932c0be1c6 frame00000000 +4ceb20b0b8bf80f22fd5949778add580 frame00000001 +36bae4c4bb23b3a6849b4d45ff6ab999 frame00000002 +0646094a214699ff05224bbc86f8f70f frame00000003 +3768e749d7db19aca34388387656e0ab frame00000004 +087d67b54fff578ecdc1d275e91351b4 frame00000005 +c46fde94c146bc26c1c45435a8c1bd26 frame00000006 +8def8e23357418bd0ed85c3306bac0bc frame00000007 +22dc4480695fc4537ebd3796b4e9f6b3 frame00000008 +aa8a1266ec8aadf80164f08f944dd0ee frame00000009 +a3db6e032fc2c18451449f85fc32d469 frame00000010 +5f08477eba0511d6306496514c060811 frame00000011 +004ae54ea352e570030036e9cd1fdd50 frame00000012 +be72233afa6497f36fe25ad12617a2ee frame00000013 +a5c7a7facfa1c463b6b5d46cacd6f220 frame00000014 +2cf4f7d55c65e853224d256cd855d013 frame00000015 +ff0a51e242129479454d53dfc7ccb99e frame00000016 +10a83d59220e2efb429277b9e40c3ac6 frame00000017 +e988a8a80aa1559fa485d2f017ef4bc1 frame00000018 +38156d805d54148580b07f0471447567 frame00000019 +2dcb2f41eb21b8a3100115259f17d2c2 frame00000020 +8f89824d9cbbe410791ddfd5040c0822 frame00000021 +3c426165e8833a9857ecfe8aca9cb6dc frame00000022 +a25dd5d9a3fb19cb6e4414264ff640d4 frame00000023 +231532b3293ed13b656af6923445bf32 frame00000024 +098d2f0658a4fcb8d2d3d5d6aa601d5f frame00000025 +53a83fbfcc75bb0fdb9289aace3669b6 frame00000026 +6ea58304697522a50e97eac9d4cdd516 frame00000027 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANLMA2_Sony_C.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANLMA2_Sony_C.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANLMA2_Sony_C.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANLMA2_Sony_C.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +8b2e996f713c555f97b26244368daaad frame00000000 +c364d6e59371128c9dcb90d2efa1440d frame00000001 +ec24109228646f98a0c1dd03aacf225e frame00000002 +fcc20eb544ce0e3b1367ecd02c3d2ac9 frame00000003 +4d2b99ccbf81165aa9c837b3c671874c frame00000004 +f6b614762068d65f4b861d3b91e1a135 frame00000005 +c6b788799c3eafe51ff3bbc06ac21d4f frame00000006 +bc00c562557f705023e11b61103d24a1 frame00000007 +d7fcaf4b6f23bec96ab969fc33b2b1bb frame00000008 +ab2c41a1acdb3820d6549887b228263f frame00000009 +542a1fabd2290da2cc136df583e39bc4 frame00000010 +c88774f19e99c534f6215f93e11c34cd frame00000011 +ee9c2c94de2a1cfce93e88da95c27e0e frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANLMA3_Sony_C.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANLMA3_Sony_C.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CANLMA3_Sony_C.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CANLMA3_Sony_C.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +8b2e996f713c555f97b26244368daaad frame00000000 +c364d6e59371128c9dcb90d2efa1440d frame00000001 +d724e2a18bb851874ccd036d803005ce frame00000002 +1ee86e6335bc2d6e434d52c8ecc634f8 frame00000003 +5b6de5617629184a9b07ac1e5c9bae70 frame00000004 +dfe1145201981453a3895f3ab9e2c3f7 frame00000005 +999929f2017a78477115a89ae34dca78 frame00000006 +e94b93e2f37b98442a6c4ef5cf90cb78 frame00000007 +a402636d22cf19c66632eda03283a5ae frame00000008 +8a75f453f80167df4913b122e2e4fad9 frame00000009 +42fe740c132d80060dcfe7ae449e3bd8 frame00000010 +2a0877b41bb9a6223b175178599bf363 frame00000011 +3dcda9d1507e8cc0796e60e1e499b5ff frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAPA1_TOSHIBA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAPA1_TOSHIBA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAPA1_TOSHIBA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAPA1_TOSHIBA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,84 @@ +ec40d0f5f230664c33b3b5d447461ecc frame00000000 +9a2546573c49125809dbebe32b309d28 frame00000001 +5c8bd598fd3ad4812df49b4b26616121 frame00000002 +71c20078d470d89ea8d4025e5fbd4789 frame00000003 +58ba569f6b90401e3b0dbe4aa76be465 frame00000004 +ab05a2779cd661505b425ac11c0ef5fb frame00000005 +3400f85e9a1d1d53c1968dd20c9daae6 frame00000006 +9b082bc9174c8996ab92a00618ca8357 frame00000007 +2c45e10e8f0935f482fa380f47ccd764 frame00000008 +95e5ca785f3858b6f49c46a8db004719 frame00000009 +b0229ae649417ea544f4482dae6c0d6a frame00000010 +e2f5492a2818853950bd95ea4dcd2d30 frame00000011 +afed7cd51e8f2e4e1cd4831d51662d77 frame00000012 +a71219bb110b14827cd4e04299f00ac7 frame00000013 +592dc4e2e50237a28c473e65f4aa464a frame00000014 +c3c46bf2cf39a97f574117503190fd25 frame00000015 +4e1537fe503c5c1d7a6e0af95c7c1a3f frame00000016 +b2ddfb2caf021e9663cdcba847993245 frame00000017 +59c8f0b3a91b9e84fa5cb589ee990b07 frame00000018 +a81dff46242eb5e00f84e9348c557cfe frame00000019 +33bacecc331117a944c211bf056762e3 frame00000020 +07f81f449aaac4e9f1ccf4aea1c1b5aa frame00000021 +4dd64bd312eb71114b1328761040f179 frame00000022 +7a7b94db2fb13b1ef48d94963cebbe7c frame00000023 +048674475b5b2624552cb2cb30b7d527 frame00000024 +440bd92277ae7d6331f32b472533d0e8 frame00000025 +b32b5f2cf9d9dd33d9e5ed2123e10986 frame00000026 +5a4e93666e92543891c0e3d596912198 frame00000027 +a7ecc6911f821425ffe8925d0d571c93 frame00000028 +d57d85c08477c1f05e41b38ce36b8558 frame00000029 +b18e6bc19edc257626579d10e43a8d42 frame00000030 +243ae9d48c8c8dab2add8920ca12fc39 frame00000031 +1d591b00eb7d82917c30d3d572ad6578 frame00000032 +4b7bbd1d81b361b90c6279994a2a636d frame00000033 +6db20ed7de3ae78d6ff581eed374cf88 frame00000034 +71f1747b8e565e4d3375e27565210b50 frame00000035 +972d7876cf175760c9a662f4cfabf602 frame00000036 +1a51dccf51775f27b8fe76ef17fc67b6 frame00000037 +e1d0617ada5e1fde75678b7b0cfcd60b frame00000038 +96cf8c0a0f4ead9aaedca0135863aae6 frame00000039 +2480795de53458dbe6249aa9968cbabb frame00000040 +a0044955546d8e45d76e98fee280be3a frame00000041 +0d930f01bf1b4638c3daff295911def4 frame00000042 +7e6f5fca06a2c9cc4431fd27e87cbf4b frame00000043 +69017056bfebe2c0fe9a6b68317594b4 frame00000044 +9abee47d028790bfc39edfc4d7b98cc3 frame00000045 +b38b7b7f1c555aba3b9190732f56af76 frame00000046 +540956b5c2e3f8486f6f79a1c94357fb frame00000047 +50768e1c36b396912a761c0271bf3191 frame00000048 +5d33b73e08ef6b1b101b9625c0a3a884 frame00000049 +40f5b74a90038d85ded20683cfa4ad93 frame00000050 +d3a369e084f94eefe915c6f358927a50 frame00000051 +9d1e8c5f2eafa1f2d57731b423d4a4e9 frame00000052 +cc2885bbdd6fa4ed9ee1206ecabe9fa3 frame00000053 +9733224a09a5c1ed5c9f18109fb56b66 frame00000054 +81e2d6f83a41bc094325098347c00570 frame00000055 +543a0b382dce3fcd7b779e47c55a2bfe frame00000056 +4067c3916753cb98a378c4e448ee268b frame00000057 +7b8f9e6876dcc8d7063e60ae5e174190 frame00000058 +241ff24a3c8211a4902d5a2e02bac5db frame00000059 +d5a625c23097779b7973bc35ecb122fd frame00000060 +f75c202ec58104ce4f143a493c08f27e frame00000061 +4d12a0a466ea05705f69580d7a9ccdc9 frame00000062 +5fa93d2322d93fe8de8d4d3e9c9bdae0 frame00000063 +7b973ac6714c3eff69ff6d827627ce5f frame00000064 +e55e750a7960cc6c9b5e000b0d21fb4f frame00000065 +d1e49a8c1f4762eaf694eba42a0b2259 frame00000066 +f974f8de00486035f3365f3fe58f6c30 frame00000067 +18d0f17195864a24bb41436afb4c077f frame00000068 +bf8ec1c8e91d3fa54fa66420bc0a866d frame00000069 +e96ce261aa1c6b5a1b882bc83cd06bd6 frame00000070 +689148a5ccd0b8218666eddab186baba frame00000071 +c2b8d738e2a4b667a656d497dd4ba108 frame00000072 +dfd6faf296ef58ecdbed8d5a89a30a1b frame00000073 +c5fbdac1945c4577e07eb5652e164323 frame00000074 +048a4ba3529c4bb82ef7a451a9a8ce9a frame00000075 +0a091beaaa589b63ac9d1c2b4c1bd9a1 frame00000076 +86298aa5dc2a7fe38c5e6fe966ff31de frame00000077 +329045ce1b79a58c2bc138eec7b393c0 frame00000078 +a9162433cf7be67ccbb4e36520dab525 frame00000079 +15e64f68fbe0089c5b43e290e9131a19 frame00000080 +af4bbe920331787945c4d2747cfd2eb8 frame00000081 +0346d9a0d4110c7bcc7824dfe0ce395e frame00000082 +f77edda0df939ce3c69d91d79fc0a6c3 frame00000083 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAPAMA3_Sand_F.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAPAMA3_Sand_F.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAPAMA3_Sand_F.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAPAMA3_Sand_F.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,47 @@ +3234a21fae65cedbecb815348cfcd025 frame00000000 +32726bfa95b76622b9316a06d62ef04d frame00000001 +596c98dfaff72a38a0ea2bf346db131b frame00000002 +54ac922859f57559eb5c813b621fda0f frame00000003 +19c0806c2070678854fc147c67c773c3 frame00000004 +d4efbb7fa35fbc1322cb56ced0dadeae frame00000005 +c048a396f71583a4ea6c149170373911 frame00000006 +cb93e645f01eddfeb8347ec28329ad56 frame00000007 +f9044b5c482275437874d845a58c9f2d frame00000008 +a533beed5336fbb94c96c4c1bc973588 frame00000009 +e22eb06e7cf73f8f0536599c53a55b71 frame00000010 +cb25b9a1d6a60a6f7fdf3c5b4e42e5a4 frame00000011 +3052aaf7ddfa1f6fb460fed1da90da04 frame00000012 +0c32595dd75080b1d057525894bd7ff1 frame00000013 +9cedd4d8286a692108fa5af04fd9b9ef frame00000014 +54d8122d5848187d8759834e5801ed9f frame00000015 +cdf6aea31d7c7140014deb38e2aa74d5 frame00000016 +843999bc87563ceb15228c0b9e508577 frame00000017 +2b74640a619894e5ba47a3af66e62849 frame00000018 +b9a1da5793be06dc30533cdc085b2205 frame00000019 +8d8449c5496fb1bd266718fb4efb5631 frame00000020 +8f5d297f89ffcf5cad2509425b4be68b frame00000021 +642da5f5a6c44ea100b61f2c8adc300b frame00000022 +5e7c913cb269c28b1dedca5833b6a81b frame00000023 +9fe571b3e65f17bb02ce28a49ca9f6d6 frame00000024 +7fa282bf4294012736adef04ae573970 frame00000025 +6b6c51edf6d7fab586913b9f117de17b frame00000026 +380e2b587e045033ff4f02ae0b5e989f frame00000027 +3c38e7f4b75dd85778250b50fbc664df frame00000028 +7c908ce32f078f533379b4346ae7310d frame00000029 +4b322dda6b94336ea0fc689b8ea08a34 frame00000030 +4f533c4f9cff2adc60e52f3353c3ee68 frame00000031 +f913769b5b0280c619a2caf7569b5ad2 frame00000032 +f0c0dd01b1c9dc4c6ef0e18acd0321f9 frame00000033 +db36b451e8b069caa5c479054a54b76f frame00000034 +ad8a7ea9090dcb5ff913c9ae38acefa5 frame00000035 +d66546fa56c8cb8f282170c6e3f74881 frame00000036 +0e366555a9cbbd6b5e2e79911ca331b4 frame00000037 +cad884253942469ec8f5409ff336ae6a frame00000038 +8fe2651de7b2f404e409d302bdcdf6a5 frame00000039 +8f1810c08b8c67c60cb7fcfe2aaf8e43 frame00000040 +6c1a851ad4b937500f4a1d0ba2523441 frame00000041 +0bb273f93c17d3ca695224639525ae42 frame00000042 +29e1d63a4ee4cb9de91cd39d9b63ec19 frame00000043 +47361da8407b7f461003da8969dd2d0f frame00000044 +334183f1393f500f7a4a8f0c8c736108 frame00000045 +1c2b333f24c8a8f5056471c6aa6d1d1d frame00000046 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAPCM1_Sand_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAPCM1_Sand_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAPCM1_Sand_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAPCM1_Sand_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,26 @@ +c36aa335803071ed197f80af5148526d frame00000000 +db2be5515d21bd1218f0a6f495a13181 frame00000001 +7da1f8453fc7b35bb94b5c06bbd5361a frame00000002 +1da32a9ffa9a1a0d015c19649476ea62 frame00000003 +7ad97e95e9772831569a5847788caa92 frame00000004 +25fd296e111ce1151f36b45176833855 frame00000005 +63a66ea0ac8c5403d4c79fff8016e9ce frame00000006 +fcc68414634c4c8e5807f9baa2e5ae60 frame00000007 +b46453363397ad5791e16247c39688eb frame00000008 +e33d5a97e995cc97b7daa62158a569c4 frame00000009 +2828890418384e5eea8f94bf6af64d4e frame00000010 +22e496ad19cd5bc3396d8d96bc0a830b frame00000011 +fb2dd7fc368a9be0340ab2953b86a62b frame00000012 +d06d5cd4775947bef61f32cc55bf2d91 frame00000013 +8c34420befff24c2722b9f4f1e4d3146 frame00000014 +144ba871225672891ffb31f76fcc8f4d frame00000015 +c50b9d82b73b6854206e5bc18fc0a42e frame00000016 +b5d89c39e01e84e193a2397c1e43c5b3 frame00000017 +29d73c0ac8b3f0e29f5c0eb9bae49ccf frame00000018 +8848808343cc5aac443fb8086599c474 frame00000019 +f0f264e3599f70296fb8000412c8fcd3 frame00000020 +313a608971db73c29cccc55847231dd3 frame00000021 +548aac4021b4d02e3bcad0fbb54fe7d9 frame00000022 +62a658a735cd8ec3d279ab68a06a564f frame00000023 +8b2e5b8c8a8a3473afa3ec0f97d9e19c frame00000024 +3071f28cf9e2f8e75777a217c9813a45 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAPCMNL1_Sand_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAPCMNL1_Sand_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAPCMNL1_Sand_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAPCMNL1_Sand_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,26 @@ +d8bcc81fd29480a7d0224d0cda45f7d9 frame00000000 +be2c7c888025656c160745aec7c2d555 frame00000001 +50b51960891f55f50b41f42a9a353279 frame00000002 +9fca00a2acd607b63a6f2aa35aca0e51 frame00000003 +4cd979d5e860f52619f226804579cbba frame00000004 +79d25e758a6f87c92c4a89f0c2d805fa frame00000005 +0f80d3d3175b4888d618e335b4894bb6 frame00000006 +06d2e0a646dad63c517a3c1e42a6c13f frame00000007 +e9331f0a07404a3eaf93911f74a24725 frame00000008 +a422bf12e41300135f880753c4f02255 frame00000009 +100172611bf6975cdd365cf9b3188a3e frame00000010 +4ac29157cf18e31b9bc104c499a7fdef frame00000011 +57b6aa2980949431de43f279fcccd322 frame00000012 +cbd181e0f1bc4082f2fa6591fb5b667a frame00000013 +a2193c8b44cc2ee6e5adcb09a1017c3a frame00000014 +2286ac0e5178abd95caadfe8d98af6f8 frame00000015 +fc630d16a648cfdd68324469761f5e6e frame00000016 +5a4672e63b6c388ce5b44f4b9f58bcf9 frame00000017 +ee955eedaf7183b4940e758bc0990a6c frame00000018 +1a7f8e94977505a820662c89b4b0a7d7 frame00000019 +54559f87159d7147afd857b42be8a583 frame00000020 +7605d3e7b1a2f34938fd0d2a9d6b701d frame00000021 +bab8aa1ce165d3a0488c6e44938534fe frame00000022 +56dc389ae242ca1000e63c4c818c5018 frame00000023 +78917fc4e9063fecf50b47a0a7e4dc8b frame00000024 +9aa7b535a3e792649f877751a2ac430d frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAPM3_Sony_D.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAPM3_Sony_D.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAPM3_Sony_D.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAPM3_Sony_D.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,293 @@ +8371841d85a361c70aca839a9282d318 frame00000000 +413051b878a3f10066a4225f0273981a frame00000001 +bfefd089f6b4af76d159a53187937ed5 frame00000002 +b392e0ee9aebba3e303453e9af7f6e21 frame00000003 +015c15b6c9dd6e734557bc1bf74032bb frame00000004 +cd551c228dbe38be889c93bd62673371 frame00000005 +b606f4925d0d2a26d46e4bfa8b8d4a7c frame00000006 +c1885ce0cba48baeaa6061525d33c66e frame00000007 +94557b42e4ec0d1aefedea78cf252d51 frame00000008 +ce8e591b2eb8b58dfbe1e6dee2233157 frame00000009 +588b3770c62468a0c222687cd6080eea frame00000010 +a03073f1c7d679bc47f88dac53e27ed4 frame00000011 +f5815518e78bfb49fe7de4df5f3e773d frame00000012 +e9f7ab2fd0b7853bc520f41dfe269fb5 frame00000013 +75ca74ffb35792c88c3cc7d538fbc2b1 frame00000014 +0b6bab500da59d1264f5756f1cf1eb5d frame00000015 +18dac0abc6f26c4a444e898839f575cf frame00000016 +a965f6bcc381ff29abf66e4c62e44fdc frame00000017 +3f7eb10c3b8af7388bfaf2ce18e6ff47 frame00000018 +21dc896b224698bd0ee34c5d499882bb frame00000019 +96640cbbcd9c5339715e8a4c7db48338 frame00000020 +a7c9657c7fe7eace8557223fdd17fcd0 frame00000021 +b252a666180144a61aaab693c11531bf frame00000022 +dcf7b6b49d2139f10eac9d34897a662c frame00000023 +3c76cfa9bd1450ecb5e20186b02186e9 frame00000024 +f56084aeee34fe72a462704201e2bd24 frame00000025 +fe0b2263091deac134be0f3340739a60 frame00000026 +3c27d8588d95ae6c519770819122a1aa frame00000027 +deba5c06442fa57c9ff7ed3e62659b9c frame00000028 +4bba2158a27490f1de07c92f81d4bee0 frame00000029 +21449a8a40bcb429538236560f047fdc frame00000030 +b68a104e6c86d8d98f709a8b9a505904 frame00000031 +8876e9fb148451546b6ce49a6a7dc682 frame00000032 +9dceaea9ae6ca5d1fab7a4e62c6e3a17 frame00000033 +63d1aa317e43e8f11754218f20adffbc frame00000034 +6adb8f1e9d271aa7687f49192ed4eeec frame00000035 +a322793407f135eabbac206f6a00f607 frame00000036 +d16a8f9c5309937b1b88ad9edcada813 frame00000037 +14dec996e3865a7f21c51e6171394e7d frame00000038 +155050892993fd28d5c752ba73adb2b8 frame00000039 +7b4fbdb3ba4e4d4a7122f35084a45b5e frame00000040 +d713143af66c79fd8c08b9b2788bb767 frame00000041 +76c0e7a458992efb7eedb5c6384f2071 frame00000042 +85d9528d85b33161afdc8100b736ac0c frame00000043 +ae893698db2a5b08ebaa12afddcf0906 frame00000044 +a0aa81f89c0e7663aac33d7e21ddf11f frame00000045 +dfd3ac03c47101aae9c3ed11f9fe5f99 frame00000046 +f6eaac665bfee47f5c5ec458c42dd2bc frame00000047 +a0c3b59e2afc2ed30cd879b99336a52b frame00000048 +9a3213fe2668eb682be0c36682fd22af frame00000049 +957785e8bee78e6b046409b7f1745ce5 frame00000050 +c5b1f40b9667195ef1ef0e2d177ef198 frame00000051 +c0f3e93d0edfbd9df0bfa8d8c5269ee2 frame00000052 +c7660083516b0b9be341f4c675c0ec20 frame00000053 +046c8b00dd6189a9a8427ec306b9f07e frame00000054 +43f75919d3322708738b768be9f71245 frame00000055 +a222e0083063aa2dd3280d1bd1bd6c87 frame00000056 +045b20daee246af261f9dabef4c527ff frame00000057 +d48e0936c603d38ea00598922d57b98e frame00000058 +637d1d950909336ab5b8387dac5168c9 frame00000059 +5c84b137aa100165301839d83ae608dd frame00000060 +f4a504c7adf523a7c01a17475f48e944 frame00000061 +0464638c4f718959b8f58e718e73442b frame00000062 +f19872d2198e1e37ea5957322ceb220a frame00000063 +8b62452f61afbccf987f948fcdead4fb frame00000064 +1501003f68fc20c0771d860942ba982e frame00000065 +55ed38bb1c016c81543e9133328008fc frame00000066 +6d09d64eda129f2b32ee4012ff6ff629 frame00000067 +3ed03ac0d43b7e6659b845c3c79ddc9d frame00000068 +9a2f96b35573397c2307af40f5003fc1 frame00000069 +a066c8a89f3f6fe3801464706ad48bb3 frame00000070 +11ddccd9def14f29bd7b56860e5fb8e4 frame00000071 +3e2864edf2c2bb1607e4b4e16d9b1e57 frame00000072 +35213d226a9faa0d9aafeea968165cbe frame00000073 +5e86c68721cbd0f1a95b51ab74d2f624 frame00000074 +2b0198b6fa72b10d2a2510c0fba183ac frame00000075 +fdf4194b4d4c998d8bcb9386b601edb0 frame00000076 +77f8ac82adfad06bea3c360708e917d3 frame00000077 +86db7ee6893bf02ce8374ad1b5b45341 frame00000078 +ede153aaed8d656e847de7cbe193365a frame00000079 +6c22668138c022833f36eb2be16f0157 frame00000080 +89f787b809fd0448e87c18f6d2fe562f frame00000081 +ce272ae8e4864b643c7b9a19ee0d8fff frame00000082 +b2d58ebf3047de24f8882d51dee03e5f frame00000083 +f9bac07e382d2d4101cda1af174e2d47 frame00000084 +5e90ba635dca627c37ff60f6399215b0 frame00000085 +2cc164c2c8366f416efaca7beebcb2ed frame00000086 +fe3912ffdd73192161d12531639ec141 frame00000087 +817a579dacc10a83d4f97f0e45dfb199 frame00000088 +cfc31641c3ae1c7d7b0cbd0ecb42cbb6 frame00000089 +f112a13e6bceb8584c9854bc96b79287 frame00000090 +4ddd2b712b92697799215774bfa6869b frame00000091 +60906d0b49c8c0f334be09eac02529f2 frame00000092 +60da3fd8477f8f643cfcbe02ed00b65b frame00000093 +38e5676e293decf9d5545070dabb4517 frame00000094 +1ef8e34a5c503d84ee73ba91de3e93d2 frame00000095 +ce3a01ec07daf6d8477bc1dedd3d4454 frame00000096 +5104172bb799ee85c3257db2808d0524 frame00000097 +ae180b3367a297981b3d7f33ce33c9da frame00000098 +671c3270059fc59549e580dfd146bec7 frame00000099 +5f896388b2458fce877300275c6e92ab frame00000100 +e60bc4e4aca99413cb008746258651a3 frame00000101 +5255c500883e1c39f76fbbe04f7d417f frame00000102 +97ced9bcd9c278ebfc6cc85e244f1167 frame00000103 +20f8b4353796ee0088d0d172df4e47db frame00000104 +531bcb9dae59121914240d2e08fffa6d frame00000105 +7d2422c27af341133516251d6a179363 frame00000106 +45f50cdbdfdf857195edd7beafda7971 frame00000107 +8ce7280e3c456721c7185a957c378873 frame00000108 +b76d52ffad83b3b9080eb7ed8248ed1e frame00000109 +085fe65c50bd085a2af0670e1b214300 frame00000110 +ebdeaa36e89a336aaf6a7124e918ef30 frame00000111 +70272c81f7d0c3afe841caab2d080d97 frame00000112 +8e6747810898833f0f015182cc7d2ead frame00000113 +0f698c26e41e99e7fd72e105195a0c37 frame00000114 +ef63cdb45e114582263480cc6858c9bd frame00000115 +d11eb32b4ad53cea2e6323a05c1a6f50 frame00000116 +060081d301259bfce0b68b9e2456003e frame00000117 +bdb0a9bab3a703a623bb41883bc0910d frame00000118 +95c52075018253c07e1c94d4a6c4ecf5 frame00000119 +f072df103b6a7e70000f6e297125cb8c frame00000120 +09df846100870ee13198531db3a30ed2 frame00000121 +be14388ccf0998000b04962747daa61d frame00000122 +023a053e13197cebbcde7fe2dd69ef5d frame00000123 +6b8698f6adad98c6c1e0ab094f1b6e75 frame00000124 +bd5cef94072b87ccbdb783a0dfed99f2 frame00000125 +a7b5e3a0c37cc7c619bdfe3dcc4c8242 frame00000126 +2c4c14cb2a5fd857f8a633073c19c618 frame00000127 +5a4a6bc2e73a95374633100dc38d9599 frame00000128 +8988556ae01e42e36d8e96e298f5ba76 frame00000129 +8ddd6fce601143b09cfeb976af483256 frame00000130 +376ccd1e343895075c5e256e91d86cfe frame00000131 +e9b6c1107be617041663b362a1f788f6 frame00000132 +4f350350776a0171a331b657bf118109 frame00000133 +4dc0925e3259f8f897b2851b6b7dba37 frame00000134 +fb80ba0c9ca33a0203528237013a9857 frame00000135 +9d158803dd9986b83d442a804cf8cb02 frame00000136 +375d7a095e87ab7521424d82c0be33be frame00000137 +bf09126ceb11fd0610d21b6ca61ae51e frame00000138 +a3954e70bef698293da883e87e61059e frame00000139 +ef0a6846d6dd4f1a7235b7df478ede35 frame00000140 +94eb9f48d31a762c1e23868bc7d6ea0f frame00000141 +80bdcf5486409c6351c1958bfab5abe1 frame00000142 +4c7c68afc138d34f6e27736b61625113 frame00000143 +cf293d9d2573a29bd2817ee88f3d15b5 frame00000144 +f5b62e9dbc7c14440037adb59e7e527e frame00000145 +5d262578cdcbdb4975f7cf558586e48f frame00000146 +6112fc9a75bc662b05429ae402c1ecf1 frame00000147 +8e67e69957b591aae9293b5d4d59875f frame00000148 +745b045c90c4efc172cf174df5a7f2d2 frame00000149 +5e504462a13a1dac5db9815464301bec frame00000150 +f0637730df8f22be76aaa69e28f8d868 frame00000151 +4ac5027b2bbb22443626f7bae6d105dd frame00000152 +a9b093cf5ccccd23487c51d5668b8059 frame00000153 +b39e5144a2daaa193084083d788215f8 frame00000154 +4daae864cd9213d25bc39decd91c9f22 frame00000155 +da40cc52401311bb3ec9479818586053 frame00000156 +10d0c86c3dbb4cd04288305115c1f82f frame00000157 +731ca64ffab3fe9587e9ec693190f5f6 frame00000158 +d06fefab2e182254e663f0d74092b756 frame00000159 +f4a220483cd831f2ad5ccdd4537d6faa frame00000160 +96204d17f566864e18ea59b850dd197a frame00000161 +4a43f8494bd099d3f091e92fe6a72356 frame00000162 +263a2a5620b39e36f8f88cd586e4dddf frame00000163 +e167b31246da2e2c0d366c9d930d8d3e frame00000164 +64593206571f7c4e0a0f093c21f7d595 frame00000165 +46c0d9fb1ebe83cdc2cfa25d821cb026 frame00000166 +c8aaa1a1bc675b091f432c06111548da frame00000167 +faa7196349570a9c6bd53c042dd1340a frame00000168 +5094c9a76ca9b184e32145368b894b5c frame00000169 +d551cb3bb5c73a8096f3a0d7ec2cb1a7 frame00000170 +995ed6c01b1d17ec3f6de8eca7439124 frame00000171 +2b61203f681d9bb9950e4a5404643ac6 frame00000172 +2a29d6783ece96e95dd1b533615bca09 frame00000173 +29a351fd0318fdcdfb04ffca469ccc96 frame00000174 +1ff02db042ac21f9edcc1b7c95717948 frame00000175 +18a44e03bfd87d4d9d524028dac4e613 frame00000176 +60cfa329a31c21395cc2fed38e05c91d frame00000177 +c35acfc6b037fbf523c52cce8d8ef2ba frame00000178 +ec97bfcd914b5b21cd5c2fecca59a749 frame00000179 +70c801e5228caea3c56fc590c9028954 frame00000180 +45f78a5d8e2abe24bb5ec79cef1c8a1d frame00000181 +8b903d10cbf9ab4ac3af74091f8eb483 frame00000182 +e85ab4c0b8ae96e51844c04091f889fb frame00000183 +e3e92fe8adf62ac2c6c775f0cdab942f frame00000184 +f3809fd7356ecb7ffb88d5881d234e77 frame00000185 +5e656e02a53600bd9bbf687685a8d425 frame00000186 +f09ed1a97a12d366304c1ab0d50e5b2c frame00000187 +c2d91baedab59d5696fd7851e878d2b9 frame00000188 +d4dd427a0baea8c11c41dd96ebd093f8 frame00000189 +48b600468a0e445a2f47152397f095c3 frame00000190 +6911c3dabb56cab3738893382090ad1a frame00000191 +bbea3fa4ab76e027ec6c704a50b370f3 frame00000192 +940bbd88e0cd7ee60d1395912db7d0a5 frame00000193 +bf94bd0c911a78734bda94e1b165083e frame00000194 +aad6c969eb5b2218d2fff99ac6a01232 frame00000195 +ccd82d60d906f166e54241fa96d9716d frame00000196 +ec2e1d8e6bee428449c51923a184132a frame00000197 +26ada626d08419064b915687afe01b4d frame00000198 +93d721f8ee10283375ce3358255f59b4 frame00000199 +071d91d004fb5eb7ad503f5536694a15 frame00000200 +378166cb5cb80c994bbf4dab6a2befa6 frame00000201 +aa08a481a46cd678320684fec680b7b3 frame00000202 +4c1c4a02f896139a9fe1c89e4d05abb7 frame00000203 +358da45407491429469149bc65fdb7b6 frame00000204 +d30e2fd83ae8c38a7b269c2ebd941c34 frame00000205 +692926140a9248872a305d8f7a447a82 frame00000206 +88ab4e54fccceda33bf8ce5a1a29913e frame00000207 +ed9ad68dda7d8fd5ccfab905a2e946e3 frame00000208 +00e0d8e3cd71c5c181a7bf313c92f9cf frame00000209 +1ddfad3f5791a0427c2631af9f6d1e9d frame00000210 +8a4f9da5587c0701ed7a1239c017ebb7 frame00000211 +ce7ff6ab69f54b4f93d60402a65c544d frame00000212 +6da4adf4e52e9ad5e9b4732d3b1c179a frame00000213 +f78241946e9fecabc8b0718fb1a763ae frame00000214 +918933c181dd1a2d39c0e0b9d2e90609 frame00000215 +10d11053f9fc7045effe72951dc0dd87 frame00000216 +38bb429891f5b7018be18e7bcf97dcfa frame00000217 +d3f750cae7a29ecb57f2d8c9bf215d41 frame00000218 +09cfc0f4be391881404bef432b1dc59d frame00000219 +9ff9940900b76a672541a140fe6cbca6 frame00000220 +b3252546bf166d99d838481d22811bb1 frame00000221 +f286550c3c9d4ece7349a3c6c37cc6e7 frame00000222 +95546c85397a89c5ac3036e9b28d7d87 frame00000223 +8baf6ed73e21d68ed4c8090fda3d60f7 frame00000224 +9e213979a6ad40ba41f64467b5c6a35f frame00000225 +7e669d4d4bbd9e09a64700c5c257c8b2 frame00000226 +433065acf090ed0755eeec894f98cbbd frame00000227 +1ff8e91659765c29b66d7213b8f10bfc frame00000228 +5f9fe24b2a33bb8b2ec0f5a50cf58e0c frame00000229 +47f98bb2a16693997f7d6cf808a08641 frame00000230 +c32df7afd254bbcc3d13120efcffd728 frame00000231 +12381ef1a6ff70e018be2eac7c418957 frame00000232 +ce599ce551c6ecb0681a47faed6d4721 frame00000233 +0b1079d181d46c78fcc46adfb1de3dd4 frame00000234 +925cd16c28f3b2badfdcb03d1be9d68e frame00000235 +102962be8244174b412b9b4274ede611 frame00000236 +c6152e3fd4acbcdf2a929541615804ec frame00000237 +c7c2b21f9acf0129ff47809c5e882123 frame00000238 +18c89c8781587b4bcdd4d652fa6712b0 frame00000239 +9ee5549b4309524f00ea95c78ec3ee12 frame00000240 +d3a4b6e71dfe454e899dfd2969c37e59 frame00000241 +554f39b7716401a88230f6a1dc2f6c76 frame00000242 +0e27cf144989a1a42786a946ca915fee frame00000243 +083740aeb2c1226ceb9bdd3c4dfe8cbf frame00000244 +78a445a98ff096dfe6c960798d219661 frame00000245 +a3647f351da30ee83339bec2eec6de96 frame00000246 +62c6b65e216ed2f3e5aaa22adead8bad frame00000247 +c5f3c865fccdc68ddfba3f996f847fe0 frame00000248 +22c8f98887b53df0484ae2d1e36b64d0 frame00000249 +12c14226fe0933461304ae9df62cbf5d frame00000250 +2a90c5f57a7a1c89b0e83d1bb307fe67 frame00000251 +4d45db5e1b09889192db2f49b443ec3b frame00000252 +11c66205d4cd11a4e82d520e1f3f6bc3 frame00000253 +6a32e5b20e6f70922e792c5ee5e8eb34 frame00000254 +5e906ded75822f657976ee8bf1b53d3c frame00000255 +0035c03e1616b43ca5405701c1c5b042 frame00000256 +4afe72e4d205adc10e0ffc3a5a68321a frame00000257 +9d7e28bcea2a81dc8b6cc16600cddc7d frame00000258 +0315c5975f07d9c419b8436cbee5c8ca frame00000259 +c48048d8bf8a867ad66f9cd4c5e6a63e frame00000260 +2bbad42dd57bde80aee98ec8ca37dd6f frame00000261 +5d09c9290287264d5a31e27b9e781bbe frame00000262 +090751b98cd2bc973d16599e85c3c928 frame00000263 +819fed1f645ed94b95cbab481f4fe0ad frame00000264 +5e94c55463ac381407db0d337c56f1a6 frame00000265 +02c91682a2dc2160c208a8a73cdcbad2 frame00000266 +63a7d067688b86d55e65b1f05e1428a1 frame00000267 +72134e45db41787e6f3e86da4e6579e3 frame00000268 +71c4c0c006567424a9518a526fbab688 frame00000269 +3e253adaf9816d34e59019e9670c8274 frame00000270 +ab38acf9157c972dfd0e7a637e780674 frame00000271 +964e6700d3094f0a45fa59c1f335826b frame00000272 +7aaee5084ae1be08ac14a689f4bf781d frame00000273 +6e493105f4d8e00782e8fc8be8ec8a8c frame00000274 +56b8e6cb4a6d0bc67a7006299a398141 frame00000275 +048e8f94bc53e5e2c8007439afb6c37a frame00000276 +11d1358eec311c65d40064fc4f164eea frame00000277 +5bff23de3d732883fe738aab18aa4c26 frame00000278 +5c32b37957d0753c1aca803febee96fa frame00000279 +51be256e8c651847494cd87c6d22c685 frame00000280 +81fd83e228fecffd0357422a736f2dae frame00000281 +3779e60584dcc6bd476ae47bbcd8a8d6 frame00000282 +fcd260225a0ad28c6fecb5332e6b7f40 frame00000283 +d3f0ff769864576f818f633587bcf9b9 frame00000284 +f9368a6b9f1cf29789540c748f26f69c frame00000285 +a56284cc66269592e1021110113a9f1d frame00000286 +1720b6c9f36e13fd9b1279aefc06310c frame00000287 +0cdebe5ac211d5af8e6237d934e94f28 frame00000288 +67d1d49b2142087b6028c6dcceef47b4 frame00000289 +737af5768268275bc12b849ce3347066 frame00000290 +507c4940bcfdeeffbf68f416228a0b5f frame00000291 +ab3360fd9547ec58594ebd72e1d0fde4 frame00000292 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAQP1_Sony_B.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAQP1_Sony_B.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAQP1_Sony_B.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAQP1_Sony_B.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,46 @@ +43e5cdf9968fc0e83ddff4107f240344 frame00000000 +034afb2610a5639bc0d7c77f6a15af6d frame00000001 +e9d5e90db83bb9e6c1ee6080f244db41 frame00000002 +f949cde5fdf05a267847357bda2b9e7b frame00000003 +5bac286fe72882eba057e8e1c7680b67 frame00000004 +113fc8c2c0beb755b61a9d7f690f8fe9 frame00000005 +33d1eb42b5b6e058ec6a8c0ba5a99745 frame00000006 +5cf5fc32565e1e305bcfd98c7a446792 frame00000007 +cd7023f3dd4a2407276387e63683b102 frame00000008 +8cebc8af4985e14fcd75729bcfea8fc8 frame00000009 +f459e0f7303bf480a9ecf5be3184dc6b frame00000010 +2928ebba6453d0ef225a032e50cc5962 frame00000011 +9c437fa816283bdd7cc7f3d78b96cb8a frame00000012 +75ee77a5d2efd435c923118c683b7680 frame00000013 +d771857426a504891926ac6da063df3c frame00000014 +87235f591474ce49eb61b7815c6f75eb frame00000015 +ff3c2931b42c205d336347f7b414318f frame00000016 +90071d4fe5cb70a47f6db6a2072a430f frame00000017 +be2500b153226d83f287a18b37b31ae3 frame00000018 +1ac16f15551730e78c636477cdbcacdd frame00000019 +53207c5b8d3f233d73f3693fed3090b9 frame00000020 +8b5a6b2370db2098ad5f5d0caf10ec5f frame00000021 +29ed9033cc7f7c8ec790d5a1fe313d9d frame00000022 +41d5bc1b3edcd1188017a7e0764b16f4 frame00000023 +f4451e1c473e0698e650d3488be1eca7 frame00000024 +92e21a9c27dfaad958474fdb367fd103 frame00000025 +f906136fd3ee413a7e23a76c991c7ff8 frame00000026 +349eba33d7bb75e467fa068494262ccf frame00000027 +31fbe8446ab808995ad515baedbe04fb frame00000028 +85bacc83265649b636282cdae091479b frame00000029 +da4118bcddef80a0655a70fd3b2cfb10 frame00000030 +556c152d583aedae227b6deb3da5b76c frame00000031 +e07c7179e41ea08fe7240d747e22d181 frame00000032 +2124ec7e1c162c7f2d758ebf4363d389 frame00000033 +3def9dc613ce1ca0f2e8ce9727786d7a frame00000034 +b10c7b7f166010910cd2a3799c4e5065 frame00000035 +253f14de8fa46f6de889dbb34ffc2d1b frame00000036 +b26d8f2ed9ebe9239b10ca419c531ac8 frame00000037 +bbc78946bd6eae330ebabedb4b6c3a64 frame00000038 +62e768d79aa42c2f2b459f92218f26c9 frame00000039 +7e894f4e77d8bc1817ed7271b99fd5ee frame00000040 +3e790d0c573aa9bfc4ae1335991e00a6 frame00000041 +e4506655bbb4ddfaa3189bcd5cf963fc frame00000042 +84e72e693af3ee2bb37d8e579aedd3c5 frame00000043 +2ac72afe736c02ed60a1883a20842158 frame00000044 +467a3928f3b8d2ba7e65218c281d3ad4 frame00000045 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAWP1_TOSHIBA_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAWP1_TOSHIBA_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAWP1_TOSHIBA_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAWP1_TOSHIBA_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,86 @@ +9a0d89f0a0959dcf8b542ac243d74057 frame00000000 +92164c51865bd516ec090cec7ea10d36 frame00000001 +8403e47a7ec8aecfc74814e6adc119c0 frame00000002 +c466bde7c993f955723a26f12b5d9f71 frame00000003 +f2c224035499c12e2f23db6bf399dfd7 frame00000004 +248035810512948fa79ab459845e3986 frame00000005 +590d366bfb064fb29e2a17a83d8b910a frame00000006 +43a9001dcd6668a3386f6637b3367f0d frame00000007 +f633d2e1afa5db15d27edaec7d03372f frame00000008 +cc197371395dcd61dfed58f92543883c frame00000009 +425efae7f57627dcbd269c8227eb9339 frame00000010 +c47e1cf0d4193971b7bbfa940c3a27fb frame00000011 +0753e61f42e9d6908da7712b998e6167 frame00000012 +2cae722b5f4c2074f38a42ae8f3b23c0 frame00000013 +0af3a2dfc3d98d7cfc7f93f5e4854f65 frame00000014 +9f9f64d0fc801dc299de3af4d6c304f2 frame00000015 +25968ca8c538f2264238bc41421ee649 frame00000016 +b74cb474c4c0ae22be5206142c6de8ca frame00000017 +24635243dd53869adf5e65584d645b37 frame00000018 +51cea26f3152e4f745ce4bf4777e8bf9 frame00000019 +2bf40c7fe8768d8f7b5ef76bae76ff69 frame00000020 +720072ab2abda1188b97177607f27e8a frame00000021 +d17057653a215257250d79559fe249aa frame00000022 +e9289e0cbc0f45ae0c323f67dbe10e61 frame00000023 +b1715edd55954577ba126ef8e7622488 frame00000024 +03e96de8b586e9c20d3992e056ef9940 frame00000025 +8eade6f0aa1425757e9c571aa63de04b frame00000026 +e783efc8d86176c964e08dd3f96ffede frame00000027 +7a273524f9e99e1790d3a7b0ba9f5d72 frame00000028 +97d12f8be7f879069e4abc2da2f3afae frame00000029 +1e7e623ba43661a9539d992877f87bf2 frame00000030 +5f788f86f5f1bc07df3895bef2a2012a frame00000031 +0e5636933ef475f35339ac6a5880e965 frame00000032 +61c120d01a4ac41c436dcd0c40868f0e frame00000033 +cf08b4fb32e6a9d4991ab5c3e5562639 frame00000034 +b9f7bcb6ec7419c43953b3f6171e6c1f frame00000035 +f5ca6687b900a1e558fd3c9cc62f20da frame00000036 +79c0ddbde4e9bc186f24d1518981973f frame00000037 +8f5d6475679c2cbf5580cb9317fdf6ef frame00000038 +a4c23dab072dc0bab0b8c224563dec02 frame00000039 +37886054d71386fdf273ffc29b1d429e frame00000040 +c3fc402fcf66022e0b81c920a1bf80e6 frame00000041 +6d5b912dc9c3b784651eef45dd3863b6 frame00000042 +ab512d536ab2642ed598dd848962250e frame00000043 +259ed8f414fca9f9e014d93a1b9e55cf frame00000044 +324abf09512498d1e734da34156ea7a2 frame00000045 +1de1c57f0d29692672612e078be9f8b2 frame00000046 +69a9ebbfa2b80d5fb9e6ba6c569fbdfb frame00000047 +0eadb6fe33257aec33fa83b05e176acd frame00000048 +d8a451364263d334dfdf9c79606602fc frame00000049 +242b2d5593090219f2b0d4f921aa8159 frame00000050 +6c9dc728b27d0fc8d74ed05aef3cc710 frame00000051 +485de2d1763aaa9c1ffafa04689cce58 frame00000052 +7fa0b8f6b199c56be26c46111f4b0997 frame00000053 +e5a272798da2f3ebc538f8187fed2db8 frame00000054 +a10e4dfdfe8db8f045686bf3345346f8 frame00000055 +ffde113325bac5437b5f33af302b6138 frame00000056 +4d5e819c54ee0f94f19d2f9d568711d1 frame00000057 +3b624b37b8c5fc8bbef1e3073d400788 frame00000058 +1d50b642050ae33ba092ec80d05eccea frame00000059 +a056f1db26295fb0cccf6fdd16aea791 frame00000060 +c7791474b2b9a9b44f2889a6310e7adb frame00000061 +b3b83f94b8f19b2c683b6275a5236a22 frame00000062 +3da0dde57824266372fcb7a8ef0bd2c0 frame00000063 +2e3b8464db63b8fd80b38562ed4f3616 frame00000064 +cc69f674e1cc298d28ea7fe4a9d1a3b9 frame00000065 +76fdda989a59536def928e723efe5f1b frame00000066 +429d523034366108149792d8ce6d635e frame00000067 +ae8cd087f8881c90256f921b344916b9 frame00000068 +943c8aebdb7cf49ae231454555178c90 frame00000069 +65dd80f3fca134725005e2b8195669aa frame00000070 +2e9d4e73eed815d1218fe888162871b2 frame00000071 +56ca202ba97468826869f1be0211085c frame00000072 +292692ca03c81f02754ad73f5321a5d5 frame00000073 +9cb60ba3e0cbdd6b77bc6a59f7fe2848 frame00000074 +9e361d688bd8e3f3de08e29b0cbe4b82 frame00000075 +91454a39efb1b22153bfb091e0649011 frame00000076 +95d9e79586d59d6da503c0a8bcd3bbf9 frame00000077 +22a29cf2d70c67c3a3e9f2382407d6fd frame00000078 +c80bb2c48cdbfe0347bcf4899f6c5f6b frame00000079 +85070c8487427594a3e7ec3ff2819587 frame00000080 +3424eb6c184adbb67523bdf238cddbb4 frame00000081 +3d07a93d7c277a4ee794d2facc184c21 frame00000082 +7c2b8c2743ca1766c7eca2036f30b82a frame00000083 +f74ac480d92e3fdd1c6d460385925242 frame00000084 +58052c6094d85062f06d7780a7eb20c4 frame00000085 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAWP5_TOSHIBA_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAWP5_TOSHIBA_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CAWP5_TOSHIBA_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CAWP5_TOSHIBA_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,86 @@ +9a0d89f0a0959dcf8b542ac243d74057 frame00000000 +92164c51865bd516ec090cec7ea10d36 frame00000001 +7073a0a0eee65737d73d50693f85a41d frame00000002 +c0a686f688cd7eb37ba82d790905e606 frame00000003 +f85e0925af5e737044043dad6b2a5718 frame00000004 +54219c8498b9348bc45bb1a992ad34fb frame00000005 +e8707691950a5183731484a4291be05a frame00000006 +973901fcd22b8412c7157f1406137e07 frame00000007 +7d83cba238462fac0ad87d28a9f8362a frame00000008 +363267ac4fae20504be3d32fca9576b0 frame00000009 +6f36cefb0583bd9b85c5147e77277a2b frame00000010 +4eebafa2220c7592dcdfc3a0e900d92f frame00000011 +3161471468350fbfbcc94ab51aa3330c frame00000012 +e3977a136da287f564336cbaaf9d8cb6 frame00000013 +e3c697137babc72adaa25afacdcc75dc frame00000014 +9f9f64d0fc801dc299de3af4d6c304f2 frame00000015 +137780241b168694cc8ed24708be88d0 frame00000016 +fb3396e16879947eb097de3a51ca2ba4 frame00000017 +e44e5ef7750b3e1c64b4ab647657ebef frame00000018 +3f761b62a2374dfed7b9d46a258d423d frame00000019 +ea85de23a5c9854bc7e424267fe0dbb9 frame00000020 +eb5fedeb2f64fd242fea347acc7ea6d5 frame00000021 +98f47de0638e67fa1f90d7164e665c2d frame00000022 +ccce356560ec8e684ca8056ec94afe4e frame00000023 +d513632277ff753e3847fac415fafcf2 frame00000024 +3e7a21478509f18ebe83ddd1bbfa1311 frame00000025 +77557eaecc6c85551f88d289cf017479 frame00000026 +d2d5c1de934b065bf3b47f8375946677 frame00000027 +a1f0f2462f586ba58591fe5d339ae617 frame00000028 +5a3fbf2ab17ec91c0c27e74164a21bb1 frame00000029 +1e7e623ba43661a9539d992877f87bf2 frame00000030 +22b087d1b956a739012bcdc509a8a529 frame00000031 +783e86aa1741fd40a5945dd1fd041881 frame00000032 +d9a4fe0e16b43b351b732d724e63415c frame00000033 +042c4e16b2c518a633f1cc4ca6e7ccc7 frame00000034 +a017ae13e771966262c26b1d3c8403f0 frame00000035 +78db365b037f4975f95ea8e6666e9912 frame00000036 +6cd98bc34f46360da18c5f80f9cb099b frame00000037 +6f15adaa0d96818ce7b042e21cd41fbd frame00000038 +aefd510367275fdb359e15d6984ed41f frame00000039 +3b92b66761c7b5e1a60e6073f57b64dd frame00000040 +204125d04c4a9dd56b955fb73c484987 frame00000041 +7d266510443230651a4288a2e9ce8dc4 frame00000042 +71544be3339ac3a15ea673144bb9c908 frame00000043 +ee496fd2dbc0e4bea1aa3a9716a5021d frame00000044 +324abf09512498d1e734da34156ea7a2 frame00000045 +a6823ec3811a345be5cff42cadc0d71a frame00000046 +348838fa368d120f9df11da01a45de10 frame00000047 +bf29414c2c4405a2d3b32564e1c6a16d frame00000048 +659269014194a5c5ba07a55fbbba286a frame00000049 +af64a6adace8052c84582ea360544404 frame00000050 +b8e4ff3b7926a7720c55a89a9a3997fa frame00000051 +4ddb2e606963496ca0d3f05cc7046aaf frame00000052 +d90f8f89bd6fdf6bc06836dc55bc7c1f frame00000053 +c246a33fb463b42dcd7cb0bceee43c32 frame00000054 +24d24f5bec8673b3bd4c857f8846fd6c frame00000055 +bc0949a100fdce0eb34855c00686326f frame00000056 +be14684635276bf4f6693bb8ef533d23 frame00000057 +013185472a4b83a613e203946dccbe4f frame00000058 +434038a5e978cafda2a58a19e2c02027 frame00000059 +a056f1db26295fb0cccf6fdd16aea791 frame00000060 +040835584c1ebfe1922cd017698f1173 frame00000061 +514ad3b3504dce4b16b0f69578887504 frame00000062 +0d6ce3bd00c85ddd4ccbedbfa05d57f6 frame00000063 +4c1237d0c08943d90d6d171b30daa667 frame00000064 +8bb9a27ea6e5f47666f66a4e638b83f5 frame00000065 +333ce4fbd234fc714575ac143873008e frame00000066 +270f59e1355f4e558b0964f4d0b5476a frame00000067 +7dc49771cf8f8df08f009bcb42bdc384 frame00000068 +11308371de46240fcfada1c5263d0081 frame00000069 +2d526ef9cf8af67cd237e814d5bfacd4 frame00000070 +8393b793047959b69d1cb3e2638f4c58 frame00000071 +726fd07c4a0135921a23f8fcdc12b26e frame00000072 +8a642c0a430373d02117a0ada253156f frame00000073 +992f56e69efc0e1f1aa1baa6c1779c37 frame00000074 +9e361d688bd8e3f3de08e29b0cbe4b82 frame00000075 +68ec7c0eab35453b15656ee471bc59bd frame00000076 +fa401ce816f43988d150597267ffa113 frame00000077 +eda100c47097434d2d377c8653cc440f frame00000078 +7d83443a30e018ae6d730fcd443bec4d frame00000079 +6f748b0b9f0f6222abaf5e906c4bcd82 frame00000080 +85e5dcfbc742df730443db9c79d4b7bd frame00000081 +d6b509aa889318ae184f1f1eb878ed57 frame00000082 +44b78d92634efff3972473297d5bab79 frame00000083 +ee09c22fdc61dcbbaf42232752953353 frame00000084 +da7a4dd37275aa563adeebbcbcdfaa23 frame00000085 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CI1_FT_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CI1_FT_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CI1_FT_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CI1_FT_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,287 @@ +c0e134b7fcc5de42ff87f9b074fca7ab frame00000000 +aa5e71d0d139a89d932d2e793de579a4 frame00000001 +260d5e6c53f2034c5c66460a3220722a frame00000002 +841ba5ba900152c6d2bf32b13f70468b frame00000003 +d08d1d191210b24660081062b6871a28 frame00000004 +51e451819ac221a46ddaa5044c06ee46 frame00000005 +d2e5f9530480e4c9ab653455acc679f1 frame00000006 +79d025a4dddcd09f527df04ffca7908a frame00000007 +c808612dc620fc7b20347699ca2f2802 frame00000008 +714d56935ed3984ca7cd2f9b2f76908f frame00000009 +e641292c4c7577e479d815c0e55eb82f frame00000010 +96f69025d3880505d81a411c53a3626a frame00000011 +4999dfb20b01bb84f1cab96ca9faccaa frame00000012 +3c6f83dee7fdcdef05f94d5ca906591e frame00000013 +0173427da56f7e9f5bc52a64aefc8188 frame00000014 +b9101ec96e8c2d0fc2f8e2df66ec6848 frame00000015 +b6b6cb98da1e0671911fa64183aac147 frame00000016 +5cb094ab40ad0fe9066c003c74796e30 frame00000017 +0f8dd8fb99d0f3621d5991181812b06a frame00000018 +e646ac1f0a42e6498f9a7587c6781b68 frame00000019 +da91d57810b41b082aa64e1181bc494c frame00000020 +cc8630ca20d989798d9b6a12c0d04bc7 frame00000021 +e257a6033934da9e986632d4dd6efd93 frame00000022 +2ff5a4234d9bc907e80b377d9384211d frame00000023 +f794efa2e7e0af054d0d9082db0e461f frame00000024 +dc47bab9977b25d83cafb0f6c978f1ae frame00000025 +8571060c16603633de7286c56aaaa9d4 frame00000026 +150ae587433ab70a1c5e5c35be5d2054 frame00000027 +ed6e740564c6b28583a7411b9d39c615 frame00000028 +6a01f9199d9cfe81c192522dfa7eb535 frame00000029 +e2f2ea12601fcc54534907a37208573d frame00000030 +efafa4af0be24487093d256c85e8968f frame00000031 +d32363ab2f9ff72fed0652aaa9bf2b22 frame00000032 +015c1be744f1e17915e5c827a7658473 frame00000033 +389357e7d5ffbe0509bca38a726d208d frame00000034 +e8bee3b23ceeb5ea3901dae022135717 frame00000035 +f2c6fa116c329dd5e2dda09d6f993094 frame00000036 +4e481eeb0bfb4abc10ea01b679a20804 frame00000037 +7e75e55b11d059e8a541a935578dd14c frame00000038 +8be6020463a740963a603fd4dac71415 frame00000039 +4763f489f2af3ce442583171b5653608 frame00000040 +e61ab9df5bff19d8bb80cf6c6e18aee5 frame00000041 +acd8eb8b59b09701e20449329e1c9ce9 frame00000042 +73776b6b2835001ac4f52207bb21961c frame00000043 +fe650d44f1e4f3f121c0f6241bebb87b frame00000044 +9e302d5cccce662d86d470d0c661bdb9 frame00000045 +ce40504d52c63d945a85968cd37774c7 frame00000046 +55097baa5f3ba7d9852b3da62c6e488f frame00000047 +e3d02169438dd24fed68e08164cdc33b frame00000048 +28fe936f66ea03dce4fe3ed5104b4bfa frame00000049 +13db9ef56d5603aa479afa929339dd33 frame00000050 +13d4d55b2d9ce80c1d26bc9e87e060a5 frame00000051 +71acc2d01321c659b851e6acef978944 frame00000052 +0a3b4fb32ba2b902aa8690ee016d943c frame00000053 +54fe8e53f5b7f1930b0f71cd5c6b53c7 frame00000054 +26f1cf7a5899040119c9f95a598e22be frame00000055 +e09b7822caa0c16e83584fa1bb701717 frame00000056 +e4a1318795c9848f3c3331207c9b691f frame00000057 +d00dd8d28fb3fb5bc71cd8856b70ef3b frame00000058 +a5e4fdebf29649b09f1857197e72222c frame00000059 +c9bd473cc65d28928510e4799aa1edd6 frame00000060 +21b00330fb628ae582247f5b87ca95cb frame00000061 +25b6fe945737007ade09fcb9a39463f9 frame00000062 +5659f2da3987904a37e9d85eb5da9224 frame00000063 +178d78f88ede0957b7a5da8c162382ef frame00000064 +2ca1b7af61b444061dca5c7b8c75ce69 frame00000065 +5a01cba0fef1e3ed1bca578335b227cd frame00000066 +c6be58dc1397dd13c35ba4350012225a frame00000067 +a3e5a142e24cf5c70279ab51f3c964cf frame00000068 +68b4e37f7e6a1a1a3ea8e5f378f67199 frame00000069 +c9a5ee3e519440f5d1c5d9c134729d17 frame00000070 +5bc680f025ebead85ff3b25d7d951904 frame00000071 +ce5176b4f22cf2dd71594ece1715ba0f frame00000072 +a323af6d47999bc3435c195df67390a5 frame00000073 +f90c6f484b0717ccee3ecc96bcaeb8d1 frame00000074 +c163a7a47600d7ec1329e1bf773d1ae4 frame00000075 +04e1e6004a130cc7e52d9d60765c9c6f frame00000076 +13598f601b7c6fe17143c25a0454425c frame00000077 +554bd19265e8febd810c355c910a4c3e frame00000078 +d71f608b3b4e741054c9d6a69ae5dcb3 frame00000079 +3df25feac564331e89a012e4afc2dfa8 frame00000080 +0a8e1bfdee731f8f400410e443aade28 frame00000081 +bb967e45eb3594e1bddcdd4802c56084 frame00000082 +b04cdb953a612af3f01bf46555a65d4f frame00000083 +980bb9072d087c5035cdaf8e82d32f8f frame00000084 +eadbaf4bb0ff5aa082f97c3e80618e54 frame00000085 +08a0ad1186372085eb504378ba55f05b frame00000086 +42e45e88bd2d069d103606170ddbb83f frame00000087 +beb1caac30f823f98205cfeafe5b6c91 frame00000088 +fae2d7fbfb318d85efb9b7982975bcb0 frame00000089 +6c25dfcb35ea9a3a7a226f41535b27b6 frame00000090 +f9256bf2b44b4112cfd61d20cf2d74c5 frame00000091 +32ef53c6c9ac7be9f72e2a940f9cab2a frame00000092 +d0b70865705c573d06447464ebf9a644 frame00000093 +23f9d3b1057fc0bf1dcca29301466428 frame00000094 +312fecd324ea1acce0ef9d99328fa491 frame00000095 +c9a23497a30494bbe62b2e974afe6e18 frame00000096 +cab2ed19889b0f9e51f178ce68c9b21c frame00000097 +3b1bd78085bd45ac649d08a0ee6c8027 frame00000098 +9ce8efe7a073799e628502784626dec7 frame00000099 +307310614e1ec823b6dfa6dedea999d2 frame00000100 +62d7a61af1e6660cb3947296d7d7237f frame00000101 +4529d8442141a4b5a55ebb2e83950b09 frame00000102 +21c4dafef0e14d3603f6e011ef35c2cc frame00000103 +05b784d9f5169aec9f1afab42e59abb0 frame00000104 +ab0312c23577764c3374639eade2911f frame00000105 +76eb1a624bd8c0ce4f805e6b392f93fd frame00000106 +ca3701b440be48ac1d9b686fb27cc8e2 frame00000107 +0762e3be79c5212c993d5983c995cf6a frame00000108 +5c2ac20510a19f1d122020cbe152d464 frame00000109 +69d8c679c44e752710ff01b9a094b5ea frame00000110 +ff410e2fbdaf49e2fa38a1afcbc04370 frame00000111 +29605eeb59117a9b652236145e450f98 frame00000112 +58c99eb4f0e5f5e05a21504aae2c7fe7 frame00000113 +664d6bc5002c4da1e66cdbdb2a477bf9 frame00000114 +5e4ed47e9caf79922499755e3af4f5b9 frame00000115 +03073d536d9ca50291ee6b0785560872 frame00000116 +a788b6d9217d156689d658c8ac86eaa6 frame00000117 +2aef7fe66640d08091af037eca88636b frame00000118 +ae3b0374fd354ac5a40b37503324625c frame00000119 +03b66d0ae5e0f84df3d48d8c06e7ccc6 frame00000120 +fdcb2b3d38956156698cc801256c5d1f frame00000121 +adaa3320ad0a17ab3d7847bc652b1584 frame00000122 +7d3109b4a936d2aee052e8133cc842f3 frame00000123 +632c9bfe104adef7ef6ac78a8fe11d25 frame00000124 +dd03fb44df0419d7ec496c1f6c0c637d frame00000125 +5e5f6e3c211eb1a581933b63b7189eae frame00000126 +05677820bb8731676a98ba66c000856d frame00000127 +e70afea9a821a83e7ba66f2e806a4724 frame00000128 +ff685d1774afd2e388d1bcea097a96b7 frame00000129 +29dcf50bf76cb97595f1a5147aee5c83 frame00000130 +987252c2afb31b714dd017b5640acb0b frame00000131 +6a78e2a14b485fe3d1d69bc03d106a6d frame00000132 +065a05f8030d360d091698a1e5759b63 frame00000133 +e83d8bb3e77dbf74abfc5f6e6ea2491a frame00000134 +921501138654b8422c9bfcd2d6434aff frame00000135 +90652ecb9e935827e8f7608e0b407dae frame00000136 +8fd48cef7275d7359d30f9fbded4cdf6 frame00000137 +6f19d3650ce5a84e734cb271491fcbc8 frame00000138 +733b11b51f925dd609ed7c87cd9e70be frame00000139 +b8678a69153a3d13fa0831c174504599 frame00000140 +27458c1cd8636bf89d97eff10174a7e0 frame00000141 +4582e3ca1951e940440b0a1ddef6a292 frame00000142 +3fafdd0102844bec0e41265305ca1c86 frame00000143 +731c2b49d4909dae464c827c36667376 frame00000144 +a0f7a44f3680bbe43590f593a50a9898 frame00000145 +7eb6bc6a81774877609e377ca18dd985 frame00000146 +e2d83db97298f126c11a9c57466f9189 frame00000147 +fe5d4f9d22efcaf58e4c17ebcc66e64e frame00000148 +635cbcf6b3c1fae82a4f1262fbef622f frame00000149 +6e1277b08021de72a6e41e4ce8acbadd frame00000150 +12a56711df50a62ac0382c247995a86f frame00000151 +b6691b8a31e814d1133d0c7eb5432ab5 frame00000152 +36d7a2404fb40a84959ef9d2734cd73c frame00000153 +04285df796d762916289f075a0429921 frame00000154 +85d73c0bfbdf2130f0a2d2da859684bd frame00000155 +35e80b5c3770f4f3a4f358f7a15e141e frame00000156 +3063e67ce5ae2ca43c2a62dc66ca3e1a frame00000157 +35fe3fb926aa439055157933a831178b frame00000158 +2fa17fc0ac4aedb031bfc94192f2c30f frame00000159 +2db0f114d9b9a49546ce30c1355997b0 frame00000160 +5023a4e52224af2f0caec5f6cce49df2 frame00000161 +7dec97a223aae2ff125b8a8a448a9136 frame00000162 +b7d6068f76e218e1340a86b0ae6d9842 frame00000163 +d8f30276268cbc05229715fa3e0d97b3 frame00000164 +1fc7d57ce6bbf9962e5276e8074f63f8 frame00000165 +d6fd235e210bf54d97a0511c428069a2 frame00000166 +e17ebbcf0da162a27a4a8acba8a14c3a frame00000167 +279ed3e25028a810f2407f83461d1e03 frame00000168 +af31bffdb7cdd263bc98f3bb715285ce frame00000169 +35876144f1c879ccd4f22cd26a80c778 frame00000170 +4dbc184c698511f6776fe1e717fbe789 frame00000171 +03d380d9086b282bae9d40c12a433790 frame00000172 +dd79e9fc019d1aacf4256c1b2a038cfa frame00000173 +cdfe705111a680721a25afd7e67773bb frame00000174 +e2e4be792dd7c82cc406c1ebd2bdcb11 frame00000175 +14726c70fe0dc33160515eb601b23149 frame00000176 +946026c276cc4baf2ff8efc189edf4de frame00000177 +fe75647510f522a7b5d091f531737e21 frame00000178 +bc277e76afa5f64ec1101e3a25d7a4d0 frame00000179 +35244e99f36c855b602a3f4a0bdfa251 frame00000180 +84584c367aa1e9f87f08274b7de4c5d1 frame00000181 +bdb25c6145bc40bab682b1c4e6208f88 frame00000182 +4792ce65bdec774f18cfc112b0791469 frame00000183 +0be613ec542752e69340294659a312fa frame00000184 +f5698792b0d6d48dd2d84375fa50209e frame00000185 +6d0c4a191cc61e6b85543cf70782b8a3 frame00000186 +fea8d004e9084c6de72b66c3936d7104 frame00000187 +6f9f07d17a76a8ade4642a1584d507f3 frame00000188 +c77e9f4e08f03aa83484ce756561a9a9 frame00000189 +c0125afbaef94717a95fd1ea707cc018 frame00000190 +b480d2df5f277abebc2ce0d323816fab frame00000191 +0e1a028ae19ed1d0072d149bee26c865 frame00000192 +1961986fcfab161280751e311af54885 frame00000193 +46e75a93274e113c3b9e0dc62ed11d2f frame00000194 +af5f99b25bda6c2738ca44a2e9deff1e frame00000195 +27eecbe2a42af1129b62b24bd0aa91ab frame00000196 +d62efeba67b6747ae5361df5d5dab635 frame00000197 +a6ffb78eb85ee7706ef5c4d8a372d9cf frame00000198 +fa76fe7f928225eda735ec6150ebd0fe frame00000199 +20a605a28be24f99c25b57516827be9c frame00000200 +b795fcc196d9c12b604667a23a323b43 frame00000201 +0590f72371a917b57985ddb6a5a5090e frame00000202 +cecf3feec25a3fae1387ba88e949933c frame00000203 +a18fd6f671888f09cdce700eda179982 frame00000204 +7b7aee13a45e339aef90e092bbd0d2d7 frame00000205 +9c6a0d84838157cc160bcbbf845382aa frame00000206 +13d3f5c140c60a2ad5c0f1b2fb0a229c frame00000207 +aa306f6630e9b38e8fdbdf2ab57aa273 frame00000208 +9551f9b060d8b2ccbd5755fcc905360d frame00000209 +b4d1eab7683cc2baab76cc59ca885eac frame00000210 +cad10f861efbcf3fe52ae5cd5c3dff7f frame00000211 +ad6c9d48a9ac6e80b2da49a13adbd02f frame00000212 +a5b47517075d4fba433f3c042f8f5142 frame00000213 +91087e4b30635245ee9588616dcc2270 frame00000214 +42c118f35cc06604cb936e8efa4ed714 frame00000215 +f21cc850ffb37084e6e3813f02f98268 frame00000216 +5187a4c182eeedbb534ebbeaa1741860 frame00000217 +cbf4145c46af17d3ecadc95cbfaa91f3 frame00000218 +84a32586bab242c9a735b038a3df54ca frame00000219 +8dd2ee807f1637ecdbe6183924a52db8 frame00000220 +27e2d8f3ecc20a585d2253b94d71852e frame00000221 +354ce30dc53f0c4de2c23f5963d494eb frame00000222 +7ede7fc74c55660cdf01bd2dbebb0bbb frame00000223 +0ff2deaefe32990eaa2176721e1d16a9 frame00000224 +40fd12d51374918991a8e432ff348a04 frame00000225 +46f25d6335fb266dc7ddb4b6ffa977f1 frame00000226 +aeffa0076118c839f5bcc07813f883e9 frame00000227 +65924ac1a2c9abc201d499c446f53e48 frame00000228 +1f8ede17a0a62b519bb501af780ae6db frame00000229 +81f41f14075ede8f3e464ad5c8e9d300 frame00000230 +0fbf5db424a1f5b68f09720c815f5a05 frame00000231 +431e516aee0e1c752080a0f48493e082 frame00000232 +8df4d72ed42a0764d10d77c436dd33bd frame00000233 +d170e8988fbd0ab7fb77306ca32e6f63 frame00000234 +a2c8bc3176fd4150594cca844da9a29b frame00000235 +1a431a9ef125d4b554fba5c34c80cab4 frame00000236 +6c1cd9f51d31277a4c5aa9492e7364fe frame00000237 +4937bfbb51c448aada7a7becba663042 frame00000238 +bd3f7f492aedc99f047a71a656caf9d2 frame00000239 +115ff15e4f0d3d85d2a79883143601c0 frame00000240 +846f2e3fd72b04a61ad5243ee5207786 frame00000241 +4047653d41f611b66514111bb60c1dc3 frame00000242 +5b9d09ed8a3682bf7f6adf5843fadaf7 frame00000243 +f8a1ecee08d2dcdea34a2a5e3cfd543e frame00000244 +5b6edba2cf16e378b0bde83792157e11 frame00000245 +dd5d9dc1d0ab2408152b27000b1af408 frame00000246 +215a21301a606bd427537cd86a9ce64f frame00000247 +c7d4460eb0e351cfefef3ed36a33ff9f frame00000248 +c176406e229dda5b3110d4559a6d7281 frame00000249 +3613401dd7de158da09b07850b2d885c frame00000250 +5f6cd47a054e870deb0538433c02947d frame00000251 +7b337e0449f89c53090657f1a2948864 frame00000252 +864a7f4e1f6807466968fdbff9e59860 frame00000253 +3fc3b9eb29ac795ee63ae45441ebf9de frame00000254 +f581a162aef5d31818720fcd55970af4 frame00000255 +eefcb69a83ab9f62c188578cad21ce11 frame00000256 +ae76fbd8aab5a5dfb01b29eeea88313d frame00000257 +a20a4965cc36505ca00a817096a05e30 frame00000258 +5bd56b3da2e62b4191040cbf8e8a0ce0 frame00000259 +eabe6e4246fcf674a690ca74377d2d43 frame00000260 +b7759cfbac25aadafb5153feda6fa7ac frame00000261 +f701c7b708246414a0b4746b8bb7be20 frame00000262 +38ccbf64639995d4763bbee059b61bfb frame00000263 +e981131cdfea170426b13ffe19b72e85 frame00000264 +c6e9db2b037afd9848acc08fd0c718a8 frame00000265 +b51fa1c219f4d11e441c84e4809b3758 frame00000266 +816eb22f930135d508f5b2f4015611e5 frame00000267 +8c6e5657d0966f89bfcc505a9ad2ed5c frame00000268 +b81484b270ba01921b8f1b2958127e3a frame00000269 +bec98dba3dbe1b630cc89e72d2696c8f frame00000270 +82d853d335cd9e0a6cb17bea77fddf46 frame00000271 +78fb2cdb8def908ebefe35b12202d9f4 frame00000272 +7bb422e1a58d91c3fbd3e207e3875d1c frame00000273 +37742ae2279c6b4e1e86a945535af86b frame00000274 +e5f6b7b0eccaae1d2587ea1e44e188ec frame00000275 +9be3d70827daab46ea781df1d2f10c9a frame00000276 +2036534b3f568a4ea56ac0333b7a50a6 frame00000277 +e9effaefe4902babea26dc5982fd3991 frame00000278 +76686b644b92b69ff0eadfa95be4a441 frame00000279 +60c87afa3df3928fcb5d93962e4b1efa frame00000280 +d9b2b4869a8b6adbe07855679b85b64c frame00000281 +10843f5762d750279ba1cfc1c7920a71 frame00000282 +825b83fbaed1376b23d8e7d3ec42b270 frame00000283 +4f77b5721d30d9ad6a75fc6afb3944f7 frame00000284 +eb2367666d9a25ee18252ec386e74f57 frame00000285 +3e3dfbd6b70beb28e55d1878046977cb frame00000286 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CI_MW_D.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CI_MW_D.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CI_MW_D.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CI_MW_D.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,96 @@ +b2ea86aa3bdc9d18515fa129d29b043f frame00000000 +4ad866300eadf1f20b7a892310cfae8a frame00000001 +bc4e45faf42f3bb98ea9335eed6dcb3b frame00000002 +1ffe43c1b2790ca4bb0478a1cb572f72 frame00000003 +5db1858014907dc8913e3bd36ea182a7 frame00000004 +182868aafd3317ca4972743b1046c159 frame00000005 +a16de3deb8a481e7a4c11e1d99b25355 frame00000006 +60f65b17a1ff177e806ef584b7677e26 frame00000007 +be5ee7628f24ae35984990aae06dd82e frame00000008 +fb9501d77b54f52232dbd4a40508ba21 frame00000009 +bc8e4108c9b255339b4f220209ba03a1 frame00000010 +709c736bfa12030bb1500f5cc8299166 frame00000011 +e94f4588159c54af7838ff2a1f3c29fc frame00000012 +b9d7c04d29b7e807b76eab1f13ece044 frame00000013 +98ee00489d089419bcfabf454712579d frame00000014 +c0f2959f126bddc4ee8059b0934c8cfa frame00000015 +1f0c7b169a9a0f782efbf3e4d5f92957 frame00000016 +f99052d837977f26ff4802f2601bed67 frame00000017 +29220c4ba68c4ab121892b78c1a7f263 frame00000018 +81b955fde1bb885b2ef3c169c2bff52f frame00000019 +a254f4f4dad316c209819c714b987b7b frame00000020 +9a1fbba36129ca4a8180df312cb527d7 frame00000021 +31d8418458011c01d0460b0fa4a0d8e3 frame00000022 +d631018a1e8c6b12eedf9da4f9b916e7 frame00000023 +c3b0890cf67779bee17c6fde851a3c9e frame00000024 +d023bddefc36182caaf7d5ef7f6d63d9 frame00000025 +6d33cf8ffb5f5e4a6c37bbbe410c3091 frame00000026 +434601b81a66eacf2123a4b22ef5ef94 frame00000027 +7f3ae44db78fe0640f9014362b556692 frame00000028 +aea04c84fe1f9adaf72ab00d3f278d0a frame00000029 +da08e6eee4112876b6e989e9efaed0b3 frame00000030 +81dcc20288cc1279b82de743e4bb36e7 frame00000031 +407cffe9a019977fb5c1e4dbe042df4c frame00000032 +856e69fbfdf4f49627a00c84f5edf5e1 frame00000033 +20dd0b1d1f5fb11b65290f5b05d085ab frame00000034 +406ffc086960bfd35047f4f562777540 frame00000035 +f0b2e573152f36e9e76fa4fe5dc8e315 frame00000036 +73f81f9b37c22594721cf372abbff4fa frame00000037 +f2abd39dc5ed62b3dbd23dd262b47d0d frame00000038 +27542f7596ecc8c213130da8c910245e frame00000039 +d2ecfc614a9c2b94cfb3a5f2ecaed3cf frame00000040 +cab97673c335dc697a10fdc8ae8e1979 frame00000041 +ce669c22cbc18df96e30eeb4554e9dcb frame00000042 +f9a910164be3d4571ff9032c9dd6d2cc frame00000043 +33ef15ee3f8a1b73caea2587d3a04dc1 frame00000044 +278a979e0d7aadf9c58701dd26e7be36 frame00000045 +7bdfaa80c460919533c64d265157c516 frame00000046 +d6e2b1397e78c78bb796ae22a2a3e9a7 frame00000047 +37655872ff3b5185e183abd91d9c7856 frame00000048 +4a872f6cec350b95a2c54f3c8bb8ee40 frame00000049 +23d092e049734c5636edcfca169fd345 frame00000050 +9465c158f4d09891019adcbd7f7a6343 frame00000051 +d66279fa885f6a31bcfabe8b2ee018ea frame00000052 +b3aa99e4c2cb71dbec5e884e6aaca5c3 frame00000053 +a9f19dc27ff6476714115ede96cd9db1 frame00000054 +48d39fb4999c3188af96bd5328a481f5 frame00000055 +453ad225c9659ffc8fad916083b27689 frame00000056 +dca366cb02123b2b4eecbeb9291ee46a frame00000057 +058a29fb9885934ddd57e2d14861f0e5 frame00000058 +f126b4b74b52dc4c08d52683e75891d3 frame00000059 +172c6122ea174240160394745667a101 frame00000060 +0aa03016fcf4132c4d62efea8ce8ce5d frame00000061 +214545816f4cc25a3b944c86821e8b8e frame00000062 +23ccf153fef1a70149226363728cd04f frame00000063 +ab16e5782a5278b8ab1556f3b1126ed4 frame00000064 +d03842abfefa49653f7f70a3ffd0f86a frame00000065 +45d218429281c0f22f38bc18ca50e7a8 frame00000066 +2c32f3f35a7946f0b876ba33941cbde4 frame00000067 +f7c3911b31f0115b2bd9432c7e4bc4ad frame00000068 +730d0f72840d07e6a3dfa83301fc5195 frame00000069 +c3ff305f4e00959e1985c03945b400d3 frame00000070 +373dfd1b6a5b1c20cacab43718c3c5d3 frame00000071 +97cbc737314386f6a2d628d0075a88a3 frame00000072 +7dfbe2bf1c4898aee98ff5fb658a87d5 frame00000073 +a2323ca3480eb92858dcf7ff48e77585 frame00000074 +8fe4656e98dcd3f705b6be583a800078 frame00000075 +e79d93f450d65852ea26e22c6774e231 frame00000076 +7faf004281838bde2eeed1d5a82d04ff frame00000077 +5a57697148bc4ad0e940421727010f90 frame00000078 +7074b6e4ede6523bd5472e11f2f20eea frame00000079 +d63b962e50266768b7ebd4423fabbf57 frame00000080 +7062b271e88e2a3826a32d130203285c frame00000081 +3e1021da9fde73899d5ae7f03b4cbee3 frame00000082 +37cdbca39a16072f6c7fb55cdb84cefa frame00000083 +cb4ff7d17a23405e63465315f6949f67 frame00000084 +f836059e0b1a524d77b56482e250c0e9 frame00000085 +acfdca1d7f38304f72c3fdf7a3023c78 frame00000086 +6fa534d03efcd9e82ad4e6515cfbe6be frame00000087 +e60aed27de11a47c753c5eb16559b7c9 frame00000088 +1dbbdf914cf2aa6b566cc60dd69e5787 frame00000089 +6d39622a6afc81575b08af39f2e2c5e3 frame00000090 +7202033c3e638858a12238ca8f377204 frame00000091 +6d971086221252d813f099917cac3a2c frame00000092 +a8dd021a45dcdda3dd00751d0e556725 frame00000093 +5a96fab55ed543b43a753db5d4aeac6d frame00000094 +50109c8e94c26f40dce80f8599ea980a frame00000095 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVBS3_Sony_C.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVBS3_Sony_C.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVBS3_Sony_C.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVBS3_Sony_C.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,293 @@ +b46500b37abd2767385fbf80d1222fa3 frame00000000 +dc63f990c5610f5c1ada5eed2b15d583 frame00000001 +4c5764f3418d19e957caae07193767ab frame00000002 +5e0cc36406654f451eb6ad6238a7916b frame00000003 +31930ce82ca20690ea49db074399b59c frame00000004 +8fe6ec946014da6ad1560d64778aafe0 frame00000005 +1bde0240773f0834cf2785c74092ce51 frame00000006 +2e23844a80f10476e3ebc9b3d85baeed frame00000007 +9b23ec4b57078e8e10e0e0e6f68434d7 frame00000008 +07e2375bf94ba032bd81723afa05bb98 frame00000009 +89475ff53e5ab42539725f228dee970f frame00000010 +50e6cfd10cc34f5f2a52f8dbd9a1ef21 frame00000011 +f0553c959d8c27d1e8ea0268c50e3111 frame00000012 +835574cfdb658f1075e14f77a80b10fe frame00000013 +f68675a66ecd040b2db78ce310ff018b frame00000014 +a77486f01a96e2f6e2b337ceaf1cf167 frame00000015 +879661c84af1c4dcad50baf6a906a1a5 frame00000016 +c0293c8b0c801874777a2c80d5a54e97 frame00000017 +a99be4345305cf59b0ba4f9080a18890 frame00000018 +db84765694b90fe9d0c7ccec278d2bd4 frame00000019 +abd4e761a85a0516320f1c0de2384af6 frame00000020 +9f96bf7773f7ef398f09005e21d82a5c frame00000021 +71d9101babb28d8b5e3131df4c923d74 frame00000022 +835ab8bf81d3060bbd4d585a69f9a145 frame00000023 +ce167ceed14bec62176cce97e062da1b frame00000024 +290c19ca5253e3c2ede3b4ee7c099cfe frame00000025 +703243ead897e3d3738e7293689fa3cb frame00000026 +027372f06921ba61613fbea4c3cf00fa frame00000027 +4c4817955c8a32a3032e095d4ff91a6f frame00000028 +3e10c01751def7af5eaad6115de46ccb frame00000029 +fd49086cd034421ba9bda319123ed969 frame00000030 +6ababd3c25049948468aad2329b69142 frame00000031 +785913c02f9261052d77612194758d32 frame00000032 +fc4fba09c2d7bade191667da47349658 frame00000033 +525d727f2d2a630a36d9c21b057e174e frame00000034 +b436f1589c5c47c66579da68a0d75f88 frame00000035 +67f6930912fdebf334add6740909039c frame00000036 +2f2a4ba5e0dc4c055da6859cefec35e0 frame00000037 +af0502c19d60d1de2eeb1cb562ec1db0 frame00000038 +4e9668287d4d88a59e06c9d37d22f203 frame00000039 +034e68ada231e99eb8d339b23e80456f frame00000040 +34c8065ca6a6caf3cddd4ee8a5c113dc frame00000041 +3f1c0d10cf832a953b2a3fa11880f9b8 frame00000042 +b1b993d520e2c4b65da830f274072e2e frame00000043 +bcf7c7fc41967d1bcd1efedbf0c00cc7 frame00000044 +f52ec42b3f8547157a1d1e64afafb9f3 frame00000045 +6ce2b38953ab567ee61853c236ca5866 frame00000046 +6a3a600c0264136dea083289bdfba4d4 frame00000047 +91331ca1de75890808f74286c9896771 frame00000048 +41fa839e63c4c39b7762111515450b65 frame00000049 +6b6b33274a6763d5c241dab9146741eb frame00000050 +3aa47597c5a8bd2399b0fd80b587e11b frame00000051 +0c9b25ff1d64bcde95cd52071956e4ff frame00000052 +0422ecb42a6b7438f7da200e2190224d frame00000053 +d3691a4c31662820bb82f39c8ab3c348 frame00000054 +94c76853072e1446371078b5321281de frame00000055 +c511c969c3b1889552f0c9c58933c7fb frame00000056 +a99fa17fab45bb9e5208501f7f196779 frame00000057 +070b040113b1ff5c5a73348c79462dc3 frame00000058 +41f1f53d8655296051036e0909aa63a0 frame00000059 +0f30541576fe042d2530f5e5e6712abc frame00000060 +f106bc09bae36ca8b633c856681fcf9c frame00000061 +676d3df7a661f12def2df5f1c33f287b frame00000062 +bea3b2a2b1a0e527eae15afd82696607 frame00000063 +6f0ab6b19e236eb0052e305873137b2f frame00000064 +9a2ccdd85224ebe8274cda26b8df09c3 frame00000065 +aae9568da14edc2c7c9d95b5a59b61bf frame00000066 +112ad8a63b2b947ed7da401756d4b89c frame00000067 +d70545c7324af233ad4ba7572a317806 frame00000068 +dfa3ff97ba22c865374992e87a2e5a24 frame00000069 +ff09e677e11a377fb5f0d819f04b2631 frame00000070 +ca85c149c39259bfabf53fdf20d5a2c7 frame00000071 +d1e98b6483292fc79fe275d6a033b819 frame00000072 +1a629144c33007e8fa33781f593ee26d frame00000073 +5d1559d793edaf1c69c16c55d54a3735 frame00000074 +b1f6ea5cd9b5e900a00ef577ad7b719a frame00000075 +3a6b85e3363bb9c08758e8f91156cd05 frame00000076 +ff5375cd83061c616a375fa49bff9cd2 frame00000077 +a6d61ad755186037f597157d3eb84def frame00000078 +199112cd9334284f0f7d029349f9f9c2 frame00000079 +0d0f3950a482095ec2fae0b57cceb9ca frame00000080 +e42b0cbe8b71a69dc2f8af4802d17c3e frame00000081 +aa8b3c3142d4b13e5f37217770544374 frame00000082 +7c325ab620c8fa02efeaf413986d3c67 frame00000083 +82c9b3cfa953a3b101d2947274304fe3 frame00000084 +ed36b6e5b027574715d4bfa995acd6b5 frame00000085 +f6282835c839a7a23d8e6979e75e0452 frame00000086 +8ed800ed3bf3acbbda0552ebaab08c1f frame00000087 +a3216a1de9e23abe6f40daadf69a3b8b frame00000088 +46d1e5ed376dfaebce3421fdc4b19781 frame00000089 +0e7247f76f0f5c2e6daae3ba55d049f7 frame00000090 +d242ee786396c1b1c7a164866cc19fe4 frame00000091 +2415001a08db077b6502f4badf4204ee frame00000092 +ccf896eddc45b6ac21eb4583b82e3d9d frame00000093 +babbba2628f0bc735b865756de7165a4 frame00000094 +70c208ba78d789a823674069a832792a frame00000095 +936fd422bafa9989e5349a81a5743598 frame00000096 +dc9802e197ba630938d206bab9c116be frame00000097 +570f419875abcc2b4cac34b82057a428 frame00000098 +d60d519c8ca9de4610ae4dc13c35c7ea frame00000099 +f526d264ab1f6c6d484057ee0a7fd8cb frame00000100 +fd44513e19c817b34d06667b1643d161 frame00000101 +3c2c77a50b49cab939ad1825d8cf4fc8 frame00000102 +ab0ae8575fc200fb3950395240c9e973 frame00000103 +325f8e5e79d3812d47cf06b60df7b715 frame00000104 +b9e908ee2b8c1e2f694623560b410038 frame00000105 +58c7d76cb5c5fe26e729e82f12bd9b6f frame00000106 +8b59d6c0a90be3ec948df946ffee3f51 frame00000107 +f18f14a5165f906470ea1d2253120f3e frame00000108 +15a167e4290b7430a4468ea9d91d037f frame00000109 +2caf6a9f03ae03c63933eff0d3c538dc frame00000110 +640a89854234f8ff4cd3b01b0d269739 frame00000111 +c1596233a044d25f648d5f325b0ca676 frame00000112 +d5a1879fa2bcbd65827c80477d8a2bf2 frame00000113 +ca3049d37ea85b5952449b3280c03aac frame00000114 +eb8268ff7d03971d974758549e60e963 frame00000115 +593cdb968a5b90a69e507c8fad495599 frame00000116 +027fde8524fa56de5b3cb2ea264df8f8 frame00000117 +9f24bdb632ec1ab61d0201d7f612af3f frame00000118 +5cf999c6500f4e8b43c84a4adc980b27 frame00000119 +da1276f2181b03d926b6fc3a41157e9c frame00000120 +5159092cba3b2fd5b31463a06d6674e3 frame00000121 +cd6da544fdf0448490ad589b122cad70 frame00000122 +8779eefc6ede1370ce4bdfa96c32e24c frame00000123 +ab9f02dae7ae6a46b01244acab0a2be8 frame00000124 +ccd84c34411db9f5148634e9bf64f04a frame00000125 +621d0a47e2aefbd80e69b3bbf7fb2406 frame00000126 +c70aa1777fbead05b2b7be3c6faacfc2 frame00000127 +62bc8a893bdb910abc0443845e03724c frame00000128 +ab143eff05fe6dc98061ea45cdb94140 frame00000129 +e8ed420a7e4c6491f53e7e230510a9d3 frame00000130 +bef694ce82983721fbfe09dbca4c8b17 frame00000131 +4cfd96e1b9ef9d9717ecf9a1b7e171bd frame00000132 +cb527ad5e1dd563c4b13a58601a1e469 frame00000133 +e842c5df472fb33e1354e3d444bc1b42 frame00000134 +e4aba77ef89dc06cb5cc6d52ed239e66 frame00000135 +a02233a00cc7f1da349b59921bc58212 frame00000136 +bec0b1addf2b6b0b946ca4e4c2424309 frame00000137 +75bd4712cffd0096ee60428df9ea62ef frame00000138 +866e04978fd31deb9d13fd1193bc32f7 frame00000139 +e3b54d1b9801ea98e170eeda78ef3a30 frame00000140 +d3d5f0b6c68b1f3cd444065e2106277c frame00000141 +fecf0da30cafeb8667e532bce282a91b frame00000142 +9574a00ec17d599007aa548cc2aa27a4 frame00000143 +858e6163b36579aec7a5c8899cad5208 frame00000144 +c1b4b8871e896652780afd2c9c749b0e frame00000145 +d489583833f7c98a0587280560c3a1d7 frame00000146 +022dd930d67c37b9299acba7c1e74cd7 frame00000147 +a9b19a9962f201325d48bf9a2f3ee55c frame00000148 +4b79952e8ebd9a9867549076f0ab8e48 frame00000149 +c08b540fb36b8645c4e7a2b2649241b7 frame00000150 +d982372be2d8cd18800c037c910e3371 frame00000151 +fae77b551de3e6bce6023bfcbb889f54 frame00000152 +2946d2818b9cc369ae274e09331bb2de frame00000153 +1f6c56cab9043eb219a93d0c6ab79b58 frame00000154 +433c886bfb15efbb7cafc6c081c81c2b frame00000155 +11e722723c59748d29d380fe5a000661 frame00000156 +0e5ff44a02db934b46e14032cd2ee2ad frame00000157 +67a4cbb66e617c8bab1e1f62c253bacd frame00000158 +cd90097914bd7d14b01b74956c23d3ba frame00000159 +bcc60c2409e5d48d209d0e355bdfcb3f frame00000160 +999494f3def0634aa268c50b27cdaddf frame00000161 +9c74387f45accabd6b7c9e4f3af2a6b3 frame00000162 +6cb73b6cea2f43109e54a30c91c9a6f0 frame00000163 +3a30507827b0906684ec8c85b43a1395 frame00000164 +c4a0a6d69f2691c3df5c13a931a559ed frame00000165 +3076838bba1af87367cdc81bfad5ba6c frame00000166 +fdfca0725b88d7654e63e71f88b90142 frame00000167 +8bd4187c8b1ba639f569d8e0fc837d01 frame00000168 +99e342c4f7fb078be21d57f010ae8d9e frame00000169 +e17ee1c36a6edfa00af5f59d4307cab3 frame00000170 +fae2e4490c9c824936f1e7e31e04af3d frame00000171 +e71c4fd41cab670509d7b93f40ce8876 frame00000172 +8eac953e50feb551ad934e8d1c2b35b0 frame00000173 +0273253be15bc0e8aea87842629e7310 frame00000174 +642fbcfae11262837c18ca8753041599 frame00000175 +4d8029958ed999b930edc977ccd252a9 frame00000176 +783a39a400de090a1eec9f115f2b2a4e frame00000177 +2689bccacb8ca5bf986fc4edf341f583 frame00000178 +8d2f6ed253067aec9bfc2ce76c4e310b frame00000179 +d4158fabd8fb66c49cfd4834b05a35c2 frame00000180 +849af34097cc3700262fa42fa88e37cc frame00000181 +7086a2549dcdadd1360dd388db30870d frame00000182 +701a68b9193535ffcf5f92374a8fb1f6 frame00000183 +fad9380239bc11cd356842fb4d8f7b29 frame00000184 +3c1f83374bb7f29a7e2ddba7708679c2 frame00000185 +29cb857fe7fe3a34f7f5800ae5718759 frame00000186 +712fd7eb859281bada69bd12b0a6ca6b frame00000187 +7a6cbdef26adfb47921dc678e3b04bbe frame00000188 +c86b5b344eee119808af05b93d8dd177 frame00000189 +d5f8fd41b98c715bbd667e77fc0c976b frame00000190 +5b3e8e96c863430b2a38e87c7e690601 frame00000191 +3ad2950a7aad0db83ee818e3c0130d12 frame00000192 +2e530df8065e141d35a9b65f448ec854 frame00000193 +50581a28afa5cad1e94d98841675670e frame00000194 +2214c25ebb40816f14b358a2ef2d6def frame00000195 +3b44cfab12d65e9caa721e24e62ce250 frame00000196 +f3a91f893bf7d1666a98eafba73256a6 frame00000197 +d9004491e4afff4dce1a868f518c2484 frame00000198 +fd4603332251d580a6e2fbc72785f3a3 frame00000199 +e4e2c98a98188ed4266d9e6533005cfd frame00000200 +f7795820632e12f2b8e5fa905ddfe936 frame00000201 +817732675033bd5ac6180901cf7b6b76 frame00000202 +6974d0051cbfd47c6066c957a070a95a frame00000203 +1f4fd97f1bdbc10589216042df99dd28 frame00000204 +4cf175b4228a8340ec785d76485af9a8 frame00000205 +c4a60dc70e6f3120198f391d3e7157ca frame00000206 +c9376f35e9eb45e3d279d358c62e3642 frame00000207 +3f206ea841cedea6d7e88ed3d9dd5922 frame00000208 +721126ed91293c46f070a9fd7305fbcf frame00000209 +73904b29af15ca1ed082c8ac0e864d5b frame00000210 +4c84d0b681e246cb4e988e351e71e472 frame00000211 +747673502ea5b343654aaccc35d0c2d8 frame00000212 +6fde65ed670a724a7e6bddb4732c4a8c frame00000213 +75087f8b735371de743b206876929399 frame00000214 +6a5f2263555abdac76403e8c78992f75 frame00000215 +c5430eee5c6494b51d23072d732a9365 frame00000216 +a052b2311295efb2a9753187cd49f07f frame00000217 +4a293c0ee6b2a04690f74d3802eda379 frame00000218 +d2935a0110c414430a7d1b25ca8c44c0 frame00000219 +70b56c1e8149cbb0c61ffb376c57a9ca frame00000220 +e8012d187da74e1fec76fea01432d327 frame00000221 +e89aae2c5f1f90ffed283b9e1645fd22 frame00000222 +b297938b98980bc9fb12c285ad8a7e5a frame00000223 +1950153aebaaa57a67dfd5d8bfc4035d frame00000224 +0614171a960d41aa9a6f842a78c2cbb8 frame00000225 +c0a3e7395b21f986b745f2dbbb1d2b7c frame00000226 +0206f0ae1875bd8fc6fe4e01cb45e853 frame00000227 +cb3c693e8fa49535404648fd6d452298 frame00000228 +71d1dc36ea455c76a85461496b233893 frame00000229 +b9a37cb7d21e2f8f546eced159e114db frame00000230 +f96f1c37c9658ea5b02494919cd18f24 frame00000231 +72ac14af333e3e593e886543b97e827c frame00000232 +a241b90b397f1afd91c38d295cb10b86 frame00000233 +3d45a1076814b21e7b1f5010221de7e5 frame00000234 +81f69d8ff37870e3fc3f4ccdce5e1dfd frame00000235 +d9d98bdb3421a422cc3ca9e445ac0f8f frame00000236 +c5ee9c41981edd3a7c4def192d4492e7 frame00000237 +86086df6b0fce877ffa57a1494d03483 frame00000238 +489b44e835ce8b29743be7d3f0974c7b frame00000239 +f32b74e9e1f10b4ac980b501c8876d45 frame00000240 +c0d892a2cf32edc2e855273a6b53d17b frame00000241 +99ff8fc38d17b987c55ac35ea8f0e584 frame00000242 +d5a0fc71b9c1c0ac369026432f4e5798 frame00000243 +81a76fd5628ce544d6bd1c4c8201153e frame00000244 +9a37b3a41d87f27140b60435b7eee8df frame00000245 +3c52c03333c7e3eed964ce2f6907bfce frame00000246 +af78f891252878e86cbed2eeaa98abc1 frame00000247 +0527267cdf4904692c24079d1ff1ec42 frame00000248 +7c79188dbf02a21a5592b22dbea26e26 frame00000249 +e797bf0c89da7946028f7269a5fa15a7 frame00000250 +03c26fe98734eea14a6e6c22e3cea299 frame00000251 +37ac5776986730a87ec14de84f7d6737 frame00000252 +a69db4fe2eb379276ed57de1ae7e3c8a frame00000253 +0cdb6c9c2e38036ce5fd0329ecf160cb frame00000254 +306c1013fb5571bbfe4f8438f2b40ed5 frame00000255 +d9687f82bf0be4f90b223db88b26e560 frame00000256 +3f9f992b912d7453eac6310a473c9e29 frame00000257 +186d2df714906c41fe5a935048702f06 frame00000258 +0ba652406fe904ca0acefad2a7f71763 frame00000259 +bd35c7f756355af87b7a5e8da5e7fb08 frame00000260 +75f1cf2dfc9ad28b4a646665f7082e49 frame00000261 +7d73dbac1f52a72344cffea8c236c513 frame00000262 +7b462e08c6e4ff8b84c5b95ae3cddca3 frame00000263 +f5926f417bfb8bd091a5fa8b02b46bb7 frame00000264 +1b6725ff9c624b0e96ddb97a6d2f3693 frame00000265 +0e035f1818422e333223556a5d314eb7 frame00000266 +42ad677fe6a5fa41a81666d7d9b78a32 frame00000267 +3a15846070c757c4d1621c03a4a48239 frame00000268 +2e30ba498bd28b3e7e9547983f3700a6 frame00000269 +16ec921734678f7974c838320802ef07 frame00000270 +3aa08494d12f4864ec7aa479941666ba frame00000271 +5b8261fb1c3908eeb949f451d50090fd frame00000272 +420aae043f37b7af0c188c7d1a3d7b35 frame00000273 +5967aa49272f620fc96f78f7cfd59820 frame00000274 +ea8e0cd2493524fdd4986f0589143187 frame00000275 +d3f5f1bc27a243cbec0545d431776037 frame00000276 +0c0be523ac7851d77ceeed38a4022ba9 frame00000277 +00700d86dce69d83c89eb0ad244260a4 frame00000278 +4bb436a81f225e25ba55c21f4ce8f1d0 frame00000279 +65618cadbe90accf6eb870412704c6f1 frame00000280 +ea1791f40ed143374e7855c833749c84 frame00000281 +cf6c24e4c69ac9e25c0b85f58c78e1c3 frame00000282 +fcd260225a0ad28c6fecb5332e6b7f40 frame00000283 +f69ef080a4e87910ccadbafcbd652453 frame00000284 +9df94163c8cad225c70a955afb46f324 frame00000285 +d93ed985021d7ca616e20cb57d5d40fe frame00000286 +5a7a2df30cddb46432da89888677c531 frame00000287 +f8448dab84b8ae20c2adb725150e5ed2 frame00000288 +e97b6f8f970f7b5f57a5d23a53c2854a frame00000289 +ff0bcce36990105dcd979dc66d40f987 frame00000290 +6a4608cbb52ba9accd1c064dbe805c28 frame00000291 +d1986d31403906cf067010fd8b3a93db frame00000292 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVCANLMA2_Sony_C.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVCANLMA2_Sony_C.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVCANLMA2_Sony_C.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVCANLMA2_Sony_C.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +8b2e996f713c555f97b26244368daaad frame00000000 +c364d6e59371128c9dcb90d2efa1440d frame00000001 +ec24109228646f98a0c1dd03aacf225e frame00000002 +fcc20eb544ce0e3b1367ecd02c3d2ac9 frame00000003 +4d2b99ccbf81165aa9c837b3c671874c frame00000004 +f6b614762068d65f4b861d3b91e1a135 frame00000005 +c6b788799c3eafe51ff3bbc06ac21d4f frame00000006 +bc00c562557f705023e11b61103d24a1 frame00000007 +d7fcaf4b6f23bec96ab969fc33b2b1bb frame00000008 +ab2c41a1acdb3820d6549887b228263f frame00000009 +542a1fabd2290da2cc136df583e39bc4 frame00000010 +c88774f19e99c534f6215f93e11c34cd frame00000011 +ee9c2c94de2a1cfce93e88da95c27e0e frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVFC1_Sony_C.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVFC1_Sony_C.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVFC1_Sony_C.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVFC1_Sony_C.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,46 @@ +55ab5fb5e9e68b799a93132f582e3447 frame00000000 +23a3db7cad849f80ac615b8ee47f147b frame00000001 +3c0ce3fbaf9e0b36345b180670edd655 frame00000002 +1948a3bc173542974a4d2e33d373dcf9 frame00000003 +e150ae34a3b41e7b6fdf666d5a19db30 frame00000004 +98f0a9f59094ee273c1c445bfced562a frame00000005 +ef8fc23a90b8c96652d0fae938ac86d2 frame00000006 +a5e156676e631e00be80da4378926595 frame00000007 +78ee2eee3457f4d00de09d87b86491c3 frame00000008 +2cc7a6372fde7e72d6069ab5d40e5588 frame00000009 +9fbafe28febf2ac799b962e9f2c66342 frame00000010 +c00fb1c7204e1e33c62ee8fd29da35c7 frame00000011 +3a4f607620a181a9bce47ba2fe4a6c50 frame00000012 +2a79d53170556237721cd8bd763e95b8 frame00000013 +53f94205530e6321111fb0f5a4aaba03 frame00000014 +1117e2bc58b0cfb643aab7107df6da07 frame00000015 +ce37aa8751a1e5978e1aa8f4bc6d5cf9 frame00000016 +e0b8ede0c77f107290bd3fd58d174e1a frame00000017 +388d79e080bf582966397d9bfb83aeb1 frame00000018 +5addec611dade86c61659126abfa8050 frame00000019 +1e8d72d9d0fad3b5292f24563b713af5 frame00000020 +823bf04e6c77ede25199c75aad04bce0 frame00000021 +6a13ae6029e535c08e079eda1b89f234 frame00000022 +54c4a5476038b4ced0b29472c907b114 frame00000023 +5a772d22ffe374709598f50746eda2aa frame00000024 +ba8c0c2a2725427eb260ef461f5ff2af frame00000025 +05b93cba8852c3895122bd797952de7d frame00000026 +34e3df836b8775e1539ce2a441ea1ec3 frame00000027 +413028ca38bc015b494d95dacd7049e2 frame00000028 +51192bc60b6582406cf03d6bc97ae8b6 frame00000029 +8d81ab4a319be5be3f1c141a306e9b3e frame00000030 +24a96c8c238883ecabfe62372b9b84a6 frame00000031 +a50102c4ce2e5945e17bf3f083176d3a frame00000032 +59e306b1e0683b3f8fb84377735f5d9b frame00000033 +3093f4ad34a3c7c1a64f7ed5b3bf16cd frame00000034 +ca8a480eeec57243e462906a27e28b58 frame00000035 +62df5d2c63c6f75fe6593c4ad55fe857 frame00000036 +3c7b41f62e9f9b33b149af7302bb8a7f frame00000037 +fda46c6f62ecd0f2c0b629512bb6c2b1 frame00000038 +fec9c50ee97c4d5f9b55f19192fc6889 frame00000039 +541386683e46131b903483638c6a0faf frame00000040 +3fa123fbd5d24c94148d5c4df6c38bf3 frame00000041 +ae6102410b7b95c38b2c11e3ffce707b frame00000042 +0653d3bbe9632d6221b9c05fd4dc6cd3 frame00000043 +a72df349ab9f732779859542299a3fe1 frame00000044 +9ad79d56018005c438c6e102718dcbc5 frame00000045 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVFI1_Sony_D.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVFI1_Sony_D.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVFI1_Sony_D.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVFI1_Sony_D.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,15 @@ +a63aca062a5eff5f71fdd40e3e9d37ed frame00000000 +e6afd75f608f4bf986c38f1026e7cc12 frame00000001 +6c62bff1d4aaeb11e35822f82d60f325 frame00000002 +4a3fafa7b766f0a0ebc5f0a57eccc47c frame00000003 +9f95b31f1adf50fd0271d9b25bd64870 frame00000004 +31dadef10ade404b35bf578ea6dc4b4f frame00000005 +1b390461b69407a23dc736e759fc1edb frame00000006 +2ea25ba35531230f8affdd907bfaa49a frame00000007 +bdcb0b6f1fa97a4fc60ee3d646eb1e22 frame00000008 +b55070b7cee2380831c09aac254a3e5f frame00000009 +9903a715411a6ca8828207831195b578 frame00000010 +7e0e98fee8733c1fee6ffcce7dc9df41 frame00000011 +43a037de850ffa6c17fd6be596a08e77 frame00000012 +9dfc383e88af83e7cd665eafcc497a0f frame00000013 +1a08c31ffea43f9428211085f347d35a frame00000014 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVFI1_SVA_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVFI1_SVA_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVFI1_SVA_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVFI1_SVA_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,5 @@ +eb56be79aca5582cd9579555be55bb6e frame00000000 +5c33e0bf5c5158cb4d51920976f8617f frame00000001 +62be84d5c69ee13f43a14b42b56eb6b9 frame00000002 +e4120e1dc2802be4974c3f112ed26027 frame00000003 +0e71b29c56798518235b2885c18dc5df frame00000004 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVFI2_Sony_H.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVFI2_Sony_H.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVFI2_Sony_H.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVFI2_Sony_H.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,11 @@ +a63aca062a5eff5f71fdd40e3e9d37ed frame00000000 +031c032af135a71989d141226566d6ab frame00000001 +82ddfb4ea8853cb3fa2c52d3bef28948 frame00000002 +e3df912700a74a3df83dc08c71ea9b2c frame00000003 +aeb679242d8b50e76a6e2e17ba84d3ad frame00000004 +4aa480fee57d09cb35f87fd4054aa194 frame00000005 +c1728f2ceb14492acc53d7aa403eaf06 frame00000006 +4c983a9408f19b2a0605be343056fbf5 frame00000007 +17b29842a7b03a951f345ba084ba55a2 frame00000008 +a12921990e4c436fc39d8b9841d70673 frame00000009 +8e8fad305cee38b9f859c99c70658064 frame00000010 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVFI2_SVA_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVFI2_SVA_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVFI2_SVA_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVFI2_SVA_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,10 @@ +df5e07f970ffd2374dd714e79b91ed6e frame00000000 +4eb5f5d3e7d5409d7c74692d72650fca frame00000001 +8abc1f01ade3b1a7f758d7d6d1b43b5b frame00000002 +d1e1be9d418f80554183c044c6de4a3c frame00000003 +eec6853bfef9ec137e7e0d1bb92ac208 frame00000004 +cb995520a25279497a56315c24240f35 frame00000005 +a177622e0b92d44579b58eff87b2ec53 frame00000006 +9ca605961736df40725d691390569aec frame00000007 +ff6428d0684e8b90e1778447cfe85a8d frame00000008 +d20d7e8eaf467277f3455e857ead2c69 frame00000009 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMA1_Sony_D.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMA1_Sony_D.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMA1_Sony_D.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMA1_Sony_D.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,2 @@ +ce8efe91f2e9bb21b668f5830865c446 frame00000000 +77f86251620eee5b80f8691cb7eacdbf frame00000001 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMA1_TOSHIBA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMA1_TOSHIBA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMA1_TOSHIBA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMA1_TOSHIBA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,83 @@ +ff51bc1b823219d7070f7fc3d952071c frame00000000 +e18af2982b5a2b1faa1a3d5b715922fc frame00000001 +83ddbea48de52d53262127bda0842766 frame00000002 +0b48c57490d43259b4faef0efbf9d002 frame00000003 +2754ea35430978e5b14b4706abd09b8b frame00000004 +4f9315cf18963123bad36048fbe607c7 frame00000005 +21e069393dd65d526c1a0c771a54feee frame00000006 +cc998aa2eda5c7cbb700b8e07283030d frame00000007 +d0bf43c91db9eccec6e2857138620565 frame00000008 +d9d2d5e8f5af6c0e398bf6bc1a39e62f frame00000009 +85804fc5c9f4abd19ae6b558d9fe129b frame00000010 +af6b221665901d0f40cd84aa361e1aac frame00000011 +a8d9e1b788d6c973eb7124d79565f57f frame00000012 +47fea84257c1deca7b164ec6898cf6a3 frame00000013 +843558cc806dca3f069e6f0a8e8425ee frame00000014 +c7162cfa518496fd2210fea32fccbab6 frame00000015 +92a0586472183053bb14d6e7135a9b8e frame00000016 +c5df4ab72a15325aeea362ad98352294 frame00000017 +ef02d15319eea40905065a2f2e3e6c6d frame00000018 +fb4be382e451306b65b4228e74a8789e frame00000019 +83d690599e88933cf1bf4b6ce313f2a5 frame00000020 +05f1b4cd4786d40cf19580d8ac8d6a41 frame00000021 +1f3a7a5c5521e9a262dfe957ffaf6a55 frame00000022 +2a77ae187cd7994e64ac93ee4701e9bb frame00000023 +52298f5bd5e42e6ccb6bfe4cab4efbe7 frame00000024 +8e17b333b255eaef61e643ea63d13d79 frame00000025 +04a1dfda179e56453affb2124cfedaec frame00000026 +08c7849aaed2cb1076b7a54cdf274bee frame00000027 +be05d0e6e9c8dd3e772c66fa7836c74c frame00000028 +d03135940b4d8fac7fae44696ddffacd frame00000029 +dad69e6ca19e630e36adf214f42a03f2 frame00000030 +8874d42f4837c630204504fc87be8a42 frame00000031 +08ba51b4093d57419903f88b491366a6 frame00000032 +940b5ad294522f17586fb43e131caa90 frame00000033 +4e22345b4247b0a79f678df5dafa5a4a frame00000034 +b00ad8c838f7b96708bc9e4cfbc1d53b frame00000035 +7d0e51708c7ae240620ca8255c7bd846 frame00000036 +dec6fe3f25efc1fa1432eb80eb5d524d frame00000037 +9ffa736920a7ebcb717e28a1ee9c9bf5 frame00000038 +a7c57ebbaf122371f88992f3358e2f4d frame00000039 +af08a4271b97655065d567889c4da9fa frame00000040 +36b5a0f7174bf7b36a3bac377ca8aece frame00000041 +bc8c68e6da6792f471519d31a5e14dd4 frame00000042 +4b03d37670b048a2f2c21cf82f8870e7 frame00000043 +6989ee4ac75daf01b59228d64ec7fde4 frame00000044 +3324b191ac6256d475fd26f73bc1ba63 frame00000045 +bee7ed0f03134577b5a7dd5ff0da42c5 frame00000046 +884681853b2fce14fd4718de8a657e3b frame00000047 +2abe4a214c8dc2bef40b34fefa067ddb frame00000048 +62db2a3fc1e82342f4a0b2139399114f frame00000049 +158da9bb3cedfdb39a1f14d7b5b96b02 frame00000050 +82f1e84c5e0490ab0532748c9c636665 frame00000051 +139dae54b471619623c69bfb03416b30 frame00000052 +d0878d8ea34f7c7f194c611c5246614d frame00000053 +a33df946849849612dc915aad229fa45 frame00000054 +4bdc6298dec564f136933f1aae9e594c frame00000055 +eea0a758bb08006fa6fa6b7a76319ae7 frame00000056 +36f0f2bf352c013b424cd93eecd1265e frame00000057 +8510aeaa81c9ef56ab17d3963d0d3435 frame00000058 +c6ee22f2798a82868cb090e3796a76f6 frame00000059 +5e8823b6bb54e99fe272bd07f95179fe frame00000060 +13dc6b9f3b277214eb0657117447904b frame00000061 +1f5f95c04e55c211ce090ab28857ea5b frame00000062 +c7ac1c9047ce9a67a1d627fdc689c34e frame00000063 +6486cc5693232ce8aa0afc610c4e00fc frame00000064 +5d6e73d3de107c4a25828aa3a582bef9 frame00000065 +e6901288fd1a1c9ab52c2b24fb260012 frame00000066 +18cc463eac8fb62bc1efada08fa71dc8 frame00000067 +027a86c7c3e3822fab998511df3c2d39 frame00000068 +1ebb071a20ea5f3caf84e38688e20df9 frame00000069 +5de8e757935ee83e502c81522824e16d frame00000070 +3854b7027a3c20eba5b18d1cb81173e4 frame00000071 +80e658d03ca61231ad998ababffa6fc5 frame00000072 +8f23f06110a24f74f062264dd0fe10ab frame00000073 +75728aebf9633d5e2281b364e5d951f6 frame00000074 +6dd528f1cefaed4087f5cba5723cc013 frame00000075 +db06612296ed1d61aeeea7559cf83706 frame00000076 +37613c91cdf444647e81f0ea2190e33d frame00000077 +ba85e4fef6aa2f8b7c712daf2f402391 frame00000078 +6d6deba52a5b6e9d7bd02d58df661907 frame00000079 +4f0765e8fb85c1ff5666e953b0bf1773 frame00000080 +c2f81bea4edd1ccaad0935769fb87b88 frame00000081 +d5486764d54e7d8aa374386f7fcd10e4 frame00000082 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMANL1_TOSHIBA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMANL1_TOSHIBA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMANL1_TOSHIBA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMANL1_TOSHIBA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,83 @@ +bd9e14ce912073ea07c8e743407a1d08 frame00000000 +32b546ee08f50f157b97e022dd63a0e7 frame00000001 +4107f81ced2b8ecc978e1b18a9d9bdda frame00000002 +84da898988df090074d4b7d94836b3d5 frame00000003 +8b2d7ee81000165982716f2e5272b0a9 frame00000004 +2d395840169131e2a0ad2743839ef859 frame00000005 +83c4000cfca901f0c1c0534e5fff52c3 frame00000006 +85f9f304cb1d38ffb623bf27eb238e0b frame00000007 +2660a94e23c7219c644d978eb62cf389 frame00000008 +bf01097bb8e7d0acd76928ab2ed160dd frame00000009 +bca65e753a437ab005bb010876cbb258 frame00000010 +e53c4d813e83b9a650438870437eb4e5 frame00000011 +2be72bd4f4ee861c91a004f41764ecde frame00000012 +aa4c19a26425281236621d14176f83b5 frame00000013 +16e030aa9c92630caf507899fcdf76e7 frame00000014 +4baefa3bf5cdadc891ecc8a5137a989a frame00000015 +616764c63ef00f655d8bcc3aaed81ad1 frame00000016 +59f83d53985a0dc224ac9c866f79fabe frame00000017 +c5823b9194851dbd8620c78ad93ea4eb frame00000018 +a839384bbc0d92df3518e057b4d12dc6 frame00000019 +ee79709fae845698ea572dd079f3fe09 frame00000020 +65596d898bd7d33f06f21283c5d5d3c0 frame00000021 +2ccc747bd30e8f61fd9a5584369566a4 frame00000022 +1d8c7e6407520dd503303ade8a330c0a frame00000023 +983ee5e8f3d49b7dedb44db2686cc727 frame00000024 +6dd672f9dbfe058bbd23d835f28cd657 frame00000025 +326d0eec0f2f53d3a2ec00c873970081 frame00000026 +641fe0acaa9c7ad94819c09c3a52db6a frame00000027 +2580250a67197f0049459d584a731df7 frame00000028 +ed77afa365ce7dc45d382d2e6dc3c0b9 frame00000029 +4047a89fb2cf07d8ac70bcf8f4fb37ee frame00000030 +d7e73a2693b82e1619969f12bc500f82 frame00000031 +010fc19bafc2d848f02d7e40ed3dceda frame00000032 +5994ab7cd15ca3af09c412b7195bd611 frame00000033 +a662f3d2c8c6913705d6b23eab66260b frame00000034 +4f6bb43477ef8ca090b54b837f27de2b frame00000035 +330f429d8b9483c24583f53588da5a92 frame00000036 +d4ee88a84ad17d8cd1f88bde3f6fabf5 frame00000037 +7e1838a082eb13a6400186a0a08a3673 frame00000038 +b0c10b9320f1ef0cd4734f7c038ce5fe frame00000039 +6b1bb9f7c7d02d467e16c0c3d08fc8af frame00000040 +52ab4fb29a5a15e6ad4439a7dac70d8a frame00000041 +411001782c8180925f86927de1d9ae90 frame00000042 +697d8062929f744e3a87f4bf3008b6d4 frame00000043 +6a9003a98c9ac6a2fee7793ff709285e frame00000044 +8090d351fb49926e1fbe78a3cdc97b60 frame00000045 +28d67a06fc9055a2eeb23b9afb958fe3 frame00000046 +12a1e9737729ea083df998383415409d frame00000047 +404f78b1e42043323a7a8a4965511ee3 frame00000048 +75ba270d5459106320c511262353e6d2 frame00000049 +2f693ffb80ac9252e78f9d22506b9689 frame00000050 +a11ed26acdf18a43c5f1db01cddb1817 frame00000051 +48138b16915d0879b46fa4c45b789963 frame00000052 +98665b172c40cee96fbbf6b1608a1d23 frame00000053 +61be9d4900e76cea0deb192bbff83f1d frame00000054 +ba3231809801af076909661ebb1fe758 frame00000055 +dbbb708461df12f56f08a401e448d9f9 frame00000056 +3e29f6cb033eeb075830b05c4e97caf9 frame00000057 +e4e7e2be3780f938b5a3002007138a8d frame00000058 +2c76320e138e630e9a22831d6e9e1bf3 frame00000059 +bbe61775bb31116bbd2ce92c60db55a0 frame00000060 +e8e87b62f60039b0e6ee1d30a2664780 frame00000061 +312a5e84d58b2eb6fb9bfdb3b5c6d598 frame00000062 +9cd2bffdaf25639caf638772c066020c frame00000063 +599dcf956b4430404fb5ec1f9b0b762f frame00000064 +8ab1cddee101ff776e89244f548f3284 frame00000065 +05fd31db95f2e0c2a17e7edc19e60c52 frame00000066 +7f538c40310aa5175738fbad2be8b18e frame00000067 +ead78f3d315b055bcf82a79ae34ea000 frame00000068 +9c926854da2e6487574ce7a5d0c63ed9 frame00000069 +ef9e9cf0643b5fe00987ba97893de14e frame00000070 +8aa4d0947ec67ba988b130980878a9e6 frame00000071 +6e6b578ef5bee3bc8b95370f6286d398 frame00000072 +fe9d2206284685d14bec109f6e6c6fc7 frame00000073 +24e9b644654d3bc164cdb97b20b69e59 frame00000074 +f5a2352cf782437f65dabe99c5d10330 frame00000075 +c92c5fc7912a7e3c477b325c442d024e frame00000076 +2b02624c19df8a32a947c547adeb3f4a frame00000077 +1915945664b6c6adc730cb593045c2de frame00000078 +5dd3cc17331c5dcb0964542dd168cacb frame00000079 +478e09f20d8085bf77cc7217316da18d frame00000080 +ab93a511952f5e198bd255862eec696f frame00000081 +10afd9ebf664803bd67e63397d88f296 frame00000082 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMANL2_TOSHIBA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMANL2_TOSHIBA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMANL2_TOSHIBA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMANL2_TOSHIBA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,83 @@ +bd9e14ce912073ea07c8e743407a1d08 frame00000000 +00d9b78800efa2e80fba52f048861c50 frame00000001 +eaf0a4bd76976cd0e0f02b1b45b134fc frame00000002 +84da898988df090074d4b7d94836b3d5 frame00000003 +16a4153f31125d7182a1f7288c6e0bb5 frame00000004 +c519e48328843bc54fc257eebfe4e479 frame00000005 +83c4000cfca901f0c1c0534e5fff52c3 frame00000006 +bc2e7dfd85a5d7b0570458f02111cebe frame00000007 +4f6b648ae5e1e0aeec06c1bd00dc9c9a frame00000008 +bf01097bb8e7d0acd76928ab2ed160dd frame00000009 +612602e0d0aaabe8630237f585a631f0 frame00000010 +048888fd23bbc356119925c8ba502d8a frame00000011 +2be72bd4f4ee861c91a004f41764ecde frame00000012 +cf757350a7e4bdf66c3bd4b355329a59 frame00000013 +76ba1a344e859d260c3cdc3070f47ac4 frame00000014 +4baefa3bf5cdadc891ecc8a5137a989a frame00000015 +7efc627d3f61ef5c5779fd4400cfdcf5 frame00000016 +f7e4557d1f79884d8c3649d27e4edab3 frame00000017 +c5823b9194851dbd8620c78ad93ea4eb frame00000018 +55884b7a874249ff18eabad9d9f7318f frame00000019 +88ddb63220e5b00d571a0488774c9035 frame00000020 +65596d898bd7d33f06f21283c5d5d3c0 frame00000021 +9959ae8ee709f73ca352d0015304f9a6 frame00000022 +9595cbc2bba47d6918e524f40a48b1c3 frame00000023 +983ee5e8f3d49b7dedb44db2686cc727 frame00000024 +6969f189630eda15ba0c5aef803c4b9b frame00000025 +745b50e8163a3f0a903bba8f69663835 frame00000026 +641fe0acaa9c7ad94819c09c3a52db6a frame00000027 +7cc74010af04deb11c06f0ae2dc91f29 frame00000028 +584b0a7b37706db9d3fdbebc0f0e9446 frame00000029 +4047a89fb2cf07d8ac70bcf8f4fb37ee frame00000030 +b8e41e25190ad12e14170cb00ae8e5d0 frame00000031 +4d1eec2c619269e62c7f317505a8dc84 frame00000032 +5994ab7cd15ca3af09c412b7195bd611 frame00000033 +cb2f91d1a36beb4343fc7dcc6f356f93 frame00000034 +6dc41e357b11db6abb33b8702b4f31ab frame00000035 +330f429d8b9483c24583f53588da5a92 frame00000036 +5f5ff84e4bcaf50ac27b93ba0d773d46 frame00000037 +c187f200779641db44eef954a5c2b127 frame00000038 +b0c10b9320f1ef0cd4734f7c038ce5fe frame00000039 +1be6e2717aff8ad5970d30cbcc1ad744 frame00000040 +3e66f6ecceb3c51abb0a7cbcd653b07f frame00000041 +411001782c8180925f86927de1d9ae90 frame00000042 +a85567327fd91c67189f1f068ae39dd5 frame00000043 +857dffcd49d07a62baa5856f84644ac1 frame00000044 +8090d351fb49926e1fbe78a3cdc97b60 frame00000045 +f94ef1b18eeac064d45c6a7d9d041617 frame00000046 +93922de0e79819af7363753bd93451fb frame00000047 +404f78b1e42043323a7a8a4965511ee3 frame00000048 +3b9e09a0ba272fc66e3a823e4b01c912 frame00000049 +852cabb52195d28d877e3af74917bf17 frame00000050 +a11ed26acdf18a43c5f1db01cddb1817 frame00000051 +e71d49155ec89ac439c6d365ed29668e frame00000052 +eedb4a9c84144a171a50325114c67a68 frame00000053 +61be9d4900e76cea0deb192bbff83f1d frame00000054 +a08cac3ae32235d60c42e4549eeb294f frame00000055 +563e8e7f8c31f4b0200a23deafcbdd08 frame00000056 +3e29f6cb033eeb075830b05c4e97caf9 frame00000057 +326a959e3be3e88680c5853de5021d43 frame00000058 +7b35456fa5d90ba59d254b382a2d8ee2 frame00000059 +bbe61775bb31116bbd2ce92c60db55a0 frame00000060 +0d229910696c66768ab0bc3cedd62299 frame00000061 +8691be2ebf4f0e452979727bc29d07df frame00000062 +9cd2bffdaf25639caf638772c066020c frame00000063 +3aa3d9c18e86259be565678586ab54c9 frame00000064 +27588c806583182e4197943df03b1389 frame00000065 +05fd31db95f2e0c2a17e7edc19e60c52 frame00000066 +34646e6d8e3869bc5583c6e7c27c1d44 frame00000067 +f12923734ddc6204dffe7197d0914d40 frame00000068 +9c926854da2e6487574ce7a5d0c63ed9 frame00000069 +83c07d0e955626bd199504689c7179a8 frame00000070 +0d43f2a0dad0947eb90339c788705b5c frame00000071 +6e6b578ef5bee3bc8b95370f6286d398 frame00000072 +a229e19530f44eaf9f8a6d7cd2f7181f frame00000073 +1426ac033ac2bb9df1435a8b30ee9ea5 frame00000074 +f5a2352cf782437f65dabe99c5d10330 frame00000075 +afdc9819bd432b5935ca45bee00d8654 frame00000076 +ed518b5eee72d2a014e7ed30339775e5 frame00000077 +1915945664b6c6adc730cb593045c2de frame00000078 +7601ec7f8a4fa9b61b10e6f19557b97e frame00000079 +db51d4d82366073a4f7fe70e034307ae frame00000080 +ab93a511952f5e198bd255862eec696f frame00000081 +f94d699561414ce09a9616ce8737bf8c frame00000082 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMAPAQP3_Sony_E.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMAPAQP3_Sony_E.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMAPAQP3_Sony_E.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMAPAQP3_Sony_E.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,2 @@ +4692eed717bae7421b66e03fb0237da0 frame00000000 +5ab92414f5852290a98f14e85c7434f7 frame00000001 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMAQP2_Sony_G.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMAQP2_Sony_G.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMAQP2_Sony_G.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMAQP2_Sony_G.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +ee3eb73ad8ff3be3f23d8df562c88e2e frame00000000 +df87192325b817dbc0f7159fb45e110d frame00000001 +a8ececc69fd7f8b4c697b5945ffe9b06 frame00000002 +339b88c0adc7b3a7ac69b001cae89bc9 frame00000003 +0005aead1dc837879a8fd76f8fd8c3e0 frame00000004 +d8e5ec320ee4700080f2288c0001d92b frame00000005 +ddd3a26d6150e9e541754b54a685ed21 frame00000006 +c9bc87c9826a2dba837e3f746729985b frame00000007 +d3697445db63008f5232f4f15afc3b60 frame00000008 +73bf30461abe79adceac6249c6a56fc6 frame00000009 +49cf231bfe5a56de10983ffdea191ff8 frame00000010 +d02a3882c460132bd1c447c43b324795 frame00000011 +058e076952a4356ea90562d93e437b73 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMAQP3_Sony_D.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMAQP3_Sony_D.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMAQP3_Sony_D.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMAQP3_Sony_D.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,10 @@ +ee3eb73ad8ff3be3f23d8df562c88e2e frame00000000 +4ac1b3ae1a958eef71ea3adb6a415d3d frame00000001 +773c72fdad07342a43559786e68e43ce frame00000002 +9f91dc9d8abc23786abf9c3f38ab29b2 frame00000003 +5953c1d34befdecb10388217a129180e frame00000004 +62e50244ac757a7472c60a41613366ea frame00000005 +a3ace4d70a84302fe5232c2b73aedb61 frame00000006 +254863c8b449513539308cc727c3b21f frame00000007 +1ca092f6595405d7a4f3779e4400de9d frame00000008 +3358a1b18e603f092af684fb7f6d32ee frame00000009 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/cvmp_mot_fld0_full_B.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/cvmp_mot_fld0_full_B.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/cvmp_mot_fld0_full_B.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/cvmp_mot_fld0_full_B.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,27 @@ +f9fc7f5b6c3f0ad948703d017accb9a6 frame00000000 +0a4ec0bc173e10e819e991297b735fe7 frame00000001 +978881f29a4baf9c5af6e3d8ae8a65e4 frame00000002 +64b2ec4c34ba170e8e518faf8e99fdcb frame00000003 +6e3c0bc1dde4f4289b221498dd1eab22 frame00000004 +8ce922b9c48bf4f952044b45a84ff587 frame00000005 +448753ae94f411735bf5ec85c086b0c2 frame00000006 +4a658af905dcf8e0de26eba2448155d5 frame00000007 +43a427b2a5dbd288e6aa98bf6dc28631 frame00000008 +25ae38ce2eb6de3f755dd92fbf94b010 frame00000009 +3bf7a6e24b767e637ab4342211375817 frame00000010 +b5a46c35c957f894529942175d783ade frame00000011 +7881c7a48692621777b37ab68199da1d frame00000012 +16e8cc259db0f65f7a5a46edad555908 frame00000013 +ff28a0c678da811b51d157c442efe0eb frame00000014 +af7ed6af04827045edc542f982f48a6a frame00000015 +f966053d1354330180621ef1645a099b frame00000016 +3e614519ddcf6e03f5cfa824387e748c frame00000017 +1aeab0cfad22ea2e4b7eb5412de699d0 frame00000018 +2920c1e8e02c9959a56ec1615ff34701 frame00000019 +91d46d7a00aa8bdcae2123b2f546e2ac frame00000020 +3dcc70a9214720c2a62ffe4203ab0c3e frame00000021 +301fe356d403f0924c84a79d88b95d6b frame00000022 +9b950b97bae9418649d685a6144d14e7 frame00000023 +ac45639cd98a3c65e66d3a05a751eb77 frame00000024 +79ba5309379790a7f66966ee5129df87 frame00000025 +3ac053538b2b4acd9193ba0422375125 frame00000026 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMP_MOT_FLD_L30_B.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMP_MOT_FLD_L30_B.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMP_MOT_FLD_L30_B.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMP_MOT_FLD_L30_B.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,27 @@ +c4c50be0af4f9811925933b4ba06a42e frame00000000 +364e675e1a24dee142bbdda337757879 frame00000001 +8301c46f9d53842cf2f9cfd8d843356c frame00000002 +fe50ef6eff00bcf1a662b073380900aa frame00000003 +ddbeb1326ddf41e9580a0ba2b12d80f4 frame00000004 +6c0d9ce434f08b156d61579e22a0fa65 frame00000005 +867e6c5d4f094b7d4cc6b91434009bf3 frame00000006 +3ee665bef76354094a339b55ced33171 frame00000007 +81ed5647e3ea9205da81501a25c4e5ca frame00000008 +5d716798a68855b9312c9a4172e9c65e frame00000009 +ce206798d8f46f2eedff192c2c476a96 frame00000010 +d514d0aa6bbde527217a86e543220ad6 frame00000011 +ca18987487b54051c78e05609ac4cd30 frame00000012 +48639cd50bfbb2447030c054ce52a33e frame00000013 +65336d4695c7f9aa20d481065b6dde6c frame00000014 +e019092e6f6b601a6e80fb4f4f8f31a3 frame00000015 +93f18bb90fe0e94203381116207eae6b frame00000016 +273a3d22cd70d298ce2bd7047f2bac48 frame00000017 +1d9f7662bf67017fee5a31e716f9f2fd frame00000018 +efb93884ca6b5ff90beaf098c7dc7b7a frame00000019 +73f78dfae7c6ddc9166e729a9f282666 frame00000020 +926ab02c83c9eed93eae7a1ce07d6539 frame00000021 +9f506b0739c7c363a3191e5e31c7b875 frame00000022 +26ad45a446adb6bc93783e1b0207a6f6 frame00000023 +e906b459580cf811f3c4e23a3cb30451 frame00000024 +2a8f3c23e9d881cc0d9e7ae519ef5e0c frame00000025 +9555611cc401c03b12fa4854e942d3ba frame00000026 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/cvmp_mot_frm0_full_B.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/cvmp_mot_frm0_full_B.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/cvmp_mot_frm0_full_B.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/cvmp_mot_frm0_full_B.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,25 @@ +5d9752e6fd9678cc0f5a68d945e95091 frame00000000 +88b256bce4b69f4b382c8ea67e8b4e6a frame00000001 +b656ce35286e9882eb5cad328567d2de frame00000002 +f586377286961fb89f2e79bc574c4c5b frame00000003 +7073d4d19704770ece310c01fbb5eb85 frame00000004 +0ce3b3a02f886d25a52bad94634139f8 frame00000005 +126e2861618d6aec3bb70f1f8a15e18b frame00000006 +0447c748b8a192b1d278d7dd02d5ab86 frame00000007 +fcedf9ae6f3127e649822c1b171bae81 frame00000008 +d1c03f87d588bfb4529da98ab85c8115 frame00000009 +fefc920b0a625e941c10d0eb7099df57 frame00000010 +7d3dce5e20dab828bff5b3b2f958e4ef frame00000011 +2daa7fc0e2b0b2323a2d11b7838fc266 frame00000012 +c512f59f76593f3fc22fcf01ac3187d0 frame00000013 +29d6f02a56d2dd437955328d678ea261 frame00000014 +aa0378ac0c7a6846aac45a0e2c4dd331 frame00000015 +76ebd714a3154514977821dc9e830bb2 frame00000016 +db0434020512d37df0ac239b4e37b2a6 frame00000017 +f3012df31c6b4f9f7a52fab4c947d4c9 frame00000018 +93d2723f78dc2dd20cffb66743479835 frame00000019 +739ec05b71229ec1f7604c3ba47366ce frame00000020 +ea41cf3944c807ecac977d491cb0b21b frame00000021 +0605a08df042092d138e390d8421f4c3 frame00000022 +9233767daa5c1b3c59a03b176c1b22da frame00000023 +fbc7567031fd04ad75875a3d9218d12b frame00000024 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMP_MOT_FRM_L31_B.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMP_MOT_FRM_L31_B.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVMP_MOT_FRM_L31_B.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVMP_MOT_FRM_L31_B.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,27 @@ +92d14d2e4e8263c47d54314cae3885f3 frame00000000 +e3822e134796635767faf8d9b6aca7cb frame00000001 +117b4ed37643f3e238b847dd8505b8bd frame00000002 +16350624874c15b2c847dee10b2ce386 frame00000003 +a880948d4120397969e703aa9449bb9f frame00000004 +a62a210e0bd7ec9c4eb3d94f036ab99b frame00000005 +1101c328fb4fad9df0bae3a376713a80 frame00000006 +9917619aa28298dc35fc4cfcbbc7fd97 frame00000007 +f7fca6cee98c8fc4d685316d822eb0ae frame00000008 +79759da362532066fa79b14a4c6afbea frame00000009 +93f2bf673bece4603375baed73b92b77 frame00000010 +f004e2cc4181ddd3877314627c266f73 frame00000011 +3439ad71e92a8b94f6f1236acb566e96 frame00000012 +d131cc719bc79299a2ef29225bd13e83 frame00000013 +83cc9576f8277e45c27be8d0361b776b frame00000014 +4bfad63b146cfd1a8c4dfadf65384669 frame00000015 +e0a90c541e3d6838af59152589f325dd frame00000016 +dc2a13b1a118c376da4f30c7e1b0d4c4 frame00000017 +c135706450211c44eb1126d9969cc560 frame00000018 +9bc178e71294f0da4096db20bb404806 frame00000019 +820fc6ac7241b7fdf0144fc03cba9acd frame00000020 +ee1d40c022c929cd55a003f2aa06b206 frame00000021 +e92147a0ca14cd40a32a06f954ad6dd4 frame00000022 +b5722c0ff8dc3bee3b587b68cf13f142 frame00000023 +ed712c45693c735ed7972b57ecd238bd frame00000024 +6899b5225b4e10efb5700fb99f4a9686 frame00000025 +f6fd9e1178562b407e42a0a101456124 frame00000026 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/cvmp_mot_mbaff0_full_B.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/cvmp_mot_mbaff0_full_B.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/cvmp_mot_mbaff0_full_B.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/cvmp_mot_mbaff0_full_B.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,25 @@ +5df7225996924ac3e1c34403e97f4367 frame00000000 +c00bfb3acdccf8f02587d95e1a3006b9 frame00000001 +93c8ab6f82b54b8ddcbedd55f1457332 frame00000002 +fe905bb9ab6e1675f139771e441265c5 frame00000003 +9ab590c27e67c48c7a59381e81c2883b frame00000004 +c9a908f35d78c23295c6fcad61cef5d6 frame00000005 +3b8245bbc3be4891d28c0fc149d8a233 frame00000006 +ee5f3daf9344d8b875abc8c10f1faf41 frame00000007 +d8b45a15e42d1ac699c85bdef220eda8 frame00000008 +93309121b849d09eebb63d27c9691523 frame00000009 +e6404af69da34cf7c342d3c449d4ab7c frame00000010 +2880020ebfbddd424093bf3badae925f frame00000011 +03dd3d621c2a160e64cde19af36f85b8 frame00000012 +339d42018130f184415c49c6cf598f93 frame00000013 +deca128debdc2e57f03895ae75efc292 frame00000014 +5bfc06bcee8411291106438dabd738cf frame00000015 +1be9ce8314bb736380643e8036473f21 frame00000016 +2c9a5da68e4765ddd02f4fab03c0fad5 frame00000017 +0d17ed3814523f9067f70a889e15ab74 frame00000018 +aa5b696f18283871dac08b6a4026832c frame00000019 +2e2881e5755e3be997848bef3460a7bf frame00000020 +d947ac4dc9bb6a1908d1d93e8d34c81d frame00000021 +23b44c5aa21df0a1d4573738d359276e frame00000022 +2f2b58f201f6eb7b0e01ac249f834ad3 frame00000023 +ea9b78b2cbf49975506529af31d664bf frame00000024 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/cvmp_mot_picaff0_full_B.26l.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/cvmp_mot_picaff0_full_B.26l.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/cvmp_mot_picaff0_full_B.26l.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/cvmp_mot_picaff0_full_B.26l.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,26 @@ +dee2f25a9e7c2386c0a8d643a121c3ef frame00000000 +d4c1a0a2cac13ea3ffe4056c87e55fcd frame00000001 +51cec8f783d8bfe18777f56c5946c5f1 frame00000002 +be0f6d6551dc561479b06fccc2eb8f66 frame00000003 +0f7d0bae8f20dec85e82faebf8d1a15b frame00000004 +ee6cf1eca56052cb91c2d2728f2787fe frame00000005 +f362c80b2cf148f9f97ddbf05face5cf frame00000006 +d04ef472791c8611ab3b109b30501e8a frame00000007 +940ea672c432c2e553e17aada7d02c76 frame00000008 +ed8fbce7f03d93a6d19e4f95bc83aa92 frame00000009 +c11df39a0285517ca6cc7fbb6be2c1d2 frame00000010 +12db529c1fae61c0a89317afd6950f2e frame00000011 +b22d2957f8a2704a4ae63bc07364f5ee frame00000012 +30a0161e6bd1a8c3951d01e0ed9238c2 frame00000013 +0392c3f05b2d716147375db3429db324 frame00000014 +a97e4b6c26da3f10c7f1a07259fc1438 frame00000015 +524dfa652c15fdecbacd729724ec324b frame00000016 +d0f9957181c27fc62143b991c424d54f frame00000017 +5cb9ab6b9b5058813f26dbe11d98c626 frame00000018 +0b765dbffa78051fd51ed742b9b7842b frame00000019 +ab3cecd82fb874d9a59660fa2424c8c6 frame00000020 +12bf0bceab8683d23660f613ce0bdabc frame00000021 +a73cf955bcf8139895257440cbb30a36 frame00000022 +32f7eebe87ac68b5effdd66a83ff86e6 frame00000023 +2303327b287a522b9c3673bead88a453 frame00000024 +4dc3749b44f2bce1982ce4b7da51cc6d frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVNLFI1_Sony_C.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVNLFI1_Sony_C.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVNLFI1_Sony_C.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVNLFI1_Sony_C.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,15 @@ +63caa232a2522eff69004da26c66a28d frame00000000 +f2f868cc92f4ffac0cd558906db70649 frame00000001 +78fe8e9af8ec4c8668c08e04f834b7e2 frame00000002 +cafdebddcf5ce3f403e6264841deca1c frame00000003 +f870ccd9246ccb9555d6030983f5e199 frame00000004 +3e6deaf6d8f847e4e76f37b5502f067b frame00000005 +e2980f233940aac53cc687c6d8b9cf18 frame00000006 +175c561b9d593ae8b9b6c2114896e192 frame00000007 +14b876d5bdcf57c7cbe1959346676444 frame00000008 +2638d3158033f4d1a086e6a1233f5fce frame00000009 +7120aa3d9c29806c59bab1bb3bfdcb41 frame00000010 +a83f18b2d2a7e45d579f9afab52b5c08 frame00000011 +083954b57a0ce11959a98a61e7fb8119 frame00000012 +c75f27aeb36421b2f52f8fde1569bb97 frame00000013 +237ab81b96183fc89132272864c3e0fe frame00000014 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVNLFI2_Sony_H.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVNLFI2_Sony_H.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVNLFI2_Sony_H.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVNLFI2_Sony_H.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,11 @@ +63caa232a2522eff69004da26c66a28d frame00000000 +a288f9babb13cc0b263a6303b18de713 frame00000001 +a1e6c2abdafaca14015e2dffc62bb4c9 frame00000002 +67bb695d99f2524729efed9a69918234 frame00000003 +99dc5c6131bc22e64732fb41e9b42268 frame00000004 +c0eac6217431cceed1b3cc4a1dbf514f frame00000005 +c9138d7055623db36a2facd61f7f87ed frame00000006 +a2b05b5d465266e12eea4176438844ba frame00000007 +3b3424c14f840027bf120415d2bb9a41 frame00000008 +0201cb06ca6e0b8fc14edec1600ffae0 frame00000009 +460ac3bc88b62da2f0b386edb8783a82 frame00000010 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVPA1_TOSHIBA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVPA1_TOSHIBA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVPA1_TOSHIBA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVPA1_TOSHIBA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,84 @@ +fe6dc8c16b2f37415083b67fc64d7473 frame00000000 +bada1748a8fb7d0beb74d817c5589825 frame00000001 +d31ebe7175b7988c4486befe113a8879 frame00000002 +29de96c623779ff1c69000d4ea4c8409 frame00000003 +f0e6ffcbba34bd306344c96f28a5967f frame00000004 +3b9a6549c05b4060f05ee3c591d450e9 frame00000005 +1879feb61de0973881a906ac621aecf0 frame00000006 +f6e79bf9ce6d84d00d88f992608417b4 frame00000007 +94914688b963533ae3159b80affa679a frame00000008 +d9dcb35d988af4164a8daa3c62e86a97 frame00000009 +56b7c69e5e83ce85b24697e1bdd66081 frame00000010 +0bac9ca8379d1633d95de5f2322ca542 frame00000011 +bee62a11fe41e76c7a43425105905253 frame00000012 +6a6da2d6ad17aa210128dd345fdf6d1e frame00000013 +a12b01bbc46ed2546b75f78f1a17231a frame00000014 +9c4b1af302566c034c3f788892d4d561 frame00000015 +61b00dc66461b5e252f8225868ac6e59 frame00000016 +fc985e328c67a1f078e2fc82048964bf frame00000017 +d014bfd3d47008f41f0e6ee5adc325f4 frame00000018 +e0d06a5d905871fec88687f8e00162ac frame00000019 +2ffadbcf4d61d4c11d9304a0cb14bbef frame00000020 +82689d0da251afa31cefd9c6a2060ad7 frame00000021 +e0ef88cb8cb3d10cc16f78e6a2e671dd frame00000022 +bd371a6820e9a27f82cc60bd350c2411 frame00000023 +701613fd7af99e2cc562868cb73d4d34 frame00000024 +39b14272ee89e9eaf85683104c042dff frame00000025 +9b50c23cb6feb612451e8e0b456d6512 frame00000026 +76e095cdc7676824698834614c7c532c frame00000027 +8e6ec8f592c541fce2112416247b3a11 frame00000028 +ab42fefbe7a7bf1c2c249f75aab79269 frame00000029 +d79b2a63f89c10f2a6def98692e3d228 frame00000030 +4ec5180b42f4bfb47ff9c23976fcd748 frame00000031 +6f8bac10448296f5642e20e4b73ab558 frame00000032 +5301ea8eb47ac19b6a7c6387d52a486f frame00000033 +5407762ed862d1d6d896bb9e9cd980ed frame00000034 +3c16907b730c8fa53d5b0de33ed077e1 frame00000035 +31a5b56f3c8127709818b8f3268983e7 frame00000036 +4275e58b20e3f3b9c5af6acd642b9665 frame00000037 +adef5cee7580eaf6f32dd0413e445e5f frame00000038 +1ae4755c8540ba4f213e5bf829883da0 frame00000039 +0ca8b567f595a30bfe036124266af73d frame00000040 +33974a48384cfbc0ce1f11d6fee01f02 frame00000041 +f7b5a7ac073f14bf2a65865025a7a1f6 frame00000042 +cc12067a8d933ec4967d876e4d89bb53 frame00000043 +b0452f45d9ab77fd7f7bf2bd578029d3 frame00000044 +ba0a1035a5a1f5b976b9bcae27e7ca30 frame00000045 +e5cb992d431eaff034ab2fe05cd16429 frame00000046 +6ab6f8acf1fd1988f60733d79828bb3a frame00000047 +933da8f4312c1210425bdcf0b5a6f781 frame00000048 +a7466211be8ea6f205a87ffe28924d2c frame00000049 +8674b4562df61cc3c82d30f34495657f frame00000050 +75a62af636278dad6b8addb296fd1a5e frame00000051 +1855e6377578c79f1493bec5e4558558 frame00000052 +26f37d16cb6961a55299986e7df82041 frame00000053 +ea7891b921b4588c3ef8059c272461e1 frame00000054 +c0fce8671fc28c05b1eb9ac9be158be8 frame00000055 +08e6578e34dc154460599d3fc9512bfd frame00000056 +583f220bb09df17e56e47835531697c4 frame00000057 +be3964e2a86f90ce5e9f024c73472cec frame00000058 +d79a6d0aa6c49d7600109bf31c4d1396 frame00000059 +2b03e3027375487dfe53e58afcd3fb5d frame00000060 +15ef726c6be904422bfb4b9c90e95c03 frame00000061 +11e303544c9ec140ab289adefa3874fa frame00000062 +535fff86ffaa530fb8364b633e44a702 frame00000063 +ca856d602daed704bca3b1939da31798 frame00000064 +eca5be3dbf4d2c79b986e87a6ac586ed frame00000065 +fac8b298c8c3ddf207c70be1cba1edd9 frame00000066 +717c1530aad3c3251a58d1e6a3e8abb0 frame00000067 +008e6c3a78927d0c5850cdd07d5e0d54 frame00000068 +9a7ef18769201db4a0795f6fec89e622 frame00000069 +17c77b50ebcb541fa2dbab263d281f31 frame00000070 +bcc776a5d8e88d8176ee1f74dd28edc0 frame00000071 +8fd776d72336cbcde131c512fc92207e frame00000072 +41fb0d661734eeabd77b6dfca4a85bf1 frame00000073 +9fd6d870c7ef36aa7d637bddc31457cd frame00000074 +a79b22d288903a09ff84cbdff715ab91 frame00000075 +c93019d80f0d8f3847ac82729eb5ca3e frame00000076 +30179b995de935b89dcc38b389f87d08 frame00000077 +438291de24ce0fc13b79baac16022ef8 frame00000078 +a872d53ec652be746c809f13c1788e01 frame00000079 +b3871de59d11039c4083c21b12d14457 frame00000080 +b7b490e9793a94a801ec45e89fdb3acf frame00000081 +8a8f84f12fb9b7328af406f9c0ad0df4 frame00000082 +c7d0493d8d2c9f1dbab90c332b7fc108 frame00000083 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVPCMNL1_SVA_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVPCMNL1_SVA_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVPCMNL1_SVA_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVPCMNL1_SVA_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,26 @@ +b3c236f6b5d732c2bb4b0d25e2184104 frame00000000 +250bad268ed46c417ab6fbf189c04f8b frame00000001 +2a63326d3db0927b3b889ac5b0d88c33 frame00000002 +5f8252843a0c1f3a4abc5641526a3a7d frame00000003 +282573053a843f91a5bbe4c34009d063 frame00000004 +dcdb51e5802297970b8a95eef1f4a25a frame00000005 +d79672d927f8bd213103f8150e515b81 frame00000006 +e8f73c2e3f3dae5592aa63b02d229b65 frame00000007 +a810175a3438b0a0b5b0fdfd4a252b08 frame00000008 +0a99eeae908248077cf7d11e6c28d501 frame00000009 +37c0d6b644a4f934f445c4ab98c68e02 frame00000010 +da1c5ca7ec8a2af2c741b04226735cc7 frame00000011 +19dadb4ab4baa307357dc60531d1e52c frame00000012 +521ad18b6d4d75d3428d2fdee43ea810 frame00000013 +406067f522ca886b581618e35e05d405 frame00000014 +410a90d45aa4cbb9cad76fbd19025cf2 frame00000015 +8b7884e7beefdace9586b6aa3dc64d08 frame00000016 +14164e3905abc22b350dec366ccef683 frame00000017 +cd0727642d2f96f9c91be9d8b1a1d5d4 frame00000018 +b4c8cd6fc003e8a80aa3aafee4c6bb5b frame00000019 +7cbacd922001525792bab04532a0e6dc frame00000020 +c1a90ecf356175921e4b6d01860910b9 frame00000021 +51508e94bfa83fb0fcebc9fb8c0e5206 frame00000022 +1b80ffd5b01b3acfe4f7fcd2113196a5 frame00000023 +4f935589cb378876355168459caf8f59 frame00000024 +557d9c2c10a1cb86994b271642d61fa1 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVSE2_Sony_B.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVSE2_Sony_B.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVSE2_Sony_B.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVSE2_Sony_B.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,274 @@ +b46500b37abd2767385fbf80d1222fa3 frame00000000 +5e9ef26563bc0937d8756fec8f6b0b97 frame00000001 +38b50498e48d7ab28016c086386058a9 frame00000002 +dc190e9baef2e40003fbd2ca2bf4dbb9 frame00000003 +9d3255828a879d834db2b9431f33a6bd frame00000004 +e2b6498a16eb901ce934efa2fb6edc08 frame00000005 +6257a7e16aadd71b3e3944f04be904c3 frame00000006 +96d0b80476d2da57efe4d4716892f3af frame00000007 +5528c4149b9cf65d3272393fc1542c02 frame00000008 +977474ac935767dedc78e265f24e43c5 frame00000009 +8651f40b66ed4a443f58698c60bec5ef frame00000010 +cb2ef1ff038543cb5415ea690c367466 frame00000011 +cd9ff38314058067327442ad6a0a33ba frame00000012 +f340d9a20e4485b89c3c31a5e4f948ca frame00000013 +bb4a7fa10b29a1ab48e74ee711ee2068 frame00000014 +835574cfdb658f1075e14f77a80b10fe frame00000015 +eaa2944600205470cb09008cb7e070e4 frame00000016 +ca4e5b08918e401000c57e5d9fca494d frame00000017 +1ab1687864bc1672fd9b016bb8653004 frame00000018 +3d085287a5e93f9d6a65820124a95f5e frame00000019 +7bcd8fcc5575605f26ac00beffd43149 frame00000020 +987238f205eabbfb2b4b80f8dd153ae0 frame00000021 +1c8628bd188c20d83b53eabeedb43d00 frame00000022 +403bb02ccca26ba5de3a7a1e922bf194 frame00000023 +62448cf54f15d433dc3d40ca5108f56e frame00000024 +ea1fd142afd25dac53af7e104357556b frame00000025 +d3f9e95f0920899b8ab8bc1652f6e6c6 frame00000026 +6261c83db6449a00323ea11a35664793 frame00000027 +99945e10d6bf68dc63509a88a7ebedea frame00000028 +3448d8acf047d9e7375a1729748d14f7 frame00000029 +4c4817955c8a32a3032e095d4ff91a6f frame00000030 +d81e3e075488ef1aa88f945521b2c2fb frame00000031 +91f1768b8d5a6d19b669ff2208fed3d6 frame00000032 +af55878850eb01bd05154206bec90134 frame00000033 +1d37db2c259d7271743ef42626fbc5ca frame00000034 +61f3e3054ef611b34f555217eea956b3 frame00000035 +0573568bf33a0ad8254c5ce851d42c5e frame00000036 +ad11f4259241e456d110b15618a326a3 frame00000037 +68976150685422ea9b672bac4829c4a0 frame00000038 +d0399d94012831f774e4d27c7038fefe frame00000039 +0d93bc5888142ca48297754793f6d566 frame00000040 +31a9d84303bc558b80fb1f61733c2d0a frame00000041 +bf93138c66c0656aa4069181e376e766 frame00000042 +1eb866b513970f7773cc170f04c0d1dd frame00000043 +ea144837815afcfd570649ba61409f86 frame00000044 +b1b993d520e2c4b65da830f274072e2e frame00000045 +931328c7e53d126d13f50b090c619940 frame00000046 +f18488560383a44c06ecaf5e6c7ddb97 frame00000047 +324c3eb4184fbaa477183180dbaf1a5b frame00000048 +2e51f64f44b9934cc7e1cbe3b37fe92c frame00000049 +5196cedcdb8e246ade87ee02635bfdd3 frame00000050 +17887dc0ad2fd9cbb3f087f9a42b39f8 frame00000051 +a92672f50e01994c8b4e8d2d0714ca17 frame00000052 +a084f8a24213c4af07bbb414def92823 frame00000053 +174918effbcd5a2c8e67c4909ba090df frame00000054 +8e52aa648af7fbc1474bdc567b92f4af frame00000055 +9fe8e418de4a6f6fc60435d0ceb75882 frame00000056 +13da27212537d9c20aed350421ddd77f frame00000057 +d43689ca8e97e5e1417d210ae12929a0 frame00000058 +1ef3cd7d9adc183144f719269ad49ef0 frame00000059 +070b040113b1ff5c5a73348c79462dc3 frame00000060 +3f89d8f1bd9e833dab22cbaee756f599 frame00000061 +bbdb53bc9b5b90e8978f644696845f6c frame00000062 +5127b8b65e585ee4e487dbd4fef0c4cd frame00000063 +4259c66effdaa2d12f446875f4f59f9d frame00000064 +66dcea537882241d9795c16e46d71d3f frame00000065 +fe629ed3f7e05fb2d53c91ccd2af2ed6 frame00000066 +6cee5669cf5ff31df9bda03e3fd46470 frame00000067 +21c283315a71a4976c0a66bb3a4ec18d frame00000068 +46f2c3a75b345b6ea408803ac2d08b54 frame00000069 +d1820753f6713a51987a3ec3976c9d08 frame00000070 +4d8dc8899c6ba69021a32c89e08a2bb8 frame00000071 +ea85e9738b0ea9842a9993c691377c56 frame00000072 +22caeb91fc0d7fe22b167c9e7cb7074e frame00000073 +f589957f0151a02aa5fd9e8684b60f83 frame00000074 +1a629144c33007e8fa33781f593ee26d frame00000075 +c1839a9e284d227dcdafc98b5ccdcd43 frame00000076 +50de1bdf2c2d187c2617ce74b25ddc74 frame00000077 +4ccd37cbc0e3ca5cdd96ad5918714489 frame00000078 +8a41d7f5873358e81520760719c6c697 frame00000079 +bfb47a8d53822c7b1bcf8f0fc1decb18 frame00000080 +b440adb0d45e7ec582c4514d968169bd frame00000081 +a352e6209bc523deedab1a6ef181fd91 frame00000082 +af2f83ad11c2bbff008eeac2391b5b49 frame00000083 +2b24e8ea9080568fe8f4b9552b73eff2 frame00000084 +aaf1ca0922c41698555d88568bb32a8b frame00000085 +1741d1dd5c3b25fa8c0c8b87a3236d79 frame00000086 +d48cdb0073502fb085e0ce2763fb763f frame00000087 +24b1ae5c1bd3fa09e1e42dfc27397fa0 frame00000088 +c0388d8f6c11a53584b626af0b0958ed frame00000089 +a3216a1de9e23abe6f40daadf69a3b8b frame00000090 +92a1eeb28b336d8116f1bb196daed687 frame00000091 +8ed23f60b38e6f219c1dcc9caa9bfe0d frame00000092 +36d98fcc7e06c1126afca8cb1b921c7b frame00000093 +bbaaa1766903333ac7047e24acd7effc frame00000094 +9c160a24a0f80a16da4fab0045c21298 frame00000095 +49ab9c656aca58ebdfd88cffbba62fe1 frame00000096 +b2af5642e0640224cd5954218a273e22 frame00000097 +b8c5f915fbbe3b405a632c57ddba73c6 frame00000098 +b545b17256363210aa79be19def4f48b frame00000099 +9997c14724661aaa766f25310567ad53 frame00000100 +063010eac8f35927ab8a3e96b53fb4b0 frame00000101 +2f8a28d2bb0275956e2eb5153cd8562f frame00000102 +195c136ae1099442be69f7bfbda963b1 frame00000103 +79c3ec76a83b29347a340567d8e02271 frame00000104 +ab0ae8575fc200fb3950395240c9e973 frame00000105 +2f476e14ed9dfb7c6ff7a6e11bd7420b frame00000106 +66f3ab5a9b44f49684fd69994c2b0a05 frame00000107 +91f647ec1b54ba48aca4dff67f354d7c frame00000108 +f404d51ad621b62496b886b661b6d562 frame00000109 +e793d70fad84cf56fbcb68ea9ec761be frame00000110 +7eeaf9746c1bf188c7e7fc47cd9598e6 frame00000111 +6ddbe5f13f30832a3dd3ba6599354118 frame00000112 +915f397bc122b99c4f0407ca0c4d331a frame00000113 +57e207a5a0c9ec4104e4efe91ac93e2c frame00000114 +2217aea7a767343b6c03da5981f37bd6 frame00000115 +0f4faf4e920470e98a513ab1e0191fad frame00000116 +bb181a4740350ceebd46c97796d9f5fc frame00000117 +db620a6cd28c25b92a1153bd4a34a964 frame00000118 +7bb8e8fe07a0b289c3c2d08ffb64f32d frame00000119 +9f24bdb632ec1ab61d0201d7f612af3f frame00000120 +db1367d00152aeca24b3defd0f2bbc80 frame00000121 +e5da051eb1acfed8ccb609c6e56f34bd frame00000122 +cfd94ff37c4b426e7fe8aa4321fc530b frame00000123 +9c324c2131ddb254435d8bff22ca08a4 frame00000124 +e4c50e1bd1ca8c4dfb90adb414a28ce6 frame00000125 +4f6b0cc72836d620eaf5266f62862518 frame00000126 +c0b1469f274927de431416de8791ab00 frame00000127 +13c13735597b5afbc2f41a2cfa9f35b6 frame00000128 +bd399c53cbb63024c6559ec4f3a976dd frame00000129 +561bdf8a56f8e74c528c7ae1b0523a96 frame00000130 +523d5814b94698bb4a3bff625662c61c frame00000131 +8a60e3374f1fd06228b841565d89c846 frame00000132 +388e20d0a1f2d0df678f3e3ab27ddb06 frame00000133 +3c1679b52930059fde37fd4391f9de4b frame00000134 +cb527ad5e1dd563c4b13a58601a1e469 frame00000135 +0d0ebbd213482655dfd7b51d8f0cd9ea frame00000136 +3a0858fc3861de151536e045cb990a86 frame00000137 +50e1e584d09da5717446766b462c6a91 frame00000138 +372efd6e984f6a7ccb4b3f91cf96e5f3 frame00000139 +78448ca3eb1589980db77ff6ec40a773 frame00000140 +32f42c833111f072f620d5c0c574533f frame00000141 +dffc2414f34d4e7769f38961ccd7d80a frame00000142 +72afb2d92562ffaf5014de6bcd05dd8e frame00000143 +a2348d6cc997fb1a60ad3c53f68fd51d frame00000144 +2ee517c7bebe94904e8beb4234788973 frame00000145 +693fd93d2079a978e2ee93d6fe9d9999 frame00000146 +88ab17879932c37ace1d970287bb4058 frame00000147 +0e6d6e6d5aac2a451bae228bfd826ed9 frame00000148 +b2ec3fc45ee081ef2bbe134efa4946ef frame00000149 +a9b19a9962f201325d48bf9a2f3ee55c frame00000150 +575498fc77d7c2536f5a919970d93381 frame00000151 +e7ac52e64406e492b034312afd7531ec frame00000152 +010f95cba8796aa021edee9d94425a50 frame00000153 +6d1af446cc67f2ba2b26e9155879097b frame00000154 +88f99fde320167830dd461f796bc4e6f frame00000155 +b32e15f051da353e817aef86eb573e0f frame00000156 +5d6bc79ed179158ba27c743048db4c5b frame00000157 +e80a2161dbc9a437f7f4d255695b3bb0 frame00000158 +36b3efb86b86a410106d6906445c12cb frame00000159 +4d54b58d66f0e11ac5a359135b4c9e97 frame00000160 +93cce986b973acf23dc88a70e1945303 frame00000161 +1661ed48bc2001fd90583d11917d5014 frame00000162 +5191c11cff563475588470e8fb5a7b53 frame00000163 +4720c253591c1559aa2c270c4bec88f8 frame00000164 +6cb73b6cea2f43109e54a30c91c9a6f0 frame00000165 +cd6df4a81a19aeef6baaab8f07819f2f frame00000166 +c6093c2afb1a1cb01cdae5d449be7364 frame00000167 +e5de3d675ea193cc152c1836b104fdd5 frame00000168 +4a30c3bf8c8f244992d77a61ce2425bd frame00000169 +520e6276d53c139e2e436b0a33d3fc1a frame00000170 +ea3ed7bc97d79ea517a6a668208865ea frame00000171 +ab219cb51a78412dc3273a8b1b86d484 frame00000172 +5bffaf655ff8a5d7a9363dfdd40582b7 frame00000173 +9126631ec3e4949dfd56ac32930f0ee8 frame00000174 +469037ae4df6674668d2c1b88d0ea33c frame00000175 +444d7de694609a2c4ad47f3b228ccb7d frame00000176 +4130cf8c57f5b2076cf805b2674ef5cc frame00000177 +158f112ad2e894875af58adf15783815 frame00000178 +0e9e392c94c9dabc0a4a3981cd4f2895 frame00000179 +2689bccacb8ca5bf986fc4edf341f583 frame00000180 +4cec51bf4c8e5f82db0dddad995f40d5 frame00000181 +ecd5783c8565f47e9eb86463baae9680 frame00000182 +96489bbef82289f7cee588883166709d frame00000183 +56bb2e83b4ba991ebc73f3ed79f6bedf frame00000184 +3a768a311c32c4b57b55dc480799a9dd frame00000185 +5d1045d09167656701507420ce270906 frame00000186 +3ba9751242fba45b7c94b062ba08653f frame00000187 +4d52a79321a8613b8d7b665621d068e0 frame00000188 +9ccf4a5ec67768135ce09b38ff61d208 frame00000189 +354b8918cce8e38e3d954a5e84dd4f85 frame00000190 +09d019466b1b390d8b123652216592f6 frame00000191 +c0b7920e5798f04b1fdeefb1d06a628e frame00000192 +2ee9206e43199cca3a73eff8ddf32013 frame00000193 +8c8d7a2d6d2f3e7166d8f1e103f21b3b frame00000194 +2e530df8065e141d35a9b65f448ec854 frame00000195 +f0e33181926481f2e53f2defc94da130 frame00000196 +d4ea6152dcdb6e314a2001a806424944 frame00000197 +1b117ada3f3232ea1f8b28dcf72907bb frame00000198 +7e3ab50557c91f0a0cafaf8629e7eaca frame00000199 +aa03d9b3ee1f85a40495007d1946f487 frame00000200 +e7da1162d2d4b0846bc449d5c7a86340 frame00000201 +d351972df98b590c39a70c49f93b02a8 frame00000202 +93d5878ebeed1ae0ca281fff0eb623c6 frame00000203 +6a597859b2def30d03b27490c2d4261c frame00000204 +45b3fd12dcd5820b92bfe5315e13b3b7 frame00000205 +c3c46daa40b6d6736835a4c90abf5e80 frame00000206 +e1df9b7c6202d4de64cf5f111356962f frame00000207 +e5402648a4ae84f6ce50c77e68c8d49f frame00000208 +0c1a7b0e04875e97dfdc89bab6566ab8 frame00000209 +3f206ea841cedea6d7e88ed3d9dd5922 frame00000210 +5d59c8019766330685eac6f04a3c6e1e frame00000211 +2dc06020d7f8283e6d33c1d7a6636e3f frame00000212 +45823a7a34d83655dd67fc4323e41103 frame00000213 +0fd44ed459e8dd5b944ba16ddf7a3761 frame00000214 +2f124b48d6fbfddd824ac37669222f06 frame00000215 +ae2a52f474920dd38d62276e32ea4aa5 frame00000216 +471496848a5f1444965cad4d6fa09013 frame00000217 +0cc0619ff077db56d0e0ae30976c34f9 frame00000218 +5818db64c2d780418dede4031678bf20 frame00000219 +9b6c6631e61cc0b0cccfe1015998ff75 frame00000220 +4c18005ed8597d797e6c4b8cb7be1aca frame00000221 +c6a8b424ab2ae1195ce5ef15f8906094 frame00000222 +c3e8ee70c5484b00ae5392eb0fd6bfe5 frame00000223 +2d426b751557a5038d4d87e16bd50484 frame00000224 +b297938b98980bc9fb12c285ad8a7e5a frame00000225 +d4c5a708d65748605634db686e9c9c9e frame00000226 +0cb57724d9dd62b05502a2defb4c516c frame00000227 +99ef4354f28f1e729d0be95a65dea219 frame00000228 +bacfbf66087e0397a4b1d35a8be3be51 frame00000229 +e78ccb6d9763bc46d4e192c7849417b3 frame00000230 +ababb5fb3a735d0c4f3f10ae2adcde90 frame00000231 +b338bdb20d4901420cf45e65d6e99288 frame00000232 +df8c88e6260236f0d322db54da3eb4cf frame00000233 +000dff20013315b2c6502b0942787bed frame00000234 +999793fcf0029c01fe39b554e3418ec6 frame00000235 +fa9c621892fcc2896ae0b794ec92f61e frame00000236 +42b28015726da3239bd665aa7713f80b frame00000237 +3a6a1ef019ca4807dd62fb63fc841a2f frame00000238 +1c9d3feace6d6793e5aa9663e4fb96d4 frame00000239 +86086df6b0fce877ffa57a1494d03483 frame00000240 +b6f10321943208af09f8a94bf514ec49 frame00000241 +23b28c3ee39ce3b234bd1ff3e17ae8c4 frame00000242 +292c1b8be05e1d4cf2fbdcadedbc9269 frame00000243 +b71142dd0d9ba30f20e94ca285008329 frame00000244 +c262f4d285460c7bfd9bb8901c38c857 frame00000245 +341cd5278e08eb88863e41035a19733c frame00000246 +02a911f5e56a2f3dc57265b3a36253cc frame00000247 +581e42ddb23b98b6c4783ee0b0c8e28e frame00000248 +58d0097c4763f01bc7935473551dbc42 frame00000249 +7aceae2cda7ff5f0b1ce8faf0603f91a frame00000250 +4f9d3c09dcdf6e0eb6e80c6b7ff770a0 frame00000251 +b986bb6ed546fb84398306155d70a864 frame00000252 +d9424fb3374d6e490d276818f1261b0a frame00000253 +f46e4a59b1cb611cd466dc654a7d3f6f frame00000254 +a69db4fe2eb379276ed57de1ae7e3c8a frame00000255 +5c7b3818bf4fb4fa926f2f7ef80dcff0 frame00000256 +dd117f0d852555e88780c19b9c4f524e frame00000257 +97dd44910eb819ec9ca9ee6a3ac68356 frame00000258 +d6f2a65198c4dfd4ce5116bccfc6bd9f frame00000259 +60e6390ece35b0e2ea87be8ae8a3ea4c frame00000260 +c1ae4417c1d76a322a75758453e598a5 frame00000261 +d77ee332e6a9fb1a9ba3eee3eaf9c90c frame00000262 +2bea17620212d737fef84ace9a09be83 frame00000263 +71e94a1f34375d8dd404ec492ce035bb frame00000264 +45c2b86c193f2474e0ff577de8a21aee frame00000265 +458c53a6c790aedad5e32b106ad73234 frame00000266 +96ab2237519122a31b9a41947eef339d frame00000267 +61951dcb5a0870fad9a2d0d30d98c586 frame00000268 +c5689bf9badcacb1e84ef02447caf7b7 frame00000269 +3a15846070c757c4d1621c03a4a48239 frame00000270 +4d3c4a8f1b948a42eb6ed33c6d844f42 frame00000271 +cbbecbc1d5555ace47cd39668864c8a5 frame00000272 +ac6c29896f12a0bb9dcdc9ec6ade752a frame00000273 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVSE3_Sony_H.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVSE3_Sony_H.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVSE3_Sony_H.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVSE3_Sony_H.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,271 @@ +b46500b37abd2767385fbf80d1222fa3 frame00000000 +29096eca0971ab9925200e76720595de frame00000001 +1c9adcc758b8175a88304e78748d9e38 frame00000002 +dc63f990c5610f5c1ada5eed2b15d583 frame00000003 +94a1de8cfaa723ec99ae6f102e61ab17 frame00000004 +38b85d11f64ab7593ffacf0fd00f5dec frame00000005 +31930ce82ca20690ea49db074399b59c frame00000006 +afefb38320a40f66e9172da7c1fe163c frame00000007 +98ece1eaed6db6736d78557aa1d9e107 frame00000008 +2e23844a80f10476e3ebc9b3d85baeed frame00000009 +ff8c828896869a44270515581c8c52cc frame00000010 +edf3cb5acf1b73922980390be46d224f frame00000011 +89475ff53e5ab42539725f228dee970f frame00000012 +b07f8126c887e09acf09616f825ed669 frame00000013 +60ad3002f96037c085f0e750af5180e4 frame00000014 +835574cfdb658f1075e14f77a80b10fe frame00000015 +b3997e9f2fde6882d40e7b9488b52ff6 frame00000016 +7461ba0c7ee4f9581734ca7560dffc2e frame00000017 +879661c84af1c4dcad50baf6a906a1a5 frame00000018 +9d3abe87cd4a88d90b0c5d530f75967c frame00000019 +665c3f474666a51e26ef8d2aa97c79cc frame00000020 +db84765694b90fe9d0c7ccec278d2bd4 frame00000021 +032ce4d8797fe054fe4bc9ddaea3b69a frame00000022 +fc805ac31679736351b34d256d8a15c2 frame00000023 +07b83a5263d5c332d3afb9b9448010a1 frame00000024 +8252b6393e52ac0e79995c5c93b7ac5b frame00000025 +bf900eada63cfea5d07d3c6b536e612d frame00000026 +778b520ee724a1fe9c96d0617a4cc146 frame00000027 +5d6ea109efd117278f29519faa995fda frame00000028 +88a5342743b664c93fb1f8bc1738966f frame00000029 +4c4817955c8a32a3032e095d4ff91a6f frame00000030 +9f3b4dad85c668059214452065ef9599 frame00000031 +5b8b97dd11d97a8dad23b50858626ceb frame00000032 +d22213721d67a92bac0865e21204c377 frame00000033 +92d6d58930e76df68028d6a1f3d5eec4 frame00000034 +0d2e13a4f37fee446bb286eeda2874c9 frame00000035 +37486d41fa5cadf3127163b47d605645 frame00000036 +d9c873ec3946f825f92beffa2c4be682 frame00000037 +6246075e332c85bc37ba8e8d17d31b27 frame00000038 +ffbc250fc7cdb0de69a9f5ca0705ae87 frame00000039 +1e5610a58d1605de472d55883bab08dc frame00000040 +0fca81151902075439c88a495350790e frame00000041 +b7da61f18d0d354454ba76593ec98ff2 frame00000042 +66204e8b2e3dd339e7a6a0dc25605b71 frame00000043 +37536851e7e073ae7453c6b176c491f5 frame00000044 +b1b993d520e2c4b65da830f274072e2e frame00000045 +81ad3e985f47f0b1b1fa6e212e0ceff2 frame00000046 +1c8c58bd868dd431ab60fc6ebf1b9508 frame00000047 +119497f2786957dd4c94d620142b6ef7 frame00000048 +b99cac3b0c4ecf35f53deeb990e51155 frame00000049 +6a4321c9c6dfd063fab13a913793c68b frame00000050 +3e9949be7a2d47ae0d5b6df541f355e3 frame00000051 +b301709492940fc11f2db596b3425c51 frame00000052 +0641f4114554629e5de7b2ea25ebc214 frame00000053 +5c9ae56fa150c9d794a8de78ae0b28bc frame00000054 +c7e13dc807b7b829a5b46c2852c5ba60 frame00000055 +b8521856f0e1c604db035dd3dd9e4513 frame00000056 +d96c61ddda82849a2620c1ee57052127 frame00000057 +a5620140ac6bc9ceec2cc105cb314a2b frame00000058 +a47d78dd9c94973ae7ade310025c726e frame00000059 +070b040113b1ff5c5a73348c79462dc3 frame00000060 +b69869702f54ae19f12a39f9933d57a5 frame00000061 +7a4931191d4b99a0a7e4288ea309bf8a frame00000062 +a8607596c20fafffa3bbe4b7f9d8d146 frame00000063 +f7a972db444d297e47c02e4a78cf3598 frame00000064 +18d1e4d805f179233d73668195179ea5 frame00000065 +1c058b1d228014e5383b587836366e63 frame00000066 +4d4b67bd768280028dabc61a2acf3a07 frame00000067 +7ec22f5bb749ce900fc92e182b568dff frame00000068 +cd3853cb327a044489dc100613eb6a4d frame00000069 +a43b871a7e0267aa911fcb889e556dec frame00000070 +ca3c0f2b4e83b2d6a5ef9724104e0d17 frame00000071 +186dd887eb78fe2eca4a6abe79fe07ca frame00000072 +8bace221114066a0544a041239b404bb frame00000073 +9e53bf1499a250a515c1ae13710fe97b frame00000074 +1a629144c33007e8fa33781f593ee26d frame00000075 +cb851a5768f711f7128e879b02589c51 frame00000076 +5e8a35072fbe105ba74973754ebacef8 frame00000077 +20cc58b99b0d685f19232a727359b226 frame00000078 +c51fae552e72eab43cbf39af832bcb9b frame00000079 +a1854416d2fc910fcb796c2668478ea0 frame00000080 +00ef64dda7d1d9e85a721846ebdbb2bd frame00000081 +a1990d8b328b7ecaa01409d7069dd2f8 frame00000082 +787583f86473abe73fbdeb7fdccb9410 frame00000083 +366a778674e815846a3588c9ec843b90 frame00000084 +f9e30fff7b4f80563182c280dad70e4c frame00000085 +41a56bb2ff8a2fd80cae7b631e6cafc1 frame00000086 +fd6958a1d1cebf4bf47ef31a9a58f19f frame00000087 +6ad0025f71d85761915c1219ae85aa88 frame00000088 +4e2222ecf7c517c0608dcb6d38a761b3 frame00000089 +a3216a1de9e23abe6f40daadf69a3b8b frame00000090 +0f9725d74dd02fb3c619ef09652cbcf3 frame00000091 +dd8f361a8339e1c4db670d3d14beacde frame00000092 +8f0796defc513cac280ae7e43c171978 frame00000093 +322975814d3712f6c56372b9fa6ab805 frame00000094 +0070c54f00572b04546e091d5abd70e3 frame00000095 +b8a13104b4cc89d87236cbef35442dce frame00000096 +a1c90ab5907ccb97ce3f666d4f87dbf5 frame00000097 +93b7c5c64432a00b2f1efbb81cf75b4e frame00000098 +46a91031b0dfc9ed8fbcb0b2b34d508c frame00000099 +42e6cf78fde80e18f9b1c65ea5773d73 frame00000100 +278c6bb73fe9e24b82e6ff8ea978c2d9 frame00000101 +3ad367963494ddb51263c27c109e6b2e frame00000102 +260aff86a95bb2faaf9ea863017d2cec frame00000103 +84ab9f651d785d1d99a499d301d795b4 frame00000104 +ab0ae8575fc200fb3950395240c9e973 frame00000105 +9cef9b422cbba55867b9710e7e2d7ca2 frame00000106 +a0a86e243e0b7e3fed06bbd389f1c5c2 frame00000107 +7c7089f74e9d12f638006ac9bed3af68 frame00000108 +39e5891ed3bea95ae51f2d58b0a47361 frame00000109 +8eb73df637694c6f173de1114b3070ab frame00000110 +31590a07f76eff2c86919d64b9b9205b frame00000111 +67a55305e72f565a531466cf03759032 frame00000112 +d199e945bb4effd85fa2abee4f39fb00 frame00000113 +6ca1f042b3ebed52f47ce38bf99a3e37 frame00000114 +7dc8ddf7f4cce15e49b3411b376fe088 frame00000115 +24a967c82d7ea70c8e93e3c3ea71f012 frame00000116 +36b8200ce0b8df351626c6be86aceabf frame00000117 +5c7d4ca16a35205380c6e6079f9b7172 frame00000118 +bdfb9b5f1a5ed39d1961288ba74faba9 frame00000119 +9f24bdb632ec1ab61d0201d7f612af3f frame00000120 +a87017abc5a59acab4b68dc260b843b5 frame00000121 +38d793d85e2f68719ad4fc9a72bf5829 frame00000122 +d03fc3cc164561db26a184191da17777 frame00000123 +703e9cac9aadc84ac5ba72c320c50063 frame00000124 +6ab23d6773c8f140fbe967da28156c68 frame00000125 +bbb7d20cd23587a71c708402a75532a7 frame00000126 +372a27ab515106e646f8a0227b001b3d frame00000127 +18ac07ff536e2ead03eb5b955ddb0862 frame00000128 +cdb259377af24fcd29fba7a7eabaa847 frame00000129 +fc270e7bf11ba71f3af83db6ef781d02 frame00000130 +c1a7a74f17eec70e8bbb75b3dceb9038 frame00000131 +53bd7459159095d69fc4e268636c1023 frame00000132 +cba467fb8855f40718e2f29e75d83c10 frame00000133 +a94e8e2320d5264d736402b734125f44 frame00000134 +cb527ad5e1dd563c4b13a58601a1e469 frame00000135 +550122a2a9e1a4365c4396d32334abb8 frame00000136 +b453345e9ec03478ef4c02f2136b1efe frame00000137 +c8b7a66aafa0428e13d8e9b595854bd4 frame00000138 +bf1bdd8753cbcb2bab7447c6d59e2124 frame00000139 +8eea9fb79bdf5a3396bd461b630f93d4 frame00000140 +d65858a2332b43aa9e23e39233df5096 frame00000141 +e3719767a227d497d09b9a6abb99a568 frame00000142 +34430a28fca5f2830e8449e76b4701db frame00000143 +cf66927223d74d042c9e14c2dd4bd76b frame00000144 +a97ac24c4f2159ce58432da2fa0afb09 frame00000145 +e7defc647d2b8f51586f40c3b37925d1 frame00000146 +729e6e80536e975e73713cda93c935d1 frame00000147 +be4e4ee900b4f7f90bcd57152445d4e5 frame00000148 +d0cbdb384aaacd52502e2b649e783641 frame00000149 +a9b19a9962f201325d48bf9a2f3ee55c frame00000150 +bdaa90eef4187a3bcd70d0d0feba8ea2 frame00000151 +0e0c89f0e11048f5091b63337a99a5d6 frame00000152 +995973e98712da940b5c0229cd25bb9c frame00000153 +d1c5b3f85e0dff8e75bc174e13e8396f frame00000154 +7eb37e71ed1f510d7687b4aa91bb821f frame00000155 +0003ca33f3abcf2f3f0ca321b5b2ca15 frame00000156 +106edd22cb81a355a85b530c3599b67f frame00000157 +969a0dd350787b63242d5630f7e5c70a frame00000158 +23cddf8b977fb6ebab124d7461f709c2 frame00000159 +660042a713c1668ac4765d659f39e518 frame00000160 +c9b854ca67c28cd9a2c5ae4b44a0fffc frame00000161 +9ffc098608b32f74075c7747523b4b06 frame00000162 +f32b99ab3c1c248616ca11ada8ca76c3 frame00000163 +e9f0f9c3e851196dd5f14addda2f0c59 frame00000164 +6cb73b6cea2f43109e54a30c91c9a6f0 frame00000165 +e755873fc46d1374614b664e8267223a frame00000166 +2a6e9325d784c72ee15f52804b6f061c frame00000167 +bc5ec94cbb4a277b531e1e067f80a28b frame00000168 +c3da060c6cd4bffbe4b346255e8de2f6 frame00000169 +bc11768d2e975ff8491b36cf4f60220b frame00000170 +36daff7af56b421447314afa4d305848 frame00000171 +1fadc15efdd414e18fb71efdd098e5fa frame00000172 +03644459728cc1529229d79786b12012 frame00000173 +6f018cfc1a995fd397ab29ed294dc644 frame00000174 +f90a81b95449d840c663ea38ea4f1310 frame00000175 +4c86c880d05f4b918d2572a33a15eb9e frame00000176 +f3847459208b2c6654aaa28b5465747a frame00000177 +451fb435dc5249430bbb6efc69a764ef frame00000178 +ff59363f2fd11346c801642159dbabc4 frame00000179 +2689bccacb8ca5bf986fc4edf341f583 frame00000180 +7cbe3de89975519e47dd592f3ba6490b frame00000181 +ff8e471c79f14b70a42eb19ea50a7c85 frame00000182 +a1871a3801871c2a926f476fa21fa9c9 frame00000183 +4a2078517c122354532cec842468216e frame00000184 +2315a4fa0a6330f35769fb51f9a8fb99 frame00000185 +551d841cfeaceb9b2b7f84a73924d1f4 frame00000186 +24126033d37b18d56b44d4ad5cf6ed6a frame00000187 +3378146db22f3a5590c79ae6d3fa64c4 frame00000188 +5dc56cf980dea6daf0ba5a7c1fe01385 frame00000189 +7c8fddf991524ab63a7e7261654bec10 frame00000190 +a3210786816be5052f932b3c2dbda1df frame00000191 +15d6fb212cd3ce0007e9a8da6a3e9313 frame00000192 +c7198ed0f3b4b4ee4cef0f80c7c5ea1e frame00000193 +f5a1e0e717bb491b56d045bd5e587407 frame00000194 +2e530df8065e141d35a9b65f448ec854 frame00000195 +020be8a3a55f8001e32be53b25e8f0db frame00000196 +71383ba2cc1ea6188bb235cbecb6935b frame00000197 +c076fee538f37ffef5d41cfecea98046 frame00000198 +1522e3ddaff45f20410781fb8144103f frame00000199 +77ab2d11bbb5ab015f347a4598f4dd86 frame00000200 +b16d0000aec8107f0086115572d2f914 frame00000201 +2e5b7ec4975c4d6e2f95a662e322d98a frame00000202 +ee7fcd32ae1a2c1e12080fd3a80e1263 frame00000203 +cbf3d10f5ecac2d9eb144b7ac134931a frame00000204 +14683f5749b48a847f41ede8c3e834e1 frame00000205 +a2c267270a5eb2ddc4e601ad227953fa frame00000206 +47f920baf303e5c68b7a22fa0b541196 frame00000207 +50a6fe8eaf1233a320dc11c43291f72f frame00000208 +b39d2f10601b6ee5dcc9c3d6571ff6d0 frame00000209 +3f206ea841cedea6d7e88ed3d9dd5922 frame00000210 +70c06ff72067169ed1c7da1a0902e210 frame00000211 +52f4aadeb0d664104716053236b73d1b frame00000212 +0710836494161720acbaa54afc8aad91 frame00000213 +7e7065e5e05349981714c26d6c067b1e frame00000214 +48a9b7c8b75fb1038cb253cc68731f7f frame00000215 +3e09dcce0506fd396637d30f9f840dcc frame00000216 +0827fbe6786b91d6deaa71ee84ac37fc frame00000217 +aad0541c0d3a9a44996a1034e3dbda17 frame00000218 +6a8a019a541f96fc8c092ceae161c7e7 frame00000219 +11b4f78bbfeee8497b9ab4bcd7728ccb frame00000220 +55082d42fb3a5926bc639702ddc28900 frame00000221 +f6b048c0089e5844218b67059e5e9309 frame00000222 +5e205e32904d38e424f976364d4c4efd frame00000223 +7cd59af4331a78fdaa2c20055d3553e1 frame00000224 +b297938b98980bc9fb12c285ad8a7e5a frame00000225 +b42d4f80dff6bf69399e496d4880394e frame00000226 +a1501ba7d5f7f5d14419b4adb1236116 frame00000227 +ff31684bf65131e514cc15b60bcf1393 frame00000228 +a1b249ba348b7b2d07d4e18a4a58448e frame00000229 +4d6954820327314a6e8be1f1a450b3c8 frame00000230 +860888b4a65b20a3ac5b8ae1208689b0 frame00000231 +0502653513c1ed686b1252c8774f462d frame00000232 +9febe59847c69a3499f0f92fdcd94988 frame00000233 +ee09ff971b4f0bd3a56f241a507d8f8d frame00000234 +7b9d3c232582e74a1355c1aefbbd88fe frame00000235 +43dcda8a8dc5c7847699105189249bd9 frame00000236 +0ee335931f99ec114b08a44b30979713 frame00000237 +530749052133da43b0064d39ea043ab9 frame00000238 +a25de5b93dd7203ec59b49e72fa725fd frame00000239 +86086df6b0fce877ffa57a1494d03483 frame00000240 +1ecff8e4bbb0b027cb149f66f08ca81b frame00000241 +e2fe473dbdde7f65395b30387d2a66a3 frame00000242 +a9ec6950c786d73a072d8845c1d0fc10 frame00000243 +8369a2411898e9239516d243bddcc0f2 frame00000244 +ad14ece42c81ccfdbe55ed1e3c133bf5 frame00000245 +68c3bafcd5b0a2dc1e0fd51bc9e6b380 frame00000246 +f747218c1bcac9d550cac87cd73cdc99 frame00000247 +c0f20d5c9e1d8b25f22727bf9f82f2c7 frame00000248 +96421063ba24f44030dd6a475ca57936 frame00000249 +85abc804411a496c1bab2e2501aaaa12 frame00000250 +953dac02b85956f143971af17f4533b4 frame00000251 +aeeae7b2067004024d240f1418f7ea45 frame00000252 +6308330111664e4e7bfe3b6fbbe0cd6f frame00000253 +a7cef841438ebdc5fecbbc5f69bc5162 frame00000254 +a69db4fe2eb379276ed57de1ae7e3c8a frame00000255 +992f2ad2ba89e6055c9652bb890ee52a frame00000256 +4bd050ba377da7beaf751c48083d685b frame00000257 +9607bb63244c9e891e5fd046aae7a378 frame00000258 +114f6325673017d4f3a35de7c5cdac8c frame00000259 +80cc08369ae858f844aa4764a3ffb293 frame00000260 +6819c93280b7616a5829fb3e3e84eea3 frame00000261 +a07eaf6d000be5d5feba564eb09f006a frame00000262 +2fb69a44c45b1d29e8739bafe86e5121 frame00000263 +7b1843d79b8b8741a7dc4b062d602699 frame00000264 +3bb38ee31496eb6c437fd1378619f164 frame00000265 +5df77118cd7d9d1bfc6fea8fffae9745 frame00000266 +3ffa80d794ddfbd05384fc5039135948 frame00000267 +6cd001d5c9177c8d5ba10ec83774338e frame00000268 +87f4f9c4b672cc8690faa5c578df9e20 frame00000269 +3a15846070c757c4d1621c03a4a48239 frame00000270 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVSEFDFT3_Sony_E.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVSEFDFT3_Sony_E.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVSEFDFT3_Sony_E.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVSEFDFT3_Sony_E.jsv.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,195 @@ +b46500b37abd2767385fbf80d1222fa3 frame00000000 +6f01f83b63e87c94d3e0bd822d71eb68 frame00000001 +9b326e5bf6219b39dd9d9c5646321d0d frame00000002 +dc63f990c5610f5c1ada5eed2b15d583 frame00000003 +ac5a607f461dba1ce1a1ab30c3ac5fec frame00000004 +df6803494e0229ce613031fd314720f4 frame00000005 +31930ce82ca20690ea49db074399b59c frame00000006 +ea5f14c612eef503ffb9e0304394194f frame00000007 +0d87895a472e2c651170b212defe64e5 frame00000008 +2e23844a80f10476e3ebc9b3d85baeed frame00000009 +e80a1b29412962dd77b13cd941ea2d8d frame00000010 +340c7723ea1495964effce94cb0f3d43 frame00000011 +89475ff53e5ab42539725f228dee970f frame00000012 +50e6cfd10cc34f5f2a52f8dbd9a1ef21 frame00000013 +f0553c959d8c27d1e8ea0268c50e3111 frame00000014 +835574cfdb658f1075e14f77a80b10fe frame00000015 +406efd44a14d4eb17cd43cbffb9ead60 frame00000016 +c8885b3e883d49974cc9562e36f69cfd frame00000017 +879661c84af1c4dcad50baf6a906a1a5 frame00000018 +b33cc687db059425849043304b32d7ff frame00000019 +ee8a5e3092175af91d340af8e57f9433 frame00000020 +db84765694b90fe9d0c7ccec278d2bd4 frame00000021 +ad305028ac30b7cbda1336f72d3d1abc frame00000022 +bd7ebd27ea59d57294eff73fcf46837b frame00000023 +07b83a5263d5c332d3afb9b9448010a1 frame00000024 +727c0ba5d406124ec23bbdbbf8beef4b frame00000025 +56f27f28bc4cfa902ac68b9653763e13 frame00000026 +778b520ee724a1fe9c96d0617a4cc146 frame00000027 +6edace4c122b7a6578ddbcddd3b02e6e frame00000028 +b33757283331de6e47f949772c3c9734 frame00000029 +4c4817955c8a32a3032e095d4ff91a6f frame00000030 +e7a246cd8090dc7804f8533a34fdae44 frame00000031 +a92af59bc0cf94c93f8acdc0177ca9a7 frame00000032 +d22213721d67a92bac0865e21204c377 frame00000033 +785d940ffa9a2c19f574bfff9f97f997 frame00000034 +ada80885053060cb82fbc773c3e60b91 frame00000035 +37486d41fa5cadf3127163b47d605645 frame00000036 +45058ad8ac2888c532a7975a93bf1297 frame00000037 +159c08de60f30af010e0eebfa2f1050d frame00000038 +ffbc250fc7cdb0de69a9f5ca0705ae87 frame00000039 +927db66b1de04953156adc466ca41f98 frame00000040 +1173372e232e7080de69c2d4c6530738 frame00000041 +b7da61f18d0d354454ba76593ec98ff2 frame00000042 +4cd9b772bd34275f7c0d3bddd78de140 frame00000043 +6d8bf7a314073dd7de151fdbbdfe01e5 frame00000044 +b1b993d520e2c4b65da830f274072e2e frame00000045 +baa353a4ea37f36b1f08917322292fa4 frame00000046 +2e9b87217bc738939f58ecd45adc9f67 frame00000047 +119497f2786957dd4c94d620142b6ef7 frame00000048 +287c136a4a11651a9f393133187518be frame00000049 +8b650b778b133c06a3a8c8f62b4112b2 frame00000050 +3e9949be7a2d47ae0d5b6df541f355e3 frame00000051 +accd621bd9759f1ed5431254ffc9286d frame00000052 +15f2aa021f5895db6eebfe08faa146e6 frame00000053 +5c9ae56fa150c9d794a8de78ae0b28bc frame00000054 +6ce9056b1bd91239c2d5d0a63f2bc2ed frame00000055 +51cd89074b7febe2732131723deacb4e frame00000056 +d96c61ddda82849a2620c1ee57052127 frame00000057 +a0be1c1172bde2a18d8ef6e0af3440a0 frame00000058 +d545eda726873bc26516e930fcb0531c frame00000059 +070b040113b1ff5c5a73348c79462dc3 frame00000060 +3c3d453bab30d85d53d032c4554599c0 frame00000061 +e29a57925696941dd814670f8ed9416b frame00000062 +a8607596c20fafffa3bbe4b7f9d8d146 frame00000063 +519afeae3f1cb7d40ed581a2b9e1b891 frame00000064 +f2d63b3f46bd003f8ad2f5d62e34ddcc frame00000065 +1c058b1d228014e5383b587836366e63 frame00000066 +c5c8cab0a994d335e15f3e8744bc7c27 frame00000067 +046e5de3067124ae8b89be17644f59f5 frame00000068 +cd3853cb327a044489dc100613eb6a4d frame00000069 +88301e1f10ee5d21c353b75bb419dfbd frame00000070 +c22f3fa3a3005658f7e5124c64b0795f frame00000071 +186dd887eb78fe2eca4a6abe79fe07ca frame00000072 +0e1fb123b00bba362821f5ca524e43ed frame00000073 +34cfea54df71e05d3f1d1775dc6ba394 frame00000074 +1a629144c33007e8fa33781f593ee26d frame00000075 +b3347e38d11ee2e675d1d07fcc29a6e9 frame00000076 +2308e34ac68249bc0ef0fcf185d79515 frame00000077 +20cc58b99b0d685f19232a727359b226 frame00000078 +7fc806aec231230fa2ba9fa25a60b1bb frame00000079 +2fecc8fbaa8e365ec51dc9912083a659 frame00000080 +00ef64dda7d1d9e85a721846ebdbb2bd frame00000081 +dd089fb1e96e545529998d933c0985f0 frame00000082 +ec2442740584de3305651407bb67b714 frame00000083 +366a778674e815846a3588c9ec843b90 frame00000084 +f2c07a5217c661da92dc6af6df83403e frame00000085 +f83678b54c10ef8b987bea9a8fdc5b40 frame00000086 +fd6958a1d1cebf4bf47ef31a9a58f19f frame00000087 +b6e7288ab0794e125b14e8a3e4ad604a frame00000088 +fd35d731d3afe39ac0f422d790992ec1 frame00000089 +a3216a1de9e23abe6f40daadf69a3b8b frame00000090 +60307f611ba2a1a0a7244c6671473aee frame00000091 +aff7e60bc5c399ee77c9d952dc250fc0 frame00000092 +8f0796defc513cac280ae7e43c171978 frame00000093 +c03528aa752501ae4dc6e85634811ee0 frame00000094 +e05e95e0ba76d4ab1f85aee28f10543c frame00000095 +b8a13104b4cc89d87236cbef35442dce frame00000096 +6f234f49330bbe9ab263a36e490fa61b frame00000097 +3b02631802612be4fc8ce1adb2b4d4f2 frame00000098 +46a91031b0dfc9ed8fbcb0b2b34d508c frame00000099 +24c0100692f57d506af2a2a5082afc18 frame00000100 +fcbaf5c8608e90a2279842f87973f3f9 frame00000101 +3ad367963494ddb51263c27c109e6b2e frame00000102 +faa027d4c8f877a03b7af15f5f8b874e frame00000103 +17f673e36c3e195ba82067fb12aad9af frame00000104 +ab0ae8575fc200fb3950395240c9e973 frame00000105 +9ebba8c3026e147a3104e526193ee2e0 frame00000106 +89cc5078ef09c99cb45c9eee9ee745d9 frame00000107 +7c7089f74e9d12f638006ac9bed3af68 frame00000108 +767bc53670633e7f37463ea3818f1280 frame00000109 +1a1c3b10bd8e43e449b4c1a119fbf4ef frame00000110 +31590a07f76eff2c86919d64b9b9205b frame00000111 +b95c89209ed7d1792097680b318a1845 frame00000112 +9e1b64c3254a1b391caa994be91f332c frame00000113 +6ca1f042b3ebed52f47ce38bf99a3e37 frame00000114 +aad1540fbd546eec42df73c624ea4c80 frame00000115 +c6a7ab616b955d5463f58e0b26d6b7c8 frame00000116 +36b8200ce0b8df351626c6be86aceabf frame00000117 +cc63a6717b68a78fadc91910934e04c5 frame00000118 +f27b065e2db21e0da53ba350b296018b frame00000119 +9f24bdb632ec1ab61d0201d7f612af3f frame00000120 +9068d1028ff78c91f2865cefdeb231b8 frame00000121 +35ac60c2e7e82e604c4b2c9ff7167736 frame00000122 +d03fc3cc164561db26a184191da17777 frame00000123 +65319927165b8b7e0eb445cc12293df2 frame00000124 +eb786fe465802397e09077a8269f04a5 frame00000125 +bbb7d20cd23587a71c708402a75532a7 frame00000126 +c8d23f7e5e95d945c23fd8a3f217e15e frame00000127 +d4c7bb515e66af808f3a3f4d7916b4be frame00000128 +cdb259377af24fcd29fba7a7eabaa847 frame00000129 +09c917b66377c2bf6f29da3949fb2757 frame00000130 +20b5c133e4a9b56f0da4dc298d0ce5eb frame00000131 +53bd7459159095d69fc4e268636c1023 frame00000132 +d7d4b16d63881872174519bf07ad74c1 frame00000133 +0a3fc5bc61f6f24bbc3b9c300e90b1ee frame00000134 +cb527ad5e1dd563c4b13a58601a1e469 frame00000135 +99f19c30a98f0b2272ecf3fd8e45382e frame00000136 +0e7b22a4ad7470bffb0a36c98e5bf339 frame00000137 +c8b7a66aafa0428e13d8e9b595854bd4 frame00000138 +ebcc116a1831d73f198c96df58c6a510 frame00000139 +a34a756fc64454ba160597bb08224b2d frame00000140 +d65858a2332b43aa9e23e39233df5096 frame00000141 +429c624d88048f3ee0ccb5b59f9bc4c4 frame00000142 +93438c0b255220bccf510bc1aabacee8 frame00000143 +cf66927223d74d042c9e14c2dd4bd76b frame00000144 +fca2954048b937b563d614a67d79fce4 frame00000145 +ed68328b16205d5c7a6b30b560d83bb9 frame00000146 +729e6e80536e975e73713cda93c935d1 frame00000147 +7a1f289e2f72e31c1d5fa81da3a06a32 frame00000148 +50aac64d87193c6c178fbd410bf30218 frame00000149 +a9b19a9962f201325d48bf9a2f3ee55c frame00000150 +d794ae61e0fc5904c73ddb41dc7d0769 frame00000151 +557887969b561c145e0940e0c3ee8917 frame00000152 +995973e98712da940b5c0229cd25bb9c frame00000153 +979052661fa3b896f2d33cf1d9da576e frame00000154 +62566da8721a0f16fa28626f464aec0b frame00000155 +0003ca33f3abcf2f3f0ca321b5b2ca15 frame00000156 +26c1395f15be6ae9fcac39e2262c9a1c frame00000157 +9e98a54134d65a29505cb57c5bfaddf3 frame00000158 +23cddf8b977fb6ebab124d7461f709c2 frame00000159 +6f1f8792d914384818183ca67f4f3857 frame00000160 +5f2c97fbfba6785734ced68e7d42a2d0 frame00000161 +9ffc098608b32f74075c7747523b4b06 frame00000162 +fcb90a42c4a446878c7e7da437ff9ba4 frame00000163 +a1462c7afb0e18103914a04f364c0980 frame00000164 +6cb73b6cea2f43109e54a30c91c9a6f0 frame00000165 +a537a9195a4ea230c698b37e3026365d frame00000166 +bf10993597a6aa7930e1e0b44fea2545 frame00000167 +bc5ec94cbb4a277b531e1e067f80a28b frame00000168 +b1bf038bb105ac186cafefc1a9a5d596 frame00000169 +b352278cc4bb28a1e9a6896ab55b7da9 frame00000170 +36daff7af56b421447314afa4d305848 frame00000171 +3a891566b90c2bbae12a0e034863908f frame00000172 +a4eed1b72106e08cc9130b2876a8cde2 frame00000173 +6f018cfc1a995fd397ab29ed294dc644 frame00000174 +063316e29567c89670c749f0d363c4d9 frame00000175 +9c367658623205c1a3477a896c37c696 frame00000176 +f3847459208b2c6654aaa28b5465747a frame00000177 +f3a094d6b1b038bb4bdb57f86e660094 frame00000178 +2c9671244d205d0a2e59e0a4e244ac75 frame00000179 +2689bccacb8ca5bf986fc4edf341f583 frame00000180 +cd9de1874dff42d26cb6b6b8fd22676d frame00000181 +7943283a0cc0bbea8797525941138ded frame00000182 +a1871a3801871c2a926f476fa21fa9c9 frame00000183 +3ea9cf806f2a2697365221f3ba616a5e frame00000184 +c859d42523cd0be8fd9246524bd376d4 frame00000185 +551d841cfeaceb9b2b7f84a73924d1f4 frame00000186 +7b2840a0a0da1c11bb2d6ffc39fc9b61 frame00000187 +eb94fd7f667fa8a4a207b33fd06d404e frame00000188 +5dc56cf980dea6daf0ba5a7c1fe01385 frame00000189 +31a27e6932bc024345f59f98aec818b7 frame00000190 +d8220cda018f52b7d9ca158153562a53 frame00000191 +15d6fb212cd3ce0007e9a8da6a3e9313 frame00000192 +ed01588ecdd0ab484b1f4d27e3d3d0c8 frame00000193 +499bad8c82d5ae531d5e4d4b9a5397a3 frame00000194 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVWP1_TOSHIBA_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVWP1_TOSHIBA_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVWP1_TOSHIBA_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVWP1_TOSHIBA_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,86 @@ +9a0d89f0a0959dcf8b542ac243d74057 frame00000000 +92164c51865bd516ec090cec7ea10d36 frame00000001 +d3ef79a468ae42cc980f93a37fcfdafb frame00000002 +7ae3bbb3ff85fb2a9bc08ad8583b9c56 frame00000003 +c79332c1dc41eccdd9f8ae0e5981af64 frame00000004 +4148189344000824dc41b590fde1039f frame00000005 +6af005ca74b001c43d7bc4df21b0b590 frame00000006 +39de43cabf0aca35bf9a193dfda4d922 frame00000007 +2c08892548eb40d866812dcc260784f2 frame00000008 +f6b4ce25a36372cbf77fadc98acb48e0 frame00000009 +87aa56e9a0a24e8f36d82d28fd41512f frame00000010 +f1e9130bc75f46548b6e68e9553004d1 frame00000011 +9cea99f3f5dfe5f0000045d18ddee5db frame00000012 +864732f6071762704e3f079aedd887db frame00000013 +220fa1398b00b82c0e410cc0081c00a3 frame00000014 +9f9f64d0fc801dc299de3af4d6c304f2 frame00000015 +5bde9dda78861e153df9a8792ce564bd frame00000016 +6a545ed6d6850e7c776b76e740e9b531 frame00000017 +bb9922b298646551d04d27c07c99b84a frame00000018 +95095bdd0cf5705e3facbd4c33f70bae frame00000019 +f72447e89e982cfdcc99608aae87e10d frame00000020 +9652d1e3f28022f6c57661d69e6ad2cd frame00000021 +e156cb463ce1016ab011c06e5d4b68a2 frame00000022 +56ecfe4ac15e19175ba31724480afed8 frame00000023 +7c45392d5ca34acd8396ca3d2b7e7626 frame00000024 +db81ff47b8cc4d9cf3a89e40263dbda3 frame00000025 +1cabeb638793ad30363a4f28b18b917d frame00000026 +8c09b0e4e6b9cfd57643dda2aeca35c5 frame00000027 +e276c273e6a6ffb383a5b817aea08b54 frame00000028 +f05ce306b9a264ff39c007975eb6eb73 frame00000029 +1e7e623ba43661a9539d992877f87bf2 frame00000030 +9b5ab4cc9b17def4f6cc0566e7589773 frame00000031 +45f0c8b7476b95b9711885c6fa944755 frame00000032 +01a464faa79155a3b3a16bfc0f36666d frame00000033 +a86f4871b6d4d14eda7cb667983cc165 frame00000034 +c7c1683e2b8aa1deb524e87ab760e669 frame00000035 +3e3687e790b8abf237f37cc98cc9a40c frame00000036 +355c8f2321b5670941b84443a3b2d04d frame00000037 +50536217afacc0e15420c74079958ce5 frame00000038 +80eba6ebf02ea880128ff15b3856eaa0 frame00000039 +b477e0351f49bc96eada97b135173fe6 frame00000040 +20403f8ae1482c6ed49453eca9a1d39e frame00000041 +767a8968dc19d569f5863a55de25d1b3 frame00000042 +ad9be362ec275615dd8ddfed491953b3 frame00000043 +95c348abd3ad24adfb6ba72c3347d098 frame00000044 +324abf09512498d1e734da34156ea7a2 frame00000045 +90cc817595793780d96cb7f581035a8c frame00000046 +435bb0c64a76ff0332425dae1ee323ec frame00000047 +ef7eacc75f5c4b35fa00de5c6c5c8561 frame00000048 +122a0164b022b31b0e154fa13d4be114 frame00000049 +c35cbcfc306c3a57d1949d2c6465f45c frame00000050 +a05175a2b5d527b7281bb0dc3e7ecb29 frame00000051 +46ecd78140f2b20c47ec9f49673452c5 frame00000052 +f3fb59e1f6711e264f325df865c30edd frame00000053 +e5a272798da2f3ebc538f8187fed2db8 frame00000054 +25eb162c8b0b70dae548790dbe235087 frame00000055 +c07b9e5cbc3dc4ea306b195294b6c4a5 frame00000056 +cdae16c321743b3446c3ab1438858d6a frame00000057 +72cbbec493b6ba9a8aa82caddfa350e9 frame00000058 +24ff28ac6a2109810058558ab9000458 frame00000059 +a056f1db26295fb0cccf6fdd16aea791 frame00000060 +a803ac5247ec3737005f8d2d0e133f26 frame00000061 +82d7c18e14cf079b2d8517f17dc3f64b frame00000062 +f30319006daaf14d6065b19bc7cdb326 frame00000063 +dc3d1662bc193e3409bea078c413dae3 frame00000064 +5c2113d40c3fd7d3ab7fc7345c77c546 frame00000065 +7ed815396044b0b4dbd3e379551b9518 frame00000066 +f1a1954bd452ef4f6c481898f2bf9a19 frame00000067 +ecb7d829babfbf009c88eec0a30433c5 frame00000068 +89fd74c868025e73c2b309aa4027544c frame00000069 +188ee1ba1260377358d44ecfd5b24353 frame00000070 +61b6c210290dcbf7825fc800521431d0 frame00000071 +73a433ed406f37ac2ab176041df86cd7 frame00000072 +5ffd6a4fa5e07c5df8d51bad04760e25 frame00000073 +1ba90b63f8e0be5c3b308d44dc7d0374 frame00000074 +9e361d688bd8e3f3de08e29b0cbe4b82 frame00000075 +d69d2eee3ffc48acf65e2a2d5412c980 frame00000076 +2b8543bf0435f76da4341baecc51313f frame00000077 +1b896938a0821fb7815c38c48f63c296 frame00000078 +aea3f42e842c694d751348f7e2e73a97 frame00000079 +545a61f8c6fdca42b07a7f567ca1505b frame00000080 +bab785a21d757086207b6cb807db93ea frame00000081 +b4cbee307ec7e582aa57a949232f9db2 frame00000082 +a6e65f109cc12af0b280371b78bb3846 frame00000083 +ca71ca28f1086675b27017db64d3c93c frame00000084 +2f68949032404f86188f155d02fdad4e frame00000085 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVWP2_TOSHIBA_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVWP2_TOSHIBA_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVWP2_TOSHIBA_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVWP2_TOSHIBA_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,83 @@ +3abc01f5b868f68454dc7fe857d66a67 frame00000000 +441bd781c2d480f755ad942390f5528c frame00000001 +0dba9159eac49a6d28c8809768b79bfc frame00000002 +da97606bdf66ea23f0d9b58e275d40d2 frame00000003 +61e6c5800338e4886a232fd43d5ff96a frame00000004 +00184d120c2dc54a587536a6f430486f frame00000005 +43da88478c967674459b46762d337d0f frame00000006 +b8cdc2f055b2d436b8ab875d2ce03aa2 frame00000007 +50d5b8453ef153b69ef5b0c3d6cdb02a frame00000008 +10aab546ab008972c5be7fdbf2df32bd frame00000009 +06506611d1d07b1b213b0d7c62540158 frame00000010 +98ac1b672034d9a20035d0c940b0c9b7 frame00000011 +e0957dda3f3f72251069b83232730e72 frame00000012 +dc4b5fb4f981febdb28e825268aadeb3 frame00000013 +5e715a801bf52b73426752bab7fad1e5 frame00000014 +6a88ee513d87869458b11a11072e324c frame00000015 +41396a249432256a564a72e3f5c17c0f frame00000016 +e2522ee18804a36f337245d802109359 frame00000017 +644d5485b390b39d7f3f00b1d8873652 frame00000018 +689837e31e816e23c3cbe0bf06659e3c frame00000019 +235daf27d41468fa6edf36246d36ea9c frame00000020 +7fcbca79af2271b254c95f58c29726a4 frame00000021 +ef6b112733ee3e76e9635048f94df9b8 frame00000022 +32dc8855c4afa04a4f8b913ef4f9cbae frame00000023 +7d5933e3991a7b60d53a1617040b6ec5 frame00000024 +d3f46aa56884d148d6d0043751ec0d2e frame00000025 +c77da73083c8067c6759ec9bee172542 frame00000026 +8b1cd1fb6bf0a2d573a5edaf17319a35 frame00000027 +eacf447d92612970caf1d08329b3087e frame00000028 +180dcaf8002b333767f9462a27432d5d frame00000029 +a55f1745dc2e290338dd6ff81b6a039a frame00000030 +5eac2ee3f9a76f5fdb3a654e28581c48 frame00000031 +951fc154f39f85ea2ce8cf08d50d443b frame00000032 +d11de84d5628703962ffd8894517d0aa frame00000033 +e6e0db1b5103a9026f063eceeb1e85ee frame00000034 +7acf8aa1b238f0979ba6f39cafe6e185 frame00000035 +0d484abe540eb64a1fda5a0b95d265bf frame00000036 +2e22199fdbc685f1fa1e38f2e59b7ac6 frame00000037 +5e12fdd5b3147c599e90e69e17b104d0 frame00000038 +93ccdd80afb9c7daede2391337ea725f frame00000039 +bddaa4cf7c62b42d36e300a50ed2ec48 frame00000040 +d53e28b1104be9bb2b4721aef9007e7c frame00000041 +1ec22778d458d3464b6e7dc6d4694b89 frame00000042 +08af12a2f76604261a4749a261d32caf frame00000043 +39353070c0819dc4e7dcef0f685d8daa frame00000044 +23cb0e267b49c617bd6581bef2f1b1a1 frame00000045 +db2e02d15075ff88c8a890edf365c953 frame00000046 +4026056898f68e7ae28fc0a5a61b5a4c frame00000047 +06009407ee8bc386c38ed1a21f67b8a3 frame00000048 +cbfbcb1c80ad78bcc42ecb3bc01afca8 frame00000049 +3586c719df180eb47af7b87b606fb38e frame00000050 +fbe82c1612be5e6db9158d9bb51490ba frame00000051 +f3be6eda2525a77f9abbe88534ee6168 frame00000052 +8c2e6cfbf2fb0c31868dede3a1f5b488 frame00000053 +1c0b43cb429477f443b23b464c534970 frame00000054 +b21b8076d78da4ea7b7cdd2aacc91691 frame00000055 +73115d597ac2dec7948dd180553a1514 frame00000056 +de544963d3212125fcd81224052a5a6d frame00000057 +52315e17248277cbf5051519c99d9899 frame00000058 +fd4f71e184ac2338299dbf84321b9cb7 frame00000059 +01d91ed8816ccbc5343caeb61815938b frame00000060 +1c4238978c0148a56dc7ba7b23a28c48 frame00000061 +bf12187519d34c63f3eb7ed19454f46c frame00000062 +f31f7ca01a3524022a282b48f7eb8c8d frame00000063 +44a8abf3301fd5145666c43772344e18 frame00000064 +ac28b1ffc02f100049e1779260f746a8 frame00000065 +9c921e27015e39638a8130e2cec45f58 frame00000066 +5305a970224fe1a02f738bd402c8aa4a frame00000067 +5418bc0f71865bd7dc2b88d065ddb903 frame00000068 +f4ec06f908540b3c4cb2252714fe97a1 frame00000069 +5bb9dba13d7abd88554ca037282be8d2 frame00000070 +703ca910fd9e5575f395367db412605c frame00000071 +6b652dec3ab99f1f82a8c785ceaeb9a8 frame00000072 +6128b49b5636d98043ae825df08e641b frame00000073 +a9b17385fbe8fa636e9d1398226ac8b7 frame00000074 +ce83122a5172e723947e42ec78764084 frame00000075 +9af6d97fcde0b9936315cb2dbe264d8c frame00000076 +f53aa7b09bddf740abd88875a5c960f8 frame00000077 +0ee0cbe4ddb475419c7cd935bc1b074a frame00000078 +f079f0e8e765a3e1fef217ca1bc91230 frame00000079 +036dbb36c2bfbcfec6830849ea080f73 frame00000080 +6d9535d617dd03cef6ed028b4e11d1a9 frame00000081 +4734972cff88869377f6890df9fbfd5c frame00000082 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVWP3_TOSHIBA_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVWP3_TOSHIBA_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVWP3_TOSHIBA_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVWP3_TOSHIBA_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,83 @@ +3abc01f5b868f68454dc7fe857d66a67 frame00000000 +b3ea1b6b4a5cceff315240e7bd2118a4 frame00000001 +910eb31651b9a34a281a26bdccc895eb frame00000002 +cd0e09c3fae9c0a47be045e340a14404 frame00000003 +5c35295e3dd777db9ae0e2985ac0e874 frame00000004 +7b971940496b99b2f82a7f28de43602c frame00000005 +db1dcfc0759420081412b307061a8131 frame00000006 +f0cebdca6ed010f07a453fdef06ee20a frame00000007 +08afcc0a118b048cafb0eae9eb6f0719 frame00000008 +222584a37bd912374219ba9f4e712575 frame00000009 +97077dc68a555e465cf61dfb8cf73abc frame00000010 +f6babd2cc25ce6b967ef41d2acbf1780 frame00000011 +8e37f998d544b5dda7cd9e725f2c1e18 frame00000012 +5b68ae36c50ae992a74f5466911913e9 frame00000013 +6934c60fed25d4042153237a7fbbeb55 frame00000014 +6a88ee513d87869458b11a11072e324c frame00000015 +bd25f68fc91ea04bf7069a566b6f71f6 frame00000016 +fad3a4a8633cee882068a72b54c79abe frame00000017 +e60353ccc3afa1d39581f4a334e09a25 frame00000018 +c76e848db1dc9a8e0973d6545fabd897 frame00000019 +7b1e63d7d490e900afd3463b6c182a8d frame00000020 +95267f3f293b62188082f6b603c597a8 frame00000021 +3adc5ae1adaa300d1857fade92f954c3 frame00000022 +7f4b5aec6079ce122ceb1e572a899bb9 frame00000023 +c709b56f60a228d5ec8a504be5edc9ef frame00000024 +4edbc09c91c635ab2aa92153c21242fa frame00000025 +54f06f90b5bdf6c4c0f6429c62a46c13 frame00000026 +87a5580154cc7722c381a7daee6516b7 frame00000027 +b802c35765576e94730fd420c77bd382 frame00000028 +b830b6ac7eeba66f0c939c5d5f726d48 frame00000029 +a55f1745dc2e290338dd6ff81b6a039a frame00000030 +4ce9b32f2e0b9b446b2470008cad5e3f frame00000031 +966aa90f3b4dbc063968e9781e990a5f frame00000032 +2ecf977222ce4f5dabe6734934983714 frame00000033 +739af47722acfeb5dc659d07a255d15d frame00000034 +84867a648373f74fd9d9ee73efa4e9d5 frame00000035 +37fd896392c3bcf687a04e38ac3b18d1 frame00000036 +3041b1c427634c6364f0467721508eef frame00000037 +b71274700f89a3d028d32815bf75e387 frame00000038 +a37763d120ddc2e79777e7b38b406e67 frame00000039 +491cf697e79a8eafd9fb118e2f237b76 frame00000040 +6b5ee2c4e30b36af51817c40447ec347 frame00000041 +57c82c603144b39c72cfda9407c40229 frame00000042 +d87c11b075b933edce4b5343730225aa frame00000043 +88a8a8b097f9abb577dd8f94f6eac25f frame00000044 +23cb0e267b49c617bd6581bef2f1b1a1 frame00000045 +ead41f0dd52ddce5afa51faf16b0632e frame00000046 +7cd1f59f1b07a05ceb083f6a43189cb8 frame00000047 +467a329d8c3af1a2815eb60613f2f792 frame00000048 +6066da929a80dfe800af17141a7efb01 frame00000049 +3b92013dd814deddeebb1a3311261ff4 frame00000050 +ff044a80d4d4b8489e0b054ce125dc14 frame00000051 +3cce46478991fa1e5446f3e9000b9ba3 frame00000052 +b220f20ae5685e7afbdc64a7150358c5 frame00000053 +03990859f3ddaafc5575d35fa10db7b4 frame00000054 +be947977b492e77d0d55e2adaed18502 frame00000055 +dd783ac180b4e976c2c74819209cfd93 frame00000056 +27a09a4dc17a60b2122191bf93dddee3 frame00000057 +4db3f94a6594e44f8c0f307a907363b6 frame00000058 +5db7a1dc7db6c3ccb8b7601cb7e24189 frame00000059 +01d91ed8816ccbc5343caeb61815938b frame00000060 +2205bca4538eff8ad0f0313915cad293 frame00000061 +a59ee6bc30ec94d2cfbc7ef2ee967751 frame00000062 +c5a437387c58ef0ee4ef6e84945481f1 frame00000063 +529b9d5815b313ee052a5f38abbd9c90 frame00000064 +15c4f0f722beeed72ecf800c74829dde frame00000065 +7d041632a29c3923993082b9a77674be frame00000066 +c95049175b77bd6991292d422cf0018a frame00000067 +00807a98c8fe129e482bd425dad3cbc0 frame00000068 +cefc4135ea110c8aaf4561423e32ac6d frame00000069 +7bfc930167a1ddd8110435e4a0f5e694 frame00000070 +2d8af4fc9fd4922776286f166c8753d6 frame00000071 +71e408ee023ec4ee522875af2b1ab0dd frame00000072 +84004ef9db33e9f4f2ef94d75802b6c5 frame00000073 +05c73934ba83c0ecb305d721c9b04ded frame00000074 +ce83122a5172e723947e42ec78764084 frame00000075 +1b40b869227862d6238af486a28d8e93 frame00000076 +59a32c4cb3b5f8e3472f6d253c0badea frame00000077 +a18c96f0172c0bed5c8de9b01bca2d6b frame00000078 +7cd43433f1962e3a3ab1814eda0430d8 frame00000079 +e9d90847096e53aaccb5213ad52159c7 frame00000080 +90570fac894353924cd4a41b42e91c9b frame00000081 +58b0c05ccd01bcd1ce42b6c7bd5dd82c frame00000082 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVWP5_TOSHIBA_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVWP5_TOSHIBA_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/CVWP5_TOSHIBA_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/CVWP5_TOSHIBA_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,86 @@ +9a0d89f0a0959dcf8b542ac243d74057 frame00000000 +92164c51865bd516ec090cec7ea10d36 frame00000001 +7073a0a0eee65737d73d50693f85a41d frame00000002 +c0a686f688cd7eb37ba82d790905e606 frame00000003 +f85e0925af5e737044043dad6b2a5718 frame00000004 +54219c8498b9348bc45bb1a992ad34fb frame00000005 +e8707691950a5183731484a4291be05a frame00000006 +973901fcd22b8412c7157f1406137e07 frame00000007 +7d83cba238462fac0ad87d28a9f8362a frame00000008 +363267ac4fae20504be3d32fca9576b0 frame00000009 +6f36cefb0583bd9b85c5147e77277a2b frame00000010 +4eebafa2220c7592dcdfc3a0e900d92f frame00000011 +3161471468350fbfbcc94ab51aa3330c frame00000012 +e3977a136da287f564336cbaaf9d8cb6 frame00000013 +e3c697137babc72adaa25afacdcc75dc frame00000014 +9f9f64d0fc801dc299de3af4d6c304f2 frame00000015 +137780241b168694cc8ed24708be88d0 frame00000016 +fb3396e16879947eb097de3a51ca2ba4 frame00000017 +e44e5ef7750b3e1c64b4ab647657ebef frame00000018 +3f761b62a2374dfed7b9d46a258d423d frame00000019 +ea85de23a5c9854bc7e424267fe0dbb9 frame00000020 +eb5fedeb2f64fd242fea347acc7ea6d5 frame00000021 +98f47de0638e67fa1f90d7164e665c2d frame00000022 +ccce356560ec8e684ca8056ec94afe4e frame00000023 +d513632277ff753e3847fac415fafcf2 frame00000024 +3e7a21478509f18ebe83ddd1bbfa1311 frame00000025 +77557eaecc6c85551f88d289cf017479 frame00000026 +d2d5c1de934b065bf3b47f8375946677 frame00000027 +a1f0f2462f586ba58591fe5d339ae617 frame00000028 +5a3fbf2ab17ec91c0c27e74164a21bb1 frame00000029 +1e7e623ba43661a9539d992877f87bf2 frame00000030 +22b087d1b956a739012bcdc509a8a529 frame00000031 +783e86aa1741fd40a5945dd1fd041881 frame00000032 +d9a4fe0e16b43b351b732d724e63415c frame00000033 +042c4e16b2c518a633f1cc4ca6e7ccc7 frame00000034 +a017ae13e771966262c26b1d3c8403f0 frame00000035 +78db365b037f4975f95ea8e6666e9912 frame00000036 +6cd98bc34f46360da18c5f80f9cb099b frame00000037 +6f15adaa0d96818ce7b042e21cd41fbd frame00000038 +aefd510367275fdb359e15d6984ed41f frame00000039 +3b92b66761c7b5e1a60e6073f57b64dd frame00000040 +204125d04c4a9dd56b955fb73c484987 frame00000041 +7d266510443230651a4288a2e9ce8dc4 frame00000042 +71544be3339ac3a15ea673144bb9c908 frame00000043 +ee496fd2dbc0e4bea1aa3a9716a5021d frame00000044 +324abf09512498d1e734da34156ea7a2 frame00000045 +a6823ec3811a345be5cff42cadc0d71a frame00000046 +348838fa368d120f9df11da01a45de10 frame00000047 +bf29414c2c4405a2d3b32564e1c6a16d frame00000048 +659269014194a5c5ba07a55fbbba286a frame00000049 +af64a6adace8052c84582ea360544404 frame00000050 +b8e4ff3b7926a7720c55a89a9a3997fa frame00000051 +4ddb2e606963496ca0d3f05cc7046aaf frame00000052 +d90f8f89bd6fdf6bc06836dc55bc7c1f frame00000053 +c246a33fb463b42dcd7cb0bceee43c32 frame00000054 +24d24f5bec8673b3bd4c857f8846fd6c frame00000055 +bc0949a100fdce0eb34855c00686326f frame00000056 +be14684635276bf4f6693bb8ef533d23 frame00000057 +013185472a4b83a613e203946dccbe4f frame00000058 +434038a5e978cafda2a58a19e2c02027 frame00000059 +a056f1db26295fb0cccf6fdd16aea791 frame00000060 +040835584c1ebfe1922cd017698f1173 frame00000061 +514ad3b3504dce4b16b0f69578887504 frame00000062 +0d6ce3bd00c85ddd4ccbedbfa05d57f6 frame00000063 +4c1237d0c08943d90d6d171b30daa667 frame00000064 +8bb9a27ea6e5f47666f66a4e638b83f5 frame00000065 +333ce4fbd234fc714575ac143873008e frame00000066 +270f59e1355f4e558b0964f4d0b5476a frame00000067 +7dc49771cf8f8df08f009bcb42bdc384 frame00000068 +11308371de46240fcfada1c5263d0081 frame00000069 +2d526ef9cf8af67cd237e814d5bfacd4 frame00000070 +8393b793047959b69d1cb3e2638f4c58 frame00000071 +726fd07c4a0135921a23f8fcdc12b26e frame00000072 +8a642c0a430373d02117a0ada253156f frame00000073 +992f56e69efc0e1f1aa1baa6c1779c37 frame00000074 +9e361d688bd8e3f3de08e29b0cbe4b82 frame00000075 +68ec7c0eab35453b15656ee471bc59bd frame00000076 +fa401ce816f43988d150597267ffa113 frame00000077 +eda100c47097434d2d377c8653cc440f frame00000078 +7d83443a30e018ae6d730fcd443bec4d frame00000079 +6f748b0b9f0f6222abaf5e906c4bcd82 frame00000080 +85e5dcfbc742df730443db9c79d4b7bd frame00000081 +d6b509aa889318ae184f1f1eb878ed57 frame00000082 +44b78d92634efff3972473297d5bab79 frame00000083 +ee09c22fdc61dcbbaf42232752953353 frame00000084 +da7a4dd37275aa563adeebbcbcdfaa23 frame00000085 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/FI1_Sony_E.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/FI1_Sony_E.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/FI1_Sony_E.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/FI1_Sony_E.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,15 @@ +a3f6def234d0c0c65bf4a6ee8e499790 frame00000000 +d2581abb4ae38fbef28a8ba8cbde01f8 frame00000001 +0f1ced733f4bc0a80ad9439123c68d4c frame00000002 +183c7420601607a245b2d4c9df29db97 frame00000003 +caa15f3b5a0cdccea75a6a35262b39c7 frame00000004 +bed91493e612bfffb91100e2fcf59eac frame00000005 +a05e7a82ac602eb3e92b5ca1d6670663 frame00000006 +c32997acdd9295c90080d2a6211c76e3 frame00000007 +02776ea4a1ebdaa6bfc31910634f0dc5 frame00000008 +6b5e16763ed0f3b2aa22b4a5a732d672 frame00000009 +b522772dc6dcf557a1a480cf0e4abfe4 frame00000010 +1e496c62aae7cb3ce8dd0413c7678084 frame00000011 +c30bf7c55db3f02c4c1ea250f8dec7f5 frame00000012 +21c7654feeda9ac5152924d4ea83eaaa frame00000013 +5c5ebfd907f5853c357dc509758f654f frame00000014 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/FM1_BT_B.h264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/FM1_BT_B.h264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/FM1_BT_B.h264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/FM1_BT_B.h264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,297 @@ +8e8b1913b1e31907b3ece44f8cd247e7 frame00000000 +b6237d910207fc0cf28902a38033fb7d frame00000001 +a88a6ab56d05b284fe00ff809dc20b89 frame00000002 +71279621b83262c29160ba15c01e176a frame00000003 +71279621b83262c29160ba15c01e176a frame00000004 +71279621b83262c29160ba15c01e176a frame00000005 +3784a03f3943d5e47630a5e3b55ba99c frame00000006 +e6b3a28ff6832be3faff2f15ff8496b0 frame00000007 +93823a6ca38877595f6cfb7955b3ff38 frame00000008 +e6b3a28ff6832be3faff2f15ff8496b0 frame00000009 +c7f5cdf8f3e60972fd8f33538df87f8b frame00000010 +c7f5cdf8f3e60972fd8f33538df87f8b frame00000011 +a0ecabf9c2f6d9559741d48447c79218 frame00000012 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000013 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000014 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000015 +39966ce039b9df58b61a3fb091a523dc frame00000016 +8ca6ac8f5eac7a07b9f3b00681811f59 frame00000017 +e74894978d19ccbc8bc1f87499360be6 frame00000018 +3ad9e46296770d008763a3e8c23108f7 frame00000019 +c7b64951a846327d9916263818c7b539 frame00000020 +c7b64951a846327d9916263818c7b539 frame00000021 +2ca4dda9c2e98dce8a1a35486f7aed83 frame00000022 +05c627cf282b7d5497e40b1da7153794 frame00000023 +926586147da5bff1e7ff94b888cfc119 frame00000024 +574de75bb499d204f98f6a63921b48fd frame00000025 +cf6f6b6039d965b6400713e6adcf89f9 frame00000026 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000027 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000028 +c3d0d9ca1ddee2f024708f1d02ffb430 frame00000029 +f8208725a6473dd96a5301128b42d73c frame00000030 +66e7e6b6ae570936ffc8d86cd068013e frame00000031 +aaa434165015b5f253a7aedf322d0fb9 frame00000032 +aaa434165015b5f253a7aedf322d0fb9 frame00000033 +00b042be7605383e7052289ea62418f4 frame00000034 +944c177b93c04d784b3f324f76639394 frame00000035 +da5874a12fef7f0bc2d34bc848c57137 frame00000036 +bd44ff0090b6787b9e6dc3482bcb9d22 frame00000037 +cf859521603b91d59832d679f2971b2a frame00000038 +78eeccd5f536fbfa335d587afdad8b1f frame00000039 +d1e8b068890e8b92c9f36492de07f4fc frame00000040 +2c6bae163c984a2ace3f79dddd9dac8c frame00000041 +7a597fd0dcda6064947a7a70f0cc59bf frame00000042 +3163281d4baf5d4f71a3fd3db72f8be1 frame00000043 +a8787bd22b591b9c145634e10a1cf2a8 frame00000044 +45b2b71cb5ce66fbf60764a1140bf65f frame00000045 +52feded77b01148c077d362f6c9d8320 frame00000046 +fb4cb6b8142d295feace7a8c2a4c16fc frame00000047 +83e0ac294ea9bb36e63a1e3d17c63f82 frame00000048 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000049 +208ec3f70c71b7650baec43dbbfbe4ff frame00000050 +c5e5a5ecf164267bda0410d5e277e60f frame00000051 +208ec3f70c71b7650baec43dbbfbe4ff frame00000052 +79a2665f9effdf316c6a4c15c34344a2 frame00000053 +667c0740aa0b3f9b5f11f0fbf4545f0e frame00000054 +3df1c008d3a663794b2f430c571100f5 frame00000055 +e302796d4a861fa73f332e91da9ea098 frame00000056 +c03f331b6ab171270e027c04c179b002 frame00000057 +fe40e9f7efc389fcf5e4ec530a6edece frame00000058 +fe40e9f7efc389fcf5e4ec530a6edece frame00000059 +fe40e9f7efc389fcf5e4ec530a6edece frame00000060 +073c4de58dffcce29258d5948af14951 frame00000061 +8c3164419a6f31efa7ea4309fb90cd01 frame00000062 +3af4fe5947c8584ae983f390790bfa23 frame00000063 +c17bbed59b78cb74b315bb11c87b72d6 frame00000064 +94ce18acbcbc9e7ba5536319457fc96d frame00000065 +79848753ca9ce8c847a915f7937f71eb frame00000066 +eef32e97d1c833b31e1292b686afb2c5 frame00000067 +5ca6a9d666e15956908093302b33f3c6 frame00000068 +ccb43ce098b799bbec2243e0e117e14b frame00000069 +a6fde07126070c499f3c70ef317dd765 frame00000070 +2f13ceea4c3952d209e8704264e7834f frame00000071 +2f13ceea4c3952d209e8704264e7834f frame00000072 +23d560b294e2be67896e0922434843bd frame00000073 +739ec4cbf1cd3624452a6ec521dd09c8 frame00000074 +43043f81a89fcbff0e71ad2ad5b6d3b3 frame00000075 +1db60dd5cab6e693aa1046347fef0ca4 frame00000076 +783edcb8f8a2fbb7f31c50d0ed45aabc frame00000077 +c0523515d2f1f5ceba03adf224a31a12 frame00000078 +c0523515d2f1f5ceba03adf224a31a12 frame00000079 +75ca4bf5a8914a8afe92aec469f8a98e frame00000080 +275c4dcb741c69afd461ba59904ee2b3 frame00000081 +5de2a3c35c900268f38686e59fa37c4f frame00000082 +765b42131cab09589b553497b5cfecd0 frame00000083 +e7b915d5cd016914b2d6b7671229574b frame00000084 +d8447055384b37d48ce71ae2484ed253 frame00000085 +0b83454f1d28482f049238309ee23ad8 frame00000086 +ed3fa6b6d2fa2ee12e1c3d596808f9a5 frame00000087 +80a7d6588fdafc6ed3e33f719ff89e72 frame00000088 +3d04190e0b6206e5a9c8ed98b4a83010 frame00000089 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000090 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000091 +2f1cea87d90065d7d8a50ae37a582286 frame00000092 +52a432ad03fad744cc8ff4e0456a3005 frame00000093 +b3e817c37a6393ea53033f049e3ad509 frame00000094 +705112622a5a6e0ca12944d4f2cf03e0 frame00000095 +dd0daf9c4bb8a51462e0fd5b9025c4ca frame00000096 +ef712c063bd39ddecf39e22c2af62a96 frame00000097 +fc7bdcb54f8226d8252a7182e2a078ad frame00000098 +4f6992ba95142af6beb934472572ef43 frame00000099 +6fb97c28ab0b62a1368cd2c36f4d31b6 frame00000100 +d21ce4d94df94d3ecfd3007a83f41946 frame00000101 +68688bc572e1904e37d8551596c0442a frame00000102 +205852646eb90ad1afbe898acba7932d frame00000103 +a43740314076bf0ed8bf51b9c67a9027 frame00000104 +13d5a0bae8ed1f78b31c5c22c466f8b1 frame00000105 +e40080a1a642cbe112b34a761f479ae5 frame00000106 +4877ec6a875b5dbf1c97dc607f426243 frame00000107 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000108 +c6ba28cf46c5681956449bb73da7cf79 frame00000109 +e99eb64c262e6b620bd6d5111a2209ed frame00000110 +7b082e083c09c1ae811efd8293bbd0c8 frame00000111 +e61a69750998e15845ef483b44307bb6 frame00000112 +ceb2562751477a90ff95d9c2abc24924 frame00000113 +2bcbf447d12e78215da3ce5f741258ac frame00000114 +2bcbf447d12e78215da3ce5f741258ac frame00000115 +1fe3943fa112c312e14a7701694b0bee frame00000116 +837437293f1e77225384197cd34132ba frame00000117 +03cf2bab702bf1593177ceaa4172fb03 frame00000118 +9487318d932c9c13155f6a29e2b04129 frame00000119 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000120 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000121 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000122 +0ecd778bf35a68ea3693e2785417e9d7 frame00000123 +b9df8ebde6a4130c8b722e5175a6aace frame00000124 +e48924d6de95dbad77a0fe04c59365ab frame00000125 +317b1398219cf39d15bbc7b823647aa8 frame00000126 +317b1398219cf39d15bbc7b823647aa8 frame00000127 +c33057b01962fb5c49621bb8a291b44a frame00000128 +40c5a8477d0a97b883f63719f822318c frame00000129 +4e99213d1d34259fd32e7e0ef96f051a frame00000130 +785ef5f3490d2aec3a10a90f69c8b177 frame00000131 +7d3980b64e167368b499a72f4ae88029 frame00000132 +b0cec11c5e37798b1d320658fb12353d frame00000133 +a097e65fe12612480e07eee4dbdbc305 frame00000134 +a097e65fe12612480e07eee4dbdbc305 frame00000135 +7f8fb988fe5f7a50bfd0e3299782e73f frame00000136 +a37422248e18b7e930e5e679c3d5a756 frame00000137 +8bc419744fd4216d01680cdd08cf5f84 frame00000138 +dfc264d2a5109f80b45ca9b7bbaf12dc frame00000139 +29e94a32e74ba444785f2705fbc4fb76 frame00000140 +75e14ae5d082eef11006c1c36b4b56f1 frame00000141 +f0990f19274124d8c4b371eb9510688a frame00000142 +0ff27b7b6d26727fe6e56be2d2f0514a frame00000143 +14273e3ae5ae39f73ada3a88f7f4a756 frame00000144 +c2ae07ca8d16f8d1b4f02f7100b005dd frame00000145 +817f24142ec2088e25fde6d48a57f902 frame00000146 +3e1ed88401c3a6dad34409f5d6ed8238 frame00000147 +a8278c28f9660d08319dc8a6fe829e95 frame00000148 +3d8a0ab602dd330c346858dc56034051 frame00000149 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000150 +292cf6ea4926e07ac6991bef19f9d408 frame00000151 +4de4744b75eafca2f058b89897548d93 frame00000152 +292cf6ea4926e07ac6991bef19f9d408 frame00000153 +c46e17de09ec65176784928766ebaa05 frame00000154 +73075b324d2a5fb8ef578c729045a6d7 frame00000155 +a128545d6562d6756e73a5cd739bf803 frame00000156 +62685bc4c4bae0c313ab0c640a05af98 frame00000157 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000158 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000159 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000160 +ee9b3d41dffb57e17edcaac082952acd frame00000161 +3498855090e44e8fceb6a424975dc2e8 frame00000162 +53f98c7212383a953f68f916a8b021fb frame00000163 +0a6cac53394f17be6a9e1ca06dc62731 frame00000164 +0a6cac53394f17be6a9e1ca06dc62731 frame00000165 +55305f9f9c80e74814a52428592a3bf8 frame00000166 +788c92ef4b17fc6198687af399124e0e frame00000167 +141cddb5f9a9aafc38dc713acb5a9b00 frame00000168 +42ea1e228d46d8627bda0fcb3b077184 frame00000169 +8c1f2f91f8dec25dd2a43be8d8324d7a frame00000170 +f38e28493bc039ab7c0dcdf08108c059 frame00000171 +a9e6ad6fcb6cc73f3f25ecc15796a3c2 frame00000172 +ddf9b154abbee3f695191a0d1e8afbae frame00000173 +d794ed1061efcf07dd9855edaf9c5486 frame00000174 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000175 +76f2ef00a2bea81405d6faeb4e853c27 frame00000176 +7ac86a22835df91a60160e9210d6d082 frame00000177 +fc0e5df00d307898ac9cbd01dd1fc0a9 frame00000178 +aa11f91ce40145913951b22301e4e5e9 frame00000179 +baa04824d6d7069df40f491f88d4e60f frame00000180 +4e72cce71987571d4255d8f244317990 frame00000181 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000182 +509a8a4512c9682e58464a97c959cb61 frame00000183 +f93064a292276141cec1ffaaf65ed053 frame00000184 +dbd032645924c289d7278cb2a35de6b9 frame00000185 +4d74226961ce3ba182b8b22486483b2c frame00000186 +df50646fd7884f9ac4612d9908aa3f2f frame00000187 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000188 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000189 +1a73fd3e91e19c78c4b326732839625f frame00000190 +5757bf72d3a6a275e46e4c61f9ad9956 frame00000191 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000192 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000193 +3faf445d1bdd5a147445309a18bf72b3 frame00000194 +083abe06a98f795001c521cf0cc1d254 frame00000195 +0bb4dff7a126a2a1ef5b84febfbc1722 frame00000196 +90cdbe1aaa2cb3887a583305b3134a1d frame00000197 +1ef9283e2c8592dfc31008efa66eda6d frame00000198 +1ef9283e2c8592dfc31008efa66eda6d frame00000199 +6e3501a4d3d925628735be28ffe3db1a frame00000200 +3bb755c60ba854a3b9acf7b91852208a frame00000201 +04d06aae457f896a15fe272929710aaa frame00000202 +b6f0b2dc29cad1fc5df8efb7f1d08585 frame00000203 +c67d9911240b5130fed128d97659272d frame00000204 +9bc6fd6a901b4963b6ddeabc3bf84c06 frame00000205 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000206 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000207 +de30d4599c3099a6e1bb234e036804b9 frame00000208 +edd3f1b03c2de941f348d2803b3ca22d frame00000209 +0c848375b9d7e3807a8c1df74db3795e frame00000210 +1b6c1eb42b4601ad04cd80914ec95ff0 frame00000211 +6f1c4fff3b82395100a9d78dc2daec64 frame00000212 +112c67416be82b442eb0dd1bd5f2e86f frame00000213 +09c3cdfd28b5d152b9e05c7836033aa9 frame00000214 +81960d23bd588a71b2cd6b7365a8f4dc frame00000215 +607df29f38f5dca9d43623d184501918 frame00000216 +dcdc67cfa02d424fb9c73405198e6103 frame00000217 +dcdc67cfa02d424fb9c73405198e6103 frame00000218 +8d6c9154610a98ad9cbf09c041e1c131 frame00000219 +dd33f27213066ed8fb651317a2534ee9 frame00000220 +5c4a88553071b438e657bee5b44c65e1 frame00000221 +c6470729fc1e340533f04e4ad9628f48 frame00000222 +589463dc4d4d134224a52e03a39cbe8e frame00000223 +2701f8a3e0f45ece2aeb584bf1ac17ca frame00000224 +8dab4deadbe81a487a665cf02296ed0d frame00000225 +d81e3f9b7a8dd54824c764e6df736a35 frame00000226 +dd28d5bec92d850c80bb4b6a6b2dd21e frame00000227 +57aaa804b782781e89636068d60d27a7 frame00000228 +94c68bbe801386a7726b5c7cb8f9c927 frame00000229 +1f369119b20a13a8047f54b757a50663 frame00000230 +8acda63240cf331383701fb0b9913074 frame00000231 +37d4bdf8232d02092942ac89bb4f60e6 frame00000232 +c34355dca006449a01bed9b0b284649b frame00000233 +c34355dca006449a01bed9b0b284649b frame00000234 +68898bbb268c5f9ab77ffcf7a5be50c4 frame00000235 +83c912ddbc73725dc1e99d345937f6df frame00000236 +62bdc177d006b615293288e993376b49 frame00000237 +6c5ffa929ac31b94b6fd45d9e119a243 frame00000238 +d3f38d7c6e0c173b3d925d951fc59d40 frame00000239 +c2a9849ed275591d6ea252ca789268f0 frame00000240 +36241cc6fcb1d3fe81d044e96e42026c frame00000241 +ddd92e151c638fb6b6c827b4efc788e2 frame00000242 +93e94b72dcb5764ef386b42e29be503c frame00000243 +c77fb87e865d5f23d69ce306b2a830fc frame00000244 +00c9f74c43ad1b7611f0c3e094fa901d frame00000245 +9132a683bc41880bc79f630a1a309b5c frame00000246 +2e9d6519a95ce689c4f329ac799b9ee9 frame00000247 +089ff1ab3c403c79f40a268e81a0a374 frame00000248 +f3a7915fd5791918345533ae846b9d1f frame00000249 +7b689e9aa091bc534ad7033fb0b8581a frame00000250 +fcfa55de239281253bef30efd60b9d12 frame00000251 +c0eca04df5a061b4b74002fdd6d6fcde frame00000252 +5d9d867cdbf4d08400ad0ef046c2d27c frame00000253 +5d9d867cdbf4d08400ad0ef046c2d27c frame00000254 +c4686b2e5af06d42dc6a17f2336942d9 frame00000255 +a3560621df9b31af9e94124531a46437 frame00000256 +bb7d1896199ef504882e10263e1255be frame00000257 +6c92ff97bfd4d4eb526f204b7df9f01a frame00000258 +4c682bf07b93d7cab480c80b7331fcbd frame00000259 +f8b06b458d3b0d5f0a15703e795a573a frame00000260 +f8b06b458d3b0d5f0a15703e795a573a frame00000261 +2513954c5bb3437f02dca24a8e6ca355 frame00000262 +0ab54352bdfb4f3ba725b35fa7f91e9f frame00000263 +bf846fc5140f8168be829083f6bafa5f frame00000264 +9928e2ef04b574421c46f0ff5be4b447 frame00000265 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000266 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000267 +3aeef4fb99bf5a8ef6321b760b7d1980 frame00000268 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000269 +305480a14a2853eaf1c5ca085ef1ba67 frame00000270 +a1b209608b95e7294186c6d9cbeef69b frame00000271 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000272 +6abf951b878ae617182e48554ffbfcec frame00000273 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000274 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000275 +84abf5e3f56976b0ccbb4b5b5b776eae frame00000276 +7187e9fca70c02a4e0bd397b15cc5b66 frame00000277 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000278 +d39ad7e45a24013f2ebbb52c8884570f frame00000279 +d39ad7e45a24013f2ebbb52c8884570f frame00000280 +d3aff00354c8578e2fb1bb1627600e02 frame00000281 +efaf2b71ce0466a5e7b0e342e5497033 frame00000282 +250aecdc3d4964e2e6c07e07cc42cdf8 frame00000283 +638d17db074011db2859f2c18e348588 frame00000284 +11ed40047858c614890f8f5157dfe319 frame00000285 +6c18dc4eef66a32414c3885c7b3388d1 frame00000286 +6c18dc4eef66a32414c3885c7b3388d1 frame00000287 +6d333f8942a168c2c830fb5b030187ca frame00000288 +4020213d5fb25006faf81ffa12786891 frame00000289 +9842046e36eb6daba66a3d44e5bcc034 frame00000290 +9d9ca391f36ebc7a0c245b57e5c0feeb frame00000291 +4ae5b51eb810bdc0bd13abede913f755 frame00000292 +9a7df58131e80d61715eb716053828de frame00000293 +9a7df58131e80d61715eb716053828de frame00000294 +76e27d6e7f0ecd61df3937d0f23e3a3b frame00000295 +f9aea19c92e67d2f6f20cd69456ecbf1 frame00000296 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/FM1_FT_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/FM1_FT_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/FM1_FT_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/FM1_FT_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,285 @@ +572519c836e36352e6c16725a4f8b999 frame00000000 +280bbd76dee30f4840aebe6e68a10559 frame00000001 +6a402a0a24b919c7202cc74ff7c680cb frame00000002 +d2a1dc882041956e0d02fee801447c88 frame00000003 +c0c754509a9c78740292f0f48f7bad73 frame00000004 +b6501485b8f70bc9bebf8185b6add208 frame00000005 +d0b4acb92c41cc3f6a8ec053f0c2c3d6 frame00000006 +b8ceb15297197141f38a669dabad5c10 frame00000007 +9c3e2d1681b164f7abe03e139c8e8ea8 frame00000008 +060b5266449b21541c068f071f03c48c frame00000009 +485547c31003aa19d5b8ce4e94e35425 frame00000010 +50f80d0a6ae43c9b4c43249d46ac838d frame00000011 +1e466c88c49f3a4639bfde5a0e5045a4 frame00000012 +a8c634ea730e750ee20951a8edc69406 frame00000013 +ba6ad486535e250bd30e0fa51028af33 frame00000014 +87fb8913eff8475ed1d403ef283af877 frame00000015 +396ae52d3067f6cbd7e34226814dbe72 frame00000016 +8c191bb7fd086965b27d9ed535b83355 frame00000017 +f406d46a1401417143057cc5078dc115 frame00000018 +7c144db7b3c15d006145361c4864bfa3 frame00000019 +cf0112a16470068621fd4a2b84612264 frame00000020 +56b001cf558a1dbbd99394587a695b8a frame00000021 +51d7bc2cf34d292c285cd9356d53f827 frame00000022 +2a9bbde6736737e019389541ef77c923 frame00000023 +d99e69694add5e89e0f9451feb7750ee frame00000024 +cf1c5089d687e738a084b4502f26a500 frame00000025 +ebc9c69ffd034e00379687cf0f302a47 frame00000026 +30f4723a549d87aa619f0eb4aa582971 frame00000027 +6dc000b0e82436921293e9b3ef5b4fa0 frame00000028 +9eb7453e6a874d2d2371ea7303fafd50 frame00000029 +b029d2019f5e9938f4d849b4e9ec86d2 frame00000030 +d1444678fc13aeeb76a4abd1cddd8085 frame00000031 +43f6f645b1edd499e760c8bbc8ce2b39 frame00000032 +0072937b59f6200d19678aa5b9fbe3fb frame00000033 +0098df16a02c76bda98087051ac4cb68 frame00000034 +7ddc7a6f68e7996e4455c21189acddbd frame00000035 +716907c813b5aff720f71eba85e2434f frame00000036 +517b980a433c7ac5c3c4e3337e695c71 frame00000037 +739c767a9c4c21d71737a756a3335788 frame00000038 +40dc06f2ea87d745ba4a8d7a3ffddccb frame00000039 +4e25ecf4e2441adc45d3c3ae4f710fdb frame00000040 +c092f0d512f8165c2778bd9ef3761aa7 frame00000041 +40d32f172510c8061b4889dc524b0b9f frame00000042 +a2c5302ee6227244b0e1d69af5ef641e frame00000043 +0b89068e4b9fbe0d65480961afecbc51 frame00000044 +9ce2976e674edc05057d6fe12dd0ed75 frame00000045 +3ad8ac00a8cff40f7ccb2798de2ef41e frame00000046 +2f16249fa03f690107110f942d0da1da frame00000047 +52e8bdb505a827826a8fb662ed37fbdf frame00000048 +512688f19a798af895ef2e2eacbcba5c frame00000049 +02d85a9b77203772dabc289d9e92ac50 frame00000050 +5a5805ca2a314c0b4c83fde1010b4e73 frame00000051 +e55baf9048001b36ea7c1762563af9ee frame00000052 +65b1f661fe3f18bb43c8d2dd8a12475a frame00000053 +864fcd9e6ce20cdc8c9d1e672d5d85f6 frame00000054 +d41d7420f9db5a1d2975fa764479519c frame00000055 +ce7f0cd5c1affbf7a3a586efd41e24ea frame00000056 +16ad203a369e65d29bc59723233eb62d frame00000057 +ef98d0adecbf5d0eb166190fe30fb24a frame00000058 +af333358c0917431a6c8a22341a48b09 frame00000059 +d3959c9c834b84ef8e9502d9c7280703 frame00000060 +099dbe8b6f43d45979cd7c1d54471209 frame00000061 +bdd61b2b428aa3ed3ce00803909828e2 frame00000062 +d0473edac5646fe66522b91b7c3bb5ed frame00000063 +9d784c3aac3c8e808aca9281b6ffa8ef frame00000064 +39691b395f1ca7c3019bd33e33ca7d54 frame00000065 +5c6e11aa137a9100baada4a285d23722 frame00000066 +5f5a94658a699c3b47ff261f867a6d18 frame00000067 +f56560debb8506a59fdc42e7c6f683f8 frame00000068 +b7beb35e0b5b7008085c724f023b1b6d frame00000069 +17ab68940ad72f795c1c435b2dfc20ae frame00000070 +3cdab827cdd474d7c8ec2067ef731920 frame00000071 +f432c9d464d9972453e391519193689e frame00000072 +df254c54c9c20bd0e65d85265d5a898d frame00000073 +0a02c26bee609d82b852f2cc18912c41 frame00000074 +77a9f6380b9074fc7f371f34808f830f frame00000075 +0f6792cf2e17e58ed5197acaf6291ca1 frame00000076 +821cccb711972c04311bd8a5217bab71 frame00000077 +155661abb49338f3bc89aaabecd2b814 frame00000078 +5e708cfc2e95831c60773f7d430b26a1 frame00000079 +2fc5b7fe9f6cc140c5874d8623750686 frame00000080 +b3876b3a3cf0835a55a3da66b9899cc2 frame00000081 +b30e5c1111922e6e5c1055fa3eb0eb98 frame00000082 +2e75d98474bd00bbeea55da0d51622a1 frame00000083 +b29c657a5b65322eadfce6359716a153 frame00000084 +385118416cd2726e60638df38cdb79a3 frame00000085 +f6922db4a51734acb999091de7e28856 frame00000086 +f3c0c6adcfd1f26956351513e220daec frame00000087 +95560169f89b7dde5d91659bc0c791c4 frame00000088 +011486fd41e22f8bd9ea747ebfb90157 frame00000089 +cce415f6ee197a78f3720044238563ac frame00000090 +efcb6111064b11632bb8511de8424b94 frame00000091 +3e1f8951fc02e8ef0f82be52d9971ea5 frame00000092 +8c2e4a919a9ee31ccf951dbd68660fdd frame00000093 +139c1222571d07bbba169b508cd8d8e6 frame00000094 +5c5162f289e5d8affa474f2cb7fd2934 frame00000095 +b08c90e93abfab60ba7ba4e08eff2369 frame00000096 +63c8246b7fb067658d5f02fa58c0d5e9 frame00000097 +5aeeb6884d572354342709b99634923b frame00000098 +a576b83f786a76455290b02e8cc8a05b frame00000099 +69e0ff520adc3f132ee4e8129c8f1e02 frame00000100 +4fcc602f94db80d89a2331d62526d25f frame00000101 +56b27c2d514584782d96d56de75a0807 frame00000102 +0f72c31d4576887b2f5578f71629d7b9 frame00000103 +167a7bb862470d145bb84432975fd035 frame00000104 +94624379c3701f2dba85d20fb4579ea0 frame00000105 +44ebc5fe29ba50716fd2a9027c2c9b59 frame00000106 +484034b0c3b6b475670a5f925a0983b8 frame00000107 +1ce452a5ae66c4105505fdf0340b2c2a frame00000108 +b51cd46a37efcd00c7bd4814dfa6ec8d frame00000109 +074f32383f6ab386d6ad548019d6a063 frame00000110 +ec24ce6402583468803609235bea3756 frame00000111 +7250d8b6b7dc240463c6fc39e55186ba frame00000112 +a71393c4d1310cabe60b21c3a4411824 frame00000113 +da4c940d3e540359111435a1f62a1189 frame00000114 +8b0fb21a9914a0737396a57f989ca918 frame00000115 +5fb67e0177c47451a82fa9e1347eaf3b frame00000116 +d132dccb5d523b73249d4292b49ce39f frame00000117 +20b37123f541ff3578937dbc5641f785 frame00000118 +8cbd73ff5254ab60d86d3759eb55b767 frame00000119 +0a21b5577fc9bac4d3429f61624ced09 frame00000120 +01e795a0b2614e298212cf9eb778d636 frame00000121 +6eccbf1ac6e4a34774be7e9c76e397e5 frame00000122 +b68d590e58f437115150fe73c5507915 frame00000123 +f8ce9b1d6d72118b5cf67390911c5fe5 frame00000124 +a77a44b88c0a7b0a98a6b2326bb8295e frame00000125 +5879dc820d9e445114b2c3b328942821 frame00000126 +019a0af5847c197767fa63daae80240f frame00000127 +35ca18249961530bf9d601c9bf3489f6 frame00000128 +9119c29105a008ac8e940d62c21273ed frame00000129 +2208a2bc740838314f8f887bc2f56cb4 frame00000130 +1f815b8ec72a181e4cbfc26a8d6885e7 frame00000131 +7c939036c1fb035ee9c03856056cb92d frame00000132 +0aee7f23390d1ddf640effd8f5952c5c frame00000133 +f5b855ca8044b1a47f915fea8747dd9c frame00000134 +f250458da4e178b50a7b0f8be295e783 frame00000135 +13b51d3b6ec1923717e29cac4d5a25ad frame00000136 +35e91d958fd71f2df5c70d01d768f139 frame00000137 +0e35d3acf4070c600f4c45fd7e3c03fc frame00000138 +8db9da684f8216180f6555e02f1204ec frame00000139 +52d8393209cb3e58d87d62577dcc3909 frame00000140 +62693877199d9fb7626b210cb54bf129 frame00000141 +a33af9f7378cf507382578bfa8069b01 frame00000142 +1c993453e1a21e39104544db01c62ce8 frame00000143 +62631f43155c1eb9d152a38558135be8 frame00000144 +1efe6e4fe9303c27adba6ee81b989b51 frame00000145 +d7528f6e40b03c795fc94c1576fe5516 frame00000146 +341b697f8adeecb472dd5136ec080e53 frame00000147 +9596b67a06ae362c898f71b8c2d2b9c2 frame00000148 +05d4aa373343ab274c023b40c60fd72a frame00000149 +90595d54079fe0513f2a6870eb5cb452 frame00000150 +c016cf8a399e59246c1e697cb66e4d40 frame00000151 +eaac57c65457b026ab5c92ba05aab750 frame00000152 +85e096ebb1bd09bbaf515cfedc8d01f7 frame00000153 +7b367cbd7b911f0d11a14da8a7ac1308 frame00000154 +12ff8431e34bf7ab01b47dc57a449860 frame00000155 +12ff8431e34bf7ab01b47dc57a449860 frame00000156 +12ff8431e34bf7ab01b47dc57a449860 frame00000157 +b6a4cc39c88ad5198fdb4d48b0faf03f frame00000158 +bf4405df69a4acd7b06cbd5bc7660021 frame00000159 +2876705748488251521a3d737f6581e8 frame00000160 +573cab0fb35be8331a14551f81914e58 frame00000161 +04e0edd1d8e5a2e9a429baf9a0725535 frame00000162 +16a9e1590c6289a64e962afa2cd80827 frame00000163 +be3969077b48dd2ac26dacf969107131 frame00000164 +96f209f7b0a46b2edbc3fe54a2d5316b frame00000165 +eb07095300ee377e327a52b1843642f7 frame00000166 +46c78b438f6fb9508f062a5f7a0f6e77 frame00000167 +e424a67be273521fb575c4593b1661eb frame00000168 +cb24049f06d02686c672dc670f7c20bf frame00000169 +7e3b094d226a4cbfe0c6a419038f7e76 frame00000170 +dd6bb263537a6e20c67d060685040fa8 frame00000171 +97492c08147797cf97194a552c2d96ca frame00000172 +05c56af65d4eae2a4ae2947c500a45a5 frame00000173 +515f51431b8e9f3d54dc67ff8414384d frame00000174 +416bcdf21ace989613f97d9cdc7488f1 frame00000175 +e9679a3fcd0858d2b3816d01482c8301 frame00000176 +c3d4b79c2c37ea455fa21ff8e4341990 frame00000177 +c0442c19e8f1066b5d5e3b02786cd721 frame00000178 +5601d023b1d3a60d5c285a85dfc35c87 frame00000179 +e086aa05600b2e56dc84d3c3f2eae95f frame00000180 +e95da6d95d388f6b09ea5b24797e607c frame00000181 +a394dbd36857265ba8777bcce9344b19 frame00000182 +f2db71c05ef451df5545bb60852de111 frame00000183 +2c575b578db44c25c6cd1762de562b3a frame00000184 +b5f090ea37ea050e06cce4943d47f46d frame00000185 +309873fe0d06f5f76094acd51e7182e0 frame00000186 +69d56e68b39fa57abace5ffc7574ed08 frame00000187 +29f99cb4022cbc93d7c0e2638f9e344c frame00000188 +355e0b361a89903ad9f07fa98e37d579 frame00000189 +31ff618816ad45510948c34369ca9a78 frame00000190 +ec5b6835685242362fdacd70ad361c2a frame00000191 +522be53c8b33e316a3a8ed63595970a4 frame00000192 +4fcb3af8c20aed927a193b5dc494aa8f frame00000193 +2727fa42d080fe1565eda47bb45684d2 frame00000194 +b807bf1ae6cae394c7eadb80aad7fdf2 frame00000195 +c2c9994cacb66aec51c0c4bd5f8e2dc5 frame00000196 +65a2baed5b538624c40e09ba59b2193c frame00000197 +5fd5ab69da66acde30f918460f55816c frame00000198 +f70c30814c1d3eed9d050e6ee8464f42 frame00000199 +7c6467ed77bfc06f1ae2ce201e0e826e frame00000200 +97619af463c4e952a0a8c0a0d5b98fc7 frame00000201 +65767192babcef767b7cf070e4a7261b frame00000202 +f55f2b876f8d3c2a85c87eebbdff95e8 frame00000203 +c30053f3568a2f7aca8cdd687499b4ca frame00000204 +22638b4322f9e34060a1f5a0565dec46 frame00000205 +0e2648ee7a03b462508f98cd2bba0477 frame00000206 +a466227cf15f2bba0ecac04d9699f06f frame00000207 +42fcde1b79ab76690ac0e595c8662835 frame00000208 +d841f17ffae3f978c6628cb08c207afc frame00000209 +6eddc13fb133654c48757909ca8c2105 frame00000210 +d9e40c531cfea8392aa993afd9ce5a59 frame00000211 +7c314b1b17380a750e91edbdb16e0e6d frame00000212 +013f05bae3d6927a7d578ba5d6c49312 frame00000213 +72e164e93c306e1fcfade0663eee700f frame00000214 +523b872e1efdf244dc190f23c3d4d619 frame00000215 +412e8a231205e4bb513a1dc6ae359af0 frame00000216 +562f5791b66bfd5568984f9fb3c958c1 frame00000217 +7099507f0829323a0bf6a5d5dcc4a22f frame00000218 +23ad992a4baefddd52df129a574caaa4 frame00000219 +f84aa2be108b0ad69e83590f1ba5302c frame00000220 +53a7c0c6be0678d1affc5922192a16bd frame00000221 +fb5880d6912375e57daebbae7219bd50 frame00000222 +a6ce07ee92a300793d960220699a8f7e frame00000223 +44be7a0947bfd59da40839ed53937de3 frame00000224 +ce98b424073c994ed5d5168f84f4a1ed frame00000225 +bc744d323df18700879f3ca14027044c frame00000226 +38641fef9a196a7989e765332048b6ee frame00000227 +9a7a7a67eb69e2796c23370f413b336c frame00000228 +7d6a882961aaa56c72721fe194643554 frame00000229 +3c27fac87d2de23fb16623f1383c35eb frame00000230 +16cce27ba87d509bbab062093afd7bb3 frame00000231 +7a5c3bb64cf3576d3646a6d912e059de frame00000232 +f9cdd8fb37e07ca8c0cc50933b1eb8fe frame00000233 +db06a98433f23e05bd6b18eac57f6c48 frame00000234 +45f9258ad81750f7d6eaf016f96551f4 frame00000235 +1aa77bd761c31c03954dab50f95c1861 frame00000236 +2a4f57cfcbb5ccc31ff81a5e85aa2206 frame00000237 +b92636aaed95a3c1322442177b3f6df2 frame00000238 +2cbbafd278cca9042efb687775443a9f frame00000239 +1c0b9d9db7ef8b8fef124de276b1dd7e frame00000240 +9dca8ebac56a1b80bc73fdd0c5776a03 frame00000241 +b4efa1ba72ce0f0b9b2675104dc8b143 frame00000242 +a3744442065545951c6edc2f67a0ab04 frame00000243 +79adcd43bd9302f76c37840e9d77ec0a frame00000244 +b33e079024e791e66652c47b14584747 frame00000245 +b33e079024e791e66652c47b14584747 frame00000246 +c63924edc2424daf5a643028a8576de6 frame00000247 +c63924edc2424daf5a643028a8576de6 frame00000248 +3d850804bdb5841df62a7cb25531de2c frame00000249 +e5a3c5298ffd5d9f1a1b9854401e71f7 frame00000250 +0709430a2616e278e67d122f15c12c38 frame00000251 +2935fa7821b3c30228f557f0c9bee1f4 frame00000252 +f772ac97bf89de1425b7b16946c8605c frame00000253 +0f32f695de2852bdccca90c835b473b2 frame00000254 +7837493068f418a540051f98f203c2ea frame00000255 +ca2f3e1600562262b88637d928bad18f frame00000256 +ad2e488a16d004c803e5cddbe43dd4f3 frame00000257 +bfe6c801dea123c193eba1efdcd3e307 frame00000258 +ad2e488a16d004c803e5cddbe43dd4f3 frame00000259 +ad2e488a16d004c803e5cddbe43dd4f3 frame00000260 +ad2e488a16d004c803e5cddbe43dd4f3 frame00000261 +85a5c35821da27a993829edc4f20afb9 frame00000262 +23be443a93cd03831e9a5cd979ca305e frame00000263 +23be443a93cd03831e9a5cd979ca305e frame00000264 +c7c5da83c8226b00362000c6409fc7c1 frame00000265 +fb70a3986283719f4ca864ee2473a30e frame00000266 +c04080ce4b4d3fde966a5f10374c62da frame00000267 +c04080ce4b4d3fde966a5f10374c62da frame00000268 +c04080ce4b4d3fde966a5f10374c62da frame00000269 +56a1efbbd1e45a9b8245a0d03ffb4fdc frame00000270 +90b917dafff94b07b7fa88bfffad0c79 frame00000271 +ec34d49de8a36fa2576521a09e94d5b6 frame00000272 +90b917dafff94b07b7fa88bfffad0c79 frame00000273 +f6e53f22ace981dd8965b66fa8235f82 frame00000274 +bbf5e41582c175046219ed27ee42a19d frame00000275 +faf7e1d90c9b38a8a3cf1490517dc519 frame00000276 +faf7e1d90c9b38a8a3cf1490517dc519 frame00000277 +c5dc4232466157ab634d925d1805e322 frame00000278 +a57484779b9f10bad99811ba44172e66 frame00000279 +e7db3eec352b505e84f821b302e3b493 frame00000280 +e7db3eec352b505e84f821b302e3b493 frame00000281 +052aad7346369098560f0fc5e0346126 frame00000282 +2b5a735a55007114af7060e53bfaa95a frame00000283 +2b5a735a55007114af7060e53bfaa95a frame00000284 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/FM2_SVA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/FM2_SVA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/FM2_SVA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/FM2_SVA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +8e8b1913b1e31907b3ece44f8cd247e7 frame00000000 +8e8b1913b1e31907b3ece44f8cd247e7 frame00000001 +6839e9390464fe202af5857da8a95ca6 frame00000002 +a902da880566f1f0603a9fcfe0fdb48a frame00000003 +e077d118e5172741b53089ea3254a5c7 frame00000004 +a437f7fc6f0ab01c57b95e5d7eaed383 frame00000005 +38c26deeb696fef0cdba54b8c63dddec frame00000006 +d6374a2aecd2a029999474e54620a422 frame00000007 +9ac479a757d8d3dbb026235ab8ea54ee frame00000008 +b87d0f8f1cb55b7bbe4635d715e60dd2 frame00000009 +05cc02c33f559174284ed33a4a8e6b06 frame00000010 +909e72f954c1f1feed312be09f9c8628 frame00000011 +9ccbb80d464657b60b6c8c4e25059b31 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/FM2_SVA_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/FM2_SVA_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/FM2_SVA_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/FM2_SVA_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1 @@ +8e8b1913b1e31907b3ece44f8cd247e7 frame00000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/HCBP1_HHI_A.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/HCBP1_HHI_A.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/HCBP1_HHI_A.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/HCBP1_HHI_A.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,231 @@ +15bf19a14362c01e81c7580819f32571 frame00000000 +5d15d40fb1be0441d73fa2efbe91a9b5 frame00000001 +675851b2952c286e3e6c8adc2739feab frame00000002 +b6960f2c3bc25fe88d6c0cff5f0d74fd frame00000003 +11156f48f72bda8af467a5681caed8bf frame00000004 +5c3e5dab3d3bfa77fb517ac82050f801 frame00000005 +b0b5077c115cfb02ef55e9e84b84358e frame00000006 +4cc8eeef2feb5a717f083381e529106c frame00000007 +df1409e29f742e1e51520d8048b752e8 frame00000008 +4a439ae8ef9829f437d1de637a149a8b frame00000009 +d86731283660ca25dbb158adfd0582c2 frame00000010 +6d267c6add7db18ae1b49354fbec9b61 frame00000011 +44ddb64e00ec4254eb072ecb7c923f66 frame00000012 +258f901aee44857a9af7cead39666083 frame00000013 +8f1cf8ad91d9d319e641264accc2311f frame00000014 +78ad07772f0761b3539a1c330a2ea5a9 frame00000015 +4712d18cb6dc3e4f735e8d6a62e42cbd frame00000016 +93cdd5df69d8b53b527152257108d5b7 frame00000017 +b166eadb8b219cf9699ce1e9c3dbfad6 frame00000018 +deb6fff97fc402cd3b0bd3c7884ffce5 frame00000019 +ced4a49995837438b3bacc17143738b3 frame00000020 +9339da727a892ee9dd87f0a62f6d7b1f frame00000021 +270b85425147b10042126b5bbeb59a00 frame00000022 +673008c2c5c0b159ad1b04840d885ac5 frame00000023 +b4d5fbe1adc89dd2c47f38ac98c90415 frame00000024 +b92bcd6299a355bba164401e913cda17 frame00000025 +631a9a35862a0c4abc7eddf1873f6664 frame00000026 +4fade88cadba2e634089c6397e314400 frame00000027 +1f34dad6624be81e5cc2807ffddffa1e frame00000028 +e2a84b4c05a0ed50c7ae03197b26c59a frame00000029 +5cd9037972da76c216cd8516518dc52d frame00000030 +393bac5a90814680f1a3be5afc4b87f7 frame00000031 +663d58768e8f0076a6b2b63cb88819ef frame00000032 +2977f3bc47075f6bc4f3ed7c570e168f frame00000033 +727798838077ba5c3b28f6b31d6d4f83 frame00000034 +fc4bee9bd1eb66b8215c7fbb74b27259 frame00000035 +9a26723ba33c17dc0abf3a2268f7f0ff frame00000036 +9ce79e76919b11ccb5ea4fd8b079df57 frame00000037 +070b4606aa8fe965c7b7f2255f96a87d frame00000038 +fd4c266f53ad2ecbc63e0931ac6efc9b frame00000039 +6892b37fc949e9b3609f55a49b2c68c6 frame00000040 +8799c55ff4d2f877940834d658d539ab frame00000041 +12f69bf09ef11c95cb71266b9e012fcd frame00000042 +39af2670159d9e799273b5e49338aff9 frame00000043 +0a4462727d27f264240ddfe4ec326ce0 frame00000044 +964c7d037cf8f47f80a26c144c6b11dd frame00000045 +6e5c8cf1802dea69edf8ccbd1590d64e frame00000046 +ba953e6fd3421e8d5b0f2b49ba6561c2 frame00000047 +ef71349ba0ae74a41fdedcbefc2909b2 frame00000048 +4a92f7a9c7efc210759312ca9601c716 frame00000049 +1a8efeaa38a0d5f5308835b4126f3f44 frame00000050 +5681f6a129e5ee3506ae6ccf9db698ab frame00000051 +c01d8e22414a8843ccec08784d66a7b7 frame00000052 +271c27cf3625e7e13ae5f3a42f32bf5e frame00000053 +b40fe5b0f1844abe911954956b9ee9c2 frame00000054 +c4ab692b306c3830496e77f4b1d00ace frame00000055 +79b8c05ec7665d33c617329f790ef0d1 frame00000056 +6b7b799898997a19b29298c6d4e33f96 frame00000057 +678efe35f0c5e490a5ad681998582bd5 frame00000058 +017b6d086feb4658994d36fffbf68398 frame00000059 +dfc698ae361f7d79af9d410467a221f9 frame00000060 +c05214fb76fff641b29f0f161f9fd3e6 frame00000061 +350aec6c7b4fd2d3b1cbd6e1fc1ae464 frame00000062 +a244dcb1a617ce41173c1714716b0079 frame00000063 +4ef1c38dc1be207236038d390f4357fe frame00000064 +99ef4501fc3dc84e04bde53e5cd000bd frame00000065 +ee2dd0352f37f4ba4d7ac5caf527d450 frame00000066 +7c09fe49f2e0fa9c99e836ad8c12e6c6 frame00000067 +74c129042a046eb0e533a9f9eea22358 frame00000068 +61c37f96eafcdf9dd183186fa09f4472 frame00000069 +d75d26c05bf1a61ec7045b9a07f7b4a9 frame00000070 +15569bb0e608eb1b9f87aba19278d06a frame00000071 +4267ad779ef46094db36e01d0cad2e26 frame00000072 +5210608d4f8bf9a10edd9a5fa0c52915 frame00000073 +bd246f5bbbca049fa4ab54cddfdc05a6 frame00000074 +8ba6b3e801ebcd13fab0649a02a40763 frame00000075 +e4fed102c8e66fc5d0156b9d8d741fc6 frame00000076 +1624cbd22006dc97660161a3de828c99 frame00000077 +24641cec8d9db4a95df733d1409396e0 frame00000078 +a4d0cfca99e57ee65b4cacbc222116a9 frame00000079 +32da40224e460caf7e917b7a6128b2a6 frame00000080 +f8cbcbfb22f52ea9b121f8f261111609 frame00000081 +9da5e1f31f9ff730120a1d54e85baa2c frame00000082 +746b0026b100ac8faea9c441a5303781 frame00000083 +0ed6d072ec86157dc4a60500a2e79318 frame00000084 +54587290b1187f04a5b78b9bb5697f16 frame00000085 +faba66a88a5533505b95ecdca694b839 frame00000086 +1a2bb899d5dfe6b7b86949528bf1a83d frame00000087 +87348e830bfd306848f6d9704d82e8b5 frame00000088 +112d1252460723e75f23b62736e11f54 frame00000089 +63c47feea15a9cddcad0a07f674476da frame00000090 +2c9475e1073b0493b8b874b7634bbb81 frame00000091 +059bbf85352bd6013bb7aad878682bf8 frame00000092 +dd8946fa0fb1acd3dbd4704133da47e2 frame00000093 +e7c96d63658260987f48e3c01914840e frame00000094 +6a6a1ffbdd0c4cc3007f0789b9b3152f frame00000095 +798229f1f35ac91185e8818befa695d6 frame00000096 +a12401634aeca73b7da2da54fb071753 frame00000097 +afbf5ed254391e77431b5cfcc683f808 frame00000098 +f8befc51e9681ed7a6beee50563bbd7f frame00000099 +059c0336185f48b931f48b6df634fa0f frame00000100 +023c4de5efe5260a4dbc15c9d95b6a17 frame00000101 +320435d950c91109c94e47633d45ed23 frame00000102 +15139632b59e9b0e5a1bc03249062604 frame00000103 +ca0d1f1b3d4f504790958e2161ff9ae1 frame00000104 +83063d609c17008059571305dcf336fd frame00000105 +143835d24f085b971c53efb5590a2e29 frame00000106 +2ead0337262cb5c0d2d346acac0370e7 frame00000107 +43ec474a9a013b839cd06a1da6e05d19 frame00000108 +74005b9cd204aea6f7f7e23d7f2c2294 frame00000109 +6f71630d29c87bd4e12a341214f59afc frame00000110 +4926749aa218198e2c750b0a598461c6 frame00000111 +8d056d793abaf1129bb4f3886dfa572a frame00000112 +553f0e0a7c0c973d88d1edfff6236385 frame00000113 +a5740b9ef0fc74bfc3284d433d920a8c frame00000114 +8681d856d96144289377a43b8a39dbb3 frame00000115 +041efa7a487e21781fb5b0057b9922c6 frame00000116 +b097f5f0b2dd2e986563d6d4f7f0331b frame00000117 +01e44f0c5bf8b026fc0610772d0c7603 frame00000118 +24ef7692243c8d99f120186c977c416d frame00000119 +9cde520e82eaa2ede777a8cd1742775c frame00000120 +88a7aa46dfbd01e002829b3bf5c72696 frame00000121 +40f00ca7454664785cb9529413450e3a frame00000122 +5d1f16b49b735aeda408f1201e3f8da7 frame00000123 +1147b9f3064cbd0877f023990063d25b frame00000124 +1f8902e5bbc3a401ccfcdbb0c1771c15 frame00000125 +735250313fc4ede8c9dfaa83251fdc2c frame00000126 +2b835de37625fa4c355b8edf27f2f7e8 frame00000127 +8a7452dd6b3ad549cddf1cd10460e8bb frame00000128 +ac107406c8478693502ea3c5b9b599d5 frame00000129 +4f48c1ce0ecd070ee13075e1f73b31fd frame00000130 +5837e97ab1cd4fae49c94e2e30ecf99e frame00000131 +ed6a7bf2c4a9d0e570f554ee42331fd9 frame00000132 +c9f817a51f1f5bae7045a68540edb893 frame00000133 +dd84babd877931f1f5e839ad726f3042 frame00000134 +1ecd605b5fefc7c3e07df17ed9550da5 frame00000135 +8933397f82aad63b01c9c265067f421c frame00000136 +6ddbf8ea255bde7314f1a6cb61674eb2 frame00000137 +01be49b8a0e010a2fe51fef37a707c2e frame00000138 +19203b432f475af892570edbfa7fb6ef frame00000139 +cc7d415e07a482bdeb2a9659f5ee875a frame00000140 +febd41b6838460f09748ddf70b4c9cbb frame00000141 +23b069323fceefcdc27769458cfd8a13 frame00000142 +b8c758b60782455d1f102425a4fc2270 frame00000143 +51c2e93df2c29e1208355794cd10ee05 frame00000144 +b398ec1beea23cd55a4844ac0b60b1c7 frame00000145 +73a22e3c834bbb441770916678d8eeae frame00000146 +a2856318a3c66d61b85df260a399f884 frame00000147 +2ff7f51f77fdb1ee6e43efbd0c3987bd frame00000148 +4f19c735e4a2ba7f00a2815db4b9e5f7 frame00000149 +8ed0e79ab2296b9b95372b94758c9687 frame00000150 +91211b3858e5f97b845a6cfa7a308561 frame00000151 +3a18df0b5ab42adde9f05a57b72c71d1 frame00000152 +ab33804be99b3f134e25a20398e7c468 frame00000153 +cdbfa8215da3189dc35961b066289dd0 frame00000154 +4378fe6dc44e6d4019943a9d53981306 frame00000155 +e794b7b058d498d12435a1f251989635 frame00000156 +7eed02f4629eb4ee45ed76efb97036e0 frame00000157 +74b6c2a907219d6b59baf6e3f09f10ca frame00000158 +b5618c07e6860bfabe4b19b54bc576e3 frame00000159 +2a36f00c7e2e7d2c2fcb42f9c4e2196a frame00000160 +8ce900c4814ee316c0594c8a645dbb33 frame00000161 +fe83467d12e5ed49a53c848298a75313 frame00000162 +f61b805e64132e62f4aa571c5b9cc050 frame00000163 +d03c462799c6d98789e183bfdbbcbaa9 frame00000164 +af9937b4dd79ce96689c0db5f25e8002 frame00000165 +1d7cdeada58b72da766d59deecedd63e frame00000166 +e19d005e6371ad060cbba71082cf191b frame00000167 +7c6067ec6ea4c2f58d22488d1d3381e6 frame00000168 +b874474a0644f8ea7c5c4eef05176342 frame00000169 +b9952de675c6cb325ea2837f42023af4 frame00000170 +7b60843dae01dbaedfbd9b05c8f00cf7 frame00000171 +c450a4731c71a8fea026855372141627 frame00000172 +f5bef2df18d03d090c6c1c0d1c31a998 frame00000173 +6709724541a5ea5aceab362e0a38bb33 frame00000174 +09288cd7770914e202711a3404d77a2d frame00000175 +b698de21320c4ceef85599bf05eda532 frame00000176 +4735b4edc1558b1e4e1dca42cd153d64 frame00000177 +2f8caa266b998c439947749c670c9919 frame00000178 +d78f056bb647964df31df0f96acea783 frame00000179 +ede2a946b236eaf0ea7031386dd9439b frame00000180 +bd3d769056d229d13ef3d58e0557b350 frame00000181 +a4af1aa5949cf2e058e18b806acd7238 frame00000182 +fde8ba1a2d624bece05d73c4ea721ae5 frame00000183 +4bf075ca7bf04d22af16150603354f38 frame00000184 +d2a07008415db48f51baba87558d0a18 frame00000185 +f54b84f86e821f5f306314074ebd8b53 frame00000186 +f47acef98e4c8c4de2b1da45f35d9e7a frame00000187 +bd0854f2fbd642d774ef7a06e3d959c9 frame00000188 +30ec7bfb68a45b7a55b286b130f8b8fb frame00000189 +9aeb3e15cd47df56cd656f1a776ae0fd frame00000190 +a04101fd9fcdad21cad8951a96450df2 frame00000191 +e641aedcaefdcd33fd0d6b0a5fe1a8da frame00000192 +e12b2b92cd2ff9966b81c3b0de25d0d0 frame00000193 +6a4033fe31909958128fcc1498aba184 frame00000194 +a948216a3aa66f9d80e826c45f30d2f3 frame00000195 +09a62b53ffb107cf6504beae3e93870f frame00000196 +02406ff1d7a41c1bcc85010f394fab16 frame00000197 +48179b364d3da58d597c92c1fc0f7709 frame00000198 +4caa6feac0f8e09dc7205a7ce6b68fc2 frame00000199 +1b50a827887fc7d81e90f45f31400bb1 frame00000200 +219a4a25ea6a869c3399783697f95cc8 frame00000201 +565c6812326981587849911c860492f5 frame00000202 +60c521b8febce7326ea96c41518bcf3b frame00000203 +a1fbc902d8336a785764468699ef59fa frame00000204 +692209bca1e70f79346fe37164c2c824 frame00000205 +afd7fbeffe633386782a258ce2bb5a40 frame00000206 +911c33ffd2846b0ec2e5caff5506f02b frame00000207 +2b955b197784bc15d97993de6ec17606 frame00000208 +32862a551a51d80be5fb5a0f2bfd9c52 frame00000209 +59c5e0f82f34f7667e8112bcb5ec513b frame00000210 +750700bcef954bda0b8712e7df236599 frame00000211 +7907c5b3e2b8950360c600b9c46fcf8d frame00000212 +6cd69a9dfd865c8773d2a5ad163fbf3a frame00000213 +739c7324c926c16ec4e607cfb0da6589 frame00000214 +d4b0ebdffa868e1ddff031963ad0bfa3 frame00000215 +157b7cecb12bed787841ca9f4212bac9 frame00000216 +ed01e0dac665f3430c7eff2a7a9be220 frame00000217 +029caca2773427481407cc470fdfd8eb frame00000218 +c029c7a59806b615b04b30ac8ce4d588 frame00000219 +961b630ba5e4e2135e7ed52f82b15660 frame00000220 +1aa4fb5abfd4d9e7d0f2bcc02b619c9d frame00000221 +5dcd6ce5cb81296002a8859b99314e7b frame00000222 +9eb4200d89719adaafeb6eb91c50ebdd frame00000223 +6267342a965d791637b4759de52e3b53 frame00000224 +52abad634074a9a933e98cb98ff6381b frame00000225 +01dcc2e4dde64518c11ed166c67cbf06 frame00000226 +752031f7f317e39637b9c20cdfd01a58 frame00000227 +e8e642ac2b11e3c6fc44a1ca583f607e frame00000228 +c2312af09f17a1089d2d29abd815e05a frame00000229 +7f4bd1d17b7d86da01fbe540a118a9c8 frame00000230 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/HCBP2_HHI_A.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/HCBP2_HHI_A.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/HCBP2_HHI_A.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/HCBP2_HHI_A.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,231 @@ +92c6eff8ead573e10b2c3b4581a7b0ec frame00000000 +dc410857bf001ad27d7c95b8cb47e7e6 frame00000001 +239c2c2ccb8f75fa6e18b076600a66e3 frame00000002 +4b3a7916854f8d1cebb724787e774090 frame00000003 +b40e6d8ebacc5416c3f824824b5dca89 frame00000004 +df04ba383df3519b25ef8ed43291f536 frame00000005 +f1575c9857190aaaabad18023b7b2750 frame00000006 +9728745672821d578ac78efebdf2c98a frame00000007 +ebb51402f97a2fa2b89cb1ad038e8f1f frame00000008 +2cecc35e50090d52dde05af59456c708 frame00000009 +eafbb4d029934c7f1473d33d95bbe396 frame00000010 +97d437940e0f715b8306cab0000d1035 frame00000011 +8d78a1fb500ffb6258d019d64c06567c frame00000012 +525affc0015a40b4d0a80ac415a492fa frame00000013 +fb1922c38704944c15663d4b9cfde0ab frame00000014 +72d97503b52b8ac345b91996293973cc frame00000015 +7e2e7b1dc1316a9a005421faa7496b7b frame00000016 +fab8e6ce264354abbda12beda1bbbfb7 frame00000017 +62cf617a78b1f7eb5837776dd495c45d frame00000018 +7505ad6902b0f2caf0ef78b7bb59b3f4 frame00000019 +a589bdfe22f4bcd8e8d6654fd18eeecb frame00000020 +1c7deebffd44368c29a6ac5dd1e4dc45 frame00000021 +350e673338650ba96a626c1e5655c47b frame00000022 +802f165d833647fae980d137ec84b1ec frame00000023 +c2af694a506c460f9e7c0bc6347bf12d frame00000024 +74fb4ef854a5154daf825535779dd454 frame00000025 +b883fea21a58343100d445d9759c9de1 frame00000026 +072e239bd43308a2cd82c9872434c2b6 frame00000027 +9d2fb65c32af453bd2472331e8bc0201 frame00000028 +c69f1c9c5258f89c566b7a6e211172d3 frame00000029 +1edd03ff8d795866b29b6a2f42bf3155 frame00000030 +4f1fe1f8f364cb2e6e852c706d37c5e9 frame00000031 +7f69beebbafe23f33ba1970982ca2000 frame00000032 +2a0060de42cf5f20d2ea20321770df21 frame00000033 +78c65ed7b0cc694fd4797a4a6f68985a frame00000034 +6409ccf9872efec16be2976ec34ab209 frame00000035 +4f6f849a6048ef7821baf35a827c739c frame00000036 +8a15fb28fe5b6323e63e38f6785623f1 frame00000037 +013eac118fd3412dd11d93771e6f3b2a frame00000038 +6994389cfc7ccc0015b5bb9f69517f7b frame00000039 +4a485499eed5399ae8a9605f047aa369 frame00000040 +c8efa6cd038c5c78c78fc44547aee440 frame00000041 +51d46fa8c2be3b95cd150c72212382ee frame00000042 +eee81b0bbe074b350cbd47412ce54a7a frame00000043 +d2c954056ff01c26f8166d0b0b480b32 frame00000044 +70a61e89674317079138c41dc1430c5e frame00000045 +eb44970493f50d010a1eff47bd9736d1 frame00000046 +3a43787b9bdb198f539a464b1671f9e3 frame00000047 +8f6554dffcd4d2d599b2e88fc64a70a2 frame00000048 +40487bd004e5c198146454a10997e4e8 frame00000049 +4db0ff01ef8b2fa8c531d027c7b0fd85 frame00000050 +3275b1f0b68f98d33813138873556fa1 frame00000051 +96ec231948a54bc3417a0c1723f4595f frame00000052 +a236dbf97c09121535fb43e77ba10081 frame00000053 +6b6c97ec8eb38a100e1c0f163aca2f3a frame00000054 +1b8f6fdf67dffed5b80a0d16c974a4b1 frame00000055 +a1b47f8ed6c8adefbca60b33bbe4f858 frame00000056 +206a1d455923415422684f60628136f0 frame00000057 +3c0e0c6f1d9ad8db7ee6e5ee862cbb0b frame00000058 +80273e19ed47e9568a128dc3c5558494 frame00000059 +f60e3b353349ebf164b527408c3dd33f frame00000060 +05cb244ecead244490381b280e815bb0 frame00000061 +1d0a3edf14caf6b236b2339cd1e41b3b frame00000062 +943df9461198d7aa47f8b6453100a41f frame00000063 +761db14eeedcb400ee927983ef01ecfc frame00000064 +a3200fa86b0a79880da5b3140ec0ef1f frame00000065 +94a2587342fb9d55729774691df0eb0b frame00000066 +a7153c462bd48e8ac28946086605e3fc frame00000067 +b8759a67f9ec9a72c2145029e3056968 frame00000068 +60900ff74307988043def23ea1ed9730 frame00000069 +26e179c402a0291c8802938eb72dac91 frame00000070 +6ebe0fe5389cc41cef9841235d4cf51b frame00000071 +bbfb5e5bb0cd534c29972b702caf881b frame00000072 +9d5b36a17610e5008121f1eb58985098 frame00000073 +321952daf44d0db82428568818b4830d frame00000074 +1b628fa5488e42d791af2e4d617847dc frame00000075 +869c692826d64cc544334a8411ddcd56 frame00000076 +275ec371e3a43e13eafe2e2c54da826b frame00000077 +60fc27b0d88aff083f3745f1da5e8244 frame00000078 +9910e7fe2c9458e22539f9a0a46f39f8 frame00000079 +969af460dfbce3f34a9a8bc8e74651ca frame00000080 +9137e6c317d5734025fa0c730d739ae7 frame00000081 +1ae13f75ccf86056fcf9402d8e4d1a0a frame00000082 +d12c18e5c65d9dd2f6caea37c0389674 frame00000083 +269c876bb4742d5f28d72dcd23d53154 frame00000084 +4c0f4d66321f4d81e3b4023d9df6b1d7 frame00000085 +bb01553d131bc0ef91b1e2d96dbeaf4d frame00000086 +d348a78725f704f4c7c61655b6c1b746 frame00000087 +8e26090564ec28dc8ac6f4b32c380da9 frame00000088 +8987e3b556956f01567c03602233c34c frame00000089 +6e39cf64c3454022371c7159c4519461 frame00000090 +d3f7754f8868eb7a1c3444eab944f659 frame00000091 +20dad702891eeeeb3bee79e594db8cca frame00000092 +72d4cb9ad8bedb5207424435676e14e7 frame00000093 +8922c03f827405957d870384378686da frame00000094 +18e86517b377e2b975de1af6c6e3710c frame00000095 +5aae7408bfd849d87ae1869f757f400a frame00000096 +41aa80567767d4fb01a719e83ed772c9 frame00000097 +e309a7dbc6e86d69ea66de04fdf714ec frame00000098 +26ebdc84a2f4a91c6f63371e0fc3d115 frame00000099 +b5fc7ff9df5c68543de572b8475721c3 frame00000100 +56a72f0878b1481c817ba03d3c94c586 frame00000101 +8810b6c9b025992c6ac49ef0a49c2660 frame00000102 +4d788a7aadf6756fa6e1fdc8d8e25af0 frame00000103 +7b5c4ff5314468605bd84b7563534dcd frame00000104 +0d660b270fb79e410c07a2da42570118 frame00000105 +f718e3073013a2e31ccf340698570908 frame00000106 +097a0b65cd439700b33fc03cafd564b7 frame00000107 +ff9cf693c39a8d64a2cdfd4e252eaf16 frame00000108 +aa469a5d7054675294c90387b9bd2196 frame00000109 +78db5aec3a62d7da906f9f92e87405a6 frame00000110 +711b2c79d0ee78f472fb7e109b995bf5 frame00000111 +8e6d99cf0f7fc618b99fce32327df335 frame00000112 +435e82a4a96f31dca6dc6cef96122d60 frame00000113 +14ade3b2b66aa5c3b318630581da08be frame00000114 +e73419601c7f828a639b638154e9cdbf frame00000115 +27672334fc880d0a0b7ebe62a826e861 frame00000116 +7f6552fa4d6d0d7c64eba092fa6e0a1c frame00000117 +29ec66903d90fdf3013f8955ceece3a9 frame00000118 +5bdf8f036517a3591d36272e5b61df09 frame00000119 +a06fe855970d22af7188829682b9bf93 frame00000120 +c1a3cf47c1247984bedace8f82b4910f frame00000121 +b037dd859d197074f4805855cdc12286 frame00000122 +6d1d069ac8134fef5a92bc459664a00f frame00000123 +a632750f323a3572b2872148ee092399 frame00000124 +e0a410e440c88cf1b64a6560bb2a7430 frame00000125 +a308cfdcd598301d5cb9ccc05d30b7d1 frame00000126 +feda138a0797d9ef3b36b260133449ba frame00000127 +5251a957ddccc6db6a229f9b3bc30905 frame00000128 +c260cde4c385d44cd03bc39b07e7f445 frame00000129 +3969b2de41a87e25636cc2734c9202b5 frame00000130 +f045a644bd1f6fe952387496b5fb8956 frame00000131 +68657d97600aa309eebd558d0e87de74 frame00000132 +eb980ee912f71b681e03fdbb8e38009b frame00000133 +5efac79ddf8bc42f8ea354f12a6070c0 frame00000134 +abb19d5334d541014af13588192656bf frame00000135 +207f5ed8f3bbcb046c4029a35064f673 frame00000136 +c2a2fb87e45a8db533084387b363734e frame00000137 +92a00202a4e09a96948159df91b7089c frame00000138 +9054db6ab61d9097d4245283163f4c4a frame00000139 +9ee275ddf497bd21894b5121adb7168c frame00000140 +0d3a13ba9f1186b97f6daf8c80951c93 frame00000141 +3fbc1ee6f9cd5112af41284d4f2846f4 frame00000142 +85615bf4af539dc2ba99e92b0ea32900 frame00000143 +6b6e6922e0019c3d25cf3ffee74990eb frame00000144 +c43dda8264ea8fb23c434f8aaf024213 frame00000145 +4765ff6dd3eaa28b6a1ee9d1a0de2c2b frame00000146 +71a9469dbd5bbe66403dda4891a81b05 frame00000147 +b309b72f08f71d24f8097964bc5ba053 frame00000148 +4c37995854595d9d9b66a85eb9b19f0f frame00000149 +c73b96041ce4f9088daeed2996d88e3b frame00000150 +94fe302b9b0f58bc410a5972816cf6ad frame00000151 +116e969cff8395c1a21d2046bf298629 frame00000152 +16a60326d1dff4b37414ab8894c4830a frame00000153 +5e7c95230fa2652090fe59bb7644a45f frame00000154 +b75eebd1d68b7c6b73aafdb7abacedde frame00000155 +12ef062f668d675f719f91ea827eef6f frame00000156 +7deace08716d96d1a6548fff83553767 frame00000157 +bb0b1d21cfa5474c2559108c60062cb5 frame00000158 +8daecb20a5da6fe6bb6ed1498957de01 frame00000159 +4c6857d90871e375736b94c8f379d461 frame00000160 +3f6a91692a3665b08d193d8ed3a39da2 frame00000161 +583e1b52e6263eb77cb7c4c16ab983ac frame00000162 +dde2292cc42fd6888c7a5c851e438cce frame00000163 +9fb8f3e9c5eea480405b4c2b0f04725e frame00000164 +1c03c1bd4ee766f15fb91b2b9ace2779 frame00000165 +8f58102d215e0340d6ff792ca572998b frame00000166 +ec708a53eaeb6c0e8240cbd1f97ec762 frame00000167 +6f353177aceab662ddd1fe283d7def78 frame00000168 +3f34e02953499b03ddd51ec562a74421 frame00000169 +aaf7e1a908a2dcb9b3f6c142564c646e frame00000170 +ef98a21c36dc6b42acb0e190af6df131 frame00000171 +c52bc30f446a6554ce6db80c9546cb82 frame00000172 +1127613012d362f452db6465242ad493 frame00000173 +4845036a3380b91a76f61dbbfb2c1c06 frame00000174 +8550f2f9e612b84ba8d2c41ffe7d3f24 frame00000175 +ccd5b951a490c3c885cb635f95bf36f4 frame00000176 +86c9765ff72589e469f4a549119972bf frame00000177 +19ef122a8add2dc9f01f146e84ed3c32 frame00000178 +422b3cedbae7c61d9491c6916610de9a frame00000179 +ff36b81cc77a6c341765bc38ed10d762 frame00000180 +39de6c837970a5eef7a225d77ed5d923 frame00000181 +21fa62a7958129d80450138ecb2c6875 frame00000182 +598ff5c53fb7890a6c3281f314a40d0c frame00000183 +9a8201f8ca12c93dac12760722067eb5 frame00000184 +50c311f41feba912b03a76bb29f8960c frame00000185 +f1c93a056b57f93405e3a64725862973 frame00000186 +ddfb7bbce8c1343f336c660e9b146e34 frame00000187 +bd0cc7e12a45695c8dedd1c6120c9f0e frame00000188 +257088db996d4ca0bbd2ce564f12883d frame00000189 +990819c24bde1a92c5daa93795b956b5 frame00000190 +1b6b3f2a3085be7c8fdc92e033421d88 frame00000191 +d0ba5a6b5fa7a7e8ff08e80ae9b89548 frame00000192 +afc2c7e1079f99745e6962211d8a4ed7 frame00000193 +d105217e01a290a966032a94065c1495 frame00000194 +ad44dee21e57907ccc8951ab78515b02 frame00000195 +eb537442cc386a0cc41940d1ea8f53a5 frame00000196 +ffe2ce56d3772b7f4ed69c9ebdb19e1a frame00000197 +5d997987625f9697aafcf53bfb555c93 frame00000198 +0cd426d73ae2aa9631c0080b29ee70bd frame00000199 +c61d1d64fa325a2be46aaf2c2aa82e17 frame00000200 +41684a7542bcf6c44339cec7058d0529 frame00000201 +7e05ec6928b8c0686ae85a852faa5e79 frame00000202 +8cd8826caf7c3bb11026b08d4e7023cd frame00000203 +309191577cb2bb43164d938efd939187 frame00000204 +4bdd9ea2650f99dd10d960efeca320fb frame00000205 +3977034111726d2f2a78575327f4ed4b frame00000206 +992e988cf37034a862dfb507185a7403 frame00000207 +cb60f700ddd39f05d3047b1e3df88af9 frame00000208 +5fb04a45da9423abcc1b3ee30adfa657 frame00000209 +e57a8fc8d2213f7ed726e9bc124acbdc frame00000210 +589ea57341db663da954e65e52eb00f2 frame00000211 +a9d6c979f20192add559755661ba4f3f frame00000212 +b475769fb3f30c5e14e48da7ce0a543f frame00000213 +21b216c25a9dfa036d7aa5630a357de0 frame00000214 +87fc42f51dd246edcf67eba783978d92 frame00000215 +da93b03296a0beb39e39f76568dce5b8 frame00000216 +69bcdf36cfe5715aa932dee40c022e2b frame00000217 +e7572caf3ded3ebc78c57b667c77b7be frame00000218 +6438cf4e9b7c8919e4d468fdfa1b000a frame00000219 +7800fd5fbec75b74b6f0bf7645bfb1e9 frame00000220 +3d282e853a0d6b2acb99df6af84a4e62 frame00000221 +b9c4a214ab2d4973d20274c0b0a11dc0 frame00000222 +e6bda74cca85473d2dd9b2cfa9c59130 frame00000223 +1297584554f4369db81b6d276d353a2e frame00000224 +486072f59468789945b93d01895fe85d frame00000225 +40e41f5c44afa5afca34c6f8725a2fda frame00000226 +7b6c5dd5b513271c4e1232774a6fc1f2 frame00000227 +55c2809a1f7c352bd4f0676b0a48aab4 frame00000228 +2aec77c4514e7465b8d321ab72ff684a frame00000229 +9f162024d0d49fbe4123aacf3ecce372 frame00000230 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/HCMP1_HHI_A.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/HCMP1_HHI_A.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/HCMP1_HHI_A.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/HCMP1_HHI_A.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,231 @@ +1eaa8aa7f9b2e13afeceed5da2df72da frame00000000 +56eff51b900d4f880e6bd8fc3627ce31 frame00000001 +6e618e6260b680160afc7b376e889d35 frame00000002 +95cee6bcf8c7b401f883df0f15b2207e frame00000003 +f107d4218dbe3f8ca779a8a4094e7afc frame00000004 +3e5ac1740a54aa4022359699d1b91bf4 frame00000005 +4b465ddcbebf7bca343afc2d68b48962 frame00000006 +def7dd6f1f4f192646b7307a997093a4 frame00000007 +a9e6c4f5559bcf12ca58698265fd67f3 frame00000008 +be2f2708195ed5cbd594b9ae0a01815c frame00000009 +74e4cb83debcc07711aec6a767f929d7 frame00000010 +81986257427edaa04b15449ec1abe608 frame00000011 +131793ca48e215371b9da7014bfac735 frame00000012 +445e9ae34b13350d2858cdab8e722b51 frame00000013 +1f6f1f0831428f8e40415908e6161322 frame00000014 +ae7a60f8949de494c18d4b287e989108 frame00000015 +1b3f050e0f1ea8cd23c17d58fdce3a45 frame00000016 +0980bcbf4143f58285a39abb552bd836 frame00000017 +94e0bdea7f2c3e2ea9ba43b78ba519d7 frame00000018 +1fabba0596aa89af94355934794fc6d7 frame00000019 +f1c7a94e1ca3d34cf4f440b23dc59146 frame00000020 +7463bff5b4f268e49d6f80174d2366fa frame00000021 +2e3641e2d69c2e87daee7a90cd3c00f3 frame00000022 +538158f12c085b0f37660de01274a099 frame00000023 +4649c5810ceca5cfe79121d472afed2b frame00000024 +9a3f834b60c1a2a878ab00324dc3c54c frame00000025 +0aa5274baae3cf39e9f75bbf48535fa3 frame00000026 +ee95707ea21aefce84393214021f4aa7 frame00000027 +49afb6cda09db11ec7c091e410f92d87 frame00000028 +b8d1bb0e1ae23a776186be45032aad36 frame00000029 +9dbebfd8df4caae60b95e598680b48e9 frame00000030 +2efe43890f50f9d6a01622906e62a338 frame00000031 +aa32ac9ba435a2bd4d7ee78a26804051 frame00000032 +cc1abcb7400150bac72df7408beb8bfc frame00000033 +51dd3f48f14251fd619731b88528a5ff frame00000034 +4ab5a5bc31dcfbc6f66b48cacf8cf198 frame00000035 +4f1398f1779d4e181833e5a58d327546 frame00000036 +9e3cbdc5836022758fc0d0068414a1ed frame00000037 +68d22cdf81cd73b9905584501800f104 frame00000038 +dfafd7ef2f2eeec34573955a9fae88e7 frame00000039 +5d0256a7edc0bf76949667a830f8c547 frame00000040 +727474fa84982baea2676045da6d043d frame00000041 +a80174cd1e27c1b2c3872fcb46c7dcfb frame00000042 +4918245454f68dabde69a121e379963b frame00000043 +a315bea619552e747aee4181ace50cf1 frame00000044 +473fe27571946406fc06265c3ff2c5c3 frame00000045 +fe11a88a9fd198cf0ac1ce8cb098b056 frame00000046 +5062e9c94ac2a9cee34525be8a7d858b frame00000047 +d79873060aa29d58df2a428601522506 frame00000048 +a1b9384b8e5748bf49fe5a4c89949cf3 frame00000049 +5e3dce04a0dce0f6998c4b131796cbb3 frame00000050 +17f122514b9ab2c1791cc9977419a69e frame00000051 +67b893367ec93b12b85e0d59859c1ad8 frame00000052 +f90b2cf12a3bd9cfe27e9d4e140f4d5c frame00000053 +4eda95f237666c69cb0330b58dad1244 frame00000054 +996e609d73c3fc4b6d5549ec65af8aae frame00000055 +8873fdffcf4a2d38d2fa6740257e889d frame00000056 +4655c563e18963e4f00945a3a2060aad frame00000057 +1f81ce7f0b7015c6b6f4af9c2c36bb92 frame00000058 +a24bc4a3f9dd02e5ca29eb63c1900bb5 frame00000059 +70d4099229792e87c9ea6d0e09ce0940 frame00000060 +71393673d07ca2e0df0dba475484b565 frame00000061 +3f09a9432d3eccb0077d36d2ae451864 frame00000062 +4ca3bfcf91f91c6e24d49146c5320420 frame00000063 +bc910b302fc2dd22c547c03847fab449 frame00000064 +f816bb91a5ac2cb4cb711cd67cf99df4 frame00000065 +1646c02e4a684da2bfc46cfa7893b8be frame00000066 +62108de0d708ec9bc0e8ddd85499b772 frame00000067 +e2ecc8f01f8a07b1d4765537cdd6016a frame00000068 +642f4fc73deebc2538a883f778842277 frame00000069 +d9f3468a6ffe4da7253fe67689190337 frame00000070 +0e596fe05e1f241ca48e707b63318221 frame00000071 +bb31bbd4183e9d15bbcc45a8ce521e5b frame00000072 +a8990662c4d5ef60e0fb98d9f7fce7e6 frame00000073 +0752d90617e030b62be134ea441bd718 frame00000074 +d21d09686f97d1f40698385d778c884e frame00000075 +4c8c108e923e49540d7fe9a089e35dc1 frame00000076 +fdf45ce36b3db771c9d6b8d5749443ab frame00000077 +8b490472097e64f1e0a2174d6555366b frame00000078 +8b52612857918a91299806a2905362a3 frame00000079 +46f14e5251f21f9eddcc9f49bd0077c0 frame00000080 +01adc3c6a8eb7ea9d7268e1df8dc8a0c frame00000081 +c6dd7372897a48788077ed88f24ba2ec frame00000082 +6fc31b7a396dcd825f0897d9c1bb0ba3 frame00000083 +42aca42d42bad0b9599059126d25a182 frame00000084 +9ec08f1ce6131b367606de73a95671f6 frame00000085 +15d9fcf03d17ad707dbf3d7d9e1bfccf frame00000086 +35410fa4cb7e0469a82cd6f83752474f frame00000087 +e5a146dee7b78bef563c65496763788b frame00000088 +986e4004f6f9eb86e5ef916950a443f1 frame00000089 +1fe2fd8bf0de365656ec26c7f87a98b8 frame00000090 +200eb77a0dfef6f5fb7314969947bdf5 frame00000091 +2ad1a93c51e196d6f9238235cea3add9 frame00000092 +bfd1e00a2c47eacf7f399e2ee5bc00a4 frame00000093 +eaa2d07a7198d6c16ca3ef2a3774ee43 frame00000094 +430a6c0d35dbf97b726f0d7efdc462fa frame00000095 +ef5f3c814013d95b616a46d76338f578 frame00000096 +1a357995904e575cbbd0c70582499094 frame00000097 +c18478362d55770393cc032b81dd28d9 frame00000098 +4ff11ff9366048d2b1d0ed8e3025c574 frame00000099 +87c134ff9f24cf22b479bd1f99a29806 frame00000100 +7a66ae31b96453d876dfb752362557ce frame00000101 +c8c10f71e66dbbe1a72cfc95720b19dd frame00000102 +924a375844e62e243d3ad56957c08fc1 frame00000103 +6ab34ac74fc71ade3626e38117b223be frame00000104 +01a058dfc31df85678e99f5efad04b2d frame00000105 +e4d4acaa0596ba6eda87d4608a468e0c frame00000106 +89999307d99698fa5b794838a9c01a4d frame00000107 +383e2aaf6eef06df3d18db7a48979066 frame00000108 +c6b2f1b5a58c899eda4df9beb2e8258a frame00000109 +164a232b0a2893b4bf305db122d4b031 frame00000110 +e1ec73873e1eff366bd63ee5c7580e6f frame00000111 +394aa8d2359e96b61d909acf524451ac frame00000112 +c59dfcd045f0ba7441392081c2bddb02 frame00000113 +efb5070e7eff92e004d6868f93dc1be7 frame00000114 +101cc9308ebf44c66e977a80cf589788 frame00000115 +f188745a8a40e98c442f8a376b618c75 frame00000116 +4ddfd7dee114eb3bdf0db0a0923cfb37 frame00000117 +18aefc8b2cddf037bdf4afce158f60da frame00000118 +ce9fa8b7c250e3e1d7375a7b5023c189 frame00000119 +835fa3d83d6d6155e980f08ade9f411c frame00000120 +01a1d53049614bb8871d198a4bc24a20 frame00000121 +cc3964a122dbfdd89dbe2ae801db312e frame00000122 +088f3f3e5eab15e811b24443c0310950 frame00000123 +bca3d86a72e5932662803d788e8153f1 frame00000124 +067f6aa370d200996b6c3deeec148ad0 frame00000125 +d77374ffbbd845751d3da1ff283e7546 frame00000126 +a1b4990a23e8b7438415a03ab0cbb94b frame00000127 +bd417c1a9f31aa2810b09f547d995cc4 frame00000128 +0b1822f376277be5244f499ba1dd7cf3 frame00000129 +3d4d61e05193908618588054881d1eae frame00000130 +c0250d118d4628b49954488b296fe3e9 frame00000131 +2e50601336d02000eb791de9a7707326 frame00000132 +b78ffd49f113daadbb6b21d1ad35046a frame00000133 +898a79465ccd9c3823ff1b92443608cd frame00000134 +dbe9d9dea17845f360a8eddd3ef1d915 frame00000135 +a65ea427c32b98683c3b82954f4851a6 frame00000136 +f4970bd8a77c88b18aaf621da6d42a98 frame00000137 +68ced2e253c81436dc57077b50381ded frame00000138 +b4b2d0d6ed92562b7b8a885031e7ee33 frame00000139 +55173575891ef1c116374238af6f2dc4 frame00000140 +eec21f57907e3229beecdbe0285a373b frame00000141 +6b2e4fb791d309891cc0802e12aa0907 frame00000142 +ae20d20552bde44b5c09f156eb0e0bf7 frame00000143 +bc3146dd5a08b5dee72274352e001ff1 frame00000144 +ef26f66b1b7f7345afd4fc559c9fb60d frame00000145 +d9675b39861749c32f3722b386decf98 frame00000146 +13c08996219aecfaddef71c103c4670d frame00000147 +834e7ab80d62b73f6d91fb37b1ab579a frame00000148 +a492578059c871c3e28ed06892951483 frame00000149 +fb7b402dde6b272bf41bbdb28e23f762 frame00000150 +396408496eb0ac6099f9b6ff8b92e6b1 frame00000151 +25a4da6160f359db4741164707806e8b frame00000152 +13e3da4a481e6d72dfbaea4e2e779c15 frame00000153 +e166b401156f78bb9b96667965edbe81 frame00000154 +b424c36b586935737e537f69e7f67e56 frame00000155 +d106befb40b67fcfa3d7b27903c16f8f frame00000156 +0435db5112791fd559c264ceb8511357 frame00000157 +8b0a2c42e98548528a1490916766e6e9 frame00000158 +a79cc6f31a8076dbb3b51ad077c9a0bf frame00000159 +381c68b37f8f82b3ec76ae27da9e04a3 frame00000160 +9fc840bb6c841d8f4b7a9e42a89998e7 frame00000161 +293ed8103ddb2487a8b42945c3c3a20e frame00000162 +c2e9b62e7276f08567055d765201a29d frame00000163 +b7c95249a807d26a47631a26b8373ae4 frame00000164 +71625add769c457fbaf7b0ed0dcd4585 frame00000165 +43f8a7f2996504d897d5dc30d67cc5bf frame00000166 +8fc124c7d86c183a4114122fbd2d4e59 frame00000167 +afe9314c6006ffd493f823269daa7906 frame00000168 +2b33f8b8c7c4ce3211beb6e5b1d50570 frame00000169 +a07d7719b4c93e1b5871e3045de5d808 frame00000170 +2462aa3f94aa5e851df9c8769e3fbef6 frame00000171 +5f5cc7e0ea031318c0513cee0744fe0f frame00000172 +a1695f063b5e14fb2ecaab463d092d63 frame00000173 +ab74f3bea3a6b17e4ce9a5920f80c567 frame00000174 +5b59605594d89542769d6fad6940128e frame00000175 +5bdaec91c669f58117cfd26da7f0a15a frame00000176 +c9fb7085a17e3db32900d616a31a26fa frame00000177 +af7309d33e5c990efdf370258585fbed frame00000178 +26595c6b660075054bda612252dd643b frame00000179 +5207a48d7742e2400c45264646596d36 frame00000180 +a9caf1695e0e8c3dd220c6a1dd8426c5 frame00000181 +18457fcacfe39735ac6064a4b2d66df5 frame00000182 +165afd1d12c98b45c13c668b4a78c18f frame00000183 +8c55d0677ce47796104a5eaa2f237335 frame00000184 +6182b4deca5f93c388f37498c47d3221 frame00000185 +ea941d9bcacaddf82db8c5b44468ba89 frame00000186 +a835721bc25c7c11ea1c71b6d45deb99 frame00000187 +17f7d7c92809a146fc9ca796f223dda8 frame00000188 +6a9955d5d51b44574dca68b17f5b0ff1 frame00000189 +f2d59ee9e891e48ad78b1cba45aede4d frame00000190 +2b09ec99d54e7fca15855ee40fd50e32 frame00000191 +d092e3b7125390273a28fe1bbe2c3250 frame00000192 +a6486b76a5a4f5c4ec4532582c879396 frame00000193 +206fbca40ec4ca8d7ce90dd769dbfe29 frame00000194 +e211ca103e209751adfd0b5eb4c8ac18 frame00000195 +ccd020cc5318e1124f9f8faf46b742cc frame00000196 +3f0cc1baec8e095106845ad3a2f50d88 frame00000197 +0d03483b765188626e24bf9183e044dc frame00000198 +b7f9c8e9615e6c8551dba9d69b0e8610 frame00000199 +0ebd46382616a2620cc4e81411fdc01c frame00000200 +697785dd2aee5fccd37021e8a8ca3ddb frame00000201 +3ac67120a30bffc7c9d634b85540840b frame00000202 +a36f928e274089662348b7f07a643df2 frame00000203 +7ea60ddce1ea4871655c32d636253d8b frame00000204 +6a83d899493b416583f38efdae4914df frame00000205 +04a3318a13cb0b68b41dc28a9b85ddf8 frame00000206 +93e8da9c18764649579b9f5fd9b417b4 frame00000207 +c100731b1fafbc63b06e573b60810ac6 frame00000208 +268288876299e0f351d31c6a2fbe3be0 frame00000209 +529985b0d34f5ca7ef133d627bec852e frame00000210 +fcc8123ae5289f2de9a3fec07ef08918 frame00000211 +76eb9cca426756397319a9cde1a84eac frame00000212 +f92468ddc4b2d3fca9947b2df15abddb frame00000213 +e362d34b300e76caa1509319d2e760de frame00000214 +de2825994c30a0f242fee5fda6997ef1 frame00000215 +d3889a219ca608dd2fafaa0ab2dad3c9 frame00000216 +b6e454ad7c5f9c1d14212c3b8ec64e23 frame00000217 +48025e91e7781354232bc76626f8b29e frame00000218 +9d6bfc8f157544b77dd88c22b360d825 frame00000219 +66f8267b0a1e669339a698875b847a7c frame00000220 +f3383a7544a0ade083949ad3dac67e33 frame00000221 +cb9aa79a2f9fe523188f56a989a76945 frame00000222 +7ffa45ca22f5e47aabe067b660eff484 frame00000223 +4daa6cf43957053fd7cf52c7d5ed802b frame00000224 +2f60610faaa6b2828a1905b5011c2671 frame00000225 +f8a2e31da248c6c9d8c51015806fef63 frame00000226 +ec3ef0f423ea2e97466b8b84cedd66fd frame00000227 +6a8c4b1aaaba057b160be107cc40edd1 frame00000228 +cb70c6eed7d03dd193e941d389ec1244 frame00000229 +8e85b5205ff159bcb8c554bde088c834 frame00000230 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/LS_SVA_D.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/LS_SVA_D.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/LS_SVA_D.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/LS_SVA_D.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,1696 @@ +d01c17ea1fb2f02cb8d910eb945ecbb0 frame00000000 +e752b79868952b6642d73a464fb9f544 frame00000001 +1766f7e55175011233a1dc6c8724cb58 frame00000002 +b4665a206ebd4d5e72fc01bc1d7943a9 frame00000003 +08b495e695715c3a4b74422d44339514 frame00000004 +8867225ca775ef528b5b9fc1ff79a4b8 frame00000005 +aeef45abd64f49087beee82d1b4aef5f frame00000006 +c9ce5095ed9c441bd378fef92a22d6bc frame00000007 +0d9405ae9f9537e803c1a8264688a56a frame00000008 +4d791435521203e92313136981d5fc41 frame00000009 +e02d08bba98e6d382f6a4ccf6853bcea frame00000010 +0e65822c4e6659c4a5d2de72712c64e9 frame00000011 +b1c240944cbf6bbb7fa879775fe004b3 frame00000012 +458c3668d29c7a47cc7f8fa7ec0683a2 frame00000013 +95d1d88c8fcbf29e9b64d8dad43e424a frame00000014 +cdc63a10a0d243e8ad2fbaa2d9d6c624 frame00000015 +3181eee6a8d4e3707543e48ef9a86c40 frame00000016 +9bd3b94303e1390e966485f5b1772cbf frame00000017 +de4cb8c769952a9c80af096cab3b5aeb frame00000018 +ce174542a7304673e1a6662cb783d84f frame00000019 +34e8d035fd21dcf2fed795b56e17fa3d frame00000020 +e66265d86222502d822d3e5f1f145ed1 frame00000021 +20d9844fd4803c7929c06c460a4f2806 frame00000022 +d9221540ef592ddfe157374e8afd8f98 frame00000023 +302ba134d39c7b55acfd10bb239a606c frame00000024 +ceaafb207e276ea64f5c4878d848696c frame00000025 +93fb1c598c7105885e76aeb511346e10 frame00000026 +1db412303c867fcacd5b5b827158f943 frame00000027 +666d825bdab4286104881b403b087491 frame00000028 +027ec5af914b8207ccec27f52b0f38c5 frame00000029 +b12ecbc93a490810e20551477e470e4f frame00000030 +011ad0698ecf4abf385b994a2b9b6c04 frame00000031 +7760a49560fd73eaacfa91555562290b frame00000032 +3f96184a339da4afd600b7ac529dd7c3 frame00000033 +7efc51206b76c5ca101c89ece15df432 frame00000034 +f106ca8a49015704e96252de8902609b frame00000035 +5635bbedf4687f97828f801edff2bc59 frame00000036 +b0f35ed681462923a942c3478a03247f frame00000037 +a1e1ce03ac5faca6a87c0c71022909ea frame00000038 +cf116d7da51c92633d37dbd4dc06249f frame00000039 +b89186a14e5a35ae0a3cd8db9e049b79 frame00000040 +a4c5036e30e13f2cbcd55ceeee7d59c7 frame00000041 +84fc7caacf9a9372db6d98a73e460809 frame00000042 +7045dafc31d8f032ae25b54cde9443b5 frame00000043 +97f6ef9330fc2085fc471f392d781c52 frame00000044 +1bef507471bc3503a840f7358bce8fe7 frame00000045 +09254a3ee362f95788afadf4b86babf0 frame00000046 +1b011789557a5f2606af693d95d2b126 frame00000047 +fc79743f495cad3036dfd880f7896cd2 frame00000048 +90bcb5bbf3f466a77f33c4900d285406 frame00000049 +7df68a710c1cfa088014037ba0ed6e10 frame00000050 +7e5fd6b0aa14900e7f77752ebbc617c8 frame00000051 +714df142388c8daab391cf5a4d94042f frame00000052 +c0ead551db4c86e73ad45c1dbfafe665 frame00000053 +0f92ec3a03999873135dbeaf72946380 frame00000054 +d8843a8276772b129f22a87ae8e4fa3e frame00000055 +6e4c1c9e0231ecb05bab70b08a4d6a96 frame00000056 +ca50cca8bf926d5a20d71532dd69f088 frame00000057 +34fbfff97b60566cfaab8457363eb945 frame00000058 +15fe12a1f19bba817e0dc9272f72f9cc frame00000059 +d8e138818cfacdad99129964c9067db8 frame00000060 +1d624879675a6ec7822a2d09cccf6a45 frame00000061 +497deaf77a09e6e7bb304637079c230a frame00000062 +769020e195974b0e83107378076a53b3 frame00000063 +a0fcf3ca6393c192519265d6720170c8 frame00000064 +a76de676fd1a56bc274d923a17d994b7 frame00000065 +0661f19cb51af377000f463e072841c9 frame00000066 +c87dc2d16b9028a91e3a1ebbe0fe2654 frame00000067 +b55123f274742488e935a92a8e7d207d frame00000068 +8f89f3943e50b2ab91f523b7c1bd0b90 frame00000069 +2eb6edf035acdee7a60fe1457cab02ff frame00000070 +8b1294cb407db6344812b19d003a674d frame00000071 +0dd64f4501ae28cf58f325c88e9d491d frame00000072 +178a9c4a4bfb83be6dfa9f3ea9446d47 frame00000073 +ec1212f68f948c53a4d01a4ed7cfbda7 frame00000074 +8249c8576695f063f806c26e469446df frame00000075 +d3394ca319d5e6d2bcfcd7125ac17c8b frame00000076 +bfd283a634af885451c92d4f06f094bb frame00000077 +12f6a679c280544ce646415bed79c844 frame00000078 +eab524c4aa8e8bc765d272b8c850dbb0 frame00000079 +a65322aa7c70bbe22a052db6ab833da0 frame00000080 +4ec2ddfc07c5e1cc31337ebcd51e57f9 frame00000081 +a6ebb663874794d97a66b590e977ccca frame00000082 +36e81b084597757d7556390e3dc0ff67 frame00000083 +c7355bda14de6e2a13cc5d531d89190f frame00000084 +9a5b99d0aed0755bc10a54253f17a622 frame00000085 +88118187b9e3c7a54236fd15e6d23f4f frame00000086 +ce7c4c5c3f454614adaf454d4fc4c420 frame00000087 +a437f862695966d3d109e079ad155f82 frame00000088 +2d37fa2822ac330a5fdf444d68ea3869 frame00000089 +a05eb0adbddcb2ad4fc99abb4313d5a4 frame00000090 +aff60f538e62dea75736de75eb6a0a38 frame00000091 +36070d955e95a7a82c7ad0df6e4de8a7 frame00000092 +9851682bbb79a6db732bc7171510c1ef frame00000093 +f32d483bd8a30517d986af0a1fe3fc2d frame00000094 +46c7691094b810494fb3786d89f76e3e frame00000095 +8e0168d0035b9548570600d9d26eb28f frame00000096 +127ac3b350f8ebd8b6a6220167032e4e frame00000097 +c7ad78909f4408f243d22afa5df91568 frame00000098 +46b71347e15e0e38653ffbe2f55da752 frame00000099 +e7c08b5315f3a864915a19db622ee80a frame00000100 +7307e9408ac0dfe1b87d91f12d78b2e0 frame00000101 +600d20ac724851e4ab911fb7c8ca1d20 frame00000102 +cc8c752c6108475be7514f03fe8403c6 frame00000103 +f4c8c55423d19c4bef6849a1e92bdd99 frame00000104 +0d759344115b9d9fa0143d4702099ecb frame00000105 +c0cbce0e7ce11b92a893c41ea3039ee5 frame00000106 +e3149b7803199255cdfb3c3cf5b79f0c frame00000107 +ff640f7553fe664e5e72a6075f3ca0f5 frame00000108 +421ae8bbb36ba7867b96a9a57496d409 frame00000109 +4e40a1c4a79db976e568ffca5e4e015b frame00000110 +9c9adc04538b9705e312b8c8b50f2d01 frame00000111 +8d5782d3ef67ae05ea18b297201d33c8 frame00000112 +a9b7963b8b391915f42b89cdb312db7b frame00000113 +22a18b77d4939e407ff142b8869e7424 frame00000114 +e6b9845646291aa71d59d404ae8a5be7 frame00000115 +97b93f74796b68b0676e2fe089db7a7b frame00000116 +6d1e8b4153d800828bc9081333d081ff frame00000117 +04042dc8669a362b192515bcbdd97982 frame00000118 +34303a4167d4a2056f12e88241fe16f2 frame00000119 +90525cc3c02769c61ba636ee5c5c1025 frame00000120 +58786527543da91279610737819283df frame00000121 +f3f177d192664bd3fb00aed22538ec29 frame00000122 +82bdc5d0da996b8ff156573126384101 frame00000123 +24934c8dc2866ffa9dc8581e2f7a246f frame00000124 +f03a60006f7b512339210892e1950832 frame00000125 +0b96d629f2f9b876822d2cffaa95cf71 frame00000126 +4a8b176b2d4f092da944034c35a19cbe frame00000127 +9b5af55db1d96c3c4a778db6b122d8fe frame00000128 +350dc481c02e0e77ec938f7ae7826af6 frame00000129 +c7484d50e2b3a8d689dd7200c8249caf frame00000130 +6f35549764a2452052770f7e242e0eb7 frame00000131 +a2b57721accd67aecc121bfd466406ed frame00000132 +03e10486695d2c962b20821cfb7c133c frame00000133 +0c4ea79781effafa4ce15796bbea0cce frame00000134 +0d206f2b159746f19a9f45a045e8bbe8 frame00000135 +ed49ff5d908bf8616c5dd25a7c7da62d frame00000136 +3bbfbaa0c58ba6bd150b503a203133a4 frame00000137 +677130c0dfc170161ce1a78335a7307d frame00000138 +9c38144d9fd2f795090ff85dda7ccc88 frame00000139 +a24d76464e6ee547b2ef8d1005efd9a2 frame00000140 +881fd599da7a8ff5177caec7f68a82f0 frame00000141 +32ddb4a7b182535331ff1bf4bb4cc122 frame00000142 +8af123ba0126eeb4859e25097493af77 frame00000143 +2159914945aefccba64708f6b8a9c441 frame00000144 +09a95d96e624a43cf3f75a5607ca8a7f frame00000145 +cee12033a6692684157354d4de7ea851 frame00000146 +1045f31658e682cb48a6d9f086ce37e1 frame00000147 +7ebf2c9ccff8ffa25eaad42c575ae23a frame00000148 +c8f558fabf87161c16932c44530c1984 frame00000149 +7f651db59d528bed03e607308dc98b44 frame00000150 +f656cbce077667ed5f868366ee7629ab frame00000151 +d48de9d33d325b58033020a756e6d2d2 frame00000152 +8c154e14111f3e5326abfcc6f30330b7 frame00000153 +45ce5eae24051f9dc74a9ec88110854c frame00000154 +76ee324a3663b364b87b97c38246c236 frame00000155 +2216abab1da9f611434370c5408743ac frame00000156 +238bb198aa1d216266b7cdac5fe2079e frame00000157 +29986c9b5f7d31f9af5945bbd46c8847 frame00000158 +b2f9a3adf46d058bf71676adee7f9e47 frame00000159 +646fa6327b66e9972d0fe8aa970ff801 frame00000160 +d8c3dedd2c33a63cdd0e8f3be9104f96 frame00000161 +ed31254c4bbeedbf1614b38b6f8655cc frame00000162 +c1143089cdda2c36fc4dca3228a42a38 frame00000163 +5d15dc6edd8079431e4aaea836a8cb10 frame00000164 +dcb5b1b48c8cf48ea9bc07f4b85e4754 frame00000165 +b1fba4005fb61484e96cd357506eb49a frame00000166 +0e4ab890517e2fc2efcc82c1cafe62d5 frame00000167 +da02cb8d5a8564b9b1c1f51762cd8917 frame00000168 +3172987e5333f56eb6b13ac1de6be0db frame00000169 +46ad3c20cf527d613e03c89284fb49df frame00000170 +19d033c5725dfdb24149b1a3d07f8fc3 frame00000171 +e467314668b8e6ca8db2c078e350d085 frame00000172 +a2824f576eb33debe89e36dd9b5b17ad frame00000173 +4098574909c13c38db97496862a75c40 frame00000174 +539ec5473162be3408f53741148c51f8 frame00000175 +704a918156be9439767db30dd0482135 frame00000176 +40ed1ffa322ed89ccffe0e2e883430f9 frame00000177 +d8cd039cf6af00d97d8a7c4d28373a18 frame00000178 +1dbb91f93be30ba10937e2d3771d0b43 frame00000179 +9fe8eb1f80a0067ec3fe9695789fb789 frame00000180 +a1b972fa5a2fad77c3dffb76b90b6980 frame00000181 +aeebf2db8202a3004a1d74aa49f05118 frame00000182 +c5fb6af878a9e6790a2b6949b021903a frame00000183 +77822d91d60581c38864bba37a681b49 frame00000184 +0ae2f35235a86f440a50aebe20d27844 frame00000185 +519c328cb5e4a8033478aa1fe0a9473c frame00000186 +1c3c87ff653371cfc652f702555cc5cc frame00000187 +7711d31c26776b94def65dd4661bfa54 frame00000188 +e0eea186ee49d08d561d39f03ca45194 frame00000189 +bfec67ad5b36c7abb527ad0294cd6d4c frame00000190 +20b4ab2afdd114ccec9ec7451454987e frame00000191 +da83acb5976c5f9848743ab68caebc83 frame00000192 +c6985413ebe53826a1f8157973ef1682 frame00000193 +f24b428a5d9c8ecfb9be5a2884848902 frame00000194 +edc412418fc89ac9cb046f1400b0f119 frame00000195 +775bd67a7e811bb428602cd1a879b98c frame00000196 +6a3615754dfa8897754a4f29075ebcf8 frame00000197 +64ab12ed31475e657c94cbe142ab53f2 frame00000198 +ad61007ccdd5712eb6f8e6fec8ad757b frame00000199 +fb8169fcb9c2c1a080e0c1ad978a0e27 frame00000200 +410cea27c01a5be14e1e19c5eb4e0fe5 frame00000201 +f0291e95d3f5bcb8d2648e79b39cabc0 frame00000202 +e8fa33c72d30b7d6c4d449682008c328 frame00000203 +b5ebc6294f53a11690dea4683460d26c frame00000204 +40af7add5795e93a0f9f468b2a68a473 frame00000205 +011e463932cdb4b928aef8e756374745 frame00000206 +9b3091dd33e302bb0c84c04f6a1089be frame00000207 +65a6a373cd60d8c593d0cbe59caf20f3 frame00000208 +c1a870633bd9e56a7be48789a042e560 frame00000209 +d388d031d2a8700ae9e701345a62c433 frame00000210 +3cf241bb30ac0326692f5f28cf8c93e1 frame00000211 +2c69f0b540665cd8ed8039f20dab8c2d frame00000212 +d1ab005076801d79aa98949f3037e365 frame00000213 +bf0a5efd17c91ee13995500127852d52 frame00000214 +7427570d6e3ebe0e07cd00b292467bd9 frame00000215 +867d7cc51efc2879559d77063aadecbc frame00000216 +cadabf2e49585d8f9a5eaebc861948c3 frame00000217 +5840ede472f47cdf00d5ffe3add78c31 frame00000218 +23cb056c7736bab49aae9a3d1848f825 frame00000219 +4220af41629aee16a341453446bf142f frame00000220 +fef01177f85ecb3d25dde2074c5be177 frame00000221 +d583d1748b471887f718cb9ad21223f5 frame00000222 +247290dc8e7941e527cc146f55a563c8 frame00000223 +9dd8078d9df77c11f10d6e7c7d35e1a8 frame00000224 +7fb1a2277c2b8d2222b515937e2afca4 frame00000225 +ee130be955385d6f9363cf16355ddaa3 frame00000226 +5ea0c2a408a94e5580c46622be4183df frame00000227 +1006c6d1f57b85932de9a6c7e3f31b70 frame00000228 +e24c7f535bb503e0a78278a8acb4f097 frame00000229 +81e1bb7cecc31a489ceb6dc3758f2f99 frame00000230 +2fe7f72b3d6a646c164aeacad28a72dc frame00000231 +c85b8ae89e31473d3c2bcb171ebf83f3 frame00000232 +859a8bce365071f7676bfdb5a97cedc9 frame00000233 +b95e0ba9939d4367346f6fce8834a18a frame00000234 +66382d52dcb1588c5e275cdcdec7a8e4 frame00000235 +9613b0e235ccc6c780f710ce152ced97 frame00000236 +5819740e038b70d73b3307b08665ebe8 frame00000237 +b842796878ffec48f6bcb3a2f7ebde3b frame00000238 +57fe4d6f45a9c8b5e52b439a89c9eb7d frame00000239 +d4c6aff99b5fe1cc74c1c754425230a3 frame00000240 +e4eca2409b8e4ec2a1775e3964c13aef frame00000241 +9ebf8241c1517cc77c72460b35ca752c frame00000242 +9433e64a48a571d61e9735fa56c80fbd frame00000243 +82c0dd484a9720931c30b37810fc1c3e frame00000244 +a328a7c210d0ed73051614f0634c0495 frame00000245 +4347dac3e9a37949c32441ddd577fe36 frame00000246 +4dbe3af25bef8b15a8d781ac30cef056 frame00000247 +cbd77ba75761652145c121ec0e63b200 frame00000248 +d29647ee5ff51b57a6b6127acf1808d5 frame00000249 +efb0bb7de6612f6e0e9939917147e22b frame00000250 +a70982935b62ec620135fb7ffdbe1d00 frame00000251 +91b125a14e30307e6da4614a815b3264 frame00000252 +e5f6d4e2eda039fcedcfcb6cfe818561 frame00000253 +7dce058c7176421e30cabf6bd910dbca frame00000254 +7442b0e77ca09a8360f3aff91759da7e frame00000255 +01d10529327e638bfef09f3bed55a409 frame00000256 +7450283ceb4c21eb8c1ee024e27e8ed2 frame00000257 +89fdcb0be9695742ed80d8e584751bd6 frame00000258 +a34f6d40e4a0a76d85271d76435cc55f frame00000259 +b0e7a32b0804cbb0100bc74321a47542 frame00000260 +5efdd220ce679d1b53fdc35d30385421 frame00000261 +07340f41bd1e2d232a1fbadfe4abdbdb frame00000262 +3be63e3c6d9344304fdfbacbfe6565d8 frame00000263 +9904cac9c7d1a9b5e83985df50d94e1b frame00000264 +3567235b517c6c6635e9ec25f07cf9ef frame00000265 +d2431eecb54ed014c9ff66f19854c9dd frame00000266 +9c582ed544b23eaf969502e0ea1006b6 frame00000267 +d85f24ea5073ea2eb92f533dea290b51 frame00000268 +00bfbe53554de34b15a28b35f8d8cbbd frame00000269 +b96e9943a5e7e37bebf60c8f6b7428cc frame00000270 +194059b0963a30045d57b981eba07785 frame00000271 +7056ee7f4a68034c70755d7f828810e9 frame00000272 +30af0092bd1a8f3aea02f33ff4484f7c frame00000273 +8295672a96900d7e286e61a201c4a18c frame00000274 +132cb15cd3f0ca9023627e67a459bb45 frame00000275 +6e9a1670e36b5d790c2442467d2aa25f frame00000276 +81d222e8eb518ce9ba1e4996f0a33bcd frame00000277 +28917f66e6a9958d15959fbb3e41d213 frame00000278 +0bfc05ec04745209c9419f1c98686076 frame00000279 +c8b1d0fcc72a4be4c7bb997f97e9a797 frame00000280 +c0a1e7055f05d1ee30f19a9f0e2308e0 frame00000281 +9cc2b399358362032a93cd59116f6435 frame00000282 +321f1870a56c1053ed9a3a233beacce0 frame00000283 +defeb24d9f52430aa9ebf3c714527d7c frame00000284 +d4ce4f67fae1f238c6dfe786c709814b frame00000285 +5d88d1ab9dee3e3592ab0a27a893316f frame00000286 +a84168d97e2df7f081ab1571c509fa9e frame00000287 +007d74677683ce766c4d10f0fcda6be6 frame00000288 +b7e42d717454aca06b79c7b68a756316 frame00000289 +23c11575329f7733cf47d525526653bd frame00000290 +a6803867e179261e1d845d3d6a6638c3 frame00000291 +757464431413697f26a139af934c3906 frame00000292 +61753d68ec3d037f965264ab3ad8e047 frame00000293 +f85ad86b1567f7cb2f62a2dfc045834a frame00000294 +ffaa1b7c0762f6fd4e45ae56843510a5 frame00000295 +9c8627ece33efe5e7d9ce533246132fe frame00000296 +7596a05f8082dc30986367df34846229 frame00000297 +461059a34e02685e3da3818883e69447 frame00000298 +f584f40d23fa85154c8af3db182a2eb5 frame00000299 +8dcbc63b294d49df5bd3b3d60de15b2c frame00000300 +bc438e72f79a1047501528e7a73e4f01 frame00000301 +e8000ffb0c4096e69a5ff64c406fbaf7 frame00000302 +7b23bf8f50be459a4a5b9365e6b9aa28 frame00000303 +ca51c0f8f064f72e907edb0cb3c24247 frame00000304 +f94238c76640c20baae396ae82ae310c frame00000305 +62578978a16e1f1471a6268aeef9fb5d frame00000306 +110a287d3fb0c4876859c358e76f0319 frame00000307 +6123c75d9bdc551d782c7eb748a02b6a frame00000308 +71685e7835991cbe97f35567039be71c frame00000309 +380dfca0d0c669a7a93b62f3069ae9b8 frame00000310 +3ba43cb66ac860a23ca7884f60b1d92a frame00000311 +7afa56ea8559348e65f6685743831d7f frame00000312 +b369665ecb22b6934835a22815046a7c frame00000313 +53e8d0344deef3ff4974ec4c094994be frame00000314 +883669828b01d1bd61261ec6b889a067 frame00000315 +357788070ce264771594b2ff521c0d3f frame00000316 +2d5369c687905bd4dcc885f0f5a0616a frame00000317 +a92153cc19b0248c9062bf9364d04375 frame00000318 +a3f44d80a60179424e06340698542ed8 frame00000319 +f4959bb0f2f8b9807c4e5d25ee414b36 frame00000320 +fabd0dcf0f51245a2bd7d0c2bc895821 frame00000321 +14360050d68c41ec9d27deeee6a88615 frame00000322 +01f58139dcbe840a35fc7adf5dcf2213 frame00000323 +426c4a7c343c1616d369da7945fc24d8 frame00000324 +340d4ae8c90b2c365f833cdefa7a4df6 frame00000325 +7353a1d95127be17b8e3e7d5b6a004b0 frame00000326 +500cd71757fe4f06f5634038740f5eb1 frame00000327 +0c65799b2b436d3154c076d368467da4 frame00000328 +6ed4da6de250b87396670c74da1245f9 frame00000329 +26347d3b7291059868e28a001752c28c frame00000330 +ed4b850746027502f7d14321965b51db frame00000331 +b51773f5409e2bb7db5e7d76779e84a1 frame00000332 +b8664dbf983f84590d9fde362a833e9a frame00000333 +bcb2fb2e063d72d9dd3cc4edf3f60ec4 frame00000334 +379bcbae36d248af577b566bd1d32293 frame00000335 +b9fde1af451a0909945c6d5d7f0e3b3b frame00000336 +81025e12477dd35e812ea0029c2fbac3 frame00000337 +ef8aad5ba2acafe38660c80c8fef499b frame00000338 +657afa348d131095b393b5d0686381f5 frame00000339 +bbf651a842fd84e2b4d146ca8016a549 frame00000340 +21dc20cec1e7dc27bba01eee1f9d7308 frame00000341 +af25f69300c1453694e7f89a4e937843 frame00000342 +6c4e6715fee2c6afd2d572743ea8c566 frame00000343 +ab42bc0fd1b2070719e11620707d55c9 frame00000344 +157cf8944b385be4879c9525f62ac550 frame00000345 +7ce1bd5a2e5a86b32ed665bc3931c389 frame00000346 +8ab2c5d0adcbaff38aa639a5007936e7 frame00000347 +26924228644213b631d0838e4bd5cd72 frame00000348 +d0be3dff48d36047f6ec9f0ca3c31630 frame00000349 +d99092202ff8166ef9441a7302ccb872 frame00000350 +57d44657f3a8d8edab57e372dbb472de frame00000351 +e21a64d9eaead88f352dd0c9717e5a62 frame00000352 +e991543d0e146a47a928785177f75e69 frame00000353 +b346c0bc5ab9824ac9b90db482f8ee0b frame00000354 +529e434e9d558ac5f760716ad78a7b00 frame00000355 +b481370082c2b729b753dbc8902daf53 frame00000356 +d6e589ffdd531c53b688a732e6a09bd0 frame00000357 +10a304480842670848aeb370f58979b9 frame00000358 +4c115f2826641eb169cbca95903445e3 frame00000359 +88d900ee976629ae98c6149cf2745499 frame00000360 +1f1cfeb1a886fea80399154cf0fd0b42 frame00000361 +7b1689ad32d0fb94855e672b81a9e73a frame00000362 +17778f1f4245d4b48ac52d725895aa70 frame00000363 +871933ae18a0a6f0ad005deeb6dbf7a7 frame00000364 +a51f0eb3e80aa545c0f25a25ea30719b frame00000365 +2e7cc15bcd718f2bb7fdccc73bfd2f30 frame00000366 +ce3dfe6e5c1dd6958be49ba2f9d7a57e frame00000367 +c705d4a51853e8a05f92f96f37ac89bf frame00000368 +8fef56721e4aa6505f41e302afab4432 frame00000369 +a40bde4ead3eeba179fd3123643d6126 frame00000370 +9b925b426f68dab5def3fe0408c3b142 frame00000371 +d86fd826833619c15e4fbe325911c9c4 frame00000372 +9770f5e1f9cdf0da60aeb1444d66272b frame00000373 +f56f860ce2494fca6979e30011fd0abe frame00000374 +1377f0878b54a207fe1908c37dc2f2cb frame00000375 +d6732140bef3d3767dd3c705339df611 frame00000376 +af166a633ef78a89009256d5e3fc2916 frame00000377 +6153825c81d9d1b5d7faaa700f53b8e3 frame00000378 +8625d8c003d9b07cbdd61e79aee09384 frame00000379 +1b35597e4b427a196b1c7caaf2174dce frame00000380 +ed2fcba41ea1a66411689603499c8953 frame00000381 +7aeefa0758ded24b9ac281aa92a55dd5 frame00000382 +c29f07219295ba6dd25f40d0bf7240d0 frame00000383 +0a62aa3bfd4df9abb5c1af87118f1d06 frame00000384 +93c7b963dc72054fc36c975156c89748 frame00000385 +0f7cf29d3bb94f0671c4b3b151b009a6 frame00000386 +f39bce9b55053a767b662ca92ae96a46 frame00000387 +4311ec813ca6c0db8015f7c821ee2e15 frame00000388 +b64d9896a17aa467bed5b19bcf14fa4d frame00000389 +b502d36ee8d5bb4533f5ae870422ccd4 frame00000390 +a9fbee7e1fa0318bed152e612966e847 frame00000391 +e77448217cb0123e502b7ac44f27ddc0 frame00000392 +09041a85c11f239a807738e461ff7ec3 frame00000393 +1ab3a526d084e6fe3f6d0b02747377a2 frame00000394 +36ab88b484c19f96b78b4328c9475146 frame00000395 +e5d2c9577094e5e4402cfb1871019f96 frame00000396 +194fa1fde49acc762c3f02f6e56f1d54 frame00000397 +6e06eab96448f3e5081c6771fcaf6dae frame00000398 +ce7a06425ee595fcdcb2ba21aa02b1a2 frame00000399 +a1ef0223c99ef9bf6f31ab2f130afda9 frame00000400 +605acce4719b446f6937e27939c91e0f frame00000401 +007322af043b517496eed37f39393244 frame00000402 +77bc10b523f87eb9f97e3a5aadf9bbf5 frame00000403 +bedc64e45a9880bb104912fcf42d03ff frame00000404 +b1e4a6bda5bb85d36945b01b401a2b49 frame00000405 +43c9ee0a2c0ce5968de8ab1b0db9ae09 frame00000406 +a16699e0acd436d435e6a472ca4258bc frame00000407 +ee5fe9ca37c3196c2dc12aec5f8cff96 frame00000408 +9238cbd9375741722415854c179360b5 frame00000409 +9fed1c072ceb952cca2f713594a9ab06 frame00000410 +80057f601c4e4dc43828e30015095bc5 frame00000411 +020a54dbb640028c6ffa7571083900fd frame00000412 +09d8a05d2395371c6b58d8be5edb330b frame00000413 +15f86da7dc726fef06fbacce8a7dd566 frame00000414 +a8ac6a31763c5a7a39376b8782fefea7 frame00000415 +30b2bf856b5500d811bb8dca4be69ac3 frame00000416 +60905b60b1284ee688443b026ac920d8 frame00000417 +ad890d3aed7bf7b745cf1b170769ba2c frame00000418 +c483596347bae73ec6b24a28f4bc96ab frame00000419 +dabbc8163be9341b43f843e5a8eaf6b4 frame00000420 +5c7cce7f284b22cbe3d94c3924ef3383 frame00000421 +3b6c07e1e7f02fe4faeb17abd6584c0d frame00000422 +b03c9b3226a09703e67e68692aae77ac frame00000423 +50d00dc6ca5106a3dd43fa26070b9756 frame00000424 +96306f8a036cd0992a292c56de55f3e3 frame00000425 +23fcaf3bda7eb8cc42411fd5544d3221 frame00000426 +d173aa0029581aba229520457733b3e2 frame00000427 +8049845f22c06101fc7c238a537f5573 frame00000428 +b6a1d4fd612d9c5ab163f03626498ce6 frame00000429 +6547abe4476759e8a304846dab02c9bb frame00000430 +690cedd1b94ea7414dccbcdc692bc773 frame00000431 +4316ccb50c11014bf3591ff2081a3136 frame00000432 +f77b23df043b78153db8f8da9d458e92 frame00000433 +eafdc28a7e3012f2434b07fb27718a98 frame00000434 +870a5ad45e09ca8e8cb400c843c8a424 frame00000435 +4705911bba8f38d4e856d72b8a69539d frame00000436 +e6db1cfb5250654799fbb0b443a731a0 frame00000437 +90eab3ce746987720cc3a8f5ef651d40 frame00000438 +0762b4a7d89e73bee63d405692249396 frame00000439 +95ba0d549d38754319a20269dc36eed6 frame00000440 +a29bd82f7828a7ed2568d7a6e6d5dbb1 frame00000441 +1104bb8d7662824291fcc14acd057f61 frame00000442 +70919715f51abb7e84e512b19ff8346a frame00000443 +a8566c2adb95f0867f2c7e597b349978 frame00000444 +cf3dab5084984d1d55ffcdf2a9d7b567 frame00000445 +c5d4be25b753698e36d995dac3206b60 frame00000446 +f93a3ef10d3c09e692e6653ea1436ac6 frame00000447 +6f3d726221ab52fc5424864f19b492f8 frame00000448 +2bfaf47af72b4cf8e894487ca5cc1f50 frame00000449 +8a7bc8cb3a24966d3ee25b85b9458fa8 frame00000450 +ca87a9861a316e57ccfb287a17646fe0 frame00000451 +559e6c339ab0b1a07507942880280553 frame00000452 +bf148a64d78463acc031cc43e5a2a7a2 frame00000453 +c6ccb1a6a3ca08be00ad9e6a11f9b1cf frame00000454 +b839a594f5e1f6f0599ffab182f2ab92 frame00000455 +1bc3abc10d78c50336c990cbc6f3ef4a frame00000456 +77ba27e7e8488246441033f104109d4f frame00000457 +02118df89f338bf3e1e89b58f40419bc frame00000458 +8e4433aea1d30ce34bdf6195b8a1b8bf frame00000459 +265a31bdc96c299490bfc835be9780c6 frame00000460 +ef474dcfeb45832f7a8362c6a9a6bc64 frame00000461 +1456f0383c0d69b46a7365739685a701 frame00000462 +bc14aa912de4fdaf3eb8ca43352850e0 frame00000463 +bc61fd9609fe9aa998b41ac0b32d6e7c frame00000464 +7a377d2f8e43bf730cbf050f40ac4bf5 frame00000465 +5089d560a2445fe62e4f76b5f38cee15 frame00000466 +5cac31c11a999e16114732d36fe4ade9 frame00000467 +23e14373e3e1f536a1fe69eb231a8253 frame00000468 +3c90201c2897049b4fdb4b855fa86c45 frame00000469 +0e05d542a00f72c5ee77c6fc45638bdd frame00000470 +3f07ee56fe6cbf938a9a4e9396118ece frame00000471 +8ef8bef6e28f765c4cfdbb36357b07de frame00000472 +0ccb4d4da912428dae9371158560a85e frame00000473 +2547c9cd47320af92d10c68feb45850e frame00000474 +20d75dff4d8f4736b5cd23af2ebad592 frame00000475 +2e6dcfa9429411e9cda43c9ee985d066 frame00000476 +2397431d68fc3fb3ca98b9b385fb639c frame00000477 +591d2f04d3d619105f39391888e8d238 frame00000478 +8490ea20bd5f9a83bc9d2e6ceef822a1 frame00000479 +80ecb8d53ffc2273f355853239c66bd1 frame00000480 +1eebe861767498a6a509faa9a72e252e frame00000481 +26c312d1487cc7a12bdaa62ed8f89af7 frame00000482 +6a7f2c486827705938e4478e552aec89 frame00000483 +b6a66f4803ef70b0763283c79db55b24 frame00000484 +e68c7780297ae1b198440ef4f9f80695 frame00000485 +e9f4aaff6bb6ab052a37c4282fb5df21 frame00000486 +8e535cd8d1db852870ccc4eef797c763 frame00000487 +b70de4a1842c0a6d495e65dcdd292b2d frame00000488 +f9968b98116c782fd05c1ed6248c803d frame00000489 +e14e240532c5df3cf8ec61265e28b822 frame00000490 +8d059928096bdd141e2a000127ccc130 frame00000491 +5d7affcc5a55f9cf917a0d6f4e0f4257 frame00000492 +e1e8f6692571cf2ec0240a698d63a471 frame00000493 +7af38fb1b31cf04a39b977aa4f37849e frame00000494 +0f5bd03e6da299206bf0b3d33c739052 frame00000495 +0ec83f8f3e26017cf76dc40ad14f7513 frame00000496 +60352a36551390169be9d539acfc51a0 frame00000497 +094f0e72e38c7b1aafcbd8e68541e9a4 frame00000498 +b1c199472fb2ac980e171d95c53a1602 frame00000499 +e2bee9677430a3cc8ee5e6966bd88520 frame00000500 +5303fb4023f36641800bf3d301541726 frame00000501 +d73bd5d362f7e7722bdccaa5b2024d0b frame00000502 +22d829936fa84f07619f6bb44ce37c33 frame00000503 +32091ddb511a8c847f9deb5374c3097d frame00000504 +4a8460a579036ce2f75580ae978dd348 frame00000505 +15dce7d296d9676bbaba9a6487cdd421 frame00000506 +627a5300c9e830e5e4ddeffdd28ec02f frame00000507 +809635745530ed3117242cab4e4c7410 frame00000508 +e624e31cb2b11a3022d152cee5ba6bbe frame00000509 +167b5682ff197442b75d45a451073ba7 frame00000510 +48e6511af8137adf9dd314ea2ae2982f frame00000511 +1e4c4c46e14fdac70545096578fc9a85 frame00000512 +89f66224027991c0651cf36d7226cd1e frame00000513 +af1b31096470692ae8ef60596ee4e271 frame00000514 +d68d13b7c3e18df30a142712bbaabdee frame00000515 +aba2837aafe0254c846363b330106559 frame00000516 +c71c198d88c29bbf551113dd77273a49 frame00000517 +837b104abfbf32ce4342b73a084ca993 frame00000518 +e27ece4b36da0dbb08c9607d8742b277 frame00000519 +43b93efcd1fc23ba67a41ab1e2221536 frame00000520 +2467eea6b3e01a071b9c193c98694438 frame00000521 +ffb6329e7467fe7a72e655b03488eecb frame00000522 +f3d6f8ca051e9f46705d405ef1d4fb90 frame00000523 +74647682e46133fc3e336e9e759e7424 frame00000524 +0811c3e3924affdcf163edd1f26853cf frame00000525 +805b9a8cf81a66e5f5abad77092300c3 frame00000526 +b76d0acb88d93c3f6ba4772df422289a frame00000527 +8373cbbbfcd707e67de94d4a01d43c3c frame00000528 +409028411608e36e8bf5655cd115e525 frame00000529 +24c9aaf0c71c1c7ab5bc8b13121fe999 frame00000530 +4df8a2594ddc34b2773551c82b21f881 frame00000531 +0b748313a492ccc1b04d7b9e5fb0b5c2 frame00000532 +a0d21019a478f919ad48d014b418933c frame00000533 +b246cb40956ab2d372b6276b56727b5e frame00000534 +0da6f5f507659c8d0ed489c9b2ac8bb9 frame00000535 +55cefea284d19b5a353927254090f450 frame00000536 +2bf78f6d9e9b844d801f9d0e582aae79 frame00000537 +7d8265534fc1b2fcb1b7bc490c98732f frame00000538 +8f4a3b3a58034c8787b812207399799a frame00000539 +5cbee5adc88c35925081a652f9db0402 frame00000540 +a1c6a10d2537c38b12536e688c6d2859 frame00000541 +b07fb88ad55ef2585fb9850e0002d34a frame00000542 +773b96f48870e4c7b1e890c30c43ec72 frame00000543 +bcc1f14dfa5a8de2146ed4757af0c45a frame00000544 +c8a22c4a66fc7efb1e62c4ee003196e3 frame00000545 +b057d3db951dbee0a647034e785f9be9 frame00000546 +5fea6a2282b37212220f15ef9b36dabf frame00000547 +59ab916f521ede32a32d80b8366ff9de frame00000548 +91527cd88e1424d006a7bf5bf627e031 frame00000549 +fc9c4fff81c4232a099bb968097b23b1 frame00000550 +bbd3aa58434539ef63ab947fdd619d08 frame00000551 +998ea009f2d496290f511ddeabf6f3e9 frame00000552 +0514c5a3253ab3bf9e83ea5c1e4708e1 frame00000553 +7ae24baf3f0602b932c881fbd4ae5297 frame00000554 +61851683e96bd2fa0db94008ab4066b0 frame00000555 +1332475a10b6c481a39f71722d4fd695 frame00000556 +79c2259d238a90cad04554601c3804ce frame00000557 +3ba1d1b8b302f8c37d83fedce99503a6 frame00000558 +757f5a6b41ee6bdf6aeb535a66cbe596 frame00000559 +8e9e14c357c158bf49795cd955a066d9 frame00000560 +6d061aaa8688d61563b3d822ffd9fd58 frame00000561 +33ba3ba7b77be39101d247db83a206d9 frame00000562 +49fbb10bde2b847ce312b062d73a9543 frame00000563 +2d43dc5623e6353f854a76455454fd48 frame00000564 +23569c061ec06636029e39b47b5bd10d frame00000565 +e8960be004e06012ed7dd6d425a9115d frame00000566 +a00d10f154f688ee5e3f48e66916cef4 frame00000567 +5505af384e54fe82a1e632e6655ba3c2 frame00000568 +f153667c36dd017e5988594948e908ce frame00000569 +17a1b873951b7505b00d49ac68a5467d frame00000570 +7e5b8b650f9d789f1b59809816629c3d frame00000571 +7a293a2d58610c2d84471946e373fdd1 frame00000572 +bb9f227795526ed88e42162ac2fba4f7 frame00000573 +10f21ffb94b17b3b237ac793e5762276 frame00000574 +a3150f7a95666938e682f051f7b96ff8 frame00000575 +421becaba5e935ddeca8b34811cc794b frame00000576 +c674d37153ef1b16db774bd3787d704d frame00000577 +98a56974a00bdcfed66c48b560258952 frame00000578 +f19c1b3830382fe7aa3f4b8f5dc379d0 frame00000579 +45cc56dd76a503df842b53dc45f84a15 frame00000580 +0eac9bcb0c60b143c407124f3378b892 frame00000581 +9a4996f107755aa88ce5f914ab5eb17a frame00000582 +db3854295dc8ce0224491ae4a1128205 frame00000583 +6d7db5ec59f3e505f0e3b91dddb1da1e frame00000584 +7be5875e8960a61c577f644b9a310b0f frame00000585 +fe54fccb0ca0bc3c93edaa56e0dbd9aa frame00000586 +6e11f33c63dc518efcacc6196725435c frame00000587 +cd6426b7c5b37266939c41f5c67dd41e frame00000588 +7c0583d88fea481a3fd0d7bd1b653cab frame00000589 +62233e3defd014b9177f8b3544cad9d5 frame00000590 +6421d2ca70b3cb49b1cce98f58d350aa frame00000591 +7f9203b32e53003b939622abf1267e51 frame00000592 +a26ae7f9a2b20087ddf61518d78f98b9 frame00000593 +1ec124a8c7622809c9a30647f241d3da frame00000594 +6a7ff7419e7bfea12950d54ab1a778f2 frame00000595 +fd1982ec01777b5f527bc87024198d02 frame00000596 +5bdd36c090c3544562864a9698118226 frame00000597 +b18cf9ac315bb1c6d5bd74ec1450f118 frame00000598 +d0e37ab4eaf980dca5f5cec2f5a09f0e frame00000599 +16e025985a3a3ed53ee36a5123500d55 frame00000600 +6b4d7683343c69a9d12626da9db2fb6f frame00000601 +a1d059a2ac0f971b12cdf709c7a3c841 frame00000602 +6b90d1f65d8e1b57c2d54ccaf06224bc frame00000603 +ce7137f810e379c6b1c2b64c992518d3 frame00000604 +7a88c2300c1be68c5ba1684fdfa997cc frame00000605 +54f80d11d995697f425f5e27681ef8ce frame00000606 +4c84b6f320d59f4a19d552885e5bd8ba frame00000607 +134465d1270dfba26be5dd4cd4192a2d frame00000608 +c7ed542ec1c90e330dc79d1fff17806f frame00000609 +05c347cb5c741d64d59d00375132e5d4 frame00000610 +e30f20bbfde19b40d6fdfb72b3087f72 frame00000611 +a0e0b64fa83d090f9e0ce70ceb9efc44 frame00000612 +df757aacbf379c345d3a96a072325575 frame00000613 +6b535796ce18e1f20d21f97901621c52 frame00000614 +9c15697d809720888928c97127381cdc frame00000615 +132034cdee66aa691db6dcb892612fcc frame00000616 +e570625c7ec218324e91985c34bfe27c frame00000617 +4a34880c6f6eac9f703e8c353d3d8845 frame00000618 +4b019349d64dbb6ce85ffb0d0db0e58f frame00000619 +09564d0749b70465656468050b9dc8ef frame00000620 +3e0c909877914c320a864224c9af8cfa frame00000621 +2298afc5a96ae985579f76f49e12ddcd frame00000622 +0434beae7f8e54fa775af1cde9937343 frame00000623 +d4780d2cb8b51634f40eb4dcd8e1c822 frame00000624 +6e22f34208f3e87677e419c1b5892961 frame00000625 +46dbfa7b01ab6a8e7ff3cb9903aa9398 frame00000626 +c9b10012b45cceb27509fdce1603c474 frame00000627 +02efe303934e49c13ec2e81ffa735712 frame00000628 +907d9a859fcd2b4ffb663d77cca1f60b frame00000629 +a0376f9b8a2d0ce727a4294eac0cb539 frame00000630 +8931c6672aafb56a3c297f78ba4cdedf frame00000631 +e6a19b649c838b6adb0e80d0033dfe30 frame00000632 +c9c3917cc29f4536e2d7c6a34bc978d0 frame00000633 +0d1e8bf17013a6a2e5c0adc53e99ca7e frame00000634 +cc832458e3fa44d543f6d442583b7536 frame00000635 +b2ba00267f85d0ef5dee7e8438d95ade frame00000636 +4c9983c4e12faade482136d3696bb5c5 frame00000637 +2204fdd5f24dc12419e95407a0580a53 frame00000638 +a013afacc734ef75f901afd7c9dab608 frame00000639 +9a2c447a4f1ffbf61ab4b7e8f2a253f2 frame00000640 +3c468b611a52973ea628363f71123fc6 frame00000641 +2bc1f51c6a232fd814e907d793b22ac1 frame00000642 +811070d9ffd752c67a0c9947d2fa875b frame00000643 +3533361354d7fb74ec396f1627f5f585 frame00000644 +3d0583a5a14bf25225fd2c923c94c937 frame00000645 +8caf48501d4840a9f5c12a9bdd0b94a6 frame00000646 +7530c449398b0b68e8b55ecaa724aa8c frame00000647 +027d6fbecd9a261605751fccaa1b94cd frame00000648 +5e8e2367c041931d62cb42b43f5bf9a3 frame00000649 +8cc68bf5a5043800b584048df53d0409 frame00000650 +0d3234df3fdca1a41c78a2834b04b6ec frame00000651 +4c361ba44bd7b655767a7d58a4d89bc1 frame00000652 +61085d950c4c22ebd53a13540918e33b frame00000653 +296b8c3762da1e842ef014d69cad1ba3 frame00000654 +14cba3e030e48a4a578ca56c1df51ba6 frame00000655 +5ff9e4644de265391c43ced8a0154aad frame00000656 +6bf9e376f297cba12c5ea8095a1d6941 frame00000657 +d8b25b69ead65ee466ad9d038781361a frame00000658 +9651e62b17a421c2f33b7fba8558f776 frame00000659 +e362e42e75c32bfcfab8a262596181b2 frame00000660 +ff7f85a2c3a656a00ca39daaacd1cbbf frame00000661 +810a0feab5072c4a3d2bfe6f98d242f7 frame00000662 +69e17b89cd0606760c23d144339bcd47 frame00000663 +f2ed4c4f1763e706e29fbe58e98703fa frame00000664 +996f002caac0784842e0ac85769c4f7c frame00000665 +5a5ba2fe67d52a118e1d8b15c3b04c9f frame00000666 +13748c42a22e915313d4584f570500d1 frame00000667 +79ef68fb4086c8df400fae132e9b1c8a frame00000668 +4dd9ad186ea40e30c6fe42421b65b841 frame00000669 +1c0574f6d30fc8663a38b099d1e54b04 frame00000670 +da947038d3d48f5763530f418dd80846 frame00000671 +4572f6a82263e9248d4a182549930561 frame00000672 +bc2e914d6670568407ad91d8e2fe9281 frame00000673 +f56e61cf4ae5d1003521f53e33f7598a frame00000674 +421f076424ac58a1c3356e98bf034d03 frame00000675 +9ca16e68de7bb2f9dd3cdc320343c9a3 frame00000676 +2bdc142e6c4e8f522f8942e29481db16 frame00000677 +4038dcc3b1cd09e3ae182f91d3891e33 frame00000678 +22edf76da4b2668a16939bed157ddd9b frame00000679 +37a68f2173357fd28c9a0e843f5c1150 frame00000680 +2ed3469f721d4ba61f8f13704b0d2c9b frame00000681 +be09e203fac22de6f6b515bfaab70456 frame00000682 +09699ab78199465ef824c8acb49d11dd frame00000683 +532483e667ccb478507276de058b9208 frame00000684 +df3897c73fd87a5871a0894d3ac0027a frame00000685 +f064cdebb7821d2ed1d745378026f75f frame00000686 +d786f6f3c3be9584d0fe0b5811bb9190 frame00000687 +9467468f00256227feb67252a7dbe9fb frame00000688 +9e63aa9309a2243f431fce4250048a91 frame00000689 +ebbb5d3e482f5f7e37557d37e3254232 frame00000690 +88a9ffff31ce334868ff785b0a9ba493 frame00000691 +b1db5ee42016b95716c1ffbd92e6d749 frame00000692 +afcc4a88633fc12366ada210d029b2c7 frame00000693 +6a6383870015516627902dc6b03423ae frame00000694 +b9a95c130c90b5394b5ff1e43773df9e frame00000695 +2d75438d19fdb97dff44f0942881edd0 frame00000696 +740e454996013581f1a600dc89935d9b frame00000697 +7642dde052155644069db6723a7411b9 frame00000698 +e0288ff24d5ac8ce2a7348dae4cf7ede frame00000699 +af0e9e3fe15be29ca0afadcf44918ce8 frame00000700 +430f8db167ba01ff8fd0225f316b5ffe frame00000701 +9b36332807a664a8debffb44d5ed7824 frame00000702 +e3c4ded931f077518455cecc1be8c96d frame00000703 +d59774d074f98f549650d4b8d1106056 frame00000704 +2629aaeb8f904cf3dae22b43f7c044a6 frame00000705 +3e55cdf695f979ad0047a6c52bdeee64 frame00000706 +fe04ad5142fbae6b36b38e920c2c84d4 frame00000707 +8f958f93f2befd291793f229e24077d2 frame00000708 +ddd823a52eb234aec8b0ed8ed7497163 frame00000709 +485724da7167542e99174e127b11c21c frame00000710 +1c1944fe0673a48752b1b8614ea49da0 frame00000711 +37b74bec15a64836e3bfd8b0d75a80e2 frame00000712 +41b977eeed4fa962a7311f63e4038a1c frame00000713 +e8521fe2e87ac8714eee359b54ddf3e7 frame00000714 +5c2cf008cf53e2e56173555f5ac305dc frame00000715 +a47d3bd1bdaeb421b011bdca5aac9c64 frame00000716 +7963c2267982030e0b543a2f7d877adc frame00000717 +3e04249bd38b5db37f7a7b14713578f6 frame00000718 +604a066850d1f63ac813b72c95d33ece frame00000719 +e4bc7fe1fa2e94a014547b363a45e9e6 frame00000720 +b3f66cc541d8f17cb2384a3829d6a62e frame00000721 +9e0facde0d7dc2c130d18779d3abd31d frame00000722 +37865b9ea6ccf2c87cdecebe7c354d92 frame00000723 +de52283f28137a0dd3165c17f810eb66 frame00000724 +ba65a1d46b983851497d6326343ce890 frame00000725 +92c8d1ad3c5f3c0872e6fe8d7418ce9a frame00000726 +316857deed856c34d9c250c058f79249 frame00000727 +cbc1a66ec0fefc902fe36d43042c1625 frame00000728 +411291d6dccaac912c89eb6daa753650 frame00000729 +c8be68b4f1cb4fc454cb19843e8a7041 frame00000730 +e2752f2876f72fb6aa095fd950ef4ada frame00000731 +30cd10b033e29828611b071a22a9d0af frame00000732 +e484d7fe2f9b9ed441857f0796e98b95 frame00000733 +e29468d2274fa271218f058e1d4704c8 frame00000734 +c83e4fc11384caf9a166970b09276549 frame00000735 +0e816f8cb75c0bca127357197a89ff6a frame00000736 +96a07c9af86e647c31341a851b17dbb7 frame00000737 +9a2a6bf2f8c8b70960613a901609230e frame00000738 +3daff915612c1de6bb116a9312e12673 frame00000739 +ea440a3accaefbc7d7e03643d26ae5b3 frame00000740 +741d3cc37e87c2944d9e23b644836387 frame00000741 +5867b2f7ecea0e88706278798db4269c frame00000742 +6ea5e146863cbc9ba85f6efb5059a132 frame00000743 +48388c2984ec83752fe6d18e73447f6d frame00000744 +9bce784d22d741c862aaf17efb3cf867 frame00000745 +066a7d4770ac8bf5db7c555b3228e6a1 frame00000746 +416141a458805744dc6c17c3ae877374 frame00000747 +625dc960ea0a2687cc4e372e338b2e27 frame00000748 +178265fc53dfcac96aca8c66f0a6e09d frame00000749 +75e17dc4c002e84d71bca7dbdac57c96 frame00000750 +b994201813a1811b28de5aee8e8463a0 frame00000751 +012e5dbd04e6fdbc3ba26a027ba8e65e frame00000752 +26f229d7cb0af02facd6a743651f95bb frame00000753 +d3986357db97b64b7a0248ad5298eaf6 frame00000754 +919ac45849fadba8f9027f5d8723e34f frame00000755 +b04c1e6ea855d021104b1e60adf8676a frame00000756 +1c4c6c18cb061e0f7464a7bd6b342319 frame00000757 +29912e5f4f81fc41f2c6016ac457485a frame00000758 +a2b8967fb7222ec586b56886506ff800 frame00000759 +a8b4bb65cb738d8158e82775000c2ad2 frame00000760 +5b60074254946b15b7dcc0a2876d407c frame00000761 +7ccd4c59035909b7a232dc5ba17d2b1a frame00000762 +8e9e2856593b8a0b952086bd804c287c frame00000763 +4cb471587996580eb8facbb0e7a10706 frame00000764 +168749c27feac97341ae8bf23dcfdc35 frame00000765 +d4ecf4931e55062886872b2c60e77ed5 frame00000766 +738568553113a90ea90510dfcedf14e9 frame00000767 +04413167e7e39037ac33b6c316899bb5 frame00000768 +b0eafbf03e7e945f4522e08389ac92fe frame00000769 +21566ed616ccbc02e6063b6f55bfd5a6 frame00000770 +23e424f48c20f9b4842af5583d14e174 frame00000771 +28f8942e4c3f1f256cd7a6ef5310fb88 frame00000772 +543876bd52970ce9a6adddce9dca2ce1 frame00000773 +ca172346745c72e771ee9bded93dc0ac frame00000774 +dd4f3c403dab21839b3a5672ed302457 frame00000775 +0cc83366012d73daeca8952cc48759b0 frame00000776 +44392d84f96e1cec88c53d5ba172d26b frame00000777 +c44112d70127e390ccbf19348df6a12a frame00000778 +a4e3697b2939070342a8d3637caff90b frame00000779 +ba867664a4770d8fd0e0e52221a50b31 frame00000780 +13177ca5362cb365690468479ae2eadb frame00000781 +e9b38fe84b716ca6a3a736ecfe0e6ba6 frame00000782 +68346ddccd18b1929b659f034afc2025 frame00000783 +bf30cba3a5f0fd5ff5b4941787ab59f7 frame00000784 +392b071dd4a80ee0445dd1db9fb7369d frame00000785 +8dcd9d43eb2e869b06a7d465b045a03e frame00000786 +249d012dd516079ede7a03ca4973e2f9 frame00000787 +cd98a18d1c72b2cd6e04a4642391c7ce frame00000788 +033e46bcc8fa326cb68523876086ec3e frame00000789 +f208440ab77a4b17e88b99c6866860c4 frame00000790 +71b6680a89329401db129b6e64928d59 frame00000791 +180bc6c90f1d35d0c635c35b05824127 frame00000792 +af0b16c2a5a1a65fd8a03b37854164fe frame00000793 +686711fcfa2e68ac373e2adc374f9515 frame00000794 +234695c745041980f7fb1beb2391d78a frame00000795 +5790d49332dd83899183c5375ff7d7c1 frame00000796 +4f029daaafa954c4f314478fe77e893e frame00000797 +f245058f1db769d7e7e6c0f0764dccde frame00000798 +af6d04ed5aa22bc23662d93442f8cce6 frame00000799 +18259132bbf064e6d38e3c5f29b2740d frame00000800 +5bf6399614dbf4a7a691af1013da245e frame00000801 +fbc6364bc996ae537d34280eaf52245e frame00000802 +b3e14882b6cf20e668ff525e042ddaa8 frame00000803 +ae51b0e4ca0895cbf2e0f65e25d2c323 frame00000804 +5021d26ef9dd8e8d5ab2138acfa99197 frame00000805 +24e21cd1ed655fa8a65e50719e640094 frame00000806 +6ad0676e00dfbfdee04e5ee048c64da4 frame00000807 +f6bdd4b72b23cfb19fa8e147945c58bb frame00000808 +eb8e84060f1eccb886e08b76950faf95 frame00000809 +415b545e3ff0be0654c2065df30459c6 frame00000810 +a7a44f7ee7c70e08eb8f128b668a3718 frame00000811 +6ff9e498305dc420421f4a7102fa2356 frame00000812 +1939f10e45875dac53fd36ce9bd38c29 frame00000813 +b77aa297acd8c58d519b57435414ee9c frame00000814 +dc9b5a56426aa250e1337e4e6d6982b6 frame00000815 +166de15cf57b8d9f7bbc3111b0109b44 frame00000816 +7de724bd4d98321476236d81baa75b03 frame00000817 +4fb493eab62cfc328109158824fabd01 frame00000818 +078aed2dea3773dc1b6a481a338fe3d6 frame00000819 +856aeee64d9af52572602ace18f201fd frame00000820 +4781d9d48c5ec93d5b2ecee35eaf4c13 frame00000821 +24e8b2f1395db037b1bffe441c8ea3fc frame00000822 +f2d4e65770a0780ad34bd71609739251 frame00000823 +32e833a1a0be20a3ead60e448fb15d68 frame00000824 +ff43ff673a94748da2b68970bdf75b2d frame00000825 +d19fc8c9d73c3bc75f2f49225b3e54b3 frame00000826 +05e16882f8474a6c749c714c519ca8c5 frame00000827 +3cddece931c178f3b149390d4cf177c6 frame00000828 +b7190825056e9f5c7c969bdd1766c726 frame00000829 +adfe33c0303e881f5c44cddc0f4ac14e frame00000830 +78427c48e8761b19a62ee2ede93f955f frame00000831 +cf9f1181b2f2e1e529cd1c99bc10ce66 frame00000832 +ef16d4dbc88708a5613179e5a5521027 frame00000833 +621c37046cf4effcb184696f19f534b2 frame00000834 +2097b38468bd66809f95d8622c218928 frame00000835 +af08bbd996552ef91fe049413e91fe6a frame00000836 +231b27ee3ea6f3a5563b4266a38fa42f frame00000837 +cc54cd06eedb6f4b13b4c72d774993b5 frame00000838 +46200f537c283a5d43809d86e6b84fef frame00000839 +3aeffd2b61b5e072274cf348a4abd0d8 frame00000840 +22bd75d81eca67efbcb2287fe851d9b8 frame00000841 +f76cb4b5b830cd55555263aab7140022 frame00000842 +f25e3b5fd82246bbf8ba1ed33111bef9 frame00000843 +1075a5a401fd8c073a56246fec787ad7 frame00000844 +1c0257cd058ac60be6ca354fb97c09ab frame00000845 +cef7e2779bb243a544a699b9f357ea4a frame00000846 +a026abcf14e4798f889aa5db9bb950b7 frame00000847 +f90f32373209f4069f71605e2e2a6868 frame00000848 +3329b98e08719cf75c7f06cb7ae1e557 frame00000849 +4c4864d26b0258fdaf3a5ab2a7a2ac06 frame00000850 +1b6a2b2a454caaa51f2860b9d12bcf5f frame00000851 +d9c7bb44388a38fecd102954fa1f62f4 frame00000852 +309183158c794a19e9b5295e6fab86fc frame00000853 +2395cba926d312da61d908091de8274d frame00000854 +61d19b97470f3cff862e4747faf24ec5 frame00000855 +237ce8e6ed9e6e1c3e0df864f883234f frame00000856 +8bb0770475b131c1e7323bafac56b0f5 frame00000857 +5746e89167d703e9c2d3ba74fab5584e frame00000858 +f19efcdee0e52a0f9aee9c3f7a7c35c9 frame00000859 +74be3c350e4c080e359897f131bcc31d frame00000860 +e3a08258559fec5df09ec97b30349174 frame00000861 +201f5d2a5736fe49afd15e212c8f90ab frame00000862 +f3c13a910f9cba1d81cea86152dc0e17 frame00000863 +2ac4f513ad527bb9908276ae011efb15 frame00000864 +19e8e88635c88a9372844dd1cf67b1ea frame00000865 +08a58c66e592341bd5a06e5c0ecaf3f4 frame00000866 +361518672f64ef41f1e002276e4a5420 frame00000867 +2d58e1a4e21b0329a2cf02be3420e63f frame00000868 +5ae968a4c93ad13b36b5753c2e89ba0b frame00000869 +9cf67bf5d7aafd0911652a98b5e1a11c frame00000870 +f3d33f37e910518af38d35abae52577b frame00000871 +08205c6eca1255685c07eb7d23cf5aa8 frame00000872 +ef7e2e0fe93910791514b959d32eed29 frame00000873 +98e0ea30a2e5db6264399263f70f0160 frame00000874 +6b4c3255835a1e7a19b9d8a97e9e0aa2 frame00000875 +51501bf62d2ccb10bf23a1c294a1fbce frame00000876 +a01235e3454eca1197b2807cd0cf96e0 frame00000877 +177298fc289389b538956f44b5796fdb frame00000878 +3ffed0597248893e9ecc8fbaaef6d8c2 frame00000879 +fdf7766186741b3068ec068198ba8d61 frame00000880 +214f7ac12ccfb970a35033c7d9f5f96f frame00000881 +7d987429800651baca6d323182edf563 frame00000882 +01a1eff1fe87be971185d96c4ad4e257 frame00000883 +831552302f3ece6ec019ac552e76f91a frame00000884 +af902730c1588862552ba94cef7fedd7 frame00000885 +ac92a1ab94ac60a5a6d3a6ad259ba297 frame00000886 +b5368cd68889a18164a2b1a25b9fb3a7 frame00000887 +3fa90b1d7dc2ad6e9f68b35763d90f5b frame00000888 +d5d511b292cb065d43c62b961353f5c2 frame00000889 +005ac669bcebe9231993cf18c39b61b8 frame00000890 +5cddcfa82b52bda1deca74194cf42f63 frame00000891 +b77a57f7f5e62734b2d82eb5ad9046a7 frame00000892 +2fe35999a23df68421c3a3fcc433c61c frame00000893 +e1e848fe34c6d7d8fc3ac8b728a76072 frame00000894 +09ade195a062fb65a2e35588e0796869 frame00000895 +b08ea45b595dd776c822b198472cf072 frame00000896 +780e8891a2f2c5f82bfbfa819cf20ee5 frame00000897 +75791a63dc8da7f40f45661115f13042 frame00000898 +f811481053cb034546cd248912a1af79 frame00000899 +12f8263cf35144c0424250a2b0ca5281 frame00000900 +236c2ddcea2e420078d8f14c6d3de0f3 frame00000901 +332fdb59c534c624b8b2e7b390ecac8b frame00000902 +2e05435bc0bbe485411a7af058272d86 frame00000903 +3524a9e079f89dba67a3106d50300925 frame00000904 +d9434c11a9c796f9799d82d4f8f3e291 frame00000905 +caef4c0e40afd750ec3c0fb0620dc9b5 frame00000906 +74702a301812568b7dd6053d25da84f6 frame00000907 +97ec8a406f4ff290c936dcffccb8e49f frame00000908 +438c21095eaffba1c47786b9959871fc frame00000909 +e947a1c16215f709b775f9926e1c1124 frame00000910 +9e2056331a29992a1bc73a74f987326a frame00000911 +079312e3a42396e4a9bb6096949ab386 frame00000912 +afc51acd51e5c0884f34e830aeaa5fc4 frame00000913 +1479795ce598241a52c728fcd6ce5074 frame00000914 +c312c80d096099652064cd5064e9953a frame00000915 +ed9abbeb22c75db8639d19bd7a5f9b8c frame00000916 +6dd3158bbb41753721686dddf4bf6c42 frame00000917 +f09a20cbe8a8e5c1807163e499238dc3 frame00000918 +30795be4ac05af87bde014116e6587be frame00000919 +9e065bb622d52ec0dae8f4aa6134f530 frame00000920 +a6c5abced41826b931e6e0e94e3bba45 frame00000921 +0bc6961b17f12b7dc00c4b51797ebe1e frame00000922 +23a41d660b7798fcdb55df292a698b46 frame00000923 +8e43be82f34f20378aabc705bcd6a248 frame00000924 +3ce7956aa8316e1d2ea2b8cafb5d5f90 frame00000925 +207951cd6826b3899dec8baf268ca925 frame00000926 +09bff9685cb95815a2c7ae2125ca0210 frame00000927 +93838d50d52f7f3aec73deabfd6e9dfd frame00000928 +81b2bf2dae61905c0e8544dfd9ca6304 frame00000929 +0cd50ca6f57d133fe867353d174044aa frame00000930 +8f2c83c54707c74029ffb266d3381153 frame00000931 +421528559bb6bf39ddc187bf85859d8f frame00000932 +bc35e061ebc8a294502670c8e6d1ae16 frame00000933 +5fd4642ae290b540dfa36088fc5ec066 frame00000934 +0345203bb7f863f0537e8b584290d699 frame00000935 +229331e636cb7762f8be660dcaf1875d frame00000936 +9ab64ba2c873771596fab5696fbd16f9 frame00000937 +5ed5ade2e32bf1c184cc50c955e5b0e4 frame00000938 +fd17d7ae148e6e934f1c6e774cff900e frame00000939 +7e263b32009523ad39c4f97f57d184a8 frame00000940 +3248746195a96ff226777a3720cbc234 frame00000941 +2a51cdb07759de87a6259feb046655e6 frame00000942 +5561c38a046f7693469e3b160938ac06 frame00000943 +569f8c9b5b1223b5b7d9d6da96a0e770 frame00000944 +65054c90ead69270f4c72586fb3cbecb frame00000945 +efd8373e4ab247af5d9a35162edfcdf1 frame00000946 +2cf66730f412caa1d740905633229a30 frame00000947 +5c1f4f229c182bf4ae548e0ebcfb06a4 frame00000948 +aaf08940aa0ec7f1f0d6077f12993220 frame00000949 +9a04689d2024b9da64e558bafc39e2fe frame00000950 +4222733d5e2842899e1c7d25e0ead714 frame00000951 +071e56b0b0e47fc3038ea34329244ee5 frame00000952 +d9c1ac3034df71125068097ffff4492f frame00000953 +31f1e1a7c846828f1d41a18405a9ced8 frame00000954 +ff1291eb88d61cbbba26a5dc62f196d2 frame00000955 +4a5f2d422499e9e8b0571a2137cdcf58 frame00000956 +5a95fcd2c5dfafe69eae8317745aca4a frame00000957 +24a54127d0d6b781d693b75f8cee7506 frame00000958 +eaa7e04f65ad8cfcc8fdf5990ecda245 frame00000959 +067b6a3fe748e06bf68ef959b3bd036c frame00000960 +2d4d36522819709cbe2a54e092794efb frame00000961 +c657fb7ac13f53cf8a5cc585b6c4ad34 frame00000962 +98011f567225748329b58a52ce7f44a1 frame00000963 +8c25af722e95628f591997572a7637a2 frame00000964 +a204da15af6f5be7c6d9fbb2299ba200 frame00000965 +29783f1069633d5ded7e4e7f7132098a frame00000966 +dfb7f1430fe1e3ca5fadc7831c19ba3d frame00000967 +7573e6a8209ee48ee46399211e5b259b frame00000968 +220c765629134c67ed00417693174e92 frame00000969 +58db79853b46973a6c8d40d354adf4d2 frame00000970 +ebe11d4c91032206e152c855f374f1df frame00000971 +2a203118190a61c14179b95024625536 frame00000972 +ef583d5b9bab7ab023ce56154ee57b90 frame00000973 +b14c74af7b4ec0d42618c4d35378e5c3 frame00000974 +0b68ebc75bd4a428448a204adff851a8 frame00000975 +61d656027b86070f069541a7af59fc8d frame00000976 +81439be49d1c08b535dec0a95b18ced5 frame00000977 +486cded57b7c6c766ce7dd5776451ecf frame00000978 +ee8757303643dfdc5cfbdaad86150e55 frame00000979 +9d4c0a10c69d535439c1256052a80130 frame00000980 +eda8b2fb1b092c05dec7925f4d9f3fb7 frame00000981 +05958b7cff55111318738e6a3ca4481c frame00000982 +696b3b23d69e0ddb1a01dd19274282da frame00000983 +c8d33c841c5c4bb4833d1e16822b394b frame00000984 +77744b73b057d4398f12f9842a04554e frame00000985 +11eb2473aa9d65ae3af3daa8e69a0787 frame00000986 +31cb25be7df2878c630566b6b5c93397 frame00000987 +5b78ccd68b6e4180fa36c9c2fdcc3005 frame00000988 +087f1c1fd671ea3b5688a9ca94b214cc frame00000989 +06583a23650afedd2faba5f51ff5d28b frame00000990 +90c37c0c8153858a19c220e0a9a91515 frame00000991 +b0240affd4e62cbe861aa1c0d25376a2 frame00000992 +8d3baacb9c6f38379601a70bbc7735be frame00000993 +324fd532e1448e3821494e3d1c36078f frame00000994 +231dea25dfea2b5175c2ec25ffbad8cb frame00000995 +8850acf7fe5db1aea3dffee4d30a10c9 frame00000996 +d092217dcdbe7cb6a0d5936a8e275463 frame00000997 +22f444b266fe2614d8f2a790b67d21c3 frame00000998 +4d6421d61a3e7f2059d54dc56a5d7ee6 frame00000999 +d8ca16c27b93c7b389eb415376be7298 frame00001000 +3eb2530022917a00252ef410060a3a7a frame00001001 +c7190f3bc93c4ea27d228056c9801be1 frame00001002 +80e013e07efe48172264fe7b4906e6a6 frame00001003 +b7feb3e05e442b6582a9ec374882c839 frame00001004 +e6ebce8b776633746afb119f5c514688 frame00001005 +2b55580ed5a44fd061a4c76d7eba6764 frame00001006 +5535a252ccad57a64f5b265d5f2688d7 frame00001007 +e2a0c44167035ca79a8981be5daa1f86 frame00001008 +4c9ee60923e4ded2f38fd22ba9dbff01 frame00001009 +577fbabbca8fe06cd89fe3b543481575 frame00001010 +cc9c6d03bfa145f28de0ee6d81be8388 frame00001011 +04741432b14aaaccfb5b307a9ddc730a frame00001012 +9ee81d3df817c05e31437eb3872cf781 frame00001013 +dfc067eb540aed2ce165cfce6c3e9eef frame00001014 +6d161ec66bf98d427257e4472da224b6 frame00001015 +65cbcee57a1fce2f38f8b44acd630cb3 frame00001016 +7f07e8ed9d0cebbca2d194711b6b4e7a frame00001017 +52d2efb331e77a873ba0ce60ea356580 frame00001018 +be047abb43ef0c4fb6fc94166389833e frame00001019 +bc8b1d4accb6c265c7a760a42232afc2 frame00001020 +477b94e621ccdb9500d9c5575537bea7 frame00001021 +58c3aca402674a466dba49a7227beca8 frame00001022 +da04b0bddc1f388b7b64911205e852a7 frame00001023 +4a9433de44a17be1cdd0f1b923dc2f65 frame00001024 +35d1a31beda63ceaf01aba202463bba1 frame00001025 +6d0804992d913ba6d7d8b2ec928a6be4 frame00001026 +82385c40391a778f29d590ea0adc0fc2 frame00001027 +faa7ad253892bc351d45b0421c16c5c8 frame00001028 +e55f425808f2b3c7af37cc9e5743d900 frame00001029 +3ffedfb63d51d3ae3c5f4a1666991f06 frame00001030 +aa879be42f78825e0ab7941a463a8f88 frame00001031 +a872d05e47c0d62a506ed269abf5b748 frame00001032 +14826af4eee014fd29c09f4e20783e15 frame00001033 +19bab5571cb4f3d34363f1a472a01456 frame00001034 +3f3357fcc3a0c7b9da60f0f4cad3e0b2 frame00001035 +e5c6a073220fa770fe4ffa5f0a1e0bfd frame00001036 +d3a743cc88e3eb0ad8d120f80b20919e frame00001037 +f3456a59c0f3ff57c1116415a3f571a9 frame00001038 +e9c8c07a70c03fb83d490729817a294a frame00001039 +8b81f48e4249c187907eb1c99a6945b0 frame00001040 +65a75f4ec1969699d066c7865101188a frame00001041 +cb43710ccce0819b22a6ba6c392243fc frame00001042 +f35176869e794a5bf0537791efb4bb5a frame00001043 +43e432f28a71a27ab07eae3679eee450 frame00001044 +10b6529cd7b3edbce8a63d59316fbc79 frame00001045 +3a5c1950ff58bc523b21e0c8df2ab237 frame00001046 +917b32e2c805d7015c737049b2386535 frame00001047 +f2e731c7034cbc373aa57f67434955ae frame00001048 +043536cb51336d5adf6acbccc1b9b31a frame00001049 +098f8591523e2f0eab29eeae5cb3a0cc frame00001050 +204d67c83faa39c30ddb512b8f0206b9 frame00001051 +5c934d795569f04bc503507125dc589c frame00001052 +3bf6749d51544d005ab2ed5ea002bdfa frame00001053 +a94bff0f530a6e7d58ddc97e04c141ae frame00001054 +ead45fbc298a613996a88a9ee07a14a5 frame00001055 +5643ad1f14fe99247554d07ef00345d4 frame00001056 +ec1a4c7032f7af470c6cb6b28d88b42f frame00001057 +575b96824400f3819d485cb09cfa072b frame00001058 +cb88864bae8afb5265c9f675a23e16aa frame00001059 +25b0f11f0f93f58571873e8b60410436 frame00001060 +01a972e0a19c621cc818e984d44e63f1 frame00001061 +f0acff21dd159bfb10433b7b15dc0984 frame00001062 +0db8b0fe9974be2c76181cbc308a1099 frame00001063 +d07bbd20fda949fe403436bcc476f607 frame00001064 +b26e3583405427ff61282110526836a4 frame00001065 +829db4eb5001d9a4d8f67275aeb3a1f1 frame00001066 +436811f6cbbae986d8523676a4e518ae frame00001067 +50abcf69e362a031b2a25d63a48ff849 frame00001068 +8552d1e37b44fc7650f4b911aa8a91ab frame00001069 +a1122086d8b8f092c3694a5bfaddb2d9 frame00001070 +37135d315840055c2e89eaf188e4c907 frame00001071 +c4ed42a3f522514039f0a5257ba1185d frame00001072 +a81fb5067161237ad135a4a111ba6498 frame00001073 +42335876481c55e9074633ffde2aecda frame00001074 +e037a1ccd62a93fe7911a52424604551 frame00001075 +c24d85e452f746d24d32c8e90f1eeccd frame00001076 +f5e6f142c0a269acff60fc93df14c375 frame00001077 +ede5c5377dcd0ac2588b47d440935060 frame00001078 +4e59e17a0d60905b02f6d6c63969a76d frame00001079 +b5ed2f9942627d74942297c5e639de10 frame00001080 +38da4178c173878ee0c2bb6d47e061e3 frame00001081 +a08e9226005d0d6233a1c30c31d2fab5 frame00001082 +61e04186e2032d4d10278772b09221cc frame00001083 +3f0f9798734af0d4fd678cb2b34de8d7 frame00001084 +5bf395fbdf4457c6aa3b9e69fb4cc3e2 frame00001085 +5a753e97ab0debc8ea31d793b861435c frame00001086 +2b4eaf511f7f1206f2305c42c3f72766 frame00001087 +2ff5960caa8058c7fab9cd6bd2c5cd0f frame00001088 +9ecbd9b728283c3980761bba0e3fd62e frame00001089 +ed4e9c367964356fe83231b21c11c6f7 frame00001090 +6e38fa1bfd914ead1afc78e7447d1856 frame00001091 +7cc36447fb22ee1d06b38b88efd35fc1 frame00001092 +043aff108f1de4aa49245c345d8bef49 frame00001093 +3acfaa73881d075f1b6d33a644112ac3 frame00001094 +4061127215a74ff31934b56ecdf46dc7 frame00001095 +d67b68f3fb64b8482e9c6636e68de49d frame00001096 +b8a7399b8326dff9a76e3e43f5fc718e frame00001097 +0e2c057c7c10fe8fc58a36a0a4a3c9f7 frame00001098 +434fbff96ebd125860a480730b7e89b6 frame00001099 +527d8040bd0aae87d140432653c5d726 frame00001100 +40b2f053428cf4665fbbd418d5a77be5 frame00001101 +c0cacb11a27792a0e46072c0fafdb889 frame00001102 +1d4649589a75ac928ba12f007cb02fbf frame00001103 +35a68e7c3b953dd427569974d3d21b28 frame00001104 +a5ea5e9e7e8d708992319154affcf8bd frame00001105 +c0820406589b840bc3613a6e14fab6b3 frame00001106 +da394e114faee9de5b2833bbff0dbe83 frame00001107 +ffbdc38bf0dca06345e65aa667ac6802 frame00001108 +d760ecc7fec15165b9e4e731dee4aa4e frame00001109 +730e509049bba395740795efb1d62080 frame00001110 +0de6bdc47054c33ae685b0b4cfc90cda frame00001111 +1869e6632ce8bad77775082fa4f44914 frame00001112 +7538c0461a529611ff9d785055ef5509 frame00001113 +72877df4651e65e9103197fea5f2e122 frame00001114 +0e6b6e9d96fbeef2bb6bba0a7055cfd9 frame00001115 +e75a7add0195e8b916748ccd8ad92a61 frame00001116 +48c19728abc93cf2c9e6ed8f0835c36b frame00001117 +77373b8437d24e0bd709dd69ca853e31 frame00001118 +247a27bde7bcccc0dcf28355ee859540 frame00001119 +a1e5f1f5f99e0882fb183281ab991835 frame00001120 +2e8f52c1aa50b0c129b6db91459f7b80 frame00001121 +a6e616c8ed7a04a18609c8075874e1d8 frame00001122 +7b1112e4d2dec23c300753a1791eb82b frame00001123 +93260b1a7d617b4f5ae804c048d980f0 frame00001124 +7aad710b6dd86767fd9da3f272b5060c frame00001125 +c7bf9f238e4311d920894fb445485738 frame00001126 +379dd47b8151d42557d4b005f9c18a06 frame00001127 +64e9b0fc0839fdf88c50e3437bbb2367 frame00001128 +da386707bcbbee22df637ece2aa81479 frame00001129 +4e0ca316bd6afdc3cb421e5aebf79028 frame00001130 +23cd306e11cbe51737134b8bf13dfee3 frame00001131 +754ccb04fa6a287525c9706bc124510f frame00001132 +a945c8e27175bbd42e26df4c133f9c39 frame00001133 +b7a912f2f192dec9720c7604e7d25fac frame00001134 +123aa13b3e87e540811537ded355cda7 frame00001135 +3ef5ccbe1b00f81513c4aac562fe5e60 frame00001136 +d3741f49c8507e4c4234bae654cbabc5 frame00001137 +98678708a8583dbfdeace706eb632482 frame00001138 +61ddd3f75fd37b1aa49cab8f6883617e frame00001139 +288fd051f0e2cb11ad5f8e18654776e4 frame00001140 +d9cd29ef6a73fc0aead8f189fc379d26 frame00001141 +dd8a5066453e33394444224b71f464b3 frame00001142 +ba3fafd4a19f3ff8f238ae3248884184 frame00001143 +570d5ebb3905b43b955bdcce7cdd2db5 frame00001144 +430c68eec7ea30ebfeb8d3231052e40b frame00001145 +12cda1470c8aeb99ea274a628a332f56 frame00001146 +fe8c2650565bc231bcd92426af96de6d frame00001147 +74560673d529cf1f7703b657d7dd5f9f frame00001148 +8565ac606969ed80a5d2dd3239410556 frame00001149 +6114cd1796768a64584c286cf75ff2b1 frame00001150 +48e3d852046f0ede439e0f402511135c frame00001151 +5fafb625788b27569044012dc0a6934b frame00001152 +2d5bd9b6d04188719caff770f15a940a frame00001153 +0d5fa4a317f8075f2a55a6aa5fac3cf6 frame00001154 +1c81fd69fc3e1dc246c6ece40154c39f frame00001155 +d2c832d2a56a3720318ac11c7420563d frame00001156 +bbe5c54a335ec131e579182857929537 frame00001157 +a4ab4619d281ee9a6808199360259850 frame00001158 +2ca7d20ff683a24f8cde10503c535150 frame00001159 +5f26b24555f5021b6939ebbd6805cb50 frame00001160 +bc952b132b65ed067deed71e75118e24 frame00001161 +6048820577c92128bb00dd9a8086dcd4 frame00001162 +9dda01a1bb1750fe3b060ca2ad5d8340 frame00001163 +a80eed25933363c2438eac3d10dcdaa6 frame00001164 +1531531bcf36c6d134138315db6990a7 frame00001165 +6d1a92250c5633d218b981f9d18ff302 frame00001166 +470a9613359039592e97755d9644653f frame00001167 +68b372cee327373c73dad7f2aaee6065 frame00001168 +80b215fbe45fe4aec8e221f220e5d34f frame00001169 +fba50b8ff4566a81f6d980db6cadf7bd frame00001170 +5dde3f83fd80c42c2ca198bab2a4def9 frame00001171 +d1cf7e265a72b2b40762020d708d2a61 frame00001172 +eba90b352adf732fe337966fefebb976 frame00001173 +a0eb192a4310ff8269cd98266fda668e frame00001174 +f4c0de64c2c0a658739b78494e391bcf frame00001175 +4ce3c226685895535e8bdd6214f49cf0 frame00001176 +92a7bef32bbf2d61c92ab8279ce92838 frame00001177 +85d04f4f37782b0afb3df57d52a775c9 frame00001178 +7d8fe48a68c64cd3cccfe84daa5b4bc7 frame00001179 +f84905dac5d0ccb3fca25a7f1bbb230c frame00001180 +2325ab53a851396f1881cb1e55865f39 frame00001181 +7acbb619b5c1c6981a530107253e3f59 frame00001182 +a55c28f3e28fd109a3c67fb12a39c75a frame00001183 +e64fbd356ac6c24e512de4a648ed7a96 frame00001184 +24e4c0de89ae83c11820c2460e38e355 frame00001185 +0109b9983c91b2ee2600538772b94055 frame00001186 +45af15e901c29e34495d3d9b2f944c8d frame00001187 +bcae9e939b84b7434de599f02bce9301 frame00001188 +2ae8a495bf4d6b13aba54ef61c41f9aa frame00001189 +b9e36056aedbe3f01acbefdac45f7856 frame00001190 +0446ea4987c87fa16b2d86bbc49db3e4 frame00001191 +a94b02049cf73efa34d667be44bf29f3 frame00001192 +76f66b218e47d5586a82712b7d6bbeeb frame00001193 +1df9162e94786e67a390147718cdafac frame00001194 +e2a5453b5bd4c8b0697986f38d88e9d2 frame00001195 +a59fb3acc27b43845d10f5fbb3cb64c1 frame00001196 +748c240ad59d862abddc5eaba7896823 frame00001197 +203cd9a12f7d9ee5ccaefa213d4c12ab frame00001198 +c64db47ce92505c52882dc4e34cf58e0 frame00001199 +9ab15e725c35bc9e9bc690fde0ccbc15 frame00001200 +4bafd158bec1ea6418e5c24d19bace32 frame00001201 +0e029e8df2adcca365d275f3b94ad329 frame00001202 +60fa40db90b8fdfe33fa7e8aebe3fdfb frame00001203 +5207d50db8cb069ba683fdfac9142223 frame00001204 +c0925a0bc81f8e638544997d07f739ff frame00001205 +9db2e2c0ce36df7ea5edabe619a69d44 frame00001206 +96baaaaec35350cbe35164a78f3a2181 frame00001207 +fb065db9a83b5575eb5faaa5482b8ce6 frame00001208 +c7998944c74754eb1b91b7933249493f frame00001209 +9090c485771a9dbe83beed5a101761ad frame00001210 +01738c5debb87ee35d07a20bd6ab0736 frame00001211 +5534169848c5e8ecb66f247641004831 frame00001212 +522b1ef2496f163933c69bbad1ba7820 frame00001213 +b0b8a147fac76ec1bbcda38bdff47a6b frame00001214 +985515011521f4ee45a711f87f097571 frame00001215 +3d02914f1ee8600c26837a175af39235 frame00001216 +fca43506e1a07a98604a8a6325b4d48e frame00001217 +a8805ca4aba7a0b0cdce286de78be2ac frame00001218 +bbdef9df96ff9758bcf86c6d6269aa30 frame00001219 +693b6357dbec87cca7438bde98d7a4ef frame00001220 +32d94d37b3a415f9e830b7ca0dcc61e0 frame00001221 +f3db3b63bf9920859a7ee261a01391bf frame00001222 +5c329fd68276004dc92dc5406bf565ac frame00001223 +385c8e237680a2cc6abf4978a050fcd6 frame00001224 +c8e7f11bdae80d9c11884212a536150f frame00001225 +5ac0970aad1ada919eacc5397b8cff03 frame00001226 +d1ba7c7d94afaaba214e401fb6b393f4 frame00001227 +355f00fbf2f634069d37d2b32d41bf8e frame00001228 +fb5ba99f93de7ca565ff83ef5362ea9b frame00001229 +510feae6304a8c4559700e9ab0e50d55 frame00001230 +4b4ea618bbeaab01c504aedb00245e5c frame00001231 +d964228cf996eeeee0772f60e840a49e frame00001232 +2dfa84747075c8a414a781a44ac54572 frame00001233 +0eb0311b22936ca4d2bc4b389453ede2 frame00001234 +6c2245c29712988b4d63578f9fe8fb9a frame00001235 +ffee41f9e74f1bb1f29c5a131e7dffc0 frame00001236 +c61b5af547099132b7daf00fa64e1047 frame00001237 +31f79eb1148bc1e72dd51a7f628055f1 frame00001238 +de14dea37b3f436de31ceec0c9e3aea9 frame00001239 +422c64592431f0586880cb35bf06d3f2 frame00001240 +5e3c8c6dffd1d06afc4c643d5e4ae1d7 frame00001241 +f70f88384b4100e291d32c6a79cd1b22 frame00001242 +e7b3448179726dad75f272171cf07af4 frame00001243 +21285f74f00e13b3688b1575dd03050e frame00001244 +2e4449dad468c22a3e73bd1f51e0a67d frame00001245 +7123f58e7507bb9d3e08c3e35a0d56e8 frame00001246 +88f61d85f214ed109ba7328ade8c03ea frame00001247 +17d738f977a3913145ed11820e5ce82c frame00001248 +978ab79dc6d0e433489bad2543998a83 frame00001249 +f24d0612a418408785d1608a51c8225e frame00001250 +e13d4982ae67e02320b26196ca770357 frame00001251 +e77888dae81bd40a9fa4ac5fcf5c1850 frame00001252 +87a5b70874e59e3edf3b027b29aebf8d frame00001253 +26aadee1afea62ee4096021a3f9197c7 frame00001254 +6d2da5613d8fcb04fe12bc1daf08ec19 frame00001255 +04d04615e98e9104f2de11dd7d67e93e frame00001256 +6bc3414c8427eae7eb1f6d47eb67b8f2 frame00001257 +516276c44ca1971ef87d3488a775ceb1 frame00001258 +8ce57b88cc2ea4b9f5f7ae4226f210c6 frame00001259 +9345547e9d1a279f34cb1b12c99b9667 frame00001260 +7a31d372a135e365a6f0f702f4072185 frame00001261 +a5092c9a1f0cc572620e4052c1d1bf08 frame00001262 +a111a1bc11eae960d81a32e9b6118544 frame00001263 +2743ea1c2116c1f16801e4224517e64d frame00001264 +63c65bfdfd6ead073a60c3742da7347a frame00001265 +61ba5a637bc3ecde020280ffa42f6912 frame00001266 +1bee2a0aad57170eafaf8313341672c2 frame00001267 +39f80e4d29e66177e469e8c41f749565 frame00001268 +56499a9535ecc66bcc07a1e6f898acb8 frame00001269 +41e50bf85212c1e4c2bc0183829f379c frame00001270 +97e931dee3c965fb4a326aa101ab809a frame00001271 +9c331abf4e97cc332e16630560cf65d9 frame00001272 +379eb49d910f90569958432ac33198f2 frame00001273 +e224b2c18ee73dd74428be803a98f208 frame00001274 +1aa568d9665e8e177c31fd32aaa69028 frame00001275 +e367f183923e642245efcc5d8e5247d2 frame00001276 +bf1ad28ef2a8f28ab51a68dfea1d328d frame00001277 +19c7a970b5dcff4c0492e2e0398c17f4 frame00001278 +255fd5c4f2ade3a165476897e8d52002 frame00001279 +a75f293c1d1bacbed36dd13efb509d01 frame00001280 +42d96d156c1d54e0bca785b3f39ec126 frame00001281 +8a196627e21f0c14ec4682333e218995 frame00001282 +4b0e98d83ca7272e1833aeddf1beff59 frame00001283 +748403f5e6c7b7f55410d60fbfd8805a frame00001284 +8ec928b6cebe7dbb137effe7f76d2e2c frame00001285 +392c70e08b420087ad87014405bfc380 frame00001286 +09d7f51366a1617280f90927c68d866b frame00001287 +185efdfb90533afcd9a55632ba7d0692 frame00001288 +c1622ee3d38f1e740082ff1872a36f7e frame00001289 +86da83850bba6a14023301cf110f47df frame00001290 +937324115cdacb46f281b79561dea8c9 frame00001291 +b3afda521264b6cda21305d7b90a34ef frame00001292 +1d8dfc5c2e29f50750a86bbf18c334ce frame00001293 +b2a3aab5f03f984235b68233c86da154 frame00001294 +59f85c4b3edb54652533e339c78c04d3 frame00001295 +c296720b49669e4fcba7624de049a249 frame00001296 +a81f5048204e0b498819366dda44bf9c frame00001297 +96d00393f63127cf6cf6281fb4cd7486 frame00001298 +511837f3681f8daee3b6cc7c8512c674 frame00001299 +a5e9cc8b70b45abb398f2bb724b6ae82 frame00001300 +77d993af1d33ff42b7893f4384b98cff frame00001301 +6b695ed5d6ce12c8b312f2ea7436b9e9 frame00001302 +437830bfc9d988d72afb052aa89e60a8 frame00001303 +916c41e001b2a958fa6efce3ceda295c frame00001304 +89c20227e8b47c96ee42b9483f2c4ef8 frame00001305 +61a7c70d72d0cd29286862c7d66fd740 frame00001306 +bf5488e02201d9f89b6fda7a9a179ddf frame00001307 +cb5c5ddd5bd0c4ee4505d1228ad6761a frame00001308 +211b033c42b7fdef359df31ae845b609 frame00001309 +6d7dde6e931e73f9ceb5e01847b4c131 frame00001310 +154805f370da0c50c3d143422e413e24 frame00001311 +83f992018fb5386eb9d361020e6d9611 frame00001312 +5574012bba8f9385ddb8cb2f3e0665a4 frame00001313 +c2082b7b66f816e93b6a0b515197d601 frame00001314 +0a759e21e2eeb29cd07de08948591bbb frame00001315 +417098882a48937fc4993753cd938124 frame00001316 +83310fcd0faea11ab744f29b5d27cbac frame00001317 +fcead29d3f024da6987aea7efef2b9a1 frame00001318 +fa6bff5b73b1b0fd86f880eb91149af9 frame00001319 +9f4cc2e0ce75408f459f9ae185b276b7 frame00001320 +8d1aa3d7bb1c73e2f9fcf5f9e2a9726a frame00001321 +3476d94a68dd5713b7ef32a82649bcdb frame00001322 +c0c365e3e2c2bb3d813b7f67c034b0b7 frame00001323 +fbadb23926be6af608dc3e5d45d56b9d frame00001324 +2faa80af8b976e255d837e3689358c02 frame00001325 +366508de8376d45b7f6820174bab21e6 frame00001326 +f472b589e57da8b6e5e67b354a5810ce frame00001327 +021c05b30623318a6edbc182a05f61ce frame00001328 +90f8076a3e8308571c517689960c32a3 frame00001329 +bcde132e5b43b43c2415b8060a29fd28 frame00001330 +3b6a9ad78674a01abd9edd5548c85f59 frame00001331 +6a11419104f93a263de5680d5c3fe294 frame00001332 +f2304a69c893156e4675258ece31d0ea frame00001333 +65e5ee2bf3b60a1ac9113478f36e86b4 frame00001334 +de0cc568f5eb065f1b85676acbab6db8 frame00001335 +c2a7da7573bdd49a85cd19daefcbec9f frame00001336 +7ddfc415db444fe7cd4f33470ec89112 frame00001337 +aa9472e0db33c2d538d2c7dd8c090abe frame00001338 +e6db32c7eb9d05db1d205e84ab4d598d frame00001339 +65999910eaa62216171ec27e80b37d3c frame00001340 +deb35ca1ff7740ad4fbbed5d87e28633 frame00001341 +b74451831e323ce3f9d44a2b42b4454f frame00001342 +274494719e88d2795f5971f16bf9c6a5 frame00001343 +e771a5ec7627a9c76402019d88abc0e0 frame00001344 +368e35da481377eb90b6552ca468b29e frame00001345 +395457d5c9036bf9090edef96694001d frame00001346 +ee9c14630384a414f627cf4275bb8ed1 frame00001347 +6c8c274092ae0afe00431dca1bcf3dcd frame00001348 +11878bd7b1f6f0db95e81a4bd6db91b6 frame00001349 +0e8b0f243d2e36578a1185834a0fbd35 frame00001350 +23d2e5792f981007deb6987c766362cc frame00001351 +b2978b20a1d4076176a723f90d2371d6 frame00001352 +3e8264c60fce98fe75b92f24617e8b66 frame00001353 +21aae22632551d81f5f05240915afa29 frame00001354 +08889a316a31c3457d0122252fbd8580 frame00001355 +fb9dbb5bdf1be3ab4960aa977cf0bf36 frame00001356 +13c5052b4848f0239e9e434efe464aa9 frame00001357 +c63a4ace12aed2785493f16fbb9772e7 frame00001358 +6655aac5e4b91bca68b731fda874dc80 frame00001359 +46bb67ee76990a6cbf395a846754995a frame00001360 +cd15ece203a85707120006159b8e3f20 frame00001361 +5dbd234e56156f2787c4a088810c0c1f frame00001362 +6377d7a863dc648da0fc94f8f203efe0 frame00001363 +f2f3a74cd96c1ba074d9c2f3e3c77b09 frame00001364 +ca928fd33b26087c7bc7496896be45d8 frame00001365 +fa7aa0b5134218b1fb3fa30edcebc54c frame00001366 +e47404854d7c6e05b658d6cdb7396933 frame00001367 +1f9011b1b9f1e076846f5bd943f794e7 frame00001368 +9107dbe122b45a167e06ac94b45eb8b4 frame00001369 +51ba0d5bce03f6d78320f0c2d41e59ab frame00001370 +74f3858abd2ecef88b5f5c0a3e4b97bd frame00001371 +12191459a8882a7cf4dd50298920f4f7 frame00001372 +db3ac1e874bc028de7583584e1e0fbf0 frame00001373 +ca20d84e4a0a77f4922ba59a08094f2e frame00001374 +9f1d80b4e53232a2036f045b651301d5 frame00001375 +b8e838be6442628d4fca4627297fa426 frame00001376 +39716d85203747bc380b890cb8ff9bd8 frame00001377 +dd6feb46d7bb9687fb86ff1b8585a881 frame00001378 +99310b8b9108d2803b92e816672bad00 frame00001379 +10b81f5d2e1992e4cc1bdfbb10ca19e6 frame00001380 +1528be910bcca7b4cd4aa0b9c3297561 frame00001381 +9ead7922a7bc82e2af7d0febc678fcbd frame00001382 +b453c9af8eeb840c7ab367c22d2781a7 frame00001383 +9af13c846f8e8728ed6b3ed8a6fd58be frame00001384 +a09f3b5290596f4cda5d96415110832e frame00001385 +e01f3c4c529c9035412f00cb7f2adcc4 frame00001386 +5440b25e10e2d48dd790b18abf1867f4 frame00001387 +213fc10cf460c45a6eff7ebee0d53ef4 frame00001388 +d20a58a1ad87bb02e5e5ef0bd7bc0bf6 frame00001389 +fea415cc319fff268d0c810f4e09a6f0 frame00001390 +fe7016c57c07bef7a2f62dee2d94061b frame00001391 +3b2e92d9b2baa7c685f2007a32e36a89 frame00001392 +c442baf74dae2c54779972282ff9c100 frame00001393 +c70bfd3a1ffe80ec6c272b628d196d74 frame00001394 +a24c171637aae2218170d1602edc3477 frame00001395 +5f6b9cfb94122cc4d84fe46159345918 frame00001396 +c445f8a24649e2a27780e22caf8e921a frame00001397 +804cdc10f63cab0a83a20d4faeceb532 frame00001398 +06d6f7b4073775481f05d42ba824f645 frame00001399 +50324a629426a5039b04ddbd0cb679f8 frame00001400 +ea45c95dfee0595fdaccf5dd7861be13 frame00001401 +339742852f59ddefa19e52d3bafe4b56 frame00001402 +a678c099eb947f531785feae4e2b41d4 frame00001403 +86c135f8204352fe6b1a6ce404139fe5 frame00001404 +2fe5dfdd7d5de88eb77a883d3adbebb1 frame00001405 +6caec95103cf1d8efb83eba5fe152f38 frame00001406 +1b093878f14b394d02b3c9e66aaf7c83 frame00001407 +e042653a8b4db8616857c266c70cc9aa frame00001408 +50e31875447126c11fa6460b81c91b18 frame00001409 +b1b4a185a6c190ffa20c8e94636926b0 frame00001410 +5d4da6a553fb063bb7006736c7574b7f frame00001411 +b0971d674ca9756ab8eafa8c71fad4f8 frame00001412 +d0dcf7bc1a1c9879d20b408048f070d8 frame00001413 +997720a6b1851fdacd8850966b8a6bf8 frame00001414 +7d2e3f4088bd7ea99264c13868307651 frame00001415 +dec5eff408fbdfd9b6e8685045d35620 frame00001416 +ad7abb6c2068f32e9cfa17c347d3b24e frame00001417 +faa57abd11c3fab2a8b592f0ba3e13e2 frame00001418 +282ac03a52933faa01e7e218b3edec9f frame00001419 +c962129542c40731e40ac2d6889b9c98 frame00001420 +49687335e1272892be74787b00e61518 frame00001421 +656a40fea98f4a344f26810e1af48cc1 frame00001422 +1792a9e0f084328c1c8fbfccf15eacd8 frame00001423 +4710e16ce08ef34b0a56c19efbc8f6a8 frame00001424 +de2baba75784c38c255f7221682bc901 frame00001425 +79fba5f50502af443e978ab0ce23fd3c frame00001426 +020221afcaf437575545065b3029efd8 frame00001427 +9f932ec5e9d191a002a62dd141fffcd5 frame00001428 +16dfc468ac254965dce7991c7c8cd1c9 frame00001429 +685071cdc86ad9e706bbbb98c574dd43 frame00001430 +a111e05dafb1403cc5d6e40c184dd3f8 frame00001431 +988aea7fc8b814f62eb7b27cd1b1b967 frame00001432 +053a67c9a2a28d182ac1a6e2f9b64958 frame00001433 +76a6ac57da6e98b0ea81e8afe4304ef0 frame00001434 +6124870c0e20aa94b9969f98cf600996 frame00001435 +3280f6c31a8eed7ad9d10bcbb9392c8f frame00001436 +10e93e2d0815cb53ca8c4565798510a7 frame00001437 +d2f14b7f1c9af86404da60d6ff45c36c frame00001438 +b0c1217274cff1f2a4f9d276448c5cb7 frame00001439 +27e1a42a86e2d0fb0546d9495fad8d79 frame00001440 +81acf9f5f8a12e770174af6b99690afe frame00001441 +b38d945756e898e35191e325768a4b28 frame00001442 +0a82b441f0853f467f4b7cf15311bc94 frame00001443 +4dd59345a9c825b0eb6fc4c8d54b22c5 frame00001444 +d2e20dbb10b27e896f40f32f9edc1071 frame00001445 +d786390e592d87ba245b55a86670fbbc frame00001446 +f38a46b57ce105b63233df2118d55b94 frame00001447 +b7386561c41ef591d869aebafb7af61c frame00001448 +ce229f03a4741cd36a89c0202a3d88b2 frame00001449 +1b50d662e3d323bec8b164f7766cbf36 frame00001450 +7d9f2058f83b368c2fc6588c40a7cc1a frame00001451 +eb03b8bca0b7967b89e466e2a1aba058 frame00001452 +811e4773693e273fd8a3aee88d6428e3 frame00001453 +f9013841ee1a03021f90afaa264e543e frame00001454 +55b0ae8e79e1c19ef7e51be233f5c125 frame00001455 +8ebebd8c0ce1d7e238d8027811ea603c frame00001456 +bee6398ccc96188bd94927f35f74cfa3 frame00001457 +b02df38376967b1bed66445eaa533173 frame00001458 +da75c8807ff1bcd59e359c773eec673f frame00001459 +f0445424d8fbb76117cd3392164b5e2f frame00001460 +06b81d92bf9f3fa00d20899a65c028d6 frame00001461 +ef0ca490e7775b693096880b521cefe9 frame00001462 +7deb358fd94fb7cbcc5e81cd1af19e69 frame00001463 +ce4908bd16c3cbae326b1f5d804b2776 frame00001464 +9fb91298b776c190e93beafcf9a11d67 frame00001465 +4e7585ef9ab9d258344a0996b095f3e5 frame00001466 +47e8e01790a037f938dcfaa1a518a72e frame00001467 +95b2f8722c710ddfe35f4e4236f1204e frame00001468 +6483728b2d2dfb739bd641449e734190 frame00001469 +be4b4f0c240499b43f5afdd3af41f2ce frame00001470 +72b68bd09e56d2678d6e9395e485408f frame00001471 +f95411ba509a23fcf1da310296190f06 frame00001472 +11df99033669d91b0881fcb171cbcf0d frame00001473 +8d19727670dcdf0bbf0016caf8782535 frame00001474 +cabb7b276f71adcd0e09660fef3f0a0f frame00001475 +9ab12917a6d61d9f92f97ec7da1e9b75 frame00001476 +b79402183cd3f3993144874f31b899a7 frame00001477 +fa5a410f51a3e683d4100375934afac2 frame00001478 +2b2ecdcbdd2397a6590022ff73b9ace6 frame00001479 +e7064406e5e9d008027a3a50f4d36984 frame00001480 +03944517c02aec1f3f55b36dd9ccea0a frame00001481 +7c1a680502f93d2b40f5f84818d6a395 frame00001482 +1db0926b32b97c14c3c633f149db2ddd frame00001483 +9331e820b0c3cb88c38ae57735e0e11e frame00001484 +cb85e08a88b25c51821438a7f17aef5d frame00001485 +5a83ff8034e2b10a151c37935644498c frame00001486 +06b1d3bc9bc1f7f18e10770fa3b1e6a7 frame00001487 +0033ec3be1a8af7101104fc8577bc47e frame00001488 +127f5a0b46f6f5d6615b0f9046b2cd62 frame00001489 +fd0b17e09c3019e914967f8c492487f4 frame00001490 +54de4afed5031dd0e8df24d03b2207c7 frame00001491 +2b1545b91a956d7a19039b8e5e01d0e2 frame00001492 +693faf67257cc0c0d2bada6b29258bb4 frame00001493 +2c3563dc5ecd68ad60a4c1b4304101dd frame00001494 +61289ebe1a2a1e42070ca7a7d09c62df frame00001495 +45c59326c11c6a0c010f62783f6c93ba frame00001496 +65a44ae36a35d3d3c3674abfc142870f frame00001497 +b9029828976b1cf8f7f63b1f3ea9e1f0 frame00001498 +1b465de22e39b33692fd714a06d4c4fd frame00001499 +ed83ec02b7c37e49fcf1e5f0f687bf78 frame00001500 +712b09e6d7ae22b0b21cd737be906415 frame00001501 +c6b3d187ea0b26e4c87cbf1677e969e4 frame00001502 +0e0fd192ae9dee8a0f46e76cfc70d313 frame00001503 +fa90b47b23eb0d0c056fd597cea356b6 frame00001504 +89da0c05cf586dd93056d4c723f4a009 frame00001505 +2545c26f8210aa9b2ce9db36dcb1982d frame00001506 +83f03f7251db8260f231926d905c29a2 frame00001507 +30879ffb79fc2bf2d93de91d8855bb06 frame00001508 +169001393f80ff497a83bc04fdc13ff1 frame00001509 +494675eae8590532abbceb81b958577d frame00001510 +56ae8cad3937429f81af007070e3f2f4 frame00001511 +1eb54f8f7df8fd672418274523c99257 frame00001512 +b37ea038184652c4d355cee149e990e7 frame00001513 +8930302e35df586fca5c8d6acb46905f frame00001514 +d190cbc97b0b30fba5d639925303e256 frame00001515 +29bd3f87ad20a76aef38c3ad4a2e37db frame00001516 +e4c1596b34a47f978536faf88a534c10 frame00001517 +84260507df2270a0be9a8e534d4670ca frame00001518 +556c8ba64c8683709b3d9affe644fd17 frame00001519 +adf3e0797076e5058c9ff18219ae3557 frame00001520 +4b47527efc76ba2fc4406f899d1b0ee9 frame00001521 +d215d7cb07fcbd12d1c11ff4a8fbad9a frame00001522 +cfbddbafe032f3eaf099f5905648010e frame00001523 +dcbf8c6c82cec7b539b9271ec0ab048d frame00001524 +4528db3e3e9b8d5977389fbf3db8821b frame00001525 +a6325bc68bf0d86d0bc3cd88e9093707 frame00001526 +2523a1a01aef5e01734ed0b44f26b5b6 frame00001527 +ae975a9b7c315d877f607db8a49dbb47 frame00001528 +6e6b1b1caf74bc7417d730346d0b661c frame00001529 +85d7f7041bd14b566e34442c5a2263c2 frame00001530 +6f0877f39d2f347ed977f2278247858a frame00001531 +96d367659246359ac875cbad6e7c550b frame00001532 +768b359523bd55c6a489083be318acc3 frame00001533 +7bb6686de3a77cc1998050ee82f1071d frame00001534 +dddcdcbec43dac66084007ce66749b97 frame00001535 +7683f7e43808e556219172853fc68c2e frame00001536 +e1efaff2511fe7d4281d4522ef327286 frame00001537 +43d21138454376a1e2450b09dbf2782c frame00001538 +a597448a8ed781164647633aa576babc frame00001539 +8c93b020d724f6039846d1dc519037b2 frame00001540 +f181ef243a62ffaefc6830a389facdc5 frame00001541 +ee7eb6604350f36479fa690e254343ee frame00001542 +9fce4fb31858a194cd63db3271be59c5 frame00001543 +1ed5a6149d34dbdca3c9d3c161f1f140 frame00001544 +2c8636ed3ae2740bf53ef4f66c742f7a frame00001545 +8c6159e0a3daa1fd4d23e1c95618c2c5 frame00001546 +04884ddf66aa479e5ac62923ddcc0db3 frame00001547 +2b0ecb6031639f6fd4266b0d2087638f frame00001548 +fa995bb4fe3d971c42595096b9a75dfa frame00001549 +462cd71a1c59afc470479f42418fdb83 frame00001550 +aff9d5a1052a0c7c2068058c1054755b frame00001551 +57628a32213232ec2a921cdc2e3a7445 frame00001552 +514d8c3a26db5830800bdaa1b88f19e1 frame00001553 +7e2a3db0e5be1ec6d267de3581acd4d0 frame00001554 +99c3a85fdd6bd1ca8e2bdb2c4e7ccd0d frame00001555 +00a1e19975acfd351011f980865c7630 frame00001556 +b77edfe536a492fbfc1115e455cad608 frame00001557 +1835480c5a7bbaa02d915036b28c6d80 frame00001558 +f7683cb6e5aa551dd469a7aa2969cb9c frame00001559 +5ad1ff288be53222de5112f2efb45314 frame00001560 +f58661cf91ffb4e7acc67db19b75f5a1 frame00001561 +a94f301e318e2960178d4f24ec0a3e49 frame00001562 +5fd8bb7af031f5b44241f480193d81dc frame00001563 +6b169922490c1f04d014e2ddb93ae1a5 frame00001564 +7705f0f0653eec5882636ba4311dcfae frame00001565 +ceb602c1a3896b80ff2b8b49c4192bf5 frame00001566 +2a9b986eb964f4cc97d4e0cad9a02177 frame00001567 +69fb5accfcb9f0590c300f41badcfdb6 frame00001568 +30f6b823e3fafdc1e84bf8339decade4 frame00001569 +be5c007e4e7e84f6e0ca699bbcfeca7c frame00001570 +d93d7d1c463e15c7d3e8eca55b01e00d frame00001571 +69c2e8474474f51737ba53075a2ceca5 frame00001572 +15ad847421ff08f4bd403036b3941c97 frame00001573 +ed5cef61a1803293a0783dd16f50f7d7 frame00001574 +a6b037ebb92855d529751d6bb20c8cb8 frame00001575 +1cb694d3074c5ae9e8ff30961e8b16be frame00001576 +3960720ca5b69078796fc4efc100c776 frame00001577 +0a2745b4e45d54d0f50bf7864b1e2ac5 frame00001578 +b2931f1d769d2e013f2ee48a37cdbab9 frame00001579 +c94b23646309b79606cc47b2babd5d8b frame00001580 +a123201f8c5174696b17fe77a1903fc6 frame00001581 +ad701dd209ed554a1af0208e7b969e68 frame00001582 +355a27bc54415b6b5d0fbdf0f1c2e3c0 frame00001583 +f9a6efcf69040ea341ccb33c875eedbc frame00001584 +401aa0fe6baa2be4f112d9e51adf334e frame00001585 +9d8ea31d6dc7d1fc274a8c75303b05c7 frame00001586 +c7b0b593e4c3de11e42433022fa3f293 frame00001587 +1f7a4836f98cae2888b013aa771e4bdc frame00001588 +3184a120e2339f30dbb9266d63fe6b0f frame00001589 +3c846544008f20194255d86c03d19d24 frame00001590 +9a4daaa18d8b6698993eb7d9b7b0d7f2 frame00001591 +99a33a751e638af5016d5ea4085b400f frame00001592 +d498090579182984b2f60ceea24802a4 frame00001593 +05ebfd1a59a3cb1b4b1f7670c842e1ef frame00001594 +9c55d707e45f55364e85dc5b3c9296d5 frame00001595 +6b7b50262ae45f391dee8c5e2091b526 frame00001596 +be92182dd723c09e3f951cb8faa99b84 frame00001597 +51926f3f30fc0d97db31a73b845d8876 frame00001598 +7c7f0e8d8fee4b90165da9d9b5a52dd0 frame00001599 +1247f1b2ed2f40432b27afa0820cd3ad frame00001600 +a1edaa533ea602d7ea5f8803cc33bc96 frame00001601 +e4fc43a45768fa6b3c7fee3e77a7799a frame00001602 +b8b2fe46af5524a5e0ed6da21c712613 frame00001603 +b4a1b1eba195abfeee85a12e0eeccaf1 frame00001604 +942f0d6c04bd118dc2db74def368a40d frame00001605 +11bd467e3b7d1a8bc52bfc82153dd522 frame00001606 +47839b264137b3875bbbe43352f42b22 frame00001607 +9a77a440092facc3f51b509ad400e7fd frame00001608 +7dae0654a80edc960a5a6cabe34e7d2f frame00001609 +a1fb7dc238deabb162bf8f899b80d2a0 frame00001610 +3bc82cac0bdd13bd894b87145abfb5f1 frame00001611 +aca02d0294f3350d3b0c01126c0a3a03 frame00001612 +47c14236d19b696a2b6b4994279702d2 frame00001613 +f7cd3d7315507245d39947292691637a frame00001614 +4d52c5a993579a6f6d030f512ac20a3d frame00001615 +2360b7f850f842d8c801786d659b4133 frame00001616 +beae05baf36aa7ee02720c1c4d2f8189 frame00001617 +d10ec695bc4f34c519a80597a24d44cd frame00001618 +a135b770905e097b6abc2ada57418c65 frame00001619 +e3222358ab32789b2727447ed47ebbbd frame00001620 +ca8476dcffa3b8e27acd333c27dfdc1e frame00001621 +9572c562812fc74eaa61b98eb79a765e frame00001622 +c8eaf0b737c2991f9caece6c3cd300ac frame00001623 +af66bfaaa60a8deddca7a661269cf478 frame00001624 +c2bba8e110365a39719e54cf57b55479 frame00001625 +58f71bfd6718919ce0aa8bae14b1ba5a frame00001626 +1b385df11500c284158a44d2ee5b873b frame00001627 +b28a6bd66237782386a771089018f724 frame00001628 +61344d5272973a52c14129473dc3ade2 frame00001629 +19155bc053cd281f694c70e2626a664d frame00001630 +adeeee8e2a9a751727e253124304e33d frame00001631 +34f54ae72099e899682c95d3b0d92cdd frame00001632 +891fa448396ba080e40b7a6cfff936bf frame00001633 +d3e7f264286cb188e00d86f66ac24c36 frame00001634 +aa2931adf2e35e7c275b4d78151d6c5b frame00001635 +36d19f1929d309d37da4f50d46e7d59f frame00001636 +84d5b17bbfb92647d6a3e2f586265153 frame00001637 +aabe653e93b1ba222948a8a6496b8f0c frame00001638 +da215f6d54e669771a094a3e4b1cdeb5 frame00001639 +6f27952b5f204a291175afb055a27729 frame00001640 +0babd080e03d5d5cf89e6cb1e78f0867 frame00001641 +18900c3f2654fdc8a54dc850f8608090 frame00001642 +c9968cb4f0d1a76337a01e764740c87d frame00001643 +bc069eab2500090cc6a795ed3d8afbd1 frame00001644 +df5492de9c4f0b1096b25a2d38983922 frame00001645 +edf1da995561b4aecbb666691925f279 frame00001646 +3bbd278b15f4e02e459e0ec6c21839eb frame00001647 +7120adb630c67d46571da911347e63ad frame00001648 +b5463d2c783fcd760b92a2ed210796eb frame00001649 +c6536e92f0962265a599d1dcb4593a36 frame00001650 +242903164aeac56e5249d53aae23ad5e frame00001651 +51db289ea84ac552fa72ca4a2e3e3b61 frame00001652 +0bdd4005b49889b0a3d3f176214f72f0 frame00001653 +f1c32d469a66c0e2a5126d16c99944c2 frame00001654 +965c1b99b5a4ccf4f4f70a6109806a6e frame00001655 +74655caa8ef69e50056bee9667281654 frame00001656 +7526137a09de4fb866a106ef94caea53 frame00001657 +9df293f0d4a178fde4a80c49f9c24648 frame00001658 +26a3a3a7921840afbb567d4a8671aac0 frame00001659 +94a54f65276c6868dd901554e8b676d6 frame00001660 +700ac9708d3fca66788018329ac50cd6 frame00001661 +3aca42c404ce7f5f7c1f1a66b269e573 frame00001662 +8140f870eacf0cf3bd78ff1a601e9b68 frame00001663 +6a1e223433cc153f3d823377821e3196 frame00001664 +ec6332200b4d2cc85387b8041afd50be frame00001665 +3f7b259e990dfa3ea74cdffaff92f173 frame00001666 +e61654ee15003e33d8003aafd4571e4b frame00001667 +501657689f092f8ddf944e801fb0c33e frame00001668 +6cb30b455c2180425ba7580fa4e3e8d9 frame00001669 +2b5a8387d81ec3b6f9709ac592f7ba38 frame00001670 +ef5bb05f0903b4543ad054b2f09e8f35 frame00001671 +acff49f90342235f94d8d4ac91bae233 frame00001672 +0bc56bfb9a5841e943fc061ec013cc5b frame00001673 +593711327f67a2f211f47154f200a3ed frame00001674 +c177911eb69f5bb7897c0a6f3254047c frame00001675 +c7925ac7c73a928a605e6a8be3d55aec frame00001676 +3594463b0f1e32867c555da5cbacfa90 frame00001677 +28c105dc0ab35251c4bc79ea73fb82a7 frame00001678 +f1d9316346693f4a6de29419e2ccb3cc frame00001679 +efb8cd8f82ab12c50613fdd93ac547f7 frame00001680 +1157dc9b67867c8280b1a56f3fbb2850 frame00001681 +68ad68db3c4d58e69156d812c2232198 frame00001682 +7e1662d47877c6fa92b0efe60dd047b4 frame00001683 +b245d465e06af56ed5d539f0e9491830 frame00001684 +804a5a331354a54c78b9bb07fd6643ee frame00001685 +067bfef9e9517d0a526cee029d476f94 frame00001686 +ad57a2fff4e9156135e96bb92991f5f1 frame00001687 +d6cee3d3ca70377ce8f77a83544f5575 frame00001688 +4e0797caf4f87bc2111b0adc35284a3e frame00001689 +a217f56292e73203e0223ced1b6e91cb frame00001690 +fe7b6303893e1d5e5c3c71e2b2972567 frame00001691 +5f6b5d4ebba12c051cefc0f579f9fe0e frame00001692 +83730be361655e600b8945d250c47829 frame00001693 +4e921cf43a0bc2a1cb962255e2adef51 frame00001694 +3b1bf44f070feb3467d8cd1979986e69 frame00001695 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MIDR_MW_D.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MIDR_MW_D.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MIDR_MW_D.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MIDR_MW_D.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,96 @@ +b2ea86aa3bdc9d18515fa129d29b043f frame00000000 +7517fe70b7d43cf451a0bb32d8409348 frame00000001 +87d51e86c05269ae0e601ef73b1ef505 frame00000002 +b270eb518a82f04008c7480b965133fc frame00000003 +d379a8a677933838e3c2b87107cee486 frame00000004 +50a71d44736edcaddcc3205be4b15002 frame00000005 +803b6253e4ec743abc712bb611da32ab frame00000006 +dfa1b49546cee0af5fdb9a4967843959 frame00000007 +c716a2903fb641ed5d83ea434cb03f25 frame00000008 +05c67af940200f75b48fb310aa6f7f98 frame00000009 +cb4ac8dbcde31f3837b21d86e2750cf1 frame00000010 +521e2b820ba70ec4035096b904c98c9d frame00000011 +3625e7555359ab410672e90f0959ffba frame00000012 +b331ba050cc0e6cf7f0b4d5f52ecb923 frame00000013 +2c790d86a1efd8a5fea4f0598ad511f4 frame00000014 +c221ec84bcbe591b7fd7b73705f62c38 frame00000015 +92191a26b6fa68565e07976fa48f99b4 frame00000016 +2be3397ea16bcd41b43e1b2acc2b2ee9 frame00000017 +15f746cdd33c4906d81de124f0da1793 frame00000018 +8e991072a2260e3f30d75960c96f10c3 frame00000019 +cc0a9f47ff778664f36f87374513c2e3 frame00000020 +bac63c59923ebd176f0bb5105880a8f0 frame00000021 +96f236959f15672807b82a0920e6e0c6 frame00000022 +cc2240a6e9ccf7ffa93fb17b3b21023b frame00000023 +1d58f6dae21ca0734fee66b2c7e3bf0c frame00000024 +969919b8db4bc14ac4e6f4ca33c7187e frame00000025 +78723c1098b21cba38a92d3600dd1503 frame00000026 +06cab20145595f5757c7404518b38d0f frame00000027 +19323263b776ffc408a11871d322b560 frame00000028 +ff3125062ea5cc0069e5b14e71f83768 frame00000029 +da08e6eee4112876b6e989e9efaed0b3 frame00000030 +6c180b919a1ed2fc286130a24c8b207c frame00000031 +8b027fc5139ebe14b83ec8c04a15612d frame00000032 +5b7927ba053025e628192aa38bc2cbe1 frame00000033 +f15f3e788ff75f66ccacf33801d0fc49 frame00000034 +b6997c6b690d323b75c29ec1c8c23f8c frame00000035 +02f2aac7d54ee73b30aaa85e51632709 frame00000036 +13397679114a2b8574b34a034b4f87cc frame00000037 +d78d45f50108b17fe863072aac020157 frame00000038 +b9c5ece39b88e7639c864afc9334657d frame00000039 +5fb3f5b2577aa4262c7fd12fa6c58575 frame00000040 +166d3fcdea44dadb8fab6b8154e1d660 frame00000041 +92d8b25f289dfae0390aa1af55c82b2c frame00000042 +2cc7f321db9c30da103d08891ea2a440 frame00000043 +b236cf5849496ba060d71a7c7750f555 frame00000044 +027110d2049b5ab2a5c0dea3ec9c7381 frame00000045 +c73e5435d95495af8839bc40a314a141 frame00000046 +07e1f0028370d82282900b8b37bc28f3 frame00000047 +81d0f9e23bb7d93721ae0b88f3d065a2 frame00000048 +442c889d1e55e51ee1021704146201d3 frame00000049 +877a3e5b90f24a27b297aba523dc9270 frame00000050 +8778b431aa8f8e782c484bd7495c4fbc frame00000051 +8ae5dcb95f50832a6e9c0abbdc18ed16 frame00000052 +3f6d45d49cfd2bb30fdad8a200723ecc frame00000053 +c20b31cbfa3c30edd898985422babefe frame00000054 +1d217017db8cabc03fe34197f52878a9 frame00000055 +c82901c0bb9c62f9ed14c9dc7d3db975 frame00000056 +6d94a4838d0c131c556aa26e89f3012d frame00000057 +c3b8971650858c9b56891abefcb030c0 frame00000058 +3b190c7570245c022696215a2a564ac4 frame00000059 +172c6122ea174240160394745667a101 frame00000060 +cd5ed62163f14d8bd1de87ab56c2edfe frame00000061 +e87cbbde033ac67a7359fdec85b743e5 frame00000062 +cc1b82fbca41e202fc3429b9777ced39 frame00000063 +e435f3f1e2c0d4075a41837d4acb68ec frame00000064 +addf50c12beaac630764588b6fe2ba93 frame00000065 +432fbdb8d9eb01703963486be32ea11f frame00000066 +3a1b17c30ed2c9255b5b875085585cd0 frame00000067 +e3fc49699528dce0989006171ee653ad frame00000068 +13af4bfebff71af2d506933383042fc1 frame00000069 +8074ca4f183ef6f7f788483ecc712af0 frame00000070 +644f21cd6172304a7c7881681ae3af48 frame00000071 +c752835bca103ecde7da2d51aa1b6a93 frame00000072 +a6ae0ee0f30e8b69daf52ba1c212df14 frame00000073 +a5964ba3e5be8436901226b22f530b0e frame00000074 +68c9b842abf6a6e9fd035bedc1424e64 frame00000075 +b801d1bc1b69e1e71556e6ad67051f22 frame00000076 +04b3ffb4b8df6714a12d657874b37afd frame00000077 +182bad447422d180d08a370dde4891db frame00000078 +ef5761ae7480dcd975cc996483593324 frame00000079 +60993a6d5878b1fe448abe8d3203604e frame00000080 +343b29749cf9fb0b1c31e06a225d591c frame00000081 +325ba7706cca79e8c6a3903cadfb6830 frame00000082 +35cb63400c6a3bc0d4091e90c34cd5c1 frame00000083 +8e31025b5563cc93450838d3c0106340 frame00000084 +c9bbcd8b9baa0b68cbca0a40b6d05788 frame00000085 +8ac61a239a23428b85ba51a6e4cd2fea frame00000086 +947b878fd973652ea71b6a1f2abb11a0 frame00000087 +8a68edcbc38e4308f1642cf39064362a frame00000088 +79e1a953e217d021c1e5c33e65b40df7 frame00000089 +6d39622a6afc81575b08af39f2e2c5e3 frame00000090 +4f0ac14e364d9f068e1e80914d6cdf5f frame00000091 +25f6ea6129163a6ebef40db56bcd56e4 frame00000092 +3bc6e5610017e6ec90d94251e17db947 frame00000093 +90998c95915a79914d0c6aab6dfd0ace frame00000094 +92b1546449db2f9de4939719644d575e frame00000095 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MPS_MW_A.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MPS_MW_A.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MPS_MW_A.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MPS_MW_A.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,146 @@ +e3a3807b4b2b40bea24efeeba5ae3f97 frame00000000 +33f0b17351f95ee53d94aae2db501bb5 frame00000001 +24ba01bad7eda88f6288817726fa0ecb frame00000002 +045ddc1420d4047dc4a2933bec081855 frame00000003 +391e28c716028f3e8007e5288221bbbb frame00000004 +56e56e455613d5715109d8726303b064 frame00000005 +f98e04dfbfd98545d02e37f6e4200ede frame00000006 +53efec7e91de427f323703b9d6b4d492 frame00000007 +bc63f190dd636f2a59ca9deed7af7286 frame00000008 +f1c4bcb7d857204d497c54eb646c849e frame00000009 +8cea304be45e8c92039ba5146b6c0efb frame00000010 +2ab69db640074c501d85b220ffa7b2fd frame00000011 +f42adc5f76354d24121f2fb29368743b frame00000012 +f0bd525a74828f237c0d29e46400e0b9 frame00000013 +bbd4d76abc692d435935b357c6970d56 frame00000014 +6d776bc973514bd5063d809ac9bd5976 frame00000015 +d3e1de2690f2d127e746d8ec7a7aa8bc frame00000016 +f5683d6a4f2b695d365a03c56f0cfc2d frame00000017 +1bbab35f73d124904e186a02445d83fd frame00000018 +7b130713a9b84964518365af095c1a76 frame00000019 +e1f0baa61c711fe32f5aa8a693b67df8 frame00000020 +5f1a47f2aa4404af575aa4fd14b97227 frame00000021 +6e0b0f130223fc2ddc98cad0fd7cecae frame00000022 +7cadd5af6a9701e1eaf53150fc99078e frame00000023 +1e0ca2e104c3c9fcd1618454084ee759 frame00000024 +cfb1fd2c5c8130299356a9b46d5652b4 frame00000025 +5b5cfba4be93801f851e54a45666cf08 frame00000026 +950a8e6c156310747f2ef7c0648c5874 frame00000027 +71d741ebb92e784ec0080deebd437cd5 frame00000028 +8fd5d41c2b7eb15bafbd803ad0317b1f frame00000029 +4e86570abde1a4153045f69d4cb2491d frame00000030 +04f55ae366a663a32861675af98dee5a frame00000031 +075bac10cac6f18f3d7b04f2d74f7101 frame00000032 +c406fa93fc6efe9cdbbb0ac0b06241c9 frame00000033 +1b9f83df91c44931ec9b59a9004745e0 frame00000034 +91b6331a3385de332362ba5a5d42655c frame00000035 +1a339dfaad12c92de7ba2362a3b8859b frame00000036 +d4f5907b65e3fb725ed9e58ee2b428a6 frame00000037 +a7f1ef5435ea07b24878da5dbaa4097f frame00000038 +3203c01928db9b2ca4c53bc92ac28cd2 frame00000039 +bdd56272ce5925d12160aa8edc1bf902 frame00000040 +6d2bd1788fbeb03a105275767998ef2a frame00000041 +f8244edee8a81da802d1074d15d2c2c3 frame00000042 +0aa5c412a0787f44b3e48a77365d9b53 frame00000043 +764b91862982726adac57bbf5fe61a24 frame00000044 +363de304ac1ba923124ddd3d246309aa frame00000045 +c5da71fbfd408c8510cfefd26e5f5331 frame00000046 +8c3a5671c7b2c4fc045c148a55e89835 frame00000047 +67d66f929bc534107f4ba5d8b5b66bd9 frame00000048 +1543a4f49bb8dfefacc00cd7139b3853 frame00000049 +57fe0d13299527e1aaaf6e7871fb4b2e frame00000050 +a8a747ffd564a816008713eb14ac75a9 frame00000051 +9eefb092b62288e98a40d2392b931275 frame00000052 +b7e049017156e62131f8cca13eada482 frame00000053 +885ef5480013e7e6ab48d9ce61956e5c frame00000054 +5b6370c424162142c33ce977e96f03b6 frame00000055 +181c6ec56ad4be567f80206dde0d1b31 frame00000056 +9116e66e1507ed1a8d0a59091cbea5f7 frame00000057 +b9152f5f9aa6416916e11d947336e948 frame00000058 +9ebc377ff3bb1eda6580eba014c66901 frame00000059 +e6a3802a4864d59c878998f413054460 frame00000060 +5bd278e414b5220339039e176b82b0b9 frame00000061 +696d90441bc69c60c147c82afabd8306 frame00000062 +9aa3082eac332863bc65e0cd87559099 frame00000063 +62920843531940ec146b732af9de645f frame00000064 +917fece328a63580bd3cdce2afe4b531 frame00000065 +0632c22b4eb810b4bc970f95568f6b0a frame00000066 +2725fcf6af2876ae1164e90a8da811f1 frame00000067 +500a637486e24728ba8e8944ce6628bd frame00000068 +d7f98ffe59528377e6d57ccb9c350919 frame00000069 +70e166c2e99b12845a3944ed5636421d frame00000070 +d2b679cef1e00320a54899776c918652 frame00000071 +5d6c1e6010e5f0354e1091c06b415e0a frame00000072 +70497db11b3614b7de97b86becb5a215 frame00000073 +b1ff20c1fe340e201297b54030a19a76 frame00000074 +f598b5dc13b3782fa830f77ead0563af frame00000075 +9bd7698f832f265c584c4dd6d3b43709 frame00000076 +bde52a39522cfbed35b477f6ad655d1d frame00000077 +c7f419fb505e86b5844554548dd4e27e frame00000078 +388108480d783b75784fb12b144f2aa5 frame00000079 +2f283363f0eaed9d8c5d824b9428b5e1 frame00000080 +6ab8647c679fc2dd75d45045c8761d4a frame00000081 +ba8b5efe3e196e84cf5f355f10b634b1 frame00000082 +a6d0e7cd57e8007606390deb6fa4e43a frame00000083 +840a519b4cc93abd5bb156fa13cb0073 frame00000084 +e17d751af9ea5a1a82dd7bdb37cd87dc frame00000085 +b6ba8375824da0c03a78bbc12f14b8af frame00000086 +99fe447cc8428a8adb7959a758879bf1 frame00000087 +6c38c1874d9e766250525b86cbf2c9cb frame00000088 +26d54a49bd3a65037dadd0efeea1e60b frame00000089 +a6740922af94500c3dc9420398c5964a frame00000090 +6c429df06015d7435fd526272dd17904 frame00000091 +e5c02e0595d1a1e1b3ee840bc023c7fd frame00000092 +390186033bdf47c20ddf5bc9b2e72316 frame00000093 +e496c53bba2c6acac9db00e9dfc215db frame00000094 +5b146b3960e428eb12a0377e906c59a3 frame00000095 +a77cfa8cf321235e102289681ee7fab6 frame00000096 +0944736edcd5568a75ee2cbf93eb9b7f frame00000097 +c19c1b53d33f37c88b2ecc241ea2fd7c frame00000098 +bf6a4ab7f2a8a972bcfe769e69ead73d frame00000099 +0439cb05ec3dd7bc82cfff5ab137a971 frame00000100 +fbab24fe983cc0d28f53897c59e7a5cd frame00000101 +6b3b196aeee9083ea3acc9966f019f63 frame00000102 +b895a8ead37244bf4cc988325becfeb3 frame00000103 +c9d7009b540d1fa76d70db641b526b1c frame00000104 +8c0533b066ab607f3e5bfe91015643b1 frame00000105 +782eecb68138ff006f040ad7c77d3f5b frame00000106 +a504f7b41ee64c981183088c3a78d3b0 frame00000107 +cc412b0d0e6585d843803ea0b2f510a2 frame00000108 +24bee1568150824be06080a15a2d8341 frame00000109 +1c3f43f2ee0deb8f4f9d9d40d0146b36 frame00000110 +760031fd20e911283e3ecaeae90cef98 frame00000111 +33069a3287d9830e121efe1e78bbc639 frame00000112 +260c383c3795ffcaa0ac19fcd13ea9ce frame00000113 +a0c408c3e94db5937badcb553a5a9026 frame00000114 +0ff16b2f74ebda9a149039022a045be5 frame00000115 +d4d03d435b1d9dea6e2d545ac49b74b1 frame00000116 +126037dbba439330488a07995d8c65f4 frame00000117 +ff81ec0d27dd86b2167fb9175dae1f6b frame00000118 +976a9a0d2fa4b91075bc0f78b1fd881d frame00000119 +c804e51cd6c55fc0710b7c5204f5ecad frame00000120 +e4d648ef71a36d73264d246c4b121666 frame00000121 +298d064ac317ec710890dc3c72805ec3 frame00000122 +01106c579d98243e018f2fbad099e5c3 frame00000123 +ef229401c42f5f1c816c8d926a105642 frame00000124 +1df1caf2527f86a09feba199acd643ba frame00000125 +6127a7c124a573a0e468326288e80c72 frame00000126 +a61601c390eeab22c579e9a85055e3ee frame00000127 +2fd1e2b066cda4ac30097ac8f5d937b1 frame00000128 +817ade7bb01e8d11e88f1bc47233db1e frame00000129 +498952faa77abc009340303a0000979e frame00000130 +8c1827f50bbe0b4e1d2faa6c3479e22b frame00000131 +133b566476263fe004bb326be244fbf3 frame00000132 +d87064bc7b00f64e0c28ad2b3b5ef4cf frame00000133 +4a534535ad1dc5e204e06e7b7edff4c2 frame00000134 +55da342f6622fd0bcaef47769058803a frame00000135 +a82a76e74e327776068c54a5f4424612 frame00000136 +70bf6a5c2f55a371c0f45004391b964a frame00000137 +9440efcc9a3a4d512305c6d8c0ef53a7 frame00000138 +0c0179de6ca7ca1622d48038977c5754 frame00000139 +d42c632844afa3b3c28f866061c8c3e1 frame00000140 +fe8fc7aafa989f44d9474d3bba127903 frame00000141 +9f6641d283c32d5bdb1452d9b438f893 frame00000142 +cdcc2125a9ec81643fd3d6cab94a5d3e frame00000143 +9ed53dc42d434f7052e8a9f709964dab frame00000144 +cfb2f2b6c6ed68e09a625095d1ac24c7 frame00000145 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR1_BT_A.h264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR1_BT_A.h264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR1_BT_A.h264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR1_BT_A.h264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,58 @@ +f746d22a2f4cd8c19a7ae7c92f1d3f03 frame00000000 +944bd1857b28cdd7605fe20dddddabb4 frame00000001 +e182331b3903ce93053532ad807c04b5 frame00000002 +2cb0c24e3603dec18e6fba538102889c frame00000003 +c6db2f4dca63708a98d2dbb4919d4620 frame00000004 +01fedeb9c0d141a9817295d13cee1321 frame00000005 +3f414f5b602f0bbac2fa9f19db0b09da frame00000006 +af8ccdc3078e7a717f07c4f6bee59471 frame00000007 +bf08bcfe9ea4d388917dd8a634318bd9 frame00000008 +b616af3f12fcdb97b25b2a63c07ea749 frame00000009 +a0aa58e33bea82fdabcbb7c223f6eb73 frame00000010 +170820054e1c9b19b80f1077b16c4536 frame00000011 +055c2d591c25da530c2a3516c1c998cf frame00000012 +efcce2a6c34987b420eb44103ebcc19b frame00000013 +14c6368b4c12b179aafc199aea171557 frame00000014 +0108c017c99db2a929617f7f70c181c4 frame00000015 +96db7cde6e1ecaf58e36e1e5027dd95b frame00000016 +ebae384f2484b2f3c52d58b784a647cc frame00000017 +a23a70591c1e2c0b14390ddc357c8c71 frame00000018 +9f5067796f6bf5f61704a16dce7a51d0 frame00000019 +d3b368545816fab1583ba5af3a6a18e9 frame00000020 +f84ffd5ec96372b5019bf9102baef280 frame00000021 +2970f0a9252c6533c53b80258a761abd frame00000022 +e042f7aa90503421af479d3503a70478 frame00000023 +8de000dec524b5e4e7cda19d0dd187cc frame00000024 +05d17fcd65a796494c83f078007b153c frame00000025 +24ac0f4bc34746a0284dafc4067856c5 frame00000026 +84f5fe1ba75bba0a72bb4e6cf29cc7f0 frame00000027 +157de36d1929a8851fe57e1fe04cdd28 frame00000028 +bc999d1b60fbc46d8c436e19286a5b39 frame00000029 +bd3ec5cd2376b1bd204c6774b503219b frame00000030 +4ab7928e1c124eba516994964e0b1691 frame00000031 +60002d703e4c6a240916fd12a122cdf4 frame00000032 +d24d8cee289265138a1311ccde50b1ad frame00000033 +07f3a91faa765995bf087070b56969d0 frame00000034 +e4b2e4b54e9ace39d3c462c87579a6e4 frame00000035 +57996a5a12208a25b4efdc9a4457b436 frame00000036 +666d49998f27503c6ecab6fe5ab642df frame00000037 +1406d06ff145310b51cd60e54e82f139 frame00000038 +7648f896a2149aa71f6b5beb12d81dd3 frame00000039 +ffc3d4cdc7d414fc5655ea76c9410458 frame00000040 +cec64e67cdca8447a525bca4892b41e4 frame00000041 +6da6fe194d11312b429016c160125f5c frame00000042 +aab3cbcea108e854e6f8caa249cf779b frame00000043 +ed8ca037764c8d0c41de1ecd8313a6ec frame00000044 +66063c8a7e2be0ec5a79524a999a923e frame00000045 +8283b7cd69348b1eb42016b8e29e8f47 frame00000046 +1d317a5f592f907c7c7bd967b7d06e01 frame00000047 +7e1e7ff16dfbc60b9ab6f37c2d31c1ef frame00000048 +7eb18326f95d4b7cc80bb6bfa38f152d frame00000049 +14960504ba11a85862bb9aeec53bcbfc frame00000050 +9f2a40490330d9d40576d038ec1050ac frame00000051 +e0bf188f984fd860f454a2f4c63e2983 frame00000052 +807cbd14ee2357305b854ce561b261e6 frame00000053 +d6201566baf9d1bdc3509bde9da31808 frame00000054 +987d71f320a92b21f9ff5e452038c5eb frame00000055 +84577e60988e433e363b812eec527d72 frame00000056 +70afeda615a924d3c582ff2c73d9194e frame00000057 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR1_MW_A.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR1_MW_A.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR1_MW_A.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR1_MW_A.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,146 @@ +40a81c11397d2476928c56c649ba8319 frame00000000 +866030e32ff83d7ffdeab35ec5169ec3 frame00000001 +10cc0eca78197f4ce71f8bfb11e37bf3 frame00000002 +c527788aa090a0cc7a2f70923fc3c6e1 frame00000003 +a55044dc2db90f701ed08c83014096c4 frame00000004 +bef3a54d5e6c0ff761ba7df9fd88cdd0 frame00000005 +3a5a1d457a7fa7639c2f6c4fc06d6a68 frame00000006 +a8c19b5dd156a5603eeab6425faf8ac9 frame00000007 +22758fcc910e2c8cac6f165f9f7f1ae9 frame00000008 +9171f121ac13c82990a15a89c810dfd9 frame00000009 +2805d383ca5ca5d2031961852900a056 frame00000010 +df2a3da6ecade2373b15f96f859cd61d frame00000011 +1fda9a183f1f6d482535ed3047bf0d5e frame00000012 +77d70067efec769dcbb2f9199ecbcdce frame00000013 +669fef57c3f294d3aead1bb4bc3bdba7 frame00000014 +e293bb9645664e4b686334f237b758f0 frame00000015 +1a788beb33a252380ce01fb0f240f8d2 frame00000016 +e26185f577b64f1d1b204da3767719bf frame00000017 +a1d4724c7507a86cd605b7cce357e0f2 frame00000018 +1c1e4956d0e507f81b8251a63215f46e frame00000019 +e825e0cc2500cb5502e923139d05e423 frame00000020 +b8de358e4ec5583615be3fb785ccaf0b frame00000021 +15055e72bd41cadc0cc81b286a834fd4 frame00000022 +f4e7f66a53d1ce7a3452d13815323292 frame00000023 +1ae50dd8fe5ccd0e75fdbafe36290b27 frame00000024 +7888a0d3215766c2964ab7d5955e87fe frame00000025 +10b84433cafba7f87d3ec6781df65dcf frame00000026 +036c605341ffdda9ce59056857cfb3ac frame00000027 +f8eb4c381d259050c9c04912d8878a26 frame00000028 +c0c12e5db64017726fada571c2f15ee9 frame00000029 +147e2f74e5ba4244b03f3648a34c13e0 frame00000030 +2843d1462ff07ec545e1c89ed47ca80d frame00000031 +2de18ed5a159b59a32586068e7bf83dd frame00000032 +5e2085a42c7fd97f5c1a6cce86db65ed frame00000033 +53a27317156254b57e5b745041394fb2 frame00000034 +4edf6012ae807eccd7d4cd839133c3de frame00000035 +b3d8a8591c5e0be38266842c54014382 frame00000036 +5a35368038617d6a5fe5ae97e00b3c65 frame00000037 +28564383799411c2f0a121d22d6795d4 frame00000038 +6b3776fb289c31e887dda0d7261762d1 frame00000039 +5d7a02b3474e2daea0676fe96be2ff34 frame00000040 +a12f2064d5e4128b4cd7bb4f47a2a642 frame00000041 +b9080b608c130f101f82dbe53123bb5f frame00000042 +cafdb47c0b0695062f8633c8072b9190 frame00000043 +a999b1822da96e1c7b2b1ef1eedad3e1 frame00000044 +c22d0ac5e28dde797bf8d14779f3e469 frame00000045 +402cf5462ec07f921ddb174e0af73e40 frame00000046 +c096c37d2b9cd3584c1d9cdacf62bdd6 frame00000047 +1ac781fbf7b952dc6e38c9806e7837f3 frame00000048 +873b1b0052b7f7662475f3f47747b348 frame00000049 +ddef946811f2da07f61434de60d98d55 frame00000050 +073ef7c85fab40faeea5eaf31e13e1d8 frame00000051 +7fe196bea4f4f96942259e6ddcfccc7f frame00000052 +f5edf71f17be1bec92496521efacda88 frame00000053 +6c5657063cd0884d67c46536934225d1 frame00000054 +7233223cbbdbfc930ff7c8b88374961b frame00000055 +7cc98cce673e91fd8d8d9809be5a3170 frame00000056 +6fa576c0a8617c98707de4875aee62d8 frame00000057 +d232181a58cef033c8fb1ae502ba8fd0 frame00000058 +7f1f64263399c781ed83ecb029ddce6e frame00000059 +933ed249001848298bdbe3ade975d51d frame00000060 +a131c3c4b5c94ba87dd913429494e9b8 frame00000061 +577508a43ee13ff2ad2ebed5956f7649 frame00000062 +e64f20ce2638909739b0b0017d1f395a frame00000063 +3db5df2fee4d06b18b9128502f8e732e frame00000064 +5f1b50d22837de5207491128e24035ad frame00000065 +421fe8aaa48975e066b5611d778ebf71 frame00000066 +fde34c7e5aefc4f6d9ea7664380dfc01 frame00000067 +111026ea7f1220d122cd5ecc2321478a frame00000068 +5a034e2bd42407fe7221e48082a94b24 frame00000069 +dccc8ac72f00723931c26cfd9ab737fb frame00000070 +f06b404397ddfcdccacb183b7c9a7b92 frame00000071 +4185c9c0bfb91f713727ad66debbd46d frame00000072 +b5ef558642068f1bf4d817b4b0a5500a frame00000073 +001f2660fc35cd0dc22c8c3de55b954b frame00000074 +e7f5bb34d16c2fd4781f90929da083a5 frame00000075 +1ac59aa2dd23eeffed794410e7181ffb frame00000076 +a20764dd7ffbd85eccc8844cc7f9267d frame00000077 +170ea42f3e67ed8931e23105b917cc3e frame00000078 +cd1f29d63448fa0e1b556a3b33dc0d97 frame00000079 +ce39ea4072216e457f3e4c6ff4dca0c6 frame00000080 +87e697e9d06fd1fdad2f397d1abe20f5 frame00000081 +7c0e82865476507438e79fdd73c82191 frame00000082 +848249186aadd4143b98de5717af038b frame00000083 +706b627b251a85d76904949f529c29b0 frame00000084 +51820e663a8aec67ed4d3a15744d63d8 frame00000085 +86d8d3edc1214ce177284124304d9264 frame00000086 +3ff098ef5281efee336633be5fdc9974 frame00000087 +d1d98b5141e760af8717441e1000acea frame00000088 +a6b32364ad9117a9fa31a71b2905081c frame00000089 +dfdd0eaea62cb3d4699ff373fa393ceb frame00000090 +c9101c03d9f78678e6c13367a7e777e7 frame00000091 +32f71c29d11108887e90b67823ded65e frame00000092 +27c37e86379a0a2ea904f03c5aa01c74 frame00000093 +cf6a25b70059f036e3a0afb791802387 frame00000094 +c5f77439f1a9771ac6d492299d3d32f4 frame00000095 +5cffc51b9ce5d3da2ece1ff5cf2d3f9c frame00000096 +4a281528daec4aa5c33f0f4a0d6ac7f8 frame00000097 +ab939ed433ee8bf638056438260df3b1 frame00000098 +70f5d76445be01a8bd91f85af5a6ccc8 frame00000099 +96d6d08af76b553ac72993c417cfeb43 frame00000100 +6dc66be6b4f61166c7f0e36a050756f1 frame00000101 +bba7ae77d1cd1da210a6588743b03d41 frame00000102 +ed927fb86f745cb86c0eafc123169c84 frame00000103 +25eb0822a841a1be9c7cbe135fede93b frame00000104 +5c8634cb896549d3d9b6e3d70629a894 frame00000105 +03d25e6cbbc6f76c67180a1e36a5c57a frame00000106 +ba663fed7ff2c5e865c81cbcc7132814 frame00000107 +1e009cb5a95ccd6cffea6b08531ffca1 frame00000108 +6adfb97bc9fa39a32a0bb662bd3d1373 frame00000109 +a31d8bd4db8e82078cafd0590f682713 frame00000110 +4ca2a198b809161937431c5e72b1de78 frame00000111 +8e14d225710ff6ce364133e42ebfbfde frame00000112 +175df7d10b5f9d385888b3a499c7bda6 frame00000113 +9ed75fccc0d9888f61f6caa8104f79d9 frame00000114 +48407ee8dce5b21a33f6fcd1f887445e frame00000115 +671998f80a21bfcdef564d23bfa7e1a6 frame00000116 +7f0355b396779e3299f23082d7676078 frame00000117 +875f3b90697bc5b874b1593034f78670 frame00000118 +a183988675bb9254362470c37cec2438 frame00000119 +2859e515babf786f5838d0bf84dec726 frame00000120 +ea03175c956beb79a9b3d53926194277 frame00000121 +5493be412d9893077cffbb1d1e3c8f09 frame00000122 +00df920ba7876b11cf6e37e61a65a76b frame00000123 +4abad8efb928f07cb404dfe40791acd9 frame00000124 +0864d2f83f97dbca8971a2fde2600121 frame00000125 +bdac925e5581162440de8607cdc23047 frame00000126 +b23a1ffbedfe405e0d9f038bc412fb6f frame00000127 +f73d516f1220a8a56b1f39116ab1a8dc frame00000128 +c20be5e8282ed1047ffe9ada99830b86 frame00000129 +354a756d3e09eb85af10e8d5a0bbb0fc frame00000130 +1c24c4006d3b4e29cb82df3ecbd85534 frame00000131 +25afe8824c63ba9f948e3eef01db3121 frame00000132 +839de10be9ae600564b9a09914dc6b51 frame00000133 +00184ab3f986e4da668496aacbffeacc frame00000134 +6fe7fc507a9efcdd6b5ea96352374c69 frame00000135 +0e3b28c4b0f9c31405baf7da85fcc660 frame00000136 +0f909091ae5938686f33f384e0e39150 frame00000137 +50f7a2e4fec2edd078b17cc75ff55ad7 frame00000138 +5be3104d605c272fc196adf12adf6745 frame00000139 +5766bab89a162eac9291ddae9228f14b frame00000140 +4d63fea1c028746d2c69959af1fcb0e6 frame00000141 +11b503b05c44af3da3009cbc8dba934e frame00000142 +b49fc3e2c51b63ed0cdb0fbba83e3383 frame00000143 +8d92eeb4af7d45eab2161cce8ad7aada frame00000144 +b9bcbf801b5420cde3b50f449590e49d frame00000145 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR2_MW_A.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR2_MW_A.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR2_MW_A.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR2_MW_A.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,296 @@ +e3a3807b4b2b40bea24efeeba5ae3f97 frame00000000 +33f0b17351f95ee53d94aae2db501bb5 frame00000001 +533ad7068518781efc4d544db5d847e7 frame00000002 +263d2f7dc81792d703a4484dffdfe1a6 frame00000003 +b80148dca642bb0ba9ee6b3699b48cfa frame00000004 +2f1af56df68fff40ffa7e7d1869fe856 frame00000005 +eb6865d756893b95b47e1b6232e6ac3b frame00000006 +539927f21f062b0afdb50e0a000dbbe0 frame00000007 +14388efc8ea01c43215e0dbb91e5bb1e frame00000008 +d9313ef4a60dab6c830193942722c632 frame00000009 +aa7d50dc766bdb05a88f73047c862553 frame00000010 +d6731a69a7b9935bd48540e8a5f8ef20 frame00000011 +2585e54b39e2dadae35e0764f8f05e28 frame00000012 +04d6a37bf88ff4a55782f546d3e520d1 frame00000013 +9fd6c1fb28ea375603393983446910fa frame00000014 +face1007f528d6ea927303d2ee3bc83f frame00000015 +6fddfb45e1cfeb719249aec6fe1fb447 frame00000016 +2a57764d73ee730dbafa0a0c2fa6e230 frame00000017 +eba08745858169918dde1c5f24459f9a frame00000018 +a62a3172f8a345ff51225326dcc643c8 frame00000019 +63f11d11b396390a837da7a167ce23ce frame00000020 +e7c65e04a38b706e911c432326d8173a frame00000021 +63d4124b54e636d952bb4ef56700b559 frame00000022 +d36d4423baccbaad27c8ae6cb606255b frame00000023 +f958a52277678b16e0d6f96b6d1d4dd6 frame00000024 +2cbb100694c638d458523ebf1fc9a100 frame00000025 +652edf1a2073f3aba249d0769b0b74c0 frame00000026 +2e131c226998ba10071145d61376ddcf frame00000027 +b0925a22dca4a19ad818450036c2e7af frame00000028 +811eb08b4b6302a279b769fc29412ab5 frame00000029 +ba032aff6f87e57c312b8f976fbde2b2 frame00000030 +2dd903ece065f715be2b00543053e862 frame00000031 +5169f9b7b7e64e19b6d2a9cc0f11693c frame00000032 +076d11325586b48730241504cd48f339 frame00000033 +74a095fca1e0d6e40f228aa13af60ab7 frame00000034 +c623c872d09f85306fe3d64d012bcf2d frame00000035 +e695ca7f052a5f610fc883b983754327 frame00000036 +80eaf0ca34949b4d17624721783998a7 frame00000037 +a59bd54e1538b618d0b53476c63df430 frame00000038 +847eb6463f615182dd3f906931f78e01 frame00000039 +adf74fe99b059801c70e1ce0dbd2be6b frame00000040 +ad488070c06aa99f03e9a91512363eca frame00000041 +6d5744bc7723341e97034bbb076fdae5 frame00000042 +db27fdfe9b36099c3960406cc2682026 frame00000043 +0c945ed79dd22c9dd1d731b99b766a20 frame00000044 +7cdea6bd1605869a5e02bffc6d4abacb frame00000045 +1f0b6a788da892279fbb8b4fb418a6a6 frame00000046 +4f9aa85863a12ed613f74234b14a4fdb frame00000047 +31c0b1cb64fcdab1eb23577d06b49515 frame00000048 +e46cdc61c7ebf2b8ce61a2c9aacd0498 frame00000049 +161b2233c7ecdcb54e4d91f086491b4f frame00000050 +c38934740d901de8e5a5b95f689c8c1e frame00000051 +0a3b42bace4060fbb2b214b532492d8a frame00000052 +61fe5c89f3167baa14bed207728418a4 frame00000053 +2a2931ef14d4fa5edda38563f568fd2f frame00000054 +044ad58199d9fc16d34ffbe417e1b96c frame00000055 +67468429e7d75d40488666a90c509c08 frame00000056 +24539a4f926351c97834b4ffa2e63883 frame00000057 +47518c149f72ef94321c8207784752be frame00000058 +95890d0303239e304d0e20e7a2c87120 frame00000059 +bf6745246cf03a6ceb9c727590e97564 frame00000060 +51099fa4eb7925b2a16158667816524b frame00000061 +34bcf26bfad949f408ed6de770ff97dd frame00000062 +681068523124dc8373e0b451e616f236 frame00000063 +b079558aff8f9ef998f30eb85c81bc3c frame00000064 +f866d216946af6d4abd7bc73253a41ad frame00000065 +7a29fd9c86b8d9fe59a09cfb26d287f8 frame00000066 +dd3a419794d17b864ad494be861c108d frame00000067 +8174cedf7e65d9f39c69904f9c8087e4 frame00000068 +f3553ff230c3b84dfbf0002d48d118d9 frame00000069 +7f5ae06b2e07d0b77b80f8030f847482 frame00000070 +331514032833eb940a1ed942f6bf3e42 frame00000071 +ba48f3c93df8855205f9b28c1c5cfc1f frame00000072 +d963fb76dfe44866213fc3fca6c15d16 frame00000073 +56e3dabbd8d14acd11fd8970220d56c0 frame00000074 +e50a30efa1925cd7f4469844815f95ec frame00000075 +6a8347e2a785b3f2749bcab5a98c4ace frame00000076 +991adfd077b5841be7bf7c30100e0c5a frame00000077 +46ffd5d0ba0630419adef6fdad0ba26f frame00000078 +ece16cabd6978df3018d60fe9f2fa049 frame00000079 +cdd608c2bf59e9d7f9d948b7856231fe frame00000080 +c293962c2023de381bb7d49820273998 frame00000081 +9ea2f12d7d08be8e5743a0df164848c6 frame00000082 +a3919b30cc142dd2b1449408746e03c7 frame00000083 +7cd57d69d3dff6d2644987d385971320 frame00000084 +02fe2093351e0f55996e4bf3af0b5306 frame00000085 +fc26a8042eba8c265387231e858d2212 frame00000086 +384a1ae174924820799148d5ad557db5 frame00000087 +02a2cb5f1cc93ebe7a6acdff1dacf19e frame00000088 +d57950ea6f3aafa75e14cd6bfbbe42f3 frame00000089 +0fdfa9b24d9320feea2523cb986d0624 frame00000090 +4ab707150e0a60dc0aeb5d43ac115747 frame00000091 +3638c051c2c6c1657b5379693f14b12b frame00000092 +ef87bb68c9d0e1ce923f8ad5d1d8efbc frame00000093 +ba4c942c9a559f3a6b1f50ec7ef82a89 frame00000094 +659aa0f7fceae5d59c243c909fa1b78a frame00000095 +50a5988a8cc459aa9e3b25a40fcc8c39 frame00000096 +3543000e65af488eaa3c8eea3e8f1f02 frame00000097 +4624c92d9e40aad3d22b227680c3b7fd frame00000098 +d989d94846d2ae57bb7effebdfcc7dea frame00000099 +46eae561fd7443df9bfd253a06dcdee0 frame00000100 +5891a1cca6b49448ec969b133cd0eddb frame00000101 +816b1bb8f4744d1b75022bddf0ffea20 frame00000102 +8009129fbc0c111854cdddcd51d34c97 frame00000103 +b66065df06b09baf39c3b880b2628998 frame00000104 +930192fdbaca0ef03f1142ce1a9f1c2b frame00000105 +0e73e2ab3c9f52d2f4045c12804ffac3 frame00000106 +10c1fd563e6f1552ac927b011a298c71 frame00000107 +a142a14d8a109192217376a9abc6f49f frame00000108 +ddbe926de14437a9bb7f0953fbcf2f4e frame00000109 +04859ea6139c0dee2a4c289fe52b29f6 frame00000110 +26162ed356fc73ba5356654544962a32 frame00000111 +cd0d40dabc55b614730ff62544a3cc40 frame00000112 +ce8e3f20fb62bca9c95fcd1ede3ca31e frame00000113 +e7745314e62626733ad9a28a8bfaec39 frame00000114 +10329fcec1a4c1b27f720a78c1221ba0 frame00000115 +b1d12b3a69f72398d31f36ce07825368 frame00000116 +dcddfec091e2266d0bdac2fabddd708a frame00000117 +da4cd11217fd12c946bcbcf1886a6fd7 frame00000118 +93851ff3d02bef6d269cb68b8ab9ea51 frame00000119 +c67fb8e1c49d9a1872180f425ccbeefd frame00000120 +41fe651d82a43e0fc357339da0d20316 frame00000121 +ae29143698c7a822d0e25c9104a08ad3 frame00000122 +4a41655be2adc20e9d309c1af6d02cf1 frame00000123 +fc6ab92198c483077e3e53233ce16f7c frame00000124 +29ce34a59a430a477b27d31b2410c57b frame00000125 +15bc680e128440a77cd3fd8f461cfcda frame00000126 +ea0889520c95e695d619f39f3166a23a frame00000127 +64246bdd3624b4cc1ce7d4be1df3c74b frame00000128 +95a7d8c1aef7f9d973c7d31e11d4bf4e frame00000129 +4fceeb47cc5d9c1a1b3219252058a06f frame00000130 +b75d85e9f1b27a54cdfc342b1373682e frame00000131 +84242766b9234a228a00a03352c2b72f frame00000132 +635afb490fefb26de6342e62b1aead9b frame00000133 +c40dde0e5eec3cecffa10cb59f648bb0 frame00000134 +7e72ee7e84847c23a386f5312881c0a8 frame00000135 +fc5a24a55500622b1f5113dccf8d4f0b frame00000136 +4678805e341bd75410c6b0861a3b2e62 frame00000137 +6edc3827935897274d444cbbea7ef97a frame00000138 +aadc841772cf9574371371acbcd822b1 frame00000139 +ebedda0eb55906d9a1dc0011dc9a2c7f frame00000140 +140d6a297036ff3d9295d315e24efba2 frame00000141 +c407daf407107f470f6b15bd01dbeefc frame00000142 +ff82452aa1d5a897ef6cfb631856d893 frame00000143 +2b22cfada1e6a85ad36d1b01b8cbff56 frame00000144 +8d3152bba9957a99b86ad37ffebffd0d frame00000145 +b65a4032b0da2bb1ad8d7c0b3faa95cb frame00000146 +c0d265a44d592f9f0bd13d67fc21a629 frame00000147 +16dc26bf4a948df470119962247b4f8a frame00000148 +9422c4240eda4ce70d09107f80825580 frame00000149 +36b03787e3d7cbbf45ad418f4ec149d3 frame00000150 +4bd11f109143fc71cedcf612022fd1be frame00000151 +3922c6ceefe701fca904d5bbfb7bc381 frame00000152 +d54c5c45686a97881bff088fb6e275f2 frame00000153 +de754d2ff7aa01c2889b6b3371c6d542 frame00000154 +bb039b42909497fb55b7b8d71281a175 frame00000155 +57ea0dc2bf0c60e77d516711245d4713 frame00000156 +ec9234be404622dd698edae5d7fb39fc frame00000157 +decc58a1ab2612848dc6dbddece2ab8b frame00000158 +1efa1dcedebb2969a17d37286de4440b frame00000159 +cbabe724fbf859f65a2bacdfb5a13b49 frame00000160 +98562a7e631e7e73d56065273b594b43 frame00000161 +19e548cb12fe8025eede2a47aead010b frame00000162 +1ea0bf0f0d4bc51c600e945fcac8072a frame00000163 +8c86d047c5cc691e6326780efb234c3d frame00000164 +5326a315616ffecd95207d016f5d7f31 frame00000165 +11af73b587799dfd55c1c58ead280318 frame00000166 +7bdcec577a211dc5a79ccfd7b50b30fc frame00000167 +3fb22170cefc8719e2d2ee90318a4002 frame00000168 +59f7736da16f321e4241d431402c635c frame00000169 +baa0de55a98c4a3434fcdda55f2f201f frame00000170 +741f3a5895b3f27e56de3c5c9913de03 frame00000171 +cde0f07ab27662ae72216be3df6e3a25 frame00000172 +15d210ebdba278504a12e408947504e1 frame00000173 +029de6e7569a5c42efe9bda57b5df894 frame00000174 +197e4c4c3d721dbcab0ccf52a12cfc52 frame00000175 +55aeacfb11d2952f59e23b13a5866bd8 frame00000176 +77c1f9cf448059fed7afd038e64f78e9 frame00000177 +c6f512f6e536531984f32c6ae0199067 frame00000178 +bbd24133c784576c96cdf5d9f5ff0ccf frame00000179 +3a8813aa587090d960f70b462328b6e7 frame00000180 +1135c97bf6c45561f53ea7a9c5ca704b frame00000181 +eb693978e7b7db4ed81886bb61fb545c frame00000182 +e18a8a14bb96e2cc323fbd1bde8ffa97 frame00000183 +bc09ab0103cac30cfbd059fc24981079 frame00000184 +994e7dbb9a6d8adc272ce114f4e92256 frame00000185 +78596501d8a2654dfc7b3b9c3a7d067d frame00000186 +efd306e0d6d78004b74b38d1b898d888 frame00000187 +c9b0021e3061d1527daffe10aad996e7 frame00000188 +4b68e57f8bf6ce824865fd6258f98f6a frame00000189 +e60c2bf536bfe50bb597aa56a45470a3 frame00000190 +a042f48a4bcd8adca8731882e030afea frame00000191 +8bad1a1597b0ddd4c825f64667c68337 frame00000192 +60e96352cfe93d1687fb183d30c9d573 frame00000193 +832e69854697634e4bc2143fa2780838 frame00000194 +03bb32abf610d2d93ab2988029b02612 frame00000195 +766c8ae1849a6f3e39f1fdd5fa230508 frame00000196 +4d39ed263a90b46376f38487ea8b593d frame00000197 +98bc8eaa0be4aed1ba4e0d58cd7f5b57 frame00000198 +5fa5e58e24ccef78dfe411a2ffdce4a9 frame00000199 +6ea73024115396f8534abd92578b25d0 frame00000200 +391ed058e2bb14fc0659a9ba6feb2832 frame00000201 +49d3a74518b898aa2dfe53bac195bea5 frame00000202 +10071203a2ee2c8c79bec82ba663f0fa frame00000203 +cb317b20d1944fd567c0929e32c04dfb frame00000204 +d8ecd6437271f4839ee8e8c2a7991474 frame00000205 +8420361238a6a85045a3d77303137bc0 frame00000206 +52ddbadef39eda3463718ae1d1d2ce80 frame00000207 +887976769834612808c279c3b8a4a0e5 frame00000208 +5e421b42a657676af8ceb2202fd03431 frame00000209 +58bc6d660f245951daabbba25edffe3e frame00000210 +9006de0ec077d7862d727f0691c14b87 frame00000211 +01a2aafd557e9e6c5846941f97cdae2e frame00000212 +3cdcfba4fbf3395f223807b582824501 frame00000213 +401630e31514946946f0ba2e0afcba03 frame00000214 +48068e1271b550d471b80f5b62ed5505 frame00000215 +6a63707786101fc1a8c4ff2eff0c1acc frame00000216 +425ab898561b57a4f9c4467e199ffdbe frame00000217 +97bc659e893af628d13b8827d5215ff3 frame00000218 +d73da849e24ddb7dd11b8b79bdafd899 frame00000219 +ebe46fdde73600a08082d9ec1023be9f frame00000220 +b6d99773faa04ad7bbf04f51df7f57ca frame00000221 +4ee3e638c1ffdb58808cf80cecd6b610 frame00000222 +7c640c7c9f4b4e3cebddf2ae48cf5732 frame00000223 +cfd7c637ddeeefaf1e1e54ad9c8203a9 frame00000224 +f33ddb4429141d1dd4c1b07d875aa2ee frame00000225 +e942917c4dfbd05ba5fd6e2aaf745032 frame00000226 +27a83bf720f07b44b62d4d7f343fbae0 frame00000227 +08f3ab0e08f1c8e2195bb58a6a485a1f frame00000228 +1bf9fff606042c0129dc5a50a282a169 frame00000229 +dfae33a6ee7070df3d044507f484124c frame00000230 +75fd455a5ad8a72087a09fd2b7f16aaa frame00000231 +58db0d29238ccf72c1e1c3fd51126467 frame00000232 +2f2ac636ba6ee8160eeffbcdfde50568 frame00000233 +628a7d0833cc2c4e795adcb5538695f1 frame00000234 +7d256e4a84b4dac5541d039c28e1c3d0 frame00000235 +9f86bf204c04d5886e654eac9994d6a8 frame00000236 +f31479837be4abebbb35db46164c7a99 frame00000237 +08a7f3e99d27e335e6ebd6f7f04cc188 frame00000238 +694cf71233350e7108e460d0bedecb8e frame00000239 +b50520cfc2a159ffaee0c80d70dea8d6 frame00000240 +57e498b34aef1c12d65e6535e6a5146e frame00000241 +303c37a43a18c49e12a4e0d00b97348e frame00000242 +02b80b17f91f5392761381b0338fb10a frame00000243 +f0e707237d7de7888a9e52be4b24ffd6 frame00000244 +10dc2781ac3a29a73c2523e2b9e74eef frame00000245 +e81b083d8693ce8876e077300bbfccd1 frame00000246 +b57c4ff92f947220c24e86f3fd805795 frame00000247 +d44f884810a794afe79214abebee2fc0 frame00000248 +c1bd7c88bd823004a836a53b30ec4d06 frame00000249 +bb9400610b4edd49b1069af5c28748ba frame00000250 +2c4ac62d361472c0c45a27fa822027ac frame00000251 +aee636753212fc46a5723a0499178d85 frame00000252 +a18ac00b544db804fa329bce0142b617 frame00000253 +6df3a1d35cb33f53b27e16cc1690d76f frame00000254 +650de2e8fa7b122afb4afe551ff9ae05 frame00000255 +70d969384a14a5fa08332036dfd71e1e frame00000256 +492db6abd2408ab74b898824baf5d4c2 frame00000257 +d0fee632a3937a787f14a612b13729e9 frame00000258 +d9837d9d40f47b3034732a967305e7b4 frame00000259 +d0ee3499caeaf74dfa594c6f269a0811 frame00000260 +49cdc9df13c809fcf9f84816b24dc3e5 frame00000261 +bb9c3987cb85999b142ff10ec98c419d frame00000262 +544421fe36788b7bc891acc9d8726282 frame00000263 +d4687294da50078071c0c2535b222ea7 frame00000264 +284bc1816a415405f545b1f6771f0216 frame00000265 +84da478989a17726fac1fad0b8845de4 frame00000266 +819088537c4e83b88ec461f5250cf290 frame00000267 +096948f0f67fe38b037da4cb9a8d89b6 frame00000268 +9dbe7b1c2c0c888f48ee3439532f9b4b frame00000269 +7c329d6f4d5d694b5abb9722c96126ed frame00000270 +9696273f412335ee10b116e9b9193c1e frame00000271 +a84586e4d0ca144388e3ed4aa43e1848 frame00000272 +dc4a4fa5705c45e96139e64c08ef9375 frame00000273 +38428aa6f152d2eab9cc45ab0fe6fe5d frame00000274 +a5878fe88c06ce210b81b6e8753bdcb0 frame00000275 +a8fbc2efed6bbea3784ccf4057d150e0 frame00000276 +03d5e1a443932076cac853227eb8e6fb frame00000277 +7901028ef06404c66f1576c67ddf7ea3 frame00000278 +f7aec0888ae18b74ba119508e0d71606 frame00000279 +b58efb490c4c8cb734b7bc58cde416b2 frame00000280 +d980bd47d1ed0fed508cfbb002952b66 frame00000281 +4645b968e45ae91892267589d5cf4693 frame00000282 +c232995aa43515a8c6e0b085a6e0befa frame00000283 +4fac924612a7f63363fb49f041026aeb frame00000284 +448ae48a6336992f043ceaef9877e706 frame00000285 +e46f10531b424e95f0a09acf90d3316c frame00000286 +8b593d1594ebd24fb9c5ecb40dcd3418 frame00000287 +52461e9bfe28b1b6aa398c595084566e frame00000288 +00ab853274d8aafc13577114a4deb639 frame00000289 +f10a1f8ff64fecd6035d24ca3966f52c frame00000290 +8abba25ab31ab392165d845ebe6434a7 frame00000291 +0634747969d2eb75f467904c9eb4739b frame00000292 +338915cb15c19cfbb4b5ccf7d0386774 frame00000293 +ff4da418de362717cd6edce70a6241b1 frame00000294 +f77ebb00e2d80f186885e82b75080e5e frame00000295 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR2_TANDBERG_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR2_TANDBERG_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR2_TANDBERG_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR2_TANDBERG_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,296 @@ +57ccd36d414aa2b0fb53bda37e185148 frame00000000 +8e693a410c1984b99898b4fbdd5e6d39 frame00000001 +8ced2ba7a9102d97fad48bc101f3b5af frame00000002 +dca896e4064f0185712381bdf37691e7 frame00000003 +5e935eb1c0dbfeb8f9eb79d6e143538e frame00000004 +9df907736930a1c5566c323650301091 frame00000005 +7faa427c89618c9b6d0cab9549fd1b60 frame00000006 +68fc0747e615dc0bd33206314154e5e7 frame00000007 +fd4b12dd4c3729c7fafc51fd9fe38a68 frame00000008 +b62cc7a9d9dad61adba9a9525120cc09 frame00000009 +d377059fb5fe56fbd4e3765de0dde5a2 frame00000010 +1798dfd112a0ccece84c4b01cb8b58e7 frame00000011 +c4f4b6c42662763259b7b0c482837807 frame00000012 +0c23b1546fb27a4f6b998954399f2a2e frame00000013 +4cdb3acfc1b30eb3265a8dc364865a9e frame00000014 +15f6a35f1a8621eba3a355de10d45c61 frame00000015 +05103721240421f36f6a238eeaaf190f frame00000016 +b78c27b53eafe38db6909c92abb203a3 frame00000017 +5326d91aa15d41651b4dbdcdceb601dc frame00000018 +d480f3e42b413cfff0b7d7020909000d frame00000019 +3e6ecf8f47b71aab6b33ff9fed15d814 frame00000020 +01d424c2204220be3083193a119fdd0a frame00000021 +2015330dee1ee5b88924d6e4332da5bd frame00000022 +d0d7631a5f34b1d2c08112a9be06d8c7 frame00000023 +3fa7c74e2f82930c5324d863ad27186c frame00000024 +ad6f4e8bf0d8051f5afa9fa19decb77c frame00000025 +ee224baf97f508c2621d42d08b977bfe frame00000026 +212592157265641e85301154f61eb740 frame00000027 +293cf9037d9d210619b0ed9680af88e3 frame00000028 +a847c309d53159f79f2f35de74f67ebf frame00000029 +ea7ef24042b9596cb5c444bb8228f7ae frame00000030 +9cfeca35bd8fe4f832e40369de4b7dc3 frame00000031 +24d4379c68e0e859cded354406f63508 frame00000032 +922b07217811683998af23beaa1ea7f2 frame00000033 +aa287d01d229620f979d15f89db61354 frame00000034 +566abf36f9ca8a84342b6128183fedcd frame00000035 +15c619b79da77ffe212857901e683cdc frame00000036 +10fa1a4ccd7330ceffca36158e0f9715 frame00000037 +13632355461453e1d1622eac1cb16642 frame00000038 +2e14eed5e85a9866225b10124f5f1e89 frame00000039 +1d67f35e3d37326e1628fa839fc35007 frame00000040 +10488723b431cc22164f431ecbb9e095 frame00000041 +c1e6099e608fe2676b915935295849da frame00000042 +696cfdc70dd8b2fb1a159f9f99c7a62b frame00000043 +e4c67de1e7271a00effde2ec10ef9c00 frame00000044 +41652262c06abe48dca86e565a49f51d frame00000045 +4df972f1bff823fad0f1abc460d77644 frame00000046 +24612156f53bd03722395e8f27336a41 frame00000047 +8c1bf0979f4eac00fbb9e22e29e98e67 frame00000048 +c5c57a784f4fae40c60540781f456c91 frame00000049 +953ace63632ef0284c6832d7197acab4 frame00000050 +5119ad584d178ad803446a269d809f97 frame00000051 +885f6ef14ef4cf9184e30108a48ca347 frame00000052 +53dd1c29232be6e185efb81f55f29b20 frame00000053 +c701d8477bbecd8e3afc6f0ec5d9714b frame00000054 +e14a44a934e2ccee68d3de8f20799d51 frame00000055 +973309768f5101fb86c5e24b283f23e7 frame00000056 +6e8788ddd3dc0e9a2212dac2fe9ca16d frame00000057 +6fedf6b71bcbe81c1978ae755d3d5e5f frame00000058 +9066df78843ad67ce170c60fb551a167 frame00000059 +621fce698979e0ebd0f0fdc82092fe3a frame00000060 +0698b3d4e8ee35f622d97d4ec33ee662 frame00000061 +2839fd530735f9b7b669adb09c2b9025 frame00000062 +8054fd6d5906e3c9f3b30eabb9c3f818 frame00000063 +e0919027283288dd2485fd16d5584d8e frame00000064 +a444dce141fcbc0bc363c14beead8276 frame00000065 +0594423ea61dbe8bb0cfcd1d626ce8be frame00000066 +d26faca0948839d76617007fcacd8fdd frame00000067 +ecb2f5ba4ee8ccda5811e7686160652c frame00000068 +5e335ed52e52d49eab17327e864eb06e frame00000069 +b24784d1e83e119890f7d433cd496215 frame00000070 +c85ebddc068e585f639dc5d0cdf5e615 frame00000071 +28ec7eca94c7d52d55019f642ddc51cf frame00000072 +d65dd7cbbc8c6f1fdf67f945d6be3d62 frame00000073 +b1c70f63f065b26ff32f2c4e3c84df7a frame00000074 +61f342f62857036219f44043434b3503 frame00000075 +4f51993d8b967ee4e0dd7870a67badad frame00000076 +a02e0c92a76694cd53fe44df4b9188dd frame00000077 +0945e32f42cd842ba24476481cfdb274 frame00000078 +db41eab05fc60ec29bfd6e634895c827 frame00000079 +145dcc3ca3166fe021ae76a1e9b8f0fb frame00000080 +c555dd36e7c5c762e3fb2efe67845831 frame00000081 +1b9c95aade617c8b7910853bfb38d2bd frame00000082 +241d514c64eaedc81d1a5c63c9a15737 frame00000083 +89c7d366e3426fb8d61756153b3068b0 frame00000084 +4421b664cd68c64cf84524cfa3c5eee4 frame00000085 +dae7980894baacb14794eab4906f91e3 frame00000086 +d68b517816bd57a1ef4e3cfddef93aa3 frame00000087 +81ff7c6c51ab46bd22f68ac0102cd598 frame00000088 +85875234941920ba7915ec4fa3bb1dde frame00000089 +e758abc50ab339ce5713acf523e04a61 frame00000090 +351f65b10aa9407feb58fdc7fc8311c9 frame00000091 +24a05639ebeb8a263c69becba721c632 frame00000092 +6f53a81fa57fa35d6eb7e3e5990a2063 frame00000093 +9d73d4b4c1ae99db06d6e351a7019cb1 frame00000094 +02c5a6794ee8fb54966a47e116264c8f frame00000095 +6fcbdb53d47e9a07e0ad0709f0f0e856 frame00000096 +ebaaa33cdbf6c4aef36fc12a34cac66b frame00000097 +f9b69273d352b850df2c72f826fb8acc frame00000098 +552b3fef2834b56921dc6067e958c999 frame00000099 +a858b3d839916bdf9b7a3af86c0d6977 frame00000100 +ca45b700662004edb1dd916e76278ea2 frame00000101 +c1566c5fbdffef8c3bc8cd588942b0c2 frame00000102 +551fec2f14f809f466ebfee311fc69cf frame00000103 +1b67dd2d9ed18d9d0b4ad412572cb34c frame00000104 +95ed66cca0596b5a6923da473e1d1797 frame00000105 +087356ce3bf5b4b533478b529cf11b3d frame00000106 +ba0a82c7ebe29afa11dfdc6e8de9c366 frame00000107 +b194405a46f13abb5dc77fcae35b2120 frame00000108 +162596d2030c993285d738c929e4aec6 frame00000109 +6d3c555796394aa1a91774ff92dbc725 frame00000110 +2e8aef1bc662f1362f9647c8c6e6c406 frame00000111 +01cacc8135ae4b5e6e9fa77ccf65ee58 frame00000112 +4061356ae8105d27f56099897efed24f frame00000113 +3b12a5f3748504429dba60e171d2d85f frame00000114 +2c580820fd98ef3ad785a261c8a59cb1 frame00000115 +26063c1990a997385749ae1aa45d778a frame00000116 +37eeb018901feacf966e00410b7c3a77 frame00000117 +e33c7f501f77a4c0ab3f38ab9ede2643 frame00000118 +5f8f1a445c9aa6a0e3336e7822807a10 frame00000119 +cda02fcdffa7dede22ee08d31950158d frame00000120 +ae259e1f4960037506ae2822c805aaa6 frame00000121 +b995822fe5fdb1e02e43536724150a82 frame00000122 +f60d09926d53b90f539c99b391f196cb frame00000123 +66bd8b99480cd238e8c31724e31a4b59 frame00000124 +4ab53ab34292d39ef5795a8251e92a51 frame00000125 +ebc0a816effada1c4ee14b86338c0398 frame00000126 +ecded0cc4295037d7d7dcb76b27fdf22 frame00000127 +d64bf01f03891e10ef2c4bb84b4e0940 frame00000128 +c8f49b4156b8bafba352086f2706dcf3 frame00000129 +d24294c47aa0eb11b041302a1e2174f1 frame00000130 +6447a6605a47fb58d8a368a0c1dcfb37 frame00000131 +52c18191acd25abc27dc7d55cf2f3618 frame00000132 +55bddf8f1a02d069ebc398486fc36bca frame00000133 +9c0b22d676b5251858d07b63e26a88da frame00000134 +a39a0336092bab0e7fa24b9a4094d2cd frame00000135 +fd868600bd7c2a58fd45521be658fb93 frame00000136 +2ab929ce3d2d621fbac6a5cbcdc8a764 frame00000137 +6d6adab53cc2abe4567d14df0ec3ec41 frame00000138 +0433e95b8ff0e364005436ff68f63221 frame00000139 +513cddcfcbbaa44ae61dc4692fb7e3e4 frame00000140 +ef747e84585f7ddc4b1dd189731ee972 frame00000141 +d8cdc905af56ff205fd1f02a6b0963c8 frame00000142 +22334bff8b152e42b31c6262fa2d1af6 frame00000143 +bbd31961cc8e8920e8e63a9728a4342a frame00000144 +bbd1fa1d4fd0bfa97714d343717a8c65 frame00000145 +ec67631302ac8eb81f680ff20fffd717 frame00000146 +bf5b6d4f46eaffd530b58b2e2b2bfa86 frame00000147 +2a7712b6802d8f8dbc600c65f9395c11 frame00000148 +928ef1142a7d6f3079c3413f6c4505aa frame00000149 +86729f8843815effa0bcdc985ebb4b7a frame00000150 +10dfe6896d3255edbd86fdcfff1da799 frame00000151 +2f599c8fa43dd7c11c12e8d8e9f498c8 frame00000152 +973bde10bffc35e2ec4a75fd92c335e3 frame00000153 +927c52272a89a485ccb120a0f06df07d frame00000154 +4a20702fcda1d8e4712e4c93556f2135 frame00000155 +56e5aae6054ecd5adc80637a74d0cde9 frame00000156 +741f156b606b491f012e2f1cbe33f704 frame00000157 +be40c01956b06db766daec4b498403b5 frame00000158 +944dac9a34d06bb97d15c3bf65546bd5 frame00000159 +9ec2c4bf07639b4ef23d151ade069106 frame00000160 +59a11ad74f098da1f909a712d96fee40 frame00000161 +985f3eb7316e519f7077e269ed06af40 frame00000162 +5614da9967b5f6be688d90046effcf0e frame00000163 +d63785e7bbaa1ebdae419fa41e89a7df frame00000164 +e6060d0f34b33a5ee28f5fc79d30db72 frame00000165 +4adb30f1936af41f02a6f7c2b3d23b89 frame00000166 +08f0e4f91a42e7024a7543d3625cad3a frame00000167 +0cf7b9a09d327c25e8a87b7c077528cf frame00000168 +114aa2d8eedb46dc0d77adbd4b89ab73 frame00000169 +825ae87750dde321198ee4d47b796d75 frame00000170 +15aa213be0ae42486af1330096dcd471 frame00000171 +b0fd2af44bc62fa021f25d59af30fcb8 frame00000172 +6c861f8bf0f9f6f2acc2f0c1e1e4e6ac frame00000173 +3325074d614f8f80aff0a9bb5487483f frame00000174 +82ffe6991d454335cba236e22a18c080 frame00000175 +eed3588e76792a84da5b16dd121d0418 frame00000176 +9e9b0afdad26672cc40ac49def439ac8 frame00000177 +20959e43ac9129f0dc5045bb4d1d178e frame00000178 +080c7c10346c8b82fd14a5bd1ea874c4 frame00000179 +254fd31a8118fcb6cea95e09483e6526 frame00000180 +91080156439db83ca2481e8fbadac34d frame00000181 +ea15339bcb924851807e0d0e8c758e27 frame00000182 +622913f5d6a0593e5bd25e339dfbf9c9 frame00000183 +3467d17483006f76332cd070150373a5 frame00000184 +367a708f65809fc44687792e5aebaf99 frame00000185 +5fbb2172a50268e9811f35a89b1c5c51 frame00000186 +d2d711d758aa57f035b54684139a2bc8 frame00000187 +340512e2af754499057171a0a65ebe7e frame00000188 +5b927e7da4fcd174aadd34b6e527079a frame00000189 +8f1ee137b6819196a578bd2864204d7d frame00000190 +9eb00e8babc817e3e43c837eddf28335 frame00000191 +e6f5c80d6e40a241e33ee251b9c5427f frame00000192 +c57ad50dd0737041b42136d992c139fa frame00000193 +a192c423d81bfbdb72f1751eda9aa31b frame00000194 +6f7ec20cbf43a36a9bf87e5a248acee4 frame00000195 +1d2ca1a606572bd512cde8f688414829 frame00000196 +da69dc7631827bae971d50947988ec7b frame00000197 +a92a79c9a7a44a1d7be75550d298b9ce frame00000198 +32dc4db84878d7cf56bf2df8738c41c0 frame00000199 +a36d4819005b3b5c07c3df7ed9550d09 frame00000200 +7e22e841ecf3e6880f4c9edc7e80b5f9 frame00000201 +ff336dd9d20ca4ac3c003b01bc737697 frame00000202 +a016cd294e1a92eaa8fe90b46f4d136a frame00000203 +123315a49a7dc512631ff733cc6d4764 frame00000204 +bf4c938e84f13ac1923d1741485d05c7 frame00000205 +7a4df9e12aeb7d812a5ed41e5c7c69f7 frame00000206 +8a64378538310ac1e186f1fb93013a4c frame00000207 +057a1f3ca0d2e1d4769f8e64170e29ec frame00000208 +b73a954ef0b599c3bfe84cf5c58414cd frame00000209 +5ec526721914368b56ec4fbf9535618c frame00000210 +a53aeb8a32a07e79b1994049319916c0 frame00000211 +beb78f2d92c580f3e499c680bae6a0dd frame00000212 +2ea66572bacf18e84501b3c4925f2d89 frame00000213 +7685f7a8db133bae708c3076e5287159 frame00000214 +df5a38e1f77d4305ff731c4105a37250 frame00000215 +4b2f6ef962854a7c03d376aec26292f0 frame00000216 +386b939200b2841d70c35ee80e7a15be frame00000217 +bb8341eda9722bec21597cdb365c55d0 frame00000218 +14fac3cb8bf039176c7ce420f036f201 frame00000219 +cb868b4630acfff744ce2b69eff38eda frame00000220 +40b5bdb2ef99798881547236191bfb3b frame00000221 +8a0799f6af76a5a569e2824eeef9cb58 frame00000222 +bb90a37a59b8df71f6070459d29cdb60 frame00000223 +c6d942bc9b645402fe29ac9b0f59e852 frame00000224 +7f27e1590bdcfbddb3711ba91af83e02 frame00000225 +9637fa1ba798ccd668b746b77e835d98 frame00000226 +f00f3bbb40d5eb896e8a5da3eec52bc9 frame00000227 +95b7b02734bcb76e50048bbe8f9027e7 frame00000228 +82384601b6cf0d5b16383a9f5419a700 frame00000229 +1b08a0e578768ac70ff9b03281cb0037 frame00000230 +c55ec697eba434f64fcf55f253b6db66 frame00000231 +7f6b0db3d79f274f25593e234feab2e8 frame00000232 +1ad36d74f66e7be97ff81b332e24635b frame00000233 +54dd5096992346cae0911e6ea35b7e4f frame00000234 +e63b9412f3687f2164ec5c799c573c3c frame00000235 +32713d003ccaf51ea14cf673c08d6acc frame00000236 +a2af880d21b12c5dac1af1ca6ab18d15 frame00000237 +2c13a3d496c7a8a3c1745c33984df34d frame00000238 +0698f65916e36fa23d459cc66e768a18 frame00000239 +74c4ef7cf2af11aaa7413d29811a25f3 frame00000240 +2547260afe4c6e08260ca3a8e1ff599a frame00000241 +fbf40aed568a0ffcf62a5c52a646abae frame00000242 +9c07a3d1b4b21503b259fc7920110a1e frame00000243 +08a6ce73219501be23b91da456ff1da3 frame00000244 +51691fc4d7c4b1015a522eff03a9a4c6 frame00000245 +b61558e635fdbf81bcf92c6439c4658e frame00000246 +8daa216b45da99403b776d6c59a790c1 frame00000247 +88ecc5fdc7948465043aec2546238808 frame00000248 +fa84bdacea7c6f0227896808e5c1b44d frame00000249 +0dd9ae4a2ec34adfb7827827e0103fad frame00000250 +653e4c0018f162aa69b3c3722eec3fcb frame00000251 +01392ab0a99d3acff303a419c31e5180 frame00000252 +81fc56e68d3781549317cebb3f348582 frame00000253 +1206908a867da6768824ee582ef6ff04 frame00000254 +dd56b5453f8f1e38fee8f60b2b168250 frame00000255 +5ecb164bdef898b805ce1fed24957d81 frame00000256 +c64c0d5a03e86ff2190f25dd5e8cf193 frame00000257 +bec7395fd70ad00e4cbf0d38107371b9 frame00000258 +750060b156a2514d1b88bbdb4ab63980 frame00000259 +59465eb5da90335c90ecc275cd23f93e frame00000260 +20496ad169b9439a6ecc936e7728ac21 frame00000261 +0fa0d8632c1e273076b6083d149a364e frame00000262 +eeed77411468bb0cf91313ddf02a9aa8 frame00000263 +617847bc97221aec052baaff758f59fb frame00000264 +e7e363d52317f65f2a02c439d0b27248 frame00000265 +4a6b2e5c26d412572d14d73fb69f1107 frame00000266 +f05843e6abeda8c0ea2885d4599dbe66 frame00000267 +5430df3b731d8389817f9a65c3ef9bb4 frame00000268 +aaa105659610e038022543da8c49144f frame00000269 +39ac2720173bac326c4ca80b72a15c82 frame00000270 +ca2f347e6949ef10f7a283770ddf08a1 frame00000271 +65ef61d33532b5edec10a4c002230198 frame00000272 +1b7686d01cf462214393ab202e4c0350 frame00000273 +b6c5dc1a0b67812aa91d19203285be4d frame00000274 +ca8d9f9449621c92e9d1d614351cf76d frame00000275 +4f3388fd049148cb4f855ad1ece34526 frame00000276 +4174871aaf8c5825ce1bed7973e8c83d frame00000277 +5ea04f89ba7f8e502e65735215db10c3 frame00000278 +9ba3f0ab383535bac807ed0322eea4cf frame00000279 +f2153bf27e79200cb7a866e1a2d5da81 frame00000280 +be4cc68fff7ed8b24f66bef33fb6b68e frame00000281 +6bddcbe430055d7f88bffd657e429b8d frame00000282 +d0cdc028c7c0440cdbcf351d91b322fc frame00000283 +2a2e473da5ff8f6a5d3ee42d92fba5a8 frame00000284 +3c29a2c5187edcb098652e92ad76aad5 frame00000285 +bad67c5eaa72e2ec48a171d6d996c301 frame00000286 +277d94ecb01d972a3a302c40d8cc1333 frame00000287 +02b1de51ccff213ddb44c2593924a1a1 frame00000288 +fe48ee7c5701cceda078331daa223a19 frame00000289 +9d0f5cab304fbae81eb31dfbd9647da8 frame00000290 +3b7b5ac6470e418b2e8621db559ee0f2 frame00000291 +4467041eb8bf7383f34c673bd09378cf frame00000292 +5f13b10e571f463351a82ecaa3b1c8e6 frame00000293 +5a456bf0622637c147565cf080220870 frame00000294 +6702dd01d1c36507d92a04f2eece3773 frame00000295 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR3_TANDBERG_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR3_TANDBERG_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR3_TANDBERG_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR3_TANDBERG_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,295 @@ +57ccd36d414aa2b0fb53bda37e185148 frame00000000 +8e693a410c1984b99898b4fbdd5e6d39 frame00000001 +8ced2ba7a9102d97fad48bc101f3b5af frame00000002 +dca896e4064f0185712381bdf37691e7 frame00000003 +5e935eb1c0dbfeb8f9eb79d6e143538e frame00000004 +9df907736930a1c5566c323650301091 frame00000005 +7faa427c89618c9b6d0cab9549fd1b60 frame00000006 +68fc0747e615dc0bd33206314154e5e7 frame00000007 +fd4b12dd4c3729c7fafc51fd9fe38a68 frame00000008 +5c0408ebd415779e2a802d80489aabf2 frame00000009 +b667dce5524281c41137e5018292bec8 frame00000010 +047f2b05be478ef871d8e5ba46f118b6 frame00000011 +0e0f78531927a8d450482520e1abe638 frame00000012 +dd670c5eee7dabeaa8045f68141a5d58 frame00000013 +24b0c4fc3a7df94856efe27c72b6a590 frame00000014 +7e241e88f29079c944a2eb2fe6d362af frame00000015 +45c49a11d089c33bd918c000cbae8917 frame00000016 +955c431b05a556af78a2d320576cc2b7 frame00000017 +8d0ebb1f2a18b86cbb0bbba665b9f59c frame00000018 +b4a20692a66745475823178a41d29a36 frame00000019 +762fb39aa5b09c7dcc7bb4034dc6317b frame00000020 +73e2e48206627d502731f9445e003209 frame00000021 +eef50100167d590a632adace4e1c822e frame00000022 +e91046667f92e13ed1edee6d3768dc8a frame00000023 +8568461b398a772f334c84e184fc4e20 frame00000024 +f259b50ab2503a9a9b5100cab4469b18 frame00000025 +73677455fb99aadd60e237265dfb66ee frame00000026 +e67805a1542e2c7aa86f7c04e0b5b2a4 frame00000027 +899f4fe6f6b3cd0ed112dfff972af5a4 frame00000028 +90a2dbfe334527dc7ebb71176a40fa9f frame00000029 +07c180d80b8092f2f9749ab2f3d5079b frame00000030 +d7cd27e38d83421f6d662eff1ec4a967 frame00000031 +fb1bf038ac5c62ecc25fa7b7dfa777e4 frame00000032 +c3e748b2a1f65167177e226b8a03a2f8 frame00000033 +01a8b00e1300679a0eea092da94ff12d frame00000034 +46d024c1c3a582dbb72e332fc7ada3cd frame00000035 +0669eb6a558aec6d26496ff25f6d38d2 frame00000036 +d0b3a828e1bb407380b953e204c512cb frame00000037 +7a692453dc215700849b50b4174bef7e frame00000038 +f77974b54b3d56cd468cf36c399d6996 frame00000039 +cf836cacac591703d71f6ec0895c4f9b frame00000040 +041185dfecf8de0b6f31ce6dcc3dadae frame00000041 +3cdda01a33ff7c71cafd03b9d29b10f3 frame00000042 +0606b973047cee717f6a507b05f8ee8c frame00000043 +fe18886962b218fc1d21d03a6356321c frame00000044 +b4a761e26d1cfc85d6a3a584770eed61 frame00000045 +d7a842d455011434c16f428c3cb4dc58 frame00000046 +39469f337c7c80714eaf18b390838b4c frame00000047 +75e1849c4969d883a69e6fc210109525 frame00000048 +612396f0a0d3f2231260e3f46f28ce27 frame00000049 +a3e95218a075483e6a90370ce4f6f62a frame00000050 +db16058edd7ae98db45e326ce435485d frame00000051 +a928f5ea242ac95fad91b52e713de827 frame00000052 +7836861f6d7bb6ec65a8701a2b654a0e frame00000053 +ed2c2696ef717133732abe6767e82000 frame00000054 +97b694281be1dc011da63c9e72479631 frame00000055 +9690555f9f1c100d3887c19f0a716185 frame00000056 +c79f521b0e09bb4d149b97e5c5295aa0 frame00000057 +cf32fbbb14fd448d991b004c0083f98e frame00000058 +450e439496edd01aa6b878986f6440c0 frame00000059 +fcec6f22348bad0acf4d40a3cc58318b frame00000060 +cdc529b91c48d330ebef8071c1cf98e1 frame00000061 +0e091833b04d52789390b9014d87be86 frame00000062 +27b0ac0cfbb763292296042a2952da60 frame00000063 +620a4b74734624a190147857b01d85d1 frame00000064 +d9acfa8b3936f918dc23d8ba1bed0e3d frame00000065 +8a4bb0e0731b197753bf1cb5ba273f1c frame00000066 +885e9f85a87d2dd103d44a68d024fdb3 frame00000067 +8da9bf33ae5dbf67be4e8499c245b17f frame00000068 +71f4c6acd51278e2b65d7d377915f4bf frame00000069 +81a3008bf792998c14e47a4218157c79 frame00000070 +3eb9a8a6704f79e201a453ada1e67bdd frame00000071 +b5765c5ab5dd4dcb0474cd08278610ab frame00000072 +bba3fe8444cc2f66b3f5465e7e563650 frame00000073 +ca5f284436912614d44a64d92ab7673f frame00000074 +f2f4b05ba2909f97a5db1535d3c6043c frame00000075 +5f52932a62bef01bf81f8fbe7ff24cf5 frame00000076 +58b84209222cc136ed66b0baf477ffca frame00000077 +d7780d9bc078660ddddf0f4ee7b7df41 frame00000078 +1f14ba6de4d5bb5ec56fe8fc447a1775 frame00000079 +a617104d541b085bcb7a9e79493a0dc5 frame00000080 +687f1eed73aabbe471e721aa4797602f frame00000081 +12201ede0e19fc209ae9d8bff1c8c3a0 frame00000082 +60f23088947a6d633727d5d800ad9ff9 frame00000083 +a6ee13564e6279b9deca69dbf6b813fb frame00000084 +97e49d1d7186396cd422ac2bcf82125a frame00000085 +d19786722e2e92d4e0ca8186661a2544 frame00000086 +7546b00342e5a345a59f0c94c3cdcdc1 frame00000087 +01555196f350c3706474e535c6de43b8 frame00000088 +dd5ff19a0af0ab43c07fcba6976ba0e2 frame00000089 +a8f582a59f401bd5bba64f4a80d9e5da frame00000090 +3241c98218041a82c1ffc3133a80c2d7 frame00000091 +e7f2db1d1cc4093d42ff6634ec6d4fec frame00000092 +013ccc96844b0e3f824c6976bd412380 frame00000093 +05ead3d0bdc174bf8e345eebd82a414a frame00000094 +80b9032f32ab406768a10dc23c62a624 frame00000095 +8fcba7a3a70575f224852bfb36d7c34b frame00000096 +0cb12818cbac7de34945b937dcbac7f6 frame00000097 +ddac8c7f147db80cecfd666f4ba245c0 frame00000098 +eedcec0ceeeb105c44a474dda374867b frame00000099 +30e32890cf23a6406a5107affea2bf82 frame00000100 +33bc5354607efd10636b2a3008d70ecd frame00000101 +c267364b2357e1f93f59ee352812bc39 frame00000102 +b10abe7ddb779e4e93f6929e96850e6a frame00000103 +dca1fba5ad536129ede82a1b12d3979a frame00000104 +5fec4b91f8d7cbac4abed94aaf44fb42 frame00000105 +b0dd6df775ad0273812a3c8bad0d18bd frame00000106 +62285beae2f397abb1b6db8dbc9bbdd2 frame00000107 +9afa757767fd3205b9643887661a39cb frame00000108 +3130677126ab487c209a578fa3646aeb frame00000109 +dceff2eb616ed1501d9106a42f7b9ed2 frame00000110 +16dc583d35174307929f29ed1f73271f frame00000111 +3326dc01b16c23e2b93ef6f41c2e14ee frame00000112 +da3dd4270bb84a48e694bfa2a3469c46 frame00000113 +eb1fa1389c7cf79dc841259971e54825 frame00000114 +07f3fe7667f6417eeaab8ec56c02b71e frame00000115 +790643e97e7756c289fc732b4bc74fe6 frame00000116 +35f0323cff9d8900b6d0aacfd2bb227f frame00000117 +add3670f1024a35bef5c0b7a99e238f4 frame00000118 +847260c8799304c64e498d30beec1ccd frame00000119 +91286ef4afc83ce4a80514dd35f281bc frame00000120 +2b60a2236b5301c30e42eb7691112da8 frame00000121 +947e1b57b30b1d9eb789fea9d94ac01f frame00000122 +e53df4fd24c2c6b321de2f29e466acea frame00000123 +5ed2752dc250710055209227e2463384 frame00000124 +83c164c7e18914e2e454062309ab13d7 frame00000125 +ef39ce5541b2e060bb704bf384a9a613 frame00000126 +6a4abf054276c73aeb29331d494568cc frame00000127 +b6ab850fc50d6305d763771a14969213 frame00000128 +1efb77fa0c0e51f0eed082f86dd94ca5 frame00000129 +4959868a3328af96897d1d5c5bacdfdb frame00000130 +65faa398a5ee3cc6bdba7778ded4a840 frame00000131 +80d62a470f742cb00e48ac6b4633c21d frame00000132 +560cc1c3c95fce267c022c92182716d6 frame00000133 +426c83b8018c7920486bdf041a4b8798 frame00000134 +e3c290fa17b9edfd1f19f9503aec2531 frame00000135 +944119d81e62a11dea5d3c13eecd9dc4 frame00000136 +b849027cff8ba11709e88450fad9ab61 frame00000137 +deb6f801267f0573656c770b5fac6ccc frame00000138 +db4042fcb53443736787146b50317da0 frame00000139 +4c7bc7dc2f7612f8690312d6dc7cc6a0 frame00000140 +189a7c734b788d27939821632656f30c frame00000141 +959d4715a0054c23a37ba40b8d414f9c frame00000142 +670bfba879f86ea0bb40b456615149ca frame00000143 +aff522c4b7b7342a6a247d853d816c72 frame00000144 +a3366553425d92773c7a7d438c9a1b9d frame00000145 +21b4b3b0785ed3f00a058c3283797c10 frame00000146 +a3f2641dd7e681ba50b8ec60baf5a7d3 frame00000147 +6e652f90f35a913d4aa529c7bda0041a frame00000148 +d91fcca499fd8834fa8a6a38abe50bbb frame00000149 +4930211e9019b80dfa9530c1ce697cc0 frame00000150 +63d96a22a08631d39a6d74c08db2e924 frame00000151 +48f5ddbc33092a250391067573d8c4ac frame00000152 +d03998d82fcdd448088886f9a86228d8 frame00000153 +976180fe9a95851dded1a84e47beeafc frame00000154 +74643247b8cc8829e6ce0cf506aff15e frame00000155 +ab78cd1b6610a5f722a3998bcdc95a87 frame00000156 +c3d1a1499a49dea42b24762f44fa5550 frame00000157 +912eff357848394298f39d38581cb341 frame00000158 +adac9283977092b4f541cd602c81f9bc frame00000159 +3ce99badfc44a8278f1cf38c29fa4bfb frame00000160 +689be91db45a3e4632e54a9b9eccd0b6 frame00000161 +346297c658d63e31806325768c19c337 frame00000162 +7c6f85f6faa43b76b5421766c885c618 frame00000163 +aa5077dbde29c6af302497de3e44891f frame00000164 +29a7eed55fb0c8384fcf4b2a589afc4f frame00000165 +a939e01a7d4828429a15b18cf3e13f02 frame00000166 +467eef8863a2e4ec4ae9684fdb7313af frame00000167 +1684cc1008d979d8058f6da8d6631b36 frame00000168 +3471f115bcd6086f5ac8536c22b8b53f frame00000169 +c380579619e50ac2ca7b9b59aa624ed2 frame00000170 +9dfa350e4defc2b4f50121796d4f8fdb frame00000171 +d2e573b4fad97ad252364ecae6d3d503 frame00000172 +8689e9f591f19ddceb46d8e3ddaef574 frame00000173 +644aa0b1b477fc4c21882007814f309b frame00000174 +7ff4111abb79fe0a19ac8657326cb47e frame00000175 +ed42334a323419db7d0bafb9d7b2422f frame00000176 +1658bbc48c848f8efaef5d0e89ed0fca frame00000177 +568be0159a4be340646c720120967cc4 frame00000178 +3f98edbf983ad92e2e4987c3863ceb5d frame00000179 +651dfb842d0a9100c57009747cf1154c frame00000180 +c3830784ff72604e5461fdc38ae5e147 frame00000181 +2d10dfa7b1ba436663e14e481177d3b8 frame00000182 +2809193f26eb924f62dd8aac2a06734a frame00000183 +2338a61cdc521c915591a3ba985f797f frame00000184 +9b059c6796ee29ea931273860d6bdc6d frame00000185 +d28b8568c0643f6c6a45701bc2331671 frame00000186 +05fbdda6b0e942504357a3840a687167 frame00000187 +dbd3597309339e8b8fedae12456f5b53 frame00000188 +8e3eae97e2613bbfebbf889b089cf664 frame00000189 +f94560d37765c9e04967b5ad67f1a286 frame00000190 +18fc12e5168f0078cb826f95c4cd5114 frame00000191 +5e86dfd8186abcd896cf626963f27960 frame00000192 +3926423f19776f26ffe57d8eac789f07 frame00000193 +2235c81725c3282cb97527b1644bbd4c frame00000194 +29f8a8385adb069cd74607160dc1089a frame00000195 +4c432704bc41b4785fff2ce453ab0eaf frame00000196 +76d13922ea2fde718e3c4a7f50938166 frame00000197 +86827755313624b40702cde7a62542d9 frame00000198 +f5c46a04268fe450e65508af42e95041 frame00000199 +8b205f3888500aed636a07b1518b1632 frame00000200 +014255932bf307f45f7e1d84418c66e2 frame00000201 +500ecf04711b53700990d7b97d16e48b frame00000202 +2689d9b02f46adc06bc4e115fb307c00 frame00000203 +6effa84e5e1b2ee06bee3c6ab6cbb689 frame00000204 +22557055a7bb83e837649f2cbe86fa2a frame00000205 +704208803bbaf7a3da8cadb71053b163 frame00000206 +459c3c66b9d0f5312878005f984ea8e6 frame00000207 +9e7b51ea0035983c88b2e69d28fe6408 frame00000208 +036cdb57812bfc57ea29a62153978c60 frame00000209 +947f410cbbf43701146ddb11d368ff02 frame00000210 +cd8ce2b9fa76af653592556474e81f88 frame00000211 +e843a547b865a67214bed0e2dff0959b frame00000212 +37b03fd26148b6f59590186773e7e6cf frame00000213 +911ba332daf9af6420c9fbc55ac9b864 frame00000214 +7de186e42699bebd96dffb4a9ab2fa46 frame00000215 +7563f2cb3a29b4afc0135d58ae1b33ed frame00000216 +0ab6061d5b3cd99c4f6e13ca90ce6ad6 frame00000217 +1d7a02cc8e7f5d5eecfc4218af718e4a frame00000218 +308ed68b156bf6014e71536ff69dd3b2 frame00000219 +1a27286d671a41d3ffff1740968047a2 frame00000220 +622bb6cc64887f600eae2085aec2d7b6 frame00000221 +2a509918d1b0e6b2905f809be118cbd7 frame00000222 +45790c164ccbb8af7ec7e986d4f962f1 frame00000223 +74a2a6c4c73523c60225213b82cc9d34 frame00000224 +c17149977154c110d0dda20a4e9513cc frame00000225 +3a3c1e1c4bc4e563c3b735c2a4e96c61 frame00000226 +f0c188513654ca00a554f4df3bd993d3 frame00000227 +a3f1334cfea6b240dd7809c5eabc31f9 frame00000228 +d848790d7c991a4fda88506957eaa462 frame00000229 +10b3c2dc7bdbcc9add2504d8d14dffca frame00000230 +7cfd6002a7708ee20986e542e7a93028 frame00000231 +cb2170c78292974fa55d4299a8801680 frame00000232 +f75f19d0ed5a9a384233bc9770d4af79 frame00000233 +fec0218f3e2501d8b7bfd8af6c358c97 frame00000234 +874280adbdb34eefab2413e94d744331 frame00000235 +08c5d0f3062aabe1fa58addbff4576d2 frame00000236 +06c5c6a9392d2a425d30e57577322cc8 frame00000237 +55973d8fcf3987bd78e40962acd2c85e frame00000238 +cb2f4db2f90f4f7fceab2f0ba8e66123 frame00000239 +d7a457d805b31846b037f82cece4475b frame00000240 +6716940fce0c12bd3eea7017822b9bd7 frame00000241 +2e2dfbce85a796470d5e1791d41a4bfc frame00000242 +e42e9daee15befcb2dec56f3da79f5a0 frame00000243 +581241215f3158771859db14605cd2f5 frame00000244 +cdcb8930e9ac9fd1b180e0fbbaf03a95 frame00000245 +861cd5042825c4f6b307c0dafac2cdfe frame00000246 +3d2c9a384f3ff6a1511bd213fbf0386d frame00000247 +66b0deb52a4a2e4b345c5a6a8804b5fd frame00000248 +99d490e6f7647a4b6835fb8ec881cdbd frame00000249 +3d5f1ce6cfc2261cae505fc6748400f5 frame00000250 +5ccf4b589253676c2624e51a8a5ed888 frame00000251 +e40fb61ded72a66bfd252ff187864146 frame00000252 +2da7171ccb00d61f0410f234374482d4 frame00000253 +179b43a8cf18ce37240554e17da4d59a frame00000254 +440cf43b56c51f87db7dfac7b852d705 frame00000255 +0606e1e2da83f1997a575768f9f1c32c frame00000256 +99996746f5a9864bbbeec009835e3dce frame00000257 +331cdf4ca90c7ee04755af8734a176ae frame00000258 +f3c40a01813dcb1961403b745867c79c frame00000259 +64038f10c8db874fe0b2fbcdc2d6dac7 frame00000260 +3c7d7bcc4969b05caa891ab57c1c5292 frame00000261 +61c74c89b46d2de46370a22c4fe29385 frame00000262 +15154b915467fb4119c0caab06e3a5bc frame00000263 +a703b694c73a49bfaccdc5bc4db34cfb frame00000264 +09f3dae6763afbd279784ce60ec10653 frame00000265 +40bcfcc7b28ad59c4d6f7dd5b4d2141d frame00000266 +6659fa9f6aacd7697353640908e50cb4 frame00000267 +74ef710325d3c806a21d4a3be1f0e74f frame00000268 +744282fcff4e0146e63e9ecddb3f6f9f frame00000269 +4eea955248bd8251f46be80b2522be40 frame00000270 +c393fc73583da70084b4ae915b145ab2 frame00000271 +86f71b59862186959de8634881563c84 frame00000272 +af6fea20ae88fa22f16a40c08c5d63aa frame00000273 +e2f8ea1482ec35bd83deaa6898eb90ea frame00000274 +3d8c68aee5eb2fb85961102cfe50f733 frame00000275 +4c4a2bd80f5d3a201d6afaa95468b069 frame00000276 +dcc2c9edc9fc5b4a6395b16991c038f1 frame00000277 +48daaa52248ac6dab87ff4ff3ca1a6a0 frame00000278 +6d396146bbd9f677b58c662fe2dad9a9 frame00000279 +0148484df662cfacc105dd3a9d890a65 frame00000280 +82000d2cf21234fec529e242477ff4e1 frame00000281 +18ff8e20dfe3b74e5893af488f48cf0b frame00000282 +bc71d122e0a154fd7ab3ebd1e83bab37 frame00000283 +8b09bab74472ffe90b4ef4e823ba08f5 frame00000284 +ef87c8e4ec7ffda264bd1e22b71800a7 frame00000285 +056603bd6df45ce0c7fe895ab33edf50 frame00000286 +87938a275bed3e7412a829a97712cfb6 frame00000287 +27623b8ff9ed5d35fd11086d40d1b6f9 frame00000288 +ffffee8e803fbe41b3ee1a7b70006005 frame00000289 +ac58031e718acf34ddf74b3010124cff frame00000290 +a7b6da80edaba9e5b6e26386ff230652 frame00000291 +ab50732f5a0d7bdf88029424c8b75875 frame00000292 +759984abebdc469c3cbfe27f38abdb48 frame00000293 +26dad9df90569fd98af775cb58e218f9 frame00000294 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR4_TANDBERG_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR4_TANDBERG_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR4_TANDBERG_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR4_TANDBERG_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,277 @@ +57ccd36d414aa2b0fb53bda37e185148 frame00000000 +2e1db3295b0cdfc0bab2e6045339397c frame00000001 +25d1be2c8cf586d96ae85a4c1551bd29 frame00000002 +ab046c99edd42939b2af83db798e066d frame00000003 +fbb94e64d4ea5b294d492373e57e66df frame00000004 +c636b03625279e27042d0e3f5c9975b5 frame00000005 +44cd339c54fb1aed9f033e0a7753ced3 frame00000006 +49ef03a03fbf03c50fb2afa1a36796ad frame00000007 +df3adef85d8509d022ca9c0cb8a59025 frame00000008 +4ca55014b8c1e162966a4a3af16bc351 frame00000009 +619f06cbe758fa39afbb29ad255134ab frame00000010 +445541b419233d13ffb101746900000d frame00000011 +4b78c3acc058ced2e7df471ba1d527c0 frame00000012 +8f517fe390672739d94dadcaf35e0bd5 frame00000013 +ebb9f651336c3ff6e7e3c49ec4cc8b72 frame00000014 +f9b2ba2ec703fa7e17eabc8b55613344 frame00000015 +ba948e4ffe2ecd8c034b7289a98705b9 frame00000016 +61e2ee675602eb6207d4b70cb8c04dab frame00000017 +de9d1a517d6c9b3d3bd58c0cb9dc1074 frame00000018 +3698289722cdeb4cfd819e7e87c124c7 frame00000019 +92abfe9600a536a3e2bc4795a8d44815 frame00000020 +a7478a1699c328c26d9dfbf92cef530e frame00000021 +abe7dcd454685a23680b49032936095c frame00000022 +8251b6978a67b896e3f9eac1828a30e1 frame00000023 +d21c92e51e96cdfd0ae35cfe8b14a585 frame00000024 +1e0ecf16cefc32a3382da8e2a3027ce0 frame00000025 +6f920b8f8c778759787d2405a2275f54 frame00000026 +4bf06f38a552a9f43a1709e11632a570 frame00000027 +7c69e346f130fc9a77ce05ada0fcccec frame00000028 +391a548bbbb4ab044b5fa536034b2825 frame00000029 +10586388248c1d9e1d75e53448646506 frame00000030 +7da230f9d7043b574c3383f6eca16bd2 frame00000031 +bc6455fb7d0d46ab6c487c258ea24ab4 frame00000032 +dc02b141a72d86c214c873cc41470668 frame00000033 +9bf989132619bd5ebbb84da20c1a65e6 frame00000034 +7264c754fcd219c320d3ce3a7899950b frame00000035 +fba3efc81868d52551c2c395cf2a55db frame00000036 +475d8da3e71a0c0f768fa6ce0dd11ed0 frame00000037 +7522f91129af1fb31a45a81303261365 frame00000038 +073ebc49d6966e4c5b6d13f50e594547 frame00000039 +78d8976aa2051772c20367ac28df4d25 frame00000040 +8c5b4de38fa0ffcc650648fd2013264d frame00000041 +0eb93a06a736ccbf0cc0a5256f156669 frame00000042 +470e87fe586f785d42c9e29494203c21 frame00000043 +0fc8a9a2be4aa29de2b49c48d257d371 frame00000044 +d91638238c19bdcc4b88139e3d394469 frame00000045 +d64a8a7e363770c73a0d64243393afd7 frame00000046 +cf2247d1944a31c472547299a1aa4c0d frame00000047 +095f6e4dd56321d6f12fe67798d6ceae frame00000048 +677bf999942c5ffacfb2d42a355d6c56 frame00000049 +745a27672f68847b53e743caeb48a76d frame00000050 +d2c012c95a57bd3c11595899a04c4754 frame00000051 +496e303ac3dbbb07b2ab67f77b1d73d9 frame00000052 +503206f86d10e876ba071a57e0ac9901 frame00000053 +5d9b59227db64cda49fa896bcd2202cb frame00000054 +0c6a8763d649a95ff2e7dbeae7a9fd09 frame00000055 +bf7d9c56a96d107d16a5215dcb224771 frame00000056 +55990d29807a747eb24517ed8eea2a84 frame00000057 +9946ef9e77acd39e52abfd4cfe4f70ca frame00000058 +01c33d26fc882c62467f6895c30a2b90 frame00000059 +82bfbf43e1050a7174c49a6ea5245010 frame00000060 +8dd08efe2035faaa9bb131abb479a3d9 frame00000061 +9fc2ebb83b473e513ffe29c04b6fa97f frame00000062 +6aa0632edde0b3920f79683e2fba66b0 frame00000063 +41070006f048abb34db1cae77509dc64 frame00000064 +2154f6e34819560d4617e6efc45e3363 frame00000065 +4be859576076caae454ae1f1b91611ee frame00000066 +95a8a4b6eed2165e77f4eaf5397954e4 frame00000067 +6c08f17e745070a7deace42471089a2d frame00000068 +f23460cc0d846cdf55c237556dd163dc frame00000069 +a400f3cca1b0c0bd8c6f726465edfff2 frame00000070 +9d5e4b534b386bbae75b7964b708c66d frame00000071 +fea700fe1d3d355ae9fc706089437912 frame00000072 +8fd2e4ce3aa61804d27b6b9d1bf9fbb2 frame00000073 +6bb0d6cd39b667f9d0d92c3a2f0bfcc1 frame00000074 +afeed91e2dbaabeb97b9067807832278 frame00000075 +6012e6b2a11532a2d899d0aea7f018c9 frame00000076 +98a6256e4979ff3e7b91bb2824914738 frame00000077 +1e2207ec2e12188bae894373675bba23 frame00000078 +417a58dd13dbd4ee69c3a8fe1a6f421c frame00000079 +d8a0c5bb6e1fa8d44a7b1e8ad729b4f5 frame00000080 +75ac6b21e27f7073af7d3f86615971ba frame00000081 +86c7675e4766d84522c89d9036664b61 frame00000082 +95b3a5644ecbff47f2d6765882bdd19b frame00000083 +b27734ae6513e8832ec39e0d54786c55 frame00000084 +afe99351df35a2424d51dd453f40078e frame00000085 +9dad52bedc4956da379a999a4a2d23d9 frame00000086 +c067c70a663d8dd711b90aeba3f0fad3 frame00000087 +bad7fb28c35d970858b23a9fd0c0fa00 frame00000088 +9a9245d0eba756cc35c37d5f76bce253 frame00000089 +a90017f5d8f03a0763333275fe06844d frame00000090 +9ef0ec95159c69a18df5243e8969f8d2 frame00000091 +ea0610a1031fff29e3533ce874719f6f frame00000092 +e182c32f7948112285a0dc827d371bf2 frame00000093 +70deb786cbd0715ad79201d16f8f7324 frame00000094 +25d6ff514ae5e6cb685e17e91a913b76 frame00000095 +0b4e6e971f37a7c8506388885cce9573 frame00000096 +26b2f94e141741bbf4b619d6451faa79 frame00000097 +acb460c6165bcc4a8314b62c11efd5e4 frame00000098 +c07b3dc3d8bb6b6030f0311c7a5820c5 frame00000099 +526e84346c7898fa37c2c785e835744f frame00000100 +902ba733bfe781f9c74a461be6193aad frame00000101 +983864efe03474bc7d27133cddf8e94d frame00000102 +54576700963582314cb9958435e0b750 frame00000103 +0ae8787bdc5511b46fce69899d03c1e8 frame00000104 +8fa46eabf5c9c5106ff68aba0da79b8d frame00000105 +e63301d570343fdc99186bb043b38ac3 frame00000106 +0e7a28a81de15f8f637fcd8c7d257bc2 frame00000107 +983204842c1334f6cc94716dac3a8aeb frame00000108 +6a6920125c5eadcfa52a2e89f9e7c2e0 frame00000109 +8eecd3b8224590f352b7584a86b6a8ca frame00000110 +3b4af82b83ccf6217e6c2d9e3538e0d9 frame00000111 +f261db10122eda026df6cdef9bb71d09 frame00000112 +6cdecc7cc50118f3fed1c60949589850 frame00000113 +1d6127fb505fe2f72a2aa7bf407233d4 frame00000114 +13d19163954793af22cc9e33fb7ee03d frame00000115 +e12fc1dbbef26b1cf7649c66b1efc8ea frame00000116 +446403f20daa4d85e2c375bd5245cee9 frame00000117 +88adb7a5a3e0e7e1588438d5defc5656 frame00000118 +a4c264e0ebeaaedeec33d13edd460eb6 frame00000119 +6f9846fa9236ef3871afe767e3a997be frame00000120 +8bd9741a0f3e6bcd7caed4036e6f5b67 frame00000121 +b325e06477bd1a9351c287a5f6abb02f frame00000122 +8c204b2c0272f125ee6a967f1af68b88 frame00000123 +cbe761d3b16e97cd38257a17c06063ec frame00000124 +58f04e5d3839efa9db741bf22d64c876 frame00000125 +20c0cf04b276398351e52360b2223b65 frame00000126 +0cb122632d101a117788c1f0868c0520 frame00000127 +f1e92f13fc3398bb73122f2b574b33ab frame00000128 +1b1051542e7bac4cfd4481fd0a08715b frame00000129 +43b18f7dc056befc0dc4c00d53e05f39 frame00000130 +42bc05a11a5981967f975bebba0afa55 frame00000131 +a84cbbbd66b8514b6eece263ba0638fd frame00000132 +28d3fbbb5900416298e820ec60924ab9 frame00000133 +fbe72c70994424d36c23df87094b6a60 frame00000134 +db255fcaaf5da97fe0774aaf60e2188d frame00000135 +b96f0ffe11708d2d7a35c140adc00ae2 frame00000136 +94db48d4840cceb130635e660c3dff6a frame00000137 +7e5dec66da9f5f44c813ed0b28320113 frame00000138 +7972308ea3a17c40096130029bd466e9 frame00000139 +dcd5afe5c284ecb7a83e2c5016326d9c frame00000140 +66dcbf0b3872c3f96f23b32144111b58 frame00000141 +cbf9ae0671b5dfed458d22a46124e2db frame00000142 +c528d60a98b4462490e782f4588f7451 frame00000143 +ba2c786dec46415d87ef6095d57b6592 frame00000144 +bd1057e47c4177c0d454aa5de5598ae4 frame00000145 +efbd19d4ea6d9014ff7a2b55006895ca frame00000146 +30a5bcc4dc1c06b97046e478239c70bb frame00000147 +c35c1eff9602126a89f8cdaa396285d3 frame00000148 +6b75ae9dc43adea4a03657676eb05c49 frame00000149 +22dcf734d3b8758299cd698a63947849 frame00000150 +473113189e42f67938ca2ffac31be04a frame00000151 +ad42804acdf42746383734e9451c3e6c frame00000152 +b3a4cce947d2c628f84b5e97a2205f75 frame00000153 +9405febc524c9f58ef7408e759fded91 frame00000154 +1faa6ebd3516c82a0df966d9abc935b3 frame00000155 +f2f0982d9777acac5d4af68b931b84cb frame00000156 +46bcc112514f15575d3e648717e7db98 frame00000157 +65f516df55c41078fe79f0fdcd611fd3 frame00000158 +2a72000e7ab9637819f4a59034015915 frame00000159 +6055a13a410b862b5539d9594b3d98b6 frame00000160 +29a770abdb43d8ff430a7402ae88c1d8 frame00000161 +ac1092122f91266f34bbfad83b4c37d2 frame00000162 +123aa57794cdf071eb362cae5cdbb6c7 frame00000163 +6bc8586800b24d84f2d449d4dfe82020 frame00000164 +c83a7c740469a591a54b168eefba6333 frame00000165 +30a664e512bf9c4e719e59ccf0fb5e3a frame00000166 +9b17dc5a62d11239825ba4309165470f frame00000167 +7ada476e329644c6fbdadee0b2f5883f frame00000168 +3611edb63d44d5747a541083e299f783 frame00000169 +36f5c10c283a6c03e78ebd7aea1cf18c frame00000170 +638dad7bee20a505be562ce8205d185c frame00000171 +9fa3f7fbc3b88b84f4c59cad88808f38 frame00000172 +447f1c3e700935868bf0d05440fdcb2d frame00000173 +661302128a5c64dc16839411ee018fc7 frame00000174 +007a4a119e473b9e6b8863334a122c15 frame00000175 +90a53b24ef03faec3d6de3d9f374bac5 frame00000176 +5d6f079bf9b3b0bd4ca3e74898c3a5bf frame00000177 +9e1c26dce044ec40923af52a2fbc75d5 frame00000178 +2126a5656d1549139f8d548c0b112b58 frame00000179 +19cdeb058b129c74682fb09af26bfc83 frame00000180 +3f2e03c289dec21206daf727f3350842 frame00000181 +a2a1ff11ce274af745f767bbb6b323ae frame00000182 +0a68dff2dd78448582cc4bd411ec21e8 frame00000183 +8a22b258655b22ab869836c3e7656e75 frame00000184 +13a48a198751099642c12a9c6e9973ec frame00000185 +31cf662a2eb6b1a61128551da996d5ec frame00000186 +986231d31b65b820b64aa94ad6ecdc1a frame00000187 +e1b16b5efe19124f1e91e972311bf9cd frame00000188 +86827755313624b40702cde7a62542d9 frame00000189 +5db167cb72bff354db961e4d03966bb4 frame00000190 +93aea09f24fe86b34200c671041ebe98 frame00000191 +bb56671392851409fc3f380456d199ca frame00000192 +eadde46823eb28e5a3df0308de881fc9 frame00000193 +e3949e4ac6ad08a0ee28a762ffc725d5 frame00000194 +5d1bf7829353a9640e8ab200df2a8037 frame00000195 +30e914782072b91b8cbaa8d084c295bc frame00000196 +2266848dea32f41027f9054fa1d5541b frame00000197 +eb25c9c59a677958f0682ead419316b9 frame00000198 +1a77a7d1d34ec56f91b24a85acff4b9b frame00000199 +84cd84530b1797c6668cb1d910f50ceb frame00000200 +2e7285053997cee0489073b1b80b6376 frame00000201 +be7347bcb8803664d9216370d62f4946 frame00000202 +b2a7bbbf5add9b60e25c83179f26c27e frame00000203 +b5b26aa3edbbc2f1359ec0218b8997b5 frame00000204 +9b4f51823f5d7a9e9bd25825119d0854 frame00000205 +28d58b42d80295cddcf4c12357bc9fe3 frame00000206 +9aae57c1f604da06da87b9a880569e31 frame00000207 +caceb8a3c5df08f1ec5507f74d7f6124 frame00000208 +a28791e7037f627e873ca63abfd1f1fa frame00000209 +fa61024912a6eb0b948dce5b971afb1d frame00000210 +15fb3fad7f7c922f1d24c4ebf9992dbd frame00000211 +69b6df964b1faaabf8f3f429f906c6a7 frame00000212 +b16fdbf8e469e5d194c943789d016a84 frame00000213 +1b311d0658fe9cad25f9bf38dd4b62c6 frame00000214 +106558607b12c8671c4b4a92157ebc18 frame00000215 +36f7fa31e2998637ccfb9021a792dda5 frame00000216 +cb191dce1aa6e2f677acfbb97ff15379 frame00000217 +88af6dcf55c7fb9a96847e7e2d666556 frame00000218 +3e1a5b3b4b5db0fd3976d090860e5eeb frame00000219 +08bcc96a41c6e3c1adcfb8d20ccecd1e frame00000220 +e8d5998eccd95630d486d3399f7acad7 frame00000221 +5ed47f7e41a7d30183995e9235348409 frame00000222 +54594d322e09a3640554f3ba4ea95bd7 frame00000223 +2b2d9b8ed442ac79bedd0e5a53ccf963 frame00000224 +654636e89b6ed70e66f66569c0c23d90 frame00000225 +54979cd800c613a1099e9a9d1ec657f0 frame00000226 +7a85b39e24c1a2a96cbb6546bd2236c4 frame00000227 +ccab0cd8b9c39cfc5b1e292f1f67a486 frame00000228 +feefb56c1fe4daec08d33d385fb77ea5 frame00000229 +599458b295d7ad3c88335f15dbb2c1a1 frame00000230 +8c22ba483dbf595dc97dd486816738dc frame00000231 +6f7069f5767e51ba2c2837abf68d4ff1 frame00000232 +85ba7a34510b042750b34f2b9f1acc7e frame00000233 +6adb052b8e2bc8c18bdfdcb94b57c753 frame00000234 +899ec59444e980e63790835a86cd6c29 frame00000235 +c8e1df94bd1f22c6fc56140bd5252d35 frame00000236 +d1b0b68decff73c4b720137f5d963e57 frame00000237 +53b9883aa3a17cd860f1de6ede38d12a frame00000238 +e210df7cb02582e9da1d3466309d3642 frame00000239 +e96fa03dd0cbb33a19bf07edfc147624 frame00000240 +93ac9ab9216a2126413e7e35c1b1c0e8 frame00000241 +a06729ab515d52a1f6962f9a97269529 frame00000242 +e4336c330a988396eadde367463b99c4 frame00000243 +1a395bee935e5d4e3b9370bebbd1bb1d frame00000244 +fc9ae89e6203f6611e82dcc92ad6a796 frame00000245 +93dc54492fb2e22277bd370d06da927e frame00000246 +109f1c94cc3198ecda00c65174917bf1 frame00000247 +9c8b9c1d5550d702ea382a16e671b987 frame00000248 +886137f98c36746ae51a3b0b7da29c48 frame00000249 +5bd354f4107c98e0a54f41ddc294cbdd frame00000250 +24dc5efed4573361aea0742678a06168 frame00000251 +cb076082bd04242a47b00d83f6e05810 frame00000252 +5454a012c3a1636f59b0dc393268a07d frame00000253 +3d8da6d3978c9dc3ff66183eb2b1c856 frame00000254 +0e76ab58f527d4331f208fb68aae07b3 frame00000255 +ea4f6441812b316e5fa860ec22ec3473 frame00000256 +3742ffd0f493aade9748a5211fef9e98 frame00000257 +0d4fdd675da3d905993418a76b1b208e frame00000258 +068813bc6516811fb5d2c1c5f0f05296 frame00000259 +0eb9ce01ace91f3d2301d6025de8a1df frame00000260 +83f69939d8f0d9c7c7e3864360029bef frame00000261 +0d1e5094f672ff7239c92412b6fb9dc0 frame00000262 +8f0f7fac3ef6a76084658d5a2d2a5536 frame00000263 +11d062e338caa3a4b68b45ad06a55055 frame00000264 +c91d111dc3e3a6b1655d4abe627d96a8 frame00000265 +70589397582e48bbaa59b17ecf8566c9 frame00000266 +8dd10e75955f86217c9f09e5d5181bec frame00000267 +47fc67ce4d0fca9ec96f193133571325 frame00000268 +098d651015502b29a7942038b5e4547b frame00000269 +51d38871b520e92ba5b174d9d779970f frame00000270 +06fbed80033e6adf4d89c6a9ec7a3565 frame00000271 +3f9bf34fafdd37a80ad10d31cf35530f frame00000272 +8a29d3eff2f8479e1043c30117ff0796 frame00000273 +fdf2a8d1f605782e93d1664381d4746b frame00000274 +5d794de464af158fb333701989ee1494 frame00000275 +afbecfdb580e462cd4d40db91017826a frame00000276 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR5_TANDBERG_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR5_TANDBERG_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR5_TANDBERG_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR5_TANDBERG_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,277 @@ +57ccd36d414aa2b0fb53bda37e185148 frame00000000 +2e1db3295b0cdfc0bab2e6045339397c frame00000001 +25d1be2c8cf586d96ae85a4c1551bd29 frame00000002 +ab046c99edd42939b2af83db798e066d frame00000003 +fbb94e64d4ea5b294d492373e57e66df frame00000004 +c636b03625279e27042d0e3f5c9975b5 frame00000005 +44cd339c54fb1aed9f033e0a7753ced3 frame00000006 +49ef03a03fbf03c50fb2afa1a36796ad frame00000007 +df3adef85d8509d022ca9c0cb8a59025 frame00000008 +4ca55014b8c1e162966a4a3af16bc351 frame00000009 +619f06cbe758fa39afbb29ad255134ab frame00000010 +445541b419233d13ffb101746900000d frame00000011 +4b78c3acc058ced2e7df471ba1d527c0 frame00000012 +8f517fe390672739d94dadcaf35e0bd5 frame00000013 +ebb9f651336c3ff6e7e3c49ec4cc8b72 frame00000014 +f9b2ba2ec703fa7e17eabc8b55613344 frame00000015 +ba948e4ffe2ecd8c034b7289a98705b9 frame00000016 +61e2ee675602eb6207d4b70cb8c04dab frame00000017 +de9d1a517d6c9b3d3bd58c0cb9dc1074 frame00000018 +3698289722cdeb4cfd819e7e87c124c7 frame00000019 +92abfe9600a536a3e2bc4795a8d44815 frame00000020 +a7478a1699c328c26d9dfbf92cef530e frame00000021 +abe7dcd454685a23680b49032936095c frame00000022 +8251b6978a67b896e3f9eac1828a30e1 frame00000023 +d21c92e51e96cdfd0ae35cfe8b14a585 frame00000024 +1e0ecf16cefc32a3382da8e2a3027ce0 frame00000025 +6f920b8f8c778759787d2405a2275f54 frame00000026 +4bf06f38a552a9f43a1709e11632a570 frame00000027 +7c69e346f130fc9a77ce05ada0fcccec frame00000028 +391a548bbbb4ab044b5fa536034b2825 frame00000029 +10586388248c1d9e1d75e53448646506 frame00000030 +7da230f9d7043b574c3383f6eca16bd2 frame00000031 +bc6455fb7d0d46ab6c487c258ea24ab4 frame00000032 +dc02b141a72d86c214c873cc41470668 frame00000033 +9bf989132619bd5ebbb84da20c1a65e6 frame00000034 +7264c754fcd219c320d3ce3a7899950b frame00000035 +fba3efc81868d52551c2c395cf2a55db frame00000036 +475d8da3e71a0c0f768fa6ce0dd11ed0 frame00000037 +7522f91129af1fb31a45a81303261365 frame00000038 +073ebc49d6966e4c5b6d13f50e594547 frame00000039 +78d8976aa2051772c20367ac28df4d25 frame00000040 +8c5b4de38fa0ffcc650648fd2013264d frame00000041 +0eb93a06a736ccbf0cc0a5256f156669 frame00000042 +470e87fe586f785d42c9e29494203c21 frame00000043 +0fc8a9a2be4aa29de2b49c48d257d371 frame00000044 +d91638238c19bdcc4b88139e3d394469 frame00000045 +d64a8a7e363770c73a0d64243393afd7 frame00000046 +cf2247d1944a31c472547299a1aa4c0d frame00000047 +095f6e4dd56321d6f12fe67798d6ceae frame00000048 +677bf999942c5ffacfb2d42a355d6c56 frame00000049 +745a27672f68847b53e743caeb48a76d frame00000050 +d2c012c95a57bd3c11595899a04c4754 frame00000051 +496e303ac3dbbb07b2ab67f77b1d73d9 frame00000052 +503206f86d10e876ba071a57e0ac9901 frame00000053 +5d9b59227db64cda49fa896bcd2202cb frame00000054 +0c6a8763d649a95ff2e7dbeae7a9fd09 frame00000055 +bf7d9c56a96d107d16a5215dcb224771 frame00000056 +55990d29807a747eb24517ed8eea2a84 frame00000057 +9946ef9e77acd39e52abfd4cfe4f70ca frame00000058 +01c33d26fc882c62467f6895c30a2b90 frame00000059 +82bfbf43e1050a7174c49a6ea5245010 frame00000060 +8dd08efe2035faaa9bb131abb479a3d9 frame00000061 +9fc2ebb83b473e513ffe29c04b6fa97f frame00000062 +6aa0632edde0b3920f79683e2fba66b0 frame00000063 +41070006f048abb34db1cae77509dc64 frame00000064 +2154f6e34819560d4617e6efc45e3363 frame00000065 +4be859576076caae454ae1f1b91611ee frame00000066 +95a8a4b6eed2165e77f4eaf5397954e4 frame00000067 +6c08f17e745070a7deace42471089a2d frame00000068 +f23460cc0d846cdf55c237556dd163dc frame00000069 +a400f3cca1b0c0bd8c6f726465edfff2 frame00000070 +9d5e4b534b386bbae75b7964b708c66d frame00000071 +fea700fe1d3d355ae9fc706089437912 frame00000072 +8fd2e4ce3aa61804d27b6b9d1bf9fbb2 frame00000073 +6bb0d6cd39b667f9d0d92c3a2f0bfcc1 frame00000074 +afeed91e2dbaabeb97b9067807832278 frame00000075 +6012e6b2a11532a2d899d0aea7f018c9 frame00000076 +98a6256e4979ff3e7b91bb2824914738 frame00000077 +1e2207ec2e12188bae894373675bba23 frame00000078 +417a58dd13dbd4ee69c3a8fe1a6f421c frame00000079 +d8a0c5bb6e1fa8d44a7b1e8ad729b4f5 frame00000080 +75ac6b21e27f7073af7d3f86615971ba frame00000081 +86c7675e4766d84522c89d9036664b61 frame00000082 +95b3a5644ecbff47f2d6765882bdd19b frame00000083 +b27734ae6513e8832ec39e0d54786c55 frame00000084 +afe99351df35a2424d51dd453f40078e frame00000085 +9dad52bedc4956da379a999a4a2d23d9 frame00000086 +c067c70a663d8dd711b90aeba3f0fad3 frame00000087 +bad7fb28c35d970858b23a9fd0c0fa00 frame00000088 +9a9245d0eba756cc35c37d5f76bce253 frame00000089 +a90017f5d8f03a0763333275fe06844d frame00000090 +9ef0ec95159c69a18df5243e8969f8d2 frame00000091 +ea0610a1031fff29e3533ce874719f6f frame00000092 +e182c32f7948112285a0dc827d371bf2 frame00000093 +70deb786cbd0715ad79201d16f8f7324 frame00000094 +25d6ff514ae5e6cb685e17e91a913b76 frame00000095 +0b4e6e971f37a7c8506388885cce9573 frame00000096 +26b2f94e141741bbf4b619d6451faa79 frame00000097 +acb460c6165bcc4a8314b62c11efd5e4 frame00000098 +c07b3dc3d8bb6b6030f0311c7a5820c5 frame00000099 +526e84346c7898fa37c2c785e835744f frame00000100 +902ba733bfe781f9c74a461be6193aad frame00000101 +983864efe03474bc7d27133cddf8e94d frame00000102 +54576700963582314cb9958435e0b750 frame00000103 +0ae8787bdc5511b46fce69899d03c1e8 frame00000104 +8fa46eabf5c9c5106ff68aba0da79b8d frame00000105 +e63301d570343fdc99186bb043b38ac3 frame00000106 +0e7a28a81de15f8f637fcd8c7d257bc2 frame00000107 +983204842c1334f6cc94716dac3a8aeb frame00000108 +6a6920125c5eadcfa52a2e89f9e7c2e0 frame00000109 +8eecd3b8224590f352b7584a86b6a8ca frame00000110 +3b4af82b83ccf6217e6c2d9e3538e0d9 frame00000111 +f261db10122eda026df6cdef9bb71d09 frame00000112 +6cdecc7cc50118f3fed1c60949589850 frame00000113 +1d6127fb505fe2f72a2aa7bf407233d4 frame00000114 +13d19163954793af22cc9e33fb7ee03d frame00000115 +e12fc1dbbef26b1cf7649c66b1efc8ea frame00000116 +446403f20daa4d85e2c375bd5245cee9 frame00000117 +88adb7a5a3e0e7e1588438d5defc5656 frame00000118 +a4c264e0ebeaaedeec33d13edd460eb6 frame00000119 +6f9846fa9236ef3871afe767e3a997be frame00000120 +8bd9741a0f3e6bcd7caed4036e6f5b67 frame00000121 +b325e06477bd1a9351c287a5f6abb02f frame00000122 +8c204b2c0272f125ee6a967f1af68b88 frame00000123 +cbe761d3b16e97cd38257a17c06063ec frame00000124 +58f04e5d3839efa9db741bf22d64c876 frame00000125 +20c0cf04b276398351e52360b2223b65 frame00000126 +0cb122632d101a117788c1f0868c0520 frame00000127 +f1e92f13fc3398bb73122f2b574b33ab frame00000128 +1b1051542e7bac4cfd4481fd0a08715b frame00000129 +43b18f7dc056befc0dc4c00d53e05f39 frame00000130 +42bc05a11a5981967f975bebba0afa55 frame00000131 +a84cbbbd66b8514b6eece263ba0638fd frame00000132 +28d3fbbb5900416298e820ec60924ab9 frame00000133 +fbe72c70994424d36c23df87094b6a60 frame00000134 +db255fcaaf5da97fe0774aaf60e2188d frame00000135 +b96f0ffe11708d2d7a35c140adc00ae2 frame00000136 +94db48d4840cceb130635e660c3dff6a frame00000137 +7e5dec66da9f5f44c813ed0b28320113 frame00000138 +7972308ea3a17c40096130029bd466e9 frame00000139 +dcd5afe5c284ecb7a83e2c5016326d9c frame00000140 +66dcbf0b3872c3f96f23b32144111b58 frame00000141 +cbf9ae0671b5dfed458d22a46124e2db frame00000142 +c528d60a98b4462490e782f4588f7451 frame00000143 +ba2c786dec46415d87ef6095d57b6592 frame00000144 +bd1057e47c4177c0d454aa5de5598ae4 frame00000145 +efbd19d4ea6d9014ff7a2b55006895ca frame00000146 +30a5bcc4dc1c06b97046e478239c70bb frame00000147 +c35c1eff9602126a89f8cdaa396285d3 frame00000148 +6b75ae9dc43adea4a03657676eb05c49 frame00000149 +22dcf734d3b8758299cd698a63947849 frame00000150 +473113189e42f67938ca2ffac31be04a frame00000151 +ad42804acdf42746383734e9451c3e6c frame00000152 +b3a4cce947d2c628f84b5e97a2205f75 frame00000153 +9405febc524c9f58ef7408e759fded91 frame00000154 +1faa6ebd3516c82a0df966d9abc935b3 frame00000155 +f2f0982d9777acac5d4af68b931b84cb frame00000156 +46bcc112514f15575d3e648717e7db98 frame00000157 +65f516df55c41078fe79f0fdcd611fd3 frame00000158 +2a72000e7ab9637819f4a59034015915 frame00000159 +6055a13a410b862b5539d9594b3d98b6 frame00000160 +29a770abdb43d8ff430a7402ae88c1d8 frame00000161 +ac1092122f91266f34bbfad83b4c37d2 frame00000162 +123aa57794cdf071eb362cae5cdbb6c7 frame00000163 +6bc8586800b24d84f2d449d4dfe82020 frame00000164 +c83a7c740469a591a54b168eefba6333 frame00000165 +30a664e512bf9c4e719e59ccf0fb5e3a frame00000166 +9b17dc5a62d11239825ba4309165470f frame00000167 +7ada476e329644c6fbdadee0b2f5883f frame00000168 +3611edb63d44d5747a541083e299f783 frame00000169 +36f5c10c283a6c03e78ebd7aea1cf18c frame00000170 +638dad7bee20a505be562ce8205d185c frame00000171 +9fa3f7fbc3b88b84f4c59cad88808f38 frame00000172 +447f1c3e700935868bf0d05440fdcb2d frame00000173 +661302128a5c64dc16839411ee018fc7 frame00000174 +007a4a119e473b9e6b8863334a122c15 frame00000175 +90a53b24ef03faec3d6de3d9f374bac5 frame00000176 +5d6f079bf9b3b0bd4ca3e74898c3a5bf frame00000177 +9e1c26dce044ec40923af52a2fbc75d5 frame00000178 +2126a5656d1549139f8d548c0b112b58 frame00000179 +19cdeb058b129c74682fb09af26bfc83 frame00000180 +3f2e03c289dec21206daf727f3350842 frame00000181 +a2a1ff11ce274af745f767bbb6b323ae frame00000182 +0a68dff2dd78448582cc4bd411ec21e8 frame00000183 +8a22b258655b22ab869836c3e7656e75 frame00000184 +13a48a198751099642c12a9c6e9973ec frame00000185 +31cf662a2eb6b1a61128551da996d5ec frame00000186 +986231d31b65b820b64aa94ad6ecdc1a frame00000187 +e1b16b5efe19124f1e91e972311bf9cd frame00000188 +86827755313624b40702cde7a62542d9 frame00000189 +5db167cb72bff354db961e4d03966bb4 frame00000190 +93aea09f24fe86b34200c671041ebe98 frame00000191 +bb56671392851409fc3f380456d199ca frame00000192 +eadde46823eb28e5a3df0308de881fc9 frame00000193 +e3949e4ac6ad08a0ee28a762ffc725d5 frame00000194 +5d1bf7829353a9640e8ab200df2a8037 frame00000195 +30e914782072b91b8cbaa8d084c295bc frame00000196 +2266848dea32f41027f9054fa1d5541b frame00000197 +eb25c9c59a677958f0682ead419316b9 frame00000198 +1a77a7d1d34ec56f91b24a85acff4b9b frame00000199 +84cd84530b1797c6668cb1d910f50ceb frame00000200 +2e7285053997cee0489073b1b80b6376 frame00000201 +be7347bcb8803664d9216370d62f4946 frame00000202 +b2a7bbbf5add9b60e25c83179f26c27e frame00000203 +b5b26aa3edbbc2f1359ec0218b8997b5 frame00000204 +9b4f51823f5d7a9e9bd25825119d0854 frame00000205 +28d58b42d80295cddcf4c12357bc9fe3 frame00000206 +9aae57c1f604da06da87b9a880569e31 frame00000207 +caceb8a3c5df08f1ec5507f74d7f6124 frame00000208 +a28791e7037f627e873ca63abfd1f1fa frame00000209 +fa61024912a6eb0b948dce5b971afb1d frame00000210 +15fb3fad7f7c922f1d24c4ebf9992dbd frame00000211 +69b6df964b1faaabf8f3f429f906c6a7 frame00000212 +b16fdbf8e469e5d194c943789d016a84 frame00000213 +1b311d0658fe9cad25f9bf38dd4b62c6 frame00000214 +106558607b12c8671c4b4a92157ebc18 frame00000215 +36f7fa31e2998637ccfb9021a792dda5 frame00000216 +cb191dce1aa6e2f677acfbb97ff15379 frame00000217 +88af6dcf55c7fb9a96847e7e2d666556 frame00000218 +3e1a5b3b4b5db0fd3976d090860e5eeb frame00000219 +08bcc96a41c6e3c1adcfb8d20ccecd1e frame00000220 +e8d5998eccd95630d486d3399f7acad7 frame00000221 +5ed47f7e41a7d30183995e9235348409 frame00000222 +54594d322e09a3640554f3ba4ea95bd7 frame00000223 +2b2d9b8ed442ac79bedd0e5a53ccf963 frame00000224 +654636e89b6ed70e66f66569c0c23d90 frame00000225 +54979cd800c613a1099e9a9d1ec657f0 frame00000226 +7a85b39e24c1a2a96cbb6546bd2236c4 frame00000227 +ccab0cd8b9c39cfc5b1e292f1f67a486 frame00000228 +feefb56c1fe4daec08d33d385fb77ea5 frame00000229 +599458b295d7ad3c88335f15dbb2c1a1 frame00000230 +8c22ba483dbf595dc97dd486816738dc frame00000231 +6f7069f5767e51ba2c2837abf68d4ff1 frame00000232 +85ba7a34510b042750b34f2b9f1acc7e frame00000233 +6adb052b8e2bc8c18bdfdcb94b57c753 frame00000234 +899ec59444e980e63790835a86cd6c29 frame00000235 +c8e1df94bd1f22c6fc56140bd5252d35 frame00000236 +d1b0b68decff73c4b720137f5d963e57 frame00000237 +53b9883aa3a17cd860f1de6ede38d12a frame00000238 +e210df7cb02582e9da1d3466309d3642 frame00000239 +e96fa03dd0cbb33a19bf07edfc147624 frame00000240 +93ac9ab9216a2126413e7e35c1b1c0e8 frame00000241 +a06729ab515d52a1f6962f9a97269529 frame00000242 +e4336c330a988396eadde367463b99c4 frame00000243 +1a395bee935e5d4e3b9370bebbd1bb1d frame00000244 +fc9ae89e6203f6611e82dcc92ad6a796 frame00000245 +93dc54492fb2e22277bd370d06da927e frame00000246 +109f1c94cc3198ecda00c65174917bf1 frame00000247 +9c8b9c1d5550d702ea382a16e671b987 frame00000248 +886137f98c36746ae51a3b0b7da29c48 frame00000249 +5bd354f4107c98e0a54f41ddc294cbdd frame00000250 +24dc5efed4573361aea0742678a06168 frame00000251 +cb076082bd04242a47b00d83f6e05810 frame00000252 +5454a012c3a1636f59b0dc393268a07d frame00000253 +3d8da6d3978c9dc3ff66183eb2b1c856 frame00000254 +0e76ab58f527d4331f208fb68aae07b3 frame00000255 +ea4f6441812b316e5fa860ec22ec3473 frame00000256 +3742ffd0f493aade9748a5211fef9e98 frame00000257 +0d4fdd675da3d905993418a76b1b208e frame00000258 +068813bc6516811fb5d2c1c5f0f05296 frame00000259 +0eb9ce01ace91f3d2301d6025de8a1df frame00000260 +83f69939d8f0d9c7c7e3864360029bef frame00000261 +0d1e5094f672ff7239c92412b6fb9dc0 frame00000262 +8f0f7fac3ef6a76084658d5a2d2a5536 frame00000263 +11d062e338caa3a4b68b45ad06a55055 frame00000264 +c91d111dc3e3a6b1655d4abe627d96a8 frame00000265 +70589397582e48bbaa59b17ecf8566c9 frame00000266 +8dd10e75955f86217c9f09e5d5181bec frame00000267 +47fc67ce4d0fca9ec96f193133571325 frame00000268 +098d651015502b29a7942038b5e4547b frame00000269 +51d38871b520e92ba5b174d9d779970f frame00000270 +06fbed80033e6adf4d89c6a9ec7a3565 frame00000271 +3f9bf34fafdd37a80ad10d31cf35530f frame00000272 +8a29d3eff2f8479e1043c30117ff0796 frame00000273 +fdf2a8d1f605782e93d1664381d4746b frame00000274 +5d794de464af158fb333701989ee1494 frame00000275 +afbecfdb580e462cd4d40db91017826a frame00000276 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR6_BT_B.h264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR6_BT_B.h264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR6_BT_B.h264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR6_BT_B.h264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,58 @@ +8a119ab41fd73c26194da703369ed2f6 frame00000000 +abd4f792024af9498b38001e615d9c78 frame00000001 +9a1a91f6d5c0177b85cfb88af94241f6 frame00000002 +d906a7dc5afb6794ffbf19346e3a99cd frame00000003 +3a06da7b4a08fe5fb550c998ec27d587 frame00000004 +3025a0c0cf1ac8448b5e66616b26185b frame00000005 +b2001a02ab19a016f21b916d16ed9829 frame00000006 +1cc5adb266e751385e17fd71570ba040 frame00000007 +2abe0edb1b466c4201cc8d2d9c80ba85 frame00000008 +4af95b11af17cb95098212246bc24f0e frame00000009 +fa46f57ac296f9767ac4e17fe8181a3c frame00000010 +f9522b4ca5494c02a1bd0fa252378097 frame00000011 +a23d8e9a5c284a0ae22a7e894b5c740a frame00000012 +48cebbeecbbc182b3ce113ff572361d2 frame00000013 +8ad719a4efd321fcd1b6537f6a16e456 frame00000014 +70dd5ad8ea76d12e4c2f1fa035dec406 frame00000015 +eaf03082cf6bacc40d82d90b83ad4b29 frame00000016 +c1a7556d6335e12b32ba144465641459 frame00000017 +d12755a4aece7f8600185aec16980b34 frame00000018 +3792b2ce4468702b985094051be8180c frame00000019 +efa6cf953432349bc8e2daa572e50bb7 frame00000020 +4587607b4adbcdbdfe1e934fc20e490e frame00000021 +db05ca1ad872c5b9c3dd2a3e3e4e704f frame00000022 +e71e6790da32bb7ad160384eed3bf205 frame00000023 +2fe8fe69b797319c5998607da400df8a frame00000024 +23f1adc5c7261ce3a1b5d24757351d12 frame00000025 +af10067625eab206db687cc27f3c5945 frame00000026 +2284b9ea6c18ea1074aab06174fdb3fd frame00000027 +426419d7e11d09a259a9602a63f9230b frame00000028 +d03d0a704256560a4b8784e374e007c5 frame00000029 +12286c4a5792305251e0d5ca7dca70bc frame00000030 +83608260e033a15d742fd81cf86edd3b frame00000031 +9d44c84f722f336115b1461b4f5c3f78 frame00000032 +55779908445c656c16772049df346be5 frame00000033 +b58f1990aa57e14b662f61b989f9b96a frame00000034 +1a6efb1dac18b0f62267bf22cc30cfba frame00000035 +e4eae04c7ddb7f6ee93e504dac536673 frame00000036 +ea708048a719154f78cc61b14dc76469 frame00000037 +78ac05b5187bea84017bd00eda506820 frame00000038 +01f3b61d67aede49deaa0cf8d112d0d2 frame00000039 +a8cdac8ebe376eca137c6a4ef3fd1b2e frame00000040 +546707622dd17c8ddc9054ee58fa19cd frame00000041 +cc23fd5456e978e148824c0fedb00c89 frame00000042 +87df1a40f3062b74a2fbd2059c870c52 frame00000043 +795d0c49b88f490de936f36bf02e37dc frame00000044 +08092f1b401b4dbe32b7f3a63cf64bef frame00000045 +5baaba3190c20febe28ac7691fa418ca frame00000046 +c5e6d5df4923c3493618642946137a64 frame00000047 +eb8c250d4bf5fbb6cc238ff422bc0a52 frame00000048 +911fd2c8c6cf36e9a30bcc80be69db7e frame00000049 +9fd86fdb8ab91c01e26db8b13a2d7ff4 frame00000050 +f3fe86917e18a1d8d60f394c4a362a03 frame00000051 +8a119ab41fd73c26194da703369ed2f6 frame00000052 +abd4f792024af9498b38001e615d9c78 frame00000053 +9a1a91f6d5c0177b85cfb88af94241f6 frame00000054 +aad4f12ee0a8d4a80b7a3f88d989b342 frame00000055 +30fe875e4ecb8b40cd5edc753d232e15 frame00000056 +47cb6cdafb5533fed10e265815a3db16 frame00000057 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR7_BT_B.h264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR7_BT_B.h264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR7_BT_B.h264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR7_BT_B.h264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,56 @@ +0f9bc686673119e1cffb5bef61f814cb frame00000000 +f655dff169249e4c1df000e03669398c frame00000001 +0e413af6caf61b897dd9c9684f5be871 frame00000002 +c459cd51035c1e7126e8cdf05405cd49 frame00000003 +956b9d2c49db8eb17138df712d8263c8 frame00000004 +f637199e81710542eaff82a270262d64 frame00000005 +0668852359ee35750d902e2b4ec82782 frame00000006 +e047ec37b331462e6c1422e9fd2cfbca frame00000007 +e25b82f32e0a81d660c77a66c1f84fc2 frame00000008 +32d7c917a9bc6f75059bfd0dbcbaf855 frame00000009 +f2bedb8a17959581be5a394c6a39423f frame00000010 +4571369b84e80bd1b6b7074ef0497c3c frame00000011 +d001eb26c196864a77f79700ef0254bc frame00000012 +d6219792914e4e50110fa9aca5b6a0f4 frame00000013 +aed071320a40de262a9bbb7873d9bea2 frame00000014 +52ec71e074606a56a1d30abc5786454a frame00000015 +1eaccfa9ce09560b247b013b08007e77 frame00000016 +54456102a3f8543db02286240d01758d frame00000017 +77ff6d7bc02bdb983b90d339c792055f frame00000018 +3d69c411ba5bb0f6b26e5569909ffe71 frame00000019 +59661fadba471cf12231a3af6e170a9c frame00000020 +0f9bc686673119e1cffb5bef61f814cb frame00000021 +33890ceed676d7685fb0ac6c5e3c9bf9 frame00000022 +4cbe1564ea987ef35604f19a2b466a43 frame00000023 +afd281a724eb4a2a86a3c4658c53a131 frame00000024 +93eba4ad8baf8c5951224b6efe45f60a frame00000025 +900f313ad7d9a1545a2181a408caec12 frame00000026 +8f45d87c91d5061b6cee9d91de34bcda frame00000027 +4c13452ee6c3afe910fa8495f50771f5 frame00000028 +c152b8e93dbfee1b4d9ad5bc6c4273d0 frame00000029 +eb763ddc02501c46df40857105b7a109 frame00000030 +d0c5850439770037dbef5670e1f67e75 frame00000031 +597fc82b9caf986db95778bed8a0162a frame00000032 +2975e4f54dacefe9d4ce9767b1908386 frame00000033 +e889ab2194bc88549e20594cb91f274b frame00000034 +f158275b0c77875a18e6f09b4827b1d3 frame00000035 +b1e2abc7d821cbb7595a9130cd0b5467 frame00000036 +edcbcb7a901ac827eafcc89492fb8d01 frame00000037 +05fed8590f140f350ea370bcf5b7559a frame00000038 +386aca930596ab7f66f65acb21966723 frame00000039 +a8cdac8ebe376eca137c6a4ef3fd1b2e frame00000040 +894a0dbc6c1aca053ff9c0265e3a4182 frame00000041 +97f674a207b007abb580da30f32ba45e frame00000042 +192a3114c03f3f2cf4d98379e3a95fb6 frame00000043 +fe1ae26badf9772241fe818a1b1aa66e frame00000044 +01078340be5963a0b7d5e4d5a932a79d frame00000045 +c2529bf336fe21e6ad467deff9a7c1d3 frame00000046 +607425076767c7db58580ede8ed24b7f frame00000047 +bdfde0abe86ebcdd5d0c07ea40703957 frame00000048 +c4c34601234d44afc6475ab7a40b3b2e frame00000049 +8a7b7bc6afc8ff5a3aeeb53ded2095ad frame00000050 +7fbcbbe95a1631b631a9e405bdcc38cb frame00000051 +0f9bc686673119e1cffb5bef61f814cb frame00000052 +f655dff169249e4c1df000e03669398c frame00000053 +0e413af6caf61b897dd9c9684f5be871 frame00000054 +770ac2718b534bddb5d7849926c2345e frame00000055 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR8_BT_B.h264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR8_BT_B.h264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR8_BT_B.h264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR8_BT_B.h264.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,55 @@ +367afaf14ca992427988b9b489e47153 frame00000000 +6dfe27f26d9ca2eef97a8ff2725a00dc frame00000001 +ed5e7ac6e173e3ce3f982f2b78bbde01 frame00000002 +7d66c6886e66717e272d0af10bfda400 frame00000003 +fd9760038fc7c8269ccba5b5a3819f5b frame00000004 +9c5acb78a7d8b0a0b9a4e2a30251e553 frame00000005 +e7e9a718f86c51bbc2ee00fa84afcbf5 frame00000006 +88ef40682280ba531db7434c565ff6a9 frame00000007 +6490595848eebd201269b499795ce164 frame00000008 +9fe34c30fae930fe7df9dedfa4777d47 frame00000009 +33f3b4551079a5ad8f478c1c12d4ed7c frame00000010 +ddc4db5b19b8d247cc7bab4e3f58922b frame00000011 +1dc9d804f027302ea56632a01e8b11a3 frame00000012 +b769651db35491aff57cd20040359645 frame00000013 +0c2b248ee88e19f72e70f91eb44fa3bf frame00000014 +c56c917555616991e8195f0291a06d93 frame00000015 +5bd37978faffb6066d14ec7db6a2298b frame00000016 +418e5732d62b6b60c656f1c86bfacada frame00000017 +679f56a64eb9c5c017f8d88399bcdc1f frame00000018 +dd08d47a83264b12d1c9134593d908d9 frame00000019 +f70d5c138bd221cde65db0bec2af13a0 frame00000020 +a7ca4dfb34d84a135211c6a79dd0c7b7 frame00000021 +aaecf05a4313e111659e04f8db00855c frame00000022 +5d82f99d61c716c3668f3ec9f1fc6d01 frame00000023 +c18f186e1364c937370133952cc7758d frame00000024 +de34411cf94a03d08b423322ef7d7266 frame00000025 +734e243405d63e3b32beb2b108bb6fc0 frame00000026 +a0f5e6ded2a314470b8799f4fdbfd224 frame00000027 +2b4f5e2abfa6ae86fa26329cfcfa53f4 frame00000028 +1971d3000b208a3a28bc76ddf67b6c84 frame00000029 +d01c46fa18dfcc8459311998ffe3059c frame00000030 +ba07c07b0c8d4bc235e255e3b06c0472 frame00000031 +e645875b3cece8c36fd31dd11e3ce3df frame00000032 +e7d847a5152e65edfe07fc6fc4ade2bd frame00000033 +2ba2fd7319e4a453202dae46e5ce3759 frame00000034 +0d491ad074f0cf6b08a7ef0f185a5ace frame00000035 +598cbcdb56e76fdd64ad9a663eb83970 frame00000036 +924c6630256b5e2bfe5ad5f3a53f606d frame00000037 +210a1a4935337b5d2dc1c6e385741a89 frame00000038 +1db03fbb6644e6e60c68bbd10b8e5463 frame00000039 +e931305b84c08a097f6f46a8970ae476 frame00000040 +5d607ed91621aa398e1ca0ccccdcb08c frame00000041 +71111ea2246b75c789bb990a876d2aa7 frame00000042 +62f4b38b9ed999ae58fe8defb885c33f frame00000043 +8123bde707f9c7889cb14df03d5773ea frame00000044 +0958233b950b8d64738037de3bd6704e frame00000045 +b035a20f5dead88ca35b1952517297be frame00000046 +0958233b950b8d64738037de3bd6704e frame00000047 +7bee98314c4bd51e2bef1aba4a776696 frame00000048 +6987604cdea818f2096d642dbc1a9620 frame00000049 +03b2bb8e13cdbd974092de4d8dc3dcdd frame00000050 +0b5c169fb6f7794df934dde7d69ae1cc frame00000051 +6ad8ebeb47672697853272ad5f08b05e frame00000052 +bd3796a138b70de0f01503f7bca0220d frame00000053 +39ec3d65cc7187fad34f7f0af631c7b6 frame00000054 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR9_BT_B.h264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR9_BT_B.h264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/MR9_BT_B.h264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/MR9_BT_B.h264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,53 @@ +0330d7071f03cd2094eeb6a661520093 frame00000000 +46706de4d76bb3bfc7e47065e82da638 frame00000001 +cb911a7356f97adea6b8f17d06a00ed8 frame00000002 +1d9905e089a1e83867cc135fc7fd1e48 frame00000003 +ded3fb0b1246508b9a878335c70299a8 frame00000004 +96bff87c28deacd508e9f80a58754085 frame00000005 +eb0fd15cb315465acbcc4da88f29aafb frame00000006 +3991a78a724127856485ef5a1cb7e736 frame00000007 +8c696a20531591ef1bd188ad5a606100 frame00000008 +0afd05aaa745e2df249a1985249d9b2a frame00000009 +ec880d398583af61d3a7907473cfdea4 frame00000010 +420f77203c98618123d462e34fbf87b1 frame00000011 +603f1bc536634904d75b78d1ff90e146 frame00000012 +621eb25254a3f0f4068d08881552dbb8 frame00000013 +c3b0a7c247f7203dfbdfd0a05e0442e5 frame00000014 +c756d9022d8963def2d9f84a06744fb8 frame00000015 +c122a3dd5eac813854a1efb246cc13bf frame00000016 +9371a99f493f13cfaf806994a9d7eb2d frame00000017 +0bceec0cebe1276163bc1722a3c6bd93 frame00000018 +5d71ff6522a7f753bf524323d24cc02f frame00000019 +5f4fca1590fc55fd249531413897eb3a frame00000020 +4b3d8db98174c36f2f4ce819e32b5ce8 frame00000021 +90ffa593a1eac13d37e9407dc03c746f frame00000022 +30466f49a85fad0793aad5d321d9e659 frame00000023 +0cd0928ad4eaa4293c92b342204f8e4c frame00000024 +52304d54d7f0bb9e117adcc01131a5ad frame00000025 +7119d898822bfa6b0c29df08b2bc652b frame00000026 +e91acde7e2d1e20f2cb100b9e4aad73e frame00000027 +3a0ec00b0f454b352a22ca69ba69a93a frame00000028 +defa0a2da40a1f91f6f2e005d76e8465 frame00000029 +e029eb60ce485e23cf8bd647286c3de3 frame00000030 +ed82b8472dfc3238242aa42f512dbed3 frame00000031 +5e52b54b75b235f7728302f807ae91b4 frame00000032 +304794788e7b718424ad9d03c426e8e5 frame00000033 +d362d29c297ec54dd81602d3958144fe frame00000034 +a7514ad60d89a376399d4c0fd5f6a15c frame00000035 +f88468326a1ab4fc4b9517e48f207d98 frame00000036 +d46a3d56e3bbcf470eb293e1b5fc5209 frame00000037 +2ac803275a4e16a339dec40f39b6adb0 frame00000038 +c9f1929d0a56bdd5e11a3324cffe0c1e frame00000039 +09dc1016c52f039130f5d4721f58ac0d frame00000040 +fb3b4a4eba4d0054e8bcd6db343e2221 frame00000041 +ef7153f4224a136e74df20a572f34447 frame00000042 +f2e65350140785a76a459e2935a83beb frame00000043 +7d029c32c698f86bc9b4d5b3428123b0 frame00000044 +8af51f8b0aef4a6b5bcf9dfe2abff908 frame00000045 +fbe4015e8deabb3b0ad0dee2115664ca frame00000046 +89eb458c57cd630f0bd5a7ab47bfdbb4 frame00000047 +580701a3288d0adc031b0fa43c192820 frame00000048 +1969845904e3351a3e5838bf25a05c45 frame00000049 +c3a53f17c3057c352869bd8278ccf997 frame00000050 +6c79eaf7c5a72c470fad37e83294d0f6 frame00000051 +9d09e2b3a2bbc13e6cf004c1c2479e21 frame00000052 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NL1_Sony_D.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NL1_Sony_D.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NL1_Sony_D.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NL1_Sony_D.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +363d7f6ad33c14d4c2678a0c564e421a frame00000000 +7814640d8044af6d7999ac5fd7a906b2 frame00000001 +0797d2f01e043f601dddeb14b6e8ca64 frame00000002 +7fccad4071577baae05eb6700748a6b3 frame00000003 +d11bb16d7364698593ca8f651f3b81d1 frame00000004 +410f942c647d76d90d1eaf743b26c261 frame00000005 +3fd57daa75ac027ed32c8d580b42d4fd frame00000006 +bc460c718da78be649200b1c6d4214ca frame00000007 +95916e78db303590d2749422edc895b0 frame00000008 +bf5a711fdd7f7d9cd536c330ee8b1cac frame00000009 +9ba00a0c047c1bc76b8605d059f244c6 frame00000010 +e840718f17734b5cc6b92253bc746ef4 frame00000011 +37641dc8891693fa3156f671145a2c77 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NL2_Sony_H.jsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NL2_Sony_H.jsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NL2_Sony_H.jsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NL2_Sony_H.jsv.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,296 @@ +363d7f6ad33c14d4c2678a0c564e421a frame00000000 +5945ae30b12b84983e84129bedc02aec frame00000001 +5212009b81dc5210197a71d55a7efb65 frame00000002 +52a11e718b22cfd95adb6fa6dad3acf3 frame00000003 +5b46e7f9b5346a00b95e22eadf481884 frame00000004 +956f6d614a372b02a02b84c4f735636c frame00000005 +43aaed9184e0dc84613ffb802ab9809c frame00000006 +3b3046011b4949a58fec54f6237c61b1 frame00000007 +6ccbbab88975f85ee24a309ce1076c73 frame00000008 +35d2225baf825e30659df620030cadbe frame00000009 +30e88690dc22e7b8741d130cc8e7b6ad frame00000010 +57cea990268182017daffb71673b9933 frame00000011 +d1ba4769beb7abbef1df840da588c469 frame00000012 +b7e3e5df7ba6a4a015e875a98111d85f frame00000013 +15a90099957dcaa9a4d37187d7d0f567 frame00000014 +2d1262aac8f2a10df027e19a736aff4b frame00000015 +0182ee596763911bcfe5b12e4ceab1e5 frame00000016 +352be2c4e8e471ad0afb8f525fc62a90 frame00000017 +cf33da011fd915b071ac7a614a96864c frame00000018 +424084490f5978ee8c31b356983a6871 frame00000019 +8bf1836c8625195ea03eb5711cd5b7c3 frame00000020 +48b00c55c4773f4a71154b238a6a0714 frame00000021 +01439f36018a15ffa00b04a233c4c64b frame00000022 +4f8b9c110566dc1b451a74c862dd285f frame00000023 +d0a0a7420a24f39377ebc897e4f95820 frame00000024 +317a78cb4b17d053317214a04ffc103e frame00000025 +89eb26682d141862665f6cb50103890d frame00000026 +060a0d69d7376db264d64c29b161c10f frame00000027 +28c2f8852c121cb67f3f179930e66ef7 frame00000028 +7a8af7ad9dd837b9e5f5ab0a79e0e452 frame00000029 +254766a3c84efd368867f02c7cb25e4f frame00000030 +3826c87d88e3f1d9e3345ff3ec016c97 frame00000031 +504bfd61d313dd0a6e9038d02eb1170c frame00000032 +6fe8bb5e74094cb323c57da7327c99c0 frame00000033 +3d82ede6700f7a2890f19977900883cd frame00000034 +21f300bba760743e385629d94d91aa1e frame00000035 +ad1fb368626f73939a8ef27d28dce92e frame00000036 +1bd52e838684c6cd92fbb61f56c3bbb5 frame00000037 +c1472c2b20a85713f883494d3d81404f frame00000038 +1da94bc8951413fd5fc2ac90c9c54655 frame00000039 +b9ddffc03f0409fca46a4650a3b121b6 frame00000040 +bb0858fa41bf385ebd8fa4cda1e35856 frame00000041 +910985619be33f24f8843732a28dbf3b frame00000042 +ec21e1c239a401957af381ecd5adb697 frame00000043 +1afe56a5a5f0b3b0eea2e555ed7f59a3 frame00000044 +cfba7c6f6df1a90dde9589195b986cdc frame00000045 +b40c16b58d770193a510f40d38ec2838 frame00000046 +8219e3e0fdb1102400c4d154614925d7 frame00000047 +2407ec5b486d4973bc9c28de83fd91b0 frame00000048 +769d9b8c1f9e8f0d4c8b6d652cc1d765 frame00000049 +e003c0e0514ede0e72cffc0cbdb3d1d6 frame00000050 +71748140081c2b59b0fd97f47b95f432 frame00000051 +b238cca87d08977d51b0b297eb56627d frame00000052 +d7345494a3653a05a6627724a8873aa2 frame00000053 +7792c859ae5949edc6a9d71c3c9cb8c6 frame00000054 +62c2c8c827c6c2d5c606a8cfafb36a16 frame00000055 +fe7e77b085ad89ee63c690dea35cb113 frame00000056 +8fe98e53a2c7715811a25df26e4b6b79 frame00000057 +18293fcd1baa2b0aad6fb76617aad3c6 frame00000058 +da84c85c4ff3d86999d3ace2df70cb4a frame00000059 +5d52f79ef0c923b77f756bc2d5f77c3b frame00000060 +55b13a9ed1d5940845432d21fb9caedb frame00000061 +b14b028e68ffe88c5766cd21664b70cb frame00000062 +c2f307a113d29b476738a8cff67bf3c8 frame00000063 +70f4cf7959d868c20d5b9b3b15a8c596 frame00000064 +0514c6dac572788f80c675714da57647 frame00000065 +68395c79f44a582cc04d89ffd734671b frame00000066 +87338afe7c41cafa5f3af3786e21a4c6 frame00000067 +705397a093ecddd8bff745c81f0382ed frame00000068 +60946fd6f26022fa4de6f38473e934d8 frame00000069 +bb9ed9e58ecb48a97fbbc2a489a119a5 frame00000070 +94635b865f154217d5f2ca4fce917265 frame00000071 +c60c62fa27389adf5915964151b5cae8 frame00000072 +87b2c5776ebc8be5761c5269bfe7dc19 frame00000073 +a4898931bdb94c069b5a122e28d24dce frame00000074 +16138938cdf4edee665666058b565cfc frame00000075 +943f4246f4e7478119b7de5fe5587734 frame00000076 +d07139c442537ba14b22cd94f5f364fd frame00000077 +255eae991f46ad2843cb7957fa1a40ac frame00000078 +af83e73011a3c5a2c60e353d805cd9fe frame00000079 +7018b9821af5d7e5fd9af250defcd16f frame00000080 +bd1cd1275c042425e17c6d621f37d14b frame00000081 +c1e6f6430792d0c7293462ed3e9e5728 frame00000082 +625a7b861b362ad82a42271ad9da1b96 frame00000083 +88667ec796c5e19f182bda6d0c34781c frame00000084 +8c8e8f4526cd3068c15b11545def1041 frame00000085 +4d00a54aceb56351a2b2e784ce9db4a3 frame00000086 +20a0dd45a386c46620e4354d570fbb8b frame00000087 +0d9653a441ede0153e4fc652ad439673 frame00000088 +978719c2e6b2caa0a093c3bd57bde214 frame00000089 +89b8a3c92c5c7fecc52104711f171ef6 frame00000090 +84b539bf83392f37b8d9c02b137e03a0 frame00000091 +776f425905f995cd70999c45e3af85bb frame00000092 +13e729c0d2e7a3d1b1fc2915421351dc frame00000093 +6a2f6d0cbd448ae5a89456e635319914 frame00000094 +f38a09e305ae0ea50d663e8c8eb67af7 frame00000095 +d9fb5522666f084d08539061b8559e5f frame00000096 +35f68274cf8b9bda83b83cd3e485ee69 frame00000097 +26784b5f7343ba289ce5d4369055421b frame00000098 +333430dfbcdd1715dd318cfea9264d85 frame00000099 +be7469601f8eeaf41f3f79bd31e98b06 frame00000100 +1d5103e5646f6b15653fa2e80c980286 frame00000101 +648d0b2883459eb6e7f573c8dece5f12 frame00000102 +0f5da01946bac573914c489064a13c74 frame00000103 +e4898c218108eba2966e1db7885ca28e frame00000104 +ce670cbd1981cc3a62fe8d5ee2eacce6 frame00000105 +96307edf65c75d8bd274ffd1f4532d49 frame00000106 +c13ff8c2073a26dc2a5b85b84f3ae072 frame00000107 +a4fb6c363ff61b96517faa3e697f771d frame00000108 +8c16cbd9187c2284dca03c1c0b1073b3 frame00000109 +c21563fb2f1a2174273140b65c0d5aab frame00000110 +d30e5b71a64f99edcbd570a3df4a7525 frame00000111 +bea538da8cf397bb4431896b44a86d01 frame00000112 +7314d1e63603fdca10bc9756fecf14db frame00000113 +df76f540fb6592c46d4b86b4dc3689ce frame00000114 +3d345a5c0b9a1e5db2ec7c9cb5806f4c frame00000115 +7ab2dad33d1f888913942cfb759020f7 frame00000116 +0865e878e47cb0e65cf84721f1270459 frame00000117 +c28e2d4a32687fdbdbbdb7c2a1d31ca6 frame00000118 +93948bacaa0540dea54e1e5b3869c2cd frame00000119 +3a537d627208517b3d321287c19656ce frame00000120 +2b2600d8fea8fed05dcd6ea26e75cee9 frame00000121 +f7e66d1f880944c22bba0a05a0476096 frame00000122 +f3590f6031abdca66722811098f87598 frame00000123 +751cb8e96a0647876c445ef23e17d966 frame00000124 +e0a93077c98c94fba7f1de60b6f6752c frame00000125 +9016e219d2b00667e683dfc58c02f934 frame00000126 +9275d59a316a8a4e29c3836064482879 frame00000127 +02fae4c71edbe907d72d16ed86bfb038 frame00000128 +88e606817b18fd10274535ed78fd2bc4 frame00000129 +31f843a215f00a8280680629b6aa1fa8 frame00000130 +54df471817a63de33b67e621f73a9b0e frame00000131 +81c9ec81cf26673ab732ebe135329912 frame00000132 +1e6ccfa695acebed4b4fc9de9b05ba54 frame00000133 +3e1cd7c701830fa797070ac4b8573b01 frame00000134 +1e51e9dc521b1e269274198f05410092 frame00000135 +79db7c13183a373bffb2d24ef84cf45e frame00000136 +7577544d4b8d6445c9c0da9f9568dc12 frame00000137 +9a49bb53682684de0cdc573a1a0dc9d9 frame00000138 +1927f89801325dca754d81d367ee8ef0 frame00000139 +1fd12e70de50995f859cc9281a46a8e3 frame00000140 +88fedce7cf50f99147932be0d94915aa frame00000141 +e34ed2b676d1401502c7e908287dc6e7 frame00000142 +1075f00550c11cb279631a725d03193e frame00000143 +be21a09afa2855691997376dd55bfb72 frame00000144 +eca2c8f7ffb3e1fe6b4d8683f07ca6f1 frame00000145 +2f0336e53b77d34943ec8cff4398973a frame00000146 +4dda4cffdf12d16a326214e321e88adb frame00000147 +00950fcd0b8363394bead6a9de155819 frame00000148 +3f566b2bdf8faeaaaf99623c930a0352 frame00000149 +d6b82dbb4d6547f31b80ea9665887851 frame00000150 +9e32cbc3e9f4e136b96d1fb886854e87 frame00000151 +622e21d93365f508ba80b4ad7778be74 frame00000152 +6ef7b81830a33f34624d8fb9de0c6599 frame00000153 +47c5f87b39d6ba0c86d9eb2acb8d21ae frame00000154 +388a064d00e5b998a0f371f0557780d7 frame00000155 +98fcb44059de8ae3a591ce3937308760 frame00000156 +3583edef1123aeca4f27bc2cef1fbf72 frame00000157 +130a203a5b21f956f2ea6e1f0e78c0dd frame00000158 +119e361e63fea15302c2854e11a91066 frame00000159 +5ef8750b179553be494ef7c050431819 frame00000160 +cc262606d44a41a3fa9b6526459dbe84 frame00000161 +2e38b26eeed3c418c0826425e60115b2 frame00000162 +e63c2a78a602046d673f62f62a4bf906 frame00000163 +aa457a1a2200f2cd7bbaf41928ccaac6 frame00000164 +54f0a497368a7080e1ac4455325c1b47 frame00000165 +3d4bdb26c7e2b962a5212f7012769160 frame00000166 +a6861f2d6b25662141b4c068e01e41bc frame00000167 +f06035fecb87e2c462f4205b37e942b4 frame00000168 +675c9ad7ba8eaa7ecaf7596faf11ffe2 frame00000169 +0910af9e92b543639f3d23634f570283 frame00000170 +79549b2c923752eadc69d390f7e1a0d7 frame00000171 +bbbc1238ee933b307da36798d98ef566 frame00000172 +708df555314daabb466b003593cb2d50 frame00000173 +42d46ad26f1eb8d7b0dba07071920be2 frame00000174 +ffff734e6f4a4934be3d2b398b2a5b54 frame00000175 +504416aa11f4bc5c9c5e05bed1472cd2 frame00000176 +edb420f576147ef5937238e0c1e9042d frame00000177 +3c9d1198940d972b98ff5ee1b775780c frame00000178 +85160f23334ae9bbc65eac3da0d64c6e frame00000179 +42614e772f523c616e9c4c9e8d57bd0a frame00000180 +610887fac98021c42461faddc54c7ccb frame00000181 +1634fdfe5f3defd85cab2460f1acf6c3 frame00000182 +6b1d9b66ed2e2bb33c2eb2d8239efb8e frame00000183 +c8f98d12fbb057738d04e07cfd11e41d frame00000184 +c6817df572b09d4f61015e4d49a401a4 frame00000185 +5fa69b3401d9e3ec3e106b24e3f717bd frame00000186 +a8349843162e78f8b87f6db62dcfd300 frame00000187 +69593ae063abc69c51a249754df16188 frame00000188 +91eb274258134c978030a89c14e0b9d1 frame00000189 +e68321a9158d048dfd75d0a743f7cf89 frame00000190 +a3657940c9d88beba377c9c38b5f90e3 frame00000191 +e4a4bd7768fde791c53905da46198411 frame00000192 +44a72681ae37a7e24c8f3063f1022eb5 frame00000193 +9b3ca294e5bd982f3034cea8456e1125 frame00000194 +03e8765da088263b39709fa6effa9e63 frame00000195 +f421768ebaaf3b4ea556c9dd4664f2e2 frame00000196 +dd1bc5ca603ae6bd0a60c725a41b4189 frame00000197 +c742a76b4f072d02275d2d2ae933e877 frame00000198 +2e5abb5e623be883c6239c378168f28a frame00000199 +045b23d64f605b9d1a1d080ef0fe7711 frame00000200 +9f7ddcbfe80edd419a9a6ac79f61a96f frame00000201 +169ba8a93d38f9443b75f1edc5517f35 frame00000202 +c928fee51bf6abf43ad4b4cd43b6b2f7 frame00000203 +0e2337c43e8224a56b8fcff17a8201c0 frame00000204 +8d24db035cae42b326a7cefbaedf0bf2 frame00000205 +7b15f6e287e1262ec0fd018159c69405 frame00000206 +82a6a052b618b501c16bcc1ad2e462e3 frame00000207 +d8bd93d9baa33d1f5f7338fd03f8c635 frame00000208 +4ee2d4c9cb239030d730005c1ba6ebe0 frame00000209 +cb0e13d620b8d797b8b9edd2fbd6ce93 frame00000210 +a081a22da4d2b7b6984920d87d28f8a0 frame00000211 +b7644c4d1e28679e57b8e79154b57441 frame00000212 +411017f3176bb618dc669bd269741899 frame00000213 +7ee146ace685adef544fe79ba3310256 frame00000214 +109ff3b55b3f5b6fef674edbf3471f8e frame00000215 +22596bcd4a4648df97d73c8999d1868c frame00000216 +13a93861cf8d3185ee6f6cad8e83848d frame00000217 +d7130af970c6f246593e484ee8262360 frame00000218 +4ec4764cac6a990d7e607e66c5b73753 frame00000219 +47320a2e7f55b3bbdc6a11d7cd311e60 frame00000220 +8275e803853bc46280ed425bda4cd8b5 frame00000221 +02e84d9737fc4a8ee60cf8628b2304aa frame00000222 +a2119596e73c14209e240abb504fc3c6 frame00000223 +af32d16920d2331a5fc2614e3897d091 frame00000224 +9191424d1a9f468c5b1204eb3519a6ae frame00000225 +3d264faac626dbfc791bc0c9a40713de frame00000226 +db9aee25c8781f80bbcd96c8056dea52 frame00000227 +559dd6d3e998bc8c02b53dde1bf672de frame00000228 +55433c3d5cb12b55d89122187437a8fc frame00000229 +893fb19352e2fd3ff68f2a28f1813db0 frame00000230 +6e1204e5456606fda060db6b664cf74b frame00000231 +39631212a77951ad07870aff205e4809 frame00000232 +e481678f6c8aa66d90f7001adb9af1b8 frame00000233 +ca52013a9166ed1e526a577498608ce4 frame00000234 +15d11aad97534d7ba6c8a7aded2ebca8 frame00000235 +d2f5d71db5d3d555556273ab3e11a2fe frame00000236 +f7c6f35fba44c5ebae2b8b1118f6fc21 frame00000237 +2104513826f26b9f0f393235ae81b0a9 frame00000238 +13db8a94a6183cb845f2ccf0d1121523 frame00000239 +8d881b82d96ec58aa439bf8ffbae8307 frame00000240 +0088ecdb489187086cf2eaf9ba29b1fd frame00000241 +82da408916976de5bf322695ae4d1f1c frame00000242 +50f7f7ede399cb188a9cb4609987c9af frame00000243 +aa0992f57a4f11c08e4cd03aca209539 frame00000244 +30b945d1767d61d84d646b7f22519187 frame00000245 +95db723aa62a5cbab19bb2c24d042dec frame00000246 +500362e9ccc1fcbe93adb7dee239a1e5 frame00000247 +f7b4bd50f0892063336a4d5a6b35805b frame00000248 +02e19840679bd053ee6f8152661ed1b3 frame00000249 +f43c29cbfcdeb54ed2ccfdaee7e2c24f frame00000250 +b73ffb457f06bcaf8077de3cb2cafc05 frame00000251 +07391c38387c398fcbc7c83601014c1f frame00000252 +80f0c7a0de64419a58b25c98d916ee49 frame00000253 +7673b85f71e9e2fdca2a09d594a9de14 frame00000254 +37ec2261f1402d675edddb4fc87386fa frame00000255 +ce415d473864b6c687d623420d1e24c6 frame00000256 +3ff76c356cb3890963578a410d15df24 frame00000257 +2c8919f93a112e947e7f95c802ec1045 frame00000258 +2e1b9ab11cb43474cb10b1bac8ebb6a4 frame00000259 +90137d9c3aec6549dfd6eeb7ecc624d8 frame00000260 +b175c91caa636babedfb3e56d11d98e0 frame00000261 +07b4d64e83e78d0533b38f71b844390c frame00000262 +775488170aed7e7e2f59fcb2adcaad49 frame00000263 +cc5336c1e17875b19014a5a9c5c0433a frame00000264 +72d791c499397a7c774f38a8235b532c frame00000265 +5e357784b0d276e43cd0f599c9a63b1a frame00000266 +06d8d7d8cf6058c47994816899e74af3 frame00000267 +46fcc5bedde79eaf381dc01204048485 frame00000268 +e82b9d1f50b2e01c6594f37eaa17cc19 frame00000269 +6eb2d0abcbafa4968d88300bbf032b7b frame00000270 +c1e65b992346d85791a2b1dfbb965a8b frame00000271 +fba6756d3cedb76a9ec761f3c52d0539 frame00000272 +9101f1dc144a941c0ef3cfce8b933a9d frame00000273 +c0c50f767addff451a466c746eb55919 frame00000274 +e012f4159a00a3e5b2d853490df29b6a frame00000275 +44b56c3f7b67a42b14e77f21dd61c585 frame00000276 +39fea3857a9d47f859d1318aa9c25ca8 frame00000277 +c4823312ce4f025f60bd26f3f45c1aae frame00000278 +46de4c32a6d3f4be9cd7f05a7f7799f4 frame00000279 +b4f6f3675d56f610d218d4d8e5f969a3 frame00000280 +d6bd65c237aa425378ca18601d20e4a8 frame00000281 +ec34416d24d2a489f3473dc51e5f1551 frame00000282 +222d48c264fc888df1c69b4ab5d6f59c frame00000283 +9ea696900aa90baf6cf3dd4694612f9a frame00000284 +237812b7ee91928dc12278b785dabf30 frame00000285 +aa039417d8c925d7f685b922af00388e frame00000286 +00d64c609fd4409d6472fdfe5cd75bb9 frame00000287 +f8a24a2d73fa19c87932eb3a17aa198b frame00000288 +92b6d23e439826b0f9b2c2bce8923200 frame00000289 +2713a663d2fa6a629266c83a9dc7d1ce frame00000290 +ade1f7d6c5813c94fedc9d151bb4333d frame00000291 +80c3607a3a83d88db19bb0eca3e58a87 frame00000292 +dcd5f75692c7bca5ded70155787cbbc2 frame00000293 +7f1a50d15229567378460137ca8da5db frame00000294 +159a403880f79a378961543dae87d361 frame00000295 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NL3_SVA_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NL3_SVA_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NL3_SVA_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NL3_SVA_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,28 @@ +a33b2ba5ac2c017ed5dc111139a33588 frame00000000 +41c82ec878a4107551b8cf06cc0cdb58 frame00000001 +a4fd5c1d995a447b07425e76766be8ab frame00000002 +ea904db92cb958b49809e70deeb4e8dc frame00000003 +45a6b825cca3f67084055c59386fc38c frame00000004 +3e0df45c1644e24df58bb28dfc8e456d frame00000005 +d5bef1a5c699eb344039575a363e702f frame00000006 +55dba093448a6f66c4bb6e0026395cd4 frame00000007 +b8a1b4631226e8ec2462602eab096ffa frame00000008 +0236475d6d5b9d6395408d1e3a387da5 frame00000009 +cb58c2c9e9f9f24adc95a6af6260a350 frame00000010 +8af3d79189ef922d9ae5bff3019bff45 frame00000011 +4a8f3c87083f0c2f42a0dc84281549fe frame00000012 +e1c35e8c6cd140fc709e15eb6e3b4a86 frame00000013 +a6f2ac82b5212caa92cc74a10b62c9d6 frame00000014 +a40aeb9d43b10adefba88fb59401db63 frame00000015 +6d99cc847b0720bce8795f280a9f6d86 frame00000016 +72c37bce874e73db3dcd63b00710224e frame00000017 +d1ac0cbc6176c3d224e0e536536a83cc frame00000018 +571a05ffa2f3860569afe406cba3293a frame00000019 +7fca0860717dd90ecd93511f36658662 frame00000020 +bf2d19fd62875287dae0391cd5fddee5 frame00000021 +74443f96e60c66cde5ef50f3c17b51d7 frame00000022 +cffc25ce3216494820caf3796db5ebe7 frame00000023 +16a9a6e463f3433a006c15b56468b70e frame00000024 +2e1bcca58a504e2a5eb2e4b136466a67 frame00000025 +fa887fc8eb523cccb948411594f8a47f frame00000026 +1e0089674beabb631d3c8ee9f0c4c1a3 frame00000027 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NLMQ1_JVC_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NLMQ1_JVC_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NLMQ1_JVC_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NLMQ1_JVC_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,26 @@ +058765d733f2d799fe70fe7bf935dbcb frame00000000 +26ae6e940754af697e5bd38f1af6fea7 frame00000001 +48a739fc7f0d74c9cfed3cc0c0c90f38 frame00000002 +e05de85eb54754f3ae5f367de6b1a22a frame00000003 +895094cd6ad18c0ee6c22be56e6e30e7 frame00000004 +aebed0af98efa76d292ec562a53f48d3 frame00000005 +4b1feae34cea4d7aae6441a1eabd35d1 frame00000006 +e85eb02d8174b8372b1809257406c90b frame00000007 +8af7ebc192b3061866e5efa1c44eb0d6 frame00000008 +f5072a37f85ca58b854cf56289b74572 frame00000009 +c3f02dd98188dcc6318906b35e075c65 frame00000010 +3fbec7f232123014791331790cd2b51e frame00000011 +1b3ccf249598d48c593fd5cab1f8d3e8 frame00000012 +4a48de1c8363b331c16f4bd31a565974 frame00000013 +d292f279df8bcf4215ed4f1ee08429e9 frame00000014 +7f9219375369728545df743b560fe9a9 frame00000015 +aa9025c59367495d391093a2b43843e7 frame00000016 +c8a4f824b1a4d0cae1d61f0939e67a20 frame00000017 +be911b9183c4df836d651be17b307fc0 frame00000018 +edc5362bd37a4028b45bddc9d227e67e frame00000019 +0d02cce8efe485c403eefa0fd1e19314 frame00000020 +3fb7c9cccdc6912fec964a6c2b5ef7b4 frame00000021 +8eb5b7cd91a9199c8a7c101ddfc6d604 frame00000022 +81045798297ebb141a6f663338ed8c36 frame00000023 +199e55a4e309bee3760a9266c69b52b1 frame00000024 +e6e433b1ff8610909bdb3a119aba430c frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NLMQ2_JVC_C.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NLMQ2_JVC_C.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NLMQ2_JVC_C.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NLMQ2_JVC_C.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,26 @@ +058765d733f2d799fe70fe7bf935dbcb frame00000000 +9b08ef6af2dd1aa851fd59b5785cfccc frame00000001 +2c6b1e2f3e622079c2bad783a3d357f3 frame00000002 +7059cdc5a84663568bb5af77c459cb3a frame00000003 +03040ec3dbe2e1d18bbeb941d681c345 frame00000004 +88392276c624cfa4ca28760bb89ad27c frame00000005 +770aabb4b2b37ade5f08dbc2b6c37b73 frame00000006 +30573bdd3d0a1e35c5a804322a1bb2f0 frame00000007 +152b760faa864cbf8227cd6f5d8ea624 frame00000008 +a99f03b0a337288502de0ef74305c5f4 frame00000009 +a76bc5c8c570532df7151c7623a50ac5 frame00000010 +bc7697be8c1f934d3dc16e6831aa3e57 frame00000011 +f870d6db5b4a54dcfd61ca1f04a69f96 frame00000012 +7991cab55815dd38a01837e5a7cf4e3d frame00000013 +0eaeb45afb5fbcc60fd599f1a796c268 frame00000014 +7b11f5739dad655b8804083946c0cdb5 frame00000015 +a7b6f81fe5b24528fe5c88dd8a21ad2e frame00000016 +d8482d6e2a916e9f1390c4e54bf1390e frame00000017 +7b0189445bb17ebddebb6d779333e269 frame00000018 +f75482683b631a747cd0ff74655a2f14 frame00000019 +c0a9ad66ab86e094a384772a9c2095c5 frame00000020 +3b314f18614c376ef36e901e62c22fa2 frame00000021 +0b5ec398f8ac3e2de66bc758c3f65008 frame00000022 +1dc5c3f221f8212af7b9ddb0a6c379e5 frame00000023 +239831f0359ef6a1e0ac817ab06e15f6 frame00000024 +f21681e0faac12f4fb2172bc3bc975a6 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NRF_MW_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NRF_MW_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/NRF_MW_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/NRF_MW_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,96 @@ +b2ea86aa3bdc9d18515fa129d29b043f frame00000000 +7517fe70b7d43cf451a0bb32d8409348 frame00000001 +0907ffec6ebfd2f51518e240c126fc26 frame00000002 +caab4da09a6fce18d82500923c923549 frame00000003 +5db40eca3675ae748fc07e4bf18091cc frame00000004 +a1a8de2c593e2c4a22d060b10ea81c31 frame00000005 +8a33247b2ad0affd1d317b0ccb7aeebe frame00000006 +b4b17c7370912d37865ec79f78fd270c frame00000007 +c51431a6914ae1b5a786564cb4625bf9 frame00000008 +55f7360ecc8d0ba91981576e86a4002b frame00000009 +3d34cb3cd2d1bcb3984ba831e0a8a7aa frame00000010 +2e6177a5a1de3aafe7ce256359e12640 frame00000011 +52c4057f766ba5e07d15cb1023d67f69 frame00000012 +49577720dc33e3a5b9260724009a4e24 frame00000013 +02417e02c3a6b07df1b58cba17559437 frame00000014 +d1ae9b48aebb51c8191e6f709a6b5267 frame00000015 +fdbd22921cde362b667c13577f3a8215 frame00000016 +551abb6afab45eb9fe360a248d8bd9a1 frame00000017 +8ed3842efb6423c19965051c8cd77271 frame00000018 +bddd78482fe60fdc7bcb6fa1a48d25d2 frame00000019 +d99f687ccd8b905ee220e57291d82295 frame00000020 +4d6a722032b04b44ea4ece4c8913b73d frame00000021 +de51b9c62cb45c34243ea441ecefdc1f frame00000022 +4cf2e331d4289dbca90b6553906cb850 frame00000023 +4f81463f6421caff0bcd5095740bfc57 frame00000024 +8aa343a80f2bb4cdfec0d74644c1102d frame00000025 +174f598db1dd48f487b6d2859e186e0b frame00000026 +f583951e3a1e291bbc3ae5285708cc24 frame00000027 +bbd1db1a4180ac90adf79f0991baf4bf frame00000028 +7439e63f2d752582cc0f4e8b036c1282 frame00000029 +4b6994622837562b8d5ee8cef03373c7 frame00000030 +3f155c0fdbb9e9d2cca288f97ff0bc73 frame00000031 +8e183cb7f6d157c028fcda315a2e83eb frame00000032 +166c80d7470a1f251c1dae7a0ef78cdf frame00000033 +7c75e0329c8a4c962d83f519a513a3b0 frame00000034 +7242c11ded99798e1b847f7512a8ec4e frame00000035 +dbc9433f2e43d6f34b19ab98053cd78e frame00000036 +d9fe1c4be48f5e7da6e2f349f126d4e4 frame00000037 +bd5bf38791bb8ef7df8eb354fa291c5a frame00000038 +4efd3568b29f960abd26175fc798b4db frame00000039 +aa19789b14b3dc701d3ae1a87506f2ef frame00000040 +60864ae57491dda8f5abfaebe59f8745 frame00000041 +6f78685fd8ebf51a6a13e5ca9a6bfd2f frame00000042 +b4242bfe74b30d765044693c04cb0811 frame00000043 +f41b04f9d7a1d1ff41937e06d336eca0 frame00000044 +62a8800ca063c01d5eebf0723044ea3e frame00000045 +15d936508576884ca1cfe0744feb3aea frame00000046 +f2a0564a4b33e42aa21f2c7c8de3992e frame00000047 +84323653744ed27008cffa261c4e76c4 frame00000048 +60a9f063fd031fb5dc4e07a7e4baff6f frame00000049 +99a872f0a185cdfa1c2612e64833f274 frame00000050 +ef42bdaa5df0b0a88483c9b0b7b00a8a frame00000051 +3fb2b408e4a4edd30bbd0ea616cf8683 frame00000052 +1015f1a676ea10e24f3be8699cef9086 frame00000053 +82062b332b74aad1b90cdb3659d1505f frame00000054 +5e0d8fd4971031180f9736a7af80bfe0 frame00000055 +cab9d1b157aee0a41f1544536f4c610a frame00000056 +844eb38122525fc47461372ab20863b7 frame00000057 +b17a40b081486d4eb35a97993c357e7d frame00000058 +0e5d8e57a440db12bd81fd455bbd1130 frame00000059 +b82a19c04bb8604a21fbdcd733e7ea2a frame00000060 +9f633d6654483a7d690800b05491839f frame00000061 +2a1d8da11e6d45e2230ef29fce0bd7bb frame00000062 +42305f307898f6a3657288778b3ba8d6 frame00000063 +c1215b2562179f673c06a394a57ba822 frame00000064 +84a089c23bbcd2403faff68494e46063 frame00000065 +80191a5d72c57182686f02f5fdbeb551 frame00000066 +7515d77891658fa42811bf27ab75ef17 frame00000067 +75e419c73cf77525dfc3d608185f54de frame00000068 +a6238fdc9529baa62b852bf4dfb70091 frame00000069 +79ae9e8d73766d1e8fc36cb9f7c56142 frame00000070 +670b72397509dbef92ed66fecb2903c9 frame00000071 +e0aa40d55c0a41a09ae75a04f02bb45a frame00000072 +1df38f4b1a259874cd940e14b7c306a8 frame00000073 +682a7ee68a1f99617667d862ca412138 frame00000074 +4a8d66443fa844dd2aa25e2316d47826 frame00000075 +378bf79e230ddda181e0c5360c5fba22 frame00000076 +90ba733e298cb477c449f5435dad0249 frame00000077 +c67b4847f70d7172cae06ff45b385427 frame00000078 +4ea3437fe7cd949011a62afc9f7f14d6 frame00000079 +c1c1e641b8eea63cab97aa1095d9b743 frame00000080 +390b6d9998d866dbb76f402378b5e2ef frame00000081 +62a3a310db485dfea1764ff320abd436 frame00000082 +3149673be921b34f230b0caf927086db frame00000083 +cd7b122c99cb0f1f6f1d8ff0697aa708 frame00000084 +cc99b2875e784646f5148783396a2e6a frame00000085 +bd4452064f3fa24de2526c2ca321ca89 frame00000086 +2832b475ba09d9ef066cf65bf82e1b31 frame00000087 +0172c992d94e509e10457c086a89fa4e frame00000088 +1350dc0007f0733dfab04370b99adef2 frame00000089 +3d0dd9a26235ce5a9e22988d8870fea8 frame00000090 +6bc4867936de4cfaacef78f09ab58675 frame00000091 +cc1723856cefbfa4b4ac2d4da84e3577 frame00000092 +cb76fd0f9579c2921dffe74e86bd600a frame00000093 +a0975eac288081e0ea96046855f8b996 frame00000094 +2e8026e3e35413c365127e18778b9870 frame00000095 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/Sharp_MP_Field_1_B.jvt.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/Sharp_MP_Field_1_B.jvt.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/Sharp_MP_Field_1_B.jvt.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/Sharp_MP_Field_1_B.jvt.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +ed42136006cad79d70ae1ede0ff3a817 frame00000000 +fc6d9e08f00974f5197ca202a8d952c0 frame00000001 +37842fb2355c8c9afe9a0439ff4b4c44 frame00000002 +3009cdc98c3c22a214c3c334d24f3980 frame00000003 +3231f314f3f35c0483ed650f224ed278 frame00000004 +2a7a6d5907ed922b17817cc6ddde6405 frame00000005 +8fb80a1bbd37d4547afb1d9f5083e019 frame00000006 +9e183af188e950093fb7b86364051deb frame00000007 +ecae379be305c94e01a0398b113f4a7c frame00000008 +ad034a56274bb09ba67ef71522335193 frame00000009 +8c67c4e4617bf83831fee67120f38177 frame00000010 +4cdaf6f818abd8c971083ccbdd74c28a frame00000011 +92eb23453e27809e4a496034a6bbb5a1 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/Sharp_MP_Field_2_B.jvt.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/Sharp_MP_Field_2_B.jvt.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/Sharp_MP_Field_2_B.jvt.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/Sharp_MP_Field_2_B.jvt.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +ed42136006cad79d70ae1ede0ff3a817 frame00000000 +5934744cd5ca77f46afd4f6cbf6b525d frame00000001 +4c70ae0dfd4963d95ae898caa0f03f79 frame00000002 +ae527d332edfd299c1aa55ec9206aef2 frame00000003 +de55ac8b7e1af97c9e47569579bce531 frame00000004 +b40a7e612834f8de091392c6d7ae81b0 frame00000005 +95feb7a57fc9562a3c27ce084f517bb3 frame00000006 +1faee48b5d7072d42cd3ac3eb7d24a01 frame00000007 +c8a747600b7d3d8dfd15c2b5c9b9143d frame00000008 +31d9372074e9e0f4080e087e648a8af9 frame00000009 +0c8d784e8c04d53256913af13cf72648 frame00000010 +3cefebf874beccf69f2c042171f95ec2 frame00000011 +e6e6442aa165309235b7d78efe614b4a frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/Sharp_MP_Field_3_B.jvt.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/Sharp_MP_Field_3_B.jvt.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/Sharp_MP_Field_3_B.jvt.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/Sharp_MP_Field_3_B.jvt.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,12 @@ +ed42136006cad79d70ae1ede0ff3a817 frame00000000 +6c56f046d078783de2e3fe1d5afe80ba frame00000001 +122cbe997cf2c71612c10af793f92d0a frame00000002 +67439fa6c57e637bd26ca8d6d6d66fbc frame00000003 +e80d162ac15b9edc5969ac96fcbbf974 frame00000004 +eb1cc48c0ea9eeac9eb85953776a6c33 frame00000005 +dc3d026ff02b80217eba3a3875a5e083 frame00000006 +503d779c4edbff7cf69c492ba002a72c frame00000007 +c95e8c34e97f681bc6f800ac406a4cff frame00000008 +4e836a6a990afbdadd99b0b7b5f92652 frame00000009 +dccddfb968fda22151aa222e36e7060c frame00000010 +5909acd2f06cbdf0344eb385547965d2 frame00000011 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/Sharp_MP_PAFF_1r2.jvt.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/Sharp_MP_PAFF_1r2.jvt.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/Sharp_MP_PAFF_1r2.jvt.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/Sharp_MP_PAFF_1r2.jvt.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,12 @@ +ed42136006cad79d70ae1ede0ff3a817 frame00000000 +1ec169c249dcd6ee26fcc41b42766f7f frame00000001 +a439f4c7a5f9d659df2650bb783e2ec1 frame00000002 +f282e13bf1af312a47052ee5a9138245 frame00000003 +cb99d1d639432cd45e2bb1c29d44b4ac frame00000004 +e84e2d47f43c8ebc32af275cda97386c frame00000005 +93859f516edfcacbf2f8a78c862b5597 frame00000006 +2f3d775d672b3c6ffd26dcf19fd069e6 frame00000007 +350eedf3c760984aaf4c8780d263a755 frame00000008 +e36f82ef959f4afdc60ac73da5437006 frame00000009 +ddceb3a2665de92982ed0268421f8cbc frame00000010 +ffd0535672cf3f20ebab0282a6a83f90 frame00000011 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/Sharp_MP_PAFF_2.jvt.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/Sharp_MP_PAFF_2.jvt.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/Sharp_MP_PAFF_2.jvt.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/Sharp_MP_PAFF_2.jvt.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,11 @@ +ed42136006cad79d70ae1ede0ff3a817 frame00000000 +1ec169c249dcd6ee26fcc41b42766f7f frame00000001 +a439f4c7a5f9d659df2650bb783e2ec1 frame00000002 +f282e13bf1af312a47052ee5a9138245 frame00000003 +cb99d1d639432cd45e2bb1c29d44b4ac frame00000004 +e84e2d47f43c8ebc32af275cda97386c frame00000005 +93859f516edfcacbf2f8a78c862b5597 frame00000006 +f65b2bc904036e3bd17f1ac440498af2 frame00000007 +29f94ff913de3e45f2c9ce2ab6b37bd1 frame00000008 +73bf993e666b99a3f6d93e396ca4d449 frame00000009 +f7867b16d84cfa3798d764af9cb1d029 frame00000010 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SL1_SVA_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SL1_SVA_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SL1_SVA_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SL1_SVA_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,28 @@ +04d3d6a4f00ba881c5ec213431ae45f0 frame00000000 +8074a5e243c2213cff43c869700fd205 frame00000001 +975db9071abec4316d4eb85b55fb64be frame00000002 +32bf1227d7a533dda42a4f7747083b85 frame00000003 +20648e5fe9fc13eefe256aca3c457a8e frame00000004 +b8a3e976c326772fb41a80bbaf0b422b frame00000005 +06494dfd9f16bb176216e5e3094e1be2 frame00000006 +a8ec924efdfc48116498ee21a83c6477 frame00000007 +2e053f4ffe1440f5e3ed392fec9f065e frame00000008 +b7977894f105d92546c2b958a172aa7a frame00000009 +02450791d03252f801730d036792a404 frame00000010 +e9fba12650a51581046027fcc0994fca frame00000011 +9b26c5a33f4a6e7e1297e54921e0c5fb frame00000012 +e901b3d3deddb3f05238773d8796318c frame00000013 +babf884c93fea06eeb2d2edb38e77f24 frame00000014 +ebfb01f750cdf1410a8ac5a3eaad3651 frame00000015 +2f264c631a09a09d558c1748ff7aa484 frame00000016 +38a6e169c6bb034e5bfef440a31d5ad2 frame00000017 +3db093d780ea378528f1386e1d00ab72 frame00000018 +a1e875d27bd297cbc41d038bad083b90 frame00000019 +0c2d87ecdafe1ea479df41713cf4b9fb frame00000020 +5ed37a97430faa967c0059423f4daad4 frame00000021 +5319039bcebf98857138c4ed3b3706c0 frame00000022 +351d9fbf3b7bb38238167fa1be3ec443 frame00000023 +237c218f27fc4bf5a8e8043a7d9a0ba2 frame00000024 +88f72b64b8cdd12e726bde635db75e90 frame00000025 +997884117879cd0e8bd56457a3b3c479 frame00000026 +88de19929b5c737aacc96a70a70e4c27 frame00000027 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/sp1_bt_a.h264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/sp1_bt_a.h264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/sp1_bt_a.h264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/sp1_bt_a.h264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,396 @@ +1fdac852bf37e58cd7fcac827c4465e2 frame00000000 +c30a05ad45c5164fbce03d62f28a7097 frame00000001 +173e929536b25d8dd375f9edb5df975e frame00000002 +262a928f6e1207d43bdb042011b1df21 frame00000003 +2b3b51176e8e81bb0439f629c1644176 frame00000004 +82ae076eba8f3a9075f8418b2f952bbe frame00000005 +6b8b5b64a2c24a2496a4bde8565ebc94 frame00000006 +2fd5f983139d1c5bca831915aedde5e3 frame00000007 +dd4e895d4325c17a57bce5b6a9b2bcf5 frame00000008 +5a0f59a2d2babc972f7442416ab008e6 frame00000009 +184f8ea4bda4fb25a2a4eb56316d58fe frame00000010 +06b839c9accd10708463b4fccb9658b2 frame00000011 +fc6621eb8173d3dd4ae40f67c2096800 frame00000012 +2c940b5b83a1e886fed3ea2402912fab frame00000013 +32465d0e45fd98f790121acc2ef7adbf frame00000014 +c46a77d7590c7e97c50242e87d80e6ea frame00000015 +f3d886e5d11567a05237079421815ebc frame00000016 +f2f30e564467a020ec37c2daf79f8f48 frame00000017 +f77b9a152fffa8b69e46ae9575ee0edd frame00000018 +343b484a3b963bf1a2e403b6c2854ec9 frame00000019 +d7302b75ed2462bdeef092fc0dc2feeb frame00000020 +e6a4b2a2af798ba1f6af1af8ab669c91 frame00000021 +00311c716f952d0c373485d938e1d72f frame00000022 +3647cfff70051f24871c856d40087ff2 frame00000023 +9bbcf5a35c78099618cbb66ee386c08c frame00000024 +8bc19d107f34007e42f3991fdf1b24d6 frame00000025 +51ee9c790346f5bbb856919b1b663033 frame00000026 +18ff80d38fa69d7ed9457776391927be frame00000027 +7fec64ac6a3009b0efa07611a9d2e0b4 frame00000028 +6ccb34b6da4816ba85eef28455682429 frame00000029 +0a818568015de59c7ed64299920ade8e frame00000030 +ccc59a82dc2dbc31d3e34e9a3b20bdb8 frame00000031 +4672f2582da121349f7c35bb476688b8 frame00000032 +c403dbdb82a9cc843c76d3c1b5b7c9f1 frame00000033 +af993d4fb6c25d8055c18b1f26745dfd frame00000034 +89e945e209a5684748881d6df06acea9 frame00000035 +de393d607dcf091111e7e56d12c1d950 frame00000036 +09cb59f852d103981ccecee20099e3af frame00000037 +b67c420c263cc3ebcfbec716535144f9 frame00000038 +1d3f96d69c5db1bdc2e93858fe2e8d79 frame00000039 +2859685e5516df4a11469b61a974e107 frame00000040 +0c46c329b25a0b58acb9c0652e9e38d4 frame00000041 +adec59454850e8970094ce76aa801f15 frame00000042 +0217609f1ea4459222329f53539eb865 frame00000043 +aa1fe62969d2ff98757766ec25a59605 frame00000044 +f1beea6b7c997ff63008cedc2af254e9 frame00000045 +db8a670a655f7d750a109cc9fc5cb82a frame00000046 +76607516a4ede7259e6a52ebf37a7428 frame00000047 +a6c13fc4a04a1322dc9c71bfe18c90b0 frame00000048 +2dc63efe957e6eac6adee7472823ac5a frame00000049 +409dceba04befa4762f2928658fdbcf4 frame00000050 +4bd0d25d74e2b251f20e5f17e07212fd frame00000051 +12fc25f413c291896ec7a2db89619d3f frame00000052 +3b6153892f72022ae870679aba9d129c frame00000053 +ebf09dee418fa5fb2c07c14ab50e741a frame00000054 +7b80ac81842e05dff21e43a07051cc83 frame00000055 +3040b4949c49c4e40b352c52021964f4 frame00000056 +b653a3456207ed3a8c6b450bc1bedcca frame00000057 +13e05c2d7e2e57ecf5b4c2e8c8a49190 frame00000058 +ced8b44429feb1389ec06e8bcea65f5e frame00000059 +89e8e30692629ba7d90ac2d7565293ed frame00000060 +9abfabfaf4ea9d5438140a0392191f23 frame00000061 +0b9588bb3358f012992d1ba284fa1fb3 frame00000062 +f7e00dabf8007803ce629207013e61b4 frame00000063 +446cc34dd53c85c6514ff3b4ee1e1153 frame00000064 +df40237bd1373a64414224e3be102b0d frame00000065 +4ba01adc2d4159087747fc47aba53b46 frame00000066 +5d6dc34a1feab6a5768df6c607ddc6d1 frame00000067 +d8a864c8d08e96d388a090d5bcddd60f frame00000068 +4806b868beb28b865909a96142bb0b57 frame00000069 +85010e1246a7130b996f7a1744c7803b frame00000070 +962a43996b7e9ed58f0817dcce8ef12f frame00000071 +910363b2a16fafe4f8eb5e5a52a21d45 frame00000072 +601d405ad9b18c7636463c9447138f91 frame00000073 +8d9d670149595c70f791b01998fbd8ec frame00000074 +df843429c0fbf6ea6760b666c3e4af6a frame00000075 +5a72e3f4e7f90cc2aa050538523eb1f7 frame00000076 +733f917bc6a949c1f449ac08e2c33ab4 frame00000077 +3bbc6403926723da450bacc9d968a50a frame00000078 +d807e9c2bc4db734c550ac4912e1e84b frame00000079 +4c107f0bd472ab46867e370936ff7e94 frame00000080 +2ce220ae7c772467c75b71145423fe35 frame00000081 +db3b6d6f3d4cc06c42fb5a9d0faa698d frame00000082 +24d93844c4be41638d73fae3590d1537 frame00000083 +783eaa06211ce8e0f8b6fbd5fe76fbde frame00000084 +e0044bfd6fa0cb3b8f5c02788e9757c1 frame00000085 +2f1d18d8a036ed0641b82da6f0554878 frame00000086 +c042a7ec7a4d9ccb1f151a7146fb5287 frame00000087 +eff670d226362f7042428b53e62a887a frame00000088 +2a981072ab2eb1f9297c31b51a16d962 frame00000089 +e24a8023968dff3f84960e2b24b123b3 frame00000090 +0c1b0843eefd8a7ccf6a3300ea72a7e1 frame00000091 +a92aea51a93573d1179b02f57e610587 frame00000092 +6c24589f4ae5804bcc995fa5ae318e8c frame00000093 +41bcc837f6d4b8008a0581023f0c4744 frame00000094 +2771c8e16955759a2532a00537d31887 frame00000095 +601ecc71eb252340ba9e47e0e9ff2b1f frame00000096 +545e10deda97945dfe5c19ce38b1e4ed frame00000097 +05bf3b42bffd4fdcc5a3c96499c7982d frame00000098 +b603d7c8da93ee3d899df31fa9461a86 frame00000099 +282faba8a7bf6320cad59602c2d59353 frame00000100 +7c95e6db37a52fd4141a5ba2ae0bcbf5 frame00000101 +5e94ccefe24232c47fa9af125ebe70fe frame00000102 +917e7e601442c05be9d36e20369b21ba frame00000103 +2fbd16bdf69cbc6f91c1ebfb31b77f6c frame00000104 +22d077f6abcd02eb5b6d3c8454cbce16 frame00000105 +22b7347df443b0c86383ab981081446c frame00000106 +ef53df072f4c086e0c22cbb9092f8849 frame00000107 +da998a09a3a8fc7be0e23eb125517e3e frame00000108 +4929e659e18d0521e721f5d71f207324 frame00000109 +13c00ff7f03a68fa71fb47d19f886133 frame00000110 +0c330538cb72ed46defac66bbb8a2d89 frame00000111 +98d23380c3529aac7df93ecfdde62ccf frame00000112 +ea4638e4931dc150c89ba2b9ac12efb3 frame00000113 +8748be2bc3fdf2793ef14ee7c62a6424 frame00000114 +e08302932c34f962881da177c06726f7 frame00000115 +95ccaa71196deecd243ce7cb38b9d84e frame00000116 +bb5a91348c6da94834c6a9e7220acf99 frame00000117 +95833b5583ad9dd077651e6fa0cff780 frame00000118 +161d4779a2fbf171b078bdef8396c587 frame00000119 +9166ec985f52497548ba8ef9f0269969 frame00000120 +463688c61810b23eaeec42f058a7c723 frame00000121 +c62b53e3622ecf32e3d61c6e3d3136eb frame00000122 +7a36d219cde2a541e84bacc6519c02c8 frame00000123 +536676628be6174eebf95dfc70097909 frame00000124 +66ca0873f5341b0c5cd18f9590ddc6a1 frame00000125 +781dfe208e7e18fd1e8ae032d35f9406 frame00000126 +3a6736ece9910757d3187b7e4e75269d frame00000127 +bb93c9a69c478533661a86217b2dcaac frame00000128 +20e199d244eb683a2135214acf76383d frame00000129 +94232070e6835a90361a5eddc9fab9c2 frame00000130 +78ad6977c944f973990c34e2f498df02 frame00000131 +6f88c2e93f54510c04b830dde38f517d frame00000132 +3c677c34e8efe7d43ef66bd14381e2cb frame00000133 +fa6b047ed21fcd4d1cc98f8ef1c51e34 frame00000134 +77c927c87dbe344853a982a3337d56ed frame00000135 +c4ae2bf92135e62c64bb8d5cd44d3ec4 frame00000136 +ca99e6b1d34c244a135088b29173faec frame00000137 +69a905639f553919c67270c386e91538 frame00000138 +3c49f7faee3488f5c2fe4ec81d19c6ce frame00000139 +2f5627883263e4a19a4665d940be59aa frame00000140 +91cb1de0cc54289e628d1775e57a1b62 frame00000141 +cb0d17d626ae7342329e910d2fdd7dc9 frame00000142 +74c40a88e00868098be291ffc2cb0106 frame00000143 +61b5b0ac8fbb2baa8031468e1ed0bce5 frame00000144 +a7a9cf33cd8a49eb4dea99d4499690db frame00000145 +5d57558c355527a15a6ae62d678ec055 frame00000146 +6292d3ae485f5886f2bd85797a5bd0df frame00000147 +90ec73be2d19cce0af3abc41b611b9b5 frame00000148 +08e3b19f3f58bdc07acf7183220cc38f frame00000149 +b2210f487b2c67048486c1c84610a1c6 frame00000150 +1044a4ba5b9cfb8c48ab22da1748fb9c frame00000151 +0c2574f6813c657627be72fcca87af59 frame00000152 +42976af89047704dc36bc7f90e41f4cf frame00000153 +158ac754fcddc774e8bcdf840ad6f439 frame00000154 +9263b84611b31d005edd345e628ec74c frame00000155 +5a87aa46333610b534d4c06bc2f3fdb9 frame00000156 +631405396b43b4ea7d5768cbd782c536 frame00000157 +3e4bfa76dc07adaa2667830e60a56a28 frame00000158 +b50c6ca0c4cd11b71d7a55629512939e frame00000159 +220d44fc5ba38378be763b11caccfa68 frame00000160 +3b335d58b5e8a9fac2234fb1c02e54ad frame00000161 +1b35db5741c9e6fd131756b91127d309 frame00000162 +a685dfa5225b4f40dd4683aa0159d4a8 frame00000163 +d09dc93bf8f2582e009d5f054f6fc014 frame00000164 +cccbcf95079210f020c7ff121cd2511e frame00000165 +d9fc4eaf5d6b7abb05b9702c313ed5e5 frame00000166 +64d12a2ce9683eccccdea04155d44699 frame00000167 +b7f8f08f80eac3eb0a8fd30c6da1a706 frame00000168 +a4ea7ba04f3b0cd9b80cc0b634b03d6a frame00000169 +3469a73df0adc69946b60cabcf5a1897 frame00000170 +3e683bd6882a521658fcf4d5972f4007 frame00000171 +3067cdee5fde39463f6801ec6f20472c frame00000172 +ce303321817f509651c5822ae89896c9 frame00000173 +28f631f4317c0c1d65a4e9e1bcf4ed66 frame00000174 +f65649f1f4e75cf5638081b5593a09c6 frame00000175 +a996db690c5dd9591ce66e5473766219 frame00000176 +3797bf8d02d59930292da0113617bac6 frame00000177 +1464615e786614a7c0e73d8219c4240e frame00000178 +b69830554cf3a056e032fdc5e0af410e frame00000179 +f3346cfd3c4fd889d6d87ff54081fa79 frame00000180 +7157b3caee6e3c94888c295c2fc7e585 frame00000181 +bf5307c7fc494c1afcaa8c25ec803b9e frame00000182 +22f8771028af515bf44a87cbc736bcd8 frame00000183 +db612b7107d96c1c7858c5a22d319edf frame00000184 +6b1f7baf3a119c49852c7d70f2d812df frame00000185 +6ebcd1c249cb628d8b490e52ddb0b72d frame00000186 +b7479d754ceab9b18f5ca43ca8d9a4cb frame00000187 +faac9c316f4b476e449840e52c6e3efb frame00000188 +c94dcb987e140ae42fa9359dc9fc62be frame00000189 +927241887ffc63313483bdbf156869cb frame00000190 +c9e708c68eeb00ee34a6ac19b6b6ca70 frame00000191 +ebb6f27c7278a9e9a650d6c1998f69fa frame00000192 +71e666a3ade13de9da6f5574e17e41c8 frame00000193 +b90551e4f22bf2d670547c5385e8168f frame00000194 +a1995cee03f4e5584a6faf1878a05f65 frame00000195 +91b961b8c2b073f31c03cd16a2ed8585 frame00000196 +e103d34e5b22e9bfd92d87dc433cd003 frame00000197 +15c3d2a955fedc0d46bcf7b1815fd036 frame00000198 +585fa2d137d83e84253b4d961f17d89b frame00000199 +a427369afb455737673c2fef162f54b0 frame00000200 +20a4f2c4c3c63f8d55f856e97368c94b frame00000201 +e98addbba238b0a8d280f9bf40aaaa49 frame00000202 +1aab6eb996ab181c121afc14413d867a frame00000203 +4f670ef11276d1ab752a2968f14ec198 frame00000204 +32568fc7e90905c076e1bcbc7a8c8f01 frame00000205 +a1578d63988cf83d109f894770845cbb frame00000206 +134f2a4a1943c87661ac036619ed6e32 frame00000207 +2a729a3f131da7b82f6ed034a8cb1890 frame00000208 +401e0783b65bc8ebaa104d3b8e14701e frame00000209 +92e4550a7924b753ab18a80943a47837 frame00000210 +52522739dc4b55ff8ce0661822ad91b3 frame00000211 +ab19f2c8db973c2fc86a34a8a96f5b68 frame00000212 +cc4321eb1c73942c3378dfd9c3e13489 frame00000213 +7c5b9b1c855caa8a00c4b2f54c3850e3 frame00000214 +866fa93b15b84818c29e98d538747477 frame00000215 +2aec01a15cff2c9ea3092fc135141858 frame00000216 +fa0861a4180ecec120a9950fadeb30ea frame00000217 +ea638f8db2fb3655c99cf4e6aef0fd5f frame00000218 +60ee17bf9e32e205c233bc4dfea39afa frame00000219 +804b9c3bd69a6cb5815a3f64b4d83d07 frame00000220 +85e90893769e553bb2b9455991796cfa frame00000221 +92f79e750b5d1917a69bb3bec087199b frame00000222 +99d44e290aa2d69f7d9b10efd167c5dc frame00000223 +8a12e4de478f9f33e278186497f013bb frame00000224 +281b77f0c700760656d40f562825ed08 frame00000225 +a6413ab511a27671a23210f6dc738770 frame00000226 +3032d850740d8c1b2cfe9c611dd82d9e frame00000227 +cf4238216e06fad7864682262a655fda frame00000228 +a579212a61f486113a23f7b9834306fe frame00000229 +29f6004354469cf6655d144de1bbf4ad frame00000230 +45054a06ec65a195bc30af3aa30b816b frame00000231 +c2d53c2d8d36f0eaca0669db08b78d6f frame00000232 +bd41a29c0213ebd483b0cc967b3ae9cc frame00000233 +47afe133682bb09f5d4e7024fd9c700c frame00000234 +345c20a1bf80dc3baa302dd968a5feba frame00000235 +042c48bbe664573dd5514e21d5d028e1 frame00000236 +ba251589a47ff2a348affd6f8f61ce72 frame00000237 +b4a733669578107581f742e6ab63c2bc frame00000238 +86725556fa1171e7392ede8fbfdf4a6c frame00000239 +d64301587943065a8cea128f18fc0536 frame00000240 +18d75aff1c111027a7b0a115d7197059 frame00000241 +30208b3e90afb313bc0b63415522d6e3 frame00000242 +1548f0e9c3c303a79820ca68dc8a2031 frame00000243 +ed98fbb489847f24eac5f0d488193c72 frame00000244 +b0fc1414341a989be9419fca9da30503 frame00000245 +9ff0561d4fac10fe139f4baf1cd6174b frame00000246 +21dbbe8b1cd6a6a2fcf28c95b3a1bd81 frame00000247 +a0ef1e72c1b5a00659fb26cc443b61a1 frame00000248 +0df698873cae61cdc62ce1efe5d001a8 frame00000249 +48a8cff3db7a58d409d8927b1b16019e frame00000250 +4f8eae8e565f4a8dfe2f57dc65d52ad1 frame00000251 +dbc6a89d230aac89ad086dfc80098535 frame00000252 +6d19f87287afa79223cd8e4dd177692b frame00000253 +8fbda696721c4128f0abc9bfd156062e frame00000254 +8820e39560c203110b3c5c71ffe6d5b1 frame00000255 +f81ea42efe7ab49f9e9001a09ea09183 frame00000256 +e10ef4ba2d2aa99a1bf9a2a71a01bfd0 frame00000257 +5a040bf7a40d3ea89c027859ec958f05 frame00000258 +fab2487b5630d1e9c6682a4c1845fc34 frame00000259 +10153fc59318cd1a0c43db072acb586f frame00000260 +91d52768eb05ca3c90b2b04b885b256a frame00000261 +715deed321ec18472805fcd55cf353d7 frame00000262 +521671d826b7c267bab06daf5225f0fc frame00000263 +818709a0295766bb3cba1e78507b04d3 frame00000264 +f5624734c688e99c1772fdb54ccdf4a5 frame00000265 +fe2dd25ccc7cc046505083acf26b35d5 frame00000266 +dc8b11d44fefc80a6c7b600fa18750da frame00000267 +4da310738ab4e3e3bfb90a0e77cac8a1 frame00000268 +c2aeae2aed2459caab123f1cd7edfae7 frame00000269 +1a220c60fa30f88ee1ce531f1db2e133 frame00000270 +4d5ca2c87aec51c22274b43a0338b216 frame00000271 +5a5d1217cb8f02b194ee015be08222f6 frame00000272 +fa9e0ace998bf846748df1899f610b33 frame00000273 +f9bf177b070328e750a40ba51db40c85 frame00000274 +15d69aef0c0db76a5b7d1852b7a79ef8 frame00000275 +a9aa3da7c5871645449849dcce06791f frame00000276 +9b8adbd4c006f46e75f36391900864f6 frame00000277 +77d8d35572adaa35029296ef8324ea1f frame00000278 +218ab6349190ff5be3c8831a67b41dfd frame00000279 +569bd775e045918e364946263c7cbd33 frame00000280 +0cce9ee9449879ecc6c91c90a113a341 frame00000281 +55a22cacde5c1a0f204f585cacef0c10 frame00000282 +4e17174d85338c6ccc76dbfb627b8406 frame00000283 +a80a9b2edd822de1f702a89904974c2e frame00000284 +85985a0c48c9bcc1f370fc30fe6623f0 frame00000285 +e122d0908645cef084008bb8ef796abc frame00000286 +ce858663d01c07864476fbfde995f39e frame00000287 +52aa131c28351d9824d28c331c375b96 frame00000288 +4584c7482d1b6c4c4250c5f80c70fe68 frame00000289 +77350fb4cc8ecac7a6b5d72b634439ae frame00000290 +70e9af6c624ed1cfd064e66811e8536e frame00000291 +0b277818130d06b202646d15701ad4d3 frame00000292 +f5c5586901e5dc3252c661a5d0ba4571 frame00000293 +088caafd9be382d6c57580ce5be09d97 frame00000294 +8153150e7a3fec6525c9d6f9751dfb38 frame00000295 +051414cadf33f6581d4b955b22b35afb frame00000296 +7f58eca2c8464dc78a005fe3519c94c1 frame00000297 +077bce74adfe1e90f055d3d4c07bd6c6 frame00000298 +9e566b87cb18c45b172f5789f041f31d frame00000299 +33996d20e8a61d5465c4cf7de958bb78 frame00000300 +dc76454f59b3b397965b8f79c4546d80 frame00000301 +e75b0754292e622e1d9b0af60ffe441d frame00000302 +2a6d807da6a2dbd9b612b7b4f6df48d2 frame00000303 +7846df27efcf020de74584aa38e7e1d3 frame00000304 +8a29d887d52bfe531331327c9ab0dac1 frame00000305 +ccf7058a0095404a4185d5d250563bab frame00000306 +39d56eb3f50793d5a4b855a75055e931 frame00000307 +3dc1a2f98d75453050025f2f3e611208 frame00000308 +9cfc831c9176bb89608374e988b7e71f frame00000309 +6efe8a0f70dcd99d816df39ed8cc5e02 frame00000310 +1ee1c50a883d5713e147dba6968b107a frame00000311 +45393499441a3d8c7557bf8398d9da8c frame00000312 +dda4dcc70321107df8ac8afbcfde579b frame00000313 +43f9c0d56533026bc53b24c9d512cc1c frame00000314 +25396db47a3495ed7b4236a4eccec3ce frame00000315 +50bc807687b10658fc29a9fcc52ed84c frame00000316 +c8200f2ded075f29382804ef68d0090d frame00000317 +467e130e628b2f118b3a43ca817c0563 frame00000318 +80719227359eb03bcbbec9f99c1223d5 frame00000319 +c558c1737015bec2243f9494a7aaf774 frame00000320 +655037b2ea1c3bd8dfb3ac25177ca7db frame00000321 +6b52dd5dda99fef61bad17a06137db98 frame00000322 +8de2da2525be38de27b914f92061db2e frame00000323 +33b46674ff62449a06bf5f4e4958f40a frame00000324 +5ab5f684d864f59abceb98ae9604e72d frame00000325 +d578d64e9b976b8d06dceff904dab98f frame00000326 +a7a3c00d12ba3e13425f6dfeea390c88 frame00000327 +8e8c16cd370951b667f5ffeff4b47435 frame00000328 +3d8b462f36ca23c9ff5048fc09d4e1e6 frame00000329 +1583861df4d6e5889b79b0cba57ed369 frame00000330 +9f701c8c6c9a243442ed5b503eaca85b frame00000331 +5508d4d1a2ff2e9121302fc5ed829bb1 frame00000332 +a492b3d4ada9c3b7de8064c5e0f3b2ce frame00000333 +04eda5d74ca5ce4204b5679f1a28a8a5 frame00000334 +3af5238b540c0726d58e367081cee272 frame00000335 +25a1cdde1429243808c66daa7b1c6efc frame00000336 +53cafc15781871b593375e07bb5b643e frame00000337 +ca10d82607b7a66e65c9db509486ca6b frame00000338 +e1a0f18e780a4b55104dcc059b5da39e frame00000339 +0d895c2d8412629158b283c76f7cccd7 frame00000340 +eb0bdbbe5e1db1b19a14d912d3b3667b frame00000341 +84281c55710bce97201a90a0b38ba8ef frame00000342 +df169ceb22de21bc7605a3c8e5674b6d frame00000343 +6e1fb5a2421426e7a00f377a9f52b383 frame00000344 +a9a6c082db5c70c55c7e8d13d0340f45 frame00000345 +a9743a134e5ef5477cd8653927620707 frame00000346 +237d7d5b3947eebc09812a99adac67cd frame00000347 +eb32c751b045a984fc6f3861f6a5a110 frame00000348 +034ec1b1050db210229ded20b4c68fc2 frame00000349 +f1f9b8e03679aab5a6dff225ebfc52ce frame00000350 +55ea73c87a076ffef0c5489edd24e243 frame00000351 +83d0c3ccd0b52478124b31b9c99c0b6d frame00000352 +e2f9b85dca0bea9ff3e50d7cd164bdc5 frame00000353 +8d91eddb002c3124dab956d5626470d4 frame00000354 +79bcb2b5e2d745638f338e95e54a03ce frame00000355 +b59ca41c72cac01ad929de299ada7236 frame00000356 +b138556a773f6d0b589be0acc5a0ffc1 frame00000357 +ed723e0f2695f0acfb5cdb5e4168b792 frame00000358 +f7271fd0daec4368f959f80581835da9 frame00000359 +7263344c1668537f53840097071f7520 frame00000360 +63521c6d891846a532569c2ba8d02039 frame00000361 +3f07692454cc4cbc18068d6b55607cdc frame00000362 +4f15ae509e90066a445ff42cc817e72f frame00000363 +2e2f151161e2f3a1c50a67ef3c7ef8f3 frame00000364 +a6fc0dc4b944470439aeb71799703f21 frame00000365 +0196ba40e2ff2f64cc4fd9dc19b04424 frame00000366 +354cee498161394bbb67405e13d3d294 frame00000367 +039783152392448d2a507f3ae3cd0994 frame00000368 +4a7805b965e4983b08eb88e406d8cc8f frame00000369 +2c4ebc2f769a5e3d80e1257dfbd1677e frame00000370 +44b88070a9aa1c0fad3d606c64221d75 frame00000371 +e12cc5c52c7c4b6751c39c381bdfc971 frame00000372 +16224e98a677e39ae218ef9e9c399ca9 frame00000373 +f1055b343aa71e80817a51719ab4f397 frame00000374 +0aed6a60ee6d2c20b8eb44892e894bfa frame00000375 +3280eab3683890b10571236a645f10f9 frame00000376 +680cb5c9a2781410d806c39b8561869d frame00000377 +a9c571c334271a41e7e4b1e67cb77377 frame00000378 +41352ed2e42753d85a09f20e195012c4 frame00000379 +bbc28afb3e3c8381fff1fe51e45cd0df frame00000380 +5e6bd9595765b4a51ad10639c3fe5f0b frame00000381 +32efa242e8967c12e01d3ee45d9e0a25 frame00000382 +e2f33750f8b09acac8fd2ca26bff29c4 frame00000383 +9c5eb890ccda60b7c383da5c981c6b8f frame00000384 +292537a24964251f8052a2fa890725fd frame00000385 +7b80a514d652868c81dcbd8d58ddaa8c frame00000386 +e4e740a1a2023049e73239bc6d33c421 frame00000387 +daad93afbe57e95b6fa21e9351320392 frame00000388 +dae22f11897f88f05788c274a6a989b8 frame00000389 +073560a28b9659d74ef007ff05b0ff7f frame00000390 +08718ca86ab2166ea58beaa631875b68 frame00000391 +05db644e9d90d22fd2cf12e9b4704a16 frame00000392 +05f2bb52ec34245a9feefd81a4bb49f9 frame00000393 +8aa85b77978128e3dc870085a4cf9b96 frame00000394 +587821b7b8e3f1b370ab7575040382cf frame00000395 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/sp2_bt_b.h264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/sp2_bt_b.h264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/sp2_bt_b.h264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/sp2_bt_b.h264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,396 @@ +6cda07ad5c6e657e324fa07bec857073 frame00000000 +92692ec1d9bd6cd05e8d94e120897889 frame00000001 +94a7db8e3a1fd2597d4fe8dcbb940849 frame00000002 +7cf222dbf0df6ba4069856dcd07be435 frame00000003 +4305b2328318406cc803841ddeaf0809 frame00000004 +2ac1c304bd22200cea0836983d42cac0 frame00000005 +6b6754a3e0eced0e7234e54a1db365b6 frame00000006 +279982cab8f1547e3f9132e0b252efa0 frame00000007 +8b8b749e2ddbc377f24646694c3343c9 frame00000008 +bd95dad0749d7977c1028d9b88982d92 frame00000009 +5e77cd62fb01c04ea5627907dec396c5 frame00000010 +fa0c5da13e847c0449134b67c379ef8a frame00000011 +bce2057558ed77fec8a7bb1c03053822 frame00000012 +627f871761f16b9c5b911c97900734b1 frame00000013 +ccb48862f52a1e62d05495d03b3e0175 frame00000014 +af1c627363639ca74abc0edaac4d1fb5 frame00000015 +42b7bed77a0855076d011b96bcf6d6a8 frame00000016 +37eb4d7949c382e0bad17ab2f9b51fe5 frame00000017 +af5acb617e266501fa74ed91b42e3875 frame00000018 +b3121f8512196662772e45eabd52bda6 frame00000019 +c04db7a5b53466334d51bfdd8537f41c frame00000020 +4699f84052d08833dbcdc99417906e84 frame00000021 +072c6c8d79dbeb44ce2e2149d06b51cb frame00000022 +24ff04634de44e20db235a4e71781eca frame00000023 +9c48900dd693bfdaa03cf5240a9149fb frame00000024 +d5c5abd3e47d8b5abad35bb03773a479 frame00000025 +92034f7b3a4b9a88ab7f1d9d5f81dde4 frame00000026 +ac8da20d0e711a86213a9768e0f45ae1 frame00000027 +a2d8ab225b0d8d83b5023f1f77e3a3b3 frame00000028 +b453a07c4d3de89b090880c29aa8b9a2 frame00000029 +c87af1239f7e95ac2dd3038b7530ade7 frame00000030 +9db2abc40efed7171e83edd196169596 frame00000031 +76fefa0aa7dc0197f781f74d2a3e7a61 frame00000032 +ee68f9dedde90a42fdd31aa8b09d2f69 frame00000033 +d143f86b20a7aa8d8c768da0cd1870b0 frame00000034 +3bd81c544bfbbf5516365e9a4b24c6f5 frame00000035 +bc6545f5451f0b2a008ec2a3001f8a88 frame00000036 +0c8bc3ea47d15747698d8d37a34a9c2a frame00000037 +43e01816acdc15442b646a39816fc6ff frame00000038 +040d7eb3edcce165ec3e8ed9a8fef969 frame00000039 +b29f9a5da35c4f7915aa056186fbb966 frame00000040 +5397e3870416cc728f3f72529fd1f2c9 frame00000041 +dae7c9720714cd8b48eeb16ede1c1f35 frame00000042 +0c9532a15a88fe2b4fed53452a58f54b frame00000043 +f4d16d534c2e648cfd64c102ea3bb6aa frame00000044 +5d9054f63d5306e39a24f2d7bf804687 frame00000045 +75e3b427b90d878e55644cb8b4dec03f frame00000046 +ca0562eb3a0697e45ea1dbc497c8c7f9 frame00000047 +9f5901e8aeddff45f6aff1d184e55eeb frame00000048 +9a15b3aaa178916c1c6ea8e85c1371b5 frame00000049 +83ee167eae4e23c6f7d6342a5449f22c frame00000050 +7c8f458e4ee486cdd1eb67e6bca27fb5 frame00000051 +6bf62720069373b579a246492e486d6e frame00000052 +4eb2a99fa21982de7a52f5743b2d2118 frame00000053 +253ce3bf5bc5f66bb520fd66c64d038a frame00000054 +67900687f383b2defa3bfea240121130 frame00000055 +92077af1163ef3d2612c7f766462a0ad frame00000056 +22b68b99b35c9a5f5aa81b6a7b23521e frame00000057 +8d8aab482718f5628723f9737d5810a0 frame00000058 +8febb2a9d0c49d287c53e2992c5207e0 frame00000059 +0abaa1add71622bab40609006d0622e2 frame00000060 +a7538d6c4f976f709fef29f92abb35e6 frame00000061 +ecc20d07bf8c554f0882a891fe083f8d frame00000062 +c41d7d7af967394139719cff666db24b frame00000063 +42046e60112fe24d692aa607a5fdfd3e frame00000064 +2d6e0c6b538318aae7c881cf94e65bb4 frame00000065 +1830a0b3bf3e255fc60ef0727654b4fb frame00000066 +5c13d1b54d889c2bb87ee4897334b367 frame00000067 +7a41be926cb3ea4ef783ebbb335d8fc3 frame00000068 +3c9dbf10d69f0759c8bee8cabb01c2f6 frame00000069 +a14d9b104ea8ce5209993b1ad074bd65 frame00000070 +5037c56c050a856e4b7ffa72a4e66a82 frame00000071 +55f65274d4638d01969f1504dcdbefab frame00000072 +b83e68d602b853b00b7f898eb451cc63 frame00000073 +f69097e7667dc14ed7880ec73641743b frame00000074 +d0fbc39ad8ba162bc433dda0be005f4e frame00000075 +cd01a309c886b018802fcc1b876154ad frame00000076 +0925fae05e91feaad31ac58fd960c73e frame00000077 +bed41a190b1459578910ce20d57597e7 frame00000078 +c17669fed951e9dcc986c3030f4a618f frame00000079 +a069946365460b8d758b3a07d075b64b frame00000080 +1168f9c2f1e337e2e6e7ca320658e274 frame00000081 +dc18bbc5824b715f2cea52fc0f94b65c frame00000082 +a2e094d72c9ef53566c2ce7df735f452 frame00000083 +c5dd9e8678f7bd4c854ab78ea4d1a9c5 frame00000084 +041cf41bc1c0f8833b38675c5d5e4456 frame00000085 +174b55b926af99c201fcea7b41b53fa5 frame00000086 +4d800667654083dfe89f82b2fad329c9 frame00000087 +46ae15e17f9452d2721ab16e0e302c1c frame00000088 +864186ce52fbf7c622f5a6d175e5cdd9 frame00000089 +318ff705dd4de9d4bfab1afc80076023 frame00000090 +c8c0e02c8a7d26d19a685d09d4a85782 frame00000091 +d9574ecf12152e2faec6d0976142917d frame00000092 +da26741960e8e27932a37ba020052c5e frame00000093 +089e9a5411d58b049b6a73d0e0c9ab14 frame00000094 +d8a33d949103605b3acba275e6396279 frame00000095 +b771aadf0774cb6ad53526bc18e19efa frame00000096 +ed63b27df6aa3f1ceb0f52e4bb105377 frame00000097 +2b986653f6cc440d1dade10587427089 frame00000098 +0fda10023240d1b57b6b0b3a64b71eda frame00000099 +a3868e027f5fec1487ec00172df8063f frame00000100 +3c1d64aeefa7298c733f7dda15d8f6a9 frame00000101 +cfc355817e5a4eee9b147b0bf4558dae frame00000102 +2cb012cc4a0607462298c2b710f58f63 frame00000103 +c42adc734378e8c45d1c5d243d7ba6ec frame00000104 +66b4ae530564c02985f6569e317ddd60 frame00000105 +af92f1fc5cabb5af816bb0abfb02c2cc frame00000106 +31e2f515519ba164a0305fef8ecb367c frame00000107 +ce3388ec773fee5a549c830756215cdc frame00000108 +6a583e369c127942d5ee83749895d35b frame00000109 +5e7bebdc4e274ea903a8b8d10371b1ac frame00000110 +48fed4cf237a903a91b0e7e5beb0eefb frame00000111 +e9bd982aa79081f7201a393632f76dc2 frame00000112 +baa2d94c432448518e08aac97f999425 frame00000113 +1f591a872f53cdab3c34d92bcd7f9b22 frame00000114 +9208e400aee6441a920bfbfafebf300c frame00000115 +c55d06dce439a899aeff8a9bab76895f frame00000116 +7152012f6327f09b8eae3a48bae19d93 frame00000117 +b2314cdcc20aa0da92c33640783eda9b frame00000118 +bff6fc23dfccc631ecca0414f984eaf8 frame00000119 +7d2393a3383e6e2519dd7fdc7c720f2e frame00000120 +de9382d36c162ca9f753828d808984ba frame00000121 +3e8d10ce21bd4693a7f87d8624accad9 frame00000122 +3d1b9b5551518fe448fc21ba9fdf2c42 frame00000123 +2cca0bfaa213b507fb3fd254f69e1258 frame00000124 +9abafd982cbf8f5f671698b91d89294c frame00000125 +6518641e8c621826bd86a0b39b9edcf8 frame00000126 +bcecf2e1f4adb7fec91704aeddf3db09 frame00000127 +81e899c89ca42971ea1ab58506923ad6 frame00000128 +91d14c4d5167e46f5461ae1f1fcb7ad5 frame00000129 +ecfa93eea2307cdf7d24f952f30596c8 frame00000130 +a040c209facfa35846eff31269582882 frame00000131 +e270fc7152608700e0c736cbf84ea967 frame00000132 +b30032c786c6f655032b592dd51f0a38 frame00000133 +46acd1ba679a1ccbeea210a43f7882b6 frame00000134 +93f5e90f41df4db025bd1a63ae3b284c frame00000135 +cac9a95fea3d73936ad2e87d98f9b7ab frame00000136 +b308d955d6cc5db61e68c7d967952e64 frame00000137 +f95afae7a13129234f8b6549f0e3111f frame00000138 +34165d5b1442293486fc301b552dd1ed frame00000139 +b4792a82eeac81eccd1350438598fb4a frame00000140 +aa96585f740cf1c52ab98d2fda5b0a12 frame00000141 +948d5f643e49eea2f3057a8fd45ec4f5 frame00000142 +396c45443e4ea4da29d7c2d739038583 frame00000143 +e869b3167755cf0a38930ab781b97b39 frame00000144 +fc896a0881ba1037002d3b63ab1b74ec frame00000145 +cab3e435049d078c7f844101088a9f76 frame00000146 +517ce18b32c6f6986c52f5978b82af65 frame00000147 +bd2c0fd36e9725b39732a39688c7a6f1 frame00000148 +ec04ef200db5bce62788e29b5924af17 frame00000149 +ff0ee9ba39222ef271ac19968420d837 frame00000150 +3ecda14d359a08549f23a1693742ffcc frame00000151 +ac7e16c8536d7a1548dc5b4de85ac791 frame00000152 +75b34faa2b3573a83fcb50f9a5dede2d frame00000153 +68f28db886c1836a5cc704b91bb64e7f frame00000154 +ebb31769da656663862f60d9d50e3992 frame00000155 +4bd3a1a2a479c033adab93efbb30a44b frame00000156 +5b095b4c9486d15b8536fd516e7eae57 frame00000157 +1cb3f73f701b06592cc5df4c9a2b7438 frame00000158 +e3afa1e0e020f91d1fb63017a12f6898 frame00000159 +0e4e82c99796707b5d5b6c7650ed610c frame00000160 +2c0cbcfc061000d9ccc744d3a439edb9 frame00000161 +7610af82dda2fa9a2410234e3d8d9857 frame00000162 +3c08085c8aa405c3f60747a686c75689 frame00000163 +0b09f029f2f8d04a4073451aa5db6cb6 frame00000164 +7506e4e232a5adbdfba851affe15a8f1 frame00000165 +4401fa93479840166013e42ff92d1fe8 frame00000166 +a749e402900b6d3affed76b82ff28d27 frame00000167 +24a70f5e8efdad40a1261ee533e65083 frame00000168 +b987fd8123ff9f121982b847255b2c85 frame00000169 +a31fcc860d458c15187f5c6aefcef2ce frame00000170 +351789367cbe4af2f9fddbde39a3241d frame00000171 +a081b258f147dd813a2cca6b8fcba4f7 frame00000172 +5328435346129c2d2f0366aece868168 frame00000173 +a8cf334feaeebea54e816f669a88b045 frame00000174 +e08c69ba145a1146994a5b059a85e408 frame00000175 +bc69e2e2c96568c2d71b5e656dbd7c2d frame00000176 +f02ed2eb0c0a812f0c61ceb6f3095516 frame00000177 +fe824fe2ccdecbabcccc34504f0c17d6 frame00000178 +8c507cbf3631a47d0aeb84b7fd52b7f3 frame00000179 +cf911416ebed4eecd1af4641aba3bbb4 frame00000180 +38b30d1e615c9abfe4a2d2d2813d1363 frame00000181 +ef290aeec5121960ce10537d337a74c5 frame00000182 +c5acb6ae5d2d470bb8648dea6b791e8a frame00000183 +12d4ba58f8e3468b55b5ca2e766a0e64 frame00000184 +b4c17c4fc324f15413c65b49dc7ce4e0 frame00000185 +bcd8c6aba96f5763bbe5f66f339af2bb frame00000186 +2d252a7cfb960a5371d3f7b26a834d38 frame00000187 +5292aef01257fb2fac85ea005a633aa9 frame00000188 +97a87e0ac776776a238bad2f80bb6069 frame00000189 +d321beb07b319e811842364138511b48 frame00000190 +17d3256f2e8a8dc2be61ec435a91e0da frame00000191 +ed93bacbbb7cea2b3207c084d23b7d5a frame00000192 +6920608c1d65ffb17c542ebf5c2e832b frame00000193 +e8a7fdaf4be01598ac1abf32d06f306a frame00000194 +1395e29f52bb339c2f8c5d1c7f88c5d8 frame00000195 +45e9572998a64d9d0bbaa3602e74d2b8 frame00000196 +ddd897f66f5a124f172b67133855e700 frame00000197 +6c1276965a983dfa95eeb021a94b432f frame00000198 +0ebc954109f11c85c5226ac4a65fd36d frame00000199 +73984f0e290eb090ec359fadee0b3083 frame00000200 +c48d57fbefa672cfcae42f229684e134 frame00000201 +5af34f53761309cda8757a72f08d2659 frame00000202 +2e6676c4c3f09b7b853f04fdce4d3eb2 frame00000203 +e073c7b090c13bcaee893ff5b6c83b21 frame00000204 +10b45f16edcc13af7e5462204eae944e frame00000205 +6d37ce7be980f012b3446f4456f44f73 frame00000206 +4e30344588b19b02a996d596c0852011 frame00000207 +d04a3ab23944e94c2129644ba1836d97 frame00000208 +a9c7f6a75325dc2763a1e653638c43b4 frame00000209 +7bb86f99a1a0bb74edeba351db164b70 frame00000210 +04cb4ea80d6f3bd9a15036473519bd51 frame00000211 +ec552ada12da8446594a152eecedc065 frame00000212 +b637d0d3dd7e4d5e88929dcdf5beb346 frame00000213 +7e023c08fe614c08f594206954033ec9 frame00000214 +8ec22314aed9a185d77f56e195285111 frame00000215 +cde65ff87feaae3d6378801fb1de8df5 frame00000216 +e27cd5e95179e1620ad20d4fa64d0228 frame00000217 +7a4cf838b2e76bf7dff9fd023fb86b2b frame00000218 +8dd65ccd6237b4383b4f7bf8e404dd0c frame00000219 +06b28cfd130d4445603bc5b94595c271 frame00000220 +4075f8c4b427327784f78998cb85531d frame00000221 +6fade8986acfa629b0189b9bcda24366 frame00000222 +10d575f7900aac6c688267f94bf38e26 frame00000223 +dd30ecfaaea41b331a20de90aad4ed93 frame00000224 +beb2ab8a4c3703ad72564f8269efc8a6 frame00000225 +888821e466b75a5e91d675157a223dbe frame00000226 +63462653d2b85e68a793a9dbe55f241d frame00000227 +d87c19102086fa20e5a495ceda4bcd2d frame00000228 +9529403cf4d0d5c3f963dd6a67136983 frame00000229 +cc980ef2ac1c800dab9928102475327f frame00000230 +af463288cf519130a5de716d9e929617 frame00000231 +5bb40587fa311878ffb419d27cc754ad frame00000232 +557764b257f816484c8f68d14ae3a2e8 frame00000233 +8ecf1f0d4d6323c663c5fe38ec7e3b0e frame00000234 +774a9272cf7dae05455fdc4c8eb8ba8e frame00000235 +ccd5e935ee2403023b5bb87dacf23991 frame00000236 +4f23bcade4e031d9b6e3a096926d57f3 frame00000237 +d06990d38866e8c8e6b31331dfb6bada frame00000238 +7d32d312b0a3fafd6b4b3c0aef3ec1d9 frame00000239 +7330187753eaccb343e8d02db58d40bc frame00000240 +13d288c5600b4b2874570bdc79a9304d frame00000241 +2d49032da052629dea8c550997fc9248 frame00000242 +660cc6faf670e9ee861ef618b231f19b frame00000243 +46f813fb428610419b8fccb364dedfdd frame00000244 +a446465ed54cce40a0c1383b08d926e0 frame00000245 +9b4a64012213b9ad577ff32f7dfffd38 frame00000246 +1f707d6021aaae884d4d54465ac412f7 frame00000247 +3bb8e7c95dc2ec0e0aebf22fc82bf5e8 frame00000248 +8c18eff67a45f3809c2c4b9886d97459 frame00000249 +5f4e890dd445f5b98411cb058e67037e frame00000250 +0c33f9acf72ef4668edf4ff119f99390 frame00000251 +02af759610167cba04f29174278de127 frame00000252 +9852413ccc34e5a0ca5317a0fab54ed6 frame00000253 +8fc09e96103661ea3d861633c8f59782 frame00000254 +40b1053135f897c69cd7f2ffa11b9385 frame00000255 +a5b78c764ea0928f3d28b4b2dfb2dce7 frame00000256 +ac52654f66dfb978c43fe3afd57e2726 frame00000257 +4da4c5c223ac32f0053a6a56b0e9b183 frame00000258 +a5f08f6b6c63b157bffea987bed93f2f frame00000259 +7559dc2ecd91ee8825ff0b1ab25af2e2 frame00000260 +f18a8e77a2a7d08cd08c520d235aac31 frame00000261 +6ac8db920080c4f26f2b2304110788fc frame00000262 +4d1b15abe4db13d0bb4c8607fbbfb25d frame00000263 +4a7cb2cc8e5479983dcd36f5496e5af5 frame00000264 +1f66e5a5a09a0823b7b444a06bcd24c1 frame00000265 +0c779b587ae182a34463bcd98191e925 frame00000266 +371b7c8d93cf74ceffdbcdf45b9127d5 frame00000267 +78f718ea01f5b748d798d9c10a7782f0 frame00000268 +2714ca267369ff13b8673b5a6b4acc79 frame00000269 +647fa59e07d6ed7a6843a404b69a0fd9 frame00000270 +2a54c63fa52112c8d294772a8248b340 frame00000271 +1a2f35c35e2be894158529dd98319e56 frame00000272 +ed2b2883cbd94a1f7c3ab7b2310c7652 frame00000273 +31969747dd2d82628080810b6b70a440 frame00000274 +6733041e49a6c4a102f9bb188972a794 frame00000275 +2d3b70ead4122a54e52b263ce894d64d frame00000276 +9770f1154fa7598b86d4e1108e73a4ac frame00000277 +660d024994b6837590b9fabce541eb32 frame00000278 +0d0815cc1cd212e81ef98aa094e3af78 frame00000279 +336e0c701c7e553d9d6ef0072d500a18 frame00000280 +042b8c363ab2b775261010e97ea2d8e4 frame00000281 +0a1231fb13e3c79cc1b8b131eb156488 frame00000282 +a3fd125c658b3e18425ce929c5a47678 frame00000283 +b035bc920f1428eaed75fe8eba19ac39 frame00000284 +37adabacbe47c8193319c2beaa0080e9 frame00000285 +497b3a10c211f6a9027a579b18adbebf frame00000286 +7b2941892f50672ce8db09bcd44b0989 frame00000287 +87d019c1ab2055212ebb727c56685ca9 frame00000288 +9ad701a019d2123f0d0a9ede070524f2 frame00000289 +b7d74c6999b1579d56f72a590a7e3c0c frame00000290 +3ae28717b6b403ae869f38ee05dcef20 frame00000291 +dbfaed6522e50cde1baa2198f952ae6c frame00000292 +68e75e04a2b960241d9efa7755c394f3 frame00000293 +085bac8b34006d59c492d53f0f1c2472 frame00000294 +83c4f60b6956edb43b2e98515686e463 frame00000295 +c172e8da21dabe2f75e606e21cfbd8a5 frame00000296 +b3baeb58d2f3ff6373d2f2c34f8cc1aa frame00000297 +8676b23982bb1404e35d111bd37d1f07 frame00000298 +de108154f9640fc3562e9430a407f680 frame00000299 +c8a4a6510a6f588aef79bbe9181ba819 frame00000300 +5bf767584cb1a0e8cd1d8419b33c81fe frame00000301 +a1cef0dc729a46c7185b5da49543002a frame00000302 +493b8f7f11707104d69490fdfe3677bb frame00000303 +3bdfbef76681d259043c6eca9475947c frame00000304 +f6dfb9e68fb4358bb653f4d8be15d36b frame00000305 +73d51a04ab4138e5359460a6e4a8bd00 frame00000306 +6ff7a4a58d371aacea7de4b5472ca635 frame00000307 +94f72b5b2d84323cdc23e88eaf07d684 frame00000308 +ab5b7de493df0ff6bef0b0f4f7c90032 frame00000309 +488ac46a46a5a8f5712a3aabdb48eebd frame00000310 +c19bea4fd29adeab4e5e6e3ab81a1b45 frame00000311 +913dbb094c98db2280d382ef3038170e frame00000312 +496ee04bad6f14c3fb393b9ae2bf9218 frame00000313 +de75d51b17d906d7a76476ceea9fb527 frame00000314 +5bfecc25130b46a4b71934c727b47d9f frame00000315 +dce8a07c5711ee6f0039a822a22d3f8a frame00000316 +01c28e7ed9cb700484cafa632169f2d2 frame00000317 +65c1eb2ac3acd1b3e0f21eac591054ad frame00000318 +042b90b509e6430df3f9c654a3b0793d frame00000319 +73e174ee5fd40ef393993d984b4801b7 frame00000320 +4de20834b9d0e360492c8a8498c0074a frame00000321 +c2a226044d1a8c5780829687fec23894 frame00000322 +d0a5cd8f89b24dc14678712ac0e691cd frame00000323 +144bb10b78a90372b1a7124fee5acdfc frame00000324 +e05e7276c878d1650e0803ba7e31efce frame00000325 +9fca030cd17a46823ff2bb9d159533de frame00000326 +1e904f06bc53f0cd46422a47f3ce1c9e frame00000327 +5f4b832f78c16ff200ad7a7f9faca802 frame00000328 +5c5e992389d24cdf76e9077763242f16 frame00000329 +13b7c8e66f54641c834477946f2dc70c frame00000330 +91a1b8ff9b0549a9bd0c1ce650ce0518 frame00000331 +99f722d65d3c5c1a3d6253d40d4dd106 frame00000332 +085186e0d9fb933c72ece0cd89525136 frame00000333 +910d9a2c7dd31188981c4d2b2d83c720 frame00000334 +0ee7414af04948d160b1d5d06104f49d frame00000335 +63479a5af45359fb351132541c37ab4e frame00000336 +515fe6a2d3b0f5f7b21b3e27e2a267ca frame00000337 +55fc552c1af08559839f2298b2fc03b3 frame00000338 +d4f9b6fd842349da331f17a36e63fae3 frame00000339 +e2253869b0ac2d0fbec1388f67afb85f frame00000340 +83ec7dc78e66e70594141cad925fffae frame00000341 +15808d417088ce5a2c62cc7eb276b2f1 frame00000342 +7ba28fca43e259ed485ef14b88d7fa17 frame00000343 +b0fedbb562bbb35458e503972633f696 frame00000344 +af2e3b56f3b4db0500d9bcd286325339 frame00000345 +b293abe05a1f9ead913092cd23a9e08a frame00000346 +181ae02f58dff2aaa0fb85d29f4fa63a frame00000347 +05331d74ef9bb0db6b1276bc138f23e5 frame00000348 +901f5ac92581462896d7bcdf7ab72d1a frame00000349 +5f89c4fb23c262e0c3628d0f00f3f10c frame00000350 +b0c948db6c53442d80546c3892f8bf2b frame00000351 +505ea988f0e8bf0b9a7df1c8894045d2 frame00000352 +04da6d40e9f6daa5538ae5673934e890 frame00000353 +94c796946c977fc018160d8c2c2bdfb0 frame00000354 +16fbb8d69a24b6143a7a412ee056da56 frame00000355 +a36418046f3b60bcbe9aaf6e0405d90b frame00000356 +9fa42ad727e038b73fc0c6f23a40a89e frame00000357 +21a52a6141bf68bffbc10e9f803cf8c8 frame00000358 +d58c9f9e2063ebd85504dfa1971d654b frame00000359 +d0354696a8bd86ad1027ae52055f3619 frame00000360 +c21ae2bb0716da3709f1c97e6ad4d488 frame00000361 +9725d8677aeee41553164411e74d2810 frame00000362 +6130c4d81453b31d39823c654fbc8dad frame00000363 +94638e17a99411c215ee65302a9b9843 frame00000364 +05d907f44f5bb3f8c7c35eed6fcfc5be frame00000365 +2543888bfcf2841fa4f3e4cfbdd07ec7 frame00000366 +811b201088a9ed01a8512de283bdba51 frame00000367 +c5a118500b5de18f293f1dc8abf518fe frame00000368 +4f05bc5bc798228365be04ce87ad60db frame00000369 +cc5dbf8b099db430f2eff27b2fe6b979 frame00000370 +ef1cbe99ba33123f84873c907e54e114 frame00000371 +0a0fcfdbd6a93f7e7ddb1fc9c459cfb4 frame00000372 +06f2a29dd16120a48c4d4da379e5a6b6 frame00000373 +ce649530b9da09494adb3fbbdc2ec1e6 frame00000374 +1512c78449824cccaba768048b857a4d frame00000375 +26a1503d9c7d46e35d1aafcd63c32862 frame00000376 +80ce13fb81f2014d7afae31bb27db48b frame00000377 +add203cbae8178bc97e90c4cd9938033 frame00000378 +13e7029e4f7e3d97c0f486e724274991 frame00000379 +3018c2c21e4243b72b2a1418f2336ae3 frame00000380 +2f53e2f91ae4e15fd4e69c6c7a30d7c7 frame00000381 +4b4a21a926504f7b1c923ce12f3270f6 frame00000382 +3361c6278b32afb963c23b752dcb453f frame00000383 +36c0debf67a6a527b3b43cbbfed599a7 frame00000384 +052da3669e961a6285d5f9df6ed8620d frame00000385 +702612ae1ce5783c04b1e7f725de9cf5 frame00000386 +a1c1eac92b609ad5b15756d84eb1cd7c frame00000387 +11758b81eedde6aff13482e098a69659 frame00000388 +a528459b9a0071f54430bb92a78b76f2 frame00000389 +b92338a30dc01e78d9fd83661651515a frame00000390 +69809b0d7ee23f0be6d453c41d06e369 frame00000391 +a0edac9f843af4940af7f8cb911dfa2e frame00000392 +0affccb96170e3094bc7d924b7903e0a frame00000393 +e2b3bada2a5a045af5e87f437ed130a9 frame00000394 +6885d7308b775fcd2ac29e44c86310b7 frame00000395 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/src19td.IBP.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/src19td.IBP.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/src19td.IBP.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/src19td.IBP.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,252 @@ +32831276ee76a452e63c93d0aa4230e6 frame00000000 +e4cd830cf329cac49060015d4dfdc66e frame00000001 +0d7107e36da83310b4358b07164d4705 frame00000002 +d0835c6c193bce47591049ccdbf1a58d frame00000003 +bbc2f0aa5b099357806301837668c17b frame00000004 +4d5a6a9f827a8f293af0c46edbd21192 frame00000005 +3513e4d1409a88d69143552ed1950050 frame00000006 +a4d48d8584cc59e2ebe9a07f1d525fc5 frame00000007 +32c4fbc3bba132d5f38352f38f90ca74 frame00000008 +c22563fa2378cae897dc01cb5f96070d frame00000009 +246d624eda399b6314219ed149c9eee4 frame00000010 +320eebddf72a6e774da107fdd1357a5e frame00000011 +4ae1b4f2a2cc397d1d0468b26fb8f46c frame00000012 +bd3564071a5676ae2ae8d8583d40e2fd frame00000013 +724b00c5474adb32f42dd5d46730aed5 frame00000014 +7937d134d6db7a924720ea5987133b14 frame00000015 +ceb8e933d209c6109cbb259acb9decbf frame00000016 +0a639b17b9f45f28f794cb3649d12024 frame00000017 +180b82a247f02f83334506e3f76bf07a frame00000018 +d8b92d32c03945c56b9b7234d9d88601 frame00000019 +e1dc7fd4bdb01cf32a4922ae49fd11f9 frame00000020 +ebcc9a1ddee002a8c5126c5df61eaacd frame00000021 +51bfac99fbf407eb79761818a778ba09 frame00000022 +f0d89bbee532d7e9db7471f0ee6893d6 frame00000023 +1e23665ad3459d162b0a004bfc35b353 frame00000024 +e36f5d31e1ab63b1f27d9918891942da frame00000025 +01a23c1fc5c7d5b49cdad90234d14760 frame00000026 +299960088738c0486f68c51ecf52e377 frame00000027 +49e944a6545e09d8b39a30ba734ed158 frame00000028 +a8eae0ff597760a3a7d5cd93885dab5f frame00000029 +aa05211872b83d8922f5174d0d3de343 frame00000030 +ec8752a975966cbca8bcfd3eb84cd35a frame00000031 +fe4bf624ddd9c715e9bb47665a2db200 frame00000032 +2a056a7ff76c0c649acdc79204f648d1 frame00000033 +6d4aef42ca9d91738281c8fe895cdda7 frame00000034 +adfe561f72e424f39fdf05791df14b0f frame00000035 +e918a8d75cc5f8be6d122234908bc689 frame00000036 +3a05f5f8cc9ca8e2bfb62e4a05c3e722 frame00000037 +918c284a1a8d04963398eac674bc3ba4 frame00000038 +957ef8eaf580032500a95c96fa2422c0 frame00000039 +28ff35633aaee42fba4692a3940bba7e frame00000040 +63144b1dd86d71df19738c6e4899243c frame00000041 +796cdf7a45c30dea53d986fe1c88a0ec frame00000042 +99d18b4c52b741561b00afc89423be00 frame00000043 +4281a5930539b3adbf17e0de08249b7d frame00000044 +dd42427192d875869f8abd753b4cb7e8 frame00000045 +2f1612b69f4bff8a0ffd86adb08b06ba frame00000046 +8a121b3db46843e3f953bf89546370ab frame00000047 +c1934a4e3fac805637a99c400ac3214a frame00000048 +2f2873c7ec104e4fc64d391c837cfb56 frame00000049 +e4ff45390e879b70b4fd4195dff1fb4b frame00000050 +664fff8775e0a93ce86e2d47dd2c484b frame00000051 +1a8485d4e52da8371a063bca87eed677 frame00000052 +d1418464b5454dd1c229be140ba6dd4a frame00000053 +75d5131114aee0ed692c0e7fa1a2d1d4 frame00000054 +7d7431f0e4723d9c28008c4a03b011d5 frame00000055 +c3604037d390cfb2ed5b2d786d3cf806 frame00000056 +f36c864a2c01b0cec86417032d75f95b frame00000057 +eead807dbc96ed289427f8b84c54588b frame00000058 +c6a13f02fdd16b8e26b66cd132f3ab25 frame00000059 +fe37ee6cd0456a717e2f6a074938361a frame00000060 +bf8f28b8fc5d3e23e009bf229e5dfd7e frame00000061 +5364c9f78c467bf3fe3325767bc316e9 frame00000062 +9d013df26191e77f6769e90133e090f3 frame00000063 +2ea1e4de6b112b2b8d9612241bfb6d30 frame00000064 +9a1af946f6a1ac9849d3298cb3bbcc9c frame00000065 +2c3ffa40c91bbbe9892a9d2fff47debb frame00000066 +f339d84cb07bfe9d05bf72269517298a frame00000067 +3be34efddfd306a8b7b81903ba9c7d56 frame00000068 +4a7d0eaba732c8adb97c812a818f3f54 frame00000069 +40c35dde2ed5de45e8b2358a148f654e frame00000070 +38909f24a092c10bb1bf29256009a60f frame00000071 +88e9898c712003a809573dde7e4b55ae frame00000072 +e94003f0aff3ca1124f4577c3f2090a3 frame00000073 +46898badfc7be5cc87c34d85d016cfdd frame00000074 +a9c6b5abfee040f5f52cdf87194b709a frame00000075 +95ed07c5fb14b769ceaa6587e78cc438 frame00000076 +757ea79f5bff31641aae2680c2a55568 frame00000077 +9c7cc4cb154ca8e08ba8d6434b28e313 frame00000078 +fa115dff418fcd1738bde8031ae81b1b frame00000079 +f5a647300b48b54838c6ae6d9e6a4468 frame00000080 +f7fb3dc5bc9146b2bd5fcbca6d0e9770 frame00000081 +c7ca59e1dd1502d692f746aa9dbef096 frame00000082 +ca12906c92557676611c7f70e9165750 frame00000083 +8026b250b24a5c98a5891f29e9cca40a frame00000084 +41a2bdf84a77cde0ba173c66ddf95505 frame00000085 +7d845d1443758c0d5d3d5c611cbdc348 frame00000086 +3f9d56fa8976875bb202b2dee4e932a5 frame00000087 +c5ae4e92a1d3709b913f5664ceefaf6c frame00000088 +48623c10bbe10ff145fcfe5ea1aee8c8 frame00000089 +d07c9e04171712603274164ffcda1530 frame00000090 +0c36aa80da0afaea447449162761646d frame00000091 +5e94bc6666a6befb2b640e29ac832a07 frame00000092 +7b565fba5b01cfa68e74d1cf0ba3a4ef frame00000093 +df64a87349bef0d0a18a68c8799071ef frame00000094 +102872e7ec1159bff61d6f6bbeef3331 frame00000095 +1b64e577c120cc7364b99e82dadc3c13 frame00000096 +bac457f1518557e4367817975f7b044e frame00000097 +2ba1b79aa2a3103baf67add16e98b602 frame00000098 +f303e378ae94b77515ac0590d5d57342 frame00000099 +c32f8d950d5edb97463c8c49e1f2eaf7 frame00000100 +b5912dcfbdbc7233ef9add73e7d9a672 frame00000101 +224ca3606590f595e2afa63ae0891575 frame00000102 +8781ad1d4b9b2f2d5a95632335d6e46f frame00000103 +f0b5766131417c9c5c72285923dcbe87 frame00000104 +ae1d08a052701a805af6e0f5b22f6eb2 frame00000105 +09b700262742ecc1f88ed2a286b1f727 frame00000106 +e1b353d0c687ddb9d34373ff83a6d694 frame00000107 +b9aee82689cb9f8810344cd18f924cec frame00000108 +125345527a03f50504422a2ad8d8dd11 frame00000109 +2c9124dc2ccc6926d7de364657bbe15e frame00000110 +dc46f71c99e7c778a66fa72932de29c5 frame00000111 +ed92a0152ca95108debed55585934178 frame00000112 +53dfcb1311cc7c83b06b3e7cfe1c579c frame00000113 +8fe0eecb839c73ce41e50ee98b411e44 frame00000114 +a2bad2754c3ac85faba5feaed0e11010 frame00000115 +c278b63da06b1afc18285d2fe5b22b3a frame00000116 +7f0408718075dd55e7fddca6e0c1e19c frame00000117 +60251b77a60d1b883b5968c2e416bd19 frame00000118 +55dac4f007777f52009e6fc096574892 frame00000119 +801e7d9fa5a1ec79b71f2bc6ead3b852 frame00000120 +72a5f9310ce2211d1ffce7435c432269 frame00000121 +fe96c24d12c791eea28ff7e70b548aee frame00000122 +c5ee31dad620074a11a54385bc58a594 frame00000123 +fc5882d036ffc9fad2f01daeccc22a3d frame00000124 +5bcd969e14989fab093754b7796d4934 frame00000125 +f059109e8545e45fc4d414f4efe6a19f frame00000126 +28567fb5007d8a7140cb161196e8b7cd frame00000127 +a7e87238ad4af4ed814fb42e42bae0f8 frame00000128 +7ffbf70115ef950cd2efcad1e56d4c8e frame00000129 +1624baf832daa25ce260880813f2b1c3 frame00000130 +b16a749d9840e7259af2bed5d9cce80f frame00000131 +f9477e9504da480b793718e1efe8000a frame00000132 +405cc34536828fcb9a1cac664e3fb46b frame00000133 +883ef6eb4b924f0463c5b47a90c6463a frame00000134 +1e87aefa2bc5eb1a0927aac18b9761e5 frame00000135 +404c8cb8354b8c6790056c541503e38c frame00000136 +ad0537747a3143a12b8dae93c27a6149 frame00000137 +f09ed491efd00b5e4b32b6afabfbaa6a frame00000138 +b14fbe58b80decbc1d1350d8973c94f6 frame00000139 +4a055b6b72eb4af8d38ab0b64c713d20 frame00000140 +32ec7831072d0b2a98c350ec4781c7ce frame00000141 +e648244a32db20b0f7b261874299a9c0 frame00000142 +6398822a66ed53579e48f57079be2553 frame00000143 +225e40be5de87b8165e6c8762fc41922 frame00000144 +794c9fad0837d69cd74209b9e3dadf35 frame00000145 +29d818c03130fc2926be406b74225a98 frame00000146 +7f0966690b500ab95277c69162706b50 frame00000147 +74966386e8cbd27084ed1158bbdc56d0 frame00000148 +b0ca2b707d595f9326b2697b8061a0c0 frame00000149 +466961b823aa722fcbc17f2cec30d804 frame00000150 +8e1c003bc72ea755e5050e1b02af022c frame00000151 +c21265342c4df7af79efec0f802cb716 frame00000152 +e0ca8f54a89097c7d29c20be2be7aa1f frame00000153 +0d089142fd997d70e54997803010bd48 frame00000154 +27fd8f825a5fe7ab232b1e5929768130 frame00000155 +63464f6e99dff9ddccf20aaf6a87f2fe frame00000156 +2312ddeb19f81d3d0316908c17a2b5f0 frame00000157 +b9f1df7285acca2c7a3a26f454beb06e frame00000158 +e00a9cbe80a8856a4b4283987894102b frame00000159 +5a12626a1ee4c2b4b82cc0b487f4a83a frame00000160 +da34933519433c133fe7614786fcfaae frame00000161 +b42a05b899f33e070415bc071d3c37b1 frame00000162 +e6403d8933d5aef49bd35e6d30f7b18e frame00000163 +ee908d84d1f87c93bdd54b0c05361fc6 frame00000164 +49b0dd480bc0f7c8ac307cec0357b802 frame00000165 +322d6be767ab56825bdd44d0a88b4b48 frame00000166 +54ca849822ac98b3905fcf0f69a4cfe0 frame00000167 +e48c1e8e4b595c02c79cc12c4018dba0 frame00000168 +53da361777ae806d58c815ef7a75ec33 frame00000169 +0bb33a725d5e5a781002b4daf03bc26c frame00000170 +e968f246edfe3d358cb68037a7fde973 frame00000171 +c579057471f7b41804d6f5a586186a7a frame00000172 +5be90e301e26e05b19a054ccbba3bf1e frame00000173 +7d46361a6fb4fc6bff2180bfaa4041f2 frame00000174 +547426a9d36682de031c70e0eb15fad7 frame00000175 +ee382f9eb8801a5e6c37b0bd06042da7 frame00000176 +086fa81d6e8fad547322ec5411ca5767 frame00000177 +d3fb3958bbc7b16d703c76508672b847 frame00000178 +aaf723dfc91c2d4cf7c288281eb1bbc2 frame00000179 +0fd7285153b4ed33248b22aff63a94f7 frame00000180 +18a769f888e57b98a48ffd41f10a207e frame00000181 +8601f60a17b9bba913de60e27bc8a0db frame00000182 +4ec5e68b5dafa26972824e6aba25e01b frame00000183 +b83390cbd17d6703c6b0a5aff48f544c frame00000184 +53770416a2f7bb1f83d4971a9b88b562 frame00000185 +b824e93f90a81dfa65daa62e73489db8 frame00000186 +c8b4a209e5afa40ed457a1206db77b54 frame00000187 +e4e30a5e57d8828bb3f39c15a6f18edc frame00000188 +9c21d3ef2655486ee2b3d64421a6d4d7 frame00000189 +b57ed76b16be10ce8bee1e798d120472 frame00000190 +dfe34f1c6c30c98195d056b7c59a91a7 frame00000191 +7a436b6d00278f690c474167d491970b frame00000192 +08bfcee4945996f98b53309c05aee53f frame00000193 +fc1821254457e013721e63dfca356192 frame00000194 +9027e523706c565495dcb89546e8565e frame00000195 +a4aa09c936ee12dace0169c08f3c6793 frame00000196 +51511197ba614531b3eb69e5bc5996c7 frame00000197 +6c9d70ba82a770e03ef585438810c9ac frame00000198 +24076bedf7035657b3f5f674e21349ff frame00000199 +eacdbc77f4878b11ed72794e2c9465ea frame00000200 +37c00139ba22eabcba3561b8bb5aa802 frame00000201 +11b1cb9273cf9feddd660d49f445302d frame00000202 +6898e1a876d5b4cba6b8aab6a38d3d12 frame00000203 +d430f6a1335fb80ccc9c77b1e76094f7 frame00000204 +43cdbdf486ce5f81a08bb266236cc633 frame00000205 +c41dbfcf50518727f242be5e0d7977ef frame00000206 +e5bb6d30cbd6b29956f3fae36ac19e9f frame00000207 +24a7666f51935783f0626b07d7a8312f frame00000208 +5aa123e0092e7c8161e4dec186987c49 frame00000209 +c340d634d73738b4d5fcf7ac2687020b frame00000210 +3eeee6203219aa6ccc69a981ccfb2145 frame00000211 +7222d299b24228dfcfa1edf621b948c6 frame00000212 +7aa19fe7c1200eec611dfd59a7190753 frame00000213 +f3665f6010f92d9929d898d7fd5e34a7 frame00000214 +a375eadeed4cfa36168d9eb390a17d15 frame00000215 +1a7779519dc21113efb7990d98661239 frame00000216 +5feddff9c81cedb08404f95aaa23f6dc frame00000217 +384d087c4e2980b6d7f6b924cce0e82c frame00000218 +85a26f119b6d30ebc6a409090e8261d4 frame00000219 +28bd74d764f7aafc1d1100f9f00fdfb0 frame00000220 +2220e92ca637e82513959b75c2554f68 frame00000221 +3be73fc0b857e4b993354794b25671c4 frame00000222 +fe9f933e50ee6e8d7fd34f79808cdb89 frame00000223 +2afb5d828b199dcad18e37ea386816ea frame00000224 +fa5c4ee3c9b6539cca8b1a5e39a7ab8d frame00000225 +af80760a806d680ded33614b96473703 frame00000226 +bcecafe7c13c881f40e3d78d29d0faa9 frame00000227 +d547476f4bd0048820df39cc1d60391d frame00000228 +813df3f9e326ae9f91d087eb11b9234a frame00000229 +dd6e74361fd24c264764e8409821b6d7 frame00000230 +2d4b99b917c9978c0502892d5b73f2ed frame00000231 +d8f9fdeb7838a29250e766b475a68398 frame00000232 +193e9a95bd3732ae8085fc4db11caf6c frame00000233 +d168a259ea02b37c9f1fef679f2b75a4 frame00000234 +e72d5fa55f047310094fae0ec224edcc frame00000235 +38e0d5f4e9c7f3a5bd99058c876e63b4 frame00000236 +d168b7ec7b1baa425e7fe2a2376f3968 frame00000237 +52a934d2116ec73d043bf3bf74464eb8 frame00000238 +7b179671befc87a3c5a711a1b61fb78e frame00000239 +f726e8d371d64e73b3fc31801e402a6b frame00000240 +881c4507a807eedc05427f682521f0f3 frame00000241 +b7afb72de3bae11b185d40db1587988d frame00000242 +0c4c6138a9c61fda598e0763e7c9c92e frame00000243 +27e8606b4e8de92ff5331e00bdaafad2 frame00000244 +dd7a34c2dc8dc887eda397ca64679c74 frame00000245 +d4f1945992058e1b116963ddbdc39731 frame00000246 +05dfe359e4b4b17aa248519d0cfb6ce3 frame00000247 +c5837ef7595dbcf9512dd9aef54065d9 frame00000248 +b9260c2540ec5664ee94fcc71b129a21 frame00000249 +dd5ad1e9248a4694a2b9353c4b0b8a95 frame00000250 +1af949f516f7b6add62f73cc399087fe frame00000251 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_BA1_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_BA1_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_BA1_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_BA1_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +f4b78c62fc4e4c8e3ad1b1c9d8b3b7fc frame00000000 +d6e4e2884278e6e6b5123c864d31e6da frame00000001 +95e687587e8c01c63de9ab626da0aa8d frame00000002 +470ca42c33a69b553049eae29eceba6b frame00000003 +847b277a3e040cd063c6f84a12ef2fa7 frame00000004 +bfa974c51d336b909cbd2a9a2528ce59 frame00000005 +66c47f41c757e8f3f699289c59635647 frame00000006 +2eb32080bea4ec71241cba602e24cadd frame00000007 +03306a95228efea1d2ee7b60b65c1eb4 frame00000008 +adefe3fe4cd1407c3f4bab3a5dbed5cb frame00000009 +ce58ea99a0bb65ad4e7063104ef1fb18 frame00000010 +9dbc055a6939bcf567334ce31fe67f7d frame00000011 +f66d8a56cb565d15b0b8786b602413f5 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_BA2_D.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_BA2_D.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_BA2_D.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_BA2_D.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +f4b78c62fc4e4c8e3ad1b1c9d8b3b7fc frame00000000 +d8c06c476188a08890f399057e33074a frame00000001 +9dbb159c06cf05158298ba06c53d2116 frame00000002 +4df58ae36f72b9dba4e6d6d09267b040 frame00000003 +cf8565cbfafb08960c0bd96a0f4e0979 frame00000004 +67bb3e3a2c9269318fa656e6db244aff frame00000005 +85d1dd7eec147fe8daabf35c353e5874 frame00000006 +0c82cd371f5d5d0cc2a4e82f44c2ac59 frame00000007 +25f6ff05fc5bcee747bb6d58ae297c32 frame00000008 +47c32c255dd197ea6171d6f98e5ab63d frame00000009 +b61d9e7dfcfa513529d0d8e46eae365c frame00000010 +4f27eb989e9035369fa1b12c6b2a42af frame00000011 +d44139e2811b28ec036bad4ecfd33aa8 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_Base_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_Base_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_Base_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_Base_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +412b4c3bf6336cef3ffb56ec16c74f80 frame00000000 +05b4633ce5e0d9535939fadad665b58c frame00000001 +7a494334a35eb764d25907376cf2a52a frame00000002 +8134b28884ac4881eb294ea23e1e9f89 frame00000003 +fc423ab34c8e67ea5448871f8b578632 frame00000004 +d1e9f8a1010d278dc86dc72a9a4bfd18 frame00000005 +8b4d7a6e50bb558708845db74f4503e1 frame00000006 +1cadec6024a19d770023cc2115e2a847 frame00000007 +70ce2bf601b8c43c51cad86d503fa382 frame00000008 +8e2fe9f7e99ffe96de7576e7b76e9ce2 frame00000009 +921e63f5e3ccf51eeaff799108e0bad1 frame00000010 +6f5231fa88c49d6a6397b3794821482d frame00000011 +17019e744791386c5176603d061ced14 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_CL1_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_CL1_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_CL1_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_CL1_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,46 @@ +69d96c1047b4b74828e5a87bac0fe8e7 frame00000000 +b70e6d55af35d3641225aa6deba26ce7 frame00000001 +2a931be09b00ec887304d92d2e425a9d frame00000002 +067bf64d344df9b14e49b2bfb7c29ea2 frame00000003 +cf5fc3d075776938fa8bfb81cd80560b frame00000004 +a6cf456f2d76359daee1d5bc2b833f8e frame00000005 +f8e59590052053c58f316c650e63e409 frame00000006 +2f19abe1c5e0098538da02fbd8468f4a frame00000007 +cbf5270762104d65d40a6c89fd59859a frame00000008 +0a6c4c8da6f44e36dbfa91273e66d256 frame00000009 +070a141e50df479898aae5dab6bf5d9b frame00000010 +e4bfa56a7e4f7d3ff871124e5e07c891 frame00000011 +f062f16e21668fc688da4eef286f180c frame00000012 +40c6472b0d10ae203af8394bb4389f10 frame00000013 +1f5d4ffd490069f126b795fc3dfd6d53 frame00000014 +b29cd0e3d089c843371322a6f5095a1e frame00000015 +ee7ea80d75a6a3188c9ad4b79d04c252 frame00000016 +2ce139112716caddea85c9a216a37c42 frame00000017 +2ec944318abce4632cf22a1b0447acce frame00000018 +558c10fbf1532d7a8ae1a87d94b16bcf frame00000019 +2a62a4c0df48c92a4f05f49281f15a74 frame00000020 +adf80cb9f2b1af129b70d316b99ffd6b frame00000021 +9463a8e71cc6e0f4547577d107c78a74 frame00000022 +e2e56b9cd75cc445488a543438193785 frame00000023 +2f9342470fc00f39396a730f324d8cdf frame00000024 +6eed286462fe61672032a7b94f5eae7b frame00000025 +6b5d259a29707f4b29993f4e73d5a5fc frame00000026 +9312fcf998019444133f94722b69f863 frame00000027 +17b26b2257779d7f4f3f00bccf2d8f11 frame00000028 +17f35081bd1b39452dab9856ebc3430f frame00000029 +86c7344d1d593fab37281f3aca65fd36 frame00000030 +387b06a2b957c3a1e8b97d81e391d22d frame00000031 +f53295dc9e0a1fee9cff6fde9c5796a2 frame00000032 +b642f4941742e1ae35e822f1493a341e frame00000033 +0d69cea2c284403519f398f294b85e75 frame00000034 +3c10deccd86d603899c28095ff7e3669 frame00000035 +c683c8b1650b35e89169437b6b52da15 frame00000036 +48a89d309b2c94dd9496e7775a9e74e1 frame00000037 +8bac8d70aa41404aa57f417c6ea1da4b frame00000038 +5327c864b27d20b1b54038d5b79a3a63 frame00000039 +a928202b14888e444a2d8c72a85263eb frame00000040 +e345abaf617cea6e3870ac4475b126c0 frame00000041 +24a8af081f232578d4ca4796ed601ecf frame00000042 +1eb923c1c46ceb06b6b62180d647d263 frame00000043 +2ffe68e1cdd2a1c66a9cc2c1fe9e6fe5 frame00000044 +8e28070991e61ad997d60f97fdd9f3e5 frame00000045 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_FM1_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_FM1_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_FM1_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_FM1_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +412b4c3bf6336cef3ffb56ec16c74f80 frame00000000 +bc4e0d5e2165981a64d9db3dc87f521e frame00000001 +7a176e2cf358fbd9fdc0041f34b6093c frame00000002 +a77f1807db5525cf846e773ffa6b1043 frame00000003 +2cf7a7d001938fa07871ecf44862dadf frame00000004 +26e79f64b8e45ec65a720d1e2d892b57 frame00000005 +9540281a5a1c5da3816a00ffb3d6478e frame00000006 +e1b0cc5c032f83bdf80bd09c4f5b49e4 frame00000007 +09609aa8c433eb34dbb88f10c6dea405 frame00000008 +203c7bfc7caf23da3f84b47a76972aac frame00000009 +278b2d55c58c86f27eebe335ec095352 frame00000010 +d2d2fdf7d12b5a7a5d5f799e36c4a368 frame00000011 +9464b3336855595049981d2848fdb5a0 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_NL1_B.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_NL1_B.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_NL1_B.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_NL1_B.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +19ef2fd30d5ce2b93d3738f11a5cf9ec frame00000000 +571f079d35ed463cc65a905535ddff22 frame00000001 +c7bbf60f6e9e8623655540f685d2bab6 frame00000002 +91a9c81795ec15daad6406b084a49196 frame00000003 +6557703b67233ebfed085ff9326b849f frame00000004 +cb28547d37a777b1f2791bbc07fa25bb frame00000005 +3dc73d987d0288ee29f73ff862ae5f68 frame00000006 +58f96acb254b959c6adf297ca3d30117 frame00000007 +8786627098f284444b41f1926462057e frame00000008 +78ca5e17a3231972af76a5bba3c72fcb frame00000009 +fae4c028f74785dc064dda52fa16e5f4 frame00000010 +7dc4481d51d99c2443c6af905ca2d8ab frame00000011 +ace33bb6a0e01ca4dd9a5e02c0c0cfc0 frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_NL2_E.264.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_NL2_E.264.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/h264-conformance/SVA_NL2_E.264.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/h264-conformance/SVA_NL2_E.264.md5 2012-01-08 10:47:41.000000000 +0000 @@ -0,0 +1,13 @@ +19ef2fd30d5ce2b93d3738f11a5cf9ec frame00000000 +1e2afd3f0ae94a0468c781005fa48b22 frame00000001 +67a290296aca0ba40f0d6a7a2b1229ec frame00000002 +ce75e40b04cbd4b02ae9ada4d774f4b9 frame00000003 +58d2f2f545568a4afe60ac288923c135 frame00000004 +d2265b22da4ad35d37e7b25c6453a5a7 frame00000005 +fe793731fa8b20b83cc97b8056f44d73 frame00000006 +614049167ce6eb5034557ca72a386d72 frame00000007 +a26ca7bf0f5ae9f7d6540dba769fa2d9 frame00000008 +dfcc5f39c54ca2bc18ce8b338c026f5a frame00000009 +a5cd56dd0a034a156373dbe7a19cbe62 frame00000010 +8ca1b34472a03b4c4814b5194192a10e frame00000011 +7f2c3058fa8b8a742957fb6d3896ef1e frame00000012 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/idcin/idlog-2MB.cin.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/idcin/idlog-2MB.cin.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/idcin/idlog-2MB.cin.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/idcin/idlog-2MB.cin.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,53 @@ +8e4dd5c5c31a54672e30503f6ee13321 frame00000000 +06fac6c8d03f580e7fa9686241acfab3 frame00000001 +40046930d6967e0499b9211ef0965215 frame00000002 +d68b962994c057ed1bf8084de80b5178 frame00000003 +44f6821930aca105f132ed98643ab532 frame00000004 +dd755ea80efcbea99b5a225743a0f6c5 frame00000005 +05a89d481edd8bbde6096afd38834700 frame00000006 +d30dd5ed5a5721b5d1fd4a89d7a6280b frame00000007 +cb41e95799fda6aba819dfa912d6331b frame00000008 +c3a7108fa32e6183df1576a3da451fa3 frame00000009 +239b65e8be8d911970590c3b59adb638 frame00000010 +239b65e8be8d911970590c3b59adb638 frame00000011 +239b65e8be8d911970590c3b59adb638 frame00000012 +5ca89a3b147e45974b6d4119a49eee9a frame00000013 +564ea1772a056946562d89941ce5150e frame00000014 +564ea1772a056946562d89941ce5150e frame00000015 +d31dad823fed54e04978308190ee89c9 frame00000016 +d754be9c11395f3a0eb445aacc927f07 frame00000017 +04d6191f4a48ef658ea239de0d69ff66 frame00000018 +04d6191f4a48ef658ea239de0d69ff66 frame00000019 +04d6191f4a48ef658ea239de0d69ff66 frame00000020 +04d6191f4a48ef658ea239de0d69ff66 frame00000021 +04d6191f4a48ef658ea239de0d69ff66 frame00000022 +cfd7b6af416b4e4b7545dcdf2b5e7728 frame00000023 +d7b43412a596bedbc96c056f60c26cb2 frame00000024 +953fb388b79e82456c804bf1e3493090 frame00000025 +953fb388b79e82456c804bf1e3493090 frame00000026 +953fb388b79e82456c804bf1e3493090 frame00000027 +953fb388b79e82456c804bf1e3493090 frame00000028 +953fb388b79e82456c804bf1e3493090 frame00000029 +953fb388b79e82456c804bf1e3493090 frame00000030 +953fb388b79e82456c804bf1e3493090 frame00000031 +4d1d5a23cce4bae3f88d6c242e2655a5 frame00000032 +a3033ca6e010e7b0ba4d6b29b75cef07 frame00000033 +bbfba90fef61d56f974031591a6349a8 frame00000034 +bddc4b986f8a2a2677d1fb50a0684b6f frame00000035 +bddc4b986f8a2a2677d1fb50a0684b6f frame00000036 +bddc4b986f8a2a2677d1fb50a0684b6f frame00000037 +bddc4b986f8a2a2677d1fb50a0684b6f frame00000038 +bddc4b986f8a2a2677d1fb50a0684b6f frame00000039 +bddc4b986f8a2a2677d1fb50a0684b6f frame00000040 +bddc4b986f8a2a2677d1fb50a0684b6f frame00000041 +b748579005fbbb35b07acf0b3b1dd277 frame00000042 +38d6e68a8b530c0af0aec9fa6d45c3ba frame00000043 +b18f3a5faf35158a53843ed8f026d0a7 frame00000044 +b0c5b493e1179a7ea526babcf40be9f0 frame00000045 +1577377fde824a26cbf86f81f414e927 frame00000046 +1577377fde824a26cbf86f81f414e927 frame00000047 +1577377fde824a26cbf86f81f414e927 frame00000048 +1577377fde824a26cbf86f81f414e927 frame00000049 +1577377fde824a26cbf86f81f414e927 frame00000050 +1577377fde824a26cbf86f81f414e927 frame00000051 +1577377fde824a26cbf86f81f414e927 frame00000052 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/idroq/idlogo.roq.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/idroq/idlogo.roq.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/idroq/idlogo.roq.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/idroq/idlogo.roq.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,210 @@ +a82b80b79dffe564f8f23dd39796a1a4 frame00000000 +768fbe48f5e00c7a9c817ddf064c8a6b frame00000001 +decf63988784443bc4ed313553b6e1ad frame00000002 +5c53fc8abde2e4dbc575b026b1c06fff frame00000003 +8b244eb0236e18fa44971a3e2d9b59de frame00000004 +5c53fc8abde2e4dbc575b026b1c06fff frame00000005 +8b244eb0236e18fa44971a3e2d9b59de frame00000006 +5c53fc8abde2e4dbc575b026b1c06fff frame00000007 +8b244eb0236e18fa44971a3e2d9b59de frame00000008 +5c53fc8abde2e4dbc575b026b1c06fff frame00000009 +8b244eb0236e18fa44971a3e2d9b59de frame00000010 +5c53fc8abde2e4dbc575b026b1c06fff frame00000011 +8b244eb0236e18fa44971a3e2d9b59de frame00000012 +5c53fc8abde2e4dbc575b026b1c06fff frame00000013 +8b244eb0236e18fa44971a3e2d9b59de frame00000014 +5c53fc8abde2e4dbc575b026b1c06fff frame00000015 +bc3d0b7448c0888e6b2ded981836dc68 frame00000016 +4791e9e59e664f86be08bb0886a0cb6b frame00000017 +d598ae3f106dd0f19472c3979fbf02eb frame00000018 +99149021a3a1457fe4db26dc4b955d61 frame00000019 +3c8e38e8f83e66a277229649b90f1809 frame00000020 +ee7330bb1ff91c9a0049f6449b242582 frame00000021 +5bc6dcef443998387628bb7770f7f08e frame00000022 +ea5d33dff96275c20aa93d4257384c60 frame00000023 +bcb0071f5f818f50141377fbe6129891 frame00000024 +75edd2b193c0362c93270cddcd3144ef frame00000025 +c9a8146f8671f2d8008bfaba1a2b25be frame00000026 +d20dc1d2c9ea9f81b32f768dc8e186b5 frame00000027 +bb080e17298e7eb29f5f4504a067d1c0 frame00000028 +c870c6d48403cb48e51dcde4a0b76adc frame00000029 +aa51dbe7ea9da4da55f1a7c6799bb871 frame00000030 +b7a1e9a2e10672053379941dae1bb81c frame00000031 +b5f86d3b27ea3eca55294dedafbadd44 frame00000032 +4c57a58a35f026b67ffc90bae26e5997 frame00000033 +9739b56cfde8657e9e9b8f680a0acc18 frame00000034 +23c4a94f319aecf0e74f07c282197f08 frame00000035 +7df6700cd4507230b6bca86a779f409b frame00000036 +1eeb8f0b58546289cf42e9a22b20644d frame00000037 +1a40109479f36f9cabeaa96a6f0537f3 frame00000038 +4c5673947b1ebc49342bdc956b14bb7a frame00000039 +b040c0bda8c422a644d5e83dac02bede frame00000040 +ed034359c350b7657ed3898ae013c9b1 frame00000041 +80bd631024a9762e72492a552f1e1033 frame00000042 +a38d8d4ba1f120ba8b9beeee4b7a30aa frame00000043 +5a422d61868b8daf8d13c1b9be21aa2f frame00000044 +947b8dbb3d8c984b8db8c6db2243d32e frame00000045 +789148e2e97ef8e33a1ed1ad8a2a87bb frame00000046 +b19b3b0ecc5c062d9547e95b9700070c frame00000047 +341a535e52ba39420f92e463d1148f8b frame00000048 +8329d86fdbd14396e58ee91eabeb21af frame00000049 +733fa3e91fe076315621cc77edf26a68 frame00000050 +7e324fa3aef35e18b762fc90d9ecf5eb frame00000051 +1a032bd1cfa1677d04eda1267f72be36 frame00000052 +bb7204b3ca39430455bb1d2a5e7556d6 frame00000053 +b536f668104c8b15c03a32d41680887b frame00000054 +f6842b2f3a6adc126c14d0e3dd9f4f46 frame00000055 +cd4d9a139c29196abd1a63a53763d682 frame00000056 +5738a1dc71ca62f4f7b6aff229470ab1 frame00000057 +26d558ab326be2e2f488e4f64a486f87 frame00000058 +4f0879081bf3731075edd386f65d39de frame00000059 +3ee1cb1ba4bb230810209a90fd5b680e frame00000060 +a03dd70d2c73cd2c109042881f845c28 frame00000061 +eb5963cab7bcb20ace8f5d1b7b8f88be frame00000062 +b61b232c5e658a0df52020ba6c2cf2ec frame00000063 +321d57d21157da8ccd1384e131852fed frame00000064 +a1749a63c20c955ffa82ee05f63b2e7e frame00000065 +9831de06b64af50b379b688fbd58d832 frame00000066 +c90c13fad43dd5d2fd927bf18fedabe5 frame00000067 +a7c0ce6e0badedb09794c3525644e31e frame00000068 +09f34650eecf9c74d77faf0707b875b4 frame00000069 +fbcc28c1cc6a07e874f2e535858ee036 frame00000070 +c52b4423b9ff230ddae3f4b77d480858 frame00000071 +2795635849e65fb464ea65240b94c28f frame00000072 +e59264f299e11633939a985416415e1d frame00000073 +e54fdc0d2d47e5624e93093b9ca88c02 frame00000074 +c6b7f78ac1e24b97bebf2cdf7b77f47f frame00000075 +3c301a9603b6694038b458440f02dd47 frame00000076 +ac9759a581b018a7cbea49b3bf424f83 frame00000077 +b5f8df08675196b2e29a65e95f199d6e frame00000078 +c0d3e97f6b4651e7a098654afd5413fa frame00000079 +415760e5ffc4abb13cfa36ef9caf0b11 frame00000080 +08b89ad1eb5d19c759a0e9b7ca3b9dd3 frame00000081 +9f44102e0ab20901e250f44ad289a98f frame00000082 +3f08d5682eb5e37a69f118e66782ed3e frame00000083 +fd5d38bb612a9952173d12b0f450a9a3 frame00000084 +46666613e7a7dbcd8aa03d1e199478a0 frame00000085 +69097af541d80c31541e9bf1f03b9de3 frame00000086 +cfb598b09ea9bc4ee761d452b0474512 frame00000087 +230397c55ced2e5a8f201826b79ea88f frame00000088 +42fa1802c7db5f9bd18a31051caa7c91 frame00000089 +a6f87dcde26cf85101358b7b9ced306a frame00000090 +d4a7b92edea3270a42ab40e34d08957d frame00000091 +7194c74b67872a5d6039b0d758ce0c3e frame00000092 +9d74d779dbe57793b0c0f363218b5973 frame00000093 +9b7dea5eee52f3df91d3993339227bfd frame00000094 +14cf393fc4ff159db46a7f580f04819d frame00000095 +53cd81a4edf8ba74780ad6bd720f413c frame00000096 +2abeb32a009bd8a84eb121cea174c12b frame00000097 +f7ee164d5031d7a3eed41ce106afb66d frame00000098 +329a1a5083af62ba87eb98cf35e6f818 frame00000099 +0be805610988bf338682ec64c4151966 frame00000100 +1f4d33d38eb269f8354356c5ba2a6540 frame00000101 +28bf13f0040fd98c884a5860739e1251 frame00000102 +a46609d84b293c1e0617c5b4815b2593 frame00000103 +0b37bf242ef02bc26f1db3241923d230 frame00000104 +1fd1d31f82b572621758d674bc73fba0 frame00000105 +e644e72e80a9a78e9b457dc9e205a11a frame00000106 +58780e45a3a761dad0f746613a876fd6 frame00000107 +feb5bfeb59689b4119516242977e382b frame00000108 +3f9902694fefa24e95ad88980f298cad frame00000109 +309317bd8e5f51d9a916e16da9bf882f frame00000110 +773e6785aec73e1a369d1c03fbdc9b1e frame00000111 +9e949ffcce7ff0e168891c95dacae1e2 frame00000112 +2ed101b833fdcf885a0eede3f5cbcac5 frame00000113 +bfd3d678a8e3032f5cfe40128cfe53f8 frame00000114 +6afed3d23c45fdacddf1c65de6ca6d2a frame00000115 +1f476ed41ba0d8ccf56f68abb121f429 frame00000116 +d813ff6874b4347ce841fb8d6711aaa6 frame00000117 +8a774367db3c5b537833f89ff9f0da8d frame00000118 +6281c463670edfbc111837934087847d frame00000119 +66d2686792b1f06ad4c812ce30dc6eaa frame00000120 +6eabfec30a541f74906912c7dcff0ddc frame00000121 +302064e69d7c753ae035463113473c71 frame00000122 +ae5d6fcd390a0fe9d16d82358e996f6e frame00000123 +ad2dd04472f2693269ecb8306c4b70b9 frame00000124 +9a8d5937a6b740392a5e4efe0a36dfa4 frame00000125 +6684b0d36bc571da207b4bfcbb5d9cfd frame00000126 +6bc1599f370c352c101a93bb9123796f frame00000127 +e0e2eeefd1087c59d3abddf1b3032bf4 frame00000128 +c89cf952160e26450a92eedf8f8b5887 frame00000129 +3438ca2eb9dca6d31613b4f7551aa14d frame00000130 +28fd3cda2d1df1f3d047d04148ed1d65 frame00000131 +adf7e23171992812fc4fe8984cee96b5 frame00000132 +c6771dd976bba9c1dc8a6f16cb0c338d frame00000133 +6474a3b1bfeb69324a13f7ff84bce242 frame00000134 +5d387b362f4913e177cfee782dfb2a6c frame00000135 +20856b3ac4f1003fadcb8d2b63bf9e45 frame00000136 +bce11c9ab1b509cc1e405f0da9a564e7 frame00000137 +3b63718bf1493f903da604f96f8e2046 frame00000138 +73c4405484fc5b8aa0c0d79991e206f6 frame00000139 +3acb7dcb392b4f05fb38d07625a6c087 frame00000140 +cd99072e096d60a5a663d92269b002de frame00000141 +456eaaa0fab4dff0e04a88a8dcddcea1 frame00000142 +5f4b236a65f173a242762d4ecde987d6 frame00000143 +554f6d2e3c408f78abdafcafefe530f6 frame00000144 +0c5a6466f0c3a6a02af9d2e0869391ba frame00000145 +45e9dde6b379de0eda9a13e187365d0c frame00000146 +73e9b09327ac1cc51a4f27c14ff7ea0b frame00000147 +282a29ba6df0c9e6864d422d9ff3bd18 frame00000148 +0ab82bf08c232204865367cadc3a2e38 frame00000149 +4bb81285a288bb5dd0d517d17d9add65 frame00000150 +a7ccc39cf13045f33e9bceb2107391be frame00000151 +bf7b9b4367d898b43d3a9bd66f62b992 frame00000152 +90e8e3a423f4f445d85b4036a222f255 frame00000153 +e1d5cc8ae31b9671425a243deb1b37f4 frame00000154 +df3dea6931cf2d45d77d5e1dddf0254b frame00000155 +c298aeb9e022dbe2a1671d7a7069edb2 frame00000156 +428630f306323df18e1fe0c744333b76 frame00000157 +d9519d48b0dbf9570991d16c4ad5f461 frame00000158 +4e024227371418ee0c852df0eada8ff3 frame00000159 +1aea67f34e7dcd6dbb3b0c993b170c88 frame00000160 +97afab261959ac78c70b23987572818d frame00000161 +32fd11957a8aa7225152161e1d7bbae5 frame00000162 +96f6bfce2178b22f40690130ec65d141 frame00000163 +4e29f61a7fb5adf4bdd2bfc57805a22b frame00000164 +dff3ee4342b97fd2d8b444b1a8c1dafc frame00000165 +a36443e408c971c418b5bb09b897f8fe frame00000166 +3f8a95c6a6f5f80598a4804573bb1b58 frame00000167 +2e259fe20d719265ec8ec0fbae3cbead frame00000168 +536240388f7f7c02c2d7b8c104a19818 frame00000169 +0020f1b36daa12dc05344ec9362d3c4e frame00000170 +1a657c70fb1970ea46f892801d949b1f frame00000171 +80b8271562b4f72ee94f5e0ab3355f79 frame00000172 +d3c07708ef57a7aaee6bad37f5c5053f frame00000173 +97d6c1d0e939df39d08f27df24d83460 frame00000174 +02362918d72ed7b5991cd8094a006600 frame00000175 +2c2eb33fc0ad6d57cebd1472315ee633 frame00000176 +f33b5cd457363bd06dcc01d5ce67a9fa frame00000177 +bb2c394e52ee791117b4666194cae5c3 frame00000178 +2d0e228037cc6bbdf3d93f1eb8c9b501 frame00000179 +d8f586818bddb823d9d0bb19b14fe50d frame00000180 +3f61c4e31214fea97829bc2897cc560e frame00000181 +2296314d7e910cc160179fb3c21a99a3 frame00000182 +39445bfa352300687b8e604aba53d60d frame00000183 +b7cf2ea51ae00a815168fba0a3bf1cf2 frame00000184 +78bc39e7193805c5788b492e932ca1d9 frame00000185 +6958ba909fe3fefcbd98bd8f61754e62 frame00000186 +03fe82883260585df59c9a144ba1f08b frame00000187 +c569c36ee8c1f40269297fb46f40ddbe frame00000188 +814edf2b36fab5de67baf504434ff9fc frame00000189 +80fdb5ae06a19cec70e89ed3065cfe9d frame00000190 +8af8426dcd12a537a627791305816953 frame00000191 +3ec24b45d1395f47ddc8472c0ea4ccd8 frame00000192 +63afa1746814c3ccbd35cba198f40eb1 frame00000193 +dea4edd10fbc1354e9be586838df4749 frame00000194 +bb3393183004a6fdc3034c4b45fed7c2 frame00000195 +243f568ef98f75b1fbc7d35ec4a374e3 frame00000196 +c68b2b2a11a203cc39ec0a81351b8c97 frame00000197 +3509b8623cdb2eef7096f680788f5650 frame00000198 +c4f8eede774dd1dc09f3f7e538d2fbbf frame00000199 +2470a22295e384f9501d94eadee55d11 frame00000200 +f09de5b68ca318a99b397dae6a7006ff frame00000201 +f09de5b68ca318a99b397dae6a7006ff frame00000202 +f09de5b68ca318a99b397dae6a7006ff frame00000203 +f09de5b68ca318a99b397dae6a7006ff frame00000204 +f09de5b68ca318a99b397dae6a7006ff frame00000205 +f09de5b68ca318a99b397dae6a7006ff frame00000206 +f09de5b68ca318a99b397dae6a7006ff frame00000207 +f09de5b68ca318a99b397dae6a7006ff frame00000208 +f09de5b68ca318a99b397dae6a7006ff frame00000209 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/interplay-mve/descent3-level5-16bit-partial.mve.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/interplay-mve/descent3-level5-16bit-partial.mve.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/interplay-mve/descent3-level5-16bit-partial.mve.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/interplay-mve/descent3-level5-16bit-partial.mve.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,50 @@ +bef432cc3591d8df46226cb0adae3029 frame00000000 +bef432cc3591d8df46226cb0adae3029 frame00000001 +e02ddce06c7252f9cc63817a9eef5d64 frame00000002 +1abaf6f710d140f48c0304dc3fc328e7 frame00000003 +cffd3a7f6a2e7aadb8364d28e2dde56d frame00000004 +7a67c6079c1c7893e94de2f3f99bc0ea frame00000005 +a60c4c42646317d38ea659f77b316fb7 frame00000006 +a1c946e04d6304649736873325b2c22c frame00000007 +df6e081d501b848ed1634019d6ce6be6 frame00000008 +a64d7a73917ec341133287272a239c9c frame00000009 +cd6f0a2dee78a3acb45a6a58892d599d frame00000010 +8df1b614f1f6753dc8d74bd8ee3afa3e frame00000011 +a22155653ef2ddb3a9c35040612362a5 frame00000012 +7d340622e28ae6b6f00ca7120cb0ee0d frame00000013 +5956af047469b3e9f9c08bac5f7a358c frame00000014 +31ccf9afebbff9e0cdbffb347bb684af frame00000015 +093643d86f594e6d80b5419cc772d04d frame00000016 +95970a3b62e860fea7849486e22f57d4 frame00000017 +0b3361d3ccfaf72ac3e40026272d0084 frame00000018 +3385bc81785ea38267215bd8e3eeb635 frame00000019 +779c2236224f7399ecca5eb82657d14f frame00000020 +38692fefcc6a45c6404eeb193d64f800 frame00000021 +e2a5625926ecd99950b322a2f88c434b frame00000022 +5dbe2885935e1bd3f1ac878d659f4f6c frame00000023 +1d4fc3f7807dd0ba0efc1589128c30c9 frame00000024 +2adbd6926f591068d2877b3e9493dedf frame00000025 +4fa94733bdb97ce2f93ef3615a0316f2 frame00000026 +5141817b8307588db50f5b533c2bf961 frame00000027 +febaab36e82a5a49f4317b9f206c5c0a frame00000028 +ce3f304b5af88e3002e772cac79bee98 frame00000029 +973727538c01e7f32b7a12bc4c425274 frame00000030 +c0400bdbb2f8890f9bd919e4953a7ee3 frame00000031 +1a5f7ca7d081c584aab1df0ba5e8d294 frame00000032 +1b1fddecf8ff8a596fdb6409e5029b07 frame00000033 +c5d3113fa6a88130ddb1a5c7bb01e34a frame00000034 +9e904ac2c47506fc96ff9dcfe11e4f43 frame00000035 +2b26fd39fa59f3a4831ce2bf38ad13ef frame00000036 +d9c8609bf34d4d00c6f6f74bb19c7f07 frame00000037 +4a3ff385a446508eb145293abba994e1 frame00000038 +deab0078dbacbc4148e49e126977f9a5 frame00000039 +cf883a08919f0e66a816fbc45b9e12a1 frame00000040 +21ef6d9eb4e1a8e52e724e8ee535109c frame00000041 +d9453a4cc1e8852a8404b1d96b249432 frame00000042 +c6f81492d9570df3dafe1ad18db49af2 frame00000043 +58be7978bfb5af967f8c8bc451353e48 frame00000044 +dfe65760d65d5f65f10dfeab9fc17597 frame00000045 +61c3004959883c62a5fd789a1bc3b812 frame00000046 +ed98fa533e14b6f5982cd6f09c8f8370 frame00000047 +7c5df81cb839416b22f79d43032d4deb frame00000048 +c085b93375c41a620c037305a7e3b017 frame00000049 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/interplay-mve/interplay-logo-2MB.mve.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/interplay-mve/interplay-logo-2MB.mve.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/interplay-mve/interplay-logo-2MB.mve.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/interplay-mve/interplay-logo-2MB.mve.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,110 @@ +65fd26f36e46cb7c48494b9f2d1a3941 frame00000000 +a6c429e79639b0acc3bd1466af09b144 frame00000001 +6190e28b9c420b79525e139e1f235fa9 frame00000002 +cf33a31c3a1925a3d45fc3487fbb65e5 frame00000003 +e464f4216d5dfb4a63e7cc500375d94a frame00000004 +97099a3dd855df20981fc2160dd43513 frame00000005 +b1af24be4bedb6bcb37670da49ff2ef5 frame00000006 +160444652446be590d48e4b0ae9d4f1c frame00000007 +23352889f0d2668969670b82eb199792 frame00000008 +45a0ca7578fd4318b82091fe33b63a0e frame00000009 +460c51790178dcc0bd199904fb51609d frame00000010 +cf541776c660ffc3949d09473e0561cb frame00000011 +45e3fe7f22b15d53f1e8c337c57cec25 frame00000012 +e18689f17bf561124b0c54f56b3093b7 frame00000013 +9cb112cf89b59d25a51d21747aaf9def frame00000014 +c99f41e9897549594af3a510bcd4f3a0 frame00000015 +cf1d3ffb961c2287a19ce5ea5c2ba468 frame00000016 +785de0b1b10c1ca2a22d64dca38fcbab frame00000017 +58cf92583f5caf7384212ebda1ba3b9a frame00000018 +6b737e9a2a98693dec673caa7c5b42e4 frame00000019 +06601397fdbf0dce1e46c268def210a9 frame00000020 +badd0bb83bf579e129a20f10c6dcd169 frame00000021 +99bd0ec5df635f3a45f505f23ac3c442 frame00000022 +67fd70d93caccce735e90323457479fc frame00000023 +91f271d9dc683329681dd1ca79b8fcdd frame00000024 +b6b2b0bf9b949a634206f7067400cff8 frame00000025 +45e9143be40d5102102af99a35a459ab frame00000026 +073e7a019aa480308e4428851f2e66f1 frame00000027 +9474c05b741a256ce91aede5dba9286b frame00000028 +d05a091f368e4b5c7490a3164a4eb0cc frame00000029 +ed88b70496dbbe076fae0a4303f5c137 frame00000030 +06512033b5457e503a8dcb5d5f62f3eb frame00000031 +dee0df31c0e22c2dcb8fb98a3ac5198e frame00000032 +bbb51c3c7a55dd5a2046270edfa8f232 frame00000033 +2f51802a3fd37eaccae3441cd468bb7d frame00000034 +fe5109ce072a300dbdbad51487e574f3 frame00000035 +b763a2ecbd995c1afec136b749a8cf73 frame00000036 +2cd854e43b35c91ea8eb938fb98787c9 frame00000037 +7e8ed359887ee163d2bc82f88d346de2 frame00000038 +b575df95744505c86223b9fc1a2d02f8 frame00000039 +2efbb9db30292fd7dfa7f56b1e7462cc frame00000040 +b1b2bce7accec6d9fa2cd990121a15f4 frame00000041 +ff88364059742838fedde4606644f208 frame00000042 +eb02f7f7158cfbf16e678f3c4e46622e frame00000043 +ee7926b8483d7b8d37eb99930dc15fe6 frame00000044 +79f42a2554bc0d5f32020bbd560fad7b frame00000045 +4cc36cf0b7b4e0740a65e3aa2053a0b5 frame00000046 +82eb91467e3611790926c9cbe5cc03fa frame00000047 +8b29afbaa09185d017163641339d5984 frame00000048 +eab589d573cca005f907fb64d3c0356b frame00000049 +21b09a54dd0fe63cfc36a1b6d7ade880 frame00000050 +c006b70a436acfffa92226e0e2a2a26b frame00000051 +34a9ecfb5e47a203115276337bbd4c03 frame00000052 +c5d40609a836bdb345e13883df611d85 frame00000053 +0407c456909a0befe267733275326664 frame00000054 +563526ca6dd65a6967cc4fd495813a8d frame00000055 +864b265d1a4b79eb8f7ba77a812e2e8e frame00000056 +6bc6de7c10a212b6d181464fec59637a frame00000057 +1ff3b0176d8b337683f7742c87e88416 frame00000058 +263486a52ab286415c566f77f98506c5 frame00000059 +6f761c1fffb8a81c66f43058f5529edf frame00000060 +e43f3b61b9ed22e81ece8de9c23d49ba frame00000061 +d2ac2f9179f047b9055125e78fc2aa1d frame00000062 +4f846494bd0d6109bd58befce89e35f0 frame00000063 +4e01328e28e882f7589fba87874307fa frame00000064 +8f0cf419e41211f7e15f3bd855cb1407 frame00000065 +3b2837d5ecb5b6af96e774964e7b267a frame00000066 +f3c5c1e166db4603cd18c85f4966912d frame00000067 +b96858dfd81bf278d217a90454bb1758 frame00000068 +d63ce11d596c302528ca230b539d68b6 frame00000069 +913debbc18ebf56ada1adff0a55ba853 frame00000070 +26650217c32447eae01d48151bceb037 frame00000071 +cbcd926b0432113e2d9c195aa002e8a4 frame00000072 +6aea461373182b4295c2b944877fb8c7 frame00000073 +8c2bdf9c9fd8c8a0f6c3f737535d4fb0 frame00000074 +6a9b5960da89be9161fb57de2598b161 frame00000075 +52cd6ff1cef31fc57c8c36586c2ed3d2 frame00000076 +9a9d2d0021d1bedeca929e4ca99a7052 frame00000077 +30fbb7c8a77a71cc5044916428cda867 frame00000078 +dfd02b30957c7d136650d4fc222b0e40 frame00000079 +bb3c68125562e9c20e32bba5eead0a5c frame00000080 +70fbcebcbbaacc43f42a5e230e2e83d3 frame00000081 +74b6ced3cf9f7cb092addac618a3d915 frame00000082 +487a759c7b4647d3c73c92661f5e5aa8 frame00000083 +579108f14c80a62e663b2c776a36c7eb frame00000084 +495c59636bb4af7cedba1303c4c25230 frame00000085 +f1063e541a944464eca1d8309e9623b3 frame00000086 +6542a7925e50f98366ec9469abf6d7a2 frame00000087 +f421f8a625cec83767c360416b45ca25 frame00000088 +fc73f596737995b5eaeb5564d5abf1a6 frame00000089 +65bc2c3969ab4e428fbaca67cc2bf1e6 frame00000090 +f6251280f40bf2cae2be8a0aeb728855 frame00000091 +739f539583eb7584c260d51fe75d8a70 frame00000092 +4485f16f49ff065166981f49d5e53283 frame00000093 +b139cc51432513a5af397be3f0ed410a frame00000094 +4b06431b0a4da58fade68290d1ef137f frame00000095 +f1cef901d34db01e8edea39da09fe52d frame00000096 +00b16e9ca02ce1118606bb07928a416a frame00000097 +ab3e58d2911c30185e01c9d499639677 frame00000098 +faf6f3f08b314b9cfa768403fe9ee444 frame00000099 +12ebe8439c95c93f416dc0d91045957e frame00000100 +778e97ed3123e6e39bfbcee319f7ec2c frame00000101 +be1d74844c85efd2f3c5ea86ce829610 frame00000102 +f1a27e2020691c82aae1480afc70ec16 frame00000103 +6b361f8182be05bfa393ce090906cd58 frame00000104 +375089b2d9cf1776bece859811be481f frame00000105 +8d016654d80358bda5458c3b81e33cfb frame00000106 +20ff4263df7aaca8ffa52f6e4685815d frame00000107 +fdcb54b5d57b5f1df7a4f148f893467f frame00000108 +d2c088147902be610b2290d8774bb8d6 frame00000109 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/isom/vc1-wmapro.ism.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/isom/vc1-wmapro.ism.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/isom/vc1-wmapro.ism.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/isom/vc1-wmapro.ism.md5 2012-01-08 10:15:51.000000000 +0000 @@ -0,0 +1,119 @@ +e74b004f3fbc19172802d5bc021f7c8d frame00000000 +5f944c77c005cf3ea78b8acf6937626a frame00000001 +90728d73129f3164aea542ec2552ccb2 frame00000002 +59b20e5203c5e6975adcc25b287d64a7 frame00000003 +6df8eb34550b3aff3c857ec1aa1c4eb8 frame00000004 +e0e7c187724be2e4de1155f1336a7cfe frame00000005 +b168d88fb387978a401a1bf668ab1d20 frame00000006 +dc8e40b5b7a2e9560a013d64a5a9b0f4 frame00000007 +765e79ee07a643dee703b13435c6cb87 frame00000008 +ae3bcf56c98f767bd737b6c39997b090 frame00000009 +291016709193e474bf33435f6632dcda frame00000010 +c9e136c199e43321954bf84f97db34d3 frame00000011 +d40f2864bd8bcc46d9857ceab5948a07 frame00000012 +83aa21de7f3d50a3e2294ff44be950e3 frame00000013 +aa9438f8423ea2fd8faba272fccc6273 frame00000014 +65e6a4e2b690aabbd715de46adb46061 frame00000015 +ea1754900954ed21aab5cbb91b435c0b frame00000016 +55c4351aa2ed94dbb61d1b3df56eca73 frame00000017 +b8098d6b44b8a7c5606b2b17287519cb frame00000018 +5cff78cf263025dbc1e0dd93896dc2f9 frame00000019 +993c3f17b2191d57bad80fbeab10c25c frame00000020 +c47f2ff2a9a3bb0d43162246baad82d7 frame00000021 +4acac7b747957011f841f92de01f47b9 frame00000022 +df6f15b162e0abc2450edbbc53e76461 frame00000023 +60cb5ea96c3125a6e53e1fcf958cf896 frame00000024 +5a699fc6ba3394bd448ea358b42c1b5f frame00000025 +ce9b22f53d7030fb54448a35e2d086a2 frame00000026 +bd31cb305cd1089e3c1a3cb7214736dc frame00000027 +5a1e9a33d5536b768c257512c4fe49b4 frame00000028 +49c5e11f0a11c19e1f518447a5120cc8 frame00000029 +60af50150dd08fd9a0afcd17413d5712 frame00000030 +48cbffc421879ff878d12992b968e01a frame00000031 +e6cea6227f833c528820bc2690a5104d frame00000032 +994b87c44d3fcc74b119eba6d9dfcc0f frame00000033 +809c50f667734f3dfc84fd43c187992a frame00000034 +3cb814596b260f36bc129522f7ff191f frame00000035 +d4f1b357fa9abe19bcd84bcbcf149e79 frame00000036 +66c5dcbfff7866eec40fd73d39dd7b33 frame00000037 +acd10b8fc0a0a72f5c3e4663f74d5077 frame00000038 +b8acfff9cc5ff0f9370c70479da8d52f frame00000039 +d257a3fd656844797bc793464a5e6f0b frame00000040 +cf65c59f45ea5e6ab251cb40b304cd2e frame00000041 +572f87902755fd766a98c83b7665a5d0 frame00000042 +1ea9892448f12ebcc3ea877fd8db4ea0 frame00000043 +05fa969c3647d7e96ca4049def5fa81c frame00000044 +0c12e92ad208f8826044933dfb746768 frame00000045 +cd82f21680bc2894417393542c58a7d0 frame00000046 +9a9f7cd95d127e36e56b87d39ee5353b frame00000047 +4ac09a2a4944efb95ea1778b9c45ff43 frame00000048 +5af8f1b586b5ac5bcdd8f4b3176e2d09 frame00000049 +b5478584c5fa7659ac5ea4e71300a953 frame00000050 +c3383c71eb635fbd549e9435d5a9e821 frame00000051 +63652c5b86f04c0223b37d777cc61ebf frame00000052 +fb13aaf667eb6b1f4c564a690f1b53ff frame00000053 +839bf3298810ded4410eeb8887b097c1 frame00000054 +8c9e4548a216215e4e6e44ff164d7e99 frame00000055 +47013c52b94aae1716f14b84aadef5ef frame00000056 +5121ef9c21182ddabff8c8ae569a9888 frame00000057 +6cd76644dbdf3ee2c27e7795d28b272d frame00000058 +ff9e0f6eedb60f65175db45435ad1be5 frame00000059 +8aebbcc4025e0e981674ac015ab1b6da frame00000060 +5b08af26567cd21640a6c8c21c66078b frame00000061 +d3925ad13ab64ffe1425345c44bcc586 frame00000062 +8efac77ba919c21b438b88c014c341b5 frame00000063 +ebe2c9fffb9a321d26c8b3cb7117deb3 frame00000064 +4b1bd599eae73465672f12874a0157c7 frame00000065 +266ecc4436926028c8940d2afda1b9d4 frame00000066 +e895ff45564cbf1b1e25bb108f696e1d frame00000067 +bd98962e60c76b063c3d90f8f7c3968f frame00000068 +68091fe44d7479ce05a6b08d29f68425 frame00000069 +72ecc0470d4bbb952edf5dd0694975d7 frame00000070 +944a4d2e09df1859b66fb6f04b59775b frame00000071 +65b31e8d1413a15fd90e3919962f705b frame00000072 +2c0b2da65f43c18b4eae689f3203efcb frame00000073 +5aff80fc709142db0da8d0c2e92ec97f frame00000074 +9ad0079b4c9f6c874bb6f9721372f7aa frame00000075 +c852250fab08385448c4f112dd40f4c9 frame00000076 +2fb3ef1a58375019dbb5b26b34ed767c frame00000077 +6e0b61196fcaaa4e1308c809e96a2e82 frame00000078 +447b5acd1476c197a2950dd417900588 frame00000079 +57609837eda990bd37b4d29f8a42117c frame00000080 +394af6b3204e32d218cd9889a26ef771 frame00000081 +da361bc856bc2e7e46eb45cc5a1a04fd frame00000082 +bb5f192cdf033e09593c2b9a15a17f33 frame00000083 +7b703641ed47fcaf232352f66e2d7d20 frame00000084 +0c05ddfd6e5915c6fb3f2cdbb8240fa9 frame00000085 +cb401a0e878bcd9105a99b80cb8d4e9a frame00000086 +c285b92a8a012460f71539bbc3ef1728 frame00000087 +9c0f0020b39da748afda54e192fdfa24 frame00000088 +22b530b34abd42e9351d728272d32f43 frame00000089 +9daf9aff52d604cdd80f01771c6bb549 frame00000090 +d31afe873fca955bf0b0c43cc4239090 frame00000091 +2d4a6e1cd2e8e6918cc4cdba6ef8b931 frame00000092 +c6c09bfc9ff6fa3524db4b02af88703c frame00000093 +d4eb724d3f3c715de0aad2a417834930 frame00000094 +5ee2575552d86c6e236fe64155649017 frame00000095 +da0a8def13cbd822fd7290bd03352aae frame00000096 +a5a0f252808b2cbddd9dcb74646d8ac0 frame00000097 +76c9571b7d1a5978279090560aa5711f frame00000098 +89ce4de37caebe5af8ba9908c04491d0 frame00000099 +382667c9fee88a64cd594850cae6b53a frame00000100 +08e7a88f6a0d18315c87e152142a4188 frame00000101 +ba3844309667711978ff85e3500a8dd3 frame00000102 +ec128cbdf9cc5ccd3f43565942c687f6 frame00000103 +f006e6c34b6259f25d3eaabed4613efc frame00000104 +41a47e685a9239a9412e876b2b4b97e7 frame00000105 +4994a4499a726bed07efba97f4c1169a frame00000106 +0a7b337f0e95a84c8ea35b825998cbc0 frame00000107 +104942f2415de9aa73e8482314cd708f frame00000108 +e63125f7ff2917e3d18d63c212c0c2b4 frame00000109 +2c63b9628307c6783e25a10b7d152b38 frame00000110 +c5949d7b092a004693248cc76e525818 frame00000111 +c2882d20c5fcf81ab92455a70b192aef frame00000112 +2a6562f8dec067618f103e5162ccba5d frame00000113 +096726b27530451e137fc554274f8af7 frame00000114 +3e9f40d737433b5125cea94ab60946db frame00000115 +fafff8d022b85e6a614235edced51a22 frame00000116 +14e0c92a17cc4757a1db1319408af7b3 frame00000117 +e900ea5a72d7aefd10e2c82ab4bbd399 frame00000118 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/iv32/cubes.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/iv32/cubes.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/iv32/cubes.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/iv32/cubes.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,40 @@ +ce7874f5ad86c23fdc7e25b4a7b1d4a4 frame00000000 +b29420ba491aeb9ee858bf9c31006fd0 frame00000001 +e4f5ded599275a703a3235712551958b frame00000002 +ecf79c77b13ab7d88c2e36f8ca94fd39 frame00000003 +7150cec8c101c9e99d65fb4184a9290b frame00000004 +b3f834974a5883a602663611599495a1 frame00000005 +9e92453d6ab87ae7c93f758288e6f218 frame00000006 +c330247aed6eab0bb210e0b75bcbd03b frame00000007 +1980d58b04c76266c16013f0841d6af2 frame00000008 +ba156bbe9dc2501073e9ef467ef19b35 frame00000009 +545220b44c5e2a5eb6e18d1f0b70bcf5 frame00000010 +529cc89d1a9be16b3437de32d58c7d5b frame00000011 +894fed0e18c37ddaac6b090f0cafe7b2 frame00000012 +9446667abe9e694e2f130de49f86bf8f frame00000013 +54fbe676cc0c0a8c61a338d153085215 frame00000014 +2422e20b7ea3315d4d13945a4bb474c1 frame00000015 +3e2ad5e6a7f31157b0e6a63640c87a1f frame00000016 +3062911a1610402d29c0fe5ce225125c frame00000017 +acec65016378a82e58267ccdd69a8a10 frame00000018 +9338aadb764920edabe146edcb7b7aed frame00000019 +ce7874f5ad86c23fdc7e25b4a7b1d4a4 frame00000020 +d5ee4fff99ea46d42576962896174283 frame00000021 +0eb857abaf1e529f3942f557434b42b4 frame00000022 +01df4b943a9f38fceec1576415b16e21 frame00000023 +3b54de28404a47dee877c6e85ae52726 frame00000024 +a5d84bd924160933695d113e9d3b8fd1 frame00000025 +10fa074af7e88a057c7925b8895f5805 frame00000026 +50d8d1398b781cba75977de0115196c3 frame00000027 +da00eed7e73bdee738324df1cd0431a6 frame00000028 +4d82d1d9f17921ab8248faffdcb7334f frame00000029 +83bc38c71e86d6be05b034318e9fa81b frame00000030 +01e4424728b2299b5ed4356d73fcfd3d frame00000031 +3bda46214de58ac501a990119db02d0f frame00000032 +680a0f9f0c0cc33228371f842b073d27 frame00000033 +3b9a1f0d5e82ba2ace3c9c056e0763f0 frame00000034 +523dd9cb730d5ef3cd998fbd4c789d1c frame00000035 +278c0afbb7e4d762ee055d4aa2167d5f frame00000036 +756e92237b3a30303a7d6407c0163eda frame00000037 +25057081a4e25d85014c3e3809d82ab1 frame00000038 +b1e2793784129605b53e2c14bc497500 frame00000039 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/iv41/indeo41-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/iv41/indeo41-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/iv41/indeo41-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/iv41/indeo41-partial.avi.md5 2012-01-08 10:15:51.000000000 +0000 @@ -0,0 +1,100 @@ +16739e78f93e045912d9b707b980ab9a frame00000000 +b77b8120c9e8ca024cc818bba634d4df frame00000001 +33669af66e782a195f916dff3ea27336 frame00000002 +47601fda7269d7fcca5475722dde53de frame00000003 +0f981059d32534bfa1ffda00bb109828 frame00000004 +d1450fb84756cee049247d37f1acf222 frame00000005 +04158cc8a88fa3b0c99756ee097bad54 frame00000006 +5fe4c3334aa36ad581d2cb4934736645 frame00000007 +184519c9d193c76af628dcf02235ae65 frame00000008 +db72dd7b9ea14b4091bb2fe877c0a10f frame00000009 +90efe6e2b353753bae65fe95a34cb53c frame00000010 +fc2b42d7affca8db7f53a92fdb67fc57 frame00000011 +c3c9105347e7f466e09d1390da5378ea frame00000012 +6bbb6f42f3c56fc85c208bba2715dec8 frame00000013 +5cdbba7b5a270b8a8839239db7dd9ed7 frame00000014 +0ec1dde16672c5960c515feb3adb24d7 frame00000015 +88111c846672230d1e4053759b2fa19e frame00000016 +5ac9882d01d7a01fbc8218cf4a3909a4 frame00000017 +6c62fcd47baab745fe7cbbd544cf8aac frame00000018 +8459a249bc08200dc816e51155f8e8df frame00000019 +a3604ff0c463ea5827dc3370adc3c0e3 frame00000020 +ee049110982acfae244c59e866d11c65 frame00000021 +af7265bc0bb4b7fba01e8f61b5e59ebe frame00000022 +4f44604b5fc645d36bfd2f36bfa40fb1 frame00000023 +008847b6ed8eecfb54b107cc3852216a frame00000024 +903be4db8e498424a0939310f38cb4d9 frame00000025 +f8de60e96632d962dfdca5c786d09c2f frame00000026 +8ae9066f35e27830b00ee4cb2ab67a06 frame00000027 +46e7449e77591e5c56252041845d6dc7 frame00000028 +06a5c2607592d7873798dd74f43cad92 frame00000029 +dd0199e39bec318ec5b08e1d161458d7 frame00000030 +ac50623e89bef9cb66ff9003d5354350 frame00000031 +549b0057a18cd23cf2d4e4f443043162 frame00000032 +7cfa819ee1f2603b7358a3f84aaca79f frame00000033 +3f7203fedd48b661efbbe5bbe0d2352d frame00000034 +e870a485e3dad209c97af89e589d2c82 frame00000035 +eca37784b61b5094a650ec3e024da969 frame00000036 +5f153bc40d0606bb591640a01f862b32 frame00000037 +e44c2d74a4d235e07a3ae8699c18efa0 frame00000038 +a2d3ea8c91d63c493fd10d8c3ec896f5 frame00000039 +6986f2d76cd03fd8861a6f11f0230972 frame00000040 +bee671eb96a321551d9a59f639c712c4 frame00000041 +8762687f6e03dc75f50df672ec2de9b5 frame00000042 +733e3b96b50187c6180767fdbd8fe70b frame00000043 +e8ad497cf80147c7fff9358b65465d47 frame00000044 +85f555a9f02825d39161bf36da14174b frame00000045 +44330a449dd5914db1e2b8d31e13e914 frame00000046 +9acc946995de6a0fabde167bf1ec784a frame00000047 +944f83b720484e73e21fd2418f3be75b frame00000048 +ed35eba0f34d728afd55c482e17fb0be frame00000049 +7f92244ee8152b00362e5cad69a546ee frame00000050 +fba6cba689df4ae13ddb3185fc9cf914 frame00000051 +84639468ab919f5d2480ad35d12a15f1 frame00000052 +49b395cac339970d9121b3a7b7d91a95 frame00000053 +535db3ab6d0ed89cdadcdc64c19716aa frame00000054 +450bb313c7c9fc07accb88c1d7c1e500 frame00000055 +63e822b332c23201c6ba8c21d1a1b264 frame00000056 +f59b5c5560ebec1ed83f7bc9c3d6ddc3 frame00000057 +54dacf71a7585a642ec1c2bc9b320320 frame00000058 +dc19c708abc1f9eee0a29c38d0f8ba98 frame00000059 +593edb0a58971c34ef1e32c09efc7260 frame00000060 +c8292f69868c79f1c1b67549b5e162b9 frame00000061 +17578f6dd3971e0e137b2a7c461525f0 frame00000062 +64602d8ab50943ca0e579d3cd075946a frame00000063 +df4e32d0a70b17f81b8e3124493e00f0 frame00000064 +65dc28066f0c8e594212583062b48ceb frame00000065 +91646809e8e41964639aa46073fdb61e frame00000066 +7a0db14e6cb452423f6d610c61eda25c frame00000067 +aed272424f4b2fa047b6a5531b61e7be frame00000068 +bdeb8f222f0f27a84730a9dd28cb12b0 frame00000069 +f3f94300347286abe15558717d4e3ee9 frame00000070 +c7b75dc82e95aa390d486da98c727546 frame00000071 +cfd0e6fc8dfcd413633af9e7c5e1a08c frame00000072 +51220cad64f367dec9c4c5fed709598f frame00000073 +c291675aa13ba34e4c2b9e08c786c996 frame00000074 +cc9127a450c599b67b8ff71dd6907253 frame00000075 +33befeed1104e568cdd304c6c964f7ae frame00000076 +9b8929027f4748f0174863f9b74962cf frame00000077 +94e649a9d4bc2af683fb4141b42922a2 frame00000078 +7b41b4edcbc19fe95c5e0acb1d0ddd2e frame00000079 +a9822c6bfcc4048c0c4bef4c55e9ea41 frame00000080 +d6b90a7843b387715a4c976e1fc94952 frame00000081 +e8c08036349f48158d3cf89f8a27c588 frame00000082 +620f4f5c731ee45dba3f1fa7592086e8 frame00000083 +a132bf0f8e3ca55db3b81e183b7d554c frame00000084 +662e96771097f254a2ff8eaeb485a7be frame00000085 +edc6525a0d9012718f3510735749b77b frame00000086 +19a7e96b37cfcd707f500814a15533b3 frame00000087 +c6ca1061ee74e937525995015286dcd1 frame00000088 +d32ae60039721038f55fe1ae8e83fb72 frame00000089 +999e3bbae5162a5ec4237a206e0a7886 frame00000090 +e630f0cb3e44a438b550744a6177c364 frame00000091 +f274c262290a98c722121cf43bdb4f29 frame00000092 +da865ca8629dcb67e809d3b574001e81 frame00000093 +5b6e1927bddf748e4d4db299db2115ca frame00000094 +fe60600ef50ce582c649491b291b7844 frame00000095 +b149b6f484ce84f1ef1d06784f55fc92 frame00000096 +e0421bc9501cf80fd77f9f0ab28016c4 frame00000097 +aee2a2d8e9e3986630c34bd0d6c36b41 frame00000098 +18aa87f5b16c19cbd804765838437201 frame00000099 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/iv50/Educ_Movie_DeadlyForce.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/iv50/Educ_Movie_DeadlyForce.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/iv50/Educ_Movie_DeadlyForce.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/iv50/Educ_Movie_DeadlyForce.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,134 @@ +7096718cece80eba3d652f8afb2e563a frame00000000 +7096718cece80eba3d652f8afb2e563a frame00000001 +4e381fc65936d1c82814f04e572948d7 frame00000002 +f1f007dbbd5ee276e4de1ba6f0f7c74e frame00000003 +6459c286279e6b82f0bf502fd03e0df0 frame00000004 +ffb46183ea2ee0db23b2690a490637ae frame00000005 +559046b8aec89d11de3185b3d07756a2 frame00000006 +d9e29528e1c42c4fb8d24676871597ac frame00000007 +ce33a12d7939320a20889de5c8baf1f5 frame00000008 +670f8a3c326e2edd1178731b1d04b622 frame00000009 +d66818368129496a7542db0cc076d7cc frame00000010 +77b2043cdffc48f15dc4baf2ab931891 frame00000011 +fcca4e6bdd9d93cf57a46006ec1c001c frame00000012 +6cdc6ac90e6002547d53659f606c1724 frame00000013 +9b33a2a062a34e82c43e3fa2f870b430 frame00000014 +cc73f1bb8be17e051ac27dcf686a3e45 frame00000015 +2bb12b042acfa9f6fca18b4c6c056350 frame00000016 +59bb5b742f8160eab53ec02842bba82e frame00000017 +b16b41077978a2d8c54ac4f03fda18a1 frame00000018 +a406a40f89da96091a857d3aa4ee5438 frame00000019 +cea996769e01da15e2d632ab53a85576 frame00000020 +820304e3a70577fd72645b425731700a frame00000021 +ecdba546a20c5c0b3d61d72df0dfdb40 frame00000022 +bdbde4b4d503f762775fcf7d93468e5d frame00000023 +89fb576050dedaf56a1a273a69f63b0d frame00000024 +ce19f6a30d039610c8a1c7a5e5b94c47 frame00000025 +8440aca5bed43bb51872dbdc921bb099 frame00000026 +f346b5f725839e0dcecb871dce844d5b frame00000027 +da03930cfeb0d8923c126783e0da025c frame00000028 +26b12cea639b20400bdac9e4ef081d08 frame00000029 +91561710af03d028d904f69ff2453647 frame00000030 +37300a5e312511663f79b956ba60ca2f frame00000031 +fce31bcd78250ccc98041db6f0578c6d frame00000032 +7befd56b53e9411a8959959ef682d1c1 frame00000033 +6cdd5f6236856864b5dcb79717589aa4 frame00000034 +964160a55a376135253d177dd83a7da0 frame00000035 +4b1cd05dbe29f15b5c4dd07217cfce57 frame00000036 +50dd5a85df5c0811002b2ccdc41fbe2d frame00000037 +bcb473f8536939f418271a3bfdaaa572 frame00000038 +395e9a28355681c6d919c7b86973c87a frame00000039 +637b5ce359310122a1e21427c411a1ac frame00000040 +67b08ad2d3f7f1130e23c7d50ca3016f frame00000041 +9da02b8d85742f039f87e42be1eda794 frame00000042 +faccd2b4298e0c5adddb9d15daac2539 frame00000043 +2b421dcd76386510987ddd5fbe3f44b1 frame00000044 +eaaf99ab0a76a63a1c40e67ec2db2ad7 frame00000045 +93c5d78c0e5c23d7acf3a6d66e2cdaf7 frame00000046 +809eee8ecac4561dd617fa8d7e573382 frame00000047 +b61ca74f029524ea660bdbed86f412d2 frame00000048 +267cd4634273271a0f8c20246723091c frame00000049 +ee20b623ff0f748eabf5cf8723fbe0da frame00000050 +83c2881a3367ab12acaa17afd073544a frame00000051 +fcb45881054143303a56de2ebea9b178 frame00000052 +2e9110cda085ce42a21b0ed4a2d69307 frame00000053 +7ed064fa62d4da260c3229b52498a900 frame00000054 +92505cf940aec4808a899b19b0c8b5e2 frame00000055 +75b57942d5ef7d060d8fe1c2da31e213 frame00000056 +05d31f7244eaa5b22e6e353eedf34aca frame00000057 +bf0be299a4d9de5bb4aad1b641d3421d frame00000058 +8ab2c3fd550fc0d7903e677c6892ee92 frame00000059 +368d570f9cb01da3f4cd3b43c84669e0 frame00000060 +d28acf13d901fb558cce290ef0c0ea22 frame00000061 +48afcf5c4cd0f1de96b42c8611ea4254 frame00000062 +69d5c1e1a43d020d54c5b926f1a3678c frame00000063 +d3eba6fc7ad98797dca07fe0adcf9a96 frame00000064 +db695884b30d647800f37bfc8da30396 frame00000065 +88e5569e77af2691f81492305b93a985 frame00000066 +ecbe14d9bd8ae394da11be22c9cc3995 frame00000067 +a63caf7d1a5899c30e899ff51311fc02 frame00000068 +210eb1e1b4643da8ee1c90cd15faff1b frame00000069 +47cb0e3d50d4163610d875b5a2a71754 frame00000070 +60bba8920a4014a6484d90d8fe85c2f0 frame00000071 +e0c6fbaa126f8a21388088c2b67153f6 frame00000072 +2fcb7629a819d984c3eabcc0244aa46b frame00000073 +753300c582acf95a50c732bf54323d06 frame00000074 +8790284c74950c9ae9b1899d808aa408 frame00000075 +8da995c144c5e0751f815b4dc94d3c81 frame00000076 +06d25e55567331dbbc0d1de6f79277cf frame00000077 +8bc8e98752ee58a8c87a4e921da649f3 frame00000078 +f0fdf7b1e755f6bb72c0cdaa0c0103c4 frame00000079 +d2474a1287d2de13b3b53e0b898749aa frame00000080 +a90bbae8028316a2a860d61c98463aa4 frame00000081 +48351bedd22b208a0d1e9934ea81818d frame00000082 +4ae792baf086924f5d6ffed5fbd982e5 frame00000083 +36e77af4762f857304798b9cb6202525 frame00000084 +16bedf70960654a52a3b8117008c7699 frame00000085 +4f708f0bd78c4bc624855da1f9942312 frame00000086 +e48aa9bb428b01dcf1ad6b265c32fa01 frame00000087 +cd910486ee2633362ddbf15e34f25603 frame00000088 +6efc061621b1af0fa161c8dd9b1b103e frame00000089 +de5b2c41d7c88967594b0bc9f9658e35 frame00000090 +4eba9ed27f92c765b7b1ceccf4ed89f6 frame00000091 +aff919f1a2a10ed6856fb833245b7584 frame00000092 +5a4183e11bbc752261ff1f61d0b6b16f frame00000093 +0d18060f6ffd6cf4575e0ae70f010732 frame00000094 +04c545877cf4a06ff19cac7cd59a38df frame00000095 +0657193ccc3fd00b3e69aea49b1f6991 frame00000096 +79474b01f91063a6c9cef4bfdf6a7c95 frame00000097 +065482ae499b03fcff8e7a8fd78124a3 frame00000098 +5a40b4f4cb1a38dcd6c260ec9631315b frame00000099 +e7c783694c764ca95835e6861396229e frame00000100 +0ad91a6b01a912f9fac67724d3f8af64 frame00000101 +560aec369b0767f42bf611fe5a8371d1 frame00000102 +ee711a268c042bb57e762e2d28a525f1 frame00000103 +eb2d7f03aadc6052a55c5d3f7fb8cda7 frame00000104 +35ef6966bcd0acfe8d0b970802c104b0 frame00000105 +459b7a0dd475ec7d487a408538086f53 frame00000106 +ea0017ab80cfefc3fd9a9596f4ed933c frame00000107 +9430a45b293175d99a94d7f6a8cf7313 frame00000108 +2f4e3dc89f330239808f27d9d26eb9f1 frame00000109 +b486cdab31d4c689c2b70c9cc89a9db4 frame00000110 +d5c334b7f260b62c113e14d79ce153d6 frame00000111 +2554a5736ac09bfec6b4f8f19d7ebb92 frame00000112 +c721e4444fcbdb5b5ba1f3da93c7ef07 frame00000113 +e7566cfb71c81dd356c1ae7b1a10f0db frame00000114 +39658d5143dd2804451b266947bc1f42 frame00000115 +a99ed564d42dee49365adc0ef9b9a9be frame00000116 +8e0a2364a4545ecb006a09870b58d649 frame00000117 +0469c663c0b7dc26dd2f506d76b7ed04 frame00000118 +4d612c5480916b1ee27830e7666e8ac8 frame00000119 +a08def63e9062988a14c09be2e4cc1b6 frame00000120 +094350b4256743beb28fbaecc8fb645f frame00000121 +3de226f16cbc82b8d7d5d530d16b3a92 frame00000122 +4501b034c28ce5458f3ddd82bb39e84f frame00000123 +ff89339dfc79be5c517e52eaa2cff1fc frame00000124 +7ac1994578c8dcbefa53b28920c16878 frame00000125 +11bfd2dcf7f013dcbdda85efa1c72e42 frame00000126 +88a4fcc9cf7462d7d3b2d6fd3ca32d48 frame00000127 +4d6cf6f2a15fa6658d5d948facc1c923 frame00000128 +414f5dc691e4dbf2ea8d037b8de1d0e0 frame00000129 +8e701e3fa940ed9bc721d7ca98e2f72e frame00000130 +bd99d18ef818b42698ec1ddd99542f1f frame00000131 +348c50f7ce2a0fb0b3810e459ebce540 frame00000132 +fa2b0dc33f4266cc319b3ac25013d678 frame00000133 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/iv8/zzz-partial.mpg.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/iv8/zzz-partial.mpg.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/iv8/zzz-partial.mpg.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/iv8/zzz-partial.mpg.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,21 @@ +2b3c97e5070f90d54828a5362626a1a7 frame00000000 +5457f106a42e9721add5d38016769fa6 frame00000001 +a279f3cfec500968c59ce2bc59a3f945 frame00000002 +286f0248faa542cbb9f84de9be4be771 frame00000003 +d383b74bb94dff40bf7772d7e70573ca frame00000004 +a666e704ba6b923ac98e814ab4eac68b frame00000005 +57dc1a500a9bdc9b029439d798664274 frame00000006 +c8cf03c021b517f531f02c621c5e7f73 frame00000007 +2e8f99c4046ca7c79001141c5427b902 frame00000008 +2ce19e8d4c0ff4b4f186721f9cb91f60 frame00000009 +ee2cdd6aa724a2eb991ee6a79601405f frame00000010 +014a92a151adfbe8708983ad83b1de3b frame00000011 +a61ed6a39aa7c08da4e7f80aadcb729f frame00000012 +81cbf43d5a1fd64adbbe5b42eee48ae6 frame00000013 +eea672b56137ee217af963f83f355ea4 frame00000014 +3591e8f9337a943e8883a70cb87ddf6a frame00000015 +3b32824d96b00d214b6e92148ed5301b frame00000016 +6cdc706af6eefcd4ba2d9e821769548a frame00000017 +6a246ce3e3e26376fc59a6548d05adb6 frame00000018 +5ec85c89894f8f2e6d2754952bf8ae8f frame00000019 +d1327a54e3fc163c09fe821402c317dc frame00000020 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/kega/kgv1.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/kega/kgv1.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/kega/kgv1.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/kega/kgv1.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,313 @@ +8e4dd5c5c31a54672e30503f6ee13321 frame00000000 +8e4dd5c5c31a54672e30503f6ee13321 frame00000001 +8e4dd5c5c31a54672e30503f6ee13321 frame00000002 +8e4dd5c5c31a54672e30503f6ee13321 frame00000003 +8e4dd5c5c31a54672e30503f6ee13321 frame00000004 +8e4dd5c5c31a54672e30503f6ee13321 frame00000005 +8e4dd5c5c31a54672e30503f6ee13321 frame00000006 +8e4dd5c5c31a54672e30503f6ee13321 frame00000007 +8e4dd5c5c31a54672e30503f6ee13321 frame00000008 +8e4dd5c5c31a54672e30503f6ee13321 frame00000009 +8e4dd5c5c31a54672e30503f6ee13321 frame00000010 +8e4dd5c5c31a54672e30503f6ee13321 frame00000011 +8e4dd5c5c31a54672e30503f6ee13321 frame00000012 +8e4dd5c5c31a54672e30503f6ee13321 frame00000013 +8e4dd5c5c31a54672e30503f6ee13321 frame00000014 +8e4dd5c5c31a54672e30503f6ee13321 frame00000015 +8e4dd5c5c31a54672e30503f6ee13321 frame00000016 +8e4dd5c5c31a54672e30503f6ee13321 frame00000017 +8e4dd5c5c31a54672e30503f6ee13321 frame00000018 +8e4dd5c5c31a54672e30503f6ee13321 frame00000019 +8e4dd5c5c31a54672e30503f6ee13321 frame00000020 +8e4dd5c5c31a54672e30503f6ee13321 frame00000021 +8e4dd5c5c31a54672e30503f6ee13321 frame00000022 +8e4dd5c5c31a54672e30503f6ee13321 frame00000023 +8e4dd5c5c31a54672e30503f6ee13321 frame00000024 +8e4dd5c5c31a54672e30503f6ee13321 frame00000025 +8e4dd5c5c31a54672e30503f6ee13321 frame00000026 +8e4dd5c5c31a54672e30503f6ee13321 frame00000027 +8e4dd5c5c31a54672e30503f6ee13321 frame00000028 +8e4dd5c5c31a54672e30503f6ee13321 frame00000029 +8e4dd5c5c31a54672e30503f6ee13321 frame00000030 +8e4dd5c5c31a54672e30503f6ee13321 frame00000031 +8e4dd5c5c31a54672e30503f6ee13321 frame00000032 +8e4dd5c5c31a54672e30503f6ee13321 frame00000033 +8e4dd5c5c31a54672e30503f6ee13321 frame00000034 +8e4dd5c5c31a54672e30503f6ee13321 frame00000035 +8e4dd5c5c31a54672e30503f6ee13321 frame00000036 +8e4dd5c5c31a54672e30503f6ee13321 frame00000037 +8e4dd5c5c31a54672e30503f6ee13321 frame00000038 +8e4dd5c5c31a54672e30503f6ee13321 frame00000039 +8e4dd5c5c31a54672e30503f6ee13321 frame00000040 +8e4dd5c5c31a54672e30503f6ee13321 frame00000041 +8e4dd5c5c31a54672e30503f6ee13321 frame00000042 +8e4dd5c5c31a54672e30503f6ee13321 frame00000043 +8e4dd5c5c31a54672e30503f6ee13321 frame00000044 +8e4dd5c5c31a54672e30503f6ee13321 frame00000045 +8e4dd5c5c31a54672e30503f6ee13321 frame00000046 +43139698a5950ce550bc890abe92dbd4 frame00000047 +9cba2d011b20f2d2797dc988ce80ea83 frame00000048 +0ae2567d27415f5b5a3312c7c602938b frame00000049 +cdb101438817cef54197e0f213dd7b65 frame00000050 +13662679df0019db7ff7cbf32bb4624f frame00000051 +9477521ae8d357d5b166d3e3f128cb17 frame00000052 +495f31f8a78e4a78820ddfa293185d99 frame00000053 +0aba7bbcac262a6595e75d2effcc744c frame00000054 +e68ffbe776c2adf3c706218d467fbf19 frame00000055 +2d45588e696238abf7cde632e61be92e frame00000056 +1d1919861d58fd28330330eaebc0c697 frame00000057 +8e7f97e5231ed86419e3bd0896b8b28d frame00000058 +fecc860a40a7b81987d3544320b4ab50 frame00000059 +c0dd63a28019d946ffe3a963fc9d2f99 frame00000060 +118a21bd902acace2db1e97ff44f547e frame00000061 +36f5e6933327fa9a6c454b661c861c4d frame00000062 +b97c9af517d1843a7091c3223f7d3751 frame00000063 +a686b9a9aeb01e24777390fdc9313820 frame00000064 +c895e403311d100f46c970bab70197ff frame00000065 +e9858250992c47b27743a4ad5742b811 frame00000066 +c8d7bfb54a0ad443ec22ee974df57a62 frame00000067 +633dca2d40cb08ec8879b1d5938af63f frame00000068 +7ff50bfc92ccfcdf1be4e4c376b783e4 frame00000069 +95e650acffa2dfad491c4874cd52717b frame00000070 +1128c13aedb6fe92a882049358261837 frame00000071 +a9e3cbe9e38b11eeeea5fd4b0f1c6a1d frame00000072 +b8d7f150d9deaa30cd0d6a170552615e frame00000073 +4e5f471df8282b145c255d363d8c61f1 frame00000074 +a30c61dd7cef72e1164ddf1af521cec2 frame00000075 +0f3164e2f3e80974bb0861592d8094e3 frame00000076 +0d844c033fc8d762d1721bd90b17936f frame00000077 +cac33e38cfa65257c322d49a21f9428f frame00000078 +419fde6759e36907e1ec749f77971392 frame00000079 +a7d85d32a31b8a839c04eea29138952b frame00000080 +8f18acef825f8a377d680333159d7511 frame00000081 +bd4e2b081e486cc284bc87d1f904714d frame00000082 +bd38b6260cdf11d51965b0e0f657c5b1 frame00000083 +ad1e63c4132098eca64d895d625431e8 frame00000084 +18717235480a478f0bc5dcb787c8925e frame00000085 +a35eb3499d4e498bd9efb592c0768a3b frame00000086 +7067ca1ef25ac1df1ada97c973c98df1 frame00000087 +ec5988de75b8d368e3f69434614e912c frame00000088 +8fa7ee8ae2fb2c952b63cfec7d6827d6 frame00000089 +47d597f9fe1c954638f5217394a1c957 frame00000090 +fc837e864c1c97d07b27cf879f7cf4cc frame00000091 +08c3f5e40a275dfdaba292052946d8ca frame00000092 +ef1de464d3dc30ae27ec59936dc2bfe8 frame00000093 +af4d748159bf210f443603d5601959c1 frame00000094 +22b0d4998ff913205769fad8c2a03d41 frame00000095 +9fe5cf054e98ec3b1eb133be5e30e6f7 frame00000096 +e35143b53f31e33c394b51da44cad16e frame00000097 +e35143b53f31e33c394b51da44cad16e frame00000098 +e35143b53f31e33c394b51da44cad16e frame00000099 +e35143b53f31e33c394b51da44cad16e frame00000100 +e35143b53f31e33c394b51da44cad16e frame00000101 +e35143b53f31e33c394b51da44cad16e frame00000102 +b603d6c28b5750510cf41d186f43cf7b frame00000103 +b603d6c28b5750510cf41d186f43cf7b frame00000104 +b603d6c28b5750510cf41d186f43cf7b frame00000105 +b603d6c28b5750510cf41d186f43cf7b frame00000106 +b603d6c28b5750510cf41d186f43cf7b frame00000107 +bc49d4fff4c53dbfb8978fd9cfd33bfd frame00000108 +bc49d4fff4c53dbfb8978fd9cfd33bfd frame00000109 +bc49d4fff4c53dbfb8978fd9cfd33bfd frame00000110 +bc49d4fff4c53dbfb8978fd9cfd33bfd frame00000111 +bc49d4fff4c53dbfb8978fd9cfd33bfd frame00000112 +fe22bf7608eaab52af19e3b6acdf2ff5 frame00000113 +fe22bf7608eaab52af19e3b6acdf2ff5 frame00000114 +fe22bf7608eaab52af19e3b6acdf2ff5 frame00000115 +fe22bf7608eaab52af19e3b6acdf2ff5 frame00000116 +fe22bf7608eaab52af19e3b6acdf2ff5 frame00000117 +449588c9ec429eac07c8982bf1492fe9 frame00000118 +449588c9ec429eac07c8982bf1492fe9 frame00000119 +449588c9ec429eac07c8982bf1492fe9 frame00000120 +449588c9ec429eac07c8982bf1492fe9 frame00000121 +449588c9ec429eac07c8982bf1492fe9 frame00000122 +449588c9ec429eac07c8982bf1492fe9 frame00000123 +449588c9ec429eac07c8982bf1492fe9 frame00000124 +449588c9ec429eac07c8982bf1492fe9 frame00000125 +449588c9ec429eac07c8982bf1492fe9 frame00000126 +449588c9ec429eac07c8982bf1492fe9 frame00000127 +449588c9ec429eac07c8982bf1492fe9 frame00000128 +449588c9ec429eac07c8982bf1492fe9 frame00000129 +449588c9ec429eac07c8982bf1492fe9 frame00000130 +449588c9ec429eac07c8982bf1492fe9 frame00000131 +449588c9ec429eac07c8982bf1492fe9 frame00000132 +449588c9ec429eac07c8982bf1492fe9 frame00000133 +449588c9ec429eac07c8982bf1492fe9 frame00000134 +449588c9ec429eac07c8982bf1492fe9 frame00000135 +449588c9ec429eac07c8982bf1492fe9 frame00000136 +449588c9ec429eac07c8982bf1492fe9 frame00000137 +449588c9ec429eac07c8982bf1492fe9 frame00000138 +449588c9ec429eac07c8982bf1492fe9 frame00000139 +449588c9ec429eac07c8982bf1492fe9 frame00000140 +449588c9ec429eac07c8982bf1492fe9 frame00000141 +449588c9ec429eac07c8982bf1492fe9 frame00000142 +449588c9ec429eac07c8982bf1492fe9 frame00000143 +449588c9ec429eac07c8982bf1492fe9 frame00000144 +449588c9ec429eac07c8982bf1492fe9 frame00000145 +449588c9ec429eac07c8982bf1492fe9 frame00000146 +449588c9ec429eac07c8982bf1492fe9 frame00000147 +449588c9ec429eac07c8982bf1492fe9 frame00000148 +449588c9ec429eac07c8982bf1492fe9 frame00000149 +449588c9ec429eac07c8982bf1492fe9 frame00000150 +449588c9ec429eac07c8982bf1492fe9 frame00000151 +449588c9ec429eac07c8982bf1492fe9 frame00000152 +449588c9ec429eac07c8982bf1492fe9 frame00000153 +449588c9ec429eac07c8982bf1492fe9 frame00000154 +449588c9ec429eac07c8982bf1492fe9 frame00000155 +449588c9ec429eac07c8982bf1492fe9 frame00000156 +449588c9ec429eac07c8982bf1492fe9 frame00000157 +449588c9ec429eac07c8982bf1492fe9 frame00000158 +449588c9ec429eac07c8982bf1492fe9 frame00000159 +449588c9ec429eac07c8982bf1492fe9 frame00000160 +449588c9ec429eac07c8982bf1492fe9 frame00000161 +449588c9ec429eac07c8982bf1492fe9 frame00000162 +449588c9ec429eac07c8982bf1492fe9 frame00000163 +449588c9ec429eac07c8982bf1492fe9 frame00000164 +449588c9ec429eac07c8982bf1492fe9 frame00000165 +449588c9ec429eac07c8982bf1492fe9 frame00000166 +449588c9ec429eac07c8982bf1492fe9 frame00000167 +449588c9ec429eac07c8982bf1492fe9 frame00000168 +449588c9ec429eac07c8982bf1492fe9 frame00000169 +449588c9ec429eac07c8982bf1492fe9 frame00000170 +449588c9ec429eac07c8982bf1492fe9 frame00000171 +449588c9ec429eac07c8982bf1492fe9 frame00000172 +449588c9ec429eac07c8982bf1492fe9 frame00000173 +449588c9ec429eac07c8982bf1492fe9 frame00000174 +449588c9ec429eac07c8982bf1492fe9 frame00000175 +449588c9ec429eac07c8982bf1492fe9 frame00000176 +449588c9ec429eac07c8982bf1492fe9 frame00000177 +449588c9ec429eac07c8982bf1492fe9 frame00000178 +449588c9ec429eac07c8982bf1492fe9 frame00000179 +449588c9ec429eac07c8982bf1492fe9 frame00000180 +449588c9ec429eac07c8982bf1492fe9 frame00000181 +449588c9ec429eac07c8982bf1492fe9 frame00000182 +449588c9ec429eac07c8982bf1492fe9 frame00000183 +449588c9ec429eac07c8982bf1492fe9 frame00000184 +449588c9ec429eac07c8982bf1492fe9 frame00000185 +449588c9ec429eac07c8982bf1492fe9 frame00000186 +449588c9ec429eac07c8982bf1492fe9 frame00000187 +449588c9ec429eac07c8982bf1492fe9 frame00000188 +449588c9ec429eac07c8982bf1492fe9 frame00000189 +449588c9ec429eac07c8982bf1492fe9 frame00000190 +449588c9ec429eac07c8982bf1492fe9 frame00000191 +449588c9ec429eac07c8982bf1492fe9 frame00000192 +449588c9ec429eac07c8982bf1492fe9 frame00000193 +449588c9ec429eac07c8982bf1492fe9 frame00000194 +449588c9ec429eac07c8982bf1492fe9 frame00000195 +449588c9ec429eac07c8982bf1492fe9 frame00000196 +449588c9ec429eac07c8982bf1492fe9 frame00000197 +449588c9ec429eac07c8982bf1492fe9 frame00000198 +449588c9ec429eac07c8982bf1492fe9 frame00000199 +449588c9ec429eac07c8982bf1492fe9 frame00000200 +449588c9ec429eac07c8982bf1492fe9 frame00000201 +449588c9ec429eac07c8982bf1492fe9 frame00000202 +449588c9ec429eac07c8982bf1492fe9 frame00000203 +449588c9ec429eac07c8982bf1492fe9 frame00000204 +449588c9ec429eac07c8982bf1492fe9 frame00000205 +449588c9ec429eac07c8982bf1492fe9 frame00000206 +449588c9ec429eac07c8982bf1492fe9 frame00000207 +449588c9ec429eac07c8982bf1492fe9 frame00000208 +449588c9ec429eac07c8982bf1492fe9 frame00000209 +449588c9ec429eac07c8982bf1492fe9 frame00000210 +449588c9ec429eac07c8982bf1492fe9 frame00000211 +449588c9ec429eac07c8982bf1492fe9 frame00000212 +449588c9ec429eac07c8982bf1492fe9 frame00000213 +449588c9ec429eac07c8982bf1492fe9 frame00000214 +449588c9ec429eac07c8982bf1492fe9 frame00000215 +449588c9ec429eac07c8982bf1492fe9 frame00000216 +449588c9ec429eac07c8982bf1492fe9 frame00000217 +449588c9ec429eac07c8982bf1492fe9 frame00000218 +449588c9ec429eac07c8982bf1492fe9 frame00000219 +449588c9ec429eac07c8982bf1492fe9 frame00000220 +449588c9ec429eac07c8982bf1492fe9 frame00000221 +449588c9ec429eac07c8982bf1492fe9 frame00000222 +449588c9ec429eac07c8982bf1492fe9 frame00000223 +449588c9ec429eac07c8982bf1492fe9 frame00000224 +449588c9ec429eac07c8982bf1492fe9 frame00000225 +449588c9ec429eac07c8982bf1492fe9 frame00000226 +449588c9ec429eac07c8982bf1492fe9 frame00000227 +449588c9ec429eac07c8982bf1492fe9 frame00000228 +449588c9ec429eac07c8982bf1492fe9 frame00000229 +449588c9ec429eac07c8982bf1492fe9 frame00000230 +449588c9ec429eac07c8982bf1492fe9 frame00000231 +449588c9ec429eac07c8982bf1492fe9 frame00000232 +449588c9ec429eac07c8982bf1492fe9 frame00000233 +449588c9ec429eac07c8982bf1492fe9 frame00000234 +449588c9ec429eac07c8982bf1492fe9 frame00000235 +449588c9ec429eac07c8982bf1492fe9 frame00000236 +449588c9ec429eac07c8982bf1492fe9 frame00000237 +449588c9ec429eac07c8982bf1492fe9 frame00000238 +449588c9ec429eac07c8982bf1492fe9 frame00000239 +449588c9ec429eac07c8982bf1492fe9 frame00000240 +449588c9ec429eac07c8982bf1492fe9 frame00000241 +449588c9ec429eac07c8982bf1492fe9 frame00000242 +449588c9ec429eac07c8982bf1492fe9 frame00000243 +449588c9ec429eac07c8982bf1492fe9 frame00000244 +449588c9ec429eac07c8982bf1492fe9 frame00000245 +449588c9ec429eac07c8982bf1492fe9 frame00000246 +449588c9ec429eac07c8982bf1492fe9 frame00000247 +449588c9ec429eac07c8982bf1492fe9 frame00000248 +449588c9ec429eac07c8982bf1492fe9 frame00000249 +449588c9ec429eac07c8982bf1492fe9 frame00000250 +449588c9ec429eac07c8982bf1492fe9 frame00000251 +449588c9ec429eac07c8982bf1492fe9 frame00000252 +449588c9ec429eac07c8982bf1492fe9 frame00000253 +449588c9ec429eac07c8982bf1492fe9 frame00000254 +449588c9ec429eac07c8982bf1492fe9 frame00000255 +449588c9ec429eac07c8982bf1492fe9 frame00000256 +449588c9ec429eac07c8982bf1492fe9 frame00000257 +449588c9ec429eac07c8982bf1492fe9 frame00000258 +449588c9ec429eac07c8982bf1492fe9 frame00000259 +449588c9ec429eac07c8982bf1492fe9 frame00000260 +449588c9ec429eac07c8982bf1492fe9 frame00000261 +449588c9ec429eac07c8982bf1492fe9 frame00000262 +449588c9ec429eac07c8982bf1492fe9 frame00000263 +449588c9ec429eac07c8982bf1492fe9 frame00000264 +449588c9ec429eac07c8982bf1492fe9 frame00000265 +449588c9ec429eac07c8982bf1492fe9 frame00000266 +449588c9ec429eac07c8982bf1492fe9 frame00000267 +449588c9ec429eac07c8982bf1492fe9 frame00000268 +449588c9ec429eac07c8982bf1492fe9 frame00000269 +449588c9ec429eac07c8982bf1492fe9 frame00000270 +449588c9ec429eac07c8982bf1492fe9 frame00000271 +449588c9ec429eac07c8982bf1492fe9 frame00000272 +449588c9ec429eac07c8982bf1492fe9 frame00000273 +449588c9ec429eac07c8982bf1492fe9 frame00000274 +449588c9ec429eac07c8982bf1492fe9 frame00000275 +449588c9ec429eac07c8982bf1492fe9 frame00000276 +449588c9ec429eac07c8982bf1492fe9 frame00000277 +449588c9ec429eac07c8982bf1492fe9 frame00000278 +449588c9ec429eac07c8982bf1492fe9 frame00000279 +449588c9ec429eac07c8982bf1492fe9 frame00000280 +449588c9ec429eac07c8982bf1492fe9 frame00000281 +449588c9ec429eac07c8982bf1492fe9 frame00000282 +449588c9ec429eac07c8982bf1492fe9 frame00000283 +8d8ddfd96f452442330875e1bde9c245 frame00000284 +9e7e46c575e7c62bd350b2fa4ae2a1cd frame00000285 +4485a21c9bdd5c1e8d379aaa24aea0e1 frame00000286 +04482ce7d161a017fa67a18c087ae3a9 frame00000287 +de38d833bd56a8e04a7c183bcd6c77a1 frame00000288 +6b28f26ae7ccc0a4d9097c5806fea949 frame00000289 +f9537f88057bc1b60f72421d908bef4a frame00000290 +e58dc2355f72a56f5cea892f48763cc5 frame00000291 +6415720cb8786a6aaba60cf8a76d6b17 frame00000292 +bb32cf85fb16d39b6d4538201cdce49d frame00000293 +7c2ff1fb4b82c95f79def3f5aed447b7 frame00000294 +b5be09d0773945d61263589d582d1471 frame00000295 +73bbd18864e16816e86bfbb5d8704a28 frame00000296 +0cc6b35c298c7c547f5e960b8b005080 frame00000297 +228d517526d041d7a53d60612a2ea34d frame00000298 +bb913d72c4f46922eb427cd792bec449 frame00000299 +5419c6002549ead46021a42528133e12 frame00000300 +6d9505d39ab3b4f51150b23da4e26cd3 frame00000301 +2066442870c82753ec007d50f2183fdb frame00000302 +9575171309ac2b28a75f2f7510192910 frame00000303 +8e4dd5c5c31a54672e30503f6ee13321 frame00000304 +8e4dd5c5c31a54672e30503f6ee13321 frame00000305 +8e4dd5c5c31a54672e30503f6ee13321 frame00000306 +8e4dd5c5c31a54672e30503f6ee13321 frame00000307 +8e4dd5c5c31a54672e30503f6ee13321 frame00000308 +8e4dd5c5c31a54672e30503f6ee13321 frame00000309 +8e4dd5c5c31a54672e30503f6ee13321 frame00000310 +8e4dd5c5c31a54672e30503f6ee13321 frame00000311 +8e4dd5c5c31a54672e30503f6ee13321 frame00000312 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/KMVC/LOGO1.AVI.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/KMVC/LOGO1.AVI.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/KMVC/LOGO1.AVI.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/KMVC/LOGO1.AVI.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,315 @@ +4c74a2ef43894175e2fed3c2415b7b54 frame00000000 +4c74a2ef43894175e2fed3c2415b7b54 frame00000001 +4c74a2ef43894175e2fed3c2415b7b54 frame00000002 +9de60a2f287d3a3fcfb913419d0615f4 frame00000003 +e605413207381589568511b2aa21ed1a frame00000004 +eb1493684c749abbc33a8c72e7831ea4 frame00000005 +6ff7dec8e52c014104fceba895cba44f frame00000006 +94d026e327d4066c5524a3269f5d903e frame00000007 +db9fe9d0b02c23366d300937ac2944a2 frame00000008 +aab96d9918a667c691f2d73a2b07162f frame00000009 +4b13c2857ada1a2b33e08eab860fe0c4 frame00000010 +7133b19ed2da4c7089286ba998791abf frame00000011 +ad88a7abb6fde79d5d133df3796bc7b6 frame00000012 +599dc177a0113c36e6cb5b8e2d99f2fd frame00000013 +08363841880da1e661b726f95e6aab8b frame00000014 +90c8d3d38ab54b23e4ca0e5ea42f8cfe frame00000015 +0c34a5d97d1ab03e2e4a47c6a25f5a41 frame00000016 +0aebf529364043a99a72477eceaa67d3 frame00000017 +3c4e294838226e9fa79f43ebe4f87344 frame00000018 +6e26eee62ed516c3c8bd66dac8d66295 frame00000019 +31aff53133de568eca399e0329d7004d frame00000020 +b862aa24d8b3068b77b44495c7943032 frame00000021 +3b8266d00779b57da1a7a2037cd3365e frame00000022 +630955c69f07c56c347d141bc880e9d4 frame00000023 +c81d0148d1f6e0e4893f360ee1f8e585 frame00000024 +fdb349cad5128fb13798407adabf2d7f frame00000025 +99cd30d71b0f34d1fdb742968287573a frame00000026 +dc0476ce217258c3bbeefaa12080b386 frame00000027 +ca2306f781b7fd33b50733554426452f frame00000028 +4e64f5ac34332f4cc817f589d317defa frame00000029 +a21137f471cbc7208f5566840a32fb33 frame00000030 +eabaef67e83c60c2ffb57bb025c784ee frame00000031 +579bceb8ccc7128543345797363d0bb6 frame00000032 +d2c4144da660b0b7007315b530833962 frame00000033 +2554227675c6725dc8b1dd0adb49683a frame00000034 +1fb7ee6344e0d4a568234c89ecf16d7f frame00000035 +98e751f06a1ae75e46d0d456334ae63c frame00000036 +f43ee0fc2949e5a30c381a21f8061aae frame00000037 +1473731234f7d1dafa3f4c63ef177af0 frame00000038 +93fd0933c8679f5fee6a9442d8781899 frame00000039 +61798521a325aa86ff9bb2eb21361619 frame00000040 +3dbe180be1f5a5e9c034e441e81c79bd frame00000041 +0f6f6c5fa6e49941b56643f9309b9c24 frame00000042 +c804b0a29d7a886d253284dd8062c3b1 frame00000043 +e4f8bc6c8283262f03af309c1a152401 frame00000044 +e33cb3f3f125aa9c24f2f4c4279a6fb2 frame00000045 +a20c0a107c48b9dca7edb899c523dec1 frame00000046 +113c7fbcc84e33eb5bd778d7ba06908d frame00000047 +10566e946c690d4cd8d40430aed3defd frame00000048 +8a603a9444b1d7e1761af5eaf84bb3ce frame00000049 +abb8f5287ebab9440b30f8fb58dbc0df frame00000050 +68ae477afcd96165350151f752828c80 frame00000051 +8cf3b50f940bd11c59f3fcae95459662 frame00000052 +df1187b7a2fa18a19470b4215a748049 frame00000053 +f1302a2595b1bce0217fd1d9cf85309d frame00000054 +0df8d4a043908d30639631521842edbd frame00000055 +d0548df696788ef0fa31f0734c0e9d26 frame00000056 +3395feba39e5330d28ea0367f80940f9 frame00000057 +12c8314c22882920a232fcdb18c8fb73 frame00000058 +7ea4e7dc21ea569f8cec67ed7fc0c5e9 frame00000059 +16c417ea3b55854ab6dc4eeee2b42b23 frame00000060 +29334b211f06bdec87b58f17294c1adb frame00000061 +18c42eb39bda2b1a28cd29a3afdbebb9 frame00000062 +9cff9700a686a5bfab3d6d175dd3127e frame00000063 +aeb4289151928ee5deb790a1e31f1f92 frame00000064 +73eccf706b42916e7acc808e0a0fafd4 frame00000065 +fb841caef445d9c233061455007c10ea frame00000066 +6547fe77eb1aaf0af1a696ae4f29af58 frame00000067 +ec7ed306df5ea07527c5a8c5845d1464 frame00000068 +f45792cf5063b1807174c774a14e6442 frame00000069 +bb11d37f4ad18ea012b96c7e6801745b frame00000070 +2005b4ac9b8baf99a6903068337b27f9 frame00000071 +40ff2fb10935ba2c1d258ce75430cd03 frame00000072 +2a66c35b5369bc860cb8d83c1a192172 frame00000073 +03e0f84fc06b2be0d7f9ea2a95367f21 frame00000074 +15d4553c3fa9b02b1c8ff04e5c3dc396 frame00000075 +1e3a6f0a3af46f91ca61bcf58506e35c frame00000076 +92b560d34bbdebb19a19dc3c36045be6 frame00000077 +9b0104119c131e3ace7ece71fc0343c8 frame00000078 +edc2c4850499ef3bb9675d7775371c8c frame00000079 +c94a31c4ecb5aded83187c65773ed6af frame00000080 +a0083cfc23e13ce7a5b026fa807df843 frame00000081 +8048650307b477d04ec2fac22d52f718 frame00000082 +7221c3575dc90228f2ac075005974a92 frame00000083 +aaf64998ffa8e0763afb7f2c872dc51e frame00000084 +a36b1c721dedfd37f2803d07212ab079 frame00000085 +bf1b06e97a54482663fe0bcbca731aef frame00000086 +f16d1507bde44a2410206a40ebf1fef0 frame00000087 +8485623a6ba4f35707d6a046d094859c frame00000088 +e38583547ba1a0b697e7ac0f99e47069 frame00000089 +78742c4474fd917c61270b13a3c8021e frame00000090 +82036347253297c24c7b909cd5c6a375 frame00000091 +88402e920d3ad998026881b3324df992 frame00000092 +92cf97b16cefef63833715ddab4bdc72 frame00000093 +948bf1bbdcf2150f5f800c88e85684a9 frame00000094 +1bf64d8945ea0bdb52d169034ec53c18 frame00000095 +af577aa6c4eba1312b7104644552916e frame00000096 +952e447a9e14bf849fd49e4f59205cd6 frame00000097 +b60b6e7db9770c8981c6311e415f1565 frame00000098 +250e5a0e7d9e193041ed5dfc22e219ae frame00000099 +4f4753176ea1a34de68e4ac604949396 frame00000100 +b1ce66a56603345443e6b227a2a62ea1 frame00000101 +dc5d900d2738a2580ed6a6ecd79576f8 frame00000102 +7cc2ff7114f8632333723153100a3775 frame00000103 +bf64fd00e0ceff7667acfa8e0916cfa9 frame00000104 +405ba8c95aaa08c1cef3ef27adc62d06 frame00000105 +09a5c7e74b88be34531fb191d94b2713 frame00000106 +6ceeb0b6eb7f4eabcf5fc365a8c92528 frame00000107 +68f0efce1c70aca52bb4349b7909fb85 frame00000108 +40da987e119ac6a3c839751290d823ee frame00000109 +15288829603392f6d8d56d6eb82eb527 frame00000110 +2aad2c0adcb7eeb51aa7934ff6a09915 frame00000111 +96ec46bea832836e534fcb2a7ea7cdb4 frame00000112 +a678baabb8ac81df5d27c2ebd58ca534 frame00000113 +ac6a098a408a8b8b2244d46693ce3e65 frame00000114 +d9779b1422bbfc00e4ea21dbef0d0e94 frame00000115 +fe0873a8e44406d9bacad8dc3bda5f68 frame00000116 +319fa25cf290967cbb4893d4995b94f1 frame00000117 +f27c06f290a195de8a8cef072f70be22 frame00000118 +26c5293ea764a59f0a45ea3266dfcccc frame00000119 +921127b7b15e0444f514b1d741dff567 frame00000120 +f4ae385540e8449f768e2f13662d4fe1 frame00000121 +686062d9fa4721fa0db474557cf6f9ec frame00000122 +f522b509f2589b4368894c22dd116974 frame00000123 +55082eccf972af97048032faf7797a06 frame00000124 +73e0d71d2480836380fa8a43592d3309 frame00000125 +f02ef219684c49399d8394f2d5ab88f3 frame00000126 +bac2db7e5b72f1c7dbe5a591d91d3aa0 frame00000127 +419e52e9c2ebff4e0f1a3c090cf6a669 frame00000128 +798a5a1235e8bc7ede584af9e1089999 frame00000129 +2126657f9cf29d1d2b3598a2494c6107 frame00000130 +144544bb4cba0b6fc678410adb04f0ae frame00000131 +260d5805ce165943f50f15893498196e frame00000132 +e84d4ab4d7454f69c2c9993379c2fc07 frame00000133 +8c4cc3d011cc7252e56edc8711fb0e04 frame00000134 +9c928f9438b25199264b73f0117b0585 frame00000135 +1e3a1aea1aca391d28fa737d8e60c0f3 frame00000136 +3dfc13defc4a0edcbe94885e5cae6950 frame00000137 +722626561b89900696793749a5afec15 frame00000138 +8f8303c41913b597420ecad358b494c8 frame00000139 +353097b43cb50333afcde0c117b763ab frame00000140 +90b7d6855ccc2b2fb7fd84b408ccf1ad frame00000141 +1f3e918d4e7548c0b3607aeeceeeffaa frame00000142 +33e6b58f8e2fc241dd961bb694e08852 frame00000143 +2692daee132f1f9fabb999aaba2a75b3 frame00000144 +4829c57d5f08883194a17fe03a58cdfd frame00000145 +9f47414ed77fedc11956e97a20a8e24d frame00000146 +fc91408e623fd25f96a55093c8afb5da frame00000147 +4a332bfad6d524978d849532b45f8398 frame00000148 +ceac4378c4f5affbdc123fe2b0ac9563 frame00000149 +39d76534b7af3fae28cf0aef0152c3f0 frame00000150 +246b9135da497e92ea36900218dfca70 frame00000151 +88b0369f7458c61f03a496f2818cfd9c frame00000152 +87b3706ef84d02887a90fa76d2fc5bdd frame00000153 +98a6eaa7eebb2cdfd163d5f1ed63b437 frame00000154 +70f080a9a88f63358d30a82d742e94c7 frame00000155 +99ca5962097f0f5f8540c473fb8098d8 frame00000156 +f041357c6a096b914f2631898013d375 frame00000157 +f95bebe8a7cb280d24ca3b13e59f53ed frame00000158 +093bd30a542f6834c7178b542c5fb336 frame00000159 +8dc5a01f3ac0aacf48b5aef70d271b55 frame00000160 +fa1071ee6310176c6b80d60f1853bd83 frame00000161 +8cb827f12e3229f3a54c2a9bbacb6fc2 frame00000162 +2fcc6810ebe0c3219729259e24984452 frame00000163 +829787c70898f2b3d5d7b7aa23282740 frame00000164 +01601302d2524ae90fed878b710c01a3 frame00000165 +b5ec01a08efa03d4c14609ee7b5a7fe4 frame00000166 +abf56a633c2c9dfb081035eee14ad279 frame00000167 +2089cd6cc27a5e8a339a37e6144e8c60 frame00000168 +5a82c583058b59763622d87b66b40231 frame00000169 +9a5c3c56cc59fd5971b5247e5d8e6625 frame00000170 +774e64f7edc83211588f45fa2a5b991d frame00000171 +2ff5c95e5e759fbcb9771e9e3476dce2 frame00000172 +54afa066282e41203547a59df01ad93e frame00000173 +1607e9f03499480827582745c566daa8 frame00000174 +7252775cd14bf4c1736234d055597ee1 frame00000175 +e02a417c3cbe7b48ed0ac912c90f6d25 frame00000176 +e4182f6956299fa92439199d41fec60f frame00000177 +6ea246b0eb3a0a62345100af2a6797a4 frame00000178 +f5bc71a659b9d6f03d042731c68e7c96 frame00000179 +d094d982ce7272505ad39783131f6bc3 frame00000180 +9c4778423bf992a8994b16e6d040dfb3 frame00000181 +a16db5056dc1643c6531bdd4b41f508e frame00000182 +5718773463ea3ec0fa701a18f5a76ae1 frame00000183 +ffa56a7cd9fb584ed62c941c3f9204de frame00000184 +ebea43c8a0f16d39eee08574c382397d frame00000185 +2a8583033cf43e7a5706fb1428de5b2b frame00000186 +de8ba7ee98d084ca39d6a46ceee7ea5c frame00000187 +6889fdaef4136c7057317497ceff1dfb frame00000188 +3e133643f1cebcb4fb079a6d6c1e7ade frame00000189 +68592d899bbbf07b8525ba334587b941 frame00000190 +60cf51f7c2aa6916f179128dc0d61bf5 frame00000191 +464bf6b29cf8a4981ba3b0838525c7ee frame00000192 +f04004d57e9c8ef2b4bac53fd5c03504 frame00000193 +e0e297bfd4309c1d7541e52dca428f9d frame00000194 +bdfaf501d336b77febb6f92e03bb9896 frame00000195 +79515d51e1d29be53818804ac8178019 frame00000196 +7b6dbb9f756f865f897b54f83825a4d4 frame00000197 +d891725b20f4267e393c121410e304e4 frame00000198 +6c3406a15a1de475677e3039a72c5626 frame00000199 +ae3eeddd1d75c95bf5f644e2b0a32307 frame00000200 +d79a5418e9d564f8e5761ae71e3ceff9 frame00000201 +a4d87d6e921b29fff9db8af574ce7b7f frame00000202 +771c8565549c81118b99bcdfd63ffb4f frame00000203 +b1397c167fa8cc6bd60ffa78fef902f5 frame00000204 +cfdd8a60614fdac058206cd45edbdea9 frame00000205 +74fb2ce381e83b84aa40e1ea197dd960 frame00000206 +f6dfd6abf05534f502fa397249da44fb frame00000207 +3c9d0088b1297533a406fb8c559d95e8 frame00000208 +326c9d1a20b846c88eb0a3143201c89b frame00000209 +a5e43ed9b5f053a0c7da378ab75eeb2a frame00000210 +93b98bc27b30aa1c36d832aa82dce85f frame00000211 +33a3038e8cb47f3331836fb6b3882357 frame00000212 +fb2506471a64312fd5f47c656a2b08b8 frame00000213 +8ac38758c6634858f5a476c1a3aea74e frame00000214 +8444e1acecf86784cc5f60a2e5ae7f23 frame00000215 +658ae7e713a28b4c8fd729846dce2a25 frame00000216 +3bc4d215429548439e74b308c8d80306 frame00000217 +c87de7b128db22071c7fd133a9929018 frame00000218 +1f0134ce5796efbfa37565cead3b2bfc frame00000219 +b9d0627e7a1aaa9e3d54757bbed2e7a9 frame00000220 +57059c41b32cc6c3227d6103f468d4e5 frame00000221 +8c9877fbfcfeadcb6e50e57548f50c5f frame00000222 +13ae51e58c477e0c314c22e72c5b4b51 frame00000223 +9471a9d52be7055bef8c5c55db225103 frame00000224 +d70ebb842afa4c2d883bae79737b35ee frame00000225 +4ff8314dc897a2a3417a071cce0c54aa frame00000226 +7652c4f59f5eda7df632847c8e9e9d22 frame00000227 +24b456735896334e169223f6d6764fd6 frame00000228 +21be4dd036595de997b7b3baaf2fee11 frame00000229 +55e68591160458f63892faf1cd2d1738 frame00000230 +2b2b8e8001145fba3321f421295b45b4 frame00000231 +226f7edf7f700be8d8bb67d805464ab2 frame00000232 +00fbcddfcf34821af61282be45118753 frame00000233 +c05ce6a9ef8624bcd19c90d4c44375f2 frame00000234 +15aed9414a55f8a6e0fc44148b50601b frame00000235 +b1a0f23126acdb82b2671fb9cee3a608 frame00000236 +66ae005494a8ec0c18567e90c8adf3f8 frame00000237 +85616921a05bcf7c585f70109a9f492b frame00000238 +10fdedd9bafd15b0ed04f0680fc64c2e frame00000239 +921028b8ba16469daf6cb89d7d72b88d frame00000240 +8d43ba7f2301749d65c73a2dc22a0d55 frame00000241 +5473fda8458251b658a332865c8aee3f frame00000242 +6ff3e0eb5f67f4bfbfeff453a79abe8d frame00000243 +02460b09eecc84107612f6d9269625de frame00000244 +aa0dcb2258ea14a0309bca0d6e36fe82 frame00000245 +ac85aa167b0ff647534c1e2b576add46 frame00000246 +72d7e2a35ba31fb18b25bb070dbf765e frame00000247 +019209f85f0ac287b211ace5f34ede01 frame00000248 +b84862820d23b40a50f2719f96f46cf0 frame00000249 +c3fbb8f1cb9869e245637c775249d7d5 frame00000250 +250da449ebba4a7f4772b93022e23ce2 frame00000251 +04121530bee2c494799eecea22e14d1a frame00000252 +a5e47768761a973034c144a18d917664 frame00000253 +19962bd1e850f0950743fe5a3d63d20a frame00000254 +63cc28d9647a7497d47449b22c0e6870 frame00000255 +8cb3c4fd7516d63e8377e00541c62680 frame00000256 +d475bcba6d7f13f86e89f6387a2f95a1 frame00000257 +77b08e43cc37b93bec9ea888793fe272 frame00000258 +86294f71669fa083b9d2c66563203a28 frame00000259 +b373bf45276df813166b7e0d877e3415 frame00000260 +66e331793a527a6402aa3aaf35fba192 frame00000261 +93b97ebf74667ad46237c4cc202890f4 frame00000262 +c52ee35f1c6ff80c9521f836ff4f7708 frame00000263 +9231ee07bd25f9c39ef9a12b48f93472 frame00000264 +7952995c4b321120149c3250d81db69b frame00000265 +09e6180c4e3a183f732df5d1c35bd4b1 frame00000266 +faddd552bfbe7c20c4a89f5ce0d1d7c2 frame00000267 +2dd0e061f9aaa1a13d9f98747da9f530 frame00000268 +91b552a4974caaf21c8a68c1a2c6ae25 frame00000269 +75ad98623dd0fd682e2846b712e5f1d2 frame00000270 +2426434cae803fde555f90f1d3192495 frame00000271 +5c7198b8be0274721808cac6c7f3db26 frame00000272 +b1c4e50d33ad43e85f9451fcf17a8272 frame00000273 +49bf92108c7639d25edb0100f7b6f503 frame00000274 +d31c12286d667d3b9ff630e4cdae90f6 frame00000275 +f516db03ee2c99bc4f49b96c047bb0d1 frame00000276 +37b239c1cc5406ebb50a2d76eb20a6c7 frame00000277 +cceb1665c12531278f91adbcb9d9270d frame00000278 +70f96d86d1c5f252705c4d959ef7016f frame00000279 +436ed8711696d7b323adc22c4532595b frame00000280 +77e5e25b71a75012cf750b34d72e910d frame00000281 +0c8b2758750944a9a6bb90d4bec7da4b frame00000282 +eabd70b31dbc29da4ffbb9eb2301b992 frame00000283 +b6de579cd9cb1c49de1e9fb2027fd6d6 frame00000284 +88a1203ef21adc57e2a818d17edc3926 frame00000285 +54d09af69aa5650eeadf5ae19e4106db frame00000286 +afef050532bed9be49f8e1279e7b2bf8 frame00000287 +9802e767ee8a0fa1ac7b82f713819127 frame00000288 +4db3dc19446866fb543a4188b2477909 frame00000289 +6e0bab26e62979f9c10681b7ed8def79 frame00000290 +9e6419e795e8ac3d0c2517cf5388ab43 frame00000291 +94fa2c9d9a0297f07d3a36c2104560d0 frame00000292 +39278526b4a46af84a911d9c2e650ef0 frame00000293 +682ad44038a105add80580d0cdc88986 frame00000294 +d98cc1f8b9c655a892f8d0624f98c76c frame00000295 +ef23d6d76ffd70959026a25298622437 frame00000296 +558a1070fd1bde6dddfdc0a2bb49388c frame00000297 +d8a593d82f7c7c7d10c1bd134d461b6e frame00000298 +b180c7a49436233ea828424fa8fbb0d8 frame00000299 +22bdabd614b70b9a93be85949970c250 frame00000300 +c2899d024a566b437ed267ebc062f756 frame00000301 +2038a8e193f16c5d1f2f56e61ba30bac frame00000302 +dcecc3900d9cb641f405d2dda5455827 frame00000303 +1ec042e52bd437a02fe26d9b86b9589d frame00000304 +ad8295d3c1eb634e4939ebecff3fadd6 frame00000305 +e2fa116e21c3f5ff606c1d3b936570b2 frame00000306 +f0bf756a276cfbda529f2c1cf594d3b5 frame00000307 +7c614ef0029cd4b545e670214e469b65 frame00000308 +7714ad13bc9121ba9dc8d411f1f558fc frame00000309 +6c8d3752cc1e232a4b24e8b66c861790 frame00000310 +1044fe3e9cb5ba24d13f1d20e381b72c frame00000311 +228349b96a562d29c2a17bbfe27dd9e4 frame00000312 +7ff606025628b5373e41475b850aa43f frame00000313 +4c74a2ef43894175e2fed3c2415b7b54 frame00000314 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/lcl/mszh-1frame.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/lcl/mszh-1frame.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/lcl/mszh-1frame.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/lcl/mszh-1frame.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1 @@ +781e25ae42319fb1a0ba1a7f51db3350 frame00000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/lcl/zlib-1frame.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/lcl/zlib-1frame.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/lcl/zlib-1frame.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/lcl/zlib-1frame.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1 @@ +781e25ae42319fb1a0ba1a7f51db3350 frame00000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/lmlm4/LMLM4_CIFat30fps.divx.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/lmlm4/LMLM4_CIFat30fps.divx.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/lmlm4/LMLM4_CIFat30fps.divx.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/lmlm4/LMLM4_CIFat30fps.divx.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,418 @@ +a60cbf0b4d7e0d9251684e23ccfa0c9b frame00000000 +cc0ab4a599facac5aed45c2c6bd8da4b frame00000001 +36ae8b4a1e72c573f7549426f5022647 frame00000002 +5a1a22f7cc033d71fa2731817eed118e frame00000003 +0bfc1e1d62007d21711847faf5b32774 frame00000004 +d1e48a30206e1651ba73a1d8921a8b2d frame00000005 +6abde1c44a3f605fa9b9b6c91e23dc5b frame00000006 +cbdbb3c653d477a50cd167539e695bdd frame00000007 +8ade5c1de8b41cca38a485f1e9628872 frame00000008 +8975020ac92e97b7cbba0666a9164355 frame00000009 +b4a7a1f7d1432ff430e6d49a8770eeac frame00000010 +508fdd092c1ce307968286e5c7a628e2 frame00000011 +967a971f1a3179592d7245db5cc5fc9f frame00000012 +7bb6b602657a4d942295a3f3c02e047f frame00000013 +6cfbf11cb6971e41958451fcec6899bf frame00000014 +323da4dd029fdc27b0680b5322a858f2 frame00000015 +0638828b9be42021150aae297b1274e7 frame00000016 +35498883c192c1a46ca6d6a5f756b8de frame00000017 +dd14269407781be769f2f442fb3b7c6b frame00000018 +73c41561d073073c3aa30deeac6d2412 frame00000019 +3391412c12e2c3cd54ace385e43c7104 frame00000020 +c5ef14649a75a9aca4ddb2b3358651e9 frame00000021 +ab6434f4c2a514a3063bef312383dc4f frame00000022 +a468eb1797f7f653a3eebec385f2ceec frame00000023 +0f4a8fdfeb1dfa32de990da7580c5249 frame00000024 +1b4b1100686cdaeec1481e5269e1a4d1 frame00000025 +efdd0a7873ef9a64e3afa86309082cb8 frame00000026 +bb07b69e03b567b77cacdc355c641e80 frame00000027 +2482ad87bbf9b88cf26d088314b05ab0 frame00000028 +70f56fd02de33fb0614aff6c9e586657 frame00000029 +beacf6a0a530d36daf2c3f59cf949571 frame00000030 +25fe923085fb317c53c5bf52cb520914 frame00000031 +07672bd35f520d4449cfe359f9b152e7 frame00000032 +e53788a00ab217ad5feef3fda1266015 frame00000033 +bb12a46be834d00d5870afe75e506cb0 frame00000034 +2ee9bb313f5f16bc973516700b83fdee frame00000035 +334a90182d7b1427a670cb02d17c9304 frame00000036 +dd2dd0cbcb92584c86665df0f4664004 frame00000037 +9d8159ee1ee02aa5f31d01daff74462d frame00000038 +f81ea7cdc37b5fb7ff244568c930e1db frame00000039 +c7d9345b3577bf89f805691f2c9767d7 frame00000040 +45357a2a120752f66a105352f2ac3933 frame00000041 +00bc484e545063581c3f71166326fffb frame00000042 +bc8c0bf364cd39954ca0a28984967ae6 frame00000043 +a1b1b3af460924f720ac7806d76b28b4 frame00000044 +c57886a0f79af30138bb526bc05cae11 frame00000045 +65170d1bf333bf4d6ddb509cf2d9809c frame00000046 +5ac1222161cd6117767872939f359aa3 frame00000047 +d4a4933ea92ddcd59383bbb3f25285ef frame00000048 +a0361e54700054de8b090f522e96d85f frame00000049 +725f0acb13d58dc42ead816f60c23a94 frame00000050 +d83a4e3682325cf0fcfde4d42ae9351f frame00000051 +d3d355f32d4aea4f0343a7572b140964 frame00000052 +e12274a264f717ea49ff4dce7e37c794 frame00000053 +3c60a962311e46f7d25169f2c48b3077 frame00000054 +cc6729623912b5f615a84ed1f92b7796 frame00000055 +2c136495b58786c123fd0dd1a897f385 frame00000056 +4ad6280c878c7c00ff66f35673fe79ed frame00000057 +f1080801294de27347618adb3f1de274 frame00000058 +84ce4af9e4053cdca4e4c8e6ed8ecfa1 frame00000059 +5c906b7fabd97d9fbd1f1f829beadb0c frame00000060 +763256c2c8af2cb223a008c0f499964d frame00000061 +83ce852f8eaccfea01ae8aacf3b30b77 frame00000062 +19b726b37418fa0b3fa99029289b99f8 frame00000063 +a55ecd7f338956ba69d69dc1773bd924 frame00000064 +caca33b8a98ea3ff819b30b145d60db0 frame00000065 +e30339360c1f8f244f9af10384a7d603 frame00000066 +5acac7f40b345af17001f9bdcc0f2a9c frame00000067 +91bb92c83eaa1035735d308d172644cb frame00000068 +315c61e850a864e7f323c91f46fd5a0e frame00000069 +d0a1a5e7e54c106a35da9d7a4f509dc9 frame00000070 +32c380087a6edee3326c5a331ec7d00c frame00000071 +c325ebb7a013611d9451a1fcf1d62f35 frame00000072 +9597b723af83bd47cb6748ffc72f9b0d frame00000073 +c0eaed168f3466bd1e5da76ba2365dfb frame00000074 +3a499d508f1af77d0adb50b6d9c1cb7c frame00000075 +54d454a0960017356c6c480a76a0a221 frame00000076 +eaac6ba9344a5d2965f79a941823e649 frame00000077 +91035a6d1275387ff95fc8eb5508faa1 frame00000078 +541d282846c3607bc8006d0f31661bd1 frame00000079 +da473e557e054ff4d22466a0ff0112e0 frame00000080 +2fe680a9b96c0f88f23190003ee41245 frame00000081 +9e10c6c4ebaa73f8438741558b214620 frame00000082 +f41548117fa2d1920028a68cab4feb82 frame00000083 +5fd14bc9c78654a7768c7a9a1d201d09 frame00000084 +aed47953d6680c5622578463133431fc frame00000085 +6b264efd5779a077ffd41795a790dd71 frame00000086 +06790d4d6fc38ac97a66bb0297705093 frame00000087 +8634e8180e64bb30db8bbbab008d63f5 frame00000088 +2c22de7eff916dd4b969bd858050f57d frame00000089 +e7f020d42a7b3b9d58848e8ed8025ecf frame00000090 +902bcd166db47025f675098e80a7381a frame00000091 +306737167f85a5df2d181be15c930007 frame00000092 +5887da2d34bd3683ced687bb7ba096b5 frame00000093 +134b1fbda9efa22c4578795c8172656e frame00000094 +44182167886cdf1573a4d907ffb60e28 frame00000095 +94052955d4afdca5a517bc228d786a65 frame00000096 +99d3891ae61ee87894205140d1abfb14 frame00000097 +fd69564dae5e835a4e5e7600e83d6371 frame00000098 +100e5e9577dc1b0d21892d4ec982e278 frame00000099 +1ab3627c7d596cf7a6c238041fb5cdae frame00000100 +9aaad0f1640ed91b2e55330ab650dec7 frame00000101 +42933c1893ede93b61c53d686557df1e frame00000102 +12ff8a528cf7139c20fed60ecad6ab9a frame00000103 +f92cad8e5925cc494adb51d2d0ff2058 frame00000104 +9f99348df3e7b024495b02f48e4c6d83 frame00000105 +8b550c738ffb538f40c46791feb8adc5 frame00000106 +06781415f139adb9eca64ab60fa2cc90 frame00000107 +557f3fbe32d38685087c97691129ce57 frame00000108 +49b7fd0856e4d29a104071e2941085f8 frame00000109 +91ab62f76d98775197c942e836ff894d frame00000110 +5552fdeb7fcccbb46b3e8f194bab2d88 frame00000111 +39012eff18a8ef4deffa0633dec97f5a frame00000112 +38e0dc412930eab7e6e6c1b51e3e4baf frame00000113 +407c05841c0965059732928931e9e6d1 frame00000114 +87b0c27282413501ee7ec2aebe08aea4 frame00000115 +b1bf8de7a82ac4fe77cc3bad1b0a5794 frame00000116 +c702dd3e7e2b23af2902d1e690c2f2a0 frame00000117 +ce3a4081ebe11ca557dd8cc541338696 frame00000118 +1e04b0f3e136033983e5223a3e7695d3 frame00000119 +a0bd056570e625bec7cc610cf7a62210 frame00000120 +5883feb31abdfecc7dbb35fcba0289e7 frame00000121 +8517f5d373b753357e1ac45d2c4ef8e1 frame00000122 +25c5f46adfb03c2790f3be883eab3323 frame00000123 +e8dac7d2b6ba1379a9056df423841116 frame00000124 +84d8e31fa2f286360510faf27d59ac3d frame00000125 +19a8bd2dd98acbfeda65e3d6f29e833d frame00000126 +a1853fcf38f4f78c0056743e60c9b94d frame00000127 +d3ae136785fae662b8865211f25b2aef frame00000128 +6b0580ace41a95c565839536dd985305 frame00000129 +5b98c4dc00fc5e067b73e27022ec5eff frame00000130 +0f5bba07e932745e9856fbe671700de9 frame00000131 +5ed07dc739c9c98a695d6cf071ed5eb0 frame00000132 +27029640af4d55cf7307cdb54274c5de frame00000133 +344c664300f6ef619c86d08525202ef6 frame00000134 +060a0badcdab3a39cc8b5483b78f3650 frame00000135 +2da9af2fcf63a1af5d04c179c23fb580 frame00000136 +7c31eb55f9d5b066c4708ce1c7b4001d frame00000137 +416bd251d0b19e23a079a9c6491373eb frame00000138 +bf07ff265d8042218b054ce7ca9d189c frame00000139 +3c4a229d175bb8b71342c26c3f91753d frame00000140 +f816eca05868f920a62548ee4b459e76 frame00000141 +d2a880dddc005fb642c8170ae9615645 frame00000142 +053509575c67833ce9a6769c845e2a9e frame00000143 +6ef537c41bd8177a207a26d3a89a14a0 frame00000144 +1293924e5e01cf23f489236619402862 frame00000145 +2f724d37a42bc02e7adee6c10879d21b frame00000146 +1614b82a9a2870c0712e38fdc85ef03c frame00000147 +6beaecc1a7333d50dd710ae194eb8fab frame00000148 +81496af3c55603ed1c2cd2609beffd75 frame00000149 +e37d0a3d399a9ca7cbe52d0834d4fbe8 frame00000150 +ede504908f28a43734a0a26fb5181dab frame00000151 +a4c9a02b24e8a21f8a583cc24561b39f frame00000152 +84f83c438288140bc781a0f50c25e8c7 frame00000153 +dc49d31e06d47704b8f4df65418d0e08 frame00000154 +ebd2eaf5e054fa8ff60a61d1b2d01a7c frame00000155 +0803262f9eec6a25f1b69c25271e204b frame00000156 +50e2c8cc3b7b87a2ac3a48f3262bb2ce frame00000157 +1fe7fe85f72a4f6525ae114110ab0ad5 frame00000158 +09cc28294df837b46a8bbd952a119937 frame00000159 +b09e779216c94f6707750849e31e1c57 frame00000160 +b2aa45016cdb0b16afe854efdf118f4e frame00000161 +e724a2217022418d7c48ce8852bf1997 frame00000162 +d08f13c192c202492b2f309f326c731e frame00000163 +e78e7368a90bc4d38146a7b7901d9635 frame00000164 +1ab441f9fbe6f075c2d2f40c86ffe8b4 frame00000165 +80f6888f597dab52e0b81c9fc7796581 frame00000166 +a64eb264af023ee25156401454e05f5d frame00000167 +47978c4bf14fba792327bba6e4cf1df1 frame00000168 +ea9c2e8f4c09ee720f5f8ef1a639f669 frame00000169 +00652564ba32b239b2a9435e358b9835 frame00000170 +946e5652a7f10feb046b2dcc6e67db37 frame00000171 +cd6d1993e8838f68211c24626c9cfe38 frame00000172 +d6bfaacd554ac9e374c67eaa2c6b6eec frame00000173 +2f482c58c5013bfe4e0ff87632b6a598 frame00000174 +2b05c114d1e3732fce36904dda2ee52d frame00000175 +0fac175c1916529343b8b7912085fe8f frame00000176 +c6ecf6e47c55ae2e77a3683a7e842ee4 frame00000177 +2d37bb00ad76a69241a162f6b90d7539 frame00000178 +d4f9d22cbc353452834de1bc717ff350 frame00000179 +705d20983dbe0d94dadd8e799861862e frame00000180 +c5ff765d5c3169ceaac0f9fb252e5362 frame00000181 +9c0af8b198a1dbeb77814920db77bef0 frame00000182 +8046018cfac6928324e244ac5496ea18 frame00000183 +f7fc5afd0e755c9502ffcbb4a5c07729 frame00000184 +4a9a08aceeede19429eee807f327b56b frame00000185 +d2555edce443db516742c8a83a13d524 frame00000186 +0b02753f164945dc1d975c07e8054dd1 frame00000187 +253227b0b2e9cd3891ead50cde6e2b5d frame00000188 +75383f064d5c016ce7eb72da1ffc1ace frame00000189 +2834cfa3d67be2b014471078e3625d45 frame00000190 +daac7f53d0b1352138fb098c1044afe8 frame00000191 +e54c25ec329ca958aa4a60ff06844682 frame00000192 +3a2dec0f404b96e885ef7c61552fcc7f frame00000193 +d84ba3f1cfdc835e4e78b346c185d256 frame00000194 +2033b1031e09a5a4cb5982af3c34ee4a frame00000195 +b69adac891b31a104a3a20fc08e9dad1 frame00000196 +e4bc13984a8399a68c0ab29debd83776 frame00000197 +f7d957705b4a214e4ce4846247c9ff28 frame00000198 +628be952bdb6b5070e2a4555f3677cde frame00000199 +88c34f0610030ffe5d87821317c4af6e frame00000200 +5cff4f5dc57251feaba39f0d8ad4a4da frame00000201 +d56d0bec83846339a2f708b6ef9564b3 frame00000202 +0eee615725814fad546d32bf9c1b7756 frame00000203 +0a38796f4b40f17c00ce5866f6cf55f6 frame00000204 +1d6fe815082a7ab1cead065204307536 frame00000205 +6067595646ad6b9616750c7b3cbc0244 frame00000206 +f24f4ddd15e0a9a5f5378da0ca2e5715 frame00000207 +beae983334801d6c715f9e10819ab387 frame00000208 +243f718ad771a1a095d1fbfa8b08d6aa frame00000209 +d8f11b2663c593e656e84cf99b477519 frame00000210 +47d34ed85690de826205fbb2e86a30d2 frame00000211 +a24a3e509724d1770a02f6bd76291699 frame00000212 +9a2984a7d1a302cb9bf3f8d376932192 frame00000213 +4759fe6a2bb7eda1ed04b5c4f1a7d10d frame00000214 +6be49fcc890a595f01bfcbd88b2dbcc7 frame00000215 +b1f3de81916b051ab2e01288a3b7edfe frame00000216 +9901d41db9b17fbcfc8768a1aa1f5b85 frame00000217 +5222e7d1ba4bcb7eab82421ea8e7d7c4 frame00000218 +dd04400fc280f8e907d0dfc984261a9f frame00000219 +a865911f3e29760d8cd1a5549008eb7f frame00000220 +7d4b68c7f874ad1422e06ca1d803a31f frame00000221 +aa817ec6f5897315ca860a56b248454b frame00000222 +113799c5c114a5e9ad48139ee7da43d6 frame00000223 +131378261a64f90f46146b886113a1cb frame00000224 +808290540f65e8c72ef1d4d2b72dc878 frame00000225 +f3700d8b38f353e3f7b986c11c81acc4 frame00000226 +be9ea2d49e35171fafb27e6433e8b6dd frame00000227 +6890b2995ffc5c330263ec1dc0b1f7fb frame00000228 +dee9022e5c877c95a1606a71f59f088f frame00000229 +372847cb5126d28e37bd3fbe392988af frame00000230 +255846d9bd6b8f8bd5c4e1e529f7b31c frame00000231 +1b35d83ca632235015d9f170d30b1a78 frame00000232 +e2ecbff1a7131363745ff3b2b3a78d16 frame00000233 +5cb6775cd287e87c74578101076b0e27 frame00000234 +e740128bc29a001e7a9045f5437cb0c4 frame00000235 +302d0cb19bf8fa07d43461203c503c13 frame00000236 +0299ebf50741ab58a353b2dc7a0ff8fc frame00000237 +848464850695a3fda7637f317e96214d frame00000238 +291fe5e3389b0c3b6eee58eb76948073 frame00000239 +dd481b34ca6a530658b930ca60f90615 frame00000240 +e1e6443903f8c716f62c4b6e02f5c866 frame00000241 +b8b3e2641bc47ce76dd3055e7d6d5554 frame00000242 +dec7ed2ef0e97caa8fdb0667cd14a03f frame00000243 +f9278e431dab5b15cd96a27980d9d1b7 frame00000244 +87f8a9cde3ea939892d2d99041600ddd frame00000245 +3f150b50e3fd0fc40da52ec2474d42cd frame00000246 +8306e551a83fea9297d54a890e47e2f5 frame00000247 +b01f8517e20e170db1c4f5aa12765e56 frame00000248 +6291b617091bd7a601b230415aa6204b frame00000249 +aa79e77d0b6c41c77fe68ea862c71b72 frame00000250 +cbf287e072729eecfcfeffe0b746a2e0 frame00000251 +ec8c4ac353999dada4c11592c4e84c29 frame00000252 +f507c8228faeb72cf7d8466f4819ec7f frame00000253 +691f3c924a34c2c5d3910f72c3a0ecfb frame00000254 +012d051fc777cfdb5ef5ec909fefb332 frame00000255 +76ddfe5dafaa18c4e88f8d46326cb2c5 frame00000256 +c93a055f76c64753955197a608d61a24 frame00000257 +52a394cdbc83deab4d65e148d89f4c96 frame00000258 +147f67f4a4020e9cd7619150dfd8ce66 frame00000259 +8e0d3bf94083660843d1149975499b5c frame00000260 +4e362db9be913fae4b6718af16da45b8 frame00000261 +1580d1eebb291b214814a7724aa79882 frame00000262 +0196fa70c13e8ed067e75057a5821aea frame00000263 +b58ca78407e73da3e2db4a2236bd109e frame00000264 +c5387c86d04912899dcd1f1a31a40495 frame00000265 +5b318772b0db746b984fcca07beb5476 frame00000266 +6febb0c35fe3c1006fb4ec38f42d9b9f frame00000267 +d227403777efdc324772b08923295206 frame00000268 +7c23f1621e1c69c49e84bfcd01145361 frame00000269 +f1cc0a621cffd4b46e07433af9cc1654 frame00000270 +cd93cf359a2c6b2bd64fa0b217757483 frame00000271 +3b91f7fd2045cc0edc7dbea7458d31fd frame00000272 +0d2ac376b7083c0334fb5a62b1d8d913 frame00000273 +b999571b05569602924039ffd6040d68 frame00000274 +9e72f5812325bc5af2182f70edab3dd5 frame00000275 +873944b0e0a937c979fa307dff71186f frame00000276 +301cfa65276e420c12500328b0b3f4f2 frame00000277 +4a7ce30c845c4d1a65cedfd8b88a7ecc frame00000278 +2c3ca309f5e6dc606d68a44fcb59d53b frame00000279 +ee53de8c00f6ecbfe42b6873d6a8a2f4 frame00000280 +9ee13f9ce628355c3675bdaa12bfe6c5 frame00000281 +19420e6cc10ccdb46c38929e431d3905 frame00000282 +eb1413ca2b746d00c8bb94eff6df0c33 frame00000283 +f1fdbdab8bf9aa316ad4dea87d1506ed frame00000284 +a5377cd3ad5033a413821b45cae1b261 frame00000285 +fa89ae4f88274eafd2b8251c87e1128b frame00000286 +652408e07ac5f4c8ed44dcda74b1b4a6 frame00000287 +ae09ebca8ddcde812c094b6ab8aa9885 frame00000288 +43b85afe3454d81a1a36e08e53613d0d frame00000289 +ab2b38d2584d346a073c6731aabb719c frame00000290 +c6339b3afacc97e4225f8e8c4272a66f frame00000291 +2095f9f9c8298ee8503147d2c2bba5ef frame00000292 +345183f058dad6f941e66f3209dc09bc frame00000293 +563c834e672a3012abdd93471e46e871 frame00000294 +025f54e23eca2572c5b5bd1685c3a7d1 frame00000295 +4c1859c1e7dfb87144b4f788094e593b frame00000296 +77a68d4a08fe456a173ae9b1eda0002d frame00000297 +53e2b4fc93e798a2e29c745fe97c00c4 frame00000298 +7d4fe911b54e4c6a9d2579cb90b7ebf9 frame00000299 +8e0b65eeb4f0d06a0984d74f4d451c61 frame00000300 +7d0d0e14bed6606b36b2465aac821420 frame00000301 +02c8b844553402e95397fcbfbc45b90a frame00000302 +e98818ea5622e71f5a827203549f587d frame00000303 +6c88110aa13d95b5abe36c40597dab33 frame00000304 +0ea5ef51d06377f37de803f7816b73ec frame00000305 +05228a18374e567d368b849e304eacb9 frame00000306 +83d29e3009772563d932ad01d04119ac frame00000307 +2cc0099131481d676321cea77d350bca frame00000308 +a2b54fb0fc9456620612076398259668 frame00000309 +e67bc866acc2c3f8670c2838b1a48dfc frame00000310 +8d490997f75eafba1b73a4ab0f61fce6 frame00000311 +ced87e6968dca943c3f08144fe04da79 frame00000312 +6c3a9810a5b58fe05ea34e6e051d3cac frame00000313 +e02322a9021436d11becf3b04ced7d35 frame00000314 +d964fbea2aa619c7f93a75df169f90ea frame00000315 +8729b56005785917d943779f93c0106e frame00000316 +dd0cf568ef5719eaf3b3b76c3538ae22 frame00000317 +9250645998e24ce0e00825b4f83c0c42 frame00000318 +abda0ed80179fb9d2592b4456fbbb217 frame00000319 +3694d42456370f80b3afa44048341d36 frame00000320 +52ab40dc436d9d30c55cd90549c49455 frame00000321 +c8566c701b7d9f98f90adfde3176be38 frame00000322 +bfeb3c4726e3f874cce2f047ae38a6a4 frame00000323 +f9958f6091928a6e21d8c76d2203d39d frame00000324 +028509cce20da97c2c79763a1f169575 frame00000325 +131b4bf15f0cc01e721cea71a4ccd606 frame00000326 +abd629960be835b16b77b45fc8a9ba0e frame00000327 +ad261373f4b3046cdb2c53d482d7d766 frame00000328 +3197bd4efba9af8ea9ae4fa2b7dd6193 frame00000329 +a1b7159b0436855dabee9468d3a7eee9 frame00000330 +9a932d4f2a6c8814ccf4b7d162e9639c frame00000331 +8057694c54cafbe473866fdb2a5cb7e5 frame00000332 +a9e4906383c607303ef5e00bacaceaa5 frame00000333 +bb42d53c58403b3b3d6d8cf4aa308eaf frame00000334 +b62794dd402f5ca566254e54785db45a frame00000335 +ab48dfce841e42346f37136d31df3eeb frame00000336 +fc3cab74bc6ff9c717a6d17290511efe frame00000337 +1e74dd8f05ea24d8369f91c99a3ec580 frame00000338 +123f7110d4bea91adc3676a5bfebf3f7 frame00000339 +a3d2f4543aee0db7347ee9392b57ebd8 frame00000340 +2882cb2fd5c59c864bd86e4031641dfd frame00000341 +c9fa1760f607beb5443a378a0438961e frame00000342 +f5d8f7888d33c716ab068212451a21cc frame00000343 +11bdb22d003acd4d1c479e671012af95 frame00000344 +e481250a118245e16506fac63715b6dd frame00000345 +944572e59f86bd85a02f2930b88ab02f frame00000346 +dcab77da1efa76203ef6fa02c37172e1 frame00000347 +73ab0e59f9b908273f6c589caf64f985 frame00000348 +8f4f9f7f12c35bcc306a58b3f129aea4 frame00000349 +cd9f4e27a798ce485d6032812759577c frame00000350 +dec0997291bd33876d83b71a25fc06b4 frame00000351 +5c6367ebf4f5cdb6a8d084295d820ba4 frame00000352 +fda470539b0d88b9d3f1e33adb0b36de frame00000353 +cfac3e55a5c74ccd7f1c9eff73954f6f frame00000354 +faf1ef8cc247160088d1c9d41c1349ed frame00000355 +721b7994416b710eed2fc3c19e004cde frame00000356 +283f90637c21b9e6a4e8d9223bccaefe frame00000357 +ff01401e21da17620c2b644ccf776c1a frame00000358 +0c99959e9941c22cb682b0bb9cbc9490 frame00000359 +170fef32e33e3d382076255e4a1dc56c frame00000360 +4692654c59df629504b5dac94d6c2ddc frame00000361 +8aaff84c90bb6e51007eaf8afdb966f0 frame00000362 +a3e3c5099c91d465001a46ddedd58f59 frame00000363 +7bd6fd8e6b176dc1270726e8ace91c86 frame00000364 +c3809cd13b3728c171258ff59066e130 frame00000365 +3ad3462288a83588c35eb136b411c4ef frame00000366 +a7810bb21c2528f9f5d2b2b9532a7585 frame00000367 +c07d7790bc27303168c79cfc2c45522d frame00000368 +dfad45b84507c10dc9ab1b3202c6f97e frame00000369 +5943efbe85cedb9b22a05aa9fd0bdc96 frame00000370 +2f4654d821e4875aa84efef0c5ba37c2 frame00000371 +e59968f824f005a542ed05203d62a345 frame00000372 +6657fab933c4146cdc76fab9a9869ee1 frame00000373 +b7f6f4fa15291016b7b0c895c5982c20 frame00000374 +bdf8b4d78a113aa99a064f9c4487c24e frame00000375 +437821e5c13a38bf3c5f963c8c78dfd1 frame00000376 +dcc880da7a46b515937b080cedb66b74 frame00000377 +0685b9b61838b646a182639b43da33cc frame00000378 +a814c19f27be69a3db434ad70fff439b frame00000379 +9a30ecb7aad29f59b624756c4281ea5c frame00000380 +f3eba54b8eee04a8b397f81c3615ddba frame00000381 +69b34c4df387a52006dd997d002d9be1 frame00000382 +82acc2b2b62af74d711b89a78fbd062a frame00000383 +7fcdbdffec1fc4288c2add2a06cd541a frame00000384 +b60e199a5b0c3eee9e5ee59c8c95521f frame00000385 +c57219860273749ed10e35c52a992f68 frame00000386 +1aad563e76271ad917ce0b7f53afa46f frame00000387 +966f8105166c6c1a3470b8bca10f7713 frame00000388 +7826b2574a1e59bf864b201c68666cea frame00000389 +01b3a8699ae6a98b2ab162ad082ad632 frame00000390 +3a7340da4cc997ed991d55ae67f6bc1c frame00000391 +e4c2b5401e43a945395374f27ad35ea0 frame00000392 +35157b90c1f51cfc3d0e9c78336df0fe frame00000393 +41077a0e810fec8eba2554218d269249 frame00000394 +d5e84c048f524890911b6ecc6b1c0395 frame00000395 +804b5bea67f4414d52073da14b4e9004 frame00000396 +cfa4dc3aedfc02923ee78b372567678a frame00000397 +60416d796627c8da10c061cb92e6eca6 frame00000398 +8eabea69f5da1fa8b2dd19e11b275545 frame00000399 +fdd6266d6354c0b07d629ce367cbe6a3 frame00000400 +254656c0473bd1bfccaa98787cf0231a frame00000401 +d8420b71671bb1817ae2644e3368bdd2 frame00000402 +f98a6e59c7eb053ef2b7c4201f939ecd frame00000403 +2203d40bd4555d28bbbe97958245e613 frame00000404 +c1a804914cccb02a069ea0bcf15c8540 frame00000405 +0dca54410ab292b392284b4af754bf22 frame00000406 +4668ef3eb8990672e1687d4d3ca3b7a3 frame00000407 +ab6285de1dc34ea323cb5a59fec03282 frame00000408 +09276b876ea199fe789c2ef2e88b96a3 frame00000409 +d3d56b1edc84d2441824da867d3bf671 frame00000410 +e28fd98a927e57e6de305a5707cb1b03 frame00000411 +3780f19d7b072a087b83b5de1cf155ee frame00000412 +45b98ecebc2c753b4948105c70f848f6 frame00000413 +33a123a11aed0d3229a39197032d8455 frame00000414 +76870aba8a38e8d89a2c33046e72042f frame00000415 +0e0f594d2c4f0f85d87a2e3bffdf23d9 frame00000416 +f9c3ae2e122ade59985a5de34e9516cc frame00000417 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/loco/pig-loco-0.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/loco/pig-loco-0.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/loco/pig-loco-0.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/loco/pig-loco-0.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,3 @@ +87ca58bde1a321cb56d33f69407bd1bb frame00000000 +e31f10f7761002552524c6061df2fcd6 frame00000001 +a8d3f4ff118ef98a9e88f34924abca1b frame00000002 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/loco/pig-loco-rgb.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/loco/pig-loco-rgb.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/loco/pig-loco-rgb.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/loco/pig-loco-rgb.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,5 @@ +c92ddcf431eebb686b8120655c81b6cc frame00000000 +6001f388b863ef8ad367627328b8ebf2 frame00000001 +e82d6eb341f4b08ceafd8220ff1deda6 frame00000002 +246b4416933843033e296491239c6f52 frame00000003 +ed2e0eac7bfae75bb808e0deb2981e3c frame00000004 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/mimic/mimic2-womanloveffmpeg.cam.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/mimic/mimic2-womanloveffmpeg.cam.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/mimic/mimic2-womanloveffmpeg.cam.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/mimic/mimic2-womanloveffmpeg.cam.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,73 @@ +75dba3d2c48f1736d924337f40882223 frame00000000 +0369614d6f04e8acc49848e1f5fdd886 frame00000001 +f454e167d1a4bfb9a7291e8d968508e6 frame00000002 +d6a6eeda029c10cb4e4c2e2c718f355b frame00000003 +4ef3d48299ee97f790be633b52d515a2 frame00000004 +df5ff913e39e31f36dbf89ac5a02dcaa frame00000005 +2085342dfbda25b4ead44bfd5432d58a frame00000006 +1e36b3faefdf69962d32399dff776478 frame00000007 +af5eaff994175162da68e12be32fd166 frame00000008 +20d26a8afe37cd25e6a91323aa2afb56 frame00000009 +7c9868a61f1c52b0c430b93b5751253d frame00000010 +39514441bb50b1bc039cf1d8424fa7a7 frame00000011 +c0e0de31800c4219ff5df768edfa3d42 frame00000012 +6e98001ab7c1e3469bbb690191bdfc19 frame00000013 +6666ff3858d2a50fb6bc4908f17d7fd2 frame00000014 +dc150fb7c3997326a4c80f39be187f40 frame00000015 +c9addedc234161e3649662886a6ed357 frame00000016 +6b162b85c3131e5ea700fae850a4c4d8 frame00000017 +9190493fa78b8e09b6dbdd9ba4499b14 frame00000018 +3445cdb9b83981d92dbeefd9cbe7d807 frame00000019 +30fc406a796db07b82ef361a35699fbd frame00000020 +2dade44dc213b017077fd6787d03a147 frame00000021 +c8c4dca302a6e32bfa3e48c000f95f7d frame00000022 +30c5cbec092f23014fa8539caf995334 frame00000023 +af08677c86f013017028749f5b02dce4 frame00000024 +e5e4b467bb78bf8d2673b716307ed0c5 frame00000025 +2c711da4b8e814a96ccd0183dddd47c1 frame00000026 +4ca8efa263463d972b019e2e3be75acc frame00000027 +c02015946edf6b510b698dc023f9ad96 frame00000028 +37c565d0b6510233739a64e1935e0c65 frame00000029 +d94176f5b9626ca26c5b7ba0cbe2c20c frame00000030 +5bedefd4ead86c8af7b9350c04d43fae frame00000031 +9b45018ecb5a4cf483239324b56637b6 frame00000032 +1f8f6c233b6b0be6fa25717840a4974d frame00000033 +e7ff55775cb5a35dbb6f1294cc1de287 frame00000034 +48c53e722865b64424ad1ab28891278a frame00000035 +fe2ef5a992cd4627fefbc544c0132f25 frame00000036 +816c3d958860c598a35d6106b045403a frame00000037 +aadfae0141a592f5b6f0d8dd661cd2af frame00000038 +611e84e3d7d55bdd0e6d355f86227d42 frame00000039 +a9bc05e6f2646cee7d543f3162d8b282 frame00000040 +e163ad79c7b9f12ce70589b46f4d113a frame00000041 +352450d7f833c8e01ac14f2a068330e6 frame00000042 +32c0508ab627007f4419cd9f12d9bc29 frame00000043 +d2ba64184826d19880ae8a404eec905a frame00000044 +cee192dbebc00ad2b6a7d7a986a28e26 frame00000045 +adf6ee23e6827c1b1c7b6ef15a36b2a5 frame00000046 +ddfec4fe6f0cb32bf64fbbf814b514e1 frame00000047 +28ed6a85d2f00d6a4ef441a903acf505 frame00000048 +2bd3ed04e51ca0b9d9024a72e47b6f53 frame00000049 +509c7e2c392322656333d3efd0ed7be5 frame00000050 +44105d3fbacea9f85b7f72b8a8ccd5a7 frame00000051 +9fe76175250e2a43c0679f08380d367c frame00000052 +88477843cd57bfdc44a7a51d727ceff0 frame00000053 +43f7a8706c39c3664c2d157dc981e286 frame00000054 +da8c9f377d1af545efb57c07a436c622 frame00000055 +40b8ebe721ef897a0a3ad2ba37be26a4 frame00000056 +b356986f1f70a84ef8a4bf914697132f frame00000057 +d1479bdd90ca0f498d9c7917cfaabd6e frame00000058 +5ab35fcecd3d1886f77c82a09e258c85 frame00000059 +84df59bdd56d5981341e3bfb138874b6 frame00000060 +00da0b43756742eae8828a6d66ffac6d frame00000061 +331fde745a067bd7ac7744cb94f6b532 frame00000062 +388c8f111703a5537ffb4f47cf8a1ca5 frame00000063 +989548b8c64b3a67e4a1be9ee9f48b1f frame00000064 +696e49567b8943f760bda7e58077f17a frame00000065 +5786c5e439f4456312ccd3f605950953 frame00000066 +36472d3e51b3f82ca31a8ca9371fba4a frame00000067 +9fe98d9eed3d1f5e4b6058843a3dbf10 frame00000068 +2014d6ff53c153baa0a0cf4a64e811b6 frame00000069 +9ab466daa89efd3f7361824208c06a89 frame00000070 +1a50a4ce7b053cc27ac4e9bff22747c1 frame00000071 +3aad38f57adb694c0803e00626adcc25 frame00000072 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/mjpegb/mjpegb_part.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/mjpegb/mjpegb_part.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/mjpegb/mjpegb_part.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/mjpegb/mjpegb_part.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,10 @@ +ba94bd6d4ae97ed20f26e0363fb89123 frame00000000 +ca3e8b288761784598f73dea5646896e frame00000001 +e8318ba19bb1eca026d07c6cbf7223a5 frame00000002 +5c05be87d5dd165cc5a2696942416838 frame00000003 +9c8d5f4f4fa0d38fcd693d535c96c174 frame00000004 +4eabc32e67079fc4380cc62db5674c51 frame00000005 +6382189cb227d723c9160a069af23cfb frame00000006 +5102f23a6305eb9c1628667ef62cdf68 frame00000007 +45718b64413d22160cf2112f0918ed18 frame00000008 +58b05c55c5e346511e28c97e1b0eae05 frame00000009 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/mpeg2/mpeg2_field_encoding.ts.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/mpeg2/mpeg2_field_encoding.ts.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/mpeg2/mpeg2_field_encoding.ts.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/mpeg2/mpeg2_field_encoding.ts.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,30 @@ +b05e989d082632a601815525c9c48939 frame00000000 +eb48d8396b4a7bc2e7e2e66683993b04 frame00000001 +69816e31ee674377322461a6dc9a3692 frame00000002 +124baf8c0642144888cd3050d9aa0d0c frame00000003 +841af293f0335f7583a8f5188cac9119 frame00000004 +489350db4a63a1eb3b2dbbd1635ac8dd frame00000005 +17e86c7943990fab51c19155c3f3b99d frame00000006 +a70246e67a59d096c614f0fba2e270a3 frame00000007 +3d9af0c8ad0d7229a3435d574a4cd3d9 frame00000008 +00bcf0b548002584967516dd009a29a9 frame00000009 +286048d7c515ce543a4f5c87cf8bfc45 frame00000010 +ecf55461c52c1926edc449d6c7c5d37f frame00000011 +7dfbd73c2df410060058e64cadced066 frame00000012 +b104b682811566a42c128c2abb3e8f1d frame00000013 +0814660269d583f0567ca976e60b15a3 frame00000014 +d434baa577bdb5ab53879126180b1212 frame00000015 +5b53cee908ba6ceb58a530fc31ffc748 frame00000016 +8904f6c8899c3663a0872e73c9afa460 frame00000017 +1a60747661a72e5c2c3a39e81322888c frame00000018 +197cfa64b0230df0969acb4ff11783db frame00000019 +d0c008623880fd67bd7b6a7d662bc7d0 frame00000020 +346bee2c27be1cab4f0540e8143524e6 frame00000021 +0a7e932f555dddfae47bbf6f59fd63c4 frame00000022 +5b4af767b317bbedd6284d51b73f4886 frame00000023 +4e120cb9762d16eef3bb08c45d82c6b5 frame00000024 +50cf551dc1fc3822b57406315ba1f751 frame00000025 +0b56a46ae51beb9fbc0766ffc092c41f frame00000026 +a11357bd2051c7e16f4a95464169f1fe frame00000027 +3cfaf06dc9ae82ad5c649dbeac0d272a frame00000028 +81359a7d63c06e9e85c267887f2cc456 frame00000029 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/msmpeg4v1/mpg4.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/msmpeg4v1/mpg4.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/msmpeg4v1/mpg4.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/msmpeg4v1/mpg4.avi.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,50 @@ +a3f6adc165e06675e8cee1a4ea411958 frame00000000 +f27a0d7218ea07bb876d8646c0cb7188 frame00000001 +591e6632cd3ed27d51f8309492b8459b frame00000002 +f6ff12b49e92830789856e9617ae70db frame00000003 +737d521ce5e87facc1163e04ecf4c27e frame00000004 +ee4f47ea523a0503d869cdbb825b414d frame00000005 +7699a21afc6df54daa330bdad271fea4 frame00000006 +14683d49846bb901da850683e4ae3b69 frame00000007 +89cfdb655ef0c3364b4d35610646203b frame00000008 +b3aef6b88c9e549b8df67d410fc4842d frame00000009 +3a07da8e658aa2d5183bcd9e8cad2d30 frame00000010 +ee462e0fb151c3a86b3af9bfd5b68574 frame00000011 +8dd15a7020dbabb285f43bf1fb38fcfb frame00000012 +07ac475dc9b43e9ce48ed1620d769212 frame00000013 +c6a4dc19ca2292ff8b858d59773c339a frame00000014 +b0a2fc9930ceda9c7d18d9c11199d411 frame00000015 +8e7f6d0c6126acec7259418194c8fe72 frame00000016 +738cd8defa7bdca51dab2d29de4a89f5 frame00000017 +fb327a8259ccf4109ecb577f3668981f frame00000018 +461bcb4e3902e130b949b668aa107629 frame00000019 +b1b1fea94ec8a6ac64efe9c84830c62d frame00000020 +54730715f23ebadaec811c74dd94dbae frame00000021 +99a75a72876f99b4184cf8428fb2e264 frame00000022 +9986b9f168e29576a68ffb736393d7d4 frame00000023 +d315131d348818cf83857c7a550231b2 frame00000024 +48664d7519297ce8c4fa21c96c25f6a3 frame00000025 +d0e935b31593c9feb5e8612d8f6ee968 frame00000026 +09f8b96f97525378432304beba8007a0 frame00000027 +fd17a313364c757e2dc46898bc174927 frame00000028 +b9814a31d2ea790b991f85be2a5872f1 frame00000029 +0e538aa480522ce884597008ad71e7ed frame00000030 +988f7d68990f66e5aaf6a671237b4fc2 frame00000031 +0a87e529aebdcce4b58202902129ed25 frame00000032 +db245b0d426c89a511ccafde045b8c02 frame00000033 +e212fee4ace916f5186b527e08778748 frame00000034 +6ade7a2eca831b4c2606041f610cf3c1 frame00000035 +fb5b0d16acba99d9638239a2a3e3342a frame00000036 +0461e791b38a82fbdb1d3136f1d51e4a frame00000037 +1f307bac3e9e4ac3fb2635cb9abf749a frame00000038 +bd5fee5fae74fbdced8accfb102530f2 frame00000039 +7b50226b369fe75055a6d1065396e77c frame00000040 +dab3e3a749f6c1a395d161597f0c4b49 frame00000041 +40de57c43a408a82f9425a6397689737 frame00000042 +3e717cbbccfd46fc1382e05ed2db1e07 frame00000043 +15517b339652c7b293cd37d6c1f81088 frame00000044 +e84a0e47e74b9cb32509af7aa1225e86 frame00000045 +c323ef8631727b8830dd07747573f19f frame00000046 +395ccbc52a27a4ca778c9317e6a9acb3 frame00000047 +cd4a51ae4ee201f7255e1b5a0f1f99b1 frame00000048 +44fb571a468f38d8090b47f0768d892f frame00000049 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/msrle/clock.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/msrle/clock.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/msrle/clock.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/msrle/clock.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,12 @@ +39a538aeecb938b35a3ca4cc73392309 frame00000000 +48051f40ba96dbee48cd647c041d6ce5 frame00000001 +be7945f7d693f6f4ed9bcc98f9731638 frame00000002 +e2a73c31a6cdadc5f0bfc55427942248 frame00000003 +b7ac22f253355733e4ba0128d007836c frame00000004 +bd666b782f670a15cccbf1eaa2a9e014 frame00000005 +4f8f9663b25c8a2b15bb5e4931dbe23f frame00000006 +4990efa26c4020e74a1158f8ab3a16d4 frame00000007 +1445b557b4c1e9fd1a8d68a6d6d90997 frame00000008 +659b3a76ed59c69064d6393c4d69523e frame00000009 +5bec28b3f55fc4ac3051494d0b23b218 frame00000010 +23749afd76b7fba5070b6c84b8527e76 frame00000011 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/msrle/Search-RLE.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/msrle/Search-RLE.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/msrle/Search-RLE.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/msrle/Search-RLE.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,29 @@ +fc45a5b8f3a97c3a0e4fc4522f43e0eb frame00000000 +0ac8aaf7fe6f44f01b6d697b11753f89 frame00000001 +a66e68c0dc0c79a626e9ad48cdda7a7d frame00000002 +cef25607e622dac54454ff080c0219a2 frame00000003 +17c7a6fdbd5a3c7eb547d773cfe5f52b frame00000004 +a7236da2e43f4a1136abf42945f123b9 frame00000005 +f30591dd863c66db2234cb91d266a462 frame00000006 +f30591dd863c66db2234cb91d266a462 frame00000007 +685ca32e3c6fc5ccd0dbbf7803393ce5 frame00000008 +6b3bd1b67e107d560966077e3cef4ccc frame00000009 +cef25607e622dac54454ff080c0219a2 frame00000010 +e6ce592c9b736173551a566b0bb6f7ad frame00000011 +0ac8aaf7fe6f44f01b6d697b11753f89 frame00000012 +9b09df41bd028f47b5b6f3aaf2fe1098 frame00000013 +9b09df41bd028f47b5b6f3aaf2fe1098 frame00000014 +c74eff0a4a635653228b58ba48d4cb23 frame00000015 +ad948b478d70f409f595eb7a3faed082 frame00000016 +e0421ad8157037f3691016896be2ff29 frame00000017 +7ba3bb4f8680b8aa5ab60445595df2ac frame00000018 +bcf68de42e068444773935a6edac3f2d frame00000019 +bf48cc5edf034661e25c7c043024d1e9 frame00000020 +bf48cc5edf034661e25c7c043024d1e9 frame00000021 +bcf68de42e068444773935a6edac3f2d frame00000022 +7ba3bb4f8680b8aa5ab60445595df2ac frame00000023 +e0421ad8157037f3691016896be2ff29 frame00000024 +ad948b478d70f409f595eb7a3faed082 frame00000025 +c74eff0a4a635653228b58ba48d4cb23 frame00000026 +9b09df41bd028f47b5b6f3aaf2fe1098 frame00000027 +9b09df41bd028f47b5b6f3aaf2fe1098 frame00000028 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/mxf/C0023S01.mxf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/mxf/C0023S01.mxf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/mxf/C0023S01.mxf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/mxf/C0023S01.mxf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,91 @@ +e2e8a93e77fafbd1c35736cf7098829f frame00000000 +3797340d9e810b1078af5d2b17b75f3b frame00000001 +7910938f10a262935605b1ca4842fc0b frame00000002 +e31e05b929f4ff558710f4cd045ccf5e frame00000003 +02d4236072a6e8036453a3d7172faeda frame00000004 +df519e1d23e459fbc1599f32aacf4660 frame00000005 +4a2df0baff45863bffebf37e38bd9384 frame00000006 +871b04c847e988dcba029f73c0eb1449 frame00000007 +f3eaf54a626e45fc6c68b62c9cd684d1 frame00000008 +2cf7acdd95507084ca4576208f1d3b77 frame00000009 +30bbf8867fa0e32ee39eca7a49737928 frame00000010 +5194dc1f28ddc5bb0a6087cefd1eb81f frame00000011 +24b27986a80cae859954d61c34979d32 frame00000012 +e0729bbb9a3bcfe6d90319fb4b573b5f frame00000013 +6ecc231e33ff01c7d263cd6a4a1256ae frame00000014 +1685341878583c68a6de6ce8329edc7d frame00000015 +a61cfd61fd371c97c8bf336c982f9321 frame00000016 +06cdb420a8aaa71cebd1fc0058a915f2 frame00000017 +4a5aea8725a461ef9222e4ccaabc9a3e frame00000018 +3267af66f4789c476018df4e02eccd0b frame00000019 +da3175cb8595d61f95d7383020883fbb frame00000020 +8437ffd6236a6adec54b85e96b730ed8 frame00000021 +e01843778870e74da94a86bf5f6fa00d frame00000022 +d21adc3689c53e8bec4bf1d4aff3c799 frame00000023 +71755b91a8589f2b2b2c8692330f58c8 frame00000024 +59d5b4fdf72f988c3984fe1085842eeb frame00000025 +c9e4ab11118936e5cc156aa3b8b1ba3d frame00000026 +07c30b6b4ab3841c78ed4474375c8ca3 frame00000027 +18af02fcdc368c8e1ce96e6ee7ab85b1 frame00000028 +5ed1ebebe7c27922dab7f6ae8404583d frame00000029 +3c113b309b6b29106db7046b979c3e31 frame00000030 +86bc076d2353d94d8a81b2e7039a46c1 frame00000031 +e94f703c480b0af8c2e04105a3fab607 frame00000032 +bcb1dbf979c39563f7d1c6e91b400bd1 frame00000033 +13034fa16602fe6e04212c242c3d2683 frame00000034 +e9523b1a390b985ed1336f29c937e8ab frame00000035 +1b1106e1d1395e5dd79e2ee7ec9d41db frame00000036 +5b07af5c8894436c6d82581ccf12f7f4 frame00000037 +50b7d4ec02723fc9fa4f3039380c4a8b frame00000038 +bb62f8328dbb90299c619d596535e470 frame00000039 +e000838d070af6524568ec3009b8e5fc frame00000040 +6d7b9905bbf7b020724ebdf2b9ae6c45 frame00000041 +6ef7aedd4b7dbd257ba35f6d3120a470 frame00000042 +91f006ab9a3b3a7322fdf1395e914336 frame00000043 +13f93b83a0dbdf211a857774baa431c9 frame00000044 +eebb21997c455647c129f662278ea5d7 frame00000045 +e74beee91384f181628a7723da667875 frame00000046 +1697fdcae48fa780aaac4b1880d2cbf7 frame00000047 +e1598bf569c527aebc00cda581dbc7dd frame00000048 +d549ac6197f2b16544ae571c68757ad4 frame00000049 +ca6db7f1432d8d7aa2ce675774db1e5b frame00000050 +27bbd933da6f864b6e3ad6a13b477313 frame00000051 +5463839be3cc3210702a759629926fee frame00000052 +57a92991446270374995ba6a19d77ecf frame00000053 +ab11f92436d2df763a2cd4a1a7a6cb24 frame00000054 +6af5c9b9d1cfd4e1537dda6541646995 frame00000055 +3bd1c35e3e7693f99c49150632dbb591 frame00000056 +5aa1d2848c9bee32407fb8200c881eed frame00000057 +cc71bfa32c2b625e8a59b3e34586565a frame00000058 +27562f3b96ac8f24b68d2e909f37d8d4 frame00000059 +c321b91325aa0b6ff55ebf2e81787034 frame00000060 +ead11e28d84bb3eb72d2ed6d2a0bf4b0 frame00000061 +a2ef9e9703ac4472689f446815228c27 frame00000062 +d5852936c48f0ce226e98a46391f36f0 frame00000063 +80876931071cd2bfb90a4610c9d9d1c2 frame00000064 +ef7069ac90d1cdf561731f37a44e3a98 frame00000065 +2d98ccaf8975da6111e636f2f969b7e7 frame00000066 +b61076d9680c1648457dd434083dc8a9 frame00000067 +d81fcc38c5422b45d302cc2336d3ee54 frame00000068 +68112b745a3380d0e0d1466279658916 frame00000069 +419f920f8282c3df1879107934ab9fed frame00000070 +335d63060c8278d9034181d22be99357 frame00000071 +b910117faae1b0d3e3df55edc7abc5aa frame00000072 +9f230567d6447d101b72f451008e6d99 frame00000073 +69c1bfe0da622105b6f0274eb2b0ea4f frame00000074 +5bb543e62c248b419ac3e5befddec712 frame00000075 +4a61c0f735d430d51cd85961782d7fde frame00000076 +3e65881c0e886d7f88446ec67c714874 frame00000077 +e048505bffd51c17a4f1395a6133568b frame00000078 +03c05bd62809341836e5672dce00a855 frame00000079 +3f4eb1fa710b82d53e75f64b1afc6934 frame00000080 +06a8f38ea00792011fad26172fb7b184 frame00000081 +a4d3a29d98132d7f4e7bedf2465f1b7a frame00000082 +e459f6073eba7dfe97b861dd1d20b1dd frame00000083 +313d84abb98b1ebd7e4dab1535c0dc79 frame00000084 +b2c62df7cba3cb56eb123d94220821c0 frame00000085 +e8678db68849da67be4607932e6521ca frame00000086 +e2b7c861297725386d4ceadf5cca255d frame00000087 +a80aa736e0c8ab3ed2681721ec09d199 frame00000088 +ca0754a6ddf6c2123a0ca838e8a41f02 frame00000089 +36cdc72e064a20e4be56c4c2cce6ba02 frame00000090 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/nsv/witchblade-51kbps.nsv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/nsv/witchblade-51kbps.nsv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/nsv/witchblade-51kbps.nsv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/nsv/witchblade-51kbps.nsv.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,511 @@ +9f9cc41e1ec389a50c06d75abf46931a frame00000000 +bb7886ab74ff2ad558de6aa9b7b65f92 frame00000001 +21cabcd02cbc6012aeed46dd4dbcfa15 frame00000002 +db5591ef7323acacda431145ed920e80 frame00000003 +cb7dac5482c8f049bff0ed0a1febf71b frame00000004 +f0cad01082788a1083390de19ab43904 frame00000005 +8a47a3b19428bb03e3eb78533e247883 frame00000006 +eb3895aaac02a42dc3f06e4a85cb0b27 frame00000007 +90c7ea9c83998aa21308133874361741 frame00000008 +d9f302d67d66d35f4e62298b5252737c frame00000009 +1d7254d0b5bff682b16d429944dddeac frame00000010 +bcfa6e4cabad9a28b45e022df3ae155f frame00000011 +1d9498b9de06293b877e9c089420c9a7 frame00000012 +0b45882db664c2ad33e03bbe9c43f095 frame00000013 +067cea2efdb4da757303826014e2a99d frame00000014 +75b11b217a42e5fb0151a11a14e02fa5 frame00000015 +aaa4bcfb22fcccfe53ab0a4b96c77e00 frame00000016 +c0fbf63ff1b78e217352aba78f772ee6 frame00000017 +b7313fb1d96a8c857f3dd9951a661b7a frame00000018 +b0b3e7697d278f5a1b163b19609bc930 frame00000019 +2bca36f0c438d28ccfadc757ee691023 frame00000020 +c25c4e97a0856db3e3c32c2e3090bdbb frame00000021 +ac003d4842e0916b1c42e77336ac0f1f frame00000022 +adf9302579de5aaca0bdaad67813cea4 frame00000023 +bfbf895796782a44ec12f557dc18fe04 frame00000024 +92ea9c10a3395ee7904bbe9f6086d3d0 frame00000025 +90c56e41954c4d92809ce20e9118f705 frame00000026 +71e6fe27a0dc5fce93dbd42a29fa9081 frame00000027 +aa4a137e7d947e4496ab0653950c9a70 frame00000028 +a2196bb3e72615aa4a954738e0b48fa9 frame00000029 +779cc98b71450ac48d46626d8da2573c frame00000030 +eaec6e3d5469b229d1abf72446ff43fb frame00000031 +7415a0051d9b163badec550a6d3468ca frame00000032 +ca4ace10aedc082fb62dc58447e3efb8 frame00000033 +b57d5304dce8161e49c9c8d24742fe56 frame00000034 +113cdac022d2346c74eb5f9cd541b15a frame00000035 +0a3e19e3a6a90f635e92ee463956a31d frame00000036 +9ad476b6ab29cac49d01ddd342932e8a frame00000037 +3282d59ace51eedd61638e46262dea8d frame00000038 +b38508939e0071d31f45282bc827e368 frame00000039 +f20c4892eff659d055b5605b27d2e996 frame00000040 +cb655b717ad9216751b095f8a59652e1 frame00000041 +f05783a763e13e6b09d450a6702cd0a6 frame00000042 +9d8b956189da0cfb681e223c252127cb frame00000043 +e6dc6d87a3b22a427b48d3e1f1ccacb3 frame00000044 +e7e8f1e17bccde324a576020d964411a frame00000045 +a898606897f14ee049a5145f425906a3 frame00000046 +ef000d9db8b9e09ad01fa44295c038f1 frame00000047 +a9a234ebbc3257885928dd9971065c2b frame00000048 +48016c10bfbee16f55db041b81c6a2d9 frame00000049 +8111742a6c1970ab55d5cc0cfcb6f893 frame00000050 +f7f66fd01f97a436e75367e6163d4965 frame00000051 +aaa2d1503a63b5ff69f25842bde664aa frame00000052 +ad9c1002867559d1098233b48cbc4552 frame00000053 +70da5382784f6fe23e8498e34f1eb8d2 frame00000054 +3a9c3fb7be0fae7befedb727d34398f0 frame00000055 +2f9d652f2a0a8c0ecb63e634f23f6771 frame00000056 +0a0981cacd0c1654954eb83ef3affcec frame00000057 +9f9cc41e1ec389a50c06d75abf46931a frame00000058 +4d6f4f71ce53a4a27fe54252edada9d1 frame00000059 +857a11eefc6000fe3e5c8127ed48c030 frame00000060 +fb72c3b7ff6ceb5c87d157409b065d33 frame00000061 +ca5aa6b3b4ca803be97e0bbc1368f75a frame00000062 +b8da450aba611ac9b4675cbc34b70d01 frame00000063 +ef5c629758dde38d7ababd15dec1c79a frame00000064 +242bea45c426b4499b8adcf95e0b876b frame00000065 +00554a274820f5a936012fd91997d6c1 frame00000066 +7d6142cc23b6f4d7771e96150fb68d55 frame00000067 +5adf687ea0ca1195d1864df91d8a8f42 frame00000068 +0823d3033e32d7008c0bd1de5f632cc5 frame00000069 +2351b169a5e9afd2f7c2ba00392e79be frame00000070 +e2b5314a7a62949c48580129106f7629 frame00000071 +e32b962ad2d098eb28bb39b185f1b939 frame00000072 +0cee98bffc1ed765244381107a253522 frame00000073 +da76a2023ffa689234686cec5bd11d82 frame00000074 +fac5cf99b87706c5055b0e33a39d744b frame00000075 +ae261d1119bb14da5b00c138b3f6d797 frame00000076 +e869cc4fdf532bc3fbc6452274b77307 frame00000077 +c68f19378b7c6a5f6b0b8d57448fe956 frame00000078 +2b1ed1c7b705eb76a4bb48963646f92e frame00000079 +054e855adafd88b2cdc48d15e6801d02 frame00000080 +ffa20fec3f5d609e2ae8d397399358ce frame00000081 +eaca4969306221d251c9b0faa7a831b8 frame00000082 +cfb7d1df1a95858eb2424554eb938926 frame00000083 +2c02c4939488ce2a1b8f0457e57cfe44 frame00000084 +3cc5b3a9f30900a9d09ed948e4e498b6 frame00000085 +70c4297ecaaa8fcba63f957e25550d5e frame00000086 +8e1ecadbd4d4f34bee3dea12b25309d9 frame00000087 +4333dfb4b82cf29899cb9d56eddd151f frame00000088 +af28a4ca8fb3015e290d5ffdfc62eddc frame00000089 +f3ce209128beb4240a1a5afc6afea6ea frame00000090 +8d47bdd7bb9772235b0731b1facb82f3 frame00000091 +fdf5813bcba675a1c260a1f73c2a73d3 frame00000092 +fa7216661aaf7ac345d8ba2f216fa66e frame00000093 +be06845a933178ec961d67b59ec1f161 frame00000094 +a669e2e32734d61f9290a2ae897a79b2 frame00000095 +1901595d4fbdff347539c85532fdaf85 frame00000096 +930bdbc8cc5ac8554da0a6ae568af049 frame00000097 +b1f4037f7385299c9facc31c456639f6 frame00000098 +92e266478268b4c9bdc49260fb4c3620 frame00000099 +fd1b17c69cb61369f2fbdcc2955ff2ff frame00000100 +100d565fed04229e809d4cba29dd2a10 frame00000101 +320e72381a464505ab99b22474ceddf2 frame00000102 +23dc8792ba131852f15679b3a6199cf1 frame00000103 +a983fdb7a2c32c86738810a204f60feb frame00000104 +75bb9fc0404f33f8a135ebfcf34ff2a8 frame00000105 +9d5b19e8cf972b7af80c3e74fe1bdd51 frame00000106 +884c3ff733c37fbef751fa6728333314 frame00000107 +aa633321c9de887d416f6ee15bc6701e frame00000108 +a0604348ca7c796c5aa3ff9340e287c5 frame00000109 +f20c081af1c33d087f6c383e8423047a frame00000110 +b0e0b363f2b8e41e74a1588601ae3f72 frame00000111 +a9ffa0d6ea54452a021f6321c024735d frame00000112 +072c14ca371128451b234484cd903056 frame00000113 +a84e9f4f6bc5fc54b8274a758faf5715 frame00000114 +f032315ceb667438ad8c6c01ffa6e9f1 frame00000115 +46d0e61b7bc085cbb068300f345b6ab9 frame00000116 +ad6008060c972b4b2f0767fb575f2b25 frame00000117 +cfb3e97afa3ef8f8e369ccd13d4ae5c0 frame00000118 +442bc35c5d82815151ae2599d6cf4253 frame00000119 +e61a098ef2bc2174238c18843ebdd972 frame00000120 +9335b4afbd0ceac5b610d4eb8f3e73ff frame00000121 +4c758aad9e1e29dbee869f35c92ec2d8 frame00000122 +3ecabf8818dcfaedf713ab27cff53b77 frame00000123 +0d07ce2b7a80470d97914720b407c884 frame00000124 +6bc1cf1e524eaabcb2a7628bde32466c frame00000125 +84930ed74a97ed93c56a63c54469b74f frame00000126 +e5074fb23aa715a16ce28e781bab8231 frame00000127 +7bd4bcaa5e422ff70bfd31a6c9c8d5cf frame00000128 +075ce2f37312da33b0c0e2b737fac9c2 frame00000129 +a6c95b163fafbce0d6e5bcf0236461db frame00000130 +76ea183cb91444923de23802e93d0d01 frame00000131 +4eb595c3aefbeb4f6c1a5a7b8b1acfa4 frame00000132 +969f8f49ae80c39dc9cfc22b21f1af87 frame00000133 +c2dbc6490e7b5002551935839c03b47c frame00000134 +ca6e795a3b7615b059216b51251f6685 frame00000135 +d08cb1cf566dfa221b3132a03506abdb frame00000136 +86273a0b69c34966469149efe7f1da19 frame00000137 +167e3d665dec8217850681f727c44f8a frame00000138 +5dba0649e17d89366b66059ebe0257a2 frame00000139 +7b9b3e94099099d4cdedd17713936c0f frame00000140 +e41e2e4bd64c19df39d9d9d9e9ac7c96 frame00000141 +86d3826ce001cfd7c93cbc8858884aac frame00000142 +72314771277064e11e2ca2282e0f60ee frame00000143 +41dc65032e712b6e1007040fe38690e1 frame00000144 +98261081479f5976b97003bc853603b0 frame00000145 +6677eb3705ab1226915faa53ff6fc4c4 frame00000146 +0310ec9cf9407aa9815178ba8a804023 frame00000147 +20949a4a0f1f3875476047c934a6205c frame00000148 +bcb63eb024303cf1079d2e43d85c3f3a frame00000149 +accca2a83661358f9b3a9e740d335787 frame00000150 +6968a818f14d159e114cb219fc86e875 frame00000151 +14db6c07384a8422a0c8ec0af2003cfe frame00000152 +5c1132af6e85840dd440f8fab1698ae7 frame00000153 +7d585d61228a3004971e09ec574f73c9 frame00000154 +9cebb158800940c2cc6d35146c0cf0c1 frame00000155 +ad9a79f4c585790f28bb194558e013d6 frame00000156 +bdb5b851dbb15851684fa23c2f5519c7 frame00000157 +22d37a936a62e8fd545681c4a4feb861 frame00000158 +6098b6e30fc0ba378eb518c562f4cae5 frame00000159 +412a0298744a82642bb5db68af78a215 frame00000160 +c7fac73cee1449958dfaaddc21a4e6a9 frame00000161 +bb17ed1b263140203aad51359eeba84a frame00000162 +79ce757b88fcdbbced918b9b71d9455b frame00000163 +533d78f33155035a77bd6ce4d2ea018e frame00000164 +9964e3ef4b93b51f076d6e58d7586b52 frame00000165 +66a8f228352b98d9fb45d0b942ba688d frame00000166 +f1234f8e2b3fdcbb023237375a7ba597 frame00000167 +10c7080d3345aafa4256c662eabeb403 frame00000168 +a637922ddc6399b50b124973392d03ee frame00000169 +e68a502565743d114e551b8a20fcf50b frame00000170 +793f3f60b6607dead954303c6290f125 frame00000171 +f5f25b54f5bb8211cbec35d4e4703777 frame00000172 +6cb9df8c90fac8efc95097fdf90a4dca frame00000173 +2ed4541f8432442effddec003c25f2e5 frame00000174 +a84d5ad4d5db402d9d4b749a37503b05 frame00000175 +42a3a2d2d62df79674a05a78feddac5c frame00000176 +3766a01dc4ed3847597df5fa5a8e6027 frame00000177 +fbf968b253069676699f69c6f6de8e08 frame00000178 +b74fe1f5982aa3c013c8d82156a5bd7a frame00000179 +85c5499c842ff1048a3e0a4369e17599 frame00000180 +f32b1f9efaa02c35a80ae90828625681 frame00000181 +350d697b19fa9811d69eb944fba90d9b frame00000182 +25349e41501a20591642aa1ef34db8a9 frame00000183 +d91c27c909a1adf695c8d5f6cb24143c frame00000184 +0a8b79125cf582d81177cdadbd462a1b frame00000185 +edb843cd18dd530c94a535558386837c frame00000186 +aa347e212885278095f92a6f380084dd frame00000187 +45d644c55a4d5bc863c664f719d607ce frame00000188 +39133081d448de18b8253e4d85273b9d frame00000189 +a50658a55b305426cfe03496cd95a9f2 frame00000190 +f9c55570b33fcc21d30d7bd46851a1d2 frame00000191 +788a219958ab7ca2b14c58b95698334e frame00000192 +7222848f130917afd8be714b55da16e4 frame00000193 +5716f4623230c80577b35c319843a463 frame00000194 +7077311c72431ca0de35e9961023c9ab frame00000195 +275b2f78bfe6d3ea4e5db618ad127d96 frame00000196 +3a4d8ffdcc2a99c9867e73a50dfd0db7 frame00000197 +54cf3f717d4a943f9ff7060b78abca07 frame00000198 +c8fb4a97e25813e7197609e1d41f3ae9 frame00000199 +a9607f9018dfcbe57dd074d9feb74a3f frame00000200 +df6dfa4363edc9c4bf6790d12f51c303 frame00000201 +32334fb92f5b01c1630935b38203916f frame00000202 +83878ee195b213c9faccc4bca7ce44db frame00000203 +9f77cc2124d8d8a51eb31a191597373b frame00000204 +fd62235627773ff264b0cf5ae9172adb frame00000205 +da3b11d1e0252d8eb4ba5a39726417a8 frame00000206 +d5e26eb74e3e49b5aa19dd9b47d4060a frame00000207 +15910bba927b3dfb9b67c39f21896c9c frame00000208 +7213c46c55deba4eac8361578fb14725 frame00000209 +16e21cc56c4c3152427e8bbe879d2fe6 frame00000210 +a4d62935a07f00770ca52ece3d5e61c0 frame00000211 +fe2ed3e68f7cc9307200dbd62c681685 frame00000212 +ed9ebb94a5f874210349dc3030f5a7ca frame00000213 +0811dbea2c8a0b85da7c22b422f9f35d frame00000214 +d34424113ea6cbc5201f2e5511bfbfe2 frame00000215 +01d6b5da70f28b619c6e882ecffa7cba frame00000216 +d359474fbc87996d8de221dba3b1f462 frame00000217 +7bd1ebbdc4ddb5bc975373b8794b03fe frame00000218 +054591fa9173b487599220aaf571a5ad frame00000219 +1842da7d32658615b1c3a5d93b7b2b50 frame00000220 +45938ecc8ff76a5b3de360ab59250d20 frame00000221 +7900ce5fffa59027b4ca556df392fb8f frame00000222 +9aa31c1512266dd3e48780c1a3c8a1d9 frame00000223 +4603b95839f9b577e578bdad6a9261de frame00000224 +74cf223dcf3741791e9d1b9c8f669dd2 frame00000225 +6c7a0cd07f6b06310d4286ea0cbea2e2 frame00000226 +211eccd0a1cafe391831aad311736c81 frame00000227 +f4ce61ff1646923d1dd631371206e03a frame00000228 +3c1a298357a19e0e2b24f7b2c0d35126 frame00000229 +41d87600daf3d8913e32bae7a66d1eb6 frame00000230 +6187f7c7923d9e1ca871b5da1ee055e7 frame00000231 +c079527d4fa23c029345fea31730a183 frame00000232 +b9637fbe3fbf4d6956cef66e6ee863c8 frame00000233 +e3534465c7cbf4afbff9f76fbf62f036 frame00000234 +fdb1f017ee121cd510ffd28d731cebf7 frame00000235 +fdb1f017ee121cd510ffd28d731cebf7 frame00000236 +fdb1f017ee121cd510ffd28d731cebf7 frame00000237 +fdb1f017ee121cd510ffd28d731cebf7 frame00000238 +fdb1f017ee121cd510ffd28d731cebf7 frame00000239 +fdb1f017ee121cd510ffd28d731cebf7 frame00000240 +58a067a0582dd67c94b31a8e26fa5d84 frame00000241 +e2c54ddf958af808a8e5d3e05ce23c2b frame00000242 +3ca7f5e9db2521bd420b950801f3539d frame00000243 +1240cbd4fd36e7b7b1526d0e058b62aa frame00000244 +08c458cc63de80cd3c9b62c139d0a328 frame00000245 +ef2d4fb7bd15f9780d247f820bfb31f9 frame00000246 +38e133481bc8e5d3c59974e84c15e5be frame00000247 +26f1a20b0f8d5d469cfc372c05c06f6b frame00000248 +5c8767b7ac98393c9608c4d1f86dc50e frame00000249 +18209c618ec32f2bb7dd567eba1a2ba8 frame00000250 +0760cdee1af2c2b08b0a7bcd2e43b585 frame00000251 +ec2144ca516a6ca8b0c02b31cecac267 frame00000252 +3b66917301e7284a2363ceb04c449617 frame00000253 +49fcab857ac581035a2d8ee08e5e0cae frame00000254 +025a4f6e3681811f3a641ec0f09c4a49 frame00000255 +46ff4a468354f6dd208e689efcae84b0 frame00000256 +baa1ef5a34f4ad7eb4539569f807f6f5 frame00000257 +378ff3391b3653e714712dbae2f8d421 frame00000258 +d202de93c1b2ddb8f782a9a9ae5b7116 frame00000259 +9f64434ce1f0bad2e35e2867c571c962 frame00000260 +fb19df83b1eae68b69a26254af3ac8e0 frame00000261 +9494a3a2c3393a3aa35271ee4268c028 frame00000262 +0404db73d1a812979e2f2bd5cccda054 frame00000263 +af48bce6aee0af56d2869d1bb4df7e80 frame00000264 +35c5381b5e57497fdae32076b4cd7c8d frame00000265 +39012cdcaa40753e199f4e6c62e91efe frame00000266 +2b101246f53a12b5e023829ee371611d frame00000267 +34cb12aebef8499721b5e064facd6721 frame00000268 +470741f896d81fdfdda2ed1ee3ee6c67 frame00000269 +8a76cd2ea494acc3f571ec066a914607 frame00000270 +4427704e5f4a3df16667305dd38a1962 frame00000271 +22345b90345ff530264c9973451f2c67 frame00000272 +590ff8df2971ac474d1b9b475a9f9e29 frame00000273 +c382b6cf9534003ac81634557f81c129 frame00000274 +7dbc85461c2d6bc6165794c4fd1fc13c frame00000275 +2a55ea0e45e5cb881a1932f2518f1c11 frame00000276 +fc441862eb31e6e0a1c581b61a837eab frame00000277 +baca0ea96bd7cb050000295198ccf902 frame00000278 +b6d3dd96b75b9204c8cc2ddf231b2a52 frame00000279 +5c7b498517324beb1ee05bb06513fe04 frame00000280 +ff25fc98aef6715916f01c8def16efe3 frame00000281 +1895b790f34871a58bacc322c170df20 frame00000282 +61ee83e8bbcdabfb44906556bac84038 frame00000283 +a359f0dd93fcedd87c162eede01ccb35 frame00000284 +4332cb2144d112b3d9c0448c72ae6661 frame00000285 +27b7d2ced103ff2d3008d62d19b43562 frame00000286 +a8c9303ce71adf7df0fc7dde0b19af9b frame00000287 +d99374f162abe98b773311373bcaac79 frame00000288 +92ae2cbd8edd24b3797943edd765cac9 frame00000289 +d8fc7d6a32a97cb0bc7c95db72e565d7 frame00000290 +df26f264ef4d808003f91391a7157611 frame00000291 +b6c680755f9ee9fdac9cecd125a43f40 frame00000292 +f5307a2f2c341805ae5800a9a81af25e frame00000293 +2751ea59107ee72b95ace419778ac85e frame00000294 +e8b80b49725a2a03f2a73c4d2f3f79f3 frame00000295 +0c4fff91d133bc716e3ca4dc28257bf1 frame00000296 +fea3b0f68812f420ccebf83d53316436 frame00000297 +a244aa42e944bf83681d6aa9e4831ffd frame00000298 +90fe7e97ccd368d65bf347c8a6d5b2f5 frame00000299 +e71209ecbd6f146001e32c58748c28eb frame00000300 +6292ed2285efd71dd9b0725191116ee4 frame00000301 +4eebad6614940750507b34846015e8fd frame00000302 +a22f81240f30a8333e0e09408799955c frame00000303 +e9678225c2b9df7c003583af35ffb61f frame00000304 +e11fcbbc43497d54d5ef3acb030a1ca8 frame00000305 +127559efc3462c4bcb2d0f1eb761e823 frame00000306 +6a98270882f8a353bee2b55e9dc38fba frame00000307 +056cf20a415ffb09a8d2a736d5ed3026 frame00000308 +82bb6a2bce28d774c714bc8799b8f182 frame00000309 +5df9e7ccbf34bc5531bacd8a12ece8ee frame00000310 +bacd1ba17a0e3731fe1df74f697054b8 frame00000311 +c407c196c9ba5ff8ffabe444c4d953ed frame00000312 +1b5d08455fda19f8ef402989b6304c08 frame00000313 +982fa0fb2da9a45ae865a62e44d9d59c frame00000314 +4d54bd47c20f723c2a99dcc49a27105c frame00000315 +e8fa371d7b63b39f73f5f6205317fc72 frame00000316 +613463c72477e820a2f7a6662d8e138f frame00000317 +0678f5c472725da3853b8002177daafb frame00000318 +1df85253f5591eb7e664f44ebe08c679 frame00000319 +5a026d81f32db106a72ff1a752928a3a frame00000320 +4c04ef80a3573f7aecd7df489eff2f57 frame00000321 +0b6ec9584bbc875444e7daf8f50c2c91 frame00000322 +3fbb535f6c84f0ac4024fe3c72765212 frame00000323 +b23f606d7fcf2104d80a9a5d117004c0 frame00000324 +7848c134e633f8c3395788ef2e03fd0f frame00000325 +efa444a7d51c020701962f223fbe5504 frame00000326 +4d865cc0fd28af65a1c9fe59d58fa1c4 frame00000327 +dd98194674095d08f4d730091d910128 frame00000328 +9d9025f5297d95ed4bff89034bcbe697 frame00000329 +c48ed1f9d49e459b90ff4b7e466d9956 frame00000330 +04a4ce5e887d174871da143daa7f4d6b frame00000331 +ff2a92222d8106212d034465f3337bfd frame00000332 +63d25de683f11e60c06bd144f9b1253d frame00000333 +b9642b7fdee4a235f7abba521f847f9d frame00000334 +91530fe3038d55d39a901c05479b37f6 frame00000335 +27ffd463be5b31125653e841a3a617fa frame00000336 +c10f5d67ac06f618f5bfdefdb077ef03 frame00000337 +bb57cd3f85cc3b6318dd48079b64ea65 frame00000338 +58bdec44c351e48558219f18d6e987f7 frame00000339 +bac925897ca0ca85a14b46bf93f3acad frame00000340 +ca38d5fdcf778d50e1885ee9f1a724cf frame00000341 +c0a2aa28400fbc07baba71e64b76aa89 frame00000342 +60c80409b72331878b0d3e3e316cfd8d frame00000343 +14da98bef97b48991bfa4d0d79a590fe frame00000344 +4a6d8156af437ca4cd59583d20be21db frame00000345 +78ca7fe259c564b168eca42ce2de3dfd frame00000346 +2fd90d80777b967f6e92a2473a8d6464 frame00000347 +f354565f8f943f3d73ad95d64ffa6156 frame00000348 +3f463e073b31d88ab7c701f62e6bf27b frame00000349 +a6104b22184ff751d3f355b4843291d7 frame00000350 +7a4fdc350bd8d524f7da97debfdc67e0 frame00000351 +a3b8ca4f0e3e423014cbdae9a9143f28 frame00000352 +5c8d89b60858450af7c0b2da5a7913ab frame00000353 +8b36634f81db979eebe68529cba7df28 frame00000354 +4db8e74635cf313ec150dbbaad0b66df frame00000355 +f4eda735ff9432569aac66847062ca94 frame00000356 +5e94edbbbeb53d0ea288f7f0b7020a27 frame00000357 +05f539a0feda5eaf614e06363927fd55 frame00000358 +e89d92b3d2680f503112a11c2cb87207 frame00000359 +d752365f2f90d44db09ef1746e14a54b frame00000360 +25dd2e34ca5462726d17e202f0f5a49d frame00000361 +280861f1f5e8386413132113ace6fe9d frame00000362 +533af2003af9b1f52818e408826e5bec frame00000363 +2592794d9debec015be9d9df7fe1c85e frame00000364 +dc069e8be6dec875468d40d4269b2689 frame00000365 +f33abffa254319a968c8782bb345131d frame00000366 +7a2bcf7557f424bc1da3a9bcdd3165aa frame00000367 +c195aaaa7cdce143bf050a31009873a7 frame00000368 +62528de05e7717b0f97a518f8e67ec3f frame00000369 +f7537fd7d0146e8d51623301a02296b8 frame00000370 +0887dbe5a3a0c84bd9b86759a8fa3273 frame00000371 +5ed7c6ee00a47a291dc08d3bed491145 frame00000372 +f5a2782b812dbe4c15a2af93aa63f0f2 frame00000373 +acd087dfb81fb2d7324095b4c3079047 frame00000374 +629b769adf033a2cf6a453700097239b frame00000375 +fdd1e7e2f0d9ca0984e659da51a63cc9 frame00000376 +550073744680fd9b0e113f01e2d9f341 frame00000377 +4a74c5f8a2a6a5b0760f2e160862e857 frame00000378 +da78d270906dbef650eec03642b75ab0 frame00000379 +3ff6b82390dd17d75fa114f1ffdab00a frame00000380 +a39fb8ccbf1845bece739afc88d4b0b6 frame00000381 +89e17ce6101ced493afe08fb98dff96b frame00000382 +2141d763cf05f6a0bd388193382e1d7e frame00000383 +5e6f3e08f4aa6721b38b4942e8c8665f frame00000384 +b8db9feb88d514155adc784c75a91fe6 frame00000385 +d5b420313d831f7dd570a327a593bee0 frame00000386 +4d0d8d2c85146d753040e90d426b93b1 frame00000387 +33f8e746637441a56d812eb6c1f05b5c frame00000388 +1557b1846f774f9986d52dd6265c3379 frame00000389 +4b1dedf484df5db477c245f8d3c658f8 frame00000390 +5dcd888c4216838b3fc2105e175b4542 frame00000391 +e148d5d2cf27da5b78f414019d4659f0 frame00000392 +1f8b4aa6811dc03a61905c9318791f1f frame00000393 +259388a2611d9c22360c66a32016accf frame00000394 +8afeee0c0bb0d8c7e21d852aa8ff1c03 frame00000395 +29a834c8beaacb47ecd39e09615a17fa frame00000396 +741d5f71568affd346bd1bc7af9c839f frame00000397 +1179db194494c0ac0e2b35fc761a2240 frame00000398 +560f78b0820cdf1aad92a4d0f538f9a7 frame00000399 +7e9dc9a9839259642750da1b86d1cb33 frame00000400 +349dbae81e21357c8ce23d997d99d960 frame00000401 +69298bfca799f93bdda382afd9cd0bf8 frame00000402 +b8ef095d451c076142729db9926f39b2 frame00000403 +99a1f663f794ff09363326082afb7d85 frame00000404 +4215e8086b6820428b21ac53989f5fb0 frame00000405 +62bddae6b216f3fe91667e3be8d27042 frame00000406 +4f712c688e6d8621f93fb7488e87597c frame00000407 +20ce21e3d84c90f8917bb0b32a6884ea frame00000408 +f77aaa562a65690b71d5e4501b81f65f frame00000409 +246e5fd1bbd28cf18c8590f070dc500a frame00000410 +065b777365ca6777c90abb176d82ba08 frame00000411 +a4ef64a4d7fb0ad150b93643b90a574a frame00000412 +f83cd52b5f75311193a3312d24506f4e frame00000413 +ecb8cb70878b790a8b40cf52248b690f frame00000414 +dfb2b1a7e76bd6bf49147c74f176593e frame00000415 +925e51384a5188b3883b13ad288c4798 frame00000416 +9de46257ee1491b0f2476dd6d08c43f7 frame00000417 +46ac1eaace4bcd0c6b0c6e9c2fd6b994 frame00000418 +65fbd39abe6a88baa642f1348c26b32c frame00000419 +2fd240f53a5e535023622dc0bf921ef0 frame00000420 +3b888a0e7f9e68e4860c9effc986c754 frame00000421 +3ba5e6226b9c03286633bbee945afe7d frame00000422 +f9a8b5494b39c9acdde76a5e9a3fd663 frame00000423 +7a0afd7cb9848e9f708c0c0e13c22726 frame00000424 +434d6ace0484494b656fe974481f7562 frame00000425 +ff13cc1391578c6cbb0d6665eb67704b frame00000426 +4ecf81204e18445ad56e870c1b50f092 frame00000427 +8060e814dc8ad91b4ee17f91b2353245 frame00000428 +282d54f8d7080489f81fb789c56be2ac frame00000429 +616f7d3f8af0d7e9033a0a3ff1e39ee1 frame00000430 +7b31d64f45edfe0f4e4e2d858647c309 frame00000431 +6b69a69e8c1229a231f11e5893212a7a frame00000432 +831c472bebe62d4e272feefaf1078ae2 frame00000433 +2a6c0167e98deb3d3195f27ddad58fa4 frame00000434 +c74c9653be8f7d7c8842621089a34caa frame00000435 +fd32c6f9bb08c988da18dae5c92cd159 frame00000436 +3f71681dbe79f51e48745d7fd5158e8f frame00000437 +a945a0963524764e6f418d4214560338 frame00000438 +1dd6a41c37181cc2a259ac4fae7aefb5 frame00000439 +c6f1b1038cb68d80207e4e8c67cb20a2 frame00000440 +10f3d00b08275d00839045d36f0e25ee frame00000441 +8b7a51eff4cfc073959eae3e449edc32 frame00000442 +f81fc0e7d1fd0581c598b274061bdf04 frame00000443 +86a65063b8c82466476c6a28dc373d6f frame00000444 +7205dc69dab370ddc4257e60ee2b3e8e frame00000445 +9f997e68590ba618a63de8f8d6a23136 frame00000446 +c1c81be9b40ad34c2b33988c1cf5c9f1 frame00000447 +0298aa5eff1a245e16bed9b6a97f0d0a frame00000448 +606fab3494e605867cc527e7e0bfcad7 frame00000449 +380530f7d3b022967af0b1c529b74c1c frame00000450 +2b1fd926b9aa0271dcf594abb4a1e534 frame00000451 +ba154d3b06fbab9c92b18e4a93d2d05b frame00000452 +78d005f124f021340c7f48007c9944d2 frame00000453 +7cf9517118a98c3ca63515d148f355c6 frame00000454 +df839ff4f5f343d4e05f28ef44b43ebe frame00000455 +e701bd960fa1432d90de8c71cd262d76 frame00000456 +73c123d6c559604d9ff3fe463e819f90 frame00000457 +3863d128d91226d2cf9b2837d994de1c frame00000458 +488375f4a671f8d93ed3c3e60cb325cb frame00000459 +21e2e62247e5ca88f4d10b543aa84ebd frame00000460 +c49ae7806208780151f6cb4a5d8da58a frame00000461 +d4e536295466c1feb31996870a5a88e1 frame00000462 +7c0b002640d27f1c8a6d133e0d3b32fc frame00000463 +7012001ece542cc6192a1cd12edb9340 frame00000464 +68bafe314a08345d6143ccb8ce9d8533 frame00000465 +6256b7f6aa50a1064f104ac026ee3421 frame00000466 +41e5539e74ad0cef6130ce7b6a73df72 frame00000467 +2d5035712b7f804f9ba17dfc529f5112 frame00000468 +64a02b592259561bb6801b9fa07bad55 frame00000469 +810d34cbb136cb28dafe961ffb6d956b frame00000470 +d77a6b41bb4de6832e332a8bf1750c6b frame00000471 +a123a94410ab3df05bd1bbe6dab2539e frame00000472 +8e05289d87331ead8455b8bb7b803428 frame00000473 +fc20825b9d9c60afc98a961e4a4e4ce0 frame00000474 +c088603cd36702e0f2a935c35906d8a6 frame00000475 +796e8b2063cb302f01255bc315f8cbfb frame00000476 +2634333e85717fb055d69a4d8c6c7e95 frame00000477 +a2651a2ab2048b425956b05c35b9bfa9 frame00000478 +2de816930d14d2551a8eef6627fc9b1e frame00000479 +f33b744baeb0169062588389c87f63e5 frame00000480 +630e0d4c85431a171951b609c272a1a9 frame00000481 +2eebac817de40b26c36a64a058e0cbf0 frame00000482 +56d1f4676fb2b3c33405f57ded811cfc frame00000483 +122f98cf81fd13e2efec22407873a7b0 frame00000484 +dc04359abda5de174e23e0fdd416b0d9 frame00000485 +e3dc98012d7d6192469ef627ceda6832 frame00000486 +ca0657b151e2a5521bf5cff878be5a90 frame00000487 +2e62940eb8971ee2a714d5a6691f81ec frame00000488 +a20a34f9ab55f24538869bf2d056a975 frame00000489 +1d3f721c73c3e09ef3e88a38af309f92 frame00000490 +a49cc74e7c2f0fb53c72265bbe907e9f frame00000491 +afb14bbe28c4973f6994da9f50a5593d frame00000492 +f6f5f76b96f4f362ceecb0d166cf502d frame00000493 +6545fa9a5f215360ab11cc45771ae6f5 frame00000494 +70fd7c82636c872941f6a25154d36b1e frame00000495 +ac92039374e6e20e7baf22c09b983872 frame00000496 +1179eb55f97ce770270e0411941b2898 frame00000497 +2deec22f9dc2926fc1ac6ca17d653961 frame00000498 +98a1ded822a822f9bdcf1d27060db782 frame00000499 +891901453cb8a278bbdd2544911341a7 frame00000500 +8fd22f83b0d3fb4b3c2442c7c416510a frame00000501 +aedc3265f0ca27b5dead64e4263f9ff0 frame00000502 +206e6da1a2682bb5c5268219e1e6fdc1 frame00000503 +07c5afefb6d5e7e207372af8432cdb92 frame00000504 +0e48e6f5759d3879d9458bbe45567b2c frame00000505 +f4fcdccae1fc96d4ffa0818d3ef68de5 frame00000506 +a51b2b33e7143dffe55eed70c62a2f4c frame00000507 +ee21a42566c0dc811e7d3990d973be83 frame00000508 +778c5137bc99bb323b34b88f54bcbf36 frame00000509 +0e05ab0e1f133b8d61d20fd52b348e03 frame00000510 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/nuv/Today.nuv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/nuv/Today.nuv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/nuv/Today.nuv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/nuv/Today.nuv.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,9 @@ +c9b8b59c67004a150969d6d096eb883b frame00000000 +f41d3b119e14fb35f0fac78c2aec91e0 frame00000001 +da38d7c31edb303accb19ef6d751e750 frame00000002 +da38d7c31edb303accb19ef6d751e750 frame00000003 +e37a87fd2f229f4f8ac606df3d80e12c frame00000004 +f8baa2402c5c31ee5df8a52757c45512 frame00000005 +58c725e3e0bfcd0e76cc55b68096ef43 frame00000006 +f6490a0638218a7123d7f5334a393636 frame00000007 +f0a5236213baa1021e9b21a1acc4d3bd frame00000008 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/pcm-dvd/coolitnow-partial.vob.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/pcm-dvd/coolitnow-partial.vob.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/pcm-dvd/coolitnow-partial.vob.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/pcm-dvd/coolitnow-partial.vob.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,15 @@ +2fe594498f8e4d34e0606ae2ad304662 frame00000000 +7b380090434de6b3dfdf002c82a4ab85 frame00000001 +1787438abfcdd2787ea94a6741f497a1 frame00000002 +d71a230e9ae0e763620e8f8c537cd84d frame00000003 +039c588f2a44eaa8cfd35fea66aae2e5 frame00000004 +9df1f79f107502a12a77b59bc2bbdc2e frame00000005 +d7e1850dc8051da17a77e62f67805326 frame00000006 +642e5f179d905be600add5308c7041ab frame00000007 +a911569f2020ec7c4753706b48957509 frame00000008 +1ea0822aeca68d37c68106e9fce0729b frame00000009 +b68de99e116c6f36619dc412be3eecca frame00000010 +05d20003c547601245f997a978e2dff3 frame00000011 +a7d3baa85039063e9a64f0527d2ff424 frame00000012 +e643815193dffb9325b91e0599c27923 frame00000013 +a7153058448b35a3d4f31d49fa37d309 frame00000014 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/prores/Sequence_1-Apple_ProRes_422_HQ.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/prores/Sequence_1-Apple_ProRes_422_HQ.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/prores/Sequence_1-Apple_ProRes_422_HQ.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/prores/Sequence_1-Apple_ProRes_422_HQ.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,2 @@ +50dc978ace7a844bde63412a93e98c54 frame00000000 +50dc978ace7a844bde63412a93e98c54 frame00000001 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/prores/Sequence_1-Apple_ProRes_422_LT.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/prores/Sequence_1-Apple_ProRes_422_LT.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/prores/Sequence_1-Apple_ProRes_422_LT.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/prores/Sequence_1-Apple_ProRes_422_LT.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,2 @@ +9f856f4bf539f189b3072665bd44e62f frame00000000 +9f856f4bf539f189b3072665bd44e62f frame00000001 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/prores/Sequence_1-Apple_ProRes_422.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/prores/Sequence_1-Apple_ProRes_422.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/prores/Sequence_1-Apple_ProRes_422.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/prores/Sequence_1-Apple_ProRes_422.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,2 @@ +b907c1c8ce48dcf89f56cc8e89852119 frame00000000 +b907c1c8ce48dcf89f56cc8e89852119 frame00000001 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/prores/Sequence_1-Apple_ProRes_422_Proxy.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/prores/Sequence_1-Apple_ProRes_422_Proxy.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/prores/Sequence_1-Apple_ProRes_422_Proxy.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/prores/Sequence_1-Apple_ProRes_422_Proxy.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,2 @@ +0a98574d70d879dc53c8ec9beac23df0 frame00000000 +0a98574d70d879dc53c8ec9beac23df0 frame00000001 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/prores/Sequence_1-Apple_ProRes_with_Alpha.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/prores/Sequence_1-Apple_ProRes_with_Alpha.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/prores/Sequence_1-Apple_ProRes_with_Alpha.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/prores/Sequence_1-Apple_ProRes_with_Alpha.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,2 @@ +4f365f0ceecee6a5675fc008cd49c394 frame00000000 +4f365f0ceecee6a5675fc008cd49c394 frame00000001 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/psx-str/abc000_cut.str.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/psx-str/abc000_cut.str.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/psx-str/abc000_cut.str.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/psx-str/abc000_cut.str.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,56 @@ +eda93bd5a66e4665c92d559f777067ca frame00000000 +e0f3f4694b879316f8e1949cc0f107e7 frame00000001 +30931c21a3575affc3e865420964294d frame00000002 +e0f3f4694b879316f8e1949cc0f107e7 frame00000003 +3fc9149c0d3ce209968dd5acccabd980 frame00000004 +09cba05eb191f34bdd73613fe6e460d0 frame00000005 +ac5e0e6df11f9e6a74dbe4ee340fadc8 frame00000006 +ac5e0e6df11f9e6a74dbe4ee340fadc8 frame00000007 +2136a0f86377f3c755b9b8e80ba8a1e5 frame00000008 +2136a0f86377f3c755b9b8e80ba8a1e5 frame00000009 +c5e30fff4597c5fb0b2198a8f063f894 frame00000010 +c5e30fff4597c5fb0b2198a8f063f894 frame00000011 +94b196e898e0e723cca081553b3774d9 frame00000012 +94b196e898e0e723cca081553b3774d9 frame00000013 +80db06083aea8fd05227ae89d6536d34 frame00000014 +80db06083aea8fd05227ae89d6536d34 frame00000015 +b21f44a4508ce99de9b3bfd652105f84 frame00000016 +b21f44a4508ce99de9b3bfd652105f84 frame00000017 +5529cf51117863e643a8330252400d17 frame00000018 +768911e6f7910d1285b095f0b88dd301 frame00000019 +8168c1a3ce3fa83fa557f1d6a93338b9 frame00000020 +e99ed7e07ca2ad7f4ed42965d0f40d86 frame00000021 +f20fb77f94aa292be70ffa27200b1bf9 frame00000022 +0dc6a649249feea4e1090298b6afbf64 frame00000023 +aba0f620a3d555018943b2df1b035f64 frame00000024 +f22faf21c3454ed633c8e3a304dd915f frame00000025 +244b66689535afcac1de995fcde541a9 frame00000026 +f8ac451bddb1e8448b0c1feb90aec5ba frame00000027 +af0f11e37eb716c91e5fdfa5e47addba frame00000028 +1a3e7f26e9fae9935ff183c43feb5b9b frame00000029 +648922baae349aeb9e415b86d7aa3941 frame00000030 +547207d7923155695dee063d5283905f frame00000031 +8ee1db48b76e67ebd555c29d6b272c0f frame00000032 +8ee1db48b76e67ebd555c29d6b272c0f frame00000033 +8ee1db48b76e67ebd555c29d6b272c0f frame00000034 +8ee1db48b76e67ebd555c29d6b272c0f frame00000035 +8ee1db48b76e67ebd555c29d6b272c0f frame00000036 +8ee1db48b76e67ebd555c29d6b272c0f frame00000037 +8ee1db48b76e67ebd555c29d6b272c0f frame00000038 +8ee1db48b76e67ebd555c29d6b272c0f frame00000039 +8ee1db48b76e67ebd555c29d6b272c0f frame00000040 +8ee1db48b76e67ebd555c29d6b272c0f frame00000041 +8ee1db48b76e67ebd555c29d6b272c0f frame00000042 +8ee1db48b76e67ebd555c29d6b272c0f frame00000043 +8ee1db48b76e67ebd555c29d6b272c0f frame00000044 +8ee1db48b76e67ebd555c29d6b272c0f frame00000045 +8ee1db48b76e67ebd555c29d6b272c0f frame00000046 +8ee1db48b76e67ebd555c29d6b272c0f frame00000047 +3b9561cfd0a98a31f7f248fcbf0a666f frame00000048 +c322112ec8111ed240122242bddd2498 frame00000049 +3facc1e8440501bf6cbd28fd22ac5f8e frame00000050 +96faf7b5a2e30c904a6809d268504ee6 frame00000051 +7a201300889152115555e4b42eed2f02 frame00000052 +590982032c68849ae13efe21818c5d68 frame00000053 +ba109bc2be3119d5832b8786e7282c4f frame00000054 +865c8c5bbc6866f063a82f0c24cfb76f frame00000055 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/psx-str/descent-partial.str.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/psx-str/descent-partial.str.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/psx-str/descent-partial.str.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/psx-str/descent-partial.str.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,86 @@ +8106be07dc6f4ca16f67c5f1a571be99 frame00000000 +93c298e85c94621a4b593174e2de2157 frame00000001 +ca98735fe1a7a46441cb8765e2fbdddc frame00000002 +7572c03a7598908bb2132f8f0078965b frame00000003 +d11fe727d33e5f873848b8781a4583c9 frame00000004 +3afa644f637a2f64984facc2f180af99 frame00000005 +357be21dcac3556e54f554c0eaec9d32 frame00000006 +ad5358004ba3832930e9c4d0be169eb3 frame00000007 +1a99572091505cb28de4bc114babccb3 frame00000008 +4b7c0f6c2cf2f03da2f3ef136cd8a405 frame00000009 +3fa4fe153994b5424052f8941156f95a frame00000010 +90021883075abdcf1dae779edcd04b3e frame00000011 +b466c6827cd9408f0ddc476f1e7bfb88 frame00000012 +fbcb858f074594033a645cc21deadd4e frame00000013 +01484498fe8505e3b4a6b4fb5f6e6b8a frame00000014 +4640216496779adc4a2374156b7ded91 frame00000015 +a5155c7e0ab45a08c032dcb9f0a8af5c frame00000016 +1204d40db2876546285a739521feca41 frame00000017 +abd98b2dc24c52d9962688c5ac232e83 frame00000018 +b3b1ca10d2134c1a93f0bcb61653e3da frame00000019 +60016ab91b7e476450ab9c0c690e2656 frame00000020 +583a3871b75c2975cceb804d0b96f89f frame00000021 +9b467b5d753a4ade8057501c8391f562 frame00000022 +7288ad76aedd4816d9baba6c245c8ac6 frame00000023 +58a4ed37ac7078d126e0feed82265e81 frame00000024 +c8526bec7e87cf8919a02003dbdd844e frame00000025 +b1e75d5904b972be9935360717d0e6ad frame00000026 +232d0d7c1b10900d387d5ebad6554868 frame00000027 +60744afacbf63e518eea4f83ff6c138c frame00000028 +5305cf65fa60fd72b7babce9c4ac5e99 frame00000029 +0dfa585eae8c407404850717accde08e frame00000030 +9691827609210f04a671046e50c76181 frame00000031 +43a5f7ea4d90197d5d38746d26bf6816 frame00000032 +f9224df8d269559f0eda115436bab433 frame00000033 +6ab76a71f5385ff17b33da488c53a5d4 frame00000034 +47c9bed8f103199aea6259ecd4cd57a5 frame00000035 +8d891320bc8d80bd46b7be5d5071c04c frame00000036 +f4eb55b09b2d52975a1a48333ceb6f60 frame00000037 +fc9a8545c5b5f454100d504048a59d86 frame00000038 +d7c9fd302892739197625fc12c7af823 frame00000039 +baea2261f98cddefa286ea55beefa5fa frame00000040 +2f69d94bdd14e416a8c596b67bae1780 frame00000041 +b737aa55700762a42c3c8901341a360b frame00000042 +7d3fad07ca95275032eed01211f5219e frame00000043 +a6f07ffd2f4c13c7c31c3fd10be233aa frame00000044 +6741a9df82d2e6918230f921ef536af6 frame00000045 +5bd92dfe5e300c01a5922a3338402c45 frame00000046 +120d2343c7de7f54b8b035cc04c04808 frame00000047 +1c55c0ffde54351b979659ad21a96e72 frame00000048 +83f7174b77b2e21b01d66f54eea12d58 frame00000049 +0459fcc231704852fd671ae7785677f6 frame00000050 +74b9b2f8c6fb9b2418031f5f0cc3b1ab frame00000051 +05b9540cfd99fa8b20e3685345a0fdda frame00000052 +c2ae6c05d87f03df380f9fd55468cdd6 frame00000053 +439896a90caedfa0f118b9b068e6a859 frame00000054 +b84a9a66205d28192081cc2128a22e89 frame00000055 +b60729484f161878aa89140b13dd78a8 frame00000056 +39e163bbad488bffed1ab8048b3f28c1 frame00000057 +cec2523194cd6d76249b9352bbc16a78 frame00000058 +72ceac22e0d7e9c3b70304ebe834ecbf frame00000059 +97896874ccc03e57515492c81b3b4246 frame00000060 +f938370efe7ad9d6a55b1298fd63ca66 frame00000061 +03b3185032ca1fad753a51ebdcfede90 frame00000062 +4a9e090583fea967a6b3760eafd8a81b frame00000063 +fb747b8692fd7bac29bfb9323e284d6f frame00000064 +9581d722978f271255bdafa52d12249b frame00000065 +b6fbcd7af9824bae0fc179d366b1f7ce frame00000066 +b3b3f59a9e31b057921e016c669a77ba frame00000067 +1f55c0fda4491d926d99cd634654ee9d frame00000068 +d78b9721cb97fc4a099f80c3ad422464 frame00000069 +17aff1591af516a4f1ed445da52a363d frame00000070 +52128a3244ee1e5bb128ab71d4323fd8 frame00000071 +3e2c51e7d8cabdef77b55f11611a2ec3 frame00000072 +f7d9a370c4cc35da6ea44a3d70c66992 frame00000073 +37e0f1a855ecec8260ba1344660c522c frame00000074 +4c8edc78224e1088e039102e8555b93e frame00000075 +e4c2dedce20dbf157ec6f7e4dd361fe6 frame00000076 +571b6357a04c1ceb4bcdb40ee1bc68d8 frame00000077 +3ffbfec1e40044f1b7d1bafdba106411 frame00000078 +a7ea4060383d47fb3dd860539b337b28 frame00000079 +7ed35cbcd81ae0f33a7f1060283eb19c frame00000080 +df9c855ce743f02a09f85bc7ea0f0210 frame00000081 +874e8d8d7fe4b47ff6c1fc3e18343930 frame00000082 +9131fb4c53769612dfa9e4a1473da343 frame00000083 +76509632f87c8e57019bd7761be6c098 frame00000084 +0d1d88e3010986aac98822ab9d4302d4 frame00000085 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qpeg/Clock.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qpeg/Clock.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qpeg/Clock.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qpeg/Clock.avi.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,100 @@ +bb5ac191fe62d31d4e2a7b78f6d189d2 frame00000000 +e449c09547dcf5a3be58ed5d2d413d22 frame00000001 +2c3e3a99ddc9eea44f2ebd221a454909 frame00000002 +9cce074f2c52533f37f11e1fde08f625 frame00000003 +56de88ad0bdeb6dea6251bb062664dd8 frame00000004 +68a3bfa8ca9b064582f42b657fa672a5 frame00000005 +21e1568999ad542d14a62d4cae006024 frame00000006 +a22666512a0adf2b67adb55b32d36904 frame00000007 +8389e4ef23422ee12692505251c28ef5 frame00000008 +580d8aab4a05430be1961f68d0116fc1 frame00000009 +0f06d9e5d4a84b211328e4666e27072e frame00000010 +4835bf648bfa319ebbc5bcec0dcc5337 frame00000011 +f0d43749d37fb0297a7b4885b2d39a7d frame00000012 +fef0f91fcce60af36dcd96cae99430a8 frame00000013 +134fcba62233b410ac222bf872f9c46a frame00000014 +7d3c90532935358b263937c63f3cd371 frame00000015 +b78580a8a2f1c7004afef35258e695d7 frame00000016 +78d959d03346c7bef3e5ad8ca38af40e frame00000017 +6dd62939cc480530e2b48193651ec302 frame00000018 +c1f8b8f3ff8e674a81adff58ba591a7e frame00000019 +37e4d33c9c6d344a887cfc9af1a4efe2 frame00000020 +a57c304d1c981dcbed7fa875996fdac5 frame00000021 +b8b6d8266b5b764f134d53ff405c551f frame00000022 +de59a2e6d87efcee052578511a5e334f frame00000023 +aada6e0236f9a3dbdabb48ca2f2ac448 frame00000024 +af44404e46fbd737c546400ad058fae8 frame00000025 +0f5b737724b5deeda51b0712245bf2a7 frame00000026 +e14b9a5cea150c328df78f73bc11a6d1 frame00000027 +c7bcfe9954ab42e1854115be8b269cc3 frame00000028 +c56c58e403c0d9621c480b53b1e6b235 frame00000029 +3915cfe3e8a9bc94501c231fdbb3c38a frame00000030 +0e18b5f5b102e636577c332789f8cbf8 frame00000031 +eda5c550860e8e18c749fbb931ec1367 frame00000032 +a7658fbf3d6eae1fd5e1db115609bb1d frame00000033 +d297798c1507e562d1fb52b7a9a597c6 frame00000034 +39b66309436c3afb2091cffc31210f5c frame00000035 +1dd027bf0d0035a9af4ad41934eb9a13 frame00000036 +757a846fa1603d8186feff21dd997eaf frame00000037 +6224109a8456ebaf3dc4365bc5deace5 frame00000038 +00632383ab5e2eb6fbd40c3a15eca77c frame00000039 +03d9c849bc6e1bbc30557857a2c340fc frame00000040 +a9f1ba2720948c73b2ff949f20ba4d5c frame00000041 +000b33631c072220f987a9126dec5c62 frame00000042 +2cd5b4a6ee22ad83bfea8ef907691fbc frame00000043 +d6908e3df1e3e2963dfa906b8aaa3f40 frame00000044 +de6e8298fd297d0b0edf2b9ce295394b frame00000045 +501b72696c43ea0b92acc1275af4eeb7 frame00000046 +e4ad545a758ab011fcfa313408680ea2 frame00000047 +5d681ffe957fe46d23cac90ed05a54f7 frame00000048 +c25c85bee65fa832c175ec1d324f18c8 frame00000049 +ab8360cd87dea971528aaf85021fe6c8 frame00000050 +6561a25617d7ca8b89b0111c2ee38005 frame00000051 +caf6a34e4c4f96a9f9b424fbfbf88e18 frame00000052 +f88701c85531645105a30c978e91f7aa frame00000053 +28fc3c64b6d376ca2fdc7e844770caf4 frame00000054 +5ddd71527a867fb34216a5b8c353e7cf frame00000055 +fec48b05eba1260caa2ae2b50dad0a06 frame00000056 +78170c1bdeb13e47ccd0c6760b67dc01 frame00000057 +1c6c315c73f609df6e80c1a261367d74 frame00000058 +33a91134977b2d372100be2c04c2ed49 frame00000059 +6a30194faf54ae7e5e61811140bc379a frame00000060 +337560e60036364a74d4ba3dbfbccd7d frame00000061 +a112ba5044f59b0de658af80bfa7cbd2 frame00000062 +82cf1eec72013fb60a73842f7c2aceeb frame00000063 +ab4941e5845b2944da23e76dd9a88813 frame00000064 +9ac527f03dcf838da64c1857a2f6dba4 frame00000065 +067bf75606ca477bfdd3ce3d29bf99f0 frame00000066 +3b6a330017d677149baea8c903d524a1 frame00000067 +f45d97849a149b0a666a8b1c42dc1297 frame00000068 +0b7ac61bbb0c830e5cc39fb40c0e23d3 frame00000069 +8caa5d1dfbd76ef339f1533e327c49ad frame00000070 +3bf3a6bdbb73ebf3d0f89bad54de3fca frame00000071 +3c52a176345b040ecb07178cce12cbef frame00000072 +a3f605839d8a95683ac2f915a026aef2 frame00000073 +7556a101698b64b42bfc11697f33a47b frame00000074 +47e156d0c52ef8764e715a06eedb9b6c frame00000075 +9671bcf35ebb60b4217ceecb6f67026f frame00000076 +b23b9331ce9be588275f12b50f471c92 frame00000077 +32e407fc210c9420556c3dcd855d6cab frame00000078 +2cba78a427121dc0c0c8696fd31f6139 frame00000079 +c0a88b8ee0291011c71be2dde6b26751 frame00000080 +3d8259f72ca6b35033ce2637a1670ae6 frame00000081 +6d01275cbcdf7cbff4b2723b89476f58 frame00000082 +808326ca24befba8cfd9fbc7014df14f frame00000083 +88431eec684a4d9c71e2b0fb62095bef frame00000084 +04d706adcdeaed164a396e69625ba7ec frame00000085 +f307f5090c2b4919033f4fc216a834da frame00000086 +397502efb6996021a5444e31c3ffd251 frame00000087 +68d4c27d22c5540066a6bec5e12930f4 frame00000088 +1ac376d1f6198ff7a89790455378bcdc frame00000089 +975e338c10d06518c23e78197ab22268 frame00000090 +3272acd8f48aba806190169673d8a63a frame00000091 +2a3ed670b71640e51fadaf87841bcf36 frame00000092 +6e86d38c295df3031f469d7aa5f8102f frame00000093 +7a168fd2e745ff7a865fa9482072b77f frame00000094 +0eca9f241cdaf5d4b9974ef0ae49f56d frame00000095 +8cca67dc0dfe329f49dfe6ab7f50fe2e frame00000096 +efb78c7534ce172474bb0c1d193075bd frame00000097 +e5030437a2d78bf16e822ea260c2ad5c frame00000098 +dc10a86788c968ca5f0c2065a17ff874 frame00000099 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/aletrek-rle.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/aletrek-rle.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/aletrek-rle.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/aletrek-rle.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,34 @@ +4782f1e288ef50e23525a06eac5def8d frame00000000 +b0f0960569b189b9e78c93fcf4afcec5 frame00000001 +7aee5a644d6859ca9b9812c64546554c frame00000002 +351610e117605e570b9eb0c8e0387c7d frame00000003 +86ca086374beaea5b8e5f3962c5851fb frame00000004 +cf2e8861a0dab10af732e2b5e67ecfc8 frame00000005 +3eeec32e9fa10546761102ee95916bdf frame00000006 +a5f0bd413b0fedc6f5552ae9ef48928d frame00000007 +664f0b6b6d2911d1766573dc7ce3b49f frame00000008 +3dedbaf30045d13e0eb16312fd55d28f frame00000009 +cd972b0c2ef9eb55c30cb1fd6e73a0f0 frame00000010 +e36e496594e161ac699e436158aea35d frame00000011 +a2041f4db78421f3c9a99f31f79a2117 frame00000012 +0040d07c38bdccfc1c5a85dccd0374d7 frame00000013 +6cfff9c83481c1c4f582729738754b91 frame00000014 +61fe170368af55bf2c651838f61cbc26 frame00000015 +319f3cff2677b3723a21911c64ee8621 frame00000016 +0bd735d7076f191dfc477bd900c7a31d frame00000017 +c1189ac8b288b27ddf39224674aab5e0 frame00000018 +428caadca771f8a0a9edc0372698d6f7 frame00000019 +cf5a19019630474370083ec02b89e3c0 frame00000020 +35b0e4e32bf0efd1c0b49cce8ff85eba frame00000021 +5d06431d2c3bdc03646ec35347280d27 frame00000022 +bf0df492f9f2564ba440547aade86564 frame00000023 +f2ea38bd362a0f487c87296913b9e806 frame00000024 +f38fa7c624d70456fad70f059a16de36 frame00000025 +9b3ba8e377c6ed32c3af18a2a45335d3 frame00000026 +969a2a636f0029fd75a129f656ae59b7 frame00000027 +7cf05f29c3e8b231717b23f293e2461d frame00000028 +42a42623cfcd06ffc21023bba0da3cf9 frame00000029 +d1e07d0c729ac448e95a7c472a71a0c9 frame00000030 +f7b600907ad55f3b479d62dab4c9cb3f frame00000031 +255b2615ae76e9cfb039801d94385e11 frame00000032 +a11032c07b77d634a9df5cf9e5058039 frame00000033 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/Animation-16Greys.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/Animation-16Greys.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/Animation-16Greys.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/Animation-16Greys.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,38 @@ +4ea3bcce262d15270575ce34071dbc33 frame00000000 +db636c38785b8de63ee3845f40d7c66a frame00000001 +130e42d98ea29aebe2780b58074ea5e3 frame00000002 +cdf3bd26adc3901bccbef33ef58e3601 frame00000003 +b3a30259b7c45d4e4da4dfd710fac7c7 frame00000004 +032cac1fdd35b595b8d20df232a4863a frame00000005 +da92497e8205f48de99f0e0a24fba33a frame00000006 +3a8946bb726917cc5cf870103b12f596 frame00000007 +08371ce247ca6aed58679b654f346c98 frame00000008 +56150f4c2cb20c7c7293de98c923bc3b frame00000009 +276709f3e22ad4b090d75acf039a6f24 frame00000010 +f86c536823f1e95feaf765cad5dd8cef frame00000011 +c4882de2166c109dffe3550d5bbae0b4 frame00000012 +2e8d27583eae8cb6b4648ffc71fc84c1 frame00000013 +155394176ba90ae7f1e444f260562ccc frame00000014 +c5c72499bf42ccbbd748f3d91f938b53 frame00000015 +f98d689d7e36869c6cb47b7ec5a660cf frame00000016 +d85baf6a0fb47ab7410dd12da2fab8fb frame00000017 +4d4d75fcae528ba22f1697ae25d6cc3b frame00000018 +70a53bd7d93334a9eb46f137c7ecfd74 frame00000019 +c0369aa14b037801d675422a8bc6ee01 frame00000020 +b2d76f6da5e0f143892744d15efc46f5 frame00000021 +9ab23c9f464d40500a87b1274d36b314 frame00000022 +9d610ed01dc05423d143cb86a695ab73 frame00000023 +01c2bf98386e792ef036e3b3479463ec frame00000024 +050fe32db14ec19db9ef5ed013c0e8d1 frame00000025 +64775b624f5173868b319ee2ad8590f8 frame00000026 +44b6afca571795a50a4aad88e49f83b9 frame00000027 +ded4c232420052ad161205e5a63d00eb frame00000028 +3c949b3fd06bff39a53cf3e0b9497e10 frame00000029 +0e68feb419bf232a7cc95fd3dfa0657c frame00000030 +3e677f61defab9e8431d3282b0f83fdc frame00000031 +7e4549eabba40f519f1efd67d33ce684 frame00000032 +94b9e806918ab45cc21c81bb1cc37dc3 frame00000033 +821ad254d9c1e36c6d9e1b2663d732eb frame00000034 +63559c4922527e509b937e1b01c28308 frame00000035 +5322cf0380b5746f959a686ec1ea6997 frame00000036 +5a106e62b7b6477cc0e32b4511f71cdb frame00000037 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/Animation-4Greys.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/Animation-4Greys.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/Animation-4Greys.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/Animation-4Greys.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,38 @@ +460339f4baf26cf86a3fb02c89c0e895 frame00000000 +959c2a213a53816a9a3fcdf982fdfe45 frame00000001 +afc56be4af5618380fb11a7888ad51ce frame00000002 +ca7a4d6518edf95191802a4c26443d62 frame00000003 +f553a553bc750839cf6697850b7eae1c frame00000004 +0296f46a8711ede8107d77da2b6e9796 frame00000005 +0fcbe3bb8f1619e8795d8412c462b56e frame00000006 +7291763f7756d8e11b4c8607ef0223f7 frame00000007 +ea0876b775b33f1ef2efeae5c161faa1 frame00000008 +28c0de51b9b8349c8adb24bd6bc52084 frame00000009 +a3e2c95909326898fb8db4d33544480f frame00000010 +2b70b7cd74702dbeaf2978f7d17af74d frame00000011 +062be3a99f59d56fc4bddc8674d80696 frame00000012 +86e9465a7afd1770e5604c63eb53d27f frame00000013 +68e9badebbdb565aa48c09e74e1a5822 frame00000014 +857a43beaf16940fd2ef73c1d08d4a70 frame00000015 +298086fe534db0cd9afb0dbb5a204b00 frame00000016 +39fcb3144169833a57df0451980b1b58 frame00000017 +8b3e7d0312dab736a6203782df8e2558 frame00000018 +5a0ffd902c16ee6ea3a5228097aacc0c frame00000019 +b80bb5ffd164c5c108a99782f2d347b2 frame00000020 +f795bb8dca8f0041eb031a1013473895 frame00000021 +2d9b2d1d90614872c3bdca433602cf8c frame00000022 +8fda25d53fa6c12dc8644138a921f640 frame00000023 +e8196d55710c852897d95582cc4c9093 frame00000024 +b6ec02d714477850d77bfbfbeecbb131 frame00000025 +261e6889dfbc93aac18030c0a243aa72 frame00000026 +23065406ad54b02f6d5eceadc092a2fa frame00000027 +5643fc2c6c8fc158df751d92daa9e5ab frame00000028 +a1fea3fca1b53a84053b2c086cae2715 frame00000029 +8b0c68c096b0a37883cf6d2e00afd9f3 frame00000030 +a7e865bd30ef4bb0d9951d39ab9fbc74 frame00000031 +ca77e786b48f0b6c361520f3ac6ca458 frame00000032 +17ab9bcce5d49b036bdebb96480bbfa5 frame00000033 +fc547b615fcd8234d483c7c695b7c4cf frame00000034 +b5a5c4163d8e276fc773897541ef2499 frame00000035 +4567b9c1cbe7ef580c4a4357da69c4cb frame00000036 +90032a9962089ee6f05b4b4957e1bd2e frame00000037 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/criticalpath-credits.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/criticalpath-credits.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/criticalpath-credits.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/criticalpath-credits.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,167 @@ +f7027400798b0576dfa83182a3db8da7 frame00000000 +f7027400798b0576dfa83182a3db8da7 frame00000001 +f7027400798b0576dfa83182a3db8da7 frame00000002 +588a95159ec248a8db29b24f9e963a47 frame00000003 +588a95159ec248a8db29b24f9e963a47 frame00000004 +eb6d89a14520731254181fb2f101ea7b frame00000005 +eb6d89a14520731254181fb2f101ea7b frame00000006 +eb6d89a14520731254181fb2f101ea7b frame00000007 +bdbd968f2db1602e4fb005ecc27aefeb frame00000008 +bdbd968f2db1602e4fb005ecc27aefeb frame00000009 +ff9dc0d2ead851cd4c55a65ab5c5d298 frame00000010 +ff9dc0d2ead851cd4c55a65ab5c5d298 frame00000011 +ff9dc0d2ead851cd4c55a65ab5c5d298 frame00000012 +83ff018ddaf370f526c2fb3b266f31cf frame00000013 +83ff018ddaf370f526c2fb3b266f31cf frame00000014 +1d517bd41081180c1152e43bf5faea14 frame00000015 +1d517bd41081180c1152e43bf5faea14 frame00000016 +1d517bd41081180c1152e43bf5faea14 frame00000017 +797f67b62558a67c8bd421d811d12140 frame00000018 +797f67b62558a67c8bd421d811d12140 frame00000019 +5659fbb8f4011ebe26f1e34c8e3ba127 frame00000020 +5659fbb8f4011ebe26f1e34c8e3ba127 frame00000021 +5659fbb8f4011ebe26f1e34c8e3ba127 frame00000022 +9a8697da775e3ef8be55993962ddd791 frame00000023 +9a8697da775e3ef8be55993962ddd791 frame00000024 +6fdb7ff7c71726f77919a5e3d76a4749 frame00000025 +6fdb7ff7c71726f77919a5e3d76a4749 frame00000026 +6fdb7ff7c71726f77919a5e3d76a4749 frame00000027 +cf466c50afd4220c12cd2eca8ae2832b frame00000028 +cf466c50afd4220c12cd2eca8ae2832b frame00000029 +f9bca4fc7a98ba6dc63b7d02f99ad077 frame00000030 +f9bca4fc7a98ba6dc63b7d02f99ad077 frame00000031 +f9bca4fc7a98ba6dc63b7d02f99ad077 frame00000032 +8a32c6024185a73c769150784b9419d2 frame00000033 +8a32c6024185a73c769150784b9419d2 frame00000034 +7f5d727a50bd6f53bc4fcbddb4e09235 frame00000035 +7f5d727a50bd6f53bc4fcbddb4e09235 frame00000036 +7f5d727a50bd6f53bc4fcbddb4e09235 frame00000037 +7f5d727a50bd6f53bc4fcbddb4e09235 frame00000038 +7f5d727a50bd6f53bc4fcbddb4e09235 frame00000039 +7f5d727a50bd6f53bc4fcbddb4e09235 frame00000040 +7f5d727a50bd6f53bc4fcbddb4e09235 frame00000041 +7f5d727a50bd6f53bc4fcbddb4e09235 frame00000042 +7f5d727a50bd6f53bc4fcbddb4e09235 frame00000043 +7f5d727a50bd6f53bc4fcbddb4e09235 frame00000044 +d828c390b11ede110dcf5d9b3ee9d078 frame00000045 +d828c390b11ede110dcf5d9b3ee9d078 frame00000046 +d828c390b11ede110dcf5d9b3ee9d078 frame00000047 +0b6e81dda6796ad33e23953b97235c73 frame00000048 +0b6e81dda6796ad33e23953b97235c73 frame00000049 +7cb1896aab0137eb3a54c39f63e9a7e4 frame00000050 +7cb1896aab0137eb3a54c39f63e9a7e4 frame00000051 +7cb1896aab0137eb3a54c39f63e9a7e4 frame00000052 +c3e5c04d3ae2a23c13f90a2ff143e6ac frame00000053 +c3e5c04d3ae2a23c13f90a2ff143e6ac frame00000054 +4554c86228071c119ee03968aecb27d8 frame00000055 +4554c86228071c119ee03968aecb27d8 frame00000056 +4554c86228071c119ee03968aecb27d8 frame00000057 +0da160ee2b17f4f9e8acb94f16c54931 frame00000058 +0da160ee2b17f4f9e8acb94f16c54931 frame00000059 +0fb42bdbb3e05f0a11968ddca9fc1ce8 frame00000060 +0fb42bdbb3e05f0a11968ddca9fc1ce8 frame00000061 +0fb42bdbb3e05f0a11968ddca9fc1ce8 frame00000062 +2b049e498cfa9af4c495537f2ed3b011 frame00000063 +2b049e498cfa9af4c495537f2ed3b011 frame00000064 +e6be4970ad876aedf8cd93baf8be005d frame00000065 +e6be4970ad876aedf8cd93baf8be005d frame00000066 +e6be4970ad876aedf8cd93baf8be005d frame00000067 +1de5e2fcf890049a86a5c5a2b4f71839 frame00000068 +1de5e2fcf890049a86a5c5a2b4f71839 frame00000069 +70dfe99fefeaa210d25ae2d0ed2a2b78 frame00000070 +70dfe99fefeaa210d25ae2d0ed2a2b78 frame00000071 +70dfe99fefeaa210d25ae2d0ed2a2b78 frame00000072 +ed6e50889ba1ebf6e622e813958a5910 frame00000073 +ed6e50889ba1ebf6e622e813958a5910 frame00000074 +758065164c33d82255a348e532a0ca3e frame00000075 +758065164c33d82255a348e532a0ca3e frame00000076 +758065164c33d82255a348e532a0ca3e frame00000077 +58ed5b6e76783d65acaf5f75207d14e5 frame00000078 +58ed5b6e76783d65acaf5f75207d14e5 frame00000079 +ba4d6d1a925bca2c20ce8f089552439f frame00000080 +ba4d6d1a925bca2c20ce8f089552439f frame00000081 +ba4d6d1a925bca2c20ce8f089552439f frame00000082 +0553c1647f3c9792ddc0da3d995461d8 frame00000083 +0553c1647f3c9792ddc0da3d995461d8 frame00000084 +0553c1647f3c9792ddc0da3d995461d8 frame00000085 +0553c1647f3c9792ddc0da3d995461d8 frame00000086 +0553c1647f3c9792ddc0da3d995461d8 frame00000087 +0553c1647f3c9792ddc0da3d995461d8 frame00000088 +0553c1647f3c9792ddc0da3d995461d8 frame00000089 +0553c1647f3c9792ddc0da3d995461d8 frame00000090 +0553c1647f3c9792ddc0da3d995461d8 frame00000091 +0553c1647f3c9792ddc0da3d995461d8 frame00000092 +8689de8daff04032abd84638523d4f02 frame00000093 +8689de8daff04032abd84638523d4f02 frame00000094 +aa80e0cc9546a8cc1fe619070f9cea33 frame00000095 +aa80e0cc9546a8cc1fe619070f9cea33 frame00000096 +aa80e0cc9546a8cc1fe619070f9cea33 frame00000097 +2418db70aa1483fa34086a21a546738d frame00000098 +2418db70aa1483fa34086a21a546738d frame00000099 +d2cae20611e9d7dc30d0da114f995483 frame00000100 +d2cae20611e9d7dc30d0da114f995483 frame00000101 +d2cae20611e9d7dc30d0da114f995483 frame00000102 +3586eb3eb98ac3a1c36678eaf5c3323f frame00000103 +3586eb3eb98ac3a1c36678eaf5c3323f frame00000104 +960622dae98227035e79dbbe8e2fd9fb frame00000105 +960622dae98227035e79dbbe8e2fd9fb frame00000106 +960622dae98227035e79dbbe8e2fd9fb frame00000107 +d3da2df50cf9e4fc254167a6fb0d1c59 frame00000108 +d3da2df50cf9e4fc254167a6fb0d1c59 frame00000109 +64f146bb6fe12fce4dc7fe7cd85a3689 frame00000110 +64f146bb6fe12fce4dc7fe7cd85a3689 frame00000111 +64f146bb6fe12fce4dc7fe7cd85a3689 frame00000112 +bd1d293fa9b18862548bdfef19c67ada frame00000113 +bd1d293fa9b18862548bdfef19c67ada frame00000114 +ebde91b90dcc84995ef6d2f778964415 frame00000115 +ebde91b90dcc84995ef6d2f778964415 frame00000116 +ebde91b90dcc84995ef6d2f778964415 frame00000117 +c6a59d1693f3a0cea2b742e2fe085a9a frame00000118 +c6a59d1693f3a0cea2b742e2fe085a9a frame00000119 +025fde57eec73b356e1ae888be9546d7 frame00000120 +025fde57eec73b356e1ae888be9546d7 frame00000121 +025fde57eec73b356e1ae888be9546d7 frame00000122 +992f5500a4e944c0931f783bbfce8ad9 frame00000123 +992f5500a4e944c0931f783bbfce8ad9 frame00000124 +8081979ddcd0e6a2721651e38c68fa91 frame00000125 +8081979ddcd0e6a2721651e38c68fa91 frame00000126 +8081979ddcd0e6a2721651e38c68fa91 frame00000127 +8081979ddcd0e6a2721651e38c68fa91 frame00000128 +8081979ddcd0e6a2721651e38c68fa91 frame00000129 +8081979ddcd0e6a2721651e38c68fa91 frame00000130 +8081979ddcd0e6a2721651e38c68fa91 frame00000131 +8081979ddcd0e6a2721651e38c68fa91 frame00000132 +8081979ddcd0e6a2721651e38c68fa91 frame00000133 +8081979ddcd0e6a2721651e38c68fa91 frame00000134 +d1528a8cd4e2ec6246e1f6aa6a70a041 frame00000135 +d1528a8cd4e2ec6246e1f6aa6a70a041 frame00000136 +d1528a8cd4e2ec6246e1f6aa6a70a041 frame00000137 +6fc9b2cc27aa819078f8b5acfdf47130 frame00000138 +6fc9b2cc27aa819078f8b5acfdf47130 frame00000139 +4b005d67fe61ff2444276d6cdabb70a7 frame00000140 +4b005d67fe61ff2444276d6cdabb70a7 frame00000141 +4b005d67fe61ff2444276d6cdabb70a7 frame00000142 +b3b9015d65c5703fbdfae549eb08cea2 frame00000143 +b3b9015d65c5703fbdfae549eb08cea2 frame00000144 +307fcf2282a63116fb149a1c23dc5fc4 frame00000145 +307fcf2282a63116fb149a1c23dc5fc4 frame00000146 +307fcf2282a63116fb149a1c23dc5fc4 frame00000147 +f9454178cfb34231d723b0ede5838550 frame00000148 +f9454178cfb34231d723b0ede5838550 frame00000149 +56a6b31212fe2d4345068f7b4f183f1a frame00000150 +56a6b31212fe2d4345068f7b4f183f1a frame00000151 +56a6b31212fe2d4345068f7b4f183f1a frame00000152 +dcd4d4d145d45f21f8cdd65b4b46f6f9 frame00000153 +dcd4d4d145d45f21f8cdd65b4b46f6f9 frame00000154 +4246ce971bf6fad57ccd50fc340a629a frame00000155 +4246ce971bf6fad57ccd50fc340a629a frame00000156 +4246ce971bf6fad57ccd50fc340a629a frame00000157 +cc86402ec39ac1842261b27dea2d8b91 frame00000158 +cc86402ec39ac1842261b27dea2d8b91 frame00000159 +ab39de07150a20e5ba8c53b890252d80 frame00000160 +ab39de07150a20e5ba8c53b890252d80 frame00000161 +ab39de07150a20e5ba8c53b890252d80 frame00000162 +caee0baa19abd8e49b506236eabd0ce7 frame00000163 +caee0baa19abd8e49b506236eabd0ce7 frame00000164 +6c8485cb8a030625753a57e28dc0a423 frame00000165 +6c8485cb8a030625753a57e28dc0a423 frame00000166 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/mr-cork-rle.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/mr-cork-rle.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/mr-cork-rle.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/mr-cork-rle.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,83 @@ +c910b4b99b52af74e79bbf6ba15ef15c frame00000000 +6d8910252e83c67ad8eb50b0836a5ed1 frame00000001 +54f33d6902311e7e89fdeac17bf8dbf5 frame00000002 +c8b8f6fe8bc9b6b5f632a0a821b07774 frame00000003 +37b80d562533bbee6c83f227ad0aa730 frame00000004 +abd3374f148276af917ada07a2c38529 frame00000005 +7eca1eb7cc32dcce44e128096e4d9548 frame00000006 +1701365c01e9d18eb8ff1b56947a119a frame00000007 +a15bd7805f81ac6d850574f3fd2c21c3 frame00000008 +28c18cdb5e2904bfc26ec69c37283a75 frame00000009 +ec98c20a924165898c61b3e92687fc17 frame00000010 +0b1fd9d93a9cf4ef9f36c5ed112c90e7 frame00000011 +5fbc856289ca000f824766d7ce117dde frame00000012 +6722cea99f2906a7a1c21b621a6364e5 frame00000013 +8c7da8572d351405132a05b83c8c8fbe frame00000014 +b669a56fb17e75954bb9bf56e5586c8b frame00000015 +af135c0f1d16b8df661abe6725b62931 frame00000016 +aca2de9ed1c21146552aff3be5a0f170 frame00000017 +462ed24b30f9cdea65bcc3421dc44c9b frame00000018 +dc98501d159be474ff54948850fcc515 frame00000019 +b25cafa60c332b55a252870789a55d86 frame00000020 +cd480fcbacea5ab4abd5fe5f366e5ca4 frame00000021 +e24755c6cf5e7566b82096f5a933113a frame00000022 +7bef26c0a638cf5ace02491fe5fa60e8 frame00000023 +2b9e5e3f498e48ed03f498f059808266 frame00000024 +21ed6b5a69d240cff0213f46741a07c4 frame00000025 +5ef34b9fa3dc7896fc89284b6f02d63c frame00000026 +fae1d8d1f71ca59dcac5f37ea5b8fb15 frame00000027 +edcef41ba52faad66502faef9886e8e9 frame00000028 +654413026968a606b25911a81223aa4b frame00000029 +33a6e97495046b5d862dc8fbcfe149c2 frame00000030 +3a2fa66ef3b5caaf9a422aec91ab1e9e frame00000031 +41eff3b5eb6da0573685873f6f594003 frame00000032 +486209a843724e4069b608aecd36aae7 frame00000033 +c40d20cbdbbabbdf6e95b6a711d27481 frame00000034 +237d72067ed86451cf2fae3a70ea3dc7 frame00000035 +247bbbf1a6039539704fa004f467b246 frame00000036 +48b1ec13336feb595af867566d682e0e frame00000037 +964acf08f1d500513ff551a701150f15 frame00000038 +b6789868da5ffb712e20f002b22dc7fb frame00000039 +a88d485d9b8b3b646a838c8aefc5304e frame00000040 +b61e5f49e77ec85514e7f62c0167f316 frame00000041 +647213e1a43470442b29c153e6dbda74 frame00000042 +d6aee3d2dcab464a22d03632d60ef7df frame00000043 +9890cc4b3238e418fd80d686cb1db51f frame00000044 +cd4cf7e48a69697e12eaf8dce89a0fa1 frame00000045 +8b561e5a2cd8d45037dc0e6b48545e4f frame00000046 +e972815112f2d857b716e9ea655fdcc5 frame00000047 +7c3e0862e76abcbf5083f18d6dc0c371 frame00000048 +c640524aa36d3f7d099fc76eedd48a1f frame00000049 +f4dae14c2afa246e42e9057b5ebdb124 frame00000050 +caf989e77b980cb19f602cd18b041658 frame00000051 +beb3bb9c616afb619876ee4ca4028a30 frame00000052 +a6fdf06bb5820ba367daca3eb71b70a0 frame00000053 +b4d95afca9d6c9f051efdac7f22959f3 frame00000054 +ee6d359629fcd317392ff5ce34405fe3 frame00000055 +7068fbdba10143e3090ac5522e4c83c1 frame00000056 +1a7e58af47d0727001efeaf02c791ccb frame00000057 +8438167697dda2c436ee0d82f5800e14 frame00000058 +e9161b2f99f9dd2724ead705fdefa51a frame00000059 +34d5deba0ca8801fb17a8108fe6ed4ba frame00000060 +0a88053363fc4a41dd7233837bebbdf3 frame00000061 +571936842b2a1977b58d079c5fd56b61 frame00000062 +043c55cbf324eac60ceacc5cb8c2ff84 frame00000063 +5d801406181c76332a96d6c60a33084f frame00000064 +581dfc40d4415ee3bfd20ac25f946d99 frame00000065 +a53aac95deee5597d7ecd25130a5a23c frame00000066 +7f1e3fe72af9fd3eb0c9d53f85fc6c9f frame00000067 +6c7d9edb4aecafb9663942515aae6fef frame00000068 +f035740c702e7c243ee855d2e99feb96 frame00000069 +48625b052322e792aa5e93226328c646 frame00000070 +04ee827c1e17d9c656fc1c928da652de frame00000071 +418efeb1c66c507e0f2cd6e0c5921ed6 frame00000072 +7098f9a3a1d51f25b29db540259d3792 frame00000073 +485c2ebe7c1df92dd00505c35260b48b frame00000074 +558484be1f47f7b88caef664b2ebcdec frame00000075 +c29f4564799bf5401197e27ef7c41994 frame00000076 +4d042d7e03004f6e262829255cac7765 frame00000077 +4d18c752ee2aef7a8a4b120bcdd3f9c5 frame00000078 +3dac4986c47ecc32c6b9d184ce669d70 frame00000079 +d478bf854feb6588111780fa191d0636 frame00000080 +0972bdb6e8ce41beae896ec86d39cbc4 frame00000081 +85e3a3f4c6831bb927b37f3109a40dec frame00000082 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/ultra_demo_720_480_32bpp_rle.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/ultra_demo_720_480_32bpp_rle.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/qtrle/ultra_demo_720_480_32bpp_rle.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/qtrle/ultra_demo_720_480_32bpp_rle.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,26 @@ +e9ea70ec9c1b79bb63f759a8982db5ad frame00000000 +5285ffa802d77dc46f0342d63e2f0539 frame00000001 +6fb4e761c0ab4b0602c94dab24296fc1 frame00000002 +32785d7fb3f324a8ed27a75e4a20a113 frame00000003 +bf9fbaed72562998a4f9692ee6895513 frame00000004 +beceac01b9753a8c5fca67300536878b frame00000005 +836b69e3379e231ebf3f405f6a73bea7 frame00000006 +8d16204191ade6a8c1b9a0e22f1f31ff frame00000007 +50e766cbfefdcba0bc4b54e5e87cfa47 frame00000008 +b10f50745bba7700e759ba06ff672698 frame00000009 +82709c8a2876007a1e50a6ae7e3bbf3b frame00000010 +0cbb07b8ffcfaa59ec10ac20649c617b frame00000011 +f4ae4fa2e2cb431cc070039add2b9a22 frame00000012 +6267a18a543dd889f2c37223b6bfc1a7 frame00000013 +7ecf1904eb57e50fdfb4b27a18548e18 frame00000014 +05946c2aef05d8646554d171ff57f23c frame00000015 +bf4dd34374617daa706faf6ee2f7e443 frame00000016 +fc508de0a8f8d096da6c6d7702801cbd frame00000017 +299ebf7b3811a464cebe2b1030cb6a52 frame00000018 +f33212129fb0ffa115c83246fcfcde4a frame00000019 +0634e1d831fe85e39da8935db9dd7dfd frame00000020 +545357caf2efbf7c111f8db7ad81548c frame00000021 +f8e6ac72aa8c9404842ae732127def24 frame00000022 +53d4118f3c5aad29503262ab6961f1dc frame00000023 +7d0ffef94354f6857ee4e2cb799ff3be frame00000024 +56fb8a81dedfcb148a4978686a49c5b7 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/quickdraw/Airplane.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/quickdraw/Airplane.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/quickdraw/Airplane.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/quickdraw/Airplane.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,2 @@ +7bb77e42d7b4b916c42c3d526a60abee frame00000000 +8b2b9292d5c0f7323515fef810ce6d92 frame00000001 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/r210/r210.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/r210/r210.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/r210/r210.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/r210/r210.avi.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,3 @@ +19e79884aae6b9de23d2cac38a9f30da frame00000000 +4e7bd197fa6f826ab6554a6bc3ebde1a frame00000001 +3e9944275ac2669c43b18d5641f09357 frame00000002 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/real/rv30.rm.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/real/rv30.rm.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/real/rv30.rm.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/real/rv30.rm.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,108 @@ +1f5902884efb6f85aac14941163cbabe frame00000000 +b556529f99ef24d9e38dfaee7a374094 frame00000001 +b556529f99ef24d9e38dfaee7a374094 frame00000002 +b556529f99ef24d9e38dfaee7a374094 frame00000003 +32b8461b2df9a55562e98f1d02415fe7 frame00000004 +d8312a980da2b43eadc90379be015834 frame00000005 +a929c8f4deae980e7920c9055e547221 frame00000006 +25fe5ec673c70f015514a5225eafa841 frame00000007 +8613289f0cd8af5947fe1667957110a9 frame00000008 +aa5c9b17b8b48058bb5b7b04013b0714 frame00000009 +d731914f05aca47f86135e34b95ba99f frame00000010 +c4b813fe1423d4777bde93584580f1e6 frame00000011 +dbc8230eaa329525059454c89813fd4a frame00000012 +d743c8e487bec47d77e6f27c7ce2b736 frame00000013 +0a3dbac168f3e10eb0064ae02f2bc303 frame00000014 +e844fd00318af09891b9209336e4eff2 frame00000015 +8032de364063b6787264997a97e39e07 frame00000016 +e8bf56bd68f786cfb54b24614adfc2a6 frame00000017 +639dd9f64bf0a490ccbcc5b35ca5234d frame00000018 +5d8ea4498264733ede329188f129f37c frame00000019 +430ed6aafbd7070caf8ca76f4944249b frame00000020 +96f33a792ee43ded8ec09e77b6b322af frame00000021 +013acbe7e00771900a926013691f138e frame00000022 +d772bd45b0bd6b2e4eb3fd5e7ed79a50 frame00000023 +58adfd218cc7468bc994fed2c7ff46b5 frame00000024 +e7fe1849d1663c8a828c48487cb73fd0 frame00000025 +ea528a68ae3512fb0f937e0a76ab8fa4 frame00000026 +981fc2b40ff1e57d15ceb1b224a884d0 frame00000027 +c6917a8465c22b9b58b584dda9ad2ee4 frame00000028 +99a419b6392f4fc00de89266fe4e1b35 frame00000029 +f2ca97176def876a4252d10d0bdd6af6 frame00000030 +97e28e48206bfb01761ac1dcebabe00f frame00000031 +46257e0e62e02ddcbf17251667718210 frame00000032 +51eeb661ef6659a00921f55357815887 frame00000033 +822fb8ff54beb4161f19cb60b992b7bb frame00000034 +1cde3af62962e3beb9e4824d97902a45 frame00000035 +d5762a8cf2cd5a2a64cc9a3ab7165229 frame00000036 +12f0a1a8346f30c3571c8f6b5ef8674e frame00000037 +6ed7b9ce5e7924d911398ab15c115622 frame00000038 +c23e241749faf93f358b992be838e386 frame00000039 +83c8e536265912d4dcbf94b3890eb473 frame00000040 +d2bd38389324fbc15154237964f93869 frame00000041 +f78ab51120ea378c3458a8dd91d18687 frame00000042 +3d5d86a8853cbd39d1e0c24db87219d0 frame00000043 +fb2ced60f05756765bc5778f6bddcb0d frame00000044 +bee96ab9ca54d4918034ed728ba17785 frame00000045 +5c70561f48c9baf0d7681cd0abb6607a frame00000046 +a8d9ec267b49a2fb9d77ec29862e2f88 frame00000047 +bf3e3d14a1001cd891da13c418fc195a frame00000048 +60f739a2cf4e3010b83c1495c975cae4 frame00000049 +17b58446f6a4515fbf609744af541b0b frame00000050 +cdcc5959746bd115be91e2bf69597b22 frame00000051 +451007cb3758bb1d8626cfb5df215ae7 frame00000052 +003d95cc6312ac70938bce83cedf333f frame00000053 +10e9e36b506218ac66015e638f31f804 frame00000054 +a7c74c31778d44a1602d5218e1001b13 frame00000055 +2390f4506bae116b6de30c7782e2da4f frame00000056 +dc4c4129ea54bb0c9cc78bb9e05da6e7 frame00000057 +cb3437558b2e9b0c19630b88aede3672 frame00000058 +6c7c6105d18d53058677d43599d4f355 frame00000059 +888d940a9c8b92571d2ba33f24e751a5 frame00000060 +d4a1402bd0428546b0a2c39467660b0c frame00000061 +36111cd070df1ffbc8eb3ca8e5c16f8a frame00000062 +1bcf3a494b6e6dea0bb99310281ead60 frame00000063 +e61d60b7bfadcf4d447801162ed5c412 frame00000064 +5e2aadb3389ffb4f171d869a7b9455f8 frame00000065 +74f4b36b27a33379ea8e2cdaacf9c8a4 frame00000066 +77969d62ff71926390765965814bdeb0 frame00000067 +aba9c609c87ab85d8fd51fa98f75a547 frame00000068 +df5b1493dfce71dd6da141997052a038 frame00000069 +661cadae667eae485840db2b45f294f0 frame00000070 +92bbdf117244a3f1a44abeb0b4104544 frame00000071 +b64361c42d1997119ee1cb918f1fac13 frame00000072 +b597867ab4ad9eb94d58612bd2ad1cb7 frame00000073 +6323110850262ec4d8fff5afb4ca22b5 frame00000074 +8d38d6a0c1648b2e0f3f463e0453ae94 frame00000075 +005b6d36fe75929e19aa78a581f9bb96 frame00000076 +d3a90aa2c6fa72b47124a2d4df72c4fe frame00000077 +34b0eab9e13bf2d2c9b78eed0cf19e18 frame00000078 +ec5e3cc1ff4b5df6ea6d52ece6b8bc5e frame00000079 +ed33fb4f9774377bd18fcadb2fdfd972 frame00000080 +9a6707ff6ba3385b6482f618c1676b5d frame00000081 +f522a3d8783430f9492106468fe268c6 frame00000082 +a8ab4f43123e76bf486f711aa36b1a41 frame00000083 +e95d88dfd93dacdd78111028651d5c81 frame00000084 +ad9621eae650c739b34e9a5aca3321f3 frame00000085 +ab45d9de74e90e60b4b5cb5ae0425b84 frame00000086 +2a3e5e529c0def7168914fab51b4fb4d frame00000087 +51fe9d3af8163552e67e0763fe2d549e frame00000088 +982b88983ad4f416262bd60748004477 frame00000089 +66d7b2a14534ccd97e475cbec094c712 frame00000090 +e707113cf7b7f6341c3005145620d7a4 frame00000091 +ff43bce5f71461e24e4a7693cff023c6 frame00000092 +174dba3d937518b734027f33efb86225 frame00000093 +9538e081dafd59c1f6957255ed56d22f frame00000094 +08d9e9576b354473643ecfc68da3fd3a frame00000095 +6ca4a886035c67b3f42b020e980b4664 frame00000096 +55c0667c4fefb705f06f60a1ee1cdf92 frame00000097 +a985714c027124dcafcb3b0bec7fae1a frame00000098 +e4f84facea88cdfc56ff455a6100e035 frame00000099 +83e2df846318ff7ff648985f0d7d9318 frame00000100 +768cd958cea43e13be33e11b08eb5802 frame00000101 +63dfc5c5b6630b1787a1ebf3bc783fd1 frame00000102 +0f009e64a02bf378326e4221eaf2de26 frame00000103 +c949aadefd2cf669782bb663f1c8372c frame00000104 +77c34e4b108b2f10ef3ec80c5fcf48b7 frame00000105 +a29eaf10a3c2e95dfa9ea78e2306f33a frame00000106 +f0a1713158792e9fa9183034b5c47b7d frame00000107 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/real/spygames-2MB.rmvb.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/real/spygames-2MB.rmvb.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/real/spygames-2MB.rmvb.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/real/spygames-2MB.rmvb.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,520 @@ +9517604fc073ea424efd6d0a6a31de24 frame00000000 +9517604fc073ea424efd6d0a6a31de24 frame00000001 +9517604fc073ea424efd6d0a6a31de24 frame00000002 +9517604fc073ea424efd6d0a6a31de24 frame00000003 +9517604fc073ea424efd6d0a6a31de24 frame00000004 +9517604fc073ea424efd6d0a6a31de24 frame00000005 +9517604fc073ea424efd6d0a6a31de24 frame00000006 +9517604fc073ea424efd6d0a6a31de24 frame00000007 +9517604fc073ea424efd6d0a6a31de24 frame00000008 +9517604fc073ea424efd6d0a6a31de24 frame00000009 +9517604fc073ea424efd6d0a6a31de24 frame00000010 +9517604fc073ea424efd6d0a6a31de24 frame00000011 +9517604fc073ea424efd6d0a6a31de24 frame00000012 +9517604fc073ea424efd6d0a6a31de24 frame00000013 +9517604fc073ea424efd6d0a6a31de24 frame00000014 +9517604fc073ea424efd6d0a6a31de24 frame00000015 +9517604fc073ea424efd6d0a6a31de24 frame00000016 +9517604fc073ea424efd6d0a6a31de24 frame00000017 +9517604fc073ea424efd6d0a6a31de24 frame00000018 +9517604fc073ea424efd6d0a6a31de24 frame00000019 +9517604fc073ea424efd6d0a6a31de24 frame00000020 +9517604fc073ea424efd6d0a6a31de24 frame00000021 +9517604fc073ea424efd6d0a6a31de24 frame00000022 +9517604fc073ea424efd6d0a6a31de24 frame00000023 +9517604fc073ea424efd6d0a6a31de24 frame00000024 +9517604fc073ea424efd6d0a6a31de24 frame00000025 +9517604fc073ea424efd6d0a6a31de24 frame00000026 +9517604fc073ea424efd6d0a6a31de24 frame00000027 +9517604fc073ea424efd6d0a6a31de24 frame00000028 +9517604fc073ea424efd6d0a6a31de24 frame00000029 +9517604fc073ea424efd6d0a6a31de24 frame00000030 +9517604fc073ea424efd6d0a6a31de24 frame00000031 +9517604fc073ea424efd6d0a6a31de24 frame00000032 +905cc22d6bbc9f1436a6203203599c6a frame00000033 +9afd30e04cf4c2dd2defcfd8acb7feab frame00000034 +899b7696c4f79e01f0ee13217175369f frame00000035 +5ceb60721db6358d23ae50ae61bea4db frame00000036 +3d9d5caa2696ee22e3d0ca5f1c0f0aaa frame00000037 +1aa17c7233a11754c45117114e8b9f6a frame00000038 +9bb5c78ab183e082b53be7572d7ff421 frame00000039 +d4af03c45512a66bc754af8814fe2197 frame00000040 +6b26dee17770b7a515669318fe3ae10a frame00000041 +e94a460f7a48450cbc5895b7ed599c6e frame00000042 +51b0fe12be99d7566dbec6e076f6334a frame00000043 +b46356a11634313377c19689fa75dfeb frame00000044 +e8a4d5ef5b6caddda55bab1d715b6afd frame00000045 +130a5bbf000e98499f9823794c74f934 frame00000046 +57dd1ec0fd1ca5d8649d76c327b20c4e frame00000047 +625d0ac4d64906aa462222324ebad32a frame00000048 +2326486583f996c335ba7cc53ae7c322 frame00000049 +fc759d31b99bda1275b056763b514e89 frame00000050 +e99cacebeac50559060ae7b91ec6d33d frame00000051 +fe9595af021a3e39fc51bc7a954e1019 frame00000052 +8ee6dfc3f369defc4134f2f339897ffa frame00000053 +67a35514261c85291c2f0b6f40ad8444 frame00000054 +06d6bae46f03b231579324c08030cdfc frame00000055 +6b3d0937730ce34123deb9e24a4036c4 frame00000056 +02ea0a7cf243f21e9dddd04cc7e3c714 frame00000057 +ce26dc0a82cad647351f3b8fc1c21101 frame00000058 +73c7628d049b58b4b2c8de757e3c7c00 frame00000059 +d18f99587aa174947a5394f0f6838240 frame00000060 +c89da879a2ac0537bdbc1e6b5d1031b7 frame00000061 +b091734a88b22cba548800f2e57b2882 frame00000062 +6a53c12314319e8e684ae549964e8e6a frame00000063 +6b74e53f68a56dfdc61f5a6806a5fe3d frame00000064 +6e574f93df226650c230b3608889139f frame00000065 +a08842e3db963e07dabb3e82a43d9c36 frame00000066 +f70d05e507864ed19e399b99d30a9eae frame00000067 +2d2744333c12f5a38b715060d0d5ba27 frame00000068 +9854c95ba87a50de5b1d7ff0a3d92422 frame00000069 +24bc68556084fb52dd96830a6e6e1041 frame00000070 +be73b55c72af66693919b9f451e07a58 frame00000071 +b0636db3af77e104bb9e725a2135d135 frame00000072 +b895947958d20076376008d79fb970bb frame00000073 +1806eb641c4d7ba7b6149265593c9ee3 frame00000074 +a2acf1bf9395781eff7dbd191d19cec3 frame00000075 +b1b229619ee2ad139971c45d0a571384 frame00000076 +66b11defdfda6c234a1538f6e04191ac frame00000077 +3fd784fd2ebb9dc5181846b362e997cf frame00000078 +83894f7aa44b4194f7bbe21765f7041c frame00000079 +6dc4fc8be904adadf5511b54ba82479e frame00000080 +1e373e1df8a74b68f501697231d1645d frame00000081 +1d1af7732a59dae1de9d5ecb4199b563 frame00000082 +74f754b7c5721f38443b0936947243cd frame00000083 +b274eef288ca73257ae3be484c21cbb3 frame00000084 +90efe0620daf4924fb610592abd3bc9d frame00000085 +85fc59294ec7919620be2d22e6b7082b frame00000086 +354255d39e82b999ac993cc10776bfa6 frame00000087 +8edaad0b7d604d61d16b1a4f4cc343cc frame00000088 +acdb21dcb31d34b3fd81bbc9eddd9dc8 frame00000089 +69b5aee0103ce3ef4adf0289c2f118a1 frame00000090 +d9263e46c700863ba3faa2c526b0017a frame00000091 +a1efb630e0b97c971236121796cd6754 frame00000092 +b4e2af11d46f769c0978a6b128f80a1f frame00000093 +790c229657935d867d9ba103d2112877 frame00000094 +9d91cd9a5691ec4e0f092917d04a4240 frame00000095 +0f93c094693e7411101fbff9367f8b8c frame00000096 +564d8e3a92566ffc05190768ac1a2370 frame00000097 +927f584375b71794f70ed881a376c9f8 frame00000098 +9f71bb509004fbac464179267ef1fac2 frame00000099 +18098a3db2e6e1086f7798a959a46533 frame00000100 +7d9de40e0ecfe1e2ca6973f3297a84e7 frame00000101 +eb8ef748d965f542460234efcc053513 frame00000102 +3b22bc242417bd8529d78393b8f1a6c8 frame00000103 +6186f031ccd975be1ac00f3a3dc5e78a frame00000104 +c960b733b1a76efda56d57960e2bed2a frame00000105 +8bef081c79856ab9784236d1e644de17 frame00000106 +533c189a529667b062192e6e2fdd2bc1 frame00000107 +af1d7aafecf347287ee5b355f1e940dd frame00000108 +a8813db1abd8a00ec9bd1e61f99e2fa2 frame00000109 +30b3d764fcacd11c992a1cb67f92a002 frame00000110 +a37080c4a6e944ac6395cb00de45e0b5 frame00000111 +f903d88c0035040e4909168ee064ede5 frame00000112 +e8e226eaf7eb4e9265239f934e3a98d3 frame00000113 +40ec0704a658acf51858b7cb3137a271 frame00000114 +604b32d1b4330f9d247f81231310b04d frame00000115 +700082d255d329617f096d8684d7c450 frame00000116 +04c86d74fc6e7f18548c61e5eb3ac3a0 frame00000117 +8bfbe9934b0273714801616a2521eac1 frame00000118 +00b6e250f5003dfaf027ac11828ebcfd frame00000119 +e99124dd14508104af6f8ba40378572f frame00000120 +bdfe57644b643d70e56c6e7cf569a935 frame00000121 +7e422bf0764f02ade15e6f376e343051 frame00000122 +1b38d8988c823b227ac70db885dbf888 frame00000123 +378f9ee7164edf1e53c215153032147c frame00000124 +c28e44bd29159409f82da5864fb8d687 frame00000125 +ee95c21b943f869ff31f309ff239c16b frame00000126 +62c0f8cdc7e57414e9381964167a08da frame00000127 +464d1b4a32972349ddbe1e86538acc4f frame00000128 +3d6444adcb6815aa532bb590b29b3d21 frame00000129 +659ed52e48f9bb11e4e348c05def038d frame00000130 +f4cb64033df960305567e7df3e22960d frame00000131 +2b3bf35876b10a470400cde48f859411 frame00000132 +e4eedd6e9729567deb0b54e6d837fa47 frame00000133 +fbcf556d5960428c3fb19d5b6a3ef15e frame00000134 +3b8892f3190ae79d91221a5aa0063e4a frame00000135 +9031c4407eb49b3a39e5b1d5115491fe frame00000136 +9eb51ad3f50c3491f1ebaf5296739ee3 frame00000137 +5bed324081205dc61cebbe3df9603a08 frame00000138 +1f4627980a13fdc5132e30cb4a2f5735 frame00000139 +3dea3475ca013d2593bbb96c66fe05c9 frame00000140 +3b1329ba2d17bfe6ca3bac88066bb09b frame00000141 +d719fb94a71956ac94c4b835837d1081 frame00000142 +f790fbd4dc95d44b9a0f77b10cbdd7e5 frame00000143 +4d9f1de8b7237ff71e42faae51ad39c3 frame00000144 +ca0daf632eebfe2fdbf25f056192e8d4 frame00000145 +7a2b9c579776656b9ebcf0ee31ce59b2 frame00000146 +46e09d452105558c15773c0a6ba6a389 frame00000147 +e05b00204fa7550505c194420d29897b frame00000148 +c11c4a01ae68d5ef592131011704fd7a frame00000149 +88a8bbd02032e7dc946a7da5368e6b4a frame00000150 +1a5820f9928af1e00751ad552bf30c63 frame00000151 +b749c2bc269d7cb4a1377401df9de06d frame00000152 +c6d39754329d5a0f7bbb6e21d58843d3 frame00000153 +2a49547c1368e2b8b4952d5309a55357 frame00000154 +606e3a5460020667aa5c924fc2a20e81 frame00000155 +5f55ba1f3f84a866ded6dfb41c8f830d frame00000156 +a440d37ac63a18a810535c7da8b718fe frame00000157 +16748b5ae8e466c5ad11c93bbac81cb6 frame00000158 +276b25cc559e5f9a9d228e4b485af6cc frame00000159 +1cecaba024d4943d28d593fcdfe9e74e frame00000160 +b1662f44b140463c71be82e8637b8cf1 frame00000161 +704edee323b144c47c90ee01b72ca5e2 frame00000162 +f48e703bd74cccc1cb6b1edab9630684 frame00000163 +7d3d4bbc459c196c8e259213a3915c7a frame00000164 +07a3d3c3dda78d8608d318a28cd812a3 frame00000165 +22cae6c42bd1d1b14ce2e3294dfed0be frame00000166 +5a10d46c609f9044ef22bca80b170060 frame00000167 +25a32adff413a1138c4b62cb110194b3 frame00000168 +83c624f75c8c080ea5fe8ae53679946f frame00000169 +1826d7bca1fa42548920cbbaf6451c3b frame00000170 +6bb56a02ea598e0469a106458a0d90c8 frame00000171 +bc89bd1b855fc034463bc9a64be6948a frame00000172 +0d0fc65225796ed944a1179273663533 frame00000173 +a502065f3ec60fd097b54e886222e62a frame00000174 +fda1d32d045bae433583b23362f805da frame00000175 +2ef1ca294e342b872f8eb2c179d023e3 frame00000176 +20b2a4a7ff69e3f1b9e66255a5ec7e25 frame00000177 +fa2c3d2ba2ed636dc66eb3f9e509dc0a frame00000178 +9c6fcdb916cc43c46a2851787c36c6d9 frame00000179 +6681de7758a8ab3ff71ff556d6c222c2 frame00000180 +f454606b44184ded9b33d4044e6a60b0 frame00000181 +f3b108eb6b5b29e016bfb10544694d47 frame00000182 +3aa47008a954817c12df3e44a814fd82 frame00000183 +ba3076417c525554af405a72d9d3a919 frame00000184 +ff81833597bdc83a3dd8fbb71eeebb0f frame00000185 +b915666af31a78d9629f0bda31134071 frame00000186 +eb52fb90c13aaee55c82611e8d431398 frame00000187 +b012c1cbf6b95cba00aee5cfe10564f8 frame00000188 +9411247d18e8f7f4c88994c2c7a72ce6 frame00000189 +59ae11e91c10a15e6b2e86b96a4b6db4 frame00000190 +0435eee2737c541d6ab59adbfa682c46 frame00000191 +3b6dfd4312a4c699236f1680cef03e81 frame00000192 +cc68d2127708066f132bf7f9459342d7 frame00000193 +9ece972fe304c9f6c4bd765516fb2d5a frame00000194 +59beb44db7c32f58164255e78a2a1df2 frame00000195 +f358e4991991b682370e63e362753829 frame00000196 +14481eb8ba9e5bf065cdfad3a526ce55 frame00000197 +55ff7e9d34f5b14822979e4386438313 frame00000198 +8038921c0de7d2c6156972cedcba34aa frame00000199 +7672220cf59eb15e2b14e18e70ac3d9f frame00000200 +e1cf46b7e1e3909b49f3a91d03c9e1ae frame00000201 +b980c05d7511613736eee5070fb61b05 frame00000202 +79f8d7307376c5d3b666b66b53f2d5f8 frame00000203 +d69773449fa2d4132acdd493f5ecb4da frame00000204 +a44f2d33affabfb9a0924788e2896ecf frame00000205 +cb984d1eff389c678aea143276996c73 frame00000206 +daa7fa5596a192c408544e8f62f1f8ef frame00000207 +cac79168090a5571c3a6f8af320b878d frame00000208 +6a9bbf5f830623ceea94e43a6542e06b frame00000209 +65baf48355e4422d98d6829c2f245172 frame00000210 +2fd7dd01c581403dfdab729c6e87d768 frame00000211 +1d8dc59085d7ab42d7ed91d15609e938 frame00000212 +5a5bf4791a288e2317265db7584b9966 frame00000213 +0fbc2f341871dfa041831258b51d0f2c frame00000214 +91b553cd24be9df20ead52cd4778503c frame00000215 +25ce23ac3577a532c740d92741a2dd23 frame00000216 +749e4a87d2ffd9823e59bb4646662778 frame00000217 +c53c06bab2356989b4a016952edeb1e7 frame00000218 +74588bdb54226a1bacd35cca5f97ed6e frame00000219 +6bbd1d7ddac02269ae7558641f6325c4 frame00000220 +ce755db1b88c9c321d4a7405111b3675 frame00000221 +13a7508384db121121b64d36501f01f5 frame00000222 +bc3dfa1e09a25cfd3af82232ce55921e frame00000223 +44ae6df8184700ef8888ac696dfb5701 frame00000224 +553cd21a261ee8395c90dd00c9cf3d86 frame00000225 +053280cbf6f95ef82fadfbac7ad20b4b frame00000226 +9e4f5fa57c66540c60edd66189015923 frame00000227 +ce045753e9650c681d489e796eef22ba frame00000228 +2c3590630d67998f17dd570862fedc87 frame00000229 +a66ca2c0fbd1775f98e935922aa76ff7 frame00000230 +95d0b94cd2621e1c25dae526a169e919 frame00000231 +b2e5aa4ede0f08f31b539bb22ecc248d frame00000232 +7e531eb04550e3846793375f6c476cf7 frame00000233 +6f16755f47e3ca39537045a4f4c268e6 frame00000234 +33d5404447f59369c1c9b8647c964adb frame00000235 +6d3802abc42f1ddfb4a8db3b09ee5ce9 frame00000236 +817f140df1ee4d4a076f59e744e82693 frame00000237 +711539a18c17ed89c15e21b32119d2db frame00000238 +8c30a315a93cc3dafd1eedc233a05496 frame00000239 +654d3e8635a78791c7a3c05dba7c82da frame00000240 +7f7017e801228691d9ca986863596423 frame00000241 +e5357b93d4279571f993e4ad8eb2d218 frame00000242 +d833d1296d84a6b87a60b48f0201e0ab frame00000243 +88079c82f85f440837efaaeed0a6328a frame00000244 +b84e3b25674d1691f4ede19ed454a2dc frame00000245 +af956e28050da50c0417c5e5a581db7c frame00000246 +f50063bea579dd1e067f54ef0b0e291c frame00000247 +c2d359073b80bd6fbe53cc67daddbe5e frame00000248 +325d8746dd4eaad2cd9dc4fdbbf3bc8b frame00000249 +ed8abd4247c868e57fa5a2ef7789661c frame00000250 +7a34e02b708f8cf83620d4d99bf7efac frame00000251 +269ec17d70b8e94d5203e8f70ad134b2 frame00000252 +753bcc1490912ecd738305611790042d frame00000253 +22cf10c78a1818b451b3dbb42bc65ac0 frame00000254 +b2655851a571d982eb9b34218110b9ea frame00000255 +8991d50f57afd3712c205db1fc8f7e44 frame00000256 +1a3c237aec7e000b915f67d2e4ea064d frame00000257 +a566cd0b71dabca37fe744bdcff675d2 frame00000258 +6b379f6bc8934a241569800acfa7056f frame00000259 +55c7f6721020055d8069523808b4f845 frame00000260 +e51d6343a20d5dccf51c7234134a3dbd frame00000261 +9c8261fbe9aaa5d081916f888f0951ef frame00000262 +0bd96154bf593b10ad61ed39b39162f0 frame00000263 +35e16495f840cb4d6d01be90c0597d53 frame00000264 +8cf9633ec4e2939df015549c2701b007 frame00000265 +f8603523042721f303526c8f3c15eb3e frame00000266 +d47289441d7ae70f97bc1aff462c5a18 frame00000267 +cd66f5c799c026693b47991f4e7d7064 frame00000268 +2ccc1e1b30105bc5af7b07dbfbe66d02 frame00000269 +dd253628a072047b7145e586aefeb10e frame00000270 +13098cff08e531032c9c51e9a50dbe78 frame00000271 +855c6149728a4608d65f3b2e15a390db frame00000272 +bce2baa090f852463ddc13623b7c850f frame00000273 +d6f1216c7d9feb56448064d92c536be2 frame00000274 +cf4671c615166bdab079b673ce4d2bdb frame00000275 +28a7151c7bd563017b0aad484fbbb2e5 frame00000276 +0c101e38dd68ec4ee913662cca741784 frame00000277 +085aecf576da2f132624ea7e0ece2178 frame00000278 +6138f5c212bb24c7960e927869ab1181 frame00000279 +b4fe1be5d37bec69da025d7eb4ec0179 frame00000280 +3fab2536100ceea660eb3de78af19a5f frame00000281 +f20082a765b7da8bf0d932b79a1c2e0f frame00000282 +f67fb4c4391873effcd796c6a0b59e99 frame00000283 +bc029584238cc8daa6bd1303aa5d10e6 frame00000284 +63ff16c2f50fff28476e8c0c3edeb272 frame00000285 +85835c2d89d3abbfd9795272c68b32a7 frame00000286 +2225a9209cb32a45d4f267d26ab6cedf frame00000287 +f16022e28624edf06a0d533fb1980982 frame00000288 +a27021f0477c68acebba9a5ae9f2b0f0 frame00000289 +22f0857b09e73f0ef5139e8797a122bc frame00000290 +48134c95ec4b702fe1627af71413178a frame00000291 +ac289ad5514a353f853bbd941936add1 frame00000292 +0d869bde3ed33d348eb0847e82e86f39 frame00000293 +3fa367ad66af7f778514237dcbae6061 frame00000294 +809f0a49c3b517ba32dd600a6931d165 frame00000295 +7a28ec1b9a1df0b925fa0b2aac87811c frame00000296 +2eb5e763db170dffcdfa0742798ff557 frame00000297 +e7ef10811846d51a11d1a8d7a1e8cb14 frame00000298 +a91470ac52ecafc9af731775e2561191 frame00000299 +3eb8ee1292db4b9824adac161d052847 frame00000300 +e429901da69446795dbee2568f817cb2 frame00000301 +b80bdc54f2199d0e73b4aba5c3adb8f3 frame00000302 +59785bc62fb950524db9209898caaa9a frame00000303 +494718878c0839814164e9e59db57cfa frame00000304 +ea2a50b7b381acc848de9c09d0617366 frame00000305 +4bca5a69c145912a77d4f54b84cee369 frame00000306 +d212653d4e1368e09f1b6127ca491155 frame00000307 +3ce79e5f25078bb5ee65b635a9ace6f3 frame00000308 +435a7439de3bfe058db3a65be925a168 frame00000309 +c94cee779696cf077845115dd8e21a3f frame00000310 +76b4e3102c9953b8df7b5d7822e1b6e5 frame00000311 +c21979a8f5a0b6a2400e956ed1875e2e frame00000312 +6aca0fe984cd2ac352aa700d844b9ce6 frame00000313 +7b9de3539523b8bbc4dba1148b253902 frame00000314 +1ae6ddf0d588ff590ab43867aade60a6 frame00000315 +305c1c582e63539de0fa17997d256d26 frame00000316 +a47b8aaec1d51a89636a390b710f4289 frame00000317 +7a16cd711bfc83bcaa12d1aaa09671f1 frame00000318 +b3ef7d1f4f125d021f419bc3a3e92135 frame00000319 +726be4117173297f024bbbd066bacc31 frame00000320 +4e14ee83e92e4dd92ac0ffad8732bd45 frame00000321 +5176c3c2627cd1dc238081d2ce11f7c6 frame00000322 +37be2fe66a1c2f587cf15cd179aa13a5 frame00000323 +da717974d916ac49a43df1bfbbda35bf frame00000324 +ccd71c65039581fc730aea06a5a528a7 frame00000325 +508d9df263d30c39a32b76b81868e089 frame00000326 +f7149315ff4bf8f65109f1dd6025aee1 frame00000327 +f3c2db71944d963cce4297d8cd15b1f9 frame00000328 +7f7c6e1b5e5806534d44143ee58aba64 frame00000329 +c050770d0aad1213e74ef9b85309375c frame00000330 +726dbb26b311f3476cc643ee3fdde707 frame00000331 +d4b6bc19c8d2467f29933e45b77e8b36 frame00000332 +9aa9da91a787034ac38f3ab15bfc0601 frame00000333 +0c6d12dda7d2fcd112e8c57697086705 frame00000334 +1b55d2acc87097f539d08455f2eeef25 frame00000335 +57979f64d867453b7dd19c080b970b9d frame00000336 +4e3a68ca58e5b6192ca2ebf68962b8a7 frame00000337 +3e689728e9e58277782ed155227a0e5f frame00000338 +1e55ad4352bbab75c1513578d41a836b frame00000339 +a2539a863552da652d5ae3f012661de7 frame00000340 +ecfab294b40f33d43e827ef60947d2dd frame00000341 +9a98eae26c85be34b386bbedb77426fa frame00000342 +142679bcec4261808fd6604e15d84fda frame00000343 +0e1c695ca88f54054c10286a8c0bc0f3 frame00000344 +d26e9f9aa4ff4cf6cbe4dd708c69ae1f frame00000345 +ba73d1b0426deab74a04c9bde3c534d8 frame00000346 +458f57a2b3e7883a6c6604b77118c00f frame00000347 +7a818f5d1b102ff3c01b3d66d98a3bca frame00000348 +cb629b743bbc68f2bbdd4b15d759e32e frame00000349 +c78d175096111bfd3ee770bdea7c42fc frame00000350 +6ddcc983a8ed86e90b5685e4a603502d frame00000351 +2188963e89752f17d6c322b682c1eb55 frame00000352 +f484f4e56372e67ce15fa627e555c870 frame00000353 +5c6d17bec83d539a0d18c10fd2cdbc52 frame00000354 +f5c8aa7706d6bdb3650fe0af93f47244 frame00000355 +202ff3e3cc8b45a73150cf14e96d5fbd frame00000356 +e39207ee5b9daedc3b0c536ef1764dc8 frame00000357 +3e03972ff2088f5b857a9239a527ec25 frame00000358 +0758857819af8b8c08013bdb55f240e5 frame00000359 +3cf2f50e9b89f351d6c18db865db1ceb frame00000360 +1572e52aa540210ccac630d1f4b01bbf frame00000361 +54002c0bcaffad92155adb8bfd7b8370 frame00000362 +021b9800554505717a9951d243eed771 frame00000363 +bcea4f076fa86a4c2f29ac12ef9c9be7 frame00000364 +9c90af4dd5de583e0924bb53406e2072 frame00000365 +5ceb7a0c0414549e3609fde62ca6c6ed frame00000366 +143a2991edd7a84bf89c80e0fc822322 frame00000367 +576bf8de53820c356b42eebf011558f6 frame00000368 +775e70e5d87002e22e20b90b148b0fdb frame00000369 +79a9e949348bf602af14d5829ef5e062 frame00000370 +0c62d8d9d99e5a98ca94d485957e5ead frame00000371 +57ca402787143d4f3ef92181c5785934 frame00000372 +2fcf91b8086fb895ef1d3d304c678746 frame00000373 +9a909830536f28f34b31f88f5d25ec96 frame00000374 +c4f19a44b57ac21e8e5240aca3e3ec37 frame00000375 +da5994950b112e0fd362a1f9b2e4f26b frame00000376 +fd7cb9edbc95eef0e7610bccb58e51c8 frame00000377 +9d0736988aa49b67f9f2d5ca2390d733 frame00000378 +46607cf975d02a39ee3c8b0b584c256e frame00000379 +74f980096515784fe3256a73438dc62f frame00000380 +7fdf5ed4733a6cff61dcc8bc22fdad9f frame00000381 +e920c3edf08b66dce127c9f1bdf3df7b frame00000382 +10befcce4351173f07795482925fe9ad frame00000383 +09c607eab2217f961a7a41b9e24f6796 frame00000384 +05f4d778b73d3e2a8291b360265edfcb frame00000385 +12628d02fbb05bda8274f0441f9cd515 frame00000386 +34e012c9cfda1da29c28b4ef7bd18a1f frame00000387 +fd81e84196eae3139dc280fcc71be8ca frame00000388 +50933afb3e67da0ba12c098e37c1a7f7 frame00000389 +9dee5e708996b0eafc489791ab8187a6 frame00000390 +ece9b89b00ed57b69da80ba6e851d9b8 frame00000391 +90b88eeb76f5cb55799c1351ec19be81 frame00000392 +a48ee6625a618f742441bc5c6e627fe8 frame00000393 +d72038a07c5deb1f0b0ac806772a4e59 frame00000394 +e43cce38456407197454b7a3fdb0bf64 frame00000395 +c47bf393276e5460feeda15858c2ce2a frame00000396 +6bb335d07bc2df48a637d53c94bdb762 frame00000397 +4c82090f2142dd9a03652937976d58bc frame00000398 +aa4eac552a8c3f42197ff3af8e1723a2 frame00000399 +a0fad85446b04f0fbfb5e99e7e8f5412 frame00000400 +0b2cf581c11ff9338277f3666e0840e3 frame00000401 +121b81480925e509690a03f6d35feb9d frame00000402 +ccaff0fa4e5aad7a144feba0ec6c8ed1 frame00000403 +2805b26b8f596e4b7dfe706182cde6e3 frame00000404 +61276ca56aeeba1dac951141271d0e26 frame00000405 +80b86c88630bd059d06d810840fc6b89 frame00000406 +6fb221507af6d594c104eff708f4022b frame00000407 +2f9c4a881fcb1552b796e1002ab9ce82 frame00000408 +a2ab115cdee13129e7f0b4a743ae11e7 frame00000409 +99a6a8dbc8f1d95b8f0b6bc626095af9 frame00000410 +b24b16f0373f892fdea16cefa288d993 frame00000411 +017218e8a660b806dc5af9f1eb6a5499 frame00000412 +b3ecf2f7a53cdad5250f7bd5e6b4a7fe frame00000413 +447ef035bc36d89c27ce3d9ef14c692b frame00000414 +c32c0c9ce368ff4a9945e2b80abef400 frame00000415 +63b6adcd6aecc58f3606390b360acbc5 frame00000416 +20135bc8266e933ef4811b5123406570 frame00000417 +1b5a0b0b29895c9b95b76a8d9c33b5e7 frame00000418 +55c850d17092b9b4061927a51d32ee86 frame00000419 +f40c35c1b8e70668a60cd04a127607a3 frame00000420 +6fee0efdb01712b703ac2101f9ecf772 frame00000421 +dad674e6a870e40cac59e35e4134cb28 frame00000422 +5c66f11c5ac1151dceea791a13084798 frame00000423 +92cc0f3ec50b89f73d25513628079ef9 frame00000424 +fc18ac9e59c3609dfb0a9de10933b7f6 frame00000425 +e4235299bca2a66808b82841f09c30cd frame00000426 +1bd7f195e5639ed6bfb5db03bffbf395 frame00000427 +67158497c7ed1e8d2db8677b226cd97c frame00000428 +27804f93b0bca9efc4e95455e457e950 frame00000429 +58bf33951a1542be70b6ead1b51e3534 frame00000430 +e8829026175a2dd5266584f165841a58 frame00000431 +6e71c81afa512324be4c3ac8a8b16dd4 frame00000432 +f5b1e947affed1908af352e53ea1a9ba frame00000433 +fc3ba6c0ec65158f31e0c95ccba63779 frame00000434 +a6a59e86b4a59382a0f1ddb399e56ee0 frame00000435 +01c47e5e9dd9c85499b477f8dd6683b7 frame00000436 +10852ba4ace04a52c1cd5acfae6b7f8b frame00000437 +1baf973cc83575c85468e911127b654c frame00000438 +58f073c4eac1affd66981a27fdfe3208 frame00000439 +55838dab95eb943793c96cfd450414c7 frame00000440 +6c7cdf669f9d73ae89a9a12f5ae2bad3 frame00000441 +c2647aef57cacfb9cfd3011359fcb6d4 frame00000442 +2d5b9d8fd9ace355261059c7d9fe5a64 frame00000443 +2a25481360cd85a063530d44fdb6b27d frame00000444 +6596ceac7caaa47dcbf278db52b1d85a frame00000445 +7a1e03530799318e73fbf9e01a432a53 frame00000446 +00ef4cf47f16ef1ecb401e3cd7b34ee8 frame00000447 +4b1114e268f04e3a80f33cd2d7cf25f4 frame00000448 +7cc8d1d6160bc5dafcd9256ebd421065 frame00000449 +87b923fbef1d6091387d24d749714aa6 frame00000450 +afa328e8f5813040aa87132926bdab14 frame00000451 +967a06b4f5fee7c798e0a47747d89f95 frame00000452 +f242553f05758c86331941db682e8fba frame00000453 +860c768d770090e5fd7bfee2fafd7f10 frame00000454 +f3df41a467e20ebb5e13694df0f8aca4 frame00000455 +0568363345a4b0701ee5ff93f075670e frame00000456 +d17322d7681a9e284844b0806a8a7be3 frame00000457 +7fd5290e4569699daf847b8d86fe4f6a frame00000458 +e5b5927acdff5da8e47f672a85db8ebb frame00000459 +e24757faa5c62f8ceaed71cc0e7b7ceb frame00000460 +6600850a1bf938c0f8eec7d546a79c48 frame00000461 +4c0535205fafab86945eae46742b6872 frame00000462 +d63b8a39e879763bfb9621b08338619a frame00000463 +db305ad355e57836bc12f6024eac55df frame00000464 +5dc7bbe2b4c6e6b8e09bb84340ef2a12 frame00000465 +359a9d070c0dc6877ec07bf2437665ef frame00000466 +3430572b4014d860f1678e174af259b6 frame00000467 +c99056c3e2b0186bf865d3722361d320 frame00000468 +36b68f5d43739419efd992a5569def9d frame00000469 +82d225cca2105e9b1d272a86b7e4d50c frame00000470 +8ee96306390d6f2becf2e011b03ba722 frame00000471 +441c0f29ba779c5b3228ac07e1285fc2 frame00000472 +40dd8a7c78cdfc24be0b9f35357449a3 frame00000473 +0843ff89e6a03181858bbcb774437814 frame00000474 +68dabc7d4e365d07146c74940f23b163 frame00000475 +5af4f51630ae045c985857a3410b900b frame00000476 +577fe044d4749e433dcbd0912caeefaa frame00000477 +1a43820ae41a6744f12f339447a6a191 frame00000478 +847eb54b80b329981bdc6eda2bc703e0 frame00000479 +a7d7d20bac06c218fb64d4c98f3dbe74 frame00000480 +800dbd6573e5f1916fb6a653e0548438 frame00000481 +c1ed8d46278369db9aa5de95d65df457 frame00000482 +0c8d33c9179e0af4d18415b1c3333c3a frame00000483 +79d84d6b0fd5f92650b98ac74c41ab4c frame00000484 +6c86df21cb81468adffed2cd3ba916cf frame00000485 +0b92c43089007e52d239ff82085131c6 frame00000486 +ec073041619adbcfdd23e82f881696eb frame00000487 +ad0c46587dc350a2d113879c3464e3be frame00000488 +772eaf3966a22e309fa85bd509b1438b frame00000489 +ede8d0a9675ce3bcf6c0e62ec5e8472b frame00000490 +8064a3a43db5ba28669dd65945e2c559 frame00000491 +a1602392022cfdec8509b04c5e98f451 frame00000492 +a9d3a14ec36836c83f1a8ee932432f46 frame00000493 +7b4b890a6da6b840200a6c6b689747c7 frame00000494 +573e6f3a47f17ab6d3b714f7709dae0a frame00000495 +c597c84365e2c2c90511aa97d1803ad1 frame00000496 +fb40b62dd50515f1b4563f4fa890c98b frame00000497 +05b8b9e435b676afd9a6489f9414d7f1 frame00000498 +c66bbb9a33c7c7d5603d46f527a29d1e frame00000499 +1c6b356ea4d11030f9216bb924a55059 frame00000500 +8b6c255122d4786b466bbd58d899e346 frame00000501 +73385596f1e7f4e20bcb65e676aa133d frame00000502 +66572aa5126f5b2bba5bc3889b0e2858 frame00000503 +bfee338022dc575d88c01d35a1140b70 frame00000504 +bd67a129697c95636dec978bd0b9bfdc frame00000505 +4356ce3a729e804a420545211965dd34 frame00000506 +f96784b0e63a37f391ac33c9b17a1c00 frame00000507 +2713064a4d958c48a25e2686b80b7a2d frame00000508 +74184b6b0a44dbf6890d782da511d045 frame00000509 +1c0ed45c2336783221e8e85f581071ce frame00000510 +c521a6de045cdf7dbd8a4c65bcac1e57 frame00000511 +7db0e959ca627a70a03002044571f99a frame00000512 +e8b6a3540c93015ee691f77b7eb700ed frame00000513 +0354a5b0fd301ebc190bdfa2b3b3957f frame00000514 +05f616e20f3274a928793cc95b3a77d5 frame00000515 +59c27f041674d6927c1b00db07626604 frame00000516 +5028d82828ae5d02c77224ee0d3b30a9 frame00000517 +9bf47a75ced004b1617cdb739ccc4b7d frame00000518 +ed8ea1f6cd38a3948973faec5595bb93 frame00000519 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/rl2/Z4915300.RL2.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/rl2/Z4915300.RL2.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/rl2/Z4915300.RL2.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/rl2/Z4915300.RL2.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,108 @@ +306f4ac99390ac4c317072dc1da730d3 frame00000000 +28d3a78bc3750b39368ae065ab06d048 frame00000001 +ed239342b5d3eff8f2d532e349414abf frame00000002 +33af7314902405c292a1764bb0d3a3bb frame00000003 +1fef5e55eafc2efc93876fec664cbd21 frame00000004 +e3f004c5239e23d0b57223c114c387bf frame00000005 +cabf421e835b611c56fc542f0a48cc90 frame00000006 +0aee9481090b661350d3c30fdf76200b frame00000007 +ed0418b64b52f63d84a564515afb76b2 frame00000008 +eefb2c8c1d16ddff302d4b63575a976e frame00000009 +483ca965aabc7221922f4dc00b1b2424 frame00000010 +031d380cddd3641bdf5a629c6bed38d0 frame00000011 +2c5303ed5ca8b16767255b94bb89045d frame00000012 +21b523c31b9f9a899083078ed09703e0 frame00000013 +26ca5b9d3febc99339287e0177820c39 frame00000014 +4f2efa1bebdca6f85d0096f117aa72d2 frame00000015 +e403a6fccd2b47595ad3879fcdeed506 frame00000016 +8859f15e3af7ca507030e68ee2881908 frame00000017 +5042fe1c2f0f71f70463496cd30be564 frame00000018 +92b19fdd383e45206a1317829487ad1d frame00000019 +9dc39ffbd73c2c8470b357b915ffa790 frame00000020 +f8cd229b7800383537b950359ac0abff frame00000021 +e5d68c22202ef6b499c262f0c521e318 frame00000022 +a7f7fee5543d9a2b74e9437538bc26a0 frame00000023 +6e519bc54ccd27d7ad4a46979668cdf4 frame00000024 +0c59db0fba4ad2c2e03578ce30c31abc frame00000025 +3c754648aec2ce0e5a506533be015086 frame00000026 +b3b9b3ce84ee8dc73289c6cf82d3f7bd frame00000027 +e7e6d4e9254afc8f85e2b57f83c51e00 frame00000028 +a3feb8d504d6c74f0f8f56ad63bc72db frame00000029 +32a9a3ba30603f7ca37ba1482c670b41 frame00000030 +0a0798ea2223a197070f4c81a37bb62d frame00000031 +57870efa5175ed5b1afa1b890dd20edd frame00000032 +a6d263325bbe588eb952af5e99c30990 frame00000033 +f95b9aaf07c7b4eb37c1d5cc02749114 frame00000034 +dd1dc7441f15b7f45a9c7ff204d2d741 frame00000035 +c590398174cf3c70b0dd3167f5194d37 frame00000036 +000eddcfca93254e864dd40fce7e69b1 frame00000037 +c65b27849b0bc3dba5ed20ea51911d99 frame00000038 +f3524f81c758ccc7fe7fe5e4dcdb514c frame00000039 +6f83e74b5cec7723bdc21687fe82b216 frame00000040 +b9168c73187abcc44494ef48316ecb64 frame00000041 +872c7f4473a6eeac8e78c3fe3086d7fa frame00000042 +9ec16cd6ef810a202e0411819790c157 frame00000043 +86b26f3810c4ae66e163f7ad419fe1c2 frame00000044 +b86a0e5bf21ede29edfd8379b8ad9408 frame00000045 +a8ce2649a58d862b4620a459f140e349 frame00000046 +5ee3620417bdcbe23b162a9b357b2218 frame00000047 +496cf669c6d9df97261ba3e72d29958d frame00000048 +4c20ecde3e0f0516d1975aaa622be539 frame00000049 +84fad93e1418d70889b5eb0df5887774 frame00000050 +30ab2aba24c87e2ca4da78fb65d75e26 frame00000051 +20ac30b0f978aceecddb3aa482a7c51e frame00000052 +52106e73f54b9e1d07fb30360cdae6c0 frame00000053 +d6d14cf86e59f8105b402232b2bd964e frame00000054 +1fa99e525f68f18c901d9a7ce6bcca09 frame00000055 +4fb90b2a93f62cb23ed2a36dded0a6a0 frame00000056 +5eb8af8509bea08a9e444a39cd30420b frame00000057 +bad687e81bad694435dfcf914951310f frame00000058 +be65c578f9ef2c1b6447a38335162e95 frame00000059 +ca6269ccd186efc5151652fadef3d3fd frame00000060 +29b068d1a755fbd7334347038d83a03d frame00000061 +08ce131841fb85eda51102172a086a75 frame00000062 +1cc0b2ec5ac021799a3d65521e1d7a6d frame00000063 +52600927c7ca40db069ba865314d4925 frame00000064 +cf1cd6ea2f1083aabb45ba0af7bc1bca frame00000065 +3ce2dc9e81d09f445bb0754d3d0cc4ef frame00000066 +e4fc1129757b0dc3cea3b248102df01e frame00000067 +7cb511fe1003df39c19421fc704514b1 frame00000068 +09530aab1142268e9cbc45352548ce0c frame00000069 +009fd06d856316f189cabeb526472c36 frame00000070 +bc58f64cac122de2f95f79539ac87241 frame00000071 +8db4d46c65e7586698a1f1415c0f0218 frame00000072 +ce8318b2e9d8f9240189e6b85cd112c1 frame00000073 +c22e0f2fc56274583ddff24afee637ce frame00000074 +f95baa80b0e38ea3e4b6f84dc3a85a1f frame00000075 +0e058fcc2b5925ead7ce3c0087188ab9 frame00000076 +8455abb662d11edc12d66cd160d88943 frame00000077 +0a328f2cee4547981dd7b29e8102c868 frame00000078 +88e45e2613f3f0d36860c01d410fbe37 frame00000079 +292591ee2b9df2f0eb2408ee2e9a2377 frame00000080 +df8a386386c25a6f04b1275b0849a6d3 frame00000081 +cfde688e53aeb00005bf8d3997c318e8 frame00000082 +1ff8edf01c3f42b9769bbf7546e071f5 frame00000083 +5536ca0aedc34a438aad4efe06b8359d frame00000084 +be45230ce17dfcef8c86d3914d63b93f frame00000085 +be45230ce17dfcef8c86d3914d63b93f frame00000086 +049e4392d05da4bd7a3f4a50ec4b4ed5 frame00000087 +c8761ff167d46aa8b5343038e05802a1 frame00000088 +3eeef6d760ca46c69f7514284455d542 frame00000089 +77eefd9d89b8db86b6c699ba59915ce1 frame00000090 +970db3434f6ef6e56d1581843e753634 frame00000091 +3c524027f6330a8529c0610402f1be37 frame00000092 +020dba98e7e829d9e69efadf47908d40 frame00000093 +0d2cd03cf31af484cb4bdd1c5d02114f frame00000094 +1f248f6d2404facb58b67faa8dd57b4d frame00000095 +335d6d96e499b4c0c72f215c62e1479d frame00000096 +33b1c2506c645e0b8d73a41126c790b2 frame00000097 +11f060f412012e54db650ba60cc19dbc frame00000098 +d03052bfb7c596c763bcf7fad3fe6986 frame00000099 +0a0baa817f88390fe91a603e6440cbe9 frame00000100 +3c1547ca7ad9f6c296fa11886a2c1c7a frame00000101 +da2b0e08aa03a8892eeace9c6d372a00 frame00000102 +232e71f35ef7318c3cd35f2fbaf0b7f1 frame00000103 +5dbf8c28ef6ce9ff872fd632953ad050 frame00000104 +015f3acc6c65d56859630cd899300c1f frame00000105 +edac41b90ae26a8de1f1912fe59a51e5 frame00000106 +c7a9d5e9426bcb724efdfa1a17fc4361 frame00000107 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/rpl/ESCAPE.RPL.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/rpl/ESCAPE.RPL.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/rpl/ESCAPE.RPL.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/rpl/ESCAPE.RPL.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,28 @@ +926a2dacd2a728ec09f137dee1faef84 frame00000000 +51ae1f16560d44b5fe1b69df113e0b5d frame00000001 +6dca08859a467b92a35a923b0c8da0d8 frame00000002 +923c963ce877909de4972293fe3d47b8 frame00000003 +7ad30b393a9a4c415187d8722d0fd208 frame00000004 +cb26ad49a0517f7d6b4ee26d0ef5f801 frame00000005 +b30ab2486b8479509e723966b492b5ee frame00000006 +119da63e01fe46b0a0b170e2af14eb5d frame00000007 +307cad3edffba4c5aba6ea1bef2ae998 frame00000008 +b6b4ef1981afbfd5b573692f32cd8711 frame00000009 +5c08ecc400ae8f980c32a73babc19779 frame00000010 +e260de1aa45d89521d26658e7bc2b919 frame00000011 +68cfe37cb2abf54d6973399ef56bb634 frame00000012 +5aa5d3ae3a412000097b47b997deb608 frame00000013 +595ef7a953f820fa2d0f23e6f910aa4b frame00000014 +1b5529445a83a122169707d862a57ec2 frame00000015 +57c14e3a33a011c3183fa162e1dd0c8e frame00000016 +2dc1dc1f170e18d0233f30fd011f46e0 frame00000017 +3c103f60acdb3e4d15dbefc8fb1d5cd5 frame00000018 +1977e7f19e0994ebe273983ab7aa906b frame00000019 +af196cd51166d0d3f83ebd07e9cf996f frame00000020 +472cad7a0e613446fd6d734a3db96e1b frame00000021 +46ad55208a861209d7b53ec30e087f52 frame00000022 +ca7ad1ea24abaae4d88ca25946bbd4e5 frame00000023 +27032f707e18cc96c412d2ea6f0e38c4 frame00000024 +da49070c77598189df49838bcd32f314 frame00000025 +722fe0ade26f4f2cfc225d523476b9ea frame00000026 +f57dcaec93f368e9f8b46bbbb58c1a9b frame00000027 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/rpza/rpza2.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/rpza/rpza2.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/rpza/rpza2.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/rpza/rpza2.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,146 @@ +b1ee10e0d346312edac73aa0cee05455 frame00000000 +959c347353ae5552f5717df73c7fecea frame00000001 +fa2d6abaeeb684a0e2dbc111de8f6497 frame00000002 +8ecfa85a7bc26ad1a66b947ea6bac464 frame00000003 +d50f4052f3a9ef2392fdc13b8a163e8c frame00000004 +d50f4052f3a9ef2392fdc13b8a163e8c frame00000005 +969881d7f06d87c9a83d8a1d55ebcb8f frame00000006 +2f1a52a0e11a96ace3c60387d6acd5a8 frame00000007 +10e88e010c195a102fdb5e4bf65246d2 frame00000008 +672699486ccc6546b5adf0492514f46b frame00000009 +672699486ccc6546b5adf0492514f46b frame00000010 +0a9028e0af7854bc0e788bd3f39be5a6 frame00000011 +0a9028e0af7854bc0e788bd3f39be5a6 frame00000012 +7a4fdd2802433a55474ded9137e3571f frame00000013 +163b55927e20f16c14d8e0b1eb267c68 frame00000014 +4047427d416b268fd77a6a1fb3792ea1 frame00000015 +83337b16cae87385159b1749e6956ccb frame00000016 +ec3ab47cbf62bae6ba252ba55442a69c frame00000017 +ca3636b5f560d9e78cb737bce2c7171c frame00000018 +243572eb6ed17acef135a119591456e5 frame00000019 +9ad60b9400b8a4c7c611aeb2fd45fdd9 frame00000020 +9ad60b9400b8a4c7c611aeb2fd45fdd9 frame00000021 +59f50dc9bc7e73dd1a4663458b6bb4ca frame00000022 +53a6c6b18edde2245132cb0573f26af3 frame00000023 +4eaf6c6864b80915e09af25f16ed4dab frame00000024 +8b6691f072b8f836112d4f92e272d553 frame00000025 +8b6691f072b8f836112d4f92e272d553 frame00000026 +d53e4b3ef334e6cc2b349ad727ff7894 frame00000027 +d53e4b3ef334e6cc2b349ad727ff7894 frame00000028 +c3cd62130f44507beeb6a28cad6be76e frame00000029 +430b84cacf9d286bb26052f22727336e frame00000030 +8e73c73df1728a1ab71ec3bdea767cc4 frame00000031 +dfa633e9060c23be6ea8bb373540a973 frame00000032 +449bc565c54122e0a7fdcb7d3a860056 frame00000033 +c405e1a1d307702d849f0fa5af1420aa frame00000034 +bccb3e62b662b8bae7bc64f7afe2825a frame00000035 +89069aac36630c1c20da7cbff23dd041 frame00000036 +89069aac36630c1c20da7cbff23dd041 frame00000037 +9ddcb40df4b7bfe370ffcd6bd9827c59 frame00000038 +4ca2cb973b0928c92a97afb2b4f05e19 frame00000039 +f39fb1837a1d0e042446de0e1c3c466c frame00000040 +f39fb1837a1d0e042446de0e1c3c466c frame00000041 +f39fb1837a1d0e042446de0e1c3c466c frame00000042 +cfc80a07beaadb6062e4a95c0e99b9db frame00000043 +d47d1dd83b5c7935653d844d46ff4667 frame00000044 +87c90b6763e63616cdf8fb96f3379402 frame00000045 +350f0215ed8b198d39ac6625aa125bd8 frame00000046 +fdfff7315f05d0aa1792c2695f72b864 frame00000047 +121dcbf24cfc4e62f5754f53670c4465 frame00000048 +121dcbf24cfc4e62f5754f53670c4465 frame00000049 +14d9acfc08bd17131b75f222d7c554e5 frame00000050 +7b1b71ba56fcfd3c7b64bc2313aad6ba frame00000051 +7b1b71ba56fcfd3c7b64bc2313aad6ba frame00000052 +3db53d9485689c441f4ce70d9fb4d44b frame00000053 +fb1de4b7119234f71018c5c482c4896d frame00000054 +8b4d3d8411f4e45b34864370bc7a97b4 frame00000055 +a1dd0c5333e755a99cfee618759df5ef frame00000056 +023a95fd11efb8c7be04dd6f010cf0ee frame00000057 +023a95fd11efb8c7be04dd6f010cf0ee frame00000058 +023a95fd11efb8c7be04dd6f010cf0ee frame00000059 +eb0cd87facb4824407798b770c2e7a95 frame00000060 +68a938940f29773497689a020b316bc2 frame00000061 +efca9621f22fc0f50aae3f62f9931bdd frame00000062 +c42eba9d033bb796150997f642ccd105 frame00000063 +d0fcaebd7ddbb17e34247b129a095fce frame00000064 +410124f346eeec6dcd88f324a8b91014 frame00000065 +79491238ee7172bb275eb9e1846e4504 frame00000066 +41de891b245e312938e9309a405caebb frame00000067 +d95e8a4d1e52ba346454fc502201b787 frame00000068 +bf0366c59f5a3226648dbf4cf0ceaeec frame00000069 +fe9a61b812c7f0cd857586c81615af44 frame00000070 +2cc494355194098dc6710b3842f9ad3c frame00000071 +9a98eec5eb0d3851c9bdb35619de1dd6 frame00000072 +16b6806656fa4fface45c57395eab446 frame00000073 +16b6806656fa4fface45c57395eab446 frame00000074 +6080581c433c7b163b7625a0a12ec2df frame00000075 +a24c630803dbc1fc5d4a9394427e8d98 frame00000076 +766666e4d8aa851457d14cf87947d731 frame00000077 +370694ef8c195f6785b8edbebe860396 frame00000078 +39eb4e73a27166b286674afea83073b9 frame00000079 +d48cd44699a763fbd6d656b62b445ab7 frame00000080 +d48cd44699a763fbd6d656b62b445ab7 frame00000081 +90d3013d04075a9b5e343e2aea970947 frame00000082 +90d3013d04075a9b5e343e2aea970947 frame00000083 +36f8be718bf6cc63d3f60d4afff943a9 frame00000084 +dae30e45403bce87f66aa5b660e9a90c frame00000085 +86e14c35c4fe51889081c45ec4959b0c frame00000086 +86e14c35c4fe51889081c45ec4959b0c frame00000087 +deea96276912e7d31e545cd1502babc1 frame00000088 +a13b85006899e9b1ce6a68839372f6a2 frame00000089 +f9a08731e4d6176e157dc173aa3a911f frame00000090 +2c0e5feaf0e36474b906716146bc0f93 frame00000091 +7a67729807de2dae403bb7fa32b5644d frame00000092 +979f5d2bd814d8cbb6cb886fa5ec2589 frame00000093 +e4c48f5a7547700e70f67eb9ded4ceea frame00000094 +e4c48f5a7547700e70f67eb9ded4ceea frame00000095 +dc530f07c47efb5de43a66ada363efee frame00000096 +dc530f07c47efb5de43a66ada363efee frame00000097 +ecffb837266541f06040360bc4af36a3 frame00000098 +9ccf4fefd78a856b959d0d6522addad7 frame00000099 +e93c53c7d9bc8a0193694b841c2ca109 frame00000100 +a589d5567c6ceb6baa4c82c8239bb40f frame00000101 +a589d5567c6ceb6baa4c82c8239bb40f frame00000102 +b7bce1f13b919f02943a9342c9f018df frame00000103 +b7bce1f13b919f02943a9342c9f018df frame00000104 +504dbd29dceffdc8956c6ca03932354b frame00000105 +df395600a82d09d3bbe7f5c78bd6a3cd frame00000106 +5dac3cbc70e72ce1825bc03263c66aa4 frame00000107 +def20ddc431f541d1f76c67e83551122 frame00000108 +f7971c59e2338489bff929a5d408236c frame00000109 +bc4da013251df8a1295280cc5da13245 frame00000110 +bc4da013251df8a1295280cc5da13245 frame00000111 +51eb052648d5d3644f0c1817465d514d frame00000112 +2c2b281a82f3adc29d28c5ab38f5553c frame00000113 +524d85761119bb01a26fceb4404f670e frame00000114 +66d7b8e7d45d8fa7bce0a6bada55e1a0 frame00000115 +f48d2ee93cc1020902afeb8e9182f62f frame00000116 +a39c4c444362c1483d06264b1a31cd5c frame00000117 +a39c4c444362c1483d06264b1a31cd5c frame00000118 +2454aa4e67bccbab6b92d1c7ca1c5f4b frame00000119 +876def4cad8c6c0dacb9840d7b510931 frame00000120 +876def4cad8c6c0dacb9840d7b510931 frame00000121 +e4ed6392608556e8eeae83f8afa46f0f frame00000122 +394e98027076806a3ab40f20c203988b frame00000123 +1d77c626380ec9316dd43bd07800e084 frame00000124 +5b85e503f03589c3a942906d6bdb12c4 frame00000125 +58c2b659d66fd45aa7ef69bc3a47ad42 frame00000126 +4f4b1a5ea6ce024c74326496686b66bd frame00000127 +fd5bec1f13ff94a0894fb3e065547a52 frame00000128 +085e2b7cb746315cb4593247705906a0 frame00000129 +085e2b7cb746315cb4593247705906a0 frame00000130 +31486cee1afe66d5070e9a34d971d51c frame00000131 +43fa5a6a63619d1bd249cff6402f367c frame00000132 +c5866b865836d34ed0524ed7c72d8806 frame00000133 +c5866b865836d34ed0524ed7c72d8806 frame00000134 +af7ad405a2ca0b56a9a8dcc99550b24a frame00000135 +58f401adf6522281917fed4e7ff68e2e frame00000136 +f6490b5922da1523bd1c4daf59177a5f frame00000137 +7b05c0a709f427d3d2afd0338539fcb4 frame00000138 +562fa1b1c264f560473e129ca6b2a03e frame00000139 +d19e94636b6585a8f4a7ee9ab0c7facb frame00000140 +8da6da12b52ef82fdbf4cb0c733849ec frame00000141 +9adb5a1e76a7b0dda2e964be4d8e899f frame00000142 +75a08f8b8a532ba75926ccfeb1dc3f72 frame00000143 +ffb09b7e0380e97850f6fb8a0d4a7d5d frame00000144 +a44bc7b3af3f78d7f988d3ac4b91efb3 frame00000145 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/rt21/VPAR0026.AVI.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/rt21/VPAR0026.AVI.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/rt21/VPAR0026.AVI.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/rt21/VPAR0026.AVI.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,130 @@ +ce49bad9757a4fb2ab488a99eb98f0c2 frame00000000 +671cf56950586fae81082582020dc7ad frame00000001 +ddeb3639edffcd394d5c18145822e731 frame00000002 +e87c918cfbacfa18edf599b67c64dc8d frame00000003 +230632990889df1de317d2cf251fbb58 frame00000004 +5fe99b9f255ea5c13ba232b46da53468 frame00000005 +4da52026ea0c45afd9802d5bc1911774 frame00000006 +c53b0bd7ac70740d982767d744dd2164 frame00000007 +842097180b24a4c120b26f0e3ec9835a frame00000008 +5ff433e8f6b52f315dbaa3377ad0b38f frame00000009 +d34ec23dae82ed254b1754401fe5be38 frame00000010 +03aa24aef22842e9436b9f513cad9ea1 frame00000011 +30b274e65b44b22108bfe57ea4d5ad5c frame00000012 +23323850134b46623dc3a15fb3925173 frame00000013 +fef7823a1d4a1db24b6be377c1eff837 frame00000014 +41a4beea4506eec4f90251e443ed167c frame00000015 +9b1fbc1a6eda6d440f3ba8ed5db6cd38 frame00000016 +d7376a05d1f38242db1bf33d3fd24c21 frame00000017 +bd1a5bdee7690eca35458e9f9594bee3 frame00000018 +49df8d45820b3d2d509ebdfbbb837af1 frame00000019 +1ba42d035f8bad81b30756052b37cf03 frame00000020 +c82099a021d379aa4eef4a7d96d542d5 frame00000021 +3f5ac0719faefe945ae5fe795393a1f4 frame00000022 +776cc51b77d1b4a6db01c0de859aceb9 frame00000023 +13b21668a6d04bb720bb733c68ae2672 frame00000024 +2cda091b9895336832246cd553b0b0f6 frame00000025 +5fb4da2fe1a42d5c58b1efde9434fec4 frame00000026 +d3c52713f5d43c4e7dab46ae0746e27d frame00000027 +cd2c8cbaf06946629beb2a4ff85e1364 frame00000028 +af4d1acfce91c797de6d652ab0d91bc4 frame00000029 +1acc331c268a5acad8cdd3a30e07eb55 frame00000030 +b27dbc47abb0030dbc19f3dbe607e9cf frame00000031 +0f5e4f31a61db5bc8c431882119cdd49 frame00000032 +e4fd45a89c3e12f7c86a685140945ca9 frame00000033 +a3295546390b992b1aaa8339e43e9cf6 frame00000034 +8b0817b4c8810c62de46374ef6e0e4a0 frame00000035 +fc9360d12616988207b5989dca99adea frame00000036 +07de506c60c88d59a224a8a21c5315b4 frame00000037 +e9d94260006a0a2a202d41040c192df1 frame00000038 +17f88a730fd8e132fbb6809f8cd94863 frame00000039 +83fd0c209c38a89e3f29316fbac6bb9d frame00000040 +86a8a6b87e5f571c2f999b75450a5edb frame00000041 +1e984cc6914d30f3b5a2d982da7b0dc0 frame00000042 +d967c15875ea8ddce0a6508b19676808 frame00000043 +1ddd062d5f48b8a5348b189aefe631e0 frame00000044 +8211ffe73b081ff9498063b5e402eb48 frame00000045 +607501a28aaa2b62b3cf96e51399b4e4 frame00000046 +5dbc5c131344fc1391940178f1ca1523 frame00000047 +40b024be01091d53264e097a6e546223 frame00000048 +9a2e29b6b5ca65199b1e56ce03d82750 frame00000049 +1b17583ec9c1cbe23f135bcbef3bd5e8 frame00000050 +0d3005c6576d22cd7a6a04fec274943e frame00000051 +e444ac384ba8619228b6a3aaddb3fdbf frame00000052 +9c24dbfcb31f51a25d7607d26d970fba frame00000053 +b99e6452df7951648fcec33a774cb3a5 frame00000054 +32824a75cc725fcae2cc5576cf168012 frame00000055 +bd361d16d1b550c9216083542a022f93 frame00000056 +aaed4f9a31e6972247ba9484412624f4 frame00000057 +490592a71278f110382835f35dcc2658 frame00000058 +8138172047bb042435c73fe725ab573d frame00000059 +a952fbc9738b3bb305a4074af0f68b26 frame00000060 +a8fa11c938b1354a94a933f97a835901 frame00000061 +1a941ac93bf638230665acfb272e1c1e frame00000062 +d66a89aa3990bbc600451c624414a9e0 frame00000063 +7718dcf4825f40a953d17a812c8b68dd frame00000064 +d5f5fc9ff5021c983d3034b947ad9867 frame00000065 +cc179c1807849d8a15903503ece1352b frame00000066 +3413919302cc6d8175172f4534c0bf68 frame00000067 +5b558918c6324d42bfd12a8c0c43d6c7 frame00000068 +b358c90e784d46feef72c76ae52ca5c5 frame00000069 +dd53464828d9f1aa31f1ef5a61fca883 frame00000070 +9d908ffba2d334223012dd4086a42362 frame00000071 +7ae0ed1221a85fb51d92f1c64b983a88 frame00000072 +30eb1817f41809a60acb00f0f83ce6fe frame00000073 +1dc2b25b508f15c64a5598bd9de6103a frame00000074 +9efc6b29ce8c2d41e908598c5ca8f866 frame00000075 +ae3ab38f5764ff9532a89bb334656986 frame00000076 +8cf410e94dcce35f00449c697ede7da3 frame00000077 +39e73322cad9dec1a5575bb81d153bb1 frame00000078 +6030bddc47f2bf5dae181c2db279ee13 frame00000079 +de99363d9af9fb2eec550ef8c58ae1c8 frame00000080 +2d948a0cee44123554f0651747f90680 frame00000081 +d01f76f41e82c5186209bee281af04d7 frame00000082 +540b1be59eec06c0b11f51358c8ddb98 frame00000083 +cb35e01bfe07bed28d4d0ec25c612183 frame00000084 +3ad1c9d90304ad5058853f5fb8a0bab0 frame00000085 +cbd9200f4f39bc0f0bfaca9dc1b94537 frame00000086 +8c79e2093169b97c20635795404c0de0 frame00000087 +ffbced0d734ab2b4dd479666a0935b67 frame00000088 +5e8039d9b01ea5d3ae45ca7cc8a00bbb frame00000089 +b3fdae637d6658d5921c5b4447b6f3e3 frame00000090 +eeea863fdeb3c21fd13bec5df0c26072 frame00000091 +2fdc591b9ceebf727777d26ef7e29324 frame00000092 +5e39f7c1bc8dcdfba9385e8653a63bfc frame00000093 +7753fcfa7f162cf1a9c3366f15e42629 frame00000094 +961ec4d73e1b2972096e420e9343391f frame00000095 +2f45c25a0644b4a81af9b15cf107cd71 frame00000096 +d3b5e30216af8b9fba4da6b544337b4e frame00000097 +7188dc150920dedb2b6ac1010e3426b2 frame00000098 +21638f7946782565da33dc691c62cb6a frame00000099 +d6b59bb1b36ffe952b1aba3355c1a754 frame00000100 +2ff56be298e989a0e47c60d563b13fcd frame00000101 +860e0d1660505898d4a5bdf642ed328b frame00000102 +5da0fa0c1ada97d5b0aa496e604d5e93 frame00000103 +be6fa9aa0a4501b09480d530fc33531a frame00000104 +0d045be1ff1ff11d4a50193d48b58fec frame00000105 +4f4f6d8a5506395d1fd6905d5abfed03 frame00000106 +8bb0be5fadc4c784ddc785d315e7d4ef frame00000107 +761c0e0bc6649c8b3503347c416a6ca7 frame00000108 +2827e064ecbd247182997b3356df3d9f frame00000109 +3cd5cf7c00118deabe04cec7ee7cdfcf frame00000110 +7c5fa5c9d3bbd2c0bce68fa2038394d7 frame00000111 +18a74c1a143a1ce941aa882a02ee0930 frame00000112 +f418ceb0d27af59b76839d9fc719b036 frame00000113 +1fa82719cab66109d99581a28ba42366 frame00000114 +cc63794007cb14c52b52c7b49c362fd7 frame00000115 +b3983ad512f72df9af2d30d0d4848fcd frame00000116 +2ed68441807f25669d3edb792873fad7 frame00000117 +6213349418b8aa37119306138a03215a frame00000118 +7dc4530cc2fc8c0af22ce546afb81e99 frame00000119 +f25c03182a647a0481f3de5e157bf773 frame00000120 +51527945cb7496a7c11952811af0c231 frame00000121 +293ecc08040065036291451b591301ec frame00000122 +8948826f111b9a1d48838ea726ef0aa8 frame00000123 +a088ab887628ea3ba396274c2e3b8ac0 frame00000124 +fa5ba99bf30bc63ed4f31d1494bff5ff frame00000125 +7e81dfe82b202c625415a7f8ad0de149 frame00000126 +703ce10b50aea7a814cd7496eb3a3ef3 frame00000127 +44801b62c0ba0130ce175d99d4e0815f frame00000128 +b004846158b6ad73ace3fb7a6ad33d06 frame00000129 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/SIFF/INTRO_B.VB.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/SIFF/INTRO_B.VB.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/SIFF/INTRO_B.VB.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/SIFF/INTRO_B.VB.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,100 @@ +b807df074ef4c90bf43910041bb24ceb frame00000000 +d1f9bf9290874508fe4b0d74272b96db frame00000001 +d93fbd9772c2146baa4acc576eeb0d07 frame00000002 +e3d03106b59c99d1c110914717f3bd04 frame00000003 +738c277aaf9f80a69b7a6699135b0f57 frame00000004 +94032e917dde90a8b49fb2a0f726b7de frame00000005 +d805cb584e52bae8b91956c5195e78e6 frame00000006 +a8026d1dd65fc402484c98278f6ff92a frame00000007 +8f9be72bdfadb84a4babc3f275021c72 frame00000008 +501ad472bb92212c6c5e2e4b8582ff9f frame00000009 +709dd4b943c56c5ffa21218e62593c4f frame00000010 +cd59047a0a26bec71bb1903d235de930 frame00000011 +f38d6f06c49a5c5873d8d4df456331f9 frame00000012 +d59318addd491e5ac11c7e4180f579f2 frame00000013 +a16e2d123ed0a3d688876115969b0dd3 frame00000014 +85b860878e8b74b234cd5573535af433 frame00000015 +7de8ea57d2be2a83fe415695410179a4 frame00000016 +ff529bd3a30462c9a9e6288f5a549fed frame00000017 +22b0d81eefa23f43f8b7f5bc301d556b frame00000018 +d5263747682626d7f13436e31bbd106d frame00000019 +fc47d43acd2865c1abc59d98a6987fc8 frame00000020 +64bcdeb4f351c060c10aab8bb5e13fe8 frame00000021 +242b889793e18fa1d797cb0d4c644331 frame00000022 +be662792f2a6f1a43b3ed7b9a2b9eb33 frame00000023 +d0b5e1eac3441c4d1bd774282c14e79c frame00000024 +f3c824aca5cdb40d045e61a90aaca07c frame00000025 +269566ffc82ad7b367e2051884f351fc frame00000026 +19612713ed6d38362837753a51646369 frame00000027 +9476c2eb675dcd05d48f2a78332921f6 frame00000028 +5afb21910173509344db38f43bb2abc7 frame00000029 +63190d948d9f2d422349764108f53a2f frame00000030 +156edb8c8413067d5921f5d9c21be635 frame00000031 +163d1c9005607dba7ec5bf1250b3521c frame00000032 +809600931b30ae30cf725b7b009e3b95 frame00000033 +65dba06b9638719ef9cfd015e2f4078d frame00000034 +77c0881b0b956dc63d4c7f4c333d7ea1 frame00000035 +19913cf36639183fb1c63caf4591d468 frame00000036 +3259433f2eca65e19bcab83ef951190d frame00000037 +6ec02001d1fffb327c9f6183a0331023 frame00000038 +87d277eec62074c60c7954d9395f7d64 frame00000039 +1021ef0dc132725caf168f067bdd48ed frame00000040 +803e52ed643282baea3747f5fa712c84 frame00000041 +66a3d8a33e1484f9345ed2346538a7e1 frame00000042 +144ad4f28fbf79dad0a0cc8540e72ada frame00000043 +6d53908c4e55a33fb8a642a6ec0bebae frame00000044 +16895f1405d3baa351aab79640021649 frame00000045 +5bfe4c205ade1f3fb5bfaef8ef96cc68 frame00000046 +eb189c35f73758e749f19288563f0895 frame00000047 +f09229c050b4f874bc4304e04bd47f08 frame00000048 +4d2a32f2867871fd6d08d1d0a709f56b frame00000049 +45d8f539920e834f19228f6b7cbf8c9e frame00000050 +d10351986b04a0c1046d3056520e1791 frame00000051 +303c5547e0afb6581f5a934c1c882a20 frame00000052 +8fc7ec869d6683c7e35e9e9b1ef4bafa frame00000053 +c90d89151e05e468dddbd7f38211ae1e frame00000054 +bb72a7cc4195ebaea17a60cb04b3e493 frame00000055 +6be863b46a983e34d4dfdc2bdb41c26d frame00000056 +34b3950707814e6395eb3634ccaafe94 frame00000057 +1aecd17655570f0c3f570c55d80497d3 frame00000058 +1d3c0905e841f9249525aee8520a93b4 frame00000059 +4b58bcf5318209b1b7c22988d2d5ecfe frame00000060 +05d6ca4817ba5db6359f3688ec92c04e frame00000061 +14781ccd9c5ba17955634846eee78422 frame00000062 +e23ba74e1236524d99f3b69d37db425c frame00000063 +348722e5f503be3c2b359c420888643d frame00000064 +76fb413e69cc23a5e3d4d337bd3b39c1 frame00000065 +4289c9a0f099d07deb3511b9ff8ee528 frame00000066 +75ea9eec327145ed314a454ec2f3952b frame00000067 +9693aef5bb3f4ebb3f4751b78fe61661 frame00000068 +4c0b76f982bde57c7a79d84601bb84d5 frame00000069 +f04906ee97e02a1ef7962ad28d7fc9ac frame00000070 +6db75ca8bc08baf2c6f28675a368e6d8 frame00000071 +b1811d2b80fd8f609e593d9ce1060713 frame00000072 +4768cc12f23ed15c028fbe7047f8040c frame00000073 +39d5cd52163b03877443faca962bde5b frame00000074 +8965585269ef718e31237b510d569a16 frame00000075 +0c47b6d65ab0819a830e015fb46c15cd frame00000076 +feb32af17cf1ab11dfab08debb2041ca frame00000077 +a88adb9722843bc0f217314e57776e3d frame00000078 +c799a0862152ec2f1faa9e4948d3090f frame00000079 +b64b8dc067ab1dd0128af8e3d4d7a864 frame00000080 +fd1b5d9e627070fc56bbba542524eb53 frame00000081 +9be5264b161e9cff37d99914ad6e5571 frame00000082 +7ffaf6e0458175bde5da904f594a8ac3 frame00000083 +dc3b08f9b9c400314b1fbee1cc31285d frame00000084 +89faff19aaab41006d5617eacb8c6a06 frame00000085 +3ab075bd3b4071007b28f5b981eb1ba3 frame00000086 +ef01555b244a86d779fa1d38d3cd8a2f frame00000087 +38d614dfc11c6c910dbe5d59a5d6632e frame00000088 +4c56b318b6fd54210b409904da94a01c frame00000089 +3b39dd000be256c9352ff624e5340446 frame00000090 +d1fca0d64f13f6f1b31ca8ccca6f4c46 frame00000091 +80ad5910350e8b48c95e98985a084b81 frame00000092 +6b42d6233e1dadcb7209712116550ca3 frame00000093 +693aa2a0b53a151a17f34d502431c7ef frame00000094 +6cadca697e3917109c27c3fd8fbf35fd frame00000095 +33b73dca9f8e356f8be0f6e60566a2b6 frame00000096 +d70d0a503aa19df2650979b977aefa7a frame00000097 +cd9dac70ca618e7038bd955ee7650d13 frame00000098 +926330c32776b2fee792f18d12526d9b frame00000099 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/smacker/wetlogo.smk.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/smacker/wetlogo.smk.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/smacker/wetlogo.smk.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/smacker/wetlogo.smk.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,100 @@ +9f047d083a4ba9af62baa25f7e5e3bb4 frame00000000 +3c427f5c3b8a3f037aa173743691d581 frame00000001 +5361b5c0a5671e7acab6e5408f7eaf78 frame00000002 +515d3027e8e07fae858294bc20c1fdad frame00000003 +faaebd68c282f67c143a30c310460d71 frame00000004 +d823bf260250b09e5ad99abb7e741d16 frame00000005 +9475ff5eea239494315ea3d224c674dc frame00000006 +016157211af6ecb10766ec7933cd1e80 frame00000007 +b96cb843b6f09ced9f94aca9b17f3a93 frame00000008 +75856ad978573061eb23de183e9d23e6 frame00000009 +d8bf8f8a801adfd38459c786f981a55b frame00000010 +caaff053c382d6fba7bad551b7eb17c0 frame00000011 +5906679ab0a66b249defec58259f8683 frame00000012 +acea41cb40a61d75c8958eac899a54e8 frame00000013 +49f59c097b6d0f4800e48867809fe625 frame00000014 +2b5fb22e17a8e194a1d15c68b40382bc frame00000015 +cb31fb2341e76cfcacbdcfdaa914fd46 frame00000016 +031007be84817e9fbbfdf2d02d55e660 frame00000017 +3cb5e51bfa442e9ea4a74e7bd78dc394 frame00000018 +9a07113594721c9a14062782434058ac frame00000019 +88a14371e724f46fbdc7dfa8beecb80d frame00000020 +13739bc066f8bcdfa480e55edd9e6f43 frame00000021 +c1ea3a1b70db646743248c7349c356d6 frame00000022 +9b5c136f9bed5bb86cb5bdec94de7696 frame00000023 +3cf0e8821398b16de0625779c7d027de frame00000024 +4488ffe4479d4df14434e38f87a486a3 frame00000025 +cd5396ffdb90f2194398fb7b938f79e9 frame00000026 +82c58f0b865aef783ed5df4f7b29e18e frame00000027 +d004d22fd2fa221a650a797a53e31405 frame00000028 +33dd7d753cf1100434f75001bf32c152 frame00000029 +24e1902d26518462e190f1c718be9226 frame00000030 +fa7f81eddd58d9a0a4f6f2bbe70e828a frame00000031 +28f848310373c0e5057931fb36150dbc frame00000032 +953bbc7c3b7209f995be8093f21459fa frame00000033 +86488ca3f1562c64050982f8b04b2d70 frame00000034 +1c3540337f8c408276435f9e347c0f74 frame00000035 +c5b158d096cbf1196a55656122215b53 frame00000036 +5d10d5d5a82e11a67a8feefd6775d21b frame00000037 +673d8a763e919ea52543dad4b99e066b frame00000038 +72e8541e627c1bde1eda728a246c04ca frame00000039 +8c4a44a700eea03d0f5cea5bf1a6407a frame00000040 +27decee4e1aec2fae4372874cb4331e3 frame00000041 +df80eb6df91ee2ad75eac71c5a73a4b8 frame00000042 +eef2d39fd166428fdd850dde1826df88 frame00000043 +c26e38f72730e1da4069ae58ff516bcf frame00000044 +18b8388aef2aab323057f1648915f811 frame00000045 +4bb1f588492fd9da78133abafd03a775 frame00000046 +60901c4e64b12b8eb2d2e33832a611c6 frame00000047 +0a948031b34e1774dd201dd6be0ee290 frame00000048 +d6ec4546df1c5648f8de8048dbe9e381 frame00000049 +0e7f257423f0583fbe1d692719717f4f frame00000050 +8dbbf5c80d8018b02374c7c51aea3cb0 frame00000051 +9704a4b09f7bcdad6c06600b6302358f frame00000052 +74d398cbe4305f9efd4fe9dc808c4e01 frame00000053 +5d013cccd0dc6a389915af9ad693b2be frame00000054 +0252d45e5f0d2a9bc822baae8a7756d0 frame00000055 +9339c735201b529050b2931d4175edfa frame00000056 +f61fefacfc71bfd1134b3e1f9c24ea0a frame00000057 +75311e83717e46fb30560371192eca7a frame00000058 +c3ce80985b59305c9004c8f1ddea7708 frame00000059 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000060 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000061 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000062 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000063 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000064 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000065 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000066 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000067 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000068 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000069 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000070 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000071 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000072 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000073 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000074 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000075 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000076 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000077 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000078 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000079 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000080 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000081 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000082 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000083 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000084 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000085 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000086 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000087 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000088 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000089 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000090 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000091 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000092 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000093 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000094 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000095 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000096 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000097 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000098 +5784eaa566cdfca19d6c1dbf51e39cd4 frame00000099 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/smc/cass_schi.qt.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/smc/cass_schi.qt.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/smc/cass_schi.qt.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/smc/cass_schi.qt.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,120 @@ +c7283a9c072a2b17c8f89c2723ffd462 frame00000000 +f3381150a38653cdeb24644903bf643b frame00000001 +29206522ab4845e2cc753b26326a894c frame00000002 +a7981605de9f72ff0ed6fde35d488760 frame00000003 +08b25bc0802687e4a0179eefc3440aeb frame00000004 +7431974af266073d459ce12614c57e8f frame00000005 +d5092845d8f13060466da43186df3412 frame00000006 +272afc98b39f64cc7939ab6528be04f7 frame00000007 +7b86e3dbbee44a90281c423895c71bce frame00000008 +a1181827a711c2b03694fe23a543b40b frame00000009 +0d465ef74ee5695d5f03db74ab2c7ec7 frame00000010 +69c9c148320f6c9a673a706d646c0c22 frame00000011 +8920fa41504c1900a42d459f94d4bdeb frame00000012 +51be6ea8c0147b299b061867ce379ae5 frame00000013 +f3786ddf669027115abedf342ff686ac frame00000014 +9303c98c0118dd093e161d86146620a3 frame00000015 +30c783d4f576bbaeb8b7bd199ce1cb51 frame00000016 +0238d8108f08fcd00462a746bddcd463 frame00000017 +795b473e4266f93e816d2f5d1534e2c9 frame00000018 +8cad47e152cf5a9b19f32186cec3e810 frame00000019 +a2ef2aa6a0f13c61ec3e6e24e3b89820 frame00000020 +23ec015dc3093a488b1152a4a0070ed0 frame00000021 +cfd62c50ef5ab98dc97d96cfa5fa265c frame00000022 +5a56a12255edfd99cf88086fb4b4d82a frame00000023 +fbd69c3f7b351319c223ab0fd65d0b97 frame00000024 +75024349701dd6ae342db818d3d2f1d2 frame00000025 +2a22f7db438bed4f28a13fb0d8209a68 frame00000026 +51b89093689330a08ff7bdd28ebb6d93 frame00000027 +138be99e1db47451d8fbc0f34f5bac17 frame00000028 +88e5fbb37c83a91d7058aea02ffb1803 frame00000029 +e0e5f9e07541604ccc0fedb40bcc1b88 frame00000030 +d6c3a828df92672dfcb695d5c7a32f86 frame00000031 +eb2dc0e324f19c7e3fb0d2c552ad6f42 frame00000032 +3d0d41131827d94312a3f106857bae3b frame00000033 +e5753790c98c739dd41bf13f00453e96 frame00000034 +d7f2edde0f4be4f66c0b8376d0debdc5 frame00000035 +9ac3abdd6a7977b49b4aeba85e8742bc frame00000036 +bade5af660bd991a5cba2cb4e9ade6fe frame00000037 +7e9ab46f675d26893e73dee997114028 frame00000038 +155d08fc70e561689fc0e3bca42dead5 frame00000039 +fa0438280ae2aadf193f4d97583047cb frame00000040 +06a0c39bb0fe8212eb3ecd0168eab549 frame00000041 +1b172ca56e7ece0ac50d76d3cc4b6c8c frame00000042 +857d644b1c42a56ad97ffffe015e692d frame00000043 +3298aa98b8eb8560aa8a99e55db8f8c5 frame00000044 +508de0046a71352c67e7d18f914d38f9 frame00000045 +0f024c9c7d9079f710a1229f32dbe737 frame00000046 +6194b6fa2a16275bd96bbcdaa3306d07 frame00000047 +2a0acc342c4c87765150b5d63a80df32 frame00000048 +1aceee12a56e96ce4268aa7d00ad287c frame00000049 +4e47b028b33499f7c697040672262c76 frame00000050 +dca7ace1adf7b2568a349dd515105454 frame00000051 +2906382f5dd283c2efa134a8012c7e37 frame00000052 +a1a2057afb8c82d2269af046b191ce5b frame00000053 +0641a03857088684ff61391b9b7753fa frame00000054 +73b381b27e6c8616062ca1d5848d5bf5 frame00000055 +5ba0471bafb25136ca41de1ed19f195b frame00000056 +b2b2a58a12da9a3657f107321aa175f3 frame00000057 +b9481eb77210128f57b478504ee783ae frame00000058 +1fd28d174a16928864bf302482feae34 frame00000059 +359ad7c09d61d5b6f6fbc154c5e5af74 frame00000060 +4a2f99aa03de486ffacd267083106008 frame00000061 +c8f9c38bc43b903b7753bf86dc2062af frame00000062 +708ebe77963aa0c7ef52c2b603495b52 frame00000063 +621650eb1d31cc4a43cd7d913843b57e frame00000064 +274dc60f809db1c93ba22c5ece3fee2b frame00000065 +72ebe660aaa39d97a0668f038e8037e5 frame00000066 +5302f68262eff0310d01f67dd751f96a frame00000067 +f663944e185ac254ef48a2ade9ef4932 frame00000068 +40e014b7d3054611c2cd9af60267e603 frame00000069 +49b046a9a64b0cfaf11922f859b35e5d frame00000070 +4565c6b549208612b0097d3e17f9f000 frame00000071 +7df9f1e7c6fafd4ffa68d25a5bace46b frame00000072 +9ccb88416adfed9239a33fa62c0aa247 frame00000073 +5770397db58e792c4a66b0e2d396da57 frame00000074 +66aa5cba6dd2cb43ffecef2305e6c7d0 frame00000075 +70bac59d2be45df7c79efedede2bfec8 frame00000076 +f1913031be2bd3d37cf384d3b87d38d5 frame00000077 +c68a15a8877ce3a9709d8ac540038042 frame00000078 +4d14cc442958acd0aa7d9318b2c93593 frame00000079 +5794b94c89c84d59af3e4c883e4cdaf5 frame00000080 +75d365d93ed0c11b7b89f2385b23a832 frame00000081 +a56958fdcf13172120b39cbd6f687602 frame00000082 +6d13ce22da0e31dd57a83a5e2446887e frame00000083 +9c09007a8f6d320c848ee71ff2488da3 frame00000084 +bb60eed1c18f2aed46123bb5943a75de frame00000085 +6c9942afe5d2632b3abf475dc4aa5308 frame00000086 +4c4f788f1e872e5d31556ac0b178398d frame00000087 +57bd2a21a1650fbd1777b34dba22f9e9 frame00000088 +a0783fd07f0c2219c209cf0ed8cae183 frame00000089 +82464dc9e8be683416bd1fe7597d7a4f frame00000090 +38325f5980bc18a05232927bf4524302 frame00000091 +67940b0b9b0b6410ab91e6f5ffa436e1 frame00000092 +903d6ef9898ea2912b706043de357d1b frame00000093 +952d1f8591ad365ea74183fe70631c37 frame00000094 +78509ea947fba850898249e9da3c36b1 frame00000095 +d796b49ea47521250ade098accdca678 frame00000096 +35d34cde18b2bcb636849b4a9478bd40 frame00000097 +6cde61a413148c3e685d63fcdb9dcce5 frame00000098 +46b9531285c1219462c49bcbaf2b0b0d frame00000099 +c9b513799b8db29ca64df8589517111e frame00000100 +32629d85c8861c42e44dd1fffc37af93 frame00000101 +82d322b21d49ebd61945517ccf8cdc1c frame00000102 +b93b37aa6aa54749315bbf86a74f02a7 frame00000103 +68b85e0d9b3b1a538e2be0b288dbd838 frame00000104 +fd83256e4684cce30c3943459b543262 frame00000105 +03ea23cdff2e7df66c0b1e9ba8d842a5 frame00000106 +5556b8a7f74e057731c8da5b6bcb7da3 frame00000107 +2d8746ed9c650ab617c636f85d1bb9b0 frame00000108 +344069de1c57c105422d0b923a4a45d4 frame00000109 +a25ff8e3e80ca616ba2d2644907a4714 frame00000110 +1245cc331602fd3c45674c8145d35e7f frame00000111 +bc9553f9c3961f7b13d9f5488ef3e92a frame00000112 +2a57ca3d7a460dbe8cbf6e9785ecc15c frame00000113 +903d93d043389f3c6d6031a9f5fc2434 frame00000114 +ed3cc39f693b8c045fdae3642a2fc942 frame00000115 +f94cb4d688075b8a1b6af6070c1d7833 frame00000116 +42dcf96b21430f0900d4dbcc67f2a380 frame00000117 +8904712e5495970c73bb1fcc7b27d15e frame00000118 +0041ddac03649a3afcddd42c2c64bb23 frame00000119 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/smjpeg/scenwin.mjpg.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/smjpeg/scenwin.mjpg.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/smjpeg/scenwin.mjpg.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/smjpeg/scenwin.mjpg.md5 2012-01-08 10:15:51.000000000 +0000 @@ -0,0 +1,73 @@ +b47ba8839f8f490730815ac2d7b6f8eb frame00000000 +75648e725a4cc48bad52adee1960f830 frame00000001 +8a8b979c568303308d2daf8b9fd52d5f frame00000002 +5bf1e7fd68a0fea7a3724dd73838048c frame00000003 +12fe385c2d18dedda08d391413327f3b frame00000004 +baaa6083ac116bacf665d5980f223b54 frame00000005 +ceecaf0da34ee85796a7ace2b30092bd frame00000006 +e40439974cfe3983eea8691e16981c65 frame00000007 +df9455d47edc05709a98481ee9defd71 frame00000008 +b52277700b211657fe2d4d726ee01f70 frame00000009 +949df18a8076ab95fa1e4a4b50aeb8b5 frame00000010 +f997a653fb9eae780845eca17472688f frame00000011 +26e5e5b7da160df4a11ba6802fc28467 frame00000012 +29efa33b7f29c943ce0db755310fdb42 frame00000013 +01965e72a076f5dcacbe1f66ea46dfdf frame00000014 +8f5709d4d6aa5c9b12f9c8caa52ed329 frame00000015 +773298e7fac19c23a85ed06bab6b6d3a frame00000016 +7450761de102fb67aace2e8cc55e6ec1 frame00000017 +2e0f6ddca179109b5ce4293a952eee1e frame00000018 +0bd4effd01d170511ed7146c9b1db9e6 frame00000019 +dc2dd37882ee8c208e1eaa40442c3870 frame00000020 +e6513d25285b53c2fba5679ab1be3c29 frame00000021 +9f48a93588820377983c9e19994d952f frame00000022 +eeffd09db35a363663989bb7b12f52ee frame00000023 +e0f9f48d7adea246f2786e107c1f7625 frame00000024 +2044fd1dece918c4e168c4dec03fbbe6 frame00000025 +5d4681e3ce00771a32b520e67a8842b4 frame00000026 +c96cf4f7baf22dbe7df31fc08c167caa frame00000027 +506a0b1108d5355054047620a62015ee frame00000028 +a53289d12cc30b804a69170a12a0333a frame00000029 +f679deb7b728bc1dbfe0977cc9a4a9a5 frame00000030 +a1de31d53113988c26fb687fe8400cf4 frame00000031 +bdf1ad7ad45fb32a12075085ddafda7f frame00000032 +4e46779138b359bba78d375acee3ddd8 frame00000033 +656b4d514cb3f28e195323199262a7a3 frame00000034 +530d1883d99be56b5ea6d33964dd3f92 frame00000035 +4c3f3699856e2dcd75312d521df40324 frame00000036 +b66778f20e6b8607120ca3535f4474a2 frame00000037 +d2d27db12d5e9dcc54015d1deb01867c frame00000038 +45d708ffddb570a1c30889051f52a1f0 frame00000039 +bfc856fc3e822a71e9fed697a28e6cbc frame00000040 +cbf8cf7d6744fa472bc2a2d587cb8eda frame00000041 +70e695ef234744e41283e7f6b5e338e8 frame00000042 +eae72f571fe8694e7882eefaf4bacfb0 frame00000043 +0f0615aa5f54182f9f3769e623221d74 frame00000044 +2a9ef3cc459e5e5694785bddb3b1719c frame00000045 +4710cabe8ea6a1cfc7ea7953196e4d14 frame00000046 +ef05bc2d77c3b36276cba436cd1387bf frame00000047 +3582cdc8328d61c9b0bb14e4eba98803 frame00000048 +68f14790d90675ac63467552eff42994 frame00000049 +f386a7235ecce1c42820df88d091c32a frame00000050 +e5b78e4b4abb9686bdf98051ba80c236 frame00000051 +ddf43b43d452c1cb8b4b95d6aef2ee1d frame00000052 +e625d61a5629a0c1273e9e6b7624371d frame00000053 +2027ebf23e9272ca13a49fe56dc5d624 frame00000054 +780645ce3cda94463c602f6d1c14c021 frame00000055 +3763a2ab90420fe5c36da7a6d03d9ec2 frame00000056 +484d98dcb1f8d7d507133b9b42350979 frame00000057 +7851fed5e137c959c0c57acebb3daac4 frame00000058 +07bd238b1313b9997b628138e42ea0e6 frame00000059 +4eafa64cc248959516c46431cd6824e4 frame00000060 +d3c8593889e54e589eb3fcf031e8442a frame00000061 +fb53b4b0ceb3b2b95bc875b1a9d6c523 frame00000062 +58397d74478bfa6245f0441f11be3d0d frame00000063 +a3df85701c827a6106be99d0dff6c08a frame00000064 +4bb9f4e223343a3ec3e7bb27a74551de frame00000065 +52f2d8cee457e73e6c12d80454c99a89 frame00000066 +aa07ca7c46121356d8e79c6327189270 frame00000067 +fd7fa03d3bc361c14020d76b9492197f frame00000068 +5aff7229c2f6386ef667e109fb9bf0ae frame00000069 +4a9d40ae9bab8145159aeb9cdd7a9fc5 frame00000070 +dd1270a878d9e82e745c88417dcb8bb1 frame00000071 +f37ff22c7e778cc4b8547c783ef796f0 frame00000072 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/sp5x/sp5x_problem.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/sp5x/sp5x_problem.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/sp5x/sp5x_problem.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/sp5x/sp5x_problem.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,10 @@ +e7b40770471a66c631624eb74b86d79e frame00000000 +991a503a53506ddccc4d57269ff16a15 frame00000001 +255b8f514aed4bda9fa82813134be086 frame00000002 +4049f5d77c8869f7576ef66b734f0869 frame00000003 +ab7ca9bd95a1291f8e3348046677c52f frame00000004 +a2803ecdd82fd8a18b78618ca3794d18 frame00000005 +e999dbc00f52c400a194312fa78a6f2a frame00000006 +28138d4eb330ecbf084618544260b630 frame00000007 +6a38bb8822b88236417901aedbe32f73 frame00000008 +2184a44436946eef36f3225b15df3072 frame00000009 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/svq1/marymary-shackles.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/svq1/marymary-shackles.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/svq1/marymary-shackles.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/svq1/marymary-shackles.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,465 @@ +827f75b2ae4ced819056d915cc8ef801 frame00000000 +59c90bc7100dfb812af7c2a4470ba424 frame00000001 +0ff0a4c63cc1b747ae252d6cd1e0182f frame00000002 +d461972654c89ce83dd3dc8c1c99c051 frame00000003 +ccff439e2d6d4979d499e45656592913 frame00000004 +5250bf8a23e021bc4f9c0267ceced938 frame00000005 +eb61fb83e1d9b3da7ee72a8ddf5b1646 frame00000006 +8dbc06d3daa723ea360b8f7dabd1276e frame00000007 +96e7e50d315e9780da2740468e8e4f37 frame00000008 +c80e88f52a471aa519f4e6f1116fc6e2 frame00000009 +7d826c1d7961d3cafedd0fe0ffe00a54 frame00000010 +e550dc552ca8fa29fd52299db125b73e frame00000011 +48b1a282e73a5fcd2ccfb00e32e972a6 frame00000012 +7430735b0ded019e6612098772c612a9 frame00000013 +1fa4a166ea75f2b92e18809cb2429007 frame00000014 +b95cbc2f5889161ccbd7f1106c8c043b frame00000015 +e1ebdb8ec710710654c57310673177a2 frame00000016 +d433ddc55863ddac0dcf8ca84db8866e frame00000017 +aa7ca8fe88f74192edc227264d8a6168 frame00000018 +4ad72143c986c0d0ecfe0f9bd2420130 frame00000019 +995035b040d79711e28e710eb401d6d2 frame00000020 +d5c5d3a14eb78da231700eb29b30ec26 frame00000021 +4c2ab53f9fb605e75eba473db869c541 frame00000022 +c1f7dea19995df2ffc1fde60ac0f333c frame00000023 +aa540f89dfe207c22e63e89aa6bf4ca0 frame00000024 +4e1d81c9cfb09a5411d383d0a9b06407 frame00000025 +f2225c41e3df4a35d78b3f76ff96aac5 frame00000026 +507cbbe8aae3322c437833a5064be154 frame00000027 +8abb5dd9ba382657e3f4108c982f3d2d frame00000028 +7fa3a7f236c64226870578edb265024f frame00000029 +9c65170afe230051c28350b249608f25 frame00000030 +011c3d5118ed4328c56916965f871606 frame00000031 +7b1634e9dc15693e7f8c833e8886b6e0 frame00000032 +976fd8fa8be9f549fe291d775c6128fc frame00000033 +8e423f86f726c917233f9237121fbb25 frame00000034 +5048ed7081e2163897ff0995ee58a4f7 frame00000035 +129146ebed90c63c74c5e662581d1148 frame00000036 +0263eed720338e510406825591a083b8 frame00000037 +d4ad846ec9e19c534fc32bb07a0a4e50 frame00000038 +05c6a00aa45a2a54769012a5eb826044 frame00000039 +18f15c192af1072e541edd4273773ebc frame00000040 +ac883deb7c2abe89f641506de6a9d9dd frame00000041 +c05962d09cbf911c0fbd4304c3639749 frame00000042 +67136c8ffadb1e874767afbdb9f28440 frame00000043 +5ec902be5fa334f2bc15da2594ed0424 frame00000044 +3c68935e6f4f5f55a5d694d805fdfe6b frame00000045 +cf831ccc05f8a015dfe265b0846dcdf3 frame00000046 +ddfe50664b761fd46b33f972bbc011ea frame00000047 +ffa6aa2c8dfe086489f3d29ce9aea091 frame00000048 +f8c58652707dafdf0d455fb509c00809 frame00000049 +74bf889c438c79c63cbf910a5df76536 frame00000050 +ccd56ef43807ac6ba053c4538c63ccce frame00000051 +2a61d40dc8b95a107ff70a6acd5a4961 frame00000052 +34149e2168411c4ad9097d724bcbc33d frame00000053 +7f78a23efd59410d77d2e4485850821b frame00000054 +68696ba45f33fa4e28af72d1ffdf07de frame00000055 +b6dc334a5da2407592e9c7df88b7da7d frame00000056 +246cdb642714100059b92e072e9bcefd frame00000057 +1ab5607bb34b19a70733eba15e374ff8 frame00000058 +01565023b74c927977b10b9edad3007e frame00000059 +72b2b40d6de8a7a3f5d02e3fe4612f2e frame00000060 +11dea1599c313245b8d066f912323d22 frame00000061 +26be0ee2d2d0a302550f659ed7572707 frame00000062 +b036f6ab4aaac2663d0e68a7ff465142 frame00000063 +a1c7743dce5dfbf43980ee3e00446bb2 frame00000064 +123c9e67d8386ced3775bd79d193c1b1 frame00000065 +b6aa7a7a41f753176a6fe707e05ccd75 frame00000066 +9c420e5f73cd2deb47aed6c65552e96c frame00000067 +6f122e64e413922a75b568ab6df274ec frame00000068 +e1873a01c94a9c88111f86f294bbbcd2 frame00000069 +d127124ccc809c186d545398e825cc2a frame00000070 +768fd5851af17e5d2a092b85c31ea4ba frame00000071 +e2a480a9c821cb13025adc144d190746 frame00000072 +c890fa1076ffca624097400f04aa2bd4 frame00000073 +474965ea9c2d3ad21939c1db0c8d92de frame00000074 +ed374e6c698924415e0f2df26ee850d6 frame00000075 +f045f0520b7e371daea28d989c564055 frame00000076 +2ed7b5963ed49fe518f9d710ef723741 frame00000077 +37f89a0661eb22d0852edbec6af15f7e frame00000078 +0035ca319a223772cf4b341aa51e65fc frame00000079 +0a738b42305e5f7f1ca59a87718d32c0 frame00000080 +f9d2fcd5518e31425bad739bf96ea61b frame00000081 +ec97cb8ada2b0c4a3c86e47993f7ab5e frame00000082 +561dd5f417be9390f241e21b092b373e frame00000083 +c1654cc7fe97369f2f7465d523c931a8 frame00000084 +8725b189f68b5722c5c1461fad1db039 frame00000085 +9231a0051fb289fbfe107c480aa1373d frame00000086 +7a04a12121635999e6682600316ab267 frame00000087 +14b38332ee173f15fcf98147f587fef1 frame00000088 +92ebf2d16c924dadd3262dc8fa1164b1 frame00000089 +eeac80359e21068acd7d8f0094a1e690 frame00000090 +dde3457f468b6d45dcdeaebc97d29249 frame00000091 +6eb32befd155073f2ee2012b8819907b frame00000092 +17ac1f7c97566bb502d1301924ef5bd8 frame00000093 +d08e60ddce0ec62931e54dd9f3eac35b frame00000094 +34679b1665091642f23a4528480cec2c frame00000095 +059d54b21c6d20a5e866ff27b82921d0 frame00000096 +83bf4ad545d10893c7a320832399e5e4 frame00000097 +9798e738d7bae6c0629e03bc19c91483 frame00000098 +125f6db0bcdc8db0bf68fa83c040420c frame00000099 +4d5995397f28caa1284e671b64e5b2c2 frame00000100 +f6fd13e52bb886aa9ace0c699660d6f3 frame00000101 +8bb7740e6fb4fd29a500938b02da4b35 frame00000102 +4d03e7ed811d345988e149850754a50b frame00000103 +689162fc41c3b09542949dc1919c80e7 frame00000104 +5d699f6ca3adcd5ebb46f6194319abb4 frame00000105 +650658c78a3085e8ab00cef611254348 frame00000106 +af80b945e26273f6d68517f6eb6c62a8 frame00000107 +cb9034b4fb9f7194029142e23f3374ea frame00000108 +da098180e130a525d6d4c4c141bcaec8 frame00000109 +40422527fad76425957634b406990727 frame00000110 +70e9678f012a7481fa783883224852ea frame00000111 +ec3409aad316ab896d2af61d98ca84ff frame00000112 +1e6eeed0d7ec776a044c0128f1462d04 frame00000113 +25f70109752b19f9d58127c56444e2d0 frame00000114 +f31b0fbce63b07b32c80bfafb0d4cc94 frame00000115 +141a3345ce398a08cbd0334a35354f11 frame00000116 +7563a559ab7acb9121df8be8ab0a4b2d frame00000117 +ddd57f2a6a8fea9db911a95326ea2014 frame00000118 +2d261b8adaec02e77aa1cdff4da8bc2f frame00000119 +4d3f8597fc6ebc63c45afd0d672fbf27 frame00000120 +184a2c3bc48c70d44b04cc4a119630e7 frame00000121 +b4723257d78663feb07e1c4abb635365 frame00000122 +122be32e007dd9c0ac82066b728b91d3 frame00000123 +c9f0415c605fc504dadc5994a296dcb9 frame00000124 +31b59db4f8589f224f5582d369c3d1c3 frame00000125 +357f1951d02d7770bb7a89dd86e3968b frame00000126 +7b4c7c5e45a36a033c7a1c2d55ab8460 frame00000127 +f6d4cc69e95d18f38232b282756ea4c3 frame00000128 +17b0f6178feb4dc52190d259448ae2c9 frame00000129 +db467b815a1461999c0588cc41f8b715 frame00000130 +10e3821266fd8b6b8b4f810a21c0635a frame00000131 +be928ca54b90be439225c25374aea221 frame00000132 +19ad4b86358dde6dd943446288376c58 frame00000133 +d692706354b160c5755045832e2a4ea3 frame00000134 +91cffe78eafed34d30ba14003335732c frame00000135 +2000166cbd4c92d91aaacabe3d1c91fc frame00000136 +2a7cb324e96019cf6aafec23db3dfee7 frame00000137 +7a52a99205ccba44dac34af6e0b6dcdb frame00000138 +1592a8553fe9509310bd79807fd25fc7 frame00000139 +6511c9e679c503b32e25e36f2d371cbc frame00000140 +937a1e19279ddebb94118e6ed20deebe frame00000141 +f29ad72c081c247d1b81264bfdf65d15 frame00000142 +dc9650a6a9a959c6dee31cbc701ca6f3 frame00000143 +2f23329b8ffc32c09c9bc8b8bec07243 frame00000144 +3d51ee5122baee1a49965a7821f73e6d frame00000145 +eaf814d790afaa6e56903fca071b2f6a frame00000146 +0c85562ae8fc99cde40e0d0b5cd724d7 frame00000147 +641f256d73874e762aa108d6be2308b4 frame00000148 +20ed520ea2cea27229ada2ec90662ad9 frame00000149 +b5c2b50f94128e8920c1a1e5b5853e1d frame00000150 +8b59a3427fa65d5b028f7851a3fea19b frame00000151 +51f9b0ef1fca24de2202a9c98b34ddc9 frame00000152 +4c259a55b41e79d35ead334d544212af frame00000153 +a1e501e1b94c56e2436547c670e7e487 frame00000154 +78800de2795c8618bf1a9fa7da12021f frame00000155 +ca464fd1953ea4b29fbb2ac9ba61447e frame00000156 +2bb7185859bcac86415cb118da7bc26f frame00000157 +2ee21c182038e2dd44d6514a2af2dfcc frame00000158 +c9865e48844f04e44592d76937cbac12 frame00000159 +7ec31b668402bc80d3a94578047551cd frame00000160 +e7d6b58313b16a42255f6688fb39e883 frame00000161 +66bd84d6a4d2e86780bc370d06639b31 frame00000162 +e251a8cfa71d49c12824cceac3573b67 frame00000163 +839f70ab22b4476603f2a90cff091df3 frame00000164 +b18463f8c7952d530cd8da8ac6e86f15 frame00000165 +3c2da1b118a2bfda514168c2f6bc87f7 frame00000166 +9f1743441a36c238344564f3a480bd1e frame00000167 +6de8a741d455fc4dec8288b2ee7118e1 frame00000168 +f069b9e29cc4a40aa855869708954239 frame00000169 +2fe17198801108267e5690efe4b8894e frame00000170 +1598ed19138590f0e0df727d41741faf frame00000171 +e8be61b78e6d0a7b784a71cfc8be0282 frame00000172 +30877c6606202c08183f9c755c107c4e frame00000173 +3d2ce234a9f57ee862db9da78298b312 frame00000174 +0894a6da0ba098e49b642d48baee7d61 frame00000175 +fc4996a2c9747a328488b28231356f46 frame00000176 +094eeba9ba5352ea5a6f4b6797fb8e9a frame00000177 +ec7da19e16d8218ea96e8c0503101bc5 frame00000178 +f1bc0bb7a5da4fde8fefe7b50b8b3703 frame00000179 +73df0771256ece0d81a96ab0b3b3ff6a frame00000180 +e3ccf2e292c0f09a97ffadec3696d138 frame00000181 +79f49297d31d3586824786770e0c3326 frame00000182 +8f794f6a1efc324e14f20a67b33648e5 frame00000183 +7ba70eef1286fbdc721f7b4b8213729d frame00000184 +7bbd4ea6b0cd7d77395c9fb99864283c frame00000185 +bd4149f4d44f229b111ca991261b7776 frame00000186 +38b130726c044caf0ecf78e187950576 frame00000187 +3643f70891c8b288acaa403082ce40a0 frame00000188 +5e956c307162a830be30a444c2d0e5f8 frame00000189 +6268f3d65082a9414dfb7bf1de7eb571 frame00000190 +fcafd8a3cc9782a60a7e3eeda1369363 frame00000191 +837825cec167e2f9258c264ecc038669 frame00000192 +b2953c2e5fb79ebdcfcb4f2b580f7ec7 frame00000193 +62ec697089beb21757d68bc3204caba7 frame00000194 +f64565fd7ec865b8b9f62c568915b4f4 frame00000195 +00c4b80697d6faa1e977ac261b8e8477 frame00000196 +77b38e42a5034bccda6ff99133edcad2 frame00000197 +03c4e7e484f68c2c3f4e2fec0be01029 frame00000198 +0fbd7c687f0377c915b710b8a9742678 frame00000199 +212d11cda62fe29c22451913f53cd57e frame00000200 +86d0bad8796e4d6ae0f3c40d86a0d182 frame00000201 +443548eb01a69ac8887d9ed24a64ddfb frame00000202 +3a7034030b326e7d267d6ce9c333674e frame00000203 +4d66c31e29a6f2fac3d3df930959d9fe frame00000204 +d71fc81607d3667d8a2915d3fa252bec frame00000205 +5f387b153bdddb3aa6fa552fdb54707a frame00000206 +a3e7e8f9b3d169bd726e131dbd5ca5c9 frame00000207 +2b62ca5919ecf2df363aa3a77f1c2cbd frame00000208 +13df268488af3a24952b548925661d7f frame00000209 +0e4dedb96380a26c2806dd195b9dedab frame00000210 +46b18625aeac4fde4036e7b6cceda38a frame00000211 +793bdf650ba523983ea5a2953365f16d frame00000212 +1be4338eed97d99ab9c037c1956d998d frame00000213 +03ea41e0ad904e45555dce935dfbe41b frame00000214 +9a263cd4e52854691e2e3b6ea8547724 frame00000215 +82bed53ab87cd2b38cd2dc64b12bb45c frame00000216 +e4db72289c8483acdc3191eb25063a1a frame00000217 +9e2629f9503c6f6a482e1fdc9580180b frame00000218 +f612960d95add8f7d12d7140777ce702 frame00000219 +a1bad7ea4b0175cdeff61c9cd35e773c frame00000220 +10c03cb9d126ed765c5895620539413d frame00000221 +6c0abb0f67f05bba1f5311e9492be28e frame00000222 +84a35d967d2bd8c84027e1e9e996e26b frame00000223 +8cfd0d89aaeb2d3fa4145db44a369e58 frame00000224 +69537723bed8e1528410ddaac1670bad frame00000225 +008e9f14d9a0c12f735ae8e74c8052a8 frame00000226 +8785619f5702bb35e3353ce3f5589368 frame00000227 +be5ebb6f0b4ced723f0f40e0b48a02b8 frame00000228 +108ea72ef1a97e8795834159807aa629 frame00000229 +62fd274388c49f28b22bde9ba49a244a frame00000230 +28d6e74600e02d34bea0596b749b4cd5 frame00000231 +247fa95ca8b94848078fb3e2feec07ea frame00000232 +a99c7f1d2b53a213a160485881f2fae5 frame00000233 +69a619dfb8362d6f3ddeca4c8f3f6ac9 frame00000234 +ab43f4b5b4911d8b607e5ee1929ddfd2 frame00000235 +e62a0cada762c09d5908e9ea50d304de frame00000236 +be3a460b2814d2eb8de2414913ccd0cd frame00000237 +379b15e288c0121fe93e91218208782c frame00000238 +ed667cef25ae0aa7428614125843c8e7 frame00000239 +56b41fff82a40de6b4b1b4c97dbbc7e8 frame00000240 +bab0f179a5ec19d87acadafabb6bbfab frame00000241 +2979fece3656726940c483d08888508c frame00000242 +a324c252eb34e264ecf6b7a394a0d2cd frame00000243 +e171bd96e7bcd3ff75af0a69c121da03 frame00000244 +87e29b0c2bce5997f4eebe41259cfdab frame00000245 +1f0757ade195f8670375a8ec0560a081 frame00000246 +9172f6a6e15d7022e4dd84097c7a8ea5 frame00000247 +c30ad92bfff47dd9ecfe754a7704cb71 frame00000248 +24840c2b2b049967ae94e0189be159c4 frame00000249 +896801192350b400367c3605bb07ef1b frame00000250 +11809a99dce4eea055cca20696b56c4c frame00000251 +30804e16ab802578f05f73946e975f60 frame00000252 +2b534f8774625dde3d41a4449afec28e frame00000253 +0491b9036d9a7d6942803430080930ad frame00000254 +d1c9f43f4417819432990cd5eefe44f7 frame00000255 +aa941bc5f0062745220a651bb88ff8fd frame00000256 +c3bb674a7160b829558751fb6cbf757b frame00000257 +c0ba2218952e869a63e0c8cea875c761 frame00000258 +bfc9eec4fa8b4cefd08045c2258a8dc6 frame00000259 +864129ae314678d775c284aea1261c41 frame00000260 +40bcfac1cd062799a78ecc2581dd5e03 frame00000261 +190ecc91b82692f40291ff9eeeebc0eb frame00000262 +ad1163658475dd21f596ed103402a642 frame00000263 +c594adf4385332571b366105492f56e2 frame00000264 +06e1d61e2a51a56ef81df428535f2304 frame00000265 +ab1b65444941e2b1f3691d2a26a081dd frame00000266 +7ad2cc923113e9d67a8e7577fa6a6143 frame00000267 +2d1734cb21a3feec66bf67c299e83c19 frame00000268 +e446e32939687f8797e974c280c722a9 frame00000269 +b7c2e8f17d42d33b119260c81a1079c8 frame00000270 +5907b209228f8629280240976082243b frame00000271 +daecf496c9a82fca1652209df0983039 frame00000272 +52e4feb1d0b61071f30e03f449f154fd frame00000273 +5cfd2cf3c3e58feba9ae12c474efa542 frame00000274 +9b8af9773c2b1b44f565560fd8c7520e frame00000275 +e7aca2d731bfbdcb4f0fd8d9c54b4f2f frame00000276 +43590ee41f0e3713ba069edd17cf9d23 frame00000277 +954e3846aa0b8b4a25518091529d5c65 frame00000278 +4ec2c3c2a0802ed35a748837b8405dcc frame00000279 +673ccf55e8d88fbb9a4b403f4480cfd4 frame00000280 +7250fffd6ba131d41396e6b143f2d887 frame00000281 +2e732cf004841d68e3fce0eddb686f53 frame00000282 +e39c9dd297c114dd6c2f8adc8628f272 frame00000283 +cbfc47aff5214a18bfa2fb38bcb60a64 frame00000284 +fcc9c1356b355af4fcd4d1e5e60315e6 frame00000285 +2d55a25633f1c820054acb2e0ae10084 frame00000286 +3c2d497df2ccad3a8fae70d6f76ca2f9 frame00000287 +9c0f88442bb8b7bb3d422ec3f48b119a frame00000288 +b17ed6c8209163c35fff6092babe03f3 frame00000289 +af6c4b2173c0c72dd8982ab8e14b0e2f frame00000290 +e9812b47eaeafe5cbb25f049802ff082 frame00000291 +e657b7a604ab0105f7238b75fda2d24f frame00000292 +204b7bef6f51cd61d56300a8a0eca97c frame00000293 +ea86e1050cbf07beca6c42e7de787632 frame00000294 +1c36f2667916126ec86db45fa0b8bc28 frame00000295 +109f9e0ee3b5b2dd2ad33a6f4195bd9a frame00000296 +96e13d81684cf790c8aec94d45f70717 frame00000297 +5cbf9cf283767f0bad35e178cf0825bd frame00000298 +3266455af2a32dadaa2b08198edc0ab7 frame00000299 +0ccb533bfb0b7e5ffcfb8501ae05935c frame00000300 +4377f580fd85697b5fe2761214fb7751 frame00000301 +b84b588e3f56a8ea40323b33c9bf4857 frame00000302 +e883ac476af7e8d3437cdceb765f9880 frame00000303 +1efbb35421333d76d09384c0eef71487 frame00000304 +1b73f40cb975dc531d94bf8af706a685 frame00000305 +b70f7378cb3a697dfd178cbca64b7a15 frame00000306 +3c5d3bbd28cb4405e912a0b411786c94 frame00000307 +4f6cc18e4599ccb7c769df6b4fe6f9c6 frame00000308 +07eef0256d8e49b497b944b8d046cb1c frame00000309 +a1e1f3316011a58ecf3efad8311572ea frame00000310 +efa30e1e0bfecd6dc829ab5738822341 frame00000311 +db49eb28ff2e091dc9694f06fb2df1b4 frame00000312 +644a6fe71ff5f551a2f072537189c713 frame00000313 +6ad842bdfe01529c139055191daa17a5 frame00000314 +8cda95505ba082004c964765044ce72d frame00000315 +fbf089d8774934e46a1f9ca6fa1ceb44 frame00000316 +80c04100f5f0007f25b822a3bdea264f frame00000317 +d1139f5716e7a21d6f95629b0d024d03 frame00000318 +8c1f9242d4b1923d6b262f54c35ec317 frame00000319 +c8002baaece84ef638105222f94852e1 frame00000320 +a25078f76b2b24849be16213193154d1 frame00000321 +1f6627e03ef372e3c98d441b3588d9b3 frame00000322 +b46e515d9dc8bfa3f7f2e8cadddaede5 frame00000323 +c5389364d7f01f516854e0081eae10f9 frame00000324 +e76174b2e1288bd04b51876fe9886e47 frame00000325 +5735f4f26de0dacab1932e1c73b0fb0c frame00000326 +d3cbb08825fd82930e2c3e38e95a73c1 frame00000327 +169479180346dce6455f29ca5a228b0e frame00000328 +17a74464c2d56c0e9396ec8d2263ce46 frame00000329 +6fa5dc3854fe8d951e6676ed9d878e5a frame00000330 +0f87dbfab14e487d3e68ab1b31fe2646 frame00000331 +2c60b8f754c627c92aa2e8780621a5c3 frame00000332 +ee6494d57d051929368301c31a5765fa frame00000333 +a780a0f8133566e82802d863f3afe277 frame00000334 +143a05b0640d40b7c785bdeaf9d8274c frame00000335 +43e7b3636ec4fbbb174c83e733623fab frame00000336 +6df2aacf1c6557f410f3cba31d033515 frame00000337 +1d5c8767688c7eaee1ce2ba2facdda99 frame00000338 +bbf01a1d186f51714bc01f4cd99c739e frame00000339 +153b3c15fb6c1c9397d49da51f746411 frame00000340 +4aa453b7f131635e782942a07c1f5bba frame00000341 +fcbf5935ad9b213054e6fef941af628c frame00000342 +295510889474653740c4c7d86c87d465 frame00000343 +d650006ae319779466cbe7dc4dab4223 frame00000344 +2eeee80e631dd27e40b2355c49b2d5ef frame00000345 +802f266232244dfcbe456cef7307cfc0 frame00000346 +ceb6a4ddfd685fc8f75ceca5e2f1ff55 frame00000347 +645f37588c2d08489dec5d55850a0683 frame00000348 +fb6a0b6380a878866f2b2b7b6f26b027 frame00000349 +f206bc68c30f791c72ea959ff4091672 frame00000350 +cfdf078e5deb6b7623283651a77feace frame00000351 +6442422ed50b2afeee19306c402c1b11 frame00000352 +d56438b63e814f247e9f7627accd501c frame00000353 +8c739f4506ae1f7a4ca2055a35e46f53 frame00000354 +d4579d21262555fc9570bbadd353f679 frame00000355 +54f4c7afc8017dfcb5ef719c28f72266 frame00000356 +4152fe85bdfcf78efe54a8c0028816fd frame00000357 +4bc323b934cb5c33d10e74d855034c57 frame00000358 +ff167fd8abe8b55b9be50ec816f75908 frame00000359 +1fbaaa3ee149e6a540497a5626b5f0b6 frame00000360 +fef7d5b801209536790b31dc75f77edb frame00000361 +c1ebaa057213827aea3f98b4cac1a838 frame00000362 +5a6274e2fe6d3141b04b582b64a7b5a1 frame00000363 +31009604999e9b3ed7c56292b0ff968a frame00000364 +c1a457a9ff9a0a397edf8fc353e5f1fe frame00000365 +4c12e634ceb7a4a6333957217b885e29 frame00000366 +ca34ad6b4714557c4a9182c8720f8229 frame00000367 +4d625c1339cc8445b264c9fdc01a89bd frame00000368 +45e262354c3886cac89ee385fa863270 frame00000369 +5b941b896037dbbb3d7196c13f65fb67 frame00000370 +2e482202cf9715d2d1570560dbfb6fe0 frame00000371 +eb41289d01be450495391efb9d94754d frame00000372 +dbf2ebe0b6020ef7918fbabfa7efce29 frame00000373 +2506d9f2d8e7614b993aae72cb21e08b frame00000374 +c326d9c28cbfaf0c5362ab2a87eb5908 frame00000375 +55aad091d115c2f85b980692ef01fb38 frame00000376 +bd2d2c7529fd957037ea68baaf208d0e frame00000377 +ed63bdcfd7c8c726ee6f667f2e9c3f79 frame00000378 +544a12dd6dbecac7cf5175d75e719d39 frame00000379 +475b0372e57c2c7453afb366508cd7b8 frame00000380 +e864cc3ffe028f38e0aadb5237391913 frame00000381 +a12df67c645cd79601d5e96a4aa404f7 frame00000382 +34cd174f16a828b840a2c33bb00c7860 frame00000383 +d1cf743b78717846ccd5babdd9f3539a frame00000384 +a648cdae4736beba23f9f268a77a1241 frame00000385 +168b98f37cfe36ee1f755b0922e6f3b6 frame00000386 +813f9cd2b166b8a9017bff0b7a409f71 frame00000387 +cc7fae341c21ee2cfcdc4c77bf05d557 frame00000388 +0c991a6bb54bae1947c42e2fbbf27c8d frame00000389 +40f9902292a888266614218c8db74ef5 frame00000390 +07dec56efe7974b8dd0c1ce54dc101cf frame00000391 +8e7e06c7d59b27090508a996bf5766c2 frame00000392 +df84f8807398341be6e629dd265be7c8 frame00000393 +e89b83b2ea446d3e436c4a846e573a2d frame00000394 +acdd27753b38c4f2a9ba9dd35c20d3b5 frame00000395 +261d15621a63509d7be1591a04cd2a96 frame00000396 +d9fe375038c12b21d448b45e9e8a193d frame00000397 +594591edafd517a9c283c0ef23b2985b frame00000398 +4635e4518b1a28ebe1edadc29965d607 frame00000399 +ffa28533ef20933b0df68b7357d7fae9 frame00000400 +ec4f65d10ed422bc631ad4f7a3d90377 frame00000401 +ebda3c299ff3ee72c2899084e2c505bb frame00000402 +bc46ba8e64ddc04a109e31646c308ea2 frame00000403 +495f51c4ce19017495f17dd3ffd81f90 frame00000404 +7226c293e257916f23c5471195aa511c frame00000405 +56fb7739daf09d986b490f6ca817b941 frame00000406 +6612135d33983ab0552642007473428a frame00000407 +8ffef9bc5a4608c847835a8e7d71eec8 frame00000408 +f36a216247977e06ff77dd179a1b3c4d frame00000409 +d43294e02ceab88da5ba747f7f5d4064 frame00000410 +b20e32c56d3bd55f2d3ee5816d627a0d frame00000411 +96be88fd70d669b23895289910b30def frame00000412 +5166ad6222038e74be8ebbd9af8a3b86 frame00000413 +f7bb14c74756e1c844e331690582bf42 frame00000414 +e118bdde51fe9f82fbddcefc14592805 frame00000415 +60ea5988d33cd242fa52b63a2fc12a90 frame00000416 +08c5785f76f1dc2f77dfbc942e34f53d frame00000417 +1502d286029786e1d139053b26391113 frame00000418 +a51b26e6268926f46888ec78cd7894bd frame00000419 +f0be0ab418fdb6754890232fdde6961a frame00000420 +1876e529b6aa6d6afaf38d95f25e3107 frame00000421 +e4ea2834b587c288b1b31251d81f41db frame00000422 +c5b7ae9356a0df1a95af13409803cb87 frame00000423 +419a7c9cb714df4a6a64806db90bda1e frame00000424 +149f738f530b4e4ddd4172004a5d0b32 frame00000425 +f8e8f7bec6589980d9a0f2fce207222b frame00000426 +6c3d5de46a7b88628d1137a9cc16a049 frame00000427 +f94a4cd3bc54ffeea97a9539825f0771 frame00000428 +18f6c4963d17ec73fed6663661ec8eca frame00000429 +7e098d0e6180eb025617263b71251d83 frame00000430 +6fcfc4fe78bb0190941268cc74286224 frame00000431 +44394234a53fd379a8e85602e6a7984e frame00000432 +0e39c43986b59777248976d318452f84 frame00000433 +78abea80d8b4bf4f219f385b7e180153 frame00000434 +8bcb4c177ebcddb2529bd6f687fd4b47 frame00000435 +4f3c0cc87de5ff25682469ed885d12de frame00000436 +cfad1eb09577ccda68fc365f71c3515c frame00000437 +0781ca6c83721d2d55c3eaddab1fc7e1 frame00000438 +d2017cc7db6e17f19608ede339d71658 frame00000439 +b7ad1fa2255b8921feb2b7f715fcaf3d frame00000440 +ece810e972cc864f3f44ba09ac96f4bf frame00000441 +254c3e601f4bae1cfae4e4689e1a919b frame00000442 +852eaf96dd563b0cee3009980abf6ccd frame00000443 +693499c96ee98bd031b602afd8462385 frame00000444 +fbf90bf94c4fc105c2d288dbe498bd11 frame00000445 +7ec69ef3834591834b7cf6abe3bc754e frame00000446 +e5aceeef44b14663fe566c8e39408987 frame00000447 +e1d09c9f881a84a5840ab5c006ecd640 frame00000448 +9d0ec83ae29c14e5f31033c0264e1476 frame00000449 +38ec0b3d5bed5cbddcbf0298cbadc791 frame00000450 +9ffda66c37e5f35b12944d633dea7323 frame00000451 +cf601a331e738dcfd9fc758bdb9d939d frame00000452 +d18eb20b31ca674a5c821b5ca102a87b frame00000453 +d18eb20b31ca674a5c821b5ca102a87b frame00000454 +d18eb20b31ca674a5c821b5ca102a87b frame00000455 +d18eb20b31ca674a5c821b5ca102a87b frame00000456 +d18eb20b31ca674a5c821b5ca102a87b frame00000457 +d18eb20b31ca674a5c821b5ca102a87b frame00000458 +d18eb20b31ca674a5c821b5ca102a87b frame00000459 +d18eb20b31ca674a5c821b5ca102a87b frame00000460 +d18eb20b31ca674a5c821b5ca102a87b frame00000461 +d18eb20b31ca674a5c821b5ca102a87b frame00000462 +d18eb20b31ca674a5c821b5ca102a87b frame00000463 +d18eb20b31ca674a5c821b5ca102a87b frame00000464 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/svq3/Vertical400kbit.sorenson3.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/svq3/Vertical400kbit.sorenson3.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/svq3/Vertical400kbit.sorenson3.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/svq3/Vertical400kbit.sorenson3.mov.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,1307 @@ +b47ba8839f8f490730815ac2d7b6f8eb frame00000000 +2605ad97f622c2fb8224f08cd76a4711 frame00000001 +ae9dd218207fe4614817083e4028bf18 frame00000002 +47996eab450f1fcaac7ea8a2c832b265 frame00000003 +258873efa2b1263fb611f2efe4b4a29d frame00000004 +d31186a6d75d9741ff3dbc127b1a8acd frame00000005 +d31186a6d75d9741ff3dbc127b1a8acd frame00000006 +544bc7b86e884d76cfe573a9763fcd98 frame00000007 +1de4c58ba7b4c77e86c9f2bffe37b033 frame00000008 +fc4a89216d7d60841d08ca3f26b79c1a frame00000009 +dc52629b1a86fc9e51ac93a2cdd6a86b frame00000010 +d87ade5083fb4fa7f811de537d874675 frame00000011 +75c2acb9c4ac6109479e24b8504170b9 frame00000012 +1b1ef05fb41ff625db63d3d4c8b6628e frame00000013 +91abc33bdd7a2b7e78beede7f45f50d8 frame00000014 +f090930a63f2aded506403fc9cdb06b5 frame00000015 +fea3015d09d71aec9153c524ba71ca22 frame00000016 +02edcab540eed251f914abec6a8a7bbb frame00000017 +46030168c866ade240f108b50c44f1de frame00000018 +ece43849174cd06cafc939c4cd75bac5 frame00000019 +7de37e4543fa0567a98a89daefda3996 frame00000020 +238f05651d11bf589e71c1dddf6877b9 frame00000021 +7a8b9ff577aaee622e881dd08228f869 frame00000022 +0535da3216132e0017d6b84ec49eb956 frame00000023 +6f6ffadd9da51f49563442a18cb18653 frame00000024 +ef38fd1e93b0eec5da3417f68f77cba8 frame00000025 +53c28b2c665e41eb5acd94b679e0abc7 frame00000026 +24f0c922b720e1efa0e3828a8cea2f50 frame00000027 +121a46a19663d9949a462c1e02a93bcf frame00000028 +0fe2a3ba1d51e51abba94d360e45ce59 frame00000029 +b886209c953f0506ec8be5396a7b9ded frame00000030 +a190e79c18db6e581e12c3b751194fc7 frame00000031 +efca41c3d7f09e2e00c8269c1d51f289 frame00000032 +d21594687b59554f45b2445451304d37 frame00000033 +c32fcafd8fbd2e61c685887f296fdec7 frame00000034 +38ca80a177696b21b41c380521b85d55 frame00000035 +9e0bc05e83be83c8fac2eb3adc7337c9 frame00000036 +4f56bd40ea566fbf21c1f7ab8d7895f6 frame00000037 +8ffda98999310f094b5139d47e441c66 frame00000038 +8177ecc69e95c367040d5f82b3b12e29 frame00000039 +a7fe70a7915c969e0c78738279080b91 frame00000040 +7fabe79916c1b89ab78ac3155fa8bef2 frame00000041 +44083f1bf3bdca82a345465880e4aa1c frame00000042 +218f88c5047a046c6e23fbe2cd8ad5ae frame00000043 +9b82749fb4ee30bc8d55cb6ce7691f60 frame00000044 +ed0b05a1048cd296268c4944697ad1ca frame00000045 +d89f33a35b543e01d25c0945a47be8c9 frame00000046 +7636c70febb728d22293960c08e0cc0f frame00000047 +936de3e5871cb5c11cc3ed386f0d2db8 frame00000048 +8ec51e7aff9f47009888db638e8b1a03 frame00000049 +ae2034ba9497f37641137e9f8903bcd7 frame00000050 +5d58df9da15b00462989bea8c3e6d403 frame00000051 +00887957a3ca88529f768739d1f8512b frame00000052 +da6ad0d8f3709498c65a85c2cbb9275e frame00000053 +6d4a988e21fe797157a3c1f04f9d61e2 frame00000054 +4c6463f30d13889c367fcb61eb33d962 frame00000055 +51f4f36b14cf3bf13ce23b2597e64c0a frame00000056 +a2ea17d3d1c8f1de6ae360591640ea37 frame00000057 +e97f839a9648e45254f72491fcdec185 frame00000058 +12c2cd3c97bd36f8d0dcf3fd639e9c7b frame00000059 +a471d46a379c740693ee0b4ec7d31e47 frame00000060 +1968d0b1f74ecdb047f15dbe1da5489c frame00000061 +6392fc5cc13c4ce117ed714053a0901f frame00000062 +1a301a731f4e5e8751bd0f1c22d84737 frame00000063 +f7f482bbf2dcd47fdff33def177aaced frame00000064 +53a5372578a268f3bafbcfe05d475a22 frame00000065 +38185cd1bebc20a3f0c5c1d3ddb41217 frame00000066 +142f9134da4cd0f901726e6f7e0001c4 frame00000067 +18b83601f5455f1285a2a913a78ef451 frame00000068 +73e7f32841ab16ab3de5d525afcd5c6c frame00000069 +082ad83ec12d9b492be185773ce9e7b0 frame00000070 +dca69082b4f716aedd9fa2b5335b59a9 frame00000071 +3998c01de8ec14ca55df9a63bdcd6809 frame00000072 +5897fe7c11fc13478a7659c9e0830a75 frame00000073 +bcf7a9ebfe66ffe61ac749729ae5660d frame00000074 +c5f36b6b7504023e5bb8d129f3cde11e frame00000075 +25295fabb6cd4528868f4f4695810856 frame00000076 +d222a704784835fedc601ef5890d9116 frame00000077 +5539a0efef600a1cb10656269f19aaa0 frame00000078 +2f7b79ba72fe2b06e2fd0cfcccdd4536 frame00000079 +fd02840c9f5aa72ef506baea08c6448e frame00000080 +4bad41f34833412931de18d759864edd frame00000081 +e031c716dfdb0194235c4bc9206049d9 frame00000082 +a311d067bd304bc336aa5be234d1dffb frame00000083 +537242a2774458b2fb0dee9a9fca0e87 frame00000084 +57d8c8056f524cfee1f496ebf5b4acf7 frame00000085 +7413b20e2303dbafb4365b35c8faa4b3 frame00000086 +cbfe16370c49570539c33c82cadf7b1f frame00000087 +d05a1aa6526a269c509b049c37defcc9 frame00000088 +40b9ce2a52ae33748276f63ea8bb798b frame00000089 +66fc45c4db5019d58fb52c42e033c2fd frame00000090 +94acd4390f242dc72292cdcee1d056a8 frame00000091 +1f64a12fd46771fb1c2e3aeb8b33fa35 frame00000092 +006819d3e3e9cb7a799ad1c42d0949e2 frame00000093 +e7c3cb499de48f0bdf33b0274cc2134f frame00000094 +d373433a9409f29ad596d345bb79211d frame00000095 +5ddce1b2b020c277ae2d0bbaa16db882 frame00000096 +e54475c589f1f757fcdc1ab3c1c9bb43 frame00000097 +a20e7769f70465be5b51d8b496a45db6 frame00000098 +fcd7f86a2de9110e21e6c04e928e0a80 frame00000099 +8185bffb0403ec8e93bfac228a331d7a frame00000100 +cba56d720970180e8623eeedd74d68aa frame00000101 +c6d092f35f4215a90725bcea932041b4 frame00000102 +3257f45b1a6f0327aa88de575a48d118 frame00000103 +c82103c291cc6bb383e190b1551ec29c frame00000104 +54feef7603cac2a03508905297a4a5a9 frame00000105 +d918b3a695ccd5ff37391f892386b5fc frame00000106 +27140603e7297365f365566a83344134 frame00000107 +c04e240dff18e921726c4975eef9299f frame00000108 +d4d7cf7f0525fde2c77b45d58d27dc48 frame00000109 +e1623194f2ab05f42cda526a83417a9a frame00000110 +0b5e1cdb0dfcc2738a4395699ff55da3 frame00000111 +2051f77462fce0d0e8857d24456a570e frame00000112 +fffeceb51a5f35cde265e0b8d4d488a4 frame00000113 +0159b4cceace3cdcd36fe7760ab94e77 frame00000114 +e18bc2660e28016627641f02adcab600 frame00000115 +1dd37749b58655647db77462523b1a46 frame00000116 +0fc90f5ff46ec99d1ffef75fc0a3588a frame00000117 +09ff7ca756272375b86dabd607a01b19 frame00000118 +49bd85a43ef2202890e6afbec0cf993f frame00000119 +cca5c47f7a5929b6896068cc2555e930 frame00000120 +97a0bd3d0349b3ae1a0c75e5309c1a78 frame00000121 +764c6f644ef118e1df61849850209920 frame00000122 +ec6dfb9260a6533957ef145301c5819f frame00000123 +2e9b8538f46003a12fae11c150ef370f frame00000124 +39a2649e17534f523ff0c60eb7de6fb3 frame00000125 +99c40ac0819d50bf181b7e0a7d94e42f frame00000126 +2e2d87f791107e2c803221ed5bc9fc9b frame00000127 +0266ce1281dbf709a333ac21a52e1249 frame00000128 +167be60c66106f9a45190bce5042244a frame00000129 +e44315381ffa24a3212398fc1d89459e frame00000130 +992cf0c355bcc00bb3adc60900affc76 frame00000131 +7876e57ab5309329fa871808d2a624bd frame00000132 +629eb1de9045a894bc2938e00077e40b frame00000133 +5e9d6cb70f8a171c7c00d2c56915d4e8 frame00000134 +2cba4fe3ad5635cb994f96cfda954f51 frame00000135 +ec17adcbdab51cce63d6947e4e604fcc frame00000136 +e7a7618a2bb7ba2effda01abd26f95ed frame00000137 +d2206ea5fb5e2abae72192511846ee44 frame00000138 +d69a22bef1088de8bd82fe56a3029f96 frame00000139 +577cb9321ff09a06d68dd0323b613cf2 frame00000140 +438226d5c53747a199ce3b733bdb6305 frame00000141 +a605eff91ae961a48f84c143c8026102 frame00000142 +a3438c3c0bd4e50754d8601014b20e83 frame00000143 +60b650efff392f0e2e2ec148e7cdfa89 frame00000144 +de0760ad552717bd7776f65bd14f72df frame00000145 +0bc4c71cb0b4c93cfd028b90401f3837 frame00000146 +b6cc437a00ee7585b390f942a61f294a frame00000147 +9f6e2cb43a176efd3d9c2829dd77b2ae frame00000148 +f70afdb3a60935d5a78a7fccf177b1b4 frame00000149 +01ae3f763eb6cc8c717db21e3ec5bd41 frame00000150 +8250305c6bba44f54df9fac8aecbd8f8 frame00000151 +bd54a1c3e5289a7a64512bf68d223ae9 frame00000152 +23e89264ff0ce78bf0ac3fa7be0c0cb7 frame00000153 +d36b26738cf3800b0e928330dc8604e7 frame00000154 +84c239ad08012c22510a9a069c743ebd frame00000155 +54a0f5a69145f54810c2994cd921a0da frame00000156 +4b04258a0b372190b0e0ba99f5a0e520 frame00000157 +c50f135003190fc27a544ce14fb92b66 frame00000158 +a4dc5424e56117be41c6337b07e1bc5d frame00000159 +2f83370fdd381be6323deda2f6179e67 frame00000160 +9f1591518cdc5a46e239da12e80169fa frame00000161 +7af2ec001eda94ab24c2cd9e846e4b25 frame00000162 +ab63d4e33e6436dca0b7fdc711d5418b frame00000163 +1c50922de5a96dd15545a56fb757d426 frame00000164 +19c87af73b193d1afc5227594a665054 frame00000165 +59cf028e414021049ab398d8054e9b37 frame00000166 +b8a7803ab9d869d34dedf5a66d756e95 frame00000167 +21eabe4c2762f92fefdb07e7d4751a5c frame00000168 +0497ea9eeb6feea55a3ed6c86b253206 frame00000169 +5205deaf195db7023e125c7796fa7348 frame00000170 +90dce178361bc16ae1bdc7d08632bdad frame00000171 +792f67389c990efbce1675050072a3fb frame00000172 +73b2e1f1754ce13c8d649a8e0b6d4c06 frame00000173 +914f616cd5dda765b95ccf816351a42c frame00000174 +b98f42c3c8ebf5884cf36cce457aa5e8 frame00000175 +3908dffeadafb1610910927465447fa5 frame00000176 +fade94d2882c0d75887dd099544aa3e0 frame00000177 +70beadaa438527f4995e76b546932b2b frame00000178 +d41958be73eaed6b2f283818480b40d8 frame00000179 +ae6d29f60f59fc9fa8c122e9e0652d6b frame00000180 +7e25e374e2fc15e6a67667dcacc52633 frame00000181 +ae8faae083002492eb57c5b44ad69df1 frame00000182 +8e96332bc9c753e9f70ba851fc8c0314 frame00000183 +0df3131d590be6f6b35acd92edfcfeaf frame00000184 +9c86602865ed128af0777a3b37f9873e frame00000185 +4986254a6c43fc58e15c56e369b818bd frame00000186 +0857835e5dbe4c1ee4761b1bad496e95 frame00000187 +89a1c3a8e41e548868c58c35da6d0485 frame00000188 +0ae8dcc3ab2b80ed85ca536e564520b4 frame00000189 +ddc948198cff7065b01e56961ac50add frame00000190 +d3700c4e9914965e5be410a42ea5239d frame00000191 +2353fffec09703c5299883869f007afc frame00000192 +59d9b22a96516f5e2c2ff85ef729d36a frame00000193 +79a6dc7bdabe559e475871b62ffa1424 frame00000194 +00c6bf66bac43751f988a28897cd4b8e frame00000195 +f624ecbe78e7027c86c0c57c615e6e5f frame00000196 +3482c977add7b5c3fa288ef3cb2472ab frame00000197 +d1c1d40be558fe9b70d2335648e9f564 frame00000198 +2c5c37200815ee0b335237c4656f827e frame00000199 +cfe8e4a1db8c80c3dc3b5667d472b202 frame00000200 +0d568097a4f3eb3aa9dacc982f284cc2 frame00000201 +a96e5e6aa93312b2d695d59c3f5c33d7 frame00000202 +7aa488121d86abe6f79f5209c944134c frame00000203 +fd15f1681923e92fd2fb6418f8380a94 frame00000204 +a727d61fc7aeae902bae6ed8f2fd82c3 frame00000205 +3efbcc62d2aa1968841a1f68f3b39686 frame00000206 +fd02840c9f5aa72ef506baea08c6448e frame00000207 +6fe6b674ccfd2d6da4b80cfbc4b23ced frame00000208 +a5624e43729cb123064a78830e086e1e frame00000209 +3a61933ed1028536433a8f97d367da47 frame00000210 +da332c41ced9f8150c951c40fd079b08 frame00000211 +1b5030045a2652f738ab108b56858d22 frame00000212 +1bb82e5e0dcc39986f39d4061c5053e6 frame00000213 +133d5db47643ddc633591c4c9a940c96 frame00000214 +cd6de0c575e0f5c4c8bbe93618784d7e frame00000215 +ac729828992df85ff0e5fb70691e78f7 frame00000216 +a702a0135f0188832a2db2a6be2d1ac0 frame00000217 +e96170c18c1bb4f51c492f4c833ac167 frame00000218 +da947fa92d7c54916918e511883fc051 frame00000219 +ca39de9e77a5a7d3a53ccdef8559f988 frame00000220 +a369275b025065b1659ec2686c76485d frame00000221 +e0d4936b7197f7c10a9f436614e20294 frame00000222 +2d78c613bccd505c9842040bd315e1ba frame00000223 +7368d8a1041d8e0c201d1abb8351243b frame00000224 +aa8b39109023235991fb59b58d3ff003 frame00000225 +6ab3e66fa0ef7059e76de8a26fbee29a frame00000226 +17fdcb30f06f37a4cd23044651352ff4 frame00000227 +30df57df5af1e5bf9ef1f92027c990c4 frame00000228 +c75832412b1b8cea8e5294a76e87ea10 frame00000229 +1a07347755cb17630fae3b6cb2cb13c4 frame00000230 +4fa9d98ee164c18b3c1dab9ccc7275de frame00000231 +d2d08d4869b2934727ae3c0bb5a226c3 frame00000232 +cc16da71b7768cabb521116adab6382c frame00000233 +4543ce2d15788b71e71d4ac55cbf6820 frame00000234 +4cd2f75613cc3712c0a67f4c35de3d2b frame00000235 +c5724ed630eb8f0e93d23ff21e65119c frame00000236 +4306e006a9cdfd73eceb89790fb6d540 frame00000237 +e1621b8d920df6f1170367f7a5defc39 frame00000238 +6d93e09e693b0678aee6f794daa60e44 frame00000239 +b54b1d3d7ab34ba4a2890ea9952b5f02 frame00000240 +db58b7b6af7c01594cf0d3a491412cda frame00000241 +d0ba2fa69d73e6ff6ca96aaba530c85e frame00000242 +ff729f33a5d26062e184c874cf783d4a frame00000243 +3507f58f8cccc471dde0588de335f3dc frame00000244 +e1e3461ce15ff1b26a8247403527471b frame00000245 +fbcc2fc059a40f3b2481b811f86fe35b frame00000246 +2bb4e856ec11d1dd7277f1c67857aabd frame00000247 +d97a47bc08d0b11481af46ade6ccf0d1 frame00000248 +8bd4c099e018fcbf2d87f7343b8e6629 frame00000249 +e1b26d6a4631b93fae80817326fec08a frame00000250 +fbdcfe3a8cfadda6541861535040efd6 frame00000251 +e22154780fe6c9d0a1ee5baba2c1422d frame00000252 +528d95add47fd6831392e46463e19b10 frame00000253 +0dc29a8f3c895fe30e63a4f8d68cf470 frame00000254 +6220114a0343a0ec529475b4cc59160d frame00000255 +6a1fb7a862d7dfb01b089cfbc0b5aad1 frame00000256 +44ed25a131d82d9e1891b07eea0be51b frame00000257 +754565efacdb123e730d48d298125c84 frame00000258 +def18e0f3b6c9cf116da25c4f53da2dd frame00000259 +0c675c85e1af41300c43f414dbfeacce frame00000260 +a32d20b5df783bff3ad978dc959055f4 frame00000261 +6b1a5354332346172105ffb89263adba frame00000262 +d465779081a69a462e0bad40fb84363f frame00000263 +64d9983ce8d2a3dd599e5db93e84447f frame00000264 +ffb716a6ef5f085cc5f49c1c0159fcbd frame00000265 +d08a14a36e6310f9e09edc9c66882a9c frame00000266 +49e2750fc423575f302edc7f8e8dbb61 frame00000267 +91f0e479303df48210894214c5c64395 frame00000268 +8899b9ae03361493e48439f015577db9 frame00000269 +51ab0e3421bf0355fc43a9ad2c80a2d1 frame00000270 +abd4573f65ae6e0580633933665ce8f5 frame00000271 +fb823a2019f6d0d9c14b5463051c50b8 frame00000272 +ffe2f393b194807b38ef9966c8cc91b6 frame00000273 +0ba92745add87b37c4ffbf212125d55e frame00000274 +d64a88c7073493e569d0e098fca78774 frame00000275 +2c47cb4ec867485974ff889bf8bd6480 frame00000276 +92fcca4034cde8f08246d1e296871494 frame00000277 +92c93788bfef4b07dda874121e9d1664 frame00000278 +693b546febe38a57d317c4af324d85b9 frame00000279 +35f6341f4e915afb0c34a569b2d99b40 frame00000280 +905c28bb23c1b532fc67cb640c2746bf frame00000281 +a0a652912e0782b5302258cda0748916 frame00000282 +5548ec23638c9d07d77d4d110480925e frame00000283 +4670e718ed95d4adfa6f116f05fe1f6d frame00000284 +3844197d0a770a4370ebd947e6b20358 frame00000285 +2888783346f0fbb470592f4cefa1b257 frame00000286 +7b073d63297d0871dde7f5c9a841644a frame00000287 +0957cbb0bf43511eee177380927665bf frame00000288 +0957cbb0bf43511eee177380927665bf frame00000289 +88532fcf7c5e9568e214dbcbc732ce60 frame00000290 +de6c357a57cbafca0f7f87633ddad184 frame00000291 +a2f90b9f7fb598c91ba4f0f0aef896c0 frame00000292 +1097da535bc549e1b53bc91c8649efa0 frame00000293 +80326ef413be673caa08744216f71a0b frame00000294 +c9dbadef6dd2db6589e2c631a87eebc7 frame00000295 +bec1946cfd3e1baae5f80cc5b7a9eb97 frame00000296 +39c2f06b0c6211d87478201fc3ca69d0 frame00000297 +3448513e680bc8ee0d480b8d13e15196 frame00000298 +f27ab1249d3f2325178185d5bfd62287 frame00000299 +8cdf59af3ffd8b89afff98f7541360f6 frame00000300 +b42bdc7f1e98f343ff3adf5f8b63045c frame00000301 +65b2223a6798ab3da3883b24a00e09e0 frame00000302 +c95d67ca7f1d6416efa31adc1682ef2f frame00000303 +db9a681069ac6aa1b6f32c0a898f47d8 frame00000304 +1c3941b0c401c7f161eaf01e77273bb4 frame00000305 +7ebe2fd34e272b0cf33924ede50b3079 frame00000306 +b638fe49720c1196bd2aa00ac5c91938 frame00000307 +a14eaf7eb714af4a4784bf9536b18437 frame00000308 +bab97cb59a00835eaaa5fcd22909513d frame00000309 +0ce35d05f4dd60156c3c01383f724f28 frame00000310 +ff31fe95442de070c6860c6c7480cc2b frame00000311 +2a3a9fae2fd2d03450b6c782cede3949 frame00000312 +cb3b306c09bcec89786b8243fb1a877f frame00000313 +95719cc051fc3cc5a07fafc184d14472 frame00000314 +c960e3bf89786dbb66cdfde94008b4fc frame00000315 +0cc5cc21d097498b3f4f12e274a40d57 frame00000316 +f1ef889bc91cccc34f7e9872c4ec0e3c frame00000317 +538fd4b1953105d42cf498ec75599845 frame00000318 +8137cba202d96e50d7d1ee919df876ee frame00000319 +a58a76e3a0b0d8d23693e213f1f53ba8 frame00000320 +dcbd16a64827e84042391e3685392066 frame00000321 +da0d9224b783b352a45b732e705ddf5a frame00000322 +3c5c4e70f9c5b9c6bf8b4aedfd94f633 frame00000323 +ea91cbc3aa07f459d2460cc5b14b9643 frame00000324 +23bf9d5db554095467821ed00e11ea4f frame00000325 +c7e8a4cb0f58b3d6fe63c8a899f0eacd frame00000326 +ac1cef6cfc8e5a26cf3bbe227bc53de1 frame00000327 +9733be410b81999229410949c44acb99 frame00000328 +a4a1e1010c98afc9d2c086e6497bc015 frame00000329 +a14765715c8e61e6fd5088c1ace6e7c3 frame00000330 +c1b8799318e5f8372c8c795e85648907 frame00000331 +d944f1a4e611a9228b56f0034691fc1f frame00000332 +b33defeeb7b9456ae26a1b8192ed00d1 frame00000333 +5d7c4d068fbc2ec48dae22107025a692 frame00000334 +3797c89ed928272c3281838f833df644 frame00000335 +a1b3b6972a6fd3c689631b15bc6f64f9 frame00000336 +bf8366921adfacd8bcd8bc4c089d0acb frame00000337 +bcebcddcbb9ab2ce437214b177c8e873 frame00000338 +fef0f80fe48b7e84f579d299f53aab26 frame00000339 +e45d27ed39af90a38c8b8f7e01b0ed9f frame00000340 +43e973e7a5fd6a3e4ed2de13def33d7f frame00000341 +84d4c4fbaf43ea21743dc5ab8a3dac35 frame00000342 +3fb947e3698791b08f8c05ed80f25a86 frame00000343 +557797bd2fe22fbe215fd720c1e02cef frame00000344 +36b31e4a51a4701891329a73587f89ec frame00000345 +effbbc6286592f6df3bc80b740a3138e frame00000346 +9c657ac92374c9375b50b6c9ed3239e3 frame00000347 +0eae4a87b89b501216d1ef0d08db1189 frame00000348 +6d82e7bee1d369deaafc3420444ddd9b frame00000349 +0bc25f012dfbdb35e023401b5588d4ce frame00000350 +e75ef1abef0f5423eda6129216d2f125 frame00000351 +e7f86e691d6be568c25d58e98a5cd2fe frame00000352 +20a4358b14fa512c4c450a32d33fb42e frame00000353 +8f1683ef131d2aad455690493291daea frame00000354 +86fd3a36ccec839b27b6f41ac507f112 frame00000355 +1858ec6506c13cfcf038d955f45d6de9 frame00000356 +957eed2b02d4db2380cd02b39660f8dc frame00000357 +9cf7cfe8ce600b6a7a000e1fdd899947 frame00000358 +ae28d8d651159f891eea37ebe87a351f frame00000359 +8d3fbc2918766dd163c7a4e0760b1a4c frame00000360 +500fcbc36829d2aecef47a65a5213411 frame00000361 +8c5a3351116f8bd01790bc22a931a780 frame00000362 +6e3887109d552204ee765884c5221ed3 frame00000363 +2a9c55627a0326c2f0b2a73a47c7942f frame00000364 +d5a4341db6bd8f383c50cb80789a8eb4 frame00000365 +94c85c000c64c7e3f3be9b7170a29163 frame00000366 +4abb7c36a710dad0a554b9093f216844 frame00000367 +fde1af99a5170d085429099f63fa2326 frame00000368 +09e00c8d1f07919645d28d4d2a1099ae frame00000369 +249ec50ae5cb292283d6d2034022640a frame00000370 +a4269828f12d2117c07b75c94aea37e4 frame00000371 +8867e665aebd7baabb6613fdc06bc533 frame00000372 +6a71a7bedc1b71ff2a1f6603f69cf14c frame00000373 +1b138200d00da79f85ebe03b28e86b61 frame00000374 +8869de0b3a08601c269aec469f1bd277 frame00000375 +b8d8337a8e414c8f8de2c240d8f9239e frame00000376 +94ee332787015336cbf28eece9ea2bf5 frame00000377 +36c803914ca5dfb75ebcacdba2979b81 frame00000378 +85764de500a5b3cb1a71a5483acda099 frame00000379 +6bff3026e40c467932fe2b6cb591cdd1 frame00000380 +357d91172f0d63cabfec34dd23f452b9 frame00000381 +040b7d98789989f88d646a951eabdfb7 frame00000382 +78a95c5220760e3dd9b015908fb38d18 frame00000383 +5d40d64f4ca4ab6079c995d45a436a1b frame00000384 +9e8c78da54b8e2fdee969c53560d272e frame00000385 +4b5c9dad43ba83f376afd72d974c33ce frame00000386 +3796eb5a7f0ea9c4eebd5695941eac02 frame00000387 +47db683ced446b17e5f7510b92636b13 frame00000388 +91e3081f78a7f943e3bafb156df8006d frame00000389 +b1c2f8636b1259429dfdc22e3de7a125 frame00000390 +d6c42b858ea235e1a84cd4dc5eb352e4 frame00000391 +291a9305ebb838b4959121a700e848b4 frame00000392 +7a12ab5c5f4bef01814ba2ebc662ff56 frame00000393 +e6f3b45f265ed1576bde40cdd1e66272 frame00000394 +0befa523969e4289d39dfb866822c95f frame00000395 +3b0977dda20c25e6c60a41ac1cc8e631 frame00000396 +6bbfb637d3b1778cb6471a40a88b826e frame00000397 +690316f23de12dc70c20ef3c30f77af4 frame00000398 +d8b5a9a4648fd8d25ffc07097556422c frame00000399 +223326be6c3bfda7dc2c016a7db50771 frame00000400 +0c0fdae850f0a09efe1d2501ddd86f05 frame00000401 +949f4a2a88ff035af305861b2a36c78d frame00000402 +e4ce4bf517957a498eafba93b6b03d2c frame00000403 +5325f03ef96d77331ef5dc802fc7ce94 frame00000404 +2ea73d63a164d054911c0a5568503f35 frame00000405 +8aaabdb0564e8ee3e7193875287e2579 frame00000406 +70a48147fee7bf8eec332545037390a2 frame00000407 +4046f825bac22f8f485f6c3ca4bc5ccf frame00000408 +c8ccefcc29307321f38704e313a20e61 frame00000409 +8a5bb75808a6a28dec05dae75418e4f6 frame00000410 +eacde7389fa851b2f379bf3953f30831 frame00000411 +29812f04e7144534fe4674ec74b3458f frame00000412 +fec447176331c165aa7823268aaa3107 frame00000413 +4b7ffc5b3f82d46944145bf15ed1d82e frame00000414 +957345de530f840925a497a303071e86 frame00000415 +9f36638d69ca9be33daeea1b9a57d9d1 frame00000416 +ac8da4b25b71d680d9c2a0d0e97d9810 frame00000417 +38a215156b7caffe3fb5aca3c941877e frame00000418 +33ada0f931a16e9105ca2b0443c9d3cf frame00000419 +8281888807c63d470f1d542a492e007b frame00000420 +ea8a9ca385b3d25b773ab4d4c926523c frame00000421 +8501c0d439a5beffd0232fd86f6e9aa5 frame00000422 +aa23fa4732e7b8c947050067300c42dc frame00000423 +450ac80088a6638d3118f414202a50e1 frame00000424 +973132b34f73a4d2cb2fddaf18b6ee99 frame00000425 +8b8fd1eea89a78c8d98b3b880ec68e22 frame00000426 +76ce6477914463b1a455bd51057c07d3 frame00000427 +57234b89ea2cbb0a0eadf90d7a93642e frame00000428 +858b81ba80de138d93e569bc8add08bb frame00000429 +13372b9e5978062ac0a9c931e3a91fb5 frame00000430 +b17e5f9fca304637a1f9c7cd604cf841 frame00000431 +61a3d476e88bdfbf76aa85a891ba0654 frame00000432 +e41e1f7563f235b82777aad923e4cd5d frame00000433 +32b1e30774c1f72059638b26237c2ebc frame00000434 +221e1b6acd9b2a3a3988422a0e6b7cb6 frame00000435 +2f89b1ccb9a4a36dac759b2b50df4569 frame00000436 +95663b8470b161d1f0b66599d89c7b35 frame00000437 +617457681b59744d2b326374ab18f88c frame00000438 +c58d4af695e26ebc8f71c28cff6d559a frame00000439 +7c3ce881382a36327ba47ecae016943a frame00000440 +063a010fc75792215c42b4ceeed1ceba frame00000441 +fa01bd6619e7093dc23d9e8f59a39add frame00000442 +3f0bff2275951e53d0bf082acfc17140 frame00000443 +2ad1905bf7d182b0630116b4510a6887 frame00000444 +3f178078d8fe67c1c332c646738c75e8 frame00000445 +e6cd438ceec786447bfa373410ccd06e frame00000446 +47d22b782768b1f20500302a3badfc6c frame00000447 +20dbf817a7bb8ad6f62b97d4873e74da frame00000448 +b9b5839c6afc79469af8b2864125c2ed frame00000449 +27a3c4d0ee313ed56e1ef8f79c76184b frame00000450 +796ee2acfcb743fea860c3981388115d frame00000451 +4e091045a610eb6e65c9c82e6df3cfeb frame00000452 +524c77ace54c91a9fb07ecb77700d8a5 frame00000453 +57745b36300c2a905e30167340b728bf frame00000454 +a71d25455ada692d16e6b0e22521b12d frame00000455 +9e5d7ea8b11a7fbb14049583388e7edf frame00000456 +5ea620fcbba451fe740f3b9716646f9b frame00000457 +3cfb93a9b5fad9c72374f3f9098cfa2a frame00000458 +8d1ccab9fa8aa07d8f53f5cf54b29cd4 frame00000459 +43c1cfacb67045609f06c16a395fd06b frame00000460 +969303b894e99af53ddd8e62ac802c69 frame00000461 +447bb21362b4f97fff655714ea1c9b4d frame00000462 +a8d1386ff46b02ce79bd4abc5e2c397a frame00000463 +cc68460a76083dddaf323471cc9ce1e6 frame00000464 +9f203b81e150ef7b354dc836cf314e8f frame00000465 +13cd0bdea6c49cb6d1639990c163e295 frame00000466 +7a2313c636d98a78c60398f11cd8df34 frame00000467 +93a274ada501071ddd0513880fb2ed02 frame00000468 +75ed8b2c702876236fa5073f7d4465fd frame00000469 +135a5271d626cefb6909411b00160ae7 frame00000470 +c08de4ce0c9b88f2333c80041210f798 frame00000471 +595ca1c6810341a9717f16292f6923e9 frame00000472 +d5715ec789ecfd68f9a38b2a476f6fae frame00000473 +27a900f377dd243229d169cc8ec76bde frame00000474 +600f899c0060b460b20f6b99eeb6a56a frame00000475 +eb3716c401c7aed301271150f3f74ebe frame00000476 +9bb115ffe37c3224737b638c0541cde7 frame00000477 +af9dc792388aa2aef2f09ac192051436 frame00000478 +96da1d5d4419fd33d4741685580280e4 frame00000479 +b68a470ca1e399c1b0da4a17a3c11595 frame00000480 +c0b2bccddd1fb064dfa7e288d86aa622 frame00000481 +b98862595f435067d596086abe3689cb frame00000482 +2f497a35edd8193e8ae61aa5a58ffb7d frame00000483 +f6c05b44c3ef5e934f14e9521d67dd50 frame00000484 +42cdc4b05420a7b7771b2d617e9cd965 frame00000485 +9d720eaa6f656fe6a89a33465e2bdd7a frame00000486 +705f082a05c28e635619ca6d73cc3c9a frame00000487 +a13296d2588e6e8772074ec76c83803d frame00000488 +c38abfe17f595b31b2dbce1f9881c5c3 frame00000489 +67542df9cc5845bbfb11ad667f0936eb frame00000490 +15037c36b9f368439f10cce9620bf339 frame00000491 +2721efdb4e965384a8989cecfe9082d9 frame00000492 +1e062557d73defc5a892354eaabf798f frame00000493 +4d9fe971ceed2d6abd29ea0703bc708a frame00000494 +fb415bf9f1dec7e53738dcf60ab619a1 frame00000495 +812645f2626a54446c025dd06fd38e34 frame00000496 +ee42f5991f2e8561b468ab1979cd3b6e frame00000497 +9f70088bbd57f1d3f8012bc9b89a9fed frame00000498 +bf1ce3b8f16c3759abda098bba304f86 frame00000499 +bf1cab408e5b4d5de6a3d4c1e749a5cd frame00000500 +63b68bd6fb99b1ab51a5286f076bf114 frame00000501 +bcfc070532735e42452df84c0de40650 frame00000502 +988de7b2bffc9a84e5e89d687a868076 frame00000503 +c672292143e724f64754b20518e594ad frame00000504 +00c691ee00b17bce64efae0cca6994e9 frame00000505 +d29c02f7315e6c8f1e5aeff077d061a6 frame00000506 +9d74b1296c11a20f769d828d871d9683 frame00000507 +955dbfa198de284f4acb4b7b2b12817c frame00000508 +19c084299056e9a2bd1ab8043ace2e56 frame00000509 +3d3e55e8555368d10f92606cf1207f0d frame00000510 +82f4ad14716098bfe745a51e07f8cdf6 frame00000511 +441cfb60fd68ae28c2c636869448165f frame00000512 +afae29b8e61d6c465df0a66c2348f868 frame00000513 +d0a6aea154ac8c2afaffa62e9bdacb2f frame00000514 +0e73c207d9c06a89cc108a9c8f6b4b93 frame00000515 +521411016c598f0f2eb9700057e5b91d frame00000516 +0a5b4cbe11aef510ef80681449796f09 frame00000517 +1ff81fc965089260cd008f14680f1535 frame00000518 +8156ac43507a9c28f1fdec38d30133ef frame00000519 +afc16aa42c8dc27698ae8a23de7960b3 frame00000520 +3ce2f19406a969faf0dd77a5394d0c91 frame00000521 +e8716f6474dd69bce482048b877c8cf3 frame00000522 +4c51adc360568faafc544fc6a806a2af frame00000523 +e753a48eb09360f827b9d6ef3cf47d67 frame00000524 +e85d223766976a05df5cccc73d63feb8 frame00000525 +e4ffed6221d93f6d601783ad6699d71b frame00000526 +fceefcebf9ffa38fb5d64f391ef29221 frame00000527 +daa47ef9f7d58c4ae24a417f1bbf8136 frame00000528 +466a5226069dd3723b4a09b99f1056f5 frame00000529 +16029cb4c757d03bafb89812ed0f1fb9 frame00000530 +49b286422ad982db65b5190169211024 frame00000531 +6442dbd0e30c00bf700c0bf1b8f55096 frame00000532 +f5a33d3af0e3abe7e661f5c79c2d46da frame00000533 +759ea4bc063829bae0429359801b5784 frame00000534 +b963bb9159353cd8c5da34fa6f03e350 frame00000535 +482b5ded9821ea36e3ad2f1757672169 frame00000536 +5773654ca5a9cf11256783dea6c90166 frame00000537 +c86abf6ab098f9f559dfcb5c31de69c3 frame00000538 +66c4a46fa2154c569f0d8fa2489b549d frame00000539 +e2ca50b7a3a5eaf14fd9487d534e5c4f frame00000540 +7b632cc76fd460e2395a8f03f51f8491 frame00000541 +e173b94307cb7a08e4d408d7d542c8b0 frame00000542 +9006fb38169fc67e58331b1df5a99862 frame00000543 +00c588005fa67b32024b684010d6999d frame00000544 +c6acfbb5f27ab0c28cd2ba4aec2aa859 frame00000545 +5bbfdb8634390d65b9db969e1c1250d2 frame00000546 +4d8c5b3b6a6309e9172032bc4ee6f00a frame00000547 +55b037b737abaef0c02466f162ed7dc8 frame00000548 +e8512d53e513b394c5034ad3dd351013 frame00000549 +e4280ca1c62209608a9a4e7095eff777 frame00000550 +326a9538e725a9954f4ad16bcff3d5e3 frame00000551 +259df402e95b5f3e7213703df08e8749 frame00000552 +cc6984c4403a77c26174b7d58997dadc frame00000553 +7b7dff406946c984ae70f583e359d94f frame00000554 +0cc2cb3c6519b381eac4dc10c67c7ebc frame00000555 +35ec5fd422ab0d8608c4cf09974417b4 frame00000556 +99201b7fbe70ca974bb00845f6ff641c frame00000557 +609ab33285fca099307df10d5f0e1a22 frame00000558 +0621c690a88116c4df3cd414c57a3059 frame00000559 +d717a7df6db533d8a7e35276403a271e frame00000560 +db58cbfb7867952a9dc4b14c13fc5fa7 frame00000561 +8b78f723870dcea494bd31ccb576420d frame00000562 +dfbff0c7efc2d929b39a6f5f54502a33 frame00000563 +09a8c72dd8b28cb2aeb8f2bb7f19bee1 frame00000564 +cdc2a267b3c5cc93d5d9e5e612e3ac79 frame00000565 +896c435ddd653b3d93d6b5f91b5fcc2a frame00000566 +71701c7b37deb9ed499dfbc9fb192f19 frame00000567 +3ea859f6291f5655a81177ba2dd5a9f1 frame00000568 +9a2e509a6a2cee46d0f44b0dca9a20c6 frame00000569 +a5452a11ef8697d1f3052ff3343651c3 frame00000570 +c73b0c30080c117a122c1d057254383a frame00000571 +f1cd9cfcd85d4dc35c1f2f5960153b93 frame00000572 +cf41d1c0ccfe9799f1f9a242b41c4f56 frame00000573 +642ead7e7f635ce99b648ea88f54ab59 frame00000574 +e5016effae5b85f76be3ab0cbda1a7db frame00000575 +f1047af6e14ba2442bc34cd75c21c791 frame00000576 +68253e7dc14e46b16741ea9fad567f53 frame00000577 +696b179113c10b6fb2420d53ad7577c0 frame00000578 +bc3badcc68d84dada746517ca75a2d99 frame00000579 +6e1110b44970295c60dc311c9f0860dc frame00000580 +33ca71524669f85eb4182bcec6f342de frame00000581 +d64e640886ab74b7912314a6c44e7c54 frame00000582 +964dd767e4d258f8da0fbedda850fec7 frame00000583 +e5a911f8d03e9b809009de6141408fc7 frame00000584 +e6b1b7f8cca98960de4f696c67ddf9d8 frame00000585 +2da133555a1d18fc685d3d9187c59890 frame00000586 +91022128c3af40f10b68702061ee9076 frame00000587 +025c72a604bec589fdf97cecfa6a5bc2 frame00000588 +d6919e8322a2461d2faa9b19838d2627 frame00000589 +cf29c7aa5e54b5599604539075f1b584 frame00000590 +010bae06766c471288804c07741f1777 frame00000591 +24fb765a90535b52fee1c6b63adbcaa4 frame00000592 +02c25340f9b8b183064036edf80eff66 frame00000593 +64f31fd34eaef17489ea8f23c4efba78 frame00000594 +75399ee8bef9d2c4948507c6ae27d41a frame00000595 +7f0b4b72e8012155a17700dd65311f82 frame00000596 +04ca4a3d7369a67dfee71a89c4f509de frame00000597 +2adfd45ea4821c091eb93ebed1ba0e5b frame00000598 +9f16a6108c4f3fb27105224c1639d6f5 frame00000599 +2f727887ffb299f4f2e09728841588f6 frame00000600 +8c7029e350ba20f74ab0963deb59c615 frame00000601 +b2265e3ae20b617597dce9db8522c284 frame00000602 +e0fbd3197b46809ef337babc21913d3b frame00000603 +70b025b2ab5b7ecc3c24e6aced4ee679 frame00000604 +5cd4719deff10b0f18728b0ecebb5fa0 frame00000605 +997ea6c31b7e42de9b2175e280d7a9e1 frame00000606 +19fe5dc6038aa92f7d908ffdd83b46d7 frame00000607 +ce4b89d9216ebac62f2ba335803ebd16 frame00000608 +b943b8207fad8fa875ccefbfd4a732a7 frame00000609 +c5d824efbbbd0c666aa841907b2d6e2d frame00000610 +28e4afe468fa83f11a5515f8f70f128c frame00000611 +d708de9defeada7caed84b8f8d12f33b frame00000612 +dbf8e47cee10ddc3122de78ef2ca0a04 frame00000613 +8ac52983f8414872883f59bf08d99300 frame00000614 +8f067b38387d28249a28f785fa2ce2b4 frame00000615 +80f0b4c88ffdec66528b13992f778ab0 frame00000616 +391021e605c4979f9107291adec26a3a frame00000617 +d975859a25f24186a223fcf96f038c0b frame00000618 +6c0dc3fc2412b2ba7d74f7f1d924212c frame00000619 +2f20d08f784e7b9681b0910466733247 frame00000620 +bc422d5c012dfc0caf8a986def5cd199 frame00000621 +6b47a05c7c45de9d4086d6a287422a08 frame00000622 +322bd3d0d7f809d46b14c2c5c373c072 frame00000623 +fa1b259f830bc2095a59e4bd7060e812 frame00000624 +6e3dc94e18604c057d3560f7ae332876 frame00000625 +e3e00628c436205c6d04a0991e6ee67d frame00000626 +eb21d5a8fa6c7b3407b3ec09ae308f67 frame00000627 +4fb620c62ffe5df006b6e02d3fd886c3 frame00000628 +2d2214168fad0ff99e21b9e2b2a685f8 frame00000629 +7a2ca813e53802611f8760242a3fc94b frame00000630 +8097f036721fc194a02bfdb3a51d9865 frame00000631 +a111566bf40cdfe1cc2dbbd54d13a020 frame00000632 +41a96c75f26ad9520143a1b049b1a1ad frame00000633 +3ee374eebd2e28dd57567e94b29de4bc frame00000634 +9d97e91ff9e2a55f3b8338fd065e1b77 frame00000635 +1760799c7632d895dd1b1e4164d2221d frame00000636 +194d8b960cba020684c7750f24fffdbf frame00000637 +2d04d76e233db0f5e91f16e2c19aab1d frame00000638 +faed46e7a1d3d9be402b684c3eb06ab2 frame00000639 +30d80400ba789c4f4c90505480410fd6 frame00000640 +5ac5ad7461f9d5a4440400d621b5af69 frame00000641 +9bdf70d5448a878cf65ecab34e9c9acd frame00000642 +f5fa045525eadd7bb471c0fa93bf3c8e frame00000643 +682d39332fd259428864929e588512be frame00000644 +7fa8ab7b97d7074b2a5637eab8b6e8ed frame00000645 +29f77a9e3162d2cd94beade44902a313 frame00000646 +01eeb0e4fe7d9e07a7d52f4ad3120567 frame00000647 +dc703a447a7921e38c4801d4193da1f9 frame00000648 +02da25f3a0c77bd837653ea192d66309 frame00000649 +2cd74e05dd4c728ae75f2fa113a19a09 frame00000650 +84621d1a0749be0f3986ef9a8874c732 frame00000651 +35de9bab8b23d86e41227e08664981eb frame00000652 +1198f14a4682b0bda70b322dd85375d6 frame00000653 +41303bcb71eee9e480f0ac4979068d54 frame00000654 +0f0b54b695abbcd13ad633dd04609147 frame00000655 +a07519b7142b21b676beb6191d58bf33 frame00000656 +69cde1b728425851117304b620ca182a frame00000657 +7303a1e131ce4d8e37e98bbbb03416a8 frame00000658 +a349404c7a90ffd85400f1c7d57708df frame00000659 +83fbfb6378ae8226a22c3b744e7aa4b3 frame00000660 +2cd7d72ae46b050757c2f4539ce36f8d frame00000661 +702b610c772bacd1f2183bf1ef89d367 frame00000662 +94a6d5be580ff2fba75c6f929b53757a frame00000663 +a3e4d733ff1ea320dc83cfb1695e3702 frame00000664 +d24e93e4ec573e586164d39a24900d51 frame00000665 +bd7248dcaf2f3af37366271251e3c042 frame00000666 +5623172d621a56a719f4c6371b346d0f frame00000667 +c428cfe4b8fcf50408b435f8e5d609ed frame00000668 +aadc479871d62d08541868bd48c58b68 frame00000669 +7c8277cd384420a04b3359281c4e4a4a frame00000670 +8386315b55b19447a4e8950c3d5de93d frame00000671 +dfe0e89dd8ae82685b2d800f50ebbc8f frame00000672 +ed6af0ed40b6de33aeb329f078c340e3 frame00000673 +44d0662eb5e0394ba7c20ad07a12984b frame00000674 +f7135fa4ea34e8ad06f63289b8c8bc5f frame00000675 +289aba3ff3f4fca599e159d0e5f8a69e frame00000676 +fb059ae06f8487e990af2bd41dc8a69e frame00000677 +82ca68e33d1868284883664f8e111b4b frame00000678 +1930f5cfd264a1d3590f89f5c8f44838 frame00000679 +9cffb26ed7aa762e0f3a16a4a7669059 frame00000680 +e97c8184901388189154f9594fe800df frame00000681 +d9f6ae7408df0a0b1f10d4da38cca0ae frame00000682 +1274927df713552606ef97120d2445fb frame00000683 +f1c3ed370a3550305036561e1f2a979c frame00000684 +c0d325600c3320a3d3c624a8b2a8a270 frame00000685 +751e181de8390138bfe7d2d36d657ec5 frame00000686 +c591fc70dfbfe72e6bdbc08001983822 frame00000687 +bfb910518b39aa4ea752a7f025f88226 frame00000688 +da1585e7f5538e69a5ac1a33f460084f frame00000689 +61a2c86cf1dfde4c0594cb373287547c frame00000690 +752e3bbed0d325497fd2472bcd9302a5 frame00000691 +34345e42f65136db2aa088d72271b2ad frame00000692 +dfcd9a62cc7c8ba75110a93f98c6f744 frame00000693 +5c67c2f0a8f535684283d464f3250bfd frame00000694 +52316d7eabd9371df77b30ca239263cd frame00000695 +16c1037eaf124b94b8504e14c4aa1fd2 frame00000696 +0f48bd63416923608d48c7374a4e8cfb frame00000697 +ffc272d2ffa5d94cf44f14481506c5d6 frame00000698 +aa50e95c62b15f2913b0da86be73a6dc frame00000699 +379660a58d83508ada7fa64ff59dda25 frame00000700 +dc86dcad9962c3b273df279edf2c0e40 frame00000701 +0e401bea91d887d64fe7e5b25a0e0268 frame00000702 +d2f0c0dd269aaee5458b24066ba4f09e frame00000703 +ee2778d1a931b8895fb14a956fa85641 frame00000704 +0e5dbc49cb04b84d89a7e9ef28951a32 frame00000705 +ff25486f8f0c23daefee86e0ca3a72e1 frame00000706 +1bc3bbdc6ac2177929c6b7ea1c51159a frame00000707 +f283196f3fb336f53d0ec4a32d5166ca frame00000708 +eb210fefe4ed111384e049c6075df1ae frame00000709 +4363516641331ba339ab5003f116dfb0 frame00000710 +814cfefec9176c4d2159a35f0a62dec7 frame00000711 +a5cab6b83c9ce82d6098514f19e46eba frame00000712 +3bcab3bd196b0c489a34b03bcb2e1eb9 frame00000713 +cbdd96126fa94d588e66073054c35e89 frame00000714 +f2d42241cc25563798e7b971ac2ecdef frame00000715 +8d059f940c4e319b114cf64cade21ab5 frame00000716 +df4737c8cc741f3d998d479ec27c3068 frame00000717 +e16b38f5328d3aa620994753028661da frame00000718 +198faffeb4c76148fc4fba9cceeabe22 frame00000719 +a0ab9e1ce078f4b574f30287c63238cd frame00000720 +cfb50bf419dc528d643268be240bb9b3 frame00000721 +dc39e4b3590920f55e39123c064e302c frame00000722 +b6b29c1a959443ef0bebc20b50d06719 frame00000723 +7ded09930f645fd2ff23c149670a3c5e frame00000724 +cc57d67d727404f5cb051b846500cd47 frame00000725 +22631351c22f609369a3edab7d67f631 frame00000726 +61316935e08b7439753918898c0ac10b frame00000727 +04452d4204f1abd628683a71fd662675 frame00000728 +1dc7f0a0bd36c4daa0044a17763c80d0 frame00000729 +22b6f7fa556dfe0a363e6fedd596958d frame00000730 +afb2f707295dbcc0c6ad5e25a239c94f frame00000731 +3c9b5cc6529cb7661487186d1dc6382b frame00000732 +61bb1066a884108b98b97e9eaf1c0c20 frame00000733 +f01a0f8d61628a374d8048b77e7fe74e frame00000734 +d52cfdbf9af85bc1a5c8622e159b9991 frame00000735 +967cac95a4ce147c854ebcd48f18d0a0 frame00000736 +039a7381b981597595bc54b8a9109829 frame00000737 +4098e1c3963b81f2a078f44943472262 frame00000738 +7660a10d1c712319ce09acfcc1571885 frame00000739 +f0c02e470d70186cd9b4d1e6262bb77a frame00000740 +75a104bbc9d11ffc98b4a113bac2e00f frame00000741 +fe3f7c672a6e7d8d8a627ca8d9a36e60 frame00000742 +6361cc9f73adf5c09db66c1176d77420 frame00000743 +41d8d21c4aafe0c16c6541326f84d7a6 frame00000744 +de39a95c03d418fb65e04bfd1ed4f736 frame00000745 +e400f1507f65fef69a7b1bb80d7393cd frame00000746 +03d0ca2b167ce6abea70d29d75c42e0f frame00000747 +c461e99ce791840ffaea07d1e6439db7 frame00000748 +f3a8d8908f88ad4219d58cca48bc895b frame00000749 +ed6e77aa3dbe3a459e783f0bec83dea7 frame00000750 +67194b7e9163d39c246f713769b85a83 frame00000751 +ba8bd77672f367d8b8dc8609c9cc843c frame00000752 +1935268e3c6e6817ab479ffb14d73fbe frame00000753 +c113158acb667084751f92604ac4fb92 frame00000754 +019e03184a68964c5604f350f7841805 frame00000755 +9a26d6d729a144953e3e080bd7078d9b frame00000756 +d082ea837603538407109301fda7d0a4 frame00000757 +1b937e220a70150a20ccbba7abf8e38d frame00000758 +ec10b6d602cb60199e68f8e29c1ac17b frame00000759 +63ad5c71f56a70e6df6c0bfa0f9648a1 frame00000760 +d4547ff5de4f703e1370a80d592496fc frame00000761 +fc5a529bbbcdf213c2de3ce55d43435c frame00000762 +444c19dac11c19d4f692e4e8f58b3f11 frame00000763 +e5b33c44d2043c8403cd3b1bb93b998a frame00000764 +9d2742a65e9c2a797027b7a38849ef19 frame00000765 +b958af224c44fce8e8c79913e55399ba frame00000766 +a50e7b24b196a38ac664d767a81e9def frame00000767 +ab95fe5b5038f9510b0966d5849543d7 frame00000768 +567cadfadf330e4cc4052ce7b498c633 frame00000769 +d0ae44f1f01aecb7f8ab7cc0aa18cf20 frame00000770 +2881457c99e7eceed4c4fc9e77b47d89 frame00000771 +afae671239194c3bb333f9d43d7722ce frame00000772 +35ce3a97b20ed60d78e9b62515a4f41f frame00000773 +ca67b1a347c4225cd4d370ad603308db frame00000774 +66946c3a13393a1327362eff123841da frame00000775 +aab3ebfa2fba81b8ea50bb89a8fed92c frame00000776 +5346e021345a4490a4cb1277edb518a4 frame00000777 +f52b2c9121744727abe55027775e3745 frame00000778 +8f6325d343390ac123cd9234752aed5a frame00000779 +e02ed483c838b0890c17690ba47a88e5 frame00000780 +62bcf1cabf3ef2bc46128055c8e5448f frame00000781 +b3db4556597ea9dc78cb021a1322b7d8 frame00000782 +125419686b55acd68fcb25285ef7abc6 frame00000783 +cb7d6c398a0ad4e209efe20dad886049 frame00000784 +e2cf17705b4fda864c67705f634769ac frame00000785 +6706cd23c0c0fb19d608c5213b2763f5 frame00000786 +3a5da92bbcd60ecd8476c7d3bc813b19 frame00000787 +dec8d19bf950f824b29eba6750b823f3 frame00000788 +172c687f5ddb7bc9fcafe61d59c0f665 frame00000789 +356da254b75b039f7eeddb0672210fe3 frame00000790 +91e5d35c5a4fe268369c0aa21a54e7d9 frame00000791 +49e19ab14c0db529d29b590a9823d64c frame00000792 +a10b3ecd30de88169c5eb7f363942b2f frame00000793 +08e667550f72877746b3fd2d3fa68eba frame00000794 +762912211d4f46e82bb3e48ef3210b22 frame00000795 +6c1151c03021568ba9e3ef2a1a084092 frame00000796 +26d98c1f9bd240de2db9755c8d724cd2 frame00000797 +45162e4486fe96877b04568cf8a451d9 frame00000798 +d7ec82f1d9b8396d05a75df84dafdba0 frame00000799 +0df827f5c640474cc5760b810e7ba0e3 frame00000800 +b57cc8bcaad2f9bfb7d6076f4296b70d frame00000801 +50a8297a00574daf5b08c439cdafd28a frame00000802 +c77010195363dbac05fd4743aa265942 frame00000803 +6b6f0142c0868ea9ed2cacfa0c7144b8 frame00000804 +75f07020da35348a085c2a4e98fb0f9c frame00000805 +ce697235ed27277a39a1a864e8d8e4fd frame00000806 +a8141a8478f396a3346b8b7a4e6e6556 frame00000807 +daa044bf14f21e308f27bb95fdf99113 frame00000808 +f6b07daf23a8f0c71d31c65a18971085 frame00000809 +26e45aaaab343855a82e2d507aa48ffd frame00000810 +1f4a44f5c8a043d2c12479e22cf33636 frame00000811 +4e01d6aa4e5855d9cb37976a64583b3f frame00000812 +862efd7452e67f48581c5a68b5ec41c5 frame00000813 +15674490335dc4335e7a417f4640dfc4 frame00000814 +7c37d551ffac00c0366455be27d72fd0 frame00000815 +0cb40a43b7c059387e5aae496a687ec5 frame00000816 +464431430338194fffab17951b0bc82d frame00000817 +688a01c35dcb01875c6e2ab4ab684558 frame00000818 +187b1a852235df0c44c6bbcabc9f934f frame00000819 +8213e1f25a882f35e9ed3c647219114d frame00000820 +cd98761c08b801a3e09cf4b1bd9b5375 frame00000821 +9956a037e6073a0b5d835f8ea1d2062d frame00000822 +b6352e573b52a444289189c2a7ee0516 frame00000823 +ecbb505d4102885626255805c308cda8 frame00000824 +cd991a7549377b62d62c14c651add1e2 frame00000825 +62a96318013476283b8fbcd26a588992 frame00000826 +b87697849593991f75b30c0ef8dfd6bd frame00000827 +63c1c38b85c97b752bc150a17ff62922 frame00000828 +a62e1a8f4d5354518410b54e301ddf66 frame00000829 +bf129cad723015c2748b278643ecd3e4 frame00000830 +9d55a2ff3059a011c89ddbd51e111068 frame00000831 +a64a2a45c83453d528e7ed419970c334 frame00000832 +72ac366113fe6e60a2b62b878244a71e frame00000833 +0d604f524ebbd9e47492bcb0d8bdf64b frame00000834 +fd42e7f2f274506ebf36fa2502e9c17b frame00000835 +511c0bb8ee217d42c6387b59f918a746 frame00000836 +7ebf34f997776ce802857ea10bfd177a frame00000837 +a34c00782ef0262a7d9482903484fade frame00000838 +bf64e2ea7387514f68f20fdf20af4746 frame00000839 +1c8748e81baa7912fe9e82578f7f408c frame00000840 +95343401762d5c481f9d88438ea00277 frame00000841 +d59ef390704182eb404ef83245a5b6c0 frame00000842 +0689c32c4cc476158fd54fe8515a9408 frame00000843 +f4d7b1657204dd70e8ff34e27e01ab73 frame00000844 +ab5d9860ead8c41315af963a9319ef8a frame00000845 +fc5e1911502e55d0ec98a3decb82b3d0 frame00000846 +4c1863bc5be01aa95b1f59b2c431682e frame00000847 +d933a5cb7d89cab7f1a476aa6ab02dd5 frame00000848 +d7c8360750aed0c473116c7c40406851 frame00000849 +0a8b66d639ea70c7bf7bda4d2307f5b9 frame00000850 +ea7a7ac489cef0395f2c75e31881c2d8 frame00000851 +9624b79453760e243f3c1ef5e6cad16b frame00000852 +e7d105ff15408ceb855ab5eb94e3076f frame00000853 +7e294ee2cc41d25cde4b68ce56b2105f frame00000854 +535361f687c816e6c20f38fc60f14256 frame00000855 +4f8f0062a394e47236365d683787dc59 frame00000856 +dc0d04bd656eaa665dec596898eb03e1 frame00000857 +f78f01e97cfbb138a0886adc414af949 frame00000858 +64056ee5845785495c5205f36f53b1f8 frame00000859 +675d1931aff3490b9a6e2134313e4069 frame00000860 +dc5b36d8e6080df638c5242bed73a9ff frame00000861 +95560bce475415bbdd890897e5198259 frame00000862 +2d53ddaaaa070ab98066dc420909543b frame00000863 +acd9805b31da2eb0b134f35252473350 frame00000864 +fa51ab9ee97f05b83ad3dd0bfc85ae1d frame00000865 +a5893a32e42eae7c029ff95d9b4c2ed5 frame00000866 +c36734ad8497177419ca8ee349093ad2 frame00000867 +884f8944d72ac37edbdb9e95384fc399 frame00000868 +7b2f79c74535e505dc72011fd3e6db23 frame00000869 +6b93588cd92ea09c182909867d50a6fa frame00000870 +ad5a30b550bb7d016eca178f48bc2a2e frame00000871 +d73618f3cc1079e43042ac407e40728a frame00000872 +95f60a7ddeef4c05782d1596e0cbbb4b frame00000873 +5b37fd62530e93dfb6f49a0178dcae9d frame00000874 +4d4df840c1b4b057ff004a32accc0096 frame00000875 +9ec53b890c1cfaf3eecf824d3f6e31a9 frame00000876 +627489499dd2f96d8b3b89d576813cd0 frame00000877 +edc866dfbd7e26718e629ecbb82afa1b frame00000878 +1357a200137b46c98e8a792821ed2e89 frame00000879 +37d86b8bd76abc41b15e7e8dbc71775b frame00000880 +95871ee99124973ced44f4b5bf4fba1e frame00000881 +687efb0d17c44ef6c4d15cefcfd597e9 frame00000882 +40316504cade0a234442e8220caee1e4 frame00000883 +84070443c1752df91a1641ddf32fba06 frame00000884 +8a05b09d5241717dcbc77cc5978a0609 frame00000885 +cf4abe3c3dfab1ed6909d15d03eb36ae frame00000886 +0448322b94f361fabae88b8786045bff frame00000887 +8928c8e4e5320a61951baa01f734e2b5 frame00000888 +64f401baec578dd4576da0c0c43700ab frame00000889 +622563a42bca24137a5a5315db2bd253 frame00000890 +2d944c0b442a9ccd26d700ccb8bc2331 frame00000891 +aceda06eb285c96a07b73d3d7549b962 frame00000892 +271d29627c2cd4a3834fe013431ab4be frame00000893 +2d1ec7879076a86e28f25934326a6875 frame00000894 +c52e7343158d12b586b325e94433a75e frame00000895 +61b42801e74b006141f45b97feea089d frame00000896 +37ede942e9fcb899ae847ffb1984c95f frame00000897 +a6c5e677fc02b00e1001b9ce69e2a625 frame00000898 +df0adb4c1594df0b053947d76a484f54 frame00000899 +80d6aa0dd708ebc17566904838fd8e69 frame00000900 +76445cb2ed0d9d123f7947442a6fcea4 frame00000901 +fd6bfc26942af2ac39d47e275f4e3a7f frame00000902 +94c31bf6006bfe20c729be5f31a62745 frame00000903 +aeed27a1e2b9cc71fb45676334246142 frame00000904 +84c1f35f16e803f14a5b38fbd4237296 frame00000905 +d126ee421fa79e1f9c7a0c2b23424b67 frame00000906 +b539ae4cfd7b7e51964b483caaf64d52 frame00000907 +7f258db3103f8142057737ec913d2535 frame00000908 +b0f6ccdebb04612a56d42b74fd40a153 frame00000909 +0c66387b57f7b890c3b0a7afdd4195e1 frame00000910 +8b8e74aedf8d526a70bd7a18a816d4f9 frame00000911 +172f7733b25fbf53a287142949adc310 frame00000912 +c86bd74033291fa49b96b694e73c071d frame00000913 +581d8d93349f5dcb93fbadc964690429 frame00000914 +526c969d4ad24ed82182610e8b5dd74c frame00000915 +25b982c4aa8199783a5f36123a331b78 frame00000916 +70235090ce45bb8d37615ee434de9dae frame00000917 +72d609e7a3bf0bb04f3b115b39be6820 frame00000918 +18a1f3295b980553da100103e95f1891 frame00000919 +3f2d35ada2d99a946c72c87691ddba3a frame00000920 +1820f15121fa67bc58dc33b2895f4867 frame00000921 +6f8c2bcf3510309b46e3b7d97576b607 frame00000922 +452253956a1e96126033a34f5d1f7481 frame00000923 +b76fc69ea0a6dd460b780846313bb142 frame00000924 +3245c640aa80ff34af7dbf75c42246a1 frame00000925 +fec01e366791658a41dd9aca8d223272 frame00000926 +498e24d0e1eec6ac6db7e4340fa940d9 frame00000927 +4f4fb74509b1a0f9fa78b260cdaedc0a frame00000928 +0d3defd53662e0c0d1d2dc25eb32e1ee frame00000929 +4e82d330981572c28bce4e8ada030b43 frame00000930 +e4a47639f922e257d2236c38e068aa87 frame00000931 +8d10d2454f4482142338e30dc4a9b918 frame00000932 +45e66547106618096c68bcd5018bba82 frame00000933 +94e7b92b627f82ca731bae3226f7090d frame00000934 +0dcdcc8d9a001df1acf005c8962592fa frame00000935 +4388d07025c3796cb3731b490a7a91d9 frame00000936 +648d07518f63d788dbeb23b275b3e050 frame00000937 +5cade92f911eb8fc74f74c747726291c frame00000938 +c6474c5d4ad816ae90088dd1ad30161f frame00000939 +6d997f474923da3731e5a97e69c0e6bf frame00000940 +a307ed40f2400fe98826b173b63e5f9b frame00000941 +81abfb4c2b91069c8125f3fb7c2c897a frame00000942 +010018d1499773a43b7ef528045461fe frame00000943 +80318d4032148a5ef4861dec7d400b40 frame00000944 +a7b192105f9e8a039628a019487b211f frame00000945 +763c34e3c1aa976ea26fd3110801ed43 frame00000946 +5be190c4a2a5a1a9828ab0ebb1343c7f frame00000947 +1917916a575f7ec3e12c515e71841540 frame00000948 +e332ccc7d89fd7d9ad8046b1070ccf4d frame00000949 +74d0e2602a51cec091d9c918c471ecc5 frame00000950 +4776f35b24bad1417d1aab2dbe81c7de frame00000951 +5109ea37e18d1efd185a679d9a534562 frame00000952 +cf1cbce5f8ba247db9fadcb388c4a5ae frame00000953 +051b7ff2cca84349a9ae0c5b119e2b6a frame00000954 +dc05b2e982fc8072f93c460919162f33 frame00000955 +ed1d6a7710532e3a342d5e0890909703 frame00000956 +97db6cd56efb6ec1abbe51464e0a8240 frame00000957 +a63166dfcba5f4a83086cf197a93daa5 frame00000958 +946f45708682bcdcb4f69aa92dcc5e4f frame00000959 +0bed0a76f34de0d8b33768f0d8e865df frame00000960 +5aaaced8c20a773756bd65277024106c frame00000961 +b2ac1a4086b0a4ae72699f5b6a243d72 frame00000962 +829cba3d41242320d3040f7c55f17452 frame00000963 +bb1497de51ec54e79cf17a5bc7d5ee72 frame00000964 +20a1f7867b9b3951a58e72b980b6c47a frame00000965 +2b8a6b51f1d3a8fa59c838b781f61a5c frame00000966 +ff2bc611d3a470fc2e72c177fb6cfa88 frame00000967 +3f19b5de1d60bd86a67af6380104df13 frame00000968 +de92c94336aab899bb223c4fbdf3fa61 frame00000969 +cf5bad17cd69f4d9b517bf4f0d9d9723 frame00000970 +cab31c65df6c782ce233a4b8576604be frame00000971 +1740323d9fe7f26a92773c2d18b8f0c6 frame00000972 +2a3d60408b8ec895b711dbbebf6bd1e6 frame00000973 +2f9f2bd7271e160b3228ce846d7d560b frame00000974 +a6d93a105da127fac2e9475780ca2ca0 frame00000975 +90a9bdafd87146d5f0cfacf0dfc872f8 frame00000976 +3c6094953acf9d094174f2f9c00f44ca frame00000977 +d0c80e2d19dd6b100290e1063b8996bb frame00000978 +cac958a9d726bdad361d9993192b844e frame00000979 +6779154d75684b72e98b3c363d4f67f0 frame00000980 +c0e5a47b01462dcffd64973975c08a62 frame00000981 +d4d55349a087b8efb3396f7c50710a55 frame00000982 +2daa30ea0d92c8aaa695cf3afc8258e9 frame00000983 +e202a75822ff5c490dca0aec2be8f5a8 frame00000984 +b20b88fab89e3cbe20e1e25a06f255ed frame00000985 +4f2142047511b39787206689fe807612 frame00000986 +a3050ff64e0cbde9e02c5bea6ca19a1b frame00000987 +1044b9a65d86dab0ef818937d15eeb25 frame00000988 +7dfb93bdd28e94e07d0d0d4b609a716b frame00000989 +748659cbb7789e2f253ffc356d942683 frame00000990 +26da51cc27494d044db7aff9136573a9 frame00000991 +05b3a75f2c361c5e08f5bffe6e8ac14b frame00000992 +78317cb1d83c21e03000a47c09bfecc2 frame00000993 +780f08277c00e1fbdc30328fd109fa76 frame00000994 +59894055ce1a5ecff3269e26ba0ba42f frame00000995 +bc43ec39481646cc94f3cc14cb79a4cd frame00000996 +45f90080f4c0a092695d1ed36026517b frame00000997 +e54f305e70073cb74bc4a7089798e38e frame00000998 +763e456d8747b27ea9bee022b6dde965 frame00000999 +f11f79883b77d28de008ad22d913f47e frame00001000 +6f9ee04f7ffccde4f4f99ec0d809e5cb frame00001001 +7d3e2a1c184ee93b74445e1d69ca555f frame00001002 +4edd5a150e340a16cdf5036bf18239eb frame00001003 +ad92ce71752ebe88880d91502c7382ec frame00001004 +f9554524b452a48417541148f7d4683f frame00001005 +915ea1ac0d63982f5ede298256baff02 frame00001006 +a79f51634c91a8effc8cc9b483b85128 frame00001007 +b23ba93b05724c79d43d0ce046396baf frame00001008 +6214fe7241027e7fa296cd8d941a92a6 frame00001009 +b227372c707be8a169b41a1403792ddb frame00001010 +7057cef9d68921f22b96de2a8fad40cc frame00001011 +f2818a4fba7014a0afbc45f26359bb78 frame00001012 +897a7206ee1ae5dcfa1bd8bf04c22f7d frame00001013 +1cc26fd28ab4b87d8e460f4b673239fd frame00001014 +f234b91833c2e228eb87603e9ce7cd9e frame00001015 +a563667f78d94ef3530e661a1631a140 frame00001016 +ec573369f100d070cc8c140b5b86fcdd frame00001017 +f4de4b4c9082536d082133b7d91c2631 frame00001018 +51f90a5bcdf69ef47ed6db7598dad7b1 frame00001019 +6eb97a93f41d01384f580cb29455119a frame00001020 +2231a894c33861a48b5be64cc4957a00 frame00001021 +e7df0a483292083e95ff71c28a5bd335 frame00001022 +d9dd984fe24183b8eea06fa12adb19a1 frame00001023 +43eec1f84c8dcb5266640c27e5d82b71 frame00001024 +8d63cb40e94e67d6b2546a4c187ac8ed frame00001025 +9e5990796d3524c7158b44e3acac6802 frame00001026 +9216c5b975dbe8821c5499ef6f85028e frame00001027 +af4aca65f3bed6f4783d116b0ccc80af frame00001028 +8fed2264ed2fc8186b3ae6d9be5dc1be frame00001029 +f572b34e3ff22265a91440e079de7f87 frame00001030 +7c392afd530f82bd42993784a5065896 frame00001031 +b426da131c42a70d979927d604b77ecc frame00001032 +c0fb8775ac6861fbec51124c4d74229f frame00001033 +beeb496f51811a9ef86098d710895648 frame00001034 +d1ed904009543adeb66a117f6c76cc57 frame00001035 +942c2680f9dcb5d171d4561e0a54b92a frame00001036 +ea235bc16e92357b920851328579536e frame00001037 +56611ca99686d143718a9a75b8a327a5 frame00001038 +d643f3fcdac9badfb04da86966b6b2d8 frame00001039 +8fe0c88589775533c9d90f3d6173e6e1 frame00001040 +5b6783ec3a74b2aba626c6ea2f7da837 frame00001041 +01863698e29e16fd8fd5be068b61017c frame00001042 +8a25ee24f1d1666c876c6ccf21cab5cc frame00001043 +95bedcaf35dc57b0ce4d40e842b8884d frame00001044 +f81777381c9c6c352fbb31062c8cc172 frame00001045 +88d1fda7be0ec16e4acbd06276dba871 frame00001046 +a144a504481ed925d42e7860b2d743be frame00001047 +03871bb93269425724af1c9070d942f0 frame00001048 +7ff162d357548618e160d50a3f5ebf6c frame00001049 +7a753d8c598cd1f0feb7453fdf2b768e frame00001050 +18ca9779d865700e91d048c34c64b3ba frame00001051 +272d4e4cc1c755c955b82e2b0e7261dd frame00001052 +37f7da5670e278a69389e66554910160 frame00001053 +b084cfbf38e8a17c972a508c7e7c482c frame00001054 +ba9f6a47a6e6753ff30b150d13e348f1 frame00001055 +143fff97189a25f3c40589b578e5dbef frame00001056 +9ffcd32314e56b2f45a2ad1591872dd7 frame00001057 +b00fe5bf2190820903b78893b07aca28 frame00001058 +f56055a3c68b4adec2ed05b1435b413b frame00001059 +2c6108a397a0fb7a80b1acf5d4f6584b frame00001060 +ffed9aedb0fd39dea53129b96529b062 frame00001061 +3d16d1842b612df4f6dd2d24952582f7 frame00001062 +e14de061a4db603810bbb4f5ee7c7e00 frame00001063 +eb13ce332ea379babb8e1ec988f185c6 frame00001064 +66f24397c1fcb06798a803030d12eb43 frame00001065 +12f42f987dfa228b0d814bb4db21e51e frame00001066 +724c81e23783d3f6c73efe5057e1f880 frame00001067 +fbd1fce8f35c31b4ef3b07ebdb5583e1 frame00001068 +f2f84c665820df2cd3c9bfed098a5341 frame00001069 +3414b02925c107920f407757c74ed493 frame00001070 +c40b645117cbbe1e5bcfce7602d19fdb frame00001071 +ab36e7e65d53e1bc7af883b677809bdb frame00001072 +10505229a30aef1ee4f0629025c1d3e6 frame00001073 +26eb020581bef373d2a240986b3db1d8 frame00001074 +c110201af3cdc5da18458c0e63f60987 frame00001075 +22469751bd1959f32095eb00d9268e02 frame00001076 +cb1b9f6406d0403f691c3529b79b0367 frame00001077 +ef4ace9946652184f9eae917c47026a9 frame00001078 +fcd4ac3d02f2094c72a4124f4754144c frame00001079 +4a192453045a92e1c635fb3675931574 frame00001080 +a1ba00fc344311e099847c62fae6af27 frame00001081 +86d7ad116e2d9438e853a9bfb33057ca frame00001082 +c36f65d96e5d83592c9d3b7ce72d30e6 frame00001083 +55e42625cbfed0a99772ec361d68170f frame00001084 +d0c6efcdfaf42662fbfd581f4e6ba4f3 frame00001085 +8834e66ec4dba53f9d8390c2dd0e2e1b frame00001086 +353eef27e15091135cde97b1b04f50f1 frame00001087 +d472ca090ec39c74e7f884c3c19b0947 frame00001088 +889f0aa3b076ee56300bd72e69440aff frame00001089 +b73206d6368f1e88cf258964cbec42d1 frame00001090 +2934efe8e002071a369340a060f77f37 frame00001091 +236c170acebdf9e44ae80b034b16b9e0 frame00001092 +4bb5dd87f83786937a396383b9456b5c frame00001093 +a4558507b22590c17ca3e53e99bf3f2a frame00001094 +0edded7fbe37c93d5d9e615c338881bb frame00001095 +f471dc6268582f4e5748755dbcd65e4b frame00001096 +59c4bb2d25da568d9c99ffd1ab05d77f frame00001097 +e2fcbbe6df5f63c1bae4cc2b4a44a5b7 frame00001098 +63cd0f8e45b9ebb661d2cfec93cd32a2 frame00001099 +2893b2cb3627c9f2b4f084bc3ccbed32 frame00001100 +f948431ad224667640ba59c349c0a38d frame00001101 +8191b0e2ea0a7f3a29b3c5376b22a77d frame00001102 +889b9b2f51ef1b2bb332a82e4922bc6a frame00001103 +cda12884ff0c2bf45e141da4dc665990 frame00001104 +704e5f065a20f9cb46cb7e834ebb5216 frame00001105 +25649bdbf62af2c43ff096e61c395953 frame00001106 +2fb8262a098a6dbb97cde82fb7386e47 frame00001107 +293e6a0daaf3cf022a62193e6100a8b8 frame00001108 +492f5370c33b431e18aa4b5ac67abdf3 frame00001109 +c0bf81c6ebf58eb921f286777ad573d3 frame00001110 +723db5a320aa5cc9dde0fb59c42d8a5d frame00001111 +1a1730d86ca913e8b507319d33cae06e frame00001112 +6ea9a4095aa4fbe71b1bcf06b3d0e3d3 frame00001113 +2e12a631a0d74929d7fb0e6ef0b7fd32 frame00001114 +be6fdb240e0fb39c292d2d6e5761ca0a frame00001115 +886c4d4606468551cd6ce9015e81b14d frame00001116 +ad6e65b8b7da8a1a182a54326d88adfa frame00001117 +d80de22f1960d0ec46a8805bf0e082a2 frame00001118 +37906801b904c75f793ea096f952a4b0 frame00001119 +3243f5a5558773c0d65d83fe10d51af7 frame00001120 +608dbd8bdf020f9d91a2e5f02ac34b39 frame00001121 +dcce99e6fdfafde921f1b1dba894678e frame00001122 +e38874b4a3a5045f1a1fa170accce8f9 frame00001123 +8f7b5a73ee5ea79bcb5b15b3e9657d90 frame00001124 +321a4155a18f640580957eedcbc1fb20 frame00001125 +93e79f4134c40c97db032f5b2f8c3cd6 frame00001126 +8958bab6d3c1345b82e2deb8f0e2a546 frame00001127 +0b3f51845e5f04ba93d9030e032949f3 frame00001128 +ac2e8a5a023c5c0365f88146ac2956ee frame00001129 +f5759b306545a495065aedba368c566a frame00001130 +7104a955ab38341a290002c33d5761db frame00001131 +c9972e874e3ffdb35eb4f4acc520f16c frame00001132 +7168e8058f86bedc98ccdcd219b2d9a5 frame00001133 +5f0d9962d02c51c7e2ec4e7d35372fc2 frame00001134 +e5f4072448a53e6cc5e10619b52d59a2 frame00001135 +98227a0a5aec922be6474e4d4f8911dd frame00001136 +57a750729490d9715a8d7c2049b77f78 frame00001137 +74569e3a47a57ac8b4d12ff73a6f0885 frame00001138 +36b6ff41f5965fa9ff017235072bb0e5 frame00001139 +68760449a73ffa8ac86ee0fdabbb78c2 frame00001140 +dc3eadde90dc4aeb045c1ab2fdd6d65d frame00001141 +6675a51af870468fb75d5081d50f2411 frame00001142 +e8870b5d46a549e5f947962d4e76fb6b frame00001143 +fe2a54d80d852b7237cd5980f501c834 frame00001144 +104d73d43404037a7a469fea0da04f8b frame00001145 +709d1f6a5ef59fa847fa9f8dfe8a2346 frame00001146 +2cc891be50cbab0273160590ecb5b7ba frame00001147 +cccfd435829c35af824d3218258a3b29 frame00001148 +4c4209f99b4cc53d7d86715268a06ef4 frame00001149 +48eb0e071f5261e1c21908876dda6a62 frame00001150 +084a6e10900f4f83a9a3b26761fe568d frame00001151 +e41eacdaf1e1b302e640b9d863f6dbb1 frame00001152 +0ea825cb2e7e8d0ed1137a4b750ba2ed frame00001153 +3dcc8eb1a61fab0aeb171ef0572faf26 frame00001154 +9001d79fd4b69750e293e7cb19a71a04 frame00001155 +930d364c8546da83c6b2ebc4be3fec3c frame00001156 +a0af0fa5c6f84ca6850bedf248fc2d81 frame00001157 +4ca5121f4443aac3c60f7ed92b194f7b frame00001158 +222eb9cd11247477f6d8917e16285a9a frame00001159 +fb21e08a89704d9effcfe6d22cda9cef frame00001160 +e51f82d32fa8ad2d0e2b4f54057da5bf frame00001161 +2dac90351fdb84ab321cd29319542cc6 frame00001162 +c22d4946f5566c472ba4ce44932e542e frame00001163 +fbe96e664d60f8527007ed256f0906f3 frame00001164 +33290df1ee7bc225c28d188f639dea09 frame00001165 +ac93f0045df1d6b20c93fd6f0c364451 frame00001166 +4ea70945b52d5c8516aef9ac4fb2c889 frame00001167 +b9d5c6fb94d282418cb084a9d73c35ff frame00001168 +7303dbe2b9ec0a641f7f0c4aaa92043c frame00001169 +579bf0f390ab04c3dd1b0115c09283e7 frame00001170 +90764e6a72b3d70f699af911ed759703 frame00001171 +1091ed2fcf8555edbb357c9516c0269d frame00001172 +d3649bd3a4b860e227f2d709530b9878 frame00001173 +6158781c1eafba61c69c99b551e012d7 frame00001174 +9e1d6d1ac7e7c04a4587200f0ef128f8 frame00001175 +20c4530fc62667c997d253dbce6c3170 frame00001176 +a5952d33654373772b2e3bbdeebefa16 frame00001177 +47ec50717c3a9cc07987cfff9f3accec frame00001178 +e2bea7ec4095debfae822b864a5aa986 frame00001179 +cf17db3c9c504b46db9b794e6a340ace frame00001180 +1fa0e76330c8d8b42046fecc5930017b frame00001181 +25788fcd5eea5c28f23b6e300834d3a3 frame00001182 +b7da92b7617709c32f3c5673bf33baab frame00001183 +9d5d93dca56452aa384cbde34e23b526 frame00001184 +617e190da9280a24733e94b34ce493b0 frame00001185 +69e3f697551d78c817b3630d40a202cb frame00001186 +25ad8c64f62003b9e14efbefc7906430 frame00001187 +04cf7c9d59565f5fccd83caf1a5f68f5 frame00001188 +b4a2b4dc5e42f75c784b5a2bbc703928 frame00001189 +3e8dad5b412ef1db08aaa195ee9758db frame00001190 +823a966cbb68220a3ebc60ae70a7c7f1 frame00001191 +6ada0a5bbe2e0e0834c514e2a48d8fc3 frame00001192 +1f1b1d5e519e88dc1960b965e25fb0d0 frame00001193 +4d4a5b0b29e2e17640754cc402a58a47 frame00001194 +5403c6043547f04ec960721c9acff14c frame00001195 +4cb45ffac8f33da5021ca4e86a39fe92 frame00001196 +f472640d84e39e7a7cc320d3455cf9a3 frame00001197 +f927128c3182419e8c5bb7794728a84f frame00001198 +126dbb029d8df74c9c119cbdae188612 frame00001199 +3b07e1079a8a478df294b6908c382fc7 frame00001200 +fa5844e37945a0857770e73760970b1c frame00001201 +3696607af1364f00ca19825f96b09dec frame00001202 +47c069350528be3602d457e3cd7351e8 frame00001203 +90df5a6e9700cd22c27bc02e70957f26 frame00001204 +87fdda79e56a5ace7c4ed8e46e7f8792 frame00001205 +f0783ba7cfbc59af6c7677c21a0e4291 frame00001206 +701e2994f670dfe5b0a4ab8c649b2e75 frame00001207 +fcdc42003f0feab32561ee5de7d06419 frame00001208 +83c3e5feb683084aabb369c586b7b387 frame00001209 +b918ea3d3182218a0856620b2a598cde frame00001210 +f0b24b8370c33e55aa5abfd7b810cfc1 frame00001211 +f0b24b8370c33e55aa5abfd7b810cfc1 frame00001212 +2722c8d1cb515e53ae46d88fb37a71a1 frame00001213 +1f39dd612b0277009d1ea2c2a9ab9c2d frame00001214 +94991641f1b555e5390763e2a940beca frame00001215 +c768a6d78479e7469127b80780f44d40 frame00001216 +821c1dd48174f62b0b8b169334e3d2f5 frame00001217 +b50938d78cc3340767f42b31758a02ab frame00001218 +1c01d0e292eb0fa88f8f1ee381ac8136 frame00001219 +51469827cfa3192fa471751c09ada7dd frame00001220 +ff3af1d832598f5590dd2899193d3a2e frame00001221 +9f089276b1b94a8aa67717e0c71170a0 frame00001222 +8cd62a573e455abc3d0178dcd55789c4 frame00001223 +17a32bc47c751cfbc028c252dd425750 frame00001224 +58879ca8c45137dcf8f0672cf083428f frame00001225 +ecb9e78ed8949fe2d9f10ee561d1d547 frame00001226 +d19f284eadcd3c94d7b236a3f84a315e frame00001227 +4d8bc22d133c236b7dd51e763a6127f9 frame00001228 +1d52877853bd9815f084205074ead9bf frame00001229 +a9e2f623d1df4295c8b2e251a6bf4f77 frame00001230 +bfd23b5fdf55e43ce3cbff4d419bb6b1 frame00001231 +1170783f10c435a009dff929abb16ed2 frame00001232 +225b743f512a6ec9554b446760fec718 frame00001233 +9b7e0acd8d00069f054d333722a95e2f frame00001234 +d8746865702f38dfde9acda204ec2272 frame00001235 +cf7af19dd280a56d345b5cec906d1822 frame00001236 +332d8cc65cb5ce4784582b1177b63289 frame00001237 +69a034eedddfadd76ac2556a8cf4f1f5 frame00001238 +208289e596dd26aa5e344ff52992db41 frame00001239 +dbc5e098a9338cae9c28c76b5ac3827c frame00001240 +3b374488c9511aeafa7fcd56a8a15eea frame00001241 +e011026a6a7b761b6da9ea7b027e040d frame00001242 +3fbfc57b1e6b227fdc931c215907aa1e frame00001243 +7cc988bf24b000fd6fd2a6057b16e930 frame00001244 +94b450622d62db263cfc6586dc50f46a frame00001245 +884bc23a47ab8c770dce886272372710 frame00001246 +8a93d8374cae419fab78655b8b110e4b frame00001247 +786b7bb630e84b472b5dc08686026bf6 frame00001248 +90ab27f4f9c797f003338bedb85c014e frame00001249 +76e5cd60f0eaebb339c81c652c2136ae frame00001250 +962275e90082ec31de616e44c002128d frame00001251 +8f05f97c63df17549a04148cb66da864 frame00001252 +d8f85b16d0bf6986f0052ba0a1b6e9e7 frame00001253 +b128dce721d9af75a6c01ba7f65cadd6 frame00001254 +01221db1df065d26bc0b2ede700ea791 frame00001255 +a1af509bd1eb04fa3a5721d007e31145 frame00001256 +9806fc66a195a71b698555a9a3ad25bb frame00001257 +8516baf032a5e44bf7549fb93da753e2 frame00001258 +0bde1675ff76956ce91802eb18c3e4cf frame00001259 +9cbbfa1d2e768b77e201ba5130bc212a frame00001260 +a7743981d8e5b36d97d3167b20f6c141 frame00001261 +3f769507d0c323c4266e2738df6a06ed frame00001262 +a56a2f6f202f23041c9b28ebcb372101 frame00001263 +f8fe4191a4830ae4fce3b45fa69cf5dc frame00001264 +e17539083e6c0e80f9f4d61ebad57266 frame00001265 +35985f4d0d1b29af0a201a4693e95242 frame00001266 +1205d885b12cb491c03b1ad7dafa86ca frame00001267 +cfad3221704d84c6f6b6927ed16268a7 frame00001268 +ebbd88e6ae67eb54d1585f30b0b351b9 frame00001269 +d6b0624f1ef8ce16ef103d67f38106d9 frame00001270 +9cfd0bf1c2b5904107fdcdc4a147668b frame00001271 +e256fbcd41a125228eb3ccb2328eaf05 frame00001272 +a3a487c4c3726f6536f0f45a972b5e0a frame00001273 +bb6eb7352dc25ddc88fa6bb915720a9b frame00001274 +0ca9841b56262f33bf38f53af66cd85d frame00001275 +2bd8199c0e5f7eb606ceb09207c6ee2b frame00001276 +2c6d2ba58b64b900db42c55180e4ba26 frame00001277 +3d1e3a46f35d42cd8f2eb738c4dd3dba frame00001278 +efc4f11e8ea5b8de3789cd007e4e32fb frame00001279 +75b271c870469c997b970ad7722c603a frame00001280 +1a2e0eaf562200915b84a6508c6585f4 frame00001281 +ff9761339fb7d534777d048460ebd007 frame00001282 +70893a7276c5e30d460d3b999de4be84 frame00001283 +f228995e24172795afbbf3516177764e frame00001284 +1d1a43a6ef43cbf69a576bf97c66ab2b frame00001285 +321e0e5e141e53b94445d0bd70d0deb0 frame00001286 +70c60a9eab95abdc09f87dadebfc9737 frame00001287 +7688ad3309eca7a881f98efc8b53de06 frame00001288 +f5c3c779202cca24dcb3ae7529e10ab8 frame00001289 +fa985c11de1c19d8c9ac623aa334a389 frame00001290 +5029aedcc5ca26c19a7f11c2c95cc578 frame00001291 +f6c3c36f1af1adbe78105d218235a5eb frame00001292 +7c705aa35e1d4c292d7678dcc6292235 frame00001293 +afe88953b17b65b3be32cdecae443b1f frame00001294 +0262e5c69534a53b29cde494ba39fde7 frame00001295 +a385323f7e09067398d0022838058c18 frame00001296 +de9257d2d5c2212ad13dd6d875ea6337 frame00001297 +f31fda391f7436df5e93570f99266e17 frame00001298 +f31fda391f7436df5e93570f99266e17 frame00001299 +f31fda391f7436df5e93570f99266e17 frame00001300 +f31fda391f7436df5e93570f99266e17 frame00001301 +f31fda391f7436df5e93570f99266e17 frame00001302 +f31fda391f7436df5e93570f99266e17 frame00001303 +f31fda391f7436df5e93570f99266e17 frame00001304 +f31fda391f7436df5e93570f99266e17 frame00001305 +f31fda391f7436df5e93570f99266e17 frame00001306 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/thp/pikmin2-opening1-partial.thp.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/thp/pikmin2-opening1-partial.thp.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/thp/pikmin2-opening1-partial.thp.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/thp/pikmin2-opening1-partial.thp.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,72 @@ +a584a06bd15fe6fe7cad009ee68cf1ca frame00000000 +1cd10c36ef3875302bc82d389e4ee50a frame00000001 +802a0b2d834c805260bb34d8beee6b5d frame00000002 +866e283c59f4cdd06e8dd890f79ec0b2 frame00000003 +d72c4298efbc7eaa836c6b92d0843741 frame00000004 +cce6850f0fd806c466ed18a377a1788b frame00000005 +b7407ca346c54a7a3c1fb27639ea8e0f frame00000006 +5e9da3fbb4eef06d099f99f01a14dbae frame00000007 +ca3231d6372ae723dd7179d4004408d8 frame00000008 +576be9efc099a1cd493e375dbb7006bd frame00000009 +1d862a8558b42988663063e7a41ff357 frame00000010 +fefa384381be434ad31cdb78bd638745 frame00000011 +6069862c8900f0a98b56dd8426825af7 frame00000012 +3aa3bc1f9728316a96c3df175895d51f frame00000013 +d2cf119705476b49d8c93e9743edd45e frame00000014 +84b340bab26fedb09af52c02677776b0 frame00000015 +615eefe2e1063c289593f61d072555ca frame00000016 +2d0658f88da5a21f0de375878168d593 frame00000017 +21a962485d48e1ff06b12b4311ea1fc2 frame00000018 +3d1f52beb6c39110ba237b5d5af01983 frame00000019 +41b2d09401413483b421706eea2c699b frame00000020 +b6c094544c4c32fcece53295a2259486 frame00000021 +ff096ece82fd77c6219742f8d2e2bb36 frame00000022 +f30ed1d7cf83fb7ae216ca592f98b9d2 frame00000023 +c6c6be8e088a5466e45b1e87a2b5db6f frame00000024 +f07ea5ded75fe177ce1d58041228723c frame00000025 +8a712bc2ac9edb1888f4587fbd525404 frame00000026 +d6457db324ef3a5bf560f0b6e9d10f9d frame00000027 +94ab8f4c9c34cf1a096a5fb4b3296e44 frame00000028 +9790048c0bd50794a867dc597440c9ef frame00000029 +8f85d13f19090af2726f4cc18bd02d21 frame00000030 +6ae125808182add9b90feb51008e7402 frame00000031 +432d2ce9573c8891ead572fdf4af47d8 frame00000032 +92818a79f11d885eafc7f1ff8d6d9ca1 frame00000033 +c906f00c747a11215bb9dc5fb275d08a frame00000034 +3916165da0b419ac4daae362445a0e90 frame00000035 +7e87e687939a33d7c9324ec55753990f frame00000036 +894a8638e2cb84d3e6b3a318676bce08 frame00000037 +6dd0348711430675da0df9ddebf3c3bd frame00000038 +eed2327965cf61f628939233ef0f6f8d frame00000039 +4d6c19a9d848a393a9cea0e0d28692ab frame00000040 +de771f472705faf87287f03fb306bcfb frame00000041 +570710686f95de9a010946f910080574 frame00000042 +8c73efafce6440dccb9f71db270a862e frame00000043 +03496f770d3c9f66b07c9c4bd009a893 frame00000044 +47e625a57a662535da4673c3234bc8cf frame00000045 +d5fe875b85e67c8d6a283bac1a831890 frame00000046 +673350bad7619605a5b84f27f2a3a963 frame00000047 +3e5092adad96ec3ddd4d001f6a563bf2 frame00000048 +099275d839cf53e87b5fcb89e00c211f frame00000049 +95c3de337fbf44321431f9f7eb53d32e frame00000050 +a984233053e139f2b4bd8696e659bc06 frame00000051 +a20e63f6d1d95b4eb93868e5bf386715 frame00000052 +19f307a681626e2cdd0f902913c5889b frame00000053 +c61a37e75e2f285e45a5d17ca0035d65 frame00000054 +452bb0866af1e749b789bd076a643b2e frame00000055 +139c47ce9df358c50a850ecd3838558d frame00000056 +200b4c5474df89c7e0c92d70892bd6ea frame00000057 +69a74a90c46702040257f7b6ede3b48b frame00000058 +6cf3364e2d04fd8ed17e01902c1a2b89 frame00000059 +89b7c26bed89787ed06d0bec4cf08058 frame00000060 +6f1aee7e1906d413341553fc2faa763f frame00000061 +98588f6156ddbce0a974b2b4233ba8d0 frame00000062 +3c24f80a2cbccc46b2782ffea8e568ec frame00000063 +73bb8b85b91d8b2057cd10e625ce9897 frame00000064 +f6f76c2839c599ea9d15ed2728796333 frame00000065 +32323e8dc5532a27ffa0767f90475dcf frame00000066 +c340cfd2bc8570068e43bd49a6f8621a frame00000067 +e93d66718dc857eaff3db5e00100f602 frame00000068 +68f72769bee5d66ac277ce4db43dd1d0 frame00000069 +6cf96ed9486617f63891104c880ec3ab frame00000070 +33b32ae1eb221d965ce8836c07d33290 frame00000071 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/tiertex-seq/Gameover.seq.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/tiertex-seq/Gameover.seq.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/tiertex-seq/Gameover.seq.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/tiertex-seq/Gameover.seq.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,21 @@ +a9d609f4632bdb843d52b0609386e5d1 frame00000000 +aa3be0be0f137adc6b9f189f306e163f frame00000001 +3d28ac2fa0c9455274e9106448e53239 frame00000002 +be931deb21f61aae64fa392720bb3e3e frame00000003 +1adc1d5f5f02e06ddfcacd9db476b9b2 frame00000004 +a073272ef23247c28534493cec354f9b frame00000005 +8dbc8b3a00e945678878ea7e7ef9cea2 frame00000006 +4d9bfb9d9e83a1264d3e9bcca7d34859 frame00000007 +65730adf09ffb59cd05be8df4ce29cd5 frame00000008 +ca898874e3e383400a2d843c109be09a frame00000009 +9ebe0eddb259b4a77af6b4cc4ea9ef1c frame00000010 +ef8b6faa84369a7ced2df83800b2837e frame00000011 +a3f1ea45b2735cef50f265c9e1add583 frame00000012 +3a382f2cbfbec2ef8f933e58f70a0d38 frame00000013 +adda47ba174738f7416889b1b91272a4 frame00000014 +e7cc180e8e198ba8264a0d1c3cdc84bd frame00000015 +5076c12559fe4860186d902d094f0873 frame00000016 +19fc5b3b73bf3becaf79de5ed961baf3 frame00000017 +1b93b7a755aab319c9d417bc54d50780 frame00000018 +1b93b7a755aab319c9d417bc54d50780 frame00000019 +1b93b7a755aab319c9d417bc54d50780 frame00000020 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/tmv/pop-partial.tmv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/tmv/pop-partial.tmv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/tmv/pop-partial.tmv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/tmv/pop-partial.tmv.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,110 @@ +e7111de18099692fcdd4725cf411a6be frame00000000 +98d8dd6f207bfb70782d582af9cc4b43 frame00000001 +80a599d1f975d945adc274ef61ba79ae frame00000002 +59138a9780b34553acb39c93dbf313f2 frame00000003 +057c89aeda0cd23d61beb6297990180b frame00000004 +84b7df33d2b3443b495106b9fe1ae839 frame00000005 +fc4de245f3a0f2a55a8ed200d15af665 frame00000006 +f5e079ab1d3b12497da259cd72c637b1 frame00000007 +90393d400146807d0a2c8918e2db56b2 frame00000008 +6927463ebcfa8b7308def96610953a7c frame00000009 +1964a0f4b4f7c34ddf8cf528776f4e3f frame00000010 +fa5aedd135b2e13021befa3ce6934d95 frame00000011 +f95b40ebe5bbe02fc77b78e62910fd68 frame00000012 +ac050a2788e389595c04d9fa025850fb frame00000013 +64ee7cb3b1810beb68878ee7a79ee5c7 frame00000014 +b21ff591164ee035d50337ae1cad93fd frame00000015 +a614a04675d2b0c96d8753c69e6f0d70 frame00000016 +32989c8c7eba806328c2d22288e9a74d frame00000017 +9ac72dd0185e4e2cecc0383922348502 frame00000018 +12ce307b58ccca48dea0f7b8a773de71 frame00000019 +21eeff8ef28b8726ecb262607eff120c frame00000020 +988a87478986500eb9017c38d36e3f88 frame00000021 +ded04820afb1d6ce2558c16de528993d frame00000022 +c7ce0365fb4e6958e58755c8d6e64e88 frame00000023 +da5b6338633d86b8976c964fac37c595 frame00000024 +21f4ef747ba23d046ba7f5fd7134bff9 frame00000025 +2e9b489f218a3c49d28199df203cf90e frame00000026 +dbc18c3e177ab11066f2d92aa5dbe134 frame00000027 +aad0a89b326d23180368faa866c367ba frame00000028 +6cc1f1113df3f8346483c0ad36729bfe frame00000029 +d5ce1bd8791ed1196e3a3b3b317826ef frame00000030 +61636ff213ad5f682b05c4129f2ede19 frame00000031 +dffc8ecac480fe21572b20444c843ff1 frame00000032 +7332654fa2adf2d5f0a7d3b3c1525b07 frame00000033 +880cdabdb7b10e49a0461eadd5bfd237 frame00000034 +729dd9ab5a0f2c91a7084355284688d6 frame00000035 +e9f726aba07ae16631283bf0c0570130 frame00000036 +a0468a48f5bf84b09261d1868eb5864d frame00000037 +e4040778308243f8dd4204508bb88fd2 frame00000038 +78e18e9cc59407a261013615f0ed0ba1 frame00000039 +50eeae24fe196c529d1e7c9910e2cd93 frame00000040 +a05623cedc10009c26c762ea41516375 frame00000041 +184f3401e4fe7fbad0939518390c6943 frame00000042 +fdbea77f7526159fc016411d02e23c59 frame00000043 +0cf0a446e3d0b3e55ec8639735e8667a frame00000044 +9c8b6c4ba25082a3481368ba81ba8c23 frame00000045 +f3267948d0d42cae0bbe009e6a385820 frame00000046 +204fe836ff64ba8b20e20bc17d7186e7 frame00000047 +3867fdc4a3f7cf1a7998562f5f064a83 frame00000048 +eded9376ae412099009b9b8955afab3e frame00000049 +fc22fde759cfd4f729aac60110b85eeb frame00000050 +cb400e5368366e30896824a5f1e8a9e9 frame00000051 +151dad29f25b1872559c065a22787a81 frame00000052 +1141239a3d960b8b133e6b2d457af467 frame00000053 +e3235698f5fdb208f220257955bcf174 frame00000054 +1c14bc02fe27751c5f8792134e49c56a frame00000055 +a30db9504c2dfe4bd864dfa69a2c8043 frame00000056 +e111e101f8e2b025c43da73d974d35d9 frame00000057 +c09a82a70d6c57f1398e3e5c1a5db529 frame00000058 +fa4d0fae96a041c90e45357e6a653164 frame00000059 +73b2e061484aa9485f53e08cae8ab9b8 frame00000060 +da92e3b8ab9fd38ee18e9014306e3881 frame00000061 +184c01b5f47725a8dc7b341e7c9b0bee frame00000062 +a49012026fc7d1a0e0d0a9a4278cac28 frame00000063 +c9045fe1914ea480510cca977066ec28 frame00000064 +650ef29aced7ba46c137131f4437f632 frame00000065 +50652068dbc521544d694be660a48ab7 frame00000066 +3fc888a06597ba7dbad4db12636e6f8d frame00000067 +8d320b86cb3187d9c58c5faae349abdd frame00000068 +3b6cc7a1e96f60e367be471e16d5f704 frame00000069 +facaad5b17ee59cda965627fa9980034 frame00000070 +3634973b81534a7399112dfe6d5163fb frame00000071 +b92905f78892fa9ecc64e91e001c16cd frame00000072 +c3d323e7ce90ba90817dc675a4902d2d frame00000073 +80d5f5d37a16b16c89375c7b7e296cfd frame00000074 +1d16a218ec04ce4a8746ad511cf41911 frame00000075 +ba4daad1240d91344e8d4e504e39c7f0 frame00000076 +041adc8a1d04e2043e1e33ce7089a4eb frame00000077 +99855607c08b1369f2ca514005dce02d frame00000078 +e20b92eaf15896900739a7dade2d26ae frame00000079 +50151e25ba53683cbb632218fef0a202 frame00000080 +63a6888cd138e82bed075d8955cbdaae frame00000081 +770aab0ac54318cd39351222b4d41158 frame00000082 +c57f6bf6c9b6543b67a169ad21b56627 frame00000083 +9e1af5aa9d15eb68b1db6eac95a7d5b6 frame00000084 +8b7e24a8ce9eec9dcd5d1d2bb9aa5267 frame00000085 +a56de87c75cf58902eb3cbf211751be0 frame00000086 +85915bb7ed07ef02ff0cb313bd15c623 frame00000087 +71ee591a13a7ede7a9872d032f3e54c0 frame00000088 +46d8bba1eaada77115d85a933838b19e frame00000089 +3aec0e7dd087cdd557cd43b16448a552 frame00000090 +583ce79081053f1b0969c2bba4162f3c frame00000091 +48d483bc76c5fc8dc21fb203dba464e4 frame00000092 +001ee67b5a4e73ace288a676981957ca frame00000093 +d7b4931b02ed6eb250d6ef8dd908a864 frame00000094 +e7a0128e9fd5b62b92e32b0ec1665ae5 frame00000095 +018f592fd5d23f750c534017899b10da frame00000096 +d137b76d4d66db4addc79c7213100ac3 frame00000097 +8e3b12e0b344c42a82d988c33f2e8d74 frame00000098 +a812c70f388588934cb9edf0e593c46b frame00000099 +e40b99685b13f3d49dad5db926aa9990 frame00000100 +f81cd6a7bd8408acfbff13c8f7d50040 frame00000101 +1d0d696328923f4281cbbb751f9ae698 frame00000102 +4f0a773deff407d2d39eb901cc5b50ca frame00000103 +949d82e037348d90fa8fdc2331facaab frame00000104 +14f497c1c6a733ee107b7aeae1b9e33f frame00000105 +c159357e5f977e33d3018a8e4ca67845 frame00000106 +988733b0141105bffa7a0eeb4eaba5fc frame00000107 +1233b53c5ea728a36e65fb5c5825fa8a frame00000108 +c8dcb4d1e014af915b08abcc1d4770f4 frame00000109 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/tscc/2004-12-17-uebung9-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/tscc/2004-12-17-uebung9-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/tscc/2004-12-17-uebung9-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/tscc/2004-12-17-uebung9-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,156 @@ +d472a0e5d492ebaa29e867faf5c69fc7 frame00000000 +188d0a2e50ec3057d0c68f25a0b6e330 frame00000001 +748608e56db5be256342620b3050a42d frame00000002 +098a99512addac1e49db9955b13283ad frame00000003 +c0477112b3c41fb7c83b10ad5d48b3eb frame00000004 +14581b76124fc4089241f5723ddfdac2 frame00000005 +4c4fd9a5902b71c3d35067d8feeba983 frame00000006 +239ce57550913fb95fec094c319c6704 frame00000007 +239ce57550913fb95fec094c319c6704 frame00000008 +e69d5e6eb4540318a0eeea9287d86a7d frame00000009 +eb6d110305a03766d289e717cff79dac frame00000010 +6cc9494cfb5a371c08720ae4f919fa59 frame00000011 +8324d33b631618cf4526bd9d48c5c92e frame00000012 +8324d33b631618cf4526bd9d48c5c92e frame00000013 +45f53324bcd02e82160c962de4690ad7 frame00000014 +45f53324bcd02e82160c962de4690ad7 frame00000015 +45f53324bcd02e82160c962de4690ad7 frame00000016 +45f53324bcd02e82160c962de4690ad7 frame00000017 +45f53324bcd02e82160c962de4690ad7 frame00000018 +45f53324bcd02e82160c962de4690ad7 frame00000019 +45f53324bcd02e82160c962de4690ad7 frame00000020 +aeea4d6da5f179ed6fd5cf88c72db4e2 frame00000021 +aeea4d6da5f179ed6fd5cf88c72db4e2 frame00000022 +aeea4d6da5f179ed6fd5cf88c72db4e2 frame00000023 +aeea4d6da5f179ed6fd5cf88c72db4e2 frame00000024 +aeea4d6da5f179ed6fd5cf88c72db4e2 frame00000025 +aeea4d6da5f179ed6fd5cf88c72db4e2 frame00000026 +aeea4d6da5f179ed6fd5cf88c72db4e2 frame00000027 +88d18e6de3660ae5eb71269b44c7e57f frame00000028 +88d18e6de3660ae5eb71269b44c7e57f frame00000029 +88d18e6de3660ae5eb71269b44c7e57f frame00000030 +88d18e6de3660ae5eb71269b44c7e57f frame00000031 +88d18e6de3660ae5eb71269b44c7e57f frame00000032 +88d18e6de3660ae5eb71269b44c7e57f frame00000033 +88d18e6de3660ae5eb71269b44c7e57f frame00000034 +26785f32559159fe5f9f4a85569cd128 frame00000035 +26785f32559159fe5f9f4a85569cd128 frame00000036 +26785f32559159fe5f9f4a85569cd128 frame00000037 +26785f32559159fe5f9f4a85569cd128 frame00000038 +26785f32559159fe5f9f4a85569cd128 frame00000039 +26785f32559159fe5f9f4a85569cd128 frame00000040 +26785f32559159fe5f9f4a85569cd128 frame00000041 +da80411ed7103fa5a93a6594ae395178 frame00000042 +da80411ed7103fa5a93a6594ae395178 frame00000043 +da80411ed7103fa5a93a6594ae395178 frame00000044 +da80411ed7103fa5a93a6594ae395178 frame00000045 +da80411ed7103fa5a93a6594ae395178 frame00000046 +da80411ed7103fa5a93a6594ae395178 frame00000047 +da80411ed7103fa5a93a6594ae395178 frame00000048 +8b71debea1bb54a22017077a864835e0 frame00000049 +8b71debea1bb54a22017077a864835e0 frame00000050 +8b71debea1bb54a22017077a864835e0 frame00000051 +8b71debea1bb54a22017077a864835e0 frame00000052 +8b71debea1bb54a22017077a864835e0 frame00000053 +8b71debea1bb54a22017077a864835e0 frame00000054 +8b71debea1bb54a22017077a864835e0 frame00000055 +aa1d6db2d8f3e1869e50cd17d13305de frame00000056 +aa1d6db2d8f3e1869e50cd17d13305de frame00000057 +aa1d6db2d8f3e1869e50cd17d13305de frame00000058 +aa1d6db2d8f3e1869e50cd17d13305de frame00000059 +aa1d6db2d8f3e1869e50cd17d13305de frame00000060 +aa1d6db2d8f3e1869e50cd17d13305de frame00000061 +aa1d6db2d8f3e1869e50cd17d13305de frame00000062 +1bf91bd03e9fb24fd891030449a49cb4 frame00000063 +1bf91bd03e9fb24fd891030449a49cb4 frame00000064 +1bf91bd03e9fb24fd891030449a49cb4 frame00000065 +1bf91bd03e9fb24fd891030449a49cb4 frame00000066 +1bf91bd03e9fb24fd891030449a49cb4 frame00000067 +1bf91bd03e9fb24fd891030449a49cb4 frame00000068 +1bf91bd03e9fb24fd891030449a49cb4 frame00000069 +6531f1109b9cacda774f2eb8494e4a16 frame00000070 +6531f1109b9cacda774f2eb8494e4a16 frame00000071 +6531f1109b9cacda774f2eb8494e4a16 frame00000072 +6531f1109b9cacda774f2eb8494e4a16 frame00000073 +6531f1109b9cacda774f2eb8494e4a16 frame00000074 +6531f1109b9cacda774f2eb8494e4a16 frame00000075 +6531f1109b9cacda774f2eb8494e4a16 frame00000076 +c0b6d296f961df61c4a9aeea287bd7fc frame00000077 +c0b6d296f961df61c4a9aeea287bd7fc frame00000078 +c0b6d296f961df61c4a9aeea287bd7fc frame00000079 +c0b6d296f961df61c4a9aeea287bd7fc frame00000080 +c0b6d296f961df61c4a9aeea287bd7fc frame00000081 +c0b6d296f961df61c4a9aeea287bd7fc frame00000082 +c0b6d296f961df61c4a9aeea287bd7fc frame00000083 +8527a91ac0b60df4fdb7fbc6eb59d221 frame00000084 +8527a91ac0b60df4fdb7fbc6eb59d221 frame00000085 +8527a91ac0b60df4fdb7fbc6eb59d221 frame00000086 +8527a91ac0b60df4fdb7fbc6eb59d221 frame00000087 +8527a91ac0b60df4fdb7fbc6eb59d221 frame00000088 +8527a91ac0b60df4fdb7fbc6eb59d221 frame00000089 +8527a91ac0b60df4fdb7fbc6eb59d221 frame00000090 +1a374edd1b7ce6f13a252ad863d08abd frame00000091 +1a374edd1b7ce6f13a252ad863d08abd frame00000092 +1a374edd1b7ce6f13a252ad863d08abd frame00000093 +1a374edd1b7ce6f13a252ad863d08abd frame00000094 +1a374edd1b7ce6f13a252ad863d08abd frame00000095 +1a374edd1b7ce6f13a252ad863d08abd frame00000096 +1a374edd1b7ce6f13a252ad863d08abd frame00000097 +38c1ff76da94e1ebca4c43aad778facb frame00000098 +38c1ff76da94e1ebca4c43aad778facb frame00000099 +38c1ff76da94e1ebca4c43aad778facb frame00000100 +914898c066d4c0769359821b079ee79a frame00000101 +914898c066d4c0769359821b079ee79a frame00000102 +914898c066d4c0769359821b079ee79a frame00000103 +914898c066d4c0769359821b079ee79a frame00000104 +17eabb32d24af78ea6eeaad88f80a40c frame00000105 +17eabb32d24af78ea6eeaad88f80a40c frame00000106 +17eabb32d24af78ea6eeaad88f80a40c frame00000107 +17eabb32d24af78ea6eeaad88f80a40c frame00000108 +17eabb32d24af78ea6eeaad88f80a40c frame00000109 +17eabb32d24af78ea6eeaad88f80a40c frame00000110 +17eabb32d24af78ea6eeaad88f80a40c frame00000111 +a9cad72e0778d3370250025ce2d4b8e9 frame00000112 +a9cad72e0778d3370250025ce2d4b8e9 frame00000113 +a9cad72e0778d3370250025ce2d4b8e9 frame00000114 +a9cad72e0778d3370250025ce2d4b8e9 frame00000115 +d0c173cf01b96ef677fa7f076c880e1f frame00000116 +d0c173cf01b96ef677fa7f076c880e1f frame00000117 +d0c173cf01b96ef677fa7f076c880e1f frame00000118 +e878316a52a0f575efc2acad9ef43ad3 frame00000119 +e878316a52a0f575efc2acad9ef43ad3 frame00000120 +e878316a52a0f575efc2acad9ef43ad3 frame00000121 +e878316a52a0f575efc2acad9ef43ad3 frame00000122 +e878316a52a0f575efc2acad9ef43ad3 frame00000123 +e878316a52a0f575efc2acad9ef43ad3 frame00000124 +e878316a52a0f575efc2acad9ef43ad3 frame00000125 +b975a3b191acce117cd986d16adc0494 frame00000126 +b975a3b191acce117cd986d16adc0494 frame00000127 +b975a3b191acce117cd986d16adc0494 frame00000128 +b975a3b191acce117cd986d16adc0494 frame00000129 +b975a3b191acce117cd986d16adc0494 frame00000130 +b975a3b191acce117cd986d16adc0494 frame00000131 +b975a3b191acce117cd986d16adc0494 frame00000132 +6e3722f4c2272ad268567464eadcdb5a frame00000133 +6e3722f4c2272ad268567464eadcdb5a frame00000134 +6e3722f4c2272ad268567464eadcdb5a frame00000135 +6e3722f4c2272ad268567464eadcdb5a frame00000136 +6e3722f4c2272ad268567464eadcdb5a frame00000137 +6e3722f4c2272ad268567464eadcdb5a frame00000138 +6e3722f4c2272ad268567464eadcdb5a frame00000139 +3be6e084ca308be2f936c5d68bbfb404 frame00000140 +3be6e084ca308be2f936c5d68bbfb404 frame00000141 +3be6e084ca308be2f936c5d68bbfb404 frame00000142 +3be6e084ca308be2f936c5d68bbfb404 frame00000143 +3be6e084ca308be2f936c5d68bbfb404 frame00000144 +3be6e084ca308be2f936c5d68bbfb404 frame00000145 +3be6e084ca308be2f936c5d68bbfb404 frame00000146 +da364b9abac372e2a067d9e739412b1d frame00000147 +da364b9abac372e2a067d9e739412b1d frame00000148 +da364b9abac372e2a067d9e739412b1d frame00000149 +da364b9abac372e2a067d9e739412b1d frame00000150 +da364b9abac372e2a067d9e739412b1d frame00000151 +da364b9abac372e2a067d9e739412b1d frame00000152 +da364b9abac372e2a067d9e739412b1d frame00000153 +e38ba666fc33027c278f8ee820d2db0e frame00000154 +e38ba666fc33027c278f8ee820d2db0e frame00000155 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/tscc/oneminute.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/tscc/oneminute.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/tscc/oneminute.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/tscc/oneminute.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,849 @@ +d99708d934a5b44bbde8c796d295a64a frame00000000 +d99708d934a5b44bbde8c796d295a64a frame00000001 +d99708d934a5b44bbde8c796d295a64a frame00000002 +6d8e905e695da9d9b08fece35168a49e frame00000003 +6d8e905e695da9d9b08fece35168a49e frame00000004 +6d8e905e695da9d9b08fece35168a49e frame00000005 +6d8e905e695da9d9b08fece35168a49e frame00000006 +6d8e905e695da9d9b08fece35168a49e frame00000007 +6d8e905e695da9d9b08fece35168a49e frame00000008 +6d8e905e695da9d9b08fece35168a49e frame00000009 +6d8e905e695da9d9b08fece35168a49e frame00000010 +6d8e905e695da9d9b08fece35168a49e frame00000011 +6d8e905e695da9d9b08fece35168a49e frame00000012 +6d8e905e695da9d9b08fece35168a49e frame00000013 +6d8e905e695da9d9b08fece35168a49e frame00000014 +6d8e905e695da9d9b08fece35168a49e frame00000015 +6d8e905e695da9d9b08fece35168a49e frame00000016 +6d8e905e695da9d9b08fece35168a49e frame00000017 +6d8e905e695da9d9b08fece35168a49e frame00000018 +6d8e905e695da9d9b08fece35168a49e frame00000019 +6d8e905e695da9d9b08fece35168a49e frame00000020 +d080f485047f04edf694e77e88dc114e frame00000021 +d080f485047f04edf694e77e88dc114e frame00000022 +d080f485047f04edf694e77e88dc114e frame00000023 +2054b56682c2021ef0e505b6e9d0d906 frame00000024 +2054b56682c2021ef0e505b6e9d0d906 frame00000025 +2054b56682c2021ef0e505b6e9d0d906 frame00000026 +2054b56682c2021ef0e505b6e9d0d906 frame00000027 +2054b56682c2021ef0e505b6e9d0d906 frame00000028 +2054b56682c2021ef0e505b6e9d0d906 frame00000029 +448e54cc7f07819167e271e1d7a7e638 frame00000030 +448e54cc7f07819167e271e1d7a7e638 frame00000031 +448e54cc7f07819167e271e1d7a7e638 frame00000032 +9028a743e53b850c0663b284c10b1f47 frame00000033 +9028a743e53b850c0663b284c10b1f47 frame00000034 +9028a743e53b850c0663b284c10b1f47 frame00000035 +f3f8527c6879186c4766dd915f55d927 frame00000036 +f3f8527c6879186c4766dd915f55d927 frame00000037 +f3f8527c6879186c4766dd915f55d927 frame00000038 +6103b00bdfadc84c956ec5b521871bb0 frame00000039 +6103b00bdfadc84c956ec5b521871bb0 frame00000040 +6103b00bdfadc84c956ec5b521871bb0 frame00000041 +9230a7d86a1d5bf58ce9758178d58e7f frame00000042 +3a751a9c37de53b6879b1b3b408c8318 frame00000043 +81c0f0435f5df380e2bfd4be80f133d7 frame00000044 +8185e2b98c8e2bc1b3619237f7cdbd42 frame00000045 +8185e2b98c8e2bc1b3619237f7cdbd42 frame00000046 +06a53bfb55c4095c913dddbb284d68c3 frame00000047 +06a53bfb55c4095c913dddbb284d68c3 frame00000048 +06a53bfb55c4095c913dddbb284d68c3 frame00000049 +06a53bfb55c4095c913dddbb284d68c3 frame00000050 +06a53bfb55c4095c913dddbb284d68c3 frame00000051 +06a53bfb55c4095c913dddbb284d68c3 frame00000052 +06a53bfb55c4095c913dddbb284d68c3 frame00000053 +06a53bfb55c4095c913dddbb284d68c3 frame00000054 +06a53bfb55c4095c913dddbb284d68c3 frame00000055 +06a53bfb55c4095c913dddbb284d68c3 frame00000056 +9ce43b0620fa98ea5560251f5d2b9cd4 frame00000057 +9ce43b0620fa98ea5560251f5d2b9cd4 frame00000058 +9ce43b0620fa98ea5560251f5d2b9cd4 frame00000059 +589276855811e7b19b1e4f1ebd297377 frame00000060 +589276855811e7b19b1e4f1ebd297377 frame00000061 +fdb49fa1005def31abca897d8e262753 frame00000062 +11622fbe74003d30a7ed3a0fcce293b5 frame00000063 +11622fbe74003d30a7ed3a0fcce293b5 frame00000064 +11622fbe74003d30a7ed3a0fcce293b5 frame00000065 +39ef775e70be7b92605b8f6d0924d268 frame00000066 +39ef775e70be7b92605b8f6d0924d268 frame00000067 +39ef775e70be7b92605b8f6d0924d268 frame00000068 +67ed292360f67acdf4e6141b638bc80c frame00000069 +67ed292360f67acdf4e6141b638bc80c frame00000070 +67ed292360f67acdf4e6141b638bc80c frame00000071 +790f56419414c41bf3c6373f2e25fb67 frame00000072 +790f56419414c41bf3c6373f2e25fb67 frame00000073 +af9a4a0361e84c21c20975ec7b12a25b frame00000074 +af9a4a0361e84c21c20975ec7b12a25b frame00000075 +af9a4a0361e84c21c20975ec7b12a25b frame00000076 +af9a4a0361e84c21c20975ec7b12a25b frame00000077 +96da53a10d5511b243034f9c31304aa0 frame00000078 +96da53a10d5511b243034f9c31304aa0 frame00000079 +5ee190ec29214f554da1d03b58934349 frame00000080 +cc75e4c1e832b1375e735e9593fbd178 frame00000081 +cc75e4c1e832b1375e735e9593fbd178 frame00000082 +2f99adc5a9fc369b11006d13c7940128 frame00000083 +6f4d6f52140927e937b5662656c8fc02 frame00000084 +9fb69c794af6f0b9c77bed3816789863 frame00000085 +8481dd8fdc171a07b0fcd1fd10a7d5c7 frame00000086 +382128da194ec3f663917542c9a52b67 frame00000087 +951136714a44283f1b47d46fca0066dc frame00000088 +84e7e90a9a2fc344f29219c0aacc428d frame00000089 +16149993dab07ec390aebdd7fe4bd887 frame00000090 +16149993dab07ec390aebdd7fe4bd887 frame00000091 +16149993dab07ec390aebdd7fe4bd887 frame00000092 +c60aca0573096118117a937f357b5e46 frame00000093 +ecb880a6c99ee631087295fa7c717a96 frame00000094 +ecb880a6c99ee631087295fa7c717a96 frame00000095 +ecb880a6c99ee631087295fa7c717a96 frame00000096 +ecb880a6c99ee631087295fa7c717a96 frame00000097 +ecb880a6c99ee631087295fa7c717a96 frame00000098 +f66e47ffe85286f43a9564e8b30937d7 frame00000099 +f66e47ffe85286f43a9564e8b30937d7 frame00000100 +2546d9476550992c8056c8e75b2df981 frame00000101 +2546d9476550992c8056c8e75b2df981 frame00000102 +2546d9476550992c8056c8e75b2df981 frame00000103 +2546d9476550992c8056c8e75b2df981 frame00000104 +2546d9476550992c8056c8e75b2df981 frame00000105 +2546d9476550992c8056c8e75b2df981 frame00000106 +2546d9476550992c8056c8e75b2df981 frame00000107 +206495a8d2585812129711ea70436659 frame00000108 +206495a8d2585812129711ea70436659 frame00000109 +206495a8d2585812129711ea70436659 frame00000110 +5f2b6cbd1c12541327dabc01f46567f5 frame00000111 +5f2b6cbd1c12541327dabc01f46567f5 frame00000112 +5f2b6cbd1c12541327dabc01f46567f5 frame00000113 +0434c5093987a6da4fb4b269ed3c3f83 frame00000114 +0434c5093987a6da4fb4b269ed3c3f83 frame00000115 +0434c5093987a6da4fb4b269ed3c3f83 frame00000116 +bf34ba6a875b20bf6627b0f3fb2cb8a4 frame00000117 +bf34ba6a875b20bf6627b0f3fb2cb8a4 frame00000118 +bf34ba6a875b20bf6627b0f3fb2cb8a4 frame00000119 +23c19de0001e44f77b8368f38dd418fe frame00000120 +352cf18ea0f47a326652eb84ede30c70 frame00000121 +352cf18ea0f47a326652eb84ede30c70 frame00000122 +de3804d15656afd2347892b0a3496113 frame00000123 +de3804d15656afd2347892b0a3496113 frame00000124 +de3804d15656afd2347892b0a3496113 frame00000125 +96df4d8ea5a6c84fd6c219efbf3bfdc6 frame00000126 +96df4d8ea5a6c84fd6c219efbf3bfdc6 frame00000127 +96df4d8ea5a6c84fd6c219efbf3bfdc6 frame00000128 +fc6243ba899d74a24cd4b79033a0f5f4 frame00000129 +fc6243ba899d74a24cd4b79033a0f5f4 frame00000130 +fc6243ba899d74a24cd4b79033a0f5f4 frame00000131 +32b05842fcf2d8973d4580fef23722d6 frame00000132 +967c207144ba3e2c2fb6e1d9c7724a1f frame00000133 +967c207144ba3e2c2fb6e1d9c7724a1f frame00000134 +63025f6dd96ca91f673dfcaa0ea833c1 frame00000135 +63025f6dd96ca91f673dfcaa0ea833c1 frame00000136 +63025f6dd96ca91f673dfcaa0ea833c1 frame00000137 +63025f6dd96ca91f673dfcaa0ea833c1 frame00000138 +63025f6dd96ca91f673dfcaa0ea833c1 frame00000139 +63025f6dd96ca91f673dfcaa0ea833c1 frame00000140 +9b4707dc3e0c55ab25f0df4da28af832 frame00000141 +9b4707dc3e0c55ab25f0df4da28af832 frame00000142 +543c78f3a8a2e7406f99bd2c449fe372 frame00000143 +543c78f3a8a2e7406f99bd2c449fe372 frame00000144 +543c78f3a8a2e7406f99bd2c449fe372 frame00000145 +543c78f3a8a2e7406f99bd2c449fe372 frame00000146 +543c78f3a8a2e7406f99bd2c449fe372 frame00000147 +543c78f3a8a2e7406f99bd2c449fe372 frame00000148 +543c78f3a8a2e7406f99bd2c449fe372 frame00000149 +6dedf37bfa937a2a94a763fb3e954dcc frame00000150 +0c245b931b486981f4f32d5fe14c125a frame00000151 +0c245b931b486981f4f32d5fe14c125a frame00000152 +aed873f1a976e1c3811b1627a713d715 frame00000153 +d7962352e4b562be49126150ab6eaf9e frame00000154 +5a65ea47d9cfcda37d70d7f42417140a frame00000155 +c61fc2f936e281d0a1cd758b340d0f45 frame00000156 +c61fc2f936e281d0a1cd758b340d0f45 frame00000157 +c61fc2f936e281d0a1cd758b340d0f45 frame00000158 +10f067904faf40c1acbc10a6b0c29a31 frame00000159 +49542ef411561509a6cfaa185887a824 frame00000160 +5be3527348580bded5113a23d20ff0f3 frame00000161 +893622da8afc38c8639d9b11f5173954 frame00000162 +893622da8afc38c8639d9b11f5173954 frame00000163 +893622da8afc38c8639d9b11f5173954 frame00000164 +893622da8afc38c8639d9b11f5173954 frame00000165 +893622da8afc38c8639d9b11f5173954 frame00000166 +893622da8afc38c8639d9b11f5173954 frame00000167 +893622da8afc38c8639d9b11f5173954 frame00000168 +893622da8afc38c8639d9b11f5173954 frame00000169 +893622da8afc38c8639d9b11f5173954 frame00000170 +3b2dea8015deee6e51dd8cef2b29c90f frame00000171 +3b2dea8015deee6e51dd8cef2b29c90f frame00000172 +ff442649b08c428267e57e143a7704e7 frame00000173 +6d73884d2e7c6a12412ec79a9e301ad6 frame00000174 +6d73884d2e7c6a12412ec79a9e301ad6 frame00000175 +6d73884d2e7c6a12412ec79a9e301ad6 frame00000176 +f5072d6ce3db90f149dc2230a90c81dc frame00000177 +f5072d6ce3db90f149dc2230a90c81dc frame00000178 +f5072d6ce3db90f149dc2230a90c81dc frame00000179 +e7d032b216257eca7e6b582c3e039631 frame00000180 +e7d032b216257eca7e6b582c3e039631 frame00000181 +28d899759c4cdc8bb429f0519c63ac36 frame00000182 +6ac938f53de37a7d587b5f91e89a6c91 frame00000183 +abcd5d21997398c36dbc444415ed26e8 frame00000184 +abcd5d21997398c36dbc444415ed26e8 frame00000185 +6d4d25d9664e6f0c87a3c05842abc026 frame00000186 +97e6ead991d6c853f540e57b2a2849e6 frame00000187 +97e6ead991d6c853f540e57b2a2849e6 frame00000188 +5717a87348eeb2e94a9885008e10931e frame00000189 +8ff09270c3d35e0a7ebd8b343ede6fb6 frame00000190 +8ff09270c3d35e0a7ebd8b343ede6fb6 frame00000191 +d308dfa4d54adaf5024509d8d0d833bf frame00000192 +d308dfa4d54adaf5024509d8d0d833bf frame00000193 +d308dfa4d54adaf5024509d8d0d833bf frame00000194 +42188baef5524928b3d9fa0e05c6cd9d frame00000195 +42188baef5524928b3d9fa0e05c6cd9d frame00000196 +42188baef5524928b3d9fa0e05c6cd9d frame00000197 +f3ed76936905cc6a647b22d9f1b65a0c frame00000198 +f3ed76936905cc6a647b22d9f1b65a0c frame00000199 +94837a4398aa6371bd609c8f3230f630 frame00000200 +fb8bfa9211633b82da99aed27538fc12 frame00000201 +eeda81c5d7c0c0657784509b02d7a859 frame00000202 +1724f39f0df17a14049f8060802c5261 frame00000203 +0fb23a3945714be48314670d357094e7 frame00000204 +28ec1aa39c37e720125c77bb12165310 frame00000205 +28ec1aa39c37e720125c77bb12165310 frame00000206 +356f1c21926c013cec4f1a377fd56ee5 frame00000207 +356f1c21926c013cec4f1a377fd56ee5 frame00000208 +788c8b826e79f702b45bf5fa3e09cf7e frame00000209 +97a17c26b55f9772c109ef3a300ac5e0 frame00000210 +4eb4b1645c120a7e31e33eaff5a73acc frame00000211 +4eb4b1645c120a7e31e33eaff5a73acc frame00000212 +617e7de0edcd548c64dbeaebb18e25e2 frame00000213 +617e7de0edcd548c64dbeaebb18e25e2 frame00000214 +617e7de0edcd548c64dbeaebb18e25e2 frame00000215 +b21c4aa8c6c59bfde1d21983a5498816 frame00000216 +b21c4aa8c6c59bfde1d21983a5498816 frame00000217 +b21c4aa8c6c59bfde1d21983a5498816 frame00000218 +b21c4aa8c6c59bfde1d21983a5498816 frame00000219 +b21c4aa8c6c59bfde1d21983a5498816 frame00000220 +b21c4aa8c6c59bfde1d21983a5498816 frame00000221 +b21c4aa8c6c59bfde1d21983a5498816 frame00000222 +b21c4aa8c6c59bfde1d21983a5498816 frame00000223 +b21c4aa8c6c59bfde1d21983a5498816 frame00000224 +b21c4aa8c6c59bfde1d21983a5498816 frame00000225 +b21c4aa8c6c59bfde1d21983a5498816 frame00000226 +b21c4aa8c6c59bfde1d21983a5498816 frame00000227 +b21c4aa8c6c59bfde1d21983a5498816 frame00000228 +b21c4aa8c6c59bfde1d21983a5498816 frame00000229 +b21c4aa8c6c59bfde1d21983a5498816 frame00000230 +b21c4aa8c6c59bfde1d21983a5498816 frame00000231 +b21c4aa8c6c59bfde1d21983a5498816 frame00000232 +b21c4aa8c6c59bfde1d21983a5498816 frame00000233 +6aac74d538c0ebda9decb229d6fff44c frame00000234 +6aac74d538c0ebda9decb229d6fff44c frame00000235 +6aac74d538c0ebda9decb229d6fff44c frame00000236 +f3c238c75635847ac5fb71901a42d3ba frame00000237 +63bf193d0a42fec903ff7ee0bccc1f5c frame00000238 +4510da3b9c747038dd9e1604060d7078 frame00000239 +575a981ffffc99d33ba09373481ed73f frame00000240 +575a981ffffc99d33ba09373481ed73f frame00000241 +575a981ffffc99d33ba09373481ed73f frame00000242 +d6c7fb6ee79db2eb31719e0cafcd3a61 frame00000243 +d6c7fb6ee79db2eb31719e0cafcd3a61 frame00000244 +51d6bb1635509f8a05835fdef7f383b6 frame00000245 +ffaabb09b9c0fecc14bd532809f34da0 frame00000246 +ffaabb09b9c0fecc14bd532809f34da0 frame00000247 +1e757075319314d758ae79512d7c7377 frame00000248 +34a16a61f69f4de641e5499ea0563d13 frame00000249 +34a16a61f69f4de641e5499ea0563d13 frame00000250 +34a16a61f69f4de641e5499ea0563d13 frame00000251 +b8b878f087cda9ca3ef20ddd26ac83ec frame00000252 +b8b878f087cda9ca3ef20ddd26ac83ec frame00000253 +b8b878f087cda9ca3ef20ddd26ac83ec frame00000254 +3e0c1cd23b0e30aa857977919bb1e16d frame00000255 +a1c67d31535cf25a26f59fb6f5e4d520 frame00000256 +e9eb73c30e224913ba40320527c943f3 frame00000257 +b1d03761d2ee8d68fda7e95fe59b060d frame00000258 +72f4fc9c1a500b696081cbf3c505bdb3 frame00000259 +5f46ba76338f89027fde84748619849d frame00000260 +ed4b01fbe956cb0c386e135383ebd74e frame00000261 +e21a2d848af17b5bf12d2c4b88207299 frame00000262 +fe88e1ba4c3fe4b47e25bcfec5cf726b frame00000263 +6e1d72d00ed6c730b7adabcb2d8242f7 frame00000264 +6e1d72d00ed6c730b7adabcb2d8242f7 frame00000265 +6e1d72d00ed6c730b7adabcb2d8242f7 frame00000266 +cc5a939e4f4b8a9cdd9f1e802956a79e frame00000267 +cc5a939e4f4b8a9cdd9f1e802956a79e frame00000268 +8f136af89d5d5841b789e581783ca9f0 frame00000269 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000270 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000271 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000272 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000273 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000274 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000275 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000276 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000277 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000278 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000279 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000280 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000281 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000282 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000283 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000284 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000285 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000286 +6ef7c4c06549273b20c2d3b28ead6d3c frame00000287 +828eff21afd92b0a9e9316b4d98abc0c frame00000288 +828eff21afd92b0a9e9316b4d98abc0c frame00000289 +828eff21afd92b0a9e9316b4d98abc0c frame00000290 +c8886182e1011237f5ab21ab9d684378 frame00000291 +13a2ef13e1bab80647cfc3e26a5d18ad frame00000292 +13a2ef13e1bab80647cfc3e26a5d18ad frame00000293 +47b9b2540c4308a443ee392bb24e0e25 frame00000294 +47b9b2540c4308a443ee392bb24e0e25 frame00000295 +e7d892afe8601c10cf64562efb362b63 frame00000296 +d9dddcc8431d241831c08670ec699243 frame00000297 +712d7436574f0c79a6361d0b00dd3ab0 frame00000298 +8cc646cafcf35f473ba1735354bfbd7a frame00000299 +e975a2999c22399688e9800511f678b1 frame00000300 +f4488fe3db249befb426149ee5774db5 frame00000301 +f4488fe3db249befb426149ee5774db5 frame00000302 +cdeddc41f4a86195fedae36102f0bfa3 frame00000303 +cdeddc41f4a86195fedae36102f0bfa3 frame00000304 +2a859e81f56ef21660977a81dc766673 frame00000305 +f0f3226bea835a958455fa08e3d1ce1e frame00000306 +f0f3226bea835a958455fa08e3d1ce1e frame00000307 +e348b1d822c0cb3b0044bbe94c143a41 frame00000308 +8cc291bd35ab09b721a00f81a2ee40f2 frame00000309 +8cc291bd35ab09b721a00f81a2ee40f2 frame00000310 +8cc291bd35ab09b721a00f81a2ee40f2 frame00000311 +a41e54cea2d1660cfa8b50557072c75c frame00000312 +a41e54cea2d1660cfa8b50557072c75c frame00000313 +a41e54cea2d1660cfa8b50557072c75c frame00000314 +1c289ec1a2690df8507fa50d5bb45909 frame00000315 +1c289ec1a2690df8507fa50d5bb45909 frame00000316 +1c289ec1a2690df8507fa50d5bb45909 frame00000317 +7cb7896dfc60a10ca9d52d245f99da42 frame00000318 +7cb7896dfc60a10ca9d52d245f99da42 frame00000319 +6865815081ea73534f70173d5b12c0c2 frame00000320 +79ead70aa3cb0633fa5b4c92ed287a42 frame00000321 +79ead70aa3cb0633fa5b4c92ed287a42 frame00000322 +2e02713b808cb49d287b917504dd4e7d frame00000323 +eff7ae928958dd3ab343ee1b44235ec8 frame00000324 +eff7ae928958dd3ab343ee1b44235ec8 frame00000325 +eff7ae928958dd3ab343ee1b44235ec8 frame00000326 +e9b391e28625a576eebfb16530d2ac6c frame00000327 +e9b391e28625a576eebfb16530d2ac6c frame00000328 +e9b391e28625a576eebfb16530d2ac6c frame00000329 +a7f9232cf3e36dadc9c6d0ebc7c2c161 frame00000330 +a7f9232cf3e36dadc9c6d0ebc7c2c161 frame00000331 +a7f9232cf3e36dadc9c6d0ebc7c2c161 frame00000332 +ea34979ef7e85cd7944d0708d28be88d frame00000333 +ea34979ef7e85cd7944d0708d28be88d frame00000334 +ea34979ef7e85cd7944d0708d28be88d frame00000335 +af2f39f7983035b1d46da779377b1e94 frame00000336 +213e8dfad03b618ae1c603aee98bd8c0 frame00000337 +213e8dfad03b618ae1c603aee98bd8c0 frame00000338 +67b43fee68b2e94f31d85aeca4d12bc4 frame00000339 +1f16c1e7d69a620f64e9fb657f1f2474 frame00000340 +1f16c1e7d69a620f64e9fb657f1f2474 frame00000341 +89479a457054b8301207714615108065 frame00000342 +89479a457054b8301207714615108065 frame00000343 +89479a457054b8301207714615108065 frame00000344 +b5c30ede52c22c8daae482e5f02b978d frame00000345 +b5c30ede52c22c8daae482e5f02b978d frame00000346 +b5c30ede52c22c8daae482e5f02b978d frame00000347 +8cf1335646b68a5eaeb4e672da07336a frame00000348 +8cf1335646b68a5eaeb4e672da07336a frame00000349 +8cf1335646b68a5eaeb4e672da07336a frame00000350 +d01a69c43757bd156fb8b0e021c3547a frame00000351 +e766210882e6f3127498d8a4ef37b56e frame00000352 +e766210882e6f3127498d8a4ef37b56e frame00000353 +588a63286ca19521c62a96dba80290d5 frame00000354 +588a63286ca19521c62a96dba80290d5 frame00000355 +588a63286ca19521c62a96dba80290d5 frame00000356 +60d7a434cd6fe2647d2e70faa7bc2e78 frame00000357 +38cf5adfff288fb81cebe532b7b4ee14 frame00000358 +38cf5adfff288fb81cebe532b7b4ee14 frame00000359 +d77388e1e44d8d655f43cdf4b4038e4c frame00000360 +d77388e1e44d8d655f43cdf4b4038e4c frame00000361 +d77388e1e44d8d655f43cdf4b4038e4c frame00000362 +b1ba7a6f1649692c04170941204da683 frame00000363 +b1ba7a6f1649692c04170941204da683 frame00000364 +b1ba7a6f1649692c04170941204da683 frame00000365 +3f665eecfb4dc2f8783a3a7cfa4454f8 frame00000366 +3f665eecfb4dc2f8783a3a7cfa4454f8 frame00000367 +3f665eecfb4dc2f8783a3a7cfa4454f8 frame00000368 +0b18d29acc9fde6f19f90f05995f05c6 frame00000369 +0b18d29acc9fde6f19f90f05995f05c6 frame00000370 +0b18d29acc9fde6f19f90f05995f05c6 frame00000371 +de4cbead3ff0eff9319259d1c4520688 frame00000372 +de4cbead3ff0eff9319259d1c4520688 frame00000373 +6255cefb22bc4d50e96f641870c71ce7 frame00000374 +7265abaaf95122c149c2c89281a14139 frame00000375 +7265abaaf95122c149c2c89281a14139 frame00000376 +7265abaaf95122c149c2c89281a14139 frame00000377 +1d53e7114686933c6698614549389ab1 frame00000378 +1d53e7114686933c6698614549389ab1 frame00000379 +62980444357aa22611e665148c6be2ac frame00000380 +666c43935fd99a44e36ee4e7f5e3d397 frame00000381 +666c43935fd99a44e36ee4e7f5e3d397 frame00000382 +666c43935fd99a44e36ee4e7f5e3d397 frame00000383 +46cfb3ab049d0db92e3a159227d5431c frame00000384 +46cfb3ab049d0db92e3a159227d5431c frame00000385 +46cfb3ab049d0db92e3a159227d5431c frame00000386 +2ceca62bbe8467bdef66212255510342 frame00000387 +75eb18a87a14adab657cd9f877e7d9d8 frame00000388 +75eb18a87a14adab657cd9f877e7d9d8 frame00000389 +7712b39e07377e2329af67175176b0ed frame00000390 +7712b39e07377e2329af67175176b0ed frame00000391 +7712b39e07377e2329af67175176b0ed frame00000392 +857bafd5497ef71d0cf7da50643d4da4 frame00000393 +857bafd5497ef71d0cf7da50643d4da4 frame00000394 +857bafd5497ef71d0cf7da50643d4da4 frame00000395 +8397813fbd1276283170b0583c835d13 frame00000396 +8397813fbd1276283170b0583c835d13 frame00000397 +8397813fbd1276283170b0583c835d13 frame00000398 +13435830e6f1035e5753da4a4895724d frame00000399 +13435830e6f1035e5753da4a4895724d frame00000400 +b612c14f2f3fcd56931b28aca096cc61 frame00000401 +b612c14f2f3fcd56931b28aca096cc61 frame00000402 +b612c14f2f3fcd56931b28aca096cc61 frame00000403 +b612c14f2f3fcd56931b28aca096cc61 frame00000404 +51bea714cb822f55e9f020da005889a1 frame00000405 +51bea714cb822f55e9f020da005889a1 frame00000406 +51bea714cb822f55e9f020da005889a1 frame00000407 +b4b039521c7e485b8fd9825d85e38198 frame00000408 +b4b039521c7e485b8fd9825d85e38198 frame00000409 +b4b039521c7e485b8fd9825d85e38198 frame00000410 +e3a2388b6297f882bd26edc1d730856c frame00000411 +e3a2388b6297f882bd26edc1d730856c frame00000412 +e3a2388b6297f882bd26edc1d730856c frame00000413 +f4e608c52036cc6449080eb8e169b01c frame00000414 +f4e608c52036cc6449080eb8e169b01c frame00000415 +f4e608c52036cc6449080eb8e169b01c frame00000416 +f4e608c52036cc6449080eb8e169b01c frame00000417 +f4e608c52036cc6449080eb8e169b01c frame00000418 +f4e608c52036cc6449080eb8e169b01c frame00000419 +4d807ea74a9a1fe3abcf94ff093f6b8e frame00000420 +1d1f1a131c4524bbe0a8e45443e2be52 frame00000421 +1d1f1a131c4524bbe0a8e45443e2be52 frame00000422 +ac8a55936ac401eb968558085c68972f frame00000423 +ac8a55936ac401eb968558085c68972f frame00000424 +ac8a55936ac401eb968558085c68972f frame00000425 +13435830e6f1035e5753da4a4895724d frame00000426 +13435830e6f1035e5753da4a4895724d frame00000427 +b612c14f2f3fcd56931b28aca096cc61 frame00000428 +b612c14f2f3fcd56931b28aca096cc61 frame00000429 +b612c14f2f3fcd56931b28aca096cc61 frame00000430 +b612c14f2f3fcd56931b28aca096cc61 frame00000431 +51bea714cb822f55e9f020da005889a1 frame00000432 +51bea714cb822f55e9f020da005889a1 frame00000433 +51bea714cb822f55e9f020da005889a1 frame00000434 +51bea714cb822f55e9f020da005889a1 frame00000435 +51bea714cb822f55e9f020da005889a1 frame00000436 +51bea714cb822f55e9f020da005889a1 frame00000437 +15412c5c2d27c8129c4057ae5f9fde75 frame00000438 +15412c5c2d27c8129c4057ae5f9fde75 frame00000439 +15412c5c2d27c8129c4057ae5f9fde75 frame00000440 +ac5335dd70ec70574565aaa42357754d frame00000441 +ac5335dd70ec70574565aaa42357754d frame00000442 +70705148142af80234c3674b0cab9e4f frame00000443 +f8ee23bc476db7cfb384fa577a9e030f frame00000444 +f8ee23bc476db7cfb384fa577a9e030f frame00000445 +f8ee23bc476db7cfb384fa577a9e030f frame00000446 +f2f5a850afb6336ef06b50d93e04aaa2 frame00000447 +f2f5a850afb6336ef06b50d93e04aaa2 frame00000448 +71bc97589521f7e445cae3a7cc8e5e95 frame00000449 +6da3bbc3e8b6bab9c272ea64e8527001 frame00000450 +6da3bbc3e8b6bab9c272ea64e8527001 frame00000451 +6da3bbc3e8b6bab9c272ea64e8527001 frame00000452 +afddf2629380d8e269a8fbb4c4a14ecc frame00000453 +d5d4f6faad98c4689c3a55dfcc697567 frame00000454 +d5d4f6faad98c4689c3a55dfcc697567 frame00000455 +47aec5d1e164571060e550bb840f5b12 frame00000456 +47aec5d1e164571060e550bb840f5b12 frame00000457 +47aec5d1e164571060e550bb840f5b12 frame00000458 +45c6197cfb21ae747ab6c3bc2993b8c5 frame00000459 +bfeb037829b269f9bab3cabd48eacf26 frame00000460 +bfeb037829b269f9bab3cabd48eacf26 frame00000461 +141058233e4b628629c7b7de80a30c8d frame00000462 +679f0a8902aa3953b6be4a2a911ea0fd frame00000463 +679f0a8902aa3953b6be4a2a911ea0fd frame00000464 +a640c2031554e442efe30b70aff21bf3 frame00000465 +a640c2031554e442efe30b70aff21bf3 frame00000466 +1e3b2c58c62910a1b78dab05602bc1dc frame00000467 +d70d7d50713885564c2df52a8c869515 frame00000468 +d70d7d50713885564c2df52a8c869515 frame00000469 +d70d7d50713885564c2df52a8c869515 frame00000470 +5a60359b617cb299570aa24bc48b4e3c frame00000471 +5a60359b617cb299570aa24bc48b4e3c frame00000472 +5a60359b617cb299570aa24bc48b4e3c frame00000473 +a5dd04eac796337f304be3ede94d6c5b frame00000474 +46a75645e03f02490f6b915db8d5a022 frame00000475 +46a75645e03f02490f6b915db8d5a022 frame00000476 +f3db477694b367647841d9d6db71b64b frame00000477 +5b8d62e585d04e501fa99705b04d7143 frame00000478 +5b8d62e585d04e501fa99705b04d7143 frame00000479 +1723df4484efb0f3dc1a1a29aab15f94 frame00000480 +1723df4484efb0f3dc1a1a29aab15f94 frame00000481 +1723df4484efb0f3dc1a1a29aab15f94 frame00000482 +6315244bb9537110ac6c157ba383fcb0 frame00000483 +6315244bb9537110ac6c157ba383fcb0 frame00000484 +6315244bb9537110ac6c157ba383fcb0 frame00000485 +26d0e00a42a4cb4abfb1067b7d8305e6 frame00000486 +26d0e00a42a4cb4abfb1067b7d8305e6 frame00000487 +26d0e00a42a4cb4abfb1067b7d8305e6 frame00000488 +bcd3ad42043d50e36f6a63932dc0b303 frame00000489 +aca1129712bdad728386e73494a55a03 frame00000490 +f5ae9c8fec2d25346738d6f6b1982efd frame00000491 +3224e655e7e6472ac4d46ab666e5e178 frame00000492 +3224e655e7e6472ac4d46ab666e5e178 frame00000493 +bd67e4deb214adc36177b83db07e13b0 frame00000494 +5933b2f56202d4450a278e60081601c9 frame00000495 +5933b2f56202d4450a278e60081601c9 frame00000496 +5933b2f56202d4450a278e60081601c9 frame00000497 +5933b2f56202d4450a278e60081601c9 frame00000498 +5933b2f56202d4450a278e60081601c9 frame00000499 +5933b2f56202d4450a278e60081601c9 frame00000500 +5933b2f56202d4450a278e60081601c9 frame00000501 +5933b2f56202d4450a278e60081601c9 frame00000502 +5933b2f56202d4450a278e60081601c9 frame00000503 +07220de12f68b5790a99c525566e7788 frame00000504 +07220de12f68b5790a99c525566e7788 frame00000505 +07220de12f68b5790a99c525566e7788 frame00000506 +63a267617d057d31a0f64e47d7da17dd frame00000507 +63a267617d057d31a0f64e47d7da17dd frame00000508 +63a267617d057d31a0f64e47d7da17dd frame00000509 +88dfd3a2d1ca1729de11b0f77e168e1d frame00000510 +2885cdfba7e235f7b1d7ef32ac7992f4 frame00000511 +2402f8a6ab762a5fce73836ca9de9b40 frame00000512 +a80701bc5e9c17a474ef480b8382f401 frame00000513 +5f506086571345a265d05109a3bba05f frame00000514 +5f506086571345a265d05109a3bba05f frame00000515 +5f506086571345a265d05109a3bba05f frame00000516 +5f506086571345a265d05109a3bba05f frame00000517 +5f506086571345a265d05109a3bba05f frame00000518 +2a2e52e5b137dce87dfbc899cc9af922 frame00000519 +2a2e52e5b137dce87dfbc899cc9af922 frame00000520 +2a2e52e5b137dce87dfbc899cc9af922 frame00000521 +2a2e52e5b137dce87dfbc899cc9af922 frame00000522 +2a2e52e5b137dce87dfbc899cc9af922 frame00000523 +2a2e52e5b137dce87dfbc899cc9af922 frame00000524 +5f506086571345a265d05109a3bba05f frame00000525 +5f506086571345a265d05109a3bba05f frame00000526 +5f506086571345a265d05109a3bba05f frame00000527 +5f506086571345a265d05109a3bba05f frame00000528 +5f506086571345a265d05109a3bba05f frame00000529 +5f506086571345a265d05109a3bba05f frame00000530 +5f506086571345a265d05109a3bba05f frame00000531 +5f506086571345a265d05109a3bba05f frame00000532 +5f506086571345a265d05109a3bba05f frame00000533 +2a2e52e5b137dce87dfbc899cc9af922 frame00000534 +2a2e52e5b137dce87dfbc899cc9af922 frame00000535 +2a2e52e5b137dce87dfbc899cc9af922 frame00000536 +2a2e52e5b137dce87dfbc899cc9af922 frame00000537 +2a2e52e5b137dce87dfbc899cc9af922 frame00000538 +2a2e52e5b137dce87dfbc899cc9af922 frame00000539 +2a2e52e5b137dce87dfbc899cc9af922 frame00000540 +2a2e52e5b137dce87dfbc899cc9af922 frame00000541 +2a2e52e5b137dce87dfbc899cc9af922 frame00000542 +5f506086571345a265d05109a3bba05f frame00000543 +5f506086571345a265d05109a3bba05f frame00000544 +5f506086571345a265d05109a3bba05f frame00000545 +5a7697855dfae6db0398e44c77b8d96e frame00000546 +5a7697855dfae6db0398e44c77b8d96e frame00000547 +5a7697855dfae6db0398e44c77b8d96e frame00000548 +d96df2e5c1d051ee03d0ec240838416b frame00000549 +d96df2e5c1d051ee03d0ec240838416b frame00000550 +d96df2e5c1d051ee03d0ec240838416b frame00000551 +cbcda44b7a250bf993bbbfbb1c1d6327 frame00000552 +cbcda44b7a250bf993bbbfbb1c1d6327 frame00000553 +cbcda44b7a250bf993bbbfbb1c1d6327 frame00000554 +cbcda44b7a250bf993bbbfbb1c1d6327 frame00000555 +cbcda44b7a250bf993bbbfbb1c1d6327 frame00000556 +cbcda44b7a250bf993bbbfbb1c1d6327 frame00000557 +7db16553b76002dbfb23bf56102412f3 frame00000558 +7db16553b76002dbfb23bf56102412f3 frame00000559 +581c54b803ead91adc91ddf551887943 frame00000560 +1740cb802adac6b26a9f63dca45bc142 frame00000561 +1740cb802adac6b26a9f63dca45bc142 frame00000562 +1740cb802adac6b26a9f63dca45bc142 frame00000563 +1740cb802adac6b26a9f63dca45bc142 frame00000564 +1740cb802adac6b26a9f63dca45bc142 frame00000565 +1740cb802adac6b26a9f63dca45bc142 frame00000566 +1740cb802adac6b26a9f63dca45bc142 frame00000567 +1740cb802adac6b26a9f63dca45bc142 frame00000568 +1740cb802adac6b26a9f63dca45bc142 frame00000569 +dbf2880d3b0e8893aba06da8ba774958 frame00000570 +dbf2880d3b0e8893aba06da8ba774958 frame00000571 +dbf2880d3b0e8893aba06da8ba774958 frame00000572 +1fe996a095214070180f59aa954efacf frame00000573 +1fe996a095214070180f59aa954efacf frame00000574 +1fe996a095214070180f59aa954efacf frame00000575 +1fe996a095214070180f59aa954efacf frame00000576 +1fe996a095214070180f59aa954efacf frame00000577 +1fe996a095214070180f59aa954efacf frame00000578 +cd365c488492098aaf5d805400ae549b frame00000579 +cd365c488492098aaf5d805400ae549b frame00000580 +cd365c488492098aaf5d805400ae549b frame00000581 +cd365c488492098aaf5d805400ae549b frame00000582 +cd365c488492098aaf5d805400ae549b frame00000583 +cd365c488492098aaf5d805400ae549b frame00000584 +cd365c488492098aaf5d805400ae549b frame00000585 +cd365c488492098aaf5d805400ae549b frame00000586 +cd365c488492098aaf5d805400ae549b frame00000587 +633579e5eb8232917e3126b2bf84cc70 frame00000588 +633579e5eb8232917e3126b2bf84cc70 frame00000589 +8ffc67d115788b8db8ccbf786a5e39d6 frame00000590 +2709194ba9da2d625d1405543a3af231 frame00000591 +2709194ba9da2d625d1405543a3af231 frame00000592 +2709194ba9da2d625d1405543a3af231 frame00000593 +f3b932cc8b45387922f69658940a58d5 frame00000594 +f3b932cc8b45387922f69658940a58d5 frame00000595 +f3b932cc8b45387922f69658940a58d5 frame00000596 +f56f59dc79a41e62eae002e3a865bf13 frame00000597 +f56f59dc79a41e62eae002e3a865bf13 frame00000598 +f56f59dc79a41e62eae002e3a865bf13 frame00000599 +f56f59dc79a41e62eae002e3a865bf13 frame00000600 +f56f59dc79a41e62eae002e3a865bf13 frame00000601 +f56f59dc79a41e62eae002e3a865bf13 frame00000602 +575b376d8e9be58447b684502874ae1a frame00000603 +575b376d8e9be58447b684502874ae1a frame00000604 +0aee451ca013d555aba3b511b656d267 frame00000605 +0aee451ca013d555aba3b511b656d267 frame00000606 +0aee451ca013d555aba3b511b656d267 frame00000607 +0aee451ca013d555aba3b511b656d267 frame00000608 +0aee451ca013d555aba3b511b656d267 frame00000609 +0aee451ca013d555aba3b511b656d267 frame00000610 +0aee451ca013d555aba3b511b656d267 frame00000611 +04cbdd1d78bd9b288dbfef29e972764b frame00000612 +04cbdd1d78bd9b288dbfef29e972764b frame00000613 +04cbdd1d78bd9b288dbfef29e972764b frame00000614 +04cbdd1d78bd9b288dbfef29e972764b frame00000615 +04cbdd1d78bd9b288dbfef29e972764b frame00000616 +04cbdd1d78bd9b288dbfef29e972764b frame00000617 +08b3c151b50b757695399896e4ae6c78 frame00000618 +3c6972502c92d44d2030b7881abf7544 frame00000619 +b703b9cc87b6e15003b85d957ba3e061 frame00000620 +b703b9cc87b6e15003b85d957ba3e061 frame00000621 +b703b9cc87b6e15003b85d957ba3e061 frame00000622 +b703b9cc87b6e15003b85d957ba3e061 frame00000623 +2c0bd1065044c4f465ce90190564df3f frame00000624 +2c0bd1065044c4f465ce90190564df3f frame00000625 +2c0bd1065044c4f465ce90190564df3f frame00000626 +927266297d0c649938b79e0964421769 frame00000627 +927266297d0c649938b79e0964421769 frame00000628 +927266297d0c649938b79e0964421769 frame00000629 +f819b11cd2b5e5a225c652bcb818ceae frame00000630 +16b4720198ffef2683ab4c934a4b433a frame00000631 +16b4720198ffef2683ab4c934a4b433a frame00000632 +5bbad7888ee2062104b91d3a4102f32a frame00000633 +48704c78144c9952cf87c6c9bfa0f097 frame00000634 +48704c78144c9952cf87c6c9bfa0f097 frame00000635 +f2a4b4a908c9a3ec2d679063104b710e frame00000636 +f283ad01b4d539a0527ec674d0e3fb53 frame00000637 +f283ad01b4d539a0527ec674d0e3fb53 frame00000638 +6259bc370ba1713c8e1d3a392360f173 frame00000639 +6259bc370ba1713c8e1d3a392360f173 frame00000640 +6259bc370ba1713c8e1d3a392360f173 frame00000641 +982df4d5c4b319eb2a4c946ead82433a frame00000642 +e8d64c0b066841b068111896f07c8551 frame00000643 +4c23a157dece64f784245c197589a093 frame00000644 +4bc871fe1b7b583ec71f3c617f9874cf frame00000645 +e0dc63c967582dabf9c12292544ccfa0 frame00000646 +e0dc63c967582dabf9c12292544ccfa0 frame00000647 +2c722fffa89a934f6f9c6c029ecf4c51 frame00000648 +d2fcef79aa27a4deb4ad45ee3f66f0f2 frame00000649 +67c415644ff16e88903e4c965a157215 frame00000650 +d0deb414430990ac7ab386f71ac3f7e7 frame00000651 +e2a99061872388f8b188316078e3c54a frame00000652 +e2a99061872388f8b188316078e3c54a frame00000653 +966e73261c2c8f7fb7c12b141bedd3af frame00000654 +9a05e75e695e6ca7b28f7a3e969060fd frame00000655 +07b1ea578c0ad816637917bec13a4d39 frame00000656 +cc6ab18c228d1f1a82279eb2c6bbbcf6 frame00000657 +cc6ab18c228d1f1a82279eb2c6bbbcf6 frame00000658 +cc6ab18c228d1f1a82279eb2c6bbbcf6 frame00000659 +52e840891b80c4d7c1596ea8e29c9293 frame00000660 +52e840891b80c4d7c1596ea8e29c9293 frame00000661 +52e840891b80c4d7c1596ea8e29c9293 frame00000662 +d4260ca780dd09983a5b864cc1d603b0 frame00000663 +d4260ca780dd09983a5b864cc1d603b0 frame00000664 +d4260ca780dd09983a5b864cc1d603b0 frame00000665 +a6ddf50ec4824f0bb0fb8441bc879289 frame00000666 +a6ddf50ec4824f0bb0fb8441bc879289 frame00000667 +a6ddf50ec4824f0bb0fb8441bc879289 frame00000668 +3710b2a648d55473039da7b65ee4bb22 frame00000669 +3710b2a648d55473039da7b65ee4bb22 frame00000670 +3710b2a648d55473039da7b65ee4bb22 frame00000671 +70de4d45e26f43c18cf72b517673a373 frame00000672 +70de4d45e26f43c18cf72b517673a373 frame00000673 +2a35d327bb68c6340cbcc57f98ed284a frame00000674 +eb7143a4b70926fd27c8c95a5ab61b8f frame00000675 +add7fa0627fa6c902ec8995270b1e38a frame00000676 +23cd2b084d8499f51a0098b83be82353 frame00000677 +692609a8846b91bc3d8e429675e21999 frame00000678 +692609a8846b91bc3d8e429675e21999 frame00000679 +692609a8846b91bc3d8e429675e21999 frame00000680 +176d077a28b1a6830bbeb5c5f509646f frame00000681 +b77a572cf99d2ebd7d238b89b6ffcbef frame00000682 +b77a572cf99d2ebd7d238b89b6ffcbef frame00000683 +abf2ce3db7172934f8c0a26adee1da69 frame00000684 +1d4f6b831b20dec3b30070905cac433e frame00000685 +d7092827724159ff9e3d58fe6d0480e8 frame00000686 +7e92118ad92cf23e1382f6ef96ec3ef5 frame00000687 +7e92118ad92cf23e1382f6ef96ec3ef5 frame00000688 +7e92118ad92cf23e1382f6ef96ec3ef5 frame00000689 +0f7547ecb029b587abac30bf4153b820 frame00000690 +0f7547ecb029b587abac30bf4153b820 frame00000691 +f642d2db1c7727915bcd83b0fee3a28a frame00000692 +4ef00c1b9362abcaa2f78b0839a0a276 frame00000693 +4ef00c1b9362abcaa2f78b0839a0a276 frame00000694 +4ef00c1b9362abcaa2f78b0839a0a276 frame00000695 +964181bc88846da46e1eb61975e0c8bf frame00000696 +84435d715190a7997c885513ae692724 frame00000697 +09f554fcbb1610049b224b1f21fe3142 frame00000698 +ca5e44301954fb7da403cf248ddedeb6 frame00000699 +ca5e44301954fb7da403cf248ddedeb6 frame00000700 +ca5e44301954fb7da403cf248ddedeb6 frame00000701 +ca508d4aa17eec760a0b091d6392f54d frame00000702 +ca508d4aa17eec760a0b091d6392f54d frame00000703 +ca508d4aa17eec760a0b091d6392f54d frame00000704 +a29d59c4db9f565981655d939fa579e0 frame00000705 +a29d59c4db9f565981655d939fa579e0 frame00000706 +a29d59c4db9f565981655d939fa579e0 frame00000707 +0882ba2d9003a127b7695e02c0220bf8 frame00000708 +0882ba2d9003a127b7695e02c0220bf8 frame00000709 +1648535077b3e60033b7d53b701d1df6 frame00000710 +1f2d12d060d76f4b5fe6a7d5e14907db frame00000711 +1f2d12d060d76f4b5fe6a7d5e14907db frame00000712 +1b1d6d3dd8893209af0a6f937ff9e03d frame00000713 +1b1d6d3dd8893209af0a6f937ff9e03d frame00000714 +1b1d6d3dd8893209af0a6f937ff9e03d frame00000715 +1b1d6d3dd8893209af0a6f937ff9e03d frame00000716 +058c6fc518dcd8701273ce8e875c883f frame00000717 +058c6fc518dcd8701273ce8e875c883f frame00000718 +058c6fc518dcd8701273ce8e875c883f frame00000719 +7abafb904346a2974cdf1c13ae9a9bae frame00000720 +7abafb904346a2974cdf1c13ae9a9bae frame00000721 +7abafb904346a2974cdf1c13ae9a9bae frame00000722 +720794363a34d0fac3b1018515285500 frame00000723 +a8291f804c6be892379a5d17ad48e920 frame00000724 +a8291f804c6be892379a5d17ad48e920 frame00000725 +273c38edf09c4d9ba2d5c8d5fb27d6bc frame00000726 +273c38edf09c4d9ba2d5c8d5fb27d6bc frame00000727 +d64bd3119fd0b38e8c3bee8374d5259f frame00000728 +b5386ed87d7aa5c0f5943c66503a00da frame00000729 +b5386ed87d7aa5c0f5943c66503a00da frame00000730 +b5386ed87d7aa5c0f5943c66503a00da frame00000731 +6324b01fcd498ce98755fa9ce0488b4f frame00000732 +6324b01fcd498ce98755fa9ce0488b4f frame00000733 +6324b01fcd498ce98755fa9ce0488b4f frame00000734 +fd2cc8326b6b2baa3c81c50f8cef78be frame00000735 +fd2cc8326b6b2baa3c81c50f8cef78be frame00000736 +a75d5103f6c8f4d3894a8b09d7f67caf frame00000737 +3424fecd2af0ffadbf73d01aaeb58c68 frame00000738 +3424fecd2af0ffadbf73d01aaeb58c68 frame00000739 +5edd03b5486548b99d26c2e45e4cc7c6 frame00000740 +fb88371075438ba6ce79f90912337e1c frame00000741 +fb88371075438ba6ce79f90912337e1c frame00000742 +fb88371075438ba6ce79f90912337e1c frame00000743 +44c8b92799651b4ddf5a19212095fce9 frame00000744 +44c8b92799651b4ddf5a19212095fce9 frame00000745 +5adb2f0dedcdbc1542f5c55f19c28415 frame00000746 +13be06b15438409c83a7ce151e74f402 frame00000747 +13be06b15438409c83a7ce151e74f402 frame00000748 +13be06b15438409c83a7ce151e74f402 frame00000749 +6d00e80eda5f1a5d386df4a0464464d9 frame00000750 +6d00e80eda5f1a5d386df4a0464464d9 frame00000751 +6d00e80eda5f1a5d386df4a0464464d9 frame00000752 +b8721df695843f7d915ea870e2316343 frame00000753 +a829413df5e5e9ccd7c7a52a708a611e frame00000754 +a829413df5e5e9ccd7c7a52a708a611e frame00000755 +979a0b7b0cdb890ce92e03eacdf7b1f9 frame00000756 +979a0b7b0cdb890ce92e03eacdf7b1f9 frame00000757 +979a0b7b0cdb890ce92e03eacdf7b1f9 frame00000758 +5bafec7242283a989ccdf6f3db985386 frame00000759 +5bafec7242283a989ccdf6f3db985386 frame00000760 +384dd242ef649b4873d62ded62c83be7 frame00000761 +c36b7fcb68bb3b23d9dca40663579847 frame00000762 +c36b7fcb68bb3b23d9dca40663579847 frame00000763 +e69aff0ede4f2a9f493cc8451471f652 frame00000764 +f38f8af72eb4c1e3877249a91b56d41b frame00000765 +f38f8af72eb4c1e3877249a91b56d41b frame00000766 +e7d9d2dc9015673445323f4ec9b6df63 frame00000767 +90aafd9ba81d4924cbd4fb90f36da409 frame00000768 +ed1328e6d0030431e2d83e613c177cbe frame00000769 +ed1328e6d0030431e2d83e613c177cbe frame00000770 +09329b52454d6eb89d0bcefbab9e2da8 frame00000771 +09329b52454d6eb89d0bcefbab9e2da8 frame00000772 +09329b52454d6eb89d0bcefbab9e2da8 frame00000773 +34ec56783447f6c83044ac65a45f28d4 frame00000774 +50c85152f4dba2cad73c017e1d067ca2 frame00000775 +50c85152f4dba2cad73c017e1d067ca2 frame00000776 +712ff5aebbc83afb3273be8107c03a1e frame00000777 +712ff5aebbc83afb3273be8107c03a1e frame00000778 +8e33afd3b1717076b04e7a4602ed1552 frame00000779 +d1b292cbacb2bb969154a7814cac1eb8 frame00000780 +d1b292cbacb2bb969154a7814cac1eb8 frame00000781 +c498d30fc9fec703e4a897dc663dd5ae frame00000782 +c3e0152c712bf3b7a3e209236c3ad4d7 frame00000783 +c3e0152c712bf3b7a3e209236c3ad4d7 frame00000784 +c3e0152c712bf3b7a3e209236c3ad4d7 frame00000785 +9bf95cede5654aa775dbd67ccea677fb frame00000786 +9da6c3b0b6adcc2e883522c26d154bcc frame00000787 +9da6c3b0b6adcc2e883522c26d154bcc frame00000788 +3285652745c24e82bfe7a1f611b412c9 frame00000789 +3285652745c24e82bfe7a1f611b412c9 frame00000790 +b9fe0876aef058c3a5eff1f090225a70 frame00000791 +405f87b868ca0346a3b9f2b0f98f85b2 frame00000792 +405f87b868ca0346a3b9f2b0f98f85b2 frame00000793 +405f87b868ca0346a3b9f2b0f98f85b2 frame00000794 +25d33175061df353c20c4e00b8864d1b frame00000795 +25d33175061df353c20c4e00b8864d1b frame00000796 +25d33175061df353c20c4e00b8864d1b frame00000797 +59ba9029c51a140614562a157132cf5e frame00000798 +0a51149ef0920046252888575c712ad1 frame00000799 +2e99482cd6a8567f18200de8631da9ba frame00000800 +6f575e7e19c2e87ad86eac567452d60a frame00000801 +6f575e7e19c2e87ad86eac567452d60a frame00000802 +6f575e7e19c2e87ad86eac567452d60a frame00000803 +29ec71930f63d4fcc0166fd382686891 frame00000804 +f90e34c7914c0dbfbe0e0991317517e9 frame00000805 +9f0ad16cb022695ce8c3d221ff97409d frame00000806 +2e01200e2a4838dcffd26a0878b9ecf0 frame00000807 +2e01200e2a4838dcffd26a0878b9ecf0 frame00000808 +2e01200e2a4838dcffd26a0878b9ecf0 frame00000809 +34d733743e30f04154e4284737274b89 frame00000810 +34d733743e30f04154e4284737274b89 frame00000811 +34d733743e30f04154e4284737274b89 frame00000812 +a874c23cbed4cb2211c862cbfc96d1c9 frame00000813 +02e16909615d5b9069fc2b1ed1cbb26a frame00000814 +02e16909615d5b9069fc2b1ed1cbb26a frame00000815 +0b8f82f49193cfcbc22cec3a23674254 frame00000816 +0b8f82f49193cfcbc22cec3a23674254 frame00000817 +0b8f82f49193cfcbc22cec3a23674254 frame00000818 +0b8f82f49193cfcbc22cec3a23674254 frame00000819 +0b8f82f49193cfcbc22cec3a23674254 frame00000820 +0b8f82f49193cfcbc22cec3a23674254 frame00000821 +82618d57a7286af9218147db327ce9af frame00000822 +12527a097c9a7b3c07cbc93de166d5e5 frame00000823 +12527a097c9a7b3c07cbc93de166d5e5 frame00000824 +12527a097c9a7b3c07cbc93de166d5e5 frame00000825 +12527a097c9a7b3c07cbc93de166d5e5 frame00000826 +12527a097c9a7b3c07cbc93de166d5e5 frame00000827 +12527a097c9a7b3c07cbc93de166d5e5 frame00000828 +12527a097c9a7b3c07cbc93de166d5e5 frame00000829 +12527a097c9a7b3c07cbc93de166d5e5 frame00000830 +12527a097c9a7b3c07cbc93de166d5e5 frame00000831 +12527a097c9a7b3c07cbc93de166d5e5 frame00000832 +12527a097c9a7b3c07cbc93de166d5e5 frame00000833 +12527a097c9a7b3c07cbc93de166d5e5 frame00000834 +12527a097c9a7b3c07cbc93de166d5e5 frame00000835 +12527a097c9a7b3c07cbc93de166d5e5 frame00000836 +12527a097c9a7b3c07cbc93de166d5e5 frame00000837 +12527a097c9a7b3c07cbc93de166d5e5 frame00000838 +12527a097c9a7b3c07cbc93de166d5e5 frame00000839 +12527a097c9a7b3c07cbc93de166d5e5 frame00000840 +12527a097c9a7b3c07cbc93de166d5e5 frame00000841 +12527a097c9a7b3c07cbc93de166d5e5 frame00000842 +12527a097c9a7b3c07cbc93de166d5e5 frame00000843 +12527a097c9a7b3c07cbc93de166d5e5 frame00000844 +12527a097c9a7b3c07cbc93de166d5e5 frame00000845 +12527a097c9a7b3c07cbc93de166d5e5 frame00000846 +12527a097c9a7b3c07cbc93de166d5e5 frame00000847 +12527a097c9a7b3c07cbc93de166d5e5 frame00000848 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/txd/misc.txd.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/txd/misc.txd.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/txd/misc.txd.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/txd/misc.txd.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,11 @@ +68c5b16b7cbccb45ee1e0f194c53a6b6 frame00000000 +c182694005d0b0e339de69494981b4d8 frame00000001 +ed2cf49cff72959761dac17485e3e189 frame00000002 +ee129e604b822bc68fd780dd659152eb frame00000003 +68fbe73e44fa10c841ed1a66eb7ebb0a frame00000004 +0cb7fe0e888aaec4046eb6d7c5798fb6 frame00000005 +ee6fa338f6e0e75ab6b3b02dcbdb88c0 frame00000006 +69f47855930a1f666ccdc88ae1d4c7d0 frame00000007 +5d79dcfd572c1d593680ec1a5c7832af frame00000008 +2ba3d54cbbe8af04efb6ed0da9f97c0a frame00000009 +e751d6f2aa885f38b49db4eeecb319bf frame00000010 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ulti/hit12w.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ulti/hit12w.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/ulti/hit12w.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/ulti/hit12w.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,62 @@ +113e95e5ee4d549616c21c622750aace frame00000000 +95622f52db50c38ec5233b0afc47cafb frame00000001 +661ad8989d01a17b43b6a31e34f85a85 frame00000002 +f5c1c1fddbd543d7fed85649ac1da6bd frame00000003 +7da61340ee6afbf1838e2744072d43c3 frame00000004 +38c8e4b18b89c3e222b71c365b65b697 frame00000005 +9368bde165d72937d7c6c62562d641cd frame00000006 +376e9170255e0c2c1ca7767657fa0b57 frame00000007 +f3609357daf50181752195aa4566ed69 frame00000008 +3f4fbe3ab36f8ffdbcf15aa4d5bec0be frame00000009 +405952881a59a13c048030741f6171f2 frame00000010 +6f933f2a973d3e248bc08c0b5f36de98 frame00000011 +1602f5b2f67a711b092f9de1fac4b054 frame00000012 +eee52baaec1ff02c60f39e1382d2af7a frame00000013 +90442cb46a1e94d74bc412a946193e7d frame00000014 +d5ec797bdcd2641205fb271d8830162f frame00000015 +664338cbe847fb99499e016e92210927 frame00000016 +f61313caee91a26f3425a4bf0bac772b frame00000017 +83bd613a870a6c1078a10cc436b1818b frame00000018 +6770bfe1f92ff413507b054728606b2a frame00000019 +17fef881d26da9f3fa749d7b3e4bf296 frame00000020 +0ef50a777e8b2920504cef79d9522d46 frame00000021 +b452e541ba85067720ee6dc4252a790d frame00000022 +8f606b2a105caeac3a871c4437818d53 frame00000023 +e757bb5b7bd01276c0184e6eb0a0382b frame00000024 +514eb656de577badcff1ba51ef00c64d frame00000025 +78512b9eb779a8da69bbebef69121694 frame00000026 +dd533553f70c3b598ddddb8e4ca61530 frame00000027 +faf35c771d73da0fe9183226c24f3aaa frame00000028 +bce519299b09e6f2f70306cbcc244187 frame00000029 +64864b17db49f0b7c3349e43ec8e7dac frame00000030 +ecbe456eb4e12a937f3a840d1ceacd12 frame00000031 +0636cc45b7eb8bdce1ac38304096578f frame00000032 +baebd3f05f1ef2eaef692eb61ea54348 frame00000033 +955a57a494cdb21ae45b0f4f0f5f2f92 frame00000034 +ab206f6147aa03798e4b1528e7fce742 frame00000035 +5ccec12ecaea8f0c8af7703be163a4af frame00000036 +f55c2cc76d64130bdeb9731b28600267 frame00000037 +8026803d021626e177b420f0fbfb5d6d frame00000038 +b356917795e2f13e996a71108230f8ed frame00000039 +e7f7a9004c7fe7df4b77dd551117fa5d frame00000040 +29cf0dfc7c608089fd3bd48793e20fdf frame00000041 +030580d1f72e58838a89e850fc8743a5 frame00000042 +5683855765630788012f1beb63992161 frame00000043 +662a50151b0b91640a106e6b69aa7edd frame00000044 +68825ff0a6d0634e54c643f00479c223 frame00000045 +2fe302e8ac1a699588b30dc4070934eb frame00000046 +bf059cf3c17fb8b44d6619682fd2662b frame00000047 +07695ab24bd249bfd06e9423a6bdb9a9 frame00000048 +68d84124da39e75f11ccea599ed053f7 frame00000049 +3784d3301801d0f68f123e66b464b624 frame00000050 +54e78549cf163486771fbb05275c827c frame00000051 +65ce3bc4ad7a8f2d6160b72c357f793a frame00000052 +23bd236003a5537780b47c151eb244bc frame00000053 +4709b9ec52ef3279468b798369d87ed4 frame00000054 +0c37e9b51fe0e2f42824d1937e2af82e frame00000055 +f0c8ec6d961a07666a02c77eb700a55a frame00000056 +eb5f4d3a74f13dbedd611f5f061f35bf frame00000057 +68308313e6681b2114aa7e61c13ff35e frame00000058 +eacaf1ea672dd00ac861c726734ca8ac frame00000059 +f319faac436e1f8deacb0ad99024d03d frame00000060 +c567bea2421e9150a9505dd3cb24ee22 frame00000061 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_rgba_left.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_rgba_left.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_rgba_left.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_rgba_left.avi.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,5 @@ +f3e6f42866951d647df4ed1986c1b4ba frame00000000 +ff858b205a7d95ef148092f93d1c5007 frame00000001 +1a783b29a25538a302c888cedf31bf22 frame00000002 +c435b880519a53182f9a1e16a7997f97 frame00000003 +87648d35a7b227fdd25db299f92b40df frame00000004 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_rgba_median.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_rgba_median.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_rgba_median.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_rgba_median.avi.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,5 @@ +f3e6f42866951d647df4ed1986c1b4ba frame00000000 +ff858b205a7d95ef148092f93d1c5007 frame00000001 +1a783b29a25538a302c888cedf31bf22 frame00000002 +c435b880519a53182f9a1e16a7997f97 frame00000003 +87648d35a7b227fdd25db299f92b40df frame00000004 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_rgb_left.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_rgb_left.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_rgb_left.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_rgb_left.avi.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,4 @@ +57ed136a33777adb4885368fb42eef94 frame00000000 +262df58427f3f9525dab1e47f604a632 frame00000001 +5bff248ee16cd2d50c32856b3d1c822e frame00000002 +404a4d6be802b608125153ce016f211b frame00000003 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_rgb_median.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_rgb_median.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_rgb_median.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_rgb_median.avi.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,5 @@ +890a271db967d4a0435c435ec9a44a72 frame00000000 +cfdd53c870c3ba081a597561272e8ab7 frame00000001 +4ef9912157cfbf4cefbcbf01ae31afee frame00000002 +59c6b39d1703e0038afa0888a36ea945 frame00000003 +404a4d6be802b608125153ce016f211b frame00000004 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_yuv420_left.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_yuv420_left.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_yuv420_left.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_yuv420_left.avi.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,7 @@ +fa87cce494cfae6e86f00ad6542bb183 frame00000000 +a51af5ffe5dc8b096704d91a133aeffc frame00000001 +f4077895c87941e4cc7841b1dc2394f7 frame00000002 +5d54444d97057af88452b55589122df2 frame00000003 +7a6eaa330aa7605cd89f7b7091a346dc frame00000004 +98d387e8510d1af3f01138b6d0025660 frame00000005 +25e2cd6554efd20e1bfc1078df4ce670 frame00000006 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_yuv420_median.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_yuv420_median.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_yuv420_median.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_yuv420_median.avi.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,4 @@ +7a6eaa330aa7605cd89f7b7091a346dc frame00000000 +98d387e8510d1af3f01138b6d0025660 frame00000001 +25e2cd6554efd20e1bfc1078df4ce670 frame00000002 +abe7a8b291c78b30661b64040772db26 frame00000003 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_yuv422_left.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_yuv422_left.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_yuv422_left.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_yuv422_left.avi.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,4 @@ +ee8df33bb1c1b85c5fdc1d24372c21c5 frame00000000 +ce150a55fcb05bd61b030bd10ac2ba8e frame00000001 +acf36618e1ffdeb1391bcacb0637ae33 frame00000002 +9acb6b8b2c48f2b6f4342fd160a791b6 frame00000003 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_yuv422_median.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_yuv422_median.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/utvideo/utvideo_yuv422_median.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/utvideo/utvideo_yuv422_median.avi.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,4 @@ +ee8df33bb1c1b85c5fdc1d24372c21c5 frame00000000 +ce150a55fcb05bd61b030bd10ac2ba8e frame00000001 +acf36618e1ffdeb1391bcacb0637ae33 frame00000002 +9acb6b8b2c48f2b6f4342fd160a791b6 frame00000003 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/v210/v210_720p-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/v210/v210_720p-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/v210/v210_720p-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/v210/v210_720p-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1 @@ +63acb8f2799baf80e93b9cb759abafff frame00000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/v410/lenav410.mov.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/v410/lenav410.mov.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/v410/lenav410.mov.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/v410/lenav410.mov.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1 @@ +a29ba9908aea68e15dda6be0a88441df frame00000000 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vble/flowers-partial-2MB.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vble/flowers-partial-2MB.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vble/flowers-partial-2MB.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vble/flowers-partial-2MB.avi.md5 2012-01-05 18:23:34.000000000 +0000 @@ -0,0 +1,4 @@ +fae0d53bdb1525d77d700350d82aef6d frame00000000 +fcde0129217890e35d7bd253a607f88c frame00000001 +81c5cb377626b7854eb0fcac2f130831 frame00000002 +018ece47c6c5754108b6e6b9fbee3b60 frame00000003 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vc1/SA00040.vc1.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vc1/SA00040.vc1.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vc1/SA00040.vc1.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vc1/SA00040.vc1.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,14 @@ +c082ec7483db93cfc769f282980d91ee frame00000000 +c082ec7483db93cfc769f282980d91ee frame00000001 +c082ec7483db93cfc769f282980d91ee frame00000002 +d037b1bc7e8c18ee05b1241123abc192 frame00000003 +1a26598bd2d2afcaa907553f7f76323d frame00000004 +2ca19a43af9eed9badc2f33cdd734c91 frame00000005 +c4be81eceaa9e5f457205fefe144320a frame00000006 +c4be81eceaa9e5f457205fefe144320a frame00000007 +333570008393d36126f09a6972b684d6 frame00000008 +333570008393d36126f09a6972b684d6 frame00000009 +36d8dada953ca6a2b7cbdee78acf134e frame00000010 +36d8dada953ca6a2b7cbdee78acf134e frame00000011 +36d8dada953ca6a2b7cbdee78acf134e frame00000012 +36d8dada953ca6a2b7cbdee78acf134e frame00000013 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vc1/SA00050.vc1.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vc1/SA00050.vc1.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vc1/SA00050.vc1.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vc1/SA00050.vc1.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,29 @@ +ae5c2037099e58f9581360e86fb9490d frame00000000 +ae5c2037099e58f9581360e86fb9490d frame00000001 +ae5c2037099e58f9581360e86fb9490d frame00000002 +1cd4b7d7f84d124ca7beded0991951af frame00000003 +2e1c9f1753d828cfbc0ee641853c9647 frame00000004 +2f6a6f84490586d910c24265803e184e frame00000005 +3445c9c7652386054e2bd6cb238db49c frame00000006 +3445c9c7652386054e2bd6cb238db49c frame00000007 +dc0153500ea105e3913862b4f177204a frame00000008 +dc0153500ea105e3913862b4f177204a frame00000009 +ac13f4a0a1af2ab320a9be5f38e8c2c1 frame00000010 +ac13f4a0a1af2ab320a9be5f38e8c2c1 frame00000011 +ac13f4a0a1af2ab320a9be5f38e8c2c1 frame00000012 +ac13f4a0a1af2ab320a9be5f38e8c2c1 frame00000013 +ac13f4a0a1af2ab320a9be5f38e8c2c1 frame00000014 +ac13f4a0a1af2ab320a9be5f38e8c2c1 frame00000015 +ac13f4a0a1af2ab320a9be5f38e8c2c1 frame00000016 +ac13f4a0a1af2ab320a9be5f38e8c2c1 frame00000017 +89987dbe45500e91923a0b2ca79fd45d frame00000018 +89987dbe45500e91923a0b2ca79fd45d frame00000019 +d3c03f9759111460bf7e89f9b1dcdf78 frame00000020 +5a2eb9390fb8f571d2c2dee48f86c71e frame00000021 +ca27a28903c3d13814b6c667e64d1efc frame00000022 +67f6cbee23316667456644e65c85d0d1 frame00000023 +dc058f2cd8e20b05bdfe5680f91d9de9 frame00000024 +dc058f2cd8e20b05bdfe5680f91d9de9 frame00000025 +71f3567634b511d881b61683f71bf7d7 frame00000026 +1c442ed32859a66f2ddc1cdf1c76e4b7 frame00000027 +1c442ed32859a66f2ddc1cdf1c76e4b7 frame00000028 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vc1/SA10091.vc1.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vc1/SA10091.vc1.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vc1/SA10091.vc1.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vc1/SA10091.vc1.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,30 @@ +a8cc09e822ce8ee68f6c7d1f96eec0f1 frame00000000 +3770ee4e247d514bf217fb8a37ade08d frame00000001 +3770ee4e247d514bf217fb8a37ade08d frame00000002 +3770ee4e247d514bf217fb8a37ade08d frame00000003 +3770ee4e247d514bf217fb8a37ade08d frame00000004 +3770ee4e247d514bf217fb8a37ade08d frame00000005 +815b71b7f5f055911dc1c27599a95cb3 frame00000006 +815b71b7f5f055911dc1c27599a95cb3 frame00000007 +815b71b7f5f055911dc1c27599a95cb3 frame00000008 +f820b5173ec6168d850bc0ea8b226d84 frame00000009 +7f08d115b9f033a7f4914ce1822eceaa frame00000010 +7f08d115b9f033a7f4914ce1822eceaa frame00000011 +7f08d115b9f033a7f4914ce1822eceaa frame00000012 +697f8873366ee042c4b11cf8c8c442c9 frame00000013 +697f8873366ee042c4b11cf8c8c442c9 frame00000014 +66b4b2490b2c1d720465d53567cce8db frame00000015 +ca026123f093f1cfbe948dc61b4871f9 frame00000016 +ca026123f093f1cfbe948dc61b4871f9 frame00000017 +3732d3aa683a3cca8a27128e3884d7bf frame00000018 +3732d3aa683a3cca8a27128e3884d7bf frame00000019 +336efd6d08bafa19301c87d16e49d589 frame00000020 +336efd6d08bafa19301c87d16e49d589 frame00000021 +64c2bdbd19b5a5329b5417a691adc7a6 frame00000022 +4e7e7987b759b80d47a0af27aa4e6014 frame00000023 +ba09585bcd006aae41779c77439d20d3 frame00000024 +ba09585bcd006aae41779c77439d20d3 frame00000025 +ba09585bcd006aae41779c77439d20d3 frame00000026 +6d8feff4c9c8a753a64c5fab9b01375d frame00000027 +6d8feff4c9c8a753a64c5fab9b01375d frame00000028 +6d8feff4c9c8a753a64c5fab9b01375d frame00000029 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vc1/SA20021.vc1.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vc1/SA20021.vc1.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vc1/SA20021.vc1.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vc1/SA20021.vc1.md5 2012-01-05 15:39:14.000000000 +0000 @@ -0,0 +1,59 @@ +a924cdbb7bed22b4f291030ea7a71bec frame00000000 +4af74080d6d905f3bbafdb0f1050272a frame00000001 +9ac0ff06e5a7f94171c46c416a947343 frame00000002 +e8672867beec2c0d7a9bdce5a34664d1 frame00000003 +71aa6fe1318865993f435cbe7198525f frame00000004 +c8c0cef339c63963cb1cb56106bfa299 frame00000005 +c8c0cef339c63963cb1cb56106bfa299 frame00000006 +c8c0cef339c63963cb1cb56106bfa299 frame00000007 +c8c0cef339c63963cb1cb56106bfa299 frame00000008 +efb4a7a38c1c40360156b21c2ad8bd54 frame00000009 +efb4a7a38c1c40360156b21c2ad8bd54 frame00000010 +e44c53ce2a7b570154c716dfa87769a0 frame00000011 +e44c53ce2a7b570154c716dfa87769a0 frame00000012 +eb65146037fec91ae9607df787d606ab frame00000013 +b9390ce5f63e4eeaac52881337235374 frame00000014 +b27703bfdc62912c347742b6485d6e31 frame00000015 +b27703bfdc62912c347742b6485d6e31 frame00000016 +f15dadd3446cab0a2173a769f873d20a frame00000017 +5b74b3251ef71ed867b4241db472a51b frame00000018 +5b74b3251ef71ed867b4241db472a51b frame00000019 +5b74b3251ef71ed867b4241db472a51b frame00000020 +266c6a2b5262ad72581a7642128472b0 frame00000021 +8f388e9e2415c6e344338a7ae6fd5027 frame00000022 +ef38c9912b6903586d8ad337be8a7e94 frame00000023 +ef38c9912b6903586d8ad337be8a7e94 frame00000024 +56477379304c414b48f5a3c042a8bec6 frame00000025 +56477379304c414b48f5a3c042a8bec6 frame00000026 +56477379304c414b48f5a3c042a8bec6 frame00000027 +da904c7e48f529924382ff86ea07eb09 frame00000028 +da904c7e48f529924382ff86ea07eb09 frame00000029 +da904c7e48f529924382ff86ea07eb09 frame00000030 +da904c7e48f529924382ff86ea07eb09 frame00000031 +1c7462d002121d10e81e20e934046b46 frame00000032 +1c7462d002121d10e81e20e934046b46 frame00000033 +c015064fbcb9ef7526f78acf4188dd20 frame00000034 +c015064fbcb9ef7526f78acf4188dd20 frame00000035 +c015064fbcb9ef7526f78acf4188dd20 frame00000036 +f65e8c6c5e0d1d20698ba18ea23ad434 frame00000037 +f65e8c6c5e0d1d20698ba18ea23ad434 frame00000038 +efa2e8c732e9122bde11ee29536c1239 frame00000039 +5faa4d5558a396ae25d6fe0220e06c1a frame00000040 +9c737f17b330d0c491e82b1b07ecda8b frame00000041 +9c737f17b330d0c491e82b1b07ecda8b frame00000042 +d290613b8412855e404337a53366252a frame00000043 +92e77964289b42aa6fc8bbc00f71beee frame00000044 +bd3bb52a8ad817a51103ab1528bab80a frame00000045 +bd3bb52a8ad817a51103ab1528bab80a frame00000046 +bd3bb52a8ad817a51103ab1528bab80a frame00000047 +6836119f4c9a6e241ef36ccefbd7ebac frame00000048 +6836119f4c9a6e241ef36ccefbd7ebac frame00000049 +6836119f4c9a6e241ef36ccefbd7ebac frame00000050 +6836119f4c9a6e241ef36ccefbd7ebac frame00000051 +84791689feedc7da1d91bdb3e82d10f3 frame00000052 +deb001d3533340136fb21193fc72aa53 frame00000053 +79404631cd83a5b731e996d753b51455 frame00000054 +79404631cd83a5b731e996d753b51455 frame00000055 +79404631cd83a5b731e996d753b51455 frame00000056 +79404631cd83a5b731e996d753b51455 frame00000057 +79404631cd83a5b731e996d753b51455 frame00000058 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vcr1/VCR1test.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vcr1/VCR1test.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vcr1/VCR1test.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vcr1/VCR1test.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,128 @@ +1da99112dea87397a7af6e13c2b8b265 frame00000000 +f33ef311a49c66a598715a4030c93d1a frame00000001 +af727cad6389a8158f79ef2ca57afbc4 frame00000002 +84acea8636f60ed56d87ac66f2fa2c0e frame00000003 +c9ed5046e3da6ab6b58dbceb6b9a02be frame00000004 +1943db4c02be81d1f581aac3d8fa8526 frame00000005 +5938300240a7d387ae4cdd8ca271eedc frame00000006 +812f62af14accb0db500420e2770b1be frame00000007 +4553a67e6a679666da9b32cc53d3e6d2 frame00000008 +f092ec85fecd972f2e35a5f24f4761b7 frame00000009 +984997a6189333971be4a46cfe1bc732 frame00000010 +b86bf5666786eac31759a6870afd4f09 frame00000011 +addc9b83f892890cfb3cf5cbaaaaf5d9 frame00000012 +53ab00db3c1239e3be54e158e0fcb4f2 frame00000013 +b2bfdb7c297dc8cc6065600a0bf7c05b frame00000014 +ead90dbc351c587e280f904b7d3d5e36 frame00000015 +29e3052f1010dcee431b7d295f52117d frame00000016 +d0f64ea0e0d4315011658fe86add2a06 frame00000017 +61a7ab4265ada035baba4ca3c1276257 frame00000018 +43a8aa7191ab26d677471c4c18d3aea5 frame00000019 +e2647365b0c5d67f828fe11795031b75 frame00000020 +c20154f0212837b41f23e22067a14795 frame00000021 +7af71200fa099e4a2429ab91a1a5e166 frame00000022 +380df39d73d5d0b36584190c8310eaf6 frame00000023 +e68ff2767c45656d428ba96962685fe1 frame00000024 +bcebd54c0450da7fc21d35ff329ac731 frame00000025 +3d196f9a3efa74620cf06a4309b273bd frame00000026 +70420f64d807c98f4bce6027f867ad72 frame00000027 +2d75cde7997644ce4ec10ac551831476 frame00000028 +3dff14dc2f21a1090c8be76700eca9eb frame00000029 +1f154b14e27528f32c95512bb3c3a4e7 frame00000030 +c1365f44fea63609e01aa059216a1c7d frame00000031 +61289d1ce33aa6e3e6a7e868f6bf12f4 frame00000032 +1ac711b5f3a422f016e70d0cd307d2d3 frame00000033 +db192eb09f7dab75d884d38bcd1d0fe8 frame00000034 +9eb12919209a43d9152d50557f88179f frame00000035 +a8ba85fa081c3746a27839e6ca3e768a frame00000036 +48c4f6eb92afee489bc5bfd03f79ac19 frame00000037 +26ada89c27b7843218e61420eaea9360 frame00000038 +dfa62dd58ed22514e4003ee5bec6dbc3 frame00000039 +cd9475f2eac3d8224f5e3a41569ac0d0 frame00000040 +dee0d19816bc1cbb80c6697b622b7e72 frame00000041 +dd1b92bd6a74738863c683ab26230b5b frame00000042 +5bb1c4c07adc1127e297dd8ad8c3bbbb frame00000043 +acd51c70a2e96a3f35351d74a74cce4e frame00000044 +a11c39939a737648011ac6dca883b18d frame00000045 +4b84951e39e74574f4684a2128aadef9 frame00000046 +dab3f2dbb6db923608c474a11e02b343 frame00000047 +628d5337e01771ab9e2b9970cf4470df frame00000048 +88c54c61ac50e3aafe6f7aead80247b7 frame00000049 +0e1853dbe0f4f0539584a0fc609e5009 frame00000050 +43e427af16833eab870c4edfcc0bedf6 frame00000051 +db19d29d977143cb2bbe4eab232bff40 frame00000052 +0c06b9e1e78f02161502f86ac54b1e39 frame00000053 +1b938724617794489d54225ef5572009 frame00000054 +5e8d694a2da048831fe1438e1c8791cf frame00000055 +8efba9b96fca348c22bb1627a877081a frame00000056 +a83f1502e7476844b1ccdf858c356bd8 frame00000057 +76e96a1728d8634a7944c8ee0521adc7 frame00000058 +70912e38bd601313fa94148dfb2da02f frame00000059 +21856070bb178d92bae4e6b51452ec98 frame00000060 +794ab2bce7cddeea33be036c2af502d1 frame00000061 +ae3b607c6f262c9ce917e404b89335b7 frame00000062 +d09c10da3d1106708c947886ddae0823 frame00000063 +805114346fb27bd8569266414626a4fa frame00000064 +9ee023946f62dcbf363866f9b02d2203 frame00000065 +cfa2ec3f7f92855e80f5e722dfc399e8 frame00000066 +6fba4ddd524c193e29e1d28e6e8f37f8 frame00000067 +79900555aafe3c022c51c3628e66a191 frame00000068 +638e116b5f123e2d410957229a07f54c frame00000069 +67804f1fab64b6c225e4f1bcc86e0da1 frame00000070 +c8cbfd482bd0ef387a7f01b0381b30fc frame00000071 +7a72c453c8b097d0b28e4b1cbfe71f2f frame00000072 +e6371684c0aaf5908d804751cfad0e17 frame00000073 +138be8bd03b385b590580356f0a3c280 frame00000074 +30e5ba30e3f16a6ad8bc67f16ba84ca1 frame00000075 +4d500f4301cd033ea1b33cd47b09039c frame00000076 +9361976a67023837b0d812e364985368 frame00000077 +ee12dc6f0b17654a253e20443a5fffbc frame00000078 +1a2901f77f896a9c11b39f07aee4a208 frame00000079 +42ef7ea7ec0d7e47be06f08ca020695a frame00000080 +0733bfeb9226ed3f11518902dd510f7c frame00000081 +66e454153c4b9317914429a46c4967f5 frame00000082 +be5d56fad7d2398bf7e43bc3f409eee8 frame00000083 +38aacacbaa26dad53b92f297abe2565c frame00000084 +cc5327d87209193b11de2ae87293e8c7 frame00000085 +34ed3079a30632520417107e0f770d8e frame00000086 +828ff4ff480fdb58d8bb6db065d21583 frame00000087 +24f25387bb9012a1dd5302baec891581 frame00000088 +e08d94a02b5ecd689405a953ba2bfee0 frame00000089 +3ea1d4932df66c12c99af4059d80560f frame00000090 +e259373f4c81955dce48961458a645df frame00000091 +60d6c4cf2134a254e66ed72f7125a9df frame00000092 +ee4d6630e84f6f2a426bc81186380535 frame00000093 +7e61c0600018156fe37b0966ecaf0ea4 frame00000094 +628db05c2158cbd5765ddad1524d0171 frame00000095 +223c003d20ac5db5d815c65fb53f8a57 frame00000096 +271259792b8d51905434a675685a5302 frame00000097 +6e034e841c679d0bbc8184f53588c227 frame00000098 +5e81ac00b2e3aaa6bebd0f3054c8d3e9 frame00000099 +36abf57c67b665181348a0ee6de0de49 frame00000100 +f103c031aa67012b86914789b8dc0513 frame00000101 +9f0927c04dd703d2c401d444f6beebaf frame00000102 +14bd92cb9563d1dce8136d8381a69088 frame00000103 +5c1bb238220ccc0ffdd9342006cbdf58 frame00000104 +5db3dfa2f703b24f1d0f43c368e099bc frame00000105 +04fac3ab7849236fad421a246628d503 frame00000106 +740250e88fd8414d98febc6cce208e59 frame00000107 +903b8456ef5668265232ce537116f06f frame00000108 +69211eb6202bbea9f53dcffe4aea8f18 frame00000109 +04b1a4fa4eb4d2ea0e07193930c46dd7 frame00000110 +68ac052049e495eb9fccd5f198138544 frame00000111 +b609e16829aa232281ef9f9232e1ff93 frame00000112 +5124a7cc1fedbb845f4f491f995611bc frame00000113 +7273b7bdbb871641768282ece7bd79e8 frame00000114 +0c1a97d8c56b00974e96b076ff4b75de frame00000115 +fe187a3f9a2268dd3ce352e7d3751092 frame00000116 +370fcfb76be05b0868d069720ead1977 frame00000117 +53d448da092adbc5a3da13e2f28bba7f frame00000118 +3b9768a8b9dd6a87dc013ef32cf11d16 frame00000119 +9a2c952dafa62a12ade64a4e125c93d6 frame00000120 +e894bc50cd5d057236b1510975b7e74c frame00000121 +5533bf0d6c05f96d7a23e80ea6df572b frame00000122 +71825731d856043ff2536d4270bfce38 frame00000123 +1e37b9bc097bb00d9ab1366604df1864 frame00000124 +4596ce228afc772259e3db9bc64cf076 frame00000125 +8d21249bc538e7421237b5c725fb65af frame00000126 +b4710e8dc3f4f1f10edc5a09fb673cf9 frame00000127 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vixl/pig-vixl.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vixl/pig-vixl.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vixl/pig-vixl.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vixl/pig-vixl.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,40 @@ +1d90c3dabaf36fd9da18e16b0e848f2a frame00000000 +39f92f2ad7d31ae07df395d14a8331c1 frame00000001 +732fdf6862b31d92b7b7e28a08e2fef6 frame00000002 +103ce7ffce3cb4d693d2df4e1c4ec6a8 frame00000003 +e16b9e82ce5a0539a21748ebe1f3a4d1 frame00000004 +6f01c83d2939a8883dde6627d8b02733 frame00000005 +f25e4d2a9cca14f21c4eb52b35333bb9 frame00000006 +d37bfcf21308bbe4b68aab719b6bf6d7 frame00000007 +4ce7f4c3e2c83bcd63adf76e615cd970 frame00000008 +a0f79a447520ddf0ccdf04c710863844 frame00000009 +d91a33cdbc0ec2b9d52e88107e95cb13 frame00000010 +9d003caee534bce637d145743e3edf08 frame00000011 +926705786917db09895179854c61a123 frame00000012 +547baf4d6832617462f6fc901106d24c frame00000013 +9a880a03df0d860ed416fad3b0833176 frame00000014 +a2b2d252683b6b4edd79b724d5ce2675 frame00000015 +dd9d384b496e6b965ba4cf3beba1e296 frame00000016 +e1693db0271f99f7a772a64546b21c18 frame00000017 +dfa6cd516a31f5402fb060a86d7537e1 frame00000018 +b1d25e52ffd86291a3252ce00e8f4d8b frame00000019 +511f7be4d616c69a62ac8c23b421a71b frame00000020 +b1c8539453bff2632e49f45d125c253f frame00000021 +a79b3d328ce7d42fdc57f6396d50d162 frame00000022 +fdf11365a2dbf477e0bf633a92415ee3 frame00000023 +440da224f6ac4fd00beb2e345dd2604b frame00000024 +cfbdcd1ba131c0fbe4a778fa6737e2c4 frame00000025 +70d9328146eddd2cbcc9e0726473440b frame00000026 +8c69bea8a07d53ebb4529c6f7276c828 frame00000027 +fb1218a04a7e02efa4eaf4269131fed9 frame00000028 +4f540a0ec6c1cd431ea6dbf601c89cd0 frame00000029 +f90608ef70b934dae19f88dac30b1a9f frame00000030 +c068e7a124a5c28c2502462780039d73 frame00000031 +4f540a0ec6c1cd431ea6dbf601c89cd0 frame00000032 +f90608ef70b934dae19f88dac30b1a9f frame00000033 +c068e7a124a5c28c2502462780039d73 frame00000034 +4f540a0ec6c1cd431ea6dbf601c89cd0 frame00000035 +f90608ef70b934dae19f88dac30b1a9f frame00000036 +c068e7a124a5c28c2502462780039d73 frame00000037 +4f540a0ec6c1cd431ea6dbf601c89cd0 frame00000038 +f90608ef70b934dae19f88dac30b1a9f frame00000039 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vmd/12.vmd.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vmd/12.vmd.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vmd/12.vmd.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vmd/12.vmd.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,117 @@ +f9948ab2cc16c0cc575720be5d907fa6 frame00000000 +c10cdd0689fefe4ab98c537b2e94e042 frame00000001 +a7211b4911c5e7ee2c61ee59865b693e frame00000002 +64dbd2e1c63d6e103846fc4ea0f711b3 frame00000003 +46c8fa31dbe7032e9b3d6890c9c3844d frame00000004 +aec728b19c4b8711b1a54f25ac106b89 frame00000005 +f7bc19f6b0980cc76b7b07641ca4844a frame00000006 +6427e12a6a254801b0b3316f9c27b7d1 frame00000007 +b34c74317d5c6b34bf8ca7546c9e55b6 frame00000008 +cfa416203869dece557c811712dd90db frame00000009 +b5c2115f8952b456d7acdc6876935ff0 frame00000010 +6b51af7c5510a8c7af77cceed673d85e frame00000011 +0f1f5fc6f861174df6cfc88ae203b30e frame00000012 +032c5c6b1126b16ef1b097adf9acf752 frame00000013 +b8aa3709ca42de8987d7688f198bef1a frame00000014 +57ee34868d246605febf6b2870b1ac7d frame00000015 +f766f96faf80b8c8d1f17a4363d6ca26 frame00000016 +a2dfea211095ab32ac4c669a4ef4930f frame00000017 +307f28b29b69bccbabd824cf452b2d0e frame00000018 +09708f77e38c7fe4f05ea0f0d83811fb frame00000019 +b9f9725601860cbe62e72c29809fa9e3 frame00000020 +8ccfcc26dff007ef73ecf3163bddb0d3 frame00000021 +42e97ac58cd2eb801e8aaa0b392f50e5 frame00000022 +93cd4ac15f040192c9aca7eabb11ae4c frame00000023 +54378c5a111acfc977f94df3db3ecf28 frame00000024 +c546219d1ac3928df04b61bbb29360a8 frame00000025 +2b6d4311ac6b27ff12f8b9bbdb34aa54 frame00000026 +e920bb66b45b411ef35e130246556a19 frame00000027 +5265694444a66b3c16cb13f652a5df35 frame00000028 +39d165b1c6769b37bbfd1e60a4bd8004 frame00000029 +98d3650c13d55bd76b670d0a8d3b859f frame00000030 +b72a5fb221ad7962340c870a02e72604 frame00000031 +db26387327920dac54e32deba2e98829 frame00000032 +4d52eb0462c16ed0efbdd08d9513da66 frame00000033 +b071af9c6f8f25cd072df45dc5351f22 frame00000034 +13444427529930a44a4f8b49969acf9d frame00000035 +440ac06ed13afee0b90c400df049d88e frame00000036 +2f40776ecdd8ebbb8b6631773521308c frame00000037 +48cfa9f029aa5d3282d0c4cee4c394d2 frame00000038 +2caf74ebda2c5a17ca9ee7792da4cb4d frame00000039 +6254f6e05e6ea551722e8a6f9e83c2ac frame00000040 +b979414a37c746c3fc7987dc51792dd9 frame00000041 +75c5650b1f226d1b424ffff254d83c74 frame00000042 +ab058dc653801696b9dc775ef30f4a0c frame00000043 +2ec55704dc5631871bb0b9ff4917a09e frame00000044 +a05dd42ec8861ed8066793a4f6bba303 frame00000045 +4acf1ec617b845bc839e81bbc4bbe65a frame00000046 +f2206ef3ebfc4b2ce963ef909b2941de frame00000047 +b8a5e1f65df08153283d82f86216b28a frame00000048 +636914bfdeec5130581a516db8966bd9 frame00000049 +79135cf6b235d29de9c5b5286fd6e1e4 frame00000050 +53b55c01c754d3e5c28114154712dc8d frame00000051 +3627742b164ac75dcfa512e2c2be3421 frame00000052 +adfd44cee8fb903e68013b76694f30c6 frame00000053 +f543d5335219b4be3fc05f54ea6de7bd frame00000054 +01bf5c83ac2e20505a1c4c49fc9b47c4 frame00000055 +56482a3578372b31b49288a005ef473b frame00000056 +75a0a2a632ef1b4db35583a0458f5a27 frame00000057 +029a9838f5fbe3e3b6c1caa1a67743dd frame00000058 +cad1cc8e27d71063a5cf20266ce8d0cc frame00000059 +ad5a310857c7b2f31e8f035b6c235af7 frame00000060 +720dea97e935676a2ba12d4f2ab2d17b frame00000061 +9def802abcaaea61226001d54e396ec6 frame00000062 +642afe5d85c3226a9eaccf081b0a5c0b frame00000063 +b6a486bc03e25ba03569f33cadae8a86 frame00000064 +c34eb689e86d2c439668bf80d5407b85 frame00000065 +3eb3208e5a98a6397f17c27fd0552859 frame00000066 +77c390e3af58c28e55fab644c53af962 frame00000067 +6da319fce9e27209506ea948839dcafd frame00000068 +14a607fd7b670ad9b3bd4e39978e69d0 frame00000069 +958de06642a65dd0d43bac75914ac694 frame00000070 +0fe09b3e4ea6acdc04a5806f8034d44f frame00000071 +21b347ff6c488c425fb99c05cd0007da frame00000072 +f4cfed6dfee0c62b3fb8d8d6671fc13c frame00000073 +85aae3d5625906c4da46d8a13a25cc0c frame00000074 +e73fece8fd5258a07a1b7b9ec3d1cfd1 frame00000075 +ff59dc0e46393188541119bffc1fea85 frame00000076 +7e27a47bcbd8c178c2fb486aa2fdfd9d frame00000077 +674de256528a854a20f0ac02bc43b05b frame00000078 +cf4a3724ea6eebe7208ba38b938dc4bd frame00000079 +0255e806b1aa15f1106771704004428b frame00000080 +98c74325b50f7b23c261d7b62f8d0a92 frame00000081 +b220dc859ddba7a5eb6f7eda0e45cf91 frame00000082 +c18d5b8d4e6d58c78cddfd0f275902c4 frame00000083 +7a7aab5fc2706e279bac4f0b47ce0449 frame00000084 +d28f888c74ee077f547c905368d5296b frame00000085 +aa97bd06479648859621c1a116af280d frame00000086 +1ceadc72fe5ef520fac7dbdd284384da frame00000087 +6f75bb1045b127a3fb57a1d2f37c7e28 frame00000088 +2be91261119f6e77f80df6402159196a frame00000089 +c2a404b132afcb48c5ab80dac3853f1a frame00000090 +87119a7a6ed22355d6a61b889ee28d74 frame00000091 +06ac39b4df822344956d834535449f56 frame00000092 +dbdb3fb4fa91c2434794a2216a4e7a15 frame00000093 +bf60f6cdd45a9187ab01d2d51dec0f49 frame00000094 +7596abc44ee7c660e83d20f733f121ef frame00000095 +8537f67e5943932c9834e50721c5daac frame00000096 +fb4c53cf073963a96872957faa7f0e40 frame00000097 +6bda93975b19abaff8ceba18afbf6b83 frame00000098 +9b866e7a9a1abbde1db1faf9884925a5 frame00000099 +784b829f8a5eec6eac1a490fce59af81 frame00000100 +ee5af368ca036536bebbfc4234913f08 frame00000101 +7e1e90dc3ee17f46d39dd515886272ba frame00000102 +16754e8042548e5b669b03da4890eceb frame00000103 +b2c442b96b275b66f9c69f275174c4d4 frame00000104 +7212f2beb2c7d6e24acd0c04b12c009f frame00000105 +b133bc9eecc5b54a6ddbbe9486aeaa25 frame00000106 +29aaa96e8cca490cac681c82ee2ec961 frame00000107 +43401252ac0d137b73d36cf85d46775d frame00000108 +453f28fead283faf64a615f3142969f1 frame00000109 +ac100d175f809c1f52202f77652815fd frame00000110 +6ebf540dce932f8f91acc9fda4cae6f0 frame00000111 +fc00b8a6f9f784fa57f824b139cdfa50 frame00000112 +2f2f572aae86d98d6f87ed1b86c34ae2 frame00000113 +5eb9076aac21c1c250b5a119224f4b1c frame00000114 +0f8c8d60eecc031e0c784ee16a15d4c8 frame00000115 +8c8dd0225a6a657eb36d2259caced250 frame00000116 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/VMnc/test.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/VMnc/test.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/VMnc/test.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/VMnc/test.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,192 @@ +5141b606c908c7d7c00c586813bf8c0e frame00000000 +4c4feb2ea0ac8f7828e455c024ca033a frame00000001 +2b3f6b3d0b997715d66cc672ffd2fcf7 frame00000002 +89481681966ef8b801ed84e81eb788e1 frame00000003 +f153ec58fbfcb50f6aef9cff10d9e2fc frame00000004 +6f8a6d2eee82571578e97dc7ed172fff frame00000005 +979297880c9919d2d4f3d265dca457d6 frame00000006 +ecf479d7fe9e91fb7b2b6aa1bb935e24 frame00000007 +c27acf8048242b8c8ff67285bdbd0d65 frame00000008 +4cb10975cef4213250272425c3cab016 frame00000009 +4cb10975cef4213250272425c3cab016 frame00000010 +4cb10975cef4213250272425c3cab016 frame00000011 +c602f3c1c032ac60f7ee95fcc9b5870c frame00000012 +bb5e0facbea4d798d7881a5477bb098c frame00000013 +c8a4a547e8813001b9c5ce4b57c9b73f frame00000014 +63b520b8fd0c1a94995c7d0199c3da23 frame00000015 +aca198526af6dee390378d747869ead8 frame00000016 +348fcfbfcfa232c506adf59aab18ba46 frame00000017 +f151272d782c0f97863969c6ff01695e frame00000018 +6deb3c162aa8cbeda2813a45282ec704 frame00000019 +720a33d93670272c148c78c0ae738b0a frame00000020 +40ccf666342c94651450634c60b4ab62 frame00000021 +5d875088376686e18cbde8d4236d586c frame00000022 +a2b8d0c5eb7b025cfed30a8f8524e11c frame00000023 +c55bd13b1194a48efe8a39464d0747f3 frame00000024 +40b071f56e38112f7049bf680bb3820d frame00000025 +ee1dc5da6f9c26fda9355f2005d88ba9 frame00000026 +b70ea2c4b5727838061b34ed63ce764e frame00000027 +7294fc06aa502bda0b7ceaf5682a08b0 frame00000028 +60121920bf40783ae3a9dd4be0aefd7f frame00000029 +8b687d3702bf63e072cd14986ad723e7 frame00000030 +3ed9752864f249ba14993f4a11fd263c frame00000031 +4bbcf2261d663665f4144660afb0f2a9 frame00000032 +528724781deb2c5d833dcbef81695f04 frame00000033 +38870c9b5f714c57b2581ab1b7373c64 frame00000034 +98d9f7cbdbc650485e5b240dc07b8038 frame00000035 +adbaa78f5680adfc9c3b70345cf458c9 frame00000036 +be159c2330d2204ab10f8c07003703f9 frame00000037 +623101bd6ba93954da6c109aeffedebb frame00000038 +5231715687f142d7f81fc68164f4f910 frame00000039 +a2991a413c0df281e8a2b968eb23f6e5 frame00000040 +c21be017875aef4232397d98b84b22f2 frame00000041 +90780a3e39e5e7ed431da65b3864a4ea frame00000042 +ac58595788225f4371441a31897bfb55 frame00000043 +77fe2048f901a68924985c6a18d0451a frame00000044 +638e91bb4e5460d58d378aba0ae6630e frame00000045 +43232f69223034330cd59666532dd144 frame00000046 +58d219147967c117986c8dd80c2420a4 frame00000047 +f1337281019bd6418c2f869a3e89cc55 frame00000048 +a461642fdc24889f34653244ba1f4e7a frame00000049 +b6857afdac31a8204366ffb6da86f06f frame00000050 +1b6f3047b3c0cd161955114be43fad45 frame00000051 +ae8d028ab54a3f15156b2e3f2521515b frame00000052 +0b4ec40288942d94dda53b5a9e383c7c frame00000053 +d51cb2b3b75406df1b0b5439961f1467 frame00000054 +4356728e1520b510c8b8df17bf73fa62 frame00000055 +b495f0809ae6699b4b930a92fd11db01 frame00000056 +f28ee8ea98f84988aaee535a7c7dcada frame00000057 +aa6d0a03b5ca712bca3faa5ed8adc046 frame00000058 +cfba1361c36868b99f4fd8e02cc51ffb frame00000059 +565ed0d45695190fca5ffba4cde648af frame00000060 +3c38900a5b1280788723fd2f3d0cab94 frame00000061 +ba62413b13c928148b377241f3345fb7 frame00000062 +193d566950d00a521bc72b9aae32c197 frame00000063 +4a3c95357677af1d2f3f168fb8570219 frame00000064 +1c3191f363f49d490e3326177f7086fa frame00000065 +2b672e34a99dfda5e07f585d9c1c873f frame00000066 +f8c22d8c1acba9e556846b423ee2a835 frame00000067 +99bf3d639e2fd081d11976e8e8170a02 frame00000068 +f2dc69ffba4bff92107325287afe3797 frame00000069 +b18d797dd5abae5a1def035d1bf0d44f frame00000070 +3d86d62a7f389794b22f5ebecb2ed532 frame00000071 +0b8a1a3c55966cd88ad3eaa8e09f57d4 frame00000072 +e46ee0548e189332b5fe651a17f56c35 frame00000073 +196b8ddedd3856171091c80f86dc3059 frame00000074 +cf7637af38cb8688449658f56cae16be frame00000075 +f8cd0347e99d1e55ad6afb9177cbbfbb frame00000076 +6abf46ff479e6aace6613041755c9708 frame00000077 +701c65015e9e0d5438e70ffc64a15937 frame00000078 +f5aeff472e2699689c58c426e7f59dda frame00000079 +9ea3c5ab47eea2a9de8c969f99508c19 frame00000080 +f43566c33fe9616d365b6b4117899e19 frame00000081 +fb0809540eca7ed13ef98fbbd83d5a47 frame00000082 +a92e3d373358cea60de215010a96823e frame00000083 +b7aff05852a0e7bbfdb513cb596779a0 frame00000084 +e570ed1b3ad027718e8b9d3f75090697 frame00000085 +0d753e31e036d543e7bcc78dfaf5b5ab frame00000086 +2c09f8d687d5da4cc5ecf99c17e09175 frame00000087 +e2ccbcbc7f90459351f8f9baa67acd74 frame00000088 +b30877bcc691d58044b7dff3862f1b35 frame00000089 +b7253b4498d501aef4cb4cb197dcb154 frame00000090 +7212a7a4707c26d1479636a813b6001d frame00000091 +81d0e110f66a2a498c001f48adc2c6bf frame00000092 +e7c43e530675221fac196ab2593eef1f frame00000093 +1cf9d90e2b7dac916f734445445f3cad frame00000094 +d9d23f8b9c9ef995505b6a51a38bd195 frame00000095 +dbea1185102419f1f45392e992b91480 frame00000096 +325327fa5dcf520882fcb7c366e737a2 frame00000097 +8013ec6c06f628b1b23c39fc362b6ccf frame00000098 +7dec8091ef3cca3d495ce8682056c6af frame00000099 +8812ae31c83870188ab20902003eda2c frame00000100 +6c9c1756974afc93ea744e681071daae frame00000101 +114a3351a189310fdd1e676d92c9bce4 frame00000102 +ea02d9766fc6c8f0516bdb47587c73b2 frame00000103 +3b2d6799c9643d87abc35e472410bc95 frame00000104 +8c9b098fe44eaea0806f296cc471e946 frame00000105 +dbc6361d1ab455e59f8d8c95e85cb6bd frame00000106 +8e00d1c503f8b11e05d830c6aa473248 frame00000107 +013d948fe4976cd92832db7869a34393 frame00000108 +fe14f2a54f29a3a60cf2719349a2ae67 frame00000109 +a5517dfd30447ef8bb49696ec0648a6a frame00000110 +40b44ffd442288e23466c656dc4a30ee frame00000111 +5341ddb940fd37737c3c90695b6d60da frame00000112 +36c6722f7a5605064de6fa41575c73ed frame00000113 +707bd584b8fcd639c67e24562d826635 frame00000114 +4687470bd532d7344d71c65bfea10e9d frame00000115 +fa4a43db3899468ca5f7fbcb114210ef frame00000116 +29c35075c18469c2d7a8989dcf81e721 frame00000117 +9c0e63225632a354bab0c48f2082185c frame00000118 +833aa3124ced50a6ee9261ca69b94420 frame00000119 +fbcea8c4e1ce210ef0f81d79c8af2e15 frame00000120 +3a5313d9e6366265fbd8b956140e6be5 frame00000121 +ac3d86bbe37e783af2d1955ad37cd41c frame00000122 +4fef780eafcf607dfd03a54c52c378e3 frame00000123 +44b5c1b7d4ba15c125dcff0d1f64475a frame00000124 +472ea9134958264e1388b16d60241667 frame00000125 +5a793b7b1bc8430818d86f730db8a54d frame00000126 +ce4736610838dd91bfa3c188c1cfb814 frame00000127 +326bc59d78d4d5ca237a866e1b6bcd14 frame00000128 +c91d49047091d02048fa193948ac39df frame00000129 +22f4471c67d4c9c6eb2b02ee40280fc6 frame00000130 +c9647b6c75daba140fff73dfed7b9182 frame00000131 +4c0848f9187042b26dc02dd1bfdd113c frame00000132 +5a54081f9b7f1b18f6131faa40534fab frame00000133 +a49566fc503a0cb2518a2a6fa82a8302 frame00000134 +ec0d07e0281d05db28b1f82a0da46a9a frame00000135 +c4aa129ad8e9c866545e70e3e6836c90 frame00000136 +b3c9d3998533f11507c7661a8813596f frame00000137 +6354a31a772cb1752d7399d0d50729fa frame00000138 +1621caf995e68878f53344c4f693f1e8 frame00000139 +a679c9aae030402f2a3aa01571e74d6f frame00000140 +9102abfbc2cf363d8e8e1c5d271d0f07 frame00000141 +1ad6658849cdf430414bec43f12c2c9d frame00000142 +a24701943e618f22fa348a2156c08006 frame00000143 +2bb122e5d29ac28b3c7deb69d2ddd5bb frame00000144 +5e9f4e0d33c17eadd2764866f94b6b79 frame00000145 +f7ccf6d8357378cba21aff2b0e29211f frame00000146 +ece6fd17d2c3f3a6cb1987bafc533e65 frame00000147 +453e526ed3fa373898ad6d03488efd25 frame00000148 +22edaa10cd71119c629b8a2cb8c4d872 frame00000149 +7742cca79a50e15d3ba1b66abb86b0a7 frame00000150 +ed094643d1c1c01c351d9f5cacfd54b8 frame00000151 +b20702f4b59105e5991addb1bf07f54d frame00000152 +7a157975878ef3d630966565aa44a11f frame00000153 +a7fa95c69c5589496ce31b587e7c5d08 frame00000154 +8c59840f73a5fd13fb2e1511b7782301 frame00000155 +a1fa1ffdfabe77ffb41c9934d099dd2b frame00000156 +bfff3f1b3e51206e187fa90a67a9b49f frame00000157 +f6efa0b124c87c21bc8d00c5e5284f79 frame00000158 +43ba973d4a18dead0635549ef6a160bb frame00000159 +d5ab3c5ed5fba6665c35ca19d814b201 frame00000160 +ba6a74598168e9aadb4010ee7c887341 frame00000161 +039145187ed2bad77d3da19b9aa8e87b frame00000162 +bb6f34fbc799015866ad4ef9a7d58786 frame00000163 +a0073e6c463f03cc7126d241c1bc2172 frame00000164 +f2f81f06a49f81f792739ae880659266 frame00000165 +49cc6ad0df50e2b80ed1c4169496acf0 frame00000166 +37f348118ed75cf9c30b58d506e4f123 frame00000167 +c3126ff7e164711848ccfdceaf856106 frame00000168 +c3126ff7e164711848ccfdceaf856106 frame00000169 +47eed24db9c76333b487f2e31d414afc frame00000170 +47eed24db9c76333b487f2e31d414afc frame00000171 +47eed24db9c76333b487f2e31d414afc frame00000172 +7c3d7cea5adf58c13a0032bdb62e6b3f frame00000173 +a277e22ad3d51ee104347edacbeb8691 frame00000174 +27bd62e7c84d917cc6e3fad378b13abf frame00000175 +82a8880814f50389f623efca6b4a54b0 frame00000176 +6c12cc6f0226995f48633a92d6716efd frame00000177 +384feaf61a082a974138cccb2cfe6ade frame00000178 +1236d0c74d8bdae423a5aa9314c06c07 frame00000179 +b6df529addca016f02d3968962431843 frame00000180 +3cd2811ee3795ff52024a1783803a7b3 frame00000181 +03d2e9d987c91336f0e6c79755e3869a frame00000182 +6d9fac1b259d4c313eaa25437d570c53 frame00000183 +de4fc6cca316dfe78004ae2aff9865d1 frame00000184 +0ad5db44c5005dd2a8208f9731ea8325 frame00000185 +930b03242bbbc676caa3858420dd3522 frame00000186 +3fed1c9ea680b5d4872f13510a3b4550 frame00000187 +eddc7cdf5e43715d938442f637299c5a frame00000188 +e6bbcf2df062961bff69b5c915563a11 frame00000189 +e6bbcf2df062961bff69b5c915563a11 frame00000190 +6691d20506963f500a66b0557fadcc53 frame00000191 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/VMnc/VS2k5DebugDemo-01-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/VMnc/VS2k5DebugDemo-01-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/VMnc/VS2k5DebugDemo-01-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/VMnc/VS2k5DebugDemo-01-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,49 @@ +ba975e055c3dda7aef1d1f46f434db06 frame00000000 +ba975e055c3dda7aef1d1f46f434db06 frame00000001 +31ea37a3e4562a48fb29742a05b96a5a frame00000002 +ba975e055c3dda7aef1d1f46f434db06 frame00000003 +31ea37a3e4562a48fb29742a05b96a5a frame00000004 +ba975e055c3dda7aef1d1f46f434db06 frame00000005 +ba975e055c3dda7aef1d1f46f434db06 frame00000006 +31ea37a3e4562a48fb29742a05b96a5a frame00000007 +ba975e055c3dda7aef1d1f46f434db06 frame00000008 +3deee75c9e4ac7a11e5de628e6128911 frame00000009 +ac856afe24eae5e32e012fd2bd66b35e frame00000010 +4ab5686fc3951e067e3be9f673165159 frame00000011 +ac856afe24eae5e32e012fd2bd66b35e frame00000012 +ad966314e8bc4ce97f15e4837f585929 frame00000013 +338c587d681115f0490018c89f35ed0c frame00000014 +a6fe94c203c7fa7d95fca91deded8b1b frame00000015 +930099f4ccc908ece68fe868773d36fd frame00000016 +d1980032ec217697354c5875fdcdff13 frame00000017 +c29902e89fa1e090195d84454d3c1286 frame00000018 +fa18e38cab9d848df7191e532b1405c1 frame00000019 +7254cbfa76dc9678ddfc50d0faf9447c frame00000020 +76521427c47426eace37b5b46612c4aa frame00000021 +90585d4df50c45e203e83621d08b7f1c frame00000022 +6127ab88dcf5fa2663b597905f9cd325 frame00000023 +76521427c47426eace37b5b46612c4aa frame00000024 +36c4c1295d70baa7af803b1c78fcee01 frame00000025 +2a0db8f5feac9838c2db35919d3ac60d frame00000026 +d6563d89bdaccde7bbf525aeb59ae6ff frame00000027 +50399f0ea0276c1bccf731e6a83d3838 frame00000028 +17353f57c9727c35a5e839ace62009eb frame00000029 +e780cab1f0e40aa39a150a17a5ff4796 frame00000030 +926ea8a94ce151ab9a496f83b6abc9be frame00000031 +65d09903864d08217d7a77d1f8ab6815 frame00000032 +8fbae0e95e01e35e7109599bd403d1b9 frame00000033 +3720b9ab6d808324906e6ac1a433bd12 frame00000034 +7bbf1abbd34cd2307b4822d3cd307d9c frame00000035 +5b0f98a754cb9f9d05cad27d41871609 frame00000036 +31554aa31bdb95e3b960a50be3950ebd frame00000037 +20dab02ee7deb187c7c3ffb1ae9904d6 frame00000038 +def6be6f8da649977fceccb387b49342 frame00000039 +8c4fdfa0fa0ae327c5e22b3295539c5d frame00000040 +d2a31ac586572372f37a2c4561baba7b frame00000041 +a8bf3e13e00609d7f2b7c13bb5e372dc frame00000042 +8d6b62906d4c7040e983ab5e86a41674 frame00000043 +ce68c6897317f5745fcb217fceed40b9 frame00000044 +168e47b8d9a4652b6aa7622fe65f4792 frame00000045 +99e2d7c24a75ca9cc763456f296b9214 frame00000046 +5142d618332df4ecdfbc833e4a9b6571 frame00000047 +3c8d88307e5257c11b76486710c2b5a3 frame00000048 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp3/coeff_level64.mkv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp3/coeff_level64.mkv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp3/coeff_level64.mkv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp3/coeff_level64.mkv.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,5 @@ +2304ba4f0e91ca52ecd43c88795642c6 frame00000000 +f6196fbc7931d58a97390bd9959f2fb6 frame00000001 +97dccddd319371bd3da4d9d667d9cffc frame00000002 +074f6f48ea967dfe75f24d2795c641f1 frame00000003 +85806e30717834460d9e5a58914eae62 frame00000004 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp3/vp31.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp3/vp31.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp3/vp31.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp3/vp31.avi.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,111 @@ +8d654222bf463cfa77edc0b3ef12dbe1 frame00000000 +95eb34e4de84e7edaee1020ad9c78b94 frame00000001 +fe8d22ff111ceef18f01b59d1b990c85 frame00000002 +174913e619c08d10ceafbcc718e217dd frame00000003 +69ad30c991bfcba879e801d6376a150a frame00000004 +1ed17ed4abfed2a7d862b88576024860 frame00000005 +e16e1102c96b913c6f9a3d45be97b3a6 frame00000006 +713a280f4a5f8630229e3a3d9cbde4f5 frame00000007 +dec57155b24447d5216980e9f83d943d frame00000008 +bf064172f825d33860303fcb90152aea frame00000009 +8214d78337a4d41927a861d6be598035 frame00000010 +37b2274130d442a88c1625f6bb89175a frame00000011 +cc884df4c1ad620af3d16ff0a091f495 frame00000012 +2e5b00a3a2eabdd8d98eaf57a3bed4f5 frame00000013 +135d88812f8d5ccde4f1247081b15c0f frame00000014 +da1c55e51ca27196297029a0350cd6a2 frame00000015 +a57ff74a3f632a3baaeac1b0d9e25577 frame00000016 +fb5a367b43c5a5e0a2384f029276c01a frame00000017 +ae682bcc7a5946abbf2a794a7e02fd0a frame00000018 +421fa62369866d9abb71737a8d0fbc57 frame00000019 +99951e0b6ef3dc0c4f2beecf14fedf7e frame00000020 +67d3d87a70219766bc484acc0d64f622 frame00000021 +a451499d50217322dd52448e52b17c2b frame00000022 +cc62411a8b70dd153b044440c2754027 frame00000023 +7ac62323807887fb8671c450a4a08c66 frame00000024 +3225ebecba9a810a880eda9954e37c78 frame00000025 +084eaed1bab5ad4009d03e77a1c3596c frame00000026 +36b63d4cf60a2c81b29d2682f3edc561 frame00000027 +19e769366bc1f84a684b8bcd64e4aa96 frame00000028 +5cb9b8e6bdb9a7c737f8a797abde91a7 frame00000029 +96bcad0bd53acb2a18d7e8a124c2fb81 frame00000030 +dbef5067e6f2c8883675e1cc282e9baa frame00000031 +872e018205033e30aa40f6aa298bc1b3 frame00000032 +13c7dac9dd761c6176b71acca3934ab6 frame00000033 +82af4e1dbdefc2d978bc1f4d761b9e8a frame00000034 +7ec3c1f02881b7828d963d008d45c4fe frame00000035 +73565e183271be7a47cdf5c0dd44f536 frame00000036 +83f89c8504bfbb20808b3288d4aa31d3 frame00000037 +df0fa43e62eb3751f84633b1b5ebce3c frame00000038 +01d3a1b7bd09528fae807d257066b4e9 frame00000039 +592a02e934b7039e1c907a7c45bd4d77 frame00000040 +0da7a8f6f48e876b2831f654fd4fda40 frame00000041 +1f36d1268c40185585ba15c1dcecc6b6 frame00000042 +1597b69a59fbb927f24fb6433cc0af04 frame00000043 +b653e6e6627d37957c58ae7f1c7d7ad8 frame00000044 +29ee901a6c0bbe48cd6f70327522b7be frame00000045 +b7557206ec0b4a99a633cefd5eec77db frame00000046 +e085d2a4919535efed45d17c874e7986 frame00000047 +1415ccec9e1a82264c339eb306e9fc78 frame00000048 +9b2ff84d5c4087c7eb688b741717db5b frame00000049 +5f5a1574829a55d0bba0dc41b008cc26 frame00000050 +93e5c7ebba56f7cd5c26205ee2d55ce6 frame00000051 +0960eba785a05f755032680a43350547 frame00000052 +a2636905c98f13bcae0274b0a2eb1ebf frame00000053 +59014d566a113639c8e3accbfc67a3b9 frame00000054 +6c826aa12f5ebe3610305fc3d3c076b5 frame00000055 +dc6a433aa401c62833d9899c7d8c4942 frame00000056 +8c820f8e2d99871eba0fc9196da65181 frame00000057 +ca362e5d4720f9a3181d2d480905f60a frame00000058 +49257ca3ba72cff9239f0977178ef479 frame00000059 +59d3ab6bd07f447c6d2fdb05be53a839 frame00000060 +9e8f52a6923e6a6307c4d4ac9ff29c5d frame00000061 +7da57a43fc6919b404ce8f5cfcf1c8da frame00000062 +c8856811f218f81d6e7d92f850fea47a frame00000063 +8729c27362bedf9990ce52c0a8454541 frame00000064 +5ea4ad84f6456bec30a84f07310f1c92 frame00000065 +2e5eb5ce076b95cadfce9e7cf151e84b frame00000066 +32374dc0309fd84c14294586c9ed5a7d frame00000067 +519e067538092406445668e3295f81b9 frame00000068 +8e8edbfe85d4b813a2b3f697380aa88f frame00000069 +6b7402cc25b4984d0579f22fa5d1f11a frame00000070 +fd5b2c485bdc89566d4189222cd19b3d frame00000071 +ad641fe521b1b2a340aeb1cdec367383 frame00000072 +304f0ddda67aeb5212cbefb7c88170b9 frame00000073 +71b7cfc100bbebd7ae340f88f40d7938 frame00000074 +950e4b93706b39aaeb9939249a9bbd5e frame00000075 +8add75422b71d62937304888a77ffe51 frame00000076 +c4a43447faa142b886ae547d9acdc793 frame00000077 +9c411ba13c830cd50b6138e0a687ebd8 frame00000078 +2d235ec224ed69dcf63974aa4194d7fe frame00000079 +21057d9c77c7d07adb0af83f77c2dad9 frame00000080 +3b6dfed8c2445fbfe028901ebbe73f46 frame00000081 +f1cab48f567aa3771cfb2a599790e88c frame00000082 +d756e4b6eb947aeb3f3a762e821b57ca frame00000083 +2c072093c241c98cfed33ca26814f5f4 frame00000084 +ae8b8e952a61c8c3f765d13762d37704 frame00000085 +8c9f2c768181ef7d34931484c5d41385 frame00000086 +08bef07c0162b251789cbf9ae8ed2ad2 frame00000087 +c70e5ed76f5e796bac6567266d7b6254 frame00000088 +b339e2d6d9ca12854ff9426d17d1af31 frame00000089 +fd4f2f27cfef4e9efad4e2cd156d0b6c frame00000090 +6732f6955bb84022d7301a3f950ab5e7 frame00000091 +ac117a6c142aea4a355cff8e3d509759 frame00000092 +cff54e1d666628aa23d92875c489f7ae frame00000093 +b90ffd05da29e9a1b5f5a1881b562fae frame00000094 +99bffc1d1ccafafab97fb9de5074e3f0 frame00000095 +2837e70ce507d5a6f93520a9d2553b48 frame00000096 +f4768a1b93882dccc35ac4a39736d206 frame00000097 +6a129f838ac5dfa7fdb2cefc5a1315ec frame00000098 +7fb621102452e9483872bdd0e12d828b frame00000099 +5a301778ca3a2df863df38be93015a65 frame00000100 +9c19498e9ffea1b2237904c1dd9dfc2e frame00000101 +f43a9caf194d5d274a640c7282a7d260 frame00000102 +33fdeb89738663665faa0be81002af02 frame00000103 +2b138ddd694509dd547b33ed9b3c3581 frame00000104 +b9736f3056a2254d76a338d684a58474 frame00000105 +ad2152f66a42876bbce1c1d5c317c6b7 frame00000106 +32df8617a73b5493877fbe606d19f8fa frame00000107 +7c28f3e0fd482651ba9ab615bc7bba64 frame00000108 +c6157388ead9f35c76ae5a81acdfa689 frame00000109 +af51dc4a0d18122d23130a911258d881 frame00000110 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp5/potter512-400-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp5/potter512-400-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp5/potter512-400-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp5/potter512-400-partial.avi.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,247 @@ +949766990624ce317509f3680e69089d frame00000000 +984d4251242c09bebf30cf9bb4219218 frame00000001 +286d19f66ae198cdb56163d91a3e7921 frame00000002 +358b955835be99e3bf0cfca484134676 frame00000003 +6d55c71bef2bddf93261b3ea49879904 frame00000004 +1de3c18386b9f2b6390276afc8b86c84 frame00000005 +eb73c0cc2e9b92ace70072143584f1b4 frame00000006 +3d9ef6ea34e70f5d402a792acd14570d frame00000007 +d42fb0105ea5f44817860af7c902a031 frame00000008 +cc139e6a11a9e07d4e60ad3cc038efca frame00000009 +df4eb79e71e5161305f10ea24821eaf3 frame00000010 +3ffa41ca9e9e3f3a0e53ebeae55912dd frame00000011 +6b04ae74da25f03df54c67f8c1fd26a7 frame00000012 +9236ef57e6f2cbd9fb9d87c5daa00e44 frame00000013 +ad526cd7f586388f8a23c27c467615f5 frame00000014 +69d43917a68c84f5f0dd6d2d2f3f4e14 frame00000015 +a393c90d279e8418dcbb0c711a853e2f frame00000016 +370251e2208e50aedc6c62b6dd514de8 frame00000017 +1f31672ee07ce97c39132aa6973419a6 frame00000018 +761499e623ba9e0a6e1611f067126659 frame00000019 +498a6ff7da0fa419037e97025213459b frame00000020 +0634a2330b150de121ee043229dcf4df frame00000021 +ef04e209a43e38b7a2603fa0818fa787 frame00000022 +96ce1b661011fd4de386c2a0eea41027 frame00000023 +a0af61289c2c4d5856f04e9615794397 frame00000024 +92133fa92ce2711c4f980f615c6687fe frame00000025 +3f45e37617ab5730070ae4d8bdb531bb frame00000026 +c455fc5f35f0a87f388d3487a062709d frame00000027 +a83cbf3c05d91035d6f8916b51e8b653 frame00000028 +afa9f1c40996e6ddeeab0e1f385acf75 frame00000029 +d603863e8d9be7b0f76889a1a375eb4e frame00000030 +5dae2d9c68165fad94d2211b4f56fd4f frame00000031 +eadef42e2be5cfc5be8720a5b523d617 frame00000032 +8ea1c668e31f74ef54ec0e34cf5cc135 frame00000033 +09478cf4e5b038be1ae789db5bf5efd7 frame00000034 +2a6d575597141a2d675d86e95a14d775 frame00000035 +3f02a1fd9ea69daa67a8c80f3989effb frame00000036 +4e016a88b221fff1476421cac61b4a2d frame00000037 +5df900bc3bd8b9f91e0fd8686cea43cf frame00000038 +52bbfd5b0a00e63d8066cde7c79456a5 frame00000039 +b3a2ef46cd3fdb55385cf0dab10e055f frame00000040 +07b0115d815e42ae0defae7b214d031a frame00000041 +32cb902e0bb79a24045e44f7398f6119 frame00000042 +3bf7eb348ebf36ad10b45d6b8ef046ae frame00000043 +bdf0cddc3f37ed9fc7b47192f0d21e9a frame00000044 +eaace1163c89963dd455f05eb92844e8 frame00000045 +22a9e5afd2c91b6f555d4f773343ff8a frame00000046 +91aa7961b1d8a3e7f6a986cd147a2b4a frame00000047 +139b4276a45a305bf0d4c05d739a949c frame00000048 +89c82c8d3e8878b00a1a1eac6ffbd6d0 frame00000049 +b4d0e6e5a7c264f82f4ae71d85951d87 frame00000050 +cb967a3e01e530b69e13c9c478a97c45 frame00000051 +514bb22f69d186a172754883b3c7bf9c frame00000052 +c8633576d7257929a4d000af07f6d370 frame00000053 +5c5d376a55063f027632f309354bf4a0 frame00000054 +f3660cd1812ab8753182b52fe520662b frame00000055 +d1aa271ae6da5035581585d3423f4d1d frame00000056 +63b20728f0488189469b656cf2dd9cb3 frame00000057 +c97054884b569b16b155b98c468bf012 frame00000058 +10430ef205ee7143cc5ba61cf4bcf4ff frame00000059 +a46ab9c1c4918ffc34032a976afb5448 frame00000060 +3ac6d62d28131b4b15da3a63f144a915 frame00000061 +d468ef5f2e1b6eb7b84796b8af5d713f frame00000062 +48235442fbc96a9e2ba9d93f8034c73a frame00000063 +7e57a7d9708bbe2a41484102a95fb912 frame00000064 +a626cd0bb96de92884a53b4d6197a81f frame00000065 +b94fabad35ee0119691cc2dc902ea51b frame00000066 +30a4fcddf17ab386060455b25e0acd47 frame00000067 +b5a03b3509dca43b55d4998dbbb11e80 frame00000068 +0553d9b24728b866f9a87c9a9cce5119 frame00000069 +7218596e89d1cdbfb300992a6395dc2a frame00000070 +033af528b4337d9cd448f60e11c01d32 frame00000071 +ac64d8c0cf5e89411b6cce277cfaf7cc frame00000072 +ae03aaa83ae3a3f92731e25fbf35099a frame00000073 +2005b41146d4574bec40984703165d64 frame00000074 +f4093ef5246fa190b74a2016b18e7d1b frame00000075 +d3627ee398669c261fb962128232950b frame00000076 +9e981cd5ca6a4316ea36d847d052c7b3 frame00000077 +741136e487cec3ffc14247d6a7741ee1 frame00000078 +23168bd90a690e4d0d387cc8b90a8bf8 frame00000079 +ad1a1e967daca551502cff560bbf15bc frame00000080 +0d75e810bfbc7b875b60c0e1909737bf frame00000081 +0d75e810bfbc7b875b60c0e1909737bf frame00000082 +0d75e810bfbc7b875b60c0e1909737bf frame00000083 +0d75e810bfbc7b875b60c0e1909737bf frame00000084 +0d75e810bfbc7b875b60c0e1909737bf frame00000085 +0d75e810bfbc7b875b60c0e1909737bf frame00000086 +0d75e810bfbc7b875b60c0e1909737bf frame00000087 +0d75e810bfbc7b875b60c0e1909737bf frame00000088 +0d75e810bfbc7b875b60c0e1909737bf frame00000089 +0d75e810bfbc7b875b60c0e1909737bf frame00000090 +0d75e810bfbc7b875b60c0e1909737bf frame00000091 +0d75e810bfbc7b875b60c0e1909737bf frame00000092 +0d75e810bfbc7b875b60c0e1909737bf frame00000093 +0d75e810bfbc7b875b60c0e1909737bf frame00000094 +0d75e810bfbc7b875b60c0e1909737bf frame00000095 +0d75e810bfbc7b875b60c0e1909737bf frame00000096 +0d75e810bfbc7b875b60c0e1909737bf frame00000097 +0d75e810bfbc7b875b60c0e1909737bf frame00000098 +0d75e810bfbc7b875b60c0e1909737bf frame00000099 +0d75e810bfbc7b875b60c0e1909737bf frame00000100 +0d75e810bfbc7b875b60c0e1909737bf frame00000101 +0d75e810bfbc7b875b60c0e1909737bf frame00000102 +0d75e810bfbc7b875b60c0e1909737bf frame00000103 +4473e683c75d6b63de01d02ae6daa8e5 frame00000104 +c7bf242e321b2016df9156005803752a frame00000105 +4fb66b7081abae77c52860161e66a83f frame00000106 +27d209c149ada8cfb3abb7af6a458f68 frame00000107 +85ea056ca46f1a2458f0b76a8d69e0fa frame00000108 +4d9286898c684874b470d0b201015c51 frame00000109 +24f0b3463f594afb3093ef79f5c30cae frame00000110 +ac9c5a3ade765878856b7eeda7cc30f3 frame00000111 +097e482f184e07d0702907e77ae9763a frame00000112 +b57ab38aa28644087037b3765a9a092f frame00000113 +32377d0faefc260bc6ea9af219a09693 frame00000114 +5fbb013af8fd2c9af218a1de704d5435 frame00000115 +fdc68ec8c353b59cc97b17bafc4063bc frame00000116 +0b3bcc79a94af787fa31548589fa8c4d frame00000117 +384480994571b40ba449cb8318ab753b frame00000118 +e430058a8c353d88be85858aea314053 frame00000119 +7f5f5ded0957ac04358fa2c19bbbd244 frame00000120 +8d0dd4e7c2f26e7637d764f13e3be623 frame00000121 +3b0001c57f77090256c41666d6695cdf frame00000122 +d1bcf6a9a232819ca63b03274594c077 frame00000123 +1091fe61e1e70ca07be72ed9555aafbc frame00000124 +32e09d3020610c552ca4f1c545948cc5 frame00000125 +c7faeb2834804ac1bb538ebfaf488840 frame00000126 +e2b51b5cc77bb37512b2206410dc3023 frame00000127 +5218c7ad61730bf0a66a4bebacf48ef4 frame00000128 +0e044ed31aee534ce4f19c3350adfe6c frame00000129 +5da371fed7b14ae6d1884e4bdfdfa046 frame00000130 +e2aa583e06ea3bdaf5fa607324b6bab5 frame00000131 +3d6de4be3bc9f049449ae0ffc263eec0 frame00000132 +b964fe22d8ce77b1d4f05d8d6e8e7407 frame00000133 +113484d62c36c9d88ccc4e2cb86a3283 frame00000134 +3aa5376b7729affccde29e55a7c718d0 frame00000135 +c09601e15846a9afd2e1eddabefe7c1a frame00000136 +66864885bf4baa920fbaec15b00c59b6 frame00000137 +449422e28a799a934b3ef7a52400527d frame00000138 +4ac07eab61253ec40ec2e56a27003d03 frame00000139 +dd2aa0224fed6408c78a17b358008378 frame00000140 +7ac41e7b885e447e18d143df214ebd15 frame00000141 +7980b4a748fc6570919a28444fb25d21 frame00000142 +4f8d09fa1a7f4b8c3e56503ad371e912 frame00000143 +0c880bed998990e9a3791f159f22935f frame00000144 +3be983494cf555923f464893abad5392 frame00000145 +e86eaf56ec351d39319d1846bd721faf frame00000146 +f27f38452a7e247db5bcb27b10db71dc frame00000147 +87ede291a626b9ff9e3bc5a7e003d082 frame00000148 +4466c2e025a328d3bd04c76cb912bca5 frame00000149 +ccb873c5c706065f731941601073a164 frame00000150 +408b28d587bae3d4454a70221bf73833 frame00000151 +572a73b0886d0f307a779fcf278f6851 frame00000152 +5003ad892602313d3fd8894fde233d82 frame00000153 +3b6f71d591613a55b82e4a02dcc4fd5b frame00000154 +e6781e3c176a3454717d3079b1afa034 frame00000155 +207b4600a94b96cc2d49ead234d6ea58 frame00000156 +2726827bc25d87dbbb573e492c23fd2d frame00000157 +d9bd77102dde3549bb1feeb5b750e0e0 frame00000158 +b4ea0a11d579906265096ae62e79e245 frame00000159 +d8f45e244a0856032762b49e8399ed64 frame00000160 +bb36db433e59835a7533a9eb40eb44f7 frame00000161 +f477196519d484c89b423f9bd90b5756 frame00000162 +2b735c22937bbefe8639fa20e063a56c frame00000163 +ebae862def8ee89b3a5f92c781aeae2a frame00000164 +b697fa7deaddf95b3d567948301da5e4 frame00000165 +1945229e5c1ed0b46a28b586eef86154 frame00000166 +cce3ebebe8c6a10d60719700f8f6f49d frame00000167 +3e1327daa64180284990592fe22fd4d9 frame00000168 +37a47e96e3ca9bd12c7b8d4059446491 frame00000169 +c06e0f8dfa1c6fd7dd4178f25716c045 frame00000170 +d0b9ccc43c0649f306b7d92e8beaace7 frame00000171 +bfe5438786df0c2bb28e59bc8eecbb47 frame00000172 +ed86cded6160f94e5b29ddd2c3473009 frame00000173 +0c5b36e0142b76f5ae52b95bbbfb1b5e frame00000174 +1ebb360c581d542d15fc2e9d21efa0a2 frame00000175 +fabd0892f62b49cf383abf96c4dd6cbb frame00000176 +4a05c2c4e3ad47e123da520bf483b0e1 frame00000177 +22d673f9ac17d54d16611e20ea2f44ba frame00000178 +5b4af4fb5ff2d0396c2dd1bc5fb92eaf frame00000179 +b1a1e8681041a3d3b30805be9834d478 frame00000180 +7d6703280ca7ff68c7b1775ed2dc4548 frame00000181 +046cbe08d2804f97991f7826fb3ab102 frame00000182 +c38e17a6fed61af8d8edefef6af91403 frame00000183 +822099a0f37439aeb55494b134be6c5d frame00000184 +ee844ac480956e530ee5283ab9f9a244 frame00000185 +923576768935f91d64fcc7fa80ecc06b frame00000186 +44ae0aff204077f985ee891f3600a76b frame00000187 +c430178e10a1ff2a99351b6caceac693 frame00000188 +3a5742f90ee0f3269cda26aaa798f2ae frame00000189 +750b799ef92ec7aaf2544d41de0866e6 frame00000190 +7ac4eb3aa3c5b2ee57afe82ae533c88c frame00000191 +e0b3dd66c92d2f7204d773644ec73a43 frame00000192 +b6965bd28691ee014fc5a86aa3de92a6 frame00000193 +ce61fc44273f150289afeacc4119e7d6 frame00000194 +8fd06769a611b8cd66af965dfb1340e4 frame00000195 +521def926acd2c8b94b9efe5d3271072 frame00000196 +43659ba3fe64fb0417182d8d088926d2 frame00000197 +47001ef7d59ed5208c9f42fdd9e2e9ec frame00000198 +5aad946941de9e7aedaff2bb3897ccd1 frame00000199 +a0bee4f402040314deb242e77efa233f frame00000200 +7bc5c22ed5e1b95ea1550c75efc98e41 frame00000201 +0b3823bdaa49b30c570d14bb80bf4b61 frame00000202 +5358dab4549419b9da2c07b2e9f8f44b frame00000203 +f1e694b205e6460f90fd26fddae9f7e2 frame00000204 +a319fd4db1fccb9ca5262ab939c27688 frame00000205 +58a205f9b20c7ebf49ea633dd0508a53 frame00000206 +1f0fbb697d320922e20a0b318458d09b frame00000207 +cef5ad44b9eb63dcecf7c2ad20284280 frame00000208 +a4126fac9a987426502312fa7adf24be frame00000209 +6e3ea972f1b982d6d752a677cff80e75 frame00000210 +0d75e810bfbc7b875b60c0e1909737bf frame00000211 +0d75e810bfbc7b875b60c0e1909737bf frame00000212 +0d75e810bfbc7b875b60c0e1909737bf frame00000213 +29cbbeeed21994063c04407d3158d05c frame00000214 +f9ec01ae2161d2ed89a492120b05db73 frame00000215 +577856c33f827e4e9f57f4da8a3aca7a frame00000216 +064d4932abd77a7a765132ca46ceb1c8 frame00000217 +ece48deb620b386839f5217cad943d5b frame00000218 +c9488440a86a287f678e15bfe2e3a020 frame00000219 +1d22fa0d687ebcc91338266859c4f155 frame00000220 +d7b267c98a8db8b231a2ec3fbdb61b6b frame00000221 +91ec20ac1b7ce6fb383b54403645cf7a frame00000222 +5b62b1ba346fa0298572cd6a2f2d7d87 frame00000223 +0106ecc582196c5263e8229655a71171 frame00000224 +2e9b645e0715fb731c25f9c45d756aaa frame00000225 +0c5955b73345b8f04bcf89422595d02d frame00000226 +b9ad34d9c839acd67d04674a990756b1 frame00000227 +7e05d706794a85586e7500b91803365e frame00000228 +d30e17e92b6e47971c8b8a25855682fb frame00000229 +e5a936652c972bafd8659639d82c46e2 frame00000230 +a6da8ec1936074cac774ce4cffeb7460 frame00000231 +48712f1e78fd9d417a52928246aabe52 frame00000232 +72004a23adcc72ef113230a0197358d7 frame00000233 +060f997f48fd1c93faebd9175694f9ed frame00000234 +0faa22b67009d79df563453f6286a2c6 frame00000235 +ff8b05c321335e3d329899a56b2fa0cf frame00000236 +6fb3000a53ce8cc9db4d70b681dea00c frame00000237 +24e5758abe6372ab3a0329d8c4b0acd3 frame00000238 +3e0d14295adf200d60ffcb17bbbb4a13 frame00000239 +b117d2c9d0c178c22ab929aea3ed6269 frame00000240 +34a65f55e69b138b5ed2cbe5f6ef146a frame00000241 +569c17dce5a6f3bf025b5ef7f3d91664 frame00000242 +3805a05da91c20b02425594904527a4c frame00000243 +880be262908705f07b9c6249b6e10c97 frame00000244 +075abeba8e60a96443d325324e59740b frame00000245 +a33be29f57c7031874ac3f006f1e3975 frame00000246 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8/sintel-signbias.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8/sintel-signbias.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8/sintel-signbias.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8/sintel-signbias.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,6 @@ +12ce23b288485be3ddbc1db28c21517f frame00000000 +ce352e1079535ea058c0e9ad50f7cdb8 frame00000001 +9f6bf2739a027dfd12c81586cf75d3a3 frame00000002 +7593a85ab7790eb39d65fc53f769ed8b frame00000003 +52f47f1e0348f3297d9f233fb5405e8b frame00000004 +cd51d2c200bfd66e8e1b0fd6b404570f frame00000005 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-001.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-001.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-001.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-001.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,26 @@ +83c78b5db579710f61f9354d5c51e8c8 frame00000000 +8d089d226f52d6cdaffdb3fcc080b75b frame00000001 +acaae81ca812145e85e0be83bdf54226 frame00000002 +e94651d798b6bf5f09a9bba10cacaf7a frame00000003 +60c2607913e528d501962bf407341731 frame00000004 +e683f2bf28b31e36db88087bd03b6917 frame00000005 +0c2923785051bc9b90c2447a85527764 frame00000006 +1bc97b6b2e4ca36b149c3768495747ac frame00000007 +0586d948ed3fd479c6dd08055973bcb4 frame00000008 +c9a1198e1680487c77a2d1631695aeec frame00000009 +547d8ffce9c085231c74717a9b815625 frame00000010 +d31c02a5591eb7bd8e73703252e1a1ab frame00000011 +23bafc8e22b2ed7e8c5e52369095cd30 frame00000012 +9725d52d7810a19b20dcc9bb0fa36abd frame00000013 +7aefaabdcd2595939fd05078d01b484b frame00000014 +828e758d6f0b29b2693b2dc6b09249a6 frame00000015 +53f09380dde1420ba270b74d8819537c frame00000016 +09791a7db3bc28258350cfdc95d8f224 frame00000017 +2050271dc4ba3f3e427cf8088c96e28d frame00000018 +4e69d3f7cea45844b740368fcd4dd815 frame00000019 +4ed07697e239b7f12ee6a97ad09c08fb frame00000020 +1437c129bfbda63ca1d39a94ee91b097 frame00000021 +4fc951bf45e164b711591155a59c73fa frame00000022 +97d1007e27b4b9072751e87e8d1f1415 frame00000023 +18c809835dcc3d30c93ae1be569dcd24 frame00000024 +de0fd0035a542791c4dda5735657efc5 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-002.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-002.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-002.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-002.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,46 @@ +872e9922f37f0e92c767d33e0a15b8e0 frame00000000 +ea5ad6c6ee4355018fc0ba83b5172836 frame00000001 +fe744612b2167c9ba6e1dc81c031e16a frame00000002 +744359695caee3f32307a2d7eef09e85 frame00000003 +07211ac8d8bae4d931ade402ff6e3c12 frame00000004 +2ce02854f228b1378d9dc34cab8d343b frame00000005 +af5222ad42c4f22f22fbf19c26c02dcb frame00000006 +88538d39f2647df8fedf15bd1b767bbf frame00000007 +d0d936471dd4e9922eb067c0f09eacab frame00000008 +03cb1f5c5026e96f6e686aa1fa9b1028 frame00000009 +2ebe35e23d2244c5b0f777fbc01f8f37 frame00000010 +f9314f5ea91ebbaaed6e37ca0701ed67 frame00000011 +37dca7530d09fd1e8bad154b9e312ea2 frame00000012 +9841dc8ff6424abe362c4dfe03b5fbd0 frame00000013 +72bd0b70c576dfb544f622c488217491 frame00000014 +309b21c126153f20f312e38a8dad44e1 frame00000015 +0acbb170ede66ebdae4e9d8e56908f75 frame00000016 +318c9c3e531d00734b5f78433da176c9 frame00000017 +0388dfdb2a792148b44bdb705cc2df99 frame00000018 +f440adff2b44888becbf3ca16e425441 frame00000019 +ac41431627d8d1712d40412ab8c3200c frame00000020 +417e1abbfe2a078663dae688ae4a9bb1 frame00000021 +73d493bdf4a29d5cfeec610109f582a8 frame00000022 +3c026a536ef36467d4a9db6bcc20cec1 frame00000023 +57836430f2f10862b84541d99cca062c frame00000024 +04ad6fa97e1ff49931b574bdaaddd5db frame00000025 +e94f2ec4cbf2b9067a4a4307eadebb6f frame00000026 +e3542cdee672d97c65ab06dbe611247d frame00000027 +6c83c6c76aa8bf73646eb7a714cb42bf frame00000028 +b5f64c6fc6d0c777a0a0b9097862f171 frame00000029 +293dccaf5027759679bb9e8696b6381a frame00000030 +1a3d015ff9b164cb7922aef0aeac520e frame00000031 +93f9152d9425f0ec43160a0c01c485b2 frame00000032 +c7c4a8f78f781f70cedc44edc1d06911 frame00000033 +21330442d5bef415fd765759d867c98b frame00000034 +6164258040f85206a3833aeb4f27a34f frame00000035 +3213e1405dfe6588a7334a8bc2b1e47f frame00000036 +a619fa73f0081a349dfa2b000de19045 frame00000037 +1f3cec4bb793dc4a118ddcf500090f37 frame00000038 +12308ec77632ca10f1451aec8e62b82f frame00000039 +018c7f50ed4a494a9fcd32fdfed6705f frame00000040 +a7282728fbd7e0b49a6967b0ea4e1f61 frame00000041 +6aa15ab83e82f246ee9c7b7a040bfaac frame00000042 +e4c17d2603e03753d54a142491cf5dc0 frame00000043 +0a7331aa707e42e732f04e9175438195 frame00000044 +b522cfa3f3c706d1901231bb9e6b4b8a frame00000045 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-003.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-003.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-003.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-003.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,46 @@ +96e6ce168b5ef377053e86ab5484e7f9 frame00000000 +10fd750292d8522ab7ee577043604789 frame00000001 +e040995173dc5c85abbbe38f6823ff9a frame00000002 +5aa18f4fbd8b5b887d74f84cc92075dc frame00000003 +f0dc7f520e88b94e5cb924d804b0472a frame00000004 +2375955dce3bb0a824779a800cd1555b frame00000005 +3e96a0e477de39530e1950cff284a854 frame00000006 +6cd40fa8a89221f2b990bd8af2a9ee14 frame00000007 +0b929243ceeffce836279e2aa84647cd frame00000008 +1e95f0ad25fe033076b57c3852bb3550 frame00000009 +81aa93a3f9c56d2aa4b8285d3507e6b4 frame00000010 +cf9947a302dec306d7f487cf3a2731b0 frame00000011 +3b9ca47752db95a049678da07974b476 frame00000012 +aa6788405dc47dd44867fca6c95ba3d9 frame00000013 +276d1c62b908c081c7bbb78f943b0de1 frame00000014 +eb006b6218e457fd794e9b3a5dfbf638 frame00000015 +9dd5312833e770286c5aa5436a00376e frame00000016 +7899278e66aa255ce5bf69a6e1137d0f frame00000017 +0ac7d062ea7550fa0717723b1272abc2 frame00000018 +d8f1bb881a46ecafcbbe457a004a71f1 frame00000019 +cc3a04b98159189a74b5241df540d8fb frame00000020 +4e29eb2c8c465ae9ffcfa28ec0b3694b frame00000021 +608fb6ba526e6aa4ad1c0290aedaa69d frame00000022 +4acc6a73547be6310b9a275436c55805 frame00000023 +482cf409b86242d30f3a78a6c85364df frame00000024 +a22cb76770f112eb1169218cc87c1e4f frame00000025 +e74675b051ff05e178a9a24893721d99 frame00000026 +ee5061bff62c8c8603b7bc2bb2bb29e8 frame00000027 +a3c0ab11f338bd488c69f2b62e1e5a74 frame00000028 +9f6b7e30e0ed4e272393b9a9957752e1 frame00000029 +9cce9f2ffff1766d05bda04e46eff997 frame00000030 +5105a2ba923bc6f21ea3d32ab1bc7bf8 frame00000031 +957d619a1001e2b5e52db166b66b7f50 frame00000032 +fdb4e71cddeec8a321d9c8d4ffc506ce frame00000033 +9ee646940fb8ac2312d29e9f1c3b6d40 frame00000034 +a110e81d2105beae81cd36b15bc5ac2f frame00000035 +804b6d8fc99fadb9c6bfdae3becee6b5 frame00000036 +e217627bbaeebf30456e38aeb1f0746b frame00000037 +56468a2c548dd3085b4bce88c4a1e41d frame00000038 +ef170e7f21e2b262525b43d6b25dec4c frame00000039 +3acc3c47def8a0fa0561eaacaf9e41a1 frame00000040 +0c3e2187f13e4504fb4b246706bba83c frame00000041 +397326a22e6e49487309c39d64037df8 frame00000042 +95236c1319b6f1f692b3998547811ee7 frame00000043 +5aff1957504884abf74d6fb74b74b032 frame00000044 +6de06343435a8926a746037cab5f633c frame00000045 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-004.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-004.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-004.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-004.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,26 @@ +83c78b5db579710f61f9354d5c51e8c8 frame00000000 +d173eb8a8211a05672b43206609c9034 frame00000001 +204e3e91613d647d30244c00fa2b9563 frame00000002 +3cc1a395bd10a49b006741778285925b frame00000003 +024548b00dea4f104d6b9a728be05786 frame00000004 +01401e9418f2e00ab4ffdb3296d40ffa frame00000005 +35d8b3c1ef9cb864315b7502b93629b2 frame00000006 +aeb44f0fe4c2eecb26c0bd657d65b00b frame00000007 +42e40bed012bacf59f0c41d4cfd3e52a frame00000008 +9796191fa2bd4572123ea043396e8485 frame00000009 +2d6d68b902129f3c3f1730e73b98f9c9 frame00000010 +ba348b89248b92d0b86d794dc413e6a0 frame00000011 +5ce49bf164033d49bef1b23120d202d6 frame00000012 +54837a426c63a9c40ef8750232615dad frame00000013 +350bcddf9a34f5003f6f655aaa020a00 frame00000014 +babb82b1e2ca9315816b6f43b8ef84a0 frame00000015 +c770825785c51fa374fd5bb08ff9f536 frame00000016 +e9e0f92e416fcd27ca2e93a0804ac938 frame00000017 +e0f2b89423da549eaa8b2b89f956f0f8 frame00000018 +9926b7e13b51115735eb0af8bb5e4ea1 frame00000019 +d6b30a058b854c54068ebfc2b05f8fa0 frame00000020 +a03048df79e41ada8a3ecc15a85e3f94 frame00000021 +34bef9af0633a43434841fd5189c161c frame00000022 +219b447552b1ee409c1b9b56176d36bf frame00000023 +95ea99459eaebc2f7233feeaf0549224 frame00000024 +34e08ce4067ca67ee9014cf628b6bb1c frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-005.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-005.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-005.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-005.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,46 @@ +e7a4be434df4bb524ba56a03cba901f4 frame00000000 +d903ade6d49e51485627c044fbb2190c frame00000001 +af07ee39629b852870104cb9a9dde9e3 frame00000002 +388a5f736db2de15342b62294fda4c82 frame00000003 +a072600936aa77738fa2fa88ba212849 frame00000004 +0f96b1fb05b92498c0e1fcb6552e7e79 frame00000005 +68b0db002a0127ee79a7c70062aa8c3a frame00000006 +f9bc8edfeb9ceca9227a20cdab6788de frame00000007 +bfe2115b000565abc3dce1d38f804ed7 frame00000008 +67f17f96177f5464af1b97452560d2af frame00000009 +658278016e5409b69d014fab0d94d0ea frame00000010 +04dfd36afa0ddf22993d21c0a0fc715e frame00000011 +088e5a7cc75a895f01f7a4362f104bc1 frame00000012 +fb622a1a421b3689950f1adde9296dbb frame00000013 +3711ac7adc816614a2efda9e138f53fc frame00000014 +8e6fe3e68ccf53f23dd430b611fbfa6d frame00000015 +1c77dd651cd38d3308671f0705d29926 frame00000016 +bb5d7afccebc5d8a29f5980d21530d61 frame00000017 +e51f2eeb39afa50ea243eaca39974f82 frame00000018 +7a73b1546fb5d8d4b05ebd4c839f74f8 frame00000019 +62a0db46717d7fb6523c62968fd3bc85 frame00000020 +98d6e520a164c42c5d19167c0ad48b22 frame00000021 +9749a21ea432221323c1a6b61ea59d51 frame00000022 +45fa9a9583db0139611b860bed8f6bc1 frame00000023 +aac06fe351759ca81a5028f2f4a7b534 frame00000024 +7b7c7c16a377d61b6fe474541a18f0cd frame00000025 +2a84883fdfa8450d46b8b9352b7d5a87 frame00000026 +3fc42d7dd6fa25ec17d8f2881f81b376 frame00000027 +bfb243be1eada17adab5580b748248e7 frame00000028 +531fd799989db62210efc1999397d280 frame00000029 +1c1e68673b295e17fca1b14d1eb1995e frame00000030 +12ee0f8810a1a3574337ef98987cf919 frame00000031 +0c6ef1cec243c552e83054d5ac56a8c1 frame00000032 +cf0af3fb96e57143d335086485fbfa5c frame00000033 +f5df68bb123d1f2f59ba471fbd118a9e frame00000034 +0b4a0cf5dd7968fd26959ad2849655b0 frame00000035 +0ba766224688a95bfa43ac2453555972 frame00000036 +ef3f9fd7e5509bb880377fa1997d318c frame00000037 +d7486c3176cef98c0046522acbdaa4f0 frame00000038 +f8dd15973993f4a2acd1d34b3610622e frame00000039 +e99b7f294e6bdd9ae18f013f62174fcd frame00000040 +68ccf7e14a1055b24c5faf1b3a1888e7 frame00000041 +2f230afb6e5c67e4b7e000317638e919 frame00000042 +9cab31ac76ed26a879ac8b88bf7d33a1 frame00000043 +1e2affc0f458808b4564bd0453565a81 frame00000044 +79669092f6c73053c3de6d0d1408cc8c frame00000045 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-006.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-006.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-006.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-006.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,45 @@ +88cfc1f86fb56df5c30754a31b51903f frame00000000 +1b975cb3bf99eda8c6239c9f146a0b45 frame00000001 +3f9b8faac7059c37ff449d81cf68d5d9 frame00000002 +9f3cb30433cd8b5c89b7ff2849f0ff8f frame00000003 +a6886bc222efd353936426293d0b7e47 frame00000004 +6f35d5269e53413e655596491fa84bcf frame00000005 +b5f77fc28fc35a825ebd4c7b317c446e frame00000006 +7c8e0233ec30ffa4ccd0781509e2a75f frame00000007 +55869dd7fcfe4dca651d88b207d7eb69 frame00000008 +3458f068c9b7e515d6f44af37e8306e0 frame00000009 +ef27717c104b592925a3f299861b4931 frame00000010 +0839f031a8f3f7ec33ecf3c1fa81d73a frame00000011 +dd5bcaa5c0011ccccf792e330e4124ff frame00000012 +b9253336a310bd4ed9fe3c3fe897c8c1 frame00000013 +e401bb33cf65dd9dcb47b4e94273a284 frame00000014 +674497ab9f79bbf743ce461cc42d7450 frame00000015 +6891d9416b792dfe2235a97e409f0b01 frame00000016 +c800755e160f9c924c0ea9451ff81d30 frame00000017 +d156a2bda475e6041513adc1851ecdb9 frame00000018 +67e294af9b86b3ce280e9e5540a4fe57 frame00000019 +a5114a2ababee84520636eb076c9bb18 frame00000020 +4d3d769291f6af14ae0afe151403c87b frame00000021 +505277e7156c05b61a5becf00510d540 frame00000022 +41503fba5234b61c638dba65d4814237 frame00000023 +53a293e2fb593201dcb197fc3a1c22d8 frame00000024 +c005bbe180b83ed44b594b594b17632e frame00000025 +2da55342f2d0cce494d8fdc41679c3ac frame00000026 +79bc401d4ef45fc10a15748acfe15d60 frame00000027 +c2deb2c4e324d7b1df1a7911b458fba7 frame00000028 +136b0bc0a5e0c0ef75b4024d2cedb7a1 frame00000029 +028b22fee2b6824649e84344f6dbd811 frame00000030 +f5c5739a3f0ab96e0fb6673047770480 frame00000031 +6ea8c0d657eefaf3726a6c08a08f3808 frame00000032 +bdaa8e40aa063dee8987cee9b35b11b6 frame00000033 +c1aca111373169cbd18c168a503779c4 frame00000034 +0553d9eb32a945f9ddfaa30b7f1b8f19 frame00000035 +cbf614dc7af7d5b702d3ef232692fa7e frame00000036 +ffc7c21c6ad90c3fe0330c6ae2a87adc frame00000037 +e85fb7ea08d783801db43d6d4e6ce9b4 frame00000038 +ad4da9c589d0e57a457efaf6fde835f6 frame00000039 +28784b916ea6d93a2555551d2b706c2e frame00000040 +b3081ca3540f29dd172a27ece2e0d032 frame00000041 +577f5c5edb0d0060227b369722a6310d frame00000042 +e1cf8238160d8f11da4e173fd77dd125 frame00000043 +8a7dec8eb7b363cca9dc8bea974d8524 frame00000044 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-007.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-007.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-007.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-007.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,26 @@ +98bd0af6928c144888a9c320270e9f0e frame00000000 +9ff7cff703d58481acd233451388377c frame00000001 +e4cd8815527846cc782ea61ef5a46e49 frame00000002 +db45275b87e194e5b505dd8c47da4f5d frame00000003 +c889d0f7bd34faf4df0e0a9eb9fc292a frame00000004 +4dbfb1727baf9b75980e7fdd44ca0924 frame00000005 +5f217ac95c891dc81f7193fc5352d582 frame00000006 +11166789635e472f629510f551b11e2c frame00000007 +336e6e42e67e1ccb7cda6298cb63f192 frame00000008 +02dbcff56882e304d5043d0f9b1ff9ff frame00000009 +fe033ea2c6b8b81a9328b470f8b0d6bb frame00000010 +0e3330fe9a7c0439ff53f18f0d15eb48 frame00000011 +6c0d7e042a3bb32a128c4a405f59b426 frame00000012 +7e51afc33dbf4b77fc5735f5d9ec0248 frame00000013 +a8381f193f34a5071b8eeba7f5cd1968 frame00000014 +501a7914b47ff85c24f0533ee98b9fe9 frame00000015 +00bd5fbb7e3b66514e6c77c3a5f118c3 frame00000016 +23e296d12a45909cadda252b9f4e67bd frame00000017 +fa0b5c69bacf766551bebdde0910eb9f frame00000018 +f5cc24d10d58ebc50503ca321db708cc frame00000019 +3997eb9ff6231dee9e23752776113cd6 frame00000020 +68d4c9cd494d91dd70e7a94c7a4b9a12 frame00000021 +647b34f3aa7318adce68803ba00104fb frame00000022 +ffed5301bd6fddd1d24d12e6096cc8a6 frame00000023 +9511388180811c10d166886868d6e71c frame00000024 +a9b330803b8ccd91596591c0449423ab frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-009.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-009.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-009.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-009.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,46 @@ +b3a3121c796a60c88988fef5240a07fe frame00000000 +f25147764829cf837e00b8fd6383e2c4 frame00000001 +1b1552291a89c97d5deea145ab0ac0cd frame00000002 +0b2e75bbbe8f4248eb1519b6542efc96 frame00000003 +99e8fc68547e119253ee3b8d79efa774 frame00000004 +3aaf9210819238da7f704339bd8f262c frame00000005 +de80b11f4c325e6d467d4abe5ad0db51 frame00000006 +93d2fba68721768018b35ccac27b6bb1 frame00000007 +07d7d4f8ad4151a013b652bec21ea9b8 frame00000008 +aaa95e4d39aa31cf68fdb8da268827e5 frame00000009 +3607fcda0733e0b0fd10a8f7fbe6e39e frame00000010 +6d8cc24ea3b9827ef0147c8b7cc6938d frame00000011 +977a6b65d41b1b70dd4df9f526045675 frame00000012 +9258b0e5fc2217c3aebbd96bb06c937a frame00000013 +887378a3aad18346a3827cd0aadc6873 frame00000014 +c2a3ff302d74eefd0855f2c862766aca frame00000015 +1a7d835f5a977e1fd8cc37bdd8d029ca frame00000016 +232be1f7e334001c3abbed550cc60c34 frame00000017 +e8cb3470b9a3ffbc7014793514dc89cf frame00000018 +54b20adca41910f003790a975ff7b50d frame00000019 +2c5fce4dcdd538f1d9377fa071f3d615 frame00000020 +d559840da8cef1f0b1379a592f708f0a frame00000021 +ffab5f1060938a62cf8ef9df30ec8a33 frame00000022 +b7d93c8eda8cce4d387f2ea78c415704 frame00000023 +7840aa27333e6350d114b256ab4304f1 frame00000024 +dc1f3b125177d0ad7f53dd058bba03e7 frame00000025 +37134fcaad963a22f4df04c0765af455 frame00000026 +4dc062fb76943a75e7b2428e5babbb3c frame00000027 +dfda91bc05efc72073a2b6b62f294327 frame00000028 +7ffc690c63a1c54e35978336dc5828a3 frame00000029 +9ae31bacbc097c2ccf1500ff89882e46 frame00000030 +1450c24713dcad41aeba1c44007bf12f frame00000031 +f125bb52b8a1b11e076de55cca1069ee frame00000032 +555e1f2a6d293a0bdc9f92e9c3b3118d frame00000033 +ec9a8d577a07a4f0d5deae63b3cea6dd frame00000034 +a54f74e0ee329db4a78851bb7e54b2ba frame00000035 +99fcfe7ed9028bc443a790f9cf8eb812 frame00000036 +b9b994ffbe0150945b752a2120b4a475 frame00000037 +f00d70d8a28cecaaec1eb84592e3f6c3 frame00000038 +3bc8ed07fc92c4d339164891e6624306 frame00000039 +d755777560d745d6bdfa01b9e9cbbcc0 frame00000040 +bcefb5ef8fae173e413406b4a60e2255 frame00000041 +fb47098c334b82764e30819066b13096 frame00000042 +9e31f68fc96045bba43cf1253eedc419 frame00000043 +53522d46d2ba91ab23693db7d41ecda7 frame00000044 +d66a074ebe6123590622e5cb308d75e5 frame00000045 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-010.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-010.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-010.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-010.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,54 @@ +3441ec1a9b9d325c9aeda44e3b68377d frame00000000 +bff86a84fd673394f45c09d19a1ee0ac frame00000001 +8cd920f0de408e8cd883f9241680ff80 frame00000002 +d1b27cbb40859bbbb6da40dce6ddbf1b frame00000003 +ca102ed86e45fe452f55a2cf0253de21 frame00000004 +ac7630be64017becd6e958df360263b5 frame00000005 +a044041ede746687d33ba6342d8d3edb frame00000006 +75d7c0eec357afd0c2d54e769f551b20 frame00000007 +eebd916e4fba53a66fc8e6ab98091a0f frame00000008 +c0044160a944dcac81efe9f63def4bc2 frame00000009 +9ba8b2ccbea045b39bd150ea383abc00 frame00000010 +8d7654804fc62f7d52d5bf3d47f536e9 frame00000011 +9fd6cd81fbe6cfc43e03cdf166c7ea93 frame00000012 +a1a494064dba27238005227c0808c5f6 frame00000013 +b8dca72164ea72b3f257c97c3ad87416 frame00000014 +90ae005c0f3ddb4318318805b8fc29cf frame00000015 +8183e7b60f18887a9530a7905db4b417 frame00000016 +1650ad1fff9076141f59b660c562f0f2 frame00000017 +e9ee675cafd270c366ac9d3ced5af879 frame00000018 +2257172d6e8628b4dd4d9bf97e9ee2c3 frame00000019 +577438f88feca7a876381a6fcf094684 frame00000020 +4b37e90eb35cba66d31616169020c039 frame00000021 +2c631ab87b8d3b7df13f888e3d6f1690 frame00000022 +e0d46e04d6a57b20c2b056cd0a0ca1ec frame00000023 +65bd3e207b8ed966b71f40a04f1900b8 frame00000024 +fd842606a20fb297463b7b3dd6efa2c2 frame00000025 +778cd96eabe785320254db7692583f47 frame00000026 +094272ad385a64fbc70a62f958e27eff frame00000027 +cf5f7b3b94a00938b633ea1d9aa8e8dc frame00000028 +032e2f3649484ca17c739cf89052de77 frame00000029 +9afe92189c21675745609e3b21a75941 frame00000030 +a5e087c496798bfbc64d6c26eee0b3af frame00000031 +efb2716347ba2e01f7dc103d2a6cebb4 frame00000032 +c83541678dcca8937e372102bc4d1f68 frame00000033 +3401ed97a9296610c8473dcf03e13f20 frame00000034 +35af1327fafe026b6539951a9baee282 frame00000035 +f320e2d64192849c08c4c5e6d79e4ecf frame00000036 +5a661af83f451d8651cf081399d451b2 frame00000037 +625d271b60d91229699f1de35d232b13 frame00000038 +8e504154fa8eba5f9807bf40c647eea8 frame00000039 +094ecb39a65c71e85d15a587472bb336 frame00000040 +4d08bfe5771f00e13646be49e3471c4c frame00000041 +20841206e07721fb631088d492622543 frame00000042 +edf969142e1b053f951c1a5756f2b5d9 frame00000043 +4959a13f20311d9b435e501fd753c94b frame00000044 +a7f34e6c985d630af07a9f6dc47ea50e frame00000045 +96f6667d849f3abe4e85e3ce368b76ee frame00000046 +a47d443c8aa5f2d2e3b44deab3f4f8e7 frame00000047 +4ebda78d96facc4472ecdb4f667be0c6 frame00000048 +6ba744c47edab85c6e77584e35e1b735 frame00000049 +4d2e6882f15356171e4383111ec70e6e frame00000050 +85077fc81dff947b1251bfbd981aaf52 frame00000051 +f03e8879a5218387c502eaab31682df9 frame00000052 +90f6128298cb52f769d697f9f842df27 frame00000053 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-011.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-011.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-011.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-011.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,26 @@ +83c78b5db579710f61f9354d5c51e8c8 frame00000000 +9b755a63c7c5352660a265f6e24991e1 frame00000001 +a591f0b04447d6d6dd9bb990502594aa frame00000002 +6ebbd38d20a4104a842c66df53a8b86e frame00000003 +a114c37e74a4252ed66c5c4e7c8df84b frame00000004 +4bad182348dcfb627b3e15bc228a3c8f frame00000005 +a843b5c80266f890044a4ba1f59de8ed frame00000006 +34816d9129f252afcbd56d6ad1df94c7 frame00000007 +7d7d46cd08e18aea6fc52c0ec58a4803 frame00000008 +c96c3357d89534fce32251a0d52c68c5 frame00000009 +5eb1329f955ab80696d8220605a51552 frame00000010 +68b3d5162cd5b004a6dfeac705c75afa frame00000011 +b79647c678fbbb9ffbd8c4ff63c05e43 frame00000012 +4566eb5f995852d72b6913d2ca2e321c frame00000013 +02e7e951ac9e42eafb1260defaecf685 frame00000014 +ddbfa0f81a009c41271c9aa587e88baa frame00000015 +27d31dba74cb2170c456830a9f888c0b frame00000016 +0537650a41bb087a5fd33d6347fe9036 frame00000017 +df2205297d4f00164a3440c8fa1ac4ee frame00000018 +9942b757bd3839c1cd6b1068c68967f2 frame00000019 +d9284e1e989cd38d0226b1a3c6e89409 frame00000020 +12427a3fdc22461fe9d6ff9dd5863bef frame00000021 +63f75f2a63630347671c0e6dd2f88bcb frame00000022 +b161169a678e3959b492d83a03d47dee frame00000023 +50a6d4c8722197f0abd1028b968dce58 frame00000024 +c0f81ef6b25034cff00db1e3c369be97 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-012.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-012.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-012.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-012.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,26 @@ +cc3069a59b6f4319761af2b39923a6e5 frame00000000 +c0bc935941d994c6af6a864f02a90a62 frame00000001 +5b6073ce4a03967aa87e56dfa27e32c2 frame00000002 +5310a9d6bf938ed89b10727f11e131c4 frame00000003 +290fb1310ea10b862b51d37ff9d79f7c frame00000004 +0ca1accba77dc867df682b8e3768d6e2 frame00000005 +2a90659dd4cd5d2f825641be55609d97 frame00000006 +e003db31fbfeab54385252e8c64197fc frame00000007 +0778609bd9626652e8a8dd07d5ef9f45 frame00000008 +36eecf49c4aa2d8c3f232a1dbbb5f4ca frame00000009 +f69f30dd8ebb7db4c51e0371f6a23736 frame00000010 +e9d5293db5122b9683a0853c2ef678cb frame00000011 +75d6a09bca67a82c8aacabb710558330 frame00000012 +973d73aa4bb4e3de2cb1ba97685e08ca frame00000013 +daf9ce67baaaa02bc56f49b540f22a30 frame00000014 +d08fd3b942e1219132015819c553f2c2 frame00000015 +0aeea73b030e47bbd80bb0fb33fb6ebd frame00000016 +6e9f5f98fffe27abfae52304c693ae44 frame00000017 +961c71a47741a1ac47fcaebf958647c8 frame00000018 +e75e53160b9f33eca0dfba999d8002eb frame00000019 +ebb5d79336f75c44a09971dbba6947f3 frame00000020 +f02317fae5e143103a114ca692b58c25 frame00000021 +8282867aa63fa23c48cc0216e21933cc frame00000022 +d0d74ebbf56ca62825641028b66cdb20 frame00000023 +a8df24b0a22fe4fb334ea7063cba8754 frame00000024 +8a570e42ad6ab42ead80b5022c2eb2f1 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-013.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-013.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-013.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-013.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,26 @@ +ad137b9eae93daed28fe31fd5165b4d0 frame00000000 +7cd527f647680c0eb305050d27fb8092 frame00000001 +f306e07a2e86c82a8cc1333be3812326 frame00000002 +4ffd6065ef6af716fdb7388479cf300e frame00000003 +e776c698ae335107d5794c02cf00d3ee frame00000004 +c0043e3283b96a4aa58d2265b007e67e frame00000005 +235dd358e6adb3e144d7d957458e74a0 frame00000006 +4d34b966a406e7c2d5cef029ddc76021 frame00000007 +65f9eb823a63e17710b111892c415b70 frame00000008 +84d4a1d510d1c1aa8f3e7232d574ba9d frame00000009 +f3218df364f0e283df56b5d4a9cdfca9 frame00000010 +3079d93a140b51fe3e7b4889fd5fdd24 frame00000011 +4b76d7f904960792b78378c95453b77a frame00000012 +26cdd39f9cd862b383352bf769d212a0 frame00000013 +d98dbe7d7b8a5ccc50cb3a2e3dcacec8 frame00000014 +a931f142064062d7d2d1245278c6edd9 frame00000015 +0c6dae06c59c040801be386d7e883f52 frame00000016 +cec4a68182fb14185360f57de81e73cb frame00000017 +7e819d1d928f974f25d45023a89a6765 frame00000018 +6d9a9fd28212940497f881ef4886d756 frame00000019 +f22969fc06edc0c9190cae8bb22243ae frame00000020 +2fcd676dbf66f842e91649a3d6c80f50 frame00000021 +ce16e8920e91ec208dfb241addfc612b frame00000022 +3a205f364751ff5e72d7da20e5713f53 frame00000023 +2305bcde500197d7697eec4ba89f1533 frame00000024 +23712ae207ea2381f886ed038ec3852b frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-014.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-014.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-014.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-014.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,46 @@ +0f6264179998fb3fc178da920a13224c frame00000000 +eb350fd7a58c71eaae3d75266eda95cc frame00000001 +b30caec76142b1723da4b9104ee08388 frame00000002 +8d0c4f357ae3168e8b12e8db1ce2fc19 frame00000003 +917aaabb442c827059ab587a8c029d2e frame00000004 +8d31266005630b8190e91d3642683ba2 frame00000005 +1c6f0073649ae5a3d58b8257f306633e frame00000006 +ebb32b041005a08d917e0991b5ea5c73 frame00000007 +763a105cb1d204c5060155515879b737 frame00000008 +834ed4c3e3df3a7f51c8d07dcd7a7e39 frame00000009 +4359b0c6b9cbe8282373f8f225869338 frame00000010 +8e4068d1fbba62a0d03725594848c5e4 frame00000011 +664feb2c84034b92ceb5a4812eec6453 frame00000012 +9ec5166ffd5c4aa78d55f59e83b8d386 frame00000013 +7a283f377033050dc08dd2aba683a747 frame00000014 +7e519aa5835a989ca5a9551613b7f93a frame00000015 +b3b6d377b3ca3dccee7aff1b1c770931 frame00000016 +245f7e461fa5d2e863ab32185ca5c633 frame00000017 +4f576180e65c873a88c793176a6314cd frame00000018 +721c6f387aa71c00d3a4a62083cfa578 frame00000019 +9d57fd531d4f09a26c740bdcf8a732fa frame00000020 +08bf42c076f4944824865b36bc60d0e6 frame00000021 +e8d4808f405d6b845f2bcb1ab91ac0c7 frame00000022 +c8abdf621ff4e53819d6d1e29cbca6af frame00000023 +92209b22e240f910f6239bf8f9afb73d frame00000024 +81456a6764ff9a306cc592ef557839ef frame00000025 +6d84f15cc510212eb8a3cb35c5b1ff7b frame00000026 +fb73c232596fc1d3649a682876b72afa frame00000027 +ec80f9d4f58b61663f524d40df7c8ba4 frame00000028 +9ad8120c934fab3fa0ab4807d8ced614 frame00000029 +b7a8951d49b77714a05fce19ae9c9f24 frame00000030 +4ee2fba264c3f028321e4be23a83197e frame00000031 +720015eb1e7a407f01a5b7528249d492 frame00000032 +7d9fd432b306abc200c8e2742efc2725 frame00000033 +5f796923b37bbca3dc46b43efb1eec1e frame00000034 +42b2eb7947aeec8c34c82fda93c93ad5 frame00000035 +9509a7594b0c5e43f5ed73622251d0b1 frame00000036 +1ad2cb691a676b83686363f2fe5de4c1 frame00000037 +4864cb56cde325ed7e09f0db52d7ed57 frame00000038 +727e9dd2730d5a51d1feacb473145bb9 frame00000039 +cc3b95780aaffa35a1f579c964753e9c frame00000040 +003b1b9e4454057e4bdac874a67e14d0 frame00000041 +a80b89cf2032f17cced6e8256daaedfa frame00000042 +1551326db1276518bf5a84a43bc8cae7 frame00000043 +595f258fe49f79b27c682269aae7d721 frame00000044 +7451758187000a46e0d50afc2f4c5dfa frame00000045 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-015.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-015.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-015.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-015.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,257 @@ +6b4c7cc0c6a7218362e43cffef6618c9 frame00000000 +e132a7b1bb4fb15b1019092aedc0e599 frame00000001 +b36975db60f24088d95385ff7e8b7b8a frame00000002 +4ae6a13ae0435afb2eac66f15a07b143 frame00000003 +d1de33515e29053171c9fbe969a33fa1 frame00000004 +cf01450481865c10765995a3b92b440f frame00000005 +274461d33aeab30885b23bf2818ad150 frame00000006 +cb434c5a829b3d6d15a6e76f05abd51f frame00000007 +512019fa16b1cd6bf308c91d6577cf2a frame00000008 +2d1174741c144b2162806373d0092739 frame00000009 +8ec38a17566342a35598bd5ab6d290d5 frame00000010 +262b71c9874cc7a5138b12b294575572 frame00000011 +bfe5e37095dc450dc717fda5ef77b6fe frame00000012 +7fbcdb00872206a597bb69ebe9221b03 frame00000013 +b599ac8568b6780dec25de4211e071ef frame00000014 +797085b07f4c1e4f4b0116d329403cf8 frame00000015 +a0d0821365658bee14767698877cc066 frame00000016 +286a917e787d474eb78b4797a0909a5e frame00000017 +3548a320f6954c40a00ddf2e4ee212bd frame00000018 +80af737ca733afa28fdae06421b3cf8d frame00000019 +f31a2b62cb69bc680b314a033f91881b frame00000020 +02e4a780b3a0d83a8897988ef17b548c frame00000021 +844929e7492b389fc520c5f75d37aa77 frame00000022 +558ac4c1c11da425baf832a73e1ac2da frame00000023 +41b21109a7aa5f163ac0967ecd11f792 frame00000024 +a2a050c04eaa97db43a5a0a96d20a143 frame00000025 +18d1881d44ab9dc959c34d92c0cabd36 frame00000026 +53618af318cd187b4fcd5a3c22d3ab79 frame00000027 +8028e6a6a6dadc8331e39cff1ba2b899 frame00000028 +2c32a58d68595ff4100cec4fc1637c55 frame00000029 +8ecc02d32f36edd167cabe2a7bc66683 frame00000030 +7caa9ce69ac9f71170a69fbcef4c4b34 frame00000031 +df06a6a8a81979c39f2c3546eb03a3c2 frame00000032 +2bfd578fa08335e975d498e11eadc8bc frame00000033 +0d78c5656d56e423ff31cab09855a335 frame00000034 +7152d9e35748a7ec2e8da37f0b943325 frame00000035 +eb9e0e5cba76f0819da6256136ffd4e3 frame00000036 +c4e5ef875132c06a80f0afb3ee894684 frame00000037 +d2feb49297dd2f0a532479341d607e64 frame00000038 +d092d165608f405161fbf73a19df26ca frame00000039 +cb228940384c3021af42b0ab81c65d7a frame00000040 +426decfbf29a025a7a5e376951c34b83 frame00000041 +42c25e24bfd048bde0f9105d934cb81e frame00000042 +4bf37f8ccb2c4f42fa64a52a4699883f frame00000043 +5a00d85407910d4170d11511f03cc3a7 frame00000044 +032072b8713a2cd7434b5be706a8667d frame00000045 +e729c561b318aa14d7dbf96299c4675d frame00000046 +e7e1d71c1c59bb759c89f15c6e8970f0 frame00000047 +9c04011f4d92257a6dc112c5acad0f59 frame00000048 +ca7c7cbf52dd7af9a62212f3a9bd1f74 frame00000049 +3cc9c4d3857d692e0dbfee682d63d32c frame00000050 +1188fc9620cf0d23af21d8823c127b80 frame00000051 +c614690b8d4d3bea47f1b236ff32d1d8 frame00000052 +d6ccde3360e6a05b61013e85f96de9e9 frame00000053 +7f11cacc42d14121aeab487975ec190b frame00000054 +cdd8b538ff107f88c5f0dc7128bc331e frame00000055 +f43a387e9bb2f4db387d3f44da16457b frame00000056 +b7ba01b86fce2252105f99848e2ac95c frame00000057 +094200f775b6ced838d0c37e0d0b34e6 frame00000058 +b2d2fa96666b96b7cb624133cf404b09 frame00000059 +d935644161a2b06f0efc75dc6d0fcf46 frame00000060 +2a3be6460f313d7fdd6f6f9c70092a50 frame00000061 +f8254b6469b807ce0e9a1ea4b98a59db frame00000062 +43639a3293ec640b203e0c8a97e6f45e frame00000063 +055762cccc279c8dd27450ec1d512d5f frame00000064 +a90dac910f3cdd216293bebc46b36501 frame00000065 +3531ef2a4a59271f89ca0972b65d06aa frame00000066 +1f87adde14795639105be714247d0bd0 frame00000067 +e991cdd7912266937ca6f0d59199645b frame00000068 +5b98019db0fca644da5ee73e0160c7c5 frame00000069 +6276f3907e4bb87885d21e11150d044d frame00000070 +985785d7a788dcc07bd5fb72d3dc758e frame00000071 +3379548a573d068d47d5f54aaf79c8a9 frame00000072 +a2b36848e7d19383cfabf8bdcabd241a frame00000073 +0aeda76888a5a2426ae3b390e38aba52 frame00000074 +2c652e7850ccc10cbc7a3266f1fb6c00 frame00000075 +5dfc9e4dce69f1f644fad5b69c0b4008 frame00000076 +da775fc1469012a0c717ebe5dc940e26 frame00000077 +6185a863f7d023ddb2b049e265aab1bb frame00000078 +7a56397397191ab1b7c93a4bdc9b57c1 frame00000079 +3e95a3f2c2660dc28ec64efef29615f0 frame00000080 +b9ba03bd7c09224174368a60af389b9c frame00000081 +bfd23a13e077843506a01e44adb27c04 frame00000082 +9025dff58a57abcc25da69fd233e312a frame00000083 +ba4b91b0fe4d36f77b62ec3fe7b10a96 frame00000084 +7955419ff2bc42b703dfc976576a5bd4 frame00000085 +36d6a723ebb35c45128bfa8a7bba0d49 frame00000086 +77503cc79e3cb0fc74745bac967fee1d frame00000087 +a05af40cb4fc009fe94be6dbf148b453 frame00000088 +35bc39585679f7c07f1b196879719ce6 frame00000089 +48831c2e2212134ab192a123e847c157 frame00000090 +c09c37f9fd929185452a8beb3c61b839 frame00000091 +c534a38d586f3cac998240a7013c636c frame00000092 +b598c6999442cf0c53ed6a19d1215eb8 frame00000093 +c639685c8f4af3d006df1833950943aa frame00000094 +351e1c089ba5b9024de6e311c4a4afd3 frame00000095 +67d8ea902179548d0b01544249b2411f frame00000096 +3717ddf0edbb2020a5b974678d358d25 frame00000097 +85f7c6861241e3f43fc63c397c8c3c37 frame00000098 +c5b23b4d3d141d8cfbc5354ca1cfd34d frame00000099 +c2e42fa6b11cdc3abcf3ee0c3f75a459 frame00000100 +34df411aa928d5df3628644d9a38c768 frame00000101 +a768b448b6c894d9b927bc880249079a frame00000102 +a2e9ad0d0ad733b8ccacf0379b05f6f9 frame00000103 +4b485e9496ab4d417b8cffaf8754f5cb frame00000104 +47007fabfacd9e9c5a3997fb70d45895 frame00000105 +4962433241c7509801b46bea70f38269 frame00000106 +7b4593b45606650e78aec67722cfc2bf frame00000107 +882bcbf7d2c12e93df2fbebc6ac19dd8 frame00000108 +a2998a9c648817236bfffdae454f9fa1 frame00000109 +56775760fa99e9a9b7293ddc78a44ece frame00000110 +bb245d095424c28dd2ace22a5a511d6a frame00000111 +598c54d2b207190ed549dec7390a4190 frame00000112 +c73f16b2709527fce3d725ade5aab2fc frame00000113 +32dcad6eb17bee583884029fe18c07a7 frame00000114 +a1297c404a0d22e0e8e1e4ef67696606 frame00000115 +2fef1ac7becf9b8c9f3ac2310f444e3b frame00000116 +0f03614ed3daec6c37c5b564ad24f595 frame00000117 +9b175a6353ec377da408b0cf03388081 frame00000118 +37b991b4a216a4847d0768a3b878284a frame00000119 +faafcd544080a6a4f87a0d0a393ba37b frame00000120 +43ede087f37c1b0392829bbc668242fc frame00000121 +b7ed1274016c4d1810d8999d495b7370 frame00000122 +22af7bfc83c6e1f2eff2ae26e115b446 frame00000123 +969b22455f3be057036ddd5a329b1de3 frame00000124 +63c24b8a3d6c3a4c2fd47c48860abff9 frame00000125 +b407ddc89c538d7b6fb70e48493f872c frame00000126 +5de69fb9e1cd425cd3931116803f5391 frame00000127 +07fc7a5cb360edae97db999c2a8d2716 frame00000128 +602a17c58cac811e6e71e33448931ce5 frame00000129 +44087725484198c8e846d112583e574b frame00000130 +0d81da0d23d196ff972894878bd17b73 frame00000131 +b3cd65f1bd2274895e54da99bb4c4f07 frame00000132 +ae8ca35672d8352af49f37f5174c8fbd frame00000133 +9eea1ff900cf680e8208cd5d07a4d284 frame00000134 +5a47f272dfda3fe61955875f761a71f2 frame00000135 +544558333008db01451c886ac0b62c47 frame00000136 +5f8e4f3b11d7f5a28ff5cd9f3a6853bb frame00000137 +e9bc3da7060457f2d52a5bf6fe3bb515 frame00000138 +6aea6851a092260ae6594c6d9170ea8e frame00000139 +38e7fa5bea809a984a5f810940ca0e49 frame00000140 +9e8a23ac9067a1acf8472d7aa3b9811e frame00000141 +6f25f5873afd5c341ca6b3eb284be809 frame00000142 +40c3240e6cde94aae793a52cb46487da frame00000143 +b7f1f13842fbf0c6e085280eb89b956f frame00000144 +1f059372d8bf4dadf78d8e215bbf9786 frame00000145 +50c1d6b76930e765bff5ecbaaae686fe frame00000146 +5bd8cb05ebc034192e08ca8ce18a7964 frame00000147 +ffc0c20b07e26857dc4f2c079a2ad675 frame00000148 +5dafb6ac0953c254182dba124e213c07 frame00000149 +c774ed25712a38603fe2e224802768cb frame00000150 +de549cc803a6138d483be15b28ef2286 frame00000151 +c963d9bc79c1dd2a47f7f8424c56239e frame00000152 +9df993e0bef1bedbce1a6b596f2c64f4 frame00000153 +875792bde0f45358009b506840be68e1 frame00000154 +7f8c57083d2df08db6287cb025260788 frame00000155 +47eb13bc0942b5cafeea324fc5bf5cd5 frame00000156 +d89129c7528ff7372f23d1191c75e336 frame00000157 +bdd14e38b00075d8da485d1517dbbd65 frame00000158 +0e8e21a50a5dd1ac6fc881ad38ec38bd frame00000159 +a0fce98c23a053b4073715c554b9dc44 frame00000160 +18bda80360c72d04c60016682b1f6c8d frame00000161 +306d7556c18dcf58c8183959d1c34c2a frame00000162 +7ada9d23b96ef41322497d1077b00c4d frame00000163 +d7df0508be4bd0c3e83f346f0b9a1868 frame00000164 +749725f425f6fd4a79269bca900d09ae frame00000165 +ed30973158a576e2919e2fcfd00987fc frame00000166 +2486d8b742ccc50cf8683af7f4502aec frame00000167 +bdfb21e4236c904aeacd7b094fcffe98 frame00000168 +df2ef3e452731053ade82506c013164e frame00000169 +4695bfd9aa8e5667572f8f2142c6e538 frame00000170 +649f5315cff1d28f0183144bf4d4eea4 frame00000171 +450e987b9d6075d32e21d030bc385833 frame00000172 +7aec79b25dabfcc2eb2f32e7dbff85f2 frame00000173 +c9c2a96239ad556a2ee496d7c4c965c1 frame00000174 +3a038e48aa1238b62d431823653bc45a frame00000175 +6d5c8de6a281dbce68998b2c38063f33 frame00000176 +045032f57d6a50ae148f4372f5083a62 frame00000177 +5f39172951e083e712c3b1c528e61a4f frame00000178 +5a49eea76b6a86e305fb207fc1479264 frame00000179 +33ca5fb5f3e4ff3a24235da71c5730d5 frame00000180 +81f231d20426c5cbd02a85a425f5d0b8 frame00000181 +302d94aa9a8d3828cf74c8b2b7e7fdd5 frame00000182 +c56f4f0c32b0f2c409b64ed10216a40a frame00000183 +9cf7f51e1527f11c38c395bac94849d9 frame00000184 +0f17e427d14db658131eb0ccdc2a97ef frame00000185 +2624dd6b8e4e95770f132d90aa6f6119 frame00000186 +9ddabfd5f803014443c2a0686869c546 frame00000187 +0170cb86a377d791d7cbee2af0836db7 frame00000188 +f43a7c63bcafb51ead65e2831610612c frame00000189 +e7000913b11bdeb74ba4eca110df8470 frame00000190 +a4208c5fcd101ceb5a976838ae9a811f frame00000191 +8ddcb546ac632c967e879fb5101afa24 frame00000192 +547007771194373dd246586744130f7c frame00000193 +3608a46fee2731341ae9f71d3a80918a frame00000194 +758692e173552eb3439a572c953dda0f frame00000195 +481f456d6c6ac2e0325acba5eeabcd26 frame00000196 +c749a3ef8641d5ec4f25c611ffad1000 frame00000197 +93f089f7f1e78b1a4185c0b0d99875fb frame00000198 +1159712bb4dbaed38d2a7558335f4037 frame00000199 +e8dab85a977f525d4d9b448e4278a34b frame00000200 +780055af1414e7693777a18428b20a07 frame00000201 +59252515451fd96ca3f1194d5aadc3a7 frame00000202 +0a977d6db761c149316417988657610a frame00000203 +ed81d3a10369c12543f9bb6822a249b6 frame00000204 +341e844231f6b55ee3c1eb22ca1bac8e frame00000205 +d0a180c7d15e30a71e297fda0452c153 frame00000206 +58d6f2522ecd8e5fea34cc9f10da2a88 frame00000207 +dc8f96811577f4fd3e6624abae42f449 frame00000208 +3624a2e95f94a0a4413e464f4bf93dcd frame00000209 +cb0deeb5f2d570ca23e3be3ab9231fe9 frame00000210 +5080848626a52e30eb0f64f234ca3e57 frame00000211 +a31c9fe4255318d86e7855f01588220f frame00000212 +6c25fd8d1f0e898f6078decc4220d47d frame00000213 +77e52da08ab57ba5784ce42872cc01cb frame00000214 +b4a87059745b3b862ef7431a9630f16a frame00000215 +1dadc814514ef00f11010df21d8a9494 frame00000216 +5c816a0bbc8ed8fca166aa454093cb59 frame00000217 +10320c174423d1712d9ce812701bcaf9 frame00000218 +279c9398657af129e072165f41e0fb8c frame00000219 +49d88374bc4d965d3cee3274c7cd9906 frame00000220 +48871e22f635f50569dea1bd5ca40d5c frame00000221 +3b8396580f8fbd99daca4df13662f1fc frame00000222 +569245e1bf3cb42aa95f765a8449980f frame00000223 +c5cab497d244447df0ab832dcc9c5968 frame00000224 +0a98ca4f1d771c4bc0286b825d085955 frame00000225 +e4a55f175c3933f02ccf74ccf2961da2 frame00000226 +462dca7f377d708e753ef0bbde19a090 frame00000227 +6f1680f498b0ed6f89a834b5700cc48a frame00000228 +996414e2e3a4bac5868ceeb25b84e6e4 frame00000229 +6ecb4d4b857578d32f716c56dc7e6be9 frame00000230 +e05c8e33157e20c8e8f255e937d6b6cb frame00000231 +6542744da147d16533e41dad287a54fc frame00000232 +bb4b6921d2855025fbcaff4c12299d02 frame00000233 +6bc3e605759725012f7e44f1285b0899 frame00000234 +0be37ecb7cec0cf8a0f9bbc3c590ba98 frame00000235 +4f1103e5923ba8dea3e99c8b75eaed3c frame00000236 +220a8fb0409112c4f4ee769880717fea frame00000237 +e4c612263cfbc0f41283fd1e88e2ff52 frame00000238 +ede2bc67ad87cd78191b742dd56419b5 frame00000239 +ded6a1d0690603aea233e4d624aa60a9 frame00000240 +59c8b53e47ebdab696547a887163b272 frame00000241 +985f8afbc6df2d64d601d2fdc93571d7 frame00000242 +e595f0aa7b6b62094f0ad84252105f55 frame00000243 +c2fe4382a1740bcfc2f4c3573c6c3176 frame00000244 +880d8c906a8b39a61b68eb0ada857e5f frame00000245 +9a3ca55d2d75e3c41a86aea2ec87ff76 frame00000246 +f800751663dbefa61c33c3ebbd5430b4 frame00000247 +d904333c0c76235c8ffdfc81dffddb46 frame00000248 +6a633a9a7686a9a02bd252ec8bcff4fc frame00000249 +930d06ecc252a911a60c2d9d4f2618e6 frame00000250 +bb146a4410c34bba74883d8ae478f47b frame00000251 +be8ab9fc95685ebec64ff1f8129afa35 frame00000252 +d1f871ea3ceb38bf2b6d00ebfc38187a frame00000253 +ba33366e050a5f5abbf8202e0afbb9e8 frame00000254 +f706356e12cf4082337bb8f7a5a10673 frame00000255 +6e8200d3c1cccc0f810985ea2a2030f6 frame00000256 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-016.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-016.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-016.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-016.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,26 @@ +905a823da31f71f9c25ebb8dfc9ddd3c frame00000000 +9a1b97859b2f774954dbf96f45a22a0a frame00000001 +f0f5651b32577549dc2e6e3050125229 frame00000002 +9edf800d31dc653a23ed71d0f3fc32e4 frame00000003 +78dd1fa96e63c177f2b90d702c92f48c frame00000004 +e1cec336383c4ea63ccaff8bfa5c8e24 frame00000005 +e8b5a454e178ab7ba9b83dfc10b4171e frame00000006 +572dbaaf319f1681749135c49940c64e frame00000007 +b0e8313de033cc75a78532789bb6a3cb frame00000008 +ffc5581d83ff67b549d63c7de1a1e8cb frame00000009 +8ae3fcd3d74947d434b7c5f9ee08bbbf frame00000010 +3adff74d92ae0a463dddc6f89965f706 frame00000011 +f08355430fdf5bb16a91eef05f03186b frame00000012 +d477eb8150a1a94dd6af7f067e8c0429 frame00000013 +f860f225e27871a17060373b79007ec6 frame00000014 +22a25c07ac5e7c67df793e0d3169386c frame00000015 +a96f9cef4efe74db0cce039c85c03c4d frame00000016 +ff9c93cbc364976044144ee631f89bd2 frame00000017 +3a6b43090adb6c8b5188d544a08295a8 frame00000018 +7f41a10ada80865d24585860065aa5e4 frame00000019 +099847f606672fd065e6841000cafcb3 frame00000020 +fbf543c12ce48633e6d10717862c35a7 frame00000021 +1b9956d8a6c45e39d219da33ff7c334a frame00000022 +911eb8f478485c0f4eef1d03f53aa80b frame00000023 +b801570a437439ce12c5037df0235742 frame00000024 +8d231805d741abe79670a0e9f13712ea frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-017.ivf.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-017.ivf.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-017.ivf.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vp8-test-vectors-r1/vp80-00-comprehensive-017.ivf.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,26 @@ +905a823da31f71f9c25ebb8dfc9ddd3c frame00000000 +f0f411dd067bff05d5d9c64e3f52a4b1 frame00000001 +c8696f8fa56b4adf18f3db0c384d968f frame00000002 +5772aa26a95092b4a8a117e97d6dde49 frame00000003 +fc52254ea1cbcc2e7a5b126d8c44a023 frame00000004 +bf6208554657f568ad69d5c60f692fdb frame00000005 +3a68eef642b250177592455f4aa925d9 frame00000006 +98102b7bd56cbe456d86c93e8cdd48eb frame00000007 +59d54b7d97600b2890c8abab2af9a7dc frame00000008 +ba4b4bb534ee2a00f418828b9723d996 frame00000009 +feb1115136fa96d5e9425ac18261de7c frame00000010 +ef7eb6dc656c2bd7447c7d8f650108c1 frame00000011 +89ec385a0d34c8fd5b1334d8756c96b9 frame00000012 +27bc439dd8e6d50c3c7a6e0b390e7418 frame00000013 +ec36c065d8b668fabb6b16ecc01eea0a frame00000014 +5c94f9b441fc70f62856c835f9e9ad50 frame00000015 +4b6c1bd876b00052b39e6ca91cad9c05 frame00000016 +1099121afd681cf3218dffb9714a0fd7 frame00000017 +d0c1de888fab35f33c1148dc80494d20 frame00000018 +745941ea768d06ea27c3fbca782e3591 frame00000019 +09f85054f188da6f7260debf6b71bbb1 frame00000020 +2bdd642a7551681f1ca9680a0d9183a8 frame00000021 +054aba9db9790a0f1c79db491a6cac6d frame00000022 +fa4b52162f6da0c15100f4382d92d7e4 frame00000023 +88c589535811dd394bd1723172329629 frame00000024 +c11cc1a30199d46db048120969dc4118 frame00000025 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vqa/cc-demo1-partial.vqa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vqa/cc-demo1-partial.vqa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vqa/cc-demo1-partial.vqa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vqa/cc-demo1-partial.vqa.md5 2011-11-13 17:05:58.000000000 +0000 @@ -0,0 +1,38 @@ +f271b80c479cdebea9db07303e5060b9 frame00000000 +f271b80c479cdebea9db07303e5060b9 frame00000001 +f271b80c479cdebea9db07303e5060b9 frame00000002 +f271b80c479cdebea9db07303e5060b9 frame00000003 +ec5c7d59107dba0084a24c3bfbce7918 frame00000004 +2f586b9fae5b6b9320b8ed2865736450 frame00000005 +ad5cb782231e63e76c943af547b7f476 frame00000006 +1a5264bd2c966d21b13e1a860cb6aed3 frame00000007 +345ae536e7ddc2f9e1360f9555164fb0 frame00000008 +60d0404249b8969d24ba9e80b9103c2d frame00000009 +cebc4e98d36cd159bebd65b3c40a774d frame00000010 +ae69a4cd931ea0194a72a2f2ebb0dcb7 frame00000011 +eb222e054f1a1e1ce71e521eede94fb2 frame00000012 +3513b70bb4327232b674c32698ca795c frame00000013 +2987ea9fd9d1b4e8d4f0e6522f37219a frame00000014 +4a8d14a528786a7698f9c087ae42d220 frame00000015 +67e6ee6a442585bcdc3748de6de6fe51 frame00000016 +b7c9ca439469f2e06bd90e536bfab252 frame00000017 +e64c8dbb30c45a008dc3961107a8e34e frame00000018 +3f594502b494226c0e4d909f61d5f254 frame00000019 +47a3c69680df41bf46a21b91ede56c4b frame00000020 +80d3e4d7e8a69682173ac646d715c445 frame00000021 +4606651b2d7d9f50a9e955a54c1e9e93 frame00000022 +c1f6b97b8838da58013801565f25f389 frame00000023 +15178615a57a9b510d6102cc7faf668e frame00000024 +09f1994d995e6166e9128f4bf344bf00 frame00000025 +e70a5cd2501f382fee1f111e25558070 frame00000026 +854232671a62743a81323573d1429fe8 frame00000027 +a4464dbafbb0fcbec4b2a450764455cc frame00000028 +9cf1bd818832cec37409d1aeaca0a2ce frame00000029 +86f319336c4d006b1919669cc542a280 frame00000030 +c3cf9f584e5974a1c28220911b9c9929 frame00000031 +093f540f160c4c62d8b51e993aa5a4be frame00000032 +dbf86b426e106b0cd65b604198a9fa57 frame00000033 +f0cfaebdb8e0a88b9cca2b5898759cc1 frame00000034 +93f46f24895d8eed7ff8b58eabbefc42 frame00000035 +b2ab1e5eb62ca8fdb59c1db92a1635d7 frame00000036 +7bf3455fa1f8a52ffb4febe778772b7e frame00000037 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vqa/ws_snd.vqa.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vqa/ws_snd.vqa.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/vqa/ws_snd.vqa.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/vqa/ws_snd.vqa.md5 2011-11-13 17:05:58.000000000 +0000 @@ -0,0 +1,10 @@ +97bb25b5dfdda6fdd802f7c8c1712ccc frame00000000 +3a5172a064099137d78403cda241ef88 frame00000001 +96e847cd033059c86d9a19782866107b frame00000002 +9d0a516af5ce934ce593445b0a92c6a1 frame00000003 +f1c3ae6e3b450111431ae8d918f1bc02 frame00000004 +e6883ad284dc52472ff3714a7b48f4e2 frame00000005 +4703bed109e3fc6e726653b8b2caee48 frame00000006 +30a7a102a1149fd0a11281acbf0a1685 frame00000007 +4e2c69413e1366658910a58433cc320e frame00000008 +dd1f6842a6e8cfd9b2e41d6bf2c02b15 frame00000009 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wc3movie/SC_32-part.MVE.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wc3movie/SC_32-part.MVE.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wc3movie/SC_32-part.MVE.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wc3movie/SC_32-part.MVE.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,35 @@ +3af97333270c66b289349fe17a877576 frame00000000 +7a67e6b75e42d635fcf8f52eabccc5a1 frame00000001 +4366d44ade12a0d588efa1abb0ea09d3 frame00000002 +b2d773ed798ba0088c1abb5f2a58ab68 frame00000003 +0af297c8dcc5c7ebd44d0a6a4494655e frame00000004 +12549ec165d6200411f973cb8e423c01 frame00000005 +9b419060e9a6a124e2b8d9e494ab51c3 frame00000006 +dcb3962df58e7d03c7390a0c2bad9c41 frame00000007 +a4e4ce014df27c7cd02ad8ed80a00d59 frame00000008 +815d0ab073599fa20853b6c303b114cc frame00000009 +f24ef07e44d56f9d5a750f7d3ff17dd9 frame00000010 +5d1765deed8a3274eabb879e206e9a8b frame00000011 +272950e865a6dabcdc722995746bcdd5 frame00000012 +8c2e4b3e5525008599c43dcface0b698 frame00000013 +6ce50cbaaf3c6bdda67ab382c7549ae2 frame00000014 +ae0211a952722ed906c32e126dfd5734 frame00000015 +4175d9c56d7229cf4117fb78c82eb2e1 frame00000016 +5fb0001d4dd696cb3f25fd215f2bdfbf frame00000017 +373ba068bc3a9c209f843f1149139612 frame00000018 +9290495bfc777357074c2f358a20f241 frame00000019 +fc3f2b9c4d68b53197994b4a54bc15c6 frame00000020 +1643ebe41c43ea6defcbc2b9f7b4172e frame00000021 +33d5bff74a467ab2ee7ba1b1b4564b82 frame00000022 +0464ea23de88edded11cec08cac19a08 frame00000023 +c3b77efefb696c275d50db04fd142745 frame00000024 +7cc218dae1f745f44ad2b9fe838b121f frame00000025 +093fceb4122c9f31c4344830d639411f frame00000026 +137d555f3329157059efa8b8e6c62ad7 frame00000027 +3e059025eb14eec18345ebb5e3c9d6b6 frame00000028 +0ffb27bd469c03dd4445213441d98709 frame00000029 +ed38eb85c9124237f3ff36d05d7eaf40 frame00000030 +c2471f43d03f83ed346bc17121cc804d frame00000031 +69fe87476d087045bcb0a4e979bea4b4 frame00000032 +20395d6e8ce26702bfd61c6d6b7527ec frame00000033 +e1a1e8ec6b05feef21646e274980c0b2 frame00000034 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wc4-xan/wc4_2.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wc4-xan/wc4_2.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wc4-xan/wc4_2.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wc4-xan/wc4_2.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,111 @@ +9fe18bdc53f4c9574b8ab46c4aef683a frame00000000 +d1bfec64e2ea0c633bcd71f91a664466 frame00000001 +79dcab910c14faf2ee1de8310d624d56 frame00000002 +b8646f7a532b1da612533438393197e6 frame00000003 +d2d986bcba2a93da0ed141e7fd17b49f frame00000004 +369a8429182d93dcf90110a796441dd7 frame00000005 +b7f4ff728b19de04b9a5d3d4178cbed9 frame00000006 +32e3684d84347f41a27ed170e529bdf6 frame00000007 +83d171550c4e4fd62fab48e56db5615d frame00000008 +1f700d19e2916a128a5b487040e80d45 frame00000009 +ea5eb93778c844fa8d0b40a6e238d593 frame00000010 +e35e1ac256c5ec22945acae609dc4a28 frame00000011 +f0c34043aa42ab74eaf0b5e5e5d1d421 frame00000012 +0bd35df4c404c7c8f24c727deb7414e4 frame00000013 +ec2df28afedde47fb77613b4cd125928 frame00000014 +dee5f66dd2d858d5627c2a06f0a22183 frame00000015 +f132bade8ee040d0edc429d19905bd0c frame00000016 +1ade69f5da533142ca83b6ea074c3dae frame00000017 +d50028562fd4beb9248fa5a1c09a7072 frame00000018 +1eff37a859dfa02ce0bf4b0b80be9941 frame00000019 +aab17e80c77bc1f04656ff878f7910be frame00000020 +5a8c98034f96429df1fab538302432f1 frame00000021 +bb35865fa07c827688faceb23f821697 frame00000022 +67f1546c5fdee95ba984d14a4c427a69 frame00000023 +34bb645c73de15f41dfb4817ae54eb68 frame00000024 +bfd52ed231a1a84d02139bdaa9b0d095 frame00000025 +aa1920792da8eb3be9ad8f1a3960b218 frame00000026 +cf2823055f972550e511609f0ffdec5e frame00000027 +9a2c907248391534c4b94ba385f7d1d1 frame00000028 +d347fcc786a0fc6972bb5a44c4e5b19f frame00000029 +eccd8ee90a400ddeb1e9a6561ce7d934 frame00000030 +87e047b96e1711258856b4489a9ef201 frame00000031 +a7cbcf33214d751dc96762574600e6e4 frame00000032 +d7bf011404a9efcd91e88b3cbdf8c4af frame00000033 +34ebf1c6549f5c19c013676a5c04906c frame00000034 +9fc36fe5779f9c5c29991306d5f494a8 frame00000035 +ecd4cad927073b042d9fa08f74f3968d frame00000036 +1ba59cde9ee0e89bf86fe63943dab2cb frame00000037 +e38dd3175e229acec5d37a48a6b3e7e3 frame00000038 +1a32304b40b61538532ca548b49915f8 frame00000039 +7abf33f0a8041f2f2e52e72637dd4cb6 frame00000040 +f604a1b8352619475fda9c1b1e5a92aa frame00000041 +5b979ac572fddae9ff2829993104c420 frame00000042 +fe5f64b9feed3ed1340a72842026b11b frame00000043 +b4943e28e477f2d5be550392ffbf21ee frame00000044 +1b1188c87f49ede922cd4af794bc82b2 frame00000045 +a858887640e1e10c1ad4c1f527151797 frame00000046 +0d02c0b9baa3e8e9b4dc59af35a63eb3 frame00000047 +ebcf5120b490dd6a55f8fcb20f2b53cb frame00000048 +0a0948648dee0332941f7aa1c377e020 frame00000049 +f944873fc233f2faceafbe841f36cda1 frame00000050 +cc97c8195afd40bced561446fd8ceb28 frame00000051 +026334d4fdf81803adefba706f430d6e frame00000052 +2cae36c8bfd7d58548b05e3c548bf0b5 frame00000053 +f2891d52b8aa51ffc4544f233e952182 frame00000054 +c06023f89b15a7b41454615f68f89769 frame00000055 +dc9d78ac7774614056075023289b1e06 frame00000056 +e78d1da55b62d78b31a12076f2d2b2dc frame00000057 +8bbc292dcb3108961f3ab639c9c83d68 frame00000058 +8e3fed94b2d2f83075d6e9bf86f76e45 frame00000059 +5d24a084cbe2e07b128a333e50a0ad79 frame00000060 +b951bdded66d769adb86a2ea99bbf846 frame00000061 +5d7b5f3e9dfcce6d80b7a9f75075d9ef frame00000062 +a0a5081866c1251421fde0547011f5c6 frame00000063 +6911313d216212ddca26edda3b79c0cf frame00000064 +6262f2444151cb6944cd4561241a7525 frame00000065 +0dfd37132b245690f5ba1e47ab45974c frame00000066 +81c8916c836c14e330f24631f65642f0 frame00000067 +13b0222488511dd26857d2be674aeff3 frame00000068 +98d025948dac74d00b2e877db3e3d5fc frame00000069 +876dee48ada04843c5488849a202133f frame00000070 +fbe5964c2ac1227178f4ebcbb982c7f5 frame00000071 +4281b9dff26091a9ecbb378b684d33c4 frame00000072 +642a303ec4909fb2476a6cabe6639ef5 frame00000073 +656180c07c290a38cb40b082a8d94acb frame00000074 +6570a7e670077b5f84f6f8a791d4d5c8 frame00000075 +18c2ff9f932e44ba6d45a1449562c1e8 frame00000076 +5b9fb0d7b5534bbccf97b7da66cae889 frame00000077 +63f75cb56ac020553a94f29971782560 frame00000078 +ca6d0dca4fd25ce12b46f1ee90f68ce8 frame00000079 +c04c7adff816b0cb2d1c5dd747efc4dc frame00000080 +76116980d86628be9c98272535d04d9b frame00000081 +7e6283c8644e8586db10e7a66f1e2279 frame00000082 +858d8d6237349f61071ce66a63e46f72 frame00000083 +f35fb59fe091134533dd2e2eff3e9ee4 frame00000084 +b184fdf712d89964b62e2e69ef1f3a18 frame00000085 +3a83ce511e096b87592db614a41c030c frame00000086 +0d0b0f2fba58b266cf106a9fb0f57166 frame00000087 +ccd43d43a745da75ba6e80e270505db3 frame00000088 +c0f4feaef980fac6e403331475b4f0df frame00000089 +eee113a15c192867bc01019c025743d7 frame00000090 +67165b9c9887078d35d025d20e15acfb frame00000091 +130ca57c94ac5717182bc74c956e3097 frame00000092 +d8d74eac59acce3640b145ab1c6c0eea frame00000093 +395ca427b2b06e8edc63a0049c31a154 frame00000094 +bd09662324d0e9d31c9ce0b3bdb13621 frame00000095 +e1640ee6f1213a62122c5778b9306882 frame00000096 +72f3ff9ec56ca539ed35530bde57271f frame00000097 +9b97f27945b45497a4ac57d66e5b70f5 frame00000098 +69ac8191ea1fba1868e3d64e8e3e4b85 frame00000099 +4f6523cbae0eed90be63f36bc0650986 frame00000100 +c4130d63b45da0064c4640b13ce5847d frame00000101 +52c039d5712c917bf0396a1d49360536 frame00000102 +f4a32db1380659910e748826b036c613 frame00000103 +29971c283a0c4342f546589925c46fdd frame00000104 +74ab4b86e340525eddd1dd9fbbb916cd frame00000105 +032139f675446fe190ccade0bbe9d83f frame00000106 +b97112aa9f544c78a50de75381262f38 frame00000107 +eb04628ac0732b10da5bf61562acc9b1 frame00000108 +18f7d0a066811bc870a62289430efa66 frame00000109 +621c9600dbdf4b0dfd632e4b4db49dd6 frame00000110 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wc4-xan/wc4trailer-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wc4-xan/wc4trailer-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wc4-xan/wc4trailer-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wc4-xan/wc4trailer-partial.avi.md5 2012-01-08 10:15:51.000000000 +0000 @@ -0,0 +1,21 @@ +0d64741f95d2cf4b62fc819aefc266db frame00000000 +0a854a42ccf44856cfde53c1d0d39c03 frame00000001 +3fa6ea76e914bdc5ae340f7413c5ad39 frame00000002 +65d4c67c2de4ce3e018939fbea3d5775 frame00000003 +cca6348f43452a30c3acab54fbe76002 frame00000004 +19382870ab1ea017ec2246acff48855d frame00000005 +625c01df51ec1826122398a275aa8567 frame00000006 +513e9b38be6d982d426d604b19d8ca2a frame00000007 +3fc3cea34b088357374cde49baede8b5 frame00000008 +b9dae88b6206cad4e8524aad200cc864 frame00000009 +1191eb9642be26022618340a5925a8cc frame00000010 +77ec20ba365386afcbdb4202f3bd4467 frame00000011 +fe46c59f097752e8555cb0f8e0bceab0 frame00000012 +515e30612e45bf5c390c67dd40d1f8b8 frame00000013 +f6f498e771d3f7a9181325c34a8cb5cf frame00000014 +e5404cfe4b6c4375d36eafa3ed10713b frame00000015 +0fd4633922e77b7b245b2ea8631421a3 frame00000016 +33bb9a880cb06583715c15621405c5b8 frame00000017 +0074ba697d2946ccce7aafd689dd928b frame00000018 +28b2bfd6241a1fbf545ce607b2752ec0 frame00000019 +c188a2ed8459eca858c726da11c5810a frame00000020 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wmv8/wmv8_x8intra.wmv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wmv8/wmv8_x8intra.wmv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wmv8/wmv8_x8intra.wmv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wmv8/wmv8_x8intra.wmv.md5 2012-01-08 17:52:59.000000000 +0000 @@ -0,0 +1,473 @@ +8db659765063960ead7c7567eb9a6a6a frame00000000 +69413212a2eb1f54cb8012f9ecd1aa75 frame00000001 +e15aa8aba37eb2380085a3a7085581e5 frame00000002 +cc2878102267954bdc4382164a47eba1 frame00000003 +f348f618b97344360c01a49eb2c46cc2 frame00000004 +432d6da98034c2b8e192c26068a30c30 frame00000005 +bcfa3cb709236bfa922e903301ccffad frame00000006 +2dd6264e7a76d8d85849d6eb5c392816 frame00000007 +90b8275fea0dbf3786ffdc44c62b301f frame00000008 +20be327809cd80c08560644d072a5b2e frame00000009 +9080f664907375184b3a66e902709f9b frame00000010 +207a4ebfe53723f4dcb7b476c9f7bd25 frame00000011 +ea35c645804791f66c5df2bd0d6fef37 frame00000012 +32d44cc86cbc0dfd1c43d750a83c91b8 frame00000013 +c991a43303ed1ea6886af6388b5205a2 frame00000014 +7b6a4560f068d4b2ec82d295b71ae8d9 frame00000015 +27c837e2ee56c960c167845fb5122166 frame00000016 +a73a5e1c12f8d7444ec8e8cdb056c485 frame00000017 +9e3bcaa6150a5f6a1558ab078450c935 frame00000018 +91e2d43a8d6838b604b534e7d1d2574c frame00000019 +6a6cb72ae2bddc009c46510f6d24efe1 frame00000020 +422d81bbc0e5befd27ee3765768a1f55 frame00000021 +cdf12dea2d29fbdcb17499b9085c3096 frame00000022 +39fe049abbe05c5d0aeca3c07ca81ee8 frame00000023 +7501c7869f0f01feaed30d416eac3aa5 frame00000024 +d9033632504c5f03a78ab5da5bf6ce77 frame00000025 +bbd2746ef398363abdbb297d6e280fbd frame00000026 +07139a35879ae37716352709213b632a frame00000027 +a8062f53bafe8d5f8b5d12a83ce7f312 frame00000028 +b98a07f6e2b18af08c74262b6d88ac31 frame00000029 +086345d4c19c1390f47dae6fe438388c frame00000030 +63e346fb9ebd807a199ad5d85c02ffcf frame00000031 +3f927977630b5e2b78943e3668daadd3 frame00000032 +0c199380cbb24a30f15acfaccce10380 frame00000033 +1c020542e3eb05a84ebad370c0756853 frame00000034 +9d9c6c2abce2b0488064b70da8c4f83f frame00000035 +00cd7d082cbde43b0e8ad74f3df2efe0 frame00000036 +ce22cb901ac3ff7d4a0f2ae0888a36a9 frame00000037 +81da36664ed78d525c90fa60b767f9b6 frame00000038 +93ce75e64544c8780fd55d056e6789e9 frame00000039 +c2c37d6ccb3f578db1af91b19f360e97 frame00000040 +d683278d0cef7c0a83d95339bc36adef frame00000041 +ae354432c5b877165b35f43d4d53a0bc frame00000042 +d26f30ab2795dbf283a929896b6565b1 frame00000043 +f1e8213f53a1559b3fcd8a1701465d27 frame00000044 +298fa171c5fa3ee12a6e1afbb73cbefb frame00000045 +8aacf1488fe702737140f0085d86c9dd frame00000046 +1e49cde5e816971cc55337ae56cd06fc frame00000047 +36e46a3e6790aa28da9cf50ee73e9ad2 frame00000048 +346035d44b5994b660005719f2e25b32 frame00000049 +c9b0a5bf4f4318d562aac08320a030c5 frame00000050 +f5d91880ddae09cbb3c776e9b7c450aa frame00000051 +44eb52b2c7c7c21fa4f170171cd3892c frame00000052 +ac6bf0c63fa17a761693a84c4ee8d815 frame00000053 +5ebd179706ec3c4b278cc00988f1d019 frame00000054 +aafb7f42bad691365064877691e3d468 frame00000055 +2c7c39bf82b161eed0cfdef48bc7452b frame00000056 +2401f015e3d8afb840f652007acbc168 frame00000057 +d299b6beb491b2e8cbd32fa85b34cbbb frame00000058 +6a0512adc85ff7edf0201a9eddc17b92 frame00000059 +3a13123434b10ce9a94a7f0f789d1c37 frame00000060 +bd557ca3d9ebb3357b31c1f465340df1 frame00000061 +3c23520cefdb7fd82d1a37c4f3b33481 frame00000062 +8cf91b07f7ba283bd9c269e9cad2f049 frame00000063 +fd246fdb90e9a9b8f0aeba7ee9b3b2ba frame00000064 +f7fe734f0f9d67125bf039657cc17dcb frame00000065 +c1e3acb8bdd144ee6eb87caa786eeb26 frame00000066 +cccd36a59e30b53f62c88ae3a0335a8e frame00000067 +fc1e360f7820b9e6957d09a7cbfbf313 frame00000068 +065e93fac1c881474fabdc764b7fd494 frame00000069 +e1d431512357ea6c7737528ee6fc041e frame00000070 +a9f01d7d247fb4d6f7972d5314e38ca6 frame00000071 +41a4b12e6c06a9082c4187ccd1243c22 frame00000072 +08afe8ef66691f21bf089da88944e5f0 frame00000073 +84d74eabe81730a714c0019bd1c72dd1 frame00000074 +dad9d9393cabe8114bbca79b3903550d frame00000075 +5b0d251c48a9bede7585fb34689dd85c frame00000076 +5295651b67126afb37f0dfdf43e08eb7 frame00000077 +090ec2b8eadea9ec8c81962d318c5802 frame00000078 +ce481cea384ed2cc82f2941657e4aab6 frame00000079 +82a3ecf2e13fd732ec2435894c0ee866 frame00000080 +2dd72f98e5dbbe7f361b653cc3933c8a frame00000081 +574dde0385e8c7a53743a2f2fa399384 frame00000082 +e571cdf9e9a4afad0204416d70d6400a frame00000083 +6da6dd236334e9f1e64dbfbc8d967b7c frame00000084 +9d8b6b6d95338bc847e0f7804a052510 frame00000085 +a1c165eaaf1a016b8053937f51eb7d34 frame00000086 +ebae3656e2d8cb37c5a078239cdca5c5 frame00000087 +6ffc5125ab1b5ff27f2e37ca562610eb frame00000088 +7dfceab39cd69b3be4982fe1a7bc3186 frame00000089 +ab93944d256e3f12753f4fcac708dfde frame00000090 +a274f8ed446f7bbf98880a1afcf1a18b frame00000091 +8252236062be5ab28b029e82d36eed55 frame00000092 +59e1aa6afcd63cdab6f8290702bd8e7b frame00000093 +a466b5b1a94b4340d0dc339d897f3bbc frame00000094 +9cc76d28c88a90f3da6113e1dac4a428 frame00000095 +8bb0e248935ff054d07e78b644097662 frame00000096 +64d7fe30bfec21df30e45924b4113e39 frame00000097 +c4a95b753ff2761c958f11474c87a25f frame00000098 +aee16f65be418e906c11d1da7c4d6b7b frame00000099 +62008cb69e3204a79180b4d22fbf9436 frame00000100 +4a76fc3f7af30d8dff913f274dac1ac3 frame00000101 +91c200600a008fb48b7c3e4348a97d05 frame00000102 +51c83fed5c708dc0f0fcca0ab1141401 frame00000103 +12c2b24827b180fbd9a64b3c7afa2d1d frame00000104 +d7d9d04d12bdc7ef2144e2f6ee504641 frame00000105 +d70ab6fa5b1990c480d8d98fec7521de frame00000106 +0b402f608e4cacecaa948d973af6dfcf frame00000107 +6a561765661ebf5896905744366c6093 frame00000108 +c403d755c582b2cd91661ba350cf69ef frame00000109 +6b0d9cd712e8ed8c45f404972d66bb7a frame00000110 +e32c4002de2076f01c4e964adfb06274 frame00000111 +a9e5fcfc44605d349d79baadfc8e8e15 frame00000112 +fe2a149f2a1a9a63f96e3eab5ad80931 frame00000113 +ac59cc6b3b8f344a68dedfba6fd0f064 frame00000114 +445df2fc251dfa3960c0ca4dd1583297 frame00000115 +6e5949c42ce7d06a05b1ebdfcb7f55cc frame00000116 +4a6a1215d8dd4362b351f5269a24fc2f frame00000117 +b4c16824f5d17cb2855977cf150d8168 frame00000118 +45a5bb3edf955bf800740f258139e4af frame00000119 +d438627e866c7f9e8fee0df37d44629f frame00000120 +7006054a0f0ed274128ae6fc0922d01d frame00000121 +4c94b9b19508636de8c87183758866d1 frame00000122 +0c1ebe1240f5da96d0f5ad5f09c966eb frame00000123 +dac1478c5fd4d72e8c711f47c9b9864b frame00000124 +c2d5fb553b4df41830b53c7053048201 frame00000125 +7acffa4751c54706492d3e3ad380a25e frame00000126 +7871c8cc8b9de3b0925d19082fc11b52 frame00000127 +709229774b1b13cca5c73f9bae97f0b5 frame00000128 +bc1fd4f758fb86fb807e9213b07a41be frame00000129 +7b27001f1c49720757d46163b4364b4e frame00000130 +8a486742ef10be5c644f8e08d401f3a1 frame00000131 +75ff834cf9ac5c14622a2496a7ff028b frame00000132 +8fab78fb35a54ac8f8bd943bb3b04079 frame00000133 +cad93903a3322a34b0f517c83e38d3c5 frame00000134 +05a5ae9c7a756dc655a27c63123ba1a8 frame00000135 +216a529a5093bbefc59ad591e117be1e frame00000136 +fba4a64b39e6cbc6086040d570ca238f frame00000137 +c43f93ae10a0f01be0823189731e7853 frame00000138 +ed68a334301836163f0b9c9a948de5d4 frame00000139 +25322e12bc70e91909a8164da3687bd2 frame00000140 +cf6b3d7d35eee86ec2efdd9e95d2963e frame00000141 +2857d1e072337bb195ad9bb9b03a2928 frame00000142 +debbc00848dce8ae00cb35124beffc20 frame00000143 +f38b06ccb5559303fe486edaf6c8b2c0 frame00000144 +099e4fdd1a48a85f20e40a1351b8b147 frame00000145 +38c3d04c4e8541aee6bad9ca9d460de5 frame00000146 +e49d17ac2e56080b0d1393ce1b650fc4 frame00000147 +b172e7ed85f123b14abde9ea4c39a581 frame00000148 +ecc4208c3b2b9292ecd29537f9d2c6d4 frame00000149 +83df305dd7a2473ad399d19c28f32254 frame00000150 +a07015be842e70e04b245936a69a395d frame00000151 +443b94ed7840a724ff728254731da128 frame00000152 +5b04939e9290754a64d54d18ecd8c9d6 frame00000153 +eeb2971e5a33b4a6d7df21d5d0ea3887 frame00000154 +1b47427d5138101e5e41c463b0c9ac8a frame00000155 +53c07ff0cb991c9073060f5c267badff frame00000156 +5c2c04c22e361d3fe24902bdbcd7534b frame00000157 +7318d46ec1e472869430f522746683f5 frame00000158 +6b848ef5d04db074d312fb9be411cf6d frame00000159 +97fe258a6561dce8e53baf68adf5bd2f frame00000160 +8e0fedb692a82536b7337eaa931202d8 frame00000161 +9e225a81999223b4614d647b2db23d33 frame00000162 +db0ca8be8bb64924f2a0b761967f6ea2 frame00000163 +b2b3a238322f913523900ba6083e265b frame00000164 +3de41afbb957c9a8946ca94cadd54aa0 frame00000165 +cd0107a2273769fb72f2e20f95f4b38a frame00000166 +7c32de83188761fae8af4c336d2eac06 frame00000167 +342a95160ab5cf656e9ef53f9d016af5 frame00000168 +f0472323b61099ee9dbad0ae4e0ad1d2 frame00000169 +c83b4c328a07f535a7a6eb1c93a425dd frame00000170 +d132bfe3e35e5498a29da96e38e4a037 frame00000171 +da84fbfe361616cbedfa5b3f56eab410 frame00000172 +9212304da187bdcdd6b7ed612e05b672 frame00000173 +659e32ef3e80e7b479fedc7c1a663f67 frame00000174 +d2bc92e505666f17dbb04791a45de2f3 frame00000175 +42d9f5d23c7d36f75d2fb5d248eec6cf frame00000176 +3ce579cebd32e04b530729b59e59581b frame00000177 +62ab2e655bf0c7714a96b05bf69f45a3 frame00000178 +a85c0480fab866302c26d281496b763e frame00000179 +879ca2235fa93385aaaa11dedfcdbc8b frame00000180 +fa14f186bb9c1645b86f1350ee5f04c4 frame00000181 +81dedde16663bfb6a29df554123f6c4b frame00000182 +8c1f58c7c2793cfb09ddb41f5ca6a635 frame00000183 +e582f309516310e38f6042ec4823297f frame00000184 +d3f2281a7cacee1aa52ff432d1286304 frame00000185 +aa54d9d6c9f4604b7ea77907f14f0503 frame00000186 +e17955b741f193cda2a8f10c73f411b8 frame00000187 +d1bd03a9b94cbd2dd6635a480eabb30b frame00000188 +569f9e0c0ad857f0f73aca1951061c9b frame00000189 +1bbd95e942edc5cb9ad80602449c4f3e frame00000190 +031bc99ecc87b1ca1b727e2981ac7c01 frame00000191 +33701d3dadfdc3dc3ce5398b401be9e0 frame00000192 +b410dd78f4764a7b081781c540232481 frame00000193 +5774229fb20fd46fa6da91359e945b04 frame00000194 +7f497204492c91016803d7d38c0490ce frame00000195 +3b353397fc8297377b85af0a9f98906a frame00000196 +f9794ea6c6a4e9f103a91665c139d601 frame00000197 +4f5e744de3f9a2c2254fe4ffdb4e705e frame00000198 +f772742aa09a33c8ef77ae499cb921ef frame00000199 +d3d680ad027a9fa9dce3748c8e96049b frame00000200 +666b91e815ae771cb5baa139f7e6aae9 frame00000201 +71e820d481f69267d38309d1ed16978f frame00000202 +10cd37669281302b04144d4beb127d01 frame00000203 +1252132df9dca5d4e4e6287ef1cb8c74 frame00000204 +afa880f3edc89860230b6cad43e39fa1 frame00000205 +1b78c7131a52c4ea7b01f0a9e8f50168 frame00000206 +75ad8b849511078103da4c45fe9c5fdd frame00000207 +a6bef8d616b752236c958b94f9438e52 frame00000208 +4edfafec13c511a9edb25ccf3d7a6d11 frame00000209 +0701638f3a357d0455a624dfb71753d5 frame00000210 +7e567baa11771418e2214b414a72ee31 frame00000211 +ee015da22f8dec015177301a165c00f6 frame00000212 +ef06e70f34dd513fbcc69d068b52db52 frame00000213 +1ee42eca25a0d757ad9de19d1b62c4a6 frame00000214 +f350fa8eb2a70bc095235d342d10ba5c frame00000215 +40c5ceb61089ba9dc805eabe48b0d946 frame00000216 +07be8127affa4258c4223a7e85b9a0a0 frame00000217 +c31d67b2c766cbe873f4850d5d3c47b3 frame00000218 +116c86c4719e8b2903ef7cc0dc99bd5a frame00000219 +b9389fed0935fd9441233a2b941451e2 frame00000220 +e54fe092f954413ca9958ccf583f453e frame00000221 +f69eb031c69967ab9a3950b1a677596f frame00000222 +41eb42837cdcc83aeded8462293c0781 frame00000223 +5f6f0076eba05d3db93c2039d4c3585a frame00000224 +254dc3721c1784f508f370326e135535 frame00000225 +88c8605b87328ee40584e1e8c4b6894e frame00000226 +7de1b87a043725e04cff69a933e26ac2 frame00000227 +564abb3bc9e0d3c85878e0531b78b1ee frame00000228 +590f28e42cca85ee4bcf0295149db22c frame00000229 +96e8bc5ed43254007b2747dc0f783438 frame00000230 +4809f1c114d92b460d59d01afed75c72 frame00000231 +8f5a7f196a9d745a86ecd1b1c0879b91 frame00000232 +62b1bb89a4f4a3205158d50d707a3e04 frame00000233 +626c5fb22e81a0fc325eed4852dae912 frame00000234 +f16a013a0911bd22a1aecf64d2625722 frame00000235 +e9968113860404519f7830c8c176b691 frame00000236 +662176aadfd44e7ab58164cc6703a5fe frame00000237 +fe69009f6da5a0fcc3f875c12f88211e frame00000238 +b2c386893ea60b4c94a699f1b9936f7f frame00000239 +12c3c88558b3abb53d87102baa8da642 frame00000240 +aa1d0f8dea7322861d3d39c64728975f frame00000241 +fa1c581cfb11158b9686eaa30a764946 frame00000242 +ab82dd57677a09af2441f427f5eaf115 frame00000243 +275fa5374f874054622b39b5e52210d4 frame00000244 +9e2133c6230d4e931e33c0775b683770 frame00000245 +ac8256f039c43a7f8d5c22ae3291363d frame00000246 +7c917e0ddfc79fd194447b8bd00aaf10 frame00000247 +eff10703c582e8526cf9696a995be853 frame00000248 +19bef30a738562546a55203936478549 frame00000249 +2ed4edafd18a561cb67c2f510b784e23 frame00000250 +4d34d800f92fcc3b5b62837dba91ca18 frame00000251 +33ec47c88b7c384bb1a32c4379ebba1a frame00000252 +f725adbbb170fdd41099440a2baf6e78 frame00000253 +63d9efa6c7907833537da943361da8ab frame00000254 +0545536ad18b5b173c282c96d064aa2e frame00000255 +973fca0c3a54d142d2b12026d973802b frame00000256 +878a84d6f01c55befa1ceae4783fc2f2 frame00000257 +66b1e648e756dd7f1a7eb1a911853b62 frame00000258 +0ab265b6211a384cc770ca80ae070b2b frame00000259 +85b9925dba7794256a52416e6202d32e frame00000260 +ceea1f74c109e51532812bf02bb56a3a frame00000261 +e15728974ab2ca2070cf040589170bb6 frame00000262 +08fdeb0bc3aaa9b493f74905dc3ed325 frame00000263 +9bd8e28448529ad67e7704a014b96772 frame00000264 +d5694fb4cf7909ecc2cc1ed516c9fa1c frame00000265 +bb8eee15d0fce0f09326c8252eb45460 frame00000266 +6548fd3848cbdd1f13558fc775808fa9 frame00000267 +2dffb6d47a68a05e7e5910b058f9eb0d frame00000268 +c8f1d240afb84da6937f97912bfc3e9c frame00000269 +3708a2eddc74aee7919edf95eda95543 frame00000270 +45206f53b7dfbef99acbfc1f71fe5ad4 frame00000271 +22739ac23b49efc4ee785a3d87c4d157 frame00000272 +f2bc75353183177ba9328c7eb6131264 frame00000273 +9150cc584348354e0da4393a5737f17a frame00000274 +3db009a6328618eb61058406fe8e1b2d frame00000275 +c86ce8826ad4819ffcf712d37e23049c frame00000276 +59fc2d5665063ff9450c9640c4b7e979 frame00000277 +6b3d44147f9fccacde217640b384d514 frame00000278 +eba7c3fa8b394cbd99a9cb242c2d373f frame00000279 +997eda04c4a4d9031860a551fa0c22d1 frame00000280 +3ca46b48c6eb05d6637290105df787fc frame00000281 +96d6cd77b1e7771914f730e8a5eb812e frame00000282 +7267c7e65959828278a6948b4ea820ec frame00000283 +5fb90bdae4d814fb2c9a606e1a653c41 frame00000284 +40fa7d61791251a0d70c984040126d9b frame00000285 +72d10c17203fb2bc087e4805ec8d94a0 frame00000286 +2b2684bf21cf5c477141f9a28870bad3 frame00000287 +f5076cfb06885d909d717a8a2e6cc93f frame00000288 +aa9bddeb576a615400e59fc30f07bfd9 frame00000289 +92e6081250827ba665038cdcaa955fda frame00000290 +e4c9ce5548716427a71412c203ec7cb2 frame00000291 +710c0957128b33b6ad1feeff39ed489a frame00000292 +7daea487d6262b719f2f99e385d11d00 frame00000293 +f48b4ab63cff693009be933e20851e0b frame00000294 +4ca209c774ec0a3832aaea61631db30c frame00000295 +2d8ad1d4b4a736b22cefd301af57a2b9 frame00000296 +ea36be60f02ac6342e794e5aa52df634 frame00000297 +ff65e2649152a014b0467d67791f08cb frame00000298 +58150db51cdda69a7733926fe4418835 frame00000299 +379b17acd4724f4b674ff011177713f7 frame00000300 +336a395973efaa9005aff7c7d18a8d96 frame00000301 +ae9c0adf50d13dbc52e73c58eedf22b3 frame00000302 +643a8c15bb2d40a1a05477fde82691f7 frame00000303 +2737312a546e46b0439a961ec1e92fe1 frame00000304 +2a7c1a7dca58e872da04ea6edd175d7e frame00000305 +e793cf5152422ff96b8b290cf3097f7e frame00000306 +8baee54d9edef0269d242f5ea01fd20b frame00000307 +164cbd4d0742f221acb5e872ead10c0a frame00000308 +fdb0344c2e69e65f8f4c23694450b68a frame00000309 +0ec18a7b2b8477b2cdf3b01b124ea9f8 frame00000310 +92cd02e718f42e6a752125dba23a3560 frame00000311 +40b1b1b0b1d243c6e75fc42e503d7306 frame00000312 +e844f448d57f4bbc2728a9c0095d2ed8 frame00000313 +2b3764c0d4edfd37e170147b65be39f2 frame00000314 +ec22695c4cbd3f9022032fe02a7dc357 frame00000315 +ccc594ab914869e6fd5df86b0f1f8327 frame00000316 +677d69857883e07254ffba1cd1fd543a frame00000317 +8845353b38d2f7f71aa4c0a9f6992374 frame00000318 +a547a43784b325ac45678d9d82ceed1a frame00000319 +5d8b5cbd1a302af6d9a37fee099a6512 frame00000320 +099208f0b13a86955e75f1a95eafb0a2 frame00000321 +7d6f895fa7bd67887b08c65cfab8b8c8 frame00000322 +ae06f407eb1a08ebf3d1d1413bc94631 frame00000323 +a5b759d9d045f1ecde5ed0717807d60e frame00000324 +04d02639d6015ce1ad3572f655eeb67e frame00000325 +693eec90e6642dbe0de4444b15ad5451 frame00000326 +054d0466ad9ddd389ce2dbfd8f00abd9 frame00000327 +a4e63061b46eb99abf91391425fa71d2 frame00000328 +ac613b4c328877e745b49d762cb23e02 frame00000329 +986c298769cb71f990f215368f0cd6d8 frame00000330 +98c61a933e40ab7f19c6f56195c34858 frame00000331 +4a1751f00c76343cfd1b013b72a9a7df frame00000332 +aeef0b655eff479a6bdabeb6126e41db frame00000333 +d13b2188ade71b1bda7386027e57518f frame00000334 +297d3204ce826d3988b18198f9f83f38 frame00000335 +f2e30ea44ccd5414720f3e2640ed07c0 frame00000336 +95062f00309888a5f9e87e93eac91937 frame00000337 +3daf6b3fa9d5bc6d75fe30f017550749 frame00000338 +6fe632f75a410e56a6eb02c86417151d frame00000339 +55d6fbede151966053910c3f4a5aeac8 frame00000340 +1848446e3b9ec5c63a504f560f4e5e6c frame00000341 +b7579f9133429f40d74fbbe0d4b04437 frame00000342 +7cd94bf9cedfdf4773e7b6674e60cc8f frame00000343 +dca8404160a166dac5582faab89226e0 frame00000344 +05ad9c6b3aec8e4d4d6f4d1faed9c50e frame00000345 +01942b8901a94d9fd321fe1931679f09 frame00000346 +645772ee7afa767ad123ce7697445626 frame00000347 +0eeb3f21b4c0c6d1213309990860449f frame00000348 +e188610b4eac5eb633f359883d2735db frame00000349 +651403f6a2cc4c1c1a31f5088c2a144f frame00000350 +d5905f4c3391a5ac2c393708bbfa9e42 frame00000351 +d8751cf69c8e5d151dc7b52a61c0e7d5 frame00000352 +f300ead16a02bc3d05429695eb4dcab1 frame00000353 +dd83513598c1fb0db9a645433d19b38f frame00000354 +09435fb6851d1ad260b601cf84c5bb8c frame00000355 +9366f33abc708c30a523928dca48fd53 frame00000356 +5417e629e60b229601b85bbe20f16272 frame00000357 +1719f31656069285249f9b660e079e00 frame00000358 +d1cd695725e5b6470c74d5067e1112ba frame00000359 +b3cd6c30d0a38c97c98cac2754d0eb8b frame00000360 +525aca6dbee4e926fe7469663114a023 frame00000361 +bf691746c48fc05f409d997977e235bf frame00000362 +de7fbf0bdbc9bce46ebb18fdab09f84b frame00000363 +2e90fb8c7c12d5dfaf94e50d0e401522 frame00000364 +55744fee21cec660951cdf9d9b0daf7f frame00000365 +9cbc747c3047cd9304cd6565f420b6f6 frame00000366 +a8a38907a591af9fd67e7dfd7190a207 frame00000367 +d3d17b333a881cafa9b634eb33d59675 frame00000368 +5eb3c974ca40b787e769e9c4bc140971 frame00000369 +d676a38872a3a775c3a7c3bda20da468 frame00000370 +80cf8b967ac490aaad2f6c0ba3577b1d frame00000371 +f7bd9ae9435dce1c8f18a3ba35d1f6f5 frame00000372 +2bd06946d5dd868ab48aba7793e80bf0 frame00000373 +9b16aba431538a93afceb7c0455c56f5 frame00000374 +f5b4ff3841f75ea58e6afdd1a07a95a1 frame00000375 +f0042455f16fe4045d87eb842dd1f727 frame00000376 +d786ee1d566d31b94bdf73a118310b98 frame00000377 +6d7157e94c5eafd6a659b8e33bdd0218 frame00000378 +d5596156b545109f578159f6dc58b57f frame00000379 +256888945a18bf2133904c2b63808a0e frame00000380 +a50977b07bfc9ba57a1a175bb160608b frame00000381 +d605ef65cff269f561a06ba3c49f09ac frame00000382 +d6dbfe552636fe2237399521a6b6d68a frame00000383 +fc73c49dedef70d8abbdbf2f72ea96ec frame00000384 +60cb4e050d64907568314c3be6e06f5e frame00000385 +2928fa682db3a6d05f6cd401639b357e frame00000386 +c1dad90eabc54a486e9d9e51d0ad5f31 frame00000387 +4a2c092c15805cc6e13dcefeacb2fe0c frame00000388 +6525275eac138de97b17cd237af46531 frame00000389 +94367f036297df8a3d6bc6f7570b5786 frame00000390 +5f9e5aaf17114e7bda6bc7ef18ded362 frame00000391 +96671c8e7d7ea166d35a84eb85c0292a frame00000392 +df7d7646fed212fc1a95ceb795722a35 frame00000393 +b7a33e972a4bc1eec074945788c0f276 frame00000394 +8aa310159b63e4234ddec48cd127765a frame00000395 +c2c5722a5cc1cee991ee64811caf53cd frame00000396 +3c5fa640d8c9293b5220239a633342d6 frame00000397 +78a7f5d7bc856db528fcc7fbfa134fbd frame00000398 +f282122476932d46d4c27dc15086abcb frame00000399 +64ab9ba516855916b60529935236dec5 frame00000400 +bca2085b494f15e115c8aa95e23146f7 frame00000401 +ab7fa6ccae20a96c749eaea55d07c784 frame00000402 +ff869f6e24a7d716bba9668e07b9a918 frame00000403 +3fab2939ecd1ac8855beab103bd69f36 frame00000404 +288b6d2b98ce6dfc2e8786e30c7316d1 frame00000405 +cfe31a288e39b4c292a4536390d273a7 frame00000406 +b22912d18c000a1acdf2156efefd523c frame00000407 +ed39a56bcab3531b39f9a4c3c0336e02 frame00000408 +7464a1b415911ed172cf1e728924ac50 frame00000409 +e3715580ad37f3c908fd5ae4a6cbf4e0 frame00000410 +46dfbc38fbd704bce87eebe3c282a034 frame00000411 +6fadf33ecddfab7945bae3c02d6c6de5 frame00000412 +d3a74ecfa25f7c94782ccf4761e2ade8 frame00000413 +09edd46b21699ae289cbd33d165f3738 frame00000414 +c78a764a037e8770fe8da18c61cffc91 frame00000415 +c1ce9f0534340fccd6de9a1a6fce32c7 frame00000416 +36d15fbd31e9f2f83602e8a8eebbf6ac frame00000417 +a2ffb09c714ed28e3d425a214035aa59 frame00000418 +1203c4a3ffc79dfbebdfaa6ca18cffd1 frame00000419 +1c1a22b9c136c12dbef8ce93bd17c557 frame00000420 +0a6d9a9b9f8455fa519945bf58b94dab frame00000421 +82557e4a2e13fbde3c9bd08d9e08bf54 frame00000422 +7a70ed9ed6ece5bbfd2e90f0eb573e94 frame00000423 +4258ccc88ec817556deed6c4a72ea7fe frame00000424 +88fb52bf6a137f260665864c45f52e8b frame00000425 +b8cfb2e835c6a39caeb68597a282271d frame00000426 +8cf62e3cf3f099bed53f006591f83de8 frame00000427 +c40667e47535bfc0bc9a7ee5541da83a frame00000428 +c5d7f40db7b05f742d65364ff0336dfa frame00000429 +2e244804566537840b21a0c7b25106b6 frame00000430 +49c80feea25bd27192ecc86688eb68b6 frame00000431 +c4fcf111ed980d6a571af74ce1accdd9 frame00000432 +5840abd6eb7637bf1cb9800070206549 frame00000433 +908c17ac50d5e17ec30015ed4cb71592 frame00000434 +d61bcebcd80e945bd00d49937b975242 frame00000435 +9e4b867efde028d45df50cdab5c798dc frame00000436 +a529e9c97a201b05bca8523e6e7139cd frame00000437 +580f1e043b176846f891bfe8e92da0a2 frame00000438 +030615762aceca4bf3eb952ed8b6a60c frame00000439 +59a7f2706c069e9d5f83eaccdb1b1903 frame00000440 +78d165907a0e5cce47329a1a05a534f4 frame00000441 +bcd4110ae746655461a9de71cf3bbb17 frame00000442 +beb0f62f9de4b55e0b303fe7f1b5e3df frame00000443 +f59d60092574e32d45b2add9617a07c3 frame00000444 +19f43657bf4655a7a47b09df1768e311 frame00000445 +b8c2bef1372d6f80a1f1ef3152cb55c1 frame00000446 +072dc651a71184e7d0da86057033fa9d frame00000447 +1dbb417b70dbf9fc895779e268b1125b frame00000448 +85460f0912819164f8fe50e8dd7975c5 frame00000449 +4337864efeb9f0558c2dc0e33ed5333b frame00000450 +009edaac34aa2faf827a02bcbdd23a7a frame00000451 +a7c2f4fd60206fb878dc2c6cdd43c3f8 frame00000452 +0d1906ce4d2c2cd0d1cf18fbb95b3f29 frame00000453 +b0de7830f458a8bac23b39571963cc2b frame00000454 +fd9e92286630f55513708d88f2964317 frame00000455 +c10294f79b001d1256e2a6498bb562fd frame00000456 +fb29f62d0cb4688485e802a8661cd0f3 frame00000457 +79ceb4c945f340689294cdaa17d570c9 frame00000458 +274557ec45f5570b9647fb9631128590 frame00000459 +22561ee780efdef8d9bd5d214ada618d frame00000460 +07feac6f948580f0c568c8d5f5ac52d4 frame00000461 +a61de47530e36581745733be4d72aabd frame00000462 +1075babe1932f235e8a68adc6a961882 frame00000463 +42885399ff0a7a0555f105277f597e61 frame00000464 +fa7d9f2194f9b5b412b92ed9f62215fd frame00000465 +09e81917a4a294719c61574d4b604a65 frame00000466 +eed029180d0e3571a1bcac054176908d frame00000467 +ccc35f4bfb9d903d3c40ff9cb1c2cefe frame00000468 +1bbebc9156a5b6aa2b2ac5355d7da7de frame00000469 +05d3ac243baff80d2f79f20ec10652ab frame00000470 +47617f92b9f2bd06619b6861a20ad9a7 frame00000471 +958702228924b19b983fdea0dba21372 frame00000472 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wnv1/wnv1-codec.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wnv1/wnv1-codec.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wnv1/wnv1-codec.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wnv1/wnv1-codec.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,86 @@ +1754b5888b5b89c5b89aa61e579cef3e frame00000000 +4de9bdf58133e0fa495855056528b1a1 frame00000001 +5eb444bfe678a02e1fff71450ddf9263 frame00000002 +9edb8eb1db1ad6ca1634ac17bfbb5c38 frame00000003 +f7a894ec6562a22ca0c4b25df3221e41 frame00000004 +b7f0b10e1179aac1671168f452c109c9 frame00000005 +16ac437900a17e5a9bae7f22635b8249 frame00000006 +01365d3fd70e1353e7735cbe964601c9 frame00000007 +efdc721e4e430ba7becb071ad2518953 frame00000008 +2f7d5047aab6c930f64847a53003e2a4 frame00000009 +20785d0e2dc024c8cd2f4828f527c70a frame00000010 +f3c8c26fcf5dc26b0d5fadce3565f648 frame00000011 +d885a82b296a2d2b4f6d2360e4ae4c11 frame00000012 +1c2c9648a41f2e30de37e19b494cc0e3 frame00000013 +fa581384c25aca43c3948f6dac9e3855 frame00000014 +40743c13b4339afdc8c0ae7fde0a00a1 frame00000015 +edd037f2e9fc58ef06de782e2533b43c frame00000016 +6a04e2860f532f4c74dfc1f5fa484ceb frame00000017 +90a37876c1037840f5e5bbd5fb46b86e frame00000018 +5786d56c8b80e1fbf4a2ba76e2f323a1 frame00000019 +6f6bcfd8bf4e26bfb0698f5e20d00b65 frame00000020 +70896e685cad539d18dac83c5eec2f28 frame00000021 +96413e6fd16bcd4f7d250a4754bd1153 frame00000022 +ac8a4c83f14af1c1291943353de9f301 frame00000023 +e0d11c8fb7a571809ed8d828fe7f8c97 frame00000024 +86c4d9365965b4872a99e36309ccd57c frame00000025 +3580eb32731585b5e9fda6e89300444b frame00000026 +ca69ad5f0fb47087855d9c989f83c669 frame00000027 +488c2f3392fcaa529cb5877f38b86e4b frame00000028 +3698e56889e40e72abcb32365f9718a0 frame00000029 +6c700b92d50f7dcac7eb2b2dc23e0fa0 frame00000030 +d14ce6ce000267a102f3056342804c35 frame00000031 +1b9b60ead0f5d12b1126000c2ad2af42 frame00000032 +91fe31dfa3bcf2203a4293edaab9f202 frame00000033 +ce39ce019e595d41cfbde3dbeac90e96 frame00000034 +0c03ad5fccdaa1c8fe93450401e6b294 frame00000035 +689aa0fe3937d0ed98bd181f810a75cb frame00000036 +d0dc7c70254a17f00544ef290ebb1ac5 frame00000037 +3c65825d619775563472ef541a194ff6 frame00000038 +a9fcc63640df8ac2e20128fb32901ef2 frame00000039 +2dccf36a21ed788851f95cd27f880b8d frame00000040 +437015244abb57c36161258e62696769 frame00000041 +4e7b09d487f55748004e2ff3829ef1db frame00000042 +dd698f7095be6b1fd8c78da217d7e562 frame00000043 +f6d865e7d9c0123682fa32b77c996c7d frame00000044 +21b5b01bed4b7bf7242fbadd945c2935 frame00000045 +32cb7feb49e5d4920f7e2fec7390bcf1 frame00000046 +ef71a57d7b8ad45a9478ce9ab4a1eb0e frame00000047 +73029c94a82a838ba2f3ca8897a0e319 frame00000048 +c34e26e8d835d14b53048c16046591ec frame00000049 +a95a13116141e850acd98ddf0abba3f5 frame00000050 +942603bc7483133f43deae86a763f2cc frame00000051 +9b07b5bf56dda526fed43a57c43b26b5 frame00000052 +40149bac4bce5cd91dffa439c0956fd2 frame00000053 +4ee9d6079557fc81ca5d4c8663105d5e frame00000054 +daa9fd5955e5efabebeee71bff0db403 frame00000055 +12bf6d1773382bc50db87a993f6c6c2b frame00000056 +cf2f5aeca11dbea71c260d8a5a5cf0c5 frame00000057 +0657105e2e612f23c95547867c1644fb frame00000058 +48edc998884ba6106ada4d753d521f07 frame00000059 +d0d9a56f33813cf38241a02d39401bfa frame00000060 +4b87e0bb9aa0faa8a999acb27ebff108 frame00000061 +99b9c4e6fa1b84fb6a18ae8c0666f621 frame00000062 +8da9ec9dbf645fc42bdbe6b3f195b85d frame00000063 +9b422ef2921e274609391d0ef26d9e0d frame00000064 +90aa30990fbef29e8425e4cfdb1d5d18 frame00000065 +680b0cee3c8e26d3828390ae88cd8256 frame00000066 +4c44ce192efdf9c7cd7ac4b4bb70b290 frame00000067 +114e3caa36f0d88816bfde32d293f29d frame00000068 +cfd45a2d9595d6e49225294fa63568da frame00000069 +30cf3b3a192b2a52eec95c6d9d34e6b9 frame00000070 +6ce7710fe8e25559b2f66ecec81867e4 frame00000071 +0e465eb9ab7f6eda9d68ec49919ce406 frame00000072 +babd511bf6a73f57e0cecf4401d5090a frame00000073 +30d94645102e7518458d7e1ffdd49613 frame00000074 +32c1ba2d4033e7b32a0e19e09bfe8bcc frame00000075 +8f24245f302833402ccf5e0b0bc2c537 frame00000076 +378990f9e29af812a95e302f13d74e09 frame00000077 +4307f7278d2693a468b1dc2f14c2751e frame00000078 +7bdca44fc3c73969406ec2cb785376fa frame00000079 +d39acfdd116a4dffcb777356458af8f3 frame00000080 +ea74af3b9fd4d5003da24c563f3fb02f frame00000081 +034a1d189c27441732fa2bb71c5c4de6 frame00000082 +8d992fe99c617a5c7c7ae0a6859f36ba frame00000083 +9f5ed0019940ac27112248d2edaf1da4 frame00000084 +46b5f30b3f5bd17b125691c54148edf2 frame00000085 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wtv/law-and-order-partial.wtv.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wtv/law-and-order-partial.wtv.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/wtv/law-and-order-partial.wtv.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/wtv/law-and-order-partial.wtv.md5 2012-01-08 10:15:51.000000000 +0000 @@ -0,0 +1,52 @@ +1c94cd0769a82e057e88cee625e00421 frame00000000 +8ff978128aed9e3873eea8dfac7eeb03 frame00000001 +3e2757468e6364aa86be97edc4206e4e frame00000002 +c5bcbe78cc426236efac042353c585fc frame00000003 +72ac104d42036422db22958d1da66ed7 frame00000004 +a0889d1c41b401b286982f4ba75ca449 frame00000005 +39029ad3ccc26357d5320c2ea3e4bc27 frame00000006 +d814d658f68f4b2e05792e635635eafa frame00000007 +49dbd4f24924164d3ab7b2cc4734787f frame00000008 +2455460ecd5bef3df22bc64c7e9d5e80 frame00000009 +982e88445835ebe2c1f8ea85179d66d6 frame00000010 +b6228396ef185bc37693252b7a87a380 frame00000011 +576261956e02fcb58a220cf95841bc38 frame00000012 +d581efdad6f27dbee85982e659923b1f frame00000013 +5394a473c6536a19601e7eb5ef1b7ebd frame00000014 +0d49bf082b2306a75c22d4976a0b8d17 frame00000015 +df570fef0b55ba95e89bc25d69a04992 frame00000016 +0bb89c116b41f6319c41b1ea259ef1c4 frame00000017 +30d3c02518a70a4e8cceb060980b29d8 frame00000018 +d69c732ecff72f2b9abe8d89f852919e frame00000019 +4a20ad7c6f8a01289459e86367f56628 frame00000020 +37fa7128063722275bf6538c7d02c8d9 frame00000021 +55f74beef578ece974e440498144ab6d frame00000022 +19d370cf3b673a25a1bba6984e5c04b2 frame00000023 +bcf6ea7c86d7c9ac31ac11c15b1381dc frame00000024 +52aa076c5f1e23818595f36a137ffcaf frame00000025 +3f5580c257c28fbaf7d91b61efef8dff frame00000026 +ae6eb2b980459d6e4e9b18e1dbcc25b0 frame00000027 +017c1140bf6c6b2c991225648f1815f6 frame00000028 +9e9c4e129296e77d3ff4964a678effa2 frame00000029 +e85bbcae64c4cbb87cece87b4277e315 frame00000030 +6a5eea2f121f348fdb4ee43b5a58aa44 frame00000031 +dfdbee5370ab83f11c5d1eed02e0b344 frame00000032 +815e9bc872ba877c785501436593e59a frame00000033 +c734aa9b5c3e16956a3e71668b055eef frame00000034 +40d2c3dffbd1e0e5c3b529f85034055a frame00000035 +a6175e7037e0a76370e8ccd72d7d5bd9 frame00000036 +2801c033e211ee93c52af43dd4dca468 frame00000037 +4f8880a9f8fd2fbef55672003210a33e frame00000038 +a7ddf573ab5cf26aa2358ea4f562edcf frame00000039 +4edf1ed8184ce5aa95f6407cad7108de frame00000040 +8304ae07f89f673503b8e437d5b353d7 frame00000041 +9ea82af075cb92dd7e3de35eac3e341f frame00000042 +ce16e5cd29cc5c792414426c612d29b8 frame00000043 +0de6709e866fe210be189eb98e0c8f5d frame00000044 +5edb2019fb85f9daa9a1956fa2e21fed frame00000045 +8adc6aa8e1ddb55d7b08e84f7330f8dc frame00000046 +e3b18822d6ff35d87ad4bf0247bec72a frame00000047 +ad7ae5695d0d93ad4abc70ee2cd87fe5 frame00000048 +b2bac3ea446df196e4a16abb2655f8a3 frame00000049 +b63d8ad0d51df9dc720f037640206bee frame00000050 +499d04c096dbecb4d7ca5f4d975fab19 frame00000051 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/zmbv/wc2_001-partial.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/zmbv/wc2_001-partial.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/zmbv/wc2_001-partial.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/zmbv/wc2_001-partial.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,276 @@ +279827a7a7d3ac9a09c931adb27c2583 frame00000000 +279827a7a7d3ac9a09c931adb27c2583 frame00000001 +279827a7a7d3ac9a09c931adb27c2583 frame00000002 +279827a7a7d3ac9a09c931adb27c2583 frame00000003 +279827a7a7d3ac9a09c931adb27c2583 frame00000004 +279827a7a7d3ac9a09c931adb27c2583 frame00000005 +279827a7a7d3ac9a09c931adb27c2583 frame00000006 +279827a7a7d3ac9a09c931adb27c2583 frame00000007 +279827a7a7d3ac9a09c931adb27c2583 frame00000008 +279827a7a7d3ac9a09c931adb27c2583 frame00000009 +279827a7a7d3ac9a09c931adb27c2583 frame00000010 +279827a7a7d3ac9a09c931adb27c2583 frame00000011 +279827a7a7d3ac9a09c931adb27c2583 frame00000012 +279827a7a7d3ac9a09c931adb27c2583 frame00000013 +279827a7a7d3ac9a09c931adb27c2583 frame00000014 +279827a7a7d3ac9a09c931adb27c2583 frame00000015 +279827a7a7d3ac9a09c931adb27c2583 frame00000016 +279827a7a7d3ac9a09c931adb27c2583 frame00000017 +279827a7a7d3ac9a09c931adb27c2583 frame00000018 +279827a7a7d3ac9a09c931adb27c2583 frame00000019 +279827a7a7d3ac9a09c931adb27c2583 frame00000020 +279827a7a7d3ac9a09c931adb27c2583 frame00000021 +279827a7a7d3ac9a09c931adb27c2583 frame00000022 +279827a7a7d3ac9a09c931adb27c2583 frame00000023 +279827a7a7d3ac9a09c931adb27c2583 frame00000024 +279827a7a7d3ac9a09c931adb27c2583 frame00000025 +279827a7a7d3ac9a09c931adb27c2583 frame00000026 +279827a7a7d3ac9a09c931adb27c2583 frame00000027 +279827a7a7d3ac9a09c931adb27c2583 frame00000028 +279827a7a7d3ac9a09c931adb27c2583 frame00000029 +279827a7a7d3ac9a09c931adb27c2583 frame00000030 +279827a7a7d3ac9a09c931adb27c2583 frame00000031 +279827a7a7d3ac9a09c931adb27c2583 frame00000032 +279827a7a7d3ac9a09c931adb27c2583 frame00000033 +279827a7a7d3ac9a09c931adb27c2583 frame00000034 +279827a7a7d3ac9a09c931adb27c2583 frame00000035 +279827a7a7d3ac9a09c931adb27c2583 frame00000036 +279827a7a7d3ac9a09c931adb27c2583 frame00000037 +279827a7a7d3ac9a09c931adb27c2583 frame00000038 +279827a7a7d3ac9a09c931adb27c2583 frame00000039 +279827a7a7d3ac9a09c931adb27c2583 frame00000040 +279827a7a7d3ac9a09c931adb27c2583 frame00000041 +279827a7a7d3ac9a09c931adb27c2583 frame00000042 +279827a7a7d3ac9a09c931adb27c2583 frame00000043 +279827a7a7d3ac9a09c931adb27c2583 frame00000044 +279827a7a7d3ac9a09c931adb27c2583 frame00000045 +279827a7a7d3ac9a09c931adb27c2583 frame00000046 +279827a7a7d3ac9a09c931adb27c2583 frame00000047 +279827a7a7d3ac9a09c931adb27c2583 frame00000048 +279827a7a7d3ac9a09c931adb27c2583 frame00000049 +279827a7a7d3ac9a09c931adb27c2583 frame00000050 +279827a7a7d3ac9a09c931adb27c2583 frame00000051 +279827a7a7d3ac9a09c931adb27c2583 frame00000052 +279827a7a7d3ac9a09c931adb27c2583 frame00000053 +279827a7a7d3ac9a09c931adb27c2583 frame00000054 +279827a7a7d3ac9a09c931adb27c2583 frame00000055 +279827a7a7d3ac9a09c931adb27c2583 frame00000056 +279827a7a7d3ac9a09c931adb27c2583 frame00000057 +279827a7a7d3ac9a09c931adb27c2583 frame00000058 +279827a7a7d3ac9a09c931adb27c2583 frame00000059 +279827a7a7d3ac9a09c931adb27c2583 frame00000060 +279827a7a7d3ac9a09c931adb27c2583 frame00000061 +279827a7a7d3ac9a09c931adb27c2583 frame00000062 +279827a7a7d3ac9a09c931adb27c2583 frame00000063 +279827a7a7d3ac9a09c931adb27c2583 frame00000064 +279827a7a7d3ac9a09c931adb27c2583 frame00000065 +279827a7a7d3ac9a09c931adb27c2583 frame00000066 +279827a7a7d3ac9a09c931adb27c2583 frame00000067 +279827a7a7d3ac9a09c931adb27c2583 frame00000068 +279827a7a7d3ac9a09c931adb27c2583 frame00000069 +279827a7a7d3ac9a09c931adb27c2583 frame00000070 +279827a7a7d3ac9a09c931adb27c2583 frame00000071 +279827a7a7d3ac9a09c931adb27c2583 frame00000072 +279827a7a7d3ac9a09c931adb27c2583 frame00000073 +279827a7a7d3ac9a09c931adb27c2583 frame00000074 +279827a7a7d3ac9a09c931adb27c2583 frame00000075 +279827a7a7d3ac9a09c931adb27c2583 frame00000076 +279827a7a7d3ac9a09c931adb27c2583 frame00000077 +279827a7a7d3ac9a09c931adb27c2583 frame00000078 +279827a7a7d3ac9a09c931adb27c2583 frame00000079 +279827a7a7d3ac9a09c931adb27c2583 frame00000080 +279827a7a7d3ac9a09c931adb27c2583 frame00000081 +279827a7a7d3ac9a09c931adb27c2583 frame00000082 +279827a7a7d3ac9a09c931adb27c2583 frame00000083 +279827a7a7d3ac9a09c931adb27c2583 frame00000084 +279827a7a7d3ac9a09c931adb27c2583 frame00000085 +0fa546806b85c884abaf983c9d51fc72 frame00000086 +27f3f923e5623996e8a19d3d17a8556d frame00000087 +4fb39678411959eb91cc7322dd8f4520 frame00000088 +b11d2b42d97cacda49055ed12b94a24e frame00000089 +cfacaf624f331e02521d0d2f8e33feaf frame00000090 +090424ec55bb3f35bce954ce5e9adad3 frame00000091 +06599183b3a8b18f52c8738c7915243d frame00000092 +4295c035cef52ded1a3c318ca8fa39b3 frame00000093 +2ff54efa5f1a8149eba47c685a7f75bd frame00000094 +2338a974dc2a7895fb9b1ca62c3cf36f frame00000095 +59101f31e0b19e117dc3a646aeee8fc1 frame00000096 +3c088bc6d8bc8d9cda05409510f1dd68 frame00000097 +e3e684ecbba7f5423388e990f1234ae0 frame00000098 +cc50b4d6dd97cb287780b273538f1f3b frame00000099 +d909bf0d4bffbf55eef06d4d219bd2a6 frame00000100 +debd73b88567399dbffcce85c287be6a frame00000101 +e819cf1486230034d9cc13a30c2cbd9c frame00000102 +f97c6fa1b29f0dca448e981762e93d54 frame00000103 +c6ef635c721f0190153ef2a63edf79cd frame00000104 +0efce72667e0f4779efa4c709fde6919 frame00000105 +5d66effba780207f036b2553bbef3b81 frame00000106 +51d7e2fc4b13d5c2bc3d30091711e6be frame00000107 +46b7ee7e3d0ae3e008c102502681267f frame00000108 +43b0dc8e2d0cf2198e1778ce364dfc2c frame00000109 +ca00e0f0e77453e383befb37a7a5b067 frame00000110 +f45a8e3adf56f99f0da5fa50e010f7a6 frame00000111 +47aa5743e8e89b29e753f76f8ff5d333 frame00000112 +98709ee13af99e4de9a8d3a15a495310 frame00000113 +6824eba2a9d26e89d4183dc91fe35763 frame00000114 +5cdd007dd64783e807bf5676a576ff26 frame00000115 +d5851473d94af13a7149aaadd106d008 frame00000116 +8aeee4f96b06fe7caccd3b5c90d2a2d2 frame00000117 +3dffe7f7eaab935a2af516a541edba56 frame00000118 +ae8c8fb889e303dbd3fc94b97ad1f1c7 frame00000119 +01cf1eed8f8915f5cdcc20c6044005c4 frame00000120 +92ba1adb6f8c51a70d3d410a0a89bfb0 frame00000121 +68622d5a46cf6ebaedcdb59ae1b4db78 frame00000122 +b6dd3bb002b96328fc7b50d74d0d1603 frame00000123 +d24a30b58388fc550b1b5297a71d665c frame00000124 +77f9833a29b6a3cf5c9ff11a07f6fed8 frame00000125 +ed767ef2195790d4f8bb3477289fab19 frame00000126 +2a0c4fc35ef76c917987e32b85e96c5b frame00000127 +fd995b00d34f87ad782a13513b7e3b27 frame00000128 +5cb70dd8a76876a613ec8df35cf7aff5 frame00000129 +ecca0cc5b9fc008f66dbcaaa3d59190d frame00000130 +45876b27577fffa57e2ff8bf1d5912fd frame00000131 +a021bf8b090daa00c60f12f40e739801 frame00000132 +a021bf8b090daa00c60f12f40e739801 frame00000133 +a021bf8b090daa00c60f12f40e739801 frame00000134 +6294b5f5c09829b3873fe7c0d8e09d10 frame00000135 +6294b5f5c09829b3873fe7c0d8e09d10 frame00000136 +6294b5f5c09829b3873fe7c0d8e09d10 frame00000137 +6294b5f5c09829b3873fe7c0d8e09d10 frame00000138 +4e030bedf32401d99b001734b40c42ff frame00000139 +4e030bedf32401d99b001734b40c42ff frame00000140 +4e030bedf32401d99b001734b40c42ff frame00000141 +5c4019b44039f8bfec8938a111515da7 frame00000142 +5c4019b44039f8bfec8938a111515da7 frame00000143 +5c4019b44039f8bfec8938a111515da7 frame00000144 +5c4019b44039f8bfec8938a111515da7 frame00000145 +f82521e143124e9c8f51281ccbfb6fb2 frame00000146 +f82521e143124e9c8f51281ccbfb6fb2 frame00000147 +f82521e143124e9c8f51281ccbfb6fb2 frame00000148 +734f6439e85d024e94472ca700550165 frame00000149 +734f6439e85d024e94472ca700550165 frame00000150 +734f6439e85d024e94472ca700550165 frame00000151 +734f6439e85d024e94472ca700550165 frame00000152 +10b9b7a7563aed87c31678c24c36b3ab frame00000153 +10b9b7a7563aed87c31678c24c36b3ab frame00000154 +10b9b7a7563aed87c31678c24c36b3ab frame00000155 +6a1edf875136e4d394e34ceeafdfd3ff frame00000156 +6a1edf875136e4d394e34ceeafdfd3ff frame00000157 +6a1edf875136e4d394e34ceeafdfd3ff frame00000158 +6a1edf875136e4d394e34ceeafdfd3ff frame00000159 +f5f59ad5d68fb0f3299eb76f4c0e31e2 frame00000160 +f5f59ad5d68fb0f3299eb76f4c0e31e2 frame00000161 +f5f59ad5d68fb0f3299eb76f4c0e31e2 frame00000162 +1639a2ce85f7a42c18d34bf3cc505f63 frame00000163 +1639a2ce85f7a42c18d34bf3cc505f63 frame00000164 +1639a2ce85f7a42c18d34bf3cc505f63 frame00000165 +1639a2ce85f7a42c18d34bf3cc505f63 frame00000166 +7847417734b1dfe2fa8b7cf8de62a500 frame00000167 +7847417734b1dfe2fa8b7cf8de62a500 frame00000168 +7847417734b1dfe2fa8b7cf8de62a500 frame00000169 +939e279a80974d22214afadaed03e2b2 frame00000170 +939e279a80974d22214afadaed03e2b2 frame00000171 +939e279a80974d22214afadaed03e2b2 frame00000172 +939e279a80974d22214afadaed03e2b2 frame00000173 +c0cb4f7ea7ba3c355e96ea0bece69d32 frame00000174 +c0cb4f7ea7ba3c355e96ea0bece69d32 frame00000175 +c0cb4f7ea7ba3c355e96ea0bece69d32 frame00000176 +91f07e9e0e512f16b54a665b6458b402 frame00000177 +91f07e9e0e512f16b54a665b6458b402 frame00000178 +91f07e9e0e512f16b54a665b6458b402 frame00000179 +91f07e9e0e512f16b54a665b6458b402 frame00000180 +fba95655d0340e8b1c52d7d76fc24921 frame00000181 +fba95655d0340e8b1c52d7d76fc24921 frame00000182 +fba95655d0340e8b1c52d7d76fc24921 frame00000183 +beb503285aed74df17af6bee56710812 frame00000184 +beb503285aed74df17af6bee56710812 frame00000185 +beb503285aed74df17af6bee56710812 frame00000186 +beb503285aed74df17af6bee56710812 frame00000187 +d48bf75dea6201d1f8b731ae49e3fc7f frame00000188 +d48bf75dea6201d1f8b731ae49e3fc7f frame00000189 +d48bf75dea6201d1f8b731ae49e3fc7f frame00000190 +5669dcc388e7620436fc2e13fd417eda frame00000191 +5669dcc388e7620436fc2e13fd417eda frame00000192 +5669dcc388e7620436fc2e13fd417eda frame00000193 +5669dcc388e7620436fc2e13fd417eda frame00000194 +9dba5a1609fc3e7d30078e296c6a3421 frame00000195 +9dba5a1609fc3e7d30078e296c6a3421 frame00000196 +9dba5a1609fc3e7d30078e296c6a3421 frame00000197 +c4cf3e1e445524ff9cd52535217f84f4 frame00000198 +c4cf3e1e445524ff9cd52535217f84f4 frame00000199 +c4cf3e1e445524ff9cd52535217f84f4 frame00000200 +c4cf3e1e445524ff9cd52535217f84f4 frame00000201 +a76e48c341ce796bd5265c10e5b9fb6a frame00000202 +a76e48c341ce796bd5265c10e5b9fb6a frame00000203 +a76e48c341ce796bd5265c10e5b9fb6a frame00000204 +5057d863711dc907a275f32ccd8b5164 frame00000205 +5057d863711dc907a275f32ccd8b5164 frame00000206 +5057d863711dc907a275f32ccd8b5164 frame00000207 +5057d863711dc907a275f32ccd8b5164 frame00000208 +d7fcf973c34d0ffba354780f8c68fe77 frame00000209 +d7fcf973c34d0ffba354780f8c68fe77 frame00000210 +d7fcf973c34d0ffba354780f8c68fe77 frame00000211 +4417a90a3da4bedaea8364a418d320c0 frame00000212 +4417a90a3da4bedaea8364a418d320c0 frame00000213 +4417a90a3da4bedaea8364a418d320c0 frame00000214 +4417a90a3da4bedaea8364a418d320c0 frame00000215 +defdc16c1290253f4268f321af65d630 frame00000216 +defdc16c1290253f4268f321af65d630 frame00000217 +defdc16c1290253f4268f321af65d630 frame00000218 +a06958c36a48000eb1b9a29705a9e6f2 frame00000219 +a06958c36a48000eb1b9a29705a9e6f2 frame00000220 +a06958c36a48000eb1b9a29705a9e6f2 frame00000221 +a06958c36a48000eb1b9a29705a9e6f2 frame00000222 +fec4263818f05ebeae6952854241d35c frame00000223 +fec4263818f05ebeae6952854241d35c frame00000224 +fec4263818f05ebeae6952854241d35c frame00000225 +67e6c4c8cd826040eac88447bc9b6687 frame00000226 +67e6c4c8cd826040eac88447bc9b6687 frame00000227 +67e6c4c8cd826040eac88447bc9b6687 frame00000228 +67e6c4c8cd826040eac88447bc9b6687 frame00000229 +6c2fc4304c2d6028e4d8ea615f321da3 frame00000230 +6c2fc4304c2d6028e4d8ea615f321da3 frame00000231 +6c2fc4304c2d6028e4d8ea615f321da3 frame00000232 +23061f5b56f33c0f675ecd905df4f232 frame00000233 +23061f5b56f33c0f675ecd905df4f232 frame00000234 +23061f5b56f33c0f675ecd905df4f232 frame00000235 +23061f5b56f33c0f675ecd905df4f232 frame00000236 +be0d6d0aaf93c33853f2700e16c54668 frame00000237 +be0d6d0aaf93c33853f2700e16c54668 frame00000238 +be0d6d0aaf93c33853f2700e16c54668 frame00000239 +ff3400bd8d7daec3ff5d76eb149d048c frame00000240 +ff3400bd8d7daec3ff5d76eb149d048c frame00000241 +ff3400bd8d7daec3ff5d76eb149d048c frame00000242 +ff3400bd8d7daec3ff5d76eb149d048c frame00000243 +e266caf08c739a414e6d738558f462e7 frame00000244 +e266caf08c739a414e6d738558f462e7 frame00000245 +e266caf08c739a414e6d738558f462e7 frame00000246 +65dd0f7cd35f447fd10cb00c08bf2f82 frame00000247 +65dd0f7cd35f447fd10cb00c08bf2f82 frame00000248 +65dd0f7cd35f447fd10cb00c08bf2f82 frame00000249 +65dd0f7cd35f447fd10cb00c08bf2f82 frame00000250 +03d3fbc0040501e427c97847d38a6a79 frame00000251 +03d3fbc0040501e427c97847d38a6a79 frame00000252 +03d3fbc0040501e427c97847d38a6a79 frame00000253 +f0baafc13fdd9ef6cd70385c2c484dca frame00000254 +f0baafc13fdd9ef6cd70385c2c484dca frame00000255 +f0baafc13fdd9ef6cd70385c2c484dca frame00000256 +f0baafc13fdd9ef6cd70385c2c484dca frame00000257 +3572a5fb9a12b71bdbaf6a4a94d9a8b6 frame00000258 +3572a5fb9a12b71bdbaf6a4a94d9a8b6 frame00000259 +3572a5fb9a12b71bdbaf6a4a94d9a8b6 frame00000260 +4e9c93fdefd098f8c3460914d834ed2b frame00000261 +4e9c93fdefd098f8c3460914d834ed2b frame00000262 +4e9c93fdefd098f8c3460914d834ed2b frame00000263 +4e9c93fdefd098f8c3460914d834ed2b frame00000264 +7d0c6e99035355139ffb218c1f32b136 frame00000265 +7d0c6e99035355139ffb218c1f32b136 frame00000266 +7d0c6e99035355139ffb218c1f32b136 frame00000267 +cf771975e24c08af0767040fa7121a60 frame00000268 +cf771975e24c08af0767040fa7121a60 frame00000269 +cf771975e24c08af0767040fa7121a60 frame00000270 +cf771975e24c08af0767040fa7121a60 frame00000271 +c7bbecd47e6419489a3ad9121f725cdf frame00000272 +c7bbecd47e6419489a3ad9121f725cdf frame00000273 +c7bbecd47e6419489a3ad9121f725cdf frame00000274 +d430fac63d3d5f61ba6cf4b8857d9b70 frame00000275 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/zmbv/zmbv_15bit.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/zmbv/zmbv_15bit.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/zmbv/zmbv_15bit.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/zmbv/zmbv_15bit.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,534 @@ +52b8d386a1975f364f0b1c3af99dc9eb frame00000000 +0084ff2c870ab5ca97730fdb1c712187 frame00000001 +73b9f3322764ad052680ae90eba26776 frame00000002 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000003 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000004 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000005 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000006 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000007 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000008 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000009 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000010 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000011 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000012 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000013 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000014 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000015 +4ccfeeacfa14a4f82ed24d542c2a9fbe frame00000016 +84730f9576b33cd55ff65743853ab561 frame00000017 +84730f9576b33cd55ff65743853ab561 frame00000018 +84730f9576b33cd55ff65743853ab561 frame00000019 +84730f9576b33cd55ff65743853ab561 frame00000020 +cc3c220d0d314480a449d58e8fe568d1 frame00000021 +cc3c220d0d314480a449d58e8fe568d1 frame00000022 +cc3c220d0d314480a449d58e8fe568d1 frame00000023 +cc3c220d0d314480a449d58e8fe568d1 frame00000024 +cc3c220d0d314480a449d58e8fe568d1 frame00000025 +2061d68b4c43a4865b8d7adbbfbb7299 frame00000026 +2061d68b4c43a4865b8d7adbbfbb7299 frame00000027 +2061d68b4c43a4865b8d7adbbfbb7299 frame00000028 +2061d68b4c43a4865b8d7adbbfbb7299 frame00000029 +4ae5554751e84f9fcacd441c12f9e3e9 frame00000030 +4ae5554751e84f9fcacd441c12f9e3e9 frame00000031 +4ae5554751e84f9fcacd441c12f9e3e9 frame00000032 +4ae5554751e84f9fcacd441c12f9e3e9 frame00000033 +4ae5554751e84f9fcacd441c12f9e3e9 frame00000034 +8bc976f88170b3da587f400fea3a645d frame00000035 +8bc976f88170b3da587f400fea3a645d frame00000036 +8bc976f88170b3da587f400fea3a645d frame00000037 +8bc976f88170b3da587f400fea3a645d frame00000038 +b5759d11fad2aeb6ac28c8e8a70ccf97 frame00000039 +b5759d11fad2aeb6ac28c8e8a70ccf97 frame00000040 +b5759d11fad2aeb6ac28c8e8a70ccf97 frame00000041 +b5759d11fad2aeb6ac28c8e8a70ccf97 frame00000042 +b5759d11fad2aeb6ac28c8e8a70ccf97 frame00000043 +471e0715b9dd8172de164375b602bfb4 frame00000044 +471e0715b9dd8172de164375b602bfb4 frame00000045 +471e0715b9dd8172de164375b602bfb4 frame00000046 +471e0715b9dd8172de164375b602bfb4 frame00000047 +a5bac7642c70e2cb24cad7f77b05a0d1 frame00000048 +a5bac7642c70e2cb24cad7f77b05a0d1 frame00000049 +a5bac7642c70e2cb24cad7f77b05a0d1 frame00000050 +a5bac7642c70e2cb24cad7f77b05a0d1 frame00000051 +a5bac7642c70e2cb24cad7f77b05a0d1 frame00000052 +2e525ebeae538a28e7000da47ca6b416 frame00000053 +2e525ebeae538a28e7000da47ca6b416 frame00000054 +2e525ebeae538a28e7000da47ca6b416 frame00000055 +2e525ebeae538a28e7000da47ca6b416 frame00000056 +8ea9ae4bc09332bfde9bc7deee61e62d frame00000057 +8ea9ae4bc09332bfde9bc7deee61e62d frame00000058 +8ea9ae4bc09332bfde9bc7deee61e62d frame00000059 +8ea9ae4bc09332bfde9bc7deee61e62d frame00000060 +8ea9ae4bc09332bfde9bc7deee61e62d frame00000061 +dbe05b52cbe8c82601bb03cbe64de8ab frame00000062 +dbe05b52cbe8c82601bb03cbe64de8ab frame00000063 +dbe05b52cbe8c82601bb03cbe64de8ab frame00000064 +dbe05b52cbe8c82601bb03cbe64de8ab frame00000065 +f2035c1b1125a21e0bd0a5f8ae42bf70 frame00000066 +f2035c1b1125a21e0bd0a5f8ae42bf70 frame00000067 +f2035c1b1125a21e0bd0a5f8ae42bf70 frame00000068 +f2035c1b1125a21e0bd0a5f8ae42bf70 frame00000069 +f2035c1b1125a21e0bd0a5f8ae42bf70 frame00000070 +e021bff947be0b8d8f146f68a60694ef frame00000071 +e021bff947be0b8d8f146f68a60694ef frame00000072 +e021bff947be0b8d8f146f68a60694ef frame00000073 +e021bff947be0b8d8f146f68a60694ef frame00000074 +7b993281b34088e9822a8e8484630d1f frame00000075 +7b993281b34088e9822a8e8484630d1f frame00000076 +7b993281b34088e9822a8e8484630d1f frame00000077 +7b993281b34088e9822a8e8484630d1f frame00000078 +7b993281b34088e9822a8e8484630d1f frame00000079 +da15a2c8cc8fdff97bae97c030c96707 frame00000080 +2491273315b4e829c0bd8c2bc3ff2641 frame00000081 +e0ae6038d8a0d20b5d824e243eabc233 frame00000082 +9f1c002b3c2ba02461b177c267b58df5 frame00000083 +6d8c82d0e34dbe4db88ac89a21487468 frame00000084 +aa20a3ae8415985024136de05d88aed9 frame00000085 +1cb15ce190ac87618f4c5d1df0352528 frame00000086 +8b2745bd36ad2b6508f8c80ba0604384 frame00000087 +6d119a7313033cfb00f999fcb803c4e3 frame00000088 +989e717fed7836d3bc57c1ba081b724f frame00000089 +f2f94355f449c5ae0e13991058055b8c frame00000090 +1d990d2a685b0c1a34d6ec1145e2a31c frame00000091 +7ea2b48a3e4d5ab97709c27e9c6dada9 frame00000092 +033bbcfef975e2b1a7d0df14e18a717c frame00000093 +06a9b1b91fbadc15df8c7eebbb0a5d11 frame00000094 +1c0296c6830388004dbac47a6826b7df frame00000095 +97dbb73059808fcd21272e0867a5680d frame00000096 +e439e282f7a20ca0fe1fa401ee89cc93 frame00000097 +50b1570aa66d5e5bb474068ee62970f8 frame00000098 +3f7b5b5391bd483d3090d234afc8c18b frame00000099 +2db178133eebddfe975a0a64133baae0 frame00000100 +a424df2172f90a8f87b4ce10a3bf896a frame00000101 +07e0e003e6c054d66f36539001f437f0 frame00000102 +1439803b95f9eed68b74dd519c4c5640 frame00000103 +2d4c3910adabacdd4c7f128c5455ffc7 frame00000104 +552fd46e8521d66d2bafb6739015ff13 frame00000105 +5459d0b59204a097f675c25955e71250 frame00000106 +c78c32100abafbec2b7278267c56b13c frame00000107 +14e7fa3c8eba79a4c0a1f471d04ec4bc frame00000108 +86191418d71056f8cfded212d662eb34 frame00000109 +8c5ec327d61d47ebca73de49f394f546 frame00000110 +586b07844711c58e40c394bf2adff799 frame00000111 +143020ecc579c7d3246cdd7b875190a3 frame00000112 +bc5663febf83a8e6d423d3b32e62f681 frame00000113 +cdb752aaebe2f5565b215abbf27c4acf frame00000114 +2b9de0cca533bff77b1cdc4f1e75d13d frame00000115 +f8f5257bdd031db9b4b8d2ec32830afc frame00000116 +e00c138144bea49f6736a9be40deae71 frame00000117 +8d7689efcd01a2b5baf0ef4d8bdfd347 frame00000118 +b587d5919d896d6f8680f613f3dd5b67 frame00000119 +7877ec2255c90ec0e57f911d11722c21 frame00000120 +1f35dfe48cc46e58221aa7c24a4870e5 frame00000121 +3195ae1972ec41f11e0c9a0e305a3bf6 frame00000122 +44d376bf749b895eace33673c8b03313 frame00000123 +2163e53e183bea3ae57dfa1787d50d55 frame00000124 +671a297767f18e357be16ec8eb135240 frame00000125 +9b8d9219e21ae61021a3167ff2298b64 frame00000126 +bfd6577419f7bd8a91d66383b9735047 frame00000127 +28cd30fb6498771b4c4299163598f23a frame00000128 +4e3eaeabeeafd5ddbaecbd66fa48c84a frame00000129 +94d945b6600659a1de5f1820cc289d5a frame00000130 +2eaa76b1ef4242a2b1a839fc0bf5d38b frame00000131 +4c626897ec67aef63700edd6cd34654d frame00000132 +9c3ea42958a6a28f8dc2c5e1be9e87b4 frame00000133 +aa319ef405f433b54468aa4901116005 frame00000134 +374da8cb88ed552a824db15fa41207a9 frame00000135 +c13874b2ed0d8f409a847328909371a1 frame00000136 +25b3f1c6043433e922840796ce1427f5 frame00000137 +eba924f8271a1e1a0d6c5cf411cdef44 frame00000138 +1c129a0457ce1e042b5e96ef6fc1ee7c frame00000139 +349a33bdfd0706e9e270ff330d7add86 frame00000140 +8ea4b085eb2f6c1a4f7c3503d0c1653f frame00000141 +5abc58dc1f5705070d217d23b2b35fd1 frame00000142 +dc3fcaf3fcefc73669400fb30a3a1da9 frame00000143 +eb7b29799a5edb74dae0f4403d5c3483 frame00000144 +e55f0ef9f909397cb6b92447ceb2a3b0 frame00000145 +8872f70eb9908b3af79f9c918b433cd3 frame00000146 +77a5bd1b92b36b341488af69af0fad8e frame00000147 +890385a008c0f4028407cc629c96c77e frame00000148 +9cf47f0e48ae8f2f8d88865d3670f692 frame00000149 +4aa0bab571d13bbfa45b0f75fbef6be2 frame00000150 +9ae1d30defb4867e0698d44df635270d frame00000151 +d35b43aaeeb096c88f54d1c96b1d7f96 frame00000152 +72f68a43c8c5a505bba6193108a54ab9 frame00000153 +60a91628bdcd81d3eaebb36d87d40ad8 frame00000154 +55a91d1420927d7e8d02ae3f8138c04e frame00000155 +89db4f30b65f0581456ac27abc8ac98a frame00000156 +474dcf3575776133734a88762bbe3c21 frame00000157 +1660026c4aa0b21f061bdf901b967ab8 frame00000158 +827db814c309c39fba38ff27891c18c7 frame00000159 +7700fa8ec58803b505a1d5a9b5e61279 frame00000160 +82172ac81c9d20131fb57ff3231efd24 frame00000161 +5645e590526de9728fc34c6aeff3ee73 frame00000162 +19f17bd5638945cbfea404705a5fa4fd frame00000163 +d047b4a1a612bd6aa917bd4b62f9dbb2 frame00000164 +a0dc54be6317340ca3273d17595a37be frame00000165 +8f877fc93b14e9b53300cfcad55c56ff frame00000166 +8d372178836ba31885685a05a00f0238 frame00000167 +623107814a06e16e5e075c0988a653f7 frame00000168 +54013584cac1a1aff90a6e9cebcf42d1 frame00000169 +92045d127c510264523045518582285a frame00000170 +731a0b28e539401c6474f6c77b627059 frame00000171 +d1c8561ce23230fa4c29d32208c2dcad frame00000172 +954b8d15a3bca0c70bdb6b4004a9e894 frame00000173 +906b78713b8cc6371e235f066a159c4e frame00000174 +aae1f38e50596afc57b3ac670b75f560 frame00000175 +442287cbd6ad65fa6ae8badb59997709 frame00000176 +b466bf224754d2f2c596ac76d8418b9e frame00000177 +fe384f668da282694c29a84ebd33481d frame00000178 +fe384f668da282694c29a84ebd33481d frame00000179 +fe384f668da282694c29a84ebd33481d frame00000180 +fe384f668da282694c29a84ebd33481d frame00000181 +fe384f668da282694c29a84ebd33481d frame00000182 +fe384f668da282694c29a84ebd33481d frame00000183 +fe384f668da282694c29a84ebd33481d frame00000184 +fe384f668da282694c29a84ebd33481d frame00000185 +fe384f668da282694c29a84ebd33481d frame00000186 +fe384f668da282694c29a84ebd33481d frame00000187 +fe384f668da282694c29a84ebd33481d frame00000188 +fe384f668da282694c29a84ebd33481d frame00000189 +fe384f668da282694c29a84ebd33481d frame00000190 +fe384f668da282694c29a84ebd33481d frame00000191 +fe384f668da282694c29a84ebd33481d frame00000192 +fe384f668da282694c29a84ebd33481d frame00000193 +fe384f668da282694c29a84ebd33481d frame00000194 +6d81b010e9bae0306819949b75b72e8d frame00000195 +1c4702af006cb1f30db08dca3645b084 frame00000196 +b3d04bd16e6d058adcd7a5adb03b6270 frame00000197 +5e36e15039671aee0a8c7d7fcc8fd26a frame00000198 +f020d88babf116ea3c094753d72cb382 frame00000199 +4375bcfbfc12cffff1bb7f20d6034db9 frame00000200 +bf0fe0160af7d3a6f2ccbe7ef89e97f4 frame00000201 +534b904564cd357470ef42bf008c457a frame00000202 +ceb286ee6e1b562f3829710c0d15b982 frame00000203 +76c013b57bfafc0ec32430d4ba9db3d5 frame00000204 +46d58b7afccf20a9a909946d232f02e3 frame00000205 +b6a11fbba6efd8d86a2275f1b678c896 frame00000206 +035e01b52161ed114fddde88d5c467e9 frame00000207 +035e01b52161ed114fddde88d5c467e9 frame00000208 +035e01b52161ed114fddde88d5c467e9 frame00000209 +035e01b52161ed114fddde88d5c467e9 frame00000210 +035e01b52161ed114fddde88d5c467e9 frame00000211 +035e01b52161ed114fddde88d5c467e9 frame00000212 +035e01b52161ed114fddde88d5c467e9 frame00000213 +035e01b52161ed114fddde88d5c467e9 frame00000214 +035e01b52161ed114fddde88d5c467e9 frame00000215 +035e01b52161ed114fddde88d5c467e9 frame00000216 +035e01b52161ed114fddde88d5c467e9 frame00000217 +035e01b52161ed114fddde88d5c467e9 frame00000218 +035e01b52161ed114fddde88d5c467e9 frame00000219 +035e01b52161ed114fddde88d5c467e9 frame00000220 +035e01b52161ed114fddde88d5c467e9 frame00000221 +035e01b52161ed114fddde88d5c467e9 frame00000222 +035e01b52161ed114fddde88d5c467e9 frame00000223 +035e01b52161ed114fddde88d5c467e9 frame00000224 +035e01b52161ed114fddde88d5c467e9 frame00000225 +035e01b52161ed114fddde88d5c467e9 frame00000226 +035e01b52161ed114fddde88d5c467e9 frame00000227 +035e01b52161ed114fddde88d5c467e9 frame00000228 +035e01b52161ed114fddde88d5c467e9 frame00000229 +035e01b52161ed114fddde88d5c467e9 frame00000230 +035e01b52161ed114fddde88d5c467e9 frame00000231 +035e01b52161ed114fddde88d5c467e9 frame00000232 +035e01b52161ed114fddde88d5c467e9 frame00000233 +035e01b52161ed114fddde88d5c467e9 frame00000234 +035e01b52161ed114fddde88d5c467e9 frame00000235 +035e01b52161ed114fddde88d5c467e9 frame00000236 +035e01b52161ed114fddde88d5c467e9 frame00000237 +035e01b52161ed114fddde88d5c467e9 frame00000238 +035e01b52161ed114fddde88d5c467e9 frame00000239 +035e01b52161ed114fddde88d5c467e9 frame00000240 +035e01b52161ed114fddde88d5c467e9 frame00000241 +035e01b52161ed114fddde88d5c467e9 frame00000242 +035e01b52161ed114fddde88d5c467e9 frame00000243 +035e01b52161ed114fddde88d5c467e9 frame00000244 +035e01b52161ed114fddde88d5c467e9 frame00000245 +035e01b52161ed114fddde88d5c467e9 frame00000246 +035e01b52161ed114fddde88d5c467e9 frame00000247 +035e01b52161ed114fddde88d5c467e9 frame00000248 +035e01b52161ed114fddde88d5c467e9 frame00000249 +035e01b52161ed114fddde88d5c467e9 frame00000250 +035e01b52161ed114fddde88d5c467e9 frame00000251 +035e01b52161ed114fddde88d5c467e9 frame00000252 +035e01b52161ed114fddde88d5c467e9 frame00000253 +035e01b52161ed114fddde88d5c467e9 frame00000254 +035e01b52161ed114fddde88d5c467e9 frame00000255 +035e01b52161ed114fddde88d5c467e9 frame00000256 +035e01b52161ed114fddde88d5c467e9 frame00000257 +035e01b52161ed114fddde88d5c467e9 frame00000258 +035e01b52161ed114fddde88d5c467e9 frame00000259 +035e01b52161ed114fddde88d5c467e9 frame00000260 +035e01b52161ed114fddde88d5c467e9 frame00000261 +035e01b52161ed114fddde88d5c467e9 frame00000262 +035e01b52161ed114fddde88d5c467e9 frame00000263 +035e01b52161ed114fddde88d5c467e9 frame00000264 +035e01b52161ed114fddde88d5c467e9 frame00000265 +035e01b52161ed114fddde88d5c467e9 frame00000266 +035e01b52161ed114fddde88d5c467e9 frame00000267 +035e01b52161ed114fddde88d5c467e9 frame00000268 +035e01b52161ed114fddde88d5c467e9 frame00000269 +035e01b52161ed114fddde88d5c467e9 frame00000270 +035e01b52161ed114fddde88d5c467e9 frame00000271 +035e01b52161ed114fddde88d5c467e9 frame00000272 +035e01b52161ed114fddde88d5c467e9 frame00000273 +035e01b52161ed114fddde88d5c467e9 frame00000274 +035e01b52161ed114fddde88d5c467e9 frame00000275 +035e01b52161ed114fddde88d5c467e9 frame00000276 +035e01b52161ed114fddde88d5c467e9 frame00000277 +035e01b52161ed114fddde88d5c467e9 frame00000278 +035e01b52161ed114fddde88d5c467e9 frame00000279 +035e01b52161ed114fddde88d5c467e9 frame00000280 +035e01b52161ed114fddde88d5c467e9 frame00000281 +035e01b52161ed114fddde88d5c467e9 frame00000282 +035e01b52161ed114fddde88d5c467e9 frame00000283 +035e01b52161ed114fddde88d5c467e9 frame00000284 +035e01b52161ed114fddde88d5c467e9 frame00000285 +035e01b52161ed114fddde88d5c467e9 frame00000286 +035e01b52161ed114fddde88d5c467e9 frame00000287 +035e01b52161ed114fddde88d5c467e9 frame00000288 +035e01b52161ed114fddde88d5c467e9 frame00000289 +035e01b52161ed114fddde88d5c467e9 frame00000290 +035e01b52161ed114fddde88d5c467e9 frame00000291 +035e01b52161ed114fddde88d5c467e9 frame00000292 +035e01b52161ed114fddde88d5c467e9 frame00000293 +035e01b52161ed114fddde88d5c467e9 frame00000294 +035e01b52161ed114fddde88d5c467e9 frame00000295 +035e01b52161ed114fddde88d5c467e9 frame00000296 +035e01b52161ed114fddde88d5c467e9 frame00000297 +035e01b52161ed114fddde88d5c467e9 frame00000298 +035e01b52161ed114fddde88d5c467e9 frame00000299 +035e01b52161ed114fddde88d5c467e9 frame00000300 +035e01b52161ed114fddde88d5c467e9 frame00000301 +035e01b52161ed114fddde88d5c467e9 frame00000302 +035e01b52161ed114fddde88d5c467e9 frame00000303 +035e01b52161ed114fddde88d5c467e9 frame00000304 +035e01b52161ed114fddde88d5c467e9 frame00000305 +035e01b52161ed114fddde88d5c467e9 frame00000306 +035e01b52161ed114fddde88d5c467e9 frame00000307 +035e01b52161ed114fddde88d5c467e9 frame00000308 +035e01b52161ed114fddde88d5c467e9 frame00000309 +035e01b52161ed114fddde88d5c467e9 frame00000310 +035e01b52161ed114fddde88d5c467e9 frame00000311 +035e01b52161ed114fddde88d5c467e9 frame00000312 +035e01b52161ed114fddde88d5c467e9 frame00000313 +035e01b52161ed114fddde88d5c467e9 frame00000314 +035e01b52161ed114fddde88d5c467e9 frame00000315 +035e01b52161ed114fddde88d5c467e9 frame00000316 +035e01b52161ed114fddde88d5c467e9 frame00000317 +035e01b52161ed114fddde88d5c467e9 frame00000318 +035e01b52161ed114fddde88d5c467e9 frame00000319 +035e01b52161ed114fddde88d5c467e9 frame00000320 +035e01b52161ed114fddde88d5c467e9 frame00000321 +035e01b52161ed114fddde88d5c467e9 frame00000322 +035e01b52161ed114fddde88d5c467e9 frame00000323 +035e01b52161ed114fddde88d5c467e9 frame00000324 +035e01b52161ed114fddde88d5c467e9 frame00000325 +035e01b52161ed114fddde88d5c467e9 frame00000326 +035e01b52161ed114fddde88d5c467e9 frame00000327 +035e01b52161ed114fddde88d5c467e9 frame00000328 +035e01b52161ed114fddde88d5c467e9 frame00000329 +035e01b52161ed114fddde88d5c467e9 frame00000330 +035e01b52161ed114fddde88d5c467e9 frame00000331 +035e01b52161ed114fddde88d5c467e9 frame00000332 +035e01b52161ed114fddde88d5c467e9 frame00000333 +035e01b52161ed114fddde88d5c467e9 frame00000334 +035e01b52161ed114fddde88d5c467e9 frame00000335 +035e01b52161ed114fddde88d5c467e9 frame00000336 +035e01b52161ed114fddde88d5c467e9 frame00000337 +035e01b52161ed114fddde88d5c467e9 frame00000338 +035e01b52161ed114fddde88d5c467e9 frame00000339 +035e01b52161ed114fddde88d5c467e9 frame00000340 +035e01b52161ed114fddde88d5c467e9 frame00000341 +035e01b52161ed114fddde88d5c467e9 frame00000342 +035e01b52161ed114fddde88d5c467e9 frame00000343 +035e01b52161ed114fddde88d5c467e9 frame00000344 +035e01b52161ed114fddde88d5c467e9 frame00000345 +035e01b52161ed114fddde88d5c467e9 frame00000346 +035e01b52161ed114fddde88d5c467e9 frame00000347 +035e01b52161ed114fddde88d5c467e9 frame00000348 +035e01b52161ed114fddde88d5c467e9 frame00000349 +035e01b52161ed114fddde88d5c467e9 frame00000350 +035e01b52161ed114fddde88d5c467e9 frame00000351 +035e01b52161ed114fddde88d5c467e9 frame00000352 +035e01b52161ed114fddde88d5c467e9 frame00000353 +035e01b52161ed114fddde88d5c467e9 frame00000354 +035e01b52161ed114fddde88d5c467e9 frame00000355 +035e01b52161ed114fddde88d5c467e9 frame00000356 +035e01b52161ed114fddde88d5c467e9 frame00000357 +035e01b52161ed114fddde88d5c467e9 frame00000358 +035e01b52161ed114fddde88d5c467e9 frame00000359 +035e01b52161ed114fddde88d5c467e9 frame00000360 +035e01b52161ed114fddde88d5c467e9 frame00000361 +035e01b52161ed114fddde88d5c467e9 frame00000362 +035e01b52161ed114fddde88d5c467e9 frame00000363 +035e01b52161ed114fddde88d5c467e9 frame00000364 +035e01b52161ed114fddde88d5c467e9 frame00000365 +035e01b52161ed114fddde88d5c467e9 frame00000366 +035e01b52161ed114fddde88d5c467e9 frame00000367 +035e01b52161ed114fddde88d5c467e9 frame00000368 +035e01b52161ed114fddde88d5c467e9 frame00000369 +035e01b52161ed114fddde88d5c467e9 frame00000370 +035e01b52161ed114fddde88d5c467e9 frame00000371 +035e01b52161ed114fddde88d5c467e9 frame00000372 +035e01b52161ed114fddde88d5c467e9 frame00000373 +035e01b52161ed114fddde88d5c467e9 frame00000374 +035e01b52161ed114fddde88d5c467e9 frame00000375 +035e01b52161ed114fddde88d5c467e9 frame00000376 +035e01b52161ed114fddde88d5c467e9 frame00000377 +035e01b52161ed114fddde88d5c467e9 frame00000378 +035e01b52161ed114fddde88d5c467e9 frame00000379 +035e01b52161ed114fddde88d5c467e9 frame00000380 +035e01b52161ed114fddde88d5c467e9 frame00000381 +035e01b52161ed114fddde88d5c467e9 frame00000382 +035e01b52161ed114fddde88d5c467e9 frame00000383 +035e01b52161ed114fddde88d5c467e9 frame00000384 +035e01b52161ed114fddde88d5c467e9 frame00000385 +035e01b52161ed114fddde88d5c467e9 frame00000386 +035e01b52161ed114fddde88d5c467e9 frame00000387 +035e01b52161ed114fddde88d5c467e9 frame00000388 +035e01b52161ed114fddde88d5c467e9 frame00000389 +035e01b52161ed114fddde88d5c467e9 frame00000390 +035e01b52161ed114fddde88d5c467e9 frame00000391 +035e01b52161ed114fddde88d5c467e9 frame00000392 +035e01b52161ed114fddde88d5c467e9 frame00000393 +035e01b52161ed114fddde88d5c467e9 frame00000394 +035e01b52161ed114fddde88d5c467e9 frame00000395 +035e01b52161ed114fddde88d5c467e9 frame00000396 +035e01b52161ed114fddde88d5c467e9 frame00000397 +035e01b52161ed114fddde88d5c467e9 frame00000398 +035e01b52161ed114fddde88d5c467e9 frame00000399 +035e01b52161ed114fddde88d5c467e9 frame00000400 +035e01b52161ed114fddde88d5c467e9 frame00000401 +035e01b52161ed114fddde88d5c467e9 frame00000402 +035e01b52161ed114fddde88d5c467e9 frame00000403 +035e01b52161ed114fddde88d5c467e9 frame00000404 +035e01b52161ed114fddde88d5c467e9 frame00000405 +035e01b52161ed114fddde88d5c467e9 frame00000406 +035e01b52161ed114fddde88d5c467e9 frame00000407 +035e01b52161ed114fddde88d5c467e9 frame00000408 +035e01b52161ed114fddde88d5c467e9 frame00000409 +035e01b52161ed114fddde88d5c467e9 frame00000410 +035e01b52161ed114fddde88d5c467e9 frame00000411 +035e01b52161ed114fddde88d5c467e9 frame00000412 +035e01b52161ed114fddde88d5c467e9 frame00000413 +035e01b52161ed114fddde88d5c467e9 frame00000414 +035e01b52161ed114fddde88d5c467e9 frame00000415 +035e01b52161ed114fddde88d5c467e9 frame00000416 +035e01b52161ed114fddde88d5c467e9 frame00000417 +035e01b52161ed114fddde88d5c467e9 frame00000418 +035e01b52161ed114fddde88d5c467e9 frame00000419 +035e01b52161ed114fddde88d5c467e9 frame00000420 +035e01b52161ed114fddde88d5c467e9 frame00000421 +035e01b52161ed114fddde88d5c467e9 frame00000422 +035e01b52161ed114fddde88d5c467e9 frame00000423 +035e01b52161ed114fddde88d5c467e9 frame00000424 +035e01b52161ed114fddde88d5c467e9 frame00000425 +035e01b52161ed114fddde88d5c467e9 frame00000426 +035e01b52161ed114fddde88d5c467e9 frame00000427 +035e01b52161ed114fddde88d5c467e9 frame00000428 +035e01b52161ed114fddde88d5c467e9 frame00000429 +d8cb25254c4df257448766bdf5f0136c frame00000430 +8cdf687b8e5bb35a040b1eb71c76c956 frame00000431 +b7c411ebb623f28da684c5d826d5580f frame00000432 +02d4c7e224cf0cf13f1d6925339bcb86 frame00000433 +04d0a395dc7d5388a0f947603035de0f frame00000434 +f057c848ee8ae619dff3fb2c277ede75 frame00000435 +5b5038b503053f92c5dca0fbd6b6399b frame00000436 +2846f59e709b6340c04ca759ba865cc1 frame00000437 +163eaa996d128eb0679ed4704104d7bd frame00000438 +9171e17ed57de743ea7c1973ff5c0ff5 frame00000439 +501a9f89614a8946a6b23cdcc771080d frame00000440 +25b93ddeeb5153a0126067495baadfed frame00000441 +e7e1e4c8d6bfd1f916305ea33fe6901f frame00000442 +5080f03e55b7822916812abd6d102061 frame00000443 +aef54afe425eb41e9c489d7060860875 frame00000444 +31ad0ff0af156b7d11815af950fbbffd frame00000445 +e22557b30491d359a15e871a335b9bba frame00000446 +b592a2b0edddb2c4d95237f4cc6b9107 frame00000447 +b9646e3e7f05de3265ed79fd9d298254 frame00000448 +ec836f16eaea6a137b24376b1e5343c0 frame00000449 +bf2385059a0003bf72475e61d79246d0 frame00000450 +bf2385059a0003bf72475e61d79246d0 frame00000451 +fefaaea8f877bcab724e6035d54e2a61 frame00000452 +cb1c21d00a3f794ea3c8ade638582ec0 frame00000453 +cb1c21d00a3f794ea3c8ade638582ec0 frame00000454 +493c576ebd9dd9a7b5ffa98dc034f83d frame00000455 +cfbf027ac0e181a1343f4becab6f6caa frame00000456 +515c312115d7955056ab3577d3861078 frame00000457 +515c312115d7955056ab3577d3861078 frame00000458 +bcae08d5d81dfec6636456abdee3fb29 frame00000459 +48da27b923f734ea6b62e46e2095e175 frame00000460 +48da27b923f734ea6b62e46e2095e175 frame00000461 +1d8be996da95865ece8ca396e78dd67a frame00000462 +5ad6fdfa1911753ce75a6f2d2ece7599 frame00000463 +2157388eaaee73302ef55fd060f2f5b4 frame00000464 +2157388eaaee73302ef55fd060f2f5b4 frame00000465 +6c512c39e635042333d574a96d1da59d frame00000466 +92be10b84668eaa059326e1fef5b494a frame00000467 +92be10b84668eaa059326e1fef5b494a frame00000468 +a158b0a8d5e383824dabd016f8d188a0 frame00000469 +00b489652f9c495ceb0d7173bc2570c5 frame00000470 +4cf0d0dca6b7b36c97d5b7491365071a frame00000471 +4cf0d0dca6b7b36c97d5b7491365071a frame00000472 +1e5f829fd7fd94f8de72c5f71422da49 frame00000473 +0e12e6b2576d07ff03e582fee142c2b0 frame00000474 +0e12e6b2576d07ff03e582fee142c2b0 frame00000475 +493b2871ae43a60eccbf8977a727f084 frame00000476 +76f57277ce277936a26f9e0465009e44 frame00000477 +f81c07503e82223d5da1ece1deeb06da frame00000478 +f81c07503e82223d5da1ece1deeb06da frame00000479 +c721d0b792f89cb2fd47da88ba485798 frame00000480 +983f4fcb48ab7c3f9d2e220fae94d03a frame00000481 +58e63bdb98c0af0dd9039ce7456d6268 frame00000482 +58e63bdb98c0af0dd9039ce7456d6268 frame00000483 +92babe888a619dd260e4b197795ed52f frame00000484 +ab2b7bf6154323e8893c08b93c16328f frame00000485 +ab2b7bf6154323e8893c08b93c16328f frame00000486 +48ea0fa1f49491e7b704af0c1714ef2d frame00000487 +4f8e49a1dd554fe4b48c0cdfe7ab2fd5 frame00000488 +195240fca17311b5c6bda066fffc7924 frame00000489 +195240fca17311b5c6bda066fffc7924 frame00000490 +082d584c3197bb78dabe50a77dd0d442 frame00000491 +05dc9359113df8683137983ddf0b21bd frame00000492 +05dc9359113df8683137983ddf0b21bd frame00000493 +0d2b59065814d4cefa18db348aa85663 frame00000494 +38b5ef2150ef980f34998387e0e45cb6 frame00000495 +2031d86c415e876b4322a531d08c44cc frame00000496 +2031d86c415e876b4322a531d08c44cc frame00000497 +dc7911affde8601c670d7191ba8c6116 frame00000498 +77977974631f9bd529a639e5615d96f1 frame00000499 +77977974631f9bd529a639e5615d96f1 frame00000500 +702aca6478bc4b74ab9e039ab7363a57 frame00000501 +8689a659c4806a3f07f6ff8382f6c35e frame00000502 +42d9bc1c000e882806f171b94770e6c2 frame00000503 +42d9bc1c000e882806f171b94770e6c2 frame00000504 +53139c9e862ca7e8aba60cf5e67b773f frame00000505 +31aab8f566419b1442c640cd908f2f08 frame00000506 +31aab8f566419b1442c640cd908f2f08 frame00000507 +5a88c85c6ea64954f9bdbde206057ecc frame00000508 +b1697471ccabfc80c0c748bb127f8ae5 frame00000509 +8962e43d13e6ada12a925f12523dd658 frame00000510 +8962e43d13e6ada12a925f12523dd658 frame00000511 +73126aa16af302c6c6556afcd94a563b frame00000512 +bfbc5cfd476ccd652fec88d4df841561 frame00000513 +bfbc5cfd476ccd652fec88d4df841561 frame00000514 +3721fcc8e08639c88d63cac0dd30dfdd frame00000515 +b20eba76bb070574141874eb1d837fda frame00000516 +f59d53d212f1a64c63a7b1e1441b9296 frame00000517 +f59d53d212f1a64c63a7b1e1441b9296 frame00000518 +3b39b738c3846685ae295803880c14cf frame00000519 +3b39b738c3846685ae295803880c14cf frame00000520 +3b39b738c3846685ae295803880c14cf frame00000521 +3b39b738c3846685ae295803880c14cf frame00000522 +3b39b738c3846685ae295803880c14cf frame00000523 +3b39b738c3846685ae295803880c14cf frame00000524 +3b39b738c3846685ae295803880c14cf frame00000525 +3b39b738c3846685ae295803880c14cf frame00000526 +3b39b738c3846685ae295803880c14cf frame00000527 +3b39b738c3846685ae295803880c14cf frame00000528 +3b39b738c3846685ae295803880c14cf frame00000529 +3b39b738c3846685ae295803880c14cf frame00000530 +3b39b738c3846685ae295803880c14cf frame00000531 +3b39b738c3846685ae295803880c14cf frame00000532 +3b39b738c3846685ae295803880c14cf frame00000533 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/zmbv/zmbv_16bit.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/zmbv/zmbv_16bit.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/zmbv/zmbv_16bit.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/zmbv/zmbv_16bit.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,473 @@ +fc2ac711763923c2a628edb2290800f8 frame00000000 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000001 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000002 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000003 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000004 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000005 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000006 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000007 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000008 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000009 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000010 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000011 +ffbd58f4dd4fe2e2c5e21bee0d58b35f frame00000012 +8fa41d9031a6094437e14d31454dd903 frame00000013 +8fa41d9031a6094437e14d31454dd903 frame00000014 +8fa41d9031a6094437e14d31454dd903 frame00000015 +8fa41d9031a6094437e14d31454dd903 frame00000016 +eba77286994e0697139f66e4dac45366 frame00000017 +eba77286994e0697139f66e4dac45366 frame00000018 +eba77286994e0697139f66e4dac45366 frame00000019 +eba77286994e0697139f66e4dac45366 frame00000020 +eba77286994e0697139f66e4dac45366 frame00000021 +3f244d94bb4c97ec8db09d079c077457 frame00000022 +3f244d94bb4c97ec8db09d079c077457 frame00000023 +3f244d94bb4c97ec8db09d079c077457 frame00000024 +3f244d94bb4c97ec8db09d079c077457 frame00000025 +1a495f2d5215f3784b491a71499e2ea5 frame00000026 +1a495f2d5215f3784b491a71499e2ea5 frame00000027 +1a495f2d5215f3784b491a71499e2ea5 frame00000028 +1a495f2d5215f3784b491a71499e2ea5 frame00000029 +1a495f2d5215f3784b491a71499e2ea5 frame00000030 +2989c60ec6e4e60f8d4d698bb343e97f frame00000031 +2989c60ec6e4e60f8d4d698bb343e97f frame00000032 +2989c60ec6e4e60f8d4d698bb343e97f frame00000033 +2989c60ec6e4e60f8d4d698bb343e97f frame00000034 +6fa96276216eaec9095abf61be058c8a frame00000035 +6fa96276216eaec9095abf61be058c8a frame00000036 +6fa96276216eaec9095abf61be058c8a frame00000037 +6fa96276216eaec9095abf61be058c8a frame00000038 +6fa96276216eaec9095abf61be058c8a frame00000039 +18820fd3a29cb6be97a4b88ccbed5dbf frame00000040 +18820fd3a29cb6be97a4b88ccbed5dbf frame00000041 +18820fd3a29cb6be97a4b88ccbed5dbf frame00000042 +18820fd3a29cb6be97a4b88ccbed5dbf frame00000043 +b2de07397c03cc18693d2db5fed71a5e frame00000044 +b2de07397c03cc18693d2db5fed71a5e frame00000045 +b2de07397c03cc18693d2db5fed71a5e frame00000046 +b2de07397c03cc18693d2db5fed71a5e frame00000047 +b2de07397c03cc18693d2db5fed71a5e frame00000048 +901dbbb68eb84c50d09993deedfbf1d8 frame00000049 +901dbbb68eb84c50d09993deedfbf1d8 frame00000050 +901dbbb68eb84c50d09993deedfbf1d8 frame00000051 +901dbbb68eb84c50d09993deedfbf1d8 frame00000052 +79fdee5c2e37955943c6ac8b822b4f36 frame00000053 +79fdee5c2e37955943c6ac8b822b4f36 frame00000054 +79fdee5c2e37955943c6ac8b822b4f36 frame00000055 +79fdee5c2e37955943c6ac8b822b4f36 frame00000056 +79fdee5c2e37955943c6ac8b822b4f36 frame00000057 +549c188610f8fc9a2c4ba5354ac144e0 frame00000058 +549c188610f8fc9a2c4ba5354ac144e0 frame00000059 +549c188610f8fc9a2c4ba5354ac144e0 frame00000060 +549c188610f8fc9a2c4ba5354ac144e0 frame00000061 +3367fa7344e81bc6d8d01ede028805c5 frame00000062 +3367fa7344e81bc6d8d01ede028805c5 frame00000063 +3367fa7344e81bc6d8d01ede028805c5 frame00000064 +3367fa7344e81bc6d8d01ede028805c5 frame00000065 +3367fa7344e81bc6d8d01ede028805c5 frame00000066 +5df096e5daa171b36330d1806f956ca3 frame00000067 +5df096e5daa171b36330d1806f956ca3 frame00000068 +5df096e5daa171b36330d1806f956ca3 frame00000069 +5df096e5daa171b36330d1806f956ca3 frame00000070 +5df096e5daa171b36330d1806f956ca3 frame00000071 +a5e81fd91047cf56af25eb54e0e6db4a frame00000072 +a5e81fd91047cf56af25eb54e0e6db4a frame00000073 +a5e81fd91047cf56af25eb54e0e6db4a frame00000074 +a5e81fd91047cf56af25eb54e0e6db4a frame00000075 +f76ba0cc6691bb36caea16e141e72434 frame00000076 +47e643ee8c9035f2859e5171b3d583dc frame00000077 +20a5f0efdd926a261ff49510056539a6 frame00000078 +75634376f5711f2b2bbf00475e4e652c frame00000079 +c2cbb50c888597e807c8a5ecd0c8c45d frame00000080 +4f731235d778ed0fd914bb3791858c8d frame00000081 +afc2313553db570b79274065b94e424c frame00000082 +738250c747f546e2be030b665354fad5 frame00000083 +d2fe15cad1b9be66b2a1e2f154125ba2 frame00000084 +b15581cda29e77f1c875fd7876714c08 frame00000085 +b389b4823e72738563d9f04861eb267b frame00000086 +c5d5e6a1cf076a7264949c693b968f97 frame00000087 +d0a51c6a5f3ca37d55d824ec10c5cc1d frame00000088 +8813fa462975a71d7a904007c8ac7a3f frame00000089 +a16184f04649843f53a1a01b20f7579e frame00000090 +dcd9365098568274680f688f48484303 frame00000091 +ee025f23d68ba9708ca9734b9633909d frame00000092 +ec8b801645e20c5f97054e8a36d4a002 frame00000093 +6c6b81fc28ca3a5fbb473578a8af0a64 frame00000094 +5be53d7fd0d6267917640f7bd34016f1 frame00000095 +cf20aba47dc0d5c9de5633437bb90b9c frame00000096 +a6f4aa9c2c16d261a2bfffc0041e6ef9 frame00000097 +9629e19ab8b69a29c24a787246f84b1d frame00000098 +35c73737242f85e4dafc95094fec4759 frame00000099 +bd67a743fa4bc2bbb22fbfc550323223 frame00000100 +a29d4160d242b62e74b1de0683125d1b frame00000101 +c2c57105329725bf4f386c40ac3b98f6 frame00000102 +3d5838ed10a4e839ca2f4dd670211555 frame00000103 +513f7fe9de71cffbbc00aeb9082a5a0a frame00000104 +25412edd8cf44768786dd0a00d258171 frame00000105 +52f587e33a79afbc76619824e6da0529 frame00000106 +9f77062415cb41d5d30bf355e92b0b63 frame00000107 +d3f32e1dcd137176e144d58e80fc15a9 frame00000108 +c78aa7b44d5ac65226683ba6ea3612a1 frame00000109 +96e0b066a8e6319133cf6eae741ed4bb frame00000110 +59cb103af13bc8b85ad354345b698d54 frame00000111 +3c7619bce69b567f1287a92f86380b0a frame00000112 +74f18c01dec8e3f14a37ed9d2b67ed39 frame00000113 +7250cf327466802630af8e160874bb89 frame00000114 +45c1d5118436521d8422ce92eb6b64fc frame00000115 +adb9e92b9dd707b985adcd33fe52be4e frame00000116 +92fd7ad957e1dbd5a715c1631ad32175 frame00000117 +8220f1e0a43fb078cd2deba0d34a90b4 frame00000118 +fe384f668da282694c29a84ebd33481d frame00000119 +fe384f668da282694c29a84ebd33481d frame00000120 +fe384f668da282694c29a84ebd33481d frame00000121 +fe384f668da282694c29a84ebd33481d frame00000122 +fe384f668da282694c29a84ebd33481d frame00000123 +fe384f668da282694c29a84ebd33481d frame00000124 +fe384f668da282694c29a84ebd33481d frame00000125 +fe384f668da282694c29a84ebd33481d frame00000126 +fe384f668da282694c29a84ebd33481d frame00000127 +10bea8fe35d6da2d711013772e93094d frame00000128 +c234a69c34d4361e8bb28586e24d38a1 frame00000129 +77fc182d6cb561009d29e8e12a103968 frame00000130 +b322abf9d619d766986b2efb93665c54 frame00000131 +c3d0a0b68692b51ddd06544fc46d91c1 frame00000132 +dc03bc86cc2ffa789bcc6f100da2ce76 frame00000133 +cded61628d5d45f586a9851aab4482cc frame00000134 +0e965fee04b1e4790a74e2f28825c0a3 frame00000135 +ec76d33e46995639ea561352ca77df98 frame00000136 +e2d014a7d6e039135585ea39dc29014e frame00000137 +9c2033b63c23d92c0351227bc9de150d frame00000138 +328c1899cefc25c72ab5e19c7892518d frame00000139 +890dbecc21d7c308d3f5619cf910f3c3 frame00000140 +bb146b341c620327f22bf84cc22855dd frame00000141 +154b2091969aeccac3882e9422c57629 frame00000142 +667c719853b39b19daa0ff5d1c1f3257 frame00000143 +024114a881a3c37b75adfa1b1cb6933a frame00000144 +84376325300aac36d8af0c335008600b frame00000145 +6070524ae009b3723294a956c6c6e432 frame00000146 +4329d8b4dacd7285dc2a8e0ca5cc9615 frame00000147 +3403295f9b1cb8d1ff8194a8b09a659a frame00000148 +3403295f9b1cb8d1ff8194a8b09a659a frame00000149 +3403295f9b1cb8d1ff8194a8b09a659a frame00000150 +3403295f9b1cb8d1ff8194a8b09a659a frame00000151 +3403295f9b1cb8d1ff8194a8b09a659a frame00000152 +3403295f9b1cb8d1ff8194a8b09a659a frame00000153 +3403295f9b1cb8d1ff8194a8b09a659a frame00000154 +3403295f9b1cb8d1ff8194a8b09a659a frame00000155 +3403295f9b1cb8d1ff8194a8b09a659a frame00000156 +3403295f9b1cb8d1ff8194a8b09a659a frame00000157 +3403295f9b1cb8d1ff8194a8b09a659a frame00000158 +3403295f9b1cb8d1ff8194a8b09a659a frame00000159 +3403295f9b1cb8d1ff8194a8b09a659a frame00000160 +3403295f9b1cb8d1ff8194a8b09a659a frame00000161 +3403295f9b1cb8d1ff8194a8b09a659a frame00000162 +3403295f9b1cb8d1ff8194a8b09a659a frame00000163 +3403295f9b1cb8d1ff8194a8b09a659a frame00000164 +3403295f9b1cb8d1ff8194a8b09a659a frame00000165 +3403295f9b1cb8d1ff8194a8b09a659a frame00000166 +3403295f9b1cb8d1ff8194a8b09a659a frame00000167 +3403295f9b1cb8d1ff8194a8b09a659a frame00000168 +3403295f9b1cb8d1ff8194a8b09a659a frame00000169 +3403295f9b1cb8d1ff8194a8b09a659a frame00000170 +3403295f9b1cb8d1ff8194a8b09a659a frame00000171 +3403295f9b1cb8d1ff8194a8b09a659a frame00000172 +3403295f9b1cb8d1ff8194a8b09a659a frame00000173 +3403295f9b1cb8d1ff8194a8b09a659a frame00000174 +3403295f9b1cb8d1ff8194a8b09a659a frame00000175 +3403295f9b1cb8d1ff8194a8b09a659a frame00000176 +3403295f9b1cb8d1ff8194a8b09a659a frame00000177 +3403295f9b1cb8d1ff8194a8b09a659a frame00000178 +3403295f9b1cb8d1ff8194a8b09a659a frame00000179 +3403295f9b1cb8d1ff8194a8b09a659a frame00000180 +3403295f9b1cb8d1ff8194a8b09a659a frame00000181 +3403295f9b1cb8d1ff8194a8b09a659a frame00000182 +3403295f9b1cb8d1ff8194a8b09a659a frame00000183 +3403295f9b1cb8d1ff8194a8b09a659a frame00000184 +3403295f9b1cb8d1ff8194a8b09a659a frame00000185 +3403295f9b1cb8d1ff8194a8b09a659a frame00000186 +3403295f9b1cb8d1ff8194a8b09a659a frame00000187 +3403295f9b1cb8d1ff8194a8b09a659a frame00000188 +3403295f9b1cb8d1ff8194a8b09a659a frame00000189 +3403295f9b1cb8d1ff8194a8b09a659a frame00000190 +3403295f9b1cb8d1ff8194a8b09a659a frame00000191 +3403295f9b1cb8d1ff8194a8b09a659a frame00000192 +3403295f9b1cb8d1ff8194a8b09a659a frame00000193 +3403295f9b1cb8d1ff8194a8b09a659a frame00000194 +3403295f9b1cb8d1ff8194a8b09a659a frame00000195 +3403295f9b1cb8d1ff8194a8b09a659a frame00000196 +3403295f9b1cb8d1ff8194a8b09a659a frame00000197 +3403295f9b1cb8d1ff8194a8b09a659a frame00000198 +3403295f9b1cb8d1ff8194a8b09a659a frame00000199 +3403295f9b1cb8d1ff8194a8b09a659a frame00000200 +3403295f9b1cb8d1ff8194a8b09a659a frame00000201 +3403295f9b1cb8d1ff8194a8b09a659a frame00000202 +3403295f9b1cb8d1ff8194a8b09a659a frame00000203 +3403295f9b1cb8d1ff8194a8b09a659a frame00000204 +3403295f9b1cb8d1ff8194a8b09a659a frame00000205 +3403295f9b1cb8d1ff8194a8b09a659a frame00000206 +3403295f9b1cb8d1ff8194a8b09a659a frame00000207 +3403295f9b1cb8d1ff8194a8b09a659a frame00000208 +3403295f9b1cb8d1ff8194a8b09a659a frame00000209 +3403295f9b1cb8d1ff8194a8b09a659a frame00000210 +3403295f9b1cb8d1ff8194a8b09a659a frame00000211 +3403295f9b1cb8d1ff8194a8b09a659a frame00000212 +3403295f9b1cb8d1ff8194a8b09a659a frame00000213 +3403295f9b1cb8d1ff8194a8b09a659a frame00000214 +3403295f9b1cb8d1ff8194a8b09a659a frame00000215 +3403295f9b1cb8d1ff8194a8b09a659a frame00000216 +3403295f9b1cb8d1ff8194a8b09a659a frame00000217 +3403295f9b1cb8d1ff8194a8b09a659a frame00000218 +3403295f9b1cb8d1ff8194a8b09a659a frame00000219 +3403295f9b1cb8d1ff8194a8b09a659a frame00000220 +3403295f9b1cb8d1ff8194a8b09a659a frame00000221 +3403295f9b1cb8d1ff8194a8b09a659a frame00000222 +3403295f9b1cb8d1ff8194a8b09a659a frame00000223 +3403295f9b1cb8d1ff8194a8b09a659a frame00000224 +3403295f9b1cb8d1ff8194a8b09a659a frame00000225 +3403295f9b1cb8d1ff8194a8b09a659a frame00000226 +3403295f9b1cb8d1ff8194a8b09a659a frame00000227 +3403295f9b1cb8d1ff8194a8b09a659a frame00000228 +3403295f9b1cb8d1ff8194a8b09a659a frame00000229 +3403295f9b1cb8d1ff8194a8b09a659a frame00000230 +3403295f9b1cb8d1ff8194a8b09a659a frame00000231 +3403295f9b1cb8d1ff8194a8b09a659a frame00000232 +3403295f9b1cb8d1ff8194a8b09a659a frame00000233 +3403295f9b1cb8d1ff8194a8b09a659a frame00000234 +3403295f9b1cb8d1ff8194a8b09a659a frame00000235 +3403295f9b1cb8d1ff8194a8b09a659a frame00000236 +3403295f9b1cb8d1ff8194a8b09a659a frame00000237 +3403295f9b1cb8d1ff8194a8b09a659a frame00000238 +3403295f9b1cb8d1ff8194a8b09a659a frame00000239 +3403295f9b1cb8d1ff8194a8b09a659a frame00000240 +3403295f9b1cb8d1ff8194a8b09a659a frame00000241 +3403295f9b1cb8d1ff8194a8b09a659a frame00000242 +3403295f9b1cb8d1ff8194a8b09a659a frame00000243 +3403295f9b1cb8d1ff8194a8b09a659a frame00000244 +3403295f9b1cb8d1ff8194a8b09a659a frame00000245 +3403295f9b1cb8d1ff8194a8b09a659a frame00000246 +3403295f9b1cb8d1ff8194a8b09a659a frame00000247 +3403295f9b1cb8d1ff8194a8b09a659a frame00000248 +3403295f9b1cb8d1ff8194a8b09a659a frame00000249 +3403295f9b1cb8d1ff8194a8b09a659a frame00000250 +3403295f9b1cb8d1ff8194a8b09a659a frame00000251 +3403295f9b1cb8d1ff8194a8b09a659a frame00000252 +3403295f9b1cb8d1ff8194a8b09a659a frame00000253 +3403295f9b1cb8d1ff8194a8b09a659a frame00000254 +3403295f9b1cb8d1ff8194a8b09a659a frame00000255 +3403295f9b1cb8d1ff8194a8b09a659a frame00000256 +3403295f9b1cb8d1ff8194a8b09a659a frame00000257 +3403295f9b1cb8d1ff8194a8b09a659a frame00000258 +3403295f9b1cb8d1ff8194a8b09a659a frame00000259 +3403295f9b1cb8d1ff8194a8b09a659a frame00000260 +3403295f9b1cb8d1ff8194a8b09a659a frame00000261 +3403295f9b1cb8d1ff8194a8b09a659a frame00000262 +3403295f9b1cb8d1ff8194a8b09a659a frame00000263 +3403295f9b1cb8d1ff8194a8b09a659a frame00000264 +3403295f9b1cb8d1ff8194a8b09a659a frame00000265 +3403295f9b1cb8d1ff8194a8b09a659a frame00000266 +3403295f9b1cb8d1ff8194a8b09a659a frame00000267 +3403295f9b1cb8d1ff8194a8b09a659a frame00000268 +3403295f9b1cb8d1ff8194a8b09a659a frame00000269 +3403295f9b1cb8d1ff8194a8b09a659a frame00000270 +3403295f9b1cb8d1ff8194a8b09a659a frame00000271 +3403295f9b1cb8d1ff8194a8b09a659a frame00000272 +3403295f9b1cb8d1ff8194a8b09a659a frame00000273 +3403295f9b1cb8d1ff8194a8b09a659a frame00000274 +3403295f9b1cb8d1ff8194a8b09a659a frame00000275 +3403295f9b1cb8d1ff8194a8b09a659a frame00000276 +3403295f9b1cb8d1ff8194a8b09a659a frame00000277 +3403295f9b1cb8d1ff8194a8b09a659a frame00000278 +3403295f9b1cb8d1ff8194a8b09a659a frame00000279 +3403295f9b1cb8d1ff8194a8b09a659a frame00000280 +3403295f9b1cb8d1ff8194a8b09a659a frame00000281 +3403295f9b1cb8d1ff8194a8b09a659a frame00000282 +3403295f9b1cb8d1ff8194a8b09a659a frame00000283 +3403295f9b1cb8d1ff8194a8b09a659a frame00000284 +3403295f9b1cb8d1ff8194a8b09a659a frame00000285 +3403295f9b1cb8d1ff8194a8b09a659a frame00000286 +3403295f9b1cb8d1ff8194a8b09a659a frame00000287 +3403295f9b1cb8d1ff8194a8b09a659a frame00000288 +3403295f9b1cb8d1ff8194a8b09a659a frame00000289 +3403295f9b1cb8d1ff8194a8b09a659a frame00000290 +3403295f9b1cb8d1ff8194a8b09a659a frame00000291 +3403295f9b1cb8d1ff8194a8b09a659a frame00000292 +3403295f9b1cb8d1ff8194a8b09a659a frame00000293 +3403295f9b1cb8d1ff8194a8b09a659a frame00000294 +3403295f9b1cb8d1ff8194a8b09a659a frame00000295 +3403295f9b1cb8d1ff8194a8b09a659a frame00000296 +3403295f9b1cb8d1ff8194a8b09a659a frame00000297 +3403295f9b1cb8d1ff8194a8b09a659a frame00000298 +3403295f9b1cb8d1ff8194a8b09a659a frame00000299 +3403295f9b1cb8d1ff8194a8b09a659a frame00000300 +3403295f9b1cb8d1ff8194a8b09a659a frame00000301 +3403295f9b1cb8d1ff8194a8b09a659a frame00000302 +3403295f9b1cb8d1ff8194a8b09a659a frame00000303 +3403295f9b1cb8d1ff8194a8b09a659a frame00000304 +3403295f9b1cb8d1ff8194a8b09a659a frame00000305 +3403295f9b1cb8d1ff8194a8b09a659a frame00000306 +3403295f9b1cb8d1ff8194a8b09a659a frame00000307 +3403295f9b1cb8d1ff8194a8b09a659a frame00000308 +3403295f9b1cb8d1ff8194a8b09a659a frame00000309 +3403295f9b1cb8d1ff8194a8b09a659a frame00000310 +3403295f9b1cb8d1ff8194a8b09a659a frame00000311 +3403295f9b1cb8d1ff8194a8b09a659a frame00000312 +3403295f9b1cb8d1ff8194a8b09a659a frame00000313 +3403295f9b1cb8d1ff8194a8b09a659a frame00000314 +3403295f9b1cb8d1ff8194a8b09a659a frame00000315 +3403295f9b1cb8d1ff8194a8b09a659a frame00000316 +3403295f9b1cb8d1ff8194a8b09a659a frame00000317 +3403295f9b1cb8d1ff8194a8b09a659a frame00000318 +3403295f9b1cb8d1ff8194a8b09a659a frame00000319 +3403295f9b1cb8d1ff8194a8b09a659a frame00000320 +3403295f9b1cb8d1ff8194a8b09a659a frame00000321 +3403295f9b1cb8d1ff8194a8b09a659a frame00000322 +3403295f9b1cb8d1ff8194a8b09a659a frame00000323 +3403295f9b1cb8d1ff8194a8b09a659a frame00000324 +3403295f9b1cb8d1ff8194a8b09a659a frame00000325 +3403295f9b1cb8d1ff8194a8b09a659a frame00000326 +3403295f9b1cb8d1ff8194a8b09a659a frame00000327 +3403295f9b1cb8d1ff8194a8b09a659a frame00000328 +3403295f9b1cb8d1ff8194a8b09a659a frame00000329 +3403295f9b1cb8d1ff8194a8b09a659a frame00000330 +3403295f9b1cb8d1ff8194a8b09a659a frame00000331 +3403295f9b1cb8d1ff8194a8b09a659a frame00000332 +3403295f9b1cb8d1ff8194a8b09a659a frame00000333 +3403295f9b1cb8d1ff8194a8b09a659a frame00000334 +3403295f9b1cb8d1ff8194a8b09a659a frame00000335 +3403295f9b1cb8d1ff8194a8b09a659a frame00000336 +3403295f9b1cb8d1ff8194a8b09a659a frame00000337 +3403295f9b1cb8d1ff8194a8b09a659a frame00000338 +3403295f9b1cb8d1ff8194a8b09a659a frame00000339 +3403295f9b1cb8d1ff8194a8b09a659a frame00000340 +3403295f9b1cb8d1ff8194a8b09a659a frame00000341 +3403295f9b1cb8d1ff8194a8b09a659a frame00000342 +3403295f9b1cb8d1ff8194a8b09a659a frame00000343 +3403295f9b1cb8d1ff8194a8b09a659a frame00000344 +3403295f9b1cb8d1ff8194a8b09a659a frame00000345 +3403295f9b1cb8d1ff8194a8b09a659a frame00000346 +3403295f9b1cb8d1ff8194a8b09a659a frame00000347 +3403295f9b1cb8d1ff8194a8b09a659a frame00000348 +3403295f9b1cb8d1ff8194a8b09a659a frame00000349 +3403295f9b1cb8d1ff8194a8b09a659a frame00000350 +3403295f9b1cb8d1ff8194a8b09a659a frame00000351 +3403295f9b1cb8d1ff8194a8b09a659a frame00000352 +3403295f9b1cb8d1ff8194a8b09a659a frame00000353 +3403295f9b1cb8d1ff8194a8b09a659a frame00000354 +3403295f9b1cb8d1ff8194a8b09a659a frame00000355 +3403295f9b1cb8d1ff8194a8b09a659a frame00000356 +3403295f9b1cb8d1ff8194a8b09a659a frame00000357 +3403295f9b1cb8d1ff8194a8b09a659a frame00000358 +3403295f9b1cb8d1ff8194a8b09a659a frame00000359 +3403295f9b1cb8d1ff8194a8b09a659a frame00000360 +3403295f9b1cb8d1ff8194a8b09a659a frame00000361 +3403295f9b1cb8d1ff8194a8b09a659a frame00000362 +3403295f9b1cb8d1ff8194a8b09a659a frame00000363 +3403295f9b1cb8d1ff8194a8b09a659a frame00000364 +3403295f9b1cb8d1ff8194a8b09a659a frame00000365 +3403295f9b1cb8d1ff8194a8b09a659a frame00000366 +3403295f9b1cb8d1ff8194a8b09a659a frame00000367 +3403295f9b1cb8d1ff8194a8b09a659a frame00000368 +3403295f9b1cb8d1ff8194a8b09a659a frame00000369 +3403295f9b1cb8d1ff8194a8b09a659a frame00000370 +d9b83c8d873f6040c7d2322e2a955e0a frame00000371 +e25f5aa5e2310828537b3a48ed6de7c3 frame00000372 +d830ab766ae0cc564a23430bc5d35536 frame00000373 +076c9d4f2acb98c3c90ac318354f7a0d frame00000374 +6bd567baf1a32567459288887df21fff frame00000375 +1036a9691f2cb1d005bbe1478b12775f frame00000376 +4efd6960ff6637cc39bb67d02269152e frame00000377 +7d02b3c567b48323d2963e7730286bb2 frame00000378 +d2975ba5b560171cde4424ccfdd4f734 frame00000379 +21ff37690df6b08f64100ffc59b3971c frame00000380 +c96ac990925e7cabdce7a753ef15f47f frame00000381 +f453dcb4ab43022ea55544c2b5f1f3e3 frame00000382 +bb90ba429d22c46c0461d3f3f666ff0f frame00000383 +d02f1c71236d09077d5c1cb0b19836a1 frame00000384 +9a0d99c66ba18dc7e9b2849c980fe797 frame00000385 +3813f7f3f2f549fd586fd565913f86a5 frame00000386 +e8ce56a754274f0842cc747dc2097dc6 frame00000387 +c0b7e351a8a4c6e38a1885a53b77b5a9 frame00000388 +e11e239a7f1296a97b87302a96864efe frame00000389 +84feb87dbbfbc3ee984e5f93c88fd895 frame00000390 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000391 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000392 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000393 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000394 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000395 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000396 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000397 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000398 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000399 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000400 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000401 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000402 +46c048e8e01dce0a6fc23fff12d855d1 frame00000403 +f09c3bf8b0d6cb76345712950d80195f frame00000404 +f09c3bf8b0d6cb76345712950d80195f frame00000405 +4b9f8ab374c3c9b7dd30317cba3aa51f frame00000406 +88bbc744b0c4f8451a52caeeedef744f frame00000407 +88bbc744b0c4f8451a52caeeedef744f frame00000408 +a30ca0408521169c00b64b098758d63a frame00000409 +6a3be0e17571ea0def3319796d082f05 frame00000410 +c950c8eaaea22204c0a9309ee9b71cf3 frame00000411 +c950c8eaaea22204c0a9309ee9b71cf3 frame00000412 +925d38b8a7d47ce75cba2651ae9968a0 frame00000413 +03ee9f8aa1df72f39d56d793179d9242 frame00000414 +03ee9f8aa1df72f39d56d793179d9242 frame00000415 +87e0132fc9481661857a7dfa6fb09ef9 frame00000416 +6242d6435164bf40458639a66e18419d frame00000417 +0db24b4aa6628833bcf36af2855656e4 frame00000418 +0db24b4aa6628833bcf36af2855656e4 frame00000419 +eca09a2872353337a59a7dbd98911385 frame00000420 +c160070b201f85c68cdf68c442e7660b frame00000421 +c160070b201f85c68cdf68c442e7660b frame00000422 +0467526b13a720a551238d6c5e49bd9b frame00000423 +95c96b9f2e7bb1e03fb91722bdbb307b frame00000424 +1ddc412439d46a20d3399fc5ac1d0c96 frame00000425 +1ddc412439d46a20d3399fc5ac1d0c96 frame00000426 +8f59f5ef6ea8d8056bfd65acf36db4da frame00000427 +8956e7cd3e58e9c969a9098556311fd8 frame00000428 +8956e7cd3e58e9c969a9098556311fd8 frame00000429 +c970e6ebb91207da4712e79d4a5be103 frame00000430 +eb6941b21b1a8d696f907831a26f5b5b frame00000431 +21d40c66f15436ca10af5cfba401c276 frame00000432 +21d40c66f15436ca10af5cfba401c276 frame00000433 +d3840501f8e374e6e63a5a0c664f1e9e frame00000434 +0cfeea7100605f836553b421b5a4347d frame00000435 +0cfeea7100605f836553b421b5a4347d frame00000436 +749500476d4cb5e8b1186d1654aa66cf frame00000437 +f6b6eb4a3789d15016b20836af391a3c frame00000438 +dc1e46f76eb82ac649d4f2bbb91edb7e frame00000439 +dc1e46f76eb82ac649d4f2bbb91edb7e frame00000440 +1396babc79abf712ce5bb92df58c870d frame00000441 +ba222e928f1344540b043cb7365a5e9c frame00000442 +cdef46c17b5e34118d03a23131fec06f frame00000443 +cdef46c17b5e34118d03a23131fec06f frame00000444 +5dfcaff6deec3cd1142658ded17f539e frame00000445 +570130dc310b401c293886f2baa60cc5 frame00000446 +570130dc310b401c293886f2baa60cc5 frame00000447 +0bd0d75c40ffa7011d989c2845cdf023 frame00000448 +814db4c8171ab87debadf3f58c2d1895 frame00000449 +ee0767fc5a09ccde22c68692a38294ee frame00000450 +ee0767fc5a09ccde22c68692a38294ee frame00000451 +638965aa8bdcd15bea8911f08b0828b8 frame00000452 +d076e41a0cdb6371314dcc4f83397bb8 frame00000453 +d076e41a0cdb6371314dcc4f83397bb8 frame00000454 +d076e41a0cdb6371314dcc4f83397bb8 frame00000455 +d076e41a0cdb6371314dcc4f83397bb8 frame00000456 +d076e41a0cdb6371314dcc4f83397bb8 frame00000457 +810eb5159e0a2712b96f74e6478583bd frame00000458 +810eb5159e0a2712b96f74e6478583bd frame00000459 +efa96a8ef9fe066367f6b6aad5d44058 frame00000460 +7e34e112959351e0e60b095504905087 frame00000461 +6782312053671964ff96aecc463708dc frame00000462 +6782312053671964ff96aecc463708dc frame00000463 +c5cc7f8db4f4d16350f2517537715724 frame00000464 +35e134d3d21e81d830c49a05038d7a8a frame00000465 +a820ec2c8a4dc9f5660d1c4c16ec4ea3 frame00000466 +0f3b68b9efb1847a40c776391d421b21 frame00000467 +0f3b68b9efb1847a40c776391d421b21 frame00000468 +30d8615eeee19f7e551412690e35087c frame00000469 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000470 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000471 +cacf36bd12dcfb0f8386f6d8012e01a3 frame00000472 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/zmbv/zmbv_32bit.avi.md5 mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/zmbv/zmbv_32bit.avi.md5 --- mplayer-1.0~rc4.dfsg1+svn33713/tests/ref/zmbv/zmbv_32bit.avi.md5 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/ref/zmbv/zmbv_32bit.avi.md5 2011-11-08 20:48:11.000000000 +0000 @@ -0,0 +1,415 @@ +b9b5ce35087d2443fef9f67f19980253 frame00000000 +71d75712a13ea0e559cf62c025a28246 frame00000001 +488da5913b54ebecc008530ef7a28330 frame00000002 +22d5f432421287cdb180d1f1eb01a45a frame00000003 +17b6f9c9234f437ae24834d0ec97d876 frame00000004 +17b6f9c9234f437ae24834d0ec97d876 frame00000005 +17b6f9c9234f437ae24834d0ec97d876 frame00000006 +17b6f9c9234f437ae24834d0ec97d876 frame00000007 +17b6f9c9234f437ae24834d0ec97d876 frame00000008 +17b6f9c9234f437ae24834d0ec97d876 frame00000009 +17b6f9c9234f437ae24834d0ec97d876 frame00000010 +17b6f9c9234f437ae24834d0ec97d876 frame00000011 +17b6f9c9234f437ae24834d0ec97d876 frame00000012 +17b6f9c9234f437ae24834d0ec97d876 frame00000013 +17b6f9c9234f437ae24834d0ec97d876 frame00000014 +70f2a63880be29c617626e936c63f476 frame00000015 +70f2a63880be29c617626e936c63f476 frame00000016 +70f2a63880be29c617626e936c63f476 frame00000017 +70f2a63880be29c617626e936c63f476 frame00000018 +70f2a63880be29c617626e936c63f476 frame00000019 +70f2a63880be29c617626e936c63f476 frame00000020 +8a35260c055f045ff2e3603c687ccd4b frame00000021 +8a35260c055f045ff2e3603c687ccd4b frame00000022 +8a35260c055f045ff2e3603c687ccd4b frame00000023 +8a35260c055f045ff2e3603c687ccd4b frame00000024 +8a35260c055f045ff2e3603c687ccd4b frame00000025 +a5259efc10d7633caa178eddd85e8b46 frame00000026 +a5259efc10d7633caa178eddd85e8b46 frame00000027 +a5259efc10d7633caa178eddd85e8b46 frame00000028 +a5259efc10d7633caa178eddd85e8b46 frame00000029 +a5259efc10d7633caa178eddd85e8b46 frame00000030 +a5259efc10d7633caa178eddd85e8b46 frame00000031 +1e15bb74652eaedda6209f4375000bb3 frame00000032 +1e15bb74652eaedda6209f4375000bb3 frame00000033 +1e15bb74652eaedda6209f4375000bb3 frame00000034 +1e15bb74652eaedda6209f4375000bb3 frame00000035 +1e15bb74652eaedda6209f4375000bb3 frame00000036 +1e15bb74652eaedda6209f4375000bb3 frame00000037 +bb06b5b77d80ff998a12f9a60b475955 frame00000038 +bb06b5b77d80ff998a12f9a60b475955 frame00000039 +bb06b5b77d80ff998a12f9a60b475955 frame00000040 +bb06b5b77d80ff998a12f9a60b475955 frame00000041 +bb06b5b77d80ff998a12f9a60b475955 frame00000042 +bd4d3256a97abcdd5bd7d013c9daf15d frame00000043 +bd4d3256a97abcdd5bd7d013c9daf15d frame00000044 +bd4d3256a97abcdd5bd7d013c9daf15d frame00000045 +bd4d3256a97abcdd5bd7d013c9daf15d frame00000046 +bd4d3256a97abcdd5bd7d013c9daf15d frame00000047 +bd4d3256a97abcdd5bd7d013c9daf15d frame00000048 +dc9eb34bd3247ebdd2f2eed75baf73d5 frame00000049 +ca5ea87e295c0fe67ab656c3c7de4bf3 frame00000050 +2339c97fc72f9cd76d076dcdecbcdc7c frame00000051 +2aaa101b75b1f4ac3678ab0a6dec5342 frame00000052 +0400f7080fc3ff463ef22c169ead0d37 frame00000053 +12050b5ce396327af397bbfceb332a34 frame00000054 +bc38d598bba49913e0b9c5e7c9504a4a frame00000055 +c4b5b28370390b9f7718cb5fcbc88d45 frame00000056 +95a35fd623a9b9e7a00b155a17bd44f6 frame00000057 +85eb45d14b45413b63da3c7b61a24760 frame00000058 +6bad91d57c8960b2e93267f51d4daa0c frame00000059 +84096105a475559b490dc8e42a24148e frame00000060 +5c378166689bbfbf77212bf69a57edb7 frame00000061 +bbae72115f5a5361479e77a8c7d90eae frame00000062 +7c06746bd8e091723de1e44890bcdca4 frame00000063 +ab50c68a141c315d2692faa9ea625df7 frame00000064 +a5175e960514851f2f2dd155a8bdbfe1 frame00000065 +7aaaae816927006cc97519a629780fe8 frame00000066 +b90ee37cc6419df949ba9214b1da6b02 frame00000067 +e541253f74fa49773189036ccf677e45 frame00000068 +1b52ef0b020c0c19e908bd9a9ba1b54b frame00000069 +ae1982c36e8e167c76022b6017760c43 frame00000070 +1cf06d5df7466e22c507b30610054205 frame00000071 +ce152c2bb9330a2a6014e4e2f353e2b1 frame00000072 +0d987bce5a4c1731728c91c75b12297d frame00000073 +5ca738c9d6e85ca00d842d955619bba9 frame00000074 +902d48cc3d63a888dcd095ff20b7de60 frame00000075 +a56324120058faa55d02f91ee0a2e462 frame00000076 +e02bd7e356e1b3b69a9e407268f1a55a frame00000077 +b0f92eb22869ee3c8a74242341813768 frame00000078 +9b62eac0329e5fb1c20d1bd0c9adca72 frame00000079 +fea6617311d1cb6ea494cbba8721fc65 frame00000080 +3ba85aba81fc3ac87cadbdefedfba2b2 frame00000081 +6695737fdf462a78f66d42457446cbaf frame00000082 +e0d20cc8a2a226573f5d88042b9f62d3 frame00000083 +4aaf76ff75605f031e5a36359404ed09 frame00000084 +282a05b569a4aff7c6fa60491b3634e8 frame00000085 +e9f03c9b6b83390c2f14fa9af8676467 frame00000086 +3c26a9c5b69ed483908007b03d862a21 frame00000087 +ccf033cf0b9560af733b6a00a43c41f3 frame00000088 +abcde6809981a65ff68f4c2a19097784 frame00000089 +5bc96e2b82ab23fce909ddaac151991c frame00000090 +12eed484289e778ce2c11e0f9d225944 frame00000091 +902c82640e7282941ea7b6e40ea404bd frame00000092 +09ac30485e7ba728dd84aaf09ebf3465 frame00000093 +6270ee6947e5a8ef7f3ab8f231ab7254 frame00000094 +b7bf0cb4113b35c0dd0f9867f35580dc frame00000095 +6dc97104eec7be76376c63094457adaf frame00000096 +b3fa941ca694e2e79c692eacfbe0a7e0 frame00000097 +fc3d6f9f8da889888337290db1e4cbc1 frame00000098 +d1d60585b27e08dfcebf50f0ddd7b522 frame00000099 +4f3d1d31a18cb1512198da842d228228 frame00000100 +78d421c886c3051fadc4c2e63059aef2 frame00000101 +ab3afb7d9cccbfca09351a825d18cc3f frame00000102 +02a2a6fa3b61a92e16906e19e493eca6 frame00000103 +16b882266827ef2e81ab787df1b334d9 frame00000104 +ba5efc2a283d6eefc76f6db4a9175ec1 frame00000105 +788a9787e306469f1eb286e0737832aa frame00000106 +ae0fea6f5eaf2a9880134fc34af5c6f4 frame00000107 +2a4c69ee1f0ef5734ab366a54276a91f frame00000108 +e5f7e86ac62dcca789a02e9fc99d6268 frame00000109 +74fc5d1ca4fab7cdc3133aadef39a2c8 frame00000110 +4240ae5988d651681172a23a5dae0e41 frame00000111 +13b4cc56f5c4e190d33ca9d91a2e2953 frame00000112 +b76e88a5469b880eabfc6b3968368ccd frame00000113 +ff112724ebd65e86b4dd3a2c70ab93a9 frame00000114 +2f05d7cc34e73ba939b0fab5727ba051 frame00000115 +b2fc939bfbb2300deb86dd291460b52f frame00000116 +eb6b823861877e5758b99a010996855b frame00000117 +80fb241339e8510d957a520c3abcfc62 frame00000118 +781234f3a3faef189dc212cc6eee72ec frame00000119 +0038a345b50cf6b27b86334167ec3168 frame00000120 +51d6979be9545e270a823013cf24345e frame00000121 +fe384f668da282694c29a84ebd33481d frame00000122 +fe384f668da282694c29a84ebd33481d frame00000123 +0035f6a37794a919f78f9b8515beaef6 frame00000124 +f4c4c15ad5495ce6dd2565522379b310 frame00000125 +1e587a9ac29e0f6ca5c9db5a5d32ca4a frame00000126 +4766e33920a09e42bfd3a5381bacc410 frame00000127 +6f77c02e4c81eed7dbb6d787db523102 frame00000128 +120baa311fe0955fad74f658459929b7 frame00000129 +592b1c09c4c499ee220a1bddd04f864e frame00000130 +ed1527a55dddb7a3f4b544bd1a6805b8 frame00000131 +41545fe2d5f5d11a01b0e65caab7bbff frame00000132 +7749c92ff4b0628d83b862f0d07b4431 frame00000133 +fd0200ab4a6205564a6a2ed2ba308ebc frame00000134 +4703eb17a1c2537bd0ef38087b46371a frame00000135 +b2ba6e191405add51536bb59e82607df frame00000136 +9fad102f0325a84b3414924c10cdea78 frame00000137 +0a1eb3c352664a73356191ba85d99562 frame00000138 +9ef49df6e2492025ad9cfc477536bb2b frame00000139 +a981c9852a375fc39adcf6123853badc frame00000140 +77d7df280ef0ea33c805d3fe05d5a9ac frame00000141 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000142 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000143 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000144 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000145 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000146 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000147 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000148 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000149 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000150 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000151 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000152 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000153 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000154 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000155 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000156 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000157 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000158 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000159 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000160 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000161 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000162 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000163 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000164 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000165 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000166 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000167 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000168 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000169 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000170 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000171 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000172 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000173 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000174 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000175 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000176 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000177 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000178 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000179 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000180 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000181 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000182 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000183 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000184 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000185 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000186 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000187 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000188 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000189 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000190 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000191 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000192 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000193 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000194 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000195 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000196 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000197 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000198 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000199 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000200 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000201 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000202 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000203 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000204 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000205 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000206 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000207 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000208 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000209 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000210 +1ac2fa5871d0a3b1c3bcd96734e2276e frame00000211 +777b4481831d21fa6bd5cfcafebca6ea frame00000212 +a0938ffc6447c5e303ca4c992cb62ffb frame00000213 +55a073c0fab6ceed35821a86fcb0d6e2 frame00000214 +d76f45e0658ad0eb67fe9f2ce65af4b8 frame00000215 +2f187bda417be9ef28982d8efc311323 frame00000216 +ceeee14b2f982150a1a3bc3012c38107 frame00000217 +8c664431617975ecc7427b413b2198fd frame00000218 +18c2a871b1987f94817071f31c92e107 frame00000219 +9e7d7ca819aa50942489759ea6f3ff69 frame00000220 +38c7b315101117a8de8c8a92a8bd1490 frame00000221 +f982ce1b101284548da9859475a945cd frame00000222 +f0dba8a8ea74d2a1246470bc4aa95fa1 frame00000223 +7f05ff75b482bb169de6d186561d3fe0 frame00000224 +efb8c37c739a78e17075bcf5c0c40efe frame00000225 +efb8c37c739a78e17075bcf5c0c40efe frame00000226 +efb8c37c739a78e17075bcf5c0c40efe frame00000227 +efb8c37c739a78e17075bcf5c0c40efe frame00000228 +efb8c37c739a78e17075bcf5c0c40efe frame00000229 +efb8c37c739a78e17075bcf5c0c40efe frame00000230 +efb8c37c739a78e17075bcf5c0c40efe frame00000231 +efb8c37c739a78e17075bcf5c0c40efe frame00000232 +efb8c37c739a78e17075bcf5c0c40efe frame00000233 +efb8c37c739a78e17075bcf5c0c40efe frame00000234 +efb8c37c739a78e17075bcf5c0c40efe frame00000235 +efb8c37c739a78e17075bcf5c0c40efe frame00000236 +efb8c37c739a78e17075bcf5c0c40efe frame00000237 +efb8c37c739a78e17075bcf5c0c40efe frame00000238 +efb8c37c739a78e17075bcf5c0c40efe frame00000239 +efb8c37c739a78e17075bcf5c0c40efe frame00000240 +fb77912b090f665a8ccf04d4886cad32 frame00000241 +c98d7fd87fb6f06f638d57df09f98a8d frame00000242 +c98d7fd87fb6f06f638d57df09f98a8d frame00000243 +2f95549dcdd12f87b8b0a8ad92394f0f frame00000244 +a46d72717f0f562c572b7b100a7c502c frame00000245 +ce3197575f3d321bcdfd1fe8a5da5e51 frame00000246 +ce3197575f3d321bcdfd1fe8a5da5e51 frame00000247 +c7f293f00490bc3b478dd79f051ebf29 frame00000248 +9b291f0fb93d8da54b322221c232600f frame00000249 +9b291f0fb93d8da54b322221c232600f frame00000250 +211b921530bf27a8f3008d8e5b956927 frame00000251 +c3aeaf9d2495cbd844080130b005797e frame00000252 +d2fc1762a7b6ee59fec50760690079cd frame00000253 +d2fc1762a7b6ee59fec50760690079cd frame00000254 +2b1d30db29480f55c6e7b82ef62d7ee5 frame00000255 +05da1693e34a47e65a0b22af0f00ccda frame00000256 +05da1693e34a47e65a0b22af0f00ccda frame00000257 +31c281e1f2e5b5f287b47e0b5529453b frame00000258 +ab8dae7803b68bec08078ea76ab00f8a frame00000259 +bcb20922f329007c107a30ea68152f5f frame00000260 +bcb20922f329007c107a30ea68152f5f frame00000261 +2e7a1d3c0b7da51828833d8ed0040ffc frame00000262 +ff92db27a52d6b558afc974df648dab6 frame00000263 +ff92db27a52d6b558afc974df648dab6 frame00000264 +d1d966379ef921deaed955a09b1d8de3 frame00000265 +d1d966379ef921deaed955a09b1d8de3 frame00000266 +7016548e0a2741a9d7ae50e786bd2b81 frame00000267 +97d8597d0e554133a95bb0bc50b39d58 frame00000268 +f9bbce19dc6752c5b9383ca25225fe7b frame00000269 +f9bbce19dc6752c5b9383ca25225fe7b frame00000270 +6c6dcb544795ce18fece50aa926c5620 frame00000271 +d4eb79aea6ed031c4757a0904fee2700 frame00000272 +d4eb79aea6ed031c4757a0904fee2700 frame00000273 +fa1a720238afeeb6dfde54eddaa146e9 frame00000274 +d321c3c493630b92603a02dba8d79d1d frame00000275 +95e1e9e44ee2d8372291c0e585905098 frame00000276 +95e1e9e44ee2d8372291c0e585905098 frame00000277 +c9c0ca640cc643681f516cef654aa100 frame00000278 +aab0dac639718158d07d033453d5e4ad frame00000279 +aab0dac639718158d07d033453d5e4ad frame00000280 +5fa1e95794291017ff53fd864ca777fc frame00000281 +bcdc9eb72e0f6bf27fe5937242a76321 frame00000282 +24a26a4cdc1d479160ab21a2f4b3a771 frame00000283 +24a26a4cdc1d479160ab21a2f4b3a771 frame00000284 +69df91d168b652d9e24e59ef8371d294 frame00000285 +51b36a4496ae07fdd7109f3a6a1d21f8 frame00000286 +51b36a4496ae07fdd7109f3a6a1d21f8 frame00000287 +de1f7d6042b67504ab35d2f658524268 frame00000288 +8e623f54e8a9ddf0482b1a13b70a383f frame00000289 +bea555fc96649666b74b800a77f6462d frame00000290 +bea555fc96649666b74b800a77f6462d frame00000291 +f3829f98c01ea1c2e8c34aed816f4de7 frame00000292 +5dd12e42193f1c0af6e8747f9b7454a4 frame00000293 +5dd12e42193f1c0af6e8747f9b7454a4 frame00000294 +e4d1b29eb019aef8890836bc72e63ba1 frame00000295 +5f6b705da5c106ce5a22eb882c301a29 frame00000296 +956c3cccbbd787f1b1ae48bfb09c6a2d frame00000297 +956c3cccbbd787f1b1ae48bfb09c6a2d frame00000298 +f2f9092eda2896bb7529cddcd45969a2 frame00000299 +f4c65c382563033f432f7d2a5bdfca69 frame00000300 +f9917e5e7f69003ab004527b11227f4d frame00000301 +f9917e5e7f69003ab004527b11227f4d frame00000302 +7af96f6a49a4be46d75dacb33ba11bdd frame00000303 +f8963fefa74b1fd5cf64d4e853b53865 frame00000304 +f8963fefa74b1fd5cf64d4e853b53865 frame00000305 +b667846acf2ed33576b52b4c2ecdbc7b frame00000306 +0f7c305e004fc5bee35656a52dad9203 frame00000307 +1320cefbfc01fb1914f0b5b70ca44b7d frame00000308 +1320cefbfc01fb1914f0b5b70ca44b7d frame00000309 +b8919065dd82026d857d9e21a5badec0 frame00000310 +f516fdc5c9abd61e0893508cdb9be1d3 frame00000311 +f516fdc5c9abd61e0893508cdb9be1d3 frame00000312 +2d065cca8fc81d60d22972d6d02aa3fd frame00000313 +438b5db37e8fd53c45b551871fa3d7f3 frame00000314 +79df28f5b9f40a70962d25e4df6bd9dd frame00000315 +79df28f5b9f40a70962d25e4df6bd9dd frame00000316 +5684fff2c042f70810d01ccc6a043398 frame00000317 +1c95afa083408ea950b96d27850f5769 frame00000318 +1c95afa083408ea950b96d27850f5769 frame00000319 +2d31b224189568af74af6a92754be6c3 frame00000320 +b355d65d6b60d0edf50da760666b2776 frame00000321 +b5df1b2c4aeaccd102aae19f4a8fb702 frame00000322 +b5df1b2c4aeaccd102aae19f4a8fb702 frame00000323 +d1f26bb72f0396e9b31eec796255e2c5 frame00000324 +5ccb8d68d27b5b33ad1b61419bda049f frame00000325 +5ccb8d68d27b5b33ad1b61419bda049f frame00000326 +014c56b0ecbafb741cf3195983bd4858 frame00000327 +bf3ad2a3eabb6facc61bdc34e6f53638 frame00000328 +7ec7887228bc78b8df8be2aa87523aaa frame00000329 +7ec7887228bc78b8df8be2aa87523aaa frame00000330 +d6a951872e2267d42b2aa0d5fda030a1 frame00000331 +350f148e7ba79f92118054294ab68628 frame00000332 +350f148e7ba79f92118054294ab68628 frame00000333 +1e660cabbca610bc05d4e538cdecc659 frame00000334 +a0ea96f8071273c23e13a3cfccfef234 frame00000335 +9d65d043f5759ac8fac1b2fe650bf7b7 frame00000336 +9d65d043f5759ac8fac1b2fe650bf7b7 frame00000337 +36d214a075714c1bd45d1ea41818fcf2 frame00000338 +79542217c64fe323bd90e6c7f51d0b02 frame00000339 +406c78cab527c83b871bb47c715ece67 frame00000340 +406c78cab527c83b871bb47c715ece67 frame00000341 +b3b4781a494b935b9ef2c4152fc56be7 frame00000342 +f5da342f18941e518f30706c13c76b84 frame00000343 +f5da342f18941e518f30706c13c76b84 frame00000344 +d0b48813f69c007566b71243417a7a42 frame00000345 +5ec589cac8253f7fd85683232874741c frame00000346 +6cd5f012dd10830a4078d45203bd6a80 frame00000347 +6cd5f012dd10830a4078d45203bd6a80 frame00000348 +0fc749e12f2a50416a2fa7e186f38082 frame00000349 +2ae378171a7ea3479e47a7f558314d84 frame00000350 +2ae378171a7ea3479e47a7f558314d84 frame00000351 +5805e0c4c6078133ae1419294764d732 frame00000352 +5fdbd29b7d82f67d7b5e9c55213c1d47 frame00000353 +4422a9219e8c5984f759decd8bd75c1e frame00000354 +4422a9219e8c5984f759decd8bd75c1e frame00000355 +073296be5478adb3f31a5ec57b54f8ac frame00000356 +fda4d728702a421b379867061e078887 frame00000357 +fda4d728702a421b379867061e078887 frame00000358 +a97f8367a50347e897df54aa1850fc9e frame00000359 +c75149644a6a013e489c0d0c4006ac53 frame00000360 +fb24503ec1ecde448dea1a6e8772be77 frame00000361 +fb24503ec1ecde448dea1a6e8772be77 frame00000362 +e4bd44cd1999e35cc36326764365e956 frame00000363 +51d38872a7e11a454ebf55444e4eb4e8 frame00000364 +51d38872a7e11a454ebf55444e4eb4e8 frame00000365 +1668327b69eb16fc4afdeccea29eee20 frame00000366 +50e401b70ac191417ab8e157a1764a6e frame00000367 +5f5d9892e06e2073c16be260b82227f6 frame00000368 +5f5d9892e06e2073c16be260b82227f6 frame00000369 +3e0d2efbfe9b5874538bd85768ce6451 frame00000370 +41a3bd5d67175c46583c05eddc0f3ad6 frame00000371 +41a3bd5d67175c46583c05eddc0f3ad6 frame00000372 +fce8d6f268251d3962f430bf39d5db67 frame00000373 +24a11c49ba7fe3357ced61541ae2b83d frame00000374 +24a11c49ba7fe3357ced61541ae2b83d frame00000375 +24a11c49ba7fe3357ced61541ae2b83d frame00000376 +24a11c49ba7fe3357ced61541ae2b83d frame00000377 +24a11c49ba7fe3357ced61541ae2b83d frame00000378 +24a11c49ba7fe3357ced61541ae2b83d frame00000379 +24a11c49ba7fe3357ced61541ae2b83d frame00000380 +24a11c49ba7fe3357ced61541ae2b83d frame00000381 +24a11c49ba7fe3357ced61541ae2b83d frame00000382 +24a11c49ba7fe3357ced61541ae2b83d frame00000383 +ea3fb639e10dbeab8f75eea316cd9c99 frame00000384 +8e7342f737345a6d3d09b440c55f7425 frame00000385 +a27af333f9c1b1d538d035d08959710b frame00000386 +a27af333f9c1b1d538d035d08959710b frame00000387 +330fea7410e714690ef15ebca8df8f13 frame00000388 +5fe41a22638b0f3c690954056ef5e7c2 frame00000389 +5fe41a22638b0f3c690954056ef5e7c2 frame00000390 +8a7bb472eda16dacc625277069082a3d frame00000391 +df62edf1ea0fc4e8ce310f88d6558619 frame00000392 +46e2dbae630621b25bd8bb9ff4619796 frame00000393 +46e2dbae630621b25bd8bb9ff4619796 frame00000394 +1dfab0607e42a2f70cd3cda0aabc8437 frame00000395 +271b37615da6491b48156bb1c54b84c4 frame00000396 +271b37615da6491b48156bb1c54b84c4 frame00000397 +e19c571f56e76aad21865e2ca8528949 frame00000398 +21911eb8a414d91654e1727b2f8b0360 frame00000399 +62bb126ec8eb074d0e18a5ce1f38e68f frame00000400 +62bb126ec8eb074d0e18a5ce1f38e68f frame00000401 +750ceadfb726c9f6e6f1f45df4986761 frame00000402 +83e897d8c89f18b36bc9109c10406f92 frame00000403 +83e897d8c89f18b36bc9109c10406f92 frame00000404 +76362682c60414c55647675cca608a67 frame00000405 +b979155125e27518c603815ae70b5ae2 frame00000406 +03ecac97b410bd66984c8bfa04032597 frame00000407 +03ecac97b410bd66984c8bfa04032597 frame00000408 +57434c4f5f9cad3a8402f412d1b04c7d frame00000409 +1da7ad9dc39dc9e9a5213f7fd60ac097 frame00000410 +1da7ad9dc39dc9e9a5213f7fd60ac097 frame00000411 +370b77daafdf0bd50fae63ea565b4990 frame00000412 +10eff6254c2e423608723081bb0e4107 frame00000413 +77441be9f4825dbcd2ee7622d949ea1b frame00000414 diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tests/refupdate.sh mplayer-1.0~rc4.dfsg1+svn34540/tests/refupdate.sh --- mplayer-1.0~rc4.dfsg1+svn33713/tests/refupdate.sh 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tests/refupdate.sh 2012-01-08 15:38:22.000000000 +0000 @@ -0,0 +1,8 @@ +#!/bin/sh +# updates all changed/new results in ref/ +find res -name '*.bad' | while read bad_res ; do + ref_file="ref/${bad_res#res/}" + ref_file="${ref_file%.bad}" + mkdir -p "$(dirname "$ref_file")" + cp "$bad_res" "$ref_file" +done diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/TOOLS/movinfo.c mplayer-1.0~rc4.dfsg1+svn34540/TOOLS/movinfo.c --- mplayer-1.0~rc4.dfsg1+svn33713/TOOLS/movinfo.c 2010-10-26 08:15:58.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/TOOLS/movinfo.c 2011-11-09 01:22:02.000000000 +0000 @@ -182,8 +182,10 @@ if(atom_size<8) break; // error - printf("%08X: %*s %.4s (%08X) %05d [%s] (begin: %08X)\n",pos,level*2,"",&atom_type,atom_type,atom_size, - atom2human_type(atom_type), pos+8); // 8: atom_size fields (4) + atom_type fields (4) + printf("%08X: %*s %.4s (%08X) %05d [%s] (begin: %08X)\n", + pos, level * 2, "", &atom_type, atom_type, + atom_size, atom2human_type(atom_type), + pos + 8); // 8: atom_size fields (4) + atom_type fields (4) #ifndef NO_SPECIAL // if (atom_type == 0x61746475) diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tremor/os.h mplayer-1.0~rc4.dfsg1+svn34540/tremor/os.h --- mplayer-1.0~rc4.dfsg1+svn33713/tremor/os.h 2010-10-26 08:15:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tremor/os.h 2011-10-31 13:18:45.000000000 +0000 @@ -17,6 +17,7 @@ ********************************************************************/ +#include "config.h" #include #include "os_types.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/tremor/tremor.diff mplayer-1.0~rc4.dfsg1+svn34540/tremor/tremor.diff --- mplayer-1.0~rc4.dfsg1+svn33713/tremor/tremor.diff 2010-10-26 08:15:54.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/tremor/tremor.diff 2011-10-31 13:18:45.000000000 +0000 @@ -130,7 +130,8 @@ int ret=0; --- os.h (revision 25873) +++ os.h (working copy) -@@ -20,18 +20,8 @@ +@@ -20,2 +20,3 @@ ++#include "config.h" #include #include "os_types.h" diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/udp_sync.c mplayer-1.0~rc4.dfsg1+svn34540/udp_sync.c --- mplayer-1.0~rc4.dfsg1+svn33713/udp_sync.c 2011-06-09 02:05:01.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/udp_sync.c 2011-08-24 19:16:02.000000000 +0000 @@ -57,11 +57,23 @@ // how far off is still considered equal #define UDP_TIMING_TOLERANCE 0.02 +static void startup(void) +{ +#if HAVE_WINSOCK2_H + static int wsa_started; + if (!wsa_started) { + WSADATA wd; + WSAStartup(0x0202, &wd); + wsa_started = 1; + } +#endif +} + static void set_blocking(int fd, int blocking) { long sock_flags; #if HAVE_WINSOCK2_H - sock_flags = blocking; + sock_flags = !blocking; ioctlsocket(fd, FIONBIO, &sock_flags); #else sock_flags = fcntl(fd, F_GETFL, 0); @@ -83,9 +95,14 @@ static int sockfd = -1; if (sockfd == -1) { +#if HAVE_WINSOCK2_H + DWORD tv = 30000; +#else struct timeval tv = { .tv_sec = 30 }; +#endif struct sockaddr_in servaddr = { 0 }; + startup(); sockfd = socket(AF_INET, SOCK_DGRAM, 0); if (sockfd == -1) return -1; @@ -133,6 +150,7 @@ static const int one = 1; int ip_valid = 0; + startup(); sockfd = socket(AF_INET, SOCK_DGRAM, 0); if (sockfd == -1) exit_player(EXIT_ERROR); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/version.sh mplayer-1.0~rc4.dfsg1+svn34540/version.sh --- mplayer-1.0~rc4.dfsg1+svn33713/version.sh 2011-03-01 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/version.sh 2012-01-01 04:09:35.000000000 +0000 @@ -19,7 +19,7 @@ NEW_REVISION="#define VERSION \"${version}${extra}\"" OLD_REVISION=$(head -n 1 version.h 2> /dev/null) -TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2011 MPlayer Team\n"' +TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2012 MPlayer Team\n"' # Update version.h only on revision changes to avoid spurious rebuilds if test "$NEW_REVISION" != "$OLD_REVISION"; then diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/vidix/radeon_vid.c mplayer-1.0~rc4.dfsg1+svn34540/vidix/radeon_vid.c --- mplayer-1.0~rc4.dfsg1+svn33713/vidix/radeon_vid.c 2010-11-29 03:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/vidix/radeon_vid.c 2011-09-23 14:26:24.000000000 +0000 @@ -345,6 +345,8 @@ { DEVICE_ATI_RAGE_128_PRO2, 0 }, { DEVICE_ATI_RAGE_128_PRO3, 0 }, /* these seem to be based on rage 128 instead of mach64 */ + { DEVICE_ATI_RAGE_MOBILITY_M4, 0 }, + { DEVICE_ATI_RAGE_MOBILITY_M42, 0 }, { DEVICE_ATI_RAGE_MOBILITY_M3, 0 }, { DEVICE_ATI_RAGE_MOBILITY_M32, 0 }, #else diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/vidix/sysdep/libdha_win32.c mplayer-1.0~rc4.dfsg1+svn34540/vidix/sysdep/libdha_win32.c --- mplayer-1.0~rc4.dfsg1+svn33713/vidix/sysdep/libdha_win32.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/vidix/sysdep/libdha_win32.c 2011-06-23 22:52:09.000000000 +0000 @@ -23,6 +23,7 @@ #include #include #include "vidix/dhahelperwin/dhahelper.h" +#include "libdha_win32.h" /* This is the request structure that applications use @@ -49,8 +50,6 @@ #define METHOD_NEITHER 3 -int IsWinNT(void); - int IsWinNT(void) { OSVERSIONINFO OSVersionInfo; OSVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/vidix/sysdep/libdha_win32.h mplayer-1.0~rc4.dfsg1+svn34540/vidix/sysdep/libdha_win32.h --- mplayer-1.0~rc4.dfsg1+svn33713/vidix/sysdep/libdha_win32.h 1970-01-01 00:00:00.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/vidix/sysdep/libdha_win32.h 2011-06-23 22:52:09.000000000 +0000 @@ -0,0 +1,26 @@ +/* + * VIDIX - VIDeo Interface for *niX. + * + * 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_LIBDHA_WIN32_H +#define MPLAYER_LIBDHA_WIN32_H + +int IsWinNT(void); + +#endif /* MPLAYER_LIBDHA_WIN32_H */ diff -Nru mplayer-1.0~rc4.dfsg1+svn33713/vidix/sysdep/pci_win32.c mplayer-1.0~rc4.dfsg1+svn34540/vidix/sysdep/pci_win32.c --- mplayer-1.0~rc4.dfsg1+svn33713/vidix/sysdep/pci_win32.c 2011-06-23 02:05:02.000000000 +0000 +++ mplayer-1.0~rc4.dfsg1+svn34540/vidix/sysdep/pci_win32.c 2011-06-23 22:52:09.000000000 +0000 @@ -29,6 +29,7 @@ #include #include #include "vidix/dhahelperwin/dhahelper.h" +#include "libdha_win32.h" static HANDLE hDriver;